aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand SIMONNET <bsimonnet@google.com>2015-07-01 15:39:44 -0700
committerBertrand SIMONNET <bsimonnet@google.com>2015-07-08 10:51:12 -0700
commite6cd738ed3716c02557fb3a47515244e949ade39 (patch)
tree8d093306c27b850f828317ed67d6efea3ec7e084
parentd43abe883892fe84137052fd27ecd956a2c7cacf (diff)
downloadexternal_curl-e6cd738ed3716c02557fb3a47515244e949ade39.tar.gz
external_curl-e6cd738ed3716c02557fb3a47515244e949ade39.tar.bz2
external_curl-e6cd738ed3716c02557fb3a47515244e949ade39.zip
Import curl 7.43
This is a simple import of curl 7.43. The only change from the official release is the fact that the Android.mk was removed to avoid build error trying to parse it. BUG: 22347561 Change-Id: I52ef6798d30b25d22d1f62770d571adec8bcf4d5
-rw-r--r--.gitattributes5
-rw-r--r--.gitignore75
-rw-r--r--.travis.yml13
-rw-r--r--Android.mk106
-rw-r--r--CHANGES4477
-rw-r--r--CHANGES.018002
-rw-r--r--CMake/CheckTypeSize.c.in44
-rw-r--r--CMake/CheckTypeSize.cmake57
-rw-r--r--CMake/CurlCheckCSourceCompiles.cmake75
-rw-r--r--CMake/CurlCheckCSourceRuns.cmake83
-rw-r--r--CMake/CurlTests.c335
-rw-r--r--CMake/FindCARES.cmake42
-rw-r--r--CMake/FindGSS.cmake289
-rw-r--r--CMake/FindLibSSH2.cmake35
-rw-r--r--CMake/FindOpenSSL.cmake19
-rw-r--r--CMake/FindZLIB.cmake8
-rw-r--r--CMake/Macros.cmake95
-rw-r--r--CMake/OtherTests.cmake207
-rw-r--r--CMake/Platforms/WindowsCache.cmake8
-rw-r--r--CMakeLists.txt763
-rw-r--r--CONTRIBUTING.md25
-rw-r--r--COPYING2
-rw-r--r--CTestConfig.cmake13
-rw-r--r--GIT-INFO67
-rwxr-xr-xMacBuild.sh32
-rwxr-xr-xMacOSX-Framework58
-rw-r--r--Makefile.am410
-rw-r--r--Makefile.dist575
-rw-r--r--Makefile.in893
-rw-r--r--README4
-rw-r--r--RELEASE-NOTES182
-rw-r--r--acinclude.m4411
-rw-r--r--aclocal.m4903
-rwxr-xr-xbuildconf204
-rw-r--r--buildconf.bat38
-rwxr-xr-xcompile142
-rwxr-xr-xconfig.guess1502
-rwxr-xr-xconfig.sub1714
-rwxr-xr-xconfigure37342
-rw-r--r--configure.ac2078
-rw-r--r--curl-config.in107
-rw-r--r--curl-style.el50
-rwxr-xr-xcurl.sln35
-rw-r--r--curl.xcodeproj/project.pbxproj138
-rwxr-xr-xdepcomp530
-rw-r--r--docs/.gitignore2
-rw-r--r--docs/BINDINGS80
-rw-r--r--docs/BUGS87
-rw-r--r--docs/CONTRIBUTE105
-rw-r--r--docs/DISTRO-DILEMMA22
-rw-r--r--docs/FAQ551
-rw-r--r--docs/FEATURES114
-rw-r--r--docs/HISTORY250
-rw-r--r--docs/HTTP-COOKIES123
-rw-r--r--docs/HTTP2.md107
-rw-r--r--docs/INSTALL389
-rw-r--r--docs/INSTALL.cmake100
-rw-r--r--docs/INSTALL.devcpp4
-rw-r--r--docs/INTERNALS1045
-rw-r--r--docs/KNOWN_BUGS133
-rw-r--r--docs/LICENSE-MIXING68
-rw-r--r--docs/MAIL-ETIQUETTE265
-rw-r--r--docs/MANUAL193
-rw-r--r--docs/Makefile.am28
-rw-r--r--docs/Makefile.in649
-rw-r--r--docs/README.cmake16
-rw-r--r--docs/README.netware2
-rw-r--r--docs/RELEASE-PROCEDURE89
-rw-r--r--docs/ROADMAP.md139
-rw-r--r--docs/SECURITY107
-rw-r--r--docs/SSL-PROBLEMS67
-rw-r--r--docs/SSLCERTS137
-rw-r--r--docs/THANKS524
-rw-r--r--docs/THANKS-filter52
-rw-r--r--docs/TODO628
-rw-r--r--docs/TheArtOfHttpScripting429
-rw-r--r--docs/VERSIONS47
-rw-r--r--docs/curl-config.15
-rw-r--r--docs/curl-config.html90
-rw-r--r--docs/curl-config.pdfbin5991 -> 0 bytes
-rw-r--r--docs/curl.11865
-rw-r--r--docs/curl.html834
-rw-r--r--docs/curl.pdfbin82603 -> 0 bytes
-rw-r--r--docs/examples/.gitignore75
-rw-r--r--docs/examples/10-at-a-time.c18
-rw-r--r--docs/examples/Makefile.am46
-rw-r--r--docs/examples/Makefile.example15
-rw-r--r--docs/examples/Makefile.in820
-rw-r--r--docs/examples/Makefile.inc39
-rw-r--r--docs/examples/Makefile.m32252
-rw-r--r--docs/examples/Makefile.netware434
-rw-r--r--docs/examples/README6
-rwxr-xr-xdocs/examples/adddocsref.pl35
-rw-r--r--docs/examples/anyauthput.c37
-rw-r--r--docs/examples/asiohiper.cpp467
-rw-r--r--docs/examples/cacertinmem.c23
-rw-r--r--docs/examples/certinfo.c50
-rw-r--r--docs/examples/chkspeed.c37
-rw-r--r--docs/examples/cookie_interface.c28
-rw-r--r--docs/examples/curlgtk.c2
-rw-r--r--docs/examples/curlx.c5
-rw-r--r--docs/examples/debug.c29
-rw-r--r--docs/examples/evhiperfifo.c22
-rw-r--r--docs/examples/externalsocket.c153
-rw-r--r--docs/examples/fileupload.c35
-rw-r--r--docs/examples/fopen.c755
-rw-r--r--docs/examples/ftp-wildcard.c37
-rw-r--r--docs/examples/ftpget.c22
-rw-r--r--docs/examples/ftpgetinfo.c34
-rw-r--r--docs/examples/ftpgetresp.c28
-rw-r--r--docs/examples/ftpsget.c101
-rw-r--r--docs/examples/ftpupload.c30
-rw-r--r--docs/examples/ftpuploadresume.c19
-rw-r--r--docs/examples/getinfo.c18
-rw-r--r--docs/examples/getinmemory.c64
-rw-r--r--docs/examples/ghiper.c18
-rw-r--r--docs/examples/hiperfifo.c88
-rw-r--r--docs/examples/href_extractor.c86
-rw-r--r--docs/examples/htmltidy.c17
-rw-r--r--docs/examples/htmltitle.cc301
-rw-r--r--docs/examples/htmltitle.cpp313
-rw-r--r--docs/examples/http-post.c27
-rw-r--r--docs/examples/http2-download.c288
-rw-r--r--docs/examples/http2-upload.c352
-rw-r--r--docs/examples/httpcustomheader.c44
-rw-r--r--docs/examples/httpput.c35
-rw-r--r--docs/examples/https.c30
-rw-r--r--docs/examples/imap-append.c116
-rw-r--r--docs/examples/imap-copy.c65
-rw-r--r--docs/examples/imap-create.c61
-rw-r--r--docs/examples/imap-delete.c61
-rw-r--r--docs/examples/imap-examine.c61
-rw-r--r--docs/examples/imap-fetch.c58
-rw-r--r--docs/examples/imap-list.c60
-rw-r--r--docs/examples/imap-lsub.c62
-rw-r--r--docs/examples/imap-multi.c167
-rw-r--r--docs/examples/imap-noop.c61
-rw-r--r--docs/examples/imap-search.c65
-rw-r--r--docs/examples/imap-ssl.c85
-rw-r--r--docs/examples/imap-store.c76
-rw-r--r--docs/examples/imap-tls.c84
-rw-r--r--docs/examples/makefile.dj23
-rw-r--r--docs/examples/multi-app.c67
-rw-r--r--docs/examples/multi-debugcallback.c65
-rw-r--r--docs/examples/multi-double.c59
-rw-r--r--docs/examples/multi-post.c64
-rw-r--r--docs/examples/multi-single.c103
-rw-r--r--docs/examples/multi-uv.c230
-rw-r--r--docs/examples/multithread.c18
-rw-r--r--docs/examples/opensslthreadlock.c17
-rw-r--r--docs/examples/persistant.c32
-rw-r--r--docs/examples/pop3-dele.c64
-rw-r--r--docs/examples/pop3-list.c58
-rw-r--r--docs/examples/pop3-multi.c167
-rw-r--r--docs/examples/pop3-noop.c64
-rw-r--r--docs/examples/pop3-retr.c58
-rw-r--r--docs/examples/pop3-ssl.c85
-rw-r--r--docs/examples/pop3-stat.c64
-rw-r--r--docs/examples/pop3-tls.c84
-rw-r--r--docs/examples/pop3-top.c61
-rw-r--r--docs/examples/pop3-uidl.c61
-rw-r--r--docs/examples/post-callback.c39
-rw-r--r--docs/examples/postinmemory.c110
-rw-r--r--docs/examples/postit2.c27
-rw-r--r--docs/examples/progressfunc.c119
-rw-r--r--docs/examples/resolve.c51
-rw-r--r--docs/examples/rtsp.c271
-rw-r--r--docs/examples/sampleconv.c17
-rw-r--r--docs/examples/sendrecv.c38
-rw-r--r--docs/examples/sepheaders.c47
-rw-r--r--docs/examples/sessioninfo.c105
-rw-r--r--docs/examples/sftpget.c106
-rw-r--r--docs/examples/simple.c26
-rw-r--r--docs/examples/simplepost.c23
-rw-r--r--docs/examples/simplessl.c38
-rw-r--r--docs/examples/smooth-gtk-thread.c228
-rw-r--r--docs/examples/smtp-expn.c73
-rw-r--r--docs/examples/smtp-mail.c137
-rw-r--r--docs/examples/smtp-multi.c237
-rw-r--r--docs/examples/smtp-ssl.c161
-rw-r--r--docs/examples/smtp-tls.c163
-rw-r--r--docs/examples/smtp-vrfy.c73
-rw-r--r--docs/examples/synctime.c36
-rw-r--r--docs/examples/threaded-ssl.c17
-rw-r--r--docs/examples/url2file.c80
-rw-r--r--docs/examples/usercertinmem.c224
-rwxr-xr-xdocs/examples/version-check.pl105
-rw-r--r--docs/examples/xmlstream.c158
-rw-r--r--docs/libcurl/.gitignore3
-rw-r--r--docs/libcurl/ABI19
-rw-r--r--docs/libcurl/Makefile.am56
-rw-r--r--docs/libcurl/Makefile.in539
-rw-r--r--docs/libcurl/curl_easy_cleanup.346
-rw-r--r--docs/libcurl/curl_easy_cleanup.html59
-rw-r--r--docs/libcurl/curl_easy_cleanup.pdfbin3895 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_duphandle.329
-rw-r--r--docs/libcurl/curl_easy_duphandle.html59
-rw-r--r--docs/libcurl/curl_easy_duphandle.pdfbin4005 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_escape.329
-rw-r--r--docs/libcurl/curl_easy_escape.html58
-rw-r--r--docs/libcurl/curl_easy_escape.pdfbin3985 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_getinfo.3120
-rw-r--r--docs/libcurl/curl_easy_getinfo.html173
-rw-r--r--docs/libcurl/curl_easy_getinfo.pdfbin16489 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_init.358
-rw-r--r--docs/libcurl/curl_easy_init.html58
-rw-r--r--docs/libcurl/curl_easy_init.pdfbin4041 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_pause.352
-rw-r--r--docs/libcurl/curl_easy_pause.html71
-rw-r--r--docs/libcurl/curl_easy_pause.pdfbin6260 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_perform.382
-rw-r--r--docs/libcurl/curl_easy_perform.html58
-rw-r--r--docs/libcurl/curl_easy_perform.pdfbin4373 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_recv.318
-rw-r--r--docs/libcurl/curl_easy_recv.html62
-rw-r--r--docs/libcurl/curl_easy_recv.pdfbin5209 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_reset.325
-rw-r--r--docs/libcurl/curl_easy_reset.html58
-rw-r--r--docs/libcurl/curl_easy_reset.pdfbin3659 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_send.312
-rw-r--r--docs/libcurl/curl_easy_send.html61
-rw-r--r--docs/libcurl/curl_easy_send.pdfbin4966 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_setopt.32136
-rw-r--r--docs/libcurl/curl_easy_setopt.html797
-rw-r--r--docs/libcurl/curl_easy_setopt.pdfbin116001 -> 0 bytes
-rw-r--r--docs/libcurl/curl_easy_strerror.337
-rw-r--r--docs/libcurl/curl_easy_strerror.html58
-rw-r--r--docs/libcurl/curl_easy_strerror.pdf108
-rw-r--r--docs/libcurl/curl_easy_unescape.34
-rw-r--r--docs/libcurl/curl_easy_unescape.html59
-rw-r--r--docs/libcurl/curl_easy_unescape.pdfbin4116 -> 0 bytes
-rw-r--r--docs/libcurl/curl_escape.324
-rw-r--r--docs/libcurl/curl_escape.html59
-rw-r--r--docs/libcurl/curl_escape.pdfbin3991 -> 0 bytes
-rw-r--r--docs/libcurl/curl_formadd.362
-rw-r--r--docs/libcurl/curl_formadd.html161
-rw-r--r--docs/libcurl/curl_formadd.pdfbin12118 -> 0 bytes
-rw-r--r--docs/libcurl/curl_formfree.331
-rw-r--r--docs/libcurl/curl_formfree.html55
-rw-r--r--docs/libcurl/curl_formfree.pdfbin3391 -> 0 bytes
-rw-r--r--docs/libcurl/curl_formget.348
-rw-r--r--docs/libcurl/curl_formget.html80
-rw-r--r--docs/libcurl/curl_formget.pdfbin4058 -> 0 bytes
-rw-r--r--docs/libcurl/curl_free.328
-rw-r--r--docs/libcurl/curl_free.html54
-rw-r--r--docs/libcurl/curl_free.pdfbin3260 -> 0 bytes
-rw-r--r--docs/libcurl/curl_getdate.353
-rw-r--r--docs/libcurl/curl_getdate.html93
-rw-r--r--docs/libcurl/curl_getdate.pdfbin6912 -> 0 bytes
-rw-r--r--docs/libcurl/curl_getenv.322
-rw-r--r--docs/libcurl/curl_getenv.html57
-rw-r--r--docs/libcurl/curl_getenv.pdfbin4165 -> 0 bytes
-rw-r--r--docs/libcurl/curl_global_cleanup.324
-rw-r--r--docs/libcurl/curl_global_cleanup.html59
-rw-r--r--docs/libcurl/curl_global_cleanup.pdfbin3836 -> 0 bytes
-rw-r--r--docs/libcurl/curl_global_init.344
-rw-r--r--docs/libcurl/curl_global_init.html65
-rw-r--r--docs/libcurl/curl_global_init.pdfbin4721 -> 0 bytes
-rw-r--r--docs/libcurl/curl_global_init_mem.326
-rw-r--r--docs/libcurl/curl_global_init_mem.html74
-rw-r--r--docs/libcurl/curl_global_init_mem.pdfbin4050 -> 0 bytes
-rw-r--r--docs/libcurl/curl_mprintf.322
-rw-r--r--docs/libcurl/curl_mprintf.html70
-rw-r--r--docs/libcurl/curl_mprintf.pdfbin5902 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_add_handle.362
-rw-r--r--docs/libcurl/curl_multi_add_handle.html61
-rw-r--r--docs/libcurl/curl_multi_add_handle.pdfbin4074 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_assign.336
-rw-r--r--docs/libcurl/curl_multi_assign.html61
-rw-r--r--docs/libcurl/curl_multi_assign.pdf117
-rw-r--r--docs/libcurl/curl_multi_cleanup.325
-rw-r--r--docs/libcurl/curl_multi_cleanup.html58
-rw-r--r--docs/libcurl/curl_multi_cleanup.pdfbin3766 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_fdset.370
-rw-r--r--docs/libcurl/curl_multi_fdset.html64
-rw-r--r--docs/libcurl/curl_multi_fdset.pdfbin4472 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_info_read.344
-rw-r--r--docs/libcurl/curl_multi_info_read.html72
-rw-r--r--docs/libcurl/curl_multi_info_read.pdfbin4892 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_init.322
-rw-r--r--docs/libcurl/curl_multi_init.html56
-rw-r--r--docs/libcurl/curl_multi_init.pdfbin3400 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_perform.3107
-rw-r--r--docs/libcurl/curl_multi_perform.html60
-rw-r--r--docs/libcurl/curl_multi_perform.pdfbin5412 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_remove_handle.337
-rw-r--r--docs/libcurl/curl_multi_remove_handle.html57
-rw-r--r--docs/libcurl/curl_multi_remove_handle.pdfbin3852 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_setopt.3109
-rw-r--r--docs/libcurl/curl_multi_setopt.html73
-rw-r--r--docs/libcurl/curl_multi_setopt.pdfbin7292 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_socket.322
-rw-r--r--docs/libcurl/curl_multi_socket.html106
-rw-r--r--docs/libcurl/curl_multi_socket.pdfbin9379 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_socket_action.339
-rw-r--r--docs/libcurl/curl_multi_socket_action.html101
-rw-r--r--docs/libcurl/curl_multi_socket_action.pdfbin8732 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_socket_all.31
-rw-r--r--docs/libcurl/curl_multi_strerror.324
-rw-r--r--docs/libcurl/curl_multi_strerror.html58
-rw-r--r--docs/libcurl/curl_multi_strerror.pdfbin3410 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_timeout.340
-rw-r--r--docs/libcurl/curl_multi_timeout.html62
-rw-r--r--docs/libcurl/curl_multi_timeout.pdfbin4586 -> 0 bytes
-rw-r--r--docs/libcurl/curl_multi_wait.380
-rw-r--r--docs/libcurl/curl_share_cleanup.322
-rw-r--r--docs/libcurl/curl_share_cleanup.html56
-rw-r--r--docs/libcurl/curl_share_cleanup.pdfbin3604 -> 0 bytes
-rw-r--r--docs/libcurl/curl_share_init.328
-rw-r--r--docs/libcurl/curl_share_init.html57
-rw-r--r--docs/libcurl/curl_share_init.pdfbin3796 -> 0 bytes
-rw-r--r--docs/libcurl/curl_share_setopt.327
-rw-r--r--docs/libcurl/curl_share_setopt.html79
-rw-r--r--docs/libcurl/curl_share_setopt.pdfbin4687 -> 0 bytes
-rw-r--r--docs/libcurl/curl_share_strerror.324
-rw-r--r--docs/libcurl/curl_share_strerror.html58
-rw-r--r--docs/libcurl/curl_share_strerror.pdfbin3410 -> 0 bytes
-rw-r--r--docs/libcurl/curl_slist_append.324
-rw-r--r--docs/libcurl/curl_slist_append.html66
-rw-r--r--docs/libcurl/curl_slist_append.pdfbin3794 -> 0 bytes
-rw-r--r--docs/libcurl/curl_slist_free_all.324
-rw-r--r--docs/libcurl/curl_slist_free_all.html56
-rw-r--r--docs/libcurl/curl_slist_free_all.pdf107
-rw-r--r--docs/libcurl/curl_strequal.322
-rw-r--r--docs/libcurl/curl_strequal.html58
-rw-r--r--docs/libcurl/curl_strequal.pdfbin4125 -> 0 bytes
-rw-r--r--docs/libcurl/curl_strnequal.31
-rw-r--r--docs/libcurl/curl_unescape.328
-rw-r--r--docs/libcurl/curl_unescape.html59
-rw-r--r--docs/libcurl/curl_unescape.pdfbin3954 -> 0 bytes
-rw-r--r--docs/libcurl/curl_version.329
-rw-r--r--docs/libcurl/curl_version.html55
-rw-r--r--docs/libcurl/curl_version.pdfbin3200 -> 0 bytes
-rw-r--r--docs/libcurl/curl_version_info.352
-rw-r--r--docs/libcurl/curl_version_info.html121
-rw-r--r--docs/libcurl/curl_version_info.pdfbin8204 -> 0 bytes
-rw-r--r--docs/libcurl/getinfo-times27
-rw-r--r--docs/libcurl/index.html21
-rw-r--r--docs/libcurl/libcurl-easy.341
-rw-r--r--docs/libcurl/libcurl-easy.html54
-rw-r--r--docs/libcurl/libcurl-easy.pdfbin4207 -> 0 bytes
-rw-r--r--docs/libcurl/libcurl-errors.376
-rw-r--r--docs/libcurl/libcurl-errors.html236
-rw-r--r--docs/libcurl/libcurl-errors.pdfbin15530 -> 0 bytes
-rw-r--r--docs/libcurl/libcurl-multi.398
-rw-r--r--docs/libcurl/libcurl-multi.html82
-rw-r--r--docs/libcurl/libcurl-multi.pdfbin9163 -> 0 bytes
-rw-r--r--docs/libcurl/libcurl-share.341
-rw-r--r--docs/libcurl/libcurl-share.html61
-rw-r--r--docs/libcurl/libcurl-share.pdfbin4828 -> 0 bytes
-rw-r--r--docs/libcurl/libcurl-tutorial.3541
-rw-r--r--docs/libcurl/libcurl-tutorial.html547
-rw-r--r--docs/libcurl/libcurl-tutorial.pdfbin69734 -> 0 bytes
-rw-r--r--docs/libcurl/libcurl.3173
-rw-r--r--docs/libcurl/libcurl.html103
-rw-r--r--docs/libcurl/libcurl.m428
-rw-r--r--docs/libcurl/libcurl.pdfbin12665 -> 0 bytes
-rw-r--r--docs/libcurl/mksymbolsmanpage.pl93
-rw-r--r--docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.348
-rw-r--r--docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.347
-rw-r--r--docs/libcurl/opts/CURLMOPT_MAXCONNECTS.362
-rw-r--r--docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.358
-rw-r--r--docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.351
-rw-r--r--docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.350
-rw-r--r--docs/libcurl/opts/CURLMOPT_PIPELINING.368
-rw-r--r--docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.360
-rw-r--r--docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.356
-rw-r--r--docs/libcurl/opts/CURLMOPT_SOCKETDATA.349
-rw-r--r--docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.362
-rw-r--r--docs/libcurl/opts/CURLMOPT_TIMERDATA.348
-rw-r--r--docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3101
-rw-r--r--docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.344
-rw-r--r--docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.363
-rw-r--r--docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.344
-rw-r--r--docs/libcurl/opts/CURLOPT_APPEND.344
-rw-r--r--docs/libcurl/opts/CURLOPT_AUTOREFERER.345
-rw-r--r--docs/libcurl/opts/CURLOPT_BUFFERSIZE.350
-rw-r--r--docs/libcurl/opts/CURLOPT_CAINFO.357
-rw-r--r--docs/libcurl/opts/CURLOPT_CAPATH.353
-rw-r--r--docs/libcurl/opts/CURLOPT_CERTINFO.347
-rw-r--r--docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.369
-rw-r--r--docs/libcurl/opts/CURLOPT_CHUNK_DATA.345
-rw-r--r--docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.354
-rw-r--r--docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.345
-rw-r--r--docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.356
-rw-r--r--docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.360
-rw-r--r--docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.360
-rw-r--r--docs/libcurl/opts/CURLOPT_CONNECT_ONLY.351
-rw-r--r--docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.382
-rw-r--r--docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.381
-rw-r--r--docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.382
-rw-r--r--docs/libcurl/opts/CURLOPT_COOKIE.380
-rw-r--r--docs/libcurl/opts/CURLOPT_COOKIEFILE.359
-rw-r--r--docs/libcurl/opts/CURLOPT_COOKIEJAR.358
-rw-r--r--docs/libcurl/opts/CURLOPT_COOKIELIST.3120
-rw-r--r--docs/libcurl/opts/CURLOPT_COOKIESESSION.351
-rw-r--r--docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.370
-rw-r--r--docs/libcurl/opts/CURLOPT_CRLF.347
-rw-r--r--docs/libcurl/opts/CURLOPT_CRLFILE.360
-rw-r--r--docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.395
-rw-r--r--docs/libcurl/opts/CURLOPT_DEBUGDATA.345
-rw-r--r--docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3184
-rw-r--r--docs/libcurl/opts/CURLOPT_DIRLISTONLY.361
-rw-r--r--docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.356
-rw-r--r--docs/libcurl/opts/CURLOPT_DNS_INTERFACE.348
-rw-r--r--docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.351
-rw-r--r--docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.351
-rw-r--r--docs/libcurl/opts/CURLOPT_DNS_SERVERS.356
-rw-r--r--docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.350
-rw-r--r--docs/libcurl/opts/CURLOPT_EGDSOCKET.345
-rw-r--r--docs/libcurl/opts/CURLOPT_ERRORBUFFER.372
-rw-r--r--docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.349
-rw-r--r--docs/libcurl/opts/CURLOPT_FAILONERROR.353
-rw-r--r--docs/libcurl/opts/CURLOPT_FILETIME.347
-rw-r--r--docs/libcurl/opts/CURLOPT_FNMATCH_DATA.346
-rw-r--r--docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.356
-rw-r--r--docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.370
-rw-r--r--docs/libcurl/opts/CURLOPT_FORBID_REUSE.350
-rw-r--r--docs/libcurl/opts/CURLOPT_FRESH_CONNECT.352
-rw-r--r--docs/libcurl/opts/CURLOPT_FTPPORT.372
-rw-r--r--docs/libcurl/opts/CURLOPT_FTPSSLAUTH.353
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.346
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.350
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.370
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.362
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.350
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.352
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.354
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.347
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.348
-rw-r--r--docs/libcurl/opts/CURLOPT_FTP_USE_PRET.346
-rw-r--r--docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.348
-rw-r--r--docs/libcurl/opts/CURLOPT_HEADER.363
-rw-r--r--docs/libcurl/opts/CURLOPT_HEADERDATA.350
-rw-r--r--docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3106
-rw-r--r--docs/libcurl/opts/CURLOPT_HEADEROPT.357
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTP200ALIASES.358
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTPAUTH.3116
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTPGET.359
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTPHEADER.3110
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTPPOST.378
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.354
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.349
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.348
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTP_VERSION.357
-rw-r--r--docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.361
-rw-r--r--docs/libcurl/opts/CURLOPT_INFILESIZE.371
-rw-r--r--docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.372
-rw-r--r--docs/libcurl/opts/CURLOPT_INTERFACE.355
-rw-r--r--docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.345
-rw-r--r--docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.368
-rw-r--r--docs/libcurl/opts/CURLOPT_IOCTLDATA.344
-rw-r--r--docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.376
-rw-r--r--docs/libcurl/opts/CURLOPT_IPRESOLVE.351
-rw-r--r--docs/libcurl/opts/CURLOPT_ISSUERCERT.358
-rw-r--r--docs/libcurl/opts/CURLOPT_KEYPASSWD.348
-rw-r--r--docs/libcurl/opts/CURLOPT_KRBLEVEL.348
-rw-r--r--docs/libcurl/opts/CURLOPT_LOCALPORT.346
-rw-r--r--docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.350
-rw-r--r--docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.353
-rw-r--r--docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.346
-rw-r--r--docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.345
-rw-r--r--docs/libcurl/opts/CURLOPT_MAIL_AUTH.358
-rw-r--r--docs/libcurl/opts/CURLOPT_MAIL_FROM.351
-rw-r--r--docs/libcurl/opts/CURLOPT_MAIL_RCPT.360
-rw-r--r--docs/libcurl/opts/CURLOPT_MAXCONNECTS.359
-rw-r--r--docs/libcurl/opts/CURLOPT_MAXFILESIZE.352
-rw-r--r--docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.352
-rw-r--r--docs/libcurl/opts/CURLOPT_MAXREDIRS.364
-rw-r--r--docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.349
-rw-r--r--docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.350
-rw-r--r--docs/libcurl/opts/CURLOPT_NETRC.373
-rw-r--r--docs/libcurl/opts/CURLOPT_NETRC_FILE.348
-rw-r--r--docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.348
-rw-r--r--docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.348
-rw-r--r--docs/libcurl/opts/CURLOPT_NOBODY.359
-rw-r--r--docs/libcurl/opts/CURLOPT_NOPROGRESS.342
-rw-r--r--docs/libcurl/opts/CURLOPT_NOPROXY.351
-rw-r--r--docs/libcurl/opts/CURLOPT_NOSIGNAL.355
-rw-r--r--docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.344
-rw-r--r--docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.390
-rw-r--r--docs/libcurl/opts/CURLOPT_PASSWORD.350
-rw-r--r--docs/libcurl/opts/CURLOPT_PATH_AS_IS.363
-rw-r--r--docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.376
-rw-r--r--docs/libcurl/opts/CURLOPT_PIPEWAIT.363
-rw-r--r--docs/libcurl/opts/CURLOPT_PORT.351
-rw-r--r--docs/libcurl/opts/CURLOPT_POST.377
-rw-r--r--docs/libcurl/opts/CURLOPT_POSTFIELDS.387
-rw-r--r--docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.362
-rw-r--r--docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.364
-rw-r--r--docs/libcurl/opts/CURLOPT_POSTQUOTE.348
-rw-r--r--docs/libcurl/opts/CURLOPT_POSTREDIR.373
-rw-r--r--docs/libcurl/opts/CURLOPT_PREQUOTE.347
-rw-r--r--docs/libcurl/opts/CURLOPT_PRIVATE.361
-rw-r--r--docs/libcurl/opts/CURLOPT_PROGRESSDATA.344
-rw-r--r--docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.384
-rw-r--r--docs/libcurl/opts/CURLOPT_PROTOCOLS.392
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXY.385
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXYAUTH.355
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXYHEADER.357
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXYPASSWORD.349
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXYPORT.347
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXYTYPE.354
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXYUSERNAME.353
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXYUSERPWD.350
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.345
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.348
-rw-r--r--docs/libcurl/opts/CURLOPT_PUT.348
-rw-r--r--docs/libcurl/opts/CURLOPT_QUOTE.386
-rw-r--r--docs/libcurl/opts/CURLOPT_RANDOM_FILE.345
-rw-r--r--docs/libcurl/opts/CURLOPT_RANGE.366
-rw-r--r--docs/libcurl/opts/CURLOPT_READDATA.364
-rw-r--r--docs/libcurl/opts/CURLOPT_READFUNCTION.379
-rw-r--r--docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.392
-rw-r--r--docs/libcurl/opts/CURLOPT_REFERER.357
-rw-r--r--docs/libcurl/opts/CURLOPT_RESOLVE.382
-rw-r--r--docs/libcurl/opts/CURLOPT_RESUME_FROM.372
-rw-r--r--docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.374
-rw-r--r--docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.345
-rw-r--r--docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3101
-rw-r--r--docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.345
-rw-r--r--docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.349
-rw-r--r--docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.353
-rw-r--r--docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.349
-rw-r--r--docs/libcurl/opts/CURLOPT_SASL_IR.356
-rw-r--r--docs/libcurl/opts/CURLOPT_SEEKDATA.343
-rw-r--r--docs/libcurl/opts/CURLOPT_SEEKFUNCTION.376
-rw-r--r--docs/libcurl/opts/CURLOPT_SERVICE_NAME.346
-rw-r--r--docs/libcurl/opts/CURLOPT_SHARE.359
-rw-r--r--docs/libcurl/opts/CURLOPT_SOCKOPTDATA.344
-rw-r--r--docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.388
-rw-r--r--docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.347
-rw-r--r--docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.346
-rw-r--r--docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.350
-rw-r--r--docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.348
-rw-r--r--docs/libcurl/opts/CURLOPT_SSH_KEYDATA.344
-rw-r--r--docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3105
-rw-r--r--docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.349
-rw-r--r--docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.351
-rw-r--r--docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.353
-rw-r--r--docs/libcurl/opts/CURLOPT_SSLCERT.355
-rw-r--r--docs/libcurl/opts/CURLOPT_SSLCERTTYPE.348
-rw-r--r--docs/libcurl/opts/CURLOPT_SSLENGINE.348
-rw-r--r--docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.348
-rw-r--r--docs/libcurl/opts/CURLOPT_SSLKEY.350
-rw-r--r--docs/libcurl/opts/CURLOPT_SSLKEYTYPE.350
-rw-r--r--docs/libcurl/opts/CURLOPT_SSLVERSION.378
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.365
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.346
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.371
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.345
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.345
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_FALSESTART.348
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_OPTIONS.351
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.349
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.387
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.381
-rw-r--r--docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.353
-rw-r--r--docs/libcurl/opts/CURLOPT_STDERR.354
-rw-r--r--docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.363
-rw-r--r--docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.361
-rw-r--r--docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.359
-rw-r--r--docs/libcurl/opts/CURLOPT_TCP_NODELAY.356
-rw-r--r--docs/libcurl/opts/CURLOPT_TELNETOPTIONS.347
-rw-r--r--docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.348
-rw-r--r--docs/libcurl/opts/CURLOPT_TIMECONDITION.351
-rw-r--r--docs/libcurl/opts/CURLOPT_TIMEOUT.370
-rw-r--r--docs/libcurl/opts/CURLOPT_TIMEOUT_MS.374
-rw-r--r--docs/libcurl/opts/CURLOPT_TIMEVALUE.345
-rw-r--r--docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.347
-rw-r--r--docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.352
-rw-r--r--docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.347
-rw-r--r--docs/libcurl/opts/CURLOPT_TRANSFERTEXT.351
-rw-r--r--docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.354
-rw-r--r--docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.378
-rw-r--r--docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.348
-rw-r--r--docs/libcurl/opts/CURLOPT_UPLOAD.378
-rw-r--r--docs/libcurl/opts/CURLOPT_URL.3333
-rw-r--r--docs/libcurl/opts/CURLOPT_USERAGENT.356
-rw-r--r--docs/libcurl/opts/CURLOPT_USERNAME.371
-rw-r--r--docs/libcurl/opts/CURLOPT_USERPWD.376
-rw-r--r--docs/libcurl/opts/CURLOPT_USE_SSL.369
-rw-r--r--docs/libcurl/opts/CURLOPT_VERBOSE.363
-rw-r--r--docs/libcurl/opts/CURLOPT_WILDCARDMATCH.387
-rw-r--r--docs/libcurl/opts/CURLOPT_WRITEDATA.360
-rw-r--r--docs/libcurl/opts/CURLOPT_WRITEFUNCTION.381
-rw-r--r--docs/libcurl/opts/CURLOPT_XFERINFODATA.346
-rw-r--r--docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.381
-rw-r--r--docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.349
-rw-r--r--docs/libcurl/opts/Makefile.am355
-rw-r--r--docs/libcurl/opts/template.338
-rw-r--r--docs/libcurl/symbols-in-versions401
-rwxr-xr-xdocs/libcurl/symbols.pl100
-rw-r--r--docs/mk-ca-bundle.1110
-rw-r--r--include/Makefile.in566
-rw-r--r--include/README2
-rw-r--r--include/curl/.gitignore4
-rw-r--r--include/curl/Makefile.am30
-rw-r--r--include/curl/Makefile.in521
-rw-r--r--include/curl/curl.h497
-rw-r--r--include/curl/curlbuild.h583
-rw-r--r--include/curl/curlbuild.h.cmake85
-rw-r--r--include/curl/curlbuild.h.dist585
-rw-r--r--include/curl/curlbuild.h.in29
-rw-r--r--include/curl/curlrules.h26
-rw-r--r--include/curl/curlver.h22
-rw-r--r--include/curl/easy.h4
-rw-r--r--include/curl/mprintf.h9
-rw-r--r--include/curl/multi.h61
-rw-r--r--include/curl/typecheck-gcc.h154
-rw-r--r--include/curl/types.h1
-rwxr-xr-xinstall-sh250
-rw-r--r--lib/.gitignore15
-rw-r--r--lib/CMakeLists.txt40
-rw-r--r--lib/Makefile.Watcom218
-rw-r--r--lib/Makefile.am169
-rw-r--r--lib/Makefile.b32125
-rw-r--r--lib/Makefile.in865
-rw-r--r--lib/Makefile.inc107
-rw-r--r--lib/Makefile.m32271
-rw-r--r--lib/Makefile.netware148
-rw-r--r--lib/Makefile.riscos232
-rw-r--r--lib/Makefile.vc10571
-rw-r--r--lib/Makefile.vc6344
-rw-r--r--lib/Makefile.vc8571
-rw-r--r--lib/Makefile.vc9571
-rw-r--r--lib/Makefile.vxworks10
-rw-r--r--lib/README.ares69
-rw-r--r--lib/README.curl_off_t68
-rw-r--r--lib/README.curlx61
-rw-r--r--lib/README.encoding60
-rw-r--r--lib/README.hostip35
-rw-r--r--lib/README.httpauth74
-rw-r--r--lib/README.memoryleak55
-rw-r--r--lib/README.multi_socket53
-rw-r--r--lib/README.pingpong30
-rw-r--r--lib/README.pipelining51
-rw-r--r--lib/amigaos.c25
-rw-r--r--lib/amigaos.h40
-rw-r--r--lib/arpa_telnet.h6
-rw-r--r--lib/asyn-ares.c691
-rw-r--r--lib/asyn-thread.c698
-rw-r--r--lib/asyn.h168
-rw-r--r--lib/base64.c280
-rwxr-xr-xlib/checksrc.pl282
-rw-r--r--lib/checksrc.whitelist10
-rw-r--r--lib/config-amigaos.h33
-rw-r--r--lib/config-dos.h181
-rw-r--r--lib/config-mac.h43
-rw-r--r--lib/config-os400.h76
-rw-r--r--lib/config-riscos.h56
-rw-r--r--lib/config-symbian.h70
-rw-r--r--lib/config-tpf.h49
-rw-r--r--lib/config-vxworks.h60
-rw-r--r--lib/config-win32.h371
-rw-r--r--lib/config-win32ce.h51
-rw-r--r--lib/config.dos169
-rw-r--r--lib/conncache.c364
-rw-r--r--lib/conncache.h68
-rw-r--r--lib/connect.c1220
-rw-r--r--lib/connect.h72
-rw-r--r--lib/content_encoding.c41
-rw-r--r--lib/content_encoding.h12
-rw-r--r--lib/cookie.c841
-rw-r--r--lib/cookie.h34
-rw-r--r--lib/curl_addrinfo.c155
-rw-r--r--lib/curl_addrinfo.h13
-rw-r--r--lib/curl_base64.h14
-rw-r--r--lib/curl_config.h.cmake540
-rw-r--r--lib/curl_config.h.in1006
-rw-r--r--lib/curl_des.c63
-rw-r--r--lib/curl_des.h34
-rw-r--r--lib/curl_endian.c236
-rw-r--r--lib/curl_endian.h70
-rw-r--r--lib/curl_fnmatch.c14
-rw-r--r--lib/curl_gethostname.c41
-rw-r--r--lib/curl_gethostname.h4
-rw-r--r--lib/curl_gssapi.c120
-rw-r--r--lib/curl_gssapi.h75
-rw-r--r--lib/curl_ldap.h13
-rw-r--r--lib/curl_md4.h14
-rw-r--r--lib/curl_md5.h29
-rw-r--r--lib/curl_memory.h102
-rw-r--r--lib/curl_memrchr.c14
-rw-r--r--lib/curl_memrchr.h2
-rw-r--r--lib/curl_multibyte.c82
-rw-r--r--lib/curl_multibyte.h92
-rw-r--r--lib/curl_ntlm.c232
-rw-r--r--lib/curl_ntlm.h40
-rw-r--r--lib/curl_ntlm_core.c765
-rw-r--r--lib/curl_ntlm_core.h106
-rw-r--r--lib/curl_ntlm_msgs.c817
-rw-r--r--lib/curl_ntlm_msgs.h143
-rw-r--r--lib/curl_ntlm_wb.c431
-rw-r--r--lib/curl_ntlm_wb.h38
-rw-r--r--lib/curl_printf.h56
-rw-r--r--lib/curl_rand.c61
-rw-r--r--lib/curl_rand.h29
-rw-r--r--lib/curl_rtmp.c106
-rw-r--r--lib/curl_sasl.c1669
-rw-r--r--lib/curl_sasl.h254
-rw-r--r--lib/curl_sasl_gssapi.c392
-rw-r--r--lib/curl_sasl_sspi.c1281
-rw-r--r--lib/curl_sec.h51
-rw-r--r--lib/curl_setup.h730
-rw-r--r--lib/curl_setup_once.h551
-rw-r--r--lib/curl_sspi.c201
-rw-r--r--lib/curl_sspi.h311
-rw-r--r--lib/curl_threads.c43
-rw-r--r--lib/curl_threads.h15
-rw-r--r--lib/curlx.h14
-rw-r--r--lib/dict.c59
-rw-r--r--lib/dotdot.c170
-rw-r--r--lib/dotdot.h25
-rw-r--r--lib/easy.c1151
-rw-r--r--lib/easyif.h20
-rw-r--r--lib/escape.c116
-rw-r--r--lib/escape.h14
-rw-r--r--lib/file.c278
-rw-r--r--lib/file.h9
-rw-r--r--lib/fileinfo.c31
-rw-r--r--lib/firefox-db2pem.sh4
-rw-r--r--lib/formdata.c975
-rw-r--r--lib/formdata.h12
-rw-r--r--lib/ftp.c2041
-rw-r--r--lib/ftp.h30
-rw-r--r--lib/ftplistparser.c87
-rw-r--r--lib/ftplistparser.h6
-rw-r--r--lib/getenv.c18
-rw-r--r--lib/getinfo.c375
-rw-r--r--lib/gopher.c77
-rw-r--r--lib/gtls.c918
-rw-r--r--lib/gtls.h63
-rw-r--r--lib/hash.c215
-rw-r--r--lib/hash.h32
-rw-r--r--lib/hmac.c24
-rw-r--r--lib/hostares.c416
-rw-r--r--lib/hostasyn.c74
-rw-r--r--lib/hostcheck.c147
-rw-r--r--lib/hostcheck.h32
-rw-r--r--lib/hostip.c411
-rw-r--r--lib/hostip.h129
-rw-r--r--lib/hostip4.c40
-rw-r--r--lib/hostip6.c88
-rw-r--r--lib/hostsyn.c84
-rw-r--r--lib/hostthre.c579
-rw-r--r--lib/http.c2282
-rw-r--r--lib/http.h127
-rw-r--r--lib/http2.c1343
-rw-r--r--lib/http2.h59
-rw-r--r--lib/http_chunks.c171
-rw-r--r--lib/http_chunks.h54
-rw-r--r--lib/http_digest.c539
-rw-r--r--lib/http_digest.h31
-rw-r--r--lib/http_negotiate.c387
-rw-r--r--lib/http_negotiate.h14
-rw-r--r--lib/http_negotiate_sspi.c300
-rw-r--r--lib/http_ntlm.c1305
-rw-r--r--lib/http_ntlm.h149
-rw-r--r--lib/http_proxy.c590
-rw-r--r--lib/http_proxy.h41
-rw-r--r--lib/idn_win32.c108
-rw-r--r--lib/if2ip.c207
-rw-r--r--lib/if2ip.h34
-rw-r--r--lib/imap.c2074
-rw-r--r--lib/imap.h67
-rw-r--r--lib/inet_ntop.c62
-rw-r--r--lib/inet_ntop.h13
-rw-r--r--lib/inet_pton.c21
-rw-r--r--lib/inet_pton.h9
-rw-r--r--lib/krb4.c422
-rw-r--r--lib/krb4.h70
-rw-r--r--lib/krb5.c139
-rw-r--r--lib/ldap.c753
-rw-r--r--lib/libcurl.def53
-rw-r--r--lib/libcurl.imp51
-rw-r--r--lib/libcurl.plist30
-rwxr-xr-xlib/libcurl.vcproj2515
-rw-r--r--lib/libcurl.vers.in13
-rw-r--r--lib/llist.c30
-rw-r--r--lib/llist.h9
-rw-r--r--lib/makefile.amiga1
-rw-r--r--lib/makefile.dj4
-rw-r--r--lib/md4.c503
-rw-r--r--lib/md5.c727
-rw-r--r--lib/memdebug.c199
-rw-r--r--lib/memdebug.h83
-rwxr-xr-xlib/mk-ca-bundle.pl451
-rwxr-xr-xlib/mk-ca-bundle.vbs95
-rw-r--r--lib/mprintf.c354
-rw-r--r--lib/msvcproj.foot11
-rw-r--r--lib/msvcproj.head147
-rw-r--r--lib/multi.c2360
-rw-r--r--lib/multihandle.h148
-rw-r--r--lib/multiif.h50
-rw-r--r--lib/netrc.c156
-rw-r--r--lib/netrc.h16
-rw-r--r--lib/non-ascii.c338
-rw-r--r--lib/non-ascii.h63
-rw-r--r--lib/nonblock.c32
-rw-r--r--lib/nonblock.h7
-rw-r--r--lib/nss.c1481
-rw-r--r--lib/nssg.h71
-rw-r--r--lib/nwlib.c130
-rw-r--r--lib/nwos.c63
-rwxr-xr-xlib/objnames-test08.sh217
-rwxr-xr-xlib/objnames-test10.sh217
-rw-r--r--lib/objnames.inc107
-rw-r--r--lib/openldap.c367
-rw-r--r--lib/parsedate.c110
-rw-r--r--lib/parsedate.h25
-rw-r--r--lib/pingpong.c276
-rw-r--r--lib/pingpong.h53
-rw-r--r--lib/pipeline.c433
-rw-r--r--lib/pipeline.h56
-rw-r--r--lib/polarssl.c375
-rw-r--r--lib/polarssl.h57
-rw-r--r--lib/pop3.c1538
-rw-r--r--lib/pop3.h77
-rw-r--r--lib/progress.c150
-rw-r--r--lib/progress.h17
-rw-r--r--lib/qssl.c501
-rw-r--r--lib/qssl.h59
-rw-r--r--lib/rawstr.c8
-rw-r--r--lib/rawstr.h13
-rw-r--r--lib/rtsp.c201
-rw-r--r--lib/rtsp.h35
-rw-r--r--lib/security.c320
-rw-r--r--lib/select.c220
-rw-r--r--lib/select.h67
-rw-r--r--lib/sendf.c264
-rw-r--r--lib/sendf.h12
-rw-r--r--lib/setup-os400.h105
-rw-r--r--lib/setup-vms.h430
-rw-r--r--lib/setup.h568
-rw-r--r--lib/setup_once.h493
-rw-r--r--lib/share.c127
-rw-r--r--lib/share.h20
-rw-r--r--lib/sigpipe.h78
-rw-r--r--lib/slist.c80
-rw-r--r--lib/slist.h16
-rw-r--r--lib/smb.c976
-rw-r--r--lib/smb.h271
-rw-r--r--lib/smtp.c1779
-rw-r--r--lib/smtp.h60
-rw-r--r--lib/sockaddr.h26
-rw-r--r--lib/socks.c298
-rw-r--r--lib/socks.h22
-rw-r--r--lib/socks_gssapi.c196
-rw-r--r--lib/socks_sspi.c423
-rw-r--r--lib/speedcheck.c20
-rw-r--r--lib/speedcheck.h2
-rw-r--r--lib/splay.c192
-rw-r--r--lib/splay.h11
-rw-r--r--lib/ssh.c1344
-rw-r--r--lib/ssh.h46
-rw-r--r--lib/sslgen.c472
-rw-r--r--lib/sslgen.h92
-rw-r--r--lib/ssluse.c2658
-rw-r--r--lib/ssluse.h84
-rw-r--r--lib/strdup.c32
-rw-r--r--lib/strdup.h5
-rw-r--r--lib/strequal.c58
-rw-r--r--lib/strequal.h12
-rw-r--r--lib/strerror.c411
-rw-r--r--lib/strerror.h10
-rw-r--r--lib/strtok.c3
-rw-r--r--lib/strtok.h2
-rw-r--r--lib/strtoofft.c15
-rw-r--r--lib/strtoofft.h19
-rw-r--r--lib/telnet.c1217
-rw-r--r--lib/telnet.h9
-rw-r--r--lib/tftp.c443
-rw-r--r--lib/tftp.h9
-rw-r--r--lib/timeval.c19
-rw-r--r--lib/timeval.h9
-rw-r--r--lib/transfer.c1055
-rw-r--r--lib/transfer.h18
-rw-r--r--lib/url.c3889
-rw-r--r--lib/url.h45
-rw-r--r--lib/urldata.h785
-rw-r--r--lib/vc6libcurl.dsp862
-rw-r--r--lib/vc6libcurl.dsw29
-rw-r--r--lib/version.c95
-rw-r--r--lib/vtls/axtls.c690
-rw-r--r--lib/vtls/axtls.h71
-rw-r--r--lib/vtls/cyassl.c773
-rw-r--r--lib/vtls/cyassl.h70
-rw-r--r--lib/vtls/darwinssl.c2484
-rw-r--r--lib/vtls/darwinssl.h76
-rw-r--r--lib/vtls/gskit.c1069
-rw-r--r--lib/vtls/gskit.h71
-rw-r--r--lib/vtls/gtls.c1569
-rw-r--r--lib/vtls/gtls.h83
-rw-r--r--lib/vtls/nss.c2061
-rw-r--r--lib/vtls/nssg.h96
-rw-r--r--lib/vtls/openssl.c3188
-rw-r--r--lib/vtls/openssl.h113
-rw-r--r--lib/vtls/polarssl.c753
-rw-r--r--lib/vtls/polarssl.h75
-rw-r--r--lib/vtls/polarssl_threadlock.c153
-rw-r--r--lib/vtls/polarssl_threadlock.h53
-rw-r--r--lib/vtls/schannel.c1468
-rw-r--r--lib/vtls/schannel.h118
-rw-r--r--lib/vtls/vtls.c896
-rw-r--r--lib/vtls/vtls.h153
-rw-r--r--lib/warnless.c371
-rw-r--r--lib/warnless.h78
-rw-r--r--lib/wildcard.c23
-rw-r--r--lib/wildcard.h6
-rw-r--r--lib/x509asn1.c1188
-rw-r--r--lib/x509asn1.h132
-rw-r--r--libcurl.pc.in10
-rwxr-xr-xltmain.sh8413
-rw-r--r--m4/.gitignore6
-rw-r--r--m4/curl-compilers.m4316
-rw-r--r--m4/curl-confopts.m4212
-rw-r--r--m4/curl-functions.m41424
-rw-r--r--m4/curl-openssl.m4269
-rw-r--r--m4/curl-override.m427
-rw-r--r--m4/curl-reentrant.m46
-rw-r--r--m4/curl-system.m488
-rw-r--r--m4/libtool.m47377
-rw-r--r--m4/ltoptions.m4368
-rw-r--r--m4/ltsugar.m4123
-rw-r--r--m4/ltversion.m423
-rw-r--r--m4/lt~obsolete.m492
-rw-r--r--m4/xc-am-iface.m4253
-rw-r--r--m4/xc-cc-check.m496
-rw-r--r--m4/xc-lt-iface.m4465
-rw-r--r--m4/xc-translit.m4164
-rw-r--r--m4/xc-val-flgs.m4243
-rw-r--r--m4/zz40-xc-ovr.m4668
-rw-r--r--m4/zz50-xc-ovr.m460
-rw-r--r--m4/zz60-xc-ovr.m464
-rwxr-xr-xmaketgz15
-rwxr-xr-xmissing283
-rw-r--r--mkinstalldirs39
-rw-r--r--packages/AIX/Makefile.in563
-rw-r--r--packages/AIX/RPM/.gitignore1
-rw-r--r--packages/AIX/RPM/Makefile.in408
-rw-r--r--packages/AIX/RPM/curl.spec.in2
-rw-r--r--packages/DOS/common.dj4
-rw-r--r--packages/EPM/.gitignore1
-rw-r--r--packages/EPM/Makefile.in409
-rw-r--r--packages/EPM/README2
-rw-r--r--packages/EPM/curl.list.in1
-rw-r--r--packages/Linux/Makefile.in562
-rw-r--r--packages/Linux/RPM/.gitignore2
-rw-r--r--packages/Linux/RPM/Makefile.in410
-rw-r--r--packages/Linux/RPM/curl-ssl.spec.in1
-rw-r--r--packages/Makefile.am5
-rw-r--r--packages/Makefile.in593
-rw-r--r--packages/NetWare/get_exp.awk72
-rw-r--r--packages/NetWare/get_ver.awk67
-rw-r--r--packages/OS400/README.OS400112
-rw-r--r--packages/OS400/ccsidcurl.c444
-rw-r--r--packages/OS400/ccsidcurl.h7
-rw-r--r--packages/OS400/curl.inc.in374
-rw-r--r--packages/OS400/initscript.sh108
-rw-r--r--packages/OS400/make-include.sh52
-rw-r--r--packages/OS400/make-lib.sh59
-rw-r--r--packages/OS400/make-tests.sh6
-rw-r--r--packages/OS400/makefile.sh3
-rw-r--r--packages/OS400/os400sys.c776
-rw-r--r--packages/OS400/os400sys.h5
-rw-r--r--packages/Solaris/Makefile.in438
-rw-r--r--packages/Symbian/bwins/libcurlu.def1
-rw-r--r--packages/Symbian/eabi/libcurlu.def1
-rw-r--r--packages/Symbian/group/curl.mmp40
-rw-r--r--packages/Symbian/group/curl.pkg2
-rw-r--r--packages/Symbian/group/libcurl.mmp37
-rw-r--r--packages/Symbian/group/libcurl.pkg2
-rw-r--r--packages/TPF/curl.mak1
-rw-r--r--packages/Win32/Makefile.in563
-rw-r--r--packages/Win32/cygwin/Makefile.in466
-rw-r--r--packages/vms/Makefile.am45
-rw-r--r--packages/vms/Makefile.in422
-rw-r--r--packages/vms/backup_gnv_curl_src.com132
-rw-r--r--packages/vms/build_curl-config_script.com154
-rw-r--r--packages/vms/build_gnv_curl.com38
-rw-r--r--packages/vms/build_gnv_curl_pcsi_desc.com488
-rw-r--r--packages/vms/build_gnv_curl_pcsi_text.com198
-rw-r--r--packages/vms/build_gnv_curl_release_notes.com102
-rw-r--r--packages/vms/build_libcurl_pc.com205
-rw-r--r--packages/vms/build_vms.com1023
-rw-r--r--packages/vms/clean_gnv_curl.com250
-rw-r--r--packages/vms/compare_curl_source.com371
-rw-r--r--packages/vms/config-vms.h371
-rw-r--r--packages/vms/config_h.com2184
-rw-r--r--packages/vms/curl_crtl_init.c311
-rw-r--r--packages/vms/curl_gnv_build_steps.txt288
-rw-r--r--packages/vms/curl_release_note_start.txt77
-rw-r--r--packages/vms/curl_startup.com100
-rw-r--r--packages/vms/curlmsg.h21
-rw-r--r--packages/vms/curlmsg_vms.h21
-rw-r--r--packages/vms/generate_config_vms_h_curl.com484
-rw-r--r--packages/vms/generate_vax_transfer.com274
-rw-r--r--packages/vms/gnv_conftest.c_first61
-rw-r--r--packages/vms/gnv_curl_configure.sh46
-rw-r--r--packages/vms/gnv_libcurl_symbols.opt181
-rw-r--r--packages/vms/gnv_link_curl.com852
-rw-r--r--packages/vms/hpssl_alpha.opt2
-rw-r--r--packages/vms/hpssl_ia64.opt2
-rw-r--r--packages/vms/hpssl_vax.opt2
-rw-r--r--packages/vms/ldap.opt1
-rw-r--r--packages/vms/macro32_exactcase.patch11
-rw-r--r--packages/vms/make_gnv_curl_install.sh45
-rw-r--r--packages/vms/make_pcsi_curl_kit_name.com190
-rw-r--r--packages/vms/openssl_alpha.opt2
-rw-r--r--packages/vms/openssl_ia64.opt2
-rw-r--r--packages/vms/openssl_ssl_alpha.opt2
-rw-r--r--packages/vms/openssl_ssl_ia64.opt2
-rw-r--r--packages/vms/openssl_ssl_vax.opt2
-rw-r--r--packages/vms/openssl_vax.opt2
-rw-r--r--packages/vms/pcsi_gnv_curl_file_list.txt127
-rw-r--r--packages/vms/pcsi_product_gnv_curl.com199
-rw-r--r--packages/vms/readme198
-rw-r--r--packages/vms/report_openssl_version.c100
-rw-r--r--packages/vms/setup_gnv_curl_build.com288
-rw-r--r--packages/vms/stage_curl_install.com177
-rw-r--r--packages/vms/vms_eco_level.h30
-rw-r--r--projects/README125
-rw-r--r--projects/Windows/VC10/.gitignore4
-rw-r--r--projects/Windows/VC10/curl-all.sln258
-rw-r--r--projects/Windows/VC10/lib/.gitignore6
-rw-r--r--projects/Windows/VC10/lib/libcurl.sln157
-rw-r--r--projects/Windows/VC10/lib/libcurl.tmpl1999
-rw-r--r--projects/Windows/VC10/src/.gitignore6
-rw-r--r--projects/Windows/VC10/src/curlsrc.sln157
-rw-r--r--projects/Windows/VC10/src/curlsrc.tmpl2263
-rw-r--r--projects/Windows/VC11/.gitignore4
-rw-r--r--projects/Windows/VC11/curl-all.sln258
-rw-r--r--projects/Windows/VC11/lib/.gitignore6
-rw-r--r--projects/Windows/VC11/lib/libcurl.sln157
-rw-r--r--projects/Windows/VC11/lib/libcurl.tmpl2047
-rw-r--r--projects/Windows/VC11/src/.gitignore6
-rw-r--r--projects/Windows/VC11/src/curlsrc.sln157
-rw-r--r--projects/Windows/VC11/src/curlsrc.tmpl2311
-rw-r--r--projects/Windows/VC12/.gitignore4
-rw-r--r--projects/Windows/VC12/curl-all.sln258
-rw-r--r--projects/Windows/VC12/lib/.gitignore6
-rw-r--r--projects/Windows/VC12/lib/libcurl.sln157
-rw-r--r--projects/Windows/VC12/lib/libcurl.tmpl2047
-rw-r--r--projects/Windows/VC12/src/.gitignore6
-rw-r--r--projects/Windows/VC12/src/curlsrc.sln157
-rw-r--r--projects/Windows/VC12/src/curlsrc.tmpl2311
-rw-r--r--projects/Windows/VC6/.gitignore2
-rw-r--r--projects/Windows/VC6/curl-all.dsw44
-rw-r--r--projects/Windows/VC6/lib/.gitignore5
-rw-r--r--projects/Windows/VC6/lib/libcurl.dsw29
-rw-r--r--projects/Windows/VC6/lib/libcurl.tmpl746
-rw-r--r--projects/Windows/VC6/src/.gitignore5
-rw-r--r--projects/Windows/VC6/src/curlsrc.dsw29
-rw-r--r--projects/Windows/VC6/src/curlsrc.tmpl695
-rw-r--r--projects/Windows/VC7.1/.gitignore2
-rw-r--r--projects/Windows/VC7.1/curl-all.sln140
-rw-r--r--projects/Windows/VC7.1/lib/.gitignore3
-rw-r--r--projects/Windows/VC7.1/lib/libcurl.sln87
-rw-r--r--projects/Windows/VC7.1/lib/libcurl.tmpl1287
-rw-r--r--projects/Windows/VC7.1/src/.gitignore3
-rw-r--r--projects/Windows/VC7.1/src/curlsrc.sln87
-rw-r--r--projects/Windows/VC7.1/src/curlsrc.tmpl1381
-rw-r--r--projects/Windows/VC7/.gitignore1
-rw-r--r--projects/Windows/VC7/curl-all.sln138
-rw-r--r--projects/Windows/VC7/lib/.gitignore2
-rw-r--r--projects/Windows/VC7/lib/libcurl.sln87
-rw-r--r--projects/Windows/VC7/lib/libcurl.tmpl1141
-rw-r--r--projects/Windows/VC7/src/.gitignore2
-rw-r--r--projects/Windows/VC7/src/curlsrc.sln87
-rw-r--r--projects/Windows/VC7/src/curlsrc.tmpl1235
-rw-r--r--projects/Windows/VC8/.gitignore2
-rw-r--r--projects/Windows/VC8/curl-all.sln258
-rw-r--r--projects/Windows/VC8/lib/.gitignore4
-rw-r--r--projects/Windows/VC8/lib/libcurl.sln157
-rw-r--r--projects/Windows/VC8/lib/libcurl.tmpl3648
-rw-r--r--projects/Windows/VC8/src/.gitignore4
-rw-r--r--projects/Windows/VC8/src/curlsrc.sln157
-rw-r--r--projects/Windows/VC8/src/curlsrc.tmpl4100
-rw-r--r--projects/Windows/VC9/.gitignore2
-rw-r--r--projects/Windows/VC9/curl-all.sln258
-rw-r--r--projects/Windows/VC9/lib/.gitignore4
-rw-r--r--projects/Windows/VC9/lib/libcurl.sln157
-rw-r--r--projects/Windows/VC9/lib/libcurl.tmpl3589
-rw-r--r--projects/Windows/VC9/src/.gitignore4
-rw-r--r--projects/Windows/VC9/src/curlsrc.sln157
-rw-r--r--projects/Windows/VC9/src/curlsrc.tmpl3957
-rw-r--r--projects/build-openssl.bat341
-rw-r--r--projects/checksrc.bat86
-rw-r--r--projects/generate.bat490
-rw-r--r--sample.emacs45
-rwxr-xr-xscripts/contributors.sh88
-rwxr-xr-xscripts/contrithanks.sh57
-rwxr-xr-xscripts/log2changes.pl81
-rwxr-xr-xscripts/zsh.pl77
-rw-r--r--src/.gitignore13
-rw-r--r--src/CMakeLists.txt64
-rw-r--r--src/Makefile.Watcom206
-rw-r--r--src/Makefile.am89
-rw-r--r--src/Makefile.b32109
-rw-r--r--src/Makefile.in743
-rw-r--r--src/Makefile.inc108
-rw-r--r--src/Makefile.m32302
-rw-r--r--src/Makefile.netware330
-rw-r--r--src/Makefile.riscos64
-rw-r--r--src/Makefile.vc10299
-rw-r--r--src/Makefile.vc6419
-rw-r--r--src/Makefile.vc8299
-rw-r--r--src/Makefile.vc9299
-rw-r--r--src/checksrc.whitelist3
-rw-r--r--src/config-amigaos.h69
-rw-r--r--src/config-mac.h35
-rw-r--r--src/config-riscos.h379
-rw-r--r--src/config-win32.h416
-rw-r--r--src/curl.rc2
-rw-r--r--src/curl_config.h.in1006
-rwxr-xr-xsrc/curlsrc.vcproj553
-rw-r--r--src/curlutil.c134
-rw-r--r--src/curlutil.h49
-rw-r--r--src/getpass.c267
-rw-r--r--src/getpass.h34
-rw-r--r--src/homedir.c120
-rw-r--r--src/homedir.h27
-rw-r--r--src/hugehelp.c7061
-rw-r--r--src/hugehelp.h26
-rw-r--r--src/macos/MACINSTALL.TXT2
-rw-r--r--src/main.c6084
-rw-r--r--src/makefile.amiga12
-rw-r--r--src/makefile.dj20
-rw-r--r--src/mkhelp.pl60
-rw-r--r--src/os-specific.c221
-rw-r--r--src/os-specific.h38
-rw-r--r--src/setup.h223
-rw-r--r--src/tool_binmode.c52
-rw-r--r--src/tool_binmode.h37
-rw-r--r--src/tool_bname.c50
-rw-r--r--src/tool_bname.h35
-rw-r--r--src/tool_cb_dbg.c275
-rw-r--r--src/tool_cb_dbg.h35
-rw-r--r--src/tool_cb_hdr.c226
-rw-r--r--src/tool_cb_hdr.h54
-rw-r--r--src/tool_cb_prg.c150
-rw-r--r--src/tool_cb_prg.h50
-rw-r--r--src/tool_cb_rea.c55
-rw-r--r--src/tool_cb_rea.h33
-rw-r--r--src/tool_cb_see.c131
-rw-r--r--src/tool_cb_see.h46
-rw-r--r--src/tool_cb_wrt.c159
-rw-r--r--src/tool_cb_wrt.h36
-rw-r--r--src/tool_cfgable.c159
-rw-r--r--src/tool_cfgable.h246
-rw-r--r--src/tool_convert.c150
-rw-r--r--src/tool_convert.h45
-rw-r--r--src/tool_dirhie.c147
-rw-r--r--src/tool_dirhie.h29
-rw-r--r--src/tool_doswin.c299
-rw-r--r--src/tool_doswin.h46
-rw-r--r--src/tool_easysrc.c229
-rw-r--r--src/tool_easysrc.h48
-rw-r--r--src/tool_formparse.c361
-rw-r--r--src/tool_formparse.h33
-rw-r--r--src/tool_getparam.c1918
-rw-r--r--src/tool_getparam.h62
-rw-r--r--src/tool_getpass.c256
-rw-r--r--src/tool_getpass.h36
-rw-r--r--src/tool_help.c345
-rw-r--r--src/tool_help.h31
-rw-r--r--src/tool_helpers.c79
-rw-r--r--src/tool_helpers.h32
-rw-r--r--src/tool_homedir.c95
-rw-r--r--src/tool_homedir.h28
-rw-r--r--src/tool_hugehelp.c.cvs29
-rw-r--r--src/tool_hugehelp.h28
-rw-r--r--src/tool_libinfo.c102
-rw-r--r--src/tool_libinfo.h34
-rw-r--r--src/tool_main.c275
-rw-r--r--src/tool_main.h44
-rw-r--r--src/tool_metalink.c982
-rw-r--r--src/tool_metalink.h167
-rw-r--r--src/tool_mfiles.c127
-rw-r--r--src/tool_mfiles.h46
-rw-r--r--src/tool_msgs.c100
-rw-r--r--src/tool_msgs.h31
-rw-r--r--src/tool_operate.c1900
-rw-r--r--src/tool_operate.h29
-rw-r--r--src/tool_operhlp.c174
-rw-r--r--src/tool_operhlp.h39
-rw-r--r--src/tool_panykey.c48
-rw-r--r--src/tool_panykey.h37
-rw-r--r--src/tool_paramhlp.c524
-rw-r--r--src/tool_paramhlp.h54
-rw-r--r--src/tool_parsecfg.c365
-rw-r--r--src/tool_parsecfg.h29
-rw-r--r--src/tool_sdecls.h153
-rw-r--r--src/tool_setopt.c567
-rw-r--r--src/tool_setopt.h148
-rw-r--r--src/tool_setup.h74
-rw-r--r--src/tool_sleep.c58
-rw-r--r--src/tool_sleep.h29
-rw-r--r--src/tool_strdup.c47
-rw-r--r--src/tool_strdup.h30
-rw-r--r--src/tool_urlglob.c671
-rw-r--r--src/tool_urlglob.h77
-rw-r--r--src/tool_util.c147
-rw-r--r--src/tool_util.h56
-rw-r--r--src/tool_version.h34
-rw-r--r--src/tool_vms.c219
-rw-r--r--src/tool_vms.h47
-rw-r--r--src/tool_writeenv.c113
-rw-r--r--src/tool_writeenv.h35
-rw-r--r--src/tool_writeout.c326
-rw-r--r--src/tool_writeout.h28
-rw-r--r--src/tool_xattr.c90
-rw-r--r--src/tool_xattr.h28
-rw-r--r--src/urlglob.c549
-rw-r--r--src/urlglob.h67
-rw-r--r--src/vc6curlsrc.dsp258
-rw-r--r--src/vc6curlsrc.dsw29
-rw-r--r--src/version.h35
-rw-r--r--src/writeenv.c120
-rw-r--r--src/writeenv.h27
-rw-r--r--src/writeout.c295
-rw-r--r--src/writeout.h27
-rw-r--r--tests/.gitignore17
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--tests/FILEFORMAT165
-rw-r--r--tests/Makefile.am41
-rw-r--r--tests/Makefile.in631
-rw-r--r--tests/README227
-rw-r--r--tests/certs/EdelCurlRoot-ca.cacert119
-rw-r--r--tests/certs/EdelCurlRoot-ca.crt119
-rw-r--r--tests/certs/EdelCurlRoot-ca.csr30
-rw-r--r--tests/certs/EdelCurlRoot-ca.derbin916 -> 918 bytes
-rw-r--r--tests/certs/EdelCurlRoot-ca.key50
-rw-r--r--tests/certs/EdelCurlRoot-ca.prm2
-rw-r--r--tests/certs/Makefile.am91
-rw-r--r--tests/certs/Server-localhost-sv.crl29
-rw-r--r--tests/certs/Server-localhost-sv.crt101
-rw-r--r--tests/certs/Server-localhost-sv.csr14
-rw-r--r--tests/certs/Server-localhost-sv.derbin837 -> 835 bytes
-rw-r--r--tests/certs/Server-localhost-sv.dhp5
-rw-r--r--tests/certs/Server-localhost-sv.key26
-rw-r--r--tests/certs/Server-localhost-sv.p12bin2958 -> 0 bytes
-rw-r--r--tests/certs/Server-localhost-sv.pem136
-rw-r--r--tests/certs/Server-localhost-sv.prm4
-rw-r--r--tests/certs/Server-localhost-sv.pub.derbin0 -> 162 bytes
-rw-r--r--tests/certs/Server-localhost-sv.pub.pem6
-rw-r--r--tests/certs/Server-localhost.nn-sv.crl30
-rw-r--r--tests/certs/Server-localhost.nn-sv.crt101
-rw-r--r--tests/certs/Server-localhost.nn-sv.csr14
-rw-r--r--tests/certs/Server-localhost.nn-sv.derbin843 -> 841 bytes
-rw-r--r--tests/certs/Server-localhost.nn-sv.dhp5
-rw-r--r--tests/certs/Server-localhost.nn-sv.key26
-rw-r--r--tests/certs/Server-localhost.nn-sv.pem136
-rw-r--r--tests/certs/Server-localhost.nn-sv.prm4
-rw-r--r--tests/certs/Server-localhost.nn-sv.pub.derbin0 -> 162 bytes
-rw-r--r--tests/certs/Server-localhost.nn-sv.pub.pem6
-rw-r--r--tests/certs/Server-localhost0h-sv.crl32
-rw-r--r--tests/certs/Server-localhost0h-sv.crt101
-rw-r--r--tests/certs/Server-localhost0h-sv.csr14
-rw-r--r--tests/certs/Server-localhost0h-sv.derbin839 -> 837 bytes
-rw-r--r--tests/certs/Server-localhost0h-sv.dhp5
-rw-r--r--tests/certs/Server-localhost0h-sv.key26
-rw-r--r--tests/certs/Server-localhost0h-sv.p12bin2970 -> 0 bytes
-rw-r--r--tests/certs/Server-localhost0h-sv.pem136
-rw-r--r--tests/certs/Server-localhost0h-sv.prm4
-rw-r--r--tests/certs/Server-localhost0h-sv.pub.derbin0 -> 162 bytes
-rw-r--r--tests/certs/Server-localhost0h-sv.pub.pem6
-rw-r--r--tests/certs/scripts/Makefile.am29
-rwxr-xr-xtests/certs/scripts/genroot.sh8
-rwxr-xr-xtests/certs/scripts/genserv.sh10
-rw-r--r--tests/certs/srp-verifier-conf3
-rw-r--r--tests/certs/srp-verifier-db2
-rwxr-xr-xtests/convsrctest.pl255
-rw-r--r--tests/data/.gitattributes1
-rw-r--r--tests/data/.gitignore1
-rw-r--r--tests/data/CMakeLists.txt7
-rw-r--r--tests/data/DISABLED9
-rw-r--r--tests/data/Makefile.am71
-rw-r--r--tests/data/Makefile.in495
-rw-r--r--tests/data/Makefile.inc169
-rw-r--r--tests/data/test1009
-rw-r--r--tests/data/test10019
-rw-r--r--tests/data/test100211
-rw-r--r--tests/data/test100828
-rw-r--r--tests/data/test1012
-rw-r--r--tests/data/test10102
-rw-r--r--tests/data/test101126
-rw-r--r--tests/data/test101220
-rw-r--r--tests/data/test10152
-rw-r--r--tests/data/test102132
-rw-r--r--tests/data/test102922
-rw-r--r--tests/data/test10303
-rw-r--r--tests/data/test10324
-rw-r--r--tests/data/test10402
-rw-r--r--tests/data/test10414
-rw-r--r--tests/data/test10426
-rw-r--r--tests/data/test10432
-rw-r--r--tests/data/test10472
-rw-r--r--tests/data/test10482
-rw-r--r--tests/data/test10571
-rw-r--r--tests/data/test10582
-rw-r--r--tests/data/test10594
-rw-r--r--tests/data/test1063
-rw-r--r--tests/data/test106023
-rw-r--r--tests/data/test106123
-rw-r--r--tests/data/test10713
-rw-r--r--tests/data/test10752
-rw-r--r--tests/data/test107822
-rw-r--r--tests/data/test10793
-rw-r--r--tests/data/test10802
-rw-r--r--tests/data/test10812
-rw-r--r--tests/data/test10861
-rw-r--r--tests/data/test10872
-rw-r--r--tests/data/test10884
-rw-r--r--tests/data/test10953
-rw-r--r--tests/data/test109715
-rw-r--r--tests/data/test109826
-rw-r--r--tests/data/test10992
-rw-r--r--tests/data/test110010
-rw-r--r--tests/data/test11012
-rw-r--r--tests/data/test110510
-rw-r--r--tests/data/test11122
-rw-r--r--tests/data/test11135
-rw-r--r--tests/data/test11142
-rw-r--r--tests/data/test11153
-rw-r--r--tests/data/test11174
-rw-r--r--tests/data/test111855
-rw-r--r--tests/data/test111925
-rw-r--r--tests/data/test112044
-rw-r--r--tests/data/test112147
-rw-r--r--tests/data/test112270
-rw-r--r--tests/data/test1123201
-rw-r--r--tests/data/test112469
-rw-r--r--tests/data/test112570
-rw-r--r--tests/data/test112652
-rw-r--r--tests/data/test112761
-rw-r--r--tests/data/test112885
-rw-r--r--tests/data/test112997
-rw-r--r--tests/data/test113097
-rw-r--r--tests/data/test113195
-rw-r--r--tests/data/test113225
-rw-r--r--tests/data/test113395
-rw-r--r--tests/data/test113465
-rw-r--r--tests/data/test113593
-rw-r--r--tests/data/test1163
-rw-r--r--tests/data/test122
-rw-r--r--tests/data/test12032
-rw-r--r--tests/data/test120479
-rw-r--r--tests/data/test120550
-rw-r--r--tests/data/test120653
-rw-r--r--tests/data/test120753
-rw-r--r--tests/data/test120857
-rw-r--r--tests/data/test120958
-rw-r--r--tests/data/test121063
-rw-r--r--tests/data/test121153
-rw-r--r--tests/data/test121251
-rw-r--r--tests/data/test121353
-rw-r--r--tests/data/test121453
-rw-r--r--tests/data/test1215106
-rw-r--r--tests/data/test121663
-rw-r--r--tests/data/test121757
-rw-r--r--tests/data/test121861
-rw-r--r--tests/data/test121949
-rw-r--r--tests/data/test122037
-rw-r--r--tests/data/test122153
-rw-r--r--tests/data/test122253
-rw-r--r--tests/data/test122360
-rw-r--r--tests/data/test122449
-rw-r--r--tests/data/test122557
-rw-r--r--tests/data/test122649
-rw-r--r--tests/data/test122748
-rw-r--r--tests/data/test122855
-rw-r--r--tests/data/test122983
-rw-r--r--tests/data/test123080
-rw-r--r--tests/data/test123161
-rw-r--r--tests/data/test123265
-rw-r--r--tests/data/test123346
-rw-r--r--tests/data/test123433
-rw-r--r--tests/data/test123595
-rw-r--r--tests/data/test123633
-rw-r--r--tests/data/test123747
-rw-r--r--tests/data/test123849
-rw-r--r--tests/data/test123968
-rw-r--r--tests/data/test124048
-rw-r--r--tests/data/test124164
-rw-r--r--tests/data/test136
-rw-r--r--tests/data/test13010
-rw-r--r--tests/data/test130026
-rw-r--r--tests/data/test130126
-rw-r--r--tests/data/test130226
-rw-r--r--tests/data/test130326
-rw-r--r--tests/data/test130430
-rw-r--r--tests/data/test130530
-rw-r--r--tests/data/test130630
-rw-r--r--tests/data/test130727
-rw-r--r--tests/data/test130831
-rw-r--r--tests/data/test13091457
-rw-r--r--tests/data/test1319
-rw-r--r--tests/data/test1310125
-rw-r--r--tests/data/test131164
-rw-r--r--tests/data/test131264
-rw-r--r--tests/data/test131364
-rw-r--r--tests/data/test131479
-rw-r--r--tests/data/test131583
-rw-r--r--tests/data/test131681
-rw-r--r--tests/data/test131756
-rw-r--r--tests/data/test131860
-rw-r--r--tests/data/test131986
-rw-r--r--tests/data/test1329
-rw-r--r--tests/data/test132073
-rw-r--r--tests/data/test132182
-rw-r--r--tests/data/test132580
-rw-r--r--tests/data/test132648
-rw-r--r--tests/data/test132747
-rw-r--r--tests/data/test132871
-rw-r--r--tests/data/test132930
-rw-r--r--tests/data/test1339
-rw-r--r--tests/data/test133051
-rw-r--r--tests/data/test133189
-rw-r--r--tests/data/test133280
-rw-r--r--tests/data/test133354
-rw-r--r--tests/data/test133476
-rw-r--r--tests/data/test133573
-rw-r--r--tests/data/test133681
-rw-r--r--tests/data/test133778
-rw-r--r--tests/data/test133877
-rw-r--r--tests/data/test133974
-rw-r--r--tests/data/test1349
-rw-r--r--tests/data/test134080
-rw-r--r--tests/data/test134177
-rw-r--r--tests/data/test134283
-rw-r--r--tests/data/test134380
-rw-r--r--tests/data/test134489
-rw-r--r--tests/data/test134586
-rw-r--r--tests/data/test134673
-rw-r--r--tests/data/test134778
-rw-r--r--tests/data/test134861
-rw-r--r--tests/data/test134983
-rw-r--r--tests/data/test1351
-rw-r--r--tests/data/test135080
-rw-r--r--tests/data/test135184
-rw-r--r--tests/data/test135281
-rw-r--r--tests/data/test135383
-rw-r--r--tests/data/test135478
-rw-r--r--tests/data/test135561
-rw-r--r--tests/data/test135679
-rw-r--r--tests/data/test135799
-rw-r--r--tests/data/test135896
-rw-r--r--tests/data/test1359100
-rw-r--r--tests/data/test136097
-rw-r--r--tests/data/test136199
-rw-r--r--tests/data/test136296
-rw-r--r--tests/data/test136379
-rw-r--r--tests/data/test136471
-rw-r--r--tests/data/test136568
-rw-r--r--tests/data/test136673
-rw-r--r--tests/data/test136770
-rw-r--r--tests/data/test136872
-rw-r--r--tests/data/test136969
-rw-r--r--tests/data/test137074
-rw-r--r--tests/data/test137171
-rw-r--r--tests/data/test137278
-rw-r--r--tests/data/test137375
-rw-r--r--tests/data/test137481
-rw-r--r--tests/data/test137578
-rw-r--r--tests/data/test137668
-rw-r--r--tests/data/test137770
-rw-r--r--tests/data/test137856
-rw-r--r--tests/data/test137976
-rw-r--r--tests/data/test138073
-rw-r--r--tests/data/test138177
-rw-r--r--tests/data/test138274
-rw-r--r--tests/data/test138376
-rw-r--r--tests/data/test138473
-rw-r--r--tests/data/test138556
-rw-r--r--tests/data/test138671
-rw-r--r--tests/data/test138791
-rw-r--r--tests/data/test138888
-rw-r--r--tests/data/test138992
-rw-r--r--tests/data/test139089
-rw-r--r--tests/data/test139191
-rw-r--r--tests/data/test139288
-rw-r--r--tests/data/test139371
-rw-r--r--tests/data/test139430
-rw-r--r--tests/data/test139526
-rw-r--r--tests/data/test139627
-rw-r--r--tests/data/test139727
-rw-r--r--tests/data/test139826
-rw-r--r--tests/data/test1400103
-rw-r--r--tests/data/test1401126
-rw-r--r--tests/data/test1402112
-rw-r--r--tests/data/test1403107
-rw-r--r--tests/data/test1404161
-rw-r--r--tests/data/test1405136
-rw-r--r--tests/data/test1406125
-rw-r--r--tests/data/test1407103
-rw-r--r--tests/data/test140874
-rw-r--r--tests/data/test140931
-rw-r--r--tests/data/test141031
-rw-r--r--tests/data/test141160
-rw-r--r--tests/data/test1412118
-rw-r--r--tests/data/test141373
-rw-r--r--tests/data/test141457
-rw-r--r--tests/data/test141575
-rw-r--r--tests/data/test141663
-rw-r--r--tests/data/test141778
-rw-r--r--tests/data/test1418108
-rw-r--r--tests/data/test141969
-rw-r--r--tests/data/test1420108
-rw-r--r--tests/data/test142172
-rw-r--r--tests/data/test142263
-rw-r--r--tests/data/test142357
-rw-r--r--tests/data/test142476
-rw-r--r--tests/data/test142881
-rw-r--r--tests/data/test142969
-rw-r--r--tests/data/test143053
-rw-r--r--tests/data/test143153
-rw-r--r--tests/data/test143254
-rw-r--r--tests/data/test143369
-rw-r--r--tests/data/test143490
-rw-r--r--tests/data/test143546
-rw-r--r--tests/data/test143685
-rw-r--r--tests/data/test1476
-rw-r--r--tests/data/test1486
-rw-r--r--tests/data/test1496
-rw-r--r--tests/data/test15015
-rw-r--r--tests/data/test150044
-rw-r--r--tests/data/test150153
-rw-r--r--tests/data/test150258
-rw-r--r--tests/data/test150358
-rw-r--r--tests/data/test150458
-rw-r--r--tests/data/test150558
-rw-r--r--tests/data/test150696
-rw-r--r--tests/data/test150751
-rw-r--r--tests/data/test150831
-rw-r--r--tests/data/test150988
-rw-r--r--tests/data/test1517
-rw-r--r--tests/data/test151096
-rw-r--r--tests/data/test151170
-rw-r--r--tests/data/test151280
-rw-r--r--tests/data/test151346
-rw-r--r--tests/data/test151448
-rw-r--r--tests/data/test151558
-rw-r--r--tests/data/test151658
-rw-r--r--tests/data/test1528
-rw-r--r--tests/data/test152063
-rw-r--r--tests/data/test152576
-rw-r--r--tests/data/test152676
-rw-r--r--tests/data/test152776
-rw-r--r--tests/data/test152860
-rw-r--r--tests/data/test152943
-rw-r--r--tests/data/test1537
-rw-r--r--tests/data/test153030
-rw-r--r--tests/data/test1543
-rw-r--r--tests/data/test15517
-rw-r--r--tests/data/test1568
-rw-r--r--tests/data/test1578
-rw-r--r--tests/data/test1589
-rw-r--r--tests/data/test15940
-rw-r--r--tests/data/test162
-rw-r--r--tests/data/test1607
-rw-r--r--tests/data/test160027
-rw-r--r--tests/data/test160126
-rw-r--r--tests/data/test160226
-rw-r--r--tests/data/test16112
-rw-r--r--tests/data/test1623
-rw-r--r--tests/data/test1637
-rw-r--r--tests/data/test1649
-rw-r--r--tests/data/test1667
-rw-r--r--tests/data/test1675
-rw-r--r--tests/data/test1687
-rw-r--r--tests/data/test16912
-rw-r--r--tests/data/test172
-rw-r--r--tests/data/test1703
-rw-r--r--tests/data/test1712
-rw-r--r--tests/data/test1724
-rw-r--r--tests/data/test1749
-rw-r--r--tests/data/test1754
-rw-r--r--tests/data/test17617
-rw-r--r--tests/data/test1787
-rw-r--r--tests/data/test1837
-rw-r--r--tests/data/test1808
-rw-r--r--tests/data/test180055
-rw-r--r--tests/data/test180169
-rw-r--r--tests/data/test1818
-rw-r--r--tests/data/test1826
-rw-r--r--tests/data/test1842
-rw-r--r--tests/data/test1854
-rw-r--r--tests/data/test1867
-rw-r--r--tests/data/test1884
-rw-r--r--tests/data/test18911
-rw-r--r--tests/data/test1906
-rw-r--r--tests/data/test190061
-rw-r--r--tests/data/test190163
-rw-r--r--tests/data/test190262
-rw-r--r--tests/data/test190362
-rw-r--r--tests/data/test1918
-rw-r--r--tests/data/test1927
-rw-r--r--tests/data/test19422
-rw-r--r--tests/data/test1956
-rw-r--r--tests/data/test1966
-rw-r--r--tests/data/test1976
-rw-r--r--tests/data/test1986
-rw-r--r--tests/data/test1997
-rw-r--r--tests/data/test22
-rw-r--r--tests/data/test200593
-rw-r--r--tests/data/test2006112
-rw-r--r--tests/data/test2007113
-rw-r--r--tests/data/test2008105
-rw-r--r--tests/data/test2009106
-rw-r--r--tests/data/test2017
-rw-r--r--tests/data/test2010105
-rw-r--r--tests/data/test201193
-rw-r--r--tests/data/test201292
-rw-r--r--tests/data/test201378
-rw-r--r--tests/data/test201478
-rw-r--r--tests/data/test201578
-rw-r--r--tests/data/test201678
-rw-r--r--tests/data/test201778
-rw-r--r--tests/data/test201878
-rw-r--r--tests/data/test201978
-rw-r--r--tests/data/test2026
-rw-r--r--tests/data/test202078
-rw-r--r--tests/data/test202178
-rw-r--r--tests/data/test202278
-rw-r--r--tests/data/test2023162
-rw-r--r--tests/data/test2024176
-rw-r--r--tests/data/test2025272
-rw-r--r--tests/data/test2026220
-rw-r--r--tests/data/test2027248
-rw-r--r--tests/data/test2028316
-rw-r--r--tests/data/test2029240
-rw-r--r--tests/data/test2036
-rw-r--r--tests/data/test2030297
-rw-r--r--tests/data/test2031321
-rw-r--r--tests/data/test2032147
-rw-r--r--tests/data/test2033148
-rw-r--r--tests/data/test203458
-rw-r--r--tests/data/test203544
-rw-r--r--tests/data/test203639
-rw-r--r--tests/data/test203758
-rw-r--r--tests/data/test203844
-rw-r--r--tests/data/test203963
-rw-r--r--tests/data/test2046
-rw-r--r--tests/data/test204069
-rw-r--r--tests/data/test2057
-rw-r--r--tests/data/test20632
-rw-r--r--tests/data/test2078
-rw-r--r--tests/data/test2082
-rw-r--r--tests/data/test20924
-rw-r--r--tests/data/test2106
-rw-r--r--tests/data/test2116
-rw-r--r--tests/data/test2127
-rw-r--r--tests/data/test21324
-rw-r--r--tests/data/test2146
-rw-r--r--tests/data/test2158
-rw-r--r--tests/data/test2166
-rw-r--r--tests/data/test21710
-rw-r--r--tests/data/test2186
-rw-r--r--tests/data/test228
-rw-r--r--tests/data/test2271
-rw-r--r--tests/data/test2318
-rw-r--r--tests/data/test2334
-rw-r--r--tests/data/test2344
-rw-r--r--tests/data/test2356
-rw-r--r--tests/data/test2365
-rw-r--r--tests/data/test2376
-rw-r--r--tests/data/test23819
-rw-r--r--tests/data/test23910
-rw-r--r--tests/data/test245
-rw-r--r--tests/data/test2422
-rw-r--r--tests/data/test24312
-rw-r--r--tests/data/test2455
-rw-r--r--tests/data/test2465
-rw-r--r--tests/data/test2476
-rw-r--r--tests/data/test2486
-rw-r--r--tests/data/test2496
-rw-r--r--tests/data/test2508
-rw-r--r--tests/data/test2518
-rw-r--r--tests/data/test2562
-rw-r--r--tests/data/test25713
-rw-r--r--tests/data/test2585
-rw-r--r--tests/data/test2595
-rw-r--r--tests/data/test2642
-rw-r--r--tests/data/test26524
-rw-r--r--tests/data/test2678
-rw-r--r--tests/data/test2737
-rw-r--r--tests/data/test27524
-rw-r--r--tests/data/test27710
-rw-r--r--tests/data/test2782
-rw-r--r--tests/data/test2792
-rw-r--r--tests/data/test2802
-rw-r--r--tests/data/test28711
-rw-r--r--tests/data/test2886
-rw-r--r--tests/data/test2942
-rw-r--r--tests/data/test2992
-rw-r--r--tests/data/test32
-rw-r--r--tests/data/test3012
-rw-r--r--tests/data/test30213
-rw-r--r--tests/data/test3169
-rw-r--r--tests/data/test32096
-rw-r--r--tests/data/test32133
-rw-r--r--tests/data/test32233
-rw-r--r--tests/data/test32333
-rw-r--r--tests/data/test32433
-rw-r--r--tests/data/test32566
-rw-r--r--tests/data/test334
-rw-r--r--tests/data/test3502
-rw-r--r--tests/data/test3512
-rw-r--r--tests/data/test3522
-rw-r--r--tests/data/test3532
-rw-r--r--tests/data/test382
-rw-r--r--tests/data/test3930
-rw-r--r--tests/data/test45
-rw-r--r--tests/data/test4020
-rw-r--r--tests/data/test4220
-rw-r--r--tests/data/test4634
-rw-r--r--tests/data/test4811
-rw-r--r--tests/data/test52
-rw-r--r--tests/data/test50026
-rw-r--r--tests/data/test5022
-rw-r--r--tests/data/test50321
-rw-r--r--tests/data/test5043
-rw-r--r--tests/data/test5056
-rw-r--r--tests/data/test506153
-rw-r--r--tests/data/test50821
-rw-r--r--tests/data/test50944
-rw-r--r--tests/data/test51021
-rw-r--r--tests/data/test5116
-rw-r--r--tests/data/test5129
-rw-r--r--tests/data/test5137
-rw-r--r--tests/data/test51430
-rw-r--r--tests/data/test51518
-rw-r--r--tests/data/test51619
-rw-r--r--tests/data/test51718
-rw-r--r--tests/data/test51829
-rw-r--r--tests/data/test51953
-rw-r--r--tests/data/test5206
-rw-r--r--tests/data/test5212
-rw-r--r--tests/data/test52220
-rw-r--r--tests/data/test52324
-rw-r--r--tests/data/test52810
-rw-r--r--tests/data/test5312
-rw-r--r--tests/data/test53042
-rw-r--r--tests/data/test53528
-rw-r--r--tests/data/test53637
-rw-r--r--tests/data/test53729
-rw-r--r--tests/data/test5385
-rw-r--r--tests/data/test53910
-rw-r--r--tests/data/test54015
-rw-r--r--tests/data/test5416
-rw-r--r--tests/data/test54419
-rw-r--r--tests/data/test545bin748 -> 798 bytes
-rw-r--r--tests/data/test54718
-rw-r--r--tests/data/test54818
-rw-r--r--tests/data/test54924
-rw-r--r--tests/data/test55024
-rw-r--r--tests/data/test55112
-rw-r--r--tests/data/test552bin143212 -> 142985 bytes
-rw-r--r--tests/data/test5532
-rw-r--r--tests/data/test55441
-rw-r--r--tests/data/test55518
-rw-r--r--tests/data/test55612
-rw-r--r--tests/data/test5578
-rw-r--r--tests/data/test55839
-rw-r--r--tests/data/test55944
-rw-r--r--tests/data/test562
-rw-r--r--tests/data/test56010
-rw-r--r--tests/data/test56124
-rw-r--r--tests/data/test5647
-rw-r--r--tests/data/test5657
-rw-r--r--tests/data/test56626
-rw-r--r--tests/data/test56710
-rw-r--r--tests/data/test56842
-rw-r--r--tests/data/test5691
-rw-r--r--tests/data/test57036
-rw-r--r--tests/data/test57142
-rw-r--r--tests/data/test57261
-rw-r--r--tests/data/test57326
-rw-r--r--tests/data/test5744
-rw-r--r--tests/data/test5752
-rw-r--r--tests/data/test5764
-rw-r--r--tests/data/test57743
-rw-r--r--tests/data/test57826
-rw-r--r--tests/data/test57980
-rw-r--r--tests/data/test58058
-rw-r--r--tests/data/test58158
-rw-r--r--tests/data/test58249
-rw-r--r--tests/data/test58345
-rw-r--r--tests/data/test584102
-rw-r--r--tests/data/test58569
-rw-r--r--tests/data/test58659
-rw-r--r--tests/data/test58758
-rw-r--r--tests/data/test58869
-rw-r--r--tests/data/test590125
-rw-r--r--tests/data/test59173
-rw-r--r--tests/data/test59274
-rw-r--r--tests/data/test59372
-rw-r--r--tests/data/test59472
-rw-r--r--tests/data/test59557
-rw-r--r--tests/data/test59660
-rw-r--r--tests/data/test59737
-rw-r--r--tests/data/test59880
-rw-r--r--tests/data/test59985
-rw-r--r--tests/data/test6043
-rw-r--r--tests/data/test616
-rw-r--r--tests/data/test629
-rw-r--r--tests/data/test6233
-rw-r--r--tests/data/test6272
-rw-r--r--tests/data/test632
-rw-r--r--tests/data/test63849
-rw-r--r--tests/data/test63949
-rw-r--r--tests/data/test643
-rw-r--r--tests/data/test64041
-rw-r--r--tests/data/test64141
-rw-r--r--tests/data/test653
-rw-r--r--tests/data/test678
-rw-r--r--tests/data/test688
-rw-r--r--tests/data/test6910
-rw-r--r--tests/data/test705
-rw-r--r--tests/data/test70860
-rw-r--r--tests/data/test70960
-rw-r--r--tests/data/test71057
-rw-r--r--tests/data/test71152
-rw-r--r--tests/data/test71249
-rw-r--r--tests/data/test725
-rw-r--r--tests/data/test734
-rw-r--r--tests/data/test741
-rw-r--r--tests/data/test755
-rw-r--r--tests/data/test771
-rw-r--r--tests/data/test781
-rw-r--r--tests/data/test812
-rw-r--r--tests/data/test8019
-rw-r--r--tests/data/test80034
-rw-r--r--tests/data/test80125
-rw-r--r--tests/data/test80242
-rw-r--r--tests/data/test80351
-rw-r--r--tests/data/test80448
-rw-r--r--tests/data/test80552
-rw-r--r--tests/data/test80641
-rw-r--r--tests/data/test80746
-rw-r--r--tests/data/test80849
-rw-r--r--tests/data/test80943
-rw-r--r--tests/data/test818
-rw-r--r--tests/data/test81043
-rw-r--r--tests/data/test81140
-rw-r--r--tests/data/test81240
-rw-r--r--tests/data/test81340
-rw-r--r--tests/data/test81441
-rw-r--r--tests/data/test81546
-rw-r--r--tests/data/test81649
-rw-r--r--tests/data/test81740
-rw-r--r--tests/data/test81846
-rw-r--r--tests/data/test81956
-rw-r--r--tests/data/test822
-rw-r--r--tests/data/test82057
-rw-r--r--tests/data/test82159
-rw-r--r--tests/data/test82271
-rw-r--r--tests/data/test82363
-rw-r--r--tests/data/test82456
-rw-r--r--tests/data/test82556
-rw-r--r--tests/data/test82657
-rw-r--r--tests/data/test82771
-rw-r--r--tests/data/test82856
-rw-r--r--tests/data/test82929
-rw-r--r--tests/data/test8319
-rw-r--r--tests/data/test83056
-rw-r--r--tests/data/test83167
-rw-r--r--tests/data/test83258
-rw-r--r--tests/data/test83365
-rw-r--r--tests/data/test83476
-rw-r--r--tests/data/test83567
-rw-r--r--tests/data/test83659
-rw-r--r--tests/data/test83756
-rw-r--r--tests/data/test83856
-rw-r--r--tests/data/test83956
-rw-r--r--tests/data/test842
-rw-r--r--tests/data/test84056
-rw-r--r--tests/data/test852
-rw-r--r--tests/data/test85049
-rw-r--r--tests/data/test85144
-rw-r--r--tests/data/test85247
-rw-r--r--tests/data/test85352
-rw-r--r--tests/data/test85445
-rw-r--r--tests/data/test85547
-rw-r--r--tests/data/test85645
-rw-r--r--tests/data/test85760
-rw-r--r--tests/data/test85841
-rw-r--r--tests/data/test85941
-rw-r--r--tests/data/test861
-rw-r--r--tests/data/test86041
-rw-r--r--tests/data/test86152
-rw-r--r--tests/data/test86250
-rw-r--r--tests/data/test86341
-rw-r--r--tests/data/test86454
-rw-r--r--tests/data/test86557
-rw-r--r--tests/data/test86658
-rw-r--r--tests/data/test86760
-rw-r--r--tests/data/test86872
-rw-r--r--tests/data/test86964
-rw-r--r--tests/data/test8739
-rw-r--r--tests/data/test87057
-rw-r--r--tests/data/test87156
-rw-r--r--tests/data/test87257
-rw-r--r--tests/data/test87371
-rw-r--r--tests/data/test87456
-rw-r--r--tests/data/test87529
-rw-r--r--tests/data/test87657
-rw-r--r--tests/data/test87768
-rw-r--r--tests/data/test87859
-rw-r--r--tests/data/test87966
-rw-r--r--tests/data/test884
-rw-r--r--tests/data/test88077
-rw-r--r--tests/data/test88168
-rw-r--r--tests/data/test88258
-rw-r--r--tests/data/test88357
-rw-r--r--tests/data/test88457
-rw-r--r--tests/data/test88556
-rw-r--r--tests/data/test88656
-rw-r--r--tests/data/test8914
-rw-r--r--tests/data/test9014
-rw-r--r--tests/data/test90051
-rw-r--r--tests/data/test90163
-rw-r--r--tests/data/test90257
-rw-r--r--tests/data/test90356
-rw-r--r--tests/data/test90457
-rw-r--r--tests/data/test90559
-rw-r--r--tests/data/test90671
-rw-r--r--tests/data/test90763
-rw-r--r--tests/data/test90856
-rw-r--r--tests/data/test90951
-rw-r--r--tests/data/test9110
-rw-r--r--tests/data/test91051
-rw-r--r--tests/data/test91147
-rw-r--r--tests/data/test91255
-rw-r--r--tests/data/test91350
-rw-r--r--tests/data/test91446
-rw-r--r--tests/data/test91551
-rw-r--r--tests/data/test91647
-rw-r--r--tests/data/test91755
-rw-r--r--tests/data/test91848
-rw-r--r--tests/data/test91955
-rw-r--r--tests/data/test924
-rw-r--r--tests/data/test92056
-rw-r--r--tests/data/test92170
-rw-r--r--tests/data/test92255
-rw-r--r--tests/data/test92340
-rw-r--r--tests/data/test92443
-rw-r--r--tests/data/test92540
-rw-r--r--tests/data/test92644
-rw-r--r--tests/data/test92743
-rw-r--r--tests/data/test92841
-rw-r--r--tests/data/test92938
-rw-r--r--tests/data/test93038
-rw-r--r--tests/data/test93129
-rw-r--r--tests/data/test93256
-rw-r--r--tests/data/test93367
-rw-r--r--tests/data/test93458
-rw-r--r--tests/data/test93565
-rw-r--r--tests/data/test93676
-rw-r--r--tests/data/test93767
-rw-r--r--tests/data/test93865
-rw-r--r--tests/data/test93950
-rw-r--r--tests/data/test944
-rw-r--r--tests/data/test94045
-rw-r--r--tests/data/test94166
-rw-r--r--tests/data/test94256
-rw-r--r--tests/data/test94356
-rw-r--r--tests/data/test94455
-rw-r--r--tests/data/test94555
-rw-r--r--tests/data/test9517
-rw-r--r--tests/data/test9646
-rw-r--r--tests/data/test992
-rw-r--r--tests/directories.pm21
-rwxr-xr-xtests/extern-scan.pl60
-rw-r--r--tests/ftp.pm86
-rwxr-xr-xtests/ftpserver.pl2244
-rw-r--r--tests/getpart.pm98
-rwxr-xr-xtests/http_pipe.py441
-rwxr-xr-xtests/httpserver.pl39
-rwxr-xr-xtests/keywords.pl153
-rw-r--r--tests/libtest/.gitignore7
-rw-r--r--tests/libtest/CMakeLists.txt122
-rw-r--r--tests/libtest/Makefile.am78
-rw-r--r--tests/libtest/Makefile.in1720
-rw-r--r--tests/libtest/Makefile.inc337
-rw-r--r--tests/libtest/chkhostname.c23
-rw-r--r--tests/libtest/first.c121
-rw-r--r--tests/libtest/lib1500.c90
-rw-r--r--tests/libtest/lib1501.c126
-rw-r--r--tests/libtest/lib1502.c145
-rw-r--r--tests/libtest/lib1506.c135
-rw-r--r--tests/libtest/lib1507.c168
-rw-r--r--tests/libtest/lib1508.c49
-rw-r--r--tests/libtest/lib1509.c97
-rw-r--r--tests/libtest/lib1510.c97
-rw-r--r--tests/libtest/lib1511.c75
-rw-r--r--tests/libtest/lib1512.c89
-rw-r--r--tests/libtest/lib1513.c73
-rw-r--r--tests/libtest/lib1514.c80
-rw-r--r--tests/libtest/lib1515.c148
-rw-r--r--tests/libtest/lib1520.c114
-rw-r--r--tests/libtest/lib1525.c97
-rw-r--r--tests/libtest/lib1526.c103
-rw-r--r--tests/libtest/lib1527.c99
-rw-r--r--tests/libtest/lib1528.c72
-rw-r--r--tests/libtest/lib1529.c59
-rw-r--r--tests/libtest/lib1530.c67
-rw-r--r--tests/libtest/lib1900.c250
-rw-r--r--tests/libtest/lib500.c105
-rw-r--r--tests/libtest/lib501.c18
-rw-r--r--tests/libtest/lib502.c112
-rw-r--r--tests/libtest/lib503.c148
-rw-r--r--tests/libtest/lib504.c141
-rw-r--r--tests/libtest/lib505.c41
-rw-r--r--tests/libtest/lib506.c135
-rw-r--r--tests/libtest/lib507.c141
-rw-r--r--tests/libtest/lib508.c20
-rw-r--r--tests/libtest/lib509.c146
-rw-r--r--tests/libtest/lib510.c22
-rw-r--r--tests/libtest/lib511.c18
-rw-r--r--tests/libtest/lib512.c18
-rw-r--r--tests/libtest/lib513.c20
-rw-r--r--tests/libtest/lib514.c18
-rw-r--r--tests/libtest/lib515.c18
-rw-r--r--tests/libtest/lib516.c18
-rw-r--r--tests/libtest/lib517.c27
-rw-r--r--tests/libtest/lib518.c25
-rw-r--r--tests/libtest/lib519.c18
-rw-r--r--tests/libtest/lib520.c18
-rw-r--r--tests/libtest/lib521.c20
-rw-r--r--tests/libtest/lib523.c18
-rw-r--r--tests/libtest/lib524.c18
-rw-r--r--tests/libtest/lib525.c188
-rw-r--r--tests/libtest/lib526.c256
-rw-r--r--tests/libtest/lib530.c207
-rw-r--r--tests/libtest/lib533.c170
-rw-r--r--tests/libtest/lib536.c172
-rw-r--r--tests/libtest/lib537.c27
-rw-r--r--tests/libtest/lib539.c33
-rw-r--r--tests/libtest/lib540.c206
-rw-r--r--tests/libtest/lib541.c41
-rw-r--r--tests/libtest/lib542.c31
-rw-r--r--tests/libtest/lib543.c25
-rw-r--r--tests/libtest/lib544.c35
-rw-r--r--tests/libtest/lib547.c17
-rw-r--r--tests/libtest/lib549.c17
-rw-r--r--tests/libtest/lib552.c21
-rw-r--r--tests/libtest/lib553.c18
-rw-r--r--tests/libtest/lib554.c57
-rw-r--r--tests/libtest/lib555.c134
-rw-r--r--tests/libtest/lib556.c26
-rw-r--r--tests/libtest/lib557.c22
-rw-r--r--tests/libtest/lib558.c197
-rw-r--r--tests/libtest/lib560.c98
-rw-r--r--tests/libtest/lib562.c33
-rw-r--r--tests/libtest/lib564.c138
-rw-r--r--tests/libtest/lib566.c18
-rw-r--r--tests/libtest/lib567.c19
-rw-r--r--tests/libtest/lib568.c23
-rw-r--r--tests/libtest/lib569.c25
-rw-r--r--tests/libtest/lib570.c27
-rw-r--r--tests/libtest/lib571.c34
-rw-r--r--tests/libtest/lib572.c25
-rw-r--r--tests/libtest/lib573.c127
-rw-r--r--tests/libtest/lib574.c18
-rw-r--r--tests/libtest/lib575.c105
-rw-r--r--tests/libtest/lib576.c19
-rw-r--r--tests/libtest/lib577.c255
-rw-r--r--tests/libtest/lib578.c18
-rw-r--r--tests/libtest/lib579.c22
-rw-r--r--tests/libtest/lib582.c364
-rw-r--r--tests/libtest/lib583.c84
-rw-r--r--tests/libtest/lib586.c243
-rw-r--r--tests/libtest/lib590.c71
-rw-r--r--tests/libtest/lib591.c149
-rw-r--r--tests/libtest/lib597.c150
-rw-r--r--tests/libtest/lib598.c72
-rw-r--r--tests/libtest/lib599.c96
-rw-r--r--tests/libtest/libauthretry.c152
-rw-r--r--tests/libtest/libntlmconnect.c281
-rwxr-xr-xtests/libtest/notexists.pl15
-rw-r--r--tests/libtest/sethostname.c20
-rw-r--r--tests/libtest/sethostname.h35
-rw-r--r--tests/libtest/test.h413
-rwxr-xr-xtests/libtest/test1013.pl4
-rwxr-xr-xtests/libtest/test1022.pl23
-rw-r--r--tests/libtest/testtrace.c142
-rw-r--r--tests/libtest/testtrace.h37
-rw-r--r--tests/libtest/testutil.c12
-rw-r--r--tests/libtest/testutil.h12
-rw-r--r--tests/mem-include-scan.pl96
-rwxr-xr-xtests/memanalyze.pl63
-rwxr-xr-xtests/rtspserver.pl3
-rw-r--r--tests/runtests.114
-rw-r--r--tests/runtests.html87
-rw-r--r--tests/runtests.pdfbin7204 -> 0 bytes
-rwxr-xr-xtests/runtests.pl2083
-rwxr-xr-xtests/secureserver.pl100
-rw-r--r--tests/server/.gitignore7
-rw-r--r--tests/server/CMakeLists.txt62
-rw-r--r--tests/server/Makefile.am41
-rw-r--r--tests/server/Makefile.in1692
-rw-r--r--tests/server/Makefile.inc61
-rw-r--r--tests/server/base64.pl9
-rw-r--r--tests/server/fake_ntlm.c277
-rw-r--r--tests/server/getpart.c105
-rw-r--r--tests/server/getpart.h9
-rw-r--r--tests/server/resolve.c24
-rw-r--r--tests/server/rtspd.c147
-rw-r--r--tests/server/server_setup.h29
-rw-r--r--tests/server/server_sockaddr.h41
-rw-r--r--tests/server/sockfilt.c698
-rw-r--r--tests/server/sws.c1751
-rw-r--r--tests/server/testpart.c7
-rw-r--r--tests/server/tftp.h18
-rw-r--r--tests/server/tftpd.c365
-rw-r--r--tests/server/util.c61
-rw-r--r--tests/server/util.h10
-rw-r--r--tests/serverhelp.pm37
-rw-r--r--tests/sshhelp.pm120
-rwxr-xr-xtests/sshserver.pl79
-rw-r--r--tests/stunnel.pem77
-rw-r--r--tests/symbol-scan.pl176
-rw-r--r--tests/testcurl.12
-rw-r--r--tests/testcurl.html113
-rw-r--r--tests/testcurl.pdfbin7203 -> 0 bytes
-rwxr-xr-xtests/testcurl.pl199
-rwxr-xr-xtests/tftpserver.pl3
-rw-r--r--tests/unit/.gitignore1
-rw-r--r--tests/unit/Makefile.am78
-rw-r--r--tests/unit/Makefile.inc68
-rw-r--r--tests/unit/README70
-rw-r--r--tests/unit/curlcheck.h100
-rw-r--r--tests/unit/unit1300.c292
-rw-r--r--tests/unit/unit1301.c54
-rw-r--r--tests/unit/unit1302.c157
-rw-r--r--tests/unit/unit1303.c146
-rw-r--r--tests/unit/unit1304.c185
-rw-r--r--tests/unit/unit1305.c141
-rw-r--r--tests/unit/unit1307.c234
-rw-r--r--tests/unit/unit1308.c95
-rw-r--r--tests/unit/unit1309.c110
-rw-r--r--tests/unit/unit1330.c41
-rw-r--r--tests/unit/unit1394.c122
-rw-r--r--tests/unit/unit1395.c84
-rw-r--r--tests/unit/unit1396.c111
-rw-r--r--tests/unit/unit1397.c51
-rw-r--r--tests/unit/unit1398.c91
-rw-r--r--tests/unit/unit1600.c63
-rw-r--r--tests/unit/unit1601.c51
-rw-r--r--tests/unit/unit1602.c80
-rw-r--r--tests/valgrind.pm9
-rw-r--r--tests/valgrind.supp89
-rw-r--r--vc6curl.dsw44
-rw-r--r--winbuild/.gitignore2
-rw-r--r--winbuild/BUILD.WINDOWS.txt89
-rw-r--r--winbuild/Makefile.msvc.names81
-rw-r--r--winbuild/Makefile.vc205
-rw-r--r--winbuild/MakefileBuild.vc503
-rwxr-xr-xwinbuild/gen_resp_file.bat6
2162 files changed, 235885 insertions, 157877 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..a7b3f6a2
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+*.dsw -crlf
+buildconf eol=lf
+configure.ac eol=lf
+*.m4 eol=lf
+*.in eol=lf
diff --git a/.gitignore b/.gitignore
index f34bb251..83e75086 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,34 +1,51 @@
-/build
-/source/build
-*.mode1v3
-*.pbxuser
-*.pbxindex/
-!user.pbxuser
-/*.log
-*.user
-*.ncb
-*.suo
+.deps
+.libs
+*.lib
*.pdb
-*.pdf
-*.html
-*.idb
+*.dll
+*.exe
+*.obj
+*.asc
+.*.swp
+Debug
+Release
+*.exp
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.cache
+config.guess
+config.log
+config.status
+config.sub
+configure
+depcomp
+libtool
+ltmain.sh
+compile
+curl-config
+libcurl.pc
+missing
+curl-*.tar.gz
+curl-*.tar.bz2
+curl-*.tar.lzma
+curl-*.zip
+INSTALL
+install-sh
*.o
*.lo
-*.a
-*.so
-*.so.0
*.la
-.deps
-.libs
-*.pyc
-.DS_Store
-# Emacs and other editor backup files
+mkinstalldirs
+tags
+TAGS
*~
-
-# builds on Windows
-Debug/
-Release/
-release/
-
-/install
-/docs \ No newline at end of file
+aclocal.m4.bak
+CHANGES.dist
+.project
+.cproject
+.settings
+.dirstamp
+test-driver
+/build/
+/builds/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..b97655f7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,13 @@
+language: c
+
+before_script:
+ - ./buildconf
+
+script: ./configure --enable-debug && make && make test-full
+
+compiler:
+ - clang
+ - gcc
+
+notifications:
+ email: false
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 6453fcdc..00000000
--- a/Android.mk
+++ /dev/null
@@ -1,106 +0,0 @@
-# Google Android makefile for curl and libcurl
-#
-# Place the curl source (including this makefile) into external/curl/ in the
-# Android source tree. Then build them with 'make curl' or just 'make libcurl'
-# from the Android root. Tested with Android 1.5 and 2.1
-#
-# Note: you must first create a curl_config.h file by running configure in the
-# Android environment. The only way I've found to do this is tricky. Perform a
-# normal Android build with libcurl in the source tree, providing the target
-# "showcommands" to make. The build will eventually fail (because curl_config.h
-# doesn't exist yet), but the compiler commands used to build curl will be
-# shown. Now, from the external/curl/ directory, run curl's normal configure
-# command with flags that match what Android itself uses. This will mean
-# putting the compiler directory into the PATH, putting the -I, -isystem and
-# -D options into CPPFLAGS, putting the -W, -m, -f, -O and -nostdlib options
-# into CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the
-# path to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o.
-# Remember that the paths must be absolute since you will not be running
-# configure from the same directory as the Android make. The normal
-# cross-compiler options must also be set. Note that the -c, -o, -MD and
-# similar flags must not be set.
-#
-# To see all the LIBS options, you'll need to do the "showcommands" trick on an
-# executable that's already buildable and watch what flags Android uses to link
-# it (dhcpcd is a good choice to watch). You'll also want to add -L options to
-# LIBS that point to the out/.../obj/lib/ and out/.../obj/system/lib/
-# directories so that additional libraries can be found and used by curl.
-#
-# The end result will be a configure command that looks something like this
-# (the environment variable A is set to the Android root path which makes the
-# command shorter):
-#
-# A=`realpath ../..` && \
-# PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
-# ./configure --host=arm-linux CC=arm-eabi-gcc \
-# CPPFLAGS="-I $A/system/core/include ..." \
-# CFLAGS="-nostdlib -fno-exceptions -Wno-multichar ..." \
-# LIBS="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
-# /interwork/libgcc.a ..."
-#
-# Finally, copy the file COPYING to NOTICE so that the curl license gets put
-# into the right place (but see the note about this below).
-#
-# Dan Fandrich
-# August 2010
-
-LOCAL_PATH:= $(call my-dir)
-
-common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wno-system-headers -DHAVE_CONFIG_H
-
-#########################
-# Build the libcurl library
-
-include $(CLEAR_VARS)
-include $(LOCAL_PATH)/lib/Makefile.inc
-CURL_HEADERS := \
- curlbuild.h \
- curl.h \
- curlrules.h \
- curlver.h \
- easy.h \
- mprintf.h \
- multi.h \
- stdcheaders.h \
- typecheck-gcc.h \
- types.h
-
-LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
-LOCAL_CFLAGS += $(common_CFLAGS)
-
-LOCAL_COPY_HEADERS_TO := libcurl/curl
-LOCAL_COPY_HEADERS := $(addprefix include/curl/,$(CURL_HEADERS))
-
-LOCAL_MODULE:= libcurl
-
-# Copy the licence to a place where Android will find it.
-# Actually, this doesn't quite work because the build system searches
-# for NOTICE files before it gets to this point, so it will only be seen
-# on subsequent builds.
-ALL_PREBUILT += $(LOCAL_PATH)/NOTICE
-$(LOCAL_PATH)/NOTICE: $(LOCAL_PATH)/COPYING | $(ACP)
- $(copy-file-to-target)
-
-include $(BUILD_STATIC_LIBRARY)
-
-
-#########################
-# Build the curl binary
-
-include $(CLEAR_VARS)
-include $(LOCAL_PATH)/src/Makefile.inc
-LOCAL_SRC_FILES := $(addprefix src/,$(CURL_CFILES))
-
-LOCAL_MODULE := curl
-LOCAL_STATIC_LIBRARIES := libcurl
-LOCAL_SYSTEM_SHARED_LIBRARIES := libc
-
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
-
-# This may also need to include $(CURLX_ONES) in order to correctly link
-# if libcurl is changed to be built as a dynamic library
-LOCAL_CFLAGS += $(common_CFLAGS)
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/CHANGES b/CHANGES
index a792aa5f..fe0fb8c0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,4477 +6,10 @@
Changelog
-Version 7.21.2 (12 Oct 2010)
+This file no longer holds the changelog. Now you can generate it yourself
+like this:
-Daniel Stenberg (12 Oct 2010)
-- RELEASE-NOTES: synced with ecd624b8e774a85
+$ git log --pretty=fuller --no-color --date=short --decorate=full | \
+ ./log2changes.pl
-- [Julien Chaffraix brought this change]
-
- CMake: Build fix.
-
- Do not match the trailing '\n' in the regular expression as this would
- make us dump a ) parenthesis on a new line.
-
- This fixes the following error:
-
- would get transformed into:
-
- )
-
- Bug: http://curl.haxx.se/mail/lib-2010-10/0065.html
- Reported by: Dimitre Dimitrov
-
-- header_callback: strip off file path separated with backslashes
-
- If the filename contains a backslash, only use filename portion. The
- idea is that even systems that don't handle backslashes as path
- separators probably want that path removed for convenience.
-
- This flaw is considered a security problem, see the curl security
- vulnerability http://curl.haxx.se/docs/adv_20101013.html
-
-Dan Fandrich (12 Oct 2010)
-- Get the curl source files for Amiga from Makefile.inc
-
- This is similar to how it's done in the lib directory.
- The Amiga build appears to have been broken for a year because
- of a missing homedir.c
-
-- Added section on server-supplied names to security considerations
-
-Guenter Knauf (12 Oct 2010)
-- Fixed Watcom makefile.
-
-- Added build bits for librtmp / libssh2 to Watcom makefiles.
-
-- Added build bits for librtmp to NetWare makefiles.
-
-Daniel Stenberg (12 Oct 2010)
-- SFTP: more ignoring negative file sizes
-
- As the change in 5f0ae7a0626cbe709 added a precaution against negative
- file sizes that for some reason managed to get returned, this change now
- introduces the same check at the second place in the code where the file
- size from the libssh2 stat call is used.
-
- This check might not be suitable for a 32 bit curl_off_t, but libssh2.h
- assumes long long to work and to be 64 bit so I believe such a small
- curl_off_t will be very unlikely to occur in the wild.
-
-- SMTP: debug output for no known auth mechanisms supported
-
- ... and some minor source code whitespace edits
-
-- test: urlglob error messages have no extra newline anymore
-
-Guenter Knauf (11 Oct 2010)
-- Added build bits for librtmp to MingW32 makefiles.
-
-Daniel Stenberg (8 Oct 2010)
-- RELEASE-NOTES: synced with 61f4cdb73ae4
-
-- globbing: fix crash on unballanced open brace
-
- Having an open brace without a closing brace caused a segfault.
-
- Having a closing brace too many caused a silent error to occur, which
- caused curl to bail out and return an error code but no error message
- was shown. It does now!
-
- All error message outputs no longer wrongly get _two_ newlines written
- after the error message.
-
- Reported by: Vlad Ureche
- Bug: http://curl.haxx.se/bug/view.cgi?id=3083942
-
-- [Dan Locks brought this change]
-
- libcurl.m4: AC_PATH_PROG fixes
-
- The invocation of autoconf's AC_PATH_PROG( ) is not quite right for
- finding curl-config. This fix corrects the negative case (where
- curl-config is not found).
-
-- FAQ: added "How do I submit my patch?"
-
-- examples: use example.com in example URLs
-
-- TODO-RELEASE: libidn problem not repeatable
-
- "261 - configure and libidn" is removed from the list since Julien
- Chaffraix tried to repeat it but failed and the reporter did not return
- to provide further details.
-
- Reported by: Lyndon Hill
- Bug: http://curl.haxx.se/mail/lib-2010-07/0029.html
-
-- libcurl.m4: mention argument is PREFIX
-
- The macro provides a --with-libcurl option that expects a PREFIX to be
- specified and not actually a "directory" in which libcurl will be found.
- This now spells that out more clearly.
-
- Reported by: Dan Locks
- Bug: http://curl.haxx.se/bug/view.cgi?id=3079891
-
-Guenter Knauf (3 Oct 2010)
-- Some NetWare makefile tweaks.
-
- Renamed SDK_* to NDK_*; made NDK_* defines overwriteable from
- environment; removed now obsolete YACC macro;
- moved some curl_config.h defines to IPv6 section since they
- are only needed when IPv6 is enabled - this makes libcurl compile
- with older NDKs too which were not IPv6-aware.
-
-Daniel Stenberg (2 Oct 2010)
-- TODO-RELEASE: 416 error fixed
-
- "3076808 Requests fail silently following a 416 error" done
-
-Julien Chaffraix (2 Oct 2010)
-- krb5-gssapi: Removed a memory leak in krb5_auth.
-
- We forgot to release the buffer passed to gss_init_sec_context.
-
- The previous logic was difficult to read as we were reusing the same
- variable (gssbuf) for both input buffer and output buffer. Splitted the
- logic in 2 variables to better underline who needs to be released.
- Also made the code break at 80 lines.
-
-- krb5-gssapi: Made the function always return a value.
-
- kr5_auth missed a final 'return' statement. This is not an error in
- gcc but can lead to potential bugs.
-
-- krb5-gssapi: Delete the GSS-API context.
-
- This fixes a memory leak related to the GSS-API code.
-
- Added a krb5_init and krb5_end functions. Also removed a work-around
- the lack of proper initialization of the GSS-API context.
-
-Daniel Stenberg (2 Oct 2010)
-- HTTP: remove special case for 416
-
- It was pointed out that the special case libcurl did for 416 was
- incorrect and wrong. 416 is not really different to other errors so the
- response body must be handled like for other errors/http responses.
-
- Reported by: Chris Smowton
- Bug: http://curl.haxx.se/bug/view.cgi?id=3076808
-
-- [Dan Fandrich brought this change]
-
- sws: Added writedelay HTTP server command
-
- This delays between write operations, hopefully making it easier
- to spot problems where libcurl doesn't flush the socket properly
- before waiting for the next response.
-
-- TODO-RELEASE: no bug in ftp_nextconnect
-
- The issue named "266 - Bug in ftp_nextconnect?" was deemed to not be a
- bug and instead resulted in clarified docs.
-
-- curl_easy_setopt.3: CURLOPT_DIRLISTONLY implies dir list
-
- Make it explicit that setting CURLOPT_DIRLISTONLY to 1 will make libcurl
- to list the directory.
-
-- RELEASE-NOTES: synced up to 588402585bae
-
-- TODO-RELEASE: move new features to next release
-
-- README.ares: we know require c-ares 1.6.0
-
-- SFTP: avoid downloading negative sizes!
-
- It is still not clarified exactly why this happens, but libssh2
- sometimes report a negative file size for the remote SFTP file and that
- deeply confuses libcurl (or crashes it) so this precaution is added to
- avoid badness.
-
- Reported by: Ernest Beinrohr
- Bug: http://curl.haxx.se/bug/view.cgi?id=3076430
-
-- TODO-RELEASE: drop curl_easy_setoptv
-
- I haven't read any really convincing arguments for adding it
-
-- [Dirk Manske brought this change]
-
- multi & hiper examples: updates and cleanups
-
- all multi and hiper examples:
-
- * don't loop curl_multi_perform calls, that was <7.20.0 style, currently
- the exported multi functions will not return CURLM_CALL_MULTI_PERFORM
-
- all hiper examples:
- * renamed check_run_count to check_multi_info
- * don't compare current running handle count with previous value, this
- was the wrong way to check for finished requests, simply call
- curl_multi_info_read
- * it's also safe to call curl_multi_remove_handle inside the
- curl_multi_info_read loop.
-
- ghiper.c:
- * replaced curl_multi_socket (that function is marked as obsolete) calls
- with curl_multi_socket_action calls (as in hiperfifo.c and
- evhiperfifo.c)
-
- ghiper.c and evhiperfifo.c:
- * be smart as hiperfifo.c, don't do uncessary curl_multi_* calls in
- new_conn and main
-
-- TODO-RELEASE: one fixed, one postponed, one added
-
- As we're already in feature freeze, I pushed the feature onwards.
-
-Dan Fandrich (29 Sep 2010)
-- Renamed test1204 to test1117 to move it into the normal range
-
-Patrick Monnerat (29 Sep 2010)
-- Add gopher protocol definition to ILE/RPG binding.
- OS400 compile script in test dir updated for chkhostname.
-
-Julien Chaffraix (28 Sep 2010)
-- krb5-gssapi: Remove several memory leaks.
-
- Remove a leak seen on Kerberos/MIT (gss_OID is copied internally and
- we were leaking it). Now we just pass NULL as advised in RFC2744.
-
- |tmp| was never set back to buf->data.
-
- Cleaned up Curl_sec_end to take into account failure in Curl_sec_login
- (where conn->mech would be NULL but not conn->app_data or
- conn->in_buffer->data).
-
-- security.c: Remove Curl_sec_fflush_fd.
-
- The current implementation would make us send wrong data on a closed
- socket. We don't buffer our data so the method can be safely removed.
-
-- security.c: We should always register the socket handler.
-
- Following a change in the way socket handler are registered, the custom
- recv and send method were conditionaly registered.
- We need to register them everytime to handle the ftp security
- extensions.
-
- Re-added the clear text handling in sec_recv.
-
-- security.c: Fix Curl_sec_login after rewrite.
-
- Curl_sec_login was returning the opposite result that the code in ftp.c
- was expecting. Simplified the return code (using a CURLcode) so to see
- more clearly what is going on.
-
-- security.c: Readd the '\n' to the infof() calls.
-
- They are not automatically added and make the output of the verbose
- mode a lot more readable.
-
-- security.c: Fix typo (PSBZ -> PBSZ)
-
-- security.c: Fix ftp_send_command.
-
- My use of va_args was completely wrong. Fixed the usage so that
- we send the right commands!
-
-Daniel Stenberg (28 Sep 2010)
-- curl_easy_escape: don't escape "unreserved" characters
-
- According to RFC3986 section 2.3 the letters -, ., _ and ~ should not be
- percent-encoded.
-
- Reported by: Miguel Diaz
- Bug: http://curl.haxx.se/mail/lib-2010-09/0227.html
-
-- multi: don't expire timeouts at disonnect or done
-
- The functions Curl_disconnect() and Curl_done() are both used within the
- scope of a single request so they cannot be allowed to use
- Curl_expire(... 0) to kill all timeouts as there are some timeouts that
- are set before a request that are supposed to remain until the request
- is done.
-
- The timeouts are now instead cleared at curl_easy_cleanup() and when the
- multi state machine changes a handle to the complete state.
-
-Dan Fandrich (27 Sep 2010)
-- Changed the TPF make file to get source files from Makefile.inc
-
- Patch was fixed and validated by David McCreedy.
-
-- Added test case 1204 to test HTTP range failure
-
- This is an attempt to reproduce bug #3076808
-
-Daniel Stenberg (27 Sep 2010)
-- [Dirk Manske brought this change]
-
- multi_runsingle: set timeout error messages
-
- With the latest changes to fix the timeout handling with multi interface
- we lost the timeout error messages. This patch brings them back.
-
-- TODO-RELEASE: updated list of issues to work on
-
-- parsedate: allow time specified without seconds
-
- The date format in RFC822 allows that the seconds part of HH:MM:SS is
- left out, but this function didn't allow it. This change also includes a
- modified test case that makes sure that this now works.
-
- Reported by: Matt Ford
- Bug: http://curl.haxx.se/bug/view.cgi?id=3076529
-
-- TFTP: re-indented the source code
-
- Just made sure that the good old curl indentation style is used all over
- this file.
-
-- [Tim Newsome brought this change]
-
- TFTP: Work around tftpd-hpa upload bug
-
- tftpd-hpa has a bug where it will send an incorrect ack when the block
- counter wraps and tftp options have been sent. Work around that by
- accepting an ack for 65535 when we're expecting one for 0.
-
-- Revert "security.c: buffer_read various fixes."
-
- This reverts commit fbb38de415b7bb7d743e53a7b4b887ffb12b3e5b.
-
-- security.c: removed superfluous parentheses
-
- And also removed the FIXME where memory was zeroed just before freed,
- and some other minor whitespace changes.
-
-- [Julien Chaffraix brought this change]
-
- security.c: Update the #include statements after the rewrite.
-
-- [Julien Chaffraix brought this change]
-
- security.c: sec_write tweaks
-
- - |fd| is now a curl_socket_t and |len| a size_t to avoid conversions.
- - Added 2 FIXMEs about the 2 unsigned -> signed conversions.
- - Included 2 minor changes to Curl_sec_end.
-
-- [Julien Chaffraix brought this change]
-
- security.c: _sec_send tweaks
-
- - Renamed the method to sec_send now that we
- renamed sec_send to do_sec_send.
- - Some more variable renaming.
-
-- [Julien Chaffraix brought this change]
-
- security.c: sec_read tweaks
-
- - Renamed the function to sec_recv.
- - Renamed the parameters and variable to match the rest of the code.
-
-- [Julien Chaffraix brought this change]
-
- security.c: Curl_sec_fflush_fd tweaks
-
- - Use an early return as it makes the code more readable.
- - Added a FIXME about a conversion.
-
-- [Julien Chaffraix brought this change]
-
- security.c: sec_send tweaks
-
- - Renamed it to do_sec_send as it is the function doing the actual
- transfer.
- - Do not return any values as no one was checking it and it never
- reported a failure (added a FIXME about checking for errors).
- - Renamed the variables to make their use more specific.
- - Removed some casts (int -> curl_socket_t, ...)
- - Avoid doing the htnl <-> nthl twice by caching the 2 results.
-
-- [Julien Chaffraix brought this change]
-
- security.c: Curl_sec_read_msg tweaks
-
- - Renamed the variables name to better match their intend.
- - Unified the |decoded_len| checks.
- - Added some FIXMEs to flag some improvement that did not go in this
- change.
-
-- [Julien Chaffraix brought this change]
-
- security.c: Curl_sec_set_protection_level tweaking
-
- - Removed sec_prot_internal as it is now inlined in the function (this removed
- a redundant check).
- - Changed the prototype to return an error code.
- - Updated the method to use the new ftp_send_command function.
- - Added a level_to_char helper method to avoid relying on the compiler's
- bound checks. This default to the maximum security we have in case of a
- wrong input.
-
-- [Julien Chaffraix brought this change]
-
- security.c: factored the logic from Curl_sec_login into a dedicated method that better reflect its intent.
-
- Introduced a helper method ftp_send_command that synchronously send
- an FTP query.
-
-- [Julien Chaffraix brought this change]
-
- security.c: Remove out_buffer as it was never written into.
-
-- [Julien Chaffraix brought this change]
-
- security.c: buffer_read various fixes.
-
- Tighten the type of the |data| parameter to avoid a cast. Also made
- it const as we should not modify it.
-
- Added a DEBUGASSERT on the size to be written while changing it.
-
-- [Julien Chaffraix brought this change]
-
- security.c: Made block_write return a CURLcode.
-
- While doing so, renamed it to socket_write to better match its
- function.
-
-- [Julien Chaffraix brought this change]
-
- security.c: Made block_read and sec_get_data return CURLcode.
-
- To do so, made block_read call Curl_read_plain instead of read.
-
- While changing them renamed block_read to socket_read and sec_get_data
- to read_data to better match their function.
-
- Also fixed a potential memory leak in block_read.
-
-- [Julien Chaffraix brought this change]
-
- Security.c: Fix headers guard to match the rest of the code.
-
-- [Julien Chaffraix brought this change]
-
- configure: Fix the LDAPS disable message
-
- ... for example when LDAP is not compiled.
-
- Fixed the logic to match the rest of the options' message that is we
- update the default message only if the option is not disabled after the
- different checks.
-
- Reported by: Guenter Knauf
-
-- RELEASE-NOTES: sync with 8665d4e5 and c-ares >= 1.6.0 note
-
-- parse_remote_port: ignore colons without port number
-
- Obviously, browsers ignore a colon without a following port number. Both
- Firefox and Chrome just removes the colon for such URLs. This change
- does not remove the colon for URLs sent over a HTTP proxy, so we should
- consider doing that change as well.
-
- Reported by: github user 'kreshano'
-
-- RELEASE-NOTES: in sync with 19f45eaa799
-
-- duphandle: use ares_dup()
-
- curl_easy_duphandle() was not properly duping the ares channel. The
- ares_dup() function was introduced in c-ares 1.6.0 so by starting to use
- this function we also raise the bar and require c-ares >= 1.6.0
- (released Dec 9, 2008) for such builds.
-
- Reported by: Ning Dong
- Bug: http://curl.haxx.se/mail/lib-2010-08/0318.html
-
-- [Hendrik Visage brought this change]
-
- MacOSX-Framework: updates for Snowleopard
-
- 1) PPC64 appears to be an 10.5 only supported architecture, so I
- forced 10.5 for 64bit if there is a need for PPC64, else 64bit only
- does x86_64
-
- 2) proper "make clean" after every ./configure. fixes a bug where
- subsequent runs the 32bit do not get compiled
-
- 3) Added a version numbering curl-$VERSION} rather than the "stock standard" A
-
-- RELEASE-NOTES: synced with 5fcc4332d62fe
-
- Removed the duplicate entry of Kamil in the credits.
-
-- configure: don't enable RTMP if the lib detect fails
-
- librtmp is often statically linked and using sub dependencies like
- OpenSSL, so we need to make sure we can actually link with it properly
- before enabling it. Otherwise we easily end up trying to link with a
- RTMP lib that fails.
-
-- TODO: added 8.4 non-gcrypt under GnuTLS
-
- We must not assume gcrypt just because of GnuTLS
-
-- configure: check for gcrypt if using GnuTLS
-
- 1 - libcurl assumes that there are gcrypt functions available when
- GnuTLS is.
-
- 2 - GnuTLS can be built to use libnettle instead as crypto library,
- which breaks assumption (1)
-
- This change makes configure make sure that if GnuTLS is requested and
- detected, it also makes sure that gcrypt is present or it errors
- out. This is mostly a way to make the user more aware of this flaw, the
- correct fix would be to detect which crypto layer that is in use and
- adapt our code to use that instead of blindly assuming gcrypt.
-
- Reported by: Michal Gorny
- Bug: http://curl.haxx.se/bug/view.cgi?id=3071038
-
-- RELEASE-NOTES: sync from d2a7fd2fe65b to HEAD
-
-- FTP: fix bad check of Curl_timeleft() return code
-
- When it returns 0 it means no timeout. Only a negative value means that
- we're out of time.
-
-- LDAP: moved variable declaration to avoid compiler warn
-
- If built without HTTP or proxy support it would cause a compiler warning
- due to the unused variable. I moved the declaration of it into the only
- scope it is used.
-
-Tor Arntsen (18 Sep 2010)
-- LDAP: Use FALSE instead of bool_false when setting bits.close
-
- bool_false is the internal name used in the setup_once.h definition
- we fall back to for non-C99 non-stdbool systems, it's not the actual
- name to use in assignments (we use bool_false, bool_true there to
- avoid global namespace problems, see comment in setup_once.h).
- The correct C99 value to use is 'false', but let's use FALSE as
- used elsewhere when assigning to bits.close. FALSE is set equal
- to 'false' in setup_once.h when possible.
-
- This fixes a build problem on C99 targets.
-
-- LDAP: Add missing declaration for 'result'
-
-Daniel Stenberg (18 Sep 2010)
-- [Mauro Iorio brought this change]
-
- LDAP: Support for tunnelling queries through HTTP proxy
-
- As of curl-7.21.1 tunnelling ldap queries through HTTP Proxies is not
- supported. Actually if --proxytunnel command-line option (or equivalent
- CURLOPT_HTTPPROXYTUNNEL) is used for ldap queries like
- ldap://ldap.my.server.com/... You are unable to successfully execute the
- query. In facts ldap_*_bind is executed directly against the ldap server
- and proxy is totally ignored. This is true for both openLDAP and
- Microsoft LDAP API.
-
- Step to reproduce the error:
- Just launch "curl --proxytunnel --proxy 192.168.1.1:8080
- ldap://ldap.my.server.com/dc=... "
-
- This fix adds an invocation to Curl_proxyCONNECT against the provided
- proxy address and on successful "CONNECT" it tunnels ldap query to the
- final ldap server through the HTTP proxy. As far as I know Microsoft
- LDAP APIs don't permit tunnelling in any way so the patch provided is
- for OpenLDAP only. The patch has been developed against OpenLDAP 2.4.23
- and has been tested with Microsoft ISA Server 2006 and works properly
- with basic, digest and NTLM authentication.
-
-- timeout: use the correct start value as offset
-
- Rodric provide an awesome recipe that proved libcurl didn't timeout at
- the requested time - it instead often timed out at [connect time] +
- [timeout time] instead of the documented and intended [timeout time]
- only. This bug was due to the code using the wrong base offset when
- comparing against "now". I could also take the oppurtinity to simplify
- the code by properly using of the generic help function for this:
- Curl_timeleft.
-
- Reported by: Rodric Glaser
- Bug: http://curl.haxx.se/bug/view.cgi?id=3061535
-
-- Curl_timeleft: avoid returning "no timeout" by mistake
-
- As this function uses return code 0 to mean that there is no timeout, it
- needs to check that it doesn't return a time left value that is exactly
- zero. It could lead to libcurl doing an extra 1000 ms select() call and
- thus not timing out as accurately as it should.
-
- I fell over this bug when working on the bug 3061535 but this fix does
- not correct that problem alone, although this is a problem that needs to
- be fixed.
-
- Reported by: Rodric Glaser
- Bug: http://curl.haxx.se/bug/view.cgi?id=3061535
-
-- whitespace: unified source
-
- if ( => if(
- while ( => while(
-
- and some other changes in the similar spirit, trying to make the
- whole file use the same style
-
-- remote-header-name: don't output filename when NULL
-
-- [James Bursa brought this change]
-
- TheArtOfHttpScripting: use long options
-
-- [James Bursa brought this change]
-
- getinmemory: make the example easier to follow
-
- 1. Remove the comment warning that it's "not been verified to work". It
- works with no problems in my testing.
-
- 2. Remove 2 unnecessary includes.
-
- 3. Remove the myrealloc(). Initialize chunk.memory with malloc() instead
- of NULL. The comments for these two parts contradicted each other.
-
- 4. Handle out of memory from realloc() instead of continuing.
-
- 5. Print a brief status message at the end.
-
-- multi: don't do extra expire calls for the connection
-
- The timeout is set for the connect phase already at the start of the
- request so we should not add a new one, and we MUST not set expire to 0
- as that will remove any other potentially existing timeouts.
-
-- [Peter Pentchev brought this change]
-
- Fix a bashism: test a = b is more portable than ==.
-
-- glob_word: remove a check that is always false
-
-- inflate_stream: remove redundant check that is always true
-
-- digest: make it clear the condition is always true
-
-- ssluse: removed redundant check that is always true
-
-Dan Fandrich (11 Sep 2010)
-- Link curl and the test apps with -lrt explicitly when necessary
-
- When curl calls a function from that library then it needs to
- explicitly link to the library instead of piggybacking on
- libcurl's own dependency. Without this, GNU ld with the
- --no-add-needed flag fails when linking (which Fedora now does
- by default).
-
- Reported by: Quanah Gibson-Mount
- Bug: http://curl.haxx.se/mail/lib-2010-09/0085.html
-
-- Mention the Debian Popularity Contest
-
-Tor Arntsen (9 Sep 2010)
-- test565: Don't hardcode IP:PORT
-
- Use %HOSTIP:%HTTPPORT instead of 127.0.0.1:8990 so that
- verification works if the baseport change option is used
- when executing runtests.pl.
-
-Daniel Stenberg (9 Sep 2010)
-- curl.1: updated protocols and polished language
-
-- FAQ: CURL_STATICLIB for visual studio users
-
- Clarified as it isn't used with a -D option for them.
-
- Reported by: Artfunkel
- Bug: http://curl.haxx.se/bug/view.cgi?id=3060381
-
-- FAQ: updated and added host with custom IP question
-
- Added "3.19 How do I get HTTP from a host using a specific IP address?"
- and updated some stuff about certs etc.
-
-- chunky parser: only rewind if needed
-
- The code reading chunked encoding attempts to rewind the code if it had
- read more data than the chunky parser consumes. The rewinding can fail
- and it will then cause an error. This change now makes the rewinding
- only happen if pipelining is in use - as that's the only time it really
- needs to be done.
-
- Bug: http://curl.haxx.se/mail/lib-2010-08/0297.html
- Reported by: Ron Parker
-
-Kamil Dudka (6 Sep 2010)
-- rtsp: avoid SIGSEGV on malformed header
-
-- rtsp: avoid SIGSEGV on malformed header
-
-Daniel Stenberg (6 Sep 2010)
-- warning: fix conversion to 'int' from 'size_t'
-
-- portabilty: use proper variable type to hold sockets
-
- Curl_getconnectinfo() is changed to return a proper curl_socket_t for
- the last socket so that it'll work more portably (and cause less
- compiler warnings).
-
-Guenter Knauf (3 Sep 2010)
-- Trial to fix another compiler warning with braces.
-
-Dan Fandrich (2 Sep 2010)
-- Use checkprefix() to compare protocol-specific strings
-
- Otherwise, there could be problems running in certain locales.
-
-Guenter Knauf (2 Sep 2010)
-- Moved S_ISREG define to setup as suggested by Dan.
-
-- Use own typedef as workaround for broken sspi.h header (f.e. Watcom).
-
-- Added some hacks in order to build with VC from git.
-
- Adam Light posted this patch to the list which enables builds from
- git with VC versions other than vc6; also he added a vc10 target.
-
-- Added S_ISREG define for Win32.
-
-Daniel Stenberg (1 Sep 2010)
-- multi: fixes for timing out handles
-
- Add a timeout check for handles in the state machine so that they will
- timeout in all states disregarding what actions that may or may not
- happen.
-
- Fixed a bug in socket_action introduced recently when looping over timed
- out handles: it wouldn't assign the 'data' variable and thus it wouldn't
- properly take care of handles.
-
- In the update_timer function, the code now checks if the timeout has
- been removed and then it tells the application. Previously it would
- always let the remaining timeout(s) just linger to expire later on.
-
-- threaded resolver: no more expire 0 calls
-
- Curl_expire() set to 0 expires ALL timeouts so it should only be called
- if we truly and really want to remove all timeouts for the handle.
-
-- resolve_server: simplify code
-
- Make use of the helper function Curl_timeleft() instead of duplicating
- code.
-
-- multi: make sure the next timeout is used when one expires
-
- Each easy handle has a list of timeouts, so as soon as the main timeout
- for a handle expires, we must make sure to get the next entry from the
- list and re-add the handle to the splay tree.
-
- This was attempted previously but was done poorly in my commit
- 232ad6549a68450.
-
-Dan Fandrich (30 Aug 2010)
-- Added proxy keyword to allow skipping test in proxyless configs
-
-Daniel Stenberg (29 Aug 2010)
-- multi: set timeouts when transfer begins
-
- When a new transfer is about to start we now set the proper timeouts to
- expire for the multi interface if they are set for the handle. This is a
- follow-up bugfix to make sure that easy handles timeout properly when
- the times expire and the multi interface is used. This also improves
- curl_multi_timeout().
-
-- CURLOPT_DIRLISTONLY: don't use with CURLOPT_WILDCARDMATCH
-
-- FAQ: update list of supported protocols
-
-- [Fabian Keil brought this change]
-
- In the m4 detection line, factor out the 2>dev/null
-
-- [Fabian Keil brought this change]
-
- If m4 doesn't support --version, try if gm4 does.
-
-- [Fabian Keil brought this change]
-
- If the m4 version isn't recognized at all, just say so
-
- 'm4 version found. You need a GNU m4 installed!' is a bit confusing.
-
-- HISTORY: mention the gopher story
-
-Dan Fandrich (25 Aug 2010)
-- Tweaked some test data files
-
- Fixed some issues that caused xmllint failures, added features
- and keywords, fixed some quotes and removed some <strip> sections
- that unnecessarily limited test checking.
-
-- Added new source files to Symbian and TPF makefiles
-
-Daniel Stenberg (25 Aug 2010)
-- RELEASE-NOTES: sync from b980c9a02 to HEAD
-
-- Makefile: add gopher.c file to build
-
- As the VC and RISCOS makefiles don't use the .inc file
-
-- runtests: fix uninitialized variable warning
-
-- gopher tests: revert parts of gopher in the pingpong server
-
- Introduced in the initial gopher commits, there was added logic to do
- GOPHER test serving in the pingpong server but as it resembles HTTP much
- more than FTP or SMTP, the gopher testing has been moved over to instead
- use the sws (HTTP) server. This change simply removes unused code.
-
-- gopher tests: use sws and adjusted to more standard style
-
-- sws: added basic gopher support
-
-- gopher: enable the header callback/verbosity
-
-- gopher: fix test case line endings
-
- Patches over email very easily lose CRLF line endings in files otherwise
- LF-only so I had to put them back where needed.
-
-- gopher: fix memory leak and busyloop
-
- The fix for the busyloop really only is a temporary work-around. It
- causes a BLOCKING behavior which is a NO-NO. This function should rather
- be split up in a do and a doing piece where the pieces that aren't
- possible to send now will be sent in the doing function repeatedly until
- the entire request is sent.
-
-- [Cameron Kaiser brought this change]
-
- Gopher using Curl_write; test suite (4 tests)
-
-- [Cameron Kaiser brought this change]
-
- Remove url.c test
-
-- [Cameron Kaiser brought this change]
-
- Forgot gopher.h in Makefile.inc
-
-- [Cameron Kaiser brought this change]
-
- Gopher protocol support (initial release)
-
-- http: handle trailer headers in all chunked responses
-
- HTTP allows that a server sends trailing headers after all the chunks
- have been sent WITHOUT signalling their presence in the first response
- headers. The "Trailer:" header is only a SHOULD there and as we need to
- handle the situation even without that header I made libcurl ignore
- Trailer: completely.
-
- Test case 1116 was added to verify this and to make sure we handle more
- than one trailer header properly.
-
- Reported by: Patrick McManus
- Bug: http://curl.haxx.se/bug/view.cgi?id=3052450
-
-- TODO: we now support RTMP
-
-- TODO: done "NTLM with other crypto functions"
-
- Since NTLM was made to work with the NSS API as well, the primary SSL
- alternatives will be built with NTLM support in libcurl.
-
-- TODO: fixed "Make curl_multi_info_read faster"
-
- It is really fast now
-
-Dan Fandrich (24 Aug 2010)
-- Fixed a NULL pointer dereference in form posting
-
- It was introduced in commit eeb2cb05 along with the -F type=
- change. Also fixed a typo in the name of the magic filename=
- parameter. Tweaked tests 39 and 173 to better test this path.
-
-Daniel Stenberg (24 Aug 2010)
-- [Ben Greear brought this change]
-
- multi: Fix compile warning on 64-bit systems
-
-Dan Fandrich (23 Aug 2010)
-- Mention PolarSSL in tutorial & add some URLs to INSTALL
-
-Daniel Stenberg (23 Aug 2010)
-- RESUME_FROM: clarify what ftp uploads do
-
- The numerical value passed to CURLOPT_RESUME_FROM for FTP uploads is
- interpreted and used as position where to resume the _reading_ of the
- local file and it will "blindly" append that data on the remote
- file. This was certainly not clear in the docs previously.
-
- Reported by: catalin
- Bug: http://curl.haxx.se/bug/view.cgi?id=3048174
-
-- [Dirk Manske brought this change]
-
- Curl_is_connected: use correct errno
-
- The correctly extracted errno contents were mistakenly overwritten by a newer
- value that wasn't the correct error value.
-
- Bug: http://curl.haxx.se/mail/lib-2010-08/0242.html
-
-- cmdline: make -F type= accept ;charset=
-
- The -F option allows some custom parameters within the given string, and
- those strings are separated with semicolons. You can for example specify
- "name=daniel;type=text/plain" to set content-type for the
- field. However, the use of semicolons like that made it not work fine if
- you specified one within the content-type, like for:
- "name=daniel;type=text/plain;charset=UTF-8"
- ... as the second one would be seen as a separator and "charset" is no
- parameter curl knows anything about so it was just silently discarded.
-
- The new logic now checks if the semicolon and following keyword looks
- like a parameter it knows about and if it isn't it is assumed to be
- meant to be used within the content-type string itself.
-
- I modified test case 186 to verify that this works as intended.
-
- Reported by: Larry Stone
- Bug: http://curl.haxx.se/bug/view.cgi?id=3048988
-
-Guenter Knauf (20 Aug 2010)
-- Added mk-ca-bundle.vbs script.
-
- The script works exactly same as the Perl one except for one thing:
- when the text descriptions generated with openssl are included then
- the md5 fingerprints are missing; seems openssl has either a bug or
- a feature which prints the md5 fingerprint output to stdout instead
- of writing them to specified file; this script could here do the same
- as what the Perl scripr does (redirect stdout into file) but this
- makes the script take up double the time because it needs to launch
- cmd.exe 140 times (fo each openssl call). So I think for now we just
- ommit the md5 fingerprints, and see if openssl will be fixed.
-
-- Trial to fix win32 autobuilds.
-
- It seems that its time to look at some better ideas for the win32
- non-configure builds; probably a prebuild target which copies
- config-win32.h to curl_config.h and appends also then feature
- defines like USE_ARES.
-
-Dan Fandrich (19 Aug 2010)
-- Use the S_ISREG macro to determine what is a regular file
-
-Kamil Dudka (19 Aug 2010)
-- AC_INIT: avoid a warning with autoconf 2.66
-
- It was complaining about the '=>' operator, introduced in e3fc0d5.
-
-Dan Fandrich (18 Aug 2010)
-- Fixed a memory leak during OOM in the multi timeout code
-
-- Removed a C99ism & made an array const
-
-Daniel Stenberg (19 Aug 2010)
-- [Julien Chaffraix brought this change]
-
- test: added test 579 to verify progress callback for chunked post
-
- The 66 bytes checked are those 38 bytes with the chunked encoding
- headers added: 8+8+10+35+5 = 66
-
- The three-letter words become 8 bytes on the wire because they are sent
- like: "3\r\none\r\n"
-
- ... and there's the trailing 5 bytes write after the four lines since
- the final chunk is sent (which is "0\r\n\r\n").
-
-- multi: avoid sending multiple complete messages
-
- I fell over this bug report that mentioned that libcurl could wrongly
- send more than one complete messages at the end of a transfer. Reading
- the code confirmed this, so I've added a new multi state to make it not
- happen. The mentioned bug report was made by Brad Jorsch but is (oddly
- enough) filed in Debian's bug tracker for the "wmweather+" tool.
-
- Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593390
-
-- FAQ: update the list of supported protocols
-
-- FAQ: added blurb about ECCN
-
- "1.13 curl's ECCN number" is a new section mostly made up from
- Alessandro Vesely's very informative ML post on the subject:
- http://curl.haxx.se/mail/lib-2008-03/0251.html
-
-Guenter Knauf (18 Aug 2010)
-- It is sufficient to pipe stderr to NUL to get rid of the nasty messages.
-
-- Added SSPI build to Watcom makefile.
-
-Daniel Stenberg (16 Aug 2010)
-- [Julien Chaffraix brought this change]
-
- progress: callback for POSTs less than MAX_INITIAL_POST_SIZE
-
- Add a call to Curl_pgrsSetUploadSize in this case valided by a test
- case.
-
- Reported by: Ðикита Дорохин.
- Bug: http://curl.haxx.se/mail/lib-2010-04/0173.html
-
-Dan Fandrich (16 Aug 2010)
-- Make the LD_PRELOAD path absolute in the tests that use it
-
- In some situations, libtool will change directories and perform
- a link step before executing the libtest test app. Since
- LD_PRELOAD is in effect for this entire process, the path to the
- binary must be absolute so it will be valid no matter in which
- directory the app is running.
-
-Daniel Stenberg (16 Aug 2010)
-- negotiation: Wrong proxy authorization
-
- There's an error in http_negotiation.c where a mistake is using only
- userpwd even for proxy requests. Ludek provided a patch, but I decided
- to write the fix slightly different using his patch as inspiration.
-
- Reported by: Ludek Finstrle
- Bug: http://curl.haxx.se/bug/view.cgi?id=3046066
-
-Dan Fandrich (16 Aug 2010)
-- Clear stdout and stderr files on each test run
-
- This allows a test to be run several times in the same test
- session even when the -k option is given.
-
-Guenter Knauf (15 Aug 2010)
-- Syncroniszed vclean target; fixed some comments.
-
-Daniel Stenberg (15 Aug 2010)
-- THANKS: added contributors from 7.21.1
-
-- multi: two fixes done
-
-- multi: use timeouts properly for MAX_RECV/SEND_SPEED
-
- When detecting that the send or recv speed, the multi interface changes
- state to TOOFAST and previously there was no timeout set that would
- force a recheck but it would rely on the application to somehow call
- libcurl anyway. This now sets a timeout for a suitable future time to
- check again if the average transfer speed is then below the threshold
- again.
-
-- multi: support timeouts
-
- Curl_expire() is now expanded to hold a list of timeouts for each easy
- handle. Only the closest in time will be the one used as the primary
- timeout for the handle and will be used for the splay tree (which sorts
- and lists all handles within the multi handle).
-
- When the main timeout has triggered/expired, the next timeout in time
- that is kept in the list will be moved to the main timeout position and
- used as the key to splay with. This way, all timeouts that are set with
- Curl_expire() internally will end up as a proper timeout. Previously any
- Curl_expire() that set a _later_ timeout than what was already set was
- just silently ignored and thus missed.
-
- Setting Curl_expire() with timeout 0 (zero) will cancel all previously
- added timeouts.
-
- Corrects known bug #62.
-
-- Curl_llist_insert_next: allow insertion first in the list
-
- When we specify the "insert after" entry as NULL, this function now
- inserts the new entry first in the list.
-
-- multi: make curl_multi_info_read perform O(1)
-
- Instead of looping over all attached easy handles, this now keeps a list
- of messages in the multi handle. It allows curl_multi_info_read() to
- perform O(1) no matter how many easy handles that are handled. This is
- of importance since this function may be polled very frequently by apps
- using the multi interface.
-
-Kamil Dudka (15 Aug 2010)
-- curl -T: ignore file size of special files
-
- original bug report at https://bugzilla.redhat.com/622520
-
-Dan Fandrich (13 Aug 2010)
-- Reset environment variables before starting servers
-
- Otherwise, variables from tests could affect the servers
- themselves.
-
-Kamil Dudka (12 Aug 2010)
-- typecheck-gcc: work around gcc upstream bug #32061
-
- original bug report at https://bugzilla.redhat.com/617757
-
-Daniel Stenberg (11 Aug 2010)
-- release cycle loop: start over toward 7.21.2
-
-Version 7.21.1 (11 Aug 2010)
-
-Daniel Stenberg (11 Aug 2010)
-- RELEASE-NOTES: mention the runtests fix as well
-
-- runtests: clear old setenv remainders before test
-
- Due to the layout of the singletest function there are situations where
- it returns before it clears the environment variables that were
- especially set for the single specific test case. That could lead to
- subsequent tests getting executed with environment variables sticking
- around from a previous test which could lead to badness.
-
- This change makes sure to clear all custom variables that may be laying
- around from a previous round, before running a test case.
-
- Reported by: Kamil Dudka
- Bug: http://curl.haxx.se/mail/lib-2010-08/0141.html
-
-Guenter Knauf (11 Aug 2010)
-- Added OpenSSL builds to Watcom makefiles.
-
-Yang Tse (11 Aug 2010)
-- configure: werror related adjustments
-
-Daniel Stenberg (11 Aug 2010)
-- FAQ: s/libcurl.so.3/libcurl.so.X
-
-Dan Fandrich (10 Aug 2010)
-- KNOWN_BUG #59 is fixed. Clarify support of IPv6 zone IDs.
-
-- Fixed typo in Android configure command
-
-Daniel Stenberg (11 Aug 2010)
-- HISTORY: added stuff from recent years
-
-- warning: silence the compiler
-
- warning: conversion to 'long int' from 'time_t' may alter its value
-
- ... on win64 when time_t is 64bit and long is 32bit.
-
-- RELEASE-NOTES: synced, 3 additional bugfixes
-
-- multi_socket_action: clarify how to kickstart it
-
- The callbacks are called when curl_multi_socket_action() is called, not
- when handles are added. This is now mentioned in the "TYPICAL USAGE"
- section.
-
-- callbacks: acknowledge progress callback error returns
-
- When the progress callback is called during the TCP connection, an error
- return would accidentally not abort the operation as intended but would
- instead be counted as a failure to connect to that particular IP and
- libcurl would just continue to try the next. I made singleipconnect()
- and trynextip() return CURLcode properly.
-
- Added bonus: it corrected the error code for bad --interface usages,
- like tested in test 1084 and test 1085.
-
- Reported by: Adam Light
- Bug: http://curl.haxx.se/mail/lib-2010-08/0105.html
-
-Guenter Knauf (10 Aug 2010)
-- More Watcom makefile fixes ...
-
- Final fix (hopefully!) for dll wlink loader;
- prefer faster internal rm if available.
-
-- Fixed my wrong edit.
-
-- More Watcom makefile fixes.
-
- Added the -br switch to dynamic builds which fixes the issue I saw
- with curl's --version output. Added debug info and symfile for debug
- builds to linker opts. Added DLL loader for wlink back, but this time
- dependend on wlink version.
- Patch posted to the list by malak.jiri AT gmail.com.
-
-- Changed test for -u switch in order to enable other wmake switches.
-
- The var %MAKEFLAGS is only set in 3 cases: if set as environment
- var or as macro definition from commandline, and either with the
- -u or -ms switch. Since all these cases are unlikely for the average
- user it should be safe to only test if %MAKEFLAGS is defined; this
- has the benefit that now all other switches can be used again in
- addition to the -u which was formerly not possible.
-
-Daniel Stenberg (10 Aug 2010)
-- llist: hide Curl_llist_init
-
- Curl_llist_init is never used outside of llist.c and thus it should be
- static. I also removed the protos for Curl_llist_insert_prev and
- Curl_llist_remove_next which are functions we removed from llist.c ages
- ago.
-
-Guenter Knauf (10 Aug 2010)
-- Added msys Perl since git for Win32 comes with own Perl which identifies as msys.
-
-- Updated lib dependency versions.
-
-- Make testcurl.pl Watcom-aware.
-
-Daniel Stenberg (10 Aug 2010)
-- parse_remote_port: fix ;type= URL suffix over HTTP proxy
-
- Test 563 is enabled now and verifies that the combo FTP type=A URL,
- CURLOPT_PORT set and proxy work fine. As a bonus I managed to remove the
- somewhat odd FTP check in parse_remote_port() and instead converted it
- to a better and more generic 'slash_removed' struct field. Checking the
- ->protocol field isn't right since when an FTP:// URL is sent over a
- HTTP proxy, the protocol is HTTP but the URL was handled by the FTP code
- and thus slash_removed is set TRUE for this case.
-
-- indent: white space fixes only
-
-Yang Tse (9 Aug 2010)
-- build: fix previous push
-
-- build: don't build libhostname unless shared libcurl is built
-
-- build: libhostname and chkhostname linkage adjustments followup
-
-Daniel Stenberg (8 Aug 2010)
-- typo: remove duplicate semicolon
-
-- multi: avoid a malloc() when a transfer is complete
-
- The struct used for storing the message for a completed transfer is now
- no longer allocated separatly but is kept within the main struct kept
- for each easy handle so that we avoid one malloc (and the subsequent
- free).
-
-Yang Tse (8 Aug 2010)
-- build: libhostname linkage adjustments followup
-
-Guenter Knauf (7 Aug 2010)
-- Fix to overwrite libcurl name.
-
-Yang Tse (7 Aug 2010)
-- build: chkhostname build adjustments followup
-
-U-D5B1PQ1J\Administrador (7 Aug 2010)
-- build: allow NTLM tests to run on more build configurations
-
-Daniel Stenberg (7 Aug 2010)
-- curl_easy_setopt.3: rename stream to userdata
-
- In some places where the name 'stream' has been used for naming a
- function argument that is in fact settable with a setopt() option we now
- call that argument 'userdata' to make it more obvious that it is in fact
- possible to set by the application.
-
- Suggested by: Jeff Pohlmeyer
-
-Guenter Knauf (7 Aug 2010)
-- Block created curlbuild.h for NetWare to avoid usage from other platforms.
-
-Daniel Stenberg (7 Aug 2010)
-- RELEASE-NOTES: synced with recent changes
-
-Yang Tse (6 Aug 2010)
-- build: ensure that libhostname doesn't get installed
-
-Daniel Stenberg (6 Aug 2010)
-- multi_socket: set timeout for 100-continue
-
- When libcurl internally decided to wait for a 100-continue header, there
- was no call to the timeout function so there was no timeout callback
- called when the multi_socket API was used and thus applications became
- either completely wrong or at least ineffecient depending on how they
- handled the situation. We now set a timeout to get triggered.
-
- Reported by: Ben Darnell
- Bug: http://curl.haxx.se/bug/view.cgi?id=3039744
-
-Guenter Knauf (6 Aug 2010)
-- Some more Watcom makefile massage ...
-
- For now removed the .autodepend directive until I've figured out
- which of my changes broke it again.
-
-Yang Tse (5 Aug 2010)
-- build: fix libssh2_scp_send64() availability
-
-- build: remove unneeded cast to (void *)
-
-- build: remove unused file
-
-Daniel Stenberg (4 Aug 2010)
-- SCP: send large files properly with new enough libssh2
-
- libssh2 1.2.6 and later handle >32bit file sizes properly even on 32bit
- architectures and we make sure to use that ability.
-
- Reported by: Mikael Johansson
- Bug: http://curl.haxx.se/mail/lib-2010-08/0052.html
-
-Yang Tse (3 Aug 2010)
-- build: add missing new files to non-configure target build files
-
-- md4: replace bcopy usage with memcpy
-
-Daniel Stenberg (3 Aug 2010)
-- RELEASE-NOTES: synced with recent changes
-
-- TODO-RELEASE: clear, file not really used ATM
-
-- typecheck-gcc: add checks for recently added options
-
- I added all OBJECTPOINT curl_easy_setopt() options from 178 to 202. Left
- to add: the five FUNCTIONPOINT (callbacks) options added since:
-
- SSH_KEYFUNCTION
- INTERLEAVEFUNCTION
- CHUNK_BGN_FUNCTION
- CHUNK_END_FUNCTION
- FNMATCH_FUNCTION
-
-- .gitignore: ignore all built examples
-
-- example: fix code to build warning-free
-
-- Curl_connected_proxy: skip the bits.tcpconnect check
-
- Simply because the TCP might be connected already we cannot skip the
- proxy connect procedure. We need to be careful to not overload more
- meaning to the bits.tcpconnect field like this.
-
- With this fix, SOCKS proxies work again when the multi interface is
- used. I believe this regression was added with commit 4b351d018e,
- released as 7.20.1.
-
- Left todo: add a test case that verifies this functionality that
- prevents us from breaking it again in the future!
-
- Reported by: Robin Cornelius
- Bug: http://curl.haxx.se/bug/view.cgi?id=3033966
-
-- sethostname: provide local prototype for gethostname
-
- This is only to avoid warnings on some systems.
-
-- build: add typecast to avoid warning
-
- There is an implicit conversion from "unsigned long" to "long";
- rounding, sign extension, or loss of accuracy may result.
-
-Guenter Knauf (2 Aug 2010)
-- Rename CURL_SOURCES macro; revert previous rename of curl_SOURCES macro.
-
-- Removed ugly dependency lists since wmake knows the .autodepend directive.
-
-- Use suffix search path for sources in lib folder.
-
-- Changed src/Makefile.Watcom to use CURL_SOURCES from src/Makefile.inc.
-
-- Renamed curl_SOURCES to CURL_ALLFILES to overcome wmake's case-insensitivity.
-
-- Removed wlink from DLL loader list because it doesnt work with Watcom < 1.8.
-
-- Moved the LDAP API defines from Makefile.Watcom to config-win32.h.
-
- These defines are only needed for older Watcom versions (< 1280).
-
-Daniel Stenberg (2 Aug 2010)
-- retry: consider retrying even if -f is used
-
- The --retry logic does retry HTTP when some specific response codes are
- returned, but because the -f option sets the CURLOPT_FAILONERROR to
- libcurl, the return codes are different for such situations and then the
- curl tool failed to consider it for retrying.
-
- Reported by: Mike Power
- Bug: http://curl.haxx.se/bug/view.cgi?id=3037362
-
-- multi: fix FTPS connecting the data connection with OpenSSL
-
- Commit 496002ea1cd76af7f (released in 7.20.1) broke FTPS when using the
- multi interface and OpenSSL was used. The condition for the non-blocking
- connect was incorrect.
-
- Reported by: Georg Lippitsch
- Bug: http://curl.haxx.se/mail/lib-2010-07/0270.html
-
-Guenter Knauf (1 Aug 2010)
-- Fixed curlbuild.h rule.
-
-- Added rule to create curlbuild.h if not present (for builds from git).
-
-- Added dependend libs for curl static linking.
-
-- Fixed curl.exe static linking.
-
-Daniel Stenberg (30 Jul 2010)
-- warning: silence a win64 compiler warning
-
- conversion from 'size_t' to 'curl_socklen_t', possible loss of data
-
- Reported by: Adam Light
-
-- KNOWN_BUG: The SOCKET type in Win64 is 64 bits
-
- 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 option as for all other operating systems.
-
-- smtp_connect: always provide host name buffer
-
- Previously the host name buffer was only used if gethostname() exists,
- but since we converted that into a curl private function that function
- always exists and will be used so the buffer needs to exist for all
- cases/systems.
-
-- sethostname: avoid including unistd.h to duck for warnings
-
-- sethostname: ISO C does not allow extra `;' outside of a function
-
-- [Kamil Dudka brought this change]
-
- NTLM tests: boost coverage by forcing the hostname
-
- A shared library tests/libtest/.libs/lihostname.so is preloaded in NTLM
- test-cases to override the system implementation of gethostname(). It
- makes it possible to test the NTLM authentication for exact match, and
- this way test the implementation of MD4 and DES.
-
- If LD_PRELOAD doesn't work, a debug build willl also workk as debug
- builds are now made to prefer a specific environment variable and will
- then return that content as host name instead of the actual one.
-
- Kamil wrote the bulk of this, Daniel Stenberg polished it.
-
-Guenter Knauf (29 Jul 2010)
-- Added a comment with an alternate idea to avoid the backslash line contination character.
-
-- Changed comparison to match size_t var type.
-
-- Removed unused vars to avoid compiler warnings.
-
-- Make Watcom makefiles use Makefile.inc to reduce future maintainance.
-
- lib/Makefile.Watcom works fine already, for src/Makefile.Watcom we
- need first to tweak src/Makefile.inc a bit - therefore the handtweaked
- list still exists for now.
-
-- Watcom makefiles overhaul.
-
- - make both libcurl and curl makefiles use register calling convention
- (previously libcurl had stack calling convention).
- - added include paths to the Watcom headers so its no longer required
- to set the environment vars for this.
- - added -wcd=201 to supress compiler warning about unreachable code.
- - use macros for all tools, and removed dependency on GNU tools like rm.
- - make ipv6 and debug builds controlable via env vars and so make them
- optional instead of default.
- - commented WINLDAPAPI and WINBERAPI since they broke with OW 1.8, and
- it seems they're not needed (anymore?).
- - added rule for hugehelp.c.cvs so that it will be created when not
- already exist - this is required for building from a release tarball
- since there we have no hugehelp.c.cvs, thus compilation broke.
- - removed C_ARG creation from lib/Makefile.Watcom and use CFLAGS
- directly as done too in src/Makefile.Watcom - this has the benefit
- that we will see all active cflags and defines during compile.
- - added LINK-ARG to src/Makefile.Watcom in order to better control
- linker input.
- - a couple of other minor makefile tweaks here and there ...
- - added largefile support for Watcom builds to config-win32.h. Not yet
- tested if it really works, but should since Win32 supports it.
- - added loaddll stuff to speed up builds if supported.
-
-- some cosmetic changes.
-
-Dan Fandrich (26 Jul 2010)
-- Added md4.c to the Watcom makefile
-
-- Added PolarSSL to the docs
-
-Daniel Stenberg (25 Jul 2010)
-- curl-config: --built-shared returns shared info
-
- The curl-config now features a --built-shared command line option that
- will output 'yes' or 'no' depending if the build process was asked to
- build shared library/libraries or not.
-
- It is primarily made to offer more details to the test suite to know
- what kind of stunts it can expect to work.
-
-- add_buffer_send: fix compiler warning
-
- Win64's 32 bit long but 64 bit size_t caused a warning that we avoid
- with a typecast. A small whitespace indent fix was also applied.
-
- Reported by: Adam Light
-
-Guenter Knauf (22 Jul 2010)
-- Updated library versions.
-
-- Fixed script version which was still based on CVS Revision tag.
-
-Dan Fandrich (21 Jul 2010)
-- FAQ: Why doesn't cURL error out when the cable is unplugged?
-
- This one was long overdue to be mentioned in the FAQ. Also, mention the
- new ftp wildcard downloading feature.
-
-Daniel Stenberg (21 Jul 2010)
-- [Ben Greear brought this change]
-
- ssh: Fix compile error on 64-bit systems.
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- [Ben Greear brought this change]
-
- build: Enable configure --enable-werror
-
- This passes -Werror to gcc when building curl and libcurl,
- allowing easy dection of compile warnings.
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- [Ben Greear brought this change]
-
- pingpong: Fix indentation (whitespace change only)
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- [Jan Van Boghout brought this change]
-
- CUSTOMREQUEST: shouldn't be disabled when HTTP is disabled
-
- ... since FTP is using it as well, and potentially other protocols!
-
- Also, an #endif CURL_DISABLE_HTTP was incorrectly marked, as it seems to
- end the proxy block instead.
-
-- [Jan Van Boghout brought this change]
-
- pingpong: response_time is milliseconds
-
- Fixed the comment/document for the response_time struct member.
-
-- [Jan Van Boghout brought this change]
-
- ftp: response timeout bug in "quote" sending
-
- The FTP implementation was missing a timestamp reset point, making the
- waiting for responses after sending a post-transfer "QUOTE" command not
- working as supposedly. This bug was introduced in 7.20.0
-
-- [Jeff Pohlmeyer brought this change]
-
- remote-header-name: chop filename at next semicolon
-
- The --remote-header-name option for the command-line tool assumes that
- everything beyond the filename= field is part of the filename, but that
- might not always be the case, for example:
-
- Content-Disposition: attachment; filename=file.txt; modification-date=...
-
- This fix chops the filename off at the next semicolon, if there is one.
-
-- --retry: access violation with URL part sets continued
-
- When getting multiple URLs, curl didn't properly reset the byte counter
- after a successful transfer so if the subsequent transfer failed it
- would wrongly use the previous byte counter and behave badly (segfault)
- because of that. The code assumes that the byte counter and the 'stream'
- pointer is well in synch.
-
- Reported by: Jon Sargeant
- Bug: http://curl.haxx.se/bug/view.cgi?id=3028241
-
-- releasnote: synch up with commit f3b77e5611d
-
-- [Constantine Sapuntzakis brought this change]
-
- examples: add curl_multi_timeout
-
- Make the multi-interface using examples use curl_multi_timeout to
- properly educate users how to do things.
-
-- configure: document the STATICLIB variable
-
-- [Constantine Sapuntzakis brought this change]
-
- multi: fix condition that remove timers before trigger
-
- curl_multi perform has two phases: run through every easy handle calling
- multi_runsingle and remove expired timers (timer removal).
-
- If a small timer (e.g. 1-10ms) is set during multi_runsingle, then it's
- possible that the timer has passed by when the timer removal runs. The
- timer which was just added is then removed. This will potentially cause
- the timer list to be empty and cause the next call to curl_multi_timeout
- to return -1. Ideally, curl_multi_timeout should return 0 in this case.
-
- One way to fix this is to move the struct timeval now = Curl_tvnow(); to
- the top of curl_multi_perform. The change does that.
-
-- [Constantine Sapuntzakis brought this change]
-
- threaded resolver: fix timeout issue
-
- Reset old timer first so we can set a new one further in the future.
-
-- configure: allow environments variable to override internals
-
- configure checks for grep, egrep, sed and ar and set the variables GREP,
- EGREP, SED and AR accordingly. We now let already set variables override
- the internal choices to let users make decisions when they know the
- right choice already. This is a regression as our configure script used
- to allow this back before commit 0b57c475 (up to 7.18.2).
-
- Reported by: "kdekker"
- Bug: http://curl.haxx.se/bug/view.cgi?id=3028318
-
-Dan Fandrich (9 Jul 2010)
-- Improved the Android build instructions
-
-Daniel Stenberg (7 Jul 2010)
-- [Tor Arntsen brought this change]
-
- upload: Avoid infinite loop when checking for auth bits
-
- The test would loop forever if authtype bit 0 wasn't set.
-
-- upload: warn users trying to upload from stdin with anyauth
-
- Since uploading from stdin is very likely to not work with anyauth and
- its multi-phase probing for what authentication to actually use, alert
- the user about it. Multi-phase negotiate almost certainly will involve
- sending data and thus libcurl will need to rewind the stream to send
- again, and it cannot do that with stdin.
-
-- http: don't enable chunked during authentication negotiations
-
- As mentioned in bug report #2956968, the HTTP code wouldn't send the
- first empty chunk during the auth negotiation phase of the HTTP request
- sending, so the server would wait for data to come and libcurl would
- wait for data to arrive... I've made the code not enable chunked
- encoding until the auth negotiation is done and thus this scenario
- doesn't occur anymore.
-
- Reported by: Sidney San Martín
- Bug: http://curl.haxx.se/bug/view.cgi?id=2956968
-
-- --libcurl: list the tricky options instead of using [REMARK]
-
- I think the [REMARK] and commented function calls cluttered the code a
- bit too much and made the generated code ugly to read. Now we instead
- track the remarks one specially and just lists them at the end of the
- generated code more as additional information.
-
-- curl: avoid setting libcurl options to its default
-
- it makes the --libcurl output easier to follow.
-
-- --libcurl: hide setopt() calls setting default options
-
- And additionally, don't show function or object pointers actual value
- since they make no sense to anyone. Show 'functionpointer' and
- 'objectpointer' instead.
-
-- --libcurl: use *_LARGE options with typecasted constants
-
- In the generated code --libcurl makes, all calls to curl_easy_setopt()
- that use *_LARGE options now have the value typecasted to curl_off_t, so
- that it works correctly for 32bit systems with 64bit curl_off_t type.
-
-- multi: CURLINFO_LASTSOCKET doesn't work after remove_handle
-
- When curl_multi_remove_handle() is called and an easy handle is returned
- to the connection cache held in the multi handle, then we cannot allow
- CURLINFO_LASTSOCKET to extract it since that will more or less encourage
- that the user uses the socket while it can get used by libcurl again.
-
- Without this fix, we'd get a segfault in Curl_getconnectinfo() trying to
- dereference the NULL pointer in 'data->state.connc'.
-
- Bug: http://curl.haxx.se/bug/view.cgi?id=3023840
-
-- [Pierre Joye brought this change]
-
- build: add enable IPV6 option for the VC makefiles
-
-- FAQ: the threaded resolver works universally now
-
-Kamil Dudka (30 Jun 2010)
-- http_ntlm: add support for NSS
-
- When configured with '--without-ssl --with-nss', NTLM authentication
- now uses NSS crypto library for MD5 and DES. For MD4 we have a local
- implementation in that case. More details are available at
- https://bugzilla.redhat.com/603783
-
- In order to get it working, curl_global_init() must be called with
- CURL_GLOBAL_SSL or CURL_GLOBAL_ALL. That's necessary because NSS needs
- to be initialized globally and we do so only when the NSS library is
- actually required by protocol. The mentioned call of curl_global_init()
- is responsible for creating of the initialization mutex.
-
- There was also slightly changed the NSS initialization scenario, in
- particular, loading of the NSS PEM module. It used to be loaded always
- right after the NSS library was initialized. Now the library is
- initialized as soon as any SSL or NTLM is required, while the PEM module
- is prevented from being loaded until the SSL is actually required.
-
-Daniel Stenberg (29 Jun 2010)
-- glob: backslash escaping bug
-
- curl didn't properly handle escaping characters in a URL with the use of
- backslash. It did an attempt, but that failed as reported in bug
- 3022551. The described example was using the URL
- "http://example.com?{AB,C\,D}".
-
- I've now removed the special-handling of letters following the backslash
- and I also removed the bad extra check that triggered this particular
- bug.
-
- Bug: http://curl.haxx.se/bug/view.cgi?id=3022551
- Reported by: Jon Sargeant
-
-- release-notes: sync up with recent commits
-
-- CONTRIBUTE: the git commit message line length is 72 columns
-
-- [Pavel Raiskup brought this change]
-
- ftp wildcard: FTP LIST parser FIX
-
- There was a problem when a UNIX-like server returned information
- about directory size (total NNNNNN) at the first line of
- response.
-
-- [Pavel Raiskup brought this change]
-
- examples: new FTP wildcard showcase
-
-- multi_socket: re-use of same socket without notifying app
-
- When a hostname resolves to multiple IP addresses and the first one
- tried doesn't work, the socket for the second attempt may get dropped on
- the floor, causing the request to eventually time out. The issue is that
- when using kqueue (as on mac and bsd platforms) instead of select, the
- kernel removes the first fd from kqueue when it is closed (in trynextip,
- connect.c:503). Trynextip() then goes on to open a new socket, which
- gets assigned the same number as the one it just closed. Later in
- multi.c, socket_cb is not called because the fd is already in
- multi->sockhash, so the new socket is never added to kqueue.
-
- The correct fix is to ensure that socket_cb is called to remove the fd
- when trynextip() closes the socket, and again to re-add it after
- singleipsocket(). I'm not sure how to cleanly do that, but the attached
- patch works around the problem in an admittedly kludgy way by delaying
- the close to ensure that the newly-opened socket gets a different fd.
-
- Daniel's added comment: I didn't spot a way to easily do a nicer fix so
- I've proceeded with Ben's patch.
-
- Bug: http://curl.haxx.se/bug/view.cgi?id=3017819
- Patch by: Ben Darnell
-
-Kamil Dudka (24 Jun 2010)
-- [Pavel Raiskup brought this change]
-
- ftp-wildcard: avoid tight loop when used without any pattern
-
- It was broken for URLs like "ftp://example.com/".
-
-Daniel Stenberg (21 Jun 2010)
-- maketgz: produce CHANGES automatically with the 1000 most recent commits
-
- It passes the git log output through 'log2changes.pl' to produce
- the lot.
-
-- ignore: CHANGES.dist gets generated by maketgz
-
-- CHANGES: move all contents from CHANGES to CHANGES.0
-
- CHANGES is no longer used for manually edited content. It is to
- be generated automatically by maketgz when we make release
- tarballs.
-
-- log2changes: correct command line, fix tag usage, change Version output
-
- --decorate=full is needed with my git 1.7.1 to get the necessary
- output so that the previous edit would work to extract the
- Version stuff.
-
- ... but I had to edit how the refs/tags was extracted since it
- had a little flaw that made it miss the 7.20.1 output.
-
- Finally, I changed so that Version is outputted even more similar
- to how CHANGES does it.
-
-Dan Fandrich (21 Jun 2010)
-- Make the output of log2changes.pl even more closely match CHANGES
-
- Add the ASCII art header, and list version commits by decoding
- the ref tag names, when available (using the git log --decorate
- option).
-
-Daniel Stenberg (19 Jun 2010)
-- log2changes: first version of the git log to CHANGES conversion script
-
- $ git log --pretty=fuller --no-color --date=short | ./log2changes.pl
-
- Of course, limiting the log output with a range like with
- "[tag]..HEAD" appended can be very useful too.
-
-- sendrecv: treat all negative values from send/recv as errors
-
- For example the libssh2 based functions return other negative
- values than -1 to signal errors and it is important that we catch
- them properly. Right before this, various failures from libssh2
- were treated as negative download amounts which caused havoc.
-
-- multi: prevent NULL pointer dereference
-
- My additional call to Curl_pgrsUpdate() would sometimes get
- called even though there's no connection (left) so a NULL pointer
- would get passed, causing a segfault.
-
-- smtp: fixed a few uses of size_t that seemed to believe it was signed
-
- Reported-by: Steven M. Schweda
-
-Dan Fandrich (17 Jun 2010)
-- Fixed an OOM memory leak in the FTP wildcard code
-
-Kamil Dudka (17 Jun 2010)
-- test575: do not fail with threaded DNS resolver
-
-Daniel Stenberg (17 Jun 2010)
-- [Krister Johansen brought this change]
-
- multi: unmark handle as used when no longer head of pipeline
-
-- multi: call the progress function only once and allow abort
-
- 1) no need to call the progress function twice when in the
- CURLM_STATE_TOOFAST state.
-
- 2) Make sure that the progress callback's return code is
- acknowledged when used
-
-- multi: call the progress callback in all states
-
- As long as no error is reported, the progress function can get
- called. This may be a little TOO often so we should keep an eye
- on this and possibly make this conditional somehow.
-
-- configure: spell --disable-threaded-resolver correctly
-
- Previously we only accepted the option when named
- --disable-threaded-resover, which wasn't quite intended.
-
- Reported by: Helwing Lutz
-
-- release: start on 7.21.1, bump contributor count
-
-- version: start working on the 7.21.1-dev version
-
-- THANKS: added contributors from the 7.21.0 release
-
-Version 7.21.0 (16 Jun 2010)
-
-Daniel Stenberg (16 Jun 2010)
-- release: 7.21.0
-
-Yang Tse (10 Jun 2010)
-- remove unused 'tmpdata' and 'backup' ftp_parselist_data struct members
-
-- replace isprint() with ISPRINT()
-
-- ensure that Curl_wildcard_dtor() leaves WildcardData struct zero initialized
-
-Patrick Monnerat (9 Jun 2010)
-- ILE/RPG binding updated to current curl.h definitions.
-
-Yang Tse (9 Jun 2010)
-- code simplification
-
-- add Curl_ prefix to conform with cURL naming standards
-
-- Merge branch 'master' of git@github.com:bagder/curl
-
-- fix compiler warning using curl_socket_t to store socket descriptor
-
-Daniel Stenberg (8 Jun 2010)
-- inet_pton: warnings: use size_t to store pointer deltas
-
-Yang Tse (8 Jun 2010)
-- avoid redundant work when reusing same connection
-
-- fix function result checking
-
-Daniel Stenberg (8 Jun 2010)
-- transfer: warning: implicit conversion
-
- There is an implicit conversion from "unsigned long" to "long";
- rounding, sign extension, or loss of accuracy may result.
-
- Fixed by an added typecast.
-
-- TFTP: fix compiler warning
-
- Curl_fillreadbuffer()'s second argument takes an int, so
- typecasting to another is a bad idea.
-
-- TFTP: fix warning for sendto() usage on non-POSIX systems
-
- Older unixes want an 'int' instead of 'size_t' as the 3rd
- argumment so before this change it would cause warnings such as:
-
- There is an implicit conversion from "unsigned long" to "int";
- rounding, sign extension, or loss of accuracy may result.
-
-Dan Fandrich (7 Jun 2010)
-- Include Makefile.inc to get the list of source files for Amiga
-
- Signed-off-by: Diego Casorran <dcasorran@gmail.com>
-
-Yang Tse (7 Jun 2010)
-- Curl_updateconninfo() error handling fix
-
-Daniel Stenberg (5 Jun 2010)
-- [Constantine Sapuntzakis brought this change]
-
- OpenSSL: fix spurious SSL connection aborts
-
- Was seeing spurious SSL connection aborts using libcurl and
- OpenSSL. I tracked it down to uncleared error state on the
- OpenSSL error stack - patch attached deals with that.
-
- Rough idea of problem:
-
- Code that uses libcurl calls some library that uses OpenSSL but
- don't clear the OpenSSL error stack after an error.
-
- ssluse.c calls SSL_read which eventually gets an EWOULDBLOCK from
- the OS. Returns -1 to indicate an error
-
- ssluse.c calls SSL_get_error. First thing, SSL_get_error calls
- ERR_get_error to check the OpenSSL error stack, finds an old
- error and returns SSL_ERROR_SSL instead of SSL_ERROR_WANT_READ or
- SSL_ERROR_WANT_WRITE.
-
- ssluse.c returns an error and aborts the connection
-
- Solution:
-
- Clear the openssl error stack before calling SSL_* operation if
- we're going to call SSL_get_error afterwards.
-
- Notes:
-
- This is much more likely to happen with multi because it's easier
- to intersperse other calls to the OpenSSL library in the same
- thread.
-
-Yang Tse (5 Jun 2010)
-- replace socklen_t with curl_socklen_t
-
-Daniel Stenberg (5 Jun 2010)
-- [Frank Meier brought this change]
-
- getinfo: added *_PRIMARY_PORT, *_LOCAL_IP and *_LOCAL_PORT
-
-- RELEASE-NOTES: add contributors not mentioned
-
-Yang Tse (4 Jun 2010)
-- Enable OpenLDAP support for cygwin builds.
-
- Enable OpenLDAP support for cygwin builds. This support was disabled back
- in 2008 due to incompatibilities between OpenSSL and OpenLDAP headers.
- cygwin's OpenSSL 0.9.8l and OpenLDAP 2.3.43 versions on cygwin 1.5.25
- allow building an OpenLDAP enabled libcurl supporting back to Windows 95.
-
- Remove non-functional CURL_LDAP_HYBRID code and references.
-
-Kamil Dudka (2 Jun 2010)
-- ftplistparser.c: oops, fix typo in the last commit
-
-- ftplistparser.c: avoid some invalid dereferences
-
-- lib: eliminate some dead code
-
-Daniel Stenberg (2 Jun 2010)
-- SSH: corrected the inability to respect the timeout
-
- Jason McDonald posted bug report #3006786 when he found that the
- SFTP code didn't timeout properly in several places in the code
- even if a timeout was set properly.
-
- Based on his suggested patch, I wrote a different implementation
- that I think addressed the issue better and also uses the connect
- timeout for the initial part of the SSH/SFTP done during the
- "protocol connect" phase.
-
- (http://curl.haxx.se/bug/view.cgi?id=3006786)
-
-Yang Tse (2 Jun 2010)
-- mention last changes
-
-- add missing new files to non-configure target build files
-
-- include libcurl standard internal headers
-
-Daniel Stenberg (2 Jun 2010)
-- TODO: add multi interface improvement remove ldap select
-
-Yang Tse (2 Jun 2010)
-- make setup.h first included file
-
-- fix spnego memory leak
-
-- openldap header inclusions fix
-
-Daniel Stenberg (1 Jun 2010)
-- multi_socket: handles timer inaccuracy better for timeouts
-
- Igor Novoseltsev reported a problem with the multi socket API and
- using timeouts and timers. It boiled down to a problem with
- libcurl's use of GetTickCount() interally to figure out the
- current time, while Igor's own application code used another
- function call.
-
- It made his app call the socket API timeout function a bit
- _before_ libcurl would consider the timeout to trigger, and that
- could easily lead to timeouts or stalls in the app. It seems
- GetTickCount() in general often has no better resolution than
- 16ms and switching to the alternative function
- QueryPerformanceCounter has its share of problems:
- http://www.virtualdub.org/blog/pivot/entry.php?id=106
-
- We address this problem by simply having libcurl treat timers
- that already has occured or will occur within 40ms subject for
- treatment. I'm confident that there are other implementations and
- operating systems with similarly in accurate timer functions so
- it makes sense to have applied generically and I don't believe we
- sacrifice much by adding a 40ms inaccuracy on these timeouts.
-
-Yang Tse (1 Jun 2010)
-- fix ldaps option issue
-
-- fix ldap related compilation issues
-
-- fix compiler warning: enumerated type mixed with another type
-
-- fix compiler warning: enumerated type mixed with another type
-
-Patrick Monnerat (31 May 2010)
-- smtp_authenticate: avoid compiler warnings
-
-Yang Tse (31 May 2010)
-- fix compiler warning: enumerated type mixed with another type
-
-- fix compiler warning: enumerated type mixed with another type
-
-- fix compiler warning: enumerated type mixed with another type
-
-- fix compiler warning: external declaration in primary source file
-
-- fix compiler warning: variable was set but never used
-
-- fix compiler warning: enumerated type mixed with another type
-
-- fix compiler warning: external declaration in primary source file
-
-- update year in copyright notice
-
-Kamil Dudka (29 May 2010)
-- strtoofft: rename CURL_LLONG_MIN -> CURL_OFF_T_MIN
-
- ... and CURL_LLONG_MAX -> CURL_OFF_T_MAX
-
-- CURL_LLONG_MAX: avoid constant overflow
-
- ... when (CURL_SIZEOF_CURL_OFF_T == 4)
-
-Daniel Stenberg (28 May 2010)
-- [Howard Chu brought this change]
-
- LDAPS: list availability depending on SSL's presence
-
-- [Howard Chu brought this change]
-
- LDAP: make it build without SSL if no such support is available
-
- of course it also goes for the case where SSL is explicitly
- disabled
-
-- TODO: removed fixed items
-
- These two items are now actually implemented:
-
- 11.1 Content-Disposition
- 11.5 ftp wildcard download
-
-Kamil Dudka (28 May 2010)
-- lib: eliminate 'statement not reached' warnings
-
-Daniel Stenberg (28 May 2010)
-- test1115: verify that unexpected 1xx responses work fine
-
-Kamil Dudka (28 May 2010)
-- lib577: avoid redefinition of ERROR
-
-- test313: a new test for CRL support
-
-- tests/certs: re-generated because of lost pass-phrase
-
-- tests/certs/scripts: generate also CRL
-
- ... and make it possible to do so without any user interaction
-
-Daniel Stenberg (27 May 2010)
-- [Howard Chu brought this change]
-
- openldap: fix compiler warnings
-
-- indent: some whitespace edits
-
-Kamil Dudka (27 May 2010)
-- wildcard.c: add missing include of "setup.h"
-
-- [Tor Arntsen brought this change]
-
- lib573: do not compare double for exact match
-
-- [Pavel Raiskup brought this change]
-
- wildcard.c: add missing include of "curl_memory.h"
-
-- [Tor Arntsen brought this change]
-
- setup_once: use enum type for 'bool' on non-C99 platforms
-
- An enum will catch non-bool assignments to bool on platforms with
- a strict compiler, e.g MIPSPro.
-
- Signed-off-by: Kamil Dudka <kdudka@redhat.com>
-
-- url.c: avoid implied cast to bool
-
-- [Tor Arntsen brought this change]
-
- curl_fnmatch: remove use of register keyword
-
- Using the 'register' keyword rarely improves anything with modern
- compilers and architectures.
-
-Daniel Stenberg (26 May 2010)
-- [Julien Chaffraix brought this change]
-
- RTMP: Fix compiler warnings
-
-- [Julien Chaffraix brought this change]
-
- OOM fixes in http_negociate.c and lib/splay.c
-
- Fix 2 OOM errors: a missing NULL-check in lib/http_negociate.c
- and a potential NULL dereferencing in lib/splay.c
-
-- [Howard Chu brought this change]
-
- LDAP: properly implemented as a curl_handler
-
- makes the LDAP code much cleaner, nicer and in general being a
- better libcurl citizen. If a new enough OpenLDAP version is
- detect, the new and shiny lib/openldap.c code is then used
- instead of the old cruft
-
- Code by Howard, minor cleanups by Daniel.
-
-- [Tor Arntsen brought this change]
-
- curl_fnmatch: Use int not bool when function returns int
-
- bool in curl internals is unsigned char and should not be used
- to receive return value from functions returning int - this fails
- when using IBM VisualAge and Tru64 compilers.
-
-- TFTP: send legal timeout value
-
- Eric Mertens posted bug #3003705: when we made TFTP use the
- correct timeout option when sent to the server (fixed May 18th
- 2010) it became obvious that libcurl used invalid timeout values
- (300 by default while the RFC allows nothing above 255). While of
- course it is obvious that as TFTP has worked thus far without
- being able to set timeout at all, just removing the setting
- wouldn't make any difference in behavior. I decided to still keep
- it (but fix the problem) as it now actually allows for easier
- (future) customization of the timeout.
-
- (http://curl.haxx.se/bug/view.cgi?id=3003705)
-
-- TFTP: don't ack if wrong block num is received
-
- If an unexpected block number was received, break out of the
- switch loop.
-
-- TFTP: block id wrap bug fix
-
- In a normal expression, doing [unsigned short] + 1 will not wrap
- at 16 bits so the comparisons and outputs were done wrong. I
- added a macro do make sure it gets done right.
-
- Douglas Kilpatrick filed bug report #3004787 about it:
- http://curl.haxx.se/bug/view.cgi?id=3004787
-
-- [Ben Greear brought this change]
-
- Fix build warnings.
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- [Ben Greear brought this change]
-
- setopt: Fix setting of set.is_fwrite_set
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- [Tanguy Fautre brought this change]
-
- build: allow curl to build with Microsoft VC10
-
- By undefing a bunch of E* defines that VC10 has started to define
- but that we redefine internally to their WSA* alternatives when
- building for Windows.
-
-Kamil Dudka (20 May 2010)
-- [Tor Arntsen brought this change]
-
- Test 573: Use correct type for CURLINFO_CONNECT_TIME
-
- curl_easy_getinfo() called with a pointer to long instead of double
- would sigbus on RISC processors (e.g. MIPS) due to wrong alignment
- of pointer address.
-
-- [Tor Arntsen brought this change]
-
- lib: Fix AIX build failure
-
-Dan Fandrich (19 May 2010)
-- Fixed some memory leaks in the POP3 torture tests
-
-- Fixed a memory leak in the SMTP torture tests
-
-Daniel Stenberg (18 May 2010)
-- TFTP: send timeout option correctly
-
- Eric Mertens posted bug report #3003005 pointing out that the
- libcurl TFTP code was not sending the timeout option properly to
- the server, and suggested a fix.
-
- (http://curl.haxx.se/bug/view.cgi?id=3003005)
-
-Kamil Dudka (16 May 2010)
-- [Tor Arntsen brought this change]
-
- lib: Change some CRLF line endings to LF
-
- An update had added a couple of lines with DOS line endings,
- and some compilers will choke on that (e.g. the Tru64 compiler).
-
-- ftp wildcard: a new option CURLOPT_FNMATCH_DATA
-
-Daniel Stenberg (15 May 2010)
-- [Howard Chu brought this change]
-
- RMTP: the version code is now rtmp aware
-
-- [Howard Chu brought this change]
-
- RTMP: fix wrong #ifdef
-
-- [Pavel Raiskup brought this change]
-
- ftp wildcard: fix int32_t and size/group mixups
-
-Dan Fandrich (14 May 2010)
-- Fixed test 577 to work when --enable-hidden-symbols is configured
-
-Daniel Stenberg (14 May 2010)
-- OpenSSL: multi interface handshake could hang
-
- John-Mark Bell filed bug #3000052 that identified a problem (with
- an associated patch) with the OpenSSL handshake state machine
- when the multi interface is used:
-
- Performing an https request using a curl multi handle and using
- select or epoll to wait for events results in a hang. It appears
- that the cause is the fix for bug #2958179, which makes
- ossl_connect_common unconditionally return from the step 2 loop
- when fetching from a multi handle.
-
- When ossl_connect_step2 has completed, it updates
- connssl->connecting_state to ssl_connect_3. ossl_connect_common
- will then return to the caller, as a multi handle is in
- use. Eventually, the client code will call curl_multi_fdset to
- obtain an updated fdset to select or epoll on. For https
- requests, curl_multi_fdset will cause https_getsock to be called.
- https_getsock will only return a socket handle if the
- connecting_state is ssl_connect_2_reading or
- ssl_connect_2_writing. Therefore, the client will never obtain a
- valid fdset, and thus not drive the multi handle, resulting in a
- hang.
-
- (http://curl.haxx.se/bug/view.cgi?id=3000052)
-
-- changelog: add link to bug report
-
-Dan Fandrich (14 May 2010)
-- Added directories.pm to the source tar ball
-
-Daniel Stenberg (14 May 2010)
-- follow redirect: ignore response-body on redirect even if compressed
-
- Sebastian V reported bug #3000056 identifying a problem with
- redirect following. It showed that when curl followed redirects
- it didn't properly ignore the response body of the 30X response
- if that response was using compressed Content-Encoding!
-
- (http://curl.haxx.se/bug/view.cgi?id=3000056)
-
-- version: we're now going for 7.21.0
-
-- [Hoi-Ho Chan brought this change]
-
- Remove support for BSD version of PolarSSL
-
- "The BSD version of PolarSSL was made for migratory purposes only and is not
- maintained. The GPL version of PolarSSL is actually the only actively
- developed version, so I would be very reluctant to use the BSD version." /
- Paul Bakker, PolarSSL hacker.
-
- Signed-off-by: Hoi-Ho Chan <hoiho.chan@gmail.com>
-
-Dan Fandrich (12 May 2010)
-- Added Polar SSL and RTMP files to the non-autoconf build files
-
- I didn't bother with a few that have little hope of running the required
- dependent libraries.
-
-- Added the new ftp source files to the non-autoconf build files
-
-- Copy the license file so it's seen by the Android build system
-
-Daniel Stenberg (13 May 2010)
-- updated with symbols added in recent commits for 7.21.0
-
-- changelogs: mention RTMP and the FTP wildcard support
-
-- ftp wildcards: mention they're added in 7.21.0
-
-- style: minor whitespace change
-
-- syntax: cleanups
-
-- [Pavel Raiskup brought this change]
-
- FTP: WILDCARDMATCH/CHUNKING/FNMATCH added
-
-- [Howard Chu brought this change]
-
- RTMP: initial support added, powered by librtmp
-
- librtmp is found at http://rtmpdump.mplayerhq.hu/
-
-- [Howard Chu brought this change]
-
- sendrecv: make them two pairs of send/recv to properly deal with FTPS
-
- FTP(S) use two connections that can be set to different recv and
- send functions independently, so by introducing recv+send pairs
- in the same manner we already have sockets/connections we can
- work with FTPS fine.
-
- This commit fixes the FTPS regression introduced in change d64bd82.
-
-Kamil Dudka (11 May 2010)
-- changelog: fixed CRL support in libcurl-NSS
-
-- nss: make it possible to read ASCII and DER CRL
-
-- nss: add CRL to cache instead of read-only NSS db
-
-Daniel Stenberg (10 May 2010)
-- git: how to write a fine commit message
-
-- findtool: file name as a full path requires a slash
-
- Kalle Vahlman's patch applied a while ago broke how the findtool
- function searches for tools, as it would always check if "$file"
- was present first, which thus made the bad assumption that a file
- in the current directory would be a match.
-
- I noticed when it found 'libtool' in the current directory but
- libtoolize is not there, which confused the script.
-
-Hacki (8 May 2010)
-- moved vars into conditional since seems that winsock implementation doesnt use them.
-
-Daniel Stenberg (7 May 2010)
-- multi interface: missed storing connection time
-
- Dirk Manske reported a regression. When connecting with the multi
- interface, there were situations where libcurl wouldn't store
- connect time correctly as it used to (and is documented to) do.
-
- Using his fine sample program we could repeat it, and I wrote up
- test case 573 using that code. The problem does not easily show
- itself using the local test suite though.
-
- The fix, also as suggested by Dirk, is a bit on the ugly side as
- it adds yet another call to Curl_verboseconnect() and setting the
- TIMER_CONNECT time. That situation is subject for some closer
- inspection in the future.
-
-- verboseconnect: so the verbose checking within the function
-
- As the function is used more than once and libcurl can be built
- without it, do the conditional check within the verboseconnect()
- function itself.
-
-- changelogs: split the I/O handling
-
-- [Howard Chu brought this change]
-
- sendrecv: split the I/O handling into private handler
-
- Howard Chu brought the bulk work of this patch that properly
- moves out the sending and recving of data to the parts of the
- code that are properly responsible for the various ways of doing
- so.
-
- Daniel Stenberg assisted with polishing a few bits and fixed some
- minor flaws in the original patch.
-
- Another upside of this patch is that we now abuse CURLcodes less
- with the "magic" -1 return codes and instead use CURLE_AGAIN more
- consistently.
-
-- changelog: PolarSSL
-
-- [Hoi-Ho Chan brought this change]
-
- PolarSSL: initial support added
-
- This is Hoi-Ho Chan's patch with some minor fixes by me. There
- are some potential issues in this, but none worse than we can
- sort out on the list and over time.
-
-- TODO: we've done PRET already, consider HOST for the future
-
- ... and GnuTLS connects are non-blocking, TFTP is better
- integrated as a "real" protocol and RTSP is supported.
-
-- TODO: GnuTLS connects are now non-blocking
-
- Since commit c288860 by Jerome Vouillon
-
-- INTERNALS: tftp is decent now, ldap is not
-
- It's not quite fair to list TFTP is a "crappy" member of the
- libcurl family so I removed its mentioning.
-
-- changelog: mention Ben Greear's telnet work
-
-- [Ben Greear brought this change]
-
- telnet: Allow programatic use of telnet.
-
- The main change is to allow input from user-specified methods,
- when they are specified with CURLOPT_READFUNCTION.
- All calls to fflush(stdout) in telnet.c were removed, which makes
- using 'curl telnet://foo.com' painful since prompts and other data
- are not always returned to the user promptly. Use
- 'curl --no-buffer telnet://foo.com' instead. In general,
- the user should have their CURLOPT_WRITEFUNCTION do a fflush
- for interactive use.
-
- Also fix assumption that reading from stdin never returns < 0.
- Old code could crash in that case.
-
- Call progress functions in telnet main loop.
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- test: enable valgrind for 604, seems to work
-
-Kamil Dudka (28 Apr 2010)
-- [Paul Howarth brought this change]
-
- add 1s post-command delay to tests 513 and 514
-
- addressing http://curl.haxx.se/mail/lib-2009-12/0031.html
-
-Daniel Stenberg (26 Apr 2010)
-- [Kalle Vahlman brought this change]
-
- Allow tools to be defined with full path in buildconf
-
- This is required in Scratchbox where
- LIBTOOL=/targets/links/arch_tools/bin/libtool
- is set in the environment.
-
-- progress callback: can be called more than once per sec
-
-- SSH: init and cleanup libssh2 in global_init/cleanup
-
- The necessary libssh2 functions require libssh2 1.2.5 or later.
-
-- new configure option --enable-threaded-resolver
-
-- configure: check for libssh2_init and libssh2_exit
-
-Kamil Dudka (24 Apr 2010)
-- nss: fix SSL handshake timeout underflow
-
-Guenter Knauf (24 Apr 2010)
-- encourage users to take latest lib dependencies.
-
-Daniel Stenberg (24 Apr 2010)
-- socks5: please static code analyzer
-
- Make sure we don't call memcpy() if the argument is NULL even
- though we also passed a zero length then, as the clang analyzer
- whined and we want to limit warnings (even false positives) when
- they're this easy to fix.
-
- The change of (char) to (unsigned char) will fix long user names
- and passwords on systems that have the char type signed by
- default.
-
-- gzip: Value stored to 'data' is never read
-
-- RELEASE-NOTES: update top numbers
-
-- changelog: added the --proto and -proto-redir options
-
-- [Alex Bligh brought this change]
-
- curl: added --proto and --proto-redir
-
- --proto tells curl to use the listed protocols for its initial
- retrieval
-
- --proto-redir tells curl to use the listed protocols after a
- redirect
-
-Kamil Dudka (24 Apr 2010)
-- test536: do not fail with threaded DNS resolver
-
- Also tweaked comments in certain examples using curl_multi_fdset().
-
-Daniel Stenberg (21 Apr 2010)
-- curl: -O crash on windows
-
- The -O option caused curl to crash on windows and DOS due to the
- tool writing out of boundary memory.
-
-Yang Tse (20 Apr 2010)
-- hmac.c related compilation adjustment
-
-- hmac.c related compilation adjustment
-
-monnerat (20 Apr 2010)
-- Add compilation directives for hmac in Watcom,riscos and vc6 platform-specific makefiles.
-
-Yang Tse (20 Apr 2010)
-- [Ruslan Gazizov brought this change]
-
- replaced wsock32.lib usage with ws2_32.lib in MSVC makefiles
-
-monnerat (19 Apr 2010)
-- Merge branch 'master' of github.com:bagder/curl
-
-- Remove null-effect leftover code.
-
-Daniel Stenberg (19 Apr 2010)
-- changelog: -J/--remote-header-name strips CRLF
-
-- parse_filename: strip trailing CRs and LFs
-
- The feature that uses the file name given in a
- Content-disposition: header didn't properly skip trailing
- carriage returns and linefeed characters from the end of the file
- name when it was given without quotes.
-
-- Curl_HMAC_MD5: fix the array init to not warn with picky compilers
-
-monnerat (19 Apr 2010)
-- Fix GnuTLS compilation problem in md5.c
-
-- Fix compilation problem: declare Curl_HMAC_MD5 as extern in include file.
-
-- Merge branch 'master' of github.com:bagder/curl
-
-- Implement SMTP authentication
-
-Daniel Stenberg (17 Apr 2010)
-- parseconfig: Value stored to 'line' is never read
-
- Make the function call with (void) as we don't care about the
- return code.
-
-- parsedate: Value stored to 'found' is never read
-
-- check_gzip_header: Value stored to 'data' is never read
-
-- dprintf_formatf: Value stored to 'left' is never read
-
-- curl_version: remove superfluous assignments
-
-- FTP PORT: Value stored to 'rc' is never read
-
-- Curl_setup_transfer: no longer returns anything
-
- This function could only return CURLE_OK and by changing it to
- a void instead, we can simplify code all over.
-
-- PASV response: Value stored to 'rc' is never read
-
-- Curl_perform: Value stored to 'res2' is never read
-
-- sftp range: remove unnecessary check for NULL pointer
-
-- ftp_range: remove unnecessary check for NULL pointer
-
-- file_range: remove unnecessary check for NULL pointer
-
-- SOCKS4: Value stored to 'rc' is never read
-
-- FTP PASV: Value stored to 'rc' is never read
-
-- ftp_range: Value stored to 'totalsize' is never read
-
- Simplified the code by removing a local variable completely.
-
-- SOCKS5: when name resolves fail return immediately
-
- This makes the code flow more obvious and reacts on the return
- code properly, even if the code acted the same way before.
-
-- POP3: when USER command fails, don't even try PASS
-
-- tftp_rx: Value stored to 'sbytes' is never read
-
-- file_range: Value stored to 'totalsize' is never read
-
-- changelog: GnuTLS: SSL handshake phase is non-blocking
-
-- [Jerome Vouillon brought this change]
-
- GnuTLS: make the connection phase non-blocking
-
- When multi interface is used, the SSL handshake is no longer
- blocking when GnuTLS is used.
-
-- krb5_auth: fix my previous change to compile
-
-unknown (16 Apr 2010)
-- OS400 version V5R2M0 not supported anymore by IBM: default target release changed to V5R3M0.
-
-Daniel Stenberg (16 Apr 2010)
-- changelog: GnuTLS fix, no reverse loopkups and fixed GSS detection
-
-- SSL_RECV: EOF is not an error here
-
- The recent overhaul of the SSL recv function made this treat a
- zero returned from gnutls_record_recv() as an error, and this
- caused our HTTPS test cases to fail. We leave it to upper layer
- code to detect if an EOF is a problem or not.
-
-- [Paul Howarth brought this change]
-
- configure: GSSAPI detection on ancient Linux distros
-
- On some ancient distributions such as RHEL-3, <gssapi/gssapi_krb5.h> needs
- to be processed after <gssapi/gssapi.h>, but does not include it itself.
- This patch checks for <gssapi/gssapi.h> first and then includes it
- in the test for <gssapi/gssapi_krb5.h>, resolving the problem.
-
- Without the patch, <gssapi/gssapi_krb5.h> is "present but cannot be
- compiled".
-
-- resolvers: no more using AI_CANONNAME
-
- No resolver anymore needs to use AI_CANONNAME and do reverse
- lookups. We should work hard to avoid having code that relies on
- it.
-
-- KRB5: use given host name instead of reverse lookup'ed name
-
- This code would previously use dns_entry->addr->ai_canonname
- instead of the given host name, which caused us grief and
- problems since not all our resolver options do the reverse lookup
- and I would also guess that it caused problems with KRB5/GSS with
- virtual name-based hosts. Now the host name from the URL is used.
-
-Dan Fandrich (15 Apr 2010)
-- Remove redundant conditional
-
-- Eliminated an unlikely race condition in some tests.
-
- Based on a patch from the FreeBSD ports by Peter Pentchev.
-
-Daniel Stenberg (15 Apr 2010)
-- changelog: prevent needless reverse name lookups
-
-- Curl_ipv4_resolve_r: only set AI_CANONNAME when needed
-
- As reported in bug report #2987196, the code for ipv6 already did
- the setting of this bit correctly so we copied that logic into
- the Curl_ipv4_resolve_r() function as well. KRB code is the only
- code we know that might need the cannonical name so only resolve
- it for such requests!
-
-- IGNORE: files generated by maketgz
-
-- bumped to start the journey towards 7.20.2
-
-- added contributors from the 7.20.1 RELEASE-NOTES
-
-- ignore files generated by 'maketgz'
-
-Version 7.20.1 (14 Apr 2010)
-
-Daniel Stenberg (14 Apr 2010)
-- 7.20.1: 14 April 2010
-
-Guenter Knauf (13 Apr 2010)
-- Use correct directory for c-ares git pull
- Signed-off-by: Tor Arntsen <tor@spacetec.no>
-
-Yang Tse (13 Apr 2010)
-- fix compiler warning: variable might be clobbered by longjmp or vfork
-
-Guenter Knauf (13 Apr 2010)
-- added last git commit output for c-ares too.
-
-- changed the git update block to take care of c-ares repo if detected.
-
-- updated timestamp of the script.
-
-- removed obsolete var in gitpull() function
- no need to create a var - lets just return the status var itself.
-
-- added a cast to silent compiler warning with 64bit systems.
-
-- fixed a path typo in src/Makefile.netware.
-
-Daniel Stenberg (12 Apr 2010)
-- Added text for How To Make a Patch with git
-
-- update the section on timeouts
-
- The section that describes how to work with timeouts was
- misleading and could easily trick users to use the wrong API.
-
-- update URL and cut out wrong info on ipv6
-
- c-ares has had its own URL for a while and we should point
- people to that. It also works with IPv6 since a long time.
-
-- refer to CURLMOPT_TIMERFUNCTION for multi_socket users
-
- curl_multi_timeout(3) is simply the wrong function to use
- if you're using the multi_socket API and this document now
- states this pretty clearly to help guiding users.
-
-- s/CVS/git
-
-- modified to use the git file, not cvs
-
- I've done this blindly, and the last piece that works with ares
- should possibly be done differently now that c-ares isn't a
- subtree within the curl tree anymore...
-
-- mention missing test servers for <server>
-
-- FTP quote commands prefixed with '*' now can fail without aborting
-
- Prefixing the FTP quote commands with an asterisk really only
- worked for the postquote actions. This is now fixed and test case
- 227 has been extended to verify.
-
-Kamil Dudka (7 Apr 2010)
-- qssl: reflect recent code changes in SSL interface
-
- Reported by Guenter Knauf.
-
-- nss: handle client certificate related errors
-
-- [Ben Greear brought this change]
-
- ssl: Fix build when SSL isn't enabled
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- refactorize interface of Curl_ssl_recv/Curl_ssl_send
-
-- simplify code of Curl_resolv_timeout()
-
-- eliminate a race condition in Curl_resolv_timeout()
-
-Daniel Stenberg (2 Apr 2010)
-- [Ben Greear brought this change]
-
- fixed compiler warnings
-
-- updated contributor count
-
-- add contributors from the 7.20.0 release notes
-
-- fix SFTP download hang
-
- Matt Wixson found and fixed a bug in the SCP/SFTP area where the
- code treated a 0 return code from libssh2 to be the same as
- EAGAIN while in reality it isn't. The problem caused a hang in
- SFTP transfers from a MessageWay server.
-
-Dan Fandrich (31 Mar 2010)
-- Fixed misleading test message
-
-Daniel Stenberg (31 Mar 2010)
-- update the generic copyright year range
-
-- removed README.cmake due to the improved situation
-
-Guenter Knauf (31 Mar 2010)
-- fix compiler warning with a cast.
-
-- make folks use latest available dependent libraries.
-
-Dan Fandrich (30 Mar 2010)
-- Call curl_global_cleanup() in test 560 to avoid a memory leak
-
-- Allow test 538 to run even when proxy support is disabled
-
-Daniel Stenberg (29 Mar 2010)
-- use (s)size_t for string lengths to fix compiler warns
-
-- use size_t to hold string length
-
- using int is not fine on 64bit systems
-
-- [Ben Greear brought this change]
-
- Fix compile warnings in ssh.c
-
- strlen() returns size_t, but ssh libraries are wanting 'unsigned int'. Add
- explicit casts and use _ex versions of the ssh library calls.
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- [Ben Greear brought this change]
-
- fix smtp compile warning
-
- Use ssize_t instead of int for the Curl_smtp_escape_eob nread
- argument.
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- Ben's POP3 change
-
-- [Ben Greear brought this change]
-
- pop3: Get message listing if no mailbox in URL
-
- If you pass a URL to pop3 that does not contain a message ID as
- part of the URL, it will currently ask for 'INBOX' which just
- causes the pop3 server to return an error.
-
- The change makes libcurl treat en empty message ID as a request
- for LIST (list of pop3 message IDs). User's code could then
- parse this and download individual messages as desired.
-
-- [Ben Greear brought this change]
-
- Allow running ./tests/testcurl.pl from within git repo.
-
- My first instinct was to run the test script within the checked out
- repository. This small change to the script allows that to work as
- expected.
-
- Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- minor language fix
-
-- [Ben Greear brought this change]
-
- allow user+password in the URL for all protocols
-
- Ben Greear brought a patch that from now on allows all protocols
- to specify name and user within the URL, in the same manner HTTP
- and FTP have been allowed to in the past - although far from all
- of the libcurl supported protocols actually have that feature in
- their URL definition spec.
-
-- ignore pid files and stunnel.conf
-
- all used while running tests
-
-- make sure git pull is actually done!
-
-- changelogged: smoother rate limiting
-
-- [Ben Greear brought this change]
-
- Make rate-limitation logic smoother
-
- This gives a smoother rate limitation performance by using
- sub-second pauses and also taking the buffer sizes into
- account.
-
-- remove all .cvsignore files
-
-- PROT_CLOSEACTION should not include TFTP
-
- TFTP is not a protocol that uses close actions so it should
- not be set in that bitmask!
-
-- [Tor Arntsen brought this change]
-
- Avoid double newline for the 'last commits' log in testcurl.pl
-
- The backtick command which extracts 'git log' lines come with a
- newline, so chomp the newline before calling logit(), as the logit
- function adds a newline by itself.
-
-- [Tor Arntsen brought this change]
-
- Change to version-independent git option for 'git log --oneline'
-
- 'git log --oneline' is a relatively recent Git function. It is
- documented to be the same as 'git log --pretty=oneline --abbrev-commit',
- so use that instead. It works all the way back to Git 1.5.0.
-
-- show 5 commits even if no git pull was made
-
-- don't touch ares/aclocal.m4 and show recent git commits
-
- since c-ares no longer embedded, we must not touch such files
- anymore
-
- we show the 5 last git commits if git was proven in use, to help
- us see exactly what's being tested
-
-- use CURL_SIZEOF_LONG instead of SIZEOF_LONG
-
- That's the symbol we have or generate in include/curl/curlbuild.h
-
-- s/CVS/DEV in the version string from the git repo
-
-Bill Hoffman (24 Mar 2010)
-- Merge branch 'master' of github.com:bagder/curl
-
-- Add .gitattributes files to turn off CRLF translation for some files
-
-Daniel Stenberg (24 Mar 2010)
-- provide a version number as today's date
-
- It should at least help visualize which autobuilds that are
- using this script.
-
-- testcurl now uses git instead of CVS
-
-Bill Hoffman (24 Mar 2010)
-- Merge branch 'master' of github.com:bagder/curl
-
-- Enable LDAP by default since it is now disabled when ldap.h is not found,
-
-- CMake fixes for Linux.
-
- Make sure <sys/socket.h> is included if around when testing/using
- socklen_t. Also, disable LDAP if LDAP_H is not found on the system.
-
-Daniel Stenberg (24 Mar 2010)
-- [Bob Richmond brought this change]
-
- fix: timeout after last data chunk was handled
-
- Bob Richmond: There's an annoying situation where libcurl will
- read new HTTP response data from a socket, then check if it's a
- timeout if one is set. If the last packet received constitutes
- the end of the response body, libcurl still treats it as a
- timeout condition and reports a message like:
-
- "Operation timed out after 3000 milliseconds with 876 out of 876
- bytes received"
-
- It should only a timeout if the timer lapsed and we DIDN'T
- receive the end of the response body yet.
-
-- avoid compiler warning without USE_ALARM_TIMEOUT
-
-Bill Hoffman (24 Mar 2010)
-- Fix curl CMake build.
-
- This commit fixes the cmake build of curl, and cleans up the
- cmake code a little. It removes some commented out code and
- some trailing whitespace. To get curl to build the binary
- tree include/curl directory needed to be added to the include
- path. Also, SIZEOF_SHORT needed to be added. A check for the
- lack of defines of SIZEOF_* for warnless.c was added.
-
-Daniel Stenberg (24 Mar 2010)
-- [Chris Conroy brought this change]
-
- remove debug printfs
-
-- RTSP GET_PARAMETER fix
-
- Christopher Conroy fixed a problem with RTSP and GET_PARAMETER
- reported to us by Massimo Callegari. There's a new test case 572
- that verifies this now.
-
-- remove trace of CVS
-
-- [Chris Conroy brought this change]
-
- Fix RTSP GET_PARAMETER empty and non-empty operation.
-
- Test coverage included. Thanks to Massimo Callegari for the bug report
-
-- s/CVS/DEV/ in the version string for repo versions
-
-- scrapped all left-over TODOs
-
- In order to get back on track, I've removed all the plans for
- stuff I had in the queue. I will instead focus on fixing bugs and
- relying on that people who truly want things added will come back
- on the mailing list and nag and provide patches.
-
- 7.20.1 should be possible to release in April 2010
-
-- restore executable bits on some files
-
-- remove the CVSish $Id$ lines
-
-- The 'ares' subtree has been removed from the source repository
-
-- s/CVS/git
-
-- update to current state
-
-- remove the ares subtree
-
- c-ares is now hosted entirely separate from the curl project
- see http://c-ares.haxx.se/ for all details concerning c-ares,
- its source repository and more.
-
-- mark connection as connected
-
- Kenny To filed the bug report #2963679 with patch to fix a
- problem he experienced with doing multi interface HTTP POST over
- a proxy using PROXYTUNNEL. He found a case where it would connect
- fine but bits.tcpconnect was not set correct so libcurl didn't
- work properly.
-
- (http://curl.haxx.se/bug/view.cgi?id=2963679)
-
-- enabled valgrind
-
- I ran it now successfully and it helped to pinpoint a libssh2
- memory leak!
-
-Dan Fandrich (23 Mar 2010)
-- Updated Symbian notes
-
-Daniel Stenberg (23 Mar 2010)
-- chunked-encoding with Content-Length: header problem
-
- Akos Pasztory filed debian bug report #572276
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572276
- mentioning a problem with a resource that returns chunked-encoded
- _and_ with a Content-Length and libcurl failed to properly ignore
- the latter information.
-
-- delayed easy handle kill caused double Curl_close() call
-
- Hauke Duden provided an example program that made the multi
- interface crash. His example simply used the multi interface and
- did first one FTP transfer and after completion it used a second
- easy handle and did another FTP transfer on the same FTP server.
-
- This triggered a bug in the "delayed easy handle kill" system
- that curl uses: when an FTP connection is left alive it must keep
- an easy handle around internally - only for the purpose of having
- an easy handle when it later disconnects it. The code assumed
- that when the easy handle was removed and an internal reference
- was made, that version could be killed later on when a new easy
- handle came using the same connection. This was wrong as Hauke's
- example showed that the removed handle wasn't killed for real
- until later. This caused a double close attempt => segfault.
-
-- ignore more files generated when tests run in the source tree
-
-- Thomas Lopatic fixed the alarm()-based DNS timeout
-
-- [Thomas Lopatic brought this change]
-
- fix the alarm()-based DNS timeout
-
- Looking at the code of Curl_resolv_timeout() in hostip.c, I think
- that in case of a timeout, the signal handler for SIGALRM never
- gets removed. I think that in my case it gets executed at some
- point later on when execution has long left Curl_resolv_timeout()
- or even the cURL library.
-
- The code that is jumped to with siglongjmp() simply sets the
- error message to "name lookup timed out" and then returns with
- CURLRESOLV_ERROR. I guess that instead of simply returning
- without cleaning up, the code should have a goto that jumps to
- the spot right after the call to Curl_resolv().
-
-- [Daniel Johnson brought this change]
-
- Fix warnings for clang
-
-- Merge branch 'master' of github.com:bagder/curl
-
-Kamil Dudka (22 Mar 2010)
-- [douglas steinwand brought this change]
-
- Fix insufficient initialization in Curl_clone_ssl_config()
-
- which could have caused a double free when reusing curl handle.
-
-Daniel Stenberg (22 Mar 2010)
-- we never used this file anyway
-
-- s/CVS/git
-
-- various changes of CVS to git
-
-- remove references to CVS in the code and use DEV instead
-
-- Ben Greear's two fixes explained
-
-- [Ben Greear brought this change]
-
- Fix tftp return codes and tsize upload handling
-
- Error codes were not properly returned to the main curl code (and on to apps
- using libcurl).
-
- tftp was crapping out when tsize == 0 on upload, but I see no reason to fail
- to upload just because the remote file is zero-length. Ignore tsize option on
- upload.
-
-- more files to ignore
-
-- provide an initial set of .gitignore files
-
-Kamil Dudka (19 Mar 2010)
-- - Improved Curl_read() to not ignore the error returned from Curl_ssl_recv().
-
-Daniel Stenberg (18 Mar 2010)
-- fix warning about conversions between curl_off_t and long
-
-Yang Tse (18 Mar 2010)
-- another shot at the ftp_init() icc 9.1 optimizer issue
-
-- replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing
-
-- update outdated serial number
-
-Dan Fandrich (16 Mar 2010)
-- Factored out some code into a few independent functions
-
-Daniel Stenberg (15 Mar 2010)
-- - Constantine Sapuntzakis brought a patch:
-
- The problem mentioned on Dec 10 2009
- (http://curl.haxx.se/bug/view.cgi?id=2905220) was only partially fixed.
- Partially because an easy handle can be associated with many connections in
- the cache (e.g. if there is a redirect during the lifetime of the easy
- handle). The previous patch only cleaned up the first one. The new fix now
- removes the easy handle from all connections, not just the first one.
-
-Yang Tse (11 Mar 2010)
-- fix compiler warning
-
-Dan Fandrich (11 Mar 2010)
-- SSL should now be working out-of-the-box on Symbian S60.
-
-- Enable Symbian zlib support by default.
-
-- Allow compilation even when OpenSSL has been configured without MD4 support.
-
-- A few Symbian build changes
-
-Yang Tse (9 Mar 2010)
-- watt32 compilation fix
-
-Daniel Stenberg (6 Mar 2010)
-- - Ben Greear brought a patch that fixed the rate limiting logic for TFTP when
- the easy interface was used.
-
-- indent fix by Ben Greear, I removed some braces for single-line conditional
- expressions
-
-Yang Tse (6 Mar 2010)
-- Added another VS10 version string
-
-- fix line break
-
-- removed usage of 's6_addr', fixing compilation issue triggered with no
- longer using 'in6_addr' but only our 'ares_in6_addr' struct
-
-Daniel Stenberg (5 Mar 2010)
-- Daniel Johnson provided fixes for building with the clang compiler
-
-Yang Tse (5 Mar 2010)
-- Added IPv6 name servers support
-
-Gisle Vanem (5 Mar 2010)
-- Ops!. Readded ares_nowarn.h.
-
-- Added ares_nowarn.c.
-
-Yang Tse (5 Mar 2010)
-- Constantine Sapuntzakis detected and fixed a double free in builds done
- with threaded resolver enabled (Windows default configuration) that would
- get triggered when a curl handle is closed while doing DNS resolution.
-
-- Added SIZEOF_INT and SIZEOF_SHORT definitions for VMS configuration file
-
-Daniel Stenberg (4 Mar 2010)
-- Julien Chaffraix clarified CURLOPT_HEADERFUNCTION and made
- CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION more consistent
-
-- - [Daniel Johnson] I've been trying to build libcurl with clang on Darwin and
- ran into some issues with the GSSAPI tests in configure.ac. The tests first
- try to determine the include dirs and libs and set CPPFLAGS and LIBS
- accordingly. It then checks for the headers and finally sets LIBS a second
- time, causing the libs to be included twice. The first setting of LIBS seems
- redundant and should be left out, since the first part is otherwise just
- about finding headers.
-
- My second issue is that 'krb5-config --libs gssapi' on Darwin is less than
- useless and returns junk that, while it happens to work with gcc, causes
- clang to choke. For example, --libs returns $CFLAGS along with the libs,
- which is really retarded. Simply setting 'LIBS="$LIBS -lgssapi_krb5
- -lresolv"' on Darwin is sufficient.
-
-- - Based on patch provided by Jacob Moshenko, the transfer logic now properly
- makes sure that when using sub-second timeouts, there's no final bad 1000ms
- wait. Previously, a sub-second timeout would often make the elapsed time end
- up the time rounded up to the nearest second (e.g. 1s for 200ms timeout)
-
-- update the generic copyright year range to include 2010
-
-- - Andrei Benea filed bug report #2956698 and pointed out that the
- CURLOPT_CERTINFO feature leaked memory due to a missing OpenSSL function
- call. He provided the patch to fix it too.
-
- http://curl.haxx.se/bug/view.cgi?id=2956698
-
-- - Markus Duft pointed out in bug #2961796 that even though Interix has a
- poll() function it doesn't quite work the way we want it so we must disable
- it, and he also provided a patch for it.
-
- http://curl.haxx.se/bug/view.cgi?id=2961796
-
-- - Made the pingpong timeout code properly deal with the response timeout AND
- the global timeout if set. Also, as was reported in the bug report #2956437
- by Ryan Chan, the time stamp to use as basis for the per command timeout was
- not set properly in the DONE phase for FTP (and not for SMTP) so I fixed
- that just now. This was a regression compared to 7.19.7 due to the
- conversion of FTP code over to the generic pingpong concepts.
-
- http://curl.haxx.se/bug/view.cgi?id=2956437
-
-- remove assignment never used
-
-- - Ben Greear provided an update for TFTP that fixes upload.
-
-- SSL, not SSH, SSL
-
-- - Wesley Miaw reported bug #2958179 which identified a case of looping during
- OpenSSL based SSL handshaking even though the multi interface was used and
- there was no good reason for it.
-
- http://curl.haxx.se/bug/view.cgi?id=2958179
-
-Yang Tse (28 Feb 2010)
-- Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems
-
-- Added ares_nowarn.* to VC6 project file
-
-Daniel Stenberg (26 Feb 2010)
-- spellchecked by Stéphane Fillod
-
-- - Pat Ray in bug #2958474 pointed out an off-by-one case when receiving a
- chunked-encoding trailer.
-
- http://curl.haxx.se/bug/view.cgi?id=2958474
-
-Dan Fandrich (26 Feb 2010)
-- Fixed a couple of out of memory leaks and a segfault in the IMAP code.
-
-Yang Tse (26 Feb 2010)
-- fix sizeof short
-
-- Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems
-
-- Added SIZEOF_INT definition
-
-- fix compiler warning
-
-- fix compiler warning
-
-- fix compiler warning
-
-Dan Fandrich (25 Feb 2010)
-- Fixed a couple of out of memory leaks and a segfault in the SMTP code.
-
-Yang Tse (25 Feb 2010)
-- fix file name
-
-- Fixed bug report #2958074 indicating
- (http://curl.haxx.se/bug/view.cgi?id=2958074) that curl on Windows with
- option --trace-time did not use local time when timestamping trace lines.
- This could also happen on other systems depending on time souurce.
-
-- enable 802 and 803
-
-- fix compiler warning
-
-- fix compiler warning
-
-- fix compiler warning
-
-- fix socket data type
-
-- fix socket data type and logging format in debug tracking socket functions
-
-- convert Curl_ultous() and Curl_ultouc() functions to curlx_ultous() and
- curlx_ultouc(), exposing them through curlx.h to allow proper code reuse
- later in our test harness.
-
-- updated sources
-
-Patrick Monnerat (22 Feb 2010)
-- _ Adjusted RFC821 HELO fallback and enabled test804
-
-- - Proper handling of STARTTLS on SMTP, taking CURLUSESSL_TRY into account.
- - SMTP falls back to RFC821 HELO when EHLO fails (and SSL is not required).
- - Use of true local host name (i.e.: via gethostname()) when available, as default argument to SMTP HELO/EHLO.
- - Test case 804 for HELO fallback.
-
-Yang Tse (22 Feb 2010)
-- add header inclusion
-
-- fix compiler warning
-
-- fix compiler warning
-
-Daniel Stenberg (21 Feb 2010)
-- clarify more details on section "2.1 More non-blocking"
-
-- TFTP transfers are not blocking since 7.20.0
-
-- - Fixed the SMTP compliance by making sure RCPT TO addresses are specified
- properly in angle brackets. Recipients provided with CURLOPT_MAIL_RCPT now
- get angle bracket wrapping automatically by libcurl unless the recipient
- starts with an angle bracket as then the app is assumed to deal with that
- properly on its own.
-
-- - I made the SMTP code expect a 250 response back from the server after the
- full DATA has been sent, and I modified the test SMTP server to also send
- that response. As usual, the DONE operation that is made after a completed
- transfer is still not doable in a non-blocking way so this waiting for 250
- is unfortunately made blockingly.
-
-- corected a comment and wrapped a few longish lines
-
-Yang Tse (20 Feb 2010)
-- fix compiler warning
-
-- fix compiler warning
-
-- fix compiler warning
-
-- fix compiler warning
-
-- fix compiler warning
-
-Daniel Stenberg (17 Feb 2010)
-- ares_reinit()
-
- - To allow an app to force a re-read of /etc/resolv.conf etc, pretty much
- like the res_init() resolver function offers
-
-- use curl standard indentation and line lengths
-
-Yang Tse (16 Feb 2010)
-- replaced tabs with spaces
-
-- fix Content-Length validation
-
-Daniel Stenberg (15 Feb 2010)
-- use (void) in front of fwrite() calls that ignore the return code
-
-Yang Tse (15 Feb 2010)
-- fix compiler warning: conversion from "long" to "size_t" may lose sign
-
-- fix compiler warning: conversion from "long" to "size_t" may lose sign
-
-Daniel Stenberg (15 Feb 2010)
-- -w speed_download and speed_upload are measured in bytes per second
-
-- 75. NTLM authentication involving unicode user name or password.
- http://curl.haxx.se/mail/lib-2009-10/0024.html
- http://curl.haxx.se/bug/view.cgi?id=2944325
-
-Yang Tse (14 Feb 2010)
-- removed trailing whitespace
-
-- fix compiler warning
-
-- Overhauled test suite getpart() function. Fixing potential out of bounds
- stack and memory overwrites triggered with huge test case definitions.
-
-Daniel Stenberg (13 Feb 2010)
-- - Martin Hager reported and fixed a problem with a missing quote in libcurl.m4
-
- (http://curl.haxx.se/bug/view.cgi?id=2951319)
-
-Gunter Knauf (13 Feb 2010)
-- used allways #ifdef / #ifndef;
- moved gethostbyname_thread() to #else case to avoid 'not used' compiler warning.
-
-- replaced tabs by spaces, removed trailing tabs/spaces.
-
-Daniel Stenberg (13 Feb 2010)
-- - Tom Donovan fixed the CURL_FORMAT_* defines when building with cmake.
-
-- - Jack Zhang reported a problem with SMTP: we wrongly used multiple addresses
- in the same RCPT TO line, when they should be sent in separate single
- commands. I updated test case 802 to verify this.
-
- - I also fixed a bad use of my_setopt_str() of CURLOPT_MAIL_RCPT in the curl
- tool which made it try to output it as string for the --libcurl feature
- which could lead to crashes.
-
-- CURLOPT_MAIL_RCPT is *not* a string so we must not try to printf() it
-
-- free --mail-from strings properly
-
-Patrick Monnerat (11 Feb 2010)
-- _ Make it compilable again on OS400.
- _ Upgrade OS400 EBCDIC wrappers for new options.
- _ Upgrade ILE/RPG bindings to current state.
-
-Yang Tse (11 Feb 2010)
-- mention last changes
-
-- Steven M. Schweda updated VMS readme file
-
-- Steven M. Schweda removed batch_compile.com and defines.com
-
-- Steven M. Schweda fixed:
-
- VMS builder bad behavior when used in a batch job.
-
- Various ".LIS" and ".MAP" files created without being requested
- by a "LIST" command-line option, and in the wrong place, too.
-
- Some minor typographical changes.
-
-Dan Fandrich (10 Feb 2010)
-- Mention the minimum size of CURL_MAX_WRITE_SIZE
-
-Yang Tse (10 Feb 2010)
-- - remove extra "\r\n" from doc404_RTSP
-
- - avoid memory alignment issue when setting RTSP packet length
-
-Dan Fandrich (9 Feb 2010)
-- Removed some erroneous "compressed" key words
-
-Daniel Stenberg (9 Feb 2010)
-- start working on 7.20.1
-
-Version 7.20.0 (9 Feb 2010)
-
-Daniel Stenberg (9 Feb 2010)
-- spell and 7.20.0
-
-- - When downloading compressed content over HTTP and the app as asked libcurl
- to automatically uncompress it with the CURLOPT_ENCODING option, libcurl
- could wrongly provide the callback with more data than what the maximum
- documented amount. An application could thus get tricked into badness if the
- maximum limit was trusted to be enforced by libcurl itself (as it is
- documented).
-
- This is further detailed and explained in the libcurl security advisory
- 20100209 at
-
- http://curl.haxx.se/docs/adv_20100209.html
-
-- set VERSIONINFO accordingly for the 7.20.0 release
-
-Yang Tse (6 Feb 2010)
-- warning fix
-
-- OOM handling fix
-
-- OOM handling fix
-
-- fix compiler warning
-
-- fix compiler warning
-
-- fix compiler warning
-
-- Addes OOM handling for curl_easy_setopt() calls in test
-
-- - avoid OpenSSL 0.9.8 ENGINE_by_id memory leak
-
- - cleanup parenthesis usage in return statements
-
-- - attempt to workaround icc 9.1 optimizer issue
-
-- fix printf-style format strings
-
-- Validate server port argument
-
-- Fix variable initialization
-
-- Modified test case 557 to additionally verify libcurl's internal curl_m*printf()
- functions formatting functionality when handling signed and unsigned shorts.
-
-- Added size check for 'short' data type
-
-- Fix compiler warning: unused variable
-
-- added an additional second to allow test to pass on heavily loaded servers
-
-Dan Fandrich (3 Feb 2010)
-- Changed the Watcom makefiles to make them easier to keep in sync with
- Makefile.inc since that can't be included directly.
-
-Daniel Stenberg (3 Feb 2010)
-- more symbols added in 7.20.0
-
-Yang Tse (3 Feb 2010)
-- Fix OOM handling
-
-- Fix progressmode Configurable struct member data type. Changed to
- 'int' which fits better with existing CURL_PROGRESS_* definitions.
-
-- Fix portability issue related with unaligned memory access
-
-- Fix compiler warnings: conversion from 'const int ' to 'unsigned char ', possible loss of data
-
-- cookies with same path length might get sorted in different order when
- using different qsort implementations. In order to make this test give
- same results on different systems, paths now have different lengths.
-
-- added an additional second to allow test to pass on heavily loaded servers
-
-- Fix compiler warning: conditional expression is constant
-
-- Fix compiler warning: local variable may be used without having been initialized.
-
-- Fix compiler warnings: conversion from 'const int ' to 'unsigned char ', possible loss of data
-
-- Fix compiler warnings:
-
- (1) conversion from 'const int ' to 'unsigned char ', possible loss of data
- (2) conditional expression is constant
-
-- mention a couple of changes back from November
-
-- mention run time statistics options
-
-- - Symbol CURL_FORMAT_OFF_T now obsoleted, will be removed in a future release,
- symbol will not be available when building with CURL_NO_OLDIES defined. Use
- of CURL_FORMAT_CURL_OFF_T is preferred since 7.19.0
-
-- avoid possibility of using obsoleted stuff
-
-- remove setup.h inclusion which is already done from test.h inclusion
-
-Kamil Dudka (2 Feb 2010)
-- mention SOCKS related problems in the curl(1) man page
-
-Yang Tse (2 Feb 2010)
-- Fix compiler warning: variable was set but never used
-
- Simplify preprocessor symbol checking
-
-Daniel Stenberg (2 Feb 2010)
-- Julien Chaffraix pointed out a comment mistake, and I re-indented the code
- slightly while editing
-
-Yang Tse (2 Feb 2010)
-- include headers
-
-- Conroy added a check to the coded message size since the docs stipulate
- that each call will contain a full protocol packet.
-
-- Conroy's fix to make the code match with the RTP documentation regarding
- writing out the whole header. The docs say it writes the whole header,
- but the code (before this patch) did not write out the leading $.
-
-Daniel Stenberg (1 Feb 2010)
-- We introduce a loop in lib/multi.c around all calls to multi_runsingle() and
- simply check for CURLM_CALL_MULTI_PERFORM internally. This has the added
- benefit that this goes in line with my long-term wishes to get rid of the
- CURLM_CALL_MULTI_PERFORM all together from the public API.
-
-Yang Tse (1 Feb 2010)
-- update rtsp server header field from SWS to RTSPD
-
-- Test suite support for RTSP
-
-- Make Curl_pop3_write() additionally truncate trailing POP3_EOB from received
- string buffer, otherwise Curl_client_write() call with zero size would write
- to the end of string buffer including matched POP3_EOB.
-
-- WIN32 fix, _beginthreadex() may return either 0 or -1L upon failure
-
-- fix errno usage for WIN32 builds
-
-- fix printf-style format strings
-
-- Chris Conroy fixed test #568 issues with carriage returns
-
-- RTSP followup fix. Both the pipelined and non-pipelined case need to
- check for (excess > 0 && !k->ignorebody).
-
-Daniel Stenberg (28 Jan 2010)
-- - Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't
- check for broken connections like ares_process() did. Based on that, I
- merged the two functions into a single generic one with two front-ends.
-
-Yang Tse (28 Jan 2010)
-- fix printf-style format strings
-
-- Use 'size_t' for GETNAMEINFO_TYPE_ARG2 definition for VMS.
-
- http://curl.haxx.se/mail/lib-2009-12/0293.html
-
-- portability fix
-
-- fix printf-style format strings
-
-- Known bug #64 fixed by Constantine Sapuntzakis and Joshua Kwan in 7.20.0
-
-- Chris Conroy provided first RTSP tests
-
-- RTSP tests disabled until test harness RTSP support is updated
-
-- Chris Conroy's RTSP followup fixes
-
-- mention asynchronous DNS lookups enhancements
-
-- Restore normal operation:
-
- c-ares is only enabled when specifically requested.
-
- Consequently, c-ares default setting is disabled.
-
-- fix c-ares assumed check being skipped
-
-- fix compiler warning
-
-- fix LDFLAGS preservation in CURL_CHECK_LIB_ARES
-
-Daniel Stenberg (26 Jan 2010)
-- no need to take precautiono for how things were before 7.16.0 since that
- is now a very long time ago
-
-- - Mike Crowe made libcurl return CURLE_COULDNT_RESOLVE_PROXY when it is the
- proxy that cannot be resolved when using c-ares. This matches the behaviour
- when not using c-ares.
-
-Dan Fandrich (26 Jan 2010)
-- Added curl_threads.c to a few more non-configure build files
-
-Yang Tse (26 Jan 2010)
-- minor fixes for --enable-ares configure option
-
-Daniel Stenberg (26 Jan 2010)
-- Andre Guibert de Bruet improved the libssh2 error code translation
-
-Yang Tse (26 Jan 2010)
-- resolver selection for non-configure Windows builds, default is threaded DNS
-
-- add curl_threads.c to non-configure target build files
-
-- onstantine Sapuntzakis threaded resolver enhancements
-
-- Constantine Sapuntzakis threaded resolver enhancements
-
-- Constantine Sapuntzakis provided initial thread abstraction layer
-
-- make Curl_handler_*_proxy definition static
-
-Dan Fandrich (25 Jan 2010)
-- Updated minimum library sizes
-
-Yang Tse (25 Jan 2010)
-- fix compiler warning
-
-Daniel Stenberg (24 Jan 2010)
-- Julien Chaffraix corrected bad #elif lines to silence warnings
-
-Yang Tse (24 Jan 2010)
-- HAVE_GETADDRINFO_THREADSAFE definition for non-configure win32 builds
-
-Bjorn Stenberg (23 Jan 2010)
-- Mention -J change
-
-- Added -J/--remote-header-name.
-
-Daniel Stenberg (23 Jan 2010)
-- "remove progress meter from libcurl" at next API break
-
-Yang Tse (23 Jan 2010)
-- add inclusion of curl_memory.h
-
-- adjust preprocessor symbol definition check relative to resolver specialty
-
-- PKTSIZE might have been already defined in arpa/tftp.h
-
-Dan Fandrich (23 Jan 2010)
-- Include "curl_memory.h" to get the strdup replacement when necessary
-
-Daniel Stenberg (22 Jan 2010)
-- wrap long lines and do some indent policing
-
-Yang Tse (22 Jan 2010)
-- Definitions of resolver specialty compile-time defines CURLRES_* moved
- from hostip.h to setup.h in order to allow proper inclusion in any file.
-
- This represents no functional change at all in which resolver is used,
- everything still works as usual, internally and externally there is no
- difference in behavior.
-
-- adjust rtsp protocol support in curl-config and libcurl.pc when http is disabled
-
-- deal with the possibility that CURL_DISABLE_RTSP may already be defined
-
-- fix compiler warning: statement is unreachable
-
-- fix compilation when http is disabled
-
-- disabling of rtsp when http isn't enabled required here for non-configure systems
-
-Daniel Stenberg (22 Jan 2010)
-- wrap long lines, remove (very old) attribution from code
-
-- cleanups by Julien Chaffraix
-
-- alphabetically sort the list of supported protocols
-
-- In spite claiming to tbe disabled by default, RTSP is enabled and it now
- also says so. I also made the list of protocols get sorted.
-
-- expanded to provide info about the newer protocols too
-
-- s/RTPFUNCTION/INTERLEAVEFUNCTION/
- s/RTPDATA/INTERLEAVEDATA/
-
-- keep lines shorter than 80 columns, and reduce/remove the use of the word
- 'note' in most description as it is mostly useless.
-
-Yang Tse (22 Jan 2010)
-- Julien Chaffraix adjusted "<name> section" line length
-
-- Constantine Sapuntzakis refactoring of async callbacks, allowing
- removal of Curl_addrinfo_copy(), Curl_addrinfo6_callback(), and
- Curl_addrinfo4_callback()
-
-Dan Fandrich (21 Jan 2010)
-- Added rtsp.c to the non-configure target build files
-
-Yang Tse (21 Jan 2010)
-- fix compiler warning
-
-- make tftp_translate_code() static, it is only used from within tftp.c
-
-- fix warning triggered when debugging on cygwin
-
-- allow exporting of exe_ext() sub
-
-- improve displaylogcontent() sub fixing a warning
-
-Daniel Stenberg (21 Jan 2010)
-- remove typedef we ended up not using
-
-- Chris Conroy brought support for RTSP transfers, and with it comes 8(!) new
- libcurl options for controlling what to get and how to receive posssibly
- interleaved RTP data. Initial commit.
-
-- Julien Chaffraix fixed line lengths
-
-- Julien Chaffraix removed an old obsolete typedef
-
-- Yun Fu pointed out a flaw in the loop that checks handles, and I indented
- the code more curl-style
-
-- "5.3 Sort outgoing cookies" removed, we now sort them
-
-Yang Tse (20 Jan 2010)
-- SIGTERM is the signal to trap here, SIGKILL can't be caught.
-
-- Use killsockfilters() to kill sockfilter processes, this ensures that when
- killing a sockfilter process the actual PID from the pid file is used and
- not the one returned by open2() which might be different.
-
-- Allow killsockfilters() to take a 5th optional parameter that when provided
- indicates that only one of the two possible sockfilter processes should be
- killed. Valid values for this parameter are 'main' and 'data'.
-
-- Use delete() to unset environment variables instead of assigning undef which
- generates warning 'Use of uninitialized value in scalar assignment' with perl
- versions older than 5.10
-
-- Adjust valgrind logs file name detection.
-
- Adjust environment vars setting and restoring from test definition.
-
- Avoid using strftime in torture sub.
-
-Daniel Stenberg (20 Jan 2010)
-- modified test case 8 to also make sure that we deal with cookies using
- identical names but different paths properly
-
-- - As was pointed out on the http-state mailing list, the order of cookies in a
- HTTP Cookie: header _needs_ to be sorted on the path length in the cases
- where two cookies using the same name are set more than once using
- (overlapping) paths. Realizing this, identically named cookies must be
- sorted correctly. But detecting only identically named cookies and take care
- of them individually is harder than just to blindly and unconditionally sort
- all cookies based on their path lengths. All major browsers also already do
- this, so this makes our behavior one step closer to them in the cookie area.
-
- Test case 8 was the only one that broke due to this change and I updated it
- accordingly.
-
-- oops, I forgot to cvs add this before my previous commit (Dan Fandrich
- pointed it out to me)
-
-- - David McCreedy brought a fix and a new test case (129) to make libcurl work
- again when downloading files over FTP using ASCII and it turns out that the
- final size of the file is not the same as the initial size the server
- reported. This is very common since servers don't take the newline
- conversions into account.
-
-- "260 - IMAP, POP3 and SMTP support" done!
-
-- avoid "Use of uninitialized value $l in concatenation"
-
-Yang Tse (19 Jan 2010)
-- Fail harder when curl coredumps trying to verify http and ftp servers.
-
- Add some debug messages to see what's going on with valgrind logs.
-
-- prevent %runcert hash growth when clearing items
-
-- update copyright year notice
-
-- Constantine Sapuntzakis enhancements to make memory tracking log file writing
- of messages atomic, on systems where an fwrite of a memory buffer is atomic.
-
-Dan Fandrich (18 Jan 2010)
-- Added PEM certificate keyword
-
-Yang Tse (18 Jan 2010)
-- fix warnings
-
-- Stop ssl running server when cert file currently used by server is
- different than the one specified in test definition for same server
-
-- fix warnings
-
-- - Remove QD restarting of https servers. Proper fixing required.
- This will make tests 310 311 and 312 fail while fixing.
-
- - Remove some debug messages
-
-- make verifyhttp use different file names depending on server characteristics
-
-- add serverfactors() sub which returns server characterization factors
-
-- fix warnings
-
-- fix warnings
-
-- fix warnings
-
-- add some debug messages
-
-- use servername_id() from serverhelp.pm
-
-- refactored stopping of test harness servers
-
-- Store now this file in CVS with unix line endings.
-
- maketgz already converts this file to DOS style with an awk filter.
-
-- Declaration of $sshdlog is done in sshhelp.pm
-
-- Start using the centralized pidfile and logfile name generation
- subroutines for ssh and socks test suite servers.
-
-Dan Fandrich (15 Jan 2010)
-- Added the new protocol source files to the non-autoconf build files
-
-Yang Tse (14 Jan 2010)
-- Squeeze slack time when killing more than one server from
- the <killserver> section of test harness definition files.
-
-Kamil Dudka (14 Jan 2010)
-- - Suppressed side effect of OpenSSL configure checks, which prevented NSS from
- being properly detected under certain circumstances. It had been caused by
- strange behavior of pkg-config when handling PKG_CONFIG_LIBDIR. pkg-config
- distinguishes among empty and non-existent environment variable in that case.
-
-Yang Tse (13 Jan 2010)
-- Give the test a bit mote time to run so it passes on slow machines
-
-Kamil Dudka (13 Jan 2010)
-- remove trailing spaces from configure.ac
-
-Yang Tse (12 Jan 2010)
-- Added test case #1112 which does an FTPS download with strict timeout
- and slow data transfer in a similar way as test case #1086 does for FTP.
-
- This also exercises <killserver> section for the FTPS server.
-
-- Make runtests.pl actually support any (valid) server specification
- for the <killserver> section of test harness definition files.
-
-- Fix tftp and sftp supported protocols in servername_str()
-
-- Make sockfilter kill messages look alike server ones
-
-- Adjust vor VPATH builds
-
-Daniel Stenberg (11 Jan 2010)
-- - Gil Weber reported a peculiar flaw with the multi interface when doing SFTP
- transfers: curl_multi_fdset() would return -1 and not set and file
- descriptors several times during a transfer of a single file. It turned out
- to be due to two different flaws now fixed. Gil's excellent recipe helped me
- nail this.
-
-- ssh_statemach_act() is now modified to loop over the switch() to perform as
- much as possible in one go, as long as it doesn't block and hasn't reached the
- end of the state machine.
- This avoids spurious -1 returns from curl_multi_fdset() simply because
- previously it would return from this function without anything in EWOUDLBLOCK
- and thus basically it wasn't actually waiting for anything!!
-
-- After the TCP connect is confirmed in CURLM_STATE_WAITCONNECT and it changes
- state, we return CURLM_CALL_MULTI_PERFORM unconditionally then so that we
- can act faster like in the case the protocol-specific connect doesn't block
- on anything and we can just persue on the next action immediately. It also
- then avoids a case where curl_multi_fdset() would return -1.
-
-- progress callback called repeatedly during slow connects
-
-- - Made sure that the progress callback is repeatedly called at a regular
- interval even during very slow connects.
-
-- - The tests/runtests.pl script now checks to see if the test case that runs is
- present in the tests/data/Makefile.am and outputs a notice message on the
- screen if not. Each test file has to be included in that Makefile.am to get
- included in release archives and forgetting to add files there is a common
- mistake. This is an attempt to make it harder to forget.
-
-Yang Tse (11 Jan 2010)
-- secureserver.pl is now the test harness script used for SSL/TLS.
-
-- secureserver.pl is now the test harness script used for SSL/TLS.
-
- Start using the centralized pidfile and logfile name generation
- subroutines for https and ftps test suite servers.
-
-- Update error message to include port number
-
-- Previous commit adjustments
-
-- Start using the centralized pidfile and logfile name generation
- subroutines for ftp, pop3, imap and smtp test suite servers.
-
-Daniel Stenberg (9 Jan 2010)
-- struct Curl_sh_entry's 'inuse' member was no longer used and is now removed
-
-- - Johan van Selst found and fixed a OpenSSL session ref count leak:
-
- ossl_connect_step3() increments an SSL session handle reference counter on
- each call. When sessions are re-used this reference counter may be
- incremented many times, but it will be decremented only once when done (by
- Curl_ossl_session_free()); and the internal OpenSSL data will not be freed
- if this reference count remains positive. When a session is re-used the
- reference counter should be corrected by explicitly calling
- SSL_SESSION_free() after each consecutive SSL_get1_session() to avoid
- introducing a memory leak.
-
- (http://curl.haxx.se/bug/view.cgi?id=2926284)
-
-Yang Tse (8 Jan 2010)
-- Start using the centralized pidfile and logfile name generation
- subroutines for http and tftp test suite servers.
-
-- Remove extra line feed
-
-- Use '_stunnel.log' ending also for https test server log
-
-- sws and tftpd command line option naming adjustments
-
-Daniel Stenberg (7 Jan 2010)
-- removed a parameter from the Curl_http_readwrite_headers() prototype to remove
- the need for the struct forward declaration from http.h which caused problems
- with gcc 2.96 and quite frankly the parameter wasn't necessary anyway
-
-Claes Jakobsson (7 Jan 2010)
-- List fragment tests in Makefile.am and better provide better names
-
-Daniel Stenberg (7 Jan 2010)
-- removed Curl_http_header_append() prototype as it isn't used anymore, the
- function was moved to http.c and was made static and renamed
-
-- - Make sure the progress callback is called repeatedly even during very slow
- name resolves when c-ares is used for resolving.
-
-Yang Tse (6 Jan 2010)
-- Disable tests 802 and 803
-
-- Prevent detection of stdint.h on IRIX systems, even when available.
-
- IRIX MIPSpro 7.4 C++ compiler does not tolerate inclusion of stdint.h
-
-Claes Jakobsson (6 Jan 2010)
-- Julien Chaffraix fixed so that the fragment part in an URL is not sent to the server anymore
-
-Daniel Stenberg (4 Jan 2010)
-- use the modern name for this option
-
-Kamil Dudka (3 Jan 2010)
-- - Julien Chaffraix eliminated a duplicated initialization in singlesocket().
-
-Daniel Stenberg (2 Jan 2010)
-- - Make curl support --ssl and --ssl-reqd instead of the previous FTP-specific
- versions --ftp-ssl and --ftp-ssl-reqd as these options are now used to
- control SSL/TLS for IMAP, POP3 and SMTP as well in addition to FTP. The old
- option names are still working but the new ones are the prefered ones
- (listed and documented).
-
-- stop at once if the EOB marker shows up, even if something else might get
- sent afterwards
-
-- update copyright year since we are in 2010 now
-
-- added CURLOPT_FTP_USE_PRET
-
-- - Ingmar Runge enhanced libcurl's FTP engine to support the PRET command. This
- command is a special "hack" used by the drftpd server, but even though it is
- a custom extension I've deemed it fine to add to libcurl since this server
- seems to survive and people keep using it and want libcurl to support
- it. The new libcurl option is named CURLOPT_FTP_USE_PRET, and it is also
- usable from the curl tool with --ftp-pret. Using this option on a server
- that doesn't support this command will make libcurl fail.
-
-- added descriptions for CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT
-
-- --mail-rcpt and --mail-from are starting to settle and work like this...
-
-- turned CURLOPT_MAIL_RCPT into a curl_slist list instead to support multiple
- receivers, and made the command line tool thus support the option specified
- many times
-
-Yang Tse (31 Dec 2009)
-- Use '_stunnel.log' file name ending for stunneled server logs
-
-- VMS adjustments by Steven M. Schweda
-
-- Subs for refactoring purposes
-
-Daniel Stenberg (30 Dec 2009)
-- CURLOPT_HEADERDATA was added in 7.10
-
-- s/CURLOPT_WRITEHEADER/CURLOPT_HEADERDATA simply because it is a better name
-
-- modified to get the EHLO domain from the path part of the URL instead of the
- user name
-
-- moved the SMTP payload escape function into Curl_smtp_escape_eob and put
- it in smtp.c
-
-- (SMTP) support DATA better in the server and make sure to "escape" CRLF.CRLF
- sequences in uploaded data. The test server doesn't "decode" escaped dot-lines
- but instead test cases must be written to take them into account. Added test
- case 803 to verify dot-escaping.
-
-Yang Tse (30 Dec 2009)
-- Oops, should have removed 'not' in previous commit.
-
-- VMS build system enhancements by Steven M. Schweda and Craig A. Berry
-
-- VMS specific preprocessor symbol checking adjustments
-
-- VMS specific preprocessor symbol definition adjustments
-
-- Replaced stricmp() usage with our portable strequal()
-
-Daniel Stenberg (29 Dec 2009)
-- move HTTP-specific functions to http.c where they belong
-
-- test 802 is the first SMTP test, although not strictly SMTP yet...
-
-Yang Tse (29 Dec 2009)
-- Mention last changes
-
-- - Fix configure_socket() to use ares_socket_t instead of int data type.
-
-- - Where run-time error checks enabling compiler option /GZ was used it is now
- replaced with equivalent /RTCsu for Visual Studio 2003 and newer versions.
-
- - Compiler option /GX is now replaced with equivalent /EHsc for all versions.
-
-- Leftover from previous commit
-
-- Initial refactoring step for server name strings centralized generation
-
-Daniel Stenberg (27 Dec 2009)
-- Julien Chaffraix's clarifications
-
-Yang Tse (27 Dec 2009)
-- Adjust FreeBSD version check to follow FreeBSD Porter's Handbook
-
- http://www.freebsd.org/doc/en/books/porters-handbook/porting-versions.html
-
-Daniel Stenberg (26 Dec 2009)
-- symbols added in the CVS version meant for 7.20.0
-
-Yang Tse (26 Dec 2009)
-- global variables reordering/refactoring/commenting
-
-Daniel Stenberg (25 Dec 2009)
-- add pointer to the bug report
-
-- - Renato Botelho and Peter Pentchev brought a patch that makes the libcurl
- headers work correctly even on FreeBSD systems before v8.
-
-- first shot at actually doing the SMTP upload as well, not doing the proper
- end-of-body treatment
-
-- When verifying the SMTP server I had to add some hackery since SMTP in itself
- doesn't really return any body data to check so I made SMTP check "headers"
- as well.
-
-- first basic SMTP support
-
-Yang Tse (24 Dec 2009)
-- Adjust test number mismatch
-
-- Enable warnings
-
-- Fix warnings
-
-- Fix warnings
-
-- Back out some pingpong server stopping changes introduced last week in
- order to re-use 'classic' stopping and allow taking test-suite run time
- references from this state.
-
-- use Time::HiRes whenever available, independently of perl version
-
-- log a message when continuing once sleep time is over
-
-- - Ingmar Runge noticed that Windows config-win32.h configuration file
- did not include a definition for HAVE_CLOSESOCKET which resulted in
- function close() being inappropriately used to close sockets.
-
-- Make 'classic' output end of a test-suite run become again the end
- of output, even when run time statistics are shown.
-
-- Move stopping of servers instructed by test definition, after the removal of
- server logs advisor read lock and before test results verifications are done.
-
- When stopping a pingpong server, stop server before its slaves.
-
-Daniel Stenberg (21 Dec 2009)
-- test 566 was missing
-
-Yang Tse (21 Dec 2009)
-- dead_child_handler also takes care of reaping pingpong server dead child processes
-
-- Reap processes dead children ASAP without blocking
-
-- Reinstate hi resolution time logging since this is not what is
- now adding 90 extra seconds to the total time some autobuilds
- need to make a full test-run.
-
-Patrick Monnerat (21 Dec 2009)
-- Take new SMTP definitions into account in OS400 wrapper and RPG binding
-
-Daniel Stenberg (21 Dec 2009)
-- first small steps towards smtp
-
-Yang Tse (21 Dec 2009)
-- Replaced tabs with spaces
-
-Daniel Stenberg (20 Dec 2009)
-- remove some unused code
-
-Yang Tse (20 Dec 2009)
-- Improve delay command interruptability
-
-Daniel Stenberg (20 Dec 2009)
-- revert that, we already had a function named like that!
-
-- rename the verifyftp function to verifyserver since it is used to verify
- a wide variety of protocol servers
-
-- free the allocated mailbox name at disconnect
-
-- introducing the first IMAP FETCH test
-
-Yang Tse (20 Dec 2009)
-- - Attempt to fix script compilation failure on versions older than 5.007003,
- corelist -a Time::HiRes lists this as the first version released with it.
-
- - Ensure ftp check delay timer is always an integral number.
-
-Daniel Stenberg (19 Dec 2009)
-- support IMAP select and LOGOUT
-
-- fix the ftp check delay timer to never be set below 1 to work correctly
- in cases like test 190
-
-- fixed a precaution check in the cookie code, pointed out by Julien Chaffraix
-
-Yang Tse (19 Dec 2009)
-- Slack time reduction
-
-- Added runtests.pl '-r' option for run time statistics
-
-- server start and verification time as well as test preparation time
- data is required in order to closer match total test execution time.
-
-- Added test harness simple time execution stats
-
-- Comment out hi resolution time logging to verify if this is what might
- be contributing 90 additional seconds to the total time some autobuilds
- now need to make a full test-run.
-
-- Fix compilation failure
-
-- Test harness process control enhancements
-
-Daniel Stenberg (17 Dec 2009)
-- uh, assign the bool it points to properly
-
-- Stop overloading the conn->protocol field with the PROT_MISSING bit. It
- really didn't belong there and had no real point.
-
-- Remove pointless storing of the protocol as a string within the connectdata
- struct, and instead use the already stored string in the handler struct.
-
-- - David Byron fixed Curl_ossl_cleanup to actually call ENGINE_cleanup when
- available.
-
-Yang Tse (17 Dec 2009)
-- gettimeofday() requires perl version newer than 5.6
-
-Daniel Stenberg (16 Dec 2009)
-- Follow-up fix for the proxy fix I did for Jon Nelson's bug. It turned out I
- was a bit too quick and broke test case 1101 with that change. The order of
- some of the setups is sensitive. I now changed it slightly again.
-
-Yang Tse (16 Dec 2009)
-- Test harness process control enhancements
-
-- Test #1106 needs an ftp enabled client
-
-- Test harness process control enhancements
-
-Daniel Stenberg (14 Dec 2009)
-- - Jon Nelson found a regression that turned out to be a flaw in how libcurl
- detects and uses proxies based on the environment variables. If the proxy
- was given as an explicit option it worked, but due to the setup order
- mistake proxies would not be used fine for a few protocols when picked up
- from '[protocol]_proxy'. Obviously this broke after 7.19.4. I now also added
- test case 1106 that verifies this functionality.
-
- (http://curl.haxx.se/bug/view.cgi?id=2913886)
-
-Yang Tse (14 Dec 2009)
-- Fix compiler warning
-
-- Prevent perl script dying messages in output, since tearing down the pinpong
- server in this way, upon sysread failures, is part of the expected behavior.
-
-- Adjust uppercase protocol string usage
-
-- Fix compiler warnings
-
-- Fix compiler warnings
-
-- signal handling to cleanup on SIGINT and SIGTERM, followup
-
-- reapply diff between revisions 1.103 and 1.102
-
-Daniel Stenberg (12 Dec 2009)
-- updated with the new protocols
-
-- might as well output all supported protocols at the end of configure to
- make it more obvious how the output will be
-
-- show POP3S, IMAPS and SMTPS as protocols if SSL is enabled
-
-- support disabling POP3, IMAP and SMTP and now they also appear in curl-config
- --protocols output
-
-- split out more protocol-specific structs from urldata.h into their own
- protocol-specific header files
-
-- IMAP, POP3 and SMTP support
-
-- introducing IMAP, POP3 and SMTP support (still lots of polish left to do)
-
-Yang Tse (11 Dec 2009)
-- Prevent rewinding unless pipelining.
-
- See http://curl.haxx.se/mail/lib-2009-12/0107.html
-
-- Removed function prototype without implementation
-
-Daniel Stenberg (10 Dec 2009)
-- - Siegfried Gyuricsko found out that the curl manual said --retry would retry
- on FTP errors in the transient 5xx range. Transient FTP errors are in the
- 4xx range. The code itself only tried on 5xx errors that occured _at login_.
- Now the retry code retries on all FTP transfer failures that ended with a
- 4xx response.
-
- (http://curl.haxx.se/bug/view.cgi?id=2911279)
-
-- argh, use the correct bug id
-
-- - Constantine Sapuntzakis figured out a case which would lead to libcurl
- accessing alredy freed memory and thus crash when using HTTPS (with
- OpenSSL), multi interface and the CURLOPT_DEBUGFUNCTION and a certain order
- of cleaning things up. I fixed it.
-
- (http://curl.haxx.se/bug/view.cgi?id=2891591)
-
-- minor indent change
-
-Yang Tse (10 Dec 2009)
-- - Fixed curl erroneously reporting output stream write failures with disabled buffering
-
-- signal handling to cleanup on SIGINT and SIGTERM, followup
-
-Daniel Stenberg (7 Dec 2009)
-- - Martin Storsjo made libcurl use the Expect: 100-continue header for posts
- with unknown size. Previously it was only used for posts with a known size
- larger than 1024 bytes.
-
-- 74. The HTTP spec allows headers to be merged and become comma-separated
- instead of being repeated several times. This also include Authenticate: and
- Proxy-Authenticate: headers and while this hardly every happens in real life
- it will confuse libcurl which does not properly support it for all headers -
- like those Authenticate headers.
-
-Yang Tse (3 Dec 2009)
-- Fix 'uploaded' file descriptor leak
-
-- signal handling to cleanup on SIGINT and SIGTERM
-
-Kamil Dudka (2 Dec 2009)
-- lib/nss.c: avoid use of uninitialized value
-
-Yang Tse (2 Dec 2009)
-- signal handling to cleanup on SIGINT and SIGTERM
-
-- Set socket option SO_REUSEADDR=true on stunnel accept'ing port
-
-Daniel Stenberg (1 Dec 2009)
-- - If the Expect: 100-continue header has been set by the application through
- curl_easy_setopt with CURLOPT_HTTPHEADER, the library should set
- data->state.expect100header accordingly - the current code (in 7.19.7 at
- least) doesn't handle this properly. Martin Storsjo provided the fix!
-
-- start working on 1.7.1
-
-Yang Tse (30 Nov 2009)
-- - In order to better reflect that the returned pid is extracted from the
- given file, serverpid sub is renamed to pidfromfile. In addition it is
- enhanced to make sure that it always returns zero unless a numerical
- positive value is returned.
-
- - To better reflect that only process existance is actually checked,
- checkserver sub is renamed to processexists. In addition it is enhanced
- making it remove the given pid file when the extracted pid is no longer
- alive.
-
-Daniel Stenberg (29 Nov 2009)
-- #71 "TFTP block size / better integration in transfer" is now expected to
- have been fixed!
-
-- a binding for Falcon
-
-Yang Tse (28 Nov 2009)
-- - Added Diffie-Hellman parameters to several test harness certificate files in
- PEM format. Required by several stunnel versions used by our test harness.
-
-- Use different log files for each protocol
-
-- s/socklen_t/curl_socklen_t/g
-
-- Fix compiler warning: unused variable `data'
-
-Daniel Stenberg (27 Nov 2009)
-- 7.20.0 is the planned next version number
-
-- document --tftp-blksize
-
-- - Markus Koetter provided a polished and updated version of Chad Monroe's TFTP
- rework patch that now integrates TFTP properly into libcurl so that it can
- be used non-blocking with the multi interface and more. BLKSIZE also works.
-
- The --tftp-blksize option was added to allow setting the TFTP BLKSIZE from
- the command line.
-
-Yang Tse (27 Nov 2009)
-- Attempt to enhance stunnel 3.X logging
-
-- Prevent running stunnel unless its version can be determined.
+The older, manually edited, changelog is found in git named CHANGES.0
diff --git a/CHANGES.0 b/CHANGES.0
new file mode 100644
index 00000000..eab26da8
--- /dev/null
+++ b/CHANGES.0
@@ -0,0 +1,18002 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+ Old Changelog
+
+Changes done to curl and libcurl from 1997 to 2010, edited manually. The most
+recent changes are always generated into the CHANGES file straight from git.
+
+Kamil Dudka (17 June 2010)
+- Improve test575 in order to not fail with threaded DNS resolver.
+
+Version 7.21.0 (16 June 2010)
+
+Daniel Stenberg (5 June 2010)
+- Constantine Sapuntzakis fixed a case of spurious SSL connection aborts using
+ libcurl and OpenSSL. "I tracked it down to uncleared error state on the
+ OpenSSL error stack - patch attached deals with that."
+
+Daniel Stenberg (5 June 2010)
+- Frank Meier added CURLINFO_PRIMARY_PORT, CURLINFO_LOCAL_IP and
+ CURLINFO_LOCAL_PORT to curl_easy_getinfo().
+
+Yang Tse (4 June 2010)
+- Enabled OpenLDAP support for cygwin builds. This support was disabled back
+ in 2008 due to incompatibilities between OpenSSL and OpenLDAP headers.
+ cygwin's OpenSSL 0.9.8l and OpenLDAP 2.3.43 versions on cygwin 1.5.25
+ allow building an OpenLDAP enabled libcurl supporting back to Windows 95.
+
+ Removed the non-functional CURL_LDAP_HYBRID code and references.
+
+Daniel Stenberg (2 June 2010)
+- Jason McDonald posted bug report #3006786 when he found that the SFTP code
+ didn't timeout properly in several places in the code even if a timeout was
+ set properly.
+
+ Based on his suggested patch, I wrote a different implementation that I
+ think addressed the issue better and also uses the connect timeout for the
+ initial part of the SSH/SFTP done during the "protocol connect" phase.
+
+ (http://curl.haxx.se/bug/view.cgi?id=3006786)
+
+Yang Tse (2 June 2010)
+- Added missing new libcurl files to non-configure targets. Adjusted
+ libcurl standard internal header inclusions in new files. Fixed an
+ SPNEGO related memory leak. Fixed several LDAP related compilation
+ issues, and fixed some compiler warnings.
+
+Daniel Stenberg (1 June 2010)
+- Igor Novoseltsev reported a problem with the multi socket API and using
+ timeouts and timers. It boiled down to a problem with libcurl's use of
+ GetTickCount() interally to figure out the current time, while Igor's own
+ application code used another function call.
+
+ It made his app call the socket API timeout function a bit _before_ libcurl
+ would consider the timeout to trigger, and that could easily lead to
+ timeouts or stalls in the app. It seems GetTickCount() in general often has
+ no better resolution than 16ms and switching to the alternative function
+ QueryPerformanceCounter has its share of problems:
+ http://www.virtualdub.org/blog/pivot/entry.php?id=106
+
+ We address this problem by simply having libcurl treat timers that already
+ has occured or will occur within 40ms subject for treatment. I'm confident
+ that there are other implementations and operating systems with similarly in
+ accurate timer functions so it makes sense to have applied generically and I
+ don't believe we sacrifice much by adding a 40ms inaccuracy on these
+ timeouts.
+
+Kamil Dudka (27 May 2010)
+- added a new test for CRL support (test313)
+
+- Tor Arntsen changed the alternative definition of bool to use enum instead
+ of unsigned char.
+
+Daniel Stenberg (25 May 2010)
+- Julien Chaffraix fixed the warning seen when compiling lib/rtmp.c: one
+ unused variables, several unused arguments and some missing #include.
+
+- Julien Chaffraix fixed 2 OOM errors: a missing NULL-check in
+ lib/http_negociate.c and a potential NULL dereferencing in lib/splay.c
+
+- Howard Chu brought a patch that makes the LDAP code much cleaner, nicer and
+ in general being a better libcurl citizen. If a new enough OpenLDAP version
+ is detect, the new and shiny lib/openldap.c code is then used instead of the
+ old cruft.
+
+Daniel Stenberg (21 May 2010)
+- Eric Mertens posted bug #3003705: when we made TFTP use the correct timeout
+ option when sent to the server (fixed May 18th 2010) it became obvious that
+ libcurl used invalid timeout values (300 by default while the RFC allows
+ nothing above 255). While of course it is obvious that as TFTP has worked
+ thus far without being able to set timeout at all, just removing the setting
+ wouldn't make any difference in behavior. I decided to still keep it (but
+ fix the problem) as it now actually allows for easier (future) customization
+ of the timeout.
+
+ (http://curl.haxx.se/bug/view.cgi?id=3003705)
+
+- Douglas Kilpatrick filed bug report #3004787 and pointed out that the TFTP
+ code didn't handle block id wraps correctly. His suggested fix inspired the
+ fix I committed.
+
+ (http://curl.haxx.se/bug/view.cgi?id=3004787)
+
+Daniel Stenberg (20 May 2010)
+- Tanguy Fautre brought a fix to allow curl to build with Microsoft VC10.
+
+Daniel Stenberg (18 May 2010)
+- Eric Mertens posted bug report #3003005 pointing out that the libcurl TFTP
+ code was not sending the timeout option properly to the server, and
+ suggested a fix.
+
+ (http://curl.haxx.se/bug/view.cgi?id=3003005)
+
+Kamil Dudka (16 May 2010)
+- Pavel Raiskup introduced a new option CURLOPT_FNMATCH_DATA in order to pass
+ a custom data pointer to the callback specified by CURLOPT_FNMATCH_FUNCTION.
+
+Daniel Stenberg (14 May 2010)
+- John-Mark Bell filed bug #3000052 that identified a problem (with an
+ associated patch) with the OpenSSL handshake state machine when the multi
+ interface is used:
+
+ Performing an https request using a curl multi handle and using select or
+ epoll to wait for events results in a hang. It appears that the cause is the
+ fix for bug #2958179, which makes ossl_connect_common unconditionally return
+ from the step 2 loop when fetching from a multi handle.
+
+ When ossl_connect_step2 has completed, it updates connssl->connecting_state
+ to ssl_connect_3. ossl_connect_common will then return to the caller, as a
+ multi handle is in use. Eventually, the client code will call
+ curl_multi_fdset to obtain an updated fdset to select or epoll on. For https
+ requests, curl_multi_fdset will cause https_getsock to be called.
+ https_getsock will only return a socket handle if the connecting_state is
+ ssl_connect_2_reading or ssl_connect_2_writing. Therefore, the client will
+ never obtain a valid fdset, and thus not drive the multi handle, resulting
+ in a hang.
+
+ (http://curl.haxx.se/bug/view.cgi?id=3000052)
+
+- Sebastian V reported bug #3000056 identifying a problem with redirect
+ following. It showed that when curl followed redirects it didn't properly
+ ignore the response body of the 30X response if that response was using
+ compressed Content-Encoding!
+
+ (http://curl.haxx.se/bug/view.cgi?id=3000056)
+
+Daniel Stenberg (12 May 2010)
+- Howard Chu brought support for RTMP. This is powered by the underlying
+ librtmp library. It supports a range of variations and "sub-protocols"
+ within the RTMP family.
+
+- Pavel Raiskup brought support for FTP directory wildcard matching to allow
+ selective downloading. To provide that, a set of new options were added:
+
+ CURLOPT_WILDCARDMATCH
+ CURLOPT_CHUNK_BGN_FUNCTION
+ CURLOPT_CHUNK_END_FUNCTION
+ CURLOPT_CHUNK_DATA
+ CURLOPT_FNMATCH_FUNCTION
+
+ There were also a set of new tests added (574 - 577) to verify this.
+
+Kamil Dudka (11 May 2010)
+- CRL support in libcurl-NSS has been completely broken. Now it works. Original
+ bug report: https://bugzilla.redhat.com/581926
+
+Daniel Stenberg (7 May 2010)
+- Dirk Manske reported a regression. When connecting with the multi interface,
+ there were situations where libcurl wouldn't store connect time correctly as
+ it used to (and is documented to) do.
+
+ Using his fine sample program we could repeat it, and I wrote up test case
+ 573 using that code. The problem does not easily show itself using the local
+ test suite though.
+
+ The fix, also as suggested by Dirk, is a bit on the ugly side as it adds yet
+ another call to Curl_verboseconnect() and setting the TIMER_CONNECT time.
+ That situation is subject for some closer inspection in the future.
+
+- Howard Chu split the I/O handling functions into private handlers.
+
+ Howard Chu brought the bulk work of this patch that properly moves out the
+ sending and recving of data to the parts of the code that are properly
+ responsible for the various ways of doing so.
+
+ Daniel Stenberg assisted with polishing a few bits and fixed some minor
+ flaws in the original patch.
+
+ Another upside of this patch is that we now abuse CURLcodes less with the
+ "magic" -1 return codes and instead use CURLE_AGAIN more consistently.
+
+Daniel Stenberg (5 May 2010)
+- Hoi-Ho Chan introduced support for using the PolarSSL library. You control
+ this with the new configure option --with-polarssl.
+
+Daniel Stenberg (29 Apr 2010)
+- Ben Greear made telnet a lot better/easier to use by an application:
+
+ The main change is to allow input from user-specified methods, when they are
+ specified with CURLOPT_READFUNCTION. All calls to fflush(stdout) in
+ telnet.c were removed, which makes using 'curl telnet://foo.com' painful
+ since prompts and other data are not always returned to the user promptly.
+ Use 'curl --no-buffer telnet://foo.com' instead. In general, the user
+ should have their CURLOPT_WRITEFUNCTION do a fflush for interactive use.
+
+ Also fix assumption that reading from stdin never returns < 0.
+ Old code could crash in that case.
+
+ Call progress functions in telnet main loop.
+
+Daniel Stenberg (26 Apr 2010)
+- Make use of the libssh2_init/exit functions that libssh2 added in version
+ 1.2.5. Using them will improve how libcurl works in threaded situations when
+ SCP and SFTP are transfered.
+
+Daniel Stenberg (25 Apr 2010)
+- Based on work by Kamil Dudka, I've introduced the new configure option
+ --enable-threaded-resolver. When used, the configure script will check for
+ pthreads and if around, it will build libcurl to use pthreads to do name
+ resolving in a threaded manner. Note that this is just a fix to offer an
+ option that can enable the code that already included. The threader resolver
+ code was mostly added on Jan 26 2010.
+
+Daniel Stenberg (24 Apr 2010)
+- Alex Bligh introduced the --proto and -proto-redir options that limit what
+ protocols curl accepts for the requests and when following redirects.
+
+Kamil Dudka (24 Apr 2010)
+- Fixed test536 in order to not fail with threaded DNS resolver and tweaked
+ comments in certain examples using curl_multi_fdset().
+
+- Fixed SSL handshake timeout underflow in libcurl-NSS, which caused test405
+ to hang on a slow machine.
+
+Daniel Stenberg (21 Apr 2010)
+- The -O option caused curl to crash on windows and DOS due to the tool
+ writing out of boundary memory.
+
+Yang Tse (20 Apr 2010)
+- Ruslan Gazizov detected that MSVC makefiles were using wsock32.lib instead
+ of ws2_32.lib, this generated linking issues on MSVC IPv6 enabled builds
+ that were done using those makefiles.
+
+Daniel Stenberg (19 Apr 2010)
+- -J/--remote-header-name didn't strip trailing carriage returns or linefeeds
+ properly, so they could be used in the file name.
+
+Daniel Stenberg (16 Apr 2010)
+- Jerome Vouillon made the GnuTLS SSL handshake phase non-blocking.
+
+- The recent overhaul of the SSL recv function made the GnuTLS specific code
+ treat a zero returned from gnutls_record_recv() as an error, and this caused
+ our HTTPS test cases to fail. We leave it to upper layer code to detect if
+ an EOF is a problem or not.
+
+- I reverted the resolver fix from yesterday and instead removed all uses of
+ AI_CANONNAME all over libcurl and made the only user of that info (krb5.c)
+ use the host name from the URL instead. No reverse resolving is a good
+ thing.
+
+- Paul Howarth made configure properly detect GSS "on ancient Linux distros"
+ by editing in which order we use headers to detect GSS.
+
+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.
+
+ (http://curl.haxx.se/bug/view.cgi?id=2963679)
+
+Version 7.20.1 (14 April 2010)
+
+Daniel Stenberg (9 Apr 2010)
+- Prefixing the FTP quote commands with an asterisk really only worked for the
+ postquote actions. This is now fixed and test case 227 has been extended to
+ verify.
+
+Kamil Dudka (4 Apr 2010)
+- Eliminated a race condition in Curl_resolv_timeout().
+
+- Refactorized interface of Curl_ssl_recv()/Curl_ssl_send().
+
+- libcurl-NSS now provides more accurate messages and error codes in case of
+ client certificate problem. Either during connection, or transfer phase.
+
+Daniel Stenberg (1 Apr 2010)
+- Matt Wixson found and fixed a bug in the SCP/SFTP area where the code
+ treated a 0 return code from libssh2 to be the same as EAGAIN while in
+ reality it isn't. The problem caused a hang in SFTP transfers from a
+ MessageWay server.
+
+Daniel Stenberg (28 Mar 2010)
+- Ben Greear: If you pass a URL to pop3 that does not contain a message ID as
+ part of the URL, it would previously ask for 'INBOX' which just causes the
+ pop3 server to return an error.
+
+ Now libcurl treats en empty message ID as a request for LIST (list of pop3
+ message IDs). User's code could then parse this and download individual
+ messages as desired.
+
+Daniel Stenberg (27 Mar 2010)
+- Ben Greear brought a patch that from now on allows all protocols to specify
+ name and user within the URL, in the same manner HTTP and FTP have been
+ allowed to in the past - although far from all of the libcurl supported
+ protocls actually have that feature in their URL definition spec.
+
+Daniel Stenberg (26 Mar 2010)
+- Ben Greear brought code that makes the rate limiting code for the easy
+ interface a bit smoother as it introduces sub-second sleeps during it and it
+ also takes the buffer sizes into account.
+
+Daniel Stenberg (24 Mar 2010)
+- Bob Richmond: There's an annoying situation where libcurl will read new HTTP
+ response data from a socket, then check if it's a timeout if one is set. If
+ the last packet received constitutes the end of the response body, libcurl
+ still treats it as a timeout condition and reports a message like:
+
+ "Operation timed out after 3000 milliseconds with 876 out of 876 bytes
+ received"
+
+ It should only a timeout if the timer lapsed and we DIDN'T receive the end
+ of the response body yet.
+
+- Christopher Conroy fixed a problem with RTSP and GET_PARAMETER reported
+ to us by Massimo Callegari. There's a new test case 572 that verifies this
+ now.
+
+- The 'ares' subtree has been removed from the source repository. It was
+ always a separate project that sort of piggybacked on the curl project since
+ the dawn of times and now the time has come for it to go stand on its own
+ legs and continue living its own life. All details on c-ares and its new
+ source code repository is found at http://c-ares.haxx.se/
+
+Daniel Stenberg (23 Mar 2010)
+- Kenny To filed the bug report #2963679 with patch to fix a problem he
+ experienced with doing multi interface HTTP POST over a proxy using
+ PROXYTUNNEL. He found a case where it would connect fine but bits.tcpconnect
+ was not set correct so libcurl didn't work properly.
+
+ (http://curl.haxx.se/bug/view.cgi?id=2963679)
+
+- Akos Pasztory filed debian bug report #572276
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572276 mentioning a problem
+ with a resource that returns chunked-encoded _and_ with a Content-Length
+ and libcurl failed to properly ignore the latter information.
+
+- Hauke Duden provided an example program that made the multi interface crash.
+ His example simply used the multi interface and did first one FTP transfer
+ and after completion it used a second easy handle and did another FTP
+ transfer on the same FTP server.
+
+ This triggered a bug in the "delayed easy handle kill" system that curl
+ uses: when an FTP connection is left alive it must keep an easy handle
+ around internally - only for the purpose of having an easy handle when it
+ later disconnects it. The code assumed that when the easy handle was removed
+ and an internal reference was made, that version could be killed later on
+ when a new easy handle came using the same connection. This was wrong as
+ Hauke's example showed that the removed handle wasn't killed for real until
+ later. This caused a double close attempt => segfault.
+
+Daniel Stenberg (22 Mar 2010)
+- Thomas Lopatic fixed the alarm()-based DNS timeout:
+
+ Looking at the code of Curl_resolv_timeout() in hostip.c, I think that in
+ case of a timeout, the signal handler for SIGALRM never gets removed. I
+ think that in my case it gets executed at some point later on when execution
+ has long left Curl_resolv_timeout() or even the cURL library.
+
+ The code that is jumped to with siglongjmp() simply sets the error message
+ to "name lookup timed out" and then returns with CURLRESOLV_ERROR. I guess
+ that instead of simply returning without cleaning up, the code should have a
+ goto that jumps to the spot right after the call to Curl_resolv().
+
+Kamil Dudka (22 Mar 2010)
+- Douglas Steinwand contributed a patch fixing insufficient initialization in
+ Curl_clone_ssl_config()
+
+Daniel Stenberg (21 Mar 2010)
+- Ben Greear improved TFTP: the error code returning and the treatment
+ of TSIZE == 0 when uploading.
+
+- We've switched from CVS to git. See http://curl.haxx.se/source.html
+
+Kamil Dudka (19 Mar 2010)
+- Improved Curl_read() to not ignore the error returned from Curl_ssl_recv().
+
+Daniel Stenberg (15 Mar 2010)
+- Constantine Sapuntzakis brought a patch:
+
+ The problem mentioned on Dec 10 2009
+ (http://curl.haxx.se/bug/view.cgi?id=2905220) was only partially fixed.
+ Partially because an easy handle can be associated with many connections in
+ the cache (e.g. if there is a redirect during the lifetime of the easy
+ handle). The previous patch only cleaned up the first one. The new fix now
+ removes the easy handle from all connections, not just the first one.
+
+Daniel Stenberg (6 Mar 2010)
+- Ben Greear brought a patch that fixed the rate limiting logic for TFTP when
+ the easy interface was used.
+
+Daniel Stenberg (5 Mar 2010)
+- Daniel Johnson provided fixes for building curl with the clang compiler.
+
+Yang Tse (5 Mar 2010)
+- Constantine Sapuntzakis detected and fixed a double free in builds done
+ with threaded resolver enabled (Windows default configuration) that would
+ get triggered when a curl handle is closed while doing DNS resolution.
+
+Daniel Stenberg (2 Mar 2010)
+- [Daniel Johnson] I've been trying to build libcurl with clang on Darwin and
+ ran into some issues with the GSSAPI tests in configure.ac. The tests first
+ try to determine the include dirs and libs and set CPPFLAGS and LIBS
+ accordingly. It then checks for the headers and finally sets LIBS a second
+ time, causing the libs to be included twice. The first setting of LIBS seems
+ redundant and should be left out, since the first part is otherwise just
+ about finding headers.
+
+ My second issue is that 'krb5-config --libs gssapi' on Darwin is less than
+ useless and returns junk that, while it happens to work with gcc, causes
+ clang to choke. For example, --libs returns $CFLAGS along with the libs,
+ which is really retarded. Simply setting 'LIBS="$LIBS -lgssapi_krb5
+ -lresolv"' on Darwin is sufficient.
+
+- Based on patch provided by Jacob Moshenko, the transfer logic now properly
+ makes sure that when using sub-second timeouts, there's no final bad 1000ms
+ wait. Previously, a sub-second timeout would often make the elapsed time end
+ up the time rounded up to the nearest second (e.g. 1s for 200ms timeout)
+
+- Andrei Benea filed bug report #2956698 and pointed out that the
+ CURLOPT_CERTINFO feature leaked memory due to a missing OpenSSL function
+ call. He provided the patch to fix it too.
+
+ http://curl.haxx.se/bug/view.cgi?id=2956698
+
+- Markus Duft pointed out in bug #2961796 that even though Interix has a
+ poll() function it doesn't quite work the way we want it so we must disable
+ it, and he also provided a patch for it.
+
+ http://curl.haxx.se/bug/view.cgi?id=2961796
+
+- Made the pingpong timeout code properly deal with the response timeout AND
+ the global timeout if set. Also, as was reported in the bug report #2956437
+ by Ryan Chan, the time stamp to use as basis for the per command timeout was
+ not set properly in the DONE phase for FTP (and not for SMTP) so I fixed
+ that just now. This was a regression compared to 7.19.7 due to the
+ conversion of FTP code over to the generic pingpong concepts.
+
+ http://curl.haxx.se/bug/view.cgi?id=2956437
+
+Daniel Stenberg (1 Mar 2010)
+- Ben Greear provided an update for TFTP that fixes upload.
+
+- Wesley Miaw reported bug #2958179 which identified a case of looping during
+ OpenSSL based SSL handshaking even though the multi interface was used and
+ there was no good reason for it.
+
+ http://curl.haxx.se/bug/view.cgi?id=2958179
+
+Daniel Stenberg (26 Feb 2010)
+- Pat Ray in bug #2958474 pointed out an off-by-one case when receiving a
+ chunked-encoding trailer.
+
+ http://curl.haxx.se/bug/view.cgi?id=2958474
+
+Daniel Fandrich (25 Feb 2010)
+- Fixed a couple of out of memory leaks and a segfault in the SMTP & IMAP code.
+
+Yang Tse (25 Feb 2010)
+- I fixed bug report #2958074 indicating
+ (http://curl.haxx.se/bug/view.cgi?id=2958074) that curl on Windows with
+ option --trace-time did not use local time when timestamping trace lines.
+ This could also happen on other systems depending on time souurce.
+
+Patrick Monnerat (22 Feb 2010)
+- Proper handling of STARTTLS on SMTP, taking CURLUSESSL_TRY into account.
+- SMTP falls back to RFC821 HELO when EHLO fails (and SSL is not required).
+- Use of true local host name (i.e.: via gethostname()) when available, as
+ default argument to SMTP HELO/EHLO.
+- Test case 804 for HELO fallback.
+
+Daniel Stenberg (20 Feb 2010)
+- Fixed the SMTP compliance by making sure RCPT TO addresses are specified
+ properly in angle brackets. Recipients provided with CURLOPT_MAIL_RCPT now
+ get angle bracket wrapping automatically by libcurl unless the recipient
+ starts with an angle bracket as then the app is assumed to deal with that
+ properly on its own.
+
+- I made the SMTP code expect a 250 response back from the server after the
+ full DATA has been sent, and I modified the test SMTP server to also send
+ that response. As usual, the DONE operation that is made after a completed
+ transfer is still not doable in a non-blocking way so this waiting for 250
+ is unfortunately made blockingly.
+
+Yang Tse (14 Feb 2010)
+- Overhauled test suite getpart() function. Fixing potential out of bounds
+ stack and memory overwrites triggered with huge test case definitions.
+
+Daniel Stenberg (13 Feb 2010)
+- Martin Hager reported and fixed a problem with a missing quote in libcurl.m4
+
+ (http://curl.haxx.se/bug/view.cgi?id=2951319)
+
+- Tom Donovan fixed the CURL_FORMAT_* defines when building with cmake.
+
+ (http://curl.haxx.se/bug/view.cgi?id=2951269)
+
+Daniel Stenberg (12 Feb 2010)
+- Jack Zhang reported a problem with SMTP: we wrongly used multiple addresses
+ in the same RCPT TO line, when they should be sent in separate single
+ commands. I updated test case 802 to verify this.
+
+- I also fixed a bad use of my_setopt_str() of CURLOPT_MAIL_RCPT in the curl
+ tool which made it try to output it as string for the --libcurl feature
+ which could lead to crashes.
+
+Yang Tse (11 Feb 2010)
+- Steven M. Schweda fixed VMS builder bad behavior when used in a batch job,
+ removed obsolete batch_compile.com and defines.com and updated VMS readme.
+
+Version 7.20.0 (9 February 2010)
+
+Daniel Stenberg (9 Feb 2010)
+- When downloading compressed content over HTTP and the app asked libcurl to
+ automatically uncompress it with the CURLOPT_ENCODING option, libcurl could
+ wrongly provide the callback with more data than the maximum documented
+ amount. An application could thus get tricked into badness if the maximum
+ limit was trusted to be enforced by libcurl itself (as it is documented).
+
+ This is further detailed and explained in the libcurl security advisory
+ 20100209 at
+
+ http://curl.haxx.se/docs/adv_20100209.html
+
+Daniel Fandrich (3 Feb 2010)
+- Changed the Watcom makefiles to make them easier to keep in sync with
+ Makefile.inc since that can't be included directly.
+
+Yang Tse (2 Feb 2010)
+- Symbol CURL_FORMAT_OFF_T now obsoleted, will be removed in a future release,
+ symbol will not be available when building with CURL_NO_OLDIES defined. Use
+ of CURL_FORMAT_CURL_OFF_T is preferred since 7.19.0
+
+Daniel Stenberg (1 Feb 2010)
+- Using the multi_socket API, it turns out at times it seemed to "forget"
+ connections (which caused a hang). It turned out to be an existing (7.19.7)
+ bug in libcurl (that's been around for a long time) and it happened like
+ this:
+
+ The app calls curl_multi_add_handle() to add a new easy handle, libcurl will
+ then set it to timeout in 1 millisecond so libcurl will tell the app about
+ it.
+
+ The app's timeout fires off that there's a timeout, the app calls libcurl as
+ we so often document it:
+
+ do {
+ res = curl_multi_socket_action(... TIMEOUT ...);
+ } while(CURLM_CALL_MULTI_PERFORM == res);
+
+ And this is the problem number one:
+
+ When curl_multi_socket_action() is called with no specific handle, but only
+ a timeout-action, it will *only* perform actions within libcurl that are
+ marked to run at this time. In this case, the request would go from INIT to
+ CONNECT and return CURLM_CALL_MULTI_PERFORM. When the app then calls libcurl
+ again, there's no timer set for this handle so it remains in the CONNECT
+ state. The CONNECT state is a transitional state in libcurl so it reports no
+ sockets there, and thus libcurl never tells the app anything more about that
+ easy handle/connection.
+
+ libcurl _does_ set a 1ms timeout for the handle at the end of
+ multi_runsingle() if it returns CURLM_CALL_MULTI_PERFORM, but since the loop
+ is instant the new job is not ready to run at that point (and there's no
+ code that makes libcurl call the app to update the timout for this new
+ timeout). It will simply rely on that some other timeout will trigger later
+ on or that something else will update the timeout callback. This makes the
+ bug fairly hard to repeat.
+
+ The fix made to adress this issue:
+
+ We introduce a loop in lib/multi.c around all calls to multi_runsingle() and
+ simply check for CURLM_CALL_MULTI_PERFORM internally. This has the added
+ benefit that this goes in line with my long-term wishes to get rid of the
+ CURLM_CALL_MULTI_PERFORM all together from the public API.
+
+ The downside of this fix, is that the counter we return in 'running_handles'
+ in several of our public functions then gets a slightly new and possibly
+ confusing behavior during times:
+
+ If an app adds a handle that fails to connect (very quickly) it may just
+ as well never appear as a 'running_handle' with this fix. Previously it
+ would first bump the counter only to get it decreased again at next call.
+ Even I have used that change in handle counter to signal "end of a
+ transfer". The only *good* way to find the end of a individual transfer
+ is calling curl_multi_info_read() to see if it returns one.
+
+ Of course, if the app previously did the looping before it checked the
+ counter, it really shouldn't be any new effect.
+
+Yang Tse (26 Jan 2010)
+- Constantine Sapuntzakis' and Joshua Kwan's work done in the last four months
+ relative to the asynchronous DNS lookups, along with with some integration
+ adjustments I have done are finally committed to CVS.
+
+ Currently these enhancements will benefit builds done using c-ares on any
+ platform as well as Windows builds using the default threaded resolver.
+
+ This release does not make generally available POSIX threaded DNS lookups
+ yet. There is no configure option to enable this feature yet. It is possible
+ to experimantally try this feature running configure with compiler flags that
+ make simultaneous definition of preprocessor symbols USE_THREADS_POSIX and
+ HAVE_PTHREAD_H, as well as whatever reentrancy compiler flags and linker ones
+ are required to link and properly use pthread_* functions on each platform.
+
+Daniel Stenberg (26 Jan 2010)
+- Mike Crowe made libcurl return CURLE_COULDNT_RESOLVE_PROXY when it is the
+ proxy that cannot be resolved when using c-ares. This matches the behaviour
+ when not using c-ares.
+
+Björn Stenberg (23 Jan 2010)
+- Added a new flag: -J/--remote-header-name. This option tells the
+ -O/--remote-name option to use the server-specified Content-Disposition
+ filename instead of extracting a filename from the URL.
+
+Daniel Stenberg (21 Jan 2010)
+- Chris Conroy brought support for RTSP transfers, and with it comes 8(!) new
+ libcurl options for controlling what to get and how to receive posssibly
+ interleaved RTP data.
+
+Daniel Stenberg (20 Jan 2010)
+- As was pointed out on the http-state mailing list, the order of cookies in a
+ HTTP Cookie: header _needs_ to be sorted on the path length in the cases
+ where two cookies using the same name are set more than once using
+ (overlapping) paths. Realizing this, identically named cookies must be
+ sorted correctly. But detecting only identically named cookies and take care
+ of them individually is harder than just to blindly and unconditionally sort
+ all cookies based on their path lengths. All major browsers also already do
+ this, so this makes our behavior one step closer to them in the cookie area.
+
+ Test case 8 was the only one that broke due to this change and I updated it
+ accordingly.
+
+Daniel Stenberg (19 Jan 2010)
+- David McCreedy brought a fix and a new test case (129) to make libcurl work
+ again when downloading files over FTP using ASCII and it turns out that the
+ final size of the file is not the same as the initial size the server
+ reported. This is very common since servers don't take the newline
+ conversions into account.
+
+Kamil Dudka (14 Jan 2010)
+- Suppressed side effect of OpenSSL configure checks, which prevented NSS from
+ being properly detected under certain circumstances. It had been caused by
+ strange behavior of pkg-config when handling PKG_CONFIG_LIBDIR. pkg-config
+ distinguishes among empty and non-existent environment variable in that case.
+
+Daniel Stenberg (12 Jan 2010)
+- Gil Weber reported a peculiar flaw with the multi interface when doing SFTP
+ transfers: curl_multi_fdset() would return -1 and not set and file
+ descriptors several times during a transfer of a single file. It turned out
+ to be due to two different flaws now fixed. Gil's excellent recipe helped me
+ nail this.
+
+Daniel Stenberg (11 Jan 2010)
+- Made sure that the progress callback is repeatedly called at a regular
+ interval even during very slow connects.
+
+- The tests/runtests.pl script now checks to see if the test case that runs is
+ present in the tests/data/Makefile.am and outputs a notice message on the
+ screen if not. Each test file has to be included in that Makefile.am to get
+ included in release archives and forgetting to add files there is a common
+ mistake. This is an attempt to make it harder to forget.
+
+Daniel Stenberg (9 Jan 2010)
+- Johan van Selst found and fixed a OpenSSL session ref count leak:
+
+ ossl_connect_step3() increments an SSL session handle reference counter on
+ each call. When sessions are re-used this reference counter may be
+ incremented many times, but it will be decremented only once when done (by
+ Curl_ossl_session_free()); and the internal OpenSSL data will not be freed
+ if this reference count remains positive. When a session is re-used the
+ reference counter should be corrected by explicitly calling
+ SSL_SESSION_free() after each consecutive SSL_get1_session() to avoid
+ introducing a memory leak.
+
+ (http://curl.haxx.se/bug/view.cgi?id=2926284)
+
+Daniel Stenberg (7 Jan 2010)
+- Make sure the progress callback is called repeatedly even during very slow
+ name resolves when c-ares is used for resolving.
+
+Claes Jakobsson (6 Jan 2010)
+- Julien Chaffraix fixed so that the fragment part in an URL is not sent
+ to the server anymore.
+
+Kamil Dudka (3 Jan 2010)
+- Julien Chaffraix eliminated a duplicated initialization in singlesocket().
+
+Daniel Stenberg (2 Jan 2010)
+- Make curl support --ssl and --ssl-reqd instead of the previous FTP-specific
+ versions --ftp-ssl and --ftp-ssl-reqd as these options are now used to
+ control SSL/TLS for IMAP, POP3 and SMTP as well in addition to FTP. The old
+ option names are still working but the new ones are the ones listed and
+ documented.
+
+Daniel Stenberg (1 Jan 2010)
+- Ingmar Runge enhanced libcurl's FTP engine to support the PRET command. This
+ command is a special "hack" used by the drftpd server, but even though it is
+ a custom extension I've deemed it fine to add to libcurl since this server
+ seems to survive and people keep using it and want libcurl to support
+ it. The new libcurl option is named CURLOPT_FTP_USE_PRET, and it is also
+ usable from the curl tool with --ftp-pret. Using this option on a server
+ that doesn't support this command will make libcurl fail.
+
+ I added test cases 1107 and 1108 to verify the functionality.
+
+ The PRET command is documented at
+ http://www.drftpd.org/index.php/Distributed_PASV
+
+Yang Tse (30 Dec 2009)
+- Steven M. Schweda improved VMS build system, and Craig A. Berry helped
+ with the patch and testing.
+
+Daniel Stenberg (26 Dec 2009)
+- Renato Botelho and Peter Pentchev brought a patch that makes the libcurl
+ headers work correctly even on FreeBSD systems before v8.
+
+ (http://curl.haxx.se/bug/view.cgi?id=2916915)
+
+Daniel Stenberg (17 Dec 2009)
+- David Byron fixed Curl_ossl_cleanup to actually call ENGINE_cleanup when
+ available.
+
+- Follow-up fix for the proxy fix I did for Jon Nelson's bug. It turned out I
+ was a bit too quick and broke test case 1101 with that change. The order of
+ some of the setups is sensitive. I now changed it slightly again to make
+ sure we do them in this order:
+
+ 1 - parse URL and figure out what protocol is used in the URL
+ 2 - prepend protocol:// to URL if missing
+ 3 - parse name+password off URL, which needs to know what protocol is used
+ (since only some allows for name+password in the URL)
+ 4 - figure out if a proxy should be used set by an option
+ 5 - if no proxy option, check proxy environment variables
+ 6 - run the protocol-specific setup function, which needs to have the proxy
+ already set
+
+Daniel Stenberg (15 Dec 2009)
+- Jon Nelson found a regression that turned out to be a flaw in how libcurl
+ detects and uses proxies based on the environment variables. If the proxy
+ was given as an explicit option it worked, but due to the setup order
+ mistake proxies would not be used fine for a few protocols when picked up
+ from '[protocol]_proxy'. Obviously this broke after 7.19.4. I now also added
+ test case 1106 that verifies this functionality.
+
+ (http://curl.haxx.se/bug/view.cgi?id=2913886)
+
+Daniel Stenberg (12 Dec 2009)
+- IMAP, POP3 and SMTP support and their TLS versions (including IMAPS, POP3S
+ and SMTPS) are now supported. The current state may not yet be solid, but
+ the foundation is in place and the test suite has some initial support for
+ these protocols. Work will now persue to make them nice libcurl citizens
+ until release.
+
+ The work with supporting these new protocols was sponsored by
+ networking4all.com - thanks!
+
+Daniel Stenberg (10 Dec 2009)
+- Siegfried Gyuricsko found out that the curl manual said --retry would retry
+ on FTP errors in the transient 5xx range. Transient FTP errors are in the
+ 4xx range. The code itself only tried on 5xx errors that occured _at login_.
+ Now the retry code retries on all FTP transfer failures that ended with a
+ 4xx response.
+
+ (http://curl.haxx.se/bug/view.cgi?id=2911279)
+
+- Constantine Sapuntzakis figured out a case which would lead to libcurl
+ accessing alredy freed memory and thus crash when using HTTPS (with
+ OpenSSL), multi interface and the CURLOPT_DEBUGFUNCTION and a certain order
+ of cleaning things up. I fixed it.
+
+ (http://curl.haxx.se/bug/view.cgi?id=2905220)
+
+Daniel Stenberg (7 Dec 2009)
+- Martin Storsjo made libcurl use the Expect: 100-continue header for posts
+ with unknown size. Previously it was only used for posts with a known size
+ larger than 1024 bytes.
+
+Daniel Stenberg (1 Dec 2009)
+- If the Expect: 100-continue header has been set by the application through
+ curl_easy_setopt with CURLOPT_HTTPHEADER, the library should set
+ data->state.expect100header accordingly - the current code (in 7.19.7 at
+ least) doesn't handle this properly. Martin Storsjo provided the fix!
+
+Yang Tse (28 Nov 2009)
+- Added Diffie-Hellman parameters to several test harness certificate files in
+ PEM format. Required by several stunnel versions used by our test harness.
+
+Daniel Stenberg (28 Nov 2009)
+- Markus Koetter provided a polished and updated version of Chad Monroe's TFTP
+ rework patch that now integrates TFTP properly into libcurl so that it can
+ be used non-blocking with the multi interface and more. BLKSIZE also works.
+
+ The --tftp-blksize option was added to allow setting the TFTP BLKSIZE from
+ the command line.
+
+Daniel Stenberg (26 Nov 2009)
+- Extended and fixed the change I did on Dec 11 for the the progress
+ meter/callback during FTP command/response sequences. It turned out it was
+ really lame before and now the progress meter SHOULD get called at least
+ once per second.
+
+Daniel Stenberg (23 Nov 2009)
+- Bjorn Augustsson reported a bug which made curl not report any problems even
+ though it failed to write a very small download to disk (done in a single
+ fwrite call). It turned out to be because fwrite() returned success, but
+ there was insufficient error-checking for the fclose() call which tricked
+ curl to believe things were fine.
+
+Yang Tse (23 Nov 2009)
+- David Byron modified Makefile.dist vc8 and vc9 targets in order to allow
+ finer granularity control when generating src and lib makefiles.
+
+Yang Tse (22 Nov 2009)
+- I modified configure to force removal of the curlbuild.h file included in
+ distribution tarballs for use by non-configure systems. As intended, this
+ would get overwriten when doing in-tree builds. But VPATH builds would end
+ having two curlbuild.h files, one in the source tree and another in the
+ build tree. With the modification I introduced 5 Nov 2009 this could become
+ an issue when running libcurl's test suite.
+
+Daniel Stenberg (20 Nov 2009)
+- Constantine Sapuntzakis identified a write after close, as the sockets were
+ closed by libcurl before the SSL lib were shutdown and they may write to its
+ socket. Detected to at least happen with OpenSSL builds.
+
+- Jad Chamcham pointed out a bug with connection re-use. If a connection had
+ CURLOPT_HTTPPROXYTUNNEL enabled over a proxy, a subsequent request using the
+ same proxy with the tunnel option disabled would still wrongly re-use that
+ previous connection and the outcome would only be badness.
+
+Yang Tse (18 Nov 2009)
+- I modified the memory tracking system to make it intolerant with zero sized
+ malloc(), calloc() and realloc() function calls.
+
+Daniel Stenberg (17 Nov 2009)
+- Constantine Sapuntzakis provided another fix for the DNS cache that could
+ end up with entries that wouldn't time-out:
+
+ 1. Set up a first web server that redirects (307) to a http://server:port
+ that's down
+ 2. Have curl connect to the first web server using curl multi
+
+ After the curl_easy_cleanup call, there will be curl dns entries hanging
+ around with in_use != 0.
+
+ (http://curl.haxx.se/bug/view.cgi?id=2891591)
+
+- Marc Kleine-Budde fixed: curl saved the LDFLAGS set during configure into
+ its pkg-config file. So -Wl stuff ended up in the .pc file, which is really
+ bad, and breaks if there are multiple -Wl in our LDFLAGS (which are in
+ PTXdist). bug #2893592 (http://curl.haxx.se/bug/view.cgi?id=2893592)
+
+Kamil Dudka (15 Nov 2009)
+- David Byron improved the configure script to use pkg-config to find OpenSSL
+ (and in particular the list of required libraries) even if a path is given
+ as argument to --with-ssl
+
+Yang Tse (15 Nov 2009)
+- I removed enable-thread / disable-thread configure option. These were only
+ placebo options. The library is always built as thread safe as possible on
+ every system.
+
+Claes Jakobsson (14 Nov 2009)
+- curl-config now accepts '--configure' to see what arguments was
+ passed to the configure script when building curl.
+
+Daniel Stenberg (14 Nov 2009)
+- Claes Jakobsson restored the configure functionality to detect NSS when
+ --with-nss is set but not "yes".
+
+ I think we can still improve that to check for pkg-config in that path etc,
+ but at least this patch brings back the same functionality we had before.
+
+- Camille Moncelier added support for the file type SSL_FILETYPE_ENGINE for
+ the client certificate. It also disable the key name test as some engines
+ can select a private key/cert automatically (When there is only one key
+ and/or certificate on the hardware device used by the engine)
+
+Yang Tse (14 Nov 2009)
+- Constantine Sapuntzakis provided the fix that ensures that an SSL connection
+ won't be reused unless protection level for peer and host verification match.
+
+ I refactored how preprocessor symbol _THREAD_SAFE definition is done.
+
+Kamil Dudka (12 Nov 2009)
+- Kevin Baughman provided a fix preventing libcurl-NSS from crash on doubly
+ closed NSPR descriptor. The issue was hard to find, reported several times
+ before and always closed unresolved. More info at the RH bug:
+ https://bugzilla.redhat.com/534176
+
+- libcurl-NSS now tries to reconnect with TLS disabled in case it detects
+ a broken TLS server. However it does not happen if SSL version is selected
+ manually. The approach was originally taken from PSM. Kaspar Brand helped me
+ to complete the patch. Original bug reports:
+ https://bugzilla.redhat.com/525496
+ https://bugzilla.redhat.com/527771
+
+Yang Tse (12 Nov 2009)
+- I modified configure script to make the getaddrinfo function check also
+ verify if the function is thread safe.
+
+Yang Tse (11 Nov 2009)
+- Marco Maggi reported that compilation failed when configured --with-gssapi
+ and GNU GSS installed due to a missing mutual exclusion of header files in
+ the Kerberos 5 code path. He also verified that my patch worked for him.
+
+Daniel Stenberg (11 Nov 2009)
+- Constantine Sapuntzakis posted bug #2891595
+ (http://curl.haxx.se/bug/view.cgi?id=2891595) which identified how an entry
+ in the DNS cache would linger too long if the request that added it was in
+ use that long. He also provided the patch that now makes libcurl capable of
+ still doing a request while the DNS hash entry may get timed out.
+
+- Christian Schmitz noticed that the progress meter/callback was not properly
+ used during the FTP connection phase (after the actual TCP connect), while
+ it of course should be. I also made the speed check get called correctly so
+ that really slow servers will trigger that properly too.
+
+Kamil Dudka (5 Nov 2009)
+- Dropped misleading timeouts in libcurl-NSS and made sure the SSL socket works
+ in non-blocking mode.
+
+Yang Tse (5 Nov 2009)
+- I removed leading 'curl' path on the 'curlbuild.h' include statement in
+ curl.h, adjusting auto-makefiles include path, to enhance portability to
+ OS's without an orthogonal directory tree structure such as OS/400.
+
+Daniel Stenberg (4 Nov 2009)
+- I fixed several problems with the transfer progress meter. It showed the
+ wrong percentage for small files, most notable for <1000 bytes and could
+ easily end up showing more than 100% at the end. It also didn't show any
+ percentage, transfer size or estimated transfer times when transferring
+ less than 100 bytes.
+
+Version 7.19.7 (4 November 2009)
+
+Daniel Stenberg (2 Nov 2009)
+- As reported independent by both Stan van de Burgt and Didier Brisebourg,
+ CURLINFO_SIZE_DOWNLOAD (the -w variable size_download) didn't work when
+ getting data from ldap!
+
+Daniel Stenberg (31 Oct 2009)
+- Gabriel Kuri reported a problem with CURLINFO_CONTENT_LENGTH_DOWNLOAD if the
+ download was 0 bytes, as libcurl would then return the size as unknown (-1)
+ and not 0. I wrote a fix and test case 566 to verify it.
+
+Daniel Stenberg (30 Oct 2009)
+- Liza Alenchery mentioned a problem with re-used SCP connection when a bad
+ auth is used, as it caused a crash. I failed to repeat the issue, but still
+ made a change that now forces the TCP connection used for a freed SCP
+ session to get closed and not be re-used.
+
+- "Tom" posted a bug report that mentioned how libcurl did wrong when doing a
+ POST using a read callback, with Digest authentication and
+ "Transfer-Encoding: chunked" enforced. I would then cause the first request
+ to be wrongly sent and then basically hang until the server closed the
+ connection. I fixed the problem and added test case 565 to verify it.
+
+Daniel Stenberg (25 Oct 2009)
+- Dima Barsky made the curl cookie parser accept cookies even with blank or
+ unparsable expiry dates and then treat them as session cookies - previously
+ libcurl would reject cookies with a date format it couldn't parse. Research
+ shows that the major browser treat such cookies as session cookies. I
+ modified test 8 and 31 to verify this.
+
+Daniel Stenberg (21 Oct 2009)
+- Attempt to use pkg-config for finding out libssh2 installation details
+ during configure.
+
+- A patch in bug report #2883177 (http://curl.haxx.se/bug/view.cgi?id=2883177)
+ by Johan van Selst introduced the --crlfile option to curl, which makes curl
+ tell libcurl about a file with CRL (certificate revocation list) data to
+ read.
+
+Daniel Stenberg (18 Oct 2009)
+- Ray Dassen provided a patch in Debian's bug tracker (bug number #551461)
+ that now makes curl_getdate(3) actually handles RFC 822 formatted dates that
+ use the "single letter military timezones".
+ http://www.rfc-ref.org/RFC-TEXTS/822/chapter5.html has the details.
+
+- Fixed memory leak in the SCP/SFTP code as it never freed the knownhosts
+ data!
+
+- John Dennis filed bug report #2873666
+ (http://curl.haxx.se/bug/view.cgi?id=2873666) which identified a problem
+ which made libcurl loop infinitely when given incorrect credentials when
+ using HTTP GSS negotiate authentication. He also provided a small and simple
+ patch for it.
+
+- Kevin Baughman found a double close() problem with libcurl-NSS, as when
+ libcurl called NSS to close the SSL "session" it also closed the actual
+ socket.
+
+Yang Tse (17 Oct 2009)
+- Bug report #2866724 indicated
+ (http://curl.haxx.se/bug/view.cgi?id=2866724) that curl on Windows failed
+ when writing files whose file names originally contained characters which
+ are not valid for file names on Windows. Dan Fandrich provided an initial
+ patch and another revised one to fix this issue.
+
+Daniel Stenberg (1 Oct 2009)
+- Tom Mueller correctly reported in bug report #2870221
+ (http://curl.haxx.se/bug/view.cgi?id=2870221) that libcurl returned an
+ incorrect return code from the internal trynextip() function which caused
+ him grief. This is a regression that was introduced in 7.19.1 and I find it
+ strange it hasn't hit us harder, but I won't persue into figuring out
+ exactly why.
+
+- Constantine Sapuntzakis: The current implementation will always set
+ SO_SNDBUF to CURL_WRITE_SIZE even if the SO_SNDBUF starts out larger. The
+ patch doesn't do a setsockopt if SO_SNDBUF is already greater than
+ CURL_WRITE_SIZE. This should help folks who have set up their computer with
+ large send buffers.
+
+Daniel Stenberg (27 Sep 2009)
+- I introduced a maximum limit for received HTTP headers. It is controlled by
+ the define CURL_MAX_HTTP_HEADER which is even exposed in the public header
+ file to allow for users to fairly easy rebuild libcurl with a modified
+ limit. The rationale for a fixed limit is that libcurl is realloc()ing a
+ buffer to be able to put a full header into it, so that it can call the
+ header callback with the entire header, but that also risk getting it into
+ trouble if a server by mistake or willingly sends a header that is more or
+ less without an end. The limit is set to 100K.
+
+Daniel Stenberg (26 Sep 2009)
+- John P. McCaskey posted a bug report that showed how libcurl did wrong when
+ saving received cookies with no given path, if the path in the request had a
+ query part. That is means a question mark (?) and characters on the right
+ side of that. I wrote test case 1105 and fixed this problem.
+
+Kamil Dudka (26 Sep 2009)
+- Implemented a protocol independent way to specify blocking direction, used by
+ transfer.c for blocking. It is currently used only by SCP and SFTP protocols.
+ This enhancement resolves an issue with 100% CPU usage during SFTP upload,
+ reported by Vourhey.
+
+Daniel Stenberg (25 Sep 2009)
+- Chris Mumford filed bug report #2861587
+ (http://curl.haxx.se/bug/view.cgi?id=2861587) identifying that libcurl used
+ the OpenSSL function X509_load_crl_file() wrongly and failed if it would
+ load a CRL file with more than one certificate within. This is now fixed.
+
+Daniel Stenberg (16 Sep 2009)
+- Sven Anders reported that we introduced a cert verfication flaw for OpenSSL-
+ powered libcurl in 7.19.6. If there was a X509v3 Subject Alternative Name
+ field in the certficate it had to match and so even if non-DNS and non-IP
+ entry was present it caused the verification to fail.
+
+Daniel Fandrich (15 Sep 2009)
+- Moved the libssh2 checks after the SSL library checks. This helps when
+ statically linking since libssh2 needs the SSL library link flags to be
+ set up already to satisfy its dependencies. This wouldn't be necessary if
+ the libssh2 configure check was changed to use pkg-config since the
+ --static flag would add the dependencies automatically.
+
+Yang Tse (14 Sep 2009)
+- Revert Joshua Kwan's patch committed 11 Sep 2009.
+
+ Some systems poll function sets POLLHUP in revents without setting
+ POLLIN, and sets POLLERR without setting POLLIN and POLLOUT. In some
+ libcurl code execution paths this could trigger busy wait loops with
+ high CPU usage until a timeout condition aborted the loop.
+
+ The reverted patch addressed the above issue for a very specific case,
+ when awaiting c-ares to resolve. A libcurl-wide fix for Curl_poll now
+ superceeds this one.
+
+Guenter Knauf (11 Sep 2009)
+- Joshua Kwan provided a patch to pass POLLERR / POLLHUP back to c-ares.
+ This fixes a loop problem with high CPU usage.
+
+Daniel Stenberg (10 Sep 2009)
+- Claes Jakobsson fixed a problem with cookie expiry dates at exctly the epoch
+ start second "Thu Jan 1 00:00:00 GMT 1970" as the date parser then returns 0
+ which internally then is treated as a session cookie. That particular date
+ is now made to get the value of 1.
+
+Daniel Stenberg (2 Sep 2009)
+- Daniel Johnson found a flaw in the code converting sftp-errors to libcurl
+ errors.
+
+Daniel Stenberg (1 Sep 2009)
+- Peter Sylvester made a debug feature for Curl_resolv() that now will force
+ libcurl to resolve 'localhost' whatever name you use in the URL *if* you set
+ the --interface option to (exactly) "LocalHost". This will enable us to
+ write tests for custom hosts names but still use a local host server.
+
+- configure now tries to use pkg-config for a number of sub-dependencies even
+ when cross-compiling. The key to success is then you properly setup
+ PKG_CONFIG_PATH before invoking configure.
+
+ I also improved how NSS is detected by trying nss-config if pkg-config isn't
+ present, and as a last resort just use the lib name and force the user to
+ setup the LIBS/LDFLAGS/CFLAGS etc properly. The previous last resort would
+ add a range of various libs that would almost never be quite correct.
+
+Daniel Stenberg (31 Aug 2009)
+- When using the multi interface with FTP and you asked for NOBODY, you did no
+ QUOTE commands and the request used the same path as the connection had
+ already changed to, it would decide that no commands would be necessary for
+ the "DO" action and that was not handled properly but libcurl would instead
+ hang.
+
+Kamil Dudka (28 Aug 2009)
+- Improved error message for not matching certificate subject name in
+ libcurl-NSS. Originally reported at:
+ https://bugzilla.redhat.com/show_bug.cgi?id=516056#c9
+
+Patrick Monnerat (24 Aug 2009)
+- Introduced a SYST-based test to properly set-up name format when dealing
+ with the OS/400 FTP server.
+
+- Fixed an ftp_readresp() bug preventing detection of failing control socket
+ and causing FTP client to loop forever.
+
+Daniel Stenberg (24 Aug 2009)
+- Marc de Bruin pointed out that configure --with-gnutls=PATH didn't work
+ properly and provided a fix. http://curl.haxx.se/bug/view.cgi?id=2843008
+
+- Eric Wong introduced support for the new option -T. (dot) that makes curl
+ read stdin in a non-blocking fashion. This also brings back -T- (minus) to
+ the previous blocking behavior since it could break stuff for people at
+ times.
+
+Michal Marek (21 Aug 2009)
+- With CURLOPT_PROXY_TRANSFER_MODE, avoid sending invalid URLs like
+ ftp://example.com;type=i if the user specified ftp://example.com without the
+ slash.
+
+Daniel Stenberg (21 Aug 2009)
+- Andre Guibert de Bruet pointed out a missing return code check for a
+ strdup() that could lead to segfault if it returned NULL. I extended his
+ suggest patch to now have Curl_retry_request() return a regular return code
+ and better check that.
+
+- Lots of good work by Krister Johansen, mostly related to pipelining:
+
+ Fix SIGSEGV on free'd easy_conn when pipe unexpectedly breaks
+ Fix data corruption issue with re-connected transfers
+ Fix use after free if we're completed but easy_conn not NULL
+
+Kamil Dudka (13 Aug 2009)
+- Changed NSS code to not ignore the value of ssl.verifyhost and produce more
+ verbose error messages. Originally reported at:
+ https://bugzilla.redhat.com/show_bug.cgi?id=516056
+
+Daniel Stenberg (12 Aug 2009)
+- Karl Moerder fixed the Makefile.vc* makefiles to include the new file
+ nonblock.c so that they work fine again
+
+- I expanded test 517 with a bunch of more dates that originate from the
+ Chrome browser test suite. It turns out most of them get parsed the same
+ way.
+
+Version 7.19.6 (12 August 2009)
+
+Daniel Stenberg (12 Aug 2009)
+- Carsten Lange reported a bug and provided a patch for TFTP upload and the
+ sending of the TSIZE option. I don't like fixing bugs just hours before
+ a release, but since it was broken and the patch fixes this for him I decided
+ to get it in anyway.
+
+Daniel Stenberg (11 Aug 2009)
+- Peter Sylvester made the HTTPS test server use specific certificates for
+ each test, so that the test suite can now be used to actually test the
+ verification of cert names etc. This made an error show up in the OpenSSL-
+ specific code where it would attempt to match the CN field even if a
+ subjectAltName exists that doesn't match. This is now fixed and verified
+ in test 311.
+
+- Benbuck Nason posted the bug report #2835196
+ (http://curl.haxx.se/bug/view.cgi?id=2835196), fixing a few compiler
+ warnings when mixing ints and bools.
+
+Daniel Fandrich (10 Aug 2009)
+- Fixed a memory leak in the FTP code and an off-by-one heap buffer overflow.
+
+Daniel Fandrich (9 Aug 2009)
+- Fixed some memory leaks in the command-line tool that caused most of the
+ torture tests to fail.
+
+Daniel Stenberg (2 Aug 2009)
+- Curt Bogmine reported a problem with SNI enabled on a particular server. We
+ should introduce an option to disable SNI, but as we're in feature freeze
+ now I've addressed the obvious bug here (pointed out by Peter Sylvester): we
+ shouldn't try to enable SNI when SSLv2 or SSLv3 is explicitly selected.
+ Code for OpenSSL and GnuTLS was fixed. NSS doesn't seem to have a particular
+ option for SNI, or are we simply not using it?
+
+Daniel Stenberg (1 Aug 2009)
+- Scott Cantor posted the bug report #2829955
+ (http://curl.haxx.se/bug/view.cgi?id=2829955) mentioning the recent SSL cert
+ verification flaw found and exploited by Moxie Marlinspike. The presentation
+ he did at Black Hat is available here:
+ https://www.blackhat.com/html/bh-usa-09/bh-usa-09-archives.html#Marlinspike
+
+ Apparently at least one CA allowed a subjectAltName or CN that contain a
+ zero byte, and thus clients that assumed they would never have zero bytes
+ were exploited to OK a certificate that didn't actually match the site. Like
+ if the name in the cert was "example.com\0theatualsite.com", libcurl would
+ happily verify that cert for example.com.
+
+ libcurl now better uses the length of the extracted name, not using the zero
+ termination for getting the string length.
+
+ This fixing only made and needed in OpenSSL interfacing code.
+
+- Tanguy Fautre pointed out that OpenSSL's function RAND_screen() (present
+ only in some OpenSSL installs - like on Windows) isn't thread-safe and we
+ agreed that moving it to the global_init() function is a decent way to deal
+ with this situation.
+
+- Alexander Beedie provided the patch for a noproxy problem: If I have set
+ CURLOPT_NOPROXY to "*", or to a host that should not use a proxy, I actually
+ could still end up using a proxy if a proxy environment variable was set.
+
+Daniel Stenberg (27 Jul 2009)
+- All the quote options (CURLOPT_QUOTE, CURLOPT_POSTQUOTE and
+ CURLOPT_PREQUOTE) now accept a preceeding asterisk before the command to
+ send when using FTP, as a sign that libcurl shall simply ignore the response
+ from the server instead of treating it as an error. Not treating a 400+ FTP
+ response code as an error means that failed commands will not abort the
+ chain of commands, nor will they cause the connection to get disconnected.
+
+Daniel Stenberg (26 Jul 2009)
+- Johan van Selst posted bug report #2825989
+ (http://curl.haxx.se/bug/view.cgi?id=2825989) pointing out that
+ OpenSSL-powered libcurl didn't support the SHA-2 digest algorithm, and
+ provided the solution too: to use OpenSSL_add_all_algorithms() in addition
+ to the older SSLeay_* alternative. OpenSSL_add_all_algorithms was added in
+ OpenSSL 0.9.5
+
+Daniel Stenberg (23 Jul 2009)
+- Added CURLOPT_SSH_KNOWNHOSTS, CURLOPT_SSH_KEYFUNCTION, CURLOPT_SSH_KEYDATA.
+ They introduce known_host support for SSH keys to libcurl. See docs for
+ details. Note that this feature depends on a new enough libssh2 version, to
+ be supported in libssh2 1.2 and later (or current git repo at this time).
+
+Michal Marek (22 Jul 2009)
+- David Binderman found a memory and fd leak in lib/gtls.c:load_file()
+ (https://bugzilla.novell.com/523919). When looking at the code, I found that
+ also the ptr pointer can leak.
+
+Kamil Dudka (20 Jul 2009)
+- Claes Jakobsson improved the support for client certificates handling in
+ NSS-powered libcurl. Now the client certificates can be selected
+ automatically by a NSS built-in hook. Additionally pre-login to all PKCS11
+ slots is no more performed. It used to cause problems with HW tokens.
+
+- Fixed reference counting for NSS client certificates. Now the PEM reader
+ module should be always properly unloaded on Curl_nss_cleanup(). If the
+ unload fails though, libcurl will try to reuse the already loaded instance.
+
+Daniel Fandrich (15 Jul 2009)
+- Added nonblock.c to the non-automake makefiles (note that the dependencies
+ in the Watcom makefiles aren't quite correct).
+
+Michal Marek (15 Jul 2009)
+- Changed the description of CURLINFO_OS_ERRNO to make it clear that the
+ errno is not reset on success.
+
+Guenter Knauf (14 Jul 2009)
+- renamed generated config.h to curl_config.h to avoid any future clashes
+ with config.h from other projects.
+
+Daniel Stenberg (9 Jul 2009)
+- Eric Wong introduced curlx_nonblock() that the curl tool now (re-)uses for
+ setting a file descriptor non-blocking. Used by the functionality Eric
+ himself brough on June 15th.
+
+Daniel Stenberg (8 Jul 2009)
+- Constantine Sapuntzakis posted bug report #2813123
+ (http://curl.haxx.se/bug/view.cgi?id=2813123) and an a patch that fixes the
+ problem:
+
+ Url A is accessed using auth. Url A redirects to Url B (on a different
+ server0. Url B reuses a persistent connection. Url B has auth, even though
+ it's on a different server.
+
+ Note: if Url B does not reuse a persistent connection, auth is not sent.
+
+ reason:
+
+ data->state.first_host is not initialized becuase Curl_http_connect is not
+ called when a connection is reused.
+
+ Solution:
+
+ move initialization of data->state.first_host to Curl_http. No code before
+ Curl_http uses data->state.first_host anyway.
+
+Guenter Knauf (4 Jul 2009)
+- Markus Koetter provided a patch to avoid getnameinfo() usage which broke a
+ couple of both IPv4 and IPv6 autobuilds.
+
+Daniel Stenberg (29 Jun 2009)
+- Markus Koetter made CURLOPT_FTPPORT (and curl's -P/--ftpport) support a port
+ range if given colon-separated after the host name/address part. Like
+ "192.168.0.1:2000-10000"
+
+- Modified the separators used for CURLOPT_CERTINFO in multi-part outputs. I
+ don't know how they got wrong in the first place, but using this output
+ format makes it possible to quite easily separate the string into an array
+ of multiple items.
+
+Daniel Fandrich (16 June 2009)
+- Added a few more compiler warning options for gcc.
+
+Daniel Stenberg (16 Jun 2009)
+- Reuven Wachtfogel made curl -o - properly produce a binary output on windows
+ (no newline translations). Use -B/--use-ascii if you rather get the ascii
+ approach.
+
+Michal Marek (16 Jun 2009)
+- When doing non-anonymous ftp via http proxies and the password is not
+ provided in the url, add it there (squid needs this).
+
+Daniel Stenberg (15 Jun 2009)
+- Eric Wong's patch:
+
+ This allows curl(1) to be used as a client-side tunnel for arbitrary stream
+ protocols by abusing chunked transfer encoding in both the HTTP request and
+ HTTP response. This requires server support for sending a response while a
+ request is still being read, of course.
+
+ If attempting to read from stdin returns EAGAIN, then we pause our sender.
+ This leaves curl to attempt to read from the socket while reading from stdin
+ (and thus sending) is paused.
+
+ This change was needed to allow successfully tunneling the git protocol over
+ HTTP (--no-buffer is needed, as well).
+
+Patrick Monnerat (15 Jun 2009)
+- Replaced use of standard C library rand()/srand() by our own pseudo-random
+ number generator.
+
+Yang Tse (11 Jun 2009)
+- I adapted testcurl script to allow building test harness programs when
+ cross-compiling for a *-*-mingw* host.
+
+Daniel Stenberg (10 Jun 2009)
+- Fabian Keil ran clang on the (lib)curl code, found a bunch of warnings and
+ contributed a range of patches to fix them.
+
+Yang Tse (10 Jun 2009)
+- I introduced configure script option --enable-curldebug which now allows
+ the decoupled enabling or disabling of the curl debug memory tracking
+ feature from the --enable-debug option which no longer controls this.
+
+ curl --version will list 'Debug' feature for debug enabled builds, and
+ will list 'TrackMemory' feature for curl debug memory tracking capable
+ builds. These features are independent and can be controlled when running
+ the configure script. When --enable-debug is given both features will be
+ enabled, unless some restriction prevents memory tracking from being used.
+
+ Internally, definition of preprocessor symbol DEBUGBUILD restricts code
+ which is only compiled for debug enabled builds. And symbol CURLDEBUG is
+ used to differentiate code which is _only_ used for memory tracking.
+
+Yang Tse (9 Jun 2009)
+- Daniel Steinberg pointed out that Curl_FormInit() in formdata.c was not
+ initializing the fread callback pointer and this triggered a compiler
+ warning, also provided a friendly suggestion on how to fix it.
+
+Daniel Stenberg (8 Jun 2009)
+- Claes Jakobsson provided a patch for libcurl-NSS that fixed a bad refcount
+ issue with client certs that caused issues like segfaults.
+ http://curl.haxx.se/mail/lib-2009-05/0316.html
+
+- Triggered by bug report #2798852 and the patch in there, I fixed configure
+ to detect gnutls build options with pkg-config only and not libgnutls-config
+ anymore since GnuTLS has stopped distributing that tool. If an explicit path
+ is given to configure, we will instead guess on how to link and use that
+ lib. I did not use the patch from the bug report.
+
+Yang Tse (8 Jun 2009)
+- Igor Novoseltsev adjusted Makefile.vxworks to get sources and headers
+ included from Makefile.inc, and provided docs\INSTALL VxWorks section.
+
+- I removed buildconf.bat from release and daily snapshot archives. This
+ file is only for CVS tree checkout builds.
+
+Daniel Stenberg (8 Jun 2009)
+- Eric Wong fixed --no-buffer to actually switch off output buffering. Been
+ broken since 7.19.0
+
+Bill Hoffman (6 Jun 2009)
+- Added some cmake docs and fixed socklen_t in the build.
+
+Yang Tse (5 Jun 2009)
+- John E. Malmberg provided VMS specific patch: "This fixes an existing bug
+ in urlglob.c where it was not converting the Curl Unix exit code to a VMS
+ DCL compatible exit code. This fix required the enhancement described next.
+ This also adds an enhancement to main.c so that when curl is run under a
+ Unix shell like Bash on VMS, it will return the standard Unix exit codes
+ and messages." And another patch for docs/examples.
+
+ I introduced os-specific.c and os-specific.h for use in curl tool code
+ and adjusted John E. Malmberg's patch placement to use these new files
+ as an effort to prevent main.c from growing ad infinitum. Code already
+ existing in main.c which is OS specific should be moved into these files.
+
+Daniel Stenberg (4 June 2009)
+- Setting the Content-Length: header from your app when you do a POST or PUT
+ is almost always a VERY BAD IDEA. Yet there are still apps out there doing
+ this, and now recently it triggered a bug/side-effect in libcurl as when
+ libcurl sends a POST or PUT with NTLM, it sends an empty post first when it
+ knows it will just get a 401/407 back. If the app then replaced the
+ Content-Length header, it caused the server to wait for input that libcurl
+ wouldn't send. Aaron Oneal reported this problem in bug report #2799008
+ (http://curl.haxx.se/bug/view.cgi?id=2799008) and helped us verify the fix.
+
+Yang Tse (4 Jun 2009)
+- Igor Novoseltsev provided patches and information, that after some
+ adjustments to better fit curl's way of doing things, have resulted
+ in the posibility of building libcurl for VxWorks.
+
+Daniel Fandrich (2 June 2009)
+- Checked in a Google Android make file. To use it, you must first
+ create a config.h file by running configure in the Android environment,
+ which doesn't seem to be easy to do. If no easy way can be found, a
+ static config-android.h may need to be created and checked in to the
+ libcurl source tree.
+
+Daniel Stenberg (1 June 2009)
+- Claes Jakobsson fixed the configure script to better find and use NSS
+ without pkg-config.
+
+Yang Tse (1 Jun 2009)
+- John E. Malmberg provided a VMS specific clean-up for curl.h, and pointed
+ out that the configure script was failing to detect the timeval struct on
+ VMS when building with _XOPEN_SOURCE_EXTENDED undefined due to definition
+ taking place in socket.h instead of time.h. I have adjusted configure
+ script to also include this header when checking struct timeval.
+
+Daniel Stenberg (27 May 2009)
+- Frank McGeough provided a small OpenSSL #include fix to make libcurl compile
+ fine with Nokia 5th edition 1.0 SDK for Symbian.
+
+- Andre Guibert de Bruet found a call to a OpenSSL function that didn't check
+ for a failure properly.
+
+- Mike Crowe pointed out that setting CURLOPT_USERPWD to NULL used to clear
+ the auth credentials back in 7.19.0 and earlier while now you have to set ""
+ to get the same effect. His patch brings back the ability to use NULL.
+
+- Claes Jakobsson fixed libcurl-NSS to build fine even without the
+ PK11_CreateGenericObject() function.
+
+Daniel Stenberg (25 May 2009)
+- bug report #2796358 (http://curl.haxx.se/bug/view.cgi?id=2796358) pointed
+ out that the cookie parser would leak memory when it parses cookies that are
+ received with domain, path etc set multiple times in the same header. While
+ such a cookie is questionable, they occur in the wild and libcurl no longer
+ leaks memory for them. I added such a header to test case 8.
+
+Daniel Fandrich (22 May 2009)
+- Removed some obsolete digest code that caused a valgrind error in test 551.
+
+Daniel Fandrich (20 May 2009)
+- Added "non-existing host" test keywords to make it easy to skip those
+ tests on machines that have broken DNS configurations (such as
+ those configured to use OpenDNS).
+
+Daniel Stenberg (19 May 2009)
+- Kamil Dudka brought the patch from the Redhat bug entry
+ https://bugzilla.redhat.com/show_bug.cgi?id=427966 which was libcurl closing
+ a bad file descriptor when closing down the FTP data connection. Caolan
+ McNamara seems to be the original author of it.
+
+Version 7.19.5 (18 May 2009)
+
+Daniel Stenberg (17 May 2009)
+- James Bursa posted a patch to the mailing list that fixed a problem with
+ no_proxy which made it not skip the proxy if the URL entered contained a
+ user name. I added test case 1101 to verify.
+
+Daniel Stenberg (11 May 2009)
+- Balint Szilakszi reported a memory leak when libcurl did gzip decompression
+ of streams that had some parts (legitimately) missing. We now provide and use
+ a proper cleanup function for the content encoding submodule.
+ http://curl.haxx.se/mail/lib-2009-05/0092.html
+
+- Kamil Dudka provided a fix for libcurl-NSS reported by Michael Cronenworth
+ at https://bugzilla.redhat.com/show_bug.cgi?id=453612#c12
+
+ If an incorrect password is given while loading a private key, libcurl ends
+ up in an infinite loop consuming memory. The bug is critical.
+
+- I fixed the problem with doing NTLM, POST and then following a 302 redirect,
+ as reported by Ebenezer Ikonne (on curl-users) and Laurent Rabret (on
+ curl-library). The transfer was mistakenly marked to get more data to send
+ but since it didn't actually have that, it just hung there...
+
+Daniel Stenberg (10 May 2009)
+- Andre Guibert de Bruet correctly pointed out an over-alloc with one wasted
+ byte in the digest code.
+
+Yang Tse (9 May 2009)
+- Removed DOS and TPF package's subdirectory Makefile.am, it was only used
+ to include some files in the distribution tarball serving no other purpose.
+ Files from the DOS and TPF subdirectories are now included in the EXTRA_DIST
+ of the Makefile in the parent subdirectory.
+
+Yang Tse (8 May 2009)
+- Changed host name literal in several tests to one under the haxx.se domain.
+
+- Renamed vc6 workspace and project files to avoid filename clash when used
+ for conversion to later VS versions.
+
+Daniel Stenberg (8 May 2009)
+- Constantine Sapuntzakis fixed bug report #2784055
+ (http://curl.haxx.se/bug/view.cgi?id=2784055) identifying a problem to
+ connect to SOCKS proxies when using the multi interface. It turned out to
+ almost not work at all previously. We need to wait for the TCP connect to
+ be properly verified before doing the SOCKS magic.
+
+ There's still a flaw in the FTP code for this.
+
+Daniel Stenberg (7 May 2009)
+- Made the SO_SNDBUF setting for the data connection socket for ftp uploads as
+ well. See change 28 Apr 2009.
+
+Yang Tse (7 May 2009)
+- Fixed an issue affecting FTP transfers, introduced with the transfer.c
+ patch committed May 4.
+
+Daniel Stenberg (7 May 2009)
+- Man page *roff problems fixed thanks to input from Colin Watson. Problems
+ reported in the Debian package.
+
+- Vijay G filed bug report #2723236
+ (http://curl.haxx.se/bug/view.cgi?id=2723236) identifying a problem with
+ libcurl's TFTP code and its lack of dealing with the OACK packet.
+
+Yang Tse (5 May 2009)
+- Fixed the --ftp-port address of test #251 to the CLIENTIP address, and
+ reverted the change affecting test suite harness committed 4 May.
+
+Daniel Stenberg (5 May 2009)
+- Inspired by Michael Smith's session id fix for OpenSSL, I did the
+ corresponding fix in the GnuTLS code: make sure to store the new session id
+ in case the previous re-used one is rejected.
+
+Daniel Stenberg (4 May 2009)
+- Michael Smith posted bug report #2786255
+ (http://curl.haxx.se/bug/view.cgi?id=2786255) with a patch, identifying how
+ libcurl did not deal with SSL session ids properly if the server rejected a
+ re-use of one. Starting now, it will forget the rejected one and remember
+ the new. This change was for OpenSSL only, it is likely that other SSL lib
+ code needs similar fixes.
+
+Yang Tse (4 May 2009)
+- Applied David McCreedy's "transfer.c fixes for CURL_DO_LINEEND_CONV and
+ non-ASCII platform HTTP requests" patch addressing two HTTP PUT problems:
+ 1) On non-ASCII platforms not all of the protocol portions of the PUT are
+ being translated to ASCII. 2) On all platforms the line endings of part of
+ the protocol portions are mangled from CRLF to CRCRLF if data->set.crlf or
+ data->set.prefer_ascii are set (depending on CURL_DO_LINEEND_CONV).
+
+- Applied David McCreedy's patch to fix test suite harness to allow test FTP
+ server and client on different machines, providing FTP client address when
+ running the FTP test server.
+
+Daniel Fandrich (3 May 2009)
+- Added and disabled test case 563 which shows KNOWN_BUGS #59. The bug
+ report failed to mention that a proxy must be used to reproduce it.
+
+Yang Tse (2 May 2009)
+- Use a build-time configured curl_socklen_t data type instead of socklen_t.
+
+Yang Tse (1 May 2009)
+- Applied David McCreedy's patches "TPF-platform specific changes to various
+ files" and "http.c fix to Curl_proxyCONNECT for non-ASCII platforms", the
+ former with minor edits.
+
+Daniel Stenberg (30 Apr 2009)
+- I was going to fix issue #59 in KNOWN_BUGS
+
+ If the CURLOPT_PORT option is used on an FTP URL like
+ "ftp://example.com/file;type=A" the ";type=A" is stripped off.
+
+ I added test case 562 to verify, only to find out that I couldn't repeat
+ this bug so I hereby consider it not a bug anymore!
+
+Daniel Stenberg (29 Apr 2009)
+- Based on bug report #2723219 (http://curl.haxx.se/bug/view.cgi?id=2723219)
+ I've now made TFTP "connections" not being kept for re-use within libcurl.
+ TFTP is UDP-based so the benefit was really low (if even existing) to begin
+ with so instead of tracking down to fix this problem we instead removed the
+ re-use. I also enabled test case 1099 that I wrote a few days ago to verify
+ that this change fixes the reported problem.
+
+Daniel Stenberg (28 Apr 2009)
+- Constantine Sapuntzakis filed bug report #2783090
+ (http://curl.haxx.se/bug/view.cgi?id=2783090) pointing out that on windows
+ we need to grow the SO_SNDBUF buffer somewhat to get really good upload
+ speeds. http://support.microsoft.com/kb/823764 has the details. Friends
+ confirmed that simply adding 32 to CURL_MAX_WRITE_SIZE is enough.
+
+- Bug report #2709004 (http://curl.haxx.se/bug/view.cgi?id=2709004) by Tim
+ Chen pointed out how curl couldn't upload with resume when reading from a
+ pipe.
+
+ This ended up with the introduction of a new return code for the
+ CURLOPT_SEEKFUNCTION callback that basically says that the seek failed but
+ that libcurl may try to resolve the situation anyway. In our case this means
+ libcurl will attempt to instead read that much data from the stream instead
+ of seeking and that way curl can now upload with resume when data is read
+ from a stream!
+
+Daniel Stenberg (26 Apr 2009)
+- Bug report #2779733 (http://curl.haxx.se/bug/view.cgi?id=2779733) by Sven
+ Wegener pointed out that CURLINFO_APPCONNECT_TIME didn't work with the multi
+ interface and provided a patch that fixed the problem!
+
+Daniel Stenberg (24 Apr 2009)
+- Kamil Dudka fixed another NSS-related leak when client certs were used.
+
+- Bug report #2779245 (http://curl.haxx.se/bug/view.cgi?id=2779245) by Rainer
+ Koenig pointed out that the man page didn't tell that the *_proxy
+ environment variables can be specified lower case or UPPER CASE and the
+ lower case takes precedence,
+
+Daniel Fandrich (21 Apr 2009)
+- Added new libcurl source files to Amiga, RiscOS and VC6 build files.
+
+Yang Tse (21 Apr 2009)
+- Moved potential inclusion of system's malloc.h and memory.h header files to
+ setup_once.h. Inclusion of each header file is based on the definition of
+ NEED_MALLOC_H and NEED_MEMORY_H respectively.
+
+ Renamed libcurl's memory.h to curl_memory.h
+
+Daniel Stenberg (20 Apr 2009)
+- Leanic Lefever reported a crash and did some detailed research on why and
+ how it occurs (http://curl.haxx.se/mail/lib-2009-04/0289.html). The
+ conclusion was that if an error is detected and Curl_done() is called for
+ the connection, ftp_done() could at times return another error code that
+ then would take precedence and that new code confused existing logic that
+ works for the first error code (CURLE_SEND_ERROR) only.
+
+- Gisle Vanem noticed that --libtool would produce bogus strings at times for
+ OBJECTPOINT options. Now we've introduced a new function - my_setopt_str -
+ within the app for setting plain string options to avoid the risk of this
+ mistake happening.
+
+Daniel Stenberg (17 Apr 2009)
+- Pramod Sharma reported and tracked down a bug when doing FTP over a HTTP
+ proxy. libcurl would then wrongly close the connection after each
+ request. In his case it had the weird side-effect that it killed NTLM auth
+ for the proxy causing an inifinite loop!
+
+ I added test case 1098 to verify this fix. The test case does however not
+ properly verify that the transfers are done persistently - as I couldn't
+ think of a clever way to achieve it right now - but you need to read the
+ stderr output after a test run to see that it truly did the right thing.
+
+Daniel Stenberg (13 Apr 2009)
+- bug report #2727981 (http://curl.haxx.se/bug/view.cgi?id=2727981) by Martin
+ Storsjö pointed out how setting CURLOPT_NOBODY to 0 could be downright
+ confusing as it set the method to either GET or HEAD. The example he showed
+ looked like:
+
+ curl_easy_setopt(curl, CURLOPT_PUT, 1);
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 0);
+
+ The new way doesn't alter the method until the request is about to start. If
+ CURLOPT_NOBODY is then 1 the HTTP request will be HEAD. If CURLOPT_NOBODY is
+ 0 and the request happens to have been set to HEAD, it will then instead be
+ set to GET. I believe this will be less surprising to users, and hopefully
+ not hit any existing users badly.
+
+- Toshio Kuratomi reported a memory leak problem with libcurl+NSS that turned
+ out to be leaking cacerts. Kamil Dudka helped me complete the fix. The issue
+ is found in Redhat's bug tracker:
+ https://bugzilla.redhat.com/show_bug.cgi?id=453612
+
+ There are still memory leaks present, but they seem to have other reasons.
+
+Daniel Fandrich (11 Apr 2009)
+- Added new libcurl source files to Symbian OS build files.
+- Improved Symbian support for SSL.
+
+Yang Tse (10 Apr 2009)
+- Daniel Johnson improved the MacOSX-Framework shell script to now perform all
+ the steps required to build a Mac OS X four way fat ppc/i386/ppc64/x86_64
+ libcurl.framework. Four way fat framework requires OS X 10.5 SDK or later.
+
+Yang Tse (8 Apr 2009)
+- Removed Sun compilers preprocessor block from curlbuild.h.dist, this also
+ removes it from the curlbuild.h file originally distributed by the cURL
+ project as this file is intended for systems not capable of running the
+ configure script. For those who have been building curl out of the source
+ code curl distribution tarball provided by curl.haxx.se the change implies
+ nothing. Previous change in this area committed 2 Apr becomes irrelevant.
+
+Daniel Stenberg (6 Apr 2009)
+- I clarified in the docs that CURLOPT_SEEKFUNCTION should return 0 on success
+ and 1 on fatal errors. Previously it only mentioned non-zero on fatal
+ errors. This is a slight change in meaning, but it follows what we've done
+ elsewhere before and it opens up for LOTS of more useful return codes
+ whenever we can think of them...
+
+Yang Tse (2 Apr 2009)
+- Fix curl_off_t definition for builds done using Sun compilers and a
+ non-configured libcurl. In this case curl_off_t data type was gated
+ to the off_t data type which depends on the _FILE_OFFSET_BITS. This
+ configuration is exactly the unwanted configuration for our curl_off_t
+ data type which must not depend on such setting. This breaks ABI for
+ libcurl libraries built with Sun compilers which were built without
+ having run the configure script with _FILE_OFFSET_BITS different than
+ 64 and using the ILP32 data model.
+
+Daniel Stenberg (1 Apr 2009)
+- Andre Guibert de Bruet fixed a NULL pointer use in an infof() call if a
+ strdup() call failed.
+
+Daniel Fandrich (31 Mar 2009)
+- Properly return an error code in curl_easy_recv (reported by Jim Freeman).
+
+Daniel Stenberg (18 Mar 2009)
+- Kamil Dudka brought a patch that enables 6 additional crypto algorithms when
+ NSS is used. These ciphers were added in NSS 3.4 and require to be enabled
+ explicitly.
+
+Daniel Stenberg (13 Mar 2009)
+- Use libssh2_version() to present the libssh2 version in case the libssh2
+ library is found to support it.
+
+Yang Tse (12 Mar 2009)
+- Added missing Curl_read() return code checking in TELNET transfers.
+
+- Pierre Brico found and fixed TELNET transfers not being aborted upon
+ a write callback failure.
+
+Daniel Stenberg (11 Mar 2009)
+- Kamil Dudka made the curl tool properly call curl_global_init() before any
+ other libcurl function.
+
+Yang Tse (11 Mar 2009)
+- Added missing TELNET timeout support for Windows builds. This issue was
+ reported by Pierre Brico.
+
+Daniel Stenberg (9 Mar 2009)
+- Frank Hempel found out a bug and provided the fix:
+
+ curl_easy_duphandle did not necessarily duplicate the CURLOPT_COOKIEFILE
+ option. It only enabled the cookie engine in the destination handle if
+ data->cookies is not NULL (where data is the source handle). In case of a
+ newly initialized handle which just had the cookie support enabled by a
+ curl_easy_setopt(handle, CURL_COOKIEFILE, "")-call, handle->cookies was
+ still NULL because the setopt-call only appends the value to
+ data->change.cookielist, hence duplicating this handle would not have the
+ cookie engine switched on.
+
+ We also concluded that the slist-functionality would be suitable for being
+ put in its own module rather than simply hanging out in lib/sendf.c so I
+ created lib/slist.[ch] for them.
+
+- Andreas Farber made the 'buildconf' script check for the presence of m4
+ scripts to make it detect a bad checkout earlier. People with older
+ checkouts who don't do cvs update with the -d option won't get the new dirs
+ and then will get funny outputs that can be a bit hard to understand and
+ fix.
+
+Daniel Stenberg (8 Mar 2009)
+- Andre Guibert de Bruet found and fixed a code segment in ssluse.c where the
+ allocation of the memory BIO was not being properly checked.
+
+- Andre Guibert de Bruet fixed the gnutls-using code: There are a few places
+ in the gnutls code where we were checking for negative values for errors,
+ when the man pages state that GNUTLS_E_SUCCESS is returned on success and
+ other values indicate error conditions.
+
+- Bill Egert pointed out (http://curl.haxx.se/bug/view.cgi?id=2671602) that
+ curl didn't use sprintf() in a way that is documented to work in POSIX but
+ since we use our own printf() code (from libcurl) that shouldn't be a
+ problem. Nonetheless I modified the code to not rely on such particular
+ features and to not cause further raised eyebrowse with no good reason.
+
+Daniel Fandrich (5 Mar 2009)
+- Expanded the security section of the libcurl-tutorial man page to cover
+ more issues for authors to consider when writing robust libcurl-using
+ applications.
+
+Yang Tse (5 Mar 2009)
+- Fixed NTLM authentication memory leak on SSPI enabled Windows builds. This
+ issue was noticed by Chris Deidun.
+
+Daniel Fandrich (4 Mar 2009)
+- Fixed a problem with m4 quoting in the OpenSSL configure check reported
+ by Daniel Johnson.
+
+Daniel Stenberg (3 Mar 2009)
+- David James brought a patch that make libcurl close (all) dead connections
+ whenever you attempt to open a new connection.
+
+ 1. After cleaning up a dead connection, "continue" instead of
+ returning FALSE. This ensures that we clean up all dead connections,
+ rather than just cleaning up the first dead connection.
+ 2. Move up the cleanup for dead connections so that it occurs for
+ all connections, rather than just the connections which have the same
+ preferences as our current new connection.
+
+Version 7.19.4 (3 March 2009)
+
+Daniel Stenberg (3 Mar 2009)
+- David Kierznowski notified us about a security flaw
+ (http://curl.haxx.se/docs/adv_20090303.html also known as CVE-2009-0037) in
+ which previous libcurl versions (by design) can be tricked to access an
+ arbitrary local/different file instead of a remote one when
+ CURLOPT_FOLLOWLOCATION is enabled. This flaw is now fixed in this release
+ together this the addition of two new setopt options for controlling this
+ new behavior:
+
+ o CURLOPT_REDIR_PROTOCOLS controls what protocols libcurl is allowed to
+ follow to when CURLOPT_FOLLOWLOCATION is enabled. By default, this option
+ excludes the FILE and SCP protocols and thus you nee to explicitly allow
+ them in your app if you really want that behavior.
+
+ o CURLOPT_PROTOCOLS controls what protocol(s) libcurl is allowed to fetch
+ using the primary URL option. This is useful if you want to allow a user or
+ other outsiders control what URL to pass to libcurl and yet not allow all
+ protocols libcurl may have been built to support.
+
+Daniel Stenberg (27 Feb 2009)
+- Senthil Raja Velu reported a problem when CURLOPT_INTERFACE and
+ CURLOPT_LOCALPORT were used together (the local port bind failed), and
+ Markus Koetter provided the fix!
+
+Daniel Stenberg (25 Feb 2009)
+- As Daniel Fandrich figured out, we must do the GnuTLS initing in the
+ curl_global_init() function to properly maintain the performing functions
+ thread-safe. We've previously (28 April 2007) moved the init to a later time
+ just to avoid it to fail very early when libgcrypt dislikes the situation,
+ but that move was bad and the fix should rather be in libgcrypt or
+ elsewhere.
+
+Daniel Stenberg (24 Feb 2009)
+- Brian J. Murrell found out that Negotiate proxy authentication didn't work.
+ It happened because the code used the struct for server-based auth all the
+ time for both proxy and server auth which of course was wrong.
+
+Daniel Stenberg (23 Feb 2009)
+- After a bug reported by James Cheng I've made curl_easy_getinfo() for
+ CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD return
+ -1 if the sizes aren't know. Previously these returned 0, make it impossible
+ to detect the difference between actually zero and unknown.
+
+Yang Tse (23 Feb 2009)
+- Daniel Johnson provided a shell script that will perform all the steps needed
+ to build a Mac OS X fat ppc/i386 or ppc64/x86_64 libcurl.framework
+
+Daniel Stenberg (23 Feb 2009)
+- I renamed everything in the windows builds files that used the name 'curllib'
+ to the proper 'libcurl' as clearly this caused confusion.
+
+Yang Tse (20 Feb 2009)
+- Do not halt compilation when using VS2008 to build a Windows 2000 target.
+
+Daniel Stenberg (20 Feb 2009)
+- Linus Nielsen Feltzing reported and helped me repeat and fix a problem with
+ FTP with the multi interface: when a transfer fails, like when aborted by a
+ write callback, the control connection was wrongly closed and thus not
+ re-used properly.
+
+ This change is also an attempt to cleanup the code somewhat in this area, as
+ now the FTP code attempts to keep (better) track on pending responses
+ necessary to get read in ftp_done().
+
+Daniel Stenberg (19 Feb 2009)
+- Patrik Thunstrom reported a problem and helped me repeat it. It turned out
+ libcurl did a superfluous 1000ms wait when doing SFTP downloads!
+
+ We read data with libssh2 while doing the "DO" operation for SFTP and then
+ when we were about to start getting data for the actual file part, the
+ "TRANSFER" part, we waited for socket action (in 1000ms) before doing a
+ libssh2-read. But in this case libssh2 had already read and buffered the
+ data so we ended up always just waiting 1000ms before we get working on the
+ data!
+
+Patrick Monnerat (18 Feb 2009)
+- FTP downloads (i.e.: RETR) ending with code 550 now return error
+ CURLE_REMOTE_FILE_NOT_FOUND instead of CURLE_FTP_COULDNT_RETR_FILE.
+
+Daniel Stenberg (17 Feb 2009)
+- Kamil Dudka made NSS-powered builds compile and run again!
+
+- A second follow-up change by Andre Guibert de Bruet to fix a related memory
+ leak like that fixed on the 14th. When zlib returns failure, we need to
+ cleanup properly before returning error.
+
+- CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 in addition to 1 for
+ plain FTP connections, and it will then allow MKD to fail once and retry the
+ CWD afterwards. This is especially useful if you're doing many simultanoes
+ connections against the same server and they all have this option enabled,
+ as then CWD may first fail but then another connection does MKD before this
+ connection and thus MKD fails but trying CWD works! The numbers can
+ (should?) now be set with the convenience enums now called
+ CURLFTP_CREATE_DIR and CURLFTP_CREATE_DIR_RETRY.
+
+ Tests has proven that if you're making an application that uploads a set of
+ files to an ftp server, you will get a noticable gain in speed if you're
+ using multiple connections and this option will be then be very useful.
+
+Daniel Stenberg (14 Feb 2009)
+- Andre Guibert de Bruet found and fixed a memory leak in the content encoding
+ code, which could happen on libz errors.
+
+Daniel Fandrich (12 Feb 2009)
+- Added support for Digest and NTLM authentication using GnuTLS.
+
+Daniel Stenberg (11 Feb 2009)
+- CURLINFO_CONDITION_UNMET was added to allow an application to get to know if
+ the condition in the previous request was unmet. This is typically a time
+ condition set with CURLOPT_TIMECONDITION and was previously not possible to
+ reliably figure out. From bug report #2565128
+ (http://curl.haxx.se/bug/view.cgi?id=2565128) filed by Jocelyn Jaubert.
+
+Daniel Fandrich (4 Feb 2009)
+- Don't add the standard /usr/lib or /usr/include paths to LDFLAGS and CPPFLAGS
+ (respectively) when --with-ssl=/usr is used (patch based on FreeBSD).
+
+- Added an explicit buffer limit check in msdosify() (patch based on FreeBSD).
+ This couldn't ever overflow in curl, but might if the code were used
+ elsewhere or under different conditions.
+
+Daniel Stenberg (3 Feb 2009)
+- Hidemoto Nakada provided a small fix that makes it possible to get the
+ CURLINFO_CONTENT_LENGTH_DOWNLOAD size from file:// "transfers" with
+ CURLOPT_NOBODY set true.
+
+Daniel Stenberg (2 Feb 2009)
+- Patrick Scott found a rather large memory leak when using the multi
+ interface and setting CURLMOPT_MAXCONNECTS to something less than the number
+ of handles you add to the multi handle. All the connections that didn't fit
+ in the cache would not be properly disconnected nor freed!
+
+- Craig A West brought us: libcurl now defaults to do CONNECT with HTTP
+ version 1.1 instead of 1.0 like before. This change also introduces the new
+ proxy type for libcurl called 'CURLPROXY_HTTP_1_0' that then allows apps to
+ switch (back) to CONNECT 1.0 requests. The curl tool also got a --proxy1.0
+ option that works exactly like --proxy but sets CURLPROXY_HTTP_1_0.
+
+ I updated all test cases cases that use CONNECT and I tried to do some using
+ --proxy1.0 and some updated to do CONNECT 1.1 to get both versions run.
+
+Daniel Stenberg (31 Jan 2009)
+- When building with c-ares 1.6.1 (not yet released) or later and IPv6 support
+ enabled, we can now take advantage of its brand new AF_UNSPEC support in
+ ares_gethostbyname(). This makes test case 241 finally run fine for me with
+ this setup since it now parses the "::1 ip6-localhost" line fine in my
+ /etc/hosts file!
+
+Daniel Stenberg (30 Jan 2009)
+- Scott Cantor filed bug report #2550061
+ (http://curl.haxx.se/bug/view.cgi?id=2550061) mentioning that I failed to
+ properly make sure that the VC9 makefiles got included in the latest
+ release. I've now fixed the release script and verified it so next release
+ will hopefully include them properly!
+
+Daniel Fandrich (30 Jan 2009)
+- Fixed --disable-proxy for FTP and SOCKS. Thanks to Daniel Egger for
+ reporting.
+
+Yang Tse (29 Jan 2009)
+- Introduced curl_sspi.c and curl_sspi.h for the implementation of functions
+ Curl_sspi_global_init() and Curl_sspi_global_cleanup() which previously were
+ named Curl_ntlm_global_init() and Curl_ntlm_global_cleanup() in http_ntlm.c
+ Also adjusted socks_sspi.c to remove the link-time dependency on the Windows
+ SSPI library using it now in the same way as it was done in http_ntlm.c.
+
+Daniel Stenberg (28 Jan 2009)
+- Markus Moeller introduced two new options to libcurl:
+ CURLOPT_SOCKS5_GSSAPI_SERVICE and CURLOPT_SOCKS5_GSSAPI_NEC to allow libcurl
+ to do GSS-style authentication with SOCKS5 proxies. The curl tool got the
+ options called --socks5-gssapi-service and --socks5-gssapi-nec to enable
+ these.
+
+Daniel Stenberg (26 Jan 2009)
+- Chad Monroe provided the new CURLOPT_TFTP_BLKSIZE option that allows an app
+ to set desired block size to use for TFTP transfers instead of the default
+ 512 bytes.
+
+- The "-no_ticket" option was introduced in Openssl0.9.8j. It's a flag to
+ disable "rfc4507bis session ticket support". rfc4507bis was later turned
+ into the proper RFC5077 it seems: http://tools.ietf.org/html/rfc5077
+
+ The enabled extension concerns the session management. I wonder how often
+ libcurl stops a connection and then resumes a TLS session. also, sending the
+ session data is some overhead. .I suggest that you just use your proposed
+ patch (which explicitly disables TICKET).
+
+ If someone writes an application with libcurl and openssl who wants to
+ enable the feature, one can do this in the SSL callback.
+
+ Sharad Gupta brought this to my attention. Peter Sylvester helped me decide
+ on the proper action.
+
+- Alexey Borzov filed bug report #2535504
+ (http://curl.haxx.se/bug/view.cgi?id=2535504) pointing out that realms with
+ quoted quotation marks in HTTP Digest headers didn't work. I've now added
+ test case 1095 that verifies my fix.
+
+- Craig A West brought CURLOPT_NOPROXY and the corresponding --noproxy option.
+ They basically offer the same thing the NO_PROXY environment variable only
+ offered previously: list a set of host names that shall not use the proxy
+ even if one is specified.
+
+Daniel Fandrich (20 Jan 2009)
+- Call setlocale() for libtest tests to test the effects of locale-induced
+ libc changes on libcurl.
+
+- Fixed a couple more locale-dependent toupper conversions, mainly for
+ clarity. This does fix one problem that causes ;type=i FTP URLs
+ to fail in the Turkish locale when CURLOPT_PROXY_TRANSFER_MODE is
+ used (test case 561)
+
+- Added tests 561 and 1091 through 1094 to test various combinations
+ of ;type= and ;mode= URLs that could potentially fail in the Turkish
+ locale.
+
+Daniel Stenberg (20 Jan 2009)
+- Lisa Xu pointed out that the ssh.obj file was missing from the
+ lib/Makefile.vc6 file (and thus from the vc8 and vc9 ones too).
+
+Version 7.19.3 (19 January 2009)
+
+Daniel Stenberg (16 Jan 2009)
+- Andrew de los Reyes fixed curlbuild.h for "generic" gcc builds on PPC, both
+ 32 bit and 64 bit.
+
+Daniel Stenberg (15 Jan 2009)
+- Tim Ansell fixed a compiler warning in lib/cookie.c
+
+Daniel Stenberg (14 Jan 2009)
+- Grant Erickson fixed timeouts for TFTP such that specifying a
+ connect-timeout, a max-time or both options work correctly and as expected
+ by passing the correct boolean value to Curl_timeleft via the
+ 'duringconnect' parameter.
+
+ With this small change, curl TFTP now behaves as expected (and likely as
+ originally-designed):
+
+ 1) For non-existent or unreachable dotted IP addresses:
+
+ a) With no options, follows the default curl 300s timeout...
+ b) With --connect-timeout only, follows that value...
+ c) With --max-time only, follows that value...
+ d) With both --connect-timeout and --max-time, follows the smaller value...
+
+ and times out with a "curl: (7) Couldn't connect to server" error.
+
+ 2) For transfers to/from a valid host:
+
+ a) With no options, follows default curl 300s timeout for the
+ first XRQ/DATA/ACK transaction and the default TFTP 3600s
+ timeout for the remainder of the transfer...
+
+ b) With --connect-time only, follows that value for the
+ first XRQ/DATA/ACK transaction and the default TFTP 3600s
+ timeout for the remainder of the transfer...
+
+ c) With --max-time only, follows that value for the first
+ XRQ/DATA/ACK transaction and for the remainder of the
+ transfer...
+
+ d) With both --connect-timeout and --max-time, follows the former
+ for the first XRQ/DATA/ACK transaction and the latter for the
+ remainder of the transfer...
+
+ and times out with a "curl: (28) Timeout was reached" error as
+ appropriate.
+
+Daniel Stenberg (13 Jan 2009)
+- Michael Wallner fixed a NULL pointer deref when calling
+ curl_easy_setup(curl, CURLOPT_COOKIELIST, "SESS") on a CURL handle with no
+ cookies data.
+
+- Stefan Teleman brought a patch to fix the default curlbuild.h file for the
+ SunPro compilers.
+
+Daniel Stenberg (12 Jan 2009)
+- Based on bug report #2498665 (http://curl.haxx.se/bug/view.cgi?id=2498665)
+ by Daniel Black, I've now added magic to the configure script that makes it
+ use pkg-config to detect gnutls details as well if the existing method
+ (using libgnutls-config) fails. While doing this, I cleaned up and unified
+ the pkg-config usage when detecting openssl and nss as well.
+
+Daniel Stenberg (11 Jan 2009)
+- Karl Moerder brought the patch that creates vc9 Makefiles, and I made
+ 'maketgz' now use the actual makefile targets to do the VC8 and VC9
+ makefiles.
+
+Daniel Stenberg (10 Jan 2009)
+- Emil Romanus fixed:
+
+ When using the multi interface over HTTP and the server returns a Location
+ header, the running easy handle will get stuck in the CURLM_STATE_PERFORM
+ state, leaving the external event loop stuck waiting for data from the
+ ingoing socket (when using the curl_multi_socket_action stuff). While this
+ bug was pretty hard to find, it seems to require only a one-line fix. The
+ break statement on line 1374 in multi.c caused the function to skip the call
+ to multistate().
+
+ How to reproduce this bug? Well, that's another question. evhiperfifo.c in
+ the examples directory chokes on this bug only _sometimes_, probably
+ depending on how fast the URLs are added. One way of testing the bug out is
+ writing to hiper.fifo from more than one source at the same time.
+
+Daniel Fandrich (7 Jan 2009)
+- Unified much of the SessionHandle initialization done in Curl_open() and
+ curl_easy_reset() by creating Curl_init_userdefined(). This had the side
+ effect of fixing curl_easy_reset() so it now also resets
+ CURLOPT_FTP_FILEMETHOD and CURLOPT_SSL_SESSIONID_CACHE
+
+Daniel Stenberg (7 Jan 2009)
+- Rob Crittenden did once again provide an NSS update:
+
+ I have to jump through a few hoops now with the NSS library initialization
+ since another part of an application may have already initialized NSS by the
+ time Curl gets invoked. This patch is more careful to only shutdown the NSS
+ library if Curl did the initialization.
+
+ It also adds in a bit of code to set the default ciphers if the app that
+ call NSS_Init* did not call NSS_SetDomesticPolicy() or set specific
+ ciphers. One might argue that this lets other application developers get
+ lazy and/or they aren't using the NSS API correctly, and you'd be right.
+ But still, this will avoid terribly difficult-to-trace crashes and is
+ generally helpful.
+
+Daniel Stenberg (1 Jan 2009)
+- 'reconf' is removed since we rather have users use 'buildconf'
+
+Daniel Stenberg (31 Dec 2008)
+- Bas Mevissen reported http://curl.haxx.se/bug/view.cgi?id=2479030 pointing
+ out that 'reconf' didn't properly point out the m4 subdirectory when running
+ aclocal.
+
+Daniel Stenberg (29 Dec 2008)
+ - Phil Lisiecki filed bug report #2413067
+ (http://curl.haxx.se/bug/view.cgi?id=2413067) that identified a problem that
+ would cause libcurl to mark a DNS cache entry "in use" eternally if the
+ subsequence TCP connect failed. It would thus never get pruned and refreshed
+ as it should've been.
+
+ Phil provided his own patch to this problem that while it seemed to work
+ wasn't complete and thus I wrote my own fix to the problem.
+
+Daniel Stenberg (28 Dec 2008)
+- Peter Korsgaard fixed building libcurl with "configure --with-ssl
+ --disable-verbose".
+
+- Anthony Bryan fixed more language and spelling flaws in man pages.
+
+Daniel Stenberg (22 Dec 2008)
+- Given a recent enough libssh2, libcurl can now seek/resume with SFTP even
+ on file indexes beyond 2 or 4GB.
+
+- Anthony Bryan provided a set of patches that cleaned up manual language,
+ corrected spellings and more.
+
+Daniel Stenberg (20 Dec 2008)
+- Igor Novoseltsev fixed a bad situation for the multi_socket() API when doing
+ pipelining, as libcurl could then easily get confused and A) work on the
+ handle that was not "first in queue" on a pipeline, or even B) tell the app
+ to REMOVE a socket while it was in use by a second handle in a pipeline. Both
+ errors caused hanging or stalling applications.
+
+Daniel Stenberg (19 Dec 2008)
+- curl_multi_timeout() could return a timeout value of 0 even though nothing
+ was actually ready to get done, as the internal time resolution is higher
+ than the returned millisecond timer. Therefore it could cause applications
+ running on fast processors to do short bursts of busy-loops.
+ curl_multi_timeout() will now only return 0 if the timeout is actually
+ alreay triggered.
+
+- Using the libssh2 0.19 function libssh2_session_block_directions(), libcurl
+ now has an improved ability to do right when the multi interface (both
+ "regular" and multi_socket) is used for SCP and SFTP transfers. This should
+ result in (much) less busy-loop situations and thus less CPU usage with no
+ speed loss.
+
+Daniel Stenberg (17 Dec 2008)
+- SCP and SFTP with the multi interface had the same flaw: the 'DONE'
+ operation didn't complete properly if the EAGAIN equivalent was returned but
+ libcurl would simply continue with a half-completed close operation
+ performed. This ruined persistent connection re-use and cause some
+ SSH-protocol errors in general. The correction is unfortunately adding a
+ blocking function - doing it entirely non-blocking should be considered for
+ a better fix.
+
+Gisle Vanem (16 Dec 2008)
+- Added the possibility to use the Watt-32 tcp/ip stack under Windows.
+ The change simply involved adding a USE_WATT32 section in the
+ config-win32.h files (under ./lib and ./src). This section disables
+ the use of any Winsock headers.
+
+Daniel Stenberg (16 Dec 2008)
+- libssh2_sftp_last_error() was wrongly used at some places in libcurl which
+ made libcurl sometimes not properly abort problematic SFTP transfers.
+
+Daniel Stenberg (12 Dec 2008)
+- More work with Igor Novoseltsev to first fix the remaining stuff for
+ removing easy handles from multi handles when the easy handle is/was within
+ a HTTP pipeline. His bug report #2351653
+ (http://curl.haxx.se/bug/view.cgi?id=2351653) was also related and was
+ eventually fixed by a patch by Igor himself.
+
+Yang Tse (12 Dec 2008)
+- Patrick Monnerat fixed a build regression, introduced in 7.19.2, affecting
+ OS/400 compilations with IPv6 enabled.
+
+Daniel Stenberg (12 Dec 2008)
+- Mark Karpeles filed bug report #2416182 titled "crash in ConnectionExists
+ when using duphandle+curl_mutli"
+ (http://curl.haxx.se/bug/view.cgi?id=2416182) which showed that
+ curl_easy_duphandle() wrongly also copied the pointer to the connection
+ cache, which was plain wrong and caused a segfault if the handle would be
+ used in a different multi handle than the handle it was duplicated from.
+
+Daniel Stenberg (11 Dec 2008)
+- Keshav Krity found out that libcurl failed to deal with dotted IPv6
+ addresses if they were very long (>39 letters) due to a too strict address
+ validity parser. It now accepts addresses up to 45 bytes long.
+
+Daniel Stenberg (11 Dec 2008)
+- Internet Explorer had a broken HTTP digest authentication before v7 and
+ there are servers "out there" that relies on the client doing this broken
+ Digest authentication. Apache even comes with an option to work with such
+ broken clients.
+
+ The difference is only for URLs that contain a query-part (a '?'-letter and
+ text to the right of it).
+
+ libcurl now supports this quirk, and you enable it by setting the
+ CURLAUTH_DIGEST_IE bit in the bitmask you pass to the CURLOPT_HTTPAUTH or
+ CURLOPT_PROXYAUTH options. They are thus individually controlled to server
+ and proxy.
+
+ (note that there's no way to activate this with the curl tool yet)
+
+Daniel Fandrich (9 Dec 2008)
+- Added test cases 1089 and 1090 to test --write-out after a redirect to
+ test a report that the size didn't work, but these test cases pass.
+
+- Documented CURLOPT_CONNECT_ONLY as being useful only on HTTP URLs.
+
+Daniel Stenberg (9 Dec 2008)
+- Ken Hirsch simplified how libcurl does FTPS: now it doesn't assume any
+ particular state for the control connection like it did before for implicit
+ FTPS (libcurl assumed such control connections to be encrypted while some
+ FTPS servers such as FileZilla assumes such connections to be clear
+ mode). Use the CURLOPT_USE_SSL option to set your desired level.
+
+Daniel Stenberg (8 Dec 2008)
+- Fred Machado posted about a weird FTP problem on the curl-users list and when
+ researching it, it turned out he got a 550 response back from a SIZE command
+ and then I fell over the text in RFC3659 that says:
+
+ The presence of the 550 error response to a SIZE command MUST NOT be taken
+ by the client as an indication that the file cannot be transferred in the
+ current MODE and TYPE.
+
+ In other words: the change I did on September 30th 2008 and that has been
+ included in the last two releases were a regression and a bad idea. We MUST
+ NOT take a 550 response from SIZE as a hint that the file doesn't exist.
+
+- Christian Krause filed bug #2221237
+ (http://curl.haxx.se/bug/view.cgi?id=2221237) that identified an infinite
+ loop during GSS authentication given some specific conditions. With his
+ patience and great feedback I managed to narrow down the problem and
+ eventually fix it although I can't test any of this myself!
+
+Daniel Fandrich (3 Dec 2008)
+- Fixed the getifaddrs version of Curl_if2ip to work on systems without IPv6
+ support (e.g. Minix)
+
+Daniel Stenberg (3 Dec 2008)
+- Igor Novoseltsev filed bug #2351645
+ (http://curl.haxx.se/bug/view.cgi?id=2351645) that identified a problem with
+ the multi interface that occured if you removed an easy handle while in
+ progress and the handle was used in a HTTP pipeline.
+
+- Pawel Kierski pointed out a mistake in the cookie code that could lead to a
+ bad fclose() after a fatal error had occured.
+ (http://curl.haxx.se/bug/view.cgi?id=2382219)
+
+Daniel Fandrich (25 Nov 2008)
+- If a HTTP request is Basic and num is already >=1000, the HTTP test
+ server adds 1 to num to get the data section to return. This allows
+ testing authentication negotiations using the Basic authentication
+ method.
+
+- Added tests 1087 and 1088 to test Basic authentication on a redirect
+ with and without --location-trusted
+
+Daniel Stenberg (24 Nov 2008)
+- Based on a patch by Vlad Grachov, libcurl now uses a new libssh2 0.19
+ function when built to support SCP and SFTP that helps the library to know
+ in which direction a particular libssh2 operation would return EAGAIN so
+ that libcurl knows what socket conditions to wait for before trying the
+ function call again. Previously (and still when using libssh2 0.18 or
+ earlier), libcurl will busy-loop in this situation when the easy interface
+ is used!
+
+Daniel Fandrich (20 Nov 2008)
+- Automatically detect OpenBSD's CA cert bundle.
+
+Daniel Stenberg (19 Nov 2008)
+- I removed the default use of "Pragma: no-cache" from libcurl when a proxy is
+ used. It has been used since forever but it was never a good idea to use
+ unless explicitly asked for.
+
+- Josef Wolf's extension that allows a $TESTDIR/gdbinit$testnum file that when
+ you use runtests.pl -g, will be sourced by gdb to allow additional fancy or
+ whatever you see fit
+
+- Christian Krause reported and fixed a memory leak that would occur with HTTP
+ GSS/kerberos authentication (http://curl.haxx.se/bug/view.cgi?id=2284386)
+
+- Andreas Wurf and Markus Koetter helped me analyze a problem that Andreas got
+ when uploading files to a single FTP server using multiple easy handle
+ handles with the multi interface. Occasionally a handle would stall in
+ mysterious ways.
+
+ The problem turned out to be a side-effect of the ConnectionExists()
+ function's eagerness to re-use a handle for HTTP pipelining so it would
+ select it even if already being in use, due to an inadequate check for its
+ chances of being used for pipelnining.
+
+Daniel Fandrich (17 Nov 2008)
+- Added more compiler warning options for gcc 4.3
+
+Yang Tse (17 Nov 2008)
+- Fix a remaining problem in the inet_pton() runtime configure check. And
+ fix internal Curl_inet_pton() failures to reject certain malformed literals.
+
+- Make configure script check if ioctl with the SIOCGIFADDR command can be
+ used, and define HAVE_IOCTL_SIOCGIFADDR if appropriate.
+
+Daniel Stenberg (16 Nov 2008)
+- Christian Krause fixed a build failure when building with gss support
+ enabled and FTP disabled.
+
+- Added check for NULL returns from strdup() in src/main.c and lib/formdata.c
+ - reported by Jim Meyering also prevent buffer overflow on MSDOS when you do
+ for example -O on a url with a file name part longer than PATH_MAX letters
+
+- lib/nss.c fixes based on the report by Jim Meyering: I went over and added
+ checks for return codes for all calls to malloc and strdup that were
+ missing. I also changed a few malloc(13) to use arrays on the stack and a
+ few malloc(PATH_MAX) to instead use aprintf() to lower memory use.
+
+- I fixed a memory leak in Curl_nss_connect() when CURLOPT_ISSUERCERT is
+ in use.
+
+Daniel Fandrich (14 Nov 2008)
+- Added .xml as one of the few common file extensions known by the multipart
+ form generator.
+
+- Added some #ifdefs around header files and change the EAGAIN test to
+ fix compilation on Cell (reported by Jeff Curley).
+
+Yang Tse (14 Nov 2008)
+- Fixed several configure script issues affecting checks for inet_ntoa_r(),
+ inet_ntop(), inet_pton(), getifaddrs(), fcntl() and getaddrinfo().
+
+Yang Tse (13 Nov 2008)
+- Refactored configure script detection of functions used to set sockets into
+ non-blocking mode, and decouple function detection from function capability.
+
+Version 7.19.2 (13 November 2008)
+
+Michal Marek (13 Nov 2008)
+- Fixed a potential data loss in Curl_client_write() when the transfer is
+ paused.
+
+Daniel Stenberg (11 Nov 2008)
+- Rainer Canavan filed bug #2255627
+ (http://curl.haxx.se/bug/view.cgi?id=2255627) which pointed out that a
+ program using libcurl's multi interface to download a HTTPS page with a
+ libcurl built powered by OpenSSL, would easily get silly and instead hand
+ over SSL details as data instead of the actual HTTP headers and body. This
+ happened because libcurl would consider the connection handshake done too
+ early. This problem was introduced at September 22nd 2008 with my fix of the
+ bug #2107377
+
+ The correct fix is now instead done within the GnuTLS-handling code, as both
+ the OpenSSL and the NSS code already deal with this situation in similar
+ fashion. I added test case 560 in an attempt to verify this fix, but
+ unfortunately it didn't trigger it even before this fix!
+
+Yang Tse (11 Nov 2008)
+- Related with bug #2230535 (http://curl.haxx.se/bug/view.cgi?id=2230535)
+ Daniel Fandrich noticed that curl_addrinfo was also missing in the build
+ process of other four non-configure platforms. Added now.
+
+Daniel Fandrich (7 Nov 2008)
+- The getifaddrs() version of Curl_if2ip() crashed when used on a Linux
+ system with a TEQL load-balancing device configured, which doesn't
+ have an address. Thanks to Adam Sampson for spotting this (bug #2234923).
+
+Yang Tse (6 Nov 2008)
+- Merged existing IPv4 and IPv6 Curl_ip2addr functions into a single one
+ which now also takes a protocol address family argument.
+
+- Bug #2230535 (http://curl.haxx.se/bug/view.cgi?id=2230535) pointed out a
+ problem with MSVC 6 makefile that caused a build failure. It was noted that
+ the curl_addrinfo.obj reference was missing. I took the opportunity to sort
+ the list in which this was missing. Issue submitted by John Wilkinson.
+
+Version 7.19.1 (5 November 2008)
+
+Daniel Stenberg (4 Nov 2008)
+- CURLINFO_FILETIME now works for file:// transfers as well
+
+Daniel Stenberg (3 Nov 2008)
+- Bug #2218480 (http://curl.haxx.se/bug/view.cgi?id=2218480) pointed out a
+ problem with my CURLINFO_PRIMARY_IP fix from October 7th that caused a NULL
+ pointer read. I also took the opportunity to clean up this logic (storing of
+ the connection's IP address) somewhat as we had it stored in two different
+ places and ways previously and they are now unified.
+
+Yang Tse (3 Nov 2008)
+- Fix undersized IPv6 address internal buffer. IPv6 address strings longer
+ than 35 characters would be truncated.
+
+Daniel Stenberg (2 Nov 2008)
+- Daniel Johnson reported and fixed:
+
+ When c-ares isn't enabled, libcurl by default calls getaddrinfo with family
+ set to PF_UNSPEC which causes getaddrinfo to return all available addresses,
+ both IPv4 and IPv6. Libcurl then tries each one until it can connect. If the
+ net connection doesn't support IPv6, libcurl can still fall back to IPv4.
+
+ However, since c-ares doesn't support PF_UNSPEC, when it's used it defaults
+ to using family=PF_INET6 and therefore only returns IPv6 addresses when AAAA
+ records are available, even if IPv4 addresses are also available. The effect
+ is that since my ISP doesn't do IPv6, libcurl can't connect at all to a site
+ that has AAAA records. It will work if I explicitly use CURL_IPRESOLVE_V4 or
+ --ipv4 with the curl tool. I discovered this when curl would fail to connect
+ to seemingly random sites. It turns out they weren't random, they were sites
+ with AAAA records.
+
+ So now libcurl defaults to PF_INET... until c-ares has been tought to offer
+ both.
+
+Yang Tse (31 Oct 2008)
+- Tests 558 and 559 are stabilized. These two tests were initially introduced
+ to aid in the location of a seg-fault which was only triggered on non-debug
+ builds done with the icc 9.1 Intel compiler. Test 558 does not trigger the
+ problem, but test 559 does trigger it. As of today, it isn't yet absolutely
+ clear if it is a compiler optimizer issue or a memory corruption one.
+
+Yang Tse (30 Oct 2008)
+- Use our Curl_addrinfo structure definition to handle address info data even
+ when a system addrinfo struct is available. Provide and use a wrapper around
+ systems getaddrinfo function, Curl_getaddrinfo_ex which returns a pointer to
+ a list of dynamically allocated Curl_addrinfo structs.
+
+ Configure will check freeaddrinfo and getaddrinfo functions and define
+ preprocessor symbols HAVE_FREEADDRINFO and HAVE_GETADDRINFO when appropriate.
+
+Daniel Fandrich (29 Oct 2008)
+- Fixed a bug that caused a few bytes of garbage to be sent after a
+ curl_easy_pause() during a chunky upload. Reported by Steve Roskowski.
+
+Daniel Fandrich (28 Oct 2008)
+- Changed the "resolve" test precheck program to verify that an IPv6 socket
+ can be created before resolving the IPv6 name. In the context of running
+ a test, it doesn't make sense to run an IPv6 test when a host is resolvable
+ but IPv6 isn't usable. This should fix failures of test 1085 on hosts with
+ library and DNS support for IPv6 but where actual use of IPv6 has been
+ administratively disabled.
+
+Daniel Fandrich (24 Oct 2008)
+- Added experimental support for zlib and OpenSSL on Symbian OS.
+
+Daniel Fandrich (21 Oct 2008)
+- Fixed some problems with SFTP range support to fix test cases 634 through
+ 637.
+
+Daniel Fandrich (17 Oct 2008)
+- Fixed a compile error reported by Albert Chin on AIX and IRIX when using
+ GTLS.
+
+Daniel Stenberg (16 Oct 2008)
+- Igor Novoseltsev added CURLOPT_PROXYUSER and CURLOPT_PROXYPASSWORD that then
+ make CURLOPT_PROXYUSERPWD sort of deprecated. The primary motive for adding
+ these new options is that they have no problems with the colon separator
+ that the CURLOPT_PROXYUSERPWD option does.
+
+Daniel Stenberg (15 Oct 2008)
+- Pascal Terjan filed bug #2154627
+ (http://curl.haxx.se/bug/view.cgi?id=2154627) which pointed out that libcurl
+ uses strcasecmp() in multiple places where it causes failures when the
+ Turkish locale is used. This is because 'i' and 'I' isn't the same letter so
+ strcasecmp() on those letters are different in Turkish than in English (or
+ just about all other languages). I thus introduced a totally new internal
+ function in libcurl (called Curl_raw_equal) for doing case insentive
+ comparisons for english-(ascii?) style strings that thus will make "file"
+ and "FILE" match even if the Turkish locale is selected.
+
+Daniel Fandrich (15 Oct 2008)
+- A <precheck> command is considered to have failed if it returns a non-zero
+ return code. This way, if the precheck command can't be run at all for
+ whatever reason, it's treated as a precheck failure which causes the
+ test to be skipped.
+
+Daniel Stenberg (15 Oct 2008)
+- John Wilkinson filed bug #2155496
+ (http://curl.haxx.se/bug/view.cgi?id=2155496) pointing out an error case
+ without a proper human-readable error message. When a read callback returns
+ a too large value (like when trying to return a negative number) it would
+ trigger and the generic error message then makes the proplem slightly
+ different to track down. I've added an error message for this now.
+
+Daniel Fandrich (9 Oct 2008)
+- Fixed the --interface option to work with IPv6 connections on glibc
+ systems supporting getifaddrs(). Also fixed a problem where an IPv6
+ address could be chosen instead of an IPv4 one for --interface when it
+ involved a name lookup.
+
+Daniel Fandrich (8 Oct 2008)
+- Added tests 1082 through 1085 to test symbolic --interface parameters
+
+- Added tests 633 through 637 to test the new file range support for SFTP.
+ All but the first test cause an infinite loop or other failure and so
+ are added to DISABLED.
+
+Daniel Stenberg (8 Oct 2008)
+- John Wilkinson filed bug #2152270
+ (http://curl.haxx.se/bug/view.cgi?id=2152270) which identified and fixed a
+ CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing:
+
+ Any subsequent transfer with a redirect leaks memory, eventually crashing
+ the process potentially.
+
+ Any subsequent transfer WITHOUT a redirect causes the most recent redirect
+ that DID occur on some previous transfer to still be reported.
+
+- Igor Novoseltsev filed bug #2111613
+ (http://curl.haxx.se/bug/view.cgi?id=2111613) that eventually identified a
+ flaw in how the multi_socket interface in some cases missed to call the
+ timeout callback when easy interfaces are removed and added within the same
+ millisecond.
+
+- Igor Novoseltsev brought a patch that introduced two new options to
+ curl_easy_setopt: CURLOPT_USERNAME and CURLOPT_PASSWORD that sort of
+ deprecates the good old CURLOPT_USERPWD since they allow applications to set
+ the user name and password independently and perhaps more importantly allow
+ both to contain colon(s) which CURLOPT_USERPWD doesn't fully support.
+
+Daniel Fandrich (7 Oct 2008)
+- Changed the handling of read/write errors in Curl_perform() to allow a
+ a fresh connection to be made in such cases and the request retransmitted.
+ This should fix test case 160. Added test case 1079 in an attempt to
+ test a similar connection dropping scenario, but as a race condition, it's
+ hard to test reliably.
+
+- Created test cases 1080 and 1081 to reproduce a problem of
+ CURLINFO_REDIRECT_URL leaking memory and returning incorrect results when
+ two URLs are requested. Reported by vmpdemo in bug #2152270
+
+Daniel Stenberg (7 Oct 2008)
+- Fixed CURLINFO_PRIMARY_IP: When libcurl created a connection to host A then
+ the app re-used the handle to do a connection to host B and then again
+ re-used the handle to host A, it would not update the info with host A's IP
+ address (due to the connection being re-used) but it would instead report
+ the info from host B.
+
+Yang Tse (7 Oct 2008)
+- Added --enable-optimize configure option to enable and disable compiler
+ optimizations to allow decoupled setting from --enable-debug.
+
+Yang Tse (2 Oct 2008)
+- Added --enable-warnings configure option to enable and disable strict
+ compiler warnings to allow decoupled setting from --enable-debug.
+
+ runtests.pl will now run with picky compiler warnings enabled unless
+ explicitly disabled.
+
+Daniel Fandrich (1 Oct 2008)
+- "make clean" now cleans out the docs and tests directories, too.
+
+Daniel Stenberg (30 Sep 2008)
+- The libcurl FTP code now returns CURLE_REMOTE_FILE_NOT_FOUND error when SIZE
+ gets a 550 response back for the cases where a download (or NOBODY) is
+ wanted. It still allows a 550 as response if the SIZE is used as part of an
+ upload process (like if resuming an upload is requested and the file isn't
+ there before the upload). I also modified the FTP test server and a few test
+ cases accordingly to match this modified behavior.
+
+Daniel Stenberg (29 Sep 2008)
+- Daniel Egger provided a patch that allows you to disable proxy support in
+ libcurl to somewhat reduce the size of the binary. Run configure
+ --disable-proxy.
+
+Daniel Fandrich (29 Sep 2008)
+- Moved all signal-based name resolution timeout handling into a single new
+ Curl_resolv_timeout function to reduce coupling.
+
+Daniel Stenberg (29 Sep 2008)
+- Ian Lynagh provided a patch that now makes CURLOPT_RANGE work fine for SFTP
+ downloads!
+
+- Maxim Ivanov filed bug report #2107803
+ (http://curl.haxx.se/bug/view.cgi?id=2107803) "no CURLINFO_REDIRECT_URL in
+ multi mode" together with a patch that fixed the problem.
+
+Daniel Stenberg (25 Sep 2008)
+- Emanuele Bovisio submitted bug report #2126435. We fixed the HTTP Digest
+ auth code to not behave badly when getting a blank realm with
+ realm="". http://curl.haxx.se/bug/view.cgi?id=2126435
+
+Daniel Fandrich (23 Sep 2008)
+- Make sure not to dereference the wrong UrlState proto union member when
+ switching from one protocol to another in a single request (e.g.
+ redirecting from HTTP to FTP as in test 1055) by resetting
+ state.expect100header before every request.
+
+Daniel Stenberg (23 Sep 2008)
+- Introducing Jamie Lokier's function for date to epoch conversion used in the
+ date parser function. This makes our function less dependent on system-
+ provided functions and instead we do all the magic ourselves. We also no
+ longer depend on the TZ environment variable. Switching to our own converter
+ has some side-effect and they are noted here for future reference (taken
+ from a mail by mr Lokier):
+
+ time_t is not measured in seconds in the ANSI C standard - or even counted
+ uniformly - weird platforms can use other numeric representations of dates
+ in time_t - hence the difftime() function.
+
+ On POSIX time_t is measured in UTC seconds, which means not including leap
+ seconds. But it's mentioned in a few places that some old POSIX-ish
+ environments include leap seconds in their time_t counts...
+
+ I'm pretty sure [the new implementation is] correct on anything truly POSIX.
+ And it's obviously a lot less dependent on platform quirks and corner cases
+ in many ways than the mktime() version.
+
+- Rob Crittenden brought a patch to "add some locking for thread-safety to NSS
+ implementation".
+
+Daniel Stenberg (22 Sep 2008)
+- Made the SOCKS code use the new Curl_read_plain() function to fix the bug
+ Markus Moeller reported: http://curl.haxx.se/mail/archive-2008-09/0016.html
+
+- recv() errors other than those equal to EAGAIN now cause proper
+ CURLE_RECV_ERROR to get returned. This made test case 160 fail so I've now
+ disabled it until we can figure out another way to exercise that logic.
+
+- Michael Goffioul filed bug report #2107377 "Problem with multi + GnuTLS +
+ proxy" (http://curl.haxx.se/bug/view.cgi?id=2107377) that showed how a multi
+ interface using program didn't work when built with GnuTLS and a CONNECT
+ request was done over a proxy (basically test 502 over a proxy to a HTTPS
+ site). It turned out the ssl connect function would get called twice which
+ caused the second call to fail.
+
+Daniel Fandrich (22 Sep 2008)
+- Fixed test 539 to handle an out of memory condition that shows up now
+ that memdebug.h is included in the test programs.
+
+Yang Tse (20 Sep 2008)
+- Fix regression in configure script which affected OpenSSL builds on MSYS.
+
+Yang Tse (19 Sep 2008)
+- configure script now checks availability of the alarm() function.
+
+Daniel Fandrich (18 Sep 2008)
+- Don't bother to install a SIGALRM handler unless alarm() is available.
+ Also, leave the existing SIGALRM handler alone if the timeout is too small
+ to handle.
+
+Daniel Fandrich (17 Sep 2008)
+- Removed reference to curl-ca-bundle.crt in the host verification failure
+ error message.
+
+Yang Tse (17 Sep 2008)
+- Improve configure detection of gethostname(), localtime_r(), strstr(),
+ getservbyport_r(), gethostbyaddr_r() and gethostbyname_r().
+
+Yang Tse (14 Sep 2008)
+- Improve configure detection of strcasecmp(), strcasestr(), strcmpi(),
+ stricmp(), strlcat(), strncasecmp(), strncmpi() and strnicmp().
+
+Yang Tse (13 Sep 2008)
+- Disable tracking of fdopen() calls in the low-level memory leak tracking
+ code when fdopen() is not available, to avoid compiler error.
+
+Yang Tse (12 Sep 2008)
+- Further adjust detection of strerror_r() in the configure process, and
+ ensure that errno is not modified inside Curl_strerror().
+
+Yang Tse (10 Sep 2008)
+- Improve detection of gmtime_r(), strtoll(), sigaction(), strtok_r(),
+ strdup() and ftruncate() in the configure process.
+
+Daniel Fandrich (9 Sep 2008)
+- Mike Revi discovered some swapped speed switches documented in the curl man
+ page.
+
+- Checked in some documentation and code improvements and fixes that I
+ discovered in the FreeBSD ports system.
+
+Daniel Stenberg (8 Sep 2008)
+- Dmitry Kurochkin patched a problem: I have found bug in pipelining through
+ proxy. I have a transparent proxy. When running with http_proxy environment
+ variable not set my test completes fine (it goes through transparent
+ proxy). When I set http_proxy variable my test hangs after the first
+ downloaded is complete. Looks like the second handle never gets out from
+ WAITDO state.
+
+ The fix: It makes checkPendPipeline move 1 handler from pend pipe to send
+ pipe if pipelining is not supported by server but there are no handles in
+ send and recv pipes.
+
+- Stefan Krause pointed out that libcurl would wrongly send away cookies to
+ sites in cases where the cookie clearly has a very old expiry date. The
+ condition was simply that libcurl's date parser would fail to convert the
+ date and it would then count as a (timed-based) match. Starting now, a
+ missed date due to an unsupported date format or date range will now cause
+ the cookie to not match.
+
+Daniel Fandrich (5 Sep 2008)
+- Improved the logic that decides whether to use HTTP 1.1 features or not in a
+ request. Setting a specific version with CURLOPT_HTTP_VERSION overrides
+ all other checks, but otherwise, a 1.0 request will be made if the server
+ is known to support only 1.0 because it previously responded so and the
+ connection was kept alive, or a response to a previous request on this handle
+ came back as 1.0. The latter could take place in cases like redirection or
+ authentication where several requests have to be made before the operation
+ is complete. If any one of the servers in a redirection chain supports only
+ 1.0, then remaining requests will be sent in 1.0 mode.
+
+- Detect cases where an upload must be sent chunked and the server supports
+ only HTTP 1.0 and return CURLE_UPLOAD_FAILED.
+
+Daniel Stenberg (5 Sep 2008)
+- Martin Drasar provided the CURLOPT_POSTREDIR patch. It renames
+ CURLOPT_POST301 (but adds a define for backwards compatibility for you who
+ don't define CURL_NO_OLDIES). This option allows you to now also change the
+ libcurl behavior for a HTTP response 302 after a POST to not use GET in the
+ subsequent request (when CURLOPT_FOLLOWLOCATION is enabled). I edited the
+ patch somewhat before commit. The curl tool got a matching --post302
+ option. Test case 1076 was added to verify this.
+
+- Introducing CURLOPT_CERTINFO and the corresponding CURLINFO_CERTINFO. By
+ enabling this feature with CURLOPT_CERTINFO for a request using SSL (HTTPS
+ or FTPS), libcurl will gather lots of server certificate info and that info
+ can then get extracted by a client after the request has completed with
+ curl_easy_getinfo()'s CURLINFO_CERTINFO option. Linus Nielsen Feltzing
+ helped me test and smoothen out this feature.
+
+ Unfortunately, this feature currently only works with libcurl built to use
+ OpenSSL.
+
+ This feature was sponsored by networking4all.com - thanks!
+
+- Dmitriy Sergeyev pointed out that curl_easy_pause() didn't unpause properly
+ during certain conditions. I also changed this code to use realloc() based
+ on Daniel Fandrich's suggestion.
+
+Guenter Knauf (4 Sep 2008)
+- MingW32 non-configure builds are now largefile feature enabled by default.
+ NetWare LIBC builds are also now largefile feature enabled by default.
+
+Yang Tse (4 Sep 2008)
+- Several fixes related with print formatting string directives.
+
+Daniel Fandrich (3 Sep 2008)
+- Search for the FreeBSD CA cert file /usr/local/share/certs/ca-root.crt
+
+Daniel Fandrich (2 Sep 2008)
+- Fixed an out of memory problem that caused torture test failures in tests
+ 706 and 707.
+
+Daniel Stenberg (2 Sep 2008)
+- Keith Mok added supported_protocols and supported_features to the pkg-config
+ file for libcurl, and while doing that fix he unified with curl-config.in
+ how the supported protocols and features are extracted and used, so both those
+ tools should now always be synced.
+
+Version 7.19.0 (1 September 2008)
+
+Daniel Fandrich (29 Aug 2008)
+- Added tests 1071 through 1074 to test automatic downgrading from HTTP 1.1
+ to HTTP 1.0 upon receiving a response from the HTTP server. Tests 1072
+ and 1073 are similar to test 1069 in that they involve the impossible
+ scenario of sending chunked data to a HTTP 1.0 server. All these fail
+ and are added to DISABLED.
+
+- Added test 1075 to test --anyauth with Basic authentication.
+
+Daniel Stenberg (29 Aug 2008)
+- When libcurl was doing a HTTP POST and the server would respond with
+ "Connection: close" and actually close the connection after the
+ response-body, libcurl could still have outstanding data to send and it
+ would not properly notice this and stop sending. This caused weirdness and
+ sad faces. http://curl.haxx.se/bug/view.cgi?id=2080222
+
+ Note that there are still reasons to consider libcurl's behavior when
+ getting a >= 400 response code while sending data, as Craig Perras' note
+ "http upload: how to stop on error" specifies:
+ http://curl.haxx.se/mail/archive-2008-08/0138.html
+
+Daniel Stenberg (28 Aug 2008)
+- Dengminwen reported that libcurl would lock a (cookie) share twice (without
+ an unlock in between) for a certain case and that in fact works when using
+ regular windows mutexes but not with pthreads'! Locks should of course not
+ get locked again so this is now fixed.
+ http://curl.haxx.se/mail/lib-2008-08/0422.html
+
+- I'm abandoning the system with the web site mirrors (but keeping download
+ files bing mirrored) and thus I've changed the URL in the cookiejar header
+ to no longer use curlm.haxx.se but instead use the main site curl.haxx.se
+
+Daniel Fandrich (27 Aug 2008)
+- Fixed test case 1065 by changing the handling of CURLOPT_UPLOAD to set
+ the HTTP method to GET (or HEAD) when given a value of 0.
+
+- Added test cases 1068 and 1069 to test a simple HTTP PUT from stdin. Test
+ case 1069 fails in a similar manner to test 1065 so is added to DISABLED.
+
+Yang Tse (27 Aug 2008)
+- Fix generation of MS VC6 .dsp file to make it support compilation of either
+ dynamic (DLL) or static (LIB) libcurl libraries in debug and release modes.
+
+Daniel Fandrich (26 Aug 2008)
+- Fixed out of memory problems that caused torture test failures in tests
+ 1021 and 1067.
+
+Yang Tse (26 Aug 2008)
+- Added check and symbol definition for WIN32 file API usage in configure,
+ supporting configure's --disable-largefile option for WIN32 targets also.
+
+- Non-configure systems which do not use config-win32.h configuration file,
+ and want to use the WIN32 file API, must define USE_WIN32_LARGE_FILES or
+ USE_WIN32_SMALL_FILES as appropriate in their own configuration files.
+
+Daniel Stenberg (23 Aug 2008)
+- Running 'make ca-firefox' in the root build dir will now run the new
+ firefox-db2pem.sh conversion script that converts a local Firefox db of ca
+ certs into PEM format, suitable for use with a OpenSSL or GnuTLS built
+ libcurl.
+
+- Constantine Sapuntzakis fixed a bug when doing proxy CONNECT with the multi
+ interface, and the proxy would send Connection: close during the
+ authentication phase. http://curl.haxx.se/bug/view.cgi?id=2069047
+
+Daniel Fandrich (22 Aug 2008)
+- Fixed a problem when --dump-header - was given with more than one URL,
+ which caused an error when the second header was dumped due to stdout
+ being closed. Added test case 1066 to verify. Also fixed a potential
+ problem where a closed file descriptor might be used for an upload
+ when more than one URL is given.
+
+Yang Tse (22 Aug 2008)
+- Improved libcurl's internal curl_m*printf() functions integral data type
+ size and signedness handling.
+
+- Internal adjustments to better select/differentiate when large/small file
+ support is provided using WIN32 functions directly.
+
+Daniel Fandrich (20 Aug 2008)
+- Added an edited version of Vincent Le Normand's documentation of SFTP quote
+ commands to the man pages.
+
+Daniel Stenberg (20 Aug 2008)
+- Phil Pellouchoud pointed out that the windows version of libcurl had a
+ memory leak because it never called the OpenSSL function
+ CRYPTO_cleanup_all_ex_data() as it was supposed to. This was because of a
+ missing define in config-win32.h!
+
+Gisle Vanem (18 Aug 2008)
+- Updated lib/Makefile.Watcom with the option to use c-ares (USE_ARES=1).
+
+Yang Tse (18 Aug 2008)
+- Added test case 557 to verify libcurl's internal curl_m*printf() functions
+ formatting functionality when handling signed and unsigned longs, as well as
+ our curl_off_t data type.
+
+Yang Tse (17 Aug 2008)
+- OpenSSl enabled NetWare builds are changed to use the 'openssl' subdirectory
+ when including the OpenSSL header files. This is the recommended setting, this
+ prevents the undesired inclusion of header files with the same name as those
+ of OpenSSL but which do not belong to the OpenSSL package. The visible change
+ from previously released libcurl versions is that now OpenSSl enabled NetWare
+ builds also define USE_OPENSSL in config files, and that OpenSSL header files
+ must be located in a subdirectory named 'openssl'.
+
+Yang Tse (16 Aug 2008)
+- Library internal only C preprocessor macros FORMAT_OFF_T and FORMAT_OFF_TU
+ remain in use as internal curl_off_t print formatting strings for the internal
+ *printf functions which still cannot handle print formatting string directives
+ such as "I64d", "I64u", and others available on MSVC, MinGW, Intel's ICC, and
+ other DOS/Windows compilers.
+
+Daniel Fandrich (15 Aug 2008)
+- Added test case 1063 to test invalid long file ranges with file: URLs and
+ 1064 to test multiple http PUTs.
+
+- Added test case 1065 to test a PUT with a single file but two URLs. This
+ was discovered to be problematic while investigating an incident reported by
+ Von back in May. curl in this case doesn't include a Content-Length: or
+ Transfer-Encoding: chunked header which is illegal. This test case is
+ added to DISABLED until a solution is found.
+
+Yang Tse (15 Aug 2008)
+- C preprocessor macros used internally and equally available externally which
+ aid in the use of the curl_off_t data type are named: CURL_FORMAT_CURL_OFF_T,
+ CURL_FORMAT_CURL_OFF_TU, CURL_SIZEOF_CURL_OFF_T, CURL_SUFFIX_CURL_OFF_T,
+ CURL_SUFFIX_CURL_OFF_TU, CURL_OFF_T_C and CURL_OFF_TU_C.
+
+Yang Tse (13 Aug 2008)
+- The size of long is a build time characteristic and as such it is now recorded
+ in curlbuild.h as CURL_SIZEOF_LONG. Definition now done from configure process
+ and in CVS curlbuild.h.dist for non-configure systems.
+
+Daniel Fandrich (12 Aug 2008)
+- Fixed a buffer overflow problem in Curl_proxyCONNECT that could occur
+ when a server responded with long headers and data. Luckily, the buffer
+ overflowed into another unused buffer, so no actual harm was done.
+ Added test cases 1060 and 1061 to verify.
+
+Daniel Stenberg (12 Aug 2008)
+- Andy Tsouladze fixed runtests.pl to not attempt to execute the stunnel
+ _directory_ if that happened to appear in the path!
+
+Yang Tse (12 Aug 2008)
+- Added macros for minimum-width signed and unsigned curl_off_t integer
+ constants CURL_OFF_T_C and CURL_OFF_TU_C. The clever double helper macro
+ used internally to provide its functionality is thanks to Lars Nilsson.
+
+Daniel Fandrich (11 Aug 2008)
+- Fixed a boundary condition error in ftp_readresp() whereby a non-terminal
+ line of a multiline FTP response whose last byte landed exactly at the end
+ of the BUFSIZE-length buffer would be treated as the terminal response
+ line. The following response code read in would then actually be the
+ end of the previous response line, and all responses from then on would
+ correspond to the wrong command. Test case 1062 verifies this.
+
+- Stop closing a never-opened ftp socket.
+
+Daniel Stenberg (11 Aug 2008)
+- Constantine Sapuntzakis filed bug report #2042430
+ (http://curl.haxx.se/bug/view.cgi?id=2042430) with a patch. "NTLM Windows
+ SSPI code is not thread safe". This was due to libcurl using static
+ variables to tell wether to load the necessary SSPI DLL, but now the loading
+ has been moved to the more suitable curl_global_init() call.
+
+- Constantine Sapuntzakis filed bug report #2042440
+ (http://curl.haxx.se/bug/view.cgi?id=2042440) with a patch. He identified a
+ problem when using NTLM over a proxy but the end-point does Basic, and then
+ libcurl would do wrong when the host sent "Connection: close" as the proxy's
+ NTLM state was erroneously cleared.
+
+Yang Tse (11 Aug 2008)
+- Added missing signed and unsigned curl_off_t integer constant suffixes for
+ internal and external use. CURL_SUFFIX_CURL_OFF_T, CURL_SUFFIX_CURL_OFF_TU.
+
+Daniel Fandrich (7 Aug 2008)
+- Fixed an uninitialized variable in multi_runsingle() that could cause a
+ request to prematurely end.
+
+- Added test1059 to test the FTP proxy tunnel problem fixed July 11.
+
+Yang Tse (7 Aug 2008)
+- Added curlbuild.h and curlrules.h header files to libcurl's public headers.
+ File curlbuild.h is a generated file on configure-capable systems. This is
+ a first step towards configure-based info in public headers. Currently only
+ used to provide support for a curl_off_t data type which is not gated to
+ off_t. Further details are documented inside these mentioned header files.
+
+- Fix CURL_CHECK_DEF so that when the expansion of the preprocessor symbol
+ results in a set of double-quoted strings, this macro will now return an
+ expansion which consists of a single double-quoted string as the result of
+ concatenating all of them.
+
+- Skip data type check in DO_CURL_OFF_T_CHECK macro when argument is empty.
+
+- Adjusted testcurl.pl to copy checked out curlbuild.h.dist as curlbuild.h
+ for non-configure targets when the host system doesn't run buildconf.bat.
+
+- Prevent buildconf from removing 'Makefile' and 'missing' files. This would
+ blow away our CVS checked files 'missing' and 'hiper/Makefile'.
+
+- Remove adjustment done to testcurl.pl to verify if change introduced by
+ Guenter Knauf in lib/Makefile.netware is enough to get the netware autobuilds
+ going again.
+
+Yang Tse (5 Aug 2008)
+- Changes done to buildconf script. Validate that autom4te and autoconf, as
+ well as aclocal and automake, versions match. Improve removal of previous
+ run generated files. Remove verbose debug logging of aclocal on Solaris.
+
+Daniel Stenberg (5 Aug 2008)
+- Yehoshua Hershberg found a problem that would make libcurl re-use a
+ connection with the multi interface even if a previous use of it caused a
+ CURLE_PEER_FAILED_VERIFICATION to get returned. I now make sure that failed
+ SSL connections properly close the connections.
+
+Daniel Stenberg (4 Aug 2008)
+- Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and
+ proved how PUT and POST with a redirect could lead to a "hang" due to the
+ data stream not being rewound properly when it had to in order to get sent
+ properly (again) to the subsequent URL. This is now fixed and these test
+ cases are no longer disabled.
+
+Yang Tse (4 Aug 2008)
+- Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use.
+ Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. 2.62
+ version of AC_AIX defines _ALL_SOURCE and other four preprocessor symbols
+ no matter if the system is AIX or not. To keep the traditional behaviour,
+ and an uniform one across autoconf versions AC_AIX is replaced with our
+ own internal macro CURL_CHECK_AIX_ALL_SOURCE.
+
+Daniel Stenberg (4 Aug 2008)
+- Test case 1041 (added by Daniel Fandrich July 14th) proved a bug where PUT
+ with -C - sent garbage in the Content-Range: header. I fixed this problem by
+ making sure libcurl always sets the size of the _entire_ upload if an app
+ attemps to do resumed uploads since libcurl simply cannot know the size of
+ what is currently at the server end. Test 1041 is no longer disabled.
+
+Yang Tse (2 Aug 2008)
+- No longer test availability of the gdi32 library, nor use it for linking, even
+ when we have been doing this since revision 1.47 of configure.ac 4 years and
+ 5 months ago when cross-compiling a Windows target. We actually don't use any
+ function from the Windows GDI (Graphics Device Interface) related with drawing
+ or graphics-related operations.
+
+Daniel Fandrich (1 Aug 2008)
+- Added support for --append on SFTP uploads. Unfortunately, OpenSSH doesn't
+ support this so it goes untested.
+
+Yang Tse (1 Aug 2008)
+- Configure process now checks if the preprocessor _REENTRANT symbol is already
+ defined. If it isn't currently defined a set of checks are performed to test
+ if its definition is required to make visible to the compiler a set of *_r
+ functions. Finally, if _REENTRANT is already defined or needed it takes care
+ of making adjustments necessary to ensure that it is defined equally for the
+ configure process tests and generated config file.
+
+- Removed definition of CURL_CHECK_WORKING_RESOLVER from acinclude.m4 it has
+ not been in use since revision 1.81 of configure.in 6 years, 9 months ago.
+
+Daniel Fandrich (31 Jul 2008)
+- Fixed parsing of an IPv6 proxy address to support a scope identifier,
+ as well as IPv4 addresses in IPv6 format. Also, better handle the case
+ of a malformatted IPv6 address (avoid empty and NULL strings).
+
+- Fixed a problem with any FTP URL or any URLs containing an IPv6 address
+ being mangled when passed to proxies when CURLOPT_PORT is also set
+ (reported by Pramod Sharma).
+
+- User names embedded in proxy URLs without a password were parsed
+ incorrectly--the host name is treated as part of the user name and the
+ port number becomes the password. This can be observed in test 279
+ (was KNOWN_ISSUE #54).
+
+Daniel Stenberg (30 Jul 2008)
+- Phil Blundell added the CURLOPT_ADDRESS_SCOPE option, as well as adjusted
+ the URL parser to allow numerical IPv6-addresses to be specified with the
+ scope given, as per RFC4007 - with a percent letter that itself needs to be
+ URL escaped. For example, for an address of fe80::1234%1 the HTTP URL is:
+ "http://[fe80::1234%251]/"
+
+- PHP's bug report #43158 (http://bugs.php.net/bug.php?id=43158) identifies a
+ true bug in libcurl built with OpenSSL. It made curl_easy_getinfo() more or
+ less always return 0 for CURLINFO_SSL_VERIFYRESULT because the function that
+ would set it to something non-zero would return before the assign in almost
+ all error cases. The internal variable is now set to non-zero from the start
+ of the function only to get cleared later on if things work out fine.
+
+- Made the curl tool's -w option support the %{ssl_verify_result} variable
+
+Daniel Fandrich (30 Jul 2008)
+- Added test cases 1052 through 1055 to test uploading data from files
+ during redirects. Test cases 1052 and 1055 show problems (maybe the same
+ root cause as 1051) and are disabled.
+
+- Fixed a couple of buffer overflows in the MS-DOS port of the curl tool.
+
+Daniel Fandrich (29 Jul 2008)
+- Fixed --use-ascii to properly convert text files on Symbian OS, MS-DOS
+ and OS/2.
+
+- Added test case 1051 to test Location: following with PUT, as reported
+ by Ben Sutcliffe. The test when run manually shows a problem in curl
+ so it's disabled.
+
+Daniel Fandrich (28 Jul 2008)
+- Fixed display of the interface bind address in the trace output when it's
+ an IPv6 address.
+
+- Added test cases 1045 through 1049 as simple tests of --interface using the
+ localhost interface.
+
+- Added test case 1050 to test --ftp-port with an IPv6 address
+
+Daniel Stenberg (26 Jul 2008)
+- David Bau filed bug report #2026240 "CURL_READFUNC_PAUSE leads to buffer
+ overrun" (http://curl.haxx.se/bug/view.cgi?id=2026240) identifying two
+ problems, and providing the fix for them:
+
+ - CURL_READFUNC_PAUSE did in fact not pause the _sending_ of data that it is
+ designed for but paused _receiving_ of data!
+
+ - libcurl didn't internally set the read counter to zero when this return
+ code was detected, which would potentially lead to junk getting sent to
+ the server.
+
+Daniel Fandrich (26 Jul 2008)
+- Added test 1044 to test large file support in ftp with -I.
+
+- Eliminate a unnecessary socket creation in Curl_getaddrinfo for an IPv4
+ address in an IPv6 capable libcurl.
+
+- Added feature in runtests.pl to select tests based on key word.
+
+Daniel Fandrich (23 Jul 2008)
+- Changed the long logfile elision code in runtests.pl to properly handle
+ lines ending in \r.
+
+- Changed references to TRUE and FALSE in the curl_easy_setopt man page to
+ 1 and zero, respectively, since TRUE and FALSE aren't part of the
+ libcurl API.
+
+Daniel Stenberg (23 Jul 2008)
+- I went over the curl_easy_setopt man page and replaced most references to
+ non-zero with the fixed value of 1. We should strive at making options
+ support '1' for enabling them mentioned explicitly, as that then will allow
+ us for to extend them in the future without breaking older programs.
+
+ Possibly we should even introduce a fancy define to use instead of '1' all
+ over...
+
+Yang Tse (21 Jul 2008)
+- Use the sreadfrom() wrapper to replace recvfrom() in our code.
+
+Yang Tse (20 Jul 2008)
+- when recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will
+ now cause the definition, as appropriate, of RECVFROM_TYPE_ARG2_IS_VOID,
+ RECVFROM_TYPE_ARG5_IS_VOID or RECVFROM_TYPE_ARG6_IS_VOID.
+
+Yang Tse (17 Jul 2008)
+- RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined
+ to the data type pointed by its respective argument and not the pointer type.
+
+Yang Tse (16 Jul 2008)
+- Configure process now checks availability of recvfrom() socket function and
+ finds out its return type and the types of its arguments. Added definitions
+ for non-configure systems config files, and introduced macro sreadfrom which
+ will be used on udp sockets as a recvfrom() wrapper.
+
+Yang Tse (15 Jul 2008)
+- Added description/comment to include paths used in several Makefile.am files.
+ Added automake option nostdinc to test servers makefile and modified libcurl
+ external headers include path for libtest programs.
+
+Daniel Fandrich (14 Jul 2008)
+- Added test1040 through test1043 to test -C - on HTTP. Test 1041 failed so
+ it's added to DISABLED.
+
+Yang Tse (14 Jul 2008)
+- HTTP_ONLY definition check in lib/setup.h is now done once that configuration
+ file has been included. In this way if symbol is defined in the config file
+ it will no longer be ignored. Removed inclusion of remaining system header
+ files from configuration files. Moved _REENTRANT definition up/earlier in
+ lib/setup.h
+
+Yang Tse (11 Jul 2008)
+- Added missing multiple header inclusion prevention definition for header
+ file content_encoding.h
+
+Daniel Fandrich (11 Jul 2008)
+- Fixed test 553 to pass the torture test.
+
+Daniel Stenberg (11 Jul 2008)
+- Daniel Fandrich found out we didn't pass on the user-agent properly when
+ doing "proxy-tunnels" with non-HTTP prototols and that was simply because
+ the code assumed the user-agent was only needed for HTTP.
+
+Daniel Fandrich (10 Jul 2008)
+- Changed slightly the SFTP quote commands chmod, chown and chgrp to only
+ set the attribute that has changed instead of all possible ones. Hopefully,
+ this will solve the "Permission denied" problem that Nagarajan Sreenivasan
+ reported when setting some modes, but regardless, it saves a protocol
+ round trip in the chmod case.
+
+- Added test cases 1038 and 1039 to test Adrian Kreher's report that ftp
+ uploads with -C - didn't resume properly, but the tests pass.
+
+Yang Tse (10 Jul 2008)
+- Peter Lamberg filed bug report #2015126: "poll gives WSAEINVAL when POLLPRI
+ is set in fdset.events" (http://curl.haxx.se/bug/view.cgi?id=2015126) which
+ exactly pinpointed the problem only triggered on Windows Vista, provided
+ reference to docs and also a fix. There is much work behind Peter Lamberg's
+ excellent bug report. Thank You!
+
+Daniel Fandrich (9 Jul 2008)
+- Added tests 1036 and 1037 to verify resumed ftp downloads with -C -
+
+Daniel Stenberg (9 Jul 2008)
+- Andreas Schuldei improved Phil Blundell's patch for IPv6 using c-ares, and I
+ edited it slightly. Now you should be able to use IPv6 addresses fine even
+ with libcurl built to use c-ares.
+
+Daniel Fandrich (9 Jul 2008)
+- Fixed an OOM handling problem that cause test 11 to fail the torture test.
+
+Daniel Fandrich (8 Jul 2008)
+- Fixed test 554 to pass the torture test.
+
+Daniel Fandrich (7 Jul 2008)
+- Added test cases 1034 & 1035 to test IDN name conversion failures.
+
+Daniel Stenberg (7 Jul 2008)
+- Scott Barrett provided a test case for a segfault in the FTP code and the
+ fix for it. It occured when you did a FTP transfer using
+ CURLFTPMETHOD_SINGLECWD and then did another one on the same easy handle but
+ switched to CURLFTPMETHOD_NOCWD. Due to the "dir depth" variable not being
+ cleared properly. Scott's test case is now known as test 539 and it
+ verifies the fix.
+
+Daniel Stenberg (3 Jul 2008)
+- Phil Blundell provided a fix for libcurl's treatment of unexpected 1xx
+ response codes. Previously libcurl would hang on such occurances. I added
+ test case 1033 to verify.
+
+- Introcuding a new timestamp for curl_easy_getinfo():
+ CURLINFO_APPCONNECT_TIME. This is set with the "application layer"
+ handshake/connection is completed. Which typically is SSL, TLS or SSH and by
+ using this you can figure out the application layer's own connect time. You
+ can extract the time stamp using curl's -w option and the new variable named
+ 'time_appconnect'. This feature was sponsored by Lenny Rachitsky at NeuStar.
+
+Daniel Fandrich (2 Jul 2008)
+- Support Open Watcom C on Linux (as well as Windows).
+
+Yang Tse (2 Jul 2008)
+- The previously committed fix for bug report #1999181 prevented using the
+ monotonic clock on any system without an always supported POSIX compliant
+ implementation. Now the POSIX compliant configuration check is removed and
+ will fallback to gettimeofday when the monotonic clock is unavailable at
+ run-time.
+
+- The configure process will now halt when sed, grep, egrep or ar programs
+ can not be found among the directories in PATH variable.
+
+Daniel Stenberg (1 Jul 2008)
+- Rolland Dudemaine provided fixes to get libcurl to build for the INTEGRITY
+ operating system.
+
+Daniel Stenberg (30 Jun 2008)
+- Made the internal printf() support %llu properly to print unsigned long longs.
+
+- Stephen Collyer and Tor Arntsen helped identify a flaw in the range code
+ which output the range using a signed variable where it should rather use
+ unsigned.
+
+Yang Tse (29 Jun 2008)
+- John Lightsey filed bug report #1999181: "CLOCK_MONOTONIC always fails on
+ some systems" (http://curl.haxx.se/bug/view.cgi?id=1999181). The problem was
+ that the configure script did not use the _POSIX_MONOTONIC_CLOCK feature test
+ macro when checking monotonic clock availability. This is now fixed and the
+ monotonic clock will not be used unless the feature test macro is defined
+ with a value greater than zero indicating always supported.
+
+Daniel Fandrich (25 Jun 2008)
+- Honour --stderr with the -v option.
+
+- Fixed a file handle leak in the command line client if more than one
+ --stderr option was given.
+
+Daniel Stenberg (22 Jun 2008)
+- Eduard Bloch filed the debian bug report #487567
+ (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487567) pointing out that
+ libcurl used Content-Range: instead of Range when doing a range request with
+ --head (CURLOPT_NOBODY). This is now fixed and test case 1032 was added to
+ verify.
+
+Daniel Fandrich (21 Jun 2008)
+- Stopped using ranges in scanf character sequences (e.g. %[a-z]) since that
+ is not ANSI C, just a common extension. This caused problems on
+ at least Open Watcom C.
+
+Yang Tse (20 Jun 2008)
+- Modified configuration script to actually verify if the compiler is good
+ enough at detecting compilation errors or at least it has been properly
+ configured to do so. Configuration heavily depends on this capability, so
+ if this compiler sanity check fails the configuration process will now fail.
+
+Daniel Stenberg (20 Jun 2008)
+- Phil Pellouchoud found a case where libcurl built with NSS failed to
+ handshake with a SSLv2 server, and it turned out to be because it didn't
+ recognize the cipher named "rc4-md5". In our list that cipher was named
+ plainly "rc4". I've now added rc4-md5 to work as an alias as Phil reported
+ that it made things work for him again.
+
+- Hans-Jurgen May pointed out that trying SCP or SFTP over a SOCKS proxy
+ crashed libcurl. This is now addressed by making sure we use "plain send"
+ internally when doing the socks handshake instead of the Curl_write()
+ function which is designed to use the "target" protocol. That's then SCP or
+ SFTP in this case. I also took the opportunity and cleaned up some ssh-
+ related #ifdefs in the code for readability.
+
+Daniel Stenberg (19 Jun 2008)
+- Christopher Palow fixed a curl_multi_socket() issue which previously caused
+ libcurl to not tell the app properly when a socket was closed (when the name
+ resolve done by c-ares is completed) and then immediately re-created and put
+ to use again (for the actual connection). Since the closure will make the
+ "watch status" get lost in several event-based systems libcurl will need to
+ tell the app about this close/re-create case.
+
+- Dengminwen found a bug in the connection re-use function when using the
+ multi interface with pipelining enabled as it would wrongly check for,
+ detect and close "dead connections" even though that connection was already
+ in use!
+
+Daniel Fandrich (18 Jun 2008)
+- Added SSH failure test cases 628-632
+
+- Fixed a memory leak in the command-line tool that caused a valgrind error.
+
+Daniel Stenberg (18 Jun 2008)
+- Rob Crittenden brought a fix for the NSS layer that makes libcurl no longer
+ always fire up a new connection rather than using the existing one when the
+ multi interface is used. Original bug report:
+ https://bugzilla.redhat.com/show_bug.cgi?id=450140
+
+Yang Tse (18 Jun 2008)
+- Internal configure script improvement. No longer break out of shell "for"
+ statements from inside AC_FOO_IFELSE macros, otherwise temporary macro files
+ are not properly removed.
+
+Daniel Fandrich (12 Jun 2008)
+- Fixed curl-config --ca which wasn't being exported by configure.
+
+Daniel Stenberg (11 Jun 2008)
+- I did a cleanup of the internal generic SSL layer and how the various SSL
+ libraries are supported. Starting now, each underlying SSL library support
+ code does a set of defines for the 16 functions the generic layer (sslgen.c)
+ uses (all these new function defines use the prefix "curlssl_"). This
+ greatly simplified the generic layer in readability by involving much less
+ #ifdefs and other preprocessor stuff and should make it easier for people to
+ make libcurl work with new SSL libraries.
+
+ Hopefully I can later on document these 16 functions somewhat as well.
+
+ I also made most of the internal SSL-dependent functions (using Curl_ssl_
+ prefix) #defined to nothing when no SSL support is requested - previously
+ they would unnecessarily call mostly empty functions.
+
+ I've built libcurl with OpenSSL and GnuTLS and without SSL to test this and
+ I've also tried building with NSS but the NSS support is a mystery to me and
+ I failed to build libcurl with the NSS libraries I have installed. We really
+ should A) improve our configure script to detect unsuitable NSS versions
+ already at configure time and B) document our requirements better for the
+ SSL libraries.
+
+Daniel Stenberg (10 Jun 2008)
+- I made the OpenSSL code build again with OpenSSL 0.9.6. The CRLFILE
+ functionality killed it due to its unconditional use of
+ X509_STORE_set_flags...
+
+Daniel Stenberg (8 Jun 2008)
+- Due to the three new libcurl changes and the massive command line option
+ change I decided we'll mark it by bumping the next release number to 7.19.0!
+
+- curl the tool now deals with its command line options somewhat differently!
+ All boolean options (such as -O, -I, -v etc), both short and long versions,
+ now always switch on/enable the option named. Using the same option multiple
+ times thus make no difference. To switch off one of those options, you need
+ to use the long version of the option and type --no-OPTION. Like to disable
+ verbose mode you use --no-verbose!
+
+- Added --remote-name-all to curl, which if used changes the default for all
+ given URLs to be dealt with as if -O is used. So if you want to disable that
+ for a specific URL after --remote-name-all has been used, you muse use -o -
+ or --no-remote-name.
+
+Daniel Stenberg (6 Jun 2008)
+- Axel Tillequin and Arnaud Ebalard added support for CURLOPT_ISSUERCERT, for
+ OpenSSL, NSS and GnuTLS-built libcurls.
+
+- Axel Tillequin and Arnaud Ebalard added support for CURLOPT_CRLFILE, for
+ OpenSSL, NSS and GnuTLS-built libcurls.
+
+- Added CURLINFO_PRIMARY_IP as a new information retrievable with
+ curl_easy_getinfo. It returns a pointer to a string with the most recently
+ used IP address. Modified test case 500 to also verify this feature. The
+ implementing of this feature was sponsored by Lenny Rachitsky at NeuStar.
+
+Version 7.18.2 (4 June 2008)
+
+Daniel Fandrich (3 Jun 2008)
+- Fixed a problem where telnet data would be lost if an EWOULDBLOCK
+ condition were encountered.
+
+Marty Kuhrt (1 Jun 2008)
+- Updated main.c to return CURLE_OK if PARAM_HELP_REQUESTED was returned
+ from getparameter instead of CURLE_FAILED_INIT. No point in returning
+ an error if --help or --version were requested.
+
+Daniel Stenberg (28 May 2008)
+- Emil Romanus found a problem and helped me repeat it. It occured when using
+ the curl_multi_socket() API with HTTP pipelining enabled and could lead to
+ the pipeline basically stalling for a very long period of time until it took
+ off again.
+
+- Jeff Weber reported memory leaks with aborted SCP and SFTP transfers and
+ provided excellent repeat recipes. I fixed the cases I managed to reproduce
+ but Jeff still got some (SCP) problems even after these fixes:
+ http://curl.haxx.se/mail/lib-2008-05/0342.html
+
+Daniel Stenberg (26 May 2008)
+- Bug report #1973352 (http://curl.haxx.se/bug/view.cgi?id=1973352) identified
+ how the HTTP redirect following code didn't properly follow to a new URL if
+ the new url was but a query string such as "Location: ?moo=foo". Test case
+ 1031 was added to verify this fix.
+
+- Andreas Faerber and Scott McCreary made (lib)curl build for the Haiku OS.
+
+Yang Tse (26 May 2008)
+- David Rosenstrauch reported that header files spnegohelp.h and
+ openssl/objects.h were needed to compile SPNEGO support.
+
+Daniel Fandrich (22 May 2008)
+- Made sure to pass longs in to curl_easy_setopt where necessary in the
+ example programs and libtest code.
+
+Daniel Stenberg (19 May 2008)
+- When trying to repeat a multi interface problem I fell over a few multi
+ interface problems:
+
+ o with pipelining disabled, the state should never be set to WAITDO but
+ rather go straight to DO
+
+ o we had multiple states for which the internal function returned no socket
+ at all to wait for, with the effect that libcurl calls the socket callback
+ (when curl_multi_socket() is used) with REMOVE prematurely (as it would be
+ added again within very shortly)
+
+ o when in DO and DOING states, the HTTP and HTTPS protocol handler functions
+ didn't return that the socket should be waited for writing, but instead it
+ was treated as if no socket was needing monitoring so again REMOVE was
+ called prematurely.
+
+Daniel Stenberg (13 May 2008)
+- Added test case 556 that uses curl_easy_send() and curl_easy_recv()
+
+Daniel Stenberg (9 May 2008)
+- Introducing curl_easy_send() and curl_easy_recv(). They can be used to send
+ and receive data over a connection previously setup with curl_easy_perform()
+ and its CURLOPT_CONNECT_ONLY option. The sendrecv.c example was added to
+ show how they can be used.
+
+Yang Tse (9 May 2008)
+- Internal time differences now use monotonic time source if available.
+ This also implies the removal of the winmm.lib dependency for WIN32.
+
+Daniel Stenberg (9 May 2008)
+- Stefan Krause reported a busy-looping case when using the multi interface
+ and doing CONNECT to a proxy. The app would then busy-loop until the proxy
+ completed its response.
+
+Michal Marek (9 May 2008)
+- Make Curl_write and it's callees accept a const pointer, in preparation
+ of tetetest's patch for curl_easy_send()
+
+Daniel Stenberg (7 May 2008)
+- Liam Healy filed the debian bug report #480044
+ (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480044) identifying a
+ segfault when using krb5 ftp, but the krb4 code had the same problem.
+
+Yang Tse (7 May 2008)
+- Christopher Palow provided the patch (edited by me) that introduces the
+ use of microsecond resolution keys for internal splay trees.
+
+Daniel Stenberg (4 May 2008)
+- Yuriy Sosov pointed out a configure fix for detecting c-ares when that is
+ built debug-enabled.
+
+Daniel Stenberg (3 May 2008)
+- Ben Van Hof filed bug report #1945240: "libcurl sometimes sends body twice
+ when using CURL_AUTH_ANY" (http://curl.haxx.se/bug/view.cgi?id=1945240).
+ The problem was that when libcurl rewound a stream meant for upload when it
+ would prepare for a second request, it could accidentally continue the
+ sending of the rewound data on the first request instead of on the second.
+ Ben also provided test case 1030 that verifies this fix.
+
+Daniel Stenberg (3 May 2008)
+- Jean-Francois Bertrand reported a libcurl crash with CURLOPT_TCP_NODELAY
+ since libcurl used getprotobyname() and that isn't thread-safe. We now
+ switched to use IPPROTO_TCP unconditionally, but perhaps the proper fix is
+ to detect the thread-safe version of the function and use that.
+ http://curl.haxx.se/mail/lib-2008-05/0011.html
+
+Daniel Stenberg (1 May 2008)
+- Bart Whiteley provided a patch that made libcurl work properly when an app
+ uses the CURLOPT_OPENSOCKETFUNCTION callback to create a unix domain socket
+ to a http server.
+
+Daniel Stenberg (29 Apr 2008)
+- To make it easier for applications that want lots of magic stuff done on
+ redirections and thus cannot use CURLOPT_FOLLOWLOCATION easily, we now
+ introduce the new CURLINFO_REDIRECT_URL option that lets applications
+ extract the URL libcurl would've redirected to if it had been told to. This
+ then enables the application to continue to that URL as it thinks is
+ suitable, without having to re-implement the magic of creating the new URL
+ from the Location: header etc. Test 1029 verifies it.
+
+Yang Tse (29 Apr 2008)
+- Improved easy interface resolving timeout handling in c-ares enabled builds
+
+Daniel Fandrich (28 Apr 2008)
+- Added test 1028 to test an HTTP redirect to a FTP URL.
+
+Daniel Stenberg (28 Apr 2008)
+- Norbert Frese filed bug report #1951588: "Problem with curlftpfs and
+ libcurl" (http://curl.haxx.se/bug/view.cgi?id=1951588) which seems to be an
+ identical report to what Denis Golovan reported in
+ http://curl.haxx.se/mail/lib-2008-02/0108.html The FTP code didn't reset the
+ user/password pointers properly even though there might've been a new
+ struct/cconnection getting used.
+
+Daniel Stenberg (26 Apr 2008)
+- Reverted back to use automake 1.9.6 in the next release (from automake
+ 1.10.1) since it *still* suffers from Solaris-related bugs. Our previous
+ automake 1.10 problem was reported in bug #1701360
+ (http://curl.haxx.se/bug/view.cgi?id=1701360) and this recent problem was
+ bug #1944825 (http://curl.haxx.se/bug/view.cgi?id=1944825). I have not
+ personally approached the automake team about either one of these but I
+ figure we need a Solaris 10 guy to do it!
+
+Yang Tse (25 Apr 2008)
+- Added 'timeout' and 'delay' attributes support for the test harness
+ <command> subsection.
+
+Daniel Fandrich (24 Apr 2008)
+- Made --stderr able to redirect all stderr messages.
+
+Yang Tse (23 Apr 2008)
+- Improve synchronization between test harness runtests.pl script
+ and test harness servers to minimize risk of false test failures.
+
+Daniel Fandrich (22 Apr 2008)
+- Added support for running on Symbian OS.
+
+Daniel Fandrich (18 Apr 2008)
+- Added test cases 1026 and 1027 to do some rudimentary tests on the --manual
+ and --help options.
+
+Michal Marek (14 Apr 2008)
+- allow disabling the typechecker by defining CURL_DISABLE_TYPECHECK, as
+ discussed in http://curl.haxx.se/mail/lib-2008-04/0291.html
+
+Daniel Stenberg (14 Apr 2008)
+- Stefan Krause reported a case where the OpenSSL handshake phase wasn't
+ properly acknowledging the timeout values, like if you pulled the network
+ plug in the midst of it.
+
+- Andre Guibert de Bruet fixed a second case of not checking the malloc()
+ return code in the Negotiate code.
+
+- Sandor Feldi reported bug #1942022
+ (http://curl.haxx.se/bug/view.cgi?id=1942022) pointing out a mistake in the
+ lib/Makefile.vc[68] makefiles' release-ssl-dll target.
+
+- Brock Noland reported that curl behaved differently depending on which order
+ you used -i and -I.
+
+Daniel Stenberg (12 Apr 2008)
+- Andre Guibert de Bruet found and fixed a case where malloc() was called but
+ was not checked for a NULL return, in the Negotiate code.
+
+Daniel Fandrich (9 Apr 2008)
+- Added test cases 1024 & 1025 to test a scenario similar to the one reported
+ by Ben Combee where libcurl would send the wrong cookie to a redirected
+ server. libcurl was doing the right thing in these test cases.
+
+Michal Marek (7 Apr 2008)
+- Fix the MIT / Heimdal check for good:
+ Define HAVE_GSSMIT if <gssapi/{gssapi.h,gssapi_generic.h,gssapi_krb5.h}> are
+ available, otherwise define HAVE_GSSHEIMDAL if <gssapi.h> is available.
+
+ Only define GSS_C_NT_HOSTBASED_SERVICE to gss_nt_service_name if
+ GSS_C_NT_HOSTBASED_SERVICE isn't declared by the gssapi headers. This should
+ avoid breakage in case we wrongly recognize Heimdal as MIT again.
+
+Daniel Stenberg (5 Apr 2008)
+- Alexey Simak fixed curl_easy_reset() to reset the max redirect limit properly
+
+- Based on the Debian bug report #474224 that complained about the FTP error
+ message when libcurl doesn't get a 220 back immediately on connect, I now
+ changed it to be more specific on what the problem is. Also worth noticing:
+ while the bug report contains an example where the response is:
+
+ 421 There are too many connected users, please try again later
+
+ we cannot assume that the error message will always be this readable nor
+ that it fits within a particular boundary etc.
+
+Daniel Fandrich (3 Apr 2008)
+- Added test627 to test SFTP with CURLOPT_NOBODY
+
+Daniel Stenberg (3 Apr 2008)
+- Setting CURLOPT_NOBODY to FALSE will now switch the HTTP request method to
+ GET simply because previously when you set CURLOPT_NOBODY to TRUE first and
+ then FALSE you'd end up in a broken state where a HTTP request would do a
+ HEAD by still act a lot like for a GET and hang waiting for the content etc.
+
+- Scott Barrett added support for CURLOPT_NOBODY over SFTP
+
+Daniel Fandrich (3 Apr 2008)
+- Made sure that curl_global_init is called in all the multithreaded
+ example programs.
+
+Michal Marek (31 Mar 2008)
+- Removed the generated ca-bundle.h file. The verbatim value of $ca and
+ $capath is known to configure, so it can be defined in config.h instead.
+
+Daniel Stenberg (31 Mar 2008)
+- Added CURLFORM_STREAM as a supported option to curl_formadd() to allow an
+ application to provide data for a multipart with the read callback. Note
+ that the size needs to be provided with CURLFORM_CONTENTSLENGTH when the
+ stream option is used. This feature is verified by the new test case
+ 554. This feature was sponsored by Xponaut.
+
+Daniel Fandrich (30 Mar 2008)
+- Changed the makefile so the doc/examples/ programs are never built in a
+ normal build/install (only with the 'make check' target), so that a
+ build failure in the examples isn't fatal.
+
+Version 7.18.1 (30 March 2008)
+
+Daniel Stenberg (28 Mar 2008)
+- Stephen Collyer pointed out that configure --with-libssh2 without a given
+ path didn't work properly.
+
+Daniel Stenberg (27 Mar 2008)
+- As found out and reported by Dan Petitt, libcurl didn't show progress/call
+ the progress callback for the first (potentially huge) piece of body data
+ sent together with the POST request headers in the initial send().
+
+Daniel Stenberg (25 Mar 2008)
+- Made setting the CURLOPT_SSL_CTX_FUNCTION option return a failure in case
+ libcurl wasn't built to use OpenSSL as that is a prerequisite for this
+ option to function!
+
+Daniel Stenberg (22 Mar 2008)
+- Fixed the problem with doing a zero byte SCP transfer, verified with test
+ case 617 (which was added by Daniel Fandrich 5 Mar 2008).
+
+Daniel Fandrich (20 Mar 2008)
+- Fixed a problem where curl-config --protocols could erroneously show LDAPS
+ support when curl didn't even have regular LDAP support. It looks like
+ this could happen when the --enable-ldaps configure switch is given but
+ configure couldn't find the LDAP headers or libraries.
+
+Michal Marek (20 Mar 2008)
+- Added --with-ca-path=DIRECTORY configure option to use an openSSL CApath by
+ default instead of a ca bundle. The configure script will also look for a
+ ca path if no ca bundle is found and no option given.
+
+- Fixed detection of previously installed curl-ca-bundle.crt
+
+Daniel Fandrich (18 Mar 2008)
+- Added test 626 to reproduce an infinite loop when given an invalid
+ SFTP quote command reported by Vincent Le Normand, and fixed it.
+
+Michal Marek (18 Mar 2008)
+- Added curl_easy_getinfo typechecker.
+
+- Added macros for curl_share_setopt and curl_multi_setopt to check at least
+ the correct number of arguments.
+
+Daniel Fandrich (13 Mar 2008)
+- Added tests 622-625 to test SFTP/SCP uploads. Test 625 was an attempt to
+ reproduce the --ftp-create-dirs problem reported by Brian Ulm, but that
+ seems to need a call curl_easy_reset() which this test case doesn't do.
+
+Daniel Stenberg (13 Mar 2008)
+- Brian Ulm figured out that if you did an SFTP upload with
+ CURLOPT_FTP_CREATE_MISSING_DIRS to create a directory, and then re-used the
+ handle and uploaded another file to another directory that needed to be
+ created, the second upload would fail. Another case of a state variable that
+ wasn't properly reset between requests.
+
+- I rewrote the 100-continue code to use a single state variable instead of
+ the previous two ones. I think it made the logic somewhat clearer.
+
+Daniel Stenberg (11 Mar 2008)
+- Dmitry Popov filed bug report #1911069
+ (http://curl.haxx.se/bug/view.cgi?id=1911069) that identified a race
+ condition in the name resolver code when the DNS cache is shared between
+ multiple easy handles, each running in simultaneous threads that could cause
+ crashes.
+
+- Added a macro for curl_easy_setopt() that accepts three arguments and simply
+ does nothing with them, just to make sure libcurl users always use three
+ arguments to this function. Due to its use of ... for the third argument, it
+ is otherwise hard to detect abuse.
+
+Michal Marek (11 Mar 2008)
+- Added a type checking macro for curl_easy_setopt(), needs gcc-4.3 and only
+ works in C mode atm (http://curl.haxx.se/mail/lib-2008-02/0267.html ,
+ http://curl.haxx.se/mail/lib-2008-02/0292.html )
+
+Daniel Fandrich (10 Mar 2008)
+- Added tests 618-621 to test SFTP/SCP transfers of more than one file
+ (test 620 tests the just-fixed problem reported by Brian Ulm).
+
+Daniel Stenberg (9 Mar 2008)
+- Brian Ulm reported a crash when doing a second SFTP transfer on a re-used
+ easy handle if curl_easy_reset() was used between them. I fixed it and Brian
+ verified that it cured his problem.
+
+- Brian Ulm reported that if you first tried to download a non-existing SFTP
+ file and then fetched an existing one and re-used the handle, libcurl would
+ still report the second one as non-existing as well! I fixed it and Brian
+ verified that it cured his problem.
+
+Michal Marek (6 Mar 2008)
+- Fix the gssapi configure check to detect newer MIT Kerberos (patch by
+ Michael Calmer)
+
+Yang Tse (6 Mar 2008)
+- Fix regression on Curl_socket_ready() and Curl_poll() so that these will
+ again fail on select/poll errors different than EINTR.
+
+Daniel Fandrich (5 Mar 2008)
+- Fixed the test harness so it will write out zero-length data files.
+
+- Added tests 616 and 617 to see how SFTP and SCP cope with zero-length
+ files, as questioned by Mike Protts. SFTP does for me but SCP doesn't
+ so test 617 is disabled for now.
+
+Daniel S (4 Mar 2008)
+- Mike Protts brought a patch that makes resumed transfers work with SFTP.
+
+Daniel S (1 Mar 2008)
+- Anatoli Tubman found and fixed a crash with Negotiate authentication used on
+ a re-used connection where both requests used Negotiate.
+
+Guenter Knauf (26 Feb 2008)
+- Kaspar Brand provided a patch to support server name indication (RFC 4366).
+
+Daniel S (25 Feb 2008)
+- Kaspar Brand made GnuTLS-built libcurl properly acknowledge the option that
+ forces it to prefer SSLv3.
+
+Daniel S (23 Feb 2008)
+- Sam Listopad provided a patch in feature-request #1900014
+ http://curl.haxx.se/bug/feature.cgi?id=1900014 that makes libcurl (built to
+ use OpenSSL) support a full chain of certificates in a given PKCS12
+ certificate.
+
+Daniel S (22 Feb 2008)
+- Georg Lippitsch made the src/Makefile.vc6 makefile use the same memory model
+ options as the lib/Makefile.vc6 already did.
+
+Daniel S (21 Feb 2008)
+- Zmey Petroff found a crash when libcurl accessed a NULL pointer, which
+ happened if you set the connection cache size to 1 and for example failed to
+ login to an FTP site. Bug report #1896698
+ (http://curl.haxx.se/bug/view.cgi?id=1896698)
+
+Daniel S (20 Feb 2008)
+- Fixed test case 405 to not fail when libcurl is built with GnuTLS
+
+- Based on initial work done by Gautam Kachroo to address a bug, we now keep
+ better control at the exact state of the connection's SSL status so that we
+ know exactly when it has completed the SSL negotiation or not so that there
+ won't be accidental re-uses of connections that are wrongly believed to be
+ in SSL-completed-negotiate state.
+
+- We no longer support setting the CURLOPT_URL option from inside a callback
+ such as the CURLOPT_SSL_CTX_FUNCTION one treat that as if it was a Location:
+ following. The patch that introduced this feature was done for 7.11.0, but
+ this code and functionality has been broken since about 7.15.4 (March 2006)
+ with the introduction of non-blocking OpenSSL "connects".
+
+ It was a hack to begin with and since it doesn't work and hasn't worked
+ correctly for a long time and nobody has even noticed, I consider it a very
+ suitable subject for plain removal. And so it was done.
+
+Guenter Knauf (19 Feb 2008)
+- We do no longer support SSLv2 by default since it has known flaws.
+ Kaspar Brand provided a patch for all supported SSL toolkits.
+
+Daniel Fandrich (19 Feb 2008)
+- Added test309 to test HTTP redirect to HTTPS URL
+
+Daniel S (18 Feb 2008)
+- We're no longer providing a very old ca-bundle in the curl tarball. You can
+ get a fresh one downloaded and created with 'make ca-bundle' or you can get
+ one from here => http://curl.haxx.se/docs/caextract.html if you want a fresh
+ new one extracted from Mozilla's recent list of ca certs.
+
+ The configure option --with-ca-bundle now lets you specify what file to use
+ as default ca bundle for your build. If not specified, the configure script
+ will check a few known standard places for a global ca cert to use.
+
+Daniel S (17 Feb 2008)
+- Jerome Muffat-Meridol helped me fix Curl_done() to close the current
+ connection by force when it was called before the entire request is
+ completed, simply because we can't know if the connection really can be
+ re-used safely at that point.
+
+- Based on the same debugging logic, I've also made Curl_http_done() not
+ return CURLE_GOT_NOTHING if called "prematurely". This should have no real
+ effect to anything but the code makes more sense like this.
+
+Daniel S (15 Feb 2008)
+- Made the gnutls code path not even try to get the server cert if no peer
+ verification is requested. Previously it would even return failure if gnutls
+ failed to get the server cert even though no verification was asked for.
+ Public server showing the problem: https://www.net222.caisse-epargne.fr
+
+- Fix my Curl_timeleft() leftover mistake in the gnutls code
+
+- Pooyan McSporran found and fixed a flaw where you first would do a normal
+ http request and then you'd reuse the handle and replace the Accept: header,
+ as then libcurl would send two Accept: headers!
+
+Daniel S (11 Feb 2008)
+- Yang Tse pointed out a few remaining quirks from my timeout refactoring from
+ Feb 7 that didn't abort properly on timeouts. These are actually old
+ problems but now they should be fixed.
+
+Yang Tse (10 Feb 2008)
+- Bug report #1888932 (http://curl.haxx.se/bug/view.cgi?id=1888932) points out
+ and provides test program that demonstrates that libcurl might not set error
+ description message for error CURLE_COULDNT_RESOLVE_HOST for Windows threaded
+ name resolver builds. Fixed now.
+
+Daniel Fandrich (8 Feb 2008)
+- Added key words to all SSL-using tests so they can be skipped if necessary.
+ Removed a few unnecessary requires SSL statements.
+
+Daniel S (8 Feb 2008)
+- Mike Hommey filed and fixed bug report #1889856
+ (http://curl.haxx.se/bug/view.cgi?id=1889856): When using the gnutls ssl
+ layer, cleaning-up and reinitializing curl ends up with https requests
+ failing with "ASN1 parser: Element was not found" errors. Obviously a
+ regression added in 7.16.3.
+
+Yang Tse (8 Feb 2008)
+- Improved test harness SCP/SFTP start up server verification, doing a real
+ connection to the sftp server, authenticating and running a simple sftp
+ pwd command using the test harness generated configuration and key files.
+
+Daniel S (8 Feb 2008)
+- Günter Knauf added lib/mk-ca-bundle.pl which gets the Firefox ca bundle and
+ creates a suitable ca-bundle.crt file in PEM format for use with curl. The
+ recommended way to run it is to use 'make ca-bundle' in the build tree root.
+
+Daniel Fandrich (7 Feb 2008)
+- Added tests 1022 and 1023 to validate output of curl-config --version and
+ --vernum
+
+Daniel S (7 Feb 2008)
+- Refactored a lot of timeout code into a few functions in an attempt to make
+ them all use the same (hopefully correct) logic to make it less error-prone
+ and easier to introduce library-wide where it should be used.
+
+Yang Tse (6 Feb 2008)
+- Fix an issue in strdup replacement function when dealing with absolutely
+ huge strings. Only systems without a standard strdup would be affected.
+
+Daniel S (3 Feb 2008)
+- Dmitry Kurochkin cleaned up the pipelining code and removed the need for and
+ use of the "is_in_pipeline" struct field.
+
+- I wrote up and added the threaded-ssl.c example source code that shows how
+ to do multi-threaded downloads of HTTPS files with a libcurl that is built
+ with OpenSSL. It uses pthreads for the threading.
+
+Daniel S (31 Jan 2008)
+- Niklas Angebrand made the cookie support in libcurl properly deal with the
+ "HttpOnly" feature introduced by Microsoft and apparently also supported by
+ Firefox: http://msdn2.microsoft.com/en-us/library/ms533046.aspx . HttpOnly
+ is now supported when received from servers in HTTP headers, when written to
+ cookie jars and when read from existing cookie jars.
+
+ I modified test case 31 and 46 to also do some basic HttpOnly testing.
+
+- Dmitry Kurochkin moved several struct fields from the connectdata struct to
+ the SingleRequest one to make pipelining better. It is a bit tricky to keep
+ them in the right place, to keep things related to the actual request or to
+ the actual connection in the right place.
+
+Daniel S (29 Jan 2008)
+- Dmitry Kurochkin fixed Curl_done() for pipelining, as it could previously
+ crash!
+
+- Michal Marek fixed minor mistake in test case 553 that prevented it from
+ working on other IP-addresses or port numbers.
+
+Version 7.18.0 (28 January 2008)
+
+Daniel S (27 Jan 2008)
+- Dmitry Kurochkin: In "real world" testing I found more bugs in
+ pipelining. Broken connection is not restored and we get into infinite
+ loop. It happens because of wrong is_in_pipeline values.
+
+Daniel S (26 Jan 2008)
+- Kevin Reed filed bug report #1879375
+ (http://curl.haxx.se/bug/view.cgi?id=1879375) which describes how libcurl
+ got lost in this scenario: proxy tunnel (or HTTPS over proxy), ask to do any
+ proxy authentication and the proxy replies with an auth (like NTLM) and then
+ closes the connection after that initial informational response.
+
+ libcurl would not properly re-initialize the connection to the proxy and
+ continue the auth negotiation like supposed. It does now however, as it will
+ now detect if one or more authentication methods were available and asked
+ for, and will thus retry the connection and continue from there.
+
+- I made the progress callback get called properly during proxy CONNECT.
+
+Daniel S (23 Jan 2008)
+- Igor Franchuk pointed out that CURLOPT_COOKIELIST set to "ALL" leaked
+ memory, and so did "SESS". Fixed now.
+
+Yang Tse (22 Jan 2008)
+- Check poll.h at configuration time, and use it when sys/poll.h unavailable
+
+Daniel S (22 Jan 2008)
+- Dmitry Kurochkin removed the cancelled state for pipelining, as we agreed
+ that it is bad anyway. Starting now, removing a handle that is in used in a
+ pipeline will break the pipeline - it'll be set back up again but still...
+
+Yang Tse (21 Jan 2008)
+- Disable ldap support for cygwin builds, since it breaks whole build process.
+ Fixing it will affect other platforms, so it is postponed for another release.
+
+Daniel S (18 Jan 2008)
+- Lau Hang Kin found and fixed a problem with the multi interface when doing
+ CONNECT over a proxy. curl_multi_fdset() didn't report back the socket
+ properly during that state, due to a missing case in the switch in the
+ multi_getsock() function.
+
+Yang Tse (17 Jan 2008)
+- Don't abort tests 518 and 537 when unable to raise the open-file soft limit.
+
+Daniel S (16 Jan 2008)
+- Nathan Coulter's patch that makes runtests.pl respect the PATH when figuring
+ out what valgrind to run.
+
+Yang Tse (16 Jan 2008)
+- Improved handling of out of memory in the command line tool that afected
+ data url encoded HTTP POSTs when reading it from a file.
+
+Daniel S (16 Jan 2008)
+- Dmitry Kurochkin worked a lot on improving the HTTP Pipelining support that
+ previously had a number of flaws, perhaps most notably when an application
+ fired up N transfers at once as then they wouldn't pipeline at all that
+ nicely as anyone would think... Test case 530 was also updated to take the
+ improved functionality into account.
+
+- Calls to Curl_failf() are not supposed to provide a trailing newline as the
+ function itself adds that. Fixed on 50 or something strings!
+
+Daniel S (15 Jan 2008)
+- I made the torture test on test 530 go through. This was actually due to
+ silly code left from when we switched to let the multi handle "hold" the dns
+ cache when using the multi interface... Of course this only triggered when a
+ certain function call returned error at the correct moment.
+
+Daniel S (14 Jan 2008)
+- Joe Malicki filed bug report #1871269
+ (http://curl.haxx.se/bug/view.cgi?id=1871269) and we could fix his hang-
+ problem that occurred when doing a large HTTP POST request with the
+ response-body read from a callback.
+
+Daniel S (12 Jan 2008)
+- I re-arranged the curl --help output. All the options are now sorted on
+ their long option names and all descriptions are one-liners.
+
+- Eric Landes provided the patch (edited by me) that introduces the
+ --keepalive-time to curl to set the keepalive probe interval. I also took
+ the opportunity to rename the recently added no-keep-alive option to
+ no-keepalive to keep a consistent naming and to avoid getting two dashes in
+ these option names. Eric also provided an update to the man page for the new
+ option.
+
+Daniel S (11 Jan 2008)
+- Daniel Egger made CURLOPT_RANGE work on file:// URLs the very same way it
+ already worked for FTP:// URLs.
+
+- I made the curl tool switch from using CURLOPT_IOCTLFUNCTION to now use the
+ spanking new CURLOPT_SEEKFUNCTION simply to take advantage of the improved
+ performance for the upload resume cases where you want to upload the last
+ few bytes of a very large file. To implement this decently, I had to switch
+ the client code for uploading from fopen()/fread() to plain open()/read() so
+ that we can use lseek() to do >32bit seeks (as fseek() doesn't allow that)
+ on systems that offer support for that.
+
+Daniel S (10 Jan 2008)
+- Michal Marek made curl-config --libs not include /usr/lib64 in the output
+ (it already before skipped /usr/lib). /usr/lib64 is the default library
+ directory on many 64bit systems and it's unlikely that anyone would use the
+ path privately on systems where it's not.
+
+- Georg Lippitsch brought CURLOPT_SEEKFUNCTION and CURLOPT_SEEKDATA to allow
+ libcurl to seek in a given input stream. This is particularly important when
+ doing upload resumes when there's already a huge part of the file present
+ remotely. Before, and still if this callback isn't used, libcurl will read
+ and through away the entire file up to the point to where the resuming
+ begins (which of course can be a slow opereration depending on file size,
+ I/O bandwidth and more). This new function will also be preferred to get
+ used instead of the CURLOPT_IOCTLFUNCTION for seeking back in a stream when
+ doing multi-stage HTTP auth with POST/PUT.
+
+- Nikitinskit Dmitriy filed bug report #1868255
+ (http://curl.haxx.se/bug/view.cgi?id=1868255) with a patch. It identifies
+ and fixes a problem with parsing WWW-Authenticate: headers with additional
+ spaces in the line that the parser wasn't written to deal with.
+
+Daniel S (8 Jan 2008)
+- Introducing curl_easy_pause() and new magic return codes for both the read
+ and the write callbacks that now can make a connection's reading and/or
+ writing get paused.
+
+Daniel S (6 Jan 2008)
+- Jeff Johnson filed bug report #1863171
+ (http://curl.haxx.se/bug/view.cgi?id=1863171) where he pointed out that
+ libcurl's date parser didn't accept a +1300 time zone which actually is used
+ fairly often (like New Zealand's Dailight Savings Time), so I modified the
+ parser to now accept up to and including -1400 to +1400.
+
+Daniel S (5 Jan 2008)
+- Based on further discussion on curl-library, I reverted yesterday's SOCKS5
+ code to instead introduce support for a new proxy type called
+ CURLPROXY_SOCKS5_HOSTNAME that is used to send the host name to the proxy
+ instead of IP address and there's thus no longer any need for a new
+ curl_easy_setopt() option.
+
+ The default SOCKS5 proxy is again back to sending the IP address to the
+ proxy. The new curl command line option for enabling sending host name to a
+ SOCKS5 proxy is now --socks5-hostname.
+
+Daniel S (4 Jan 2008)
+- Based on Maxim Perenesenko's patch, we now do SOCKS5 operations and let the
+ proxy do the host name resolving and only if --socks5ip (or
+ CURLOPT_SOCKS5_RESOLVE_LOCAL) is used we resolve the host name locally and
+ pass on the IP address only to the proxy.
+
+Yang Tse (3 Jan 2008)
+- Modified test harness to allow SCP, SFTP and SOCKS4 tests to run with
+ OpenSSH 2.9.9, SunSSH 1.0 or later versions. SOCKS5 tests need OpenSSH
+ 3.7, SunSSH 1.0 or later.
+
+Daniel S (2 Jan 2008)
+- I fixed two cases of missing return code checks when handling chunked
+ decoding where a write error (or abort return from a callback) didn't stop
+ libcurl's processing.
+
+- I removed the socklen_t use from the public curl/curl.h header and instead
+ made it an unsigned int. The type was only used in the curl_sockaddr struct
+ definition (only used by the curl_opensocket_callback). On all platforms I
+ could find information about, socklen_t is 32 unsigned bits large so I don't
+ think this will break the API or ABI. The main reason for this change is of
+ course for all the platforms that don't have a socklen_t definition in their
+ headers to build fine again. Providing our own configure magic and custom
+ definition of socklen_t on those systems proved to work but was a lot of
+ cruft, code and extra magic needed - when this very small change of type
+ seems harmless and still solves the missing socklen_t problem.
+
+- Richard Atterer brought a patch that added support for SOCKS4a proxies,
+ which is an inofficial PROXY4 variant that sends the hostname to the proxy
+ instead of the resolved address (which is already supported by SOCKS5).
+ --socks4a is the curl command line option for it and CURLOPT_PROXYTYPE can
+ now be set to CURLPROXY_SOCKS4A as well.
+
+Daniel S (1 Jan 2008)
+- Mohun Biswas pointed out that --libcurl generated a source code with an int
+ function but without a return statement. While fixing that, I also took care
+ about adding some better comments for the generated code.
+
+Daniel S (27 Dec 2007)
+- Dmitry Kurochkin mentioned a flaw
+ (http://curl.haxx.se/mail/lib-2007-12/0252.html) in detect_proxy() which
+ failed to set the bits.proxy variable properly when an environment variable
+ told libcurl to use a http proxy.
+
+Daniel S (26 Dec 2007)
+- In an attempt to repeat the problem in bug report #1850730
+ (http://curl.haxx.se/bug/view.cgi?id=1850730) I wrote up test case 552. The
+ test is doing a 70K POST with a read callback and an ioctl callback over a
+ proxy requiring Digest auth. The test case code is more or less identical to
+ the test recipe code provided by Spacen Jasset (who submitted the bug
+ report).
+
+Daniel S (25 Dec 2007)
+- Gary Maxwell filed bug report #1856628
+ (http://curl.haxx.se/bug/view.cgi?id=1856628) and provided a fix for the
+ (small) memory leak in the SSL session ID caching code. It happened when a
+ previous entry in the cache was re-used.
+
+Daniel Fandrich (19 Dec 2007)
+- Ensure that nroff doesn't put anything but ASCII characters into the
+ --manual text.
+
+Yang Tse (18 Dec 2007)
+- MSVC 9.0 (VS2008) does not support Windows build targets prior to WinXP,
+ and makes wrong asumptions of build target when it isn't specified. So,
+ if no build target has been defined we will target WinXP when building
+ curl/libcurl with MSVC 9.0 (VS2008).
+
+- (http://curl.haxx.se/mail/archive-2007-12/0039.html) reported and fixed
+ a file truncation problem on Windows build targets triggered when retrying
+ a download with curl.
+
+Daniel S (17 Dec 2007)
+- Mateusz Loskot pointed out that MSVC 9.0 (VS2008) has the pollfd struct and
+ defines in winsock2.h somehow differently than previous versions and that
+ curl 7.17.1 would fail to compile out of the box.
+
+Daniel S (13 Dec 2007)
+- David Wright filed bug report #1849764
+ (http://curl.haxx.se/bug/view.cgi?id=1849764) with an included fix. He
+ identified a problem for re-used connections that previously had sent
+ Expect: 100-continue and in some situations the subsequent POST (that didn't
+ use Expect:) still had the internal flag set for its use. David's fix (that
+ makes the setting of the flag in every single request unconditionally) is
+ fine and is now used!
+
+Daniel S (12 Dec 2007)
+- Gilles Blanc made the curl tool enable SO_KEEPALIVE for the connections and
+ added the --no-keep-alive option that can disable that on demand.
+
+Daniel S (9 Dec 2007)
+- Andrew Moise filed bug report #1847501
+ (http://curl.haxx.se/bug/view.cgi?id=1847501) and pointed out a memcpy()
+ that should be memmove() in the convert_lineends() function.
+
+Daniel S (8 Dec 2007)
+- Renamed all internal static functions that had Curl_ prefixes to no longer
+ have them. The Curl_ prefix is exclusively used for library internal global
+ symbols. Static functions can be named anything, except for using Curl_ or
+ curl_ prefixes. This is for consistency and for easier maintainance and
+ overview.
+
+- Cleaned up and reformatted the TODO document to look like the FAQ and
+ CONTRIBUTE, which makes nicer web pages
+
+- Added test cases 549 and 550 that test CURLOPT_PROXY_TRANSFER_MODE.
+
+- Added keywords on a bunch of test cases
+
+- Fixed an OOM problem in the curl code that would lead to fclose on a bad
+ handle and crash
+
+Daniel S (5 Dec 2007)
+- Spacen Jasset reported a problem with doing POST (with data read with a
+ callback) over a proxy when NTLM is used as auth with the proxy. The bug
+ also concerned Digest and was limited to using callback only. Spacen worked
+ with us to provide a useful patch. I added the test case 547 and 548 to
+ verify two variations of POST over proxy with NTLM.
+
+Daniel S (3 Dec 2007)
+- Ray Pekowski filed bug report #1842029
+ (http://curl.haxx.se/bug/view.cgi?id=1842029) in which he identified a
+ problem with SSL session caching that prevent it from working, and provided
+ the associated fix!
+
+- Now libcurl (built with OpenSSL) doesn't return error anymore if the remote
+ SSL-based server doesn't present a certificate when the request is told to
+ ignore certificate verification anyway.
+
+- Michal Marek introduced CURLOPT_PROXY_TRANSFER_MODE which is used to control
+ the appending of the "type=" thing on FTP URLs when they are passed to a
+ HTTP proxy. Some proxies just don't like that appending (which is done
+ unconditionally in 7.17.1), and some proxies treat binary/ascii transfers
+ better with the appending done!
+
+Daniel S (29 Nov 2007)
+- A bug report on the curl-library list showed a HTTP Digest session going on
+ with a 700+ letter nonce. Previously libcurl only support 127 letter ones
+ and now I bumped it to 1023.
+
+- Fixed the resumed FTP upload loop to not require that the read callback
+ returns a full buffer on each invoke.
+
+Daniel S (25 Nov 2007)
+- Added test case 1015 that tests --data-urlencode in multiple ways
+
+- Fixed --data-urlencode for when no @ or = are used
+
+- Extended the user-agent buffer curl uses, since we can hit the 128 byte
+ border with plenty development libraries used. Like my current set: "curl
+ 7.17.2-CVS (i686-pc-linux-gnu) libcurl/7.17.2-CVS OpenSSL/0.9.8g
+ zlib/1.2.3.3 c-ares/1.5.2-CVS libidn/1.1 libssh2/0.19.0-CVS"
+
+Daniel S (24 Nov 2007)
+- Internal rearrangements, so that the previous struct HandleData is no more.
+ It is now known as SingleRequest and the Curl_transfer_keeper struct within
+ that was remove entirely. This has the upside that there are less duplicate
+ struct members that made it hard to see and remember what struct that was
+ used to store what data. The transfer_keeper thing was once stored on a
+ per-connection basis and then it made sense to have the duplicate info but
+ since it was moved to the SessionHandle (in 7.16.0) it just added weirdness.
+ The SingleRequest struct is used by data that only is valid for this single
+ request.
+
+Yang Tse (22 Nov 2007)
+- Provide a socklen_t definition in curl.h for Win32 API build targets
+ which don't have one.
+
+Daniel S (22 Nov 2007)
+- Alessandro Vesely helped me improve the --data-urlencode's syntax, parser
+ and documentation.
+
+Daniel S (21 Nov 2007)
+- While inspecting the Negotiate code, I noticed how the proxy auth was using
+ the same state struct as the host auth, so both could never be used at the
+ same time! I fixed it (without being able to check) to use two separate
+ structs to allow authentication using Negotiate on host and proxy
+ simultaneously.
+
+Daniel S (20 Nov 2007)
+- Emil Romanus pointed out a bug that made an easy handle get the cookie
+ engine activated when set to use a share (even if the share doesn't share
+ cookies). I fixed it.
+
+- Fixed a very long-lasting mprintf() bug that occurred when we did "%.*s%s",
+ since the second %s would then wrongly used the numerical precision argument
+ instead and crash.
+
+- Introduced --data-urlencode to the curl tool for easier url encoding of the
+ data sent in a post.
+
+Daniel S (18 Nov 2007)
+- Rob Crittenden fixed SSL connections with NSS done with the multi-interface
+
+Daniel S (17 Nov 2007)
+- Michal Marek made the test suite remember what test servers that fail to
+ start so that subsequent tries are simply skipped.
+
+- Andres Garcia made the examples build fine on Windows (mingw + msys) when
+ the lib was built staticly.
+
+Daniel S (16 Nov 2007)
+- Ates Goral identified a problem in http.c:add_buffer_send() when a debug
+ callback was used, as it could wrongly pass on a bad size for the outgoing
+ HTTP header. The bad size would be a very large value as it was a wrapped
+ size_t content. This happened when the whole HTTP request failed to get sent
+ in one single send. http://curl.haxx.se/mail/lib-2007-11/0165.html
+
+Daniel S (15 Nov 2007)
+- Fixed yet another remaining problem with doing SFTP directory listings on a
+ re-used persistent connection. Mentioned by Immanuel Gregoire on the mailing
+ list.
+
+- Michal Marek fixed the test suite to better deal with the case when the HTTP
+ IPv6 server can't run.
+
+Yang Tse (14 Nov 2007)
+- Fix a variable potential wrapping in add_buffer() when using absolutely
+ huge send buffer sizes.
+
+Daniel S (13 Nov 2007)
+- Fixed a remaining problem with doing SFTP directory listings on a re-used
+ persistent connection. Mentioned by Immanuel Gregoire on the mailing list.
+
+Daniel S (12 Nov 2007)
+- Bug report #1830637 (http://curl.haxx.se/bug/view.cgi?id=1830637), which was
+ forwarded from the Gentoo bug tracker by Daniel Black and was originally
+ submitted by Robin Johnson, pointed out that libcurl would do bad memory
+ references when it failed and bailed out before the handler thing was
+ setup. My fix is not done like the provided patch does it, but instead I
+ make sure that there's never any chance for a NULL pointer in that struct
+ member.
+
+Yang Tse (10 Nov 2007)
+- Vikram Saxena (http://curl.haxx.se/mail/lib-2007-11/0096.html) pointed out
+ that the pollfd struct was being multi defined when using VS2008. This is
+ now fixed in /curl/lib/select.h
+
+Daniel S (8 Nov 2007)
+- Bug report #1823487 (http://curl.haxx.se/bug/view.cgi?id=1823487) pointed
+ out that SFTP requests didn't use persistent connections. Neither did SCP
+ ones. I gave the SSH code a good beating and now both SCP and SFTP should
+ use persistent connections fine. I also did a bunch of indent changes as
+ well as a bug fix for the "keyboard interactive" auth.
+
+Dan F (6 Nov 2007)
+- Improved telnet support by drastically reducing the number of write
+ callbacks needed to pass a buffer to the user. Instead one per byte it
+ is now as little as one per segment.
+
+Yang Tse (6 Nov 2007)
+- Bug report #1824894 (http://curl.haxx.se/bug/view.cgi?id=1824894) pointed
+ out a problem in curl.h when building C++ apps with MSVC. To fix it, the
+ inclusion of header files in curl.h is moved outside of the C++ extern "C"
+ linkage block.
+
+Daniel S (1 Nov 2007)
+- Toby Peterson patched a memory problem in the command line tool that
+ happened when a user had a home dir as an empty string. curl would then do
+ free() on a wrong area.
+
+Dan F (1 Nov 2007)
+- Fixed curl-config --features to not display libz when it wasn't used
+ due to a missing header file.
+
+Dan F (31 October 2007)
+- Fixed the output of curl-config --protocols which showed SCP and SFTP
+ always, except when --without-libssh2 was given
+
+- Added test cases 1013 and 1014 to check that curl-config --protocols and
+ curl-config --features matches the output of curl --version
+
+Dan F (30 October 2007)
+- Fixed an OOM problem with file: URLs
+
+- Moved Curl_file_connect into the protocol handler struct
+
+Dan F (29 October 2007)
+- Added test case 546 to check that subsequent FTP transfers work after a
+ failed one using the multi interface
+
+Daniel S (29 October 2007)
+- Based on one of those bug reports that are intercepted by a distro's bug
+ tracker (https://bugzilla.redhat.com/show_bug.cgi?id=316191), I now made
+ curl-config --features and --protocols show the correct output when built
+ with NSS.
+
+Version 7.17.1 (29 October 2007)
+
+Dan F (25 October 2007)
+- Added the --static-libs option to curl-config
+
+Daniel S (25 October 2007)
+- Made libcurl built with NSS possible to ignore the peer verification.
+ Previously it would fail if the ca bundle wasn't present, even if the code
+ ignored the verification results.
+
+Patrick M (25 October 2007)
+- Fixed test server to allow null bytes in binary posts.
+_ Added tests 35, 544 & 545 to check binary data posts, both static (in place)
+ and dynamic (copied).
+
+Daniel S (25 October 2007)
+- Michal Marek fixed the test script to be able to use valgrind even when the
+ lib is built shared with libtool.
+
+- Fixed a few memory leaks when the same easy handle is re-used to request
+ URLs with different protocols. FTP and TFTP related leaks. Caught thanks to
+ Dan F's new test cases.
+
+Dan F (24 October 2007)
+- Fixed the test FTP and TFTP servers to support the >10000 test number
+ notation
+
+- Added test cases 2000 through 2003 which test multiple protocols using the
+ same easy handle
+
+- Fixed the filecheck: make target to work outside the source tree
+
+Daniel S (24 October 2007)
+- Vladimir Lazarenko pointed out that we should do some 'mt' magic when
+ building with VC8 to get the "manifest" embedded to make fine stand-alone
+ binaries. The maketgz and the src/Makefile.vc6 files were adjusted
+ accordingly.
+
+Daniel S (23 October 2007)
+- Bug report #1812190 (http://curl.haxx.se/bug/view.cgi?id=1812190) points out
+ that libcurl tried to re-use connections a bit too much when using non-SSL
+ protocols tunneled over a HTTP proxy.
+
+Daniel S (22 October 2007)
+- Michal Marek forwarded the bug report
+ https://bugzilla.novell.com/show_bug.cgi?id=332917 about a HTTP redirect to
+ FTP that caused memory havoc. His work together with my efforts created two
+ fixes:
+
+ #1 - FTP::file was moved to struct ftp_conn, because is has to be dealt with
+ at connection cleanup, at which time the struct HandleData could be
+ used by another connection.
+ Also, the unused char *urlpath member is removed from struct FTP.
+
+ #2 - provide a Curl_reset_reqproto() function that frees
+ data->reqdata.proto.* on connection setup if needed (that is if the
+ SessionHandle was used by a different connection).
+
+ A long-term goal is of course to somehow get rid of how the reqdata struct
+ is used, as it is too error-prone.
+
+- Bug report #1815530 (http://curl.haxx.se/bug/view.cgi?id=1815530) points out
+ that specifying a proxy with a trailing slash didn't work (unless it also
+ contained a port number).
+
+Patrick M (15 October 2007)
+- Fixed the dynamic CURLOPT_POSTFIELDS problem: this option is now static again
+ and option CURLOPT_COPYPOSTFIELDS has been added to support dynamic mode.
+
+Patrick M (12 October 2007)
+- Added per-protocol callback static tables, replacing callback ptr storage
+ in the connectdata structure by a single handler table ptr.
+
+Dan F (11 October 2007)
+- Fixed the -l option of runtests.pl
+
+- Added support for skipping tests based on key words.
+
+Daniel S (9 October 2007)
+- Michal Marek removed the no longer existing return codes from the curl.1
+ man page.
+
+Daniel S (7 October 2007)
+- Known bug #47, which confused libcurl if doing NTLM auth over a proxy with
+ a response that was larger than 16KB is now improved slightly so that now
+ the restriction at 16KB is for the headers only and it should be a rare
+ situation where the response-headers exceed 16KB. Thus, I consider #47 fixed
+ and the header limitation is now known as known bug #48.
+
+Daniel S (5 October 2007)
+- Michael Wallner made the CULROPT_COOKIELIST option support a new magic
+ string: "FLUSH". Using that will cause libcurl to flush its cookies to the
+ CURLOPT_COOKIEJAR file.
+
+- The new file docs/libcurl/ABI describes how we view ABI breakages, soname
+ bumps and what the version number's significance to all that is.
+
+Daniel S (4 October 2007)
+- I enabled test 1009 and made the --local-port use a wide range to reduce the
+ risk of failures.
+
+- Kim Rinnewitz reported that --local-port didn't work with TFTP transfers.
+ This happened because the tftp code always uncondionally did a bind()
+ without caring if one already had been done and then it failed. I wrote a
+ test case (1009) to verify this, but it is a bit error-prone since it will
+ have to pick a fixed local port number and since the tests are run on so
+ many different hosts in different situations I'll add it in disabled state.
+
+Yang Tse (3 October 2007)
+- Fixed issue related with the use of ares_timeout() result.
+
+Daniel S (3 October 2007)
+- Alexey Pesternikov introduced CURLOPT_OPENSOCKETFUNCTION and
+ CURLOPT_OPENSOCKETDATA to set a callback that allows an application to
+ replace the socket() call used by libcurl. It basically allows the app to
+ change address, protocol or whatever of the socket.
+
+- I renamed the CURLE_SSL_PEER_CERTIFICATE error code to
+ CURLE_PEER_FAILED_VERIFICATION (standard CURL_NO_OLDIES style), and made
+ this return code get used by the previous SSH MD5 fingerprint check in case
+ it fails.
+
+- Based on a patch brought by Johnny Luong, libcurl now offers
+ CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 and the curl tool --hostpubmd5. They both
+ make the SCP or SFTP connection verify the remote host's md5 checksum of the
+ public key before doing a connect, to reduce the risk of a man-in-the-middle
+ attack.
+
+Daniel S (2 October 2007)
+- libcurl now handles chunked-encoded CONNECT responses
+
+Daniel S (1 October 2007)
+- Alex Fishman reported a curl_easy_escape() problem that was made the
+ function do wrong on all input bytes that are >= 0x80 (decimal 128) due to a
+ signed / unsigned mistake in the code. I fixed it and added test case 543 to
+ verify.
+
+Daniel S (29 September 2007)
+- Immanuel Gregoire fixed a problem with persistent transfers over SFTP.
+
+Daniel S (28 September 2007)
+- Adapted the c-ares code to the API change c-ares 1.5.0 brings in the
+ notifier callback(s).
+
+Dan F (26 September 2007)
+- Enabled a few more gcc warnings with --enable-debug. Renamed a few
+ variables to avoid shadowing global declarations.
+
+Daniel S (26 September 2007)
+- Philip Langdale provided the new CURLOPT_POST301 option for
+ curl_easy_setopt() that alters how libcurl functions when following
+ redirects. It makes libcurl obey the RFC2616 when a 301 response is received
+ after a non-GET request is made. Default libcurl behaviour is to change
+ method to GET in the subsequent request (like it does for response code 302
+ - because that's what many/most browsers do), but with this CURLOPT_POST301
+ option enabled it will do what the spec says and do the next request using
+ the same method again. I.e keep POST after 301.
+
+ The curl tool got this option as --post301
+
+ Test case 1011 and 1012 were added to verify.
+
+- Max Katsev reported that when doing a libcurl FTP request with
+ CURLOPT_NOBODY enabled but not CURLOPT_HEADER, libcurl wouldn't do TYPE
+ before it does SIZE which makes it less useful. I walked over the code and
+ made it do this properly, and added test case 542 to verify it.
+
+Daniel S (24 September 2007)
+- Immanuel Gregoire fixed KNOWN_BUGS #44: --ftp-method nocwd did not handle
+ URLs ending with a slash properly (it should list the contents of that
+ directory). Test case 351 brought back and also test 1010 was added.
+
+Daniel S (21 September 2007)
+- Mark Davies fixed Negotiate authentication over proxy, and also introduced
+ the --proxy-negotiate command line option to allow a user to explicitly
+ select it.
+
+Daniel S (19 September 2007)
+- Rob Crittenden provided an NSS update with the following highlights:
+
+ o It looks for the NSS database first in the environment variable SSL_DIR,
+ then in /etc/pki/nssdb, then it initializes with no database if neither of
+ those exist.
+
+ o If the NSS PKCS#11 libnspsem.so driver is available then PEM files may be
+ loaded, including the ca-bundle. If it is not available then only
+ certificates already in the NSS database are used.
+
+ o Tries to detect whether a file or nickname is being passed in so the right
+ thing is done
+
+ o Added a bit of code to make the output more like the OpenSSL module,
+ including displaying the certificate information when connecting in
+ verbose mode
+
+ o Improved handling of certificate errors (expired, untrusted, etc)
+
+ The libnsspem.so PKCS#11 module is currently only available in Fedora
+ 8/rawhide. Work will be done soon to upstream it. The NSS module will work
+ with or without it, all that changes is the source of the certificates and
+ keys.
+
+Daniel S (18 September 2007)
+- Immanuel Gregoire pointed out that public key SSH auth failed if no
+ public/private key was specified and there was no HOME environment variable,
+ and then it didn't continue to try the other auth methods. Now it will
+ instead try to get the files id_dsa.pub and id_dsa from the current
+ directory if none of the two conditions were met.
+
+Dan F (17 September 2007)
+- Added hooks to the test suite to make it possible to test a curl running
+ on a remote host.
+
+- Changed some FTP tests to validate the format of the PORT and EPRT commands
+ sent by curl, if not the addresses themselves.
+
+Daniel S (15 September 2007)
+- Michal Marek made libcurl automatically append ";type=<a|i>" when using HTTP
+ proxies for FTP urls.
+
+- Günter Knauf fixed LDAP builds in the Windows makefiles and fixed LDAPv3
+ support on Windows.
+
+Dan F (13 September 2007)
+- Added LDAPS, SCP and SFTP to curl-config --protocols. Removed and
+ fixed some AC_SUBST configure entries.
+
+Version 7.17.0 (13 September 2007)
+
+Daniel S (12 September 2007)
+- Bug report #1792649 (http://curl.haxx.se/bug/view.cgi?id=1792649) pointed
+ out a problem with doing an empty upload over FTP on a re-used connection.
+ I added test case 541 to reproduce it and to verify the fix.
+
+- I noticed while writing test 541 that the FTP code wrongly did a CWD on the
+ second transfer as it didn't store and remember the "" path from the
+ previous transfer so it would instead CWD to the entry path as stored. This
+ worked, but did a superfluous command. Thus, test case 541 now also verifies
+ this fix.
+
+Dan F (5 September 2007)
+- Added test case 1007 to test permission problem when uploading with TFTP
+ (to validate bug #1790403).
+
+- TFTP now reports the "not defined" TFTP error code 0 as an error,
+ not success.
+
+Daniel S (5 September 2007)
+- Continued the work on a fix for #1779054
+ (http://curl.haxx.se/bug/view.cgi?id=1779054). My previous fix from August
+ 24 was not complete (either) but could accidentally "forget" parts of a
+ server response which led to faulty server response time-out errors.
+
+Dan F (5 September 2007)
+- Minix doesn't support getsockopt on UDP sockets or send/recv on TCP
+ sockets.
+
+Dan F (31 August 2007)
+- Made some of the error strings returned by the *strerror functions more
+ generic, and more consistent with each other.
+
+- Renamed the curl_ftpssl enum to curl_usessl and its enumerated constants,
+ creating macros for backward compatibility:
+
+ CURLFTPSSL_NONE => CURLUSESSL_NONE
+ CURLFTPSSL_TRY => CURLUSESSL_TRY
+ CURLFTPSSL_CONTROL => CURLUSESSL_CONTROL
+ CURLFTPSSL_ALL => CURLUSESSL_ALL
+ CURLFTPSSL_LAST => CURLUSESSL_LAST
+
+Dan F (30 August 2007)
+- Renamed several libcurl error codes and options to make them more general
+ and allow reuse by multiple protocols. Several unused error codes were
+ removed. In all cases, macros were added to preserve source (and binary)
+ compatibility with the old names. These macros are subject to removal at
+ a future date, but probably not before 2009. An application can be
+ tested to see if it is using any obsolete code by compiling it with the
+ CURL_NO_OLDIES macro defined.
+
+ The following unused error codes were removed:
+
+ CURLE_BAD_CALLING_ORDER
+ CURLE_BAD_PASSWORD_ENTERED
+ CURLE_FTP_CANT_RECONNECT
+ CURLE_FTP_COULDNT_GET_SIZE
+ CURLE_FTP_COULDNT_SET_ASCII
+ CURLE_FTP_USER_PASSWORD_INCORRECT
+ CURLE_FTP_WEIRD_USER_REPLY
+ CURLE_FTP_WRITE_ERROR
+ CURLE_LIBRARY_NOT_FOUND
+ CURLE_MALFORMAT_USER
+ CURLE_OBSOLETE
+ CURLE_SHARE_IN_USE
+ CURLE_URL_MALFORMAT_USER
+
+ The following error codes were renamed:
+
+ CURLE_FTP_ACCESS_DENIED => CURLE_REMOTE_ACCESS_DENIED
+ CURLE_FTP_COULDNT_SET_BINARY => CURLE_FTP_COULDNT_SET_TYPE
+ CURLE_FTP_SSL_FAILED => CURLE_USE_SSL_FAILED
+ CURLE_FTP_QUOTE_ERROR => CURLE_QUOTE_ERROR
+ CURLE_TFTP_DISKFULL => CURLE_REMOTE_DISK_FULL
+ CURLE_TFTP_EXISTS => CURLE_REMOTE_FILE_EXISTS
+ CURLE_HTTP_RANGE_ERROR => CURLE_RANGE_ERROR
+
+ The following options were renamed:
+
+ CURLOPT_SSLKEYPASSWD => CURLOPT_KEYPASSWD
+ CURLOPT_FTPAPPEND => CURLOPT_APPEND
+ CURLOPT_FTPLISTONLY => CURLOPT_DIRLISTONLY
+ CURLOPT_FTP_SSL => CURLOPT_USE_SSL
+
+ A few more changes will take place with the next SONAME bump of the
+ library. These are documented in docs/TODO
+
+- Documented some newer error codes in libcurl-error(3)
+
+- Added more accurate error code returns from SFTP operations. Added test
+ case 615 to test an SFTP upload failure.
+
+Dan F (28 August 2007)
+- Some minor internal type and const changes based on a splint scan.
+
+Daniel S (24 August 2007)
+- Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointed
+ out that libcurl didn't deal with large responses from server commands, when
+ the single response was consisting of multiple lines but of a total size of
+ 16KB or more. Dan Fandrich improved the ftp test script and provided test
+ case 1006 to repeat the problem, and I fixed the code to make sure this new
+ test case runs fine.
+
+Patrick M (23 August 2007)
+- OS/400 port: new files lib/config-os400.h lib/setup-os400.h packages/OS400/*.
+ See packages/OS400/README.OS400.
+
+Daniel S (23 August 2007)
+- Bug report #1779751 (http://curl.haxx.se/bug/view.cgi?id=1779751) pointed
+ out that doing first a file:// upload and then an FTP upload crashed libcurl
+ or at best caused furious valgrind complaints. Fixed now!
+
+Daniel S (22 August 2007)
+- Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointed
+ out that libcurl didn't deal with very long (>16K) FTP server response lines
+ properly. Starting now, libcurl will chop them off (thus the client app will
+ not get the full line) but survive and deal with them fine otherwise. Test
+ case 1003 was added to verify this.
+
+Daniel S (20 August 2007)
+- Based on a patch by Christian Vogt, the FTP code now sets the upcoming
+ download transfer size much earlier to be possible to get read with
+ CURLINFO_CONTENT_LENGTH_DOWNLOAD as soon as possible. This is very much in a
+ similar spirit to the HTTP size change from August 11 2007.
+
+Daniel S (18 August 2007)
+- Robson Braga Araujo filed bug report #1776232
+ (http://curl.haxx.se/bug/view.cgi?id=1776232) about libcurl calling
+ Curl_client_write(), passing on a const string that the caller may not
+ modify and yet it does (on some platforms).
+
+- Robson Braga Araujo filed bug report #1776235
+ (http://curl.haxx.se/bug/view.cgi?id=1776235) about ftp requests with NOBODY
+ on a directory would do a "SIZE (null)" request. This is now fixed and test
+ case 1000 was added to verify.
+
+Daniel S (17 August 2007)
+- Song Ma provided a patch that cures a problem libcurl has when doing resume
+ HTTP PUT using Digest authentication. Test case 5320 and 5322 were also
+ added to verify the functionality.
+
+Daniel S (14 August 2007)
+- Andrew Wansink provided an NTLM bugfix: in the case the server sets the flag
+ NTLMFLAG_NEGOTIATE_UNICODE, we need to filter it off because libcurl doesn't
+ UNICODE encode the strings it packs into the NTLM authenticate packet.
+
+Daniel S (11 August 2007)
+- Allen Pulsifer provided a patch that makes libcurl set the expected download
+ size earlier when doing HTTP downloads, so that applications and the
+ progress meter etc know get the info earlier in the flow than before.
+
+- Patrick Monnerat modified the LDAP code and approach in curl. Starting now,
+ the configure script checks for openldap and friends and we link with those
+ libs just like we link all other third party libraries, and we no longer
+ dlopen() those libraries. Our private header file lib/ldap.h was renamed to
+ lib/curl_ldap.h due to this. I set a tag in CVS (curl-7_17_0-preldapfix)
+ just before this commit, just in case.
+
+Dan F (8 August 2007)
+- Song Ma noted a zlib memory leak in the illegal compressed header
+ countermeasures code path.
+
+Daniel S (4 August 2007)
+- Patrick Monnerat fixed curl_easy_escape() and curlx_strtoll() to work on
+ non-ASCII systems.
+
+Daniel S (3 August 2007)
+- I cut out support for libssh2 versions older than 0.16 to make our code a
+ lot simpler, and to avoid getting trouble with the LIBSSH2_APINO define
+ that 1) didn't work properly since it was >32 bits and 2) is removed in
+ libssh2 0.16...
+
+Daniel S (2 August 2007)
+- Scott Cantor filed bug report #1766320
+ (http://curl.haxx.se/bug/view.cgi?id=1766320) pointing out that the libcurl
+ code accessed two curl_easy_setopt() options (CURLOPT_DNS_CACHE_TIMEOUT and
+ CURLOPT_DNS_USE_GLOBAL_CACHE) as ints even though they're documented to be
+ passed in as longs, and that makes a difference on 64 bit architectures.
+
+- Dmitriy Sergeyev reported a regression: resumed file:// transfers broke
+ after 7.16.2. This is much due to the different treatment file:// gets
+ internally, but now I added test 231 to make it less likely to happen again
+ without us noticing!
+
+Daniel S (1 August 2007)
+- Patrick Monnerat and I modified libcurl so that now it *copies* all strings
+ passed to it with curl_easy_setopt()! Previously it has always just refered
+ to the data, forcing the user to keep the data around until libcurl is done
+ with it. That is now history and libcurl will instead clone the given
+ strings and keep private copies. This is also part of Patrick Monnerat's
+ OS/400 port.
+
+ Due to this being a somewhat interesting change API wise, I've decided to
+ bump the version of the upcoming release to 7.17.0. Older applications will
+ of course not notice this change nor do they have to care, but new
+ applications can be written to take advantage of this.
+
+- Greg Morse reported a problem with POSTing using ANYAUTH to a server
+ requiring NTLM, and he provided test code and a test server and we worked
+ out a bug fix. We failed to count sent body data at times, which then caused
+ internal confusions when libcurl tried to send the rest of the data in order
+ to maintain the same connection alive.
+
+Daniel S (31 July 2007)
+- Peter O'Gorman pointed out (and fixed) that the non-blocking check in
+ configure made libcurl use blocking sockets on AIX 4 and 5, while that
+ wasn't the intention.
+
+Daniel S (29 July 2007)
+- Jayesh A Shah filed bug report #1759542
+ (http://curl.haxx.se/bug/view.cgi?id=1759542) identifying a rather serious
+ problem with FTPS: libcurl closed the data connection socket and then later
+ in the flow it would call the SSL layer to do SSL shutdown which then would
+ use a socket that had already been closed - so if the application had opened
+ a new one in the mean time, libcurl could send gibberish that way! I worked
+ with Greg Zavertnik to properly diagnose and fix this. The fix affects code
+ for all SSL libraries we support, but it has only been truly verified to
+ work fine for the OpenSSL version. The others have only been code reviewed.
+
+Daniel S (23 July 2007)
+- Implemented the parts of Patrick Monnerat's OS/400 patch that introduces
+ support for the OS/400 Secure Sockets Layer library.
+
+Dan F (23 July 2007)
+- Implemented only the parts of Patrick Monnerat's OS/400 patch that renamed
+ some few internal identifiers to avoid conflicts, which could be useful on
+ other platforms.
+
+Daniel S (22 July 2007)
+- HTTP Digest bug fix by Chris Flerackers:
+
+ Scenario
+
+ - Perfoming a POST request with body
+ - With authentication (only Digest)
+ - Re-using a connection
+
+ libcurl would send a HTTP POST with an Authorization header but without
+ body. Our server would return 400 Bad Request in that case (because
+ authentication passed, but the body was empty).
+
+ Cause
+
+ 1) http_digest.c -> Curl_output_digest
+ - Updates allocptr.userpwd/allocptr.proxyuserpwd *only* if d->nonce is
+ filled in (and no errors)
+ - authp->done = TRUE if d->nonce is filled in
+ 2) http.c -> Curl_http
+ - *Always* uses allocptr.userpwd/allocptr.proxyuserpwd if not NULL
+ 3) http.c -> Curl_http, Curl_http_output_auth
+
+ So what happens is that Curl_output_digest cannot yet update the
+ Authorization header (allocptr.userpwd) which results in authhost->done=0 ->
+ authhost->multi=1 -> conn->bits.authneg = TRUE. The body is not
+ added. *However*, allocptr.userpwd is still used when building the request
+
+- Added test case 354 that makes a simple FTP retrieval without password, which
+ verifies the bug fix in #1757328.
+
+Daniel S (21 July 2007)
+- To allow more flexibility in FTP test cases, I've removed the enforced states
+ from the test server code as they served no real purpose. The test server
+ is here to serve for the test cases, not to attempt to function as a real
+ server! While at it, I modified test case 141 to better test and verify
+ curl -I on a single FTP file.
+
+Daniel S (20 July 2007)
+- James Housley fixed the SFTP PWD command to work.
+
+- Ralf S. Engelschall filed bug report #1757328
+ (http://curl.haxx.se/bug/view.cgi?id=1757328) and submitted a patch. It
+ turns out we broke login to FTP servers that don't require (nor understand)
+ PASS after the USER command. The breakage was done as part of the krb5
+ commit so a krb-using person needs to verify that the current version now
+ works or if we need to fix it (in a different way of course).
+
+Dan F (17 July 2007)
+- Fixed test cases 613 and 614 by improving the log postprocessor to handle
+ a new directory listing format that newer libssh2's can provide. This
+ is probably NOT sufficient to handle all directory listing formats that
+ server's can provide, and should be revisited.
+
+Daniel S (17 July 2007)
+- Daniel Johnson fixed a bug in how libssh2_session_last_error() was used, in
+ two places.
+
+- Jofell Gallardo posted a libcurl log using FTP that exposed a bug which made
+ a control connection that was deemed "dead" to yet be re-used in a following
+ request.
+
+Daniel S (13 July 2007)
+- Colin Hogben filed bug report #1750274
+ (http://curl.haxx.se/bug/view.cgi?id=1750274) and submitted a patch for the
+ case where libcurl did a connect attempt to a non-listening port and didn't
+ provide a human readable error string back.
+
+- Daniel Cater fixes:
+ 1 - made 'make vc8' work on windows.
+ 2 - made libcurl itself built with CURL_NO_OLDIES defined (which doesn't
+ define the symbols for backwards source compatibility)
+ 3 - updated libcurl-errors.3
+ 4 - added CURL_DISABLE_TFTP to docs/INSTALL
+
+Daniel S (12 July 2007)
+- Made the krb5 code build with Heimdal's GSSAPI lib.
+
+Dan F (12 July 2007)
+- Compile most of the example apps in docs/examples when doing a 'make check'.
+ Fixed some compile warnings and errors in those examples.
+
+- Removed the example program ftp3rdparty.c since libcurl doesn't support
+ 3rd party FTP transfers any longer.
+
+Daniel S (12 July 2007)
+- Shmulik Regev found an (albeit rare) case where the proxy CONNECT operation
+ could in fact get stuck in an endless loop.
+
+- Made CURLOPT_SSL_VERIFYHOST set to 1 acts as described in the documentation:
+ fail to connect if there is no Common Name field found in the remote cert.
+ We should deprecate the support for this set to 1 anyway soon, since the
+ feature is pointless and most likely never really used by anyone.
+
+Daniel S (11 July 2007)
+- Shmulik Regev fixed a bug with transfer-encoding skipping during the 407
+ error pages for proxy authentication.
+
+- Giancarlo Formicuccia reported and fixed a problem with a closed connection
+ to a proxy during CONNECT auth negotiation.
+
+Dan F (10 July 2007)
+- Fixed a curl memory leak reported by Song Ma with a modified version
+ of the patch he suggested. Added his test case as test289 to verify.
+
+- Force the time zone to GMT in the cookie tests in case the user is
+ using one of the so-called 'right' time zones that take into account
+ leap seconds, which causes the tests to fail (as reported by
+ Daniel Black in bug report #1745964).
+
+Version 7.16.4 (10 July 2007)
+
+Daniel S (10 July 2007)
+- Kees Cook notified us about a security flaw
+ (http://curl.haxx.se/docs/adv_20070710.html) in which libcurl failed to
+ properly reject some outdated or not yet valid server certificates when
+ built with GnuTLS. Kees also provided the patch.
+
+James H (5 July 2007)
+- Gavrie Philipson provided a patch that will use a more specific error
+ message for an scp:// upload failure. If libssh2 has his matching
+ patch, then the error message return by the server will be used instead
+ of a more generic error.
+
+Daniel S (1 July 2007)
+- Thomas J. Moore provided a patch that introduces Kerberos5 support in
+ libcurl. This also makes the options change name to --krb (from --krb4) and
+ CURLOPT_KRBLEVEL (from CURLOPT_KRB4LEVEL) but the old names are still
+
+- Song Ma helped me verify and extend a fix for doing FTP over a SOCKS4/5
+ proxy.
+
+Daniel S (27 June 2007)
+- James Housley: Add two new options for the SFTP/SCP/FILE protocols:
+ CURLOPT_NEW_FILE_PERMS and CURLOPT_NEW_DIRECTORY_PERMS. These control the
+ premissions for files and directories created on the remote
+ server. CURLOPT_NEW_FILE_PERMS defaults to 0644 and
+ CURLOPT_NEW_DIRECTORY_PERMS defaults to 0755
+
+- I corrected the 10-at-a-time.c example and applied a patch for it by James
+ Bursa.
+
+Daniel S (26 June 2007)
+- Robert Iakobashvili re-arranged the internal hash code to work with a custom
+ hash function for different hashes, and also expanded the default size for
+ the socket hash table used in multi handles to greatly enhance speed when
+ very many connections are added and the socket API is used.
+
+- James Housley made the CURLOPT_FTPLISTONLY mode work for SFTP directory
+ listings as well
+
+Daniel S (25 June 2007)
+- Adjusted how libcurl treats HTTP 1.1 responses without content-lenth or
+ chunked encoding (that also lacks "Connection: close"). It now simply
+ assumes that the connection WILL be closed to signal the end, as that is how
+ RFC2616 section 4.4 point #5 says we should behave.
+
+Version 7.16.3 (25 June 2007)
+
+Daniel S (23 June 2007)
+- As reported by "Tro" in http://curl.haxx.se/mail/lib-2007-06/0161.html and
+ http://curl.haxx.se/mail/lib-2007-06/0238.html, libcurl didn't properly do
+ no-body requests on FTP files on re-used connections properly, or at least
+ it didn't provide the info back in the header callback properly in the
+ subsequent requests.
+
+Daniel S (21 June 2007)
+- Gerrit Bruchhäuser pointed out a warning that the Intel(R) Thread Checker
+ tool reports and it was indeed a legitimate one and it is one fixed. It was
+ a use of a share without doing the proper locking first.
+
+Daniel S (20 June 2007)
+- Adam Piggott filed bug report #1740263
+ (http://curl.haxx.se/bug/view.cgi?id=1740263). Adam discovered that when
+ getting a large amount of URLs with curl, they were fetched slower and
+ slower... which turned out to be because the --libcurl data collecting which
+ wrongly always was enabled, but no longer is...
+
+Daniel S (18 June 2007)
+- Robson Braga Araujo filed bug report #1739100
+ (http://curl.haxx.se/bug/view.cgi?id=1739100) that mentioned that libcurl
+ could not actually list the contents of the root directory of a given FTP
+ server if the login directory isn't root. I fixed the problem and added
+ three test cases (one is disabled for now since I identified KNOWN_BUGS #44,
+ we cannot use --ftp-method nocwd and list ftp directories).
+
+Daniel S (14 June 2007)
+- Shmulik Regev:
+
+ I've encountered (and hopefully fixed) a problem involving proxy CONNECT
+ requests and easy handles state management. The problem isn't simple to
+ reproduce since it depends on socket state. It only manifests itself when
+ working with non-blocking sockets.
+
+ Here is the scenario:
+
+ 1. in multi_runsingle the easy handle is in the CURLM_STATE_WAITCONNECT and
+ calls Curl_protocol_connect
+
+ 2. in Curl_proxyCONNECT, line 1247, if the socket isn't ready the function
+ returns and conn->bits.tunnel_connecting is TRUE
+
+ 3. when the call to Curl_protocol_connect returns the protocol_connect flag
+ is false and the easy state is changed to CURLM_STATE_PROTOCONNECT which
+ isn't correct if a proxy is used. Rather CURLM_STATE_WAITPROXYCONNECT
+ should be used.
+
+ I discovered this while performing an HTTPS request through a proxy (squid)
+ on my local network. The problem caused openssl to fail as it read the proxy
+ response to the CONNECT call ('HTTP/1.0 Established') rather than the SSL
+ handshake (the exact openssl error was 'wrong ssl version' but this isn't
+ very important)
+
+- Dave Vasilevsky filed bug report #1736875
+ (http://curl.haxx.se/bug/view.cgi?id=1736875) almost simultanouesly as Dan
+ Fandrich mentioned a related build problem on the libcurl mailing list:
+ http://curl.haxx.se/mail/lib-2007-06/0131.html. Both problems had the same
+ reason: the definitions of the POLL* defines and the pollfd struct in the
+ libcurl code was depending on HAVE_POLL instead of HAVE_SYS_POLL_H.
+
+Daniel S (13 June 2007)
+- Tom Regner provided a patch and worked together with James Housley, so now
+ CURLOPT_FTP_CREATE_MISSING_DIRS works for SFTP connections as well as FTP
+ ones.
+
+- Rich Rauenzahn filed bug report #1733119
+ (http://curl.haxx.se/bug/view.cgi?id=1733119) and we collaborated on the
+ fix. The problem is that for 64bit HPUX builds, several socket-related
+ functions would still assume int (32 bit) arguments and not socklen_t (64
+ bit) ones.
+
+Daniel S (12 June 2007)
+- James Housley brought his revamped SSH code that is state-machine driven to
+ really take advantage of the now totally non-blocking libssh2 (in CVS).
+
+Dan F (8 June 2007)
+- Incorporated Daniel Black's test706 and test707 SOCKS test cases.
+
+- Fixed a few problems when starting the SOCKS server.
+
+- Reverted some recent changes to runtests.pl that weren't compatible with
+ perl 5.0.
+
+- Fixed the test harness so that it actually kills the ssh being used as
+ the SOCKS server.
+
+Daniel S (6 June 2007)
+- -s/--silent can now be used to toggle off the silence again if used a second
+ time.
+
+Daniel S (5 June 2007)
+- Added Daniel Black's work that adds the first few SOCKS test cases. I also
+ fixed two minor SOCKS problems to make the test cases run fine.
+
+Daniel S (31 May 2007)
+- Feng Tu made (lib)curl support "upload" resuming work for file:// URLs.
+
+Daniel S (30 May 2007)
+- I modified the 10-at-a-time.c example to transfer 500 downloads in parallel
+ with a c-ares enabled build only to find that it crashed miserably, and this
+ was due to some select()isms left in the code. This was due to API
+ restrictions in c-ares 1.3.x, but with the upcoming c-ares 1.4.0 this is no
+ longer the case so now libcurl runs much better with c-ares and the multi
+ interface with > 1024 file descriptors in use.
+
+ Extra note: starting now we require c-ares 1.4.0 for asynchronous name
+ resolves.
+
+- Added CURLMOPT_MAXCONNECTS which is a curl_multi_setopt() option for setting
+ the maximum size of the connection cache maximum size of the multi handle.
+
+Daniel S (27 May 2007)
+- When working with a problem Stefan Becker had, I found an off-by-one buffer
+ overwrite in Curl_select(). While fixing it, I also improved its performance
+ somewhat by changing calloc to malloc and breaking out of a loop earlier
+ (when possible).
+
+Daniel S (25 May 2007)
+- Rob Crittenden fixed bug #1705802
+ (http://curl.haxx.se/bug/view.cgi?id=1705802), which was filed by Daniel
+ Black identifying several FTP-SSL test cases fail when we build libcurl with
+ NSS for TLS/SSL. Listed as #42 in KNOWN_BUGS.
+
+Daniel S (24 May 2007)
+- Song Ma filed bug report #1724016
+ (http://curl.haxx.se/bug/view.cgi?id=1724016) noticing that downloading
+ glob-ranges for TFTP was broken in CVS. Fixed now.
+
+- 'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194)
+ pointed out that the warnf() function in the curl tool didn't properly deal
+ with the cases when excessively long words were used in the string to chop
+ up.
+
+Daniel S (22 May 2007)
+- Andre Guibert de Bruet fixed a memory leak in the function that verifies the
+ peer's name in the SSL certificate when built for OpenSSL. The leak happens
+ for libcurls with CURL_DOES_CONVERSIONS enabled that fail to convert the CN
+ name from UTF8. He also fixed a leak when PKCS #12 parsing failed.
+
+Daniel S (18 May 2007)
+- Feng Tu reported that curl -w did wrong on TFTP transfers in bug report
+ #1715394 (http://curl.haxx.se/bug/view.cgi?id=1715394), and the
+ transfer-related info "variables" were indeed overwritten with zeroes
+ wrongly and have now been adjusted. The upload size still isn't accurate.
+
+Daniel S (17 May 2007)
+- Feng Tu pointed out a division by zero error in the TFTP connect timeout
+ code for timeouts less than five seconds, and also provided a fix for it.
+ Bug report #1715392 (http://curl.haxx.se/bug/view.cgi?id=1715392)
+
+Dan F (16 May 2007)
+- Added support for compiling under Minix 3.1.3 using ACK.
+
+Dan F (14 May 2007)
+- Added SFTP directory listing test case 613.
+
+- Added support for quote commands before a transfer using SFTP and test
+ case 614.
+
+- Changed the post-quote commands to occur after the transferred file is
+ closed.
+
+- Allow SFTP quote commands chmod, chown, chgrp to set a value of 0.
+
+Dan F (9 May 2007)
+- Kristian Gunstone fixed a problem where overwriting an uploaded file with
+ sftp didn't truncate it first, which would corrupt the file if the new
+ file was shorter than the old.
+
+Dan F (8 May 2007)
+- Added FTPS test cases 406 and 407
+
+Daniel S (8 May 2007)
+- CURLE_FTP_COULDNT_STOR_FILE is now known as CURLE_UPLOAD_FAILED. This is
+ because I just made SCP uploads return this value if the file size of
+ the upload file isn't given with CURLOPT_INFILESIZE*. Docs updated to
+ reflect this news, and a define for the old name was added to the public
+ header file.
+
+Daniel S (7 May 2007)
+- James Bursa fixed a bug in the multi handle code that made the connection
+ cache grow a bit too much, beyond the normal 4 * easy_handles.
+
+Daniel S (2 May 2007)
+- Anders Gustafsson remarked that requiring CURLOPT_HTTP_VERSION set to 1.0
+ when CURLOPT_HTTP200ALIASES is used to avoid the problem mentioned below is
+ not very nice if the client wants to be able to use _either_ a HTTP 1.1
+ server or one within the aliases list... so starting now, libcurl will
+ simply consider 200-alias matches the to be HTTP 1.0 compliant.
+
+- Tobias Rundström reported a problem they experienced with xmms2 and recent
+ libcurls, which turned out to be the 25-nov-2006 change which treats HTTP
+ responses without Content-Length or chunked encoding as without bodies. We
+ now added the conditional that the above mentioned response is only without
+ body if the response is HTTP 1.1.
+
+- Jeff Pohlmeyer improved the hiperfifo.c example to use the
+ CURLMOPT_TIMERFUNCTION callback option.
+
+- Set the timeout for easy handles to expire really soon after addition or
+ when CURLM_CALL_MULTI_PERFORM is returned from curl_multi_socket*/perform,
+ to make applications using only curl_multi_socket() to properly function
+ when adding easy handles "on the fly". Bug report and test app provided by
+ Michael Wallner.
+
+Dan F (30 April 2007)
+- Improved the test harness to allow running test servers on other than
+ the default port numbers, allowing more than one test suite to run
+ simultaneously on the same host.
+
+Daniel S (28 April 2007)
+- Peter O'Gorman fixed libcurl to not init GnuTLS as early as we did before,
+ since it then inits libgcrypt and libgcrypt is being evil and EXITS the
+ application if it fails to get a fine random seed. That's really not a nice
+ thing to do by a library.
+
+- Frank Hempel fixed a curl_easy_duphandle() crash on a handle that had
+ been removed from a multi handle, and then fixed another flaw that prevented
+ curl_easy_duphandle() to work even after the first fix - the handle was
+ still marked as using the multi interface.
+
+Daniel S (26 April 2007)
+- Peter O'Gorman found a problem with SCP downloads when the downloaded file
+ was 16385 bytes (16K+1) and it turned out we didn't properly always "suck
+ out" all data from libssh2. The effect being that libcurl would hang on the
+ socket waiting for data when libssh2 had in fact already read it all...
+
+Dan F (25 April 2007)
+- Added support in runtests.pl for "!n" test numbers to disable individual
+ tests. Changed -t to only keep log files around when -k is specified,
+ to have the same behaviour as without -t.
+
+Daniel S (25 April 2007)
+- Sonia Subramanian brought our attention to a problem that happens if you set
+ the CURLOPT_RESUME_FROM or CURLOPT_RANGE options and an existing connection
+ in the connection cache is closed to make room for the new one when you call
+ curl_easy_perform(). It would then wrongly free range-related data in the
+ connection close funtion.
+
+Yang Tse (25 April 2007)
+- Steve Little fixed compilation on VMS 64-bit mode
+
+Daniel S (24 April 2007)
+- Robert Iakobashvili made the 'master_buffer' get allocated first once it is
+ can/will be used as it then makes the common cases save 16KB of data for each
+ easy handle that isn't used for pipelining.
+
+Dan F (23 April 2007)
+- Added <postcheck> support to the test harness.
+
+- Added tests 610-612 to test more SFTP post-quote commands.
+
+Daniel S (22 April 2007)
+- Song Ma's warning if -r/--range is given with a "bad" range, also noted in
+ the man page now.
+
+- Daniel Black filed bug #1705177
+ (http://curl.haxx.se/bug/view.cgi?id=1705177) where --without-ssl
+ --with-gnutl outputs a warning about SSL not being enabled even though GnuTLS
+ was found and used.
+
+Daniel S (21 April 2007)
+- Daniel Black filed bug #1704675
+ (http://curl.haxx.se/bug/view.cgi?id=1704675) identifying a double-free
+ problem in the SSL-dealing layer, telling GnuTLS to free NULL credentials on
+ closedown after a failure and a bad #ifdef for NSS when closing down SSL.
+
+Yang Tse (20 April 2007)
+- Save one call to curlx_tvnow(), which calls gettimeofday(), in each of
+ Curl_socket_ready(), Curl_poll() and Curl_select() when these are called
+ with a zero timeout or a timeout value indicating a blocking call should
+ be performed.
+
+Daniel S (18 April 2007)
+- James Housley made SFTP uploads use libssh2's non-blocking API
+
+- Prevent the internal progress meter from updating more frequently than once
+ per second.
+
+Dan F (17 April 2007)
+- Added test cases 296, 297 and 298 to test --ftp-method handling
+
+Daniel S (16 April 2007)
+- Robert Iakobashvil added curl_multi_socket_action() to libcurl, which is a
+ function that deprecates the curl_multi_socket() function. Using the new
+ function the application tell libcurl what action that was found in the
+ socket that it passes in. This gives a significant performance boost as it
+ allows libcurl to avoid a call to poll()/select() for every call to
+ curl_multi_socket*().
+
+ I added a define in the public curl/multi.h header file that will make your
+ existing application automatically use curl_multi_socket_action() instead of
+ curl_multi_socket() when you recompile. But of course you'll get better
+ performance if you adjust your code manually and actually pass in the
+ correct action bitmask to this function.
+
+Daniel S (14 April 2007)
+- Jay Austin added "DH PARAMETERS" to the stunnel.pem certificate for the test
+ suite to make stunnel run better in some (most?) environments.
+
+Dan F (13 April 2007)
+- Added test cases 294 and 295 to test --ftp-account handling
+
+- Improved handling of out of memory in ftp.
+
+Yang Tse (13 April 2007)
+- Fix test case 534 which started to fail 2007-04-13 due to the existance
+ of a new host on the net with the same silly domain the test was using
+ for a host which was supposed not to exist.
+
+Daniel S (12 April 2007)
+- Song Ma found a memory leak in the if2ip code if you pass in an interface
+ name longer than the name field of the ifreq struct (typically 6 bytes), as
+ then it wouldn't close the used dummy socket. Bug #1698974
+ (http://curl.haxx.se/bug/view.cgi?id=1698974)
+
+Version 7.16.2 (11 April 2007)
+
+Yang Tse (10 April 2007)
+- Ravi Pratap provided some fixes for HTTP pipelining
+
+- configure script will ignore --enable-sspi option for non-native Windows.
+
+Daniel S (9 April 2007)
+- Nick Zitzmann did ssh.c cleanups
+
+Daniel S (3 April 2007)
+- Rob Jones fixed better #ifdef'ing for a bunch of #include lines.
+
+Daniel S (2 April 2007)
+- Nick Zitzmann made the CURLOPT_POSTQUOTE option work for SFTP as well. The
+ accepted commands are as follows:
+
+ chgrp (gid) (path)
+ Changes the group ID of the file or directory at (path) to (gid). (gid)
+ must be a number.
+
+ chmod (perms) (path)
+ Changes the permissions of the file or directory at (path) to
+ (perms). (perms) must be a number in the format used by the chmod Unix
+ command.
+
+ chown (uid) (path)
+ Changes the user ID of the file or directory at (path) to (uid). (uid)
+ must be a number.
+
+ ln (source) (dest)
+ Creates a symbolic link at (dest) that points to the file located at
+ (source).
+
+ mkdir (path)
+ Creates a new directory at (path).
+
+ rename (source) (dest)
+ Moves the file or directory at (source) to (dest).
+
+ rm (path)
+ Deletes the file located at (path).
+
+ rmdir (path)
+ Deletes the directory located at (path). This command will raise an error
+ if the directory is not empty.
+
+ symlink (source) (dest)
+ Same as ln.
+
+Daniel S (1 April 2007)
+- Robert Iakobashvili made curl_multi_remove_handle() a lot faster when many
+ easy handles are added to a multi handle, by avoiding the looping over all
+ the handles to find which one to remove.
+
+- Matt Kraai provided a patch that makes curl build on QNX 6 fine again.
+
+Daniel S (31 March 2007)
+- Fixed several minor issues detected by the coverity.com scanner.
+
+- "Pixel" fixed a problem that appeared when you used -f with user+password
+ embedded in the URL.
+
+Dan F (29 March 2007)
+- Don't tear down the ftp connection if the maximum filesize was exceeded
+ and added tests 290 and 291 to check.
+
+- Added ftps upload and SSL required tests 401 and 402.
+
+- Send an EOF message before closing an SCP channel, as recommended by
+ RFC4254. Enable libssh2 tracing when ssh debugging is turned on.
+
+Yang Tse (27 March 2007)
+- Internal function Curl_select() renamed to Curl_socket_ready()
+
+ New Internal wrapper function Curl_select() around select (2), it
+ uses poll() when a fine poll() is available, so now libcurl can be
+ built without select() support at all if a fine poll() is available.
+
+Daniel S (25 March 2007)
+- Daniel Johnson fixed multi code to traverse the easy handle list properly.
+ A left-over bug from the February 21 fix.
+
+Dan F (23 March 2007)
+- Added --pubkey option to curl and made --key also work for SCP/SFTP,
+ plus made --pass work on an SSH private key as well.
+
+- Changed the test harness to attempt to gracefully shut down servers
+ before resorting to the kill -9 hammer.
+
+- Added test harness infrastructure to support scp/sftp tests, using
+ OpenSSH as the server.
+
+- Fixed a memory leak when specifying a proxy with a file: URL.
+
+Yang Tse (20 March 2007)
+- Fixed: When a signal was caught awaiting for an event using Curl_select()
+ or Curl_poll() with a non-zero timeout both functions would restart the
+ specified timeout. This could even lead to the extreme case that if a
+ signal arrived with a frecuency lower to the specified timeout neither
+ function would ever exit.
+
+ Added experimental symbol definition check CURL_ACKNOWLEDGE_EINTR in
+ Curl_select() and Curl_poll(). When compiled with CURL_ACKNOWLEDGE_EINTR
+ defined both functions will return as soon as a signal is caught. Use it
+ at your own risk, all calls to these functions in the library should be
+ revisited and checked before fully supporting this feature.
+
+Yang Tse (19 March 2007)
+- Bryan Henderson fixed the progress function so that it can get called more
+ frequently allowing same calling frecuency for the client progress callback.
+
+Dan F (15 March 2007)
+- Various memory leaks plugged and NULL pointer fixes made in the ssh code.
+
+Daniel (15 March 2007)
+- Nick made the curl tool accept globbing ranges that only is one number, i.e
+ you can now use [1-1] without curl complaining.
+
+Daniel (10 March 2007)
+- Eygene Ryabinkin:
+
+ The problem is the following: when we're calling Curl_done and it decides to
+ keep the connection opened ('left intact'), then the caller is not notified
+ that the connection was done via the NULLifying of the pointer, so some easy
+ handle is keeping the pointer to this connection.
+
+ Later ConnectionExists can select such connection for reuse even if we're
+ not pipelining: pipeLen is zero, so the (pipeLen > 0 && !canPipeline) is
+ false and we can reuse this connection for another easy handle. But thus the
+ connection will be shared between two easy handles if the handle that wants
+ to take the ownership is not the same as was not notified of the connection
+ was done in Curl_done. And when some of these easy handles will get their
+ connection really freed the another one will still keep the pointer.
+
+ My fix was rather trivial: I just added the NULLification to the 'else'
+ branch in the Curl_done. My tests with Git and ElectricFence showed no
+ problems both for HTTP pulling and cloning. Repository size is about 250 Mb,
+ so it was a considerable amount of Curl's work.
+
+Dan F (9 March 2007)
+- Updated the test harness to add a new "crypto" feature check and updated the
+ appropriate test case to use it. For now, this is treated the same as the
+ "SSL" feature because curl doesn't list it separately.
+
+Daniel (9 March 2007)
+- Robert Iakobashvili fixed CURLOPT_INTERFACE for IPv6.
+
+- Robert A. Monat improved the maketgz and VC6/8 generating to set the correct
+ machine type too.
+
+- Justin Fletcher fixed a file descriptor leak in the curl tool when trying to
+ upload a file it couldn't open. Bug #1676581
+ (http://curl.haxx.se/bug/view.cgi?id=1676581)
+
+Dan F (9 March 2007)
+- Updated the test harness to check for protocol support before running each
+ test, fixing KNOWN_BUGS #11.
+
+Dan F (7 March 2007)
+- Reintroduced (after a 3 year hiatus) an FTPS test case (400) into the test
+ harness. It is very limited as it supports only ftps:// URLs with
+ --ftp-ssl-control specified, which implicitly encrypts the control
+ channel but not the data channels. That allows stunnel to be used with
+ an unmodified ftp server in exactly the same way that the test https
+ server is set up.
+
+Dan F (7 March 2007)
+- Honour --ftp-ssl-control on ftps:// URLs to allow encrypted control and
+ unencrypted data connections.
+
+Dan F (6 March 2007)
+- Fixed a couple of improper pointer uses detected by valgrind in test
+ cases 181 & 216.
+
+Daniel (2 March 2007)
+- Robert A. Monat and Shmulik Regev helped out to fix the new */Makefile.vc8
+ makefiles that are included in the source release archives, generated from
+ the Makefile.vc6 files by the maketgz script. I also modified the root
+ Makefile to have a VC variable that defaults to vc6 but can be overridden to
+ allow it to be used for vc8 as well. Like this:
+
+ nmake VC=vc8 vc
+
+Daniel (27 February 2007)
+- Hang Kin Lau found and fixed: When I use libcurl to connect to an https
+ server through a proxy and have the remote https server port set using the
+ CURLOPT_PORT option, protocol gets reset to http from https after the first
+ request.
+
+ User defined URL was modified internally by libcurl and subsequent reuse of
+ the easy handle may lead to connection using a different protocol (if not
+ originally http).
+
+ I found that libcurl hardcoded the protocol to "http" when it tries to
+ regenerate the URL if CURLOPT_PORT is set. I tried to fix the problem as
+ follows and it's working fine so far
+
+Daniel (25 February 2007)
+- Adam D. Moss made the HTTP CONNECT procedure less blocking when used from
+ the multi interface. Note that it still does a part of the connection in a
+ blocking manner.
+
+Daniel (23 February 2007)
+- Added warning outputs if the command line uses more than one of the options
+ -v, --trace and --trace-ascii, since it could really confuse the user.
+ Clarified this fact in the man page.
+
+Daniel (21 February 2007)
+- Ravi Pratap provided work on libcurl making pipelining more robust and
+ fixing some bugs:
+ o Don't mix GET and POST requests in a pipeline
+ o Fix the order in which requests are dispatched from the pipeline
+ o Fixed several curl bugs with pipelining when the server is returning
+ chunked encoding:
+ * Added states to chunked parsing for final CRLF
+ * Rewind buffer after parsing chunk with data remaining
+ * Moved chunked header initializing to a spot just before receiving
+ headers
+
+Daniel (20 February 2007)
+- Linus Nielsen Feltzing changed the CURLOPT_FTP_SSL_CCC option to handle
+ active and passive CCC shutdown and added the --ftp-ssl-ccc-mode command
+ line option.
+
+Daniel (19 February 2007)
+- Ian Turner fixed the libcurl.m4 macro's support for --with-libcurl.
+
+- Shmulik Regev found a memory leak in re-used HTTPS connections, at least
+ when the multi interface was used.
+
+- Robson Braga Araujo made passive FTP transfers work with SOCKS (both 4 and
+ 5).
+
+Daniel (18 February 2007)
+- Jeff Pohlmeyer identified two problems: first a rather obscure problem with
+ the multi interface and connection re-use that could make a
+ curl_multi_remove_handle() ruin a pointer in another handle.
+
+ The second problem was less of an actual problem but more of minor quirk:
+ the re-using of connections wasn't properly checking if the connection was
+ marked for closure.
+
+Daniel (16 February 2007)
+- Duncan Mac-Vicar Prett and Michal Marek reported problems with resetting
+ CURLOPT_RANGE back to no range on an easy handle when using FTP.
+
+Dan F (14 February 2007)
+- Fixed curl-config --libs so it doesn't list unnecessary libraries (and
+ therefore introduce unnecessary dependencies) when it's not needed.
+ Also, don't bother adding a library path of /usr/lib
+
+Daniel (13 February 2007)
+- The default password for anonymous FTP connections is now changed to be
+ "ftp@example.com".
+
+- Robert A. Monat made libcurl build fine with VC2005 - it doesn't have
+ gmtime_r() like the older VC versions. He also made use of some machine-
+ specific defines to differentiate the "OS" define.
+
+Daniel (12 February 2007)
+- Rob Crittenden added support for NSS (Network Security Service) for the
+ SSL/TLS layer. http://www.mozilla.org/projects/security/pki/nss/
+
+ This is the fourth supported library for TLS/SSL that libcurl supports!
+
+- Shmulik Regev fixed so that the final CRLF of HTTP response headers are sent
+ to the debug callback.
+
+- Shmulik Regev added CURLOPT_HTTP_CONTENT_DECODING and
+ CURLOPT_HTTP_TRANSFER_DECODING that if set to zero will disable libcurl's
+ internal decoding of content or transfer encoded content. This may be
+ preferable in cases where you use libcurl for proxy purposes or similar. The
+ command line tool got a --raw option to disable both at once.
+
+- release tarballs made with maketgz will from now on have a LIBCURL_TIMESTAMP
+ define set to hold the exact date and time of when the tarball was built, as
+ a human readable string using the UTC time zone.
+
+- Jeff Pohlmeyer fixed a flaw in curl_multi_add_handle() when adding a handle
+ that has an easy handle present in the "closure" list pending closure.
+
+Daniel (6 February 2007)
+- Regular file downloads wiht SFTP and SCP are now done using the non-blocking
+ API of libssh2, if the libssh2 headers seem to support them. This will make
+ SCP and SFTP much more responsive and better libcurl citizens when used with
+ the multi interface etc.
+
+Daniel (5 February 2007)
+- Michael Wallner added support for CURLOPT_TIMEOUT_MS and
+ CURLOPT_CONNECTTIMEOUT_MS that, as their names suggest, do the timeouts with
+ millisecond resolution. The only restriction to that is the alarm()
+ (sometimes) used to abort name resolves as that uses full seconds. I fixed
+ the FTP response timeout part of the patch.
+
+ Internally we now count and keep the timeouts in milliseconds but it also
+ means we multiply set timeouts with 1000. The effect of this is that no
+ timeout can be set to more than 2^31 milliseconds (on 32 bit systems), which
+ equals 24.86 days. We probably couldn't before either since the code did
+ *1000 on the timeout values on several places already.
+
+Daniel (3 February 2007)
+- Yang Tse fixed the cookie expiry date in several test cases that started to
+ fail since they used "1 feb 2007"...
+
+- Manfred Schwarb reported that socks5 support was broken and help us pinpoint
+ the problem. The code now tries harder to use httproxy and proxy where
+ apppropriate, as not all proxies are HTTP...
+
+Version 7.16.1 (29 January 2007)
+
+Daniel (29 January 2007)
+- Michael Wallner reported that when doing a CONNECT with a custom User-Agent
+ header, you got _two_ User-Agent headers in the CONNECT request...! Added
+ test case 287 to verify the fix.
+
+Daniel (28 January 2007)
+- curl_easy_reset() now resets the CA bundle path correctly.
+
+- David McCreedy fixed the Curl command line tool for HTTP on non-ASCII
+ platforms.
+
+Daniel (25 January 2007)
+- Added the --libcurl [file] option to curl. Append this option to any
+ ordinary curl command line, and you will get a libcurl-using source code
+ written to the file that does the equivalent operation of what your command
+ line operation does!
+
+Dan F (24 January 2007)
+- Fixed a dangling pointer problem that prevented the http_proxy environment
+ variable from being properly used in many cases (and caused test case 63
+ to fail).
+
+Daniel (23 January 2007)
+- David McCreedy did NTLM changes mainly for non-ASCII platforms:
+
+ #1
+ There's a compilation error in http_ntlm.c if USE_NTLM2SESSION is NOT
+ defined. I noticed this while testing various configurations. Line 867 of
+ the current http_ntlm.c is a closing bracket for an if/else pair that only
+ gets compiled in if USE_NTLM2SESSION is defined. But this closing bracket
+ wasn't in an #ifdef so the code fails to compile unless USE_NTLM2SESSION was
+ defined. Lines 198 and 140 of my patch wraps that closing bracket in an
+ #ifdef USE_NTLM2SESSION.
+
+ #2
+ I noticed several picky compiler warnings when DEBUG_ME is defined. I've
+ fixed them with casting. By the way, DEBUG_ME was a huge help in
+ understanding this code.
+
+ #3
+ Hopefully the last non-ASCII conversion patch for libcurl in a while. I
+ changed the "NTLMSSP" literal to hex since this signature must always be in
+ ASCII.
+
+ Conversion code was strategically added where necessary. And the
+ Curl_base64_encode calls were changed so the binary "blobs" http_ntlm.c
+ creates are NOT translated on non-ASCII platforms.
+
+Dan F (22 January 2007)
+- Converted (most of) the test data files into genuine XML. A handful still
+ are not, due mainly to the lack of support for XML character entities
+ (e.g. & => &amp; ). This will make it easier to validate test files using
+ tools like xmllint, as well as to edit and view them using XML tools.
+
+Daniel (16 January 2007)
+- Armel Asselin improved libcurl to behave a lot better when an easy handle
+ doing an FTP transfer is removed from a multi handle before completion. The
+ fix also fixed the "alive counter" to be correct on "premature removal" for
+ all protocols.
+
+Dan F (16 January 2007)
+- Fixed a small memory leak in tftp uploads discovered by curl's memory leak
+ detector. Also changed tftp downloads to URL-unescape the downloaded
+ file name.
+
+Daniel (14 January 2007)
+- David McCreedy provided libcurl changes for doing HTTP communication on
+ non-ASCII platforms. It does add some complexity, most notably with more
+ #ifdefs, but I want to see this supported added and I can't see how we can
+ add it without the extra stuff added.
+
+- Setting CURLOPT_COOKIELIST to "ALL" when no cookies at all was present,
+ libcurl would crash when trying to read a NULL pointer.
+
+Daniel (12 January 2007)
+- Toby Peterson found a nasty bug that prevented (lib)curl from properly
+ downloading (most) things that were larger than 4GB on 32 bit systems. Matt
+ Witherspoon helped as narrow down the problem.
+
+Daniel (5 January 2007)
+- Linus Nielsen Feltzing introduced the --ftp-ssl-ccc command line option to
+ curl that uses the new CURLOPT_FTP_SSL_CCC option in libcurl. If enabled, it
+ will make libcurl shutdown SSL/TLS after the authentication is done on a
+ FTP-SSL operation.
+
+Daniel (4 January 2007)
+- David McCreedy made changes to allow base64 encoding/decoding to work on
+ non-ASCII platforms.
+
+Daniel (3 January 2007)
+- Matt Witherspoon fixed the flaw which made libcurl 7.16.0 always store
+ downloaded data in two buffers, just to be able to deal with a special HTTP
+ pipelining case. That is now only activated for pipelined transfers. In
+ Matt's case, it showed as a considerable performance difference,
+
+Daniel (2 January 2007)
+- Victor Snezhko helped us fix bug report #1603712
+ (http://curl.haxx.se/bug/view.cgi?id=1603712) (known bug #36) --limit-rate
+ (CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE) are broken
+ on Windows (since 7.16.0, but that's when they were introduced as previous
+ to that the limiting logic was made in the application only and not in the
+ library). It was actually also broken on select()-based systems (as apposed
+ to poll()) but we haven't had any such reports. We now use select(), Sleep()
+ or delay() properly to sleep a while without waiting for anything input or
+ output when the rate limiting is activated with the easy interface.
+
+- Modified libcurl.pc.in to use Libs.private for the libs libcurl itself needs
+ to get built static. It has been mentioned before and was again brought to
+ our attention by Nathanael Nerode who filed debian bug report #405226
+ (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=405226).
+
+Daniel (29 December 2006)
+- Make curl_easy_duphandle() set the magic number in the new handle.
+
+Daniel (22 December 2006)
+- Robert Foreman provided a prime example snippet showing how libcurl would
+ get confused and not acknowledge the 'no_proxy' variable properly once it
+ had used the proxy and you re-used the same easy handle. I made sure the
+ proxy name is properly stored in the connect struct rather than the
+ sessionhandle/easy struct.
+
+- David McCreedy fixed a bad call to getsockname() that wrongly used a size_t
+ variable to point to when it should be a socklen_t.
+
+- When setting a proxy with environment variables and (for example) running
+ 'curl [URL]' with a URL without a protocol prefix, curl would not send a
+ correct request as it failed to add the protocol prefix.
+
+Daniel (21 December 2006)
+- Robson Braga Araujo reported bug #1618359
+ (http://curl.haxx.se/bug/view.cgi?id=1618359) and subsequently provided a
+ patch for it: when downloading 2 zero byte files in a row, curl 7.16.0
+ enters an infinite loop, while curl 7.16.1-20061218 does one additional
+ unnecessary request.
+
+ Fix: During the "Major overhaul introducing http pipelining support and
+ shared connection cache within the multi handle." change, headerbytecount
+ was moved to live in the Curl_transfer_keeper structure. But that structure
+ is reset in the Transfer method, losing the information that we had about
+ the header size. This patch moves it back to the connectdata struct.
+
+Daniel (16 December 2006)
+- Brendan Jurd provided a fix that now prevents libcurl from getting a SIGPIPE
+ during certain conditions when GnuTLS is used.
+
+Daniel (11 December 2006)
+- Alexey Simak found out that when doing FTP with the multi interface and
+ something went wrong like it got a bad response code back from the server,
+ libcurl would leak memory. Added test case 538 to verify the fix.
+
+ I also noted that the connection would get cached in that case, which
+ doesn't make sense since it cannot be re-use when the authentication has
+ failed. I fixed that issue too at the same time, and also that the path
+ would be "remembered" in vain for cases where the connection was about to
+ get closed.
+
+Daniel (6 December 2006)
+- Sebastien Willemijns reported bug #1603712
+ (http://curl.haxx.se/bug/view.cgi?id=1603712) which is about connections
+ getting cut off prematurely when --limit-rate is used. While I found no such
+ problems in my tests nor in my reading of the code, I found that the
+ --limit-rate code was severly flawed (since it was moved into the lib, since
+ 7.15.5) when used with the easy interface and it didn't work as documented
+ so I reworked it somewhat and now it works for my tests.
+
+Daniel (5 December 2006)
+- Stefan Krause pointed out a compiler warning with a picky MSCV compiler when
+ passing a curl_off_t argument to the Curl_read_rewind() function which takes
+ an size_t argument. Curl_read_rewind() also had debug code left in it and it
+ was put in a different source file with no good reason when only used from
+ one single spot.
+
+- Sh Diao reported that CURLOPT_CLOSEPOLICY doesn't work, and indeed, there is
+ no code present in the library that receives the option. Since it was not
+ possible to use, we know that no current users exist and thus we simply
+ removed it from the docs and made the code always use the default path of
+ the code.
+
+- Jared Lundell filed bug report #1604956
+ (http://curl.haxx.se/bug/view.cgi?id=1604956) which identified setting
+ CURLOPT_MAXCONNECTS to zero caused libcurl to SIGSEGV. Starting now, libcurl
+ will always internally use no less than 1 entry in the connection cache.
+
+- Sh Diao reported that CURLOPT_FORBID_REUSE no works, and indeed it broke in
+ the 7.16.0 release.
+
+- Martin Skinner brought back bug report #1230118 to haunt us once again.
+ (http://curl.haxx.se/bug/view.cgi?id=1230118) curl_getdate() did not work
+ properly for all input dates on Windows. It was mostly seen on some TZ time
+ zones using DST. Luckily, Martin also provided a fix.
+
+- Alexey Simak filed bug report #1600447
+ (http://curl.haxx.se/bug/view.cgi?id=1600447) in which he noted that active
+ FTP connections don't work with the multi interface. The problem is here
+ that the multi interface state machine has a state during which it can wait
+ for the data connection to connect, but the active connection is not done in
+ the same step in the sequence as the passive one is so it doesn't quite work
+ for active. The active FTP code still use a blocking function to allow the
+ remote server to connect.
+
+ The fix (work-around is a better word) for this problem is to set the
+ boolean prematurely that the data connection is completed, so that the "wait
+ for connect" phase ends at once.
+
+ The proper fix, left for the future, is of course to make the active FTP
+ case to act in a non-blocking way too.
+
+- Matt Witherspoon fixed a problem case when the CPU load went to 100% when a
+ HTTP upload was disconnected:
+
+ "What appears to be happening is that my system (Linux 2.6.17 and 2.6.13) is
+ setting *only* POLLHUP on poll() when the conditions in my previous mail
+ occur. As you can see, select.c:Curl_select() does not check for POLLHUP. So
+ basically what was happening, is poll() was returning immediately (with
+ POLLHUP set), but when Curl_select() looked at the bits, neither POLLERR or
+ POLLOUT was set. This still caused Curl_readwrite() to be called, which
+ quickly returned. Then the transfer() loop kept continuing at full speed
+ forever."
+
+Daniel (1 December 2006)
+- Toon Verwaest reported that there are servers that send the Content-Range:
+ header in a third, not suppported by libcurl, format and we agreed that we
+ could make the parser more forgiving to accept all the three found
+ variations.
+
+Daniel (25 November 2006)
+- Venkat Akella found out that libcurl did not like HTTP responses that simply
+ responded with a single status line and no headers nor body. Starting now, a
+ HTTP response on a persistent connection (i.e not set to be closed after the
+ response has been taken care of) must have Content-Length or chunked
+ encoding set, or libcurl will simply assume that there is no body.
+
+ To my horror I learned that we had no less than 57(!) test cases that did bad
+ HTTP responses like this, and even the test http server (sws) responded badly
+ when queried by the test system if it is the test system. So although the
+ actual fix for the problem was tiny, going through all the newly failing test
+ cases got really painful and boring.
+
+Daniel (24 November 2006)
+- James Housley did lots of work and introduced SFTP downloads.
+
+Daniel (13 November 2006)
+- Ron in bug #1595348 (http://curl.haxx.se/bug/view.cgi?id=1595348) pointed
+ out a stack overwrite (and the corresponding fix) on 64bit Windows when
+ dealing with HTTP chunked encoding.
+
+Daniel (9 November 2006)
+- Nir Soffer updated libcurl.framework.make:
+ o fix symlinks, should link to Versions, not to ./Versions
+ o indentation improvments
+
+- Dmitriy Sergeyev found a SIGSEGV with his test04.c example posted on 7 Nov
+ 2006. It turned out we wrongly assumed that the connection cache was present
+ when tearing down a connection.
+
+- Ciprian Badescu found a SIGSEGV when doing multiple TFTP transfers using the
+ multi interface, but I could also repeat it doing multiple sequential ones
+ with the easy interface. Using Ciprian's test case, I could fix it.
+
+Daniel (8 November 2006)
+- Bradford Bruce reported that when setting CURLOPT_DEBUGFUNCTION without
+ CURLOPT_VERBOSE set to non-zero, you still got a few debug messages from the
+ SSL handshake. This is now stopped.
+
+Daniel (7 November 2006)
+- Olaf fixed a leftover problem with the CONNECT fix of his that would leave a
+ wrong error message in the error message buffer.
+
+Daniel (3 November 2006)
+- Olaf Stueben provided a patch that I edited slightly. It fixes the notorious
+ KNOWN_BUGS #25, which happens when a proxy closes the connection when
+ libcurl has sent CONNECT, as part of an authentication negotiation. Starting
+ now, libcurl will re-connect accordingly and continue the authentication as
+ it should.
+
+Daniel (2 November 2006)
+- James Housley brought support for SCP transfers, based on the libssh2 library
+ for the actual network protocol stuff.
+
+ Added these new curl_easy_setopt() options:
+
+ CURLOPT_SSH_AUTH_TYPES
+ CURLOPT_SSH_PUBLIC_KEYFILE
+ CURLOPT_SSH_PRIVATE_KEYFILE
+
+Version 7.16.0 (30 October 2006)
+
+Daniel (25 October 2006)
+- Fixed CURLOPT_FAILONERROR to return CURLE_HTTP_RETURNED_ERROR even for the
+ case when 401 or 407 are returned, *IF* no auth credentials have been given.
+ The CURLOPT_FAILONERROR option is not possible to make fool-proof for 401
+ and 407 cases when auth credentials is given, but we've now covered this
+ somewhat more.
+
+ You might get some amounts of headers transferred before this situation is
+ detected, like for when a "100-continue" is received as a response to a
+ POST/PUT and a 401 or 407 is received immediately afterwards.
+
+ Added test 281 to verify this change.
+
+Daniel (23 October 2006)
+- Ravi Pratap provided a major update with pipelining fixes. We also no longer
+ re-use connections (for pipelining) before the name resolving is done.
+
+Daniel (21 October 2006)
+- Nir Soffer made the tests/libtest/Makefile.am use a proper variable for all
+ the single test applications' link and dependences, so that you easier can
+ override those from the command line when using make.
+
+- Armel Asselin separated CA cert verification problems from problems with
+ reading the (local) CA cert file to let users easier pinpoint the actual
+ problem. CURLE_SSL_CACERT_BADFILE (77) is the new libcurl error code.
+
+Daniel (18 October 2006)
+- Removed the "protocol-guessing" for URLs with host names starting with FTPS
+ or TELNET since they are practically non-existant. This leaves us with only
+ three different prefixes that would assume the protocol is anything but
+ HTTP, and they are host names starting with "ftp.", "dict." or "ldap.".
+
+Daniel (17 October 2006)
+- Bug report #1579171 pointed out code flaws detected with "prefast", and they
+ were 1 - a too small memory clear with memset() in the threaded resolver and
+ 2 - a range of potentially bad uses of the ctype family of is*() functions
+ such as isdigit(), isalnum(), isprint() and more. The latter made me switch
+ to using our own set of these functions/macros using uppercase letters, and
+ with some extra set of crazy typecasts to avoid mistakingly passing in
+ negative numbers to the underlying is*() functions.
+
+- With Jeff Pohlmeyer's help, I fixed the expire timer when using
+ curl_multi_socket() during name resolves with c-ares and the LOW_SPEED
+ options now work fine with curl_multi_socket() as well.
+
+Daniel (16 October 2006)
+- Added a check in configure that simply tries to run a program (not when
+ cross-compiling) in order to detect problems with run-time libraries that
+ otherwise would occur when the sizeof tests for curl_off_t would run and
+ thus be much more confusing to users. The check of course should run after
+ all lib-checks are done and before any other test is used that would run an
+ executable built for testing-purposes.
+
+Dan F (13 October 2006)
+- The tagging of application/x-www-form-urlencoded POST body data sent
+ to the CURLOPT_DEBUGFUNCTION callback has been fixed (it was erroneously
+ included as part of the header). A message was also added to the
+ command line tool to show when data is being sent, enabled when
+ --verbose is used.
+
+Daniel (12 October 2006)
+- Starting now, adding an easy handle to a multi stack that was already added
+ to a multi stack will cause CURLM_BAD_EASY_HANDLE to get returned.
+
+- Jeff Pohlmeyer has been working with the hiperfifo.c example source code,
+ and while doing so it became apparent that the current timeout system for
+ the socket API really was a bit awkward since it become quite some work to
+ be sure we have the correct timeout set.
+
+ Jeff then provided the new CURLMOPT_TIMERFUNCTION that is yet another
+ callback the app can set to get to know when the general timeout time
+ changes and thus for an application like hiperfifo.c it makes everything a
+ lot easier and nicer. There's a CURLMOPT_TIMERDATA option too of course in
+ good old libcurl tradition.
+
+ Jeff has also updated the hiperfifo.c example code to use this news.
+
+Daniel (9 October 2006)
+- Bogdan Nicula's second test case (posted Sun, 08 Oct 2006) converted to test
+ case 535 and it now runs fine. Again a problem with the pipelining code not
+ taking all possible (error) conditions into account.
+
+Daniel (6 October 2006)
+- Bogdan Nicula's hanging test case (posted Wed, 04 Oct 2006) was converted to
+ test case 533 and the test now runs fine.
+
+Daniel (4 October 2006)
+- Dmitriy Sergeyev provided an example source code that crashed CVS libcurl
+ but that worked nicely in 7.15.5. I converted it into test case 532 and
+ fixed the problem.
+
+Daniel (29 September 2006)
+- Removed a few other no-longer present options from the header file.
+
+- Support for FTP third party transfers was removed. Here's why:
+
+ o The recent multi interface changes broke it and the design of the 3rd party
+ transfers made it very hard to fix the problems
+ o It was still blocking and thus nasty for the multi interface
+ o It was a lot of extra code for a very rarely used feature
+ o It didn't use the same code as for "plain" FTP transfers, so it didn't work
+ fine for IPv6 and it didn't properly re-use connections and more
+ o There's nobody around who's willing to work on and improve the existing
+ code
+
+ This does not mean that third party transfers are banned forever, only that
+ they need to be done better if they are to be re-added in the future.
+
+ The CURLOPT_SOURCE_* options are removed from the lib and so are the --3p*
+ options from the command line tool. For this reason, I also bumped the
+ version info for the lib.
+
+Daniel (28 September 2006)
+- Reported in #1561470 (http://curl.haxx.se/bug/view.cgi?id=1561470), libcurl
+ would crash if a bad function sequence was used when shutting down after
+ using the multi interface (i.e using easy_cleanup after multi_cleanup) so
+ precautions have been added to make sure it doesn't any more - test case 529
+ was added to verify.
+
+Daniel (27 September 2006)
+- The URL in the cookie jar file is now changed since it was giving a 404.
+ Reported by Timothy Stone. The new URL will take the visitor to a curl web
+ site mirror with the document.
+
+Daniel (24 September 2006)
+- Bernard Leak fixed configure --with-gssapi-libs.
+
+- Cory Nelson made libcurl use the WSAPoll() function if built for Windows
+ Vista (_WIN32_WINNT >= 0x0600)
+
+Daniel (23 September 2006)
+- Mike Protts added --ftp-ssl-control to make curl use FTP-SSL, but only
+ encrypt the control connection and use the data connection "plain".
+
+- Dmitriy Sergeyev provided a patch that made the SOCKS[45] code work better
+ as it now will read the full data sent from servers. The SOCKS-related code
+ was also moved to the new lib/socks.c source file.
+
+Daniel (21 September 2006)
+- Added test case 531 in an attempt to repeat bug report #1561470
+ (http://curl.haxx.se/bug/view.cgi?id=1561470) that is said to crash when an
+ FTP upload fails with the multi interface. It did not, but I made a failed
+ upload still assume the control connection to be fine.
+
+Daniel (20 September 2006)
+- Armel Asselin fixed problems when you gave a proxy URL with user name and
+ empty password or no password at all. Test case 278 and 279 were added to
+ verify.
+
+Daniel (12 September 2006)
+- Added docs/examples/10-at-a-time.c by Michael Wallner
+
+- Added docs/examples/hiperfifo.c by Jeff Pohlmeyer
+
+Daniel (11 September 2006)
+- Fixed my breakage from earlier today so that doing curl_easy_cleanup() on a
+ handle that is part of a multi handle first removes the handle from the
+ stack.
+
+- Added CURLOPT_SSL_SESSIONID_CACHE and --no-sessionid to disable SSL
+ session-ID re-use on demand since there obviously are broken servers out
+ there that misbehave with session-IDs used.
+
+- Jeff Pohlmeyer presented a *multi_socket()-using program that exposed a
+ problem with it (SIGSEGV-style). It clearly showed that the existing
+ socket-state and state-difference function wasn't good enough so I rewrote
+ it and could then re-run Jeff's program without any crash. The previous
+ version clearly could miss to tell the application when a handle changed
+ from using one socket to using another.
+
+ While I was at it (as I could use this as a means to track this problem
+ down), I've now added a 'magic' number to the easy handle struct that is
+ inited at curl_easy_init() time and cleared at curl_easy_cleanup() time that
+ we can use internally to detect that an easy handle seems to be fine, or at
+ least not closed or freed (freeing in debug builds fill the area with 0x13
+ bytes but in normal builds we can of course not assume any particular data
+ in the freed areas).
+
+Daniel (9 September 2006)
+- Michele Bini fixed how the hostname is put in NTLM packages. As servers
+ don't expect fully qualified names we need to cut them off at the first dot.
+
+- Peter Sylvester cleaned up and fixed the getsockname() uses in ftp.c. Some
+ of them can be completetly removed though...
+
+Daniel (6 September 2006)
+- Ravi Pratap and I have implemented HTTP Pipelining support. Enable it for a
+ multi handle using CURLMOPT_PIPELINING and all HTTP connections done on that
+ handle will be attempted to get pipelined instead of done in parallell as
+ they are performed otherwise.
+
+ As a side-effect from this work, connections are now shared between all easy
+ handles within a multi handle, so if you use N easy handles for transfers,
+ each of them can pick up and re-use a connection that was previously used by
+ any of the handles, be it the same or one of the others.
+
+ This separation of the tight relationship between connections and easy
+ handles is most noticable when you close easy handles that have been used in
+ a multi handle and check amount of used memory or watch the debug output, as
+ there are times when libcurl will keep the easy handle around for a while
+ longer to be able to close it properly. Like for sending QUIT to close down
+ an FTP connection.
+
+ This is a major change.
+
+Daniel (4 September 2006)
+- Dmitry Rechkin (http://curl.haxx.se/bug/view.cgi?id=1551412) provided a
+ patch that while not fixing things very nicely, it does make the SOCKS5
+ proxy connection slightly better as it now acknowledges the timeout for
+ connection and it no longer segfaults in the case when SOCKS requires
+ authentication and you did not specify username:password.
+
+Daniel (31 August 2006)
+- Dmitriy Sergeyev found and fixed a multi interface flaw when using asynch
+ name resolves. It could get stuck in the wrong state.
+
+Gisle (29 August 2006)
+- Added support for other MS-DOS compilers (desides djgpp). All MS-DOS
+ compiler now uses the same config.dos file (renamed to config.h by
+ make). libcurl now builds fine using Watcom and Metaware's High-C
+ using the Watt-32 tcp/ip-stack.
+
+Daniel (29 August 2006)
+- David McCreedy added CURLOPT_SOCKOPTFUNCTION and CURLOPT_SOCKOPTDATA to
+ allow applications to set their own socket options.
+
+Daniel (25 August 2006)
+- Armel Asselin reported that the 'running_handles' counter wasn't updated
+ properly if you removed a "live" handle from a multi handle with
+ curl_multi_remove_handle().
+
+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.
+
+Daniel (19 August 2006)
+- Based on a patch by Armel Asselin, the FTP code no longer re-issues the TYPE
+ command on subsequent requests on a re-used connection unless it has to.
+
+- Armel Asselin fixed a crash in the FTP code when using SINGLECWD mode and
+ files in the root directory.
+
+- Andrew Biggs pointed out a "Expect: 100-continue" flaw where libcurl didn't
+ send the whole request at once, even though the Expect: header was disabled
+ by the application. An effect of this change is also that small (< 1024
+ bytes) POSTs are now always sent without Expect: header since we deem it
+ more costly to bother about that than the risk that we send the data in
+ vain.
+
+Daniel (9 August 2006)
+- Armel Asselin made the CURLOPT_PREQUOTE option work fine even when
+ CURLOPT_NOBODY is set true. PREQUOTE is then run roughly at the same place
+ in the command sequence as it would have run if there would've been a
+ transfer.
+
+Daniel (8 August 2006)
+- Fixed a flaw in the "Expect: 100-continue" treatment. If you did two POSTs
+ on a persistent connection and allowed the first to use that header, you
+ could not disable it for the second request.
+
+Daniel (7 August 2006)
+- Domenico Andreolfound a quick build error which happened because
+ src/config.h.in was not a proper duplcate of lib/config.h.in which it
+ should've been and this was due to the maketgz script not doing the cp
+ properly.
+
+Version 7.15.5 (7 August 2006)
+
+Daniel (2 August 2006)
+- Mark Lentczner fixed how libcurl was not properly doing chunked encoding
+ if the header "Transfer-Encoding: chunked" was set by the application.
+ http://curl.haxx.se/bug/view.cgi?id=1531838
+
+Daniel (1 August 2006)
+- Maciej Karpiuk fixed a crash that would occur if we passed Curl_strerror()
+ an unknown error number on glibc systems.
+ http://curl.haxx.se/bug/view.cgi?id=1532289
+
+Daniel (31 July 2006)
+- *ALERT* curl_multi_socket() and curl_multi_socket_all() got modified
+ prototypes: they both now provide the number of running handles back to the
+ calling function. It makes the functions resemble the good old
+ curl_multi_perform() more and provides a nice way to know when the multi
+ handle goes empty.
+
+ ALERT2: don't use the curl_multi_socket*() functionality in anything
+ production-like until I say it's somewhat settled, as I suspect there might
+ be some further API changes before I'm done...
+
+Daniel (28 July 2006)
+- Yves Lejeune fixed so that replacing Content-Type: when doing multipart
+ formposts work exactly the way you want it (and the way you'd assume it
+ works).
+
+Daniel (27 July 2006)
+- David McCreedy added --ftp-ssl-reqd which makes curl *require* SSL for both
+ control and data connection, as the existing --ftp-ssl option only requests
+ it.
+
+- [Hiper-related work] Added a function called curl_multi_assign() that will
+ set a private pointer added to the internal libcurl hash table for the
+ particular socket passed in to this function:
+
+ CURLMcode curl_multi_assign(CURLM *multi_handle,
+ curl_socket_t sockfd,
+ void *sockp);
+
+ 'sockp' being a custom pointer set by the application to be associated with
+ this socket. The socket has to be already existing and in-use by libcurl,
+ like having already called the callback telling about its existance.
+
+ The set hashp pointer will then be passed on to the callback in upcoming
+ calls when this same socket is used (in the brand new 'socketp' argument).
+
+Daniel (26 July 2006)
+- Dan Nelson added the CURLOPT_FTP_ALTERNATIVE_TO_USER libcurl option and curl
+ tool option named --ftp-alternative-to-user. It provides a mean to send a
+ particular command if the normal USER/PASS approach fails.
+
+- Michael Jerris added magic that builds lib/curllib.vcproj automatically for
+ newer MSVC.
+
+Daniel (25 July 2006)
+- Georg Horn made the transfer timeout error message include more details.
+
+Daniel (20 July 2006)
+- David McCreedy fixed a build error when building libcurl with HTTP disabled,
+ problem added with the curl_formget() patch.
+
+Daniel (17 July 2006)
+- Jari Sundell did some excellent research and bug tracking, figured out that
+ we did wrong and patched it: When nodes were removed from the splay tree,
+ and we didn't properly remove it from the splay tree when an easy handle was
+ removed from a multi stack and thus we could wrongly leave a node in the
+ splay tree pointing to (bad) memory.
+
+Daniel (14 July 2006)
+- David McCreedy fixed a flaw where the CRLF counter wasn't properly cleared
+ for FTP ASCII transfers.
+
+Daniel (8 July 2006)
+- Ates Goral pointed out that libcurl's cookie parser did case insensitive
+ string comparisons on the path which is incorrect and provided a patch that
+ fixes this. I edited test case 8 to include details that test for this.
+
+- Ingmar Runge provided a source snippet that caused a crash. The reason for
+ the crash was that libcurl internally was a bit confused about who owned the
+ DNS cache at all times so if you created an easy handle that uses a shared
+ DNS cache and added that to a multi handle it would crash. Now we keep more
+ careful internal track of exactly what kind of DNS cache each easy handle
+ uses: None, Private (allocated for and used only by this single handle),
+ Shared (points to a cache held by a shared object), Global (points to the
+ global cache) or Multi (points to the cache within the multi handle that is
+ automatically shared between all easy handles that are added with private
+ caches).
+
+Daniel (4 July 2006)
+- Toshiyuki Maezawa fixed a problem where you couldn't override the
+ Proxy-Connection: header when using a proxy and not doing CONNECT.
+
+Daniel (24 June 2006)
+- Michael Wallner added curl_formget(), which allows an application to extract
+ (serialise) a previously built formpost (as with curl_formadd()).
+
+Daniel (23 June 2006)
+- Arve Knudsen found a flaw in curl_multi_fdset() for systems where
+ curl_socket_t is unsigned (like Windows) that could cause it to wrongly
+ return a max fd of -1.
+
+Daniel (20 June 2006)
+- Peter Silva introduced CURLOPT_MAX_SEND_SPEED_LARGE and
+ CURLOPT_MAX_RECV_SPEED_LARGE that limit tha maximum rate libcurl is allowed
+ to send or receive data. This kind of adds the the command line tool's
+ option --limit-rate to the library.
+
+ The rate limiting logic in the curl app is now removed and is instead
+ provided by libcurl itself. Transfer rate limiting will now also work for -d
+ and -F, which it didn't before.
+
+Daniel (19 June 2006)
+- Made -K on a file that couldn't be read cause a warning to be displayed.
+
+Daniel (13 June 2006)
+- Dan Fandrich implemented --enable-hidden-symbols configure option to enable
+ -fvisibility=hidden on gcc >= 4.0. This reduces the size of the libcurl
+ binary and speeds up dynamic linking by hiding all the internal symbols from
+ the symbol table.
+
+Version 7.15.4 (12 June 2006)
+
+Daniel (8 June 2006)
+- Brian Dessent fixed the code for cygwin in three distinct ways:
+
+ The first modifies {lib,src}/setup.h to not include the winsock headers
+ under Cygwin. This fixes the reported build problem. Cygwin attempts as
+ much as possible to emulate a posix environment under Windows. This means
+ that WIN32 is *not* #defined and (to the extent possible) everything is done
+ as it would be on a *ix type system. Thus <sys/socket.h> is the proper
+ include, and even though winsock2.h is present, including it just introduces
+ a whole bunch of incompatible socket API stuff.
+
+ The second is a patch I've included in the Cygwin binary packages for a
+ while. It skips two unnecessary library checks (-lwinmm and -lgdi32). The
+ checks are innocuous and they do succeed, but they pollute LIBS with
+ unnecessary stuff which gets recorded as such in the libcurl.la file, which
+ brings them into the build of any libcurl-downstream. As far as I know
+ these libs are really only necessary for mingw, so alternatively they could
+ be designed to only run if $host matches *-*-mingw* but I took the safer
+ route of skipping them for *-*-cygwin*.
+
+ The third patch replaces all uses of the ancient and obsolete __CYGWIN32__
+ with __CYGWIN__. Ref: <http://cygwin.com/ml/cygwin/2003-09/msg01520.html>.
+
+Daniel (7 June 2006)
+- Mikael Sennerholm provided a patch that added NTLM2 session response support
+ to libcurl. The 21 NTLM test cases were again modified to comply...
+
+Daniel (27 May 2006)
+- Óscar Morales Vivó updated the libcurl.framework.make file.
+
+Daniel (26 May 2006)
+- Olaf Stüben fixed a bug that caused Digest authentication with md5-sess to
+ fail. When using the md5-sess, the result was not Md5 encoded and Base64
+ transformed.
+
+Daniel (25 May 2006)
+- Michael Wallner provided a patch that allows "SESS" to be set with
+ CURLOPT_COOKIELIST, which then makes all session cookies get cleared.
+
+Daniel (24 May 2006)
+- Tor Arntsen made test 271 run fine again since the TFTP path fix.
+
+Daniel (23 May 2006)
+- Martin Michlmayr filed debian bug report #367954, but the same error also
+ showed up in the autobuilds. It seems a rather long-since introduced shell
+ script flaw in the configure script suddenly was detected by the bash
+ version in Debian Unstable. It had previously passed undetected by all
+ shells used so far...
+
+- David McCreedy updated lib/config-tpf.h
+
+Daniel (11 May 2006)
+- Fixed the configure's check for old-style SSLeay headers since I fell over a
+ case with a duplicate file name (a krb4 implementation with an err.h
+ file). I converted the check to manually make sure three of the headers are
+ present before considering them fine.
+
+- David McCreedy provided a fix for CURLINFO_LASTSOCKET that does extended
+ checks on the to-be-returned socket to make sure it truly seems to be alive
+ and well. For SSL connection it (only) uses OpenSSL functions.
+
+Daniel (10 May 2006)
+- Fixed DICT in two aspects:
+
+ 1 - allow properly URL-escaped words, like using %20 for spaces
+
+ 2 - properly escape certain letters within a word to comply to the RFC2229
+
+Daniel (9 May 2006)
+- Andreas Ntaflos reported a bug in libcurl.m4: When configuring my GNU
+ autotools project, which optionally (default=yes) uses libcurl on a system
+ without a (usable) libcurl installation, but not specifying
+ `--without-libcurl', configure determines correctly that no libcurl is
+ available, however, the LIBCURL variable gets expanded to `LIBCURL = -lcurl'
+ in the resulting Makefiles.
+
+ David Shaw fixed the flaw.
+
+- Robson Braga Araujo fixed two problems in the recently added non-blocking SSL
+ connects. The state machine was not reset properly so that subsequent
+ connects using the same handle would fail, and there were two memory leaks.
+
+- Robson Braga Araujo fixed a memory leak when you added an easy handle to a
+ multi stack and that easy handle had already been used to do one or more
+ easy interface transfers, as then the code threw away the previously used
+ DNS cache without properly freeing it.
+
+Daniel (8 May 2006)
+- Dan Fandrich went over the TFTP code and he pointed out and fixed numerous
+ problems:
+
+ * The received file is corrupted when a packet is lost and retransmitted
+ (this is a serious problem!)
+
+ * Transmitting a file aborts if a block is lost and retransmitted
+
+ * Data is stored in the wrong location in the buffer for uploads, so uploads
+ always fail (I don't see how it could have ever worked, but it did on x86
+ at least)
+
+ * A number of calls are made to strerror instead of Curl_strerror, making
+ the code not thread safe
+
+ * There are references to errno instead of Curl_sockerrno(), causing
+ incorrect error messages on Windows
+
+ * The file name includes a leading / which violates RFC3617. Doing something
+ similar to ftp, where two slashes after the host name means an absolute
+ reference seems a reasonable extension to fix this.
+
+ * Failures in EBCDIC conversion are not propagated up to the caller but are
+ silently ignored
+
+- Fixed known bug #28. The TFTP code no longer assumes a packed struct and
+ thus works reliably on more platforms.
+
+Daniel (5 May 2006)
+- Roland Blom filed bug report #1481217
+ (http://curl.haxx.se/bug/view.cgi?id=1481217), with follow-ups by Michele
+ Bini and David Byron. libcurl previously wrongly used GetLastError() on
+ windows to get error details after socket-related function calls, when it
+ really should use WSAGetLastError() instead.
+
+ When changing to this, the former function Curl_ourerrno() is now instead
+ called Curl_sockerrno() as it is necessary to only use it to get errno from
+ socket-related functions as otherwise it won't work as intended on Windows.
+
+Daniel (4 May 2006)
+- Mark Eichin submitted bug report #1480821
+ (http://curl.haxx.se/bug/view.cgi?id=1480821) He found and identified a
+ problem with how libcurl dealt with GnuTLS and a case where gnutls returned
+ GNUTLS_E_AGAIN indicating it would block. It would then return an unexpected
+ return code, making Curl_ssl_send() confuse the upper layer - causing random
+ 28 bytes trash data to get inserted in the transfered stream.
+
+ The proper fix was to make the Curl_gtls_send() function return the proper
+ return codes that the callers would expect. The Curl_ossl_send() function
+ already did this.
+
+Daniel (2 May 2006)
+- Added a --checkfor option to curl-config to allow users to easier
+ write for example shell scripts that test for the presence of a
+ new-enough libcurl version. If --checkfor is given a version string
+ newer than what is currently installed, curl-config will return a
+ non-zero exit code and output a string about the unfulfilled
+ requirement.
+
+Daniel (26 April 2006)
+- David McCreedy brought initial line end conversions when doing FTP ASCII
+ transfers. They are done on non-windows systems and translate CRLF to LF.
+
+ I modified the 15 LIST-using test cases accordingly. The downside is that now
+ we'll have even more trouble to get the tests to run on Windows since they
+ should get CRLF newlines left intact which the *nix versions don't. I figure
+ the only sane thing to do is to add some kind of [newline] macro for the test
+ case files and have them expanded to the proper native line ending when the
+ test cases are run. This is however left to implement.
+
+Daniel (25 April 2006)
+- Paul Querna fixed libcurl to better deal with deflate content encoding
+ when the stream (wrongly) lacks a proper zlib header. This seems to be the
+ case on too many actual server implementations.
+
+Daniel (21 April 2006)
+- Ale Vesely fixed CURLOPT_INTERFACE when using a hostname.
+
+Daniel (19 April 2006)
+- Based on previous info from Tor Arntsen, I made configure detect the Intel
+ ICC compiler to add a compiler option for it, in order for configure to
+ properly be able to detect function prototypes.
+
+- Robson Braga Araujo provided a patch that makes libcurl less eager to close
+ the control connection when using FTP, for example when you remove an easy
+ handle from a multi stack.
+
+- Applied a patch by Ates Goral and Katie Wang that corrected my bad fix
+ attempt from April 10.
+
+Daniel (11 April 2006)
+- #1468330 (http://curl.haxx.se/bug/view.cgi?id=1468330) pointed out a bad
+ typecast in the curl tool leading to a crash with (64bit?) VS2005 (at least)
+ since the struct timeval field tv_sec is an int while time_t is 64bit.
+
+Daniel (10 April 2006)
+- Ates Goral found out that if you specified both CURLOPT_CONNECTTIMEOUT and
+ CURLOPT_TIMEOUT, the _longer_ time would wrongly be used for the SSL
+ connection time-out!
+
+- I merged my hiper patch (http://curl.haxx.se/libcurl/hiper/) into the main
+ sources. See the lib/README.multi_socket for implementation story with
+ details. Don't expect it to work fully yet. I don't intend to blow any
+ whistles or ring any bells about it until I'm more convinced it works at
+ least somewhat reliably.
+
+Daniel (7 April 2006)
+- David McCreedy's EBCDIC and TPF changes. Three new curl_easy_setopt()
+ options (callbacks) were added:
+
+ CONV_FROM_NETWORK_FUNCTION
+ CONV_TO_NETWORK_FUNCTION
+ CONV_FROM_UTF8_FUNCTION
+
+Daniel (5 April 2006)
+- Michele Bini modified the NTLM code to work for his "weird IIS case"
+ (http://curl.haxx.se/mail/lib-2006-02/0154.html) by adding the NTLM hash
+ function in addition to the LM one and making some other adjustments in the
+ order the different parts of the data block are sent in the Type-2 reply.
+ Inspiration for this work was taken from the Firefox NTLM implementation.
+
+ I edited the existing 21(!) NTLM test cases to run fine with these news. Due
+ to the fact that we now properly include the host name in the Type-2 message
+ the test cases now only compare parts of that chunk.
+
+Daniel (28 March 2006)
+- #1451929 (http://curl.haxx.se/bug/view.cgi?id=1451929) detailed a bug that
+ occurred when asking libcurl to follow HTTP redirects and the original URL
+ had more than one question mark (?). Added test case 276 to verify.
+
+Daniel (27 March 2006)
+- David Byron found a problem multiple -d options when libcurl was built with
+ --enable-debug, as then curl used free() on memory allocated both with
+ normal malloc() and with libcurl-provided functions, when the latter MUST be
+ freed with curl_free() in debug builds.
+
+Daniel (26 March 2006)
+- Tor Arntsen figured out that TFTP was broken on a lot of systems since we
+ called bind() with a too big argument in the 3rd parameter and at least
+ Tru64, AIX and IRIX seem to be very picky about it.
+
+Daniel (21 March 2006)
+- David McCreedy added CURLINFO_FTP_ENTRY_PATH.
+
+- Xavier Bouchoux made the SSL connection non-blocking for the multi interface
+ (when using OpenSSL).
+
+- Tor Arntsen fixed the AIX Toolbox RPM spec
+
+Daniel (20 March 2006)
+- David McCreedy fixed libcurl to no longer ignore AUTH failures and now it
+ reacts properly according to the CURLOPT_FTP_SSL setting.
+
+- Dan Fandrich fixed two TFTP problems: Fixed a bug whereby a received file
+ whose length was a multiple of 512 bytes could have random garbage
+ appended. Also, stop processing TFTP packets which are too short to be
+ legal.
+
+- Ilja van Sprundel reported a possible crash in the curl tool when using
+ "curl hostwithoutslash -d data -G"
+
+Version 7.15.3 (20 March 2006)
+
+Daniel (20 March 2006)
+- VULNERABILITY reported to us by Ulf Harnhammar.
+
+ libcurl uses the given file part of a TFTP URL in a manner that allows a
+ malicious user to overflow a heap-based memory buffer due to the lack of
+ boundary check.
+
+ This overflow happens if you pass in a URL with a TFTP protocol prefix
+ ("tftp://"), using a valid host and a path part that is longer than 512
+ bytes.
+
+ The affected flaw can be triggered by a redirect, if curl/libcurl is told to
+ follow redirects and an HTTP server points the client to a tftp URL with the
+ characteristics described above.
+
+ The Common Vulnerabilities and Exposures (CVE) project has assigned the name
+ CVE-2006-1061 to this issue.
+
+Daniel (16 March 2006)
+- Tor Arntsen provided a RPM spec file for AIX Toolbox, that now is included
+ in the release archive.
+
+Daniel (14 March 2006)
+- David McCreedy fixed:
+
+ a bad SSL error message when OpenSSL certificates are verified fine.
+
+ a missing return code assignment in the FTP code
+
+Daniel (7 March 2006)
+- Markus Koetter filed debian bug report #355715 which identified a problem
+ with the multi interface and multi-part formposts. The fix from February
+ 22nd could make the Curl_done() function get called twice on the same
+ connection and it was not designed for that and thus tried to call free() on
+ an already freed memory area!
+
+- Peter Heuchert made sure the CURLFTPSSL_CONTROL setting for CURLOPT_FTP_SSL
+ is used properly.
+
+Daniel (6 March 2006)
+- Lots of users on Windows have reported getting the "SSL: couldn't set
+ callback" error message so I've now made the setting of that callback not be
+ as critical as before. The function is only used for additional loggging/
+ trace anyway so a failure just means slightly less data. It should still be
+ able to proceed and connect fine to the server.
+
+Daniel (4 March 2006)
+- Thomas Klausner provided a patch written by Todd Vierling in bug report
+ #1442471 that fixes a build problem on Interix.
+
+Daniel (2 March 2006)
+- FTP upload without a file name part in the URL now causes
+ curl_easy_perform() to return CURLE_URL_MALFORMAT. Previously it allowed the
+ upload but named the file "(nil)" (without the quotes). Test case 524
+ verifies.
+
+- Added a check for getprotobyname in configure so that it'll be used, thanks
+ to Gisle Vanem's change the other day.
+
+Daniel (28 February 2006)
+- Dan Fandrich prevented curl from getting stuck in an endless loop in case we
+ are out of file handles very early in curl's code where it makes sure that
+ 0, 1 and 2 aren't gonna be used by the lib for transfers.
+
+Daniel (27 February 2006)
+- Marty Kuhrt pointed out that there were two VMS-specific files missing in
+ the release archive.
+
+Version 7.15.2 (27 February 2006)
+
+Daniel (22 February 2006)
+- Lots of work and analysis by "xbx___" in bug #1431750
+ (http://curl.haxx.se/bug/view.cgi?id=1431750) helped me identify and fix two
+ different but related bugs:
+
+ 1) Removing an easy handle from a multi handle before the transfer is done
+ could leave a connection in the connection cache for that handle that is
+ in a state that isn't suitable for re-use. A subsequent re-use could then
+ read from a NULL pointer and segfault.
+
+ 2) When an easy handle was removed from the multi handle, there could be an
+ outstanding c-ares DNS name resolve request. When the response arrived,
+ it caused havoc since the connection struct it "belonged" to could've
+ been freed already.
+
+ Now Curl_done() is called when an easy handle is removed from a multi handle
+ pre-maturely (that is, before the transfer was complteted). Curl_done() also
+ makes sure to cancel all (if any) outstanding c-ares requests.
+
+Daniel (21 February 2006)
+- Peter Su added support for SOCKS4 proxies. Enable this by setting the proxy
+ type to the already provided type CURLPROXY_SOCKS4.
+
+ I added a --socks4 option that works like the current --socks5 option but
+ instead use the socks4 protocol.
+
+Daniel (20 February 2006)
+- Shmulik Regev fixed an issue with multi-pass authentication and compressed
+ content when libcurl didn't honor the internal ignorebody flag.
+
+Daniel (18 February 2006)
+- Ulf Härnhammar fixed a format string (printf style) problem in the Negotiate
+ code. It should however not be the cause of any troubles. He also fixed a
+ few similar problems in the HTTP test server code.
+
+Daniel (17 February 2006)
+- Shmulik Regev provided a fix for the DNS cache when using short life times,
+ as previously it could be holding on to old cached entries longer than
+ requested.
+
+Daniel (11 February 2006)
+- Karl Moerder added the CURLOPT_CONNECT_ONLY and CURLINFO_LASTSOCKET options
+ that an app can use to let libcurl only connect to a remote host and then
+ extract the socket from libcurl. libcurl will then not attempt to do any
+ transfer at all after the connect is done.
+
+- Kent Boortz improved the configure check for GnuTLS to properly set LIBS
+ instead of LDFLAGS.
+
+Daniel (8 February 2006)
+- Philippe Vaucher provided a brilliant piece of test code that show a problem
+ with re-used FTP connections. If the second request on the same connection
+ was set not to fetch a "body", libcurl could get confused and consider it an
+ attempt to use a dead connection and would go acting mighty strange.
+
+Daniel (2 February 2006)
+- Make --limit-rate [num] mean bytes. It used to be that but it broke in my
+ change done in November 2005.
+
+Daniel (30 January 2006)
+- Added CURLOPT_LOCALPORT and CURLOPT_LOCALPORTRANGE to libcurl. Set with the
+ curl tool with --local-port. Plain and simply set the range of ports to bind
+ the local end of connections to. Implemented on to popular demand.
+
+- Based on an error report by Philippe Vaucher, we no longer count a retried
+ connection setup as a follow-redirect. It turns out 1) this fails when a FTP
+ connection is re-setup and 2) it does make the max-redirs counter behave
+ wrong.
+
+Daniel (24 January 2006)
+- Michal Marek provided a patch for FTP that makes libcurl continue to try
+ PASV even after EPSV returned a positive response code, if libcurl failed to
+ connect to the port number the EPSV response said. Obviously some people are
+ going through protocol-sensitive firewalls (or similar) that don't
+ understand EPSV and then they don't allow the second connection unless PASV
+ was used. This also called for a minor fix of test case 238.
+
+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!
+
+ 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
+ reveal anyone else that could either. The code that sends EPRT and PORT is
+ now also a lot simpler than before (IMHO).
+
+Daniel (19 January 2006)
+- Jon Turner pointed out that doing -P [hostname] (CURLOPT_FTPPORT) with curl
+ (built IPv4-only) didn't work.
+
+Daniel (18 January 2006)
+- As reported in bug #1408742 (http://curl.haxx.se/bug/view.cgi?id=1408742),
+ the configure script complained about a missing "missing" script if you ran
+ configure within a path whose name included one or more spaces. This is due
+ to a flaw in automake (1.9.6 and earlier). I've now worked around it by
+ including an "overloaded" version of the AM_MISSING_HAS_RUN script that'll
+ be used instead of the one automake ships with. This kludge needs to be
+ removed once we get an automake version with this problem corrected.
+ Possibly we'll then need to convert this into a kludge depending on what
+ automake version that is used and that is gonna be painful and I don't even
+ want to think about that now...!
+
+Daniel (17 January 2006)
+- David Shaw: Here is the latest libcurl.m4 autoconf tests. It is updated with
+ the latest features and protocols that libcurl supports and has a minor fix
+ to better deal with the obscure case where someone has more than one libcurl
+ installed at the same time.
+
+Daniel (16 January 2006)
+- David Shaw finally removed all traces of Gopher and we are now officially
+ not supporting it. It hasn't been functioning for years anyway, so this is
+ just finally stating what already was true. And a cleanup at the same time.
+
+- Bryan Henderson turned the 'initialized' variable for curl_global_init()
+ into a counter, and thus you can now do multiple curl_global_init() and you
+ are then supposed to do the same amount of calls to curl_global_cleanup().
+ Bryan has also updated the docs accordingly.
+
+Daniel (13 January 2006)
+- Andrew Benham fixed a race condition in the test suite that could cause the
+ test script to kill all processes in the current process group!
+
+Daniel (12 January 2006)
+- Michael Jahn:
+
+ Fixed FTP_SKIP_PASV_IP and FTP_USE_EPSV to "do right" when used on FTP thru
+ HTTP proxy.
+
+ Fixed PROXYTUNNEL to work fine when you do ftp through a proxy. It would
+ previously overwrite internal memory and cause unpredicted behaviour!
+
+Daniel (11 January 2006)
+- I decided to document the "secret option" here now, as I've received *NO*
+ feedback at all on my mailing list requests from November 2005:
+
+ I'm looking for feedback and comments. I added some experimental code the
+ other day, that allows a libcurl user to select what method libcurl should
+ use to reach a file on a FTP(S) server.
+
+ This functionality is available in CVS code and in recent daily snapshots.
+
+ Let me explain...
+
+ The current name for the option is CURLOPT_FTP_FILEMETHOD (--ftp-method for
+ the command line tool) and you set it to a long (there are currenly no
+ defines for the argument values, just plain numericals). You can set three
+ different "methods" that do this:
+
+ 1 multicwd - like today, curl will do a single CWD operation for each path
+ part in the given URL. For deep hierarchies this means very many
+ commands. This is how RFC1738 says it should be done. This is the
+ default.
+
+ 2 nocwd - no CWD at all is done, curl will do SIZE, RETR, STOR etc and give
+ a full path to the server.
+
+ 3 singlecwd - make one CWD with the full target directory and then operate
+ on the file "normally".
+
+ (With the command line tool you do --ftp-method [METHOD], where [METHOD] is
+ one of "multicwd", "nocwd" or "singlecwd".)
+
+ What feedback I'm interested in:
+
+ 1 - Do they work at all? Do you find servers where one of these don't work?
+
+ 2 - What would proper names for the option and its arguments be, if we
+ consider this feature good enough to get included and documented in
+ upcoming releases?
+
+ 3 - Should we make libcurl able to "walk through" these options in case of
+ (path related) failures, or should it fail and let the user redo any
+ possible retries?
+
+ (This option is not documented in any man page just yet since I'm not sure
+ these names will be used or if the functionality will end up exactly like
+ this. And for the same reasons we have no test cases for these yet.)
+
+Daniel (10 January 2006)
+- When using a bad path over FTP, as in when libcurl couldn't CWD into all
+ given subdirs, libcurl would still "remember" the full path as if it is the
+ current directory libcurl is in so that the next curl_easy_perform() would
+ get really confused if it tried the same path again - as it would not issue
+ any CWD commands at all, assuming it is already in the "proper" dir.
+
+ Starting now, a failed CWD command sets a flag that prevents the path to be
+ "remembered" after returning.
+
+Daniel (7 January 2006)
+- Michael Jahn fixed so that the second CONNECT when doing FTP over a HTTP
+ proxy actually used a new connection and not sent the second request on the
+ first socket!
+
+Daniel (6 January 2006)
+- Alexander Lazic made the buildconf run the buildconf in the ares dir if that
+ is present instead of trying to mimic that script in curl's buildconf
+ script.
+
+Daniel (3 January 2006)
+- Andres Garcia made the TFTP test server build with mingw.
+Daniel (16 December 2005)
+- Jean Jacques Drouin pointed out that you could only have a user name or
+ password of 127 bytes or less embedded in a URL, where actually the code
+ uses a 255 byte buffer for it! Modified now to use the full buffer size.
+
+Daniel (12 December 2005)
+- Dov Murik corrected the HTTP_ONLY define to disable the TFTP support properly
+
+Version 7.15.1 (7 December 2005)
+
+Daniel (6 December 2005)
+- Full text here: http://curl.haxx.se/docs/adv_20051207.html Pointed out by
+ Stefan Esser.
+
+ VULNERABILITY
+
+ libcurl's URL parser function can overflow a malloced buffer in two ways, if
+ given a too long URL.
+
+ These overflows happen if you
+
+ 1 - pass in a URL with no protocol (like "http://") prefix, using no slash
+ and the string is 256 bytes or longer. This leads to a single zero byte
+ overflow of the malloced buffer.
+
+ 2 - pass in a URL with only a question mark as separator (no slash) between
+ the host and the query part of the URL. This leads to a single zero byte
+ overflow of the malloced buffer.
+
+ Both overflows can be made with the same input string, leading to two single
+ zero byte overwrites.
+
+ The affected flaw cannot be triggered by a redirect, but the long URL must
+ be passed in "directly" to libcurl. It makes this a "local" problem. Of
+ course, lots of programs may still pass in user-provided URLs to libcurl
+ without doing much syntax checking of their own, allowing a user to exploit
+ this vulnerability.
+
+ There is no known exploit at the time of this writing.
+
+
+Daniel (2 December 2005)
+- Jamie Newton pointed out that libcurl's file:// code would close() a zero
+ file descriptor if given a non-existing file.
+
+Daniel (24 November 2005)
+- Doug Kaufman provided a set of patches to make curl build fine on DJGPP
+ again using configure.
+
+- Yang Tse provided a whole series of patches to clear up compiler warnings on
+ MSVC 6.
+
+Daniel (17 November 2005)
+- I extended a patch from David Shaw to make libcurl _always_ provide an error
+ string in the given error buffer to address the flaw mention on 21 sep 2005.
+
+Daniel (16 November 2005)
+- Applied Albert Chin's patch that makes the libcurl.pc pkgconfig file get
+ installed on 'make install' time.
+
+Daniel (14 November 2005)
+- Quagmire reported that he needed to raise a NTLM buffer for SSPI to work
+ properly for a case, and so we did. We raised it even for non-SSPI builds
+ but it should not do any harm. http://curl.haxx.se/bug/view.cgi?id=1356715
+
+- Jan Kunder's debian bug report
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338680 identified a weird
+ error message for when you try to upload a file and the requested directory
+ doesn't exist on the target server.
+
+- Yang Tse fixed compiler warnings in lib/ssluse.c with OpenSSL 0.9.8 and in
+ lib/memdebug.h that showed up in his msvc builds.
+
+Daniel (13 November 2005)
+- Debian bug report 338681 by Jan Kunder: make curl better detect and report
+ bad limit-rate units:
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338681 Now curl will return
+ error if a bad unit is used.
+
+- Thanks to this nice summary of poll() implementations:
+ http://www.greenend.org.uk/rjk/2001/06/poll.html and further tests by Eugene
+ Kotlyarov, we now know that cygwin's poll returns only POLLHUP on remote
+ connectin closure so we check for that case (too) and re-enable poll for
+ cygwin builds.
+
+Daniel (12 November 2005)
+- Eugene Kotlyarov found out that cygwin's poll() function isn't doing things
+ right: http://curl.haxx.se/mail/archive-2005-11/0045.html so we now disable
+ poll() and use select() on cygwin too (we already do the same choice on Mac
+ OS X)
+
+- Dima Barsky patched problem #1348930: the GnuTLS code completely ignored
+ client certificates! (http://curl.haxx.se/bug/view.cgi?id=1348930).
+
+Daniel (10 November 2005)
+- David Lang fixed IPv6 support for TFTP!
+
+- Introducing range stepping to the curl globbing support. Now you can specify
+ step counter by adding :[num] within the brackets when specifying a range:
+
+ [1-100:10]
+ [a-z:2]
+
+ If no step counter is set, it defaults to 1 as before:
+
+ [1-100]
+ [d-h]
+
+Daniel (8 November 2005)
+- Removed the use of AI_CANONNAME in the IPv6-enabled resolver functions since
+ we really have no use for reverse lookups of the address.
+
+ I truly hope these are the last reverse lookups we had lingering in the
+ code!
+
+- Dmitry Bartsevich discovered some issues in compatibilty of SSPI-enabled
+ version of libcurl with different Windows versions. Current version of
+ libcurl imports SSPI functions from secur32.dll. However, under Windows NT
+ 4.0 these functions are located in security.dll, under Windows 9x - in
+ secur32.dll and Windows 2000 and XP contains both these DLLs (security.dll
+ just forwards calls to secur32.dll).
+
+ Dmitry's patch loads proper library dynamically depending on Windows
+ version. Function InitSecurityInterface() is used to obtain pointers to all
+ of SSPI function in one structure.
+
+Daniel (31 October 2005)
+- Vilmos Nebehaj improved libcurl's LDAP abilities:
+
+ The LDAP code in libcurl can't handle LDAP servers of LDAPv3 nor binary
+ attributes in LDAP objects. So, I made a quick patch to address these
+ problems.
+
+ The solution is simple: if we connect to an LDAP server, first try LDAPv3
+ (which is the preferred protocol as of now) and then fall back to LDAPv2.
+ In case of binary attributes, we first convert them to base64, just like the
+ openldap client does. It uses ldap_get_values_len() instead of
+ ldap_get_values() to be able to retrieve binary attributes correctly. I
+ defined the necessary LDAP macros in lib/ldap.c to be able to compile
+ libcurl without the presence of libldap
+
+Daniel (27 October 2005)
+- Nis Jorgensen filed bug report #1338648
+ (http://curl.haxx.se/bug/view.cgi?id=1338648) which really is more of a
+ feature request, but anyway. It pointed out that --max-redirs did not allow
+ it to be set to 0, which then would return an error code on the first
+ Location: found. Based on Nis' patch, now libcurl supports CURLOPT_MAXREDIRS
+ set to 0, or -1 for infinity. Added test case 274 to verify.
+
+- tommink[at]post.pl reported in bug report #1337723
+ (http://curl.haxx.se/bug/view.cgi?id=1337723) that curl could not upload
+ binary data from stdin on Windows if the data contained control-Z (hex 1a)
+ since that is treated as end-of-file when read in text mode. Gisle Vanem
+ pointed out the fix, and I made both -T and --data-binary take advantage of
+ it.
+
+- Jaz Fresh pointed out that if you used "-r [number]" as was wrongly described
+ in the man page, curl would send an invalid HTTP Range: header. The correct
+ way would be to use "-r [number]-" or even "-r -[number]". Starting now,
+ curl will warn if this is discovered, and automatically append a dash to the
+ range before passing it to libcurl.
+
+Daniel (25 October 2005)
+- Amol Pattekar reported a bug with great detail and a fine example in bug
+ #1326306 (http://curl.haxx.se/bug/view.cgi?id=1326306). When using the multi
+ interface and connecting to a host with multiple IP addresses, and one of
+ the addresses fails to connect (the server must exist and respond, just not
+ accept connections) libcurl leaks a socket descriptor. Thanks to the fine
+ report, I could find and fix this.
+
+Daniel (22 October 2005)
+- Dima Barsky reported a problem with GnuTLS-enabled libcurl in bug report
+ #1334338 (http://curl.haxx.se/bug/view.cgi?id=1334338). When reading an SSL
+ stream from a server and the server requests a "rehandshake", the current
+ code simply returns this as an error. I have no good way to test this, but
+ I've added a crude attempt of dealing with this situation slightly better -
+ it makes a blocking handshake if this happens. Done like this because fixing
+ this the "proper" way (that would handshake asynchronously) will require
+ quite some work and I really need a good way to test this to do such a
+ change.
+
+Daniel (21 October 2005)
+- "Ofer" reported a problem when libcurl re-used a connection and failed to do
+ it, it could then accidentally actually crash. Presumably, this concerns FTP
+ connections. http://curl.haxx.se/bug/view.cgi?id=1330310
+
+- Temprimus improved the MSVC makefile so that the static debug SSL libs are
+ linked to the executable and not to the libcurld.lib
+ http://curl.haxx.se/bug/view.cgi?id=1326676
+
+- Bradford Bruce made the windows resolver code properly return
+ CURLE_COULDNT_RESOLVE_PROXY and CURLE_COULDNT_RESOLVE_HOST on resolving
+ errors (as documented).
+
+Daniel (20 October 2005)
+- Dave Dribin made libcurl understand and handle cases when the server
+ (wrongly) sends *two* WWW-Authenticate headers for Digest. While this should
+ never happen in a sane world, libcurl previously got into an infinite loop
+ when this occurred. Dave added test 273 to verify this.
+
+- Temprimus improved the MSVC makefile: "makes a build option available so if
+ you set rtlibcfg=static for the make, then it would build with /MT. The
+ default behaviour is /MD (the original)."
+ http://curl.haxx.se/bug/view.cgi?id=1326665
+
+Daniel (14 October 2005)
+- Reverted the LIBCURL_VERSION_NUM change from October 6. As Dave Dribin
+ reported, the define is used by the configure script and is assumed to use
+ the 0xYYXXZZ format. This made "curl-config --vernum" fail in the 7.15.0
+ release version.
+
+Version 7.15.0 (13 October 2005)
+
+Daniel (12 October 2005)
+- Michael Sutton of iDEFENSE reported and I fixed a securitfy flaw in the NTLM
+ code that would overflow a buffer if given a too long user name or domain
+ name. This would happen if you enable NTLM authentication and either
+
+ A - pass in a user name and domain name to libcurl that together are longer
+ than 192 bytes
+
+ B - allow (lib)curl to follow HTTP "redirects" (Location: and the
+ appropriate HTTP 30x response code) and the new URL contains a URL with
+ a user name and domain name that together are longer than 192 bytes
+
+ See http://curl.haxx.se/docs/security.html for further details and updates
+
+Daniel (5 October 2005)
+- Darryl House reported a problem with using -z to download files from FTP.
+ It turned out that if the given time stamp was exact the same as the remote
+ time stamp, the file would still wrongly be downloaded. Added test case 272
+ to verify.
+
+Daniel (4 October 2005)
+- Domenico Andreoli fixed a man page malformat and removed odd (0xa0) bytes
+ from the configure script.
+
+- Michael Wallner reported that the date parser had wrong offset stored for
+ the MEST and CEST time zones.
+
+Daniel (27 September 2005)
+- David Yan filed bug #1299181 (http://curl.haxx.se/bug/view.cgi?id=1299181)
+ that identified a silly problem with Content-Range: headers with the 'bytes'
+ keyword written in a different case than all lowercase! It would cause a
+ segfault!
+
+- TJ Saunders of the proftpd project identified and pointed out problems with
+ the modified FTPS negotiation change of August 19 2005. Thus, we revert the
+ change back to pre-7.14.1 status.
+
+Daniel (21 September 2005)
+- Fixed "cut off" sentence in the libcurl-tutorial man page:
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=329305
+
+- Clarified in the curl_easy_setopt man page what the default
+ CURLOPT_WRITEFUNCTION and CURLOPT_WRITEDATA mean:
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=329311
+
+- Clarified in the curl_easy_setopt man page that CURLOPT_ERRORBUFFER
+ sometimes doesn't fill in the buffer even though it is supposed to:
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=329313
+
+- When CURLE_URL_MALFORMAT is returned due to a missing URL, it now has an
+ error string set.
+
+Daniel (19 September 2005)
+- Dmitry Bartsevich made the SSPI support work on Windows 9x as well.
+
+Daniel (15 September 2005)
+- Added a TFTP server to the test suite and made the test suite capable of
+ using it.
+
+Daniel (7 September 2005)
+- Ben Madsen's detailed reports that funnily enough only occurred with certain
+ glibc versions turned out to be curl using an already closed file handle
+ during certain conditions (like when saving FTP server "headers").
+
+- Scott Davis helped me track down a problem in the test HTTP server that made
+ test case 56 wrongly fail at times. It turned out it was due to the server
+ finding the end of a chunked-encoded POST too early.
+
+Daniel (6 September 2005)
+- Now curl warns if an unknown variable is used in the -w/--writeout argument.
+
+Daniel (4 September 2005)
+- I applied Nicolas François' man page patch he posted to the Debian bug
+ tracker. It corrected two lines that started with apostrophes, which isn't
+ legal nroff format. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=326511
+
+- Added --ftp-skip-pasv-ip to the command line tool, that sets the new
+ CURLOPT_FTP_SKIP_PASV_IP option. It makes libcurl re-use the control
+ connection's IP address when setting up the data connection instead of
+ extractting the IP address from the PASV response. It has turned out this
+ feature is frequently needed by people to circumvent silly servers and silly
+ firewalls, especially when FTPS is used and the PASV command-response is
+ sent encrtyped.
+
+ Sponsored by CU*Answers
+
+Daniel (1 September 2005)
+- John Kelly added TFTP support to libcurl. A bunch of new error codes was
+ added. TODO: add them to docs. add TFTP server to test suite. add TFTP to
+ list of protocols whereever those are mentioned.
+
+Version 7.14.1 (1 September 2005)
+
+Daniel (29 August 2005)
+- Kevin Lussier pointed out a problem with curllib.dsp and how to fix it.
+
+- Igor Polyakov fixed a rather nasty problem with the threaded name resolver
+ for Windows, that could lead to an Access Violation when the multi interface
+ was used due to an issue with how the resolver thread was and was not
+ terminated.
+
+- Simon Josefsson brought a patch that allows curl to get built to use GNU GSS
+ instead of MIT/Heimdal for GSS capabilities.
+
+Daniel (24 August 2005)
+- Toby Peterson added CURLOPT_IGNORE_CONTENT_LENGTH to the library, accessible
+ from the command line tool with --ignore-content-length. This will make it
+ easier to download files from Apache 1.x (and similar) servers that are
+ still having problems serving files larger than 2 or 4 GB. When this option
+ is enabled, curl will simply have to wait for the server to close the
+ connection to signal end of transfer. I wrote test case 269 that runs a
+ simple test to verify that this works.
+
+- (Trying hard to exclude emotions now.) valgrind version 3 suddenly renamed
+ the --logfile command line option to --log-file, and thus the test script
+ valgrind autodetection now has yet another version check to do and then it
+ alters the valgrind command line accordingly.
+
+- Fixed CA cert verification using GnuTLS with the default bundle, which
+ previously failed due to GnuTLS not allowing x509 v1 CA certs by default.
+ Ralph Mitchell reported.
+
+Daniel (19 August 2005)
+- Norbert Novotny had problems with FTPS and he helped me work out a patch
+ that made curl run fine in his end. The key was to make sure we do the
+ SSL/TLS negotiation immediately after the TCP connect is done and not after
+ a few other commands have been sent like we did previously. I don't consider
+ this change necessary to obey the standards, I think this server is pickier
+ than what the specs allow it to be, but I can't see how this modified
+ libcurl code can add any problems to those who are interpreting the
+ standards more liberally.
+
+Daniel (17 August 2005)
+- Jeff Pohlmeyer found out that if you ask libcurl to load a cookiefile (with
+ CURLOPT_COOKIEFILE), add a cookie (with CURLOPT_COOKIELIST), tell it to
+ write the result to a given cookie jar and then never actually call
+ curl_easy_perform() - the given file(s) to read was never read but the
+ output file was written and thus it caused a "funny" result.
+
+- While doing some tests for the bug above, I noticed that Firefox generates
+ large numbers (for the expire time) in the cookies.txt file and libcurl
+ didn't treat them properly. Now it does.
+
+Daniel (15 August 2005)
+- Added more verbose "warning" messages to the curl client for cases where it
+ fails to open/read files etc to help users diagnose why it doesn't do what
+ you'd expect it to. Converted lots of old messages to use the new generic
+ function I wrote for this purpose.
+
+Daniel (13 August 2005)
+- James Bursa identified a libcurl HTTP bug and a good way to repeat it. If a
+ site responds with bad HTTP response that doesn't contain any header at all,
+ only a response body, and the write callback returns 0 to abort the
+ transfer, it didn't have any real effect but the write callback would be
+ called once more anyway.
+
+Daniel (12 August 2005)
+- Based on Richard Clayton's reports, I found out that using curl -d @filename
+ when 'filename' was not possible to access made curl use a GET request
+ instead.
+
+- The time condition illegal syntax warning is now inhibited if -s is used.
+
+Daniel (10 August 2005)
+- Mario Schroeder found out that one of the debug callbacks calls that regards
+ SSL data with the CURLINFO_TEXT type claimed that the data was one byte
+ larger than it actually is, thus falsely telling the application that the
+ terminating zero was part of the data.
+
+Daniel (9 August 2005)
+- Christopher R. Palmer fixed the offsets used for date parsings when the time
+ zone name of a daylight savings time was used. For example, PDT vs PDS. This
+ flaw was introduced with the new date parser (11 sep 2004 - 7.12.2).
+ Fortunately, no web server or cookie string etc should be using such time
+ zone names thus limiting the effect of this bug.
+
+Daniel (8 August 2005)
+- Jon Grubbs filed bug report #1249962
+ (http://curl.haxx.se/bug/view.cgi?id=1249962) which identified a problem
+ with NTLM on a HTTP proxy if an FTP URL was given. libcurl now properly
+ switches to pure HTTP internally when an HTTP proxy is used, even for FTP
+ URLs. The problem would also occur with other multi-pass auth methods.
+
+Daniel (7 August 2005)
+- When curl is built with GnuTLS, curl-config didn't include "SSL" when
+ --features was used.
+
+Daniel (28 July 2005)
+- If any of the options CURLOPT_HTTPGET, CURLOPT_POST and CURLOPT_HTTPPOST is
+ set to 1, CURLOPT_NOBODY will now automatically be set to 0.
+
+Daniel (27 July 2005)
+- Dan Fandrich changes over the last week: fixed numerous minor configure
+ option parsing flaws: --without-gnutls, --without-spnego --without-gssapi
+ and --without-krb4. Spellfixed several error messages.
+
+- Peteris Krumins added CURLOPT_COOKIELIST and CURLINFO_COOKIELIST, which is a
+ simple interface to extracting and setting cookies in libcurl's internal
+ "cookie jar". See the new cookie_interface.c example code.
+
+Daniel (13 July 2005)
+- Diego Casorran provided patches to make curl build fine on Amiga again.
+
+Daniel (12 July 2005)
+- Adrian Schuur added trailer support in the chunked encoding stream. The
+ trailer is then sent to the normal header callback/stream. I wrote up test
+ case 266 to verify the basic functionality. Do note that test case 34
+ contains a flawed chunked encoding stream that still works the same.
+
+Daniel (5 July 2005)
+- Gisle Vanem came up with a nice little work-around for bug #1230118
+ (http://curl.haxx.se/bug/view.cgi?id=1230118). It seems the Windows (MSVC)
+ libc time functions may return data one hour off if TZ is not set and
+ automatic DST adjustment is enabled. This made curl_getdate() return wrong
+ value, and it also concerned internal cookie expirations etc.
+
+Daniel (4 July 2005)
+- Andrew Bushnell provided enough info for me to tell that we badly needed to
+ fix the CONNECT authentication code with multi-pass auth methods (such as
+ NTLM) as it didn't previously properly ignore response-bodies - in fact it
+ stopped reading after all response headers had been received. This could
+ lead to libcurl sending the next request and reading the body from the first
+ request as response to the second request. (I also renamed the function,
+ which wasn't strictly necessary but...)
+
+ The best fix would to once and for all make the CONNECT code use the
+ ordinary request sending/receiving code, treating it as any ordinary request
+ instead of the special-purpose function we have now. It should make it
+ better for multi-interface too. And possibly lead to less code...
+
+ Added test case 265 for this. It doesn't work as a _really_ good test case
+ since the test proxy is too stupid, but the test case helps when running the
+ debugger to verify.
+
+Daniel (30 June 2005)
+- Dan Fandrich improved the configure script's ability to figure out what kind
+ of strerror_r() API that is used when cross-compiling. If __GLIB__ is
+ defined, it assumes the glibc API. If not, it issues a notice as before that
+ the user needs to manually edit lib/config.h for this.
+
+Daniel (23 June 2005)
+- David Shaw's fix that unifies proxy string treatment so that a proxy given
+ with CURLOPT_PROXY can use a http:// prefix and user + password. The user
+ and password fields are now also URL decoded properly. Test case 264 added
+ to verify.
+
+Daniel (22 June 2005)
+- David Shaw updated libcurl.m4
+
+Daniel (14 June 2005)
+- Gisle Vanem fixed a potential thread handle leak. Bug report #1216500
+ (http://curl.haxx.se/bug/view.cgi?id=1216500). Comment in
+ http://curl.haxx.se/mail/lib-2005-06/0059.html
+
+Daniel (13 June 2005)
+- Made buildconf run libtoolize in the ares dir too (inspired by Tupone's
+ reverted patch).
+
+Daniel (9 June 2005)
+- Incorporated Tupone's findtool fix in buildconf (slightly edited)
+
+- Incorporated Tupone's head -n fix in buildconf.
+
+Daniel (8 June 2005)
+- Reverted Tupone's patch again, it broke numerous autobuilds. Let's apply it
+ in pieces, one by one and see what we need to adjust to work all over.
+
+Daniel (6 June 2005)
+- Tupone Alfredo fixed three problems in buildconf:
+
+ 1) findtool does look per tool in PATH and think ./perl is the perl
+ executable, while is just a local directory (I have . in the PATH)
+
+ 2) I got several warning for head -1 deprecated in favour of head -n 1
+
+ 3) ares directory is missing some file (missing is missing :-) ) because
+ automake and friends is not run.
+
+Daniel (3 June 2005)
+- Added docs/libcurl/getinfo-times, based on feedback from 'Edi':
+ http://curl.haxx.se/feedback/display.cgi?id=11178325798299&support=yes
+
+- Andres Garcia provided yet another text mode patch for several test cases so
+ that they do text comparisions better on Windows (newline-wise).
+
+Daniel (1 June 2005)
+- The configure check for c-ares now adds the cares lib before the other libs,
+ to make it build fine with mingw. Inspired by Tupone Alfredo's bug report
+ and patch: http://curl.haxx.se/bug/view.cgi?id=1212940
+
+Daniel (31 May 2005)
+- Todd Kulesza reported a flaw in the proxy option, since a numerical IPv6
+ address was not possible to use. It is now, but requires it written
+ RFC2732-style, within brackets - which incidently is how you enter numerical
+ IPv6 addresses in URLs. Test case 263 added to verify.
+
+Daniel (30 May 2005)
+- Eric Cooper reported about a problem with HTTP servers that responds with
+ binary zeroes within the headers. They confused libcurl to do wrong so the
+ downloaded headers become incomplete. The fix is now verified with test case
+ 262. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=310948
+
+Daniel (25 May 2005)
+- Fixed problems with the test suite, and in particular the FTP test cases
+ since it previously was failing every now and then in a nonsense manner.
+
+- --trace-time now outputs the full microsecond, all 6 digits.
+
+Daniel (24 May 2005)
+- Andres Garcia provided a text mode patch for several test cases so that they
+ do text comparisions better on Windows (newline-wise).
+
+- Any 2xx response (and not just 200) is now considered a fine response to
+ TYPE, as some servers obviously sends a 226 there. Added test case 261 to
+ verify. Based on a question/report by Georg Wicherski.
+
+Daniel (20 May 2005)
+- Improved runtests.pl to allow stdout tests to be mode=text as well, just
+ as file comparisons already supports. Added this info to the FILEFORMAT
+ docs.
+
+Daniel (18 May 2005)
+- John McGowan identified a problem in bug report #1204435
+ (http://curl.haxx.se/bug/view.cgi?id=1204435) with malformed URLs like
+ "http://somehost?data" as it added a slash too much in the request ("GET
+ /?data/"...). Added test case 260 to verify.
+
+- The configure check for strerror_r() failed to detect the proper API at
+ times, like on HP-UX 10.20. Then lib/strerror.c badly assumed the glibc
+ version if the posix define wasn't set (since it _had_ found a strerror_r).
+
+Daniel (16 May 2005)
+- The gmtime_r() function in HP-UX 10.20 is broken. About 13 test cases fail
+ due to this. There's now a configure check that attempts to detect the bad
+ function and not use it on such systems.
+
+Version 7.14.0 (16 May 2005)
+
+Daniel (13 May 2005)
+- Grigory Entin reported that curl's configure detects a fine poll() for Mac
+ OS X 10.4 (while 10.3 or later detected a "bad" one), but the executable
+ doesn't work as good as if built without poll(). I've adjusted the configure
+ to always skip the fine-poll() test on Mac OS X (darwin).
+
+Daniel (12 May 2005)
+- When doing a second request (after a disconnect) using the same easy handle,
+ over a proxy that uses NTLM authentication, libcurl failed to use NTLM again
+ properly (the auth method was accidentally reset to the same as had been set
+ for host auth, which defaults to Basic). Bug report #1200661
+ (http://curl.haxx.se/bug/view.cgi?id=1200661) identified the the problem and
+ the fix.
+
+- If -z/--time-cond is used with an invalid date syntax, this is no longer
+ silently discarded. Instead a proper warning message is diplayed that
+ informs about it. But it still continues without the condition.
+
+Version 7.14.0-pre2 (11 May 2005)
+
+Daniel (11 May 2005)
+- Starting now, libcurl sends a little different set of headers in its default
+ HTTP requests:
+
+ A) Normal non-proxy HTTP:
+ - no more "Pragma: no-cache" (this only makes sense to proxies)
+
+ B) Non-CONNECT HTTP request over proxy:
+ - "Pragma: no-cache" is used (like before)
+ - "Proxy-Connection: Keep-alive" (for older style 1.0-proxies)
+
+ C) CONNECT HTTP request over proxy:
+ - "Host: [name]:[port]"
+ - "Proxy-Connection: Keep-alive"
+
+ The A) case is mostly to reduce the default header size and remove a
+ pointless header.
+
+ The B) is to address (rare) problems with HTTP 1.0 proxies
+
+ The C) headers are both to address (rare) problems with some proxies. The
+ code in libcurl that deals with CONNECT requests need a rewrite, but it
+ feels like a too big a job for me to do now. Details are added in the code
+ comments for now.
+
+ Updated a large amount of test cases to reflect the news.
+
+Daniel (10 May 2005)
+- Half-baked attempt to bail out if select() returns _only_ errorfds when the
+ transfer is in progress. An attempt to fix Allan's problem. See
+ http://curl.haxx.se/mail/lib-2005-05/0073.html and the rest of that thread
+ for details.
+
+ I'm still not sure this is the right fix, but...
+
+Version 7.14.0-pre1 (9 May 2005)
+
+Daniel (2 May 2005)
+- Sort of "fixed" KNOWN_BUGS #4: curl now builds IPv6 enabled on AIX 4.3. At
+ least it should no longer cause a compiler error. However, it does not have
+ AI_NUMERICHOST so we cannot getaddrinfo() any numerical addresses with it
+ (we use that for FTP PORT/EPRT)! So, I modified the configure check that
+ checks if the getaddrinfo() is working, to use AI_NUMERICHOST since then
+ it'll fail on AIX 4.3 and it will automatically build with IPv6 support
+ disabled.
+
+- Added --trace-time that when used adds a time stamp to each trace line that
+ --trace, --trace-ascii and --verbose output. I also made the '>' display
+ separate each line on the linefeed so that HTTP requests etc look nicer in
+ the -v output.
+
+- Made curl recognize the environment variables Lynx (and others?) support for
+ pointing out the CA cert path/file: SSL_CERT_DIR and SSL_CERT_FILE. If
+ CURL_CA_BUNDLE is not set, they are checked afterwards.
+
+ Like before: on windows if none of these are set, it checks for the ca cert
+ file like this:
+
+ 1. application's directory
+ 2. current working directory
+ 3. Windows System directory (e.g. C:\windows\system32)
+ 4. Windows Directory (e.g. C:\windows)
+ 5. all directories along %PATH%
+
+Daniel (1 May 2005)
+- The runtests.pl script now starts test servers by doing fork() and exec()
+ instead of the previous approach. This is less complicated and should
+ hopefully lead to less "leaked" servers (servers that aren't stopped
+ properly when the tests are stopped).
+
+- Alexander Zhuravlev found a case when you did "curl -I [URL]" and it
+ complained on the chunked encoding, even though a HEAD should never return a
+ body and thus it cannot be a chunked-encoding problem!
+
+Daniel (30 April 2005)
+- Alexander Zhuravlev found out that (lib)curl SIGSEGVed when using
+ --interface on an address that can't be bound.
+
+Daniel (28 April 2005)
+- Working on fixing up test cases to mark sections as 'mode=text' for things
+ that curl writes as text files, since then they can get different line
+ endings depending on OS. Andrés García helps me work this out.
+
+ Did lots of other minor tweaks on the test scripts to work better and more
+ reliably find test servers and also kill test servers.
+
+- Dan Fandrich pointed out how the runtests.pl script killed the HTTP server
+ instead of the HTTPS server when closing it down.
+
+Daniel (27 April 2005)
+- Paul Moore made curl check for the .curlrc file (_curlrc on windows) on two
+ more places. First, CURL_HOME is a new environment variable that is used
+ instead of HOME if it is set, to point out where the default config file
+ lives. If there's no config file in the dir pointed out by one of the
+ environment variables, the Windows version will instead check the same
+ directory the executable curl is located in.
+
+Daniel (26 April 2005)
+- Cory Nelson's work on nuking compiler warnings when building on x64 with
+ VS2005.
+
+Daniel (25 April 2005)
+- Fred New reported a bug where we used Basic auth and user name and password
+ in .netrc, and when following a Location: the subsequent requests didn't
+ properly use the auth as found in the netrc file. Added test case 257 to
+ verify my fix.
+
+- Based on feedback from Cory Nelson, I added some preprocessor magic in
+ */setup.h and */config-win32.h to build fine with VS2005 on x64.
+
+Daniel (23 April 2005)
+- Alex Suykov made the curl tool now assume that uploads using HTTP:// or
+ HTTPS:// are the only ones that show output and thus motivates a switched
+ off progress meter if the output is sent to the terminal. This makes FTP
+ uploads without '>', -o or -O show the progress meter.
+
+Daniel (22 April 2005)
+- Dave Dribin's MSVC makefile fix: set CURL_STATICLIB when it builds static
+ library variants.
+
+- Andres Garcia fixed configure to set the proper define when building static
+ libcurl on windows.
+
+- --retry-delay didn't work.
+
+Daniel (18 April 2005)
+- Olivier reported that even though he used CURLOPT_PORT, libcurl clearly
+ still used the default port. He was right. I fixed the problem and added the
+ test cases 521, 522 and 523 to verify the fix.
+
+- Toshiyuki Maezawa reported that when doing a POST with a read callback,
+ libcurl didn't properly send an Expect: 100-continue header. It does now.
+
+- I committed by mig change in the test suite's FTP server that moves out all
+ socket/TCP code to a separate C program named sockfilt. And added 4 new
+ test cases for FTP over IPv6.
+
+Daniel (8 April 2005)
+- Cory Nelson reported a problem with a HTTP server that responded with a 304
+ response containing an "illegal" Content-Length: header, which was not
+ properly ignored by libcurl. Now it is. Test case 249 verifies.
+
+Daniel (7 April 2005)
+- Added ability to build and run with GnuTLS as an alternative to OpenSSL for
+ the secure layer. configure --with-gnutls enables with. Note that the
+ previous OpenSSL check still has preference and if it first detects OpenSSL,
+ it will not check for GnuTLS. You may need to explictly diable OpenSSL with
+ --without-ssl.
+
+ This work has been sponsored by The Written Word.
+
+Daniel (5 April 2005)
+- Christophe Legry fixed the post-upload check for FTP to not complain if the
+ upload was skipped due to a time-condition as set with
+ CURLOPT_TIMECONDITION. I added test case 247 and 248 to verify.
+
+Version 7.13.2 (5 April 2005)
+
+Daniel (4 April 2005)
+- Marcelo Juchem fixed the MSVC makefile for libcurl
+
+- Gisle Vanem fixed a crash in libcurl, that could happen if the easy handle
+ was killed before the threading resolver (windows only) still hadn't
+ completed.
+
+- Hardeep Singh reported a problem doing HTTP POST with Digest. (It was
+ actually also affecting NTLM and Negotiate.) It turned out that if the
+ server responded with 100 Continue before the initial 401 response, libcurl
+ didn't take care of the response properly. Test case 245 and 246 added to
+ verify this.
+
+Daniel (30 March 2005)
+- Andres Garcia modified the configure script to check for libgdi32 before
+ libcrypto, to make the SSL check work fine on msys/mingw.
+
+Daniel (29 March 2005)
+- Tom Moers identified a flaw when you sent a POST with Digest authentication,
+ as in the first request when curl sends a POST with Content-Length: 0, it
+ still forcibly closed the connection before doing the next step in the auth
+ negotiation.
+
+- Jesper Jensen found out that FTP-SSL didn't work since my FTP
+ rewrite. Fixing that was easy, but it also revealed a much worse problem:
+ the FTP server response reader function didn't properly deal with reading
+ responses in multiple tiny chunks properly! I modified the FTP server to
+ allow it to produce such split-up responses to make sure curl deals with
+ them as it should.
+
+- Based on Augustus Saunders' comments and findings, the HTTP output auth
+ function was fixed to use the proper proxy authentication when multiple ones
+ are accepted. test 239 and test 243 were added to repeat the problems and
+ verify the fixes.
+
+ --proxy-anyauth was added to the curl tool
+
+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
+ 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.
+
+Daniel (15 March 2005)
+- Dan Fandrich made the code properly use the uClibc's version of
+ inet_ntoa_r() when built with it.
+
+- Added test 237 and 238: test EPSV and PASV response handling when they get
+ well- formated data back but using illegal values. In 237 PASV gets an IP
+ address that is way bad. In 238 EPSV gets a port that is way out of range.
+
+Daniel (14 March 2005)
+- Added a few missing features to the curl-config --features list
+
+- Modified testcurl.pl to now offer
+ 1 - command line options for all info it previously only read from
+ file: --name, --email, --desc and --configure
+ 2 - --nocvsup makes it not attempt to do cvs update
+ 3 - --crosscompile informs it and makes it not attempt things it can't do
+
+- Fixed numerous win32 compiler warnings.
+
+- Removed the lib/security.h file since it shadowed the mingw/win32 header
+ with the same name which is needed for SSPI builds. The contents of the
+ former security.h is now i krb4.h
+
+- configure --enable-sspi now enables SSPI in the build. It only works for
+ windows builds (including cross-compiles for windows).
+
+Daniel (12 March 2005)
+- David Houlder added --form-string that adds that string to a multipart
+ formpost part, without special characters having special meanings etc like
+ --form features.
+
+Daniel (11 March 2005)
+- curl_version_info() returns the feature bit CURL_VERSION_SSPI if it was
+ built with SSPI support.
+
+- Christopher R. Palmer made it possible to build libcurl with the
+ USE_WINDOWS_SSPI on Windows, and then libcurl will be built to use the
+ native way to do NTLM. SSPI also allows libcurl to pass on the current user
+ and its password in the request.
+
+Daniel (9 March 2005)
+- Dan F improved the SSL lib setup in configure.
+
+- Nodak Sodak reported a crash when using a SOCKS4 proxy.
+
+- Jean-Marc Ranger pointed out an embarassing debug printf() leftover in the
+ multi interface code.
+
+- Adjusted the man page for the curl_getdate() return value for dates after
+ year 2038. For 32 bit time_t it returns 0x7fffffff but for 64bit time_t it
+ returns either the correct value or even -1 on some systems that still seem
+ to not deal with this properly. Tor Arntsen found a 64bit AIX system for us
+ that did the latter. Gwenole Beauchesne's Mandrake patch put the lights on
+ this problem in the first place.
+
+Daniel (8 March 2005)
+- Dominick Meglio reported that using CURLOPT_FILETIME when transferring a FTP
+ file got a Last-Modified: header written to the data stream, corrupting the
+ actual data. This was because some conditions from the previous FTP code was
+ not properly brought into the new FTP code. I fixed and I added test case
+ 520 to verify. (This bug was introduced in 7.13.1)
+
+- Dan Fandrich fixed the configure --with-zlib option to always consider the
+ given path before any standard paths.
+
+Daniel (6 March 2005)
+- Randy McMurchy was the first to report that valgrind.pm was missing from the
+ release archive and thus 'make test' fails.
+
+Daniel (5 March 2005)
+- Dan Fandrich added HAVE_FTRUNCATE to several config-*.h files.
+
+- Added test case 235 that makes a resumed upload of a file that isn't present
+ on the remote side. This then converts the operation to an ordinary STOR
+ upload. This was requested/pointed out by Ignacio Vazquez-Abrams.
+
+ It also proved (and I fixed) a bug in the newly rewritten ftp code (and
+ present in the 7.13.1 release) when trying to resume an upload and the
+ servers returns an error to the SIZE command. libcurl then loops and sends
+ SIZE commands infinitely.
+
+- Dan Fandrich fixed a SSL problem introduced on February 9th that made
+ libcurl attempt to load the whole random file to seed the PRNG. This is
+ really bad since this turns out to be using /dev/urandom at times...
+
+Version 7.13.1 (4 March 2005)
+
+Daniel (4 March 2005)
+- Dave Dribin made it possible to set CURLOPT_COOKIEFILE to "" to activate
+ the cookie "engine" without having to provide an empty or non-existing file.
+
+- Rene Rebe fixed a -# crash when more data than expected was retrieved.
+
+Daniel (22 February 2005)
+- NTLM and ftp-krb4 buffer overflow fixed, as reported here:
+ http://www.securityfocus.com/archive/1/391042 and the CAN report here:
+ http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0490
+
+ If these security guys were serious, we'd been notified in advance and we
+ could've saved a few of you a little surprise, but now we weren't.
+
+Daniel (19 February 2005)
+- Ralph Mitchell reported a flaw when you used a proxy with auth, and you
+ requested data from a host and then followed a redirect to another
+ host. libcurl then didn't use the proxy-auth properly in the second request,
+ due to the host-only check for original host name wrongly being extended to
+ the proxy auth as well. Added test case 233 to verify the flaw and that the
+ fix removed the problem.
+
+Daniel (18 February 2005)
+- Mike Dobbs reported a mingw build failure due to the lack of
+ BUILDING_LIBCURL being defined when libcurl is built. Now this is defined by
+ configure when mingw is used.
+
+Daniel (17 February 2005)
+- David in bug report #1124588 found and fixed a socket leak when libcurl
+ didn't close the socket properly when returning error due to failing
+ localbind
+
+Daniel (16 February 2005)
+- Christopher R. Palmer reported a problem with HTTP-POSTing using "anyauth"
+ that picks NTLM. Thanks to David Byron letting me test NTLM against his
+ servers, I could quickly repeat and fix the problem. It turned out to be:
+
+ When libcurl POSTs without knowing/using an authentication and it gets back
+ a list of types from which it picks NTLM, it needs to either continue
+ sending its data if it keeps the connection alive, or not send the data but
+ close the connection. Then do the first step in the NTLM auth. libcurl
+ didn't send the data nor close the connection but simply read the
+ response-body and then sent the first negotiation step. Which then failed
+ miserably of course. The fixed version forces a connection if there is more
+ than 2000 bytes left to send.
+
+Daniel (14 February 2005)
+- The configure script didn't check for ENGINE_load_builtin_engines() so it
+ was never used.
+
+Daniel (11 February 2005)
+- Removed all uses of strftime() since it uses the localised version of the
+ week day names and month names and servers don't like that.
+
+Daniel (10 February 2005)
+- Now the test script disables valgrind-testing when the test suite runs if
+ libcurl is built shared. Otherwise valgrind only tests the shell that runs
+ the wrapper-script named 'curl' that is a front-end to curl in this case.
+ This should also fix the huge amount of reports of false positives when
+ valgrind has identified leaks in (ba)sh and not in curl and people report
+ that as curl bugs. Bug report #1116672 is one example.
+
+ Also, the valgrind report parser has been adapted to check that at least one
+ of the sources in a stack strace is one of (lib)curl's source files or
+ otherwise it will not consider the problem to concern (lib)curl.
+
+- Marty Kuhrt streamlined the VMS build.
+
+Daniel (9 February 2005)
+- David Byron fixed his SSL problems, initially mentioned here:
+ http://curl.haxx.se/mail/lib-2005-01/0240.html. It turned out we didn't use
+ SSL_pending() as we should.
+
+- Converted lots of FTP code to a statemachine, so that the multi interface
+ doesn't block while communicating commands-responses with an FTP server.
+
+ I've added a comment like BLOCKING in the code on all spots I could find
+ where we still have blocking operations. When we change curl_easy_perform()
+ to use the multi interface, we'll also be able to simplify the code since
+ there will only be one "internal interface".
+
+ While doing this, I've now made CURLE_FTP_ACCESS_DENIED separate from the
+ new CURLE_LOGIN_DENIED. The first one is now access denied to a function,
+ like changing directory or retrieving a file, while the second means that we
+ were denied login.
+
+ The CVS tag 'before_ftp_statemachine' was set just before this went in, in
+ case of future need.
+
+- Gisle made the DICT code send CRLF and not just LF as the spec says so.
+
+Daniel (8 February 2005)
+- Gisle fixed problems when libcurl runs out of memory, and worked on making
+ sure the proper error code is returned for those occations.
+
+Daniel (7 February 2005)
+- Maruko pointed out a problem with inflate decompressing exactly 64K
+ contents.
+
+Daniel (5 February 2005)
+- Eric Vergnaud found a use of an uninitialised variable in the ftp when doing
+ 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.
+
+Version 7.13.0 (1 February 2005)
+
+Daniel (31 January 2005)
+- Added Lars Nilsson's htmltitle.cc example
+
+Daniel (30 January 2005)
+- Fixed a memory leak when using the multi interface and the DO operation
+ failed (as in test case 205).
+
+- Fixed a valgrind warning for file:// operations.
+
+- Fixed a valgrind report in the url globbing code for the curl command line
+ tool.
+
+- Bugfixed the parser that scans the valgrind report outputs (in runtests.pl).
+ I noticed that it previously didn't detect and report the "Conditional jump
+ or move depends on uninitialised value(s)" error. When I fixed this, I
+ caught a few curl bugs with it. And then I had to spend time to make the
+ test suite IGNORE these errors when OpenSSL is used since it produce massive
+ amounts of valgrind warnings (but only of the "Conditional..." kind it
+ seems). So, if a test that requires SSL is run, it ignores the
+ "Conditional..." errors, and you'll get a "valgrind PARTIAL" output instead
+ of "valgrind OK".
+
+Daniel (29 January 2005)
+- Using the multi interface, and doing a requsted a re-used connection that
+ gets closed just after the request has been sent failed and did not re-issue
+ a request on a fresh reconnect like the easy interface did. Now it does!
+
+- Define CURL_MULTIEASY when building libcurl (lib/easy.c to be exact), to use
+ my new curl_easy_perform() that uses the multi interface to run the
+ request. It is a great testbed for the multi interface and I believe we
+ shall do it this way for real in the future when we have a successor to
+ curl_multi_fdset(). I've used this approach to detect and fix several of the
+ recent multi-interfaces issues.
+
+- Adjusted the KNOWN_BUGS #17 fix a bit more since the FTP code also did some
+ bad assumptions.
+
+- multi interface: when a request is denied due to "Maximum redirects
+ followed" libcurl leaked the last Location: URL.
+
+- Connect failures with the multi interface was often returned as "connect()
+ timed out" even though the reason was different.
+
+Daniel (28 January 2005)
+- KNOWN_BUGS #17 fixed. A DNS cache entry may not remain locked between two
+ curl_easy_perform() invokes. It was previously unlocked at disconnect, which
+ could mean that it remained locked between multiple transfers. The DNS cache
+ may not live as long as the connection cache does, as they are separate.
+
+ To deal with the lack of DNS (host address) data availability in re-used
+ connections, libcurl now keeps a copy of the IP adress as a string, to be
+ able to show it even on subsequent requests on the same connection.
+
+ The problem could be made to appear with this stunt:
+
+ 1. create a multi handle
+ 2. add an easy handle
+ 3. fetch a URL that is persistent (leaves the connection alive)
+ 4. remove the easy handle from the multi
+ 5. kill the multi handle
+ 6. create a multi handle
+ 7. add the same easy handle to the new multi handle
+ 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
+ custom port hosts turned too tricky so unfortunately there's none.
+
+Daniel (25 January 2005)
+- Ian Ford asked about support for the FTP command ACCT, and I discovered it
+ is present in RFC959... so now (lib)curl supports it as well. --ftp-account
+ and CURLOPT_FTP_ACCOUNT set the account string. (The server may ask for an
+ account string after PASS have been sent away. The client responds
+ with "ACCT [account string]".) Added test case 228 and 229 to verify the
+ functionality. Updated the test FTP server to support ACCT somewhat.
+
+- David Shaw contributed a fairly complete and detailed autoconf test you can
+ use to detect libcurl and setup variables for the protocols the installed
+ libcurl supports: docs/libcurl/libcurl.m4
+
+Daniel (21 January 2005)
+- Major FTP third party transfer overhaul.
+
+ These four options are now obsolete: CURLOPT_SOURCE_HOST,
+ CURLOPT_SOURCE_PATH, CURLOPT_SOURCE_PORT (this option didn't work before)
+ and CURLOPT_PASV_HOST.
+
+ These two options are added: CURLOPT_SOURCE_URL and CURLOPT_SOURCE_QUOTE.
+
+ The target-side didn't use the proper path with RETR, and thus this only
+ worked correctly in the login path (i.e without doing any CWD). The source-
+ side still uses a wrong path, but the fix for this will need to wait. Verify
+ the flaw by using a source URL with included %XX-codes.
+
+ Made CURLOPT_FTPPORT control weather the target operation should use PORT
+ (or not). The other side thus uses passive (PASV) mode.
+
+ Updated the ftp3rdparty.c example source to use the updated options.
+
+ Added support for a second FTP server in the test suite. Named... ftp2.
+ Added test cases 230, 231 and 232 as a few first basic tests of very simple
+ 3rd party transfers.
+
+ Changed the debug output to include 'target' and 'source' when a 3rd party
+ is being made, to make it clearer what commands/responses came on what
+ connection.
+
+ Added three new command line options: --3p-url, --3p-user and --3p-quote.
+
+ Documented the command line options and the curl_easy_setopt options related
+ to third party transfers.
+
+ (Temporarily) disabled the ability to re-use an existing connection for the
+ source connection. This is because it needs to force a new in case the
+ source and target is the same host, and the host name check is trickier now
+ when the source is identified with a full URL instead of a plain host name
+ like before.
+
+ TODO (short-term) for 3rd party transfers: quote support. The options are
+ there, we need to add test cases to verify their functionality.
+
+ TODO (long-term) for 3rd party transfers: IPv6 support (EPRT and EPSV etc)
+ and SSL/TSL support.
+
+Daniel (20 January 2005)
+- Philippe Hameau found out that -Q "+[command]" didn't work, although some
+ code was written for it. I fixed and added test case 227 to verify it.
+ The curl.1 man page didn't mention the '+' so I added it.
+
+Daniel (19 January 2005)
+- Stephan Bergmann made libcurl return CURLE_URL_MALFORMAT if an FTP URL
+ contains %0a or %0d in the user, password or CWD parts. (A future fix would
+ include doing it for %00 as well - see KNOWN_BUGS for details.) Test case
+ 225 and 226 were added to verify this
+
+- Stephan Bergmann pointed out two flaws in libcurl built with HTTP disabled:
+
+ 1) the proxy environment variables are still read and used to set HTTP proxy
+
+ 2) you couldn't disable http proxy with CURLOPT_PROXY (since the option was
+ disabled). This is important since apps may want to disable HTTP proxy
+ without actually knowing if libcurl was built to disable HTTP or not.
+
+ Based on Stephan's patch, both these issues should now be fixed.
+
+Daniel (18 January 2005)
+- Cody Jones' enhanced version of Samuel Díaz García's MSVC makefile patch was
+ applied.
+
+Daniel (16 January 2005)
+- Alex aka WindEagle pointed out that when doing "curl -v dictionary.com", curl
+ assumed this used the DICT protocol. While guessing protocols will remain
+ fuzzy, I've now made sure that the host names must start with "[protocol]."
+ for them to be a valid guessable name. I also removed "https" as a prefix
+ that indicates HTTPS, since we hardly ever see any host names using that.
+
+Daniel (13 January 2005)
+- Inspired by Martijn Koster's patch and example source at
+ http://www.greenhills.co.uk/mak/gentoo/curl-eintr-bug.c, I now made the
+ select() and poll() calls properly loop if they return -1 and errno is
+ EINTR. glibc docs for this is found here:
+ http://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html
+
+ This last link says BSD doesn't have this "effect". Will there be a problem
+ if we do this unconditionally?
+
+Daniel (11 January 2005)
+- Dan Torop cleaned up a few no longer used variables from David Phillips'
+ select() overhaul fix.
+
+- Cyrill Osterwalder posted a detailed analysis about a bug that occurs when
+ using a custom Host: header and curl fails to send a request on a re-used
+ persistent connection and thus creates a new connection and resends it. It
+ then sent two Host: headers. Cyrill's analysis was posted here:
+ http://curl.haxx.se/mail/archive-2005-01/0022.html
+
+- Bruce Mitchener identified (bug report #1099640) the never-ending SOCKS5
+ problem with the version byte and the check for bad versions. Bruce has lots
+ of clues on this, and based on his suggestion I've now removed the check of
+ that byte since it seems to be able to contain 1 or 5.
+
+Daniel (10 January 2005)
+- Pavel Orehov reported memory problems with the multi interface in bug report
+ #1098843. In short, a shared DNS cache was setup for a multi handle and when
+ the shared cache was deleted before the individual easy handles, the latter
+ cleanups caused read/writes to already freed memory.
+
+- Hzhijun reported a memory leak in the SSL certificate code, that leaked the
+ remote certificate name when it didn't match the used host name.
+
+Gisle (8 January 2005)
+- Added Makefile.Watcom files (src/lib). Updated Makefile.dist.
+
+Daniel (7 January 2005)
+- Improved the test script's valgrind log parser to actually work! Also added
+ the ability to disable the log scanner for specific test cases. Test case
+ 509 results in numerous problems and leaks in OpenSSL and has to get it
+ disabled.
+
+Daniel (6 January 2005)
+- Fixed a single-byte read out of bounds in test case 39 in the curl tool code
+ (i.e not in the library).
+
+- Bug report #1097019 identified a problem when doing -d "data" with -G and
+ sending it to two URLs with {}. Added test 199 to verify the fix.
+
+Daniel (4 January 2005)
+- Marty Kuhrt adjusted a VMS build script slightly
+
+- Kai Sommerfeld and Gisle Vanem fixed libcurl to build with IPv6 support on
+ Win2000.
+
+Daniel (2 January 2005)
+- Alex Neblett updated the MSVC makefiles slightly.
+Daniel (25 December 2004)
+- Removed src/config.h.in from CVS, it is now copied from the (generated)
+ lib/config.h.in instead, as they can very well be the same. This removes a
+ "manual hassle". You may want to re-run buildconf now.
+
+- Werner Koch filed Debian bug report #286794, mentioning that curl contained
+ non-free (by Debian's view) source code. This was Angus Mackay's
+ src/getpass.c source code. I tried to contact him about it to quickly solve
+ this issue, but his email addresses bounce and I got some time "over" and
+ reimplemented the functionality once brought by Angus. We no longer use any
+ of Angus' original code and the new function is much simpler (IMO). Issue
+ solved.
+
+Daniel (24 December 2004)
+- David Shaw added --protocols to curl-config, so that it now lists all
+ protocols libcurl was built to support. --feature no longer lists disabled
+ protocols.
+
+Daniel (23 December 2004)
+- David Shaw fixed the configure --disable-[protocol] variables so that
+ curl-config --feature now works correctly!
+
+Daniel (22 December 2004)
+- Rune Kleveland fixed a minor memory leak for received cookies with the
+ (rare) version attribute set.
+
+- Marcin Konicki provided two configure fixes and a source fix to make curl
+ build out-of-the-box on BeOS.
+
+Daniel (21 December 2004)
+- Added test case 217 that verified CURLINFO_HTTP_CONNECTCODE, and I made the
+ -w option support 'http_connect' to make it easier to verify!
+
+- Fixed lib/select.c include order to build fine on FreeBSD
+
+- Fixed failf()'s reuse of the va_list variable that crashed on FreeBSD.
+ Pointed out by Peter Pentchev.
+
+Version 7.12.3 (20 December 2004)
+
+Daniel (19 December 2004)
+- I investigated our PKCS12 build problem on Solaris 2.7 with OpenSSL 0.9.7e,
+ and it turned out to be the fault of the zlib 1.1.4 headers doing a typedef
+ named 'free_func' and the OpenSSL headers have a prototype that uses
+ 'free_func' in one of its arguments. This is why the compile errors out.
+
+ In other words, we need to include the openssl/pkcs12.h header before the
+ zlib.h header and it builds fine. The configure script now checks for this
+ file and it then gets included early in lib/urldata.h.
+
+Daniel (18 December 2004)
+- Samuel Listopad added support for PKCS12 formatted certificates.
+
+- Samuel Listopad fixed -E to support "C:/path" (with forward slash) as well.
+
+Daniel (16 December 2004)
+- Gisle found and fixed a problem in the directory re-use for FTP.
+
+ I added test case 215 and 216 to better verify the functionality.
+
+- Dinar in bug report #1086121, found a file handle leak when a multipart
+ formpost (including a file upload part) was aborted before the whole file
+ was sent.
+
+Daniel (15 December 2004)
+- Tom Lee found out that globbing of strings with backslashes didn't work as
+ you'd expect. Backslashes are such a central part of windows file names that
+ forcing backslashes to have to be escaped with backslashes is a bit too
+ awkward to users. Starting now, you only need to escape globbing characters
+ such as the five letters: "[]{},". Added test case 214 to verify this.
+
+Daniel (14 December 2004)
+- Harshal Pradhan patched a HTTP persistent connection flaw: if the user name
+ and/or password were modified between two requests on a persistent
+ connection, the second request were still made with the first setup!
+
+ I added test case 519 to verify the fix.
+
+Daniel (13 December 2004)
+- Gisle added CURLINFO_SSL_ENGINES to curl_easy_getinfo() to allow an app
+ to list all available crypto ENGINES.
+
+- Gisle fixed bug report #1083542, which pointed out a problem with resuming
+ large file (>4GB) file:// transfers on windows.
+
+Daniel (11 December 2004)
+- Made the test suite HTTP server (sws) capable of using IPv6, and then
+ extended the test environment to support that and also added three test
+ cases (240, 241, 242) that run tests using IPv6. Test 242 uses a URL that
+ didn't work before the 10 dec fix by Kai Sommerfeld.
+
+- Made a failed file:// resume output an error message
+
+- Corrected the CURLE_BAD_DOWNLOAD_RESUME error message in lib/strerror.c
+
+- Dan Fandrich:
+
+ simplified and consolidated the SSL checks in configure and the usage of the
+ defines in lib/setup.h
+
+ provided a first libcurl.pc.in file for pkg-config (but the result is not
+ installed anywhere at this point)
+
+ extended the cross compile section in the docs/INSTALL file
+
+Daniel (10 December 2004)
+- When providing user name in the URL and a IPv6-style IP-address (like in
+ "ftp://user@[::1]/tmp"), the URL parser didn't get the host extracted
+ properly. Reported and fixed by Kai Sommerfeld.
+
+Daniel (9 December 2004)
+- Ton Voon provided a configure fix that should fix the notorious (mostly
+ reported on Solaris) problem where the size_t check fails due to the SSL
+ libs being found in a dir not searched through by the run-time linker.
+ patch-tracker entry #1081707.
+
+- Bryan Henderson pointed out in bug report #1081788 that the curl-config
+ --vernum output wasn't zero prefixed properly (as claimed in documentation).
+ This is fixed in maketgz now.
+
+Daniel (8 December 2004)
+- Matt Veenstra updated the mach-O framework files for Mac OS X.
+
+- Rene Bernhardt found and fixed a buffer overrun in the NTLM code, where
+ libcurl always and unconditionally overwrote a stack-based array with 3 zero
+ bytes. This is not an exploitable buffer overflow. No need to get alarmed.
+
+Daniel (7 December 2004)
+- Fixed so that the final error message is sent to the verbose info "stream"
+ even if no errorbuffer is set.
+
+Daniel (6 December 2004)
+- Dan Fandrich added the --disable-cookies option to configure to build
+ libcurl without cookie support. This is mainly useful if you want to build a
+ minimalistic libcurl with no cookies support at all. Like for embedded
+ systems or similar.
+
+- Richard Atterer fixed libcurl's way of dealing with the EPSV
+ response. Previously, libcurl would re-resolve the host name with the new
+ port number and attempt to connect to that, while it should use the IP from
+ the control channel. This bug made it hard to EPSV from an FTP server with
+ multiple IP addresses!
+
+Daniel (3 December 2004)
+- Bug report #1078066: when a chunked transfer was pre-maturely closed exactly
+ at a chunk boundary it was not considered an error and thus went unnoticed.
+ Fixed by Maurice Barnum.
+
+ Added test case 207 to verify.
+
+Daniel (2 December 2004)
+- Fixed the CONNECT loop to default timeout to 3600 seconds.
+
+ Added test case 206 that makes CONNECT with Digest.
+
+ Fixed a flaw that prepended "(nil)" to the initial CONNECT rqeuest's user-
+ agent field.
+
+Daniel (30 November 2004)
+- Dan Fandrich's fix for libz 1.1 and "extra field" usage in a gzip stream
+
+- Dan also helped me with input data to create three more test cases for the
+ --compressed option.
+
+Daniel (29 November 2004)
+- I improved the test suite to enable binary contents in the tests (by proving
+ it base64 encoded), like for testing decompress etc. Added test 220 and 221
+ for this purpose. Tests can now also depend on libz to run.
+
+- As reported by Reinout van Schouwen in Mandrake's bug tracker bug 12285
+ (http://qa.mandrakesoft.com/show_bug.cgi?id=12285), when connecting to an
+ IPv6 host with FTP, --disable-epsv (or --disable-eprt) effectively disables
+ the ability to transfer a file. Now, when connected to an FTP server with
+ IPv6, these FTP commands can't be disabled even if asked to with the
+ available libcurl options.
+
+Daniel (26 November 2004)
+- As reported in Mandrake's bug tracker bug 12289
+ (http://qa.mandrakesoft.com/show_bug.cgi?id=12289), curl would print a
+ newline to "finish" the progress meter after each redirect and not only
+ after a completed transfer.
+
+Daniel (25 November 2004)
+- FTP improvements:
+
+ If EPSV, EPRT or LPRT is tried and doesn't work, it will not be retried on
+ the same server again even if a following request is made using a persistent
+ connection.
+
+ If a second request is made to a server, requesting a file from the same
+ directory as the previous request operated on, libcurl will no longer make
+ that long series of CWD commands just to end up on the same spot. Note that
+ this is only for *exactly* the same dir. There is still room for improvements
+ to optimize the CWD-sending when the dirs are only slightly different.
+
+ Added test 210, 211 and 212 to verify these changes. Had to improve the
+ test script too and added a new primitive to the test file format.
+
+Daniel (24 November 2004)
+- Andrés García fixed the configure script to detect select properly when run
+ with Msys/Mingw on Windows.
+
+Daniel (22 November 2004)
+- Made HTTP PUT and POST requests no longer use HEAD when doing multi-pass
+ auth negotiation (NTLM, Digest and Negotiate), but instead use the request
+ keyword "properly". Details in lib/README.httpauth. This also introduces
+ CURLOPT_IOCTLFUNCTION and CURLOPT_IOCTLDATA, to be used by apps that use the
+ "any" auth alternative as then libcurl may need to send the PUT/POST data
+ more than once and thus may need to ask the app to "rewind" the read data
+ stream to start.
+
+ See also the new example using this: docs/examples/anyauthput.c
+
+- David Phillips enhanced test 518. I made it depend on a "feature" so that
+ systems without getrlimit() won't attempt to test 518. configure now checks
+ for getrlimit() and setrlimit() for this test case.
+
+Daniel (18 November 2004)
+- David Phillips fixed libcurl to not crash anymore when more than FD_SETSIZE
+ file descriptors are in use. Test case 518 added to verify.
+
+Daniel (15 November 2004)
+- To test my fix for the CURLINFO_REDIRECT_TIME bug, I added time_redirect and
+ num_redirects support to the -w writeout option for the command line tool.
+
+- Wojciech Zwiefka found out that CURLINFO_REDIRECT_TIME didn't work as
+ documented.
+
+Daniel (12 November 2004)
+- Gisle Vanem modigied the MSVC and Netware makefiles to build without
+ libcurl.def
+
+- Dan Fandrich added the --disable-crypto-auth option to configure to allow
+ libcurl to build without Digest support. (I figure it should also explicitly
+ disable Negotiate and NTLM.)
+
+- *** Modified Behaviour Alert ***
+
+ Setting CURLOPT_POSTFIELDS to NULL will no longer do a GET.
+
+ Setting CURLOPT_POSTFIELDS to "" will send a zero byte POST and setting
+ CURLOPT_POSTFIELDS to NULL and CURLOPT_POSTFIELDSIZE to zero will also make
+ a zero byte POST. Added test case 515 to verify this.
+
+ Setting CURLOPT_HTTPPOST to NULL makes a zero byte post. Added test case 516
+ to verify this.
+
+ CURLOPT_POSTFIELDSIZE must now be set to -1 to signal "we don't know".
+ Setting it to zero simply says this is a zero byte POST.
+
+ When providing POST data with a read callback, setting the size up front
+ is now made with CURLOPT_POSTFIELDSIZE and not with CURLOPT_INFILESIZE.
+
+Daniel (11 November 2004)
+- Dan Fandrich added --disable-verbose to the configure script to allow builds
+ without verbose strings in the code, to save some 12KB space. Makes sense
+ only for systems with very little memory resources.
+
+- Jeff Phillips found out that a date string with a year beyond 2038 could
+ crash the new date parser on systems with 32bit time_t. We now check for
+ this case and deal with it.
+
+Daniel (10 November 2004)
+- I installed Heimdal on my Debian box (using the debian package) and noticed
+ that configure --with-gssapi failed to create a nice build. Fixed now.
+
+Daniel (9 November 2004)
+- Gisle Vanem marked all external function calls with CURL_EXTERN so that now
+ the Windows, Netware and other builds no longer need libcurl.def or similar
+ files.
+
+Daniel (8 November 2004)
+- Made the configure script check for tld.h if libidn was detected, since
+ libidn 0.3.X didn't have such a header and we don't work with anything
+ before libidn 0.4.1 anyway! Suse 9.1 apparently ships with a 0.3.X version
+ of libidn which makes the curl 7.12.2 build fail. Jean-Philippe
+ Barrette-LaPierre helped pointing this out.
+
+- Ian Gulliver reported in debian bug report #278691: if curl is invoked in an
+ environment where stderr is closed the -v output will still be sent to file
+ descriptor 2 which then might be the network socket handle! Now we have a
+ weird hack instead that attempts to make sure that file descriptor 2 is
+ opened (with a call to pipe()) before libcurl is called to do the transfer.
+ configure now checks for pipe() and systems without pipe don't get the weird
+ hack done.
+
+Daniel (5 November 2004)
+- Tim Sneddon made libcurl send no more than 64K in a single first chunk when
+ doing a huge POST on VMS, as this is a system limitation. Default on general
+ systems is 100K.
+
+Daniel (4 November 2004)
+- Andres Garcia made it build on mingw againa, my --retry code broke the build.
+
+Daniel (2 November 2004)
+- Added --retry-max-time that allows a maximum time that may not have been
+ reached for a retry to be made. If not set there is no maximum time, only
+ the amount of retries set with --retry.
+
+- Paul Nolan provided a patch to make libcurl build nicely on Windows CE.
+
+Daniel (1 November 2004)
+- When cross-compiling, the configure script no longer attempts to use
+ pkg-config on the build host in order to detect OpenSSL compiler options.
+
+Daniel (27 October 2004)
+- Dan Fandrich:
+
+ An improvement to the gzip handling of libcurl. There were two problems with
+ the old version: it was possible for a malicious gzip file to cause libcurl
+ to leak memory, as a buffer was malloced to hold the header and never freed
+ if the header ended with no file contents. The second problem is that the
+ 64 KiB decompression buffer was allocated on the stack, which caused
+ unexpectedly high stack usage and overflowed the stack on some systems
+ (someone complained about that in the mailing list about a year ago).
+
+ Both problems are fixed by this patch. The first one is fixed when a recent
+ (1.2) version of zlib is used, as it takes care of gzip header parsing
+ itself. A check for the version number is done at run-time and libcurl uses
+ that feature if it's present. I've created a define OLD_ZLIB_SUPPORT that
+ can be commented out to save some code space if libcurl is guaranteed to be
+ using a 1.2 version of zlib.
+
+ The second problem is solved by dynamically allocating the memory buffer
+ instead of storing it on the stack. The allocation/free is done for every
+ incoming packet, which is suboptimal, but should be dwarfed by the actual
+ decompression computation.
+
+ I've also factored out some common code between deflate and gzip to reduce
+ the code footprint somewhat. I've tested the gzip code on a few test files
+ and I tried deflate using the freshmeat.net server, and it all looks OK. I
+ didn't try running it with valgrind, however.
+
+- Added a --retry option to curl that takes a numerical option for the number
+ of times the operation should be retried. It is retried if a transient error
+ is detected or if a timeout occurred. By default, it will first wait one
+ second between the retries and then double the delay time between each retry
+ until the delay time is ten minutes which then will be the delay time
+ between all forthcoming retries. You can set a static delay time with
+ "--retry-delay [num]" where [num] is the number of seconds to wait between
+ each retry.
+
+Daniel (25 October 2004)
+- Tomas Pospisek filed bug report #1053287 that proved -C - and --fail on a
+ file that was already completely downloaded caused an error, while it
+ doesn't if you don't use --fail! I added test case 194 to verify the fix.
+ Grrr. CURLOPT_FAILONERROR is now added to the list stuff to remove in
+ libcurl v8 due to all the kludges needed to support it.
+
+- Mohun Biswas found out that formposting a zero-byte file didn't work very
+ good. I fixed.
+
+Daniel (19 October 2004)
+- Alexander Krasnostavsky made it possible to make FTP 3rd party transfers
+ with both source and destination being the same host. It can be useful if
+ you want to move a file on a server or similar.
+
+- Guillaume Arluison added CURLINFO_NUM_CONNECTS to allow an app to figure
+ out how many new connects a previous transfer required.
+
+ I added %{num_connects} to the curl tool and added test case 192 and 193
+ to verify the new code.
+
+Daniel (18 October 2004)
+- Peter Wullinger pointed out that curl should call setlocale() properly to
+ initiate the specific language operations, to make the IDN stuff work
+ better.
+
+Version 7.12.2 (18 October 2004)
+
+Daniel (16 October 2004)
+- Alexander Krasnostavsky made the CURLOPT_FTP_CREATE_MISSING_DIRS option work
+ fine even for third party transfers.
+
+- runekl at opoint.com found out (and provided a fix) that libcurl leaked
+ memory for cookies with the "max-age" field set.
+
+Gisle (16 October 2004)
+- Issue 50 in TODO-RELEASE; Added Traian Nicolescu's patches for threaded
+ resolver on Windows. Plugged some potential handle and memory leaks.
+
+Daniel (14 October 2004)
+- Eric Vergnaud pointed out that libcurl didn't treat ?-letters in the user
+ name and password fields properly in URLs, like
+ ftp://us?er:pass?word@site.com/. Added test 191 to verify the fix.
+
+Daniel (11 October 2004)
+- libcurl now uses SO_NOSIGPIPE for systems that support it (Mac OS X 10.2 or
+ later is one) to inhibit the SIGPIPE signal when writing to a socket while
+ the peer dies. The same effect is provide by the MSG_NOSIGNAL parameter to
+ send() on other systems. Alan Pinstein verified the fix.
+
+Daniel (10 October 2004)
+- Systems with 64bit longs no longer use strtoll() or our strtoll- replacement
+ to parse 64 bit numbers. strtol() works fine. Added a configure check to
+ detect if [constant]LL works and if so, use that in the strtoll replacement
+ code to work around compiler warnings reported by Andy Cedilnik.
+
+Gisle (6 October 2004)
+- For USE_LIBIDN builds: Added Top-Level-Domain (TLD) check of host-name
+ used in fix_hostname(). Checks if characters in 'host->name' (indirectly
+ via 'ace_hostname') are legal according to the TLD tables in libidn.
+
+Daniel (6 October 2004)
+- Chih-Chung Chang reported that if you use CURLOPT_RESUME_FROM and enabled
+ CURLOPT_FOLLOWLOCATION, libcurl reported error if a redirect happened even
+ if the new URL would provide the resumed file. Test case 188 added to verify
+ the fix (together with existing test 99).
+
+- Dan Fandrich fixed a configure flaw for systems that need both nsl and socket
+ libs to use gethostbyname().
+
+- Removed tabs and trailing whitespace from lots of source files.
+
+Daniel (5 October 2004)
+- Made configure --with-libidn=PATH try the given PATH before the default
+ paths to make it possible to override.
+
+- If idna_strerror() is present in libidn, we can use that instead of our
+ internal replacement. This function was added by Simon in libidn 0.5.6 and
+ is detected by configure.
+
+- It seems basename() on IRIX is in the libgen library and since we don't use
+ that, configure finds libgen.h but not basename and then we get a compiler
+ error because our basename() replacement doesn't match the proto in
+ libgen.h. Starting now, we don't include the file if basename wasn't found
+ as well.
+
+Daniel (4 October 2004)
+- Chris found a race condition resulting in CURLE_COULDNT_RESOLVE_HOST and
+ potential crash, in the windows threaded name resolver code.
+
+Daniel (3 October 2004)
+- Replaced the use of isspace() in cookie.c with our own version instead since
+ we have most data as 'char *' and that makes us pass in negative values if
+ there is 8bit data in the string. Changing to unsigned causes too much
+ warnings or too many required typecasts to the normal string functions.
+ Harshal Pradhan identified this problem.
+
+Daniel (2 October 2004)
+- Bertrand Demiddelaer found a case where libcurl could read already freed
+ data when CURLOPT_VERBOSE is used and a (very) persistent connection. It
+ happened when the dns cache entry for the connection was pruned while the
+ connection was still alive and then again re-used. We worked together on
+ this fix.
+
+- Gisle Vanem provided code that displays an error message when the (libidn
+ based) IDN conversion fails. This is really due to a missing suitable
+ function in the libidn API that I hope we can remove once libidn gets a
+ function like this.
+
+Daniel (1 October 2004)
+- Aleksandar Milivojevic reported a problem in the Redhat bugzilla (see
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=134133) and not to
+ anyone involved in the curl project! This happens when you try to curl a
+ file from a proftpd site using SSL. It seems proftpd sends a somewhat
+ unorthodox response code (232 instead of 230). I relaxed the response code
+ check to deal with this and similar cases.
+
+- Based on Fedor Karpelevitch's formpost path basename patch, file parts in
+ formposts no longer include the path part. If you _really_ want them, you
+ must provide your preferred full file name with CURLFORM_FILENAME.
+
+ Added detection for libgen.h and basename() to configure. My custom
+ basename() replacement function for systems without it, might be a bit too
+ naive...
+
+ Updated 6 test cases to make them work with the stripped paths.
+
+Daniel (30 September 2004)
+- Larry Campbell added CURLINFO_OS_ERRNO to curl_easy_getinfo() that allows an
+ app to retrieve the errno variable after a (connect) failure. It will make
+ sense to provide this for more failures in a more generic way, but let's
+ start like this.
+
+- Günter Knauf and Casey O'Donnell worked out an extra #if condition for the
+ curl/multi.h header to work better in winsock-using apps.
+
+- Jean-Philippe Barrette-LaPierre made buildconf run better on Mac OS X by
+ properly using glibtoolize instead of plain libtoolize. (This is made if
+ glibtool was found and used instead of plain libtool.)
+
+Daniel (29 September 2004)
+- Bertrand Demiddelaer fixed curl_easy_reset() so that it doesn't mistakingly
+ enable the progress meter.
+
+Daniel (28 September 2004)
+- "Mekonikum" found out that if you built curl without SSL support, although
+ your current SSL installation supports Engine, the compile fails.
+
+Daniel (27 September 2004)
+- When --with-ssl=PATH is used to the configure script, it no longer uses
+ pkg-config to figure out extra details. That is now only done if no PATH is
+ included or if SSL is checked for by default without the --with-ssl option.
+
+Daniel (25 September 2004)
+- Peter Sylvester pointed out that CURLOPT_SSLENGINE couldn't even be set to
+ NULL when no engine was supported. It can now.
+
+Daniel (22 September 2004)
+- Dan Fandrich fixed three test cases to no longer use "localhost" but instead
+ use "127.0.0.1" to avoid requiring that localhost resolves nicely.
+
+- Jean-Claude Chauve fixed an LDAP crash when more than one record was
+ retrieved.
+
+Daniel (19 September 2004)
+- Andreas Rieke pointed out that when attempting to connect to a host without
+ a service on the specified port, curl_easy_perform() didn't properly provide
+ an error message in the CURLOPT_ERRORBUFFER buffer.
+
+Daniel (16 September 2004)
+- Daniel at touchtunes uses the FTP+SSL server "BSDFTPD-SSL from
+ http://bsdftpd-ssl.sc.ru/" which accordingly doesn't properly work with curl
+ when "AUTH SSL" is issued (although the server responds fine and everything)
+ but requires that curl issues "AUTH TLS" instead. See
+ http://curl.haxx.se/feedback/display.cgi?id=10951944937603&support=yes
+
+ Introducing CURLOPT_FTPSSLAUTH that allows the application to select which
+ of the AUTH strings to attempt first.
+
+- Anonymous filed bug report #1029478 which identified a bug when you 1) used
+ a URL without properly seperating the host name and the parameters with a
+ slash. 2) the URL had parameters to the right of a ? that contains a slash
+ 3) curl was told to follow Location:s 4) the request got a response that
+ contained a Location: to redirect to "/dir". curl then appended the new path
+ on the wrong position of the original URL.
+
+ Test case 187 was added to verify that this was fixed properly.
+
+Daniel (11 September 2004)
+- Added parsedate.c that contains a rewrite of the date parser currently
+ provided by getdate.y. The new one is MUCH smaller and will allow us to run
+ away from the yacc/bison jungle. It is also slightly lacking in features
+ compared to the old one, but it supports parsing of all date formats HTTP
+ involves (and a fair bunch of others).
+
+Daniel (10 September 2004)
+- As found out by Jonas Forsman, curl didn't allow -F to set Content-Type on
+ text-parts. Starting now, we can do -F "name=daniel;type=text/extra". Added
+ test case 186 to verify.
+
+- Bug report #1025986. When following a Location: with a custom Host: header
+ replacement, curl only replaced the Host: header on the initial request
+ and didn't replace it on the following ones. This resulted in requests with
+ two Host: headers.
+
+ Now, curl checks if the location is on the same host as the initial request
+ and then continues to replace the Host: header. And when it moves to another
+ host, it doesn't replace the Host: header but it also doesn't make the
+ second Host: header get used in the request.
+
+ This change is verified by the two new test cases 184 and 185.
+
+Daniel (8 September 2004)
+- Modified the test suite to be able to use and run with customized port
+ numbers. This was always intended but never before possible. Now a simple
+ change in the runtests.pl script can make all tests use different ports.
+ The default ports in use from now on are 8990 to 8993.
+
+Daniel (2 September 2004)
+- Minor modification of an SSL-related error message.
+
+Daniel (31 August 2004)
+- David Tarendash found out that curl_multi_add_handle() returned
+ CURLM_CALL_MULTI_PERFORM instead of CURLM_OK.
+
+Daniel (30 August 2004)
+- Make "Proxy-Connection: close" close the current proxy connection, as Roman
+ Koifman found out.
+
+Daniel (24 August 2004)
+- Fixed a getdate problem by post-replacing the getdate.c file after the
+ bison/yacc process to add the fix Harshal Pradhan suggested. The problem
+ caused a crash on Windows when parsing some dates.
+
+Daniel (23 August 2004)
+- Roman Koifman pointed out that libcurl send Expect: 100-continue on POSTs
+ even when told to use HTTP 1.0, which is not correct. Test case 180 and
+ 181 verify this.
+
+- Added test case 182 to verify that zero byte transfers call the callback
+ properly.
+
+Daniel (20 August 2004)
+- Alexander Krasnostavsky made the write callback get called even when a zero
+ byte file is downloaded.
+
+Daniel (18 August 2004)
+- 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
+ should never do reverse lookups.
+
+Daniel (17 August 2004)
+- Kjetil Jacobsen noticed that when transferring a file:// URL pointing to an
+ empty file, libcurl would return with the file still open.
+
+- Alexander Krasnostavsky pointed out that the configure script needs to define
+ _THREAD_SAFE for AIX systems to make libcurl built really thread-safe.
+
+ Also added a check for the xlc compiler on AIX, and if that is detect we use
+ the -qthreaded compiler option
+
+Daniel (16 August 2004)
+- libcurl now allows a custom "Accept-Encoding:" header override the
+ internally set one that gets set with CURLOPT_ENCODING. Pointed out by Alex.
+
+- Roland Krikava found and fixed a cookie problem when using a proxy (the
+ path matching was wrong). I added test case 179 to verify that we now do
+ right.
+
+Daniel (15 August 2004)
+- Casey O'Donnell fixed some MSVC makefile targets to link properly.
+
+Daniel (11 August 2004)
+- configure now defines _XOPEN_SOURCE to 500 on systems that need it to build
+ warning-free (the only known one so far is non-gcc builds on 64bit SGI
+ IRIX). (Reverted this change later as it caused compiler errors.)
+
+- the FTP code now includes the server response in the error message when the
+ server gives back a 530 after the password is provided, as it isn't
+ necessary because of a bad user name or password.
+
+Version 7.12.1 (10 August 2004)
+
+Daniel (10 August 2004)
+- In OpenSSL 0.9.7d and earlier, ASN1_STRING_to_UTF8 fails if the input is
+ already UTF-8 encoded. This made the certificate verification fail if the
+ remote server used a certificate with the name UTF-8 encoded.
+
+ Work-around brought by Alexis S. L. Carvalho.
+
+Daniel (9 August 2004)
+- I fixed the configure script for krb4 to use -lcom_err as well, as I started
+ to get link problems with it unless I did that on my Solaris 2.7 box. I
+ don't understand why I started to get problems with this now!
+
+Daniel (5 August 2004)
+- Enrico Scholz fixed the HTTP-Negotiate service name to be uppercase as
+ reported in bug report #1004105
+
+Daniel (4 August 2004)
+- Gisle Vanem provided a fix for the multi interface and connecting to a host
+ using multiple IP (bad) addresses.
+
+- Dylan Salisbury made libcurl no longer accept cookies set to a TLD only (it
+ previously allowed that on the seven three-letter domains).
+
+Daniel (31 July 2004)
+- Joel Chen reported that the digest code assumed quotes around the contents a
+ bit too much.
+
+Daniel (28 July 2004)
+- Bertrand Demiddelaer fixed the host name to get setup properly even when a
+ connection is re-used, when a proxy is in use. Previously the wrong Host:
+ header could get sent when re-using a proxy connection to a different target
+ host.
+
+- Fixed Brian Akins' reported problems with duplicate Host: headers on re-used
+ connections. If you attempted to replace the Host: header in the second
+ request, you got two such headers!
+
+- src/Makefile.am now includes the Makefile.inc file to get info about files
+
+Daniel (26 July 2004)
+- Made "curl [URL] -o name#2" work as expected. If there's no globbing for the
+ #-number, it will simply be used as #2 in the file name.
+
+- Bertrand Demiddelaer fixed testing with valgrind 2.1.x and added two missing
+ newlines in the cookie informationals.
+
+Daniel (24 July 2004)
+- I fixed the autobuilds with ares, since they now need to have buildconf run
+ in the ares dir before the configure script is run.
+
+- Added Casey O'Donnell's curl_easy_reset() function. It has a proto in
+ curl/curl.h but we have no man page yet.
+
+Daniel (20 July 2004)
+- Added buildconf and buildconf.bat to the release archives, since they are
+ handy for rebuilding curl when using a daily snapshot (and not a pure CVS
+ checkout).
+
+Daniel (16 July 2004)
+- As suggested by Toby Peterson, libcurl now ignores Content-Length data if the
+ given size is a negative number. Test case 178 verifies this.
+
+Daniel (14 July 2004)
+- Günter Knauf has made the Netware builds do without the config-netware.h
+ files, so they are now removed from the dist packages.
+
+- Günter Knauf made curl and libcurl build with Borland again.
+
+- Andres Garcia fixed the common test 505 failures on windows.
+
+Daniel (6 July 2004)
+- Andrés García found out why the windows tests failed on file:// "uploads".
+
+Daniel (2 July 2004)
+- Andrés García reported a curl_share_cleanup() crash that occurs when no
+ lock/unlock callbacks have been set and the share is cleaned up.
+
+Daniel (1 July 2004)
+- When using curl --trace or --trace-ascii, no trace messages that were sent
+ by curl_easy_cleanup() were included in the trace file. This made the
+ message "Closing connection #0" never appear in trace dumps.
+
+Daniel (30 June 2004)
+- Niels van Tongeren found that setting CURLOPT_NOBODY to TRUE doesn't disable
+ a previously set POST request, making a very odd request get sent (unless
+ you disabled the POST) a HEAD request with a POST request-body. I've now
+ made CURLOPT_NOBODY enforce a proper HEAD. Added test case 514 for this.
+
+Daniel (29 June 2004)
+- Günter Knauf made the testcurl.pl script capable of using a custom setup
+ file to easier run multiple autobuilds on the same source tree.
+
+- Gisle fixed the djgpp build and fixed a memory problem in some of the
+ reorged name resolved code.
+
+- Fixed code to allow connects done using the multi interface to attempt the
+ next IP when connecting to a host that resolves to multiple IPs and a
+ connect attempt fails.
+
+Daniel (27 June 2004)
+- Based on Rob Stanzel's bug report #979480, I wrote a configure check that
+ checks if poll() can be used to wait on NULL as otherwise select() should be
+ used to do it. The select() usage was also fixed according to his report.
+
+ Mac OS X 10.3 says "poll() functionality for Mac OS X is implemented via an
+ emulation layer on top of select(), not in the kernel directly. It is
+ recommended that programs running under OS X 10.3 prefer select() over
+ poll(). Configure scripts should look for the _POLL_EMUL_H_ define (instead
+ of _POLL_H_ or _SYS_POLL_H_) and avoid implementations where poll is not
+ implemented in the kernel."
+
+ Yes, we can probably use select() on most platforms but today I prefered to
+ leave the code unaltered.
+
+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
+ the feature bitmask curl_version_info() offers.
+
+- Replaced all occurances of sprintf() with snprintf(). This is mostly because
+ it is "A Good Thing" rather than actually fixing any known problem. This
+ will help preventing future possible mistakes to cause buffer overflows.
+
+- Major reorganization in the host resolve code (again). This time, I've
+ modified the code to now always use a linked list of Curl_addrinfo structs
+ to return resolved info in, no matter what resolver method or support that
+ is available on the platform. It makes it a lot easier to write code that
+ uses or depends on resolved data.
+
+ 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
+ address) and we no longer deep-copy or relocate hostent structs (we create
+ Curl_addrinfo chains instead).
+
+ The new "hostent to Curl_addrinfo" converter function is named Curl_he2ai()
+ and is slightly naive and simple, yet I believe it is functional enough to
+ work for libcurl.
+
+Daniel (22 June 2004)
+- David Cohen pointed out that RFC2109 says clients should allow cookies to
+ contain least 4096 bytes while libcurl only allowed 2047. I raised the limit
+ to 4999 now and made the used buffer get malloc()ed instead of simply
+ allocated on stack as before. Extended test case 46 to include a cookie with
+ very huge content to verify the fix.
+
+- Günter Knauf fixed getdate.y to remove a few warnings. I removed the
+ ifdef'ed test we never ever use anyway.
+
+- Gisle Vanem fixed the certificate wildcard checks to support a '*'-letter
+ anywhere in the wildcard string, support multiple '*'-letters in the
+ wildcard and to allow the '*'-letter to match a string that includes a dot.
+
+Daniel (21 June 2004)
+- testcurl.sh is now removed completely, tests/testcurl.pl is the script to
+ use when autobuilding curl!
+
+- Kjetil Jacobsen brought my attention to the fact that you cannot properly
+ abort an upload with the readfunction callback, since returning 0 or -1 only
+ stops the upload and libcurl will continue waiting for downloaded data and
+ the server often waits for the rest of the upload data to arrive.
+
+ Thus, I've now added the ability for read callbacks to return
+ CURL_READFUNC_ABORT to abort an upload from a read callback. This will stop
+ the transfer immediately with a CURLE_ABORTED_BY_CALLBACK return code.
+
+ Test case 513 was added to verify that it works. I had to improve the test
+ HTTP server too to dump the request to a file even when the client
+ disconnects prematurely.
+
+Daniel (19 June 2004)
+- Luca Alteas provided a test case with a failing curl operation: when we POST
+ to a site with --digest (or similar) set, and the server responded with a 302
+ Location: to the "authprobe" request, it was not treated correctly. We still
+ will behave badly if FOLLOWLOCATION is enabled for this case, but I'm not
+ in the mood to dive into this right now and will leave it as-is for now.
+ Verified my fix with test case 177.
+
+Daniel (18 June 2004)
+- Gisle Vanem's patch that provides more details from the SSL layers (if you
+ use an OpenSSL version that supports it). It also introduces two new types
+ of data that can be sent to the debug callback: CURLINFO_SSL_DATA_IN and
+ CURLINFO_SSL_DATA_OUT.
+
+- With David Byron's test server I could repeat his problem and make sure that
+ POSTing over HTTPS:// with NTLM works fine now. There was a general problem
+ with multi-pass authentication with non-GET operations with CONNECT.
+
+Daniel (16 June 2004)
+- Modified to keep the upload byte counter in an curl_off_t, not an int as
+ before. 32bits is not enough. This is most likely the bug Jean-Louis Lemaire
+ reported that makes 2GB FTP uploads to report error ("unaligned file sizes")
+ when completed.
+
+Daniel (15 June 2004)
+- Luca Alteas reported a problem that I fixed: if you did a POST with
+ CURLAUTH_DIGEST set but the server didn't require any authentication,
+ libcurl would repeatedly send HEAD lots of times until it gives up. This was
+ actually the case for all multi-pass authentications. Added test case 174,
+ 175 and 176 to verify this.
+
+Daniel (14 June 2004)
+- Multipart formposts uploading files no longer inserts the files themselves
+ into the huge prebuilt chunk. This enables libcurl to formpost files that is
+ larger than the amount of system memory. When the file given is passed on
+ stdin, libcurl still uses the old method of reading the full fill before the
+ upload takes place. This approach was selected in order to not alter the
+ behavior for existing applications, as when using stdin libcurl can't know
+ the size of the upload and chunked transfer-encoding can only be used on
+ HTTP 1.1 servers.
+
+Daniel (13 June 2004)
+- Gisle found out that we did wildcard cert name checks wrong, so that parts
+ of the check wrongly was case sensitive.
+
+Daniel (11 June 2004)
+- Tim Sneddon brought a minor VMS fix to make curl build properly on his VMS
+ machine. He also had some interesting libcurl patches... they might be able
+ to do in a slightly nicer way. Discussions are in progress.
+
+Daniel (10 June 2004)
+- Gisle Vanem brought code cleanupsm better verbose output and better connect
+ timeout handling when attempting to connect to a host that resolves to
+ multiple IP addresses.
+
+- Steven Bazyl and Seshubabu Pasam pointed out a bug on win32 when freeing the
+ path after a file:// transfer.
+
+Daniel (9 June 2004)
+- Alexander Krasnostavsky made 'configure --disable-http' work to build libcurl
+ without HTTP support. I added a new return code for curl_formadd() in case
+ libcurl is built with HTTP disable: CURL_FORMADD_DISABLED.
+
+- Alexander Krasnostavsky pointed out a missing file in the generated
+ curllib.dsp file, and now people building with this should get a libcurl.lib
+ file generated as it used to do before we generated this file.
+
+Daniel (8 June 2004)
+- Marty Kuhrt fixed a minor build problem for VMS.
+
+Daniel (7 June 2004)
+- Reverted the configure check from the 4th since it obviously didn't work.
+ Remade it in a different manner that hopefully works better.
+
+Daniel (4 June 2004)
+- Günter Knauf brought patches to make curl build fine on NetWare again.
+
+- Made the configure checks for strerror_r() not exit the configure script
+ when built for cross-compiling.
+
+Daniel (3 June 2004)
+- Chris Gaukroger pointed out that 'make test' attempts to run the tests even
+ if curl is built cross-compiled. I've now made it output a short message
+ instead, saying it isn't possible to do.
+
+- Alexander Krasnostavsky brought FTP 3rd party transfer support to libcurl.
+ You can now use libcurl to transfer files between two remote hosts using
+ FTP. There are a bunch of new options to control this with:
+ CURLOPT_SOURCE_HOST
+ CURLOPT_SOURCE_USERPWD
+ CURLOPT_SOURCE_PATH
+ CURLOPT_SOURCE_PORT
+ CURLOPT_PASV_HOST
+ CURLOPT_SOURCE_PREQUOTE
+ CURLOPT_SOURCE_POSTQUOTE
+
+ (They still remain to be documented properly in the curl_easy_setopt man
+ page.)
+
+ When using this, the ordinary CURLOPT_URL specifies the target URL, and you
+ specify the source data with these additional options. ftp3rdparty.c is a
+ new example source code showing how to use this.
+
+- Vincent Bronner fixed the HTTP Digest code to use the proxy user name and
+ password when doing proxy authentication, it previously always used the host
+ user name and password!
+
+Daniel (2 June 2004)
+- CURLOPT_UPLOAD and CURLOPT_PUT now do the exact same thing internally, which
+ fixes some old confusions on when which of these should be used and what the
+ differences are.
+
+- Applied Gisle's fixes to make curl build fine with lcc-win32
+
+Version 7.12.0 (2 June 2004)
+
+Daniel (1 June 2004)
+- I clarified the --create-dirs option somewhat in the curl man page.
+
+- Renaud Duhaut corrected the curl_unescape man page.
+
+- David Byron modified one of Massimiliano Ziccardi's recent MSVC makefile
+ changes to now again use the mm lib by default.
+
+Daniel (26 May 2004)
+- Mohun Biswas added release-zlib and debug-zlib targets to the MSVC libcurl
+ Makefile
+
+- David Byron reported a problem with proxy authentication when doing CONNECT,
+ like when accessing HTTPS sites wiht a proxy. This probably broke when I
+ rewrote the auth stuff recently.
+
+- I added fileupload.c in the examples directory, showing how an upload to a
+ file:// URL is made.
+
+Daniel (25 May 2004)
+- Massimiliano Ziccardi updated the MSVC makefiles.
+
+Daniel (24 May 2004)
+- libcurl now supports "uploading" to file:// URLs. Test 204 and 205 were
+ added to verify.
+
+- Simon Josefsson added a idn_free() function in libidn 0.4.5 as a reaction to
+ Gisle's previous mail. We now use this function, and thus we require libidn
+ 0.4.5 or later. No earlier version will do.
+
+- Robert D. Young reported that CURLOPT_COOKIEFILE and CURLOPT_COOKIE could
+ not be used both in one request. Fixed it and added test case 172 to verify.
+
+Daniel (21 May 2004)
+- While talking to host a.b.c, libcurl did wrongly not accept cookies that
+ were set to the domain .a.b.c (that is with a dot prefix). This is now fixed
+ and test case 171 verifies it.
+
+Daniel (20 May 2004)
+- Jesse Noller reported that the upload speed info reported by libcurl was
+ wrong. The same was true for the download speed. Fixed now.
+
+Daniel (19 May 2004)
+- David Byron added test case 170 - this used to crash the previous version of
+ curl.
+
+Daniel (17 May 2004)
+- Peter Sylvester's patch that addresses two flaws in the peer certificate
+ name verification:
+ o when multiple common names are used (as in the curl tests), the last name
+ needs to be selected.
+ o allow comparing with encoded values, at least with BMP and ISO latin1
+ encoded T61strings.
+
+- All 191 test cases run through the torture test OK! 'make test-torture' is
+ now available in the root makefile (on configure-based environments).
+
+Daniel (14 May 2004)
+- With a slightly modified ftpserver.pl I've now run almost all tests through
+ with runtests.pl -t. This is goodness!
+
+- Since I have been unable to contact the CVS admins for several months, I've
+ decided that the current CVS hosting was not good enough. I've now moved the
+ CVS repo once again, see README for updated cvs checkout instructions.
+
+Daniel (13 May 2004)
+- runtests.pl -t now runs fine all the way to test 100. I believe test case
+ 100 fails because of an FTP server problem.
+
+Daniel (12 May 2004)
+- General cleanups all over to make libcurl survive and do well when a memory
+ function returns NULL. runtests.pl -t now works fine for the first 26 test
+ cases.
+
+Daniel (11 May 2004)
+- Seshubabu Pasam provided a patch that introduces curl_global_init_mem() -
+ like normal curl_global_init() but allows the app to replace all memory
+ functions with its own set. I modified it slightly.
+
+- Based on Luca Alteas' comments, I modified the curllib.dsp generation code.
+
+Daniel (10 May 2004)
+- Gisle mailed Simon Josefsson (of libidn fame) about the benefits of a
+ separate free()-function by that lib to make sure the memory is freed by the
+ same memory subsystem that allocated it. He responded positively and this
+ will likely cause us to require a newer version of libidn as soon as Simon
+ releases one with such a libidn_free() function.
+
+- James Bursa made runtests.pl's -t option work for any given test case, and I
+ edited to allow -g too. Not even test case 1 worked...
+
+- Luca Altea made the nc= field not use quotes in outgoing HTTP Digest headers.
+
+- Andrés García fixed a problem in the test script that made it fail to
+ recognize our own running HTTP server.
+
+Daniel (7 May 2004)
+- James Bursa fixed the memanalyze.pl script to conder malloc(0) areas OK to
+ free() and he made two failed-resolve error messages use the new display-
+ name instead of the internally-used name.
+
+- Gisle Vanem tried curl with
+ www.etdomenenavnkanmaksimaltinneholdesekstitrebokstaversliksomdette.com
+ which caused problems, and I fixed the single zero byte buffer overwrite
+ that occurred (due to a stupid protocol buffer size and parser).
+
+- Made the lib/curllib.dsp file get generated automaticly when a distribution
+ package is made, with the msvcproj.* files as templates and all
+ win32-sources added. I think this can be made to work better than the always
+ lagging-behind previous approach. I'm not sure this builds a working project
+ file right now though!
+
+Daniel (6 May 2004)
+- Michael Benedict brought a fix that fills in the errorbuffer properly when
+ ares fails to resolve a name for a case not previously dealt with like this.
+
+Daniel (5 May 2004)
+- Joe Halpin fixed the annoying typecast warning in lib/ldap.c
+
+- Gisle Vanem fixes:
+ o memdebug to not access NULL on several places
+ o libcurl.def; curl_formparse is gone.
+ o progress.c; fixed the percent values being trunced to 0.
+ o if2ip.*; constified the 'interface' argument.
+
+- Tor Arntsen reported that many of his autobuilds froze and I found and fixed
+ a problem introduced with the HTTP auth overhaul that could lead to a
+ never-ending internal request-loop due to un-initialized variables!
+
+- Removed several compiler warnings on various compilers/platforms.
+
+Daniel (4 May 2004)
+- curl_formparse() has been removed from the library. It has been marked and
+ mentioned as deprecated for several years.
+
+Daniel (3 May 2004)
+- Rewritten HTTP authentication code. The previous code could not properly
+ deal with the added test cases 167, 168 and 169. I've now rewritten the code
+ to better separate host and proxy authentication and not re-use the same
+ variables as much as before as it proved non working in the more involved
+ cases. All the current tests run OK now, and so do the new ones. The curl
+ tool got a new option named --proxy-digest to enable HTTP Digest
+ authentication with the proxy. I also made the library support it.
+
+- Gisle Vanem made the LDAP code work with wldap32.dll as supplied with
+ Win-98/ME/2000/XP, so no extra .dlls are required when curl/libcurl is used
+ on these Windows versions.
+
+Daniel (30 April 2004)
+- runtests.pl now scans the valgrind log for valgrind-detected memory leaks
+ after each test case if valgrind was found and used.
+
+- I modified the app-code in curl to include the new lib/curlx.h and only
+ access those functions using the curlx_-prefix in preparation for the future
+ removal of several curl_-functions from the public libcurl API.
+
+- Introduced lib/curlx.h as a single header to provide the curlx_-functions
+ to apps.
+
+- Added notices in the man pages for curl_getenv, curl_mprintf, curl_strequal
+ and curl_strnequal that they are subject for removal in a future release.
+ STOP USING THESE FUNCTIONS.
+
+- Mihai Ionescu noticed he couldn't do formposts with whitespace in the file
+ names and yes, I broke that on April 23. Sigh. I fixed it now and added
+ test case 166 to verify it.
+
+- Luca Altea pointed out a mistake left from the Digest patch of yesterday.
+
+Daniel (29 April 2004)
+- Made IDN domains work when sending requsts over HTTP proxy as well. Added
+ test case 165 to verify the functionality.
+
+- Fixed a bug in the new internal host name setup when re-using connections.
+
+- James Bursa found out that curl_easy_duphandle() with ares-built libcurl
+ created a bad handle that would crash in the first name resolve attempt. This
+ is now fixed and test case 512 was added to verify it.
+
+- Luca Altea provided a major HTTP Digest code fix and cleanup. We now follow
+ the Digest RFC a lot better.
+
+- Gisle Vanem made the SSL code use ERR_error_string_n() where applicable.
+
+Daniel (27 April 2004)
+- I remodeled Gisle's IDN code slightly and now we convert both the host name
+ 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
+ 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'...
+
+- made 'configure --without-libidn' work
+
+Daniel (25 April 2004)
+- Fixed the src/hugehelp.c file to include "setup.h" instead of "config.h" to
+ make the problems with USE_MANUAL on windows go away.
+
+- configure --without-ssl could still wrongly include some OpenSSL info in the
+ Makefiles if pkg-config had info about OpenSSL. Bug #941762 reported by
+ Martin.
+
+- Since we can now build and use quite a large set of 3rd party libraries, I
+ decided I would make configure produce a summary at the end showing what
+ libraries it uses and if not, what option to use to make it use that. I also
+ added some other random info that is nice in a "configure summary" output.
+
+- Applied TommyTam's patch that now make curl work with telnet and stdin
+ properly on Windows.
+
+- The changes for today below were made by me and Gisle Vanem.
+
+ The file previously known as hostip.c has now undergone a huge cleanup and
+ split:
+
+ hostip.c explained
+ ==================
+
+ The main COMPILE-TIME DEFINES to keep in mind when reading the host*.c
+ source file are these:
+
+ CURLRES_IPV6 - this host has getaddrinfo() and family, and thus we use
+ that. The host may not be able to resolve IPv6, but we don't really have to
+ take that into account. Hosts that aren't IPv6-enabled have CURLRES_IPV4
+ defined.
+
+ 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.
+
+ 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
+ supported asynch API will be the same as for ares-builds.
+
+ If any of the two previous are defined, CURLRES_ASYNCH is defined too. If
+ libcurl is not built to use an asynchronous resolver, CURLRES_SYNCH is
+ defined.
+
+ The host*.c sources files are split up like this:
+
+ hostip.c - method-independent resolver functions and utility functions
+ hostasyn.c - functions for asynchronous name resolves
+ 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
+
+ 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.
+
+- Added function header comments to many functions in an attempt to better
+ explain the purpose of them all.
+
+- configure --with-libidn is now supported. It makes the configure script
+ check for libidn libs and include files in the prefix path given. If you
+ say --with-libidn=/usr/local, it will check for the lib in /usr/local/lib
+ and the includes in /usr/local/include etc.
+
+- curl_version_info() now returns a struct aged CURLVERSION_THIRD including
+ libidn version info. The string curl_version() returns also includes libidn
+ version info, if available.
+
+Version 7.11.2 (26 April 2004)
+
+Daniel (25 April 2004)
+- Erwin Authried pointed out that configure --disable-manual didn't do right
+ if you already had a src/hugehelp.c source file present (which most people
+ do I guess). It now uses the USE_MANUAL define properly.
+
+Daniel (23 April 2004)
+- Gisle Vanem found and fixed a memory leak when doing (failing) Windows
+ threaded name resolves.
+
+- I also added test case 163 just to make sure -F "var=<file" works fine and
+ can pass on characters such as newlines, carriage-return and tabs.
+
+- When we added test case 162 without adding the necessary requirement field
+ in the test meta data we could see that curl didn't complain if you used
+ --proxy-ntlm even if the underlying libcurl it uses has no NTLM support! I
+ now made it check this first, and it now exists with a "the installed
+ libcurl version doesn't support this" message if it happens again.
+
+Daniel (22 April 2004)
+- David Byron found and fixed a small bug with the --fail and authentication
+ stuff added a few weeks ago. Turns out that if you specify --proxy-ntlm and
+ communicate with a proxy that requires basic authentication, the proxy
+ properly returns a 407, but the failure detection code doesn't realize it
+ should give up, so curl returns with exit code 0. Test case 162 added to
+ verify the functionality.
+
+- allow newlines in the contents when doing -F "var=[contents]"
+ Robert Marlow reported.
+
+- If a transfer is found out to be only partial, libcurl will now treat that
+ as a problem serious enough to skip the final QUIT command before closing
+ the control connection. To avoid the risk that it will "hang" waiting for
+ the QUIT response. Added test case 161 to verify this.
+
+Daniel (21 April 2004)
+- Modified the heuristics for dealing with the test 160 scenario. When a
+ connection is re-used and nothing at all is received from it (because the
+ server closes the connection), we will now retry the request on a fresh new
+ connection. The previous ECONNRESET stuff from January 30 was removed again
+ as it didn't detect the situation good enough.
+
+Daniel (20 April 2004)
+- Added test case 160 to verify that curl works correctly when it gets a
+ connection reset when trying to re-use a connection. It should then simply
+ create a new connection and resend the request.
+
+Daniel (19 April 2004)
+- No more 512 byte limit for host name (inclusing name + password) in libcurl.
+ An added bonus is that we use less memory for the typical (shorter URL)
+ case.
+
+- Cleaned up the sources to better use the terms 'hostname' and 'path'
+ internally when referring to that data. The buffers used for keep that info
+ is called 'namebuffer' and 'pathbuffer'. Much easier to read and understand
+ than the previous mess.
+
+Daniel (15 April 2004)
+- Modified runtests.pl again to remove all log files in the log/ dir between
+ each test, and then made -p display all non-zero byte files in the log dir.
+ It should make that data more usable and contain less rubbish.
+
+- ftpserver.pl now produces log files more similar to how the sws ones look
+ and they now also contains a bit more details to help debugging ftp
+ problems.
+
+- Removed the fixed maximum amount of dir levels the FTP code supported.
+ Previously we had a fixed array for 100 levels, now we save space in each
+ handle by allocating only for a few level by default and then enlarging that
+ in case of need (with no maximum depth). Adjusted test case 142 to verify
+ that 150 dir levels work fine. An added bonus is that we use less memory
+ for the typical (not very deep) case.
+
+Daniel (14 April 2004)
+- 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.
+
+- Gisle Vanem made curl -4/-6 actually set the desired option to libcurl.
+
+- runtests.pl now has a new option (-p) that will display "interesting" log
+ files to stdout in case of a test failure. This is primarily intended to be
+ used in the 'full-test' make target that is used by the autobuild tests, as
+ we then get a much better chance to understand (remote) test failures based
+ on autobuild logs alone.
+
+Daniel (13 April 2004)
+- Gisle Vanem made the multi interface work again on Windows even when built
+ without ares. Before this, select() would return -1 during the name resolve
+ phase since curl_multi_fdset() didn't return any fd_set at all which wasn't
+ appreciated!
+
+- curl_easy_duphandle() now duplicates the tcp_nodelay info as well.
+
+Daniel (11 April 2004)
+- Applied David Byron's patch for the MSVC libcurl makefile for builds with
+ zlib.
+
+Daniel (9 April 2004)
+- Dirk Manske improved the timer resolution for CURLINFO_*_TIME, it can now
+ be down to usec if the system sypports it.
+
+Daniel (7 April 2004)
+- A request that sends "Expect: 100-continue" and gets nothing but a single
+ 100 response back will now return a CURLE_GOT_NOTHING. Test 158 verifies.
+
+- The strtoofft() macro is now named curlx_strtoofft() to use the curlx_*
+ approach fully.
+
+Daniel (6 April 2004)
+- Gisle Vanem's fixed bug #927979 reported by Nathan O'Sullivan. The problem
+ made libcurl on Windows leak a small amount of memory in each name resolve
+ when not used as a DLL.
+
+- New authentication code added, particularly noticable when doing POST or PUT
+ with Digest or NTLM. libcurl will now use HEAD to negotiate the
+ authentication and when done perform the requested POST. Previously libcurl
+ sent POST immediately and expected the server to reply a final status code
+ with an error and then libcurl would not send the request-body but instead
+ send then next request in the sequence.
+
+ The reason for this change is due to IIS6 barfing on libcurl when we attempt
+ to POST with NTLM authentication. The reason for the problems is found in
+ RFC2616 section 8.2.3 regarding how servers should deal with the 100
+ continue request-header:
+
+ If it responds with a final status code, it MAY close the transport
+ connection or it MAY continue to read and discard the rest of the
+ request.
+
+ Previous versions of IIS clearly did close the connection in this case,
+ while this newer version decided it should "read and discard". That would've
+ forced us to send the whole POST (or PUT) data only to have it discarded and
+ then be forced to send it again. To avoid that huge penality, we switch to
+ using HEAD until we are authenticated and then send the POST.
+
+ The only actual drawback I can think of (except for the odd sites that might
+ treat HEAD differently than they would treat POST/PUT when given the same
+ URL) is that if you do POST with CURLAUTH_ANY set and the site requires NO
+ authentication, libcurl will still use a HEAD in a first round and then do a
+ POST.
+
+ If you do a HEAD or a GET on a site using CURLAUTH_ANY, libcurl will send
+ an un-authenticated request at once, which then is the only request if the
+ site requires no auth.
+
+ Alan Pinstein helped me work out the protocol details by figuring out why
+ libcurl failed and what IIS6 expects.
+
+- The --limit-rate logic was corrected and now it works a lot better for
+ higher speeds, such as '10m' or similar. Reported in bug report #930249.
+
+- Introducing curlx_tvnow() and curlx_tvdiff() using the new curlx_* fashion.
+ #include "timeval.h" from the lib dir to get the protos etc. Note that
+ these are NOT part of the libcurl API. The curl app simply uses the same
+ source files as the library does and therefore the file needs to be compiled
+ and linked with curl too, not just when creating libcurl.
+
+- lib/strerror.c no longer uses sys_nerr on non-windows platforms since it
+ isn't portable enough
+
+Daniel (2 April 2004)
+- In the curl_strnqual.3 man page, we now prepend the man3 dir to the file
+ name to work better. As pointed out by Robin Kay.
+
+- Andrés García updated the mingw makefiles.
+
+- Dirk Manske fixed a problem I recently added in the progress meter code that
+ broke subsecond resolution for CURLINFO_TOTAL_TIME. He also pointed out a
+ mistake in the code that produces the final update of the progress meter
+ that would often prevent it from actually being updated that final time.
+
+Daniel (1 April 2004)
+- Dirk Manske fixed a memory leak that happened when we use ares for name
+ resolves and decides to time-out before ares does it. This fix uses the
+ brand new ares_cancel() function which is not present in c-ares 1.1.0.
+
+ When told to enable ares, the configure script now checks for presence of
+ the ares_cancel function to alert users if they attempt to use a too old
+ c-ares library.
+
+Daniel (31 March 2004)
+- Roy Shan fixed a flaw that prevented ares name resolve timeouts to occur!
+
+- Dirk Manske found out that libcurl timed out waiting for resolves far too
+ easy when libcurl was built to use (c-)ares for name resolving.
+
+- Further Digest fixing and a successful test case 153 now makes me believe
+ Mitz Wark's problems are fixed.
+
+- Andres Garcia figured out that test case 63, while working, only proved a
+ flaw in libcurl's 'http_proxy' parser when a user name and password is
+ provided. The user name was not extracted properly (and 'http' was always
+ used as user name).
+
+- Andrés García fixed compiler warnings in our ioctlsocket() usage.
+
+Daniel (30 March 2004)
+- Joe Halpin faced problems with the getnameinfo() argument ai_flags and the
+ particular bit named 'NI_WITHSCOPEID' on Solaris 9 for Intel. I've now
+ written a configure test that checks for a working NI_WITHSCOPEID
+ implemenation. No code uses the result from this test yet, it is still
+ experimental. James Carlson wrote in comp.unix.solaris: "It's a bug
+ (5006623) -- it's not supported and shouldn't be in the header file."
+
+- I provided Mitz Wark with a first patch in order to fix libcurl's problems
+ to re-negotiate Digest authentication (when 'stale=true' is included in the
+ response header).
+
+- Roy Shan discovered that the multi interface didn't properly timeout name
+ lookups which could make handles get stuck in that state and thus never get
+ completed. I've produced a first test patch that attempts to correct this.
+
+- David Byron's patch was appplied to make CURLOPT_FAILONERROR work nicely
+ even with authentcations such as NTLM or Digest enabled. Test cases 150, 151
+ and 152 were added to verify the functionality.
+
+Daniel (29 March 2004)
+- Gisle Vanem updated files for the djgpp/MS-DOS build.
+
+- Andrés García helped me work out a fix for the runtests.pl script to make
+ the file:// tests run fine when tested with the mingw-built version of curl.
+
+- Fixed an include issue with netinet/tcp.h on AIX, based on input by Tor.
+ This also required a minor fix of the configure script.
+
+- 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
+ the correct getaddrinfo() function.
+
+Daniel (25 March 2004)
+- It turned out that AIX, despite having a "thread-safe libc", doesn't offer
+ all traditional functions thread-safe. This URL is informative on this
+ subject:
+
+ http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
+ genprogc/thread_quick_ref.htm
+
+ As a result of this, we now check for three *_r() functions on recent AIX
+ versions as well that the URL mentions aren't thread-safe in AIX 5.1.
+
+- renamed curl_strerror.[ch] to strerror.[ch]
+
+- Joe Halpin added CURLOPT_TCP_NODELAY and --tcp-nodelay to make it possible
+ for users to disable the Nagle algorthim-usage.
+
+- Tor Arntsen provided some interesting strerror_r() knowledge. glibc has its
+ own API which differs from the POSIX one. Daniel adjusted the configure
+ script to detect the version in use, and the code now uses the new defines
+ accordingly.
+
+- Fixed some build flaws with the new lib/curl_strerror.c source file.
+
+Daniel (24 March 2004)
+- Gisle Vanem's fix to replace the bad use of strerror(). This introduces
+ Curl_strerror() that attempts to be thread-safe _and_ works on Windows too!
+
+- Tor Arntsen spell-fixed lots of libcurl man pages.
+
+- Tor Arntsen made testcurl.pl work with older perl 5 versions, and Daniel
+ made it not use chdir .. to go back, as that isn't very good when you've
+ setup a testdir containing symlinks.
+
+- Added a check for strerror_r() in the configure script.
+
+Daniel (23 March 2004)
+- Added Greg Hewgill's testcurl.pl script to CVS. We have not moved over to
+ use this script for the real distributed testing just yet, but it is only
+ a matter of time.
+
+- Gisle Vanem provided code that makes curl report a better error message
+ if --interface fails on windows.
+
+- The regular progress meter is now fixed to never wrap due to long lines. All
+ fields are now static sized. If the time in the time fields get a time value
+ that would represent a time that is 100 hours or more (if not, it remains
+ using a HH:MM:SS display), it switches first to a "NNNd NNh" display (for
+ days and hours) and if that isn't enough it switches to a "NNNd" display if
+ it is more than 999 days.
+
+ Several of the calculations were also moved to fixed-point math instead of
+ using doubles.
+
+Daniel (22 March 2004)
+- Glen Nakamura noticed CURLINFO_CONTENT_LENGTH_DOWNLOAD didn't work as it
+ used to do if CURLOPT_NOBODY is set TRUE.
+
+- Kevin Roth patched the cygwin package makefile and README to adjust to
+ new cygwin packaging guidelines.
+
+- Enabled "NT responses" in the NTLM authentication. Doing this simply means
+ that we provide an extra chunk of data in each "type-3 message". The only
+ reason for doing this is that it seems that using only the "Lanmanager hash"
+ (as we've been doing until now) doesn't support passwords longer than 14
+ characters and it turns out there are users out there who want to use
+ libcurl and NTLM with such passwords! ;-) Seven NTLM-related test cases were
+ updated accordingly. Mentioned as issue 29 in TODO-RELEASE, bug report
+ #915609
+
+- Moved the generated libcurl version info to a new header file, named
+ curl/curlver.h. Now interested parties can include ONLY version info, should
+ anyone want that (and it seems at least some windows resource files would).
+ Mentioned as issue 27 in TODO-RELEASE.
+
+Daniel (21 March 2004)
+- Fixed the root Makefile to use tabs for the netware target. Günter Knauf
+ pointed this out.
+
+- Marty Kuhrt's VMS cleanup
+
+- Thomas Schwinge made buildconf recognize ACLOCAL_FLAGS to invoke aclocal
+ with particular pre-determined options.
+
+Version 7.11.1 (19 March 2004)
+
+Daniel (18 March 2004)
+- Tor Arntsen brought some info about SGI IRIX:
+
+ IRIX supports 3 different executable/object formats, -32, -n32 and -64.
+ -n32 is default 32-bit format, -32 is the "old" 32-bit format, and -64 is
+ the 64-bit format. Libraries for the different formats are in lib, lib32
+ and lib64 respectively.
+
+ We've now adjusted the configure script to adapt to this when scanning for
+ 3rd party libs, such as OpenSSL.
+
+Daniel (17 March 2004)
+- Watz pointed out a few missing files in the MSVC project description file.
+
+- Günter Knauf brought patches, code and makefiles to build curl on Novell
+ NetWare.
+
+Daniel (15 March 2004)
+- Lots of libcurl man pages were updated to contain references to other man
+ pages the recognized way so that they appear as nice hyperlinks in the HTML
+ versions.
+
+- buildconf now checks the m4 version too, since autoconf requires a GNU m4
+ version to build proper configure scripts.
+
+Daniel (12 March 2004)
+- Added CURLOPT_POSTFIELDSIZE_LARGE, the large file version of
+ CURLOPT_POSTFIELDSIZE to allow POSTs larger than 2GB.
+
+- David Byron fixed an uninitialized variable case/crash.
+
+Daniel (10 March 2004)
+- Jeff Lawson fixed the SSL connection to deal with received signals during the
+ connect.
+
+- Changed the OS string for win32 to become "i386-pc-win32".
+
+Daniel (9 March 2004)
+- Changed the internals to use curl_socket_t for socket variable type. This
+ should enable us to build with less warnings on Windows, where SOCKET is
+ used which is an unsigned int, while most other platforms use a mere int.
+
+- Modified lib/config-win32.h to build fine on MSVC again.
+
+Version 7.11.1-pre1 (8 March 2004)
+
+Daniel (8 March 2004)
+- Minor fix to make curl CURL_VERSION_LARGEFILE is only set if curl_off_t is
+ larger than 4 bytes.
+
+Daniel (4 March 2004)
+- Improved PUT/POST with NTLM/Digest authentication, the so called issue 12.
+
+- Modified the test HTTP server a lot to work with the upcoming changes for
+ PUT/POST with NTLM/Digest authentication (like test case 88). Added Andrés
+ García's win32-changes. Improved the logging.
+
+- Fixed the file:-related progress/getinfo stuff a bit more.
+
+Daniel (4 March 2004)
+- I corrected a problem with the multi interface when following a Location:
+ header or when doing multiple-request authentications. A subsequent request
+ could erroneously re-use a previous connection that was sent with
+ Connection: close. Christopher R. Palmer reported.
+
+- Andrés García patched curl to prevent warnings while compiling with mingw,
+ mainly because it is now possible to have both WIN32 and HAVE_CONFIG_H
+ defined.
+
+- When transferring files from a file: URL, the progress meter and other
+ transfer metrics were not updated properly.
+
+- David Byron provided a "version resource" file to the curl executable for
+ the windows builds.
+
+Daniel (3 March 2004)
+- David Byron's work on making libcurl only require winsock 1.1 on Windows
+ machines.
+
+- More variable cleanups based on compiler warnings generated by Tor Arntsen's
+ autobuilds with MIPSPro.
+
+- Joe Halpin helped us fix some pedantic compiler warnings on FreeBSD.
+
+- Applied Tom Bates' patch to build on nsr-tandem-nsk.
+
+- Dan Fandrich corrected some flaws in the configure GSS detection.
+
+Daniel (2 March 2004)
+- Fixed the libcurl code to use FORMAT_OFF_T for printf() formatting
+ curl_off_t types internally.
+
+Daniel (1 March 2004)
+- Added CURL_VERSION_LARGEFILE as a feature-bit in the curl_version_info()
+ response, that signals if this libcurl supports >2GB files. curl -V now
+ outputs 'Largefile' in the Features: field if this is the case. Most systems
+ are likely to support this.
+
+- We offer a CURL_FORMAT_OFF_T define in the public header, which can be used
+ to printf() curl_off_t variables. We also modified the libcurl sources to
+ use this define instead of the previous %Od approach (although I've left the
+ O-flag functional in the code). This should also prevent compilers to warn
+ on the home-grown option.
+
+- Fixed the resume-check code to test for a working resume at the end of the
+ headers and not at the first body-byte.
+
+- CURLOPT_DNS_USE_GLOBAL_CACHE is now considered obsolete. Stop using it. If
+ you need a global DNS cache for whatever reason, use the share interface and
+ you'll get a global cache that works the way it should work. You can even
+ have any number of global caches, all at your command. This is now also
+ mentioned in the docs.
+
+- Made the *printf code support the z-flag to enable size_t printf() in a
+ manner similar to how glibc allows it. To make printfing of this work on
+ platforms with 64bit size_t and 32bit ints. If there even are any! ;-)
+
+- Christopher R. Palmer discovered that if you CURLOPT_FRESH_CONNECT and
+ CURLAUTH_NTLM (or CURLAUTH_ANY and libcurl then picked NTLM), libcurl would
+ loop without succeeding to authenticate due to the new connection that was
+ made for all round-trips in the authentication. Now, the FRESH_CONNECT is
+ remade to only matter for the first connection made with curl_easy_perform()
+ and all the rest that might follow due to FOLLOWLOCATION or HTTP
+ authentication are now ignoring that option.
+
+- Adjusted the QUIT code slightly since it could core-dump.
+
+- Corrected the test suite's FTP server to provide a correct size to the
+ 'verifiedserver' request.
+
+Daniel (27 February 2004)
+- Joe Halpin made the FTP code send QUIT on the control connection before
+ disconnecting the TCP connection. This is what good-behaving ftp clients
+ should do.
+
+Daniel (26 February 2004)
+- David Byron updated several files to make curl build fine on MSVC 6. He
+ also added the 'buildconf.bat' that works like the 'buildconf + configure'
+ combo does on unixes.
+
+- Gisle Vanem made the memdebug stuff support calloc() as well.
+
+- Tor Arntsen pointed out that testcurl.sh needed to remove the generated
+ files in order to have them re-generated in each build.
+
+- Andy Serpa found out that the share interface did not enjoy life when not
+ having the lock and unlock callbacks set, even though documented to be
+ OK. It still is OK, and now the code won't segfault anymore!
+
+Daniel (25 February 2004)
+- Based on a patch by Greg Hewgill I modified how long long is used in the
+ mprintf code, as we can use a 64bit type with MSVC that is a long long
+ equivalent. This corrects some weird large file behaviors on windows.
+
+- Tor Arntsen helped me work out --enable-debug to work better with different
+ versions of the gcc and icc compilers.
+
+- Added CURLOPT_SHARE to the curl_easy_setopt.3 man page.
+
+Daniel (22 February 2004)
+- Applied the final pieces of Gisle Vanem's patch that brings a working name
+ resolve timeout to the windows versions of curl!
+
+Daniel (21 February 2004)
+- David Byron's fix to allow the speed-limit logic work even if you set
+ limit-rate. It does work on the expense of the rate limiter.
+
+Daniel (20 February 2004)
+- configure --enable-debug with gcc now also tries to detect the icc compiler
+ (which somehow gets treated as if it is a gcc) to stop using all the gcc
+ options with it, and we also provide -isystem options for each extra -I
+ option the configure script has figured out (for OpenSSL, kerberos, zlib,
+ Heimdal etc). This of course to prevent warnings on headers we don't have
+ control of.
+
+Daniel (19 February 2004)
+- Doug Porter made libcurl use the HOME environment variable before the
+ getpwuid results when looking for .netrc files.
+
+- If 'configure --enable-debug' is used with gcc, it now checks which gcc
+ version it is and uses as picky compiler options as possible for the
+ particular version.
+
+- Code that can be used in both the lib and in the curl app is now made to use
+ the curlx_ prefix. The first function to be available like this is the
+ curlx_strtoll() function. This is made to allow the app to use existing code,
+ but without polluting the libcurl API. Further explanations posted here:
+
+ http://curl.haxx.se/mail/lib-2004-02/0215.html
+
+Daniel (18 February 2004)
+- Fixed buildconf to not use "which" as AIX and Tru64 have what have been
+ referred to as "horribly broken 'which' programs".
+
+- Made sure dns cache timeout set to -1 really means caching forever.
+
+Daniel (17 February 2004)
+- Made it possibly to build c-ares with the libcurl memdebug system to better
+ track memory.
+
+Daniel (16 February 2004)
+- When using ares, we now initialize the ares 'channel' in curl_easy_init()
+ 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
+ re-used connections. Problem reported and fix verified by Grigory Entin.
+
+- Jeff Lawson fixed the version-check in the SOCKS5 code.
+
+Daniel (15 February 2004)
+- Fixed a case where a host cache entry was not flagged in-use properly when a
+ cached entry was used.
+
+- Andrés García's patch that checks for winmm in the configure script was
+ applied.
+
+Daniel (13 February 2004)
+- Ben Greear's SO_BINDTODEVICE patch for the binding of the local end to a
+ specific network interface.
+
+- Greg Hewgill found out that the variable holding 'contentlength' wasn't big
+ enough to hold a large file!
+
+- Tor Arntsen fixed a 64bit-related problem in date-related code in the ftp
+ department, and there was another potential problem in the name resolve code
+ too.
+
+Daniel (11 February 2004)
+- Removed a few variables that were only set but never used, as some compilers
+ warn about that and we do not like compiler warnings!
+
+- Removed the need for symlinks in the tests/data directory if curl is built
+ outside of the source directory and the 'make test' is used. This was done
+ by providing a "source dir path" to the scripts/servers.
+
+- Now, if the configure script can't find an nroff tool or an option to nroff
+ to use to convert man pages with, it will completely switch off the built-in
+ manual.
+
+- 'configure --disable-manual' completely disables the built-in manual from
+ the curl command tool.
+
+- Andrés García fixed the configure script and a minor source edit, and now
+ he has managed to get msys/mingw to run configure and then build!
+
+Daniel (9 February 2004)
+- The default HTTP Accept: header was modified to the much simpler
+ "Accept: */*".
+
+- P R Schaffner updated the curl-ssl spec file for RPMs.
+
+- Dominick Meglio brought lots of documentation for the share interface's man
+ pages that were previously missing.
+
+- 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.
+
+- Ken Rastatter provided portability fixes for the curlgtk.c example, and now
+ it runs on windows with GTK as well!
+
+Daniel (6 February 2004)
+- Andrés García made the configure script find gethostbyname() fine when run
+ with mingw on windows.
+
+- Modified the ldap code to use proper function pointers all over (instead of
+ mixed data and function pointers) to work-around the picky MIPSPro compiler
+ warnings.
+
+- A custom Host: header is only considered if the request is not made by
+ following a location. After discussions with Tim Baker.
+
+Daniel (5 February 2004)
+- The libz part of the configure script now only set the two libz-related
+ define HAVE_ZLIB_H and HAVE_LIBZ if both the lib and the header is found.
+ If one is missing, none of the defines is set.
+
+- Andrés García fixed the Mingw makefiles.
+
+- Len Krause reported that curl 7.9.X could do uploading from stdin without
+ doing chunked encoding, which current curl cannot do even if you disable
+ the transfer-encoding chunked header. Now it can again, and test case 98
+ 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
+ messages when bailing out in the that function.
+
+- Tor Arntsen now provides AIX and IRIX (using gcc, xlc and the MIPSPro
+ compilers) automated build logs (http://curl.haxx.se/auto/) and we've fixed
+ numerous minor quirks to make less warnings appear.
+
+Daniel (4 February 2004)
+- Based on a patch by Gilad, we now use the custom timeouts when waiting for a
+ server to connect when using FTP PORT. Previously we always waited 10
+ seconds, no more no less. We now also changed the default (if no timeout is
+ set) to wait 60 seconds for the connect before we fail.
+
+Daniel (3 February 2004)
+- Modified to link with c-ares instead of ares.
+
+Daniel (2 February 2004)
+- Added a configure test to check for which option the (g)nroff tool wants
+ to extract plain text from the man pages. Tor Arntsen told us the AIX
+ version of GNU gnroff doesn't support -man!
+
+- Added an undef of accept in memdebug.h to make curl build with --enable-debug
+ on AIX 5.2 which seems to have accept defined. Reported by Tor Arntsen.
+
+- curl_version() now includes c-ares version info, and curl_version_info() now
+ returns a struct with version SECOND that also includes that info.
+
+- We are now officially using c-ares for asynch name resolves. c-ares is the
+ new library, based on the existing ares but with an extended and slightly
+ modified API.
+
+- Dirk improved the ares timeout code, and now we also include the ares error
+ string when we fail to resolve a name.
+
+- Another tweak to make test case 91 run fine. Now we have another bit on a
+ connection that is set true if the connection is marked for 'retry'. That
+ makes the connection get closed and re-opened and the HTTP-done code must
+ not complain on the fact that no data was received.
+
+- Based on Dirk Manske's patch, I modified the name resolving with ares to
+ feature a timeout for really slow lookups. It now defaults to 300 seconds,
+ but is now adjusted to the CONNECTTIMEOUT/TIMOUE timeouts if one of them
+ is set.
+
+- Fixed the inclusion of ca-bundle.h to really use the one in the build dir
+ before the one in the source dir. Domenico Andreoli found out and reported.
+
+- Added test case 97, a simple POST with a custom Content-Type header
+ replacing the original application/x-www-form-urlencoded one.
+
+Daniel (30 January 2004)
+- Added code that attempts to fix the test 91 failure. As has been figured out
+ by Patrick Smith, the error happens because we re-use a connection that the
+ server is just about to close and we even manage to send away the request
+ without seeing an error. On the first read attempt we get a ECONNRESET.
+ Starting now, we attempt to detect this and if so, we retry the request on a
+ fresh connection.
+
+- I added test case 510 which is a custom program that does a POST using a
+ read callback, with chunked transfer-encoding.
+
+- Adjusted one of the MPE/iX changes as it made test case 504 fail all over.
+
+- Added --socks as a recognized option. It works just like --proxy but sets a
+ SOCKS5 proxy to use. SOCKS5 support has been available in libcurl for a
+ while, just not provided by the curl tool. This does not currently work for
+ IPv6-enabled libcurls.
+
+Daniel (29 January 2004)
+- Stadler Stephan pointed out that src/hugehelp.c included config.h without
+ checking the define if its present...
+
+- Ken Hirsch provided patches to make curl build fine on the MPE/iX operating
+ system.
+
+- Dan Fandrich compiled curl with lots of aggressively pedantic compiler
+ options and thus found a few minor errors and did some general cleanups to
+ avoid them.
+
+- Dirk Manske fixed a flaw in ares that prevented it to use non-blocking
+ sockets properly.
+
+Daniel (28 January 2004)
+- Richard Bramante fixed chunked transfer-encoded "uploads" to send a final
+ CRLF combo properly.
+
+Daniel (27 January 2004)
+- Made the response-headers during a CONNECT request to a proxy get passed on
+ as regular headers, so they appear with -i/-I options and similar.
+
+- Based on a patch by Gisle Vanem, I've made the progress meter display
+ properly switch to a GB-display when more than 9999MB have been transfered.
+
+Daniel (23 January 2004)
+- Gisle Vanem pointed out a curlrc parser problem/crash when an option with a
+ required didn't have one and was on the last line of a file.
+
+- More Windows fixes for large files. We now build and link with
+ ../lib/strtoofft.c in the app code since Curl_strtoll() is not a provided
+ libcurl function... Perhaps we should consider a 'common' dir or similar
+ where we put source code used in both the lib and the client. Or perhaps
+ we'll just make this function available in the library...
+
+- Vincent Bronner found out the socks5 code crashed when no username was
+ set.
+
+- Vincent Bronner spotted a problem with proxy username/password when re-using
+ a persistent connection.
+
+- Fixed the progress meter display for files larger than 2^31 bytes. Gisle
+ Vanem reported.
+
+Daniel (22 January 2004)
+- Gisle Vanem made strtoll() get used when curl is built with the mingw
+ compiler.
+
+- Gisle Vanem fixed the compressed help text code to display properly.
+
+- Removed the '#define HttpPost' from the public header file, as curl_httppost
+ is the proper name and it has been for quite some time now. Fixes another
+ name space pollution.
+
+- Added 'curl_off_t' typedef in the public header file, to be used to provide
+ large file sizes to the *_LARGE options. Adjusted the code all over to use
+ this variable type instead of 'off_t'. This is an attempt to make the large
+ file support work on more platforms. The configure script now checks the
+ size of the curl_off_t instead of the plain off_t.
+
+Version 7.11.0 (22 January 2004)
+
+Daniel (21 January 2004)
+- Removed the defines in the public header file with TIMECOND_ prefixes. They
+ have been obsolete since April 22nd 2002, and if this causes anyone any
+ problems now it is very easy to just add CURL_ to the names. This corrects
+ this name space pollution.
+
+Daniel (19 January 2004)
+- David Byron cleaned up how --trace with no option was treated, and also
+ arguments in a config file without a required parameter!
+
+Daniel (16 January 2004)
+- Gisle Vanem fixed a few issues where compilers warned about variables
+ possibly being used unassigned.
+
+- Minor Interix build problem fixed.
+
+Daniel (15 January 2004)
+- Peter Sylvester pointed out some necessary escaping needed in the
+ acinclude.m4 file when automake 1.8 or later is used.
+
+Daniel (14 January 2004)
+- Vincent Bronner fixed the Curl_resolv() return code. This extends the fix
+ Steve Green provided on december 3...
+
+Daniel (13 January 2004)
+- Luke Call made the win32 version of the password prompting function support
+ backspace.
+
+- Dan Fandrich fixed the hugehelp source file to contain both a compressed and
+ an uncompressed version in the distribution, so that more people easier can
+ build curl with the compressed version.
+
+- Diego Casorran brought another AmigaOS build patch for native Amiga builds.
+
+- Matt Veenstra updated the Mac OS X framework files.
+
+- Brian R Duffy brought a section to the INSTALL file on how to build a
+ SSL-enabled curl using the free Borland C++ compiler. He also updated the
+ Borland lib/Makefile.b32.
+
+- I fixed the test case 509 which I broke yesterday. Now the libtest are
+ compiled with an include path that points to the library's source dir, so
+ that the libtests can include files from the source tree. This was made to
+ make it possible to use the USE_SSLEAY define in the library test files.
+
+Daniel (12 January 2004)
+- Peter Sylvester brought code that now allows a callback to modified the URL
+ even when the multi interface is used, and then libcurl will simulate a
+ "follow location" to that new URL. Test 509 was added to test this feature.
+
+- Extended the time we retry servers in the test script, and I also made it
+ retry the https and ftps servers before they are considered bad. I believe
+ the previous approach could turn problematic on really slow hosts.
+
+Version 7.11.0-pre1 (12 January 2004)
+
+Daniel (11 January 2004)
+- Dominick Meglio pointed out FTPS should use default port 990 according to
+ IANA.
+
+Daniel (8 January 2004)
+- Fixed the SPNEGO configure check to not use -R or other non-portable options
+ in the LDFLAGS. Reported by Pierre in bug report #872930.
+
+Daniel (5 January 2004)
+- Dan Fandrich provided a fix on our zlib usage.
+
+- David J Meyer's patch that introduce large file support to libcurl was
+ applied. New curl_easy_setopt options that accept 'off_t' arguments are:
+
+ INFILESIZE_LARGE
+ RESUME_FROM_LARGE
+ MAXFILESIZE_LARGE
+
+Daniel (4 January 2004)
+- Based on Dominick Meglio's comments, I made our private version of
+ gettimeofday() declared static. This would otherwise collide with the same
+ function in other libs (like ares for example).
+
+- Added Dominick Meglio's description on how to build libcurl with ares
+ on win32.
+Daniel (19 December)
+- CURLOPT_IPRESOLVE was not possible to set.
+
+- Gisle Vanem updated the djgpp build files.
+
+Daniel (18 December)
+- John McGowan reported a redirect-problem that happened if a site used a URL
+ like "url.com?var=content" (without a proper slash) and from that address
+ redirected the user-agent to an absolute directory.
+
+- David Byron made libcurl build fine with both the .NET and VC6 versions of
+ MSVC
+
+Daniel (16 December)
+- Updated test 506 since it started to fail after the cache prune change
+ yesterday. I also changed it slightly to feature a counter in each debug
+ output for easier tracing.
+
+Daniel (15 December)
+- Old DNS cache entries are now only pruned after curl is done with a request,
+ and not in the actual name resolve call.
+
+- corrected the --enable-ares patch
+
+- Giuseppe Attardi found and fixed a problem within libcurl that re-used
+ already freed memory.
+
+Daniel (10 December)
+- Gisle Vanem reported that the dict support was broken. I broke it during my
+ ftps-changes overhaul. I've now added a 'curlassert' function that can be
+ used to verify expressions, to prevent future errors of the same
+ kind. They're only present in debug-builds.
+
+- Diego Casorran made curl and libcurl possible to build natively (no more
+ need for the ixemul library) on AmigaOS.
+
+- Dominick Meglio made configure --enable-ares support a given path to the
+ installed ares lib, instead of always using it in the curl source tree.
+ This also fixed the curl-config --libs output.
+
+- Eric S. Raymond patched a very minor man page format error in
+ libcurl-errors.3
+
+Daniel (8 December)
+- Fixed the flaw that made -lz appear twice on the link command line.
+
+- After correspondence with Gisle Vanem, I changed the 'connection aborted'
+ error text when the FTP response reader failed to more specificly identify
+ what the problem is.
+
+- Based on a patch from Dominick Meglio, curl-config --feature now outputs
+ 'AsynchDNS' as a feature if libcurl was built with ares. The feature name
+ is the same that 'curl -V' outputs, for simplicity.
+
+Daniel (3 December)
+- Marty Kuhrt made the build up-to-date on VMS, and moved most of the VMS-
+ specific stuff in the client code to a separate header file.
+
+- Steve Green fixed a return code bug in Curl_resolv(), that made the socks5
+ code fail.
+
+- swalkaus at yahoo.com patched libcurl to ignore Content-Length: headers
+ when Transfer-Encoding: chunked is used, as mandated by RFC2616.
+
+Daniel (2 December)
+- --ftp-pasv was added, which serves the only purpose of overriding a
+ previously set --ftpport option. Starting now, --ftp-port is a recognized
+ alias for --ftpport for consistency.
+
+- Giuseppe Attardi pointed out that we should use MSG_NOSIGNAL when we use
+ send() and recv(). I added checks for the define in the configure script and
+ adjusted the code accordingly. If the symbol is present, we won't attempt
+ to ignore the SIGPIPE signal.
+
+Daniel (1 December)
+- Mathias Axelsson set up a bsdftpd-ssl server for me and I could make curl
+ run fine against its FTPS implementation. Now these FTPS-related things
+ work:
+ o explicit and implicit FTPS
+ o active (PORT) and passive (PASV)
+ o upload and download
+ o verified against bsdftpd-ssl and RaidenFTPD
+
+Daniel (27 November)
+- James Clancy made the Borland Makefiles up to date.
+
+- Markus Moeller improved the SPNEGO detection in the configure script.
+
+Daniel (25 November)
+- Dave May filed bug report #848371, identifying that if you'd do POST over a
+ proxy to a https server, libcurl didn't POST at all, it just made a GET! It
+ turned out to be because libcurl wrongly didn't consider the authentication
+ "negotiation phase" to be complete yet.
+
+ I added test case 95 to verify my fix for this.
+
+Daniel (24 November)
+- Thanks to Mathias Axelsson, I've been able to work on FTPS for libcurl and it
+ seems to work somewhat fine now.
+
+ The FTPS stuff is based on RFC2228 and the murray-auth-ftp-ssl draft
+ (version 12). There seems to exist quite a few servers that have implemented
+ the server side of this.
+
+ We can now use ftps:// URLs to explicitly switch on SSL/TSL for the control
+ connection and the data connection (dealing with two SSL connections forced
+ me to change a lot of stuff in libcurl).
+
+ Alternatively, and what seems to be the recommended way, we can set the new
+ option CURLOPT_FTP_SSL to one of these values:
+
+ CURLFTPSSL_NOPE, - do not attempt to use SSL
+ CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise
+ CURLFTPSSL_CONTROL - SSL for the control connection or fail
+ CURLFTPSSL_ALL - SSL for all communication or fail
+
+ Any failure to set the desired level will make libcurl fail with the error
+ code CURLE_FTP_SSL_FAILED. This new option makes a "normal" ftp:// transfer
+ attempt to be made securely.
+
+ I've been able to login and get files (passively) from Mathias' server using
+ both ftps:// and CURLOPT_FTP_SSL. (I've made 'curl' understand the --ftp-ssl
+ option that sets CURLFTPSSL_TRY.)
+
+- Gaz Iqbal fixed a range string memory leak.
+
+- Gisle Vanem fixed the Windows builds.
+
+- Added the new FTPSSL defines in curl/curl.h
+
+Daniel (20 November)
+- Josh Kapell filed bug report #845247 as he found an endless loop when
+ getting a 407 back from a proxy when no user+password was given. Added test
+ case 94 to verify the fix.
+
+Daniel (19 November)
+- Kevin Roth fixed a progress-bar problem on Windows.
+
+- While working with Nicolas Croiset's bug report #843739, I noticed two minor
+ problems related to ftp partial downloads: if a partial transfer is
+ detected, we must close the connection as we cannot know in what state it is
+ anymore. This looks like a ProFTPD bug:
+ http://curl.haxx.se/mail/lib-2003-11/0079.html
+
+Daniel (17 November)
+- Maciej W. Rozycki made the configure script use a cache variable for the
+ writable argv test. This way, the default can be overridden better (for
+ cross-compiles etc)
+
+Daniel (15 November)
+- Mathias Axelsson found out libcurl sometimes freed the server certificate
+ twice, leading to crashes!
+
+Daniel (14 November)
+- Siddhartha Prakash Jain found a case with a bad resolve that we didn't
+ properly bail out from, when using ares.
+
+Daniel (13 November)
+- Default Content-Type for parts in multipart formposts has changed to
+ "application/octet-stream". This seems more appropriate, and I believe
+ mozilla and the likes do this. In the same area: .html files now get
+ text/html as Content-Type. (Pointed out in bug report #839806)
+
+- Gisle Vanem corrected the --progress-bar output by doing a flush of the
+ output, which apparently makes it look better on at least windows, but
+ 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
+ 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.
+
+Daniel (11 November)
+- Added CURLOPT_NETRC_FILE. Use this to tell libcurl which file to use instead
+ of trying to find a .netrc in the current user's home directory. The
+ existing .netrc file finder is somewhat naive and is far from perfect on
+ several platforms that aren't unix-style. If this option isn't set when
+ CURLOPT_NETRC is set, the previous approach will still be used.
+
+ The current .netrc check code now also support longer than 256 bytes path
+ names.
+
+Daniel (10 November)
+- Kang-Jin Lee pointed out that the generated ca-bundle.h file shouldn't be
+ written in the source dir if a different build dir is used.
+
+- After Sébastien Willemijns' bug report, we now check the separators properly
+ in the 229-reply servers respond on a EPSV command and bail out better if
+ the reply string is not RFC2428-compliant.
+
+Daniel (7 November)
+- Based on Gisle Vanem's patch, I made curl try harder to get the home
+ directory of the current user, in order to find the default .curlrc file.
+ We're also considering moving out the HOME-dir code from libcurl, and
+ instead have the app pass in the path to the .netrc file (which is the only
+ logic left in libcurl that uses the HOME dir). Then curl can use the home
+ dir for that purpose too.
+
+- Ralph Mitchell's updated testcurl.sh to the script to take an existing
+ directory name and build/run/test curl in there instead of trying to update
+ from CVS. Using this approach, the script can now be used to test daily
+ tarballs etc.
+
+- Gisle Vanem added a "resource file" to the Windows DLL builds, to contain
+ information such as version number, library name, copyright info etc.
+
+Daniel (6 November)
+- curl checks if the existing libcurl supports things like --ntlm, --negotiate
+ and --krb4 and returns error if not.
+
+- I added three new global defines in the curl/curl.h header:
+ LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR and LIBCURL_VERSION_PATCH. They
+ are the three numbers in the library's version number, separated for easier
+ usage. 'maketgz' was updated accordingly to generate these numbers properly
+ when building release-archives.
+
+- Uninitialized variable fix, reported by both Marty Kuhrt and Benjamin
+ Gerard.
+
+- Matt Veenstra provided build files to build libcurl as a "framework" under
+ Mac OS X. See the lib/libcurl.framework.make for details.
+
+- Removed the defines of TRUE and FALSE from the curl/curl.h header file.
+ They're not in our name space so we should not fiddle with them.
+
+Daniel (5 November)
+- Replaced the man page to HTML converter program with a new one: roffit.
+ Makes nicer web pages.
+
+Daniel (4 November)
+- Troels Walsted Hansen fixed the MSVC makefiles to let them build curl fine
+ on Windows.
+
+- Kevin Roth corrected the cygwin package generator and spell-fixed the
+ comment in the ca-bundle.h file.
+
+Version 7.10.8 (1 November 2003)
+
+Daniel (31 October)
+- Assume that MDTM on an FTP server returns the timestamp using the UTC time
+ zone. This changes the time CURLINFO_FILETIME returns for a given file over
+ FTP, and will change existing uses of CURLOPT_TIMECONDITION. It will make
+ the functionality more similar to how the HTTP one is already working.
+
+- Command line options that take numerical parameters (such as -y, -Y, -C etc)
+ now report error and exit if the parameter isn't truly a number greater than
+ or equal to zero. This helps users to notice bad usage earlier. Before, when
+ a user forgot or missed to add a numerical parameter to an option, the
+ command line parser would simply "eat" the following option and it would
+ cause great confusion.
+
+Daniel (30 October)
+- David Hull made libcurl deal with NOBODY and HEADER for file:// the same way
+ it already does for FTP: it provides HTTP-looking headers that provide info
+ only about the file, without doing the actual transfer. The curl tool then
+ lets --head do this.
+
+Daniel (29 October)
+- runtests.pl now checks for and use valgrind if present. It will redirect the
+ valgrind results in log/valgrind[num] but it currently doesn't scan that
+ file for any errors or anything, that is still only made manually.
+
+- David Hull made the file: URL parser also accept the somewhat sloppy file
+ syntax: file:/path. I added test case 203 to verify this.
+
+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
+ builds of libcurl would often fail to resolve perfectly resolvable host
+ names.
+
+Daniel (26 October)
+- James Bursa found out that curl_msnprintf() could write the trailing
+ zero-byte outside its given buffer size. This could happen if you generated
+ a very long error message as then libcurl would overwrite the ERRORBUFFER
+ with one byte. Using a non-existing very long local file:// name is one case
+ that could make this occur.
+
+Daniel (24 October)
+- David Hull filed bug report #829827. It identified a problem with -C - if
+ the full file already was downloaded and thus the server responded with a
+ 416. libcurl would then wrongly use the Content-Length: header and expect
+ that size to get transfer, causing a "hang" until the server closed the
+ connection and then an error 18 ("still N bytes data left of the transfer").
+
+ Now we don't return any error at all, but I think libcurl should perhaps
+ return some kind of info since the requested range was out of the size of
+ the document.
+
+- Based on David Hull's fix in bug report #804599, we now check for solaris and
+ gcc in configure and set the -mimpure-text link flag for linking the lib
+ better.
+
+- I've introduced a -t option to the runtests.pl script. With that option set,
+ the script runs special "memory torture" tests. For each test command line
+ in that section, the script first runs the command line and counts the total
+ amount of allocations made. It then runs the exact same command line again,
+ forcing allocation number N to fail. It will try every N from 1 to the total
+ number of amounts made. For every invoke, it checks that no memory was
+ leaked as that would indicate a bad cleanup somewhere in the code.
+
+ This is just beginning to work, and I've already made some corrections in
+ libcurl code. When this code works somewhat fine, I'll make sure 'make test'
+ in the root dir will run these tests as well.
+
+Daniel (23 October)
+- Georg Horn fixed how the CA verification is made. Verifications can now be
+ made while at the same time the result of it can be ignored. This also
+ affects the curl tool as -k can now be used together with --cacert or
+ --capath.
+
+Daniel (22 October)
+- Gisle Vanem found out --disable-eprt didn't work and patched it.
+
+- Test case 91 was modified and could now repeat the problem Kevin Roth has
+ reported, and the bug was fixed.
+
+- Dylan Ellicott added vc-libcurl-ssl-dll as a target to the root makefile
+ to build a static libcurl that links with a shared OpenSSL using MSVC.
+
+Daniel (21 October)
+- Andrés García updated the mingw32 makefiles.
+
+Version 7.10.8-pre5 (21 October 2003)
+
+Daniel (19 October)
+- Georg Horn made libcurl output more info on SSL failures when receiving
+ data.
+
+Version 7.10.8-pre4 (18 October 2003)
+
+Daniel (17 October)
+- Dominick Meglio implemented CURLOPT_MAXFILESIZE and --max-filesize.
+
+- Made libcurl show verbose info about what auth type and user name that is
+ being sent in its HTTP request-headers.
+
+Daniel (16 October)
+- Removed support for CURLOPT_PASSWDFUNCTION and CURLOPT_PASSWDDATA. libcurl
+ no longer prompt for passwords under any circumstances. Password prompting
+ was instead moved to curl, which now prompts for password if -u or -U lack
+ it. This solves the problem Kevin Roth reported when curl prompted for
+ password twice when doing NTLM authentication.
+
+- I rewrote the SSL subjectAltName check to avoid having to rely on OpenLDAP-
+ licensed derivate code.
+
+Daniel (15 October)
+- Avoid doing getsockopt() on Windows to verify connects. It seems that this
+ hogs Windows machines when libcurl is being used multi-threaded (with > ~50
+ threads). Andrew Fuller helped us verify and test this.
+
+Daniel (14 October)
+- Kimmo Kinnunen fixed a crash with duphandle() when CURLDEBUG is set.
+
+- Gisle Vanem made libcurl build and work with IPv6 on Windows.
+
+Daniel (13 October)
+- Giuseppe Attardi reported yet another segfault with ares and the multi
+ interface. Me fixed.
+
+- Domenico Andreoli removed the extra LDFLAGS assignment in lib/Makefile.am
+ that was reported about in the debian bug report #212086.
+
+ Domenico also fixed two makefiles where we used 'gnroff' instead of the more
+ portable $(NROFF).
+
+Daniel (12 October)
+- Dirk Manske made the share locking around DNS lookups slightly different to
+ allow the share system's DNS lookups to run somewhat more
+ independent/faster.
+
+Daniel (9 October)
+- Lachlan O'Dea fixed a resume problem: "If I set CURLOPT_RESUME_FROM, perform
+ an HTTP download, then reset CURLOPT_RESUME_FROM to 0, the next download
+ still has a Range header with a garbage value." bug report #820502
+
+- Dominick Meglio made the inet_pton.c file build fine using MSVC.
+
+- The 'sws' test suite web server now #include setup.h from the lib directory.
+ This makes it more portable easier.
+
+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).
+
+Daniel (7 October)
+- Neil Dunbar provided a patch that now makes libcurl check SSL
+ subjectAltNames when matching certs. This is apparently detailed in RFC2818
+ as the right thing to do. I had to add configure checks for inet_pton() and
+ our own (strictly speaking, code from BIND written by Paul Vixie) provided
+ code for the function for platforms that miss it.
+
+- HTTP POST using the read callback didn't work, as Florian Schoppmann
+ reported.
+
+Daniel (5 October)
+- Shared provided a few fixes to make libcurl build on BeOS
+ out-of-the-box. New code for BeOS-style non-blocking sockets, provided by
+ Shard and Jeremy Friesner. Modified the autoconf check for non-blocking
+ sockets to check for this kind too.
+
+Daniel (4 October)
+- Vincent Bronner pointed out that if you set CURLOPT_COOKIE for a transfer
+ and then set it to NULL in a subsequent one, the previous cookie was still
+ sent off!
+
+- Jon Turner fixed a problem libcurl had when it failed on an FTP transfer due
+ to a bad path, it would cause the next transfer to use a bad path as well.
+
+- Siddhartha Prakash Jain provided a patch with a fix for libcurl with ares,
+ when working on IP-only names as we then could return "wait" status when the
+ name in fact already was resolved. I edited the patch slightly to not expose
+ asynch details to non-ares aware source code.
+
+Daniel (3 October)
+- Neil Spring posted the debian bug report #213180, and pointed out that using
+ the name 'access' in a function prototype is not very wise as some compilers
+ complain.
+
+- Peter Sylvester provided his and Jean-Paul Merlin's curlx.c example source
+ code that shows how they use ssl and callbacks.
+
+Daniel (2 October)
+- James MacMillan's patch makes curl build on QNX 6.2.x.
+
+Daniel (26 September)
+- My daughter was born!
+
+Daniel (23 September)
+- Added support for -4/--ipv4 and -6/--ipv6 to force names to resolve to that
+ particular IP version. They only work for IPv6-enabled libcurls.
+
+- curl -V now outputs 'SPNEGO' as a feature in case libcurl was built to
+ support that.
+
+Version 7.10.8-pre2 (22 September 2003)
+
+Daniel (22 September)
+- Giuseppe Attardi found a segfault in libcurl when using the multi interface
+ with ares and doing repeated operations against a non-resolving host name.
+
+Daniel (19 September)
+- Added the CURLOPT_IPRESOLVE option, that allows an application to select
+ what kind of IP addresses he wants to use when resolving host names. This
+ is only interesting when using host names that resolve addresses using more
+ than one version of IP.
+
+- Applied Markus Moeller's patch that introduces SPNEGO support if libcurl
+ is built with the FBopenssl libraries. curl_version_info() now returns
+ info on SPNEGO availability. The patch also made the GSSAPI stuff work fine
+ with the MIT GSS-library (the Heimdal one still works too).
+
+Daniel (16 September)
+- Doing PUT with --digest failed, as reported in bug report #805853.
+
+- Using --anyauth that picked NTLM, and then a redirect closed the connection
+ and took curl to a second NTLM page made curl fail. Bug report #806328
+ identified the problem, test case 90 was added to verify the fix.
+
+Daniel (14 September)
+- codemastr brought a patch for ares to make the Windows portions of it work
+ properly on NT4. I uploaded a new diff and updated the docs on where to get
+ it etc.
+
+- Jeff Pohlmeyer tracked down a very hard-to-find bug where we removed a
+ cached DNS entry even though it may be in use, which caused "random" memory
+ to get overwritten and thus "random" crashes.
+
+Daniel (12 September)
+- Based on a bug report by David Kimdon, I made the runtests.pl script clear
+ all possible proxy environment variables before the tests are run.
+
+- By default, easy handles within a multi handle now share DNS cache.
+
+- Tim Bartley brought a patch that makes the GSSNEGOTIATE option work for
+ Microsoft's "Negotiate" authentication as well.
+
+Daniel (11 September)
+- A zero-length proxy string confused FTP transfers.
+
+- Bjorn Reese found a case with an uninitialized pointer, only present when
+ built for ares.
+
+Version 7.10.8-pre1 (8 September 2003)
+
+Daniel (7 September)
+- Jurij Smakov found out that the non-OpenSSL MD5 code was not working on
+ Alpha (or ia64). Only the OpenSSL-version did. I made a fix I think corrects
+ the problem.
+
+Daniel (5 September)
+- Kevin Fisk reported that configure --enable-thread didn't work. I fixed.
+
+- De-macrofied the lib/hash.c source code somewhat.
+
+Daniel (4 September)
+- CURLINFO_HTTPAUTH_AVAIL and CURLINFO_PROXYAUTH_AVAIL added, Based on Joerg
+ Mueller-Tolk's patch,
+
+Early (4 September)
+- Added CURLOPT_FTP_RESPONSE_TIMEOUT - allows user to set strict timeout
+ requirements on the FTP server's ability to respond to individual commands
+ without placing global requirements on transfer or connect time. Files
+ affected:
+ - include/curl/curl.h
+ Added option CURLOPT_FTP_RESPONSE_TIMEOUT
+ - lib/ftp.c
+ Added branch inside Curl_GetFTPResponse to check for
+ data->set.ftp_response_timeout
+ - lib/url.c
+ Modified Curl_setopt to recognize CURLOPT_FTP_RESPONSE_TIMEOUT
+ - lib/urldata.h
+ Added ftp_response_timeout to struct UserDefined
+
+Daniel (3 September)
+- Peter Pentchev found and fixed two problems in the test suite's web server
+ code, that made it segfault at times.
+
+- Jörg Mueller-Tolk improved the proxy user+password handling, especially
+ when providing a blank password.
+
+Daniel (2 September)
+- Fix for making CONNECT to proxies do the correct magic to allow NTLM, Digest
+ and similar to work.
+
+Daniel (1 September)
+- Henrik Storner made libcurl work fine with OpenLDAP 2.1.22 (current).
+
+- Jeff Pohlmeyer added a proper error message for non-resolving hosts when
+ using ares for lookups.
+
+Daniel (25 August)
+- John McGowan reported that curl -k still failed if the HTTPS server's CN
+ field wasn't obtainable. This was due to the CURLOPT_SSL_VERIFYHOST being
+ set to 1, and libcurl failed if the CN was missing. Starting now, having it
+ set to 1 will simply output a warning if no CN could be obtained (as having
+ a mismatch is OK).
+
+Daniel (21 August)
+- Vincent Sanders provided a fix for name resolving when linked with uClibc.
+
+Daniel (20 August)
+- Gerd v. Egidy provided a patch that makes libcurl store the FTP response
+ code from ftp servers. Using curl_easy_getinfo() with CURLINFO_HTTP_CODE
+ returns that data. The option is therefore now also known as
+ CURLINFO_RESPONSE_CODE.
+
+- Antoine Calando found a segfault when doing multi-part/formpost using
+ the multi interface.
+
+- Antoine Calando pointed out that curl_multi_info_read() didn't set the
+ msgs_in_queue to 0 properly when returning NULL.
+
+Daniel (19 August)
+- I made curl support multiple -T options, as well as -T "{file1,file2}"
+ style globbing. One -T for each URL is supported.
+
+- Jeff Pohlmeyer found a segfault when using ares-enabled libcurl and the
+ multi interface when trying a non-existing host name.
+
+- Made the libcurl printf code support long longs if available.
+
+- Loren Kirkby pointed out that we did not clean up all SSL-allocated memory
+ in curl_global_cleanup().
+
+Daniel (17 August)
+- Setting CURLOPT_WRITEFUNCTION or CURLOPT_READFUNCTION to NULL will now make
+ them get the internal defaults restored. Previously this could cause a
+ segfault. We should aim at having all pointer-related options get restored
+ to default/safe values when set to NULL.
+
+Version 7.10.7 (15 August 2003)
+
+Daniel (14 August)
+- I modified the memdebug system to return failure on memory allocation
+ functions after a set amount of successful ones. This enables us to test
+ out-of-memory situations in a controlled manner and we can make sure that
+ curl/libcurl behaves good in those.
+
+ This made me find and fix several spots where we did not cleanup properly
+ when bailing out due to errors (low memory).
+
+- Corrected test case 74. Made using -o with bad #[num] codes complain and
+ bail out. Made #[num] support numbers larger than 9 as well. Added test
+ case 86 for a proper range globbing test as well.
+
+Version 7.10.7-pre4 (12 August 2003)
+
+Daniel (12 August)
+- curl_version_info() now returns a flag if libcurl was built with asynch DNS
+ support, and this is now also displayed with 'curl -V'.
+
+- Added a few new man pages to the docs/libcurl dir: curl_share_init,
+ curl_share_setopt, curl_share_cleanup, libcurl-easy and libcurl-share.
+
+Daniel (11 August)
+- Mike Cherepov made the local binding code work for Windows, which makes
+ the option CURLOPT_INTERFACE work on Windows as well.
+
+- Vincent Sanders updated the fopen.c example code a lot.
+
+- --proxy-ntlm is now supported by the curl tool. It forces the proxy
+ authentication to be made using NTLM. It does not yet work for HTTPS over
+ proxies (or other proxy-tunneling options). Test case 81 and 82 do some
+ simple initial ntlm testing.
+
+- Found and fixed a minor memory leak on re-used connections with
+ proxy-authentication.
+
+- I removed -@ and -Z as valid short options. They were very rarely used (@
+ wasn't even documented).
+
+- Serge Semashko introduced CURLOPT_PROXYAUTH, and make it work when set to
+ CURLAUTH_NTLM and/or CURLAUTH_BASIC. The PROXAUTH is similar to HTTPAUTH,
+ but is for the proxy connection only, and HTTPAUTH is for the remote host.
+
+- Fixed loading of cookies with blank contents from a cookie jar. Also made the
+ cookie functions inform on added and skipped cookies (for cookie debugging).
+
+Version 7.10.7-pre3 (8 August 2003)
+
+Daniel (8 August)
+- Applied David Byron's fix for file:// URLs with drive letters included.
+
+- I added the --ftp-create-dirs to the client code, which activates Early's
+ CURLOPT_FTP_CREATE_MISSING_DIRS option, and wrote test case 147 to verify
+ it. Added the option to the curl.1 man page too. Added the option to the
+ curl_easy_setopt.3 man page too.
+
+Daniel (7 August)
+- Test case 60 failed on ia64 and AMD Opteron. Fixed now.
+
+- Fixed a printf problem that resulted in urlglobbing bugs (bug #203827 in the
+ debian bug tracker). Added test case 74 to verify the fix and to discover if
+ this breaks in the future.
+
+- "make distcheck" works again.
+
+Version 7.10.7-pre2 (6 August 2003)
+
+Daniel (5 August)
+- Duncan Wilcox helped me verify that the latest incarnation of my ares patch
+ builds fine on Mac OS X (see the new lib/README.ares) file for all details.
+
+- Salvatore Sorrentino filed bug report #783116 and Early Ehlinger posted a
+ bug report to the libcurl list, both identifying a problem with FTP
+ persistent connections and how the dir hierarchy was not properly reset
+ between files.
+
+- David Byron's thoughts on a fixed Makefile in tests/ were applied.
+
+- Jan Sundin reported a case where curl ignored a cookie that browsers don't,
+ which turned up to be due to the number of dots in the 'domain'. I've now
+ made curl follow the the original netscape cookie spec less strict on that
+ part.
+
+Daniel (4 August)
+- Dirk Manske added cookie support for the experimental, hidden and still
+ undocumented share feature!
+
+- Mark Fletcher provided an excellent bug report that identified a problem
+ with FOLLOWLOCATION and chunked transfer-encoding, as libcurl would not
+ properly ignore the body contents of 3XX response that included the
+ Location: header.
+
+Early (6 August)
+- Added option CURLOPT_FTP_CREATE_MISSING_DIRS
+ This option will force the target file's path to be created if it
+ does not already exist on the remote system.
+
+ Files affected:
+ - include/curl/curl.h
+ Added option CURLOPT_FTP_CREATE_MISSING_DIRS
+ - lib/ftp.c
+ Added function ftp_mkd, which issues a MKD command
+ Added function ftp_force_cwd, which attempts a CWD,
+ and does a MKD and retries the CWD if the original CWD
+ fails
+ Modified ftp_perform() to call its change directory function
+ through a pointer. The pointer points to ftp_cwd by default,
+ and is modified to point to ftp_force_cwd IFF
+ data->set.ftp_create_missing_dirs is not 0.
+ - lib/url.c
+ Modified Curl_setopt to recognize CURLOPT_FTP_CREATE_MISSING_DIRS
+ - lib/urldata.h
+ Added ftp_create_missing_dirs to struct UserDefined
+
+- Minor Bugfix for CURLOPT_TIMECONDITION with FTP - if the file was not
+ present to do the time comparison, it would fail.
+ Files affected:
+ - lib/ftp.c
+ In ftp_perform(), the call to ftp_getfiletime() used to be followed
+ by
+ if (result)
+ return result;
+ And then by the code that actually did the time comparison.
+ The code that did the comparison handled the case where the filetime
+ was not available (as indicated by info.filetime < 0 or set.timevalue
+ < 0), so I replaced the if (result) return result with a switch(result)
+ that allows CURLE_FTP_COULDNT_RETR_FILE to fall through to the
+ normal time comparison.
+
+Daniel (3 August)
+- When proxy authentication is used in a CONNECT request (as used for all SSL
+ connects and otherwise enforced tunnel-thru-proxy requests), the same
+ authentication header is also wrongly sent to the remote host.
+
+ This is a rather significant info leak. I've fixed it now and mailed a patch
+ and warning to the mailing lists.
+
+Daniel (1 August)
+- David Byron provided a patch to make 7.10.6 build correctly with the
+ compressed hugehelp.c source file.
+
+Version 7.10.7-pre1 (31 July 2003)
+
+Daniel (30 July)
+- Jörg Müller-Tolk updated the VC makefile.
+
+- Daniel Noguerol made the ftp code output "Accept-Ranges: bytes" in similar
+ style like other faked HTTP headers when NOBODY and HEADER are used. I
+ updated two corresponding test cases too.
+
+- Marty Kuhrt pointed out a compilation problem on VMS due to my having
+ changed a type from long to time_t, and I'm now changing it back to work
+ more portably...
+
+ He also indicated that distributing the src/hugehelp.c in a compressed state
+ like I accidentally did may not be the smartest move... I've now fixed the
+ distribute procedure to automatically generate an uncompressed version when I
+ make release archives.
+
+Daniel (29 July)
+- Gisle Vanem brought changes to the mkhelp script for the generation of the
+ compressed help text on some platforms.
+
+Version 7.10.6 (28 July 2003)
+
+Daniel (28 July)
+- François Pons brought a patch that once again made curl deal with ftp and
+ "double slash" as indicating the root directory. In the RFC1738-fix of April
+ 30, that ability was removed (since it is not the "right" way). So, starting
+ now we can list the root dir of an ftp server both these ways:
+
+ curl ftp://server.com/%2f as well as
+ curl ftp://server.com//
+
+Daniel (24 July)
+- Henry Bland pointed out that we included sys/resource.h without good reason
+ in several source files. Without it included, QNX builds better...
+
+- Andrés García updated the mingw makefiles.
+
+Daniel (23 July)
+- Tracy Boehrer experienced DNS cache problems and did some nice debugging
+ and tracking which made it easy for me to correct the problem and Tracy
+ could verify that it did cure the problem! When re-using a connection we
+ now make sure we don't re-use the 'connect_addr' struct.
+
+- Daniel Kouril corrected the GSS-Negotiate code.
+
+- Juan F. Codagnone provided fixes to allow curl to build fine on Windows
+ again.
+
+Daniel (22 July)
+- Edited the curl/curl.h include file to build on Windows properly.
+
+Daniel (21 July)
+- Moved the proxy credentials from the SessionHandle struct to the connectdata
+ struct, to make multiple proxy connections with differerent user names work.
+
+- Adjusted the NTLM code to support proxy functionality.
+
+- Made the krb4 stuff compile with the user+password fields moved.
+
+Version 7.10.6-pre4 (21 July 2003)
+
+Daniel (20 July)
+- David Gardner pointed out in bug report 770755 that using the FTP command
+ CWD with a blank argument is a bad idea and I made libcurl skip empty path
+ segments starting now.
+
+Daniel (18 July)
+- Cris pointed out that my fix on July 16th didn't work fully. His pointing
+ out this (and his patch) also made me realize that we have a very similar
+ bug in the FTP connection re-use code. We must store a separate user and
+ password field for each connection we keep (at least for FTP and HTTP+NTLM
+ connections, so I made us do this unconditionally).
+
+- Since NTLM authenticates connections instead of single requests, I had to
+ re-arrange how we store the NTLM data and I had to improve the test suite to
+ finally work properly with persistency to make the NTLM tests run fine
+ again. This also forced me to have to update lots of HTTP test cases.
+
+Daniel (16 July)
+- Cris Bailiff's bug report 768275 pointed out that using Basic auth with
+ wrong user+password caused an endless loop. Fixed now. He also found out that
+ we didn't properly authenticate connections with NTLM. Fixed too.
+
+- Dan Winship provided fixes for the NTLM code.
+
+Daniel (5 July)
+- Doug Kaufman provided additional fixes for the DOS port.
+
+Daniel (4 July)
+- Rick Richardson pointed out that using setvbuf() to achieve non-buffering
+ on output is no-good for SCO Xenix and other unixes. We switched over to
+ using plain fflush() instead.
+
+- Dan Grayson pointed out that we set the CURL_CA_BUNDLE variable wrongly in
+ the configure script, and I had to change some build stuff to make the new
+ way work.
+
+- Peter Sylvester's patch was applied that introduces the following:
+
+ CURLOPT_SSL_CTX_FUNCTION to set a callback that gets called with the
+ OpenSSL's ssl_ctx pointer passed in and allow a callback to act on it. If
+ anything but CURLE_OK is returned, that will also be returned by libcurl
+ all the way back. If this function changes the CURLOPT_URL, libcurl will
+ detect this and instead go use the new URL.
+
+ CURLOPT_SSL_CTX_DATA is a pointer you set to get passed to the callback set
+ with CURLOPT_SSL_CTX_FUNCTION.
+
+Daniel (1 July)
+- David Byron provided a patch that allows a client to quit the test suite's
+ HTTP server.
+
+- Gisle Vanem found and patched a lib handle leak in the ldap code.
+
+Daniel (25 June)
+- More NTLM-improvements. Less code. Smaller packets back and forth.
+
+Daniel (23 June)
+- Eric Glass provided us with a better doc on NTLM details, and I added more
+ comments and clarified the current code more. Using the new knowledge, we
+ should be able to make the NTLM stuff work even better.
+ Eric's original URL: http://davenport.sourceforge.net/ntlm.html
+ Version stored and provided at curl site: http://curl.haxx.se/rfc/ntlm.html
+
+- Fixed the minor compile problems pre3 had if built without GSSAPI and/or
+ SSL.
+
+Version 7.10.6-pre3 (19 June 2003)
+
+Daniel (19 June)
+- Made curl use curl_free() on memory returned by curl_getenv(), as this
+ should theoreticly make it possibly to build and run curl and libcurl with
+ different memory allocation schemes with no problems.
+
+Daniel (18 June)
+- Improved the mkhelp.pl a bit further to make a nicer hugehelp text and to
+ include a better comment in the top for the gzip compressed version.
+
+Daniel (17 June)
+- CURLOPT_HTTPAUTH is now a bitmask, in which you set which authentication
+ type(s) you want to use. If more than one is set, libcurl will use one of
+ the selected one and the one it considers is more secure. Test case 67 and
+ 68 (for NTLM) were fixed and we've reduced a round-trip for specific --ntlm
+ fetches, and test case 69 and 70 were added for testing authentication
+ "picking". --anyauth is the new command line tool option, and I also added
+ --basic for completeness (that's the default type).
+
+- Fixed the runtests.pl script to use the info provided by the new curl -V
+ output.
+
+- --enable-debug now sets the CURLDEBUG define instead of MALLOCDEBUG, as it
+ is meant to be a generic debug conditional.
+
+- curl_version_info() can now return CURL_VERSION_DEBUG as a feature bit, to
+ indicate that the library was built with CURLDEBUG set.
+
+- Ralph Mitchell found out that some web applications very badly uses white
+ spaces in Location: redirects, and apparently IE is a browser (the only
+ one?) that supports this abomination. Based on Ralph's patch, I added code
+ that now attempts to replace white spaces with the proper "%20" or "+".
+ Test case 40 and 42 were added to verify my changes.
+
+- curl -V now also outputs a list of features the available library offers (if
+ any).
+
+- The curl_version() string now includes "GSS" if libcurl is built with GSSAPI
+ support.
+
+- David Orrell reported that libcurl still crashed when sending HUGE requests
+ over HTTPS... I fixed.
+
+Version 7.10.6-pre2 (16 June 2003)
+
+Daniel (16 June)
+- curl_version_info() now returns bitmasked information weather NTLM and
+ GSSNEGOTIATE are supported, since it is doomed to vary on different
+ installations.
+
+- I remade the HTTP Digest code to use the MD5-code provided by OpenSSL if
+ that is present, and only use our own MD5-code if it isn't.
+
+Daniel (13 June)
+- More NTLM help, fixes and patches from Cris Bailiff.
+
+- Marty Kuhrt brought include fixes for making VMS builds warning-free.
+
+Daniel (12 June)
+- NTLM authentication works somewhat against the test servers provided by
+ Mathias Axelsson and Cris Bailiff. Use by setting CURLOPT_HTTPAUTH to
+ CURLAUTH_NTLM to libcurl, or --ntlm for the curl tool. Test case 67 and 68
+ were added for this. NTLM-support requires OpenSSL.
+
+- Dan Fandrich provided a patch, that granted that gzip and libz are available
+ at build-time, compresses the hugehelp text in the curl command line and
+ uncompresses it at request. Saves some ~60K in the final output executable.
+
+Daniel (11 June)
+- Long day of fighting the NTLM demons.
+
+Daniel (10 June)
+- Modified how to set auth type to libcurl. Now use CURLOPT_HTTPAUTH instead,
+ and pick method. Supported ones currently are:
+ CURLAUTH_BASIC - default selection
+ CURLAUTH_DIGEST - formerly CURLOPT_HTTPDIGEST
+ CURLAUTH_GSSNEGOTIATE
+
+- Daniel Kouril added HTTP GSS-Negotiate authentication support, as defined in
+ the IETF draft draft-brezak-spnego-http-04.txt. In use already by various
+ Microsoft web applications. --negotiate is the new family member. To take
+ advantage of this, you need one of these packages:
+
+ o Heimdal Kerberos5 http://www.pdc.kth.se/heimdal/heimdal.html
+ o GSSAPI from Globus http://www.globus.org/
+ o GSSAPI libraries from MIT Kerberos5 http://web.mit.edu/kerberos/www/
+
+- A missing ending bracket (']') while doing URL globbing could lead to a
+ segfault. While fixing this, I also introduced better error reporting in the
+ globbing code. (All this is application code outside libcurl.)
+
+Daniel (6 June)
+- David Orrell found out that sending a huge GET request over HTTPS could
+ make libcurl fail and return an error code.
+
+Daniel (2 June)
+- Richard Bramante found out that "Content-Length: 0" was not properly used by
+ libcurl if the response-headers indicated that the connection would be
+ closed.
+
+- David Byron's patch was applied, that makes the --progress-bar take the
+ local size into account when doing resumed downloads.
+
+- Feedback from Serge Semashko made me change the error message returned when
+ CURLE_HTTP_RETURNED_ERROR is returned.
+
+- Anonymous in bug report #745122 pointed out that we should really be using
+ SSL_CTX_set_options(... SSL_OP_ALL) to work around flaws in existing SSL
+ implementations.
+
+Daniel (27 May)
+- Andreas Ley and Rich Gray helped me point out that no version of HP-UX has
+ the sys/select.h header file so including it unconditionally in curl/multi.h
+ is not a good thing. Now we check for HPUX and avoid using that header on
+ such systems.
+
+- Rudy Koento experienced problems with curl's recent habit of POSTing data in
+ two separate send() calls, first the headers and then the data. I've now
+ made a fix that for static and known content that is less than 100K in size,
+ everything is now sent in one single system call again. This is also better
+ for network performance reasons.
+
+- I modified the main makefile to not build the test suite and a few other
+ unnecessary things by default. Now, the test suite is built when 'make test'
+ is run. This reduces build time for those who don't care for the test
+ suite, and it also reduces confusion for people using platforms where the
+ test suite build fails!
+
+Daniel (26 May)
+- Chris Lewis pointed out a flaw in the #ifdefs in curl/multi.h for Windows,
+ which is now corrected.
+
+- Jis Joy found another flaw in the SOCK5 code, as libcurl treated the socks5
+ proxy a little too much like as if it was a http proxy.
+
+Daniel (23 May)
+- Ricardo Cadime found a socket leak when listing directories without
+ contents. Test cases 144 and 145 were added to verify the fix.
+
+- Rudy Koento found yet another problem when a HTTP server returns only a
+ single-line of contents without any headers at all. libcurl then failed to
+ count the data, thus returning error 52 "no contents". Test case 66 was
+ added to verify that we now do right.
+
+Version 7.10.6-pre1 (23 May 2003)
+
+Daniel (23 May)
+- Jis in bug report #741841, fixed a bug in the SOCKS5 proxy-using code.
+
+Daniel (22 May)
+- David Remahl set up a test-server for me providing Digest authentication,
+ and I wrote the first working code that support it. The test suite was
+ modified slightly as well to work better for it and --digest was added to
+ the command line options (and CURLOPT_HTTPDIGEST to the library)... RFC2617
+ has all the gory details.
+
+Daniel (21 May)
+- David Balazic pointed out that curl_unescape() didn't check that %-codes
+ were correctly followed by two hexadecimal digits when it unescape strings.
+ Now, we do the check and only %XX codes are unescaped if the X letters are
+ hexadecimals.
+
+- Gisle Vanem made curl build with djgpp on DOS.
+
+- Gisle Vanem improved the mkhelp.pl script to make a nicer manual that is
+ shown with curl -M.
+
+Daniel (20 May)
+- Gisle Vanem provided a fix that makes libcurl more conservative, not
+ expecting h_aliases of the hostent struct to always be non-NULL.
+
+Daniel (19 May)
+- As requested by Martin Michlmayr in Debian bug report #193630, libcurl now
+ supports user name and password in the proxy environment variables. Added
+ test case 63 to verify this.
+
+Version 7.10.5 (19 May 2003)
+
+Daniel (15 May)
+- Changed the order for the in_addr_t testing, as 'unsigned long' seems to be
+ a very common type inet_addr() returns.
+
+Daniel (14 May)
+- George Comninos provided a fix that calls the progress meter when waiting
+ for FTP command responses take >1 second. It'll make applications more
+ "responsive" even when dealing with very slow ftp servers.
+
+Daniel (12 May)
+- George Comninos pointed out that libcurl uploads had two quirks:
+ o when using FTP PORT command, it used blocking sockets!
+ o it could loop a long time without doing progress meter updates
+ Both items are fixed now.
+
+Daniel (9 May)
+- Dan Fandrich changed CURLOPT_ENCODING to select all supported encodings if
+ set to "". This frees the application from having to know which encodings
+ the library supports.
+
+- Dan Fandrich pointed out we had three unnecessary files in CVS that is
+ generated with libtoolize, so they're now removed and libtoolize is invoked
+ accordingly in the buildconf script.
+
+- Avery Fay found out that the CURLOPT_INTERFACE way of first checking if the
+ given name is a network interface gave a real performance penalty on Linux,
+ so now we more appropriately first check if it is an IP number and if so
+ we don't check for a network interface with that name.
+
+- CURLOPT_FTP_USE_EPRT added. Set this to FALSE to disable libcurl's attempts
+ to use EPRT and LPRT before the traditional PORT command. The command line
+ tool sets this option with '--disable-eprt'.
+
+Version 7.10.5-pre2 (6 May 2003)
+
+Daniel (6 May)
+- Kevin Delafield reported another case where we didn't correctly check for
+ EAGAIN but only EWOULDBLOCK, which caused badness on HPUX.
+
+Daniel (4 May)
+- Ben Greear noticed that the check for 'writable argv' exited the configure
+ script when run for cross-compiling, which wasn't nice. Now it'll default to
+ no and output a warning about the fact that it was not checked for.
+
+Daniel (2 May)
+- Added test case 62 and fixed some more on the cookie sending with a custom
+ Host: header set.
+
+Daniel (1 May)
+- Andy Cedilnik fixed a few compiler warnings.
+
+- Made the "SSL read error: 5" error message more verbose, by adding code that
+ queries the OpenSSL library to fill in the error buffer.
+
+Daniel (30 Apr)
+- Added sys/select.h include in the curl/multi.h file, after having been
+ reminded about this by Rich Gray.
+
+- I made each test set its own server requirements, thus abandoning the
+ previous system where the test number implied what server(s) to use for a
+ specific test.
+
+- David Balazic made curl more RFC1738-compliant for FTP URLs, by fixing so
+ that libcurl now uses one CWD command for each path part. A bunch of test
+ cases were fixed to work accordingly.
+
+- Cookie fixes:
+
+ A. Save domains in jars like Mozilla does. It means all domains set in
+ Set-Cookie: headers are dot-prefixed.
+ B. Save and use the 'tailmatch' field in the Mozilla/Netscape cookie jars
+ (the second column).
+ C. Reject cookies using illegal domains in the Set-Cookie: line. Concerns
+ both domains with too few dots or domains that are outside the currently
+ operating server host's domain.
+ D. Set the path part by default to the one used in the request, if none was
+ set in the Set-Cookie line.
+
+ To make item C really good, I also made libcurl notice custom Host: headers
+ and extract the host name set in there and use that as the host name for the
+ site we're getting the cookies from. This allows user to specify a site's
+ IP-address, but still be able to receive and send its cookies properly if
+ you provide a valid Host: name for the site.
+
+Daniel (29 Apr)
+- Peter Kovacs provided a patch that makes the CURLINFO_CONNECT_TIME work fine
+ when using the multi interface (too).
+
+Version 7.10.5-pre1 (23 Apr 2003)
+
+Daniel (23 Apr)
+- Upgraded to libtool 1.5.
+
+Daniel (22 Apr)
+- Peter Sylvester pointed out that curl_easy_setopt() will always (wrongly)
+ return CURLE_OK no matter what happens.
+
+- Dan Fandrich fixed some gzip decompression bugs and flaws.
+
+Daniel (16 Apr)
+- Fixed minor typo in man page, reported in the Debian bug tracker.
+
+Daniel (15 Apr)
+- Fixed some FTP tests in the test suite that failed on my Solaris host, due
+ to the config.h not being included before the system headers. When done that
+ way, it did get a mixed sense of if big files are supported or not and then
+ stat() and fstat() (as used in test case 505) got confused and failed to
+ return a proper file size.
+
+- Formposting a file using a .html suffix is now properly set to Content-Type: text/html.
+
+Daniel (14 Apr)
+- Fixed the SSL error handling to return proper SSL error messages again, they
+ broke in 7.10.4. I also attempt to track down CA cert problems and then
+ return the CURLE_SSL_CACERT error code.
+
+- The curl tool now intercepts the CURLE_SSL_CACERT error code and displays
+ a fairly big and explanatory error message. Kevin Roth helped me out with
+ the wording.
+
+Daniel (11 Apr)
+- Nic Hines provided a second patch for gzip decompression, and fixed a bug
+ when deflate or gzip contents were downloaded using chunked encoding.
+
+- Dan Fandrich made libcurl support automatic decompression of gzip contents
+ (as an addition to the previous deflate support).
+
+- I made the CWD command during FTP session consider all 2xy codes to be OK
+ responses.
+
+Daniel (10 Apr)
+- Vlad Krupin fixed a URL parsing issue. URLs that were not using a slash
+ after the host name, but still had "?" and parameters appended, as in
+ "http://hostname.com?foobar=moo", were not properly parsed by libcurl.
+
+Daniel (9 Apr)
+- Made CURLOPT_TIMECONDITION work for FTP transfers, using the same syntax as
+ for HTTP. This then made -z work for ftp transfers too. Added test case 139
+ and 140 for verifying this.
+
+- Getting the file date of an ftp file used the wrong time zone when
+ displayed. It is supposedly always GMT. Added test case 141 for this.
+
+- Made the test suite's FTP server support MDTM.
+
+- The default DEBUGFUNCTION, as enabled with CURLOPT_VERBOSE now outputs
+ CURLINFO_HEADER_IN data as well. The most notable effect from this is that
+ using curl -v, you get to see the incoming "headers" as well. This is
+ perhaps most useful when doing ftp.
+
+Daniel (8 Apr)
+- James Bursa fixed a flaw in the Content-Type extraction code, which missed
+ the first letter if no space followed the colon.
+
+- Magnus Nilsson pointed out that share.c was missing in the MSVC project
+ file.
+
+Daniel (6 Apr)
+- Ryan Weaver provided a patch that makes the CA cert bundle not get installed
+ anymore when 'configure --without-ssl' has been used.
+
+Daniel (4 Apr)
+- Martijn Broenland found another cases where a server application didn't
+ like the boundary string used by curl when doing a multi-part/formpost. We
+ modified the boundary string to look like the one IE uses, as this is
+ probably gonna make curl work with more applications.
+
+Daniel (3 Apr)
+- Kevin Roth reported that a bunch of tests fails on cygwin. One set fails
+ when using perl 5.8 (and they run fine with perl 5.6), and another set
+ failed because of an artifact in the test suite's FTP server that I
+ corrected. It turned out the FTP server code was still having a file opened
+ while the main test script removed it and invoked the HTTP server that
+ attempted to create the same file name of the file the FTP server kept open.
+ This operation works fine on unix, but not on cygwin.
+
+Version 7.10.4 (2 Apr 2003)
+
+Daniel (1 Apr)
+- Added test case 505 to exercise FTP upload with rename done with libcurl,
+ and for that I had to extend the test suite's FTP server to deal with the
+ RNFR and RNTO commands.
+
+Daniel (31 Mar)
+- Even more SSL config check modifications after Richard's testing.
+
+Version 7.10.4-pre6 (31 Mar 2003)
+
+Daniel (31 Mar)
+- More fixes for the SSL session ID cache checks when SSL configs are changed
+ between connections. Based on tests and talks with Richard Bramante.
+
+- Guillaume Cottenceau provided a patch that added CURLOPT_UNRESTRICTED_AUTH.
+ When enabled, it will prevent libcurl from limiting to which host it sends
+ user+password to when following locations. By default, libcurl only sends
+ name and password to the original host used in the first URL, but with this
+ option set it will send the auth info to all hosts it follows location
+ headers to. The new tool command line option for this is named
+ "--location-trusted".
+
+- Frankie Fong reported a problem with libcurl if you re-used an easy handle
+ with a proxy, and you first made a https:// connection to a host and then
+ switched to a http:// one to the same host. libcurl would then wrongly re-use
+ the same connection for it and fail to get the second URL properly
+
+Daniel (29 Mar)
+- Dan Shearer's fix that makes curl complain if invoked with nothing but "curl
+ -O" was applied.
+
+Daniel (26 Mar)
+- Bryan Kemp was friendly enough to lend me an account on his Redhat 9 box and
+ I could fix the configure problems on redhat 8.1 and 9 in no time thanks to
+ this. Thanks a bunch Bryan!
+
+Daniel (25 Mar)
+- Renamed configure.in to configure.ac
+
+Version 7.10.4-pre5 (25 Mar 2003)
+
+Daniel (25 Mar)
+- Richard Bramante provided a fix for a handle re-use problem seen when you
+ change options on an SSL-enabled connection between requests. Previously,
+ changing peer verification or host verification and similar things was not
+ taken into account when a connection were checked for re-use and thus
+ enabling stricter check between requests on a re-used connection made no
+ difference and the connection would thus be used erroneously.
+
+Daniel (24 Mar)
+- Götz Babin-Ebell pointed out that the ca-bundle.crt file contained a
+ certificate from Trustcenter that was a demo certificate only that was never
+ intended to be part of a CA bundle.
+
+Daniel (21 Mar)
+- Life is a mystery. Within a time period of 17 hours, Tim Pope and Michael
+ Churchill filed one bug report each, both identifying problems with a second
+ transfer when doing persistent transfers re-using a connection. Tim's one is
+ #706624, labeled "Multiple uploads per handle fail" and Michael's #707003
+ "Does not send Authorization: header when reusing connection". I could track
+ both down to the same piece of logic and it turned out libcurl was not using
+ new settings properly when re-using an existing connection. This concerned
+ both uploading and downloading and involved exactly those pieces these two
+ reports identified. This code has been this faulty since the day I
+ introduced persistent connection support in libcurl, more than 2 years ago.
+
+Daniel (20 Mar 2003)
+- Five year anniversary. Today five years ago, the first ever curl release saw
+ the light of day.
+
+Daniel (17 Mar)
+- Andy Cedilnik corrected flaws in some libcurl example-usage sources.
+
+Daniel (16 Mar)
+- Juan F. Codagnone reported that the fix from March 2nd was incomplete.
+
+- Added code to the configure.in to check for select() argument types. I've
+ not made any code use the results just yet though.
+
+Daniel (15 Mar)
+- Gisle Vanem provided two patches to build better on Windows.
+
+- Adjusted the test suite code to better make sure that the server(s) required
+ for a specific test is properly started before the test case is attempted.
+ Many tests now run a lot faster than before.
+
+Daniel (14 Mar)
+- Another configure.in adjustment made the configure detect functions properly
+ on HPUX now.
+
+Daniel (13 Mar)
+- Philippe Raoult fixed pre4-compile quirks for FreeBSD.
+
+Version 7.10.4-pre4 (13 Mar 2003)
+
+Daniel (13 Mar)
+- Added a backup-check for functions that aren't found by AC_CHECK_FUNCS()
+ as I believe some checks on HPUX need this. At least some of the info given
+ to us by Rick Jones seemed to indicate this.
+
+Daniel (12 Mar)
+- Thomas Tonino found out that if you used the curl tool to do PUT operations
+ as in 'curl www.foo.com/dir/ -T file' and the file name included for example
+ space or other characters that don't belong in URLs, curl did not properly
+ URL encode them before using them in the URL.
+
+- Added an option to configure called --enable-libgcc that simply adds -lgcc
+ to the LIBS variable, as this seems to be a common problem.
+
+- I modified the configure.in file, so that the headers are now checked in an
+ order of "viality". We must also make sure to use the "default headers"
+ parameter to AC_CHECK_HEADERS() so that headers are checked with the proper
+ prerequisites included (i.e all the major and generally important header
+ files are included there by default). This might be what we need for various
+ Sun, HP, AIX and Tru64 systems to behave good again on the header check
+ front.
+
+- Rick Jones pointed out a few compiler warnings on HP-UX that I addressed.
+
+- I made the configure --help output nicer by using AC_HELP_STRING() a lot
+ more.
+
+Daniel (11 Mar)
+- Christophe Demory fixed the socket sending code to work better on HP-UX
+ when sending data to a socket that would block. It then returns EAGAIN, not
+ EWOULDBLOCK.
+
+- Richard Gorton improved the seeding function for systems without a good
+ and reliable random source.
+
+- Richard Gorton fixed a few warnings that popped up when you built curl
+ using the Sun compiler on a 64bit SPARC platform.
+
+- Martin C. Martin fixed a case where a connect failure using the multi
+ interface didn't produce a human readable error string.
+
+Daniel (10 Mar)
+- Reverted ltmain.sh back to libtool 1.4.2 status again, as the 1.4.3 version
+ broke the build on numerous platforms. It seems that libtool 1.4.3 puts some
+ requirements on what versions of the other tools (autoconf + automake) that
+ I am not familiar with and thus I couldn't fulfill at this point.
+
+ Yes, this is more than mildly frustrating.
+
+Daniel (7 Mar)
+- Run libtoolize version 1.4.3.
+
+Version 7.10.4-pre3 (4 Mar 2003)
+
+Daniel (3 Mar)
+- Added share.obj to the VC6 and Borland libcurl makefiles.
+
+- Troels Walsted Hansen found and investigated a problem with libcurl on AIX,
+ presumably only on 4.3 or later. gethostbyname_r() is not returning data
+ that is possible to "keep" and cache the way libcurl does. But instead these
+ versions of AIX uses a gethostbyname() that works thread-safely we can
+ instead use the ordinary gethostbyname() and our pack_hostent() approach to
+ achieve what we want. The configure script now attempts to detect AIX 4.3 or
+ later to adjust for this.
+
+Daniel (2 Mar)
+- Juan F. Codagnone found a problem introduced in 7.10.3 when you first did a
+ POST and then back to a GET using the same easy handle.
+
+Daniel (28 Feb)
+- Removed the strequal and strnequal defines from curl/curl.h header. They
+ were never meant for the public header anyway. Philippe Raoult brought it
+ up.
+
+- James Bursa fixed the RISC OS build.
+
+Daniel (27 Feb)
+- Avery Fay pointed out the very misleading curl_multi_info_read man page, and
+ I updated it to become more accurate.
+
+- Salvatore Sorrentino found a problem with FTP downloading that turned out to
+ be his FTP server returning size zero (0 bytes) when SIZE was used on a file
+ while being in BINARY mode. We now make a second check for the actual size
+ by scanning the RETR reply anyway, even if the SIZE command returned 0.
+
+Daniel (26 Feb)
+- Kyle Sallee reported a case where he would do a transfer that didn't update
+ the progress meter properly. It turned out to be a case where libcurl would
+ loop a little too eagerly in the transfer loop, which isn't really good for
+ the APIs, especially not the multi API.
+
+Version 7.10.4-pre2 (24 Feb 2003)
+
+Daniel (24 Feb)
+- Kjetil Jacobsen found out that setting CURLOPT_MAXCONNECTS to a value higher
+ than 5 could cause a segfault.
+
+- I believe I fixed the 'Expect: 100-continue' behavior that has been broken
+ for a while (I think since my change dated Dec 10 2002). When this header is
+ used, libcurl should wait for a HTTP 100 (or timeout) before sending the
+ post/put data.
+
+Daniel (14 Feb)
+- Matthew Clarke provided some info what to modify to make curl build
+ flawlessly on AIX 3.2.5.
+
+- Martin C. Martin found and fixed a problem in the multi interface when
+ running on Windows and trying to connect to a port without a listener.
+
+Daniel (13 Feb)
+- Christopher R. Palmer fixed Curl_base64_encode() to deal with zeroes in the
+ data to encode.
+
+Daniel (4 Feb)
+- Jean-Philippe added the first code that enables the 'share' system. This
+ should now enable sharing of DNS data between two curl easy handles.
+
+- Incorporated Nico Baggus' fixes to again compile flawlessly on VMS.
+
+- James Bursa corrected a bad comment in the public include file curl/multi.h
+
+- Peter Forret reported one of those error:00000000 cases in libcurl again
+ when connecting to a HTTPS site, and this time I did discover some oddities
+ in how curl reports SSL errors back. It could miss showing the actual error.
+
+Version 7.10.4-pre1 (3 Feb 2003)
+
+Daniel (3 Feb)
+- Removed things in the docs saying capath doesn't work on Windows, as Julian
+ Noble told us it works fine.
+
+Daniel (31 Jan)
+- Kevin Roth fixed the zlib build stuff in the Mingw32 makefile.
+
+Daniel (30 Jan)
+- Kevin Roth found out that curl on Windows always checked for the CA cert
+ bundle using the environment variable and the path scan, even though
+ -k/--insecure was used.
+
+- Hamish Mackenzie pointed out that curl only did strict host name verifying
+ if capath or cainfo was used. Now it'll always do it unless -k / --insecure
+ is used!
+
+- Pavel Cenek pointed out that the Content-Type extraction was done wrongly
+ as the full string was not fetched. Added test case 57 to verify that curl
+ does it right now.
+
+Daniel (29 Jan)
+- Jamie Wilkinson provided a patch that now makes curl attempt to clear out
+ "sensitive" command line arguments so that they don't appear in ps outputs
+ (only on platforms that allow writing to argv[]).
+
+- John McGowan found out that the DEBUGFUNCTION could be called with bad
+ arguments and thus cause the --trace outputs to go wrong.
+
+- Removed all the emacs local variables from all files. Mats Lidell provided
+ the new sample.emacs file (for a sample of what to include in your .emacs)
+ and the curl-style.el that sets a better c-style for editing curl sources.
+
+- Dave Halbakken found a problem with FTP downloads that could accidently
+ return CURLE_PARTIAL_FILE when curl_easy_perform() was called with NOBODY
+ set TRUE.
+
+Daniel (27 Jan)
+- The fopen.c example was flawed as Nick Humfrey noticed, and I fixed it to
+ work again.
+
+Daniel (24 Jan)
+- Bertrand Demiddelaer found and fixed a memory leak (the content-type string)
+ when following locations.
+
+Daniel (22 Jan 2003)
+- Ian Wilkes and Legoff Vincent both independently provided fixes for making
+ curl/multi.h work properly when compiled with a C++ compiler.
+
+Daniel (20 Jan 2003)
+- Fixed 'buildconf' to check version number of the required tools before
+ they're actually used.
+
+- Wrote 'testcurl.sh', a script targeted for automatic and distributed curl
+ tests on various platforms.
+
+- David Thiel pointed out that the .netrc file was not being dealt with
+ properly anymore. I broke this in the password prompting "fix".
+
+- Markus F.X.J. Oberhumer patched libcurl to allocate the scratch buffer only
+ on demand and thus we save 32KB in each curl handle that don't use that
+ buffer. This need appeared when some people started using thousands of
+ simultaneous curl handles... :-)
+
+Daniel (16 Jan 2003)
+- Markus Oberhumer fixed curl-config --cflags when the includedir was not
+ /usr/include.
+
+- Markus Oberhumer fixed CURLINFO_PRIVATE to properly return NULL if it was
+ set to NULL!
+
+Version 7.10.3 (14 Jan 2003)
+
+Daniel (10 Jan 2003)
+- Steve Oliphant pointed out that test case 105 did not work anymore and this
+ was due to a missing fix for the password prompting.
+
+Version 7.10.3-pre6 (10 Jan 2003)
+
+Daniel (9 Jan 2003)
+- Bryan Kemp pointed out that curl -u could not provide a blank password
+ without prompting the user. It can now. -u username: makes the password
+ empty, while -u username makes curl prompt the user for a password.
+
+- Kjetil Jacobsen found a remaining connect problem in the multi interface on
+ ipv4 systems (Linux only?), that I fixed and Kjetil verified that it fixed
+ his problems.
+
+- memanalyze.pl now reads a file name from the command line, and no longer
+ takes the data on stdin as before.
+
+Version 7.10.3-pre5 (9 Jan 2003)
+
+Daniel (9 Jan 2003)
+- Fixed tests/memanalyze.pl to work with file names that contain colons (as on
+ Windows).
+
+- Kjetil Jacobsen quickly pointed out that lib/share.h was missing...
+
+Version 7.10.3-pre4 (9 Jan 2003)
+
+Daniel (9 Jan 2003)
+- Updated lib/share.c quite a bit to match the design document at
+ http://curl.haxx.se/dev/sharing.txt a lot more.
+
+ I'll try to update the document soonish. share.c is still not actually used
+ by libcurl, but the API is slowly getting there and we can start
+ implementing code that takes advantage of this system.
+
+Daniel (8 Jan 2003)
+- Updated share stuff in curl/curl.h, including data types, structs and
+ function prototypes. The corresponding files in lib/ were also modified
+ of course to remain compilable. Based on input from Jean-Philippe and also
+ to make it more in line with the design document.
+
+- Jean-Philippe Barrette-LaPierre patched a very trivial memory leak in
+ curl_escape() that would happen when realloc() returns NULL...
+
+- Matthew Blain provided feedback to make the --create-dirs stuff build
+ properly on Windows.
+
+- Fixed the #include in tests/libtest/first.c as Legoff Vincent pointed out.
+
+Daniel (7 Jan 2003)
+- Philippe Raoult provided a patch that now makes libcurl properly support
+ wildcard checks for certificate names.
+
+- Simon Liu added CURLOPT_HTTP200ALIASES, to let an application set other
+ strings recognized as "HTTP 200" to allow http-like protocols to get
+ downloaded fine by curl.
+
+- Now using autoconf 2.57 and automake 1.7.2
+
+- Doing "curl -I ftp://domain/non-existing-file" still outputed a date!
+ Wayne Haigh reported.
+
+- The error message is now written properly with a newline in the --trace
+ file.
+
+Daniel (6 Jan 2003)
+- Sterling Hughes fixed a possible bug: previously, if you called
+ curl_easy_perform and then set the global dns cache, the global cache
+ wouldn't be used. Pointed out by Jean-Philippe Barrette-LaPierre.
+
+- Matthew Blain's fixed the VC6 libcurl makefile to include better debug data
+ on debug builds.
+Daniel (27 Dec 2002)
+- Philippe Raoult reported a bug with HTTPS connections which I evidently
+ added in my 19 dec fix. I corrected it.
+
+Daniel (20 Dec)
+- Idea from the Debian latest patch: use AM_MAINTAINER_MODE in the configure
+ script to make the default makefile less confusing "to the casual
+ installer".
+
+Version 7.10.3-pre3 (20 Dec)
+
+Daniel (19 Dec)
+- Matthew Blain patched the Curl_base64_decode() function.
+
+- Evan Jordan reported in bug report #653022 that the SSL_read() usage was
+ wrong, and it certainly was. It could lead to curl using too much CPU due to
+ a stupid loop.
+
+Daniel (18 Dec)
+- As suggested by Margus Freudenthal, CURLE_HTTP_NOT_FOUND was renamed to
+ CURLE_HTTP_RETURNED_ERROR since it is returned on any >= 400 code when
+ CURLOPT_FAILONERROR is set.
+
+Daniel (17 Dec)
+- Bug reported #651464, reported by Christopher Palmer, provided an example
+ source code using the multi interface that hang when trying to connect to a
+ proxy on a localhost port where no proxy was listening. This bug was not
+ repeatable on libcurls that were IPv6-enabled.
+
+Daniel (16 Dec)
+- Christopher Palmer also noticed what Vojtech Janota already was
+ experiencing: The attempted name resolve fix for glibc 2.2.93 caused libcurl
+ to crash when used on some older glibc versions. The problem is of course
+ the silliness of the 2.2.93. I committed a fix that hopefully should make
+ the binary run fine on either one of the versions, even though the solution
+ is not as nice as I'd like it to be.
+
+Daniel (13 Dec)
+- Bug report #651460 by Christopher R. Palmer showed that when using libcurl
+ to for example go over a proxy on localhost, it would attempt to connect
+ through the proxy TWICE.
+
+ I added test case 503 with which I managed to repeat this problem and I
+ fixed the code to not re-attempt any connects (which also made it a nicer
+ fix for the #650941 bug mentioned below).
+
+ The sws server was extended to deal with CONNECT in order to make test
+ case 503 do good.
+
+- Evan Jordan posted bug report #650989 about a memory leak in the public key
+ retrieving code. He provided a suggested fix and I merely applied it!
+
+- Bug report #650941, posted by Christopher R. Palmer identified a problem
+ with the multi interface and getting file:// URLs. This was now fixed and
+ test case 502 was added to verify this.
+
+Daniel (12 Dec)
+- Test case 500 and 501 are the first ever libcurl test cases that run.
+
+- Made "configure --enable-debug" cut off all -O* options to the compiler
+
+- Finally fixed the test suite's ftp server so that test case 402 doesn't
+ cause the following test case to fail anymore!
+
+Daniel (11 Dec)
+- CURL_MAX_WRITE_SIZE is now decreased to 16KB since it makes the Windows
+ version perform uploads much faster!!! RBramante did lots of research on
+ this topic.
+
+- Fixed the #include in curl/curl.h to include the other files outside the
+ extern "C" scope.
+
+Daniel (10 Dec)
+- Moved around and added more logic:
+
+ First, POST data is never sent as part of the request headers in the http.c
+ code. It is always sent the "normal" read callback then send() way. This now
+ enables a plain HTTP POST to be sent chunked if we want to. This also
+ reduces the risk of having very big POSTs causing problems.
+
+ Further, sending off the initial HTTP request is not done using a loop
+ anymore. If it wasn't all sent off in the first send(), the rest of the
+ request is sent off in the normal transfer select() loop. This makes several
+ things possible, but mainly it makes libcurl block less when used from the
+ multi interface and it also reduces the risk of problems with issuing very
+ large requests.
+
+Daniel (9 Dec)
+- Moved the read callback pointer and data within the structs to a more
+ suitable place. This in preparation for a better HTTP-request sending code
+ without (a silly) loop.
+
+- The Dodds fix seems not to work.
+
+- Vojtech Janota tests proved that the resolve fix from oct 21st is not good
+ enough since obviously older glibcs might return EAGAIN without this meaning
+ that the buffer was too small.
+
+- [the other day] Made libcurl loop on recv() and send() now until done, and
+ then get back to select(). Previously it went back to select() more often
+ which really was a slight overhead. This was due to the reported performance
+ problems on HTTP PUT on Windows. I couldn't see any notable difference on
+ Linux...
+
+Version 7.10.3-pre2 (4 Dec 2002)
+
+Daniel (4 Dec 2002)
+- Lots of work with Malcolm Dodds made me add a temporary code fix that now
+ shortens the timeout waiting for the 226 or 250 line after a completed
+ FTP transfer.
+
+ If no data is received within 60 seconds, this is taken as a sign of a dead
+ control connection and we bail out.
+
+Daniel (3 Dec 2002)
+- Ralph's bug report #644841 identified a problem in which curl returned a
+ timeout error code when in fact the problem was not a timeout. The proper
+ error should now be propagated better when they're detected in the FTP
+ response reading function.
+
+- Updated the Borland Makefiles.
+
+Daniel (2 Dec 2002)
+- Nicolas Berloquin provided a patch that introduced --create-dirs to the
+ command line tool. When used in combination with -o, it lets curl create
+ [non-existing] directories used in -o, suitably used with #-combinations
+ such as:
+
+ curl "www.images.com/{flowers,cities,parks,mountains}/pic_[1-100].jpg \
+ -o "dir_#1/pic#2.jpg" --create-dirs
+
+Version 7.10.3-pre1
+
+Daniel (28 Nov 2002)
+- I visited Lars Nordgren and had a go with his problem, which lead me to
+ implement this fix. If libcurl detects the added custom header
+ "Transfer-Encoding: chunked", it will now enable a chunked transfer.
+
+ Also, chunked transfer didn't quite work before but seems to do so now.
+
+- Kjetil Jacobsen pointed out that ./configure --disable-ipv6 --without-zlib
+ didn't work on any platform...
+
+Daniel (26 Nov 2002)
+- Fixed a bad addrinfo free in the hostip.c code, hardly exposed anywhere
+
+- Dan Becker found and fixed a minor memory leak on persistent connnections
+ using CURLOPT_USERPWD.
+
+Daniel (22 Nov 2002)
+- Based on Ralph Mitchell's excellent analysis I found a bug in the test suite
+ web server (sws) which now lets test case 306 run fine even in combination
+ with the other test cases.
+
+- Juan Ignacio Hervás found a crash in the verbose connect message that is
+ used on persistent connections. This bug was added in 7.10.2 due to the
+ rearranged name resolve code.
+
+Daniel (20 Nov 2002)
+- Kjetil Jacobsen provided a patch that introduces:
+
+ CURLOPT_PRIVATE stores a private pointer in the curl handle.
+
+ CURLINFO_PRIVATE retrieves the private pointer from the curl handle.
+
+- Karol Pietrzak pointed out how curl-config --cflags didn't output a good
+ include dir so I've removed that for now.
+
+Version 7.10.2 (18 Nov 2002)
+
+Daniel (11 Nov 2002)
+- Dave Halbakken added curl_version_info to lib/libcurl.def to make libcurl
+ properly build with MSVC on Windows.
+
+Daniel (8 Nov 2002)
+- Doing HTTP PUT without a specified file size now makes libcurl use
+ Transfer-Encoding: chunked.
+
+Daniel (7 Nov 2002)
+- Bug report #634625 identified how curl returned timeout immediately when
+ CURLOPT_CONNECTTIMEOUT was used and provided a fix.
+
+Version 7.10.2-pre4 (6 Nov 2002)
+
+Daniel (5 Nov 2002)
+- Lehel Bernadt found out and fixed. libcurl sent error message to the debug
+ output when it stored the error message.
+
+- Avery Fay found some problems with the DNS cache (when the cache time was
+ set to 0 we got a memory leak, but when the leak was fixed he got a crash
+ when he used the CURLOPT_INTERFACE with that) that had me do some real
+ restructuring so that we now have a reference counter in the dns cache
+ entries to prevent an entry to get flushed while still actually in use.
+
+ I also detected that we previously didn't update the time stamp when we
+ extracted an entry from the cache so that must've been a reason for some
+ very weird dns cache bugs.
+
+Version 7.10.2-pre3
+
+Daniel (31 Oct 2002)
+- Downgraded automake to 1.6.3 in an attempt to fix cygwin problems. (It
+ turned out this didn't help though.)
+
+- Disable the DNS cache (by setting the timeout to 0) made libcurl leak
+ memory. Avery Fay brought the example code that proved this.
+
+Version 7.10.2-pre2
+
+Daniel (28 Oct 2002)
+- Upgraded to autoconf 2.54 and automake 1.7 on the release-build host.
+
+- Kevin Roth made the command line tool check for a CURL_CA_BUNDLE environment
+ variable (if --cacert isn't used) and if not set, the Windows version will
+ check for a file named "curl-ca-bundle.crt" in the current directory or the
+ directory where curl is located. That file is then used as CA root cert
+ bundle.
+
+- Avery Fay pointed out that curl's configure scrip didn't get right if you
+ used autoconf newer than 2.52. This was due to some badly quoted code.
+
+Version 7.10.2-pre1
+
+Daniel (23 Oct 2002)
+- Emiliano Ida confirmed that we now build properly with the Borland C++
+ compiler too. We needed yet another fix for the ISO cpp check in the curl.h
+ header file.
+
+- Yet another fix was needed to get the HTTP download without headers to work.
+ This time it was needed if the first "believed header" was read all in the
+ first read. Test 306 has not run properly since the 11th october fix.
+
+Daniel (21 Oct 2002)
+- Zvi Har'El pointed out a problem with curl's name resolving on Redhat 8
+ machines (running IPv6 disabled). Mats Lidell let me use an account on his
+ machine and I could verify that gethostbyname_r() has been changed to return
+ EAGAIN instead of ERANGE when the given buffer size is too small. This is
+ glibc 2.2.93.
+
+- Albert Chin helped me get the -no-undefined option corrected in
+ lib/Makefile.am since Cygwin builds want it there while Solaris builds don't
+ want it present. Kevin Roth helped me try it out on cygwin.
+
+- Nikita Schmidt provided a bug fix for a FOLLOWLOCATION bug introduced when
+ the ../ support got in (7.10.1).
+
+Daniel (18 Oct 2002)
+- Fabrizio Ammollo pointed out a remaining problem with FOLLOWLOCATION in
+ the multi interface.
+
+Daniel (17 Oct 2002)
+- Richard Cooper's experimenting proved that -j (CURLOPT_COOKIESESSION) didn't
+ work quite as supposed. You needed to set it *before* you use
+ CURLOPT_COOKIEFILE, and we dont' want that kind of dependencies.
+
+Daniel (15 Oct 2002)
+- Andrés García provided corrections for erratas in four libcurl man pages.
+
+Daniel (13 Oct 2002)
+- Starting now, we generate and include PDF versions of all the docs in the
+ release archives.
+
+Daniel (12 Oct 2002)
+- Trying to connect to a host on a bad port number caused the multi interface
+ to never return failure and it appeared to keep on trying forever (it just
+ didn't do anything).
+
+Daniel (11 Oct 2002)
+- Downloading HTTP without headers didn't work 100%, some of the initial data
+ got written twice. Kevin Roth reported.
+
+- Kevin Roth found out the "config file" parser in the client code could
+ segfault, like if DOS newlines were used.
+
+Version 7.10.1 (11 Oct 2002)
+
+Daniel (10 Oct 2002)
+- Jeff Lawson fixed a few problems with connection re-use that remained when
+ you set CURLOPT_PROXY to "".
+
+Daniel (9 Oct 2002)
+- Craig Davison found a terrible flaw and Cris Bailiff helped out in the
+ search. Getting HTTP data from servers when the headers are split up in
+ multiple reads, could cause junk data to get inserted among the saved
+ headers. This only concerns HTTP(S) headers.
+
+Daniel (8 Oct 2002)
+- Vincent Penquerc'h gave us the good suggestion that when the ERRRORBUFFER
+ is set internally, the error text is sent to the debug function as well.
+
+- I fixed the telnet code to timeout properly as the option tells it to. On
+ non-windows platforms.
+
+Daniel (7 Oct 2002)
+- John Crow pointed out that libcurl-the-guide wasn't included in the release
+ tarball!
+
+- Kevin Roth pointed out that make install didn't do right if build outside
+ the source tree (ca-bundle wise).
+
+- FOLLOWLOCATION bugfix for the multi interface
+
+Daniel (4 Oct 2002)
+- Kevin Roth got problems with his cygwin build with -no-undefined was not
+ present in lib/Makefile.am so I put it back in there again. The poor one who
+ needs to remove it again must write a configure script to detect that need.
+
+- Ralph Mitchell pointed out that curl was a bit naive and didn't deal with ./
+ or ../ stuff in the string passed back in a Location: header when following
+ locations.
+
+- Albert Chin helped me to work out a better configure.in check for zlib, and
+ both --without-zlib and -with-zlib seem to work rather well right now.
+
+- Zvi Har'El improvied the OpenSSL ENGINE check in the configure script to
+ become more accurate.
+
+Daniel (1 Oct 2002)
+- Detlef Schmier pointed out the lack of a --without-libz option to configure,
+ so I added one.
+
+Version 7.10 (1 Oct 2002)
+
+Daniel (30 Sep 2002)
+- Modified the curl_version_info() proto and returned struct once again, and
+ 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
+ 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.
+
+Daniel (27 Sep 2002)
+- After a suggestion from Christian Kurz to Debian curl package maintainer
+ Domenico Andreoli, I made it possible to override the proxy environment
+ variables better. Now, by setting -x "" you can explicitly tell libcurl to
+ not use a proxy, no matter whan the environment variables say.
+
+Version 7.10-pre4
+
+Daniel (26 Sep 2002)
+- Extended curl_version_info() more and wrote a man page for it.
+
+Daniel (25 Sep 2002)
+- libcurl could leak memory when downloading multiple files using http ranges,
+ reported and fixed by Jean-Luc Guevel.
+
+- Walter J. Mack provided code and docs for the new curl_free() function that
+ shall be used to free memory that is allocated by libcurl and returned back
+ to the application, as curl_escape() and curl_unescape() do.
+
+- Yarram Sunil pointed out a flaw in the multi interface where a failed
+ connection didn't close down properly and thus a second transfer using the
+ same handle failed.
+
+- Andrés García fixed a flaw that made (among other things) dict-fetches
+ return a random value.
+
+Daniel (24 Sep 2002)
+- Wez Furlong brought his initial patch that introduced curl_version_info().
+ We might need to tweak it somewhat before release.
+
+Daniel (20 Sep 2002)
+- Craig Markwardt fixed another Tru64 IP resolve problem.
+
+Daniel (19 Sep 2002)
+- Dolbneff A.V and Spiridonoff A.V made the file:// code work with resumes
+ in the same style other code does.
+
+- Ilguiz Latypov fixed a flaw in the client code when fetching multiple URLs
+ and -C - was used. The first file's resume position was then accidentally
+ reused on all the other files too.
+
+Daniel (18 Sep 2002)
+- The curl_easy_setopt.3 man page was greatly modified and the options have
+ now been grouped in logical groups so that it should be somewhat easier to
+ read it and find things you search for.
+
+Daniel (13 Sep 2002)
+- Kevin Roth pinpointed a scary flaw in libcurl, when the HTTP server doesn't
+ send any headers back, only raw content. Right, that is a violation of the
+ standard but still happens at times and we need to deal with it. Test case
+ 306 was added to verify that we do right now.
+
+Version 7.10-pre3
+
+Daniel (11 Sep 2002)
+- Lukasz Czekierda found out that curl didn't send a correct HTTP Host: header
+ when you specified the URL with an IPv6 IP-address.
+
+Daniel (4 Sep 2002)
+- Sven Neuhaus made --silent being acknowledged even when multiple URLs
+ were used. It used to output "[1/2]: http://host/a.html.de --> a.html.d" etc
+ even when told to shut up.
+
+Daniel (3 Sep 2002)
+- Updated all source code headers to use MIT-license references only, and
+ point to the COPYING file and the http://curl.haxx.se/docs/copyright.html
+ URL. I've cut out all references to MPL that I could find.
+
+- Corected the makefiles to not always use -lz when linking
+
+Version 7.10-pre2
+
+Daniel (2 Sep 2002)
+- James Gallagher added Content-Encoding support to libcurl so now curl and
+ libcurl-using apps can request compressed contents using the 'deflate'
+ method. See the special file lib/README.encoding for details.
+
+ curl --compressed is now used to request compressed contents.
+
+ curl-config --feature will include 'libz' if this feature was around when
+ the library was built.
+
+Daniel (30 Aug 2002)
+- Applied an anonymous SOCKS5-proxy patch. Not properly working in all
+ situations though, as all getaddrinfo()-using libcurls will fail on this.
+ This is because of the somewhat naive way the current code tries to extract
+ the IP address of the proxy.
+
+- Fixed up the SSL cert fixes from the other day even more after more inputs
+ from Cris. Added three new SSL error codes to make the
+ CURLE_SSL_CONNECT_ERROR slightly less overloaded.
+
+Daniel (27 Aug 2002)
+- After lots of talk with Tom Zerucha, Nick Gimbrone and Cris Bailiff I
+ decided to talk the bold path and I now made libcurl do CA certificate
+ verification by default. Thus library users need to explicitly turn this off
+ if you want to connect to sites without proper checking. We also install a
+ CA cert bundle on 'make install' now.
+
+ The curl tool now requires the -k/--insecure option in order to allow
+ connections and operations on SSL sites that aren't properly verified with
+ -cafile or --capath.
+
+ curl-config --ca displays the built-in path to the CA cert bundle.
+
+Daniel (26 Aug 2002)
+- Andrew Francis cleaned up some code that now compiles fine without the need
+ for ugly MSVC pragmas.
+
+- Keith MacDonald found a minor bug in src/main.c that made it close stdin
+ instead of the actual file handle. It shouldn't have resulted in much
+ trouble as most operating systems close all file handles on process exit
+ anyway.
+
+Daniel (22 Aug 2002)
+- Markus Oberhumer provided some documentation for his previously provided
+ CURLOPT_NOSIGNAL fix.
+
+- Patched the lib/Makefile.am to hopefully no longer complain on undefined
+ symbols that seemed to occur on builds with shared OpenSSL libraries on
+ Solaris lately...
+
+Daniel (20 Aug 2002)
+- Fixed compiler warnings on MSCV++ compiles. We're looking for help here:
+ remove the pragmas from lib/config-win32.h and adjust the sources where
+ the warnings occur. Hiding them with pragmas like this is not the correct
+ way of dealing with compiler warnings.
+
+Daniel (13 Aug 2002)
+- Ulrich Zadow made the global include files in curl/* include themselves
+ using "curl.h" instead of <curl/curl.h> which thus allows people to more
+ freely decide how to include curl and how to setup their include paths.
+
+- Sterling Hughes added the curl_share* interface, somewhat as discussed
+ previously.
+
+- Jörn Hartroth pointed out that poll() was used in the pre1 source code and
+ it isn't very portable, so now I check for it in the configure script and
+ work around it.
+
+Version 7.9.9-pre1
+
+Daniel (12 Aug 2002)
+- Applied my initial take on making the multi stuff more asynchronous. Connects
+ should now return back without "hanging" until it has connected for real.
+ This should also be the case for FTP-PASV connects.
+
+Daniel (9 Aug 2002)
+- Applied Markus F.X.J. Oberhumer's patch that introduces CURLOPT_NOSIGNAL,
+ which effectively prevents libcurl from doing anything that may cause
+ signals to get sent. This is basicly for multi-threaded applications that
+ now can use timeouts properly, without risking any signals to burst in and
+ ruin the party.
+
+Daniel (5 Aug 2002)
+- Lukasz Czekierda reported that RFC2732-style literal IPv6 addresses didn't
+ work. When did that code vanish? Anyway, it's back again now and seems to
+ work!
+
+- Jonatan Lander found out that POSTing an empty string didn't work with the
+ command line tool.
+
+Daniel (3 Aug 2002)
+- Jörn Hartroth fixed the libcurl.def file to build the windows DLL with
+ the multi interface enabled.
+
+Daniel (1 Aug 2002)
+- The ftp PORT command now uses a better default IP address, as it will
+ extract and use the local IP address used by the control connection.
+
+- Modified the #include lines in curl/multi.h to work better on more
+ platforms.
+
+Daniel (31 Jul 2002)
+- Attempted a fix for Ray DeGennaro's reported HP-UX host name resolve
+ problems.
+
+Daniel (30 Jul 2002)
+- Priya Ramakrishnan and Ryan Jones compiles curl/curl.h with a C++ compiler
+ and don't get __STDC__ defined, which required us to extend the preprocessor
+ check for the ## operator usage.
+
+- Correct the description for CURLOPT_PASSWDFUNCTION, if set to NULL the
+ internal default function will be put back.
+
+- danfuzz at milk.com found out that libcurl badly assumed a space after
+ 'Set-Cookie:' so if it wasn't present, it caused the first letter of the
+ cookie name to fall off!
+
+Daniel (29 Jul 2002)
+- The password prompt asking for user password used stdout and now uses
+ stderr instead to better allow redirecting. It also leaked a fopen() file
+ handle that is now fixed.
+
+Daniel (28 Jul 2002)
+- HAVE_SETVBUF was left out from src/main.c which made -N not work. Found out
+ by M T.
+
+Daniel (26 Jun 2002)
+- Glen Nakamura solved a crash in the name resolving function for IP-only
+ addresses on Alpha Linux (at least).
+
+- T. Bharath corrected the high resolution timer introduced in 7.9.8.
+
+Daniel (22 Jun 2002)
+- Andrés García pointed out man page errors in curl_formadd.3. I fixed.
+
+Daniel (19 Jun 2002)
+- Chris Combes pointed out a flaw in curl_escape(). I fixed. We no longer
+ tries to generate nor parse '+' in URLs. Spaces become %20, and only %-codes
+ are translated by curl_unescape().
+
+Daniel (15 Jun 2002)
+- Added --limit-rate to the curl tool. Allows the user to set a maxmimum
+ upper limit to how much bandwidth to use for transfers.
+
+- CURLOPT_BUFFERSIZE was added to libcurl. This sets a prefered size for the
+ receive buffer in libcurl. The main point of this would be that the write
+ callback gets called more often and with smaller chunks.
+
+Daniel (14 Jun 2002)
+- Yarram Sunil found out that the SocketIsDead() function performed a lot
+ faster on Windows when removing the 1 microsecond timeout.
+
+- Hanno L. Kranzhoff fixed the VC++ project files.
+
+- Tom Mattison found out that ftp transfers closed the connection a little
+ too often.
+
+- Miklos Nemeth posted a VC++ makefile fix and some INSTALL comments on how
+ to disable specific protocols when building for Windows.
+
+Version 7.9.8
+
+Daniel (13 Jun 2002)
+- Time to let this baby go.
+
+Daniel (12 Jun 2002)
+- Chris Combes added three new options for curl_formadd(): CURLFORM_BUFFER,
+ CURLFORM_BUFFERPTR, CURLFORM_BUFFERLENGTH. They are used to create a
+ multipart that appears as a regular file upload, but the data is provided
+ with a pointer and length.
+
+- Nico Baggus made the VMS version use sigsetjmp() too.
+
+- Jörn Hartroth fixed the mingw32 build using the mm lib.
+
+- Applied patches by Kris Kennaway that correct format string problems in
+ lib/ftp.c and lib/ldap.c.
+
+Version 7.9.8-pre3
+
+Daniel (11 Jun 2002)
+- James Cone brought the idea of using sigsetjmp() in the signal handler to
+ make the time-out of name lookups to work, even when the underlying name
+ resolver library traps EINTR. The use of sigsetjmp() and siglongjmp() for
+ this may be a bit drastic, and also not likely to exist on all platforms. I
+ added careful checking for this in the configure script, even checks for it
+ being a macro (which seems to be the case in for example Linux).
+
+ sigsetjmp() seems to be mentioned in the Single Unix specification.
+
+- Miklos Nemeth brought a patch that allows libcurl to get built with specific
+ protocols disabled. This is done by running ./configure
+ --disable-[protocol].
+
+- FTP range downloads could make CURLE_FTP_WRITE_ERROR get returned. We now
+ make precautions to not return this for range downloads.
+
+ Added test case 135 that makes an ftp range download. Had to tweak the
+ runtests.pl script a bit too.
+
+- Bug report #566835 identified a strlen() on a NULL pointer. Added additional
+ check to prevent this.
+
+Daniel (10 Jun 2002)
+- Found and corrected a connect failure problem that didn't create a human
+ error text.
+
+- Added code to compile with OpenSSL 0.9.7. Based on patch from Jacob Meuser
+ and comments from Götz Babin-Ebell.
+
+- Gautam Mani found a socket descriptor leak that happened when FTP transfers
+ failed and you reinvoked curl_easy_perform().
+
+Daniel (5 Jun 2002)
+- Gustaf Hui corrected curl_multi_remove_handle() so that it won't crash no
+ matter when you decide to remove the CURL handle.
+
+- HAVE_RAND_STATUS was added to lib/config-win32.h by Andreas Olsson, as it
+ makes windows builds stop complaining about "weak seeding" when it in fact
+ isn't.
+
+- Another 64bit architecture crash that was introduced in 7.9.7 was now
+ removed, as bug report #564585 clarified. This happened due to our attempts
+ to only allocate only as much memory as is actually needed for name
+ resolving (using realloc) which called for a function that could 'move' a
+ hostent struct in memory.
+
+Version 7.9.8-pre2
+
+Daniel (3 Jun 2002)
+- T. Bharath fixed the CURLINFO_REDIRECT_TIME to return a correct time and
+ made the CURLINFO_REQUEST_SIZE return the correct total request size. He
+ also made the win32 timers use higher resolution than before.
+
+Daniel (29 May 2002)
+- Renaud Chaillat made me aware of the fact that libcurl returned an error if
+ you tried to get an empty FTP file. This seemed like a wrong thing to do, so
+ now it no longer does that! I just hope that no one built anything fancy
+ upon this unexpected behavior...
+
+Daniel (28 May 2002)
+- Cris Bailiff brought CURLOPT_CAPATH that works like CURLOPT_CAINFO but
+ specifies a path to a directory with certificates rather than a single file
+ with them all concatenated. --capath was added to the command line tool
+ for the same function.
+
+ Windows users need to pay attention that the directory should be setup with
+ the c_rehash tool of the OpenSSL package, and that creates symlinks by
+ default that need to be replaced with actual copies to work on Windows.
+
+- Gustaf Hui provided new code that changes how curl_multi_info_read()
+ messages are stored, so that they don't have to be kept around for the multi
+ handle's entire life time. He also made it return failure codes properly
+ which it didn't do before.
+
+Daniel (27 May 2002)
+- Gustaf Hui pointed out that running curl_multi_perform() without doing
+ curl_multi_fdset() first was not really a working combo. I added an internal
+ check for this and have some extra select() code without timeout to make the
+ library internals work identically nevertheless. We might need to somehow
+ either document that once you've used the *_fdset() you should remain using
+ them in select() or you should blank them somehow so that libcurl won't go
+ crazy.
+
+Version 7.9.8-pre1
+
+Daniel (22 May 2002)
+- James Cone brought an excellent patch, including several tests and docs!
+ CURLOPT_NETRC now takes an enum as argument instead of the previous boolean.
+ --netrc-optional was introduced as an addition to --netrc to allow the
+ command line client to take use of all that new netrc stuff.
+
+- Bug report #558888 showed a case where libcurl re-used the previous host
+ name when a connection over a proxy was re-used but to a different target
+ host.
+
+Daniel (21 May 2002)
+- Edin Kadribasic helped me sort out a problem to made libcurl crash when
+ trying to HTTP POST an empty string.
+
+- Clarified that Juergen Wilke donated the original tests/server/sws.c code.
+
+- Jean-Philippe Barrette-LaPierre made curl_formadd() return a typedef named
+ CURLFORMcode instead of the previous 'int', and the various return codes are
+ now globally exported. It allows applications to better figure out what goes
+ wrong when curl_formadd() returns errors.
+
+Daniel (20 May 2002)
+- Roland Zimmermann pointed out that SSL_CTX_use_certificate_chain_file()
+ is prefered to SSL_CTX_use_certificate_file().
+
+Daniel (17 May 2002)
+- Bug report #556869 pointed out that src/writeout.c didn't compile on freebsd
+ after my AIX fixes the other week.
+
+- Bug report #556930 pointed out a FreeBSD core dump introduced in 7.9.7 in
+ the DNS struct realloc stuff. Actually, this crash could happen on all
+ systems that made the pack_hostent() function get invoked.
+
+- I removed several compiler warnings in the test suite's HTTP server.
+
+Version 7.9.7
+
+Daniel (10 May 2002)
+- Kevin Roth adjusted the --trace-ascii output slightly.
+
+- Paul Harrington found out that src/writeout.c needed an additional header
+ file included for AIX builds
+
+Version 7.9.7-pre2
+
+Daniel (7 May 2002)
+- Updated the man page with --trace-ascii and -j/--junk-session-cookies.
+
+- Made --trace-ascii do pretty much the same as --trace but without the hex
+ part in the output.
+
+- Added CURLOPT_COOKIESESSION that when enabled makes libcurl ignore session
+ cookies read from a file. This option is enforced by the curl command line
+ tool using the new -j/--junk-session-cookies option. After discussions with
+ Kevin Roth. This makes it easier to use curl to fully emulate a browser's
+ behavior, even when it comes to "session cookies". Session cookies are
+ cookies that a normal browser discards when the browser is shut
+ down. They're identified by not having any expire date/time.
+
+- When CURLOPT_DEBUGDATA was set, it ruined the CURLOPT_STDERR setting and
+ this was discovered when --trace was made to crash.
+
+- Using -v and --trace at the same time confused matters. -v is now pretty
+ much ignored when --trace or --trace-ascii is used.
+
+- Made --trace (and --trace-ascii) support - as file name to pass output to
+ stdout instead. It makes it consistent with how other options work.
+
+Version 7.9.7-pre1
+
+Daniel (6 May 2002)
+- Added multi-post.c to the examples directory. I got the basic source for
+ this from Gustaf Hui.
+
+Daniel (3 May 2002)
+- CURL_MAX_WRITE_SIZE is now an exported #define in the curl/curl.h header and
+ can be used to figure out the maximum buffer size your write callback can
+ get.
+
+- CURLOPT_READDATA is now an alias for CURLOPT_INFILE and CURLOPT_WRITEDATE is
+ an alias for CURLOPT_FILE. These two were added for conformity. Most other
+ callback function's userdata are provided with options using a similar name-
+ scheme.
+
+- Added "--trace [file]" to the command line tool. It makes a very detailed
+ trace dump get stored, with a full protocol dump that includes all received
+ and transmitted data. This could be a very effective tool for debugging what
+ goes wrong. This dump includes every byte the way it is sent to/received
+ from the server. The dump is the plain-text version, so SSL transfers will
+ still be readable.
+
+- I found out that the DEBUGFUNCTION was not called properly everywhere as we
+ wanted it to. I fixed it.
+
+- -D now stores all headers to the same file if multiple URLs are given on the
+ command line! Kevin Roth made me aware of that it didn't already do this!
+
+- Gustaf Hui wrote an excellent formpost example that used the multi
+ interface. Unfortunately, it didn't work due to several bugs in how
+ transfers were made when the multi interface was used.
+
+Daniel (2 May 2002)
+- Hanno Kranzhoff found out that when doing multiple transfers on the same
+ easy handle, the progress meter would show a bad "currently downloaded
+ value" when the transfer starts.
+
+Daniel (1 May 2002)
+- Applied another patch by Jacky Lam to make the name resolve info realloc()
+ stuff work properly.
+
+Daniel (28 April 2002)
+- curl_multi_info_read() is now implemented!
+
+Daniel (27 April 2002)
+- Updated BUGS, TODO, FAQ, INSTALL and added BINDINGS.
+
+- I think I fixed the DNS cache prune crach Jacky Lam found and reported.
+
+- I cleaned up the name prefix stuff in the hash and llist modules.
+
+- FTP responses should now be better on timing out properly. The timeout value
+ is maximum timeout for the entire request operation, but before this, the
+ timeout was used as a maximum allowed time between two reads...
+
+Daniel (26 April 2002)
+- Fixed the test suite http server to not use snprintf() anymore due to better
+ portability.
+
+Daniel (25 April 2002)
+- With Sterling Hughes' new DNS pruning, Jacky Lam asked if this wouldn't
+ cause problems since the pruning is only checking the entry time, and it
+ sure could cause problems. Therefor, I've now added and changed code so that
+ this should not be a problem. Nowhere in the code will be store name
+ resolved information around so that a sunsequent DNS cache prune should
+ cause a problem. This of course called for some mild internal changes.
+
+Daniel (23 April 2002)
+- Improved the 'no_proxy' check, as using port numbers in the URL confused it
+ previously. Reported by Erwan Legrand in bug report #547484.
+
+- The --interface option now works even on IPv6 enabled builds. Reported by
+ 'thor'.
+
+Daniel (22 April 2002)
+- The #defines names starting with TIMECOND now has CURL_ prefixes. (The old
+ names are still #defined too.) Pointed out by Robert Olson.
+
+- Jacky Lam brought code that lets the name resolve function only use as much
+ memory as it actually needs. This only works on certain operating systems,
+ but is totally transparant to all users.
+
+Daniel (19 April 2002)
+- Bjorn Reese fixed pack_hostent to work properly with 64 bit pointers.
+
+Daniel (18 April 2002)
+- Sterling Hughes added code to prune old DNS cache entries, since Jacky Lam
+ experienced very big caches.
+
+Daniel (17 April 2002)
+- Dirk Manske patched the 301 response to work against the RFC but more like
+ common browsers do. If a POST get a 301 back, it'll switch to GET in the
+ next request (if location-following is enabled).
+
+Daniel (16 April 2002)
+- Dirk Manske posted a patch originally written by Ingo Wilken that introduced
+ two new CURLINFO_* values: CURLINFO_REDIRECT_TIME and
+ CURLINFO_REDIRECT_COUNT.
+
+Daniel (15 April 2002)
+- Jonatan Lander patched the verbose text 'Disables POST, goes with GET' to
+ reflect reality better, like when the first request isn't POST and when
+ the second isn't GET... :-)
+
+- Craig Davison pointed out that when curl_formadd()ing a file that doesn't
+ exist, libcurl doesn't return error. Now, curl_easy_perform() will return
+ CURLE_READ_ERROR if that is the case. Test 41 was added to verify this.
+
+Version 7.9.6
+
+Daniel (14 April 2002)
+- Dirk Manske brought a fix that makes libcurl strip off white spaces from the
+ beginning of cookie contents.
+
+- Had to patch include/curl/curl.h since MSVC doesn't set the __STDC__ define.
+ Moonesamy pointed out the problem, Bjorn Reese the solution.
+
+Version 7.9.6-pre5
+
+Daniel (12 April 2002)
+- Fixed the TIMER_CONNECT to be more accurate for FTP transfers. Previously
+ FTP transfers got the "connect done" time set after the initial FTP commands
+ and not directly after the TCP/IP connect as it should.
+
+ I also made the time stamp get set even if the connect itself fails, which
+ it didn't do previously.
+
+- Jean-Philippe Barrette-LaPierre provided his patch that introduces
+ CURLOPT_DEBUGFUNCTION and CURLOPT_DEBUGDATA. They allow a program to a set a
+ callback to receive debug/information data. That includes headers and data
+ that is received and sent. CURLOPT_VERBOSE still controls it.
+
+ By default, there is an internal debugfunction that will make things look
+ and work as before if not changed.
+
+Daniel (10 April 2002)
+- Sebastien Willemijns found out that -x didn't use the default port number as
+ is documented. It does now.
+
+- libcurl-errors.3 is a new man page attempting to document all libcurl error
+ codes
+
+- Added two new error codes and changed the behaviour of two old ones
+ slightly:
+
+ CURLE_WRITE_ERROR
+ This error was returned *both* for errors that occured when writing
+ received data to a local file, as well as when we get problems writing data
+ to a remote server. CURLE_SEND_ERROR has now been added for the latter
+ error.
+
+ CURLE_READ_ERROR
+ This error was similarly returned *both* for errors when reading a local
+ file, as well as when getting problems when reading network data.
+ CURLE_RECV_ERROR has now been added for the latter error.
+
+ (Two test cases were adjusted accordingly.)
+
+Daniel (9 April 2002)
+- runtests.pl now sets the HOME variable before running curl, to prevent any
+ actual ~/.curlrc file to fool the tests!
+
+Version 7.9.6-pre4
+
+Daniel (8 April 2002)
+- Michael Curtis provided new functionality for curl on some platforms. Using
+ the --environment option, curl will *set* a bunch of environment variables
+ to values. The names are the same ones as for the -w/--writeout option.
+
+ For now, this only works on the RISC OS version, as this feature relies on
+ both OS support and that it matches OS paradigms.
+
+- Jacky Lam provided a fix for getting headers-only when the reply is HTTP/1.0
+ and 304, I edited it slightly.
+
+Daniel (5 April 2002)
+- As requested by Jay Graves, the '.curlrc' file (or _curlrc as it is called
+ when used in windows), is now loaded from the current directory if the HOME
+ environment variable isn't set (or if it is too long). I also enlarged the
+ array used to store the full file path in, to 512 bytes.
+
+- Kevin Roth pointed out to me why the "19 March" change regarding -G and -I
+ was stupid and the change was reverted. Added test case 48 to verify the
+ functionality.
+
+Version 7.9.6-pre3
+
+Daniel (4 April 2002)
+- Jonatan Lander brought a patch that makes curl/curl.h compile nicely on
+ pre-ISO compilers, like when using gcc -traditional.
+
+Daniel (3 April 2002)
+- Jacky Lam identified a glitch when getting headers-only, where libcurl would
+ "hang" 1 second in vain in the select() loop before returning back.
+
+- Tor Arntsen brought a patch for multipart formposts. It turned out that the
+ "CGI_Lite Perl package" makes some bad assumptions on what letters that may
+ be used in boundary strings and thus curl could confuse it by including '+'
+ and '/'. While this is standards-compliant, we change the behavior to work
+ smoothly with existing software based on that package.
+
+Daniel (2 April 2002)
+- Gerhard Herre filed bug report #536238 where he pointed out a crash in
+ verbose FTP passive transfers for AIX.
+
+- Clarence Gardner pointed out a minor flaw in how libcurl didn't properly
+ take care of all errors that SSL_read() could return.
+
+- Jacky Lam fixed a MALLOCDEBUG problem in lib/getinfo.c
+
+Daniel (27 March 2002)
+- T. Bharath pointed out a flaw in the connection re-use function that didn't
+ check proxy connections properly for "deadness" before they were re-used.
+
+- Pedro Neves found out that HTTP POSTing with --data-binary did not properly
+ work under Windows as the file specified wasn't read fully binary!
+
+Daniel (25 March 2002)
+- Jacky Lam brought a fix that improves treatment of cookies using identical
+ domains but with leading dots properly.
+
+Daniel (22 March 2002)
+- Miklos Nemeth updated the windows section of the docs/INSTALL file and the
+ windows makefiles.
+
+- Jon Dillon provided us with several good-looking curl images for
+ promotion. View them here http://curl.haxx.se/icons.html
+
+Daniel (20 March 2002)
+- Peter Verhas found out that CRLF replacement in uploads was not working. I
+ fixed it, and added test case 128 that verifies the functionality.
+
+- The list formerly known as curl-main is now named curl-users and is hosted
+ by sourceforge. Susbcribe to the new list, get off the old one.
+
+Version 7.9.6-pre2
+
+Daniel (19 March 2002)
+- Made -G and -I on the same command line cause an error.
+
+- Moved the multi.h file to the "public" include directory and made it get
+ included by curl.h so that no extra include files will be necessary to use
+ it.
+
+ Added docs and man pages for the multi interface to the release archive.
+ Added the three example source codes too.
+
+ Necessary steps in my campaign to sneak in the multi interface... ;-)
+
+- Updated the year in all copyright notices in all C and H files.
+
+Daniel (18 March 2002)
+- Tomas Szepe found out that -d and -G didn't mix as they should. I broke this
+ in 7.9.5... Added test case 32 for this.
+
+Version 7.9.6-pre1
+
+Daniel (16 March 2002)
+- Peter Verhas pointed out that the curl_escape and curl_unscape man pages
+ contained factual errors.
+
+- Albert Choy found and corrected a problem with the verbose output when doing
+ PASV ftp transfers. It could make libcurl crash.
+
+ Details in bug report #530562:
+ http://sourceforge.net/tracker/?func=detail&atid=100976&aid=530562&group_id=976
+
+Daniel (15 March 2002)
+- Jun-ichiro itojun Hagino filed bug report #530204 that clearly pointed out
+ the PF_INET fix from February 19 as a not-very-good fix as it broke IPv6
+ capability! That patch is now reverted.
+
+ The problem with slow name lookups with getaddrinfo() on non-IPv6 enabled
+ hosts are instead made by first checking if the stack is IPv6-enabled and if
+ not, the PF_INET is used and otherwise we go with the full PF_UNSPEC.
+
+- T. Bharath pointed out that when we return an "error" from a WRITEFUNCTION
+ as described in the man page, libcurl did not return the documented error
+ code (CURLE_WRITE_ERROR) but would instead return CURLE_READ_ERROR. This is
+ now corrected.
+
+Daniel (14 March 2002)
+- Setting CURLOPT_POST without setting CURLOPT_POSTFIELDS now read the POST-
+ data from the callback.
+
+- The GOPHER support seems to be broken. I don't think I'll even start fixing
+ it until someone else finds out... :-)
+
+Daniel (13 March 2002)
+- Trying 'curl -I ftp.sunet.se' or similar did a SIZE on a silly "(nil)"
+ string. If such a file would be present, curl returned the size of it! Now
+ we prevent this.
+
+- Curl_sendf() was fixed to deal with situation where Curl_write() would've
+ blocked and thus return -1.
+
+- Setting CURLOPT_PROGRESSFUNCTION to NULL now restores the internal function.
+
+- All CURLFORM_* options can now be used in a CURLFORM_ARRAY except the
+ CURLFORM_ARRAY itself. This was necessary since we couldn't expand the
+ CURLFORM_* list proprely and unrestricted until this was the case. It was
+ also a bit peculiar to users why some options could be used in an array
+ while others couldn't.
+
+- Removed some silly CRLF lines that had accidentally slipped into src/main.c
+ Nico Baggus pointed them out to me.
+
+Daniel (11 March 2002)
+- CURLFORM_FILENAME was added. This can be set when creating a file upload
+ part, to set the 'filename' field to a custom value. If this isn't used,
+ the actually used filename will be included instead (as libcurl always has
+ done). curl was adjusted accordingly, and now -F accepts a 'filename=' field
+ too, and allows constructs such as:
+
+ -F 'name=@filename;filename=/dev/null'
+
+ and this can be combined with type= too, in a manner similar to:
+
+ -F "file=@log/test39.txt;filename=fakerfile;type=moo/foobar"
+
+ Test case 39 was added to verify this functionality.
+
+- The struct formerly known as HttpPost is now named curl_httppost to properly
+ use the curl name space. I added a #define for the old name to make existing
+ programs compile even when this new include file is used.
+
+Daniel (8 March 2002)
+- Clifford also discovered that if the client code failed early, as when doing
+ "curl -O" only, it would do fclose(NULL) which caused a segmentation fault
+ on some systems.
+
+- Clifford Wolf provided a patch that made --progress-bar work again.
+
+- I closed bug report #527032 by making sure that we add a newline after a
+ transfer when --progress-bar has been used. Before, without the newline, it
+ made the subsequent text come out wrong.
+
+Version 7.9.5
+
+Daniel (7 March 2002)
+- Added docs/KNOWN_BUGS to the release archive.
+
+Daniel (6 March 2002)
+- Kevin Roth corrected a flaw in the curl client globbing code that made it
+ mess up backslashes. This was most notable on windows (cygwin) machines when
+ using file://.
+
+- Brad provided another fix for building outside the source-tree.
+
+- Ralph Mitchell patched away a few compiler warnings in tests/server/sws.c
+
+Daniel (5 March 2002)
+- I noticed that the typedef in curl.h for the progress callback prototype was
+ wrong and thus applications that used it would not get the proper input
+ data. It used size_t where the implementation actually uses doubles!
+
+ I wish I could blame someone else, but this was my fault. Again.
+
+Version 7.9.5-pre6
+
+Daniel (4 March 2002)
+- Cut off the changes done during 2001 from this changelog file and put them
+ in a separate file (CHANGES.2001), available from CVS of course.
+
+- I removed the multi directory. The example sources were moved to the
+ docs/examples directory where they belong.
+
+- Wrote 7 new man pages for the current functions in the new multi interface.
+ They're all still pretty basic, but we can use them as a start and add more
+ contents to them when we figure out what to write. The large amount of man
+ pages for libcurl now present made me decide to put them in a new separate
+ subdirectory in the docs directory. Named libcurl.
+
+- Giuseppe Corbelli provided a template file for the EPM package manager, it
+ gets generated nicely by the configure script now.
+
+Version 7.9.5-pre5
+
+Daniel (1 March 2002)
+- Moved the memanalyze.pl script into the tests/ dir and added it to the
+ release archives. It was previously only present in the CVS tree.
+
+- Modified the February 17th Host: fix, as bug report #523718 pointed out that
+ it caused crashes!
+
+- Nico Baggus added more error codes to the VMS stuff.
+
+- Wesley Laxton brought the code that introduced the new CURLOPT_PREQUOTE
+ option. It is just another FTP quote option that allows the user to specify
+ a list of FTP commands to issue *just before* the transfer command (RETR or
+ STOR etc). It has turned up a few systems that really need this.
+
+ The curl command line tool can also take advantage of this by prefixing the
+ quote commands with a plus (+) in similar style that post transfer quote
+ commands are specified.
+
+ This is not yet documented. There is no test case for this yet.
+
+Daniel (28 February 2002)
+- Ralph Mitchell made some serious efforts and put a lot of sweat in setting
+ up scripts and things for me to be able to repeat his problems, and I
+ finally could. I found a problem with the header byte counter that wasn't
+ increased properly and thus we could return CURLE_GOT_NOTHING when we in
+ fact had received data.
+
+Daniel (27 February 2002)
+- I had to revert the non-space parsing cookie fix I posted to the mailing
+ list. Expire dates do have spaces and still need to get parsed properly!
+ Instead we just ignore trailing white space and it seems to work...
+
+Daniel (26 February 2002)
+- Made the cookie property 'Max-Age' work, just since we already tried to
+ support it, it is better to do it right. No one uses this anyway.
+
+- The cookie parser could crash if a really weird (illegal) cookie line was
+ received. I also made it better discard really oddly formatted lines better.
+
+ Made the cookie jar store the second field from the left using the syntax
+ that Netscape and Mozilla probably like. Curl itself ignores it.
+
+ Added test case 31 for these cases.
+
+ Clay Loveless' email regarding some cookie issues started my cleanup.
+
+- Kevin Roth pointed out that my automake fiddles broke the ability to build
+ outside the source-tree and I posted a patch to the mailing list that brings
+ this ability back.
+
+Version 7.9.5-pre4
+
+Daniel (25 February 2002)
+- Fiddled with the automake files to make all source files in the lib
+ directory not have ../src in the include path, and the src sources shouldn't
+ have ../lib!
+
+- All 79 test cases ran OK under Linux and Solaris using the new HTTP server
+ in the test suite. The new HTTP server was first donated by Georg Horn and
+ subsequently modified to work with the test suite. It is currently still not
+ portable enough to run on "all over" but this is a start and I can run all
+ curl tests on my machines. This is an important requirement for the upcoming
+ public release.
+
+- Using -d and -I on the same command line now reports an error, as it implies
+ two different HTTP requests that can't be mixed.
+
+- Jeffrey Pohlmeyer provided a patch that made the -w/--write-out option
+ support %{content_type} to get the content type of the recent download.
+
+- Kevin Roth reported that pre2 and pre3 didn't compile properly on cygwin,
+ and this was because I used #ifdef HAVE_WINSOCK_H in lib/multi.h to figure
+ out if we could include winsock.h which turns out not to be a wise choice to
+ do on cygwin since it has the file but can't include it!
+
+Daniel (22 February 2002)
+- Added src/config-vms.h to the release archive.
+
+- Fixed the connection timeout value again, the change from February 18 wasn't
+ complete.
+
+Version 7.9.5-pre3
+
+Daniel (21 February 2002)
+- Kevin Roth and Andrés García both found out that lib/config.h.in was missing
+ in the pre-release archive and thus the configure script failed.
+
+Version 7.9.5-pre2
+
+Daniel (20 February 2002)
+- Andrés García provided a solution to bug report #515228. the total time
+ counter was not set correctly when -I was used during some conditions (all
+ headers were read in one single read).
+
+- Nico Baggus provided a huge patch with minor tweaks all over to make curl
+ compile nicely on VMS.
+
+Daniel (19 February 2002)
+- Rick Richardson found out that by replacing PF_UNSPEC with PF_INET in the
+ getaddrinfo() calls, he could speed up some name resolving calls with an
+ order of magnitudes on his Redhat Linux 7.2.
+
+- Philip Gladstone found a second INADDR_NONE problem where we used long
+ intead of in_addr_t which caused 64bit problemos. We really shouldn't define
+ that on two different places.
+
+Daniel (18 February 2002)
+- Philip Gladstone found a problem in how HTTP requests were sent if the
+ request couldn't be sent all at once.
+
+- Emil found and corrected a bad connection timeout comparison that made curl
+ use the longest of connect-timeout and timout as a timeout value, instead of
+ the shortest as it was supposed to!
+
+- Aron Roberts provided updated information about LDAP URL syntax to go into
+ the manual as a replacement for the old references.
+
+Daniel (17 February 2002)
+- Philip Gladstone pointed out two missing include files that made curl core
+ dump on 64bit architectures. We need to pay more attention on these details.
+ It is *lethal* to for example forget the malloc() prototype, as 'int' is
+ 32bit and malloc() must return a 64bit pointer on these platforms.
+
+- Giaslas Georgios fixed a problem with Host: headers on repeated requests on
+ the same handle using a proxy.
+
+Daniel (8 February 2002)
+- Hanno L. Kranzhoff accurately found out that disabling the Expect: header
+ when doing multipart formposts didn't work very well. It disabled other
+ parts of the request header too, resulting in a broken header. When I fixed
+ this, I also noticed that the Content-Type wasn't possible to disable. It is
+ now, even though it probably is really stupid to try to do this (because of
+ the boundary string that is included in the internally generated header,
+ used as form part separator.)
+
+Daniel (7 February 2002)
+- I moved the config*.h files from the root directory to the lib/ directory.
+
+- I've added the new test suite HTTP server to the CVS repository, It seems to
+ work pretty good now, but we must make it get used by the test scripts
+ properly and then we need to make sure that it compiles, builds and runs on
+ most operating systems.
+
+Version 7.9.5-pre1
+
+Daniel (6 February 2002)
+- Miklos Nemeth provided updated windows makefiles and INSTALL docs.
+
+- Mr Larry Fahnoe found a problem with formposts and I managed to track down
+ and patch this bug. This was actually two bugs, as the posted size was also
+ said to be two bytes too large.
+
+- Brent Beardsley found out and brought a correction for the
+ CURLINFO_CONTENT_TYPE parser that was off one byte. This was my fault, I
+ accidentaly broke Giaslas Georgios' patch.
+
+Daniel (5 February 2002)
+- Kevin Roth found yet another SSL download problem.
+
+Version 7.9.4
+
+- no changes since pre-release
+
+Version 7.9.4-pre2
+
+Daniel (3 February 2002)
+- Eric Melville provided a few spelling corrections in the curl man page.
+
+Daniel (1 February 2002)
+- Andreas Damm corrected the unconditional use of gmtime() in getdate, it now
+ uses gmtime_r() on all hosts that have it.
+
+Daniel (31 January 2002)
+- An anonymous bug report identified a problem in the DNS caching which made it
+ sometimes allocate one byte too little to store the cache entry in. This
+ happened when the port number started with 1!
+
+- Albert Chin provided a patch that improves the gethostbyname_r() configure
+ check on HP-UX 11.00.
+
+Version 7.9.4-pre1
+
+Daniel (30 January 2002)
+- Georg Horn found another way the SSL reading failed due to the non-blocking
+ state of the sockets! I fixed.
+
+Daniel (29 January 2002)
+- Multipart formposts now send the full request properly, including the CRLF.
+ They were previously treated as part of the post data.
+
+- The upload byte counter bugged.
+
+- T. Bharath pointed out that we seed SSL on every connect, which is a time-
+ consuming operation that should only be needed to do once. We patched
+ libcurl to now only seed on the first connect when unseeded. The seeded
+ status is global so it'll now only happen once during a program's life time.
+
+ If the random_file or egdsocket is set, the seed will be re-made though.
+
+- Giaslas Georgios introduced CURLINFO_CONTENT_TYPE that lets
+ curl_easy_getinfo() read the content-type from the previous request.
+
+Daniel (28 January 2002)
+- Kjetil Jacobsen found a way to crash curl and after much debugging, it
+ turned out it was a IPv4-linux only problem introduced in 7.9.3 related to
+ name resolving.
+
+- Andreas Damm posted a huge patch that made the curl_getdate() function fully
+ reentrant!
+
+- Steve Marx pointed out that you couldn't mix CURLOPT_CUSTOMREQUEST with
+ CURLOPT_POSTFIELDS. You can now!
+
+Daniel (25 January 2002)
+- Krishnendu Majumdar pointed out that the header length counter was not reset
+ between multiple requests on the same handle.
+
+- Pedro Neves rightfully questioned why curl always append \r\n to the data
+ that is sent in HTTP POST requests. Unfortunately, this broke the test suite
+ as the test HTTP server is lame enough not to deal with this... :-O
+
+- Following Location: headers when the connection didn't close didn't work as
+ libcurl didn't properly stop reading. This problem was added in 7.9.3 due to
+ the restructured internals. 'Frank' posted a bug report about this.
+
+Daniel (24 January 2002)
+- Kevin Roth very quickly spotted that we wrongly installed the example
+ programs that were built in the multi directory, when 'make install' was
+ used. :-/
+
+Version 7.9.3
+
+Daniel (23 January 2002)
+- Andrés García found a persistancy problem when doing HTTP HEAD, that made
+ curl "hang" until the connection was closed by the server. This problem has
+ been introduced in 7.9.3 due to internal rewrites, this was not present in
+ 7.9.2.
+
+Version 7.9.3-pre4
+
+Daniel (19 January 2002)
+- Antonio filed bug report #505514 and provided a fix! When doing multipart
+ formposts, libcurl would include an error text in the actual post if a
+ specified file wasn't found. This is not libcurl's job. Instead we add an
+ empty part.
+
+Daniel (18 January 2002)
+- Played around with stricter compiler warnings for gcc (when ./configure
+ --enable-debug is used) and changed some minor things to stop the warnings.
+
+- Commented out the 'long long' and 'long double' checks in configure.in, as
+ we don't currently use them anyway and the code in lib/mprintf.c that use
+ them causes warnings.
+
+- Saul Good and jonatan pointed out Mac OS X build problems with pre3 and how
+ to correct them. Two compiler warnings were removed as well.
+
+- Andrés García fixed two minor mingw32 building problems.
+
+Version 7.9.3-pre3
+
+Daniel (17 January 2002)
+- docs/libcurl-the-guide is a new tutorial for our libcurl programming
+ friends.
+
+- Richard Archer brought back the ability to compile and build with OpenSSL
+ versions before 0.9.5.
+ [http://sourceforge.net/tracker/?func=detail&atid=100976&aid=504163&group_id=976]
+
+- The DNS cache code didn't take the port number into account, which made it
+ work rather bad on IPv6-enabled hosts (especially when doing passive
+ FTP). Sterling fixed it.
+
+Daniel (16 January 2002)
+- Georg Horn could make a transfer time-out without error text. I found it and
+ corrected it.
+
+- SSL writes didn't work, they return an uninitialized value that caused
+ havoc all over. Georg Horn experienced this.
+
+- Kevin Roth patched the curl_version() function to use the proper OpenSSL
+ function for version information. This way, curl will report the version of
+ the SSL library actually running right now, not the one that had its headers
+ installed when libcurl was built. Mainly intersting when running with shared
+ OpenSSL libraries.
+
+Version 7.9.3-pre2
+
+Daniel (16 January 2002)
+- Mofied the main transfer loop and related stuff to deal with non-blocking
+ sockets in the upload section. While doing this, I've now separated the
+ connection oriented buffers to have one for downloads and one for uploads
+ (as two can happen simultaneously). I also shrunk the buffers to 20K
+ each. As we have a scratch buffer twice the size of the upload buffer, we
+ arrived at 80K for buffers compared with the previous 150K.
+
+- Added the --cc option to curl-config command as it enables so very cool
+ one-liners. Have a go a this one, building the simple.c example:
+
+ $ `curl-config --cc --cflags --libs` -o example simple.c
+
+Daniel (14 January 2002)
+- I made all socket reads (recv) handle EWOULDBLOCK. I hope nicely. Now we
+ only need to address all writes (send) too and then I'm ready for another
+ pre-release...
+
+- Stoned Elipot patched the in_addr_t configure test to make it work better on
+ more platforms.
+
+Daniel (9 January 2002)
+- Cris Bailiff found out that filling up curl's SSL session cache caused a
+ crash!
+
+- Posted the curl questionnaire on the web site. If you haven't posted your
+ opinions there yet, go there and do it now while it is still there:
+
+ http://curl.haxx.se/q/
+
+- Georg Horn quickly found out that the SSL reading no longer worked as
+ supposed since the switch to non-blocking sockets. I've made a quick patch
+ (for reading only) but we should improve it even further.
+
+Version 7.9.3-pre1
+
+Daniel (7 January 2002)
+- I made the 'bool' typedef use an "unsigned char". It makes it the same on
+ all platforms, no matter what the platform thinks the default format for
+ char is. This was noticed since we made a silly comparison involving such a
+ bool variable, and only one compiler/platform combination (on Debian Linux)
+ complained about it (that happened to have its char unsigned by default).
+
+- Bug report #495290 identified a cookie parsing problem that was corrected.
+ When a Set-Cookie: line is received without a trailing semicolon, libcurl
+ didn't read the last "name=value" pair of the line, leading to confusions...
+
+- Sterling committed his updated DNS cache code.
+
+- I worked with Georg Horn and comments from Götz Babin-Ebell and switched
+ curl's socket operations completely over to non-blocking for the entire
+ operation (previously we used non-blocking only for the connection phase).
+ We had to do this to make the SSL connection phase timeout properly without
+ the use of signals. A little extra code to deal with this was added.
+
+- T. Bharath pointed out a slightly obscure cookie engine flaw.
+
+- Pete Su pointed out that libcurl didn't treat HTTP code 204 as it should.
+ 204-replies never provides a response-body. This resulted in bad persistant
+ behavior when 204 was received.
+
+Daniel (5 January 2002)
+- SM updated the VC++ library Makefiles for the new source files.
+
+Daniel (4 January 2002)
+- I discovered that we wrongly used inet_ntoa() (instead of inet_ntoa_r() in
+ two places in the source code). One happened with VERBOSE set on connects,
+ and the other when VERBOSE was on and krb4 over nat was used... I honestly
+ don't think anyone has suffered from these mistakes.
+
+- I replaced a lot of silly occurances of printf() to instead use the more
+ appropriate Curl_infof() or Curl_failf(). The krb4 and telnet code were
+ affected.
+
+- Philip Gladstone found a few more problems with 64-bit archs (the 64-bit
+ sparc on solaris 8).
+
+- After discussions on the libcurl list with Raoul Cridlig, I just made FTP
+ response lines get passed to the header callback if such a one is
+ registered. It'll make it possible for any application to get all the
+ responses an FTP server sends to libcurl.
+
+Daniel (3 January 2002)
+- Sterling Hughes brought a few buckets of code. Now, libcurl will
+ automatically cache DNS lookups and re-use the previous results first if any
+ such is available. It greatly improves speed when doing many repeated
+ operations to the same host.
+
+- As the test case uses --include and then --head, I had to modify src/main.c
+ to deal with this situation slightly better than previously. When done, we
+ have 100% good tests again in the main branch.
+
+Daniel (2 January 2002)
+- Made test case 25 run again in the multi-dev branch. But it seems that the
+ changes done on dec-20 made test case 104 cease to work (in both branches).
+
+- Philip Gladstone pointed out a few portability problems in the source code
+ that didn't compile on 64-bit sparcs using Sun's native compiler.
+Daniel (20 December 2001)
+- Björn Stenberg caught an unpleasent (but hard-to-find) bug that could cause
+ libcurl to hang on transfers over proxy, when the proxy was specified with
+ an environment variable!
+
+- Added code to make ftp operations treat the NO_BODY and HEADERS options
+ better:
+
+ NO_BODY set TRUE and HEADERS set TRUE:
+ Return a set of headers with file info
+
+ NO_BODY set FALSE
+ Transfer data as usual, HEADERS is ignored
+
+ NO_BODY set TRUE and HEADERS set FALSE
+ Don't transfer any data, don't return any headers. Just perform the set
+ of FTP commands.
+
+Daniel (17 December 2001)
+- Götz Babin-Ebell dove into the dark dungeons of the OpenSSL ENGINE stuff and
+ made libcurl support it! This allows libcurl to do SSL connections with the
+ private key stored in external hardware.
+
+ To make this good, he had to add a bunch of new library options that'll be
+ useful to others as well:
+
+ CURLOPT_SSLCERTTYPE set SSL cert type (PEM/DER)
+ CURLOPT_SSLKEY set SSL private key (file)
+ CURLOPT_SSLKEYTYPE: set SSL key type (PEM/DER/ENG)
+ CURLOPT_SSLKEYPASSWD: set the passphrase for your private key
+ (CURLOPT_SSLCERTPASSWD is an alias)
+ CURLOPT_SSLENGINE: set the name of the crypto engine
+ (returns CURLE_SSL_ENGINE_NOTFOUND on error)
+ CURLOPT_SSLENGINE_DEFAULT: set the default engine
+
+ There are two new failure codes:
+
+ CURLE_SSL_ENGINE_NOTFOUND
+ CURLE_SSL_ENGINE_SETFAILED
+
+Daniel (14 December 2001)
+- We have "branched" the source-tree at a few places. Checkout the CVS sources
+ with the 'multi-dev' label to get the latest multi interface development
+ tree. The idea is to only branch affected files and to restrict the branch
+ to the v8 multi interface development only.
+
+ *NOTE* that if we get bug reports and patches etc, we might need to apply
+ them in both branches!
+
+ The multi-dev branch is what we are gonna use as main branch in the future
+ if it turns out successful. Thus, we must maintain both now in case we need
+ them. The current main branch will be used if we want to release a 7.9.3 or
+ perhaps a 7.10 release before version 8. Which is very likely.
+
+- Marcus Webster provided code for the new CURLFORM_CONTENTHEADER option for
+ curl_formadd(), that lets an application add a set of headers for that
+ particular part in a multipart/form-post. He also provided a section to the
+ man page that describes the new option.
+
+Daniel (11 December 2001)
+- Ben Greear made me aware of the fact that the Curl_failf() usage internally
+ was a bit sloppy with adding newlines or not to the error messages. Let's
+ once and for all say that they do not belong there!
+
+- When uploading files with -T to give a local file name, and you end the URL
+ with a slash to have the local file name used remote too, we now no longer
+ use the local directory as well. Only the file part of the -T file name
+ will be appended to the right of the slash in the URL.
+
+Daniel (7 December 2001)
+- Michal Bonino pointed out that Digital Unix doesn't have gmtime_r so the
+ link failed. Added a configure check and corrected source code.
+
+Version 7.9.2
+
+Daniel (5 December 2001)
+- Jon Travis found out that if you used libcurl and CURLOPT_UPLOAD and then
+ on the same handle used CURLOPT_HTTPGET it would still attempt to upload.
+ His suggested fix was perfect.
+
+Daniel (4 December 2001)
+- Incorporated more macos fixes and added four specific files in a new
+ subdirectory below src.
+
+Daniel (3 December 2001)
+- Eric Lavigne reported two problems:
+
+ First one in the curl_strnequal() function. I think this problem is rather
+ macos 9 specific, as most platform provides a function to use instead of the
+ one provided by libcurl.
+
+ A second, more important, was in the way we take care of FTP responses. The
+ code would read a large chunk of data and search for the end-of-response
+ line within that chunk. When found, it would just skip the rest of the
+ data. However, when the network connections are special, or perhaps the
+ server is, we could actually get more than one response in that chunk of
+ data so that when the next invoke to this function was done, the response
+ had already been read and thrown away. Now, we cache the data not used in
+ one call, as it could be useful in the subsequent call. Test case 126 was
+ added and the test ftp server modified, to exercise this particular case.
+
+Version 7.9.2-pre8
+
+Daniel (2 December 2001)
+- Bug report #487825 correctly identified a problem when using a proxy and
+ following a redirection from HTTP to HTTPS. libcurl then re-used the same
+ proxy connection but without doing a proper HTTPS request.
+
+- Fixed win32 compiling quirks.
+
+Version 7.9.2-pre7
+
+Daniel (30 November 2001)
+- Documented --disable-epsv and CURLOPT_FTP_USE_EPSV.
+
+Daniel (29 November 2001)
+- Added --disable-epsv as an option. When used, curl won't attempt to use the
+ EPSV command when doing passive FTP downloads. Wrote a test case for it.
+
+- Eric provided a few more fixes for building on Macs. He also pointed out
+ a flaw in the signal handler restoration code.
+
+Daniel (28 November 2001)
+- Fiddled with some Tru64 problems reported by Dimitris Sarris. They appeared
+ only when using VERBOSE ftp transfers. Do we use a too small buffer for
+ gethostbyaddr_r(), was the lack of using in_addr_t wrong or is it that the
+ hostent struct must be blanked before use? With Dimitris help and these
+ patches, the problems seem to be history.
+
+- CURLOPT_FTP_USE_EPSV was added and can be set to FALSE to prevent libcurl
+ from using the EPSV command before trying the normal PASV. Heikki Korpela
+ pointed out that some firewalls and similar don't like the EPSV so we must
+ be able to shut if off to work everywhere.
+
+- I added a configure check for 'in_addr_t' and made the ftp code use that to
+ receive the inet_addr() return code in. Works on Solaris and Linux at
+ least. The Linux man page for inet_addr() doesn't even mention in_addr_t...
+
+- Adjusted (almost) all FTP tests to the new command sequence.
+
+- FTP command sequence changes:
+
+ EPSV is now always attempted before PASV. It is the final touch to make IPv6
+ passive FTP downloads to work, but EPSV is not restricted to IPv6 but works
+ fine with IPv4 too on the servers that support it.
+
+ SIZE is now always issued before RETR. It makes curl know the actual
+ download size before the download takes place, as it makes it less important
+ to find the size sent in RETR responses. Many sites don't include the size
+ in there.
+
+ Both these changes made it necessary to change the test suite's ftp server
+ code, and all FTP test cases need to be checked and adjusted!
+
+Daniel (27 November 2001)
+- Hans Steegers pointed out that the telnet code read from stdout, not stdin
+ as it is supposed to do!
+
+Version 7.9.2-pre6
+
+Daniel (27 November 2001)
+- Eric Lavigne's minor changes to build on MacOS before OS X were applied.
+
+- greep at mindspring.com provided a main index.html page for our release
+ archive docs directory. It just links to all the existing HTML files, but
+ I think it may come useful to people.
+
+- There's now some initial code to support the EPSV FTP command. That should
+ be used to do passive transfers IPv6-style. The code is still #if 0'ed in
+ lib/ftp.c as I have no IPv6 ftp server to test this with.
+
+Daniel (26 November 2001)
+- Robert Schlabbach had problems to understand how to do resumed transfers,
+ and I clarified the man page -C section somewhat.
+
+Version 7.9.2-pre5
+
+Daniel (22 November 2001)
+- Andrés García helped me out to track down the roots of bug report #479537,
+ which was concerning curl returning the wrong error code when failing to
+ connect. This didn't happen on all systems, and more specificly I've so far
+ only seen this happen on IPv4-only Linux hosts.
+
+- I applied the fixes for the two bugs Eric Lavigne found when doing his MacOS
+ port. A missing comma in arpa_telnet.h and a pretty wild write in the FTP
+ response reader function. The latter write is however likely to occur in our
+ own buffer unless very big FTP server replies (>25K) are read. I've never
+ seen such a reply ever, so I think this is a relatively minor risk.
+
+Daniel (21 November 2001)
+- Moonesamy provided code to prevent junk from being output when libcurl
+ returns an error code but no error description and that corrects how make is
+ run in the Makefile.dist file (that appears as root Makefile in release
+ archives).
+
+- Eric Lavigne mailed me bugfixes and patches for building libcurl on MacOS
+ (non-X).
+
+- Kevin Roth modified the cygwin files once again, now to build against the
+ shared OpenSSL DLLs.
+
+Version 7.9.2-pre4
+
+Daniel (20 November 2001)
+- Georg Horn brought a patch that introduced CURLINFO_STARTTRANSFER_TIME,
+ complete with man page updates!
+
+Daniel (19 November 2001)
+- Miklos Nemeth provided details enough to update the Borland makefile
+ properly.
+
+- Lars M Gustafsson found a case with a bad free(). In fact, it was so bad I'm
+ amazed we never saw this before!
+
+- Kevin Roth patched the cygwin Makfile.
+
+Daniel (16 November 2001)
+- Klevtsov Vadim fixed a bug in how time-conditionals were sent when doing
+ HTTP.
+
+Version 7.9.2-pre3
+
+Daniel (14 November 2001)
+- Samuel Listopad patched away the problem with SSL we got when someone call
+ curl_global_init() => curl_global_cleanup() => curl_global_init(). The
+ second init would not "take" and SSL would be unusable with curl from that
+ point. This doesn't change the fact that calling the functions that way is
+ wrong. curl_global_init() should be called exactly once and not more.
+
+Daniel (13 November 2001)
+- Fixed some minor variable type mixups in ftp.c that caused compiler warnings
+ on HP-UX 11.00.
+
+- The FTP fix I did yesterday used an uninitialized variable that caused
+ spurious errors when doing FTP.
+
+Version 7.9.2-pre2
+
+Daniel (12 November 2001)
+- Ricardo Cadime fell over a multiple-requests problem when first a FTP
+ directory fetch failed and then a second request is made after that. The
+ second request happened to get the FTP server response back from the
+ previous request, when it did its initial CWD command.
+
+- Bjorn Reese pointed out that we could improve the time diff function to
+ prevent truncation a bit.
+
+- Kai-Uwe Rommel made me aware that -p (http proxy tunnel) silly enough didn't
+ work for plain HTTP requests! So I made that work.
+
+Version 7.9.2-pre1
+
+Daniel (12 November 2001)
+- Rewrote the Curl_ConnectHTTPProxyTunnel(). It should now not only work a lot
+ faster, it should also support such ("broken") proxies that John Lask
+ previously have reported problems with. His proxy sends a trailing zero byte
+ after the end of the (proxy-) headers. I've tested this myself and it seems
+ to work on a proxy the previous version also worked with...! This rewrite is
+ due to the problems John Lask previously experienced.
+
+- Andrés García found out why the "current speed" meter sometimes showed 2048K
+ for very quick transfers. It turned out the "time diff"-function returned a
+ zero millisecond diff. We now always say it is at least one millisecond! In
+ reality, these timers very rarely have that good resolution so even though
+ the time diff was longer than 1 millisecond, it was reported as no diff.
+
+- I also modified the getinfo() again when returning times, as Paul Harrington
+ reports that 7.9.1 only returns times with 1 second accuracy, which indeed
+ is wrong.
+
+Daniel (8 November 2001)
+- Marcus Webster found out that curl_formadd() could read one byte outside a
+ buffer boundary, which then of course could lead to a crash. Marcus also
+ gracefully provided a patch for this this.
+
+- Glen Scott ran configure on his Cobalt Qube and it didn't figure out the
+ correct way of calling gethostbyname_r() and thus failed to resolve hosts.
+ This is two errors: it shouldn't continue the configure script if it finds
+ gethostbyname_r() but can't figure out how to use it, and it should really
+ figure out how to use it as it was running Linux and we know how that
+ works...
+
+Daniel (7 November 2001)
+- docs/VERSIONS is a new file in the archive that explains the version number
+ system we use in the curl project.
+
+- Did some more fixes that now makes libcurl only ignore signals as long as
+ it needs to, and then restore (if any) previous signal handler again.
+
+Daniel (6 November 2001)
+- Enrik Berkhan posted bug report #478780, in which he very correctly pointed
+ out two bad timeout matters in libcurl: we didn't restore the sigaction
+ struct (the alarm handler for SIGALRM) nor did we restore the previous
+ alarm() timeout that could've been set by a "parent" process or similar.
+
+- Kevin Roth made the cygwin binary get stripped before install.
+
+Daniel (5 November 2001)
+- Detlef Schmier reported that curl didn't compile using Solaris 8 with the
+ native cc compiler. It was due to a bad function prototype. Fixed now.
+ Unfortunately, I can't enable the -Wstrict-prototypes in my debug builds
+ though, as gcc then complains like crazy on OpenSSL include files... :-(
+
+- John Lask provided SSL over HTTP proxy fixes. They'll need some tweaking
+ to work on all platforms.
+
+- John Lask added the -1/--TLSv1 options that forces SSL into using TLS
+ version 1 when speaking HTTPS.
+
+- John Lask brought a brand new VC++ makefile for the lib directory, that
+ works a lot better than the previous!
+
+- Ramana Mokkapati brought some clever insights on the LDAP failures (bug
+ report #475407), and his suggested changes are now applied.
+
+Version 7.9.1
+
+Daniel (4 November 2001)
+- I've added a number of new test cases the last few days. A few of them since
+ I got reports that hinted on problems on timeouts, so I added four tests
+ with timeouts for all sorts of protocols and stuff. I also came to think of
+ a few other error scenarios that we currently didn't test properly, so I
+ wrote up tests for a few of those too.
+
+Daniel (2 November 2001)
+- Replaced read() and write() with recv() and send() for socket operations
+ even under normal unixes.
+
+Daniel (1 November 2001)
+- When an FTP transfer was aborted due to a timeout, it wasn't really aware of
+ how many bytes that had been transferred and the error text always said 0
+ bytes. I modified this to output the actually transferred amount! :-)
+
+- The FTP fixes in pre7 didn't compile on IPv6 enabled hosts. Does now. I also
+ added more comments in the lib/ftp.c source file.
+
+- Minor updates to the FAQ, added a brand new section to the web site about
+ the name issue (who owns "curl"? will someone sue us? etc etc):
+ http://curl.haxx.se/legal/thename.html
+
+Version 7.9.1-pre7
+
+Daniel (31 October 2001)
+- The curl_easy_getinfo() timers accidentally lost their subsecond accuracy as
+ the calculations used longs instead of doubles! Paul Harrington reported.
+
+- The SSL SocketIsDead() checks weren't good enough (as expected really), so I
+ had to add a generic internal try-it-out system. If the request on a re-used
+ connection seems to fail, then we go back and get a new (fresh) connection
+ and re-tries the request on that instead. It kind of makes the
+ SocketIsDead() check obsolete, but I think it is a quicker way for those
+ cases where it actually discovers that the connection is dead.
+
+- When fixing the above, I noticed that we did quite a few writes to sockets
+ in libcurl where we didn't check the return code (that it actually worked to
+ send the data). With the new "attempted request" system we must detect those
+ situations so I went over a bunch of functions, changed return types and
+ added checks for what they actually return.
+
+Version 7.9.1-pre6
+
+Daniel (31 October 2001)
+- Paul Harrington detected a problem with persistant SSL connections. Or to be
+ more exact, we didn't properly detect that the connection was dead and then
+ a second connection would try to re-use it wrongly. The solution to this
+ problem is still not very clear and I'm working on it. One OpenSSL insider
+ said there is no way to know if the SSL connection is alive or not without
+ actually trying an operation.
+
+Daniel (30 October 2001)
+- If a cookie was read from a file, it could accidentally strdup() a NULL
+ pointer. Paul Harrington reported. [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/cookie.c.diff?r1=1.25&r2=1.26]
+
+- The MANUAL file now documents -t correctly. I also fixed the -T description
+ in the curl.1 man page.
+
+Daniel (29 October 2001)
+- John Janssen found out that curl_formadd was missing in the libcurl.def file
+ and that the docs stated the wrong return type for the function.
+
+- Andrés García found a bug with multiple files in the curl_formadd() function,
+ that I removed with this patch [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/formdata.c.diff?r1=1.25&r2=1.26].
+
+- Kevin Roth brought another patch that moved the cygwin package files to the
+ packages/Win32/cygwin directory.
+
+- A bug in the connection re-use logic made repeated requests to the same FTP
+ server (when using name+pasword in the URL) sometimes use more than one
+ connection. [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/url.c.diff?r1=1.166&r2=1.167]
+
+- Moonesamy tracked down and fixed a problem with the new 7.9.1 connect
+ code. This corrected the error Kevin Roth reported on the 7.9.1-pre5 release
+ (test 19)...
+ [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/connect.c.diff?r1=1.13&r2=1.14]
+
+Daniel (26 October 2001)
+- Added test28 which verifies that "Location:"-following works even if the
+ contents is separated with more than one space.
+
+Daniel (25 October 2001)
+- Ramana Mokkapati pointed out that LDAP transfers would 'hang' after the
+ correct data has been output.
+
+Version 7.9.1-pre5
+
+Daniel (24 October 2001)
+- T. Bharath found a memory leak in the cookie engine. When we update a cookie
+ that we already knew about, we lost a chunk of memory in the progress... The
+ brand new test case 27 now tests for this occurrence. [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/cookie.c.diff?r1=1.24&r2=1.25]
+
+Daniel (23 October 2001)
+- pack_hostent() didn't properly align some pointers, so at least SPARC CPUs
+ would core. [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/hostip.c.diff?r1=1.34&r2=1.35]
+
+Daniel (22 October 2001)
+- Tom Benoist reported that this SGI IRIX compiler didn't handle indented
+ preprocessor instructions, so they're no longer in the source code!
+
+- Applied Kevin Roth's patches to make it easier to build cygwin packages from
+ the out-of-the-box curl release archives.
+
+- I forgot to mention it below, but libcurl now closes connections that report
+ transfer failures. Unconditionally. This could be made more nicely in the
+ future if we set a flag or something that the connection is still good to be
+ used for the errors that know that for a fact. We have to close the
+ connection for the cases where we abort for example a HTTP transfer in the
+ middle, or otherwise we might re-use that connection later with lots of data
+ still being sent to us on it. [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/transfer.c.diff?r1=1.63&r2=1.64]
+
+Daniel (19 October 2001)
+- CURLE_GOT_NOTHING is now returned when a HTTP server doesn't return
+ anything, not even a header. test case 37 was added to test for this.
+
+- T. Bharath made curl_easy_duphandle() properly clone the cookie status as
+ well.
+
+Version 7.9.1-pre4
+
+Daniel (18 October 2001)
+- CURLOPT_FAILONERROR, set with "curl --fail" no longer returns an error if
+ the HTTP return code is below 400.
+
+Daniel (17 October 2001)
+- The test suite now kills any running test http server when you re-start the
+ tests.
+
+- We had to remove 'use strict' from two perl scripts, as the cygwin
+ adjustments didn't play nicely otherwise for some reason. Any perl wizard
+ out there who can put the scrict back and still make it run good on unix and
+ cygwin?
+
+- A potential memory leak pointed out to us by Yanick Pelletier was removed.
+ It would occur when a http file transfer fails. [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/transfer.c.diff?r1=1.60&r2=1.61]
+
+- The memory debugging system should no longer display anything to stderr
+ if the curl_memdebug() hasn't been used to explicitly say so. This makes it
+ easier to use the memory debug system and switch the logging on/off.
+
+Daniel (16 October 2001)
+- Kevin Roth provided fixes for building curl nicer in cygwin environments.
+
+Daniel (12 October 2001)
+- Cleaning up the progress meter/info code. The "current speed" is now more
+ accurate than before as we now use the true time spent between the measures,
+ and not just "assuming" every-second-update like before. The output should
+ now also be of the same width at all times, never to show "extra" zeroes on
+ the right edge.
+
+- After talking about possible Location: bugs on the mailing list, I modified
+ the "absolute URL" checker in lib/transfer.c to be more strict when checking
+ if the redirected URL is absolute.
+
+Daniel (11 October 2001)
+- Kevin Roth provided patches that make the test suite run fine on Windows
+ 2000 running cygwin.
+
+Daniel (10 October 2001)
+- Setting the -c or the CURLOPT_COOKIEJAR option now enables the cookie parser.
+ Previously -b or CURLOPT_COOKIEFILE was also required for the jar to work.
+
+Version 7.9.1-pre3
+
+Daniel (9 October 2001)
+- Added a new option to the command line client: -0/--http1.0. It uses the new
+ libcurl option CURLOPT_HTTP_VERSION to request that libcurl uses HTTP 1.0
+ requests instead of the default version (1.1). It should only be used if you
+ really MUST do that because of a silly remote server.
+
+- Renamed the 'TimeCond' typedef in curl/curl.h to use a 'curl_' prefix as
+ all public curl-symbols should.
+
+- libcurl now explicitly ignores the SIGPIPE signal.
+
+Daniel (8 October 2001)
+- Kevin Roth's change to the cookie-jar comment (in the stored file) was
+ applied.
+
+- Lucas Adamski's minor bug in the bind error code failf() was fixed.
+
+Daniel (5 October 2001)
+- Moonesamy fixed the Curl_connecthost() function to not give compiler errors
+ on a bunch of compilers, due to the argument named 'socket'.
+
+- Moonesamy also provided updated VC++ makefiles and project files.
+
+Version 7.9.1-pre2
+
+Daniel (4 October 2001)
+- Albert Chin provided a configure patch that makes the script detect proper
+ gethostbyname_r() method without actually running any code, only compiling
+ is necessary. This also removes the need of having a resolving 'localhost'
+ name.
+
+- Found and removed memory leakage (name resolve data) in libcurl on
+ IPv6-enabled hosts. These could sneak through because we didn't have any
+ resource tracing on the IPv6-related functions. We do now.
+
+Daniel (3 October 2001)
+- Keith McGuigan patched away a (mainly Windows-) problem with the name
+ resolver data being kept in the static memory area, which is removed when a
+ thread is killed. The curl handle itself though perfectly handles being
+ passed between threads.
+
+- Dirk Eddelbuettel reported an odd bug that turned out to be his proxy that
+ required an Authorization: header. Now, proxies are not supposed to require
+ that header, that is for true servers...
+
+- I accidentally ruined Georg's curl_formadd(). Uh, bad me. Corrected now.
+
+Version 7.9.1-pre1
+
+Daniel (3 October 2001)
+- Georg Huettenegger once again made an effort beyond the call of duty and not
+ only improved the curl_formadd() function, but also took care of adjusting
+ the curl command line client to use this new function instead of the
+ obsoleted curl_formparse.
+
+Daniel (2 October 2001)
+- Major fix in how libcurl does TCP connects. It now does non-blocking
+ connects to enable good timeouts without signals, and it now tries all IP
+ addresses for any given host (if it resolves more than one and the first
+ one(s) don't connect). Added a new source file 'connect.c' to deal with all
+ the TCP connect stuff.
+
+- We now support IPv4-style IP-addresses in rfc2732-format, to better support
+ people writing scripts without knowing what address there is.
+
+Daniel (28 September 2001)
+- Cleanups in the FTP source code. Divided the code into even more smaller
+ functions and generally tried to make the differences between IPv4 and IPv6
+ get less noticable in the sources.
+
+- If the remote file time is not readable/accessable/understood by libcurl,
+ libcurl now returns -1 in the CURLINFO_FILETIME data, not 0 as it previously
+ did. This should make curl not touch the file data unless there was a known
+ remote date when -R is used.
+
+Daniel (27 September 2001)
+- Working on getting non-blocking connects working platform independent. We
+ will also make curl try all IPs for a given host if the first one should
+ fail.
+
+Daniel (26 September 2001)
+- Kevin Roth provided a cookie example that proved the cookie jar
+ functionality wasn't working properly. I added test case 46 and made it
+ work.
+
+Daniel (25 September 2001)
+- Jörn Hartroth updated the mingw32 makefiles.
+
+Version 7.9
+
+Daniel (23 September 2001)
+- Found and removed a 'socket leak' that would occur on IPv6 enabled hosts
+ when FTP RETR failed.
+
+- Made the FTP upload tests run fine on machines with IPv6 enabled.
+
+Version 7.9-pre8
+
+Daniel (19 September 2001)
+- Vojtech Minarik set up a special-purpose test server and provided me with
+ test certificates in order for me to repeat the bug reports #440068 and
+ #440373. It turned out we didn't check all the error codes properly. We do
+ now, and connecting with a unacceptable certificate will make libcurl fail
+ to connect with an error code returned.
+
+- Ramana Mokkapati found a case when the Location: following code did wrong.
+ I wrote a test case for this (45).
+
+Version 7.9-pre7
+
+Daniel (17 September 2001)
+- Linus Nielsen Feltzing fixed telnet for win32. It makes libcurl require
+ winsock 2.0.
+
+Version 7.9-pre6
+
+- libtool 1.4.2 is now in use!
+
+Version 7.9-pre5
+
+Daniel (14 September 2001)
+- Added another 14 ftp tests.
+
+Daniel (13 September 2001)
+- Added curl_easy_duphandle() to the easy.h header file. It has now been
+ tested and proved to work in a real-world tests by T Bharath. We still need
+ to write up some docs for this function.
+
+- Added four more ftp tests to the test suite.
+
+Daniel (12 September 2001)
+- CURLOPT_SSL_CIPHER_LIST was added, and the curl tool option is named
+ --ciphers. Use them to specify a list of ciphers to use in the SSL
+ connection.
+
+- T. Bharath found a memory leak in libcurl's windows version. It turned out
+ to be the new duphandle() that didn't quite work yet.
+
+Version 7.9-pre4
+
+Daniel (11 September 2001)
+- Added verbose output for SSL connections that output the server
+ certificate's start and expire dates. As suggested by Paul Harrington.
+
+- Heikki Korpela found problems in the perl ftp server used for the test
+ suite, when he runs on on OpenBSD with perl 5.6. Some changes have been
+ made, but nothing really certain.
+
+- T. Bharath has experienced problems with libcurl's stack usage on windows
+ and works on reducing it.
+
+Daniel (10 September 2001)
+- Cris Bailiff fixed the perl interface. It stopped working since the changed
+ behavior with WRITEHEADER and NULL pointers.
+
+- The "output cookies" function could dump core if no cookies were enabled.
+
+Daniel (7 September 2001)
+- SM pointed out that the SSL code didn't compile any longer if SSL was
+ disabled... Also, we needed to correct the #include for the utime stuff on
+ windows.
+
+Daniel (6 September 2001)
+- T. Bharath pointed out a flaw in the SSL session cache code that made it
+ sometimes read from a NULL pointer.
+
+Version 7.9-pre3
+
+Daniel (3 September 2001)
+- Added the -R/--remote-time option, that uses the remote file's datestamp to
+ set the local file's datestamp. Thus, when you get a remote file your local
+ file will get the same time and date. Note that this only works when you use
+ -o or -O.
+
+- Installed libtool 1.4.1, libtoolized and everything.
+
+Daniel (1 September 2001)
+- Heikki Korpela pointed out that I did not ship the proper libtool stuff in
+ the pre-releases, even though that was my intention. libtoolize has now
+ been re-run.
+
+- Heikki also patched away the bad use of 'make -C' in the test suite
+ makefile. make -C is not very portable and is now banned from here.
+
+Version 7.9-pre2
+
+Daniel (31 August 2001)
+- I just made a huge internal struct rehaul, and all the big internally used
+ structs have been renamed, redesigned and stuff have been moved around a bit
+ to make the source easier to follow, more logically grouped and to hopefully
+ decrease future bugs. I also hope that this will make new functions to get
+ easier to add, and make it less likely that we have bugs left like the URL-
+ free bug from August 23.
+
+Version 7.9-pre1
+
+Daniel (29 August 2001)
+- The new cookie code have enabled the brand new '-c/--cookie-jar' option. Use
+ that to specify the file name in which you want to have all cookies curl
+ knows of, dumped to. It'll be written using the netscape cookie format.
+
+ This is internally done with the new CURLOPT_COOKIEJAR option to libcurl,
+ which in turn dumps this information when curl_easy_cleanup() is invoked.
+ There might be reasons to re-consider my choice of putting it there. Perhaps
+ it is better placed to get done just before *_perform() is done. It is all
+ of course depending on how you guys want to use this feature...
+
+- Added ftpupload.c in the source examples section, based on source code posted
+ by Erick Nuwendam.
+
+Daniel (28 August 2001)
+- Now running libtool CVS branch-1-4 to generate stuff. Should fix problems
+ on OpenBSD and hopefully on FreeBSD as well!
+
+- Georg Huettenegger modified the curl_formadd() functionality slightly, and
+ added support for error code 417 when doing form post and using the Expect:
+ header. Great work!
+
+- Made some tests with cached SSL session IDs, and they seem to work. There
+ should be a significant speed improvement in the SSL connection phase, but
+ in my tiny tests it just isn't possible to notice any difference. Like other
+ caching in libcurl, you must reuse the same handle for the caching to take
+ effect. SSL session ID caching is done on a per host-name and destination
+ port number basis.
+
+ Set verbose, and you'll get informational tests when libcurl detects and
+ uses a previous SSL session ID.
+
+- Upgraded to automake 1.5 on my development/release machine.
+
+Daniel (27 August 2001)
+- Slowly started writing SSL session ID caching code
+
+Daniel (24 August 2001)
+- T. Bharath removed compiler warnings on windows and updated the MS project
+ files.
+
+- Kevin Roth reported two kinds of command line constructs with the new -G that
+ curl didn't really deal with the way one would like.
+
+- Tim Costello patched away a use of strcasecmp() in the SSL code. We have our
+ own portable version named strequal() that should be used!
+
+- Tim also pointed out a problem in the lib/Makefile.vc6 file that made it mix
+ debug object modules causing confusions.
+
+Daniel (23 August 2001)
+- T. Bharath accurately found a libcurl bug that would happen when doing a
+ second invoke of curl_easy_perform() with a new URL when the previous invoke
+ followed a Location: header.
+
+- Started the improvement work on the cookie engine:
+ - Now keeps cookies in the same order as the cookie file
+ - A write to the possibly static string was removed
+ - Added a function that can output all cookies
+ - Now supports reading multiple cookie files
+
+- Steve Lhomme corrected a DLL naming issue in the MSVC++ project file.
+
+- Split up the monster function in lib/ftp.c to use more smallish functions to
+ increase readability and maintainability.
+
+Daniel (21 August 2001)
+- Georg Huettenegger's big patch was applied. Now we have:
+ o "Expect: 100-continue" support. We will from now on send that header in
+ all rfc1867-posts, as that makes us abort much faster when the server
+ rejects our POST. Posting without the Expect: header is still possible in
+ the standard replace-internal-header style.
+ o curl_formadd() is a new formpost building function that is introduced to
+ replace the now deprecated curl_formparse() function. The latter function
+ will still hang around for a while, but the curl_formadd() is the new way
+ and correct way to build form posts.
+ o Documentation has been updated to reflect these changes
+
+ These changes are reason enough to name the next curl release 7.9...
+
+- We now convert man pages to HTML pages and include them in the release
+ archive. For the pleasure of everyone without nroff within reach.
+
+- Andrés García's suggested flushing of the progress meter output stream was
+ added. It should make the progress meter look better on Windows.
+
+- Troy Engel pointed out a mistake in the configure script that made it fail
+ on many Red Hat boxes!
+
+Daniel (20 August 2001)
+- We need an updated libtool to make a better build environment for OpenBSD
+ as well as FreeBSD
+
+Version 7.8.1
+
+Daniel (20 August 2001)
+- Brad pointed out that we ship two extra libtool files in the tarballs that
+ we really don't need to! Removing them makes the gz-archive about 60K
+ smaller!
+
+- Albert Chin brought fixes for the configure script to detect socklen_t
+ properly as well as moving lots of our custom autoconf macros to
+ acinclude.m4.
+
+Daniel (19 August 2001)
+- Moonesamy improved his -G feature for host names only URLs...
+
+Daniel (17 August 2001)
+- Finally cleaned up the kerberos code to use Curl_ prefixes on all global
+ symbols and to not use global variables.
+
+Version 7.8.1-pre6
+
+Daniel (16 August 2001)
+- S. Moonesamy added the -G option to curl, that converts the data specified
+ with -d to a GET request. Default action when using -d is POST. When -G is
+ used, the -d specified data will be appended to the URL with a '?'
+ separator. As suggested previously by Kevin Roth.
+
+- curl-config --libs should now display all linker options required to link
+ with libcurl. It includes the path and options for libcurl itself.
+ curl-config --cflags displays the compiler option(s) needed to compile
+ source files that use libcurl functions. Basically, that sets the include
+ path correct.
+
+Daniel (15 August 2001)
+- Arkadiusz Miskiewicz pointed out a mistake in how IPv6-style IP-addresses
+ were parsed and used. (RFC2732-format)
+
+- Bug #12733 over on php.net identified a problem in libcurl that made it core
+ dump if you used CURLOPT_POST without setting any data to post with
+ CURLOPT_POSTFIELDS! This is no longer the case. Not using CURLOPT_POSTFIELDS
+ now equals setting it to no data at all.
+
+- Ramana Mokkapati reported that curl with '-w %{http_code}' didn't work
+ properly when used for multiple URLs on a single command line. Indeed, the
+ variable was not reset between the requests. This is now fixed.
+
+- David James fixed the Borland makefile so that libcurl still compiles and
+ builds with that compiler.
+
+Daniel (14 August 2001)
+- Oops. I ruined Nico's socklen_t define in config-vms.h, corrected it now.
+
+- An older item not mentioned here before: CURL_GLOBAL_WIN32 is a define for
+ windows users to curl_global_init(), that makes libcurl init the winsock
+ stuff. If libcurl is all socket stuff you do, then allowing it to fiddle
+ with this is a comfortable shortcut to fame.
+
+Version 7.8.1-pre5
+
+Daniel (14 August 2001)
+- Nico Baggus provided more feedback from his VMS porting efforts and a few
+ minor changes were necessary.
+
+- I modified configure.in so that --enable-debug sets more picky gcc options.
+ I then removed almost all the new warnings that appeared, and by doing so I
+ corrected the size_t-treated-as-signed problem that has been discussed on
+ the mailing list previously. I also removed a bunch of the just recently
+ added #ifdef VMS lines.
+
+- I removed the use of a global variable in the SSL code. It was once
+ necessary but hasn't been needed since OpenSSL 0.9.4. The old code should
+ (hopefully) still work if libcurl is built against an ancient version of
+ OpenSSL.
+
+Daniel (13 August 2001)
+- Peter Todd posted a patch that now allows non-file rc1867-style form posts
+ to be larger than 4K.
+
+Daniel (10 August 2001)
+- S. Moonesamy fixed bugs for building debug and SSL lib in VC makefile
+
+Daniel (9 August 2001)
+- The redirected error stream was closed before the curl_easy_cleanup() call
+ was made, and when VERBOSE was enabled, the cleanup function tried to use
+ the stream. It could lead to a segmentation fault. Also, the stream was
+ closed even if we looped to get more files. Corrects Dustin Boswell's bug
+ report #441610
+
+- Now generates the release configure script with autoconf 2.52
+
+Version 7.8.1-pre4
+
+Daniel (8 August 2001)
+- curl -E uses a colon to separate a file name from a passphrase. This turned
+ out really bad for the windows people who wants to include a drive letter in
+ the file name like "c:\cert.pem". There's now a win32 work-around
+ implemented that tries work around that, when the colon seems to be used for
+ this kind of construct.
+
+- Patrick Bihan-Faou introduced CURLOPT_SSL_VERIFYHOST, which makes curl
+ verify the server's CN field when talking https://. If --cacert is not used,
+ any failures in matching is only displayed as information (-v).
+
+Daniel (7 August 2001)
+- Wrote up nine more test cases, more or less converted from the former test
+ suite.
+
+Daniel (6 August 2001)
+- Heikki Korpela posted a patch that makes 'curl-config --libs' include the
+ directory in which libcurl itself is installed in. While this wasn't my
+ initial intention with this option, it makes sense and makes linking with
+ libcurl easier.
+
+- Stefan Ulrich pointed out to us that other tools and libraries treat file://
+ URLs with only one slash after the host name slighly different than libcurl
+ does. Since all the others seem to agree, we better follow them.
+
+- Nico Baggus provided us with a huge set of fixes to make curl compile and
+ build under OpenVMS.
+
+Version 7.8.1-pre3
+
+Daniel (6 August 2001)
+- Jonathan Hseu noticed that you couldn't get a header callback unless you
+ set CURLOPT_WRITEHEADER to non-NULL, even if you didn't care about that
+ data. This is now fixed.
+
+Daniel (5 August 2001)
+- Sergio Ballestrero provided a patch for reading responses from NCSA httpd
+ 1.5.x servers, as they return really screwed up response headers when asked
+ for with HTTP 1.1.
+
+- curl_escape() no longer treats already encoded characters in the input
+ string especially.
+
+Daniel (3 August 2001)
+- I replaced the former lib/arpa_telnet.h file with one I wrote myself, to
+ avoid the BSD annoucement clause of the license in the former file.
+
+- Andrew Francis provided a new version of base64.c to work around the license
+ boiler plate that came with the previous one. I patched it, but the glory
+ should go to Andrew for his heads up.
+
+- Tomasz Lacki noticed that when you do repeated transfers with libcurl you
+ couldn't always reliably change HTTP request. This has now been fixed and a
+ new libcurl option was added: CURLOPT_HTTPGET, that can force the HTTP
+ requestr (back) to GET.
+
+- Linus Nielsen Feltzing pointed out that httpsserver.pl wasn't included in
+ release archives. It should be now.
+
+Daniel (2 August 2001)
+- Frank Keeney pointed out a manual mistake for certificate convertions.
+
+- Tomasz Lacki pointed out a problem in the transfer loop that could make the
+ select() loop use far too much CPU.
+
+- Pawel A. Gajda pointed out an output mistake done when using libcurl's
+ progress callback.
+
+Daniel (29 June 2001)
+- Naveen Noel noticed that the Borland library makefile wasn't updated.
+
+- Nic Roets brought a fix for the certificate verification when using SSL.
+
+Daniel (27 June 2001)
+- Made the FTP tests run OK even on machines running curl IPv6-enabled.
+
+- Troy Engel corrected some RPM package details.
+
+Version 7.8.1-pre2
+
+Daniel (25 June 2001)
+- Björn Stenberg correctly identified a problem that occurred when downloading
+ several files with curl, and using resume. The first file's resume index was
+ then used for all files, resulting in weird results...
+
+- Anton Kalmykov provided a fix that makes curl work with form field names
+ with spaces like when -F is used.
+
+Version 7.8.1-pre1
+
+Daniel (20 June 2001)
+- Mike Bytnar provided a fine report that proved that the --with-ssl option
+ for configure needed tweaking. It no longer searches the default directories
+ for OpenSSL libs or directories when a specified path is given.
+
+Daniel (19 June 2001)
+- When an FTP transfer is cut off during transfer, curl could present a truly
+ garbaged error message and in worst case dump core. Thanks to detailed
+ reports from Shawn Poulson we nailed this.
+
+Daniel (12 June 2001)
+- Salvador Dávila provided a fix for FTP range downloads.
+
+- Added a few more test cases from the former test suite to the new file
+ format. We're now at a total of 26 tests.
+
+Daniel (11 June 2001)
+- libcurl's version-info was wrong, as noted by both Domenico Andreoli and
+ David Odin.
+
+Daniel (7 June 2001)
+- Jörn fixed the curl_unescape duplicate entry in lib/libcurl.def
+
+- I made SSL certificate failure messages to be more detailed.
+
+Version 7.8
+
+Daniel (7 June 2001)
+- SDavila provided a resumed download fix.
+
+Version 7.8-pre4
+
+Daniel (1 June 2001)
+- Sterling provided some new PHP examples.
+
+- Changed the CVS hierarchy and the older checkout instruction does no longer
+ work. We moved the entire source code into a CVS module named 'curl'.
+
+Daniel (31 May 2001)
+- CURLOPT_MUTE does not exist anymore. It is still present in the include file
+ to not cause compiler errors for applications using it, but it isn't used
+ anywhere in the library.
+
+Version 7.8-pre3
+
+Daniel (31 May 2001)
+- Once and for all fixed the _REENTRANT mess for Solaris compiles to present
+ less warnings.
+
+- Sterling Hughes tirelessly points out and corrects my mistakes...! So,
+ curl_global_init() now lets the argument flags *SET* what parts to
+ init. CURL_GLOBAL_DEFAULT makes a nice default, CURL_GLOBAL_ALL inits all
+ known subsystems and CURL_GLOBAL_NONE inits nothing more than absolutely
+ necessary. Man page updated accordingly.
+
+- Fixed the strtok.h include file as it wouldn't compile on all platforms!
+
+Daniel (30 May 2001)
+- Made libcurl by default act as if CURLOPT_MUTE and CURLOPT_NOPROGRESS were
+ set TRUE. Set them to FALSE to make libcurl more talkative. The *_MUTE
+ option is subject for complete removal...
+
+Version 7.8-pre2
+
+Daniel (30 May 2001)
+- Cris Bailiff wrote a makefile for building Solaris packages.
+
+- Sterling Hughes brought fixes for 'buildconf' (the build-from-CVS tool) and
+ we discussed and added a few CURL_GLOBAL_* flags in include/curl.h
+
+- Kjetil Jacobsen privately announced his python interface to libcurl,
+ available at http://pycurl.sourceforge.net/
+
+Daniel (29 May 2001)
+- Sterling Hughes fixed a strtok() problem in libcurl. It is not a thread-
+ safe function. Now configure checks for a thread-safe version, and
+ lib/strtok.c offers one for the systems that don't come with one included!
+
+- Mettgut Jamalla correctly pointed out that the -# progress bar was written
+ to stderr even though --stderr redirection was used. This is now corrected.
+
+- I moved out the list of contributors from the curl.1 man page and made a
+ separate docs/THANKS file. It makes the list easier to find, and made it
+ easier for me to make a separate web page with that same information.
+
+ I really do want all you guys mentioned in there to feel you get the credit
+ you deserve.
+
+- lib/easy.c didn't compile properly in the 7.8-pre1 due to a silly mistake
+
+Version 7.8-pre1
+
+Daniel (28 May 2001)
+- curl-config now supports '--vernum' that outputs a plain hexadecimal version
+ of the libcurl version number (using 8 bits for each 3 numbers). Version
+ 7.7.4 appears as 070704
+
+- Wrote man pages for curl_global_init and curl_global_cleanup...
+
+- T. Bharath brought news about the usage of the OpenSSL interface that was
+ not previously taken into consideration and thus caused libcurl to leak
+ memory. The only somewhat sane approach to fix this dilemma, is adding two
+ two new functions curl_global_init() and curl_global_cleanup() that should
+ be called *ONCE* by the application using libcurl. The init should be done
+ only at startup, no matter how many threads the application is gonna use,
+ and the cleanup should be called when the application has finished using
+ libcurl completely.
+
+ *** UPGRADE NOTICE ***
+
+ If you write applications using libcurl, you really want to use the two
+ functions mentioned above !!!
+
+ I can't say I think this is a very beautiful solution, but as OpenSSL
+ insists on making lots of stuff on a "global" scope, we're forced to walk
+ the path they point us to.
+
+- Moving more test cases into the new file format.
+
+Version 7.7.4-pre3
+
+Daniel (23 May 2001)
+- Introduced a new file format for storing test cases, and thus I had to
+ modify all the perl test scripts and more (I added a new one). I have not
+ "ported" all the old test cases to the new format yet, but it'll come.
+
+ The main advantage of this new format is that all test data for each test
+ case is stored in a single file. It gives a better overview for each test
+ case and a lot less files.
+
+- Andrés García brought a fix for the netscape/mozilla cookie file parsing
+ function, as it turns out it doesn't always store the path!
+
+Daniel (22 May 2001)
+- As was reported anonymously, when FAILONERROR was used, the httpcode was
+ not stored properly and thus wasn't possibly to read after a transfer with
+ the curl_easy_getinfo() function. This is now corrected.
+
+- Installed and made use of the following tool versions:
+ autoconf 2.50
+ libtool 1.4
+ automake 1.4-p1
+
+ I wouldn't recommend any developer to try to generate things with older
+ versions than these. Building from CVS will probably more or less require
+ at least these versions.
+
+ As a result of this, the configure script grew to more than double its
+ previous size!
+
+ Arkadiusz Miskiewicz helped me by pointing out I had to remove my
+ acinclude.m4 file before I could get it working!
+
+Daniel (21 May 2001)
+- I made ftps:// work. Added test case 400 to the release archive, as the
+ first ftps:// test case. Requires stunnel.
+
+- Also made the test cases that runs ssl tests not run if libcurl isn't built
+ with ssl support.
+
+Daniel (19 May 2001)
+- Made the configure not add any extra -L LDFLAGS or -I CPPFLAGS unless they
+ are actually needed. Albert Chin's and Domenico Andreoli's suggestions
+ helped out.
+
+Version 7.7.4-pre2
+
+Daniel (18 May 2001)
+- Nicer configure-check for the OpenSSL headers, which then sets the proper
+ variable to have curl-config be good. (Albert Chin provided the fix)
+
+- For systems that don't have theiw own 'strlcat()' libcurl provides its own.
+ It was now renamed to prevent collides with other libs. (After discussions
+ with Sterling Hughes and the implications this had on PHP builds.)
+
+Daniel (17 May 2001)
+- Colm Buckley posted a detailed bug report on (the debianized) 7.7.3, that
+ turned out to be a problem with the debian-built 7.7.3-package that
+ contained files from the 7.7.2 release!
+
+- I added the CURLE_ALREADY_COMPLETE again, but with a fake value, just to
+ make programs that use it, not fail when compiling against this version of
+ libcurl.
+
+Daniel (14 May 2001)
+- Pawel A. Gajda fixed a problem with resumed transfers on re-used persistent
+ connections.
+
+Version 7.7.4-pre1
+
+Daniel (14 May 2001)
+- Jun-ichiro itojun Hagino fixed FTP PORT for IPv6-enabled libcurl.
+
+- Added the first HTTPS test to the test suite in the release archive.
+
+Daniel (12 May 2001)
+- Jukka Pihl suggested that if (lib)curl is told to verify the peer's
+ certificate and the peer can't be verified, it should fail and return a
+ proper error code. I added a brand new error code named
+ CURLE_SSL_PEER_CERTIFICATE for this purpose.
+
+Daniel (11 May 2001)
+- As was discussed with Frederic Lepied a while ago, I now made libcurl not
+ return error even though no data was transfered on upload/download resume
+ when the no transfer is needed. The CURLE_ALREADY_COMPLETE error was removed
+ from the header file to make any implemenator that uses that to be aware of
+ the fact that it can't be returned anymore!
+
+- Improved general header-parsing to better allow white spaces and more.
+
+- Rodney Simmons proved the fix I did yesterday was bad and I had to post
+ another one.
+
+- Ingo Wilken patched away two redirect problems more!
+
+Daniel (10 May 2001)
+- Cris Bailiff correctly noted that the space-after-header problem with
+ Location: is present on several other places in the libcurl sources.
+
+- Ingo Wilken patched away a problem libcurl had when following Location:
+ headers with an extra space after the colon.
+
+- Rodney Simmons found out that multiple FTP transfers did not treat relative
+ directories correctly.
+
+Daniel (9 May 2001)
+- Getting an FTP file with CURLOPT_NOBODY set (or -I from the command line),
+ makes curl use the non-standard ftp command "SIZE". If it failed, libcurl
+ returned error. Starting now, it just don't output the file size instead.
+ Anonymous bug report.
+
+- stunnel.pm was accidentally left out from the release archive, it is now
+ added (stunnel is needed to run the https-tests in the test suite)
+
+Daniel (7 May 2001)
+- Corrected two minor compiler warnings due to the FILE * to void * conversion
+ that I missed at two places. Jörn Hartroth brought me patches. Sander Gates
+ filed a bug report on this.
+
+Version 7.7.3
+
+Daniel (4 May 2001)
+- All callback functions now take 'void *' instead of 'FILE *'. This is made
+ this way to make it more obvious to people that anything can be passed to
+ them (by using the apropriate option). After discussions with Sterling
+ Hughes.
+
+Daniel (3 May 2001)
+- Cris Bailiff fixed a chunked transfer encoding problem with persistent
+ connection that made libcurl fail if the persistent connection used mixed
+ chunked and non-chunked transfers.
+
+- Cris Bailiff fixed a bad treatment of 304-replies, as they would not be
+ treated as content-length 0 replies but would cause a "hang" until the
+ server timed-out and closed the connection.
+
+- Brad Burdick found a minor problem in the docs/examples/Makefile.am
+
+Daniel (27 April 2001)
+- Updated the INTERALS document again. It was lagging a bit. I think I made it
+ more easy to follow now as well.
+
+- Brad Burdick found a problem with persistent connections when curl received
+ a "Content-Length: 0" header.
+
+- Giuseppe D'Ambrosio was first out to report that TELNET doesn't work in curl
+ compiled/built on win32. It seems to work for unixes though!
+
+- Dave Hamilton reported weird problems with CURL/PHP that I really can't
+ explain at the moment. I'm hoping on some help from the PHP crew.
+
+Daniel (26 April 2001)
+- I rewrote the FTP command response function. I had to do it to make ftps
+ work, as the OpenSSL read()-function didn't work the same way the normal
+ unix read() does, but it was also a huge performance boost. Previously the
+ function read one byte at a time, now it reads very large chunks, and it
+ makes a notable speed difference.
+
+Daniel (25 April 2001)
+- Connection re-use when not using a proxy didn't work properly for
+ non-default port numbers.
+
+Daniel (24 April 2001)
+- I've noticed that FTPS doesn't work. We attempt to use ssl even for the
+ data transfer, which causes the transfer to 'hang'... We need to fix this.
+
+- Improved the test suite to use 'stunnel' to do HTTPS and FTPS testing on
+ the alredy written perl servers easily.
+
+Daniel (23 April 2001)
+- The OpenSSL version string recently modified didn't zero terminate one
+ of the generated strings properly, which could lead to a crash or simply
+ weird version string output!
+
+Version 7.7.2
+
+Daniel (22 April 2001)
+- Rosimildo da Silva updated the Makefiles for Borland/Windows.
+
+- Eric Rautman pointed out a problem with persistent connections that would
+ lead to broken Host: headers in the second HTTP request.
+
+Daniel (20 April 2001)
+- Added man pages for the curl_strequal() and curl_mprintf() families. Wrote
+ a 'libcurl overview' man page.
+
+- Spell-fixed some documents.
+
+- S. Moonesamy corrected mistakes in the man page.
+
+- Cris Bailiff fixed the curl_slists options in the perl interface, present
+ separately in the Curl::easy 1.1.4 package.
+
+Daniel (19 April 2001)
+- Linus Nielsen Feltzing removed the decimals from the size variables in the
+ --write-out output. We hardly ever get fraction of bytes! :-)
+
+Version 7.7.2-pre1
+
+Daniel (19 April 2001)
+
+- Albert Chin provided a configure patch for the AC_SYS_LARGEFILE macro.
+
+Daniel (18 April 2001)
+- Input from Michael Mealling made me add --feature to curl-config. It
+ displays a list of features that have been built-in in the current
+ libcurl. The currently available features that can be listed are: SSL, KRB4
+ and IPv6.
+
+- I committed Cris and Georg's perl interface work. They've got callbacks
+ working and options that receives those slist pointers.
+
+- Puneet Pawaia detected a problem with resumed downloads that use persistent
+ connections and I made a rather large writeup to correct this. It is
+ important that all session-data is stored in the connectdata struct and not
+ in the main struct as this previously did.
+
+Daniel (17 April 2001)
+- Frederic Lepied fixed a ftp resumed download problem and introduced a new
+ error code that lets applications be able to detect when a resumed download
+ actually didn't download anything since the whole file is already present.
+ Should this return OK instead?
+
+- I added 'curl-config.in' to the root dir and configure script. Now, a
+ curl-config script is made when curl is built. The script can be used to
+ figure out compile time options used when libcurl was built, which in turn
+ should be options YOU should use to build applications that use libcurl.
+
+ This *-config style is not a new idea, but something that has been used
+ successfully in other (library based) projects.
+
+- Phil Karn pointed out that libcurl wrongly did not always use GMT time zone
+ for the If-Modified-Since style headers.
+
+- Georg Schwarz pointed out an extra needed #include file needed in src/main.c
+ for curl to build on Ultrix.
+
+Daniel (11 April 2001)
+- Cris Bailiff pointed out two problems that I corrected. First, libcurl's use
+ of the environment variable HTTP_PROXY in uppercase may become a security
+ hazard when people use libcurl in a server/cgi situation where the server
+ sets the HTTP_*-variables according to incoming headers in the HTTP
+ request. Thus, a "Proxy:"-header would set that environment variable!
+
+ Then, invoking curl_easy_perform() without having an URL set caused a crash.
+
+- S. Moonesamy brought a patch that make curl use non-blocking connects on
+ windows when connection timeout is set, as it allows windows users to set
+ that timeout!
+
+- Hirotaka Matsuyuki wrote a Ruby interface to libcurl!
+
+- Cris Bailiff, Forrest Cahoon and Georg Horn work on the Perl interface.
+
+- I've written a first shot at a Java interface to libcurl. Many thanks to
+ Daniel Marell for tirelessly answering to all my basic Java questions. It
+ works, but it is still very basic.
+
+Daniel (10 April 2001)
+- The progress display could get silly when doing multiple file transfers, as
+ it wasn't properly reset between transfers!
+
+- Discussions with Cris Bailiff who writes a Perl interface to libcurl, made
+ me add CURLOPT_HEADERFUNCTION. It can be used to set a separate callback
+ function for writing headers. Previously you could only set a different FILE
+ * when headers are written from within libcurl.
+
+Daniel (7 April 2001)
+- Andrés García fixed a problem in curl_escape() and pointed out a flaw in
+ the curl_easy_setopt man page.
+
+Daniel (6 April 2001)
+- Adjusted the version code to properly display OpenSSL 0.9.6a. They sure
+ change their version define format often...
+
+- curl_formfree() now accepts a NULL pointer without crashing!
+
+Version 7.7.1
+
+Daniel (3 April 2001)
+- Puneet Pawaia pointed out two serious problems. Libcurl would attempt to
+ read bad memory during situations when an (ftp) connection attempt failed.
+ Also, the lib/Makefile.vc6 was corrected.
+
+- More investigations in the Location: following code made me realize that
+ it was not clean enough to work transparantly with persistent and non-
+ persistent connections. I think I've fixed it now.
+
+Daniel (29 March 2001)
+- Georg Horn mailed me some corrections for the Curl::easy perl interface.
+
+- Experimental ftps:// support added. It is basically FTP over SSL for the
+ control connection. It still makes all data transfers going over unencrypted
+ connections. Rainer Weikusat's ftpd-ssl server hack supports this and I used
+ that to verify the functionality.
+
+Daniel (27 March 2001)
+- Guenole Bescon discovered that if you set a CURLOPT_TIMEOUT and then tried
+ to get a file from a site and it fails, the SIGALRM would still be sent
+ after the timeout-time, quite inexpectedly!
+
+- I added an ftp transfer example to docs/examples/ and I also wrote a tiny
+ example makefile that can be used as a start when building one of the
+ examples.
+
+Version 7.7.1-beta1
+
+Daniel (26 March 2001)
+- Mohamed Lrhazi reported problems with 7.6.1 and persistent HTTP/1.0
+ connections (when the server replied a Connection: Keep-Alive) and this
+ problem was not properly dealt with in 7.7 either. A patch was posted to the
+ curl-and-php mailing list.
+
+Daniel (24 March 2001)
+- Colin Watson reported about a problem and brought a patch that corrected it,
+ which was about the man page and lines starting with a single quote (') in a
+ way that gnroff doesn't like.
+
+Daniel (23 March 2001)
+- Peter Bray reported correctly that the root makefile used make instead of
+ $(MAKE) for the test target.
+
+- Corrected the Curl::easy perl interface to use curl_easy_setopt() and not
+ curl_setopt() which was removed in 7.7!
+
+- S. Moonesamy provided updates on three documents (MANUAL, INSTALL and FAQ).
+
+- When following a Location:, libcurl would sometimes write to the URL string
+ in a way it shouldn't. As the pointer is passed-in to libcurl from an
+ application, we can't be allowed to write to it. The particular bug report
+ from 'nk' that brought this up was because he had a read-only URL that then
+ caused a libcurl crash!
+
+- No longer reads HEAD responses longer than to the last header. Previously,
+ curl would read the full reply if the connection was a "close" one.
+
+- libcurl did re-use connections way too much. Doing "curl
+ http://www.{microsoft,ibm}.com" would make it re-use the connection which
+ made the second request return very odd results.
+
+Daniel (22 March 2001)
+- Edin Kadribasic made me aware that curl should not re-send POST requests
+ when following 302-redirects. I made 302 work like 303 which means curl uses
+ GET in the following request(s).
+
+- libcurl now reset the "followed-location" counter on each invoke of
+ curl_easy_perform() as it otherwise would sum up all redirects on the same
+ connection and thus could reach the maxredirs counter wrongly.
+
+- Jim Drash suggested curl_escape() should not re-encode what already looks
+ like an encoded sequence and I think that's a fair suggestion.
+
+Version 7.7
+
+Daniel (22 March 2001)
+- The configure script now fails with an error message if gethostbyname_r() is
+ detected but it couldn't figure out how to invoke it (what amount of
+ arguments it is supposed to get). Reports from Andrés García made me aware
+ of this need.
+
+- Talking with Jim Drash made me finally put the curl_escape and curl_unescape
+ functions in the curl.h include file and write man pages for them. The
+ escape function was modified to use the same interface as the unescape one
+ had.
+
+- No bug reports at all on the latest betas. Release time coming up.
+
+Version 7.7-beta5
+
+Daniel (19 March 2001)
+- Georg Ottinger reported problems with using -C together with -L in the sense
+ that the -C info got lost when it was redirected. I could not repeat this
+ problem on the 7.7 branch why I leave this for the moment. Test case 39 was
+ added to do exactly this, and it seems to do right.
+
+- Christian Robottom Reis reported how his 7.7 beta didn't successfully do
+ form posts as elegantly as 7.6.1 did. Indeed, this was a flaw in the header
+ engine, as HTTP 1.1 has introduced a new 100 "transient" return code for PUT
+ and POST operations that I need to add support for. Section 8.2.3 in RFC2616
+ has all the details. Seems to work now!
+
+Daniel (16 March 2001)
+- After having experienced another machine break-down, we're back.
+
+- Georg Horn's perl interface Curl::easy is now included in the curl release
+ archive. The perl/ directory is now present. Please help me with docs,
+ examples and updates you think fit.
+
+- Made a new php/ directory in the release archive and moved the PHP examples
+ into a subdirectory in there. Not much PHP info yet, but I plan to. Please
+ help me here as well!
+
+- Made libcurl return error if a transfer is aborted in the middle of a
+ "chunk". It actually enables libcurl to discover premature transfer aborts
+ even if the Content-Length: size is unknown.
+
+Daniel (15 March 2001)
+- Added --connect-timeout to curl, which sets the new CURLOPT_CONNECTTIMEOUT
+ option in libcurl. It limits the time curl is allowed to spend in the
+ connection phase. This differs from -m/--max-time that limits the entire
+ file transfer operation. Requested by Larry Fahnoe and others.
+
+ I also updated the curl.1 and curl_easy_setopt.3 man pages and removed the
+ item from the TODO.
+
+Version 7.7-beta4
+
+Daniel (14 March 2001)
+- Made curl grok IPv6 with HTTP proxies and got everything to compile nicely
+ again when ENABLE_IPV6 is set.
+
+ I need to remake things in the test suite. I can't test the FTP parts with
+ curl built for IPv6 as it uses a different set of FTP commands then!
+
+- I fell onto a bug report on php.net (posted by Lars Torben Wilson) that was
+ a report meant for our project. Anyway, it said the .netrc parsing didn't
+ work as supposed, and as I agreed with Lars, I made the netrc parser use
+ getpwuid() to figure out the home directory of the effective user and try
+ that netrc. It still uses the environment variable HOME for those that don't
+ have that function or if the user doesn't return valid pwd info.
+
+- Edin Kadribaic posted a bug report where he got a crash when a fetch with
+ user+password in the URL followed a Location: to a second URL (absolute,
+ without name+password). This bug has been around for a long while and
+ crashes due to a read at address zero. Fixed now. Wrote test case 38, that
+ tests this.
+
+- Modified the test suite's httpserver slightly to append all client request
+ data to its log file so that the test script now better can verify a range
+ of requests and not only the last one, as it did previously.
+
+- Updated the curl man page with --random-file and --egd-file details.
+
+Version 7.7-beta3
+
+Daniel (14 March 2001)
+- Björn Stenberg provided similar fixes as Jörn did and some additional patches
+ for non-SSL compiles.
+
+- I increased the interface number for libcurl as I've removed the low level
+ functions from the interface. I also took this opportunity to rename the
+ Curl_strequal function to curl_strequal and Curl_strnequal to
+ curl_strnequal, as they're public libcurl functions (even if they're still
+ undocumented).
+
+ This will make older programs not capable of using the new libcurl with
+ just a drop-in replacement.
+
+- Jörn Hartroth updated stuff for win32 compiles:
+ o config-win32.h was fixed for socklen_t
+ o lib/ssluse.c had a bad #endif placement
+ o lib/file.c was made to compile on win32 again
+ o lib/Makefile.m32 was updated with the new files
+ o lib/libcurl.def matches the current interface state
+
+Daniel (13 March 2001)
+- It only took an hour or so before Jörn Hartroth found a problem in the
+ chunked transfer-encoding. Given his fine example-site, I could easily spot
+ the problem and when I re-read the spec (the part I have pasted in the top
+ of the http_chunks.h file), I realized I had made my state-machine slightly
+ wrong and didn't expect/handle the trailing CRLF that comes after the data
+ in each chunk (and those extra two bytes sure feel wasted).
+
+ Had to modify test case 34 to match this as well.
+
+Version 7.7-beta2
+
+Daniel (13 March 2001)
+- Added the policy stuff to the curl_easy_setopt man page for the two supported
+ policies.
+
+- Implemented some support for the CURLOPT_CLOSEPOLICY option. The policies
+ CURLCLOSEPOLICY_LEAST_RECENTLY_USED and CURLCLOSEPOLICY_OLDEST are now
+ supported, and the "least recently used" is used as default if no policy
+ is chosen.
+
+Daniel (12 March 2001)
+- Added CURLOPT_RANDOM_FILE and CURLOPT_EGDSOCKET to libcurl for seeding the
+ SSL random engine. The random seeding support was also brought to the curl
+ client with the new options --random-file <file> and --egd-file <file>. I
+ need some people to really test this to know they work as supposed. Remember
+ that libcurl now informs (if verbose is on) if the random seed is considered
+ weak (HTTPS connections).
+
+- Made the chunked transfer-encoding engine detected bad formatted data length
+ and return error if so (we can't possibly extract sensible data if this is
+ the case). Added a test case that detects this. Number 36. Now there are 60
+ test cases.
+
+- Added 5 new libcurl options to curl/curl.h that can be used to control the
+ persistent connection support in libcurl. They're also documented (fairly
+ thoroughly) in the curl_easy_setopt.3 man page. Three of them are now
+ implemented, although not really tested at this point... Anyway, the new
+ implemented options are named CURLOPT_MAXCONNECTS, CURLOPT_FRESH_CONNECT,
+ CURLOPT_FORBID_REUSE. The ones still left to write code for are:
+ CURLOPT_CLOSEPOLICY and its related option CURLOPT_CLOSEFUNCTION.
+
+- Made curl (the actual command line tool) use the new libcurl 7.7 persistent
+ connection support by re-using the same curl handle for every specified file
+ transfer and after some more test case tweaking we have 100% test case OK.
+ I made some test cases return HTTP/1.0 now to make sure that works as well.
+
+- Had to add 'Connection: close' to the headers of a bunch of test cases so
+ that curl behaves "old-style" since the test http server doesn't do multiple
+ connections... Now I get 100% test case OK.
+
+- The curl.haxx.se site, the main curl mailing list and my personal email are
+ all dead today due to power blackout in the area where the main servers are
+ located. Horrible.
+
+- I've made persistance work over a squid HTTP proxy. I find it disturbing
+ that it uses headers that aren't present in any HTTP standard though
+ (Proxy-Connection:) and that makes me feel that I'm now on the edge of what
+ the standard actually defines. I need to get this code excercised on a lot
+ of different HTTP proxies before I feel safe.
+
+ Now I'm facing the problem with my test suite servers (both FTP and HTTP)
+ not supporting persistent connections and libcurl is doing them now. I have
+ to fix the test servers to get all the test cases do OK.
+
+Daniel (8 March 2001)
+- Guenole Bescon reported that libcurl did output errors to stderr even if
+ MUTE and NOPROGRESS was set. It turned out to be a bug and happens if
+ there's an error and no ERRORBUFFER is set. This is now corrected.
+
+Version 7.7-beta1
+
+Daniel (8 March 2001)
+- "Transfer-Encoding: chunked" is no longer any trouble for libcurl. I've
+ added two source files and I've run some test downloads that look fine.
+
+- HTTP HEAD works too, even on 1.1 servers.
+
+Daniel (5 March 2001)
+- The current 57 test cases now pass OK. It would suggest that libcurl works
+ using the old-style with one connection per handle. The test suite doesn't
+ handle multiple connections yet so there are no test cases for this.
+
+- I patched the telnet.c heavily to not use any global variables anymore. It
+ should make it a lot nicer library-wise.
+
+- The file:// support was modified slightly to use the internal connect-first-
+ then-do approach.
+
+Daniel (4 March 2001)
+- More bugs erased.
+
+Version 7.7-alpha2
+
+Daniel (4 March 2001)
+- Now, there's even a basic check that a re-used connection is still alive
+ before it is assumed so. A few first tests have proven that libcurl will
+ then re-connect instead of re-use the dead connection!
+
+Daniel (2 March 2001)
+- Now they work intermixed as well. Major coolness!
+
+- More fiddling around, my 'tiny' client I have for testing purposes now has
+ proved to download both FTP and HTTP with persistent connections. They do
+ not work intermixed yet though.
+
+Daniel (1 March 2001)
+- Wilfredo Sanchez pointed out a minor spelling mistake in a man page and that
+ curl_slist_append() should take a const char * as second argument. It does
+ now.
+
+Daniel (22 February 2001)
+- The persistent connections start to look good for HTTP. On a subsequent
+ request, it seems that libcurl now can pick an already existing connection
+ if a suitable one exists, or it opens a new one.
+
+- Douglas R. Horner mailed me corrections to the curl_formparse() man page
+ that I applied.
+
+Daniel (20 February 2001)
+- Added the docs/examples/win32sockets.c file for our windows friends.
+
+- Linus Nielsen Feltzing provided brand new TELNET functionality and
+ improvements:
+
+ * Negotiation is now passive. Curl does not negotiate until the peer does.
+ * Possibility to set negotiation options on the command line, currently only
+ XDISPLOC, TTYPE and NEW_ENVIRON (called NEW_ENV).
+ * Now sends the USER environment variable if the -u switch is used.
+ * Use -t to set telnet options (Linus even updated the man page, awesome!)
+
+- Haven't done this big changes to curl for a while. Moved around a lot of
+ struct fields and stuff to make multiple connections get connection specific
+ data in separate structs so that they can co-exist in a nice way. See the
+ mailing lists for discussions around how this is gonna be implemented. Docs
+ and more will follow.
+
+ Studied the HTTP RFC to find out better how persistent connections should
+ work. Seems cool enough.
+
+Daniel (19 February 2001)
+- Bob Schader brought me two files that help set up a MS VC++ libcurl project
+ easier. He also provided me with an up-to-date libcurl.def file.
+
+- I moved a bunch of prototypes from the public <curl/curl.h> file to the
+ library private urldata.h. This is because of the upcoming changes. The
+ low level interface is no longer being planned to become reality.
+
+Daniel (15 February 2001)
+- CURLOPT_POST is not required anymore. Just setting the POST string with
+ CURLOPT_POSTFIELDS will switch on the HTTP POST. Most other things in
+ libcurl already works this way, i.e they require only the parameter to
+ switch on a feature so I think this works well with the rest. Setting a NULL
+ string switches off the POST again.
+
+- Excellent suggestions from Rich Gray, Rick Jones, Johan Nilsson and Bjorn
+ Reese helped me define a way how to incorporate persistent connections into
+ libcurl in a very smooth way. If done right, no change may have to be made
+ to older programs and they will just start using persistent connections when
+ applicable!
+
+Daniel (13 February 2001)
+- Changed the word 'timeouted' to 'timed out' in two different error messages.
+ Suggested by Larry Fahnoe.
+
+Version 7.6.1
+
+Daniel (9 February 2001)
+- Frank Reid and Cain Hopwood provided information and research around a HTTPS
+ PUT/upload problem we seem to have. No solution found yet.
+
+Daniel (8 February 2001)
+- An interesting discussion is how to specify an empty password without having
+ curl ask for it interactively? The current implmentation takes an empty
+ password as a request for a password prompt. However, I still want to
+ support a blank user field. Thus, today if you enter "-u :" (without user
+ and password) curl will prompt for the password. Tricky. How would you
+ specify you want the prompt otherwise?
+
+- Made the netrc parse result possible to use for other protocols than FTP and
+ HTTP (such as the upcoming TELNET fixes).
+
+- The previously mentioned "MSVC++ problems" turned out to be a non-issue.
+
+- Added a HTTP file upload code example in the docs/examples/ section on
+ request.
+
+- Adjusted the FTP response fix slightly.
+
+Version 7.6.1-pre3
+
+Daniel (7 February 2001)
+- S. Moonesamy found a flaw in the response reading function for FTP that
+ could make libcurl not get out of the loop properly when it should, if
+ libcurl got -1 returned when reading the socket.
+
+- I found a similar mistake in http.c when using a proxy and reading the
+ results from the proxy connection.
+
+Daniel (6 February 2001)
+- S. Moonesamy pointed out that the VC makefile in src/ needed the libpath set
+ for the debug build to work.
+
+- Daniel Gehriger stepped in to assist with the VC++ stuff Robert Weaver
+ brought up yesterday.
+
+Daniel (5 February 2001)
+- Jun-ichiro itojun Hagino brought a big patch that brings IPv6-awareness to
+ a bunch of different areas within libcurl.
+
+- Robert Weaver told me about the problems the MS VC++ 6.0 compiler has with
+ the 'static' keyword on a number of libcurl functions. I might need to add a
+ patch that redefines static when libcurl is compiled with that compiler.
+ How do I know when VC++ compiles, anyone?
+
+Daniel (4 February 2001)
+- curl_getinfo() was extended with two new options:
+ CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD. They
+ return the full assumed content length of the transfer in the given
+ direction. The CURLINFO_CONTENT_LENGTH_DOWNLOAD will be the Content-Length:
+ size of a HTTP download. Added descriptions to the man page as well. This
+ was done after discussions with Bob Schader.
+
+Daniel (3 February 2001)
+- Ingo Ralf Blum provided another fix that makes curl build under the more
+ recent cygwin installations. It seems they've changed the preset defines to
+ not include WIN32 anymore.
+
+Version 7.6.1-pre2
+
+Daniel (31 January 2001)
+- Curl_read() and curl_read() now return a ssize_t for the size, as it had to
+ be able to return -1. The telnet support crashed due to this and there was a
+ possibility to weird behavior all over. Linus Nielsen Feltzing helped me
+ find this.
+
+- Added a configure.in check for a working getaddrinfo() if IPv6 is requested.
+ I also made the configure script feature --enable-debug which sets a couple
+ of compiler options when used. It assumes gcc.
+
+Daniel (30 January 2001)
+- I finally took a stab at the long-term FIXME item I've had on myself, and
+ now libcurl will properly work when doing a HTTP range-request that follows
+ a Location:. Previously that would make libcurl fail saying that the server
+ doesn't seem to support range requests.
+
+Daniel (29 January 2001)
+- I added a test case for the HTTP PUT resume thing (test case 33).
+
+Version 7.6.1-pre1
+
+Daniel (29 January 2001)
+- Yet another Content-Range change. Ok now? Bob Schader checks from his end
+ and it works for him.
+
+Daniel (27 January 2001)
+- So the HTTP PUT resume fix wasn't good. There should appearantly be a
+ Content-Range header when resuming a PUT.
+
+- I noticed I broke the download-check that verifies that a resumed HTTP
+ download is actually resumed. It got broke because my new 'httpreq' field
+ in the main curl struct. I should get slapped. I added a test case for
+ this now, so I won't be able to ruin this again without noticing.
+
+- Added a test case for content-length verifying when downloading HTTP.
+
+- Made the progress meter title say if the transfer is being transfered. It
+ makes the output slightly better for resumes.
+
+- When dealing with Location: and HTTP return codes, libcurl will not attempt
+ to follow the spirit of RFC2616 better. It means that when POSTing to a
+ URL that is being following to a second place, the standard will judge on
+ what to do. All HTTP codes except 303 and 305 will cause curl to make a
+ second POST operation. 303 will make a GET and 305 is not yet supported.
+
+ I also wrote two test cases for this POST/GET/Location stuff.
+
+Version 7.6
+
+Daniel (26 January 2001)
+- Lots of mails back and forth with Bob Schader finally made me add a small
+ piece of code in the HTTP engine so that HTTP upload resume works. You can
+ now do an operation like 'curl -T file -C <offset> <URL>' and curl will PUT
+ the ending part of the file starting at given offet to the specified URL.
+
+Version 7.6-pre4
+
+Daniel (25 January 2001)
+- I took hold of Rick Jones' question why we don't use recv() and send() for
+ reading/writing to the sockets and I've now modified the sread() and
+ swrite() macros to use them instead. If nothing else, they could be tested
+ in the next beta-round coming right up.
+
+- Jeff Morrow found a problem with libcurl's usage of SSL_read() and supplied
+ his research results in how to fix this. It turns out we have to invoke the
+ function several times in some cases. The same goes for the SSL_write().
+
+ I made some rather drastic changes all over libcurl to make all writes and
+ reads get done on one single place so that this repeated-attempts thing
+ would only have to be implemented at one point.
+
+- Rick Jones spotted that the 'total time' counter really didn't measure the
+ total time very accurate on subsecond levels.
+
+- Johan Nilsson pointed out the need to more clearly specify that the timeout
+ value you set for a download is for the *entire* download. There's currently
+ no option available that sets a timeout for the connection phase only.
+
+Daniel (24 January 2001)
+- Ingo Ralf Blum submitted a series of patches required to get curl to compile
+ properly with cygwin.
+
+- Robert Weaver posted a fix for the win32 section of the curl_getenv() code
+ that corrected a potential memory leak.
+
+- Added comments in a few files in a sudden attempt to make the sources more
+ easy to read and understand!
+
+Daniel (23 January 2001)
+- Added simple IPv6 detection in the configure script and made the version
+ string add 'ipv6' to the enable section in that case. ENABLE_IPV6 will be
+ set if curl is compiled with IPv6 support enabled.
+
+- Added a parser for IPv6-style specified IP-addresses in a URL. Thus, when
+ IPv6 gets enabled soon, we can use URLs like '[0::1]:80'...
+
+- Made the URL globbing in the client possible to fail silently if there's an
+ error in the globbing. It makes it almost intuitive, so when you don't
+ follow the syntax rules, globbing is simply switched off and the raw string
+ is used instead.
+
+ I still think we'll get problems with IPv6-style IP-addresses when we *want*
+ globbing on parts of the URL as the initial part of the URL will for sure
+ seriously confuse the globber.
+
+Daniel (22 January 2001)
+- Björn Stenberg supplied a progress meter patch that makes it look better even
+ during slow starts. Previously it made some silly assumptions...
+
+- Added two FTP tests for -Q and -Q - stuff since it was being discussed on
+ the mailing list. Had to correct the ftpserver.pl too as it bugged slightly.
+
+Daniel (19 January 2001)
+- Made the Location: parsers deal with any-length URLs. Thus I removed the last
+ code that restricts the length of URLs that curl supports.
+
+- Added a --globoff test case (#28) and it quickly identified a memory problem
+ in src/main.c that I took care of.
+
+Version 7.6-pre3
+
+Daniel (17 January 2001)
+- Made the two former files lib/download.c and lib/highlevel.c become the new
+ lib/transfer.c which makes more sense. I also did the rename from Transfer()
+ to Curl_Transfer() in the other source files that use the transfer function
+ in the spirit of using Curl_ prefix for library-scoped global symbols.
+
+Daniel (11 January 2001)
+- Added -g/--globoff that switches OFF the URL globbing and thus enables {}[]
+ letters to be part of the URL. Do note that RFC2396 section 2.4.3 explicitly
+ mention these letters to be escaped. This was posted as a feature request by
+ Jorge Gutierrez and as a bug by Terry.
+
+- Short options to curl that requires parameters can now be specified without
+ having the option and its parameter space separated. -ofile works as good as
+ -o file. -m20 is equal to -m 20. Do note that this goes for single-letter
+ options only, verbose --long-style options still must be separated with
+ space from their parameters.
+
+Daniel (8 January 2001)
+- Francis Dagenais reported that the SCO compiler still fails when compiling
+ curl due to that getpass_r() prototype. I've now put it around #ifndef
+ HAVE_GETPASS_R in an attempt to please the SCO systems.
+
+- Made some minor corrections to get the client to cleanup properly and I made
+ the separator work again when getting multiple globbed URLs to stdout.
+
+- Worked with Loic Dachary to get the make dist and make distcheck work
+ correctly. The 'maketgz' script is now using the automake generated 'make
+ dist' when creating release archives. Loic successfully made 'make rpms'
+ automatically build RPMs!
+
+Loic Dachary (6 January 2001)
+- Automated generation of rpm packages, no need to be root.
+
+- make distcheck generates a proper distribution (EXTRA_DIST
+ in all Makefile.am modified to match FILES).
+
+Daniel (5 January 2001)
+- Huge client-side hack: now multiple URLs are supported. Any number of URLs
+ can be specified on the command line, and they'll all be downloaded. There
+ must be a corresponding -o or -O for each URL or the data will be written to
+ stdout. This needs more testing, time to release a 7.6-pre package.
+
+- The krb4 support was broken in the release. Fixed now.
+
+- Huge internal symbol rename operation. All non-static but still lib-internal
+ symbols should now be prefixed with 'Curl_' to prevent collisions with other
+ libs. All public symbols should be prefixed with 'curl_' and the rest should
+ be static and thus invisible to the outside world. I updated the INTERNALS
+ document to say this as well.
+
+Version 7.5.2
+
+Daniel (4 January 2001)
+- As Kevin P Roth suggested, I've added text to the man page for every command
+ line option and what happens when you specify that option more than
+ once. That hasn't been exactly crystal clear before.
+
+- Made the configure script possible to run from outside the source-tree. For
+ odd reasons I can't build curl properly outside though. It has to do with
+ curl's dependencies on libcurl...
+
+- Cut off all older (dated 1999 and earlier) CHANGES entries from this file.
+ The older piece is named CHANGES.0 and is added to the CVS repository in
+ case anyone would need it.
+
+- I added another file 'CVS-INFO' to the CVS. It contains information about
+ files in the CVS that aren't included in release archives and how to build
+ curl when you get the sources off CVS.
+
+- Updated CONTRIBUTE and FAQ due to the new license.
+
+Daniel (3 January 2001)
+- Renamed README.libcurl to LIBCURL
+
+- Changed headers in all sources files to the new dual license concept of
+ curl: use the MIT/X derivate license *or* MPL. The LEGAL file was updated
+ accordingly and the MPL 1.1 and MIT/X derivate licenses are now part of the
+ release archive.
+Daniel (30 December 2000)
+- Made all FTP commands get sent with the trailing CRLF in one single write()
+ as splitting them up seems to confuse at least some firewalls (FW-1 being
+ one major).
+
+Daniel (19 December 2000)
+- Added file desrciptor and FILE handle leak detection to the memdebug system
+ and thus I found and removed a file descriptor leakage in the ftp parts
+ that happened when you did PORTed downloads.
+
+- Added an include <stdio.h> in <curl/curl.h> since it uses FILE *.
+
+Daniel (12 December 2000)
+- Multiple URL downloads with -O was still bugging. Not anymore I think or
+ hope, or at least I've tried... :-O
+
+- Francois Petitjean fixed another -O problem
+
+Version 7.5.1
+
+Daniel (11 December 2000)
+- Cleaned up a few of the makefiles to use unix-style newlines only. As Kevin
+ P Roth found out, at least one CVS client behaved wrongly when it found
+ different newline conventions within the same file.
+
+- Albert Chin-A-Young corrected the LDFLAGS use in the configure script for
+ the SSL stuff.
+
+Daniel (6 December 2000)
+- Massimo Squillace correctly described how libcurl could use session ids when
+ doing SSL connections.
+
+- James Griffiths found out that curl would crash if the file you specify with
+ -o is shorter than the URL! This took some hours to fully hunt down, but it
+ is fixed now.
+
+Daniel (5 December 2000)
+- Jaepil Kim sent us makefiles that build curl using the free windows borland
+ compiler. The root makefile now accepts 'make borland' to build curl with
+ that compiler.
+
+- Stefan Radman pointed out that the test makefiles didn't use the PERL
+ variable that the configure scripts figure out. Actually, you still need
+ perl in the path for the test suite to run ok.
+
+- Rich Gray found numerous portability problems:
+ * The SCO compiler got an error on the getpass_r() prototype in getpass.h
+ since the curl one differed from the SCO one
+ * The HPUX compiler got an error because of how curl did the sigaction
+ stuff and used a define HPUX doesn't have (or need).
+ * A few more problems remain to be researched.
+
+- Paul Harrington experienced a core dump using https. Not much details yet.
+
+Daniel (4 December 2000)
+- Jörn Hartroth fixed a problem with multiple URLs and -o/-O.
+
+Version 7.5
+
+Daniel (1 December 2000)
+- Craig Davison gave us his updates on the VC++ makefiles, so now curl should
+ build fine with the Microsoft compiler on windows too.
+
+- Fixed the libcurl versioning so that we don't ruin old programs when
+ releasing new shared library interfaces.
+
+Daniel (30 November 2000)
+- Renamed docs/README.curl to docs/MANUAL to better reflect what the document
+ actually contains.
+
+Daniel (29 November 2000)
+- I removed a bunch of '#if 0' sections from the code. They only make things
+ harder to follow. After all, we do have all older versions in the CVS.
+
+Version 7.5-pre5
+
+Daniel (28 November 2000)
+- I filled in more error codes in the man page error code list that had been
+ lagging.
+
+- James Griffiths mailed me a fine patch that introduces the CURLOPT_MAXREDIRS
+ libcurl option. When used, it'll prevent location following more than the
+ set number of times. It is useful to break out of endless redirect-loops.
+
+Daniel (27 November 2000)
+- Added two test cases for file://.
+
+Daniel (22 November 2000)
+- Added the libcurl CURLOPT_FILETIME setopt, when set it tries to get the
+ modified time of the remote document. This is a special option since it
+ involves an extra set of commands on FTP servers. (Using the MDTM command
+ which is not in the RFC959)
+
+ curl_easy_getinfo() got a corresponding CURLINFO_FILETIME to get the time
+ after a transfer. It'll return a zero if CURLOPT_FILETIME wasn't used or if
+ the time wasn't possible to get.
+
+ --head/-I used on a FTP server will now present a 'Last-Modified:' header
+ if curl could get the time of the specified file.
+
+- Added the option '--cacert [file]' to curl, which allows a specified PEM
+ file to be used to verify the peer's certificate when doing HTTPS
+ connections. This has been requested, rather recently by Hulka Bohuslav but
+ others have asked for it before as well.
+
+Daniel (21 November 2000)
+- Numerous fixes the test suite has brought into the daylight:
+
+ * curl_unescape() could return a too long string
+ * on ftp transfer failures, there could be memory leaks
+ * ftp CWD could use bad directory names
+ * memdebug now uses the mprintf() routines for better portability
+ * free(NULL) removed when doing resumed transfers
+
+- Added a bunch of test cases for FTP.
+
+- General cleanups to make less warnings with gcc -Wall -pedantic.
+
+- I made the tests/ftpserver.pl work with the most commonly used ftp
+ operations. PORT, PASV, RETR, STOR, LIST, SIZE, USER, PASS all work now. Now
+ all I have to do is integrate the ftp server doings in the runtests.pl
+ script so that ftp tests can be run the same way http tests already run.
+
+Daniel (20 November 2000)
+- Made libcurl capable of dealing with any-length URLs. The former limit of
+ 4096 bytes was a bit annoying when people wanted to use curl to really make
+ life tough on a web server. Now, the command line limit is the most annoying
+ but that can be circumvented by using a config file.
+
+ NOTE: there is still a 4096-byte limit on URLs extracted from Location:
+ headers.
+
+- Corrected the spelling of 'resolve' in two error messages.
+
+- Alexander Kourakos posted a bug report and a patch that corrected it! It
+ turned out that lynx and wget support lowercase environment variable names
+ where curl only looked for the uppercase versions. Now curl will use the
+ lowercase versions if they exist, but if they don't, it'll use the uppercase
+ versions.
+
+Daniel (17 November 2000)
+- curl_formfree() was added. How come no one missed that one before? I ran the
+ test suite with the malloc debug enabled and got lots of "nice" warnings on
+ memory leaks. The most serious one was this. There were also leaks in the
+ cookie handling, and a few errors when curl failed to connect and similar
+ things. More tests cases were added to cover up and to verify that these
+ problems have been removed.
+
+- Mucho updated config file parser (I'm dead tired of all the bug reports and
+ weird behaviour I get on the former one). It works slightly differently now,
+ although I doubt many people will notice the differences. The main
+ difference being that if you use options that require parameters, they must
+ both be specified on the same line. With this new parser, you can also
+ specify long options without '--' and you may separate options and
+ parameters with : or =. It makes a config file line could look like:
+
+ user-agent = "foobar and something"
+
+ Parameters within quotes may contain spaces. Without quotes, they're
+ expected to be a single non-space word.
+
+ Had to patch the command line argument parser a little to make this work.
+
+- Added --url as an option to allow the URL to be specified this way. It makes
+ way nicer config files. The previous way of specifying URLs in the config
+ file doesn't work anymore.
+
+Daniel (15 November 2000)
+- Using certain characters in usernames or passwords for HTTP authentication
+ failed. This was due to the mprintf() that had a silly check for letters,
+ and if they weren't isprint() they weren't outputed "as-is". This caused
+ passwords and usernames using '§' (for example) to fail.
+
+Version 7.4.2
+
+Daniel (15 November 2000)
+- 'tests/runtests.pl' now sorts the test cases properly when 'all' is used.
+
+Daniel (14 November 2000)
+- I fell over the draft-ietf-ftpext-mlst-12.txt Internet Draft titled
+ "Extensions to FTP" that contains a defined way how the ftp command SIZE
+ could be assumed to work.
+
+- Laurent Papier posted a bug report about using "-C -" and FTP uploading a
+ file that isn't prsent on the server. The server might then return a 550 and
+ curl will fail. Should it instead as Laurent Papier suggests, start
+ uploading from the beginning as a normal upload?
+
+Daniel (13 November 2000)
+- Fixed a crash with the followlocation counter.
+
+- While writing test cases for the test suite, I discovered an old limitation
+ that prevented -o and -T to be used at the same time. I removed this
+ immediately as this has no relevance in the current libcurl.
+
+- Chris Faherty fixed a free-twice problem in lib/file.c
+
+- I fixed the perl http server problem in the test suite.
+
+Version 7.4.2 pre4
+
+Daniel (10 November 2000)
+- I've (finally) started working on the curl test suite. It is in the new
+ tests/ directory. It requires sh and perl. There's a TCP server in perl and
+ most of the other stuff running a pretty simple shell script.
+
+ I've only made four test cases so far, but it proves the system can work.
+
+- Laurent Papier noticed that curl didn't set TYPE when doing --head checks
+ for sizes on FTP servers. Some servers seem to return different sizes
+ depending on whether ASCII or BINARY is used!
+
+- Laurent Papier detected that if you appended a FTP upload and everything was
+ already uploaded, curl would hang.
+
+- Angus Mackay's getpass_r() in lib/getpass.c is now compliant with the
+ getpass_r() function it seems some systems actually have.
+
+- Venkataramana Mokkapati detected a bug in the cookie parser and corrected
+ it. If the cookie was set for the full host name (domain=full.host.com),
+ the cookie was never sent back because of a faulty length comparison between
+ the set domain length and the current host name.
+
+Daniel (9 November 2000)
+- Added a configure check for gethostbyname in -lsocket (OS/2 seems to need
+ it). Added a check for RSAglue/rsaref for the cases where libcrypto is found
+ but libssl isn't. I haven't verified this fix yet though, as I have no
+ system that requires those libs to build.
+
+Version 7.4.2 pre3
+
+Daniel (7 November 2000)
+- Removed perror() outputs from getpass.c. Angus Mackay also agreed to a
+ slightly modified license of the getpass.c file as the prototype was changed.
+
+Daniel (6 November 2000)
+- Added possibility to set a password callback to use instead of the built-in.
+ They're controled with curl_easy_setopt() of course, the tags are
+ CURLOPT_PASSWDFUNCTION and CURLOPT_PASSWDDATA.
+
+- Used T. Bharath's thinking and fixed the timers that showed terribly wrong
+ times when location: headers were followed.
+
+- Emmanuel Tychon discovered that curl didn't really like user names only in
+ the URL. I corrected this and I also fixed the since long living problem
+ with URL encoded user names and passwords in the URLs. They should work now.
+
+Daniel (2 November 2000)
+- When I added --interface, the new error code that was added with it was
+ inserted in the wrong place and thus all error codes from 35 and upwards got
+ increased one step. This is now corrected, we're back at the previous
+ numbers. All new exit codes should be added at the end.
+
+Daniel (1 November 2000)
+- Added a check for signal() in the configure script so that if sigaction()
+ isn't present, we can use signal() instead.
+
+- I'm having a license discussion going on privately. The issue is yet again
+ GPL-licensed programs that have problems with MPL. I am leaning towards
+ making a kind of dual-license that will solve this once and for all...
+
+Daniel (31 October 2000)
+- Added the packages/ directory. I intend to let this contain some docs and
+ templates on how to generate custom-format packages for various platforms.
+ I've now removed the RPM related curl.spec files from the archive root.
+
+Daniel (30 October 2000)
+- T. Bharath brought a set of patches that bring new functionality to
+ curl_easy_getinfo() and curl_easy_setopt(). Now you can request peer
+ certificate verification with the *setopt() CURLOPT_SSL_VERIFYPEER option
+ and then use the CURLOPT_CAINFO to set the certificate to verify the remote
+ peer against. After an such an operation with a verification request, the
+ *_getinfo() option CURLINFO_SSL_VERIFYRESULT will return information about
+ whether the verification succeeded or not.
+
+Daniel (27 October 2000)
+- Georg Horn brought us a splendid patch that solves the long-standing
+ annoying problem with timeouts that made curl exit with silly exit codes
+ (which as been commented out lately). This solution is sigaction() based and
+ of course then only works for unixes (and only those unixes that actually
+ have the sigaction() function).
+
+Daniel (26 October 2000)
+- Björn Stenberg supplied a patch that fixed the flaw mentioned by Kevin Roth
+ that made the password get echoed when prompted for interactively. The
+ getpass() function (now known as my_getpass()) was also fixed to not use any
+ static buffers. This also means we cannot use the "standard" getpass()
+ function even for those systems that have it, since it isn't thread-safe.
+
+- Kevin Roth found out that if you'd write a config file with '-v url', the
+ url would not be used as "default URL" as documented, although if you wrote
+ it 'url -v' it worked! This has been corrected now.
+
+- Kevin Roth's idea of using multiple -d options on the same command line was
+ just brilliant, and I couldn't really think of any reason why we shouldn't
+ support it! The append function always append '&' and then the new -d
+ chunk. This enables constructs like the following:
+
+ curl -d name=daniel -d age=unknown foobarsite.com
+
+Daniel (24 October 2000)
+- I fixed the lib/memdebug.c source so that it compiles on Linux and other
+ systems. It will be useful one day when someone else but me wants to run the
+ memory debugging system.
+
+Daniel (23 October 2000)
+- I modified the maketgz and configure scripts, so that the configure script
+ will fetch the version number from the include/curl/curl.h header files, and
+ then the maketgz doesn't have to rebuild the configure script when I build
+ release-archives.
+
+- Björn Stenberg and Linus Nielsen correctly pointed out that curl was silly
+ enough to not allow @-letters in passwords when they were specified with the
+ -u or -U flags (CURLOPT_USERPWD and CURLOPT_PROXYUSERPWD). This also
+ suggests that curl probably should url-decode the password piece of an URL
+ so that you could pass an encoded @-letter there...
+
+Daniel (20 October 2000)
+- Yet another http server barfed on curl's request that include the port
+ number in the Host: header always. I now only include the port number if it
+ isn't the default (80 for HTTP, 443 for HTTPS). www.perl.com turned out to
+ run one of those nasty servers.
+
+- The PHP4 module for curl had problems with referer that seems to have been
+ corrected just yesterday. (Sterling Hughes of the PHP team confirmed this)
+
+Daniel (17 October 2000)
+- Vladimir Oblomov reported that the -Y and -y options didn't work. They
+ didn't work for me either. This once again proves we should have that test
+ suite...
+
+- I finally changed the error message libcurl returns if you try a https://
+ URL when the library wasn't build with SSL enabled. It will now return this
+ error:
+ "libcurl was built with SSL disabled, https: not supported!"
+
+ I really hope it will make it a bit clearer to users where the actual
+ problem lies.
+
+Version 7.4.1
+
+Daniel (16 October 2000)
+- I forgot to remove some of the malloc debug defines from the makefiles in
+ the release archive (of course).
+
+Version 7.4
+
+Daniel (16 October 2000)
+- The buffer overflow mentioned below was posted to bugtraq on Friday 13th.
+
+Daniel (12 October 2000)
+- Colin Robert Phipps elegantly corrected a buffer overflow. It could be used
+ by an evil ftp server to crash curl. I took the opportunity of replacing a
+ few other sprintf()s into snprintf()s as well.
+
+Daniel (11 October 2000)
+- Found some more memory leaks. This new simple memory debugger has turned out
+ really useful!
+
+Version 7.4 pre6
+
+Daniel (9 October 2000)
+- Florian Koenig pointed out that the bool typedef in the curl/curl.h include
+ file was breaking PHP 4.0.3 compiling. The bool typedef is not used in the
+ public interface and was wrongly inserted in that header file.
+
+- Jörg Hartroth corrected a minor memory leak in the src/urlglob.c stuff. It
+ didn't harm anyone since the memory is free()ed on exit anyway.
+
+- Corrected the src/main.c. We use the _MPRINTF_REPLACE #define to use our
+ libcurl-printf() functions. This gives us snprintf() et al on all
+ platforms. I converted the allocated useragent string to one that uses a
+ local buffer.
+
+- I've set an #if 0 section around the Content-Transfer-Encoding header
+ generated in lib/formdata.c. This will hopefully make curl do more
+ PHP-friendly multi-part posts.
+
+Version 7.4 pre5
+
+Daniel (9 October 2000)
+- Nico Baggus found out that curl's ability to force a ASCII download when
+ using FTP was no longer working! I corrected this. This problem was probably
+ introduced when I redesigned libcurl for version 7.
+
+- Georg Horn provided a source example that proved a memory leak in libcurl.
+ I added simple memory debugging facilities and now we can make libcurl log
+ all memory fiddling functions. An additional perl script is used to analyze
+ the output logfile and to match malloc()s with free()s etc. The memory leak
+ Georg found turned out to be the main cookie struct that cookie_cleanup()
+ didn't free! The perl script is named memanalyze.pl and it is available in
+ the CVS respository, not in the release archive.
+
+Daniel (8 October 2000)
+- Georg Horn found a GetHost() problem. It turned out it never assigned the
+ pointer in the third argument properly! This could make a crash, or at best
+ a memory leak!
+
+Version 7.4 pre4
+
+Daniel (6 October 2000)
+- Is the -F post following the RFC 1867 spec? We had this dicussion on the
+ mailing list since it appears curl can't post -F form posts to a PHP
+ receiver... I've been in touch with the PHP developers about this.
+
+- Domenico Andreoli found out that the long option '--proxy' wasn't working
+ anymore! The option parser got confused when I added the --proxytunnel for
+ 7.3. This was indeed a very old flaw that hasn't turned up until now...
+
+- Jörn Hartroth provided patches, updated makefiles and two new files for DLL
+ stuff on win32. He also pointed out that lib source files were compiled with
+ -I../src which isn't only wrong but plain stupid!
+
+- Troels Walsted Hansen fixed a problem with HTTP resume. Curl previously used
+ a local variable badly, that could lead to crashes.
+
+Version 7.4 pre3
+
+Daniel (4 October 2000)
+- More docs written. The curl_easy_getinfo.3 man page is now pretty accurate,
+ as is the -w section in curl.1. I added two options to enable the user to
+ get information about the received headers' size and the size of the HTTP
+ request. T. Bharath requested them.
+
+Daniel (3 October 2000)
+- Corrected a sever free() before use in the new add_buffer_send()! ;-)
+
+Version 7.4 pre2
+
+Daniel (3 October 2000)
+- Jason S. Priebe sent me patches that changed the way curl issues HTTP
+ requests. The entire request is now issued in one single shot. It didn't do
+ this previously, and it has turned out that since the common browsers do it
+ this way, some sites have turned out to work with browsers but not with
+ curl! Although this is not a client-side problem, we want to be able to
+ fully emulate browsers, and thus we have now adjusted the networking layer
+ to slightly more appear as a browser. I adjusted Jason's patch, the faults
+ are probably mine.
+
+Daniel (2 October 2000)
+- Anyone who ever uploaded data with curl on a slow link has noticed that the
+ progess meter is updated very infrequently. That is due to the large buffer
+ size curl is using. It reads 50Kb and sends it, updates the progress meter
+ and loops. 50Kb is very much on a slow link, although it is pretty neat to
+ use on a fast one.
+
+ I've now made an adjustment that makes curl use a 2Kb buffer for uploads to
+ start with. If curl's average upload speed is faster than buffer size bytes
+ per second, curl will increase the used buffer size up to max 50Kb. It
+ should make the progress meter work better.
+
+Version 7.4 pre1
+
+Daniel (29 September 2000)
+- Ripped out the -w stuff from the library and put in the curl tool. It gets
+ all the relevant info from the library using the new curl_easy_getinfo()
+ function.
+
+- brad at openbsd.org mailed me a patch that corrected my kerberos mistake and
+ removed a compiler warning from hostip.c that OpenBSD people get.
+
+Daniel (28 September 2000)
+- Of course (I should probably get punished somehow) I didn't properly correct
+ the #include lines for the base64 stuff in the kerberos sources in the just
+ released 7.3 package. They still include the *_krb.h files! Now, the error
+ is sooo very easy to spot and fix so I won't bother with a quick bug fix
+ release. I'll post a patch whenever one is needed instead. It'll be
+ available in the CVS in a few minutes anyway.
+
+Version 7.3
+
+Daniel (28 September 2000)
+- Removed the base64_krb.[ch] files. They've now replaced the former
+ base64.[ch] files.
+
+Daniel (26 September 2000)
+- Updated some docs.
+
+- I changed the OpenSSL fix to work with older versions as well. The posted
+ patch was only working with 0.9.6 and no older ones.
+
+Version 7.3-pre8
+
+Daniel (25 September 2000)
+- Erdmut Pfeifer informed us that curl didn't build with OpenSSL 0.9.6 and
+ showed us what needed to get patched in order to make it build properly
+ again.
+
+- Dirk Kruschewski found a bug in the cookie parser. I made an alternative
+ approach to the solution Dirk himself suggested. The bug made a cookie
+ header that didn't end with a trailing semicolon to not get parsed.
+
+- I've marked -c and -t deprecated now. If you use any of them, curl will tell
+ you to use "-C -" or "-T -" instead. I don't think occupying two letters for
+ nearly identical functions is good use. Also, -T - kind of follows the curl
+ tradition of using - for stdin where a file name is expected.
+
+Daniel (23 September 2000)
+- Martin Hedenfalk provided the patch that finally made the krb4 ftp upload
+ work!
+
+Daniel (21 September 2000)
+- The kerberos code is not quite thread-safe yet. There are a few more globals
+ that need to be take care of. Let's get the upload working first!
+
+Daniel (20 September 2000)
+- Richard Prescott solved another name lookup buffer size problem. I took this
+ opportunity to rewrite the GetHost() function. With these large buffer
+ sizes, I think keeping them as local arrays quickly turn ugly. I now use
+ malloc() to get the buffer memory. Thanks to this, I now can realloc() to a
+ large buffer in case of demand (errno == ERANGE) in case a solution like
+ that would become necessary. I still want to avoid that kind of nastiness.
+
+- Tried to compile and run curl on Linux for alpha and FreeBSD for alpha. Went
+ as smooth as it could.
+
+- Added a docs/examples directory with two tiny example sources that show how
+ to use libcurl. I hope users will supply me with more useful examples
+ further on.
+
+- Applied a patch by Jörn Hartroth to no longer use the word 'inteface' in the
+ config struct in the src/main.c file since certain compilers have that word
+ "reservered". I figure that is some kind of C++ decease.
+
+- Updated the curl.1 man page with --interface and --krb4.
+
+- Modified the base64Encode() function to work like the kerberos one, so that
+ I could remove the use of that. There is no need for *two* base64 encoding
+ functions! ;-)
+
+Version 7.3pre5
+
+Daniel (19 September 2000)
+- The kerberos4-layer source code that is much "influenced" by the original
+ krb4 source code, through yafc into curl, was using quite a lot of global
+ variables. libcurl can't work properly with globals like that why I had to
+ clean up almost every function in the new security.c to make them use
+ connection specific variables instead of the globals. I just hope I didn't
+ destroy anything now... :-) configure updated, version string now reflects
+ krb4 built-in. It almost works now. Only uploads are still being naughty.
+
+Version 7.3pre3
+
+Daniel (18 September 2000)
+- Martin Hedenfalk supplied a major patch that introduces krb4-ftp support to
+ curl. Martin is the primary author of the ftp client named yafc and he did
+ not hesitate to help us implement this when I asked him. Many and sincere
+ thanks to a splendid effort. It didn't even take many hours!
+
+- Stephen Kick supplied a big patch that introduces the --interface flag to
+ the curl tool and CURLOPT_INTERFACE for libcurl. It allows you to specify an
+ outgoing interface to use for your request. This may not work on all
+ platforms. This needs testing.
+
+- Richard Prescott noticed that curl on Tru64 unix could core dumped if the
+ name didn't resolve properly. This was due to the GetHost() function not
+ returning an error even though it failed on some platforms!
+
+Daniel (15 September 2000)
+- Updated all sorts of documents in regards to the new proxytunnel support.
+
+Version 7.3pre2
+
+Daniel (15 September 2000)
+- Kai-Uwe Rommel pointed out a problem in the httpproxytunnel stuff for ftp.
+ Adjusted it. Added better info message when setting up the tunnel and the
+ pasv message when doing the second connect.
+
+Version 7.3pre1
+
+Daniel (15 September 2000)
+- libcurl now allows "httpproxytunnel" to an arbitrary host and port name. The
+ second connection on ftp needed that.
+
+- TheArtOfHTTPScripting was corrected all over. I both type and spell really
+ bad at times!
+
+Daniel (14 September 2000)
+- -p/--proxytunnel was added to 'curl'. It uses the new
+ CURLOPT_HTTPPROXYTUNNEL libcurl option that allows "any" protocol to tunnel
+ through the specified http proxy. At the moment, this should work with ftp.
+
+Daniel (13 September 2000)
+- Jochen Schaeuble found that file:// didn't work as expected. Corrected this
+ and mailed the patch to the mailing list.
+
+Daniel (7 September 2000)
+- I changed the #define T() in curl.h since it turned out it wasn't really
+ a good symbol to use (when you compiled PHP with curl as a module, that
+ define collided with some IMAP define or something). This was posted to the
+ PHP bug tracker.
+
+- I added extern "C" stuff in two header files to better allow libcurl usage
+ in C++ sorces. Discussions on the libcurl list with Danny Horswell lead to
+ this.
+
+Version 7.2.1
+
+Daniel (31 August 2000)
+- Albert Chin-A-Young fixed the configure script *again* and now it seems to
+ detect Linux name resolving properly! (heard that before?)
+
+- Troels Walsted Hansen pointed out that downloading a file containing the
+ letter '+' from an ftp server didn't work. It did work from HTTP though and
+ the reason was my lame URL decoder.
+
+- I happened to notice that -I didn't at all work on ftp anymore. I corrected
+ that.
+
+Version 7.2
+
+Daniel (30 August 2000)
+- Understanding AIX is a hard task. I believe I'll never figure out why they
+ solve things so differently from the other unixes. Now, I'm left with the
+ AIX 4.3 run-time warnings about duplicate symbols that according to this
+ article (http://www.geocrawler.com/archives/3/405/1999/9/0/2593428/) is a
+ libtool flaw. I tried the mentioned patch, although that stops the linking
+ completely.
+
+ So, if I select to ignore the ld warnings there are compiler warnings that
+ fill the screen pretty bad when curl compiles. It turns out that if I want
+ to '#include <arpa/inet.h>', I can get tid of the warnings by include the
+ following three include files before that one:
+
+ #include <net/if_dl.h>
+ #include <sys/mbuf.h>
+ #include <netinet/if_ether.h>
+
+ Now, is it really sane to add those include files before arpa/inet.h in all
+ the source files that include it?
+
+ Thanks to Albert Chin-A-Young at thewrittenword.com who gave me the AIX
+ login to try everything on.
+
+Daniel (24 August 2000)
+- Jan Schmidt supplied us a new VC6 makefile for Windows as the previous one
+ was not up to date but lacked several object files.
+
+- More work on the naming.
+
+- Albert Chin-A-Young provided a configure-check for large file support, as
+ some systems seem to need that for them to work. Had to change the position
+ for the config.h include file in every .c file in the libcurl dir...
+
+- As suggested on the mailing list (by Troy Engel), I did use a --data-binary
+ option instead of the messy way I've left described below. It seems to
+ work. The libcurl fix remained the same as yesterday.
+
+Daniel (23 August 2000)
+- Back on the -d stripping newlines thing. The 'plain post' thing was added
+ when I had no thought of that one could actually post binary data with
+ it. Now, I have to add this functionality in a graceful manner and I think
+ I've managed to come up with a way: '-d @file;binary' will thus post the
+ file binary, exactly as its contents are. It is implemented with a new
+ *setopt() option (CURLOPT_POSTFIELDSIZE) to set the postfield size, since
+ libcurl can't strlen() the data in these cases.
+
+- Albert Chin-A-Young made some very serious efforts and all the name
+ resolving problems seem to have been sorted out now on all the platforms
+ that previously showed them. I'll make another release now anyday because of
+ this.
+
+- The FAQ was much enhanced when it comes to the licensing issues thanks to
+ Bjorn Reese.
+
+Daniel (21 August 2000)
+- Rick Welykochy pointed out a problem when you use -d to post and you want to
+ keep the newlines, as curl strips them off as a bonus before posting...
+ This needs to be addressed.
+
+Version 7.1.1
+
+Daniel (21 August 2000)
+- Got more people involved in the gethostbyname_r() mess. Caolan McNamara sent
+ me configure-code that turned out to be very similar to my existing tests
+ which only make me more sure I'm on the right path. I changed the order of
+ the tests slightly, as it seems that some compilers don't yell error if a
+ function is used with too many parameters. Thus, the first tested function
+ will seem ok... Let's hope more compilers think of too-few parameters as bad
+ manners, as we're now trying the functions in that order; fewer first. I
+ should also add that Lars Hecking mailed me and volunteered to run tests on
+ a few odd systems. Coalan is keeping his work over at
+ http://www.csn.ul.ie/~caolan/publink/gethostbyname_r/. Might be handy in the
+ future as well.
+
+Daniel (18 August 2000)
+- I noticed I hadn't increased the name lookup buffer in lib/ftp.c. I don't
+ think this is the reason for the continued trouble though.
+
+Daniel (17 August 2000)
+- Fred Noz corrected my stupid mistakes in the gethostbyname_r() fluff. It
+ should affect some AIX, Digital Unix and HPUX 10 systems.
+
+Daniel (15 August 2000)
+- Mathieu Legare compiled and build 7.1 without errors on both AIX 4.2 as well
+ as AIX 4.3. Now why did problems occur before?
+
+- Fred Noz reported a -w/--write-out bug that caused it to malfunction when
+ used combined with multiple URL retrievales. All but the first display got
+ screwed up!
+
+Daniel (11 August 2000)
+- Jason Priebe and an anonymous friend found some host names the Linux version
+ of curl could not resolve. It turned out the buffer used to retrieve that
+ information was too small. Fixed. One could argue about the usefulness of
+ not having the slightest trace of a man page for gethostbyname_r() on my
+ Linux Redhat installation...
+
+Daniel (10 August 2000)
+- Balaji S Rao was first in line to note the missing possibility to replace
+ the Content-Type: and Content-Length: headers when doing -d posts. I added
+ the possibility just now. It seems some people wants to do standard posts
+ using custom Content-Types.
+
+Daniel (8 August 2000)
+- Mike Dowell correctly discovered that curl did not approve of URLs with no
+ user name but password. As in 'http://:foo@haxx.se'. I corrected this.
+
+Version 7.1
+
+Daniel (7 August 2000)
+- My AIX 4 fix does not work. I need help from a AIX 4 hacker.
+
+- I added my new document in the docs directory. It is aimed to become a sort
+ of tutorial on how to do HTTP scripting with curl.
+
+Daniel (4 August 2000)
+- Working with Rich Gray on compiling curl for lots of different platforms.
+ My fix for AIX 3.2 was not good enough and was slightly changed, I had to
+ move an include file before another, as is now described in the source.
+
+ AIX 4.2 (4.X?) has different gethostbyname_r() and gethostbyaddr_r()
+ functions that the configure script didn't check for and thus the compile
+ broke with an error. I have now changed the gethostbyname_r() check in the
+ configure file to support all three versions of both these functions. My
+ implementation that uses the AIX-style is though not yet verified and I may
+ get problems to fix it if it turns out to bug since I don't have access to
+ any system using that.
+
+ For problems like that, I made the configure script allow --disable-thread
+ to completely switch off the check for threadsafe versions of a few
+ functions and thus go with the "good old versions" that tend to work
+ although will break thread-safeness for libcurl. Most people won't use
+ libcurl for other things than curl though, and curl doesn't need a
+ thread-safe lib.
+
+- Working on my big tutorial about HTTP scripting with curl.
+
+Daniel (1 August 2000)
+- Rich Gray spotted a problem in src/setup.h caused by a #define strequal()
+ that was just a left-over from passed times. The strequal() is now a true
+ function supplied by libcurl for a portable case insensitive string
+ comparison. I added the prototypes in include/curl.h and removed the
+ now obsolete #define.
+
+- Igor Khristophorov made a fix to allow resumed download from Sun's
+ JavaWebServer/1.1.1. It seems that their server sends bad Content-Range
+ headers.
+
+- The makefiles forced a static library build, which is bad since we now use
+ libtool and thus have excellent shared library support! Albert Chin-A-Young
+ found out.
+
+Version 7.0.11beta
+
+Daniel (1 August 2000)
+- Albert Chin-A-Young pointed out that 'make install' did not properly create
+ the header include directory, why it failed to install the header files as
+ it should. Automake isn't really equipped to deal with subdirectories
+ without Makefiles in any nice way. I had to run ahead and add Makefiles in
+ both include and include/curl before I managed to create a top-level
+ makefile that succeeds in install everything properly!
+
+- Ok, no more "features" added now. Let's just verify that there's no major
+ flaws added now.
+
+Daniel (31 July 2000)
+- Both Jeff Schasny and Ketil Froyn asked me how to tell curl not to send one
+ of those internally generated headers. They didn't settle with the blank
+ ones you could tell curl to use. I rewrote the header-replace stuff a
+ little. Now, if you replace an internal header with your own and that new
+ one is a blank header you will only remove the internal one and not get any
+ blank. I couldn't figure out any case when you want that blank header.
+
+Daniel (29 July 2000)
+- It struck me that the lib used localtime() which is not thread-safe, so now
+ I use localtime_r() in the systems that has it.
+
+- I went through this entire document and removed all email addresses and left
+ names only. I've really made an effort to always note who brought be bug
+ reports or fixes, but more and more people ask me to remove the email
+ addresses since they become victims for spams this way. Gordon Beaton got me
+ working on this.
+
+Daniel (27 July 2000)
+- Jörn Hartroth found out that when you specified a HTTP proxy in an
+ environment variable and used -L, curl failed in the second fetch. I
+ corrected this problem and posted a patch to the list. No need for an extra
+ beta release just for this.
+
+Version 7.0.10beta
+
+Daniel (27 July 2000)
+- So, libtool replaced two of my files with symbolic links and I forgot to add
+ the two new libtool files to the release archive (and they were added as
+ symlinks as well!) This of course lead to that the configure script failed
+ on 7.0.9...
+
+Version 7.0.9beta
+
+Daniel (25 July 2000)
+- Kristian Köhntopp <kris at koehntopp.de> brought a fix that makes libcurl
+ libtoolified, just as we've wanted for a while now. He also made the
+ recently added man pages get installed properly on 'make install' and some
+ other nice cleanups.
+
+- In a discussion with Eetu Ojanen it struck me that if we use curl to get a
+ page using a password, and that page then sends a Location: to another
+ server that curl follows, curl will send the user name and password to that
+ server as well.
+
+ Now, I'll never be able to make curl do Location: following all that perfect
+ and you're all sooner or later required to write a script to do several
+ fetches when you're doing advanced stuff, but now I've modified curl to at
+ least *only* send the user name and password to the original server. Which
+ means that if get a page from server A with a password, that forwards curl
+ to server B, curl won't use the password there. If server B then forwards
+ curl back to server A again, the password will be used again.
+
+ This is not a perfect implementation, as in a browser case it would only use
+ the password if the left-prefix of the first path is the same. I just think
+ that this fix prevents a somewhat lurky "security hole".
+
+ As a side-note in this subject: HTTP passwords are sent in cleartext and
+ will never be considered to be safe or secure. Use HTTPS for that.
+
+- As discussed on the mailing list, I converted the FTP response reading
+ function into using select() which then allows timeouts (even under win32!)
+ if the command-reply session gets too slow or dies completely. I made a
+ default timeout on 3600 seconds unless anything else is specified, since I
+ don't think anyone wants to wait more than that for a single character to
+ get received...
+
+- Torsten Foertsch <torsten.foertsch at gmx.net> brought a set of fixes for
+ the rfc1867 form posts. He introduced 'name=<file' which brings a means to
+ suuply very large text chunks read from the given file name. It differs from
+ 'name=@file' in the way that this latter thing is marked in the uploaded
+ contents as a file upload, while the first is just text (as in a input or
+ textarea field). Torsten also corrected a bug that would happen if you used
+ %s or similar in a -F file name.
+
+- As discovered by Nico Baggus <Nico.Baggus at mail.ing.nl>, when transferring
+ files to/from FTP using type ASCII curl should not expect the transfer to be
+ the exact size reported by the server as the file size. Since ASCII may very
+ well mean that the content is translated while transfered, the final size
+ may very well differ. Therefor, curl now ignores the file size when doing
+ ASCII transfers in FTP.
+
+Daniel (24 July 2000)
+- Added CURLOPT_PROXYPORT to the curl_easy_setopt() call to allow the proxy
+ port number to be set separately from the proxy host name.
+
+- Andrew <andrew at ugh.net.au> pointed out a netrc manual bug.
+
+- The FTP transfer code now accepts a 250-code as well as the previously
+ accepted 226, after a successful file transfer. Mohan <mnair at
+ evergreen-funds.com> pointed this out.
+
+- The check for *both* nsl and socket was never added in the v7 configure.in
+ when I moved the main branch. I re-added that check to configure.in. This was
+ discovered by Rich Gray.
+
+- Howard, Blaise <Blaise.Howard at factiva.com> pointed out a missing free() in
+ curl_disconnect() which of course meant libcurl ate memory.
+
+- Brian E. Gallew noted that the HTTP 'Host:' header curl sent did not
+ properly include the port number if non-default ports were used. This should
+ now have been fixed.
+
+- HTTP connect errors now return errors earlier. This was most notably causing
+ problems when the HTTPS certificate had problems and later caused a crash.
+ Many thanks to Gregory Nicholls <gnicholls at level8.com> for discovering
+ and suggesting a fix...
+
+Daniel (21 June 2000)
+- After a "bug report" I received where the user was using both -F and -I in a
+ HTTP request (it severly confused the library I should add), I added some
+ checks to src/main.c that prevents setting more than one HTTP request
+ command, no matter what the user wants! ;-)
+
+Version 7.0.8beta
+
+Daniel (20 June 2000)
+- I did a major replace in many files to use the new curl domain haxx.se
+ instead of the previous one.
+
+- As Eetu Ojanen suggested, I finally took the step and now libcurl no longer
+ makes a POST after it has followed a location. When the initial POST has
+ been done, it'll turned into a GET for the further requests. This is only
+ interesting when using -L/--location *and* doing a POST at the same time.
+
+ While messing with this, I added another weird feature I call 'auto
+ referer'. If you append ';auto' to the right of a given referer string (or
+ only use that string as referer), libcurl will automatically set the
+ previoud URL as refered when it follows a Location: and gets a succeeding
+ document.
+
+- My hero Rich Gray found the very obscure FTP bug that happened to him only
+ when passing through a particular firewall and using the PORT command. It
+ turned out that PORT was the only command in the lib/ftp.c source that
+ didn't send a proper \r\n sequence but instead used the faulty \n which as
+ it seemed is supported by most major ftp servers... :-O
+
+Version 7.0.7beta
+
+Daniel (16 June 2000)
+- I had avoided this long enough now, so I moved the alternative progress bar
+ stuff from the lib and added it to the client code. This is now using the
+ recently added progress callback and it seems to work pretty much like
+ before. Since it is only one progress bar and you and download and upload at
+ the same time, this bar shows the combined progress of both directions. This
+ code was just ported from the old place to this, Lars is still our saviour!
+ ;-) This also made the documentation more accurate since I never removed
+ this function from any docs! Although I now removed the CURLOPT_PROGRESSMODE
+ from the library since the lib has only one internal progress meter and it
+ will never get another. It is although likely that the internal one also
+ will be moved to the client code in the future (when I have other means of
+ getting the writeout data and move that too to the client).
+
+- I took the opportunity to verify that standard progress meter works and I
+ found out it didn't get inited properly. Grrr. I corrected that as well.
+
+Daniel (15 June 2000)
+- I thought I'd better verify that the -F option still works in v7 and of
+ course it didn't... :-/ Anyway, I had the problems I could discover
+ corrected. About one month of beta testing and not a single person has used
+ this feature with v7?
+
+- Björn correctly pointed out that the --progress-bar still doesn't work in
+ v7. Hm.
+
+Daniel (14 June 2000)
+- Tim Tassonis discovered that curl 7 didn't handle normal http POST as it
+ should. I corrected this.
+
+Version 7.0.6beta
+
+Daniel (14 June 2000)
+- Björn Stenberg pointed out several problems (related to win32 compiling):
+ lib/strequal.c had a bad #ifdef for one of the string comparisons (win32)
+ src/main.c had several minor problems
+ lib/makefile.m32 had getpass.[co] twice
+ src/config-win32.h lacked the HAVE_FCNTL_H define
+ both config-win32.h files now only set the HAVE_UNISTD_H define if the
+ define MINGW32 is set, and I modified src/makefile.m32 and lib/makefile.m32
+ to set it.
+
+Version 7.0.5beta
+
+Daniel (14 June 2000)
+- Applied Luong Dinh Dung's comments about a few win32 compile problems.
+
+- Applied Björn Stenberg's suggested fix that turns the win32 stdout to
+ binary. It won't do it if the -B / --use-ascii option is used. That option
+ is now an extended version of the previous -B /--ftp--ascii. The flag was
+ already in use be the ldap as well so the new name fits pretty good. The
+ libcyrl CURLOPT_TRANSFERTEXT was also introduced as an alias to the now
+ obsolete CURLOPT_FTPASCII. Can't verify this fix myself as I have no win32
+ compiler around.
+
+Daniel (13 June 2000)
+- Luong Dinh Dung <dung at sch.bme.hu> found a problem in curl_easy_cleanup()
+ since it free()ed the main curl struct *twice*. This is now corrected.
+
+Daniel (9 June 2000)
+- Updated the RESOURCES file, added a README.win32 file.
+
+Daniel (8 June 2000)
+- So I finally added the progress callback to the *setopt() options and it
+ should work now. I don't have the energy to write any test program for it
+ right now.
+- Made the callback function typedefs public in curl/curl.h for comfort. Just
+ in case anyone wanna fiddle with such pointers.
+- Updated the curl_easy_setopt() man page accordingly.
+
+Version 7.0.4beta
+
+Daniel (2 June 2000)
+- I noticed that when doing Location: following, we lost custom headers in all
+ but the first request.
+- Removed the 'HttpPost' struct and moved the header stuff to the more generic
+ curl_slist.
+- Added some better slist-cleanups in src/main.c
+
+Version 7.0.3beta
+
+Daniel (31 May 2000)
+- So I discovered that I released the 7.0.2beta without it being able to
+ compile under Linux. gethostbyname_r() and gethostbyaddr_r() turned out to
+ feature a different amount of arguments on different systems so I had to add
+ a configure check for this and adjust the code slightly.
+
+Version 7.0.2beta
+
+Daniel (29 May 2000)
+- Corrected the bits.* assignments when using CURLOPT options that only
+ toggles one of those bits.
+
+- Applied the huge patches from David LeBlanc <dleblanc at qnx.com> that add
+ usage of the gethostbyname_r() and similar functions in case they're around,
+ since that make libcurl much better threadsafe in many systems (such as
+ solaris). I added the checks for these functions to the configure script.
+
+ I can't explain why, but the inet_ntoa_r() function did not appear in my
+ Solaris include files, I had to add my own include file for this for now.
+
+Daniel (22 May 2000)
+- Jörn Hartroth brought me fixes to make the win32 version compile properly as
+ well as a rename of the 'interface' field in the urldata struct, as it seems
+ to be reserved in some gcc versions!
+
+- Rich Gray struck back with yet some portability reports. Data General DG/UX
+ needed a little fix in lib/ldap.c since it doesn't have RTLD_GLOBAL defined.
+ More fixes are expected as a result of Richies very helpful work.
+
+Version 7.0.1beta
+
+Daniel (21 May 2000)
+- Updated lots of #defines, enums and variable type names in the library. No
+ more weird URG or URLTAG prefixes. All types and names should be curl-
+ prefixed to avoid name space clashes. The FLAGS-parameter to the former
+ curl_urlget() has been converted into a bunch of flags to use in separate
+ setopt calls. I'm still focusing on the easy-interface, as the curl tool is
+ now using that.
+
+- Bjorn Reese has provided me with an asynchronous name resolver that I plan
+ to use in upcoming versions of curl to be able to gracefully timeout name
+ lookups.
+
+Version 7.0beta
+
+Daniel (18 May 2000)
+- Introduced LIBCURL_VERSION_NUM to the curl.h include file to better allow
+ source codes to be dependent on the lib version. This define is now set to
+ a dexadecimal number, with 8 bits each for major number, minor number and
+ patch number. In other words, version 1.2.3 would make it 0x010203. It also
+ makes a larger number a newer version.
+
+Daniel (17 May 2000)
+- Martin Kammerhofer correctly pointed out several flaws in the FTP range
+ option. I corrected them.
+- Removed the win32 winsock init crap from the lib to the src/main.c file
+ in the application instead. They can't be in the lib, especially not for
+ multithreaded purposes.
+
+Daniel (16 May 2000)
+- Rewrote the src/main.c source to use the new easy-interface to libcurl 7.
+ There is still more work to do, but the first step is now taken.
+ <curl/easy.h> is the include file to use.
+
+Daniel (14 May 2000)
+- FTP URLs are now treated slightly different, more according to RFC 1738.
+- FTP sessions are now performed differently, with CWD commands to change
+ directory instead of RETR/STOR/LIST with the full path. Discussions with
+ Rich Gray made me notice these problems.
+- Janne Johansson discovered and corrected a buffer overflow in the
+ src/usrglob.c file.
+- I had to add a lib/strequal.c file for doing case insensitive string
+ compares on all platforms.
+
+Daniel (8 May 2000):
+- Been working lots on the new lib.
+- Together with Rich Gray, I've tried to adjust the configure script to work
+ better on the NCR MP-RAS Unix.
+
+Daniel (2 May 2000):
+- Albert Chin-A-Young pointed out that I had a few too many instructions in
+ configure.in that didn't do any good.
+
+Daniel (24 April 2000):
+- Added a new paragraph to the FAQ about what to do when configure can't
+ find OpenSSL even though it is installed. Supplied by Bob Allison
+
+Daniel (12 April 2000):
+- Started messing around big-time to convert the old library interface to a
+ better one...
+
+Daniel (8 April 2000):
+- Made the progress bar look better for file sizes between 9999 kilobytes
+ and 100 megabytes. They're now displayed XX.XM.
+- I also noticed that ftp fetches through HTTP proxies didn't add the user
+ agent string. It does now.
+- Habibie <habibie at MailandNews.com> supplied a pretty good way to build RPMs
+ on a Linux machine. It still a) requires me to be root to do it, b) leaves
+ the rpm packages laying at some odd place on my disk c) doesn't work to
+ build the ssl version of curl since I didn't install openssl from an rpm
+ package so now the rpm crap thinks I don't have openssl and refuses to build
+ a package that depends on ssl... Did I mention I don't get along with RPM?
+- Once again I received a bug report about autoconf not setting -L prior to -l
+ on the command line when checking for libs. In this case it made the native
+ cc compiler on Solaris 7 to fail the OpenSSL check. This has previously been
+ reported to cause problems on HP-UX and is a known flaw in autoconf 2.13. It
+ is a pity there's no newer release around...
+
+Daniel (4 April 2000):
+- Marco G. Salvagno supplied me with two fixes that
+ appearantly makes the OS/2 port work better with multiple URLs.
+
+Daniel (2 April 2000):
+- Another Location: fix. This time, when curl connected to a port and then
+ followed a location with an absolute URL to another port, it misbehaved.
+
+Daniel (27 March 2000):
+- H. Daphne Luong pointed out that curl was wrongly
+ messing up the proxy string when fetching a document through a http proxy,
+ which screwed up multiple fetches such as in location: followings.
+
+Daniel (23 March 2000):
+- Marco G. Salvagno corrected my badly applied patch he
+ actually already told me about!
+
+- H. Daphne Luong brought me a fix that now makes curl
+ ignore select() errors in the download if errno is EINTR, which turns out to
+ happen every now and then when using libcurl multi-threaded...
+
+Daniel (22 March 2000):
+- Wham Bang supplied a couple of win32 fixes. HAVE_UNAME
+ was accidentally #defined in config-win32.h, which it shouldn't have been.
+ The HAVE_UNISTD_H is not defined when compiling with the Makefile.vc6
+ makefile for MS VC++.
+
+Daniel (21 March 2000):
+- I removed the AC_PROG_INSTALL macro from configure.in, since it appears that
+ one of the AM_* macros searches for a BSD compatible install already. Janne
+ Johansson made me aware of this.
+
+Version 6.5.2
+
+Daniel (21 March 2000):
+- Paul Harrington quickly pointed out to me that 6.5.1
+ crashes hard. I upload 6.5.2 now as quickly as possible! The problem was
+ the -D adjustments in src/main.c.
+
+Version 6.5.1
+
+Daniel (20 March 2000):
+- An anonymous post on sourceforge correctly pointed out a possible buffer
+ overflow in the curl_unescape() function for URL conversions. The main
+ problem with this bug is that the ftp download uses that function and this
+ single- byte overflow could lead to very odd bugs (as one reported by Janne
+ Johansson).
+
+Daniel (19 March 2000):
+- Marco G. Salvagno supplied me with a series of patches
+ that now allows curl to get compiled on OS/2. It even includes a section in
+ the INSTALL file. Very nice job!
+
+Daniel (17 March 2000):
+- Wham Bang supplied a patch for the lib/Makefile.vc6
+ file. We still need some fixes for the config-win32.h since it appears that
+ VC++ and mingw32 have different opinions about (at least) unistd.h's
+ existence.
+
+Daniel (15 March 2000):
+- I modified the -D/--dump-header workings so that it doesn't write anything
+ to the file until it needs to. This way, you can actually use -b and -D
+ on the same file if you want repeated invokes to store and read the cookies
+ in that one single file.
+
+- Poked around in lots of texts. Added the BUGS file for bug reporting stuff.
+ Added the classic HTTP POST question to the FAQ, removed some #ifdef WIN32
+ stuff from the sources (they're covered by the config-win32.h now).
+
+- Pascal Gaudette fixed a missing ldap.c problem in the
+ Makefile.vc6 file. He also addressed a problem in src/config-win32.h.
+
+Daniel (14 March 2000):
+- Paul Harrington pointed out that the 'http_code' variable in the -w output
+ was never written. I fixed it now.
+
+- Janne Johansson reported the complaints that OpenBSD does
+ when getdate.c #includes malloc.h. It claims stdlib.h should be included
+ instead. I added #ifdef HAVE_MALLOC_H code in getdate.y and two checks in
+ the configure.in for malloc.h and stdlib.h.
+
+Version 6.5
+
+Daniel (13 March 2000):
+- <curl at spam.wolvesbane.net> pointed out that the way curl sent cookies in a
+ single line wasn't enjoyed by IIS4.0 servers. In my view, that is not what
+ the standards say, but I added a white space between the name/value pairs to
+ perhaps make them work better.
+
+- Added the perl check back in the configure.in again since the mkhelp.pl
+ script needs it!
+
+- Made some beautifications in the curl man page.
+
+Daniel (3 March 2000):
+- Jörn helped me update the config-win32.h files with HAVE_SETVBUF and
+ HAVE_STRDUP.
+
+Daniel (3 March 2000):
+- Uploaded the 6.5pre2 package.
+
+Daniel (2 March 2000):
+- Removed the perl-programs from the distribution, they never made many people
+ happy and I'll still keep them available on the web.
+
+- Added the -w and -N stuff to the man page. Documented the new progress meter
+ display in README.curl.
+
+- Jörn Hartroth, Chris <cbayliss at csc.come> and Ulf
+ Möller from the openssl development team helped bringing me the details for
+ fixing an OpenSSL usage flaw. It became apparent when they released openssl
+ 0.9.5 since that barfed on curl's bad behavior (not seeding a random number
+ thing).
+
+- Yet another option: -N/--no-buffer disables buffering in the output stream.
+ Probably most useful for very slow transfers when you really want to get
+ every byte curl receives within some preferred time. Andrew <tmr at gci.net>
+ suggested this.
+
+- Damien Adant mailed me his fixes for making curl compile on Ultrix.
+
+Daniel (24 February 2000):
+- Applied Jörn Hartroth's fixes for config-win32.h and lib/Makefile.w32.
+
+ I should also make a note here, if nothing else to myself, that when using
+ the %-syntax for variables in DOS command prompts, you must use two %-
+ letters for each one since that is an escape letter there! Maybe I should
+ use another letter instead!
+
+- Added more variables to -w:
+
+ 'http_code'
+ 'time_namelookup'
+ 'time_connect'
+ 'time_pretransfer'
+ 'url_effective'
+
+- Made -w@filename read the syntax from a file and -w@- reads the syntax from
+ stdin in the good old "standard" curl way.
+
+Daniel (22 February 2000):
+- Released a 6.5pre1 version to get some test and user feedback.
+
+Daniel (21 February 2000):
+
+- I added the -w/--write-out flag and some variables to go with it. -w is a
+ single string, whatever you enter there will be written out when curl has
+ completed a successful request. There are some variable substitutions and
+ they are specified as '%{variable}' (without the quotes). Variables that
+ exist as of this moment are:
+
+ total_time - total transfer time in seconds (with 2 decimals)
+ size_download - total downloaded amount of bytes
+ size_upload - total uploaded amount of bytes
+ speed_download - the average speed of the entire download
+ speed_upload - the average speed of the entire upload
+
+ I will of course add more variables, but I need input on these and others.
+
+- It struck me that the -# progress bar will be hard to just apply on the new
+ progress bar concept. I need some feedback on this before that'll get re-
+ introduced! :-/
+
+Daniel (16 February 2000):
+- Jörn Hartroth brought me some fixes for the progress meter and I continued
+ working on it. It seems to work for http download, http post, ftp download
+ and ftp upload. It should be a pretty good test it works generally good.
+
+- Still need to add the -# progress bar into the new style progress interface.
+
+- Gonna have a go at my new output option parameter next.
+
+Daniel (15 February 2000):
+- The progress meter stuff is slowly taking place. There's more left before it
+ is working ok and everything is tested, but we're reaching there. Slowly!
+
+Daniel (11 February 2000):
+- Paul Marquis fixed the config file parsing of curl to
+ deal with any-length lines, removing the previous limit of 4K.
+
+- Eetu Ojanen's suggestion of supporting the @-style for -b
+ is implemented. Now -b@<filename> works as well as the old style. -b@- also
+ similarly reads the cookies from stdin.
+
+- Reminder: -D should not write to the file until it needs to, in the same way
+ -o does. That would enable curl to use -b and -D on the same file...
+
+- Ellis Pritchard made getdate.y work for MacOS X.
+
+- Paul Harrington helped me out finding the crash in the
+ cookie parser. He also pointed out curl's habit of sending empty cookies to
+ the server.
+
+Daniel (8 February 2000):
+ - Ron Zapp corrected a problem in src/urlglob.c that
+ prevented curl from getting compiled on sunos 4. The problem had to do
+ with the difference in sprintf() return code types.
+
+ - Transfer() should now be able to download and upload simultaneously. Let's
+ do some progress meter fixes later this week.
+
+Daniel (31 January 2000):
+ - Paul Harrington found another core dump in the cookie
+ parser. Curl doesn't properly recognize the 'version' keyword and I think
+ that is what caused this. I need to refresh some specs on cookies and see
+ what else curl lacks to improve this a bit more once and for all.
+
+ RFC 2109 clearly specifies how cookies should be dealt with when they are
+ compliant with that spec. I don't think many servers are though...
+
+ - Mark W. Eichin found that while curl is uploading a form
+ to a web site, it doesn't read incoming data why it'll hang after a while
+ since the socket "pipe" becomes full.
+
+ It took me two hours to rewrite Download() and Upload() into the new
+ single function Transfer(). It even seems to work! More testing is required
+ of course... I should get the header-sending together in a kind of queue
+ and let them get "uploaded" in Transfer() as well.
+
+ - Zhibiao Wu pointed out a curl bug in the location: area,
+ although I did not get a reproducible way to do this why I have to wait
+ with fixing anything.
+
+ - Bob Schader suggested I should implement resume
+ support for the HTTP PUT operation, and as I think it is a valid suggestion
+ I'll work on it.
+
+Daniel (25 January 2000):
+ - M Travis Obenhaus pointed out a manual mixup with -y and -Y that was
+ corrected.
+
+ - Jens Schleusener pointed out a problem to compile
+ curl on AIX 4.1.4 and gave me a solution. This problem was already fixed
+ by Jörn's recent #include modifications!
+
+Daniel (19 January 2000):
+ - Oskar Liljeblad pointed out and corrected a problem
+ in the Location: following system that made curl following a location: to a
+ different protocol to fail.
+
+ At January 31st I re-considered this fix and the surrounding source code. I
+ could not really see that the patch did any difference, why I removed it
+ again for further research and debugging. (It disabled location: following
+ on server not running on default ports.)
+
+ - Jörn Hartroth brought a fix that once again
+ made it possible to select progress bar.
+
+ - Jörn also fixed a few include problems.
+
+Version 6.4
+
+Daniel (17 January 2000):
+ - Based on suggestions from Björn Stenberg, I made the
+ progress deal better with larger files and added a "Time" field which shows
+ the time spent on the download so far.
+ - I'm now using the CVS repository on sourceforge.net, which also allows web
+ browsing. See http://curl.haxx.nu.
+
+Daniel (10 January 2000):
+ - Renumbered some enums in curl/curl.h since tag number 35 was used twice!
+ - Added "postquote" support to the ftp section that enables post-ftp-transfer
+ quote commands.
+ - Now made the -Q/--quote parameter recognize '-' as a prefix, which means
+ that command will be issued AFTER a successful ftp transfer. This can of
+ course be used to delete or rename a file after it has been uploaded or
+ downloaded. Use your imagination! ;-)
+ - Since I do the main development on solaris 2.6 now, I had to download and
+ install GNU groff to generate the hugehelp.c file. The solaris nroff cores
+ on the man page! So, in order to make the solaris configure script find a
+ better result I made gnroff get checked prior to the regular nroff.
+ - Added all the curl exit codes to the man page.
+ - Jim Gallagher properly tracked down a bug in autoconf
+ 2.13. The AC_CHECK_LIB() macro wrongfully uses the -l flag before the -L
+ flag to 'ld' which causes the HP-UX 10.20 flavour to fail on all libchecks
+ and therefore you can't make the configure script find the openssl libs!
+
+Daniel (28 December 1999):
+ - Tim Verhoeven correctly identified that curl
+ doesn't support URL formatted file names when getting ftp. Now, there's a
+ problem with getting very weird file names off FTP servers. RFC 959 defines
+ that the file name syntax to use should be the same as in the native OS of
+ the server. Since we don't know the peer server system we currently just
+ translate the URL syntax into plain letters. It is still better and with
+ the solaris 2.6-supplied ftp server it works with spaces in the file names.
+
+Daniel (27 December 1999):
+ - When curl parsed cookies straight off a remote site, it corrupted the input
+ data, which, if the downloaded headers were stored made very odd characters
+ in the saved data. Correctly identified and reported by Paul Harrington.
+
+Daniel (13 December 1999):
+ - General cleanups in the library interface. There had been some bad kludges
+ added during times of stress and I did my best to clean them off. It was
+ both regarding the lib API as well as include file confusions.
+
+Daniel (3 December 1999):
+ - A small --stderr bug was reported by Eetu Ojanen...
+
+ - who also brought the suggestion of extending the -X flag to ftp list as
+ well. So, now it is and the long option is now --request instead. It is
+ only for ftp list for now (and the former http stuff too of course).
+
+Lars J. Aas (24 November 1999):
+ - Patched curl to compile and build under BeOS. Doesn't work yet though!
+
+ - Corrected the Makefile.am files to allow putting object files in
+ different directories than the sources.
+
+Version 6.3.1
+
+Daniel (23 November 1999):
+ - I've had this major disk crash. My good old trust-worthy source disk died
+ along with the machine that hosted it. Thank goodness most of all the
+ things I've done are either backed up elsewhere or stored in this CVS
+ server!
+
+ - Michael S. Steuer pointed out a bug in the -F handling
+ that made curl hang if you posted an empty variable such as '-F name='. It
+ was one of those old bugs that never have worked properly...
+
+ - Jason Baietto pointed out a general flaw in the HTTP
+ download. Curl didn't complain if it was prematurely aborted before the
+ entire download was completed. It does now.
+
+Daniel (19 November 1999):
+ - Chris Maltby very accurately criticized the lack of
+ return code checks on the fwrite() calls. I did a thorough check for all
+ occurrences and corrected this.
+
+Daniel (17 November 1999):
+ - Paul Harrington pointed out that the -m/--max-time option
+ doesn't work for the slow system calls like gethostbyname()... I don't have
+ any good fix yet, just a slightly less bad one that makes curl exit hard
+ when the timeout is reached.
+
+ - Bjorn Reese helped me point out a possible problem that might be the reason
+ why Thomas Hurst experience problems in his Amiga version.
+
+ Daniel (12 November 1999):
+ - I found a crash in the new cookie file parser. It crashed when you gave
+ a plain http header file as input...
+
+Version 6.3
+
+ Daniel (10 November 1999):
+ - I kind of found out that the HTTP time-conditional GETs (-z) aren't always
+ respected by the web server and the document is therefore sent in whole
+ again, even though it doesn't match the requested condition. After reading
+ section 13.3.4 of RFC 2616, I think I'm doing the right thing now when I do
+ my own check as well. If curl thinks the condition isn't met, the transfer
+ is aborted prematurely (after all the headers have been received).
+
+ - After comments from Robert Linden I also rewrote some parts of the man page
+ to better describe how the -F works.
+
+ - Michael Anti put up a new curl download mirror in
+ China: http://www.pshowing.com/curl/
+
+ - I added the list of download mirrors to the README file
+
+ - I did add more explanations to the man page
+
+ Daniel (8 November 1999):
+ - I made the -b/--cookie option capable of reading netscape formatted cookie
+ files as well as normal http-header files. It should be able to
+ transparently figure out what kind of file it got as input.
+
+ Daniel (29 October 1999):
+ - Another one of Sebastiaan van Erk's ideas (that has been requested before
+ but I seem to have forgotten who it was), is to add support for ranges in
+ FTP downloads. As usual, one request is just a request, when they're two
+ it is a demand. I've added simple support for X-Y style fetches. X has to
+ be the lower number, though you may omit one of the numbers. Use the -r/
+ --range switch (previously HTTP-only).
+
+ - Sebastiaan van Erk suggested that curl should be
+ able to show the file size of a specified file. I think this is a splendid
+ idea and the -I flag is now working for FTP. It displays the file size in
+ this manner:
+ Content-Length: XXXX
+ As it resembles normal headers, and leaves us the opportunity to add more
+ info in that display if we can come up with more in the future! It also
+ makes sense since if you access ftp through a HTTP proxy, you'd get the
+ file size the same way.
+
+ I changed the order of the QUOTE command executions. They're now executed
+ just after the login and before any other command. I made this to enable
+ quote commands to run before the -I stuff is done too.
+
+ - I found out that -D/--dump-header and -V/--version weren't documented in
+ the man page.
+
+ - Many HTTP/1.1 servers do not support ranges. Don't ask me why. I did add
+ some text about this in the man page for the range option. The thread in
+ the mailing list that started this was initiated by Michael Anti.
+
+ - I get reports about nroff crashes on solaris 2.6+ when displaying the curl
+ man page. Switch to gnroff instead, it is reported to work(!). Adam Barclay
+ reported and brought the suggestion.
+
+ - In a dialogue with Johannes G. Kristinsson we came
+ up with the idea to let -H/--header specified headers replace the
+ internally generated headers, if you happened to select to add a header
+ that curl normally uses by itself. The advantage with this is not entirely
+ obvious, but in Johannes' case it means that he can use another Host: than
+ the one curl would set.
+
+ Daniel (27 October 1999):
+ - Jongki Suwandi brought a nice patch for (yet another) crash when following
+ a location:. This time you had to follow a https:// server's redirect to
+ get the core.
+
+Version 6.2
+
+ Daniel (21 October 1999):
+ - I think I managed to remove the suspicious (nil) that has been seen just
+ before the "Host:" in HTTP requests when -v was used.
+ - I found out that if you followed a location: when using a proxy, without
+ having specified http:// in the URL, the protocol part was added once again
+ when moving to the next URL! (The protocol part has to be added to the
+ URL when going through a proxy since it has no protocol-guessing system
+ such as curl has.)
+ - Benjamin Ritcey reported a core dump under solaris 2.6
+ with OpenSSL 0.9.4. It turned out this was due to a bad free() in main.c
+ that occurred after the download was done and completed.
+ - Benjamin found ftp downloads to show the first line of the download meter
+ to get written twice, and I removed that problem. It was introduced with
+ the multiple URL support.
+ - Dan Zitter correctly pointed out that curl 6.1 and earlier versions didn't
+ honor RFC 2616 chapter 4 section 2, "Message Headers": "...Field names are
+ case-insensitive..." HTTP header parsing assumed a certain casing. Dan
+ also provided me with a patch that corrected this, which I took the liberty
+ of editing slightly.
+ - Dan Zitter also provided a nice patch for config.guess to better recognize
+ the Mac OS X
+ - Dan also corrected a minor problem in the lib/Makefile that caused linking
+ to fail on OS X.
+
+ Daniel (19 October 1999):
+ - Len Marinaccio came up with some problems with curl. Since Windows has a
+ crippled shell, it can't redirect stderr and that causes trouble. I added
+ --stderr today which allows the user to redirect the stderr stream to a
+ file or stdout.
+
+ Daniel (18 October 1999):
+ - The configure script now understands the '--without-ssl' flag, which now
+ totally disable SSL/https support. Previously it wasn't possible to force
+ the configure script to leave SSL alone. The previous functionality has
+ been retained. Troy Engel helped test this new one.
+
+Version 6.1 (October 17 1999)
+
+ Daniel (17 October 1999):
+ - I ifdef'ed or commented all the zlib stuff in the sources and configure
+ script. It turned out we needed to mock more with zlib than I initially
+ thought, to make it capable of downloading compressed HTTP documents and
+ uncompress them on the fly. I didn't mean the zlib parts of curl to become
+ more than minor so this means I halt the zlib expedition for now and wait
+ until someone either writes the code or zlib gets updated and better
+ adjusted for this kind of usage. I won't get into details here, but a
+ short a summary is suitable:
+ - zlib can't automatically detect whether to use zlib or gzip
+ decompression methods.
+ - zlib is very neat for reading gzipped files from a file descriptor,
+ although not as nice for reading buffer-based data such as we would
+ want it.
+ - there are still some problems with the win32 version when reading from
+ a file descriptor if that is a socket
+
+ Daniel (14 October 1999):
+ - Moved the (external) include files for libcurl into a subdirectory named
+ curl and adjusted all #include lines to use <curl/XXXX> to maintain a
+ better name space and control of the headers. This has been requested.
+
+ Daniel (12 October 1999):
+ - I modified the 'maketgz' script to perform a 'make' too before a release
+ archive is put together in an attempt to make the time stamps better and
+ hopefully avoid the double configure-running that use to occur.
+
+ Daniel (11 October 1999):
+ - Applied Jörn's patches that fixes zlib for mingw32 compiles as well as
+ some other missing zlib #ifdef and more text on the multiple URL docs in
+ the man page.
+
+Version 6.1beta
+
+ Daniel (6 October 1999):
+ - Douglas E. Wegscheid sent me a patch that made the exact same thing as I
+ just made: the -d switch is now capable of reading post data from a named
+ file or stdin. Use it similarly to the -F. To read the post data from a
+ given file:
+
+ curl -d @path/to/filename www.postsite.com
+
+ or let curl read it out from stdin:
+
+ curl -d @- www.postit.com
+
+ Jörn Hartroth (3 October 1999):
+ - Brought some more patches for multiple URL functionality. The MIME
+ separation ideas are almost scrapped now, and a custom separator is being
+ used instead. This is still compile-time "flagged".
+
+ Daniel
+ - Updated curl.1 with multiple URL info.
+
+ Daniel (30 September 1999):
+ - Felix von Leitner brought openssl-check fixes for configure.in to work
+ out-of-the-box when the openssl files are installed in the system default
+ dirs.
+
+ Daniel (28 September 1999)
+ - Added libz functionality. This should enable decompressing gzip, compress
+ or deflate encoding HTTP documents. It also makes curl send an accept that
+ it accepts that kind of encoding. Compressed contents usually shortens
+ download time. I *need* someone to tell me a site that uses compressed HTTP
+ documents so that I can test this out properly.
+
+ - As a result of the adding of zlib awareness, I changed the version string
+ a little. I plan to add openldap version reporting in there too.
+
+ Daniel (17 September 1999)
+ - Made the -F option allow stdin when specifying files. By using '-' instead
+ of file name, the data will be read from stdin.
+
+Version 6.0 (September 14 1999)
+
+ Daniel (13 September 1999)
+ - Added -X/--http-request <request> to enable any HTTP command to be sent.
+ Do not that your server has to support the exact string you enter. This
+ should possibly a string like DELETE or TRACE.
+
+ - Applied Douglas' mingw32-fixes for the makefiles.
+
+ Daniel (10 September 1999)
+ - Douglas E. Wegscheid pointed out a problem. Curl didn't check the FTP
+ servers return code properly after the --quote commands were issued. It
+ took anything non 200 as an error, when all 2XX codes should be accepted as
+ OK.
+
+ - Sending cookies to the same site in multiple lines like curl used to do
+ turned out to be bad and breaking the cookie specs. Curl now sends all
+ cookies on a single Cookie: line. Curl is not yet RFC 2109 compliant, but I
+ doubt that many servers do use that syntax (yet).
+
+ Daniel (8 September 1999)
+ - Jörn helped me make sure it still compiles nicely with mingw32 under win32.
+
+ Daniel (7 September 1999)
+ - FTP upload through proxy is now turned into a HTTP PUT. Requested by
+ Stefan Kanthak.
+
+ - Added the ldap files to the .m32 makefile.
+
+ Daniel (3 September 1999)
+ - Made cookie matching work while using HTTP proxy.
+
+ Bjorn Reese (31 August 1999)
+ - Passed his ldap:// patch. Note that this requires the openldap shared
+ library to be installed and that LD_LIBRARY_PATH points to the
+ directory where the lib will be found when curl is run with a
+ ldap:// URL.
+
+ Jörn Hartroth (31 August 1999)
+ - Made the Mingw32 makefiles into single files.
+ - Made file:// work for Win32. The same code is now used for unix as well for
+ performance reasons.
+
+ Douglas E. Wegscheid (30 August 1999)
+ - Patched the Mingw32 makefiles for SSL builds.
+
+ Matthew Clarke (30 August 1999)
+ - Made a cool patch for configure.in to allow --with-ssl to specify the
+ root dir of the openssl installation, as in
+
+ ./configure --with-ssl=/usr/ssl_here
+
+ - Corrected the 'reconf' script to work better with some shells.
+
+ Jörn Hartroth (26 August 1999)
+ - Fixed the Mingw32 makefiles in lib/ and corrected the file.c for win32
+ compiles.
+
+Version 5.11
+
+ Daniel (25 August 1999)
+ - John Weismiller pointed out a bug in the header-line
+ realloc() system in download.c.
+
+ - I added lib/file.[ch] to offer a first, simple, file:// support. It
+ probably won't do much good on win32 system at this point, but I see it
+ as a start.
+
+ - Made the release archives get a Makefile in the root dir, which can be
+ used to start the compiling/building process easier. I haven't really
+ changed any INSTALL text yet, I wanted to get some feed-back on this
+ first.
+
+ Daniel (17 August 1999)
+ - Another Location: bug. Curl didn't do proper relative locations if the
+ original URL had cgi-parameters that contained a slash. Nusu's page
+ again.
+
+ - Corrected the NO_PROXY usage. It is a list of substrings that if one of
+ them matches the tail of the host name it should connect to, curl should
+ not use a proxy to connect there. Pointed out to me by Douglas
+ E. Wegscheid. I also changed the README text a little regarding this.
+
+ Daniel (16 August 1999)
+ - Fixed a memory bug with http-servers that sent Location: to a Location:
+ page. Nusu's page showed this too.
+
+ - Made cookies work a lot better. Setting the same cookie name several times
+ used to add more cookies instead of replacing the former one which it
+ should've. Nusu <nus at intergorj.ro> brought me an URL that made this
+ painfully visible...
+
+ Troy (15 August 1999)
+ - Brought new .spec files as well as a patch for configure.in that lets the
+ configure script find the openssl files better, even when the include
+ files are in /usr/include/openssl
+
+Version 5.10
+
+ Daniel (13 August 1999)
+ - SSL_CTX_set_default_passwd_cb() has been modified in the 0.9.4 version of
+ OpenSSL. Now why couldn't they simply add a *new* function instead of
+ modifying the parameters of an already existing function? This way, we get
+ a compiler warning if compiling with 0.9.4 but not with earlier. So, I had
+ to come up with a #if construction that deals with this...
+
+ - Made curl output the SSL version number get displayed properly with 0.9.4.
+
+ Troy (12 August 1999)
+ - Added MingW32 (GCC-2.95) support under Win32. The INSTALL file was also
+ a bit rearranged.
+
+ Daniel (12 August 1999)
+ - I had to copy a good <arpa/telnet.h> include file into the curl source
+ tree to enable the silly win32 systems to compile. The distribution rights
+ allows us to do that as long as the file remains unmodified.
+
+ - I corrected a few minor things that made the compiler complain when
+ -Wall -pedantic was used.
+
+ - I'm moving the official curl web page to http://curl.haxx.nu. I think it
+ will make it easier to remember as it is a lot shorter and less cryptic.
+ The old one still works and shows the same info.
+
+ Daniel (11 August 1999)
+ - Albert Chin-A-Young mailed me another correction for NROFF in the
+ configure.in that is supposed to be better for IRIX users.
+
+ Daniel (10 August 1999)
+ - Albert Chin-A-Young helped me with some stupid Makefile things, as well as
+ some fiddling with the getdate.c stuff that he had problems with under
+ HP-UX v10. getdate.y will now be compiled into getdate.c if the appropriate
+ yacc or bison is found by the configure script. Since this is slightly new,
+ we need to test the output getdate.c with win32 systems to make sure it
+ still compiles there.
+
+ Daniel (5 August 1999)
+ - I've just setup a new mailing list with the intention to keep discussions
+ around libcurl development in it. I mainly expect it to be for thoughts and
+ brainstorming around a "next generation" library, rather than nitpicking
+ about the current implementation or details in the current libcurl.
+
+ To join our happy bunch of future-looking geeks, enter 'subscribe
+ <address>' in the body of a mail and send it to
+ libcurl-request@listserv.fts.frontec.se. Curl bug reports, the usual curl
+ talk and everything else should still be kept in this mailing list. I've
+ started to archive this mailing list and have put the libcurl web page at
+ www.fts.frontec.se/~dast/libcurl/.
+
+ - Stefan Kanthak contacted me regarding a few problems in the configure
+ script which he discovered when trying to make curl compile and build under
+ Siemens SINIX-Z V5.42B2004!
+
+ - Marcus Klein very accurately informed me that src/version.h was not present
+ in the CVS repository. Oh, how silly...
+
+ - Linus Nielsen rewrote the telnet:// part and now curl offers limited telnet
+ support. If you run curl like 'curl telnet://host' you'll get all output on
+ the screen and curl will read input from stdin. You'll be able to login and
+ run commands etc, but since the output is buffered, expect to get a little
+ weird output.
+
+ This is still in its infancy and it might get changed. We need your
+ feed-back and input in how this is best done.
+
+ WIN32 NOTE: I bet we'll get problems when trying to compile the current
+ lib/telnet.c on win32, but I think we can sort them out in time.
+
+ - David Sanderson reported that FORCE_ALLOCA_H or HAVE_ALLOCA_H must be
+ defined for getdate.c to compile properly on HP-UX 11.0. I updated the
+ configure script to check for alloca.h which should make it.
+
+ Daniel (4 August 1999)
+ - I finally got to understand Marcus Klein's ftp download resume problem,
+ which turns out to be due to different outputs from different ftp
+ servers. It makes ftp download resuming a little trickier, but I've made
+ some modifications I really believe will work for most ftp servers and I do
+ hope you report if you have problems with this!
+
+ - Added text about file transfer resuming to README.curl.
+
+ Daniel (2 August 1999)
+ - Applied a progress-bar patch from Lars J. Aas. It offers
+ a new styled progress bar enabled with -#/--progress-bar.
+
+ T. Yamada <tai at imasy.or.jp> (30 July 1999)
+ - It breaks with segfault when 1) curl is using .netrc to obtain
+ username/password (option '-n'), and 2) is automatically redirected to
+ another location (option '-L').
+
+ There is a small bug in lib/url.c (block starting from line 641), which
+ tries to take out username/password from user- supplied command-line
+ argument ('-u' option). This block is never executed on first attempt since
+ CONF_USERPWD bit isn't set at first, but curl later turns it on when it
+ checks for CONF_NETRC bit. So when curl tries to redo everything due to
+ redirection, it segfaults trying to access *data->userpwd.
+
+Version 5.9.1
+
+ Daniel (30 July 1999)
+ - Steve Walch pointed out that there is a memory leak in the formdata
+ functions. I added a FormFree() function that is now used and supposed to
+ correct this flaw.
+
+ - Mark Wotton reported:
+ 'curl -L https://www.cwa.com.au/' core dumps. I managed to cure this by
+ correcting the cleanup procedure. The bug seems to be gone with my OpenSSL
+ 0.9.2b, although still occurs when I run the ~100 years old SSLeay 0.8.0. I
+ don't know whether it is curl or SSLeay that is to blame for that.
+
+ - Marcus Klein:
+ Reported an FTP upload resume bug that I really can't repeat nor understand.
+ I leave it here so that it won't be forgotten.
+
+ Daniel (29 July 1999)
+ - Costya Shulyupin suggested support for longer URLs when following Location:
+ and I could only agree and fix it!
+
+ - Leigh Purdie found a problem in the upload/POST department. It turned out
+ that http.c accidentaly cleared the pointer instead of the byte counter
+ when supposed to.
+
+ - Costya Shulyupin pointed out a problem with port numbers and Location:. If
+ you had a server at a non-standard port that redirected to an URL using a
+ standard port number, curl still used that first port number.
+
+ - Ralph Beckmann pointed out a problem when using both CONF_FOLLOWLOCATION
+ and CONF_FAILONERROR simultaneously. Since the CONF_FAILONERROR exits on
+ the 302-code that the follow location header outputs it will never show any
+ html on location: pages. I have now made it look for >=400 codes if
+ CONF_FOLLOWLOCATION is set.
+
+ - 'struct slist' is now renamed to 'struct curl_slist' (as suggested by Ralph
+ Beckmann).
+
+ - Joshua Swink and Rick Welykochy were the first to point out to me that the
+ latest OpenSSL package now have moved the standard include path. It is now
+ in /usr/local/ssl/include/openssl and I have now modified the --enable-ssl
+ option for the configure script to use that as the primary path, and I
+ leave the former path too to work with older packages of OpenSSL too.
+
+ Daniel (9 June 1999)
+ - I finally understood the IRIX problem and now it seem to compile on it!
+ I am gonna remove those #define strcasecmp() things once and for all now.
+
+ Daniel (4 June 1999)
+ - I adjusted the FTP reply 227 parser to make the PASV command work better
+ with more ftp servers. Appearantly the Roxen Challanger server replied
+ something curl 5.9 could deal with! :-( Reported by Ashley Reid-Montanaro
+ and Mark Butler brought a solution for it.
+
+ Daniel (26 May 1999)
+ - Rearranged. README is new, the old one is now README.curl and I added a
+ README.libcurl with text I got from Ralph Beckmann.
+
+ - I also updated the INSTALL text.
+
+ Daniel (25 May 1999)
+ - David Jonathan Lowsky correctly pointed out that curl didn't properly deal
+ with form posting where the variable shouldn't have any content, as in curl
+ -F "form=" www.site.com. It was now fixed.
+
+Version 5.9 (May 22 1999)
+
+ Daniel (22 May 1999)
+ - I've got a bug report from Aaron Scarisbrick in which he states he has some
+ problems with -L under FreeBSD 3.0. I have previously got another bug
+ report from Stefan Grether which points at an error with similar sympthoms
+ when using win32. I made the allocation of the new url string a bit faster
+ and different, don't know if it actually improves anything though...
+
+ Daniel (20 May 1999)
+ - Made the cookie parser deal with CRLF newlines too.
+
+ Daniel (19 May 1999)
+ - Download() didn't properly deal with failing return codes from the sread()
+ function. Adam Coyne found the problem in the win32 version, and Troy Engel
+ helped me out isolating it.
+
+ Daniel (16 May 1999)
+ - Richard Adams pointed out a bug I introduced in 5.8. --dump-header doesn't
+ work anymore! :-/ I fixed it now.
+
+ - After a suggestion by Joshua Swink I added -S / --show-error to force curl
+ to display the error message in case of an error, even if -s/--silent was
+ used.
+
+ Daniel (10 May 1999)
+ - I moved the stuff concerning HTTP, DICT and TELNET it their own source
+ files now. It is a beginning on my clean-up of the sources to make them
+ layer all those protocols better to enable more to be added easier in the
+ future!
+
+ - Leon Breedt sent me some files I've not put into the main curl
+ archive. They're for creating the Debian package thingie. He also sent me a
+ debian package that I've made available for download at the web page
+
+ Daniel (9 May 1999)
+ - Made it compile on cygwin too.
+
+ Troy Engel (7 May 1999)
+ - Brought a series of patches to allow curl to compile smoothly on MSVC++ 6
+ again!
+
+ Daniel (6 May 1999)
+ - I changed the #ifdef HAVE_STRFTIME placement for the -z code so that it
+ will be easier to discover systems that don't have that function and thus
+ can't use -z successfully. Made the strftime() get used if WIN32 is defined
+ too.
+
+Version 5.8
+
+ Daniel (5 May 1999)
+ - I've had it with this autoconf/automake mess. It seems to work allright
+ for most people who don't have automake installed, but for those who have
+ there are problems all over.
+
+ I've got like five different bug reports on this only the last
+ week... Claudio Neves and Federico Bianchi and root <duggerj001 at
+ hawaii.rr.com> are some of them reporting this.
+
+ Currently, I have no really good fix since I want to use automake myself to
+ generate the Makefile.in files. I've found out that the @SHELL@-problems
+ can often be fixed by manually invoking 'automake' in the archive root
+ before you run ./configure... I've hacked my maketgz script now to fiddle
+ a bit with this and my tests seem to work better than before at least!
+
+ Daniel (4 May 1999)
+ - mkhelp.pl has been doing badly lately. I corrected a case problem in
+ the regexes.
+
+ - I've now remade the -o option to not touch the file unless it needs to.
+ I had to do this to make -z option really fine, since now you can make a
+ curl fetch and use a local copy's time when downloading to that file, as
+ in:
+
+ curl -z dump -o dump remote.site.com/file.html
+
+ This will only get the file if the remote one is newer than the local.
+ I'm aware that this alters previous behaviour a little. Some scripts out
+ there may depend on that the file is always touched...
+
+ - Corrected a bug in the SSLv2/v3 selection.
+
+ - Felix von Leitner requested that curl should be able to send
+ "If-Modified-Since" headers, which indeed is a fair idea. I implemented it
+ right away! Try -z <expression> where expression is a full GNU date
+ expression or a file name to get the date from!
+
+ Stephan Lagerholm (30 Apr 1999)
+ - Pointed out a problem with the src/Makefile for FreeBSD. The RM variable
+ isn't set and causes the make to fail.
+
+ Daniel (26 April 1999)
+ - Am I silly or what? Irving Wolfe pointed out to me that the curl version
+ number was not set properly. Hasn't been since 5.6. This was due to a bug
+ in my maketgz script!
+
+ David Eriksson (25 Apr 1999)
+ - Found a bug in cookies.c that made it crash at times.
+
+Version 5.7.1
+
+ Doug Kaufman (23 Apr 1999)
+ - Brought two sunos 4 fixes. One of them being the hostip.c fix mentioned
+ below and the other one a correction in include/stdcheaders.h
+
+ - Added a paragraph about compiling with the US-version of openssl to the
+ INSTALL file.
+
+ Daniel
+ - New mailing list address. Info updated on the web page as well as in the
+ README file
+
+ Greg Onufer (20 Apr 1999)
+ - hostip.c didn't compile properly on SunOS 5.5.1.
+ It needs an #include <sys/types.h>
+
+Version 5.7
+
+ Daniel (Apr 20 1999)
+ - Decided to upload a non-beta version right now!
+
+ - Made curl support any-length HTTP headers. The destination buffer is now
+ simply enlarged every time it turns out to be too small!
+
+ - Added the FAQ file to the archive. Still a bit smallish, but it is a
+ start.
+
+ Eric Thelin (15 Apr 1999)
+ - Made -D accept '-' instead of filename to write to stdout.
+
+Version 5.6.3beta
+
+ Daniel (Apr 12 1999)
+
+ - Changed two #ifdef WIN32 to better #ifdef <errorcode> when connect()ing
+ in url.c and ftp.c. Makes cygwin32 deal with them better too. We should
+ try to get some decent win32-replacement there. Anyone?
+
+ - The old -3/--crlf option is now ONLY --crlf!
+
+ - I changed the "SSL fix" to a more lame one, but that doesn't remove as
+ much functionality. Now I've enabled the lib to select what SSL version it
+ should try first. Appearantly some older SSL-servers don't like when you
+ talk v3 with them so you need to be able to force curl to talk v2 from the
+ start. The fix dated April 6 and posted on the mailing list forced curl to
+ use v2 at all times using a modern OpenSSL version, but we don't really
+ want such a crippled solution.
+
+ - Marc Boucher sent me a patch that corrected a math error for the
+ "Curr.Speed" progress meter.
+
+ - Eric Thelin sent me a patch that enables '-K -' to read a config file from
+ stdin.
+
+ - I found out we didn't close the file properly before so I added it!
+
+ Daniel (Apr 9 1999)
+ - Yu Xin pointed out a problem with ftp download resume. It didn't work at
+ all! ;-O
+
+ Daniel (Apr 6 1999)
+ - Corrected the version string part generated for the SSL version.
+
+ - I found a way to make some other SSL page work with openssl 0.9.1+ that
+ previously didn't (ssleay 0.8.0 works with it though!). Trying to get
+ some real info from the OpenSSL guys to see how I should do to behave the
+ best way. SSLeay 0.8.0 shouldn't be that much in use anyway these days!
+
+Version 5.6.2beta
+
+ Daniel (Apr 4 1999)
+ - Finally have curl more cookie "aware". Now read carefully. This is how
+ it works.
+ To make curl read cookies from an already existing file, in plain header-
+ format (like from the headers of a previous fetch) invoke curl with the
+ -b flag like:
+
+ curl -b file http://site/foo.html
+
+ Curl will then use all cookies it finds matching. The old style that sets
+ a single cookie with -b is still supported and is used if the string
+ following -b includes a '=' letter, as in "-b name=daniel".
+
+ To make curl read the cookies sent in combination with a location: (which
+ sites often do) point curl to read a non-existing file at first (i.e
+ to start with no existing cookies), like:
+
+ curl -b nowhere http://site/setcookieandrelocate.html
+
+ - Added a paragraph in the TODO file about the SSL problems recently
+ reported. Evidently, some kind of SSL-problem curl may need to address.
+
+ - Better "Location:" following.
+
+ Douglas E. Wegscheid (Tue, 30 Mar 1999)
+ - A subsecond display patch.
+
+ Daniel (Mar 14 1999)
+ - I've separated the version number of libcurl and curl now. To make
+ things a little easier, I decided to start the curl numbering from
+ 5.6 and the former version number known as "curl" is now the one
+ set for libcurl.
+
+ - Removed the 'enable-no-pass' from configure, I doubt anyone wanted
+ that.
+
+ - Made lots of tiny adjustments to compile smoothly with cygwin under
+ win32. It's a killer for porting this to win32, bye bye VC++! ;-)
+ Compiles and builds out-of-the-box now. See the new wordings in
+ INSTALL for details.
+
+ - Beginning experiments with downloading multiple document from a http
+ server while remaining connected.
+
+Version 5.6beta
+
+ Daniel (Mar 13 1999)
+ - Since I've changed so much, I thought I'd just go ahead and implement the
+ suggestion from Douglas E. Wegscheid. -D or --dump-header is now storing
+ HTTP headers separately in the specified file.
+
+ - Added new text to INSTALL on what to do to build this on win32 now.
+
+ - Aaargh. I had to take a step back and prefix the shared #include files
+ in the sources with "../include/" to please VC++...
+
+ Daniel (Mar 12 1999)
+ - Split the url.c source into many tiny sources for better readability
+ and smaller size.
+
+ Daniel (Mar 11 1999)
+ - Started to change stuff for a move to make libcurl and a more separate
+ curl application that uses the libcurl. Made the libcurl sources into
+ the new lib directory while the curl application will remain in src as
+ before. New makefiles, adjusted configure script and so.
+
+ libcurl.a built quickly and easily. I better make a better interface to
+ the lib functions though.
+
+ The new root dir include/ is supposed to contain the public information
+ about the new libcurl. It is a little ugly so far :-)
+
+
+ Daniel (Mar 1 1999)
+ - Todd Kaufmann sent me a good link to Netscape's cookie spec as well as the
+ info that RFC 2109 specifies how to use them. The link is now in the
+ README and the RFC in the RESOURCES.
+
+ Daniel (Feb 23 1999)
+ - Finally made configure accept --with-ssl to look for SSL libs and includes
+ in the "standard" place /usr/local/ssl...
+
+ Daniel (Feb 22 1999)
+ - Verified that curl linked fine with OpenSSL 0.9.1c which seems to be
+ the most recent.
+
+ Henri Gomez (Fri Feb 5 1999)
+ - Sent in an updated curl-ssl.spec. I still miss the script that builds an
+ RPM automatically...
+
+Version 5.5.1
+
+ Mark Butler (27 Jan 1999)
+ - Corrected problems in Download().
+
+ Danitel Stenberg (25 Jan 1999)
+ - Jeremie Petit pointed out a few flaws in the source that prevented it from
+ compile warning free with the native compiler under Digital Unix v4.0d.
+
+Version 5.5
+
+ Daniel Stenberg (15 Jan 1999)
+ - Added Bjorns small text to the README about the DICT protocol.
+
+ Daniel Stenberg (11 Jan 1999)
+ - <jswink at softcom.net> reported about the win32-versioin: "Doesn't use
+ ALL_PROXY environment variable". Turned out to be because of the static-
+ buffer nature of the win32 environment variable calls!
+
+ Bjorn Reese (10 Jan 1999)
+ - I have attached a simple addition for the DICT protocol (RFC 2229).
+ It performs dictionary lookups. The output still needs to be better
+ formatted.
+
+ To test it try (the exact format, and more examples are described in
+ the RFC)
+
+ dict://dict.org/m:hello
+ dict://dict.org/m:hello::soundex
+
+
+ Vicente Garcia (10 Jan 1999)
+ - Corrected the progress meter for files larger than 20MB.
+
+ Daniel Stenberg (7 Jan 1999)
+ - Corrected the -t and -T help texts. They claimed to be FTP only.
+
+Version 5.4
+
+ Daniel Stenberg
+ (7 Jan 1999)
+ - Irving Wolfe reported that curl -s didn't always supress the progress
+ reporting. It was the form post that autoamtically always switched it on
+ again. This is now corrected!
+
+ (4 Jan 1999)
+ - Andreas Kostyrka suggested I'd add PUT and he helped me out to test it. If
+ you use -t or -T now on a http or https server, PUT will be used for file
+ upload.
+
+ I removed the former use of -T with HTTP. I doubt anyone ever really used
+ that.
+
+ (4 Jan 1999)
+ - Erik Jacobsen found a width bug in the mprintf() function. I corrected it
+ now.
+
+ (4 Jan 1999)
+ - As John V. Chow pointed out to me, curl accepted very limited URL sizes. It
+ should now accept path parts that are up to at least 4096 bytes.
+
+ - Somehow I screwed up when applying the AIX fix from Gilbert Ramirez, so
+ I redid that now.
+
+Version 5.3a (win32 only)
+
+ Troy Engel
+ - Corrected a win32 bug in the environment variable part.
+
+Version 5.3
+
+ Gilbert Ramirez Jr. (21 Dec 1998)
+ - I have implemented the "quote" function of FTP clients. It allows you to
+ send arbitrary commands to the remote FTP server. I chose the -Q/--quote
+ command-line arguments.
+
+ You can have more than one quoted string, and curl will apply them in
+ order. This is what I use for my MVS upload:
+
+ curl -B --crlf -Q "site lrecl=80" -Q "site blk=8000" -T file ftp://os390/test
+
+ Curl will send the two quoted "site" commands in the proper order.
+
+ - Made it compile smoothly on AIX.
+
+ Gilbert Ramirez Jr. (18 Dec 1998)
+ - Brought an MVS patch: -3/--mvs, for ftp upload to the MVS ftp server.
+
+ Troy Engel (17 Dec 1998)
+ - Brought a correction that fixes the win32 curl bug.
+
+ Daniel Stenberg
+ - A bug, pointed out to me by Dr H. T. Leung, caused curl to crash on the -A
+ flag on certain systems. Actually, all systems should've!
+
+ - Added a few defines to make directories/file names get build nicer (with _
+ instead of . and \ instead of / in win32).
+
+ - steve <fisk at polar.bowdoin.edu> reported a weird bug that occured if the
+ ftp server response line had a parenthesis on the line before the (size)
+ info. I hope it works better now!
+
+Version 5.2.1
+
+ Steven G. Johnson (Dec 14, 1998)
+ - Brought a fix that corrected a crash in 5.2 due to bad treatment of the
+ environment variables.
+
+Version 5.2
+
+ Daniel Stenberg (Dec 14, 1998)
+ - Rewrote the mkhelp script and now, the mkhelp.pl script generates the
+ hugehelp.c file from the README *and* the man page file curl.1. By using
+ both files, I no longer need to have double information in both the man
+ page and the README as well. So, win32-users will only have the hugehelp.c
+ file for all info, but then, they download the plain binary most times
+ anyway.
+
+ - gcc2.8.1 with the -Wall flag complaints a lot on subscript has type `char'
+ if I don't explicitly typecast the argument to isdigit() or isspace() to
+ int. So I did to compile warning free with that too.
+
+ - Added checks for 'long double' and 'long long' in the configure script. I
+ need those for the mprintf.c source to compile well on non long long
+ comforming systems!
+
+Version 5.1 (not publicly released)
+
+ Daniel Stenberg (Dec 10, 1998)
+ - I got a request for a pre-compiled NT Alpha version. Anyone?
+
+ - Added Lynx/CERN www lib proxy environment variable support. That means curl
+ now reads and understands the following environment variables:
+
+ HTTP_PROXY, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY
+
+ They should be set for protocol-specific proxies. General proxy should be
+ set with
+
+ ALL_PROXY
+
+ And a comma-separated list of host names that shouldn't go through any
+ proxy is set in (only an asterisk, '*' matches all hosts).
+
+ NO_PROXY
+
+ The usage of the -x/--proxy flag overrides the environment variables.
+
+ - Proxy can now be specified with a procotol:// prefix.
+
+ - Wrote the curl.1 man page.
+
+ - Introduced a whole new dynamic buffer system for all sprintf()s. It is
+ based on the *printf() package by yours truly and Bjorn Reese. Hopefully,
+ there aren't that many buffer overflow risks left now.
+
+ - Ah, I should mention I've compiled and built curl successfully under
+ solaris 2.6 with gcc now, gcc 2.7.2 won't work but 2.8.1 did ok.
+
+ Oren Tirosh (Dec 3, 1998)
+ - Brought two .spec files, to use when creating (Linux) Redhat style RPM
+ packages. They're named curl.spec and curl-ssl.spec.
+
+ Troy Engel
+ - Supplied the src/Makefile.vc6 for easy compiling with VC++ under Win32.
+
+Version 5.0
+
+ Daniel Stenberg (Dec 1, 1998)
+ - Not a single bug report in ages.
+ - Corrected getpass.c and main.c to compile warning and error free with the
+ Win32 VC++ crap.
+
+Version 5.0 beta 24
+
+ Daniel Stenberg (Nov 20, 1998)
+
+ HOW TO BUILD A RELEASE ARCHIVE:
+
+ * Pre-requisite software:
+ What To build what Reads data from
+ ==== ============= ===============
+ GNU automake Makefile.in, aclocal.m4 configure.in
+ GNU make(1) - " -
+ GNU gcc(1) - " -
+ GNU autoconf configure configure.in
+ GNU autoheader(2) config.h.in configure.in, acconfig.h
+
+ * Make sure all files that should be part of the archive are put in FILES.
+
+ * Run './maketgz' and enter version number of the new to become archive.
+
+ maketgz does:
+
+ - Enters the newly created version number in url.h.
+ - (If you don't have automake, this script will warn about that, but unless
+ you have changed the Makefile.am files, that is nothing to care about.)
+ If you have it, it'll run it.
+ - If you have autoconf, the configure.in will be edited to get the newly
+ created version number and autoconf will be run.
+ - Creates a new directory named curl-<version>. (Actually, it uses the base
+ name of the current directory up to the first '-'.)
+ - Copies all files mentioned in FILES to the new directory. Saving
+ permissions and directory structure.
+ - Uses tar to create an archive of it all, named curl-<version>.tar.gz
+ - gzips the archive
+ - Removes the new directory and all its contents.
+
+ * When done, you have an archive stored in your directory named
+ curl-<version>.tar.gz.
+
+ Done!
+
+ (1) They're required to make automake run properly.
+ (2) It is distributed as a part of the GNU autoconf archive.
+
+ Daniel Stenberg (Nov 18, 1998)
+ - I changed the TAG-system. If you ever used urlget() from this package in
+ another product, you need to recompile with the new headers. I did this
+ new stuff to better deal with different compilers and system with different
+ variable sizes. I think it makes it a little more portable. This proves
+ to compile warning free with the problematic IRIX compiler!
+ - Win32 compiled with a silly error. Corrected now.
+ - Brian Chaplin reported yet another problem in
+ multiline FTP responses. I've tried to correct it. I mailed him a new
+ version and I hope he gets back soon with positive feedback!
+ - Improved the 'maketgz' to create a temporary directory tree which it makes
+ an archive from instead of the previous renaming of the current one.
+ - Mailing list opened (see README).
+ - Made -v more verbose on the PASV section of ftp transfers. Now it tells
+ host name and IP of the new host (and port number). I also added a section
+ about PORT vs PASV in the README.
+
+Version 5.0 beta 21
+
+ Angus Mackay (Nov 15, 1998)
+ - Introduced automake stuff.
+
+ Daniel Stenberg (Nov 13, 1998)
+ - Just made a successful GET of a document from an SSL-server using my own
+ private certificate for authentication! The certificate has to be in PEM
+ format. You do that the easiest way (although not *that* easy) by
+ downloading the SSLyeay PKCS#12-patch by Dr Stephen N. Henson from his site
+ at: http://www.drh-consultancy.demon.co.uk/. Using his tool, you can
+ convert any modern Netscape or (even) MSIE certificate to PEM-format. Use
+ it with 'curl -E <certificate:password> https://site.com'. If this isn't a
+ cool feature, then I don't know what cool features look like! ;-)
+ - Working slowly on telnet connections. #define TRY_TELNET to try it out.
+ (curl -u user:passwd "telnet://host.com/cat .login" is one example) I do
+ have problem to define how it should work. The prime purpose for this must
+ be to get (8bit clean) files via telnet, and it really isn't that easy to
+ get files this way. Still having problems with \n being converted to \r\n.
+
+ Angus Mackay (Nov 12, 1998)
+ - Corrected another bug in the long parameter name parser.
+ - Modified getpass.c (NOTE: see the special licensing in the top of that
+ source file).
+
+ Daniel Stenberg (Nov 12, 1998)
+ - We may have removed the silly warnings from url.c when compiled under IRIX.
+ Thanks again to Bjorn Reese and Martin Staael.
+ - Wrote formfind.pl which is a new perl script intended to help you find out
+ how a FORM submission should be done. This needs a little more work to get
+ really good.
+
+ Daniel Stenberg (Nov 11, 1998)
+ - Made the HTTP header-checker accept white spaces before the HTTP/1.? line.
+ Appearantly some proxies/sites add such at times (my test proxy did when I
+ downloaded a gopher page with it)!
+ - Moved the former -h to -M and made -h show the short help text instead. I
+ had to enable a forced help text option. Now an even shorter help text will
+ be presented when an unknown option and similar, is used.
+ - stdcheaders.h didn't work with IRIX 6.4 native cc compiler. I hope my
+ changes don't make other versions go nuts instead.
+
+ Daniel Stenberg (Nov 10, 1998)
+ - Added a weird check in the configure script to check for the silly AIX
+ warnings about my #define strcasecmp() stuff. I do that define to prevent
+ me and other contributors to accidentaly use that function name instead
+ of strequal()...
+ - I bugfixed Angus's getpass.c very little.
+ - Fixed the verbose flag names to getopt-style, i.e 'curl --loc' will be
+ sufficient instead of --location as "loc" is a unique prefix. Also, anything
+ after a '--' is treated as an URL. So if you do have a host with a weeeird
+ name you can do 'curl -- -host.com'.
+ - Another getopt-adjust; curl now accepts flags after the URL on the command
+ line. 'curl www.foo.com -O' is perfectly valid.
+ - Corrected the .curlrc parser so that strtok() is no longer used and I
+ believe it works better. Even URLs can be specified in it now.
+
+ Angus Mackay (Nov 9, 1998)
+ - Replaced getpass.c with a newly written one, not under GPL license
+ - Changed OS to a #define in config.h instead of compiler flag
+ - Makefile now uses -DHAVE_CONFIG_H
+
+ Daniel Stenberg (Nov 9, 1998)
+ - Ok, I expanded the tgz-target to update the version string on each occation
+ I build a release archive!
+ - I reacted on Angus Mackay's initiative and remade the parameter parser to
+ be more getopt compliant. Curl now supports "merged" flags as in
+ curl -lsv ftp.site.com
+ Do note that I had to move three short-names of the options. Parameters
+ that needs an additional string such as -x must be stand-alone or the
+ last in a merged sequence:
+ curl -lsx my-proxy ftp.site.com
+ is ok, but using the flags in a different order like '-lxs' would cause
+ unexpected results (as the 's' option would be skipped).
+ - I've changed the headers in all files that are subject to the MozPL
+ license, as they are supposed to look like when conforming.
+ - Made the configure script make the config.h. The former config.h is now
+ setup.h.
+ - The RESOURCES and TODO files have been added to the archive.
+
+ Angus Mackay (Nov 5, 1998)
+ - Fixed getpass.c and various configure stuff
+
+ Daniel Stenberg (Nov 3, 1998)
+ - Use -H/--header for custom HTTP-headers. Lets you pass on your own
+ specified headers to the remote server. I wouldn't recommend trying to use
+ a header with a defined usage according to standards. Use this flag once
+ for every custom header you want to add.
+ - Use -B/--ftp-ascii to force ftp to use ASCII mode when transfering files.
+ - Corrected the 'getlinks.pl' script, I accidentally left my silly proxy
+ usage in there! Since the introduction of the .curlrc file, it is easier to
+ write scripts that use curl since proxies and stuff should be in the
+ .curlrc file anyway.
+ - Introducing the new -F flag for HTTP POST. It supports multipart/form-data
+ which means it is gonna be possible to upload files etc through HTTP POST.
+ Shiraz Kanga asked for the feature and my brother,
+ Björn Stenberg helped me design the user
+ interface for this beast. This feature requires quite some docs,
+ since it has turned out not only quite capable, but also complicated! :-)
+ - A note here, since I've received mail about it. SSLeay versions prior to
+ 0.8 will *not* work with curl!
+ - Wil Langford reported a bug that occurred since curl
+ did not properly use CRLF when issuing ftp commands. I fixed it.
+ - Rearranged the order config files are read. .curlrc is now *always* read
+ first and before the command line flags. -K config files then act as
+ additional config items.
+ - Use -q AS THE FIRST OPTION specified to prevent .curlrc from being read.
+ - You can now disable a proxy by using -x "". Useful if the .curlrc file
+ specifies a proxy and you wanna fetch something without going through
+ that.
+ - I'm thinking of dropping the -p support. Its really not useful since ports
+ could (and should?) be specified as :<port> appended on the host name
+ instead, both in URLs and to proxy host names.
+ - Martin Staael reports curl -L bugs under Windows NT
+ (test with URL http://come.to/scsde). This bug is not present in this
+ version anymore.
+ - Added support for the weird FTP URL type= thing. You can download a file
+ using ASCII transfer by appending ";type=A" to the right of it. Other
+ available types are type=D for dir-list (NLST) and type=I for binary
+ transfer. I can't say I've ever seen anyone use this kind of URL though!
+ :-)
+ - Troy Engel pointed out a bug in my getenv("HOME")
+ usage for win32 systems. I introduce getenv.c to better cope with
+ this. Mr Engel helps me with the details around that...
+ - A little note to myself and others, I should make the win32-binary built
+ with SSL support...
+ - Ryan Nelson sent me comments about building curl
+ with SSL under FreeBSD. See the Makefile for details. Using the configure
+ script, it should work better and automatically now...
+ - Cleaned up in the port number mess in the source. No longer stores and uses
+ proxy port number separate from normal port number.
+ - 'configure' script working. Confirmed compiles on:
+ Host SSL Compiler
+ SunOS 5.5 no gcc
+ SunOS 5.5.1 yes gcc
+ SunOS 5.6 no cc (with gcc, it has the "gcc include files" problem)
+ SunOS 4.1.3 no gcc (without ANSI C headers)
+ SunOS 4.1.2 no gcc (native compiler failed)
+ Linux 2.0.18 no gcc
+ Linux 2.0.32 yes gcc
+ Linux 2.0.35 no gcc (with glibc)
+ IRIX 6.2 no gcc (cc compiles generate a few warnings)
+ IRIX 6.4 no cc (generated warnings though)
+ Win32 no Borland
+ OSF4.0 no ?
+
+ - Ooops. The 5beta (and 4.10) under win32 failed if the HOME variable wasn't
+ set.
+ - When using a proxy, curl now guesses and uses the protocol part in cases
+ like:
+ curl -x proxy:80 www.site.com
+ Proxies normally go nuts unless http:// is prepended to the host name, so
+ if curl is used like this, it guesses protocol and appends the protocol
+ string before passing it to the proxy. It already did this when used
+ without proxy.
+ - Better port usage with SSL through proxy now. If you specified a different
+ https-port when accessing through a proxy, it didn't use that number
+ correctly. I also rewrote the code that parses the stuff read from the
+ proxy when you wanna connect through it with SSL.
+ - Bjorn Reese helped me work around one of the compiler
+ warnings on IRIX native cc compiles.
+
+Version 4.10 (Oct 26, 1998)
+ Daniel Stenberg
+ - John A. Bristor suggested a config file switch,
+ and since I've been having that idea kind of in the background for a long
+ time I rewrote the parameter parsing function a little and now I introduce
+ the -K/--config flag. I also made curl *always* (unless -K is used) try to
+ load the .curlrc file for command line parameters. The syntax for the
+ config file is the standard command line argument style. Details in 'curl
+ -h' or the README.
+ - I removed the -k option. Keep-alive isn't really anything anyone would
+ want to enable with curl anyway.
+ - Martin Staael helped me add the 'irix' target. Now
+ "make irix" should build curl successfully on non-gcc SGI machines.
+ - Single switches now toggle behaviours. I.e if you use -v -v the second
+ will switch off the verbose mode the first one enabled. This is so that
+ you can disable a default setting a .curlrc file enables etc.
+
+Version 4.9 (Oct 7, 1998)
+ Daniel Stenberg
+ - Martin Staael suggested curl would support cookies.
+ I added -b/--cookie to enable free-text cookie data to be passed. There's
+ also a little blurb about general cookie stuff in the README/help text.
+ - dmh <dmh at jet.es> suggested HTTP resume capabilities. Although you could
+ manually get curl to resume HTTP documents, I made the -c resume flag work
+ for HTTP too (unless -r is used too, which would be very odd anyway).
+ - Added checklinks.pl to the archive. It is a still experimental perl script
+ that checks all links of a web page by using curl.
+ - Rearranged the archive hierarchy a little. Build the executable in the
+ src/ dir from now on!
+ - Version 4.9 and hereafter, is no longer released under the GPL license.
+ I have now updated the LEGAL file etc and now this is released using the
+ Mozilla Public License to avoid the plague known as "the GPL virus". You
+ must make the source available if you decide to change and/or redistribute
+ curl, but if you decide to use curl within something else you do not need
+ to offer the world the source to that too.
+ - Curl did not like HTTP servers that sent no headers at all on a GET
+ request. It is a violation of RFC2068 but appearantly some servers do
+ that anyway. Thanks to Gordon Beaton for the report!
+ - -L/--location was added after a suggestion from Martin Staael. This makes
+ curl ATTEMPT to follow the Location: redirect if one is present in the HTTP
+ headers. If -i or -I is used with this flag, you will see headers from all
+ sites the Location: points to. Do note that the first server can point to a
+ second that points to a third etc. It seems the Location: parameter (said
+ to be an AbsoluteURI in RFC2068) isn't always absolute.. :-/ Anyway, I've
+ made curl ATTEMPT to do the best it can to deal with the reality.
+ - Added getlinks.pl to the archive. getlinks.pl selectively downloads
+ files that a web page links to.
+
+Version 4.8.4
+ Daniel Stenberg
+ - 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...
+ - 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.
+ - Ralph Beckmann made me aware of a really odd bug now corrected. When curl
+ read a set of headers from a HTTP server, divided into more than one read
+ and the first read showed a full line *exactly* (i.e ending with a
+ newline), curl did not behave well.
+
+Version 4.8.3
+ Daniel Stenberg
+ - I was too quick to release 4.8.2 with too little testing. One of the
+ changes is now reverted slightly to the 4.8.1 way since 4.8.2 couldn't
+ upload files. I still think both problems corrected in 4.8.2 remain
+ corrected. Reported by Julian Romero Nieto.
+
+Version 4.8.2
+ Daniel Stenberg
+ - Bernhard Iselborn reported two FTP protocol errors curl did. They're now
+ corrected. Both appeared when getting files from a MS FTP server! :-)
+
+Version 4.8.1
+ Daniel Stenberg
+ - Added a last update of the progress meter when the transfer is done. The
+ final output on the screen didn't have to be the final size transfered
+ which made it sometimes look odd.
+ - Thanks to David Long I got rid of a silly bug that happened if a HTTP-page
+ had nothing but header. Appearantly Solaris deals with negative sizes in
+ fwrite() calls a lot better than Linux does... =B-]
+
+Version 4.8 (Aug 31, 1998)
+ Daniel Stenberg
+ - Continue FTP file transfer. -c is the switch. Note that you need to
+ specify a file name if you wanna resume a download (you can't resume a
+ download sent to stdout). Resuming upload may be limited by the server
+ since curl is then using the non-RFC959 command SIZE to get the size of
+ the target file before upload begins (to figure out which offset to
+ use). Use -C to specify the offset yourself! -C is handy if you're doing
+ the output to something else but a plain file or when you just want to get
+ the end of a file.
+ - recursiveftpget.pl now features a maximum recursive level argument.
+
+Version 4.7
+ Daniel Stenberg
+ - Added support to abort a download if the speed is below a certain amount
+ (speed-limit) bytes per second for a certain (speed-time) time.
+ - Wrote a perl script 'recursiveftpget.pl' to recursively use curl to get a
+ whole ftp directory tree. It is meant as an example of how curl can be
+ used. I agree it isn't the wisest thing to do to make a separate new
+ connection for each file and directory for this.
+
+Version 4.6
+ Daniel Stenberg
+ - Added a first attempt to optionally parse the .netrc file for login user
+ and password. If used with http, it enables user authentication. -n is
+ the new switch.
+ - Removed the extra newlines on the default user-agent string.
+ - Corrected the missing ftp upload error messages when it failed without the
+ verbose flag set. Gary W. Swearingen found it.
+ - Now using alarm() to enable second-precision timeout even on the name
+ resolving/connecting phase. The timeout is although reset after that first
+ sequence. (This should be corrected.) Gary W. Swearingen reported.
+ - Now spells "Unknown" properly, as in "Unknown option 'z'"... :-)
+ - Added bug report email address in the README.
+ - Added a "current speed" field to the progress meter. It shows the average
+ speed the last 5 seconds. The other speed field shows the average speed of
+ the entire transfer so far.
+
+Version 4.5.1
+ Linas Vepstas
+ - SSL through proxy fix
+ - Added -A to allow User-Agent: changes
+
+ Daniel Stenberg
+ - Made the -A work when SSL-through-proxy.
+
+Version 4.5
+ Linas Vepstas
+ - More SSL corrections
+ - I've added a port to AIX.
+ - running SSL through a proxy causes a chunk of code to be executred twice.
+ one of those blocks needs to be deleted.
+
+ Daniel Stenberg
+ - Made -i and -I work again
+
+Version 4.4
+ Linas Vepstas
+ - -x can now also specify proxyport when used as in 'proxyhost:proxyport'
+ - SSL fixes
+
+Version 4.3
+ Daniel Stenberg
+ - Adjusted to compile under win32 (VisualC++ 5). The -P switch does not
+ support network interface names in win32. I couldn't figure out how!
+
+Version 4.2
+ Linas Vepstas / Sampo Kellomaki
+ - Added SSL / SSLeay support (https://)
+ - Added the -T usage for HTTP POST.
+
+ Daniel Stenberg
+ - Bugfixed the SSL implementation.
+ - Made -P a lot better to use other IP addresses. It now accepts a following
+ parameter that can be either
+ interface - i.e "eth0" to specify which interface's IP address you
+ want to use
+ IP address - i.e "192.168.10.1" to specify exact IP number
+ host name - i.e "my.host.domain" to specify machine
+ "-" - (any single-letter string) to make it pick the machine's
+ default
+ - The Makefile is now ready to compile for solaris, sunos4 and linux right
+ out of the box.
+ - Better generated version string seen with 'curl -V'
+
+Version 4.1
+ Daniel Stenberg
+ - The IP number returned by the ftp server as a reply to PASV does no longer
+ have to DNS resolve. In fact, no IP-number-only addresses have to anymore.
+ - Binds better to available port when -P is used.
+ - Now LISTs ./ instead of / when used as in ftp://ftp.funet.fi/. The reason
+ for this is that exactly that site, ftp.funet.fi, does not allow LIST /
+ while LIST ./ is fine. Any objections?
+
+Version 4 (1998-03-20)
+ Daniel Stenberg
+ - I took another huge step and changed both version number and project name!
+ The reason for the new name is that there are just one too many programs
+ named urlget already and this program already can a lot more than merely
+ getting URLs, and the reason for the version number is that I did add the
+ pretty big change in -P and since I changed name I wanted to start with
+ something fresh!
+ - The --style flags are working better now.
+ - Listing directories with FTP often reported that the file transfer was
+ incomplete. Wrong assumptions were too common for directories, why no
+ size will be attempted to get compared on them from now on.
+ - Implemented the -P flag that let's the ftp control issue a PORT command
+ instead of the standard PASV.
+ - -a for appending FTP uploads works.
+
+***************************************************************************
+
+Version 3.12 (14 March 1998)
+ Daniel Stenberg
+ - End-of-header tracking still lacked support for \r\n or just \n at the
+ end of the last header line.
+ Sergio Barresi
+ - Added PROXY authentication.
+ Rafael Sagula
+ - Fixed some little bugs.
+
+Version 3.11
+ Daniel Stenberg
+ - The header parsing was still not correct since the 3.2 modification...
+
+Version 3.10
+ Daniel Stenberg
+ - 3.7 and 3.9 were simultaneously developed and merged into this version.
+ - FTP upload did not work correctly since 3.2.
+
+Version 3.9
+ Rafael Sagula
+ - Added the "-e <url> / --referer <url>" option where we can specify
+ the referer page. Obviously, this is necessary only to fool the
+ server, but...
+
+Version 3.7
+ Daniel Stenberg
+ - Now checks the last error code sent from the ftp server after a file has
+ been received or uploaded. Wasn't done previously.
+ - When 'urlget <host>' is used without a 'protocol://' first in the host part,
+ it now checks for host names starting with ftp or gopher and if it does,
+ it uses that protocol by default instead of http.
+
+Version 3.6
+ Daniel Stenberg
+ - Silly mistake made the POST bug. This has now also been tested to work with
+ proxy.
+
+Version 3.5
+ Daniel Stenberg
+ - Highly inspired by Rafael Sagula's changes to the 3.1 that added an almost
+ functional POST, I applied his changes into this version and made them work.
+ (It seems POST requires the Content-Type and Content-Length headers.) It is
+ now usable with the -d switch.
+
+Version 3.3 - 3.4
+ Passed to avoid confusions
+
+Version 3.2
+ Daniel Stenberg
+ - Major rewrite of two crucial parts of this code: upload and download.
+ They are both now using a select() switch, that allows much better
+ progress meter and time control.
+ - alarm() usage removed completely
+ - FTP get can now list directory contents if the path ends with a slash '/'.
+ Urlget on a ftp-path that doesn't end with a slash means urlget will
+ attempt getting it as a file name.
+ - FTP directory view supports -l for "list-only" which lists the file names
+ only.
+ - All operations support -m for max time usage in seconds allowed.
+ - FTP upload now allows the size of the uploaded file to be provided, and
+ thus it can better check it actually uploaded the whole file. It also
+ makes the progress meter for uploads much better!
+ - Made the parameter parsing fail in cases like 'urlget -r 900' which
+ previously tried to connect to the host named '900'.
+
+Version 3.1
+ Kjell Ericson
+ - Pointed out how to correct the 3 warnings in win32-compiles.
+
+ Daniel Stenberg
+ - Removed all calls to exit().
+ - Made the short help text get written to stdout instead of stderr.
+ - Made this file instead of keeping these comments in the source.
+ - Made two callback hooks, that enable external programs to use urlget()
+ easier and to grab the output/offer the input easier.
+ - It is evident that Win32-compiles are painful. I watched the output from
+ the Borland C++ v5 and it was awful. Just ignore all those warnings.
+
+Version 3.0
+ Daniel Stenberg
+ - Added FTP upload capabilities. The name urlget gets a bit silly now
+ when we can put too... =)
+ - Restructured the source quite a lot.
+ Changed the urlget() interface. This way, we will survive changes much
+ better. New features can come and old can be removed without us needing
+ to change the interface. I've written a small explanation in urlget.h
+ that explains it.
+ - New flags include -t, -T, -O and -h. The -h text is generated by the new
+ mkhelp script.
+
+Version 2.9
+ Remco van Hooff
+ - Added a fix to make it compile smoothly on Amiga using the SAS/C
+ compiler.
+
+ Daniel Stenberg
+ - Believe it or not, but the STUPID Novell web server seems to require
+ that the Host: keyword is used, so well I use it and I (re-introduce) the
+ urlget User-Agent:. I still have to check that this Host: usage works with
+ proxies... 'Host:' is required for HTTP/1.1 GET according to RFC2068.
+
+Version 2.8
+ Rafael Sagula
+ - some little modifications
+
+Version 2.7
+ Daniel Stenberg
+ - Removed the -l option and introduced the -f option instead. Now I'll
+ 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).
+ - 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
+ urlget.c and stuff that deals with the stand-alone program is in main.c.
+ - I took a few minutes and wrote an embryo of a README file to explain
+ a few things.
+
+Version 2.6
+ Daniel Stenberg
+ - Made the -l (loop) thing use the new CONF_FAILONERROR which makes
+ urlget() return error code if non-successful. It also won't output anything
+ then. Now finally removed the HTTP 1.0 and error 404 dependencies.
+ - Added -I which uses the HEAD request to get the header only from a
+ http-server.
+
+Version 2.5
+ Rafael Sagula
+ - Made the progress meter use HHH:MM:SS instead of only seconds.
+
+Version 2.4
+ Daniel Stenberg
+ - Added progress meter. It appears when downloading > BUFFER SIZE and
+ mute is not selected. I found out that when downloading large files from
+ really really slow sites, it is desirable to know the status of the
+ download. Do note that some downloads are done unawaring of the size, which
+ makes the progress meter less thrilling ;) If the output is sent to a tty,
+ the progress meter is shut off.
+ - Increased buffer size used for reading.
+ - Added length checks in the user+passwd parsing.
+ - Made it grok user+passwd for HTTP fetches. The trick is to base64
+ encode the user+passwd and send an extra header line. Read chapter 11.1 in
+ RFC2068 for details. I added it to be used just like the ftp one. To get a
+ http document from a place that requires user and password, use an URL
+ like:
+
+ http://user:passwd@www.site.to.leach/doc.html
+
+ I also added the -u flag, since WHEN USING A PROXY YOU CAN'T SPECIFY THE
+ USER AND PASSWORD WITH HTTP LIKE THAT. The -u flag works for ftp too, but
+ not if used with proxy. To do the same as the above one, you can invoke:
+
+ urlget -u user:passwd http://www.site.to.leach/doc.html
+
+Version 2.3
+ Rafael Sagula
+ - Added "-o" option (output file)
+ - Added URG_HTTP_NOT_FOUND return code.
+ (Daniel's note:)
+ Perhaps we should detect all kinds of errors and instead of writing that
+ custom string for the particular 404-error, use the error text we actually
+ get from the server. See further details in RFC2068 (HTTP 1.1
+ definition). The current way also relies on a HTTP/1.0 reply, which newer
+ servers might not do.
+ - Looping mode ("-l" option). It's easier to get various split files.
+ (Daniel's note:)
+ Use it like 'urlget -l 1 http://from.this.site/file%d.html', which will
+ make urlget to attempt to fetch all files named file1.html, file2.html etc
+ until no more files are found. This is only a modification of the
+ STAND_ALONE part, nothing in the urlget() function was modfified for this.
+ Daniel Stenberg
+ - Changed the -h to be -i instead. -h should be preserved to help use.
+ - Bjorn Reese indicated that Borland _might_ use '_WIN32' instead of the
+ VC++ WIN32 define and therefore I added a little fix for that.
+
+Version 2.2
+ Johan Andersson
+ - The urlget function didn't set the path to url when using proxy.
+ - Fixed bug with IMC proxy. Now using (almost) complete GET command.
+
+ Daniel Stenberg
+ - Made it compile on Solaris. Had to reorganize the includes a bit.
+ (so Win32, Linux, SunOS 4 and Solaris 2 compile fine.)
+ - Made Johan's keepalive keyword optional with the -k flag (since it
+ makes a lot of urlgets take a lot longer time).
+ - Made a '-h' switch in case you want the HTTP-header in the output.
+
+Version 2.1
+ Daniel Stenberg and Kjell Ericson
+ - Win32-compilable
+ - No more global variables
+ - Mute option (no output at all to stderr)
+ - Full range of return codes from urlget(), which is now written to be a
+ function for easy-to-use in [other] programs.
+ - Define STAND_ALONE to compile the stand alone urlget program
+ - Now compiles with gcc options -ansi -Wall -pedantic ;)
+
+Version 2.0
+ - Introducing ftp GET support. The FTP URL type is recognized and used.
+ - Renamed the project to 'urlget'.
+ - Supports the user+passwd in the FTP URL (otherwise it tries anonymous
+ login with a weird email address as password).
+
+Version 1.5
+ Daniel Stenberg
+ - The skip_header() crap messed it up big-time. By simply removing that
+ one we can all of a sudden download anything ;)
+ - No longer requires a trailing slash on the URLs.
+ - If the given URL isn't prefixed with 'http://', HTTP is assumed and
+ given a try!
+ - 'void main()' is history.
+
+Version 1.4
+ Daniel Stenberg
+ - The gopher source used the ppath variable instead of path which could
+ lead to disaster.
+
+Version 1.3
+ Daniel Stenberg
+ - Well, I added a lame text about the time it took to get the data. I also
+ fought against Johan to prevent his -f option (to specify a file name
+ that should be written instead of stdout)! =)
+ - Made it write 'connection refused' for that particular connect()
+ problem.
+ - Renumbered the version. Let's not make silly 1.0.X versions, this is
+ a plain 1.3 instead.
+
+Version 1.2
+ Johan Andersson
+ - Discovered and fixed the problem with getting binary files. puts() is
+ now replaced with fwrite(). (Daniel's note: this also fixed the buffer
+ overwrite problem I found in the previous version.)
+
+ Rafael Sagula
+ - Let "-p" before "-x".
+
+ Daniel Stenberg
+ - Bugfixed the proxy usage. It should *NOT* use nor strip the port number
+ from the URL but simply pass that information to the proxy. This also
+ made the user/password fields possible to use in proxy [ftp-] URLs.
+ (like in ftp://user:password@ftp.my.site:8021/README)
+
+ Johan Andersson
+ - Implemented HTTP proxy support.
+ - Receive byte counter added.
+
+ Bjorn Reese
+ - Implemented URLs (and skipped the old syntax).
+ - Output is written to stdout, so to achieve the above example, do:
+ httpget http://143.54.10.6/info_logo.gif > test.gif
+
+Version 1.1
+ Daniel Stenberg
+ - Adjusted it slightly to accept named hosts on the command line. We
+ wouldn't wanna use IP numbers for the rest of our lifes, would we?
+
+Version 1.0
+ Rafael Sagula
+ - Wrote the initial httpget, which started all this!
diff --git a/CMake/CheckTypeSize.c.in b/CMake/CheckTypeSize.c.in
deleted file mode 100644
index 8ff07bfd..00000000
--- a/CMake/CheckTypeSize.c.in
+++ /dev/null
@@ -1,44 +0,0 @@
-#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
-#ifdef CHECK_TYPE_SIZE_TYPE
-
-@CHECK_TYPE_SIZE_PREINCLUDE@
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif /* HAVE_SYS_TYPES_H */
-
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-
-#ifdef _WIN32
-# include <winsock2.h>
-# include <ws2tcpip.h>
-#endif
-
-
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif /* HAVE_STDINT_H */
-
-#ifdef HAVE_STDDEF_H
-# include <stddef.h>
-#endif /* HAVE_STDDEF_H */
-
-@CHECK_TYPE_SIZE_PREMAIN@
-
-#ifdef __CLASSIC_C__
-int main(){
- int ac;
- char*av[];
-#else
-int main(int ac, char*av[]){
-#endif
- if(ac > 1000){return *av[0];}
- return sizeof(CHECK_TYPE_SIZE_TYPE);
-}
-
-#else /* CHECK_TYPE_SIZE_TYPE */
-
-# error "CHECK_TYPE_SIZE_TYPE has to specify the type"
-
-#endif /* CHECK_TYPE_SIZE_TYPE */
diff --git a/CMake/CheckTypeSize.cmake b/CMake/CheckTypeSize.cmake
deleted file mode 100644
index 2c2ceab9..00000000
--- a/CMake/CheckTypeSize.cmake
+++ /dev/null
@@ -1,57 +0,0 @@
-# - Check sizeof a type
-# CHECK_TYPE_SIZE(TYPE VARIABLE)
-# Check if the type exists and determine size of type. if the type
-# exists, the size will be stored to the variable.
-#
-# VARIABLE - variable to store size if the type exists.
-# HAVE_${VARIABLE} - does the variable exists or not
-
-macro(CHECK_TYPE_SIZE TYPE VARIABLE)
- set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
- if(NOT DEFINED ${VARIABLE})
- if("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- set(CHECK_TYPE_SIZE_TYPE "${TYPE}")
- set(MACRO_CHECK_TYPE_SIZE_FLAGS
- "${CMAKE_REQUIRED_FLAGS}")
- foreach(def HAVE_SYS_TYPES_H
- HAVE_STDINT_H HAVE_STDDEF_H HAVE_SYS_SOCKET_H)
- if("${def}")
- set(MACRO_CHECK_TYPE_SIZE_FLAGS
- "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
- endif("${def}")
- endforeach(def)
- set(CHECK_TYPE_SIZE_PREMAIN)
- foreach(def ${CMAKE_EXTRA_INCLUDE_FILES})
- set(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
- endforeach(def)
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
- "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
- IMMEDIATE @ONLY)
- file(READ
- "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
- CHECK_TYPE_SIZE_FILE_CONTENT)
- message(STATUS "Check size of ${TYPE}")
- if(CMAKE_REQUIRED_LIBRARIES)
- set(CHECK_TYPE_SIZE_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- endif(CMAKE_REQUIRED_LIBRARIES)
- try_run(${VARIABLE} HAVE_${VARIABLE}
- ${CMAKE_BINARY_DIR}
- "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
- "${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT)
- if(HAVE_${VARIABLE})
- message(STATUS "Check size of ${TYPE} - done")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
- else(HAVE_${VARIABLE})
- message(STATUS "Check size of ${TYPE} - failed")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
- endif(HAVE_${VARIABLE})
- endif("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- endif(NOT DEFINED ${VARIABLE})
- set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
-endmacro(CHECK_TYPE_SIZE)
diff --git a/CMake/CurlCheckCSourceCompiles.cmake b/CMake/CurlCheckCSourceCompiles.cmake
deleted file mode 100644
index b6327680..00000000
--- a/CMake/CurlCheckCSourceCompiles.cmake
+++ /dev/null
@@ -1,75 +0,0 @@
-# - 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
deleted file mode 100644
index 6b14af80..00000000
--- a/CMake/CurlCheckCSourceRuns.cmake
+++ /dev/null
@@ -1,83 +0,0 @@
-# - 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 09434589..04d5e7e4 100644
--- a/CMake/CurlTests.c
+++ b/CMake/CurlTests.c
@@ -1,3 +1,24 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
#ifdef TIME_WITH_SYS_TIME
/* Time with sys/time test */
@@ -50,264 +71,88 @@ main ()
}
#endif
-#ifdef HAVE_GETHOSTBYADDR_R_5
+/* 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)
#include <sys/types.h>
#include <netdb.h>
-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 <sys/types.h>
-#include <netdb.h>
-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 <sys/types.h>
-#include <netdb.h>
-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 <sys/types.h>
-#include <netdb.h>
-int
-main ()
+int main(void)
{
-
-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;
-}
+ 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;
#endif
-#ifdef HAVE_GETHOSTBYADDR_R_8
-#include <sys/types.h>
-#include <netdb.h>
-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 <sys/types.h>
-#include <netdb.h>
-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 <string.h>
-#include <sys/types.h>
-#include <netdb.h>
-#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 <string.h>
-#include <sys/types.h>
-#include <netdb.h>
-#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 <sys/types.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#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 <sys/types.h>
-#include <netdb.h>
-#undef NULL
-#define NULL (void *)0
-int
-main ()
-{
-
-#ifndef gethostbyname_r
- (void)gethostbyname_r;
-#endif
-gethostbyname_r(NULL, NULL, NULL, 0, NULL);
- ;
+#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;
return 0;
}
#endif
-#ifdef HAVE_GETHOSTBYNAME_R_6
-#include <sys/types.h>
-#include <netdb.h>
-#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 <sys/types.h>
-#include <netdb.h>
-#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 <ws2tcpip.h>
diff --git a/CMake/FindCARES.cmake b/CMake/FindCARES.cmake
new file mode 100644
index 00000000..c4ab5f13
--- /dev/null
+++ b/CMake/FindCARES.cmake
@@ -0,0 +1,42 @@
+# - Find c-ares
+# Find the c-ares includes and library
+# This module defines
+# CARES_INCLUDE_DIR, where to find ares.h, etc.
+# CARES_LIBRARIES, the libraries needed to use c-ares.
+# CARES_FOUND, If false, do not try to use c-ares.
+# also defined, but not for general use are
+# CARES_LIBRARY, where to find the c-ares library.
+
+FIND_PATH(CARES_INCLUDE_DIR ares.h
+ /usr/local/include
+ /usr/include
+ )
+
+SET(CARES_NAMES ${CARES_NAMES} cares)
+FIND_LIBRARY(CARES_LIBRARY
+ NAMES ${CARES_NAMES}
+ PATHS /usr/lib /usr/local/lib
+ )
+
+IF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
+ SET(CARES_LIBRARIES ${CARES_LIBRARY})
+ SET(CARES_FOUND "YES")
+ELSE (CARES_LIBRARY AND CARES_INCLUDE_DIR)
+ SET(CARES_FOUND "NO")
+ENDIF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
+
+
+IF (CARES_FOUND)
+ IF (NOT CARES_FIND_QUIETLY)
+ MESSAGE(STATUS "Found c-ares: ${CARES_LIBRARIES}")
+ ENDIF (NOT CARES_FIND_QUIETLY)
+ELSE (CARES_FOUND)
+ IF (CARES_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find c-ares library")
+ ENDIF (CARES_FIND_REQUIRED)
+ENDIF (CARES_FOUND)
+
+MARK_AS_ADVANCED(
+ CARES_LIBRARY
+ CARES_INCLUDE_DIR
+ )
diff --git a/CMake/FindGSS.cmake b/CMake/FindGSS.cmake
new file mode 100644
index 00000000..dfaeaf30
--- /dev/null
+++ b/CMake/FindGSS.cmake
@@ -0,0 +1,289 @@
+# - 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 "${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
new file mode 100644
index 00000000..12a7c612
--- /dev/null
+++ b/CMake/FindLibSSH2.cmake
@@ -0,0 +1,35 @@
+# - 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
deleted file mode 100644
index 63a9d606..00000000
--- a/CMake/FindOpenSSL.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-# Extension of the standard FindOpenSSL.cmake
-# Adds OPENSSL_INCLUDE_DIRS and libeay32
-include("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
-
-# 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()
-
-
-if(OPENSSL_FOUND)
- set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
-endif()
diff --git a/CMake/FindZLIB.cmake b/CMake/FindZLIB.cmake
deleted file mode 100644
index 87f1d4fe..00000000
--- a/CMake/FindZLIB.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-# Locate zlib
-include("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
-
-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()
diff --git a/CMake/Macros.cmake b/CMake/Macros.cmake
new file mode 100644
index 00000000..dab005f7
--- /dev/null
+++ b/CMake/Macros.cmake
@@ -0,0 +1,95 @@
+#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 89d00484..4f07f225 100644
--- a/CMake/OtherTests.cmake
+++ b/CMake/OtherTests.cmake
@@ -1,15 +1,10 @@
-include(CurlCheckCSourceCompiles)
-set(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
-set(HEADER_INCLUDES)
-set(headers_hack)
+include(CheckCSourceCompiles)
+# The begin of the sources (macros and includes)
+set(_source_epilogue "#undef inline")
macro(add_header_include check header)
if(${check})
- set(headers_hack
- "${headers_hack}\n#include <${header}>")
- #SET(HEADER_INCLUDES
- # ${HEADER_INCLUDES}
- # "${header}")
+ set(_source_epilogue "${_source_epilogue}\n#include <${header}>")
endif(${check})
endmacro(add_header_include)
@@ -18,22 +13,23 @@ 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(EXTRA_DEFINES ${EXTRA_DEFINES}
- "__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
+ set(_source_epilogue
+ "${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")
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)
-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)
+check_c_source_compiles("${_source_epilogue}
+int main(void) {
+ recv(0, 0, 0, 0);
+ return 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")
@@ -41,17 +37,23 @@ 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)
- 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("
+ 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) {
${recv_arg1} s=0;
${recv_arg2} buf=0;
${recv_arg3} len=0;
${recv_arg4} flags=0;
- ${recv_retv} res = recv(s, buf, len, flags)"
- curl_cv_func_recv_test
- "${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
+ ${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})")
if(curl_cv_func_recv_test)
set(curl_cv_func_recv_args
"${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
@@ -69,18 +71,13 @@ if(curl_cv_recv)
endforeach(recv_arg2)
endforeach(recv_arg1)
endforeach(recv_retv)
- else(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
+ else()
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}")
- #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")
+ endif()
if("${curl_cv_func_recv_args}" STREQUAL "unknown")
message(FATAL_ERROR "Cannot find proper types to use for recv args")
@@ -91,12 +88,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)
-curl_check_c_source_compiles("send(0, 0, 0, 0)" curl_cv_send)
+check_c_source_compiles("${_source_epilogue}
+int main(void) {
+ send(0, 0, 0, 0);
+ return 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")
@@ -104,19 +101,24 @@ 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)
- 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("
+ 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) {
${send_arg1} s=0;
${send_arg2} buf=0;
${send_arg3} len=0;
${send_arg4} flags=0;
- ${send_retv} res = send(s, buf, len, flags)"
- curl_cv_func_send_test
- "${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
+ ${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})")
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
@@ -135,20 +137,14 @@ if(curl_cv_send)
endforeach(send_arg2)
endforeach(send_arg1)
endforeach(send_retv)
- else(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
+ else()
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}")
- #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")
+ endif()
if("${curl_cv_func_send_args}" STREQUAL "unknown")
message(FATAL_ERROR "Cannot find proper types to use for send args")
@@ -160,88 +156,71 @@ endif(curl_cv_send)
set(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send")
set(HAVE_SEND 1)
-set(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
-curl_check_c_source_compiles("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL)
+check_c_source_compiles("${_source_epilogue}
+ int main(void) {
+ int flag = MSG_NOSIGNAL;
+ (void)flag;
+ return 0;
+ }" HAVE_MSG_NOSIGNAL)
-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")
+if(NOT HAVE_WINDOWS_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(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)
+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)
if(HAVE_SYS_POLL_H)
- set(HEADER_INCLUDES "sys/poll.h")
+ set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H")
endif(HAVE_SYS_POLL_H)
-curl_check_c_source_runs("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE)
+check_c_source_runs("
+ #ifdef HAVE_SYS_POLL_H
+ # include <sys/poll.h>
+ #endif
+ int main(void) {
+ return poll((void *)0, 0, 10 /*ms*/);
+ }" HAVE_POLL_FINE)
set(HAVE_SIG_ATOMIC_T 1)
-set(EXTRA_DEFINES)
-set(HEADER_INCLUDES)
+set(CMAKE_REQUIRED_FLAGS)
if(HAVE_SIGNAL_H)
- set(HEADER_INCLUDES "signal.h")
+ set(CMAKE_REQUIRED_FLAGS "-DHAVE_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)
- curl_check_c_source_compiles("static volatile sig_atomic_t dummy = 0" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
+ check_c_source_compiles("
+ #ifdef HAVE_SIGNAL_H
+ # include <signal.h>
+ #endif
+ int main(void) {
+ static volatile sig_atomic_t dummy = 0;
+ (void)dummy;
+ return 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(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}
- #ifndef WIN32_LEAN_AND_MEAN
- #define WIN32_LEAN_AND_MEAN
- #endif
- #include <windows.h>")
- if(HAVE_WINSOCK2_H)
- set(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}\n#include <winsock2.h>")
- endif(HAVE_WINSOCK2_H)
-else(HAVE_WINDOWS_H)
+ set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
+else()
+ set(CMAKE_EXTRA_INCLUDE_FILES)
if(HAVE_SYS_SOCKET_H)
- set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
- "sys/socket.h")
+ set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
endif(HAVE_SYS_SOCKET_H)
- 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)
+endif()
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 49161f86..6fc2991c 100644
--- a/CMake/Platforms/WindowsCache.cmake
+++ b/CMake/Platforms/WindowsCache.cmake
@@ -5,6 +5,7 @@ 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)
@@ -14,7 +15,6 @@ 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)
@@ -108,7 +108,11 @@ if(NOT UNIX)
set(HAVE_IN_ADDR_T 0)
set(HAVE_INET_NTOA_R_DECL 0)
set(HAVE_INET_NTOA_R_DECL_REENTRANT 0)
- set(HAVE_GETADDRINFO 0)
+ if(ENABLE_IPV6)
+ set(HAVE_GETADDRINFO 1)
+ else()
+ set(HAVE_GETADDRINFO 0)
+ endif()
set(STDC_HEADERS 1)
set(RETSIGTYPE_TEST 1)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 244085b0..8aa44bbe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,24 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
# cURL/libcurl CMake script
# by Tetetest and Sukender (Benoit Neil)
@@ -17,35 +38,27 @@
# 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.6.2 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8 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 "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})
+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})
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")
@@ -58,19 +71,38 @@ set(OS "\"${CMAKE_SYSTEM_NAME}\"")
include_directories(${PROJECT_BINARY_DIR}/include/curl)
include_directories( ${CURL_SOURCE_DIR}/include )
-if(WIN32)
- set(NATIVE_WINDOWS ON)
-endif()
-
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(CURL_USE_ARES "Set to ON to enable c-ares support" 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(ENABLE_DEBUG "Set to ON to enable curl debug features" OFF)
+option(ENABLE_CURLDEBUG "Set to ON to build with TrackMemory feature enabled" OFF)
+
+if (ENABLE_DEBUG)
+ # DEBUGBUILD will be defined only for Debug builds
+ if(NOT CMAKE_VERSION VERSION_LESS 3.0)
+ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUGBUILD>)
+ else()
+ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUGBUILD)
+ endif()
+ set(ENABLE_CURLDEBUG ON)
+endif()
+
+if (ENABLE_CURLDEBUG)
+ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS CURLDEBUG)
+endif()
+
# initialize CURL_LIBS
set(CURL_LIBS "")
-if(CURL_USE_ARES)
- set(USE_ARES ${CURL_USE_ARES})
+if(ENABLE_THREADED_RESOLVER AND ENABLE_ARES)
+ message(FATAL_ERROR "Options ENABLE_THREADED_RESOLVER and ENABLE_ARES are mutually exclusive")
+endif()
+
+if(ENABLE_ARES)
+ set(USE_ARES 1)
find_package(CARES REQUIRED)
list(APPEND CURL_LIBS ${CARES_LIBRARY} )
set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY})
@@ -114,26 +146,33 @@ mark_as_advanced(CURL_DISABLE_HTTP)
option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
mark_as_advanced(CURL_DISABLE_LDAPS)
-if(WIN32)
- 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()
- option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
- endif()
- mark_as_advanced(CURL_LDAP_WIN)
-endif()
+
+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)
+ set(CURL_DISABLE_LDAPS ON)
set(CURL_DISABLE_TELNET ON)
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)
@@ -145,24 +184,53 @@ 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" OFF)
+option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON)
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()
-if(WIN32)
- list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib) # bufferoverflowu.lib
- if(CURL_DISABLE_LDAP)
- # Remove wldap32.lib from space-separated list
- string(REPLACE " " ";" _LIST ${CMAKE_C_STANDARD_LIBRARIES})
- list(REMOVE_ITEM _LIST "wldap32.lib")
- to_list_spaces(_LIST CMAKE_C_STANDARD_LIBRARIES)
+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()
- # Append wldap32.lib
- list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wldap32.lib)
+ message(WARNING "Found no *nroff program")
endif()
- set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}" CACHE STRING "" FORCE)
endif()
-
# We need ansi c-flags, especially on HP
set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
@@ -183,28 +251,26 @@ include (CheckIncludeFile)
include (CheckIncludeFiles)
include (CheckLibraryExists)
include (CheckSymbolExists)
-# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
-# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
-if(CMAKE_CROSSCOMPILING)
- include ("${CMAKE_MODULE_PATH}/CheckTypeSize.cmake")
-else(CMAKE_CROSSCOMPILING)
- include (CheckTypeSize)
-endif(CMAKE_CROSSCOMPILING)
+include (CheckTypeSize)
+include (CheckCSourceCompiles)
# On windows preload settings
if(WIN32)
+ set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WINSOCKAPI_")
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
endif(WIN32)
-# This macro checks if the symbol exists in the library and if it
-# does, it appends library to the list.
-macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
- check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} ""
- ${VARIABLE})
- if(${VARIABLE})
- set(CURL_LIBS ${CURL_LIBS} ${LIBRARY})
- endif(${VARIABLE})
-endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
+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()
# Check for all needed libraries
check_library_exists_concat("dl" dlopen HAVE_LIBDL)
@@ -222,85 +288,279 @@ if(NOT NOT_NEED_LIBNSL)
check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL)
endif(NOT NOT_NEED_LIBNSL)
-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)
+check_function_exists(gethostname HAVE_GETHOSTNAME)
-# IF(NOT CURL_SPECIAL_LIBZ)
-# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
-# ENDIF(NOT CURL_SPECIAL_LIBZ)
+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_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_OPENSSL ON)
+ set(HAVE_LIBCRYPTO ON)
+ set(HAVE_LIBSSL ON)
+ include_directories(${OPENSSL_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+ check_include_file("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
+ check_include_file("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
+ check_include_file("openssl/err.h" HAVE_OPENSSL_ERR_H)
+ check_include_file("openssl/pem.h" HAVE_OPENSSL_PEM_H)
+ check_include_file("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
+ check_include_file("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
+ check_include_file("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
+ check_include_file("openssl/x509.h" HAVE_OPENSSL_X509_H)
+ check_include_file("openssl/rand.h" HAVE_OPENSSL_RAND_H)
+ endif()
+endif()
+
+if(NOT CURL_DISABLE_LDAP)
+
if(WIN32)
- find_package(OpenSSL)
- if(OPENSSL_FOUND)
- set(USE_SSLEAY TRUE)
- set(USE_OPENSSL TRUE)
- list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} )
+ option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON)
+ if(USE_WIN32_LDAP)
+ check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
+ if(NOT HAVE_WLDAP32)
+ set(USE_WIN32_LDAP 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 USE_WIN32_LDAP)
+ message(FATAL_ERROR "Cannot use USE_WIN32_LDAP and CMAKE_USE_OPENLDAP at the same time")
+ endif()
+
+ # Now that we know, we're not using windows LDAP...
+ if(NOT USE_WIN32_LDAP)
+ # 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_DISABLE_LDAP ON CACHE BOOL "" FORCE)
+ 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 "${CMAKE_REQUIRED_DEFINITIONS} -DLDAP_DEPRECATED=1")
+ 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(CMAKE_USE_OPENSSL FALSE)
- message(STATUS "OpenSSL NOT Found, disabling CMAKE_USE_OPENSSL")
+ set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DNEED_LBER_H")
endif()
- else(WIN32)
- check_library_exists_concat("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
- check_library_exists_concat("ssl" SSL_connect HAVE_LIBSSL)
- endif(WIN32)
-endif(CMAKE_USE_OPENSSL)
+ endif()
+
+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()
# 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) # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE
+if(CURL_ZLIB)
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()
-# If we have features.h, then do the _BSD_SOURCE magic
-check_include_file("features.h" HAVE_FEATURES_H)
+#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()
-# 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)
+ 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})
+ else()
+ message(WARNING "GSSAPI support has been requested but no supporting libraries found. Skipping.")
+ endif()
+endif()
+
+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)
- check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
- check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
-endif(NOT UNIX)
-check_include_file_concat("stdio.h" HAVE_STDIO_H)
-if(NOT UNIX)
check_include_file_concat("windows.h" HAVE_WINDOWS_H)
check_include_file_concat("winsock.h" HAVE_WINSOCK_H)
+ check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
+ check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
endif(NOT UNIX)
+check_include_file_concat("stdio.h" HAVE_STDIO_H)
check_include_file_concat("inttypes.h" HAVE_INTTYPES_H)
check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H)
check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H)
@@ -325,29 +585,18 @@ 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)
-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("pem.h" HAVE_PEM_H)
check_include_file_concat("poll.h" HAVE_POLL_H)
check_include_file_concat("pwd.h" HAVE_PWD_H)
@@ -376,21 +625,12 @@ 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(CMAKE_USE_OPENSSL)
- check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H)
-endif(CMAKE_USE_OPENSSL)
-
-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()
check_type_size(size_t SIZEOF_SIZE_T)
@@ -431,7 +671,7 @@ if(SIZEOF_LONG EQUAL 8)
set(CURL_FORMAT_CURL_OFF_TU "lu")
set(CURL_FORMAT_OFF_T "%ld")
set(CURL_SUFFIX_CURL_OFF_T L)
- set(CURL_SUFFIX_CURL_OFF_TU LU)
+ set(CURL_SUFFIX_CURL_OFF_TU UL)
endif(SIZEOF_LONG EQUAL 8)
if(SIZEOF_LONG_LONG EQUAL 8)
@@ -441,7 +681,7 @@ if(SIZEOF_LONG_LONG EQUAL 8)
set(CURL_FORMAT_CURL_OFF_TU "llu")
set(CURL_FORMAT_OFF_T "%lld")
set(CURL_SUFFIX_CURL_OFF_T LL)
- set(CURL_SUFFIX_CURL_OFF_TU LLU)
+ set(CURL_SUFFIX_CURL_OFF_TU ULL)
endif(SIZEOF_LONG_LONG EQUAL 8)
if(NOT CURL_TYPEOF_CURL_OFF_T)
@@ -464,6 +704,12 @@ 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)
@@ -506,7 +752,6 @@ if(CMAKE_USE_OPENSSL)
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
if(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
set(USE_OPENSSL 1)
- set(USE_SSLEAY 1)
endif(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
endif(CMAKE_USE_OPENSSL)
check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
@@ -527,6 +772,7 @@ 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)
@@ -565,75 +811,6 @@ 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
@@ -781,9 +958,15 @@ endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
if(HAVE_SOCKLEN_T)
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
+ if(WIN32)
+ set(CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h")
+ elseif(HAVE_SYS_SOCKET_H)
+ set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
+ endif()
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
+ set(CMAKE_EXTRA_INCLUDE_FILES)
if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
- message(FATAL_ERROR
+ message(FATAL_ERROR
"Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
endif()
else()
@@ -791,6 +974,17 @@ else()
set(CURL_SIZEOF_CURL_SOCKLEN_T ${SIZEOF_INT})
endif()
+# TODO test which of these headers are required for the typedefs used in curlbuild.h
+if(WIN32)
+ set(CURL_PULL_WS2TCPIP_H ${HAVE_WS2TCPIP_H})
+else()
+ set(CURL_PULL_SYS_TYPES_H ${HAVE_SYS_TYPES_H})
+ set(CURL_PULL_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H})
+ set(CURL_PULL_SYS_POLL_H ${HAVE_SYS_POLL_H})
+endif()
+set(CURL_PULL_STDINT_H ${HAVE_STDINT_H})
+set(CURL_PULL_INTTYPES_H ${HAVE_INTTYPES_H})
+
include(CMake/OtherTests.cmake)
add_definitions(-DHAVE_CONFIG_H)
@@ -804,26 +998,6 @@ 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})
- endif()
- if(CURL_ZLIB AND ZLIB_FOUND)
- target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})
- #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)
- target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
- #ADD_DEFINITIONS( -DUSE_SSLEAY )
- endif()
-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)
@@ -848,7 +1022,154 @@ 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")
endif()
+
+# Installation.
+# First, install generated curlbuild.h
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/curl/curlbuild.h"
+ DESTINATION include/curl )
+# Next, install other headers excluding curlbuild.h
+install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/curl"
+ DESTINATION include
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN "curlbuild.h" EXCLUDE)
+
+
+# Workaround for MSVS10 to avoid the Dialog Hell
+# FIXME: This could be removed with future version of CMake.
+if(MSVC_VERSION EQUAL 1600)
+ set(CURL_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/CURL.sln")
+ if(EXISTS "${CURL_SLN_FILENAME}")
+ file(APPEND "${CURL_SLN_FILENAME}" "\n# This should be regenerated!\n")
+ endif()
+endif()
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..f0a6771e
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,25 @@
+How to contribute to curl
+=========================
+
+Join the community
+------------------
+
+ 1. Click 'watch' on the github repo
+
+ 2. Subscribe to the suitable [mailing lists](http://curl.haxx.se/mail/)
+
+Read [docs/CONTRIBUTE](docs/CONTRIBUTE)
+---------------------------------------
+
+Send your suggestions using one of these methods:
+-------------------------------------------------
+
+ 1. in a mail to the mailing list
+
+ 2. as a pull request on github
+
+ 3. as an issue on github
+
+
+/ The cURL team!
+
diff --git a/COPYING b/COPYING
index 163b299a..6b5d59f8 100644
--- a/COPYING
+++ b/COPYING
@@ -1,6 +1,6 @@
COPYRIGHT AND PERMISSION NOTICE
-Copyright (c) 1996 - 2010, Daniel Stenberg, <daniel@haxx.se>.
+Copyright (c) 1996 - 2015, Daniel Stenberg, <daniel@haxx.se>.
All rights reserved.
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
new file mode 100644
index 00000000..6b1e798e
--- /dev/null
+++ b/CTestConfig.cmake
@@ -0,0 +1,13 @@
+## This file should be placed in the root directory of your project.
+## Then modify the CMakeLists.txt file in the root directory of your
+## project to incorporate the testing dashboard.
+## # The following are required to uses Dart and the Cdash dashboard
+## ENABLE_TESTING()
+## INCLUDE(Dart)
+set(CTEST_PROJECT_NAME "CURL")
+set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
+
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "my.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=CURL")
+set(CTEST_DROP_SITE_CDASH TRUE)
diff --git a/GIT-INFO b/GIT-INFO
new file mode 100644
index 00000000..16f4a220
--- /dev/null
+++ b/GIT-INFO
@@ -0,0 +1,67 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+GIT-INFO
+
+This file is only present in git - never in release archives. It contains
+information about other files and things that the git repository keeps in its
+inner sanctum.
+
+Compile and build instructions follow below.
+
+ CHANGES.0 contains ancient changes
+ CHANGES contains the most recent changes
+
+ Makefile.dist is included as the root Makefile in distribution archives
+
+ perl/ is a subdirectory with various perl scripts
+
+To build in environments that support configure, after having extracted
+everything from git, do this:
+
+./buildconf
+./configure
+make
+
+ Daniel uses a ./configure line similar to this for easier development:
+
+ ./configure --disable-shared --enable-debug --enable-maintainer-mode
+
+In environments that don't support configure (i.e. Microsoft), do this:
+
+buildconf.bat
+
+
+REQUIREMENTS
+
+ For buildconf (not buildconf.bat) to work, you need the following software
+installed:
+
+ o autoconf 2.57 (or later)
+ o automake 1.7 (or later)
+ o libtool 1.4.2 (or later)
+ o GNU m4 (required by autoconf)
+
+ o nroff + perl
+
+ If you don't have nroff and perl and you for some reason don't want to
+ install them, you can rename the source file src/tool_hugehelp.c.cvs to
+ src/tool_hugehelp.c and avoid having to generate this file. This will
+ give you a stubbed version of the file that doesn't contain actual content.
+
+MAC OS X
+
+ With Mac OS X 10.2 and the associated Developer Tools, the installed versions
+ of the build tools are adequate. For Mac OS X 10.1 users, Guido Neitzer
+ wrote the following step-by-step guide:
+
+ 1. Install fink (http://fink.sourceforge.net)
+ 2. Update fink to the newest version (with the installed fink)
+ 3. Install the latest version of autoconf, automake and m4 with fink
+ 4. Install version 1.4.1 of libtool - you find it in the "unstable" section
+ (read the manual to see how to get unstable versions)
+ 5. Get cURL from git
+ 6. Build cURL with "./buildconf", "./configure", "make", "sudo make install"
diff --git a/MacBuild.sh b/MacBuild.sh
deleted file mode 100755
index 1dbd8f59..00000000
--- a/MacBuild.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-# Check if we need to build
-if [ -f install/curl ]
-then
- echo "Nothing to build in cURL. Delete install/curl to force a rebuild"
- exit 0
-fi
-
-# Build both PPC and i386 targets
-rm -rf build install
-mkdir -p build/ppc build/i386 install
-cd build/ppc
-../../configure --disable-ldap --with-ssl=`pwd`/../../../openssl --enable-static --disable-shared --target=powerpc-apple CFLAGS="-mmacosx-version-min=10.5 -arch ppc" CXXFLAGS="-mmacosx-version-min=10.5 -arch ppc" LDFLAGS="-mmacosx-version-min=10.5 -arch ppc" --prefix=`pwd`/../../install/ppc
-make
-make install
-cd ../i386
-../../configure --disable-ldap --with-ssl=`pwd`/../../../openssl --enable-static --disable-shared --target=i386-apple CFLAGS="-mmacosx-version-min=10.5 -arch i386" CXXFLAGS="-mmacosx-version-min=10.5 -arch i386" LDFLAGS="-mmacosx-version-min=10.5 -arch i386" --prefix=`pwd`/../../install/i386
-make
-make install
-cd ../..
-
-# Now merge i386 and PPC
-lipo -create ./install/ppc/bin/curl ./install/i386/bin/curl -output ./install/curl
-lipo -create ./install/ppc/lib/libcurl.a ./install/i386/lib/libcurl.a -output ./install/libtpncurl.a
-
-# Headers are the same for i386 and ppc
-ln -s i386/include install/include
-
-# clean up
-/opt/local/bin/git checkout -- include/curl/curlbuild.h
-
diff --git a/MacOSX-Framework b/MacOSX-Framework
index 0c97acdc..6251bff2 100755
--- a/MacOSX-Framework
+++ b/MacOSX-Framework
@@ -10,6 +10,10 @@
# 10.5 is the *ONLY* SDK that support PPC64 :( -- 10.6 do not have ppc64 support
#If you need to have PPC64 support then change below to 1
PPC64_NEEDED=0
+# Apple does not support building for PPC anymore in Xcode 4 and later.
+# If you're using Xcode 3 or earlier and need PPC support, then change
+# the setting below to 1
+PPC_NEEDED=0
# For me the default is to develop for the platform I am on, and if you
#desire compatibility with older versions then change USE_OLD to 1 :)
@@ -24,9 +28,16 @@ FRAMEWORK_VERSION=Versions/Release-$VERSION
# and setup the right paths to this version, leaving the system version
# "intact", so you can "fix" it later with the links to Versions/A/...
-
-OLD_SDK=`ls /Developer/SDKs|head -1`
-NEW_SDK=`ls -r /Developer/SDKs|head -1`
+DEVELOPER_PATH=`xcode-select --print-path`
+# Around Xcode 4.3, SDKs were moved from the Developer folder into the
+# MacOSX.platform folder
+if test -d "$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"; then
+ SDK_PATH="$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"
+else
+ SDK_PATH="$DEVELOPER_PATH/SDKs";
+fi
+OLD_SDK=`ls $SDK_PATH|head -1`
+NEW_SDK=`ls -r $SDK_PATH|head -1`
if test "0"$USE_OLD -gt 0
then
@@ -37,21 +48,24 @@ fi
MACVER=`echo $SDK32|sed -e s/[a-zA-Z]//g -e s/.\$//`
-SDK32_DIR='/Developer/SDKs/'$SDK32
+SDK32_DIR=$SDK_PATH/$SDK32
MINVER32='-mmacosx-version-min='$MACVER
-ARCHES32='-arch i386 -arch ppc'
-
+if test $PPC_NEEDED -gt 0; then
+ ARCHES32='-arch i386 -arch ppc'
+else
+ ARCHES32='-arch i386'
+fi
if test $PPC64_NEEDED -gt 0
then
SDK64=10.5
ARCHES64='-arch x86_64 -arch ppc64'
- SDK64=`ls /Developer/SDKs|grep 10.5|head -1`
+ SDK64=`ls $SDK_PATH|grep 10.5|head -1`
else
ARCHES64='-arch x86_64'
#We "know" that 10.4 and earlier do not support 64bit
- OLD_SDK64=`ls /Developer/SDKs|egrep -v "10.[0-4]"|head -1`
- NEW_SDK64=`ls -r /Developer/SDKs|egrep -v "10.[0-4]"|head -1`
+ OLD_SDK64=`ls $SDK_PATH|egrep -v "10.[0-4]"|head -1`
+ NEW_SDK64=`ls -r $SDK_PATH|egrep -v "10.[0-4]"|head -1`
if test $USE_OLD -gt 0
then
SDK64=$OLD_SDK64
@@ -60,7 +74,7 @@ else
fi
fi
-SDK64_DIR='/Developer/SDKs/'$SDK64
+SDK64_DIR=$SDK_PATH/$SDK64
MACVER64=`echo $SDK64|sed -e s/[a-zA-Z]//g -e s/.\$//`
MINVER64='-mmacosx-version-min='$MACVER64
@@ -68,19 +82,19 @@ MINVER64='-mmacosx-version-min='$MACVER64
if test ! -z $SDK32; then
echo "----Configuring libcurl for 32 bit universal framework..."
make clean
- ./configure --disable-dependency-tracking --disable-static --with-gssapi \
- CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32 $MINVER32" \
- LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 $MINVER32 -Wl,-headerpad_max_install_names" \
+ ./configure --disable-dependency-tracking --disable-static --with-gssapi --with-darwinssl \
+ CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32" \
+ LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 -Wl,-headerpad_max_install_names" \
CC=$CC
echo "----Building 32 bit libcurl..."
- make
+ make -j `sysctl -n hw.logicalcpu_max`
echo "----Creating 32 bit framework..."
rm -r libcurl.framework
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl
- install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
+ install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
@@ -89,25 +103,25 @@ if test ! -z $SDK32; then
ln -fs ${FRAMEWORK_VERSION}/Resources Resources
ln -fs ${FRAMEWORK_VERSION}/Headers Headers
cd Versions
- ln -fs ${FRAMEWORK_VERSION} Current
+ ln -fs $(basename "${FRAMEWORK_VERSION}") Current
- echo TEsting for SDK64
+ echo Testing for SDK64
if test -d $SDK64_DIR; then
echo entering...
popd
make clean
echo "----Configuring libcurl for 64 bit universal framework..."
- ./configure --disable-dependency-tracking --disable-static --with-gssapi \
- CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64 $MINVER64" \
- LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 $MINVER64 -Wl,-headerpad_max_install_names" \
+ ./configure --disable-dependency-tracking --disable-static --with-gssapi --with-darwinssl \
+ CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64" \
+ LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 -Wl,-headerpad_max_install_names" \
CC=$CC
echo "----Building 64 bit libcurl..."
- make
+ make -j `sysctl -n hw.logicalcpu_max`
echo "----Appending 64 bit framework to 32 bit framework..."
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
- install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
+ install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32
pwd
lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl
diff --git a/Makefile.am b/Makefile.am
index 15836e9b..22823d9d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,24 +24,120 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
-CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
-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
+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
+
+VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl
+VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp.dist
+VC6_LIBDSP_DEPS = $(VC6_LIBTMPL) Makefile.am lib/Makefile.inc
+VC6_SRCTMPL = projects/Windows/VC6/src/curlsrc.tmpl
+VC6_SRCDSP = projects/Windows/VC6/src/curlsrc.dsp.dist
+VC6_SRCDSP_DEPS = $(VC6_SRCTMPL) Makefile.am src/Makefile.inc
+
+VC7_LIBTMPL = projects/Windows/VC7/lib/libcurl.tmpl
+VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj.dist
+VC7_LIBVCPROJ_DEPS = $(VC7_LIBTMPL) Makefile.am lib/Makefile.inc
+VC7_SRCTMPL = projects/Windows/VC7/src/curlsrc.tmpl
+VC7_SRCVCPROJ = projects/Windows/VC7/src/curlsrc.vcproj.dist
+VC7_SRCVCPROJ_DEPS = $(VC7_SRCTMPL) Makefile.am src/Makefile.inc
+
+VC71_LIBTMPL = projects/Windows/VC7.1/lib/libcurl.tmpl
+VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj.dist
+VC71_LIBVCPROJ_DEPS = $(VC71_LIBTMPL) Makefile.am lib/Makefile.inc
+VC71_SRCTMPL = projects/Windows/VC7.1/src/curlsrc.tmpl
+VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curlsrc.vcproj.dist
+VC71_SRCVCPROJ_DEPS = $(VC71_SRCTMPL) Makefile.am src/Makefile.inc
+
+VC8_LIBTMPL = projects/Windows/VC8/lib/libcurl.tmpl
+VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj.dist
+VC8_LIBVCPROJ_DEPS = $(VC8_LIBTMPL) Makefile.am lib/Makefile.inc
+VC8_SRCTMPL = projects/Windows/VC8/src/curlsrc.tmpl
+VC8_SRCVCPROJ = projects/Windows/VC8/src/curlsrc.vcproj.dist
+VC8_SRCVCPROJ_DEPS = $(VC8_SRCTMPL) Makefile.am src/Makefile.inc
+
+VC9_LIBTMPL = projects/Windows/VC9/lib/libcurl.tmpl
+VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj.dist
+VC9_LIBVCPROJ_DEPS = $(VC9_LIBTMPL) Makefile.am lib/Makefile.inc
+VC9_SRCTMPL = projects/Windows/VC9/src/curlsrc.tmpl
+VC9_SRCVCPROJ = projects/Windows/VC9/src/curlsrc.vcproj.dist
+VC9_SRCVCPROJ_DEPS = $(VC9_SRCTMPL) Makefile.am src/Makefile.inc
+
+VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl
+VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj.dist
+VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc
+VC10_SRCTMPL = projects/Windows/VC10/src/curlsrc.tmpl
+VC10_SRCVCXPROJ = projects/Windows/VC10/src/curlsrc.vcxproj.dist
+VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc
+
+VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl
+VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj.dist
+VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc
+VC11_SRCTMPL = projects/Windows/VC11/src/curlsrc.tmpl
+VC11_SRCVCXPROJ = projects/Windows/VC11/src/curlsrc.vcxproj.dist
+VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc
+
+VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl
+VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj.dist
+VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc
+VC12_SRCTMPL = projects/Windows/VC12/src/curlsrc.tmpl
+VC12_SRCVCXPROJ = projects/Windows/VC12/src/curlsrc.vcxproj.dist
+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-all.dsw \
+ projects/Windows/VC6/lib/libcurl.dsw \
+ projects/Windows/VC6/src/curlsrc.dsw \
+ projects/Windows/VC7/curl-all.sln \
+ projects/Windows/VC7/lib/libcurl.sln \
+ projects/Windows/VC7/src/curlsrc.sln \
+ projects/Windows/VC7.1/curl-all.sln \
+ projects/Windows/VC7.1/lib/libcurl.sln \
+ projects/Windows/VC7.1/src/curlsrc.sln \
+ projects/Windows/VC8/curl-all.sln \
+ projects/Windows/VC8/lib/libcurl.sln \
+ projects/Windows/VC8/src/curlsrc.sln \
+ projects/Windows/VC9/curl-all.sln \
+ projects/Windows/VC9/lib/libcurl.sln \
+ projects/Windows/VC9/src/curlsrc.sln \
+ projects/Windows/VC10/curl-all.sln \
+ projects/Windows/VC10/lib/libcurl.sln \
+ projects/Windows/VC10/src/curlsrc.sln \
+ projects/Windows/VC11/curl-all.sln \
+ projects/Windows/VC11/lib/libcurl.sln \
+ projects/Windows/VC11/src/curlsrc.sln \
+ projects/Windows/VC12/curl-all.sln \
+ projects/Windows/VC12/lib/libcurl.sln \
+ projects/Windows/VC12/src/curlsrc.sln
+
+WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
+ winbuild/MakefileBuild.vc winbuild/Makefile.vc \
+ winbuild/Makefile.msvc.names
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
- curl-style.el sample.emacs RELEASE-NOTES buildconf \
- libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
+ RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework scripts/zsh.pl \
+ $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in
+
+CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
+ $(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ) \
+ $(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) \
+ $(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ)
bin_SCRIPTS = curl-config
-SUBDIRS = lib src
-DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
+SUBDIRS = lib src include
+DIST_SUBDIRS = $(SUBDIRS) tests packages docs
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcurl.pc
+# List of files required to generate VC IDE .dsp, .vcproj and .vcxproj files
+include lib/Makefile.inc
+include src/Makefile.inc
+
dist-hook:
rm -rf $(top_builddir)/tests/log
find $(distdir) -name "*.dist" -exec rm {} \;
@@ -57,7 +153,7 @@ html:
pdf:
cd docs; make pdf
-check: test examples
+check: test examples check-docs
if CROSSCOMPILING
test-full: test
@@ -77,14 +173,24 @@ test-full:
test-torture:
@(cd tests; $(MAKE) all torture-test)
+test-am:
+ @(cd tests; $(MAKE) all am-test)
+
endif
examples:
@(cd docs/examples; $(MAKE) check)
+check-docs:
+ @(cd docs/libcurl; $(MAKE) check)
+
+# This is a hook to have 'make clean' also clean up the docs and the tests
+# dir. The extra check for the Makefiles being present is necessary because
+# 'make distcheck' will make clean first in these directories _before_ it runs
+# this hook.
clean-local:
- @(cd tests; $(MAKE) clean)
- @(cd docs; $(MAKE) clean)
+ @(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi)
+ @(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi)
#
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
@@ -145,9 +251,283 @@ uninstall-hook:
cd docs && $(MAKE) uninstall
ca-bundle: lib/mk-ca-bundle.pl
- @echo "generate a fresh ca-bundle.crt"
+ @echo "generating a fresh ca-bundle.crt"
@perl $< -b -l -u lib/ca-bundle.crt
ca-firefox: lib/firefox-db2pem.sh
- @echo "generate a fresh ca-bundle.crt"
+ @echo "generating a fresh ca-bundle.crt"
./lib/firefox-db2pem.sh lib/ca-bundle.crt
+
+checksrc:
+ cd lib && $(MAKE) checksrc
+ cd src && $(MAKE) checksrc
+
+.PHONY: vc-ide
+
+vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \
+ $(VC7_SRCVCPROJ_DEPS) $(VC71_LIBVCPROJ_DEPS) $(VC71_SRCVCPROJ_DEPS) \
+ $(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \
+ $(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \
+ $(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \
+ $(VC12_SRCVCXPROJ_DEPS)
+ @(win32_lib_srcs='$(LIB_CFILES)'; \
+ win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \
+ win32_lib_rc='$(LIB_RCFILES)'; \
+ win32_lib_vtls_srcs='$(LIB_VTLS_CFILES)'; \
+ win32_lib_vtls_hdrs='$(LIB_VTLS_HFILES)'; \
+ win32_src_srcs='$(CURL_CFILES)'; \
+ win32_src_hdrs='$(CURL_HFILES)'; \
+ win32_src_rc='$(CURL_RCFILES)'; \
+ win32_src_x_srcs='$(CURLX_CFILES)'; \
+ win32_src_x_hdrs='$(CURLX_HFILES) ../lib/config-win32.h'; \
+ \
+ sorted_lib_srcs=`for file in $$win32_lib_srcs; do echo $$file; done | sort`; \
+ sorted_lib_hdrs=`for file in $$win32_lib_hdrs; do echo $$file; done | sort`; \
+ sorted_lib_vtls_srcs=`for file in $$win32_lib_vtls_srcs; do echo $$file; done | sort`; \
+ sorted_lib_vtls_hdrs=`for file in $$win32_lib_vtls_hdrs; do echo $$file; done | sort`; \
+ sorted_src_srcs=`for file in $$win32_src_srcs; do echo $$file; done | sort`; \
+ sorted_src_hdrs=`for file in $$win32_src_hdrs; do echo $$file; done | sort`; \
+ sorted_src_x_srcs=`for file in $$win32_src_x_srcs; do echo $$file; done | sort`; \
+ sorted_src_x_hdrs=`for file in $$win32_src_x_hdrs; do echo $$file; done | sort`; \
+ \
+ awk_code='\
+function gen_element(type, dir, file)\
+{\
+ sub(/vtls\//, "", file);\
+\
+ spaces=" ";\
+ if(dir == "lib\\vtls")\
+ tabs=" ";\
+ else\
+ tabs=" ";\
+\
+ if(type == "dsp") {\
+ printf("# Begin Source File\r\n");\
+ printf("\r\n");\
+ printf("SOURCE=..\\..\\..\\..\\%s\\%s\r\n", dir, file);\
+ printf("# End Source File\r\n");\
+ }\
+ else if(type == "vcproj1") {\
+ printf("%s<File\r\n", tabs);\
+ printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\">\r\n",\
+ tabs, dir, file);\
+ printf("%s</File>\r\n", tabs);\
+ }\
+ else if(type == "vcproj2") {\
+ printf("%s<File\r\n", tabs);\
+ printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\"\r\n",\
+ tabs, dir, file);\
+ printf("%s>\r\n", tabs);\
+ printf("%s</File>\r\n", tabs);\
+ }\
+ else if(type == "vcxproj") {\
+ i = index(file, ".");\
+ ext = substr(file, i == 0 ? 0 : i + 1);\
+\
+ if(ext == "c")\
+ printf("%s<ClCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
+ spaces, dir, file);\
+ else if(ext == "h")\
+ printf("%s<ClInclude Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
+ spaces, dir, file);\
+ else if(ext == "rc")\
+ printf("%s<ResourceCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
+ spaces, dir, file);\
+ }\
+}\
+\
+{\
+\
+ if($$0 == "CURL_LIB_C_FILES") {\
+ split(lib_srcs, arr);\
+ for(val in arr) gen_element(proj_type, "lib", arr[val]);\
+ }\
+ else if($$0 == "CURL_LIB_H_FILES") {\
+ split(lib_hdrs, arr);\
+ for(val in arr) gen_element(proj_type, "lib", arr[val]);\
+ }\
+ else if($$0 == "CURL_LIB_RC_FILES") {\
+ split(lib_rc, arr);\
+ for(val in arr) gen_element(proj_type, "lib", arr[val]);\
+ }\
+ else if($$0 == "CURL_LIB_VTLS_C_FILES") {\
+ split(lib_vtls_srcs, arr);\
+ for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
+ }\
+ else if($$0 == "CURL_LIB_VTLS_H_FILES") {\
+ split(lib_vtls_hdrs, arr);\
+ for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
+ }\
+ else if($$0 == "CURL_SRC_C_FILES") {\
+ split(src_srcs, arr);\
+ for(val in arr) gen_element(proj_type, "src", arr[val]);\
+ }\
+ else if($$0 == "CURL_SRC_H_FILES") {\
+ split(src_hdrs, arr);\
+ for(val in arr) gen_element(proj_type, "src", arr[val]);\
+ }\
+ else if($$0 == "CURL_SRC_RC_FILES") {\
+ split(src_rc, arr);\
+ for(val in arr) gen_element(proj_type, "src", arr[val]);\
+ }\
+ else if($$0 == "CURL_SRC_X_C_FILES") {\
+ split(src_x_srcs, arr);\
+ for(val in arr) {\
+ sub(/..\/lib\//, "", arr[val]);\
+ gen_element(proj_type, "lib", arr[val]);\
+ }\
+ }\
+ else if($$0 == "CURL_SRC_X_H_FILES") {\
+ split(src_x_hdrs, arr);\
+ for(val in arr) {\
+ sub(/..\/lib\//, "", arr[val]);\
+ gen_element(proj_type, "lib", arr[val]);\
+ }\
+ }\
+ else\
+ printf("%s\r\n", $$0);\
+}';\
+ \
+ echo "generating '$(VC6_LIBDSP)'"; \
+ awk -v proj_type=dsp \
+ -v lib_srcs="$$sorted_lib_srcs" \
+ -v lib_hdrs="$$sorted_lib_hdrs" \
+ -v lib_rc="$$win32_lib_rc" \
+ -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
+ -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC6_LIBTMPL) > $(VC6_LIBDSP) || { exit 1; }; \
+ \
+ echo "generating '$(VC6_SRCDSP)'"; \
+ awk -v proj_type=dsp \
+ -v src_srcs="$$sorted_src_srcs" \
+ -v src_hdrs="$$sorted_src_hdrs" \
+ -v src_rc="$$win32_src_rc" \
+ -v src_x_srcs="$$sorted_src_x_srcs" \
+ -v src_x_hdrs="$$sorted_src_x_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC6_SRCTMPL) > $(VC6_SRCDSP) || { exit 1; }; \
+ \
+ echo "generating '$(VC7_LIBVCPROJ)'"; \
+ awk -v proj_type=vcproj1 \
+ -v lib_srcs="$$sorted_lib_srcs" \
+ -v lib_hdrs="$$sorted_lib_hdrs" \
+ -v lib_rc="$$win32_lib_rc" \
+ -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
+ -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC7_LIBTMPL) > $(VC7_LIBVCPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC7_SRCVCPROJ)'"; \
+ awk -v proj_type=vcproj1 \
+ -v src_srcs="$$sorted_src_srcs" \
+ -v src_hdrs="$$sorted_src_hdrs" \
+ -v src_rc="$$win32_src_rc" \
+ -v src_x_srcs="$$sorted_src_x_srcs" \
+ -v src_x_hdrs="$$sorted_src_x_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC7_SRCTMPL) > $(VC7_SRCVCPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC71_LIBVCPROJ)'"; \
+ awk -v proj_type=vcproj1 \
+ -v lib_srcs="$$sorted_lib_srcs" \
+ -v lib_hdrs="$$sorted_lib_hdrs" \
+ -v lib_rc="$$win32_lib_rc" \
+ -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
+ -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC71_LIBTMPL) > $(VC71_LIBVCPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC71_SRCVCPROJ)'"; \
+ awk -v proj_type=vcproj1 \
+ -v src_srcs="$$sorted_src_srcs" \
+ -v src_hdrs="$$sorted_src_hdrs" \
+ -v src_rc="$$win32_src_rc" \
+ -v src_x_srcs="$$sorted_src_x_srcs" \
+ -v src_x_hdrs="$$sorted_src_x_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC71_SRCTMPL) > $(VC71_SRCVCPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC8_LIBVCPROJ)'"; \
+ awk -v proj_type=vcproj2 \
+ -v lib_srcs="$$sorted_lib_srcs" \
+ -v lib_hdrs="$$sorted_lib_hdrs" \
+ -v lib_rc="$$win32_lib_rc" \
+ -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
+ -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC8_LIBTMPL) > $(VC8_LIBVCPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC8_SRCVCPROJ)'"; \
+ awk -v proj_type=vcproj2 \
+ -v src_srcs="$$sorted_src_srcs" \
+ -v src_hdrs="$$sorted_src_hdrs" \
+ -v src_rc="$$win32_src_rc" \
+ -v src_x_srcs="$$sorted_src_x_srcs" \
+ -v src_x_hdrs="$$sorted_src_x_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC8_SRCTMPL) > $(VC8_SRCVCPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC9_LIBVCPROJ)'"; \
+ awk -v proj_type=vcproj2 \
+ -v lib_srcs="$$sorted_lib_srcs" \
+ -v lib_hdrs="$$sorted_lib_hdrs" \
+ -v lib_rc="$$win32_lib_rc" \
+ -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
+ -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC9_LIBTMPL) > $(VC9_LIBVCPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC9_SRCVCPROJ)'"; \
+ awk -v proj_type=vcproj2 \
+ -v src_srcs="$$sorted_src_srcs" \
+ -v src_hdrs="$$sorted_src_hdrs" \
+ -v src_rc="$$win32_src_rc" \
+ -v src_x_srcs="$$sorted_src_x_srcs" \
+ -v src_x_hdrs="$$sorted_src_x_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC9_SRCTMPL) > $(VC9_SRCVCPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC10_LIBVCXPROJ)'"; \
+ awk -v proj_type=vcxproj \
+ -v lib_srcs="$$sorted_lib_srcs" \
+ -v lib_hdrs="$$sorted_lib_hdrs" \
+ -v lib_rc="$$win32_lib_rc" \
+ -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
+ -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC10_LIBTMPL) > $(VC10_LIBVCXPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC10_SRCVCXPROJ)'"; \
+ awk -v proj_type=vcxproj \
+ -v src_srcs="$$sorted_src_srcs" \
+ -v src_hdrs="$$sorted_src_hdrs" \
+ -v src_rc="$$win32_src_rc" \
+ -v src_x_srcs="$$sorted_src_x_srcs" \
+ -v src_x_hdrs="$$sorted_src_x_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC10_SRCTMPL) > $(VC10_SRCVCXPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC11_LIBVCXPROJ)'"; \
+ awk -v proj_type=vcxproj \
+ -v lib_srcs="$$sorted_lib_srcs" \
+ -v lib_hdrs="$$sorted_lib_hdrs" \
+ -v lib_rc="$$win32_lib_rc" \
+ -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
+ -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC11_LIBTMPL) > $(VC11_LIBVCXPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC11_SRCVCXPROJ)'"; \
+ awk -v proj_type=vcxproj \
+ -v src_srcs="$$sorted_src_srcs" \
+ -v src_hdrs="$$sorted_src_hdrs" \
+ -v src_rc="$$win32_src_rc" \
+ -v src_x_srcs="$$sorted_src_x_srcs" \
+ -v src_x_hdrs="$$sorted_src_x_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC11_SRCTMPL) > $(VC11_SRCVCXPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC12_LIBVCXPROJ)'"; \
+ awk -v proj_type=vcxproj \
+ -v lib_srcs="$$sorted_lib_srcs" \
+ -v lib_hdrs="$$sorted_lib_hdrs" \
+ -v lib_rc="$$win32_lib_rc" \
+ -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
+ -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC12_LIBTMPL) > $(VC12_LIBVCXPROJ) || { exit 1; }; \
+ \
+ echo "generating '$(VC12_SRCVCXPROJ)'"; \
+ awk -v proj_type=vcxproj \
+ -v src_srcs="$$sorted_src_srcs" \
+ -v src_hdrs="$$sorted_src_hdrs" \
+ -v src_rc="$$win32_src_rc" \
+ -v src_x_srcs="$$sorted_src_x_srcs" \
+ -v src_x_hdrs="$$sorted_src_x_hdrs" \
+ "$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; };)
diff --git a/Makefile.dist b/Makefile.dist
new file mode 100644
index 00000000..f0f50d8c
--- /dev/null
+++ b/Makefile.dist
@@ -0,0 +1,575 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+
+VC=vc6
+
+all:
+ ./configure
+ make
+
+ssl:
+ ./configure --with-ssl
+ make
+
+borland:
+ cd lib
+ $(MAKE) -f Makefile.b32
+ cd ..\src
+ $(MAKE) -f Makefile.b32
+
+borland-ssl:
+ cd lib
+ $(MAKE) -f Makefile.b32 WITH_SSL=1
+ cd ..\src
+ $(MAKE) -f Makefile.b32 WITH_SSL=1
+
+borland-ssl-zlib:
+ cd lib
+ $(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
+ cd ..\src
+ $(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
+
+borland-clean:
+ cd lib
+ $(MAKE) -f Makefile.b32 clean
+ cd ..\src
+ $(MAKE) -f Makefile.b32 clean
+
+watcom: .SYMBOLIC
+ cd lib && $(MAKE) -u -f Makefile.Watcom
+ cd src && $(MAKE) -u -f Makefile.Watcom
+
+watcom-clean: .SYMBOLIC
+ cd lib && $(MAKE) -u -f Makefile.Watcom clean
+ cd src && $(MAKE) -u -f Makefile.Watcom clean
+
+watcom-vclean: .SYMBOLIC
+ cd lib && $(MAKE) -u -f Makefile.Watcom vclean
+ cd src && $(MAKE) -u -f Makefile.Watcom vclean
+
+mingw32:
+ $(MAKE) -C lib -f Makefile.m32
+ $(MAKE) -C src -f Makefile.m32
+
+mingw32-clean:
+ $(MAKE) -C lib -f Makefile.m32 clean
+ $(MAKE) -C src -f Makefile.m32 clean
+ $(MAKE) -C docs/examples -f Makefile.m32 clean
+
+mingw32-vclean mingw32-distclean:
+ $(MAKE) -C lib -f Makefile.m32 vclean
+ $(MAKE) -C src -f Makefile.m32 vclean
+ $(MAKE) -C docs/examples -f Makefile.m32 vclean
+
+mingw32-examples%:
+ $(MAKE) -C docs/examples -f Makefile.m32 CFG=$@
+
+mingw32%:
+ $(MAKE) -C lib -f Makefile.m32 CFG=$@
+ $(MAKE) -C src -f Makefile.m32 CFG=$@
+
+vc-clean: $(VC)
+ cd lib
+ nmake -f Makefile.$(VC) clean
+ cd ..\src
+ nmake -f Makefile.$(VC) clean
+
+vc-all: $(VC)
+ cd lib
+ nmake -f Makefile.$(VC) cfg=release
+ nmake -f Makefile.$(VC) cfg=release-ssl
+ nmake -f Makefile.$(VC) cfg=release-zlib
+ nmake -f Makefile.$(VC) cfg=release-ssl-zlib
+ nmake -f Makefile.$(VC) cfg=release-ssl-dll
+ nmake -f Makefile.$(VC) cfg=release-zlib-dll
+ nmake -f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
+ nmake -f Makefile.$(VC) cfg=release-dll
+ nmake -f Makefile.$(VC) cfg=release-dll-ssl-dll
+ nmake -f Makefile.$(VC) cfg=release-dll-zlib-dll
+ nmake -f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
+ nmake -f Makefile.$(VC) cfg=debug
+ nmake -f Makefile.$(VC) cfg=debug-ssl
+ nmake -f Makefile.$(VC) cfg=debug-zlib
+ nmake -f Makefile.$(VC) cfg=debug-ssl-zlib
+ nmake -f Makefile.$(VC) cfg=debug-ssl-dll
+ nmake -f Makefile.$(VC) cfg=debug-zlib-dll
+ nmake -f Makefile.$(VC) cfg=debug-ssl-dll-zlib-dll
+ nmake -f Makefile.$(VC) cfg=debug-dll
+ nmake -f Makefile.$(VC) cfg=debug-dll-ssl-dll
+ nmake -f Makefile.$(VC) cfg=debug-dll-zlib-dll
+ nmake -f Makefile.$(VC) cfg=debug-dll-ssl-dll-zlib-dll
+
+vc: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release
+ cd ..\src
+ nmake /f Makefile.$(VC)
+
+vc-x64: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
+ 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
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-zlib
+
+vc-x64-zlib: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib
+ 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)
+ cd lib
+ nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1
+ cd ..\src
+ nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1
+
+vc-winssl-idn: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
+
+vc-x64-winssl-idn: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
+ cd ..\src
+ nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
+
+vc-winssl-zlib: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-winssl-zlib WINDOWS_SSPI=1
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-winssl-zlib WINDOWS_SSPI=1
+
+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)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
+
+vc-x64-winssl-zlib-idn: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
+ cd ..\src
+ nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
+
+vc-ssl-dll: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-ssl-dll
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-ssl-dll
+
+vc-dll-ssl-dll: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
+
+vc-dll: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-dll
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-dll
+
+vc-dll-zlib-dll: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
+
+vc-dll-ssl-dll-zlib-dll: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
+
+vc-ssl-dll-zlib-dll: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
+
+vc-zlib-dll: $(VC)
+ cd lib
+ nmake /f Makefile.$(VC) cfg=release-zlib-dll
+ cd ..\src
+ nmake /f Makefile.$(VC) cfg=release-zlib-dll
+
+djgpp:
+ $(MAKE) -C lib -f Makefile.dj
+ $(MAKE) -C src -f Makefile.dj
+
+cygwin:
+ ./configure
+ make
+
+cygwin-ssl:
+ ./configure --with-ssl
+ make
+
+amiga:
+ cd ./lib && make -f makefile.amiga
+ cd ./src && make -f makefile.amiga
+
+netware:
+ $(MAKE) -C lib -f Makefile.netware
+ $(MAKE) -C src -f Makefile.netware
+
+netware-clean:
+ $(MAKE) -C lib -f Makefile.netware clean
+ $(MAKE) -C src -f Makefile.netware clean
+ $(MAKE) -C docs/examples -f Makefile.netware clean
+
+netware-vclean netware-distclean:
+ $(MAKE) -C lib -f Makefile.netware vclean
+ $(MAKE) -C src -f Makefile.netware vclean
+ $(MAKE) -C docs/examples -f Makefile.netware vclean
+
+netware-install:
+ $(MAKE) -C lib -f Makefile.netware install
+ $(MAKE) -C src -f Makefile.netware install
+
+netware-examples-%:
+ $(MAKE) -C docs/examples -f Makefile.netware CFG=$@
+
+netware-%:
+ $(MAKE) -C lib -f Makefile.netware CFG=$@
+ $(MAKE) -C src -f Makefile.netware CFG=$@
+
+unix: all
+
+unix-ssl: ssl
+
+linux: all
+
+linux-ssl: ssl
+
+# We don't need to do anything for vc6.
+vc6:
+
+# VC7 makefiles are for use with VS.NET and VS.NET 2003
+vc7: lib/Makefile.vc7 src/Makefile.vc7
+
+lib/Makefile.vc7: lib/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s/VC6/VC7/g" lib/Makefile.vc6 > lib/Makefile.vc7
+
+src/Makefile.vc7: src/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s/VC6/VC7/g" src/Makefile.vc6 > src/Makefile.vc7
+
+# VC8 makefiles are for use with VS2005
+vc8: lib/Makefile.vc8 src/Makefile.vc8
+
+lib/Makefile.vc8: lib/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" lib/Makefile.vc6 > lib/Makefile.vc8
+
+src/Makefile.vc8: src/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" src/Makefile.vc6 > src/Makefile.vc8
+
+# VC9 makefiles are for use with VS2008
+vc9: lib/Makefile.vc9 src/Makefile.vc9
+
+lib/Makefile.vc9: lib/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" lib/Makefile.vc6 > lib/Makefile.vc9
+
+src/Makefile.vc9: src/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" src/Makefile.vc6 > src/Makefile.vc9
+
+# VC10 makefiles are for use with VS2010
+vc10: lib/Makefile.vc10 src/Makefile.vc10
+
+lib/Makefile.vc10: lib/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" lib/Makefile.vc6 > lib/Makefile.vc10
+
+src/Makefile.vc10: src/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" src/Makefile.vc6 > src/Makefile.vc10
+
+# VC11 makefiles are for use with VS2012
+vc11: lib/Makefile.vc11 src/Makefile.vc11
+
+lib/Makefile.vc11: lib/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc11/g" -e "s/VC6/VC11/g" lib/Makefile.vc6 > lib/Makefile.vc11
+
+src/Makefile.vc11: src/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc11/g" -e "s/VC6/VC11/g" src/Makefile.vc6 > src/Makefile.vc11
+
+# VC12 makefiles are for use with VS2013
+vc12: lib/Makefile.vc12 src/Makefile.vc12
+
+lib/Makefile.vc12: lib/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc12/g" -e "s/VC6/VC12/g" lib/Makefile.vc6 > lib/Makefile.vc12
+
+src/Makefile.vc12: src/Makefile.vc6
+ @echo "generate $@"
+ @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc12/g" -e "s/VC6/VC12/g" src/Makefile.vc6 > src/Makefile.vc12
+
+ca-bundle: lib/mk-ca-bundle.pl
+ @echo "generate a fresh ca-bundle.crt"
+ @perl $< -b -l -u lib/ca-bundle.crt
+
+ca-firefox: lib/firefox-db2pem.sh
+ @echo "generate a fresh ca-bundle.crt"
+ ./lib/firefox-db2pem.sh lib/ca-bundle.crt
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 661fe8d7..00000000
--- a/Makefile.in
+++ /dev/null
@@ -1,893 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-###########################################################################
-
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/curl-config.in \
- $(srcdir)/libcurl.pc.in $(top_srcdir)/configure COPYING \
- compile config.guess config.sub depcomp install-sh ltmain.sh \
- missing mkinstalldirs
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES = curl-config libcurl.pc
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"
-binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-SCRIPTS = $(bin_SCRIPTS)
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-pkgconfigDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(pkgconfig_DATA)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
- { test ! -d $(distdir) \
- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = foreign
-ACLOCAL_AMFLAGS = -I m4
-CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
-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
-
-EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
- curl-style.el sample.emacs RELEASE-NOTES buildconf \
- libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
-
-bin_SCRIPTS = curl-config
-SUBDIRS = lib src
-DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libcurl.pc
-all: all-recursive
-
-.SUFFIXES:
-am--refresh:
- @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
- cd $(srcdir) && $(AUTOMAKE) --foreign \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-curl-config: $(top_builddir)/config.status $(srcdir)/curl-config.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-libcurl.pc: $(top_builddir)/config.status $(srcdir)/libcurl.pc.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-install-binSCRIPTS: $(bin_SCRIPTS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
- @list='$(bin_SCRIPTS)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f $$d$$p; then \
- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
- $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
- else :; fi; \
- done
-
-uninstall-binSCRIPTS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_SCRIPTS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-pkgconfigDATA: $(pkgconfig_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
- @list='$(pkgconfig_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
- $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
- done
-
-uninstall-pkgconfigDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(pkgconfig_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
- rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- $(am__remove_distdir)
- mkdir $(distdir)
- $(mkdir_p) $(distdir)/. $(distdir)/CMake $(distdir)/CMake/Platforms $(distdir)/include/curl $(distdir)/m4 $(distdir)/packages/AIX/RPM $(distdir)/packages/EPM $(distdir)/packages/Linux/RPM
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$(top_distdir)" distdir="$(distdir)" \
- dist-hook
- -find "$(distdir)" -type d ! -perm -755 \
- -exec chmod u+rwx,go+rx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
-dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-
-dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
-
-dist-tarZ: distdir
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
-
-dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
-
-dist-zip: distdir
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- case '$(DIST_ARCHIVES)' in \
- *.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
- *.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
- *.zip*) \
- unzip $(distdir).zip ;;\
- esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
- chmod a-w $(distdir)
- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && cd $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
- distuninstallcheck \
- && chmod -R a-w "$$dc_install_base" \
- && ({ \
- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
- } || { rm -rf "$$dc_destdir"; exit 1; }) \
- && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
- $(am__remove_distdir)
- @(echo "$(distdir) archives ready for distribution: "; \
- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
-distuninstallcheck:
- @cd $(distuninstallcheck_dir) \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
- || { echo "ERROR: files left after uninstall:" ; \
- if test -n "$(DESTDIR)"; then \
- echo " (check DESTDIR support)"; \
- fi ; \
- $(distuninstallcheck_listfiles) ; \
- exit 1; } >&2
-distcleancheck: distclean
- @if test '$(srcdir)' = . ; then \
- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
- exit 1 ; \
- fi
- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left in build directory after distclean:" ; \
- $(distcleancheck_listfiles) ; \
- exit 1; } >&2
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(SCRIPTS) $(DATA)
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool clean-local mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-pkgconfigDATA
- @$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
-
-install-exec-am: install-binSCRIPTS
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-binSCRIPTS uninstall-info-am \
- uninstall-pkgconfigDATA
- @$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-libtool clean-local \
- clean-recursive ctags ctags-recursive dist dist-all dist-bzip2 \
- dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
- distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-binSCRIPTS install-data \
- install-data-am install-data-hook install-exec install-exec-am \
- install-info install-info-am install-man install-pkgconfigDATA \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am \
- uninstall-binSCRIPTS uninstall-hook uninstall-info-am \
- uninstall-pkgconfigDATA
-
-
-dist-hook:
- rm -rf $(top_builddir)/tests/log
- find $(distdir) -name "*.dist" -exec rm {} \;
- (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
- for file in $$distit; do \
- strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
- cp $$file $(distdir)$$strip; \
- done)
-
-html:
- cd docs; make html
-
-pdf:
- cd docs; make pdf
-
-check: test examples
-
-@CROSSCOMPILING_TRUE@test-full: test
-@CROSSCOMPILING_TRUE@test-torture: test
-
-@CROSSCOMPILING_TRUE@test:
-@CROSSCOMPILING_TRUE@ @echo "NOTICE: we can't run the tests when cross-compiling!"
-
-@CROSSCOMPILING_FALSE@test:
-@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all quiet-test)
-
-@CROSSCOMPILING_FALSE@test-full:
-@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all full-test)
-
-@CROSSCOMPILING_FALSE@test-torture:
-@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all torture-test)
-
-examples:
- @(cd docs/examples; $(MAKE) check)
-
-clean-local:
- @(cd tests; $(MAKE) clean)
- @(cd docs; $(MAKE) clean)
-
-#
-# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
-# must contain the following line:
-# %_topdir /home/loic/local/rpm
-# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
-#
-# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
-#
-# If additional configure flags are needed to build the package, add the
-# following in ~/.rpmmacros
-# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
-# and run make rpm in the following way:
-# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
-#
-
-rpms:
- $(MAKE) RPMDIST=curl rpm
- $(MAKE) RPMDIST=curl-ssl rpm
-
-rpm:
- RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
- cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
- cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
- rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
- mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
- mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
-
-#
-# Build a Solaris pkgadd format file
-# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
-# file (which ends up back in this directory).
-# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
-# pkgadd -d ./HAXXcurl-*
-#
-
-# gak - libtool requires an absoulte directory, hence the pwd below...
-pkgadd:
- umask 022 ; \
- make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
- cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
- cd $(srcdir)/packages/Solaris && $(MAKE) package
-
-#
-# Build a cygwin binary tarball installation file
-# resulting .tar.bz2 file will end up at packages/Win32/cygwin
-cygwinbin:
- $(MAKE) -C packages/Win32/cygwin cygwinbin
-
-# We extend the standard install with a custom hook:
-install-data-hook:
- cd include && $(MAKE) install
- cd docs && $(MAKE) install
-
-# We extend the standard uninstall with a custom hook:
-uninstall-hook:
- cd include && $(MAKE) uninstall
- cd docs && $(MAKE) uninstall
-
-ca-bundle: lib/mk-ca-bundle.pl
- @echo "generate a fresh ca-bundle.crt"
- @perl $< -b -l -u lib/ca-bundle.crt
-
-ca-firefox: lib/firefox-db2pem.sh
- @echo "generate a fresh ca-bundle.crt"
- ./lib/firefox-db2pem.sh lib/ca-bundle.crt
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/README b/README
index 2ffacc32..d92c7f8b 100644
--- a/README
+++ b/README
@@ -38,12 +38,12 @@ GIT
To download the very latest source off the GIT server do this:
- git clone git://github.com/bagder/curl.git
+ git clone https://github.com/bagder/curl.git
(you'll get a directory named curl created, filled with the source code)
NOTICE
Curl contains pieces of source code that is Copyright (c) 1998, 1999
- Kungliga Tekniska Högskolan. This notice is included here to comply with the
+ Kungliga Tekniska Högskolan. This notice is included here to comply with the
distribution terms.
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 0d1896dc..82f0348a 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,61 +1,92 @@
-Curl and libcurl 7.21.2
+Curl and libcurl 7.43.0
- Public curl releases: 118
- Command line options: 138
- curl_easy_setopt() options: 180
+ Public curl releases: 147
+ Command line options: 176
+ curl_easy_setopt() options: 219
Public functions in libcurl: 58
- Known libcurl bindings: 39
- Contributors: 817
+ Contributors: 1291
This release includes the following changes:
- o curl -T: ignore file size of special files
- o Added GOPHER protocol support
- o Added mk-ca-bundle.vbs script
- o c-ares build now requires c-ares >= 1.6.0
+ o Added CURLOPT_PROXY_SERVICE_NAME[11]
+ o Added CURLOPT_SERVICE_NAME[12]
+ o New curl option: --proxy-service-name[13]
+ o Mew curl option: --service-name [14]
+ o New curl option: --data-raw [5]
+ o Added CURLOPT_PIPEWAIT [15]
+ o Added support for multiplexing transfers using HTTP/2, enable this
+ with the new CURLPIPE_MULTIPLEX bit for CURLMOPT_PIPELINING [16]
+ o HTTP/2: requires nghttp2 1.0.0 or later
+ o scripts: add zsh.pl for generating zsh completion
+ o curl.h: add CURL_HTTP_VERSION_2
This release includes the following bugfixes:
- o --remote-header-name security vulnerability fixed:
- http://curl.haxx.se/docs/adv_20101013.html
-
- o multi: support the timeouts correctly, fixes known bug #62
- o multi: use timeouts properly for MAX_RECV/SEND_SPEED
- o negotiation: Wrong proxy authorization
- o multi: avoid sending multiple complete messages
- o cmdline: make -F type= accept ;charset=
- o RESUME_FROM: clarify what ftp uploads do
- o http: handle trailer headers in all chunked responses
- o Curl_is_connected: use correct errno
- o Added SSPI build to Watcom makefile
- o progress: callback for POSTs less than MAX_INITIAL_POST_SIZE
- o linking problem on Fedora 13
- o Link curl and the test apps with -lrt explicitly when necessary
- o chunky parser: only rewind stream internally if needed
- o remote-header-name: don't output filename when NULL
- o Curl_timeleft: avoid returning "no timeout" by mistake
- o timeout: use the correct start value as offset
- o FTP: fix wrong timeout trigger
- o buildconf got better output on failures
- o rtsp: avoid SIGSEGV on malformed header
- o LDAP: Support for tunnelling queries through HTTP proxy
- o configure's --enable-werror had a bashism
- o test565: Don't hardcode IP:PORT
- o configure: check for gcrypt if using GnuTLS
- o configure: don't enable RTMP if the lib detect fails
- o curl_easy_duphandle: clone the c-ares handle correctly
- o MacOSX-Framework: updates for Snowleopard
- o support URL containing colon without trailing port number
- o parsedate: allow time specified without seconds
- o curl_easy_escape: don't escape "unreserved" characters
- o SFTP: avoid downloading negative sizes
- o Lots of GSS/KRB FTP fixes
- o TFTP: Work around tftpd-hpa upload bug
- o libcurl.m4: several fixes
- o HTTP: remove special case for 416
- o examples: use example.com in example URLs
- o globbing: fix crash on unballanced open brace
- o cmake: build fixed
+ o CVE-2015-3236: lingering HTTP credentials in connection re-use [30]
+ o CVE-2015-3237: SMB send off unrelated memory contents [31]
+ o nss: fix compilation failure with old versions of NSS [1]
+ o curl_easy_getinfo.3: document 'internals' in CURLINFO_TLS_SESSION
+ o schannel.c: Fix possible SEC_E_BUFFER_TOO_SMALL error
+ o Curl_ossl_init: load builtin modules [2]
+ o configure: follow-up fix for krb5-config [3]
+ o sasl_sspi: Populate domain from the realm in the challenge [4]
+ o netrc: support 'default' token
+ o README: convert to UTF-8
+ o cyassl: Implement public key pinning
+ o nss: implement public key pinning for NSS backend
+ o mingw build: add arch -m32/-m64 to LDFLAGS
+ o schannel: Fix out of bounds array [6]
+ o configure: remove autogenerated files by autoconf
+ o configure: remove --automake from libtoolize call
+ o acinclude.m4: fix shell test for default CA cert bundle/path
+ o schannel: fix regression in schannel_recv [7]
+ o openssl: skip trace outputs for ssl_ver == 0 [8]
+ o gnutls: properly retrieve certificate status
+ o netrc: Read in text mode when cygwin [9]
+ o winbuild: Document the option used to statically link the CRT [10]
+ o FTP: Make EPSV use the control IP address rather than the original host
+ o FTP: fix dangling conn->ip_addr dereference on verbose EPSV
+ o conncache: keep bundles on host+port bases, not only host names
+ o runtests.pl: use 'h2c' now, no -14 anymore
+ o curlver: introducing new version number (checking) macros
+ o openssl: boringssl build brekage, use SSL_CTX_set_msg_callback [17]
+ o CURLOPT_POSTFIELDS.3: correct variable names [18]
+ o curl_easy_unescape.3: update RFC reference [19]
+ o gnutls: don't fail on non-fatal alerts during handshake
+ o testcurl.pl: allow source to be in an arbitrary directory
+ o CURLOPT_HTTPPROXYTUNNEL.3: only works with a HTTP proxy
+ o SSPI-error: Change SEC_E_ILLEGAL_MESSAGE description [20]
+ o parse_proxy: switch off tunneling if non-HTTP proxy [21]
+ o share_init: fix OOM crash
+ o perl: remove subdir, not touched in 9 years
+ o CURLOPT_COOKIELIST.3: Add example
+ o CURLOPT_COOKIE.3: Explain that the cookies won't be modified [22]
+ o CURLOPT_COOKIELIST.3: Explain Set-Cookie without a domain [23]
+ o FAQ: How do I port libcurl to my OS?
+ o openssl: Use TLS_client_method for OpenSSL 1.1.0+
+ o HTTP-NTLM: fail auth on connection close instead of looping [24]
+ o curl_setup: Add macros for FOPEN_READTEXT, FOPEN_WRITETEXT [25]
+ o curl_getdate.3: update RFC reference
+ o curl_multi_info_read.3: added example
+ o curl_multi_perform.3: added example
+ o curl_multi_timeout.3: added example
+ o cookie: Stop exporting any-domain cookies [26]
+ o openssl: remove dummy callback use from SSL_CTX_set_verify()
+ o openssl: remove SSL_get_session()-using code
+ o openssl: removed USERDATA_IN_PWD_CALLBACK kludge
+ o openssl: removed error string #ifdef
+ o openssl: Fix verification of server-sent legacy intermediates [27]
+ o docs: man page indentation and syntax fixes
+ o docs: Spelling fixes
+ o fopen.c: fix a few compiler warnings
+ o CURLOPT_OPENSOCKETFUNCTION: return error at once [28]
+ o schannel: Add support for optional client certificates
+ o build: Properly detect OpenSSL 1.0.2 when using configure
+ o urldata: store POST size in state.infilesize too [29]
+ o security:choose_mech remove dead code
+ o rtsp_do: remove dead code
+ o docs: many HTTP URIs changed to HTTPS
+ o schannel: schannel_recv overhaul [32]
This release includes the following known bugs:
@@ -64,10 +95,51 @@ 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:
- Kamil Dudka, Ben Greear, Cameron Kaiser, Dan Fandrich, Dirk Manske,
- Guenter Knauf, Julien Chaffraix, Quanah Gibson-Mount, Tor Arntsen,
- Peter Pentchev, James Bursa, Fabian Keil, Michal Gorny, Mauro Iorio,
- Hendrik Visage, Ning Dong, David McCreedy, Patrick Monnerat,
- Tim Newsome, Dan Locks, Vlad Ureche, Dimitre Dimitrov
+ Alessandro Ghedini, Alexander Dyagilev, Anders Bakken, Anthony Avina,
+ Ashish Shukla, Bert Huijben, Brian Chrisman, Brian Prodoehl, Chris Araman,
+ Dagobert Michelsen, Dan Fandrich, Daniel Melani, Daniel Stenberg,
+ Dmitry Eremin-Solenikov, Drake Arconis, Egon Eckert, Frank Meier, Fred Stluka,
+ Gisle Vanem, Grant Pannell, Isaac Boukris, Jens Rantil, Joel Depooter,
+ Kamil Dudka, Linus Nielsen Feltzing, Linus Nielsen Feltzing Feltzing,
+ Liviu Chircu, Marc Hoersken, Michael Osipov, Oren Souroujon, Orgad Shaneh,
+ Patrick Monnerat, Patrick Rapin, Paul Howarth, Paul Oliver, Rafayel Mkrtchyan,
+ Ray Satiro, Sean Boudreau, Tatsuhiro Tsujikawa, Tomas Tomecek, Viktor Szakáts,
+ Ville Skyttä, Yehezkel Horowitz,
+ (43 contributors)
Thanks! (and sorry if I forgot to mention someone)
+
+References to bug reports and discussions on issues:
+
+ [1] = http://curl.haxx.se/mail/lib-2015-04/0095.html
+ [2] = https://github.com/bagder/curl/pull/206
+ [3] = https://github.com/bagder/curl/commit/5b668606527613179d0349f21b4ab0df2971e3d2#commitcomment-10473445
+ [4] = https://github.com/bagder/curl/pull/141
+ [5] = https://github.com/bagder/curl/issues/198
+ [6] = http://curl.haxx.se/mail/lib-2015-04/0199.html
+ [7] = https://github.com/bagder/curl/issues/244
+ [8] = https://github.com/bagder/curl/issues/219
+ [9] = https://github.com/bagder/curl/pull/258
+ [10] = https://github.com/bagder/curl/issues/254
+ [11] = http://curl.haxx.se/libcurl/c/CURLOPT_PROXY_SERVICE_NAME.html
+ [12] = http://curl.haxx.se/libcurl/c/CURLOPT_SERVICE_NAME.html
+ [13] = http://curl.haxx.se/docs/manpage.html#--proxy-service-name
+ [14] = http://curl.haxx.se/docs/manpage.html#--service-name
+ [15] = http://curl.haxx.se/libcurl/c/CURLOPT_PIPEWAIT.html
+ [16] = http://curl.haxx.se/libcurl/c/CURLMOPT_PIPELINING.html
+ [17] = https://github.com/bagder/curl/issues/275
+ [18] = https://github.com/bagder/curl/issues/281
+ [19] = https://github.com/bagder/curl/issues/282
+ [20] = https://github.com/bagder/curl/issues/267
+ [21] = http://curl.haxx.se/mail/lib-2015-05/0056.html
+ [22] = http://curl.haxx.se/mail/lib-2015-05/0115.html
+ [23] = http://curl.haxx.se/mail/lib-2015-05/0137.html
+ [24] = https://github.com/bagder/curl/issues/256
+ [25] = https://github.com/bagder/curl/pull/258#issuecomment-107093055
+ [26] = https://github.com/bagder/curl/issues/292
+ [27] = https://rt.openssl.org/Ticket/Display.html?id=3621&user=guest&pass=guest
+ [28] = http://curl.haxx.se/mail/lib-2015-06/0047.html
+ [29] = http://curl.haxx.se/mail/lib-2015-06/0019.html
+ [30] = http://curl.haxx.se/docs/adv_20150617A.html
+ [31] = http://curl.haxx.se/docs/adv_20150617B.html
+ [32] = https://github.com/bagder/curl/issues/244
diff --git a/acinclude.m4 b/acinclude.m4
index 225fb9d1..f0132a57 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -51,7 +51,7 @@ CURL_DEF_TOKEN $1
],[
tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
"$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[[ ]]//' 2>/dev/null | \
+ "$SED" 's/.*CURL_DEF_TOKEN[[ ]][[ ]]*//' 2>/dev/null | \
"$SED" 's/[["]][[ ]]*[["]]//g' 2>/dev/null`
if test -z "$tmp_exp" || test "$tmp_exp" = "$1"; then
tmp_exp=""
@@ -130,7 +130,7 @@ int main (void)
]])
],[
tst_lib_xnet_required="yes"
- LIBS="$LIBS -lxnet"
+ LIBS="-lxnet $LIBS"
])
AC_MSG_RESULT([$tst_lib_xnet_required])
])
@@ -150,6 +150,7 @@ AC_DEFUN([CURL_CHECK_AIX_ALL_SOURCE], [
#endif])
AC_BEFORE([$0], [AC_SYS_LARGEFILE])dnl
AC_BEFORE([$0], [CURL_CONFIGURE_REENTRANT])dnl
+ AC_BEFORE([$0], [CURL_CONFIGURE_PULL_SYS_POLL])dnl
AC_MSG_CHECKING([if OS is AIX (to define _ALL_SOURCE)])
AC_EGREP_CPP([yes_this_is_aix],[
#ifdef _AIX
@@ -228,12 +229,7 @@ AC_DEFUN([CURL_CHECK_NATIVE_WINDOWS], [
])
fi
])
- case "$ac_cv_native_windows" in
- yes)
- AC_DEFINE_UNQUOTED(NATIVE_WINDOWS, 1,
- [Define to 1 if you are building a native Windows target.])
- ;;
- esac
+ AM_CONDITIONAL(DOING_NATIVE_WINDOWS, test "x$ac_cv_native_windows" = xyes)
])
@@ -1601,200 +1597,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
fi
])
-
-dnl CURL_CHECK_FUNC_RECVFROM
-dnl -------------------------------------------------
-dnl Test if the socket recvfrom() function is available,
-dnl and check its return type and the types of its
-dnl arguments. If the function succeeds HAVE_RECVFROM
-dnl will be defined, defining the types of the arguments
-dnl in RECVFROM_TYPE_ARG1, RECVFROM_TYPE_ARG2, and so on
-dnl to RECVFROM_TYPE_ARG6, defining also the type of the
-dnl function return value in RECVFROM_TYPE_RETV.
-dnl Notice that the types returned for pointer arguments
-dnl will actually be the type pointed by the pointer.
-
-AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
- AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
- AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
- AC_CHECK_HEADERS(sys/types.h sys/socket.h)
- #
- AC_MSG_CHECKING([for recvfrom])
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
- ]],[[
- recvfrom(0, 0, 0, 0, 0, 0);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- curl_cv_recvfrom="yes"
- ],[
- AC_MSG_RESULT([no])
- curl_cv_recvfrom="no"
- ])
- #
- if test "$curl_cv_recvfrom" = "yes"; then
- AC_CACHE_CHECK([types of args and return type for recvfrom],
- [curl_cv_func_recvfrom_args], [
- curl_cv_func_recvfrom_args="unknown"
- for recvfrom_retv in 'int' 'ssize_t'; do
- for recvfrom_arg1 in 'int' 'ssize_t' 'SOCKET'; do
- for recvfrom_arg2 in 'char *' 'void *'; do
- for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
- for recvfrom_arg4 in 'int' 'unsigned int'; do
- for recvfrom_arg5 in 'struct sockaddr *' 'void *'; do
- for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
- if test "$curl_cv_func_recvfrom_args" = "unknown"; then
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#define RECVFROMCALLCONV PASCAL
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#define RECVFROMCALLCONV
-#endif
- extern $recvfrom_retv RECVFROMCALLCONV
- recvfrom($recvfrom_arg1, $recvfrom_arg2,
- $recvfrom_arg3, $recvfrom_arg4,
- $recvfrom_arg5, $recvfrom_arg6);
- ]],[[
- $recvfrom_arg1 s=0;
- $recvfrom_arg2 buf=0;
- $recvfrom_arg3 len=0;
- $recvfrom_arg4 flags=0;
- $recvfrom_arg5 addr=0;
- $recvfrom_arg6 addrlen=0;
- $recvfrom_retv res=0;
- res = recvfrom(s, buf, len, flags, addr, addrlen);
- ]])
- ],[
- curl_cv_func_recvfrom_args="$recvfrom_arg1,$recvfrom_arg2,$recvfrom_arg3,$recvfrom_arg4,$recvfrom_arg5,$recvfrom_arg6,$recvfrom_retv"
- ])
- fi
- done
- done
- done
- done
- done
- done
- done
- ]) # AC-CACHE-CHECK
- # Nearly last minute change for this release starts here
- AC_DEFINE_UNQUOTED(HAVE_RECVFROM, 1,
- [Define to 1 if you have the recvfrom function.])
- ac_cv_func_recvfrom="yes"
- # Nearly last minute change for this release ends here
- if test "$curl_cv_func_recvfrom_args" = "unknown"; then
- AC_MSG_WARN([Cannot find proper types to use for recvfrom args])
- else
- recvfrom_prev_IFS=$IFS; IFS=','
- set dummy `echo "$curl_cv_func_recvfrom_args" | sed 's/\*/\*/g'`
- IFS=$recvfrom_prev_IFS
- shift
- #
- recvfrom_ptrt_arg2=$[2]
- recvfrom_ptrt_arg5=$[5]
- recvfrom_ptrt_arg6=$[6]
- #
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG1, $[1],
- [Define to the type of arg 1 for recvfrom.])
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG3, $[3],
- [Define to the type of arg 3 for recvfrom.])
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG4, $[4],
- [Define to the type of arg 4 for recvfrom.])
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_RETV, $[7],
- [Define to the function return type for recvfrom.])
- #
- prev_sh_opts=$-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set -f
- ;;
- esac
- #
- recvfrom_type_arg2=`echo $recvfrom_ptrt_arg2 | sed 's/ \*//'`
- recvfrom_type_arg5=`echo $recvfrom_ptrt_arg5 | sed 's/ \*//'`
- recvfrom_type_arg6=`echo $recvfrom_ptrt_arg6 | sed 's/ \*//'`
- #
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2, $recvfrom_type_arg2,
- [Define to the type pointed by arg 2 for recvfrom.])
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5, $recvfrom_type_arg5,
- [Define to the type pointed by arg 5 for recvfrom.])
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6, $recvfrom_type_arg6,
- [Define to the type pointed by arg 6 for recvfrom.])
- #
- if test "$recvfrom_type_arg2" = "void"; then
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2_IS_VOID, 1,
- [Define to 1 if the type pointed by arg 2 for recvfrom is void.])
- fi
- if test "$recvfrom_type_arg5" = "void"; then
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5_IS_VOID, 1,
- [Define to 1 if the type pointed by arg 5 for recvfrom is void.])
- fi
- if test "$recvfrom_type_arg6" = "void"; then
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6_IS_VOID, 1,
- [Define to 1 if the type pointed by arg 6 for recvfrom is void.])
- fi
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set +f
- ;;
- esac
- #
- AC_DEFINE_UNQUOTED(HAVE_RECVFROM, 1,
- [Define to 1 if you have the recvfrom function.])
- ac_cv_func_recvfrom="yes"
- fi
- else
- AC_MSG_WARN([Unable to link function recvfrom])
- fi
-])
-
-
dnl CURL_CHECK_MSG_NOSIGNAL
dnl -------------------------------------------------
dnl Check for MSG_NOSIGNAL
@@ -2145,7 +1947,6 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
else
LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS"
fi
- CURL_LIBS="$CURL_LIBS $curl_cv_gclk_LIBS"
AC_MSG_RESULT([$curl_cv_gclk_LIBS])
ac_cv_func_clock_gettime="yes"
;;
@@ -2302,6 +2103,8 @@ AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
AC_REQUIRE([CURL_PREPROCESS_CALLCONV])dnl
#
+ AC_BEFORE([$0], [CURL_CONFIGURE_PULL_SYS_POLL])dnl
+ #
AC_MSG_CHECKING([for curl_socklen_t data type])
curl_typeof_curl_socklen_t="unknown"
for arg1 in int SOCKET; do
@@ -2410,6 +2213,45 @@ AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
])
+dnl CURL_CONFIGURE_PULL_SYS_POLL
+dnl -------------------------------------------------
+dnl Find out if system header file sys/poll.h must be included by the
+dnl external interface, making appropriate definitions for template file
+dnl include/curl/curlbuild.h.in to properly configure and use the library.
+dnl
+dnl The need for the sys/poll.h inclusion arises mainly to properly
+dnl interface AIX systems which define macros 'events' and 'revents'.
+
+AC_DEFUN([CURL_CONFIGURE_PULL_SYS_POLL], [
+ AC_REQUIRE([CURL_INCLUDES_POLL])dnl
+ #
+ tst_poll_events_macro_defined="unknown"
+ #
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_poll
+ ]],[[
+#if defined(events) || defined(revents)
+ return 0;
+#else
+ force compilation error
+#endif
+ ]])
+ ],[
+ tst_poll_events_macro_defined="yes"
+ ],[
+ tst_poll_events_macro_defined="no"
+ ])
+ #
+ if test "$tst_poll_events_macro_defined" = "yes"; then
+ if test "x$ac_cv_header_sys_poll_h" = "xyes"; then
+ CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_POLL_H])
+ fi
+ fi
+ #
+])
+
+
dnl CURL_CHECK_FUNC_SELECT
dnl -------------------------------------------------
dnl Test if the socket select() function is available,
@@ -2610,23 +2452,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
])
-# This is only a temporary fix. This macro is here to replace the broken one
-# delivered by the automake project (including the 1.9.6 release). As soon as
-# they ship a working version we SHOULD remove this work-around.
-
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} \"$am_aux_dir/missing\""
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-
dnl CURL_VERIFY_RUNTIMELIBS
dnl -------------------------------------------------
dnl Verify that the shared libs found so far can be used when running
@@ -2765,69 +2590,76 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \
"x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
dnl both given
- AC_MSG_ERROR([Can't specify both --with-ca-bundle and --with-ca-path.])
+ ca="$want_ca"
+ capath="$want_capath"
elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then
dnl --with-ca-bundle given
ca="$want_ca"
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"; then
- AC_MSG_ERROR([--with-ca-path only works with openSSL])
+ if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
+ AC_MSG_ERROR([--with-ca-path only works with OpenSSL, GnuTLS or PolarSSL])
fi
capath="$want_capath"
ca="no"
else
- dnl neither of --with-ca-* given
dnl first try autodetecting a CA bundle , then a CA path
dnl both autodetections can be skipped by --without-ca-*
ca="no"
capath="no"
- if test "x$want_ca" = "xunset"; then
- dnl the path we previously would have installed the curl ca bundle
- dnl to, and thus we now check for an already existing cert in that place
- dnl in case we find no other
- if test "x$prefix" != xNONE; then
- cac="${prefix}/share/curl/curl-ca-bundle.crt"
- else
- cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
- fi
-
- for a in /etc/ssl/certs/ca-certificates.crt \
- /etc/pki/tls/certs/ca-bundle.crt \
- /usr/share/ssl/certs/ca-bundle.crt \
- /usr/local/share/certs/ca-root.crt \
- /etc/ssl/cert.pem \
- "$cac"; do
- if test -f "$a"; then
- ca="$a"
- break
- fi
- done
- fi
- if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \
- "x$OPENSSL_ENABLED" = "x1"; then
- for a in /etc/ssl/certs/; do
- if test -d "$a" && ls "$a"/[[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]].0 >/dev/null 2>/dev/null; then
- capath="$a"
- break
+ if test "x$cross_compiling" != "xyes"; then
+ dnl NOT cross-compiling and...
+ dnl neither of the --with-ca-* options are provided
+ if test "x$want_ca" = "xunset"; then
+ dnl the path we previously would have installed the curl ca bundle
+ dnl to, and thus we now check for an already existing cert in that
+ dnl place in case we find no other
+ if test "x$prefix" != xNONE; then
+ cac="${prefix}/share/curl/curl-ca-bundle.crt"
+ else
+ cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
fi
- done
+
+ for a in /etc/ssl/certs/ca-certificates.crt \
+ /etc/pki/tls/certs/ca-bundle.crt \
+ /usr/share/ssl/certs/ca-bundle.crt \
+ /usr/local/share/certs/ca-root.crt \
+ /etc/ssl/cert.pem \
+ "$cac"; do
+ if test -f "$a"; then
+ ca="$a"
+ break
+ fi
+ done
+ fi
+ if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \
+ "x$OPENSSL_ENABLED" = "x1"; then
+ for a in /etc/ssl/certs/; do
+ if test -d "$a" && ls "$a"/[[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]].0 >/dev/null 2>/dev/null; then
+ capath="$a"
+ break
+ fi
+ done
+ fi
+ else
+ dnl no option given and cross-compiling
+ AC_MSG_WARN([skipped the ca-cert path detection when cross-compiling])
fi
fi
-
-
if test "x$ca" != "xno"; then
CURL_CA_BUNDLE='"'$ca'"'
AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, "$ca", [Location of default ca bundle])
AC_SUBST(CURL_CA_BUNDLE)
AC_MSG_RESULT([$ca])
- elif test "x$capath" != "xno"; then
+ fi
+ if test "x$capath" != "xno"; then
CURL_CA_PATH="\"$capath\""
AC_DEFINE_UNQUOTED(CURL_CA_PATH, "$capath", [Location of default ca path])
AC_MSG_RESULT([$capath (capath)])
- else
+ fi
+ if test "x$ca" = "xno" && test "x$capath" = "xno"; then
AC_MSG_RESULT([no])
fi
])
@@ -2843,7 +2675,7 @@ AC_DEFUN([DO_CURL_OFF_T_CHECK], [
tmp_includes=""
tmp_source=""
tmp_fmt=""
- case AS_TR_SH([$1]) in
+ case XC_SH_TR_SH([$1]) in
int64_t)
tmp_includes="$curl_includes_inttypes"
tmp_source="char f@<:@@:>@ = PRId64;"
@@ -2901,7 +2733,7 @@ AC_DEFUN([DO_CURL_OFF_T_SUFFIX_CHECK], [
curl_suffix_curl_off_t="unknown"
curl_suffix_curl_off_tu="unknown"
#
- case AS_TR_SH([$1]) in
+ case XC_SH_TR_SH([$1]) in
long_long | __longlong | __longlong_t)
tst_suffixes="LL::"
;;
@@ -3073,7 +2905,7 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/D$/U/'`
else
x_pull_headers="no"
- case AS_TR_SH([$curl_typeof_curl_off_t]) in
+ case XC_SH_TR_SH([$curl_typeof_curl_off_t]) in
long_long | __longlong | __longlong_t)
curl_format_curl_off_t="lld"
curl_format_curl_off_tu="llu"
@@ -3181,7 +3013,7 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
;;
win32_small_files)
AC_MSG_RESULT([yes (large file disabled)])
- AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1,
+ AC_DEFINE_UNQUOTED(USE_WIN32_SMALL_FILES, 1,
[Define to 1 if you are building a Windows target without large file support.])
;;
*)
@@ -3207,8 +3039,8 @@ AC_DEFUN([CURL_EXPORT_PCDIR], [
dnl CURL_CHECK_PKGCONFIG ($module, [$pcdir])
dnl ------------------------
-dnl search for the pkg-config tool (if not cross-compiling). Set the PKGCONFIG
-dnl variable to hold the path to it, or 'no' if not found/present.
+dnl search for the pkg-config tool. Set the PKGCONFIG variable to hold the
+dnl path to it, or 'no' if not found/present.
dnl
dnl If pkg-config is present, check that it has info about the $module or
dnl return "no" anyway!
@@ -3220,15 +3052,7 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
PKGCONFIG="no"
- if test x$cross_compiling = xyes; then
- dnl see if there's a pkg-specific for this host setup
- AC_PATH_PROG( PKGCONFIG, ${host}-pkg-config, no,
- $PATH:/usr/bin:/usr/local/bin)
- fi
-
- if test x$PKGCONFIG = xno; then
- AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
- fi
+ AC_PATH_TOOL( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
if test x$PKGCONFIG != xno; then
AC_MSG_CHECKING([for $1 options with pkg-config])
@@ -3246,3 +3070,44 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
fi
fi
])
+
+
+dnl CURL_GENERATE_CONFIGUREHELP_PM
+dnl -------------------------------------------------
+dnl Generate test harness configurehelp.pm module, defining and
+dnl initializing some perl variables with values which are known
+dnl when the configure script runs. For portability reasons, test
+dnl harness needs information on how to run the C preprocessor.
+
+AC_DEFUN([CURL_GENERATE_CONFIGUREHELP_PM], [
+ AC_REQUIRE([AC_PROG_CPP])dnl
+ tmp_cpp=`eval echo "$ac_cpp" 2>/dev/null`
+ if test -z "$tmp_cpp"; then
+ tmp_cpp='cpp'
+ fi
+ cat >./tests/configurehelp.pm <<_EOF
+[@%:@] This is a generated file. Do not edit.
+
+package configurehelp;
+
+use strict;
+use warnings;
+use Exporter;
+
+use vars qw(
+ @ISA
+ @EXPORT_OK
+ \$Cpreprocessor
+ );
+
+@ISA = qw(Exporter);
+
+@EXPORT_OK = qw(
+ \$Cpreprocessor
+ );
+
+\$Cpreprocessor = '$tmp_cpp';
+
+1;
+_EOF
+])
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644
index e05a1919..00000000
--- a/aclocal.m4
+++ /dev/null
@@ -1,903 +0,0 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.6])])
-
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 7
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 3
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 12
-
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $1 | $1:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # 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
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Check how to create a tarball. -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-# tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-# $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
-
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([m4/curl-compilers.m4])
-m4_include([m4/curl-confopts.m4])
-m4_include([m4/curl-functions.m4])
-m4_include([m4/curl-override.m4])
-m4_include([m4/curl-reentrant.m4])
-m4_include([m4/curl-system.m4])
-m4_include([m4/libtool.m4])
-m4_include([m4/ltoptions.m4])
-m4_include([m4/ltsugar.m4])
-m4_include([m4/ltversion.m4])
-m4_include([m4/lt~obsolete.m4])
-m4_include([acinclude.m4])
diff --git a/buildconf b/buildconf
index 76e310e0..705f0d34 100755
--- a/buildconf
+++ b/buildconf
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,23 +21,24 @@
#
###########################################################################
+#--------------------------------------------------------------------------
+# die prints argument string to stdout and exits this shell script.
+#
die(){
- echo "$@"
- exit
+ echo "buildconf: $@"
+ exit 1
}
#--------------------------------------------------------------------------
# findtool works as 'which' but we use a different name to make it more
# obvious we aren't using 'which'! ;-)
+# Unlike 'which' does, the current directory is ignored.
#
findtool(){
file="$1"
- if { echo $file | grep "/" >/dev/null 2>&1; } then
- # we only check for the explicit file name if the file is given
- # including a slash. Use ./ for current dir. Previously this would
- # otherwise always cause findtool to search the local dir first, which
- # is wrong.
+ if { echo "$file" | grep "/" >/dev/null 2>&1; } then
+ # when file is given with a path check it first
if test -f "$file"; then
echo "$file"
return
@@ -49,7 +50,7 @@ findtool(){
do
IFS=$old_IFS
# echo "checks for $file in $path" >&2
- if test -f "$path/$file"; then
+ if test "$path" -a "$path" != '.' -a -f "$path/$file"; then
echo "$path/$file"
return
fi
@@ -80,16 +81,19 @@ removethis(){
# Ensure that buildconf runs from the subdirectory where configure.ac lives
#
if test ! -f configure.ac ||
- test ! -f src/main.c ||
+ test ! -f src/tool_main.c ||
test ! -f lib/urldata.h ||
- test ! -f include/curl/curl.h; then
+ test ! -f include/curl/curl.h ||
+ test ! -f m4/curl-functions.m4; then
echo "Can not run buildconf from outside of curl's source subdirectory!"
echo "Change to the subdirectory where buildconf is found, and try again."
exit 1
fi
#--------------------------------------------------------------------------
-# autoconf 2.57 or newer
+# autoconf 2.57 or newer. Unpatched version 2.67 does not generate proper
+# configure script. Unpatched version 2.68 is simply unusable, we should
+# disallow 2.68 usage.
#
need_autoconf="2.57"
ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|head -n 1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
@@ -108,7 +112,15 @@ if test "$1" = "2" -a "$2" -lt "57" || test "$1" -lt "2"; then
exit 1
fi
-echo "buildconf: autoconf version $ac_version (ok)"
+if test "$1" = "2" -a "$2" -eq "67"; then
+ echo "buildconf: autoconf version $ac_version (BAD)"
+ echo " Unpatched version generates broken configure script."
+elif test "$1" = "2" -a "$2" -eq "68"; then
+ echo "buildconf: autoconf version $ac_version (BAD)"
+ echo " Unpatched version generates unusable configure script."
+else
+ echo "buildconf: autoconf version $ac_version (ok)"
+fi
am4te_version=`${AUTOM4TE:-autom4te} --version 2>/dev/null|head -n 1| sed -e 's/autom4te\(.*\)/\1/' -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
if test -z "$am4te_version"; then
@@ -178,72 +190,67 @@ else
fi
#--------------------------------------------------------------------------
-# libtool check
+# GNU libtoolize preliminary check
#
-LIBTOOL_WANTED_MAJOR=1
-LIBTOOL_WANTED_MINOR=4
-LIBTOOL_WANTED_PATCH=2
-LIBTOOL_WANTED_VERSION=1.4.2
-
-# this approach that tries 'glibtool' first is some kind of work-around for
-# some BSD-systems I believe that use to provide the GNU libtool named
-# glibtool, with 'libtool' being something completely different.
-libtool=`findtool glibtool 2>/dev/null`
-if test ! -x "$libtool"; then
- libtool=`findtool ${LIBTOOL:-libtool}`
-fi
+want_lt_major=1
+want_lt_minor=4
+want_lt_patch=2
+want_lt_version=1.4.2
-if test -z "$LIBTOOLIZE"; then
- # set the LIBTOOLIZE here so that glibtoolize is used if glibtool was found
- # $libtool is already the full path
- libtoolize="${libtool}ize"
-else
- libtoolize=`findtool $LIBTOOLIZE`
+# This approach that tries 'glibtoolize' first is intended for systems that
+# have GNU libtool named as 'glibtoolize' and libtoolize not being GNU's.
+
+libtoolize=`findtool glibtoolize 2>/dev/null`
+if test ! -x "$libtoolize"; then
+ libtoolize=`findtool ${LIBTOOLIZE:-libtoolize}`
+fi
+if test -z "$libtoolize"; then
+ echo "buildconf: libtoolize not found."
+ echo " You need GNU libtoolize $want_lt_version or newer installed."
+ exit 1
fi
-lt_pver=`$libtool --version 2>/dev/null|head -n 1`
+lt_pver=`$libtoolize --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: libtool not found."
- echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
+ echo "buildconf: libtoolize not found."
+ echo " You need GNU libtoolize $want_lt_version or newer installed."
exit 1
fi
old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS
lt_major=$1
lt_minor=$2
lt_patch=$3
-lt_status="good"
-if test "$lt_major" = "$LIBTOOL_WANTED_MAJOR"; then
- if test "$lt_minor" -lt "$LIBTOOL_WANTED_MINOR"; then
- lt_status="bad"
- elif test -n "$LIBTOOL_WANTED_PATCH"; then
- if test "$lt_minor" -gt "$LIBTOOL_WANTED_MINOR"; then
- lt_status="good"
- elif test -n "$lt_patch"; then
- if test "$lt_patch" -lt "$LIBTOOL_WANTED_PATCH"; then
- lt_status="bad"
- fi
- else
- lt_status="bad"
- fi
- fi
+if test -z "$lt_major"; then
+ lt_status="bad"
+elif test "$lt_major" -gt "$want_lt_major"; then
+ lt_status="good"
+elif test "$lt_major" -lt "$want_lt_major"; then
+ lt_status="bad"
+elif test -z "$lt_minor"; then
+ lt_status="bad"
+elif test "$lt_minor" -gt "$want_lt_minor"; then
+ lt_status="good"
+elif test "$lt_minor" -lt "$want_lt_minor"; then
+ lt_status="bad"
+elif test -z "$lt_patch"; then
+ lt_status="bad"
+elif test "$lt_patch" -gt "$want_lt_patch"; then
+ lt_status="good"
+elif test "$lt_patch" -lt "$want_lt_patch"; then
+ lt_status="bad"
+else
+ lt_status="good"
fi
-if test $lt_status != "good"; then
- echo "buildconf: libtool version $lt_version found."
- echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
+if test "$lt_status" != "good"; then
+ echo "buildconf: libtoolize version $lt_version found."
+ echo " You need GNU libtoolize $want_lt_version or newer installed."
exit 1
fi
-echo "buildconf: libtool version $lt_version (ok)"
-
-if test -f "$libtoolize"; then
- echo "buildconf: libtoolize found"
-else
- echo "buildconf: libtoolize not found. Weird libtool installation!"
- exit 1
-fi
+echo "buildconf: libtoolize version $lt_version (ok)"
#--------------------------------------------------------------------------
# m4 check
@@ -266,6 +273,10 @@ fi
# perl check
#
PERL=`findtool ${PERL:-perl}`
+if test -z "$PERL"; then
+ echo "buildconf: perl not found"
+ exit 1
+fi
#--------------------------------------------------------------------------
# Remove files generated on previous buildconf/configure run.
@@ -293,6 +304,7 @@ for fname in .deps \
config.status \
config.sub \
configure \
+ configurehelp.pm \
curl-config \
curlbuild.h \
depcomp \
@@ -300,11 +312,14 @@ for fname in .deps \
libcurl.pc \
libtool \
libtool.m4 \
+ libtool.m4.tmp \
ltmain.sh \
ltoptions.m4 \
ltsugar.m4 \
ltversion.m4 \
lt~obsolete.m4 \
+ missing \
+ install-sh \
stamp-h1 \
stamp-h2 \
stamp-h3 ; do
@@ -316,32 +331,49 @@ done
#
echo "buildconf: running libtoolize"
-$libtoolize --copy --automake --force || die "The libtoolize command failed"
+${libtoolize} --copy --force || die "libtoolize command failed"
+
+# When using libtool 1.5.X (X < 26) we copy libtool.m4 to our local m4
+# subdirectory and this local copy is patched to fix some warnings that
+# are triggered when running aclocal and using autoconf 2.62 or later.
+
+if test "$lt_major" = "1" && test "$lt_minor" = "5"; then
+ if test -z "$lt_patch" || test "$lt_patch" -lt "26"; then
+ echo "buildconf: copying libtool.m4 to local m4 subdir"
+ ac_dir=`${ACLOCAL:-aclocal} --print-ac-dir`
+ if test -f $ac_dir/libtool.m4; then
+ cp -f $ac_dir/libtool.m4 m4/libtool.m4
+ else
+ echo "buildconf: $ac_dir/libtool.m4 not found"
+ fi
+ if test -f m4/libtool.m4; then
+ echo "buildconf: renaming some variables in local m4/libtool.m4"
+ $PERL -i.tmp -pe \
+ 's/lt_prog_compiler_pic_works/lt_cv_prog_compiler_pic_works/g; \
+ s/lt_prog_compiler_static_works/lt_cv_prog_compiler_static_works/g;' \
+ m4/libtool.m4
+ rm -f m4/libtool.m4.tmp
+ fi
+ fi
+fi
-if test ! -f m4/curl-functions.m4; then
- echo "buildconf: cURL m4 macros not found"
- exit 1
+if test -f m4/libtool.m4; then
+ echo "buildconf: converting all mv to mv -f in local m4/libtool.m4"
+ $PERL -i.tmp -pe 's/\bmv +([^-\s])/mv -f $1/g' m4/libtool.m4
+ rm -f m4/libtool.m4.tmp
fi
echo "buildconf: running aclocal"
-${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "The aclocal command line failed"
+${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "aclocal command failed"
-if test -n "$PERL"; then
- echo "buildconf: running aclocal hack to convert all mv to mv -f"
- $PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
-else
- echo "buildconf: perl not found"
- exit 1
-fi
+echo "buildconf: converting all mv to mv -f in local aclocal.m4"
+$PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
echo "buildconf: running autoheader"
-${AUTOHEADER:-autoheader} || die "The autoheader command failed"
-
-echo "buildconf: cp lib/curl_config.h.in src/curl_config.h.in"
-cp lib/curl_config.h.in src/curl_config.h.in
+${AUTOHEADER:-autoheader} || die "autoheader command failed"
echo "buildconf: running autoconf"
-${AUTOCONF:-autoconf} || die "The autoconf command failed"
+${AUTOCONF:-autoconf} || die "autoconf command failed"
if test -d ares; then
cd ares
@@ -351,19 +383,26 @@ if test -d ares; then
fi
echo "buildconf: running automake"
-${AUTOMAKE:-automake} -a -c || die "The automake command failed"
+${AUTOMAKE:-automake} --add-missing --copy || die "automake command failed"
#--------------------------------------------------------------------------
+# GNU libtool complementary check
+#
# Depending on the libtool and automake versions being used, config.guess
# might not be installed in the subdirectory until automake has finished.
# So we can not attempt to use it until this very last buildconf stage.
#
-
if test ! -f ./config.guess; then
echo "buildconf: config.guess not found"
else
buildhost=`./config.guess 2>/dev/null|head -n 1`
case $buildhost in
+ *-*-darwin*)
+ need_lt_major=1
+ need_lt_minor=5
+ need_lt_patch=26
+ need_lt_check="yes"
+ ;;
*-*-hpux*)
need_lt_major=1
need_lt_minor=5
@@ -396,7 +435,7 @@ else
if test "$lt_status" != "good"; then
need_lt_version="$need_lt_major.$need_lt_minor.$need_lt_patch"
echo "buildconf: libtool version $lt_version found."
- echo " $buildhost requires libtool $need_lt_version or newer installed."
+ echo " $buildhost requires GNU libtool $need_lt_version or newer installed."
rm -f configure
exit 1
fi
@@ -404,8 +443,7 @@ else
fi
#--------------------------------------------------------------------------
-# Finished succesfully.
+# Finished successfully.
#
-
echo "buildconf: OK"
exit 0
diff --git a/buildconf.bat b/buildconf.bat
new file mode 100644
index 00000000..dc55fab8
--- /dev/null
+++ b/buildconf.bat
@@ -0,0 +1,38 @@
+@echo off
+REM
+REM
+REM This batch file must be used to set up a git tree to build on
+REM systems where there is no autotools support (i.e. Microsoft).
+REM
+REM This file is not included nor needed for curl's release
+REM archives, neither for curl's daily snapshot archives.
+
+if exist GIT-INFO goto start_doing
+ECHO ERROR: This file shall only be used with a curl git tree checkout.
+goto end_all
+:start_doing
+
+REM create tool_hugehelp.c
+if not exist src\tool_hugehelp.c.cvs goto end_hugehelp_c
+copy /Y src\tool_hugehelp.c.cvs src\tool_hugehelp.c
+:end_hugehelp_c
+
+REM create Makefile
+if not exist Makefile.dist goto end_makefile
+copy /Y Makefile.dist Makefile
+:end_makefile
+
+REM create curlbuild.h
+if not exist include\curl\curlbuild.h.dist goto end_curlbuild_h
+copy /Y include\curl\curlbuild.h.dist include\curl\curlbuild.h
+:end_curlbuild_h
+
+REM setup c-ares git tree
+if not exist ares\buildconf.bat goto end_c_ares
+cd ares
+call buildconf.bat
+cd ..
+:end_c_ares
+
+:end_all
+
diff --git a/compile b/compile
deleted file mode 100755
index 1b1d2321..00000000
--- a/compile
+++ /dev/null
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "compile $scriptversion"
- exit $?
- ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
- if test -n "$eat"; then
- eat=
- else
- case $1 in
- -o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we strip `-o arg' only if arg is an object.
- eat=1
- case $2 in
- *.o | *.obj)
- ofile=$2
- ;;
- *)
- set x "$@" -o "$2"
- shift
- ;;
- esac
- ;;
- *.c)
- cfile=$1
- set x "$@" "$1"
- shift
- ;;
- *)
- set x "$@" "$1"
- shift
- ;;
- esac
- fi
- shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
- # pattern rule where we don't need one. That is ok -- this is a
- # normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
- # ok.
- exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
-# that we are using for the .o file. Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
-while true; do
- if mkdir "$lockdir" >/dev/null 2>&1; then
- break
- fi
- sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
- mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
- mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/config.guess b/config.guess
deleted file mode 100755
index c2246a4f..00000000
--- a/config.guess
+++ /dev/null
@@ -1,1502 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
-
-timestamp='2009-12-30'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[456])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo frv-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/config.sub b/config.sub
deleted file mode 100755
index c2d12572..00000000
--- a/config.sub
+++ /dev/null
@@ -1,1714 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
-
-timestamp='2010-01-22'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile-* | tilegx-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze)
- basic_machine=microblaze-xilinx
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc) basic_machine=powerpc-unknown
- ;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- # This must be matched before tile*.
- tilegx*)
- basic_machine=tilegx-unknown
- os=-linux-gnu
- ;;
- tile*)
- basic_machine=tile-unknown
- os=-linux-gnu
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
- ;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -kaos*)
- os=-kaos
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
- -nacl*)
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
- *-ibm)
- os=-aix
- ;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -cnk*|-aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/configure b/configure
deleted file mode 100755
index 576e62f5..00000000
--- a/configure
+++ /dev/null
@@ -1,37342 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for curl -.
-#
-# Report bugs to <a suitable curl mailing list: http://curl.haxx.se/mail/>.
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-#
-# Copyright (c) 1998 - 2010 Daniel Stenberg, <daniel@haxx.se>
-# This configure script may be copied, distributed and modified under the
-# terms of the curl license; see COPYING for more details
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-
- if test -z "$curl_cv_PATH_SEPARATOR"; then
- if test -z "$PATH"; then
- as_fn_error $? "PATH not set. Cannot continue without PATH being set."
- fi
- tst_dirs_col=0
- tst_save_IFS=$IFS; IFS=':'
- for tst_dir in $PATH; do
- IFS=$tst_save_IFS
- test -d "$tst_dir" && tst_dirs_col=`expr $tst_dirs_col + 1`
- done
- IFS=$tst_save_IFS
- tst_dirs_sem=0
- tst_save_IFS=$IFS; IFS=';'
- for tst_dir in $PATH; do
- IFS=$tst_save_IFS
- test -d "$tst_dir" && tst_dirs_sem=`expr $tst_dirs_sem + 1`
- done
- IFS=$tst_save_IFS
- if test $tst_dirs_sem -eq $tst_dirs_col; then
- if test -z "$PATH_SEPARATOR"; then
- as_fn_error $? "PATH_SEPARATOR not set. Cannot continue without it."
- fi
- else
- if test $tst_dirs_sem -gt $tst_dirs_col; then
- tst_auto_separator=';'
- else
- tst_auto_separator=':'
- fi
- if test -z "$PATH_SEPARATOR"; then
- PATH_SEPARATOR="$tst_auto_separator"
- fi
- fi
- curl_cv_PATH_SEPARATOR="$PATH_SEPARATOR"
- fi
-
-
-
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-"
- as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
- exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
-else
- as_have_required=no
-fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- as_found=:
- case $as_dir in #(
- /*)
- for as_base in sh bash ksh sh5; do
- # Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
- CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
- break 2
-fi
-fi
- done;;
- esac
- as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
- if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
- else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and a suitable curl
-$0: mailing list: http://curl.haxx.se/mail/ about your
-$0: system, including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
- fi
- exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-$*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "$0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='curl'
-PACKAGE_TARNAME='curl'
-PACKAGE_VERSION='-'
-PACKAGE_STRING='curl -'
-PACKAGE_BUGREPORT='a suitable curl mailing list: http://curl.haxx.se/mail/'
-PACKAGE_URL=''
-
-ac_unique_file="lib/urldata.h"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-enable_option_checking=no
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-SUPPORT_PROTOCOLS
-SUPPORT_FEATURES
-ENABLE_SHARED
-CROSSCOMPILING_FALSE
-CROSSCOMPILING_TRUE
-CURL_NETWORK_LIBS
-TEST_SERVER_LIBS
-CURL_LIBS
-LIBCURL_LIBS
-SONAME_BUMP_FALSE
-SONAME_BUMP_TRUE
-USE_WINDOWS_SSPI
-BUILD_LIBHOSTNAME_FALSE
-BUILD_LIBHOSTNAME_TRUE
-USE_EMBEDDED_ARES_FALSE
-USE_EMBEDDED_ARES_TRUE
-USE_ARES
-subdirs
-USE_MANUAL_FALSE
-USE_MANUAL_TRUE
-MANOPT
-NROFF
-PERL
-IPV6_ENABLED
-IDN_ENABLED
-USE_LIBRTMP
-USE_LIBSSH2
-CURL_CA_BUNDLE
-SSL_ENABLED
-USE_NSS
-HAVE_PK11_CREATEGENERICOBJECT
-USE_POLARSSL
-USE_GNUTLS
-RANDOM_FILE
-HAVE_LIBZ_FALSE
-HAVE_LIBZ_TRUE
-HAVE_LIBZ
-USE_SSLEAY
-PKGCONFIG
-KRB4_ENABLED
-USE_OPENLDAP
-CURL_DISABLE_GOPHER
-CURL_DISABLE_SMTP
-CURL_DISABLE_IMAP
-CURL_DISABLE_POP3
-CURL_DISABLE_TFTP
-CURL_DISABLE_TELNET
-CURL_DISABLE_DICT
-CURL_DISABLE_PROXY
-HAVE_LDAP_SSL
-CURL_DISABLE_LDAPS
-CURL_DISABLE_LDAP
-CURL_DISABLE_FILE
-CURL_DISABLE_FTP
-CURL_DISABLE_RTSP
-CURL_DISABLE_HTTP
-CURLDEBUG_FALSE
-CURLDEBUG_TRUE
-NO_UNDEFINED_FALSE
-NO_UNDEFINED_TRUE
-REQUIRE_LIB_DEPS
-STATICLIB_FALSE
-STATICLIB_TRUE
-MIMPURE_FALSE
-MIMPURE_TRUE
-OTOOL64
-OTOOL
-LIPO
-NMEDIT
-DSYMUTIL
-lt_ECHO
-RANLIB
-LN_S
-NM
-ac_ct_DUMPBIN
-DUMPBIN
-LD
-FGREP
-LIBTOOL
-OBJDUMP
-DLLTOOL
-AS
-CPP
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__quote
-am__include
-DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-PKGADD_VENDOR
-PKGADD_NAME
-PKGADD_PKG
-VERSIONNUM
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-libext
-AR
-EGREP
-GREP
-SED
-CURL_CFLAG_EXTRAS
-CONFIGURE_OPTIONS
-MAINT
-MAINTAINER_MODE_FALSE
-MAINTAINER_MODE_TRUE
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-SHELL
-PATH
-PATH_SEPARATOR'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_maintainer_mode
-enable_debug
-enable_optimize
-enable_warnings
-enable_werror
-enable_curldebug
-enable_ares
-enable_dependency_tracking
-enable_largefile
-enable_shared
-enable_static
-with_pic
-enable_fast_install
-with_gnu_ld
-enable_libtool_lock
-enable_http
-enable_ftp
-enable_file
-enable_ldap
-enable_ldaps
-enable_rtsp
-enable_proxy
-enable_dict
-enable_telnet
-enable_tftp
-enable_pop3
-enable_imap
-enable_smtp
-enable_gopher
-enable_manual
-enable_libgcc
-with_ldap_lib
-with_lber_lib
-enable_ipv6
-with_krb4_includes
-with_krb4_libs
-with_krb4
-with_spnego
-with_gssapi_includes
-with_gssapi_libs
-with_gssapi
-with_ssl
-with_zlib
-with_egd_socket
-with_random
-with_gnutls
-with_polarssl
-with_nss
-with_ca_bundle
-with_ca_path
-with_libssh2
-with_librtmp
-with_libidn
-enable_nonblocking
-enable_threaded_resolver
-enable_verbose
-enable_sspi
-enable_crypto_auth
-enable_cookies
-enable_hidden_symbols
-enable_soname_bump
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP'
-ac_subdirs_all='ares'
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *=) ac_optarg= ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- case $ac_envvar in #(
- '' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
- esac
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures curl - to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/curl]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of curl -:";;
- esac
- cat <<\_ACEOF
-
-Optional Features:
- --disable-option-checking ignore unrecognized --enable/--with options
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
- --enable-debug Enable debug build options
- --disable-debug Disable debug build options
- --enable-optimize Enable compiler optimizations
- --disable-optimize Disable compiler optimizations
- --enable-warnings Enable strict compiler warnings
- --disable-warnings Disable strict compiler warnings
- --enable-werror Enable compiler warnings as errors
- --disable-werror Disable compiler warnings as errors
- --enable-curldebug Enable curl debug memory tracking
- --disable-curldebug Disable curl debug memory tracking
- --enable-ares[=PATH] Enable c-ares for DNS lookups
- --disable-ares Disable c-ares for DNS lookups
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
- --disable-largefile omit support for large files
- --enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
- --enable-http Enable HTTP support
- --disable-http Disable HTTP support
- --enable-ftp Enable FTP support
- --disable-ftp Disable FTP support
- --enable-file Enable FILE support
- --disable-file Disable FILE support
- --enable-ldap Enable LDAP support
- --disable-ldap Disable LDAP support
- --enable-ldaps Enable LDAPS support
- --disable-ldaps Disable LDAPS support
- --enable-rtsp Enable RTSP support
- --disable-rtsp Disable RTSP support
- --enable-proxy Enable proxy support
- --disable-proxy Disable proxy support
- --enable-dict Enable DICT support
- --disable-dict Disable DICT support
- --enable-telnet Enable TELNET support
- --disable-telnet Disable TELNET support
- --enable-tftp Enable TFTP support
- --disable-tftp Disable TFTP support
- --enable-pop3 Enable POP3 support
- --disable-pop3 Disable POP3 support
- --enable-imap Enable IMAP support
- --disable-imap Disable IMAP support
- --enable-smtp Enable SMTP support
- --disable-smtp Disable SMTP support
- --enable-gopher Enable Gopher support
- --disable-gopher Disable Gopher support
- --enable-manual Enable built-in manual
- --disable-manual Disable built-in manual
- --enable-libgcc use libgcc when linking
- --enable-ipv6 Enable ipv6 (with ipv4) support
- --disable-ipv6 Disable ipv6 support
- --enable-nonblocking Enable non-blocking communications
- --disable-nonblocking Disable non-blocking communications
- --enable-threaded-resolver
- Enable threaded resolver
- --disable-threaded-resolver
- Disable threaded resolver
- --enable-verbose Enable verbose strings
- --disable-verbose Disable verbose strings
- --enable-sspi Enable SSPI
- --disable-sspi Disable SSPI
- --enable-crypto-auth Enable cryptographic authentication
- --disable-crypto-auth Disable cryptographic authentication
- --enable-cookies Enable cookies support
- --disable-cookies Disable cookies support
- --enable-hidden-symbols Hide internal symbols in library
- --disable-hidden-symbols
- Leave all symbols with default visibility in library
- --enable-soname-bump Enable enforced SONAME bump
- --disable-soname-bump Disable enforced SONAME bump
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-ldap-lib=libname Specify name of ldap lib file
- --with-lber-lib=libname Specify name of lber lib file
- --with-krb4-includes=DIR
- Specify location of kerberos4 headers
- --with-krb4-libs=DIR Specify location of kerberos4 libs
- --with-krb4=DIR where to look for Kerberos4
- --with-spnego=DIR Specify location of SPNEGO library fbopenssl
- --with-gssapi-includes=DIR
- Specify location of GSSAPI header
- --with-gssapi-libs=DIR Specify location of GSSAPI libs
- --with-gssapi=DIR Where to look for GSSAPI
- --with-ssl=PATH Where to look for OpenSSL, PATH points to the SSL
- installation (default: /usr/local/ssl); when
- possible, set the PKG_CONFIG_PATH environment
- variable instead of using this option
- --without-ssl disable OpenSSL
- --with-zlib=PATH search for zlib in PATH
- --without-zlib disable use of zlib
- --with-egd-socket=FILE Entropy Gathering Daemon socket pathname
- --with-random=FILE read randomness from FILE (default=/dev/urandom)
- --with-gnutls=PATH where to look for GnuTLS, PATH points to the
- installation root (default: /usr/local/)
- --without-gnutls disable GnuTLS detection
- --with-polarssl=PATH where to look for PolarSSL, PATH points to the
- installation root (default: /usr/local/)
- --without-polarssl disable PolarSSL detection
- --with-nss=PATH where to look for NSS, PATH points to the
- installation root (default: /usr/local/)
- --without-nss disable NSS detection
- --with-ca-bundle=FILE File name to use as CA bundle
- --without-ca-bundle Don't use a default CA bundle
- --with-ca-path=DIRECTORY
- Directory to use as CA path
- --without-ca-path Don't use a default CA path
- --with-libssh2=PATH Where to look for libssh2, PATH points to the
- LIBSSH2 installation (default: /usr/local/lib); when
- possible, set the PKG_CONFIG_PATH environment
- variable instead of using this option
- --without-libssh2 disable LIBSSH2
- --with-librtmp=PATH Where to look for librtmp, PATH points to the
- LIBRTMP installation (default: /usr/local/lib); when
- possible, set the PKG_CONFIG_PATH environment
- variable instead of using this option
- --without-librtmp disable LIBRTMP
- --with-libidn=PATH Enable libidn usage
- --without-libidn Disable libidn usage
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
- CPP C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <a suitable curl mailing list: http://curl.haxx.se/mail/>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-curl configure -
-generated by GNU Autoconf 2.67
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-
-Copyright (c) 1998 - 2010 Daniel Stenberg, <daniel@haxx.se>
-This configure script may be copied, distributed and modified under the
-terms of the curl license; see COPYING for more details
-_ACEOF
- exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_compile
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_c_compute_int ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int main (void)
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_lo=0 ac_mid=0
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int main (void)
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_hi=$ac_mid; break
-else
- as_fn_arith $ac_mid + 1 && ac_lo=$as_val
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int main (void)
-{
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_hi=-1 ac_mid=-1
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int main (void)
-{
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_lo=$ac_mid; break
-else
- as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- ac_lo= ac_hi=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int main (void)
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_hi=$ac_mid
-else
- as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include <stdio.h>
-#include <stdlib.h>
-int main (void)
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- return 1;
- if (($2) < 0)
- {
- long int i = longval ();
- if (i != ($2))
- return 1;
- fprintf (f, "%ld", i);
- }
- else
- {
- unsigned long int i = ulongval ();
- if (i != ($2))
- return 1;
- fprintf (f, "%lu", i);
- }
- /* Do not output a trailing newline, as this causes \r\n confusion
- on some platforms. */
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
- ac_retval=1
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-rm -f conftest.val
-
- fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_compute_int
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define $2 innocuous_$2
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef $2
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int main (void)
-{
-return $2 ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_func
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ---------------------------------------------------------------------- ##
-## Report this to a suitable curl mailing list: http://curl.haxx.se/mail/ ##
-## ---------------------------------------------------------------------- ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int main (void)
-{
-if (sizeof ($2))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int main (void)
-{
-if (sizeof (($2)))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_type
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by curl $as_me -, which was
-generated by GNU Autoconf 2.67. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
- done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
- 2)
- as_fn_append ac_configure_args1 " '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- as_fn_append ac_configure_args " '$ac_arg'"
- ;;
- esac
- done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special files
- # actually), so we avoid doing that. DJGPP emulates it as a regular file.
- if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-# using curl-override.m4
-
-
-
-
-
-ac_config_headers="$ac_config_headers lib/curl_config.h src/curl_config.h include/curl/curlbuild.h"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
- # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then :
- enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
-$as_echo "$USE_MAINTAINER_MODE" >&6; }
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
-
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debug build options" >&5
-$as_echo_n "checking whether to enable debug build options... " >&6; }
- OPT_DEBUG_BUILD="default"
- # Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
- enableval=$enable_debug; OPT_DEBUG_BUILD=$enableval
-fi
-
- case "$OPT_DEBUG_BUILD" in
- no)
- want_debug="no"
- ;;
- default)
- want_debug="no"
- ;;
- *)
- want_debug="yes"
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_debug" >&5
-$as_echo "$want_debug" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable compiler optimizer" >&5
-$as_echo_n "checking whether to enable compiler optimizer... " >&6; }
- OPT_COMPILER_OPTIMIZE="default"
- # Check whether --enable-optimize was given.
-if test "${enable_optimize+set}" = set; then :
- enableval=$enable_optimize; OPT_COMPILER_OPTIMIZE=$enableval
-fi
-
- case "$OPT_COMPILER_OPTIMIZE" in
- no)
- want_optimize="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- default)
- if test "$want_debug" = "yes"; then
- want_optimize="assume_no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) no" >&5
-$as_echo "(assumed) no" >&6; }
- else
- want_optimize="assume_yes"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
-$as_echo "(assumed) yes" >&6; }
- fi
- ;;
- *)
- want_optimize="yes"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable strict compiler warnings" >&5
-$as_echo_n "checking whether to enable strict compiler warnings... " >&6; }
- OPT_COMPILER_WARNINGS="default"
- # Check whether --enable-warnings was given.
-if test "${enable_warnings+set}" = set; then :
- enableval=$enable_warnings; OPT_COMPILER_WARNINGS=$enableval
-fi
-
- case "$OPT_COMPILER_WARNINGS" in
- no)
- want_warnings="no"
- ;;
- default)
- want_warnings="$want_debug"
- ;;
- *)
- want_warnings="yes"
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_warnings" >&5
-$as_echo "$want_warnings" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable compiler warnings as errors" >&5
-$as_echo_n "checking whether to enable compiler warnings as errors... " >&6; }
- OPT_COMPILER_WERROR="default"
- # Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then :
- enableval=$enable_werror; OPT_COMPILER_WERROR=$enableval
-fi
-
- case "$OPT_COMPILER_WERROR" in
- no)
- want_werror="no"
- ;;
- default)
- want_werror="no"
- ;;
- *)
- want_werror="yes"
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_werror" >&5
-$as_echo "$want_werror" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable curl debug memory tracking" >&5
-$as_echo_n "checking whether to enable curl debug memory tracking... " >&6; }
- OPT_CURLDEBUG_BUILD="default"
- # Check whether --enable-curldebug was given.
-if test "${enable_curldebug+set}" = set; then :
- enableval=$enable_curldebug; OPT_CURLDEBUG_BUILD=$enableval
-fi
-
- case "$OPT_CURLDEBUG_BUILD" in
- no)
- want_curldebug="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- default)
- if test "$want_debug" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
-$as_echo "(assumed) yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- want_curldebug_assumed="yes"
- want_curldebug="$want_debug"
- ;;
- *)
- want_curldebug="yes"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable c-ares for DNS lookups" >&5
-$as_echo_n "checking whether to enable c-ares for DNS lookups... " >&6; }
- OPT_ARES="default"
- # Check whether --enable-ares was given.
-if test "${enable_ares+set}" = set; then :
- enableval=$enable_ares; OPT_ARES=$enableval
-fi
-
- case "$OPT_ARES" in
- no)
- want_ares="no"
- ;;
- default)
- want_ares="no"
- ;;
- *)
- want_ares="yes"
- if test -n "$enableval" && test "$enableval" != "yes"; then
- want_ares_path="$enableval"
- fi
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_ares" >&5
-$as_echo "$want_ares" >&6; }
-
-
-
-
-
-#
-# save the configure arguments
-#
-CONFIGURE_OPTIONS="\"$ac_configure_args\""
-
-
-CURL_CFLAG_EXTRAS=""
-if test X"$want_werror" = Xyes; then
- CURL_CFLAG_EXTRAS="-Werror"
-fi
-
-
-if test -z "$SED"; then
- # Extract the first word of "sed", so it can be a program name with args.
-set dummy sed; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $SED in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_SED="$SED" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_SED" && ac_cv_path_SED="not_found"
- ;;
-esac
-fi
-SED=$ac_cv_path_SED
-if test -n "$SED"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
-$as_echo "$SED" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test -z "$SED" || test "$SED" = "not_found"; then
- as_fn_error $? "sed not found in PATH. Cannot continue without sed." "$LINENO" 5
- fi
-fi
-
-
-if test -z "$GREP"; then
- # Extract the first word of "grep", so it can be a program name with args.
-set dummy grep; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $GREP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="not_found"
- ;;
-esac
-fi
-GREP=$ac_cv_path_GREP
-if test -n "$GREP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
-$as_echo "$GREP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test -z "$GREP" || test "$GREP" = "not_found"; then
- as_fn_error $? "grep not found in PATH. Cannot continue without grep." "$LINENO" 5
- fi
-fi
-
-
-if test -z "$EGREP"; then
- if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
- EGREP="$GREP -E"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
-$as_echo "$EGREP" >&6; }
- else
- # Extract the first word of "egrep", so it can be a program name with args.
-set dummy egrep; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $EGREP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_EGREP" && ac_cv_path_EGREP="not_found"
- ;;
-esac
-fi
-EGREP=$ac_cv_path_EGREP
-if test -n "$EGREP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
-$as_echo "$EGREP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-fi
-if test -z "$EGREP" || test "$EGREP" = "not_found"; then
- as_fn_error $? "egrep not found in PATH. Cannot continue without egrep." "$LINENO" 5
-fi
-
-
-if test -z "$AR"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $AR in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_AR="$AR" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-AR=$ac_cv_path_AR
-if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_AR"; then
- ac_pt_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_AR in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_AR=$ac_cv_path_ac_pt_AR
-if test -n "$ac_pt_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
-$as_echo "$ac_pt_AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_pt_AR" = x; then
- AR="not_found"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_pt_AR
- fi
-else
- AR="$ac_cv_path_AR"
-fi
-
- if test -z "$AR" || test "$AR" = "not_found"; then
- as_fn_error $? "ar not found in PATH. Cannot continue without ar." "$LINENO" 5
- fi
-fi
-
-
-
-
-if test -f ${srcdir}/include/curl/curlbuild.h; then
- rm -f ${srcdir}/include/curl/curlbuild.h
-fi
-
-VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
-am__api_version="1.9"
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
- done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
-alias in your environment" "$LINENO" 5
- fi
-
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- as_fn_error $? "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
- program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} \"$am_aux_dir/missing\""
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # 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
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SET_MAKE=
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE=curl
- VERSION=$VERSION
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking curl version" >&5
-$as_echo_n "checking curl version... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION" >&5
-$as_echo "$VERSION" >&6; }
-
-VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h`
-
-
-PKGADD_PKG="HAXXcurl"
-PKGADD_NAME="cURL - a client that groks URLs"
-PKGADD_VENDOR="curl.haxx.se"
-
-
-
-
- curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl} )"
- curl_ssh_msg="no (--with-libssh2)"
- curl_zlib_msg="no (--with-zlib)"
- curl_krb4_msg="no (--with-krb4*)"
- curl_gss_msg="no (--with-gssapi)"
- curl_spnego_msg="no (--with-spnego)"
- curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
- curl_ipv6_msg="no (--enable-ipv6)"
- curl_idn_msg="no (--with-libidn)"
- curl_manual_msg="no (--enable-manual)"
-curl_verbose_msg="enabled (--disable-verbose)"
- curl_sspi_msg="no (--enable-sspi)"
- curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
- curl_ldaps_msg="no (--enable-ldaps)"
- curl_rtsp_msg="no (--enable-rtsp)"
- curl_rtmp_msg="no (--with-librtmp)"
-
-ALL_LIBS=$LIBS
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define OS "${host}"
-_ACEOF
-
-
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
- enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
-
-
- ac_save_CFLAGS="$CFLAGS"
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-int main (void)
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
- { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-else
- CFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int main (void)
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-depcc="$CC" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-
-if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
-else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
-fi
-
-
- CFLAGS="$ac_save_CFLAGS"
- CPPFLAGS="$ac_save_CPPFLAGS"
-
-
-
-
-curl_includes_inttypes="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-/* includes end */"
- case $host_os in
- irix*)
- ac_cv_header_stdint_h="no"
- ;;
- esac
- for ac_header in sys/types.h stdint.h inttypes.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_inttypes
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- #
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- #
- # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5 ; }
- else
- ac_cv_sizeof_long=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
- # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
-$as_echo_n "checking size of void*... " >&6; }
-if test "${ac_cv_sizeof_voidp+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_voidp" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (void*)
-See \`config.log' for more details" "$LINENO" 5 ; }
- else
- ac_cv_sizeof_voidp=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5
-$as_echo "$ac_cv_sizeof_voidp" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
-_ACEOF
-
-
- #
- if test -z "$ac_cv_sizeof_long" ||
- test "$ac_cv_sizeof_long" -eq "0"; then
- as_fn_error $? "cannot find out size of long." "$LINENO" 5
- fi
- if test -z "$ac_cv_sizeof_voidp" ||
- test "$ac_cv_sizeof_voidp" -eq "0"; then
- as_fn_error $? "cannot find out size of void*." "$LINENO" 5
- fi
- #
- x_LP64_long=""
- x_LP32_long=""
- x_LP16_long=""
- #
- if test "$ac_cv_sizeof_long" -eq "8" &&
- test "$ac_cv_sizeof_voidp" -ge "8"; then
- x_LP64_long="long"
- elif test "$ac_cv_sizeof_long" -eq "4" &&
- test "$ac_cv_sizeof_voidp" -ge "4"; then
- x_LP32_long="long"
- elif test "$ac_cv_sizeof_long" -eq "2" &&
- test "$ac_cv_sizeof_voidp" -ge "2"; then
- x_LP16_long="long"
- fi
- #
- #
- curl_typeof_curl_off_t="unknown"
- curl_sizeof_curl_off_t="unknown"
- curl_format_curl_off_t="unknown"
- curl_format_curl_off_tu="unknown"
- #
- if test "$curl_typeof_curl_off_t" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit curl_off_t data type" >&5
-$as_echo_n "checking for 64-bit curl_off_t data type... " >&6; }
- for t8 in \
- "$x_LP64_long" \
- 'int64_t' \
- '__int64' \
- 'long long' \
- '__longlong' \
- '__longlong_t' ; do
-
- if test "$curl_typeof_curl_off_t" = "unknown" && test ! -z "$t8"; then
- tmp_includes=""
- tmp_source=""
- tmp_fmt=""
- case `$as_echo "$t8" | $as_tr_sh` in
- int64_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f[] = PRId64;"
- tmp_fmt="PRId64"
- ;;
- int32_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f[] = PRId32;"
- tmp_fmt="PRId32"
- ;;
- int16_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f[] = PRId16;"
- tmp_fmt="PRId16"
- ;;
- esac
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $tmp_includes
- typedef $t8 curl_off_t;
- typedef char dummy_arr[sizeof(curl_off_t) == 8 ? 1 : -1];
-
-int main (void)
-{
-
- $tmp_source
- curl_off_t dummy;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- if test -z "$tmp_fmt"; then
- curl_typeof_curl_off_t="$t8"
- curl_sizeof_curl_off_t="8"
- else
-
- as_ac_HaveDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh`
- as_ac_Def=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh`
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_inttypes
-#ifdef $tmp_fmt
-CURL_DEF_TOKEN $tmp_fmt
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "$tmp_fmt"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- eval "$as_ac_HaveDef=no"
-
- else
- eval "$as_ac_HaveDef=yes"
- eval "$as_ac_Def=\$tmp_exp"
-
- fi
-
- as_tmp_HaveFmtDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh`
- as_tmp_FmtDef=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh`
- if test `eval 'as_val=${'$as_tmp_HaveFmtDef'};$as_echo "$as_val"'` = "yes"; then
- curl_format_curl_off_t=`eval 'as_val=${'$as_tmp_FmtDef'};$as_echo "$as_val"'`
- curl_typeof_curl_off_t="$t8"
- curl_sizeof_curl_off_t="8"
- fi
- fi
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_typeof_curl_off_t" >&5
-$as_echo "$curl_typeof_curl_off_t" >&6; }
- fi
- if test "$curl_typeof_curl_off_t" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit curl_off_t data type" >&5
-$as_echo_n "checking for 32-bit curl_off_t data type... " >&6; }
- for t4 in \
- "$x_LP32_long" \
- 'int32_t' \
- '__int32' \
- 'int' ; do
-
- if test "$curl_typeof_curl_off_t" = "unknown" && test ! -z "$t4"; then
- tmp_includes=""
- tmp_source=""
- tmp_fmt=""
- case `$as_echo "$t4" | $as_tr_sh` in
- int64_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f[] = PRId64;"
- tmp_fmt="PRId64"
- ;;
- int32_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f[] = PRId32;"
- tmp_fmt="PRId32"
- ;;
- int16_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f[] = PRId16;"
- tmp_fmt="PRId16"
- ;;
- esac
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $tmp_includes
- typedef $t4 curl_off_t;
- typedef char dummy_arr[sizeof(curl_off_t) == 4 ? 1 : -1];
-
-int main (void)
-{
-
- $tmp_source
- curl_off_t dummy;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- if test -z "$tmp_fmt"; then
- curl_typeof_curl_off_t="$t4"
- curl_sizeof_curl_off_t="4"
- else
-
- as_ac_HaveDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh`
- as_ac_Def=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh`
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_inttypes
-#ifdef $tmp_fmt
-CURL_DEF_TOKEN $tmp_fmt
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "$tmp_fmt"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- eval "$as_ac_HaveDef=no"
-
- else
- eval "$as_ac_HaveDef=yes"
- eval "$as_ac_Def=\$tmp_exp"
-
- fi
-
- as_tmp_HaveFmtDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh`
- as_tmp_FmtDef=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh`
- if test `eval 'as_val=${'$as_tmp_HaveFmtDef'};$as_echo "$as_val"'` = "yes"; then
- curl_format_curl_off_t=`eval 'as_val=${'$as_tmp_FmtDef'};$as_echo "$as_val"'`
- curl_typeof_curl_off_t="$t4"
- curl_sizeof_curl_off_t="4"
- fi
- fi
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_typeof_curl_off_t" >&5
-$as_echo "$curl_typeof_curl_off_t" >&6; }
- fi
- if test "$curl_typeof_curl_off_t" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 16-bit curl_off_t data type" >&5
-$as_echo_n "checking for 16-bit curl_off_t data type... " >&6; }
- for t2 in \
- "$x_LP16_long" \
- 'int16_t' \
- '__int16' \
- 'int' ; do
-
- if test "$curl_typeof_curl_off_t" = "unknown" && test ! -z "$t2"; then
- tmp_includes=""
- tmp_source=""
- tmp_fmt=""
- case `$as_echo "$t2" | $as_tr_sh` in
- int64_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f[] = PRId64;"
- tmp_fmt="PRId64"
- ;;
- int32_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f[] = PRId32;"
- tmp_fmt="PRId32"
- ;;
- int16_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f[] = PRId16;"
- tmp_fmt="PRId16"
- ;;
- esac
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $tmp_includes
- typedef $t2 curl_off_t;
- typedef char dummy_arr[sizeof(curl_off_t) == 2 ? 1 : -1];
-
-int main (void)
-{
-
- $tmp_source
- curl_off_t dummy;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- if test -z "$tmp_fmt"; then
- curl_typeof_curl_off_t="$t2"
- curl_sizeof_curl_off_t="2"
- else
-
- as_ac_HaveDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh`
- as_ac_Def=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh`
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_inttypes
-#ifdef $tmp_fmt
-CURL_DEF_TOKEN $tmp_fmt
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "$tmp_fmt"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- eval "$as_ac_HaveDef=no"
-
- else
- eval "$as_ac_HaveDef=yes"
- eval "$as_ac_Def=\$tmp_exp"
-
- fi
-
- as_tmp_HaveFmtDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh`
- as_tmp_FmtDef=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh`
- if test `eval 'as_val=${'$as_tmp_HaveFmtDef'};$as_echo "$as_val"'` = "yes"; then
- curl_format_curl_off_t=`eval 'as_val=${'$as_tmp_FmtDef'};$as_echo "$as_val"'`
- curl_typeof_curl_off_t="$t2"
- curl_sizeof_curl_off_t="2"
- fi
- fi
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_typeof_curl_off_t" >&5
-$as_echo "$curl_typeof_curl_off_t" >&6; }
- fi
- if test "$curl_typeof_curl_off_t" = "unknown"; then
- as_fn_error $? "cannot find data type for curl_off_t." "$LINENO" 5
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of curl_off_t" >&5
-$as_echo_n "checking size of curl_off_t... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_sizeof_curl_off_t" >&5
-$as_echo "$curl_sizeof_curl_off_t" >&6; }
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking formatting string directive for curl_off_t" >&5
-$as_echo_n "checking formatting string directive for curl_off_t... " >&6; }
- if test "$curl_format_curl_off_t" != "unknown"; then
- x_pull_headers="yes"
- curl_format_curl_off_t=`echo "$curl_format_curl_off_t" | "$SED" 's/["]//g'`
- curl_format_curl_off_tu=`echo "$curl_format_curl_off_t" | "$SED" 's/i$/u/'`
- curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/d$/u/'`
- curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/D$/U/'`
- else
- x_pull_headers="no"
- case `$as_echo "$curl_typeof_curl_off_t" | $as_tr_sh` in
- long_long | __longlong | __longlong_t)
- curl_format_curl_off_t="lld"
- curl_format_curl_off_tu="llu"
- ;;
- long)
- curl_format_curl_off_t="ld"
- curl_format_curl_off_tu="lu"
- ;;
- int)
- curl_format_curl_off_t="d"
- curl_format_curl_off_tu="u"
- ;;
- __int64)
- curl_format_curl_off_t="I64d"
- curl_format_curl_off_tu="I64u"
- ;;
- __int32)
- curl_format_curl_off_t="I32d"
- curl_format_curl_off_tu="I32u"
- ;;
- __int16)
- curl_format_curl_off_t="I16d"
- curl_format_curl_off_tu="I16u"
- ;;
- *)
- as_fn_error $? "cannot find print format string for curl_off_t." "$LINENO" 5
- ;;
- esac
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$curl_format_curl_off_t\"" >&5
-$as_echo "\"$curl_format_curl_off_t\"" >&6; }
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking formatting string directive for unsigned curl_off_t" >&5
-$as_echo_n "checking formatting string directive for unsigned curl_off_t... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$curl_format_curl_off_tu\"" >&5
-$as_echo "\"$curl_format_curl_off_tu\"" >&6; }
- #
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking constant suffix string for curl_off_t" >&5
-$as_echo_n "checking constant suffix string for curl_off_t... " >&6; }
- #
- curl_suffix_curl_off_t="unknown"
- curl_suffix_curl_off_tu="unknown"
- #
- case `$as_echo "$curl_typeof_curl_off_t" | $as_tr_sh` in
- long_long | __longlong | __longlong_t)
- tst_suffixes="LL::"
- ;;
- long)
- tst_suffixes="L::"
- ;;
- int)
- tst_suffixes="::"
- ;;
- __int64 | int64_t)
- tst_suffixes="LL:i64::"
- ;;
- __int32 | int32_t)
- tst_suffixes="L:i32::"
- ;;
- __int16 | int16_t)
- tst_suffixes="L:i16::"
- ;;
- *)
- as_fn_error $? "unexpected data type $curl_typeof_curl_off_t" "$LINENO" 5
- ;;
- esac
- #
- old_IFS=$IFS; IFS=':'
- for tmp_ssuf in $tst_suffixes ; do
- IFS=$old_IFS
- if test "x$curl_suffix_curl_off_t" = "xunknown"; then
- case $tmp_ssuf in
- i64 | i32 | i16)
- tmp_usuf="u$tmp_ssuf"
- ;;
- LL | L)
- tmp_usuf="U$tmp_ssuf"
- ;;
- *)
- tmp_usuf=""
- ;;
- esac
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_inttypes
- typedef $curl_typeof_curl_off_t new_t;
-
-int main (void)
-{
-
- new_t s1;
- new_t s2;
- s1 = -10$tmp_ssuf ;
- s2 = 20$tmp_ssuf ;
- if(s1 > s2)
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_suffix_curl_off_t="$tmp_ssuf"
- curl_suffix_curl_off_tu="$tmp_usuf"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- IFS=$old_IFS
- #
- if test "x$curl_suffix_curl_off_t" = "xunknown"; then
- as_fn_error $? "cannot find constant suffix string for curl_off_t." "$LINENO" 5
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_suffix_curl_off_t" >&5
-$as_echo "$curl_suffix_curl_off_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking constant suffix string for unsigned curl_off_t" >&5
-$as_echo_n "checking constant suffix string for unsigned curl_off_t... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_suffix_curl_off_tu" >&5
-$as_echo "$curl_suffix_curl_off_tu" >&6; }
- fi
- #
-
- #
- if test "$x_pull_headers" = "yes"; then
- if test "x$ac_cv_header_sys_types_h" = "xyes"; then
-
-cat >>confdefs.h <<_EOF
-#define CURL_PULL_SYS_TYPES_H 1
-_EOF
-
- fi
- if test "x$ac_cv_header_stdint_h" = "xyes"; then
-
-cat >>confdefs.h <<_EOF
-#define CURL_PULL_STDINT_H 1
-_EOF
-
- fi
- if test "x$ac_cv_header_inttypes_h" = "xyes"; then
-
-cat >>confdefs.h <<_EOF
-#define CURL_PULL_INTTYPES_H 1
-_EOF
-
- fi
- fi
- #
-
-cat >>confdefs.h <<_EOF
-#define CURL_TYPEOF_CURL_OFF_T $curl_typeof_curl_off_t
-_EOF
-
-
-cat >>confdefs.h <<_EOF
-#define CURL_FORMAT_CURL_OFF_T "$curl_format_curl_off_t"
-_EOF
-
-
-cat >>confdefs.h <<_EOF
-#define CURL_FORMAT_CURL_OFF_TU "$curl_format_curl_off_tu"
-_EOF
-
-
-cat >>confdefs.h <<_EOF
-#define CURL_FORMAT_OFF_T "%$curl_format_curl_off_t"
-_EOF
-
-
-cat >>confdefs.h <<_EOF
-#define CURL_SIZEOF_CURL_OFF_T $curl_sizeof_curl_off_t
-_EOF
-
-
-cat >>confdefs.h <<_EOF
-#define CURL_SUFFIX_CURL_OFF_T $curl_suffix_curl_off_t
-_EOF
-
-
-cat >>confdefs.h <<_EOF
-#define CURL_SUFFIX_CURL_OFF_TU $curl_suffix_curl_off_tu
-_EOF
-
- #
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OS is AIX (to define _ALL_SOURCE)" >&5
-$as_echo_n "checking if OS is AIX (to define _ALL_SOURCE)... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#ifdef _AIX
- yes_this_is_aix
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes_this_is_aix" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f conftest*
-
-
-
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _THREAD_SAFE is already defined" >&5
-$as_echo_n "checking if _THREAD_SAFE is already defined... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
-#ifdef _THREAD_SAFE
- int dummy=1;
-#else
- force compilation error
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tmp_thread_safe_initially_defined="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tmp_thread_safe_initially_defined="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- #
- if test "$tmp_thread_safe_initially_defined" = "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _THREAD_SAFE is actually needed" >&5
-$as_echo_n "checking if _THREAD_SAFE is actually needed... " >&6; }
-
- case $host_os in
- aix[123].* | aix4.[012].*)
- tmp_need_thread_safe="no"
- ;;
- aix*)
- tmp_need_thread_safe="yes"
- ;;
- *)
- tmp_need_thread_safe="no"
- ;;
- esac
-
- if test "$tmp_need_thread_safe" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _THREAD_SAFE is onwards defined" >&5
-$as_echo_n "checking if _THREAD_SAFE is onwards defined... " >&6; }
- if test "$tmp_thread_safe_initially_defined" = "yes" ||
- test "$tmp_need_thread_safe" = "yes"; then
-
-
-$as_echo "#define NEED_THREAD_SAFE 1" >>confdefs.h
-
-cat >>confdefs.h <<_EOF
-#ifndef _THREAD_SAFE
-# define _THREAD_SAFE
-#endif
-_EOF
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- #
-
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _REENTRANT is already defined" >&5
-$as_echo_n "checking if _REENTRANT is already defined... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
-#ifdef _REENTRANT
- int dummy=1;
-#else
- force compilation error
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tmp_reentrant_initially_defined="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tmp_reentrant_initially_defined="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- #
- if test "$tmp_reentrant_initially_defined" = "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _REENTRANT is actually needed" >&5
-$as_echo_n "checking if _REENTRANT is actually needed... " >&6; }
-
- case $host_os in
- solaris*)
- tmp_need_reentrant="yes"
- ;;
- *)
- tmp_need_reentrant="no"
- ;;
- esac
-
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <errno.h>
-
-int main (void)
-{
-
- if(0 != errno)
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tmp_errno="yes"
-
-else
-
- tmp_errno="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$tmp_errno" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <errno.h>
-
-int main (void)
-{
-
-#ifdef errno
- int dummy=1;
-#else
- force compilation error
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tmp_errno="errno_macro_defined"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define _REENTRANT
-#include <errno.h>
-
-int main (void)
-{
-
-#ifdef errno
- int dummy=1;
-#else
- force compilation error
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tmp_errno="errno_macro_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
- fi
- if test "$tmp_need_reentrant" = "no"; then
-
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define gmtime_r innocuous_gmtime_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef gmtime_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char gmtime_r ();
-#if defined __stub_gmtime_r || defined __stub___gmtime_r
-choke me
-#endif
-
-int main (void)
-{
-return gmtime_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_gmtime_r="yes"
-
-else
-
- tmp_gmtime_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$tmp_gmtime_r" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <time.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gmtime_r" >/dev/null 2>&1; then :
-
- tmp_gmtime_r="proto_declared"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <time.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gmtime_r" >/dev/null 2>&1; then :
-
- tmp_gmtime_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
- fi
-
- fi
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define localtime_r innocuous_localtime_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef localtime_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char localtime_r ();
-#if defined __stub_localtime_r || defined __stub___localtime_r
-choke me
-#endif
-
-int main (void)
-{
-return localtime_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_localtime_r="yes"
-
-else
-
- tmp_localtime_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$tmp_localtime_r" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <time.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "localtime_r" >/dev/null 2>&1; then :
-
- tmp_localtime_r="proto_declared"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <time.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "localtime_r" >/dev/null 2>&1; then :
-
- tmp_localtime_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
- fi
-
- fi
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strerror_r innocuous_strerror_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strerror_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char strerror_r ();
-#if defined __stub_strerror_r || defined __stub___strerror_r
-choke me
-#endif
-
-int main (void)
-{
-return strerror_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_strerror_r="yes"
-
-else
-
- tmp_strerror_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$tmp_strerror_r" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strerror_r" >/dev/null 2>&1; then :
-
- tmp_strerror_r="proto_declared"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strerror_r" >/dev/null 2>&1; then :
-
- tmp_strerror_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
- fi
-
- fi
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strtok_r innocuous_strtok_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strtok_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char strtok_r ();
-#if defined __stub_strtok_r || defined __stub___strtok_r
-choke me
-#endif
-
-int main (void)
-{
-return strtok_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_strtok_r="yes"
-
-else
-
- tmp_strtok_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$tmp_strtok_r" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtok_r" >/dev/null 2>&1; then :
-
- tmp_strtok_r="proto_declared"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtok_r" >/dev/null 2>&1; then :
-
- tmp_strtok_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
- fi
-
- fi
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define inet_ntoa_r innocuous_inet_ntoa_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef inet_ntoa_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_ntoa_r ();
-#if defined __stub_inet_ntoa_r || defined __stub___inet_ntoa_r
-choke me
-#endif
-
-int main (void)
-{
-return inet_ntoa_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_inet_ntoa_r="yes"
-
-else
-
- tmp_inet_ntoa_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$tmp_inet_ntoa_r" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "inet_ntoa_r" >/dev/null 2>&1; then :
-
- tmp_inet_ntoa_r="proto_declared"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "inet_ntoa_r" >/dev/null 2>&1; then :
-
- tmp_inet_ntoa_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
- fi
-
- fi
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define gethostbyaddr_r innocuous_gethostbyaddr_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef gethostbyaddr_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyaddr_r ();
-#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r
-choke me
-#endif
-
-int main (void)
-{
-return gethostbyaddr_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_gethostbyaddr_r="yes"
-
-else
-
- tmp_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$tmp_gethostbyaddr_r" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then :
-
- tmp_gethostbyaddr_r="proto_declared"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then :
-
- tmp_gethostbyaddr_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
- fi
-
- fi
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define gethostbyname_r innocuous_gethostbyname_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef gethostbyname_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname_r ();
-#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
-choke me
-#endif
-
-int main (void)
-{
-return gethostbyname_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_gethostbyname_r="yes"
-
-else
-
- tmp_gethostbyname_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$tmp_gethostbyname_r" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gethostbyname_r" >/dev/null 2>&1; then :
-
- tmp_gethostbyname_r="proto_declared"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gethostbyname_r" >/dev/null 2>&1; then :
-
- tmp_gethostbyname_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
- fi
-
- fi
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define getprotobyname_r innocuous_getprotobyname_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef getprotobyname_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char getprotobyname_r ();
-#if defined __stub_getprotobyname_r || defined __stub___getprotobyname_r
-choke me
-#endif
-
-int main (void)
-{
-return getprotobyname_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_getprotobyname_r="yes"
-
-else
-
- tmp_getprotobyname_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$tmp_getprotobyname_r" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "getprotobyname_r" >/dev/null 2>&1; then :
-
- tmp_getprotobyname_r="proto_declared"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "getprotobyname_r" >/dev/null 2>&1; then :
-
- tmp_getprotobyname_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
- fi
-
- fi
- if test "$tmp_need_reentrant" = "no"; then
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define getservbyport_r innocuous_getservbyport_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef getservbyport_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char getservbyport_r ();
-#if defined __stub_getservbyport_r || defined __stub___getservbyport_r
-choke me
-#endif
-
-int main (void)
-{
-return getservbyport_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_getservbyport_r="yes"
-
-else
-
- tmp_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$tmp_getservbyport_r" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "getservbyport_r" >/dev/null 2>&1; then :
-
- tmp_getservbyport_r="proto_declared"
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "getservbyport_r" >/dev/null 2>&1; then :
-
- tmp_getservbyport_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
- fi
-
- fi
-
- fi
- if test "$tmp_need_reentrant" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _REENTRANT is onwards defined" >&5
-$as_echo_n "checking if _REENTRANT is onwards defined... " >&6; }
- if test "$tmp_reentrant_initially_defined" = "yes" ||
- test "$tmp_need_reentrant" = "yes"; then
-
-
-$as_echo "#define NEED_REENTRANT 1" >>confdefs.h
-
-cat >>confdefs.h <<_EOF
-#ifndef _REENTRANT
-# define _REENTRANT
-#endif
-_EOF
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- #
-
-
-# Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then :
- enableval=$enable_largefile;
-fi
-
-if test "$enable_largefile" != no; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if test "${ac_cv_sys_largefile_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_sys_largefile_CC=no
- if test "$GCC" != yes; then
- ac_save_CC=$CC
- while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
- break
-fi
-rm -f core conftest.err conftest.$ac_objext
- CC="$CC -n32"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_sys_largefile_CC=' -n32'; break
-fi
-rm -f core conftest.err conftest.$ac_objext
- break
- done
- CC=$ac_save_CC
- rm -f conftest.$ac_ext
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
- if test "$ac_cv_sys_largefile_CC" != no; then
- CC=$CC$ac_cv_sys_largefile_CC
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_sys_file_offset_bits=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_sys_file_offset_bits=64; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_sys_file_offset_bits=unknown
- break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
-case $ac_cv_sys_file_offset_bits in #(
- no | unknown) ;;
- *)
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
-;;
-esac
-rm -rf conftest*
- if test $ac_cv_sys_file_offset_bits = unknown; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if test "${ac_cv_sys_large_files+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_sys_large_files=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_sys_large_files=1; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_sys_large_files=unknown
- break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
-case $ac_cv_sys_large_files in #(
- no | unknown) ;;
- *)
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
-;;
-esac
-rm -rf conftest*
- fi
-fi
-
-
-enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AS+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
-$as_echo "$AS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AS="as"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
-$as_echo "$ac_ct_AS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AS" = x; then
- AS="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AS=$ac_ct_AS
- fi
-else
- AS="$ac_cv_prog_AS"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DLLTOOL" = x; then
- DLLTOOL="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DLLTOOL=$ac_ct_DLLTOOL
- fi
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OBJDUMP" = x; then
- OBJDUMP="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJDUMP=$ac_ct_OBJDUMP
- fi
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
- ;;
-esac
-
-test -z "$AS" && AS=as
-
-
-
-
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-
-
-
-
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)" >&5
-$as_echo_n "checking if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)... " >&6; }
-case $host in
- x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- with_pic=yes
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is icc (to build with PIC)" >&5
-$as_echo_n "checking if compiler is icc (to build with PIC)... " >&6; }
-case $CC in
- icc | */icc)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- with_pic=yes
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
-esac
-
-case `pwd` in
- *\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
-esac
-
-
-
-macro_version='2.2.6b'
-macro_revision='1.3017'
-
-
-
-
-
-
-
-
-
-
-
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
-else
- ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
-
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
- then ac_cv_path_FGREP="$GREP -F"
- else
- if test -z "$FGREP"; then
- ac_path_FGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
- # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_FGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_FGREP="$ac_path_FGREP"
- ac_path_FGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_FGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_FGREP"; then
- as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_FGREP=$FGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
-
-
-test -z "$GREP" && GREP=grep
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$ac_tool_prefix"; then
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$DUMPBIN" && break
- done
-fi
-if test -z "$DUMPBIN"; then
- ac_ct_DUMPBIN=$DUMPBIN
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DUMPBIN"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_DUMPBIN" && break
-done
-
- if test "x$ac_ct_DUMPBIN" = x; then
- DUMPBIN=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DUMPBIN=$ac_ct_DUMPBIN
- fi
-fi
-
-
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:7909: $ac_compile\"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
- (eval echo "\"\$as_me:7912: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
- (eval echo "\"\$as_me:7915: output\"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
-
-
-
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-
-
-
-
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OBJDUMP" = x; then
- OBJDUMP="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJDUMP=$ac_ct_OBJDUMP
- fi
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[4-9]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[45]*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[3-9]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AR" = x; then
- AR="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
-else
- AR="$ac_cv_prog_AR"
-fi
-
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-test -z "$STRIP" && STRIP=:
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-test -z "$RANLIB" && RANLIB=:
-
-
-
-
-
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[BCDT]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[ABCDGISTW]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[ABCDEGRST]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[BCDEGRST]'
- ;;
-osf*)
- symcode='[BCDEGQRST]'
- ;;
-solaris*)
- symcode='[BDRT]'
- ;;
-sco3.2v5*)
- symcode='[DT]'
- ;;
-sysv4.2uw2*)
- symcode='[DT]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[ABDT]'
- ;;
-sysv4)
- symcode='[DFNSTU]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK '"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&5
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&5
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
- fi
- else
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-
-fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
- enableval=$enable_libtool_lock;
-fi
-
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 9117 "configure"' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_cc_needs_belf=yes
-else
- lt_cv_cc_needs_belf=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-
-
- case $host_os in
- rhapsody* | darwin*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DSYMUTIL"; then
- ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DSYMUTIL=$ac_cv_prog_DSYMUTIL
-if test -n "$DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DSYMUTIL"; then
- ac_ct_DSYMUTIL=$DSYMUTIL
- # Extract the first word of "dsymutil", so it can be a program name with args.
-set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DSYMUTIL"; then
- ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
-if test -n "$ac_ct_DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DSYMUTIL" = x; then
- DSYMUTIL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DSYMUTIL=$ac_ct_DSYMUTIL
- fi
-else
- DSYMUTIL="$ac_cv_prog_DSYMUTIL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NMEDIT"; then
- ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NMEDIT"; then
- ac_ct_NMEDIT=$NMEDIT
- # Extract the first word of "nmedit", so it can be a program name with args.
-set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_NMEDIT"; then
- ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_NMEDIT="nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
-if test -n "$ac_ct_NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_NMEDIT" = x; then
- NMEDIT=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- NMEDIT=$ac_ct_NMEDIT
- fi
-else
- NMEDIT="$ac_cv_prog_NMEDIT"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
-set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$LIPO"; then
- ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-LIPO=$ac_cv_prog_LIPO
-if test -n "$LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LIPO"; then
- ac_ct_LIPO=$LIPO
- # Extract the first word of "lipo", so it can be a program name with args.
-set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_LIPO"; then
- ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_LIPO="lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
-if test -n "$ac_ct_LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_LIPO" = x; then
- LIPO=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- LIPO=$ac_ct_LIPO
- fi
-else
- LIPO="$ac_cv_prog_LIPO"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL"; then
- ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL=$ac_cv_prog_OTOOL
-if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL"; then
- ac_ct_OTOOL=$OTOOL
- # Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL"; then
- ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OTOOL="otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
-if test -n "$ac_ct_OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL" = x; then
- OTOOL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OTOOL=$ac_ct_OTOOL
- fi
-else
- OTOOL="$ac_cv_prog_OTOOL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL64"; then
- ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL64=$ac_cv_prog_OTOOL64
-if test -n "$OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL64"; then
- ac_ct_OTOOL64=$OTOOL64
- # Extract the first word of "otool64", so it can be a program name with args.
-set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL64"; then
- ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OTOOL64="otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
-if test -n "$ac_ct_OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL64" = x; then
- OTOOL64=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OTOOL64=$ac_ct_OTOOL64
- fi
-else
- OTOOL64="$ac_cv_prog_OTOOL64"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&5
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&5
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_ld_exported_symbols_list=yes
-else
- lt_cv_ld_exported_symbols_list=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
- case $host_os in
- rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-
-for ac_header in dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
-
-fi
-
-done
-
-
-
-# Set options
-
-
-
- enable_dlopen=no
-
-
-
- # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_shared=yes
-fi
-
-
-
-
-
-
-
-
-
- # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
- enableval=$enable_static; p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_static=yes
-fi
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
- withval=$with_pic; pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-
-test -z "$pic_mode" && pic_mode=default
-
-
-
-
-
-
-
- # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
- enableval=$enable_fast_install; p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_fast_install=yes
-fi
-
-
-
-
-
-
-
-
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-test -z "$LN_S" && LN_S="ln -s"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-
-lt_prog_compiler_no_builtin_flag=
-
-if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_rtti_exceptions=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10375: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:10379: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_rtti_exceptions=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
- lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
- :
-fi
-
-fi
-
-
-
-
-
-
- lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-
- if test "$GCC" = yes; then
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_static='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- lt_prog_compiler_pic='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- ;;
-
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- lt_prog_compiler_can_build_shared=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic=-Kconform_pic
- fi
- ;;
-
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- else
- lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- lt_prog_compiler_wl='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_prog_compiler_wl='-Wl,'
- # PIC (with -KPIC) is the default.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fPIC'
- lt_prog_compiler_static='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='--shared'
- lt_prog_compiler_static='--static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fpic'
- lt_prog_compiler_static='-Bstatic'
- ;;
- ccc*)
- lt_prog_compiler_wl='-Wl,'
- # All Alpha code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
- xl*)
- # IBM XL C 8.0/Fortran 10.1 on PPC
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-qpic'
- lt_prog_compiler_static='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl=''
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- lt_prog_compiler_wl='-Wl,'
- # All OSF/1 code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- rdos*)
- lt_prog_compiler_static='-non_shared'
- ;;
-
- solaris*)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- lt_prog_compiler_wl='-Qoption ld ';;
- *)
- lt_prog_compiler_wl='-Wl,';;
- esac
- ;;
-
- sunos4*)
- lt_prog_compiler_wl='-Qoption ld '
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_prog_compiler_pic='-Kconform_pic'
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- unicos*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_can_build_shared=no
- ;;
-
- uts4*)
- lt_prog_compiler_pic='-pic'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *)
- lt_prog_compiler_can_build_shared=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic=
- ;;
- *)
- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
-
-
-
-
-
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_pic_works=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10714: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:10718: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_pic_works=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
- case $lt_prog_compiler_pic in
- "" | " "*) ;;
- *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
- esac
-else
- lt_prog_compiler_pic=
- lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-
-
-
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_static_works=yes
- fi
- else
- lt_cv_prog_compiler_static_works=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
- :
-else
- lt_prog_compiler_static=
-fi
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10819: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:10823: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10874: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:10878: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
- runpath_var=
- allow_undefined_flag=
- always_export_symbols=no
- archive_cmds=
- archive_expsym_cmds=
- compiler_needs_object=no
- enable_shared_with_static_runtimes=no
- export_dynamic_flag_spec=
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- hardcode_automatic=no
- hardcode_direct=no
- hardcode_direct_absolute=no
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld=
- hardcode_libdir_separator=
- hardcode_minus_L=no
- hardcode_shlibpath_var=unsupported
- inherit_rpath=no
- link_all_deplibs=unknown
- module_cmds=
- module_expsym_cmds=
- old_archive_from_new_cmds=
- old_archive_from_expsyms_cmds=
- thread_safe_flag_spec=
- whole_archive_flag_spec=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- include_expsyms=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- linux* | k*bsd*-gnu)
- link_all_deplibs=no
- ;;
- esac
-
- ld_shlibs=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *GNU\ gold*) supports_anon_versioning=yes ;;
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[3-9]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=no
- enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- interix[3-9]*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- whole_archive_flag_spec=
- tmp_sharedflag='--shared' ;;
- xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- compiler_needs_object=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld='-rpath $libdir'
- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- ld_shlibs=no
- fi
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs" = no; then
- runpath_var=
- hardcode_libdir_flag_spec=
- export_dynamic_flag_spec=
- whole_archive_flag_spec=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix[4-9]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds=''
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- file_list_spec='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- link_all_deplibs=no
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- export_dynamic_flag_spec='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec='$convenience'
- archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- bsdi[45]*)
- export_dynamic_flag_spec=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes=yes
- ;;
-
- darwin* | rhapsody*)
-
-
- archive_cmds_need_lc=no
- hardcode_direct=no
- hardcode_automatic=yes
- hardcode_shlibpath_var=unsupported
- whole_archive_flag_spec=''
- link_all_deplibs=yes
- allow_undefined_flag="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-
- else
- ld_shlibs=no
- fi
-
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- freebsd1*)
- ld_shlibs=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_flag_spec_ld='+b $libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- ;;
- *)
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int foo(void) {}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- inherit_rpath=yes
- link_all_deplibs=yes
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- newsos6)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_shlibpath_var=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- ld_shlibs=no
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_separator=:
- ;;
-
- solaris*)
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- reload_cmds='$CC -r -o $output$reload_objs'
- hardcode_direct=no
- ;;
- motorola)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
-
-with_gnu_ld=$with_gnu_ld
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl
- pic_flag=$lt_prog_compiler_pic
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
- (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- then
- archive_cmds_need_lc=no
- else
- archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[lt_foo]++; }
- if (lt_freq[lt_foo] == 1) { print lt_foo; }
-}'`
- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[4-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
- LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
- shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
- test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
-
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
- if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int main (void)
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
-
-fi
-
- ;;
-
- *)
- ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
- lt_cv_dlopen="shl_load"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int main (void)
-{
-return shl_load ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_shl_load=yes
-else
- ac_cv_lib_dld_shl_load=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
- ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int main (void)
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int main (void)
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_svld_dlopen=yes
-else
- ac_cv_lib_svld_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
-int main (void)
-{
-return dld_link ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_dld_link=yes
-else
- ac_cv_lib_dld_dld_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 13240 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self_static=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 13336 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-striplib=
-old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
- # Report which library types will actually be built
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[4-9]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
-
-
-
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-
-
-
-
-
-
-
-
-
-
-
-
- ac_config_commands="$ac_config_commands libtool"
-
-
-
-
-# Only expand once:
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need -mimpure-text" >&5
-$as_echo_n "checking if we need -mimpure-text... " >&6; }
-mimpure=no
-case $host in
- *-*-solaris2*)
- if test "$GCC" = "yes"; then
- mimpure="yes"
- fi
- ;;
- *)
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mimpure" >&5
-$as_echo "$mimpure" >&6; }
-
-
-if test x$mimpure = xyes; then
- MIMPURE_TRUE=
- MIMPURE_FALSE='#'
-else
- MIMPURE_TRUE='#'
- MIMPURE_FALSE=
-fi
-
-
-
-
-if false; then
- STATICLIB_TRUE=
- STATICLIB_FALSE='#'
-else
- STATICLIB_TRUE='#'
- STATICLIB_FALSE=
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need BUILDING_LIBCURL" >&5
-$as_echo_n "checking if we need BUILDING_LIBCURL... " >&6; }
-case $host in
- *-*-mingw*)
-
-$as_echo "#define BUILDING_LIBCURL 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need CURL_STATICLIB" >&5
-$as_echo_n "checking if we need CURL_STATICLIB... " >&6; }
- if test "X$enable_shared" = "Xno"
- then
-
-$as_echo "#define CURL_STATICLIB 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
-if true; then
- STATICLIB_TRUE=
- STATICLIB_FALSE='#'
-else
- STATICLIB_TRUE='#'
- STATICLIB_FALSE=
-fi
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
-esac
-
-# Determine whether all dependent libraries must be specified when linking
-if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
-then
- REQUIRE_LIB_DEPS=no
-else
- REQUIRE_LIB_DEPS=yes
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SET_MAKE=
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_inline=$ac_kw
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$ac_cv_c_inline" != no && break
-done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
-
-
-
-
- #
- compiler_id="unknown"
- compiler_num="0"
- #
- flags_dbg_all="unknown"
- flags_dbg_yes="unknown"
- flags_dbg_off="unknown"
- flags_opt_all="unknown"
- flags_opt_yes="unknown"
- flags_opt_off="unknown"
- #
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is DEC/Compaq/HP C" >&5
-$as_echo_n "checking if compiler is DEC/Compaq/HP C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __DECC
-CURL_DEF_TOKEN __DECC
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___DECC=no
-
- else
- curl_cv_have_def___DECC=yes
- curl_cv_def___DECC=$tmp_exp
-
- fi
-
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __DECC_VER
-CURL_DEF_TOKEN __DECC_VER
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC_VER"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___DECC_VER=no
-
- else
- curl_cv_have_def___DECC_VER=yes
- curl_cv_def___DECC_VER=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___DECC" = "yes" &&
- test "$curl_cv_have_def___DECC_VER" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="DEC_C"
- flags_dbg_all="-g -g0 -g1 -g2 -g3"
- flags_dbg_yes="-g2"
- flags_dbg_off="-g0"
- flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
- flags_opt_yes="-O1"
- flags_opt_off="-O0"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is HP-UX C" >&5
-$as_echo_n "checking if compiler is HP-UX C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __HP_cc
-CURL_DEF_TOKEN __HP_cc
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__HP_cc"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___HP_cc=no
-
- else
- curl_cv_have_def___HP_cc=yes
- curl_cv_def___HP_cc=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___HP_cc" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="HP_UX_C"
- flags_dbg_all="-g -s"
- flags_dbg_yes="-g"
- flags_dbg_off="-s"
- flags_opt_all="-O +O0 +O1 +O2 +O3 +O4"
- flags_opt_yes="+O2"
- flags_opt_off="+O0"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is IBM C" >&5
-$as_echo_n "checking if compiler is IBM C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __IBMC__
-CURL_DEF_TOKEN __IBMC__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__IBMC__"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___IBMC__=no
-
- else
- curl_cv_have_def___IBMC__=yes
- curl_cv_def___IBMC__=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___IBMC__" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="IBM_C"
- flags_dbg_all="-g -g0 -g1 -g2 -g3"
- flags_dbg_yes="-g"
- flags_dbg_off=""
- flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5"
- flags_opt_all="$flags_opt_all -qnooptimize"
- flags_opt_all="$flags_opt_all -qoptimize=0"
- flags_opt_all="$flags_opt_all -qoptimize=1"
- flags_opt_all="$flags_opt_all -qoptimize=2"
- flags_opt_all="$flags_opt_all -qoptimize=3"
- flags_opt_all="$flags_opt_all -qoptimize=4"
- flags_opt_all="$flags_opt_all -qoptimize=5"
- flags_opt_yes="-O2"
- flags_opt_off="-qnooptimize"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is Intel C" >&5
-$as_echo_n "checking if compiler is Intel C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __INTEL_COMPILER
-CURL_DEF_TOKEN __INTEL_COMPILER
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__INTEL_COMPILER"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___INTEL_COMPILER=no
-
- else
- curl_cv_have_def___INTEL_COMPILER=yes
- curl_cv_def___INTEL_COMPILER=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_num="$curl_cv_def___INTEL_COMPILER"
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __unix__
-CURL_DEF_TOKEN __unix__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = ""; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___unix__=no
-
- else
- curl_cv_have_def___unix__=yes
- curl_cv_def___unix__=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___unix__" = "yes"; then
- compiler_id="INTEL_UNIX_C"
- flags_dbg_all="-g -g0"
- flags_dbg_yes="-g"
- flags_dbg_off="-g0"
- flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
- flags_opt_yes="-O2"
- flags_opt_off="-O0"
- else
- compiler_id="INTEL_WINDOWS_C"
- flags_dbg_all="/ZI /Zi /zI /zi /ZD /Zd /zD /zd /Z7 /z7 /Oy /Oy-"
- flags_dbg_all="$flags_dbg_all /debug"
- flags_dbg_all="$flags_dbg_all /debug:none"
- flags_dbg_all="$flags_dbg_all /debug:minimal"
- flags_dbg_all="$flags_dbg_all /debug:partial"
- flags_dbg_all="$flags_dbg_all /debug:full"
- flags_dbg_all="$flags_dbg_all /debug:semantic_stepping"
- flags_dbg_all="$flags_dbg_all /debug:extended"
- flags_dbg_yes="/Zi /Oy-"
- flags_dbg_off="/debug:none /Oy-"
- flags_opt_all="/O /O0 /O1 /O2 /O3 /Od /Og /Og- /Oi /Oi-"
- flags_opt_yes="/O2"
- flags_opt_off="/Od"
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is clang" >&5
-$as_echo_n "checking if compiler is clang... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __clang__
-CURL_DEF_TOKEN __clang__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__clang__"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___clang__=no
-
- else
- curl_cv_have_def___clang__=yes
- curl_cv_def___clang__=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___clang__" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="CLANG"
- clangver=`$CC -dumpversion`
- clangvhi=`echo $clangver | cut -d . -f1`
- clangvlo=`echo $clangver | cut -d . -f2`
- compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`
- flags_dbg_all="-g -g0 -g1 -g2 -g3"
- flags_dbg_all="$flags_dbg_all -ggdb"
- flags_dbg_all="$flags_dbg_all -gstabs"
- flags_dbg_all="$flags_dbg_all -gstabs+"
- flags_dbg_all="$flags_dbg_all -gcoff"
- flags_dbg_all="$flags_dbg_all -gxcoff"
- flags_dbg_all="$flags_dbg_all -gdwarf-2"
- flags_dbg_all="$flags_dbg_all -gvms"
- flags_dbg_yes="-g"
- flags_dbg_off="-g0"
- flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
- flags_opt_yes="-Os"
- flags_opt_off="-O0"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is GNU C" >&5
-$as_echo_n "checking if compiler is GNU C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __GNUC__
-CURL_DEF_TOKEN __GNUC__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___GNUC__=no
-
- else
- curl_cv_have_def___GNUC__=yes
- curl_cv_def___GNUC__=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___GNUC__" = "yes" &&
- test "$compiler_id" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="GNU_C"
- gccver=`$CC -dumpversion`
- gccvhi=`echo $gccver | cut -d . -f1`
- gccvlo=`echo $gccver | cut -d . -f2`
- compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
- flags_dbg_all="-g -g0 -g1 -g2 -g3"
- flags_dbg_all="$flags_dbg_all -ggdb"
- flags_dbg_all="$flags_dbg_all -gstabs"
- flags_dbg_all="$flags_dbg_all -gstabs+"
- flags_dbg_all="$flags_dbg_all -gcoff"
- flags_dbg_all="$flags_dbg_all -gxcoff"
- flags_dbg_all="$flags_dbg_all -gdwarf-2"
- flags_dbg_all="$flags_dbg_all -gvms"
- flags_dbg_yes="-g"
- flags_dbg_off="-g0"
- flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
- flags_opt_yes="-O2"
- flags_opt_off="-O0"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is LCC" >&5
-$as_echo_n "checking if compiler is LCC... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __LCC__
-CURL_DEF_TOKEN __LCC__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__LCC__"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___LCC__=no
-
- else
- curl_cv_have_def___LCC__=yes
- curl_cv_def___LCC__=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___LCC__" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="LCC"
- flags_dbg_all="-g"
- flags_dbg_yes="-g"
- flags_dbg_off=""
- flags_opt_all=""
- flags_opt_yes=""
- flags_opt_off=""
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is SGI MIPSpro C" >&5
-$as_echo_n "checking if compiler is SGI MIPSpro C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __GNUC__
-CURL_DEF_TOKEN __GNUC__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___GNUC__=no
-
- else
- curl_cv_have_def___GNUC__=yes
- curl_cv_def___GNUC__=$tmp_exp
-
- fi
-
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef _COMPILER_VERSION
-CURL_DEF_TOKEN _COMPILER_VERSION
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "_COMPILER_VERSION"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def__COMPILER_VERSION=no
-
- else
- curl_cv_have_def__COMPILER_VERSION=yes
- curl_cv_def__COMPILER_VERSION=$tmp_exp
-
- fi
-
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef _SGI_COMPILER_VERSION
-CURL_DEF_TOKEN _SGI_COMPILER_VERSION
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "_SGI_COMPILER_VERSION"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def__SGI_COMPILER_VERSION=no
-
- else
- curl_cv_have_def__SGI_COMPILER_VERSION=yes
- curl_cv_def__SGI_COMPILER_VERSION=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___GNUC__" = "no" &&
- (test "$curl_cv_have_def__SGI_COMPILER_VERSION" = "yes" ||
- test "$curl_cv_have_def__COMPILER_VERSION" = "yes"); then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="SGI_MIPSPRO_C"
- flags_dbg_all="-g -g0 -g1 -g2 -g3"
- flags_dbg_yes="-g"
- flags_dbg_off="-g0"
- flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
- flags_opt_yes="-O2"
- flags_opt_off="-O0"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is SGI MIPS C" >&5
-$as_echo_n "checking if compiler is SGI MIPS C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __GNUC__
-CURL_DEF_TOKEN __GNUC__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___GNUC__=no
-
- else
- curl_cv_have_def___GNUC__=yes
- curl_cv_def___GNUC__=$tmp_exp
-
- fi
-
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __sgi
-CURL_DEF_TOKEN __sgi
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__sgi"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___sgi=no
-
- else
- curl_cv_have_def___sgi=yes
- curl_cv_def___sgi=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___GNUC__" = "no" &&
- test "$curl_cv_have_def___sgi" = "yes" &&
- test "$compiler_id" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="SGI_MIPS_C"
- flags_dbg_all="-g -g0 -g1 -g2 -g3"
- flags_dbg_yes="-g"
- flags_dbg_off="-g0"
- flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
- flags_opt_yes="-O2"
- flags_opt_off="-O0"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is SunPro C" >&5
-$as_echo_n "checking if compiler is SunPro C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __SUNPRO_C
-CURL_DEF_TOKEN __SUNPRO_C
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__SUNPRO_C"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___SUNPRO_C=no
-
- else
- curl_cv_have_def___SUNPRO_C=yes
- curl_cv_def___SUNPRO_C=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___SUNPRO_C" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="SUNPRO_C"
- flags_dbg_all="-g -s"
- flags_dbg_yes="-g"
- flags_dbg_off="-s"
- flags_opt_all="-O -xO -xO1 -xO2 -xO3 -xO4 -xO5"
- flags_opt_yes="-xO2"
- flags_opt_off=""
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is Tiny C" >&5
-$as_echo_n "checking if compiler is Tiny C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __TINYC__
-CURL_DEF_TOKEN __TINYC__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__TINYC__"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___TINYC__=no
-
- else
- curl_cv_have_def___TINYC__=yes
- curl_cv_def___TINYC__=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___TINYC__" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- compiler_id="TINY_C"
- flags_dbg_all="-g -b"
- flags_dbg_yes="-g"
- flags_dbg_off=""
- flags_opt_all=""
- flags_opt_yes=""
- flags_opt_off=""
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is Watcom C" >&5
-$as_echo_n "checking if compiler is Watcom C... " >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __WATCOMC__
-CURL_DEF_TOKEN __WATCOMC__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__WATCOMC__"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___WATCOMC__=no
-
- else
- curl_cv_have_def___WATCOMC__=yes
- curl_cv_def___WATCOMC__=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___WATCOMC__" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
- if test -z "$SED"; then
- as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
- fi
- if test -z "$GREP"; then
- as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
- fi
-
- tmp_exp=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __UNIX__
-CURL_DEF_TOKEN __UNIX__
-#endif
-
-
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
- tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
- "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
- "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
- "$SED" 's/["][ ]*["]//g' 2>/dev/null`
- if test -z "$tmp_exp" || test "$tmp_exp" = "__UNIX__"; then
- tmp_exp=""
- fi
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- if test -z "$tmp_exp"; then
- curl_cv_have_def___UNIX__=no
-
- else
- curl_cv_have_def___UNIX__=yes
- curl_cv_def___UNIX__=$tmp_exp
-
- fi
-
- if test "$curl_cv_have_def___UNIX__" = "yes"; then
- compiler_id="WATCOM_UNIX_C"
- flags_dbg_all="-g1 -g1+ -g2 -g3"
- flags_dbg_yes="-g2"
- flags_dbg_off=""
- flags_opt_all="-O0 -O1 -O2 -O3"
- flags_opt_yes="-O2"
- flags_opt_off="-O0"
- else
- compiler_id="WATCOM_WINDOWS_C"
- flags_dbg_all=""
- flags_dbg_yes=""
- flags_dbg_off=""
- flags_opt_all=""
- flags_opt_yes=""
- flags_opt_off=""
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
- #
- if test "$compiler_id" = "unknown"; then
- cat <<_EOF 1>&2
-***
-*** Warning: This configure script does not have information about the
-*** compiler you are using, relative to the flags required to enable or
-*** disable generation of debug info, optimization options or warnings.
-***
-*** Whatever settings are present in CFLAGS will be used for this run.
-***
-*** If you wish to help the cURL project to better support your compiler
-*** you can report this and the required info on the libcurl development
-*** mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/
-***
-_EOF
- fi
-
-
-squeeze() {
- _sqz_result=""
- eval _sqz_input=\$$1
- for _sqz_token in $_sqz_input; do
- if test -z "$_sqz_result"; then
- _sqz_result="$_sqz_token"
- else
- _sqz_result="$_sqz_result $_sqz_token"
- fi
- done
- eval $1=\$_sqz_result
- return 0
-}
-
-
- #
- if test "$compiler_id" != "unknown"; then
- #
- if test "$compiler_id" = "GNU_C" ||
- test "$compiler_id" = "CLANG"; then
-
- tmp_has_include="no"
- tmp_chg_FLAGS="$CFLAGS"
- for word1 in $tmp_chg_FLAGS; do
- case "$word1" in
- -I*)
- tmp_has_include="yes"
- ;;
- esac
- done
- if test "$tmp_has_include" = "yes"; then
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
- CFLAGS="$tmp_chg_FLAGS"
- squeeze CFLAGS
- fi
- tmp_has_include="no"
- tmp_chg_FLAGS="$CPPFLAGS"
- for word1 in $tmp_chg_FLAGS; do
- case "$word1" in
- -I*)
- tmp_has_include="yes"
- ;;
- esac
- done
- if test "$tmp_has_include" = "yes"; then
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
- CPPFLAGS="$tmp_chg_FLAGS"
- squeeze CPPFLAGS
- fi
-
- fi
- #
- tmp_save_CPPFLAGS="$CPPFLAGS"
- tmp_save_CFLAGS="$CFLAGS"
- tmp_CPPFLAGS=""
- tmp_CFLAGS=""
- #
- case "$compiler_id" in
- #
- CLANG)
- #
- tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
- ;;
- #
- DEC_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS -std1"
- tmp_CFLAGS="$tmp_CFLAGS -noansi_alias"
- tmp_CFLAGS="$tmp_CFLAGS -warnprotos"
- tmp_CFLAGS="$tmp_CFLAGS -msg_fatal toofewargs,toomanyargs"
- ;;
- #
- GNU_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- HP_UX_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS -z"
- tmp_CFLAGS="$tmp_CFLAGS +W 4227,4255"
- ;;
- #
- IBM_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS -qthreaded"
- tmp_CFLAGS="$tmp_CFLAGS -qnoansialias"
- tmp_CFLAGS="$tmp_CFLAGS -qhalt=e"
- ;;
- #
- INTEL_UNIX_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS -std=gnu89"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -we 140,147,165,266"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -wd 279,981,1469"
- ;;
- #
- INTEL_WINDOWS_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- LCC)
- #
- tmp_CFLAGS="$tmp_CFLAGS -n"
- ;;
- #
- SGI_MIPS_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- SGI_MIPSPRO_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- SUNPRO_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- TINY_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- WATCOM_UNIX_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- WATCOM_WINDOWS_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- esac
- #
- squeeze tmp_CPPFLAGS
- squeeze tmp_CFLAGS
- #
- if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts some basic options" >&5
-$as_echo_n "checking if compiler accepts some basic options... " >&6; }
- CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
- CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
- squeeze CPPFLAGS
- squeeze CFLAGS
-
- tmp_compiler_works="unknown"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- int i = 1;
- return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- sed 's/^/cc-fail: /' conftest.err >&6
- echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$tmp_compiler_works" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- int i = 1;
- return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- sed 's/^/link-fail: /' conftest.err >&6
- echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- if test "x$cross_compiling" != "xyes" &&
- test "$tmp_compiler_works" = "yes"; then
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-# ifdef __STDC__
-# include <stdlib.h>
-# endif
-
-int main (void)
-{
-
- int i = 0;
- exit(i);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- echo "run-fail: test program exited with status $ac_status" >&6
- echo " " >&6
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- if test "$tmp_compiler_works" = "yes"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
-$as_echo "$as_me: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&6;}
-
- else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
-$as_echo "$as_me: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&2;}
- CPPFLAGS="$tmp_save_CPPFLAGS"
- CFLAGS="$tmp_save_CFLAGS"
-
- fi
-
- fi
- #
- fi
-
-
- #
- if test "$compiler_id" != "unknown"; then
- #
- tmp_save_CFLAGS="$CFLAGS"
- tmp_save_CPPFLAGS="$CPPFLAGS"
- #
- tmp_options=""
- tmp_CFLAGS="$CFLAGS"
- tmp_CPPFLAGS="$CPPFLAGS"
-
- ac_var_stripped=""
- for word1 in $tmp_CFLAGS; do
- ac_var_strip_word="no"
- for word2 in $flags_dbg_all; do
- if test "$word1" = "$word2"; then
- ac_var_strip_word="yes"
- fi
- done
- if test "$ac_var_strip_word" = "no"; then
- ac_var_stripped="$ac_var_stripped $word1"
- fi
- done
- tmp_CFLAGS="$ac_var_stripped"
- squeeze tmp_CFLAGS
-
-
- ac_var_stripped=""
- for word1 in $tmp_CPPFLAGS; do
- ac_var_strip_word="no"
- for word2 in $flags_dbg_all; do
- if test "$word1" = "$word2"; then
- ac_var_strip_word="yes"
- fi
- done
- if test "$ac_var_strip_word" = "no"; then
- ac_var_stripped="$ac_var_stripped $word1"
- fi
- done
- tmp_CPPFLAGS="$ac_var_stripped"
- squeeze tmp_CPPFLAGS
-
- #
- if test "$want_debug" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts debug enabling options" >&5
-$as_echo_n "checking if compiler accepts debug enabling options... " >&6; }
- tmp_options="$flags_dbg_yes"
- fi
- if test "$want_debug" = "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts debug disabling options" >&5
-$as_echo_n "checking if compiler accepts debug disabling options... " >&6; }
- tmp_options="$flags_dbg_off"
- fi
- #
- CPPFLAGS="$tmp_CPPFLAGS"
- CFLAGS="$tmp_CFLAGS $tmp_options"
- squeeze CPPFLAGS
- squeeze CFLAGS
-
- tmp_compiler_works="unknown"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- int i = 1;
- return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- sed 's/^/cc-fail: /' conftest.err >&6
- echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$tmp_compiler_works" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- int i = 1;
- return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- sed 's/^/link-fail: /' conftest.err >&6
- echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- if test "x$cross_compiling" != "xyes" &&
- test "$tmp_compiler_works" = "yes"; then
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-# ifdef __STDC__
-# include <stdlib.h>
-# endif
-
-int main (void)
-{
-
- int i = 0;
- exit(i);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- echo "run-fail: test program exited with status $ac_status" >&6
- echo " " >&6
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- if test "$tmp_compiler_works" = "yes"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_options" >&5
-$as_echo "$as_me: compiler options added: $tmp_options" >&6;}
-
- else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_options" >&5
-$as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
- CPPFLAGS="$tmp_save_CPPFLAGS"
- CFLAGS="$tmp_save_CFLAGS"
-
- fi
-
- #
- fi
-
-
- #
- if test "$compiler_id" != "unknown"; then
- #
- tmp_save_CFLAGS="$CFLAGS"
- tmp_save_CPPFLAGS="$CPPFLAGS"
- #
- tmp_options=""
- tmp_CFLAGS="$CFLAGS"
- tmp_CPPFLAGS="$CPPFLAGS"
- honor_optimize_option="yes"
- #
- #
- if test "$want_optimize" = "assume_no" ||
- test "$want_optimize" = "assume_yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler optimizer assumed setting might be used" >&5
-$as_echo_n "checking if compiler optimizer assumed setting might be used... " >&6; }
-
-
- ac_var_match_word="no"
- for word1 in $tmp_CFLAGS; do
- for word2 in $flags_opt_all; do
- if test "$word1" = "$word2"; then
- ac_var_match_word="yes"
- fi
- done
- done
-
- if test "$ac_var_match_word" = "yes"; then
-
- honor_optimize_option="no"
-
-
- fi
-
-
-
- ac_var_match_word="no"
- for word1 in $tmp_CPPFLAGS; do
- for word2 in $flags_opt_all; do
- if test "$word1" = "$word2"; then
- ac_var_match_word="yes"
- fi
- done
- done
-
- if test "$ac_var_match_word" = "yes"; then
-
- honor_optimize_option="no"
-
-
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $honor_optimize_option" >&5
-$as_echo "$honor_optimize_option" >&6; }
- if test "$honor_optimize_option" = "yes"; then
- if test "$want_optimize" = "assume_yes"; then
- want_optimize="yes"
- fi
- if test "$want_optimize" = "assume_no"; then
- want_optimize="no"
- fi
- fi
- fi
- #
- if test "$honor_optimize_option" = "yes"; then
-
- ac_var_stripped=""
- for word1 in $tmp_CFLAGS; do
- ac_var_strip_word="no"
- for word2 in $flags_opt_all; do
- if test "$word1" = "$word2"; then
- ac_var_strip_word="yes"
- fi
- done
- if test "$ac_var_strip_word" = "no"; then
- ac_var_stripped="$ac_var_stripped $word1"
- fi
- done
- tmp_CFLAGS="$ac_var_stripped"
- squeeze tmp_CFLAGS
-
-
- ac_var_stripped=""
- for word1 in $tmp_CPPFLAGS; do
- ac_var_strip_word="no"
- for word2 in $flags_opt_all; do
- if test "$word1" = "$word2"; then
- ac_var_strip_word="yes"
- fi
- done
- if test "$ac_var_strip_word" = "no"; then
- ac_var_stripped="$ac_var_stripped $word1"
- fi
- done
- tmp_CPPFLAGS="$ac_var_stripped"
- squeeze tmp_CPPFLAGS
-
- if test "$want_optimize" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts optimizer enabling options" >&5
-$as_echo_n "checking if compiler accepts optimizer enabling options... " >&6; }
- tmp_options="$flags_opt_yes"
- fi
- if test "$want_optimize" = "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts optimizer disabling options" >&5
-$as_echo_n "checking if compiler accepts optimizer disabling options... " >&6; }
- tmp_options="$flags_opt_off"
- fi
- CPPFLAGS="$tmp_CPPFLAGS"
- CFLAGS="$tmp_CFLAGS $tmp_options"
- squeeze CPPFLAGS
- squeeze CFLAGS
-
- tmp_compiler_works="unknown"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- int i = 1;
- return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- sed 's/^/cc-fail: /' conftest.err >&6
- echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$tmp_compiler_works" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- int i = 1;
- return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- sed 's/^/link-fail: /' conftest.err >&6
- echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- if test "x$cross_compiling" != "xyes" &&
- test "$tmp_compiler_works" = "yes"; then
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-# ifdef __STDC__
-# include <stdlib.h>
-# endif
-
-int main (void)
-{
-
- int i = 0;
- exit(i);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- echo "run-fail: test program exited with status $ac_status" >&6
- echo " " >&6
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- if test "$tmp_compiler_works" = "yes"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_options" >&5
-$as_echo "$as_me: compiler options added: $tmp_options" >&6;}
-
- else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_options" >&5
-$as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
- CPPFLAGS="$tmp_save_CPPFLAGS"
- CFLAGS="$tmp_save_CFLAGS"
-
- fi
-
- fi
- #
- fi
-
-
- #
- if test "$compiler_id" != "unknown"; then
- #
- tmp_save_CPPFLAGS="$CPPFLAGS"
- tmp_save_CFLAGS="$CFLAGS"
- tmp_CPPFLAGS=""
- tmp_CFLAGS=""
- #
- case "$compiler_id" in
- #
- CLANG)
- #
- if test "$want_warnings" = "yes"; then
- tmp_CFLAGS="$tmp_CFLAGS -pedantic"
- tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
- tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings"
- tmp_CFLAGS="$tmp_CFLAGS -Wshadow"
- tmp_CFLAGS="$tmp_CFLAGS -Winline -Wnested-externs"
- tmp_CFLAGS="$tmp_CFLAGS -Wmissing-declarations"
- tmp_CFLAGS="$tmp_CFLAGS -Wmissing-prototypes"
- tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
- tmp_CFLAGS="$tmp_CFLAGS -Wfloat-equal"
- tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar -Wsign-compare"
- tmp_CFLAGS="$tmp_CFLAGS -Wundef"
- tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
- tmp_CFLAGS="$tmp_CFLAGS -Wendif-labels -Wstrict-prototypes"
- tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
- tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
- tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
- tmp_CFLAGS="$tmp_CFLAGS -Wshorten-64-to-32"
- #
- if test "$compiler_num" -ge "101"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wunused"
- fi
- fi
- ;;
- #
- DEC_C)
- #
- if test "$want_warnings" = "yes"; then
- tmp_CFLAGS="$tmp_CFLAGS -msg_enable level3"
- fi
- ;;
- #
- GNU_C)
- #
- if test "$want_warnings" = "yes"; then
- #
- if test "x$cross_compiling" != "xyes" ||
- test "$compiler_num" -ge "300"; then
- tmp_CFLAGS="$tmp_CFLAGS -pedantic"
- fi
- #
- tmp_CFLAGS="$tmp_CFLAGS -Wall -W"
- #
- if test "$compiler_num" -ge "104"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings"
- if test "x$cross_compiling" != "xyes" ||
- test "$compiler_num" -ge "300"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wunused -Wshadow"
- fi
- fi
- #
- if test "$compiler_num" -ge "207"; then
- tmp_CFLAGS="$tmp_CFLAGS -Winline -Wnested-externs"
- if test "x$cross_compiling" != "xyes" ||
- test "$compiler_num" -ge "300"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wmissing-declarations"
- tmp_CFLAGS="$tmp_CFLAGS -Wmissing-prototypes"
- fi
- fi
- #
- if test "$compiler_num" -ge "295"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
- fi
- #
- if test "$compiler_num" -ge "296"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wfloat-equal"
- tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar -Wsign-compare"
- tmp_CFLAGS="$tmp_CFLAGS -Wundef"
- fi
- #
- if test "$compiler_num" -ge "297"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
- fi
- #
- if test "$compiler_num" -ge "300"; then
- tmp_CFLAGS="$tmp_CFLAGS"
- fi
- #
- if test "$compiler_num" -ge "303"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wendif-labels -Wstrict-prototypes"
- fi
- #
- if test "$compiler_num" -ge "304"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
- fi
- #
- if test "$compiler_num" -ge "402"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
- fi
- if test "$compiler_num" -ge "403"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wtype-limits -Wold-style-declaration"
- tmp_CFLAGS="$tmp_CFLAGS -Wmissing-parameter-type -Wempty-body"
- tmp_CFLAGS="$tmp_CFLAGS -Wclobbered -Wignored-qualifiers"
- tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla"
- fi
- #
- fi
- #
- if test "$compiler_num" -ge "300"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
- else
- if test "x$cross_compiling" = "xyes"; then
- if test "$compiler_num" -ge "104"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow"
- fi
- if test "$compiler_num" -ge "207"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-declarations"
- tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-prototypes"
- fi
- fi
- fi
- ;;
- #
- HP_UX_C)
- #
- if test "$want_warnings" = "yes"; then
- tmp_CFLAGS="$tmp_CFLAGS +w1"
- fi
- ;;
- #
- IBM_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- INTEL_UNIX_C)
- #
- if test "$want_warnings" = "yes"; then
- if test "$compiler_num" -gt "600"; then
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wall -w2"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcheck"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcomment"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wdeprecated"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wmissing-prototypes"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wuninitialized"
- tmp_CPPFLAGS="$tmp_CPPFLAGS -Wunused-function"
- fi
- fi
- tmp_CFLAGS="$tmp_CFLAGS -fno-omit-frame-pointer"
- tmp_CFLAGS="$tmp_CFLAGS -fno-strict-aliasing"
- tmp_CFLAGS="$tmp_CFLAGS -fp-model precise"
- if test "$compiler_num" -ge "1000"; then
- tmp_CFLAGS="$tmp_CFLAGS -vec-report0"
- fi
- ;;
- #
- INTEL_WINDOWS_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- LCC)
- #
- if test "$want_warnings" = "yes"; then
- tmp_CFLAGS="$tmp_CFLAGS"
- fi
- ;;
- #
- SGI_MIPS_C)
- #
- if test "$want_warnings" = "yes"; then
- tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
- fi
- ;;
- #
- SGI_MIPSPRO_C)
- #
- if test "$want_warnings" = "yes"; then
- tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
- tmp_CFLAGS="$tmp_CFLAGS -woff 1209"
- fi
- ;;
- #
- SUNPRO_C)
- #
- if test "$want_warnings" = "yes"; then
- tmp_CFLAGS="$tmp_CFLAGS -v"
- fi
- ;;
- #
- TINY_C)
- #
- if test "$want_warnings" = "yes"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wall"
- tmp_CFLAGS="$tmp_CFLAGS -Wwrite-strings"
- tmp_CFLAGS="$tmp_CFLAGS -Wunsupported"
- fi
- ;;
- #
- WATCOM_UNIX_C)
- #
- if test "$want_warnings" = "yes"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
- fi
- ;;
- #
- WATCOM_WINDOWS_C)
- #
- tmp_CFLAGS="$tmp_CFLAGS"
- ;;
- #
- esac
- #
- squeeze tmp_CPPFLAGS
- squeeze tmp_CFLAGS
- #
- if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts strict warning options" >&5
-$as_echo_n "checking if compiler accepts strict warning options... " >&6; }
- CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
- CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
- squeeze CPPFLAGS
- squeeze CFLAGS
-
- tmp_compiler_works="unknown"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- int i = 1;
- return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- sed 's/^/cc-fail: /' conftest.err >&6
- echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$tmp_compiler_works" = "yes"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- int i = 1;
- return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- sed 's/^/link-fail: /' conftest.err >&6
- echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- if test "x$cross_compiling" != "xyes" &&
- test "$tmp_compiler_works" = "yes"; then
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-# ifdef __STDC__
-# include <stdlib.h>
-# endif
-
-int main (void)
-{
-
- int i = 0;
- exit(i);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- tmp_compiler_works="yes"
-
-else
-
- tmp_compiler_works="no"
- echo " " >&6
- echo "run-fail: test program exited with status $ac_status" >&6
- echo " " >&6
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- if test "$tmp_compiler_works" = "yes"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
-$as_echo "$as_me: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&6;}
-
- else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&5
-$as_echo "$as_me: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&2;}
- CPPFLAGS="$tmp_save_CPPFLAGS"
- CFLAGS="$tmp_save_CFLAGS"
-
- fi
-
- fi
- #
- fi
-
-
-if test "$compiler_id" = "INTEL_UNIX_C"; then
- #
- if test "$compiler_num" -ge "1000"; then
- CFLAGS="$CFLAGS -shared-intel"
- elif test "$compiler_num" -ge "900"; then
- CFLAGS="$CFLAGS -i-dynamic"
- fi
- #
-fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler halts on compilation errors" >&5
-$as_echo_n "checking if compiler halts on compilation errors... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- force compilation error
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "compiler does not halt on compilation errors." "$LINENO" 5
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler halts on negative sized arrays" >&5
-$as_echo_n "checking if compiler halts on negative sized arrays... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
-
-int main (void)
-{
-
- bad_t dummy;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "compiler does not halt on negative sized arrays." "$LINENO" 5
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared libraries need -no-undefined" >&5
-$as_echo_n "checking if shared libraries need -no-undefined... " >&6; }
- need_no_undefined="no"
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*)
- need_no_undefined="yes"
- ;;
- esac
- if test "x$allow_undefined" = "xno"; then
- need_no_undefined="yes"
- elif test "x$allow_undefined_flag" = "xunsupported"; then
- need_no_undefined="yes"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_no_undefined" >&5
-$as_echo "$need_no_undefined" >&6; }
-
-
-
-if test x$need_no_undefined = xyes; then
- NO_UNDEFINED_TRUE=
- NO_UNDEFINED_FALSE='#'
-else
- NO_UNDEFINED_TRUE='#'
- NO_UNDEFINED_FALSE=
-fi
-
-
-
- supports_curldebug="unknown"
- if test "$want_curldebug" = "yes"; then
- if test "x$enable_shared" != "xno" &&
- test "x$enable_shared" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown enable_shared setting." >&5
-$as_echo "$as_me: WARNING: unknown enable_shared setting." >&2;}
- supports_curldebug="no"
- fi
- if test "x$enable_static" != "xno" &&
- test "x$enable_static" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown enable_static setting." >&5
-$as_echo "$as_me: WARNING: unknown enable_static setting." >&2;}
- supports_curldebug="no"
- fi
- if test "$supports_curldebug" != "no"; then
- if test "$enable_shared" = "yes" &&
- test "$need_no_undefined" = "yes"; then
- supports_curldebug="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: shared library does not support undefined symbols." >&5
-$as_echo "$as_me: WARNING: shared library does not support undefined symbols." >&2;}
- fi
- fi
- fi
- #
- if test "$want_curldebug" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if curl debug memory tracking can be enabled" >&5
-$as_echo_n "checking if curl debug memory tracking can be enabled... " >&6; }
- test "$supports_curldebug" = "no" || supports_curldebug="yes"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports_curldebug" >&5
-$as_echo "$supports_curldebug" >&6; }
- if test "$supports_curldebug" = "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable curl debug memory tracking." >&5
-$as_echo "$as_me: WARNING: cannot enable curl debug memory tracking." >&2;}
- want_curldebug="no"
- fi
- fi
- #
- if test "$want_curldebug" = "yes"; then
- CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
- squeeze CPPFLAGS
- fi
- if test "$want_debug" = "yes"; then
- CPPFLAGS="$CPPFLAGS -DDEBUGBUILD"
- squeeze CPPFLAGS
- fi
-
-
-
-if test x$want_curldebug = xyes; then
- CURLDEBUG_TRUE=
- CURLDEBUG_FALSE='#'
-else
- CURLDEBUG_TRUE='#'
- CURLDEBUG_FALSE=
-fi
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
-$as_echo_n "checking for windows.h... " >&6; }
-if test "${ac_cv_header_windows_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__)
- HAVE_WINDOWS_H shall not be defined.
-#else
- int dummy=2*WINVER;
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_windows_h="yes"
-
-else
-
- ac_cv_header_windows_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_windows_h" >&5
-$as_echo "$ac_cv_header_windows_h" >&6; }
- case "$ac_cv_header_windows_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINDOWS_H 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define WIN32_LEAN_AND_MEAN 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build target is a native Windows one" >&5
-$as_echo_n "checking whether build target is a native Windows one... " >&6; }
-if test "${ac_cv_native_windows+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$ac_cv_header_windows_h" = "no"; then
- ac_cv_native_windows="no"
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
-#if defined(__MINGW32__) || defined(__MINGW32CE__) || \
- (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64)))
- int dummy=1;
-#else
- Not a native Windows build target.
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_native_windows="yes"
-
-else
-
- ac_cv_native_windows="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_native_windows" >&5
-$as_echo "$ac_cv_native_windows" >&6; }
- case "$ac_cv_native_windows" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define NATIVE_WINDOWS 1
-_ACEOF
-
- ;;
- esac
-
-case X-"$ac_cv_native_windows" in
- X-yes)
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock.h" >&5
-$as_echo_n "checking for winsock.h... " >&6; }
-if test "${ac_cv_header_winsock_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <winsock.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__)
- HAVE_WINSOCK_H shall not be defined.
-#else
- int dummy=WSACleanup();
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_winsock_h="yes"
-
-else
-
- ac_cv_header_winsock_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock_h" >&5
-$as_echo "$ac_cv_header_winsock_h" >&6; }
- case "$ac_cv_header_winsock_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK_H 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
-$as_echo_n "checking for winsock2.h... " >&6; }
-if test "${ac_cv_header_winsock2_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <winsock2.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
- HAVE_WINSOCK2_H shall not be defined.
-#else
- int dummy=2*IPPROTO_ESP;
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_winsock2_h="yes"
-
-else
-
- ac_cv_header_winsock2_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock2_h" >&5
-$as_echo "$ac_cv_header_winsock2_h" >&6; }
- case "$ac_cv_header_winsock2_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5
-$as_echo_n "checking for ws2tcpip.h... " >&6; }
-if test "${ac_cv_header_ws2tcpip_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
- HAVE_WS2TCPIP_H shall not be defined.
-#else
- int dummy=2*IP_PKTINFO;
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_ws2tcpip_h="yes"
-
-else
-
- ac_cv_header_ws2tcpip_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ws2tcpip_h" >&5
-$as_echo "$ac_cv_header_ws2tcpip_h" >&6; }
- case "$ac_cv_header_ws2tcpip_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WS2TCPIP_H 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winldap.h" >&5
-$as_echo_n "checking for winldap.h... " >&6; }
-if test "${ac_cv_header_winldap_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#endif
-#include <winldap.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__)
- HAVE_WINLDAP_H shall not be defined.
-#else
- LDAP *ldp = ldap_init("dummy", LDAP_PORT);
- ULONG res = ldap_unbind(ldp);
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_winldap_h="yes"
-
-else
-
- ac_cv_header_winldap_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winldap_h" >&5
-$as_echo "$ac_cv_header_winldap_h" >&6; }
- case "$ac_cv_header_winldap_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINLDAP_H 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winber.h" >&5
-$as_echo_n "checking for winber.h... " >&6; }
-if test "${ac_cv_header_winber_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#endif
-#include <winldap.h>
-#include <winber.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__)
- HAVE_WINBER_H shall not be defined.
-#else
- BERVAL *bvp = NULL;
- BerElement *bep = ber_init(bvp);
- ber_free(bep, 1);
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_winber_h="yes"
-
-else
-
- ac_cv_header_winber_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winber_h" >&5
-$as_echo "$ac_cv_header_winber_h" >&6; }
- case "$ac_cv_header_winber_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINBER_H 1
-_ACEOF
-
- ;;
- esac
-
- ;;
- *)
- ac_cv_header_winsock_h="no"
- ac_cv_header_winsock2_h="no"
- ac_cv_header_ws2tcpip_h="no"
- ac_cv_header_winldap_h="no"
- ac_cv_header_winber_h="no"
- ;;
-esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build target supports WIN32 file API" >&5
-$as_echo_n "checking whether build target supports WIN32 file API... " >&6; }
- curl_win32_file_api="no"
- if test "$ac_cv_header_windows_h" = "yes"; then
- if test x"$enable_largefile" != "xno"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
-#if !defined(_WIN32_WCE) && \
- (defined(__MINGW32__) || \
- (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64))))
- int dummy=1;
-#else
- WIN32 large file API not supported.
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_win32_file_api="win32_large_files"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$curl_win32_file_api" = "no"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
-#if defined(_WIN32_WCE) || defined(__MINGW32__) || defined(_MSC_VER)
- int dummy=1;
-#else
- WIN32 small file API not supported.
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_win32_file_api="win32_small_files"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- case "$curl_win32_file_api" in
- win32_large_files)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (large file enabled)" >&5
-$as_echo "yes (large file enabled)" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define USE_WIN32_LARGE_FILES 1
-_ACEOF
-
- ;;
- win32_small_files)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (large file disabled)" >&5
-$as_echo "yes (large file disabled)" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define USE_WIN32_LARGE_FILES 1
-_ACEOF
-
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support http" >&5
-$as_echo_n "checking whether to support http... " >&6; }
-# Check whether --enable-http was given.
-if test "${enable_http+set}" = set; then :
- enableval=$enable_http; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_HTTP 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disable HTTP disables FTP over proxy and RTSP" >&5
-$as_echo "$as_me: WARNING: disable HTTP disables FTP over proxy and RTSP" >&2;}
- CURL_DISABLE_HTTP=1
-
-
-$as_echo "#define CURL_DISABLE_RTSP 1" >>confdefs.h
-
- CURL_DISABLE_RTSP=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support ftp" >&5
-$as_echo_n "checking whether to support ftp... " >&6; }
-# Check whether --enable-ftp was given.
-if test "${enable_ftp+set}" = set; then :
- enableval=$enable_ftp; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_FTP 1" >>confdefs.h
-
- CURL_DISABLE_FTP=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support file" >&5
-$as_echo_n "checking whether to support file... " >&6; }
-# Check whether --enable-file was given.
-if test "${enable_file+set}" = set; then :
- enableval=$enable_file; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_FILE 1" >>confdefs.h
-
- CURL_DISABLE_FILE=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support ldap" >&5
-$as_echo_n "checking whether to support ldap... " >&6; }
-# Check whether --enable-ldap was given.
-if test "${enable_ldap+set}" = set; then :
- enableval=$enable_ldap; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h
-
- CURL_DISABLE_LDAP=1
-
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support ldaps" >&5
-$as_echo_n "checking whether to support ldaps... " >&6; }
-# Check whether --enable-ldaps was given.
-if test "${enable_ldaps+set}" = set; then :
- enableval=$enable_ldaps; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
-
- CURL_DISABLE_LDAPS=1
-
- ;;
- *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: LDAP needs to be enabled to support LDAPS" >&5
-$as_echo "LDAP needs to be enabled to support LDAPS" >&6; }
-
-$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
-
- CURL_DISABLE_LDAPS=1
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_LDAP_SSL 1" >>confdefs.h
-
- HAVE_LDAP_SSL=1
-
- fi
- ;;
- esac
-else
-
- if test "x$CURL_DISABLE_LDAP" = "x1" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
-
- CURL_DISABLE_LDAPS=1
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_LDAP_SSL 1" >>confdefs.h
-
- HAVE_LDAP_SSL=1
-
- fi
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support rtsp" >&5
-$as_echo_n "checking whether to support rtsp... " >&6; }
-# Check whether --enable-rtsp was given.
-if test "${enable_rtsp+set}" = set; then :
- enableval=$enable_rtsp; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_RTSP 1" >>confdefs.h
-
- CURL_DISABLE_RTSP=1
-
- ;;
- *) if test x$CURL_DISABLE_HTTP = x1 ; then
- as_fn_error $? "HTTP support needs to be enabled in order to enable RTSP support!" "$LINENO" 5
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- curl_rtsp_msg="enabled"
- fi
- ;;
- esac
-else
- if test "x$CURL_DISABLE_HTTP" != "x1"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- curl_rtsp_msg="enabled"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support proxies" >&5
-$as_echo_n "checking whether to support proxies... " >&6; }
-# Check whether --enable-proxy was given.
-if test "${enable_proxy+set}" = set; then :
- enableval=$enable_proxy; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_PROXY 1" >>confdefs.h
-
- CURL_DISABLE_PROXY=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support dict" >&5
-$as_echo_n "checking whether to support dict... " >&6; }
-# Check whether --enable-dict was given.
-if test "${enable_dict+set}" = set; then :
- enableval=$enable_dict; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_DICT 1" >>confdefs.h
-
- CURL_DISABLE_DICT=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support telnet" >&5
-$as_echo_n "checking whether to support telnet... " >&6; }
-# Check whether --enable-telnet was given.
-if test "${enable_telnet+set}" = set; then :
- enableval=$enable_telnet; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_TELNET 1" >>confdefs.h
-
- CURL_DISABLE_TELNET=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support tftp" >&5
-$as_echo_n "checking whether to support tftp... " >&6; }
-# Check whether --enable-tftp was given.
-if test "${enable_tftp+set}" = set; then :
- enableval=$enable_tftp; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_TFTP 1" >>confdefs.h
-
- CURL_DISABLE_TFTP=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support pop3" >&5
-$as_echo_n "checking whether to support pop3... " >&6; }
-# Check whether --enable-pop3 was given.
-if test "${enable_pop3+set}" = set; then :
- enableval=$enable_pop3; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_POP3 1" >>confdefs.h
-
- CURL_DISABLE_POP3=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support imap" >&5
-$as_echo_n "checking whether to support imap... " >&6; }
-# Check whether --enable-imap was given.
-if test "${enable_imap+set}" = set; then :
- enableval=$enable_imap; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_IMAP 1" >>confdefs.h
-
- CURL_DISABLE_IMAP=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support smtp" >&5
-$as_echo_n "checking whether to support smtp... " >&6; }
-# Check whether --enable-smtp was given.
-if test "${enable_smtp+set}" = set; then :
- enableval=$enable_smtp; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_SMTP 1" >>confdefs.h
-
- CURL_DISABLE_SMTP=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support gopher" >&5
-$as_echo_n "checking whether to support gopher... " >&6; }
-# Check whether --enable-gopher was given.
-if test "${enable_gopher+set}" = set; then :
- enableval=$enable_gopher; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_GOPHER 1" >>confdefs.h
-
- CURL_DISABLE_GOPHER=1
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to provide built-in manual" >&5
-$as_echo_n "checking whether to provide built-in manual... " >&6; }
-# Check whether --enable-manual was given.
-if test "${enable_manual+set}" = set; then :
- enableval=$enable_manual; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- USE_MANUAL="1"
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- USE_MANUAL="1"
-
-fi
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X/Open network library is required" >&5
-$as_echo_n "checking if X/Open network library is required... " >&6; }
- tst_lib_xnet_required="no"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-int main (void)
-{
-#if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600)
- return 0;
-#elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
- return 0;
-#else
- force compilation error
-#endif
-}
-
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tst_lib_xnet_required="yes"
- LIBS="$LIBS -lxnet"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_lib_xnet_required" >&5
-$as_echo "$tst_lib_xnet_required" >&6; }
-
-
-ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = x""yes; then :
- HAVE_GETHOSTBYNAME="1"
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int main (void)
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nsl_gethostbyname=yes
-else
- ac_cv_lib_nsl_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
- HAVE_GETHOSTBYNAME="1"
- LIBS="$LIBS -lnsl"
-
-fi
-
-
-fi
-
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
-$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_gethostbyname+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int main (void)
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_gethostbyname=yes
-else
- ac_cv_lib_socket_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5
-$as_echo "$ac_cv_lib_socket_gethostbyname" >&6; }
-if test "x$ac_cv_lib_socket_gethostbyname" = x""yes; then :
- HAVE_GETHOSTBYNAME="1"
- LIBS="$LIBS -lsocket"
-
-fi
-
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname with both nsl and socket libs" >&5
-$as_echo_n "checking for gethostbyname with both nsl and socket libs... " >&6; }
- my_ac_save_LIBS=$LIBS
- LIBS="-lnsl -lsocket $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- gethostbyname();
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- HAVE_GETHOSTBYNAME="1"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- LIBS=$my_ac_save_LIBS
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
- if test "$ac_cv_header_windows_h" = "yes"; then
- if test "$ac_cv_header_winsock_h" = "yes"; then
- case $host in
- *-*-mingw32ce*)
- winsock_LIB="-lwinsock"
- ;;
- *)
- winsock_LIB="-lwsock32"
- ;;
- esac
- fi
- if test "$ac_cv_header_winsock2_h" = "yes"; then
- winsock_LIB="-lws2_32"
- fi
- if test ! -z "$winsock_LIB"; then
- my_ac_save_LIBS=$LIBS
- LIBS="$winsock_LIB $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in $winsock_LIB" >&5
-$as_echo_n "checking for gethostbyname in $winsock_LIB... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#endif
-
-int main (void)
-{
-
- gethostbyname("www.dummysite.com");
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- HAVE_GETHOSTBYNAME="1"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- winsock_LIB=""
- LIBS=$my_ac_save_LIBS
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- fi
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname for Minix 3" >&5
-$as_echo_n "checking for gethostbyname for Minix 3... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* Older Minix versions may need <net/gen/netdb.h> here instead */
-#include <netdb.h>
-
-int main (void)
-{
-
- gethostbyname("www.dummysite.com");
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- HAVE_GETHOSTBYNAME="1"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname for eCos" >&5
-$as_echo_n "checking for gethostbyname for eCos... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <stdio.h>
-#include <netdb.h>
-
-int main (void)
-{
-
- gethostbyname("www.dummysite.com");
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- HAVE_GETHOSTBYNAME="1"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnetwork" >&5
-$as_echo_n "checking for gethostbyname in -lnetwork... " >&6; }
-if test "${ac_cv_lib_network_gethostbyname+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnetwork $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int main (void)
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_network_gethostbyname=yes
-else
- ac_cv_lib_network_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_gethostbyname" >&5
-$as_echo "$ac_cv_lib_network_gethostbyname" >&6; }
-if test "x$ac_cv_lib_network_gethostbyname" = x""yes; then :
- HAVE_GETHOSTBYNAME="1"
- LIBS="$LIBS -lnetwork"
-
-fi
-
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnet" >&5
-$as_echo_n "checking for gethostbyname in -lnet... " >&6; }
-if test "${ac_cv_lib_net_gethostbyname+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnet $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int main (void)
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_net_gethostbyname=yes
-else
- ac_cv_lib_net_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_gethostbyname" >&5
-$as_echo "$ac_cv_lib_net_gethostbyname" >&6; }
-if test "x$ac_cv_lib_net_gethostbyname" = x""yes; then :
- HAVE_GETHOSTBYNAME="1"
- LIBS="$LIBS -lnet"
-
-fi
-
-fi
-
-
-if test "$HAVE_GETHOSTBYNAME" != "1"; then
- as_fn_error $? "couldn't find libraries for gethostbyname()" "$LINENO" 5
-fi
-
-ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
-if test "x$ac_cv_func_strcasecmp" = x""yes; then :
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolve" >&5
-$as_echo_n "checking for strcasecmp in -lresolve... " >&6; }
-if test "${ac_cv_lib_resolve_strcasecmp+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolve $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char strcasecmp ();
-int main (void)
-{
-return strcasecmp ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_resolve_strcasecmp=yes
-else
- ac_cv_lib_resolve_strcasecmp=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolve_strcasecmp" >&5
-$as_echo "$ac_cv_lib_resolve_strcasecmp" >&6; }
-if test "x$ac_cv_lib_resolve_strcasecmp" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLVE 1
-_ACEOF
-
- LIBS="-lresolve $LIBS"
-
-fi
-
-fi
-
-
-if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolve" >&5
-$as_echo_n "checking for strcasecmp in -lresolve... " >&6; }
-if test "${ac_cv_lib_resolve_strcasecmp+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolve -lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char strcasecmp ();
-int main (void)
-{
-return strcasecmp ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_resolve_strcasecmp=yes
-else
- ac_cv_lib_resolve_strcasecmp=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolve_strcasecmp" >&5
-$as_echo "$ac_cv_lib_resolve_strcasecmp" >&6; }
-if test "x$ac_cv_lib_resolve_strcasecmp" = x""yes; then :
- LIBS="-lresolve $LIBS"
-fi
-
-fi
-ac_cv_func_strcasecmp="no"
-
-
-curl_includes_winsock2="\
-/* includes start */
-#ifdef HAVE_WINDOWS_H
-# ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-# endif
-# include <windows.h>
-# ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-# else
-# ifdef HAVE_WINSOCK_H
-# include <winsock.h>
-# endif
-# endif
-#endif
-/* includes end */"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
-$as_echo_n "checking for windows.h... " >&6; }
-if test "${ac_cv_header_windows_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__)
- HAVE_WINDOWS_H shall not be defined.
-#else
- int dummy=2*WINVER;
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_windows_h="yes"
-
-else
-
- ac_cv_header_windows_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_windows_h" >&5
-$as_echo "$ac_cv_header_windows_h" >&6; }
- case "$ac_cv_header_windows_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINDOWS_H 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define WIN32_LEAN_AND_MEAN 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock.h" >&5
-$as_echo_n "checking for winsock.h... " >&6; }
-if test "${ac_cv_header_winsock_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <winsock.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__)
- HAVE_WINSOCK_H shall not be defined.
-#else
- int dummy=WSACleanup();
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_winsock_h="yes"
-
-else
-
- ac_cv_header_winsock_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock_h" >&5
-$as_echo "$ac_cv_header_winsock_h" >&6; }
- case "$ac_cv_header_winsock_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK_H 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
-$as_echo_n "checking for winsock2.h... " >&6; }
-if test "${ac_cv_header_winsock2_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <winsock2.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
- HAVE_WINSOCK2_H shall not be defined.
-#else
- int dummy=2*IPPROTO_ESP;
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_winsock2_h="yes"
-
-else
-
- ac_cv_header_winsock2_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock2_h" >&5
-$as_echo "$ac_cv_header_winsock2_h" >&6; }
- case "$ac_cv_header_winsock2_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
-
- ;;
- esac
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in libraries" >&5
-$as_echo_n "checking for connect in libraries... " >&6; }
- tst_connect_save_LIBS="$LIBS"
- tst_connect_need_LIBS="unknown"
- for tst_lib in '' '-lsocket' ; do
- if test "$tst_connect_need_LIBS" = "unknown"; then
- LIBS="$tst_lib $tst_connect_save_LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- #ifndef HAVE_WINDOWS_H
- int connect(int, void*, int);
- #endif
-
-int main (void)
-{
-
- if(0 != connect(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- tst_connect_need_LIBS="$tst_lib"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- done
- LIBS="$tst_connect_save_LIBS"
- #
- case X-"$tst_connect_need_LIBS" in
- X-unknown)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find connect" >&5
-$as_echo "cannot find connect" >&6; }
- as_fn_error $? "cannot find connect function in libraries." "$LINENO" 5
- ;;
- X-)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_connect_need_LIBS" >&5
-$as_echo "$tst_connect_need_LIBS" >&6; }
- LIBS="$tst_connect_need_LIBS $tst_connect_save_LIBS"
- ;;
- esac
-
-
-CURL_NETWORK_LIBS=$LIBS
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int main (void)
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
-else
- ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-
-
- for ac_header in sys/types.h sys/time.h time.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for monotonic clock_gettime" >&5
-$as_echo_n "checking for monotonic clock_gettime... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-
-int main (void)
-{
-
- struct timespec ts;
- (void)clock_gettime(CLOCK_MONOTONIC, &ts);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ac_cv_func_clock_gettime="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_clock_gettime="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
- #
- if test "$ac_cv_func_clock_gettime" = "yes"; then
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in libraries" >&5
-$as_echo_n "checking for clock_gettime in libraries... " >&6; }
- #
- curl_cv_save_LIBS="$LIBS"
- curl_cv_gclk_LIBS="unknown"
- #
- for x_xlibs in '' '-lrt' '-lposix4' ; do
- if test "$curl_cv_gclk_LIBS" = "unknown"; then
- if test -z "$x_xlibs"; then
- LIBS="$curl_cv_save_LIBS"
- else
- LIBS="$x_xlibs $curl_cv_save_LIBS"
- fi
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-
-int main (void)
-{
-
- struct timespec ts;
- (void)clock_gettime(CLOCK_MONOTONIC, &ts);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- curl_cv_gclk_LIBS="$x_xlibs"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- done
- #
- LIBS="$curl_cv_save_LIBS"
- #
- case X-"$curl_cv_gclk_LIBS" in
- X-unknown)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find clock_gettime" >&5
-$as_echo "cannot find clock_gettime" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&5
-$as_echo "$as_me: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&2;}
- ac_cv_func_clock_gettime="no"
- ;;
- X-)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no additional lib required" >&5
-$as_echo "no additional lib required" >&6; }
- ac_cv_func_clock_gettime="yes"
- ;;
- *)
- if test -z "$curl_cv_save_LIBS"; then
- LIBS="$curl_cv_gclk_LIBS"
- else
- LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS"
- fi
- CURL_LIBS="$CURL_LIBS $curl_cv_gclk_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_gclk_LIBS" >&5
-$as_echo "$curl_cv_gclk_LIBS" >&6; }
- ac_cv_func_clock_gettime="yes"
- ;;
- esac
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$ac_cv_func_clock_gettime" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if monotonic clock_gettime works" >&5
-$as_echo_n "checking if monotonic clock_gettime works... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-
-int main (void)
-{
-
- struct timespec ts;
- if (0 == clock_gettime(CLOCK_MONOTONIC, &ts))
- exit(0);
- else
- exit(1);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&5
-$as_echo "$as_me: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&2;}
- ac_cv_func_clock_gettime="no"
- LIBS="$curl_cv_save_LIBS"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- case "$ac_cv_func_clock_gettime" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_CLOCK_GETTIME_MONOTONIC 1
-_ACEOF
-
- ;;
- esac
- #
- fi
- #
-
-
-TEST_SERVER_LIBS=$LIBS
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libgcc" >&5
-$as_echo_n "checking whether to use libgcc... " >&6; }
-# Check whether --enable-libgcc was given.
-if test "${enable_libgcc+set}" = set; then :
- enableval=$enable_libgcc; case "$enableval" in
- yes)
- ALL_LIBS="$ALL_LIBS -lgcc"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-
-
-
-LDAPLIBNAME=""
-
-# Check whether --with-ldap-lib was given.
-if test "${with_ldap_lib+set}" = set; then :
- withval=$with_ldap_lib; LDAPLIBNAME="$withval"
-fi
-
-
-LBERLIBNAME=""
-
-# Check whether --with-lber-lib was given.
-if test "${with_lber_lib+set}" = set; then :
- withval=$with_lber_lib; LBERLIBNAME="$withval"
-fi
-
-
-if test x$CURL_DISABLE_LDAP != x1 ; then
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lber.h" >&5
-$as_echo_n "checking for lber.h... " >&6; }
-if test "${ac_cv_header_lber_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef NULL
-#define NULL (void *)0
-#endif
-#include <lber.h>
-
-int main (void)
-{
-
- BerValue *bvp = NULL;
- BerElement *bep = ber_init(bvp);
- ber_free(bep, 1);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_lber_h="yes"
-
-else
-
- ac_cv_header_lber_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_lber_h" >&5
-$as_echo "$ac_cv_header_lber_h" >&6; }
- if test "$ac_cv_header_lber_h" = "yes"; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LBER_H 1
-_ACEOF
-
- #
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef NULL
-#define NULL (void *)0
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#include <ldap.h>
-
-int main (void)
-{
-
- BerValue *bvp = NULL;
- BerElement *bep = ber_init(bvp);
- ber_free(bep, 1);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_need_header_lber_h="no"
-
-else
-
- curl_cv_need_header_lber_h="yes"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- #
- case "$curl_cv_need_header_lber_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define NEED_LBER_H 1
-_ACEOF
-
- ;;
- esac
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap.h" >&5
-$as_echo_n "checking for ldap.h... " >&6; }
-if test "${ac_cv_header_ldap_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#ifdef NEED_LBER_H
-#include <lber.h>
-#endif
-#include <ldap.h>
-
-int main (void)
-{
-
- LDAP *ldp = ldap_init("dummy", LDAP_PORT);
- int res = ldap_unbind(ldp);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_ldap_h="yes"
-
-else
-
- ac_cv_header_ldap_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ldap_h" >&5
-$as_echo "$ac_cv_header_ldap_h" >&6; }
- case "$ac_cv_header_ldap_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LDAP_H 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl.h" >&5
-$as_echo_n "checking for ldapssl.h... " >&6; }
-if test "${ac_cv_header_ldapssl_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef NULL
-#define NULL (void *)0
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#ifdef NEED_LBER_H
-#include <lber.h>
-#endif
-#ifdef HAVE_LDAP_H
-#include <ldap.h>
-#endif
-#include <ldapssl.h>
-
-int main (void)
-{
-
- char *cert_label = NULL;
- LDAP *ldp = ldap_ssl_init("dummy", LDAPS_PORT, cert_label);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_ldapssl_h="yes"
-
-else
-
- ac_cv_header_ldapssl_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ldapssl_h" >&5
-$as_echo "$ac_cv_header_ldapssl_h" >&6; }
- case "$ac_cv_header_ldapssl_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LDAPSSL_H 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_ssl.h" >&5
-$as_echo_n "checking for ldap_ssl.h... " >&6; }
-if test "${ac_cv_header_ldap_ssl_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#ifdef NEED_LBER_H
-#include <lber.h>
-#endif
-#ifdef HAVE_LDAP_H
-#include <ldap.h>
-#endif
-#include <ldap_ssl.h>
-
-int main (void)
-{
-
- LDAP *ldp = ldapssl_init("dummy", LDAPS_PORT, 1);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_ldap_ssl_h="yes"
-
-else
-
- ac_cv_header_ldap_ssl_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ldap_ssl_h" >&5
-$as_echo "$ac_cv_header_ldap_ssl_h" >&6; }
- case "$ac_cv_header_ldap_ssl_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LDAP_SSL_H 1
-_ACEOF
-
- ;;
- esac
-
-
- if test -z "$LDAPLIBNAME" ; then
- if test "$ac_cv_native_windows" = "yes"; then
- LDAPLIBNAME="wldap32"
- LBERLIBNAME="no"
- fi
- fi
-
- if test "$LDAPLIBNAME" ; then
- as_ac_Lib=`$as_echo "ac_cv_lib_"$LDAPLIBNAME"''_ldap_init" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l\"$LDAPLIBNAME\"" >&5
-$as_echo_n "checking for ldap_init in -l\"$LDAPLIBNAME\"... " >&6; }
-if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-l"$LDAPLIBNAME" $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char ldap_init ();
-int main (void)
-{
-return ldap_init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$as_ac_Lib=yes"
-else
- eval "$as_ac_Lib=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-eval ac_res=\$$as_ac_Lib
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_LIB"$LDAPLIBNAME"" | $as_tr_cpp` 1
-_ACEOF
-
- LIBS="-l"$LDAPLIBNAME" $LIBS"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$LDAPLIBNAME\" is not an LDAP library: LDAP disabled" >&5
-$as_echo "$as_me: WARNING: \"$LDAPLIBNAME\" is not an LDAP library: LDAP disabled" >&2;}
-
-$as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h
-
- CURL_DISABLE_LDAP=1
-
-fi
-
-
-$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
-
- CURL_DISABLE_LDAPS=1
-
- else
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP libraries" >&5
-$as_echo_n "checking for LDAP libraries... " >&6; }
- #
- u_libs=""
- #
-
- #
- curl_cv_save_LIBS="$LIBS"
- curl_cv_ldap_LIBS="unknown"
- #
- for x_nlibs in '' "$u_libs" \
- '-lldap' \
- '-llber -lldap' \
- '-lldap -llber' \
- '-lldapssl -lldapx -lldapsdk' \
- '-lldapsdk -lldapx -lldapssl' ; do
- if test "$curl_cv_ldap_LIBS" = "unknown"; then
- if test -z "$x_nlibs"; then
- LIBS="$curl_cv_save_LIBS"
- else
- LIBS="$x_nlibs $curl_cv_save_LIBS"
- fi
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#endif
-#ifndef NULL
-#define NULL (void *)0
-#endif
-#ifndef LDAP_DEPRECATED
-#define LDAP_DEPRECATED 1
-#endif
-#ifdef NEED_LBER_H
-#include <lber.h>
-#endif
-#ifdef HAVE_LDAP_H
-#include <ldap.h>
-#endif
-
-int main (void)
-{
-
- BerValue *bvp = NULL;
- BerElement *bep = ber_init(bvp);
- LDAP *ldp = ldap_init("dummy", LDAP_PORT);
- int res = ldap_unbind(ldp);
- ber_free(bep, 1);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- curl_cv_ldap_LIBS="$x_nlibs"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- done
- #
- LIBS="$curl_cv_save_LIBS"
- #
- case X-"$curl_cv_ldap_LIBS" in
- X-unknown)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find LDAP libraries" >&5
-$as_echo "cannot find LDAP libraries" >&6; }
- ;;
- X-)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no additional lib required" >&5
-$as_echo "no additional lib required" >&6; }
- ;;
- *)
- if test -z "$curl_cv_save_LIBS"; then
- LIBS="$curl_cv_ldap_LIBS"
- else
- LIBS="$curl_cv_ldap_LIBS $curl_cv_save_LIBS"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_ldap_LIBS" >&5
-$as_echo "$curl_cv_ldap_LIBS" >&6; }
- ;;
- esac
- #
-
- case X-"$curl_cv_ldap_LIBS" in
- X-unknown)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for LDAP support: LDAP disabled" >&5
-$as_echo "$as_me: WARNING: Cannot find libraries for LDAP support: LDAP disabled" >&2;}
-
-$as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h
-
- CURL_DISABLE_LDAP=1
-
-
-$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
-
- CURL_DISABLE_LDAPS=1
-
- ;;
- esac
- fi
-fi
-
-if test x$CURL_DISABLE_LDAP != x1 ; then
-
- if test "$LBERLIBNAME" ; then
- if test "$LBERLIBNAME" != "no" ; then
- as_ac_Lib=`$as_echo "ac_cv_lib_"$LBERLIBNAME"''_ber_free" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_free in -l\"$LBERLIBNAME\"" >&5
-$as_echo_n "checking for ber_free in -l\"$LBERLIBNAME\"... " >&6; }
-if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-l"$LBERLIBNAME" $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char ber_free ();
-int main (void)
-{
-return ber_free ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$as_ac_Lib=yes"
-else
- eval "$as_ac_Lib=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-eval ac_res=\$$as_ac_Lib
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_LIB"$LBERLIBNAME"" | $as_tr_cpp` 1
-_ACEOF
-
- LIBS="-l"$LBERLIBNAME" $LIBS"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$LBERLIBNAME\" is not an LBER library: LDAP disabled" >&5
-$as_echo "$as_me: WARNING: \"$LBERLIBNAME\" is not an LBER library: LDAP disabled" >&2;}
-
-$as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h
-
- CURL_DISABLE_LDAP=1
-
-fi
-
-
-$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
-
- CURL_DISABLE_LDAPS=1
-
- fi
- fi
-fi
-
-if test x$CURL_DISABLE_LDAP != x1 ; then
- for ac_func in ldap_url_parse ldap_init_fd
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- if test "$LDAPLIBNAME" = "wldap32"; then
- curl_ldap_msg="enabled (winldap)"
-
-$as_echo "#define CURL_LDAP_WIN 1" >>confdefs.h
-
- else
- curl_ldap_msg="enabled (OpenLDAP)"
- if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
-
-$as_echo "#define USE_OPENLDAP 1" >>confdefs.h
-
- USE_OPENLDAP=1
-
- fi
- fi
-fi
-
-if test x$CURL_DISABLE_LDAPS != x1 ; then
- curl_ldaps_msg="enabled"
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable ipv6" >&5
-$as_echo_n "checking whether to enable ipv6... " >&6; }
-# Check whether --enable-ipv6 was given.
-if test "${enable_ipv6+set}" = set; then :
- enableval=$enable_ipv6; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ipv6=no
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ipv6=yes
- ;;
- esac
-else
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ipv6=no
-
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
- /* is AF_INET6 available? */
-#include <sys/types.h>
-#include <sys/socket.h>
-main()
-{
- if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
- exit(1);
- else
- exit(0);
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ipv6=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ipv6=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-
-
-if test "$ipv6" = "yes"; then
- curl_ipv6_msg="enabled"
-fi
-
-# Check if struct sockaddr_in6 have sin6_scope_id member
-if test "$ipv6" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct sockaddr_in6 has sin6_scope_id member" >&5
-$as_echo_n "checking if struct sockaddr_in6 has sin6_scope_id member... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-int main (void)
-{
-struct sockaddr_in6 s; s.sin6_scope_id = 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- have_sin6_scope_id=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$have_sin6_scope_id" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1" >>confdefs.h
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if argv can be written to" >&5
-$as_echo_n "checking if argv can be written to... " >&6; }
-if test "${curl_cv_writable_argv+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-if test "$cross_compiling" = yes; then :
- curl_cv_writable_argv=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main(int argc, char ** argv) {
- argv[0][0] = ' ';
- return (argv[0][0] == ' ')?0:1;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- curl_cv_writable_argv=yes
-else
- curl_cv_writable_argv=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-
-case $curl_cv_writable_argv in
-yes)
-
-$as_echo "#define HAVE_WRITABLE_ARGV 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
-no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
-*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the previous check could not be made default was used" >&5
-$as_echo "$as_me: WARNING: the previous check could not be made default was used" >&2;}
- ;;
-esac
-
-
-
-# Check whether --with-krb4-includes was given.
-if test "${with_krb4_includes+set}" = set; then :
- withval=$with_krb4_includes;
- CPPFLAGS="$CPPFLAGS -I$withval"
- KRB4INC="$withval"
- want_krb4=yes
-
-fi
-
-
-
-# Check whether --with-krb4-libs was given.
-if test "${with_krb4_libs+set}" = set; then :
- withval=$with_krb4_libs;
- LDFLAGS="$LDFLAGS -L$withval"
- KRB4LIB="$withval"
- want_krb4=yes
-
-fi
-
-
-
-OPT_KRB4=off
-
-# Check whether --with-krb4 was given.
-if test "${with_krb4+set}" = set; then :
- withval=$with_krb4;
- OPT_KRB4="$withval"
- if test X"$OPT_KRB4" != Xno; then
- want_krb4="yes"
- if test X"$OPT_KRB4" != Xyes; then
- LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
- KRB4LIB="$OPT_KRB4/lib$libsuff"
- CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
- KRB4INC="$OPT_KRB4/include"
- fi
- fi
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Kerberos4 support is requested" >&5
-$as_echo_n "checking if Kerberos4 support is requested... " >&6; }
-
-if test "$want_krb4" = yes
-then
- if test "$ipv6" = "yes"; then
- echo krb4 is not compatible with IPv6
- exit 1
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to look for Kerberos4" >&5
-$as_echo_n "checking where to look for Kerberos4... " >&6; }
- if test X"$OPT_KRB4" = Xyes
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaults" >&5
-$as_echo "defaults" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: libs in $KRB4LIB, headers in $KRB4INC" >&5
-$as_echo "libs in $KRB4LIB, headers in $KRB4INC" >&6; }
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_pcbc_encrypt in -ldes" >&5
-$as_echo_n "checking for des_pcbc_encrypt in -ldes... " >&6; }
-if test "${ac_cv_lib_des_des_pcbc_encrypt+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_pcbc_encrypt ();
-int main (void)
-{
-return des_pcbc_encrypt ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_des_des_pcbc_encrypt=yes
-else
- ac_cv_lib_des_des_pcbc_encrypt=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_pcbc_encrypt" >&5
-$as_echo "$ac_cv_lib_des_des_pcbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des_des_pcbc_encrypt" = x""yes; then :
-
- for ac_header in des.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
-if test "x$ac_cv_header_des_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DES_H 1
-_ACEOF
-
-fi
-
-done
-
-
- ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
-if test "x$ac_cv_func_res_search" = x""yes; then :
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
-$as_echo_n "checking for res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_search+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_search ();
-int main (void)
-{
-return res_search ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_resolv_res_search=yes
-else
- ac_cv_lib_resolv_res_search=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
-$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
-if test "x$ac_cv_lib_resolv_res_search" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
-
- LIBS="-lresolv $LIBS"
-
-fi
-
-fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_net_read in -lkrb" >&5
-$as_echo_n "checking for krb_net_read in -lkrb... " >&6; }
-if test "${ac_cv_lib_krb_krb_net_read+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_net_read ();
-int main (void)
-{
-return krb_net_read ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_krb_krb_net_read=yes
-else
- ac_cv_lib_krb_krb_net_read=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_net_read" >&5
-$as_echo "$ac_cv_lib_krb_krb_net_read" >&6; }
-if test "x$ac_cv_lib_krb_krb_net_read" = x""yes; then :
-
- for ac_header in krb.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
-if test "x$ac_cv_header_krb_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KRB_H 1
-_ACEOF
-
-fi
-
-done
-
-
- LIBS="-lkrb -lcom_err -ldes $LIBS"
-
- for ac_func in krb_get_our_ip_for_realm
-do :
- ac_fn_c_check_func "$LINENO" "krb_get_our_ip_for_realm" "ac_cv_func_krb_get_our_ip_for_realm"
-if test "x$ac_cv_func_krb_get_our_ip_for_realm" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KRB_GET_OUR_IP_FOR_REALM 1
-_ACEOF
-
-fi
-done
-
-
-
-$as_echo "#define HAVE_KRB4 1" >>confdefs.h
-
-
- KRB4_ENABLED=1
-
-
- curl_krb4_msg="enabled"
-
- for ac_func in strlcpy
-do :
- ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
-if test "x$ac_cv_func_strlcpy" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRLCPY 1
-_ACEOF
-
-fi
-done
-
-
-
-fi
-
-
-fi
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-# Check whether --with-spnego was given.
-if test "${with_spnego+set}" = set; then :
- withval=$with_spnego;
- SPNEGO_ROOT="$withval"
- if test x"$SPNEGO_ROOT" != xno; then
- want_spnego="yes"
- fi
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SPNEGO support is requested" >&5
-$as_echo_n "checking if SPNEGO support is requested... " >&6; }
-if test x"$want_spnego" = xyes; then
-
- if test X"$SPNEGO_ROOT" = Xyes; then
- as_fn_error $? "FBOpenSSL libs and/or directories were not found where specified!" "$LINENO" 5
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- if test -z "$SPNEGO_LIB_DIR"; then
- LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl"
- else
- LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_SPNEGO 1" >>confdefs.h
-
- curl_spnego_msg="enabled"
- fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-GSSAPI_ROOT="/usr"
-
-# Check whether --with-gssapi-includes was given.
-if test "${with_gssapi_includes+set}" = set; then :
- withval=$with_gssapi_includes; GSSAPI_INCS="-I$withval"
- want_gss="yes"
-
-fi
-
-
-
-# Check whether --with-gssapi-libs was given.
-if test "${with_gssapi_libs+set}" = set; then :
- withval=$with_gssapi_libs; GSSAPI_LIB_DIR="-L$withval"
- want_gss="yes"
-
-fi
-
-
-
-# Check whether --with-gssapi was given.
-if test "${with_gssapi+set}" = set; then :
- withval=$with_gssapi;
- GSSAPI_ROOT="$withval"
- if test x"$GSSAPI_ROOT" != xno; then
- want_gss="yes"
- if test x"$GSSAPI_ROOT" = xyes; then
- GSSAPI_ROOT="/usr"
- fi
- fi
-
-fi
-
-
-save_CPPFLAGS="$CPPFLAGS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GSSAPI support is requested" >&5
-$as_echo_n "checking if GSSAPI support is requested... " >&6; }
-if test x"$want_gss" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
- if test -z "$GSSAPI_INCS"; then
- if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
- GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
- elif test "$GSSAPI_ROOT" != "yes"; then
- GSSAPI_INCS="-I$GSSAPI_ROOT/include"
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
-
- ac_fn_c_check_header_mongrel "$LINENO" "gss.h" "ac_cv_header_gss_h" "$ac_includes_default"
-if test "x$ac_cv_header_gss_h" = x""yes; then :
-
-
-$as_echo "#define HAVE_GSSGNU 1" >>confdefs.h
-
- gnu_gss=yes
-
-else
-
- for ac_header in gssapi/gssapi.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_gssapi_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GSSAPI_GSSAPI_H 1
-_ACEOF
-
-else
- not_mit=1
-fi
-
-done
-
- for ac_header in gssapi/gssapi_generic.h gssapi/gssapi_krb5.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-$ac_includes_default
-#ifdef HAVE_GSSAPI_GSSAPI_H
-#include <gssapi/gssapi.h>
-#endif
-
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else
- not_mit=1
-fi
-
-done
-
- if test "x$not_mit" = "x1"; then
- ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_h" = x""yes; then :
-
-
-$as_echo "#define HAVE_GSSHEIMDAL 1" >>confdefs.h
-
-
-else
-
- want_gss=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling GSSAPI since no header files was found" >&5
-$as_echo "$as_me: WARNING: disabling GSSAPI since no header files was found" >&2;}
-
-
-fi
-
-
- else
-
-$as_echo "#define HAVE_GSSMIT 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE" >&5
-$as_echo_n "checking if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <gssapi/gssapi.h>
-#include <gssapi/gssapi_generic.h>
-#include <gssapi/gssapi_krb5.h>
-
-int main (void)
-{
-
- gss_import_name(
- (OM_uint32 *)0,
- (gss_buffer_t)0,
- GSS_C_NT_HOSTBASED_SERVICE,
- (gss_name_t *)0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define HAVE_OLD_GSSMIT 1" >>confdefs.h
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
-
-fi
-
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-if test x"$want_gss" = xyes; then
-
-$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
-
-
- curl_gss_msg="enabled (MIT/Heimdal)"
-
- if test -n "$gnu_gss"; then
- curl_gss_msg="enabled (GNU GSS)"
- LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
- LIBS="$LIBS -lgss"
- elif test -z "$GSSAPI_LIB_DIR"; then
- case $host in
- *-*-darwin*)
- LIBS="$LIBS -lgssapi_krb5 -lresolv"
- ;;
- *)
- if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
- gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
- LIBS="$LIBS $gss_libs"
- elif test "$GSSAPI_ROOT" != "yes"; then
- LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
- LIBS="$LIBS -lgssapi"
- else
- LIBS="$LIBS -lgssapi"
- fi
- ;;
- esac
- else
- LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
- LIBS="$LIBS -lgssapi"
- fi
-else
- CPPFLAGS="$save_CPPFLAGS"
-fi
-
-
-OPT_SSL=off
-ca="no"
-
-# Check whether --with-ssl was given.
-if test "${with_ssl+set}" = set; then :
- withval=$with_ssl; OPT_SSL=$withval
-fi
-
-
-if test X"$OPT_SSL" != Xno; then
- CLEANLDFLAGS="$LDFLAGS"
- CLEANCPPFLAGS="$CPPFLAGS"
- CLEANLIBS="$LIBS"
-
- case "$OPT_SSL" in
- yes)
- if test x$cross_compiling != xyes; then
- PKGTEST="yes"
- fi
- PREFIX_OPENSSL=/usr/local/ssl
- LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
- ;;
- off)
- if test x$cross_compiling != xyes; then
- PKGTEST="yes"
- fi
- PREFIX_OPENSSL=
- ;;
- *)
- PKGTEST="no"
- PREFIX_OPENSSL=$OPT_SSL
-
- OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
- { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
-$as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
- if test -e "$OPENSSL_PCDIR/openssl.pc"; then
- PKGTEST="yes"
- fi
-
- LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
- if test "$PREFIX_OPENSSL" != "/usr" ; then
- SSL_LDFLAGS="-L$LIB_OPENSSL"
- SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
- fi
- SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
- ;;
- esac
-
- if test "$PKGTEST" = "yes"; then
-
-
-
- PKGCONFIG="no"
-
- if test x$cross_compiling = xyes; then
- # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG = xno; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG != xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl options with pkg-config" >&5
-$as_echo_n "checking for openssl options with pkg-config... " >&6; }
- itexists=`
- if test -n "$OPENSSL_PCDIR"; then
- PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
- export PKG_CONFIG_LIBDIR
- fi
- $PKGCONFIG --exists openssl >/dev/null 2>&1 && echo 1`
-
- if test -z "$itexists"; then
- PKGCONFIG="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
- fi
- fi
-
-
- if test "$PKGCONFIG" != "no" ; then
- SSL_LIBS=`
- if test -n "$OPENSSL_PCDIR"; then
- PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
- export PKG_CONFIG_LIBDIR
- fi
- $PKGCONFIG --libs-only-l openssl 2>/dev/null`
-
- SSL_LDFLAGS=`
- if test -n "$OPENSSL_PCDIR"; then
- PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
- export PKG_CONFIG_LIBDIR
- fi
- $PKGCONFIG --libs-only-L openssl 2>/dev/null`
-
- SSL_CPPFLAGS=`
- if test -n "$OPENSSL_PCDIR"; then
- PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
- export PKG_CONFIG_LIBDIR
- fi
- $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&5
-$as_echo "$as_me: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&5
-$as_echo "$as_me: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&5
-$as_echo "$as_me: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&6;}
-
- LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
-
- LIBS="$LIBS $SSL_LIBS"
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
- LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
-
- case $host in
- *-*-msys* | *-*-mingw*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdi32" >&5
-$as_echo_n "checking for gdi32... " >&6; }
- my_ac_save_LIBS=$LIBS
- LIBS="-lgdi32 $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <windef.h>
- #include <wingdi.h>
-int main (void)
-{
-GdiFlush();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- LIBS=$my_ac_save_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ;;
- esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_lock in -lcrypto" >&5
-$as_echo_n "checking for CRYPTO_lock in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char CRYPTO_lock ();
-int main (void)
-{
-return CRYPTO_lock ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_crypto_CRYPTO_lock=yes
-else
- ac_cv_lib_crypto_CRYPTO_lock=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_lock" >&5
-$as_echo "$ac_cv_lib_crypto_CRYPTO_lock" >&6; }
-if test "x$ac_cv_lib_crypto_CRYPTO_lock" = x""yes; then :
-
- HAVECRYPTO="yes"
- LIBS="-lcrypto $LIBS"
-
-else
-
- LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
- CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_add_lock in -lcrypto" >&5
-$as_echo_n "checking for CRYPTO_add_lock in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_CRYPTO_add_lock+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char CRYPTO_add_lock ();
-int main (void)
-{
-return CRYPTO_add_lock ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_crypto_CRYPTO_add_lock=yes
-else
- ac_cv_lib_crypto_CRYPTO_add_lock=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_add_lock" >&5
-$as_echo "$ac_cv_lib_crypto_CRYPTO_add_lock" >&6; }
-if test "x$ac_cv_lib_crypto_CRYPTO_add_lock" = x""yes; then :
-
- HAVECRYPTO="yes"
- LIBS="-lcrypto $LIBS"
-else
-
- LDFLAGS="$CLEANLDFLAGS"
- CPPFLAGS="$CLEANCPPFLAGS"
- LIBS="$CLEANLIBS"
-
-fi
-
-
-fi
-
-
-
- if test X"$HAVECRYPTO" = X"yes"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
-$as_echo_n "checking for SSL_connect in -lssl... " >&6; }
-if test "${ac_cv_lib_ssl_SSL_connect+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lssl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_connect ();
-int main (void)
-{
-return SSL_connect ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ssl_SSL_connect=yes
-else
- ac_cv_lib_ssl_SSL_connect=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
-$as_echo "$ac_cv_lib_ssl_SSL_connect" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_connect" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSSL 1
-_ACEOF
-
- LIBS="-lssl $LIBS"
-
-fi
-
-
- if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl with RSAglue/rsaref libs in use" >&5
-$as_echo_n "checking for ssl with RSAglue/rsaref libs in use... " >&6; };
- OLIBS=$LIBS
- LIBS="$LIBS -lRSAglue -lrsaref"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
-$as_echo_n "checking for SSL_connect in -lssl... " >&6; }
-if test "${ac_cv_lib_ssl_SSL_connect+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lssl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_connect ();
-int main (void)
-{
-return SSL_connect ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ssl_SSL_connect=yes
-else
- ac_cv_lib_ssl_SSL_connect=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
-$as_echo "$ac_cv_lib_ssl_SSL_connect" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_connect" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSSL 1
-_ACEOF
-
- LIBS="-lssl $LIBS"
-
-fi
-
- if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- LIBS=$OLIBS
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
-
- else
-
- for ac_header in openssl/x509.h openssl/rsa.h openssl/crypto.h \
- openssl/pem.h openssl/ssl.h openssl/err.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- curl_ssl_msg="enabled (OpenSSL)"
- OPENSSL_ENABLED=1
-
-$as_echo "#define USE_OPENSSL 1" >>confdefs.h
-
-fi
-
-done
-
-
- if test $ac_cv_header_openssl_x509_h = no; then
- for ac_header in x509.h rsa.h crypto.h pem.h ssl.h err.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
- if test $ac_cv_header_x509_h = yes &&
- test $ac_cv_header_crypto_h = yes &&
- test $ac_cv_header_ssl_h = yes; then
- curl_ssl_msg="enabled (OpenSSL)"
- OPENSSL_ENABLED=1
- fi
- fi
- fi
-
- if test X"$OPENSSL_ENABLED" = X"1"; then
-
-$as_echo "#define USE_SSLEAY 1" >>confdefs.h
-
-
- for ac_header in openssl/pkcs12.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "openssl/pkcs12.h" "ac_cv_header_openssl_pkcs12_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_pkcs12_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_OPENSSL_PKCS12_H 1
-_ACEOF
-
-fi
-
-done
-
- else
- LIBS="$CLEANLIBS"
- fi
- USE_SSLEAY="$OPENSSL_ENABLED"
-
-
- if test X"$OPT_SSL" != Xoff &&
- test "$OPENSSL_ENABLED" != "1"; then
- as_fn_error $? "OpenSSL libs and/or directories were not found where specified!" "$LINENO" 5
- fi
- fi
-
- if test X"$OPENSSL_ENABLED" = X"1"; then
- ac_fn_c_check_func "$LINENO" "ENGINE_init" "ac_cv_func_ENGINE_init"
-if test "x$ac_cv_func_ENGINE_init" = x""yes; then :
-
- for ac_header in openssl/engine.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_engine_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_OPENSSL_ENGINE_H 1
-_ACEOF
-
-fi
-
-done
-
- for ac_func in ENGINE_load_builtin_engines
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-fi
-
-
-
- for ac_func in RAND_status \
- RAND_screen \
- RAND_egd \
- ENGINE_cleanup \
- CRYPTO_cleanup_all_ex_data \
- SSL_get_shutdown
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yaSSL using OpenSSL compatibility mode" >&5
-$as_echo_n "checking for yaSSL using OpenSSL compatibility mode... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <openssl/ssl.h>
-
-int main (void)
-{
-
-#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
- int dummy = SSL_ERROR_NONE;
-#else
- Not the yaSSL OpenSSL compatibility header.
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define USE_YASSLEMUL 1
-_ACEOF
-
- curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
- if test "$OPENSSL_ENABLED" = "1"; then
- if test -n "$LIB_OPENSSL"; then
-
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
- export LD_LIBRARY_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5
-$as_echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;}
- fi
- fi
-
-fi
-
-
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-
-# Check whether --with-zlib was given.
-if test "${with_zlib+set}" = set; then :
- withval=$with_zlib; OPT_ZLIB="$withval"
-fi
-
-
-if test "$OPT_ZLIB" = "no" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
-$as_echo "$as_me: WARNING: zlib disabled" >&2;}
-else
- if test "$OPT_ZLIB" = "yes" ; then
- OPT_ZLIB=""
- fi
-
- if test -z "$OPT_ZLIB" ; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
-$as_echo_n "checking for inflateEnd in -lz... " >&6; }
-if test "${ac_cv_lib_z_inflateEnd+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char inflateEnd ();
-int main (void)
-{
-return inflateEnd ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_inflateEnd=yes
-else
- ac_cv_lib_z_inflateEnd=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5
-$as_echo "$ac_cv_lib_z_inflateEnd" >&6; }
-if test "x$ac_cv_lib_z_inflateEnd" = x""yes; then :
- HAVE_LIBZ="1"
-else
- OPT_ZLIB="/usr/local"
-fi
-
-
- fi
-
- if test -n "$OPT_ZLIB"; then
- CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
- LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
- fi
-
- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = x""yes; then :
-
- HAVE_ZLIB_H="1"
- if test "$HAVE_LIBZ" != "1"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5
-$as_echo_n "checking for gzread in -lz... " >&6; }
-if test "${ac_cv_lib_z_gzread+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gzread ();
-int main (void)
-{
-return gzread ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_gzread=yes
-else
- ac_cv_lib_z_gzread=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5
-$as_echo "$ac_cv_lib_z_gzread" >&6; }
-if test "x$ac_cv_lib_z_gzread" = x""yes; then :
-
- HAVE_LIBZ="1"
-
-else
- CPPFLAGS=$_cppflags
- LDFLAGS=$_ldflags
-fi
-
- fi
-
-else
-
- CPPFLAGS=$_cppflags
- LDFLAGS=$_ldflags
-
-fi
-
-
-
- if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz lib, not the header file!" >&5
-$as_echo "$as_me: WARNING: configure found only the libz lib, not the header file!" >&2;}
- HAVE_LIBZ=""
- elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz header file, not the lib!" >&5
-$as_echo "$as_me: WARNING: configure found only the libz header file, not the lib!" >&2;}
- elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
- then
-
-
-$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
-
-
- CURL_LIBS="$CURL_LIBS -lz"
- LIBS="$LIBS -lz"
-
- AMFIXLIB="1"
- { $as_echo "$as_me:${as_lineno-$LINENO}: found both libz and libz.h header" >&5
-$as_echo "$as_me: found both libz and libz.h header" >&6;}
- curl_zlib_msg="enabled"
- fi
-fi
-
-
-
-if test x"$AMFIXLIB" = x1; then
- HAVE_LIBZ_TRUE=
- HAVE_LIBZ_FALSE='#'
-else
- HAVE_LIBZ_TRUE='#'
- HAVE_LIBZ_FALSE=
-fi
-
-
-
-if test X"$OPENSSL_ENABLED" = X"1"; then
-
-# Check whether --with-egd-socket was given.
-if test "${with_egd_socket+set}" = set; then :
- withval=$with_egd_socket; EGD_SOCKET="$withval"
-
-fi
-
- if test -n "$EGD_SOCKET" ; then
-
-cat >>confdefs.h <<_ACEOF
-#define EGD_SOCKET "$EGD_SOCKET"
-_ACEOF
-
- fi
-
-
-# Check whether --with-random was given.
-if test "${with_random+set}" = set; then :
- withval=$with_random; RANDOM_FILE="$withval"
-else
-
- as_ac_File=`$as_echo "ac_cv_file_"/dev/urandom"" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/urandom\"" >&5
-$as_echo_n "checking for \"/dev/urandom\"... " >&6; }
-if eval "test \"\${$as_ac_File+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r ""/dev/urandom""; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
- RANDOM_FILE="/dev/urandom"
-fi
-
-
-
-fi
-
- if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
-
-
-cat >>confdefs.h <<_ACEOF
-#define RANDOM_FILE "$RANDOM_FILE"
-_ACEOF
-
- fi
-fi
-
-
-OPT_GNUTLS=no
-
-
-# Check whether --with-gnutls was given.
-if test "${with_gnutls+set}" = set; then :
- withval=$with_gnutls; OPT_GNUTLS=$withval
-fi
-
-
-if test "$OPENSSL_ENABLED" != "1"; then
-
- if test X"$OPT_GNUTLS" != Xno; then
-
- addld=""
- if test "x$OPT_GNUTLS" = "xyes"; then
-
-
- PKGCONFIG="no"
-
- if test x$cross_compiling = xyes; then
- # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG = xno; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG != xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls options with pkg-config" >&5
-$as_echo_n "checking for gnutls options with pkg-config... " >&6; }
- itexists=`
- if test -n ""; then
- PKG_CONFIG_LIBDIR=""
- export PKG_CONFIG_LIBDIR
- fi
- $PKGCONFIG --exists gnutls >/dev/null 2>&1 && echo 1`
-
- if test -z "$itexists"; then
- PKGCONFIG="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
- fi
- fi
-
-
- if test "$PKGCONFIG" != "no" ; then
- addlib=`$PKGCONFIG --libs-only-l gnutls`
- addld=`$PKGCONFIG --libs-only-L gnutls`
- addcflags=`$PKGCONFIG --cflags-only-I gnutls`
- version=`$PKGCONFIG --modversion gnutls`
- gtlslib=`echo $addld | $SED -e 's/-L//'`
- else
- check=`libgnutls-config --version 2>/dev/null`
- if test -n "$check"; then
- addlib=`libgnutls-config --libs`
- addcflags=`libgnutls-config --cflags`
- version=`libgnutls-config --version`
- gtlslib=`libgnutls-config --prefix`/lib$libsuff
- fi
- fi
- else
- cfg=$OPT_GNUTLS/bin/libgnutls-config
- check=`$cfg --version 2>/dev/null`
- if test -n "$check"; then
- addlib=`$cfg --libs`
- addcflags=`$cfg --cflags`
- version=`$cfg --version`
- gtlslib=`$cfg --prefix`/lib$libsuff
- else
- addlib=-lgnutls
- addld=-L$OPT_GNUTLS/lib$libsuff
- addcflags=-I$OPT_GNUTLS/include
- version="" # we just don't know
- gtlslib=$OPT_GNUTLS/lib$libsuff
- fi
- fi
-
- if test -z "$version"; then
- version="unknown"
- fi
-
- if test -n "$addlib"; then
-
- CLEANLIBS="$LIBS"
- CLEANCPPFLAGS="$CPPFLAGS"
- CLEADLDFLAGS="$LDFLAGS"
-
- LIBS="$LIBS $addlib"
- LDFLAGS="$LDFLAGS $addld"
- if test "$addcflags" != "-I/usr/include"; then
- CPPFLAGS="$CPPFLAGS $addcflags"
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_check_version in -lgnutls" >&5
-$as_echo_n "checking for gnutls_check_version in -lgnutls... " >&6; }
-if test "${ac_cv_lib_gnutls_gnutls_check_version+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgnutls $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gnutls_check_version ();
-int main (void)
-{
-return gnutls_check_version ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_gnutls_gnutls_check_version=yes
-else
- ac_cv_lib_gnutls_gnutls_check_version=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_check_version" >&5
-$as_echo "$ac_cv_lib_gnutls_gnutls_check_version" >&6; }
-if test "x$ac_cv_lib_gnutls_gnutls_check_version" = x""yes; then :
-
-
-$as_echo "#define USE_GNUTLS 1" >>confdefs.h
-
- USE_GNUTLS=1
-
- GNUTLS_ENABLED=1
- USE_GNUTLS="yes"
- curl_ssl_msg="enabled (GnuTLS)"
-
-else
-
- LIBS="$CLEANLIBS"
- CPPFLAGS="$CLEANCPPFLAGS"
-
-fi
-
-
- if test "x$USE_GNUTLS" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: detected GnuTLS version $version" >&5
-$as_echo "$as_me: detected GnuTLS version $version" >&6;}
-
- if test -n "$gtlslib"; then
-
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
- export LD_LIBRARY_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: Added $gtlslib to LD_LIBRARY_PATH" >&5
-$as_echo "$as_me: Added $gtlslib to LD_LIBRARY_PATH" >&6;}
- fi
- fi
-
- fi
-
- fi
-fi
-
-if test "$GNUTLS_ENABLED" = "1"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgcrypt" >&5
-$as_echo_n "checking for gcry_control in -lgcrypt... " >&6; }
-if test "${ac_cv_lib_gcrypt_gcry_control+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgcrypt $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gcry_control ();
-int main (void)
-{
-return gcry_control ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_gcrypt_gcry_control=yes
-else
- ac_cv_lib_gcrypt_gcry_control=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_control" >&5
-$as_echo "$ac_cv_lib_gcrypt_gcry_control" >&6; }
-if test "x$ac_cv_lib_gcrypt_gcry_control" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGCRYPT 1
-_ACEOF
-
- LIBS="-lgcrypt $LIBS"
-
-else
-
- as_fn_error $? "need GnuTLS built with gcrypt to function with GnuTLS" "$LINENO" 5
-
-fi
-
-fi
-
-
-OPT_POLARSSL=no
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-
-# Check whether --with-polarssl was given.
-if test "${with_polarssl+set}" = set; then :
- withval=$with_polarssl; OPT_POLARSSL=$withval
-fi
-
-
-if test "$OPENSSL_ENABLED" != "1"; then
-
- if test X"$OPT_POLARSSL" != Xno; then
-
- if test "$OPT_POLARSSL" = "yes"; then
- OPT_POLARSSL=""
- fi
-
- if test -z "$OPT_POLARSSL" ; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for havege_init in -lpolarssl" >&5
-$as_echo_n "checking for havege_init in -lpolarssl... " >&6; }
-if test "${ac_cv_lib_polarssl_havege_init+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpolarssl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char havege_init ();
-int main (void)
-{
-return havege_init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_polarssl_havege_init=yes
-else
- ac_cv_lib_polarssl_havege_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_polarssl_havege_init" >&5
-$as_echo "$ac_cv_lib_polarssl_havege_init" >&6; }
-if test "x$ac_cv_lib_polarssl_havege_init" = x""yes; then :
-
-
-$as_echo "#define USE_POLARSSL 1" >>confdefs.h
-
- USE_POLARSSL=1
-
- POLARSSL_ENABLED=1
- USE_POLARSSL="yes"
- curl_ssl_msg="enabled (PolarSSL)"
-
-fi
-
- fi
-
- if test "x$USE_POLARSSL" != "xyes"; then
- addld=-L$OPT_POLARSSL/lib$libsuff
- addcflags=-I$OPT_POLARSSL/include
- polarssllib=$OPT_POLARSSL/lib$libsuff
-
- LDFLAGS="$LDFLAGS $addld"
- if test "$addcflags" != "-I/usr/include"; then
- CPPFLAGS="$CPPFLAGS $addcflags"
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl_init in -lpolarssl" >&5
-$as_echo_n "checking for ssl_init in -lpolarssl... " >&6; }
-if test "${ac_cv_lib_polarssl_ssl_init+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpolarssl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char ssl_init ();
-int main (void)
-{
-return ssl_init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_polarssl_ssl_init=yes
-else
- ac_cv_lib_polarssl_ssl_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_polarssl_ssl_init" >&5
-$as_echo "$ac_cv_lib_polarssl_ssl_init" >&6; }
-if test "x$ac_cv_lib_polarssl_ssl_init" = x""yes; then :
-
-
-$as_echo "#define USE_POLARSSL 1" >>confdefs.h
-
- USE_POLARSSL=1
-
- POLARSSL_ENABLED=1
- USE_POLARSSL="yes"
- curl_ssl_msg="enabled (PolarSSL)"
-
-else
-
- CPPFLAGS=$_cppflags
- LDFLAGS=$_ldflags
-
-fi
-
- fi
-
- if test "x$USE_POLARSSL" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: detected PolarSSL" >&5
-$as_echo "$as_me: detected PolarSSL" >&6;}
-
- CURL_LIBS="$CURL_LIBS -lpolarssl"
- LIBS="$LIBS -lpolarssl"
-
- if test -n "$polarssllib"; then
-
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
- export LD_LIBRARY_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: Added $polarssllib to LD_LIBRARY_PATH" >&5
-$as_echo "$as_me: Added $polarssllib to LD_LIBRARY_PATH" >&6;}
- fi
-
- fi
-
- fi
-fi
-
-OPT_NSS=no
-
-
-# Check whether --with-nss was given.
-if test "${with_nss+set}" = set; then :
- withval=$with_nss; OPT_NSS=$withval
-fi
-
-
-if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
-
- if test X"$OPT_NSS" != Xno; then
- if test "x$OPT_NSS" = "xyes"; then
-
-
-
- PKGCONFIG="no"
-
- if test x$cross_compiling = xyes; then
- # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG = xno; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG != xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss options with pkg-config" >&5
-$as_echo_n "checking for nss options with pkg-config... " >&6; }
- itexists=`
- if test -n ""; then
- PKG_CONFIG_LIBDIR=""
- export PKG_CONFIG_LIBDIR
- fi
- $PKGCONFIG --exists nss >/dev/null 2>&1 && echo 1`
-
- if test -z "$itexists"; then
- PKGCONFIG="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
- fi
- fi
-
-
- if test "$PKGCONFIG" != "no" ; then
- addlib=`$PKGCONFIG --libs nss`
- addcflags=`$PKGCONFIG --cflags nss`
- version=`$PKGCONFIG --modversion nss`
- nssprefix=`$PKGCONFIG --variable=prefix nss`
- else
-
- check=`nss-config --version 2>/dev/null`
- if test -n "$check"; then
- addlib=`nss-config --libs`
- addcflags=`nss-config --cflags`
- version=`nss-config --version`
- nssprefix=`nss-config --prefix`
- else
- addlib="-lnss3"
- addcflags=""
- version="unknown"
- fi
- fi
- else
- # Without pkg-config, we'll kludge in some defaults
- addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
- addcflags="-I$OPT_NSS/include"
- version="unknown"
- nssprefix=$OPT_NSS
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreateGenericObject in -lnss3" >&5
-$as_echo_n "checking for PK11_CreateGenericObject in -lnss3... " >&6; }
-if test "${ac_cv_lib_nss3_PK11_CreateGenericObject+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnss3 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char PK11_CreateGenericObject ();
-int main (void)
-{
-return PK11_CreateGenericObject ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nss3_PK11_CreateGenericObject=yes
-else
- ac_cv_lib_nss3_PK11_CreateGenericObject=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreateGenericObject" >&5
-$as_echo "$ac_cv_lib_nss3_PK11_CreateGenericObject" >&6; }
-if test "x$ac_cv_lib_nss3_PK11_CreateGenericObject" = x""yes; then :
-
-
-$as_echo "#define HAVE_PK11_CREATEGENERICOBJECT 1" >>confdefs.h
-
- HAVE_PK11_CREATEGENERICOBJECT=1
-
-
-fi
-
- if test -n "$addlib"; then
-
- CLEANLIBS="$LIBS"
- CLEANCPPFLAGS="$CPPFLAGS"
-
- LIBS="$LIBS $addlib"
- if test "$addcflags" != "-I/usr/include"; then
- CPPFLAGS="$CPPFLAGS $addcflags"
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
-$as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
-if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnss3 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char NSS_Initialize ();
-int main (void)
-{
-return NSS_Initialize ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nss3_NSS_Initialize=yes
-else
- ac_cv_lib_nss3_NSS_Initialize=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
-$as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
-if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
-
-
-$as_echo "#define USE_NSS 1" >>confdefs.h
-
- USE_NSS=1
-
- USE_NSS="yes"
- NSS_ENABLED=1
- curl_ssl_msg="enabled (NSS)"
-
-else
-
- LIBS="$CLEANLIBS"
- CPPFLAGS="$CLEANCPPFLAGS"
-
-fi
-
-
- if test "x$USE_NSS" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: detected NSS version $version" >&5
-$as_echo "$as_me: detected NSS version $version" >&6;}
-
-
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
- export LD_LIBRARY_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&5
-$as_echo "$as_me: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&6;}
- fi
-
- fi
-
- fi
-fi
-if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED" = "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&5
-$as_echo "$as_me: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl or --with-nss to address this." >&5
-$as_echo "$as_me: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl or --with-nss to address this." >&2;}
-else
- # SSL is enabled, genericly
-
- SSL_ENABLED="1"
-fi
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking default CA cert bundle/path" >&5
-$as_echo_n "checking default CA cert bundle/path... " >&6; }
-
-
-# Check whether --with-ca-bundle was given.
-if test "${with_ca_bundle+set}" = set; then :
- withval=$with_ca_bundle;
- want_ca="$withval"
- if test "x$want_ca" = "xyes"; then
- as_fn_error $? "--with-ca-bundle=FILE requires a path to the CA bundle" "$LINENO" 5
- fi
-
-else
- want_ca="unset"
-fi
-
-
-# Check whether --with-ca-path was given.
-if test "${with_ca_path+set}" = set; then :
- withval=$with_ca_path;
- want_capath="$withval"
- if test "x$want_capath" = "xyes"; then
- as_fn_error $? "--with-ca-path=DIRECTORY requires a path to the CA path directory" "$LINENO" 5
- fi
-
-else
- want_capath="unset"
-fi
-
-
- if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \
- "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
- as_fn_error $? "Can't specify both --with-ca-bundle and --with-ca-path." "$LINENO" 5
- elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then
- ca="$want_ca"
- capath="no"
- elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
- if test "x$OPENSSL_ENABLED" != "x1"; then
- as_fn_error $? "--with-ca-path only works with openSSL" "$LINENO" 5
- fi
- capath="$want_capath"
- ca="no"
- else
- ca="no"
- capath="no"
- if test "x$want_ca" = "xunset"; then
- if test "x$prefix" != xNONE; then
- cac="${prefix}/share/curl/curl-ca-bundle.crt"
- else
- cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
- fi
-
- for a in /etc/ssl/certs/ca-certificates.crt \
- /etc/pki/tls/certs/ca-bundle.crt \
- /usr/share/ssl/certs/ca-bundle.crt \
- /usr/local/share/certs/ca-root.crt \
- /etc/ssl/cert.pem \
- "$cac"; do
- if test -f "$a"; then
- ca="$a"
- break
- fi
- done
- fi
- if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \
- "x$OPENSSL_ENABLED" = "x1"; then
- for a in /etc/ssl/certs/; do
- if test -d "$a" && ls "$a"/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].0 >/dev/null 2>/dev/null; then
- capath="$a"
- break
- fi
- done
- fi
- fi
-
-
-
- if test "x$ca" != "xno"; then
- CURL_CA_BUNDLE='"'$ca'"'
-
-cat >>confdefs.h <<_ACEOF
-#define CURL_CA_BUNDLE "$ca"
-_ACEOF
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ca" >&5
-$as_echo "$ca" >&6; }
- elif test "x$capath" != "xno"; then
- CURL_CA_PATH="\"$capath\""
-
-cat >>confdefs.h <<_ACEOF
-#define CURL_CA_PATH "$capath"
-_ACEOF
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $capath (capath)" >&5
-$as_echo "$capath (capath)" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
-
-
-OPT_LIBSSH2=off
-
-# Check whether --with-libssh2 was given.
-if test "${with_libssh2+set}" = set; then :
- withval=$with_libssh2; OPT_LIBSSH2=$withval
-fi
-
-
-if test X"$OPT_LIBSSH2" != Xno; then
- CLEANLDFLAGS="$LDFLAGS"
- CLEANCPPFLAGS="$CPPFLAGS"
- CLEANLIBS="$LIBS"
-
- case "$OPT_LIBSSH2" in
- yes)
-
-
- PKGCONFIG="no"
-
- if test x$cross_compiling = xyes; then
- # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG = xno; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG != xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2 options with pkg-config" >&5
-$as_echo_n "checking for libssh2 options with pkg-config... " >&6; }
- itexists=`
- if test -n ""; then
- PKG_CONFIG_LIBDIR=""
- export PKG_CONFIG_LIBDIR
- fi
- $PKGCONFIG --exists libssh2 >/dev/null 2>&1 && echo 1`
-
- if test -z "$itexists"; then
- PKGCONFIG="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
- fi
- fi
-
-
- if test "$PKGCONFIG" != "no" ; then
- LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
- LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
- CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
- version=`$PKGCONFIG --modversion libssh2`
- DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
- fi
-
- ;;
- off)
- ;;
- *)
- PREFIX_SSH2=$OPT_LIBSSH2
- ;;
- esac
-
- if test -n "$PREFIX_SSH2"; then
- LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
- CPP_SSH2=-I${PREFIX_SSH2}/include
- DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
- fi
-
- LDFLAGS="$LDFLAGS $LD_SSH2"
- CPPFLAGS="$CPPFLAGS $CPP_SSH2"
- LIBS="$LIBS $LIB_SSH2"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2_channel_open_ex in -lssh2" >&5
-$as_echo_n "checking for libssh2_channel_open_ex in -lssh2... " >&6; }
-if test "${ac_cv_lib_ssh2_libssh2_channel_open_ex+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lssh2 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char libssh2_channel_open_ex ();
-int main (void)
-{
-return libssh2_channel_open_ex ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ssh2_libssh2_channel_open_ex=yes
-else
- ac_cv_lib_ssh2_libssh2_channel_open_ex=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_channel_open_ex" >&5
-$as_echo "$ac_cv_lib_ssh2_libssh2_channel_open_ex" >&6; }
-if test "x$ac_cv_lib_ssh2_libssh2_channel_open_ex" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSSH2 1
-_ACEOF
-
- LIBS="-lssh2 $LIBS"
-
-fi
-
-
- for ac_header in libssh2.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "libssh2.h" "ac_cv_header_libssh2_h" "$ac_includes_default"
-if test "x$ac_cv_header_libssh2_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSSH2_H 1
-_ACEOF
- curl_ssh_msg="enabled (libSSH2)"
- LIBSSH2_ENABLED=1
-
-$as_echo "#define USE_LIBSSH2 1" >>confdefs.h
-
- USE_LIBSSH2=1
-
-
-fi
-
-done
-
-
- if test X"$OPT_LIBSSH2" != Xoff &&
- test "$LIBSSH2_ENABLED" != "1"; then
- as_fn_error $? "libSSH2 libs and/or directories were not found where specified!" "$LINENO" 5
- fi
-
- if test "$LIBSSH2_ENABLED" = "1"; then
- if test -n "$DIR_SSH2"; then
-
- for ac_func in libssh2_version libssh2_init libssh2_exit \
- libssh2_scp_send64
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
- export LD_LIBRARY_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH2 to LD_LIBRARY_PATH" >&5
-$as_echo "$as_me: Added $DIR_SSH2 to LD_LIBRARY_PATH" >&6;}
- fi
- else
- LDFLAGS=$CLEANLDFLAGS
- CPPFLAGS=$CLEANCPPFLAGS
- LIBS=$CLEANLIBS
- fi
-fi
-
-
-OPT_LIBRTMP=off
-
-# Check whether --with-librtmp was given.
-if test "${with_librtmp+set}" = set; then :
- withval=$with_librtmp; OPT_LIBRTMP=$withval
-fi
-
-
-if test X"$OPT_LIBRTMP" != Xno; then
- CLEANLDFLAGS="$LDFLAGS"
- CLEANCPPFLAGS="$CPPFLAGS"
- CLEANLIBS="$LIBS"
-
- case "$OPT_LIBRTMP" in
- yes)
-
-
- PKGCONFIG="no"
-
- if test x$cross_compiling = xyes; then
- # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG = xno; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-
- if test x$PKGCONFIG != xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for librtmp options with pkg-config" >&5
-$as_echo_n "checking for librtmp options with pkg-config... " >&6; }
- itexists=`
- if test -n ""; then
- PKG_CONFIG_LIBDIR=""
- export PKG_CONFIG_LIBDIR
- fi
- $PKGCONFIG --exists librtmp >/dev/null 2>&1 && echo 1`
-
- if test -z "$itexists"; then
- PKGCONFIG="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
- fi
- fi
-
-
- if test "$PKGCONFIG" != "no" ; then
- LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
- LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
- CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
- version=`$PKGCONFIG --modversion librtmp`
- DIR_RTMP=`echo $LD_RTMP | $SED -e 's/-L//'`
- fi
-
- ;;
- off)
- LIB_RTMP="-lrtmp"
- ;;
- *)
- PREFIX_RTMP=$OPT_LIBRTMP
- ;;
- esac
-
- if test -n "$PREFIX_RTMP"; then
- LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
- CPP_RTMP=-I${PREFIX_RTMP}/include
- DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
- fi
-
- LDFLAGS="$LDFLAGS $LD_RTMP"
- CPPFLAGS="$CPPFLAGS $CPP_RTMP"
- LIBS="$LIBS $LIB_RTMP"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTMP_Init in -lrtmp" >&5
-$as_echo_n "checking for RTMP_Init in -lrtmp... " >&6; }
-if test "${ac_cv_lib_rtmp_RTMP_Init+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrtmp $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char RTMP_Init ();
-int main (void)
-{
-return RTMP_Init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_rtmp_RTMP_Init=yes
-else
- ac_cv_lib_rtmp_RTMP_Init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rtmp_RTMP_Init" >&5
-$as_echo "$ac_cv_lib_rtmp_RTMP_Init" >&6; }
-if test "x$ac_cv_lib_rtmp_RTMP_Init" = x""yes; then :
-
- for ac_header in librtmp/rtmp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "librtmp/rtmp.h" "ac_cv_header_librtmp_rtmp_h" "$ac_includes_default"
-if test "x$ac_cv_header_librtmp_rtmp_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRTMP_RTMP_H 1
-_ACEOF
- curl_rtmp_msg="enabled (librtmp)"
- LIBRTMP_ENABLED=1
-
-$as_echo "#define USE_LIBRTMP 1" >>confdefs.h
-
- USE_LIBRTMP=1
-
-
-fi
-
-done
-
-
-else
- LDFLAGS=$CLEANLDFLAGS
- CPPFLAGS=$CLEANCPPFLAGS
- LIBS=$CLEANLIBS
-
-fi
-
-
- if test X"$OPT_LIBRTMP" != Xoff &&
- test "$LIBRTMP_ENABLED" != "1"; then
- as_fn_error $? "librtmp libs and/or directories were not found where specified!" "$LINENO" 5
- fi
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with libidn" >&5
-$as_echo_n "checking whether to build with libidn... " >&6; }
-
-# Check whether --with-libidn was given.
-if test "${with_libidn+set}" = set; then :
- withval=$with_libidn; LIBIDN="$withval"
-fi
-
-
-case "$LIBIDN" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
- idn=""
- if test -n "$LIBIDN"; then
- if test "x$LIBIDN" != "xyes"; then
- oldLDFLAGS=$LDFLAGS
- oldCPPFLAGS=$CPPFLAGS
- LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
- CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
- idn="yes"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for idna_to_ascii_4i in -lidn" >&5
-$as_echo_n "checking for idna_to_ascii_4i in -lidn... " >&6; }
-if test "${ac_cv_lib_idn_idna_to_ascii_4i+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lidn $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char idna_to_ascii_4i ();
-int main (void)
-{
-return idna_to_ascii_4i ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_idn_idna_to_ascii_4i=yes
-else
- ac_cv_lib_idn_idna_to_ascii_4i=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_idn_idna_to_ascii_4i" >&5
-$as_echo "$ac_cv_lib_idn_idna_to_ascii_4i" >&6; }
-if test "x$ac_cv_lib_idn_idna_to_ascii_4i" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBIDN 1
-_ACEOF
-
- LIBS="-lidn $LIBS"
-
-else
- idn=""
- LDFLAGS=$oldLDFLAGS
- CPPFLAGS=$oldCPPFLAGS
-fi
-
- fi
- fi
-
- if test "x$idn" != "xyes"; then
- idn="yes"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for idna_to_ascii_lz in -lidn" >&5
-$as_echo_n "checking for idna_to_ascii_lz in -lidn... " >&6; }
-if test "${ac_cv_lib_idn_idna_to_ascii_lz+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lidn $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char idna_to_ascii_lz ();
-int main (void)
-{
-return idna_to_ascii_lz ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_idn_idna_to_ascii_lz=yes
-else
- ac_cv_lib_idn_idna_to_ascii_lz=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_idn_idna_to_ascii_lz" >&5
-$as_echo "$ac_cv_lib_idn_idna_to_ascii_lz" >&6; }
-if test "x$ac_cv_lib_idn_idna_to_ascii_lz" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBIDN 1
-_ACEOF
-
- LIBS="-lidn $LIBS"
-
-else
- idn=""
-fi
-
- fi
-
- if test "x$idn" = "xyes"; then
- curl_idn_msg="enabled"
- IDN_ENABLED=1
-
- for ac_func in idn_free idna_strerror tld_strerror
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- for ac_header in idn-free.h tld.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- fi
-
- ;;
-esac
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc.h" >&5
-$as_echo_n "checking for malloc.h... " >&6; }
-if test "${ac_cv_header_malloc_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <malloc.h>
-
-int main (void)
-{
-
- void *p = malloc(10);
- void *q = calloc(10,10);
- free(p);
- free(q);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_malloc_h="yes"
-
-else
-
- ac_cv_header_malloc_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_malloc_h" >&5
-$as_echo "$ac_cv_header_malloc_h" >&6; }
- if test "$ac_cv_header_malloc_h" = "yes"; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_MALLOC_H 1
-_ACEOF
-
- #
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <stdlib.h>
-
-int main (void)
-{
-
- void *p = malloc(10);
- void *q = calloc(10,10);
- free(p);
- free(q);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_need_header_malloc_h="no"
-
-else
-
- curl_cv_need_header_malloc_h="yes"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- #
- case "$curl_cv_need_header_malloc_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define NEED_MALLOC_H 1
-_ACEOF
-
- ;;
- esac
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory.h" >&5
-$as_echo_n "checking for memory.h... " >&6; }
-if test "${ac_cv_header_memory_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <memory.h>
-
-int main (void)
-{
-
- void *p = malloc(10);
- void *q = calloc(10,10);
- free(p);
- free(q);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_memory_h="yes"
-
-else
-
- ac_cv_header_memory_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_memory_h" >&5
-$as_echo "$ac_cv_header_memory_h" >&6; }
- if test "$ac_cv_header_memory_h" = "yes"; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_MEMORY_H 1
-_ACEOF
-
- #
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <stdlib.h>
-
-int main (void)
-{
-
- void *p = malloc(10);
- void *q = calloc(10,10);
- free(p);
- free(q);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_need_header_memory_h="no"
-
-else
-
- curl_cv_need_header_memory_h="yes"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- #
- case "$curl_cv_need_header_memory_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define NEED_MEMORY_H 1
-_ACEOF
-
- ;;
- esac
- fi
-
-
-for ac_header in sys/types.h \
- sys/time.h \
- sys/select.h \
- sys/socket.h \
- sys/ioctl.h \
- sys/uio.h \
- assert.h \
- unistd.h \
- stdlib.h \
- limits.h \
- arpa/inet.h \
- net/if.h \
- netinet/in.h \
- sys/un.h \
- netinet/tcp.h \
- netdb.h \
- sys/sockio.h \
- sys/stat.h \
- sys/param.h \
- termios.h \
- termio.h \
- sgtty.h \
- fcntl.h \
- alloca.h \
- time.h \
- io.h \
- pwd.h \
- utime.h \
- sys/utime.h \
- sys/poll.h \
- poll.h \
- socket.h \
- sys/resource.h \
- libgen.h \
- locale.h \
- errno.h \
- stdbool.h \
- arpa/tftp.h \
- sys/filio.h \
- setjmp.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-
-
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int main (void)
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset cs;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *pcpcc;
- char **ppc;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- pcpcc = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++pcpcc;
- ppc = (char**) pcpcc;
- pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- if (s) return 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- if (!foo) return 0;
- }
- return !cs[0] && !zero.x;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_const=yes
-else
- ac_cv_c_const=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-$as_echo "#define const /**/" >>confdefs.h
-
-fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler support of C99 variadic macro style" >&5
-$as_echo_n "checking for compiler support of C99 variadic macro style... " >&6; }
-if test "${curl_cv_variadic_macros_c99+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__)
-#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__)
- int fun3(int arg1, int arg2, int arg3);
- int fun2(int arg1, int arg2);
- int fun3(int arg1, int arg2, int arg3)
- { return arg1 + arg2 + arg3; }
- int fun2(int arg1, int arg2)
- { return arg1 + arg2; }
-
-int main (void)
-{
-
- int res3 = c99_vmacro3(1, 2, 3);
- int res2 = c99_vmacro2(1, 2);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_variadic_macros_c99="yes"
-
-else
-
- curl_cv_variadic_macros_c99="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_variadic_macros_c99" >&5
-$as_echo "$curl_cv_variadic_macros_c99" >&6; }
- case "$curl_cv_variadic_macros_c99" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_VARIADIC_MACROS_C99 1
-_ACEOF
-
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler support of old gcc variadic macro style" >&5
-$as_echo_n "checking for compiler support of old gcc variadic macro style... " >&6; }
-if test "${curl_cv_variadic_macros_gcc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define gcc_vmacro3(first, args...) fun3(first, args)
-#define gcc_vmacro2(first, args...) fun2(first, args)
- int fun3(int arg1, int arg2, int arg3);
- int fun2(int arg1, int arg2);
- int fun3(int arg1, int arg2, int arg3)
- { return arg1 + arg2 + arg3; }
- int fun2(int arg1, int arg2)
- { return arg1 + arg2; }
-
-int main (void)
-{
-
- int res3 = gcc_vmacro3(1, 2, 3);
- int res2 = gcc_vmacro2(1, 2);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_variadic_macros_gcc="yes"
-
-else
-
- curl_cv_variadic_macros_gcc="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_variadic_macros_gcc" >&5
-$as_echo "$curl_cv_variadic_macros_gcc" >&6; }
- case "$curl_cv_variadic_macros_gcc" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_VARIADIC_MACROS_GCC 1
-_ACEOF
-
- ;;
- esac
-
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int main (void)
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
-else
- ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-
-
- for ac_header in sys/types.h sys/time.h time.h sys/socket.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
-$as_echo_n "checking for struct timeval... " >&6; }
-if test "${ac_cv_struct_timeval+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-int main (void)
-{
-
- struct timeval ts;
- ts.tv_sec = 0;
- ts.tv_usec = 0;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_struct_timeval="yes"
-
-else
-
- ac_cv_struct_timeval="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_timeval" >&5
-$as_echo "$ac_cv_struct_timeval" >&6; }
- case "$ac_cv_struct_timeval" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_TIMEVAL 1
-_ACEOF
-
- ;;
- esac
-
-
-
- if test "x$cross_compiling" != xyes; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking run-time libs availability" >&5
-$as_echo_n "checking run-time libs availability... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-main()
-{
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: fine" >&5
-$as_echo "fine" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
- as_fn_error $? "one or more libs available at link-time are not available run-time. Libs used at link-time: $LIBS" "$LINENO" 5
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- fi
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
-$as_echo_n "checking size of size_t... " >&6; }
-if test "${ac_cv_sizeof_size_t+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_size_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (size_t)
-See \`config.log' for more details" "$LINENO" 5 ; }
- else
- ac_cv_sizeof_size_t=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-$as_echo "$ac_cv_sizeof_size_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5 ; }
- else
- ac_cv_sizeof_long=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5 ; }
- else
- ac_cv_sizeof_int=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if test "${ac_cv_sizeof_short+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_short" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (short)
-See \`config.log' for more details" "$LINENO" 5 ; }
- else
- ac_cv_sizeof_short=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
-
-
-
- if test -z "$ac_cv_sizeof_long" ||
- test "$ac_cv_sizeof_long" -eq "0"; then
- as_fn_error $? "cannot find out size of long." "$LINENO" 5
- fi
-
-cat >>confdefs.h <<_EOF
-#define CURL_SIZEOF_LONG $ac_cv_sizeof_long
-_EOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-$as_echo_n "checking size of time_t... " >&6; }
-if test "${ac_cv_sizeof_time_t+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_time_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (time_t)
-See \`config.log' for more details" "$LINENO" 5 ; }
- else
- ac_cv_sizeof_time_t=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-$as_echo "$ac_cv_sizeof_time_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
-$as_echo_n "checking size of off_t... " >&6; }
-if test "${ac_cv_sizeof_off_t+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_off_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (off_t)
-See \`config.log' for more details" "$LINENO" 5 ; }
- else
- ac_cv_sizeof_off_t=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
-$as_echo "$ac_cv_sizeof_off_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
-_ACEOF
-
-
-
-soname_bump=no
-if test x"$ac_cv_native_windows" != "xyes" &&
- test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This libcurl built is probably not ABI compatible with previous" >&5
-$as_echo "$as_me: WARNING: This libcurl built is probably not ABI compatible with previous" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: builds! You MUST read lib/README.curl_off_t to figure it out." >&5
-$as_echo "$as_me: WARNING: builds! You MUST read lib/README.curl_off_t to figure it out." >&2;}
- soname_bump=yes
-fi
-
-
-ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
-if test "x$ac_cv_type_long_long" = x""yes; then :
-
-$as_echo "#define HAVE_LONGLONG 1" >>confdefs.h
-
- longlong="yes"
-
-fi
-
-
-if test "xyes" = "x$longlong"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if numberLL works" >&5
-$as_echo_n "checking if numberLL works... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-long long val = 1000LL;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE_LL 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-# check for ssize_t
-ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
-if test "x$ac_cv_type_ssize_t" = x""yes; then :
-
-else
-
-$as_echo "#define ssize_t int" >>confdefs.h
-
-fi
-
-
-# check for bool type
-ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-
-"
-if test "x$ac_cv_type_bool" = x""yes; then :
-
-
-$as_echo "#define HAVE_BOOL_T 1" >>confdefs.h
-
-
-fi
-
-
-
-curl_includes_ws2tcpip="\
-/* includes start */
-#ifdef HAVE_WINDOWS_H
-# ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-# endif
-# include <windows.h>
-# ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-# ifdef HAVE_WS2TCPIP_H
-# include <ws2tcpip.h>
-# endif
-# endif
-#endif
-/* includes end */"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
-$as_echo_n "checking for windows.h... " >&6; }
-if test "${ac_cv_header_windows_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__)
- HAVE_WINDOWS_H shall not be defined.
-#else
- int dummy=2*WINVER;
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_windows_h="yes"
-
-else
-
- ac_cv_header_windows_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_windows_h" >&5
-$as_echo "$ac_cv_header_windows_h" >&6; }
- case "$ac_cv_header_windows_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINDOWS_H 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define WIN32_LEAN_AND_MEAN 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
-$as_echo_n "checking for winsock2.h... " >&6; }
-if test "${ac_cv_header_winsock2_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <winsock2.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
- HAVE_WINSOCK2_H shall not be defined.
-#else
- int dummy=2*IPPROTO_ESP;
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_winsock2_h="yes"
-
-else
-
- ac_cv_header_winsock2_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_winsock2_h" >&5
-$as_echo "$ac_cv_header_winsock2_h" >&6; }
- case "$ac_cv_header_winsock2_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5
-$as_echo_n "checking for ws2tcpip.h... " >&6; }
-if test "${ac_cv_header_ws2tcpip_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-
-int main (void)
-{
-
-#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__)
- HAVE_WS2TCPIP_H shall not be defined.
-#else
- int dummy=2*IP_PKTINFO;
-#endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_header_ws2tcpip_h="yes"
-
-else
-
- ac_cv_header_ws2tcpip_h="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_ws2tcpip_h" >&5
-$as_echo "$ac_cv_header_ws2tcpip_h" >&6; }
- case "$ac_cv_header_ws2tcpip_h" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WS2TCPIP_H 1
-_ACEOF
-
- ;;
- esac
-
-
-
-curl_includes_sys_socket="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h sys/socket.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_sys_socket
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-curl_preprocess_callconv="\
-/* preprocess start */
-#ifdef HAVE_WINDOWS_H
-# define FUNCALLCONV __stdcall
-#else
-# define FUNCALLCONV
-#endif
-/* preprocess end */"
-
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_socklen_t data type" >&5
-$as_echo_n "checking for curl_socklen_t data type... " >&6; }
- curl_typeof_curl_socklen_t="unknown"
- for arg1 in int SOCKET; do
- for arg2 in 'struct sockaddr' void; do
- for t in socklen_t int size_t 'unsigned int' long 'unsigned long' void; do
- if test "$curl_typeof_curl_socklen_t" = "unknown"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_preprocess_callconv
- extern int FUNCALLCONV getpeername($arg1, $arg2 *, $t *);
-
-int main (void)
-{
-
- $t *lenptr = 0;
- if(0 != getpeername(0, 0, lenptr))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_typeof_curl_socklen_t="$t"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- done
- done
- for t in socklen_t int; do
- if test "$curl_typeof_curl_socklen_t" = "void"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_sys_socket
- typedef $t curl_socklen_t;
-
-int main (void)
-{
-
- curl_socklen_t dummy;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_typeof_curl_socklen_t="$t"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_typeof_curl_socklen_t" >&5
-$as_echo "$curl_typeof_curl_socklen_t" >&6; }
- if test "$curl_typeof_curl_socklen_t" = "void" ||
- test "$curl_typeof_curl_socklen_t" = "unknown"; then
- as_fn_error $? "cannot find data type for curl_socklen_t." "$LINENO" 5
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of curl_socklen_t" >&5
-$as_echo_n "checking size of curl_socklen_t... " >&6; }
- curl_sizeof_curl_socklen_t="unknown"
- curl_pull_headers_socklen_t="unknown"
- if test "$ac_cv_header_ws2tcpip_h" = "yes"; then
- tst_pull_header_checks='none ws2tcpip'
- tst_size_checks='4'
- else
- tst_pull_header_checks='none systypes syssocket'
- tst_size_checks='4 8 2'
- fi
- for tst_size in $tst_size_checks; do
- for tst_pull_headers in $tst_pull_header_checks; do
- if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
- case $tst_pull_headers in
- ws2tcpip)
- tmp_includes="$curl_includes_ws2tcpip"
- ;;
- systypes)
- tmp_includes="$curl_includes_sys_types"
- ;;
- syssocket)
- tmp_includes="$curl_includes_sys_socket"
- ;;
- *)
- tmp_includes=""
- ;;
- esac
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $tmp_includes
- typedef $curl_typeof_curl_socklen_t curl_socklen_t;
- typedef char dummy_arr[sizeof(curl_socklen_t) == $tst_size ? 1 : -1];
-
-int main (void)
-{
-
- curl_socklen_t dummy;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_sizeof_curl_socklen_t="$tst_size"
- curl_pull_headers_socklen_t="$tst_pull_headers"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_sizeof_curl_socklen_t" >&5
-$as_echo "$curl_sizeof_curl_socklen_t" >&6; }
- if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
- as_fn_error $? "cannot find out size of curl_socklen_t." "$LINENO" 5
- fi
- #
- case $curl_pull_headers_socklen_t in
- ws2tcpip)
-
-cat >>confdefs.h <<_EOF
-#define CURL_PULL_WS2TCPIP_H 1
-_EOF
-
- ;;
- systypes)
-
-cat >>confdefs.h <<_EOF
-#define CURL_PULL_SYS_TYPES_H 1
-_EOF
-
- ;;
- syssocket)
-
-cat >>confdefs.h <<_EOF
-#define CURL_PULL_SYS_TYPES_H 1
-_EOF
-
-
-cat >>confdefs.h <<_EOF
-#define CURL_PULL_SYS_SOCKET_H 1
-_EOF
-
- ;;
- esac
-
-cat >>confdefs.h <<_EOF
-#define CURL_TYPEOF_CURL_SOCKLEN_T $curl_typeof_curl_socklen_t
-_EOF
-
-
-cat >>confdefs.h <<_EOF
-#define CURL_SIZEOF_CURL_SOCKLEN_T $curl_sizeof_curl_socklen_t
-_EOF
-
-
-
-
- ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#endif
-
-"
-if test "x$ac_cv_type_in_addr_t" = x""yes; then :
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_addr_t equivalent" >&5
-$as_echo_n "checking for in_addr_t equivalent... " >&6; }
-if test "${curl_cv_in_addr_t_equiv+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- curl_cv_in_addr_t_equiv="unknown"
- for t in "unsigned long" int size_t unsigned long; do
- if test "$curl_cv_in_addr_t_equiv" = "unknown"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#endif
-
-int main (void)
-{
-
- $t data = inet_addr ("1.2.3.4");
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- curl_cv_in_addr_t_equiv="$t"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_in_addr_t_equiv" >&5
-$as_echo "$curl_cv_in_addr_t_equiv" >&6; }
- case "$curl_cv_in_addr_t_equiv" in
- unknown)
- as_fn_error $? "Cannot find a type to use in place of in_addr_t" "$LINENO" 5
- ;;
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define in_addr_t $curl_cv_in_addr_t_equiv
-_ACEOF
-
- ;;
- esac
-
-fi
-
-
-
-
- ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#endif
-
-"
-if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then :
-
-$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
-
-fi
-
-
-
-
- for ac_header in signal.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
-if test "x$ac_cv_header_signal_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGNAL_H 1
-_ACEOF
-
-fi
-
-done
-
- ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-
-"
-if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
-
-
-$as_echo "#define HAVE_SIG_ATOMIC_T 1" >>confdefs.h
-
-
-fi
-
- case "$ac_cv_type_sig_atomic_t" in
- yes)
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sig_atomic_t is already defined as volatile" >&5
-$as_echo_n "checking if sig_atomic_t is already defined as volatile... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-
-int main (void)
-{
-
- static volatile sig_atomic_t dummy = 0;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_sig_atomic_t_volatile="no"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ac_cv_sig_atomic_t_volatile="yes"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$ac_cv_sig_atomic_t_volatile" = "yes"; then
-
-$as_echo "#define HAVE_SIG_ATOMIC_T_VOLATILE 1" >>confdefs.h
-
- fi
- ;;
- esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <signal.h>
-
-int main (void)
-{
-return *(signal (0, 0)) (0) == 1;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_type_signal=int
-else
- ac_cv_type_signal=void
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
-
-
- for ac_header in sys/select.h sys/socket.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for select" >&5
-$as_echo_n "checking for select... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-#ifndef HAVE_WINDOWS_H
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
-
-int main (void)
-{
-
- select(0, 0, 0, 0, 0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- curl_cv_select="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- curl_cv_select="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$curl_cv_select" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for select" >&5
-$as_echo_n "checking types of args and return type for select... " >&6; }
-if test "${curl_cv_func_select_args+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- curl_cv_func_select_args="unknown"
- for sel_retv in 'int' 'ssize_t'; do
- for sel_arg1 in 'int' 'ssize_t' 'size_t' 'unsigned long int' 'unsigned int'; do
- for sel_arg234 in 'fd_set *' 'int *' 'void *'; do
- for sel_arg5 in 'struct timeval *' 'const struct timeval *'; do
- if test "$curl_cv_func_select_args" = "unknown"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#define SELECTCALLCONV PASCAL
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-#ifndef HAVE_WINDOWS_H
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#define SELECTCALLCONV
-#endif
-#ifndef HAVE_STRUCT_TIMEVAL
- struct timeval {
- long tv_sec;
- long tv_usec;
- };
-#endif
- extern $sel_retv SELECTCALLCONV select($sel_arg1,
- $sel_arg234,
- $sel_arg234,
- $sel_arg234,
- $sel_arg5);
-
-int main (void)
-{
-
- $sel_arg1 nfds=0;
- $sel_arg234 rfds=0;
- $sel_arg234 wfds=0;
- $sel_arg234 efds=0;
- $sel_retv res = select(nfds, rfds, wfds, efds, 0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_func_select_args="$sel_arg1,$sel_arg234,$sel_arg5,$sel_retv"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- done
- done
- done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_select_args" >&5
-$as_echo "$curl_cv_func_select_args" >&6; } # AC-CACHE-CHECK
- if test "$curl_cv_func_select_args" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find proper types to use for select args" >&5
-$as_echo "$as_me: WARNING: Cannot find proper types to use for select args" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_SELECT will not be defined" >&5
-$as_echo "$as_me: WARNING: HAVE_SELECT will not be defined" >&2;}
- else
- select_prev_IFS=$IFS; IFS=','
- set dummy `echo "$curl_cv_func_select_args" | sed 's/\*/\*/g'`
- IFS=$select_prev_IFS
- shift
- #
- sel_qual_type_arg5=$3
- #
-
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG1 $1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG234 $2
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_RETV $4
-_ACEOF
-
- #
- prev_sh_opts=$-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set -f
- ;;
- esac
- #
- case "$sel_qual_type_arg5" in
- const*)
- sel_qual_arg5=const
- sel_type_arg5=`echo $sel_qual_type_arg5 | sed 's/^const //'`
- ;;
- *)
- sel_qual_arg5=
- sel_type_arg5=$sel_qual_type_arg5
- ;;
- esac
- #
-
-cat >>confdefs.h <<_ACEOF
-#define SELECT_QUAL_ARG5 $sel_qual_arg5
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG5 $sel_type_arg5
-_ACEOF
-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set +f
- ;;
- esac
- #
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SELECT 1
-_ACEOF
-
- ac_cv_func_select="yes"
- fi
- fi
-
-
-
- for ac_header in sys/types.h sys/socket.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recv" >&5
-$as_echo_n "checking for recv... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
-
-int main (void)
-{
-
- recv(0, 0, 0, 0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- curl_cv_recv="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- curl_cv_recv="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$curl_cv_recv" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for recv" >&5
-$as_echo_n "checking types of args and return type for recv... " >&6; }
-if test "${curl_cv_func_recv_args+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- curl_cv_func_recv_args="unknown"
- for recv_retv in 'int' 'ssize_t'; do
- for recv_arg1 in 'int' 'ssize_t' 'SOCKET'; do
- for recv_arg2 in 'char *' 'void *'; do
- for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
- for recv_arg4 in 'int' 'unsigned int'; do
- if test "$curl_cv_func_recv_args" = "unknown"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#define RECVCALLCONV PASCAL
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#define RECVCALLCONV
-#endif
- extern $recv_retv RECVCALLCONV
- recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
-
-int main (void)
-{
-
- $recv_arg1 s=0;
- $recv_arg2 buf=0;
- $recv_arg3 len=0;
- $recv_arg4 flags=0;
- $recv_retv res = recv(s, buf, len, flags);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- done
- done
- done
- done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_recv_args" >&5
-$as_echo "$curl_cv_func_recv_args" >&6; } # AC-CACHE-CHECK
- if test "$curl_cv_func_recv_args" = "unknown"; then
- as_fn_error $? "Cannot find proper types to use for recv args" "$LINENO" 5
- else
- recv_prev_IFS=$IFS; IFS=','
- set dummy `echo "$curl_cv_func_recv_args" | sed 's/\*/\*/g'`
- IFS=$recv_prev_IFS
- shift
- #
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_ARG1 $1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_ARG2 $2
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_ARG3 $3
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_ARG4 $4
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_RETV $5
-_ACEOF
-
- #
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_RECV 1
-_ACEOF
-
- ac_cv_func_recv="yes"
- fi
- else
- as_fn_error $? "Unable to link function recv" "$LINENO" 5
- fi
-
-
- for ac_header in sys/types.h sys/socket.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvfrom" >&5
-$as_echo_n "checking for recvfrom... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
-
-int main (void)
-{
-
- recvfrom(0, 0, 0, 0, 0, 0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- curl_cv_recvfrom="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- curl_cv_recvfrom="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$curl_cv_recvfrom" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for recvfrom" >&5
-$as_echo_n "checking types of args and return type for recvfrom... " >&6; }
-if test "${curl_cv_func_recvfrom_args+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- curl_cv_func_recvfrom_args="unknown"
- for recvfrom_retv in 'int' 'ssize_t'; do
- for recvfrom_arg1 in 'int' 'ssize_t' 'SOCKET'; do
- for recvfrom_arg2 in 'char *' 'void *'; do
- for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
- for recvfrom_arg4 in 'int' 'unsigned int'; do
- for recvfrom_arg5 in 'struct sockaddr *' 'void *'; do
- for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
- if test "$curl_cv_func_recvfrom_args" = "unknown"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#define RECVFROMCALLCONV PASCAL
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#define RECVFROMCALLCONV
-#endif
- extern $recvfrom_retv RECVFROMCALLCONV
- recvfrom($recvfrom_arg1, $recvfrom_arg2,
- $recvfrom_arg3, $recvfrom_arg4,
- $recvfrom_arg5, $recvfrom_arg6);
-
-int main (void)
-{
-
- $recvfrom_arg1 s=0;
- $recvfrom_arg2 buf=0;
- $recvfrom_arg3 len=0;
- $recvfrom_arg4 flags=0;
- $recvfrom_arg5 addr=0;
- $recvfrom_arg6 addrlen=0;
- $recvfrom_retv res=0;
- res = recvfrom(s, buf, len, flags, addr, addrlen);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_func_recvfrom_args="$recvfrom_arg1,$recvfrom_arg2,$recvfrom_arg3,$recvfrom_arg4,$recvfrom_arg5,$recvfrom_arg6,$recvfrom_retv"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- done
- done
- done
- done
- done
- done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_recvfrom_args" >&5
-$as_echo "$curl_cv_func_recvfrom_args" >&6; } # AC-CACHE-CHECK
- # Nearly last minute change for this release starts here
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_RECVFROM 1
-_ACEOF
-
- ac_cv_func_recvfrom="yes"
- # Nearly last minute change for this release ends here
- if test "$curl_cv_func_recvfrom_args" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find proper types to use for recvfrom args" >&5
-$as_echo "$as_me: WARNING: Cannot find proper types to use for recvfrom args" >&2;}
- else
- recvfrom_prev_IFS=$IFS; IFS=','
- set dummy `echo "$curl_cv_func_recvfrom_args" | sed 's/\*/\*/g'`
- IFS=$recvfrom_prev_IFS
- shift
- #
- recvfrom_ptrt_arg2=$2
- recvfrom_ptrt_arg5=$5
- recvfrom_ptrt_arg6=$6
- #
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG1 $1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG3 $3
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG4 $4
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_RETV $7
-_ACEOF
-
- #
- prev_sh_opts=$-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set -f
- ;;
- esac
- #
- recvfrom_type_arg2=`echo $recvfrom_ptrt_arg2 | sed 's/ \*//'`
- recvfrom_type_arg5=`echo $recvfrom_ptrt_arg5 | sed 's/ \*//'`
- recvfrom_type_arg6=`echo $recvfrom_ptrt_arg6 | sed 's/ \*//'`
- #
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG2 $recvfrom_type_arg2
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG5 $recvfrom_type_arg5
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG6 $recvfrom_type_arg6
-_ACEOF
-
- #
- if test "$recvfrom_type_arg2" = "void"; then
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG2_IS_VOID 1
-_ACEOF
-
- fi
- if test "$recvfrom_type_arg5" = "void"; then
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG5_IS_VOID 1
-_ACEOF
-
- fi
- if test "$recvfrom_type_arg6" = "void"; then
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG6_IS_VOID 1
-_ACEOF
-
- fi
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set +f
- ;;
- esac
- #
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_RECVFROM 1
-_ACEOF
-
- ac_cv_func_recvfrom="yes"
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to link function recvfrom" >&5
-$as_echo "$as_me: WARNING: Unable to link function recvfrom" >&2;}
- fi
-
-
- for ac_header in sys/types.h sys/socket.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for send" >&5
-$as_echo_n "checking for send... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
-
-int main (void)
-{
-
- send(0, 0, 0, 0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- curl_cv_send="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- curl_cv_send="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$curl_cv_send" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for send" >&5
-$as_echo_n "checking types of args and return type for send... " >&6; }
-if test "${curl_cv_func_send_args+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- curl_cv_func_send_args="unknown"
- for send_retv in 'int' 'ssize_t'; do
- for send_arg1 in 'int' 'ssize_t' 'SOCKET'; do
- for send_arg2 in 'char *' 'void *' 'const char *' 'const void *'; do
- for send_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
- for send_arg4 in 'int' 'unsigned int'; do
- if test "$curl_cv_func_send_args" = "unknown"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#define SENDCALLCONV PASCAL
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#define SENDCALLCONV
-#endif
- extern $send_retv SENDCALLCONV
- send($send_arg1, $send_arg2, $send_arg3, $send_arg4);
-
-int main (void)
-{
-
- $send_arg1 s=0;
- $send_arg3 len=0;
- $send_arg4 flags=0;
- $send_retv res = send(s, 0, len, flags);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- done
- done
- done
- done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_send_args" >&5
-$as_echo "$curl_cv_func_send_args" >&6; } # AC-CACHE-CHECK
- if test "$curl_cv_func_send_args" = "unknown"; then
- as_fn_error $? "Cannot find proper types to use for send args" "$LINENO" 5
- else
- send_prev_IFS=$IFS; IFS=','
- set dummy `echo "$curl_cv_func_send_args" | sed 's/\*/\*/g'`
- IFS=$send_prev_IFS
- shift
- #
- send_qual_type_arg2=$2
- #
-
-cat >>confdefs.h <<_ACEOF
-#define SEND_TYPE_ARG1 $1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SEND_TYPE_ARG3 $3
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SEND_TYPE_ARG4 $4
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SEND_TYPE_RETV $5
-_ACEOF
-
- #
- prev_sh_opts=$-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set -f
- ;;
- esac
- #
- case "$send_qual_type_arg2" in
- const*)
- send_qual_arg2=const
- send_type_arg2=`echo $send_qual_type_arg2 | sed 's/^const //'`
- ;;
- *)
- send_qual_arg2=
- send_type_arg2=$send_qual_type_arg2
- ;;
- esac
- #
-
-cat >>confdefs.h <<_ACEOF
-#define SEND_QUAL_ARG2 $send_qual_arg2
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SEND_TYPE_ARG2 $send_type_arg2
-_ACEOF
-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set +f
- ;;
- esac
- #
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SEND 1
-_ACEOF
-
- ac_cv_func_send="yes"
- fi
- else
- as_fn_error $? "Unable to link function send" "$LINENO" 5
- fi
-
-
- for ac_header in sys/types.h sys/socket.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL" >&5
-$as_echo_n "checking for MSG_NOSIGNAL... " >&6; }
-if test "${ac_cv_msg_nosignal+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
-
-int main (void)
-{
-
- int flag=MSG_NOSIGNAL;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_msg_nosignal="yes"
-
-else
-
- ac_cv_msg_nosignal="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_msg_nosignal" >&5
-$as_echo "$ac_cv_msg_nosignal" >&6; }
- case "$ac_cv_msg_nosignal" in
- yes)
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_MSG_NOSIGNAL 1
-_ACEOF
-
- ;;
- esac
-
-
-
-curl_includes_unistd="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_unistd
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_alarm="unknown"
- tst_proto_alarm="unknown"
- tst_compi_alarm="unknown"
- tst_allow_alarm="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm can be linked" >&5
-$as_echo_n "checking if alarm can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define alarm innocuous_alarm
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef alarm
-#ifdef __cplusplus
-extern "C"
-#endif
-char alarm ();
-#if defined __stub_alarm || defined __stub___alarm
-choke me
-#endif
-
-int main (void)
-{
-return alarm ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_alarm="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_alarm="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_alarm" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm is prototyped" >&5
-$as_echo_n "checking if alarm is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_unistd
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "alarm" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_alarm="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_alarm="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_alarm" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm is compilable" >&5
-$as_echo_n "checking if alarm is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_unistd
-
-int main (void)
-{
-
- if(0 != alarm(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_alarm="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_alarm="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_alarm" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm usage allowed" >&5
-$as_echo_n "checking if alarm usage allowed... " >&6; }
- if test "x$curl_disallow_alarm" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_alarm="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_alarm="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm might be used" >&5
-$as_echo_n "checking if alarm might be used... " >&6; }
- if test "$tst_links_alarm" = "yes" &&
- test "$tst_proto_alarm" = "yes" &&
- test "$tst_compi_alarm" = "yes" &&
- test "$tst_allow_alarm" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ALARM 1
-_ACEOF
-
- ac_cv_func_alarm="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_alarm="no"
- fi
-
-
-curl_includes_string="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h string.h strings.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_string
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-curl_includes_libgen="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_LIBGEN_H
-# include <libgen.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h libgen.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_libgen
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_basename="unknown"
- tst_proto_basename="unknown"
- tst_compi_basename="unknown"
- tst_allow_basename="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename can be linked" >&5
-$as_echo_n "checking if basename can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define basename innocuous_basename
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef basename
-#ifdef __cplusplus
-extern "C"
-#endif
-char basename ();
-#if defined __stub_basename || defined __stub___basename
-choke me
-#endif
-
-int main (void)
-{
-return basename ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_basename="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_basename="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_basename" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename is prototyped" >&5
-$as_echo_n "checking if basename is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
- $curl_includes_libgen
- $curl_includes_unistd
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "basename" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_basename="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_basename="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_basename" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename is compilable" >&5
-$as_echo_n "checking if basename is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
- $curl_includes_libgen
- $curl_includes_unistd
-
-int main (void)
-{
-
- if(0 != basename(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_basename="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_basename="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_basename" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename usage allowed" >&5
-$as_echo_n "checking if basename usage allowed... " >&6; }
- if test "x$curl_disallow_basename" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_basename="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_basename="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename might be used" >&5
-$as_echo_n "checking if basename might be used... " >&6; }
- if test "$tst_links_basename" = "yes" &&
- test "$tst_proto_basename" = "yes" &&
- test "$tst_compi_basename" = "yes" &&
- test "$tst_allow_basename" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_BASENAME 1
-_ACEOF
-
- ac_cv_func_basename="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_basename="no"
- fi
-
-
-curl_includes_socket="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SOCKET_H
-# include <socket.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h socket.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_socket
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_closesocket="unknown"
- tst_proto_closesocket="unknown"
- tst_compi_closesocket="unknown"
- tst_allow_closesocket="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket can be linked" >&5
-$as_echo_n "checking if closesocket can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_socket
-
-int main (void)
-{
-
- if(0 != closesocket(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_closesocket="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_closesocket="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_closesocket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket is prototyped" >&5
-$as_echo_n "checking if closesocket is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_winsock2
- $curl_includes_socket
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "closesocket" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_closesocket="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_closesocket="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_closesocket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket is compilable" >&5
-$as_echo_n "checking if closesocket is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_socket
-
-int main (void)
-{
-
- if(0 != closesocket(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_closesocket="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_closesocket="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_closesocket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket usage allowed" >&5
-$as_echo_n "checking if closesocket usage allowed... " >&6; }
- if test "x$curl_disallow_closesocket" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_closesocket="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_closesocket="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket might be used" >&5
-$as_echo_n "checking if closesocket might be used... " >&6; }
- if test "$tst_links_closesocket" = "yes" &&
- test "$tst_proto_closesocket" = "yes" &&
- test "$tst_compi_closesocket" = "yes" &&
- test "$tst_allow_closesocket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_CLOSESOCKET 1
-_ACEOF
-
- ac_cv_func_closesocket="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_closesocket="no"
- fi
-
-
- #
- tst_links_closesocket_camel="unknown"
- tst_proto_closesocket_camel="unknown"
- tst_compi_closesocket_camel="unknown"
- tst_allow_closesocket_camel="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket can be linked" >&5
-$as_echo_n "checking if CloseSocket can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_sys_socket
-
-int main (void)
-{
-
- if(0 != CloseSocket(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_closesocket_camel="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_closesocket_camel="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_closesocket_camel" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket is prototyped" >&5
-$as_echo_n "checking if CloseSocket is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_sys_socket
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "CloseSocket" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_closesocket_camel="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_closesocket_camel="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_closesocket_camel" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket is compilable" >&5
-$as_echo_n "checking if CloseSocket is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_sys_socket
-
-int main (void)
-{
-
- if(0 != CloseSocket(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_closesocket_camel="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_closesocket_camel="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_closesocket_camel" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket usage allowed" >&5
-$as_echo_n "checking if CloseSocket usage allowed... " >&6; }
- if test "x$curl_disallow_closesocket_camel" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_closesocket_camel="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_closesocket_camel="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket might be used" >&5
-$as_echo_n "checking if CloseSocket might be used... " >&6; }
- if test "$tst_links_closesocket_camel" = "yes" &&
- test "$tst_proto_closesocket_camel" = "yes" &&
- test "$tst_compi_closesocket_camel" = "yes" &&
- test "$tst_allow_closesocket_camel" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_CLOSESOCKET_CAMEL 1
-_ACEOF
-
- ac_cv_func_closesocket_camel="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_closesocket_camel="no"
- fi
-
-
- #
- tst_links_connect="unknown"
- tst_proto_connect="unknown"
- tst_compi_connect="unknown"
- tst_allow_connect="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect can be linked" >&5
-$as_echo_n "checking if connect can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
- $curl_includes_socket
-
-int main (void)
-{
-
- if(0 != connect(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_connect="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_connect="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_connect" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect is prototyped" >&5
-$as_echo_n "checking if connect is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
- $curl_includes_socket
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "connect" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_connect="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_connect="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_connect" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect is compilable" >&5
-$as_echo_n "checking if connect is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
- $curl_includes_socket
-
-int main (void)
-{
-
- if(0 != connect(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_connect="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_connect="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_connect" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect usage allowed" >&5
-$as_echo_n "checking if connect usage allowed... " >&6; }
- if test "x$curl_disallow_connect" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_connect="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_connect="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect might be used" >&5
-$as_echo_n "checking if connect might be used... " >&6; }
- if test "$tst_links_connect" = "yes" &&
- test "$tst_proto_connect" = "yes" &&
- test "$tst_compi_connect" = "yes" &&
- test "$tst_allow_connect" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_CONNECT 1
-_ACEOF
-
- ac_cv_func_connect="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_connect="no"
- fi
-
-
-curl_includes_fcntl="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h unistd.h fcntl.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_fcntl
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_fcntl="unknown"
- tst_proto_fcntl="unknown"
- tst_compi_fcntl="unknown"
- tst_allow_fcntl="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl can be linked" >&5
-$as_echo_n "checking if fcntl can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define fcntl innocuous_fcntl
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef fcntl
-#ifdef __cplusplus
-extern "C"
-#endif
-char fcntl ();
-#if defined __stub_fcntl || defined __stub___fcntl
-choke me
-#endif
-
-int main (void)
-{
-return fcntl ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_fcntl="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_fcntl="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_fcntl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl is prototyped" >&5
-$as_echo_n "checking if fcntl is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_fcntl
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "fcntl" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_fcntl="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_fcntl="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_fcntl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl is compilable" >&5
-$as_echo_n "checking if fcntl is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_fcntl
-
-int main (void)
-{
-
- if(0 != fcntl(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_fcntl="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_fcntl="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_fcntl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl usage allowed" >&5
-$as_echo_n "checking if fcntl usage allowed... " >&6; }
- if test "x$curl_disallow_fcntl" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_fcntl="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_fcntl="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl might be used" >&5
-$as_echo_n "checking if fcntl might be used... " >&6; }
- if test "$tst_links_fcntl" = "yes" &&
- test "$tst_proto_fcntl" = "yes" &&
- test "$tst_compi_fcntl" = "yes" &&
- test "$tst_allow_fcntl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FCNTL 1
-_ACEOF
-
- ac_cv_func_fcntl="yes"
-
- #
- tst_compi_fcntl_o_nonblock="unknown"
- tst_allow_fcntl_o_nonblock="unknown"
- #
- case $host_os in
- sunos4* | aix3* | beos*)
- curl_disallow_fcntl_o_nonblock="yes"
- ;;
- esac
- #
- if test "$ac_cv_func_fcntl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK is compilable" >&5
-$as_echo_n "checking if fcntl O_NONBLOCK is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_fcntl
-
-int main (void)
-{
-
- int flags = 0;
- if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_fcntl_o_nonblock="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_fcntl_o_nonblock="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_fcntl_o_nonblock" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK usage allowed" >&5
-$as_echo_n "checking if fcntl O_NONBLOCK usage allowed... " >&6; }
- if test "x$curl_disallow_fcntl_o_nonblock" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_fcntl_o_nonblock="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_fcntl_o_nonblock="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK might be used" >&5
-$as_echo_n "checking if fcntl O_NONBLOCK might be used... " >&6; }
- if test "$tst_compi_fcntl_o_nonblock" = "yes" &&
- test "$tst_allow_fcntl_o_nonblock" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FCNTL_O_NONBLOCK 1
-_ACEOF
-
- ac_cv_func_fcntl_o_nonblock="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_fcntl_o_nonblock="no"
- fi
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_fcntl="no"
- fi
-
-
-curl_includes_stdio="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h stdio.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_stdio
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_fdopen="unknown"
- tst_proto_fdopen="unknown"
- tst_compi_fdopen="unknown"
- tst_allow_fdopen="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fdopen can be linked" >&5
-$as_echo_n "checking if fdopen can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define fdopen innocuous_fdopen
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef fdopen
-#ifdef __cplusplus
-extern "C"
-#endif
-char fdopen ();
-#if defined __stub_fdopen || defined __stub___fdopen
-choke me
-#endif
-
-int main (void)
-{
-return fdopen ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_fdopen="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_fdopen="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_fdopen" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fdopen is prototyped" >&5
-$as_echo_n "checking if fdopen is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_stdio
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "fdopen" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_fdopen="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_fdopen="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_fdopen" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fdopen is compilable" >&5
-$as_echo_n "checking if fdopen is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdio
-
-int main (void)
-{
-
- if(0 != fdopen(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_fdopen="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_fdopen="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_fdopen" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fdopen usage allowed" >&5
-$as_echo_n "checking if fdopen usage allowed... " >&6; }
- if test "x$curl_disallow_fdopen" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_fdopen="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_fdopen="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fdopen might be used" >&5
-$as_echo_n "checking if fdopen might be used... " >&6; }
- if test "$tst_links_fdopen" = "yes" &&
- test "$tst_proto_fdopen" = "yes" &&
- test "$tst_compi_fdopen" = "yes" &&
- test "$tst_allow_fdopen" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FDOPEN 1
-_ACEOF
-
- ac_cv_func_fdopen="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_fdopen="no"
- fi
-
-
-curl_includes_netdb="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_NETDB_H
-# include <netdb.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h netdb.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_netdb
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_freeaddrinfo="unknown"
- tst_proto_freeaddrinfo="unknown"
- tst_compi_freeaddrinfo="unknown"
- tst_allow_freeaddrinfo="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo can be linked" >&5
-$as_echo_n "checking if freeaddrinfo can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_includes_netdb
-
-int main (void)
-{
-
- freeaddrinfo(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_freeaddrinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_freeaddrinfo="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_freeaddrinfo" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo is prototyped" >&5
-$as_echo_n "checking if freeaddrinfo is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "freeaddrinfo" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_freeaddrinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_freeaddrinfo="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_freeaddrinfo" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo is compilable" >&5
-$as_echo_n "checking if freeaddrinfo is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_includes_netdb
-
-int main (void)
-{
-
- freeaddrinfo(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_freeaddrinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_freeaddrinfo="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_freeaddrinfo" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo usage allowed" >&5
-$as_echo_n "checking if freeaddrinfo usage allowed... " >&6; }
- if test "x$curl_disallow_freeaddrinfo" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_freeaddrinfo="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_freeaddrinfo="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo might be used" >&5
-$as_echo_n "checking if freeaddrinfo might be used... " >&6; }
- if test "$tst_links_freeaddrinfo" = "yes" &&
- test "$tst_proto_freeaddrinfo" = "yes" &&
- test "$tst_compi_freeaddrinfo" = "yes" &&
- test "$tst_allow_freeaddrinfo" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FREEADDRINFO 1
-_ACEOF
-
- ac_cv_func_freeaddrinfo="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_freeaddrinfo="no"
- fi
-
-
-curl_includes_ifaddrs="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-#ifdef HAVE_IFADDRS_H
-# include <ifaddrs.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h sys/socket.h netinet/in.h ifaddrs.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_ifaddrs
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_freeifaddrs="unknown"
- tst_proto_freeifaddrs="unknown"
- tst_compi_freeifaddrs="unknown"
- tst_allow_freeifaddrs="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs can be linked" >&5
-$as_echo_n "checking if freeifaddrs can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define freeifaddrs innocuous_freeifaddrs
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef freeifaddrs
-#ifdef __cplusplus
-extern "C"
-#endif
-char freeifaddrs ();
-#if defined __stub_freeifaddrs || defined __stub___freeifaddrs
-choke me
-#endif
-
-int main (void)
-{
-return freeifaddrs ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_freeifaddrs="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_freeifaddrs="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_freeifaddrs" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs is prototyped" >&5
-$as_echo_n "checking if freeifaddrs is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_ifaddrs
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "freeifaddrs" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_freeifaddrs="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_freeifaddrs="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_freeifaddrs" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs is compilable" >&5
-$as_echo_n "checking if freeifaddrs is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_ifaddrs
-
-int main (void)
-{
-
- freeifaddrs(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_freeifaddrs="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_freeifaddrs="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_freeifaddrs" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs usage allowed" >&5
-$as_echo_n "checking if freeifaddrs usage allowed... " >&6; }
- if test "x$curl_disallow_freeifaddrs" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_freeifaddrs="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_freeifaddrs="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs might be used" >&5
-$as_echo_n "checking if freeifaddrs might be used... " >&6; }
- if test "$tst_links_freeifaddrs" = "yes" &&
- test "$tst_proto_freeifaddrs" = "yes" &&
- test "$tst_compi_freeifaddrs" = "yes" &&
- test "$tst_allow_freeifaddrs" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FREEIFADDRS 1
-_ACEOF
-
- ac_cv_func_freeifaddrs="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_freeifaddrs="no"
- fi
-
-
- #
- tst_links_ftruncate="unknown"
- tst_proto_ftruncate="unknown"
- tst_compi_ftruncate="unknown"
- tst_allow_ftruncate="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate can be linked" >&5
-$as_echo_n "checking if ftruncate can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define ftruncate innocuous_ftruncate
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef ftruncate
-#ifdef __cplusplus
-extern "C"
-#endif
-char ftruncate ();
-#if defined __stub_ftruncate || defined __stub___ftruncate
-choke me
-#endif
-
-int main (void)
-{
-return ftruncate ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_ftruncate="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_ftruncate="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_ftruncate" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate is prototyped" >&5
-$as_echo_n "checking if ftruncate is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_unistd
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "ftruncate" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_ftruncate="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_ftruncate="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_ftruncate" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate is compilable" >&5
-$as_echo_n "checking if ftruncate is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_unistd
-
-int main (void)
-{
-
- if(0 != ftruncate(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_ftruncate="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_ftruncate="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_ftruncate" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate usage allowed" >&5
-$as_echo_n "checking if ftruncate usage allowed... " >&6; }
- if test "x$curl_disallow_ftruncate" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_ftruncate="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_ftruncate="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate might be used" >&5
-$as_echo_n "checking if ftruncate might be used... " >&6; }
- if test "$tst_links_ftruncate" = "yes" &&
- test "$tst_proto_ftruncate" = "yes" &&
- test "$tst_compi_ftruncate" = "yes" &&
- test "$tst_allow_ftruncate" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FTRUNCATE 1
-_ACEOF
-
- ac_cv_func_ftruncate="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_ftruncate="no"
- fi
-
-
-curl_includes_stdlib="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h stdlib.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_stdlib
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_getaddrinfo="unknown"
- tst_proto_getaddrinfo="unknown"
- tst_compi_getaddrinfo="unknown"
- tst_works_getaddrinfo="unknown"
- tst_allow_getaddrinfo="unknown"
- tst_tsafe_getaddrinfo="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo can be linked" >&5
-$as_echo_n "checking if getaddrinfo can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != getaddrinfo(0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_getaddrinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_getaddrinfo="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_getaddrinfo" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is prototyped" >&5
-$as_echo_n "checking if getaddrinfo is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "getaddrinfo" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_getaddrinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_getaddrinfo="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_getaddrinfo" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is compilable" >&5
-$as_echo_n "checking if getaddrinfo is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != getaddrinfo(0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_getaddrinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_getaddrinfo="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$tst_compi_getaddrinfo" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
-$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_ws2tcpip
- $curl_includes_stdlib
- $curl_includes_string
- $curl_includes_sys_socket
- $curl_includes_netdb
-
-int main (void)
-{
-
- struct addrinfo hints;
- struct addrinfo *ai = 0;
- int error;
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_flags = AI_NUMERICHOST;
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = SOCK_STREAM;
- error = getaddrinfo("127.0.0.1", 0, &hints, &ai);
- if(error || !ai)
- exit(1); /* fail */
- else
- exit(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_works_getaddrinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_works_getaddrinfo="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- if test "$tst_compi_getaddrinfo" = "yes" &&
- test "$tst_works_getaddrinfo" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo usage allowed" >&5
-$as_echo_n "checking if getaddrinfo usage allowed... " >&6; }
- if test "x$curl_disallow_getaddrinfo" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_getaddrinfo="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_getaddrinfo="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo might be used" >&5
-$as_echo_n "checking if getaddrinfo might be used... " >&6; }
- if test "$tst_links_getaddrinfo" = "yes" &&
- test "$tst_proto_getaddrinfo" = "yes" &&
- test "$tst_compi_getaddrinfo" = "yes" &&
- test "$tst_allow_getaddrinfo" = "yes" &&
- test "$tst_works_getaddrinfo" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETADDRINFO 1
-_ACEOF
-
- ac_cv_func_getaddrinfo="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_getaddrinfo="no"
- ac_cv_func_getaddrinfo_threadsafe="no"
- fi
- #
- if test "$ac_cv_func_getaddrinfo" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is threadsafe" >&5
-$as_echo_n "checking if getaddrinfo is threadsafe... " >&6; }
- case $host_os in
- aix[1234].* | aix5.[01].*)
- tst_tsafe_getaddrinfo="no"
- ;;
- aix*)
- tst_tsafe_getaddrinfo="yes"
- ;;
- darwin[12345].*)
- tst_tsafe_getaddrinfo="no"
- ;;
- darwin*)
- tst_tsafe_getaddrinfo="yes"
- ;;
- freebsd[1234].* | freebsd5.[1234]*)
- tst_tsafe_getaddrinfo="no"
- ;;
- freebsd*)
- tst_tsafe_getaddrinfo="yes"
- ;;
- hpux[123456789].* | hpux10.* | hpux11.0* | hpux11.10*)
- tst_tsafe_getaddrinfo="no"
- ;;
- hpux*)
- tst_tsafe_getaddrinfo="yes"
- ;;
- netbsd[123].*)
- tst_tsafe_getaddrinfo="no"
- ;;
- netbsd*)
- tst_tsafe_getaddrinfo="yes"
- ;;
- *bsd*)
- tst_tsafe_getaddrinfo="no"
- ;;
- solaris2*)
- tst_tsafe_getaddrinfo="yes"
- ;;
- esac
- if test "$tst_tsafe_getaddrinfo" = "unknown"; then
-
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_includes_netdb
-
-int main (void)
-{
-#ifdef h_errno
- return 0;
-#else
- force compilation error
-#endif
-}
-
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tst_symbol_defined="yes"
-
-else
-
- tst_symbol_defined="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$tst_symbol_defined" = "yes"; then
- curl_cv_have_def_h_errno=yes
-
- else
- curl_cv_have_def_h_errno=no
-
- fi
-
- if test "$curl_cv_have_def_h_errno" = "no"; then
- tst_tsafe_getaddrinfo="no"
- fi
- fi
- if test "$tst_tsafe_getaddrinfo" = "unknown"; then
- tst_tsafe_getaddrinfo="yes"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_tsafe_getaddrinfo" >&5
-$as_echo "$tst_tsafe_getaddrinfo" >&6; }
- if test "$tst_tsafe_getaddrinfo" = "yes"; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETADDRINFO_THREADSAFE 1
-_ACEOF
-
- ac_cv_func_getaddrinfo_threadsafe="yes"
- else
- ac_cv_func_getaddrinfo_threadsafe="no"
- fi
- fi
-
-
- #
- tst_links_gethostbyaddr="unknown"
- tst_proto_gethostbyaddr="unknown"
- tst_compi_gethostbyaddr="unknown"
- tst_allow_gethostbyaddr="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr can be linked" >&5
-$as_echo_n "checking if gethostbyaddr can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyaddr(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_gethostbyaddr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_gethostbyaddr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_gethostbyaddr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr is prototyped" >&5
-$as_echo_n "checking if gethostbyaddr is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_winsock2
- $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gethostbyaddr" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_gethostbyaddr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_gethostbyaddr="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_gethostbyaddr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr is compilable" >&5
-$as_echo_n "checking if gethostbyaddr is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyaddr(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gethostbyaddr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gethostbyaddr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_gethostbyaddr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr usage allowed" >&5
-$as_echo_n "checking if gethostbyaddr usage allowed... " >&6; }
- if test "x$curl_disallow_gethostbyaddr" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_gethostbyaddr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_gethostbyaddr="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr might be used" >&5
-$as_echo_n "checking if gethostbyaddr might be used... " >&6; }
- if test "$tst_links_gethostbyaddr" = "yes" &&
- test "$tst_proto_gethostbyaddr" = "yes" &&
- test "$tst_compi_gethostbyaddr" = "yes" &&
- test "$tst_allow_gethostbyaddr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETHOSTBYADDR 1
-_ACEOF
-
- ac_cv_func_gethostbyaddr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_gethostbyaddr="no"
- fi
-
-
- #
- tst_links_gethostbyaddr_r="unknown"
- tst_proto_gethostbyaddr_r="unknown"
- tst_compi_gethostbyaddr_r="unknown"
- tst_allow_gethostbyaddr_r="unknown"
- tst_nargs_gethostbyaddr_r="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r can be linked" >&5
-$as_echo_n "checking if gethostbyaddr_r can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define gethostbyaddr_r innocuous_gethostbyaddr_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef gethostbyaddr_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyaddr_r ();
-#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r
-choke me
-#endif
-
-int main (void)
-{
-return gethostbyaddr_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_gethostbyaddr_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_gethostbyaddr_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r is prototyped" >&5
-$as_echo_n "checking if gethostbyaddr_r is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_gethostbyaddr_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_gethostbyaddr_r="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_gethostbyaddr_r" = "yes"; then
- if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r takes 5 args." >&5
-$as_echo_n "checking if gethostbyaddr_r takes 5 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyaddr_r(0, 0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gethostbyaddr_r="yes"
- tst_nargs_gethostbyaddr_r="5"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r takes 7 args." >&5
-$as_echo_n "checking if gethostbyaddr_r takes 7 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gethostbyaddr_r="yes"
- tst_nargs_gethostbyaddr_r="7"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r takes 8 args." >&5
-$as_echo_n "checking if gethostbyaddr_r takes 8 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gethostbyaddr_r="yes"
- tst_nargs_gethostbyaddr_r="8"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r is compilable" >&5
-$as_echo_n "checking if gethostbyaddr_r is compilable... " >&6; }
- if test "$tst_compi_gethostbyaddr_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- #
- if test "$tst_compi_gethostbyaddr_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r usage allowed" >&5
-$as_echo_n "checking if gethostbyaddr_r usage allowed... " >&6; }
- if test "x$curl_disallow_gethostbyaddr_r" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_gethostbyaddr_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_gethostbyaddr_r="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r might be used" >&5
-$as_echo_n "checking if gethostbyaddr_r might be used... " >&6; }
- if test "$tst_links_gethostbyaddr_r" = "yes" &&
- test "$tst_proto_gethostbyaddr_r" = "yes" &&
- test "$tst_compi_gethostbyaddr_r" = "yes" &&
- test "$tst_allow_gethostbyaddr_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETHOSTBYADDR_R 1
-_ACEOF
-
- #
- if test "$tst_nargs_gethostbyaddr_r" -eq "5"; then
-
-$as_echo "#define HAVE_GETHOSTBYADDR_R_5 1" >>confdefs.h
-
- elif test "$tst_nargs_gethostbyaddr_r" -eq "7"; then
-
-$as_echo "#define HAVE_GETHOSTBYADDR_R_7 1" >>confdefs.h
-
- elif test "$tst_nargs_gethostbyaddr_r" -eq "8"; then
-
-$as_echo "#define HAVE_GETHOSTBYADDR_R_8 1" >>confdefs.h
-
- fi
- #
- ac_cv_func_gethostbyaddr_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_gethostbyaddr_r="no"
- fi
-
-
- #
- tst_links_gethostbyname="unknown"
- tst_proto_gethostbyname="unknown"
- tst_compi_gethostbyname="unknown"
- tst_allow_gethostbyname="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname can be linked" >&5
-$as_echo_n "checking if gethostbyname can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyname(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_gethostbyname="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_gethostbyname="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_gethostbyname" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname is prototyped" >&5
-$as_echo_n "checking if gethostbyname is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_winsock2
- $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gethostbyname" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_gethostbyname="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_gethostbyname="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_gethostbyname" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname is compilable" >&5
-$as_echo_n "checking if gethostbyname is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyname(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gethostbyname="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gethostbyname="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_gethostbyname" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname usage allowed" >&5
-$as_echo_n "checking if gethostbyname usage allowed... " >&6; }
- if test "x$curl_disallow_gethostbyname" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_gethostbyname="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_gethostbyname="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname might be used" >&5
-$as_echo_n "checking if gethostbyname might be used... " >&6; }
- if test "$tst_links_gethostbyname" = "yes" &&
- test "$tst_proto_gethostbyname" = "yes" &&
- test "$tst_compi_gethostbyname" = "yes" &&
- test "$tst_allow_gethostbyname" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETHOSTBYNAME 1
-_ACEOF
-
- ac_cv_func_gethostbyname="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_gethostbyname="no"
- fi
-
-
- #
- tst_links_gethostbyname_r="unknown"
- tst_proto_gethostbyname_r="unknown"
- tst_compi_gethostbyname_r="unknown"
- tst_allow_gethostbyname_r="unknown"
- tst_nargs_gethostbyname_r="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r can be linked" >&5
-$as_echo_n "checking if gethostbyname_r can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define gethostbyname_r innocuous_gethostbyname_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef gethostbyname_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname_r ();
-#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
-choke me
-#endif
-
-int main (void)
-{
-return gethostbyname_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_gethostbyname_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_gethostbyname_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_gethostbyname_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r is prototyped" >&5
-$as_echo_n "checking if gethostbyname_r is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gethostbyname_r" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_gethostbyname_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_gethostbyname_r="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_gethostbyname_r" = "yes"; then
- if test "$tst_nargs_gethostbyname_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r takes 3 args." >&5
-$as_echo_n "checking if gethostbyname_r takes 3 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyname_r(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gethostbyname_r="yes"
- tst_nargs_gethostbyname_r="3"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gethostbyname_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$tst_nargs_gethostbyname_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r takes 5 args." >&5
-$as_echo_n "checking if gethostbyname_r takes 5 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyname_r(0, 0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gethostbyname_r="yes"
- tst_nargs_gethostbyname_r="5"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gethostbyname_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$tst_nargs_gethostbyname_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r takes 6 args." >&5
-$as_echo_n "checking if gethostbyname_r takes 6 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != gethostbyname_r(0, 0, 0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gethostbyname_r="yes"
- tst_nargs_gethostbyname_r="6"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gethostbyname_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r is compilable" >&5
-$as_echo_n "checking if gethostbyname_r is compilable... " >&6; }
- if test "$tst_compi_gethostbyname_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- #
- if test "$tst_compi_gethostbyname_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r usage allowed" >&5
-$as_echo_n "checking if gethostbyname_r usage allowed... " >&6; }
- if test "x$curl_disallow_gethostbyname_r" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_gethostbyname_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_gethostbyname_r="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r might be used" >&5
-$as_echo_n "checking if gethostbyname_r might be used... " >&6; }
- if test "$tst_links_gethostbyname_r" = "yes" &&
- test "$tst_proto_gethostbyname_r" = "yes" &&
- test "$tst_compi_gethostbyname_r" = "yes" &&
- test "$tst_allow_gethostbyname_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETHOSTBYNAME_R 1
-_ACEOF
-
- #
- if test "$tst_nargs_gethostbyname_r" -eq "3"; then
-
-$as_echo "#define HAVE_GETHOSTBYNAME_R_3 1" >>confdefs.h
-
- elif test "$tst_nargs_gethostbyname_r" -eq "5"; then
-
-$as_echo "#define HAVE_GETHOSTBYNAME_R_5 1" >>confdefs.h
-
- elif test "$tst_nargs_gethostbyname_r" -eq "6"; then
-
-$as_echo "#define HAVE_GETHOSTBYNAME_R_6 1" >>confdefs.h
-
- fi
- #
- ac_cv_func_gethostbyname_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_gethostbyname_r="no"
- fi
-
-
- #
- tst_links_gethostname="unknown"
- tst_proto_gethostname="unknown"
- tst_compi_gethostname="unknown"
- tst_allow_gethostname="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname can be linked" >&5
-$as_echo_n "checking if gethostname can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_unistd
-
-int main (void)
-{
-
- if(0 != gethostname(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_gethostname="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_gethostname="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_gethostname" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname is prototyped" >&5
-$as_echo_n "checking if gethostname is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_winsock2
- $curl_includes_unistd
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gethostname" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_gethostname="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_gethostname="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_gethostname" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname is compilable" >&5
-$as_echo_n "checking if gethostname is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_unistd
-
-int main (void)
-{
-
- if(0 != gethostname(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gethostname="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gethostname="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_gethostname" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname usage allowed" >&5
-$as_echo_n "checking if gethostname usage allowed... " >&6; }
- if test "x$curl_disallow_gethostname" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_gethostname="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_gethostname="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname might be used" >&5
-$as_echo_n "checking if gethostname might be used... " >&6; }
- if test "$tst_links_gethostname" = "yes" &&
- test "$tst_proto_gethostname" = "yes" &&
- test "$tst_compi_gethostname" = "yes" &&
- test "$tst_allow_gethostname" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETHOSTNAME 1
-_ACEOF
-
- ac_cv_func_gethostname="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_gethostname="no"
- fi
-
-
- #
- tst_links_getifaddrs="unknown"
- tst_proto_getifaddrs="unknown"
- tst_compi_getifaddrs="unknown"
- tst_works_getifaddrs="unknown"
- tst_allow_getifaddrs="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs can be linked" >&5
-$as_echo_n "checking if getifaddrs can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define getifaddrs innocuous_getifaddrs
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef getifaddrs
-#ifdef __cplusplus
-extern "C"
-#endif
-char getifaddrs ();
-#if defined __stub_getifaddrs || defined __stub___getifaddrs
-choke me
-#endif
-
-int main (void)
-{
-return getifaddrs ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_getifaddrs="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_getifaddrs="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_getifaddrs" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs is prototyped" >&5
-$as_echo_n "checking if getifaddrs is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_ifaddrs
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "getifaddrs" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_getifaddrs="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_getifaddrs="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_getifaddrs" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs is compilable" >&5
-$as_echo_n "checking if getifaddrs is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_ifaddrs
-
-int main (void)
-{
-
- if(0 != getifaddrs(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_getifaddrs="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_getifaddrs="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$tst_compi_getifaddrs" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs seems to work" >&5
-$as_echo_n "checking if getifaddrs seems to work... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdlib
- $curl_includes_ifaddrs
-
-int main (void)
-{
-
- struct ifaddrs *ifa = 0;
- int error;
-
- error = getifaddrs(&ifa);
- if(error || !ifa)
- exit(1); /* fail */
- else
- exit(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_works_getifaddrs="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_works_getifaddrs="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- if test "$tst_compi_getifaddrs" = "yes" &&
- test "$tst_works_getifaddrs" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs usage allowed" >&5
-$as_echo_n "checking if getifaddrs usage allowed... " >&6; }
- if test "x$curl_disallow_getifaddrs" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_getifaddrs="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_getifaddrs="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs might be used" >&5
-$as_echo_n "checking if getifaddrs might be used... " >&6; }
- if test "$tst_links_getifaddrs" = "yes" &&
- test "$tst_proto_getifaddrs" = "yes" &&
- test "$tst_compi_getifaddrs" = "yes" &&
- test "$tst_allow_getifaddrs" = "yes" &&
- test "$tst_works_getifaddrs" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETIFADDRS 1
-_ACEOF
-
- ac_cv_func_getifaddrs="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_getifaddrs="no"
- fi
-
-
- #
- tst_links_getservbyport_r="unknown"
- tst_proto_getservbyport_r="unknown"
- tst_compi_getservbyport_r="unknown"
- tst_allow_getservbyport_r="unknown"
- tst_nargs_getservbyport_r="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r can be linked" >&5
-$as_echo_n "checking if getservbyport_r can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define getservbyport_r innocuous_getservbyport_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef getservbyport_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char getservbyport_r ();
-#if defined __stub_getservbyport_r || defined __stub___getservbyport_r
-choke me
-#endif
-
-int main (void)
-{
-return getservbyport_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_getservbyport_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_getservbyport_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r is prototyped" >&5
-$as_echo_n "checking if getservbyport_r is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "getservbyport_r" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_getservbyport_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_getservbyport_r="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_getservbyport_r" = "yes"; then
- if test "$tst_nargs_getservbyport_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r takes 4 args." >&5
-$as_echo_n "checking if getservbyport_r takes 4 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != getservbyport_r(0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_getservbyport_r="yes"
- tst_nargs_getservbyport_r="4"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$tst_nargs_getservbyport_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r takes 5 args." >&5
-$as_echo_n "checking if getservbyport_r takes 5 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != getservbyport_r(0, 0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_getservbyport_r="yes"
- tst_nargs_getservbyport_r="5"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$tst_nargs_getservbyport_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r takes 6 args." >&5
-$as_echo_n "checking if getservbyport_r takes 6 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_netdb
-
-int main (void)
-{
-
- if(0 != getservbyport_r(0, 0, 0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_getservbyport_r="yes"
- tst_nargs_getservbyport_r="6"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r is compilable" >&5
-$as_echo_n "checking if getservbyport_r is compilable... " >&6; }
- if test "$tst_compi_getservbyport_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- #
- if test "$tst_compi_getservbyport_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r usage allowed" >&5
-$as_echo_n "checking if getservbyport_r usage allowed... " >&6; }
- if test "x$curl_disallow_getservbyport_r" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_getservbyport_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_getservbyport_r="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r might be used" >&5
-$as_echo_n "checking if getservbyport_r might be used... " >&6; }
- if test "$tst_links_getservbyport_r" = "yes" &&
- test "$tst_proto_getservbyport_r" = "yes" &&
- test "$tst_compi_getservbyport_r" = "yes" &&
- test "$tst_allow_getservbyport_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETSERVBYPORT_R 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define GETSERVBYPORT_R_ARGS $tst_nargs_getservbyport_r
-_ACEOF
-
- if test "$tst_nargs_getservbyport_r" -eq "4"; then
-
-$as_echo "#define GETSERVBYPORT_R_BUFSIZE sizeof(struct servent_data)" >>confdefs.h
-
- else
-
-$as_echo "#define GETSERVBYPORT_R_BUFSIZE 4096" >>confdefs.h
-
- fi
- ac_cv_func_getservbyport_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_getservbyport_r="no"
- fi
-
-
-curl_includes_time="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-# endif
-#else
-# ifdef HAVE_TIME_H
-# include <time.h>
-# endif
-#endif
-/* includes end */"
- for ac_header in sys/types.h sys/time.h time.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_time
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_gmtime_r="unknown"
- tst_proto_gmtime_r="unknown"
- tst_compi_gmtime_r="unknown"
- tst_works_gmtime_r="unknown"
- tst_allow_gmtime_r="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r can be linked" >&5
-$as_echo_n "checking if gmtime_r can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define gmtime_r innocuous_gmtime_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef gmtime_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char gmtime_r ();
-#if defined __stub_gmtime_r || defined __stub___gmtime_r
-choke me
-#endif
-
-int main (void)
-{
-return gmtime_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_gmtime_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_gmtime_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_gmtime_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r is prototyped" >&5
-$as_echo_n "checking if gmtime_r is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_time
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "gmtime_r" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_gmtime_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_gmtime_r="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_gmtime_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r is compilable" >&5
-$as_echo_n "checking if gmtime_r is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_time
-
-int main (void)
-{
-
- if(0 != gmtime_r(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_gmtime_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_gmtime_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$tst_compi_gmtime_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r seems to work" >&5
-$as_echo_n "checking if gmtime_r seems to work... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdlib
- $curl_includes_time
-
-int main (void)
-{
-
- time_t local = 1170352587;
- struct tm *gmt = 0;
- struct tm result;
- gmt = gmtime_r(&local, &result);
- if(gmt)
- exit(0);
- else
- exit(1);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_works_gmtime_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_works_gmtime_r="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- if test "$tst_compi_gmtime_r" = "yes" &&
- test "$tst_works_gmtime_r" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r usage allowed" >&5
-$as_echo_n "checking if gmtime_r usage allowed... " >&6; }
- if test "x$curl_disallow_gmtime_r" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_gmtime_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_gmtime_r="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r might be used" >&5
-$as_echo_n "checking if gmtime_r might be used... " >&6; }
- if test "$tst_links_gmtime_r" = "yes" &&
- test "$tst_proto_gmtime_r" = "yes" &&
- test "$tst_compi_gmtime_r" = "yes" &&
- test "$tst_allow_gmtime_r" = "yes" &&
- test "$tst_works_gmtime_r" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GMTIME_R 1
-_ACEOF
-
- ac_cv_func_gmtime_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_gmtime_r="no"
- fi
-
-
-curl_includes_arpa_inet="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h sys/socket.h netinet/in.h arpa/inet.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_arpa_inet
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_inet_ntoa_r="unknown"
- tst_proto_inet_ntoa_r="unknown"
- tst_compi_inet_ntoa_r="unknown"
- tst_allow_inet_ntoa_r="unknown"
- tst_nargs_inet_ntoa_r="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r can be linked" >&5
-$as_echo_n "checking if inet_ntoa_r can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define inet_ntoa_r innocuous_inet_ntoa_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef inet_ntoa_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_ntoa_r ();
-#if defined __stub_inet_ntoa_r || defined __stub___inet_ntoa_r
-choke me
-#endif
-
-int main (void)
-{
-return inet_ntoa_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_inet_ntoa_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_inet_ntoa_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_inet_ntoa_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r is prototyped" >&5
-$as_echo_n "checking if inet_ntoa_r is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_arpa_inet
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "inet_ntoa_r" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_inet_ntoa_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_inet_ntoa_r="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_inet_ntoa_r" = "yes"; then
- if test "$tst_nargs_inet_ntoa_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r takes 2 args." >&5
-$as_echo_n "checking if inet_ntoa_r takes 2 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_arpa_inet
-
-int main (void)
-{
-
- struct in_addr addr;
- if(0 != inet_ntoa_r(addr, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_inet_ntoa_r="yes"
- tst_nargs_inet_ntoa_r="2"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_inet_ntoa_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$tst_nargs_inet_ntoa_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r takes 3 args." >&5
-$as_echo_n "checking if inet_ntoa_r takes 3 args.... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_arpa_inet
-
-int main (void)
-{
-
- struct in_addr addr;
- if(0 != inet_ntoa_r(addr, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_inet_ntoa_r="yes"
- tst_nargs_inet_ntoa_r="3"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_inet_ntoa_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r is compilable" >&5
-$as_echo_n "checking if inet_ntoa_r is compilable... " >&6; }
- if test "$tst_compi_inet_ntoa_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- #
- if test "$tst_compi_inet_ntoa_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r usage allowed" >&5
-$as_echo_n "checking if inet_ntoa_r usage allowed... " >&6; }
- if test "x$curl_disallow_inet_ntoa_r" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_inet_ntoa_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_inet_ntoa_r="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r might be used" >&5
-$as_echo_n "checking if inet_ntoa_r might be used... " >&6; }
- if test "$tst_links_inet_ntoa_r" = "yes" &&
- test "$tst_proto_inet_ntoa_r" = "yes" &&
- test "$tst_compi_inet_ntoa_r" = "yes" &&
- test "$tst_allow_inet_ntoa_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INET_NTOA_R 1
-_ACEOF
-
- #
- if test "$tst_nargs_inet_ntoa_r" -eq "2"; then
-
-$as_echo "#define HAVE_INET_NTOA_R_2 1" >>confdefs.h
-
- elif test "$tst_nargs_inet_ntoa_r" -eq "3"; then
-
-$as_echo "#define HAVE_INET_NTOA_R_3 1" >>confdefs.h
-
- fi
- #
- ac_cv_func_inet_ntoa_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_inet_ntoa_r="no"
- fi
-
-
- #
- tst_links_inet_ntop="unknown"
- tst_proto_inet_ntop="unknown"
- tst_compi_inet_ntop="unknown"
- tst_works_inet_ntop="unknown"
- tst_allow_inet_ntop="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop can be linked" >&5
-$as_echo_n "checking if inet_ntop can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define inet_ntop innocuous_inet_ntop
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef inet_ntop
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_ntop ();
-#if defined __stub_inet_ntop || defined __stub___inet_ntop
-choke me
-#endif
-
-int main (void)
-{
-return inet_ntop ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_inet_ntop="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_inet_ntop="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_inet_ntop" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop is prototyped" >&5
-$as_echo_n "checking if inet_ntop is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_arpa_inet
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "inet_ntop" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_inet_ntop="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_inet_ntop="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_inet_ntop" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop is compilable" >&5
-$as_echo_n "checking if inet_ntop is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_arpa_inet
-
-int main (void)
-{
-
- if(0 != inet_ntop(0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_inet_ntop="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_inet_ntop="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$tst_compi_inet_ntop" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop seems to work" >&5
-$as_echo_n "checking if inet_ntop seems to work... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdlib
- $curl_includes_arpa_inet
- $curl_includes_string
-
-int main (void)
-{
-
- char ipv6res[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
- char ipv4res[sizeof "255.255.255.255"];
- unsigned char ipv6a[26];
- unsigned char ipv4a[5];
- char *ipv6ptr = 0;
- char *ipv4ptr = 0;
- /* - */
- ipv4res[0] = '\0';
- ipv4a[0] = 0xc0;
- ipv4a[1] = 0xa8;
- ipv4a[2] = 0x64;
- ipv4a[3] = 0x01;
- ipv4a[4] = 0x01;
- /* - */
- ipv4ptr = inet_ntop(AF_INET, ipv4a, ipv4res, sizeof(ipv4res));
- if(!ipv4ptr)
- exit(1); /* fail */
- if(ipv4ptr != ipv4res)
- exit(1); /* fail */
- if(!ipv4ptr[0])
- exit(1); /* fail */
- if(memcmp(ipv4res, "192.168.100.1", 13) != 0)
- exit(1); /* fail */
- /* - */
- ipv6res[0] = '\0';
- memset(ipv6a, 0, sizeof(ipv6a));
- ipv6a[0] = 0xfe;
- ipv6a[1] = 0x80;
- ipv6a[8] = 0x02;
- ipv6a[9] = 0x14;
- ipv6a[10] = 0x4f;
- ipv6a[11] = 0xff;
- ipv6a[12] = 0xfe;
- ipv6a[13] = 0x0b;
- ipv6a[14] = 0x76;
- ipv6a[15] = 0xc8;
- ipv6a[25] = 0x01;
- /* - */
- ipv6ptr = inet_ntop(AF_INET6, ipv6a, ipv6res, sizeof(ipv6res));
- if(!ipv6ptr)
- exit(1); /* fail */
- if(ipv6ptr != ipv6res)
- exit(1); /* fail */
- if(!ipv6ptr[0])
- exit(1); /* fail */
- if(memcmp(ipv6res, "fe80::214:4fff:fe0b:76c8", 24) != 0)
- exit(1); /* fail */
- /* - */
- exit(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_works_inet_ntop="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_works_inet_ntop="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- if test "$tst_compi_inet_ntop" = "yes" &&
- test "$tst_works_inet_ntop" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop usage allowed" >&5
-$as_echo_n "checking if inet_ntop usage allowed... " >&6; }
- if test "x$curl_disallow_inet_ntop" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_inet_ntop="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_inet_ntop="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop might be used" >&5
-$as_echo_n "checking if inet_ntop might be used... " >&6; }
- if test "$tst_links_inet_ntop" = "yes" &&
- test "$tst_proto_inet_ntop" = "yes" &&
- test "$tst_compi_inet_ntop" = "yes" &&
- test "$tst_allow_inet_ntop" = "yes" &&
- test "$tst_works_inet_ntop" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INET_NTOP 1
-_ACEOF
-
- ac_cv_func_inet_ntop="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_inet_ntop="no"
- fi
-
-
- #
- tst_links_inet_pton="unknown"
- tst_proto_inet_pton="unknown"
- tst_compi_inet_pton="unknown"
- tst_works_inet_pton="unknown"
- tst_allow_inet_pton="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton can be linked" >&5
-$as_echo_n "checking if inet_pton can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define inet_pton innocuous_inet_pton
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef inet_pton
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_pton ();
-#if defined __stub_inet_pton || defined __stub___inet_pton
-choke me
-#endif
-
-int main (void)
-{
-return inet_pton ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_inet_pton="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_inet_pton="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_inet_pton" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton is prototyped" >&5
-$as_echo_n "checking if inet_pton is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_arpa_inet
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "inet_pton" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_inet_pton="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_inet_pton="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_inet_pton" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton is compilable" >&5
-$as_echo_n "checking if inet_pton is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_arpa_inet
-
-int main (void)
-{
-
- if(0 != inet_pton(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_inet_pton="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_inet_pton="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$tst_compi_inet_pton" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton seems to work" >&5
-$as_echo_n "checking if inet_pton seems to work... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdlib
- $curl_includes_arpa_inet
- $curl_includes_string
-
-int main (void)
-{
-
- unsigned char ipv6a[16+1];
- unsigned char ipv4a[4+1];
- const char *ipv6src = "fe80::214:4fff:fe0b:76c8";
- const char *ipv4src = "192.168.100.1";
- /* - */
- memset(ipv4a, 1, sizeof(ipv4a));
- if(1 != inet_pton(AF_INET, ipv4src, ipv4a))
- exit(1); /* fail */
- /* - */
- if( (ipv4a[0] != 0xc0) ||
- (ipv4a[1] != 0xa8) ||
- (ipv4a[2] != 0x64) ||
- (ipv4a[3] != 0x01) ||
- (ipv4a[4] != 0x01) )
- exit(1); /* fail */
- /* - */
- memset(ipv6a, 1, sizeof(ipv6a));
- if(1 != inet_pton(AF_INET6, ipv6src, ipv6a))
- exit(1); /* fail */
- /* - */
- if( (ipv6a[0] != 0xfe) ||
- (ipv6a[1] != 0x80) ||
- (ipv6a[8] != 0x02) ||
- (ipv6a[9] != 0x14) ||
- (ipv6a[10] != 0x4f) ||
- (ipv6a[11] != 0xff) ||
- (ipv6a[12] != 0xfe) ||
- (ipv6a[13] != 0x0b) ||
- (ipv6a[14] != 0x76) ||
- (ipv6a[15] != 0xc8) ||
- (ipv6a[16] != 0x01) )
- exit(1); /* fail */
- /* - */
- if( (ipv6a[2] != 0x0) ||
- (ipv6a[3] != 0x0) ||
- (ipv6a[4] != 0x0) ||
- (ipv6a[5] != 0x0) ||
- (ipv6a[6] != 0x0) ||
- (ipv6a[7] != 0x0) )
- exit(1); /* fail */
- /* - */
- exit(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_works_inet_pton="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_works_inet_pton="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- if test "$tst_compi_inet_pton" = "yes" &&
- test "$tst_works_inet_pton" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton usage allowed" >&5
-$as_echo_n "checking if inet_pton usage allowed... " >&6; }
- if test "x$curl_disallow_inet_pton" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_inet_pton="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_inet_pton="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton might be used" >&5
-$as_echo_n "checking if inet_pton might be used... " >&6; }
- if test "$tst_links_inet_pton" = "yes" &&
- test "$tst_proto_inet_pton" = "yes" &&
- test "$tst_compi_inet_pton" = "yes" &&
- test "$tst_allow_inet_pton" = "yes" &&
- test "$tst_works_inet_pton" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INET_PTON 1
-_ACEOF
-
- ac_cv_func_inet_pton="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_inet_pton="no"
- fi
-
-
-curl_includes_stropts="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-#ifdef HAVE_STROPTS_H
-# include <stropts.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h unistd.h sys/socket.h sys/ioctl.h stropts.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_stropts
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_ioctl="unknown"
- tst_proto_ioctl="unknown"
- tst_compi_ioctl="unknown"
- tst_allow_ioctl="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl can be linked" >&5
-$as_echo_n "checking if ioctl can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define ioctl innocuous_ioctl
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef ioctl
-#ifdef __cplusplus
-extern "C"
-#endif
-char ioctl ();
-#if defined __stub_ioctl || defined __stub___ioctl
-choke me
-#endif
-
-int main (void)
-{
-return ioctl ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_ioctl="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_ioctl="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_ioctl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl is prototyped" >&5
-$as_echo_n "checking if ioctl is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_stropts
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "ioctl" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_ioctl="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_ioctl="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_ioctl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl is compilable" >&5
-$as_echo_n "checking if ioctl is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stropts
-
-int main (void)
-{
-
- if(0 != ioctl(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_ioctl="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_ioctl="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_ioctl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl usage allowed" >&5
-$as_echo_n "checking if ioctl usage allowed... " >&6; }
- if test "x$curl_disallow_ioctl" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_ioctl="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_ioctl="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl might be used" >&5
-$as_echo_n "checking if ioctl might be used... " >&6; }
- if test "$tst_links_ioctl" = "yes" &&
- test "$tst_proto_ioctl" = "yes" &&
- test "$tst_compi_ioctl" = "yes" &&
- test "$tst_allow_ioctl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_IOCTL 1
-_ACEOF
-
- ac_cv_func_ioctl="yes"
-
- #
- tst_compi_ioctl_fionbio="unknown"
- tst_allow_ioctl_fionbio="unknown"
- #
- if test "$ac_cv_func_ioctl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO is compilable" >&5
-$as_echo_n "checking if ioctl FIONBIO is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stropts
-
-int main (void)
-{
-
- int flags = 0;
- if(0 != ioctl(0, FIONBIO, &flags))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_ioctl_fionbio="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_ioctl_fionbio="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_ioctl_fionbio" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO usage allowed" >&5
-$as_echo_n "checking if ioctl FIONBIO usage allowed... " >&6; }
- if test "x$curl_disallow_ioctl_fionbio" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_ioctl_fionbio="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_ioctl_fionbio="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO might be used" >&5
-$as_echo_n "checking if ioctl FIONBIO might be used... " >&6; }
- if test "$tst_compi_ioctl_fionbio" = "yes" &&
- test "$tst_allow_ioctl_fionbio" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_IOCTL_FIONBIO 1
-_ACEOF
-
- ac_cv_func_ioctl_fionbio="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_ioctl_fionbio="no"
- fi
-
-
- #
- tst_compi_ioctl_siocgifaddr="unknown"
- tst_allow_ioctl_siocgifaddr="unknown"
- #
- if test "$ac_cv_func_ioctl" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR is compilable" >&5
-$as_echo_n "checking if ioctl SIOCGIFADDR is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stropts
- #include <net/if.h>
-
-int main (void)
-{
-
- struct ifreq ifr;
- if(0 != ioctl(0, SIOCGIFADDR, &ifr))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_ioctl_siocgifaddr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_ioctl_siocgifaddr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_ioctl_siocgifaddr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR usage allowed" >&5
-$as_echo_n "checking if ioctl SIOCGIFADDR usage allowed... " >&6; }
- if test "x$curl_disallow_ioctl_siocgifaddr" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_ioctl_siocgifaddr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_ioctl_siocgifaddr="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR might be used" >&5
-$as_echo_n "checking if ioctl SIOCGIFADDR might be used... " >&6; }
- if test "$tst_compi_ioctl_siocgifaddr" = "yes" &&
- test "$tst_allow_ioctl_siocgifaddr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_IOCTL_SIOCGIFADDR 1
-_ACEOF
-
- ac_cv_func_ioctl_siocgifaddr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_ioctl_siocgifaddr="no"
- fi
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_ioctl="no"
- fi
-
-
- #
- tst_links_ioctlsocket="unknown"
- tst_proto_ioctlsocket="unknown"
- tst_compi_ioctlsocket="unknown"
- tst_allow_ioctlsocket="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket can be linked" >&5
-$as_echo_n "checking if ioctlsocket can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
-
-int main (void)
-{
-
- if(0 != ioctlsocket(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_ioctlsocket="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_ioctlsocket="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_ioctlsocket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket is prototyped" >&5
-$as_echo_n "checking if ioctlsocket is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_winsock2
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "ioctlsocket" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_ioctlsocket="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_ioctlsocket="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_ioctlsocket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket is compilable" >&5
-$as_echo_n "checking if ioctlsocket is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
-
-int main (void)
-{
-
- if(0 != ioctlsocket(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_ioctlsocket="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_ioctlsocket="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_ioctlsocket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket usage allowed" >&5
-$as_echo_n "checking if ioctlsocket usage allowed... " >&6; }
- if test "x$curl_disallow_ioctlsocket" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_ioctlsocket="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_ioctlsocket="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket might be used" >&5
-$as_echo_n "checking if ioctlsocket might be used... " >&6; }
- if test "$tst_links_ioctlsocket" = "yes" &&
- test "$tst_proto_ioctlsocket" = "yes" &&
- test "$tst_compi_ioctlsocket" = "yes" &&
- test "$tst_allow_ioctlsocket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_IOCTLSOCKET 1
-_ACEOF
-
- ac_cv_func_ioctlsocket="yes"
-
- #
- tst_compi_ioctlsocket_fionbio="unknown"
- tst_allow_ioctlsocket_fionbio="unknown"
- #
- if test "$ac_cv_func_ioctlsocket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO is compilable" >&5
-$as_echo_n "checking if ioctlsocket FIONBIO is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
-
-int main (void)
-{
-
- int flags = 0;
- if(0 != ioctlsocket(0, FIONBIO, &flags))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_ioctlsocket_fionbio="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_ioctlsocket_fionbio="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_ioctlsocket_fionbio" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO usage allowed" >&5
-$as_echo_n "checking if ioctlsocket FIONBIO usage allowed... " >&6; }
- if test "x$curl_disallow_ioctlsocket_fionbio" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_ioctlsocket_fionbio="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_ioctlsocket_fionbio="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO might be used" >&5
-$as_echo_n "checking if ioctlsocket FIONBIO might be used... " >&6; }
- if test "$tst_compi_ioctlsocket_fionbio" = "yes" &&
- test "$tst_allow_ioctlsocket_fionbio" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_IOCTLSOCKET_FIONBIO 1
-_ACEOF
-
- ac_cv_func_ioctlsocket_fionbio="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_ioctlsocket_fionbio="no"
- fi
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_ioctlsocket="no"
- fi
-
-
- #
- tst_links_ioctlsocket_camel="unknown"
- tst_proto_ioctlsocket_camel="unknown"
- tst_compi_ioctlsocket_camel="unknown"
- tst_allow_ioctlsocket_camel="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket can be linked" >&5
-$as_echo_n "checking if IoctlSocket can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define IoctlSocket innocuous_IoctlSocket
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef IoctlSocket
-#ifdef __cplusplus
-extern "C"
-#endif
-char IoctlSocket ();
-#if defined __stub_IoctlSocket || defined __stub___IoctlSocket
-choke me
-#endif
-
-int main (void)
-{
-return IoctlSocket ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_ioctlsocket_camel="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_ioctlsocket_camel="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_ioctlsocket_camel" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket is prototyped" >&5
-$as_echo_n "checking if IoctlSocket is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_stropts
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "IoctlSocket" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_ioctlsocket_camel="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_ioctlsocket_camel="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_ioctlsocket_camel" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket is compilable" >&5
-$as_echo_n "checking if IoctlSocket is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stropts
-
-int main (void)
-{
-
- if(0 != IoctlSocket(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_ioctlsocket_camel="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_ioctlsocket_camel="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_ioctlsocket_camel" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket usage allowed" >&5
-$as_echo_n "checking if IoctlSocket usage allowed... " >&6; }
- if test "x$curl_disallow_ioctlsocket_camel" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_ioctlsocket_camel="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_ioctlsocket_camel="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket might be used" >&5
-$as_echo_n "checking if IoctlSocket might be used... " >&6; }
- if test "$tst_links_ioctlsocket_camel" = "yes" &&
- test "$tst_proto_ioctlsocket_camel" = "yes" &&
- test "$tst_compi_ioctlsocket_camel" = "yes" &&
- test "$tst_allow_ioctlsocket_camel" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_IOCTLSOCKET_CAMEL 1
-_ACEOF
-
- ac_cv_func_ioctlsocket_camel="yes"
-
- #
- tst_compi_ioctlsocket_camel_fionbio="unknown"
- tst_allow_ioctlsocket_camel_fionbio="unknown"
- #
- if test "$ac_cv_func_ioctlsocket_camel" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO is compilable" >&5
-$as_echo_n "checking if IoctlSocket FIONBIO is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stropts
-
-int main (void)
-{
-
- long flags = 0;
- if(0 != ioctlsocket(0, FIONBIO, &flags))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_ioctlsocket_camel_fionbio="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_ioctlsocket_camel_fionbio="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_ioctlsocket_camel_fionbio" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO usage allowed" >&5
-$as_echo_n "checking if IoctlSocket FIONBIO usage allowed... " >&6; }
- if test "x$curl_disallow_ioctlsocket_camel_fionbio" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_ioctlsocket_camel_fionbio="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_ioctlsocket_camel_fionbio="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO might be used" >&5
-$as_echo_n "checking if IoctlSocket FIONBIO might be used... " >&6; }
- if test "$tst_compi_ioctlsocket_camel_fionbio" = "yes" &&
- test "$tst_allow_ioctlsocket_camel_fionbio" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1
-_ACEOF
-
- ac_cv_func_ioctlsocket_camel_fionbio="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_ioctlsocket_camel_fionbio="no"
- fi
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_ioctlsocket_camel="no"
- fi
-
-
- #
- tst_links_localtime_r="unknown"
- tst_proto_localtime_r="unknown"
- tst_compi_localtime_r="unknown"
- tst_works_localtime_r="unknown"
- tst_allow_localtime_r="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r can be linked" >&5
-$as_echo_n "checking if localtime_r can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define localtime_r innocuous_localtime_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef localtime_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char localtime_r ();
-#if defined __stub_localtime_r || defined __stub___localtime_r
-choke me
-#endif
-
-int main (void)
-{
-return localtime_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_localtime_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_localtime_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_localtime_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r is prototyped" >&5
-$as_echo_n "checking if localtime_r is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_time
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "localtime_r" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_localtime_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_localtime_r="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_localtime_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r is compilable" >&5
-$as_echo_n "checking if localtime_r is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_time
-
-int main (void)
-{
-
- if(0 != localtime_r(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_localtime_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_localtime_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$tst_compi_localtime_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r seems to work" >&5
-$as_echo_n "checking if localtime_r seems to work... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdlib
- $curl_includes_time
-
-int main (void)
-{
-
- time_t clock = 1170352587;
- struct tm *tmp = 0;
- struct tm result;
- tmp = localtime_r(&clock, &result);
- if(tmp)
- exit(0);
- else
- exit(1);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_works_localtime_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_works_localtime_r="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- if test "$tst_compi_localtime_r" = "yes" &&
- test "$tst_works_localtime_r" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r usage allowed" >&5
-$as_echo_n "checking if localtime_r usage allowed... " >&6; }
- if test "x$curl_disallow_localtime_r" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_localtime_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_localtime_r="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r might be used" >&5
-$as_echo_n "checking if localtime_r might be used... " >&6; }
- if test "$tst_links_localtime_r" = "yes" &&
- test "$tst_proto_localtime_r" = "yes" &&
- test "$tst_compi_localtime_r" = "yes" &&
- test "$tst_allow_localtime_r" = "yes" &&
- test "$tst_works_localtime_r" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LOCALTIME_R 1
-_ACEOF
-
- ac_cv_func_localtime_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_localtime_r="no"
- fi
-
-
- #
- tst_links_memrchr="unknown"
- tst_macro_memrchr="unknown"
- tst_proto_memrchr="unknown"
- tst_compi_memrchr="unknown"
- tst_allow_memrchr="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr can be linked" >&5
-$as_echo_n "checking if memrchr can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define memrchr innocuous_memrchr
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef memrchr
-#ifdef __cplusplus
-extern "C"
-#endif
-char memrchr ();
-#if defined __stub_memrchr || defined __stub___memrchr
-choke me
-#endif
-
-int main (void)
-{
-return memrchr ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_memrchr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_memrchr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_memrchr" = "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr seems a macro" >&5
-$as_echo_n "checking if memrchr seems a macro... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != memrchr(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_macro_memrchr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_macro_memrchr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- #
- if test "$tst_links_memrchr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr is prototyped" >&5
-$as_echo_n "checking if memrchr is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memrchr" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_memrchr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_memrchr="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_memrchr" = "yes" ||
- test "$tst_macro_memrchr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr is compilable" >&5
-$as_echo_n "checking if memrchr is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != memrchr(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_memrchr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_memrchr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_memrchr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr usage allowed" >&5
-$as_echo_n "checking if memrchr usage allowed... " >&6; }
- if test "x$curl_disallow_memrchr" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_memrchr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_memrchr="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr might be used" >&5
-$as_echo_n "checking if memrchr might be used... " >&6; }
- if (test "$tst_proto_memrchr" = "yes" ||
- test "$tst_macro_memrchr" = "yes") &&
- test "$tst_compi_memrchr" = "yes" &&
- test "$tst_allow_memrchr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_MEMRCHR 1
-_ACEOF
-
- ac_cv_func_memrchr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_memrchr="no"
- fi
-
-
-curl_includes_poll="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_POLL_H
-# include <poll.h>
-#endif
-#ifdef HAVE_SYS_POLL_H
-# include <sys/poll.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h poll.h sys/poll.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_poll
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_poll="unknown"
- tst_proto_poll="unknown"
- tst_compi_poll="unknown"
- tst_works_poll="unknown"
- tst_allow_poll="unknown"
- #
- case $host_os in
- darwin*|interix*)
- curl_disallow_poll="yes"
- ;;
- esac
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll can be linked" >&5
-$as_echo_n "checking if poll can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_poll
-
-int main (void)
-{
-
- if(0 != poll(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_poll="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_poll="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_poll" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll is prototyped" >&5
-$as_echo_n "checking if poll is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_poll
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "poll" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_poll="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_poll="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_poll" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll is compilable" >&5
-$as_echo_n "checking if poll is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_poll
-
-int main (void)
-{
-
- if(0 != poll(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_poll="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_poll="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$tst_compi_poll" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll seems to work" >&5
-$as_echo_n "checking if poll seems to work... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdlib
- $curl_includes_poll
-
-int main (void)
-{
-
- if(0 != poll(0, 0, 10))
- exit(1); /* fail */
- else
- exit(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_works_poll="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_works_poll="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- if test "$tst_compi_poll" = "yes" &&
- test "$tst_works_poll" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll usage allowed" >&5
-$as_echo_n "checking if poll usage allowed... " >&6; }
- if test "x$curl_disallow_poll" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_poll="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_poll="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll might be used" >&5
-$as_echo_n "checking if poll might be used... " >&6; }
- if test "$tst_links_poll" = "yes" &&
- test "$tst_proto_poll" = "yes" &&
- test "$tst_compi_poll" = "yes" &&
- test "$tst_allow_poll" = "yes" &&
- test "$tst_works_poll" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_POLL 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_POLL_FINE 1
-_ACEOF
-
- ac_cv_func_poll="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_poll="no"
- fi
-
-
- #
- tst_links_setsockopt="unknown"
- tst_proto_setsockopt="unknown"
- tst_compi_setsockopt="unknown"
- tst_allow_setsockopt="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt can be linked" >&5
-$as_echo_n "checking if setsockopt can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
-
-int main (void)
-{
-
- if(0 != setsockopt(0, 0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_setsockopt="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_setsockopt="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_setsockopt" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt is prototyped" >&5
-$as_echo_n "checking if setsockopt is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "setsockopt" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_setsockopt="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_setsockopt="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_setsockopt" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt is compilable" >&5
-$as_echo_n "checking if setsockopt is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
-
-int main (void)
-{
-
- if(0 != setsockopt(0, 0, 0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_setsockopt="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_setsockopt="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_setsockopt" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt usage allowed" >&5
-$as_echo_n "checking if setsockopt usage allowed... " >&6; }
- if test "x$curl_disallow_setsockopt" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_setsockopt="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_setsockopt="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt might be used" >&5
-$as_echo_n "checking if setsockopt might be used... " >&6; }
- if test "$tst_links_setsockopt" = "yes" &&
- test "$tst_proto_setsockopt" = "yes" &&
- test "$tst_compi_setsockopt" = "yes" &&
- test "$tst_allow_setsockopt" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SETSOCKOPT 1
-_ACEOF
-
- ac_cv_func_setsockopt="yes"
-
- #
- tst_compi_setsockopt_so_nonblock="unknown"
- tst_allow_setsockopt_so_nonblock="unknown"
- #
- if test "$ac_cv_func_setsockopt" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK is compilable" >&5
-$as_echo_n "checking if setsockopt SO_NONBLOCK is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
-
-int main (void)
-{
-
- if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_setsockopt_so_nonblock="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_setsockopt_so_nonblock="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_setsockopt_so_nonblock" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK usage allowed" >&5
-$as_echo_n "checking if setsockopt SO_NONBLOCK usage allowed... " >&6; }
- if test "x$curl_disallow_setsockopt_so_nonblock" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_setsockopt_so_nonblock="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_setsockopt_so_nonblock="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK might be used" >&5
-$as_echo_n "checking if setsockopt SO_NONBLOCK might be used... " >&6; }
- if test "$tst_compi_setsockopt_so_nonblock" = "yes" &&
- test "$tst_allow_setsockopt_so_nonblock" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SETSOCKOPT_SO_NONBLOCK 1
-_ACEOF
-
- ac_cv_func_setsockopt_so_nonblock="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_setsockopt_so_nonblock="no"
- fi
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_setsockopt="no"
- fi
-
-
-curl_includes_signal="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h signal.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_signal
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_sigaction="unknown"
- tst_proto_sigaction="unknown"
- tst_compi_sigaction="unknown"
- tst_allow_sigaction="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction can be linked" >&5
-$as_echo_n "checking if sigaction can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define sigaction innocuous_sigaction
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef sigaction
-#ifdef __cplusplus
-extern "C"
-#endif
-char sigaction ();
-#if defined __stub_sigaction || defined __stub___sigaction
-choke me
-#endif
-
-int main (void)
-{
-return sigaction ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_sigaction="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_sigaction="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_sigaction" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction is prototyped" >&5
-$as_echo_n "checking if sigaction is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_signal
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "sigaction" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_sigaction="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_sigaction="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_sigaction" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction is compilable" >&5
-$as_echo_n "checking if sigaction is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_signal
-
-int main (void)
-{
-
- if(0 != sigaction(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_sigaction="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_sigaction="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_sigaction" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction usage allowed" >&5
-$as_echo_n "checking if sigaction usage allowed... " >&6; }
- if test "x$curl_disallow_sigaction" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_sigaction="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_sigaction="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction might be used" >&5
-$as_echo_n "checking if sigaction might be used... " >&6; }
- if test "$tst_links_sigaction" = "yes" &&
- test "$tst_proto_sigaction" = "yes" &&
- test "$tst_compi_sigaction" = "yes" &&
- test "$tst_allow_sigaction" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGACTION 1
-_ACEOF
-
- ac_cv_func_sigaction="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_sigaction="no"
- fi
-
-
- #
- tst_links_siginterrupt="unknown"
- tst_proto_siginterrupt="unknown"
- tst_compi_siginterrupt="unknown"
- tst_allow_siginterrupt="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt can be linked" >&5
-$as_echo_n "checking if siginterrupt can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define siginterrupt innocuous_siginterrupt
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef siginterrupt
-#ifdef __cplusplus
-extern "C"
-#endif
-char siginterrupt ();
-#if defined __stub_siginterrupt || defined __stub___siginterrupt
-choke me
-#endif
-
-int main (void)
-{
-return siginterrupt ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_siginterrupt="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_siginterrupt="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_siginterrupt" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt is prototyped" >&5
-$as_echo_n "checking if siginterrupt is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_signal
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "siginterrupt" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_siginterrupt="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_siginterrupt="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_siginterrupt" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt is compilable" >&5
-$as_echo_n "checking if siginterrupt is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_signal
-
-int main (void)
-{
-
- if(0 != siginterrupt(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_siginterrupt="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_siginterrupt="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_siginterrupt" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt usage allowed" >&5
-$as_echo_n "checking if siginterrupt usage allowed... " >&6; }
- if test "x$curl_disallow_siginterrupt" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_siginterrupt="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_siginterrupt="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt might be used" >&5
-$as_echo_n "checking if siginterrupt might be used... " >&6; }
- if test "$tst_links_siginterrupt" = "yes" &&
- test "$tst_proto_siginterrupt" = "yes" &&
- test "$tst_compi_siginterrupt" = "yes" &&
- test "$tst_allow_siginterrupt" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGINTERRUPT 1
-_ACEOF
-
- ac_cv_func_siginterrupt="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_siginterrupt="no"
- fi
-
-
- #
- tst_links_signal="unknown"
- tst_proto_signal="unknown"
- tst_compi_signal="unknown"
- tst_allow_signal="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal can be linked" >&5
-$as_echo_n "checking if signal can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define signal innocuous_signal
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef signal
-#ifdef __cplusplus
-extern "C"
-#endif
-char signal ();
-#if defined __stub_signal || defined __stub___signal
-choke me
-#endif
-
-int main (void)
-{
-return signal ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_signal="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_signal="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_signal" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal is prototyped" >&5
-$as_echo_n "checking if signal is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_signal
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "signal" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_signal="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_signal="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_signal" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal is compilable" >&5
-$as_echo_n "checking if signal is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_signal
-
-int main (void)
-{
-
- if(0 != signal(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_signal="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_signal="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_signal" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal usage allowed" >&5
-$as_echo_n "checking if signal usage allowed... " >&6; }
- if test "x$curl_disallow_signal" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_signal="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_signal="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal might be used" >&5
-$as_echo_n "checking if signal might be used... " >&6; }
- if test "$tst_links_signal" = "yes" &&
- test "$tst_proto_signal" = "yes" &&
- test "$tst_compi_signal" = "yes" &&
- test "$tst_allow_signal" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGNAL 1
-_ACEOF
-
- ac_cv_func_signal="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_signal="no"
- fi
-
-
-curl_includes_setjmp="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SETJMP_H
-# include <setjmp.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h setjmp.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_setjmp
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_sigsetjmp="unknown"
- tst_macro_sigsetjmp="unknown"
- tst_proto_sigsetjmp="unknown"
- tst_compi_sigsetjmp="unknown"
- tst_allow_sigsetjmp="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp can be linked" >&5
-$as_echo_n "checking if sigsetjmp can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define sigsetjmp innocuous_sigsetjmp
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef sigsetjmp
-#ifdef __cplusplus
-extern "C"
-#endif
-char sigsetjmp ();
-#if defined __stub_sigsetjmp || defined __stub___sigsetjmp
-choke me
-#endif
-
-int main (void)
-{
-return sigsetjmp ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_sigsetjmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_sigsetjmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_sigsetjmp" = "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp seems a macro" >&5
-$as_echo_n "checking if sigsetjmp seems a macro... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_setjmp
-
-int main (void)
-{
-
- sigjmp_buf env;
- if(0 != sigsetjmp(env, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_macro_sigsetjmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_macro_sigsetjmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- #
- if test "$tst_links_sigsetjmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp is prototyped" >&5
-$as_echo_n "checking if sigsetjmp is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_setjmp
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "sigsetjmp" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_sigsetjmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_sigsetjmp="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_sigsetjmp" = "yes" ||
- test "$tst_macro_sigsetjmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp is compilable" >&5
-$as_echo_n "checking if sigsetjmp is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_setjmp
-
-int main (void)
-{
-
- sigjmp_buf env;
- if(0 != sigsetjmp(env, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_sigsetjmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_sigsetjmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_sigsetjmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp usage allowed" >&5
-$as_echo_n "checking if sigsetjmp usage allowed... " >&6; }
- if test "x$curl_disallow_sigsetjmp" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_sigsetjmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_sigsetjmp="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp might be used" >&5
-$as_echo_n "checking if sigsetjmp might be used... " >&6; }
- if (test "$tst_proto_sigsetjmp" = "yes" ||
- test "$tst_macro_sigsetjmp" = "yes") &&
- test "$tst_compi_sigsetjmp" = "yes" &&
- test "$tst_allow_sigsetjmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGSETJMP 1
-_ACEOF
-
- ac_cv_func_sigsetjmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_sigsetjmp="no"
- fi
-
-
- #
- tst_links_socket="unknown"
- tst_proto_socket="unknown"
- tst_compi_socket="unknown"
- tst_allow_socket="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket can be linked" >&5
-$as_echo_n "checking if socket can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
- $curl_includes_socket
-
-int main (void)
-{
-
- if(0 != socket(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_socket="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_socket="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_socket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket is prototyped" >&5
-$as_echo_n "checking if socket is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
- $curl_includes_socket
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "socket" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_socket="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_socket="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_socket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket is compilable" >&5
-$as_echo_n "checking if socket is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_winsock2
- $curl_includes_sys_socket
- $curl_includes_socket
-
-int main (void)
-{
-
- if(0 != socket(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_socket="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_socket="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_socket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket usage allowed" >&5
-$as_echo_n "checking if socket usage allowed... " >&6; }
- if test "x$curl_disallow_socket" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_socket="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_socket="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket might be used" >&5
-$as_echo_n "checking if socket might be used... " >&6; }
- if test "$tst_links_socket" = "yes" &&
- test "$tst_proto_socket" = "yes" &&
- test "$tst_compi_socket" = "yes" &&
- test "$tst_allow_socket" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SOCKET 1
-_ACEOF
-
- ac_cv_func_socket="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_socket="no"
- fi
-
-
- #
- tst_links_strcasecmp="unknown"
- tst_proto_strcasecmp="unknown"
- tst_compi_strcasecmp="unknown"
- tst_allow_strcasecmp="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp can be linked" >&5
-$as_echo_n "checking if strcasecmp can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strcasecmp innocuous_strcasecmp
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strcasecmp
-#ifdef __cplusplus
-extern "C"
-#endif
-char strcasecmp ();
-#if defined __stub_strcasecmp || defined __stub___strcasecmp
-choke me
-#endif
-
-int main (void)
-{
-return strcasecmp ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strcasecmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strcasecmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strcasecmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is prototyped" >&5
-$as_echo_n "checking if strcasecmp is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strcasecmp" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strcasecmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strcasecmp="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strcasecmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is compilable" >&5
-$as_echo_n "checking if strcasecmp is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strcasecmp(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strcasecmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strcasecmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strcasecmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp usage allowed" >&5
-$as_echo_n "checking if strcasecmp usage allowed... " >&6; }
- if test "x$curl_disallow_strcasecmp" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strcasecmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strcasecmp="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp might be used" >&5
-$as_echo_n "checking if strcasecmp might be used... " >&6; }
- if test "$tst_links_strcasecmp" = "yes" &&
- test "$tst_proto_strcasecmp" = "yes" &&
- test "$tst_compi_strcasecmp" = "yes" &&
- test "$tst_allow_strcasecmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRCASECMP 1
-_ACEOF
-
- ac_cv_func_strcasecmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strcasecmp="no"
- fi
-
-
- #
- tst_links_strcasestr="unknown"
- tst_proto_strcasestr="unknown"
- tst_compi_strcasestr="unknown"
- tst_allow_strcasestr="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr can be linked" >&5
-$as_echo_n "checking if strcasestr can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strcasestr innocuous_strcasestr
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strcasestr
-#ifdef __cplusplus
-extern "C"
-#endif
-char strcasestr ();
-#if defined __stub_strcasestr || defined __stub___strcasestr
-choke me
-#endif
-
-int main (void)
-{
-return strcasestr ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strcasestr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strcasestr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strcasestr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr is prototyped" >&5
-$as_echo_n "checking if strcasestr is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strcasestr" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strcasestr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strcasestr="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strcasestr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr is compilable" >&5
-$as_echo_n "checking if strcasestr is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strcasestr(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strcasestr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strcasestr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strcasestr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr usage allowed" >&5
-$as_echo_n "checking if strcasestr usage allowed... " >&6; }
- if test "x$curl_disallow_strcasestr" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strcasestr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strcasestr="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr might be used" >&5
-$as_echo_n "checking if strcasestr might be used... " >&6; }
- if test "$tst_links_strcasestr" = "yes" &&
- test "$tst_proto_strcasestr" = "yes" &&
- test "$tst_compi_strcasestr" = "yes" &&
- test "$tst_allow_strcasestr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRCASESTR 1
-_ACEOF
-
- ac_cv_func_strcasestr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strcasestr="no"
- fi
-
-
- #
- tst_links_strcmpi="unknown"
- tst_proto_strcmpi="unknown"
- tst_compi_strcmpi="unknown"
- tst_allow_strcmpi="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi can be linked" >&5
-$as_echo_n "checking if strcmpi can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strcmpi innocuous_strcmpi
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strcmpi
-#ifdef __cplusplus
-extern "C"
-#endif
-char strcmpi ();
-#if defined __stub_strcmpi || defined __stub___strcmpi
-choke me
-#endif
-
-int main (void)
-{
-return strcmpi ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strcmpi="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strcmpi="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strcmpi" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi is prototyped" >&5
-$as_echo_n "checking if strcmpi is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strcmpi" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strcmpi="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strcmpi="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strcmpi" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi is compilable" >&5
-$as_echo_n "checking if strcmpi is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strcmpi(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strcmpi="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strcmpi="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strcmpi" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi usage allowed" >&5
-$as_echo_n "checking if strcmpi usage allowed... " >&6; }
- if test "x$curl_disallow_strcmpi" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strcmpi="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strcmpi="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi might be used" >&5
-$as_echo_n "checking if strcmpi might be used... " >&6; }
- if test "$tst_links_strcmpi" = "yes" &&
- test "$tst_proto_strcmpi" = "yes" &&
- test "$tst_compi_strcmpi" = "yes" &&
- test "$tst_allow_strcmpi" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRCMPI 1
-_ACEOF
-
- ac_cv_func_strcmpi="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strcmpi="no"
- fi
-
-
- #
- tst_links_strdup="unknown"
- tst_proto_strdup="unknown"
- tst_compi_strdup="unknown"
- tst_allow_strdup="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup can be linked" >&5
-$as_echo_n "checking if strdup can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strdup innocuous_strdup
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strdup
-#ifdef __cplusplus
-extern "C"
-#endif
-char strdup ();
-#if defined __stub_strdup || defined __stub___strdup
-choke me
-#endif
-
-int main (void)
-{
-return strdup ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strdup="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strdup="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strdup" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup is prototyped" >&5
-$as_echo_n "checking if strdup is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strdup" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strdup="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strdup="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strdup" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup is compilable" >&5
-$as_echo_n "checking if strdup is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strdup(0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strdup="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strdup="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strdup" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup usage allowed" >&5
-$as_echo_n "checking if strdup usage allowed... " >&6; }
- if test "x$curl_disallow_strdup" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strdup="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strdup="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup might be used" >&5
-$as_echo_n "checking if strdup might be used... " >&6; }
- if test "$tst_links_strdup" = "yes" &&
- test "$tst_proto_strdup" = "yes" &&
- test "$tst_compi_strdup" = "yes" &&
- test "$tst_allow_strdup" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRDUP 1
-_ACEOF
-
- ac_cv_func_strdup="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strdup="no"
- fi
-
-
- #
- tst_links_strerror_r="unknown"
- tst_proto_strerror_r="unknown"
- tst_compi_strerror_r="unknown"
- tst_glibc_strerror_r="unknown"
- tst_posix_strerror_r="unknown"
- tst_allow_strerror_r="unknown"
- tst_works_glibc_strerror_r="unknown"
- tst_works_posix_strerror_r="unknown"
- tst_glibc_strerror_r_type_arg3="unknown"
- tst_posix_strerror_r_type_arg3="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r can be linked" >&5
-$as_echo_n "checking if strerror_r can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strerror_r innocuous_strerror_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strerror_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char strerror_r ();
-#if defined __stub_strerror_r || defined __stub___strerror_r
-choke me
-#endif
-
-int main (void)
-{
-return strerror_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strerror_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strerror_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strerror_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r is prototyped" >&5
-$as_echo_n "checking if strerror_r is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strerror_r" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strerror_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strerror_r="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strerror_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r is compilable" >&5
-$as_echo_n "checking if strerror_r is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strerror_r(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strerror_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strerror_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strerror_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r is glibc like" >&5
-$as_echo_n "checking if strerror_r is glibc like... " >&6; }
- tst_glibc_strerror_r_type_arg3="unknown"
- for arg3 in 'size_t' 'int' 'unsigned int'; do
- if test "$tst_glibc_strerror_r_type_arg3" = "unknown"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- char *strerror_r(int errnum, char *workbuf, $arg3 bufsize);
- if(0 != strerror_r(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tst_glibc_strerror_r_type_arg3="$arg3"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- case "$tst_glibc_strerror_r_type_arg3" in
- unknown)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_glibc_strerror_r="no"
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_glibc_strerror_r="yes"
- ;;
- esac
- fi
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$tst_glibc_strerror_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r seems to work" >&5
-$as_echo_n "checking if strerror_r seems to work... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdlib
- $curl_includes_string
-# include <errno.h>
-
-int main (void)
-{
-
- char buffer[1024];
- char *string = 0;
- buffer[0] = '\0';
- string = strerror_r(EACCES, buffer, sizeof(buffer));
- if(!string)
- exit(1); /* fail */
- if(!string[0])
- exit(1); /* fail */
- else
- exit(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_works_glibc_strerror_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_works_glibc_strerror_r="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- if test "$tst_compi_strerror_r" = "yes" &&
- test "$tst_works_glibc_strerror_r" != "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r is POSIX like" >&5
-$as_echo_n "checking if strerror_r is POSIX like... " >&6; }
- tst_posix_strerror_r_type_arg3="unknown"
- for arg3 in 'size_t' 'int' 'unsigned int'; do
- if test "$tst_posix_strerror_r_type_arg3" = "unknown"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- int strerror_r(int errnum, char *resultbuf, $arg3 bufsize);
- if(0 != strerror_r(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- tst_posix_strerror_r_type_arg3="$arg3"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- case "$tst_posix_strerror_r_type_arg3" in
- unknown)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_posix_strerror_r="no"
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_posix_strerror_r="yes"
- ;;
- esac
- fi
- #
- if test "x$cross_compiling" != "xyes" &&
- test "$tst_posix_strerror_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r seems to work" >&5
-$as_echo_n "checking if strerror_r seems to work... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdlib
- $curl_includes_string
-# include <errno.h>
-
-int main (void)
-{
-
- char buffer[1024];
- int error = 1;
- buffer[0] = '\0';
- error = strerror_r(EACCES, buffer, sizeof(buffer));
- if(error)
- exit(1); /* fail */
- if(buffer[0] == '\0')
- exit(1); /* fail */
- else
- exit(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_works_posix_strerror_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_works_posix_strerror_r="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
- #
- if test "$tst_works_glibc_strerror_r" = "yes"; then
- tst_posix_strerror_r="no"
- fi
- if test "$tst_works_posix_strerror_r" = "yes"; then
- tst_glibc_strerror_r="no"
- fi
- if test "$tst_glibc_strerror_r" = "yes" &&
- test "$tst_works_glibc_strerror_r" != "no" &&
- test "$tst_posix_strerror_r" != "yes"; then
- tst_allow_strerror_r="check"
- fi
- if test "$tst_posix_strerror_r" = "yes" &&
- test "$tst_works_posix_strerror_r" != "no" &&
- test "$tst_glibc_strerror_r" != "yes"; then
- tst_allow_strerror_r="check"
- fi
- if test "$tst_allow_strerror_r" = "check"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r usage allowed" >&5
-$as_echo_n "checking if strerror_r usage allowed... " >&6; }
- if test "x$curl_disallow_strerror_r" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strerror_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strerror_r="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r might be used" >&5
-$as_echo_n "checking if strerror_r might be used... " >&6; }
- if test "$tst_links_strerror_r" = "yes" &&
- test "$tst_proto_strerror_r" = "yes" &&
- test "$tst_compi_strerror_r" = "yes" &&
- test "$tst_allow_strerror_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- if test "$tst_glibc_strerror_r" = "yes"; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRERROR_R 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GLIBC_STRERROR_R 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define STRERROR_R_TYPE_ARG3 $tst_glibc_strerror_r_type_arg3
-_ACEOF
-
- fi
- if test "$tst_posix_strerror_r" = "yes"; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRERROR_R 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_POSIX_STRERROR_R 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define STRERROR_R_TYPE_ARG3 $tst_posix_strerror_r_type_arg3
-_ACEOF
-
- fi
- ac_cv_func_strerror_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strerror_r="no"
- fi
- #
- if test "$tst_compi_strerror_r" = "yes" &&
- test "$tst_allow_strerror_r" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine strerror_r() style: edit lib/curl_config.h manually." >&5
-$as_echo "$as_me: WARNING: cannot determine strerror_r() style: edit lib/curl_config.h manually." >&2;}
- fi
- #
-
-
- #
- tst_links_stricmp="unknown"
- tst_proto_stricmp="unknown"
- tst_compi_stricmp="unknown"
- tst_allow_stricmp="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp can be linked" >&5
-$as_echo_n "checking if stricmp can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define stricmp innocuous_stricmp
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef stricmp
-#ifdef __cplusplus
-extern "C"
-#endif
-char stricmp ();
-#if defined __stub_stricmp || defined __stub___stricmp
-choke me
-#endif
-
-int main (void)
-{
-return stricmp ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_stricmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_stricmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_stricmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp is prototyped" >&5
-$as_echo_n "checking if stricmp is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "stricmp" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_stricmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_stricmp="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_stricmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp is compilable" >&5
-$as_echo_n "checking if stricmp is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != stricmp(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_stricmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_stricmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_stricmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp usage allowed" >&5
-$as_echo_n "checking if stricmp usage allowed... " >&6; }
- if test "x$curl_disallow_stricmp" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_stricmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_stricmp="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp might be used" >&5
-$as_echo_n "checking if stricmp might be used... " >&6; }
- if test "$tst_links_stricmp" = "yes" &&
- test "$tst_proto_stricmp" = "yes" &&
- test "$tst_compi_stricmp" = "yes" &&
- test "$tst_allow_stricmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRICMP 1
-_ACEOF
-
- ac_cv_func_stricmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_stricmp="no"
- fi
-
-
- #
- tst_links_strlcat="unknown"
- tst_proto_strlcat="unknown"
- tst_compi_strlcat="unknown"
- tst_allow_strlcat="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat can be linked" >&5
-$as_echo_n "checking if strlcat can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strlcat innocuous_strlcat
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strlcat
-#ifdef __cplusplus
-extern "C"
-#endif
-char strlcat ();
-#if defined __stub_strlcat || defined __stub___strlcat
-choke me
-#endif
-
-int main (void)
-{
-return strlcat ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strlcat="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strlcat="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strlcat" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat is prototyped" >&5
-$as_echo_n "checking if strlcat is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strlcat" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strlcat="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strlcat="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strlcat" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat is compilable" >&5
-$as_echo_n "checking if strlcat is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strlcat(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strlcat="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strlcat="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strlcat" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat usage allowed" >&5
-$as_echo_n "checking if strlcat usage allowed... " >&6; }
- if test "x$curl_disallow_strlcat" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strlcat="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strlcat="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat might be used" >&5
-$as_echo_n "checking if strlcat might be used... " >&6; }
- if test "$tst_links_strlcat" = "yes" &&
- test "$tst_proto_strlcat" = "yes" &&
- test "$tst_compi_strlcat" = "yes" &&
- test "$tst_allow_strlcat" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRLCAT 1
-_ACEOF
-
- ac_cv_func_strlcat="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strlcat="no"
- fi
-
-
- #
- tst_links_strncasecmp="unknown"
- tst_proto_strncasecmp="unknown"
- tst_compi_strncasecmp="unknown"
- tst_allow_strncasecmp="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp can be linked" >&5
-$as_echo_n "checking if strncasecmp can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strncasecmp innocuous_strncasecmp
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strncasecmp
-#ifdef __cplusplus
-extern "C"
-#endif
-char strncasecmp ();
-#if defined __stub_strncasecmp || defined __stub___strncasecmp
-choke me
-#endif
-
-int main (void)
-{
-return strncasecmp ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strncasecmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strncasecmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strncasecmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp is prototyped" >&5
-$as_echo_n "checking if strncasecmp is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strncasecmp" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strncasecmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strncasecmp="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strncasecmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp is compilable" >&5
-$as_echo_n "checking if strncasecmp is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strncasecmp(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strncasecmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strncasecmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strncasecmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp usage allowed" >&5
-$as_echo_n "checking if strncasecmp usage allowed... " >&6; }
- if test "x$curl_disallow_strncasecmp" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strncasecmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strncasecmp="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp might be used" >&5
-$as_echo_n "checking if strncasecmp might be used... " >&6; }
- if test "$tst_links_strncasecmp" = "yes" &&
- test "$tst_proto_strncasecmp" = "yes" &&
- test "$tst_compi_strncasecmp" = "yes" &&
- test "$tst_allow_strncasecmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRNCASECMP 1
-_ACEOF
-
- ac_cv_func_strncasecmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strncasecmp="no"
- fi
-
-
- #
- tst_links_strncmpi="unknown"
- tst_proto_strncmpi="unknown"
- tst_compi_strncmpi="unknown"
- tst_allow_strncmpi="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi can be linked" >&5
-$as_echo_n "checking if strncmpi can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strncmpi innocuous_strncmpi
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strncmpi
-#ifdef __cplusplus
-extern "C"
-#endif
-char strncmpi ();
-#if defined __stub_strncmpi || defined __stub___strncmpi
-choke me
-#endif
-
-int main (void)
-{
-return strncmpi ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strncmpi="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strncmpi="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strncmpi" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi is prototyped" >&5
-$as_echo_n "checking if strncmpi is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strncmpi" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strncmpi="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strncmpi="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strncmpi" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi is compilable" >&5
-$as_echo_n "checking if strncmpi is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strncmpi(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strncmpi="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strncmpi="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strncmpi" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi usage allowed" >&5
-$as_echo_n "checking if strncmpi usage allowed... " >&6; }
- if test "x$curl_disallow_strncmpi" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strncmpi="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strncmpi="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi might be used" >&5
-$as_echo_n "checking if strncmpi might be used... " >&6; }
- if test "$tst_links_strncmpi" = "yes" &&
- test "$tst_proto_strncmpi" = "yes" &&
- test "$tst_compi_strncmpi" = "yes" &&
- test "$tst_allow_strncmpi" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRNCMPI 1
-_ACEOF
-
- ac_cv_func_strncmpi="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strncmpi="no"
- fi
-
-
- #
- tst_links_strnicmp="unknown"
- tst_proto_strnicmp="unknown"
- tst_compi_strnicmp="unknown"
- tst_allow_strnicmp="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp can be linked" >&5
-$as_echo_n "checking if strnicmp can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strnicmp innocuous_strnicmp
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strnicmp
-#ifdef __cplusplus
-extern "C"
-#endif
-char strnicmp ();
-#if defined __stub_strnicmp || defined __stub___strnicmp
-choke me
-#endif
-
-int main (void)
-{
-return strnicmp ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strnicmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strnicmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strnicmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp is prototyped" >&5
-$as_echo_n "checking if strnicmp is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strnicmp" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strnicmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strnicmp="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strnicmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp is compilable" >&5
-$as_echo_n "checking if strnicmp is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strnicmp(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strnicmp="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strnicmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strnicmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp usage allowed" >&5
-$as_echo_n "checking if strnicmp usage allowed... " >&6; }
- if test "x$curl_disallow_strnicmp" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strnicmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strnicmp="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp might be used" >&5
-$as_echo_n "checking if strnicmp might be used... " >&6; }
- if test "$tst_links_strnicmp" = "yes" &&
- test "$tst_proto_strnicmp" = "yes" &&
- test "$tst_compi_strnicmp" = "yes" &&
- test "$tst_allow_strnicmp" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRNICMP 1
-_ACEOF
-
- ac_cv_func_strnicmp="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strnicmp="no"
- fi
-
-
- #
- tst_links_strstr="unknown"
- tst_proto_strstr="unknown"
- tst_compi_strstr="unknown"
- tst_allow_strstr="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr can be linked" >&5
-$as_echo_n "checking if strstr can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strstr innocuous_strstr
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strstr
-#ifdef __cplusplus
-extern "C"
-#endif
-char strstr ();
-#if defined __stub_strstr || defined __stub___strstr
-choke me
-#endif
-
-int main (void)
-{
-return strstr ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strstr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strstr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strstr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr is prototyped" >&5
-$as_echo_n "checking if strstr is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strstr" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strstr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strstr="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strstr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr is compilable" >&5
-$as_echo_n "checking if strstr is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strstr(0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strstr="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strstr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strstr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr usage allowed" >&5
-$as_echo_n "checking if strstr usage allowed... " >&6; }
- if test "x$curl_disallow_strstr" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strstr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strstr="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr might be used" >&5
-$as_echo_n "checking if strstr might be used... " >&6; }
- if test "$tst_links_strstr" = "yes" &&
- test "$tst_proto_strstr" = "yes" &&
- test "$tst_compi_strstr" = "yes" &&
- test "$tst_allow_strstr" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRSTR 1
-_ACEOF
-
- ac_cv_func_strstr="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strstr="no"
- fi
-
-
- #
- tst_links_strtok_r="unknown"
- tst_proto_strtok_r="unknown"
- tst_compi_strtok_r="unknown"
- tst_allow_strtok_r="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r can be linked" >&5
-$as_echo_n "checking if strtok_r can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strtok_r innocuous_strtok_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strtok_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char strtok_r ();
-#if defined __stub_strtok_r || defined __stub___strtok_r
-choke me
-#endif
-
-int main (void)
-{
-return strtok_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strtok_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strtok_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strtok_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r is prototyped" >&5
-$as_echo_n "checking if strtok_r is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtok_r" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strtok_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strtok_r="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strtok_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r is compilable" >&5
-$as_echo_n "checking if strtok_r is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_string
-
-int main (void)
-{
-
- if(0 != strtok_r(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strtok_r="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strtok_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strtok_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r usage allowed" >&5
-$as_echo_n "checking if strtok_r usage allowed... " >&6; }
- if test "x$curl_disallow_strtok_r" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strtok_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strtok_r="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r might be used" >&5
-$as_echo_n "checking if strtok_r might be used... " >&6; }
- if test "$tst_links_strtok_r" = "yes" &&
- test "$tst_proto_strtok_r" = "yes" &&
- test "$tst_compi_strtok_r" = "yes" &&
- test "$tst_allow_strtok_r" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRTOK_R 1
-_ACEOF
-
- ac_cv_func_strtok_r="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strtok_r="no"
- fi
-
-
- #
- tst_links_strtoll="unknown"
- tst_proto_strtoll="unknown"
- tst_compi_strtoll="unknown"
- tst_allow_strtoll="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll can be linked" >&5
-$as_echo_n "checking if strtoll can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define strtoll innocuous_strtoll
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strtoll
-#ifdef __cplusplus
-extern "C"
-#endif
-char strtoll ();
-#if defined __stub_strtoll || defined __stub___strtoll
-choke me
-#endif
-
-int main (void)
-{
-return strtoll ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_strtoll="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_strtoll="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_strtoll" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll is prototyped" >&5
-$as_echo_n "checking if strtoll is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_stdlib
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtoll" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_strtoll="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_strtoll="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_strtoll" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll is compilable" >&5
-$as_echo_n "checking if strtoll is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_stdlib
-
-int main (void)
-{
-
- if(0 != strtoll(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_strtoll="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_strtoll="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_strtoll" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll usage allowed" >&5
-$as_echo_n "checking if strtoll usage allowed... " >&6; }
- if test "x$curl_disallow_strtoll" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_strtoll="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_strtoll="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll might be used" >&5
-$as_echo_n "checking if strtoll might be used... " >&6; }
- if test "$tst_links_strtoll" = "yes" &&
- test "$tst_proto_strtoll" = "yes" &&
- test "$tst_compi_strtoll" = "yes" &&
- test "$tst_allow_strtoll" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRTOLL 1
-_ACEOF
-
- ac_cv_func_strtoll="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_strtoll="no"
- fi
-
-
-curl_includes_sys_uio="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_UIO_H
-# include <sys/uio.h>
-#endif
-/* includes end */"
- for ac_header in sys/types.h sys/uio.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_sys_uio
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- #
- tst_links_writev="unknown"
- tst_proto_writev="unknown"
- tst_compi_writev="unknown"
- tst_allow_writev="unknown"
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev can be linked" >&5
-$as_echo_n "checking if writev can be linked... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define writev innocuous_writev
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef writev
-#ifdef __cplusplus
-extern "C"
-#endif
-char writev ();
-#if defined __stub_writev || defined __stub___writev
-choke me
-#endif
-
-int main (void)
-{
-return writev ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_links_writev="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_links_writev="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$tst_links_writev" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev is prototyped" >&5
-$as_echo_n "checking if writev is prototyped... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- $curl_includes_sys_uio
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "writev" >/dev/null 2>&1; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_proto_writev="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_proto_writev="no"
-
-fi
-rm -f conftest*
-
- fi
- #
- if test "$tst_proto_writev" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev is compilable" >&5
-$as_echo_n "checking if writev is compilable... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
- $curl_includes_sys_uio
-
-int main (void)
-{
-
- if(0 != writev(0, 0, 0))
- return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_compi_writev="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_compi_writev="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- #
- if test "$tst_compi_writev" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev usage allowed" >&5
-$as_echo_n "checking if writev usage allowed... " >&6; }
- if test "x$curl_disallow_writev" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- tst_allow_writev="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- tst_allow_writev="no"
- fi
- fi
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev might be used" >&5
-$as_echo_n "checking if writev might be used... " >&6; }
- if test "$tst_links_writev" = "yes" &&
- test "$tst_proto_writev" = "yes" &&
- test "$tst_compi_writev" = "yes" &&
- test "$tst_allow_writev" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WRITEV 1
-_ACEOF
-
- ac_cv_func_writev="yes"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_cv_func_writev="no"
- fi
-
-
-
-case $host in
- *msdosdjgpp)
- ac_cv_func_pipe=no
- skipcheck_pipe=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: skip check for pipe on msdosdjgpp" >&5
-$as_echo "$as_me: skip check for pipe on msdosdjgpp" >&6;}
- ;;
-esac
-
-for ac_func in fork \
- geteuid \
- getpass_r \
- getppid \
- getprotobyname \
- getpwuid \
- getrlimit \
- gettimeofday \
- inet_addr \
- perror \
- pipe \
- setlocale \
- setmode \
- setrlimit \
- uname \
- utime
-
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-
-else
-
- func="$ac_func"
- eval skipcheck=\$skipcheck_$func
- if test "x$skipcheck" != "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking deeper for $func" >&5
-$as_echo_n "checking deeper for $func... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- $func ();
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- eval "ac_cv_func_$func=yes"
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$func" | $as_tr_cpp` 1
-_ACEOF
-
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: but still no" >&5
-$as_echo "but still no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
-
-fi
-done
-
-
-
- for ac_header in sys/types.h sys/socket.h netdb.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo" >&5
-$as_echo_n "checking for getnameinfo... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#define getnameinfo innocuous_getnameinfo
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef getnameinfo
-#ifdef __cplusplus
-extern "C"
-#endif
-char getnameinfo ();
-#if defined __stub_getnameinfo || defined __stub___getnameinfo
-choke me
-#endif
-
-int main (void)
-{
-return getnameinfo ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- curl_cv_getnameinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- curl_cv_getnameinfo="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- #
- if test "$curl_cv_getnameinfo" != "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking deeper for getnameinfo" >&5
-$as_echo_n "checking deeper for getnameinfo... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-
-int main (void)
-{
-
- getnameinfo();
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- curl_cv_getnameinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: but still no" >&5
-$as_echo "but still no" >&6; }
- curl_cv_getnameinfo="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- #
- if test "$curl_cv_getnameinfo" != "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking deeper and deeper for getnameinfo" >&5
-$as_echo_n "checking deeper and deeper for getnameinfo... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#endif
-
-int main (void)
-{
-
- getnameinfo(0, 0, 0, 0, 0, 0, 0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- curl_cv_getnameinfo="yes"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: but still no" >&5
-$as_echo "but still no" >&6; }
- curl_cv_getnameinfo="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- #
- if test "$curl_cv_getnameinfo" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for getnameinfo" >&5
-$as_echo_n "checking types of arguments for getnameinfo... " >&6; }
-if test "${curl_cv_func_getnameinfo_args+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- curl_cv_func_getnameinfo_args="unknown"
- for gni_arg1 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
- for gni_arg2 in 'socklen_t' 'size_t' 'int'; do
- for gni_arg46 in 'size_t' 'int' 'socklen_t' 'unsigned int' 'DWORD'; do
- for gni_arg7 in 'int' 'unsigned int'; do
- if test "$curl_cv_func_getnameinfo_args" = "unknown"; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#if (!defined(_WIN32_WINNT)) || (_WIN32_WINNT < 0x0501)
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-#endif
-#define GNICALLCONV WSAAPI
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#define GNICALLCONV
-#endif
- extern int GNICALLCONV getnameinfo($gni_arg1, $gni_arg2,
- char *, $gni_arg46,
- char *, $gni_arg46,
- $gni_arg7);
-
-int main (void)
-{
-
- $gni_arg2 salen=0;
- $gni_arg46 hostlen=0;
- $gni_arg46 servlen=0;
- $gni_arg7 flags=0;
- int res = getnameinfo(0, salen, 0, hostlen, 0, servlen, flags);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- curl_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- done
- done
- done
- done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_getnameinfo_args" >&5
-$as_echo "$curl_cv_func_getnameinfo_args" >&6; } # AC-CACHE-CHECK
- if test "$curl_cv_func_getnameinfo_args" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find proper types to use for getnameinfo args" >&5
-$as_echo "$as_me: WARNING: Cannot find proper types to use for getnameinfo args" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_GETNAMEINFO will not be defined" >&5
-$as_echo "$as_me: WARNING: HAVE_GETNAMEINFO will not be defined" >&2;}
- else
- gni_prev_IFS=$IFS; IFS=','
- set dummy `echo "$curl_cv_func_getnameinfo_args" | sed 's/\*/\*/g'`
- IFS=$gni_prev_IFS
- shift
- #
- gni_qual_type_arg1=$1
- #
-
-cat >>confdefs.h <<_ACEOF
-#define GETNAMEINFO_TYPE_ARG2 $2
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define GETNAMEINFO_TYPE_ARG46 $3
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define GETNAMEINFO_TYPE_ARG7 $4
-_ACEOF
-
- #
- prev_sh_opts=$-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set -f
- ;;
- esac
- #
- case "$gni_qual_type_arg1" in
- const*)
- gni_qual_arg1=const
- gni_type_arg1=`echo $gni_qual_type_arg1 | sed 's/^const //'`
- ;;
- *)
- gni_qual_arg1=
- gni_type_arg1=$gni_qual_type_arg1
- ;;
- esac
- #
-
-cat >>confdefs.h <<_ACEOF
-#define GETNAMEINFO_QUAL_ARG1 $gni_qual_arg1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define GETNAMEINFO_TYPE_ARG1 $gni_type_arg1
-_ACEOF
-
- #
- case $prev_sh_opts in
- *f*)
- ;;
- *)
- set +f
- ;;
- esac
- #
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETNAMEINFO 1
-_ACEOF
-
- ac_cv_func_getnameinfo="yes"
- fi
- fi
-
-
-if test "$ipv6" = "yes"; then
- if test "$ac_cv_func_getaddrinfo" = "yes"; then
-
-$as_echo "#define ENABLE_IPV6 1" >>confdefs.h
-
- IPV6_ENABLED=1
-
- fi
-
- for ac_header in stdio.h sys/types.h sys/socket.h \
- netdb.h netinet/in.h arpa/inet.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working NI_WITHSCOPEID" >&5
-$as_echo_n "checking for working NI_WITHSCOPEID... " >&6; }
-if test "${ac_cv_working_ni_withscopeid+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
-
- # Program is not run when cross-compiling. So we assume
- # NI_WITHSCOPEID will work if we are able to compile it.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-
-int main (void)
-{
-
- unsigned int dummy= NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- ac_cv_working_ni_withscopeid="yes"
-
-else
-
- ac_cv_working_ni_withscopeid="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # AC-COMPILE-IFELSE
-
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
-int main (void)
-{
-
-#if defined(NI_WITHSCOPEID) && defined(HAVE_GETNAMEINFO)
-#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
- struct sockaddr_storage sa;
-#else
- unsigned char sa[256];
-#endif
- char hostbuf[NI_MAXHOST];
- int rc;
- GETNAMEINFO_TYPE_ARG2 salen = (GETNAMEINFO_TYPE_ARG2)sizeof(sa);
- GETNAMEINFO_TYPE_ARG46 hostlen = (GETNAMEINFO_TYPE_ARG46)sizeof(hostbuf);
- GETNAMEINFO_TYPE_ARG7 flags = NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID;
- int fd = socket(AF_INET6, SOCK_STREAM, 0);
- if(fd < 0) {
- perror("socket()");
- return 1; /* Error creating socket */
- }
- rc = getsockname(fd, (GETNAMEINFO_TYPE_ARG1)&sa, &salen);
- if(rc) {
- perror("getsockname()");
- return 2; /* Error retrieving socket name */
- }
- rc = getnameinfo((GETNAMEINFO_TYPE_ARG1)&sa, salen, hostbuf, hostlen, NULL, 0, flags);
- if(rc) {
- printf("rc = %s\n", gai_strerror(rc));
- return 3; /* Error translating socket address */
- }
- return 0; /* Ok, NI_WITHSCOPEID works */
-#else
- return 4; /* Error, NI_WITHSCOPEID not defined or no getnameinfo() */
-#endif
-
- ;
- return 0;
-} # AC-LANG-PROGRAM
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
- # Exit code == 0. Program worked.
- ac_cv_working_ni_withscopeid="yes"
-
-else
-
- # Exit code != 0. Program failed.
- ac_cv_working_ni_withscopeid="no"
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
- # AC-RUN-IFELSE
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_ni_withscopeid" >&5
-$as_echo "$ac_cv_working_ni_withscopeid" >&6; } # AC-CACHE-CHECK
- case "$ac_cv_working_ni_withscopeid" in
- yes)
-
-$as_echo "#define HAVE_NI_WITHSCOPEID 1" >>confdefs.h
-
- ;;
- esac
-
-fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable non-blocking communications" >&5
-$as_echo_n "checking whether to enable non-blocking communications... " >&6; }
- OPT_NONBLOCKING="default"
- # Check whether --enable-nonblocking was given.
-if test "${enable_nonblocking+set}" = set; then :
- enableval=$enable_nonblocking; OPT_NONBLOCKING=$enableval
-fi
-
- case "$OPT_NONBLOCKING" in
- no)
- want_nonblocking="no"
- ;;
- default)
- want_nonblocking="yes"
- ;;
- *)
- want_nonblocking="yes"
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_nonblocking" >&5
-$as_echo "$want_nonblocking" >&6; }
-
-
- #
- tst_method="unknown"
- if test "$want_nonblocking" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to set a socket into non-blocking mode" >&5
-$as_echo_n "checking how to set a socket into non-blocking mode... " >&6; }
- if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
- tst_method="fcntl O_NONBLOCK"
- elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
- tst_method="ioctl FIONBIO"
- elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
- tst_method="ioctlsocket FIONBIO"
- elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
- tst_method="IoctlSocket FIONBIO"
- elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
- tst_method="setsockopt SO_NONBLOCK"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_method" >&5
-$as_echo "$tst_method" >&6; }
- if test "$tst_method" = "unknown"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine non-blocking socket method." >&5
-$as_echo "$as_me: WARNING: cannot determine non-blocking socket method." >&2;}
- fi
- fi
- if test "$tst_method" = "unknown"; then
-
-cat >>confdefs.h <<_ACEOF
-#define USE_BLOCKING_SOCKETS 1
-_ACEOF
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: non-blocking sockets disabled." >&5
-$as_echo "$as_me: WARNING: non-blocking sockets disabled." >&2;}
- fi
-
-
-
-# Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PERL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PERL in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin "
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PERL=$ac_cv_path_PERL
-if test -n "$PERL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
-$as_echo "$PERL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-for ac_prog in gnroff nroff
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_NROFF+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $NROFF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin/:/usr/local/bin "
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-NROFF=$ac_cv_path_NROFF
-if test -n "$NROFF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
-$as_echo "$NROFF" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$NROFF" && break
-done
-
-
-
-if test -n "$NROFF"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use *nroff to get plain text from man pages" >&5
-$as_echo_n "checking how to use *nroff to get plain text from man pages... " >&6; }
- MANOPT="-man"
- mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
- if test -z "$mancheck"; then
- MANOPT="-mandoc"
- mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
- if test -z "$mancheck"; then
- MANOPT=""
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: found no *nroff option to get plaintext from man pages" >&5
-$as_echo "$as_me: WARNING: found no *nroff option to get plaintext from man pages" >&2;}
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANOPT" >&5
-$as_echo "$MANOPT" >&6; }
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANOPT" >&5
-$as_echo "$MANOPT" >&6; }
- fi
-
-fi
-
-if test -z "$MANOPT"
-then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling built-in manual" >&5
-$as_echo "$as_me: WARNING: disabling built-in manual" >&2;}
- USE_MANUAL="no";
-fi
-
-
-if test "$USE_MANUAL" = "1"; then
-
-$as_echo "#define USE_MANUAL 1" >>confdefs.h
-
- curl_manual_msg="enabled"
-fi
-
-
-
-if test x"$USE_MANUAL" = x1; then
- USE_MANUAL_TRUE=
- USE_MANUAL_FALSE='#'
-else
- USE_MANUAL_TRUE='#'
- USE_MANUAL_FALSE=
-fi
-
-
-
-
-
- #
- if test "$want_ares" = "yes"; then
- clean_CPPFLAGS="$CPPFLAGS"
- clean_LDFLAGS="$LDFLAGS"
- clean_LIBS="$LIBS"
- embedded_ares="unknown"
- configure_runpath=`pwd`
- embedded_ares_builddir="$configure_runpath/ares"
- if test -n "$want_ares_path"; then
- ares_CPPFLAGS="-I$want_ares_path/include"
- ares_LDFLAGS="-L$want_ares_path/lib"
- ares_LIBS="-lcares"
- else
- if test -d "$srcdir/ares"; then
- embedded_ares="yes"
- subdirs="$subdirs ares"
-
- ares_CPPFLAGS=""
- ares_LDFLAGS="-L$embedded_ares_builddir"
- ares_LIBS="-lcares"
- else
- ares_CPPFLAGS=""
- ares_LDFLAGS=""
- ares_LIBS="-lcares"
- fi
- fi
- #
- CPPFLAGS="$ares_CPPFLAGS $clean_CPPFLAGS"
- LDFLAGS="$ares_LDFLAGS $clean_LDFLAGS"
- LIBS="$ares_LIBS $clean_LIBS"
- #
- if test "$embedded_ares" != "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking that c-ares is good and recent enough" >&5
-$as_echo_n "checking that c-ares is good and recent enough... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#include <ares.h>
- /* set of dummy functions in case c-ares was built with debug */
- void curl_dofree() { }
- void curl_sclose() { }
- void curl_domalloc() { }
- void curl_docalloc() { }
- void curl_socket() { }
-
-int main (void)
-{
-
- ares_channel channel;
- ares_cancel(channel); /* added in 1.2.0 */
- ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
- ares_dup(&channel, channel); /* added in 1.6.0 */
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "c-ares library defective or too old" "$LINENO" 5
- CPPFLAGS="$clean_CPPFLAGS"
- LDFLAGS="$clean_LDFLAGS"
- LIBS="$clean_LIBS"
- # prevent usage
- want_ares="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- if test "$want_ares" = "yes"; then
-
-$as_echo "#define USE_ARES 1" >>confdefs.h
-
- USE_ARES=1
-
- curl_res_msg="c-ares"
- fi
- fi
-
-
-
-if test x$embedded_ares = xyes; then
- USE_EMBEDDED_ARES_TRUE=
- USE_EMBEDDED_ARES_FALSE='#'
-else
- USE_EMBEDDED_ARES_TRUE='#'
- USE_EMBEDDED_ARES_FALSE=
-fi
-
-
-if test "x$enable_shared" = "xyes"; then
- build_libhostname=yes
-else
- build_libhostname=no
-fi
-
-
-if test x$build_libhostname = xyes; then
- BUILD_LIBHOSTNAME_TRUE=
- BUILD_LIBHOSTNAME_FALSE='#'
-else
- BUILD_LIBHOSTNAME_TRUE='#'
- BUILD_LIBHOSTNAME_FALSE=
-fi
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the threaded resolver" >&5
-$as_echo_n "checking whether to enable the threaded resolver... " >&6; }
- OPT_THRES="default"
- # Check whether --enable-threaded_resolver was given.
-if test "${enable_threaded_resolver+set}" = set; then :
- enableval=$enable_threaded_resolver; OPT_THRES=$enableval
-fi
-
- case "$OPT_THRES" in
- yes)
- want_thres="yes"
- ;;
- *)
- want_thres="no"
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_thres" >&5
-$as_echo "$want_thres" >&6; }
-
-
-if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
- as_fn_error $? "Options --enable-threaded-resolver and --enable-ares are mutually exclusive" "$LINENO" 5
-fi
-
-if test "$want_thres" = "yes"; then
- ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = x""yes; then :
-
-$as_echo "#define HAVE_PTHREAD_H 1" >>confdefs.h
-
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -pthread"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_create ();
-int main (void)
-{
-return pthread_create ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pthread_pthread_create=yes
-else
- ac_cv_lib_pthread_pthread_create=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: using POSIX threaded DNS lookup" >&5
-$as_echo "$as_me: using POSIX threaded DNS lookup" >&6;}
-
-$as_echo "#define USE_THREADS_POSIX 1" >>confdefs.h
-
- USE_THREADS_POSIX=1
- curl_res_msg="threaded"
-
-else
- CFLAGS="$save_CFLAGS"
-fi
-
-
-fi
-
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable verbose strings" >&5
-$as_echo_n "checking whether to enable verbose strings... " >&6; }
-# Check whether --enable-verbose was given.
-if test "${enable_verbose+set}" = set; then :
- enableval=$enable_verbose; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_VERBOSE_STRINGS 1" >>confdefs.h
-
- curl_verbose_msg="no"
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable SSPI support (Windows native builds only)" >&5
-$as_echo_n "checking whether to enable SSPI support (Windows native builds only)... " >&6; }
-# Check whether --enable-sspi was given.
-if test "${enable_sspi+set}" = set; then :
- enableval=$enable_sspi; case "$enableval" in
- yes)
- if test "$ac_cv_native_windows" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define USE_WINDOWS_SSPI 1" >>confdefs.h
-
- USE_WINDOWS_SSPI=1
-
- curl_sspi_msg="enabled"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-sspi Ignored. Only supported on native Windows builds." >&5
-$as_echo "$as_me: WARNING: --enable-sspi Ignored. Only supported on native Windows builds." >&2;}
- fi
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable cryptographic authentication methods" >&5
-$as_echo_n "checking whether to enable cryptographic authentication methods... " >&6; }
-# Check whether --enable-crypto-auth was given.
-if test "${enable_crypto_auth+set}" = set; then :
- enableval=$enable_crypto_auth; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_CRYPTO_AUTH 1" >>confdefs.h
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable support for cookies" >&5
-$as_echo_n "checking whether to enable support for cookies... " >&6; }
-# Check whether --enable-cookies was given.
-if test "${enable_cookies+set}" = set; then :
- enableval=$enable_cookies; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define CURL_DISABLE_COOKIES 1" >>confdefs.h
-
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable hidden symbols in the library" >&5
-$as_echo_n "checking whether to enable hidden symbols in the library... " >&6; }
-# Check whether --enable-hidden-symbols was given.
-if test "${enable_hidden_symbols+set}" = set; then :
- enableval=$enable_hidden_symbols; case "$enableval" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports it" >&5
-$as_echo_n "checking whether $CC supports it... " >&6; }
- if test "$GCC" = yes ; then
- if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ||
- test "$compiler_id" = "CLANG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define CURL_HIDDEN_SYMBOLS 1" >>confdefs.h
-
-
-$as_echo "#define CURL_EXTERN_SYMBOL __attribute__ ((visibility (\"default\")))" >>confdefs.h
-
- CFLAGS="$CFLAGS -fvisibility=hidden"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
- else
- if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define CURL_HIDDEN_SYMBOLS 1" >>confdefs.h
-
-
-$as_echo "#define CURL_EXTERN_SYMBOL __global" >>confdefs.h
-
- CFLAGS="$CFLAGS -xldscope=hidden"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enforce SONAME bump" >&5
-$as_echo_n "checking whether to enforce SONAME bump... " >&6; }
-# Check whether --enable-soname-bump was given.
-if test "${enable_soname_bump+set}" = set; then :
- enableval=$enable_soname_bump; case "$enableval" in
- yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- soname_bump=yes
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $soname_bump" >&5
-$as_echo "$soname_bump" >&6; }
-
-fi
-
-
-
-if test x$soname_bump = xyes; then
- SONAME_BUMP_TRUE=
- SONAME_BUMP_FALSE='#'
-else
- SONAME_BUMP_TRUE='#'
- SONAME_BUMP_FALSE=
-fi
-
-
-
-if test ! -z "$winsock_LIB"; then
-
-
- LIBS="$LIBS $winsock_LIB"
- TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB"
-
-fi
-
-LIBCURL_LIBS=$LIBS
-
-
-
-
-
-LIBS=$ALL_LIBS
-
-
-if test x$cross_compiling = xyes; then
- CROSSCOMPILING_TRUE=
- CROSSCOMPILING_FALSE='#'
-else
- CROSSCOMPILING_TRUE='#'
- CROSSCOMPILING_FALSE=
-fi
-
-
-ENABLE_SHARED="$enable_shared"
-
-
-
-if test "x$USE_SSLEAY" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
-elif test -n "$SSL_ENABLED"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
-fi
-if test "@KRB4_ENABLED@" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4"
-fi
-if test "x$IPV6_ENABLED" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
-fi
-if test "x$HAVE_LIBZ" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
-fi
-if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
-fi
-if test "x$IDN_ENABLED" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
-fi
-if test "x$USE_WINDOWS_SSPI" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
-fi
-if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
- -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
-fi
-
-
-
-if test "x$CURL_DISABLE_HTTP" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
- if test "x$SSL_ENABLED" = "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
- fi
-fi
-if test "x$CURL_DISABLE_FTP" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
- if test "x$SSL_ENABLED" = "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
- fi
-fi
-if test "x$CURL_DISABLE_FILE" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
-fi
-if test "x$CURL_DISABLE_TELNET" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
-fi
-if test "x$CURL_DISABLE_LDAP" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
- if test "x$CURL_DISABLE_LDAPS" != "x1"; then
- if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
- (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
- fi
- fi
-fi
-if test "x$CURL_DISABLE_DICT" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
-fi
-if test "x$CURL_DISABLE_TFTP" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
-fi
-if test "x$CURL_DISABLE_GOPHER" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
-fi
-if test "x$CURL_DISABLE_POP3" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
- if test "x$SSL_ENABLED" = "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
- fi
-fi
-if test "x$CURL_DISABLE_IMAP" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
- if test "x$SSL_ENABLED" = "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
- fi
-fi
-if test "x$CURL_DISABLE_SMTP" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
- if test "x$SSL_ENABLED" = "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
- fi
-fi
-if test "x$USE_LIBSSH2" = "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
-fi
-if test "x$CURL_DISABLE_RTSP" != "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
-fi
-if test "x$USE_LIBRTMP" = "x1"; then
- SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
-fi
-
-SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
-
-
-
-
-squeeze CFLAGS
-squeeze CPPFLAGS
-squeeze DEFS
-squeeze LDFLAGS
-squeeze LIBS
-
-squeeze CURL_LIBS
-squeeze LIBCURL_LIBS
-squeeze TEST_SERVER_LIBS
-squeeze CURL_NETWORK_LIBS
-
-squeeze SUPPORT_FEATURES
-squeeze SUPPORT_PROTOCOLS
-
-if test "x$want_curldebug_assumed" = "xyes" &&
- test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
- ac_configure_args="$ac_configure_args --enable-curldebug"
-fi
-
-ac_config_files="$ac_config_files Makefile docs/Makefile docs/examples/Makefile docs/libcurl/Makefile include/Makefile include/curl/Makefile src/Makefile lib/Makefile tests/Makefile tests/data/Makefile tests/server/Makefile tests/libtest/Makefile packages/Makefile packages/Win32/Makefile packages/Win32/cygwin/Makefile packages/Linux/Makefile packages/Linux/RPM/Makefile packages/Linux/RPM/curl.spec packages/Linux/RPM/curl-ssl.spec packages/Solaris/Makefile packages/EPM/curl.list packages/EPM/Makefile packages/vms/Makefile packages/AIX/Makefile packages/AIX/RPM/Makefile packages/AIX/RPM/curl.spec curl-config libcurl.pc"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
- as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error $? "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${MIMPURE_TRUE}" && test -z "${MIMPURE_FALSE}"; then
- as_fn_error $? "conditional \"MIMPURE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${STATICLIB_TRUE}" && test -z "${STATICLIB_FALSE}"; then
- as_fn_error $? "conditional \"STATICLIB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${STATICLIB_TRUE}" && test -z "${STATICLIB_FALSE}"; then
- as_fn_error $? "conditional \"STATICLIB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${NO_UNDEFINED_TRUE}" && test -z "${NO_UNDEFINED_FALSE}"; then
- as_fn_error $? "conditional \"NO_UNDEFINED\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${CURLDEBUG_TRUE}" && test -z "${CURLDEBUG_FALSE}"; then
- as_fn_error $? "conditional \"CURLDEBUG\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${HAVE_LIBZ_TRUE}" && test -z "${HAVE_LIBZ_FALSE}"; then
- as_fn_error $? "conditional \"HAVE_LIBZ\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${USE_MANUAL_TRUE}" && test -z "${USE_MANUAL_FALSE}"; then
- as_fn_error $? "conditional \"USE_MANUAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${USE_EMBEDDED_ARES_TRUE}" && test -z "${USE_EMBEDDED_ARES_FALSE}"; then
- as_fn_error $? "conditional \"USE_EMBEDDED_ARES\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_LIBHOSTNAME_TRUE}" && test -z "${BUILD_LIBHOSTNAME_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_LIBHOSTNAME\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${SONAME_BUMP_TRUE}" && test -z "${SONAME_BUMP_FALSE}"; then
- as_fn_error $? "conditional \"SONAME_BUMP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${CROSSCOMPILING_TRUE}" && test -z "${CROSSCOMPILING_FALSE}"; then
- as_fn_error $? "conditional \"CROSSCOMPILING\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by curl $as_me -, which was
-generated by GNU Autoconf 2.67. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <a suitable curl mailing list: http://curl.haxx.se/mail/>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-curl config.status -
-configured by $0, generated by GNU Autoconf 2.67,
- with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=?*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_HEADERS " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
- --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
-DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
-LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
-
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in SED \
-GREP \
-EGREP \
-FGREP \
-LD \
-NM \
-LN_S \
-lt_SP2NL \
-lt_NL2SP \
-reload_flag \
-deplibs_check_method \
-file_magic_cmd \
-AR \
-AR_FLAGS \
-STRIP \
-RANLIB \
-CC \
-CFLAGS \
-compiler \
-lt_cv_sys_global_symbol_pipe \
-lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_c_name_address \
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-SHELL \
-ECHO \
-lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
-lt_prog_compiler_pic \
-lt_prog_compiler_static \
-lt_cv_prog_compiler_c_o \
-need_locks \
-DSYMUTIL \
-NMEDIT \
-LIPO \
-OTOOL \
-OTOOL64 \
-shrext_cmds \
-export_dynamic_flag_spec \
-whole_archive_flag_spec \
-compiler_needs_object \
-with_gnu_ld \
-allow_undefined_flag \
-no_undefined_flag \
-hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
-hardcode_libdir_separator \
-fix_srcfile_path \
-exclude_expsyms \
-include_expsyms \
-file_list_spec \
-variables_saved_for_relink \
-libname_spec \
-library_names_spec \
-soname_spec \
-finish_eval \
-old_striplib \
-striplib; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in reload_cmds \
-old_postinstall_cmds \
-old_postuninstall_cmds \
-old_archive_cmds \
-extract_expsyms_cmds \
-old_archive_from_new_cmds \
-old_archive_from_expsyms_cmds \
-archive_cmds \
-archive_expsym_cmds \
-module_cmds \
-module_expsym_cmds \
-export_symbols_cmds \
-prelink_cmds \
-postinstall_cmds \
-postuninstall_cmds \
-finish_cmds \
-sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
- ;;
-esac
-
-ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'
-
-
-
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "lib/curl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/curl_config.h" ;;
- "src/curl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/curl_config.h" ;;
- "include/curl/curlbuild.h") CONFIG_HEADERS="$CONFIG_HEADERS include/curl/curlbuild.h" ;;
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
- "docs/examples/Makefile") CONFIG_FILES="$CONFIG_FILES docs/examples/Makefile" ;;
- "docs/libcurl/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libcurl/Makefile" ;;
- "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
- "include/curl/Makefile") CONFIG_FILES="$CONFIG_FILES include/curl/Makefile" ;;
- "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
- "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
- "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
- "tests/data/Makefile") CONFIG_FILES="$CONFIG_FILES tests/data/Makefile" ;;
- "tests/server/Makefile") CONFIG_FILES="$CONFIG_FILES tests/server/Makefile" ;;
- "tests/libtest/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libtest/Makefile" ;;
- "packages/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Makefile" ;;
- "packages/Win32/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Win32/Makefile" ;;
- "packages/Win32/cygwin/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Win32/cygwin/Makefile" ;;
- "packages/Linux/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Linux/Makefile" ;;
- "packages/Linux/RPM/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Linux/RPM/Makefile" ;;
- "packages/Linux/RPM/curl.spec") CONFIG_FILES="$CONFIG_FILES packages/Linux/RPM/curl.spec" ;;
- "packages/Linux/RPM/curl-ssl.spec") CONFIG_FILES="$CONFIG_FILES packages/Linux/RPM/curl-ssl.spec" ;;
- "packages/Solaris/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Solaris/Makefile" ;;
- "packages/EPM/curl.list") CONFIG_FILES="$CONFIG_FILES packages/EPM/curl.list" ;;
- "packages/EPM/Makefile") CONFIG_FILES="$CONFIG_FILES packages/EPM/Makefile" ;;
- "packages/vms/Makefile") CONFIG_FILES="$CONFIG_FILES packages/vms/Makefile" ;;
- "packages/AIX/Makefile") CONFIG_FILES="$CONFIG_FILES packages/AIX/Makefile" ;;
- "packages/AIX/RPM/Makefile") CONFIG_FILES="$CONFIG_FILES packages/AIX/RPM/Makefile" ;;
- "packages/AIX/RPM/curl.spec") CONFIG_FILES="$CONFIG_FILES packages/AIX/RPM/curl.spec" ;;
- "curl-config") CONFIG_FILES="$CONFIG_FILES curl-config" ;;
- "libcurl.pc") CONFIG_FILES="$CONFIG_FILES libcurl.pc" ;;
-
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any. Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[ ]*#[ ]*define[ ][ ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- for (key in D) D_is_set[key] = 1
- FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
- line = \$ 0
- split(line, arg, " ")
- if (arg[1] == "#") {
- defundef = arg[2]
- mac1 = arg[3]
- } else {
- defundef = substr(arg[1], 2)
- mac1 = arg[2]
- }
- split(mac1, mac2, "(") #)
- macro = mac2[1]
- prefix = substr(line, 1, index(line, defundef) - 1)
- if (D_is_set[macro]) {
- # Preserve the white space surrounding the "#".
- print prefix "define", macro P[macro] D[macro]
- next
- } else {
- # Replace #undef with comments. This is necessary, for example,
- # in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- if (defundef == "undef") {
- print "/*", prefix defundef, macro, "*/"
- next
- }
- }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
- :H)
- #
- # CONFIG_HEADER
- #
- if test x"$ac_file" != x-; then
- {
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f "$ac_file"
- mv "$tmp/config.h" "$ac_file" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- fi
- else
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error $? "could not create -" "$LINENO" 5
- fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- "$ac_file" | "$ac_file":* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
- esac
-
-
- case $ac_file$ac_mode in
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
- ;;
- "libtool":C)
-
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
-# The names of the tagged configurations supported by this script.
-available_tags=""
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Assembler program.
-AS=$AS
-
-# DLL creation program.
-DLLTOOL=$DLLTOOL
-
-# Object dumper program.
-OBJDUMP=$OBJDUMP
-
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# What type of objects to build.
-pic_mode=$pic_mode
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="\$SED -e 1s/^X//"
-
-# A grep program that handles long lines.
-GREP=$lt_GREP
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# A literal string matcher.
-FGREP=$lt_FGREP
-
-# A BSD- or MS-compatible name lister.
-NM=$lt_NM
-
-# Whether we need soft or hard links.
-LN_S=$lt_LN_S
-
-# What is the maximum length of a command?
-max_cmd_len=$max_cmd_len
-
-# Object file suffix (normally "o").
-objext=$ac_objext
-
-# Executable file suffix (normally "").
-exeext=$exeext
-
-# whether the shell understands "unset".
-lt_unset=$lt_unset
-
-# turn spaces into newlines.
-SP2NL=$lt_lt_SP2NL
-
-# turn newlines into spaces.
-NL2SP=$lt_lt_NL2SP
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == "file_magic".
-file_magic_cmd=$lt_file_magic_cmd
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A symbol stripping program.
-STRIP=$lt_STRIP
-
-# Commands used to install an old-style archive.
-RANLIB=$lt_RANLIB
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# A C compiler.
-LTCC=$lt_CC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_CFLAGS
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration.
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair.
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# Transform the output of nm in a C name address pair when lib prefix is needed.
-global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
-
-# Used to examine libraries when file_magic_cmd begins with "file".
-MAGIC_CMD=$MAGIC_CMD
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
-DSYMUTIL=$lt_DSYMUTIL
-
-# Tool to change global to local symbols on Mac OS X.
-NMEDIT=$lt_NMEDIT
-
-# Tool to manipulate fat objects and archives on Mac OS X.
-LIPO=$lt_LIPO
-
-# ldd/readelf like tool for Mach-O binaries on Mac OS X.
-OTOOL=$lt_OTOOL
-
-# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
-OTOOL64=$lt_OTOOL64
-
-# Old archive suffix (normally "a").
-libext=$libext
-
-# Shared library suffix (normally ".so").
-shrext_cmds=$lt_shrext_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at link time.
-variables_saved_for_relink=$lt_variables_saved_for_relink
-
-# Do we need the "lib" prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Library versioning type.
-version_type=$version_type
-
-# Shared library runtime path variable.
-runpath_var=$runpath_var
-
-# Shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Command to use after installation of a shared archive.
-postinstall_cmds=$lt_postinstall_cmds
-
-# Command to use after uninstallation of a shared archive.
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# As "finish_cmds", except a single script fragment to be evaled but
-# not shown.
-finish_eval=$lt_finish_eval
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Compile-time system search path for libraries.
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds
-
-# A language specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=${1%%=*}
- func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=$(( $* ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=${#1}
-}
-
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=`expr "$@"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1+=\$2"
-}
-_LT_EOF
- ;;
- *)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1=\$$1\$2"
-}
-
-_LT_EOF
- ;;
- esac
-
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-
- ;;
-
- esac
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
-fi
-
-#
-# CONFIG_SUBDIRS section.
-#
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file, --srcdir, and --disable-option-checking arguments
- # so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- eval "set x $ac_configure_args"
- shift
- for ac_arg
- do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case $ac_arg in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
- | --c=*)
- ;;
- --config-cache | -C)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- ;;
- --disable-option-checking)
- ;;
- *)
- case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
- esac
- done
-
- # Always prepend --prefix to ensure using the same prefix
- # in subdir configurations.
- ac_arg="--prefix=$prefix"
- case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
-
- # Pass --silent
- if test "$silent" = yes; then
- ac_sub_configure_args="--silent $ac_sub_configure_args"
- fi
-
- # Always prepend --disable-option-checking to silence warnings, since
- # different subdirs can have different --enable and --with options.
- ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
-
- ac_popdir=`pwd`
- for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- test -d "$srcdir/$ac_dir" || continue
-
- ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
- $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
- $as_echo "$ac_msg" >&6
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- cd "$ac_dir"
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- ac_sub_configure=$ac_srcdir/configure.gnu
- elif test -f "$ac_srcdir/configure"; then
- ac_sub_configure=$ac_srcdir/configure
- elif test -f "$ac_srcdir/configure.in"; then
- # This should be Cygnus configure.
- ac_sub_configure=$ac_aux_dir/configure
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
-$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
- # Make the cache file name correct relative to the subdirectory.
- case $cache_file in
- [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
- *) # Relative name.
- ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
- esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
- # The eval makes quoting arguments work.
- eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
- --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
- as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
- fi
-
- cd "$ac_popdir"
- done
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Configured to build curl/libcurl:
-
- curl version: ${VERSION}
- Host setup: ${host}
- Install prefix: ${prefix}
- Compiler: ${CC}
- SSL support: ${curl_ssl_msg}
- SSH support: ${curl_ssh_msg}
- zlib support: ${curl_zlib_msg}
- krb4 support: ${curl_krb4_msg}
- GSSAPI support: ${curl_gss_msg}
- SPNEGO support: ${curl_spnego_msg}
- resolver: ${curl_res_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}
- Verbose errors: ${curl_verbose_msg}
- SSPI support: ${curl_sspi_msg}
- ca cert bundle: ${ca}
- ca cert path: ${capath}
- LDAP support: ${curl_ldap_msg}
- LDAPS support: ${curl_ldaps_msg}
- RTSP support: ${curl_rtsp_msg}
- RTMP support: ${curl_rtmp_msg}
- Protocols: ${SUPPORT_PROTOCOLS}
-" >&5
-$as_echo "$as_me: Configured to build curl/libcurl:
-
- curl version: ${VERSION}
- Host setup: ${host}
- Install prefix: ${prefix}
- Compiler: ${CC}
- SSL support: ${curl_ssl_msg}
- SSH support: ${curl_ssh_msg}
- zlib support: ${curl_zlib_msg}
- krb4 support: ${curl_krb4_msg}
- GSSAPI support: ${curl_gss_msg}
- SPNEGO support: ${curl_spnego_msg}
- resolver: ${curl_res_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}
- Verbose errors: ${curl_verbose_msg}
- SSPI support: ${curl_sspi_msg}
- ca cert bundle: ${ca}
- ca cert path: ${capath}
- LDAP support: ${curl_ldap_msg}
- LDAPS support: ${curl_ldaps_msg}
- RTSP support: ${curl_rtsp_msg}
- RTMP support: ${curl_rtmp_msg}
- Protocols: ${SUPPORT_PROTOCOLS}
-" >&6;}
-
-if test "x$soname_bump" = "xyes"; then
-
-cat <<EOM
- SONAME bump: yes - WARNING: this library will be built with the SONAME
- number bumped due to (a detected) ABI breakage.
- See lib/README.curl_off_t for details on this.
-EOM
-
-fi
-
diff --git a/configure.ac b/configure.ac
index 28a19557..accb0388 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,15 +26,18 @@ AC_PREREQ(2.57)
dnl We don't know the version number "statically" so we use a dash here
AC_INIT([curl], [-], [a suitable curl mailing list: http://curl.haxx.se/mail/])
+XC_OVR_ZZ50
+XC_OVR_ZZ60
CURL_OVERRIDE_AUTOCONF
dnl configure script copyright
-AC_COPYRIGHT([Copyright (c) 1998 - 2010 Daniel Stenberg, <daniel@haxx.se>
+AC_COPYRIGHT([Copyright (c) 1998 - 2014 Daniel Stenberg, <daniel@haxx.se>
This configure script may be copied, distributed and modified under the
terms of the curl license; see COPYING for more details])
AC_CONFIG_SRCDIR([lib/urldata.h])
-AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
+AC_CONFIG_HEADERS(lib/curl_config.h include/curl/curlbuild.h)
+AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
CURL_CHECK_OPTION_DEBUG
@@ -42,9 +45,10 @@ CURL_CHECK_OPTION_OPTIMIZE
CURL_CHECK_OPTION_WARNINGS
CURL_CHECK_OPTION_WERROR
CURL_CHECK_OPTION_CURLDEBUG
+CURL_CHECK_OPTION_SYMBOL_HIDING
CURL_CHECK_OPTION_ARES
-CURL_CHECK_PATH_SEPARATOR_REQUIRED
+XC_CHECK_PATH_SEPARATOR
#
# save the configure arguments
@@ -120,10 +124,13 @@ if test -f ${srcdir}/include/curl/curlbuild.h; then
fi
dnl figure out the libcurl version
-VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
-AM_INIT_AUTOMAKE(curl,$VERSION)
+CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
+XC_CHECK_PROG_CC
+XC_AUTOMAKE
AC_MSG_CHECKING([curl version])
-AC_MSG_RESULT($VERSION)
+AC_MSG_RESULT($CURLVERSION)
+
+AC_SUBST(CURLVERSION)
dnl
dnl we extract the numerical version for curl-config only
@@ -140,27 +147,32 @@ AC_SUBST(PKGADD_VENDOR)
dnl
dnl initialize all the info variables
- curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl} )"
+ curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl,darwinssl} )"
curl_ssh_msg="no (--with-libssh2)"
curl_zlib_msg="no (--with-zlib)"
- curl_krb4_msg="no (--with-krb4*)"
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_idn_msg="no (--with-libidn)"
+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)"
curl_verbose_msg="enabled (--disable-verbose)"
curl_sspi_msg="no (--enable-sspi)"
curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
curl_ldaps_msg="no (--enable-ldaps)"
curl_rtsp_msg="no (--enable-rtsp)"
curl_rtmp_msg="no (--with-librtmp)"
+ curl_mtlnk_msg="no (--with-libmetalink)"
+
+ init_ssl_msg=${curl_ssl_msg}
dnl
-dnl Save anything in $LIBS for later
+dnl Save some initial values the user might have provided
dnl
-ALL_LIBS=$LIBS
+INITIAL_LDFLAGS=$LDFLAGS
+INITIAL_LIBS=$LIBS
dnl
dnl Detect the canonical host and target build environment
@@ -171,7 +183,6 @@ dnl Get system canonical name
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
dnl Checks for programs.
-CURL_CHECK_PROG_CC
dnl Our curl_off_t internal and external configure settings
CURL_CONFIGURE_CURL_OFF_T
@@ -186,72 +197,50 @@ CURL_CONFIGURE_REENTRANT
dnl check for how to do large files
AC_SYS_LARGEFILE
-dnl support building of Windows DLLs
-AC_LIBTOOL_WIN32_DLL
+XC_LIBTOOL
-dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
-AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
-case $host in
- x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
- AC_MSG_RESULT([yes])
- with_pic=yes
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
-esac
+#
+# Automake conditionals based on libtool related checks
+#
-AC_MSG_CHECKING([if compiler is icc (to build with PIC)])
-case $CC in
- icc | */icc)
- AC_MSG_RESULT([yes])
- with_pic=yes
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
-esac
+AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSION_INFO],
+ [test "x$xc_lt_shlib_use_version_info" = 'xyes'])
+AM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED],
+ [test "x$xc_lt_shlib_use_no_undefined" = 'xyes'])
+AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT],
+ [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'])
-dnl libtool setup
-AC_PROG_LIBTOOL
+#
+# Due to libtool and automake machinery limitations of not allowing
+# specifying separate CPPFLAGS or CFLAGS when compiling objects for
+# inclusion of these in shared or static libraries, we are forced to
+# build using separate configure runs for shared and static libraries
+# on systems where different CPPFLAGS or CFLAGS are mandatory in order
+# to compile objects for each kind of library. Notice that relying on
+# the '-DPIC' CFLAG that libtool provides is not valid given that the
+# user might for example choose to build static libraries with PIC.
+#
-AC_MSG_CHECKING([if we need -mimpure-text])
-mimpure=no
-case $host in
- *-*-solaris2*)
- if test "$GCC" = "yes"; then
- mimpure="yes"
- fi
- ;;
- *)
- ;;
-esac
-AC_MSG_RESULT($mimpure)
-AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
+#
+# Make our Makefile.am files use the staticlib CPPFLAG only when strictly
+# targeting a static library and not building its shared counterpart.
+#
-dnl 'STATICLIB' is, in spite of its name, not generic but only for static-only
-dnl builds on Windows
-AM_CONDITIONAL(STATICLIB, false)
+AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB],
+ [test "x$xc_lt_build_static_only" = 'xyes'])
+
+#
+# Make staticlib CPPFLAG variable and its definition visible in output
+# files unconditionally, providing an empty definition unless strictly
+# targeting a static library and not building its shared counterpart.
+#
+
+CPPFLAG_CURL_STATICLIB=
+if test "x$xc_lt_build_static_only" = 'xyes'; then
+ CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB'
+fi
+AC_SUBST([CPPFLAG_CURL_STATICLIB])
-AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
-case $host in
- *-*-mingw*)
- AC_DEFINE(BUILDING_LIBCURL, 1, [when building libcurl itself])
- AC_MSG_RESULT(yes)
- AC_MSG_CHECKING([if we need CURL_STATICLIB])
- if test "X$enable_shared" = "Xno"
- then
- AC_DEFINE(CURL_STATICLIB, 1, [when not building a shared library])
- AC_MSG_RESULT(yes)
- AM_CONDITIONAL(STATICLIB, true)
- else
- AC_MSG_RESULT(no)
- fi
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
-esac
# Determine whether all dependent libraries must be specified when linking
if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
@@ -261,10 +250,7 @@ else
REQUIRE_LIB_DEPS=yes
fi
AC_SUBST(REQUIRE_LIB_DEPS)
-
-dnl The install stuff has already been taken care of by the automake stuff
-dnl AC_PROG_INSTALL
-AC_PROG_MAKE_SET
+AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes)
dnl check if there's a way to force code inline
AC_C_INLINE
@@ -293,13 +279,50 @@ fi
CURL_CHECK_COMPILER_HALT_ON_ERROR
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
-
-CURL_CHECK_NO_UNDEFINED
-AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
+CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
+CURL_CHECK_COMPILER_SYMBOL_HIDING
CURL_CHECK_CURLDEBUG
AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
+supports_unittests=yes
+# cross-compilation of unit tests static library/programs fails when
+# libcurl shared library is built. This might be due to a libtool or
+# automake issue. In this case we disable unit tests.
+if test "x$cross_compiling" != "xno" &&
+ test "x$enable_shared" != "xno"; then
+ supports_unittests=no
+fi
+
+# IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
+# a problem related with OpenSSL headers and library versions not matching.
+# Disable unit tests while time to further investigate this is found.
+case $host in
+ mips-sgi-irix6.5)
+ if test "$compiler_id" = "GNU_C"; then
+ supports_unittests=no
+ fi
+ ;;
+esac
+
+# All AIX autobuilds fails unit tests linking against unittests library
+# due to unittests library being built with no symbols or members. Libtool ?
+# Disable unit tests while time to further investigate this is found.
+case $host_os in
+ aix*)
+ supports_unittests=no
+ ;;
+esac
+
+dnl Build unit tests when option --enable-debug is given.
+if test "x$want_debug" = "xyes" &&
+ test "x$supports_unittests" = "xyes"; then
+ want_unittests=yes
+else
+ want_unittests=no
+fi
+AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
+
dnl **********************************************************************
dnl Compilation based checks should not be done before this point.
dnl **********************************************************************
@@ -552,6 +575,22 @@ 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])
@@ -607,10 +646,43 @@ AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
dnl The actual use of the USE_MANUAL variable is done much later in this
dnl script to allow other actions to disable it as well.
+dnl ************************************************************
+dnl disable C code generation support
+dnl
+AC_MSG_CHECKING([whether to enable generation of C code])
+AC_ARG_ENABLE(libcurl_option,
+AC_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
+AC_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
+[ case "$enableval" in
+ no)
+ AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
+ curl_libcurl_msg="no"
+ ;;
+ *) AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
dnl **********************************************************************
dnl Checks for libraries.
dnl **********************************************************************
+AC_MSG_CHECKING([whether to use libgcc])
+AC_ARG_ENABLE(libgcc,
+AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
+[ case "$enableval" in
+ yes)
+ LIBS="-lgcc $LIBS"
+ AC_MSG_RESULT(yes)
+ ;;
+ *) AC_MSG_RESULT(no)
+ ;;
+ esac ],
+ AC_MSG_RESULT(no)
+)
+
CURL_CHECK_LIB_XNET
dnl gethostbyname without lib or in the nsl lib?
@@ -619,7 +691,7 @@ AC_CHECK_FUNC(gethostbyname,
],
[ AC_CHECK_LIB(nsl, gethostbyname,
[HAVE_GETHOSTBYNAME="1"
- LIBS="$LIBS -lnsl"
+ LIBS="-lnsl $LIBS"
])
])
@@ -628,7 +700,18 @@ then
dnl gethostbyname in the socket lib?
AC_CHECK_LIB(socket, gethostbyname,
[HAVE_GETHOSTBYNAME="1"
- LIBS="$LIBS -lsocket"
+ LIBS="-lsocket $LIBS"
+ ])
+fi
+
+if test "$HAVE_GETHOSTBYNAME" != "1"
+then
+ dnl gethostbyname in the watt lib?
+ AC_CHECK_LIB(watt, gethostbyname,
+ [HAVE_GETHOSTBYNAME="1"
+ CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
+ LDFLAGS="-L/dev/env/WATT_ROOT/lib"
+ LIBS="-lwatt $LIBS"
])
fi
@@ -747,7 +830,7 @@ then
dnl gethostbyname in the network lib - for Haiku OS
AC_CHECK_LIB(network, gethostbyname,
[HAVE_GETHOSTBYNAME="1"
- LIBS="$LIBS -lnetwork"
+ LIBS="-lnetwork $LIBS"
])
fi
@@ -756,7 +839,7 @@ then
dnl gethostbyname in the net lib - for BeOS
AC_CHECK_LIB(net, gethostbyname,
[HAVE_GETHOSTBYNAME="1"
- LIBS="$LIBS -lnet"
+ LIBS="-lnet $LIBS"
])
fi
@@ -788,25 +871,108 @@ CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
dnl **********************************************************************
dnl The preceding library checks are all potentially useful for test
-dnl servers (for providing networking support). Save the list of required
-dnl libraries at this point for use while linking those test servers.
+dnl servers and libtest cases which require networking and clock_gettime
+dnl support. Save the list of required libraries at this point for use
+dnl while linking those test servers and programs.
dnl **********************************************************************
-TEST_SERVER_LIBS=$LIBS
+CURL_NETWORK_AND_TIME_LIBS=$LIBS
dnl **********************************************************************
-AC_MSG_CHECKING([whether to use libgcc])
-AC_ARG_ENABLE(libgcc,
-AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
-[ case "$enableval" in
- yes)
- ALL_LIBS="$ALL_LIBS -lgcc"
- AC_MSG_RESULT(yes)
- ;;
- *) AC_MSG_RESULT(no)
- ;;
- esac ],
- AC_MSG_RESULT(no)
-)
+dnl Check for the presence of ZLIB libraries and headers
+dnl **********************************************************************
+
+dnl Check for & handle argument to --with-zlib.
+
+clean_CPPFLAGS=$CPPFLAGS
+clean_LDFLAGS=$LDFLAGS
+clean_LIBS=$LIBS
+ZLIB_LIBS=""
+AC_ARG_WITH(zlib,
+AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
+AC_HELP_STRING([--without-zlib],[disable use of zlib]),
+ [OPT_ZLIB="$withval"])
+
+if test "$OPT_ZLIB" = "no" ; then
+ AC_MSG_WARN([zlib disabled])
+else
+ if test "$OPT_ZLIB" = "yes" ; then
+ OPT_ZLIB=""
+ fi
+
+ if test -z "$OPT_ZLIB" ; then
+ dnl check for the lib first without setting any new path, since many
+ dnl people have it in the default path
+
+ AC_CHECK_LIB(z, inflateEnd,
+ dnl libz found, set the variable
+ [HAVE_LIBZ="1"
+ LIBS="-lz $LIBS"],
+ dnl if no lib found, try /usr/local
+ [OPT_ZLIB="/usr/local"])
+
+ fi
+
+ dnl Add a nonempty path to the compiler flags
+ if test -n "$OPT_ZLIB"; then
+ CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
+ LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
+ fi
+
+ AC_CHECK_HEADER(zlib.h,
+ [
+ dnl zlib.h was found
+ HAVE_ZLIB_H="1"
+ dnl if the lib wasn't found already, try again with the new paths
+ if test "$HAVE_LIBZ" != "1"; then
+ AC_CHECK_LIB(z, gzread,
+ [
+ dnl the lib was found!
+ HAVE_LIBZ="1"
+ LIBS="-lz $LIBS"
+ ],
+ [ CPPFLAGS=$clean_CPPFLAGS
+ LDFLAGS=$clean_LDFLAGS])
+ fi
+ ],
+ [
+ dnl zlib.h was not found, restore the flags
+ CPPFLAGS=$clean_CPPFLAGS
+ LDFLAGS=$clean_LDFLAGS]
+ )
+
+ if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
+ then
+ AC_MSG_WARN([configure found only the libz lib, not the header file!])
+ HAVE_LIBZ=""
+ CPPFLAGS=$clean_CPPFLAGS
+ LDFLAGS=$clean_LDFLAGS
+ LIBS=$clean_LIBS
+ elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
+ then
+ AC_MSG_WARN([configure found only the libz header file, not the lib!])
+ CPPFLAGS=$clean_CPPFLAGS
+ LDFLAGS=$clean_LDFLAGS
+ LIBS=$clean_LIBS
+ elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
+ then
+ dnl both header and lib were found!
+ AC_SUBST(HAVE_LIBZ)
+ AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
+ AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
+
+ ZLIB_LIBS="-lz"
+ LIBS="-lz $clean_LIBS"
+
+ dnl replace 'HAVE_LIBZ' in the automake makefile.ams
+ AMFIXLIB="1"
+ AC_MSG_NOTICE([found both libz and libz.h header])
+ curl_zlib_msg="enabled"
+ fi
+fi
+
+dnl set variable for use in automakefile(s)
+AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
+AC_SUBST(ZLIB_LIBS)
dnl **********************************************************************
dnl Check for LDAP
@@ -841,9 +1007,9 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
- AC_SUBST(CURL_DISABLE_LDAP, [1])])
+ AC_SUBST(CURL_DISABLE_LDAP, [1])
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
- AC_SUBST(CURL_DISABLE_LDAPS, [1])
+ AC_SUBST(CURL_DISABLE_LDAPS, [1])])
else
dnl Try to find the right ldap libraries for this system
CURL_CHECK_LIBS_LDAP
@@ -868,9 +1034,9 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
- AC_SUBST(CURL_DISABLE_LDAP, [1])])
+ AC_SUBST(CURL_DISABLE_LDAP, [1])
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
- AC_SUBST(CURL_DISABLE_LDAPS, [1])
+ AC_SUBST(CURL_DISABLE_LDAPS, [1])])
fi
fi
fi
@@ -880,7 +1046,7 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
if test "$LDAPLIBNAME" = "wldap32"; then
curl_ldap_msg="enabled (winldap)"
- AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation])
+ AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
else
curl_ldap_msg="enabled (OpenLDAP)"
if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
@@ -898,10 +1064,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)
@@ -915,6 +1081,7 @@ AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]),
AC_TRY_RUN([ /* is AF_INET6 available? */
#include <sys/types.h>
#include <sys/socket.h>
+#include <stdlib.h> /* for exit() */
main()
{
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
@@ -955,16 +1122,19 @@ dnl Check if the operating system allows programs to write to their own argv[]
dnl **********************************************************************
AC_MSG_CHECKING([if argv can be written to])
-AC_CACHE_VAL(curl_cv_writable_argv, [
-AC_RUN_IFELSE([[
+AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
int main(int argc, char ** argv) {
- argv[0][0] = ' ';
- return (argv[0][0] == ' ')?0:1;
+ argv[0][0] = ' ';
+ return (argv[0][0] == ' ')?0:1;
}
- ]],
- curl_cv_writable_argv=yes,
- curl_cv_writable_argv=no,
- curl_cv_writable_argv=cross)
+ ]])
+],[
+ curl_cv_writable_argv=yes
+],[
+ curl_cv_writable_argv=no
+],[
+ curl_cv_writable_argv=cross
])
case $curl_cv_writable_argv in
yes)
@@ -981,159 +1151,29 @@ no)
esac
dnl **********************************************************************
-dnl Check for the presence of Kerberos4 libraries and headers
-dnl **********************************************************************
-
-AC_ARG_WITH(krb4-includes,
-AC_HELP_STRING([--with-krb4-includes=DIR],
- [Specify location of kerberos4 headers]),[
- CPPFLAGS="$CPPFLAGS -I$withval"
- KRB4INC="$withval"
- want_krb4=yes
- ])
-
-AC_ARG_WITH(krb4-libs,
-AC_HELP_STRING([--with-krb4-libs=DIR],[Specify location of kerberos4 libs]),[
- LDFLAGS="$LDFLAGS -L$withval"
- KRB4LIB="$withval"
- want_krb4=yes
- ])
-
-
-OPT_KRB4=off
-AC_ARG_WITH(krb4,dnl
-AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[
- OPT_KRB4="$withval"
- if test X"$OPT_KRB4" != Xno; then
- want_krb4="yes"
- if test X"$OPT_KRB4" != Xyes; then
- LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
- KRB4LIB="$OPT_KRB4/lib$libsuff"
- CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
- KRB4INC="$OPT_KRB4/include"
- fi
- fi
- ])
-
-AC_MSG_CHECKING([if Kerberos4 support is requested])
-
-if test "$want_krb4" = yes
-then
- if test "$ipv6" = "yes"; then
- echo krb4 is not compatible with IPv6
- exit 1
- fi
- AC_MSG_RESULT(yes)
-
- dnl Check for & handle argument to --with-krb4
-
- AC_MSG_CHECKING(where to look for Kerberos4)
- if test X"$OPT_KRB4" = Xyes
- then
- AC_MSG_RESULT([defaults])
- else
- AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC])
- fi
-
- dnl Check for DES library
- AC_CHECK_LIB(des, des_pcbc_encrypt,
- [
- AC_CHECK_HEADERS(des.h)
-
- dnl resolv lib?
- AC_CHECK_FUNC(res_search, , [AC_CHECK_LIB(resolv, res_search)])
-
- dnl Check for the Kerberos4 library
- AC_CHECK_LIB(krb, krb_net_read,
- [
- dnl Check for header files
- AC_CHECK_HEADERS(krb.h)
-
- dnl we found the required libraries, add to LIBS
- LIBS="-lkrb -lcom_err -ldes $LIBS"
-
- dnl Check for function krb_get_our_ip_for_realm
- dnl this is needed for NAT networks
- AC_CHECK_FUNCS(krb_get_our_ip_for_realm)
-
- dnl add define KRB4
- AC_DEFINE(HAVE_KRB4, 1,
- [if you have the Kerberos4 libraries (including -ldes)])
-
- dnl substitute it too!
- KRB4_ENABLED=1
- AC_SUBST(KRB4_ENABLED)
-
- curl_krb4_msg="enabled"
-
- dnl the krb4 stuff needs a strlcpy()
- AC_CHECK_FUNCS(strlcpy)
-
- ])
- ])
-else
- AC_MSG_RESULT(no)
-fi
-
-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 **********************************************************************
-dnl check for gss stuff in the /usr as default
+dnl check for GSS-API stuff in the /usr as default
GSSAPI_ROOT="/usr"
AC_ARG_WITH(gssapi-includes,
AC_HELP_STRING([--with-gssapi-includes=DIR],
- [Specify location of GSSAPI header]),
+ [Specify location of GSS-API headers]),
[ GSSAPI_INCS="-I$withval"
want_gss="yes" ]
)
AC_ARG_WITH(gssapi-libs,
AC_HELP_STRING([--with-gssapi-libs=DIR],
- [Specify location of GSSAPI libs]),
+ [Specify location of GSS-API libs]),
[ GSSAPI_LIB_DIR="-L$withval"
want_gss="yes" ]
)
AC_ARG_WITH(gssapi,
AC_HELP_STRING([--with-gssapi=DIR],
- [Where to look for GSSAPI]), [
+ [Where to look for GSS-API]), [
GSSAPI_ROOT="$withval"
if test x"$GSSAPI_ROOT" != xno; then
want_gss="yes"
@@ -1144,14 +1184,18 @@ AC_ARG_WITH(gssapi,
fi
])
+: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
+
save_CPPFLAGS="$CPPFLAGS"
-AC_MSG_CHECKING([if GSSAPI support is requested])
+AC_MSG_CHECKING([if GSS-API support is requested])
if test x"$want_gss" = xyes; then
AC_MSG_RESULT(yes)
if test -z "$GSSAPI_INCS"; then
- if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
- GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
+ if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
+ GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
+ elif test -f "$KRB5CONFIG"; then
+ GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
elif test "$GSSAPI_ROOT" != "yes"; then
GSSAPI_INCS="-I$GSSAPI_ROOT/include"
fi
@@ -1162,7 +1206,7 @@ if test x"$want_gss" = xyes; then
AC_CHECK_HEADER(gss.h,
[
dnl found in the given dirs
- AC_DEFINE(HAVE_GSSGNU, 1, [if you have the GNU gssapi libraries])
+ AC_DEFINE(HAVE_GSSGNU, 1, [if you have GNU GSS])
gnu_gss=yes
],
[
@@ -1183,19 +1227,19 @@ AC_INCLUDES_DEFAULT
AC_CHECK_HEADER(gssapi.h,
[
dnl found
- AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
+ AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have Heimdal])
],
[
dnl no header found, disabling GSS
want_gss=no
- AC_MSG_WARN(disabling GSSAPI since no header files was found)
+ AC_MSG_WARN(disabling GSS-API support since no header files were found)
]
)
else
dnl MIT found
- AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
- dnl check if we have a really old MIT kerberos (<= 1.2)
- AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE])
+ AC_DEFINE(HAVE_GSSMIT, 1, [if you have MIT Kerberos])
+ dnl check if we have a really old MIT Kerberos version (<= 1.2)
+ AC_MSG_CHECKING([if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <gssapi/gssapi.h>
@@ -1213,7 +1257,7 @@ AC_INCLUDES_DEFAULT
],[
AC_MSG_RESULT([no])
AC_DEFINE(HAVE_OLD_GSSMIT, 1,
- [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE])
+ [if you have an old MIT Kerberos version, lacking GSS_C_NT_HOSTBASED_SERVICE])
])
fi
]
@@ -1222,41 +1266,117 @@ else
AC_MSG_RESULT(no)
fi
if test x"$want_gss" = xyes; then
- AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
-
- curl_gss_msg="enabled (MIT/Heimdal)"
+ 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
curl_gss_msg="enabled (GNU GSS)"
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
- LIBS="$LIBS -lgss"
+ LIBS="-lgss $LIBS"
elif test -z "$GSSAPI_LIB_DIR"; then
case $host in
*-*-darwin*)
- LIBS="$LIBS -lgssapi_krb5 -lresolv"
+ LIBS="-lgssapi_krb5 -lresolv $LIBS"
;;
*)
- if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
+ 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
+ dnl into LIBS
+ gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
+ LIBS="$gss_libs $LIBS"
+ elif test -f "$KRB5CONFIG"; then
dnl krb5-config doesn't have --libs-only-L or similar, put everything
dnl into LIBS
- gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
- LIBS="$LIBS $gss_libs"
- elif test "$GSSAPI_ROOT" != "yes"; then
- LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
- LIBS="$LIBS -lgssapi"
+ gss_libs=`$KRB5CONFIG --libs gssapi`
+ LIBS="$gss_libs $LIBS"
else
- LIBS="$LIBS -lgssapi"
+ 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
fi
;;
esac
else
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
- LIBS="$LIBS -lgssapi"
+ case $host in
+ *-hp-hpux*)
+ LIBS="-lgss $LIBS"
+ ;;
+ *)
+ LIBS="-lgssapi $LIBS"
+ ;;
+ esac
fi
else
CPPFLAGS="$save_CPPFLAGS"
fi
+dnl -------------------------------------------------
+dnl check winssl option before other SSL libraries
+dnl -------------------------------------------------
+
+OPT_WINSSL=no
+AC_ARG_WITH(winssl,dnl
+AC_HELP_STRING([--with-winssl],[enable Windows native SSL/TLS])
+AC_HELP_STRING([--without-winssl], [disable Windows native SSL/TLS]),
+ OPT_WINSSL=$withval)
+
+AC_MSG_CHECKING([whether to enable Windows native SSL/TLS (Windows native builds only)])
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+ if test "x$OPT_WINSSL" != "xno" &&
+ test "x$ac_cv_native_windows" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
+ AC_SUBST(USE_SCHANNEL, [1])
+ curl_ssl_msg="enabled (Windows-native)"
+ WINSSL_ENABLED=1
+ # --with-winssl implies --enable-sspi
+ AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
+ AC_SUBST(USE_WINDOWS_SSPI, [1])
+ curl_sspi_msg="enabled"
+ else
+ AC_MSG_RESULT(no)
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+OPT_DARWINSSL=no
+AC_ARG_WITH(darwinssl,dnl
+AC_HELP_STRING([--with-darwinssl],[enable iOS/Mac OS X native SSL/TLS])
+AC_HELP_STRING([--without-darwinssl], [disable iOS/Mac OS X native SSL/TLS]),
+ OPT_DARWINSSL=$withval)
+
+AC_MSG_CHECKING([whether to enable iOS/Mac OS X native SSL/TLS])
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+ if test "x$OPT_DARWINSSL" != "xno" &&
+ test -d "/System/Library/Frameworks/Security.framework"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_DARWINSSL, 1, [to enable iOS/Mac OS X native SSL/TLS support])
+ AC_SUBST(USE_DARWINSSL, [1])
+ curl_ssl_msg="enabled (iOS/Mac OS X-native)"
+ DARWINSSL_ENABLED=1
+ LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
+ else
+ AC_MSG_RESULT(no)
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
dnl **********************************************************************
dnl Check for the presence of SSL libraries and headers
dnl **********************************************************************
@@ -1270,7 +1390,7 @@ AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the
AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
OPT_SSL=$withval)
-if test X"$OPT_SSL" != Xno; then
+if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
dnl backup the pre-ssl variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
@@ -1304,7 +1424,7 @@ if test X"$OPT_SSL" != Xno; then
dnl the user told us to look
OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
- if test -e "$OPENSSL_PCDIR/openssl.pc"; then
+ if test -f "$OPENSSL_PCDIR/openssl.pc"; then
PKGTEST="yes"
fi
@@ -1333,6 +1453,7 @@ if test X"$OPT_SSL" != Xno; then
SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
+ AC_SUBST(SSL_LIBS)
AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
@@ -1345,7 +1466,7 @@ if test X"$OPT_SSL" != Xno; then
dnl the argument to --with-ssl we don't know what
dnl additional libs may be necessary. Hope that we
dnl don't need any.
- LIBS="$LIBS $SSL_LIBS"
+ LIBS="$SSL_LIBS $LIBS"
fi
fi
@@ -1397,7 +1518,7 @@ if test X"$OPT_SSL" != Xno; then
dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
OLIBS=$LIBS
- LIBS="$LIBS -lRSAglue -lrsaref"
+ LIBS="-lRSAglue -lrsaref $LIBS"
AC_CHECK_LIB(ssl, SSL_connect)
if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
dnl still no SSL_connect
@@ -1409,7 +1530,7 @@ if test X"$OPT_SSL" != Xno; then
else
- dnl Have the libraries--check for SSLeay/OpenSSL headers
+ dnl Have the libraries--check for OpenSSL headers
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
openssl/pem.h openssl/ssl.h openssl/err.h,
curl_ssl_msg="enabled (OpenSSL)"
@@ -1433,17 +1554,11 @@ if test X"$OPT_SSL" != Xno; then
fi
if test X"$OPENSSL_ENABLED" = X"1"; then
- AC_DEFINE(USE_SSLEAY, 1, [if SSL is enabled])
-
dnl is there a pkcs12.h header present?
AC_CHECK_HEADERS(openssl/pkcs12.h)
else
LIBS="$CLEANLIBS"
fi
- dnl USE_SSLEAY is the historical name for what configure calls
- dnl OPENSSL_ENABLED; the names should really be unified
- USE_SSLEAY="$OPENSSL_ENABLED"
- AC_SUBST(USE_SSLEAY)
if test X"$OPT_SSL" != Xoff &&
test "$OPENSSL_ENABLED" != "1"; then
@@ -1460,36 +1575,42 @@ if test X"$OPT_SSL" != Xno; then
AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
])
- dnl these can only exist if openssl exists
- dnl yassl doesn't have SSL_get_shutdown
+ dnl These can only exist if OpenSSL exists
+ dnl Older versions of Cyassl (some time before 2.9.4) don't have
+ dnl SSL_get_shutdown (but this check won't actually detect it there
+ dnl as it's a macro that needs the header files be included)
+ dnl BoringSSL doesn't have DES_set_odd_parity
AC_CHECK_FUNCS( RAND_status \
RAND_screen \
RAND_egd \
ENGINE_cleanup \
CRYPTO_cleanup_all_ex_data \
- SSL_get_shutdown )
-
- dnl Make an attempt to detect if this is actually yassl's headers and
- dnl OpenSSL emulation layer. We still leave everything else believing
- dnl and acting like OpenSSL.
-
- AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode])
+ SSL_get_shutdown \
+ SSLv2_client_method \
+ DES_set_odd_parity )
+
+ AC_MSG_CHECKING([for BoringSSL])
+ if test "x$ac_cv_func_DES_set_odd_parity" != "xyes"; then
+ curl_ssl_msg="enabled (BoringSSL)"
+ AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
+ [Define to 1 if using BoringSSL.])
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ AC_MSG_CHECKING([for libressl])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#include <openssl/ssl.h>
+#include <openssl/opensslv.h>
]],[[
-#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
- int dummy = SSL_ERROR_NONE;
-#else
- Not the yaSSL OpenSSL compatibility header.
-#endif
+ int dummy = LIBRESSL_VERSION_NUMBER;
]])
],[
AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
- [Define to 1 if using yaSSL in OpenSSL compatibility mode.])
- curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
+ AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
+ [Define to 1 if using libressl.])
+ curl_ssl_msg="enabled (libressl)"
],[
AC_MSG_RESULT([no])
])
@@ -1500,102 +1621,18 @@ if test X"$OPT_SSL" != Xno; then
dnl when the ssl shared libs were found in a path that the run-time
dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
dnl to prevent further configure tests to fail due to this
-
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
- export LD_LIBRARY_PATH
- AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
+ if test "x$cross_compiling" != "xyes"; then
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
+ export LD_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
+ fi
fi
+ CURL_CHECK_OPENSSL_API
fi
fi
dnl **********************************************************************
-dnl Check for the presence of ZLIB libraries and headers
-dnl **********************************************************************
-
-dnl Check for & handle argument to --with-zlib.
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-AC_ARG_WITH(zlib,
-AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
-AC_HELP_STRING([--without-zlib],[disable use of zlib]),
- [OPT_ZLIB="$withval"])
-
-if test "$OPT_ZLIB" = "no" ; then
- AC_MSG_WARN([zlib disabled])
-else
- if test "$OPT_ZLIB" = "yes" ; then
- OPT_ZLIB=""
- fi
-
- if test -z "$OPT_ZLIB" ; then
- dnl check for the lib first without setting any new path, since many
- dnl people have it in the default path
-
- AC_CHECK_LIB(z, inflateEnd,
- dnl libz found, set the variable
- [HAVE_LIBZ="1"],
- dnl if no lib found, try /usr/local
- [OPT_ZLIB="/usr/local"])
-
- fi
-
- dnl Add a nonempty path to the compiler flags
- if test -n "$OPT_ZLIB"; then
- CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
- LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
- fi
-
- AC_CHECK_HEADER(zlib.h,
- [
- dnl zlib.h was found
- HAVE_ZLIB_H="1"
- dnl if the lib wasn't found already, try again with the new paths
- if test "$HAVE_LIBZ" != "1"; then
- AC_CHECK_LIB(z, gzread,
- [
- dnl the lib was found!
- HAVE_LIBZ="1"
- ],
- [ CPPFLAGS=$_cppflags
- LDFLAGS=$_ldflags])
- fi
- ],
- [
- dnl zlib.h was not found, restore the flags
- CPPFLAGS=$_cppflags
- LDFLAGS=$_ldflags]
- )
-
- if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
- then
- AC_MSG_WARN([configure found only the libz lib, not the header file!])
- HAVE_LIBZ=""
- elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
- then
- AC_MSG_WARN([configure found only the libz header file, not the lib!])
- elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
- then
- dnl both header and lib were found!
- AC_SUBST(HAVE_LIBZ)
- AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
- AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
-
- CURL_LIBS="$CURL_LIBS -lz"
- LIBS="$LIBS -lz"
-
- dnl replace 'HAVE_LIBZ' in the automake makefile.ams
- AMFIXLIB="1"
- AC_MSG_NOTICE([found both libz and libz.h header])
- curl_zlib_msg="enabled"
- fi
-fi
-
-dnl set variable for use in automakefile(s)
-AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
-
-dnl **********************************************************************
dnl Check for the random seed preferences
dnl **********************************************************************
@@ -1616,8 +1653,12 @@ if test X"$OPENSSL_ENABLED" = X"1"; then
[read randomness from FILE (default=/dev/urandom)]),
[ RANDOM_FILE="$withval" ],
[
- dnl Check for random device
- AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
+ if test x$cross_compiling != xyes; then
+ dnl Check for random device
+ AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
+ else
+ AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling])
+ fi
]
)
if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
@@ -1627,6 +1668,17 @@ if test X"$OPENSSL_ENABLED" = X"1"; then
fi
fi
+dnl ---
+dnl We require OpenSSL with SRP support.
+dnl ---
+if test "$OPENSSL_ENABLED" = "1"; then
+ AC_CHECK_LIB(crypto, SRP_Calc_client_key,
+ [
+ AC_DEFINE(HAVE_OPENSSL_SRP, 1, [if you have the function SRP_Calc_client_key])
+ AC_SUBST(HAVE_OPENSSL_SRP, [1])
+ ])
+fi
+
dnl ----------------------------------------------------
dnl check for GnuTLS
dnl ----------------------------------------------------
@@ -1635,15 +1687,20 @@ dnl Default to compiler & linker defaults for GnuTLS files & libraries.
OPT_GNUTLS=no
AC_ARG_WITH(gnutls,dnl
-AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root (default: /usr/local/)])
+AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root])
AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
OPT_GNUTLS=$withval)
-if test "$OPENSSL_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
if test X"$OPT_GNUTLS" != Xno; then
addld=""
+ addlib=""
+ gtlslib=""
+ version=""
+ addcflags=""
+
if test "x$OPT_GNUTLS" = "xyes"; then
dnl this is with no partiular path given
CURL_CHECK_PKGCONFIG(gnutls)
@@ -1694,9 +1751,9 @@ if test "$OPENSSL_ENABLED" != "1"; then
CLEANLIBS="$LIBS"
CLEANCPPFLAGS="$CPPFLAGS"
- CLEADLDFLAGS="$LDFLAGS"
+ CLEANLDFLAGS="$LDFLAGS"
- LIBS="$LIBS $addlib"
+ LIBS="$addlib $LIBS"
LDFLAGS="$LDFLAGS $addld"
if test "$addcflags" != "-I/usr/include"; then
CPPFLAGS="$CPPFLAGS $addcflags"
@@ -1723,10 +1780,11 @@ if test "$OPENSSL_ENABLED" != "1"; then
dnl linker doesn't search through, we need to add it to
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
dnl due to this
-
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
- export LD_LIBRARY_PATH
- AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
+ if test "x$cross_compiling" != "xyes"; then
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
+ export LD_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
+ fi
fi
fi
@@ -1734,20 +1792,47 @@ if test "$OPENSSL_ENABLED" != "1"; then
fi dnl GNUTLS not disabled
-fi dnl OPENSSL != 1
+fi
dnl ---
-dnl If GnuTLS is enabled, we MUST verify that it uses libgcrypt since
-dnl curl code relies on that but recent GnuTLS versions can in fact build
-dnl with different crypto libraries which curl right now cannot handle
+dnl Check which crypto backend GnuTLS uses
dnl ---
if test "$GNUTLS_ENABLED" = "1"; then
- AC_CHECK_LIB(gcrypt,
- gcry_control, ,
- [
- AC_MSG_ERROR([need GnuTLS built with gcrypt to function with GnuTLS])
- ])
+ USE_GNUTLS_NETTLE=
+ # First check if we can detect either crypto library via transitive linking
+ AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
+ if test "$USE_GNUTLS_NETTLE" = ""; then
+ AC_CHECK_LIB(gnutls, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
+ fi
+ # If not, try linking directly to both of them to see if they are available
+ if test "$USE_GNUTLS_NETTLE" = ""; then
+ AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
+ fi
+ if test "$USE_GNUTLS_NETTLE" = ""; then
+ AC_CHECK_LIB(gcrypt, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
+ fi
+ if test "$USE_GNUTLS_NETTLE" = ""; then
+ AC_MSG_ERROR([GnuTLS found, but neither gcrypt nor nettle found])
+ fi
+ if test "$USE_GNUTLS_NETTLE" = "1"; then
+ AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend])
+ AC_SUBST(USE_GNUTLS_NETTLE, [1])
+ LIBS="-lnettle $LIBS"
+ else
+ LIBS="-lgcrypt $LIBS"
+ fi
+fi
+
+dnl ---
+dnl We require GnuTLS with SRP support.
+dnl ---
+if test "$GNUTLS_ENABLED" = "1"; then
+ AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
+ [
+ AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
+ AC_SUBST(HAVE_GNUTLS_SRP, [1])
+ ])
fi
dnl ----------------------------------------------------
@@ -1760,11 +1845,11 @@ OPT_POLARSSL=no
_cppflags=$CPPFLAGS
_ldflags=$LDFLAGS
AC_ARG_WITH(polarssl,dnl
-AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root (default: /usr/local/)])
+AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root])
AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
OPT_POLARSSL=$withval)
-if test "$OPENSSL_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
if test X"$OPT_POLARSSL" != Xno; then
@@ -1786,6 +1871,11 @@ if test "$OPENSSL_ENABLED" != "1"; then
])
fi
+ addld=""
+ addlib=""
+ addcflags=""
+ polarssllib=""
+
if test "x$USE_POLARSSL" != "xyes"; then
dnl add the path and test again
addld=-L$OPT_POLARSSL/lib$libsuff
@@ -1814,25 +1904,174 @@ if test "$OPENSSL_ENABLED" != "1"; then
if test "x$USE_POLARSSL" = "xyes"; then
AC_MSG_NOTICE([detected PolarSSL])
- CURL_LIBS="$CURL_LIBS -lpolarssl"
- LIBS="$LIBS -lpolarssl"
+ LIBS="-lpolarssl $LIBS"
if test -n "$polarssllib"; then
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
dnl due to this
+ if test "x$cross_compiling" != "xyes"; then
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
+ export LD_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
+ fi
+ fi
+ fi
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
- export LD_LIBRARY_PATH
- AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
+ fi dnl PolarSSL not disabled
+
+fi
+
+dnl ----------------------------------------------------
+dnl check for CyaSSL
+dnl ----------------------------------------------------
+
+dnl Default to compiler & linker defaults for CyaSSL files & libraries.
+OPT_CYASSL=no
+
+_cppflags=$CPPFLAGS
+_ldflags=$LDFLAGS
+AC_ARG_WITH(cyassl,dnl
+AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: system lib default)])
+AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
+ OPT_CYASSL=$withval)
+
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+
+ if test X"$OPT_CYASSL" != Xno; then
+
+ if test "$OPT_CYASSL" = "yes"; then
+ OPT_CYASSL=""
+ fi
+
+ dnl This should be reworked to use pkg-config instead
+
+ cyassllibname=cyassl
+
+ if test -z "$OPT_CYASSL" ; then
+ dnl check for lib in system default first
+
+ AC_CHECK_LIB(cyassl, CyaSSL_Init,
+ dnl libcyassl found, set the variable
+ [
+ AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
+ AC_SUBST(USE_CYASSL, [1])
+ CYASSL_ENABLED=1
+ USE_CYASSL="yes"
+ curl_ssl_msg="enabled (CyaSSL)"
+ ])
+ fi
+
+ addld=""
+ addlib=""
+ addcflags=""
+ cyassllib=""
+
+ if test "x$USE_CYASSL" != "xyes"; then
+ dnl add the path and test again
+ addld=-L$OPT_CYASSL/lib$libsuff
+ addcflags=-I$OPT_CYASSL/include
+ cyassllib=$OPT_CYASSL/lib$libsuff
+
+ LDFLAGS="$LDFLAGS $addld"
+ if test "$addcflags" != "-I/usr/include"; then
+ CPPFLAGS="$CPPFLAGS $addcflags"
fi
+ AC_CHECK_LIB(cyassl, CyaSSL_Init,
+ [
+ AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
+ AC_SUBST(USE_CYASSL, [1])
+ CYASSL_ENABLED=1
+ USE_CYASSL="yes"
+ curl_ssl_msg="enabled (CyaSSL)"
+ ],
+ [
+ CPPFLAGS=$_cppflags
+ LDFLAGS=$_ldflags
+ cyassllib=""
+ ])
fi
- fi dnl PolarSSL not disabled
+ addld=""
+ addlib=""
+ addcflags=""
+
+ if test "x$USE_CYASSL" != "xyes"; then
+ dnl libcyassl renamed to libwolfssl as of 3.4.0
+ addld=-L$OPT_CYASSL/lib$libsuff
+ addcflags=-I$OPT_CYASSL/include
+ cyassllib=$OPT_CYASSL/lib$libsuff
+
+ LDFLAGS="$LDFLAGS $addld"
+ if test "$addcflags" != "-I/usr/include"; then
+ CPPFLAGS="$CPPFLAGS $addcflags"
+ fi
+
+ cyassllibname=wolfssl
+ my_ac_save_LIBS="$LIBS"
+ LIBS="-l$cyassllibname -lm $LIBS"
+
+ AC_MSG_CHECKING([for CyaSSL_Init in -lwolfssl])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+/* These aren't needed for detection and confuse WolfSSL.
+ They are set up properly later if it is detected. */
+#undef SIZEOF_LONG
+#undef SIZEOF_LONG_LONG
+#include <cyassl/ssl.h>
+ ]],[[
+ return CyaSSL_Init();
+ ]])
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
+ AC_SUBST(USE_CYASSL, [1])
+ CYASSL_ENABLED=1
+ USE_CYASSL="yes"
+ curl_ssl_msg="enabled (CyaSSL)"
+ ],
+ [
+ AC_MSG_RESULT(no)
+ CPPFLAGS=$_cppflags
+ LDFLAGS=$_ldflags
+ cyassllib=""
+ ])
+ LIBS="$my_ac_save_LIBS"
+ fi
+
+ if test "x$USE_CYASSL" = "xyes"; then
+ AC_MSG_NOTICE([detected CyaSSL])
+
+ dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
+ AC_CHECK_SIZEOF(long long)
+
+ dnl Versions since at least 2.6.0 may have options.h
+ AC_CHECK_HEADERS(cyassl/options.h)
+
+ dnl Versions since at least 2.9.4 renamed error.h to error-ssl.h
+ AC_CHECK_HEADERS(cyassl/error-ssl.h)
-fi dnl OPENSSL != 1
+ LIBS="-l$cyassllibname -lm $LIBS"
+
+ if test -n "$cyassllib"; then
+ 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
+ dnl due to this
+ if test "x$cross_compiling" != "xyes"; then
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
+ export LD_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
+ fi
+ fi
+
+ fi
+
+ fi dnl CyaSSL not disabled
+
+fi
dnl ----------------------------------------------------
dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
@@ -1842,13 +2081,20 @@ dnl Default to compiler & linker defaults for NSS files & libraries.
OPT_NSS=no
AC_ARG_WITH(nss,dnl
-AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root (default: /usr/local/)])
+AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root])
AC_HELP_STRING([--without-nss], [disable NSS detection]),
OPT_NSS=$withval)
-if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
if test X"$OPT_NSS" != Xno; then
+
+ addld=""
+ addlib=""
+ addcflags=""
+ nssprefix=""
+ version=""
+
if test "x$OPT_NSS" = "xyes"; then
CURL_CHECK_PKGCONFIG(nss)
@@ -1874,65 +2120,136 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
fi
fi
else
- # Without pkg-config, we'll kludge in some defaults
- addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
- addcflags="-I$OPT_NSS/include"
- version="unknown"
- nssprefix=$OPT_NSS
+ NSS_PCDIR="$OPT_NSS/lib/pkgconfig"
+ if test -f "$NSS_PCDIR/nss.pc"; then
+ CURL_CHECK_PKGCONFIG(nss, [$NSS_PCDIR])
+ if test "$PKGCONFIG" != "no" ; then
+ addld=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-L nss`
+ addlib=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-l nss`
+ addcflags=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --cflags nss`
+ version=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --modversion nss`
+ nssprefix=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --variable=prefix nss`
+ fi
+ fi
fi
- dnl Check for functionPK11_CreateGenericObject
- dnl this is needed for using the PEM PKCS#11 module
- AC_CHECK_LIB(nss3, PK11_CreateGenericObject,
- [
- AC_DEFINE(HAVE_PK11_CREATEGENERICOBJECT, 1, [if you have the function PK11_CreateGenericObject])
- AC_SUBST(HAVE_PK11_CREATEGENERICOBJECT, [1])
- ])
- if test -n "$addlib"; then
+ if test -z "$addlib"; then
+ # Without pkg-config, we'll kludge in some defaults
+ AC_MSG_WARN([Using hard-wired libraries and compilation flags for NSS.])
+ addld="-L$OPT_NSS/lib"
+ addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
+ addcflags="-I$OPT_NSS/include"
+ version="unknown"
+ nssprefix=$OPT_NSS
+ fi
- CLEANLIBS="$LIBS"
- CLEANCPPFLAGS="$CPPFLAGS"
+ CLEANLDFLAGS="$LDFLAGS"
+ CLEANLIBS="$LIBS"
+ CLEANCPPFLAGS="$CPPFLAGS"
- LIBS="$LIBS $addlib"
- if test "$addcflags" != "-I/usr/include"; then
- CPPFLAGS="$CPPFLAGS $addcflags"
- fi
+ LDFLAGS="$addld $LDFLAGS"
+ LIBS="$addlib $LIBS"
+ if test "$addcflags" != "-I/usr/include"; then
+ CPPFLAGS="$CPPFLAGS $addcflags"
+ fi
- AC_CHECK_LIB(nss3, NSS_Initialize,
- [
- AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
- AC_SUBST(USE_NSS, [1])
- USE_NSS="yes"
- NSS_ENABLED=1
- curl_ssl_msg="enabled (NSS)"
- ],
- [
- LIBS="$CLEANLIBS"
- CPPFLAGS="$CLEANCPPFLAGS"
- ])
+ dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
+ AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
+ [
+ AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
+ AC_SUBST(USE_NSS, [1])
+ USE_NSS="yes"
+ NSS_ENABLED=1
+ curl_ssl_msg="enabled (NSS)"
+ ],
+ [
+ LDFLAGS="$CLEANLDFLAGS"
+ LIBS="$CLEANLIBS"
+ CPPFLAGS="$CLEANCPPFLAGS"
+ ])
- if test "x$USE_NSS" = "xyes"; then
- AC_MSG_NOTICE([detected NSS version $version])
+ if test "x$USE_NSS" = "xyes"; then
+ AC_MSG_NOTICE([detected NSS version $version])
- 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
- dnl due to this
+ 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
+ dnl due to this
+ if test "x$cross_compiling" != "xyes"; then
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
export LD_LIBRARY_PATH
AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
fi
- fi
+ fi dnl NSS found
fi dnl NSS not disabled
-fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
+fi dnl curl_ssl_msg = init_ssl_msg
+
+OPT_AXTLS=off
+
+AC_ARG_WITH(axtls,dnl
+AC_HELP_STRING([--with-axtls=PATH],[Where to look for axTLS, PATH points to the axTLS installation prefix (default: /usr/local). Ignored if another SSL engine is selected.])
+AC_HELP_STRING([--without-axtls], [disable axTLS]),
+ OPT_AXTLS=$withval)
+
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+ if test X"$OPT_AXTLS" != Xno; then
+ dnl backup the pre-axtls variables
+ CLEANLDFLAGS="$LDFLAGS"
+ CLEANCPPFLAGS="$CPPFLAGS"
+ CLEANLIBS="$LIBS"
+
+ case "$OPT_AXTLS" in
+ yes)
+ dnl --with-axtls (without path) used
+ PREFIX_AXTLS=/usr/local
+ LIB_AXTLS="$PREFIX_AXTLS/lib"
+ LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
+ CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
+ ;;
+ off)
+ dnl no --with-axtls option given, just check default places
+ PREFIX_AXTLS=
+ ;;
+ *)
+ dnl check the given --with-axtls spot
+ PREFIX_AXTLS=$OPT_AXTLS
+ LIB_AXTLS="$PREFIX_AXTLS/lib"
+ LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
+ CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
+ ;;
+ esac
+
+ AC_CHECK_LIB(axtls, ssl_version,[
+ LIBS="-laxtls $LIBS"
+ AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
+ AC_SUBST(USE_AXTLS, [1])
+ AXTLS_ENABLED=1
+ USE_AXTLS="yes"
+ curl_ssl_msg="enabled (axTLS)"
-if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED" = "x"; then
+ if test "x$cross_compiling" != "xyes"; then
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
+ export LD_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
+ fi
+ ],[
+ LDFLAGS="$CLEANLDFLAGS"
+ CPPFLAGS="$CLEANCPPFLAGS"
+ LIBS="$CLEANLIBS"
+ ])
+ fi
+fi
+
+if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" = "x"; then
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
- AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl or --with-nss to address this.])
+ AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this.])
else
# SSL is enabled, genericly
AC_SUBST(SSL_ENABLED)
@@ -1946,13 +2263,101 @@ dnl **********************************************************************
CURL_CHECK_CA_BUNDLE
dnl **********************************************************************
+dnl Check for libmetalink
+dnl **********************************************************************
+
+OPT_LIBMETALINK=no
+
+AC_ARG_WITH(libmetalink,dnl
+AC_HELP_STRING([--with-libmetalink=PATH],[where to look for libmetalink, PATH points to the installation root])
+AC_HELP_STRING([--without-libmetalink], [disable libmetalink detection]),
+ OPT_LIBMETALINK=$withval)
+
+if test X"$OPT_LIBMETALINK" != Xno; then
+
+ addld=""
+ addlib=""
+ addcflags=""
+ version=""
+ libmetalinklib=""
+
+ PKGTEST="no"
+ if test "x$OPT_LIBMETALINK" = "xyes"; then
+ dnl this is with no partiular path given
+ PKGTEST="yes"
+ CURL_CHECK_PKGCONFIG(libmetalink)
+ else
+ dnl When particular path is given, set PKG_CONFIG_LIBDIR using the path.
+ LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig"
+ AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$LIBMETALINK_PCDIR"])
+ if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then
+ PKGTEST="yes"
+ fi
+ if test "$PKGTEST" = "yes"; then
+ CURL_CHECK_PKGCONFIG(libmetalink, [$LIBMETALINK_PCDIR])
+ fi
+ fi
+ if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then
+ addlib=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
+ $PKGCONFIG --libs-only-l libmetalink`
+ addld=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
+ $PKGCONFIG --libs-only-L libmetalink`
+ addcflags=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
+ $PKGCONFIG --cflags-only-I libmetalink`
+ version=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
+ $PKGCONFIG --modversion libmetalink`
+ libmetalinklib=`echo $addld | $SED -e 's/-L//'`
+ fi
+ if test -n "$addlib"; then
+
+ clean_CPPFLAGS="$CPPFLAGS"
+ clean_LDFLAGS="$LDFLAGS"
+ clean_LIBS="$LIBS"
+ CPPFLAGS="$addcflags $clean_CPPFLAGS"
+ LDFLAGS="$addld $clean_LDFLAGS"
+ LIBS="$addlib $clean_LIBS"
+ AC_MSG_CHECKING([if libmetalink is recent enough])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+# include <metalink/metalink.h>
+ ]],[[
+ if(0 != metalink_strerror(0)) /* added in 0.1.0 */
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes ($version)])
+ want_metalink="yes"
+ ],[
+ AC_MSG_RESULT([no ($version)])
+ AC_MSG_NOTICE([libmetalink library defective or too old])
+ want_metalink="no"
+ ])
+ CPPFLAGS="$clean_CPPFLAGS"
+ LDFLAGS="$clean_LDFLAGS"
+ LIBS="$clean_LIBS"
+ if test "$want_metalink" = "yes"; then
+ dnl finally libmetalink will be used
+ AC_DEFINE(USE_METALINK, 1, [Define to enable metalink support])
+ LIBMETALINK_LIBS=$addlib
+ LIBMETALINK_LDFLAGS=$addld
+ LIBMETALINK_CPPFLAGS=$addcflags
+ AC_SUBST([LIBMETALINK_LIBS])
+ AC_SUBST([LIBMETALINK_LDFLAGS])
+ AC_SUBST([LIBMETALINK_CPPFLAGS])
+ curl_mtlnk_msg="enabled"
+ fi
+
+ fi
+fi
+
+dnl **********************************************************************
dnl Check for the presence of LIBSSH2 libraries and headers
dnl **********************************************************************
dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
OPT_LIBSSH2=off
AC_ARG_WITH(libssh2,dnl
-AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
OPT_LIBSSH2=$withval)
@@ -1987,6 +2392,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
dnl if given with a prefix, we set -L and -I based on that
if test -n "$PREFIX_SSH2"; then
+ LIB_SSH2="-lssh2"
LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
CPP_SSH2=-I${PREFIX_SSH2}/include
DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
@@ -1994,7 +2400,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
LDFLAGS="$LDFLAGS $LD_SSH2"
CPPFLAGS="$CPPFLAGS $CPP_SSH2"
- LIBS="$LIBS $LIB_SSH2"
+ LIBS="$LIB_SSH2 $LIBS"
AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
@@ -2016,15 +2422,11 @@ 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
- AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
- libssh2_scp_send64 )
-
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
- export LD_LIBRARY_PATH
- AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
+ if test "x$cross_compiling" != "xyes"; then
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
+ export LD_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
+ fi
fi
else
dnl no libssh2, revert back to clean variables
@@ -2041,7 +2443,7 @@ dnl **********************************************************************
dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
OPT_LIBRTMP=off
AC_ARG_WITH(librtmp,dnl
-AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
OPT_LIBRTMP=$withval)
@@ -2062,6 +2464,10 @@ if test X"$OPT_LIBRTMP" != Xno; then
CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
version=`$PKGCONFIG --modversion librtmp`
DIR_RTMP=`echo $LD_RTMP | $SED -e 's/-L//'`
+ else
+ dnl To avoid link errors, we do not allow --librtmp without
+ dnl a pkgconfig file
+ AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
fi
;;
@@ -2084,7 +2490,7 @@ if test X"$OPT_LIBRTMP" != Xno; then
LDFLAGS="$LDFLAGS $LD_RTMP"
CPPFLAGS="$CPPFLAGS $CPP_RTMP"
- LIBS="$LIBS $LIB_RTMP"
+ LIBS="$LIB_RTMP $LIBS"
AC_CHECK_LIB(rtmp, RTMP_Init,
[
@@ -2109,60 +2515,359 @@ if test X"$OPT_LIBRTMP" != Xno; then
fi
dnl **********************************************************************
+dnl Check for linker switch for versioned symbols
+dnl **********************************************************************
+
+versioned_symbols_flavour=
+AC_MSG_CHECKING([whether versioned symbols are wanted])
+AC_ARG_ENABLE(versioned-symbols,
+AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
+AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
+[ case "$enableval" in
+ yes) AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING([if libraries can be versioned])
+ GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+ if test -z "$GLD"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([You need an ld version supporting the --version-script option])
+ else
+ AC_MSG_RESULT(yes)
+ if test "x$OPENSSL_ENABLED" = "x1"; then
+ versioned_symbols_flavour="OPENSSL_"
+ elif test "x$GNUTLS_ENABLED" = "x1"; then
+ versioned_symbols_flavour="GNUTLS_"
+ elif test "x$NSS_ENABLED" = "x1"; then
+ versioned_symbols_flavour="NSS_"
+ elif test "x$POLARSSL_ENABLED" = "x1"; then
+ versioned_symbols_flavour="POLARSSL_"
+ elif test "x$CYASSL_ENABLED" = "x1"; then
+ versioned_symbols_flavour="CYASSL_"
+ elif test "x$AXTLS_ENABLED" = "x1"; then
+ versioned_symbols_flavour="AXTLS_"
+ elif test "x$WINSSL_ENABLED" = "x1"; then
+ versioned_symbols_flavour="WINSSL_"
+ elif test "x$DARWINSSL_ENABLED" = "x1"; then
+ versioned_symbols_flavour="DARWINSSL_"
+ else
+ versioned_symbols_flavour=""
+ fi
+ versioned_symbols="yes"
+ fi
+ ;;
+
+ *) AC_MSG_RESULT(no)
+ ;;
+ esac
+], [
+AC_MSG_RESULT(no)
+]
+)
+
+AC_SUBST([CURL_LT_SHLIB_VERSIONED_FLAVOUR],
+ ["$versioned_symbols_flavour"])
+AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS],
+ [test "x$versioned_symbols" = 'xyes'])
+
+dnl -------------------------------------------------
+dnl check winidn option before other IDN libraries
+dnl -------------------------------------------------
+
+AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
+OPT_WINIDN="default"
+AC_ARG_WITH(winidn,
+AC_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
+AC_HELP_STRING([--without-winidn], [disable Windows native IDN]),
+ OPT_WINIDN=$withval)
+case "$OPT_WINIDN" in
+ no|default)
+ dnl --without-winidn option used or configure option not specified
+ want_winidn="no"
+ AC_MSG_RESULT([no])
+ ;;
+ yes)
+ dnl --with-winidn option used without path
+ want_winidn="yes"
+ want_winidn_path="default"
+ AC_MSG_RESULT([yes])
+ ;;
+ *)
+ dnl --with-winidn option used with path
+ want_winidn="yes"
+ want_winidn_path="$withval"
+ AC_MSG_RESULT([yes ($withval)])
+ ;;
+esac
+
+if test "$want_winidn" = "yes"; then
+ dnl winidn library support has been requested
+ clean_CPPFLAGS="$CPPFLAGS"
+ clean_LDFLAGS="$LDFLAGS"
+ clean_LIBS="$LIBS"
+ WINIDN_LIBS="-lnormaliz"
+ #
+ if test "$want_winidn_path" != "default"; then
+ dnl path has been specified
+ dnl pkg-config not available or provides no info
+ WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
+ WINIDN_CPPFLAGS="-I$want_winidn_path/include"
+ WINIDN_DIR="$want_winidn_path/lib$libsuff"
+ fi
+ #
+ CPPFLAGS="$WINIDN_CPPFLAGS $CPPFLAGS"
+ LDFLAGS="$WINIDN_LDFLAGS $LDFLAGS"
+ LIBS="$WINIDN_LIBS $LIBS"
+ #
+ AC_MSG_CHECKING([if IdnToUnicode can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([IdnToUnicode])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_winidn="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_winidn="no"
+ ])
+ #
+ if test "$tst_links_winidn" = "yes"; then
+ AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).])
+ AC_DEFINE(WANT_IDN_PROTOTYPES, 1, [Define to 1 to provide own prototypes.])
+ AC_SUBST([IDN_ENABLED], [1])
+ curl_idn_msg="enabled (Windows-native)"
+ else
+ AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
+ CPPFLAGS="$clean_CPPFLAGS"
+ LDFLAGS="$clean_LDFLAGS"
+ LIBS="$clean_LIBS"
+ fi
+fi
+
+dnl **********************************************************************
dnl Check for the presence of IDN libraries and headers
dnl **********************************************************************
AC_MSG_CHECKING([whether to build with libidn])
+OPT_IDN="default"
AC_ARG_WITH(libidn,
AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage])
AC_HELP_STRING([--without-libidn],[Disable libidn usage]),
- [LIBIDN="$withval"])
-
-case "$LIBIDN" in
+ [OPT_IDN=$withval])
+case "$OPT_IDN" in
no)
- AC_MSG_RESULT(no)
- ;;
- *) AC_MSG_RESULT(yes)
+ dnl --without-libidn option used
+ want_idn="no"
+ AC_MSG_RESULT([no])
+ ;;
+ default)
+ dnl configure option not specified
+ want_idn="yes"
+ want_idn_path="default"
+ AC_MSG_RESULT([(assumed) yes])
+ ;;
+ yes)
+ dnl --with-libidn option used without path
+ want_idn="yes"
+ want_idn_path="default"
+ AC_MSG_RESULT([yes])
+ ;;
+ *)
+ dnl --with-libidn option used with path
+ want_idn="yes"
+ want_idn_path="$withval"
+ AC_MSG_RESULT([yes ($withval)])
+ ;;
+esac
- idn=""
- dnl if there is a given path, check that FIRST
- if test -n "$LIBIDN"; then
- if test "x$LIBIDN" != "xyes"; then
- oldLDFLAGS=$LDFLAGS
- oldCPPFLAGS=$CPPFLAGS
- LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
- CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
- idn="yes"
- AC_CHECK_LIB(idn, idna_to_ascii_4i, ,
- idn=""
- LDFLAGS=$oldLDFLAGS
- CPPFLAGS=$oldCPPFLAGS)
- fi
- fi
+if test "$want_idn" = "yes"; then
+ dnl idn library support has been requested
+ clean_CPPFLAGS="$CPPFLAGS"
+ clean_LDFLAGS="$LDFLAGS"
+ clean_LIBS="$LIBS"
+ PKGCONFIG="no"
+ #
+ if test "$want_idn_path" != "default"; then
+ dnl path has been specified
+ IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
+ CURL_CHECK_PKGCONFIG(libidn, [$IDN_PCDIR])
+ if test "$PKGCONFIG" != "no"; then
+ IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+ $PKGCONFIG --libs-only-l libidn 2>/dev/null`
+ IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+ $PKGCONFIG --libs-only-L libidn 2>/dev/null`
+ IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+ $PKGCONFIG --cflags-only-I libidn 2>/dev/null`
+ IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
+ else
+ dnl pkg-config not available or provides no info
+ IDN_LIBS="-lidn"
+ IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
+ IDN_CPPFLAGS="-I$want_idn_path/include"
+ IDN_DIR="$want_idn_path/lib$libsuff"
+ fi
+ else
+ dnl path not specified
+ CURL_CHECK_PKGCONFIG(libidn)
+ if test "$PKGCONFIG" != "no"; then
+ IDN_LIBS=`$PKGCONFIG --libs-only-l libidn 2>/dev/null`
+ IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn 2>/dev/null`
+ IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn 2>/dev/null`
+ IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
+ else
+ dnl pkg-config not available or provides no info
+ IDN_LIBS="-lidn"
+ fi
+ fi
+ #
+ if test "$PKGCONFIG" != "no"; then
+ AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
+ AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
+ AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
+ AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"])
+ else
+ AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"])
+ AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"])
+ AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
+ AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
+ fi
+ #
+ CPPFLAGS="$IDN_CPPFLAGS $CPPFLAGS"
+ LDFLAGS="$IDN_LDFLAGS $LDFLAGS"
+ LIBS="$IDN_LIBS $LIBS"
+ #
+ AC_MSG_CHECKING([if idna_to_ascii_4i can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([idna_to_ascii_4i])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_libidn="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_libidn="no"
+ ])
+ if test "$tst_links_libidn" = "no"; then
+ AC_MSG_CHECKING([if idna_to_ascii_lz can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([idna_to_ascii_lz])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_libidn="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_libidn="no"
+ ])
+ fi
+ #
+ if test "$tst_links_libidn" = "yes"; then
+ AC_DEFINE(HAVE_LIBIDN, 1, [Define to 1 if you have the `idn' library (-lidn).])
+ dnl different versions of libidn have different setups of these:
+ AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror )
+ AC_CHECK_HEADERS( idn-free.h tld.h )
+ if test "x$ac_cv_header_tld_h" = "xyes"; then
+ AC_SUBST([IDN_ENABLED], [1])
+ curl_idn_msg="enabled"
+ if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
+ export LD_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $IDN_DIR to LD_LIBRARY_PATH])
+ fi
+ else
+ AC_MSG_WARN([Libraries for IDN support too old: IDN disabled])
+ CPPFLAGS="$clean_CPPFLAGS"
+ LDFLAGS="$clean_LDFLAGS"
+ LIBS="$clean_LIBS"
+ fi
+ else
+ AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
+ CPPFLAGS="$clean_CPPFLAGS"
+ LDFLAGS="$clean_LDFLAGS"
+ LIBS="$clean_LIBS"
+ fi
+fi
- if test "x$idn" != "xyes"; then
- dnl check with default paths
- idn="yes"
- AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
- idn="")
- fi
- if test "x$idn" = "xyes"; then
- curl_idn_msg="enabled"
- AC_SUBST(IDN_ENABLED, [1])
- dnl different versions of libidn have different setups of these:
- AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror)
- AC_CHECK_HEADERS( idn-free.h tld.h )
- fi
+dnl Let's hope this split URL remains working:
+dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
+dnl genprogc/thread_quick_ref.htm
- ;;
+
+dnl **********************************************************************
+dnl Check for nghttp2
+dnl **********************************************************************
+
+OPT_H2="yes"
+AC_ARG_WITH(nghttp2,
+AC_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage])
+AC_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
+ [OPT_H2=$withval])
+case "$OPT_H2" in
+ no)
+ dnl --without-nghttp2 option used
+ want_h2="no"
+ ;;
+ yes)
+ dnl --with-nghttp2 option used without path
+ want_h2="default"
+ want_h2_path=""
+ ;;
+ *)
+ dnl --with-nghttp2 option used with path
+ want_h2="yes"
+ want_h2_path="$withval/lib/pkgconfig"
+ ;;
esac
+curl_h2_msg="disabled (--with-nghttp2)"
+if test X"$want_h2" != Xno; then
+ dnl backup the pre-nghttp2 variables
+ CLEANLDFLAGS="$LDFLAGS"
+ CLEANCPPFLAGS="$CPPFLAGS"
+ CLEANLIBS="$LIBS"
-dnl Let's hope this split URL remains working:
-dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
-dnl genprogc/thread_quick_ref.htm
+ CURL_CHECK_PKGCONFIG(libnghttp2, $want_h2_path)
+
+ if test "$PKGCONFIG" != "no" ; then
+ LIB_H2=`CURL_EXPORT_PCDIR([$want_h2_path])
+ $PKGCONFIG --libs-only-l libnghttp2`
+ AC_MSG_NOTICE([-l is $LIB_H2])
+
+ CPP_H2=`CURL_EXPORT_PCDIR([$want_h2_path]) dnl
+ $PKGCONFIG --cflags-only-I libnghttp2`
+ AC_MSG_NOTICE([-I is $CPP_H2])
+
+ LD_H2=`CURL_EXPORT_PCDIR([$want_h2_path])
+ $PKGCONFIG --libs-only-L libnghttp2`
+ AC_MSG_NOTICE([-L is $LD_H2])
+ LDFLAGS="$LDFLAGS $LD_H2"
+ CPPFLAGS="$CPPFLAGS $CPP_H2"
+ LIBS="$LIB_H2 $LIBS"
+
+ # use nghttp2_option_set_no_recv_client_magic to require nghttp2
+ # >= 1.0.0
+ AC_CHECK_LIB(nghttp2, nghttp2_option_set_no_recv_client_magic,
+ [
+ AC_CHECK_HEADERS(nghttp2/nghttp2.h,
+ curl_h2_msg="enabled (nghttp2)"
+ NGHTTP2_ENABLED=1
+ AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use])
+ AC_SUBST(USE_NGHTTP2, [1])
+ )
+ ],
+ dnl not found, revert back to clean variables
+ LDFLAGS=$CLEANLDFLAGS
+ CPPFLAGS=$CLEANCPPFLAGS
+ LIBS=$CLEANLIBS
+ )
+
+ else
+ dnl no nghttp2 pkg-config found, deal with it
+ if test X"$want_h2" != Xdefault; then
+ dnl To avoid link errors, we do not allow --with-nghttp2 without
+ dnl a pkgconfig file
+ AC_MSG_ERROR([--with-nghttp2 was specified but could not find libnghttp2 pkg-config file.])
+ fi
+ fi
+
+fi
dnl **********************************************************************
dnl Back to "normal" configuring
@@ -2216,6 +2921,7 @@ AC_CHECK_HEADERS(
stdbool.h \
arpa/tftp.h \
sys/filio.h \
+ sys/wait.h \
setjmp.h,
dnl to do if not found
[],
@@ -2277,11 +2983,17 @@ AC_CHECK_TYPE(long long,
if test "xyes" = "x$longlong"; then
AC_MSG_CHECKING([if numberLL works])
- AC_COMPILE_IFELSE([long long val = 1000LL;],
- [AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])]
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
- )
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ ]],[[
+ long long val = 1000LL;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
fi
@@ -2304,6 +3016,8 @@ AC_CHECK_TYPE([bool],[
CURL_CONFIGURE_CURL_SOCKLEN_T
+CURL_CONFIGURE_PULL_SYS_POLL
+
TYPE_IN_ADDR_T
TYPE_SOCKADDR_STORAGE
@@ -2315,7 +3029,6 @@ AC_TYPE_SIGNAL
CURL_CHECK_FUNC_SELECT
CURL_CHECK_FUNC_RECV
-CURL_CHECK_FUNC_RECVFROM
CURL_CHECK_FUNC_SEND
CURL_CHECK_MSG_NOSIGNAL
@@ -2328,8 +3041,10 @@ CURL_CHECK_FUNC_FCNTL
CURL_CHECK_FUNC_FDOPEN
CURL_CHECK_FUNC_FREEADDRINFO
CURL_CHECK_FUNC_FREEIFADDRS
+CURL_CHECK_FUNC_FSETXATTR
CURL_CHECK_FUNC_FTRUNCATE
CURL_CHECK_FUNC_GETADDRINFO
+CURL_CHECK_FUNC_GAI_STRERROR
CURL_CHECK_FUNC_GETHOSTBYADDR
CURL_CHECK_FUNC_GETHOSTBYADDR_R
CURL_CHECK_FUNC_GETHOSTBYNAME
@@ -2353,13 +3068,12 @@ CURL_CHECK_FUNC_SIGINTERRUPT
CURL_CHECK_FUNC_SIGNAL
CURL_CHECK_FUNC_SIGSETJMP
CURL_CHECK_FUNC_SOCKET
+CURL_CHECK_FUNC_SOCKETPAIR
CURL_CHECK_FUNC_STRCASECMP
-CURL_CHECK_FUNC_STRCASESTR
CURL_CHECK_FUNC_STRCMPI
CURL_CHECK_FUNC_STRDUP
CURL_CHECK_FUNC_STRERROR_R
CURL_CHECK_FUNC_STRICMP
-CURL_CHECK_FUNC_STRLCAT
CURL_CHECK_FUNC_STRNCASECMP
CURL_CHECK_FUNC_STRNCMPI
CURL_CHECK_FUNC_STRNICMP
@@ -2368,10 +3082,6 @@ CURL_CHECK_FUNC_STRTOK_R
CURL_CHECK_FUNC_STRTOLL
CURL_CHECK_FUNC_WRITEV
-dnl Checks for library functions.
-dnl AC_PROG_GCC_TRADITIONAL
-
-dnl AC_FUNC_VPRINTF
case $host in
*msdosdjgpp)
ac_cv_func_pipe=no
@@ -2386,8 +3096,10 @@ AC_CHECK_FUNCS([fork \
getppid \
getprotobyname \
getpwuid \
+ getpwuid_r \
getrlimit \
gettimeofday \
+ if_nametoindex \
inet_addr \
perror \
pipe \
@@ -2410,7 +3122,7 @@ AC_CHECK_FUNCS([fork \
],[
AC_MSG_RESULT([yes])
eval "ac_cv_func_$func=yes"
- AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
+ AC_DEFINE_UNQUOTED(XC_SH_TR_CPP([HAVE_$func]), [1],
[Define to 1 if you have the $func function.])
],[
AC_MSG_RESULT([but still no])
@@ -2431,10 +3143,6 @@ if test "$ipv6" = "yes"; then
CURL_CHECK_NI_WITHSCOPEID
fi
-dnl ************************************************************
-dnl enable non-blocking communications
-dnl
-CURL_CHECK_OPTION_NONBLOCKING
CURL_CHECK_NONBLOCKING_SOCKET
dnl ************************************************************
@@ -2494,7 +3202,8 @@ AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
CURL_CHECK_LIB_ARES
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
-if test "x$enable_shared" = "xyes"; then
+if test "x$ac_cv_native_windows" != "xyes" &&
+ test "x$enable_shared" = "xyes"; then
build_libhostname=yes
else
build_libhostname=no
@@ -2512,14 +3221,26 @@ if test "$want_thres" = "yes"; then
AC_CHECK_HEADER(pthread.h,
[ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -pthread"
- AC_CHECK_LIB(pthread, pthread_create,
- [ AC_MSG_NOTICE([using POSIX threaded DNS lookup])
- AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
- USE_THREADS_POSIX=1
- curl_res_msg="threaded"
- ],
- [ CFLAGS="$save_CFLAGS"])
+
+ dnl first check for function without lib
+ AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] )
+
+ dnl if it wasn't found without lib, search for it in pthread lib
+ if test "$USE_THREADS_POSIX" != "1"
+ then
+ CFLAGS="$CFLAGS -pthread"
+ AC_CHECK_LIB(pthread, pthread_create,
+ [USE_THREADS_POSIX=1],
+ [ CFLAGS="$save_CFLAGS"])
+ fi
+
+ if test "x$USE_THREADS_POSIX" = "x1"
+ then
+ AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
+ curl_res_msg="POSIX threaded"
+ fi
+
+
])
fi
@@ -2562,10 +3283,20 @@ AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
fi
;;
*)
- AC_MSG_RESULT(no)
+ if test "x$WINSSL_ENABLED" = "x1"; then
+ # --with-winssl implies --enable-sspi
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
;;
esac ],
- AC_MSG_RESULT(no)
+ if test "x$WINSSL_ENABLED" = "x1"; then
+ # --with-winssl implies --enable-sspi
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
)
dnl ************************************************************
@@ -2579,6 +3310,7 @@ AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication])
+ CURL_DISABLE_CRYPTO_AUTH=1
;;
*) AC_MSG_RESULT(yes)
;;
@@ -2586,69 +3318,94 @@ AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
AC_MSG_RESULT(yes)
)
+CURL_CHECK_OPTION_NTLM_WB
+
+CURL_CHECK_NTLM_WB
+
dnl ************************************************************
-dnl disable cookies support
+dnl disable TLS-SRP authentication
dnl
-AC_MSG_CHECKING([whether to enable support for cookies])
-AC_ARG_ENABLE(cookies,
-AC_HELP_STRING([--enable-cookies],[Enable cookies support])
-AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
+AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
+AC_ARG_ENABLE(tls-srp,
+AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
+AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
- AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
+ AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication])
+ want_tls_srp=no
;;
*) AC_MSG_RESULT(yes)
+ want_tls_srp=yes
;;
esac ],
AC_MSG_RESULT(yes)
+ want_tls_srp=yes
)
+if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then
+ AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
+ USE_TLS_SRP=1
+ curl_tls_srp_msg="enabled"
+fi
+
dnl ************************************************************
-dnl Enable hiding of internal symbols in library to reduce its size and
-dnl speed dynamic linking of applications. This currently is only supported
-dnl on gcc >= 4.0 and SunPro C.
+dnl disable Unix domain sockets support
dnl
-AC_MSG_CHECKING([whether to enable hidden symbols in the library])
-AC_ARG_ENABLE(hidden-symbols,
-AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library])
-AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]),
+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 <sys/un.h>
+ ])
+fi
+
+dnl ************************************************************
+dnl disable cookies support
+dnl
+AC_MSG_CHECKING([whether to enable support for cookies])
+AC_ARG_ENABLE(cookies,
+AC_HELP_STRING([--enable-cookies],[Enable cookies support])
+AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
;;
- *)
- AC_MSG_CHECKING([whether $CC supports it])
- if test "$GCC" = yes ; then
- if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ||
- dnl clang always supports -fvisibility= but it doesn't show up
- dnl under --help.
- test "$compiler_id" = "CLANG"; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
- AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
- CFLAGS="$CFLAGS -fvisibility=hidden"
- else
- AC_MSG_RESULT(no)
- fi
-
- else
- dnl Test for SunPro cc
- if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
- AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible])
- CFLAGS="$CFLAGS -xldscope=hidden"
- else
- AC_MSG_RESULT(no)
- fi
- fi
+ *) AC_MSG_RESULT(yes)
;;
esac ],
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(yes)
)
dnl ************************************************************
+dnl hiding of library internal symbols
+dnl
+CURL_CONFIGURE_SYMBOL_HIDING
+
+dnl ************************************************************
dnl enforce SONAME bump
dnl
@@ -2668,33 +3425,21 @@ AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]),
)
AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes)
-
-dnl ************************************************************
-if test ! -z "$winsock_LIB"; then
-
- dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes
- dnl things work when built with c-ares). But we can't just move it last
- dnl since then other stuff (SSL) won't build. So we simply append it to the
- dnl end.
-
- LIBS="$LIBS $winsock_LIB"
- TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB"
-
-fi
-
dnl
dnl All the library dependencies put into $LIB apply to libcurl only.
-dnl Those in $CURL_LIBS apply to the curl command-line client only.
-dnl Those in $TEST_SERVER_LIBS apply to test servers only.
-dnl Those in $ALL_LIBS apply to all targets, including test targets.
dnl
LIBCURL_LIBS=$LIBS
AC_SUBST(LIBCURL_LIBS)
-AC_SUBST(CURL_LIBS)
-AC_SUBST(TEST_SERVER_LIBS)
AC_SUBST(CURL_NETWORK_LIBS)
-LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link
+AC_SUBST(CURL_NETWORK_AND_TIME_LIBS)
+
+dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
+dnl LIBS variable used in generated makefile at makefile processing
+dnl time. Doing this functionally prevents LIBS from being used for
+dnl all link targets in given makefile.
+BLANK_AT_MAKETIME=
+AC_SUBST(BLANK_AT_MAKETIME)
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
@@ -2702,22 +3447,27 @@ dnl yes or no
ENABLE_SHARED="$enable_shared"
AC_SUBST(ENABLE_SHARED)
+dnl to let curl-config output the static libraries correctly
+ENABLE_STATIC="$enable_static"
+AC_SUBST(ENABLE_STATIC)
+
+
dnl
dnl For keeping supported features and protocols also in pkg-config file
-dnl since it is more cross-compile frient than curl-config
+dnl since it is more cross-compile friendly than curl-config
dnl
-if test "x$USE_SSLEAY" = "x1"; then
+if test "x$OPENSSL_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
elif test -n "$SSL_ENABLED"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
fi
-if test "@KRB4_ENABLED@" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4"
-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
@@ -2730,9 +3480,40 @@ fi
if test "x$USE_WINDOWS_SSPI" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
fi
-if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
- -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
- SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
+
+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$OPENSSL_ENABLED" = "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
+ SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
+ fi
+ fi
+fi
+
+if test "x$USE_TLS_SRP" = "x1"; then
+ SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
+fi
+
+if test "x$USE_NGHTTP2" = "x1"; then
+ SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
fi
AC_SUBST(SUPPORT_FEATURES)
@@ -2786,6 +3567,16 @@ 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$OPENSSL_ENABLED" = "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
@@ -2818,14 +3609,15 @@ squeeze DEFS
squeeze LDFLAGS
squeeze LIBS
-squeeze CURL_LIBS
squeeze LIBCURL_LIBS
-squeeze TEST_SERVER_LIBS
squeeze CURL_NETWORK_LIBS
+squeeze CURL_NETWORK_AND_TIME_LIBS
squeeze SUPPORT_FEATURES
squeeze SUPPORT_PROTOCOLS
+XC_CHECK_BUILD_FLAGS
+
if test "x$want_curldebug_assumed" = "xyes" &&
test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
ac_configure_args="$ac_configure_args --enable-curldebug"
@@ -2835,14 +3627,19 @@ AC_CONFIG_FILES([Makefile \
docs/Makefile \
docs/examples/Makefile \
docs/libcurl/Makefile \
+ docs/libcurl/opts/Makefile \
include/Makefile \
include/curl/Makefile \
src/Makefile \
lib/Makefile \
+ lib/libcurl.vers \
tests/Makefile \
+ tests/certs/Makefile \
+ tests/certs/scripts/Makefile \
tests/data/Makefile \
tests/server/Makefile \
tests/libtest/Makefile \
+ tests/unit/Makefile \
packages/Makefile \
packages/Win32/Makefile \
packages/Win32/cygwin/Makefile \
@@ -2862,32 +3659,39 @@ AC_CONFIG_FILES([Makefile \
])
AC_OUTPUT
+CURL_GENERATE_CONFIGUREHELP_PM
+
+XC_AMEND_DISTCLEAN([lib src tests/unit tests/server tests/libtest docs/examples])
+
AC_MSG_NOTICE([Configured to build curl/libcurl:
- curl version: ${VERSION}
- Host setup: ${host}
- Install prefix: ${prefix}
- Compiler: ${CC}
- SSL support: ${curl_ssl_msg}
- SSH support: ${curl_ssh_msg}
- zlib support: ${curl_zlib_msg}
- krb4 support: ${curl_krb4_msg}
- GSSAPI support: ${curl_gss_msg}
- SPNEGO support: ${curl_spnego_msg}
- resolver: ${curl_res_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}
- Verbose errors: ${curl_verbose_msg}
- SSPI support: ${curl_sspi_msg}
- ca cert bundle: ${ca}
- ca cert path: ${capath}
- LDAP support: ${curl_ldap_msg}
- LDAPS support: ${curl_ldaps_msg}
- RTSP support: ${curl_rtsp_msg}
- RTMP support: ${curl_rtmp_msg}
- Protocols: ${SUPPORT_PROTOCOLS}
+ curl version: ${CURLVERSION}
+ Host setup: ${host}
+ Install prefix: ${prefix}
+ Compiler: ${CC}
+ SSL support: ${curl_ssl_msg}
+ SSH support: ${curl_ssh_msg}
+ zlib support: ${curl_zlib_msg}
+ GSS-API support: ${curl_gss_msg}
+ TLS-SRP support: ${curl_tls_srp_msg}
+ resolver: ${curl_res_msg}
+ IPv6 support: ${curl_ipv6_msg}
+ Unix sockets support: ${curl_unix_sockets_msg}
+ IDN support: ${curl_idn_msg}
+ Build libcurl: Shared=${enable_shared}, Static=${enable_static}
+ Built-in manual: ${curl_manual_msg}
+ --libcurl option: ${curl_libcurl_msg}
+ Verbose errors: ${curl_verbose_msg}
+ SSPI support: ${curl_sspi_msg}
+ ca cert bundle: ${ca}
+ ca cert path: ${capath}
+ LDAP support: ${curl_ldap_msg}
+ LDAPS support: ${curl_ldaps_msg}
+ RTSP support: ${curl_rtsp_msg}
+ RTMP support: ${curl_rtmp_msg}
+ metalink support: ${curl_mtlnk_msg}
+ HTTP2 support: ${curl_h2_msg}
+ Protocols: ${SUPPORT_PROTOCOLS}
])
if test "x$soname_bump" = "xyes"; then
diff --git a/curl-config.in b/curl-config.in
index 27b9f7ff..93987224 100644
--- a/curl-config.in
+++ b/curl-config.in
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 2001 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2001 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -24,6 +24,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
+cppflag_curl_staticlib=@CPPFLAG_CURL_STATICLIB@
usage()
{
@@ -70,96 +71,106 @@ while test $# -gt 0; do
;;
--ca)
- echo "@CURL_CA_BUNDLE@"
- ;;
+ echo @CURL_CA_BUNDLE@
+ ;;
--cc)
- echo "@CC@"
- ;;
+ echo "@CC@"
+ ;;
--prefix)
- echo "$prefix"
- ;;
+ echo "$prefix"
+ ;;
--feature|--features)
for feature in @SUPPORT_FEATURES@ ""; do
test -n "$feature" && echo "$feature"
done
- ;;
+ ;;
--protocols)
for protocol in @SUPPORT_PROTOCOLS@; do
echo "$protocol"
done
- ;;
+ ;;
--version)
- echo libcurl @VERSION@
- exit 0
- ;;
+ echo libcurl @CURLVERSION@
+ exit 0
+ ;;
--checkfor)
checkfor=$2
cmajor=`echo $checkfor | cut -d. -f1`
cminor=`echo $checkfor | cut -d. -f2`
# when extracting the patch part we strip off everything after a
- # dash as that's used for things like version 1.2.3-CVS
- cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
+ # dash as that's used for things like version 1.2.3-CVS
+ cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
numuppercase=`echo @VERSIONNUM@ | tr 'a-f' 'A-F'`
nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
- if test "$nownum" -ge "$checknum"; then
- # silent success
- exit 0
- else
- echo "requested version $checkfor is newer than existing @VERSION@"
- exit 1
- fi
- ;;
+ if test "$nownum" -ge "$checknum"; then
+ # silent success
+ exit 0
+ else
+ echo "requested version $checkfor is newer than existing @CURLVERSION@"
+ exit 1
+ fi
+ ;;
--vernum)
- echo @VERSIONNUM@
- exit 0
- ;;
+ echo @VERSIONNUM@
+ exit 0
+ ;;
--help)
- usage 0
- ;;
+ usage 0
+ ;;
--cflags)
- if test "X@includedir@" = "X/usr/include"; then
- echo ""
+ if test "X$cppflag_curl_staticlib" = "X-DCURL_STATICLIB"; then
+ CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB "
+ else
+ CPPFLAG_CURL_STATICLIB=""
+ fi
+ if test "X@includedir@" = "X/usr/include"; then
+ echo "$CPPFLAG_CURL_STATICLIB"
else
- echo "-I@includedir@"
+ echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
fi
- ;;
+ ;;
--libs)
- if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
- CURLLIBDIR="-L@libdir@ "
- else
- CURLLIBDIR=""
- fi
- if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
- echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
- else
- echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
- fi
- ;;
+ if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
+ CURLLIBDIR="-L@libdir@ "
+ else
+ CURLLIBDIR=""
+ fi
+ if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
+ echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
+ else
+ echo ${CURLLIBDIR}-lcurl
+ fi
+ ;;
--static-libs)
- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
- ;;
+ if test "X@ENABLE_STATIC@" != "Xno" ; then
+ echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@
+ else
+ echo "curl was built with static libraries disabled" >&2
+ exit 1
+ fi
+ ;;
--configure)
- echo @CONFIGURE_OPTIONS@
- ;;
+ echo @CONFIGURE_OPTIONS@
+ ;;
*)
echo "unknown option: $1"
- usage 1
- ;;
+ usage 1
+ ;;
esac
shift
done
diff --git a/curl-style.el b/curl-style.el
deleted file mode 100644
index 83cf8cc3..00000000
--- a/curl-style.el
+++ /dev/null
@@ -1,50 +0,0 @@
-;;;; Emacs Lisp help for writing curl code. ;;;;
-
-;;; The curl hacker's C conventions.
-;;; See the sample.emacs file on how this file can be made to take
-;;; effect automatically when editing curl source files.
-
-(defconst curl-c-style
- '((c-basic-offset . 2)
- (c-comment-only-line-offset . 0)
- (c-hanging-braces-alist . ((substatement-open before after)))
- (c-offsets-alist . ((topmost-intro . 0)
- (topmost-intro-cont . 0)
- (substatement . +)
- (substatement-open . 0)
- (statement-case-intro . +)
- (statement-case-open . 0)
- (case-label . 0)
- ))
- )
- "Curl C Programming Style")
-
-(defun curl-code-cleanup ()
- "no docs"
- (interactive)
- (untabify (point-min) (point-max))
- (delete-trailing-whitespace)
-)
-
-;; Customizations for all of c-mode, c++-mode, and objc-mode
-(defun curl-c-mode-common-hook ()
- "Curl C mode hook"
- ;; add curl style and set it for the current buffer
- (c-add-style "curl" curl-c-style t)
- (setq tab-width 8
- indent-tabs-mode nil ; Use spaces. Not tabs.
- comment-column 40
- c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "curl_socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t" "in_addr_t" "CURLSHcode" "CURLMcode" "Curl_addrinfo"))
- )
- ;; keybindings for C, C++, and Objective-C. We can put these in
- ;; c-mode-base-map because of inheritance ...
- (define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
- (define-key c-mode-base-map "\M-m" 'curl-code-cleanup)
- (setq c-recognize-knr-p nil)
- ;;; (add-hook 'write-file-hooks 'delete-trailing-whitespace t)
- (setq show-trailing-whitespace t)
- )
-
-;; Set this is in your .emacs if you want to use the c-mode-hook as
-;; defined here right out of the box.
-; (add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)
diff --git a/curl.sln b/curl.sln
deleted file mode 100755
index 81580c38..00000000
--- a/curl.sln
+++ /dev/null
@@ -1,35 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "src\curlsrc.vcproj", "{01F90008-9A5F-42AD-9ADB-1E2EADE41CFD}"
- ProjectSection(ProjectDependencies) = postProject
- {F6829817-CDBC-4BBE-B629-3BD21F4A797D} = {F6829817-CDBC-4BBE-B629-3BD21F4A797D}
- {D2A464CD-AF25-4EC5-AA38-384766A7D817} = {D2A464CD-AF25-4EC5-AA38-384766A7D817}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcproj", "{F6829817-CDBC-4BBE-B629-3BD21F4A797D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\zlib-1.2.3\projects\vs2008\zlibstatic.vcproj", "{D2A464CD-AF25-4EC5-AA38-384766A7D817}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {01F90008-9A5F-42AD-9ADB-1E2EADE41CFD}.Debug|Win32.ActiveCfg = Debug|Win32
- {01F90008-9A5F-42AD-9ADB-1E2EADE41CFD}.Debug|Win32.Build.0 = Debug|Win32
- {01F90008-9A5F-42AD-9ADB-1E2EADE41CFD}.Release|Win32.ActiveCfg = Release|Win32
- {01F90008-9A5F-42AD-9ADB-1E2EADE41CFD}.Release|Win32.Build.0 = Release|Win32
- {F6829817-CDBC-4BBE-B629-3BD21F4A797D}.Debug|Win32.ActiveCfg = Debug|Win32
- {F6829817-CDBC-4BBE-B629-3BD21F4A797D}.Debug|Win32.Build.0 = Debug|Win32
- {F6829817-CDBC-4BBE-B629-3BD21F4A797D}.Release|Win32.ActiveCfg = Release|Win32
- {F6829817-CDBC-4BBE-B629-3BD21F4A797D}.Release|Win32.Build.0 = Release|Win32
- {D2A464CD-AF25-4EC5-AA38-384766A7D817}.Debug|Win32.ActiveCfg = Debug|Win32
- {D2A464CD-AF25-4EC5-AA38-384766A7D817}.Debug|Win32.Build.0 = Debug|Win32
- {D2A464CD-AF25-4EC5-AA38-384766A7D817}.Release|Win32.ActiveCfg = Release|Win32
- {D2A464CD-AF25-4EC5-AA38-384766A7D817}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/curl.xcodeproj/project.pbxproj b/curl.xcodeproj/project.pbxproj
deleted file mode 100644
index 3744d30f..00000000
--- a/curl.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,138 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 45;
- objects = {
-
-/* Begin PBXAggregateTarget section */
- B009C3C9127FA7CA008F0D2B /* curl */ = {
- isa = PBXAggregateTarget;
- buildConfigurationList = B009C3D0127FA7D7008F0D2B /* Build configuration list for PBXAggregateTarget "curl" */;
- buildPhases = (
- B009C3C8127FA7CA008F0D2B /* ShellScript */,
- );
- dependencies = (
- );
- name = curl;
- productName = curl;
- };
-/* End PBXAggregateTarget section */
-
-/* Begin PBXFileReference section */
- FA0FFB9212838F22007C5050 /* MacBuild.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = MacBuild.sh; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXGroup section */
- B009C3BE127FA7BA008F0D2B = {
- isa = PBXGroup;
- children = (
- FA0FFB9212838F22007C5050 /* MacBuild.sh */,
- );
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXProject section */
- B009C3C0127FA7BA008F0D2B /* Project object */ = {
- isa = PBXProject;
- buildConfigurationList = B009C3C3127FA7BA008F0D2B /* Build configuration list for PBXProject "curl" */;
- compatibilityVersion = "Xcode 3.1";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- English,
- Japanese,
- French,
- German,
- );
- mainGroup = B009C3BE127FA7BA008F0D2B;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- B009C3C9127FA7CA008F0D2B /* curl */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXShellScriptBuildPhase section */
- B009C3C8127FA7CA008F0D2B /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "# \n./MacBuild.sh\n\n# We are done\nexit 0";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- B009C3C2127FA7BA008F0D2B /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- SDKROOT = macosx10.5;
- };
- name = Release;
- };
- B009C3CB127FA7CA008F0D2B /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- PRODUCT_NAME = curl;
- ZERO_LINK = NO;
- };
- name = Release;
- };
- B0D669C21280788000FAB970 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- SDKROOT = macosx10.5;
- };
- name = Debug;
- };
- B0D669C31280788000FAB970 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- PRODUCT_NAME = curl;
- ZERO_LINK = NO;
- };
- name = Debug;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- B009C3C3127FA7BA008F0D2B /* Build configuration list for PBXProject "curl" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- B0D669C21280788000FAB970 /* Debug */,
- B009C3C2127FA7BA008F0D2B /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- B009C3D0127FA7D7008F0D2B /* Build configuration list for PBXAggregateTarget "curl" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- B0D669C31280788000FAB970 /* Debug */,
- B009C3CB127FA7CA008F0D2B /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = B009C3C0127FA7BA008F0D2B /* Project object */;
-}
diff --git a/depcomp b/depcomp
deleted file mode 100755
index 04701da5..00000000
--- a/depcomp
+++ /dev/null
@@ -1,530 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2005-07-09.11
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
- depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
- DEPDIR directory where to store dependencies.
- depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
- libtool Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "depcomp $scriptversion"
- exit $?
- ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
- echo "depcomp: Variables source, object and depmode must be set" 1>&2
- exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
- sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags. We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write. Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
- # HP compiler uses -M and no extra arg.
- gccflag=-M
- depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want. Yay! Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff. Hmm.
- "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- mv "$tmpdepfile" "$depfile"
- ;;
-
-gcc)
-## There are various ways to get dependency output from gcc. Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-## up in a subdir. Having to rename by hand is ugly.
-## (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-## than renaming).
- if test -z "$gccflag"; then
- gccflag=-MD,
- fi
- "$@" -Wp,"$gccflag$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
- sed -e 's/^[^:]*: / /' \
- -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header). We avoid this by adding
-## dummy dependencies for each header file. Too bad gcc doesn't do
-## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-hp)
- # This case exists only to let depend.m4 do its work. It works by
- # looking at the text of this script. This case will never be run,
- # since it is checked for above.
- exit 1
- ;;
-
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
-
- if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
- echo "$object : \\" > "$depfile"
-
- # Clip off the initial element (the dependent). Don't try to be
- # clever and replace this with sed code, as IRIX sed won't handle
- # lines with more than a fixed number of characters (4096 in
- # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
- # dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> $depfile
- echo >> $depfile
-
- # The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> $depfile
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-aix)
- # The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
- # start of each line; $object doesn't have directory information.
- # Version 6 uses the directory in both cases.
- stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
- tmpdepfile="$stripped.u"
- if test "$libtool" = yes; then
- "$@" -Wc,-M
- else
- "$@" -M
- fi
- stat=$?
-
- if test -f "$tmpdepfile"; then :
- else
- stripped=`echo "$stripped" | sed 's,^.*/,,'`
- tmpdepfile="$stripped.u"
- fi
-
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
-
- if test -f "$tmpdepfile"; then
- outname="$stripped.o"
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
- sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
- # foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
- # foo.o: sub/foo.c ... \
- # sub/foo.h ... \
- # ...
-
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- # Each line is of the form `foo.o: dependent.h',
- # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
- # Some versions of the HPUX 10.20 sed can't process this invocation
- # correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mecanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-#nosideeffect)
- # This comment above is used by automake to tell side-effect
- # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
- # in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
- "$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-dashXmstdout)
- # This case only exists to satisfy depend.m4. It is never actually
- # run, as this mode is specially recognized in the preamble.
- exit 1
- ;;
-
-makedepend)
- "$@" || exit $?
- # Remove any Libtool call
- if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
- shift
- done
- shift
- fi
- # X makedepend
- shift
- cleared=no
- for arg in "$@"; do
- case $cleared in
- no)
- set ""; shift
- cleared=yes ;;
- esac
- case "$arg" in
- -D*|-I*)
- set fnord "$@" "$arg"; shift ;;
- # Strip any option that makedepend may not understand. Remove
- # the object too, otherwise makedepend will parse it as a source file.
- -*|$object)
- ;;
- *)
- set fnord "$@" "$arg"; shift ;;
- esac
- done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
- touch "$tmpdepfile"
- ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile" "$tmpdepfile".bak
- ;;
-
-cpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- cat < "$tmpdepfile" >> "$depfile"
- sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-msvisualcpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- "$@" || exit $?
- IFS=" "
- for arg
- do
- case "$arg" in
- "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
- esac
- done
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-none)
- exec "$@"
- ;;
-
-*)
- echo "Unknown depmode $depmode" 1>&2
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 00000000..23f832b7
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,2 @@
+*.html
+*.pdf
diff --git a/docs/BINDINGS b/docs/BINDINGS
index 5cf07fec..fed16e99 100644
--- a/docs/BINDINGS
+++ b/docs/BINDINGS
@@ -6,14 +6,14 @@
libcurl bindings
-Creative people have written bindings or interfaces for various environments
-and programming languages. Using one of these allows you to take advantage of
-curl powers from within your favourite language or system.
+ Creative people have written bindings or interfaces for various environments
+ and programming languages. Using one of these allows you to take advantage of
+ curl powers from within your favourite language or system.
-This is a list of all known interfaces as of this writing.
+ This is a list of all known interfaces as of this writing.
-The bindings listed below are not part of the curl/libcurl distribution
-archives, but must be downloaded and installed separately.
+ The bindings listed below are not part of the curl/libcurl distribution
+ archives, but must be downloaded and installed separately.
Ada95
@@ -41,13 +41,16 @@ Ch
Cocoa
- Written by Dan Wood
+ BBHTTP: written by Bruno de Carvalho
+ https://github.com/brunodecarvalho/BBHTTP
+
+ curlhandle: Written by Dan Wood
http://curlhandle.sourceforge.net/
D
Written by Kenneth Bogert
- http://curl.haxx.se/libcurl/d/
+ http://dlang.org/library/std/net/curl.html
Dylan
@@ -55,8 +58,9 @@ Dylan
http://dylanlibs.sourceforge.net/
Eiffel
+
Written by Eiffel Software
- http://curl.haxx.se/libcurl/eiffel/
+ https://room.eiffel.com/library/curl
Euphoria
@@ -74,13 +78,23 @@ Ferite
Gambas
- http://gambas.sourceforge.net
+ http://gambas.sourceforge.net/
glib/GTK+
Written by Richard Atterer
http://atterer.net/glibcurl/
+Guile:
+
+ Written by Michael L. Gran
+ http://www.lonelycactus.com/guile-curl.html
+
+Harbour
+
+ Written by Viktor Szakáts
+ https://github.com/vszakats/harbour-core/tree/master/contrib/hbcurl
+
Haskell
Written by Galois, Inc
@@ -88,8 +102,12 @@ Haskell
Java
- Maintained by [blank]
- http://curl.haxx.se/libcurl/java/
+ https://github.com/pjlegato/curl-java
+
+Julia
+
+ Written by Paul Howe
+ https://github.com/forio/Curl.jl
Lisp
@@ -101,7 +119,7 @@ Lua
luacurl by Alexander Marinov
http://luacurl.luaforge.net/
- Lua-cURL by Jürgen Hötzel
+ Lua-cURL by Jürgen Hötzel
http://luaforge.net/projects/lua-curl/
Mono
@@ -112,7 +130,12 @@ Mono
.NET
libcurl-net by Jeffrey Phillips
- http://sourceforge.net/projects/libcurl-net/
+ https://sourceforge.net/projects/libcurl-net/
+
+node.js
+
+ node-libcurl by Jonathan Cardoso Machado
+ https://github.com/JCMais/node-libcurl
Object-Pascal
@@ -122,7 +145,7 @@ Object-Pascal
O'Caml
Written by Lars Nilsson
- http://sourceforge.net/projects/ocurl/
+ https://sourceforge.net/projects/ocurl/
Pascal
@@ -131,13 +154,13 @@ Pascal
Perl
- Maintained by Cris Bailiff
- http://curl.haxx.se/libcurl/perl/
+ Maintained by Cris Bailiff and Bálint Szilakszi
+ https://github.com/szbalint/WWW--Curl
PHP
Written by Sterling Hughes
- http://curl.haxx.se/libcurl/php/
+ https://php.net/curl
PostgreSQL
@@ -151,8 +174,7 @@ Python
R
- RCurl by Duncan Temple Lang
- http://www.omegahat.org/RCurl/
+ http://cran.r-project.org/package=curl
Rexx
@@ -173,10 +195,15 @@ Ruby
ruby-curl-multi - written by Kristjan Petursson and Keith Rarick
http://curl-multi.rubyforge.org/
+Rust
+
+ curl-rust - by Carl Lerche
+ https://github.com/carllerche/curl-rust
+
Scheme
Bigloo binding by Kirill Lisovsky
- http://curl.haxx.se/libcurl/scheme/
+ http://www.metapaper.net/lisovsky/web/curl/
S-Lang
@@ -200,13 +227,13 @@ SPL
Tcl
- Tclcurl by Andrés García
- http://personal1.iddeo.es/andresgarci/tclcurl/english/docs.html
+ Tclcurl by Andrés García
+ http://mirror.yellow5.com/tclcurl/
Visual Basic
libcurl-vb by Jeffrey Phillips
- http://sourceforge.net/projects/libcurl-vb/
+ https://sourceforge.net/projects/libcurl-vb/
Visual Foxpro
@@ -226,3 +253,8 @@ XBLite
Written by David Szafranski
http://perso.wanadoo.fr/xblite/libraries.html
+
+Xojo
+
+ Written by Andrew Lambert
+ https://github.com/charonn0/RB-libcURL
diff --git a/docs/BUGS b/docs/BUGS
index 8cbad042..36686ef8 100644
--- a/docs/BUGS
+++ b/docs/BUGS
@@ -6,39 +6,54 @@
BUGS
+ 1. Bugs
+ 1.1 There are still bugs
+ 1.2 Where to report
+ 1.3 What to report
+ 1.4 libcurl problems
+ 1.5 Who will fix the problems
+ 1.6 How to get a stack trace
+ 1.7 Bugs in libcurl bindings
+
+==============================================================================
+
+1.1 There are still bugs
+
Curl and libcurl have grown substantially since the beginning. At the time
- of writing (July 2007), there are about 47000 lines of source code, and by
- the time you read this it has probably grown even more.
+ of writing (January 2013), there are about 83,000 lines of source code, and
+ by the time you read this it has probably grown even more.
Of course there are lots of bugs left. And lots of misfeatures.
To help us make curl the stable and solid product we want it to be, we need
bug reports and bug fixes.
-WHERE TO REPORT
+1.2 Where to report
If you can't fix a bug yourself and submit a fix for it, try to report an as
detailed report as possible to a curl mailing list to allow one of us to
- have a go at a solution. You should also post your bug/problem at curl's bug
- tracking system over at
+ have a go at a solution. You can optionally also post your bug/problem at
+ curl's bug tracking system over at
- http://sourceforge.net/bugs/?group_id=976
+ https://github.com/bagder/curl/issues
- (but please read the sections below first before doing that)
+ Please read the rest of this document below first before doing that!
If you feel you need to ask around first, find a suitable mailing list and
post there. The lists are available on http://curl.haxx.se/mail/
-WHAT TO REPORT
+1.3 What to report
When reporting a bug, you should include all information that will help us
understand what's wrong, what you expected to happen and how to repeat the
bad behavior. You therefore need to tell us:
- - your operating system's name and version number (uname -a under a unix
- is fine)
+ - your operating system's name and version number
+
- what version of curl you're using (curl -V is fine)
+
- versions of the used libraries that libcurl is built to use
+
- what URL you were working with (if possible), at least which protocol
and anything and everything else you think matters. Tell us what you
@@ -59,7 +74,48 @@ WHAT TO REPORT
The address and how to subscribe to the mailing lists are detailed in the
MANUAL file.
-HOW TO GET A STACK TRACE
+1.4 libcurl problems
+
+ First, post all libcurl problems on the curl-library mailing list.
+
+ When you've written your own application with libcurl to perform transfers,
+ it is even more important to be specific and detailed when reporting bugs.
+
+ Tell us the libcurl version and your operating system. Tell us the name and
+ version of all relevant sub-components like for example the SSL library
+ you're using and what name resolving your libcurl uses. If you use SFTP or
+ SCP, the libssh2 version is relevant etc.
+
+ Showing us a real source code example repeating your problem is the best way
+ to get our attention and it will greatly increase our chances to understand
+ your problem and to work on a fix (if we agree it truly is a problem).
+
+ Lots of problems that appear to be libcurl problems are actually just abuses
+ of the libcurl API or other malfunctions in your applications. It is advised
+ that you run your problematic program using a memory debug tool like
+ valgrind or similar before you post memory-related or "crashing" problems to
+ us.
+
+1.5 Who will fix the problems
+
+ If the problems or bugs you describe are considered to be bugs, we want to
+ have the problems fixed.
+
+ There are no developers in the curl project that are paid to work on bugs.
+ All developers that take on reported bugs do this on a voluntary basis. We
+ do it out of an ambition to keep curl and libcurl excellent products and out
+ of pride.
+
+ But please do not assume that you can just lump over something to us and it
+ will then magically be fixed after some given time. Most often we need
+ feedback and help to understand what you've experienced and how to repeat a
+ problem. Then we may only be able to assist YOU to debug the problem and to
+ track down the proper fix.
+
+ We get reports from many people every month and each report can take a
+ considerable amount of time to really go to the bottom with.
+
+1.6 How to get a stack trace
First, you must make sure that you compile all sources with -g and that you
don't 'strip' the final executable. Try to avoid optimizing the code as
@@ -79,3 +135,12 @@ HOW TO GET A STACK TRACE
crashed. Include the stack trace with your detailed bug report. It'll help a
lot.
+1.7 Bugs in libcurl bindings
+
+ There will of course pop up bugs in libcurl bindings. You should then
+ primarily approach the team that works on that particular binding and see
+ what you can do to help them fix the problem.
+
+ If you suspect that the problem exists in the underlying libcurl, then
+ please convert your program over to plain C and follow the steps outlined
+ above.
diff --git a/docs/CONTRIBUTE b/docs/CONTRIBUTE
index db03c42a..c6ea9773 100644
--- a/docs/CONTRIBUTE
+++ b/docs/CONTRIBUTE
@@ -34,6 +34,7 @@
3.3 How To Make a Patch without git
3.4 How to get your changes into the main sources
3.5 Write good commit messages
+ 3.6 About pull requests
==============================================================================
@@ -51,6 +52,10 @@
We also hang out on IRC in #curl on irc.freenode.net
+ If you're at all interested in the code side of things, consider clicking
+ 'watch' on the curl repo at github to get notified on pull requests and new
+ issues posted there.
+
1.2. License
When contributing with code, you agree to put your changes and new code under
@@ -77,10 +82,10 @@
1.3 What To Read
- Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS, the
- most recent CHANGES. Just lurking on the libcurl mailing list is gonna give
- you a lot of insights on what's going on right now. Asking there is a good
- idea too.
+ Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS and the
+ most recent changes in the git log. Just lurking on the curl-library mailing
+ list is gonna give you a lot of insights on what's going on right now. Asking
+ there is a good idea too.
2. cURL Coding Standards
@@ -97,12 +102,12 @@
2.2 Indenting
- Please try using the same indenting levels and bracing method as all the
- other code already does. It makes the source code a lot easier to follow if
- all of it is written using the same style. We don't ask you to like it, we
- just ask you to follow the tradition! ;-) This mainly means: 2-level indents,
- using spaces only (no tabs) and having the opening brace ({) on the same line
- as the if() or while().
+ Use the same indenting levels and bracing method as all the other code
+ already does. It makes the source code easier to follow if all of it is
+ written using the same style. We don't ask you to like it, we just ask you to
+ follow the tradition! ;-) This mainly means: 2-level indents, using spaces
+ only (no tabs) and having the opening brace ({) on the same line as the if()
+ or while().
Also note that we use if() and while() with no space before the parenthesis.
@@ -150,6 +155,9 @@
description exactly what they correct so that all patches can be selectively
applied by the maintainer or other interested parties.
+ Also, separate patches enable bisecting much better when we track problems in
+ the future.
+
2.9 Patch Against Recent Sources
Please try to get the latest available sources to make your patches
@@ -177,6 +185,10 @@
test case that verifies that it works as documented. If every submitter also
posts a few test cases, it won't end up as a heavy burden on a single person!
+ If you don't have test cases or perhaps you have done something that is very
+ hard to write tests for, do explain exactly how you have otherwise tested and
+ verified your changes.
+
3. Pushing Out Your Changes
3.1 Write Access to git Repository
@@ -189,9 +201,9 @@
3.2 How To Make a Patch with git
- You need to first checkout the respository:
+ You need to first checkout the repository:
- git clone git://github.com/bagder/curl.git
+ git clone https://github.com/bagder/curl.git
You then proceed and edit all the files you like and you commit them to your
local repository:
@@ -211,7 +223,7 @@
commit.
Now send those patches off to the curl-library list. You can of course opt to
- do that with the 'get send-email' command.
+ do that with the 'git send-email' command.
3.3 How To Make a Patch without git
@@ -233,47 +245,62 @@
For unix-like operating systems:
- http://www.gnu.org/software/patch/patch.html
- http://www.gnu.org/directory/diffutils.html
+ https://savannah.gnu.org/projects/patch/
+ https://www.gnu.org/software/diffutils/
For Windows:
- http://gnuwin32.sourceforge.net/packages/patch.htm
- http://gnuwin32.sourceforge.net/packages/diffutils.htm
+ http://gnuwin32.sourceforge.net/packages/patch.htm
+ http://gnuwin32.sourceforge.net/packages/diffutils.htm
3.4 How to get your changes into the main sources
- 1. Submit your patch to the curl-library mailing list
+ Submit your patch to the curl-library mailing list.
- 2. Make the patch against as recent sources as possible.
+ Make the patch against as recent sources as possible.
- 3. Make sure your patch adheres to the source indent and coding style of
- already existing source code. Failing to do so just adds more work for me.
+ Make sure your patch adheres to the source indent and coding style of already
+ existing source code. Failing to do so just adds more work for me.
- 4. Respond to replies on the list about the patch and answer questions and/or
- fix nits/flaws. This is very important. I will take lack of replies as a
- sign that you're not very anxious to get your patch accepted and I tend to
- simply drop such patches from my TODO list.
+ Respond to replies on the list about the patch and answer questions and/or
+ fix nits/flaws. This is very important. I will take lack of replies as a sign
+ that you're not very anxious to get your patch accepted and I tend to simply
+ drop such patches from my TODO list.
- 5. If you've followed the above mentioned paragraphs and your patch still
- hasn't been incorporated after some weeks, consider resubmitting it to the
- list.
+ If you've followed the above paragraphs and your patch still hasn't been
+ incorporated after some weeks, consider resubmitting it to the list.
3.5 Write good commit messages
- A short guide to how to do fine commit messages in the curl project.
+ A short guide to how to do fine commit messages in the curl project.
+
+ ---- start ----
+ [area]: [short line describing the main effect]
+
+ [separate the above single line from the rest with an empty line]
+
+ [full description, no wider than 72 columns that describe as much as
+ possible as to why this change is made, and possibly what things
+ it fixes and everything else that is related]
+
+ [Bug: link to source of the report or more related discussion]
+ [Reported-by: John Doe - credit the reporter]
+ [whatever-else-by: credit all helpers, finders, doers]
+ ---- stop ----
- ---- start ----
- [area]: [short line describing the main effect]
+ Don't forget to use commit --author="" if you commit someone else's work,
+ and make sure that you have your own user and email setup correctly in git
+ before you commit
- [separate the above single line from the rest with an empty line]
+3.6 About pull requests
- [full description, no wider than 72 columns that describe as much as
- possible as to why this change is made, and possibly what things
- it fixes and everything else that is related]
- ---- stop ----
+ With git (and especially github) it is easy and tempting to send a pull
+ request to the curl project to have changes merged this way instead of
+ mailing patches to the curl-library mailing list.
- Don't forget to use commit --author="" if you commit someone else's work,
- and make sure that you have your own user and email setup correctly in git
- before you commit
+ We used to dislike this but we're trying to change that and accept that this
+ is a frictionless way for people to contribute to the project. We now welcome
+ pull requests!
+ We will continue to avoid using github's merge tools to make the history
+ linear and to make sure commits follow our style guidelines.
diff --git a/docs/DISTRO-DILEMMA b/docs/DISTRO-DILEMMA
index 108e6bad..2d317fdb 100644
--- a/docs/DISTRO-DILEMMA
+++ b/docs/DISTRO-DILEMMA
@@ -59,7 +59,7 @@ GnuTLS
OpenSSL does. Now, you can build and distribute an TLS/SSL capable libcurl
without including any Original BSD licensed code.
- I believe Debian is the first (only?) distro that provides libcurl/GnutTLS
+ I believe Debian is the first (only?) distro that provides libcurl/GnuTLS
packages.
yassl
@@ -72,20 +72,20 @@ GnuTLS vs OpenSSL vs yassl
While these three libraries offer similar features, they are not equal.
libcurl does not (yet) offer a standardized stable ABI if you decide to
- switch from using libcurl-openssl to libcurl-gnutls or vice versa. The GnuTLS
+ switch from using libcurl-openssl to libcurl-gnutls or vice-versa. The GnuTLS
and yassl support is very recent in libcurl and it has not been tested nor
used very extensively, while the OpenSSL equivalent code has been used and
thus matured since 1999.
GnuTLS
- - LGPL licensened
+ - LGPL licensed
- supports SRP
- lacks SSLv2 support
- lacks MD2 support (used by at least some CA certs)
- lacks the crypto functions libcurl uses for NTLM
OpenSSL
- - Original BSD licensened
+ - Original BSD licensed
- lacks SRP
- supports SSLv2
- older and more widely used
@@ -112,7 +112,7 @@ The Better License, Original BSD, GPL or LGPL?
In Debian land, there seems to be a common opinion that LGPL is "maximally
compatible" with apps while Original BSD is not. Like this:
- http://lists.debian.org/debian-devel/2005/09/msg01417.html
+ https://lists.debian.org/debian-devel/2005/09/msg01417.html
More SSL Libraries
@@ -163,13 +163,13 @@ Distro Angle of this Problem
Footnotes
[1] = http://www.xfree86.org/3.3.6/COPYRIGHT2.html#6
- [2] = http://www.fsf.org/licensing/essays/bsd.html
- [3] = http://www.fsf.org/licensing/licenses/gpl.html
+ [2] = https://www.gnu.org/philosophy/bsd.html
+ [3] = https://www.gnu.org/licenses/gpl.html
[4] = http://curl.haxx.se/docs/copyright.html
- [5] = http://www.openssl.org/source/license.html
- [6] = http://www.fsf.org/licensing/licenses/gpl.html end of section 3
- [7] = http://www.fsf.org/licensing/licenses/lgpl.html
- [8] = http://en.wikipedia.org/wiki/OpenSSL_exception
+ [5] = https://www.openssl.org/source/license.html
+ [6] = https://www.gnu.org/licenses/gpl.html end of section 3
+ [7] = https://www.gnu.org/licenses/lgpl.html
+ [8] = https://en.wikipedia.org/wiki/OpenSSL_exception
Feedback/Updates provided by
diff --git a/docs/FAQ b/docs/FAQ
index 2e35dd67..06a306d9 100644
--- a/docs/FAQ
+++ b/docs/FAQ
@@ -1,4 +1,3 @@
-Updated: October 6, 2010 (http://curl.haxx.se/docs/faq.html)
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
@@ -22,6 +21,7 @@ FAQ
1.12 I have a problem who can I chat with?
1.13 curl's ECCN number?
1.14 How do I submit my patch?
+ 1.15 How do I port libcurl to my OS?
2. Install Related Problems
2.1 configure doesn't find OpenSSL even when it is installed
@@ -36,7 +36,7 @@ FAQ
3.2 How do I tell curl to resume a transfer?
3.3 Why doesn't my posting using -F work?
3.4 How do I tell curl to run custom FTP commands?
- 3.5 How can I disable the Pragma: nocache header?
+ 3.5 How can I disable the Accept: */* header?
3.6 Does curl support ASP, XML, XHTML or HTML version Y?
3.7 Can I use curl to delete/rename a file through FTP?
3.8 How do I tell curl to follow HTTP redirects?
@@ -51,6 +51,9 @@ FAQ
3.17 How do I list the root dir of an FTP server?
3.18 Can I use curl to send a POST/PUT and not wait for a response?
3.19 How do I get HTTP from a host using a specific IP address?
+ 3.20 How to SFTP from my user's home directory?
+ 3.21 Protocol xxx not supported or disabled in libcurl
+ 3.22 curl -X gives me HTTP problems
4. Running Problems
4.1 Problems connecting to SSL servers.
@@ -78,6 +81,8 @@ 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!
+ 4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
5. libcurl Issues
5.1 Is libcurl thread-safe?
@@ -95,6 +100,9 @@ FAQ
5.13 How do I stop an ongoing transfer?
5.14 Using C++ non-static functions for callbacks?
5.15 How do I get an FTP directory listing?
+ 5.16 I want a different time-out!
+ 5.17 Can I write a server with libcurl?
+ 5.18 Does libcurl use threads?
6. License Issues
6.1 I have a GPL program, can I use the libcurl library?
@@ -107,7 +115,7 @@ FAQ
7. PHP/CURL Issues
7.1 What is PHP/CURL?
- 7.2 Who write PHP/CURL?
+ 7.2 Who wrote PHP/CURL?
7.3 Can I perform multiple requests using the same handle?
==============================================================================
@@ -128,15 +136,15 @@ 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, SMTP, SMTPS, TELNET and TFTP.
+ POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP.
libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
- kerberos, HTTP form based upload, proxies, cookies, user+password
+ Kerberos, SPNEGO, 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, HPUX,
- IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac
+ platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HP-UX,
+ 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...
@@ -150,7 +158,10 @@ FAQ
Since curl uses libcurl, curl supports the same wide range of common
Internet protocols that libcurl does.
- We pronounce curl and cURL with an initial k sound: [kurl].
+ 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
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
@@ -198,27 +209,25 @@ FAQ
better. We do however believe in a few rules when it comes to the future of
curl:
- * Curl -- the command line tool -- is to remain a non-graphical command line
- tool. If you want GUIs or fancy scripting capabilities, you should look
- for another tool that uses libcurl.
+ Curl -- the command line tool -- is to remain a non-graphical command line
+ tool. If you want GUIs or fancy scripting capabilities, you should look for
+ another tool that uses libcurl.
- * We do not add things to curl that other small and available tools already
- do very fine at the side. Curl's output is fine to pipe into another
- program or redirect to another file for the next program to interpret.
+ We do not add things to curl that other small and available tools already do
+ very fine at the side. Curl's output is fine to pipe into another program or
+ redirect to another file for the next program to interpret.
- * We focus on protocol related issues and improvements. If you wanna do more
- magic with the supported protocols than curl currently does, chances are
- big we will agree. If you wanna add more protocols, we may very well
- agree.
+ We focus on protocol related issues and improvements. If you wanna do more
+ magic with the supported protocols than curl currently does, chances are big
+ we will agree. If you wanna add more protocols, we may very well agree.
- * If you want someone else to make all the work while you wait for us to
- implement it for you, that is not a very friendly attitude. We spend a
- considerable time already on maintaining and developing curl. In order to
- get more out of us, you should consider trading in some of your time and
- efforts in return.
+ If you want someone else to make all the work while you wait for us to
+ implement it for you, that is not a very friendly attitude. We spend a
+ considerable time already on maintaining and developing curl. In order to
+ get more out of us, you should consider trading in some of your time and
+ efforts in return.
- * If you write the code, chances are bigger that it will get into curl
- faster.
+ If you write the code, chances are bigger that it will get into curl faster.
1.5 Who makes curl?
@@ -235,16 +244,16 @@ FAQ
1.6 What do you get for making curl?
Project cURL is entirely free and open. No person gets paid for developing
- (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.
+ 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.
We still get help from companies. Haxx provides web site, bandwidth, mailing
- lists etc and sourceforge.net hosts project services we take advantage from,
- like the bug tracker. Also again, some companies have sponsored certain
- parts of the development in the past and I hope some will continue to do so
- in the future.
+ lists etc, sourceforge.net hosts project services we take advantage from,
+ like the bug tracker and github hosts the primary git repository. Also
+ again, some companies have sponsored certain parts of the development in the
+ past and I hope some will continue to do so in the future.
If you want to support our project, consider a donation or a banner-program
or even better: by helping us coding, documenting, testing etc.
@@ -259,7 +268,7 @@ FAQ
Our project name curl has been in effective use since 1998. We were not the
first computer related project to use the name "curl" and do not claim any
- first-hand rights to the name.
+ rights to the name.
We recognize that we will be living in parallel with curl.com and wish them
every success.
@@ -304,49 +313,17 @@ FAQ
We don't know how many users that downloaded or installed curl and then
never use it.
- Some facts to use as input to the math:
-
- curl packages are downloaded from the curl.haxx.se and mirrors over a
- million times per year. curl is installed by default with most Linux
- distributions. curl is installed by default with Mac OS X. curl and libcurl
- as used by numerous applications that include libcurl binaries in their
- distribution packages (like Adobe Acrobat Reader and Google Earth).
-
- More than a hundred known named companies use curl in commercial
- environments and products and more than a hundred known named open source
- projects depend on (lib)curl.
-
- In a poll on the curl web site mid-2005, more than 50% of the 300+ answers
- estimated a user base of one million users or more.
-
- In March 2005, the "Linux Counter project" estimated a total Linux user base
- of some 29 millions, while Netcraft detected some 4 million "active" Linux
- based web servers. A guess is that a fair amount of these Linux
- installations have curl installed.
+ In May 2012 Daniel did a counting game and came up with a number that may
+ be completely wrong or somewhat accurate. Over 500 million!
- The Debian project maintains statistics on packages installed by people
- who have voluntarily run their package counting application. In mid-2010,
- libcurl3 was installed on over 55000 such systems (62% of reporting systems)
- and was one of the 320 most popular installed packages (out of about 107000
- possible packages).
-
- All this taken together, there is no doubt that there are millions of
- (lib)curl users.
-
- http://curl.haxx.se/docs/companies.html
- http://curl.haxx.se/docs/programs.html
- http://curl.haxx.se/libcurl/using/apps.html
- http://counter.li.org/estimates.php
- http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html
- http://qa.debian.org/popcon.php?package=curl
+ See http://daniel.haxx.se/blog/2012/05/16/300m-users/
1.11 Why don't you update ca-bundle.crt
- The ca-bundle.crt file that used to be bundled with curl was very outdated
- (it being last modified year 2000 should tell) and must be replaced with a
- much more modern and up-to-date version by anyone who wants to verify peers
- anyway. It is no longer provided, the last curl release that shipped it was
- curl 7.18.0.
+ The ca cert bundle that used to shipped with curl was very outdated and must
+ be replaced with an up-to-date version by anyone who wants to verify
+ peers. It is no longer provided by curl. The last curl release ever that
+ shipped a ca cert bundle was curl 7.18.0.
In the cURL project we've decided not to attempt to keep this file updated
(or even present anymore) since deciding what to add to a ca cert bundle is
@@ -375,7 +352,7 @@ FAQ
cryptography. When doing so, the Export Control Classification Number (ECCN)
is used to identify the level of export control etc.
- ASF gives a good explanation at http://www.apache.org/dev/crypto.html
+ ASF gives a good explanation at https://www.apache.org/dev/crypto.html
We believe curl's number might be ECCN 5D002, another possibility is
5D992. It seems necessary to write them, asking to confirm.
@@ -404,6 +381,19 @@ FAQ
Lots of more details are found in the CONTRIBUTE and INTERNALS docs.
+ 1.15 How do I port libcurl to my OS?
+
+ Here's a rough step-by-step:
+
+ 1. copy a suitable lib/config-*.h file as a start to lib/config-[youros].h
+
+ 2. edit lib/config-[youros].h to match your OS and setup
+
+ 3. edit lib/curl_setup.h to include config-[youros].h when your OS is
+ detected by the preprocessor, in the style others already exist
+
+ 4. compile lib/*.c and make them into a library
+
2. Install Related Problems
@@ -446,19 +436,24 @@ FAQ
2.2 Does curl work/build with other SSL libraries?
- Curl has been written to use OpenSSL, GnuTLS, yassl, NSS or PolarSSL,
- although there should not be many problems using a different library. If
- anyone does "port" curl to use a different SSL library, we are of course
- very interested in getting the patch!
+ Curl has been written to use a generic SSL function layer internally, and
+ that SSL functionality can then be provided by one out of many different SSL
+ backends.
+
+ 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
+ and cons, and we try to maintain a comparison of them here:
+ http://curl.haxx.se/docs/ssl-compared.html
2.3 Where can I find a copy of LIBEAY32.DLL?
That is an OpenSSL binary built for Windows.
- Curl uses OpenSSL to do the SSL stuff. The LIBEAY32.DLL is what curl needs
- on a windows machine to do https://. Check out the curl web site to find
- accurate and up-to-date pointers to recent OpenSSL DLLs and other binary
- packages.
+ Curl can be built with OpenSSL to do the SSL stuff. The LIBEAY32.DLL is then
+ what curl needs on a windows machine to do https:// etc. Check out the curl
+ web site to find accurate and up-to-date pointers to recent OpenSSL DLLs and
+ other binary packages.
2.4 Does curl support SOCKS (RFC 1928) ?
@@ -470,9 +465,13 @@ FAQ
3.1 curl: (1) SSL is disabled, https: not supported
If you get this output when trying to get anything from a https:// server,
- it means that the configure script couldn't find all libs and include files
- it requires for SSL to work. If the configure script fails to find them,
- curl is simply built without SSL support.
+ it means that the instance of curl/libcurl that you're using was built
+ without support for this protocol.
+
+ This could've happened if the configure script that was run at build time
+ couldn't find all libs and include files curl requires for SSL to work. If
+ the configure script fails to find them, curl is simply built without SSL
+ support.
To get the https:// support into a curl that was previously built but that
reports that https:// is not supported, you should dig through the document
@@ -485,15 +484,14 @@ FAQ
3.2 How do I tell curl to resume a transfer?
Curl supports resumed transfers both ways on both FTP and HTTP.
-
Try the -C option.
3.3 Why doesn't my posting using -F work?
You can't simply use -F or -d at your choice. The web server that will
- receive your post assumes one of the formats. If the form you're trying to
- "fake" sets the type to 'multipart/form-data', then and only then you must
- use the -F type. In all the most common cases, you should use -d which then
+ receive your post expects one of the formats. If the form you're trying to
+ submit uses the type 'multipart/form-data', then and only then you must use
+ the -F type. In all the most common cases, you should use -d which then
causes a posting with the type 'application/x-www-form-urlencoded'.
This is described in some detail in the MANUAL and TheArtOfHttpScripting
@@ -507,22 +505,23 @@ FAQ
You can tell curl to perform optional commands both before and/or after a
file transfer. Study the -Q/--quote option.
- Since curl is used for file transfers, you don't use curl to just perform
- FTP commands without transferring anything. Therefore you must always specify
- a URL to transfer to/from even when doing custom FTP commands.
+ Since curl is used for file transfers, you don't normally use curl to
+ perform FTP commands without transferring anything. Therefore you must
+ always specify a URL to transfer to/from even when doing custom FTP
+ commands, or use -I which implies the "no body" option sent to libcurl.
- 3.5 How can I disable the Pragma: nocache header?
+ 3.5 How can I disable the Accept: */* header?
You can change all internally generated headers by adding a replacement with
the -H/--header option. By adding a header with empty contents you safely
- disable that one. Use -H "Pragma:" to disable that specific header.
+ disable that one. Use -H "Accept:" to disable that specific header.
3.6 Does curl support ASP, XML, XHTML or HTML version Y?
To curl, all contents are alike. It doesn't matter how the page was
- generated. It may be ASP, PHP, Perl, shell-script, SSI or plain
- HTML-files. There's no difference to curl and it doesn't even know what kind
- of language that generated the page.
+ generated. It may be ASP, PHP, Perl, shell-script, SSI or plain HTML
+ files. There's no difference to curl and it doesn't even know what kind of
+ language that generated the page.
See also item 3.14 regarding javascript.
@@ -559,6 +558,12 @@ FAQ
install and use them, in the libcurl section of the curl web site:
http://curl.haxx.se/libcurl/
+ All the various bindings to libcurl are made by other projects and people,
+ outside of the cURL project. The cURL project itself only produces libcurl
+ with its plain C API. If you don't find anywhere else to ask you can ask
+ about bindings on the curl-library list too, but be prepared that people on
+ that list may not know anything about bindings.
+
In October 2009, there were interfaces available for the following
languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Dylan, Eiffel, Euphoria,
Ferite, Gambas, glib/GTK+, Haskell, ILE/RPG, Java, Lisp, Lua, Mono, .NET,
@@ -633,15 +638,15 @@ FAQ
Some workarounds usually suggested to overcome this Javascript dependency:
- - Depending on the Javascript complexity, write up a script that
- translates it to another language and execute that.
+ Depending on the Javascript complexity, write up a script that translates it
+ to another language and execute that.
- - Read the Javascript code and rewrite the same logic in another language.
+ Read the Javascript code and rewrite the same logic in another language.
- - Implement a Javascript interpreter, people have successfully used the
- Mozilla Javascript engine in the past.
+ Implement a Javascript interpreter, people have successfully used the
+ Mozilla Javascript engine in the past.
- - Ask your admins to stop this, for a static proxy setup or similar.
+ Ask your admins to stop this, for a static proxy setup or similar.
3.15 Can I do recursive fetches with curl?
@@ -657,34 +662,38 @@ FAQ
There are three different kinds of "certificates" to keep track of when we
talk about using SSL-based protocols (HTTPS or FTPS) using curl or libcurl.
- - Client certificate. The server you communicate may require that you can
- provide this in order to prove that you actually are who you claim to be.
- If the server doesn't require this, you don't need a client certificate.
-
- A client certificate is always used together with a private key, and the
- private key has a pass phrase that protects it.
-
- - Server certificate. The server you communicate with has a server
- certificate. You can and should verify this certificate to make sure that
- you are truly talking to the real server and not a server impersonating
- it.
-
- - Certificate Authority certificate ("CA cert"). You often have several CA
- certs in a CA cert bundle that can be used to verify a server certificate
- that was signed by one of the authorities in the bundle. curl does not
- come with a CA cert bundle but most curl installs provide one. You can
- also override the default.
-
- The server certificate verification process is made by using a Certificate
- Authority certificate ("CA cert") that was used to sign the server
- certificate. Server certificate verification is enabled by default in curl
- and libcurl and is often the reason for problems as explained in FAQ entry
- 4.12 and the SSLCERTS document
- (http://curl.haxx.se/docs/sslcerts.html). Server certificates that are
- "self-signed" or otherwise signed by a CA that you do not have a CA cert
- for, cannot be verified. If the verification during a connect fails, you
- are refused access. You then need to explicitly disable the verification
- to connect to the server.
+ CLIENT CERTIFICATE
+
+ The server you communicate may require that you can provide this in order to
+ prove that you actually are who you claim to be. If the server doesn't
+ require this, you don't need a client certificate.
+
+ A client certificate is always used together with a private key, and the
+ private key has a pass phrase that protects it.
+
+ SERVER CERTIFICATE
+
+ The server you communicate with has a server certificate. You can and should
+ verify this certificate to make sure that you are truly talking to the real
+ server and not a server impersonating it.
+
+ CERTIFICATE AUTHORITY CERTIFICATE ("CA cert")
+
+ You often have several CA certs in a CA cert bundle that can be used to
+ verify a server certificate that was signed by one of the authorities in the
+ bundle. curl does not come with a CA cert bundle but most curl installs
+ provide one. You can also override the default.
+
+ The server certificate verification process is made by using a Certificate
+ Authority certificate ("CA cert") that was used to sign the server
+ certificate. Server certificate verification is enabled by default in curl
+ and libcurl and is often the reason for problems as explained in FAQ entry
+ 4.12 and the SSLCERTS document
+ (http://curl.haxx.se/docs/sslcerts.html). Server certificates that are
+ "self-signed" or otherwise signed by a CA that you do not have a CA cert
+ for, cannot be verified. If the verification during a connect fails, you are
+ refused access. You then need to explicitly disable the verification to
+ connect to the server.
3.17 How do I list the root dir of an FTP server?
@@ -715,6 +724,69 @@ FAQ
curl --header "Host: www.example.com" http://127.0.0.1/
+ You can also opt to add faked host name entries to curl with the --resolve
+ option. That has the added benefit that things like redirects will also work
+ properly. The above operation would instead be done as:
+
+ curl --resolve www.example.com:80:127.0.0.1 http://www.example.com/
+
+ 3.20 How to SFTP from my user's home directory?
+
+ Contrary to how FTP works, SFTP and SCP URLs specify the exact directory to
+ work with. It means that if you don't specify that you want the user's home
+ directory, you get the actual root directory.
+
+ To specify a file in your user's home directory, you need to use the correct
+ URL syntax which for sftp might look similar to:
+
+ curl -O -u user:password sftp://example.com/~/file.txt
+
+ and for SCP it is just a different protocol prefix:
+
+ curl -O -u user:password scp://example.com/~/file.txt
+
+ 3.21 Protocol xxx not supported or disabled in libcurl
+
+ When passing on a URL to curl to use, it may respond that the particular
+ protocol is not supported or disabled. The particular way this error message
+ is phrased is because curl doesn't make a distinction internally of whether
+ a particular protocol is not supported (i.e. never got any code added that
+ knows how to speak that protocol) or if it was explicitly disabled. curl can
+ be built to only support a given set of protocols, and the rest would then
+ be disabled or not supported.
+
+ Note that this error will also occur if you pass a wrongly spelled protocol
+ part as in "htpt://example.com" or as in the less evident case if you prefix
+ the protocol part with a space as in " http://example.com/".
+
+ 3.22 curl -X gives me HTTP problems
+
+ In normal circumstances, -X should hardly ever be used.
+
+ By default you use curl without explicitly saying which request method to
+ use when the URL identifies a HTTP transfer. If you just pass in a URL like
+ "curl http://example.com" it will use GET. If you use -d or -F curl will use
+ POST, -I will cause a HEAD and -T will make it a PUT.
+
+ If for whatever reason you're not happy with these default choices that curl
+ does for you, you can override those request methods by specifying -X
+ [WHATEVER]. This way you can for example send a DELETE by doing "curl -X
+ DELETE [URL]".
+
+ It is thus pointless to do "curl -XGET [URL]" as GET would be used
+ anyway. In the same vein it is pointless to do "curl -X POST -d data
+ [URL]"... But you can make a fun and somewhat rare request that sends a
+ request-body in a GET request with something like "curl -X GET -d data
+ [URL]"
+
+ Note that -X doesn't actually change curl's behavior as it only modifies the
+ actual string sent in the request, but that may of course trigger a
+ different set of events.
+
+ Accordingly, by using -XPOST on a command line that for example would follow
+ a 303 redirect, you will effectively prevent curl from behaving
+ correctly. Be aware.
+
4. Running Problems
@@ -745,12 +817,13 @@ FAQ
curl 'http://www.altavista.com/cgi-bin/query?text=yes&q=curl'
- In Windows, the standard DOS shell treats the %-symbol specially and you
- need to use TWO %-symbols for each single one you want to use in the URL.
+ In Windows, the standard DOS shell treats the percent sign specially and you
+ need to use TWO percent signs for each single one you want to use in the
+ URL.
- Also note that if you want the literal %-symbol to be part of the data you
- pass in a POST using -d/--data you must encode it as '%25' (which then also
- needs the %-symbol doubled on Windows machines).
+ If you want a literal percent sign to be part of the data you pass in a POST
+ using -d/--data you must encode it as '%25' (which then also needs the
+ percent sign doubled on Windows machines).
4.3 How can I use {, }, [ or ] to specify multiple URLs?
@@ -792,7 +865,7 @@ FAQ
4.5.3 "403 Forbidden"
- The server understood the request, but is refusing to fulfill it.
+ The server understood the request, but is refusing to fulfil it.
Authorization will not help and the request SHOULD NOT be repeated.
4.5.4 "404 Not Found"
@@ -863,8 +936,8 @@ FAQ
4.9 Curl can't authenticate to the server that requires NTLM?
- NTLM support requires OpenSSL, GnuTLS, NSS or Microsoft Windows libraries at
- build-time to provide this functionality.
+ NTLM support requires OpenSSL, GnuTLS, NSS, Secure Transport, or Microsoft
+ Windows libraries at build-time to provide this functionality.
NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
should not use such ones.
@@ -919,13 +992,13 @@ FAQ
4.14 Redirects work in browser but not with curl!
curl supports HTTP redirects fine (see item 3.8). Browsers generally support
- at least two other ways to perform directs that curl does not:
+ at least two other ways to perform redirects that curl does not:
- - Meta tags. You can write a HTML tag that will cause the browser to
- redirect to another given URL after a certain time.
+ Meta tags. You can write a HTML tag that will cause the browser to redirect
+ to another given URL after a certain time.
- - Javascript. You can write a Javascript program embedded in a HTML page
- that redirects the browser to another given URL.
+ Javascript. You can write a Javascript program embedded in a HTML page that
+ redirects the browser to another given URL.
There is no way to make curl follow these redirects. You must either
manually figure out what the page is set to do, or you write a script that
@@ -969,7 +1042,7 @@ FAQ
timeout is set.
See option TcpMaxConnectRetransmissions on this page:
- http://support.microsoft.com/?scid=kb%3Ben-us%3B175523&x=6&y=7
+ https://support.microsoft.com/en-us/kb/175523/en-us
Also, even on non-Windows systems there may run a firewall or anti-virus
software or similar that accepts the connection but does not actually do
@@ -986,7 +1059,7 @@ FAQ
You'll find that even if D:\blah.txt does exist, cURL returns a 'file
not found' error.
- According to RFC 1738 (http://www.faqs.org/rfcs/rfc1738.html),
+ According to RFC 1738 (https://www.ietf.org/rfc/rfc1738.txt),
file:// URLs must contain a host component, but it is ignored by
most implementations. In the above example, 'D:' is treated as the
host component, and is taken away. Thus, cURL tries to open '/blah.txt'.
@@ -1006,11 +1079,11 @@ FAQ
4.19 Why doesn't cURL return an error when the network cable is unplugged?
- Unplugging the cable is not an error situation. The TCP/IP protocol stack
+ Unplugging a cable is not an error situation. The TCP/IP protocol stack
was designed to be fault tolerant, so even though there may be a physical
break somewhere the connection shouldn't be affected, just possibly
delayed. Eventually, the physical break will be fixed or the data will be
- re-routed around the physical problem.
+ re-routed around the physical problem through another path.
In such cases, the TCP/IP stack is responsible for detecting when the
network connection is irrevocably lost. Since with some protocols it is
@@ -1028,6 +1101,46 @@ FAQ
falls too low, and --connect-timeout and --max-time can be used to put an
overall timeout on the connection phase or the entire transfer.
+ A libcurl-using application running in a known physical environment (e.g.
+ an embedded device with only a single network connection) may want to act
+ 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.
+
+ 4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
+
+ If you use verbose to see the HTTP request when you send off a HTTP/2
+ request, it will still say 1.1.
+
+ The reason for this is that we first generate the request to send using the
+ old 1.1 style and show that request in the verbose output, and then we
+ convert it over to the binary header-compressed HTTP/2 style. The actual
+ "1.1" part from that request is then not actually used in the transfer. The
+ binary HTTP/2 headers are not human readable.
5. libcurl Issues
@@ -1037,18 +1150,26 @@ FAQ
We have written the libcurl code specifically adjusted for multi-threaded
programs. libcurl will use thread-safe functions instead of non-safe ones if
- your system has such.
+ your system has such. Note that you must never share the same handle in
+ multiple threads.
+
+ libcurl's implementation of timeouts might use signals (depending on what it
+ was built to use for name resolving), and signal handling is generally not
+ thread-safe. Multi-threaded Applicationss that call libcurl from different
+ threads (on different handles) might want to use CURLOPT_NOSIGNAL, e.g.:
+
+ curl_easy_setopt(handle, CURLOPT_NOSIGNAL, true);
If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
need to provide one or two locking functions:
- http://www.openssl.org/docs/crypto/threads.html
+ https://www.openssl.org/docs/crypto/threads.html
If you use a GnuTLS-powered libcurl in a multi-threaded environment, you
need to provide locking function(s) for libgcrypt (which is used by GnuTLS
for the crypto functions).
- http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
+ https://web.archive.org/web/20111103083330/http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
No special locking is needed with a NSS-powered libcurl. NSS is thread-safe.
@@ -1117,6 +1238,11 @@ FAQ
libcurl will reuse connections for all transfers that are made using the
same libcurl handle.
+ When you use the easy interface, the connection cache is kept within the
+ easy handle. If you instead use the multi interface, the connection cache
+ will be kept within the multi handle and will be shared among all the easy
+ handles that are used within the same multi handle.
+
5.7 Link errors when building libcurl on Windows!
You need to make sure that your project, and all the libraries (both static
@@ -1138,13 +1264,12 @@ FAQ
the import libraries below. These are the libraries produced by the various
lib/Makefile.* files:
- Target: static lib. import lib for libcurl*.dll.
- -----------------------------------------------------------
- MingW: libcurl.a libcurldll.a
- MSVC (release): libcurl.lib libcurl_imp.lib
- MSVC (debug): libcurld.lib libcurld_imp.lib
- Borland: libcurl.lib libcurl_imp.lib
-
+ Target: static lib. import lib for libcurl*.dll.
+ -----------------------------------------------------------
+ MingW: libcurl.a libcurldll.a
+ MSVC (release): libcurl.lib libcurl_imp.lib
+ MSVC (debug): libcurld.lib libcurld_imp.lib
+ Borland: libcurl.lib libcurl_imp.lib
5.8 libcurl.so.X: open failed: No such file or directory
@@ -1175,24 +1300,23 @@ 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()
- B - gethostbyname_r() with 3 arguments
- C - gethostbyname_r() with 5 arguments
- D - gethostbyname_r() with 6 arguments
+ A - gethostbyname()
+ B - gethostbyname_r() with 3 arguments
+ 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 but it currently has no IPv6
- support.
+ 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.
@@ -1210,30 +1334,32 @@ FAQ
5.12 Can I make libcurl fake or hide my real IP address?
- No. libcurl operates on a higher level than so. Besides, faking IP address
- would imply sending IP packages with a made-up source address, and then you
- normally get a problem with intercepting the packages sent back as they
- would then not be routed to you!
+ No. libcurl operates on a higher level. Besides, faking IP address would
+ imply sending IP packet with a made-up source address, and then you normally
+ get a problem with receiving the packet sent back as they would then not be
+ routed to you!
If you use a proxy to access remote sites, the sites will not see your local
IP address but instead the address of the proxy.
Also note that on many networks NATs or other IP-munging techniques are used
that makes you see and use a different IP address locally than what the
- remote server will see you coming from.
+ remote server will see you coming from. You may also consider using
+ https://www.torproject.org/ .
5.13 How do I stop an ongoing transfer?
- There are several ways, but none of them are instant. There is no function
- you can call from another thread or similar that will stop it immediately.
- Instead you need to make sure that one of the callbacks you use return an
- appropriate value that will stop the transfer.
-
- Suitable callbacks that you can do this with include the progress callback,
- the read callback and the write callback.
+ With the easy interface you make sure to return the correct error code from
+ one of the callbacks, but none of them are instant. There is no function you
+ can call from another thread or similar that will stop it immediately.
+ Instead, you need to make sure that one of the callbacks you use returns an
+ appropriate value that will stop the transfer. Suitable callbacks that you
+ can do this with include the progress callback, the read callback and the
+ write callback.
- If you're using the multi interface, you also stop a transfer by removing
- the particular easy handle from the multi stack.
+ If you're using the multi interface, you can also stop a transfer by
+ removing the particular easy handle from the multi stack at any moment you
+ think the transfer is done or when you wish to abort the transfer.
5.14 Using C++ non-static functions for callbacks?
@@ -1243,14 +1369,14 @@ FAQ
member function that is passed a pointer to the class:
// f is the pointer to your object.
- static YourClass::staticFunction(void *buffer, size_t sz, size_t n, void *f)
+ static YourClass::func(void *buffer, size_t sz, size_t n, void *f)
{
// Call non-static member function.
static_cast<YourClass*>(f)->nonStaticFunction();
}
// This is how you pass pointer to the static function:
- curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:staticFunction);
+ curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:func);
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
5.15 How do I get an FTP directory listing?
@@ -1275,6 +1401,44 @@ FAQ
libcurl since 7.21.0 also provide the ability to specify a wildcard to
download multiple files from one FTP directory.
+ 5.16 I want a different time-out!
+
+ Time and time again users realize that CURLOPT_TIMEOUT and
+ CURLOPT_CONNECTIMEOUT are not sufficiently advanced or flexible to cover all
+ the various use cases and scenarios applications end up with.
+
+ libcurl offers many more ways to time-out operations. A common alternative
+ is to use the CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME options to
+ specify the lowest possible speed to accept before to consider the transfer
+ timed out.
+
+ The most flexible way is by writing your own time-out logic and using
+ CURLOPT_PROGRESSFUNCTION (perhaps in combination with other callbacks) and
+ use that to figure out exactly when the right condition is met when the
+ transfer should get stopped.
+
+ 5.17 Can I write a server with libcurl?
+
+ No. libcurl offers no functions or building blocks to build any kind of
+ internet protocol server. libcurl is only a client-side library. For server
+ libraries, you need to continue your search elsewhere but there exist many
+ good open source ones out there for most protocols you could possibly want a
+ server for. And there are really good stand-alone ones that have been tested
+ and proven for many years. There's no need for you to reinvent them!
+
+ 5.18 Does libcurl use threads?
+
+ Put simply: no, libcurl will execute in the same thread you call it in. All
+ callbacks will be called in the same thread as the one you call libcurl in.
+
+ If you want to avoid your thread to be blocked by the libcurl call, you make
+ sure you use the non-blocking API which will do transfers asynchronously -
+ but still in the same single thread.
+
+ libcurl will potentially internally use threads for name resolving, if it
+ was built to work like that, but in those cases it'll create the child
+ threads by itself and they will only be used and then killed internally by
+ libcurl and never exposed to the outside.
6. License Issues
@@ -1284,7 +1448,10 @@ FAQ
this section was much enhanced by Bjorn Reese.)
We are not lawyers and this is not legal advice. You should probably consult
- one if you want true and accurate legal insights without our prejudice.
+ one if you want true and accurate legal insights without our prejudice. Note
+ especially that this section concerns the libcurl license only; compiling in
+ features of libcurl that depend on other libraries (e.g. OpenSSL) may affect
+ the licensing obligations of your application.
6.1 I have a GPL program, can I use the libcurl library?
@@ -1342,12 +1509,16 @@ FAQ
You do not have to reveal or make public any changes to the libcurl source
code.
- You do not have to reveal or make public that you are using libcurl within
+ You do not have to broadcast to the world that you are using libcurl within
your app.
- As can be seen here: http://curl.haxx.se/docs/companies.html and
- elsewhere, more and more companies are discovering the power
- of libcurl and take advantage of it even in commercial environments.
+ All we ask is that you disclose "the copyright notice and this permission
+ notice" somewhere. Most probably like in the documentation or in the section
+ where other third party dependencies already are mentioned and acknowledged.
+
+ As can be seen here: http://curl.haxx.se/docs/companies.html and elsewhere,
+ more and more companies are discovering the power of libcurl and take
+ advantage of it even in commercial environments.
7. PHP/CURL Issues
@@ -1363,7 +1534,7 @@ FAQ
CURL (often using all caps) or sometimes ext/curl, but both cause much
confusion to users which in turn gives us a higher question load.
- 7.2 Who write PHP/CURL?
+ 7.2 Who wrote PHP/CURL?
PHP/CURL is a module that comes with the regular PHP package. It depends and
uses libcurl, so you need to have libcurl installed properly first before
diff --git a/docs/FEATURES b/docs/FEATURES
index 32589e1d..10fbdd57 100644
--- a/docs/FEATURES
+++ b/docs/FEATURES
@@ -13,27 +13,29 @@ curl tool
- multiple file upload on a single command line
- custom maximum transfer rate
- redirectable stderr
+ - metalink support (*13)
-libcurl supports
+libcurl
- full URL syntax with no length limit
- custom maximum download time
- custom least download speed acceptable
- custom output result after completion
- guesses protocol from host name unless specified
- uses .netrc
- - progress bar/time specs while downloading
+ - progress bar with time statistics while downloading
- "standard" proxy environment variables support
- compiles on win32 (reported builds on 40+ operating systems)
- selectable network interface for outgoing traffic
- IPv6 support on unix and Windows
- - persistant connections
- - socks5 support
- - supports user name + password in proxy environment variables
+ - persistent connections
+ - socks 4 + 5 support, with or without local name resolving
+ - supports user name and password in proxy environment variables
- operations through proxy "tunnel" (using CONNECT)
- - supports large files (>2GB and >4GB) both upload/download
- - replacable memory functions (malloc, free, realloc, etc)
+ - support for large files (>2GB and >4GB) during upload and download
+ - replaceable memory functions (malloc, free, realloc, etc)
- asynchronous name resolving (*6)
- both a push and a pull style interface
+ - international domain names (*11)
HTTP
- HTTP/1.1 compliant (optionally uses 1.0)
@@ -43,8 +45,8 @@ HTTP
- POST
- Pipelining
- multipart formpost (RFC1867-style)
- - authentication: Basic, Digest, NTLM(*9), GSS-Negotiate/Negotiate(*3) and
- SPNEGO (*4) to server and proxy
+ - authentication: Basic, Digest, NTLM (*9) and Negotiate (SPNEGO) (*3)
+ to server and proxy
- resume (both GET and PUT)
- follow redirects
- maximum amount of redirects to follow
@@ -53,14 +55,16 @@ HTTP
- reads/writes the netscape cookie file format
- custom headers (replace/remove internally generated headers)
- custom user-agent string
- - custom referer string
+ - custom referrer string
- range
- proxy authentication
- time conditions
- via http-proxy
- retrieve file modification date
- Content-Encoding support for deflate and gzip
- - "Transfer-Encoding: chunked" support for "uploads"
+ - "Transfer-Encoding: chunked" support in uploads
+ - data compression (*12)
+ - HTTP/2 (*5)
HTTPS (*1)
- (all the HTTP features)
@@ -68,12 +72,12 @@ HTTPS (*1)
- verify server certificate
- via http-proxy
- select desired encryption
- - force usage of a specific SSL version (SSLv2(*7), SSLv3 or TLSv1)
+ - force usage of a specific SSL version (SSLv2 (*7), SSLv3 (*10) or TLSv1)
FTP
- download
- authentication
- - kerberos4 (*5), kerberos5 (*3)
+ - Kerberos 5 (*14)
- active/passive using PORT, EPRT, PASV or EPSV
- single file size information (compare to HTTP HEAD)
- 'type=' URL support
@@ -93,7 +97,7 @@ FTP
FTPS (*1)
- implicit ftps:// support that use SSL on both connections
- - explicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp://
+ - explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain ftp://
connection to use SSL for both or one of the connections
SCP (*8)
@@ -104,7 +108,8 @@ SFTP (*8)
- with custom commands sent before/after the transfer
TFTP
- - download / upload
+ - download
+ - upload
TELNET
- connection negotiation
@@ -119,18 +124,83 @@ DICT
FILE
- URL support
- - "uploads"
+ - upload
- resume
+SMB
+ - SMBv1 over TCP and SSL
+ - download
+ - upload
+ - authentication with NTLMv1
+
+SMTP
+ - authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), Kerberos 5
+ (*4) and External.
+ - send e-mails
+ - mail from support
+ - mail size support
+ - mail auth support for trusted server-to-server relaying
+ - multiple recipients
+ - via http-proxy
+
+SMTPS (*1)
+ - implicit smtps:// support
+ - explicit "STARTTLS" usage to "upgrade" plain smtp:// connections to use SSL
+ - via http-proxy
+
+POP3
+ - authentication: Clear Text, APOP and SASL
+ - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
+ Kerberos 5 (*4) and External.
+ - list e-mails
+ - retrieve e-mails
+ - enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
+ custom requests
+ - via http-proxy
+
+POP3S (*1)
+ - implicit pop3s:// support
+ - explicit "STLS" usage to "upgrade" plain pop3:// connections to use SSL
+ - via http-proxy
+
+IMAP
+ - authentication: Clear Text and SASL
+ - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
+ Kerberos 5 (*4) and External.
+ - 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
+ - upload e-mails via the append command
+ - enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
+ STORE, COPY and UID via custom requests
+ - via http-proxy
+
+IMAPS (*1)
+ - implicit imaps:// support
+ - explicit "STARTTLS" usage to "upgrade" plain imap:// connections to use SSL
+ - via http-proxy
+
FOOTNOTES
=========
- *1 = requires OpenSSL, GnuTLS, NSS, yassl or PolarSSL
+ *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL, WinSSL (native
+ Windows), Secure Transport (native iOS/OS X) or GSKit (native IBM i)
*2 = requires OpenLDAP
- *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.
+ *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
*6 = requires c-ares
- *7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1
+ *7 = requires OpenSSL, NSS, GSKit, WinSSL or Secure Transport; GnuTLS, for
+ example, only supports SSLv3 and TLSv1
*8 = requires libssh2
- *9 = requires OpenSSL, GnuTLS, NSS or yassl
+ *9 = requires OpenSSL, GnuTLS, NSS, yassl, Secure Transport or SSPI (native
+ Windows)
+ *10 = requires any of the SSL libraries in (*1) above other than axTLS, which
+ does not support SSLv3
+ *11 = requires libidn or Windows
+ *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 e04fb53d..e76e5b94 100644
--- a/docs/HISTORY
+++ b/docs/HISTORY
@@ -4,22 +4,30 @@
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
- How cURL Became Like This
+How cURL Became Like This
+=========================
-
-In the second half of 1997, Daniel Stenberg came up with the idea to make
+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
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. After a few minor adjustments, it did
-just what he needed.
+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.
+
+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.
-Soon, he found currencies on a GOPHER site, so support for that had to go in,
-and not before long FTP download support was added as well. The name of the
-project was changed to urlget to better fit what it actually did now, since
-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,
@@ -33,33 +41,39 @@ was revealed to us much later.)
SSL support was added, powered by the SSLeay library.
-August 1998, first announcement of curl on freshmeat.net.
+August, first announcement of curl on freshmeat.net.
-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
+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
"copyleft".
-November 1998, configure script and reported successful compiles on several
+November, 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.
-January 1999, DICT support added.
+1999
+----
+
+January, DICT support added.
OpenSSL took over where SSLeay was abandoned.
-May 1999, first Debian package.
+May, first Debian package.
-August 1999, LDAP:// and FILE:// support added. The curl web site gets 1300
-visits weekly.
+August, 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 1999, added the project on Sourceforge and started using its
-services for managing the project.
+December 28, added the project on Sourceforge and started using its services
+for managing the project.
+
+2000
+----
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
@@ -67,19 +81,22 @@ 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 2000, the curl web site gets 4000 visits weekly.
+August, 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 2000, kerberos4 support was added.
+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.
-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.
+2001
+----
-January 2001, Daniel released curl 7.5.2 under a new license again: MIT (or
+January, 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
@@ -92,17 +109,20 @@ 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 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
+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
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 2001, libcurl 7.9 introduces cookie jar and curl_formadd(). During
-the forthcoming 7.9.x releases, we introduced the multi interface slowly and
+September, 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.
-June 2002, the curl web site gets 13000 visits weekly. curl and libcurl is
+2002
+----
+
+June, 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.
@@ -111,134 +131,152 @@ 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 2002, with the release of curl 7.10 it is released under the MIT
-license only.
+September, with the release of curl 7.10 it is released under the MIT license
+only.
+
+2003
+----
-January 2003. Started working on the distributed curl tests. The autobuilds.
+January. Started working on the distributed curl tests. The autobuilds.
-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.
+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.
Multiple new authentication schemes are supported: Digest (May), NTLM (June)
and Negotiate (June).
-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.
+November: curl 7.10.8 is released. 45000 lines of code. ~55000 unique visitors
+to the curl.haxx.se site. Five official web mirrors.
-December 2003, full-fledged SSL for FTP is supported.
+December, full-fledged SSL for FTP is supported.
-January 2004: curl 7.11.0 introduced large file support.
+2004
+----
-June 2004:
+January: curl 7.11.0 introduced large file support.
- curl 7.12.0 introduced IDN support. 10 official web mirrors.
+June: 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 2004:
- Curl and libcurl 7.12.1
+August: 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
-April 2005:
+2005
+----
- GnuTLS can now optionally be used for the secure layer when curl is built.
+April. GnuTLS can now optionally be used for the secure layer when curl is
+built.
-September 2005:
+September: TFTP support was added.
- TFTP support was added.
+More than 100,000 unique visitors of the curl web site. 25 mirrors.
- More than 100,000 unique visitors of the curl web site. 25 mirrors.
+December: security vulnerability: libcurl URL Buffer Overflow
-December 2005:
+2006
+----
- security vulnerability: libcurl URL Buffer Overflow
+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.
-January 2006:
+March: security vulnerability: libcurl TFTP Packet Buffer Overflow
- 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.
+April: Added the multi_socket() API
-March 2006:
+September: The major SONAME number for libcurl was bumped to 4 due to the
+removal of ftp third party transfer support.
- security vulnerability: libcurl TFTP Packet Buffer Overflow
+November: Added SCP and SFTP support
-April 2006:
+2007
+----
- Added the multi_socket() API
+February: Added support for the Mozilla NSS library to do the SSL/TLS stuff
-September 2006:
+July: security vulnerability: libcurl GnuTLS insufficient cert verification
- The major SONAME number for libcurl was bumped to 4 due to the removal of
- ftp third party transfer support.
+2008
+----
-November 2006:
+November:
- Added SCP and SFTP support
+ Command line options: 128
+ curl_easy_setopt() options: 158
+ Public functions in libcurl: 58
+ Known libcurl bindings: 37
+ Contributors: 683
-February 2007:
+ 145,000 unique visitors. >100 GB downloaded.
- Added support for the Mozilla NSS library to do the SSL/TLS stuff
+2009
+----
-July 2007:
+March: security vulnerability: libcurl Arbitrary File Access
- security vulnerability: libcurl GnuTLS insufficient cert verification
+August: security vulnerability: libcurl embedded zero in cert name
-November 2008:
+December: Added support for IMAP, POP3 and SMTP
- Command line options: 128
- curl_easy_setopt() options: 158
- Public functions in libcurl: 58
- Known libcurl bindings: 37
- Contributors: 683
+2010
+----
- 145,000 unique visitors. >100 GB downloaded.
+January: Added support for RTSP
-March 2009:
+February: security vulnerability: libcurl data callback excessive length
- security vulnerability: libcurl Arbitrary File Access
+March: The project switched over to use git (hosted by github) instead of CVS
+for source code control
-August 2009:
+May: Added support for RTMP
- security vulnerability: libcurl embedded zero in cert name
+Added support for PolarSSL to do the SSL/TLS stuff
-December 2009:
+August:
- Added support for IMAP, POP3 and SMTP
+ Public curl releases: 117
+ Command line options: 138
+ curl_easy_setopt() options: 180
+ Public functions in libcurl: 58
+ Known libcurl bindings: 39
+ Contributors: 808
-January 2010:
+ Gopher support added (re-added actually)
- Added support for RTSP
+2012
+----
-February 2010:
+ July: Added support for Schannel (native Windows TLS backend) and Darwin SSL
+ (Native Mac OS X and iOS TLS backend).
- security vulnerability: libcurl data callback excessive length
+ Supports metalink
-March 2010:
+ October: SSH-agent support.
- The project switched over to use git instead of CVS for source code control
+2013
+----
-May 2010:
+ February: Cleaned up internals to always uses the "multi" non-blocking
+ approach internally and only expose the blocking API with a wrapper.
- Added support for RTMP
+ September: First small steps on supporting HTTP/2 with nghttp2.
- Added support for PolarSSL to do the SSL/TLS stuff
+ October: Removed krb4 support.
-August 2010:
+ December: Happy eyeballs.
- Public curl releases: 117
- Command line options: 138
- curl_easy_setopt() options: 180
- Public functions in libcurl: 58
- Known libcurl bindings: 39
- Contributors: 808
+2014
+----
- Gopher support added (re-added actually)
+ March: first real release supporting HTTP/2
+
+ September: Web site had 245,000 unique visitors and served 236GB data
diff --git a/docs/HTTP-COOKIES b/docs/HTTP-COOKIES
new file mode 100644
index 00000000..b5abddfa
--- /dev/null
+++ b/docs/HTTP-COOKIES
@@ -0,0 +1,123 @@
+Updated: July 3, 2012 (http://curl.haxx.se/docs/http-cookies.html)
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+
+HTTP Cookies
+
+ 1. HTTP Cookies
+ 1.1 Cookie overview
+ 1.2 Cookies saved to disk
+ 1.3 Cookies with curl the command line tool
+ 1.4 Cookies with libcurl
+ 1.5 Cookies with javascript
+
+==============================================================================
+
+1. HTTP Cookies
+
+ 1.1 Cookie overview
+
+ HTTP cookies are pieces of 'name=contents' snippets that a server tells the
+ client to hold and then the client sends back those the server on subsequent
+ requests to the same domains/paths for which the cookies were set.
+
+ Cookies are either "session cookies" which typically are forgotten when the
+ session is over which is often translated to equal when browser quits, or
+ the cookies aren't session cookies they have expiration dates after which
+ the client will throw them away.
+
+ Cookies are set to the client with the Set-Cookie: header and are sent to
+ servers with the Cookie: header.
+
+ For a very long time, the only spec explaining how to use cookies was the
+ original Netscape spec from 1994: http://curl.haxx.se/rfc/cookie_spec.html
+
+ In 2011, RFC6265 (https://www.ietf.org/rfc/rfc6265.txt) was finally published
+ and details how cookies work within HTTP.
+
+ 1.2 Cookies saved to disk
+
+ Netscape once created a file format for storing cookies on disk so that they
+ would survive browser restarts. curl adopted that file format to allow
+ sharing the cookies with browsers, only to see browsers move away from that
+ format. Modern browsers no longer use it, while curl still does.
+
+ The netscape cookie file format stores one cookie per physical line in the
+ file with a bunch of associated meta data, each field separated with
+ TAB. That file is called the cookiejar in curl terminology.
+
+ When libcurl saves a cookiejar, it creates a file header of its own in which
+ there is a URL mention that will link to the web version of this document.
+
+ 1.3 Cookies with curl the command line tool
+
+ curl has a full cookie "engine" built in. If you just activate it, you can
+ have curl receive and send cookies exactly as mandated in the specs.
+
+ Command line options:
+
+ -b, --cookie
+
+ tell curl a file to read cookies from and start the cookie engine, or if
+ it isn't a file it will pass on the given string. -b name=var works and so
+ does -b cookiefile.
+
+ -j, --junk-session-cookies
+
+ when used in combination with -b, it will skip all "session cookies" on
+ load so as to appear to start a new cookie session.
+
+ -c, --cookie-jar
+
+ tell curl to start the cookie engine and write cookies to the given file
+ after the request(s)
+
+ 1.4 Cookies with libcurl
+
+ libcurl offers several ways to enable and interface the cookie engine. These
+ options are the ones provided by the native API. libcurl bindings may offer
+ access to them using other means.
+
+ CURLOPT_COOKIE
+
+ Is used when you want to specify the exact contents of a cookie header to
+ send to the server.
+
+ CURLOPT_COOKIEFILE
+
+ Tell libcurl to activate the cookie engine, and to read the initial set of
+ cookies from the given file. Read-only.
+
+ CURLOPT_COOKIEJAR
+
+ Tell libcurl to activate the cookie engine, and when the easy handle is
+ closed save all known cookies to the given cookiejar file. Write-only.
+
+ CURLOPT_COOKIELIST
+
+ Provide detailed information about a single cookie to add to the internal
+ storage of cookies. Pass in the cookie as a HTTP header with all the
+ details set, or pass in a line from a netscape cookie file. This option
+ can also be used to flush the cookies etc.
+
+ CURLINFO_COOKIELIST
+
+ Extract cookie information from the internal cookie storage as a linked
+ list.
+
+ 1.5 Cookies with javascript
+
+ These days a lot of the web is built up by javascript. The webbrowser loads
+ complete programs that render the page you see. These javascript programs
+ can also set and access cookies.
+
+ Since curl and libcurl are plain HTTP clients without any knowledge of or
+ capability to handle javascript, such cookies will not be detected or used.
+
+ Often, if you want to mimic what a browser does on such web sites, you can
+ record web browser HTTP traffic when using such a site and then repeat the
+ cookie operations using curl or libcurl.
diff --git a/docs/HTTP2.md b/docs/HTTP2.md
new file mode 100644
index 00000000..b4e2983b
--- /dev/null
+++ b/docs/HTTP2.md
@@ -0,0 +1,107 @@
+HTTP/2 with curl
+================
+
+[HTTP/2 Spec](https://www.rfc-editor.org/rfc/rfc7540.txt)
+[http2 explained](http://daniel.haxx.se/http2/)
+
+Build prerequisites
+-------------------
+ - nghttp2
+ - OpenSSL, NSS, GnutTLS or PolarSSL with a new enough version
+
+[nghttp2](https://nghttp2.org/)
+-------------------------------
+
+libcurl uses this 3rd party library for the low level protocol handling
+parts. The reason for this is that HTTP/2 is much more complex at that layer
+than HTTP/1.1 (which we implement on our own) and that nghttp2 is an already
+existing and well functional library.
+
+We require at least version 1.0.0.
+
+Over an http:// URL
+-------------------
+
+If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will
+include an upgrade header in the initial request to the host to allow
+upgrading to HTTP/2.
+
+Possibly we can later introduce an option that will cause libcurl to fail if
+not possible to upgrade. Possibly we introduce an option that makes libcurl
+use HTTP/2 at once over http://
+
+Over an https:// URL
+--------------------
+
+If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will use
+ALPN (or NPN) to negotiate which protocol to continue with. Possibly introduce
+an option that will cause libcurl to fail if not possible to use HTTP/2.
+Consider options to explicitly disable ALPN and/or NPN.
+
+ALPN is the TLS extension that HTTP/2 is expected to use. The NPN extension is
+for a similar purpose, was made prior to ALPN and is used for SPDY so early
+HTTP/2 servers are implemented using NPN before ALPN support is widespread.
+
+SSL libs
+--------
+
+The challenge is the ALPN and NPN support and all our different SSL
+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
+
+Multiplexing
+------------
+
+Starting in 7.43.0, libcurl fully supports HTTP/2 multiplexing, which is the
+term for doing multiple independent transfers over the same physical TCP
+connection.
+
+To take advantage of multiplexing, you need to use the multi interface and set
+`CURLMOPT_PIPELINING` to `CURLPIPE_MULTIPLEX`. With that bit set, libcurl will
+attempt to re-use existing HTTP/2 connections and just add a new stream over
+that when doing subsequent parallel requests.
+
+While libcurl sets up a connection to a HTTP server there is a period during
+which it doesn't know if it can pipeline or do multiplexing and if you add new
+transfers in that period, libcurl will default to start new connections for
+those transfers. With the new option `CURLOPT_PIPEWAIT` (added in 7.43.0), you
+can ask that a transfer should rather wait and see in case there's a
+connection for the same host in progress that might end up being possible to
+multiplex on. It favours keeping the number of connections low to the cost of
+slightly longer time to first byte transferred.
+
+Applications
+------------
+
+We hide HTTP/2's binary nature and convert received HTTP/2 traffic to headers
+in HTTP 1.1 style. This allows applications to work unmodified.
+
+curl tool
+---------
+
+curl offers the `--http2` command line option to enable use of HTTP/2
+
+HTTP Alternative Services
+-------------------------
+
+Alt-Svc is a suggested extension with a corresponding frame (ALTSVC) in HTTP/2
+that tells the client about an alternative "route" to the same content for the
+same origin server that you get the response from. A browser or long-living
+client can use that hint to create a new connection asynchronously. For
+libcurl, we may introduce a way to bring such clues to the applicaton and/or
+let a subsequent request use the alternate route
+automatically. [Spec](https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-05)
+
+TODO
+----
+
+ - Provide API to set priorities / dependencies of individual streams
+
+ - Implement "prior-knowledge" HTTP/2 connecitons over clear text so that
+ curl can connect with HTTP/2 at once without 1.1+Upgrade.
+
diff --git a/docs/INSTALL b/docs/INSTALL
index 9a5844fc..45703188 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -14,9 +14,16 @@ Installing Binary Packages
binary package. This document describes how to compile, build and install
curl and libcurl from source code.
-UNIX
+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
====
- 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
@@ -109,18 +116,6 @@ UNIX
./configure --disable-thread
- To build curl with kerberos4 support enabled, curl requires the krb4 libs
- and headers installed. You can then use a set of options to tell
- configure where those are:
-
- --with-krb4-includes[=DIR] Specify location of kerberos4 headers
- --with-krb4-libs[=DIR] Specify location of kerberos4 libs
- --with-krb4[=DIR] where to look for Kerberos4
-
- In most cases, /usr/athena is the install prefix and then it works with
-
- ./configure --with-krb4=/usr/athena
-
If you're a curl developer and use gcc, you might want to enable more
debug options with the --enable-debug option.
@@ -129,27 +124,31 @@ UNIX
default. But if you want to alter it, you can select how to deal with
each individual library.
- To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that
- you need to use both --without-ssl and --with-gnutls.
+ To build with GnuTLS for SSL/TLS, use both --without-ssl and
+ --with-gnutls.
+
+ To build with Cyassl for SSL/TLS, use both --without-ssl and
+ --with-cyassl.
- To build with yassl support instead of OpenSSL or GnuTLS, you must build
- yassl with its OpenSSL emulation enabled and point to that directory root
- with configure --with-ssl.
+ To build with NSS for SSL/TLS, use both --without-ssl and --with-nss.
- To build with NSS support instead of OpenSSL for SSL/TLS, note that
- you need to use both --without-ssl and --with-nss.
+ To build with PolarSSL for SSL/TLS, use both --without-ssl and
+ --with-polarssl.
- To build with PolarSSL support instead of OpenSSL for SSL/TLS, note that
- you need to use both --without-ssl and --with-polarssl.
+ To build with axTLS for SSL/TLS, use both --without-ssl and --with-axtls.
- To get GSSAPI support, build with --with-gssapi and have the MIT or
- Heimdal Kerberos 5 packages installed.
+ To build with GSS-API support, use --with-gssapi and have the MIT Kerberos
+ or Heimdal packages installed.
To get support for SCP and SFTP, build with --with-libssh2 and have
libssh2 0.16 or later installed.
+ To get Metalink support, build with --with-libmetalink and have the
+ libmetalink packages installed.
+
SPECIAL CASES
-------------
+
Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1
to get correct large file support.
@@ -158,7 +157,6 @@ UNIX
./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \
RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra
-
Win32
=====
@@ -175,19 +173,21 @@ Win32
advice given above.
KB94248 - How To Use the C Run-Time
- http://support.microsoft.com/kb/94248/en-us
+ https://support.microsoft.com/kb/94248/en-us
KB140584 - How to link with the correct C Run-Time (CRT) library
- http://support.microsoft.com/kb/140584/en-us
+ https://support.microsoft.com/kb/140584/en-us
KB190799 - Potential Errors Passing CRT Objects Across DLL Boundaries
- http://msdn.microsoft.com/en-us/library/ms235460
+ https://msdn.microsoft.com/en-us/library/ms235460
If your app is misbehaving in some strange way, or it is suffering
from memory corruption, before asking for further help, please try
first to rebuild every single library your app uses as well as your
app using the debug multithreaded dynamic C runtime.
+ If you get linkage errors read section 5.7 of the FAQ document.
+
MingW32
-------
@@ -208,9 +208,9 @@ Win32
adjust as necessary. It is also possible to override these paths with
environment variables, for example:
- set ZLIB_PATH=c:\zlib-1.2.3
- set OPENSSL_PATH=c:\openssl-0.9.8k
- set LIBSSH2_PATH=c:\libssh2-1.1
+ set ZLIB_PATH=c:\zlib-1.2.8
+ set OPENSSL_PATH=c:\openssl-1.0.2c
+ set LIBSSH2_PATH=c:\libssh2-1.6.0
ATTENTION: if you want to build with libssh2 support you have to use latest
version 0.17 - previous versions will NOT work with 7.17.0 and later!
@@ -229,11 +229,10 @@ Win32
If you want to enable LDAPS support then set LDAPS=1.
- - optional MingW32-built OpenlDAP SDK available from:
+ - optional MingW32-built OpenLDAP SDK available from:
http://www.gknw.net/mirror/openldap/
- optional recent Novell CLDAP SDK available from:
- http://developer.novell.com/ndk/cldap.htm
-
+ https://www.novell.com/developer/ndk/ldap_libraries_for_c.html
Cygwin
------
@@ -252,8 +251,10 @@ Win32
MSVC 6 caveats
--------------
- If you use MSVC 6 it is required that you use the February 2003 edition PSDK:
- http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
+ If you use MSVC 6 it is required that you use the February 2003 edition of
+ the 'Platform SDK' which can be downloaded from:
+
+ https://www.microsoft.com/en-us/download/details.aspx?id=12261
Building any software with MSVC 6 without having PSDK installed is just
asking for trouble down the road once you have released it, you might notice
@@ -261,10 +262,8 @@ Win32
choice of static vs dynamic runtime and third party libraries. Anyone using
software built in such way will at some point regret having done so.
- When someone uses MSVC 6 without PSDK he is using a compiler back from 1998.
-
If the compiler has been updated with the installation of a service pack as
- those mentioned in http://support.microsoft.com/kb/194022 the compiler can be
+ those mentioned in https://support.microsoft.com/kb/194022 the compiler can be
safely used to read source code, translate and make it object code.
But, even with the service packs mentioned above installed, the resulting
@@ -272,13 +271,6 @@ Win32
header files and libraries with bugs and security issues which have already
been addressed and fixed long time ago.
- In order to make use of the updated system headers and fixed libraries
- for MSVC 6, it is required that 'Platform SDK', PSDK from now onwards,
- is installed. The specific PSDK that must be installed for MSVC 6 is the
- February 2003 edition, which is the latest one supporting the MSVC 6 compiler,
- this PSDK is also known as 'Windows Server 2003 PSDK' and can be downloaded
- from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
-
So, building curl and libcurl with MSVC 6 without PSDK is absolutely
discouraged for the benefit of anyone using software built in such
environment. And it will not be supported in any way, as we could just
@@ -307,11 +299,11 @@ Win32
Then run 'nmake vc' in curl's root directory.
If you want to compile with zlib support, you will need to build
- zlib (http://www.gzip.org/zlib/) as well. Please read the zlib
+ zlib (http://www.zlib.net/) as well. Please read the zlib
documentation on how to compile zlib. Define the ZLIB_PATH environment
variable to the location of zlib.h and zlib.lib, for example:
- set ZLIB_PATH=c:\zlib-1.2.3
+ set ZLIB_PATH=c:\zlib-1.2.8
Then run 'nmake vc-zlib' in curl's root directory.
@@ -325,7 +317,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.8k
+ set OPENSSL_PATH=c:\openssl-0.9.8zc
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
@@ -340,64 +332,61 @@ Win32
at runtime.
Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support.
- MSVC 6 IDE
- ----------
+ MSVC IDE
+ --------
- A minimal VC++ 6.0 reference workspace (vc6curl.dsw) is available with the
- source distribution archive to allow proper building of the two included
- projects, the libcurl library and the curl tool.
+ A fairly comprehensive set of Visual Studio project files are available for
+ v6.0 through v12.0 and are located in the projects folder to allow proper
+ building of both the libcurl library as well as the curl tool.
- 1) Open the vc6curl.dsw workspace with MSVC6's IDE.
- 2) Select 'Build' from top menu.
- 3) Select 'Batch Build' from dropdown menu.
- 4) Make sure that the eight project configurations are 'checked'.
- 5) Click on the 'Build' button.
- 6) Once the eight project configurations are built you are done.
+ For more information about these projects and building via Visual Studio
+ please see the README file located in the projects folder.
- Dynamic and static libcurl libraries are built in debug and release flavours,
- and can be located each one in its own subdirectory, DLL-Debug, DLL-Release,
- LIB-Debug and LIB-Release, all of them below the 'lib' subdirectory.
+ Borland C++ compiler
+ --------------------
- In the same way four curl executables are created, each using its respective
- library. The resulting curl executables are located in its own subdirectory,
- DLL-Debug, DLL-Release, LIB-Debug and LIB-Release, below the 'src' subdir.
+ Ensure that your build environment is properly set up to use the compiler
+ and associated tools. PATH environment variable must include the path to
+ bin subdirectory of your compiler installation, eg: c:\Borland\BCC55\bin
- These reference VC++ 6.0 configurations are generated using the dynamic CRT.
+ It is advisable to set environment variable BCCDIR to the base path of
+ the compiler installation.
- Intentionally, these reference VC++ 6.0 projects and configurations don't use
- third party libraries, such as OpenSSL or Zlib, to allow proper compilation
- and configuration for all new users without further requirements.
+ set BCCDIR=c:\Borland\BCC55
- If you need something more 'involved' you might adjust them for your own use,
- or explore the world of makefiles described above 'MSVC from command line'.
+ In order to build a plain vanilla version of curl and libcurl run the
+ following command from curl's root directory:
- Borland C++ compiler
- ---------------------
+ make borland
- compile openssl
+ To build curl and libcurl with zlib and OpenSSL support set environment
+ variables ZLIB_PATH and OPENSSL_PATH to the base subdirectories of the
+ already built zlib and OpenSSL libraries and from curl's root directory
+ run command:
- Make sure you include the paths to curl/include and openssl/inc32 in
- your bcc32.cnf file
+ make borland-ssl-zlib
- eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32"
+ libcurl library will be built in 'lib' subdirectory while curl tool
+ is built in 'src' subdirectory. In order to use libcurl library it is
+ advisable to modify compiler's configuration file bcc32.cfg located
+ in c:\Borland\BCC55\bin to reflect the location of libraries include
+ paths for example the '-I' line could result in something like:
- Check to make sure that all of the sources listed in lib/Makefile.b32
- are present in the /path_to_curl/lib directory. (Check the src
- directory for missing ones.)
+ -I"c:\Borland\BCC55\include;c:\curl\include;c:\openssl\inc32"
- Make sure the environment variable "BCCDIR" is set to the install
- location for the compiler eg : c:\Borland\BCC55
+ bcc3.cfg '-L' line could also be modified to reflect the location of
+ of libcurl library resulting for example:
- command line:
- make -f /path_to_curl/lib/Makefile-ssl.b32
+ -L"c:\Borland\BCC55\lib;c:\curl\lib;c:\openssl\out32"
- compile simplessl.c with appropriate links
+ In order to build sample program 'simple.c' from the docs\examples
+ subdirectory run following command from mentioned subdirectory:
- c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib
- -L c:\borland\bcc55\lib\psdk\ws2_32.lib
- -L c:\openssl\out32\libeay32.lib
- -L c:\openssl\out32\ssleay32.lib
- simplessl.c
+ bcc32 simple.c libcurl.lib cw32mt.lib
+
+ In order to build sample program simplessl.c an SSL enabled libcurl
+ is required, as well as the OpenSSL libeay32.lib and ssleay32.lib
+ libraries.
OTHER MSVC IDEs
---------------
@@ -409,7 +398,6 @@ Win32
Make the sources in the src/ drawer be a "win32 console application"
project. Name it curl.
-
Disabling Specific Protocols in Win32 builds
--------------------------------------------
@@ -428,16 +416,53 @@ 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
- possibilities:
+ If you want to set any of these defines you have the following options:
- Modify lib/config-win32.h
- - Modify lib/setup.h
+ - Modify lib/curl_setup.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.
+
+ Using BSD-style lwIP instead of Winsock TCP/IP stack in Win32 builds
+ --------------------------------------------------------------------
+
+ In order to compile libcurl and curl using BSD-style lwIP TCP/IP stack
+ it is necessary to make definition of preprocessor symbol USE_LWIPSOCK
+ visible to libcurl and curl compilation processes. To set this definition
+ you have the following alternatives:
+
+ - Modify lib/config-win32.h and src/config-win32.h
- Modify lib/Makefile.vc6
- - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
- in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
+ - 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.
+
+ 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
+ includes lwIP header file <lwip/opt.h> (or another lwIP header that includes
+ this) before including any libcurl header. Your program does not need the
+ USE_LWIPSOCK preprocessor definition which is for libcurl internals only.
+
+ Compilation has been verified with lwIP 1.4.0 and contrib-1.4.0 from:
+ http://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip
+ http://download.savannah.gnu.org/releases/lwip/contrib-1.4.0.zip
+
+ This BSD-style lwIP TCP/IP stack support must be considered experimental
+ given that it has been verified that lwIP 1.4.0 still needs some polish,
+ and libcurl might yet need some additional adjustment, caveat emptor.
Important static libcurl usage note
-----------------------------------
@@ -446,9 +471,41 @@ 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
+ is not necessary to use the option --without-ssl.) This feature requires iOS
+ 5.0 or later, or OS X 10.5 ("Leopard") or later.
+
+ When Secure Transport is in use, the curl options --cacert and --capath and
+ their libcurl equivalents, will be ignored, because Secure Transport uses
+ the certificates stored in the Keychain to evaluate whether or not to trust
+ the server. This, of course, includes the root certificates that ship with
+ the OS. The --cert and --engine options, and their libcurl equivalents, are
+ currently unimplemented in curl with Secure Transport.
+
+ For OS X users: In OS X 10.8 ("Mountain Lion"), Apple made a major
+ overhaul to the Secure Transport API that, among other things, added
+ support for the newer TLS 1.1 and 1.2 protocols. To get curl to support
+ TLS 1.1 and 1.2, you must build curl on Mountain Lion or later, or by
+ using the equivalent SDK. If you set the MACOSX_DEPLOYMENT_TARGET
+ environmental variable to an earlier version of OS X prior to building curl,
+ then curl will use the new Secure Transport API on Mountain Lion and later,
+ and fall back on the older API when the same curl binary is executed on
+ older cats. For example, running these commands in curl's directory in the
+ shell will build the code such that it will run on cats as old as OS X 10.6
+ ("Snow Leopard") (using bash):
+
+ export MACOSX_DEPLOYMENT_TARGET="10.6"
+ ./configure --with-darwinssl
+ make
IBM OS/2
========
+
Building under OS/2 is not much different from building under unix.
You need:
@@ -476,15 +533,15 @@ 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
perl http/ftp testing server supplied as testing too cannot work on VMS
because vms has no concept of fork(). [ I tried to give it a whack, but
- thats of no use.
+ that's of no use.
SSL stuff has not been ported.
@@ -523,6 +580,7 @@ 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
@@ -544,12 +602,13 @@ 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
@@ -560,11 +619,12 @@ 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'
+ # 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 \
@@ -574,9 +634,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' ...
@@ -596,20 +656,19 @@ 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:
http://www.gknw.net/development/prgtools/
- - recent Novell LibC SDK available from:
- http://developer.novell.com/ndk/libc.htm
- - or recent Novell CLib SDK available from:
- http://developer.novell.com/ndk/clib.htm
+ - recent Novell LibC or Novell CLib SDK available from:
+ https://www.novell.com/developer/ndk/
- optional recent Novell CLDAP SDK available from:
- http://developer.novell.com/ndk/cldap.htm
+ https://www.novell.com/developer/ndk/ldap_libraries_for_c.html
- optional zlib sources (static or dynamic linking with zlib.imp);
sources with NetWare Makefile can be obtained from:
http://www.gknw.net/mirror/zlib/
@@ -617,7 +676,7 @@ NetWare
you can find precompiled packages at:
http://www.gknw.net/development/ossl/netware/
for CLIB-based builds OpenSSL 0.9.8h or later is required - earlier versions
- dont support buildunf with CLIB BSD sockets.
+ don't support building with CLIB BSD sockets.
- optional SSH2 sources (version 0.17 or later);
Set a search path to your compiler, linker and tools; on Linux make
@@ -638,11 +697,11 @@ NetWare
Builds automatically created 8 times a day from current git are here:
http://www.gknw.net/mirror/curl/autobuilds/
the status of these builds can be viewed at the autobuild table:
- http://curl.haxx.se/auto/
-
+ 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:
@@ -710,9 +769,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.
@@ -742,9 +801,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:
@@ -755,16 +814,16 @@ 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.
To build libcurl for VxWorks you need:
- - CYGWIN (free, http://cygwin.com/)
+ - CYGWIN (free, https://cygwin.com/)
- Wind River Workbench (commercial)
If you have CYGWIN and Workbench installed on you machine
@@ -781,14 +840,54 @@ 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
=======
- See the build notes in the Android.mk file.
+ 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
+ which creates a usual cross-compile toolchain. Lets assume that you put
+ this toolchain below /opt then invoke configure with something like:
+ export PATH=/opt/arm-linux-androideabi-4.4.3/bin:$PATH
+ ./configure --host=arm-linux-androideabi [more configure options]
+ make
+ - if you want to compile directly from our GIT repo you might run into
+ this issue with older automake stuff:
+ checking host system type...
+ Invalid configuration `arm-linux-androideabi':
+ system `androideabi' not recognized
+ configure: error: /bin/sh ./config.sub arm-linux-androideabi failed
+ this issue can be fixed with using more recent versions of config.sub
+ and config.guess which can be obtained here:
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree
+ you need to replace your system-own versions which usually can be
+ found in your automake folder:
+ find /usr -name config.sub
+
+ 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:
+
+ #!/bin/sh
+ SYSROOT=$(dirname ${0%/*})/sysroot
+ export PKG_CONFIG_DIR=
+ export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/local/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig
+ export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}
+ exec pkg-config "$@"
+
+ 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)
@@ -834,9 +933,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
@@ -865,14 +964,17 @@ REDUCING SIZE
--disable-verbose (eliminates debugging strings and error code strings)
--enable-hidden-symbols (eliminates unneeded symbols in the shared library)
--without-libidn (disables support for the libidn DNS library)
+ --without-librtmp (disables support for RTMP)
--without-ssl (disables support for SSL/TLS)
--without-zlib (disables support for on-the-fly decompression)
The GNU compiler and linker have a number of options that can reduce the
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:
- CFLAGS="-ffunction-sections -fdata-sections" \
+ 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"
Be sure also to strip debugging symbols from your binaries after
@@ -882,9 +984,9 @@ REDUCING SIZE
.comment section).
Using these techniques it is possible to create a basic HTTP-only shared
- libcurl library for i386 Linux platforms that is only 98 KiB in size, and
- an FTP-only library that is 94 KiB in size (as of libcurl version 7.20.0,
- using gcc 4.3.3).
+ libcurl library for i386 Linux platforms that is only 114 KiB in size, and
+ an FTP-only library that is 115 KiB in size (as of libcurl version 7.35.0,
+ using gcc 4.8.2).
You may find that statically linking libcurl to your application will
result in a lower total size than dynamically linking.
@@ -896,13 +998,12 @@ REDUCING SIZE
command line. Following is a list of appropriate key words:
--disable-cookies !cookies
- --disable-crypto-auth !HTTP\ Digest\ auth !HTTP\ proxy\ Digest\ auth
--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!
@@ -916,9 +1017,9 @@ PORTS
- Alpha OpenVMS V7.1-1H2
- Alpha Tru64 v5.0 5.1
- AVR32 Linux
- - ARM Android 1.5, 2.1
+ - ARM Android 1.5, 2.1, 2.3, 3.2, 4.x
- ARM INTEGRITY
- - ARM iPhone OS
+ - ARM iOS
- Cell Linux
- Cell Cell OS
- HP-PA HP-UX 9.X 10.X 11.X
@@ -956,6 +1057,7 @@ PORTS
- i386 HURD
- i386 Haiku OS
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
+ - i386 Mac OS X
- i386 MINIX 3.1
- i386 NetBSD
- i386 Novell NetWare
@@ -980,17 +1082,22 @@ PORTS
Useful URLs
===========
-c-ares http://daniel.haxx.se/projects/c-ares/license.html
-GNU GSS http://www.gnu.org/software/gss/
-GnuTLS http://www.gnu.org/software/gnutls/
-Heimdal http://www.pdc.kth.se/heimdal/
-libidn http://www.gnu.org/software/libidn/
-libssh2 http://www.libssh2.org
-MingW http://www.mingw.org
+axTLS http://axtls.sourceforge.net/
+c-ares http://c-ares.haxx.se/
+GNU GSS https://www.gnu.org/software/gss/
+GnuTLS https://www.gnu.org/software/gnutls/
+Heimdal http://www.h5l.org/
+libidn https://www.gnu.org/software/libidn/
+libmetalink https://launchpad.net/libmetalink/
+libssh2 http://www.libssh2.org/
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
-NSS http://www.mozilla.org/projects/security/pki/nss/
-OpenLDAP http://www.openldap.org
-OpenSSL http://www.openssl.org
-PolarSSL http://polarssl.org
-yassl http://www.yassl.com/
-Zlib http://www.gzip.org/zlib/
+NSS https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
+OpenLDAP http://www.openldap.org/
+OpenSSL https://www.openssl.org/
+PolarSSL https://tls.mbed.org/
+wolfSSL https://www.wolfssl.com/wolfSSL/
+Zlib http://www.zlib.net/
+
+MingW http://www.mingw.org/
+MinGW-w64 http://mingw-w64.sourceforge.net/
+OpenWatcom http://www.openwatcom.org/
diff --git a/docs/INSTALL.cmake b/docs/INSTALL.cmake
new file mode 100644
index 00000000..b2924e64
--- /dev/null
+++ b/docs/INSTALL.cmake
@@ -0,0 +1,100 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+ How To Compile with CMake
+
+Building with CMake
+==========================
+ This document describes how to compile, build and install curl and libcurl
+ from source code using the CMake build tool. To build with CMake, you will
+ of course have to first install CMake. The minimum required version of
+ CMake is specified in the file CMakeLists.txt found in the top of the curl
+ source tree. Once the correct version of CMake is installed you can follow
+ the instructions below for the platform you are building on.
+
+ CMake builds can be configured either from the command line, or from one
+ of CMake's GUI's.
+
+Current flaws in the curl CMake build
+=====================================
+
+ Missing features in the cmake build:
+
+ - Builds libcurl without large file support
+ - 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)
+ - No RTMP support built
+ - Doesn't allow build curl and libcurl debug enabled
+ - Doesn't allow a custom CA bundle path
+ - Doesn't allow you to disable specific protocols from the build
+ - Doesn't find or use krb4 or GSS
+ - Rebuilds test files too eagerly, but still can't run the tests
+
+
+Important notice
+==================
+ If you got your curl sources from a distribution tarball, make sure to
+ delete the generic 'include/curl/curlbuild.h' file that comes with it:
+ rm -f curl/include/curl/curlbuild.h
+
+ The purpose of this file is to provide reasonable definitions for systems
+ where autoconfiguration is not available. CMake will create its own
+ version of this file in its build directory. If the "generic" version
+ is not deleted, weird build errors may occur on some systems.
+
+Command Line CMake
+==================
+ A CMake build of curl is similar to the autotools build of curl. It
+ consists of the following steps after you have unpacked the source.
+
+ 1. Create an out of source build tree parallel to the curl source
+ tree and change into that directory
+
+ $ mkdir curl-build
+ $ cd curl-build
+
+ 2. Run CMake from the build tree, giving it the path to the top of
+ the curl source tree. CMake will pick a compiler for you. If you
+ want to specify the compile, you can set the CC environment
+ variable prior to running CMake.
+
+ $ cmake ../curl
+ $ make
+
+ 3. Install to default location:
+
+ $ make install
+
+ (The test suite does not work with the cmake build)
+
+ccmake
+=========
+ CMake comes with a curses based interface called ccmake. To run ccmake on
+ a curl use the instructions for the command line cmake, but substitute
+ ccmake ../curl for cmake ../curl. This will bring up a curses interface
+ with instructions on the bottom of the screen. You can press the "c" key
+ to configure the project, and the "g" key to generate the project. After
+ the project is generated, you can run make.
+
+cmake-gui
+=========
+ CMake also comes with a Qt based GUI called cmake-gui. To configure with
+ cmake-gui, you run cmake-gui and follow these steps:
+ 1. Fill in the "Where is the source code" combo box with the path to
+ the curl source tree.
+ 2. Fill in the "Where to build the binaries" combo box with the path
+ to the directory for your build tree, ideally this should not be the
+ same as the source tree, but a parallel directory called curl-build or
+ something similar.
+ 3. Once the source and binary directories are specified, press the
+ "Configure" button.
+ 4. Select the native build tool that you want to use.
+ 5. At this point you can change any of the options presented in the
+ GUI. Once you have selected all the options you want, click the
+ "Generate" button.
+ 6. Run the native build tool that you used CMake to generate.
+
diff --git a/docs/INSTALL.devcpp b/docs/INSTALL.devcpp
index 7f58e4b0..ee2d7036 100644
--- a/docs/INSTALL.devcpp
+++ b/docs/INSTALL.devcpp
@@ -26,7 +26,7 @@ exists for a Unix/linux command line environments. This is of little help when
it comes to Windows O/S.
Secondly the help that does exist for the Windows O/S focused around mingw
-thru a command line argument environment.
+through a command line argument environment.
You may ask "Why is this a problem?"
@@ -95,7 +95,7 @@ install instructions may produce erratic behaviour in DevCpp. For further info
check the following sites
http://aditsu.freeunixhost.com/dev-cpp-faq.html
-http://sourceforge.net/forum/message.php?msg_id=3252213
+https://sourceforge.net/p/dev-cpp/discussion/48211/thread/2a85ea46
As I have mentioned before I will confine this to the SSL Library compilations
but the process is very similar for compilation of the executable - curl.exe;
diff --git a/docs/INTERNALS b/docs/INTERNALS
index 9d0bdbaa..4cd63b4e 100644
--- a/docs/INTERNALS
+++ b/docs/INTERNALS
@@ -1,27 +1,68 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
-INTERNALS
+Table of Contents
+=================
- The project is split in two. The library and the client. The client part uses
- the library, but the library is designed to allow other applications to use
- it.
+ - [Intro](#intro)
+ - [git](#git)
+ - [Portability](#Portability)
+ - [Windows vs Unix](#winvsunix)
+ - [Library](#Library)
+ - [`Curl_connect`](#Curl_connect)
+ - [`Curl_do`](#Curl_do)
+ - [`Curl_readwrite`](#Curl_readwrite)
+ - [`Curl_done`](#Curl_done)
+ - [`Curl_disconnect`](#Curl_disconnect)
+ - [HTTP(S)](#http)
+ - [FTP](#ftp)
+ - [Kerberos](#kerberos)
+ - [TELNET](#telnet)
+ - [FILE](#file)
+ - [SMB](#smb)
+ - [LDAP](#ldap)
+ - [E-mail](#email)
+ - [General](#general)
+ - [Persistent Connections](#persistent)
+ - [multi interface/non-blocking](#multi)
+ - [SSL libraries](#ssl)
+ - [Library Symbols](#symbols)
+ - [Return Codes and Informationals](#returncodes)
+ - [AP/ABI](#abi)
+ - [Client](#client)
+ - [Memory Debugging](#memorydebug)
+ - [Test Suite](#test)
+ - [Asynchronous name resolves](#asyncdns)
+ - [c-ares](#cares)
+ - [`curl_off_t`](#curl_off_t)
+ - [curlx](#curlx)
+ - [Content Encoding](#contentencoding)
+ - [hostip.c explained](#hostip)
+ - [Track Down Memory Leaks](#memoryleak)
+ - [`multi_socket`](#multi_socket)
+ - [Structs in libcurl](#structs)
+
+<a name="intro"></a>
+curl internals
+==============
+
+ This project is split in two. The library and the client. The client part
+ uses the library, but the library is designed to allow other applications to
+ use it.
The largest amount of code and complexity is in the library part.
-GIT
+
+<a name="git"></a>
+git
===
+
All changes to the sources are committed to the git repository as soon as
- they're somewhat verified to work. Changes shall be commited as independently
+ they're somewhat verified to work. Changes shall be committed as independently
as possible so that individual changes can be easier spotted and tracked
afterwards.
Tagging shall be used extensively, and by the time we release new archives we
should tag the sources with a name similar to the released version number.
+<a name="Portability"></a>
Portability
===========
@@ -33,45 +74,55 @@ Portability
want it to remain functional and buildable with these and later versions
(older versions may still work but is not what we work hard to maintain):
- OpenSSL 0.9.6
- GnuTLS 1.2
- zlib 1.1.4
- libssh2 0.16
- c-ares 1.6.0
- libidn 0.4.1
- *yassl 1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html)
- openldap 2.0
- MIT krb5 lib 1.2.4
- qsossl V5R2M0
- NSS 3.11.x
- Heimdal ?
-
- * = only partly functional, but that's due to bugs in the third party lib, not
- because of libcurl code
+Dependencies
+------------
+
+ - OpenSSL 0.9.7
+ - GnuTLS 1.2
+ - zlib 1.1.4
+ - libssh2 0.16
+ - c-ares 1.6.0
+ - libidn 0.4.1
+ - cyassl 2.0.0
+ - openldap 2.0
+ - MIT Kerberos 1.2.4
+ - GSKit V5R3M0
+ - NSS 3.14.x
+ - axTLS 1.2.7
+ - PolarSSL 1.3.0
+ - Heimdal ?
+ - nghttp2 1.0.0
+
+Operating Systems
+-----------------
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
curl running fine on:
- Windows 98
- AS/400 V5R2M0
- Symbian 9.1
- Windows CE ?
- TPF ?
+ - Windows 98
+ - AS/400 V5R3M0
+ - Symbian 9.1
+ - Windows CE ?
+ - TPF ?
+
+Build tools
+-----------
When writing code (mostly for generating stuff included in release tarballs)
we use a few "build tools" and we make sure that we remain functional with
these versions:
- GNU Libtool 1.4.2
- GNU Autoconf 2.57
- GNU Automake 1.7 (we currently avoid 1.10 due to Solaris-related bugs)
- GNU M4 1.4
- perl 4
- roffit 0.5
- groff ? (any version that supports "groff -Tps -man [in] [out]")
- ps2pdf (gs) ?
+ - GNU Libtool 1.4.2
+ - GNU Autoconf 2.57
+ - GNU Automake 1.7
+ - GNU M4 1.4
+ - perl 5.004
+ - roffit 0.5
+ - groff ? (any version that supports "groff -Tps -man [in] [out]")
+ - ps2pdf (gs) ?
+<a name="winvsunix"></a>
Windows vs Unix
===============
@@ -86,11 +137,12 @@ Windows vs Unix
2. Windows requires a couple of init calls for the socket stuff.
- That's taken care of by the curl_global_init() call, but if other libs also
- do it etc there might be reasons for applications to alter that behaviour.
+ That's taken care of by the `curl_global_init()` call, but if other libs
+ also do it etc there might be reasons for applications to alter that
+ behaviour.
3. The file descriptors for network communication and file operations are
- not easily interchangable as in unix.
+ not easily interchangeable as in unix.
We avoid this by not trying any funny tricks on file descriptors.
@@ -100,25 +152,29 @@ Windows vs Unix
We set stdout to binary under windows
- Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All
+ Inside the source code, We make an effort to avoid `#ifdef [Your OS]`. All
conditionals that deal with features *should* instead be in the format
- '#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts,
- we maintain two curl_config-win32.h files (one in lib/ and one in src/) that
- are supposed to look exactly as a curl_config.h file would have looked like on
- a Windows machine!
+ `#ifdef HAVE_THAT_WEIRD_FUNCTION`. Since Windows can't run configure scripts,
+ we maintain a `curl_config-win32.h` file in lib directory that is supposed to
+ look exactly as a `curl_config.h` file would have looked like on a Windows
+ machine!
Generally speaking: always remember that this will be compiled on dozens of
operating systems. Don't walk on the edge.
+<a name="Library"></a>
Library
=======
+ (See `LIBCURL-STRUCTS` for a separate document describing all major internal
+ structs and their purposes.)
+
There are plenty of entry points to the library, namely each publicly defined
function that libcurl offers to applications. All of those functions are
- rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are
+ rather small and easy-to-follow. All the ones prefixed with `curl_easy` are
put in the lib/easy.c file.
- curl_global_init_() and curl_global_cleanup() should be called by the
+ `curl_global_init_()` and `curl_global_cleanup()` should be called by the
application to initialize and clean up global stuff in the library. As of
today, it can handle the global SSL initing if SSL is enabled and it can init
the socket layer on windows machines. libcurl itself has no "global" scope.
@@ -126,52 +182,56 @@ Library
All printf()-style functions use the supplied clones in lib/mprintf.c. This
makes sure we stay absolutely platform independent.
- curl_easy_init() allocates an internal struct and makes some initializations.
- The returned handle does not reveal internals. This is the 'SessionHandle'
- struct which works as an "anchor" struct for all curl_easy functions. All
- connections performed will get connect-specific data allocated that should be
- used for things related to particular connections/requests.
+ [ `curl_easy_init()`][2] allocates an internal struct and makes some
+ initializations. The returned handle does not reveal internals. This is the
+ 'SessionHandle' struct which works as an "anchor" struct for all `curl_easy`
+ functions. All connections performed will get connect-specific data allocated
+ that should be used for things related to particular connections/requests.
- curl_easy_setopt() takes three arguments, where the option stuff must be
- passed in pairs: the parameter-ID and the parameter-value. The list of
+ [`curl_easy_setopt()`][1] takes three arguments, where the option stuff must
+ be passed in pairs: the parameter-ID and the parameter-value. The list of
options is documented in the man page. This function mainly sets things in
the 'SessionHandle' struct.
- curl_easy_perform() does a whole lot of things:
+ `curl_easy_perform()` is just a wrapper function that makes use of the multi
+ API. It basically calls `curl_multi_init()`, `curl_multi_add_handle()`,
+ `curl_multi_wait()`, and `curl_multi_perform()` until the transfer is done
+ and then returns.
- It starts off in the lib/easy.c file by calling Curl_perform() and the main
- work then continues in lib/url.c. The flow continues with a call to
- Curl_connect() to connect to the remote site.
+ Some of the most important key functions in url.c are called from multi.c
+ when certain key steps are to be made in the transfer operation.
- o Curl_connect()
+<a name="Curl_connect"></a>
+Curl_connect()
+--------------
- ... analyzes the URL, it separates the different components and connects to
- the remote host. This may involve using a proxy and/or using SSL. The
- Curl_resolv() function in lib/hostip.c is used for looking up host names
+ Analyzes the URL, it separates the different components and connects to the
+ remote host. This may involve using a proxy and/or using SSL. The
+ `Curl_resolv()` function in lib/hostip.c is used for looking up host names
(it does then use the proper underlying method, which may vary between
platforms and builds).
- When Curl_connect is done, we are connected to the remote site. Then it is
- time to tell the server to get a document/file. Curl_do() arranges this.
+ When `Curl_connect` is done, we are connected to the remote site. Then it
+ is time to tell the server to get a document/file. `Curl_do()` arranges
+ this.
This function makes sure there's an allocated and initiated 'connectdata'
struct that is used for this particular connection only (although there may
be several requests performed on the same connect). A bunch of things are
inited/inherited from the SessionHandle struct.
- o Curl_do()
+<a name="Curl_do"></a>
+Curl_do()
+---------
- Curl_do() makes sure the proper protocol-specific function is called. The
- functions are named after the protocols they handle. Curl_ftp(),
- Curl_http(), Curl_dict(), etc. They all reside in their respective files
- (ftp.c, http.c and dict.c). HTTPS is handled by Curl_http() and FTPS by
- Curl_ftp().
+ `Curl_do()` makes sure the proper protocol-specific function is called. The
+ functions are named after the protocols they handle.
The protocol-specific functions of course deal with protocol-specific
- negotiations and setup. They have access to the Curl_sendf() (from
+ negotiations and setup. They have access to the `Curl_sendf()` (from
lib/sendf.c) function to send printf-style formatted data to the remote
host and when they're ready to make the actual file transfer they call the
- Curl_Transfer() function (in lib/transfer.c) to setup the transfer and
+ `Curl_Transfer()` function (in lib/transfer.c) to setup the transfer and
returns.
If this DO function fails and the connection is being re-used, libcurl will
@@ -180,64 +240,48 @@ Library
we have discovered a dead connection before the DO function and thus we
might wrongly be re-using a connection that was closed by the remote peer.
- Some time during the DO function, the Curl_setup_transfer() function must
+ Some time during the DO function, the `Curl_setup_transfer()` function must
be called with some basic info about the upcoming transfer: what socket(s)
- to read/write and the expected file tranfer sizes (if known).
+ to read/write and the expected file transfer sizes (if known).
- o Transfer()
+<a name="Curl_readwrite"></a>
+Curl_readwrite()
+----------------
- Curl_perform() then calls Transfer() in lib/transfer.c that performs the
- entire file transfer.
+ Called during the transfer of the actual protocol payload.
During transfer, the progress functions in lib/progress.c are called at a
frequent interval (or at the user's choice, a specified callback might get
called). The speedcheck functions in lib/speedcheck.c are also used to
verify that the transfer is as fast as required.
- o Curl_done()
+<a name="Curl_done"></a>
+Curl_done()
+-----------
Called after a transfer is done. This function takes care of everything
that has to be done after a transfer. This function attempts to leave
- matters in a state so that Curl_do() should be possible to call again on
+ matters in a state so that `Curl_do()` should be possible to call again on
the same connection (in a persistent connection case). It might also soon
- be closed with Curl_disconnect().
+ be closed with `Curl_disconnect()`.
- o Curl_disconnect()
+<a name="Curl_disconnect"></a>
+Curl_disconnect()
+-----------------
When doing normal connections and transfers, no one ever tries to close any
- connections so this is not normally called when curl_easy_perform() is
+ connections so this is not normally called when `curl_easy_perform()` is
used. This function is only used when we are certain that no more transfers
is going to be made on the connection. It can be also closed by force, or
it can be called to make sure that libcurl doesn't keep too many
- connections alive at the same time (there's a default amount of 5 but that
- can be changed with the CURLOPT_MAXCONNECTS option).
+ connections alive at the same time.
This function cleans up all resources that are associated with a single
connection.
- Curl_perform() is the function that does the main "connect - do - transfer -
- done" loop. It loops if there's a Location: to follow.
-
- When completed, the curl_easy_cleanup() should be called to free up used
- resources. It runs Curl_disconnect() on all open connectons.
-
- A quick roundup on internal function sequences (many of these call
- protocol-specific function-pointers):
-
- curl_connect - connects to a remote site and does initial connect fluff
- This also checks for an existing connection to the requested site and uses
- that one if it is possible.
-
- curl_do - starts a transfer
- curl_transfer() - transfers data
- curl_done - ends a transfer
-
- curl_disconnect - disconnects from a remote site. This is called when the
- disconnect is really requested, which doesn't necessarily have to be
- exactly after curl_done in case we want to keep the connection open for
- a while.
-
- HTTP(S)
+<a name="http"></a>
+HTTP(S)
+=======
HTTP offers a lot and is the protocol in curl that uses the most lines of
code. There is a special file (lib/formdata.c) that offers all the multipart
@@ -249,116 +293,142 @@ Library
HTTPS uses in almost every means the same procedure as HTTP, with only two
exceptions: the connect procedure is different and the function used to read
or write from the socket is different, although the latter fact is hidden in
- the source by the use of curl_read() for reading and curl_write() for writing
- data to the remote server.
+ the source by the use of `Curl_read()` for reading and `Curl_write()` for
+ writing data to the remote server.
- http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
+ `http_chunks.c` contains functions that understands HTTP 1.1 chunked transfer
encoding.
- An interesting detail with the HTTP(S) request, is the add_buffer() series of
- functions we use. They append data to one single buffer, and when the
- building is done the entire request is sent off in one single write. This is
- done this way to overcome problems with flawed firewalls and lame servers.
+ An interesting detail with the HTTP(S) request, is the `Curl_add_buffer()`
+ series of functions we use. They append data to one single buffer, and when
+ the building is done the entire request is sent off in one single write. This
+ is done this way to overcome problems with flawed firewalls and lame servers.
- FTP
+<a name="ftp"></a>
+FTP
+===
- The Curl_if2ip() function can be used for getting the IP number of a
+ The `Curl_if2ip()` function can be used for getting the IP number of a
specified network interface, and it resides in lib/if2ip.c.
- Curl_ftpsendf() is used for sending FTP commands to the remote server. It was
- made a separate function to prevent us programmers from forgetting that they
- must be CRLF terminated. They must also be sent in one single write() to make
- firewalls and similar happy.
+ `Curl_ftpsendf()` is used for sending FTP commands to the remote server. It
+ was made a separate function to prevent us programmers from forgetting that
+ they must be CRLF terminated. They must also be sent in one single write() to
+ make firewalls and similar happy.
- Kerberos
+<a name="kerberos"></a>
+Kerberos
+--------
- The kerberos support is mainly in lib/krb4.c and lib/security.c.
+ 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` and `socks_sspi.c` for SOCKS5 proxy specifics.
- TELNET
+<a name="telnet"></a>
+TELNET
+======
Telnet is implemented in lib/telnet.c.
- FILE
+<a name="file"></a>
+FILE
+====
The file:// protocol is dealt with in lib/file.c.
- LDAP
+<a name="smb"></a>
+SMB
+===
+
+ The smb:// protocol is dealt with in lib/smb.c.
- Everything LDAP is in lib/ldap.c.
+<a name="ldap"></a>
+LDAP
+====
- GENERAL
+ Everything LDAP is in lib/ldap.c and lib/openldap.c
+
+<a name="email"></a>
+E-mail
+======
+
+ The e-mail related source code is in lib/imap.c, lib/pop3.c and lib/smtp.c.
+
+<a name="general"></a>
+General
+=======
URL encoding and decoding, called escaping and unescaping in the source code,
is found in lib/escape.c.
- While transfering data in Transfer() a few functions might get used.
- curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
+ While transferring data in Transfer() a few functions might get used.
+ `curl_getdate()` in lib/parsedate.c is for HTTP date comparisons (and more).
- lib/getenv.c offers curl_getenv() which is for reading environment variables
- in a neat platform independent way. That's used in the client, but also in
- lib/url.c when checking the proxy environment variables. Note that contrary
- to the normal unix getenv(), this returns an allocated buffer that must be
- free()ed after use.
+ lib/getenv.c offers `curl_getenv()` which is for reading environment
+ variables in a neat platform independent way. That's used in the client, but
+ also in lib/url.c when checking the proxy environment variables. Note that
+ contrary to the normal unix getenv(), this returns an allocated buffer that
+ must be free()ed after use.
lib/netrc.c holds the .netrc parser
lib/timeval.c features replacement functions for systems that don't have
- gettimeofday() and a few support functions for timeval convertions.
+ gettimeofday() and a few support functions for timeval conversions.
- A function named curl_version() that returns the full curl version string is
- found in lib/version.c.
+ A function named `curl_version()` that returns the full curl version string
+ is found in lib/version.c.
+<a name="persistent"></a>
Persistent Connections
======================
The persistent connection support in libcurl requires some considerations on
how to do things inside of the library.
- o The 'SessionHandle' struct returned in the curl_easy_init() call must never
- hold connection-oriented data. It is meant to hold the root data as well as
- all the options etc that the library-user may choose.
- o The 'SessionHandle' struct holds the "connection cache" (an array of
- pointers to 'connectdata' structs). There's one connectdata struct
- allocated for each connection that libcurl knows about. Note that when you
- use the multi interface, the multi handle will hold the connection cache
- and not the particular easy handle. This of course to allow all easy handles
- in a multi stack to be able to share and re-use connections.
- o This enables the 'curl handle' to be reused on subsequent transfers.
- o When we are about to perform a transfer with curl_easy_perform(), we first
- check for an already existing connection in the cache that we can use,
- otherwise we create a new one and add to the cache. If the cache is full
- already when we add a new connection, we close one of the present ones. We
- select which one to close dependent on the close policy that may have been
- previously set.
- o When the transfer operation is complete, we try to leave the connection
- open. Particular options may tell us not to, and protocols may signal
- closure on connections and then we don't keep it open of course.
- o When curl_easy_cleanup() is called, we close all still opened connections,
+ - The 'SessionHandle' struct returned in the [`curl_easy_init()`][2] call
+ must never hold connection-oriented data. It is meant to hold the root data
+ as well as all the options etc that the library-user may choose.
+
+ - The 'SessionHandle' struct holds the "connection cache" (an array of
+ pointers to 'connectdata' structs).
+
+ - This enables the 'curl handle' to be reused on subsequent transfers.
+
+ - When libcurl is told to perform a transfer, it first checks for an already
+ existing connection in the cache that we can use. Otherwise it creates a
+ new one and adds that the cache. If the cache is full already when a new
+ connection is added added, it will first close the oldest unused one.
+
+ - When the transfer operation is complete, the connection is left
+ open. Particular options may tell libcurl not to, and protocols may signal
+ closure on connections and then they won't be kept open of course.
+
+ - When `curl_easy_cleanup()` is called, we close all still opened connections,
unless of course the multi interface "owns" the connections.
- You do realize that the curl handle must be re-used in order for the
- persistent connections to work.
+ The curl handle must be re-used in order for the persistent connections to
+ work.
+<a name="multi"></a>
multi interface/non-blocking
============================
- We make an effort to provide a non-blocking interface to the library, the
- multi interface. To make that interface work as good as possible, no
- low-level functions within libcurl must be written to work in a blocking
- manner.
+ The multi interface is a non-blocking interface to the library. To make that
+ interface work as good as possible, no low-level functions within libcurl
+ must be written to work in a blocking manner. (There are still a few spots
+ violating this rule.)
One of the primary reasons we introduced c-ares support was to allow the name
resolve phase to be perfectly non-blocking as well.
- The ultimate goal is to provide the easy interface simply by wrapping the
- multi interface functions and thus treat everything internally as the multi
- interface is the single interface we have.
-
- The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
- and adjust the code to allow non-blocking operations even on multi-stage
- protocols. The DICT, LDAP and TELNET are crappy examples and they are subject
- for rewrite in the future to better fit the libcurl protocol family.
+ The FTP and the SFTP/SCP protocols are examples of how we adapt and adjust
+ the code to allow non-blocking operations even on multi-stage command-
+ response protocols. They are built around state machines that return when
+ they would otherwise block waiting for data. The DICT, LDAP and TELNET
+ protocols are crappy examples and they are subject for rewrite in the future
+ to better fit the libcurl protocol family.
+<a name="ssl"></a>
SSL libraries
=============
@@ -368,34 +438,39 @@ SSL libraries
in future libcurl versions.
To deal with this internally in the best way possible, we have a generic SSL
- function API as provided by the sslgen.[ch] system, and they are the only SSL
- functions we must use from within libcurl. sslgen is then crafted to use the
- appropriate lower-level function calls to whatever SSL library that is in
- use.
+ function API as provided by the vtls/vtls.[ch] system, and they are the only
+ SSL functions we must use from within libcurl. vtls is then crafted to use
+ the appropriate lower-level function calls to whatever SSL library that is in
+ use. For example vtls/openssl.[ch] for the OpenSSL library.
+<a name="symbols"></a>
Library Symbols
===============
- All symbols used internally in libcurl must use a 'Curl_' prefix if they're
+ All symbols used internally in libcurl must use a `Curl_` prefix if they're
used in more than a single file. Single-file symbols must be made static.
- Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions,
- but they are to be changed to follow this pattern in future versions.)
+ Public ("exported") symbols must use a `curl_` prefix. (There are exceptions,
+ but they are to be changed to follow this pattern in future versions.) Public
+ API functions are marked with `CURL_EXTERN` in the public header files so
+ that all others can be hidden on platforms where this is possible.
+<a name="returncodes"></a>
Return Codes and Informationals
===============================
I've made things simple. Almost every function in libcurl returns a CURLcode,
- that must be CURLE_OK if everything is OK or otherwise a suitable error code
- as the curl/curl.h include file defines. The very spot that detects an error
- must use the Curl_failf() function to set the human-readable error
+ that must be `CURLE_OK` if everything is OK or otherwise a suitable error
+ code as the curl/curl.h include file defines. The very spot that detects an
+ error must use the `Curl_failf()` function to set the human-readable error
description.
In aiding the user to understand what's happening and to debug curl usage, we
- must supply a fair amount of informational messages by using the Curl_infof()
- function. Those messages are only displayed when the user explicitly asks for
- them. They are best used when revealing information that isn't otherwise
- obvious.
+ must supply a fair amount of informational messages by using the
+ `Curl_infof()` function. Those messages are only displayed when the user
+ explicitly asks for them. They are best used when revealing information that
+ isn't otherwise obvious.
+<a name="abi"></a>
API/ABI
=======
@@ -403,29 +478,31 @@ API/ABI
that makes it easier to keep a solid API/ABI over time. See docs/libcurl/ABI
for our promise to users.
+<a name="client"></a>
Client
======
- main() resides in src/main.c together with most of the client code.
+ main() resides in `src/tool_main.c`.
- src/hugehelp.c is automatically generated by the mkhelp.pl perl script to
- display the complete "manual" and the src/urlglob.c file holds the functions
- used for the URL-"globbing" support. Globbing in the sense that the {} and []
- expansion stuff is there.
+ `src/tool_hugehelp.c` is automatically generated by the mkhelp.pl perl script
+ to display the complete "manual" and the src/tool_urlglob.c file holds the
+ functions used for the URL-"globbing" support. Globbing in the sense that the
+ {} and [] expansion stuff is there.
The client mostly messes around to setup its 'config' struct properly, then
- it calls the curl_easy_*() functions of the library and when it gets back
- control after the curl_easy_perform() it cleans up the library, checks status
- and exits.
+ it calls the `curl_easy_*()` functions of the library and when it gets back
+ control after the `curl_easy_perform()` it cleans up the library, checks
+ status and exits.
When the operation is done, the ourWriteOut() function in src/writeout.c may
be called to report about the operation. That function is using the
- curl_easy_getinfo() function to extract useful information from the curl
+ `curl_easy_getinfo()` function to extract useful information from the curl
session.
- Recent versions may loop and do all this several times if many URLs were
- specified on the command line or config file.
+ It may loop and do all this several times if many URLs were specified on the
+ command line or config file.
+<a name="memorydebug"></a>
Memory Debugging
================
@@ -455,34 +532,564 @@ Memory Debugging
the configure script. When --enable-debug is given both features will be
enabled, unless some restriction prevents memory tracking from being used.
+<a name="test"></a>
Test Suite
==========
- Since November 2000, a test suite has evolved. It is placed in its own
- subdirectory directly off the root in the curl archive tree, and it contains
- a bunch of scripts and a lot of test case data.
+ The test suite is placed in its own subdirectory directly off the root in the
+ curl archive tree, and it contains a bunch of scripts and a lot of test case
+ data.
- The main test script is runtests.pl that will invoke the two servers
+ The main test script is runtests.pl that will invoke test servers like
httpserver.pl and ftpserver.pl before all the test cases are performed. The
test suite currently only runs on unix-like platforms.
- You'll find a complete description of the test case data files in the
- tests/README file.
+ You'll find a description of the test suite in the tests/README file, and the
+ test case data files in the tests/FILEFORMAT file.
The test suite automatically detects if curl was built with the memory
- debugging enabled, and if it was it will detect memory leaks too.
+ debugging enabled, and if it was it will detect memory leaks, too.
+
+<a name="asyncdns"></a>
+Asynchronous name resolves
+==========================
+
+ libcurl can be built to do name resolves asynchronously, using either the
+ normal resolver in a threaded manner or by using c-ares.
+
+<a name="cares"></a>
+[c-ares][3]
+------
+
+### Build libcurl to use a c-ares
+
+1. ./configure --enable-ares=/path/to/ares/install
+2. make
+
+### c-ares on win32
+
+ First I compiled c-ares. I changed the default C runtime library to be the
+ single-threaded rather than the multi-threaded (this seems to be required to
+ prevent linking errors later on). Then I simply build the areslib project
+ (the other projects adig/ahost seem to fail under MSVC).
+
+ Next was libcurl. I opened lib/config-win32.h and I added a:
+ `#define USE_ARES 1`
+
+ Next thing I did was I added the path for the ares includes to the include
+ path, and the libares.lib to the libraries.
+
+ Lastly, I also changed libcurl to be single-threaded rather than
+ multi-threaded, again this was to prevent some duplicate symbol errors. I'm
+ not sure why I needed to change everything to single-threaded, but when I
+ didn't I got redefinition errors for several CRT functions (malloc, stricmp,
+ etc.)
+
+<a name="curl_off_t"></a>
+`curl_off_t`
+==========
+
+ curl_off_t is a data type provided by the external libcurl include
+ headers. It is the type meant to be used for the [`curl_easy_setopt()`][1]
+ options that end with LARGE. The type is 64bit large on most modern
+ platforms.
+
+curlx
+=====
+
+ The libcurl source code offers a few functions by source only. They are not
+ part of the official libcurl API, but the source files might be useful for
+ others so apps can optionally compile/build with these sources to gain
+ additional functions.
+
+ We provide them through a single header file for easy access for apps:
+ "curlx.h"
+
+`curlx_strtoofft()`
+-------------------
+ A macro that converts a string containing a number to a curl_off_t number.
+ This might use the curlx_strtoll() function which is provided as source
+ code in strtoofft.c. Note that the function is only provided if no
+ strtoll() (or equivalent) function exist on your platform. If curl_off_t
+ is only a 32 bit number on your platform, this macro uses strtol().
+
+`curlx_tvnow()`
+---------------
+ returns a struct timeval for the current time.
+
+`curlx_tvdiff()`
+--------------
+ returns the difference between two timeval structs, in number of
+ milliseconds.
+
+`curlx_tvdiff_secs()`
+---------------------
+ returns the same as curlx_tvdiff but with full usec resolution (as a
+ double)
+
+Future
+------
+
+ Several functions will be removed from the public curl_ name space in a
+ future libcurl release. They will then only become available as curlx_
+ functions instead. To make the transition easier, we already today provide
+ these functions with the curlx_ prefix to allow sources to get built properly
+ with the new function names. The functions this concerns are:
+
+ - `curlx_getenv`
+ - `curlx_strequal`
+ - `curlx_strnequal`
+ - `curlx_mvsnprintf`
+ - `curlx_msnprintf`
+ - `curlx_maprintf`
+ - `curlx_mvaprintf`
+ - `curlx_msprintf`
+ - `curlx_mprintf`
+ - `curlx_mfprintf`
+ - `curlx_mvsprintf`
+ - `curlx_mvprintf`
+ - `curlx_mvfprintf`
+
+<a name="contentencoding"></a>
+Content Encoding
+================
+
+## About content encodings
+
+ [HTTP/1.1][4] specifies that a client may request that a server encode its
+ response. This is usually used to compress a response using one of a set of
+ commonly available compression techniques. These schemes are 'deflate' (the
+ zlib algorithm), 'gzip' and 'compress'. A client requests that the sever
+ perform an encoding by including an Accept-Encoding header in the request
+ document. The value of the header should be one of the recognized tokens
+ 'deflate', ... (there's a way to register new schemes/tokens, see sec 3.5 of
+ the spec). A server MAY honor the client's encoding request. When a response
+ is encoded, the server includes a Content-Encoding header in the
+ response. The value of the Content-Encoding header indicates which scheme was
+ used to encode the data.
+
+ A client may tell a server that it can understand several different encoding
+ schemes. In this case the server may choose any one of those and use it to
+ encode the response (indicating which one using the Content-Encoding header).
+ It's also possible for a client to attach priorities to different schemes so
+ that the server knows which it prefers. See sec 14.3 of RFC 2616 for more
+ information on the Accept-Encoding header.
+
+## Supported content encodings
+
+ The 'deflate' and 'gzip' content encoding are supported by libcurl. Both
+ regular and chunked transfers work fine. The zlib library is required for
+ this feature.
+
+## The libcurl interface
+
+ To cause libcurl to request a content encoding use:
+
+ [`curl_easy_setopt`][1](curl, [`CURLOPT_ACCEPT_ENCODING`][5], string)
+
+ where string is the intended value of the Accept-Encoding header.
+
+ Currently, libcurl only understands how to process responses that use the
+ "deflate" or "gzip" Content-Encoding, so the only values for
+ [`CURLOPT_ACCEPT_ENCODING`][5] that will work (besides "identity," which does
+ nothing) are "deflate" and "gzip" If a response is encoded using the
+ "compress" or methods, libcurl will return an error indicating that the
+ response could not be decoded. If <string> is NULL no Accept-Encoding header
+ is generated. If <string> is a zero-length string, then an Accept-Encoding
+ header containing all supported encodings will be generated.
+
+ The [`CURLOPT_ACCEPT_ENCODING`][5] must be set to any non-NULL value for
+ content to be automatically decoded. If it is not set and the server still
+ sends encoded content (despite not having been asked), the data is returned
+ in its raw form and the Content-Encoding type is not checked.
+
+## The curl interface
+
+ Use the [--compressed][6] option with curl to cause it to ask servers to
+ compress responses using any format supported by curl.
+
+<a name="hostip"></a>
+hostip.c explained
+==================
+
+ The main compile-time defines to keep in mind when reading the host*.c source
+ file are these:
+
+## `CURLRES_IPV6`
+
+ this host has getaddrinfo() and family, and thus we use that. The host may
+ not be able to resolve IPv6, but we don't really have to take that into
+ account. Hosts that aren't IPv6-enabled have CURLRES_IPV4 defined.
+
+## `CURLRES_ARES`
+
+ is defined if libcurl is built to use c-ares for asynchronous name
+ resolves. This can be Windows or *nix.
+
+## `CURLRES_THREADED`
+
+ is defined if libcurl is built to use threading for asynchronous name
+ resolves. The name resolve will be done in a new thread, and the supported
+ asynch API will be the same as for ares-builds. This is the default under
+ (native) Windows.
+
+ If any of the two previous are defined, `CURLRES_ASYNCH` is defined too. If
+ libcurl is not built to use an asynchronous resolver, `CURLRES_SYNCH` is
+ defined.
+
+## host*.c sources
+
+ The host*.c sources files are split up like this:
+
+ - hostip.c - method-independent resolver functions and utility functions
+ - hostasyn.c - functions for asynchronous name resolves
+ - 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
+
+ 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.
+
+<a name="memoryleak"></a>
+Track Down Memory Leaks
+=======================
+
+## Single-threaded
+
+ Please note that this memory leak system is not adjusted to work in more
+ than one thread. If you want/need to use it in a multi-threaded app. Please
+ adjust accordingly.
+
+
+## Build
+
+ Rebuild libcurl with -DCURLDEBUG (usually, rerunning configure with
+ --enable-debug fixes this). 'make clean' first, then 'make' so that all
+ files actually are rebuilt properly. It will also make sense to build
+ libcurl with the debug option (usually -g to the compiler) so that debugging
+ it will be easier if you actually do find a leak in the library.
+
+ This will create a library that has memory debugging enabled.
+
+## Modify Your Application
+
+ Add a line in your application code:
+
+ `curl_memdebug("dump");`
+
+ This will make the malloc debug system output a full trace of all resource
+ using functions to the given file name. Make sure you rebuild your program
+ and that you link with the same libcurl you built for this purpose as
+ described above.
+
+## Run Your Application
+
+ Run your program as usual. Watch the specified memory trace file grow.
+
+ Make your program exit and use the proper libcurl cleanup functions etc. So
+ that all non-leaks are returned/freed properly.
+
+## Analyze the Flow
+
+ Use the tests/memanalyze.pl perl script to analyze the dump file:
+
+ tests/memanalyze.pl dump
+
+ This now outputs a report on what resources that were allocated but never
+ freed etc. This report is very fine for posting to the list!
+
+ If this doesn't produce any output, no leak was detected in libcurl. Then
+ the leak is mostly likely to be in your code.
+
+<a name="multi_socket"></a>
+`multi_socket`
+==============
+
+ Implementation of the `curl_multi_socket` API
+
+ The main ideas of this API are simply:
+
+ 1 - The application can use whatever event system it likes as it gets info
+ from libcurl about what file descriptors libcurl waits for what action
+ on. (The previous API returns `fd_sets` which is very select()-centric).
+
+ 2 - When the application discovers action on a single socket, it calls
+ libcurl and informs that there was action on this particular socket and
+ libcurl can then act on that socket/transfer only and not care about
+ any other transfers. (The previous API always had to scan through all
+ the existing transfers.)
+
+ The idea is that [`curl_multi_socket_action()`][7] calls a given callback
+ with information about what socket to wait for what action on, and the
+ callback only gets called if the status of that socket has changed.
+
+ We also added a timer callback that makes libcurl call the application when
+ the timeout value changes, and you set that with [`curl_multi_setopt()`][9]
+ and the [`CURLMOPT_TIMERFUNCTION`][10] option. To get this to work,
+ Internally, there's an added a struct to each easy handle in which we store
+ an "expire time" (if any). The structs are then "splay sorted" so that we
+ can add and remove times from the linked list and yet somewhat swiftly
+ figure out both how long time there is until the next nearest timer expires
+ and which timer (handle) we should take care of now. Of course, the upside
+ of all this is that we get a [`curl_multi_timeout()`][8] that should also
+ work with old-style applications that use [`curl_multi_perform()`][11].
+
+ We created an internal "socket to easy handles" hash table that given
+ a socket (file descriptor) return the easy handle that waits for action on
+ that socket. This hash is made using the already existing hash code
+ (previously only used for the DNS cache).
+
+ To make libcurl able to report plain sockets in the socket callback, we had
+ to re-organize the internals of the [`curl_multi_fdset()`][12] etc so that
+ the conversion from sockets to `fd_sets` for that function is only done in
+ the last step before the data is returned. I also had to extend c-ares to
+ get a function that can return plain sockets, as that library too returned
+ only `fd_sets` and that is no longer good enough. The changes done to c-ares
+ are available in c-ares 1.3.1 and later.
+
+<a name="structs"></a>
+Structs in libcurl
+==================
+
+This section should cover 7.32.0 pretty accurately, but will make sense even
+for older and later versions as things don't change drastically that often.
+
+## SessionHandle
+
+ The SessionHandle handle struct is the one returned to the outside in the
+ external API as a "CURL *". This is usually known as an easy handle in API
+ documentations and examples.
+
+ Information and state that is related to the actual connection is in the
+ 'connectdata' struct. When a transfer is about to be made, libcurl will
+ either create a new connection or re-use an existing one. The particular
+ connectdata that is used by this handle is pointed out by
+ SessionHandle->easy_conn.
+
+ Data and information that regard this particular single transfer is put in
+ the SingleRequest sub-struct.
+
+ When the SessionHandle struct is added to a multi handle, as it must be in
+ order to do any transfer, the ->multi member will point to the `Curl_multi`
+ struct it belongs to. The ->prev and ->next members will then be used by the
+ multi code to keep a linked list of SessionHandle structs that are added to
+ that same multi handle. libcurl always uses multi so ->multi *will* point to
+ a `Curl_multi` when a transfer is in progress.
+
+ ->mstate is the multi state of this particular SessionHandle. When
+ `multi_runsingle()` is called, it will act on this handle according to which
+ state it is in. The mstate is also what tells which sockets to return for a
+ specific SessionHandle when [`curl_multi_fdset()`][12] is called etc.
+
+ The libcurl source code generally use the name 'data' for the variable that
+ points to the SessionHandle.
+
+ When doing multiplexed HTTP/2 transfers, each SessionHandle is associated
+ with an individual stream, sharing the same connectdata struct. Multiplexing
+ makes it even more important to keep things associated with the right thing!
+
+## connectdata
+
+ A general idea in libcurl is to keep connections around in a connection
+ "cache" after they have been used in case they will be used again and then
+ re-use an existing one instead of creating a new as it creates a significant
+ performance boost.
+
+ Each 'connectdata' identifies a single physical connection to a server. If
+ the connection can't be kept alive, the connection will be closed after use
+ and then this struct can be removed from the cache and freed.
+
+ Thus, the same SessionHandle can be used multiple times and each time select
+ another connectdata struct to use for the connection. Keep this in mind, as
+ it is then important to consider if options or choices are based on the
+ connection or the SessionHandle.
+
+ Functions in libcurl will assume that connectdata->data points to the
+ SessionHandle that uses this connection (for the moment).
+
+ As a special complexity, some protocols supported by libcurl require a
+ special disconnect procedure that is more than just shutting down the
+ socket. It can involve sending one or more commands to the server before
+ doing so. Since connections are kept in the connection cache after use, the
+ original SessionHandle may no longer be around when the time comes to shut
+ down a particular connection. For this purpose, libcurl holds a special
+ dummy `closure_handle` SessionHandle in the `Curl_multi` struct to use when
+ needed.
+
+ FTP uses two TCP connections for a typical transfer but it keeps both in
+ this single struct and thus can be considered a single connection for most
+ internal concerns.
+
+ The libcurl source code generally use the name 'conn' for the variable that
+ points to the connectdata.
+
+## Curl_multi
+
+ Internally, the easy interface is implemented as a wrapper around multi
+ interface functions. This makes everything multi interface.
+
+ `Curl_multi` is the multi handle struct exposed as "CURLM *" in external APIs.
+
+ This struct holds a list of SessionHandle structs that have been added to
+ this handle with [`curl_multi_add_handle()`][13]. The start of the list is
+ ->easyp and ->num_easy is a counter of added SessionHandles.
+
+ ->msglist is a linked list of messages to send back when
+ [`curl_multi_info_read()`][14] is called. Basically a node is added to that
+ list when an individual SessionHandle's transfer has completed.
+
+ ->hostcache points to the name cache. It is a hash table for looking up name
+ to IP. The nodes have a limited life time in there and this cache is meant
+ to reduce the time for when the same name is wanted within a short period of
+ time.
+
+ ->timetree points to a tree of SessionHandles, sorted by the remaining time
+ until it should be checked - normally some sort of timeout. Each
+ SessionHandle has one node in the tree.
+
+ ->sockhash is a hash table to allow fast lookups of socket descriptor to
+ which SessionHandle that uses that descriptor. This is necessary for the
+ `multi_socket` API.
+
+ ->conn_cache points to the connection cache. It keeps track of all
+ connections that are kept after use. The cache has a maximum size.
+
+ ->closure_handle is described in the 'connectdata' section.
+
+ The libcurl source code generally use the name 'multi' for the variable that
+ points to the Curl_multi struct.
+
+## Curl_handler
+
+ Each unique protocol that is supported by libcurl needs to provide at least
+ one `Curl_handler` struct. It defines what the protocol is called and what
+ functions the main code should call to deal with protocol specific issues.
+ In general, there's a source file named [protocol].c in which there's a
+ "struct `Curl_handler` `Curl_handler_[protocol]`" declared. In url.c there's
+ then the main array with all individual `Curl_handler` structs pointed to
+ from a single array which is scanned through when a URL is given to libcurl
+ to work with.
+
+ ->scheme is the URL scheme name, usually spelled out in uppercase. That's
+ "HTTP" or "FTP" etc. SSL versions of the protcol need its own `Curl_handler`
+ setup so HTTPS separate from HTTP.
+
+ ->setup_connection is called to allow the protocol code to allocate protocol
+ specific data that then gets associated with that SessionHandle for the rest
+ of this transfer. It gets freed again at the end of the transfer. It will be
+ called before the 'connectdata' for the transfer has been selected/created.
+ Most protocols will allocate its private 'struct [PROTOCOL]' here and assign
+ SessionHandle->req.protop to point to it.
+
+ ->connect_it allows a protocol to do some specific actions after the TCP
+ connect is done, that can still be considered part of the connection phase.
+
+ Some protocols will alter the connectdata->recv[] and connectdata->send[]
+ function pointers in this function.
+
+ ->connecting is similarly a function that keeps getting called as long as the
+ protocol considers itself still in the connecting phase.
+
+ ->do_it is the function called to issue the transfer request. What we call
+ the DO action internally. If the DO is not enough and things need to be kept
+ getting done for the entire DO sequence to complete, ->doing is then usually
+ also provided. Each protocol that needs to do multiple commands or similar
+ for do/doing need to implement their own state machines (see SCP, SFTP,
+ FTP). Some protocols (only FTP and only due to historical reasons) has a
+ separate piece of the DO state called `DO_MORE`.
+
+ ->doing keeps getting called while issuing the transfer request command(s)
+
+ ->done gets called when the transfer is complete and DONE. That's after the
+ main data has been transferred.
+
+ ->do_more gets called during the `DO_MORE` state. The FTP protocol uses this
+ state when setting up the second connection.
+
+ ->`proto_getsock`
+ ->`doing_getsock`
+ ->`domore_getsock`
+ ->`perform_getsock`
+ Functions that return socket information. Which socket(s) to wait for which
+ action(s) during the particular multi state.
+
+ ->disconnect is called immediately before the TCP connection is shutdown.
+
+ ->readwrite gets called during transfer to allow the protocol to do extra
+ reads/writes
+
+ ->defport is the default report TCP or UDP port this protocol uses
+
+ ->protocol is one or more bits in the `CURLPROTO_*` set. The SSL versions
+ have their "base" protocol set and then the SSL variation. Like
+ "HTTP|HTTPS".
+
+ ->flags is a bitmask with additional information about the protocol that will
+ make it get treated differently by the generic engine:
+
+ - `PROTOPT_SSL` - will make it connect and negotiate SSL
+
+ - `PROTOPT_DUAL` - this protocol uses two connections
+
+ - `PROTOPT_CLOSEACTION` - this protocol has actions to do before closing the
+ connection. This flag is no longer used by code, yet still set for a bunch
+ protocol handlers.
+
+ - `PROTOPT_DIRLOCK` - "direction lock". The SSH protocols set this bit to
+ limit which "direction" of socket actions that the main engine will
+ concern itself about.
+
+ - `PROTOPT_NONETWORK` - a protocol that doesn't use network (read file:)
+
+ - `PROTOPT_NEEDSPWD` - this protocol needs a password and will use a default
+ one unless one is provided
+
+ - `PROTOPT_NOURLQUERY` - this protocol can't handle a query part on the URL
+ (?foo=bar)
+
+## conncache
+
+ Is a hash table with connections for later re-use. Each SessionHandle has
+ a pointer to its connection cache. Each multi handle sets up a connection
+ cache that all added SessionHandles share by default.
+
+## Curl_share
+
+ The libcurl share API allocates a `Curl_share` struct, exposed to the
+ external API as "CURLSH *".
+
+ The idea is that the struct can have a set of own versions of caches and
+ pools and then by providing this struct in the `CURLOPT_SHARE` option, those
+ specific SessionHandles will use the caches/pools that this share handle
+ holds.
+
+ Then individual SessionHandle structs can be made to share specific things
+ that they otherwise wouldn't, such as cookies.
+
+ The `Curl_share` struct can currently hold cookies, DNS cache and the SSL
+ session cache.
+
+## CookieInfo
+
+ This is the main cookie struct. It holds all known cookies and related
+ information. Each SessionHandle has its own private CookieInfo even when
+ they are added to a multi handle. They can be made to share cookies by using
+ the share API.
-Building Releases
-=================
- There's no magic to this. When you consider everything stable enough to be
- released, run the 'maketgz' script (using 'make distcheck' will give you a
- pretty good view on the status of the current sources). maketgz prompts for
- version number of the client and the library before it creates a release
- archive. maketgz uses 'make dist' for the actual archive building, why you
- need to fill in the Makefile.am files properly for which files that should
- be included in the release archives.
-
- NOTE: you need to have curl checked out from git to be able to do a proper
- release build. The release tarballs do not have everything setup in order to
- do releases properly.
+[1]: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+[2]: http://curl.haxx.se/libcurl/c/curl_easy_init.html
+[3]: http://c-ares.haxx.se/
+[4]: https://tools.ietf.org/html/rfc7230 "RFC 7230"
+[5]: http://curl.haxx.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html
+[6]: http://curl.haxx.se/docs/manpage.html#--compressed
+[7]: http://curl.haxx.se/libcurl/c/curl_multi_socket_action.html
+[8]: http://curl.haxx.se/libcurl/c/curl_multi_timeout.html
+[9]: http://curl.haxx.se/libcurl/c/curl_multi_setopt.html
+[10]: http://curl.haxx.se/libcurl/c/CURLMOPT_TIMERFUNCTION.html
+[11]: http://curl.haxx.se/libcurl/c/curl_multi_perform.html
+[12]: http://curl.haxx.se/libcurl/c/curl_multi_fdset.html
+[13]: http://curl.haxx.se/libcurl/c/curl_multi_add_handle.html
+[14]: http://curl.haxx.se/libcurl/c/curl_multi_info_read.html
diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS
index 96478917..345dc45d 100644
--- a/docs/KNOWN_BUGS
+++ b/docs/KNOWN_BUGS
@@ -3,27 +3,86 @@ 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!
+90. IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the
+ code reveals that pingpong.c contains some truncation code, at line 408,
+ when it deems the server response to be too large truncating it to 40
+ characters"
+ http://curl.haxx.se/bug/view.cgi?id=1366
+
+89. Disabling HTTP Pipelining when there are ongoing transfers can lead to
+ heap corruption and crash. http://curl.haxx.se/bug/view.cgi?id=1411
+
+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
+ mention that decoding also means that we need to check for nastiness that is
+ attempted, like "../" sequences and the like. Probably everything to the left
+ of any embedded slashes should be cut off.
+ http://curl.haxx.se/bug/view.cgi?id=1294
+
+86. The disconnect commands (LOGOUT and QUIT) may not be sent by IMAP, POP3
+ and SMTP if a failure occurs during the authentication phase of a
+ connection.
+
+85. Wrong STARTTRANSFER timer accounting for POST requests
+ Timer works fine with GET requests, but while using POST the time for
+ CURLINFO_STARTTRANSFER_TIME is wrong. While using POST
+ CURLINFO_STARTTRANSFER_TIME minus CURLINFO_PRETRANSFER_TIME is near to zero
+ every time.
+ http://curl.haxx.se/bug/view.cgi?id=1213
+
+84. CURLINFO_SSL_VERIFYRESULT is only implemented for the OpenSSL and NSS
+ backends, so relying on this information in a generic app is flaky.
+
+82. When building with the Windows Borland compiler, it fails because the
+ "tlib" tool doesn't support hyphens (minus signs) in file names and we have
+ such in the build.
+ http://curl.haxx.se/bug/view.cgi?id=1222
+
+81. When using -J (with -O), automatically resumed downloading together with
+ "-C -" fails. Without -J the same command line works! This happens because
+ the resume logic is worked out before the target file name (and thus its
+ pre-transfer size) has been figured out!
+ http://curl.haxx.se/bug/view.cgi?id=1169
+
+80. Curl doesn't recognize certificates in DER format in keychain, but it
+ works with PEM.
+ http://curl.haxx.se/bug/view.cgi?id=1065
+
+79. SMTP. When sending data to multiple recipients, curl will abort and return
+ failure if one of the recipients indicate failure (on the "RCPT TO"
+ command). Ordinary mail programs would proceed and still send to the ones
+ that can receive data. This is subject for change in the future.
+ http://curl.haxx.se/bug/view.cgi?id=1116
+
+78. curl and libcurl don't always signal the client properly when "sending"
+ zero bytes files - it makes for example the command line client not creating
+ any file at all. Like when using FTP.
+ http://curl.haxx.se/bug/view.cgi?id=1063
+
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
option as for all other operating systems.
-75. NTLM authentication involving unicode user name or password.
+75. NTLM authentication involving unicode user name or password only works
+ properly if built with UNICODE defined together with the WinSSL/schannel
+ backend. The original problem was mentioned in:
http://curl.haxx.se/mail/lib-2009-10/0024.html
- http://curl.haxx.se/bug/view.cgi?id=2944325
+ http://curl.haxx.se/bug/view.cgi?id=896
-74. The HTTP spec allows headers to be merged and become comma-separated
- instead of being repeated several times. This also include Authenticate: and
- Proxy-Authenticate: headers and while this hardly every happens in real life
- it will confuse libcurl which does not properly support it for all headers -
- like those Authenticate headers.
+ The WinSSL/schannel version verified to work as mentioned in
+ http://curl.haxx.se/mail/lib-2012-07/0073.html
73. if a connection is made to a FTP server but the server then just never
sends the 220 response or otherwise is dead slow, libcurl will not
acknowledge the connection timeout during that phase but only the "real"
timeout - which may surprise users as it is probably considered to be the
connect phase to most people. Brought up (and is being misunderstood) in:
- http://curl.haxx.se/bug/view.cgi?id=2844077
+ http://curl.haxx.se/bug/view.cgi?id=856
72. "Pausing pipeline problems."
http://curl.haxx.se/mail/lib-2009-07/0214.html
@@ -38,10 +97,10 @@ may have been fixed since this was written!
something beyond ascii but currently libcurl will only pass in the verbatim
string the app provides. There are several browsers that already do this
encoding. The key seems to be the updated draft to RFC2231:
- http://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
+ https://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
66. When using telnet, the time limitation options don't work.
- http://curl.haxx.se/bug/view.cgi?id=2818950
+ http://curl.haxx.se/bug/view.cgi?id=846
65. When doing FTP over a socks proxy or CONNECT through HTTP proxy and the
multi interface is used, libcurl will fail if the (passive) TCP connection
@@ -67,19 +126,12 @@ may have been fixed since this was written!
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
-57. On VMS-Alpha: When using an http-file-upload the file is not sent to the
- Server with the correct content-length. Sending a file with 511 or less
- bytes, content-length 512 is used. Sending a file with 513 - 1023 bytes,
- content-length 1024 is used. Files with a length of a multiple of 512 Bytes
- show the correct content-length. Only these files work for upload.
- http://curl.haxx.se/bug/view.cgi?id=2057858
-
56. When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP
server using the multi interface, the commands are not being sent correctly
and instead the connection is "cancelled" (the operation is considered done)
prematurely. There is a half-baked (busy-looping) patch provided in the bug
report but it cannot be accepted as-is. See
- http://curl.haxx.se/bug/view.cgi?id=2006544
+ http://curl.haxx.se/bug/view.cgi?id=748
55. libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's
library header files exporting symbols/macros that should be kept private
@@ -103,12 +155,12 @@ may have been fixed since this was written!
protocol code. This should be very rare.
43. There seems to be a problem when connecting to the Microsoft telnet server.
- http://curl.haxx.se/bug/view.cgi?id=1720605
+ http://curl.haxx.se/bug/view.cgi?id=649
41. When doing an operation over FTP that requires the ACCT command (but not
when logging in), the operation will fail since libcurl doesn't detect this
and thus fails to issue the correct command:
- http://curl.haxx.se/bug/view.cgi?id=1693337
+ http://curl.haxx.se/bug/view.cgi?id=635
39. Steffen Rumler's Race Condition in Curl_proxyCONNECT:
http://curl.haxx.se/mail/lib-2007-01/0045.html
@@ -116,55 +168,28 @@ may have been fixed since this was written!
38. Kumar Swamy Bhatt's problem in ftp/ssl "LIST" operation:
http://curl.haxx.se/mail/lib-2007-01/0103.html
-37. Having more than one connection to the same host when doing NTLM
- authentication (with performs multiple "passes" and authenticates a
- connection rather than a HTTP request), and particularly when using the
- multi interface, there's a risk that libcurl will re-use a wrong connection
- when doing the different passes in the NTLM negotiation and thus fail to
- negotiate (in seemingly mysterious ways).
-
35. Both SOCKS5 and SOCKS4 proxy connections are done blocking, which is very
bad when used with the multi interface.
34. The SOCKS4 connection codes don't properly acknowledge (connect) timeouts.
Also see #12. According to bug #1556528, even the SOCKS5 connect code does
- not do it right: http://curl.haxx.se/bug/view.cgi?id=1556528,
+ not do it right: http://curl.haxx.se/bug/view.cgi?id=604
31. "curl-config --libs" will include details set in LDFLAGS when configure is
run that might be needed only for building libcurl. Further, curl-config
--cflags suffers from the same effects with CFLAGS/CPPFLAGS.
-30. You need to use -g to the command line tool in order to use RFC2732-style
- IPv6 numerical addresses in URLs.
-
-29. IPv6 URLs with zone ID is not nicely supported.
- http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt (expired)
- specifies the use of a plus sign instead of a percent when specifying zone
- IDs in URLs to get around the problem of percent signs being
- special. According to the reporter, Firefox deals with the URL _with_ a
- percent letter (which seems like a blatant URL spec violation).
- libcurl supports zone IDs where the percent sign is URL-escaped (i.e. %25).
-
- See http://curl.haxx.se/bug/view.cgi?id=1371118
-
26. NTLM authentication using SSPI (on Windows) when (lib)curl is running in
"system context" will make it use wrong(?) user name - at least when compared
- to what winhttp does. See http://curl.haxx.se/bug/view.cgi?id=1281867
+ to what winhttp does. See http://curl.haxx.se/bug/view.cgi?id=535
23. SOCKS-related problems:
- A) libcurl doesn't support SOCKS for IPv6.
B) libcurl doesn't support FTPS over a SOCKS proxy.
E) libcurl doesn't support active FTP over a SOCKS proxy
We probably have even more bugs and lack of features when a SOCKS proxy is
used.
-22. Sending files to a FTP server using curl on VMS, might lead to curl
- complaining on "unaligned file size" on completion. The problem is related
- to VMS file structures and the perceived file sizes stat() returns. A
- possible fix would involve sending a "STRU VMS" command.
- http://curl.haxx.se/bug/view.cgi?id=1156287
-
21. FTP ASCII transfers do not follow RFC959. They don't convert the data
accordingly (not for sending nor for receiving). RFC 959 section 3.1.1.1
clearly describes how this should be done:
@@ -184,7 +209,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 <string>,
- 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
@@ -199,10 +224,10 @@ may have been fixed since this was written!
acknowledged after the actual TCP connect (during the SOCKS "negotiate"
phase).
-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=1004841. How?
+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.
+ http://curl.haxx.se/bug/view.cgi?id=440 How?
http://curl.haxx.se/mail/lib-2004-08/0182.html
8. Doing resumed upload over HTTP does not work with '-C -', because curl
diff --git a/docs/LICENSE-MIXING b/docs/LICENSE-MIXING
index 3db1a3d7..ccb6ada3 100644
--- a/docs/LICENSE-MIXING
+++ b/docs/LICENSE-MIXING
@@ -21,33 +21,31 @@ 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. 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!
+ possible.
-OpenSSL http://www.openssl.org/source/license.html
+OpenSSL https://www.openssl.org/source/license.html
(May be used for SSL/TLS support) Uses an Original BSD-style license
with an announcement clause that makes it "incompatible" with GPL. You
are not allowed to ship binaries that link with OpenSSL that includes
GPL code (unless that specific GPL code includes an exception for
OpenSSL - a habit that is growing more and more common). If OpenSSL's
- licensing is a problem for you, consider using GnuTLS or yassl
- instead.
+ licensing is a problem for you, consider using another TLS library.
GnuTLS http://www.gnutls.org/
(May be used for SSL/TLS support) Uses the LGPL[3] license. If this is
- a problem for you, consider using OpenSSL instead. Also note that
+ a problem for you, consider using another TLS library. Also note that
GnuTLS itself depends on and uses other libs (libgcrypt and
libgpg-error) and they too are LGPL- or GPL-licensed.
-yassl http://www.yassl.com/
+WolfSSL https://www.wolfssl.com/
- (May be used for SSL/TLS support) Uses the GPL[1] license. If this is
- a problem for you, consider using OpenSSL or GnuTLS instead.
+ (May be used for SSL/TLS support) Uses the GPL[1] license or a
+ propietary license. If this is a problem for you, consider using
+ another TLS library.
-NSS http://www.mozilla.org/projects/security/pki/nss/
+NSS https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
(May be used for SSL/TLS support) Is covered by the MPL[4] license,
the GPL[1] license and the LGPL[3] license. You may choose to license
@@ -55,47 +53,53 @@ NSS http://www.mozilla.org/projects/security/pki/nss/
grant you different permissions and impose different obligations. You
should select the license that best meets your needs.
+axTLS http://axtls.sourceforge.net/
+
+ (May be used for SSL/TLS support) Uses a Modified BSD-style license.
+
+mbedTLS https://tls.mbed.org/
+
+ (May be used for SSL/TLS support) Uses the GPL[1] license or a
+ propietary license. If this is a problem for you, consider using
+ another TLS library.
+
+BoringSSL https://boringssl.googlesource.com/
+
+ (May be used for SSL/TLS support) As an OpenSSL fork, it has the same
+ license as that.
+
+libressl http://www.libressl.org/
+
+ (May be used for SSL/TLS support) As an OpenSSL fork, it has the same
+ license as that.
+
c-ares http://daniel.haxx.se/projects/c-ares/license.html
(Used for asynchronous name resolves) Uses an MIT license that is very
liberal and imposes no restrictions on any other library or part you
may link with.
-zlib http://www.gzip.org/zlib/zlib_license.html
+zlib http://www.zlib.net/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
with any other parts.
-Heimdal http://www.pdc.kth.se/heimdal/
+Heimdal http://www.h5l.org
(May be used for GSS support) Heimdal is Original BSD licensed with
the announcement clause.
-GNU GSS http://www.gnu.org/software/gss/
+GNU GSS https://www.gnu.org/software/gss/
(May be used for GSS support) GNU GSS is GPL licensed. Note that you
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
@@ -117,10 +121,10 @@ libssh2 http://www.libssh2.org/
(Used for scp and sftp support) libssh2 uses a Modified BSD-style
license.
-[1] = GPL - GNU General Public License: http://www.gnu.org/licenses/gpl.html
-[2] = http://www.fsf.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on
+[1] = GPL - GNU General Public License: https://www.gnu.org/licenses/gpl.html
+[2] = https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on
how to write such an exception to the GPL
[3] = LGPL - GNU Lesser General Public License:
- http://www.gnu.org/licenses/lgpl.html
+ https://www.gnu.org/licenses/lgpl.html
[4] = MPL - Mozilla Public License:
- http://www.mozilla.org/MPL/
+ https://www.mozilla.org/MPL/
diff --git a/docs/MAIL-ETIQUETTE b/docs/MAIL-ETIQUETTE
new file mode 100644
index 00000000..b6c0f452
--- /dev/null
+++ b/docs/MAIL-ETIQUETTE
@@ -0,0 +1,265 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+MAIL ETIQUETTE
+
+ 1. About the lists
+ 1.1 Mailing Lists
+ 1.2 Netiquette
+ 1.3 Do Not Mail a Single Individual
+ 1.4 Subscription Required
+ 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
+ 2.2 Reply to the List
+ 2.3 Use a Sensible Subject
+ 2.4 Do Not Top-Post
+ 2.5 HTML is not for mails
+ 2.6 Quoting
+ 2.7 Digest
+ 2.8 Please Tell Us How You Solved The Problem!
+
+==============================================================================
+
+1. About the lists
+
+ 1.1 Mailing Lists
+
+ The mailing lists we have are all listed and described at
+ http://curl.haxx.se/mail/
+
+ Each mailing list is targeted to a specific set of users and subjects,
+ please use the one or the ones that suit you the most.
+
+ Each mailing list have hundreds up to thousands of readers, meaning that
+ each mail sent will be received and read by a very large amount of people.
+ People from various cultures, regions, religions and continents.
+
+ 1.2 Netiquette
+
+ Netiquette is a common name for how to behave on the internet. Of course, in
+ each particular group and subculture there will be differences in what is
+ acceptable and what is considered good manners.
+
+ This document outlines what we in the cURL project considers to be good
+ etiquette, and primarily this focus on how to behave on and how to use our
+ mailing lists.
+
+ 1.3 Do Not Mail a Single Individual
+
+ Many people send one question to one person. One person gets many mails, and
+ there is only one person who can give you a reply. The question may be
+ something that other people are also wanting to ask. These other people have
+ no way to read the reply, but to ask the one person the question. The one
+ person consequently gets overloaded with mail.
+
+ If you really want to contact an individual and perhaps pay for his or her
+ services, by all means go ahead, but if it's just another curl question,
+ take it to a suitable list instead.
+
+ 1.4 Subscription Required
+
+ All curl mailing lists require that you are subscribed to allow a mail to go
+ through to all the subscribers.
+
+ If you post without being subscribed (or from a different mail address than
+ the one you are subscribed with), your mail will simply be silently
+ discarded. You have to subscribe first, then post.
+
+ The reason for this unfortunate and strict subscription policy is of course
+ to stop spam from pestering the lists.
+
+ 1.5 Moderation of new posters
+
+ Several of the curl mailing lists automatically make all posts from new
+ subscribers require moderation. This means that after you've subscribed and
+ send your first mail to a list, that mail will not be let through to the
+ list until a mailing list administrator has verified that it is OK and
+ permits it to get posted.
+
+ Once a first post has been made that proves the sender is actually talking
+ about curl-related subjects, the moderation "flag" will be switched off and
+ future posts will go through without being moderated.
+
+ The reason for this moderation policy is that we do suffer from spammers who
+ actually subscribe and send spam to our lists.
+
+ 1.6 Handling trolls and spam
+
+ Despite our good intentions and hard work to keep spam off the lists and to
+ maintain a friendly and positive atmosphere, there will be times when spam
+ and or trolls get through.
+
+ Troll - "someone who posts inflammatory, extraneous, or off-topic messages
+ in an online community"
+
+ Spam - "use of electronic messaging systems to send unsolicited bulk
+ messages"
+
+ No matter what, we NEVER EVER respond to trolls or spammers on the list. If
+ you believe the list admin should do something particular, contact him/her
+ off-list. The subject will be taken care of as good as possible to prevent
+ repeated offenses, but responding on the list to such messages never lead to
+ anything good and only puts the light even more on the offender: which was
+ the entire purpose of it getting to the list in the first place.
+
+ Don't feed the trolls!
+
+ 1.7 How to unsubscribe
+
+ You unsubscribe the same way you subscribed in the first place. You go to
+ the page for the particular mailing list you're subscribed to and you enter
+ your email address and password and press the unsubscribe button.
+
+ Also, this information is included in the headers of every mail that is sent
+ out to all curl related mailing lists and there's footer in each mail that
+ links to the "admin" page on which you can unsubscribe and change other
+ options.
+
+ You NEVER EVER email the mailing list requesting someone else to 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
+
+ 2.1 Reply or New Mail
+
+ Please do not reply to an existing message as a short-cut to post a message
+ to the lists.
+
+ Many mail programs and web archivers use information within mails to keep
+ them together as "threads", as collections of posts that discuss a certain
+ subject. If you don't intend to reply on the same or similar subject, don't
+ just hit reply on an existing mail and change subject, create a new mail.
+
+ 2.2 Reply to the List
+
+ When replying to a message from the list, make sure that you do "group
+ reply" or "reply to all", and not just reply to the author of the single
+ mail you reply to.
+
+ We're actively discouraging replying back to the single person by setting
+ the Reply-To: field in outgoing mails back to the mailing list address,
+ making it harder for people to mail the author only by mistake.
+
+ 2.3 Use a Sensible Subject
+
+ Please use a subject of the mail that makes sense and that is related to the
+ contents of your mail. It makes it a lot easier to find your mail afterwards
+ and it makes it easier to track mail threads and topics.
+
+ 2.4 Do Not Top-Post
+
+ If you reply to a message, don't use top-posting. Top-posting is when you
+ write the new text at the top of a mail and you insert the previous quoted
+ mail conversation below. It forces users to read the mail in a backwards
+ order to properly understand it.
+
+ This is why top posting is so bad:
+
+ A: Because it messes up the order in which people normally read
+ text.
+ Q: Why is top-posting such a bad thing?
+ A: Top-posting.
+ Q: What is the most annoying thing in e-mail?
+
+ Apart from the screwed up read order (especially when mixed together in a
+ thread when someone responds using the mandated bottom-posting style), it
+ also makes it impossible to quote only parts of the original mail.
+
+ When you reply to a mail. You let the mail client insert the previous mail
+ quoted. Then you put the cursor on the first line of the mail and you move
+ down through the mail, deleting all parts of the quotes that don't add
+ context for your comments. When you want to add a comment you do so, inline,
+ right after the quotes that relate to your comment. Then you continue
+ downwards again.
+
+ When most of the quotes have been removed and you've added your own words,
+ you're done!
+
+ 2.5 HTML is not for mails
+
+ Please switch off those HTML encoded messages. You can mail all those funny
+ mails to your friends. We speak plain text mails.
+
+ 2.6 Quoting
+
+ Quote as little as possible. Just enough to provide the context you cannot
+ leave out. A lengthy description can be found here:
+
+ https://www.netmeister.org/news/learn2quote.html
+
+ 2.7 Digest
+
+ We allow subscribers to subscribe to the "digest" version of the mailing
+ lists. A digest is a collection of mails lumped together in one single mail.
+
+ Should you decide to reply to a mail sent out as a digest, there are two
+ things you MUST consider if you really really cannot subscribe normally
+ instead:
+
+ Cut off all mails and chatter that is not related to the mail you want to
+ reply to.
+
+ Change the subject name to something sensible and related to the subject,
+ preferably even the actual subject of the single mail you wanted to reply to
+
+ 2.8 Please Tell Us How You Solved The Problem!
+
+ Many people mail questions to the list, people spend some of their time and
+ make an effort in providing good answers to these questions.
+
+ If you are the one who asks, please consider responding once more in case
+ one of the hints was what solved your problems. The guys who write answers
+ feel good to know that they provided a good answer and that you fixed the
+ problem. Far too often, the person who asked the question is never heard of
+ again, and we never get to know if he/she is gone because the problem was
+ solved or perhaps because the problem was unsolvable!
+
+ Getting the solution posted also helps other users that experience the same
+ problem(s). They get to see (possibly in the web archives) that the
+ suggested fixes actually has helped at least one person.
+
diff --git a/docs/MANUAL b/docs/MANUAL
index d7085b7f..fb349485 100644
--- a/docs/MANUAL
+++ b/docs/MANUAL
@@ -19,7 +19,7 @@ SIMPLE USAGE
curl http://www.weirdserver.com:8000/
- Get a list of a directory of an FTP site:
+ Get a directory listing of an FTP site:
curl ftp://cool.haxx.se/
@@ -41,20 +41,31 @@ SIMPLE USAGE
Get a file from an SSH server using SFTP:
- curl -u username sftp://shell.example.com/etc/issue
+ curl -u username sftp://example.com/etc/issue
- Get a file from an SSH server using SCP using a private key to authenticate:
+ Get a file from an SSH server using SCP using a private key
+ (not password-protected) to authenticate:
- curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \
- scp://shell.example.com/~/personal.txt
+ 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
Get the main page from an IPv6 web server:
- curl -g "http://[2001:1890:1112:1::20]/"
+ 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:
+ Get a web page and store in a local file with a specific name:
curl -o thatpage.html http://www.netscape.com/
@@ -91,10 +102,13 @@ USING PASSWORDS
SFTP / SCP
- 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.
+ 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.
HTTP
@@ -108,14 +122,15 @@ 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. 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 (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.
- NOTE! Since HTTP URLs don't support user and password, you can't use that
- style when using Curl via a proxy. You _must_ use the -u style fetch
- during such circumstances.
+ 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
+ though curl allows it at other times. When using a proxy, you _must_ use
+ the -u style for user and password.
HTTPS
@@ -123,11 +138,17 @@ USING PASSWORDS
PROXY
- Get an ftp file using a proxy named my-proxy that uses port 888:
+ curl supports both HTTP and SOCKS proxy servers, with optional authentication.
+ It does not have special support for FTP proxy servers since there are no
+ standards for those, but it can still be made to work with many of them. You
+ can also use both HTTP and SOCKS proxies to transfer files to and from FTP
+ servers.
+
+ Get an ftp file using an HTTP proxy named my-proxy that uses port 888:
curl -x my-proxy:888 ftp://ftp.leachsite.com/README
- Get a file from a HTTP server that requires user and password, using the
+ Get a file from an HTTP server that requires user and password, using the
same proxy as above:
curl -u user:passwd -x my-proxy:888 http://www.get.this/
@@ -146,12 +167,26 @@ PROXY
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
- See also the environment variables Curl support that offer further proxy
+ See also the environment variables Curl supports that offer further proxy
control.
+ Most FTP proxy servers are set up to appear as a normal FTP server from the
+ client's perspective, with special commands to select the remote FTP server.
+ curl supports the -u, -Q and --ftp-account options that can be used to
+ set up transfers through many FTP proxies. For example, a file can be
+ uploaded to a remote FTP server using a Blue Coat FTP proxy with the
+ options:
+
+ curl -u "Remote-FTP-Username@remote.ftp.server Proxy-Username:Remote-Pass" \
+ --ftp-account Proxy-Password --upload-file local-file \
+ ftp://my-ftp.proxy.server:21/remote/upload/path/
+
+ See the manual for your FTP proxy to determine the form it expects to set up
+ transfers, and curl's -v option to see exactly what curl is sending.
+
RANGES
- With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
+ HTTP 1.1 introduced byte-ranges. Using this, a client can request
to get only one or more subparts of a specified document. Curl supports
this with the -r flag.
@@ -182,8 +217,8 @@ UPLOADING
curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile
- Upload a local file to the remote site, and use the local file name remote
- too:
+ Upload a local file to the remote site, and use the local file name at the remote
+ site too:
curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
@@ -197,16 +232,21 @@ 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:
+ Upload all data on stdin to a specified HTTP site:
curl -T - http://www.upload.com/myfile
- Note that the http server must have been configured to accept PUT before
+ Note that the HTTP server must have been configured to accept PUT before
this can be done successfully.
- For other ways to do http data upload, see the POST section below.
+ For other ways to do HTTP data upload, see the POST section below.
VERBOSE / DEBUG
@@ -269,7 +309,7 @@ POST (HTTP)
The 'variable' names are the names set with "name=" in the <input> tags, and
the data is the contents you want to fill in for the inputs. The data *must*
be properly URL encoded. That means you replace space with + and that you
- write weird letters with %XX where XX is the hexadecimal representation of
+ replace weird letters with %XX where XX is the hexadecimal representation of
the letter's ASCII code.
Example:
@@ -308,7 +348,7 @@ POST (HTTP)
If the content-type is not specified, curl will try to guess from the file
extension (it only knows a few), or use the previously specified type (from
an earlier file if several files are specified in a list) or else it will
- using the default type 'text/plain'.
+ use the default type 'application/octet-stream'.
Emulate a fill-in form with -F. Let's say you fill in three fields in a
form. One field is a file name which to post, one field is your name and one
@@ -341,8 +381,8 @@ POST (HTTP)
REFERRER
- A HTTP request has the option to include information about which address
- that referred to actual page. Curl allows you to specify the
+ An HTTP request has the option to include information about which address
+ referred it to the actual page. Curl allows you to specify the
referrer to be used on the command line. It is especially useful to
fool or trick stupid servers or CGI scripts that rely on that information
being available or contain certain data.
@@ -353,7 +393,7 @@ REFERRER
USER AGENT
- A HTTP request has the option to include information about the browser
+ An HTTP request has the option to include information about the browser
that generated the request. Curl allows it to be specified on the command
line. It is especially useful to fool or trick stupid servers or CGI
scripts that only accept certain browsers.
@@ -430,8 +470,8 @@ COOKIES
stored cookies which match the request as it follows the location. The
file "empty.txt" may be a nonexistent file.
- Alas, to both read and write cookies from a netscape cookie file, you can
- set both -b and -c to use the same file:
+ To read and write cookies from a netscape cookie file, you can set both -b
+ and -c to use the same file:
curl -b cookies.txt -c cookies.txt www.example.com
@@ -593,21 +633,21 @@ SFTP and SCP and PATH NAMES
FTP and firewalls
The FTP protocol requires one of the involved parties to open a second
- connection as soon as data is about to get transfered. There are two ways to
+ connection as soon as data is about to get transferred. There are two ways to
do this.
The default way for curl is to issue the PASV command which causes the
server to open another port and await another connection performed by the
- client. This is good if the client is behind a firewall that don't allow
+ client. This is good if the client is behind a firewall that doesn't allow
incoming connections.
curl ftp.download.com
- If the server for example, is behind a firewall that don't allow connections
- on other ports than 21 (or if it just doesn't support the PASV command), the
+ If the server, for example, is behind a firewall that doesn't allow connections
+ on ports other than 21 (or if it just doesn't support the PASV command), the
other way to do it is to use the PORT command and instruct the server to
- connect to the client on the given (as parameters to the PORT command) IP
- number and port.
+ connect to the client on the given IP number and port (as parameters to the
+ PORT command).
The -P flag to curl supports a few different options. Your machine may have
several IP-addresses and/or network interfaces and curl allows you to select
@@ -665,8 +705,8 @@ HTTPS
If you neglect to specify the password on the command line, you will be
prompted for the correct password before any data can be received.
- Many older SSL-servers have problems with SSLv3 or TLS, that newer versions
- of OpenSSL etc is using, therefore it is sometimes useful to specify what
+ Many older SSL-servers have problems with SSLv3 or TLS, which newer versions
+ of OpenSSL etc use, therefore it is sometimes useful to specify what
SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL
version to use (for SSLv3, SSLv2 or TLSv1 respectively):
@@ -675,14 +715,13 @@ HTTPS
Otherwise, curl will first attempt to use v3 and then v2.
To use OpenSSL to convert your favourite browser's certificate into a PEM
- formatted one that curl can use, do something like this (assuming netscape,
- but IE is likely to work similarly):
+ formatted one that curl can use, do something like this:
- You start with hitting the 'security' menu button in netscape.
+ In Netscape, you start with hitting the 'Security' menu button.
Select 'certificates->yours' and then pick a certificate in the list
- Press the 'export' button
+ Press the 'Export' button
enter your PIN code for the certs
@@ -693,11 +732,21 @@ HTTPS
# ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]
+ In Firefox, select Options, then Advanced, then the Encryption tab,
+ View Certificates. This opens the Certificate Manager, where you can
+ Export. Be sure to select PEM for the Save as type.
+
+ In Internet Explorer, select Internet Options, then the Content tab, then
+ Certificates. Then you can Export, and depending on the format you may
+ need to convert to PEM.
+
+ In Chrome, select Settings, then Show Advanced Settings. Under HTTPS/SSL
+ select Manage Certificates.
RESUMING FILE TRANSFERS
To continue a file transfer where it was previously aborted, curl supports
- resume on http(s) downloads as well as ftp uploads and downloads.
+ resume on HTTP(S) downloads as well as FTP uploads and downloads.
Continue downloading a document:
@@ -711,7 +760,7 @@ RESUMING FILE TRANSFERS
curl -C - -o file http://www.server.com/
- (*1) = This requires that the ftp server supports the non-standard command
+ (*1) = This requires that the FTP server supports the non-standard command
SIZE. If it doesn't, curl will say so.
(*2) = This requires that the web server supports at least HTTP/1.1. If it
@@ -720,7 +769,7 @@ RESUMING FILE TRANSFERS
TIME CONDITIONS
HTTP allows a client to specify a time condition for the document it
- requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to
+ requests. It is If-Modified-Since or If-Unmodified-Since. Curl allows you to
specify them with the -z/--time-cond flag.
For example, you can easily make a download that only gets performed if the
@@ -768,7 +817,7 @@ LDAP
and offer ldap:// support.
LDAP is a complex thing and writing an LDAP query is not an easy task. I do
- advice you to dig up the syntax description for that elsewhere. Two places
+ advise you to dig up the syntax description for that elsewhere. Two places
that might suit you are:
Netscape's "Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:
@@ -777,7 +826,7 @@ LDAP
RFC 2255, "The LDAP URL Format" http://curl.haxx.se/rfc/rfc2255.txt
- To show you an example, this is now I can get all people from my local LDAP
+ To show you an example, this is how I can get all people from my local LDAP
server that has a certain sub-domain in their email address:
curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se"
@@ -811,15 +860,15 @@ ENVIRONMENT VARIABLES
NETRC
Unix introduced the .netrc concept a long time ago. It is a way for a user
- to specify name and password for commonly visited ftp sites in a file so
+ to specify name and password for commonly visited FTP sites in a file so
that you don't have to type them in each time you visit those sites. You
realize this is a big security risk if someone else gets hold of your
passwords, so therefore most unix programs won't read this file unless it is
only readable by yourself (curl doesn't care though).
- Curl supports .netrc files if told so (using the -n/--netrc and
- --netrc-optional options). This is not restricted to only ftp,
- but curl can use it for all protocols where authentication is used.
+ Curl supports .netrc files if told to (using the -n/--netrc and
+ --netrc-optional options). This is not restricted to just FTP,
+ so curl can use it for all protocols where authentication is used.
A very simple .netrc file could look something like:
@@ -840,7 +889,7 @@ KERBEROS FTP TRANSFER
Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need
the kerberos package installed and used at curl build time for it to be
- used.
+ available.
First, get the krb-ticket the normal way, like with the kinit/kauth tool.
Then use curl in way similar to:
@@ -875,7 +924,7 @@ TELNET
- NEW_ENV=<var,val> Sets an environment variable.
- NOTE: the telnet protocol does not specify any way to login with a specified
+ NOTE: The telnet protocol does not specify any way to login with a specified
user and password so curl can't do that automatically. To do that, you need
to track when the login prompt is received and send the username and
password accordingly.
@@ -894,7 +943,7 @@ PERSISTENT CONNECTIONS
Note that curl cannot use persistent connections for transfers that are used
in subsequence curl invokes. Try to stuff as many URLs as possible on the
same command line if they are using the same host, as that'll make the
- transfers faster. If you use a http proxy for file transfers, practically
+ transfers faster. If you use an HTTP proxy for file transfers, practically
all transfers will be persistent.
MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE
@@ -926,15 +975,37 @@ IPv6
When this style is used, the -g option must be given to stop curl from
interpreting the square brackets as special globbing characters. Link local
and site local addresses including a scope identifier, such as fe80::1234%1,
- may also be used, but the scope portion must be numeric and the percent
- character must be URL escaped. The previous example in an SFTP URL might
- look like:
+ may also be used, but the scope portion must be numeric or match an existing
+ network interface on Linux and the percent character must be URL escaped. The
+ previous example in an SFTP URL might look like:
sftp://[fe80::1234%251]/
IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface
or --ftp-port options) should not be URL encoded.
+METALINK
+
+ Curl supports Metalink (both version 3 and 4 (RFC 5854) are supported), a way
+ to list multiple URIs and hashes for a file. Curl will make use of the mirrors
+ listed within for failover if there are errors (such as the file or server not
+ being available). It will also verify the hash of the file after the download
+ completes. The Metalink file itself is downloaded and processed in memory and
+ not stored in the local file system.
+
+ Example to use a remote Metalink file:
+
+ curl --metalink http://www.example.com/example.metalink
+
+ To use a Metalink file in the local file system, use FILE protocol (file://):
+
+ curl --metalink file://example.metalink
+
+ Please note that if FILE protocol is disabled, there is no way to use a local
+ Metalink file at the time of this writing. Also note that if --metalink and
+ --include are used together, --include will be ignored. This is because including
+ headers in the response will break Metalink parser and if the headers are included
+ in the file described in Metalink file, hash check will fail.
MAILING LISTS
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 316b4f4f..e3e27d33 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,11 +1,31 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = curl.1 curl-config.1
-GENHTMLPAGES = curl.html curl-config.html
-PDFPAGES = curl.pdf curl-config.pdf
+noinst_man_MANS = mk-ca-bundle.1
+GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
+PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
HTMLPAGES = $(GENHTMLPAGES) index.html
@@ -16,7 +36,9 @@ CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
- $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp
+ $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \
+ MAIL-ETIQUETTE HTTP-COOKIES SECURITY RELEASE-PROCEDURE \
+ SSL-PROBLEMS HTTP2.md ROADMAP.md
MAN2HTML= roffit < $< >$@
diff --git a/docs/Makefile.in b/docs/Makefile.in
deleted file mode 100644
index 3cc2e3b8..00000000
--- a/docs/Makefile.in
+++ /dev/null
@@ -1,649 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-#
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = docs
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in INSTALL \
- THANKS TODO
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-depcomp =
-am__depfiles_maybe =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-man1dir = $(mandir)/man1
-am__installdirs = "$(DESTDIR)$(man1dir)"
-MANS = $(man_MANS)
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = foreign no-dependencies
-man_MANS = curl.1 curl-config.1
-GENHTMLPAGES = curl.html curl-config.html
-PDFPAGES = curl.pdf curl-config.pdf
-HTMLPAGES = $(GENHTMLPAGES) index.html
-SUBDIRS = examples libcurl
-CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
-EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
- README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
- KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
- $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp
-
-MAN2HTML = roffit < $< >$@
-SUFFIXES = .1 .html .pdf
-all: all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .1 .html .pdf
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign docs/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-man1: $(man1_MANS) $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(MANS)
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(man1dir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-man
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man: install-man1
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-man
-
-uninstall-info: uninstall-info-recursive
-
-uninstall-man: uninstall-man1
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-man1 install-strip \
- installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am uninstall-info-am \
- uninstall-man uninstall-man1
-
-
-html: $(HTMLPAGES)
- cd libcurl; make html
-
-pdf: $(PDFPAGES)
- cd libcurl; make pdf
-
-.1.html:
- $(MAN2HTML)
-
-.1.pdf:
- @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
- groff -Tps -man $< >$$foo.ps; \
- ps2pdf $$foo.ps $@; \
- rm $$foo.ps; \
- echo "converted $< to $@")
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/docs/README.cmake b/docs/README.cmake
new file mode 100644
index 00000000..084c1de6
--- /dev/null
+++ b/docs/README.cmake
@@ -0,0 +1,16 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+README.cmake
+ Read the README file first.
+
+ Curl contains CMake build files that provide a way to build Curl with the
+ CMake build tool (www.cmake.org). CMake is a cross platform meta build tool
+ that generates native makefiles and IDE project files. The CMake build
+ system can be used to build Curl on any of its supported platforms.
+
+ Read the INSTALL.cmake file for instructions on how to compile curl with
+ CMake.
diff --git a/docs/README.netware b/docs/README.netware
index 41da2e8d..12065f30 100644
--- a/docs/README.netware
+++ b/docs/README.netware
@@ -10,7 +10,7 @@ README.netware
Curl has been successfully compiled with gcc / nlmconv on different flavours
of Linux as well as with the official Metrowerks CodeWarrior compiler.
- While not being the main development target, a continously growing share of
+ While not being the main development target, a continuously growing share of
curl users are NetWare-based, specially also consuming the lib from PHP.
The unix-style man pages are tricky to read on windows, so therefore are all
diff --git a/docs/RELEASE-PROCEDURE b/docs/RELEASE-PROCEDURE
new file mode 100644
index 00000000..fc31274e
--- /dev/null
+++ b/docs/RELEASE-PROCEDURE
@@ -0,0 +1,89 @@
+curl release procedure - how to do a release
+============================================
+
+in the source code repo
+-----------------------
+
+- edit `RELEASE-NOTES` to be accurate
+
+- 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 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
+ you run this on a machine with the correct set of autotools etc installed
+ as this is what then will be shipped and used by most users on *nix like
+ systems.
+
+- push the git commits and the new tag
+
+- gpg sign the 4 tarballs as maketgz suggests
+
+- upload the 8 resulting files to the primary download directory
+
+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)
+
+- commit all local changes
+
+- tag the repo with the same tag as used for the source repo
+
+- make sure all relevant changes are committed and pushed on the master branch
+
+ (the web site then updates its contents automatically)
+
+inform
+------
+
+- send an email to curl-users, curl-announce and curl-library. Insert the
+ RELEASE-NOTES into the mail.
+
+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):
+
+- June 17, 2015 (version 7.43.0)
+- August 12, 2015
+- October 7, 2015
+- December 2, 2015
+- January 27, 2016
+- March 23, 2016
+- May 18, 2016
+- July 13, 2016
+- September 7, 2016
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
new file mode 100644
index 00000000..eb52d187
--- /dev/null
+++ b/docs/ROADMAP.md
@@ -0,0 +1,139 @@
+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.
+
+HTTP/2
+------
+
+- test suite
+
+ Base this on existing nghttp2 server to start with to make functional
+ tests. Later on we can adopt that code or work with nghttp2 to provide ways
+ to have the http2 server respond with broken responses to make sure we deal
+ with that nicely as well.
+
+ To decide: if we need to bundle parts of the nghttp2 stuff that probably
+ won't be shipped by many distros.
+
+- stream properties API
+
+ Provide options for setting priorities and dependencies among the streams
+ (easy handles). They are mostly information set for the stream and sent to
+ the server so we don't have to add much logic for this.
+
+- server push
+
+ Not exactly clear exactly how to support this API-wise, but by adding
+ handles without asking for a resource it could be a way to be prepared to
+ receive pushes in case such are sent. We probably need it to still specify
+ a URL with host name, port etc but we probably need a special option to
+ tell libcurl it is for server push purposes.
+
+- provide option for HTTP/2 "prior knowledge" over clear text
+
+ As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_
+ it speaks HTTP/2.
+
+- provide option to allow curl to default to HTTP/2 only when using HTTPS
+
+ We could switch on HTTP/2 by-default for HTTPS quite easily and it
+ shouldn't hurt anyone, while HTTP/2 for HTTP by default could introduce
+ lots of Upgrade: roundtrips that users won't like. So a separated option
+ alternative makes sense.
+
+SRV records
+-----------
+
+How to find services for specific domains/hosts.
+
+HTTPS to proxy
+--------------
+
+To avoid network traffic to/from the proxy getting snooped on.
+
+curl_formadd()
+--------------
+
+make sure there's an easy handle passed in to `curl_formadd()`,
+`curl_formget()` and `curl_formfree()` by adding replacement functions and
+deprecating the old ones to allow custom mallocs and more
+
+third-party SASL
+----------------
+
+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
+
+SASL authentication in LDAP
+---------------------------
+
+...
+
+Simplify the SMTP email
+-----------------------
+
+Simplify the SMTP email interface so that programmers don't have to
+construct the body of an email that contains all the headers, alternative
+content, images and attachments - maintain raw interface so that
+programmers that want to do this can
+
+email capabilities
+------------------
+
+Allow the email protocols to return the capabilities before
+authenticating. This will allow an application to decide on the best
+authentication mechanism
+
+Win32 pthreads
+--------------
+
+Allow Windows threading model to be replaced by Win32 pthreads port
+
+dynamic buffer size
+-------------------
+
+Implement a dynamic buffer size to allow SFTP to use much larger buffers and
+possibly allow the size to be customizable by applications. Use less memory
+when handles are not in use?
+
+New stuff - curl
+----------------
+
+1. Embed a language interpreter (lua?). For that middle ground where curl
+ isn’t enough and a libcurl binding feels “too muchâ€. Build-time conditional
+ of course.
+
+2. Simplify the SMTP command line so that the headers and multi-part content
+ don't have to be constructed before calling curl
+
+Improve
+-------
+
+1. build for windows (considered hard by many users)
+
+2. curl -h output (considered overwhelming to users)
+
+3. we have > 160 command line options, is there a way to redo things to
+ simplify or improve the situation as we are likely to keep adding
+ features/options in the future too
+
+4. docs (considered "bad" by users but how do we make it better?)
+
+ - split up curl.1
+
+5. authentication framework (consider merging HTTP and SASL authentication to
+ give one API for protocols to call)
+
+6. Perform some of the clean up from the TODO document, removing old
+ definitions and such like that are currently earmarked to be removed years
+ ago
+
+Remove
+------
+
+1. makefile.vc files as there is no point in maintaining two sets of Windows
+ makefiles. Note: These are currently being used by the Windows autobuilds
diff --git a/docs/SECURITY b/docs/SECURITY
new file mode 100644
index 00000000..ee844d80
--- /dev/null
+++ b/docs/SECURITY
@@ -0,0 +1,107 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+curl security for developers
+============================
+
+This document is intended to provide guidance to curl developers on how
+security vulnerabilities should be handled.
+
+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).
+
+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
+----------------------
+
+The typical process for handling a new security vulnerability is as follows.
+
+No information should be made public about a vulnerability until it is
+formally announced at the end of this process. That means, for example that a
+bug tracker entry must NOT be created to track the issue since that will make
+the issue public and it should not be discussed on any of the project's public
+mailing lists. Also messages associated with any commits should not make
+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
+ handful of selected and trusted people.
+
+- Messages that do not relate to the reporting or managing of an undisclosed
+ security vulnerability in curl or libcurl are ignored and no further action
+ is required.
+
+- A person in the security team sends an e-mail to the original reporter to
+ acknowledge the report.
+
+- The security team investigates the report and either rejects it or accepts
+ it.
+
+- If the report is rejected, the team writes to the reporter to explain why.
+
+- If the report is accepted, the team writes to the reporter to let him/her
+ know it is accepted and that they are working on a fix.
+
+- The security team discusses the problem, works out a fix, considers the
+ impact of the problem and suggests a release schedule. This discussion
+ should involve the reporter as much as possible.
+
+- The release of the information should be "as soon as possible" and is most
+ often synced with an upcoming release that contains the fix. If the
+ reporter, or anyone else, thinks the next planned release is too far away
+ then a separate earlier release for security reasons should be considered.
+
+- Write a security advisory draft about the problem that explains what the
+ problem is, its impact, which versions it affects, solutions or
+ 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
+ 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.
+
+- Update the "security advisory" with the CVE number.
+
+- The security team commits the fix in a private branch. The commit message
+ should ideally contain the CVE number. This fix is usually also distributed
+ to the 'distros' mailing list to allow them to use the fix prior to the
+ public announcement.
+
+- At the day of the next release, the private branch is merged into the master
+ branch and pushed. Once pushed, the information is accessible to the public
+ and the actual release should follow suit immediately afterwards.
+
+- The project team creates a release that includes the fix.
+
+- The project team announces the release and the vulnerability to the world in
+ the same manner we always announce releases. It gets sent to the
+ curl-announce, curl-library and curl-users mailing lists.
+
+- The security web page on the web site should get the new vulnerability
+ 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/SSL-PROBLEMS b/docs/SSL-PROBLEMS
new file mode 100644
index 00000000..36502672
--- /dev/null
+++ b/docs/SSL-PROBLEMS
@@ -0,0 +1,67 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+SSL problems
+
+ First, let's establish that we often refer to TLS and SSL interchangeably as
+ SSL here. The current protocol is called TLS, it was called SSL a long time
+ ago.
+
+ There are several known reasons why a connection that involves SSL might
+ fail. This is a document that attempts to details the most common ones and
+ how to mitigate them.
+
+CA certs
+
+ CA certs are used to digitally verify the server's certificate. You need a
+ "ca bundle" for this. See lots of more details on this in the SSLCERTS
+ document.
+
+CA bundle missing intermediate certificates
+
+ When using said CA bundle to verify a server cert, you will experience
+ problems if your CA cert does not have the certificates for the
+ intermediates in the whole trust chain.
+
+SSL version
+
+ Some broken servers fail to support the protocol negotiation properly that
+ SSL servers are supposed to handle. This may cause the connection to fail
+ completely. Sometimes you may need to explicitly select a SSL version to use
+ when connecting to make the connection succeed.
+
+ An additional complication can be that modern SSL libraries sometimes are
+ built with support for older SSL and TLS versions disabled!
+
+SSL ciphers
+
+ Clients give servers a list of ciphers to select from. If the list doesn't
+ include any ciphers the server wants/can use, the connection handshake
+ fails.
+
+ curl has recently disabled the user of a whole bunch of seriously insecure
+ ciphers from its default set (slightly depending on SSL backend in use).
+
+ You may have to explicitly provide an alternative list of ciphers for curl
+ to use to allow the server to use a WEAK cipher for you.
+
+ Note that these weak ciphers are identified as flawed. For example, this
+ includes symmetric ciphers with less than 128 bit keys and RC4.
+
+ References:
+
+ https://tools.ietf.org/html/draft-popov-tls-prohibiting-rc4-01
+
+Allow BEAST
+
+ BEAST is the name of a TLS 1.0 attack that surfaced 2011. When adding means
+ to mitigate this attack, it turned out that some broken servers out there in
+ the wild didn't work properly with the BEAST mitigation in place.
+
+ To make such broken servers work, the --ssl-allow-beast option was
+ introduced. Exactly as it sounds, it re-introduces the BEAST vulnerability
+ but on the other hand it allows curl to connect to that kind of strange
+ servers.
diff --git a/docs/SSLCERTS b/docs/SSLCERTS
index 0d1414ce..89e5bb62 100644
--- a/docs/SSLCERTS
+++ b/docs/SSLCERTS
@@ -1,17 +1,46 @@
- Peer SSL Certificate Verification
- =================================
+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
+------------------------
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 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 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 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
@@ -20,13 +49,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]
@@ -40,32 +69,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:
- o View the certificate by double-clicking the padlock
- o Find out where the CA certificate is kept (Certificate>
+ - View the certificate by double-clicking the padlock
+ - Find out where the CA certificate is kept (Certificate>
Authority Information Access>URL)
- o Get a copy of the crt file using curl
- o Convert it from crt to PEM using the openssl tool:
+ - Get a copy of the crt file using curl
+ - Convert it from crt to PEM using the openssl tool:
openssl x509 -inform DES -in yourdownloaded.crt \
-out outcert.pem -text
- o Append the 'outcert.pem' to the CA cert bundle or use it stand-alone
+ - 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:
- 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"
+ - `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"
markers.
- o If you want to see the data in the certificate, you can do: "openssl
+ - 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.
- 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
+ - 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
@@ -80,9 +109,7 @@ 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:
-
- http://curl.haxx.se/docs/caextract.html
+ way for you: [CA Extract](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
@@ -90,27 +117,37 @@ 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.
- Peer SSL Certificate Verification with NSS
- ==========================================
-
-If libcurl is build 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. With OpenSuSE this lib is missing, and NSS
-can only work with its own internal formats. Also NSS got 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 add automatically the 'sql:' prefix to the certdb directory (either the
-hardcoded default /etc/pki/nssdb or the directory configured with SSL_DIR
-environment variable) if a 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
-
-
+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
+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)
+or Keychain Access application (under OS X). Any custom security rules for
+certificates will be honored.
+
+Schannel will run CRL checks on certificates unless peer verification is
+disabled. Secure Transport on iOS will run OCSP checks on certificates unless
+peer verification is disabled. Secure Transport on OS X will run either OCSP
+or CRL checks on certificates if those features are enabled, and this behavior
+can be adjusted in the preferences of Keychain Access.
diff --git a/docs/THANKS b/docs/THANKS
index a85f488b..89a738dd 100644
--- a/docs/THANKS
+++ b/docs/THANKS
@@ -4,134 +4,224 @@
If you have contributed but are missing here, please let us know!
+Aaro Koskinen
Aaron Oneal
+Aaron Orenstein
+Abram Pousada
Adam D. Moss
Adam Light
Adam Piggott
+Adam Sampson
+Adam Tkac
Adrian Schuur
+Adriano Meirelles
+Ajit Dhumale
+Aki Koskinen
Akos Pasztory
Alan Pinstein
Albert Chin-A-Young
Albert Choy
Ale Vesely
+Alejandro Alvarez Ayllon
Aleksandar Milivojevic
+Aleksey Tulinov
+Alessandro Ghedini
Alessandro Vesely
Alex Bligh
Alex Fishman
+Alex Gruz
+Alex McLellan
Alex Neblett
Alex Suykov
+Alex Vinnik
Alex aka WindEagle
Alexander Beedie
+Alexander Dyagilev
+Alexander Elgert
+Alexander Klauer
Alexander Kourakos
Alexander Krasnostavsky
Alexander Lazic
+Alexander Pepper
+Alexander Peslyak
Alexander Zhuravlev
Alexey Borzov
Alexey Pesternikov
Alexey Simak
+Alexey Zakhlestin
Alexis Carvalho
+Alfred Gebert
Allen Pulsifer
+Alona Rossen
Amol Pattekar
+Amr Shahin
Anatoli Tubman
+Anders Bakken
Anders Gustafsson
+Anders Havn
Andi Jahja
Andre Guibert de Bruet
+Andre Heinecke
Andreas Damm
Andreas Faerber
Andreas Farber
+Andreas Malzahn
Andreas Ntaflos
Andreas Olsson
Andreas Rieke
Andreas Schuldei
Andreas Wurf
Andrei Benea
-Andres Garcia
+Andrei Cipu
+Andrei Kurushin
+Andrej E Baranov
Andrew Benham
Andrew Biggs
Andrew Bushnell
Andrew Francis
Andrew Fuller
+Andrew Kurushin
Andrew Moise
Andrew Wansink
Andrew de los Reyes
-Andrés García
+Andrey Labunets
+Andrii Moiseiev
+Andrés García
Andy Cedilnik
Andy Serpa
Andy Tsouladze
Angus Mackay
+Anthon Pang
+Anthony Avina
Anthony Bryan
+Anthony G. Basile
Antoine Calando
+Anton Bychkov
Anton Kalmykov
+Anton Malov
+Anton Yabchinskiy
Arkadiusz Miskiewicz
Armel Asselin
+Arnaud Compan
Arnaud Ebalard
+Arthur Murray
Arve Knudsen
+Arvid Norberg
+Ashish Shukla
+Ask Bjørn Hansen
+Askar Safin
Ates Goral
Augustus Saunders
Avery Fay
Axel Tillequin
+Balaji Parasuram
+Balaji Salunke
Balint Szilakszi
+Barry Abrahamson
Bart Whiteley
Bas Mevissen
+Ben Boeckel
Ben Darnell
Ben Greear
Ben Madsen
+Ben Noordhuis
Ben Van Hof
+Ben Winslow
Benbuck Nason
Benjamin Gerard
+Benjamin Gilbert
+Benjamin Johnson
+Benoit Neil
+Benoit Sigoure
Bernard Leak
+Bernhard Reutner-Fischer
+Bert Huijben
Bertrand Demiddelaer
+Bill Doyle
Bill Egert
Bill Hoffman
+Bill Middlecamp
+Bill Nagel
+Bjoern Sikora
Bjorn Augustsson
Bjorn Reese
-Björn Stenberg
+Björn Stenberg
+Blaise Potard
+Bob Relyea
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
Brian Akins
+Brian Chrisman
Brian Dessent
Brian J. Murrell
+Brian Prodoehl
Brian R Duffy
Brian Ulm
Brock Noland
Bruce Mitchener
+Bruno Thomsen
+Bruno de Carvalho
Bryan Henderson
Bryan Kemp
+Byrial Jensen
+Cameron Kaiser
Camille Moncelier
Caolan McNamara
+Carlo Wood
Carsten Lange
Casey O'Donnell
+Catalin Patulea
Chad Monroe
+Chandrakant Bagul
Charles Kerr
+Charles Romestant
+Chen Prog
Chih-Chung Chang
Chris "Bob Bob"
+Chris Araman
Chris Combes
-Chris Conroy
+Chris Conlon
Chris Deidun
Chris Flerackers
Chris Gaukroger
Chris Maltby
Chris Mumford
+Chris Smowton
+Chris Young
+Christian Grothoff
+Christian Hägele
Christian Krause
Christian Kurz
Christian Robottom Reis
Christian Schmitz
Christian Vogt
+Christian Weisgerber
Christophe Demory
Christophe Legry
Christopher Conroy
Christopher Palow
Christopher R. Palmer
+Christopher Stone
Ciprian Badescu
Claes Jakobsson
Clarence Gardner
+Clemens Gruber
Clifford Wolf
Cody Jones
+Cody Mack
+Colby Ranger
+Colin Blair
Colin Hogben
Colin Watson
Colm Buckley
@@ -141,12 +231,20 @@ Craig A West
Craig Davison
Craig Markwardt
Cris Bailiff
+Cristian Rodríguez
Curt Bogmine
Cyrill Osterwalder
+Cédric Deltheil
+D. Flinkmann
+Da-Yoon Chung
+Dag Ekengren
+Dagobert Michelsen
+Damian Dixon
Damien Adant
Dan Becker
Dan C
Dan Fandrich
+Dan Locks
Dan Nelson
Dan Petitt
Dan Torop
@@ -154,19 +252,25 @@ Dan Zitter
Daniel Black
Daniel Cater
Daniel Egger
-Daniel Fandrich
Daniel Johnson
+Daniel Melani
+Daniel Mentz
Daniel Steinberg
Daniel Stenberg
+Daniel Theron
Daniel at touchtunes
Darryl House
+Darshan Mody
Dave Dribin
Dave Halbakken
Dave Hamilton
Dave May
+Dave Reisner
+Dave Thompson
Dave Vasilevsky
David Bau
David Binderman
+David Blaikie
David Byron
David Cohen
David Eriksson
@@ -179,31 +283,47 @@ David Kimdon
David Lang
David LeBlanc
David McCreedy
+David Meyer
David Odin
David Phillips
David Rosenstrauch
+David Ryskalczyk
David Shaw
+David Strauss
David Tarendash
David Thiel
+David Walser
+David Woodhouse
David Wright
David Yan
Dengminwen
+Dennis Clarke
+Derek Higgins
Detlef Schmier
Didier Brisebourg
Diego Casorran
+Dilyan Palauzov
Dima Barsky
+Dima Tisnek
+Dimitar Boevski
+Dimitre Dimitrov
+Dimitrios Siganos
Dimitris Sarris
Dinar
Dirk Eddelbuettel
Dirk Manske
+Dmitri Shubin
Dmitriy Sergeyev
Dmitry Bartsevich
+Dmitry Eremin-Solenikov
+Dmitry Falko
Dmitry Kurochkin
Dmitry Popov
Dmitry Rechkin
Dolbneff A.V
Domenico Andreoli
Dominick Meglio
+Dominique Leuenberger
Doug Kaufman
Doug Porter
Douglas E. Wegscheid
@@ -211,6 +331,7 @@ Douglas Kilpatrick
Douglas R. Horner
Douglas Steinwand
Dov Murik
+Drake Arconis
Duane Cathey
Duncan Mac-Vicar Prett
Dustin Boswell
@@ -218,60 +339,91 @@ Dylan Ellicott
Dylan Salisbury
Early Ehlinger
Ebenezer Ikonne
+Ed Morley
Edin Kadribasic
Eduard Bloch
+Edward Rudd
+Edward Sheldrake
+Eelco Dolstra
Eetu Ojanen
+Egon Eckert
+Eldar Zaitov
Ellis Pritchard
+Elmira A Semenova
Emanuele Bovisio
+Emil Lerner
Emil Romanus
Emiliano Ida
Enrico Scholz
Enrik Berkhan
Eric Cooper
+Eric Hu
Eric Landes
Eric Lavigne
+Eric Lubin
Eric Melville
Eric Mertens
Eric Rautman
+Eric S. Raymond
Eric Thelin
Eric Vergnaud
Eric Wong
Eric Young
Erick Nuwendam
+Erik Johansson
+Ernest Beinrohr
Erwan Legrand
Erwin Authried
+Ethan Glasser Camp
Eugene Kotlyarov
Evan Jordan
+Evgeny Turnaev
Eygene Ryabinkin
+Fabian Frank
+Fabian Hiernaux
Fabian Keil
Fabrizio Ammollo
Fedor Karpelevitch
+Felix Yan
Felix von Leitner
Feng Tu
Florian Schoppmann
+Florian Weimer
Forrest Cahoon
+Frank Gevaerts
Frank Hempel
Frank Keeney
Frank McGeough
Frank Meier
Frank Ticheler
+Frank Van Uffelen
+FrantiÅ¡ek KuÄera
+François Charlier
Fred Machado
Fred New
Fred Noz
+Fred Stluka
Frederic Lepied
+Fredrik Thulin
Gabriel Kuri
+Gabriel Sjoberg
+Garrett Holmstrom
Gary Maxwell
Gautam Kachroo
Gautam Mani
Gavrie Philipson
Gaz Iqbal
+Gaël Portay
+Geoff Beier
Georg Horn
Georg Huettenegger
Georg Lippitsch
Georg Wicherski
Gerd v. Egidy
+Gergely Nagy
Gerhard Herre
-Gerrit Bruchhäuser
+Gerrit Bruchhäuser
+Ghennadi Procopciuc
Giancarlo Formicuccia
Giaslas Georgios
Gil Weber
@@ -281,34 +433,57 @@ Gilles Blanc
Gisle Vanem
Giuseppe Attardi
Giuseppe D'Ambrosio
+Glen A Johnson Jr.
Glen Nakamura
Glen Scott
+Glenn Sheridan
+Gordon Marler
+Gorilla Maguila
Grant Erickson
+Grant Pannell
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ötz Babin-Ebell
+Gökhan Şengün
+Götz Babin-Ebell
Hamish Mackenzie
Hang Kin Lau
+Hang Su
+Hanno Böck
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
+Herve Amblard
Hidemoto Nakada
+Ho-chi Chen
Hoi-Ho Chan
+Hongli Lai
Howard Chu
+Hubert Kario
Hzhijun
+Ian D Allen
Ian Ford
Ian Gulliver
Ian Lynagh
@@ -318,21 +493,27 @@ Ignacio Vazquez-Abrams
Igor Franchuk
Igor Novoseltsev
Igor Polyakov
+Iida Yosiaki
Ilguiz Latypov
Ilja van Sprundel
Immanuel Gregoire
Ingmar Runge
Ingo Ralf Blum
Ingo Wilken
+Isaac Boukris
+Ishan SinghLevett
+Ivo Bellin Salarin
Jack Zhang
Jacky Lam
Jacob Meuser
Jacob Moshenko
Jad Chamcham
+Jakub Zakrzewski
James Bursa
James Cheng
James Clancy
James Cone
+James Dury
James Gallagher
James Griffiths
James Housley
@@ -340,81 +521,139 @@ James MacMillan
Jamie Lokier
Jamie Newton
Jamie Wilkinson
+Jan Ehrhardt
+Jan Koen Annot
Jan Kunder
+Jan Schaumann
Jan Van Boghout
+Jared Jennings
Jared Lundell
+Jari Aalto
Jari Sundell
+Jason Glasgow
+Jason Liu
Jason McDonald
Jason S. Priebe
+Javier Barroso
Jay Austin
Jayesh A Shah
Jaz Fresh
Jean Jacques Drouin
Jean-Claude Chauve
Jean-Francois Bertrand
+Jean-Francois Durand
Jean-Louis Lemaire
Jean-Marc Ranger
+Jean-Noël Rouvignac
Jean-Philippe Barrette-LaPierre
+Jeff Connelly
+Jeff Hodges
Jeff Johnson
+Jeff King
Jeff Lawson
Jeff Phillips
Jeff Pohlmeyer
Jeff Weber
-Jeffrey Pohlmeyer
+Jens Rantil
Jeremy Friesner
+Jeremy Huddleston
+Jeremy Lin
+Jeroen Koekkoek
+Jeroen Ooms
Jerome Muffat-Meridol
+Jerome Robert
Jerome Vouillon
+Jerry Krinock
+Jerry Wu
Jes Badwal
Jesper Jensen
Jesse Noller
+Jie He
Jim Drash
Jim Freeman
+Jim Hollinger
Jim Meyering
+Jiri Dvorak
+Jiri Hruska
+Jiri Jaburek
+Jiri Malak
Jocelyn Jaubert
Joe Halpin
Joe Malicki
+Joe Mason
Joel Chen
+Joel Depooter
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
John E. Malmberg
+John Gardiner Myers
John Janssen
+John Joseph Bachir
John Kelly
John Lask
John Lightsey
+John Marino
+John Marshall
John McGowan
John P. McCaskey
+John Suprock
John Wilkinson
John-Mark Bell
Johnny Luong
Jon Grubbs
Jon Nelson
Jon Sargeant
+Jon Seymour
+Jon Spencer
+Jon Torrey
Jon Travis
Jon Turner
Jonas Forsman
+Jonas Schnelli
Jonatan Lander
+Jonatan Vela
+Jonathan Cardoso Machado
+Jonathan Cardoso Machado Machado
Jonathan Hseu
+Jonathan Nieder
Jongki Suwandi
+Jose Alf
Jose Kahan
Josef Wolf
Josh Kapell
Joshua Kwan
+Josue Andrade Gomes
+Juan Barreto
Juan F. Codagnone
-Juan Ignacio Hervás
+Juan Ignacio Hervás
Judson Bishop
Juergen Wilke
Jukka Pihl
Julian Noble
+Julian Ospald
+Julian Taylor
Julien Chaffraix
+Julien Nabet
+Julien Royer
Jun-ichiro itojun Hagino
Jurij Smakov
Justin Fletcher
-Jörg Mueller-Tolk
-Jörn Hartroth
+Justin Karneges
+Justin Maggard
+Jörg Mueller-Tolk
+Jörn Hartroth
+K. R. Walker
+Kai Engert
Kai Sommerfeld
Kai-Uwe Rommel
Kalle Vahlman
@@ -439,62 +678,104 @@ Kevin Lussier
Kevin Reed
Kevin Roth
Kim Rinnewitz
+Kim Vandry
Kimmo Kinnunen
Kjell Ericson
Kjetil Jacobsen
Klevtsov Vadim
+Konstantin Isakov
Kris Kennaway
Krishnendu Majumdar
Krister Johansen
Kristian Gunstone
-Kristian Köhntopp
+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
+Lars Johannesen
Lars Nilsson
Lars Torben Wilson
Lau Hang Kin
Laurent Rabret
Legoff Vincent
Lehel Bernadt
+Leif W
+Leith Bade
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
+Liviu Chircu
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
+Maks Naumov
+Mamoru Tasaka
+Mandy Wu
Manfred Schwarb
+Manuel Massing
Marc Boucher
+Marc Deslauriers
+Marc Doughty
+Marc Hesse
+Marc Hoersken
Marc Kleine-Budde
+Marc Renault
+Marcel Raad
+Marcel Roelofs
Marcelo Juchem
+Marcin Adamski
+Marcin Gryszkalis
Marcin Konicki
Marco G. Salvagno
Marco Maggi
+Marcus Sundberg
Marcus Webster
Mario Schroeder
+Mark Brand
Mark Butler
Mark Davies
Mark Eichin
Mark Incley
Mark Karpeles
Mark Lentczner
+Mark Salisbury
+Mark Snelling
+Mark Tully
Markus Duft
+Markus Elfring
Markus Koetter
Markus Moeller
Markus Oberhumer
@@ -503,6 +784,8 @@ Martin C. Martin
Martin Drasar
Martin Hager
Martin Hedenfalk
+Martin Jansen
+Martin Lemke
Martin Skinner
Martin Storsjo
Marty Kuhrt
@@ -512,101 +795,163 @@ Massimo Callegari
Mateusz Loskot
Mathias Axelsson
Mats Lidell
+Matt Arsenault
+Matt Ford
Matt Kraai
Matt Veenstra
Matt Witherspoon
Matt Wixson
+Matteo Rocco
Matthew Blain
Matthew Clarke
+Matthew Hall
+Matthias Bolte
Maurice Barnum
+Mauro Iorio
Max Katsev
Maxim Ivanov
Maxim Perenesenko
+Maxim Prohorov
+Maxime Larocque
+Mehmet Bozkurt
Mekonikum
+Melissa Mears
Mettgut Jamalla
Michael Benedict
Michael Calmer
Michael Cronenworth
Michael Curtis
+Michael Day
Michael Goffioul
Michael Jahn
Michael Jerris
+Michael Kaufmann
Michael Mealling
+Michael Mueller
+Michael Osipov
Michael Smith
+Michael Stapelberg
Michael Stillwell
Michael Wallner
Michal Bonino
Michal Marek
+Michał Górny
+Michał Kowalczyk
+Michel Promonet
Michele Bini
+Miguel Angel
+Miguel Diaz
Mihai Ionescu
Mikael Johansson
Mikael Sennerholm
Mike Bytnar
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
+Mostyn Bramley-Moore
+Myk Taylor
+Nach M. S.
+Nagai H
Nathan Coulter
Nathan O'Sullivan
Nathanael Nerode
+Naveen Chandran
Naveen Noel
+Neil Bowers
Neil Dunbar
Neil Spring
Nic Roets
+Nicholas Maniscalco
Nick Gimbrone
Nick Humfrey
Nick Zitzmann
Nico Baggus
Nicolas Berloquin
Nicolas Croiset
-Nicolas François
+Nicolas François
Niels van Tongeren
Nikita Schmidt
Nikitinskit Dmitriy
Niklas Angebrand
Nikolai Kondrashov
+Nikos Mavrogiannopoulos
+Ning Dong
Nir Soffer
Nis Jorgensen
+Nobuhiro Ban
Nodak Sodak
Norbert Frese
Norbert Novotny
Ofer
-Olaf Stueben
-Olaf Stüben
+Ola Mork
+Olaf Flebbe
+Olaf Stüben
+Oliver Gondža
+Oliver Kuckertz
+Oliver Schindler
+Olivier Berger
+Oren Souroujon
Oren Tirosh
+Orgad Shaneh
+Ori Avtalion
+Oscar Koeroo
+Oscar Norlander
P R Schaffner
+Paolo Piacentini
+Paras Sethia
Pascal Terjan
+Pasha Kuznetsov
+Pasi Karkkainen
Pat Ray
+Patrice Guerin
+Patricia Muscalu
Patrick Bihan-Faou
+Patrick McManus
Patrick Monnerat
+Patrick Rapin
Patrick Scott
Patrick Smith
+Patrick Watson
Patrik Thunstrom
+Pau Garcia i Quiles
+Paul Donohue
Paul Harrington
Paul Howarth
+Paul Marks
Paul Marquis
Paul Moore
Paul Nolan
+Paul Oliver
Paul Querna
+Paul Saab
Pavel Cenek
Pavel Orehov
Pavel Raiskup
Pawel A. Gajda
Pawel Kierski
+Pedro Larroy
Pedro Neves
-Pete Su
Peter Bray
Peter Forret
+Peter Gal
Peter Heuchert
+Peter Hjalmarsson
Peter Korsgaard
Peter Lamberg
+Peter Laser
Peter O'Gorman
Peter Pentchev
Peter Silva
@@ -614,12 +959,18 @@ Peter Su
Peter Sylvester
Peter Todd
Peter Verhas
+Peter Wang
+Peter Wu
Peter Wullinger
Peteris Krumins
+Petr Bahula
+Petr Novak
+Petr Pisar
Phil Blundell
Phil Karn
Phil Lisiecki
Phil Pellouchoud
+Philip Craig
Philip Gladstone
Philip Langdale
Philippe Hameau
@@ -627,15 +978,26 @@ Philippe Raoult
Philippe Vaucher
Pierre
Pierre Brico
+Pierre Chapuis
Pierre Joye
+Pierre Ynard
Pooyan McSporran
Pramod Sharma
+Prash Dush
+Priyanka Shah
Puneet Pawaia
Quagmire
+Quanah Gibson-Mount
+Quinn Slack
+Radu Simionescu
Rafa Muyo
Rafael Sagula
+Rafayel Mkrtchyan
+Rafaël Carré
Rainer Canavan
+Rainer Jung
Rainer Koenig
+Rajesh Naganathan
Ralf S. Engelschall
Ralph Beckmann
Ralph Mitchell
@@ -644,14 +1006,19 @@ Randy McMurchy
Ravi Pratap
Ray Dassen
Ray Pekowski
+Ray Satiro
Reinout van Schouwen
+Remi Gacogne
Renato Botelho
Renaud Chaillat
Renaud Duhaut
+Renaud Guillard
Rene Bernhardt
Rene Rebe
Reuven Wachtfogel
+Reza Arbab
Ricardo Cadime
+Rich Burridge
Rich Gray
Rich Rauenzahn
Richard Archer
@@ -660,56 +1027,87 @@ Richard Bramante
Richard Clayton
Richard Cooper
Richard Gorton
+Richard Michael
+Richard Moore
Richard Prescott
+Richard Silverman
Rick Jones
Rick Richardson
Rob Crittenden
+Rob Davies
Rob Jones
Rob Stanzel
+Rob Ward
Robert A. Monat
+Robert B. Harris
Robert D. Young
Robert Foreman
Robert Iakobashvili
Robert Olson
+Robert Schumann
Robert Weaver
+Robert Wruck
Robin Cornelius
Robin Johnson
Robin Kay
Robson Braga Araujo
Rodney Simmons
+Rodric Glaser
+Rodrigo Silva
Roland Blom
Roland Krikava
Roland Zimmermann
Rolland Dudemaine
Roman Koifman
+Roman Mamedov
+Romulo A. Ceccon
+Ron Parker
Ron Zapp
Rosimildo da Silva
Roy Shan
Rune Kleveland
Ruslan Gazizov
+Rutger Hofman
+Ryan Braud
Ryan Chan
Ryan Nelson
+Ryan Schmidt
+Rémy Léone
S. Moonesamy
-Salvador Dávila
+Salvador Dávila
Salvatore Sorrentino
-Sam Listopad
+Sam Deane
+Sam Hurst
+Sam Schanken
Sampo Kellomaki
-Samuel Díaz García
+Samuel Díaz García
Samuel Listopad
+Samuel Thibault
Sander Gates
Sandor Feldi
+Santhana Todatry
+Saqib Ali
+Sara Golemon
+Saran Neti
+Sascha Swiercy
Saul good
+Scott Bailey
Scott Barrett
Scott Cantor
Scott Davis
Scott McCreary
-Sebastien Willemijns
+Sean Boudreau
+Sebastian Rasmussen
Senthil Raja Velu
+Sergei Nikulov
+Sergey Tatarincev
Sergio Ballestrero
Seshubabu Pasam
Sh Diao
+Shao Shuchao
Sharad Gupta
Shard
+Shawn Landden
Shawn Poulson
Shmulik Regev
Siddhartha Prakash Jain
@@ -722,18 +1120,28 @@ Song Ma
Sonia Subramanian
Spacen Jasset
Spiridonoff A.V
+Spork Schivago
Stadler Stephan
Stan van de Burgt
+Stanislav Ivochkin
+Stefan Bühler
+Stefan Eissing
Stefan Esser
Stefan Krause
+Stefan Neis
Stefan Teleman
+Stefan Tomanek
Stefan Ulrich
+Steinar H. Gunderson
Stephan Bergmann
Stephen Collyer
Stephen Kick
Stephen More
Sterling Hughes
Steve Green
+Steve H Truong
+Steve Havelka
+Steve Holme
Steve Lhomme
Steve Little
Steve Marx
@@ -741,44 +1149,76 @@ Steve Oliphant
Steve Roskowski
Steven Bazyl
Steven G. Johnson
+Steven Gu
Steven M. Schweda
+Steven Parkes
Stoned Elipot
+Sune Ahlgren
Sven Anders
Sven Neuhaus
Sven Wegener
-Sébastien Willemijns
+Symeon Paraschoudis
+Sébastien Willemijns
T. Bharath
T. Yamada
+Tae Hyoung Ahn
+Taneli Vahakangas
Tanguy Fautre
+Tatsuhiro Tsujikawa
Temprimus
+Thomas Braun
Thomas J. Moore
Thomas Klausner
+Thomas L. Shinnick
Thomas Lopatic
+Thomas Ruecker
Thomas Schwinge
Thomas Tonino
+Tiit Pikma
+Till Maas
Tim Ansell
Tim Baker
Tim Bartley
Tim Chen
Tim Costello
+Tim Harder
+Tim Heckman
+Tim Newsome
+Tim Ruehsen
Tim Sneddon
-Tobias Rundström
+Tim Starling
+Timo Sirainen
+Tinus van den Berg
+Tobias Markus
+Tobias Rundström
+Tobias Stoeckmann
Toby Peterson
+Todd A Ouska
Todd Kulesza
+Todd Ouska
Todd Vierling
Tom Benoist
Tom Donovan
+Tom Grace
Tom Lee
Tom Mattison
Tom Moers
Tom Mueller
Tom Regner
+Tom Sparrow
+Tom Wright
Tom Zerucha
+Tomas Hoger
+Tomas Mlcoch
Tomas Pospisek
Tomas Szepe
+Tomas Tomecek
+Tomasz Kojm
Tomasz Lacki
+Tommie Gannert
Tommy Tam
Ton Voon
+Toni Moreno
Toon Verwaest
Tor Arntsen
Torsten Foertsch
@@ -788,36 +1228,70 @@ Traian Nicolescu
Troels Walsted Hansen
Troy Engel
Tupone Alfredo
-Ulf Härnhammar
+Tyler Hall
+Török Edwin
+Ulf Härnhammar
+Ulf Samuelsson
+Ulrich Doehner
+Ulrich Telle
Ulrich Zadow
Venkat Akella
Victor Snezhko
+Vijay Panghal
Vikram Saxena
+Viktor Szakáts
+Ville Skyttä
Vilmos Nebehaj
Vincent Bronner
Vincent Le Normand
Vincent Penquerc'h
Vincent Sanders
+Vincent Torri
Vlad Grachov
+Vlad Ureche
+Vladimir Grishchenko
Vladimir Lazarenko
Vojtech Janota
Vojtech Minarik
+Vojtěch Král
+Vsevolod Novikov
+Waldek Kozba
Walter J. Mack
+Ward Willats
+Warren Menzer
Wayne Haigh
Werner Koch
Wesley Laxton
Wesley Miaw
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
+Yun SangHo
Yuriy Sosov
+Yves Arrouye
Yves Lejeune
+Zdenek Pavlas
+Zekun Ni
Zmey Petroff
Zvi Har'El
nk
swalkaus at yahoo.com
tommink[at]post.pl
+Ðикита Дорохин
diff --git a/docs/THANKS-filter b/docs/THANKS-filter
new file mode 100644
index 00000000..39a8a4c4
--- /dev/null
+++ b/docs/THANKS-filter
@@ -0,0 +1,52 @@
+# 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\z/Paras Sethia/
+s/Paras Sethiaethia/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/CeÌ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/
+s/Viktor Szakats/Viktor Szakáts/
+s/Jonathan Cardoso/Jonathan Cardoso Machado/
+s/Linus Nielsen/Linus Nielsen Feltzing/
diff --git a/docs/TODO b/docs/TODO
index 0a4c9815..65bf2ff7 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -9,35 +9,47 @@
Things to do in project cURL. Please tell us what you think, contribute and
send us patches that improve things!
+ Be aware that these are things that we could do, or have once been considered
+ things we could do. If you want to work on any of these areas, please
+ consider bringing it up for discussions first on the mailing list so that we
+ all agree it is still a good idea for the project!
+
All bugs documented in the KNOWN_BUGS document are subject for fixing!
1. libcurl
- 1.1 Zero-copy interface
1.2 More data sharing
1.3 struct lifreq
1.4 signal-based resolver timeouts
+ 1.5 get rid of PATH_MAX
+ 1.6 Modified buffer size approach
+ 1.7 Detect when called from within callbacks
+ 1.8 Allow SSL (HTTPS) to proxy
+ 1.9 Cache negative name resolves
2. libcurl - multi interface
2.1 More non-blocking
- 2.2 Remove easy interface internally
- 2.3 Avoid having to remove/readd handles
- 2.4 Fix HTTP Pipelining for PUT
+ 2.2 Fix HTTP Pipelining for PUT
+ 2.3 Better support for same name resolves
3. Documentation
- 3.1 More and better
+ 3.1 Update date and version in man pages
4. FTP
4.1 HOST
4.2 Alter passive/active on failure and retry
4.3 Earlier bad letter detection
4.4 REST for large files
- 4.5 FTP proxy support
- 4.6 ASCII support
+ 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
5.2 support FF3 sqlite cookie files
5.3 Rearrange request header order
+ 5.4 SPDY
+ 5.5 auth= in URLs
+ 5.6 Refuse "downgrade" redirects
6. TELNET
6.1 ditch stdin
@@ -45,71 +57,93 @@
6.3 feature negotiation debug data
6.4 send data in chunks
- 7. SSL
- 7.1 Disable specific versions
- 7.2 Provide mutex locking API
- 7.3 Evaluate SSL patches
- 7.4 Cache OpenSSL contexts
- 7.5 Export session ids
- 7.6 Provide callback for cert verification
- 7.7 Support other SSL libraries
- 7.8 Support SRP on the TLS layer
- 7.9 improve configure --with-ssl
-
- 8. GnuTLS
- 8.1 SSL engine stuff
- 8.2 SRP
- 8.3 check connection
- 8.4 non-gcrypt
-
- 9. Other protocols
-
- 10. New protocols
- 10.1 RSYNC
-
- 11. Client
- 11.1 sync
- 11.2 glob posts
- 11.3 prevent file overwriting
- 11.4 simultaneous parallel transfers
- 11.5 provide formpost headers
- 11.6 url-specific options
- 11.7 metalink support
- 11.8 warning when setting an option
-
- 12. Build
- 12.1 roffit
-
- 13. Test suite
- 13.1 SSL tunnel
- 13.2 nicer lacking perl message
- 13.3 more protocols supported
- 13.4 more platforms supported
-
- 14. Next SONAME bump
- 14.1 http-style HEAD output for ftp
- 14.2 combine error codes
- 14.3 extend CURLOPT_SOCKOPTFUNCTION prototype
-
- 15. Next major release
- 15.1 cleanup return codes
- 15.2 remove obsolete defines
- 15.3 size_t
- 15.4 remove several functions
- 15.5 remove CURLOPT_FAILONERROR
- 15.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
- 15.7 remove progress meter from libcurl
+ 7. SMTP
+ 7.1 Pipelining
+ 7.2 Enhanced capability support
+
+ 8. POP3
+ 8.1 Pipelining
+ 8.2 Enhanced capability support
+
+ 9. IMAP
+ 9.1 Enhanced capability support
+
+ 10. LDAP
+ 10.1 SASL based authentication mechanisms
+
+ 11. SMB
+ 11.1 File listing support
+ 11.2 Honor file timestamps
+ 11.3 Use NTLMv2
+
+ 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. WinSSL/SChannel
+ 15.1 Add support for client certificate authentication
+ 15.2 Add support for custom server certificate validation
+ 15.3 Add support for the --ciphers option
+
+ 16. SASL
+ 16.1 Other authentication mechanisms
+ 16.2 Add QOP support to GSSAPI authentication
+
+ 17. Client
+ 17.1 sync
+ 17.2 glob posts
+ 17.3 prevent file overwriting
+ 17.4 simultaneous parallel transfers
+ 17.5 provide formpost headers
+ 17.6 warning when setting an option
+ 17.7 warning when sending binary output to terminal
+ 17.8 offer color-coded HTTP header output
+ 17.9 Choose the name of file in braces for complex URLs
+
+ 18. Build
+ 18.1 roffit
+
+ 19. Test suite
+ 19.1 SSL tunnel
+ 19.2 nicer lacking perl message
+ 19.3 more protocols supported
+ 19.4 more platforms supported
+ 19.5 Add support for concurrent connections
+
+ 20. Next SONAME bump
+ 20.1 http-style HEAD output for FTP
+ 20.2 combine error codes
+ 20.3 extend CURLOPT_SOCKOPTFUNCTION prototype
+
+ 21. Next major release
+ 21.1 cleanup return codes
+ 21.2 remove obsolete defines
+ 21.3 size_t
+ 21.4 remove several functions
+ 21.5 remove CURLOPT_FAILONERROR
+ 21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
+ 21.7 remove progress meter from libcurl
+ 21.8 remove 'curl_httppost' from public
+ 21.9 have form functions use CURL handle argument
+ 21.10 Add CURLOPT_MAIL_CLIENT option
==============================================================================
1. libcurl
-1.1 Zero-copy interface
-
- Introduce another callback interface for upload/download that makes one less
- copy of data and thus a faster operation.
- [http://curl.haxx.se/dev/no_copy_callbacks.txt]
-
1.2 More data sharing
curl_share_* functions already exist and work, and they can be extended to
@@ -120,7 +154,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
@@ -134,6 +168,57 @@
Also, alarm() provides timeout resolution only to the nearest second. alarm
ought to be replaced by setitimer on systems that support it.
+1.5 get rid of PATH_MAX
+
+ Having code use and rely on PATH_MAX is not nice:
+ http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
+
+ Currently the SSH based code uses it a bit, but to remove PATH_MAX from there
+ we need libssh2 to properly tell us when we pass in a too small buffer and
+ its current API (as of libssh2 1.2.7) doesn't.
+
+1.6 Modified buffer size approach
+
+ Current libcurl allocates a fixed 16K size buffer for download and an
+ additional 16K for upload. They are always unconditionally part of the easy
+ handle. If CRLF translations are requested, an additional 32K "scratch
+ buffer" is allocated. A total of 64K transfer buffers in the worst case.
+
+ First, while the handles are not actually in use these buffers could be freed
+ so that lingering handles just kept in queues or whatever waste less memory.
+
+ Secondly, SFTP is a protocol that needs to handle many ~30K blocks at once
+ since each need to be individually acked and therefore libssh2 must be
+ allowed to send (or receive) many separate ones in parallel to achieve high
+ transfer speeds. A current libcurl build with a 16K buffer makes that
+ impossible, but one with a 512K buffer will reach MUCH faster transfers. But
+ allocating 512K unconditionally for all buffers just in case they would like
+ to do fast SFTP transfers at some point is not a good solution either.
+
+ Dynamically allocate buffer size depending on protocol in use in combination
+ with freeing it after each individual transfer? Other suggestions?
+
+1.7 Detect when called from within callbacks
+
+ We should set a state variable before calling callbacks, so that we
+ subsequently can add code within libcurl that returns error if called within
+ callbacks for when that's not supported.
+
+1.8 Allow SSL (HTTPS) to proxy
+
+ To prevent local users from snooping on your traffic to the proxy. Supported
+ by Chrome already:
+ https://www.chromium.org/developers/design-documents/secure-web-proxy
+
+ ...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
@@ -143,7 +228,6 @@
- Name resolves on non-windows unless c-ares is used
- NSS SSL connections
- - Active FTP connections
- HTTP proxy CONNECT operations
- SOCKS proxy handshakes
- file:// transfers
@@ -151,52 +235,37 @@
- The "DONE" operation (post transfer protocol-specific actions) for the
protocols SFTP, SMTP, FTP. Fixing Curl_done() for this is a worthy task.
-2.2 Remove easy interface internally
-
- Make curl_easy_perform() a wrapper-function that simply creates a multi
- handle, adds the easy handle to it, runs curl_multi_perform() until the
- transfer is done, then detach the easy handle, destroy the multi handle and
- return the easy handle's return code. This will thus make everything
- internally use and assume the multi interface. The select()-loop should use
- curl_multi_socket().
-
-2.3 Avoid having to remove/readd handles
-
- curl_multi_handle_control() - this can control the easy handle (while) added
- to a multi handle in various ways:
-
- o RESTART, unconditionally restart this easy handle's transfer from the
- start, re-init the state
-
- o RESTART_COMPLETED, restart this easy handle's transfer but only if the
- existing transfer has already completed and it is in a "finished state".
-
- o STOP, just stop this transfer and consider it completed
-
- o PAUSE?
-
- o RESUME?
-
-2.4 Fix HTTP Pipelining for PUT
+2.2 Fix HTTP Pipelining for PUT
HTTP Pipelining can be a way to greatly enhance performance for multiple
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 More and better
+3.1 Update date and version in man pages
- Exactly
+ 'maketgz' or another suitable script could update the .TH sections of the man
+ pages at release time to use the current date and curl/libcurl version
+ number.
4. FTP
4.1 HOST
- HOST is a suggested command in the works for a client to tell which host name
- to use, to offer FTP servers named-based virtual hosting:
+ HOST is a command for a client to tell which host name to use, to offer FTP
+ servers named-based virtual hosting:
- http://tools.ietf.org/html/draft-hethmon-mcmurray-ftp-hosts-11
+ https://tools.ietf.org/html/rfc7151
4.2 Alter passive/active on failure and retry
@@ -207,7 +276,7 @@
4.3 Earlier bad letter detection
- Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in the
+ Make the detection of (bad) %0d and %0a codes in FTP URL parts earlier in the
process to avoid doing a resolve and connect in vain.
4.4 REST for large files
@@ -216,17 +285,25 @@
the server doesn't set the pointer to the requested index. The tricky
(impossible?) part is to figure out if the server did the right thing or not.
-4.5 FTP proxy support
-
- Support the most common FTP proxies, Philip Newton provided a list allegedly
- from ncftp. This is not a subject without debate, and is probably not really
- suitable for libcurl. http://curl.haxx.se/mail/archive-2003-04/0126.html
-
-4.6 ASCII support
+4.5 ASCII support
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
@@ -252,6 +329,33 @@
headers use a default value so only headers that need to be moved have to be
specified.
+5.4 SPDY
+
+ Chrome and Firefox already support SPDY and lots of web services do. There's
+ a library for us to use for this (spdylay) that has a similar API and the
+ same author as nghttp2.
+
+ spdylay: https://github.com/tatsuhiro-t/spdylay
+
+5.5 auth= in URLs
+
+ Add the ability to specify the preferred authentication mechanism to use by
+ using ;auth=<mech> in the login part of the URL.
+
+ For example:
+
+ http://test:pass;auth=NTLM@example.com would be equivalent to specifying --user
+ test:pass;auth=NTLM or --user test:pass --ntlm from the command line.
+
+ Additionally this should be implemented for proxy base URLs as well.
+
+5.6 Refuse "downgrade" redirects
+
+ See https://github.com/bagder/curl/issues/226
+
+ Consider a way to tell curl to refuse to "downgrade" protocol with a redirect
+ and/or possibly a bit that refuses redirect to change protocol completely.
+
6. TELNET
@@ -277,35 +381,96 @@ to provide the data to send.
use, but inefficient for any other. Sent data should be sent in larger
chunks.
-7. SSL
+7. SMTP
+
+7.1 Pipelining
+
+ Add support for pipelining emails.
+
+7.2 Enhanced capability support
+
+ Add the ability, for an application that uses libcurl, to obtain the list of
+ capabilities returned from the EHLO command.
+
+8. POP3
+
+8.1 Pipelining
+
+ Add support for pipelining commands.
+
+8.2 Enhanced capability support
-7.1 Disable specific versions
+ Add the ability, for an application that uses libcurl, to obtain the list of
+ capabilities returned from the CAPA command.
+
+9. IMAP
+
+9.1 Enhanced capability support
+
+ Add the ability, for an application that uses libcurl, to obtain the list of
+ capabilities returned from the CAPABILITY command.
+
+10. LDAP
+
+10.1 SASL based authentication mechanisms
+
+ Currently the LDAP module only supports ldap_simple_bind_s() in order to bind
+ to an LDAP server. However, this function sends username and password details
+ using the simple authentication mechanism (as clear text). However, it should
+ 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 transferred file should reflect that of the original file.
+
+11.3 Use NTLMv2
+
+Currently the SMB authentication uses NTLMv1.
+
+12. New protocols
+
+12.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
+
+13.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
-7.2 Provide mutex locking API
+13.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.
-7.3 Evaluate SSL patches
+13.3 Evaluate SSL patches
Evaluate/apply Gertjan van Wingerde's SSL patches:
http://curl.haxx.se/mail/lib-2004-03/0087.html
-7.4 Cache OpenSSL contexts
+13.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
+ request as well, when they should only be necessary once per SSL context (or
once per handle)". The major improvement we can rather easily do is to make
sure we don't create and kill a new SSL "context" for every request, but
instead make one for every connection and re-use that SSL context in the same
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.
-7.5 Export session ids
+13.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
@@ -313,67 +478,92 @@ to provide the data to send.
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".
-7.6 Provide callback for cert verification
+13.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!
-7.7 Support other SSL libraries
-
- Make curl's SSL layer capable of using other free SSL libraries. Such as
- MatrixSSL (http://www.matrixssl.org/).
-
-7.8 Support SRP on the TLS layer
-
- Peter Sylvester's patch for SRP on the TLS layer. Awaits OpenSSL support for
- this, no need to support this in libcurl before there's an OpenSSL release
- that does it.
-
-7.9 improve configure --with-ssl
+13.7 improve configure --with-ssl
make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
then NSS...
-8. GnuTLS
+13.8 Support DANE
-8.1 SSL engine stuff
+ 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.
+ https://www.rfc-editor.org/rfc/rfc6698.txt
- Is this even possible?
+ An initial patch was posted by Suresh Krishnaswamy on March 7th 2013
+ (http://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple
+ approach. See Daniel's comments:
+ http://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the
+ correct library to base this development on.
+
+14. GnuTLS
-8.2 SRP
+14.1 SSL engine stuff
- Work out a common method with Peter Sylvester's OpenSSL-patch for SRP on the
- TLS to provide name and password. GnuTLS already supports it...
+ Is this even possible?
-8.3 check connection
+14.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.
-8.4 non-gcrypt
+15. WinSSL/SChannel
+
+15.1 Add support for client certificate authentication
+
+ WinSSL/SChannel currently makes use of the OS-level system and user
+ certificate and private key stores. This does not allow the application
+ or the user to supply a custom client certificate using curl or libcurl.
+
+ Therefore support for the existing -E/--cert and --key options should be
+ implemented by supplying a custom certificate to the SChannel APIs, see:
+ - Getting a Certificate for Schannel
+ https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
+
+15.2 Add support for custom server certificate validation
- libcurl assumes that there are gcrypt functions available when
- GnuTLS is.
+ WinSSL/SChannel currently makes use of the OS-level system and user
+ certificate trust store. This does not allow the application or user to
+ customize the server certificate validation process using curl or libcurl.
- GnuTLS can be built to use libnettle instead as crypto library,
- which breaks the previously mentioned assumption
+ Therefore support for the existing --cacert or --capath options should be
+ implemented by supplying a custom certificate to the SChannel APIs, see:
+ - Getting a Certificate for Schannel
+ https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
- The correct fix would be to detect which crypto layer that is in use and
- adapt our code to use that instead of blindly assuming gcrypt.
+15.3 Add support for the --ciphers option
-9. Other protocols
+ The cipher suites used by WinSSL/SChannel are configured on an OS-level
+ instead of an application-level. This does not allow the application or
+ the user to customize the configured cipher suites using curl or libcurl.
-10. New protocols
+ Therefore support for the existing --ciphers option should be implemented
+ by mapping the OpenSSL/GnuTLS cipher suites to the SChannel APIs, see
+ - Specifying Schannel Ciphers and Cipher Strengths
+ https://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx
-10.1 RSYNC
+16. SASL
- There's no RFC for protocol nor URI/URL format. An implementation should
- most probably use an existing rsync library, such as librsync.
+16.1 Other authentication mechanisms
-11. Client
+ Add support for other authentication mechanisms such as OLP,
+ GSS-SPNEGO and others.
+
+16.2 Add QOP support to GSSAPI authentication
-11.1 sync
+ 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).
+
+17. Client
+
+17.1 sync
"curl --sync http://example.com/feed[1-100].rss" or
"curl --sync http://example.net/{index,calendar,history}.html"
@@ -382,12 +572,12 @@ to provide the data to send.
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.
-11.2 glob posts
+17.2 glob posts
Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
This is easily scripted though.
-11.3 prevent file overwriting
+17.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
@@ -395,14 +585,14 @@ to provide the data to send.
existing). So that index.html becomes first index.html.1 and then
index.html.2 etc.
-11.4 simultaneous parallel transfers
+17.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
-11.5 provide formpost headers
+17.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
@@ -416,69 +606,88 @@ to provide the data to send.
which should overwrite the program reasonable defaults (plain/text,
8bit...)
-11.6 url-specific options
+17.6 warning when setting an option
- Provide a way to make options bound to a specific URL among several on the
- command line. Possibly by letting ':' separate options between URLs,
- similar to this:
+ 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.
- curl --data foo --url url.com : \
- --url url2.com : \
- --url url3.com --data foo3
+17.7 warning when sending binary output to terminal
- (More details: http://curl.haxx.se/mail/archive-2004-07/0133.html)
+ Provide a way that prompts the user for confirmation before binary data is
+ sent to the terminal, much in the style 'less' does it.
- The example would do a POST-GET-POST combination on a single command line.
+17.8 offer color-coded HTTP header output
-11.7 metalink support
+ By offering different color output on the header name and the header
+ contents, they could be made more readable and thus help users working on
+ HTTP services.
- Add metalink support to curl (http://www.metalinker.org/). This is most useful
- with simultaneous parallel transfers (11.6) but not necessary.
+17.9 Choose the name of file in braces for complex URLs
-11.8 warning when setting an option
+ When using braces to download a list of URLs and you use complicated names
+ in the list of alternatives, it could be handy to allow curl to use other
+ names when saving.
- 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.
+ Consider a way to offer that. Possibly like
+ {partURL1:name1,partURL2:name2,partURL3:name3} where the name following the
+ colon is the output name.
+
+ See https://github.com/bagder/curl/issues/221
-12. Build
-12.1 roffit
+18. Build
+
+18.1 roffit
Consider extending 'roffit' to produce decent ASCII output, and use that
- instead of (g)nroff when building src/hugehelp.c
+ instead of (g)nroff when building src/tool_hugehelp.c
-13. Test suite
+19. Test suite
-13.1 SSL tunnel
+19.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
-13.2 nicer lacking perl message
+19.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.
-13.3 more protocols supported
+19.3 more protocols supported
- Extend the test suite to include more protocols. The telnet could just do ftp
+ Extend the test suite to include more protocols. The telnet could just do FTP
or http operations (for which we have test servers).
-13.4 more platforms supported
+19.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.
-14. Next SONAME bump
+19.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
+ a connection under such circumstances.
-14.1 http-style HEAD output for ftp
+ Unfortunately, ftpserver.pl doesn't appear to support multiple concurrent
+ connections. The read while() loop seems to loop until it receives a disconnect
+ from the client, where it then enters the waiting for connections loop. When
+ the client opens a second connection to the server, the first connection hasn't
+ been dropped (unless it has been forced - which we shouldn't do in these tests)
+ and thus the wait for connections loop is never entered to receive the second
+ connection.
+
+20. Next SONAME bump
+
+20.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
+ from being output in NOBODY requests over FTP
-14.2 combine error codes
+20.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
@@ -488,37 +697,44 @@ to provide the data to send.
Candidates for removal and their replacements:
CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
+
CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
+
CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
+
CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
+
CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
+
CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
+
CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
+
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
-14.3 extend CURLOPT_SOCKOPTFUNCTION prototype
+20.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.
-15. Next major release
+21. Next major release
-15.1 cleanup return codes
+21.1 cleanup return codes
curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
CURLMcode. These should be changed to be the same.
-15.2 remove obsolete defines
+21.2 remove obsolete defines
remove obsolete defines from curl/curl.h
-15.3 size_t
+21.3 size_t
make several functions use size_t instead of int in their APIs
-15.4 remove several functions
+21.4 remove several functions
remove the following functions from the public API:
@@ -539,18 +755,18 @@ to provide the data to send.
curl_multi_socket_all
-15.5 remove CURLOPT_FAILONERROR
+21.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.
-15.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
+21.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".
-15.7 remove progress meter from libcurl
+21.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
@@ -559,3 +775,31 @@ to provide the data to send.
The progress callback should then be bumped as well to get proper 64bit
variable types passed to it instead of doubles so that big files work
correctly.
+
+21.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
+ but instead often restricts how the form functions can or can't be modified.
+
+ 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.
+
+21.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
+ thus curl_formget() with callback cannot function without first having
+ curl_easy_perform() (or similar) called - which is hard to grasp and a design
+ mistake.
+
+21.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
+ specifying this data as the URL is non-standard and to be honest a bit of a
+ hack ;-)
+
+ Please see the following thread for more information:
+ http://curl.haxx.se/mail/lib-2012-05/0178.html
+
diff --git a/docs/TheArtOfHttpScripting b/docs/TheArtOfHttpScripting
index 183dd17a..76faee4a 100644
--- a/docs/TheArtOfHttpScripting
+++ b/docs/TheArtOfHttpScripting
@@ -1,16 +1,73 @@
-Online: http://curl.haxx.se/docs/httpscripting.html
-Date: May 28, 2008
-
- The Art Of Scripting HTTP Requests Using Curl
- =============================================
-
- This document will assume that you're familiar with HTML and general
- networking.
-
- The possibility to write scripts is essential to make a good computer
- system. Unix' capability to be extended by shell scripts and various tools to
- run various automated commands and scripts is one reason why it has succeeded
- so well.
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+
+The Art Of Scripting HTTP Requests Using Curl
+
+ 1. HTTP Scripting
+ 1.1 Background
+ 1.2 The HTTP Protocol
+ 1.3 See the Protocol
+ 1.4 See the Timing
+ 1.5 See the Response
+ 2. URL
+ 2.1 Spec
+ 2.2 Host
+ 2.3 Port number
+ 2.4 User name and password
+ 2.5 Path part
+ 3. Fetch a page
+ 3.1 GET
+ 3.2 HEAD
+ 3.3 Multiple URLs in a single command line
+ 3.4 Multiple HTTP methods in a single command line
+ 4. HTML forms
+ 4.1 Forms explained
+ 4.2 GET
+ 4.3 POST
+ 4.4 File Upload POST
+ 4.5 Hidden Fields
+ 4.6 Figure Out What A POST Looks Like
+ 5. HTTP upload
+ 5.1 PUT
+ 6. HTTP Authentication
+ 6.1 Basic Authentication
+ 6.2 Other Authentication
+ 6.3 Proxy Authentication
+ 6.4 Hiding credentials
+ 7. More HTTP Headers
+ 7.1 Referer
+ 7.2 User Agent
+ 8. Redirects
+ 8.1 Location header
+ 8.2 Other redirects
+ 9. Cookies
+ 9.1 Cookie Basics
+ 9.2 Cookie options
+ 10. HTTPS
+ 10.1 HTTPS is HTTP secure
+ 10.2 Certificates
+ 11. Custom Request Elements
+ 11.1 Modify method and headers
+ 11.2 More on changed methods
+ 12. Web Login
+ 12.1 Some login tricks
+ 13. Debug
+ 13.1 Some debug tricks
+ 14. References
+ 14.1 Standards
+ 14.2 Sites
+
+==============================================================================
+
+1. HTTP Scripting
+
+ 1.1 Background
+
+ This document assumes that you're familiar with HTML and general networking.
The increasing amount of applications moving to the web has made "HTTP
Scripting" more frequently requested and wanted. To be able to automatically
@@ -27,7 +84,7 @@ Date: May 28, 2008
to glue everything together using some kind of script language or repeated
manual invokes.
-1. The HTTP Protocol
+ 1.2 The HTTP Protocol
HTTP is the protocol used to fetch data from web servers. It is a very simple
protocol that is built upon TCP/IP. The protocol also allows information to
@@ -38,18 +95,108 @@ Date: May 28, 2008
request a particular action, and then the server replies a few text lines
before the actual requested content is sent to the client.
- Using curl's option --verbose (-v as a short option) will display what kind of
- commands curl sends to the server, as well as a few other informational texts.
- --verbose is the single most useful option when it comes to debug or even
- understand the curl<->server interaction.
+ The client, curl, sends a HTTP request. The request contains a method (like
+ GET, POST, HEAD etc), a number of request headers and sometimes a request
+ body. The HTTP server responds with a status line (indicating if things went
+ well), response headers and most often also a response body. The "body" part
+ is the plain data you requested, like the actual HTML or the image etc.
+
+ 1.3 See the Protocol
+
+ Using curl's option --verbose (-v as a short option) will display what kind
+ of commands curl sends to the server, as well as a few other informational
+ texts.
+
+ --verbose is the single most useful option when it comes to debug or even
+ understand the curl<->server interaction.
+
+ Sometimes even --verbose is not enough. Then --trace and --trace-ascii offer
+ even more details as they show EVERYTHING curl sends and receives. Use it
+ like this:
+
+ curl --trace-ascii debugdump.txt http://www.example.com/
+
+ 1.4 See the Timing
+
+ Many times you may wonder what exactly is taking all the time, or you just
+ want to know the amount of milliseconds between two points in a
+ transfer. For those, and other similar situations, the --trace-time option
+ is what you need. It'll prepend the time to each trace output line:
+
+ curl --trace-ascii d.txt --trace-time http://example.com/
+
+ 1.5 See the Response
+
+ By default curl sends the response to stdout. You need to redirect it
+ somewhere to avoid that, most often that is done with -o or -O.
2. URL
+ 2.1 Spec
+
The Uniform Resource Locator format is how you specify the address of a
particular resource on the Internet. You know these, you've seen URLs like
- http://curl.haxx.se or https://yourbank.com a million times.
+ http://curl.haxx.se or https://yourbank.com a million times. RFC 3986 is the
+ canonical spec. And yeah, the formal name is not URL, it is URI.
+
+ 2.2 Host
+
+ The host name is usually resolved using DNS or your /etc/hosts file to an IP
+ address and that's what curl will communicate with. Alternatively you specify
+ the IP address directly in the URL instead of a name.
+
+ For development and other trying out situation, you can point out a different
+ IP address for a host name than what would otherwise be used, by using curl's
+ --resolve option:
+
+ curl --resolve www.example.org:80:127.0.0.1 http://www.example.org/
+
+ 2.3 Port number
+
+ Each protocol curl supports operate on a default port number, be it over TCP
+ or in some cases UDP. Normally you don't have to take that into
+ consideration, but at times you run test servers on other ports or
+ similar. Then you can specify the port number in the URL with a colon and a
+ number immediately following the host name. Like when doing HTTP to port
+ 1234:
-3. GET a page
+ curl http://www.example.org:1234/
+
+ The port number you specify in the URL is the number that the server uses to
+ offer its services. Sometimes you may use a local proxy, and then you may
+ need to specify that proxy's port number separate on what curl needs to
+ connect to locally. Like when using a HTTP proxy on port 4321:
+
+ curl --proxy http://proxy.example.org:4321 http://remote.example.org/
+
+ 2.4 User name and password
+
+ Some services are setup to require HTTP authentication and then you need to
+ provide name and password which then is transferred to the remote site in
+ various ways depending on the exact authentication protocol used.
+
+ You can opt to either insert the user and password in the URL or you can
+ provide them separately:
+
+ curl http://user:password@example.org/
+
+ or
+
+ curl -u user:password http://example.org/
+
+ You need to pay attention that this kind of HTTP authentication is not what
+ is usually done and requested by user-oriented web sites these days. They
+ tend to use forms and cookies instead.
+
+ 2.5 Path part
+
+ The path part is just sent off to the server to request that it sends back
+ the associated response. The path is what is to the right side of the slash
+ that follows the host name and possibly port number.
+
+3. Fetch a page
+
+ 3.1 GET
The simplest and most common request/operation made using HTTP is to get a
URL. The URL could itself refer to a web page, an image or a file. The client
@@ -61,12 +208,65 @@ Date: May 28, 2008
you get a web page returned in your terminal window. The entire HTML document
that that URL holds.
- All HTTP replies contain a set of headers that are normally hidden, use
- curl's --include (-i) option to display them as well as the rest of the
- document. You can also ask the remote server for ONLY the headers by using the
- --head (-I) option (which will make curl issue a HEAD request).
+ All HTTP replies contain a set of response headers that are normally hidden,
+ use curl's --include (-i) option to display them as well as the rest of the
+ document.
+
+ 3.2 HEAD
+
+ You can ask the remote server for ONLY the headers by using the --head (-I)
+ option which will make curl issue a HEAD request. In some special cases
+ servers deny the HEAD method while others still work, which is a particular
+ kind of annoyance.
+
+ The HEAD method is defined and made so that the server returns the headers
+ exactly the way it would do for a GET, but without a body. It means that you
+ may see a Content-Length: in the response headers, but there must not be an
+ actual body in the HEAD response.
+
+ 3.3 Multiple URLs in a single command line
+
+ A single curl command line may involve one or many URLs. The most common case
+ is probably to just use one, but you can specify any amount of URLs. Yes
+ any. No limits. You'll then get requests repeated over and over for all the
+ given URLs.
+
+ Example, send two GETs:
-4. Forms
+ curl http://url1.example.com http://url2.example.com
+
+ If you use --data to POST to the URL, using multiple URLs means that you send
+ that same POST to all the given URLs.
+
+ Example, send two POSTs:
+
+ curl --data name=curl http://url1.example.com http://url2.example.com
+
+
+ 3.4 Multiple HTTP methods in a single command line
+
+ Sometimes you need to operate on several URLs in a single command line and do
+ different HTTP methods on each. For this, you'll enjoy the --next option. It
+ is basically a separator that separates a bunch of options from the next. All
+ the URLs before --next will get the same method and will get all the POST
+ data merged into one.
+
+ When curl reaches the --next on the command line, it'll sort of reset the
+ method and the POST data and allow a new set.
+
+ Perhaps this is best shown with a few examples. To send first a HEAD and then
+ a GET:
+
+ curl -I http://example.com --next http://example.com
+
+ To first send a POST and then a GET:
+
+ curl -d score=10 http://example.com/post.cgi --next http://example.com/results.html
+
+
+4. HTML forms
+
+ 4.1 Forms explained
Forms are the general way a web site can present a HTML page with fields for
the user to enter data in, and then press some kind of 'OK' or 'submit'
@@ -79,7 +279,7 @@ Date: May 28, 2008
Of course there has to be some kind of program in the server end to receive
the data you send. You cannot just invent something out of the air.
- 4.1 GET
+ 4.2 GET
A GET-form uses the method GET, as specified in HTML like:
@@ -105,7 +305,7 @@ Date: May 28, 2008
curl "http://www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
- 4.2 POST
+ 4.3 POST
The GET method makes all input field names get displayed in the URL field of
your browser. That's generally a good thing when you want to be able to
@@ -127,7 +327,8 @@ Date: May 28, 2008
And to use curl to post this form with the same data filled in as before, we
could do it like:
- curl --data "birthyear=1905&press=%20OK%20" http://www.hotmail.com/when/junk.cgi
+ curl --data "birthyear=1905&press=%20OK%20" \
+ http://www.example.com/when.cgi
This kind of POST will use the Content-Type
application/x-www-form-urlencoded and is the most widely used POST kind.
@@ -141,7 +342,11 @@ Date: May 28, 2008
curl --data-urlencode "name=I am Daniel" http://www.example.com
- 4.3 File Upload POST
+ If you repeat --data several times on the command line, curl will
+ concatenate all the given data pieces - and put a '&' symbol between each
+ data segment.
+
+ 4.4 File Upload POST
Back in late 1995 they defined an additional way to post data over HTTP. It
is documented in the RFC 1867, why this method sometimes is referred to as
@@ -162,7 +367,7 @@ Date: May 28, 2008
curl --form upload=@localfilename --form press=OK [URL]
- 4.4 Hidden Fields
+ 4.5 Hidden Fields
A very common way for HTML based application to pass state information
between pages is to add hidden fields to the forms. Hidden fields are
@@ -183,7 +388,7 @@ Date: May 28, 2008
curl --data "birthyear=1905&press=OK&person=daniel" [URL]
- 4.5 Figure Out What A POST Looks Like
+ 4.6 Figure Out What A POST Looks Like
When you're about fill in a form and send to a server by using curl instead
of a browser, you're of course very interested in sending a POST exactly the
@@ -196,7 +401,9 @@ Date: May 28, 2008
You will then clearly see the data get appended to the URL, separated with a
'?'-letter as GET forms are supposed to.
-5. PUT
+5. HTTP upload
+
+ 5.1 PUT
The perhaps best way to upload data to a HTTP server is to use PUT. Then
again, this of course requires that someone put a program or script on the
@@ -204,10 +411,12 @@ Date: May 28, 2008
Put a file to a HTTP server with curl:
- curl --upload-file uploadfile http://www.uploadhttp.com/receive.cgi
+ curl --upload-file uploadfile http://www.example.com/receive.cgi
6. HTTP Authentication
+ 6.1 Basic Authentication
+
HTTP Authentication is the ability to tell the server your username and
password so that it can verify that you're allowed to do the request you're
doing. The Basic authentication used in HTTP (which is the type curl uses by
@@ -217,12 +426,16 @@ Date: May 28, 2008
To tell curl to use a user and password for authentication:
- curl --user name:password http://www.secrets.com
+ curl --user name:password http://www.example.com
+
+ 6.2 Other Authentication
The site might require a different authentication method (check the headers
returned by the server), and then --ntlm, --digest, --negotiate or even
--anyauth might be options that suit you.
+ 6.3 Proxy Authentication
+
Sometimes your HTTP access is only available through the use of a HTTP
proxy. This seems to be especially common at various companies. A HTTP proxy
may require its own user and password to allow the client to get through to
@@ -236,6 +449,8 @@ Date: May 28, 2008
If you use any one these user+password options but leave out the password
part, curl will prompt for the password interactively.
+ 6.4 Hiding credentials
+
Do note that when a program is run, its parameters might be possible to see
when listing the running processes of the system. Thus, other users may be
able to watch your passwords if you pass them as plain command line
@@ -245,7 +460,9 @@ Date: May 28, 2008
many web sites will not use this concept when they provide logins etc. See
the Web Login chapter further below for more details on that.
-7. Referer
+7. More HTTP Headers
+
+ 7.1 Referer
A HTTP request may include a 'referer' field (yes it is misspelled), which
can be used to tell from which URL the client got to this particular
@@ -257,9 +474,9 @@ Date: May 28, 2008
Use curl to set the referer field with:
- curl --referer http://curl.haxx.se http://daniel.haxx.se
+ curl --referer http://www.example.come http://www.example.com
-8. User Agent
+ 7.2 User Agent
Very similar to the referer field, all HTTP requests may set the User-Agent
field. It names what user agent (client) that is being used. Many
@@ -273,15 +490,17 @@ Date: May 28, 2008
is time to set the User Agent field to fool the server into thinking you're
one of those browsers.
- To make curl look like Internet Explorer on a Windows 2000 box:
+ To make curl look like Internet Explorer 5 on a Windows 2000 box:
+
+ curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
- curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
+ Or why not look like you're using Netscape 4.73 on an old Linux box:
- Or why not look like you're using Netscape 4.73 on a Linux (PIII) box:
+ curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
- curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
+8. Redirects
-9. Redirects
+ 8.1 Location header
When a resource is requested from a server, the reply from the server may
include a hint about where the browser should go next to find this page, or a
@@ -294,14 +513,23 @@ Date: May 28, 2008
To tell curl to follow a Location:
- curl --location http://www.sitethatredirects.com
+ curl --location http://www.example.com
If you use curl to POST to a site that immediately redirects you to another
page, you can safely use --location (-L) and --data/--form together. Curl will
only use POST in the first request, and then revert to GET in the following
operations.
-10. Cookies
+ 8.2 Other redirects
+
+ Browser typically support at least two other ways of redirects that curl
+ doesn't: first the html may contain a meta refresh tag that asks the browser
+ to load a specific URL after a set number of seconds, or it may use
+ javascript to do it.
+
+9. Cookies
+
+ 9.1 Cookie Basics
The way the web browsers do "client side state control" is by using
cookies. Cookies are just names with associated contents. The cookies are
@@ -318,46 +546,51 @@ Date: May 28, 2008
must be able to record and send back cookies the way the web application
expects them. The same way browsers deal with them.
+ 9.2 Cookie options
+
The simplest way to send a few cookies to the server when getting a page with
curl is to add them on the command line like:
- curl --cookie "name=Daniel" http://www.cookiesite.com
+ curl --cookie "name=Daniel" http://www.example.com
Cookies are sent as common HTTP headers. This is practical as it allows curl
to record cookies simply by recording headers. Record cookies with curl by
using the --dump-header (-D) option like:
- curl --dump-header headers_and_cookies http://www.cookiesite.com
+ curl --dump-header headers_and_cookies http://www.example.com
(Take note that the --cookie-jar option described below is a better way to
store cookies.)
Curl has a full blown cookie parsing engine built-in that comes to use if you
want to reconnect to a server and use cookies that were stored from a
- previous connection (or handicrafted manually to fool the server into
+ previous connection (or hand-crafted manually to fool the server into
believing you had a previous connection). To use previously stored cookies,
you run curl like:
- curl --cookie stored_cookies_in_file http://www.cookiesite.com
+ curl --cookie stored_cookies_in_file http://www.example.com
Curl's "cookie engine" gets enabled when you use the --cookie option. If you
only want curl to understand received cookies, use --cookie with a file that
- doesn't exist. Example, if you want to let curl understand cookies from a page
- and follow a location (and thus possibly send back cookies it received), you
- can invoke it like:
+ doesn't exist. Example, if you want to let curl understand cookies from a
+ page and follow a location (and thus possibly send back cookies it received),
+ you can invoke it like:
- curl --cookie nada --location http://www.cookiesite.com
+ curl --cookie nada --location http://www.example.com
Curl has the ability to read and write cookie files that use the same file
- format that Netscape and Mozilla do. It is a convenient way to share cookies
- between browsers and automatic scripts. The --cookie (-b) switch automatically
+ format that Netscape and Mozilla once used. It is a convenient way to share
+ cookies between scripts or invokes. The --cookie (-b) switch automatically
detects if a given file is such a cookie file and parses it, and by using the
- --cookie-jar (-c) option you'll make curl write a new cookie file at the end of
- an operation:
+ --cookie-jar (-c) option you'll make curl write a new cookie file at the end
+ of an operation:
+
+ curl --cookie cookies.txt --cookie-jar newcookies.txt \
+ http://www.example.com
- curl --cookie cookies.txt --cookie-jar newcookies.txt http://www.cookiesite.com
+10. HTTPS
-11. HTTPS
+ 10.1 HTTPS is HTTP secure
There are a few ways to do secure HTTP transfers. The by far most common
protocol for doing this is what is generally known as HTTPS, HTTP over
@@ -368,12 +601,14 @@ Date: May 28, 2008
truckload of advanced features to allow all those encryptions and key
infrastructure mechanisms encrypted HTTP requires.
- Curl supports encrypted fetches thanks to the freely available OpenSSL
- libraries. To get a page from a HTTPS server, simply run curl like:
+ 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 https://that.secure.server.com
+ curl https://secure.example.com
- 11.1 Certificates
+ 10.2 Certificates
In the HTTPS world, you use certificates to validate that you are the one
you claim to be, as an addition to normal passwords. Curl supports client-
@@ -382,7 +617,7 @@ Date: May 28, 2008
can be specified on the command line or if not, entered interactively when
curl queries for it. Use a certificate with curl on a HTTPS server like:
- curl --cert mycert.pem https://that.secure.server.com
+ curl --cert mycert.pem https://secure.example.com
curl also tries to verify that the server is who it claims to be, by
verifying the server's certificate against a locally stored CA cert
@@ -395,7 +630,15 @@ Date: May 28, 2008
http://curl.haxx.se/docs/sslcerts.html
-12. Custom Request Elements
+ At times you may end up with your own CA cert store and then you can tell
+ curl to use that to verify the server's certificate:
+
+ curl --cacert ca-bundle.pem https://example.com/
+
+
+11. Custom Request Elements
+
+11.1 Modify method and headers
Doing fancy stuff, you may need to add or change elements of a single curl
request.
@@ -403,19 +646,39 @@ Date: May 28, 2008
For example, you can change the POST request to a PROPFIND and send the data
as "Content-Type: text/xml" (instead of the default Content-Type) like this:
- curl --data "<xml>" --header "Content-Type: text/xml" --request PROPFIND url.com
+ curl --data "<xml>" --header "Content-Type: text/xml" \
+ --request PROPFIND url.com
You can delete a default header by providing one without content. Like you
can ruin the request by chopping off the Host: header:
- curl --header "Host:" http://mysite.com
+ curl --header "Host:" http://www.example.com
You can add headers the same way. Your server may want a "Destination:"
header, and you can add it:
- curl --header "Destination: http://moo.com/nowhere" http://url.com
+ curl --header "Destination: http://nowhere" http://example.com
+
+ 11.2 More on changed methods
+
+ It should be noted that curl selects which methods to use on its own
+ depending on what action to ask for. -d will do POST, -I will do HEAD and so
+ on. If you use the --request / -X option you can change the method keyword
+ curl selects, but you will not modify curl's behavior. This means that if you
+ for example use -d "data" to do a POST, you can modify the method to a
+ PROPFIND with -X and curl will still think it sends a POST. You can change
+ the normal GET to a POST method by simply adding -X POST in a command line
+ like:
+
+ curl -X POST http://example.org/
-13. Web Login
+ ... but curl will still think and act as if it sent a GET so it won't send any
+ request body etc.
+
+
+12. Web Login
+
+ 12.1 Some login tricks
While not strictly just HTTP related, it still cause a lot of people problems
so here's the executive run-down of how the vast majority of all login forms
@@ -434,7 +697,7 @@ Date: May 28, 2008
sometimes they use such code to set or modify cookie contents. Possibly they
do that to prevent programmed logins, like this manual describes how to...
Anyway, if reading the code isn't enough to let you repeat the behavior
- manually, capturing the HTTP requests done by your browers and analyzing the
+ manually, capturing the HTTP requests done by your browsers and analyzing the
sent cookies is usually a working method to work out how to shortcut the
javascript need.
@@ -444,8 +707,9 @@ Date: May 28, 2008
to do a proper login POST. Remember that the contents need to be URL encoded
when sent in a normal POST.
+13. Debug
-14. Debug
+ 13.1 Some debug tricks
Many times when you run curl on a site, you'll notice that the site doesn't
seem to respond the same way to your curl requests as it does to your
@@ -455,37 +719,40 @@ Date: May 28, 2008
browser's requests:
* Use the --trace-ascii option to store fully detailed logs of the requests
- for easier analyzing and better understanding
+ for easier analyzing and better understanding
* Make sure you check for and use cookies when needed (both reading with
- --cookie and writing with --cookie-jar)
+ --cookie and writing with --cookie-jar)
* Set user-agent to one like a recent popular browser does
* Set referer like it is set by the browser
* If you use POST, make sure you send all the fields and in the same order as
- the browser does it. (See chapter 4.5 above)
+ the browser does it.
A very good helper to make sure you do this right, is the LiveHTTPHeader tool
that lets you view all headers you send and receive with Mozilla/Firefox
- (even when using HTTPS).
+ (even when using HTTPS). Chrome features similar functionality out of the box
+ among the developer's tools.
A more raw approach is to capture the HTTP traffic on the network with tools
such as ethereal or tcpdump and check what headers that were sent and
received by the browser. (HTTPS makes this technique inefficient.)
-15. References
+14. References
+
+ 14.1 Standards
- RFC 2616 is a must to read if you want in-depth understanding of the HTTP
- protocol.
+ RFC 7230 is a must to read if you want in-depth understanding of the HTTP
+ protocol
- RFC 2396 explains the URL syntax.
+ RFC 3986 explains the URL syntax
- RFC 2109 defines how cookies are supposed to work.
+ RFC 1867 defines the HTTP post upload format
- RFC 1867 defines the HTTP post upload format.
+ RFC 6525 defines how HTTP cookies work
- http://www.openssl.org is the home of the OpenSSL project
+ 14.2 Sites
http://curl.haxx.se is the home of the cURL project
diff --git a/docs/VERSIONS b/docs/VERSIONS
index 21c0d901..72a45474 100644
--- a/docs/VERSIONS
+++ b/docs/VERSIONS
@@ -1,42 +1,31 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
Version Numbers and Releases
+============================
Curl is not only curl. Curl is also libcurl. They're actually individually
versioned, but they mostly follow each other rather closely.
The version numbering is always built up using the same system:
- X.Y[.Z][-preN]
+ X.Y.Z
+
+ - X is main version number
+ - Y is release number
+ - Z is patch number
- Where
- X is main version number
- Y is release number
- Z is patch number
- N is pre-release number
+## Bumping numbers
One of these numbers will get bumped in each new release. The numbers to the
right of a bumped number will be reset to zero. If Z is zero, it may not be
- included in the version number. The pre release number is only included in
- pre releases (they're never used in public, official, releases).
+ included in the version number.
The main version number will get bumped when *really* big, world colliding
- changes are made. The release number is bumped when big changes are
- performed. The patch number is bumped when the changes are mere bugfixes and
- only minor feature changes. The pre-release is a counter, to identify which
- pre-release a certain release is.
-
- When reaching the end of a pre-release period, the version without the
- pre-release part will be released as a public release.
+ changes are made. The release number is bumped when changes are performed or
+ things/features are added. The patch number is bumped when the changes are
+ mere bugfixes.
It means that after release 1.2.3, we can release 2.0 if something really big
has been made, 1.3 if not that big changes were made or 1.2.4 if mostly bugs
- were fixed. Before 1.2.4 is released, we might release a 1.2.4-pre1 release
- for the brave people to try before the actual release.
+ were fixed.
Bumping, as in increasing the number with 1, is unconditionally only
affecting one of the numbers (except the ones to the right of it, that may be
@@ -56,12 +45,12 @@ Version Numbers and Releases
#define LIBCURL_VERSION_NUM 0xXXYYZZ
Where XX, YY and ZZ are the main version, release and patch numbers in
- hexadecimal. All three numbers are always represented using two digits. 1.2
- would appear as "0x010200" while version 9.11.7 appears as "0x090b07".
+ hexadecimal. All three number fields are always represented using two digits
+ (eight bits each). 1.2 would appear as "0x010200" while version 9.11.7
+ appears as "0x090b07".
- This 6-digit hexadecimal number does not show pre-release number, and it is
- always a greater number in a more recent release. It makes comparisons with
- greater than and less than work.
+ This 6-digit hexadecimal number is always a greater number in a more recent
+ release. It makes comparisons with greater than and less than work.
This number is also available as three separate defines:
- LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR and LIBCURL_VERSION_PATCH.
+ `LIBCURL_VERSION_MAJOR`, `LIBCURL_VERSION_MINOR` and `LIBCURL_VERSION_PATCH`.
diff --git a/docs/curl-config.1 b/docs/curl-config.1
index c4f4e2b1..14a9d2ba 100644
--- a/docs/curl-config.1
+++ b/docs/curl-config.1
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -93,7 +93,6 @@ What's the installed libcurl version?
How do I build a single file with a one-line command?
- $ `curl-config --cc --cflags --libs` -o example example.c
-
+ $ `curl-config --cc --cflags` -o example example.c `curl-config --libs`
.SH "SEE ALSO"
.BR curl (1)
diff --git a/docs/curl-config.html b/docs/curl-config.html
deleted file mode 100644
index 3f49388c..00000000
--- a/docs/curl-config.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<html><head>
-<title>curl-config man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl-config - Get information about a libcurl installation <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">curl-config [options]</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="bold">curl-config</span> displays information about the curl and libcurl installation. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="--ca"></a><span class="nroffip">--ca</span>
-<p class="level1">Displays the built-in path to the CA cert bundle this libcurl uses.
-<p class="level0"><a name="--cc"></a><span class="nroffip">--cc</span>
-<p class="level1">Displays the compiler used to build libcurl.
-<p class="level0"><a name="--cflags"></a><span class="nroffip">--cflags</span>
-<p class="level1">Set of compiler options (CFLAGS) to use when compiling files that use libcurl. Currently that is only the include path to the curl include files.
-<p class="level0"><a name="--checkfor"></a><span class="nroffip">--checkfor [version]</span>
-<p class="level1">Specify the oldest possible libcurl version string you want, and this script will return 0 if the current installation is new enough or it returns 1 and outputs a text saying that the current version is not new enough. (Added in 7.15.4)
-<p class="level0"><a name="--configure"></a><span class="nroffip">--configure</span>
-<p class="level1">Displays the arguments given to configure when building curl.
-<p class="level0"><a name="--feature"></a><span class="nroffip">--feature</span>
-<p class="level1">Lists what particular main features the installed libcurl was built with. At the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume any particular order. The keywords will be separated by newlines. There may be none, one, or several keywords in the list.
-<p class="level0"><a name="--help"></a><span class="nroffip">--help</span>
-<p class="level1">Displays the available options.
-<p class="level0"><a name="--libs"></a><span class="nroffip">--libs</span>
-<p class="level1">Shows the complete set of libs and other linker options you will need in order to link your application with libcurl.
-<p class="level0"><a name="--prefix"></a><span class="nroffip">--prefix</span>
-<p class="level1">This is the prefix used when libcurl was installed. Libcurl is then installed in $prefix/lib and its header files are installed in $prefix/include and so on. The prefix is set with "configure --prefix".
-<p class="level0"><a name="--protocols"></a><span class="nroffip">--protocols</span>
-<p class="level1">Lists what particular protocols the installed libcurl was built to support. At the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE, TELNET, LDAP, DICT. Do not assume any particular order. The protocols will be listed using uppercase and are separated by newlines. There may be none, one, or several protocols in the list. (Added in 7.13.0)
-<p class="level0"><a name="--static-libs"></a><span class="nroffip">--static-libs</span>
-<p class="level1">Shows the complete set of libs and other linker options you will need in order to link your application with libcurl statically. (Added in 7.17.1)
-<p class="level0"><a name="--version"></a><span class="nroffip">--version</span>
-<p class="level1">Outputs version information about the installed libcurl.
-<p class="level0"><a name="--vernum"></a><span class="nroffip">--vernum</span>
-<p class="level1">Outputs version information about the installed libcurl, in numerical mode. This outputs the version number, in hexadecimal, with 8 bits for each part; major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl 12.13.14 would appear as 0c0d0e... Note that the initial zero might be omitted. (This option was broken in the 7.15.0 release.) <a name="EXAMPLES"></a><h2 class="nroffsh">EXAMPLES</h2>
-<p class="level0">What linker options do I need when I link with libcurl?
-<p class="level0">&nbsp; $ curl-config --libs
-<p class="level0">What compiler options do I need when I compile using libcurl functions?
-<p class="level0">&nbsp; $ curl-config --cflags
-<p class="level0">How do I know if libcurl was built with SSL support?
-<p class="level0">&nbsp; $ curl-config --feature | grep SSL
-<p class="level0">What's the installed libcurl version?
-<p class="level0">&nbsp; $ curl-config --version
-<p class="level0">How do I build a single file with a one-line command?
-<p class="level0">&nbsp; $ `curl-config --cc --cflags --libs` -o example example.c
-<p class="level0"><a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">curl (1)</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/curl-config.pdf b/docs/curl-config.pdf
deleted file mode 100644
index 074e1ca8..00000000
--- a/docs/curl-config.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/curl.1 b/docs/curl.1
index 2acd7b7e..11b95d4e 100644
--- a/docs/curl.1
+++ b/docs/curl.1
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "28 November 2009" "Curl 7.20.0" "Curl Manual"
+.TH curl 1 "30 Nov 2014" "Curl 7.40.0" "Curl Manual"
.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
@@ -30,17 +30,16 @@ 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, SMTP, SMTPS, TELNET and TFTP). The
-command is designed to work without user interaction.
+LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, 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
-resume and more. As you will see below, the number of features will make your
-head spin!
+resume, Metalink, and more. As you will see below, the number of features will
+make your head spin!
curl is powered by libcurl for all transfer-related features. See
-.BR libcurl (3)
-for details.
+\fIlibcurl(3)\fP for details.
.SH URL
The URL syntax is protocol-dependent. You'll find a detailed description in
RFC 3986.
@@ -48,18 +47,20 @@ 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.
@@ -67,8 +68,19 @@ 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
+ 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]/
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
@@ -79,14 +91,14 @@ curl will do its best to use what you pass to it as a URL. It is not trying to
validate it as a syntactically correct URL by any means but is instead
\fBvery\fP liberal with what it accepts.
-Curl will attempt to re-use connections for multiple file transfers, so that
+curl will attempt to re-use connections for multiple file transfers, so that
getting many files from the same server will not do multiple connects /
handshakes. This improves speed. Of course this is only done on files
specified on a single command line and cannot be used between separate curl
invokes.
.SH "PROGRESS METER"
-curl normally displays a progress meter during operations, indicating the amount
-of transferred data, transfer speeds and estimated time left, etc.
+curl normally displays a progress meter during operations, indicating the
+amount of transferred data, transfer speeds and estimated time left, etc.
curl displays this data to the terminal by default, so if you invoke curl to
do an operation and it is about to write data to the terminal, it
@@ -103,24 +115,84 @@ any response data to the terminal.
If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
friend.
.SH OPTIONS
-In general, all boolean options are enabled with --option and yet again
+Options start with one or two dashes. Many of the options require an
+additional value next to them.
+
+The short "single-dash" form of the options, -d for example, may be used with
+or without a space between it and its value, although a space is a recommended
+separator. The long "double-dash" form, --data for example, requires a space
+between it and its value.
+
+Short version options that don't need any additional values can be used
+immediately next to each other, like for example you can specify all the
+options -O, -L and -v at once as -OLv.
+
+In general, all boolean options are enabled with --\fBoption\fP and yet again
disabled with --\fBno-\fPoption. That is, you use the exact same option name
but prefix it with "no-". However, in this list we mostly only list and show
the --option version of them. (This concept with --no options was added in
7.19.0. Previously most options were toggled on/off on repeated use of the
same command line option.)
-.IP "-a/--append"
-(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 <agent string>"
+.IP "-#, --progress-bar"
+Make curl display progress as a simple progress bar instead of the standard,
+more informational, meter.
+.IP "-:, --next"
+Tells curl to use a separate operation for the following URL and associated
+options. This allows you to send several URL requests, each with their own
+specific options, for example, such as different user names or custom requests
+for each. (Added in 7.36.0)
+.IP "-0, --http1.0"
+(HTTP) Tells curl to use HTTP version 1.0 instead of using its internally
+preferred: HTTP 1.1.
+.IP "--http1.1"
+(HTTP) Tells curl to use HTTP version 1.1. This is the internal default
+version. (Added in 7.33.0)
+.IP "--http2"
+(HTTP) Tells curl to issue its requests using HTTP 2. This requires that the
+underlying libcurl was built to support it. (Added in 7.33.0)
+.IP "--no-npn"
+Disable the NPN TLS extension. NPN is enabled by default if libcurl was built
+with an SSL library that supports NPN. NPN is used by a libcurl that supports
+HTTP 2 to negotiate HTTP 2 support with the server during https sessions.
+
+(Added in 7.36.0)
+.IP "--no-alpn"
+Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built
+with an SSL library that supports ALPN. ALPN is used by a libcurl that supports
+HTTP 2 to negotiate HTTP 2 support with the server during https sessions.
+
+(Added in 7.36.0)
+.IP "-1, --tlsv1"
+(SSL)
+Forces curl to use TLS version 1.x when negotiating with a remote TLS server.
+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.
+.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.
+.IP "-4, --ipv4"
+This option tells curl to resolve names to IPv4 addresses only, and not for
+example try IPv6.
+.IP "-6, --ipv6"
+This option tells curl to resolve names to IPv6 addresses only, and not for
+example try IPv4.
+.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).
+.IP "-A, --user-agent <agent string>"
(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
the string, surround the string with single quote marks. This can also be set
-with the \fI-H/--header\fP option of course.
+with the \fI-H, --header\fP option of course.
-If this option is set more than once, the last one will be the one that's
-used.
+If this option is used several times, the last one will be used.
.IP "--anyauth"
(HTTP) Tells curl to figure out authentication method by itself, and use the
most secure one the remote site claims to support. This is done by first
@@ -133,65 +205,49 @@ Note that using --anyauth is not recommended if you do uploads from stdin,
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 <name=data>"
-(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".
+.IP "-b, --cookie <name=data>"
+(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
if they match. Using this method also activates the "cookie parser" which will
make curl record incoming cookies too, which may be handy if you're using this
-in combination with the \fI-L/--location\fP option. The file format of the
+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.
-\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!
+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.
-If this option is set more than once, the last one will be the one that's
-used.
-.IP "-B/--use-ascii"
-Enable ASCII transfer when using FTP or LDAP. 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.
+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.
.IP "--basic"
-(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 "--ciphers <list of ciphers>"
-(SSL) Specifies which ciphers to use in the connection. The list of ciphers
-must specify valid ciphers. Read up on SSL cipher list details on this URL:
-\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
-
-NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of
-NSS ciphers is in the NSSCipherSuite entry at this URL:
-\fIhttp://directory.fedora.redhat.com/docs/mod_nss.html#Directives\fP
+(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.
+.IP "-c, --cookie-jar <file name>"
+(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
+cookie file format. If you set the file name to a single dash, "-", the
+cookies will be written to stdout.
+
+This command line option will activate the cookie engine that makes curl
+record and use cookies. Another way to activate it is to use the \fI-b,
+--cookie\fP option.
-If this option is used several times, the last one will override the others.
-.IP "--compressed"
-(HTTP) Request a compressed response using one of the algorithms libcurl
-supports, and return the uncompressed document. If this option is used and
-the server sends an unsupported encoding, curl will report an error.
-.IP "--connect-timeout <seconds>"
-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. See also the \fI-m/--max-time\fP option.
-
-If this option is used several times, the last one will be used.
-.IP "-c/--cookie-jar <file name>"
-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 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.
-
-.B NOTE
If the cookie jar can't be created or written to, the whole curl operation
won't fail or even report an error clearly. Using -v will get a warning
displayed, but that is the only visible feedback you get about this possibly
@@ -199,7 +255,7 @@ lethal situation.
If this option is used several times, the last specified file name will be
used.
-.IP "-C/--continue-at <offset>"
+.IP "-C, --continue-at <offset>"
Continue/Resume a previous file transfer at the given offset. The given offset
is the exact number of bytes that will be skipped, counting from the beginning
of the source file before it is transferred to the destination. If used with
@@ -209,16 +265,41 @@ Use "-C -" to tell curl to automatically find out where/how to resume the
transfer. It then uses the given output/input files to figure that out.
If this option is used several times, the last one will be used.
+.IP "--ciphers <list of ciphers>"
+(SSL) Specifies which ciphers to use in the connection. The list of ciphers
+must specify valid ciphers. Read up on SSL cipher list details on this URL:
+\fIhttps://www.openssl.org/docs/apps/ciphers.html\fP
+
+NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS
+ciphers is in the NSSCipherSuite entry at this URL:
+\fIhttps://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
+
+If this option is used several times, the last one will be used.
+.IP "--compressed"
+(HTTP) Request a compressed response using one of the algorithms curl
+supports, and save the uncompressed document. If this option is used and the
+server sends an unsupported encoding, curl will report an error.
+.IP "--connect-timeout <seconds>"
+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.
+
+If this option is used several times, the last one will be used.
.IP "--create-dirs"
-When used in conjunction with the -o option, curl will create the necessary
-local directory hierarchy as needed. This option creates the dirs mentioned
-with the -o option, nothing else. If the -o file name uses no dir or if the
-dirs it mentions already exist, no dir will be created.
+When used in conjunction with the \fI-o\fP option, curl will create the
+necessary local directory hierarchy as needed. This option creates the dirs
+mentioned with the \fI-o\fP option, nothing else. If the \fI-o\fP file name
+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"
-(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
+Convert LF to CRLF in upload. Useful for MVS (OS/390).
+
+(SMTP added in 7.40.0)
.IP "--crlfile <file>"
(HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation
List that may specify peer certificates that are to be considered revoked.
@@ -226,16 +307,17 @@ List that may specify peer certificates that are to be considered revoked.
If this option is used several times, the last one will be used.
(Added in 7.19.7)
-.IP "-d/--data <data>"
+.IP "-d, --data <data>"
(HTTP) Sends the specified data in a POST request to the HTTP server, in the
same way that a browser does when a user has filled in an HTML form and
presses the submit button. This will cause curl to pass the data to the server
using the content-type application/x-www-form-urlencoded. Compare to
-\fI-F/--form\fP.
+\fI-F, --form\fP.
-\fI-d/--data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
-you should instead use the \fI--data-binary\fP option. To URL-encode the value
-of a form field you may use \fI--data-urlencode\fP.
+\fI-d, --data\fP is the same as \fI--data-ascii\fP. \fI--data-raw\fP is almost
+the same but does not have a special interpretation of the @ character. To
+post data purely binary, you should instead use the \fI--data-binary\fP option.
+To URL-encode the value of a form field you may use \fI--data-urlencode\fP.
If any of these options is used more than once on the same command line, the
data pieces specified will be merged together with a separating
@@ -243,20 +325,40 @@ data pieces specified will be merged together with a separating
chunk that looks like \&'name=daniel&skill=lousy'.
If you start the data with the letter @, the rest should be a file name to
-read the data from, or - if you want curl to read the data from stdin. The
-contents of the file must already be URL-encoded. Multiple files can also be
-specified. Posting data from a file named 'foobar' would thus be done with
-\fI--data @foobar\fP.
+read the data from, or - if you want curl to read the data from
+stdin. Multiple files can also be specified. Posting data from a file
+named 'foobar' would thus be done with \fI--data\fP @foobar. When --data is
+told to read from a file like that, carriage returns and newlines will be
+stripped out. If you don't want the @ character to have a special
+interpretation use \fI--data-raw\fP instead.
+.IP "-D, --dump-header <file>"
+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.
+
+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 <data>"
+See \fI-d, --data\fP.
.IP "--data-binary <data>"
(HTTP) This posts data exactly as specified with no extra processing
whatsoever.
If you start the data with the letter @, the rest should be a filename. Data
is posted in a similar manner as \fI--data-ascii\fP does, except that newlines
-are preserved and conversions are never done.
+and carriage returns are preserved and conversions are never done.
If this option is used several times, the ones following the first will append
-data as described in \fI-d/--data\fP.
+data as described in \fI-d, --data\fP.
+.IP "--data-raw <data>"
+(HTTP) This posts data similarly to \fI--data\fP but without the special
+interpretation of the @ character. See \fI-d, --data\fP.
+(Added in 7.43.0)
.IP "--data-urlencode <data>"
(HTTP) This posts data, similar to the other --data options with the exception
that this performs URL-encoding. (Added in 7.18.0)
@@ -284,87 +386,130 @@ URL-encode that data and pass it on in the POST. The name part gets an equal
sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
name is expected to be URL-encoded already.
.RE
+.IP "--delegation LEVEL"
+Set \fILEVEL\fP to tell the server what it is allowed to delegate when it
+comes to user credentials. Used with GSS/kerberos.
+.RS
+.IP "none"
+Don't allow any delegation.
+.IP "policy"
+Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
+service ticket, which is a matter of realm policy.
+.IP "always"
+Unconditionally allow the server to delegate.
+.RE
.IP "--digest"
-(HTTP) Enables HTTP Digest authentication. This is a authentication that
-prevents the password from being sent over the wire in clear text. Use this in
-combination with the normal \fI-u/--user\fP option to set user name and
-password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
+(HTTP) Enables HTTP Digest authentication. This is an authentication scheme
+that prevents the password from being sent over the wire in clear text. Use
+this in combination with the normal \fI-u, --user\fP option to set user name
+and password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
related options.
-If this option is used several times, the following occurrences make no
-difference.
+If this option is used several times, only the first one is used.
.IP "--disable-eprt"
(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
active FTP transfers. Curl will normally always first attempt to use EPRT,
then LPRT before using PORT, but with this option, it will use PORT right
-away. EPRT and LPRT are extensions to the original FTP protocol, and may not work
-on all servers, but they enable more functionality in a better way than the
-traditional PORT command.
+away. EPRT and LPRT are extensions to the original FTP protocol, and may not
+work on all servers, but they enable more functionality in a better way than
+the traditional PORT command.
\fB--eprt\fP can be used to explicitly enable EPRT again and \fB--no-eprt\fP
is an alias for \fB--disable-eprt\fP.
Disabling EPRT only changes the active behavior. If you want to switch to
-passive mode you need to not use \fI-P/--ftp-port\fP or force it with
+passive mode you need to not use \fI-P, --ftp-port\fP or force it with
\fI--ftp-pasv\fP.
.IP "--disable-epsv"
(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
transfers. Curl will normally always first attempt to use EPSV before PASV,
but with this option, it will not try using EPSV.
-\fB--epsv\fP can be used to explicitly enable EPRT again and \fB--no-epsv\fP
+\fB--epsv\fP can be used to explicitly enable EPSV again and \fB--no-epsv\fP
is an alias for \fB--disable-epsv\fP.
Disabling EPSV only changes the passive behavior. If you want to switch to
-active mode you need to use \fI-P/--ftp-port\fP.
-.IP "-D/--dump-header <file>"
-Write the protocol headers to the specified file.
-
-This option is handy to use when you want to store the headers that a 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 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 "-e/--referer <URL>"
-(HTTP) Sends the "Referer Page" information to the HTTP server. This can also
-be set with the \fI-H/--header\fP flag of course. When used with
-\fI-L/--location\fP you can append ";auto" to the --referer URL to make curl
+active mode you need to use \fI-P, --ftp-port\fP.
+.IP "--dns-interface <interface>"
+Tell curl to send outgoing DNS requests through <interface>. This option
+is a counterpart to \fI--interface\fP (which does not affect DNS). The
+supplied string must be an interface name (not an address).
+
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one. (Added in
+7.33.0)
+.IP "--dns-ipv4-addr <ip-address>"
+Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that
+the DNS requests originate from this address. The argument should be a
+single IPv4 address.
+
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one. (Added in
+7.33.0)
+.IP "--dns-ipv6-addr <ip-address>"
+Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that
+the DNS requests originate from this address. The argument should be a
+single IPv6 address.
+
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one. (Added in
+7.33.0)
+.IP "--dns-servers <ip-address,ip-address>"
+Set the list of DNS servers to be used instead of the system default.
+The list of IP addresses should be separated with commas. Port numbers
+may also optionally be given as \fI:<port-number>\fP after each IP
+address.
+
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one. (Added in
+7.33.0)
+.IP "-e, --referer <URL>"
+(HTTP) Sends the "Referrer Page" information to the HTTP server. This can also
+be set with the \fI-H, --header\fP flag of course. When used with
+\fI-L, --location\fP you can append ";auto" to the --referer URL to make curl
automatically set the previous URL when it follows a Location: header. The
\&";auto" string can be used alone, even if you don't set an initial --referer.
If this option is used several times, the last one will be used.
+.IP "-E, --cert <certificate[:password]>"
+(SSL) Tells curl to use the specified client certificate file when getting a
+file with HTTPS, FTPS or another SSL-based protocol. The certificate must be
+in PKCS#12 format if using Secure Transport, or PEM format if using any other
+engine. If the optional password isn't specified, it will be queried
+for on the terminal. Note that this option assumes a \&"certificate" file that
+is the private key and the private certificate concatenated! See \fI--cert\fP
+and \fI--key\fP to specify them independently.
+
+If curl is built against the NSS SSL library then this option can tell
+curl the nickname of the certificate to use within the NSS database defined
+by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
+NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
+loaded. If you want to use a file from the current directory, please precede
+it with "./" prefix, in order to avoid confusion with a nickname. If the
+nickname contains ":", it needs to be preceded by "\\" so that it is not
+recognized as password delimiter. If the nickname contains "\\", it needs to
+be escaped as "\\\\" so that it is not recognized as an escape character.
+
+(iOS and Mac OS X only) If curl is built against Secure Transport, then the
+certificate string can either be the name of a certificate/private key in the
+system or user keychain, or the path to a PKCS#12-encoded certificate and
+private key. If you want to use a file from the current directory, please
+precede it with "./" prefix, in order to avoid confusion with a nickname.
+
+If this option is used several times, the last one will be used.
.IP "--engine <name>"
Select the OpenSSL crypto engine to use for cipher
operations. Use \fI--engine list\fP to print a list of build-time supported
engines. Note that not all (or none) of the engines may be available at
run-time.
.IP "--environment"
-(RISC OS ONLY) Sets a range of environment variables, using the names the -w
-option supports, to allow easier extraction of useful information after having
-run curl.
+(RISC OS ONLY) Sets a range of environment variables, using the names the
+\fI-w\fP option supports, to allow easier extraction of useful information
+after having run curl.
.IP "--egd-file <file>"
(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
is used to seed the random engine for SSL connections. See also the
\fI--random-file\fP option.
-.IP "-E/--cert <certificate[:password]>"
-(SSL) Tells curl to use the specified certificate file when getting a file
-with HTTPS or FTPS. The certificate must be in PEM format. If the optional
-password isn't specified, it will be queried for on the terminal. Note that
-this option assumes a \&"certificate" file that is the private key and the
-private certificate concatenated! See \fI--cert\fP and \fI--key\fP to specify
-them independently.
-
-If curl is built against the NSS SSL library then this option tells
-curl the nickname of the certificate to use within the NSS database defined
-by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
-NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
-loaded.
-
-If this option is used several times, the last one will be used.
.IP "--cert-type <type>"
(SSL) Tells curl what certificate type the provided certificate is in. PEM,
DER and ENG are recognized types. If not specified, PEM is assumed.
@@ -384,50 +529,134 @@ The windows version of curl will automatically look for a CA certs file named
\'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
Current Working Directory, or in any folder along your PATH.
-If curl is built against the NSS SSL library then this option tells
-curl the nickname of the CA certificate to use within the NSS database
-defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb).
-If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files
-may be loaded.
+If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
+(libnsspem.so) needs to be available for this option to work properly.
If this option is used several times, the last one will be used.
.IP "--capath <CA certificate directory>"
(SSL) Tells curl to use the specified certificate directory to verify the
-peer. The certificates must be in PEM format, and the directory must have been
-processed using the c_rehash utility supplied with openssl. Using
-\fI--capath\fP can allow curl to make SSL-connections much more efficiently
-than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA
-certificates.
+peer. Multiple paths can be provided by separating them with ":" (e.g.
+\&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
+built against OpenSSL, the directory must have been processed using the
+c_rehash utility supplied with OpenSSL. Using \fI--capath\fP can allow
+OpenSSL-powered curl to make SSL-connections much more efficiently than using
+\fI--cacert\fP if the \fI--cacert\fP file contains many CA certificates.
+
+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 <pinned public key>"
+(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.
+
+Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for NSS and
+wolfSSL/CyaSSL. Other SSL backends not supported.
If this option is used several times, the last one will be used.
-.IP "-f/--fail"
+.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 OpenSSL, GnuTLS and NSS backends.
+(Added in 7.41.0)
+.IP "--false-start"
+
+(SSL) Tells curl to use false start during the TLS handshake. False start is a
+mode where a TLS client will start sending application data before verifying
+the server's Finished message, thus saving a round trip when performing a full
+handshake.
+
+This is currently only implemented in the NSS and Secure Transport (on iOS 7.0
+or later, or OS X 10.9 or later) backends.
+(Added in 7.42.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 a 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
(response codes 401 and 407).
+.IP "-F, --form <name=content>"
+(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
+submit button. This causes curl to POST data using the Content-Type
+multipart/form-data according to RFC 2388. This enables uploading of binary
+files etc. To force the 'content' part to be a file, prefix the file name with
+an @ sign. To just get the content part from a file, prefix the file name with
+the symbol <. The difference between @ and < is then that @ makes a file get
+attached in the post as a file upload, while the < makes a text field and just
+get the contents for that text field from a file.
+
+Example, to send your password file to the server, where
+\&'password' is the name of the form-field to which /etc/passwd will be the
+input:
+
+\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
+
+To read content from stdin instead of a file, use - as the filename. This goes
+for both @ and < constructs.
+
+You can also tell curl what Content-Type to use by using 'type=', in a manner
+similar to:
+
+\fBcurl\fP -F "web=@index.html;type=text/html" url.com
+
+or
+
+\fBcurl\fP -F "name=daniel;type=text/foo" url.com
+
+You can also explicitly change the name field of a file upload part by setting
+filename=, like this:
+
+\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
+
+If filename/path contains ',' or ';', it must be quoted by double-quotes like:
+
+\fBcurl\fP -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" url.com
+
+or
+
+\fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' url.com
+
+Note that if a filename/path is quoted by double-quotes, any double-quote
+or backslash within the filename must be escaped by backslash.
+
+See further examples and details in the MANUAL.
+
+This option can be used multiple times.
.IP "--ftp-account [data]"
(FTP) When an FTP server asks for "account data" after user name and password
has been provided, this data is sent off using the ACCT command. (Added in
7.13.0)
-If this option is used twice, the second will override the previous use.
+If this option is used several times, the last one will be used.
+.IP "--ftp-alternative-to-user <command>"
+(FTP) If authenticating with the USER and PASS commands fails, send this
+command. When connecting to Tumbleweed's Secure Transport server over FTPS
+using a client certificate, using "SITE AUTH" will tell the server to retrieve
+the username from the certificate. (Added in 7.15.5)
.IP "--ftp-create-dirs"
(FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't
currently exist on the server, the standard behavior of curl is to
fail. Using this option, curl will instead attempt to create missing
directories.
.IP "--ftp-method [method]"
-(FTP) Control what method curl should use to reach a file on a FTP(S)
+(FTP) Control what method curl should use to reach a file on an FTP(S)
server. The method argument should be one of the following alternatives:
.RS
.IP multicwd
curl does a single CWD operation for each path part in the given URL. For deep
-hierarchies this means very many commands. This is how RFC1738 says it should
+hierarchies this means very many commands. This is how RFC 1738 says it should
be done. This is the default but the slowest behavior.
.IP nocwd
curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
@@ -437,23 +666,19 @@ curl does one CWD with the full target directory and then operates on the file
\&"normally" (like in the multicwd case). This is somewhat more standards
compliant than 'nocwd' but without the full penalty of 'multicwd'.
.RE
+.IP
(Added in 7.15.1)
.IP "--ftp-pasv"
-(FTP) Use passive mode for the data conection. Passive is the internal default
+(FTP) Use passive mode for the data connection. Passive is the internal default
behavior, but using this option can be used to override a previous
\fI-P/-ftp-port\fP option. (Added in 7.11.0)
-If this option is used several times, the following occurrences make no
-difference. Undoing an enforced passive really isn't doable but you must then
-instead enforce the correct \fI-P/--ftp-port\fP again.
+If this option is used several times, only the first one is used. Undoing an
+enforced passive really isn't doable but you must then instead enforce the
+correct \fI-P, --ftp-port\fP again.
Passive mode means that curl will try the EPSV command first and then PASV,
unless \fI--disable-epsv\fP is used.
-.IP "--ftp-alternative-to-user <command>"
-(FTP) If authenticating with the USER and PASS commands fails, send this
-command. When connecting to Tumbleweed's Secure Transport server over FTPS
-using a client certificate, using "SITE AUTH" will tell the server to retrieve
-the username from the certificate. (Added in 7.15.5)
.IP "--ftp-skip-pasv-ip"
(FTP) Tell curl to not use the IP address the server suggests in its response
to curl's PASV command when curl connects the data connection. Instead curl
@@ -466,30 +691,12 @@ This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
FTP servers, mainly drftpd, require this non-standard command for
directory listings as well as up and downloads in PASV mode.
(Added in 7.20.x)
-.IP "--ssl"
-(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a
-non-secure connection if the server doesn't support SSL/TLS. See also
-\fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
-encryption required. (Added in 7.20.0)
-
-This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0) and that
-can still be used but will be removed in a future version.
-.IP "--ftp-ssl-control"
-(FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure
-authentication, but non-encrypted data transfers for efficiency. Fails the
-transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
-.IP "--ssl-reqd"
-(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the
-connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
-
-This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5) and
-that can still be used but will be removed in a future version.
.IP "--ftp-ssl-ccc"
(FTP) Use CCC (Clear Command Channel)
Shuts down the SSL/TLS layer after authenticating. The rest of the
control channel communication will be unencrypted. This allows
NAT routers to follow the FTP transaction. The default mode is
-passive. See --ftp-ssl-ccc-mode for other modes.
+passive. See \fI--ftp-ssl-ccc-mode\fP for other modes.
(Added in 7.16.1)
.IP "--ftp-ssl-ccc-mode [active/passive]"
(FTP) Use CCC (Clear Command Channel)
@@ -498,98 +705,85 @@ instead wait for the server to do it, and will not reply to the
shutdown from the server. The active mode initiates the shutdown and
waits for a reply from the server.
(Added in 7.16.2)
-.IP "-F/--form <name=content>"
-(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 RFC2388. This enables uploading of binary
-files etc. To force the 'content' part to be a file, prefix the file name
-with an @ sign. To just get the content part from a file, prefix the file name
-with the symbol <. The difference between @ and < is then that @ makes a file
-get attached in the post as a file upload, while the < makes a text field and
-just get the contents for that text field from a file.
-
-Example, to send your password file to the server, where
-\&'password' is the name of the form-field to which /etc/passwd will be the
-input:
-
-\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
-
-To read the file's content from stdin instead of a file, use - where the file
-name should've been. This goes for both @ and < constructs.
-
-You can also tell curl what Content-Type to use by using 'type=', in a manner
-similar to:
-
-\fBcurl\fP -F "web=@index.html;type=text/html" url.com
-
-or
-
-\fBcurl\fP -F "name=daniel;type=text/foo" url.com
-
-You can also explicitly change the name field of an file upload part by
-setting filename=, like this:
-
-\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
-
-See further examples and details in the MANUAL.
-
-This option can be used multiple times.
+.IP "--ftp-ssl-control"
+(FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure
+authentication, but non-encrypted data transfers for efficiency. Fails the
+transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
+that can still be used but will be removed in a future version.
.IP "--form-string <name=string>"
(HTTP) Similar to \fI--form\fP except that the value string for the named
parameter is used literally. Leading \&'@' and \&'<' characters, and the
\&';type=' string in the value have no special meaning. Use this in preference
to \fI--form\fP if there's any possibility that the string value may
accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
-.IP "-g/--globoff"
+.IP "-g, --globoff"
This option switches off the "URL globbing parser". When you set this option,
you can specify URLs that contain the letters {}[] without having them being
interpreted by curl itself. Note that these letters are not normal legal URL
contents but they should be encoded according to the URI standard.
-.IP "-G/--get"
-When used, this option will make all data specified with \fI-d/--data\fP or
-\fI--data-binary\fP to be used in a HTTP GET request instead of the POST
-request that otherwise would be used. The data will be appended to the URL
-with a '?' separator.
+.IP "-G, --get"
+When used, this option will make all data specified with \fI-d, --data\fP,
+\fI--data-binary\fP or \fI--data-urlencode\fP to be used in an HTTP GET
+request instead of the POST request that otherwise would be used. The data
+will be appended to the URL with a '?' separator.
If used in combination with -I, the POST data will instead be appended to the
URL with a HEAD request.
-If this option is used several times, the following occurrences make no
-difference. This is because undoing a GET doesn't make sense, but you should
-then instead enforce the alternative method you prefer.
-.IP "-h/--help"
-Usage help.
-.IP "-H/--header <header>"
-(HTTP) Extra header to use when getting a web page. You may specify any number
-of extra headers. Note that if you should add a custom header that has the
-same name as one of the internal ones curl would use, your externally set
-header will be used instead of the internal one. This allows you to make even
-trickier stuff than curl would normally do. You should not replace internally
-set headers without knowing perfectly well what you're doing. Remove an
-internal header by giving a replacement without content on the right side of
-the colon, as in: -H \&"Host:".
+If this option is used several times, only the first one is used. This is
+because undoing a GET doesn't make sense, but you should then instead enforce
+the alternative method you prefer.
+.IP "-H, --header <header>"
+(HTTP) Extra header to include in the request when sending HTTP to a
+server. You may specify any number of extra headers. Note that if you should
+add a custom header that has the same name as one of the internal ones curl
+would use, your externally set header will be used instead of the internal
+one. This allows you to make even trickier stuff than curl would normally
+do. You should not replace internally set headers without knowing perfectly
+well what you're doing. Remove an internal header by giving a replacement
+without content on the right side of the colon, as in: -H \&"Host:". If you
+send the custom header with no-value then its header must be terminated with a
+semicolon, such as \-H \&"X-Custom-Header;" to send "X-Custom-Header:".
curl will make sure that each header you add/replace is sent with the proper
end-of-line marker, you should thus \fBnot\fP add that as a part of the header
content: do not add newlines or carriage returns, they will only mess things up
for you.
-See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options.
+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/
+
+\fBWARNING\fP: headers set with this option will be set in all requests - even
+after redirects are followed, like when told with \fB-L, --location\fP. This
+can lead to the header being sent to other hosts than the original host, so
+sensitive headers should be used with caution combined with following
+redirects.
This option can be used multiple times to add/replace/remove multiple headers.
.IP "--hostpubmd5 <md5>"
-Pass a string containing 32 hexadecimal digits. The string should be the 128
-bit MD5 checksum of the remote host's public key, curl will refuse the
-connection with the host unless the md5sums match. This option is only for SCP
-and SFTP transfers. (Added in 7.17.1)
+(SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should
+be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
+the connection with the host unless the md5sums match. (Added in 7.17.1)
.IP "--ignore-content-length"
(HTTP)
Ignore the Content-Length header. This is particularly useful for servers
running Apache 1.x, which will report incorrect Content-Length for files
larger than 2 gigabytes.
-.IP "-i/--include"
+.IP "-i, --include"
(HTTP) Include the HTTP-header in the output. The HTTP-header includes things
like server-name, date of the document, HTTP-version and more...
+.IP "-I, --head"
+(HTTP/FTP/FILE)
+Fetch the HTTP-header only! HTTP-servers feature the command HEAD
+which this uses to get nothing but the header of a document. When used
+on an FTP or FILE file, curl displays the file size and last modification
+time only.
.IP "--interface <name>"
Perform an operation using a specified interface. You can enter interface
name, IP address or host name. An example could look like:
@@ -597,72 +791,46 @@ name, IP address or host name. An example could look like:
curl --interface eth0:1 http://www.netscape.com/
If this option is used several times, the last one will be used.
-.IP "-I/--head"
-(HTTP/FTP/FILE)
-Fetch the HTTP-header only! HTTP-servers feature the command HEAD
-which this uses to get nothing but the header of a document. When used
-on a FTP or FILE file, curl displays the file size and last modification
-time only.
-.IP "-j/--junk-session-cookies"
+.IP "-j, --junk-session-cookies"
(HTTP) When curl is told to read cookies from a given file, this option will
make it discard all "session cookies". This will basically have the same effect
as if a new session is started. Typical browsers always discard session
cookies when they're closed down.
-.IP "-J/--remote-header-name"
-(HTTP) This option tells the -O/--remote-name option to use the server-specified
-Content-Disposition filename instead of extracting a filename from the URL.
-.IP "-k/--insecure"
+.IP "-J, --remote-header-name"
+(HTTP) This option tells the \fI-O, --remote-name\fP option to use the
+server-specified Content-Disposition filename instead of extracting a filename
+from the URL.
+
+There's no attempt to decode %-sequences (yet) in the provided file name, so
+this option may provide you with rather unexpected file names.
+.IP "-k, --insecure"
(SSL) This option explicitly allows curl to perform "insecure" SSL connections
and transfers. All SSL connections are attempted to be made secure by using
the CA certificate bundle installed by default. This makes all connections
-considered "insecure" fail unless \fI-k/--insecure\fP is used.
+considered "insecure" fail unless \fI-k, --insecure\fP is used.
See this online resource for further details:
\fBhttp://curl.haxx.se/docs/sslcerts.html\fP
-.IP "--keepalive-time <seconds>"
-This option sets the time a connection needs to remain idle before sending
-keepalive probes and the time between individual keepalive probes. It is
-currently effective on operating systems offering the TCP_KEEPIDLE and
-TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
-option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
-
-If this option is used multiple times, the last occurrence sets the amount.
-.IP "--key <key>"
-(SSL/SSH) Private key file name. Allows you to provide your private key in this
-separate file.
-
-If this option is used several times, the last one will be used.
-.IP "--key-type <type>"
-(SSL) Private key file type. Specify which type your \fI--key\fP provided
-private key is. DER, PEM, and ENG are supported. If not specified, PEM is
-assumed.
-
-If this option is used several times, the last one will be used.
-.IP "--krb <level>"
-(FTP) Enable Kerberos authentication and use. The level must be entered and
-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 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 "-K/--config <config file>"
+.IP "-K, --config <config file>"
Specify which config file to read curl arguments from. The config file is a
text file in which command line arguments can be written which then will be
-used as if they were written on the actual command line. Options and their
-parameters must be specified on the same config file line, separated by
-whitespace, colon, the equals sign or any combination thereof (however,
-the preferred separator is the equals sign). If the parameter is to contain
-whitespace, the parameter must be enclosed within quotes. Within double
-quotes, the following escape sequences are available: \\\\, \\", \\t, \\n,
-\\r and \\v. A backslash preceding any other letter is ignored. If the
-first column of a config line is a '#' character, the rest of the line will be
-treated as a comment. Only write one option per physical line in the config
-file.
-
-Specify the filename to -K/--config as '-' to make curl read the file from
+used as if they were written on the actual command line.
+
+Options and their parameters must be specified on the same config file line,
+separated by whitespace, colon, or the equals sign. Long option names can
+optionally be given in the config file without the initial double dashes and
+if so, the colon or equals characters can be used as separators. If the option
+is specified with one or two dashes, there can be no colon or equals character
+between the option and its parameter.
+
+If the parameter is to contain whitespace, the parameter must be enclosed
+within quotes. Within double quotes, the following escape sequences are
+available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash preceding any other
+letter is ignored. If the first column of a config line is a '#' character,
+the rest of the line will be treated as a comment. Only write one option per
+physical line in the config file.
+
+Specify the filename to -K, --config as '-' to make curl read the file from
stdin.
Note that to be able to specify a URL in the config file, you need to specify
@@ -671,21 +839,18 @@ line. So, it could look similar to this:
url = "http://curl.haxx.se/docs/"
-Long option names can optionally be given in the config file without the
-initial double dashes.
-
When curl is invoked, it always (unless \fI-q\fP is used) checks for a default
config file and uses it if found. The default config file is checked for in
the following places in this order:
1) curl tries to find the "home dir": It first checks for the CURL_HOME and
then the HOME environment variables. Failing that, it uses getpwuid() on
-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
@@ -703,21 +868,86 @@ referer = "http://nowhereatall.com/"
.fi
This option can be used multiple times to load multiple config files.
+.IP "--keepalive-time <seconds>"
+This option sets the time a connection needs to remain idle before sending
+keepalive probes and the time between individual keepalive probes. It is
+currently effective on operating systems offering the TCP_KEEPIDLE and
+TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
+option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
+
+If this option is used several times, the last one will be used. If
+unspecified, the option defaults to 60 seconds.
+.IP "--key <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'.
+
+If this option is used several times, the last one will be used.
+.IP "--key-type <type>"
+(SSL) Private key file type. Specify which type your \fI--key\fP provided
+private key is. DER, PEM, and ENG are supported. If not specified, PEM is
+assumed.
+
+If this option is used several times, the last one will be used.
+.IP "--krb <level>"
+(FTP) Enable Kerberos authentication and use. The level must be entered and
+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.
+
+If this option is used several times, the last one will be used.
+.IP "-l, --list-only"
+(FTP)
+When listing an FTP directory, this switch forces a name-only view. This is
+especially useful if the user wants to machine-parse the contents of an FTP
+directory since the normal directory view doesn't use a standard look or
+format. When used like this, the option causes a NLST command to be sent to
+the server instead of LIST.
+
+Note: Some FTP servers list only files in their response to NLST; they do not
+include sub-directories and symbolic links.
+
+(POP3)
+When retrieving a specific email from POP3, this switch forces a LIST command
+to be performed instead of RETR. This is particularly useful if the user wants
+to see if a specific message id exists on the server and what size it is.
+
+Note: When combined with \fI-X, --request <command>\fP, this option can be used
+to send an UIDL command instead, so the user may use the email's unique
+identifier rather than it's message id to make the request. (Added in 7.21.5)
+.IP "-L, --location"
+(HTTP/HTTPS) If the server reports that the requested page has moved to a
+different location (indicated with a Location: header and a 3XX response code),
+this option will make curl redo the request on the new place. If used together
+with \fI-i, --include\fP or \fI-I, --head\fP, headers from all requested pages
+will be shown. When authentication is used, curl only sends its credentials to
+the initial host. If a redirect takes curl to a different host, it won't be
+able to intercept the user+password. See also \fI--location-trusted\fP on how
+to change this. You can limit the amount of redirects to follow by using the
+\fI--max-redirs\fP option.
+
+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 <file>"
Append this option to any ordinary curl command line, and you will get a
-libcurl-using source code written to the file that does the equivalent
+libcurl-using C source code written to the file that does the equivalent
of what your command-line operation does!
-NOTE: this does not properly support -F and the sending of multipart
-formposts, so in those cases the output program will be missing necessary
-calls to \fIcurl_formadd(3)\fP, and possibly more.
-
If this option is used several times, the last given file name will be
used. (Added in 7.16.1)
.IP "--limit-rate <speed>"
-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.
+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.
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
@@ -727,53 +957,47 @@ The given rate is the average speed counted during the entire transfer. It
means that curl might use higher transfer speeds in short bursts, but over
time it uses no more than the given rate.
-If you also use the \fI-Y/--speed-limit\fP option, that option will take
+If you also use the \fI-Y, --speed-limit\fP option, that option will take
precedence and might cripple the rate-limiting slightly, to help keeping the
speed-limit logic working.
If this option is used several times, the last one will be used.
-.IP "-l/--list-only"
-(FTP)
-When listing an FTP directory, this switch forces a name-only view.
-Especially useful if you want to machine-parse the contents of an FTP
-directory since the normal directory view doesn't use a standard look
-or format.
-
-This option causes an FTP NLST command to be sent. Some FTP servers
-list only files in their response to NLST; they do not include
-subdirectories and symbolic links.
-
.IP "--local-port <num>[-num]"
Set a preferred number or range of local port numbers to use for the
connection(s). Note that port numbers by nature are a scarce resource that
will be busy at times so setting this range to something too narrow might
cause unnecessary connection setup failures. (Added in 7.15.2)
-.IP "-L/--location"
-(HTTP/HTTPS) If the server reports that the requested page has moved to a
-different location (indicated with a Location: header and a 3XX response code),
-this option will make curl redo the request on the new place. If used together
-with \fI-i/--include\fP or \fI-I/--head\fP, headers from all requested pages
-will be shown. When authentication is used, curl only sends its credentials to
-the initial host. If a redirect takes curl to a different host, it won't be
-able to intercept the user+password. See also \fI--location-trusted\fP on how
-to change this. You can limit the amount of redirects to follow by using the
-\fI--max-redirs\fP option.
-
-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.
.IP "--location-trusted"
-(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
+(HTTP/HTTPS) Like \fI-L, --location\fP, but will allow sending the name +
password to all hosts that the site may redirect to. This may or may not
introduce a security breach if the site redirects you to a site to which
you'll send your authentication info (which is plaintext in the case of HTTP
Basic authentication).
-.IP "--mail-rcpt <address>"
-(SMTP) Specify a single address that the given mail should get sent to. This
-option can be used multiple times to specify many recipients.
+.IP "-m, --max-time <seconds>"
+Maximum time in seconds that you allow the whole operation to take. This is
+useful for preventing your batch jobs from hanging for hours due to slow
+networks or links going down. 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--connect-timeout\fP
+option.
-(Added in 7.20.0)
+If this option is used several times, the last one will be used.
+.IP "--login-options <options>"
+Specify the login options to use during server authentication.
+
+You can use the login options to specify protocol specific options that may
+be used during authentication. At present only IMAP, POP3 and SMTP support
+login options. For more information about the login options please see
+RFC 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in
+7.34.0).
+
+If this option is used several times, the last one will be used.
+.IP "--mail-auth <address>"
+(SMTP) Specify a single address. This will be used to specify the
+authentication address (identity) of a submitted message that is being relayed
+to another server.
+
+(Added in 7.25.0)
.IP "--mail-from <address>"
(SMTP) Specify a single address that the given mail should get sent from.
@@ -783,65 +1007,104 @@ Specify the maximum size (in bytes) of a file to download. If the file
requested is larger than this value, the transfer will not start and curl will
return with exit code 63.
-\fBNOTE:\fP The file size is not always known prior to download, and for such files
-this option has no effect even if the file transfer ends up being larger than
-this given limit. This concerns both FTP and HTTP transfers.
-.IP "-m/--max-time <seconds>"
-Maximum time in seconds that you allow the whole operation to take. This is
-useful for preventing your batch jobs from hanging for hours due to slow
-networks or links going down. See also the \fI--connect-timeout\fP option.
+\fBNOTE:\fP The file size is not always known prior to download, and for such
+files this option has no effect even if the file transfer ends up being larger
+than this given limit. This concerns both FTP and HTTP transfers.
+.IP "--mail-rcpt <address>"
+(SMTP) Specify a single address, user name or mailing list name.
+
+When performing a mail transfer, the recipient should specify a valid email
+address to send the mail to. (Added in 7.20.0)
+
+When performing an address verification (VRFY command), the recipient should be
+specified as the user name or user name and domain (as per Section 3.5 of
+RFC5321). (Added in 7.34.0)
+
+When performing a mailing list expand (EXPN command), the recipient should be
+specified using the mailing list name, such as "Friends" or "London-Office".
+(Added in 7.34.0)
+.IP "--max-redirs <num>"
+Set maximum number of redirection-followings allowed. If \fI-L, --location\fP
+is used, this option can be used to prevent curl from following redirections
+\&"in absurdum". By default, the limit is set to 50 redirections. Set this
+option to -1 to make it limitless.
If this option is used several times, the last one will be used.
-.IP "-M/--manual"
-Manual. Display the huge help text.
-.IP "-n/--netrc"
+.IP "--metalink"
+This option can tell curl to parse and process a given URI as Metalink file
+(both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors
+listed within for failover if there are errors (such as the file or server not
+being available). It will also verify the hash of the file after the download
+completes. The Metalink file itself is downloaded and processed in memory and
+not stored in the local file system.
+
+Example to use a remote Metalink file:
+
+\fBcurl\fP --metalink http://www.example.com/example.metalink
+
+To use a Metalink file in the local file system, use FILE protocol
+(file://):
+
+\fBcurl\fP --metalink file://example.metalink
+
+Please note that if FILE protocol is disabled, there is no way to use
+a local Metalink file at the time of this writing. Also note that if
+\fI--metalink\fP and \fI--include\fP are used together, \fI--include\fP will be
+ignored. This is because including headers in the response will break
+Metalink parser and if the headers are included in the file described
+in Metalink file, hash check will fail.
+
+(Added in 7.27.0, if built against the libmetalink library.)
+.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
-.BR netrc(4)
-or
-.BR ftp(1)
-for details on the file format. Curl will not complain if that file
-doesn't have the right permissions (it should not be either world- or
-group-readable). The environment variable "HOME" is used to find the home
-directory.
+Unix. If used with HTTP, curl will enable user authentication. See
+\fInetrc(5)\fP \fIftp(1)\fP for details on the file format. Curl will not
+complain if that file doesn't have the right permissions (it should not be
+either world- or group-readable). The environment variable "HOME" is used to
+find the home directory.
A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
to FTP to the machine host.domain.com with user name \&'myself' and password
\&'secret' should look similar to:
.B "machine host.domain.com login myself password secret"
+.IP "-N, --no-buffer"
+Disables the buffering of the output stream. In normal work situations, curl
+will use a standard buffered output stream that will have the effect that it
+will output the data in chunks, not necessarily exactly when the data arrives.
+Using this option will disable that buffering.
+
+Note that this is the negated option name documented. You can thus use
+\fI--buffer\fP to enforce the buffering.
+.IP "--netrc-file"
+This option is similar to \fI--netrc\fP, except that you provide the path
+(absolute or relative) to the netrc file that Curl should use.
+You can only specify one netrc file per invocation. If several
+\fI--netrc-file\fP options are provided, only the \fBlast one\fP will be used.
+(Added in 7.21.5)
+
+This option overrides any use of \fI--netrc\fP as they are mutually exclusive.
+It will also abide by \fI--netrc-optional\fP if specified.
+
.IP "--netrc-optional"
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 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.
+(HTTP) Enables Negotiate (SPNEGO) authentication.
-If you want to enable Negotiate for your proxy authentication, then use
+If you want to enable Negotiate (SPNEGO) for proxy authentication, then use
\fI--proxy-negotiate\fP.
-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.
+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.
-When using this option, you must also provide a fake -u/--user option to
+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
-user name and password from the -u option aren't actually used.
+user name and password from the \fI-u\fP option aren't actually used.
-If this option is used several times, the following occurrences make no
-difference.
-.IP "-N/--no-buffer"
-Disables the buffering of the output stream. In normal work situations, curl
-will use a standard buffered output stream that will have the effect that it
-will output the data in chunks, not necessarily exactly when the data arrives.
-Using this option will disable that buffering.
-
-Note that this is the negated option name documented. You can thus use
-\fI--buffer\fP to enforce the buffering.
+If this option is used several times, only the first one is used.
.IP "--no-keepalive"
Disables the use of keepalive messages on the TCP connection, as by default
curl enables them.
@@ -876,11 +1139,10 @@ If you want to enable NTLM for your proxy authentication, then use
\fI--proxy-ntlm\fP.
This option requires a library built with SSL support. Use
-\fI-V/--version\fP to see if your curl supports NTLM.
+\fI-V, --version\fP to see if your curl supports NTLM.
-If this option is used several times, the following occurrences make no
-difference.
-.IP "-o/--output <file>"
+If this option is used several times, only the first one is used.
+.IP "-o, --output <file>"
Write output to <file> instead of stdout. If you are using {} or [] to fetch
multiple documents, you can use '#' followed by a number in the <file>
specifier. That variable will be replaced with the current string for the URL
@@ -897,37 +1159,112 @@ You may use this option as many times as the number of URLs you have.
See also the \fI--create-dirs\fP option to create the local directories
dynamically. Specifying the output as '-' (a single dash) will force the
output to be done to stdout.
-.IP "-O/--remote-name"
+.IP "-O, --remote-name"
Write output to a local file named like the remote file we get. (Only the file
part of the remote file is used, the path is cut off.)
The remote file name to use for saving is extracted from the given URL,
nothing else.
+Consequentially, the file will be saved in the current working directory. If
+you want the file saved in a different directory, make sure you change current
+working directory before you invoke curl with the \fB-O, --remote-name\fP flag!
+
+There is no URL decoding done on the file name. If it has %20 or other URL
+encoded parts of the name, they will end up as-is as file name.
+
You may use this option as many times as the number of URLs you have.
-.IP "--remote-name-all"
-This option changes the default action for all given URLs to be dealt with as
-if \fI-O/--remote-name\fP were used for each one. So if you want to disable
-that for a specific URL after \fI--remote-name-all\fP has been used, you must
-use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
+.IP "--oauth2-bearer"
+(IMAP, POP3, SMTP)
+Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token
+is used in conjunction with the user name which can be specified as part of the
+\fI--url\fP or \fI-u, --user\fP options.
+
+The Bearer Token and user name are formatted according to RFC 6750.
+
+If this option is used several times, the last one will be used.
+.IP "--proxy-header <header>"
+(HTTP) Extra header to include in the request when sending HTTP to a
+proxy. You may specify any number of extra headers. This is the equivalent
+option to \fI-H, --header\fP but is for proxy communication only like in
+CONNECT requests when you want a separate header sent to the proxy to what is
+sent to the actual remote host.
+
+curl will make sure that each header you add/replace is sent with the proper
+end-of-line marker, you should thus \fBnot\fP add that as a part of the header
+content: do not add newlines or carriage returns, they will only mess things
+up for you.
+
+Headers specified with this option will not be included in requests that curl
+knows will not be sent to a proxy.
+
+This option can be used multiple times to add/replace/remove multiple headers.
+
+(Added in 7.37.0)
+.IP "-p, --proxytunnel"
+When an HTTP proxy is used (\fI-x, --proxy\fP), this option will cause non-HTTP
+protocols to attempt to tunnel through the proxy instead of merely using it to
+do HTTP-like operations. The tunnel approach is made with the HTTP proxy
+CONNECT request and requires that the proxy allows direct connect to the
+remote port number curl wants to tunnel through to.
+.IP "-P, --ftp-port <address>"
+(FTP) Reverses the default initiator/listener roles when connecting with
+FTP. This switch makes curl use active mode. In practice, curl then tells the
+server to connect back to the client's specified address and port, while
+passive mode asks the server to setup an IP address and port for it to connect
+to. <address> should be one of:
+.RS
+.IP interface
+i.e "eth0" to specify which interface's IP address you want to use (Unix only)
+.IP "IP address"
+i.e "192.168.10.1" to specify the exact IP address
+.IP "host name"
+i.e "my.host.domain" to specify the machine
+.IP "-"
+make curl pick the same IP address that is already used for the control
+connection
+.RE
+.IP
+If this option is used several times, the last one will be used. Disable the
+use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
+instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
+
+Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
+address, to tell curl what TCP port range to use. That means you specify a
+port range, from a lower to a higher number. A single number works as well,
+but do note that it increases the risk of failure since the port may not be
+available.
.IP "--pass <phrase>"
(SSL/SSH) Passphrase for the private key
If this option is used several times, the last one will be used.
+.IP "--path-as-is"
+Tell curl to not handle sequences of /../ or /./ in the given URL
+path. Normally curl will squash or merge them according to standards but with
+this option set you tell it not to do that.
+
+(Added in 7.42.0)
.IP "--post301"
-Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
-requests when following a 301 redirection. The non-RFC behaviour is ubiquitous
-in web browsers, so curl does the conversion by default to maintain
+(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
+into GET requests when following a 301 redirection. The non-RFC behaviour is
+ubiquitous in web browsers, so curl does the conversion by default to maintain
consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L/--location\fP
+a redirection. This option is meaningful only when using \fI-L, --location\fP
(Added in 7.17.1)
.IP "--post302"
-Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
-requests when following a 302 redirection. The non-RFC behaviour is ubiquitous
-in web browsers, so curl does the conversion by default to maintain
+(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
+into GET requests when following a 302 redirection. The non-RFC behaviour is
+ubiquitous in web browsers, so curl does the conversion by default to maintain
consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L/--location\fP
+a redirection. This option is meaningful only when using \fI-L, --location\fP
(Added in 7.19.1)
+.IP "--post303"
+(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
+into GET requests when following a 303 redirection. The non-RFC behaviour is
+ubiquitous in web browsers, so curl does the conversion by default to maintain
+consistency. However, a server may require a POST to remain a POST after such
+a redirection. This option is meaningful only when using \fI-L, --location\fP
+(Added in 7.26.0)
.IP "--proto <protocols>"
Tells curl to use the listed protocols for its initial retrieval. Protocols
are evaluated left to right, are comma separated, and are each a protocol
@@ -986,81 +1323,61 @@ 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 authentication when communicating
-with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate
+Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating
+with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate (SPNEGO)
with a remote host. (Added in 7.17.1)
.IP "--proxy-ntlm"
Tells curl to use HTTP NTLM authentication when communicating with the given
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
+.IP "--proxy-service-name <servicename>"
+This option allows you to change the service name for proxy negotiation.
+
+Examples: --proxy-negotiate proxy-name \fI--proxy-service-name\fP sockd would use
+sockd/proxy-name. (Added in 7.43.0).
.IP "--proxy1.0 <proxyhost[:port]>"
Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
assumed at port 1080.
-The only difference between this and the HTTP proxy option (\fI-x/--proxy\fP),
+The only difference between this and the HTTP proxy option (\fI-x, --proxy\fP),
is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
protocol instead of the default HTTP 1.1.
-.IP "-p/--proxytunnel"
-When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
-protocols to attempt to tunnel through the proxy instead of merely using it to
-do HTTP-like operations. The tunnel approach is made with the HTTP proxy
-CONNECT request and requires that the proxy allows direct connect to the
-remote port number curl wants to tunnel through to.
.IP "--pubkey <key>"
(SSH) Public key file name. Allows you to provide your public key in this
separate file.
If this option is used several times, the last one will be used.
-.IP "-P/--ftp-port <address>"
-(FTP) Reverses the default initiator/listener roles when connecting with
-FTP. This switch makes curl use active mode. In practice, curl then tells the
-server to connect back to the client's specified address and port, while
-passive mode asks the server to setup an IP address and port for it to connect
-to. <address> should be one of:
-.RS
-.IP interface
-i.e "eth0" to specify which interface's IP address you want to use (Unix only)
-.IP "IP address"
-i.e "192.168.10.1" to specify the exact IP address
-.IP "host name"
-i.e "my.host.domain" to specify the machine
-.IP "-"
-make curl pick the same IP address that is already used for the control
-connection
-.RE
-
-If this option is used several times, the last one will be used. Disable the
-use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
-instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
-Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
-address, to tell curl what TCP port range to use. That means you specify a
-port range, from a lower to a higher number. A single number works as well,
-but do note that it increases the risk of failure since the port may not be
-available.
+(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
+file will not be read and used. See the \fI-K, --config\fP for details on the
default config file search path.
-.IP "-Q/--quote <command>"
+.IP "-Q, --quote <command>"
(FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
-commands are sent BEFORE the transfer takes place (just after the
-initial PWD command in an FTP transfer, to be exact). To make commands
-take place after a successful transfer, prefix them with a dash '-'.
-To make commands be sent after libcurl has changed the working directory,
-just before the transfer command(s), prefix the command with a '+' (this
-is only supported for FTP). You may specify any number of commands. If
-the server returns failure for one of the commands, the entire operation
-will be aborted. You must send syntactically correct FTP commands as
-RFC959 defines to FTP servers, or one of the commands listed below to
-SFTP servers. This option can be used multiple times.
-
-SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote
-commands before sending them to the server. Following is the list of
+commands are sent BEFORE the transfer takes place (just after the initial PWD
+command in an FTP transfer, to be exact). To make commands take place after a
+successful transfer, prefix them with a dash '-'. To make commands be sent
+after curl has changed the working directory, just before the transfer
+command(s), prefix the command with a '+' (this is only supported for
+FTP). You may specify any number of commands. If the server returns failure
+for one of the commands, the entire operation will be aborted. You must send
+syntactically correct FTP commands as RFC 959 defines to FTP servers, or one
+of the commands listed below to SFTP servers. This option can be used
+multiple times. When speaking to an FTP server, prefix the command with an
+asterisk (*) to make curl continue even if the command fails as by default
+curl will stop at first failure.
+
+SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
+itself before sending them to the server. File names may be quoted
+shell-style to embed spaces or special characters. Following is the list of
all supported SFTP quote commands:
.RS
.IP "chgrp group file"
-The chgrp command sets the group ID of the file named by the file operand to the
-group ID specified by the group operand. The group operand is a decimal
+The chgrp command sets the group ID of the file named by the file operand to
+the group ID specified by the group operand. The group operand is a decimal
integer group ID.
.IP "chmod mode file"
The chmod command modifies the file mode bits of the specified file. The
@@ -1087,11 +1404,7 @@ operand, provided it is empty.
.IP "symlink source_file target_file"
See ln.
.RE
-.IP "--random-file <file>"
-(SSL) Specify the path name to file containing what will be considered as
-random data. The data is used to seed the random engine for SSL connections.
-See also the \fI--egd-file\fP option.
-.IP "-r/--range <range>"
+.IP "-r, --range <range>"
(HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a
HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified
in a number of ways.
@@ -1118,13 +1431,14 @@ specifies 300 bytes from offset 500(H)
.B 100-199,500-599
specifies two separate 100-byte ranges(*)(H)
.RE
-
+.IP
(*) = NOTE that this will cause the server to reply with a multipart
response!
-Only digit characters (0-9) are valid in the 'start' and 'stop' fields of
-the \&'start-stop' range syntax. If a non-digit character is given in the range, the server's
-response will be unspecified, depending on the server's configuration.
+Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
+\&'start-stop' range syntax. If a non-digit character is given in the range,
+the server's response will be unspecified, depending on the server's
+configuration.
You should also be aware that many HTTP/1.1 servers do not have this feature
enabled, so that when you attempt to get a range, you'll instead get the whole
@@ -1135,13 +1449,34 @@ FTP and SFTP range downloads only support the simple 'start-stop' syntax
FTP command SIZE.
If this option is used several times, the last one will be used.
-.IP "--raw"
-When used, it disables all internal HTTP decoding of content or transfer
-encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
-.IP "-R/--remote-time"
-When used, this will make libcurl attempt to figure out the timestamp of the
+.IP "-R, --remote-time"
+When used, this will make curl attempt to figure out the timestamp of the
remote file, and if that is available make the local file get that same
timestamp.
+.IP "--random-file <file>"
+(SSL) Specify the path name to file containing what will be considered as
+random data. The data is used to seed the random engine for SSL connections.
+See also the \fI--egd-file\fP option.
+.IP "--raw"
+(HTTP) When used, it disables all internal HTTP decoding of content or transfer
+encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
+.IP "--remote-name-all"
+This option changes the default action for all given URLs to be dealt with as
+if \fI-O, --remote-name\fP were used for each one. So if you want to disable
+that for a specific URL after \fI--remote-name-all\fP has been used, you must
+use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
+.IP "--resolve <host:port:address>"
+Provide a custom address for a specific host and port pair. Using this, you
+can make the curl requests(s) use a specified address and prevent the
+otherwise normally resolved address to be used. Consider it a sort of
+/etc/hosts alternative provided on the command line. The port number should be
+the number used for the specific protocol the host will be used for. It means
+you need several entries if you want to provide address for the same host but
+different ports.
+
+This option can be used many times to add many host names to resolve.
+
+(Added in 7.21.3)
.IP "--retry <num>"
If a transient error is returned when curl tries to perform a transfer, it
will retry this number of times before giving up. Setting the number to 0
@@ -1155,7 +1490,7 @@ using \fI--retry-delay\fP you disable this exponential backoff algorithm. See
also \fI--retry-max-time\fP to limit the total time allowed for
retries. (Added in 7.12.3)
-If this option is used multiple times, the last occurrence decide the amount.
+If this option is used several times, the last one will be used.
.IP "--retry-delay <seconds>"
Make curl sleep this amount of time before each retry when a transfer has
failed with a transient error (it changes the default backoff time algorithm
@@ -1163,46 +1498,83 @@ between retries). This option is only interesting if \fI--retry\fP is also
used. Setting this delay to zero will make curl use the default backoff time.
(Added in 7.12.3)
-If this option is used multiple times, the last occurrence determines the amount.
+If this option is used several times, the last one will be used.
.IP "--retry-max-time <seconds>"
The retry timer is reset before the first transfer attempt. Retries will be
done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
given limit. Notice that if the timer hasn't reached the limit, the request
will be made and while performing, it may take longer than this given time
-period. To limit a single request\'s maximum time, use \fI-m/--max-time\fP.
+period. To limit a single request\'s maximum time, use \fI-m, --max-time\fP.
Set this option to zero to not timeout retries. (Added in 7.12.3)
-If this option is used multiple times, the last occurrence determines the
-amount.
-.IP "-s/--silent"
-Silent or quiet mode. Don't show progress meter or error messages. Makes
-Curl mute.
-.IP "-S/--show-error"
-When used with -s it makes curl show an error message if it fails.
+If this option is used several times, the last one will be used.
+.IP "-s, --silent"
+Silent or quiet mode. Don't show progress meter or error messages. Makes Curl
+mute. It will still output the data you ask for, potentially even to the
+terminal/stdout unless you redirect it.
+.IP "--sasl-ir"
+Enable initial response in SASL authentication.
+(Added in 7.31.0)
+.IP "--service-name <servicename>"
+This option allows you to change the service name for SPNEGO.
+
+Examples: --negotiate \fI--service-name\fP sockd would use
+sockd/server-name. (Added in 7.43.0).
+.IP "-S, --show-error"
+When used with \fI-s\fP it makes curl show an error message if it fails.
+.IP "--ssl"
+(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a
+non-secure connection if the server doesn't support SSL/TLS. See also
+\fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
+encryption required. (Added in 7.20.0)
+
+This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0). That
+option name can still be used but will be removed in a future version.
+.IP "--ssl-reqd"
+(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the
+connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
+
+This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5). That
+option name can still be used but will be removed in a future version.
+.IP "--ssl-allow-beast"
+(SSL) This option tells curl to not work around a security flaw in the SSL3
+and TLS1.0 protocols known as BEAST. If this option isn't used, the SSL layer
+may use workarounds known to cause interoperability problems with some older
+SSL implementations. WARNING: this option loosens the SSL security, and by
+using this flag you ask for exactly that. (Added in 7.25.0)
.IP "--socks4 <host[:port]>"
Use the specified SOCKS4 proxy. If the port number is not specified, it is
assumed at port 1080. (Added in 7.15.2)
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x, --proxy\fP, as they are
mutually exclusive.
+Since 7.21.7, this option is superfluous since you can specify a socks4 proxy
+with \fI-x, --proxy\fP using a socks4:// protocol prefix.
+
If this option is used several times, the last one will be used.
.IP "--socks4a <host[:port]>"
Use the specified SOCKS4a proxy. If the port number is not specified, it is
assumed at port 1080. (Added in 7.18.0)
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x, --proxy\fP, as they are
mutually exclusive.
+Since 7.21.7, this option is superfluous since you can specify a socks4a proxy
+with \fI-x, --proxy\fP using a socks4a:// protocol prefix.
+
If this option is used several times, the last one will be used.
.IP "--socks5-hostname <host[:port]>"
Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
the port number is not specified, it is assumed at port 1080. (Added in
7.18.0)
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x, --proxy\fP, as they are
mutually exclusive.
+Since 7.21.7, this option is superfluous since you can specify a socks5
+hostname proxy with \fI-x, --proxy\fP using a socks5h:// protocol prefix.
+
If this option is used several times, the last one will be used. (This option
was previously wrongly documented and used as --socks without the number
appended.)
@@ -1210,9 +1582,12 @@ appended.)
Use the specified SOCKS5 proxy - but resolve the host name locally. If the
port number is not specified, it is assumed at port 1080.
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x, --proxy\fP, as they are
mutually exclusive.
+Since 7.21.7, this option is superfluous since you can specify a socks5 proxy
+with \fI-x, --proxy\fP using a socks5:// protocol prefix.
+
If this option is used several times, the last one will be used. (This option
was previously wrongly documented and used as --socks without the number
appended.)
@@ -1222,27 +1597,21 @@ This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP.
The default service name for a socks server is rcmd/server-fqdn. This option
allows you to change it.
-Examples:
- --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
-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 princpal name.
- (Added in 7.19.4).
+Examples: --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
+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 gssapi negotiation a protection mode is negotiated. The rfc1961
+As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961
says in section 4.3/4.4 it should be protected, but the NEC reference
implementation does not. The option \fI--socks5-gssapi-nec\fP allows the
unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
.IP "--stderr <file>"
Redirect all writes to stderr to the specified file instead. If the file name
-is a plain '-', it is instead written to stdout. This option has no point when
-you're using a shell with decent redirecting capabilities.
+is a plain '-', it is instead written to stdout.
If this option is used several times, the last one will be used.
-.IP "--tcp-nodelay"
-Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
-details about this option. (Added in 7.11.2)
-.IP "-t/--telnet-option <OPT=val>"
+.IP "-t, --telnet-option <OPT=val>"
Pass options to the telnet protocol. Supported options are:
TTYPE=<term> Sets the terminal type.
@@ -1250,21 +1619,13 @@ TTYPE=<term> Sets the terminal type.
XDISPLOC=<X display> Sets the X display location.
NEW_ENV=<var,val> Sets an environment variable.
-.IP "--tftp-blksize <value>"
-(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
-curl will try to use when tranferring data to or from a TFTP server. By
-default 512 bytes will be used.
-
-If this option is used several times, the last one will be used.
-
-(Added in 7.20.0)
-.IP "-T/--upload-file <file>"
+.IP "-T, --upload-file <file>"
This transfers the specified local file to the remote URL. If there is no file
part in the specified URL, Curl will append the local file name. NOTE that you
must use a trailing / on the last directory to really prove to Curl that there
is no file name or curl will think that your last directory name is the remote
file name to use. That will most likely cause the upload operation to fail. If
-this is used on a HTTP(S) server, the PUT command will be used.
+this is used on an HTTP(S) server, the PUT command will be used.
Use the file name "-" (a single dash) to use stdin instead of a given file.
Alternately, the file name "." (a single period) may be specified instead
@@ -1281,12 +1642,53 @@ curl -T "{file1,file2}" http://www.uploadtothissite.com
or even
curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
+.IP "--tcp-nodelay"
+Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
+details about this option. (Added in 7.11.2)
+.IP "--tftp-blksize <value>"
+(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
+curl will try to use when transferring data to or from a TFTP server. By
+default 512 bytes will be used.
+
+If this option is used several times, the last one will be used.
+
+(Added in 7.20.0)
+.IP "--tlsauthtype <authtype>"
+Set TLS authentication type. Currently, the only supported option is "SRP",
+for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
+specified but \fI--tlsauthtype\fP is not, then this option defaults to "SRP".
+(Added in 7.21.4)
+.IP "--tlspassword <password>"
+Set password for use with the TLS authentication method specified with
+\fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set. (Added in
+7.21.4)
+.IP "--tlsuser <user>"
+Set username for use with the TLS authentication method specified with
+\fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also be set. (Added in
+7.21.4)
+.IP "--tlsv1.0"
+(SSL)
+Forces curl to use TLS version 1.0 when negotiating with a remote TLS server.
+(Added in 7.34.0)
+.IP "--tlsv1.1"
+(SSL)
+Forces curl to use TLS version 1.1 when negotiating with a remote TLS server.
+(Added in 7.34.0)
+.IP "--tlsv1.2"
+(SSL)
+Forces curl to use TLS version 1.2 when negotiating with a remote TLS server.
+(Added in 7.34.0)
+.IP "--tr-encoding"
+(HTTP) Request a compressed Transfer-Encoding response using one of the
+algorithms curl supports, and uncompress the data while receiving it.
+
+(Added in 7.21.6)
.IP "--trace <file>"
Enables a full trace dump of all incoming and outgoing data, including
descriptive information, to the given output file. Use "-" as filename to have
the output sent to stdout.
-This option overrides previous uses of \fI-v/--verbose\fP or
+This option overrides previous uses of \fI-v, --verbose\fP or
\fI--trace-ascii\fP.
If this option is used several times, the last one will be used.
@@ -1299,30 +1701,50 @@ This is very similar to \fI--trace\fP, but leaves out the hex part and only
shows the ASCII part of the dump. It makes smaller output that might be easier
to read for untrained humans.
-This option overrides previous uses of \fI-v/--verbose\fP or \fI--trace\fP.
+This option overrides previous uses of \fI-v, --verbose\fP or \fI--trace\fP.
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 "-u/--user <user:password>"
+.IP "--unix-socket <path>"
+(HTTP) Connect through this Unix domain socket, instead of using the
+network. (Added in 7.40.0)
+.IP "-u, --user <user:password>"
Specify the user name and password to use for server authentication. Overrides
-\fI-n/--netrc\fP and \fI--netrc-optional\fP.
+\fI-n, --netrc\fP and \fI--netrc-optional\fP.
-If you just give the user name (without entering a colon) curl will prompt for
-a password.
+If you simply specify the user name, curl will prompt for a password.
-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 :".
+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 successfully
+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 this option is used several times, the last one will be used.
-.IP "-U/--proxy-user <user:password>"
+.IP "-U, --proxy-user <user:password>"
Specify the user name and password to use for proxy authentication.
-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 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 this option is used several times, the last one will be used.
.IP "--url <URL>"
@@ -1330,14 +1752,15 @@ Specify a URL to fetch. This option is mostly handy when you want to specify
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"
-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
+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.
+
+Note that if you only want HTTP headers in the output, \fI-i, --include\fP
might be the option you're looking for.
If you think this option still doesn't give you enough details, consider using
@@ -1345,51 +1768,12 @@ If you think this option still doesn't give you enough details, consider using
This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
-Use \fI-S/--silent\fP to make curl quiet.
-.IP "-V/--version"
-Displays information about curl and the libcurl version it uses.
-
-The first line includes the full version of curl, libcurl and other 3rd party
-libraries linked with the executable.
-
-The second line (starts with "Protocols:") shows all protocols that libcurl
-reports to support.
-
-The third line (starts with "Features:") shows specific features libcurl
-reports to offer. Available features include:
-.RS
-.IP "IPv6"
-You can use IPv6 with this.
-.IP "krb4"
-Krb4 for FTP is supported.
-.IP "SSL"
-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.
-.IP "SPNEGO"
-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 "SSPI"
-SSPI is supported. If you use NTLM and set a blank user name, curl will
-authenticate with your current user and password.
-.RE
-.IP "-w/--write-out <format>"
-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
+Use \fI-s, --silent\fP to make curl quiet.
+.IP "-w, --write-out <format>"
+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
format from stdin you write "@-".
The variables present in the output format will be substituted by the value or
@@ -1402,12 +1786,21 @@ space with \\t.
The %-symbol is a special symbol in the win32-environment, where all
occurrences of % must be doubled when using this option.
-The variables available at this point are:
+The variables available are:
.RS
.TP 15
-.B url_effective
-The URL that was fetched last. This is most meaningful if you've told curl
-to follow location: headers.
+.B content_type
+The Content-Type of the requested document, if there was any.
+.TP
+.B filename_effective
+The ultimate filename that curl writes out to. This is only meaningful if curl
+is told to write to a file with the \fI--remote-name\fP or \fI--output\fP
+option. It's most useful in combination with the \fI--remote-header-name\fP
+option. (Added in 7.25.1)
+.TP
+.B ftp_entry_path
+The initial path curl ended up in when logging on to the remote FTP
+server. (Added in 7.15.4)
.TP
.B http_code
The numerical response code that was found in the last retrieved HTTP(S) or
@@ -1418,50 +1811,42 @@ same info.
The numerical code that was found in the last response (from a proxy) to a
curl CONNECT request. (Added in 7.12.4)
.TP
-.B time_total
-The total time, in seconds, that the full operation lasted. The time will be
-displayed with millisecond resolution.
+.B local_ip
+The IP address of the local end of the most recently done connection - can be
+either IPv4 or IPv6 (Added in 7.29.0)
.TP
-.B time_namelookup
-The time, in seconds, it took from the start until the name resolving was
-completed.
+.B local_port
+The local port number of the most recently done connection (Added in 7.29.0)
.TP
-.B time_connect
-The time, in seconds, it took from the start until the TCP connect to the
-remote host (or proxy) was completed.
+.B num_connects
+Number of new connects made in the recent transfer. (Added in 7.12.3)
.TP
-.B time_appconnect
-The time, in seconds, it took from the start until the SSL/SSH/etc
-connect/handshake to the remote host was completed. (Added in 7.19.0)
+.B num_redirects
+Number of redirects that were followed in the request. (Added in 7.12.3)
.TP
-.B time_pretransfer
-The time, in seconds, it took from the start until the file transfer was just
-about to begin. This includes all pre-transfer commands and negotiations that
-are specific to the particular protocol(s) involved.
+.B redirect_url
+When an HTTP request was made without -L to follow redirects, this variable
+will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
.TP
-.B time_redirect
-The time, in seconds, it took for all redirection steps include name lookup,
-connect, pretransfer and transfer before the final transaction was
-started. time_redirect shows the complete execution time for multiple
-redirections. (Added in 7.12.3)
+.B remote_ip
+The remote IP address of the most recently done connection - can be either
+IPv4 or IPv6 (Added in 7.29.0)
.TP
-.B time_starttransfer
-The time, in seconds, it took from the start until the first byte was just about
-to be transferred. This includes time_pretransfer and also the time the
-server needed to calculate the result.
+.B remote_port
+The remote port number of the most recently done connection (Added in 7.29.0)
.TP
.B size_download
The total amount of bytes that were downloaded.
.TP
-.B size_upload
-The total amount of bytes that were uploaded.
-.TP
.B size_header
The total amount of bytes of the downloaded headers.
.TP
.B size_request
The total amount of bytes that were sent in the HTTP request.
.TP
+.B size_upload
+The total amount of bytes that were uploaded.
+.TP
.B speed_download
The average download speed that curl measured for the complete download. Bytes
per second.
@@ -1470,136 +1855,243 @@ per second.
The average upload speed that curl measured for the complete upload. Bytes per
second.
.TP
-.B content_type
-The Content-Type of the requested document, if there was any.
+.B ssl_verify_result
+The result of the SSL peer certificate verification that was requested. 0
+means the verification was successful. (Added in 7.19.0)
.TP
-.B num_connects
-Number of new connects made in the recent transfer. (Added in 7.12.3)
+.B time_appconnect
+The time, in seconds, it took from the start until the SSL/SSH/etc
+connect/handshake to the remote host was completed. (Added in 7.19.0)
.TP
-.B num_redirects
-Number of redirects that were followed in the request. (Added in 7.12.3)
+.B time_connect
+The time, in seconds, it took from the start until the TCP connect to the
+remote host (or proxy) was completed.
.TP
-.B redirect_url
-When a HTTP request was made without -L to follow redirects, this variable
-will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
+.B time_namelookup
+The time, in seconds, it took from the start until the name resolving was
+completed.
.TP
-.B ftp_entry_path
-The initial path libcurl ended up in when logging on to the remote FTP
-server. (Added in 7.15.4)
+.B time_pretransfer
+The time, in seconds, it took from the start until the file transfer was just
+about to begin. This includes all pre-transfer commands and negotiations that
+are specific to the particular protocol(s) involved.
.TP
-.B ssl_verify_result
-The result of the SSL peer certificate verification that was requested. 0
-means the verification was successful. (Added in 7.19.0)
+.B time_redirect
+The time, in seconds, it took for all redirection steps include name lookup,
+connect, pretransfer and transfer before the final transaction was
+started. time_redirect shows the complete execution time for multiple
+redirections. (Added in 7.12.3)
+.TP
+.B time_starttransfer
+The time, in seconds, it took from the start until the first byte was just
+about to be transferred. This includes time_pretransfer and also the time the
+server needed to calculate the result.
+.TP
+.B time_total
+The total time, in seconds, that the full operation lasted. The time will be
+displayed with millisecond resolution.
+.TP
+.B url_effective
+The URL that was fetched last. This is most meaningful if you've told curl
+to follow location: headers.
.RE
-
+.IP
If this option is used several times, the last one will be used.
-.IP "-x/--proxy <proxyhost[:port]>"
-Use the specified HTTP proxy. If the port number is not specified, it is assumed
-at port 1080.
+.IP "-x, --proxy <[protocol://][user:password@]proxyhost[:port]>"
+Use the specified proxy.
+
+The proxy string can be specified with a protocol:// prefix to specify
+alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
+socks5h:// to request the specific SOCKS version to be used. No protocol
+specified, http:// and all others will be treated as HTTP proxies. (The
+protocol support was added in curl 7.21.7)
+
+If the port number is not specified in the proxy string, it is assumed to be
+1080.
This option overrides existing environment variables that set the proxy to
use. If there's an environment variable setting a proxy, you can set proxy to
\&"" to override it.
-\fBNote\fP that all operations that are performed over a HTTP proxy will
-transparently be converted to HTTP. It means that certain protocol specific
-operations might not be available. This is not the case if you can tunnel
-through the proxy, as done with the \fI-p/--proxytunnel\fP option.
+All operations that are performed over an HTTP proxy will transparently be
+converted to HTTP. It means that certain protocol specific operations might
+not be available. This is not the case if you can tunnel through the proxy, as
+one with the \fI-p, --proxytunnel\fP option.
+
+User and password that might be provided in the proxy string are URL decoded
+by curl. This allows you to pass in special characters such as @ by using %40
+or pass in a colon with %3a.
-Starting with 7.14.1, the proxy host can be specified the exact same way as
-the proxy environment variables, including the protocol prefix (http://) and
-the embedded user + password.
+The proxy host can be specified the exact same way as the proxy environment
+variables, including the protocol prefix (http://) and the embedded user +
+password.
If this option is used several times, the last one will be used.
-.IP "-X/--request <command>"
+.IP "-X, --request <command>"
(HTTP) Specifies a custom request method to use when communicating with the
-HTTP server. The specified request will be used instead of the method
+HTTP server. The specified request method will be used instead of the method
otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
details and explanations. Common additional HTTP requests include PUT and
DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
more.
+Normally you don't need this option. All sorts of GET, HEAD, POST and PUT
+requests are rather invoked by using dedicated command line options.
+
+This option only changes the actual word used in the HTTP request, it does not
+alter the way curl behaves. So for example if you want to make a proper HEAD
+request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP
+option.
+
+The method string you set with -X will be used for all requests, which if you
+for example use \fB-L, --location\fP may cause unintended side-effects when
+curl doesn't change request method according to the HTTP 30x response codes -
+and similar.
+
(FTP)
Specifies a custom FTP command to use instead of LIST when doing file lists
with FTP.
+(POP3)
+Specifies a custom POP3 command to use instead of LIST or RETR. (Added in
+7.26.0)
+
+(IMAP)
+Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0)
+
+(SMTP)
+Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0)
+
If this option is used several times, the last one will be used.
-.IP "-y/--speed-time <time>"
+.IP "--xattr"
+When saving output to a file, this option tells curl to store certain file
+metadata in extended file attributes. Currently, the URL is stored in the
+xdg.origin.url attribute and, for HTTP, the content type is stored in
+the mime_type attribute. If the file system does not support extended
+attributes, a warning is issued.
+
+.IP "-y, --speed-time <time>"
If a download is slower than speed-limit bytes per second during a speed-time
period, the download gets aborted. If speed-time is used, the default
-speed-limit will be 1 unless set with -Y.
+speed-limit will be 1 unless set with \fI-Y\fP.
This option controls transfers and thus will not affect slow connects etc. If
this is a concern for you, try the \fI--connect-timeout\fP option.
If this option is used several times, the last one will be used.
-.IP "-Y/--speed-limit <speed>"
+.IP "-Y, --speed-limit <speed>"
If a download is slower than this given speed (in bytes per second) for
-speed-time seconds it gets aborted. speed-time is set with -y and is 30 if
-not set.
+speed-time seconds it gets aborted. speed-time is set with \fI-y\fP and is 30
+if not set.
If this option is used several times, the last one will be used.
-.IP "-z/--time-cond <date expression>"
+.IP "-z, --time-cond <date expression>|<file>"
(HTTP/FTP) Request a file that has been modified later than the given time and
-date, or one that has been modified before that time. The date expression can
-be all sorts of date strings or if it doesn't match any internal ones, it
-tries to get the time from a given file name instead! See the
-\fIcurl_getdate(3)\fP man pages for date expression details.
+date, or one that has been modified before that time. The <date expression>
+can be all sorts of date strings or if it doesn't match any internal ones, it
+is taken as a filename and tries to get the modification date (mtime) from
+<file> instead. See the \fIcurl_getdate(3)\fP man pages for date expression
+details.
Start the date expression with a dash (-) to make it request for a document
that is older than the given date/time, default is a document that is newer
than the specified date/time.
If this option is used several times, the last one will be used.
-.IP "--max-redirs <num>"
-Set maximum number of redirection-followings allowed. If \fI-L/--location\fP
-is used, this option can be used to prevent curl from following redirections
-\&"in absurdum". By default, the limit is set to 50 redirections. Set this
-option to -1 to make it limitless.
+.IP "-h, --help"
+Usage help. This lists all current command line options with a short
+description.
+.IP "-M, --manual"
+Manual. Display the huge help text.
+.IP "-V, --version"
+Displays information about curl and the libcurl version it uses.
-If this option is used several times, the last one will be used.
-.IP "-0/--http1.0"
-(HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
-internally preferred: HTTP 1.1.
-.IP "-1/--tlsv1"
-(SSL)
-Forces curl to use TLS version 1 when negotiating with a remote TLS server.
-.IP "-2/--sslv2"
-(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.
-.IP "-4/--ipv4"
-If libcurl is capable of resolving an address to multiple IP versions (which
-it is if it is IPv6-capable), this option tells libcurl to resolve names to
-IPv4 addresses only.
-.IP "-6/--ipv6"
-If libcurl is capable of resolving an address to multiple IP versions (which
-it is if it is IPv6-capable), this option tells libcurl to resolve names to
-IPv6 addresses only.
-.IP "-#/--progress-bar"
-Make curl display progress information as a progress bar instead of the
-default statistics.
+The first line includes the full version of curl, libcurl and other 3rd party
+libraries linked with the executable.
+
+The second line (starts with "Protocols:") shows all protocols that libcurl
+reports to support.
+
+The third line (starts with "Features:") shows specific features libcurl
+reports to offer. Available features include:
+.RS
+.IP "IPv6"
+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.
+.IP "libz"
+Automatic decompression of compressed files over HTTP is supported.
+.IP "NTLM"
+NTLM authentication 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.
+.IP "SPNEGO"
+SPNEGO 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.
+.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
+there are errors (such as the file or server not being available).
+.RE
.SH FILES
.I ~/.curlrc
.RS
-Default config file, see \fI-K/--config\fP for details.
+Default config file, see \fI-K, --config\fP for details.
.SH ENVIRONMENT
The environment variables can be specified in lower case or upper case. The
lower case version has precedence. http_proxy is an exception as it is only
available in lower case.
+
+Using an environment variable to set the proxy has the same effect as using
+the \fI--proxy\fP option.
+
.IP "http_proxy [protocol://]<host>[:port]"
Sets the proxy server to use for HTTP.
.IP "HTTPS_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use for HTTPS.
-.IP "FTP_PROXY [protocol://]<host>[:port]"
-Sets the proxy server to use for FTP.
+.IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
+Sets the proxy server to use for [url-protocol], where the protocol is a
+protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
+SMTP, LDAP etc.
.IP "ALL_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use if no protocol-specific proxy is set.
.IP "NO_PROXY <comma-separated list of hosts>"
list of host names that shouldn't go through any proxy. If set to a asterisk
\&'*' only, it matches all hosts.
+.SH "PROXY PROTOCOL PREFIXES"
+Since curl version 7.21.7, the proxy string may be specified with a
+protocol:// prefix to specify alternative proxy protocols.
+
+If no protocol is specified in the proxy string or if the string doesn't match
+a supported one, the proxy will be treated as an HTTP proxy.
+
+The supported proxy protocol prefixes are as follows:
+.IP "socks4://"
+Makes it the equivalent of \fI--socks4\fP
+.IP "socks4a://"
+Makes it the equivalent of \fI--socks4a\fP
+.IP "socks5://"
+Makes it the equivalent of \fI--socks5\fP
+.IP "socks5h://"
+Makes it the equivalent of \fI--socks5-hostname\fP
.SH EXIT CODES
There are a bunch of different error codes and their corresponding error
messages that may appear during bad conditions. At the time of this writing,
@@ -1610,6 +2102,10 @@ Unsupported protocol. This build of curl has no support for this protocol.
Failed to initialize.
.IP 3
URL malformed. The syntax was not correct.
+.IP 4
+A feature or option that was needed to perform the desired request was not
+enabled or was explicitly disabled at build-time. To make curl able to do
+this, you probably need another build of libcurl!
.IP 5
Couldn't resolve proxy. The given proxy host could not be resolved.
.IP 6
@@ -1642,7 +2138,7 @@ FTP quote error. A quote command returned error from the server.
.IP 22
HTTP page not retrieved. The requested url was not found or returned another
error with the HTTP error code being 400 or above. This return code only
-appears if \fI-f/--fail\fP is used.
+appears if \fI-f, --fail\fP is used.
.IP 23
Write error. Curl couldn't write data to a local filesystem or similar.
.IP 25
@@ -1686,11 +2182,13 @@ Interface error. A specified outgoing interface could not be used.
.IP 47
Too many redirects. When following redirects, curl hit the maximum amount.
.IP 48
-Unknown TELNET option specified.
+Unknown option specified to libcurl. This indicates that you passed a weird
+option to curl that was passed on to libcurl and rejected. Read up in the
+manual!
.IP 49
Malformed telnet option.
.IP 51
-The peer's SSL certificate or SSH MD5 fingerprint was not ok.
+The peer's SSL certificate or SSH MD5 fingerprint was not OK.
.IP 52
The server didn't reply anything, which here is considered an error.
.IP 53
@@ -1751,6 +2249,20 @@ Failed to shut down the SSL connection.
Could not load CRL file, missing or wrong format (added in 7.19.0).
.IP 83
Issuer check failed (added in 7.19.0).
+.IP 84
+The FTP PRET command failed
+.IP 85
+RTSP: mismatch of CSeq numbers
+.IP 86
+RTSP: mismatch of Session Identifiers
+.IP 87
+unable to parse FTP file list
+.IP 88
+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.
@@ -1764,4 +2276,3 @@ ftp://ftp.sunet.se/pub/www/utilities/curl/
.SH "SEE ALSO"
.BR ftp (1),
.BR wget (1)
-
diff --git a/docs/curl.html b/docs/curl.html
deleted file mode 100644
index c578011b..00000000
--- a/docs/curl.html
+++ /dev/null
@@ -1,834 +0,0 @@
-<html><head>
-<title>curl man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl - transfer a URL <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">curl [options]</span> <a class="emphasis" href="#URL">[URL...]</a> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="bold">curl</span> 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, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction.
-<p class="level0">curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume and more. As you will see below, the number of features will make your head spin!
-<p class="level0">curl is powered by libcurl for all transfer-related features. See <span Class="manpage">libcurl (3)</span> for details. <a name="URL"></a><h2 class="nroffsh">URL</h2>
-<p class="level0">The URL syntax is protocol-dependent. You'll find a detailed description in RFC 3986.
-<p class="level0">You can specify multiple URLs or parts of URLs by writing part sets within braces as in:
-<p class="level0">&nbsp;<a href="http://site">http://site</a>.{one,two,three}.com
-<p class="level0">or you can get sequences of alphanumeric series by using [] as in:
-<p class="level0">&nbsp;<a href="ftp://ftp.numericals.com/file">ftp://ftp.numericals.com/file</a>[1-100].txt &nbsp;<a href="ftp://ftp.numericals.com/file">ftp://ftp.numericals.com/file</a>[001-100].txt (with leading zeros) &nbsp;<a href="ftp://ftp.letters.com/file">ftp://ftp.letters.com/file</a>[a-z].txt
-<p class="level0">Nested sequences are not supported, but you can use several ones next to each other:
-<p class="level0">&nbsp;<a href="http://any.org/archive">http://any.org/archive</a>[1996-1999]/vol[1-4]/part{a,b,c}.html
-<p class="level0">You can specify any amount of URLs on the command line. They will be fetched in a sequential manner in the specified order.
-<p class="level0">You can specify a step counter for the ranges to get every Nth number or letter:
-<p class="level0">&nbsp;<a href="http://www.numericals.com/file">http://www.numericals.com/file</a>[1-100:10].txt &nbsp;<a href="http://www.letters.com/file">http://www.letters.com/file</a>[a-z:2].txt
-<p class="level0">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 based on often-used host name prefixes. For example, for host names starting with "ftp." curl will assume you want to speak FTP.
-<p class="level0">curl will do its best to use what you pass to it as a URL. It is not trying to validate it as a syntactically correct URL by any means but is instead <span Class="bold">very</span> liberal with what it accepts.
-<p class="level0">Curl will attempt to re-use connections for multiple file transfers, so that getting many files from the same server will not do multiple connects / handshakes. This improves speed. Of course this is only done on files specified on a single command line and cannot be used between separate curl invokes. <a name="PROGRESS"></a><h2 class="nroffsh">PROGRESS METER</h2>
-<p class="level0">curl normally displays a progress meter during operations, indicating the amount of transferred data, transfer speeds and estimated time left, etc.
-<p class="level0">curl displays this data to the terminal by default, so if you invoke curl to do an operation and it is about to write data to the terminal, it <span Class="emphasis">disables</span> the progress meter as otherwise it would mess up the output mixing progress meter and response data.
-<p class="level0">If you want a progress meter for HTTP POST or PUT requests, you need to redirect the response output to a file, using shell redirect (&gt;), -o [file] or similar.
-<p class="level0">It is not the same case for FTP upload as that operation does not spit out any response data to the terminal.
-<p class="level0">If you prefer a progress "bar" instead of the regular meter, <a class="emphasis" href="#-">-#</a> is your friend. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">In general, all boolean options are enabled with --option and yet again disabled with --<span Class="bold">no-</span>option. That is, you use the exact same option name but prefix it with "no-". However, in this list we mostly only list and show the --option version of them. (This concept with --no options was added in 7.19.0. Previously most options were toggled on/off on repeated use of the same command line option.)
-<p class="level0"><a name="-a--append"></a><span class="nroffip">-a/--append</span>
-<p class="level1">(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).
-<p class="level0"><a name="-A--user-agent"></a><span class="nroffip">-A/--user-agent &lt;agent string&gt;</span>
-<p class="level1">(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 the string, surround the string with single quote marks. This can also be set with the <a class="emphasis" href="#-H--header">-H/--header</a> option of course.
-<p class="level1">If this option is set more than once, the last one will be the one that's used.
-<p class="level0"><a name="--anyauth"></a><span class="nroffip">--anyauth</span>
-<p class="level1">(HTTP) Tells curl to figure out authentication method by itself, and use the most secure one the remote site claims to support. This is done by first doing a request and checking the response-headers, thus possibly inducing an extra network round-trip. This is used instead of setting a specific authentication method, which you can do with <a class="emphasis" href="#--basic">--basic</a>, <a class="emphasis" href="#--digest">--digest</a>, <a class="emphasis" href="#--ntlm">--ntlm</a>, and <a class="emphasis" href="#--negotiate">--negotiate</a>.
-<p class="level1">Note that using --anyauth is not recommended if you do uploads from stdin, 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.
-<p class="level0"><a name="-b--cookie"></a><span class="nroffip">-b/--cookie &lt;name=data&gt;</span>
-<p class="level1">(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".
-<p class="level1">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 if they match. Using this method also activates the "cookie parser" which will make curl record incoming cookies too, which may be handy if you're using this in combination with the <a class="emphasis" href="#-L--location">-L/--location</a> option. The file format of the file to read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie file format.
-<p class="level1"><span Class="bold">NOTE</span> that the file specified with <a class="emphasis" href="#-b--cookie">-b/--cookie</a> is only used as input. No cookies will be stored in the file. To store cookies, use the <a class="emphasis" href="#-c--cookie-jar">-c/--cookie-jar</a> option or you could even save the HTTP headers to a file using <a class="emphasis" href="#-D--dump-header">-D/--dump-header</a>!
-<p class="level1">If this option is set more than once, the last one will be the one that's used.
-<p class="level0"><a name="-B--use-ascii"></a><span class="nroffip">-B/--use-ascii</span>
-<p class="level1">Enable ASCII transfer when using FTP or LDAP. 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.
-<p class="level0"><a name="--basic"></a><span class="nroffip">--basic</span>
-<p class="level1">(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 <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--digest">--digest</a>, or <a class="emphasis" href="#--negotiate">--negotiate</a>).
-<p class="level0"><a name="--ciphers"></a><span class="nroffip">--ciphers &lt;list of ciphers&gt;</span>
-<p class="level1">(SSL) Specifies which ciphers to use in the connection. The list of ciphers must specify valid ciphers. Read up on SSL cipher list details on this URL: <span Class="emphasis"><a href="http://www.openssl.org/docs/apps/ciphers.html">http://www.openssl.org/docs/apps/ciphers.html</a></span>
-<p class="level1">NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS ciphers is in the NSSCipherSuite entry at this URL: <span Class="emphasis"><a href="http://directory.fedora.redhat.com/docs/mod_nss.html">http://directory.fedora.redhat.com/docs/mod_nss.html</a>#Directives</span>
-<p class="level1">If this option is used several times, the last one will override the others.
-<p class="level0"><a name="--compressed"></a><span class="nroffip">--compressed</span>
-<p class="level1">(HTTP) Request a compressed response using one of the algorithms libcurl supports, and return the uncompressed document. If this option is used and the server sends an unsupported encoding, curl will report an error.
-<p class="level0"><a name="--connect-timeout"></a><span class="nroffip">--connect-timeout &lt;seconds&gt;</span>
-<p class="level1">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. See also the <a class="emphasis" href="#-m--max-time">-m/--max-time</a> option.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-c--cookie-jar"></a><span class="nroffip">-c/--cookie-jar &lt;file name&gt;</span>
-<p class="level1">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 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.
-<p class="level1"><span Class="bold">NOTE</span> If the cookie jar can't be created or written to, the whole curl operation won't fail or even report an error clearly. Using -v will get a warning displayed, but that is the only visible feedback you get about this possibly lethal situation.
-<p class="level1">If this option is used several times, the last specified file name will be used.
-<p class="level0"><a name="-C--continue-at"></a><span class="nroffip">-C/--continue-at &lt;offset&gt;</span>
-<p class="level1">Continue/Resume a previous file transfer at the given offset. The given offset is the exact number of bytes that will be skipped, counting from the beginning of the source file before it is transferred to the destination. If used with uploads, the FTP server command SIZE will not be used by curl.
-<p class="level1">Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--create-dirs"></a><span class="nroffip">--create-dirs</span>
-<p class="level1">When used in conjunction with the -o option, curl will create the necessary local directory hierarchy as needed. This option creates the dirs mentioned with the -o option, nothing else. If the -o file name uses no dir or if the dirs it mentions already exist, no dir will be created.
-<p class="level1">To create remote directories when using FTP or SFTP, try <a class="emphasis" href="#--ftp-create-dirs">--ftp-create-dirs</a>.
-<p class="level0"><a name="--crlf"></a><span class="nroffip">--crlf</span>
-<p class="level1">(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
-<p class="level0"><a name="--crlfile"></a><span class="nroffip">--crlfile &lt;file&gt;</span>
-<p class="level1">(HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation List that may specify peer certificates that are to be considered revoked.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level1">(Added in 7.19.7)
-<p class="level0"><a name="-d--data"></a><span class="nroffip">-d/--data &lt;data&gt;</span>
-<p class="level1">(HTTP) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to <a class="emphasis" href="#-F--form">-F/--form</a>.
-<p class="level1"><a class="emphasis" href="#-d--data">-d/--data</a> is the same as <span Class="emphasis">--data-ascii</span>. To post data purely binary, you should instead use the <a class="emphasis" href="#--data-binary">--data-binary</a> option. To URL-encode the value of a form field you may use <a class="emphasis" href="#--data-urlencode">--data-urlencode</a>.
-<p class="level1">If any of these options is used more than once on the same command line, the data pieces specified will be merged together with a separating &-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post chunk that looks like 'name=daniel&skill=lousy'.
-<p class="level1">If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the data from stdin. The contents of the file must already be URL-encoded. Multiple files can also be specified. Posting data from a file named 'foobar' would thus be done with <span Class="emphasis">--data @foobar</span>.
-<p class="level0"><a name="--data-binary"></a><span class="nroffip">--data-binary &lt;data&gt;</span>
-<p class="level1">(HTTP) This posts data exactly as specified with no extra processing whatsoever.
-<p class="level1">If you start the data with the letter @, the rest should be a filename. Data is posted in a similar manner as <span Class="emphasis">--data-ascii</span> does, except that newlines are preserved and conversions are never done.
-<p class="level1">If this option is used several times, the ones following the first will append data as described in <a class="emphasis" href="#-d--data">-d/--data</a>.
-<p class="level0"><a name="--data-urlencode"></a><span class="nroffip">--data-urlencode &lt;data&gt;</span>
-<p class="level1">(HTTP) This posts data, similar to the other --data options with the exception that this performs URL-encoding. (Added in 7.18.0)
-<p class="level1">To be CGI-compliant, the &lt;data&gt; part should begin with a <span Class="emphasis">name</span> followed by a separator and a content specification. The &lt;data&gt; part can be passed to curl using one of the following syntaxes:
-<p class="level2">
-<p class="level1"><a name="content"></a><span class="nroffip">content</span>
-<p class="level2">This will make curl URL-encode the content and pass that on. Just be careful so that the content doesn't contain any = or @ symbols, as that will then make the syntax match one of the other cases below!
-<p class="level1"><a name="content"></a><span class="nroffip">=content</span>
-<p class="level2">This will make curl URL-encode the content and pass that on. The preceding = symbol is not included in the data.
-<p class="level1"><a name="namecontent"></a><span class="nroffip">name=content</span>
-<p class="level2">This will make curl URL-encode the content part and pass that on. Note that the name part is expected to be URL-encoded already.
-<p class="level1"><a name="filename"></a><span class="nroffip">@filename</span>
-<p class="level2">This will make curl load data from the given file (including any newlines), URL-encode that data and pass it on in the POST.
-<p class="level1"><a name="namefilename"></a><span class="nroffip">name@filename</span>
-<p class="level2">This will make curl load data from the given file (including any newlines), URL-encode that data and pass it on in the POST. The name part gets an equal sign appended, resulting in <span Class="emphasis">name=urlencoded-file-content</span>. Note that the name is expected to be URL-encoded already.
-<p class="level1">
-<p class="level0"><a name="--digest"></a><span class="nroffip">--digest</span>
-<p class="level1">(HTTP) Enables HTTP Digest authentication. This is a authentication that prevents the password from being sent over the wire in clear text. Use this in combination with the normal <a class="emphasis" href="#-u--user">-u/--user</a> option to set user name and password. See also <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--negotiate">--negotiate</a> and <a class="emphasis" href="#--anyauth">--anyauth</a> for related options.
-<p class="level1">If this option is used several times, the following occurrences make no difference.
-<p class="level0"><a name="--disable-eprt"></a><span class="nroffip">--disable-eprt</span>
-<p class="level1">(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT before using PORT, but with this option, it will use PORT right away. EPRT and LPRT are extensions to the original FTP protocol, and may not work on all servers, but they enable more functionality in a better way than the traditional PORT command.
-<p class="level1"><span Class="bold">--eprt</span> can be used to explicitly enable EPRT again and <span Class="bold">--no-eprt</span> is an alias for <a class="bold" href="#--disable-eprt">--disable-eprt</a>.
-<p class="level1">Disabling EPRT only changes the active behavior. If you want to switch to passive mode you need to not use <a class="emphasis" href="#-P--ftp-port">-P/--ftp-port</a> or force it with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>.
-<p class="level0"><a name="--disable-epsv"></a><span class="nroffip">--disable-epsv</span>
-<p class="level1">(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP transfers. Curl will normally always first attempt to use EPSV before PASV, but with this option, it will not try using EPSV.
-<p class="level1"><span Class="bold">--epsv</span> can be used to explicitly enable EPRT again and <span Class="bold">--no-epsv</span> is an alias for <a class="bold" href="#--disable-epsv">--disable-epsv</a>.
-<p class="level1">Disabling EPSV only changes the passive behavior. If you want to switch to active mode you need to use <a class="emphasis" href="#-P--ftp-port">-P/--ftp-port</a>.
-<p class="level0"><a name="-D--dump-header"></a><span class="nroffip">-D/--dump-header &lt;file&gt;</span>
-<p class="level1">Write the protocol headers to the specified file.
-<p class="level1">This option is handy to use when you want to store the headers that a HTTP site sends to you. Cookies from the headers could then be read in a second curl invocation by using the <a class="emphasis" href="#-b--cookie">-b/--cookie</a> option! The <a class="emphasis" href="#-c--cookie-jar">-c/--cookie-jar</a> option is however a better way to store cookies.
-<p class="level1">When used in FTP, the FTP server response lines are considered being "headers" and thus are saved there.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-e--referer"></a><span class="nroffip">-e/--referer &lt;URL&gt;</span>
-<p class="level1">(HTTP) Sends the "Referer Page" information to the HTTP server. This can also be set with the <a class="emphasis" href="#-H--header">-H/--header</a> flag of course. When used with <a class="emphasis" href="#-L--location">-L/--location</a> you can append ";auto" to the --referer URL to make curl automatically set the previous URL when it follows a Location: header. The ";auto" string can be used alone, even if you don't set an initial --referer.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--engine"></a><span class="nroffip">--engine &lt;name&gt;</span>
-<p class="level1">Select the OpenSSL crypto engine to use for cipher operations. Use <a class="emphasis" href="#--engine">--engine list</a> to print a list of build-time supported engines. Note that not all (or none) of the engines may be available at run-time.
-<p class="level0"><a name="--environment"></a><span class="nroffip">--environment</span>
-<p class="level1">(RISC OS ONLY) Sets a range of environment variables, using the names the -w option supports, to allow easier extraction of useful information after having run curl.
-<p class="level0"><a name="--egd-file"></a><span class="nroffip">--egd-file &lt;file&gt;</span>
-<p class="level1">(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket is used to seed the random engine for SSL connections. See also the <a class="emphasis" href="#--random-file">--random-file</a> option.
-<p class="level0"><a name="-E--cert"></a><span class="nroffip">-E/--cert &lt;certificate[:password]&gt;</span>
-<p class="level1">(SSL) Tells curl to use the specified certificate file when getting a file with HTTPS or FTPS. The certificate must be in PEM format. If the optional password isn't specified, it will be queried for on the terminal. Note that this option assumes a "certificate" file that is the private key and the private certificate concatenated! See <span Class="emphasis">--cert</span> and <a class="emphasis" href="#--key">--key</a> to specify them independently.
-<p class="level1">If curl is built against the NSS SSL library then this option tells curl the nickname of the certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be loaded.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--cert-type"></a><span class="nroffip">--cert-type &lt;type&gt;</span>
-<p class="level1">(SSL) Tells curl what certificate type the provided certificate is in. PEM, DER and ENG are recognized types. If not specified, PEM is assumed.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--cacert"></a><span class="nroffip">--cacert &lt;CA certificate&gt;</span>
-<p class="level1">(SSL) Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates. The certificate(s) must be in PEM format. Normally curl is built to use a default file for this, so this option is typically used to alter that default file.
-<p class="level1">curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is set, and uses the given path as a path to a CA cert bundle. This option overrides that variable.
-<p class="level1">The windows version of curl will automatically look for a CA certs file named &acute;curl-ca-bundle.crt&acute;, either in the same directory as curl.exe, or in the Current Working Directory, or in any folder along your PATH.
-<p class="level1">If curl is built against the NSS SSL library then this option tells curl the nickname of the CA certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be loaded.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--capath"></a><span class="nroffip">--capath &lt;CA certificate directory&gt;</span>
-<p class="level1">(SSL) Tells curl to use the specified certificate directory to verify the peer. The certificates must be in PEM format, and the directory must have been processed using the c_rehash utility supplied with openssl. Using <a class="emphasis" href="#--capath">--capath</a> can allow curl to make SSL-connections much more efficiently than using <a class="emphasis" href="#--cacert">--cacert</a> if the <a class="emphasis" href="#--cacert">--cacert</a> file contains many CA certificates.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-f--fail"></a><span class="nroffip">-f/--fail</span>
-<p class="level1">(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 a 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.
-<p class="level1">This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response codes 401 and 407).
-<p class="level0"><a name="--ftp-account"></a><span class="nroffip">--ftp-account [data]</span>
-<p class="level1">(FTP) When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command. (Added in 7.13.0)
-<p class="level1">If this option is used twice, the second will override the previous use.
-<p class="level0"><a name="--ftp-create-dirs"></a><span class="nroffip">--ftp-create-dirs</span>
-<p class="level1">(FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't currently exist on the server, the standard behavior of curl is to fail. Using this option, curl will instead attempt to create missing directories.
-<p class="level0"><a name="--ftp-method"></a><span class="nroffip">--ftp-method [method]</span>
-<p class="level1">(FTP) Control what method curl should use to reach a file on a FTP(S) server. The method argument should be one of the following alternatives:
-<p class="level2">
-<p class="level1"><a name="multicwd"></a><span class="nroffip">multicwd</span>
-<p class="level2">curl does a single CWD operation for each path part in the given URL. For deep hierarchies this means very many commands. This is how RFC1738 says it should be done. This is the default but the slowest behavior.
-<p class="level1"><a name="nocwd"></a><span class="nroffip">nocwd</span>
-<p class="level2">curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior.
-<p class="level1"><a name="singlecwd"></a><span class="nroffip">singlecwd</span>
-<p class="level2">curl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'.
-<p class="level1">(Added in 7.15.1)
-<p class="level0"><a name="--ftp-pasv"></a><span class="nroffip">--ftp-pasv</span>
-<p class="level1">(FTP) Use passive mode for the data conection. Passive is the internal default behavior, but using this option can be used to override a previous <span Class="emphasis">-P/-ftp-port</span> option. (Added in 7.11.0)
-<p class="level1">If this option is used several times, the following occurrences make no difference. Undoing an enforced passive really isn't doable but you must then instead enforce the correct <a class="emphasis" href="#-P--ftp-port">-P/--ftp-port</a> again.
-<p class="level1">Passive mode means that curl will try the EPSV command first and then PASV, unless <a class="emphasis" href="#--disable-epsv">--disable-epsv</a> is used.
-<p class="level0"><a name="--ftp-alternative-to-user"></a><span class="nroffip">--ftp-alternative-to-user &lt;command&gt;</span>
-<p class="level1">(FTP) If authenticating with the USER and PASS commands fails, send this command. When connecting to Tumbleweed's Secure Transport server over FTPS using a client certificate, using "SITE AUTH" will tell the server to retrieve the username from the certificate. (Added in 7.15.5)
-<p class="level0"><a name="--ftp-skip-pasv-ip"></a><span class="nroffip">--ftp-skip-pasv-ip</span>
-<p class="level1">(FTP) Tell curl to not use the IP address the server suggests in its response to curl's PASV command when curl connects the data connection. Instead curl will re-use the same IP address it already uses for the control connection. (Added in 7.14.2)
-<p class="level1">This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
-<p class="level0"><a name="--ftp-pret"></a><span class="nroffip">--ftp-pret</span>
-<p class="level1">(FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard command for directory listings as well as up and downloads in PASV mode. (Added in 7.20.x)
-<p class="level0"><a name="--ssl"></a><span class="nroffip">--ssl</span>
-<p class="level1">(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a non-secure connection if the server doesn't support SSL/TLS. See also <a class="emphasis" href="#--ftp-ssl-control">--ftp-ssl-control</a> and <a class="emphasis" href="#--ssl-reqd">--ssl-reqd</a> for different levels of encryption required. (Added in 7.20.0)
-<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl</span> (Added in 7.11.0) and that can still be used but will be removed in a future version.
-<p class="level0"><a name="--ftp-ssl-control"></a><span class="nroffip">--ftp-ssl-control</span>
-<p class="level1">(FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure authentication, but non-encrypted data transfers for efficiency. Fails the transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
-<p class="level0"><a name="--ssl-reqd"></a><span class="nroffip">--ssl-reqd</span>
-<p class="level1">(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
-<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl-reqd</span> (added in 7.15.5) and that can still be used but will be removed in a future version.
-<p class="level0"><a name="--ftp-ssl-ccc"></a><span class="nroffip">--ftp-ssl-ccc</span>
-<p class="level1">(FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This allows NAT routers to follow the FTP transaction. The default mode is passive. See --ftp-ssl-ccc-mode for other modes. (Added in 7.16.1)
-<p class="level0"><a name="--ftp-ssl-ccc-mode"></a><span class="nroffip">--ftp-ssl-ccc-mode [active/passive]</span>
-<p class="level1">(FTP) Use CCC (Clear Command Channel) Sets the CCC mode. The passive mode will not initiate the shutdown, but instead wait for the server to do it, and will not reply to the shutdown from the server. The active mode initiates the shutdown and waits for a reply from the server. (Added in 7.16.2)
-<p class="level0"><a name="-F--form"></a><span class="nroffip">-F/--form &lt;name=content&gt;</span>
-<p class="level1">(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 RFC2388. 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 &lt;. The difference between @ and &lt; is then that @ makes a file get attached in the post as a file upload, while the &lt; makes a text field and just get the contents for that text field from a file.
-<p class="level1">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 input:
-<p class="level1"><span Class="bold">curl</span> -F password=@/etc/passwd www.mypasswords.com
-<p class="level1">To read the file's content from stdin instead of a file, use - where the file name should've been. This goes for both @ and &lt; constructs.
-<p class="level1">You can also tell curl what Content-Type to use by using 'type=', in a manner similar to:
-<p class="level1"><span Class="bold">curl</span> -F "web=@index.html;type=text/html" url.com
-<p class="level1">or
-<p class="level1"><span Class="bold">curl</span> -F "name=daniel;type=text/foo" url.com
-<p class="level1">You can also explicitly change the name field of an file upload part by setting filename=, like this:
-<p class="level1"><span Class="bold">curl</span> -F "file=@localfile;filename=nameinpost" url.com
-<p class="level1">See further examples and details in the MANUAL.
-<p class="level1">This option can be used multiple times.
-<p class="level0"><a name="--form-string"></a><span class="nroffip">--form-string &lt;name=string&gt;</span>
-<p class="level1">(HTTP) Similar to <span Class="emphasis">--form</span> except that the value string for the named parameter is used literally. Leading '@' and '&lt;' characters, and the ';type=' string in the value have no special meaning. Use this in preference to <span Class="emphasis">--form</span> if there's any possibility that the string value may accidentally trigger the '@' or '&lt;' features of <span Class="emphasis">--form</span>.
-<p class="level0"><a name="-g--globoff"></a><span class="nroffip">-g/--globoff</span>
-<p class="level1">This option switches off the "URL globbing parser". When you set this option, you can specify URLs that contain the letters {}[] without having them being interpreted by curl itself. Note that these letters are not normal legal URL contents but they should be encoded according to the URI standard.
-<p class="level0"><a name="-G--get"></a><span class="nroffip">-G/--get</span>
-<p class="level1">When used, this option will make all data specified with <a class="emphasis" href="#-d--data">-d/--data</a> or <a class="emphasis" href="#--data-binary">--data-binary</a> to be used in a HTTP GET request instead of the POST request that otherwise would be used. The data will be appended to the URL with a '?' separator.
-<p class="level1">If used in combination with -I, the POST data will instead be appended to the URL with a HEAD request.
-<p class="level1">If this option is used several times, the following occurrences make no difference. This is because undoing a GET doesn't make sense, but you should then instead enforce the alternative method you prefer.
-<p class="level0"><a name="-h--help"></a><span class="nroffip">-h/--help</span>
-<p class="level1">Usage help.
-<p class="level0"><a name="-H--header"></a><span class="nroffip">-H/--header &lt;header&gt;</span>
-<p class="level1">(HTTP) Extra header to use when getting a web page. You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your externally set header will be used instead of the internal one. This allows you to make even trickier stuff than curl would normally do. You should not replace internally set headers without knowing perfectly well what you're doing. Remove an internal header by giving a replacement without content on the right side of the colon, as in: -H "Host:".
-<p class="level1">curl will make sure that each header you add/replace is sent with the proper end-of-line marker, you should thus <span Class="bold">not</span> add that as a part of the header content: do not add newlines or carriage returns, they will only mess things up for you.
-<p class="level1">See also the <a class="emphasis" href="#-A--user-agent">-A/--user-agent</a> and <a class="emphasis" href="#-e--referer">-e/--referer</a> options.
-<p class="level1">This option can be used multiple times to add/replace/remove multiple headers.
-<p class="level0"><a name="--hostpubmd5"></a><span class="nroffip">--hostpubmd5 &lt;md5&gt;</span>
-<p class="level1">Pass a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, curl will refuse the connection with the host unless the md5sums match. This option is only for SCP and SFTP transfers. (Added in 7.17.1)
-<p class="level0"><a name="--ignore-content-length"></a><span class="nroffip">--ignore-content-length</span>
-<p class="level1">(HTTP) Ignore the Content-Length header. This is particularly useful for servers running Apache 1.x, which will report incorrect Content-Length for files larger than 2 gigabytes.
-<p class="level0"><a name="-i--include"></a><span class="nroffip">-i/--include</span>
-<p class="level1">(HTTP) Include the HTTP-header in the output. The HTTP-header includes things like server-name, date of the document, HTTP-version and more...
-<p class="level0"><a name="--interface"></a><span class="nroffip">--interface &lt;name&gt;</span>
-<p class="level1">Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example could look like:
-<p class="level1">&nbsp;curl --interface eth0:1 <a href="http://www.netscape.com/">http://www.netscape.com/</a>
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-I--head"></a><span class="nroffip">-I/--head</span>
-<p class="level1">(HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on a FTP or FILE file, curl displays the file size and last modification time only.
-<p class="level0"><a name="-j--junk-session-cookies"></a><span class="nroffip">-j/--junk-session-cookies</span>
-<p class="level1">(HTTP) When curl is told to read cookies from a given file, this option will make it discard all "session cookies". This will basically have the same effect as if a new session is started. Typical browsers always discard session cookies when they're closed down.
-<p class="level0"><a name="-J--remote-header-name"></a><span class="nroffip">-J/--remote-header-name</span>
-<p class="level1">(HTTP) This option tells the -O/--remote-name option to use the server-specified Content-Disposition filename instead of extracting a filename from the URL.
-<p class="level0"><a name="-k--insecure"></a><span class="nroffip">-k/--insecure</span>
-<p class="level1">(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless <a class="emphasis" href="#-k--insecure">-k/--insecure</a> is used.
-<p class="level1">See this online resource for further details: <span Class="bold"><a href="http://curl.haxx.se/docs/sslcerts.html">http://curl.haxx.se/docs/sslcerts.html</a></span>
-<p class="level0"><a name="--keepalive-time"></a><span class="nroffip">--keepalive-time &lt;seconds&gt;</span>
-<p class="level1">This option sets the time a connection needs to remain idle before sending keepalive probes and the time between individual keepalive probes. It is currently effective on operating systems offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This option has no effect if <a class="emphasis" href="#--no-keepalive">--no-keepalive</a> is used. (Added in 7.18.0)
-<p class="level1">If this option is used multiple times, the last occurrence sets the amount.
-<p class="level0"><a name="--key"></a><span class="nroffip">--key &lt;key&gt;</span>
-<p class="level1">(SSL/SSH) Private key file name. Allows you to provide your private key in this separate file.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--key-type"></a><span class="nroffip">--key-type &lt;type&gt;</span>
-<p class="level1">(SSL) Private key file type. Specify which type your <a class="emphasis" href="#--key">--key</a> provided private key is. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--krb"></a><span class="nroffip">--krb &lt;level&gt;</span>
-<p class="level1">(FTP) Enable Kerberos authentication and use. The level must be entered and 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.
-<p class="level1">This option requires a library built with kerberos4 or GSSAPI (GSS-Negotiate) support. This is not very common. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your curl supports it.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-K--config"></a><span class="nroffip">-K/--config &lt;config file&gt;</span>
-<p class="level1">Specify which config file to read curl arguments from. The config file is a text file in which command line arguments can be written which then will be used as if they were written on the actual command line. Options and their parameters must be specified on the same config file line, separated by whitespace, colon, the equals sign or any combination thereof (however, the preferred separator is the equals sign). If the parameter is to contain whitespace, the parameter must be enclosed within quotes. Within double quotes, the following escape sequences are available: \\, \", \t, \n, \r and \v. A backslash preceding any other letter is ignored. If the first column of a config line is a '#' character, the rest of the line will be treated as a comment. Only write one option per physical line in the config file.
-<p class="level1">Specify the filename to -K/--config as '-' to make curl read the file from stdin.
-<p class="level1">Note that to be able to specify a URL in the config file, you need to specify it using the <a class="emphasis" href="#--url">--url</a> option, and not by simply writing the URL on its own line. So, it could look similar to this:
-<p class="level1">url = "<a href="http://curl.haxx.se/docs/">http://curl.haxx.se/docs/</a>"
-<p class="level1">Long option names can optionally be given in the config file without the initial double dashes.
-<p class="level1">When curl is invoked, it always (unless <a class="emphasis" href="#-q">-q</a> is used) checks for a default config file and uses it if found. The default config file is checked for in the following places in this order:
-<p class="level1">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 system). On Windows, it then checks for the APPDATA variable, or as a last resort the '%USERPROFILE%\Application Data'.
-<p class="level1">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 simply try to load .curlrc from the determined home dir.
-<p class="level1"><pre>
-<p class="level1"># --- Example file ---
- # this is a comment
- url = "curl.haxx.se"
- output = "curlhere.html"
- user-agent = "superagent/1.0"
- <p class="level1"># and fetch another URL too
- url = "curl.haxx.se/docs/manpage.html"
- -O
- referer = "<a href="http://nowhereatall.com/">http://nowhereatall.com/</a>"
- # --- End of example file ---
- </pre>
-
-<p class="level1">
-<p class="level1">This option can be used multiple times to load multiple config files.
-<p class="level0"><a name="--libcurl"></a><span class="nroffip">--libcurl &lt;file&gt;</span>
-<p class="level1">Append this option to any ordinary curl command line, and you will get a libcurl-using source code written to the file that does the equivalent of what your command-line operation does!
-<p class="level1">NOTE: this does not properly support -F and the sending of multipart formposts, so in those cases the output program will be missing necessary calls to <span Class="emphasis">curl_formadd(3)</span>, and possibly more.
-<p class="level1">If this option is used several times, the last given file name will be used. (Added in 7.16.1)
-<p class="level0"><a name="--limit-rate"></a><span class="nroffip">--limit-rate &lt;speed&gt;</span>
-<p class="level1">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.
-<p class="level1">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 megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
-<p class="level1">The given rate is the average speed counted during the entire transfer. It means that curl might use higher transfer speeds in short bursts, but over time it uses no more than the given rate.
-<p class="level1">If you also use the <a class="emphasis" href="#-Y--speed-limit">-Y/--speed-limit</a> option, that option will take precedence and might cripple the rate-limiting slightly, to help keeping the speed-limit logic working.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-l--list-only"></a><span class="nroffip">-l/--list-only</span>
-<p class="level1">(FTP) When listing an FTP directory, this switch forces a name-only view. Especially useful if you want to machine-parse the contents of an FTP directory since the normal directory view doesn't use a standard look or format.
-<p class="level1">This option causes an FTP NLST command to be sent. Some FTP servers list only files in their response to NLST; they do not include subdirectories and symbolic links.
-<p class="level1">
-<p class="level0"><a name="--local-port"></a><span class="nroffip">--local-port &lt;num&gt;[-num]</span>
-<p class="level1">Set a preferred number or range of local port numbers to use for the connection(s). Note that port numbers by nature are a scarce resource that will be busy at times so setting this range to something too narrow might cause unnecessary connection setup failures. (Added in 7.15.2)
-<p class="level0"><a name="-L--location"></a><span class="nroffip">-L/--location</span>
-<p class="level1">(HTTP/HTTPS) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place. If used together with <a class="emphasis" href="#-i--include">-i/--include</a> or <a class="emphasis" href="#-I--head">-I/--head</a>, headers from all requested pages will be shown. When authentication is used, curl only sends its credentials to the initial host. If a redirect takes curl to a different host, it won't be able to intercept the user+password. See also <a class="emphasis" href="#--location-trusted">--location-trusted</a> on how to change this. You can limit the amount of redirects to follow by using the <a class="emphasis" href="#--max-redirs">--max-redirs</a> option.
-<p class="level1">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.
-<p class="level0"><a name="--location-trusted"></a><span class="nroffip">--location-trusted</span>
-<p class="level1">(HTTP/HTTPS) Like <a class="emphasis" href="#-L--location">-L/--location</a>, but will allow sending the name + password to all hosts that the site may redirect to. This may or may not introduce a security breach if the site redirects you to a site to which you'll send your authentication info (which is plaintext in the case of HTTP Basic authentication).
-<p class="level0"><a name="--mail-rcpt"></a><span class="nroffip">--mail-rcpt &lt;address&gt;</span>
-<p class="level1">(SMTP) Specify a single address that the given mail should get sent to. This option can be used multiple times to specify many recipients.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="--mail-from"></a><span class="nroffip">--mail-from &lt;address&gt;</span>
-<p class="level1">(SMTP) Specify a single address that the given mail should get sent from.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="--max-filesize"></a><span class="nroffip">--max-filesize &lt;bytes&gt;</span>
-<p class="level1">Specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and curl will return with exit code 63.
-<p class="level1"><span Class="bold">NOTE:</span> The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers.
-<p class="level0"><a name="-m--max-time"></a><span class="nroffip">-m/--max-time &lt;seconds&gt;</span>
-<p class="level1">Maximum time in seconds that you allow the whole operation to take. This is useful for preventing your batch jobs from hanging for hours due to slow networks or links going down. See also the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-M--manual"></a><span class="nroffip">-M/--manual</span>
-<p class="level1">Manual. Display the huge help text.
-<p class="level0"><a name="-n--netrc"></a><span class="nroffip">-n/--netrc</span>
-<p class="level1">Makes curl scan the <span Class="emphasis">.netrc</span> (<span Class="emphasis">_netrc</span> 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 <span Class="manpage">netrc(4)</span> or <span Class="manpage">ftp(1)</span> for details on the file format. Curl will not complain if that file doesn't have the right permissions (it should not be either world- or group-readable). The environment variable "HOME" is used to find the home directory.
-<p class="level1">A quick and very simple example of how to setup a <span Class="emphasis">.netrc</span> to allow curl to FTP to the machine host.domain.com with user name 'myself' and password 'secret' should look similar to:
-<p class="level1"><span Class="bold">machine host.domain.com login myself password secret</span>
-<p class="level0"><a name="--netrc-optional"></a><span class="nroffip">--netrc-optional</span>
-<p class="level1">Very similar to <span Class="emphasis">--netrc</span>, but this option makes the .netrc usage <span Class="bold">optional</span> and not mandatory as the <span Class="emphasis">--netrc</span> option does.
-<p class="level0"><a name="--negotiate"></a><span class="nroffip">--negotiate</span>
-<p class="level1">(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.
-<p class="level1">If you want to enable Negotiate for your proxy authentication, then use <a class="emphasis" href="#--proxy-negotiate">--proxy-negotiate</a>.
-<p class="level1">This option requires a library built with GSSAPI support. This is not very common. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your version supports GSS-Negotiate.
-<p class="level1">When using this option, you must also provide a fake -u/--user option to activate the authentication code properly. Sending a '-u :' is enough as the user name and password from the -u option aren't actually used.
-<p class="level1">If this option is used several times, the following occurrences make no difference.
-<p class="level0"><a name="-N--no-buffer"></a><span class="nroffip">-N/--no-buffer</span>
-<p class="level1">Disables the buffering of the output stream. In normal work situations, curl will use a standard buffered output stream that will have the effect that it will output the data in chunks, not necessarily exactly when the data arrives. Using this option will disable that buffering.
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--buffer</span> to enforce the buffering.
-<p class="level0"><a name="--no-keepalive"></a><span class="nroffip">--no-keepalive</span>
-<p class="level1">Disables the use of keepalive messages on the TCP connection, as by default curl enables them.
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--keepalive</span> to enforce keepalive.
-<p class="level0"><a name="--no-sessionid"></a><span class="nroffip">--no-sessionid</span>
-<p class="level1">(SSL) Disable curl's use of SSL session-ID caching. By default all transfers are done using the cache. Note that while nothing should ever get hurt by attempting to reuse SSL session-IDs, there seem to be broken SSL implementations in the wild that may require you to disable this in order for you to succeed. (Added in 7.16.0)
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--sessionid</span> to enforce session-ID caching.
-<p class="level0"><a name="--noproxy"></a><span class="nroffip">--noproxy &lt;no-proxy-list&gt;</span>
-<p class="level1">Comma-separated list of hosts which do not use a proxy, if one is specified. The only wildcard is a single * character, which matches all hosts, and effectively disables the proxy. Each name in this list is matched as either a domain which contains the hostname, or the hostname itself. For example, local.com would match local.com, local.com:80, and www.local.com, but not www.notlocal.com. (Added in 7.19.4).
-<p class="level0"><a name="--ntlm"></a><span class="nroffip">--ntlm</span>
-<p class="level1">(HTTP) Enables NTLM authentication. The NTLM authentication method was designed by Microsoft and is used by IIS web servers. It is a proprietary protocol, reverse-engineered by clever people and implemented in curl based on their efforts. This kind of behavior should not be endorsed, you should encourage everyone who uses NTLM to switch to a public and documented authentication method instead, such as Digest.
-<p class="level1">If you want to enable NTLM for your proxy authentication, then use <a class="emphasis" href="#--proxy-ntlm">--proxy-ntlm</a>.
-<p class="level1">This option requires a library built with SSL support. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your curl supports NTLM.
-<p class="level1">If this option is used several times, the following occurrences make no difference.
-<p class="level0"><a name="-o--output"></a><span class="nroffip">-o/--output &lt;file&gt;</span>
-<p class="level1">Write output to &lt;file&gt; instead of stdout. If you are using {} or [] to fetch multiple documents, you can use '#' followed by a number in the &lt;file&gt; specifier. That variable will be replaced with the current string for the URL being fetched. Like in:
-<p class="level1">&nbsp; curl http://{one,two}.site.com -o "file_#1.txt"
-<p class="level1">or use several variables like:
-<p class="level1">&nbsp; curl http://{site,host}.host[1-5].com -o "#1_#2"
-<p class="level1">You may use this option as many times as the number of URLs you have.
-<p class="level1">See also the <a class="emphasis" href="#--create-dirs">--create-dirs</a> option to create the local directories dynamically. Specifying the output as '-' (a single dash) will force the output to be done to stdout.
-<p class="level0"><a name="-O--remote-name"></a><span class="nroffip">-O/--remote-name</span>
-<p class="level1">Write output to a local file named like the remote file we get. (Only the file part of the remote file is used, the path is cut off.)
-<p class="level1">The remote file name to use for saving is extracted from the given URL, nothing else.
-<p class="level1">You may use this option as many times as the number of URLs you have.
-<p class="level0"><a name="--remote-name-all"></a><span class="nroffip">--remote-name-all</span>
-<p class="level1">This option changes the default action for all given URLs to be dealt with as if <a class="emphasis" href="#-O--remote-name">-O/--remote-name</a> were used for each one. So if you want to disable that for a specific URL after <a class="emphasis" href="#--remote-name-all">--remote-name-all</a> has been used, you must use "-o -" or <span Class="emphasis">--no-remote-name</span>. (Added in 7.19.0)
-<p class="level0"><a name="--pass"></a><span class="nroffip">--pass &lt;phrase&gt;</span>
-<p class="level1">(SSL/SSH) Passphrase for the private key
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--post301"></a><span class="nroffip">--post301</span>
-<p class="level1">Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L--location">-L/--location</a> (Added in 7.17.1)
-<p class="level0"><a name="--post302"></a><span class="nroffip">--post302</span>
-<p class="level1">Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 302 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L--location">-L/--location</a> (Added in 7.19.1)
-<p class="level0"><a name="--proto"></a><span class="nroffip">--proto &lt;protocols&gt;</span>
-<p class="level1">Tells curl to use the listed protocols for its initial retrieval. Protocols are evaluated left to right, are comma separated, and are each a protocol name or 'all', optionally prefixed by zero or more modifiers. Available modifiers are:
-<p class="level2">
-<p class="level2"><a class="bold" href="#">+</a> Permit this protocol in addition to protocols already permitted (this is the default if no modifier is used).
-<p class="level2"><a class="bold" href="#-">-</a> Deny this protocol, removing it from the list of protocols already permitted.
-<p class="level2"><a class="bold" href="#">=</a> Permit only this protocol (ignoring the list already permitted), though subject to later modification by subsequent entries in the comma separated list.
-<p class="level1">
-<p class="level0"><a name=""></a><span class="nroffip"></span>
-<p class="level1">For example:
-<p class="level2">
-<p class="level2"><a class="bold" href="#--proto">--proto -ftps</a> uses the default protocols, but disables ftps
-<p class="level2"><a class="bold" href="#--proto">--proto -all,https,+http</a> only enables http and https
-<p class="level2"><a class="bold" href="#--proto">--proto =http,https</a> also only enables http and https
-<p class="level1">
-<p class="level0"><a name=""></a><span class="nroffip"></span>
-<p class="level1">Unknown protocols produce a warning. This allows scripts to safely rely on being able to disable potentially dangerous protocols, without relying upon support for that protocol being built into curl to avoid an error.
-<p class="level1">This option can be used multiple times, in which case the effect is the same as concatenating the protocols into one instance of the option.
-<p class="level1">(Added in 7.20.2)
-<p class="level0"><a name="--proto-redir"></a><span class="nroffip">--proto-redir &lt;protocols&gt;</span>
-<p class="level1">Tells curl to use the listed protocols after a redirect. See --proto for how protocols are represented.
-<p class="level1">(Added in 7.20.2)
-<p class="level0"><a name="--proxy-anyauth"></a><span class="nroffip">--proxy-anyauth</span>
-<p class="level1">Tells curl to pick a suitable authentication method when communicating with the given proxy. This might cause an extra request/response round-trip. (Added in 7.13.2)
-<p class="level0"><a name="--proxy-basic"></a><span class="nroffip">--proxy-basic</span>
-<p class="level1">Tells curl to use HTTP Basic authentication when communicating with the given proxy. Use <a class="emphasis" href="#--basic">--basic</a> for enabling HTTP Basic with a remote host. Basic is the default authentication method curl uses with proxies.
-<p class="level0"><a name="--proxy-digest"></a><span class="nroffip">--proxy-digest</span>
-<p class="level1">Tells curl to use HTTP Digest authentication when communicating with the given proxy. Use <a class="emphasis" href="#--digest">--digest</a> for enabling HTTP Digest with a remote host.
-<p class="level0"><a name="--proxy-negotiate"></a><span class="nroffip">--proxy-negotiate</span>
-<p class="level1">Tells curl to use HTTP Negotiate authentication when communicating with the given proxy. Use <a class="emphasis" href="#--negotiate">--negotiate</a> for enabling HTTP Negotiate with a remote host. (Added in 7.17.1)
-<p class="level0"><a name="--proxy-ntlm"></a><span class="nroffip">--proxy-ntlm</span>
-<p class="level1">Tells curl to use HTTP NTLM authentication when communicating with the given proxy. Use <a class="emphasis" href="#--ntlm">--ntlm</a> for enabling NTLM with a remote host.
-<p class="level0"><a name="--proxy10"></a><span class="nroffip">--proxy1.0 &lt;proxyhost[:port]&gt;</span>
-<p class="level1">Use the specified HTTP 1.0 proxy. If the port number is not specified, it is assumed at port 1080.
-<p class="level1">The only difference between this and the HTTP proxy option (<a class="emphasis" href="#-x--proxy">-x/--proxy</a>), is that attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol instead of the default HTTP 1.1.
-<p class="level0"><a name="-p--proxytunnel"></a><span class="nroffip">-p/--proxytunnel</span>
-<p class="level1">When an HTTP proxy is used (<a class="emphasis" href="#-x--proxy">-x/--proxy</a>), this option will cause non-HTTP protocols to attempt to tunnel through the proxy instead of merely using it to do HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT request and requires that the proxy allows direct connect to the remote port number curl wants to tunnel through to.
-<p class="level0"><a name="--pubkey"></a><span class="nroffip">--pubkey &lt;key&gt;</span>
-<p class="level1">(SSH) Public key file name. Allows you to provide your public key in this separate file.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-P--ftp-port"></a><span class="nroffip">-P/--ftp-port &lt;address&gt;</span>
-<p class="level1">(FTP) Reverses the default initiator/listener roles when connecting with FTP. This switch makes curl use active mode. In practice, curl then tells the server to connect back to the client's specified address and port, while passive mode asks the server to setup an IP address and port for it to connect to. &lt;address&gt; should be one of:
-<p class="level2">
-<p class="level1"><a name="interface"></a><span class="nroffip">interface</span>
-<p class="level2">i.e "eth0" to specify which interface's IP address you want to use (Unix only)
-<p class="level1"><a name="IP"></a><span class="nroffip">IP address</span>
-<p class="level2">i.e "192.168.10.1" to specify the exact IP address
-<p class="level1"><a name="host"></a><span class="nroffip">host name</span>
-<p class="level2">i.e "my.host.domain" to specify the machine
-<p class="level1"><a name="-"></a><span class="nroffip">-</span>
-<p class="level2">make curl pick the same IP address that is already used for the control connection
-<p class="level1">
-<p class="level1">If this option is used several times, the last one will be used. Disable the use of PORT with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>. Disable the attempt to use the EPRT command instead of PORT by using <a class="emphasis" href="#--disable-eprt">--disable-eprt</a>. EPRT is really PORT++.
-<p class="level1">Starting in 7.19.5, you can append ":[start]-[end]" to the right of the address, to tell curl what TCP port range to use. That means you specify a port range, from a lower to a higher number. A single number works as well, but do note that it increases the risk of failure since the port may not be available.
-<p class="level0"><a name="-q"></a><span class="nroffip">-q</span>
-<p class="level1">If used as the first parameter on the command line, the <span Class="emphasis">curlrc</span> config file will not be read and used. See the <a class="emphasis" href="#-K--config">-K/--config</a> for details on the default config file search path.
-<p class="level0"><a name="-Q--quote"></a><span class="nroffip">-Q/--quote &lt;command&gt;</span>
-<p class="level1">(FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote commands are sent BEFORE the transfer takes place (just after the initial PWD command in an FTP transfer, to be exact). To make commands take place after a successful transfer, prefix them with a dash '-'. To make commands be sent after libcurl has changed the working directory, just before the transfer command(s), prefix the command with a '+' (this is only supported for FTP). You may specify any number of commands. If the server returns failure for one of the commands, the entire operation will be aborted. You must send syntactically correct FTP commands as RFC959 defines to FTP servers, or one of the commands listed below to SFTP servers. This option can be used multiple times.
-<p class="level1">SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote commands before sending them to the server. Following is the list of all supported SFTP quote commands:
-<p class="level2">
-<p class="level1"><a name="chgrp"></a><span class="nroffip">chgrp group file</span>
-<p class="level2">The chgrp command sets the group ID of the file named by the file operand to the group ID specified by the group operand. The group operand is a decimal integer group ID.
-<p class="level1"><a name="chmod"></a><span class="nroffip">chmod mode file</span>
-<p class="level2">The chmod command modifies the file mode bits of the specified file. The mode operand is an octal integer mode number.
-<p class="level1"><a name="chown"></a><span class="nroffip">chown user file</span>
-<p class="level2">The chown command sets the owner of the file named by the file operand to the user ID specified by the user operand. The user operand is a decimal integer user ID.
-<p class="level1"><a name="ln"></a><span class="nroffip">ln source_file target_file</span>
-<p class="level2">The ln and symlink commands create a symbolic link at the target_file location pointing to the source_file location.
-<p class="level1"><a name="mkdir"></a><span class="nroffip">mkdir directory_name</span>
-<p class="level2">The mkdir command creates the directory named by the directory_name operand.
-<p class="level1"><a name="pwd"></a><span class="nroffip">pwd</span>
-<p class="level2">The pwd command returns the absolute pathname of the current working directory.
-<p class="level1"><a name="rename"></a><span class="nroffip">rename source target</span>
-<p class="level2">The rename command renames the file or directory named by the source operand to the destination path named by the target operand.
-<p class="level1"><a name="rm"></a><span class="nroffip">rm file</span>
-<p class="level2">The rm command removes the file specified by the file operand.
-<p class="level1"><a name="rmdir"></a><span class="nroffip">rmdir directory</span>
-<p class="level2">The rmdir command removes the directory entry specified by the directory operand, provided it is empty.
-<p class="level1"><a name="symlink"></a><span class="nroffip">symlink source_file target_file</span>
-<p class="level2">See ln.
-<p class="level1">
-<p class="level0"><a name="--random-file"></a><span class="nroffip">--random-file &lt;file&gt;</span>
-<p class="level1">(SSL) Specify the path name to file containing what will be considered as random data. The data is used to seed the random engine for SSL connections. See also the <a class="emphasis" href="#--egd-file">--egd-file</a> option.
-<p class="level0"><a name="-r--range"></a><span class="nroffip">-r/--range &lt;range&gt;</span>
-<p class="level1">(HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified in a number of ways.
-<p class="level2">
-<p class="level2"><span Class="bold">0-499</span> specifies the first 500 bytes
-<p class="level2"><span Class="bold">500-999</span> specifies the second 500 bytes
-<p class="level2"><span Class="bold">-500</span> specifies the last 500 bytes
-<p class="level2"><span Class="bold">9500-</span> specifies the bytes from offset 9500 and forward
-<p class="level2"><span Class="bold">0-0,-1</span> specifies the first and last byte only(*)(H)
-<p class="level2"><span Class="bold">500-700,600-799</span> specifies 300 bytes from offset 500(H)
-<p class="level2"><span Class="bold">100-199,500-599</span> specifies two separate 100-byte ranges(*)(H)
-<p class="level1">
-<p class="level1">(*) = NOTE that this will cause the server to reply with a multipart response!
-<p class="level1">Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the 'start-stop' range syntax. If a non-digit character is given in the range, the server's response will be unspecified, depending on the server's configuration.
-<p class="level1">You should also be aware that many HTTP/1.1 servers do not have this feature enabled, so that when you attempt to get a range, you'll instead get the whole document.
-<p class="level1">FTP and SFTP range downloads only support the simple 'start-stop' syntax (optionally with one of the numbers omitted). FTP use depends on the extended FTP command SIZE.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--raw"></a><span class="nroffip">--raw</span>
-<p class="level1">When used, it disables all internal HTTP decoding of content or transfer encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
-<p class="level0"><a name="-R--remote-time"></a><span class="nroffip">-R/--remote-time</span>
-<p class="level1">When used, this will make libcurl attempt to figure out the timestamp of the remote file, and if that is available make the local file get that same timestamp.
-<p class="level0"><a name="--retry"></a><span class="nroffip">--retry &lt;num&gt;</span>
-<p class="level1">If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving up. Setting the number to 0 makes curl do no retries (which is the default). Transient error means either: a timeout, an FTP 4xx response code or an HTTP 5xx response code.
-<p class="level1">When curl is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double the waiting time until it reaches 10 minutes which then will be the delay between the rest of the retries. By using <a class="emphasis" href="#--retry-delay">--retry-delay</a> you disable this exponential backoff algorithm. See also <a class="emphasis" href="#--retry-max-time">--retry-max-time</a> to limit the total time allowed for retries. (Added in 7.12.3)
-<p class="level1">If this option is used multiple times, the last occurrence decide the amount.
-<p class="level0"><a name="--retry-delay"></a><span class="nroffip">--retry-delay &lt;seconds&gt;</span>
-<p class="level1">Make curl sleep this amount of time before each retry when a transfer has failed with a transient error (it changes the default backoff time algorithm between retries). This option is only interesting if <a class="emphasis" href="#--retry">--retry</a> is also used. Setting this delay to zero will make curl use the default backoff time. (Added in 7.12.3)
-<p class="level1">If this option is used multiple times, the last occurrence determines the amount.
-<p class="level0"><a name="--retry-max-time"></a><span class="nroffip">--retry-max-time &lt;seconds&gt;</span>
-<p class="level1">The retry timer is reset before the first transfer attempt. Retries will be done as usual (see <a class="emphasis" href="#--retry">--retry</a>) as long as the timer hasn't reached this given limit. Notice that if the timer hasn't reached the limit, the request will be made and while performing, it may take longer than this given time period. To limit a single request&acute;s maximum time, use <a class="emphasis" href="#-m--max-time">-m/--max-time</a>. Set this option to zero to not timeout retries. (Added in 7.12.3)
-<p class="level1">If this option is used multiple times, the last occurrence determines the amount.
-<p class="level0"><a name="-s--silent"></a><span class="nroffip">-s/--silent</span>
-<p class="level1">Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute.
-<p class="level0"><a name="-S--show-error"></a><span class="nroffip">-S/--show-error</span>
-<p class="level1">When used with -s it makes curl show an error message if it fails.
-<p class="level0"><a name="--socks4"></a><span class="nroffip">--socks4 &lt;host[:port]&gt;</span>
-<p class="level1">Use the specified SOCKS4 proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.15.2)
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--socks4a"></a><span class="nroffip">--socks4a &lt;host[:port]&gt;</span>
-<p class="level1">Use the specified SOCKS4a proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.18.0)
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--socks5-hostname"></a><span class="nroffip">--socks5-hostname &lt;host[:port]&gt;</span>
-<p class="level1">Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If the port number is not specified, it is assumed at port 1080. (Added in 7.18.0)
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive.
-<p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.)
-<p class="level0"><a name="--socks5"></a><span class="nroffip">--socks5 &lt;host[:port]&gt;</span>
-<p class="level1">Use the specified SOCKS5 proxy - but resolve the host name locally. If the port number is not specified, it is assumed at port 1080.
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive.
-<p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.)
-<p class="level1">This option (as well as <a class="emphasis" href="#--socks4">--socks4</a>) does not work with IPV6, FTPS or LDAP.
-<p class="level0"><a name="--socks5-gssapi-service"></a><span class="nroffip">--socks5-gssapi-service &lt;servicename&gt;</span>
-<p class="level1">The default service name for a socks server is rcmd/server-fqdn. This option allows you to change it.
-<p class="level1">Examples: &nbsp;--socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd would use sockd/proxy-name &nbsp;--socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd/real-name would use sockd/real-name for cases where the proxy-name does not match the princpal name. &nbsp;(Added in 7.19.4).
-<p class="level0"><a name="--socks5-gssapi-nec"></a><span class="nroffip">--socks5-gssapi-nec</span>
-<p class="level1">As part of the gssapi negotiation a protection mode is negotiated. The rfc1961 says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not. The option <a class="emphasis" href="#--socks5-gssapi-nec">--socks5-gssapi-nec</a> allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
-<p class="level0"><a name="--stderr"></a><span class="nroffip">--stderr &lt;file&gt;</span>
-<p class="level1">Redirect all writes to stderr to the specified file instead. If the file name is a plain '-', it is instead written to stdout. This option has no point when you're using a shell with decent redirecting capabilities.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--tcp-nodelay"></a><span class="nroffip">--tcp-nodelay</span>
-<p class="level1">Turn on the TCP_NODELAY option. See the <span Class="emphasis">curl_easy_setopt(3)</span> man page for details about this option. (Added in 7.11.2)
-<p class="level0"><a name="-t--telnet-option"></a><span class="nroffip">-t/--telnet-option &lt;OPT=val&gt;</span>
-<p class="level1">Pass options to the telnet protocol. Supported options are:
-<p class="level1">TTYPE=&lt;term&gt; Sets the terminal type.
-<p class="level1">XDISPLOC=&lt;X display&gt; Sets the X display location.
-<p class="level1">NEW_ENV=&lt;var,val&gt; Sets an environment variable.
-<p class="level0"><a name="--tftp-blksize"></a><span class="nroffip">--tftp-blksize &lt;value&gt;</span>
-<p class="level1">(TFTP) Set TFTP BLKSIZE option (must be &gt;512). This is the block size that curl will try to use when tranferring data to or from a TFTP server. By default 512 bytes will be used.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="-T--upload-file"></a><span class="nroffip">-T/--upload-file &lt;file&gt;</span>
-<p class="level1">This transfers the specified local file to the remote URL. If there is no file part in the specified URL, Curl will append the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on a HTTP(S) server, the PUT command will be used.
-<p class="level1">Use the file name "-" (a single dash) to use stdin instead of a given file. Alternately, the file name "." (a single period) may be specified instead of "-" to use stdin in non-blocking mode to allow reading server output while stdin is being uploaded.
-<p class="level1">You can specify one -T for each URL on the command line. Each -T + URL pair specifies what to upload and to where. curl also supports "globbing" of the -T argument, meaning that you can upload multiple files to a single URL by using the same URL globbing style supported in the URL, like this:
-<p class="level1">curl -T "{file1,file2}" <a href="http://www.uploadtothissite.com">http://www.uploadtothissite.com</a>
-<p class="level1">or even
-<p class="level1">curl -T "img[1-1000].png" <a href="ftp://ftp.picturemania.com/upload/">ftp://ftp.picturemania.com/upload/</a>
-<p class="level0"><a name="--trace"></a><span class="nroffip">--trace &lt;file&gt;</span>
-<p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout.
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v--verbose">-v/--verbose</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a>.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--trace-ascii"></a><span class="nroffip">--trace-ascii &lt;file&gt;</span>
-<p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout.
-<p class="level1">This is very similar to <a class="emphasis" href="#--trace">--trace</a>, but leaves out the hex part and only shows the ASCII part of the dump. It makes smaller output that might be easier to read for untrained humans.
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v--verbose">-v/--verbose</a> or <a class="emphasis" href="#--trace">--trace</a>.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--trace-time"></a><span class="nroffip">--trace-time</span>
-<p class="level1">Prepends a time stamp to each trace or verbose line that curl displays. (Added in 7.14.0)
-<p class="level0"><a name="-u--user"></a><span class="nroffip">-u/--user &lt;user:password&gt;</span>
-<p class="level1">Specify the user name and password to use for server authentication. Overrides <a class="emphasis" href="#-n--netrc">-n/--netrc</a> and <a class="emphasis" href="#--netrc-optional">--netrc-optional</a>.
-<p class="level1">If you just give the user name (without entering a colon) curl will prompt for a password.
-<p class="level1">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 :".
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-U--proxy-user"></a><span class="nroffip">-U/--proxy-user &lt;user:password&gt;</span>
-<p class="level1">Specify the user name and password to use for proxy authentication.
-<p class="level1">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 :".
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--url"></a><span class="nroffip">--url &lt;URL&gt;</span>
-<p class="level1">Specify a URL to fetch. This option is mostly handy when you want to specify URL(s) in a config file.
-<p class="level1">This option may be used any number of times. To control where this URL is written, use the <a class="emphasis" href="#-o--output">-o/--output</a> or the <a class="emphasis" href="#-O--remote-name">-O/--remote-name</a> options.
-<p class="level0"><a name="-v--verbose"></a><span class="nroffip">-v/--verbose</span>
-<p class="level1">Makes the fetching more verbose/talkative. Mostly useful for debugging. A line starting with '&gt;' means "header data" sent by curl, '&lt;' means "header data" received by curl that is hidden in normal cases, and a line starting with '*' means additional info provided by curl.
-<p class="level1">Note that if you only want HTTP headers in the output, <a class="emphasis" href="#-i--include">-i/--include</a> might be the option you're looking for.
-<p class="level1">If you think this option still doesn't give you enough details, consider using <a class="emphasis" href="#--trace">--trace</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a> instead.
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#--trace-ascii">--trace-ascii</a> or <a class="emphasis" href="#--trace">--trace</a>.
-<p class="level1">Use <span Class="emphasis">-S/--silent</span> to make curl quiet.
-<p class="level0"><a name="-V--version"></a><span class="nroffip">-V/--version</span>
-<p class="level1">Displays information about curl and the libcurl version it uses.
-<p class="level1">The first line includes the full version of curl, libcurl and other 3rd party libraries linked with the executable.
-<p class="level1">The second line (starts with "Protocols:") shows all protocols that libcurl reports to support.
-<p class="level1">The third line (starts with "Features:") shows specific features libcurl reports to offer. Available features include:
-<p class="level2">
-<p class="level1"><a name="IPv6"></a><span class="nroffip">IPv6</span>
-<p class="level2">You can use IPv6 with this.
-<p class="level1"><a name="krb4"></a><span class="nroffip">krb4</span>
-<p class="level2">Krb4 for FTP is supported.
-<p class="level1"><a name="SSL"></a><span class="nroffip">SSL</span>
-<p class="level2">HTTPS and FTPS are supported.
-<p class="level1"><a name="libz"></a><span class="nroffip">libz</span>
-<p class="level2">Automatic decompression of compressed files over HTTP is supported.
-<p class="level1"><a name="NTLM"></a><span class="nroffip">NTLM</span>
-<p class="level2">NTLM authentication is supported.
-<p class="level1"><a name="GSS-Negotiate"></a><span class="nroffip">GSS-Negotiate</span>
-<p class="level2">Negotiate authentication and krb5 for FTP is supported.
-<p class="level1"><a name="Debug"></a><span class="nroffip">Debug</span>
-<p class="level2">This curl uses a libcurl built with Debug. This enables more error-tracking and memory debugging etc. For curl-developers only!
-<p class="level1"><a name="AsynchDNS"></a><span class="nroffip">AsynchDNS</span>
-<p class="level2">This curl uses asynchronous name resolves.
-<p class="level1"><a name="SPNEGO"></a><span class="nroffip">SPNEGO</span>
-<p class="level2">SPNEGO Negotiate authentication is supported.
-<p class="level1"><a name="Largefile"></a><span class="nroffip">Largefile</span>
-<p class="level2">This curl supports transfers of large files, files larger than 2GB.
-<p class="level1"><a name="IDN"></a><span class="nroffip">IDN</span>
-<p class="level2">This curl supports IDN - international domain names.
-<p class="level1"><a name="SSPI"></a><span class="nroffip">SSPI</span>
-<p class="level2">SSPI is supported. If you use NTLM and set a blank user name, curl will authenticate with your current user and password.
-<p class="level1">
-<p class="level0"><a name="-w--write-out"></a><span class="nroffip">-w/--write-out &lt;format&gt;</span>
-<p class="level1">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 "@-".
-<p class="level1">The variables present in the output format will be substituted by the value or text that curl thinks fit, as described below. All variables are specified as %{variable_name} and to output a normal % you just write them as %%. You can output a newline by using \n, a carriage return with \r and a tab space with \t.
-<p class="level1"><span Class="bold">NOTE:</span> The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option.
-<p class="level1">The variables available at this point are:
-<p class="level2">
-<p class="level2"><span Class="bold">url_effective</span> The URL that was fetched last. This is most meaningful if you've told curl to follow location: headers.
-<p class="level2"><span Class="bold">http_code</span> The numerical response code that was found in the last retrieved HTTP(S) or FTP(s) transfer. In 7.18.2 the alias <span Class="bold">response_code</span> was added to show the same info.
-<p class="level2"><span Class="bold">http_connect</span> The numerical code that was found in the last response (from a proxy) to a curl CONNECT request. (Added in 7.12.4)
-<p class="level2"><span Class="bold">time_total</span> The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution.
-<p class="level2"><span Class="bold">time_namelookup</span> The time, in seconds, it took from the start until the name resolving was completed.
-<p class="level2"><span Class="bold">time_connect</span> The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.
-<p class="level2"><span Class="bold">time_appconnect</span> The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0)
-<p class="level2"><span Class="bold">time_pretransfer</span> The time, in seconds, it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
-<p class="level2"><span Class="bold">time_redirect</span> The time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3)
-<p class="level2"><span Class="bold">time_starttransfer</span> The time, in seconds, it took from the start until the first byte was just about to be transferred. This includes time_pretransfer and also the time the server needed to calculate the result.
-<p class="level2"><span Class="bold">size_download</span> The total amount of bytes that were downloaded.
-<p class="level2"><span Class="bold">size_upload</span> The total amount of bytes that were uploaded.
-<p class="level2"><span Class="bold">size_header</span> The total amount of bytes of the downloaded headers.
-<p class="level2"><span Class="bold">size_request</span> The total amount of bytes that were sent in the HTTP request.
-<p class="level2"><span Class="bold">speed_download</span> The average download speed that curl measured for the complete download. Bytes per second.
-<p class="level2"><span Class="bold">speed_upload</span> The average upload speed that curl measured for the complete upload. Bytes per second.
-<p class="level2"><span Class="bold">content_type</span> The Content-Type of the requested document, if there was any.
-<p class="level2"><span Class="bold">num_connects</span> Number of new connects made in the recent transfer. (Added in 7.12.3)
-<p class="level2"><span Class="bold">num_redirects</span> Number of redirects that were followed in the request. (Added in 7.12.3)
-<p class="level2"><span Class="bold">redirect_url</span> When a HTTP request was made without -L to follow redirects, this variable will show the actual URL a redirect <span Class="emphasis">would</span> take you to. (Added in 7.18.2)
-<p class="level2"><span Class="bold">ftp_entry_path</span> The initial path libcurl ended up in when logging on to the remote FTP server. (Added in 7.15.4)
-<p class="level2"><span Class="bold">ssl_verify_result</span> The result of the SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.19.0)
-<p class="level1">
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-x--proxy"></a><span class="nroffip">-x/--proxy &lt;proxyhost[:port]&gt;</span>
-<p class="level1">Use the specified HTTP proxy. If the port number is not specified, it is assumed at port 1080.
-<p class="level1">This option overrides existing environment variables that set the proxy to use. If there's an environment variable setting a proxy, you can set proxy to "" to override it.
-<p class="level1"><span Class="bold">Note</span> that all operations that are performed over a HTTP proxy will transparently be converted to HTTP. It means that certain protocol specific operations might not be available. This is not the case if you can tunnel through the proxy, as done with the <a class="emphasis" href="#-p--proxytunnel">-p/--proxytunnel</a> option.
-<p class="level1">Starting with 7.14.1, the proxy host can be specified the exact same way as the proxy environment variables, including the protocol prefix (http://) and the embedded user + password.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-X--request"></a><span class="nroffip">-X/--request &lt;command&gt;</span>
-<p class="level1">(HTTP) Specifies a custom request method to use when communicating with the HTTP server. The specified request will be used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include PUT and DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and more.
-<p class="level1">(FTP) Specifies a custom FTP command to use instead of LIST when doing file lists with FTP.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-y--speed-time"></a><span class="nroffip">-y/--speed-time &lt;time&gt;</span>
-<p class="level1">If a download is slower than speed-limit bytes per second during a speed-time period, the download gets aborted. If speed-time is used, the default speed-limit will be 1 unless set with -Y.
-<p class="level1">This option controls transfers and thus will not affect slow connects etc. If this is a concern for you, try the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-Y--speed-limit"></a><span class="nroffip">-Y/--speed-limit &lt;speed&gt;</span>
-<p class="level1">If a download is slower than this given speed (in bytes per second) for speed-time seconds it gets aborted. speed-time is set with -y and is 30 if not set.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-z--time-cond"></a><span class="nroffip">-z/--time-cond &lt;date expression&gt;</span>
-<p class="level1">(HTTP/FTP) Request a file that has been modified later than the given time and date, or one that has been modified before that time. The date expression can be all sorts of date strings or if it doesn't match any internal ones, it tries to get the time from a given file name instead! See the <span Class="emphasis">curl_getdate(3)</span> man pages for date expression details.
-<p class="level1">Start the date expression with a dash (-) to make it request for a document that is older than the given date/time, default is a document that is newer than the specified date/time.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--max-redirs"></a><span class="nroffip">--max-redirs &lt;num&gt;</span>
-<p class="level1">Set maximum number of redirection-followings allowed. If <a class="emphasis" href="#-L--location">-L/--location</a> is used, this option can be used to prevent curl from following redirections "in absurdum". By default, the limit is set to 50 redirections. Set this option to -1 to make it limitless.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-0--http10"></a><span class="nroffip">-0/--http1.0</span>
-<p class="level1">(HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its internally preferred: HTTP 1.1.
-<p class="level0"><a name="-1--tlsv1"></a><span class="nroffip">-1/--tlsv1</span>
-<p class="level1">(SSL) Forces curl to use TLS version 1 when negotiating with a remote TLS server.
-<p class="level0"><a name="-2--sslv2"></a><span class="nroffip">-2/--sslv2</span>
-<p class="level1">(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL server.
-<p class="level0"><a name="-3--sslv3"></a><span class="nroffip">-3/--sslv3</span>
-<p class="level1">(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL server.
-<p class="level0"><a name="-4--ipv4"></a><span class="nroffip">-4/--ipv4</span>
-<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells libcurl to resolve names to IPv4 addresses only.
-<p class="level0"><a name="-6--ipv6"></a><span class="nroffip">-6/--ipv6</span>
-<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells libcurl to resolve names to IPv6 addresses only.
-<p class="level0"><a name="---progress-bar"></a><span class="nroffip">-#/--progress-bar</span>
-<p class="level1">Make curl display progress information as a progress bar instead of the default statistics. <a name="FILES"></a><h2 class="nroffsh">FILES</h2>
-<p class="level0"><span Class="emphasis">~/.curlrc</span>
-<p class="level1">Default config file, see <a class="emphasis" href="#-K--config">-K/--config</a> for details. <a name="ENVIRONMENT"></a><h2 class="nroffsh">ENVIRONMENT</h2>
-<p class="level0">The environment variables can be specified in lower case or upper case. The lower case version has precedence. http_proxy is an exception as it is only available in lower case.
-<p class="level0"><a name="httpproxy"></a><span class="nroffip">http_proxy [protocol://]&lt;host&gt;[:port]</span>
-<p class="level1">Sets the proxy server to use for HTTP.
-<p class="level0"><a name="HTTPSPROXY"></a><span class="nroffip">HTTPS_PROXY [protocol://]&lt;host&gt;[:port]</span>
-<p class="level1">Sets the proxy server to use for HTTPS.
-<p class="level0"><a name="FTPPROXY"></a><span class="nroffip">FTP_PROXY [protocol://]&lt;host&gt;[:port]</span>
-<p class="level1">Sets the proxy server to use for FTP.
-<p class="level0"><a name="ALLPROXY"></a><span class="nroffip">ALL_PROXY [protocol://]&lt;host&gt;[:port]</span>
-<p class="level1">Sets the proxy server to use if no protocol-specific proxy is set.
-<p class="level0"><a name="NOPROXY"></a><span class="nroffip">NO_PROXY &lt;comma-separated list of hosts&gt;</span>
-<p class="level1">list of host names that shouldn't go through any proxy. If set to a asterisk '*' only, it matches all hosts. <a name="EXIT"></a><h2 class="nroffsh">EXIT CODES</h2>
-<p class="level0">There are a bunch of different error codes and their corresponding error messages that may appear during bad conditions. At the time of this writing, the exit codes are:
-<p class="level0"><a name="1"></a><span class="nroffip">1</span>
-<p class="level1">Unsupported protocol. This build of curl has no support for this protocol.
-<p class="level0"><a name="2"></a><span class="nroffip">2</span>
-<p class="level1">Failed to initialize.
-<p class="level0"><a name="3"></a><span class="nroffip">3</span>
-<p class="level1">URL malformed. The syntax was not correct.
-<p class="level0"><a name="5"></a><span class="nroffip">5</span>
-<p class="level1">Couldn't resolve proxy. The given proxy host could not be resolved.
-<p class="level0"><a name="6"></a><span class="nroffip">6</span>
-<p class="level1">Couldn't resolve host. The given remote host was not resolved.
-<p class="level0"><a name="7"></a><span class="nroffip">7</span>
-<p class="level1">Failed to connect to host.
-<p class="level0"><a name="8"></a><span class="nroffip">8</span>
-<p class="level1">FTP weird server reply. The server sent data curl couldn't parse.
-<p class="level0"><a name="9"></a><span class="nroffip">9</span>
-<p class="level1">FTP access denied. The server denied login or denied access to the particular resource or directory you wanted to reach. Most often you tried to change to a directory that doesn't exist on the server.
-<p class="level0"><a name="11"></a><span class="nroffip">11</span>
-<p class="level1">FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
-<p class="level0"><a name="13"></a><span class="nroffip">13</span>
-<p class="level1">FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
-<p class="level0"><a name="14"></a><span class="nroffip">14</span>
-<p class="level1">FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
-<p class="level0"><a name="15"></a><span class="nroffip">15</span>
-<p class="level1">FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
-<p class="level0"><a name="17"></a><span class="nroffip">17</span>
-<p class="level1">FTP couldn't set binary. Couldn't change transfer method to binary.
-<p class="level0"><a name="18"></a><span class="nroffip">18</span>
-<p class="level1">Partial file. Only a part of the file was transferred.
-<p class="level0"><a name="19"></a><span class="nroffip">19</span>
-<p class="level1">FTP couldn't download/access the given file, the RETR (or similar) command failed.
-<p class="level0"><a name="21"></a><span class="nroffip">21</span>
-<p class="level1">FTP quote error. A quote command returned error from the server.
-<p class="level0"><a name="22"></a><span class="nroffip">22</span>
-<p class="level1">HTTP page not retrieved. The requested url was not found or returned another error with the HTTP error code being 400 or above. This return code only appears if <a class="emphasis" href="#-f--fail">-f/--fail</a> is used.
-<p class="level0"><a name="23"></a><span class="nroffip">23</span>
-<p class="level1">Write error. Curl couldn't write data to a local filesystem or similar.
-<p class="level0"><a name="25"></a><span class="nroffip">25</span>
-<p class="level1">FTP couldn't STOR file. The server denied the STOR operation, used for FTP uploading.
-<p class="level0"><a name="26"></a><span class="nroffip">26</span>
-<p class="level1">Read error. Various reading problems.
-<p class="level0"><a name="27"></a><span class="nroffip">27</span>
-<p class="level1">Out of memory. A memory allocation request failed.
-<p class="level0"><a name="28"></a><span class="nroffip">28</span>
-<p class="level1">Operation timeout. The specified time-out period was reached according to the conditions.
-<p class="level0"><a name="30"></a><span class="nroffip">30</span>
-<p class="level1">FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT command, try doing a transfer using PASV instead!
-<p class="level0"><a name="31"></a><span class="nroffip">31</span>
-<p class="level1">FTP couldn't use REST. The REST command failed. This command is used for resumed FTP transfers.
-<p class="level0"><a name="33"></a><span class="nroffip">33</span>
-<p class="level1">HTTP range error. The range "command" didn't work.
-<p class="level0"><a name="34"></a><span class="nroffip">34</span>
-<p class="level1">HTTP post error. Internal post-request generation error.
-<p class="level0"><a name="35"></a><span class="nroffip">35</span>
-<p class="level1">SSL connect error. The SSL handshaking failed.
-<p class="level0"><a name="36"></a><span class="nroffip">36</span>
-<p class="level1">FTP bad download resume. Couldn't continue an earlier aborted download.
-<p class="level0"><a name="37"></a><span class="nroffip">37</span>
-<p class="level1">FILE couldn't read file. Failed to open the file. Permissions?
-<p class="level0"><a name="38"></a><span class="nroffip">38</span>
-<p class="level1">LDAP cannot bind. LDAP bind operation failed.
-<p class="level0"><a name="39"></a><span class="nroffip">39</span>
-<p class="level1">LDAP search failed.
-<p class="level0"><a name="41"></a><span class="nroffip">41</span>
-<p class="level1">Function not found. A required LDAP function was not found.
-<p class="level0"><a name="42"></a><span class="nroffip">42</span>
-<p class="level1">Aborted by callback. An application told curl to abort the operation.
-<p class="level0"><a name="43"></a><span class="nroffip">43</span>
-<p class="level1">Internal error. A function was called with a bad parameter.
-<p class="level0"><a name="45"></a><span class="nroffip">45</span>
-<p class="level1">Interface error. A specified outgoing interface could not be used.
-<p class="level0"><a name="47"></a><span class="nroffip">47</span>
-<p class="level1">Too many redirects. When following redirects, curl hit the maximum amount.
-<p class="level0"><a name="48"></a><span class="nroffip">48</span>
-<p class="level1">Unknown TELNET option specified.
-<p class="level0"><a name="49"></a><span class="nroffip">49</span>
-<p class="level1">Malformed telnet option.
-<p class="level0"><a name="51"></a><span class="nroffip">51</span>
-<p class="level1">The peer's SSL certificate or SSH MD5 fingerprint was not ok.
-<p class="level0"><a name="52"></a><span class="nroffip">52</span>
-<p class="level1">The server didn't reply anything, which here is considered an error.
-<p class="level0"><a name="53"></a><span class="nroffip">53</span>
-<p class="level1">SSL crypto engine not found.
-<p class="level0"><a name="54"></a><span class="nroffip">54</span>
-<p class="level1">Cannot set SSL crypto engine as default.
-<p class="level0"><a name="55"></a><span class="nroffip">55</span>
-<p class="level1">Failed sending network data.
-<p class="level0"><a name="56"></a><span class="nroffip">56</span>
-<p class="level1">Failure in receiving network data.
-<p class="level0"><a name="58"></a><span class="nroffip">58</span>
-<p class="level1">Problem with the local certificate.
-<p class="level0"><a name="59"></a><span class="nroffip">59</span>
-<p class="level1">Couldn't use specified SSL cipher.
-<p class="level0"><a name="60"></a><span class="nroffip">60</span>
-<p class="level1">Peer certificate cannot be authenticated with known CA certificates.
-<p class="level0"><a name="61"></a><span class="nroffip">61</span>
-<p class="level1">Unrecognized transfer encoding.
-<p class="level0"><a name="62"></a><span class="nroffip">62</span>
-<p class="level1">Invalid LDAP URL.
-<p class="level0"><a name="63"></a><span class="nroffip">63</span>
-<p class="level1">Maximum file size exceeded.
-<p class="level0"><a name="64"></a><span class="nroffip">64</span>
-<p class="level1">Requested FTP SSL level failed.
-<p class="level0"><a name="65"></a><span class="nroffip">65</span>
-<p class="level1">Sending the data requires a rewind that failed.
-<p class="level0"><a name="66"></a><span class="nroffip">66</span>
-<p class="level1">Failed to initialise SSL Engine.
-<p class="level0"><a name="67"></a><span class="nroffip">67</span>
-<p class="level1">The user name, password, or similar was not accepted and curl failed to log in.
-<p class="level0"><a name="68"></a><span class="nroffip">68</span>
-<p class="level1">File not found on TFTP server.
-<p class="level0"><a name="69"></a><span class="nroffip">69</span>
-<p class="level1">Permission problem on TFTP server.
-<p class="level0"><a name="70"></a><span class="nroffip">70</span>
-<p class="level1">Out of disk space on TFTP server.
-<p class="level0"><a name="71"></a><span class="nroffip">71</span>
-<p class="level1">Illegal TFTP operation.
-<p class="level0"><a name="72"></a><span class="nroffip">72</span>
-<p class="level1">Unknown TFTP transfer ID.
-<p class="level0"><a name="73"></a><span class="nroffip">73</span>
-<p class="level1">File already exists (TFTP).
-<p class="level0"><a name="74"></a><span class="nroffip">74</span>
-<p class="level1">No such user (TFTP).
-<p class="level0"><a name="75"></a><span class="nroffip">75</span>
-<p class="level1">Character conversion failed.
-<p class="level0"><a name="76"></a><span class="nroffip">76</span>
-<p class="level1">Character conversion functions required.
-<p class="level0"><a name="77"></a><span class="nroffip">77</span>
-<p class="level1">Problem with reading the SSL CA cert (path? access rights?).
-<p class="level0"><a name="78"></a><span class="nroffip">78</span>
-<p class="level1">The resource referenced in the URL does not exist.
-<p class="level0"><a name="79"></a><span class="nroffip">79</span>
-<p class="level1">An unspecified error occurred during the SSH session.
-<p class="level0"><a name="80"></a><span class="nroffip">80</span>
-<p class="level1">Failed to shut down the SSL connection.
-<p class="level0"><a name="82"></a><span class="nroffip">82</span>
-<p class="level1">Could not load CRL file, missing or wrong format (added in 7.19.0).
-<p class="level0"><a name="83"></a><span class="nroffip">83</span>
-<p class="level1">Issuer check failed (added in 7.19.0).
-<p class="level0"><a name="XX"></a><span class="nroffip">XX</span>
-<p class="level1">More error codes will appear here in future releases. The existing ones are meant to never change. <a name="AUTHORS"></a><h2 class="nroffsh">AUTHORS / CONTRIBUTORS</h2>
-<p class="level0">Daniel Stenberg is the main author, but the whole list of contributors is found in the separate THANKS file. <a name="WWW"></a><h2 class="nroffsh">WWW</h2>
-<p class="level0"><a href="http://curl.haxx.se">http://curl.haxx.se</a> <a name="FTP"></a><h2 class="nroffsh">FTP</h2>
-<p class="level0"><a href="ftp://ftp.sunet.se/pub/www/utilities/curl/">ftp://ftp.sunet.se/pub/www/utilities/curl/</a> <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">ftp (1)</span> <span Class="manpage">wget (1)</span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/curl.pdf b/docs/curl.pdf
deleted file mode 100644
index d0e7ce29..00000000
--- a/docs/curl.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore
new file mode 100644
index 00000000..d64e12de
--- /dev/null
+++ b/docs/examples/.gitignore
@@ -0,0 +1,75 @@
+10-at-a-time
+anyauthput
+certinfo
+chkspeed
+cookie_interface
+debug
+externalsocket
+fileupload
+fopen
+ftp-wildcard
+ftpget
+ftpgetinfo
+ftpgetresp
+ftpsget
+ftpupload
+getinfo
+getinmemory
+http-post
+httpcustomheader
+httpput
+https
+imap
+imap-append
+imap-copy
+imap-create
+imap-delete
+imap-examine
+imap-fetch
+imap-list
+imap-multi
+imap-noop
+imap-search
+imap-ssl
+imap-store
+imap-tls
+multi-app
+multi-debugcallback
+multi-double
+multi-post
+multi-single
+persistant
+pop3-dele
+pop3-list
+pop3-multi
+pop3-noop
+pop3-retr
+pop3-ssl
+pop3-stat
+pop3-tls
+pop3-top
+pop3-uidl
+pop3s
+pop3slist
+post-callback
+postinmemory
+postit2
+progressfunc
+resolve
+rtsp
+sendrecv
+sepheaders
+sftpget
+simple
+simplepost
+simplesmtp
+simplessl
+smtp-expn
+smtp-mail
+smtp-multi
+smtp-ssl
+smtp-tls
+smtp-vrfy
+url2file
+usercertinmem
+xmlstream
diff --git a/docs/examples/10-at-a-time.c b/docs/examples/10-at-a-time.c
index b215cbfd..5d95a8a8 100644
--- a/docs/examples/10-at-a-time.c
+++ b/docs/examples/10-at-a-time.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Example application source code using the multi interface to download many
+ * 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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi interface to download many
* files, but with a capped maximum amount of simultaneous transfers.
*
* Written by Michael Wallner
@@ -49,7 +62,6 @@ 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.am b/docs/examples/Makefile.am
index 8d92f731..8e2bc9a8 100644
--- a/docs/examples/Makefile.am
+++ b/docs/examples/Makefile.am
@@ -1,10 +1,29 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
#
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
- makefile.dj $(COMPLICATED_EXAMPLES)
+ Makefile.netware makefile.dj $(COMPLICATED_EXAMPLES)
# 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
@@ -12,26 +31,33 @@ EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include
LIBDIR = $(top_builddir)/lib
-if STATICLIB
-# we need this define when building with a static lib on Windows
-STATICCPPFLAGS = -DCURL_STATICLIB
+# Avoid libcurl obsolete stuff
+AM_CPPFLAGS += -DCURL_NO_OLDIES
+
+if USE_CPPFLAG_CURL_STATICLIB
+AM_CPPFLAGS += -DCURL_STATICLIB
endif
-CPPFLAGS = -DCURL_NO_OLDIES $(STATICCPPFLAGS)
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
# Dependencies
+if USE_EXPLICIT_LIB_DEPS
+LDADD = $(LIBDIR)/libcurl.la @LIBCURL_LIBS@
+else
LDADD = $(LIBDIR)/libcurl.la
+endif
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
include Makefile.inc
-
+all: $(check_PROGRAMS)
diff --git a/docs/examples/Makefile.example b/docs/examples/Makefile.example
index 29ca0d7a..dfd11787 100644
--- a/docs/examples/Makefile.example
+++ b/docs/examples/Makefile.example
@@ -1,11 +1,24 @@
-#############################################################################
+#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
# What to call the final executable
TARGET = example
diff --git a/docs/examples/Makefile.in b/docs/examples/Makefile.in
deleted file mode 100644
index aba3989b..00000000
--- a/docs/examples/Makefile.in
+++ /dev/null
@@ -1,820 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-#
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/Makefile.inc
-check_PROGRAMS = 10-at-a-time$(EXEEXT) anyauthput$(EXEEXT) \
- cookie_interface$(EXEEXT) debug$(EXEEXT) fileupload$(EXEEXT) \
- fopen$(EXEEXT) ftpget$(EXEEXT) ftpgetresp$(EXEEXT) \
- ftpupload$(EXEEXT) getinfo$(EXEEXT) getinmemory$(EXEEXT) \
- http-post$(EXEEXT) httpput$(EXEEXT) https$(EXEEXT) \
- multi-app$(EXEEXT) multi-debugcallback$(EXEEXT) \
- multi-double$(EXEEXT) multi-post$(EXEEXT) \
- multi-single$(EXEEXT) persistant$(EXEEXT) \
- post-callback$(EXEEXT) postit2$(EXEEXT) sepheaders$(EXEEXT) \
- simple$(EXEEXT) simplepost$(EXEEXT) simplessl$(EXEEXT) \
- sendrecv$(EXEEXT) httpcustomheader$(EXEEXT) certinfo$(EXEEXT) \
- chkspeed$(EXEEXT) ftpgetinfo$(EXEEXT) ftp-wildcard$(EXEEXT)
-subdir = docs/examples
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-10_at_a_time_SOURCES = 10-at-a-time.c
-10_at_a_time_OBJECTS = 10-at-a-time.$(OBJEXT)
-10_at_a_time_LDADD = $(LDADD)
-10_at_a_time_DEPENDENCIES = $(LIBDIR)/libcurl.la
-anyauthput_SOURCES = anyauthput.c
-anyauthput_OBJECTS = anyauthput.$(OBJEXT)
-anyauthput_LDADD = $(LDADD)
-anyauthput_DEPENDENCIES = $(LIBDIR)/libcurl.la
-certinfo_SOURCES = certinfo.c
-certinfo_OBJECTS = certinfo.$(OBJEXT)
-certinfo_LDADD = $(LDADD)
-certinfo_DEPENDENCIES = $(LIBDIR)/libcurl.la
-chkspeed_SOURCES = chkspeed.c
-chkspeed_OBJECTS = chkspeed.$(OBJEXT)
-chkspeed_LDADD = $(LDADD)
-chkspeed_DEPENDENCIES = $(LIBDIR)/libcurl.la
-cookie_interface_SOURCES = cookie_interface.c
-cookie_interface_OBJECTS = cookie_interface.$(OBJEXT)
-cookie_interface_LDADD = $(LDADD)
-cookie_interface_DEPENDENCIES = $(LIBDIR)/libcurl.la
-debug_SOURCES = debug.c
-debug_OBJECTS = debug.$(OBJEXT)
-debug_LDADD = $(LDADD)
-debug_DEPENDENCIES = $(LIBDIR)/libcurl.la
-fileupload_SOURCES = fileupload.c
-fileupload_OBJECTS = fileupload.$(OBJEXT)
-fileupload_LDADD = $(LDADD)
-fileupload_DEPENDENCIES = $(LIBDIR)/libcurl.la
-fopen_SOURCES = fopen.c
-fopen_OBJECTS = fopen.$(OBJEXT)
-fopen_LDADD = $(LDADD)
-fopen_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftp_wildcard_SOURCES = ftp-wildcard.c
-ftp_wildcard_OBJECTS = ftp-wildcard.$(OBJEXT)
-ftp_wildcard_LDADD = $(LDADD)
-ftp_wildcard_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftpget_SOURCES = ftpget.c
-ftpget_OBJECTS = ftpget.$(OBJEXT)
-ftpget_LDADD = $(LDADD)
-ftpget_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftpgetinfo_SOURCES = ftpgetinfo.c
-ftpgetinfo_OBJECTS = ftpgetinfo.$(OBJEXT)
-ftpgetinfo_LDADD = $(LDADD)
-ftpgetinfo_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftpgetresp_SOURCES = ftpgetresp.c
-ftpgetresp_OBJECTS = ftpgetresp.$(OBJEXT)
-ftpgetresp_LDADD = $(LDADD)
-ftpgetresp_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftpupload_SOURCES = ftpupload.c
-ftpupload_OBJECTS = ftpupload.$(OBJEXT)
-ftpupload_LDADD = $(LDADD)
-ftpupload_DEPENDENCIES = $(LIBDIR)/libcurl.la
-getinfo_SOURCES = getinfo.c
-getinfo_OBJECTS = getinfo.$(OBJEXT)
-getinfo_LDADD = $(LDADD)
-getinfo_DEPENDENCIES = $(LIBDIR)/libcurl.la
-getinmemory_SOURCES = getinmemory.c
-getinmemory_OBJECTS = getinmemory.$(OBJEXT)
-getinmemory_LDADD = $(LDADD)
-getinmemory_DEPENDENCIES = $(LIBDIR)/libcurl.la
-http_post_SOURCES = http-post.c
-http_post_OBJECTS = http-post.$(OBJEXT)
-http_post_LDADD = $(LDADD)
-http_post_DEPENDENCIES = $(LIBDIR)/libcurl.la
-httpcustomheader_SOURCES = httpcustomheader.c
-httpcustomheader_OBJECTS = httpcustomheader.$(OBJEXT)
-httpcustomheader_LDADD = $(LDADD)
-httpcustomheader_DEPENDENCIES = $(LIBDIR)/libcurl.la
-httpput_SOURCES = httpput.c
-httpput_OBJECTS = httpput.$(OBJEXT)
-httpput_LDADD = $(LDADD)
-httpput_DEPENDENCIES = $(LIBDIR)/libcurl.la
-https_SOURCES = https.c
-https_OBJECTS = https.$(OBJEXT)
-https_LDADD = $(LDADD)
-https_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_app_SOURCES = multi-app.c
-multi_app_OBJECTS = multi-app.$(OBJEXT)
-multi_app_LDADD = $(LDADD)
-multi_app_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_debugcallback_SOURCES = multi-debugcallback.c
-multi_debugcallback_OBJECTS = multi-debugcallback.$(OBJEXT)
-multi_debugcallback_LDADD = $(LDADD)
-multi_debugcallback_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_double_SOURCES = multi-double.c
-multi_double_OBJECTS = multi-double.$(OBJEXT)
-multi_double_LDADD = $(LDADD)
-multi_double_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_post_SOURCES = multi-post.c
-multi_post_OBJECTS = multi-post.$(OBJEXT)
-multi_post_LDADD = $(LDADD)
-multi_post_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_single_SOURCES = multi-single.c
-multi_single_OBJECTS = multi-single.$(OBJEXT)
-multi_single_LDADD = $(LDADD)
-multi_single_DEPENDENCIES = $(LIBDIR)/libcurl.la
-persistant_SOURCES = persistant.c
-persistant_OBJECTS = persistant.$(OBJEXT)
-persistant_LDADD = $(LDADD)
-persistant_DEPENDENCIES = $(LIBDIR)/libcurl.la
-post_callback_SOURCES = post-callback.c
-post_callback_OBJECTS = post-callback.$(OBJEXT)
-post_callback_LDADD = $(LDADD)
-post_callback_DEPENDENCIES = $(LIBDIR)/libcurl.la
-postit2_SOURCES = postit2.c
-postit2_OBJECTS = postit2.$(OBJEXT)
-postit2_LDADD = $(LDADD)
-postit2_DEPENDENCIES = $(LIBDIR)/libcurl.la
-sendrecv_SOURCES = sendrecv.c
-sendrecv_OBJECTS = sendrecv.$(OBJEXT)
-sendrecv_LDADD = $(LDADD)
-sendrecv_DEPENDENCIES = $(LIBDIR)/libcurl.la
-sepheaders_SOURCES = sepheaders.c
-sepheaders_OBJECTS = sepheaders.$(OBJEXT)
-sepheaders_LDADD = $(LDADD)
-sepheaders_DEPENDENCIES = $(LIBDIR)/libcurl.la
-simple_SOURCES = simple.c
-simple_OBJECTS = simple.$(OBJEXT)
-simple_LDADD = $(LDADD)
-simple_DEPENDENCIES = $(LIBDIR)/libcurl.la
-simplepost_SOURCES = simplepost.c
-simplepost_OBJECTS = simplepost.$(OBJEXT)
-simplepost_LDADD = $(LDADD)
-simplepost_DEPENDENCIES = $(LIBDIR)/libcurl.la
-simplessl_SOURCES = simplessl.c
-simplessl_OBJECTS = simplessl.$(OBJEXT)
-simplessl_LDADD = $(LDADD)
-simplessl_DEPENDENCIES = $(LIBDIR)/libcurl.la
-DEFAULT_INCLUDES =
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \
- cookie_interface.c debug.c fileupload.c fopen.c ftp-wildcard.c \
- ftpget.c ftpgetinfo.c ftpgetresp.c ftpupload.c getinfo.c \
- getinmemory.c http-post.c httpcustomheader.c httpput.c https.c \
- multi-app.c multi-debugcallback.c multi-double.c multi-post.c \
- multi-single.c persistant.c post-callback.c postit2.c \
- sendrecv.c sepheaders.c simple.c simplepost.c simplessl.c
-DIST_SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \
- cookie_interface.c debug.c fileupload.c fopen.c ftp-wildcard.c \
- ftpget.c ftpgetinfo.c ftpgetresp.c ftpupload.c getinfo.c \
- getinmemory.c http-post.c httpcustomheader.c httpput.c https.c \
- multi-app.c multi-debugcallback.c multi-double.c multi-post.c \
- multi-single.c persistant.c post-callback.c postit2.c \
- sendrecv.c sepheaders.c simple.c simplepost.c simplessl.c
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = -DCURL_NO_OLDIES $(STATICCPPFLAGS)
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = foreign nostdinc
-EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
- makefile.dj $(COMPLICATED_EXAMPLES)
-
-
-# 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
-# might possibly already be installed in the system.
-#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
-# $(top_srcdir)/include is for libcurl's external include files
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include
-
-LIBDIR = $(top_builddir)/lib
-
-# we need this define when building with a static lib on Windows
-@STATICLIB_TRUE@STATICCPPFLAGS = -DCURL_STATICLIB
-
-# Dependencies
-LDADD = $(LIBDIR)/libcurl.la
-
-# 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.cc cacertinmem.c \
- ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
- opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/examples/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign docs/examples/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-10-at-a-time$(EXEEXT): $(10_at_a_time_OBJECTS) $(10_at_a_time_DEPENDENCIES)
- @rm -f 10-at-a-time$(EXEEXT)
- $(LINK) $(10_at_a_time_LDFLAGS) $(10_at_a_time_OBJECTS) $(10_at_a_time_LDADD) $(LIBS)
-anyauthput$(EXEEXT): $(anyauthput_OBJECTS) $(anyauthput_DEPENDENCIES)
- @rm -f anyauthput$(EXEEXT)
- $(LINK) $(anyauthput_LDFLAGS) $(anyauthput_OBJECTS) $(anyauthput_LDADD) $(LIBS)
-certinfo$(EXEEXT): $(certinfo_OBJECTS) $(certinfo_DEPENDENCIES)
- @rm -f certinfo$(EXEEXT)
- $(LINK) $(certinfo_LDFLAGS) $(certinfo_OBJECTS) $(certinfo_LDADD) $(LIBS)
-chkspeed$(EXEEXT): $(chkspeed_OBJECTS) $(chkspeed_DEPENDENCIES)
- @rm -f chkspeed$(EXEEXT)
- $(LINK) $(chkspeed_LDFLAGS) $(chkspeed_OBJECTS) $(chkspeed_LDADD) $(LIBS)
-cookie_interface$(EXEEXT): $(cookie_interface_OBJECTS) $(cookie_interface_DEPENDENCIES)
- @rm -f cookie_interface$(EXEEXT)
- $(LINK) $(cookie_interface_LDFLAGS) $(cookie_interface_OBJECTS) $(cookie_interface_LDADD) $(LIBS)
-debug$(EXEEXT): $(debug_OBJECTS) $(debug_DEPENDENCIES)
- @rm -f debug$(EXEEXT)
- $(LINK) $(debug_LDFLAGS) $(debug_OBJECTS) $(debug_LDADD) $(LIBS)
-fileupload$(EXEEXT): $(fileupload_OBJECTS) $(fileupload_DEPENDENCIES)
- @rm -f fileupload$(EXEEXT)
- $(LINK) $(fileupload_LDFLAGS) $(fileupload_OBJECTS) $(fileupload_LDADD) $(LIBS)
-fopen$(EXEEXT): $(fopen_OBJECTS) $(fopen_DEPENDENCIES)
- @rm -f fopen$(EXEEXT)
- $(LINK) $(fopen_LDFLAGS) $(fopen_OBJECTS) $(fopen_LDADD) $(LIBS)
-ftp-wildcard$(EXEEXT): $(ftp_wildcard_OBJECTS) $(ftp_wildcard_DEPENDENCIES)
- @rm -f ftp-wildcard$(EXEEXT)
- $(LINK) $(ftp_wildcard_LDFLAGS) $(ftp_wildcard_OBJECTS) $(ftp_wildcard_LDADD) $(LIBS)
-ftpget$(EXEEXT): $(ftpget_OBJECTS) $(ftpget_DEPENDENCIES)
- @rm -f ftpget$(EXEEXT)
- $(LINK) $(ftpget_LDFLAGS) $(ftpget_OBJECTS) $(ftpget_LDADD) $(LIBS)
-ftpgetinfo$(EXEEXT): $(ftpgetinfo_OBJECTS) $(ftpgetinfo_DEPENDENCIES)
- @rm -f ftpgetinfo$(EXEEXT)
- $(LINK) $(ftpgetinfo_LDFLAGS) $(ftpgetinfo_OBJECTS) $(ftpgetinfo_LDADD) $(LIBS)
-ftpgetresp$(EXEEXT): $(ftpgetresp_OBJECTS) $(ftpgetresp_DEPENDENCIES)
- @rm -f ftpgetresp$(EXEEXT)
- $(LINK) $(ftpgetresp_LDFLAGS) $(ftpgetresp_OBJECTS) $(ftpgetresp_LDADD) $(LIBS)
-ftpupload$(EXEEXT): $(ftpupload_OBJECTS) $(ftpupload_DEPENDENCIES)
- @rm -f ftpupload$(EXEEXT)
- $(LINK) $(ftpupload_LDFLAGS) $(ftpupload_OBJECTS) $(ftpupload_LDADD) $(LIBS)
-getinfo$(EXEEXT): $(getinfo_OBJECTS) $(getinfo_DEPENDENCIES)
- @rm -f getinfo$(EXEEXT)
- $(LINK) $(getinfo_LDFLAGS) $(getinfo_OBJECTS) $(getinfo_LDADD) $(LIBS)
-getinmemory$(EXEEXT): $(getinmemory_OBJECTS) $(getinmemory_DEPENDENCIES)
- @rm -f getinmemory$(EXEEXT)
- $(LINK) $(getinmemory_LDFLAGS) $(getinmemory_OBJECTS) $(getinmemory_LDADD) $(LIBS)
-http-post$(EXEEXT): $(http_post_OBJECTS) $(http_post_DEPENDENCIES)
- @rm -f http-post$(EXEEXT)
- $(LINK) $(http_post_LDFLAGS) $(http_post_OBJECTS) $(http_post_LDADD) $(LIBS)
-httpcustomheader$(EXEEXT): $(httpcustomheader_OBJECTS) $(httpcustomheader_DEPENDENCIES)
- @rm -f httpcustomheader$(EXEEXT)
- $(LINK) $(httpcustomheader_LDFLAGS) $(httpcustomheader_OBJECTS) $(httpcustomheader_LDADD) $(LIBS)
-httpput$(EXEEXT): $(httpput_OBJECTS) $(httpput_DEPENDENCIES)
- @rm -f httpput$(EXEEXT)
- $(LINK) $(httpput_LDFLAGS) $(httpput_OBJECTS) $(httpput_LDADD) $(LIBS)
-https$(EXEEXT): $(https_OBJECTS) $(https_DEPENDENCIES)
- @rm -f https$(EXEEXT)
- $(LINK) $(https_LDFLAGS) $(https_OBJECTS) $(https_LDADD) $(LIBS)
-multi-app$(EXEEXT): $(multi_app_OBJECTS) $(multi_app_DEPENDENCIES)
- @rm -f multi-app$(EXEEXT)
- $(LINK) $(multi_app_LDFLAGS) $(multi_app_OBJECTS) $(multi_app_LDADD) $(LIBS)
-multi-debugcallback$(EXEEXT): $(multi_debugcallback_OBJECTS) $(multi_debugcallback_DEPENDENCIES)
- @rm -f multi-debugcallback$(EXEEXT)
- $(LINK) $(multi_debugcallback_LDFLAGS) $(multi_debugcallback_OBJECTS) $(multi_debugcallback_LDADD) $(LIBS)
-multi-double$(EXEEXT): $(multi_double_OBJECTS) $(multi_double_DEPENDENCIES)
- @rm -f multi-double$(EXEEXT)
- $(LINK) $(multi_double_LDFLAGS) $(multi_double_OBJECTS) $(multi_double_LDADD) $(LIBS)
-multi-post$(EXEEXT): $(multi_post_OBJECTS) $(multi_post_DEPENDENCIES)
- @rm -f multi-post$(EXEEXT)
- $(LINK) $(multi_post_LDFLAGS) $(multi_post_OBJECTS) $(multi_post_LDADD) $(LIBS)
-multi-single$(EXEEXT): $(multi_single_OBJECTS) $(multi_single_DEPENDENCIES)
- @rm -f multi-single$(EXEEXT)
- $(LINK) $(multi_single_LDFLAGS) $(multi_single_OBJECTS) $(multi_single_LDADD) $(LIBS)
-persistant$(EXEEXT): $(persistant_OBJECTS) $(persistant_DEPENDENCIES)
- @rm -f persistant$(EXEEXT)
- $(LINK) $(persistant_LDFLAGS) $(persistant_OBJECTS) $(persistant_LDADD) $(LIBS)
-post-callback$(EXEEXT): $(post_callback_OBJECTS) $(post_callback_DEPENDENCIES)
- @rm -f post-callback$(EXEEXT)
- $(LINK) $(post_callback_LDFLAGS) $(post_callback_OBJECTS) $(post_callback_LDADD) $(LIBS)
-postit2$(EXEEXT): $(postit2_OBJECTS) $(postit2_DEPENDENCIES)
- @rm -f postit2$(EXEEXT)
- $(LINK) $(postit2_LDFLAGS) $(postit2_OBJECTS) $(postit2_LDADD) $(LIBS)
-sendrecv$(EXEEXT): $(sendrecv_OBJECTS) $(sendrecv_DEPENDENCIES)
- @rm -f sendrecv$(EXEEXT)
- $(LINK) $(sendrecv_LDFLAGS) $(sendrecv_OBJECTS) $(sendrecv_LDADD) $(LIBS)
-sepheaders$(EXEEXT): $(sepheaders_OBJECTS) $(sepheaders_DEPENDENCIES)
- @rm -f sepheaders$(EXEEXT)
- $(LINK) $(sepheaders_LDFLAGS) $(sepheaders_OBJECTS) $(sepheaders_LDADD) $(LIBS)
-simple$(EXEEXT): $(simple_OBJECTS) $(simple_DEPENDENCIES)
- @rm -f simple$(EXEEXT)
- $(LINK) $(simple_LDFLAGS) $(simple_OBJECTS) $(simple_LDADD) $(LIBS)
-simplepost$(EXEEXT): $(simplepost_OBJECTS) $(simplepost_DEPENDENCIES)
- @rm -f simplepost$(EXEEXT)
- $(LINK) $(simplepost_LDFLAGS) $(simplepost_OBJECTS) $(simplepost_LDADD) $(LIBS)
-simplessl$(EXEEXT): $(simplessl_OBJECTS) $(simplessl_DEPENDENCIES)
- @rm -f simplessl$(EXEEXT)
- $(LINK) $(simplessl_LDFLAGS) $(simplessl_OBJECTS) $(simplessl_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/10-at-a-time.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anyauthput.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/certinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkspeed.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cookie_interface.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileupload.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftp-wildcard.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpget.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpgetinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpgetresp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpupload.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinmemory.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http-post.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpcustomheader.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpput.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/https.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-app.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-debugcallback.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-double.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-post.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-single.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/persistant.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/post-callback.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postit2.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendrecv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sepheaders.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplepost.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplessl.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean \
- clean-checkPROGRAMS clean-generic clean-libtool ctags \
- distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am
-
-
-# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc
index 78d31266..4b0c28ff 100644
--- a/docs/examples/Makefile.inc
+++ b/docs/examples/Makefile.inc
@@ -1,12 +1,43 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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
+ 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 http2-download \
+ http2-upload
# 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.cc cacertinmem.c \
- ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
- opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.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 \
+ multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c
diff --git a/docs/examples/Makefile.m32 b/docs/examples/Makefile.m32
index 15750d01..2da5294e 100644
--- a/docs/examples/Makefile.m32
+++ b/docs/examples/Makefile.m32
@@ -1,54 +1,185 @@
-#########################################################################
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
#
-## Makefile for building curl examples with MingW32
-## and optionally OpenSSL (0.9.8), libssh2 (0.18), zlib (1.2.3)
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+#
+## Makefile for building curl examples with MingW (GCC-3.2 or later)
+## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4)
##
-## Usage:
-## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [SSPI=1] [IPV6=1] [DYN=1]
+## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
+## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn
##
## Hint: you can also set environment vars to control the build, f.e.:
-## set ZLIB_PATH=c:/zlib-1.2.3
+## set ZLIB_PATH=c:/zlib-1.2.8
## set ZLIB=1
-##
-#########################################################################
+#
+###########################################################################
# Edit the path below to point to the base of your Zlib sources.
ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.3
+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.8k
+OPENSSL_PATH = ../../../openssl-1.0.2a
endif
# Edit the path below to point to the base of your LibSSH2 package.
ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2
+LIBSSH2_PATH = ../../../libssh2-1.5.0
+endif
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../../librtmp-2.4
+endif
+# Edit the path below to point to the base of your libidn package.
+ifndef LIBIDN_PATH
+LIBIDN_PATH = ../../../libidn-1.30
+endif
+# Edit the path below to point to the base of your MS IDN package.
+# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
+# https://www.microsoft.com/en-us/download/details.aspx?id=734
+ifndef WINIDN_PATH
+WINIDN_PATH = ../../../Microsoft IDN Mitigation APIs
endif
# Edit the path below to point to the base of your Novell LDAP NDK.
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-1.0.0
+endif
PROOT = ../..
-ARES_LIB = $(PROOT)/ares
-SSL = 1
-ZLIB = 1
+# Edit the path below to point to the base of your c-ares package.
+ifndef LIBCARES_PATH
+LIBCARES_PATH = $(PROOT)/ares
+endif
-CC = gcc
-CFLAGS = -g -O2 -Wall
+# Edit the var below to set to your architecture or set environment var.
+ifndef ARCH
+ifeq ($(findstring x86_64,$(shell $(CC) -dumpmachine)),x86_64)
+ARCH = w64
+else
+ARCH = w32
+endif
+endif
+
+CC = $(CROSSPREFIX)gcc
+CFLAGS = -g -O2 -Wall
+CFLAGS += -fno-strict-aliasing
+ifeq ($(ARCH),w64)
+CFLAGS += -m64 -D_AMD64_
+LDFLAGS += -m64
+RCFLAGS += -F pe-x86-64
+else
+CFLAGS += -m32
+LDFLAGS += -m32
+RCFLAGS += -F pe-i386
+endif
# comment LDFLAGS below to keep debug info
-LDFLAGS = -s
-RC = windres
-RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
-RM = del /q /f > NUL 2>&1
-CP = copy
+LDFLAGS = -s
+RC = $(CROSSPREFIX)windres
+RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
+
+# Platform-dependent helper tool macros
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DEL = rm -f $1
+RMDIR = rm -fr $1
+MKDIR = mkdir -p $1
+COPY = -cp -afv $1 $2
+#COPYR = -cp -afr $1/* $2
+COPYR = -rsync -aC $1/* $2
+TOUCH = touch $1
+CAT = cat
+ECHONL = echo ""
+DL = '
+else
+ifeq "$(OS)" "Windows_NT"
+DEL = -del 2>NUL /q /f $(subst /,\,$1)
+RMDIR = -rd 2>NUL /q /s $(subst /,\,$1)
+else
+DEL = -del 2>NUL $(subst /,\,$1)
+RMDIR = -deltree 2>NUL /y $(subst /,\,$1)
+endif
+MKDIR = -md 2>NUL $(subst /,\,$1)
+COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
+COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
+TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,,
+CAT = type
+ECHONL = $(ComSpec) /c echo.
+endif
########################################################
## Nothing more to do below this line!
+ifeq ($(findstring -dyn,$(CFG)),-dyn)
+DYN = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+RTMP = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+SSH2 = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+SSL = 1
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+IDN = 1
+endif
+ifeq ($(findstring -winidn,$(CFG)),-winidn)
+WINIDN = 1
+endif
+ifeq ($(findstring -sspi,$(CFG)),-sspi)
+SSPI = 1
+endif
+ifeq ($(findstring -ldaps,$(CFG)),-ldaps)
+LDAPS = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+IPV6 = 1
+endif
+ifeq ($(findstring -metalink,$(CFG)),-metalink)
+METALINK = 1
+endif
+ifeq ($(findstring -winssl,$(CFG)),-winssl)
+WINSSL = 1
+SSPI = 1
+endif
+ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
+NGHTTP2 = 1
+endif
+
INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib
-LINK = $(CC) $(LDFLAGS) -o $@
ifdef DYN
curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
@@ -57,37 +188,68 @@ else
curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a
curl_LDADD = -L$(PROOT)/lib -lcurl
CFLAGS += -DCURL_STATICLIB
+ LDFLAGS += -static
endif
ifdef ARES
ifndef DYN
- curl_DEPENDENCIES += $(ARES_LIB)/libcares.a
+ curl_DEPENDENCIES += $(LIBCARES_PATH)/libcares.a
endif
CFLAGS += -DUSE_ARES
- curl_LDADD += -L$(ARES_LIB) -lcares
+ curl_LDADD += -L"$(LIBCARES_PATH)" -lcares
+endif
+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
+ curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2
endif
ifdef SSL
- INCLUDES += -I"$(OPENSSL_PATH)/outinc"
- CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
- ifdef DYN
- curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
- else
- curl_LDADD += -L$(OPENSSL_PATH)/out -lssl -lcrypto -lgdi32
+ ifndef OPENSSL_LIBPATH
+ OPENSSL_LIBS = -lssl -lcrypto
+ ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
+ OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
+ ifdef DYN
+ OPENSSL_LIBS = -lssl32 -leay32
+ endif
+ endif
+ ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
+ OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
+ endif
endif
+ ifndef DYN
+ OPENSSL_LIBS += -lgdi32 -lcrypt32
+ endif
+ CFLAGS += -DUSE_OPENSSL
+ curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
endif
ifdef ZLIB
INCLUDES += -I"$(ZLIB_PATH)"
CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
- curl_LDADD += -L$(ZLIB_PATH) -lz
+ curl_LDADD += -L"$(ZLIB_PATH)" -lz
+endif
+ifdef IDN
+ CFLAGS += -DUSE_LIBIDN
+ curl_LDADD += -L"$(LIBIDN_PATH)/lib" -lidn
+else
+ifdef WINIDN
+ CFLAGS += -DUSE_WIN32_IDN
+ curl_LDADD += -L"$(WINIDN_PATH)" -lnormaliz
+endif
endif
ifdef SSPI
CFLAGS += -DUSE_WINDOWS_SSPI
+ ifdef WINSSL
+ CFLAGS += -DUSE_SCHANNEL
+ endif
endif
ifdef IPV6
- CFLAGS += -DENABLE_IPV6
+ CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
endif
ifdef LDAPS
CFLAGS += -DHAVE_LDAP_SSL
@@ -102,32 +264,34 @@ ifdef USE_LDAP_OPENLDAP
endif
ifndef USE_LDAP_NOVELL
ifndef USE_LDAP_OPENLDAP
-curl_LDADD += -lwldap32
+ curl_LDADD += -lwldap32
endif
endif
curl_LDADD += -lws2_32
-COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
include Makefile.inc
-example_PROGRAMS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS)))
+check_PROGRAMS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS)))
+check_PROGRAMS += ftpuploadresume.exe synctime.exe
-.SUFFIXES: .rc .res .o .exe
+.PRECIOUS: %.o
-all: $(example_PROGRAMS)
+all: $(check_PROGRAMS)
-.o.exe: $(curl_DEPENDENCIES)
- $(LINK) $< $(curl_LDADD)
+%.exe: %.o $(curl_DEPENDENCIES)
+ $(CC) $(LDFLAGS) -o $@ $< $(curl_LDADD)
-.c.o:
- $(COMPILE) -c $<
+%.o: %.c
+ $(CC) $(INCLUDES) $(CFLAGS) -c $<
-.rc.res:
+%.res: %.rc
$(RC) $(RCFLAGS) $< -o $@
clean:
- $(RM) $(example_PROGRAMS)
+ @$(call DEL, $(check_PROGRAMS:.exe=.o))
+distclean vclean: clean
+ @$(call DEL, $(check_PROGRAMS))
diff --git a/docs/examples/Makefile.netware b/docs/examples/Makefile.netware
new file mode 100644
index 00000000..f8e9955e
--- /dev/null
+++ b/docs/examples/Makefile.netware
@@ -0,0 +1,434 @@
+#################################################################
+#
+## Makefile for building curl.nlm (NetWare version - gnu make)
+## Use: make -f Makefile.netware
+##
+## Comments to: Guenter Knauf http://www.gknw.net/phpbb
+#
+#################################################################
+
+# Edit the path below to point to the base of your Novell NDK.
+ifndef NDKBASE
+NDKBASE = c:/novell
+endif
+
+# Edit the path below to point to the base of your Zlib sources.
+ifndef ZLIB_PATH
+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-1.0.2a
+endif
+
+# Edit the path below to point to the base of your LibSSH2 package.
+ifndef LIBSSH2_PATH
+LIBSSH2_PATH = ../../../libssh2-1.5.0
+endif
+
+# Edit the path below to point to the base of your axTLS package.
+ifndef AXTLS_PATH
+AXTLS_PATH = ../../../axTLS-1.2.7
+endif
+
+# Edit the path below to point to the base of your libidn package.
+ifndef LIBIDN_PATH
+LIBIDN_PATH = ../../../libidn-1.30
+endif
+
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../../librtmp-2.4
+endif
+
+# Edit the path below to point to the base of your fbopenssl package.
+ifndef FBOPENSSL_PATH
+FBOPENSSL_PATH = ../../fbopenssl-0.4
+endif
+
+# Edit the path below to point to the base of your c-ares package.
+ifndef LIBCARES_PATH
+LIBCARES_PATH = ../../ares
+endif
+
+ifndef INSTDIR
+INSTDIR = ..$(DS)..$(DS)curl-$(LIBCURL_VERSION_STR)-bin-nw
+endif
+
+# Edit the vars below to change NLM target settings.
+TARGET = examples
+VERSION = $(LIBCURL_VERSION)
+COPYR = Copyright (C) $(LIBCURL_COPYRIGHT_STR)
+DESCR = cURL ($(LIBARCH))
+MTSAFE = YES
+STACK = 8192
+SCREEN = Example Program
+# Comment the line below if you dont want to load protected automatically.
+# LDRING = 3
+
+# Uncomment the next line to enable linking with POSIX semantics.
+# POSIXFL = 1
+
+# Edit the var below to point to your lib architecture.
+ifndef LIBARCH
+LIBARCH = LIBC
+endif
+
+# must be equal to NDEBUG or DEBUG, CURLDEBUG
+ifndef DB
+DB = NDEBUG
+endif
+# Optimization: -O<n> or debugging: -g
+ifeq ($(DB),NDEBUG)
+ OPT = -O2
+ OBJDIR = release
+else
+ OPT = -g
+ OBJDIR = debug
+endif
+
+# The following lines defines your compiler.
+ifdef CWFolder
+ METROWERKS = $(CWFolder)
+endif
+ifdef METROWERKS
+ # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
+ MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
+ CC = mwccnlm
+else
+ CC = gcc
+endif
+PERL = perl
+# Here you can find a native Win32 binary of the original awk:
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
+AWK = awk
+CP = cp -afv
+MKDIR = mkdir
+# RM = rm -f
+# If you want to mark the target as MTSAFE you will need a tool for
+# generating the xdc data for the linker; here's a minimal tool:
+# http://www.gknw.net/development/prgtools/mkxdc.zip
+MPKXDC = mkxdc
+
+# LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
+LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
+
+# Include the version info retrieved from curlver.h
+-include $(OBJDIR)/version.inc
+
+# Global flags for all compilers
+CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
+
+ifeq ($(CC),mwccnlm)
+LD = mwldnlm
+LDFLAGS = -nostdlib $< $(PRELUDE) $(LDLIBS) -o $@ -commandfile
+LIBEXT = lib
+CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586
+CFLAGS += -relax_pointers
+#CFLAGS += -w on
+ifeq ($(LIBARCH),LIBC)
+ifeq ($(POSIXFL),1)
+ PRELUDE = $(NDK_LIBC)/imports/posixpre.o
+else
+ PRELUDE = $(NDK_LIBC)/imports/libcpre.o
+endif
+ CFLAGS += -align 4
+else
+ # PRELUDE = $(NDK_CLIB)/imports/clibpre.o
+ # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
+ PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
+ # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
+ CFLAGS += -align 1
+endif
+else
+LD = nlmconv
+LDFLAGS = -T
+LIBEXT = a
+CFLAGS += -m32
+CFLAGS += -fno-builtin -fno-strict-aliasing
+ifeq ($(findstring gcc,$(CC)),gcc)
+CFLAGS += -fpcc-struct-return
+endif
+CFLAGS += -Wall # -pedantic
+ifeq ($(LIBARCH),LIBC)
+ifeq ($(POSIXFL),1)
+ PRELUDE = $(NDK_LIBC)/imports/posixpre.gcc.o
+else
+ PRELUDE = $(NDK_LIBC)/imports/libcpre.gcc.o
+endif
+else
+ # PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o
+ # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
+ # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
+ PRELUDE = $(NDK_ROOT)/pre/prelude.o
+ CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
+endif
+endif
+
+NDK_ROOT = $(NDKBASE)/ndk
+ifndef NDK_CLIB
+NDK_CLIB = $(NDK_ROOT)/nwsdk
+endif
+ifndef NDK_LIBC
+NDK_LIBC = $(NDK_ROOT)/libc
+endif
+ifndef NDK_LDAP
+NDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
+endif
+CURL_INC = ../../include
+CURL_LIB = ../../lib
+
+INCLUDES = -I$(CURL_INC)
+
+ifeq ($(findstring -static,$(CFG)),-static)
+LINK_STATIC = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+WITH_ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+WITH_RTMP = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+WITH_SSH2 = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -axtls,$(CFG)),-axtls)
+WITH_AXTLS = 1
+WITH_SSL =
+else
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+WITH_SSL = 1
+endif
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+WITH_IDN = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+ENABLE_IPV6 = 1
+endif
+
+ifdef LINK_STATIC
+ LDLIBS = $(CURL_LIB)/libcurl.$(LIBEXT)
+ifdef WITH_ARES
+ LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT)
+endif
+else
+ MODULES = libcurl.nlm
+ IMPORTS = @$(CURL_LIB)/libcurl.imp
+endif
+ifdef WITH_SSH2
+ # INCLUDES += -I$(LIBSSH2_PATH)/include
+ifdef LINK_STATIC
+ LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
+else
+ MODULES += libssh2.nlm
+ IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
+endif
+endif
+ifdef WITH_RTMP
+ # INCLUDES += -I$(LIBRTMP_PATH)
+ifdef LINK_STATIC
+ LDLIBS += $(LIBRTMP_PATH)/librtmp/librtmp.$(LIBEXT)
+endif
+endif
+ifdef WITH_SSL
+ INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
+ LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
+ LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
+ IMPORTS += GetProcessSwitchCount RunningProcess
+else
+ifdef WITH_AXTLS
+ INCLUDES += -I$(AXTLS_PATH)/inc
+ifdef LINK_STATIC
+ LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
+else
+ MODULES += libaxtls.nlm
+ IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
+endif
+endif
+endif
+ifdef WITH_ZLIB
+ # INCLUDES += -I$(ZLIB_PATH)
+ifdef LINK_STATIC
+ LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
+else
+ MODULES += libz.nlm
+ IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
+endif
+endif
+ifdef WITH_IDN
+ # INCLUDES += -I$(LIBIDN_PATH)/include
+ LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT)
+endif
+
+ifeq ($(LIBARCH),LIBC)
+ INCLUDES += -I$(NDK_LIBC)/include
+ # INCLUDES += -I$(NDK_LIBC)/include/nks
+ # INCLUDES += -I$(NDK_LIBC)/include/winsock
+ CFLAGS += -D_POSIX_SOURCE
+else
+ INCLUDES += -I$(NDK_CLIB)/include/nlm
+ # INCLUDES += -I$(NDK_CLIB)/include
+endif
+ifndef DISABLE_LDAP
+ # INCLUDES += -I$(NDK_LDAP)/$(LIBARCH_L)/inc
+endif
+CFLAGS += $(INCLUDES)
+
+ifeq ($(MTSAFE),YES)
+ XDCOPT = -n
+endif
+ifeq ($(MTSAFE),NO)
+ XDCOPT = -u
+endif
+ifdef XDCOPT
+ XDCDATA = $(OBJDIR)/$(TARGET).xdc
+endif
+
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DL = '
+DS = /
+PCT = %
+#-include $(NDKBASE)/nlmconv/ncpfs.inc
+else
+DS = \\
+PCT = %%
+endif
+
+# Makefile.inc provides the CSOURCES and HHEADERS defines
+include Makefile.inc
+
+check_PROGRAMS := $(patsubst %,%.nlm,$(strip $(check_PROGRAMS)))
+
+.PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.def $(OBJDIR)/%.xdc
+
+
+all: prebuild $(check_PROGRAMS)
+
+prebuild: $(OBJDIR) $(OBJDIR)/version.inc
+
+$(OBJDIR)/%.o: %.c
+ @echo Compiling $<
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
+ @echo Creating $@
+ @$(AWK) -f ../../packages/NetWare/get_ver.awk $< > $@
+
+install: $(INSTDIR) all
+ @$(CP) $(check_PROGRAMS) $(INSTDIR)
+
+clean:
+ -$(RM) -r $(OBJDIR)
+
+distclean vclean: clean
+ -$(RM) $(check_PROGRAMS)
+
+$(OBJDIR) $(INSTDIR):
+ @$(MKDIR) $@
+
+%.nlm: $(OBJDIR)/%.o $(OBJDIR)/%.def $(XDCDATA)
+ @echo Linking $@
+ @-$(RM) $@
+ @$(LD) $(LDFLAGS) $(OBJDIR)/$(@:.nlm=.def)
+
+$(OBJDIR)/%.xdc: Makefile.netware
+ @echo Creating $@
+ @$(MPKXDC) $(XDCOPT) $@
+
+$(OBJDIR)/%.def: Makefile.netware
+ @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
+ @echo $(DL)# Do not edit this file - it is created by Make!$(DL) >> $@
+ @echo $(DL)# All your changes will be lost!!$(DL) >> $@
+ @echo $(DL)#$(DL) >> $@
+ @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
+ @echo $(DL)description "$(DESCR) $(notdir $(@:.def=)) Example"$(DL) >> $@
+ @echo $(DL)version $(VERSION)$(DL) >> $@
+ifdef NLMTYPE
+ @echo $(DL)type $(NLMTYPE)$(DL) >> $@
+endif
+ifdef STACK
+ @echo $(DL)stack $(STACK)$(DL) >> $@
+endif
+ifdef SCREEN
+ @echo $(DL)screenname "$(DESCR) $(notdir $(@:.def=)) $(SCREEN)"$(DL) >> $@
+else
+ @echo $(DL)screenname "DEFAULT"$(DL) >> $@
+endif
+ifneq ($(DB),NDEBUG)
+ @echo $(DL)debug$(DL) >> $@
+endif
+ @echo $(DL)threadname "_$(notdir $(@:.def=))"$(DL) >> $@
+ifdef XDCDATA
+ @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
+endif
+ifeq ($(LDRING),0)
+ @echo $(DL)flag_on 16$(DL) >> $@
+endif
+ifeq ($(LDRING),3)
+ @echo $(DL)flag_on 512$(DL) >> $@
+endif
+ifeq ($(LIBARCH),CLIB)
+ @echo $(DL)start _Prelude$(DL) >> $@
+ @echo $(DL)exit _Stop$(DL) >> $@
+ @echo $(DL)import @$(NDK_CLIB)/imports/clib.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_CLIB)/imports/threads.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_CLIB)/imports/socklib.imp$(DL) >> $@
+ @echo $(DL)module clib$(DL) >> $@
+ifndef DISABLE_LDAP
+ @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
+# @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
+ @echo $(DL)module ldapsdk ldapssl$(DL) >> $@
+endif
+else
+ifeq ($(POSIXFL),1)
+ @echo $(DL)flag_on 4194304$(DL) >> $@
+endif
+ @echo $(DL)flag_on 64$(DL) >> $@
+ @echo $(DL)pseudopreemption$(DL) >> $@
+ifeq ($(findstring posixpre,$(PRELUDE)),posixpre)
+ @echo $(DL)start POSIX_Start$(DL) >> $@
+ @echo $(DL)exit POSIX_Stop$(DL) >> $@
+ @echo $(DL)check POSIX_CheckUnload$(DL) >> $@
+else
+ @echo $(DL)start _LibCPrelude$(DL) >> $@
+ @echo $(DL)exit _LibCPostlude$(DL) >> $@
+ @echo $(DL)check _LibCCheckUnload$(DL) >> $@
+endif
+ @echo $(DL)import @$(NDK_LIBC)/imports/libc.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_LIBC)/imports/netware.imp$(DL) >> $@
+ @echo $(DL)module libc$(DL) >> $@
+ifndef DISABLE_LDAP
+ @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
+# @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
+ @echo $(DL)module lldapsdk lldapssl$(DL) >> $@
+endif
+endif
+ifdef MODULES
+ @echo $(DL)module $(MODULES)$(DL) >> $@
+endif
+ifdef EXPORTS
+ @echo $(DL)export $(EXPORTS)$(DL) >> $@
+endif
+ifdef IMPORTS
+ @echo $(DL)import $(IMPORTS)$(DL) >> $@
+endif
+ifeq ($(findstring nlmconv,$(LD)),nlmconv)
+ @echo $(DL)input $(PRELUDE)$(DL) >> $@
+ @echo $(DL)input $(@:.def=.o)$(DL) >> $@
+ifdef LDLIBS
+ @echo $(DL)input $(LDLIBS)$(DL) >> $@
+endif
+ @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
+endif
diff --git a/docs/examples/README b/docs/examples/README
index d6c47856..1ca62a15 100644
--- a/docs/examples/README
+++ b/docs/examples/README
@@ -55,14 +55,18 @@ htmltitle.cc - download a HTML file and extract the <title> tag from a HTML
http-post.c - HTTP POST
httpput.c - HTTP PUT a local file
https.c - simple HTTPS transfer
+imap.c - simple IMAP transfer
multi-app.c - a multi-interface app
multi-debugcallback.c - a multi-interface app using the debug callback
multi-double.c - a multi-interface app doing two simultaneous transfers
multi-post.c - a multi-interface app doing a multipart formpost
multi-single.c - a multi-interface app getting a single file
+multi-uv.c - a multi-interface app using libuv
multithread.c - an example using multi-treading transferring multiple files
opensslthreadlock.c - show how to do locking when using OpenSSL multi-threaded
persistant.c - request two URLs with a persistent connection
+pop3s.c - POP3S transfer
+pop3slist.c - POP3S LIST
post-callback.c - send a HTTP POST using a callback
postit2.c - send a HTTP multipart formpost
sampleconv.c - showing how a program on a non-ASCII platform would invoke
@@ -73,4 +77,6 @@ simple.c - the most simple download a URL source
simplepost.c - HTTP POST
simplessl.c - HTTPS example with certificates many options set
synctime.c - Sync local time by extracting date from remote HTTP servers
+url2file.c - download a document and store it in a file
+xmlstream.c - Stream-parse a document using the streaming Expat parser
10-at-a-time.c - Download many files simultaneously, 10 at a time.
diff --git a/docs/examples/adddocsref.pl b/docs/examples/adddocsref.pl
new file mode 100755
index 00000000..2dcc24b6
--- /dev/null
+++ b/docs/examples/adddocsref.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+# pass files as argument(s)
+
+my $docroot="http://curl.haxx.se/libcurl/c";
+
+for $f (@ARGV) {
+ open(NEW, ">$f.new");
+ open(F, "<$f");
+ while(<F>) {
+ my $l = $_;
+ if($l =~ /\/* $docroot/) {
+ # just ignore preciously added refs
+ }
+ elsif($l =~ /^( *).*curl_easy_setopt\([^,]*, *([^ ,]*) *,/) {
+ my ($prefix, $anc) = ($1, $2);
+ $anc =~ s/_//g;
+ print NEW "$prefix/* $docroot/curl_easy_setopt.html#$anc */\n";
+ print NEW $l;
+ }
+ elsif($l =~ /^( *).*(curl_([^\(]*))\(/) {
+ my ($prefix, $func) = ($1, $2);
+ print NEW "$prefix/* $docroot/$func.html */\n";
+ print NEW $l;
+ }
+ else {
+ print NEW $l;
+ }
+ }
+ close(F);
+ close(NEW);
+
+ system("mv $f $f.org");
+ system("mv $f.new $f");
+}
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index cec9fede..b89dca2e 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <fcntl.h>
#ifdef WIN32
@@ -14,7 +26,8 @@
#else
# ifdef __VMS
typedef int intptr_t;
-# else
+# endif
+# if !defined(_AIX) && !defined(__sgi) && !defined(__osf__)
# include <stdint.h>
# endif
# include <unistd.h>
@@ -40,6 +53,12 @@
#define TRUE 1
#endif
+#if defined(_AIX) || defined(__sgi) || defined(__osf__)
+#ifndef intptr_t
+#define intptr_t long
+#endif
+#endif
+
/*
* This example shows a HTTP PUT operation with authentiction using "any"
* type. It PUTs a file given as a command line argument to the URL also given
@@ -77,12 +96,16 @@ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t retcode;
+ curl_off_t nread;
intptr_t fd = (intptr_t)stream;
retcode = read(fd, ptr, size * nmemb);
- fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+ nread = (curl_off_t)retcode;
+
+ fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+ " bytes from file\n", nread);
return retcode;
}
@@ -147,6 +170,10 @@ int main(int argc, char **argv)
/* Now run off and do what you've been told! */
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);
diff --git a/docs/examples/asiohiper.cpp b/docs/examples/asiohiper.cpp
new file mode 100644
index 00000000..eb5cd038
--- /dev/null
+++ b/docs/examples/asiohiper.cpp
@@ -0,0 +1,467 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * file: asiohiper.cpp
+ * Example program to demonstrate the use of multi socket interface
+ * with boost::asio
+ *
+ * This program is in c++ and uses boost::asio instead of libevent/libev.
+ * Requires boost::asio, boost::bind and boost::system
+ *
+ * This is an adaptation of libcurl's "hiperfifo.c" and "evhiperfifo.c"
+ * sample programs. This example implements a subset of the functionality from
+ * hiperfifo.c, for full functionality refer hiperfifo.c or evhiperfifo.c
+ *
+ * Written by Lijo Antony based on hiperfifo.c by Jeff Pohlmeyer
+ *
+ * When running, the program creates an easy handle for a URL and
+ * uses the curl_multi API to fetch it.
+ *
+ * Note:
+ * For the sake of simplicity, URL is hard coded to "www.google.com"
+ *
+ * This is purely a demo app, all retrieved data is simply discarded by the write
+ * callback.
+ */
+
+
+#include <curl/curl.h>
+#include <boost/asio.hpp>
+#include <boost/bind.hpp>
+
+#define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */
+
+/* boost::asio related objects
+ * using global variables for simplicity
+ */
+boost::asio::io_service io_service;
+boost::asio::deadline_timer timer(io_service);
+std::map<curl_socket_t, boost::asio::ip::tcp::socket *> socket_map;
+
+/* Global information, common to all connections */
+typedef struct _GlobalInfo
+{
+ CURLM *multi;
+ int still_running;
+} GlobalInfo;
+
+/* Information associated with a specific easy handle */
+typedef struct _ConnInfo
+{
+ CURL *easy;
+ char *url;
+ GlobalInfo *global;
+ char error[CURL_ERROR_SIZE];
+} ConnInfo;
+
+static void timer_cb(const boost::system::error_code & error, GlobalInfo *g);
+
+/* Update the event timer after curl_multi library calls */
+static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
+{
+ fprintf(MSG_OUT, "\nmulti_timer_cb: timeout_ms %ld", timeout_ms);
+
+ /* cancel running timer */
+ timer.cancel();
+
+ if(timeout_ms > 0)
+ {
+ /* update timer */
+ timer.expires_from_now(boost::posix_time::millisec(timeout_ms));
+ timer.async_wait(boost::bind(&timer_cb, _1, g));
+ }
+ else
+ {
+ /* call timeout function immediately */
+ boost::system::error_code error; /*success*/
+ timer_cb(error, g);
+ }
+
+ return 0;
+}
+
+/* Die if we get a bad CURLMcode somewhere */
+static void mcode_or_die(const char *where, CURLMcode code)
+{
+ if(CURLM_OK != code)
+ {
+ const char *s;
+ switch(code)
+ {
+ 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_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);
+ }
+}
+
+/* Check for completed transfers, and remove their easy handles */
+static void check_multi_info(GlobalInfo *g)
+{
+ char *eff_url;
+ CURLMsg *msg;
+ int msgs_left;
+ ConnInfo *conn;
+ CURL *easy;
+ CURLcode res;
+
+ fprintf(MSG_OUT, "\nREMAINING: %d", g->still_running);
+
+ while((msg = curl_multi_info_read(g->multi, &msgs_left)))
+ {
+ if(msg->msg == CURLMSG_DONE)
+ {
+ easy = msg->easy_handle;
+ res = msg->data.result;
+ curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
+ curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
+ fprintf(MSG_OUT, "\nDONE: %s => (%d) %s", eff_url, res, conn->error);
+ curl_multi_remove_handle(g->multi, easy);
+ free(conn->url);
+ curl_easy_cleanup(easy);
+ free(conn);
+ }
+ }
+}
+
+/* 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)
+{
+ 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);
+
+ mcode_or_die("event_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+
+ if(g->still_running <= 0)
+ {
+ fprintf(MSG_OUT, "\nlast transfer done, kill timeout");
+ timer.cancel();
+ }
+}
+
+/* Called by asio when our timeout expires */
+static void timer_cb(const boost::system::error_code & error, GlobalInfo *g)
+{
+ if(!error)
+ {
+ fprintf(MSG_OUT, "\ntimer_cb: ");
+
+ CURLMcode rc;
+ rc = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+
+ mcode_or_die("timer_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+ }
+}
+
+/* Clean up any data */
+static void remsock(int *f, GlobalInfo *g)
+{
+ fprintf(MSG_OUT, "\nremsock: ");
+
+ if(f)
+ {
+ free(f);
+ }
+}
+
+static void setsock(int *fdp, curl_socket_t s, CURL*e, int act, GlobalInfo*g)
+{
+ fprintf(MSG_OUT, "\nsetsock: socket=%d, act=%d, fdp=%p", s, act, fdp);
+
+ std::map<curl_socket_t, boost::asio::ip::tcp::socket *>::iterator it = socket_map.find(s);
+
+ if(it == socket_map.end())
+ {
+ fprintf(MSG_OUT, "\nsocket %d is a c-ares socket, ignoring", s);
+
+ return;
+ }
+
+ boost::asio::ip::tcp::socket * tcp_socket = it->second;
+
+ *fdp = act;
+
+ 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));
+ }
+ 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));
+ }
+ 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));
+
+ tcp_socket->async_write_some(boost::asio::null_buffers(),
+ 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);
+
+ setsock(fdp, s, easy, action, g);
+ curl_multi_assign(g->multi, s, fdp);
+}
+
+/* CURLMOPT_SOCKETFUNCTION */
+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"};
+
+ fprintf(MSG_OUT,
+ "\nsocket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
+
+ if(what == CURL_POLL_REMOVE)
+ {
+ fprintf(MSG_OUT, "\n");
+ remsock(actionp, g);
+ }
+ else
+ {
+ if(!actionp)
+ {
+ fprintf(MSG_OUT, "\nAdding data: %s", whatstr[what]);
+ addsock(s, e, what, g);
+ }
+ else
+ {
+ fprintf(MSG_OUT,
+ "\nChanging action from %s to %s",
+ whatstr[*actionp], whatstr[what]);
+ 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);
+
+ strncpy(pBuffer, (const char *)ptr, written);
+ pBuffer[written] = '\0';
+
+ fprintf(MSG_OUT, "%s", pBuffer);
+
+ free(pBuffer);
+
+ return written;
+}
+
+/* CURLOPT_PROGRESSFUNCTION */
+static int prog_cb(void *p, double dltotal, double dlnow, double ult,
+ double uln)
+{
+ ConnInfo *conn = (ConnInfo *)p;
+
+ (void)ult;
+ (void)uln;
+
+ fprintf(MSG_OUT, "\nProgress: %s (%g/%g)", conn->url, dlnow, dltotal);
+ fprintf(MSG_OUT, "\nProgress: %s (%g)", conn->url, ult);
+
+ return 0;
+}
+
+/* CURLOPT_OPENSOCKETFUNCTION */
+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)
+ {
+ /* create a tcp socket object */
+ boost::asio::ip::tcp::socket *tcp_socket = new boost::asio::ip::tcp::socket(io_service);
+
+ /* open it and get the native handle*/
+ boost::system::error_code ec;
+ tcp_socket->open(boost::asio::ip::tcp::v4(), ec);
+
+ if(ec)
+ {
+ /* 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");
+ }
+ else
+ {
+ sockfd = tcp_socket->native_handle();
+ fprintf(MSG_OUT, "\nOpened socket %d", sockfd);
+
+ /* save it for monitoring */
+ socket_map.insert(std::pair<curl_socket_t, boost::asio::ip::tcp::socket *>(sockfd, tcp_socket));
+ }
+ }
+
+ return sockfd;
+}
+
+/* CURLOPT_CLOSESOCKETFUNCTION */
+static int closesocket(void *clientp, curl_socket_t item)
+{
+ fprintf(MSG_OUT, "\nclosesocket : %d", item);
+
+ std::map<curl_socket_t, boost::asio::ip::tcp::socket *>::iterator it = socket_map.find(item);
+
+ if(it != socket_map.end())
+ {
+ delete it->second;
+ socket_map.erase(it);
+ }
+
+ return 0;
+}
+
+/* Create a new easy handle, and add it to the global curl_multi */
+static void new_conn(char *url, GlobalInfo *g)
+{
+ ConnInfo *conn;
+ CURLMcode rc;
+
+ conn = (ConnInfo *) calloc(1, sizeof(ConnInfo));
+
+ conn->easy = curl_easy_init();
+ 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);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
+ curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
+ curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 3L);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 10L);
+
+ /* call this function to get a socket */
+ curl_easy_setopt(conn->easy, CURLOPT_OPENSOCKETFUNCTION, opensocket);
+
+ /* call this function to close a socket */
+ curl_easy_setopt(conn->easy, CURLOPT_CLOSESOCKETFUNCTION, closesocket);
+
+ fprintf(MSG_OUT,
+ "\nAdding easy %p to multi %p (%s)", conn->easy, g->multi, url);
+ rc = curl_multi_add_handle(g->multi, conn->easy);
+ mcode_or_die("new_conn: curl_multi_add_handle", rc);
+
+ /* note that the add_handle() will set a time-out to trigger very soon so
+ that the necessary socket_action() call will be called by this app */
+}
+
+int main(int argc, char **argv)
+{
+ GlobalInfo g;
+ CURLMcode rc;
+
+ (void)argc;
+ (void)argv;
+
+ memset(&g, 0, sizeof(GlobalInfo));
+ g.multi = curl_multi_init();
+
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
+
+ new_conn((char *)"www.google.com", &g); /* add a URL */
+
+ /* enter io_service run loop */
+ io_service.run();
+
+ curl_multi_cleanup(g.multi);
+
+ fprintf(MSG_OUT, "\ndone.\n");
+
+ return 0;
+}
diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c
index 38702950..30a5153a 100644
--- a/docs/examples/cacertinmem.c
+++ b/docs/examples/cacertinmem.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Example using a "in core" PEM certificate to retrieve a https page.
+ * 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.
+ *
+ ***************************************************************************/
+/* Example using a "in core" PEM certificate to retrieve a https page.
* Written by Theo Borm
*/
@@ -90,6 +103,10 @@ static CURLcode sslctx_function(CURL * curl, void * sslctx, void * parm)
if (X509_STORE_add_cert(store, cert)==0)
printf("error adding certificate\n");
+ /* decrease reference counts */
+ X509_free(cert);
+ BIO_free(bio);
+
/* all set to go */
return CURLE_OK ;
}
@@ -108,7 +125,7 @@ int main(void)
rv=curl_easy_setopt(ch,CURLOPT_WRITEFUNCTION, *writefunction);
rv=curl_easy_setopt(ch,CURLOPT_WRITEDATA, stdout);
rv=curl_easy_setopt(ch,CURLOPT_HEADERFUNCTION, *writefunction);
- rv=curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
+ rv=curl_easy_setopt(ch,CURLOPT_HEADERDATA, stderr);
rv=curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1L);
rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
diff --git a/docs/examples/certinfo.c b/docs/examples/certinfo.c
index ceb0ac2b..ac0109b0 100644
--- a/docs/examples/certinfo.c
+++ b/docs/examples/certinfo.c
@@ -1,17 +1,36 @@
-/*****************************************************************************
- */
-
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
{
+ (void)stream;
+ (void)ptr;
return size * nmemb;
}
-int main(int argc, char **argv)
+
+int main(void)
{
CURL *curl;
CURLcode res;
@@ -33,18 +52,24 @@ int main(int argc, char **argv)
res = curl_easy_perform(curl);
if(!res) {
- struct curl_certinfo *ci = NULL;
+ union {
+ struct curl_slist *to_info;
+ struct curl_certinfo *to_certinfo;
+ } ptr;
+
+ ptr.to_info = NULL;
- res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
+ res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ptr.to_info);
- if(!res && ci) {
+ if(!res && ptr.to_info) {
int i;
- printf("%d certs!\n", ci->num_of_certs);
- for(i=0; i<ci->num_of_certs; i++) {
+ printf("%d certs!\n", ptr.to_certinfo->num_of_certs);
+
+ for(i = 0; i < ptr.to_certinfo->num_of_certs; i++) {
struct curl_slist *slist;
- for(slist = ci->certinfo[i]; slist; slist = slist->next)
+ for(slist = ptr.to_certinfo->certinfo[i]; slist; slist = slist->next)
printf("%s\n", slist->data);
}
@@ -52,7 +77,6 @@ int main(int argc, char **argv)
}
-
curl_easy_cleanup(curl);
}
diff --git a/docs/examples/chkspeed.c b/docs/examples/chkspeed.c
index d802469b..31949b89 100644
--- a/docs/examples/chkspeed.c
+++ b/docs/examples/chkspeed.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Example source code to show how the callback function can be used to
+ * 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.
+ *
+ ***************************************************************************/
+/* Example source code to show how the callback function can be used to
* download data into a chunk of memory instead of storing it in a file.
* After successful download we use curl_easy_getinfo() calls to get the
* amount of downloaded bytes, the time used for the whole download, and
@@ -22,8 +35,6 @@
#include <time.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
#define URL_BASE "http://speedtest.your.domain/"
#define URL_1M URL_BASE "file_1M.bin"
@@ -49,7 +60,7 @@ int main(int argc, char *argv[])
{
CURL *curl_handle;
CURLcode res;
- int prtsep = 0, prttime = 0;
+ int prtall = 0, prtsep = 0, prttime = 0;
const char *url = URL_1M;
char *appname = argv[0];
@@ -66,12 +77,14 @@ int main(int argc, char *argv[])
fprintf(stderr, "\r%s %s - %s\n",
appname, CHKSPEED_VERSION, curl_version());
exit(1);
+ } else if (strncasecmp(*argv, "-A", 2) == 0) {
+ prtall = 1;
} else if (strncasecmp(*argv, "-X", 2) == 0) {
prtsep = 1;
} else if (strncasecmp(*argv, "-T", 2) == 0) {
prttime = 1;
} else if (strncasecmp(*argv, "-M=", 3) == 0) {
- int m = atoi(*argv + 3);
+ long m = strtol((*argv)+3, NULL, 10);
switch(m) {
case 1: url = URL_1M;
break;
@@ -150,6 +163,18 @@ int main(int argc, char *argv[])
if((CURLE_OK == res) && (val>0))
printf("Average download speed: %0.3f kbyte/sec.\n", val / 1024);
+ if (prtall) {
+ /* check for name resolution time */
+ res = curl_easy_getinfo(curl_handle, CURLINFO_NAMELOOKUP_TIME, &val);
+ if((CURLE_OK == res) && (val>0))
+ printf("Name lookup time: %0.3f sec.\n", val);
+
+ /* check for connect time */
+ res = curl_easy_getinfo(curl_handle, CURLINFO_CONNECT_TIME, &val);
+ if((CURLE_OK == res) && (val>0))
+ printf("Connect time: %0.3f sec.\n", val);
+ }
+
} else {
fprintf(stderr, "Error while fetching '%s' : %s\n",
url, curl_easy_strerror(res));
diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c
index 9f1e629e..28ee7817 100644
--- a/docs/examples/cookie_interface.c
+++ b/docs/examples/cookie_interface.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * This example shows usage of simple cookie interface.
- */
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 example shows usage of simple cookie interface. */
#include <stdio.h>
#include <string.h>
@@ -76,14 +89,19 @@ main(void)
#endif
/* Netscape format cookie */
snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%lu\t%s\t%s",
- ".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
+ ".google.com", "TRUE", "/", "FALSE", (unsigned long)time(NULL) + 31337UL, "PREF", "hello google, i like you very much!");
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
if (res != CURLE_OK) {
fprintf(stderr, "Curl curl_easy_setopt failed: %s\n", curl_easy_strerror(res));
return 1;
}
- /* HTTP-header style cookie */
+ /* HTTP-header style cookie. If you use the Set-Cookie format and don't
+ specify a domain then the cookie is sent for any domain and will not be
+ modified, likely not what you intended. Starting in 7.43.0 any-domain
+ cookies will not be exported either. For more information refer to the
+ CURLOPT_COOKIELIST documentation.
+ */
snprintf(nline, sizeof(nline),
"Set-Cookie: OLD_PREF=3d141414bf4209321; "
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");
diff --git a/docs/examples/curlgtk.c b/docs/examples/curlgtk.c
index 2c442808..8cb9914c 100644
--- a/docs/examples/curlgtk.c
+++ b/docs/examples/curlgtk.c
@@ -13,8 +13,6 @@
#include <gtk/gtk.h>
#include <curl/curl.h>
-#include <curl/types.h> /* new for v7 */
-#include <curl/easy.h> /* new for v7 */
GtkWidget *Bar;
diff --git a/docs/examples/curlx.c b/docs/examples/curlx.c
index 62bdfe40..c68cf0dd 100644
--- a/docs/examples/curlx.c
+++ b/docs/examples/curlx.c
@@ -239,8 +239,7 @@ static CURLcode sslctxfun(CURL * curl, void * sslctx, void * parm) {
SSL_CTX_set_cipher_list(ctx,"RC4-MD5");
SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
- X509_STORE_add_cert(ctx->cert_store,sk_X509_value(p->ca,
- sk_X509_num(p->ca)-1));
+ X509_STORE_add_cert(SSL_CTX_get_cert_store(ctx), sk_X509_value(p->ca, sk_X509_num(p->ca)-1));
SSL_CTX_set_verify_depth(ctx,2);
@@ -491,7 +490,7 @@ int main(int argc, char **argv) {
BIO_printf(p.errorbio,"the response has a correct mimetype : %s\n",
response);
else
- BIO_printf(p.errorbio,"the reponse doesn\'t has an acceptable "
+ BIO_printf(p.errorbio,"the response doesn\'t have an acceptable "
"mime type, it is %s instead of %s\n",
response,mimetypeaccept);
}
diff --git a/docs/examples/debug.c b/docs/examples/debug.c
index cc684817..36dd80d7 100644
--- a/docs/examples/debug.c
+++ b/docs/examples/debug.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
@@ -28,12 +40,12 @@ void dump(const char *text,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
+ fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
- fprintf(stream, "%04.4lx: ", (long)i);
+ fprintf(stream, "%4.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
@@ -118,8 +130,15 @@ int main(void)
/* 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);
diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c
index 6cdccf83..e03801d8 100644
--- a/docs/examples/evhiperfifo.c
+++ b/docs/examples/evhiperfifo.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Example application source code using the multi socket interface to
+ * 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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi socket interface to
* download many files at once.
*
* This example features the same basic functionality as hiperfifo.c does,
@@ -120,7 +133,6 @@ static void mcode_or_die(const char *where, CURLMcode code)
const char *s;
switch ( code )
{
- 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;
@@ -323,7 +335,7 @@ static void new_conn(char *url, GlobalInfo *g )
conn->url = strdup(url);
curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
- curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
@@ -367,7 +379,7 @@ static int init_fifo (GlobalInfo *g)
{
struct stat st;
static const char *fifo = "hiper.fifo";
- int sockfd;
+ curl_socket_t sockfd;
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
if ( lstat (fifo, &st) == 0 )
diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c
new file mode 100644
index 00000000..5486d125
--- /dev/null
+++ b/docs/examples/externalsocket.c
@@ -0,0 +1,153 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 is an example demonstrating how an application can pass in a custom
+ * socket to libcurl to use. This example also handles the connect itself.
+ */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <curl/curl.h>
+
+#ifdef WIN32
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define close closesocket
+#else
+#include <sys/types.h> /* socket types */
+#include <sys/socket.h> /* socket definitions */
+#include <netinet/in.h>
+#include <arpa/inet.h> /* inet (3) funtions */
+#include <unistd.h> /* misc. Unix functions */
+#endif
+
+#include <errno.h>
+
+/* The IP address and port number to connect to */
+#define IPADDR "127.0.0.1"
+#define PORTNUM 80
+
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ int written = fwrite(ptr, size, nmemb, (FILE *)stream);
+ return written;
+}
+
+static curl_socket_t opensocket(void *clientp,
+ curlsocktype purpose,
+ struct curl_sockaddr *address)
+{
+ curl_socket_t sockfd;
+ (void)purpose;
+ (void)address;
+ sockfd = *(curl_socket_t *)clientp;
+ /* the actual externally set socket is passed in via the OPENSOCKETDATA
+ option */
+ return sockfd;
+}
+
+static int sockopt_callback(void *clientp, curl_socket_t curlfd,
+ curlsocktype purpose)
+{
+ (void)clientp;
+ (void)curlfd;
+ (void)purpose;
+ /* This return code was added in libcurl 7.21.5 */
+ return CURL_SOCKOPT_ALREADY_CONNECTED;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct sockaddr_in servaddr; /* socket address structure */
+ curl_socket_t sockfd;
+
+#ifdef WIN32
+ WSADATA wsaData;
+ int initwsa;
+
+ if((initwsa = WSAStartup(MAKEWORD(2,0), &wsaData)) != 0) {
+ printf("WSAStartup failed: %d\n", initwsa);
+ return 1;
+ }
+#endif
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * Note that libcurl will internally think that you connect to the host
+ * and port that you specify in the URL option.
+ */
+ curl_easy_setopt(curl, CURLOPT_URL, "http://99.99.99.99:9999");
+
+ /* Create the socket "manually" */
+ if( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) == CURL_SOCKET_BAD ) {
+ printf("Error creating listening socket.\n");
+ return 3;
+ }
+
+ memset(&servaddr, 0, sizeof(servaddr));
+ servaddr.sin_family = AF_INET;
+ servaddr.sin_port = htons(PORTNUM);
+
+ if (INADDR_NONE == (servaddr.sin_addr.s_addr = inet_addr(IPADDR)))
+ return 2;
+
+ if(connect(sockfd,(struct sockaddr *) &servaddr, sizeof(servaddr)) ==
+ -1) {
+ close(sockfd);
+ printf("client error: connect: %s\n", strerror(errno));
+ return 1;
+ }
+
+ /* no progress meter please */
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
+
+ /* send all data to this function */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
+
+ /* call this function to get a socket */
+ curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket);
+ curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd);
+
+ /* call this function to set options for the socket */
+ curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
+
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+
+ res = curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+
+ if(res) {
+ printf("libcurl error: %d\n", res);
+ return 4;
+ }
+ }
+ return 0;
+}
diff --git a/docs/examples/fileupload.c b/docs/examples/fileupload.c
index cdec7513..665eca0a 100644
--- a/docs/examples/fileupload.c
+++ b/docs/examples/fileupload.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
#include <sys/stat.h>
@@ -52,14 +64,21 @@ int main(void)
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));
- /* now extract transfer info */
- curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
- curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
+ }
+ else {
+ /* now extract transfer info */
+ curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
+ curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
- fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n",
- speed_upload, total_time);
+ fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n",
+ speed_upload, total_time);
+ }
/* always cleanup */
curl_easy_cleanup(curl);
}
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c
index 1310993b..0aad0abf 100644
--- a/docs/examples/fopen.c
+++ b/docs/examples/fopen.c
@@ -53,20 +53,24 @@
#include <curl/curl.h>
-enum fcurl_type_e { CFTYPE_NONE=0, CFTYPE_FILE=1, CFTYPE_CURL=2 };
+enum fcurl_type_e {
+ CFTYPE_NONE=0,
+ CFTYPE_FILE=1,
+ CFTYPE_CURL=2
+};
struct fcurl_data
{
- enum fcurl_type_e type; /* type of handle */
- union {
- CURL *curl;
- FILE *file;
- } handle; /* handle */
-
- char *buffer; /* buffer to store cached data*/
- int buffer_len; /* currently allocated buffers length */
- int buffer_pos; /* end of data in buffer*/
- int still_running; /* Is background url fetch still in progress */
+ enum fcurl_type_e type; /* type of handle */
+ union {
+ CURL *curl;
+ FILE *file;
+ } handle; /* handle */
+
+ char *buffer; /* buffer to store cached data*/
+ size_t buffer_len; /* currently allocated buffers length */
+ size_t buffer_pos; /* end of data in buffer*/
+ int still_running; /* Is background url fetch still in progress */
};
typedef struct fcurl_data URL_FILE;
@@ -76,498 +80,463 @@ URL_FILE *url_fopen(const char *url,const char *operation);
int url_fclose(URL_FILE *file);
int url_feof(URL_FILE *file);
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
-char * url_fgets(char *ptr, int size, URL_FILE *file);
+char * url_fgets(char *ptr, size_t size, URL_FILE *file);
void url_rewind(URL_FILE *file);
/* we use a global one for convenience */
CURLM *multi_handle;
/* curl calls this routine to get more data */
-static size_t
-write_callback(char *buffer,
- size_t size,
- size_t nitems,
- void *userp)
+static size_t write_callback(char *buffer,
+ size_t size,
+ size_t nitems,
+ void *userp)
{
- char *newbuff;
- int rembuff;
+ char *newbuff;
+ size_t rembuff;
- URL_FILE *url = (URL_FILE *)userp;
- size *= nitems;
+ URL_FILE *url = (URL_FILE *)userp;
+ size *= nitems;
- rembuff=url->buffer_len - url->buffer_pos; /* remaining space in buffer */
+ rembuff=url->buffer_len - url->buffer_pos; /* remaining space in buffer */
- if(size > rembuff)
- {
- /* not enough space in buffer */
- newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff));
- if(newbuff==NULL)
- {
- fprintf(stderr,"callback buffer grow failed\n");
- size=rembuff;
- }
- else
- {
- /* realloc suceeded increase buffer size*/
- url->buffer_len+=size - rembuff;
- url->buffer=newbuff;
-
- /*printf("Callback buffer grown to %d bytes\n",url->buffer_len);*/
- }
+ if(size > rembuff) {
+ /* not enough space in buffer */
+ newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff));
+ if(newbuff==NULL) {
+ fprintf(stderr,"callback buffer grow failed\n");
+ size=rembuff;
}
+ else {
+ /* realloc succeeded increase buffer size*/
+ url->buffer_len+=size - rembuff;
+ url->buffer=newbuff;
+ }
+ }
- memcpy(&url->buffer[url->buffer_pos], buffer, size);
- url->buffer_pos += size;
-
- /*fprintf(stderr, "callback %d size bytes\n", size);*/
+ memcpy(&url->buffer[url->buffer_pos], buffer, size);
+ url->buffer_pos += size;
- return size;
+ return size;
}
/* use to attempt to fill the read buffer up to requested number of bytes */
-static int
-fill_buffer(URL_FILE *file,int want,int waittime)
+static int fill_buffer(URL_FILE *file, size_t want)
{
- fd_set fdread;
- fd_set fdwrite;
- fd_set fdexcep;
- struct timeval timeout;
- int rc;
-
- /* only attempt to fill buffer if transactions still running and buffer
- * doesnt exceed required size already
- */
- if((!file->still_running) || (file->buffer_pos > want))
- return 0;
-
- /* attempt to fill buffer */
- do
- {
- int maxfd = -1;
- long curl_timeo = -1;
-
- FD_ZERO(&fdread);
- FD_ZERO(&fdwrite);
- FD_ZERO(&fdexcep);
-
- /* set a suitable timeout to fail on */
- timeout.tv_sec = 60; /* 1 minute */
- timeout.tv_usec = 0;
-
- curl_multi_timeout(multi_handle, &curl_timeo);
- if(curl_timeo >= 0) {
- timeout.tv_sec = curl_timeo / 1000;
- if(timeout.tv_sec > 1)
- timeout.tv_sec = 1;
- else
- timeout.tv_usec = (curl_timeo % 1000) * 1000;
- }
-
- /* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
- /* 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);
-
- switch(rc) {
- case -1:
- /* select error */
- break;
-
- case 0:
- break;
-
- default:
- /* timeout or readable/writable sockets */
- curl_multi_perform(multi_handle, &file->still_running);
- break;
- }
- } while(file->still_running && (file->buffer_pos < want));
- return 1;
-}
+ fd_set fdread;
+ fd_set fdwrite;
+ 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
+ * doesn't exceed required size already
+ */
+ if((!file->still_running) || (file->buffer_pos > want))
+ return 0;
-/* use to remove want bytes from the front of a files buffer */
-static int
-use_buffer(URL_FILE *file,int want)
-{
- /* sort out buffer */
- if((file->buffer_pos - want) <=0)
+ /* attempt to fill buffer */
+ do {
+ int maxfd = -1;
+ long curl_timeo = -1;
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* set a suitable timeout to fail on */
+ timeout.tv_sec = 60; /* 1 minute */
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(multi_handle, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK)
{
- /* ditch buffer - write will recreate */
- if(file->buffer)
- free(file->buffer);
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- file->buffer=NULL;
- file->buffer_pos=0;
- file->buffer_len=0;
+ /* 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
- {
- /* move rest down make it available for later */
- memmove(file->buffer,
- &file->buffer[want],
- (file->buffer_pos - want));
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
+
+ switch(rc) {
+ case -1:
+ /* select error */
+ break;
- file->buffer_pos -= want;
+ case 0:
+ default:
+ /* timeout or readable/writable sockets */
+ curl_multi_perform(multi_handle, &file->still_running);
+ break;
}
- return 0;
+ } while(file->still_running && (file->buffer_pos < want));
+ return 1;
}
+/* use to remove want bytes from the front of a files buffer */
+static int use_buffer(URL_FILE *file, size_t want)
+{
+ /* sort out buffer */
+ if((file->buffer_pos - want) <=0) {
+ /* ditch buffer - write will recreate */
+ free(file->buffer);
+ file->buffer=NULL;
+ file->buffer_pos=0;
+ file->buffer_len=0;
+ }
+ else {
+ /* move rest down make it available for later */
+ memmove(file->buffer,
+ &file->buffer[want],
+ (file->buffer_pos - want));
+
+ file->buffer_pos -= want;
+ }
+ return 0;
+}
-
-URL_FILE *
-url_fopen(const char *url,const char *operation)
+URL_FILE *url_fopen(const char *url,const char *operation)
{
- /* this code could check for URLs or types in the 'url' and
- basicly use the real fopen() for standard files */
+ /* this code could check for URLs or types in the 'url' and
+ basically use the real fopen() for standard files */
- URL_FILE *file;
- (void)operation;
+ URL_FILE *file;
+ (void)operation;
- file = malloc(sizeof(URL_FILE));
- if(!file)
- return NULL;
+ file = malloc(sizeof(URL_FILE));
+ if(!file)
+ return NULL;
- memset(file, 0, sizeof(URL_FILE));
+ memset(file, 0, sizeof(URL_FILE));
- if((file->handle.file=fopen(url,operation)))
- {
- file->type = CFTYPE_FILE; /* marked as URL */
- }
- else
- {
- file->type = CFTYPE_CURL; /* marked as URL */
- file->handle.curl = curl_easy_init();
+ if((file->handle.file=fopen(url,operation)))
+ file->type = CFTYPE_FILE; /* marked as URL */
- curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
- curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file);
- curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0L);
- curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
+ else {
+ file->type = CFTYPE_CURL; /* marked as URL */
+ file->handle.curl = curl_easy_init();
- if(!multi_handle)
- multi_handle = curl_multi_init();
+ curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
+ curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file);
+ curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0L);
+ curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
- curl_multi_add_handle(multi_handle, file->handle.curl);
+ if(!multi_handle)
+ multi_handle = curl_multi_init();
- /* lets start the fetch */
- curl_multi_perform(multi_handle, &file->still_running);
+ curl_multi_add_handle(multi_handle, file->handle.curl);
- if((file->buffer_pos == 0) && (!file->still_running))
- {
- /* if still_running is 0 now, we should return NULL */
+ /* lets start the fetch */
+ curl_multi_perform(multi_handle, &file->still_running);
- /* make sure the easy handle is not in the multi handle anymore */
- curl_multi_remove_handle(multi_handle, file->handle.curl);
+ if((file->buffer_pos == 0) && (!file->still_running)) {
+ /* if still_running is 0 now, we should return NULL */
- /* cleanup */
- curl_easy_cleanup(file->handle.curl);
+ /* make sure the easy handle is not in the multi handle anymore */
+ curl_multi_remove_handle(multi_handle, file->handle.curl);
- free(file);
+ /* cleanup */
+ curl_easy_cleanup(file->handle.curl);
- file = NULL;
- }
+ free(file);
+
+ file = NULL;
}
- return file;
+ }
+ return file;
}
-int
-url_fclose(URL_FILE *file)
+int url_fclose(URL_FILE *file)
{
- int ret=0;/* default is good return */
+ int ret=0;/* default is good return */
- switch(file->type)
- {
- case CFTYPE_FILE:
- ret=fclose(file->handle.file); /* passthrough */
- break;
+ switch(file->type) {
+ case CFTYPE_FILE:
+ ret=fclose(file->handle.file); /* passthrough */
+ break;
- case CFTYPE_CURL:
- /* make sure the easy handle is not in the multi handle anymore */
- curl_multi_remove_handle(multi_handle, file->handle.curl);
+ case CFTYPE_CURL:
+ /* make sure the easy handle is not in the multi handle anymore */
+ curl_multi_remove_handle(multi_handle, file->handle.curl);
- /* cleanup */
- curl_easy_cleanup(file->handle.curl);
- break;
-
- default: /* unknown or supported type - oh dear */
- ret=EOF;
- errno=EBADF;
- break;
-
- }
+ /* cleanup */
+ curl_easy_cleanup(file->handle.curl);
+ break;
- if(file->buffer)
- free(file->buffer);/* free any allocated buffer space */
+ default: /* unknown or supported type - oh dear */
+ ret=EOF;
+ errno=EBADF;
+ break;
+ }
- free(file);
+ free(file->buffer);/* free any allocated buffer space */
+ free(file);
- return ret;
+ return ret;
}
-int
-url_feof(URL_FILE *file)
+int url_feof(URL_FILE *file)
{
- int ret=0;
-
- switch(file->type)
- {
- case CFTYPE_FILE:
- ret=feof(file->handle.file);
- break;
-
- case CFTYPE_CURL:
- if((file->buffer_pos == 0) && (!file->still_running))
- ret = 1;
- break;
- default: /* unknown or supported type - oh dear */
- ret=-1;
- errno=EBADF;
- break;
- }
- return ret;
+ int ret=0;
+
+ switch(file->type) {
+ case CFTYPE_FILE:
+ ret=feof(file->handle.file);
+ break;
+
+ case CFTYPE_CURL:
+ if((file->buffer_pos == 0) && (!file->still_running))
+ ret = 1;
+ break;
+
+ default: /* unknown or supported type - oh dear */
+ ret=-1;
+ errno=EBADF;
+ break;
+ }
+ return ret;
}
-size_t
-url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
+size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
{
- size_t want;
+ size_t want;
- switch(file->type)
- {
- case CFTYPE_FILE:
- want=fread(ptr,size,nmemb,file->handle.file);
- break;
+ switch(file->type) {
+ case CFTYPE_FILE:
+ want=fread(ptr,size,nmemb,file->handle.file);
+ break;
- case CFTYPE_CURL:
- want = nmemb * size;
+ case CFTYPE_CURL:
+ want = nmemb * size;
- fill_buffer(file,want,1);
+ fill_buffer(file,want);
- /* check if theres data in the buffer - if not fill_buffer()
- * either errored or EOF */
- if(!file->buffer_pos)
- return 0;
+ /* check if theres data in the buffer - if not fill_buffer()
+ * either errored or EOF */
+ if(!file->buffer_pos)
+ return 0;
- /* ensure only available data is considered */
- if(file->buffer_pos < want)
- want = file->buffer_pos;
+ /* ensure only available data is considered */
+ if(file->buffer_pos < want)
+ want = file->buffer_pos;
- /* xfer data to caller */
- memcpy(ptr, file->buffer, want);
+ /* xfer data to caller */
+ memcpy(ptr, file->buffer, want);
- use_buffer(file,want);
+ use_buffer(file,want);
- want = want / size; /* number of items - nb correct op - checked
- * with glibc code*/
-
- /*printf("(fread) return %d bytes %d left\n", want,file->buffer_pos);*/
- break;
+ want = want / size; /* number of items */
+ break;
- default: /* unknown or supported type - oh dear */
- want=0;
- errno=EBADF;
- break;
+ default: /* unknown or supported type - oh dear */
+ want=0;
+ errno=EBADF;
+ break;
- }
- return want;
+ }
+ return want;
}
-char *
-url_fgets(char *ptr, int size, URL_FILE *file)
+char *url_fgets(char *ptr, size_t size, URL_FILE *file)
{
- int want = size - 1;/* always need to leave room for zero termination */
- int loop;
-
- switch(file->type)
- {
- case CFTYPE_FILE:
- ptr = fgets(ptr,size,file->handle.file);
+ size_t want = size - 1;/* always need to leave room for zero termination */
+ size_t loop;
+
+ switch(file->type) {
+ case CFTYPE_FILE:
+ ptr = fgets(ptr, (int)size, file->handle.file);
+ break;
+
+ case CFTYPE_CURL:
+ fill_buffer(file,want);
+
+ /* check if theres data in the buffer - if not fill either errored or
+ * EOF */
+ if(!file->buffer_pos)
+ return NULL;
+
+ /* ensure only available data is considered */
+ if(file->buffer_pos < want)
+ want = file->buffer_pos;
+
+ /*buffer contains data */
+ /* look for newline or eof */
+ for(loop=0;loop < want;loop++) {
+ if(file->buffer[loop] == '\n') {
+ want=loop+1;/* include newline */
break;
+ }
+ }
- case CFTYPE_CURL:
- fill_buffer(file,want,1);
-
- /* check if theres data in the buffer - if not fill either errored or
- * EOF */
- if(!file->buffer_pos)
- return NULL;
-
- /* ensure only available data is considered */
- if(file->buffer_pos < want)
- want = file->buffer_pos;
-
- /*buffer contains data */
- /* look for newline or eof */
- for(loop=0;loop < want;loop++)
- {
- if(file->buffer[loop] == '\n')
- {
- want=loop+1;/* include newline */
- break;
- }
- }
-
- /* xfer data to caller */
- memcpy(ptr, file->buffer, want);
- ptr[want]=0;/* allways null terminate */
+ /* xfer data to caller */
+ memcpy(ptr, file->buffer, want);
+ ptr[want]=0;/* allways null terminate */
- use_buffer(file,want);
+ use_buffer(file,want);
- /*printf("(fgets) return %d bytes %d left\n", want,file->buffer_pos);*/
- break;
+ break;
- default: /* unknown or supported type - oh dear */
- ptr=NULL;
- errno=EBADF;
- break;
- }
+ default: /* unknown or supported type - oh dear */
+ ptr=NULL;
+ errno=EBADF;
+ break;
+ }
- return ptr;/*success */
+ return ptr;/*success */
}
-void
-url_rewind(URL_FILE *file)
+void url_rewind(URL_FILE *file)
{
- switch(file->type)
- {
- case CFTYPE_FILE:
- rewind(file->handle.file); /* passthrough */
- break;
-
- case CFTYPE_CURL:
- /* halt transaction */
- curl_multi_remove_handle(multi_handle, file->handle.curl);
+ switch(file->type) {
+ case CFTYPE_FILE:
+ rewind(file->handle.file); /* passthrough */
+ break;
- /* restart */
- curl_multi_add_handle(multi_handle, file->handle.curl);
+ case CFTYPE_CURL:
+ /* halt transaction */
+ curl_multi_remove_handle(multi_handle, file->handle.curl);
- /* ditch buffer - write will recreate - resets stream pos*/
- if(file->buffer)
- free(file->buffer);
+ /* restart */
+ curl_multi_add_handle(multi_handle, file->handle.curl);
- file->buffer=NULL;
- file->buffer_pos=0;
- file->buffer_len=0;
+ /* ditch buffer - write will recreate - resets stream pos*/
+ free(file->buffer);
+ file->buffer=NULL;
+ file->buffer_pos=0;
+ file->buffer_len=0;
- break;
-
- default: /* unknown or supported type - oh dear */
- break;
-
- }
+ break;
+ default: /* unknown or supported type - oh dear */
+ break;
+ }
}
-
/* Small main program to retrive from a url using fgets and fread saving the
* output to two test files (note the fgets method will corrupt binary files if
* they contain 0 chars */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
- URL_FILE *handle;
- FILE *outf;
+ URL_FILE *handle;
+ FILE *outf;
+
+ size_t nread;
+ char buffer[256];
+ const char *url;
+
+ if(argc < 2)
+ url="http://192.168.7.3/testfile";/* default to testurl */
+ else
+ url=argv[1];/* use passed url */
+
+ /* copy from url line by line with fgets */
+ outf=fopen("fgets.test","w+");
+ if(!outf) {
+ perror("couldn't open fgets output file\n");
+ return 1;
+ }
- int nread;
- char buffer[256];
- const char *url;
+ handle = url_fopen(url, "r");
+ if(!handle) {
+ printf("couldn't url_fopen() %s\n", url);
+ fclose(outf);
+ return 2;
+ }
- if(argc < 2)
- {
- url="http://192.168.7.3/testfile";/* default to testurl */
- }
- else
- {
- url=argv[1];/* use passed url */
- }
+ while(!url_feof(handle)) {
+ url_fgets(buffer,sizeof(buffer),handle);
+ fwrite(buffer,1,strlen(buffer),outf);
+ }
- /* copy from url line by line with fgets */
- outf=fopen("fgets.test","w+");
- if(!outf)
- {
- perror("couldn't open fgets output file\n");
- return 1;
- }
+ url_fclose(handle);
- handle = url_fopen(url, "r");
- if(!handle)
- {
- printf("couldn't url_fopen() %s\n", url);
- fclose(outf);
- return 2;
- }
+ fclose(outf);
- while(!url_feof(handle))
- {
- url_fgets(buffer,sizeof(buffer),handle);
- fwrite(buffer,1,strlen(buffer),outf);
- }
- url_fclose(handle);
+ /* Copy from url with fread */
+ outf=fopen("fread.test","w+");
+ if(!outf) {
+ perror("couldn't open fread output file\n");
+ return 1;
+ }
+ handle = url_fopen("testfile", "r");
+ if(!handle) {
+ printf("couldn't url_fopen() testfile\n");
fclose(outf);
+ return 2;
+ }
+ do {
+ nread = url_fread(buffer, 1, sizeof(buffer), handle);
+ fwrite(buffer,1,nread,outf);
+ } while(nread);
- /* Copy from url with fread */
- outf=fopen("fread.test","w+");
- if(!outf)
- {
- perror("couldn't open fread output file\n");
- return 1;
- }
+ url_fclose(handle);
- handle = url_fopen("testfile", "r");
- if(!handle) {
- printf("couldn't url_fopen() testfile\n");
- fclose(outf);
- return 2;
- }
+ fclose(outf);
- do {
- nread = url_fread(buffer, 1,sizeof(buffer), handle);
- fwrite(buffer,1,nread,outf);
- } while(nread);
- url_fclose(handle);
+ /* Test rewind */
+ outf=fopen("rewind.test","w+");
+ if(!outf) {
+ perror("couldn't open fread output file\n");
+ return 1;
+ }
+ handle = url_fopen("testfile", "r");
+ if(!handle) {
+ printf("couldn't url_fopen() testfile\n");
fclose(outf);
+ return 2;
+ }
+ nread = url_fread(buffer, 1,sizeof(buffer), handle);
+ fwrite(buffer,1,nread,outf);
+ url_rewind(handle);
- /* Test rewind */
- outf=fopen("rewind.test","w+");
- if(!outf)
- {
- perror("couldn't open fread output file\n");
- return 1;
- }
+ buffer[0]='\n';
+ fwrite(buffer,1,1,outf);
- handle = url_fopen("testfile", "r");
- if(!handle) {
- printf("couldn't url_fopen() testfile\n");
- fclose(outf);
- return 2;
- }
-
- nread = url_fread(buffer, 1,sizeof(buffer), handle);
- fwrite(buffer,1,nread,outf);
- url_rewind(handle);
-
- buffer[0]='\n';
- fwrite(buffer,1,1,outf);
+ nread = url_fread(buffer, 1,sizeof(buffer), handle);
+ fwrite(buffer,1,nread,outf);
- nread = url_fread(buffer, 1,sizeof(buffer), handle);
- fwrite(buffer,1,nread,outf);
+ url_fclose(handle);
- url_fclose(handle);
-
- fclose(outf);
+ fclose(outf);
- return 0;/* all done */
+ return 0;/* all done */
}
diff --git a/docs/examples/ftp-wildcard.c b/docs/examples/ftp-wildcard.c
index 0186a38a..d175ddfd 100644
--- a/docs/examples/ftp-wildcard.c
+++ b/docs/examples/ftp-wildcard.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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/curl.h>
#include <stdio.h>
@@ -14,14 +26,14 @@ struct callback_data {
FILE *output;
};
-static long file_is_comming(struct curl_fileinfo *finfo,
- struct callback_data *data,
- int remains);
+static long file_is_coming(struct curl_fileinfo *finfo,
+ struct callback_data *data,
+ int remains);
static long file_is_downloaded(struct callback_data *data);
static size_t write_it(char *buff, size_t size, size_t nmemb,
- struct callback_data *data);
+ void *cb_data);
int main(int argc, char **argv)
{
@@ -49,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_comming);
+ curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_coming);
/* callback is called after data from the file have been transferred */
curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded);
@@ -77,9 +89,9 @@ int main(int argc, char **argv)
return rc;
}
-static long file_is_comming(struct curl_fileinfo *finfo,
- struct callback_data *data,
- int remains)
+static long file_is_coming(struct curl_fileinfo *finfo,
+ struct callback_data *data,
+ int remains)
{
printf("%3d %40s %10luB ", remains, finfo->filename,
(unsigned long)finfo->size);
@@ -123,8 +135,9 @@ static long file_is_downloaded(struct callback_data *data)
}
static size_t write_it(char *buff, size_t size, size_t nmemb,
- struct callback_data *data)
+ void *cb_data)
{
+ struct callback_data *data = cb_data;
size_t written = 0;
if(data->output)
written = fwrite(buff, size, nmemb, data->output);
diff --git a/docs/examples/ftpget.c b/docs/examples/ftpget.c
index 3c3888a2..285283f7 100644
--- a/docs/examples/ftpget.c
+++ b/docs/examples/ftpget.c
@@ -1,17 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
/*
* This is an example showing how to get a single file from an FTP server.
@@ -43,7 +53,7 @@ int main(void)
CURL *curl;
CURLcode res;
struct FtpFile ftpfile={
- "curl.tar.gz", /* name to store the file as if succesful */
+ "curl.tar.gz", /* name to store the file as if successful */
NULL
};
diff --git a/docs/examples/ftpgetinfo.c b/docs/examples/ftpgetinfo.c
index c4e234f1..dfdcf78b 100644
--- a/docs/examples/ftpgetinfo.c
+++ b/docs/examples/ftpgetinfo.c
@@ -1,18 +1,28 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <string.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
/*
* This is an example showing how to check a single file's size and mtime
@@ -21,6 +31,8 @@
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
{
+ (void)ptr;
+ (void)data;
/* we are not interested in the headers itself,
so we only return the size we would have saved ... */
return (size_t)(size * nmemb);
@@ -31,8 +43,8 @@ int main(void)
char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
CURL *curl;
CURLcode res;
- const time_t filetime;
- const double filesize;
+ long filetime = -1;
+ double filesize = 0.0;
const char *filename = strrchr(ftpurl, '/') + 1;
curl_global_init(CURL_GLOBAL_DEFAULT);
@@ -55,10 +67,12 @@ int main(void)
if(CURLE_OK == res) {
/* http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html */
res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
- if((CURLE_OK == res) && filetime)
- printf("filetime %s: %s", filename, ctime(&filetime));
+ if((CURLE_OK == res) && (filetime >= 0)) {
+ time_t file_time = (time_t)filetime;
+ printf("filetime %s: %s", filename, ctime(&file_time));
+ }
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
- if((CURLE_OK == res) && filesize)
+ if((CURLE_OK == res) && (filesize>0.0))
printf("filesize %s: %0.0f bytes\n", filename, filesize);
} else {
/* we failed */
diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c
index 2122c4f6..dcb296ad 100644
--- a/docs/examples/ftpgetresp.c
+++ b/docs/examples/ftpgetresp.c
@@ -1,17 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
/*
* Similar to ftpget.c but this also stores the received response-lines
@@ -27,7 +37,7 @@ write_response(void *ptr, size_t size, size_t nmemb, void *data)
return fwrite(ptr, size, nmemb, writehere);
}
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl;
CURLcode res;
@@ -48,8 +58,12 @@ int main(int argc, char **argv)
/* If you intend to use this on windows with a libcurl DLL, you must use
CURLOPT_WRITEFUNCTION as well */
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
- curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
+ curl_easy_setopt(curl, CURLOPT_HEADERDATA, respfile);
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);
diff --git a/docs/examples/ftpsget.c b/docs/examples/ftpsget.c
new file mode 100644
index 00000000..dae45348
--- /dev/null
+++ b/docs/examples/ftpsget.c
@@ -0,0 +1,101 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+
+#include <curl/curl.h>
+
+/*
+ * This is an example showing how to get a single file from an FTPS server.
+ * It delays the actual destination file creation until the first write
+ * callback so that it won't create an empty file in case the remote file
+ * doesn't exist or something else fails.
+ */
+
+struct FtpFile {
+ const char *filename;
+ FILE *stream;
+};
+
+static size_t my_fwrite(void *buffer, size_t size, size_t nmemb,
+ void *stream)
+{
+ struct FtpFile *out=(struct FtpFile *)stream;
+ if(out && !out->stream) {
+ /* open file for writing */
+ out->stream=fopen(out->filename, "wb");
+ if(!out->stream)
+ return -1; /* failure, can't open file to write */
+ }
+ return fwrite(buffer, size, nmemb, out->stream);
+}
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct FtpFile ftpfile={
+ "yourfile.bin", /* name to store the file as if successful */
+ NULL
+ };
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * You better replace the URL with one that works! Note that we use an
+ * FTP:// URL with standard explicit FTPS. You can also do FTPS:// URLs if
+ * you want to do the rarer kind of transfers: implicit.
+ */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "ftp://user@server/home/user/file.txt");
+ /* Define our callback to get called when there's data to be written */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
+ /* Set a pointer to our struct to pass to the callback */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
+
+ /* We activate SSL and we require it for both control and data */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
+
+ /* Switch on full protocol/debug output */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ if(CURLE_OK != res) {
+ /* we failed */
+ fprintf(stderr, "curl told us %d\n", res);
+ }
+ }
+
+ if(ftpfile.stream)
+ fclose(ftpfile.stream); /* close the local file */
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index f1f66c0a..e79f8d84 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <string.h>
@@ -39,16 +51,20 @@
variable's memory when passed in to it from an app like this. */
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
+ curl_off_t nread;
/* in real-world cases, this would probably get this data differently
as this fread() stuff is exactly what the library already would do
by default internally */
size_t retcode = fread(ptr, size, nmemb, stream);
- fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+ nread = (curl_off_t)retcode;
+
+ fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+ " bytes from file\n", nread);
return retcode;
}
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl;
CURLcode res;
@@ -106,6 +122,10 @@ int main(int argc, char **argv)
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* clean up the FTP commands list */
curl_slist_free_all (headerlist);
diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c
index 81a790a1..55b8986c 100644
--- a/docs/examples/ftpuploadresume.c
+++ b/docs/examples/ftpuploadresume.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Upload to FTP, resuming failed transfers
+ * 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.
+ *
+ ***************************************************************************/
+/* Upload to FTP, resuming failed transfers
*
* Compile for MinGW like this:
* gcc -Wall -pedantic -std=c99 ftpuploadwithresume.c -o ftpuploadresume.exe
@@ -26,7 +39,7 @@
/* The MinGW headers are missing a few Win32 function definitions,
you shouldn't need this if you use VC++ */
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__MINGW64__)
int __cdecl _snscanf(const char * input, size_t length, const char * format, ...);
#endif
diff --git a/docs/examples/getinfo.c b/docs/examples/getinfo.c
index 0d8f1f2e..acbe1e1a 100644
--- a/docs/examples/getinfo.c
+++ b/docs/examples/getinfo.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c
index 635a936b..a1c21404 100644
--- a/docs/examples/getinmemory.c
+++ b/docs/examples/getinmemory.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Example source code to show how the callback function can be used to
+ * 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.
+ *
+ ***************************************************************************/
+/* Example source code to show how the callback function can be used to
* download data into a chunk of memory instead of storing it in a file.
*/
@@ -23,19 +36,19 @@ struct MemoryStruct {
static size_t
-WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
+WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
size_t realsize = size * nmemb;
- struct MemoryStruct *mem = (struct MemoryStruct *)data;
+ struct MemoryStruct *mem = (struct MemoryStruct *)userp;
mem->memory = realloc(mem->memory, mem->size + realsize + 1);
- if (mem->memory == NULL) {
+ if(mem->memory == NULL) {
/* out of memory! */
printf("not enough memory (realloc returned NULL)\n");
- exit(EXIT_FAILURE);
+ return 0;
}
- memcpy(&(mem->memory[mem->size]), ptr, realsize);
+ memcpy(&(mem->memory[mem->size]), contents, realsize);
mem->size += realsize;
mem->memory[mem->size] = 0;
@@ -43,9 +56,10 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
}
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl_handle;
+ CURLcode res;
struct MemoryStruct chunk;
@@ -71,26 +85,28 @@ int main(int argc, char **argv)
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
/* get it! */
- curl_easy_perform(curl_handle);
+ res = curl_easy_perform(curl_handle);
+
+ /* check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else {
+ /*
+ * Now, our chunk.memory points to a memory block that is chunk.size
+ * bytes big and contains the remote file.
+ *
+ * Do something nice with it!
+ */
+
+ printf("%lu bytes retrieved\n", (long)chunk.size);
+ }
/* cleanup curl stuff */
curl_easy_cleanup(curl_handle);
- /*
- * Now, our chunk.memory points to a memory block that is chunk.size
- * bytes big and contains the remote file.
- *
- * Do something nice with it!
- *
- * You should be aware of the fact that at this point we might have an
- * allocated data block, and nothing has yet deallocated that data. So when
- * you're done with it, you should free() it as a nice application.
- */
-
- printf("%lu bytes retrieved\n", chunk.size);
-
- if(chunk.memory)
- free(chunk.memory);
+ free(chunk.memory);
/* we're done with libcurl, so clean it up */
curl_global_cleanup();
diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c
index ac11790c..7571ffa3 100644
--- a/docs/examples/ghiper.c
+++ b/docs/examples/ghiper.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Example application source code using the multi socket interface to
+ * 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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi socket interface to
* download many files at once.
*
* Written by Jeff Pohlmeyer
@@ -91,7 +104,6 @@ static void mcode_or_die(const char *where, CURLMcode code) {
if ( CURLM_OK != code ) {
const char *s;
switch (code) {
- 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;
diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c
index c9096871..84035aa2 100644
--- a/docs/examples/hiperfifo.c
+++ b/docs/examples/hiperfifo.c
@@ -1,17 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Example application source code using the multi socket interface to
- * download many files at once.
+ * 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.
*
- * Written by Jeff Pohlmeyer
+ * 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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi socket interface to
+ download many files at once.
+
+Written by Jeff Pohlmeyer
-Requires libevent and a (POSIX?) system that has mkfifo().
+Requires libevent version 2 and a (POSIX?) system that has mkfifo().
This is an adaptation of libcurl's "hipev.c" and libevent's "event-test.c"
sample programs.
@@ -48,7 +61,7 @@ callback.
#include <unistd.h>
#include <sys/poll.h>
#include <curl/curl.h>
-#include <event.h>
+#include <event2/event.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
@@ -58,9 +71,11 @@ callback.
/* Global information, common to all connections */
-typedef struct _GlobalInfo {
- struct event fifo_event;
- struct event timer_event;
+typedef struct _GlobalInfo
+{
+ struct event_base *evbase;
+ struct event *fifo_event;
+ struct event *timer_event;
CURLM *multi;
int still_running;
FILE* input;
@@ -68,7 +83,8 @@ typedef struct _GlobalInfo {
/* Information associated with a specific easy handle */
-typedef struct _ConnInfo {
+typedef struct _ConnInfo
+{
CURL *easy;
char *url;
GlobalInfo *global;
@@ -77,12 +93,13 @@ typedef struct _ConnInfo {
/* Information associated with a specific socket */
-typedef struct _SockInfo {
+typedef struct _SockInfo
+{
curl_socket_t sockfd;
CURL *easy;
int action;
long timeout;
- struct event ev;
+ struct event *ev;
int evset;
GlobalInfo *global;
} SockInfo;
@@ -98,7 +115,7 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
timeout.tv_sec = timeout_ms/1000;
timeout.tv_usec = (timeout_ms%1000)*1000;
fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
- evtimer_add(&g->timer_event, &timeout);
+ evtimer_add(g->timer_event, &timeout);
return 0;
}
@@ -108,7 +125,6 @@ static void mcode_or_die(const char *where, CURLMcode code)
if ( CURLM_OK != code ) {
const char *s;
switch (code) {
- 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;
@@ -173,8 +189,8 @@ static void event_cb(int fd, short kind, void *userp)
check_multi_info(g);
if ( g->still_running <= 0 ) {
fprintf(MSG_OUT, "last transfer done, kill timeout\n");
- if (evtimer_pending(&g->timer_event, NULL)) {
- evtimer_del(&g->timer_event);
+ if (evtimer_pending(g->timer_event, NULL)) {
+ evtimer_del(g->timer_event);
}
}
}
@@ -202,7 +218,7 @@ static void remsock(SockInfo *f)
{
if (f) {
if (f->evset)
- event_del(&f->ev);
+ event_free(f->ev);
free(f);
}
}
@@ -219,16 +235,17 @@ static void setsock(SockInfo*f, curl_socket_t s, CURL*e, int act, GlobalInfo*g)
f->action = act;
f->easy = e;
if (f->evset)
- event_del(&f->ev);
- event_set(&f->ev, f->sockfd, kind, event_cb, g);
- f->evset=1;
- event_add(&f->ev, NULL);
+ event_free(f->ev);
+ f->ev = event_new(g->evbase, f->sockfd, kind, event_cb, g);
+ f->evset = 1;
+ event_add(f->ev, NULL);
}
/* Initialize a new SockInfo structure */
-static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g) {
+static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+{
SockInfo *fdp = calloc(sizeof(SockInfo), 1);
fdp->global = g;
@@ -346,11 +363,11 @@ static void fifo_cb(int fd, short event, void *arg)
}
/* Create a named pipe and tell libevent to monitor it */
+static const char *fifo = "hiper.fifo";
static int init_fifo (GlobalInfo *g)
{
struct stat st;
- static const char *fifo = "hiper.fifo";
- int sockfd;
+ curl_socket_t sockfd;
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
if (lstat (fifo, &st) == 0) {
@@ -373,11 +390,18 @@ static int init_fifo (GlobalInfo *g)
g->input = fdopen(sockfd, "r");
fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
- event_set(&g->fifo_event, sockfd, EV_READ | EV_PERSIST, fifo_cb, g);
- event_add(&g->fifo_event, NULL);
+ g->fifo_event = event_new(g->evbase, sockfd, EV_READ|EV_PERSIST, fifo_cb, g);
+ event_add(g->fifo_event, NULL);
return (0);
}
+static void clean_fifo(GlobalInfo *g)
+{
+ event_free(g->fifo_event);
+ fclose(g->input);
+ unlink(fifo);
+}
+
int main(int argc, char **argv)
{
GlobalInfo g;
@@ -385,10 +409,10 @@ int main(int argc, char **argv)
(void)argv;
memset(&g, 0, sizeof(GlobalInfo));
- event_init();
+ g.evbase = event_base_new();
init_fifo(&g);
g.multi = curl_multi_init();
- evtimer_set(&g.timer_event, timer_cb, &g);
+ g.timer_event = evtimer_new(g.evbase, timer_cb, &g);
/* setup the generic multi interface options we want */
curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
@@ -399,7 +423,13 @@ int main(int argc, char **argv)
/* we don't call any curl_multi_socket*() function yet as we have no handles
added! */
- event_dispatch();
+ event_base_dispatch(g.evbase);
+
+ /* this, of course, won't get called since only way to stop this program is
+ via ctrl-C, but it is here to show how cleanup /would/ be done. */
+ clean_fifo(&g);
+ event_free(g.timer_event);
+ event_base_free(g.evbase);
curl_multi_cleanup(g.multi);
return 0;
}
diff --git a/docs/examples/href_extractor.c b/docs/examples/href_extractor.c
new file mode 100644
index 00000000..c11325d2
--- /dev/null
+++ b/docs/examples/href_extractor.c
@@ -0,0 +1,86 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, Daniel Stenberg, <daniel@haxx.se>, 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 example uses the "Streaming HTML parser" to extract the href pieces in
+ * a streaming manner from a downloaded HTML. Kindly donated by Michał
+ * Kowalczyk.
+ *
+ * The parser is found at
+ * http://code.google.com/p/htmlstreamparser/
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+#include <htmlstreamparser.h>
+
+
+static size_t write_callback(void *buffer, size_t size, size_t nmemb,
+ void *hsp)
+{
+ size_t realsize = size * nmemb, p;
+ for (p = 0; p < realsize; p++) {
+ html_parser_char_parse(hsp, ((char *)buffer)[p]);
+ if (html_parser_cmp_tag(hsp, "a", 1))
+ if (html_parser_cmp_attr(hsp, "href", 4))
+ if (html_parser_is_in(hsp, HTML_VALUE_ENDED)) {
+ html_parser_val(hsp)[html_parser_val_length(hsp)] = '\0';
+ printf("%s\n", html_parser_val(hsp));
+ }
+ }
+ return realsize;
+}
+
+int main(int argc, char *argv[])
+{
+ char tag[1], attr[4], val[128];
+ CURL *curl;
+ HTMLSTREAMPARSER *hsp;
+
+ if (argc != 2) {
+ printf("Usage: %s URL\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ curl = curl_easy_init();
+
+ hsp = html_parser_init();
+
+ html_parser_set_tag_to_lower(hsp, 1);
+ html_parser_set_attr_to_lower(hsp, 1);
+ html_parser_set_tag_buffer(hsp, tag, sizeof(tag));
+ html_parser_set_attr_buffer(hsp, attr, sizeof(attr));
+ html_parser_set_val_buffer(hsp, val, sizeof(val)-1);
+
+ curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, hsp);
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+
+ html_parser_cleanup(hsp);
+
+ return EXIT_SUCCESS;
+}
diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c
index 9a46955d..a36e331b 100644
--- a/docs/examples/htmltidy.c
+++ b/docs/examples/htmltidy.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Download a document and use libtidy to parse the HTML.
+ * 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.
+ *
+ ***************************************************************************/
+/* Download a document and use libtidy to parse the HTML.
* Written by Jeff Pohlmeyer
*
* LibTidy => http://tidy.sourceforge.net
diff --git a/docs/examples/htmltitle.cc b/docs/examples/htmltitle.cc
deleted file mode 100644
index da3354a5..00000000
--- a/docs/examples/htmltitle.cc
+++ /dev/null
@@ -1,301 +0,0 @@
-/*****************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- */
-
-// Get a web page, parse it with libxml.
-//
-// Written by Lars Nilsson
-//
-// GNU C++ compile command line suggestion (edit paths accordingly):
-//
-// g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cc \
-// -o htmltitle -L/opt/curl/lib -L/opt/libxml/lib -lcurl -lxml2
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <string>
-#include <curl/curl.h>
-#include <libxml/HTMLparser.h>
-
-//
-// Case-insensitive string comparison
-//
-
-#ifdef _MSC_VER
-#define COMPARE(a, b) (!stricmp((a), (b)))
-#else
-#define COMPARE(a, b) (!strcasecmp((a), (b)))
-#endif
-
-//
-// libxml callback context structure
-//
-
-struct Context
-{
- Context(): addTitle(false) { }
-
- bool addTitle;
- std::string title;
-};
-
-//
-// libcurl variables for error strings and returned data
-
-static char errorBuffer[CURL_ERROR_SIZE];
-static std::string buffer;
-
-//
-// libcurl write callback function
-//
-
-static int writer(char *data, size_t size, size_t nmemb,
- std::string *writerData)
-{
- if (writerData == NULL)
- return 0;
-
- writerData->append(data, size*nmemb);
-
- return size * nmemb;
-}
-
-//
-// libcurl connection initialization
-//
-
-static bool init(CURL *&conn, char *url)
-{
- CURLcode code;
-
- conn = curl_easy_init();
-
- if (conn == NULL)
- {
- fprintf(stderr, "Failed to create CURL connection\n");
-
- exit(EXIT_FAILURE);
- }
-
- code = curl_easy_setopt(conn, CURLOPT_ERRORBUFFER, errorBuffer);
- if (code != CURLE_OK)
- {
- fprintf(stderr, "Failed to set error buffer [%d]\n", code);
-
- return false;
- }
-
- code = curl_easy_setopt(conn, CURLOPT_URL, url);
- if (code != CURLE_OK)
- {
- fprintf(stderr, "Failed to set URL [%s]\n", errorBuffer);
-
- return false;
- }
-
- code = curl_easy_setopt(conn, CURLOPT_FOLLOWLOCATION, 1L);
- if (code != CURLE_OK)
- {
- fprintf(stderr, "Failed to set redirect option [%s]\n", errorBuffer);
-
- return false;
- }
-
- code = curl_easy_setopt(conn, CURLOPT_WRITEFUNCTION, writer);
- if (code != CURLE_OK)
- {
- fprintf(stderr, "Failed to set writer [%s]\n", errorBuffer);
-
- return false;
- }
-
- code = curl_easy_setopt(conn, CURLOPT_WRITEDATA, &buffer);
- if (code != CURLE_OK)
- {
- fprintf(stderr, "Failed to set write data [%s]\n", errorBuffer);
-
- return false;
- }
-
- return true;
-}
-
-//
-// libxml start element callback function
-//
-
-static void StartElement(void *voidContext,
- const xmlChar *name,
- const xmlChar **attributes)
-{
- Context *context = (Context *)voidContext;
-
- if (COMPARE((char *)name, "TITLE"))
- {
- context->title = "";
- context->addTitle = true;
- }
- (void) attributes;
-}
-
-//
-// libxml end element callback function
-//
-
-static void EndElement(void *voidContext,
- const xmlChar *name)
-{
- Context *context = (Context *)voidContext;
-
- if (COMPARE((char *)name, "TITLE"))
- context->addTitle = false;
-}
-
-//
-// Text handling helper function
-//
-
-static void handleCharacters(Context *context,
- const xmlChar *chars,
- int length)
-{
- if (context->addTitle)
- context->title.append((char *)chars, length);
-}
-
-//
-// libxml PCDATA callback function
-//
-
-static void Characters(void *voidContext,
- const xmlChar *chars,
- int length)
-{
- Context *context = (Context *)voidContext;
-
- handleCharacters(context, chars, length);
-}
-
-//
-// libxml CDATA callback function
-//
-
-static void cdata(void *voidContext,
- const xmlChar *chars,
- int length)
-{
- Context *context = (Context *)voidContext;
-
- handleCharacters(context, chars, length);
-}
-
-//
-// libxml SAX callback structure
-//
-
-static htmlSAXHandler saxHandler =
-{
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- StartElement,
- EndElement,
- NULL,
- Characters,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- cdata,
- NULL
-};
-
-//
-// Parse given (assumed to be) HTML text and return the title
-//
-
-static void parseHtml(const std::string &html,
- std::string &title)
-{
- htmlParserCtxtPtr ctxt;
- Context context;
-
- ctxt = htmlCreatePushParserCtxt(&saxHandler, &context, "", 0, "",
- XML_CHAR_ENCODING_NONE);
-
- htmlParseChunk(ctxt, html.c_str(), html.size(), 0);
- htmlParseChunk(ctxt, "", 0, 1);
-
- htmlFreeParserCtxt(ctxt);
-
- title = context.title;
-}
-
-int main(int argc, char *argv[])
-{
- CURL *conn = NULL;
- CURLcode code;
- std::string title;
-
- // Ensure one argument is given
-
- if (argc != 2)
- {
- fprintf(stderr, "Usage: %s <url>\n", argv[0]);
-
- exit(EXIT_FAILURE);
- }
-
- curl_global_init(CURL_GLOBAL_DEFAULT);
-
- // Initialize CURL connection
-
- if (!init(conn, argv[1]))
- {
- fprintf(stderr, "Connection initializion failed\n");
-
- exit(EXIT_FAILURE);
- }
-
- // Retrieve content for the URL
-
- code = curl_easy_perform(conn);
- curl_easy_cleanup(conn);
-
- if (code != CURLE_OK)
- {
- fprintf(stderr, "Failed to get '%s' [%s]\n", argv[1], errorBuffer);
-
- exit(EXIT_FAILURE);
- }
-
- // Parse the (assumed) HTML code
-
- parseHtml(buffer, title);
-
- // Display the extracted title
-
- printf("Title: %s\n", title.c_str());
-
- return EXIT_SUCCESS;
-}
diff --git a/docs/examples/htmltitle.cpp b/docs/examples/htmltitle.cpp
new file mode 100644
index 00000000..ab89bb6a
--- /dev/null
+++ b/docs/examples/htmltitle.cpp
@@ -0,0 +1,313 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+// Get a web page, parse it with libxml.
+//
+// Written by Lars Nilsson
+//
+// GNU C++ compile command line suggestion (edit paths accordingly):
+//
+// g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cpp \
+// -o htmltitle -L/opt/curl/lib -L/opt/libxml/lib -lcurl -lxml2
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <string>
+#include <curl/curl.h>
+#include <libxml/HTMLparser.h>
+
+//
+// Case-insensitive string comparison
+//
+
+#ifdef _MSC_VER
+#define COMPARE(a, b) (!stricmp((a), (b)))
+#else
+#define COMPARE(a, b) (!strcasecmp((a), (b)))
+#endif
+
+//
+// libxml callback context structure
+//
+
+struct Context
+{
+ Context(): addTitle(false) { }
+
+ bool addTitle;
+ std::string title;
+};
+
+//
+// libcurl variables for error strings and returned data
+
+static char errorBuffer[CURL_ERROR_SIZE];
+static std::string buffer;
+
+//
+// libcurl write callback function
+//
+
+static int writer(char *data, size_t size, size_t nmemb,
+ std::string *writerData)
+{
+ if (writerData == NULL)
+ return 0;
+
+ writerData->append(data, size*nmemb);
+
+ return size * nmemb;
+}
+
+//
+// libcurl connection initialization
+//
+
+static bool init(CURL *&conn, char *url)
+{
+ CURLcode code;
+
+ conn = curl_easy_init();
+
+ if (conn == NULL)
+ {
+ fprintf(stderr, "Failed to create CURL connection\n");
+
+ exit(EXIT_FAILURE);
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_ERRORBUFFER, errorBuffer);
+ if (code != CURLE_OK)
+ {
+ fprintf(stderr, "Failed to set error buffer [%d]\n", code);
+
+ return false;
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_URL, url);
+ if (code != CURLE_OK)
+ {
+ fprintf(stderr, "Failed to set URL [%s]\n", errorBuffer);
+
+ return false;
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_FOLLOWLOCATION, 1L);
+ if (code != CURLE_OK)
+ {
+ fprintf(stderr, "Failed to set redirect option [%s]\n", errorBuffer);
+
+ return false;
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_WRITEFUNCTION, writer);
+ if (code != CURLE_OK)
+ {
+ fprintf(stderr, "Failed to set writer [%s]\n", errorBuffer);
+
+ return false;
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_WRITEDATA, &buffer);
+ if (code != CURLE_OK)
+ {
+ fprintf(stderr, "Failed to set write data [%s]\n", errorBuffer);
+
+ return false;
+ }
+
+ return true;
+}
+
+//
+// libxml start element callback function
+//
+
+static void StartElement(void *voidContext,
+ const xmlChar *name,
+ const xmlChar **attributes)
+{
+ Context *context = (Context *)voidContext;
+
+ if (COMPARE((char *)name, "TITLE"))
+ {
+ context->title = "";
+ context->addTitle = true;
+ }
+ (void) attributes;
+}
+
+//
+// libxml end element callback function
+//
+
+static void EndElement(void *voidContext,
+ const xmlChar *name)
+{
+ Context *context = (Context *)voidContext;
+
+ if (COMPARE((char *)name, "TITLE"))
+ context->addTitle = false;
+}
+
+//
+// Text handling helper function
+//
+
+static void handleCharacters(Context *context,
+ const xmlChar *chars,
+ int length)
+{
+ if (context->addTitle)
+ context->title.append((char *)chars, length);
+}
+
+//
+// libxml PCDATA callback function
+//
+
+static void Characters(void *voidContext,
+ const xmlChar *chars,
+ int length)
+{
+ Context *context = (Context *)voidContext;
+
+ handleCharacters(context, chars, length);
+}
+
+//
+// libxml CDATA callback function
+//
+
+static void cdata(void *voidContext,
+ const xmlChar *chars,
+ int length)
+{
+ Context *context = (Context *)voidContext;
+
+ handleCharacters(context, chars, length);
+}
+
+//
+// libxml SAX callback structure
+//
+
+static htmlSAXHandler saxHandler =
+{
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ StartElement,
+ EndElement,
+ NULL,
+ Characters,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ cdata,
+ NULL
+};
+
+//
+// Parse given (assumed to be) HTML text and return the title
+//
+
+static void parseHtml(const std::string &html,
+ std::string &title)
+{
+ htmlParserCtxtPtr ctxt;
+ Context context;
+
+ ctxt = htmlCreatePushParserCtxt(&saxHandler, &context, "", 0, "",
+ XML_CHAR_ENCODING_NONE);
+
+ htmlParseChunk(ctxt, html.c_str(), html.size(), 0);
+ htmlParseChunk(ctxt, "", 0, 1);
+
+ htmlFreeParserCtxt(ctxt);
+
+ title = context.title;
+}
+
+int main(int argc, char *argv[])
+{
+ CURL *conn = NULL;
+ CURLcode code;
+ std::string title;
+
+ // Ensure one argument is given
+
+ if (argc != 2)
+ {
+ fprintf(stderr, "Usage: %s <url>\n", argv[0]);
+
+ exit(EXIT_FAILURE);
+ }
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ // Initialize CURL connection
+
+ if (!init(conn, argv[1]))
+ {
+ fprintf(stderr, "Connection initializion failed\n");
+
+ exit(EXIT_FAILURE);
+ }
+
+ // Retrieve content for the URL
+
+ code = curl_easy_perform(conn);
+ curl_easy_cleanup(conn);
+
+ if (code != CURLE_OK)
+ {
+ fprintf(stderr, "Failed to get '%s' [%s]\n", argv[1], errorBuffer);
+
+ exit(EXIT_FAILURE);
+ }
+
+ // Parse the (assumed) HTML code
+
+ parseHtml(buffer, title);
+
+ // Display the extracted title
+
+ printf("Title: %s\n", title.c_str());
+
+ return EXIT_SUCCESS;
+}
diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c
index 523177d2..f1975b1e 100644
--- a/docs/examples/http-post.c
+++ b/docs/examples/http-post.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
@@ -15,6 +27,10 @@ int main(void)
CURL *curl;
CURLcode res;
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* get a curl handle */
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. This URL can
@@ -26,9 +42,14 @@ int main(void)
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
+ curl_global_cleanup();
return 0;
}
diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c
new file mode 100644
index 00000000..3b7ca81d
--- /dev/null
+++ b/docs/examples/http2-download.c
@@ -0,0 +1,288 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <stdlib.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+#ifndef CURLPIPE_MULTIPLEX
+/* This little trick will just make sure that we don't enable pipelining for
+ libcurls old enough to not have this symbol. It is _not_ defined to zero in
+ a recent libcurl header. */
+#define CURLPIPE_MULTIPLEX 0
+#endif
+
+#define NUM_HANDLES 1000
+
+void *curl_hnd[NUM_HANDLES];
+int num_transfers;
+
+/* a handle to number lookup, highly ineffective when we do many
+ transfers... */
+static int hnd2num(CURL *hnd)
+{
+ int i;
+ for(i=0; i< num_transfers; i++) {
+ if(curl_hnd[i] == hnd)
+ return i;
+ }
+ return 0; /* weird, but just a fail-safe */
+}
+
+static
+void dump(const char *text, int num, unsigned char *ptr, size_t size,
+ char nohex)
+{
+ size_t i;
+ size_t c;
+
+ unsigned int width=0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
+ num, text, (long)size, (long)size);
+
+ for(i=0; i<size; i+= width) {
+
+ fprintf(stderr, "%4.4lx: ", (long)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i+c < size)
+ fprintf(stderr, "%02x ", ptr[i+c]);
+ else
+ fputs(" ", stderr);
+ }
+
+ for(c = 0; (c < width) && (i+c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
+ i+=(c+2-width);
+ break;
+ }
+ fprintf(stderr, "%c",
+ (ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
+ i+=(c+3-width);
+ break;
+ }
+ }
+ fputc('\n', stderr); /* newline */
+ }
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
+{
+ const char *text;
+ int num = hnd2num(handle);
+ (void)handle; /* prevent compiler warning */
+ (void)userp;
+ switch (type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "== %d Info: %s", num, 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, num, (unsigned char *)data, size, 1);
+ return 0;
+}
+
+static void setup(CURL *hnd, int num)
+{
+ FILE *out;
+ char filename[128];
+
+ sprintf(filename, "dl-%d", num);
+
+ out = fopen(filename, "wb");
+
+ /* write to this file */
+ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
+
+ /* set the same URL */
+ curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
+
+ /* send it verbose for max debuggaility */
+ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
+
+ /* HTTP/2 please */
+ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+
+ /* we use a self-signed test server, skip verification during debugging */
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
+
+#if (CURLPIPE_MULTIPLEX > 0)
+ /* wait for pipe connection to confirm */
+ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
+#endif
+
+ curl_hnd[num] = hnd;
+}
+
+/*
+ * Simply download two files over HTTP/2, using the same physical connection!
+ */
+int main(int argc, char **argv)
+{
+ CURL *easy[NUM_HANDLES];
+ CURLM *multi_handle;
+ int i;
+ int still_running; /* keep number of running handles */
+
+ if(argc > 1)
+ /* if given a number, do that many transfers */
+ num_transfers = atoi(argv[1]);
+
+ if(!num_transfers || (num_transfers > NUM_HANDLES))
+ num_transfers = 3; /* a suitable low default */
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ for(i=0; i<num_transfers; i++) {
+ easy[i] = curl_easy_init();
+ /* set options */
+ setup(easy[i], i);
+
+ /* add the individual transfer */
+ curl_multi_add_handle(multi_handle, easy[i]);
+ }
+
+ curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+
+ /* we start some action by calling perform right away */
+ curl_multi_perform(multi_handle, &still_running);
+
+ do {
+ struct timeval timeout;
+ int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+
+ long curl_timeo = -1;
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* set a suitable timeout to play around with */
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(multi_handle, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
+
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
+
+ switch(rc) {
+ case -1:
+ /* select error */
+ break;
+ case 0:
+ default:
+ /* timeout or readable/writable sockets */
+ curl_multi_perform(multi_handle, &still_running);
+ break;
+ }
+ } while(still_running);
+
+ curl_multi_cleanup(multi_handle);
+
+ for(i=0; i<num_transfers; i++)
+ curl_easy_cleanup(easy[i]);
+
+ return 0;
+}
diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c
new file mode 100644
index 00000000..bca16c0d
--- /dev/null
+++ b/docs/examples/http2-upload.c
@@ -0,0 +1,352 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+#ifndef CURLPIPE_MULTIPLEX
+/* This little trick will just make sure that we don't enable pipelining for
+ libcurls old enough to not have this symbol. It is _not_ defined to zero in
+ a recent libcurl header. */
+#define CURLPIPE_MULTIPLEX 0
+#endif
+
+#define NUM_HANDLES 1000
+
+void *curl_hnd[NUM_HANDLES];
+int num_transfers;
+
+/* a handle to number lookup, highly ineffective when we do many
+ transfers... */
+static int hnd2num(CURL *hnd)
+{
+ int i;
+ for(i=0; i< num_transfers; i++) {
+ if(curl_hnd[i] == hnd)
+ return i;
+ }
+ return 0; /* weird, but just a fail-safe */
+}
+
+static
+void dump(const char *text, int num, unsigned char *ptr, size_t size,
+ char nohex)
+{
+ size_t i;
+ size_t c;
+ unsigned int width=0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
+ num, text, (long)size, (long)size);
+
+ for(i=0; i<size; i+= width) {
+
+ fprintf(stderr, "%4.4lx: ", (long)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i+c < size)
+ fprintf(stderr, "%02x ", ptr[i+c]);
+ else
+ fputs(" ", stderr);
+ }
+
+ for(c = 0; (c < width) && (i+c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
+ i+=(c+2-width);
+ break;
+ }
+ fprintf(stderr, "%c",
+ (ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
+ i+=(c+3-width);
+ break;
+ }
+ }
+ fputc('\n', stderr); /* newline */
+ }
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
+{
+ char timebuf[20];
+ const char *text;
+ int num = hnd2num(handle);
+ static time_t epoch_offset;
+ static int known_offset;
+ struct timeval tv;
+ time_t secs;
+ struct tm *now;
+
+ (void)handle; /* prevent compiler warning */
+ (void)userp;
+
+ gettimeofday(&tv, NULL);
+ if(!known_offset) {
+ epoch_offset = time(NULL) - tv.tv_sec;
+ known_offset = 1;
+ }
+ secs = epoch_offset + tv.tv_sec;
+ now = localtime(&secs); /* not thread safe but we don't care */
+ snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld",
+ now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
+
+ switch (type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "%s [%d] Info: %s", timebuf, num, 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, num, (unsigned char *)data, size, 1);
+ return 0;
+}
+
+struct input {
+ FILE *in;
+ size_t bytes_read; /* count up */
+ CURL *hnd;
+};
+
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct input *i = userp;
+ size_t retcode = fread(ptr, size, nmemb, i->in);
+ i->bytes_read += retcode;
+ return retcode;
+}
+
+struct input indata[NUM_HANDLES];
+
+static void setup(CURL *hnd, int num, const char *upload)
+{
+ FILE *out;
+ char url[256];
+ char filename[128];
+ struct stat file_info;
+ curl_off_t uploadsize;
+
+ sprintf(filename, "dl-%d", num);
+ out = fopen(filename, "wb");
+
+ sprintf(url, "https://localhost:8443/upload-%d", num);
+
+ /* get the file size of the local file */
+ stat(upload, &file_info);
+ uploadsize = file_info.st_size;
+
+ indata[num].in = fopen(upload, "rb");
+ indata[num].hnd = hnd;
+
+ /* write to this file */
+ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
+
+ /* we want to use our own read function */
+ curl_easy_setopt(hnd, CURLOPT_READFUNCTION, read_callback);
+ /* read from this file */
+ curl_easy_setopt(hnd, CURLOPT_READDATA, &indata[num]);
+ /* provide the size of the upload */
+ curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, uploadsize);
+
+ /* send in the URL to store the upload as */
+ curl_easy_setopt(hnd, CURLOPT_URL, url);
+
+ /* upload please */
+ curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
+
+ /* send it verbose for max debuggaility */
+ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
+
+ /* HTTP/2 please */
+ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+
+ /* we use a self-signed test server, skip verification during debugging */
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
+
+#if (CURLPIPE_MULTIPLEX > 0)
+ /* wait for pipe connection to confirm */
+ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
+#endif
+
+ curl_hnd[num] = hnd;
+}
+
+/*
+ * Upload all files over HTTP/2, using the same physical connection!
+ */
+int main(int argc, char **argv)
+{
+ CURL *easy[NUM_HANDLES];
+ CURLM *multi_handle;
+ int i;
+ int still_running; /* keep number of running handles */
+ const char *filename = "index.html";
+
+ if(argc > 1)
+ /* if given a number, do that many transfers */
+ num_transfers = atoi(argv[1]);
+
+ if(argc > 2)
+ /* if given a file name, upload this! */
+ filename = argv[2];
+
+ if(!num_transfers || (num_transfers > NUM_HANDLES))
+ num_transfers = 3; /* a suitable low default */
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ for(i=0; i<num_transfers; i++) {
+ easy[i] = curl_easy_init();
+ /* set options */
+ setup(easy[i], i, filename);
+
+ /* add the individual transfer */
+ curl_multi_add_handle(multi_handle, easy[i]);
+ }
+
+ curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+
+ /* We do HTTP/2 so let's stick to one connection per host */
+ curl_multi_setopt(multi_handle, CURLMOPT_MAX_HOST_CONNECTIONS, 1L);
+
+ /* we start some action by calling perform right away */
+ curl_multi_perform(multi_handle, &still_running);
+
+ do {
+ struct timeval timeout;
+ int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+
+ long curl_timeo = -1;
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* set a suitable timeout to play around with */
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(multi_handle, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
+
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
+
+ switch(rc) {
+ case -1:
+ /* select error */
+ break;
+ case 0:
+ default:
+ /* timeout or readable/writable sockets */
+ curl_multi_perform(multi_handle, &still_running);
+ break;
+ }
+ } while(still_running);
+
+ curl_multi_cleanup(multi_handle);
+
+ for(i=0; i<num_transfers; i++)
+ curl_easy_cleanup(easy[i]);
+
+ return 0;
+}
diff --git a/docs/examples/httpcustomheader.c b/docs/examples/httpcustomheader.c
index 599b84fe..8542ead5 100644
--- a/docs/examples/httpcustomheader.c
+++ b/docs/examples/httpcustomheader.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
@@ -19,20 +31,36 @@ int main(void)
if(curl) {
struct curl_slist *chunk = NULL;
- chunk = curl_slist_append(chunk, "Accept: moo");
+ /* Remove a header curl would otherwise add by itself */
+ chunk = curl_slist_append(chunk, "Accept:");
+
+ /* Add a custom header */
chunk = curl_slist_append(chunk, "Another: yes");
- /* request with the built-in Accept: */
+ /* 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);
+
curl_easy_setopt(curl, CURLOPT_URL, "localhost");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- res = curl_easy_perform(curl);
- /* 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)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
+
+ /* free the custom headers */
+ curl_slist_free_all(chunk);
}
return 0;
}
diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c
index 821e95fd..2e9dc217 100644
--- a/docs/examples/httpput.c
+++ b/docs/examples/httpput.c
@@ -1,17 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
-#include <unistd.h>
-
#include <curl/curl.h>
/*
@@ -27,13 +37,17 @@
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t retcode;
+ curl_off_t nread;
/* in real-world cases, this would probably get this data differently
as this fread() stuff is exactly what the library already would do
by default internally */
retcode = fread(ptr, size, nmemb, stream);
- fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+ nread = (curl_off_t)retcode;
+
+ fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+ " bytes from file\n", nread);
return retcode;
}
@@ -43,7 +57,6 @@ int main(int argc, char **argv)
CURL *curl;
CURLcode res;
FILE * hd_src ;
- int hd ;
struct stat file_info;
char *file;
@@ -56,9 +69,7 @@ int main(int argc, char **argv)
url = argv[2];
/* get the file size of the local file */
- hd = open(file, O_RDONLY) ;
- fstat(hd, &file_info);
- close(hd) ;
+ stat(file, &file_info);
/* get a FILE * of the same file, could also be made with
fdopen() from the previous descriptor, but hey this is just
@@ -94,6 +105,10 @@ int main(int argc, char **argv)
/* Now run off and do what you've been told! */
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);
diff --git a/docs/examples/https.c b/docs/examples/https.c
index 10b5c657..bd9a33ba 100644
--- a/docs/examples/https.c
+++ b/docs/examples/https.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
@@ -15,6 +27,8 @@ int main(void)
CURL *curl;
CURLcode res;
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
@@ -33,7 +47,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
#endif
-#ifdef SKIP_HOSTNAME_VERFICATION
+#ifdef SKIP_HOSTNAME_VERIFICATION
/*
* If the site you're connecting to uses a different host name that what
* they have mentioned in their server certificate's commonName (or
@@ -43,10 +57,18 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
#endif
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
+
+ curl_global_cleanup();
+
return 0;
}
diff --git a/docs/examples/imap-append.c b/docs/examples/imap-append.c
new file mode 100644
index 00000000..fa531a8c
--- /dev/null
+++ b/docs/examples/imap-append.c
@@ -0,0 +1,116 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+#define FROM "<sender@example.org>"
+#define TO "<addressee@example.net>"
+#define CC "<info@example.org>"
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\r\n",
+ "Subject: IMAP example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(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 main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will create a new message 100. Note that you should perform an
+ * EXAMINE command to obtain the UID of the next message to create and a
+ * SELECT to ensure you are creating the message in the OUTBOX. */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/100");
+
+ /* In this case, we're using a callback function to specify the data. You
+ * could just use the CURLOPT_READDATA option to specify a FILE pointer to
+ * read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Perform the append */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-copy.c b/docs/examples/imap-copy.c
new file mode 100644
index 00000000..fe2d91c1
--- /dev/null
+++ b/docs/examples/imap-copy.c
@@ -0,0 +1,65 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to copy a mail from one mailbox folder
+ * to another using libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is source mailbox folder to select */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");
+
+ /* Set the COPY command specifing the message ID and destination folder */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "COPY 1 FOLDER");
+
+ /* Note that to perform a move operation you will need to perform the copy,
+ * then mark the original mail as Deleted and EXPUNGE or CLOSE. Please see
+ * imap-store.c for more information on deleting messages. */
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-create.c b/docs/examples/imap-create.c
new file mode 100644
index 00000000..65ddede6
--- /dev/null
+++ b/docs/examples/imap-create.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to create a new mailbox folder using
+ * libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the CREATE command specifing the new folder name */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "CREATE FOLDER");
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-delete.c b/docs/examples/imap-delete.c
new file mode 100644
index 00000000..5113be9a
--- /dev/null
+++ b/docs/examples/imap-delete.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to delete an existing mailbox folder
+ * using libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the DELETE command specifing the existing folder */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE FOLDER");
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-examine.c b/docs/examples/imap-examine.c
new file mode 100644
index 00000000..a7b41c58
--- /dev/null
+++ b/docs/examples/imap-examine.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to obtain information about a mailbox
+ * folder using libcurl's IMAP capabilities via the EXAMINE command.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the EXAMINE command specifing the mailbox folder */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXAMINE OUTBOX");
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-fetch.c b/docs/examples/imap-fetch.c
new file mode 100644
index 00000000..831d0dcf
--- /dev/null
+++ b/docs/examples/imap-fetch.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1");
+
+ /* Perform the fetch */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-list.c b/docs/examples/imap-list.c
new file mode 100644
index 00000000..4223052e
--- /dev/null
+++ b/docs/examples/imap-list.c
@@ -0,0 +1,60 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to list the folders within an IMAP
+ * mailbox.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will list the folders within the user's mailbox. If you want to
+ * list the folders within a specific folder, for example the inbox, then
+ * specify the folder as a path in the URL such as /INBOX */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Perform the list */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-lsub.c b/docs/examples/imap-lsub.c
new file mode 100644
index 00000000..8960b62b
--- /dev/null
+++ b/docs/examples/imap-lsub.c
@@ -0,0 +1,62 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to list the subscribed folders within
+ * an IMAP mailbox.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the LSUB command. Note the syntax is very similar to that of a LIST
+ command. */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "LSUB \"\" *");
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-multi.c b/docs/examples/imap-multi.c
new file mode 100644
index 00000000..c7dc1307
--- /dev/null
+++ b/docs/examples/imap-multi.c
@@ -0,0 +1,167 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities. It builds on the imap-fetch.c example to demonstrate how to
+ * use libcurl's multi interface.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+
+static struct timeval tvnow(void)
+{
+ struct timeval now;
+
+ /* time() returns the value of time in seconds since the epoch */
+ now.tv_sec = (long)time(NULL);
+ now.tv_usec = 0;
+
+ return now;
+}
+
+static long tvdiff(struct timeval newer, struct timeval older)
+{
+ return (newer.tv_sec - older.tv_sec) * 1000 +
+ (newer.tv_usec - older.tv_usec) / 1000;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLM *mcurl;
+ int still_running = 1;
+ struct timeval mp_start;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(!curl)
+ return 1;
+
+ mcurl = curl_multi_init();
+ if(!mcurl)
+ return 2;
+
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1");
+
+ /* Tell the multi stack about our easy handle */
+ curl_multi_add_handle(mcurl, curl);
+
+ /* Record the start time which we can use later */
+ mp_start = tvnow();
+
+ /* We start some action by calling perform right away */
+ curl_multi_perform(mcurl, &still_running);
+
+ while(still_running) {
+ struct timeval timeout;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+ int rc;
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ long curl_timeo = -1;
+
+ /* Initialise the file descriptors */
+ 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(mcurl, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(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);
+ }
+
+ if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
+ fprintf(stderr,
+ "ABORTING: Since it seems that we would have run forever.\n");
+ break;
+ }
+
+ switch(rc) {
+ case -1: /* select error */
+ break;
+ case 0: /* timeout */
+ default: /* action */
+ curl_multi_perform(mcurl, &still_running);
+ break;
+ }
+ }
+
+ /* Always cleanup */
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/imap-noop.c b/docs/examples/imap-noop.c
new file mode 100644
index 00000000..71a55728
--- /dev/null
+++ b/docs/examples/imap-noop.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to perform a noop using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the NOOP command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOOP");
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-search.c b/docs/examples/imap-search.c
new file mode 100644
index 00000000..0c1d2673
--- /dev/null
+++ b/docs/examples/imap-search.c
@@ -0,0 +1,65 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to search for new messages using
+ * libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is mailbox folder to select */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");
+
+ /* Set the SEARCH command specifing what we want to search for. Note that
+ * this can contain a message sequence set and a number of search criteria
+ * keywords including flags such as ANSWERED, DELETED, DRAFT, FLAGGED, NEW,
+ * RECENT and SEEN. For more information about the search criteria please
+ * see RFC-3501 section 6.4.4. */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "SEARCH NEW");
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-ssl.c b/docs/examples/imap-ssl.c
new file mode 100644
index 00000000..eec9b0e3
--- /dev/null
+++ b/docs/examples/imap-ssl.c
@@ -0,0 +1,85 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities. It builds on the imap-fetch.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox. Note the use of
+ * imaps:// rather than imap:// to request a SSL based connection. */
+ curl_easy_setopt(curl, CURLOPT_URL, "imaps://imap.example.com/INBOX/;UID=1");
+
+ /* If you want to connect to a site who isn't using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you. */
+#ifdef SKIP_PEER_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+ /* If the site you're connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure. */
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the fetch */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-store.c b/docs/examples/imap-store.c
new file mode 100644
index 00000000..8f5e7d5b
--- /dev/null
+++ b/docs/examples/imap-store.c
@@ -0,0 +1,76 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to modify an existing mail using
+ * libcurl's IMAP capabilities with the STORE command.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is the mailbox folder to select */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");
+
+ /* Set the STORE command with the Deleted flag for message 1. Note that
+ * you can use the STORE command to set other flags such as Seen, Answered,
+ * Flagged, Draft and Recent. */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STORE 1 +Flags \\Deleted");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ else {
+ /* Set the EXPUNGE command, although you can use the CLOSE command if you
+ * don't want to know the result of the STORE */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPUNGE");
+
+ /* Perform the second custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/imap-tls.c b/docs/examples/imap-tls.c
new file mode 100644
index 00000000..c439864b
--- /dev/null
+++ b/docs/examples/imap-tls.c
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities. It builds on the imap-fetch.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1");
+
+ /* In this example, we'll start with a plain text connection, and upgrade
+ * to Transport Layer Security (TLS) using the STARTTLS command. Be careful
+ * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+ * will continue anyway - see the security discussion in the libcurl
+ * tutorial for more details. */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* If your server doesn't have a valid certificate, then you can disable
+ * part of the Transport Layer Security protection by setting the
+ * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ * That is, in general, a bad idea. It is still better than sending your
+ * authentication details in plain text though.
+ * Instead, you should get the issuer certificate (or the host certificate
+ * if the certificate is self-signed) and add it to the set of certificates
+ * that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
+ * docs/SSLCERTS for more information. */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the fetch */
+ 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 (int)res;
+}
diff --git a/docs/examples/makefile.dj b/docs/examples/makefile.dj
index 8736e6e7..c18ef8a7 100644
--- a/docs/examples/makefile.dj
+++ b/docs/examples/makefile.dj
@@ -1,6 +1,27 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
#
# Adapted for djgpp / Watt-32 / DOS by
-# Gisle Vanem <giva@bgnett.no>
+# Gisle Vanem <gvanem@broadpark.no>
#
TOPDIR = ../..
diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c
index 09b91b72..b8258975 100644
--- a/docs/examples/multi-app.c
+++ b/docs/examples/multi-app.c
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * This is an example application source code using the multi interface.
- */
+ * 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 is an example application source code using the multi interface. */
#include <stdio.h>
#include <string.h>
@@ -27,7 +39,7 @@
#define HTTP_HANDLE 0 /* Index for the HTTP transfer */
#define FTP_HANDLE 1 /* Index for the FTP transfer */
-int main(int argc, char **argv)
+int main(void)
{
CURL *handles[HANDLECOUNT];
CURLM *multi_handle;
@@ -58,9 +70,10 @@ int main(int argc, char **argv)
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
+ do {
struct timeval timeout;
int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
@@ -87,30 +100,46 @@ int main(int argc, char **argv)
}
/* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
- /* 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. */
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
switch(rc) {
case -1:
/* select error */
break;
- case 0:
- /* timeout, do something else */
- break;
- default:
- /* one or more of curl's file descriptors say there's data to read
- or write */
+ case 0: /* timeout */
+ default: /* action */
curl_multi_perform(multi_handle, &still_running);
break;
}
- }
+ } while(still_running);
/* See how the transfers went */
while ((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c
index 529c3d9b..5fb86bea 100644
--- a/docs/examples/multi-debugcallback.c
+++ b/docs/examples/multi-debugcallback.c
@@ -1,14 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * This is a very simple example using the multi interface and the debug
- * callback.
- */
+ * 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 is an example showing the multi interface and the debug callback. */
#include <stdio.h>
#include <string.h>
@@ -37,12 +48,12 @@ void dump(const char *text,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
+ fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
- fprintf(stream, "%04.4lx: ", (long)i);
+ fprintf(stream, "%4.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
@@ -79,6 +90,7 @@ int my_trace(CURL *handle, curl_infotype type,
{
const char *text;
+ (void)userp;
(void)handle; /* prevent compiler warning */
switch (type) {
@@ -108,7 +120,7 @@ int my_trace(CURL *handle, curl_infotype type,
/*
* Simply download a HTTP file.
*/
-int main(int argc, char **argv)
+int main(void)
{
CURL *http_handle;
CURLM *multi_handle;
@@ -132,9 +144,10 @@ int main(int argc, char **argv)
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
+ do {
struct timeval timeout;
int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
@@ -161,15 +174,35 @@ int main(int argc, char **argv)
}
/* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
- /* 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. */
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
switch(rc) {
case -1:
@@ -183,7 +216,7 @@ int main(int argc, char **argv)
curl_multi_perform(multi_handle, &still_running);
break;
}
- }
+ } while(still_running);
curl_multi_cleanup(multi_handle);
diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c
index 3ea106bf..0d8d0de4 100644
--- a/docs/examples/multi-double.c
+++ b/docs/examples/multi-double.c
@@ -1,14 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * This is a very simple example using the multi interface.
- */
-
+ * 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 <stdio.h>
#include <string.h>
@@ -22,7 +32,7 @@
/*
* Simply download two HTTP files!
*/
-int main(int argc, char **argv)
+int main(void)
{
CURL *http_handle;
CURL *http_handle2;
@@ -49,9 +59,10 @@ int main(int argc, char **argv)
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
+ do {
struct timeval timeout;
int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
@@ -78,15 +89,35 @@ int main(int argc, char **argv)
}
/* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
- /* 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. */
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
switch(rc) {
case -1:
@@ -98,7 +129,7 @@ int main(int argc, char **argv)
curl_multi_perform(multi_handle, &still_running);
break;
}
- }
+ } while(still_running);
curl_multi_cleanup(multi_handle);
diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c
index d2daf70a..5bfdcfd1 100644
--- a/docs/examples/multi-post.c
+++ b/docs/examples/multi-post.c
@@ -1,21 +1,33 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * This is an example application source code using the multi interface
- * to do a multipart formpost without "blocking".
- */
+ * 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 is an example application source code using the multi interface
+ * to do a multipart formpost without "blocking". */
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <curl/curl.h>
-int main(int argc, char *argv[])
+int main(void)
{
CURL *curl;
@@ -52,7 +64,7 @@ int main(int argc, char *argv[])
curl = curl_easy_init();
multi_handle = curl_multi_init();
- /* initalize custom header list (stating that Expect: 100-continue is not
+ /* initialize custom header list (stating that Expect: 100-continue is not
wanted */
headerlist = curl_slist_append(headerlist, buf);
if(curl && multi_handle) {
@@ -68,9 +80,10 @@ int main(int argc, char *argv[])
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
+ do {
struct timeval timeout;
int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
@@ -97,22 +110,41 @@ int main(int argc, char *argv[])
}
/* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
- /* 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. */
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
switch(rc) {
case -1:
/* select error */
break;
case 0:
- printf("timeout!\n");
default:
/* timeout or readable/writable sockets */
printf("perform!\n");
@@ -120,7 +152,7 @@ int main(int argc, char *argv[])
printf("running: %d!\n", still_running);
break;
}
- }
+ } while(still_running);
curl_multi_cleanup(multi_handle);
diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c
index f248afe7..a43a9f52 100644
--- a/docs/examples/multi-single.c
+++ b/docs/examples/multi-single.c
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * This is a very simple example using the multi interface.
- */
+ * 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 is a very simple example using the multi interface. */
#include <stdio.h>
#include <string.h>
@@ -19,15 +31,27 @@
/* curl stuff */
#include <curl/curl.h>
+#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.
*/
-int main(int argc, char **argv)
+int main(void)
{
CURL *http_handle;
CURLM *multi_handle;
int still_running; /* keep number of running handles */
+ int repeats = 0;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
http_handle = curl_easy_init();
@@ -43,62 +67,43 @@ int main(int argc, char **argv)
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
- struct timeval timeout;
- int rc; /* select() return code */
+ do {
+ CURLMcode mc; /* curl_multi_wait() return code */
+ int numfds;
- fd_set fdread;
- fd_set fdwrite;
- fd_set fdexcep;
- int maxfd = -1;
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_wait(multi_handle, NULL, 0, 1000, &numfds);
- long curl_timeo = -1;
-
- FD_ZERO(&fdread);
- FD_ZERO(&fdwrite);
- FD_ZERO(&fdexcep);
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- /* set a suitable timeout to play around with */
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
+ /* 'numfds' being zero means either a timeout or no file descriptors to
+ wait for. Try timeout on first occurrence, then assume no file
+ descriptors and no file descriptors to wait for means wait for 100
+ milliseconds. */
- 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;
+ if(!numfds) {
+ repeats++; /* count number of repeated zero numfds */
+ if(repeats > 1) {
+ WAITMS(100); /* sleep 100 milliseconds */
+ }
}
+ else
+ repeats = 0;
- /* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
- /* 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. */
+ curl_multi_perform(multi_handle, &still_running);
+ } while(still_running);
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ curl_multi_remove_handle(multi_handle, http_handle);
- 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;
- }
- }
+ curl_easy_cleanup(http_handle);
curl_multi_cleanup(multi_handle);
- curl_easy_cleanup(http_handle);
+ curl_global_cleanup();
return 0;
}
diff --git a/docs/examples/multi-uv.c b/docs/examples/multi-uv.c
new file mode 100644
index 00000000..0c0f8a2b
--- /dev/null
+++ b/docs/examples/multi-uv.c
@@ -0,0 +1,230 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/* Example application code using the multi socket interface to download
+ multiple files at once, but instead of using curl_multi_perform and
+ curl_multi_wait, which uses select(), we use libuv.
+ It supports epoll, kqueue, etc. on unixes and fast IO completion ports on
+ Windows, which means, it should be very fast on all platforms..
+
+ Written by Clemens Gruber, based on an outdated example from uvbook and
+ some tests from libuv.
+
+ Requires libuv and (of course) libcurl.
+
+ See http://nikhilm.github.com/uvbook/ for more information on libuv.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <uv.h>
+#include <curl/curl.h>
+
+uv_loop_t *loop;
+CURLM *curl_handle;
+uv_timer_t timeout;
+
+typedef struct curl_context_s {
+ uv_poll_t poll_handle;
+ curl_socket_t sockfd;
+} curl_context_t;
+
+curl_context_t* create_curl_context(curl_socket_t sockfd)
+{
+ curl_context_t *context;
+
+ context = (curl_context_t *) malloc(sizeof *context);
+
+ context->sockfd = sockfd;
+
+ uv_poll_init_socket(loop, &context->poll_handle, sockfd);
+ context->poll_handle.data = context;
+
+ return context;
+}
+
+void curl_close_cb(uv_handle_t *handle)
+{
+ 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);
+}
+
+
+void add_download(const char *url, int num)
+{
+ char filename[50];
+ FILE *file;
+ CURL *handle;
+
+ sprintf(filename, "%d.download", num);
+
+ file = fopen(filename, "w");
+ if(!file) {
+ 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;
+ int flags = 0;
+ curl_context_t *context;
+ char *done_url;
+ CURLMsg *message;
+ int pending;
+
+ uv_timer_stop(&timeout);
+
+ if(events & UV_READABLE)
+ flags |= CURL_CSELECT_IN;
+ if(events & UV_WRITABLE)
+ flags |= CURL_CSELECT_OUT;
+
+ context = (curl_context_t *) req;
+
+ curl_multi_socket_action(curl_handle, context->sockfd, flags,
+ &running_handles);
+
+ check_multi_info();
+}
+
+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)
+ 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);
+}
+
+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;
+ }
+ else {
+ curl_context = create_curl_context(s);
+ }
+ curl_multi_assign(curl_handle, s, (void *) curl_context);
+ }
+
+ switch(action) {
+ case CURL_POLL_IN:
+ uv_poll_start(&curl_context->poll_handle, UV_READABLE, curl_perform);
+ break;
+ case CURL_POLL_OUT:
+ uv_poll_start(&curl_context->poll_handle, UV_WRITABLE, curl_perform);
+ break;
+ case CURL_POLL_REMOVE:
+ 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);
+ }
+ break;
+ default:
+ abort();
+ }
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ loop = uv_default_loop();
+
+ if(argc <= 1)
+ return 0;
+
+ if(curl_global_init(CURL_GLOBAL_ALL)) {
+ fprintf(stderr, "Could not init cURL\n");
+ return 1;
+ }
+
+ uv_timer_init(loop, &timeout);
+
+ curl_handle = curl_multi_init();
+ curl_multi_setopt(curl_handle, CURLMOPT_SOCKETFUNCTION, handle_socket);
+ curl_multi_setopt(curl_handle, CURLMOPT_TIMERFUNCTION, start_timeout);
+
+ 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/multithread.c b/docs/examples/multithread.c
index 5f59a99d..831a0746 100644
--- a/docs/examples/multithread.c
+++ b/docs/examples/multithread.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
/* A multi-threaded example that uses pthreads extensively to fetch
* X remote files at once */
diff --git a/docs/examples/opensslthreadlock.c b/docs/examples/opensslthreadlock.c
index 706e9012..ad54f08e 100644
--- a/docs/examples/opensslthreadlock.c
+++ b/docs/examples/opensslthreadlock.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Example source code to show one way to set the necessary OpenSSL locking
+ * 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.
+ *
+ ***************************************************************************/
+/* Example source code to show one way to set the necessary OpenSSL locking
* callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
* libcurl built to use OpenSSL.
*
diff --git a/docs/examples/persistant.c b/docs/examples/persistant.c
index 177ada35..0917dfdb 100644
--- a/docs/examples/persistant.c
+++ b/docs/examples/persistant.c
@@ -1,17 +1,29 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <unistd.h>
#include <curl/curl.h>
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl;
CURLcode res;
@@ -25,12 +37,24 @@ int main(int argc, char **argv)
/* get the first document */
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
+
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* get another document from the same server using the same
connection */
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/docs/");
+
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/pop3-dele.c b/docs/examples/pop3-dele.c
new file mode 100644
index 00000000..fab598f0
--- /dev/null
+++ b/docs/examples/pop3-dele.c
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to delete an existing mail using
+ * libcurl's POP3 capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* You can specify the message either in the URL or DELE command */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Set the DELE command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELE");
+
+ /* Do not perform a transfer as DELE returns no data */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/pop3-list.c b/docs/examples/pop3-list.c
new file mode 100644
index 00000000..aebcea6b
--- /dev/null
+++ b/docs/examples/pop3-list.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example using libcurl's POP3 capabilities to list the
+ * contents of a mailbox.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will list every message of the given mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Perform the list */
+ 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 (int)res;
+}
diff --git a/docs/examples/pop3-multi.c b/docs/examples/pop3-multi.c
new file mode 100644
index 00000000..6df09a26
--- /dev/null
+++ b/docs/examples/pop3-multi.c
@@ -0,0 +1,167 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities. It builds on the pop3-retr.c example to demonstrate how to use
+ * libcurl's multi interface.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+
+static struct timeval tvnow(void)
+{
+ struct timeval now;
+
+ /* time() returns the value of time in seconds since the epoch */
+ now.tv_sec = (long)time(NULL);
+ now.tv_usec = 0;
+
+ return now;
+}
+
+static long tvdiff(struct timeval newer, struct timeval older)
+{
+ return (newer.tv_sec - older.tv_sec) * 1000 +
+ (newer.tv_usec - older.tv_usec) / 1000;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLM *mcurl;
+ int still_running = 1;
+ struct timeval mp_start;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(!curl)
+ return 1;
+
+ mcurl = curl_multi_init();
+ if(!mcurl)
+ return 2;
+
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Tell the multi stack about our easy handle */
+ curl_multi_add_handle(mcurl, curl);
+
+ /* Record the start time which we can use later */
+ mp_start = tvnow();
+
+ /* We start some action by calling perform right away */
+ curl_multi_perform(mcurl, &still_running);
+
+ while(still_running) {
+ struct timeval timeout;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+ int rc;
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ long curl_timeo = -1;
+
+ /* Initialise the file descriptors */
+ 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(mcurl, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(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);
+ }
+
+ if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
+ fprintf(stderr,
+ "ABORTING: Since it seems that we would have run forever.\n");
+ break;
+ }
+
+ switch(rc) {
+ case -1: /* select error */
+ break;
+ case 0: /* timeout */
+ default: /* action */
+ curl_multi_perform(mcurl, &still_running);
+ break;
+ }
+ }
+
+ /* Always cleanup */
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/pop3-noop.c b/docs/examples/pop3-noop.c
new file mode 100644
index 00000000..4efe6715
--- /dev/null
+++ b/docs/examples/pop3-noop.c
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to perform a noop using libcurl's POP3
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the NOOP command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOOP");
+
+ /* Do not perform a transfer as NOOP returns no data */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/pop3-retr.c b/docs/examples/pop3-retr.c
new file mode 100644
index 00000000..b5113fa9
--- /dev/null
+++ b/docs/examples/pop3-retr.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Perform the retr */
+ 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 (int)res;
+}
diff --git a/docs/examples/pop3-ssl.c b/docs/examples/pop3-ssl.c
new file mode 100644
index 00000000..0bbec8d9
--- /dev/null
+++ b/docs/examples/pop3-ssl.c
@@ -0,0 +1,85 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities. It builds on the pop3-retr.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox. Note the use of
+ * pop3s:// rather than pop3:// to request a SSL based connection. */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3s://pop.example.com/1");
+
+ /* If you want to connect to a site who isn't using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you. */
+#ifdef SKIP_PEER_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+ /* If the site you're connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure. */
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the retr */
+ 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 (int)res;
+}
diff --git a/docs/examples/pop3-stat.c b/docs/examples/pop3-stat.c
new file mode 100644
index 00000000..7b318fc2
--- /dev/null
+++ b/docs/examples/pop3-stat.c
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to obtain message statistics using
+ * libcurl's POP3 capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the STAT command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STAT");
+
+ /* Do not perform a transfer as the data is in the response */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/pop3-tls.c b/docs/examples/pop3-tls.c
new file mode 100644
index 00000000..58278a1e
--- /dev/null
+++ b/docs/examples/pop3-tls.c
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities. It builds on the pop3-retr.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* In this example, we'll start with a plain text connection, and upgrade
+ * to Transport Layer Security (TLS) using the STLS command. Be careful of
+ * using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+ * will continue anyway - see the security discussion in the libcurl
+ * tutorial for more details. */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* If your server doesn't have a valid certificate, then you can disable
+ * part of the Transport Layer Security protection by setting the
+ * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ * That is, in general, a bad idea. It is still better than sending your
+ * authentication details in plain text though.
+ * Instead, you should get the issuer certificate (or the host certificate
+ * if the certificate is self-signed) and add it to the set of certificates
+ * that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
+ * docs/SSLCERTS for more information. */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the retr */
+ 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 (int)res;
+}
diff --git a/docs/examples/pop3-top.c b/docs/examples/pop3-top.c
new file mode 100644
index 00000000..21cee889
--- /dev/null
+++ b/docs/examples/pop3-top.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve only the headers of a mail
+ * using libcurl's POP3 capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the TOP command for message 1 to only include the headers */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "TOP 1 0");
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/pop3-uidl.c b/docs/examples/pop3-uidl.c
new file mode 100644
index 00000000..debb1791
--- /dev/null
+++ b/docs/examples/pop3-uidl.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example using libcurl's POP3 capabilities to list the
+ * contents of a mailbox by unique ID.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the UIDL command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "UIDL");
+
+ /* Perform the custom request */
+ 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 (int)res;
+}
diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c
index ae4f4db9..3e1cfb06 100644
--- a/docs/examples/post-callback.c
+++ b/docs/examples/post-callback.c
@@ -1,14 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * An example source code that issues a HTTP POST and we provide the actual
- * data through a read callback.
+ * 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.
*
+ ***************************************************************************/
+/* An example source code that issues a HTTP POST and we provide the actual
+ * data through a read callback.
*/
#include <stdio.h>
#include <string.h>
@@ -18,7 +30,7 @@ const char data[]="this is what we post to the silly web server";
struct WriteThis {
const char *readptr;
- int sizeleft;
+ long sizeleft;
};
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
@@ -46,8 +58,18 @@ int main(void)
struct WriteThis pooh;
pooh.readptr = data;
- pooh.sizeleft = strlen(data);
+ pooh.sizeleft = (long)strlen(data);
+
+ /* In windows, this will init the winsock stuff */
+ res = curl_global_init(CURL_GLOBAL_DEFAULT);
+ /* Check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed: %s\n",
+ curl_easy_strerror(res));
+ return 1;
+ }
+ /* get a curl handle */
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. */
@@ -84,7 +106,7 @@ int main(void)
#else
/* Set the expected POST size. If you want to POST large amounts of data,
consider CURLOPT_POSTFIELDSIZE_LARGE */
- curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (curl_off_t)pooh.sizeleft);
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, pooh.sizeleft);
#endif
#ifdef DISABLE_EXPECT
@@ -108,9 +130,14 @@ int main(void)
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
+ curl_global_cleanup();
return 0;
}
diff --git a/docs/examples/postinmemory.c b/docs/examples/postinmemory.c
new file mode 100644
index 00000000..3afac4b2
--- /dev/null
+++ b/docs/examples/postinmemory.c
@@ -0,0 +1,110 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <curl/curl.h>
+
+struct MemoryStruct {
+ char *memory;
+ size_t size;
+};
+
+static size_t
+WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
+{
+ size_t realsize = size * nmemb;
+ struct MemoryStruct *mem = (struct MemoryStruct *)userp;
+
+ mem->memory = realloc(mem->memory, mem->size + realsize + 1);
+ if(mem->memory == NULL) {
+ /* out of memory! */
+ printf("not enough memory (realloc returned NULL)\n");
+ return 0;
+ }
+
+ memcpy(&(mem->memory[mem->size]), contents, realsize);
+ mem->size += realsize;
+ mem->memory[mem->size] = 0;
+
+ return realsize;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct MemoryStruct chunk;
+ static const char *postthis="Field=1&Field=2&Field=3";
+
+ chunk.memory = malloc(1); /* will be grown as needed by realloc above */
+ chunk.size = 0; /* no data at this point */
+
+ curl_global_init(CURL_GLOBAL_ALL);
+ curl = curl_easy_init();
+ if(curl) {
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.org/");
+
+ /* send all data to this function */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
+
+ /* we pass our 'chunk' struct to the callback function */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
+
+ /* some servers don't like requests that are made without a user-agent
+ field, so we provide one */
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
+
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
+
+ /* if we don't provide POSTFIELDSIZE, libcurl will strlen() by
+ itself */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else {
+ /*
+ * Now, our chunk.memory points to a memory block that is chunk.size
+ * bytes big and contains the remote file.
+ *
+ * Do something nice with it!
+ */
+ printf("%s\n",chunk.memory);
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ free(chunk.memory);
+
+ /* we're done with libcurl, so clean it up */
+ curl_global_cleanup();
+ }
+ return 0;
+}
diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c
index a6292c5f..88ea78c8 100644
--- a/docs/examples/postit2.c
+++ b/docs/examples/postit2.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Example code that uploads a file name 'foo' to a remote script that accepts
+ * 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.
+ *
+ ***************************************************************************/
+/* Example code that uploads a file name 'foo' to a remote script that accepts
* "HTML form based" (as described in RFC1738) uploads using HTTP POST.
*
* The imaginary form we'll fill in looks like:
@@ -24,8 +37,6 @@
#include <string.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
int main(int argc, char *argv[])
{
@@ -62,7 +73,7 @@ int main(int argc, char *argv[])
CURLFORM_END);
curl = curl_easy_init();
- /* initalize custom header list (stating that Expect: 100-continue is not
+ /* initialize custom header list (stating that Expect: 100-continue is not
wanted */
headerlist = curl_slist_append(headerlist, buf);
if(curl) {
@@ -72,7 +83,13 @@ int main(int argc, char *argv[])
/* only disable 100-continue header if explicitly requested */
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
+
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/progressfunc.c b/docs/examples/progressfunc.c
new file mode 100644
index 00000000..b2635bc8
--- /dev/null
+++ b/docs/examples/progressfunc.c
@@ -0,0 +1,119 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+#define STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES 6000
+#define MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL 3
+
+struct myprogress {
+ double lastruntime;
+ CURL *curl;
+};
+
+/* this is how the CURLOPT_XFERINFOFUNCTION callback works */
+static int xferinfo(void *p,
+ curl_off_t dltotal, curl_off_t dlnow,
+ curl_off_t ultotal, curl_off_t ulnow)
+{
+ struct myprogress *myp = (struct myprogress *)p;
+ CURL *curl = myp->curl;
+ double curtime = 0;
+
+ curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &curtime);
+
+ /* under certain circumstances it may be desirable for certain functionality
+ to only run every N seconds, in order to do this the transaction time can
+ be used */
+ if((curtime - myp->lastruntime) >= MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL) {
+ myp->lastruntime = curtime;
+ fprintf(stderr, "TOTAL TIME: %f \r\n", curtime);
+ }
+
+ fprintf(stderr, "UP: %" CURL_FORMAT_CURL_OFF_T " of %" CURL_FORMAT_CURL_OFF_T
+ " DOWN: %" CURL_FORMAT_CURL_OFF_T " of %" CURL_FORMAT_CURL_OFF_T
+ "\r\n",
+ ulnow, ultotal, dlnow, dltotal);
+
+ if(dlnow > STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES)
+ return 1;
+ return 0;
+}
+
+/* for libcurl older than 7.32.0 (CURLOPT_PROGRESSFUNCTION) */
+static int older_progress(void *p,
+ double dltotal, double dlnow,
+ double ultotal, double ulnow)
+{
+ return xferinfo(p,
+ (curl_off_t)dltotal,
+ (curl_off_t)dlnow,
+ (curl_off_t)ultotal,
+ (curl_off_t)ulnow);
+}
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct myprogress prog;
+
+ curl = curl_easy_init();
+ if(curl) {
+ prog.lastruntime = 0;
+ prog.curl = curl;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
+
+ curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, older_progress);
+ /* pass the struct pointer into the progress function */
+ curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &prog);
+
+#if LIBCURL_VERSION_NUM >= 0x072000
+ /* xferinfo was introduced in 7.32.0, no earlier libcurl versions will
+ compile as they won't have the symbols around.
+
+ If built with a newer libcurl, but running with an older libcurl:
+ curl_easy_setopt() will fail in run-time trying to set the new
+ callback, making the older callback get used.
+
+ New libcurls will prefer the new callback and instead use that one even
+ if both callbacks are set. */
+
+ curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, xferinfo);
+ /* pass the struct pointer into the xferinfo function, note that this is
+ an alias to CURLOPT_PROGRESSDATA */
+ curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &prog);
+#endif
+
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+ res = curl_easy_perform(curl);
+
+ if(res != CURLE_OK)
+ fprintf(stderr, "%s\n", curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return (int)res;
+}
diff --git a/docs/examples/resolve.c b/docs/examples/resolve.c
new file mode 100644
index 00000000..7b3e5656
--- /dev/null
+++ b/docs/examples/resolve.c
@@ -0,0 +1,51 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *host = NULL;
+
+ /* Each single name resolve string should be written using the format
+ HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve,
+ PORT is the port number of the service where libcurl wants to connect to
+ the HOST and ADDRESS is the numerical IP address
+ */
+ 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);
+
+ return (int)res;
+}
diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c
new file mode 100644
index 00000000..fed343df
--- /dev/null
+++ b/docs/examples/rtsp.c
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2011, Jim Hollinger
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Jim Hollinger nor the names of its contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined (WIN32)
+# include <conio.h> /* _getch() */
+#else
+# include <termios.h>
+# include <unistd.h>
+
+static int _getch(void)
+{
+ struct termios oldt, newt;
+ int ch;
+ tcgetattr( STDIN_FILENO, &oldt );
+ newt = oldt;
+ newt.c_lflag &= ~( ICANON | ECHO );
+ tcsetattr( STDIN_FILENO, TCSANOW, &newt );
+ ch = getchar();
+ tcsetattr( STDIN_FILENO, TCSANOW, &oldt );
+ return ch;
+}
+#endif
+
+#include <curl/curl.h>
+
+#define VERSION_STR "V1.0"
+
+/* error handling macros */
+#define my_curl_easy_setopt(A, B, C) \
+ if ((res = curl_easy_setopt((A), (B), (C))) != CURLE_OK) \
+ fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \
+ #A, #B, #C, res);
+
+#define my_curl_easy_perform(A) \
+ if ((res = curl_easy_perform((A))) != CURLE_OK) \
+ fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res);
+
+
+/* send RTSP OPTIONS request */
+static void rtsp_options(CURL *curl, const char *uri)
+{
+ CURLcode res = CURLE_OK;
+ printf("\nRTSP: OPTIONS %s\n", uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_OPTIONS);
+ my_curl_easy_perform(curl);
+}
+
+
+/* send RTSP DESCRIBE request and write sdp response to a file */
+static void rtsp_describe(CURL *curl, const char *uri,
+ const char *sdp_filename)
+{
+ CURLcode res = CURLE_OK;
+ FILE *sdp_fp = fopen(sdp_filename, "wt");
+ printf("\nRTSP: DESCRIBE %s\n", uri);
+ if (sdp_fp == NULL) {
+ fprintf(stderr, "Could not open '%s' for writing\n", sdp_filename);
+ sdp_fp = stdout;
+ }
+ else {
+ printf("Writing SDP to '%s'\n", sdp_filename);
+ }
+ my_curl_easy_setopt(curl, CURLOPT_WRITEDATA, sdp_fp);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_DESCRIBE);
+ my_curl_easy_perform(curl);
+ my_curl_easy_setopt(curl, CURLOPT_WRITEDATA, stdout);
+ if (sdp_fp != stdout) {
+ fclose(sdp_fp);
+ }
+}
+
+/* send RTSP SETUP request */
+static void rtsp_setup(CURL *curl, const char *uri, const char *transport)
+{
+ CURLcode res = CURLE_OK;
+ printf("\nRTSP: SETUP %s\n", uri);
+ printf(" TRANSPORT %s\n", transport);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT, transport);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_SETUP);
+ my_curl_easy_perform(curl);
+}
+
+
+/* send RTSP PLAY request */
+static void rtsp_play(CURL *curl, const char *uri, const char *range)
+{
+ CURLcode res = CURLE_OK;
+ printf("\nRTSP: PLAY %s\n", uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri);
+ my_curl_easy_setopt(curl, CURLOPT_RANGE, range);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_PLAY);
+ my_curl_easy_perform(curl);
+}
+
+
+/* send RTSP TEARDOWN request */
+static void rtsp_teardown(CURL *curl, const char *uri)
+{
+ CURLcode res = CURLE_OK;
+ printf("\nRTSP: TEARDOWN %s\n", uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_TEARDOWN);
+ my_curl_easy_perform(curl);
+}
+
+
+/* convert url into an sdp filename */
+static void get_sdp_filename(const char *url, char *sdp_filename)
+{
+ const char *s = strrchr(url, '/');
+ strcpy(sdp_filename, "video.sdp");
+ if (s != NULL) {
+ s++;
+ if (s[0] != '\0') {
+ sprintf(sdp_filename, "%s.sdp", s);
+ }
+ }
+}
+
+
+/* scan sdp file for media control attribute */
+static void get_media_control_attribute(const char *sdp_filename,
+ char *control)
+{
+ int max_len = 256;
+ char *s = malloc(max_len);
+ FILE *sdp_fp = fopen(sdp_filename, "rt");
+ control[0] = '\0';
+ if (sdp_fp != NULL) {
+ while (fgets(s, max_len - 2, sdp_fp) != NULL) {
+ sscanf(s, " a = control: %s", control);
+ }
+ fclose(sdp_fp);
+ }
+ free(s);
+}
+
+
+/* main app */
+int main(int argc, char * const argv[])
+{
+#if 1
+ const char *transport = "RTP/AVP;unicast;client_port=1234-1235"; /* UDP */
+#else
+ const char *transport = "RTP/AVP/TCP;unicast;client_port=1234-1235"; /* TCP */
+#endif
+ const char *range = "0.000-";
+ int rc = EXIT_SUCCESS;
+ char *base_name = NULL;
+
+ printf("\nRTSP request %s\n", VERSION_STR);
+ printf(" Project web site: http://code.google.com/p/rtsprequest/\n");
+ printf(" Requires cURL V7.20 or greater\n\n");
+
+ /* check command line */
+ if ((argc != 2) && (argc != 3)) {
+ base_name = strrchr(argv[0], '/');
+ if (base_name == NULL) {
+ base_name = strrchr(argv[0], '\\');
+ }
+ if (base_name == NULL) {
+ base_name = argv[0];
+ } else {
+ base_name++;
+ }
+ printf("Usage: %s url [transport]\n", base_name);
+ printf(" url of video server\n");
+ printf(" transport (optional) specifier for media stream protocol\n");
+ printf(" default transport: %s\n", transport);
+ printf("Example: %s rtsp://192.168.0.2/media/video1\n\n", base_name);
+ rc = EXIT_FAILURE;
+ } else {
+ const char *url = argv[1];
+ char *uri = malloc(strlen(url) + 32);
+ char *sdp_filename = malloc(strlen(url) + 32);
+ char *control = malloc(strlen(url) + 32);
+ CURLcode res;
+ get_sdp_filename(url, sdp_filename);
+ if (argc == 3) {
+ transport = argv[2];
+ }
+
+ /* initialize curl */
+ res = curl_global_init(CURL_GLOBAL_ALL);
+ if (res == CURLE_OK) {
+ curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+ CURL *curl;
+ fprintf(stderr, " cURL V%s loaded\n", data->version);
+
+ /* initialize this curl session */
+ curl = curl_easy_init();
+ if (curl != NULL) {
+ my_curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
+ my_curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
+ my_curl_easy_setopt(curl, CURLOPT_HEADERDATA, stdout);
+ my_curl_easy_setopt(curl, CURLOPT_URL, url);
+
+ /* request server options */
+ sprintf(uri, "%s", url);
+ rtsp_options(curl, uri);
+
+ /* request session description and write response to sdp file */
+ rtsp_describe(curl, uri, sdp_filename);
+
+ /* get media control attribute from sdp file */
+ get_media_control_attribute(sdp_filename, control);
+
+ /* setup media stream */
+ sprintf(uri, "%s/%s", url, control);
+ rtsp_setup(curl, uri, transport);
+
+ /* start playing media stream */
+ sprintf(uri, "%s/", url);
+ rtsp_play(curl, uri, range);
+ printf("Playing video, press any key to stop ...");
+ _getch();
+ printf("\n");
+
+ /* teardown session */
+ rtsp_teardown(curl, uri);
+
+ /* cleanup */
+ curl_easy_cleanup(curl);
+ curl = NULL;
+ } else {
+ fprintf(stderr, "curl_easy_init() failed\n");
+ }
+ curl_global_cleanup();
+ } else {
+ fprintf(stderr, "curl_global_init(%s) failed: %d\n",
+ "CURL_GLOBAL_ALL", res);
+ }
+ free(control);
+ free(sdp_filename);
+ free(uri);
+ }
+
+ return rc;
+}
diff --git a/docs/examples/sampleconv.c b/docs/examples/sampleconv.c
index ed458516..3db31609 100644
--- a/docs/examples/sampleconv.c
+++ b/docs/examples/sampleconv.c
@@ -1,11 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 is a simple example showing how a program on a non-ASCII platform
would invoke callbacks to do its own codeset conversions instead of
diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c
index ad5ddd11..88fddf59 100644
--- a/docs/examples/sendrecv.c
+++ b/docs/examples/sendrecv.c
@@ -1,20 +1,32 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * An example of curl_easy_send() and curl_easy_recv() usage.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+/* An example of curl_easy_send() and curl_easy_recv() usage. */
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
/* Auxiliary function that waits on the socket. */
-static int wait_on_socket(int sockfd, int for_recv, long timeout_ms)
+static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms)
{
struct timeval tv;
fd_set infd, outfd, errfd;
@@ -49,8 +61,10 @@ int main(void)
CURLcode res;
/* Minimalistic http request */
const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
- int sockfd; /* socket */
+ curl_socket_t sockfd; /* socket */
+ long sockextr;
size_t iolen;
+ curl_off_t nread;
curl = curl_easy_init();
if(curl) {
@@ -65,9 +79,11 @@ int main(void)
return 1;
}
- /* Extract the socket from the curl handle - we'll need it
- * for waiting */
- res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
+ /* Extract the socket from the curl handle - we'll need it for waiting.
+ * Note that this API takes a pointer to a 'long' while we use
+ * curl_socket_t for sockets otherwise.
+ */
+ res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockextr);
if(CURLE_OK != res)
{
@@ -75,6 +91,8 @@ int main(void)
return 1;
}
+ sockfd = sockextr;
+
/* wait for the socket to become ready for sending */
if(!wait_on_socket(sockfd, 0, 60000L))
{
@@ -105,7 +123,9 @@ int main(void)
if(CURLE_OK != res)
break;
- printf("Received %u bytes.\n", iolen);
+ nread = (curl_off_t)iolen;
+
+ printf("Received %" CURL_FORMAT_CURL_OFF_T " bytes.\n", nread);
}
/* always cleanup */
diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c
index e0c4cbbb..7402e354 100644
--- a/docs/examples/sepheaders.c
+++ b/docs/examples/sepheaders.c
@@ -1,19 +1,29 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
{
@@ -21,7 +31,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
return written;
}
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl_handle;
static const char *headerfilename = "head.out";
@@ -43,24 +53,26 @@ int main(int argc, char **argv)
/* send all data to this function */
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);
- /* open the files */
- headerfile = fopen(headerfilename,"w");
- if (headerfile == NULL) {
+ /* open the header file */
+ headerfile = fopen(headerfilename, "wb");
+ if(!headerfile) {
curl_easy_cleanup(curl_handle);
return -1;
}
- bodyfile = fopen(bodyfilename,"w");
- if (bodyfile == NULL) {
+
+ /* open the body file */
+ bodyfile = fopen(bodyfilename, "wb");
+ if(!bodyfile) {
curl_easy_cleanup(curl_handle);
+ fclose(headerfile);
return -1;
}
- /* we want the headers to this file handle */
- curl_easy_setopt(curl_handle, CURLOPT_WRITEHEADER, headerfile);
+ /* we want the headers be written to this file handle */
+ curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, headerfile);
- /*
- * Notice here that if you want the actual data sent anywhere else but
- * stdout, you should consider using the CURLOPT_WRITEDATA option. */
+ /* we want the body be written to this file handle instead of stdout */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, bodyfile);
/* get it! */
curl_easy_perform(curl_handle);
@@ -68,6 +80,9 @@ int main(int argc, char **argv)
/* close the header file */
fclose(headerfile);
+ /* close the body file */
+ fclose(bodyfile);
+
/* cleanup curl stuff */
curl_easy_cleanup(curl_handle);
diff --git a/docs/examples/sessioninfo.c b/docs/examples/sessioninfo.c
new file mode 100644
index 00000000..2641c713
--- /dev/null
+++ b/docs/examples/sessioninfo.c
@@ -0,0 +1,105 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/* Note that this example currently requires cURL to be linked against
+ GnuTLS (and this program must also be linked against -lgnutls). */
+
+#include <stdio.h>
+
+#include <curl/curl.h>
+#include <gnutls/gnutls.h>
+
+static CURL *curl;
+
+static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ const struct curl_tlssessioninfo *info;
+ unsigned int cert_list_size;
+ const gnutls_datum_t *chainp;
+ CURLcode res;
+
+ (void)stream;
+ (void)ptr;
+
+ res = curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &info);
+
+ if(!res) {
+ switch(info->backend) {
+ case CURLSSLBACKEND_GNUTLS:
+ /* info->internals is now the gnutls_session_t */
+ chainp = gnutls_certificate_get_peers(info->internals, &cert_list_size);
+ if((chainp) && (cert_list_size)) {
+ unsigned int i;
+
+ for(i = 0; i < cert_list_size; i++) {
+ gnutls_x509_crt_t cert;
+ gnutls_datum_t dn;
+
+ if(GNUTLS_E_SUCCESS == gnutls_x509_crt_init(&cert)) {
+ if(GNUTLS_E_SUCCESS ==
+ gnutls_x509_crt_import(cert, &chainp[i], GNUTLS_X509_FMT_DER)) {
+ if(GNUTLS_E_SUCCESS ==
+ gnutls_x509_crt_print(cert, GNUTLS_CRT_PRINT_FULL, &dn)) {
+ fprintf(stderr, "Certificate #%d: %.*s", i, dn.size, dn.data);
+
+ gnutls_free(dn.data);
+ }
+ }
+
+ gnutls_x509_crt_deinit(cert);
+ }
+ }
+ }
+ break;
+ case CURLSSLBACKEND_NONE:
+ default:
+ break;
+ }
+ }
+
+ return size * nmemb;
+}
+
+int main(void)
+{
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
+
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);
+
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
+
+ (void) curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+ }
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/sftpget.c b/docs/examples/sftpget.c
new file mode 100644
index 00000000..434299dc
--- /dev/null
+++ b/docs/examples/sftpget.c
@@ -0,0 +1,106 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+
+#include <curl/curl.h>
+
+/* define this to switch off the use of ssh-agent in this program */
+#undef DISABLE_SSH_AGENT
+
+/*
+ * This is an example showing how to get a single file from an SFTP server.
+ * It delays the actual destination file creation until the first write
+ * callback so that it won't create an empty file in case the remote file
+ * doesn't exist or something else fails.
+ */
+
+struct FtpFile {
+ const char *filename;
+ FILE *stream;
+};
+
+static size_t my_fwrite(void *buffer, size_t size, size_t nmemb,
+ void *stream)
+{
+ struct FtpFile *out=(struct FtpFile *)stream;
+ if(out && !out->stream) {
+ /* open file for writing */
+ out->stream=fopen(out->filename, "wb");
+ if(!out->stream)
+ return -1; /* failure, can't open file to write */
+ }
+ return fwrite(buffer, size, nmemb, out->stream);
+}
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct FtpFile ftpfile={
+ "yourfile.bin", /* name to store the file as if successful */
+ NULL
+ };
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * You better replace the URL with one that works!
+ */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "sftp://user@server/home/user/file.txt");
+ /* Define our callback to get called when there's data to be written */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
+ /* Set a pointer to our struct to pass to the callback */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
+
+#ifndef DISABLE_SSH_AGENT
+ /* We activate ssh agent. For this to work you need
+ to have ssh-agent running (type set | grep SSH_AGENT to check) or
+ pageant on Windows (there is an icon in systray if so) */
+ curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_AGENT);
+#endif
+
+ /* Switch on full protocol/debug output */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ if(CURLE_OK != res) {
+ /* we failed */
+ fprintf(stderr, "curl told us %d\n", res);
+ }
+ }
+
+ if(ftpfile.stream)
+ fclose(ftpfile.stream); /* close the local file */
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/simple.c b/docs/examples/simple.c
index 351cf729..1912ce66 100644
--- a/docs/examples/simple.c
+++ b/docs/examples/simple.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
@@ -18,7 +30,15 @@ int main(void)
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);
+
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c
index b8e61e07..8657771f 100644
--- a/docs/examples/simplepost.c
+++ b/docs/examples/simplepost.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <string.h>
#include <curl/curl.h>
@@ -27,7 +39,12 @@ int main(void)
itself */
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c
index db3accaa..aefb79f6 100644
--- a/docs/examples/simplessl.c
+++ b/docs/examples/simplessl.c
@@ -1,18 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
-
/* some requirements for this to work:
1. set pCertFile to the file with the client certificate
@@ -32,8 +41,9 @@
*/
-int main(int argc, char **argv)
+int main(void)
{
+ int i;
CURL *curl;
CURLcode res;
FILE *headerfile;
@@ -47,7 +57,7 @@ int main(int argc, char **argv)
const char *pEngine;
-#if USE_ENGINE
+#ifdef USE_ENGINE
pKeyName = "rsa_test";
pKeyType = "ENG";
pEngine = "chil"; /* for nChiper HSM... */
@@ -65,9 +75,9 @@ int main(int argc, char **argv)
if(curl) {
/* what call to write: */
curl_easy_setopt(curl, CURLOPT_URL, "HTTPS://your.favourite.ssl.site");
- curl_easy_setopt(curl, CURLOPT_WRITEHEADER, headerfile);
+ curl_easy_setopt(curl, CURLOPT_HEADERDATA, headerfile);
- while(1) /* do some ugly short cut... */
+ for(i = 0; i < 1; i++) /* single-iteration loop, just to break out from */
{
if (pEngine) /* use crypto engine */
{
@@ -109,8 +119,14 @@ int main(int argc, char **argv)
/* disconnect if we can't validate server's cert */
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,1L);
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
- break; /* we are done... */
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* we are done... */
}
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c
new file mode 100644
index 00000000..932f6e39
--- /dev/null
+++ b/docs/examples/smooth-gtk-thread.c
@@ -0,0 +1,228 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 is a multi threaded application that uses a progress bar to show
+ * status. It uses Gtk+ to make a smooth pulse.
+ *
+ * Written by Jud Bishop after studying the other examples provided with
+ * libcurl.
+ *
+ * To compile (on a single line):
+ * gcc -ggdb `pkg-config --cflags --libs gtk+-2.0` -lcurl -lssl -lcrypto
+ * -lgthread-2.0 -dl smooth-gtk-thread.c -o smooth-gtk-thread
+ */
+
+#include <stdio.h>
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <unistd.h>
+#include <pthread.h>
+
+#include <curl/curl.h>
+
+#define NUMT 4
+
+pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+int j = 0;
+gint num_urls = 9; /* Just make sure this is less than urls[]*/
+const char * const urls[]= {
+ "90022",
+ "90023",
+ "90024",
+ "90025",
+ "90026",
+ "90027",
+ "90028",
+ "90029",
+ "90030"
+};
+
+size_t write_file(void *ptr, size_t size, size_t nmemb, FILE *stream)
+{
+ /* printf("write_file\n"); */
+ return fwrite(ptr, size, nmemb, stream);
+}
+
+/* http://xoap.weather.com/weather/local/46214?cc=*&dayf=5&unit=i */
+void *pull_one_url(void *NaN)
+{
+ CURL *curl;
+ CURLcode res;
+ gchar *http;
+ FILE *outfile;
+
+ /* Stop threads from entering unless j is incremented */
+ pthread_mutex_lock(&lock);
+ while ( j < num_urls )
+ {
+ printf("j = %d\n", j);
+
+ http =
+ g_strdup_printf("xoap.weather.com/weather/local/%s?cc=*&dayf=5&unit=i\n",
+ urls[j]);
+
+ printf( "http %s", http );
+
+ curl = curl_easy_init();
+ if(curl)
+ {
+
+ outfile = fopen(urls[j], "w");
+ /* printf("fopen\n"); */
+
+ /* Set the URL and transfer type */
+ curl_easy_setopt(curl, CURLOPT_URL, http);
+
+ /* Write to the file */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_file);
+
+ j++; /* critical line */
+ pthread_mutex_unlock(&lock);
+
+ res = curl_easy_perform(curl);
+
+ fclose(outfile);
+ printf("fclose\n");
+
+ curl_easy_cleanup(curl);
+ }
+ g_free (http);
+
+ /* Adds more latency, testing the mutex.*/
+ sleep(1);
+
+ } /* end while */
+ return NULL;
+}
+
+
+gboolean pulse_bar(gpointer data)
+{
+ gdk_threads_enter();
+ gtk_progress_bar_pulse (GTK_PROGRESS_BAR (data));
+ gdk_threads_leave();
+
+ /* Return true so the function will be called again;
+ * returning false removes this timeout function.
+ */
+ return TRUE;
+}
+
+void *create_thread(void *progress_bar)
+{
+ pthread_t tid[NUMT];
+ int i;
+ int error;
+
+ /* Make sure I don't create more threads than urls. */
+ for(i=0; i < NUMT && i < num_urls ; i++) {
+ error = pthread_create(&tid[i],
+ NULL, /* default attributes please */
+ pull_one_url,
+ NULL);
+ if(0 != error)
+ fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
+ else
+ fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
+ }
+
+ /* Wait for all threads to terminate. */
+ for(i=0; i < NUMT && i < num_urls; i++) {
+ error = pthread_join(tid[i], NULL);
+ fprintf(stderr, "Thread %d terminated\n", i);
+ }
+
+ /* This stops the pulsing if you have it turned on in the progress bar
+ section */
+ g_source_remove(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(progress_bar),
+ "pulse_id")));
+
+ /* This destroys the progress bar */
+ gtk_widget_destroy(progress_bar);
+
+ /* [Un]Comment this out to kill the program rather than pushing close. */
+ /* gtk_main_quit(); */
+
+
+ return NULL;
+
+}
+
+static gboolean cb_delete(GtkWidget *window, gpointer data)
+{
+ gtk_main_quit();
+ return FALSE;
+}
+
+int main(int argc, char **argv)
+{
+ GtkWidget *top_window, *outside_frame, *inside_frame, *progress_bar;
+
+ /* Must initialize libcurl before any threads are started */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* Init thread */
+ g_thread_init(NULL);
+ gdk_threads_init ();
+ gdk_threads_enter ();
+
+ gtk_init(&argc, &argv);
+
+ /* Base window */
+ top_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
+ /* Frame */
+ outside_frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type(GTK_FRAME(outside_frame), GTK_SHADOW_OUT);
+ gtk_container_add(GTK_CONTAINER(top_window), outside_frame);
+
+ /* Frame */
+ inside_frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type(GTK_FRAME(inside_frame), GTK_SHADOW_IN);
+ gtk_container_set_border_width(GTK_CONTAINER(inside_frame), 5);
+ gtk_container_add(GTK_CONTAINER(outside_frame), inside_frame);
+
+ /* Progress bar */
+ progress_bar = gtk_progress_bar_new();
+ gtk_progress_bar_pulse (GTK_PROGRESS_BAR (progress_bar));
+ /* Make uniform pulsing */
+ gint pulse_ref = g_timeout_add (300, pulse_bar, progress_bar);
+ g_object_set_data(G_OBJECT(progress_bar), "pulse_id",
+ GINT_TO_POINTER(pulse_ref));
+ gtk_container_add(GTK_CONTAINER(inside_frame), progress_bar);
+
+ gtk_widget_show_all(top_window);
+ printf("gtk_widget_show_all\n");
+
+ g_signal_connect(G_OBJECT (top_window), "delete-event",
+ G_CALLBACK(cb_delete), NULL);
+
+ if (!g_thread_create(&create_thread, progress_bar, FALSE, NULL) != 0)
+ g_warning("can't create the thread");
+
+ gtk_main();
+ gdk_threads_leave();
+ printf("gdk_threads_leave\n");
+
+ return 0;
+}
+
diff --git a/docs/examples/smtp-expn.c b/docs/examples/smtp-expn.c
new file mode 100644
index 00000000..0322d2fc
--- /dev/null
+++ b/docs/examples/smtp-expn.c
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to expand an email mailing list.
+ *
+ * Notes:
+ *
+ * 1) This example requires libcurl 7.34.0 or above.
+ * 2) Not all email servers support this command.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct curl_slist *recipients = NULL;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
+ recipients = curl_slist_append(recipients, "Friends");
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* Set the EXPN command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPN");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Curl won't send the QUIT command until you call cleanup, so you should
+ * be able to re-use this connection for additional requests. It may not be
+ * a good idea to keep the connection open for a very long time though
+ * (more than a few minutes may result in the server timing out the
+ * connection) and you do want to clean up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return 0;
+}
diff --git a/docs/examples/smtp-mail.c b/docs/examples/smtp-mail.c
new file mode 100644
index 00000000..eea90b8a
--- /dev/null
+++ b/docs/examples/smtp-mail.c
@@ -0,0 +1,137 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. For an example of using the multi interface please see
+ * smtp-multi.c.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM "<sender@example.org>"
+#define TO "<addressee@example.net>"
+#define CC "<info@example.org>"
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\r\n",
+ "Subject: SMTP example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(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 main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that this option isn't strictly required, omitting it will result in
+ * libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise, they
+ * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO);
+ recipients = curl_slist_append(recipients, CC);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We're using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* curl won't send the QUIT command until you call cleanup, so you should be
+ * able to re-use this connection for additional messages (setting
+ * CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and calling
+ * curl_easy_perform() again. It may not be a good idea to keep the
+ * connection open for a very long time though (more than a few minutes may
+ * result in the server timing out the connection), and you do want to clean
+ * up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/smtp-multi.c b/docs/examples/smtp-multi.c
new file mode 100644
index 00000000..4098c7d1
--- /dev/null
+++ b/docs/examples/smtp-multi.c
@@ -0,0 +1,237 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <string.h>
+#include <curl/curl.h>
+
+/* This is an example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the smtp-mail.c example to demonstrate how to use
+ * libcurl's multi interface.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM "<sender@example.com>"
+#define TO "<recipient@example.com>"
+#define CC "<info@example.com>"
+
+#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\r\n",
+ "Subject: SMTP multi example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(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;
+}
+
+static struct timeval tvnow(void)
+{
+ struct timeval now;
+
+ /* time() returns the value of time in seconds since the epoch */
+ now.tv_sec = (long)time(NULL);
+ now.tv_usec = 0;
+
+ return now;
+}
+
+static long tvdiff(struct timeval newer, struct timeval older)
+{
+ return (newer.tv_sec - older.tv_sec) * 1000 +
+ (newer.tv_usec - older.tv_usec) / 1000;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLM *mcurl;
+ int still_running = 1;
+ struct timeval mp_start;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(!curl)
+ return 1;
+
+ mcurl = curl_multi_init();
+ if(!mcurl)
+ return 2;
+
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that this option isn't strictly required, omitting it will result in
+ * libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise, they
+ * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO);
+ recipients = curl_slist_append(recipients, CC);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We're using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Tell the multi stack about our easy handle */
+ curl_multi_add_handle(mcurl, curl);
+
+ /* Record the start time which we can use later */
+ mp_start = tvnow();
+
+ /* We start some action by calling perform right away */
+ curl_multi_perform(mcurl, &still_running);
+
+ while(still_running) {
+ struct timeval timeout;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+ int rc;
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ long curl_timeo = -1;
+
+ /* Initialise the file descriptors */
+ 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(mcurl, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(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);
+ }
+
+ if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
+ fprintf(stderr,
+ "ABORTING: Since it seems that we would have run forever.\n");
+ break;
+ }
+
+ switch(rc) {
+ case -1: /* select error */
+ break;
+ case 0: /* timeout */
+ default: /* action */
+ curl_multi_perform(mcurl, &still_running);
+ break;
+ }
+ }
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Always cleanup */
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/smtp-ssl.c b/docs/examples/smtp-ssl.c
new file mode 100644
index 00000000..a774403f
--- /dev/null
+++ b/docs/examples/smtp-ssl.c
@@ -0,0 +1,161 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the smtp-mail.c example to add authentication
+ * and, more importantly, transport security to protect the authentication
+ * details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM "<sender@example.org>"
+#define TO "<addressee@example.net>"
+#define CC "<info@example.org>"
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\r\n",
+ "Subject: SMTP SSL example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(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 main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is the URL for your mailserver. Note the use of smtps:// rather
+ * than smtp:// to request a SSL based connection. */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtps://mainserver.example.net");
+
+ /* If you want to connect to a site who isn't using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you. */
+#ifdef SKIP_PEER_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+ /* If the site you're connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure. */
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Note that this option isn't strictly required, omitting it will result in
+ * libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise, they
+ * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO);
+ recipients = curl_slist_append(recipients, CC);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We're using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c
new file mode 100644
index 00000000..4872dbdf
--- /dev/null
+++ b/docs/examples/smtp-tls.c
@@ -0,0 +1,163 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the smtp-mail.c example to add authentication
+ * and, more importantly, transport security to protect the authentication
+ * details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM "<sender@example.org>"
+#define TO "<addressee@example.net>"
+#define CC "<info@example.org>"
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\r\n",
+ "Subject: SMTP TLS example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(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 main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is the URL for your mailserver. Note the use of port 587 here,
+ * instead of the normal SMTP port (25). Port 587 is commonly used for
+ * secure mail submission (see RFC4403), but you should use whatever
+ * matches your server configuration. */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mainserver.example.net:587");
+
+ /* In this example, we'll start with a plain text connection, and upgrade
+ * to Transport Layer Security (TLS) using the STARTTLS command. Be careful
+ * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+ * will continue anyway - see the security discussion in the libcurl
+ * tutorial for more details. */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* If your server doesn't have a valid certificate, then you can disable
+ * part of the Transport Layer Security protection by setting the
+ * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ * That is, in general, a bad idea. It is still better than sending your
+ * authentication details in plain text though.
+ * Instead, you should get the issuer certificate (or the host certificate
+ * if the certificate is self-signed) and add it to the set of certificates
+ * that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
+ * docs/SSLCERTS for more information. */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+ /* Note that this option isn't strictly required, omitting it will result in
+ * libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise, they
+ * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO);
+ recipients = curl_slist_append(recipients, CC);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We're using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the transfer.
+ */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/smtp-vrfy.c b/docs/examples/smtp-vrfy.c
new file mode 100644
index 00000000..4e44cea9
--- /dev/null
+++ b/docs/examples/smtp-vrfy.c
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to verify an email address from an
+ * SMTP server.
+ *
+ * Notes:
+ *
+ * 1) This example requires libcurl 7.34.0 or above.
+ * 2) Not all email servers support this command and even if your email server
+ * does support it, it may respond with a 252 response code even though the
+ * address doesn't exist.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct curl_slist *recipients = NULL;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
+ recipients = curl_slist_append(recipients, "<recipient@example.com>");
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* Perform the VRFY */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Curl won't send the QUIT command until you call cleanup, so you should
+ * be able to re-use this connection for additional requests. It may not be
+ * a good idea to keep the connection open for a very long time though
+ * (more than a few minutes may result in the server timing out the
+ * connection) and you do want to clean up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return 0;
+}
diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c
index 4ed031ac..cd7d0731 100644
--- a/docs/examples/synctime.c
+++ b/docs/examples/synctime.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * This example code only builds as-is on Windows.
+ * 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 example code only builds as-is on Windows.
*
* While Unix/Linux user, you do not need this software.
* You can achieve the same result as synctime using curl, awk and date.
@@ -79,6 +92,8 @@
#define MAX_STRING 256
#define MAX_STRING1 MAX_STRING+1
+#define SYNCTIME_UA "synctime/1.0"
+
typedef struct
{
char http_proxy[MAX_STRING1];
@@ -86,12 +101,11 @@ typedef struct
char timeserver[MAX_STRING1];
} conf_t;
-const char DefaultTimeServer[4][MAX_STRING1] =
+const char DefaultTimeServer[3][MAX_STRING1] =
{
- "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"
+ "http://pool.ntp.org/",
+ "http://nist.time.gov/",
+ "http://www.google.com/"
};
const char *DayStr[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
@@ -134,7 +148,7 @@ size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb,
TmpStr1 & 2? */
AutoSyncTime = 0;
else {
- RetVal = sscanf ((char *)(ptr), "Date: %s %d %s %d %d:%d:%d",
+ RetVal = sscanf ((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu",
TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear,
&SYSTime.wHour, &SYSTime.wMinute, &SYSTime.wSecond);
@@ -173,9 +187,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);
- /* 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)");
+#ifdef SYNCTIME_UA
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA);
+#endif
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, *SyncTime_CURL_WriteOutput);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, *SyncTime_CURL_WriteHeader);
}
diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c
index 284edc41..a7e9c2de 100644
--- a/docs/examples/threaded-ssl.c
+++ b/docs/examples/threaded-ssl.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * A multi-threaded example that uses pthreads and fetches 4 remote files at
+ * 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.
+ *
+ ***************************************************************************/
+/* A multi-threaded example that uses pthreads and fetches 4 remote files at
* once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
* (libgcrypt) so far.
*
diff --git a/docs/examples/url2file.c b/docs/examples/url2file.c
new file mode 100644
index 00000000..adf696c9
--- /dev/null
+++ b/docs/examples/url2file.c
@@ -0,0 +1,80 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <curl/curl.h>
+
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ size_t written = fwrite(ptr, size, nmemb, (FILE *)stream);
+ return written;
+}
+
+int main(int argc, char *argv[])
+{
+ CURL *curl_handle;
+ static const char *pagefilename = "page.out";
+ FILE *pagefile;
+
+ if(argc < 2 ) {
+ printf("Usage: %s <URL>\n", argv[0]);
+ return 1;
+ }
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* init the curl session */
+ curl_handle = curl_easy_init();
+
+ /* set URL to get here */
+ curl_easy_setopt(curl_handle, CURLOPT_URL, argv[1]);
+
+ /* Switch on full protocol/debug output while testing */
+ curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L);
+
+ /* disable progress meter, set to 0L to enable and disable debug output */
+ curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
+
+ /* send all data to this function */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);
+
+ /* open the file */
+ pagefile = fopen(pagefilename, "wb");
+ if (pagefile) {
+
+ /* write the page body to this file handle */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pagefile);
+
+ /* get it! */
+ curl_easy_perform(curl_handle);
+
+ /* close the header file */
+ fclose(pagefile);
+ }
+
+ /* cleanup curl stuff */
+ curl_easy_cleanup(curl_handle);
+
+ return 0;
+}
diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c
new file mode 100644
index 00000000..dd56c616
--- /dev/null
+++ b/docs/examples/usercertinmem.c
@@ -0,0 +1,224 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+/* Example using an in memory PEM user certificate and RSA key to retrieve an
+ * https page.
+ * Written by Ishan SinghLevett, based on Theo Borm's cacertinmem.c.
+ * Note that to maintain simplicity this example does not use a CA certificate
+ * for peer verification. However, some form of peer verification
+ * must be used in real circumstances when a secure connection is required.
+ */
+
+#include <openssl/ssl.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <curl/curl.h>
+#include <stdio.h>
+
+static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ fwrite(ptr,size,nmemb,stream);
+ return(nmemb*size);
+}
+
+static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm)
+{
+ X509 *cert = NULL;
+ BIO *bio = NULL;
+ BIO *kbio = NULL;
+ RSA *rsa = NULL;
+ int ret;
+
+ const char *mypem = /* www.cacert.org */
+ "-----BEGIN CERTIFICATE-----\n"\
+ "MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290\n"\
+ "IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB\n"\
+ "IENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRA\n"\
+ "Y2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAO\n"\
+ "BgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEi\n"\
+ "MCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJ\n"\
+ "ARYSc3VwcG9ydEBjYWNlcnQub3JnMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC\n"\
+ "CgKCAgEAziLA4kZ97DYoB1CW8qAzQIxL8TtmPzHlawI229Z89vGIj053NgVBlfkJ\n"\
+ "8BLPRoZzYLdufujAWGSuzbCtRRcMY/pnCujW0r8+55jE8Ez64AO7NV1sId6eINm6\n"\
+ "zWYyN3L69wj1x81YyY7nDl7qPv4coRQKFWyGhFtkZip6qUtTefWIonvuLwphK42y\n"\
+ "fk1WpRPs6tqSnqxEQR5YYGUFZvjARL3LlPdCfgv3ZWiYUQXw8wWRBB0bF4LsyFe7\n"\
+ "w2t6iPGwcswlWyCR7BYCEo8y6RcYSNDHBS4CMEK4JZwFaz+qOqfrU0j36NK2B5jc\n"\
+ "G8Y0f3/JHIJ6BVgrCFvzOKKrF11myZjXnhCLotLddJr3cQxyYN/Nb5gznZY0dj4k\n"\
+ "epKwDpUeb+agRThHqtdB7Uq3EvbXG4OKDy7YCbZZ16oE/9KTfWgu3YtLq1i6L43q\n"\
+ "laegw1SJpfvbi1EinbLDvhG+LJGGi5Z4rSDTii8aP8bQUWWHIbEZAWV/RRyH9XzQ\n"\
+ "QUxPKZgh/TMfdQwEUfoZd9vUFBzugcMd9Zi3aQaRIt0AUMyBMawSB3s42mhb5ivU\n"\
+ "fslfrejrckzzAeVLIL+aplfKkQABi6F1ITe1Yw1nPkZPcCBnzsXWWdsC4PDSy826\n"\
+ "YreQQejdIOQpvGQpQsgi3Hia/0PsmBsJUUtaWsJx8cTLc6nloQsCAwEAAaOCAc4w\n"\
+ "ggHKMB0GA1UdDgQWBBQWtTIb1Mfz4OaO873SsDrusjkY0TCBowYDVR0jBIGbMIGY\n"\
+ "gBQWtTIb1Mfz4OaO873SsDrusjkY0aF9pHsweTEQMA4GA1UEChMHUm9vdCBDQTEe\n"\
+ "MBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0\n"\
+ "IFNpZ25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2Vy\n"\
+ "dC5vcmeCAQAwDwYDVR0TAQH/BAUwAwEB/zAyBgNVHR8EKzApMCegJaAjhiFodHRw\n"\
+ "czovL3d3dy5jYWNlcnQub3JnL3Jldm9rZS5jcmwwMAYJYIZIAYb4QgEEBCMWIWh0\n"\
+ "dHBzOi8vd3d3LmNhY2VydC5vcmcvcmV2b2tlLmNybDA0BglghkgBhvhCAQgEJxYl\n"\
+ "aHR0cDovL3d3dy5jYWNlcnQub3JnL2luZGV4LnBocD9pZD0xMDBWBglghkgBhvhC\n"\
+ "AQ0ESRZHVG8gZ2V0IHlvdXIgb3duIGNlcnRpZmljYXRlIGZvciBGUkVFIGhlYWQg\n"\
+ "b3ZlciB0byBodHRwOi8vd3d3LmNhY2VydC5vcmcwDQYJKoZIhvcNAQEEBQADggIB\n"\
+ "ACjH7pyCArpcgBLKNQodgW+JapnM8mgPf6fhjViVPr3yBsOQWqy1YPaZQwGjiHCc\n"\
+ "nWKdpIevZ1gNMDY75q1I08t0AoZxPuIrA2jxNGJARjtT6ij0rPtmlVOKTV39O9lg\n"\
+ "18p5aTuxZZKmxoGCXJzN600BiqXfEVWqFcofN8CCmHBh22p8lqOOLlQ+TyGpkO/c\n"\
+ "gr/c6EWtTZBzCDyUZbAEmXZ/4rzCahWqlwQ3JNgelE5tDlG+1sSPypZt90Pf6DBl\n"\
+ "Jzt7u0NDY8RD97LsaMzhGY4i+5jhe1o+ATc7iwiwovOVThrLm82asduycPAtStvY\n"\
+ "sONvRUgzEv/+PDIqVPfE94rwiCPCR/5kenHA0R6mY7AHfqQv0wGP3J8rtsYIqQ+T\n"\
+ "SCX8Ev2fQtzzxD72V7DX3WnRBnc0CkvSyqD/HMaMyRa+xMwyN2hzXwj7UfdJUzYF\n"\
+ "CpUCTPJ5GhD22Dp1nPMd8aINcGeGG7MW9S/lpOt5hvk9C8JzC6WZrG/8Z7jlLwum\n"\
+ "GCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzk\n"\
+ "zk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmW\n"\
+ "omTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD\n"\
+ "-----END CERTIFICATE-----\n";
+
+/*replace the XXX with the actual RSA key*/
+ const char *mykey =
+ "-----BEGIN RSA PRIVATE KEY-----\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "-----END RSA PRIVATE KEY-----\n";
+
+ (void)curl; /* avoid warnings */
+ (void)parm; /* avoid warnings */
+
+ /* get a BIO */
+ bio = BIO_new_mem_buf((char *)mypem, -1);
+
+ if (bio == NULL) {
+ printf("BIO_new_mem_buf failed\n");
+ }
+
+ /* use it to read the PEM formatted certificate from memory into an X509
+ * structure that SSL can use
+ */
+ cert = PEM_read_bio_X509(bio, NULL, 0, NULL);
+ if (cert == NULL) {
+ printf("PEM_read_bio_X509 failed...\n");
+ }
+
+ /*tell SSL to use the X509 certificate*/
+ ret = SSL_CTX_use_certificate((SSL_CTX*)sslctx, cert);
+ if (ret != 1) {
+ printf("Use certificate failed\n");
+ }
+
+ /*create a bio for the RSA key*/
+ kbio = BIO_new_mem_buf((char *)mykey, -1);
+ if (kbio == NULL) {
+ printf("BIO_new_mem_buf failed\n");
+ }
+
+ /*read the key bio into an RSA object*/
+ rsa = PEM_read_bio_RSAPrivateKey(kbio, NULL, 0, NULL);
+ if (rsa == NULL) {
+ printf("Failed to create key bio\n");
+ }
+
+ /*tell SSL to use the RSA key from memory*/
+ ret = SSL_CTX_use_RSAPrivateKey((SSL_CTX*)sslctx, rsa);
+ if (ret != 1) {
+ printf("Use Key failed\n");
+ }
+
+ /* free resources that have been allocated by openssl functions */
+ if (bio)
+ BIO_free(bio);
+
+ if (kbio)
+ BIO_free(kbio);
+
+ if (rsa)
+ RSA_free(rsa);
+
+ if (cert)
+ X509_free(cert);
+
+ /* all set to go */
+ return CURLE_OK ;
+}
+
+int main(void)
+{
+ CURL *ch;
+ CURLcode rv;
+
+ rv = curl_global_init(CURL_GLOBAL_ALL);
+ ch = curl_easy_init();
+ rv = curl_easy_setopt(ch,CURLOPT_VERBOSE, 0L);
+ rv = curl_easy_setopt(ch,CURLOPT_HEADER, 0L);
+ rv = curl_easy_setopt(ch,CURLOPT_NOPROGRESS, 1L);
+ rv = curl_easy_setopt(ch,CURLOPT_NOSIGNAL, 1L);
+ rv = curl_easy_setopt(ch,CURLOPT_WRITEFUNCTION, *writefunction);
+ rv = curl_easy_setopt(ch,CURLOPT_WRITEDATA, stdout);
+ rv = curl_easy_setopt(ch,CURLOPT_HEADERFUNCTION, *writefunction);
+ rv = curl_easy_setopt(ch,CURLOPT_HEADERDATA, stderr);
+ rv = curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
+
+ /* both VERIFYPEER and VERIFYHOST are set to 0 in this case because there is
+ no CA certificate*/
+
+ rv = curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER, 0L);
+ rv = curl_easy_setopt(ch,CURLOPT_SSL_VERIFYHOST, 0L);
+ rv = curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
+ rv = curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM");
+
+ /* first try: retrieve page without user certificate and key -> will fail
+ */
+ rv = curl_easy_perform(ch);
+ if (rv==CURLE_OK) {
+ printf("*** transfer succeeded ***\n");
+ }
+ else {
+ printf("*** transfer failed ***\n");
+ }
+
+ /* second try: retrieve page using user certificate and key -> will succeed
+ * load the certificate and key by installing a function doing the necessary
+ * "modifications" to the SSL CONTEXT just before link init
+ */
+ rv = curl_easy_setopt(ch,CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
+ rv = curl_easy_perform(ch);
+ if (rv==CURLE_OK) {
+ printf("*** transfer succeeded ***\n");
+ }
+ else {
+ printf("*** transfer failed ***\n");
+ }
+
+ curl_easy_cleanup(ch);
+ curl_global_cleanup();
+ return rv;
+}
diff --git a/docs/examples/version-check.pl b/docs/examples/version-check.pl
new file mode 100755
index 00000000..92f0808d
--- /dev/null
+++ b/docs/examples/version-check.pl
@@ -0,0 +1,105 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 script accepts a source file as input on the command line.
+#
+# It first loads the 'symbols-in-versions' document and stores a lookup
+# table for all known symbols for which version they were introduced.
+#
+# It then scans the given source file to dig up all symbols starting with CURL.
+# Finally, it sorts the internal list of found symbols (using the version
+# number as sort key) and then it outputs the most recent version number and
+# the symbols from that version that are used.
+#
+# Usage:
+#
+# version-check.pl [source file]
+#
+
+open(S, "<../libcurl/symbols-in-versions") || die;
+
+my %doc;
+my %rem;
+while(<S>) {
+ if(/(^CURL[^ \n]*) *(.*)/) {
+ my ($sym, $rest)=($1, $2);
+ my @a=split(/ +/, $rest);
+
+ $doc{$sym}=$a[0]; # when it was introduced
+
+ if($a[2]) {
+ # this symbol is documented to have been present the last time
+ # in this release
+ $rem{$sym}=$a[2];
+ }
+ }
+
+}
+
+close(S);
+
+sub age {
+ my ($ver)=@_;
+
+ my @s=split(/\./, $ver);
+ return $s[0]*10000+$s[1]*100+$s[2];
+}
+
+my %used;
+open(C, "<$ARGV[0]") || die;
+
+while(<C>) {
+ if(/\W(CURL[_A-Z0-9v]+)\W/) {
+ #print "$1\n";
+ $used{$1}++;
+ }
+}
+
+close(C);
+
+sub sortversions {
+ my $r = age($doc{$a}) <=> age($doc{$b});
+ if(!$r) {
+ $r = $a cmp $b;
+ }
+ return $r;
+}
+
+my @recent = reverse sort sortversions keys %used;
+
+# the most recent symbol
+my $newsym = $recent[0];
+# the most recent version
+my $newver = $doc{$newsym};
+
+print "The scanned source uses these symbols introduced in $newver:\n";
+
+for my $w (@recent) {
+ if($doc{$w} eq $newver) {
+ printf " $w\n";
+ next;
+ }
+ last;
+}
+
+
diff --git a/docs/examples/xmlstream.c b/docs/examples/xmlstream.c
new file mode 100644
index 00000000..81934450
--- /dev/null
+++ b/docs/examples/xmlstream.c
@@ -0,0 +1,158 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+/* Stream-parse a document using the streaming Expat parser.
+ * Written by David Strauss
+ *
+ * Expat => http://www.libexpat.org/
+ *
+ * gcc -Wall -I/usr/local/include xmlstream.c -lcurl -lexpat -o xmlstream
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <expat.h>
+#include <curl/curl.h>
+
+struct MemoryStruct {
+ char *memory;
+ size_t size;
+};
+
+struct ParserStruct {
+ int ok;
+ size_t tags;
+ size_t depth;
+ struct MemoryStruct characters;
+};
+
+static void startElement(void *userData, const XML_Char *name, const XML_Char **atts)
+{
+ struct ParserStruct *state = (struct ParserStruct *) userData;
+ state->tags++;
+ state->depth++;
+
+ /* Get a clean slate for reading in character data. */
+ free(state->characters.memory);
+ state->characters.memory = NULL;
+ state->characters.size = 0;
+}
+
+static void characterDataHandler(void *userData, const XML_Char *s, int len)
+{
+ struct ParserStruct *state = (struct ParserStruct *) userData;
+ struct MemoryStruct *mem = &state->characters;
+
+ mem->memory = realloc(mem->memory, mem->size + len + 1);
+ if(mem->memory == NULL) {
+ /* Out of memory. */
+ fprintf(stderr, "Not enough memory (realloc returned NULL).\n");
+ state->ok = 0;
+ return;
+ }
+
+ memcpy(&(mem->memory[mem->size]), s, len);
+ mem->size += len;
+ mem->memory[mem->size] = 0;
+}
+
+static void endElement(void *userData, const XML_Char *name)
+{
+ struct ParserStruct *state = (struct ParserStruct *) userData;
+ state->depth--;
+
+ printf("%5lu %10lu %s\n", state->depth, state->characters.size, name);
+}
+
+static size_t parseStreamCallback(void *contents, size_t length, size_t nmemb, void *userp)
+{
+ XML_Parser parser = (XML_Parser) userp;
+ size_t real_size = length * nmemb;
+ struct ParserStruct *state = (struct ParserStruct *) XML_GetUserData(parser);
+
+ /* Only parse if we're not already in a failure state. */
+ if (state->ok && XML_Parse(parser, contents, real_size, 0) == 0) {
+ int error_code = XML_GetErrorCode(parser);
+ fprintf(stderr, "Parsing response buffer of length %lu failed with error code %d (%s).\n",
+ real_size, error_code, XML_ErrorString(error_code));
+ state->ok = 0;
+ }
+
+ return real_size;
+}
+
+int main(void)
+{
+ CURL *curl_handle;
+ CURLcode res;
+ XML_Parser parser;
+ struct ParserStruct state;
+
+ /* Initialize the state structure for parsing. */
+ memset(&state, 0, sizeof(struct ParserStruct));
+ state.ok = 1;
+
+ /* Initialize a namespace-aware parser. */
+ parser = XML_ParserCreateNS(NULL, '\0');
+ XML_SetUserData(parser, &state);
+ XML_SetElementHandler(parser, startElement, endElement);
+ XML_SetCharacterDataHandler(parser, characterDataHandler);
+
+ /* Initialize a libcurl handle. */
+ curl_global_init(CURL_GLOBAL_ALL ^ CURL_GLOBAL_SSL);
+ curl_handle = curl_easy_init();
+ curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.w3schools.com/xml/simple.xml");
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, parseStreamCallback);
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)parser);
+
+ printf("Depth Characters Closing Tag\n");
+
+ /* Perform the request and any follow-up parsing. */
+ res = curl_easy_perform(curl_handle);
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else if (state.ok) {
+ /* Expat requires one final call to finalize parsing. */
+ if (XML_Parse(parser, NULL, 0, 1) == 0) {
+ int error_code = XML_GetErrorCode(parser);
+ fprintf(stderr, "Finalizing parsing failed with error code %d (%s).\n",
+ error_code, XML_ErrorString(error_code));
+ }
+ else {
+ printf(" --------------\n");
+ printf(" %lu tags total\n", state.tags);
+ }
+ }
+
+ /* Clean up. */
+ free(state.characters.memory);
+ XML_ParserFree(parser);
+ curl_easy_cleanup(curl_handle);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/libcurl/.gitignore b/docs/libcurl/.gitignore
new file mode 100644
index 00000000..2e5b359a
--- /dev/null
+++ b/docs/libcurl/.gitignore
@@ -0,0 +1,3 @@
+*.html
+*.pdf
+libcurl-symbols.3
diff --git a/docs/libcurl/ABI b/docs/libcurl/ABI
index 3ec0e04d..ef0caa6f 100644
--- a/docs/libcurl/ABI
+++ b/docs/libcurl/ABI
@@ -7,16 +7,16 @@
libcurl's binary interface
ABI - Application Binary Interface
+----------------------------------
- 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.
+ "ABI" describes the low-level interface between an application program and a
+ library. Calling conventions, function arguments, return values, struct
+ sizes/defines and more.
- For a longer description, see
- http://en.wikipedia.org/wiki/Application_binary_interface
+ [Wikipedia has a longer description](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,11 +26,13 @@ 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
@@ -43,7 +45,11 @@ 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
@@ -54,6 +60,7 @@ 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/Makefile.am b/docs/libcurl/Makefile.am
index 3f949d66..39272ac4 100644
--- a/docs/libcurl/Makefile.am
+++ b/docs/libcurl/Makefile.am
@@ -1,8 +1,29 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
AUTOMAKE_OPTIONS = foreign no-dependencies
+SUBDIRS = opts
+
man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \
curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3 \
curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3 \
@@ -19,7 +40,7 @@ man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \
curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3 \
curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3 \
curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3 \
- curl_multi_socket_action.3
+ curl_multi_socket_action.3 curl_multi_wait.3 libcurl-symbols.3
HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \
curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html \
@@ -39,7 +60,7 @@ HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \
curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html \
curl_multi_timeout.html curl_formget.html curl_multi_assign.html \
curl_easy_pause.html curl_easy_recv.html curl_easy_send.html \
- curl_multi_socket_action.html
+ curl_multi_socket_action.html curl_multi_wait.html libcurl-symbols.html
PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \
curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf \
@@ -58,22 +79,31 @@ PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \
curl_easy_escape.pdf curl_easy_unescape.pdf curl_multi_setopt.pdf \
curl_multi_socket.pdf curl_multi_timeout.pdf curl_formget.pdf \
curl_multi_assign.pdf curl_easy_pause.pdf curl_easy_recv.pdf \
- curl_easy_send.pdf curl_multi_socket_action.pdf
+ curl_easy_send.pdf curl_multi_socket_action.pdf curl_multi_wait.pdf \
+ libcurl-symbols.pdf
+
+m4macrodir = $(datadir)/aclocal
+dist_m4macro_DATA = libcurl.m4
-CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
+CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) libcurl-symbols.3
-EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) libcurl.m4 ABI \
- symbols-in-versions
+EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) ABI \
+ symbols-in-versions symbols.pl mksymbolsmanpage.pl
MAN2HTML= roffit --mandir=. < $< >$@
SUFFIXES = .3 .html
+libcurl-symbols.3: $(srcdir)/symbols-in-versions $(srcdir)/mksymbolsmanpage.pl
+ perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@
+
html: $(HTMLPAGES)
+ cd opts; make html
.3.html:
$(MAN2HTML)
pdf: $(PDFPAGES)
+ cd opts; make pdf
.3.pdf:
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
@@ -81,3 +111,17 @@ pdf: $(PDFPAGES)
ps2pdf $$foo.ps $@; \
rm $$foo.ps; \
echo "converted $< to $@")
+
+# Make sure each option man page is referenced in the main man page
+TESTS = check-easy check-multi
+LOG_COMPILER = $(PERL)
+# The test fails if the log file contains any text
+AM_LOG_FLAGS = -p -e 'die "$$_" if ($$_);'
+
+check-easy: $(srcdir)/curl_easy_setopt.3 $(srcdir)/opts/CURLOPT*.3
+ OPTS="$$(ls $(srcdir)/opts/CURLOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
+ for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_easy_setopt.3 >/dev/null || echo Missing $$opt; done > $@
+
+check-multi: $(srcdir)/curl_multi_setopt.3 $(srcdir)/opts/CURLMOPT*.3
+ OPTS="$$(ls $(srcdir)/opts/CURLMOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
+ for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_multi_setopt.3 >/dev/null || echo Missing $$opt; done > $@
diff --git a/docs/libcurl/Makefile.in b/docs/libcurl/Makefile.in
deleted file mode 100644
index 48151272..00000000
--- a/docs/libcurl/Makefile.in
+++ /dev/null
@@ -1,539 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-#
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = docs/libcurl
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-depcomp =
-am__depfiles_maybe =
-SOURCES =
-DIST_SOURCES =
-man3dir = $(mandir)/man3
-am__installdirs = "$(DESTDIR)$(man3dir)"
-MANS = $(man_MANS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = foreign no-dependencies
-man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \
- curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3 \
- curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3 \
- curl_slist_append.3 curl_slist_free_all.3 curl_version.3 \
- curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3 \
- curl_strequal.3 curl_mprintf.3 curl_global_init.3 curl_global_cleanup.3 \
- curl_multi_add_handle.3 curl_multi_cleanup.3 curl_multi_fdset.3 \
- curl_multi_info_read.3 curl_multi_init.3 curl_multi_perform.3 \
- curl_multi_remove_handle.3 curl_share_cleanup.3 curl_share_init.3 \
- curl_share_setopt.3 libcurl.3 libcurl-easy.3 libcurl-multi.3 \
- libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3 \
- curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3 \
- libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3 \
- curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3 \
- curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3 \
- curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3 \
- curl_multi_socket_action.3
-
-HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \
- curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html \
- curl_easy_duphandle.html curl_formadd.html curl_formfree.html \
- curl_getdate.html curl_getenv.html curl_slist_append.html \
- curl_slist_free_all.html curl_version.html curl_version_info.html \
- curl_escape.html curl_unescape.html curl_free.html curl_strequal.html \
- curl_mprintf.html curl_global_init.html curl_global_cleanup.html \
- curl_multi_add_handle.html curl_multi_cleanup.html \
- curl_multi_fdset.html curl_multi_info_read.html curl_multi_init.html \
- curl_multi_perform.html curl_multi_remove_handle.html \
- curl_share_cleanup.html curl_share_init.html curl_share_setopt.html \
- libcurl.html libcurl-multi.html libcurl-easy.html libcurl-share.html \
- libcurl-errors.html curl_easy_strerror.html curl_multi_strerror.html \
- curl_share_strerror.html curl_global_init_mem.html \
- libcurl-tutorial.html curl_easy_reset.html curl_easy_escape.html \
- curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html \
- curl_multi_timeout.html curl_formget.html curl_multi_assign.html \
- curl_easy_pause.html curl_easy_recv.html curl_easy_send.html \
- curl_multi_socket_action.html
-
-PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \
- curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf \
- curl_easy_duphandle.pdf curl_formadd.pdf curl_formfree.pdf \
- curl_getdate.pdf curl_getenv.pdf curl_slist_append.pdf \
- curl_slist_free_all.pdf curl_version.pdf curl_version_info.pdf \
- curl_escape.pdf curl_unescape.pdf curl_free.pdf curl_strequal.pdf \
- curl_mprintf.pdf curl_global_init.pdf curl_global_cleanup.pdf \
- curl_multi_add_handle.pdf curl_multi_cleanup.pdf curl_multi_fdset.pdf \
- curl_multi_info_read.pdf curl_multi_init.pdf curl_multi_perform.pdf \
- curl_multi_remove_handle.pdf curl_share_cleanup.pdf curl_share_init.pdf \
- curl_share_setopt.pdf libcurl.pdf libcurl-multi.pdf libcurl-easy.pdf \
- libcurl-share.pdf libcurl-errors.pdf curl_easy_strerror.pdf \
- curl_multi_strerror.pdf curl_share_strerror.pdf \
- curl_global_init_mem.pdf libcurl-tutorial.pdf curl_easy_reset.pdf \
- curl_easy_escape.pdf curl_easy_unescape.pdf curl_multi_setopt.pdf \
- curl_multi_socket.pdf curl_multi_timeout.pdf curl_formget.pdf \
- curl_multi_assign.pdf curl_easy_pause.pdf curl_easy_recv.pdf \
- curl_easy_send.pdf curl_multi_socket_action.pdf
-
-CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
-EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) libcurl.m4 ABI \
- symbols-in-versions
-
-MAN2HTML = roffit --mandir=. < $< >$@
-SUFFIXES = .3 .html
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .3 .html .pdf
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/libcurl/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign docs/libcurl/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-man3: $(man3_MANS) $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
- done
-uninstall-man3:
- @$(NORMAL_UNINSTALL)
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
- done
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(MANS)
-installdirs:
- for dir in "$(DESTDIR)$(man3dir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-man
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man: install-man3
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-man
-
-uninstall-man: uninstall-man3
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-man3 \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-info-am uninstall-man \
- uninstall-man3
-
-
-html: $(HTMLPAGES)
-
-.3.html:
- $(MAN2HTML)
-
-pdf: $(PDFPAGES)
-
-.3.pdf:
- @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
- groff -Tps -man $< >$$foo.ps; \
- ps2pdf $$foo.ps $@; \
- rm $$foo.ps; \
- echo "converted $< to $@")
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/docs/libcurl/curl_easy_cleanup.3 b/docs/libcurl/curl_easy_cleanup.3
index 75a37036..e8cd5509 100644
--- a/docs/libcurl/curl_easy_cleanup.3
+++ b/docs/libcurl/curl_easy_cleanup.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -22,29 +22,47 @@
.\"
.TH curl_easy_cleanup 3 "22 aug 2007" "libcurl 7.17.0" "libcurl Manual"
.SH NAME
-curl_easy_cleanup - End a libcurl easy session
+curl_easy_cleanup - End a libcurl easy handle
.SH SYNOPSIS
.B #include <curl/curl.h>
.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 the curl_easy_init call returned.
+same \fIhandle\fP as input that a \fIcurl_easy_init(3)\fP 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
+\fIcurl_easy_setopt(3)\fP). Like if libcurl decides to shut down the
+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 uses of the \fBhandle\fP after this function has been called are
-illegal. This kills the handle and all memory associated with it!
+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!
-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.
+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.
.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), "
-
+.BR curl_easy_init "(3), " curl_easy_duphandle "(3), "
+.BR curl_easy_reset "(3), "
+.BR curl_multi_cleanup "(3), " curl_multi_remove_handle "(3) "
diff --git a/docs/libcurl/curl_easy_cleanup.html b/docs/libcurl/curl_easy_cleanup.html
deleted file mode 100644
index bc113e66..00000000
--- a/docs/libcurl/curl_easy_cleanup.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_easy_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_cleanup - End a libcurl easy session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">void curl_easy_cleanup(CURL * handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function must be the last function to call for an easy session. It is the opposite of the <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> function and must be called with the same <span Class="emphasis">handle</span> as input that the curl_easy_init call returned.
-<p class="level0">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.
-<p class="level0">Any uses of the <span Class="bold">handle</span> after this function has been called are illegal. This kills the handle and all memory associated with it!
-<p class="level0">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. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">None <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_cleanup.pdf b/docs/libcurl/curl_easy_cleanup.pdf
deleted file mode 100644
index 404b42f0..00000000
--- a/docs/libcurl/curl_easy_cleanup.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_duphandle.3 b/docs/libcurl/curl_easy_duphandle.3
index 3fae30e6..34cba58c 100644
--- a/docs/libcurl/curl_easy_duphandle.3
+++ b/docs/libcurl/curl_easy_duphandle.3
@@ -1,7 +1,25 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
-.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 curl_easy_duphandle 3 "19 Sep 2014" "libcurl" "libcurl Manual"
.SH NAME
curl_easy_duphandle - Clone a libcurl session handle
.SH SYNOPSIS
@@ -29,5 +47,6 @@ 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_easy_reset "(3),"
+.BR curl_global_init "(3)"
diff --git a/docs/libcurl/curl_easy_duphandle.html b/docs/libcurl/curl_easy_duphandle.html
deleted file mode 100644
index d072ded2..00000000
--- a/docs/libcurl/curl_easy_duphandle.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_easy_duphandle man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_duphandle - Clone a libcurl session handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURL *curl_easy_duphandle(CURL *handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function will return a new curl handle, a duplicate, using all the options previously set in the input curl <span Class="emphasis">handle</span>. Both handles can subsequently be used independently and they must both be freed with <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>.
-<p class="level0">All strings that the input handle has been told to point to (as opposed to copy) with previous calls to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> using char * inputs, will be pointed to by the new handle as well. You must therefore make sure to keep the data around until both handles have been cleaned up.
-<p class="level0">The new handle will <span Class="bold">not</span> inherit any state information, no connections, no SSL sessions and no cookies.
-<p class="level0"><span Class="bold">Note</span> that even in multi-threaded programs, this function must be called in a synchronous way, the input handle may not be in use when cloned. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns NULL, something went wrong and no valid handle was returned. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <a class="manpage" href="./curl_easy_cleanup.html"> curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_global_init.html"> curl_global_init (3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_duphandle.pdf b/docs/libcurl/curl_easy_duphandle.pdf
deleted file mode 100644
index 342d3bb5..00000000
--- a/docs/libcurl/curl_easy_duphandle.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_escape.3 b/docs/libcurl/curl_easy_escape.3
index 2c09875c..da2b3822 100644
--- a/docs/libcurl/curl_easy_escape.3
+++ b/docs/libcurl/curl_easy_escape.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,21 +26,32 @@ curl_easy_escape - URL encodes the given string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
-.BI "char *curl_easy_escape( CURL *" curl ", char *" url ", int "length " );"
+.BI "char *curl_easy_escape( CURL *" curl ", char *" string ", int "length " );"
.ad
.SH DESCRIPTION
-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 or 0-9 are converted to their "URL escaped" version (%NN where NN is a
-two-digit hexadecimal number).
+This function converts the given input \fIstring\fP to a 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.
+If \fIlength\fP is set to 0 (zero), \fIcurl_easy_escape(3)\fP uses strlen() on
+the input \fIstring\fP to find out the size.
You must \fIcurl_free(3)\fP the returned string when you're done with it.
.SH AVAILABILITY
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 2396
+.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 3986
diff --git a/docs/libcurl/curl_easy_escape.html b/docs/libcurl/curl_easy_escape.html
deleted file mode 100644
index 1ecf4646..00000000
--- a/docs/libcurl/curl_easy_escape.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_escape man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_escape - URL encodes the given string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">char *curl_easy_escape( CURL * curl , char * url , int length );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">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 or 0-9 are converted to their "URL escaped" version (%NN where NN is a two-digit hexadecimal number).
-<p class="level0">If the <span Class="bold">length</span> argument is set to 0 (zero), <a class="emphasis" href="./curl_easy_escape.html">curl_easy_escape(3)</a> uses strlen() on the input <span Class="bold">url</span> to find out the size.
-<p class="level0">You must <a class="emphasis" href="./curl_free.html">curl_free(3)</a> the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Added in 7.15.4 and replaces the old <a class="emphasis" href="./curl_escape.html">curl_escape(3)</a> function. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_unescape.html">curl_easy_unescape (3)</a> <a class="manpage" href="./curl_free.html"> curl_free (3)</a> <span Class="manpage"> RFC 2396</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_escape.pdf b/docs/libcurl/curl_easy_escape.pdf
deleted file mode 100644
index 7945390d..00000000
--- a/docs/libcurl/curl_easy_escape.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_getinfo.3 b/docs/libcurl/curl_easy_getinfo.3
index 9f298ed7..d48ca04c 100644
--- a/docs/libcurl/curl_easy_getinfo.3
+++ b/docs/libcurl/curl_easy_getinfo.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -44,11 +44,13 @@ The following information can be extracted:
.IP CURLINFO_EFFECTIVE_URL
Pass a pointer to a char pointer to receive the last used effective URL.
.IP CURLINFO_RESPONSE_CODE
-Pass a pointer to a long to receive the last received HTTP or FTP code. This
-option was known as CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. This
-will be zero if no server response code has been received. Note that a proxy's
-CONNECT response should be read with \fICURLINFO_HTTP_CONNECTCODE\fP and not
-this.
+Pass a pointer to a long to receive the last received HTTP, FTP or SMTP
+response code. This option was previously known as CURLINFO_HTTP_CODE in
+libcurl 7.10.7 and earlier. The value will be zero if no server response code
+has been received. Note that a proxy's CONNECT response should be read with
+\fICURLINFO_HTTP_CONNECTCODE\fP and not this.
+
+Support for SMTP responses added in 7.25.0.
.IP CURLINFO_HTTP_CONNECTCODE
Pass a pointer to a long to receive the last received proxy response code to a
CONNECT request.
@@ -58,9 +60,9 @@ Pass a pointer to a long to receive the remote time of the retrieved document
-1, it can be because of many reasons (unknown, the server hides it or the
server doesn't support the command that tells document time etc) and the time
of the document is unknown. Note that you must tell the server to collect this
-information before the transfer is made, by using the CURLOPT_FILETIME option
-to \fIcurl_easy_setopt(3)\fP or you will unconditionally get a -1 back. (Added
-in 7.5)
+information before the transfer is made, by using the
+\fICURLOPT_FILETIME(3)\fP option to \fIcurl_easy_setopt(3)\fP or you will
+unconditionally get a -1 back. (Added in 7.5)
.IP CURLINFO_TOTAL_TIME
Pass a pointer to a double to receive the total time in seconds for the
previous transfer, including name resolving, TCP connect etc.
@@ -74,18 +76,19 @@ 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 pippelining 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 pipelining 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
pre-transfer commands and negotiations that are specific to the particular
-protocol(s) involved.
+protocol(s) involved. It does \fInot\fP involve the sending of the protocol-
+specific request that triggers a transfer.
.IP CURLINFO_STARTTRANSFER_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the
-start until the first byte is just about to be transferred. This includes
-CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate
-the result.
+start until the first byte is received by libcurl. This includes
+CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the
+result.
.IP CURLINFO_REDIRECT_TIME
Pass a pointer to a double to receive the total time, in seconds, it took for
all redirection steps include name lookup, connect, pretransfer and transfer
@@ -96,17 +99,19 @@ Pass a pointer to a long to receive the total number of redirections that were
actually followed. (Added in 7.9.7)
.IP CURLINFO_REDIRECT_URL
Pass a pointer to a char pointer to receive the URL a redirect \fIwould\fP
-take you to if you would enable CURLOPT_FOLLOWLOCATION. This can come very
-handy if you think using the built-in libcurl redirect logic isn't good enough
-for you but you would still prefer to avoid implementing all the magic of
-figuring out the new URL. (Added in 7.18.2)
+take you to if you would enable \fICURLOPT_FOLLOWLOCATION(3)\fP. This can come
+very handy if you think using the built-in libcurl redirect logic isn't good
+enough for you but you would still prefer to avoid implementing all the magic
+of figuring out the new URL. (Added in 7.18.2)
.IP CURLINFO_SIZE_UPLOAD
Pass a pointer to a double to receive the total amount of bytes that were
uploaded.
.IP CURLINFO_SIZE_DOWNLOAD
Pass a pointer to a double to receive the total amount of bytes that were
downloaded. The amount is only for the latest transfer and will be reset again
-for each new transfer.
+for each new transfer. This counts actual payload data, what's also commonly
+called body. All meta and header data are excluded and will not be counted in
+this number.
.IP CURLINFO_SPEED_DOWNLOAD
Pass a pointer to a double to receive the average download speed that curl
measured for the complete download. Measured in bytes/second.
@@ -122,8 +127,8 @@ requests. This is so far only for HTTP requests. Note that this may be more
than one request if FOLLOWLOCATION is true.
.IP CURLINFO_SSL_VERIFYRESULT
Pass a pointer to a long to receive the result of the certification
-verification that was requested (using the CURLOPT_SSL_VERIFYPEER option to
-\fIcurl_easy_setopt(3)\fP).
+verification that was requested (using the \fICURLOPT_SSL_VERIFYPEER(3)\fP
+option to \fIcurl_easy_setopt(3)\fP).
.IP CURLINFO_SSL_ENGINES
Pass the address of a 'struct curl_slist *' to receive a linked-list of
OpenSSL crypto-engines supported. Note that engines are normally implemented
@@ -145,21 +150,22 @@ it means that the server didn't send a valid Content-Type header or that the
protocol used doesn't support this.
.IP CURLINFO_PRIVATE
Pass a pointer to a char pointer to receive the pointer to the private data
-associated with the curl handle (set with the CURLOPT_PRIVATE option to
-\fIcurl_easy_setopt(3)\fP). Please note that for internal reasons, the
+associated with the curl handle (set with the \fICURLOPT_PRIVATE(3)\fP option
+to \fIcurl_easy_setopt(3)\fP). Please note that for internal reasons, the
value is returned as a char pointer, although effectively being a 'void *'.
(Added in 7.10.3)
.IP CURLINFO_HTTPAUTH_AVAIL
Pass a pointer to a long to receive a bitmask indicating the authentication
method(s) available. The meaning of the bits is explained in the
-CURLOPT_HTTPAUTH option for \fIcurl_easy_setopt(3)\fP. (Added in 7.10.8)
+\fICURLOPT_HTTPAUTH(3)\fP option for \fIcurl_easy_setopt(3)\fP. (Added in
+7.10.8)
.IP CURLINFO_PROXYAUTH_AVAIL
Pass a pointer to a long to receive a bitmask indicating the authentication
method(s) available for your proxy authentication. (Added in 7.10.8)
.IP CURLINFO_OS_ERRNO
Pass a pointer to a long to receive the errno variable from a connect failure.
Note that the value is only set on failure, it is not reset upon a
-successfull operation. (Added in 7.12.2)
+successful operation. (Added in 7.12.2)
.IP CURLINFO_NUM_CONNECTS
Pass a pointer to a long to receive how many new connections libcurl had to
create to achieve the previous transfer (only the successful connects are
@@ -196,8 +202,8 @@ Pass a pointer to a long to receive the last socket used by this curl
session. If the socket is no longer valid, -1 is returned. When you finish
working with the socket, you must call curl_easy_cleanup() as usual and let
libcurl close the socket and cleanup other resources associated with the
-handle. This is typically used in combination with \fICURLOPT_CONNECT_ONLY\fP.
-(Added in 7.15.2)
+handle. This is typically used in combination with
+\fICURLOPT_CONNECT_ONLY(3)\fP. (Added in 7.15.2)
NOTE: this API is not really working on win64, since the SOCKET type on win64
is 64 bit large while its 'long' is only 32 bits.
@@ -206,20 +212,54 @@ Pass a pointer to a char pointer to receive a pointer to a string holding the
path of the entry path. That is the initial path libcurl ended up in when
logging on to the remote FTP server. This stores a NULL as pointer if
something is wrong. (Added in 7.15.4)
+
+Also works for SFTP since 7.21.4
.IP CURLINFO_CERTINFO
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
struct that holds a number of linked lists with info about the certificate
-chain, assuming you had CURLOPT_CERTINFO enabled when the previous 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 support. (Added in
-7.19.1)
+chain, assuming you had \fICURLOPT_CERTINFO(3)\fP enabled when the previous
+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)
+.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.
+
+This may then be used to extract certificate information in a format
+convenient for further processing, such as manual validation. NOTE: this
+option may not be available for all SSL backends; unsupported SSL backends
+will return 'CURLSSLBACKEND_NONE' to indicate that they are not supported;
+this does not mean that no SSL backend was used. (Added in 7.34.0)
+
+.nf
+struct curl_tlssessioninfo {
+ curl_sslbackend backend;
+ void *internals;
+};
+.fi
+
+The \fIinternals\fP struct member will point to a TLS library specific pointer
+with the following underlying types:
+.RS
+.IP OpenSSL
+SSL_CTX *
+.IP GnuTLS
+gnutls_session_t
+.IP NSS
+PRFileDesc *
+.IP gskit
+gsk_handle
+.RE
+
.IP CURLINFO_CONDITION_UNMET
Pass a pointer to a long to receive the number 1 if the condition provided in
-the previous request didn't match (see \fICURLOPT_TIMECONDITION\fP). Alas, if
-this returns a 1 you know that the reason you didn't get data in return is
+the previous request didn't match (see \fICURLOPT_TIMECONDITION(3)\fP). Alas,
+if this returns a 1 you know that the reason you didn't get data in return is
because it didn't fulfill the condition. The long ths argument points to will
get a zero stored if the condition instead was met. (Added in 7.19.4)
.IP CURLINFO_RTSP_SESSION_ID
@@ -227,7 +267,7 @@ Pass a pointer to a char pointer to receive a pointer to a string holding the
most recent RTSP Session ID.
Applications wishing to resume an RTSP session on another connection should
-retreive this info before closing the active connection.
+retrieve this info before closing the active connection.
.IP CURLINFO_RTSP_CLIENT_CSEQ
Pass a pointer to a long to receive the next CSeq that will be used by the
application.
@@ -239,7 +279,7 @@ by the application.
unimplemented).\fP
Applications wishing to resume an RTSP session on another connection should
-retreive this info before closing the active connection.
+retrieve this info before closing the active connection.
.IP CURLINFO_RTSP_CSEQ_RECV
Pass a pointer to a long to receive the most recently received CSeq from the
server. If your application encounters a \fICURLE_RTSP_CSEQ_ERROR\fP then you
@@ -273,7 +313,7 @@ file transfer is just about to begin. This includes all pre-transfer commands
and negotiations that are specific to the particular protocol(s) involved.
.IP STARTTRANSFER
\fICURLINFO_STARTTRANSFER_TIME\fP. The time it took from the start until the
-first byte is just about to be transferred.
+first byte is received by libcurl.
.IP TOTAL
\fICURLINFO_TOTAL_TIME\fP. Total time of the previous request.
.IP REDIRECT
diff --git a/docs/libcurl/curl_easy_getinfo.html b/docs/libcurl/curl_easy_getinfo.html
deleted file mode 100644
index 5b949e95..00000000
--- a/docs/libcurl/curl_easy_getinfo.html
+++ /dev/null
@@ -1,173 +0,0 @@
-<html><head>
-<title>curl_easy_getinfo man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_getinfo - extract information from a curl handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Request internal information from the curl session with this function. The third argument <span Class="bold">MUST</span> be a pointer to a long, a pointer to a char *, a pointer to a struct curl_slist * or a pointer to a double (as this documentation describes further down). The data pointed-to will be filled in accordingly and can be relied upon only if the function returns CURLE_OK. Use this function AFTER a performed transfer if you want to get transfer- oriented data.
-<p class="level0">You should not free the memory returned by this function unless it is explicitly mentioned below. <a name="AVAILABLE"></a><h2 class="nroffsh">AVAILABLE INFORMATION</h2>
-<p class="level0">The following information can be extracted:
-<p class="level0"><a name="CURLINFOEFFECTIVEURL"></a><span class="nroffip">CURLINFO_EFFECTIVE_URL</span>
-<p class="level1">Pass a pointer to a char pointer to receive the last used effective URL.
-<p class="level0"><a name="CURLINFORESPONSECODE"></a><span class="nroffip">CURLINFO_RESPONSE_CODE</span>
-<p class="level1">Pass a pointer to a long to receive the last received HTTP or FTP code. This option was known as CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. This will be zero if no server response code has been received. Note that a proxy's CONNECT response should be read with <a class="emphasis" href="#CURLINFOHTTPCONNECTCODE">CURLINFO_HTTP_CONNECTCODE</a> and not this.
-<p class="level0"><a name="CURLINFOHTTPCONNECTCODE"></a><span class="nroffip">CURLINFO_HTTP_CONNECTCODE</span>
-<p class="level1">Pass a pointer to a long to receive the last received proxy response code to a CONNECT request.
-<p class="level0"><a name="CURLINFOFILETIME"></a><span class="nroffip">CURLINFO_FILETIME</span>
-<p class="level1">Pass a pointer to a long to receive the remote time of the retrieved document (in number of seconds since 1 jan 1970 in the GMT/UTC time zone). If you get -1, it can be because of many reasons (unknown, the server hides it or the server doesn't support the command that tells document time etc) and the time of the document is unknown. Note that you must tell the server to collect this information before the transfer is made, by using the CURLOPT_FILETIME option to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> or you will unconditionally get a -1 back. (Added in 7.5)
-<p class="level0"><a name="CURLINFOTOTALTIME"></a><span class="nroffip">CURLINFO_TOTAL_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the total time in seconds for the previous transfer, including name resolving, TCP connect etc.
-<p class="level0"><a name="CURLINFONAMELOOKUPTIME"></a><span class="nroffip">CURLINFO_NAMELOOKUP_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the name resolving was completed.
-<p class="level0"><a name="CURLINFOCONNECTTIME"></a><span class="nroffip">CURLINFO_CONNECT_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the connect to the remote host (or proxy) was completed.
-<p class="level0"><a name="CURLINFOAPPCONNECTTIME"></a><span class="nroffip">CURLINFO_APPCONNECT_TIME</span>
-<p class="level1">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 pippelining where the pretransfer time can be delayed due to waits in line for the pipeline and more. (Added in 7.19.0)
-<p class="level0"><a name="CURLINFOPRETRANSFERTIME"></a><span class="nroffip">CURLINFO_PRETRANSFER_TIME</span>
-<p class="level1">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 pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
-<p class="level0"><a name="CURLINFOSTARTTRANSFERTIME"></a><span class="nroffip">CURLINFO_STARTTRANSFER_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the first byte is just about to be transferred. This includes CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the result.
-<p class="level0"><a name="CURLINFOREDIRECTTIME"></a><span class="nroffip">CURLINFO_REDIRECT_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the total time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started. CURLINFO_REDIRECT_TIME contains the complete execution time for multiple redirections. (Added in 7.9.7)
-<p class="level0"><a name="CURLINFOREDIRECTCOUNT"></a><span class="nroffip">CURLINFO_REDIRECT_COUNT</span>
-<p class="level1">Pass a pointer to a long to receive the total number of redirections that were actually followed. (Added in 7.9.7)
-<p class="level0"><a name="CURLINFOREDIRECTURL"></a><span class="nroffip">CURLINFO_REDIRECT_URL</span>
-<p class="level1">Pass a pointer to a char pointer to receive the URL a redirect <span Class="emphasis">would</span> take you to if you would enable CURLOPT_FOLLOWLOCATION. This can come very handy if you think using the built-in libcurl redirect logic isn't good enough for you but you would still prefer to avoid implementing all the magic of figuring out the new URL. (Added in 7.18.2)
-<p class="level0"><a name="CURLINFOSIZEUPLOAD"></a><span class="nroffip">CURLINFO_SIZE_UPLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the total amount of bytes that were uploaded.
-<p class="level0"><a name="CURLINFOSIZEDOWNLOAD"></a><span class="nroffip">CURLINFO_SIZE_DOWNLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the total amount of bytes that were downloaded. The amount is only for the latest transfer and will be reset again for each new transfer.
-<p class="level0"><a name="CURLINFOSPEEDDOWNLOAD"></a><span class="nroffip">CURLINFO_SPEED_DOWNLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the average download speed that curl measured for the complete download. Measured in bytes/second.
-<p class="level0"><a name="CURLINFOSPEEDUPLOAD"></a><span class="nroffip">CURLINFO_SPEED_UPLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the average upload speed that curl measured for the complete upload. Measured in bytes/second.
-<p class="level0"><a name="CURLINFOHEADERSIZE"></a><span class="nroffip">CURLINFO_HEADER_SIZE</span>
-<p class="level1">Pass a pointer to a long to receive the total size of all the headers received. Measured in number of bytes.
-<p class="level0"><a name="CURLINFOREQUESTSIZE"></a><span class="nroffip">CURLINFO_REQUEST_SIZE</span>
-<p class="level1">Pass a pointer to a long to receive the total size of the issued requests. This is so far only for HTTP requests. Note that this may be more than one request if FOLLOWLOCATION is true.
-<p class="level0"><a name="CURLINFOSSLVERIFYRESULT"></a><span class="nroffip">CURLINFO_SSL_VERIFYRESULT</span>
-<p class="level1">Pass a pointer to a long to receive the result of the certification verification that was requested (using the CURLOPT_SSL_VERIFYPEER option to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>).
-<p class="level0"><a name="CURLINFOSSLENGINES"></a><span class="nroffip">CURLINFO_SSL_ENGINES</span>
-<p class="level1">Pass the address of a 'struct curl_slist *' to receive a linked-list of OpenSSL crypto-engines supported. Note that engines are normally implemented in separate dynamic libraries. Hence not all the returned engines may be available at run-time. <span Class="bold">NOTE:</span> you must call <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> on the list pointer once you're done with it, as libcurl will not free the data for you. (Added in 7.12.3)
-<p class="level0"><a name="CURLINFOCONTENTLENGTHDOWNLOAD"></a><span class="nroffip">CURLINFO_CONTENT_LENGTH_DOWNLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the content-length of the download. This is the value read from the Content-Length: field. Since 7.19.4, this returns -1 if the size isn't known.
-<p class="level0"><a name="CURLINFOCONTENTLENGTHUPLOAD"></a><span class="nroffip">CURLINFO_CONTENT_LENGTH_UPLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the specified size of the upload. Since 7.19.4, this returns -1 if the size isn't known.
-<p class="level0"><a name="CURLINFOCONTENTTYPE"></a><span class="nroffip">CURLINFO_CONTENT_TYPE</span>
-<p class="level1">Pass a pointer to a char pointer to receive the content-type of the downloaded object. This is the value read from the Content-Type: field. If you get NULL, it means that the server didn't send a valid Content-Type header or that the protocol used doesn't support this.
-<p class="level0"><a name="CURLINFOPRIVATE"></a><span class="nroffip">CURLINFO_PRIVATE</span>
-<p class="level1">Pass a pointer to a char pointer to receive the pointer to the private data associated with the curl handle (set with the CURLOPT_PRIVATE option to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>). Please note that for internal reasons, the value is returned as a char pointer, although effectively being a 'void *'. (Added in 7.10.3)
-<p class="level0"><a name="CURLINFOHTTPAUTHAVAIL"></a><span class="nroffip">CURLINFO_HTTPAUTH_AVAIL</span>
-<p class="level1">Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available. The meaning of the bits is explained in the CURLOPT_HTTPAUTH option for <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>. (Added in 7.10.8)
-<p class="level0"><a name="CURLINFOPROXYAUTHAVAIL"></a><span class="nroffip">CURLINFO_PROXYAUTH_AVAIL</span>
-<p class="level1">Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available for your proxy authentication. (Added in 7.10.8)
-<p class="level0"><a name="CURLINFOOSERRNO"></a><span class="nroffip">CURLINFO_OS_ERRNO</span>
-<p class="level1">Pass a pointer to a long to receive the errno variable from a connect failure. Note that the value is only set on failure, it is not reset upon a successfull operation. (Added in 7.12.2)
-<p class="level0"><a name="CURLINFONUMCONNECTS"></a><span class="nroffip">CURLINFO_NUM_CONNECTS</span>
-<p class="level1">Pass a pointer to a long to receive how many new connections libcurl had to create to achieve the previous transfer (only the successful connects are counted). Combined with <a class="emphasis" href="#CURLINFOREDIRECTCOUNT">CURLINFO_REDIRECT_COUNT</a> you are able to know how many times libcurl successfully reused existing connection(s) or not. See the Connection Options of <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> to see how libcurl tries to make persistent connections to save time. (Added in 7.12.3)
-<p class="level0"><a name="CURLINFOPRIMARYIP"></a><span class="nroffip">CURLINFO_PRIMARY_IP</span>
-<p class="level1">Pass a pointer to a char pointer to receive the pointer to a zero-terminated string holding the IP address of the most recent connection done with this <span Class="bold">curl</span> handle. This string may be IPv6 if that's enabled. Note that you get a pointer to a memory area that will be re-used at next request so you need to copy the string if you want to keep the information. (Added in 7.19.0)
-<p class="level0"><a name="CURLINFOPRIMARYPORT"></a><span class="nroffip">CURLINFO_PRIMARY_PORT</span>
-<p class="level1">Pass a pointer to a long to receive the destination port of the most recent connection done with this <span Class="bold">curl</span> handle. (Added in 7.21.0)
-<p class="level0"><a name="CURLINFOLOCALIP"></a><span class="nroffip">CURLINFO_LOCAL_IP</span>
-<p class="level1">Pass a pointer to a char pointer to receive the pointer to a zero-terminated string holding the local (source) IP address of the most recent connection done with this <span Class="bold">curl</span> handle. This string may be IPv6 if that's enabled. The same restrictions apply as to <a class="emphasis" href="#CURLINFOPRIMARYIP">CURLINFO_PRIMARY_IP</a>. (Added in 7.21.0)
-<p class="level0"><a name="CURLINFOLOCALPORT"></a><span class="nroffip">CURLINFO_LOCAL_PORT</span>
-<p class="level1">Pass a pointer to a long to receive the local (source) port of the most recent connection done with this <span Class="bold">curl</span> handle. (Added in 7.21.0)
-<p class="level0"><a name="CURLINFOCOOKIELIST"></a><span class="nroffip">CURLINFO_COOKIELIST</span>
-<p class="level1">Pass a pointer to a 'struct curl_slist *' to receive a linked-list of all cookies cURL knows (expired ones, too). Don't forget to <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> the list after it has been used. If there are no cookies (cookies for the handle have not been enabled or simply none have been received) 'struct curl_slist *' will be set to point to NULL. (Added in 7.14.1)
-<p class="level0"><a name="CURLINFOLASTSOCKET"></a><span class="nroffip">CURLINFO_LASTSOCKET</span>
-<p class="level1">Pass a pointer to a long to receive the last socket used by this curl session. If the socket is no longer valid, -1 is returned. When you finish working with the socket, you must call curl_easy_cleanup() as usual and let libcurl close the socket and cleanup other resources associated with the handle. This is typically used in combination with <span Class="emphasis">CURLOPT_CONNECT_ONLY</span>. (Added in 7.15.2)
-<p class="level1">NOTE: this API is not really working on win64, since the SOCKET type on win64 is 64 bit large while its 'long' is only 32 bits.
-<p class="level0"><a name="CURLINFOFTPENTRYPATH"></a><span class="nroffip">CURLINFO_FTP_ENTRY_PATH</span>
-<p class="level1">Pass a pointer to a char pointer to receive a pointer to a string holding the path of the entry path. That is the initial path libcurl ended up in when logging on to the remote FTP server. This stores a NULL as pointer if something is wrong. (Added in 7.15.4)
-<p class="level0"><a name="CURLINFOCERTINFO"></a><span class="nroffip">CURLINFO_CERTINFO</span>
-<p class="level1">Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to struct that holds a number of linked lists with info about the certificate chain, assuming you had CURLOPT_CERTINFO enabled when the previous 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 support. (Added in 7.19.1)
-<p class="level0"><a name="CURLINFOCONDITIONUNMET"></a><span class="nroffip">CURLINFO_CONDITION_UNMET</span>
-<p class="level1">Pass a pointer to a long to receive the number 1 if the condition provided in the previous request didn't match (see <span Class="emphasis">CURLOPT_TIMECONDITION</span>). Alas, if this returns a 1 you know that the reason you didn't get data in return is because it didn't fulfill the condition. The long ths argument points to will get a zero stored if the condition instead was met. (Added in 7.19.4)
-<p class="level0"><a name="CURLINFORTSPSESSIONID"></a><span class="nroffip">CURLINFO_RTSP_SESSION_ID</span>
-<p class="level1">Pass a pointer to a char pointer to receive a pointer to a string holding the most recent RTSP Session ID.
-<p class="level1">Applications wishing to resume an RTSP session on another connection should retreive this info before closing the active connection.
-<p class="level0"><a name="CURLINFORTSPCLIENTCSEQ"></a><span class="nroffip">CURLINFO_RTSP_CLIENT_CSEQ</span>
-<p class="level1">Pass a pointer to a long to receive the next CSeq that will be used by the application.
-<p class="level0"><a name="CURLINFORTSPSERVERCSEQ"></a><span class="nroffip">CURLINFO_RTSP_SERVER_CSEQ</span>
-<p class="level1">Pass a pointer to a long to receive the next server CSeq that will be expected by the application.
-<p class="level1"><span class="emphasis">(NOTE: listening for server initiated requests is currently unimplemented).</span>
-<p class="level1">Applications wishing to resume an RTSP session on another connection should retreive this info before closing the active connection.
-<p class="level0"><a name="CURLINFORTSPCSEQRECV"></a><span class="nroffip">CURLINFO_RTSP_CSEQ_RECV</span>
-<p class="level1">Pass a pointer to a long to receive the most recently received CSeq from the server. If your application encounters a <span Class="emphasis">CURLE_RTSP_CSEQ_ERROR</span> then you may wish to troubleshoot and/or fix the CSeq mismatch by peeking at this value. <a name="TIMES"></a><h2 class="nroffsh">TIMES</h2>
-<p class="level0"><pre>
-<p class="level0">An overview of the six time values available from curl_easy_getinfo()
- <p class="level0">curl_easy_perform()
- &nbsp; |
- &nbsp; |--NAMELOOKUP
- &nbsp; |--|--CONNECT
- &nbsp; |--|--|--APPCONNECT
- &nbsp; |--|--|--|--PRETRANSFER
- &nbsp; |--|--|--|--|--STARTTRANSFER
- &nbsp; |--|--|--|--|--|--TOTAL
- &nbsp; |--|--|--|--|--|--REDIRECT
- </pre>
-
-<p class="level0">
-<p class="level0"><a name="NAMELOOKUP"></a><span class="nroffip">NAMELOOKUP</span>
-<p class="level1"><a class="emphasis" href="#CURLINFONAMELOOKUPTIME">CURLINFO_NAMELOOKUP_TIME</a>. The time it took from the start until the name resolving was completed.
-<p class="level0"><a name="CONNECT"></a><span class="nroffip">CONNECT</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOCONNECTTIME">CURLINFO_CONNECT_TIME</a>. The time it took from the start until the connect to the remote host (or proxy) was completed.
-<p class="level0"><a name="APPCONNECT"></a><span class="nroffip">APPCONNECT</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOAPPCONNECTTIME">CURLINFO_APPCONNECT_TIME</a>. The time it took from the start until the SSL connect/handshake with the remote host was completed. (Added in in 7.19.0)
-<p class="level0"><a name="PRETRANSFER"></a><span class="nroffip">PRETRANSFER</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOPRETRANSFERTIME">CURLINFO_PRETRANSFER_TIME</a>. The time it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
-<p class="level0"><a name="STARTTRANSFER"></a><span class="nroffip">STARTTRANSFER</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOSTARTTRANSFERTIME">CURLINFO_STARTTRANSFER_TIME</a>. The time it took from the start until the first byte is just about to be transferred.
-<p class="level0"><a name="TOTAL"></a><span class="nroffip">TOTAL</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOTOTALTIME">CURLINFO_TOTAL_TIME</a>. Total time of the previous request.
-<p class="level0"><a name="REDIRECT"></a><span class="nroffip">REDIRECT</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOREDIRECTTIME">CURLINFO_REDIRECT_TIME</a>. The time it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started. So, this is zero if no redirection took place. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If the operation was successful, CURLE_OK is returned. Otherwise an appropriate error code will be returned. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_getinfo.pdf b/docs/libcurl/curl_easy_getinfo.pdf
deleted file mode 100644
index 0a89a844..00000000
--- a/docs/libcurl/curl_easy_getinfo.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_init.3 b/docs/libcurl/curl_easy_init.3
index 478db5c0..4f7f0042 100644
--- a/docs/libcurl/curl_easy_init.3
+++ b/docs/libcurl/curl_easy_init.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
.SH NAME
curl_easy_init - Start a libcurl easy session
@@ -6,26 +26,34 @@ curl_easy_init - Start a libcurl easy session
.B #include <curl/curl.h>
.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 easy-functions. curl_easy_init
-initializes curl and this call \fBMUST\fP have a corresponding call to
+handle that you must use as input to other functions in the easy
+interface. 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.
-
-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.
+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.
.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_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3), "
+.BR curl_easy_perform "(3) "
diff --git a/docs/libcurl/curl_easy_init.html b/docs/libcurl/curl_easy_init.html
deleted file mode 100644
index 7e63cbdf..00000000
--- a/docs/libcurl/curl_easy_init.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_init man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_init - Start a libcurl easy session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURL *curl_easy_init( );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function must be the first function to call, and it returns a CURL easy handle that you must use as input to other easy-functions. curl_easy_init initializes curl and this call <span Class="bold">MUST</span> have a corresponding call to <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> when the operation is complete.
-<p class="level0">If you did not already call <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a>, <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> does it automatically. This may be lethal in multi-threaded cases, since <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> is not thread-safe, and it may result in resource problems because there is no corresponding cleanup.
-<p class="level0">You are strongly advised to not allow this automatic behaviour, by calling <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> yourself properly. See the description in <span Class="bold">libcurl</span>(3) of global environment requirements for details of how to use this function.
-<p class="level0"><a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns NULL, something went wrong and you cannot use the other curl functions. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_cleanup.html">curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_global_init.html"> curl_global_init (3)</a> <a class="manpage" href="./curl_easy_reset.html"> curl_easy_reset (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_init.pdf b/docs/libcurl/curl_easy_init.pdf
deleted file mode 100644
index 6ddd4831..00000000
--- a/docs/libcurl/curl_easy_init.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_pause.3 b/docs/libcurl/curl_easy_pause.3
index 4d16ecff..0f6ad5a3 100644
--- a/docs/libcurl/curl_easy_pause.3
+++ b/docs/libcurl/curl_easy_pause.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_easy_pause 3 "17 Dec 2007" "libcurl 7.18.0" "libcurl Manual"
.SH NAME
curl_easy_pause - pause and unpause a connection
@@ -11,15 +31,17 @@ curl_easy_pause - pause and unpause a connection
Using this function, you can explicitly mark a running connection to get
paused, and you can unpause a connection that was previously paused.
-A connection can be paused by using this function or by letting the read
-or the write callbacks return the proper magic return code
+A connection can be paused by using this function or by letting the read or
+the write callbacks return the proper magic return code
(\fICURL_READFUNC_PAUSE\fP and \fICURL_WRITEFUNC_PAUSE\fP). A write callback
that returns pause signals to the library that it couldn't take care of any
data at all, and that data will then be delivered again to the callback when
the writing is later unpaused.
-NOTE: while it may feel tempting, take care and notice that you cannot call
-this function from another thread.
+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.
When this function is called to unpause reading, the chance is high that you
will get your write callback called before this function returns.
@@ -32,11 +54,11 @@ connection. The following bits can be used:
.IP CURLPAUSE_RECV
Pause receiving data. There will be no data received on this connection until
this function is called again without this bit set. Thus, the write callback
-(\fICURLOPT_WRITEFUNCTION\fP) won't be called.
+(\fICURLOPT_WRITEFUNCTION(3)\fP) won't be called.
.IP CURLPAUSE_SEND
Pause sending data. There will be no data sent on this connection until this
function is called again without this bit set. Thus, the read callback
-(\fICURLOPT_READFUNCTION\fP) won't be called.
+(\fICURLOPT_READFUNCTION(3)\fP) won't be called.
.IP CURLPAUSE_ALL
Convenience define that pauses both directions.
.IP CURLPAUSE_CONT
@@ -45,9 +67,25 @@ Convenience define that unpauses both directions
CURLE_OK (zero) means that the option was set properly, and a non-zero return
code means something wrong occurred after the new state was set. See the
\fIlibcurl-errors(3)\fP man page for the full list with descriptions.
+.SH LIMITATIONS
+The pausing of transfers does not work with protocols that work without
+network connectivity, like FILE://. Trying to pause such a transfer, in any
+direction, will cause problems in the worst case or an error in the best case.
.SH AVAILABILITY
This function was added in libcurl 7.18.0. Before this version, there was no
explicit support for pausing transfers.
+.SH "USAGE WITH THE MULTI-SOCKET INTERFACE"
+Before libcurl 7.32.0, when a specific handle was unpaused with this function,
+there was no particular forced rechecking or similar of the socket's state,
+which made the continuation of the transfer get delayed until next
+multi-socket call invoke or even longer. Alternatively, the user could
+forcibly call for example curl_multi_socket_all(3) - with a rather hefty
+performance penalty.
+
+Starting in libcurl 7.32.0, unpausing a transfer will schedule a timeout
+trigger for that handle 1 millisecond into the future, so that a
+curl_multi_socket_action( ... CURL_SOCKET_TIMEOUT) can be used immediately
+afterwards to get the transfer going again as desired.
.SH "MEMORY USE"
When pausing a read by returning the magic return code from a write callback,
the read data is already in libcurl's internal buffers so it'll have to keep
diff --git a/docs/libcurl/curl_easy_pause.html b/docs/libcurl/curl_easy_pause.html
deleted file mode 100644
index a82a77bd..00000000
--- a/docs/libcurl/curl_easy_pause.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<html><head>
-<title>curl_easy_pause man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_pause - pause and unpause a connection <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_pause(CURL *handle , int bitmask );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Using this function, you can explicitly mark a running connection to get paused, and you can unpause a connection that was previously paused.
-<p class="level0">A connection can be paused by using this function or by letting the read or the write callbacks return the proper magic return code (<span Class="emphasis">CURL_READFUNC_PAUSE</span> and <span Class="emphasis">CURL_WRITEFUNC_PAUSE</span>). A write callback that returns pause signals to the library that it couldn't take care of any data at all, and that data will then be delivered again to the callback when the writing is later unpaused.
-<p class="level0">NOTE: while it may feel tempting, take care and notice that you cannot call this function from another thread.
-<p class="level0">When this function is called to unpause reading, the chance is high that you will get your write callback called before this function returns.
-<p class="level0">The <span Class="bold">handle</span> argument is of course identifying the handle that operates on the connection you want to pause or unpause.
-<p class="level0">The <span Class="bold">bitmask</span> argument is a set of bits that sets the new state of the connection. The following bits can be used:
-<p class="level0"><a name="CURLPAUSERECV"></a><span class="nroffip">CURLPAUSE_RECV</span>
-<p class="level1">Pause receiving data. There will be no data received on this connection until this function is called again without this bit set. Thus, the write callback (<span Class="emphasis">CURLOPT_WRITEFUNCTION</span>) won't be called.
-<p class="level0"><a name="CURLPAUSESEND"></a><span class="nroffip">CURLPAUSE_SEND</span>
-<p class="level1">Pause sending data. There will be no data sent on this connection until this function is called again without this bit set. Thus, the read callback (<span Class="emphasis">CURLOPT_READFUNCTION</span>) won't be called.
-<p class="level0"><a name="CURLPAUSEALL"></a><span class="nroffip">CURLPAUSE_ALL</span>
-<p class="level1">Convenience define that pauses both directions.
-<p class="level0"><a name="CURLPAUSECONT"></a><span class="nroffip">CURLPAUSE_CONT</span>
-<p class="level1">Convenience define that unpauses both directions <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLE_OK (zero) means that the option was set properly, and a non-zero return code means something wrong occurred after the new state was set. See the <span Class="emphasis">libcurl-errors(3)</span> man page for the full list with descriptions. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.18.0. Before this version, there was no explicit support for pausing transfers. <a name="MEMORY"></a><h2 class="nroffsh">MEMORY USE</h2>
-<p class="level0">When pausing a read by returning the magic return code from a write callback, the read data is already in libcurl's internal buffers so it'll have to keep it in an allocated buffer until the reading is again unpaused using this function.
-<p class="level0">If the downloaded data is compressed and is asked to get uncompressed automatically on download, libcurl will continue to uncompress the entire downloaded chunk and it will cache the data uncompressed. This has the side- effect that if you download something that is compressed a lot, it can result in a very large data amount needing to be allocated to save the data during the pause. This said, you should probably consider not using paused reading if you allow libcurl to uncompress data automatically. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_cleanup.html">curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_reset.html"> curl_easy_reset (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_pause.pdf b/docs/libcurl/curl_easy_pause.pdf
deleted file mode 100644
index ddc8dfd2..00000000
--- a/docs/libcurl/curl_easy_pause.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_perform.3 b/docs/libcurl/curl_easy_perform.3
index 1ed006b0..fc8c59e5 100644
--- a/docs/libcurl/curl_easy_perform.3
+++ b/docs/libcurl/curl_easy_perform.3
@@ -1,39 +1,75 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
.SH NAME
-curl_easy_perform - Perform a file transfer
+curl_easy_perform - perform a blocking file transfer
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
-.BI "CURLcode curl_easy_perform(CURL *" handle ");"
+.BI "CURLcode curl_easy_perform(CURL *" easy_handle ");"
.ad
.SH DESCRIPTION
-This function is called after the init and all the \fIcurl_easy_setopt(3)\fP
-calls are made, and will perform the transfer as described in the options. It
-must be called with the same
-.I handle
-as input as the curl_easy_init call returned.
+Invoke this function after \fIcurl_easy_init(3)\fP and all the
+\fIcurl_easy_setopt(3)\fP calls are made, and will perform the transfer as
+described in the options. It must be called with the same \fBeasy_handle\fP as
+input as the \fIcurl_easy_init(3)\fP call returned.
+
+\fIcurl_easy_perform(3)\fP performs the entire request in a blocking manner
+and returns when done, or if it failed. For non-blocking behavior, see
+\fIcurl_multi_perform(3)\fP.
You can do any amount of calls to \fIcurl_easy_perform(3)\fP while using the
-same handle. If you intend to transfer more than one file, you are even
-encouraged to do so. libcurl will then attempt to re-use the same connection
-for the following transfers, thus making the operations faster, less CPU
-intense and using less network resources. Just note that you will have to use
-\fIcurl_easy_setopt(3)\fP between the invokes to set options for the following
-curl_easy_perform.
+same \fBeasy_handle\fP. If you intend to transfer more than one file, you are
+even encouraged to do so. libcurl will then attempt to re-use the same
+connection for the following transfers, thus making the operations faster,
+less CPU intense and using less network resources. Just note that you will
+have to use \fIcurl_easy_setopt(3)\fP between the invokes to set options for
+the following curl_easy_perform.
You must never call this function simultaneously from two places using the
-same handle. Let the function return first before invoking it another time. If
-you want parallel transfers, you must use several curl handles.
+same \fBeasy_handle\fP. Let the function return first before invoking it
+another time. If you want parallel transfers, you must use several curl
+easy_handles.
+
+While the \fBeasy_handle\fP is added to a multi handle, it cannot be used by
+\fIcurl_easy_perform(3)\fP.
.SH RETURN VALUE
-0 means everything was ok, non-zero means an error occurred as
+CURLE_OK (0) means everything was ok, non-zero means an error occurred as
.I <curl/curl.h>
-defines. If the CURLOPT_ERRORBUFFER was set with
-.I curl_easy_setopt
-there will be a readable error message in the error buffer when non-zero is
-returned.
+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), "
+.BR libcurl-errors "(3), "
diff --git a/docs/libcurl/curl_easy_perform.html b/docs/libcurl/curl_easy_perform.html
deleted file mode 100644
index 8654fea6..00000000
--- a/docs/libcurl/curl_easy_perform.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_perform man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_perform - Perform a file transfer <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_perform(CURL * handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function is called after the init and all the <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> calls are made, and will perform the transfer as described in the options. It must be called with the same <span Class="emphasis">handle</span> as input as the curl_easy_init call returned.
-<p class="level0">You can do any amount of calls to <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> while using the same handle. If you intend to transfer more than one file, you are even encouraged to do so. libcurl will then attempt to re-use the same connection for the following transfers, thus making the operations faster, less CPU intense and using less network resources. Just note that you will have to use <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> between the invokes to set options for the following curl_easy_perform.
-<p class="level0">You must never call this function simultaneously from two places using the same handle. Let the function return first before invoking it another time. If you want parallel transfers, you must use several curl handles. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">0 means everything was ok, non-zero means an error occurred as <span Class="emphasis">&lt;curl/curl.h&gt;</span> defines. If the CURLOPT_ERRORBUFFER was set with <span Class="emphasis">curl_easy_setopt</span> there will be a readable error message in the error buffer when non-zero is returned. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <a class="manpage" href="./curl_easy_setopt.html"> curl_easy_setopt (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_perform.pdf b/docs/libcurl/curl_easy_perform.pdf
deleted file mode 100644
index 5b3ee661..00000000
--- a/docs/libcurl/curl_easy_perform.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_recv.3 b/docs/libcurl/curl_easy_recv.3
index 1ede5894..9de63649 100644
--- a/docs/libcurl/curl_easy_recv.3
+++ b/docs/libcurl/curl_easy_recv.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,9 +41,10 @@ data. \fBbuflen\fP is the maximum amount of data you can get in that
buffer. The variable \fBn\fP points to will receive the number of received
bytes.
-To establish the connection, set \fBCURLOPT_CONNECT_ONLY\fP option before
-calling \fIcurl_easy_perform(3)\fP. Note that \fIcurl_easy_recv(3)\fP does not
-work on connections that were created without this option.
+To establish the connection, set \fBCURLOPT_CONNECT_ONLY(3)\fP option before
+calling \fIcurl_easy_perform(3)\fP or \cIcurl_multi_perform(3)\fP. Note that
+\fIcurl_easy_recv(3)\fP does not work on connections that were created without
+this option.
You must ensure that the socket has data to read before calling
\fIcurl_easy_recv(3)\fP, otherwise the call will return \fBCURLE_AGAIN\fP -
@@ -59,8 +60,13 @@ On success, returns \fBCURLE_OK\fP, stores the received data into
On failure, returns the appropriate error code.
-If there is no data to read, the function returns \fBCURLE_AGAIN\fP. Use
-your operating system facilities to wait until the data is ready, and retry.
+If there is no data to read, the function returns \fBCURLE_AGAIN\fP. Use your
+operating system facilities to wait until the data is ready, and retry.
+
+Reading exactly 0 bytes would indicate a closed connection.
+
+If there's no socket available to use from the previous transfer, this function
+returns CURLE_UNSUPPORTED_PROTOCOL.
.SH EXAMPLE
See \fBsendrecv.c\fP in \fBdocs/examples\fP directory for usage example.
.SH "SEE ALSO"
diff --git a/docs/libcurl/curl_easy_recv.html b/docs/libcurl/curl_easy_recv.html
deleted file mode 100644
index 51f77f9e..00000000
--- a/docs/libcurl/curl_easy_recv.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<html><head>
-<title>curl_easy_recv man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_recv - receives raw data on an "easy" connection <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/easy.h&gt;</span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_recv( CURL * curl , void * buffer ,</span> <span Class="bold">size_t buflen , size_t * n );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function receives raw data from the established connection. You may use it together with <a class="emphasis" href="./curl_easy_send.html">curl_easy_send(3)</a> to implement custom protocols using libcurl. This functionality can be particularly useful if you use proxies and/or SSL encryption: libcurl will take care of proxy negotiation and connection set-up.
-<p class="level0"><span Class="bold">buffer</span> is a pointer to your buffer that will get the received data. <span Class="bold">buflen</span> is the maximum amount of data you can get in that buffer. The variable <span Class="bold">n</span> points to will receive the number of received bytes.
-<p class="level0">To establish the connection, set <span Class="bold">CURLOPT_CONNECT_ONLY</span> option before calling <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a>. Note that <a class="emphasis" href="./curl_easy_recv.html">curl_easy_recv(3)</a> does not work on connections that were created without this option.
-<p class="level0">You must ensure that the socket has data to read before calling <a class="emphasis" href="./curl_easy_recv.html">curl_easy_recv(3)</a>, otherwise the call will return <span Class="bold">CURLE_AGAIN</span> - the socket is used in non-blocking mode internally. Use <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with <span Class="bold">CURLINFO_LASTSOCKET</span> to obtain the socket; use your operating system facilities like <span Class="emphasis">select(2)</span> to check if it has any data you can read. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Added in 7.18.2. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">On success, returns <span Class="bold">CURLE_OK</span>, stores the received data into <span Class="bold">buffer</span>, and the number of bytes it actually read into <span Class="bold">*n</span>.
-<p class="level0">On failure, returns the appropriate error code.
-<p class="level0">If there is no data to read, the function returns <span Class="bold">CURLE_AGAIN</span>. Use your operating system facilities to wait until the data is ready, and retry. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0">See <span Class="bold">sendrecv.c</span> in <span Class="bold">docs/examples</span> directory for usage example. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <a class="manpage" href="./curl_easy_perform.html"> curl_easy_perform (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_getinfo.html">curl_easy_getinfo (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_send.html">curl_easy_send (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_recv.pdf b/docs/libcurl/curl_easy_recv.pdf
deleted file mode 100644
index 1ed0a943..00000000
--- a/docs/libcurl/curl_easy_recv.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_reset.3 b/docs/libcurl/curl_easy_reset.3
index 4652f7e6..cb69bddf 100644
--- a/docs/libcurl/curl_easy_reset.3
+++ b/docs/libcurl/curl_easy_reset.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_easy_reset 3 "31 July 2004" "libcurl 7.12.1" "libcurl Manual"
.SH NAME
curl_easy_reset - reset all options of a libcurl session handle
@@ -19,5 +39,6 @@ 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_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3),"
+.BR curl_easy_duphandle "(3)"
diff --git a/docs/libcurl/curl_easy_reset.html b/docs/libcurl/curl_easy_reset.html
deleted file mode 100644
index daed7426..00000000
--- a/docs/libcurl/curl_easy_reset.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_reset man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_reset - reset all options of a libcurl session handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">void curl_easy_reset(CURL *handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Re-initializes all options previously set on a specified CURL handle to the default values. This puts back the handle to the same state as it was in when it was just created with <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a>.
-<p class="level0">It does not change the following information kept in the handle: live connections, the Session ID cache, the DNS cache, the cookies and shares. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.12.1 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">Nothing <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <a class="manpage" href="./curl_easy_cleanup.html"> curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_setopt.html"> curl_easy_setopt (3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_reset.pdf b/docs/libcurl/curl_easy_reset.pdf
deleted file mode 100644
index cd44d768..00000000
--- a/docs/libcurl/curl_easy_reset.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_send.3 b/docs/libcurl/curl_easy_send.3
index 17c4c1f5..6f5a6eaf 100644
--- a/docs/libcurl/curl_easy_send.3
+++ b/docs/libcurl/curl_easy_send.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,9 +39,10 @@ connection set-up.
\fBbuffer\fP is a pointer to the data of length \fBbuflen\fP that you want sent.
The variable \fBn\fP points to will receive the number of sent bytes.
-To establish the connection, set \fBCURLOPT_CONNECT_ONLY\fP option before
-calling \fIcurl_easy_perform(3)\fP. Note that \fIcurl_easy_send(3)\fP will not
-work on connections that were created without this option.
+To establish the connection, set \fBCURLOPT_CONNECT_ONLY(3)\fP option before
+calling \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform()\fP. Note that
+\fIcurl_easy_send(3)\fP will not work on connections that were created without
+this option.
You must ensure that the socket is writable before calling
\fIcurl_easy_send(3)\fP, otherwise the call will return \fBCURLE_AGAIN\fP -
@@ -57,6 +58,9 @@ sent into \fB*n\fP. Note that this may very well be less than the amount you
wanted to send.
On failure, returns the appropriate error code.
+
+If there's no socket available to use from the previous transfer, this function
+returns CURLE_UNSUPPORTED_PROTOCOL.
.SH EXAMPLE
See \fBsendrecv.c\fP in \fBdocs/examples\fP directory for usage example.
.SH "SEE ALSO"
diff --git a/docs/libcurl/curl_easy_send.html b/docs/libcurl/curl_easy_send.html
deleted file mode 100644
index b24a6011..00000000
--- a/docs/libcurl/curl_easy_send.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html><head>
-<title>curl_easy_send man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_send - sends raw data over an "easy" connection <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/easy.h&gt;</span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_send( CURL * curl , const void * buffer ,</span> <span Class="bold"> size_t buflen , size_t * n );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function sends arbitrary data over the established connection. You may use it together with <a class="emphasis" href="./curl_easy_recv.html">curl_easy_recv(3)</a> to implement custom protocols using libcurl. This functionality can be particularly useful if you use proxies and/or SSL encryption: libcurl will take care of proxy negotiation and connection set-up.
-<p class="level0"><span Class="bold">buffer</span> is a pointer to the data of length <span Class="bold">buflen</span> that you want sent. The variable <span Class="bold">n</span> points to will receive the number of sent bytes.
-<p class="level0">To establish the connection, set <span Class="bold">CURLOPT_CONNECT_ONLY</span> option before calling <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a>. Note that <a class="emphasis" href="./curl_easy_send.html">curl_easy_send(3)</a> will not work on connections that were created without this option.
-<p class="level0">You must ensure that the socket is writable before calling <a class="emphasis" href="./curl_easy_send.html">curl_easy_send(3)</a>, otherwise the call will return <span Class="bold">CURLE_AGAIN</span> - the socket is used in non-blocking mode internally. Use <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with <span Class="bold">CURLINFO_LASTSOCKET</span> to obtain the socket; use your operating system facilities like <span Class="emphasis">select(2)</span> to check if it can be written to. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Added in 7.18.2. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">On success, returns <span Class="bold">CURLE_OK</span> and stores the number of bytes actually sent into <span Class="bold">*n</span>. Note that this may very well be less than the amount you wanted to send.
-<p class="level0">On failure, returns the appropriate error code. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0">See <span Class="bold">sendrecv.c</span> in <span Class="bold">docs/examples</span> directory for usage example. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <a class="manpage" href="./curl_easy_perform.html"> curl_easy_perform (3)</a> <a class="manpage" href="./curl_easy_getinfo.html"> curl_easy_getinfo (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_recv.html">curl_easy_recv (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_send.pdf b/docs/libcurl/curl_easy_send.pdf
deleted file mode 100644
index dc5922c6..00000000
--- a/docs/libcurl/curl_easy_send.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
index 9da53792..4e5b8dec 100644
--- a/docs/libcurl/curl_easy_setopt.3
+++ b/docs/libcurl/curl_easy_setopt.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_easy_setopt 3 "1 Jan 2010" "libcurl 7.20.0" "libcurl Manual"
+.TH curl_easy_setopt 3 "25 Jun 2014" "libcurl 7.38.0" "libcurl Manual"
.SH NAME
curl_easy_setopt \- set options for a curl easy handle
.SH SYNOPSIS
@@ -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
-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.
+\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.
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,10 @@ 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 curl_easy_setopt() returns. Exceptions to this rule are described in
-the option details below.
+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
+\fICURLOPT_COPYPOSTFIELDS(3)\fP has some usage characteristics you need to
+read up on.
Before version 7.17.0, strings were not copied. Instead the user was forced
keep them available until libcurl no longer needed them.
@@ -55,2038 +57,474 @@ The \fIhandle\fP is the return code from a \fIcurl_easy_init(3)\fP or
\fIcurl_easy_duphandle(3)\fP call.
.SH BEHAVIOR OPTIONS
.IP CURLOPT_VERBOSE
-Set the parameter to 1 to get the library to display a lot of verbose
-information about its operations. Very useful for libcurl and/or protocol
-debugging and understanding. The verbose information will be sent to stderr,
-or the stream set with \fICURLOPT_STDERR\fP.
-
-You hardly ever want this set in production use, you will almost always want
-this when you debug/report problems. Another neat option for debugging is the
-\fICURLOPT_DEBUGFUNCTION\fP.
+Display verbose information. See \fICURLOPT_VERBOSE(3)\fP
.IP CURLOPT_HEADER
-A parameter set to 1 tells the library to include the header in the body
-output. This is only relevant for protocols that actually have headers
-preceding the data (like HTTP).
+Include the header in the body output. See \fICURLOPT_HEADER(3)\fP
.IP CURLOPT_NOPROGRESS
-A parameter set to 1 tells the library to shut off the built-in progress meter
-completely.
-
-Future versions of libcurl are likely to not have any built-in progress meter
-at all.
+Shut off the progress meter. See \fICURLOPT_NOPROGRESS(3)\fP
.IP CURLOPT_NOSIGNAL
-Pass a long. If it is 1, libcurl will not use any functions that
-install signal handlers or any functions that cause signals to be sent to the
-process. This option is mainly here to allow multi-threaded unix applications
-to still set/use all timeout options etc, without risking getting signals.
-(Added in 7.10)
-
-If this option is set and libcurl has been built with the standard name
-resolver, timeouts will not occur while the name resolve takes place.
-Consider building libcurl with c-ares support to enable asynchronous DNS
-lookups, which enables nice timeouts for name resolves without signals.
+Do not install signal handlers. See \fICURLOPT_NOSIGNAL(3)\fP
.IP CURLOPT_WILDCARDMATCH
-Set this option to 1 if you want to transfer multiple files according to a
-file name pattern. The pattern can be specified as part of the
-\fICURLOPT_URL\fP option, using an fnmatch-like pattern (Shell Pattern
-Matching) in the last part of URL (file name).
-
-By default, libcurl uses its internal wildcard matching implementation. You
-can provide your own matching function by the \fICURLOPT_FNMATCH_FUNCTION\fP
-option.
-
-This feature is only supported by the FTP download for now.
-
-A brief introduction of its syntax follows:
-.RS
-.IP "\fB*\fP - ASTERISK"
-\&ftp://example.com/some/path/\fB*.txt\fP (for all txt's from the root
-directory)
-.RE
-.RS
-.IP "\fB?\fP - QUESTION MARK"
-Question mark matches any (exactly one) character.
-
-\&ftp://example.com/some/path/\fBphoto?.jpeg\fP
-.RE
-.RS
-.IP "\fB[\fP - BRACKET EXPRESSION"
-The left bracket opens a bracket expression. The question mark and asterisk have
-no special meaning in a bracket expression. Each bracket expression ends by the
-right bracket and matches exactly one character. Some examples follow:
-
-\fB[a-zA-Z0\-9]\fP or \fB[f\-gF\-G]\fP \- character interval
-
-\fB[abc]\fP - character enumeration
-
-\fB[^abc]\fP or \fB[!abc]\fP - negation
-
-\fB[[:\fP\fIname\fP\fB:]]\fP class expression. Supported classes are
-\fBalnum\fP,\fBlower\fP, \fBspace\fP, \fBalpha\fP, \fBdigit\fP, \fBprint\fP,
-\fBupper\fP, \fBblank\fP, \fBgraph\fP, \fBxdigit\fP.
-
-\fB[][-!^]\fP - special case \- matches only '\-', ']', '[', '!' or '^'. These
-characters have no special purpose.
-
-\fB[\\[\\]\\\\]\fP - escape syntax. Matches '[', ']' or '\\'.
-
-Using the rules above, a file name pattern can be constructed:
-
-\&ftp://example.com/some/path/\fB[a-z[:upper:]\\\\].jpeg\fP
-.RE
-.PP
-(This was added in 7.21.0)
+Transfer multiple files according to a file name pattern. See \fICURLOPT_WILDCARDMATCH(3)\fP
.SH CALLBACK OPTIONS
.IP CURLOPT_WRITEFUNCTION
-Function pointer that should match the following prototype: \fBsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
-function gets called by libcurl as soon as there is data received that needs
-to be saved. The size of the data pointed to by \fIptr\fP is \fIsize\fP
-multiplied with \fInmemb\fP, it will not be zero terminated. Return the number
-of bytes actually taken care of. If that amount differs from the amount passed
-to your function, it'll signal an error to the library. This will abort the
-transfer and return \fICURLE_WRITE_ERROR\fP.
-
-From 7.18.0, the function can return CURL_WRITEFUNC_PAUSE which then will
-cause writing to this connection to become paused. See
-\fIcurl_easy_pause(3)\fP for further details.
-
-This function may be called with zero bytes data if the transferred file is
-empty.
-
-Set this option to NULL to get the internal default function. The internal
-default function will write the data to the FILE * given with
-\fICURLOPT_WRITEDATA\fP.
-
-Set the \fIuserdata\fP argument with the \fICURLOPT_WRITEDATA\fP option.
-
-The callback function will be passed as much data as possible in all invokes,
-but you cannot possibly make any assumptions. It may be one byte, it may be
-thousands. The maximum amount of data that can be passed to the write callback
-is defined in the curl.h header file: CURL_MAX_WRITE_SIZE.
+Callback for writing data. See \fICURLOPT_WRITEFUNCTION(3)\fP
.IP CURLOPT_WRITEDATA
-Data pointer to pass to the file write function. If you use the
-\fICURLOPT_WRITEFUNCTION\fP option, this is the pointer you'll get as
-input. If you don't use a callback, you must pass a 'FILE *' as libcurl will
-pass this to fwrite() when writing data.
-
-The internal \fICURLOPT_WRITEFUNCTION\fP will write the data to the FILE *
-given with this option, or to stdout if this option hasn't been set.
-
-If you're using libcurl as a win32 DLL, you \fBMUST\fP use the
-\fICURLOPT_WRITEFUNCTION\fP if you set this option or you will experience
-crashes.
-
-This option is also known with the older name \fICURLOPT_FILE\fP, the name
-\fICURLOPT_WRITEDATA\fP was introduced in 7.9.7.
+Data pointer to pass to the write callback. See \fICURLOPT_WRITEDATA(3)\fP
.IP CURLOPT_READFUNCTION
-Function pointer that should match the following prototype: \fBsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
-function gets called by libcurl as soon as it needs to read data in order to
-send it to the peer. The data area pointed at by the pointer \fIptr\fP may be
-filled with at most \fIsize\fP multiplied with \fInmemb\fP number of
-bytes. Your function must return the actual number of bytes that you stored in
-that memory area. Returning 0 will signal end-of-file to the library and cause
-it to stop the current transfer.
-
-If you stop the current transfer by returning 0 "pre-maturely" (i.e before the
-server expected it, like when you've said you will upload N bytes and you
-upload less than N bytes), you may experience that the server "hangs" waiting
-for the rest of the data that won't come.
-
-The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current
-operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error
-code from the transfer (Added in 7.12.1)
-
-From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause
-reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
-for further details.
-
-If you set this callback pointer to NULL, or don't set it at all, the default
-internal read function will be used. It is doing an fread() on the FILE *
-userdata set with \fICURLOPT_READDATA\fP.
+Callback for reading data. See \fICURLOPT_READFUNCTION(3)\fP
.IP CURLOPT_READDATA
-Data pointer to pass to the file read function. If you use the
-\fICURLOPT_READFUNCTION\fP option, this is the pointer you'll get as input. If
-you don't specify a read callback but instead rely on the default internal
-read function, this data must be a valid readable FILE *.
-
-If you're using libcurl as a win32 DLL, you MUST use a
-\fICURLOPT_READFUNCTION\fP if you set this option.
-
-This option was also known by the older name \fICURLOPT_INFILE\fP, the name
-\fICURLOPT_READDATA\fP was introduced in 7.9.7.
+Data pointer to pass to the read callback. See \fICURLOPT_READDATA(3)\fP
.IP CURLOPT_IOCTLFUNCTION
-Function pointer that should match the \fIcurl_ioctl_callback\fP prototype
-found in \fI<curl/curl.h>\fP. This function gets called by libcurl when
-something special I/O-related needs to be done that the library can't do by
-itself. For now, rewinding the read data stream is the only action it can
-request. The rewinding of the read data stream may be necessary when doing a
-HTTP PUT or POST with a multi-pass authentication method. (Option added in
-7.12.3).
-
-Use \fICURLOPT_SEEKFUNCTION\fP instead to provide seeking!
+Callback for I/O operations. See \fICURLOPT_IOCTLFUNCTION(3)\fP
.IP CURLOPT_IOCTLDATA
-Pass a pointer that will be untouched by libcurl and passed as the 3rd
-argument in the ioctl callback set with \fICURLOPT_IOCTLFUNCTION\fP. (Option
-added in 7.12.3)
+Data pointer to pass to the I/O callback. See \fICURLOPT_IOCTLDATA(3)\fP
.IP CURLOPT_SEEKFUNCTION
-Function pointer that should match the following prototype: \fIint
-function(void *instream, curl_off_t offset, int origin);\fP This function gets
-called by libcurl to seek to a certain position in the input stream and can be
-used to fast forward a file in a resumed upload (instead of reading all
-uploaded bytes with the normal read function/callback). It is also called to
-rewind a stream when doing a HTTP PUT or POST with a multi-pass authentication
-method. The function shall work like "fseek" or "lseek" and accepted SEEK_SET,
-SEEK_CUR and SEEK_END as argument for origin, although (in 7.18.0) libcurl
-only passes SEEK_SET. The callback must return 0 (CURL_SEEKFUNC_OK) on
-success, 1 (CURL_SEEKFUNC_FAIL) to cause the upload operation to fail or 2
-(CURL_SEEKFUNC_CANTSEEK) to indicate that while the seek failed, libcurl is
-free to work around the problem if possible. The latter can sometimes be done
-by instead reading from the input or similar.
-
-If you forward the input arguments directly to "fseek" or "lseek", note that
-the data type for \fIoffset\fP is not the same as defined for curl_off_t on
-many systems! (Option added in 7.18.0)
+Callback for seek operations. See \fICURLOPT_SEEKFUNCTION(3)\fP
.IP CURLOPT_SEEKDATA
-Data pointer to pass to the file read function. If you use the
-\fICURLOPT_SEEKFUNCTION\fP option, this is the pointer you'll get as input. If
-you don't specify a seek callback, NULL is passed. (Option added in 7.18.0)
+Data pointer to pass to the seek callback. See \fICURLOPT_SEEKDATA(3)\fP
.IP CURLOPT_SOCKOPTFUNCTION
-Function pointer that should match the \fIcurl_sockopt_callback\fP prototype
-found in \fI<curl/curl.h>\fP. This function gets called by libcurl after the
-socket() call but before the connect() call. The callback's \fIpurpose\fP
-argument identifies the exact purpose for this particular socket, and
-currently only one value is supported: \fICURLSOCKTYPE_IPCXN\fP for the
-primary connection (meaning the control connection in the FTP case). Future
-versions of libcurl may support more purposes. It passes the newly created
-socket descriptor so additional setsockopt() calls can be done at the user's
-discretion. Return 0 (zero) from the callback on success. Return 1 from the
-callback function to signal an unrecoverable error to the library and it will
-close the socket and return \fICURLE_COULDNT_CONNECT\fP. (Option added in
-7.15.6.)
+Callback for sockopt operations. See \fICURLOPT_SOCKOPTFUNCTION(3)\fP
.IP CURLOPT_SOCKOPTDATA
-Pass a pointer that will be untouched by libcurl and passed as the first
-argument in the sockopt callback set with \fICURLOPT_SOCKOPTFUNCTION\fP.
-(Option added in 7.15.6.)
+Data pointer to pass to the sockopt callback. See \fICURLOPT_SOCKOPTDATA(3)\fP
.IP CURLOPT_OPENSOCKETFUNCTION
-Function pointer that should match the \fIcurl_opensocket_callback\fP
-prototype found in \fI<curl/curl.h>\fP. This function gets called by libcurl
-instead of the \fIsocket(2)\fP call. The callback's \fIpurpose\fP argument
-identifies the exact purpose for this particular socket, and currently only
-one value is supported: \fICURLSOCKTYPE_IPCXN\fP for the primary connection
-(meaning the control connection in the FTP case). Future versions of libcurl
-may support more purposes. It passes the resolved peer address as a
-\fIaddress\fP argument so the callback can modify the address or refuse to
-connect at all. The callback function should return the socket or
-\fICURL_SOCKET_BAD\fP in case no connection should be established or any error
-detected. Any additional \fIsetsockopt(2)\fP calls can be done on the socket
-at the user's discretion. \fICURL_SOCKET_BAD\fP return value from the
-callback function will signal an unrecoverable error to the library and it
-will return \fICURLE_COULDNT_CONNECT\fP. This return code can be used for IP
-address blacklisting. The default behavior is:
-.nf
- return socket(addr->family, addr->socktype, addr->protocol);
-.fi
-(Option added in 7.17.1.)
+Callback for socket creation. See \fICURLOPT_OPENSOCKETFUNCTION(3)\fP
.IP CURLOPT_OPENSOCKETDATA
-Pass a pointer that will be untouched by libcurl and passed as the first
-argument in the opensocket callback set with \fICURLOPT_OPENSOCKETFUNCTION\fP.
-(Option added in 7.17.1.)
+Data pointer to pass to the open socket callback. See \fICURLOPT_OPENSOCKETDATA(3)\fP
+.IP CURLOPT_CLOSESOCKETFUNCTION
+Callback for closing socket. See \fICURLOPT_CLOSESOCKETFUNCTION(3)\fP
+.IP CURLOPT_CLOSESOCKETDATA
+Data pointer to pass to the close socket callback. See \fICURLOPT_CLOSESOCKETDATA(3)\fP
.IP CURLOPT_PROGRESSFUNCTION
-Function pointer that should match the \fIcurl_progress_callback\fP prototype
-found in \fI<curl/curl.h>\fP. This function gets called by libcurl instead of
-its internal equivalent with a frequent interval during operation (roughly
-once per second or sooner) no matter if data is being transfered or not.
-Unknown/unused argument values passed to the callback will be set to zero
-(like if you only download data, the upload size will remain 0). Returning a
-non-zero value from this callback will cause libcurl to abort the transfer and
-return \fICURLE_ABORTED_BY_CALLBACK\fP.
-
-If you transfer data with the multi interface, this function will not be
-called during periods of idleness unless you call the appropriate libcurl
-function that performs transfers.
-
-\fICURLOPT_NOPROGRESS\fP must be set to 0 to make this function actually
-get called.
+OBSOLETE callback for progress meter. See \fICURLOPT_PROGRESSFUNCTION(3)\fP
.IP CURLOPT_PROGRESSDATA
-Pass a pointer that will be untouched by libcurl and passed as the first
-argument in the progress callback set with \fICURLOPT_PROGRESSFUNCTION\fP.
+Data pointer to pass to the progress meter callback. See \fICURLOPT_PROGRESSDATA(3)\fP
+.IP CURLOPT_XFERINFOFUNCTION
+Callback for progress meter. See \fICURLOPT_XFERINFOFUNCTION(3)\fP
+.IP CURLOPT_XFERINFODATA
+Data pointer to pass to the progress meter callback. See \fICURLOPT_XFERINFODATA(3)\fP
.IP CURLOPT_HEADERFUNCTION
-Function pointer that should match the following prototype: \fIsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP. This
-function gets called by libcurl as soon as it has received header data. The
-header callback will be called once for each header and only complete header
-lines are passed on to the callback. Parsing headers should be easy enough
-using this. The size of the data pointed to by \fIptr\fP is \fIsize\fP
-multiplied with \fInmemb\fP. Do not assume that the header line is zero
-terminated! The pointer named \fIuserdata\fP is the one you set with the
-\fICURLOPT_WRITEHEADER\fP option. The callback function must return the number
-of bytes actually taken care of. If that amount differs from the amount passed
-to your function, it'll signal an error to the library. This will abort the
-transfer and return \fICURL_WRITE_ERROR\fP.
-
-If this option is not set, or if it is set to NULL, but
-\fICURLOPT_HEADERDATA\fP (\fICURLOPT_WRITEHEADER\fP) is set to anything but
-NULL, the function used to accept response data will be used instead. That is,
-it will be the function specified with \fICURLOPT_WRITEFUNCTION\fP, or if it
-is not specified or NULL - the default, stream-writing function.
-
-It's important to note that the callback will be invoked for the headers of
-all responses received after initiating a request and not just the final
-response. This includes all responses which occur during authentication
-negotiation. If you need to operate on only the headers from the final
-response, you will need to collect headers in the callback yourself and use
-HTTP status lines, for example, to delimit response boundaries.
-
-Since 7.14.1: When a server sends a chunked encoded transfer, it may contain a
-trailer. That trailer is identical to a HTTP header and if such a trailer is
-received it is passed to the application using this callback as well. There
-are several ways to detect it being a trailer and not an ordinary header: 1)
-it comes after the response-body. 2) it comes after the final header line (CR
-LF) 3) a Trailer: header among the response-headers mention what header to
-expect in the trailer.
-.IP CURLOPT_WRITEHEADER
-(This option is also known as \fBCURLOPT_HEADERDATA\fP) Pass a pointer to be
-used to write the header part of the received data to. If you don't use your
-own callback to take care of the writing, this must be a valid FILE *. See
-also the \fICURLOPT_HEADERFUNCTION\fP option above on how to set a custom
-get-all-headers callback.
+Callback for writing received headers. See \fICURLOPT_HEADERFUNCTION(3)\fP
+.IP CURLOPT_HEADERDATA
+Data pointer to pass to the header callback. See \fICURLOPT_HEADERDATA(3)\fP
.IP CURLOPT_DEBUGFUNCTION
-Function pointer that should match the following prototype: \fIint
-curl_debug_callback (CURL *, curl_infotype, char *, size_t, void *);\fP
-\fICURLOPT_DEBUGFUNCTION\fP replaces the standard debug function used when
-\fICURLOPT_VERBOSE \fP is in effect. This callback receives debug information,
-as specified with the \fBcurl_infotype\fP argument. This function must return
-0. The data pointed to by the char * passed to this function WILL NOT be zero
-terminated, but will be exactly of the size as told by the size_t argument.
-
-Available curl_infotype values:
-.RS
-.IP CURLINFO_TEXT
-The data is informational text.
-.IP CURLINFO_HEADER_IN
-The data is header (or header-like) data received from the peer.
-.IP CURLINFO_HEADER_OUT
-The data is header (or header-like) data sent to the peer.
-.IP CURLINFO_DATA_IN
-The data is protocol data received from the peer.
-.IP CURLINFO_DATA_OUT
-The data is protocol data sent to the peer.
-.RE
+Callback for debug information. See \fICURLOPT_DEBUGFUNCTION(3)\fP
.IP CURLOPT_DEBUGDATA
-Pass a pointer to whatever you want passed in to your
-\fICURLOPT_DEBUGFUNCTION\fP in the last void * argument. This pointer is not
-used by libcurl, it is only passed to the callback.
+Data pointer to pass to the debug callback. See \fICURLOPT_DEBUGDATA(3)\fP
.IP CURLOPT_SSL_CTX_FUNCTION
-This option does only function for libcurl powered by OpenSSL. If libcurl was
-built against another SSL library, this functionality is absent.
-
-Function pointer that should match the following prototype: \fBCURLcode
-sslctxfun(CURL *curl, void *sslctx, void *parm);\fP This function gets called
-by libcurl just before the initialization of an SSL connection after having
-processed all other SSL related options to give a last chance to an
-application to modify the behaviour of openssl's ssl initialization. The
-\fIsslctx\fP parameter is actually a pointer to an openssl \fISSL_CTX\fP. If
-an error is returned no attempt to establish a connection is made and the
-perform operation will return the error code from this callback function. Set
-the \fIparm\fP argument with the \fICURLOPT_SSL_CTX_DATA\fP option. This
-option was introduced in 7.11.0.
-
-This function will get called on all new connections made to a server, during
-the SSL negotiation. The SSL_CTX pointer will be a new one every time.
-
-To use this properly, a non-trivial amount of knowledge of the openssl
-libraries is necessary. For example, using this function allows you to use
-openssl callbacks to add additional validation code for certificates, and even
-to change the actual URI of an HTTPS request (example used in the lib509 test
-case). See also the example section for a replacement of the key, certificate
-and trust file settings.
+Callback for SSL context logic. See \fICURLOPT_SSL_CTX_FUNCTION(3)\fP
.IP CURLOPT_SSL_CTX_DATA
-Data pointer to pass to the ssl context callback set by the option
-\fICURLOPT_SSL_CTX_FUNCTION\fP, this is the pointer you'll get as third
-parameter, otherwise \fBNULL\fP. (Added in 7.11.0)
+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
+Callback for code base conversion. See \fICURLOPT_CONV_FROM_NETWORK_FUNCTION(3)\fP
.IP CURLOPT_CONV_FROM_UTF8_FUNCTION
-Function pointers that should match the following prototype: CURLcode
-function(char *ptr, size_t length);
-
-These three options apply to non-ASCII platforms only. They are available
-only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built. When
-this is the case, \fIcurl_version_info(3)\fP will return the CURL_VERSION_CONV
-feature bit set.
-
-The data to be converted is in a buffer pointed to by the ptr parameter. The
-amount of data to convert is indicated by the length parameter. The converted
-data overlays the input data in the buffer pointed to by the ptr parameter.
-CURLE_OK should be returned upon successful conversion. A CURLcode return
-value defined by curl.h, such as CURLE_CONV_FAILED, should be returned if an
-error was encountered.
-
-\fBCURLOPT_CONV_TO_NETWORK_FUNCTION\fP and
-\fBCURLOPT_CONV_FROM_NETWORK_FUNCTION\fP convert between the host encoding and
-the network encoding. They are used when commands or ASCII data are
-sent/received over the network.
-
-\fBCURLOPT_CONV_FROM_UTF8_FUNCTION\fP is called to convert from UTF8 into the
-host encoding. It is required only for SSL processing.
-
-If you set a callback pointer to NULL, or don't set it at all, the built-in
-libcurl iconv functions will be used. If HAVE_ICONV was not defined when
-libcurl was built, and no callback has been established, conversion will
-return the CURLE_CONV_REQD error code.
-
-If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
-For example:
-
- \&#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
-
-The iconv code in libcurl will default the network and UTF8 codeset names as
-follows:
-
- \&#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
-
- \&#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
-
-You will need to override these definitions if they are different on your
-system.
+Callback for code base conversion. See \fICURLOPT_CONV_FROM_UTF8_FUNCTION(3)\fP
.IP CURLOPT_INTERLEAVEFUNCTION
-Function pointer that should match the following prototype: \fIsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata)\fP. This
-function gets called by libcurl as soon as it has received interleaved RTP
-data. This function gets called for each $ block and therefore contains
-exactly one upper-layer protocol unit (e.g. one RTP packet). Curl writes the
-interleaved header as well as the included data for each call. The first byte
-is always an ASCII dollar sign. The dollar sign is followed by a one byte
-channel identifier and then a 2 byte integer length in network byte order. See
-\fIRFC 2326 Section 10.12\fP for more information on how RTP interleaving
-behaves. If unset or set to NULL, curl will use the default write function.
-
-Interleaved RTP poses some challeneges for the client application. Since the
-stream data is sharing the RTSP control connection, it is critical to service
-the RTP in a timely fashion. If the RTP data is not handled quickly,
-subsequent response processing may become unreasonably delayed and the
-connection may close. The application may use \fICURL_RTSPREQ_RECEIVE\fP to
-service RTP data when no requests are desired. If the application makes a
-request, (e.g. \fICURL_RTSPREQ_PAUSE\fP) then the response handler will
-process any pending RTP data before marking the request as finished. (Added
-in 7.20.0)
+Callback for RTSP interleaved data. See \fICURLOPT_INTERLEAVEFUNCTION(3)\fP
.IP CURLOPT_INTERLEAVEDATA
-This is the userdata pointer that will be passed to
-\fICURLOPT_INTERLEAVEFUNCTION\fP when interleaved RTP data is received. (Added
-in 7.20.0)
+Data pointer to pass to the RTSP interleave callback. See \fICURLOPT_INTERLEAVEDATA(3)\fP
.IP CURLOPT_CHUNK_BGN_FUNCTION
-Function pointer that should match the following prototype: \fBlong function
-(const void *transfer_info, void *ptr, int remains)\fP. This function gets
-called by libcurl before a part of the stream is going to be transferred (if
-the transfer supports chunks).
-
-This callback makes sense only when using the \fICURLOPT_WILDCARDMATCH\fP
-option for now.
-
-The target of transfer_info parameter is a "feature depended" structure. For
-the FTP wildcard download, the target is curl_fileinfo structure (see
-\fIcurl/curl.h\fP). The parameter ptr is a pointer given by
-\fICURLOPT_CHUNK_DATA\fP. The parameter remains contains number of chunks
-remaining per the transfer. If the feature is not available, the parameter has
-zero value.
-
-Return \fICURL_CHUNK_BGN_FUNC_OK\fP if everything is fine,
-\fICURL_CHUNK_BGN_FUNC_SKIP\fP if you want to skip the concrete chunk or
-\fICURL_CHUNK_BGN_FUNC_FAIL\fP to tell libcurl to stop if some error occurred.
-(This was added in 7.21.0)
+Callback for wildcard download start of chunk. See \fICURLOPT_CHUNK_BGN_FUNCTION(3)\fP
.IP CURLOPT_CHUNK_END_FUNCTION
-Function pointer that should match the following prototype: \fBlong
-function(void *ptr)\fP. This function gets called by libcurl as soon as a part
-of the stream has been transferred (or skipped).
-
-Return \fICURL_CHUNK_END_FUNC_OK\fP if everything is fine or
-\fBCURL_CHUNK_END_FUNC_FAIL\fP to tell the lib to stop if some error occurred.
-(This was added in 7.21.0)
+Callback for wildcard download end of chunk. See \fICURLOPT_CHUNK_END_FUNCTION(3)\fP
.IP CURLOPT_CHUNK_DATA
-Pass a pointer that will be untouched by libcurl and passed as the ptr
-argument to the \fICURL_CHUNK_BGN_FUNTION\fP and \fICURL_CHUNK_END_FUNTION\fP.
-(This was added in 7.21.0)
+Data pointer to pass to the chunk callbacks. See \fICURLOPT_CHUNK_DATA(3)\fP
.IP CURLOPT_FNMATCH_FUNCTION
-Function pointer that should match \fBint function(void *ptr, const char
-*pattern, const char *string)\fP prototype (see \fIcurl/curl.h\fP). It is used
-internally for the wildcard matching feature.
-
-Return \fICURL_FNMATCHFUNC_MATCH\fP if pattern matches the string,
-\fICURL_FNMATCHFUNC_NOMATCH\fP if not or \fICURL_FNMATCHFUNC_FAIL\fP if an
-error occurred. (This was added in 7.21.0)
+Callback for wildcard matching. See \fICURLOPT_FNMATCH_FUNCTION(3)\fP
.IP CURLOPT_FNMATCH_DATA
-Pass a pointer that will be untouched by libcurl and passed as the ptr argument
-to the \fICURL_FNMATCH_FUNCTION\fP. (This was added in 7.21.0)
+Data pointer to pass to the wildcard matching callback. See \fICURLOPT_FNMATCH_DATA(3)\fP
.SH ERROR OPTIONS
.IP CURLOPT_ERRORBUFFER
-Pass a char * to a buffer that the libcurl may store human readable error
-messages in. This may be more helpful than just the return code from
-\fIcurl_easy_perform\fP. The buffer must be at least CURL_ERROR_SIZE big.
-Although this argument is a 'char *', it does not describe an input string.
-Therefore the (probably undefined) contents of the buffer is NOT copied
-by the library. You should keep the associated storage available until
-libcurl no longer needs it. Failing to do so will cause very odd behavior
-or even crashes. libcurl will need it until you call \fIcurl_easy_cleanup(3)\fP
-or you set the same option again to use a different pointer.
-
-Use \fICURLOPT_VERBOSE\fP and \fICURLOPT_DEBUGFUNCTION\fP to better
-debug/trace why errors happen.
-
-If the library does not return an error, the buffer may not have been
-touched. Do not rely on the contents in those cases.
-
+Error message buffer. See \fICURLOPT_ERRORBUFFER(3)\fP
.IP CURLOPT_STDERR
-Pass a FILE * as parameter. Tell libcurl to use this stream instead of stderr
-when showing the progress meter and displaying \fICURLOPT_VERBOSE\fP data.
+stderr replacement stream. See \fICURLOPT_STDERR(3)\fP
.IP CURLOPT_FAILONERROR
-A parameter set to 1 tells the library to fail silently if the HTTP code
-returned is equal to or larger than 400. The default action would be to return
-the page normally, ignoring that code.
-
-This method is not fail-safe and there are occasions where non-successful
-response codes will slip through, especially when authentication is involved
-(response codes 401 and 407).
-
-You might get some amounts of headers transferred before this situation is
-detected, like when a "100-continue" is received as a response to a
-POST/PUT and a 401 or 407 is received immediately afterwards.
+Fail on HTTP 4xx errors. \fICURLOPT_FAILONERROR(3)\fP
.SH NETWORK OPTIONS
.IP CURLOPT_URL
-The actual URL to deal with. The parameter should be a char * to a zero
-terminated string.
-
-If the given URL lacks the protocol part ("http://" or "ftp://" etc), it will
-attempt to guess which protocol to use based on the given host name. If the
-given protocol of the set URL is not supported, libcurl will return on error
-(\fICURLE_UNSUPPORTED_PROTOCOL\fP) when you call \fIcurl_easy_perform(3)\fP or
-\fIcurl_multi_perform(3)\fP. Use \fIcurl_version_info(3)\fP for detailed info
-on which protocols are supported.
-
-The string given to CURLOPT_URL must be url-encoded and follow RFC 2396
-(http://curl.haxx.se/rfc/rfc2396.txt).
-
-Starting with version 7.20.0, the fragment part of the URI will not be send as
-part of the path, which was the case previously.
-
-\fICURLOPT_URL\fP is the only option that \fBmust\fP be set before
-\fIcurl_easy_perform(3)\fP is called.
-
-\fICURLOPT_PROTOCOLS\fP can be used to limit what protocols libcurl will use
-for this transfer, independent of what libcurl has been compiled to
-support. That may be useful if you accept the URL from an external source and
-want to limit the accessibility.
+URL to work on. See \fICURLOPT_URL(3)\fP
+.IP CURLOPT_PATH_AS_IS
+Disable squashing /../ and /./ sequences in the path. See \fICURLOPT_PATH_AS_IS(3)\fP
.IP CURLOPT_PROTOCOLS
-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. See also
-\fICURLOPT_REDIR_PROTOCOLS\fP. (Added in 7.19.4)
+Allowed protocols. See \fICURLOPT_PROTOCOLS(3)\fP
.IP CURLOPT_REDIR_PROTOCOLS
-Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask
-limits what protocols libcurl may use in a transfer that it follows to in a
-redirect when \fICURLOPT_FOLLOWLOCATION\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. This is a difference compared to pre-7.19.4 versions which
-unconditionally would follow to all protocols supported. (Added in 7.19.4)
+Protocols to allow redirects to. See \fICURLOPT_REDIR_PROTOCOLS(3)\fP
.IP CURLOPT_PROXY
-Set HTTP proxy to use. The parameter should be a char * to a zero terminated
-string holding the host name or dotted IP address. To specify port number in
-this string, append :[port] to the end of the host name. The proxy string may
-be prefixed with [protocol]:// since any such prefix will be ignored. The
-proxy's port number may optionally be specified with the separate option. If
-not specified, libcurl will default to using port 1080 for proxies.
-\fICURLOPT_PROXYPORT\fP.
-
-When you tell the library to use an HTTP proxy, libcurl will transparently
-convert operations to HTTP even if you specify an FTP URL etc. This may have
-an impact on what other features of the library you can use, such as
-\fICURLOPT_QUOTE\fP and similar FTP specifics that don't work unless you
-tunnel through the HTTP proxy. Such tunneling is activated with
-\fICURLOPT_HTTPPROXYTUNNEL\fP.
-
-libcurl respects the environment variables \fBhttp_proxy\fP, \fBftp_proxy\fP,
-\fBall_proxy\fP etc, if any of those are set. The \fICURLOPT_PROXY\fP option
-does however override any possibly set environment variables.
-
-Setting the proxy string to "" (an empty string) will explicitly disable the
-use of a proxy, even if there is an environment variable set for it.
-
-Since 7.14.1, the proxy host string given in environment variables can be
-specified the exact same way as the proxy can be set with \fICURLOPT_PROXY\fP,
-include protocol prefix (http://) and embedded user + password.
+Proxy to use. See \fICURLOPT_PROXY(3)\fP
.IP CURLOPT_PROXYPORT
-Pass a long with this option to set the proxy port to connect to unless it is
-specified in the proxy string \fICURLOPT_PROXY\fP.
+Proxy port to use. See \fICURLOPT_PROXYPORT(3)\fP
.IP CURLOPT_PROXYTYPE
-Pass a long with this option to set type of the proxy. Available options for
-this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_HTTP_1_0\fP (added in 7.19.4),
-\fICURLPROXY_SOCKS4\fP (added in 7.15.2), \fICURLPROXY_SOCKS5\fP,
-\fICURLPROXY_SOCKS4A\fP (added in 7.18.0) and \fICURLPROXY_SOCKS5_HOSTNAME\fP
-(added in 7.18.0). The HTTP type is default. (Added in 7.10)
+Proxy type. See \fICURLOPT_PROXYTYPE(3)\fP
.IP CURLOPT_NOPROXY
-Pass a pointer to a zero terminated string. The should be a comma- separated
-list of hosts which do not use a proxy, if one is specified. The only
-wildcard is a single * character, which matches all hosts, and effectively
-disables the proxy. Each name in this list is matched as either a domain which
-contains the hostname, or the hostname itself. For example, local.com would
-match local.com, local.com:80, and www.local.com, but not www.notlocal.com.
-(Added in 7.19.4)
+Filter out hosts from proxy use. \fICURLOPT_NOPROXY(3)\fP
.IP CURLOPT_HTTPPROXYTUNNEL
-Set the parameter to 1 to make the library tunnel all operations through a
-given HTTP proxy. There is a big difference between using a proxy and to
-tunnel through it. If you don't know what this means, you probably don't want
-this tunneling option.
+Tunnel through the HTTP proxy. \fICURLOPT_HTTPPROXYTUNNEL(3)\fP
.IP CURLOPT_SOCKS5_GSSAPI_SERVICE
-Pass a char * as parameter to a string holding the name of the service. The
-default service name for a SOCKS5 server is rcmd/server-fqdn. This option
-allows you to change it. (Added in 7.19.4)
+Socks5 GSSAPI service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP
.IP CURLOPT_SOCKS5_GSSAPI_NEC
-Pass a long set to 1 to enable or 0 to disable. As part of the gssapi
-negotiation a protection mode is negotiated. The rfc1961 says in section
-4.3/4.4 it should be protected, but the NEC reference implementation does not.
-If enabled, this option allows the unprotected exchange of the protection mode
-negotiation. (Added in 7.19.4).
+Socks5 GSSAPI NEC mode. See \fICURLOPT_SOCKS5_GSSAPI_NEC(3)\fP
+.IP CURLOPT_PROXY_SERVICE_NAME
+Proxy service name. \fICURLOPT_PROXY_SERVICE_NAME(3)\fP
+.IP CURLOPT_SERVICE_NAME
+SPNEGO service name. \fICURLOPT_SERVICE_NAME(3)\fP
.IP CURLOPT_INTERFACE
-Pass a char * as parameter. This sets the interface name to use as outgoing
-network interface. The name can be an interface name, an IP address, or a host
-name.
+Bind connection locally to this. See \fICURLOPT_INTERFACE(3)\fP
.IP CURLOPT_LOCALPORT
-Pass a long. This sets the local port number of the socket used for
-connection. This can be used in combination with \fICURLOPT_INTERFACE\fP and
-you are recommended to use \fICURLOPT_LOCALPORTRANGE\fP as well when this is
-set. Valid port numbers are 1 - 65535. (Added in 7.15.2)
+Bind connection locally to this port. See \fICURLOPT_LOCALPORT(3)\fP
.IP CURLOPT_LOCALPORTRANGE
-Pass a long. This is the number of attempts libcurl should make to find a
-working local port number. It starts with the given \fICURLOPT_LOCALPORT\fP
-and adds one to the number for each retry. Setting this to 1 or below will
-make libcurl do only one try for the exact port number. Port numbers by nature
-are scarce resources that will be busy at times so setting this value to
-something too low might cause unnecessary connection setup failures. (Added in
-7.15.2)
+Bind connection locally to port range. See \fICURLOPT_LOCALPORTRANGE(3)\fP
.IP CURLOPT_DNS_CACHE_TIMEOUT
-Pass a long, this sets the timeout in seconds. Name resolves will be kept in
-memory for this number of seconds. Set to zero to completely disable
-caching, or set to -1 to make the cached entries remain forever. By default,
-libcurl caches this info for 60 seconds.
-
-The name resolve functions of various libc implementations don't re-read name
-server information unless explicitly told so (for example, by calling
-\fIres_init(3)\fP). This may cause libcurl to keep using the older server even
-if DHCP has updated the server info, and this may look like a DNS cache issue
-to the casual libcurl-app user.
+Timeout for DNS cache. See \fICURLOPT_DNS_CACHE_TIMEOUT(3)\fP
.IP CURLOPT_DNS_USE_GLOBAL_CACHE
-Pass a long. If the value is 1, it tells curl to use a global DNS cache
-that will survive between easy handle creations and deletions. This is not
-thread-safe and this will use a global variable.
-
-\fBWARNING:\fP this option is considered obsolete. Stop using it. Switch over
-to using the share interface instead! See \fICURLOPT_SHARE\fP and
-\fIcurl_share_init(3)\fP.
+OBSOLETE Enable global DNS cache. See \fICURLOPT_DNS_USE_GLOBAL_CACHE(3)\fP
.IP CURLOPT_BUFFERSIZE
-Pass a long specifying your preferred size (in bytes) for the receive buffer
-in libcurl. The main point of this would be that the write callback gets
-called more often and with smaller chunks. This is just treated as a request,
-not an order. You cannot be guaranteed to actually get the given size. (Added
-in 7.10)
-
-This size is by default set as big as possible (CURL_MAX_WRITE_SIZE), so it
-only makes sense to use this option if you want it smaller.
+Ask for smaller buffer size. See \fICURLOPT_BUFFERSIZE(3)\fP
.IP CURLOPT_PORT
-Pass a long specifying what remote port number to connect to, instead of the
-one specified in the URL or the default port for the used protocol.
+Port number to connect to. See \fICURLOPT_PORT(3)\fP
.IP CURLOPT_TCP_NODELAY
-Pass a long specifying whether the TCP_NODELAY option should be set or
-cleared (1 = set, 0 = clear). The option is cleared by default. This
-will have no effect after the connection has been established.
-
-Setting this option will disable TCP's Nagle algorithm. The purpose of
-this algorithm is to try to minimize the number of small packets on
-the network (where "small packets" means TCP segments less than the
-Maximum Segment Size (MSS) for the network).
-
-Maximizing the amount of data sent per TCP segment is good because it
-amortizes the overhead of the send. However, in some cases (most
-notably telnet or rlogin) small segments may need to be sent
-without delay. This is less efficient than sending larger amounts of
-data at a time, and can contribute to congestion on the network if
-overdone.
+Disable the Nagle algorithm. See \fICURLOPT_TCP_NODELAY(3)\fP
.IP CURLOPT_ADDRESS_SCOPE
-Pass a long specifying the scope_id value to use when connecting to IPv6
-link-local or site-local addresses. (Added in 7.19.0)
+IPv6 scope for local addresses. See \fICURLOPT_ADDRESS_SCOPE(3)\fP
+.IP CURLOPT_TCP_KEEPALIVE
+Enable TCP keep-alive. See \fICURLOPT_TCP_KEEPALIVE(3)\fP
+.IP CURLOPT_TCP_KEEPIDLE
+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
-This parameter controls the preference of libcurl between using user names and
-passwords from your \fI~/.netrc\fP file, relative to user names and passwords
-in the URL supplied with \fICURLOPT_URL\fP.
-
-libcurl uses a user name (and supplied or prompted password) supplied with
-\fICURLOPT_USERPWD\fP in preference to any of the options controlled by this
-parameter.
-
-Pass a long, set to one of the values described below.
-.RS
-.IP CURL_NETRC_OPTIONAL
-The use of your \fI~/.netrc\fP file is optional, and information in the URL is
-to be preferred. The file will be scanned for the host and user name (to
-find the password only) or for the host only, to find the first user name and
-password after that \fImachine\fP, which ever information is not specified in
-the URL.
-
-Undefined values of the option will have this effect.
-.IP CURL_NETRC_IGNORED
-The library will ignore the file and use only the information in the URL.
-
-This is the default.
-.IP CURL_NETRC_REQUIRED
-This value tells the library that use of the file is required, to ignore the
-information in the URL, and to search the file for the host only.
-.RE
-Only machine name, user name and password are taken into account
-(init macros and similar things aren't supported).
-
-libcurl does not verify that the file has the correct properties set (as the
-standard Unix ftp client does). It should only be readable by user.
+Enable .netrc parsing. See \fICURLOPT_NETRC(3)\fP
.IP CURLOPT_NETRC_FILE
-Pass a char * as parameter, pointing to a zero terminated string containing
-the full path name to the file you want libcurl to use as .netrc file. If this
-option is omitted, and \fICURLOPT_NETRC\fP is set, libcurl will attempt to
-find a .netrc file in the current user's home directory. (Added in 7.10.9)
+\&.netrc file name. See \fICURLOPT_NETRC_FILE(3)\fP
.IP CURLOPT_USERPWD
-Pass a char * as parameter, which should be [user name]:[password] to use for
-the connection. Use \fICURLOPT_HTTPAUTH\fP to decide the authentication method.
-
-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\fP, libcurl might perform
-several requests to possibly different hosts. libcurl will only send this user
-and password information to hosts using the initial host name (unless
-\fICURLOPT_UNRESTRICTED_AUTH\fP is set), so if libcurl follows locations to
-other hosts it will not send the user and password to those. This is enforced
-to prevent accidental information leakage.
+User name and password. See \fICURLOPT_USERPWD(3)\fP
.IP CURLOPT_PROXYUSERPWD
-Pass a char * as parameter, which should be [user name]:[password] to use for
-the connection to the HTTP proxy. Use \fICURLOPT_PROXYAUTH\fP to decide
-the authentication method.
+Proxy user name and password. See \fICURLOPT_PROXYUSERPWD(3)\fP
.IP CURLOPT_USERNAME
-Pass a char * as parameter, which should be pointing to the zero terminated
-user name to use for the transfer.
-
-\fBCURLOPT_USERNAME\fP sets the user name to be used in protocol
-authentication. You should not use this option together with the (older)
-CURLOPT_USERPWD option.
-
-In order to specify the password to be used in conjunction with the user name
-use the \fICURLOPT_PASSWORD\fP option. (Added in 7.19.1)
+User name. See \fICURLOPT_USERNAME(3)\fP
.IP CURLOPT_PASSWORD
-Pass a char * as parameter, which should be pointing to the zero terminated
-password to use for the transfer.
-
-The CURLOPT_PASSWORD option should be used in conjunction with
-the \fICURLOPT_USERNAME\fP option. (Added in 7.19.1)
+Password. See \fICURLOPT_PASSWORD(3)\fP
+.IP CURLOPT_LOGIN_OPTIONS
+Login options. See \fICURLOPT_LOGIN_OPTIONS(3)\fP
.IP CURLOPT_PROXYUSERNAME
-Pass a char * as parameter, which should be pointing to the zero terminated
-user name to use for the transfer while connecting to Proxy.
-
-The CURLOPT_PROXYUSERNAME option should be used in same way as the
-\fICURLOPT_PROXYUSERPWD\fP is used. In comparison to
-\fICURLOPT_PROXYUSERPWD\fP the CURLOPT_PROXYUSERNAME allows the username to
-contain a colon, like in the following example: "sip:user@example.com". The
-CURLOPT_PROXYUSERNAME option is an alternative way to set the user name while
-connecting to Proxy. There is no meaning to use it together with the
-\fICURLOPT_PROXYUSERPWD\fP option.
-
-In order to specify the password to be used in conjunction with the user name
-use the \fICURLOPT_PROXYPASSWORD\fP option. (Added in 7.19.1)
+Proxy user name. See \fICURLOPT_PROXYUSERNAME(3)\fP
.IP CURLOPT_PROXYPASSWORD
-Pass a char * as parameter, which should be pointing to the zero terminated
-password to use for the transfer while connecting to Proxy.
-
-The CURLOPT_PROXYPASSWORD option should be used in conjunction with
-the \fICURLOPT_PROXYUSERNAME\fP option. (Added in 7.19.1)
+Proxy password. See \fICURLOPT_PROXYPASSWORD(3)\fP
.IP CURLOPT_HTTPAUTH
-Pass a long as parameter, which is set to a bitmask, to tell libcurl which
-authentication method(s) you want it to use. The available bits are listed
-below. If more than one bit is set, libcurl will first query the site to see
-which authentication methods it supports and then pick the best one you allow
-it to use. For some methods, this will induce an extra network round-trip. Set
-the actual name and password with the \fICURLOPT_USERPWD\fP option or
-with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_USERPASSWORD\fP options.
-(Added in 7.10.6)
-.RS
-.IP CURLAUTH_BASIC
-HTTP Basic authentication. This is the default choice, and the only method
-that is in wide-spread use and supported virtually everywhere. This sends
-the user name and password over the network in plain text, easily captured by
-others.
-.IP CURLAUTH_DIGEST
-HTTP Digest authentication. Digest authentication is defined in RFC2617 and
-is a more secure way to do authentication over public networks than the
-regular old-fashioned Basic method.
-.IP CURLAUTH_DIGEST_IE
-HTTP Digest authentication with an IE flavor. Digest authentication is
-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. (This define was
-added in 7.19.3)
-.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 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
-prevent the password from being eavesdropped.
-
-You need to build libcurl with OpenSSL support for this option to work, or
-build libcurl on Windows.
-.IP CURLAUTH_ANY
-This is a convenience macro that sets all bits and thus makes libcurl pick any
-it finds suitable. libcurl will automatically select the one it finds most
-secure.
-.IP CURLAUTH_ANYSAFE
-This is a convenience macro that sets all bits except Basic and thus makes
-libcurl pick any it finds suitable. libcurl will automatically select the one
-it finds most secure.
-.RE
+HTTP server authentication methods. See \fICURLOPT_HTTPAUTH(3)\fP
+.IP CURLOPT_TLSAUTH_USERNAME
+TLS authentication user name. See \fICURLOPT_TLSAUTH_USERNAME(3)\fP
+.IP CURLOPT_TLSAUTH_PASSWORD
+TLS authentication password. See \fICURLOPT_TLSAUTH_PASSWORD(3)\fP
+.IP CURLOPT_TLSAUTH_TYPE
+TLS authentication methods. See \fICURLOPT_TLSAUTH_TYPE(3)\fP
.IP CURLOPT_PROXYAUTH
-Pass a long as parameter, which is set to a bitmask, to tell libcurl which
-authentication method(s) you want it to use for your proxy authentication. If
-more than one bit is set, libcurl will first query the site to see what
-authentication methods it supports and then pick the best one you allow it to
-use. For some methods, this will induce an extra network round-trip. Set the
-actual name and password with the \fICURLOPT_PROXYUSERPWD\fP option. The
-bitmask can be constructed by or'ing together the bits listed above for the
-\fICURLOPT_HTTPAUTH\fP option. As of this writing, only Basic, Digest and NTLM
-work. (Added in 7.10.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
.SH HTTP OPTIONS
.IP CURLOPT_AUTOREFERER
-Pass a parameter set to 1 to enable this. When enabled, libcurl will
-automatically set the Referer: field in requests where it follows a Location:
-redirect.
-.IP CURLOPT_ENCODING
-Sets the contents of the Accept-Encoding: header sent in an HTTP request, and
-enables decoding of a response when a Content-Encoding: header is received.
-Three encodings are supported: \fIidentity\fP, which does nothing,
-\fIdeflate\fP which requests the server to compress its response using the
-zlib algorithm, and \fIgzip\fP which requests the gzip algorithm. If a
-zero-length string is set, then an Accept-Encoding: header containing all
-supported encodings is sent.
-
-This is a request, not an order; the server may or may not do it. This option
-must be set (to any non-NULL value) or else any unsolicited encoding done by
-the server is ignored. See the special file lib/README.encoding for details.
+Automatically set Referer: header. See \fICURLOPT_AUTOREFERER(3)\fP
+.IP CURLOPT_ACCEPT_ENCODING
+Accept-Encoding and automatic decompressing data. See \fICURLOPT_ACCEPT_ENCODING(3)\fP
+.IP CURLOPT_TRANSFER_ENCODING
+Request Transfer-Encoding. See \fICURLOPT_TRANSFER_ENCODING(3)\fP
.IP CURLOPT_FOLLOWLOCATION
-A parameter set to 1 tells the library to follow any Location: header that the
-server sends as part of an HTTP header.
-
-This means that the library will re-send the same request on the new location
-and follow new Location: headers all the way until no more such headers are
-returned. \fICURLOPT_MAXREDIRS\fP can be used to limit the number of redirects
-libcurl will follow.
-
-Since 7.19.4, libcurl can limit what protocols it will automatically
-follow. The accepted protocols are set with \fICURLOPT_REDIR_PROTOCOLS\fP and
-it excludes the FILE protocol by default.
+Follow HTTP redirects. See \fICURLOPT_FOLLOWLOCATION(3)\fP
.IP CURLOPT_UNRESTRICTED_AUTH
-A parameter set to 1 tells the library it can continue to send authentication
-(user+password) when following locations, even when hostname changed. This
-option is meaningful only when setting \fICURLOPT_FOLLOWLOCATION\fP.
+Do not restrict authentication to original host. \fICURLOPT_UNRESTRICTED_AUTH(3)\fP
.IP CURLOPT_MAXREDIRS
-Pass a long. The set number will be the redirection limit. If that many
-redirections have been followed, the next redirect will cause an error
-(\fICURLE_TOO_MANY_REDIRECTS\fP). This option only makes sense if the
-\fICURLOPT_FOLLOWLOCATION\fP is used at the same time. Added in 7.15.1:
-Setting the limit to 0 will make libcurl refuse any redirect. Set it to -1 for
-an infinite number of redirects (which is the default)
+Maximum number of redirects to follow. See \fICURLOPT_MAXREDIRS(3)\fP
.IP CURLOPT_POSTREDIR
-Pass a bitmask to control how libcurl acts on redirects after POSTs that get a
-301 or 302 response back. A parameter with bit 0 set (value
-\fBCURL_REDIR_POST_301\fP) tells the library to respect RFC 2616/10.3.2 and
-not convert POST requests into GET requests when following a 301
-redirection. Setting bit 1 (value CURL_REDIR_POST_302) makes libcurl maintain
-the request method after a 302 redirect. CURL_REDIR_POST_ALL is a convenience
-define that sets both bits.
-
-The non-RFC behaviour is ubiquitous in web browsers, so the library does the
-conversion by default to maintain consistency. However, a server may require a
-POST to remain a POST after such a redirection. This option is meaningful only
-when setting \fICURLOPT_FOLLOWLOCATION\fP. (Added in 7.17.1) (This option was
-known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 way before
-then)
+How to act on redirects after POST. See \fICURLOPT_POSTREDIR(3)\fP
.IP CURLOPT_PUT
-A parameter set to 1 tells the library to use HTTP PUT to transfer data. The
-data should be set with \fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE\fP.
-
-This option is deprecated and starting with version 7.12.1 you should instead
-use \fICURLOPT_UPLOAD\fP.
+Issue a HTTP PUT request. See \fICURLOPT_PUT(3)\fP
.IP CURLOPT_POST
-A parameter set to 1 tells the library to do a regular HTTP post. This will
-also make the library use a "Content-Type:
-application/x-www-form-urlencoded" header. (This is by far the most commonly
-used POST method).
-
-Use one of \fICURLOPT_POSTFIELDS\fP or \fICURLOPT_COPYPOSTFIELDS\fP options to
-specify what data to post and \fICURLOPT_POSTFIELDSIZE\fP or
-\fICURLOPT_POSTFIELDSIZE_LARGE\fP to set the data size.
-
-Optionally, you can provide data to POST using the \fICURLOPT_READFUNCTION\fP
-and \fICURLOPT_READDATA\fP options but then you must make sure to not set
-\fICURLOPT_POSTFIELDS\fP to anything but NULL. When providing data with a
-callback, you must transmit it using chunked transfer-encoding or you must set
-the size of the data with the \fICURLOPT_POSTFIELDSIZE\fP or
-\fICURLOPT_POSTFIELDSIZE_LARGE\fP option. To enable chunked encoding, you
-simply pass in the appropriate Transfer-Encoding header, see the
-post-callback.c example.
-
-You can override the default POST Content-Type: header by setting your own
-with \fICURLOPT_HTTPHEADER\fP.
-
-Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
-You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
-
-If you use POST to a HTTP 1.1 server, you can send data without knowing the
-size before starting the POST if you use chunked encoding. You enable this by
-adding a header like "Transfer-Encoding: chunked" with
-\fICURLOPT_HTTPHEADER\fP. With HTTP 1.0 or without chunked transfer, you must
-specify the size in the request.
-
-When setting \fICURLOPT_POST\fP to 1, it will automatically set
-\fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
-
-If you issue a POST request and then want to make a HEAD or GET using the same
-re-used handle, you must explicitly set the new request type using
-\fICURLOPT_NOBODY\fP or \fICURLOPT_HTTPGET\fP or similar.
+Issue a HTTP POST request. See \fICURLOPT_POST(3)\fP
.IP CURLOPT_POSTFIELDS
-Pass a void * as parameter, which should be the full data to post in an HTTP
-POST operation. You must make sure that the data is formatted the way you want
-the server to receive it. libcurl will not convert or encode it for you. Most
-web servers will assume this data to be url-encoded.
-
-The pointed data are NOT copied by the library: as a consequence, they must
-be preserved by the calling application until the transfer finishes.
-
-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 the most
-commonly used one by HTML forms. See also the \fICURLOPT_POST\fP. Using
-\fICURLOPT_POSTFIELDS\fP implies \fICURLOPT_POST\fP.
-
-If you want to do a zero-byte POST, you need to set
-\fICURLOPT_POSTFIELDSIZE\fP explicitly to zero, as simply setting
-\fICURLOPT_POSTFIELDS\fP to NULL or "" just effectively disables the sending
-of the specified string. libcurl will instead assume that you'll send the POST
-data using the read callback!
-
-Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
-You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
-
-To make multipart/formdata posts (aka RFC2388-posts), check out the
-\fICURLOPT_HTTPPOST\fP option.
+Send a POST with this data. See \fICURLOPT_POSTFIELDS(3)\fP
.IP CURLOPT_POSTFIELDSIZE
-If you want to post data to the server without letting libcurl do a strlen()
-to measure the data size, this option must be used. When this option is used
-you can post fully binary data, which otherwise is likely to fail. If this
-size is set to -1, the library will use strlen() to get the size.
+The POST data is this big. See \fICURLOPT_POSTFIELDSIZE(3)\fP
.IP CURLOPT_POSTFIELDSIZE_LARGE
-Pass a curl_off_t as parameter. Use this to set the size of the
-\fICURLOPT_POSTFIELDS\fP data to prevent libcurl from doing strlen() on the
-data to figure out the size. This is the large file version of the
-\fICURLOPT_POSTFIELDSIZE\fP option. (Added in 7.11.1)
+The POST data is this big. See \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP
.IP CURLOPT_COPYPOSTFIELDS
-Pass a char * as parameter, which should be the full data to post in an HTTP
-POST operation. It behaves as the \fICURLOPT_POSTFIELDS\fP option, but the
-original data are 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\fP or
-\fICURLOPT_POSTFIELDSIZE_LARGE\fP: If the size has not been set prior to
-\fICURLOPT_COPYPOSTFIELDS\fP, the data are assumed to be a NUL-terminated
-string; else the stored size informs the library about the data byte count to
-copy. In any case, the size must not be changed after
-\fICURLOPT_COPYPOSTFIELDS\fP, unless another \fICURLOPT_POSTFIELDS\fP or
-\fICURLOPT_COPYPOSTFIELDS\fP option is issued.
-(Added in 7.17.1)
+Send a POST with this data - and copy it. See \fICURLOPT_COPYPOSTFIELDS(3)\fP
.IP CURLOPT_HTTPPOST
-Tells libcurl you want a multipart/formdata HTTP POST to be made and you
-instruct what data to pass on to the server. Pass a pointer to a linked list
-of curl_httppost structs as parameter. The easiest way to create such a
-list, is to use \fIcurl_formadd(3)\fP as documented. The data in this list
-must remain intact until you close this curl handle again with
-\fIcurl_easy_cleanup(3)\fP.
-
-Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
-You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
-
-When setting \fICURLOPT_HTTPPOST\fP, it will automatically set
-\fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
+Multipart formpost HTTP POST. See \fICURLOPT_HTTPPOST(3)\fP
.IP CURLOPT_REFERER
-Pass a pointer to a zero terminated string as parameter. It will be used to
-set the Referer: header in the http request sent to the remote server. This
-can be used to fool servers or scripts. You can also set any custom header
-with \fICURLOPT_HTTPHEADER\fP.
+Referer: header. See \fICURLOPT_REFERER(3)\fP
.IP CURLOPT_USERAGENT
-Pass a pointer to a zero terminated string as parameter. It will be used to
-set the User-Agent: header in the http request sent to the remote server. This
-can be used to fool servers or scripts. You can also set any custom header
-with \fICURLOPT_HTTPHEADER\fP.
+User-Agent: header. See \fICURLOPT_USERAGENT(3)\fP
.IP CURLOPT_HTTPHEADER
-Pass a pointer to a linked list of HTTP headers to pass to the server in your
-HTTP request. The linked list should be a fully valid list of \fBstruct
-curl_slist\fP structs properly filled in. Use \fIcurl_slist_append(3)\fP to
-create the list and \fIcurl_slist_free_all(3)\fP to clean up an entire
-list. If you add a header that is otherwise generated and used by libcurl
-internally, your added one will be used instead. If you add a header with no
-content as in 'Accept:' (no data on the right side of the colon), the
-internally used header will get disabled. Thus, using this option you can add
-new headers, replace internal headers and remove internal headers. To add a
-header with no content, make the content be two quotes: \&"". The headers
-included in the linked list must not be CRLF-terminated, because curl adds
-CRLF after each header item. Failure to comply with this will result in
-strange bugs because the server will most likely ignore part of the headers
-you specified.
-
-The first line in a request (containing the method, usually a GET or POST) is
-not a header and cannot be replaced using this option. Only the lines
-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.
-
-Pass a NULL to this to reset back to no custom headers.
-
-The most commonly replaced headers have "shortcuts" in the options
-\fICURLOPT_COOKIE\fP, \fICURLOPT_USERAGENT\fP and \fICURLOPT_REFERER\fP.
+Custom HTTP headers. See \fICURLOPT_HTTPHEADER(3)\fP
+.IP CURLOPT_HEADEROPT
+Control custom headers. See \fICURLOPT_HEADEROPT(3)\fP
+.IP CURLOPT_PROXYHEADER
+Custom HTTP headers sent to proxy. See \fICURLOPT_PROXYHEADER(3)\fP
.IP CURLOPT_HTTP200ALIASES
-Pass a pointer to a linked list of aliases to be treated as valid HTTP 200
-responses. Some servers respond with a custom header response line. For
-example, IceCast servers respond with "ICY 200 OK". By including this string
-in your list of aliases, the response will be treated as a valid HTTP header
-line such as "HTTP/1.0 200 OK". (Added in 7.10.3)
-
-The linked list should be a fully valid list of struct curl_slist structs, and
-be properly filled in. Use \fIcurl_slist_append(3)\fP to create the list and
-\fIcurl_slist_free_all(3)\fP to clean up an entire list.
-
-The alias itself is not parsed for any version strings. Before libcurl 7.16.3,
-Libcurl used the value set by option \fICURLOPT_HTTP_VERSION\fP, but starting
-with 7.16.3 the protocol is assumed to match HTTP 1.0 when an alias matched.
+Alternative versions of 200 OK. See \fICURLOPT_HTTP200ALIASES(3)\fP
.IP CURLOPT_COOKIE
-Pass a pointer to a zero terminated string as parameter. It will be used to
-set a cookie in the http request. The format of the string should be
-NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie
-should contain.
-
-If you need to set multiple cookies, you need to set them all using a single
-option and thus you need to concatenate them all in one single string. Set
-multiple cookies in one string like this: "name1=content1; name2=content2;"
-etc.
-
-This option sets the cookie header explictly in the outgoing request(s). If
-multiple requests are done due to authentication, followed redirections or
-similar, they will all get this cookie passed on.
-
-Using this option multiple times will only make the latest string override the
-previous ones.
+Cookie(s) to send. See \fICURLOPT_COOKIE(3)\fP
.IP CURLOPT_COOKIEFILE
-Pass a pointer to a zero terminated string as parameter. It should contain the
-name of your file holding cookie data to read. The cookie data may be in
-Netscape / Mozilla cookie data format or just regular HTTP-style headers
-dumped to a file.
-
-Given an empty or non-existing file or by passing the empty string (""), this
-option will enable cookies for this curl handle, making it understand and
-parse received cookies and then use matching cookies in future requests.
-
-If you use this option multiple times, you just add more files to read.
-Subsequent files will add more cookies.
+File to read cookies from. See \fICURLOPT_COOKIEFILE(3)\fP
.IP CURLOPT_COOKIEJAR
-Pass a file name as char *, zero terminated. This will make libcurl write all
-internally known cookies to the specified file when \fIcurl_easy_cleanup(3)\fP
-is called. If no cookies are known, no file will be created. Specify "-" to
-instead have the cookies written to stdout. Using this option also enables
-cookies for this session, so if you for example follow a location it will make
-matching cookies get sent accordingly.
-
-If the cookie jar file can't be created or written to (when the
-\fIcurl_easy_cleanup(3)\fP is called), libcurl will not and cannot report an
-error for this. Using \fICURLOPT_VERBOSE\fP or \fICURLOPT_DEBUGFUNCTION\fP
-will get a warning to display, but that is the only visible feedback you get
-about this possibly lethal situation.
+File to write cookies to. See \fICURLOPT_COOKIEJAR(3)\fP
.IP CURLOPT_COOKIESESSION
-Pass a long set to 1 to mark this as a new cookie "session". It will force
-libcurl to ignore all cookies it is about to load that are "session cookies"
-from the previous session. By default, libcurl always stores and loads all
-cookies, independent if they are session cookies or not. Session cookies are
-cookies without expiry date and they are meant to be alive and existing for
-this "session" only.
+Start a new cookie session. See \fICURLOPT_COOKIESESSION(3)\fP
.IP CURLOPT_COOKIELIST
-Pass a char * to a cookie string. Cookie can be either in Netscape / Mozilla
-format or just regular HTTP-style header (Set-Cookie: ...) format. If cURL
-cookie engine was not enabled it will enable its cookie engine. Passing a
-magic string \&"ALL" will erase all cookies known by cURL. (Added in 7.14.1)
-Passing the special string \&"SESS" will only erase all session cookies known
-by cURL. (Added in 7.15.4) Passing the special string \&"FLUSH" will write
-all cookies known by cURL to the file specified by \fICURLOPT_COOKIEJAR\fP.
-(Added in 7.17.1)
+Add or control cookies. See \fICURLOPT_COOKIELIST(3)\fP
.IP CURLOPT_HTTPGET
-Pass a long. If the long is 1, this forces the HTTP request to get back
-to GET. Usable if a POST, HEAD, PUT, or a custom request has been used
-previously using the same curl handle.
-
-When setting \fICURLOPT_HTTPGET\fP to 1, it will automatically set
-\fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
+Do a HTTP GET request. See \fICURLOPT_HTTPGET(3)\fP
.IP CURLOPT_HTTP_VERSION
-Pass a long, set to one of the values described below. They force libcurl to
-use the specific HTTP versions. This is not sensible to do unless you have a
-good reason.
-.RS
-.IP CURL_HTTP_VERSION_NONE
-We don't care about what version the library uses. libcurl will use whatever
-it thinks fit.
-.IP CURL_HTTP_VERSION_1_0
-Enforce HTTP 1.0 requests.
-.IP CURL_HTTP_VERSION_1_1
-Enforce HTTP 1.1 requests.
-.RE
+HTTP version to use. \fICURLOPT_HTTP_VERSION(3)\fP
.IP CURLOPT_IGNORE_CONTENT_LENGTH
-Ignore the Content-Length header. This is useful for Apache 1.x (and similar
-servers) which will report incorrect content length for files over 2
-gigabytes. If this option is used, curl will not be able to accurately report
-progress, and will simply stop the download when the server ends the
-connection. (added in 7.14.1)
+Ignore Content-Length. See \fICURLOPT_IGNORE_CONTENT_LENGTH(3)\fP
.IP CURLOPT_HTTP_CONTENT_DECODING
-Pass a long to tell libcurl how to act on content decoding. If set to zero,
-content decoding will be disabled. If set to 1 it is enabled. Libcurl has no
-default content decoding but requires you to use \fICURLOPT_ENCODING\fP for
-that. (added in 7.16.2)
+Disable Content decoding. See \fICURLOPT_HTTP_CONTENT_DECODING(3)\fP
.IP CURLOPT_HTTP_TRANSFER_DECODING
-Pass a long to tell libcurl how to act on transfer decoding. If set to zero,
-transfer decoding will be disabled, if set to 1 it is enabled
-(default). libcurl does chunked transfer decoding by default unless this
-option is set to zero. (added in 7.16.2)
+Disable Transfer decoding. See \fICURLOPT_HTTP_TRANSFER_DECODING(3)\fP
+.IP CURLOPT_EXPECT_100_TIMEOUT_MS
+100-continue timeout. See \fICURLOPT_EXPECT_100_TIMEOUT_MS(3)\fP
.SH SMTP OPTIONS
.IP CURLOPT_MAIL_FROM
-Pass a pointer to a zero terminated string as parameter. It will be used to
-specify the sender address in a mail when sending an SMTP mail with libcurl.
-
-(Added in 7.20.0)
+Address of the sender. See \fICURLOPT_MAIL_FROM(3)\fP
.IP CURLOPT_MAIL_RCPT
-Pass a pointer to a linked list of recipients to pass to the server in your
-SMTP mail request. The linked list should be a fully valid list of \fBstruct
-curl_slist\fP structs properly filled in. Use \fIcurl_slist_append(3)\fP to
-create the list and \fIcurl_slist_free_all(3)\fP to clean up an entire list.
-
-Each recipient in SMTP lingo is specified with angle brackets (<>), but should
-you not use an angle bracket as first letter libcurl will assume you provide a
-single email address only and enclose that with angle brackets for you.
-
-(Added in 7.20.0)
+Address of the recipients. See \fICURLOPT_MAIL_RCPT(3)\fP
+.IP CURLOPT_MAIL_AUTH
+Authentication address. See \fICURLOPT_MAIL_AUTH(3)\fP
.SH TFTP OPTIONS
.IP CURLOPT_TFTP_BLKSIZE
-Specify block size to use for TFTP data transmission. Valid range as per RFC
-2348 is 8-65464 bytes. The default of 512 bytes will be used if this option is
-not specified. The specified block size will only be used pending support by
-the remote server. If the server does not return an option acknowledgement or
-returns an option acknowledgement with no blksize, the default of 512 bytes
-will be used. (added in 7.19.4)
+TFTP block size. See \fICURLOPT_TFTP_BLKSIZE(3)\fP
.SH FTP OPTIONS
.IP CURLOPT_FTPPORT
-Pass a pointer to a zero terminated string as parameter. It will be used to
-get the IP address to use for the FTP PORT instruction. The PORT instruction
-tells the remote server to connect to our specified IP address. The string may
-be a plain IP address, a host name, a network interface name (under Unix) or
-just a '-' symbol to let the library use your system's default IP
-address. Default FTP operations are passive, and thus won't use PORT.
-
-The address can be followed by a ':' to specify a port, optionally followed by
-a '-' to specify a port range. If the port specified is 0, the operating
-system will pick a free port. If a range is provided and all ports in the
-range are not available, libcurl will report CURLE_FTP_PORT_FAILED for the
-handle. Invalid port/range settings are ignored. IPv6 addresses followed by
-a port or portrange have to be in brackets. IPv6 addresses without port/range
-specifier can be in brackets. (added in 7.19.5)
-
-Examples with specified ports:
-
-.nf
- eth0:0
- 192.168.1.2:32000-33000
- curl.se:32123
- [::1]:1234-4567
-.fi
-
-You disable PORT again and go back to using the passive version by setting
-this option to NULL.
+Use active FTP. See \fICURLOPT_FTPPORT(3)\fP
.IP CURLOPT_QUOTE
-Pass a pointer to a linked list of FTP or SFTP commands to pass to
-the server prior to your FTP request. This will be done before any
-other commands are issued (even before the CWD command for FTP). The
-linked list should be a fully valid list of 'struct curl_slist' structs
-properly filled in with text strings. Use \fIcurl_slist_append(3)\fP
-to append strings (commands) to the list, and clear the entire list
-afterwards with \fIcurl_slist_free_all(3)\fP. Disable this operation
-again by setting a NULL to this option.
-The set of valid FTP commands depends on the server (see RFC959 for a
-list of mandatory commands).
-The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd,
-rename, rm, rmdir, symlink (see
-.BR curl (1))
-(SFTP support added in 7.16.3)
+Commands to run before transfer. See \fICURLOPT_QUOTE(3)\fP
.IP CURLOPT_POSTQUOTE
-Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
-after your FTP transfer request. The commands will only be run if no error
-occurred. The linked list should be a fully valid list of struct curl_slist
-structs properly filled in as described for \fICURLOPT_QUOTE\fP. Disable this
-operation again by setting a NULL to this option.
+Commands to run after transfer. See \fICURLOPT_POSTQUOTE(3)\fP
.IP CURLOPT_PREQUOTE
-Pass a pointer to a linked list of FTP commands to pass to the server after
-the transfer type is set. The linked list should be a fully valid list of
-struct curl_slist structs properly filled in as described for
-\fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this
-option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP to 1, this
-option didn't work.
-.IP CURLOPT_DIRLISTONLY
-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.
-
-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.
-
-Do NOT use this option if you also use \fICURLOPT_WILDCARDMATCH\fP as it will
-effectively break that feature then.
-
-(This option was known as CURLOPT_FTPLISTONLY up to 7.16.4)
+Commands to run just before transfer. See \fICURLOPT_PREQUOTE(3)\fP
.IP CURLOPT_APPEND
-A parameter set to 1 tells the library to append to the remote file instead of
-overwrite it. This is only useful when uploading to an FTP site.
-
-(This option was known as CURLOPT_FTPAPPEND up to 7.16.4)
+Append to remote file. See \fICURLOPT_APPEND(3)\fP
.IP CURLOPT_FTP_USE_EPRT
-Pass a long. If the value is 1, it tells curl to use the EPRT (and
-LPRT) command when doing active FTP downloads (which is enabled by
-\fICURLOPT_FTPPORT\fP). Using EPRT means that it will first attempt to use
-EPRT and then LPRT before using PORT, but if you pass zero to this
-option, it will not try using EPRT or LPRT, only plain PORT. (Added in 7.10.5)
-
-If the server is an IPv6 host, this option will have no effect as of 7.12.3.
+Use EPTR. See \fICURLOPT_FTP_USE_EPRT(3)\fP
.IP CURLOPT_FTP_USE_EPSV
-Pass a long. If the value is 1, it tells curl to use the EPSV command
-when doing passive FTP downloads (which it always does by default). Using EPSV
-means that it will first attempt to use EPSV before using PASV, but if you
-pass zero to this option, it will not try using EPSV, only plain PASV.
-
-If the server is an IPv6 host, this option will have no effect as of 7.12.3.
+Use EPSV. See \fICURLOPT_FTP_USE_EPSV(3)\fP
.IP CURLOPT_FTP_USE_PRET
-Pass a long. If the value is 1, it tells curl to send a PRET command before
-PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard
-command for directory listings as well as up and downloads in PASV mode. Has
-no effect when using the active FTP transfers mode. (Added in 7.20.0)
+Use PRET. See \fICURLOPT_FTP_USE_PRET(3)\fP
.IP CURLOPT_FTP_CREATE_MISSING_DIRS
-Pass a long. If the value is 1, curl will attempt to create any remote
-directory that it fails to CWD into. CWD is the command that changes working
-directory. (Added in 7.10.7)
-
-This setting also applies to SFTP-connections. curl will attempt to create
-the remote directory if it can't obtain a handle to the target-location. The
-creation will fail if a file of the same name as the directory to create
-already exists or lack of permissions prevents creation. (Added in 7.16.3)
-
-Starting with 7.19.4, you can also set this value to 2, which will make
-libcurl retry the CWD command again if the subsequent MKD command fails. This
-is especially useful if you're doing many simultanoes connections against the
-same server and they all have this option enabled, as then CWD may first fail
-but then another connection does MKD before this connection and thus MKD fails
-but trying CWD works! 7.19.4 also introduced the \fICURLFTP_CREATE_DIR\fP and
-\fICURLFTP_CREATE_DIR_RETRY\fP enum names for these arguments.
-
-Before version 7.19.4, libcurl will simply ignore arguments set to 2 and act
-as if 1 was selected.
+Create missing directories on the remote server. See \fICURLOPT_FTP_CREATE_MISSING_DIRS(3)\fP
.IP CURLOPT_FTP_RESPONSE_TIMEOUT
-Pass a long. Causes curl to set a timeout period (in seconds) on the amount
-of time that the server is allowed to take in order to generate a response
-message for a command before the session is considered hung. While curl is
-waiting for a response, this value overrides \fICURLOPT_TIMEOUT\fP. It is
-recommended that if used in conjunction with \fICURLOPT_TIMEOUT\fP, you set
-\fICURLOPT_FTP_RESPONSE_TIMEOUT\fP to a value smaller than
-\fICURLOPT_TIMEOUT\fP. (Added in 7.10.8)
+Timeout for FTP responses. See \fICURLOPT_FTP_RESPONSE_TIMEOUT(3)\fP
.IP CURLOPT_FTP_ALTERNATIVE_TO_USER
-Pass a char * as parameter, pointing to a string which will be used to
-authenticate if the usual FTP "USER user" and "PASS password" negotiation
-fails. This is currently only known to be required when connecting to
-Tumbleweed's Secure Transport FTPS server using client certificates for
-authentication. (Added in 7.15.5)
+Alternative to USER. See \fICURLOPT_FTP_ALTERNATIVE_TO_USER(3)\fP
.IP CURLOPT_FTP_SKIP_PASV_IP
-Pass a long. If set to 1, it instructs libcurl to not use the IP address the
-server suggests in its 227-response to libcurl's PASV command when libcurl
-connects the data connection. Instead libcurl will re-use the same IP address
-it already uses for the control connection. But it will use the port number
-from the 227-response. (Added in 7.14.2)
-
-This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
-.IP CURLOPT_USE_SSL
-Pass a long using one of the values from below, to make libcurl use your
-desired level of SSL for the FTP transfer. (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_*)
-.RS
-.IP CURLUSESSL_NONE
-Don't attempt to use SSL.
-.IP CURLUSESSL_TRY
-Try using SSL, proceed as normal otherwise.
-.IP CURLUSESSL_CONTROL
-Require SSL for the control connection or fail with \fICURLE_USE_SSL_FAILED\fP.
-.IP CURLUSESSL_ALL
-Require SSL for all communication or fail with \fICURLE_USE_SSL_FAILED\fP.
-.RE
+Ignore the IP address in the PASV response. See \fICURLOPT_FTP_SKIP_PASV_IP(3)\fP
.IP CURLOPT_FTPSSLAUTH
-Pass a long using one of the values from below, to alter how libcurl issues
-\&"AUTH TLS" or "AUTH SSL" when FTP over SSL is activated (see
-\fICURLOPT_USE_SSL\fP). (Added in 7.12.2)
-.RS
-.IP CURLFTPAUTH_DEFAULT
-Allow libcurl to decide.
-.IP CURLFTPAUTH_SSL
-Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
-.IP CURLFTPAUTH_TLS
-Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
-.RE
+Control how to do TLS. See \fICURLOPT_FTPSSLAUTH(3)\fP
.IP CURLOPT_FTP_SSL_CCC
-If enabled, this option makes libcurl use CCC (Clear Command Channel). It
-shuts down the SSL/TLS layer after authenticating. The rest of the
-control channel communication will be unencrypted. This allows NAT routers
-to follow the FTP transaction. Pass a long using one of the values below.
-(Added in 7.16.1)
-.RS
-.IP CURLFTPSSL_CCC_NONE
-Don't attempt to use CCC.
-.IP CURLFTPSSL_CCC_PASSIVE
-Do not initiate the shutdown, but wait for the server to do it. Do not send
-a reply.
-.IP CURLFTPSSL_CCC_ACTIVE
-Initiate the shutdown and wait for a reply.
-.RE
+Back to non-TLS again after authentication. See \fICURLOPT_FTP_SSL_CCC(3)\fP
.IP CURLOPT_FTP_ACCOUNT
-Pass a pointer to a zero-terminated string (or NULL to disable). When an FTP
-server asks for "account data" after user name and password has been provided,
-this data is sent off using the ACCT command. (Added in 7.13.0)
+Send ACCT command. See \fICURLOPT_FTP_ACCOUNT(3)\fP
.IP CURLOPT_FTP_FILEMETHOD
-Pass a long that should have one of the following values. This option controls
-what method libcurl should use to reach a file on a FTP(S) server. The
-argument should be one of the following alternatives:
-.RS
-.IP CURLFTPMETHOD_MULTICWD
-libcurl does a single CWD operation for each path part in the given URL. For
-deep hierarchies this means many commands. This is how RFC1738 says it
-should be done. This is the default but the slowest behavior.
-.IP CURLFTPMETHOD_NOCWD
-libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a
-full path to the server for all these commands. This is the fastest behavior.
-.IP CURLFTPMETHOD_SINGLECWD
-libcurl does one CWD with the full target directory and then operates on the
-file \&"normally" (like in the multicwd case). This is somewhat more standards
-compliant than 'nocwd' but without the full penalty of 'multicwd'.
-.RE
-(Added in 7.15.1)
+Specify how to reach files. See \fICURLOPT_FTP_FILEMETHOD(3)\fP
.SH RTSP OPTIONS
.IP CURLOPT_RTSP_REQUEST
-Tell libcurl what kind of RTSP request to make. Pass one of the following RTSP
-enum values. Unless noted otherwise, commands require the Session ID to be
-initialized. (Added in 7.20.0)
-.RS
-.IP CURL_RTSPREQ_OPTIONS
-Used to retrieve the available methods of the server. The application is
-responsbile for parsing and obeying the response. \fB(The session ID is not
-needed for this method.)\fP (Added in 7.20.0)
-.IP CURL_RTSPREQ_DESCRIBE
-Used to get the low level description of a stream. The application should note
-what formats it understands in the \fI'Accept:'\fP header. Unless set
-manually, libcurl will automatically fill in \fI'Accept:
-application/sdp'\fP. Time-condition headers will be added to Describe requests
-if the \fICURLOPT_TIMECONDITION\fP option is active. \fB(The session ID is not
-needed for this method)\fP (Added in 7.20.0)
-.IP CURL_RTSPREQ_ANNOUNCE
-When sent by a client, this method changes the description of the session. For
-example, if a client is using the server to record a meeting, the client can
-use Announce to inform the server of all the meta-information about the
-session. ANNOUNCE acts like an HTTP PUT or POST just like
-\fICURL_RTSPREQ_SET_PARAMETER\fP (Added in 7.20.0)
-.IP CURL_RTSPREQ_SETUP
-Setup is used to initialize the transport layer for the session. The
-application must set the desired Transport options for a session by using the
-\fICURLOPT_RTSP_TRANSPORT\fP option prior to calling setup. If no session ID
-is currently set with \fICURLOPT_RTSP_SESSION_ID\fP, libcurl will extract and
-use the session ID in the response to this request. \fB(The session ID is not
-needed for this method).\fP (Added in 7.20.0)
-.IP CURL_RTSPREQ_PLAY
-Send a Play command to the server. Use the \fICURLOPT_RANGE\fP option to
-modify the playback time (e.g. 'npt=10-15'). (Added in 7.20.0)
-.IP CURL_RTSPREQ_PAUSE
-Send a Pause command to the server. Use the \fICURLOPT_RANGE\fP option with a
-single value to indicate when the stream should be halted. (e.g. npt='25')
-(Added in 7.20.0)
-.IP CURL_RTSPREQ_TEARDOWN
-This command terminates an RTSP session. Simply closing a connection does not
-terminate the RTSP session since it is valid to control an RTSP session over
-different connections. (Added in 7.20.0)
-.IP CURL_RTSPREQ_GET_PARAMETER
-Retrieve a parameter from the server. By default, libcurl will automatically
-include a \fIContent-Type: text/parameters\fP header on all non-empty requests
-unless a custom one is set. GET_PARAMETER acts just like an HTTP PUT or POST
-(see \fICURL_RTSPREQ_SET_PARAMETER\fP).
-Applications wishing to send a heartbeat message (e.g. in the presence of a
-server-specified timeout) should send use an empty GET_PARAMETER request.
-(Added in 7.20.0)
-.IP CURL_RTSPREQ_SET_PARAMETER
-Set a parameter on the server. By default, libcurl will automatically include
-a \fIContent-Type: text/parameters\fP header unless a custom one is set. The
-interaction with SET_PARAMTER is much like an HTTP PUT or POST. An application
-may either use \fICURLOPT_UPLOAD\fP with \fICURLOPT_READDATA\fP like an HTTP
-PUT, or it may use \fICURLOPT_POSTFIELDS\fP like an HTTP POST. No chunked
-transfers are allowed, so the application must set the
-\fICURLOPT_INFILESIZE\fP in the former and \fICURLOPT_POSTFIELDSIZE\fP in the
-latter. Also, there is no use of multi-part POSTs within RTSP. (Added in
-7.20.0)
-.IP CURL_RTSPREQ_RECORD
-Used to tell the server to record a session. Use the \fICURLOPT_RANGE\fP
-option to modify the record time. (Added in 7.20.0)
-.IP CURL_RTSPREQ_RECEIVE
-This is a special request because it does not send any data to the server. The
-application may call this function in order to receive interleaved RTP
-data. It will return after processing one read buffer of data in order to give
-the application a chance to run. (Added in 7.20.0)
-.RE
+RTSP request. See \fICURLOPT_RTSP_REQUEST(3)\fP
.IP CURLOPT_RTSP_SESSION_ID
-Pass a char * as a parameter to set the value of the current RTSP Session ID
-for the handle. Useful for resuming an in-progress session. Once this value is
-set to any non-NULL value, libcurl will return \fICURLE_RTSP_SESSION_ERROR\fP
-if ID received from the server does not match. If unset (or set to NULL),
-libcurl will automatically set the ID the first time the server sets it in a
-response. (Added in 7.20.0)
+RTSP session-id. See \fICURLOPT_RTSP_SESSION_ID(3)\fP
.IP CURLOPT_RTSP_STREAM_URI
-Set the stream URI to operate on by passing a char * . For example, a single
-session may be controlling \fIrtsp://foo/twister/audio\fP and
-\fIrtsp://foo/twister/video\fP and the application can switch to the
-appropriate stream using this option. If unset, libcurl will default to
-operating on generic server options by passing '*' in the place of the RTSP
-Stream URI. This option is distinct from \fICURLOPT_URL\fP. When working with
-RTSP, the \fICURLOPT_STREAM_URI\fP indicates what URL to send to the server in
-the request header while the \fICURLOPT_URL\fP indicates where to make the
-connection to. (e.g. the \fICURLOPT_URL\fP for the above examples might be
-set to \fIrtsp://foo/twister\fP (Added in 7.20.0)
+RTSP stream URI. See \fICURLOPT_RTSP_STREAM_URI(3)\fP
.IP CURLOPT_RTSP_TRANSPORT
-Pass a char * to tell libcurl what to pass for the Transport: header for this
-RTSP session. This is mainly a convenience method to avoid needing to set a
-custom Transport: header for every SETUP request. The application must set a
-Transport: header before issuing a SETUP request. (Added in 7.20.0)
-.IP CURLOPT_RTSP_HEADER
-This option is simply an alias for \fICURLOPT_HTTP_HEADER\fP. Use this to
-replace the standard headers that RTSP and HTTP share. It is also valid to use
-the shortcuts such as \fICURLOPT_USERAGENT\fP. (Added in 7.20.0)
+RTSP Transport: header. See \fICURLOPT_RTSP_TRANSPORT(3)\fP
.IP CURLOPT_RTSP_CLIENT_CSEQ
-Manually set the the CSEQ number to issue for the next RTSP request. Useful if
-the application is resuming a previously broken connection. The CSEQ will
-increment from this new number henceforth. (Added in 7.20.0)
+Client CSEQ number. See \fICURLOPT_RTSP_CLIENT_CSEQ(3)\fP
.IP CURLOPT_RTSP_SERVER_CSEQ
-Manually set the CSEQ number to expect for the next RTSP Server->Client
-request. At the moment, this feature (listening for Server requests) is
-unimplemented. (Added in 7.20.0)
+CSEQ number for RTSP Server->Client request. See \fICURLOPT_RTSP_SERVER_CSEQ(3)\fP
.SH PROTOCOL OPTIONS
.IP CURLOPT_TRANSFERTEXT
-A parameter set to 1 tells the library to use ASCII mode for FTP transfers,
-instead of the default binary transfer. For win32 systems it does not set the
-stdout to binary mode. This option can be usable when transferring text data
-between systems with different views on certain characters, such as newlines
-or similar.
-
-libcurl does not do a complete ASCII conversion when doing ASCII transfers
-over FTP. This is a known limitation/flaw that nobody has rectified. libcurl
-simply sets the mode to ASCII and performs a standard transfer.
+Use text transfer. See \fICURLOPT_TRANSFERTEXT(3)\fP
.IP CURLOPT_PROXY_TRANSFER_MODE
-Pass a long. If the value is set to 1 (one), it tells libcurl to set the
-transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by
-appending ;type=a or ;type=i to the URL. Without this setting, or it being set
-to 0 (zero, the default), \fICURLOPT_TRANSFERTEXT\fP has no effect when doing
-FTP via a proxy. Beware that not all proxies support this feature. (Added in
-7.18.0)
+Add transfer mode to URL over proxy. See \fICURLOPT_PROXY_TRANSFER_MODE(3)\fP
.IP CURLOPT_CRLF
-Convert Unix newlines to CRLF newlines on transfers.
+Convert newlines. See \fICURLOPT_CRLF(3)\fP
.IP CURLOPT_RANGE
-Pass a char * as parameter, which should contain the specified range you
-want. It should be in the format "X-Y", where X or Y may be left out. HTTP
-transfers also support several intervals, separated with commas as in
-\fI"X-Y,N-M"\fP. Using this kind of multiple intervals will cause the HTTP
-server to send the response document in pieces (using standard MIME separation
-techniques). For RTSP, the formatting of a range should follow RFC 2326
-Section 12.29. For RTSP, byte ranges are \fBnot\fP permitted. Instead, ranges
-should be given in npt, utc, or smpte formats.
-
-Pass a NULL to this option to disable the use of ranges.
-
-Ranges work on HTTP, FTP, FILE (since 7.18.0), and RTSP (since 7.20.0)
-transfers only.
+Range requests. See \fICURLOPT_RANGE(3)\fP
.IP CURLOPT_RESUME_FROM
-Pass a long as parameter. It contains the offset in number of bytes that you
-want the transfer to start from. Set this option to 0 to make the transfer
-start from the beginning (effectively disabling resume). For FTP, set this
-option to -1 to make the transfer start from the end of the target file
-(useful to continue an interrupted upload).
-
-When doing uploads with FTP, the resume position is where in the local/source
-file libcurl should try to resume the upload from and it will then append the
-source file to the remote target file.
+Resume a transfer. See \fICURLOPT_RESUME_FROM(3)\fP
.IP CURLOPT_RESUME_FROM_LARGE
-Pass a curl_off_t as parameter. It contains the offset in number of bytes that
-you want the transfer to start from. (Added in 7.11.0)
+Resume a transfer. See \fICURLOPT_RESUME_FROM_LARGE(3)\fP
.IP CURLOPT_CUSTOMREQUEST
-Pass a pointer to a zero terminated string as parameter. It will be used
-instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST
-when doing a FTP directory listing. This is useful for doing DELETE or other
-more or less obscure HTTP requests. Don't do this at will, make sure your
-server supports the command first.
-
-When you change the request method by setting \fBCURLOPT_CUSTOMREQUEST\fP to
-something, you don't actually change how libcurl behaves or acts in regards to
-the particular request method, it will only change the actual string sent in
-the request.
-
-For example: if you tell libcurl to do a HEAD request, but then change the
-request to a "GET" with \fBCURLOPT_CUSTOMREQUEST\fP you'll still see libcurl
-act as if it sent a HEAD even when it does send a GET.
-
-To switch to a proper HEAD, use \fICURLOPT_NOBODY\fP, to switch to a proper
-POST, use \fICURLOPT_POST\fP or \fICURLOPT_POSTFIELDS\fP and so on.
-
-Restore to the internal default by setting this to NULL.
-
-Many people have wrongly used this option to replace the entire request with
-their own, including multiple headers and POST contents. While that might work
-in many cases, it will cause libcurl to send invalid requests and it could
-possibly confuse the remote server badly. Use \fICURLOPT_POST\fP and
-\fICURLOPT_POSTFIELDS\fP to set POST data. Use \fICURLOPT_HTTPHEADER\fP to
-replace or extend the set of headers sent by libcurl. Use
-\fICURLOPT_HTTP_VERSION\fP to change HTTP version.
+Custom request/method. See \fICURLOPT_CUSTOMREQUEST(3)\fP
.IP CURLOPT_FILETIME
-Pass a long. If it is 1, libcurl will attempt to get the modification date of
-the remote document in this operation. This requires that the remote server
-sends the time or replies to a time querying command. The
-\fIcurl_easy_getinfo(3)\fP function with the \fICURLINFO_FILETIME\fP argument
-can be used after a transfer to extract the received time (if any).
+Request file modification date and time. See \fICURLOPT_FILETIME(3)\fP
+.IP CURLOPT_DIRLISTONLY
+List only. See \fICURLOPT_DIRLISTONLY(3)\fP
.IP CURLOPT_NOBODY
-A parameter set to 1 tells the library to not include the body-part in the
-output. This is only relevant for protocols that have separate header and body
-parts. On HTTP(S) servers, this will make libcurl do a HEAD request.
-
-To change request to GET, you should use \fICURLOPT_HTTPGET\fP. Change request
-to POST with \fICURLOPT_POST\fP etc.
+Do not get the body contents. See \fICURLOPT_NOBODY(3)\fP
.IP CURLOPT_INFILESIZE
-When uploading a file to a remote site, this option should be used to tell
-libcurl what the expected size of the infile is. This value should be passed
-as a long. See also \fICURLOPT_INFILESIZE_LARGE\fP.
-
-For uploading using SCP, this option or \fICURLOPT_INFILESIZE_LARGE\fP is
-mandatory.
-
-This option does not limit how much data libcurl will actually send, as that
-is controlled entirely by what the read callback returns.
+Size of file to send. \fICURLOPT_INFILESIZE(3)\fP
.IP CURLOPT_INFILESIZE_LARGE
-When uploading a file to a remote site, this option should be used to tell
-libcurl what the expected size of the infile is. This value should be passed
-as a curl_off_t. (Added in 7.11.0)
-
-For uploading using SCP, this option or \fICURLOPT_INFILESIZE\fP is mandatory.
-
-This option does not limit how much data libcurl will actually send, as that
-is controlled entirely by what the read callback returns.
+Size of file to send. \fICURLOPT_INFILESIZE_LARGE(3)\fP
.IP CURLOPT_UPLOAD
-A parameter set to 1 tells the library to prepare for an upload. The
-\fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE\fP or
-\fICURLOPT_INFILESIZE_LARGE\fP options are also interesting for uploads. If
-the protocol is HTTP, uploading means using the PUT request unless you tell
-libcurl otherwise.
-
-Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
-You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
-
-If you use PUT to a HTTP 1.1 server, you can upload data without knowing the
-size before starting the transfer if you use chunked encoding. You enable this
-by adding a header like "Transfer-Encoding: chunked" with
-\fICURLOPT_HTTPHEADER\fP. With HTTP 1.0 or without chunked transfer, you must
-specify the size.
+Upload data. See \fICURLOPT_UPLOAD(3)\fP
.IP CURLOPT_MAXFILESIZE
-Pass a long as parameter. This allows you to specify the maximum size (in
-bytes) of a file to download. If the file requested is larger than this value,
-the transfer will not start and CURLE_FILESIZE_EXCEEDED will be returned.
-
-The file size is not always known prior to download, and for such files this
-option has no effect even if the file transfer ends up being larger than this
-given limit. This concerns both FTP and HTTP transfers.
+Maximum file size to get. See \fICURLOPT_MAXFILESIZE(3)\fP
.IP CURLOPT_MAXFILESIZE_LARGE
-Pass a curl_off_t as parameter. This allows you to specify the maximum size
-(in bytes) of a file to download. If the file requested is larger than this
-value, the transfer will not start and \fICURLE_FILESIZE_EXCEEDED\fP will be
-returned. (Added in 7.11.0)
-
-The file size is not always known prior to download, and for such files this
-option has no effect even if the file transfer ends up being larger than this
-given limit. This concerns both FTP and HTTP transfers.
+Maximum file size to get. See \fICURLOPT_MAXFILESIZE_LARGE(3)\fP
.IP CURLOPT_TIMECONDITION
-Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE\fP time
-value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
-or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP, FTP, and
-RTSP.
-
-The last modification time of a file is not always known and in such instances
-this feature will have no effect even if the given time condition would not
-have been met. \fIcurl_easy_getinfo(3)\fP with the
-\fICURLINFO_CONDITION_UNMET\fP option can be used after a transfer to learn if
-a zero-byte successful "transfer" was due to this condition not matching.
+Make a time conditional request. See \fICURLOPT_TIMECONDITION(3)\fP
.IP CURLOPT_TIMEVALUE
-Pass a long as parameter. This should be the time in seconds since 1 Jan 1970,
-and the time will be used in a condition as specified with
-\fICURLOPT_TIMECONDITION\fP.
+Time value for the time conditional request. See \fICURLOPT_TIMEVALUE(3)\fP
.SH CONNECTION OPTIONS
.IP CURLOPT_TIMEOUT
-Pass a long as parameter containing the maximum time in seconds that you allow
-the libcurl transfer operation to take. Normally, name lookups can take a
-considerable time and limiting operations to less than a few minutes risk
-aborting perfectly normal operations. This option will cause curl to use the
-SIGALRM to enable time-outing system calls.
-
-In unix-like systems, this might cause signals to be used unless
-\fICURLOPT_NOSIGNAL\fP is set.
+Timeout for the entire request. See \fICURLOPT_TIMEOUT(3)\fP
.IP CURLOPT_TIMEOUT_MS
-Like \fICURLOPT_TIMEOUT\fP but takes number of milliseconds instead. If
-libcurl is built to use the standard system name resolver, that portion
-of the transfer will still use full-second resolution for timeouts with
-a minimum timeout allowed of one second.
-(Added in 7.16.2)
+Millisecond timeout for the entire request. See \fICURLOPT_TIMEOUT_MS(3)\fP
.IP CURLOPT_LOW_SPEED_LIMIT
-Pass a long as parameter. It contains the transfer speed in bytes per second
-that the transfer should be below during \fICURLOPT_LOW_SPEED_TIME\fP seconds
-for the library to consider it too slow and abort.
+Low speed limit to abort transfer. See \fICURLOPT_LOW_SPEED_LIMIT(3)\fP
.IP CURLOPT_LOW_SPEED_TIME
-Pass a long as parameter. It contains the time in seconds that the transfer
-should be below the \fICURLOPT_LOW_SPEED_LIMIT\fP for the library to consider
-it too slow and abort.
+Time to be below the speed to trigger low speed abort. See \fICURLOPT_LOW_SPEED_TIME(3)\fP
.IP CURLOPT_MAX_SEND_SPEED_LARGE
-Pass a curl_off_t as parameter. If an upload exceeds this speed (counted in
-bytes per second) on cumulative average during the transfer, the transfer will
-pause to keep the average rate less than or equal to the parameter value.
-Defaults to unlimited speed. (Added in 7.15.5)
+Cap the upload speed to this. See \fICURLOPT_MAX_SEND_SPEED_LARGE(3)\fP
.IP CURLOPT_MAX_RECV_SPEED_LARGE
-Pass a curl_off_t as parameter. If a download exceeds this speed (counted in
-bytes per second) on cumulative average during the transfer, the transfer will
-pause to keep the average rate less than or equal to the parameter
-value. Defaults to unlimited speed. (Added in 7.15.5)
+Cap the download speed to this. See \fICURLOPT_MAX_RECV_SPEED_LARGE(3)\fP
.IP CURLOPT_MAXCONNECTS
-Pass a long. The set number will be the persistent connection cache size. The
-set amount will be the maximum amount of simultaneously open connections that
-libcurl may cache in this easy 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.
-
-If you already have performed transfers with this curl handle, setting a
-smaller MAXCONNECTS than before may cause open connections to get closed
-unnecessarily.
-
-If you add this easy handle to a multi handle, this setting is not
-acknowledged, and you must instead use \fIcurl_multi_setopt(3)\fP and the
-\fICURLMOPT_MAXCONNECTS\fP option.
-.IP CURLOPT_CLOSEPOLICY
-(Obsolete) This option does nothing.
+Maximum number of connections in the connection pool. See \fICURLOPT_MAXCONNECTS(3)\fP
.IP CURLOPT_FRESH_CONNECT
-Pass a long. Set to 1 to make the next transfer use a new (fresh) connection
-by force. If the connection cache is full before this connection, one of the
-existing connections will be closed as according to the selected or default
-policy. This option should be used with caution and only if you understand
-what it does. Set this to 0 to have libcurl attempt re-using an existing
-connection (default behavior).
+Use a new connection. \fICURLOPT_FRESH_CONNECT(3)\fP
.IP CURLOPT_FORBID_REUSE
-Pass a long. Set to 1 to make the next transfer explicitly close the
-connection when done. Normally, libcurl keeps all connections alive when done
-with one transfer in case a succeeding one follows that can re-use them.
-This option should be used with caution and only if you understand what it
-does. Set to 0 to have libcurl keep the connection open for possible later
-re-use (default behavior).
+Prevent subsequent connections from re-using this. See \fICURLOPT_FORBID_REUSE(3)\fP
.IP CURLOPT_CONNECTTIMEOUT
-Pass a long. It should contain the maximum time in seconds that you allow the
-connection to the server to take. This only limits the connection phase, once
-it has connected, this option is of no more use. Set to zero to disable
-connection timeout (it will then only timeout on the system's internal
-timeouts). See also the \fICURLOPT_TIMEOUT\fP option.
-
-In unix-like systems, this might cause signals to be used unless
-\fICURLOPT_NOSIGNAL\fP is set.
+Timeout for the connection phase. See \fICURLOPT_CONNECTTIMEOUT(3)\fP
.IP CURLOPT_CONNECTTIMEOUT_MS
-Like \fICURLOPT_CONNECTTIMEOUT\fP but takes the number of milliseconds
-instead. If libcurl is built to use the standard system name resolver,
-that portion of the connect will still use full-second resolution for
-timeouts with a minimum timeout allowed of one second.
-(Added in 7.16.2)
+Millisecond timeout for the connection phase. See \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
.IP CURLOPT_IPRESOLVE
-Allows an application to select what kind of IP addresses to use when
-resolving host names. This is only interesting when using host names that
-resolve addresses using more than one version of IP. The allowed values are:
-.RS
-.IP CURL_IPRESOLVE_WHATEVER
-Default, resolves addresses to all IP versions that your system allows.
-.IP CURL_IPRESOLVE_V4
-Resolve to IPv4 addresses.
-.IP CURL_IPRESOLVE_V6
-Resolve to IPv6 addresses.
-.RE
+IP version to resolve to. See \fICURLOPT_IPRESOLVE(3)\fP
.IP CURLOPT_CONNECT_ONLY
-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.
-This option is useful only on HTTP URLs.
-
-This option is useful with the \fICURLINFO_LASTSOCKET\fP option to
-\fIcurl_easy_getinfo(3)\fP. The library can set up the connection and then the
-application can obtain the most recently used socket for special data
-transfers. (Added in 7.15.2)
+Only connect, nothing else. See \fICURLOPT_CONNECT_ONLY(3)\fP
+.IP CURLOPT_USE_SSL
+Use TLS/SSL. See \fICURLOPT_USE_SSL(3)\fP
+.IP CURLOPT_RESOLVE
+Provide fixed/fake name resolves. See \fICURLOPT_RESOLVE(3)\fP
+.IP CURLOPT_DNS_INTERFACE
+Bind name resolves to this interface. See \fICURLOPT_DNS_INTERFACE(3)\fP
+.IP CURLOPT_DNS_LOCAL_IP4
+Bind name resolves to this IP4 address. See \fICURLOPT_DNS_LOCAL_IP4(3)\fP
+.IP CURLOPT_DNS_LOCAL_IP6
+Bind name resolves to this IP6 address. See \fICURLOPT_DNS_LOCAL_IP6(3)\fP
+.IP CURLOPT_DNS_SERVERS
+Preferred DNS servers. See \fICURLOPT_DNS_SERVERS(3)\fP
+.IP CURLOPT_ACCEPTTIMEOUT_MS
+Timeout for waiting for the server's connect back to be accepted. See \fICURLOPT_ACCEPTTIMEOUT_MS(3)\fP
.SH SSL and SECURITY OPTIONS
.IP CURLOPT_SSLCERT
-Pass a pointer to a zero terminated string as parameter. The string should be
-the file name of your certificate. The default format is "PEM" and can be
-changed with \fICURLOPT_SSLCERTTYPE\fP.
-
-With NSS this is the nickname of the certificate you wish to authenticate
-with.
+Client cert. See \fICURLOPT_SSLCERT(3)\fP
.IP CURLOPT_SSLCERTTYPE
-Pass a pointer to a zero terminated string as parameter. The string should be
-the format of your certificate. Supported formats are "PEM" and "DER". (Added
-in 7.9.3)
+Client cert type. See \fICURLOPT_SSLCERTTYPE(3)\fP
.IP CURLOPT_SSLKEY
-Pass a pointer to a zero terminated string as parameter. The string should be
-the file name of your private key. The default format is "PEM" and can be
-changed with \fICURLOPT_SSLKEYTYPE\fP.
+Client key. See \fICURLOPT_SSLKEY(3)\fP
.IP CURLOPT_SSLKEYTYPE
-Pass a pointer to a zero terminated string as parameter. The string should be
-the format of your private key. Supported formats are "PEM", "DER" and "ENG".
-
-The format "ENG" enables you to load the private key from a crypto engine. In
-this case \fICURLOPT_SSLKEY\fP is used as an identifier passed to the
-engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE\fP.
-\&"DER" format key file currently does not work because of a bug in OpenSSL.
+Client key type. See \fICURLOPT_SSLKEYTYPE(3)\fP
.IP CURLOPT_KEYPASSWD
-Pass a pointer to a zero terminated string as parameter. It will be used as
-the password required to use the \fICURLOPT_SSLKEY\fP or
-\fICURLOPT_SSH_PRIVATE_KEYFILE\fP private key.
-You never needed a pass phrase to load a certificate but you need one to
-load your private key.
-
-(This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and
-CURLOPT_SSLCERTPASSWD up to 7.9.2)
+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
.IP CURLOPT_SSLENGINE
-Pass a pointer to a zero terminated string as parameter. It will be used as
-the identifier for the crypto engine you want to use for your private
-key.
-
-If the crypto device cannot be loaded, \fICURLE_SSL_ENGINE_NOTFOUND\fP is
-returned.
+Use identifier with SSL engine. See \fICURLOPT_SSLENGINE(3)\fP
.IP CURLOPT_SSLENGINE_DEFAULT
-Sets the actual crypto engine as the default for (asymmetric) crypto
-operations.
-
-If the crypto device cannot be set, \fICURLE_SSL_ENGINE_SETFAILED\fP is
-returned.
-
-Even though this option doesn't need any parameter, in some configurations
-\fIcurl_easy_setopt\fP might be defined as a macro taking exactly three
-arguments. Therefore, it's recommended to pass 1 as parameter to this option.
+Default SSL engine. See \fICURLOPT_SSLENGINE_DEFAULT(3)\fP
+.IP CURLOPT_SSL_FALSESTART
+Enable TLS False Start. See \fICURLOPT_SSL_FALSESTART(3)\fP
.IP CURLOPT_SSLVERSION
-Pass a long as parameter to control what version of SSL/TLS to attempt to use.
-The available options are:
-.RS
-.IP CURL_SSLVERSION_DEFAULT
-The default action. This will attempt to figure out the remote SSL protocol
-version, i.e. either SSLv3 or TLSv1 (but not SSLv2, which became disabled
-by default with 7.18.1).
-.IP CURL_SSLVERSION_TLSv1
-Force TLSv1
-.IP CURL_SSLVERSION_SSLv2
-Force SSLv2
-.IP CURL_SSLVERSION_SSLv3
-Force SSLv3
-.RE
+SSL version to use. See \fICURLOPT_SSLVERSION(3)\fP
+.IP CURLOPT_SSL_VERIFYHOST
+Verify the host name in the SSL certificate. See \fICURLOPT_SSL_VERIFYHOST(3)\fP
.IP CURLOPT_SSL_VERIFYPEER
-Pass a long as parameter.
-
-This option determines whether curl verifies the authenticity of the peer's
-certificate. A value of 1 means curl verifies; zero means it doesn't. The
-default is nonzero, but before 7.10, it was zero.
-
-When negotiating an SSL connection, the server sends a certificate indicating
-its identity. Curl verifies whether the certificate is authentic, i.e. that
-you can trust that the server is who the certificate says it is. This trust
-is based on a chain of digital signatures, rooted in certification authority
-(CA) certificates you supply. As of 7.10, curl installs a default bundle of
-CA certificates and you can specify alternate certificates with the
-\fICURLOPT_CAINFO\fP option or the \fICURLOPT_CAPATH\fP option.
-
-When \fICURLOPT_SSL_VERIFYPEER\fP is nonzero, and the verification fails to
-prove that the certificate is authentic, the connection fails. When the
-option is zero, the connection succeeds regardless.
-
-Authenticating the certificate is not by itself very useful. You typically
-want to ensure that the server, as authentically identified by its
-certificate, is the server you mean to be talking to. Use
-\fICURLOPT_SSL_VERIFYHOST\fP to control that.
+Verify the SSL certificate. See \fICURLOPT_SSL_VERIFYPEER(3)\fP
+.IP CURLOPT_SSL_VERIFYSTATUS
+Verify the SSL certificate's status. See \fICURLOPT_SSL_VERIFYSTATUS(3)\fP
.IP CURLOPT_CAINFO
-Pass a char * to a zero terminated string naming a file holding one or more
-certificates to verify the peer with. This makes sense only when used in
-combination with the \fICURLOPT_SSL_VERIFYPEER\fP option. If
-\fICURLOPT_SSL_VERIFYPEER\fP is zero, \fICURLOPT_CAINFO\fP need not
-even indicate an accessible file.
-
-This option is by default set to the system path where libcurl's cacert bundle
-is assumed to be stored, as established at build time.
-
-When built against NSS, this is the directory that the NSS certificate
-database resides in.
+CA cert bundle. See \fICURLOPT_CAINFO(3)\fP
.IP CURLOPT_ISSUERCERT
-Pass a char * to a zero terminated string naming a file holding a CA
-certificate in PEM format. If the option is set, an additional check against
-the peer certificate is performed to verify the issuer is indeed the one
-associated with the certificate provided by the option. This additional check
-is useful in multi-level PKI where one needs to enforce that the peer
-certificate is from a specific branch of the tree.
-
-This option makes sense only when used in combination with the
-\fICURLOPT_SSL_VERIFYPEER\fP option. Otherwise, the result of the check is not
-considered as failure.
-
-A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option,
-which is returned if the setup of the SSL/TLS session has failed due to a
-mismatch with the issuer of peer certificate (\fICURLOPT_SSL_VERIFYPEER\fP has
-to be set too for the check to fail). (Added in 7.19.0)
+Issuer certificate. See \fICURLOPT_ISSUERCERT(3)\fP
.IP CURLOPT_CAPATH
-Pass a char * to a zero terminated string naming a directory holding multiple
-CA certificates to verify the peer with. 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\fP option. If
-\fICURLOPT_SSL_VERIFYPEER\fP is zero, \fICURLOPT_CAPATH\fP need not even
-indicate an accessible path. The \fICURLOPT_CAPATH\fP function apparently
-does not work in Windows due to some limitation in openssl. This option is
-OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
+Path to CA cert bundle. See \fICURLOPT_CAPATH(3)\fP
.IP CURLOPT_CRLFILE
-Pass a char * to a zero terminated string naming a file with the concatenation
-of CRL (in PEM format) to use in the certificate validation that occurs during
-the SSL exchange.
-
-When curl is built to use NSS or GnuTLS, there is no way to influence the use
-of CRL passed to help in the verification process. When libcurl is built with
-OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both
-set, requiring CRL check against all the elements of the certificate chain if
-a CRL file is passed.
-
-This option makes sense only when used in combination with the
-\fICURLOPT_SSL_VERIFYPEER\fP option.
-
-A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It
-is returned when the SSL exchange fails because the CRL file cannot be loaded.
-A failure in certificate verification due to a revocation information found in
-the CRL does not trigger this specific error. (Added in 7.19.0)
+Certificate Revocation List. See \fICURLOPT_CRLFILE(3)\fP
.IP CURLOPT_CERTINFO
-Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
-this enabled, libcurl (if built with OpenSSL) will extract lots of information
-and data about the certificates in the certificate chain used in the SSL
-connection. This data is then possible to extract after a transfer using
-\fIcurl_easy_getinfo(3)\fP and its option \fICURLINFO_CERTINFO\fP. (Added in
-7.19.1)
+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
-Pass a char * to a zero terminated file name. The file will be used to read
-from to seed the random engine for SSL. The more random the specified file is,
-the more secure the SSL connection will become.
+Provide source for entropy random data. See \fICURLOPT_RANDOM_FILE(3)\fP
.IP CURLOPT_EGDSOCKET
-Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
-socket. It will be used to seed the random engine for SSL.
-.IP CURLOPT_SSL_VERIFYHOST
-Pass a long as parameter.
-
-This option determines whether libcurl verifies that the server cert is for
-the server it is known as.
-
-When negotiating a SSL connection, the server sends a certificate indicating
-its identity.
-
-When \fICURLOPT_SSL_VERIFYHOST\fP is 2, that certificate must indicate that
-the server is the server to which you meant to connect, or the connection
-fails.
-
-Curl considers the server the intended one when the Common Name field or a
-Subject Alternate Name field in the certificate matches the host name in the
-URL to which you told Curl to connect.
-
-When the value is 1, the certificate must contain a Common Name field, but it
-doesn't matter what name it says. (This is not ordinarily a useful setting).
-
-When the value is 0, the connection succeeds regardless of the names in the
-certificate.
-
-The default, since 7.10, is 2.
-
-This option controls checking the server's claimed identity. The server could
-be lying. To control lying, see \fICURLOPT_SSL_VERIFYPEER\fP.
+Identify EGD socket for entropy. See \fICURLOPT_EGDSOCKET(3)\fP
.IP CURLOPT_SSL_CIPHER_LIST
-Pass a char *, pointing to a zero terminated string holding the list of
-ciphers to use for the SSL connection. The list must be syntactically correct,
-it consists of one or more cipher strings separated by colons. Commas or
-spaces are also acceptable separators but colons are normally used, \&!, \&-
-and \&+ can be used as operators.
-
-For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA',
-\'SHA1+DES\', 'TLSv1' and 'DEFAULT'. The default list is normally set when you
-compile OpenSSL.
-
-You'll find more details about cipher lists on this URL:
-\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
-
-For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5',
-\'rsa_aes_128_sha\', etc. With NSS you don't add/remove ciphers. If one uses
-this option then all known ciphers are disabled and only those passed in
-are enabled.
-
-You'll find more details about the NSS cipher lists on this URL:
-\fIhttp://directory.fedora.redhat.com/docs/mod_nss.html#Directives\fP
-
+Ciphers to use. See \fICURLOPT_SSL_CIPHER_LIST(3)\fP
.IP CURLOPT_SSL_SESSIONID_CACHE
-Pass a long set to 0 to disable libcurl's use of SSL session-ID caching. Set
-this to 1 to enable it. By default all transfers are done using the
-cache. While nothing ever should get hurt by attempting to reuse SSL
-session-IDs, there seem to be broken SSL implementations in the wild that may
-require you to disable this in order for you to succeed. (Added in 7.16.0)
+Disable SSL session-id cache. See \fICURLOPT_SSL_SESSIONID_CACHE(3)\fP
+.IP CURLOPT_SSL_OPTIONS
+Control SSL behavior. See \fICURLOPT_SSL_OPTIONS(3)\fP
.IP CURLOPT_KRBLEVEL
-Pass a char * as parameter. Set the kerberos security level for FTP; this also
-enables kerberos awareness. This is a string, \&'clear', \&'safe',
-\&'confidential' or \&'private'. If the string is set but doesn't match one
-of these, 'private' will be used. Set the string to NULL to disable kerberos
-support for FTP.
-
-(This option was known as CURLOPT_KRB4LEVEL up to 7.16.3)
+Kerberos security level. See \fICURLOPT_KRBLEVEL(3)\fP
+.IP CURLOPT_GSSAPI_DELEGATION
+Disable GSS-API delegation. See \fICURLOPT_GSSAPI_DELEGATION(3)\fP
.SH SSH OPTIONS
.IP CURLOPT_SSH_AUTH_TYPES
-Pass a long set to a bitmask consisting of one or more of
-CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST,
-CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one.
-(Added in 7.16.1)
+SSH authentication types. See \fICURLOPT_SSH_AUTH_TYPES(3)\fP
.IP CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
-Pass a char * pointing to a string containing 32 hexadecimal digits. The
-string should be the 128 bit MD5 checksum of the remote host's public key, and
-libcurl will reject the connection to the host unless the md5sums match. This
-option is only for SCP and SFTP transfers. (Added in 7.17.1)
+MD5 of host's public key. See \fICURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)\fP
.IP CURLOPT_SSH_PUBLIC_KEYFILE
-Pass a char * pointing to a file name for your public key. If not used,
-libcurl defaults to using \fB~/.ssh/id_dsa.pub\fP.
-(Added in 7.16.1)
+File name of public key. See \fICURLOPT_SSH_PUBLIC_KEYFILE(3)\fP
.IP CURLOPT_SSH_PRIVATE_KEYFILE
-Pass a char * pointing to a file name for your private key. If not used,
-libcurl defaults to using \fB~/.ssh/id_dsa\fP. If the file is
-password-protected, set the password with \fICURLOPT_KEYPASSWD\fP. (Added in
-7.16.1)
+File name of private key. See \fICURLOPT_SSH_PRIVATE_KEYFILE(3)\fP
.IP CURLOPT_SSH_KNOWNHOSTS
-Pass a pointer to a zero terminated string holding the file name of the
-known_host file to use. The known_hosts file should use the OpenSSH file
-format as supported by libssh2. If this file is specified, libcurl will only
-accept connections with hosts that are known and present in that file, with a
-matching public key. Use \fICURLOPT_SSH_KEYFUNCTION\fP to alter the default
-behavior on host and key (mis)matching. (Added in 7.19.6)
+File name with known hosts. See \fICURLOPT_SSH_KNOWNHOSTS(3)\fP
.IP CURLOPT_SSH_KEYFUNCTION
-Pass a pointer to a curl_sshkeycallback function. It gets called when the
-known_host matching has been done, to allow the application to act and decide
-for libcurl how to proceed. It gets passed the CURL handle, the key from the
-known_hosts file, the key from the remote site, info from libcurl on the
-matching status and a custom pointer (set with \fICURLOPT_SSH_KEYDATA\fP). It
-MUST return one of the following return codes to tell libcurl how to act:
-.RS
-.IP CURLKHSTAT_FINE_ADD_TO_FILE
-The host+key is accepted and libcurl will append it to the known_hosts file
-before continuing with the connection. This will also add the host+key combo
-to the known_host pool kept in memory if it wasn't already present there. The
-adding of data to the file is done by completely replacing the file with a new
-copy, so the permissions of the file must allow this.
-.IP CURLKHSTAT_FINE
-The host+key is accepted libcurl will continue with the connection. This will
-also add the host+key combo to the known_host pool kept in memory if it wasn't
-already present there.
-.IP CURLKHSTAT_REJECT
-The host+key is rejected. libcurl will deny the connection to continue and it
-will be closed.
-.IP CURLKHSTAT_DEFER
-The host+key is rejected, but the SSH connection is asked to be kept alive.
-This feature could be used when the app wants to somehow return back and act
-on the host+key situation and then retry without needing the overhead of
-setting it up from scratch again.
-.RE
- (Added in 7.19.6)
+Callback for known hosts handling. See \fICURLOPT_SSH_KEYFUNCTION(3)\fP
.IP CURLOPT_SSH_KEYDATA
-Pass a void * as parameter. This pointer will be passed along verbatim to the
-callback set with \fICURLOPT_SSH_KEYFUNCTION\fP. (Added in 7.19.6)
+Custom pointer to pass to ssh key callback. See \fICURLOPT_SSH_KEYDATA(3)\fP
.SH OTHER OPTIONS
.IP CURLOPT_PRIVATE
-Pass a void * as parameter, pointing to data that should be associated with
-this curl handle. The pointer can subsequently be retrieved using
-\fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself
-does nothing with this data. (Added in 7.10.3)
+Private pointer to store. See \fICURLOPT_PRIVATE(3)\fP
.IP CURLOPT_SHARE
-Pass a share handle as a parameter. The share handle must have been created by
-a previous call to \fIcurl_share_init(3)\fP. Setting this option, will make
-this curl handle use the data from the shared handle instead of keeping the
-data to itself. This enables several curl handles to share data. If the curl
-handles are used simultaneously in multiple threads, you \fBMUST\fP use the
-locking methods in the share handle. See \fIcurl_share_setopt(3)\fP for
-details.
-
-If you add a share that is set to share cookies, your easy handle will use
-that cookie cache and get the cookie engine enabled. If you unshare an object
-that was using cookies (or change to another object that doesn't share
-cookies), the easy handle will get its cookie engine disabled.
-
-Data that the share object is not set to share will be dealt with the usual
-way, as if no share was used.
+Share object to use. See \fICURLOPT_SHARE(3)\fP
.IP CURLOPT_NEW_FILE_PERMS
-Pass a long as a parameter, containing the value of the permissions that will
-be assigned to newly created files on the remote server. The default value is
-\fI0644\fP, but any valid value can be used. The only protocols that can use
-this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP. (Added in 7.16.4)
+Mode for creating new remote files. See \fICURLOPT_NEW_FILE_PERMS(3)\fP
.IP CURLOPT_NEW_DIRECTORY_PERMS
-Pass a long as a parameter, containing the value of the permissions that will
-be assigned to newly created directories on the remote server. The default
-value is \fI0755\fP, but any valid value can be used. The only protocols that
-can use this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP.
-(Added in 7.16.4)
+Mode for creating new remote directories. See \fICURLOPT_NEW_DIRECTORY_PERMS(3)\fP
.SH TELNET OPTIONS
.IP CURLOPT_TELNETOPTIONS
-Provide a pointer to a curl_slist with variables to pass to the telnet
-negotiations. The variables should be in the format <option=value>. libcurl
-supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'. See the TELNET
-standard for details.
+TELNET options. See \fICURLOPT_TELNETOPTIONS(3)\fP
.SH RETURN VALUE
-CURLE_OK (zero) means that the option was set properly, non-zero means an
+\fICURLE_OK\fP (zero) means that the option was set properly, non-zero means an
error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors(3)\fP
man page for the full list with descriptions.
If you try to set an option that libcurl doesn't know about, perhaps because
the library is too old to support it or the option was removed in a recent
-version, this function will return \fICURLE_FAILED_INIT\fP.
+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_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), "
+.BR curl_multi_setopt "(3), "
diff --git a/docs/libcurl/curl_easy_setopt.html b/docs/libcurl/curl_easy_setopt.html
deleted file mode 100644
index 6b49b961..00000000
--- a/docs/libcurl/curl_easy_setopt.html
+++ /dev/null
@@ -1,797 +0,0 @@
-<html><head>
-<title>curl_easy_setopt man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_setopt - set options for a curl easy handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include &lt;curl/curl.h&gt;
-<p class="level0">CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_easy_setopt() is used to tell libcurl how to behave. By using the appropriate options to <span Class="emphasis">curl_easy_setopt</span>, you can change libcurl's behavior. All options are set with the <span Class="emphasis">option</span> followed by a <span Class="emphasis">parameter</span>. That parameter can be a <span Class="bold">long</span>, a <span Class="bold">function pointer</span>, an <span Class="bold">object pointer</span> or a <span Class="bold">curl_off_t</span>, 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.
-<p class="level0">Options set with this function call are valid for all forthcoming transfers performed using this <span Class="emphasis">handle</span>. The options are not in any way reset between transfers, so if you want subsequent transfers with different options, you must change them between the transfers. You can optionally reset all options back to internal default with <a class="emphasis" href="./curl_easy_reset.html">curl_easy_reset(3)</a>.
-<p class="level0">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 curl_easy_setopt() returns. Exceptions to this rule are described in the option details below.
-<p class="level0">Before version 7.17.0, strings were not copied. Instead the user was forced keep them available until libcurl no longer needed them.
-<p class="level0">The <span Class="emphasis">handle</span> is the return code from a <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> or <a class="emphasis" href="./curl_easy_duphandle.html">curl_easy_duphandle(3)</a> call. <a name="BEHAVIOR"></a><h2 class="nroffsh">BEHAVIOR OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTVERBOSE"></a><span class="nroffip">CURLOPT_VERBOSE</span>
-<p class="level1">Set the parameter to 1 to get the library to display a lot of verbose information about its operations. Very useful for libcurl and/or protocol debugging and understanding. The verbose information will be sent to stderr, or the stream set with <a class="emphasis" href="#CURLOPTSTDERR">CURLOPT_STDERR</a>.
-<p class="level1">You hardly ever want this set in production use, you will almost always want this when you debug/report problems. Another neat option for debugging is the <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a>.
-<p class="level0"><a name="CURLOPTHEADER"></a><span class="nroffip">CURLOPT_HEADER</span>
-<p class="level1">A parameter set to 1 tells the library to include the header in the body output. This is only relevant for protocols that actually have headers preceding the data (like HTTP).
-<p class="level0"><a name="CURLOPTNOPROGRESS"></a><span class="nroffip">CURLOPT_NOPROGRESS</span>
-<p class="level1">A parameter set to 1 tells the library to shut off the built-in progress meter completely.
-<p class="level1">Future versions of libcurl are likely to not have any built-in progress meter at all.
-<p class="level0"><a name="CURLOPTNOSIGNAL"></a><span class="nroffip">CURLOPT_NOSIGNAL</span>
-<p class="level1">Pass a long. If it is 1, libcurl will not use any functions that install signal handlers or any functions that cause signals to be sent to the process. This option is mainly here to allow multi-threaded unix applications to still set/use all timeout options etc, without risking getting signals. (Added in 7.10)
-<p class="level1">If this option is set and libcurl has been built with the standard name resolver, timeouts will not occur while the name resolve takes place. Consider building libcurl with c-ares support to enable asynchronous DNS lookups, which enables nice timeouts for name resolves without signals.
-<p class="level0"><a name="CURLOPTWILDCARDMATCH"></a><span class="nroffip">CURLOPT_WILDCARDMATCH</span>
-<p class="level1">Set this option to 1 if you want to transfer multiple files according to a file name pattern. The pattern can be specified as part of the <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> option, using an fnmatch-like pattern (Shell Pattern Matching) in the last part of URL (file name).
-<p class="level1">By default, libcurl uses its internal wildcard matching implementation. You can provide your own matching function by the <a class="emphasis" href="#CURLOPTFNMATCHFUNCTION">CURLOPT_FNMATCH_FUNCTION</a> option.
-<p class="level1">This feature is only supported by the FTP download for now.
-<p class="level1">A brief introduction of its syntax follows:
-<p class="level2">
-<p class="level1"><a name="fBfP"></a><span class="nroffip">\fB*\fP - ASTERISK</span>
-<p class="level2"><a href="ftp://example.com/some/path/">ftp://example.com/some/path/</a><span Class="bold">*.txt</span> (for all txt's from the root directory)
-<p class="level1">
-<p class="level2">
-<p class="level1"><a name="fBfP"></a><span class="nroffip">\fB?\fP - QUESTION MARK</span>
-<p class="level2">Question mark matches any (exactly one) character.
-<p class="level2"><a href="ftp://example.com/some/path/">ftp://example.com/some/path/</a><span Class="bold">photo?.jpeg</span>
-<p class="level1">
-<p class="level2">
-<p class="level1"><a name="fBfP"></a><span class="nroffip">\fB[\fP - BRACKET EXPRESSION</span>
-<p class="level2">The left bracket opens a bracket expression. The question mark and asterisk have no special meaning in a bracket expression. Each bracket expression ends by the right bracket and matches exactly one character. Some examples follow:
-<p class="level2"><span Class="bold">[a-zA-Z0-9]</span> or <span Class="bold">[f-gF-G]</span> - character interval
-<p class="level2"><span Class="bold">[abc]</span> - character enumeration
-<p class="level2"><span Class="bold">[^abc]</span> or <span Class="bold">[!abc]</span> - negation
-<p class="level2"><span Class="bold">[[:</span><span Class="emphasis">name</span><span Class="bold">:]]</span> class expression. Supported classes are <span Class="bold">alnum</span>,<span Class="bold">lower</span>, <span Class="bold">space</span>, <span Class="bold">alpha</span>, <span Class="bold">digit</span>, <span Class="bold">print</span>, <span Class="bold">upper</span>, <span Class="bold">blank</span>, <span Class="bold">graph</span>, <span Class="bold">xdigit</span>.
-<p class="level2"><span Class="bold">[][-!^]</span> - special case - matches only '-', ']', '[', '!' or '^'. These characters have no special purpose.
-<p class="level2"><span Class="bold">[\[\]\\]</span> - escape syntax. Matches '[', ']' or '&acute;.
-<p class="level2">Using the rules above, a file name pattern can be constructed:
-<p class="level2"><a href="ftp://example.com/some/path/">ftp://example.com/some/path/</a><span Class="bold">[a-z[:upper:]\\].jpeg</span>
-<p class="level1">
-<p class="level1">(This was added in 7.21.0) <a name="CALLBACK"></a><h2 class="nroffsh">CALLBACK OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTWRITEFUNCTION"></a><span class="nroffip">CURLOPT_WRITEFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span> This function gets called by libcurl as soon as there is data received that needs to be saved. The size of the data pointed to by <span Class="emphasis">ptr</span> is <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span>, it will not be zero terminated. Return the number of bytes actually taken care of. If that amount differs from the amount passed to your function, it'll signal an error to the library. This will abort the transfer and return <span Class="emphasis">CURLE_WRITE_ERROR</span>.
-<p class="level1">From 7.18.0, the function can return CURL_WRITEFUNC_PAUSE which then will cause writing to this connection to become paused. See <a class="emphasis" href="./curl_easy_pause.html">curl_easy_pause(3)</a> for further details.
-<p class="level1">This function may be called with zero bytes data if the transferred file is empty.
-<p class="level1">Set this option to NULL to get the internal default function. The internal default function will write the data to the FILE * given with <a class="emphasis" href="#CURLOPTWRITEDATA">CURLOPT_WRITEDATA</a>.
-<p class="level1">Set the <span Class="emphasis">userdata</span> argument with the <a class="emphasis" href="#CURLOPTWRITEDATA">CURLOPT_WRITEDATA</a> option.
-<p class="level1">The callback function will be passed as much data as possible in all invokes, but you cannot possibly make any assumptions. It may be one byte, it may be thousands. The maximum amount of data that can be passed to the write callback is defined in the curl.h header file: CURL_MAX_WRITE_SIZE.
-<p class="level0"><a name="CURLOPTWRITEDATA"></a><span class="nroffip">CURLOPT_WRITEDATA</span>
-<p class="level1">Data pointer to pass to the file write function. If you use the <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> option, this is the pointer you'll get as input. If you don't use a callback, you must pass a 'FILE *' as libcurl will pass this to fwrite() when writing data.
-<p class="level1">The internal <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> will write the data to the FILE * given with this option, or to stdout if this option hasn't been set.
-<p class="level1">If you're using libcurl as a win32 DLL, you <span Class="bold">MUST</span> use the <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> if you set this option or you will experience crashes.
-<p class="level1">This option is also known with the older name <span Class="emphasis">CURLOPT_FILE</span>, the name <a class="emphasis" href="#CURLOPTWRITEDATA">CURLOPT_WRITEDATA</a> was introduced in 7.9.7.
-<p class="level0"><a name="CURLOPTREADFUNCTION"></a><span class="nroffip">CURLOPT_READFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span> This function gets called by libcurl as soon as it needs to read data in order to send it to the peer. The data area pointed at by the pointer <span Class="emphasis">ptr</span> may be filled with at most <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span> number of bytes. Your function must return the actual number of bytes that you stored in that memory area. Returning 0 will signal end-of-file to the library and cause it to stop the current transfer.
-<p class="level1">If you stop the current transfer by returning 0 "pre-maturely" (i.e before the server expected it, like when you've said you will upload N bytes and you upload less than N bytes), you may experience that the server "hangs" waiting for the rest of the data that won't come.
-<p class="level1">The read callback may return <span Class="emphasis">CURL_READFUNC_ABORT</span> to stop the current operation immediately, resulting in a <span Class="emphasis">CURLE_ABORTED_BY_CALLBACK</span> error code from the transfer (Added in 7.12.1)
-<p class="level1">From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause reading from this connection to become paused. See <a class="emphasis" href="./curl_easy_pause.html">curl_easy_pause(3)</a> for further details.
-<p class="level1">If you set this callback pointer to NULL, or don't set it at all, the default internal read function will be used. It is doing an fread() on the FILE * userdata set with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a>.
-<p class="level0"><a name="CURLOPTREADDATA"></a><span class="nroffip">CURLOPT_READDATA</span>
-<p class="level1">Data pointer to pass to the file read function. If you use the <a class="emphasis" href="#CURLOPTREADFUNCTION">CURLOPT_READFUNCTION</a> option, this is the pointer you'll get as input. If you don't specify a read callback but instead rely on the default internal read function, this data must be a valid readable FILE *.
-<p class="level1">If you're using libcurl as a win32 DLL, you MUST use a <a class="emphasis" href="#CURLOPTREADFUNCTION">CURLOPT_READFUNCTION</a> if you set this option.
-<p class="level1">This option was also known by the older name <span Class="emphasis">CURLOPT_INFILE</span>, the name <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> was introduced in 7.9.7.
-<p class="level0"><a name="CURLOPTIOCTLFUNCTION"></a><span class="nroffip">CURLOPT_IOCTLFUNCTION</span>
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_ioctl_callback</span> prototype found in <span Class="emphasis">&lt;curl/curl.h&gt;</span>. This function gets called by libcurl when something special I/O-related needs to be done that the library can't do by itself. For now, rewinding the read data stream is the only action it can request. The rewinding of the read data stream may be necessary when doing a HTTP PUT or POST with a multi-pass authentication method. (Option added in 7.12.3).
-<p class="level1">Use <a class="emphasis" href="#CURLOPTSEEKFUNCTION">CURLOPT_SEEKFUNCTION</a> instead to provide seeking!
-<p class="level0"><a name="CURLOPTIOCTLDATA"></a><span class="nroffip">CURLOPT_IOCTLDATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the 3rd argument in the ioctl callback set with <a class="emphasis" href="#CURLOPTIOCTLFUNCTION">CURLOPT_IOCTLFUNCTION</a>. (Option added in 7.12.3)
-<p class="level0"><a name="CURLOPTSEEKFUNCTION"></a><span class="nroffip">CURLOPT_SEEKFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">int function(void *instream, curl_off_t offset, int origin);</span> This function gets called by libcurl to seek to a certain position in the input stream and can be used to fast forward a file in a resumed upload (instead of reading all uploaded bytes with the normal read function/callback). It is also called to rewind a stream when doing a HTTP PUT or POST with a multi-pass authentication method. The function shall work like "fseek" or "lseek" and accepted SEEK_SET, SEEK_CUR and SEEK_END as argument for origin, although (in 7.18.0) libcurl only passes SEEK_SET. The callback must return 0 (CURL_SEEKFUNC_OK) on success, 1 (CURL_SEEKFUNC_FAIL) to cause the upload operation to fail or 2 (CURL_SEEKFUNC_CANTSEEK) to indicate that while the seek failed, libcurl is free to work around the problem if possible. The latter can sometimes be done by instead reading from the input or similar.
-<p class="level1">If you forward the input arguments directly to "fseek" or "lseek", note that the data type for <span Class="emphasis">offset</span> is not the same as defined for curl_off_t on many systems! (Option added in 7.18.0)
-<p class="level0"><a name="CURLOPTSEEKDATA"></a><span class="nroffip">CURLOPT_SEEKDATA</span>
-<p class="level1">Data pointer to pass to the file read function. If you use the <a class="emphasis" href="#CURLOPTSEEKFUNCTION">CURLOPT_SEEKFUNCTION</a> option, this is the pointer you'll get as input. If you don't specify a seek callback, NULL is passed. (Option added in 7.18.0)
-<p class="level0"><a name="CURLOPTSOCKOPTFUNCTION"></a><span class="nroffip">CURLOPT_SOCKOPTFUNCTION</span>
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_sockopt_callback</span> prototype found in <span Class="emphasis">&lt;curl/curl.h&gt;</span>. This function gets called by libcurl after the socket() call but before the connect() call. The callback's <span Class="emphasis">purpose</span> argument identifies the exact purpose for this particular socket, and currently only one value is supported: <span Class="emphasis">CURLSOCKTYPE_IPCXN</span> for the primary connection (meaning the control connection in the FTP case). Future versions of libcurl may support more purposes. It passes the newly created socket descriptor so additional setsockopt() calls can be done at the user's discretion. Return 0 (zero) from the callback on success. Return 1 from the callback function to signal an unrecoverable error to the library and it will close the socket and return <span Class="emphasis">CURLE_COULDNT_CONNECT</span>. (Option added in 7.15.6.)
-<p class="level0"><a name="CURLOPTSOCKOPTDATA"></a><span class="nroffip">CURLOPT_SOCKOPTDATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the sockopt callback set with <a class="emphasis" href="#CURLOPTSOCKOPTFUNCTION">CURLOPT_SOCKOPTFUNCTION</a>. (Option added in 7.15.6.)
-<p class="level0"><a name="CURLOPTOPENSOCKETFUNCTION"></a><span class="nroffip">CURLOPT_OPENSOCKETFUNCTION</span>
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_opensocket_callback</span> prototype found in <span Class="emphasis">&lt;curl/curl.h&gt;</span>. This function gets called by libcurl instead of the <span Class="emphasis">socket(2)</span> call. The callback's <span Class="emphasis">purpose</span> argument identifies the exact purpose for this particular socket, and currently only one value is supported: <span Class="emphasis">CURLSOCKTYPE_IPCXN</span> for the primary connection (meaning the control connection in the FTP case). Future versions of libcurl may support more purposes. It passes the resolved peer address as a <span Class="emphasis">address</span> argument so the callback can modify the address or refuse to connect at all. The callback function should return the socket or <span Class="emphasis">CURL_SOCKET_BAD</span> in case no connection should be established or any error detected. Any additional <span Class="emphasis">setsockopt(2)</span> calls can be done on the socket at the user's discretion. <span Class="emphasis">CURL_SOCKET_BAD</span> return value from the callback function will signal an unrecoverable error to the library and it will return <span Class="emphasis">CURLE_COULDNT_CONNECT</span>. This return code can be used for IP address blacklisting. The default behavior is: <pre>
-<p class="level1">&nbsp; return socket(addr-&gt;family, addr-&gt;socktype, addr-&gt;protocol);
- </pre>
-
-<p class="level1">(Option added in 7.17.1.)
-<p class="level0"><a name="CURLOPTOPENSOCKETDATA"></a><span class="nroffip">CURLOPT_OPENSOCKETDATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the opensocket callback set with <a class="emphasis" href="#CURLOPTOPENSOCKETFUNCTION">CURLOPT_OPENSOCKETFUNCTION</a>. (Option added in 7.17.1.)
-<p class="level0"><a name="CURLOPTPROGRESSFUNCTION"></a><span class="nroffip">CURLOPT_PROGRESSFUNCTION</span>
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_progress_callback</span> prototype found in <span Class="emphasis">&lt;curl/curl.h&gt;</span>. This function gets called by libcurl instead of its internal equivalent with a frequent interval during operation (roughly once per second or sooner) no matter if data is being transfered or not. Unknown/unused argument values passed to the callback will be set to zero (like if you only download data, the upload size will remain 0). Returning a non-zero value from this callback will cause libcurl to abort the transfer and return <span Class="emphasis">CURLE_ABORTED_BY_CALLBACK</span>.
-<p class="level1">If you transfer data with the multi interface, this function will not be called during periods of idleness unless you call the appropriate libcurl function that performs transfers.
-<p class="level1"><a class="emphasis" href="#CURLOPTNOPROGRESS">CURLOPT_NOPROGRESS</a> must be set to 0 to make this function actually get called.
-<p class="level0"><a name="CURLOPTPROGRESSDATA"></a><span class="nroffip">CURLOPT_PROGRESSDATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the progress callback set with <a class="emphasis" href="#CURLOPTPROGRESSFUNCTION">CURLOPT_PROGRESSFUNCTION</a>.
-<p class="level0"><a name="CURLOPTHEADERFUNCTION"></a><span class="nroffip">CURLOPT_HEADERFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span>. This function gets called by libcurl as soon as it has received header data. The header callback will be called once for each header and only complete header lines are passed on to the callback. Parsing headers should be easy enough using this. The size of the data pointed to by <span Class="emphasis">ptr</span> is <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span>. Do not assume that the header line is zero terminated! The pointer named <span Class="emphasis">userdata</span> is the one you set with the <a class="emphasis" href="#CURLOPTWRITEHEADER">CURLOPT_WRITEHEADER</a> option. The callback function must return the number of bytes actually taken care of. If that amount differs from the amount passed to your function, it'll signal an error to the library. This will abort the transfer and return <span Class="emphasis">CURL_WRITE_ERROR</span>.
-<p class="level1">If this option is not set, or if it is set to NULL, but <span Class="emphasis">CURLOPT_HEADERDATA</span> (<a class="emphasis" href="#CURLOPTWRITEHEADER">CURLOPT_WRITEHEADER</a>) is set to anything but NULL, the function used to accept response data will be used instead. That is, it will be the function specified with <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a>, or if it is not specified or NULL - the default, stream-writing function.
-<p class="level1">It's important to note that the callback will be invoked for the headers of all responses received after initiating a request and not just the final response. This includes all responses which occur during authentication negotiation. If you need to operate on only the headers from the final response, you will need to collect headers in the callback yourself and use HTTP status lines, for example, to delimit response boundaries.
-<p class="level1">Since 7.14.1: When a server sends a chunked encoded transfer, it may contain a trailer. That trailer is identical to a HTTP header and if such a trailer is received it is passed to the application using this callback as well. There are several ways to detect it being a trailer and not an ordinary header: 1) it comes after the response-body. 2) it comes after the final header line (CR LF) 3) a Trailer: header among the response-headers mention what header to expect in the trailer.
-<p class="level0"><a name="CURLOPTWRITEHEADER"></a><span class="nroffip">CURLOPT_WRITEHEADER</span>
-<p class="level1">(This option is also known as <span Class="bold">CURLOPT_HEADERDATA</span>) Pass a pointer to be used to write the header part of the received data to. If you don't use your own callback to take care of the writing, this must be a valid FILE *. See also the <a class="emphasis" href="#CURLOPTHEADERFUNCTION">CURLOPT_HEADERFUNCTION</a> option above on how to set a custom get-all-headers callback.
-<p class="level0"><a name="CURLOPTDEBUGFUNCTION"></a><span class="nroffip">CURLOPT_DEBUGFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">int curl_debug_callback (CURL *, curl_infotype, char *, size_t, void *);</span> <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> replaces the standard debug function used when <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE </a> is in effect. This callback receives debug information, as specified with the <span Class="bold">curl_infotype</span> argument. This function must return 0. The data pointed to by the char * passed to this function WILL NOT be zero terminated, but will be exactly of the size as told by the size_t argument.
-<p class="level1">Available curl_infotype values:
-<p class="level2">
-<p class="level1"><a name="CURLINFOTEXT"></a><span class="nroffip">CURLINFO_TEXT</span>
-<p class="level2">The data is informational text.
-<p class="level1"><a name="CURLINFOHEADERIN"></a><span class="nroffip">CURLINFO_HEADER_IN</span>
-<p class="level2">The data is header (or header-like) data received from the peer.
-<p class="level1"><a name="CURLINFOHEADEROUT"></a><span class="nroffip">CURLINFO_HEADER_OUT</span>
-<p class="level2">The data is header (or header-like) data sent to the peer.
-<p class="level1"><a name="CURLINFODATAIN"></a><span class="nroffip">CURLINFO_DATA_IN</span>
-<p class="level2">The data is protocol data received from the peer.
-<p class="level1"><a name="CURLINFODATAOUT"></a><span class="nroffip">CURLINFO_DATA_OUT</span>
-<p class="level2">The data is protocol data sent to the peer.
-<p class="level1">
-<p class="level0"><a name="CURLOPTDEBUGDATA"></a><span class="nroffip">CURLOPT_DEBUGDATA</span>
-<p class="level1">Pass a pointer to whatever you want passed in to your <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> in the last void * argument. This pointer is not used by libcurl, it is only passed to the callback.
-<p class="level0"><a name="CURLOPTSSLCTXFUNCTION"></a><span class="nroffip">CURLOPT_SSL_CTX_FUNCTION</span>
-<p class="level1">This option does only function for libcurl powered by OpenSSL. If libcurl was built against another SSL library, this functionality is absent.
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">CURLcode sslctxfun(CURL *curl, void *sslctx, void *parm);</span> This function gets called by libcurl just before the initialization of an SSL connection after having processed all other SSL related options to give a last chance to an application to modify the behaviour of openssl's ssl initialization. The <span Class="emphasis">sslctx</span> parameter is actually a pointer to an openssl <span Class="emphasis">SSL_CTX</span>. If an error is returned no attempt to establish a connection is made and the perform operation will return the error code from this callback function. Set the <span Class="emphasis">parm</span> argument with the <a class="emphasis" href="#CURLOPTSSLCTXDATA">CURLOPT_SSL_CTX_DATA</a> option. This option was introduced in 7.11.0.
-<p class="level1">This function will get called on all new connections made to a server, during the SSL negotiation. The SSL_CTX pointer will be a new one every time.
-<p class="level1">To use this properly, a non-trivial amount of knowledge of the openssl libraries is necessary. For example, using this function allows you to use openssl callbacks to add additional validation code for certificates, and even to change the actual URI of an HTTPS request (example used in the lib509 test case). See also the example section for a replacement of the key, certificate and trust file settings.
-<p class="level0"><a name="CURLOPTSSLCTXDATA"></a><span class="nroffip">CURLOPT_SSL_CTX_DATA</span>
-<p class="level1">Data pointer to pass to the ssl context callback set by the option <a class="emphasis" href="#CURLOPTSSLCTXFUNCTION">CURLOPT_SSL_CTX_FUNCTION</a>, this is the pointer you'll get as third parameter, otherwise <span Class="bold">NULL</span>. (Added in 7.11.0)
-<p class="level0"><a name="CURLOPTCONVTONETWORKFUNCTION"></a><span class="nroffip">CURLOPT_CONV_TO_NETWORK_FUNCTION</span>
-<p class="level1">
-<p class="level0"><a name="CURLOPTCONVFROMNETWORKFUNCTION"></a><span class="nroffip">CURLOPT_CONV_FROM_NETWORK_FUNCTION</span>
-<p class="level1">
-<p class="level0"><a name="CURLOPTCONVFROMUTF8FUNCTION"></a><span class="nroffip">CURLOPT_CONV_FROM_UTF8_FUNCTION</span>
-<p class="level1">Function pointers that should match the following prototype: CURLcode function(char *ptr, size_t length);
-<p class="level1">These three options apply to non-ASCII platforms only. They are available only if <span Class="bold">CURL_DOES_CONVERSIONS</span> was defined when libcurl was built. When this is the case, <a class="emphasis" href="./curl_version_info.html">curl_version_info(3)</a> will return the CURL_VERSION_CONV feature bit set.
-<p class="level1">The data to be converted is in a buffer pointed to by the ptr parameter. The amount of data to convert is indicated by the length parameter. The converted data overlays the input data in the buffer pointed to by the ptr parameter. CURLE_OK should be returned upon successful conversion. A CURLcode return value defined by curl.h, such as CURLE_CONV_FAILED, should be returned if an error was encountered.
-<p class="level1"><a class="bold" href="#CURLOPTCONVTONETWORKFUNCTION">CURLOPT_CONV_TO_NETWORK_FUNCTION</a> and <a class="bold" href="#CURLOPTCONVFROMNETWORKFUNCTION">CURLOPT_CONV_FROM_NETWORK_FUNCTION</a> convert between the host encoding and the network encoding. They are used when commands or ASCII data are sent/received over the network.
-<p class="level1"><a class="bold" href="#CURLOPTCONVFROMUTF8FUNCTION">CURLOPT_CONV_FROM_UTF8_FUNCTION</a> is called to convert from UTF8 into the host encoding. It is required only for SSL processing.
-<p class="level1">If you set a callback pointer to NULL, or don't set it at all, the built-in libcurl iconv functions will be used. If HAVE_ICONV was not defined when libcurl was built, and no callback has been established, conversion will return the CURLE_CONV_REQD error code.
-<p class="level1">If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined. For example:
-<p class="level1">&nbsp;#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
-<p class="level1">The iconv code in libcurl will default the network and UTF8 codeset names as follows:
-<p class="level1">&nbsp;#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
-<p class="level1">&nbsp;#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
-<p class="level1">You will need to override these definitions if they are different on your system.
-<p class="level0"><a name="CURLOPTINTERLEAVEFUNCTION"></a><span class="nroffip">CURLOPT_INTERLEAVEFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata)</span>. This function gets called by libcurl as soon as it has received interleaved RTP data. This function gets called for each $ block and therefore contains exactly one upper-layer protocol unit (e.g. one RTP packet). Curl writes the interleaved header as well as the included data for each call. The first byte is always an ASCII dollar sign. The dollar sign is followed by a one byte channel identifier and then a 2 byte integer length in network byte order. See <span Class="emphasis">RFC 2326 Section 10.12</span> for more information on how RTP interleaving behaves. If unset or set to NULL, curl will use the default write function.
-<p class="level1">Interleaved RTP poses some challeneges for the client application. Since the stream data is sharing the RTSP control connection, it is critical to service the RTP in a timely fashion. If the RTP data is not handled quickly, subsequent response processing may become unreasonably delayed and the connection may close. The application may use <a class="emphasis" href="#CURLRTSPREQRECEIVE">CURL_RTSPREQ_RECEIVE</a> to service RTP data when no requests are desired. If the application makes a request, (e.g. <a class="emphasis" href="#CURLRTSPREQPAUSE">CURL_RTSPREQ_PAUSE</a>) then the response handler will process any pending RTP data before marking the request as finished. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTINTERLEAVEDATA"></a><span class="nroffip">CURLOPT_INTERLEAVEDATA</span>
-<p class="level1">This is the userdata pointer that will be passed to <a class="emphasis" href="#CURLOPTINTERLEAVEFUNCTION">CURLOPT_INTERLEAVEFUNCTION</a> when interleaved RTP data is received. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTCHUNKBGNFUNCTION"></a><span class="nroffip">CURLOPT_CHUNK_BGN_FUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">long function (const void *transfer_info, void *ptr, int remains)</span>. This function gets called by libcurl before a part of the stream is going to be transferred (if the transfer supports chunks).
-<p class="level1">This callback makes sense only when using the <a class="emphasis" href="#CURLOPTWILDCARDMATCH">CURLOPT_WILDCARDMATCH</a> option for now.
-<p class="level1">The target of transfer_info parameter is a "feature depended" structure. For the FTP wildcard download, the target is curl_fileinfo structure (see <span Class="emphasis">curl/curl.h</span>). The parameter ptr is a pointer given by <a class="emphasis" href="#CURLOPTCHUNKDATA">CURLOPT_CHUNK_DATA</a>. The parameter remains contains number of chunks remaining per the transfer. If the feature is not available, the parameter has zero value.
-<p class="level1">Return <span Class="emphasis">CURL_CHUNK_BGN_FUNC_OK</span> if everything is fine, <span Class="emphasis">CURL_CHUNK_BGN_FUNC_SKIP</span> if you want to skip the concrete chunk or <span Class="emphasis">CURL_CHUNK_BGN_FUNC_FAIL</span> to tell libcurl to stop if some error occurred. (This was added in 7.21.0)
-<p class="level0"><a name="CURLOPTCHUNKENDFUNCTION"></a><span class="nroffip">CURLOPT_CHUNK_END_FUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">long function(void *ptr)</span>. This function gets called by libcurl as soon as a part of the stream has been transferred (or skipped).
-<p class="level1">Return <span Class="emphasis">CURL_CHUNK_END_FUNC_OK</span> if everything is fine or <span Class="bold">CURL_CHUNK_END_FUNC_FAIL</span> to tell the lib to stop if some error occurred. (This was added in 7.21.0)
-<p class="level0"><a name="CURLOPTCHUNKDATA"></a><span class="nroffip">CURLOPT_CHUNK_DATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the ptr argument to the <span Class="emphasis">CURL_CHUNK_BGN_FUNTION</span> and <span Class="emphasis">CURL_CHUNK_END_FUNTION</span>. (This was added in 7.21.0)
-<p class="level0"><a name="CURLOPTFNMATCHFUNCTION"></a><span class="nroffip">CURLOPT_FNMATCH_FUNCTION</span>
-<p class="level1">Function pointer that should match <span class="bold">int function(void *ptr, const char *pattern, const char *string)</span> prototype (see <span Class="emphasis">curl/curl.h</span>). It is used internally for the wildcard matching feature.
-<p class="level1">Return <span Class="emphasis">CURL_FNMATCHFUNC_MATCH</span> if pattern matches the string, <span Class="emphasis">CURL_FNMATCHFUNC_NOMATCH</span> if not or <span Class="emphasis">CURL_FNMATCHFUNC_FAIL</span> if an error occurred. (This was added in 7.21.0)
-<p class="level0"><a name="CURLOPTFNMATCHDATA"></a><span class="nroffip">CURLOPT_FNMATCH_DATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the ptr argument to the <span Class="emphasis">CURL_FNMATCH_FUNCTION</span>. (This was added in 7.21.0) <a name="ERROR"></a><h2 class="nroffsh">ERROR OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTERRORBUFFER"></a><span class="nroffip">CURLOPT_ERRORBUFFER</span>
-<p class="level1">Pass a char * to a buffer that the libcurl may store human readable error messages in. This may be more helpful than just the return code from <span Class="emphasis">curl_easy_perform</span>. The buffer must be at least CURL_ERROR_SIZE big. Although this argument is a 'char *', it does not describe an input string. Therefore the (probably undefined) contents of the buffer is NOT copied by the library. You should keep the associated storage available until libcurl no longer needs it. Failing to do so will cause very odd behavior or even crashes. libcurl will need it until you call <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> or you set the same option again to use a different pointer.
-<p class="level1">Use <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE</a> and <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> to better debug/trace why errors happen.
-<p class="level1">If the library does not return an error, the buffer may not have been touched. Do not rely on the contents in those cases.
-<p class="level1">
-<p class="level0"><a name="CURLOPTSTDERR"></a><span class="nroffip">CURLOPT_STDERR</span>
-<p class="level1">Pass a FILE * as parameter. Tell libcurl to use this stream instead of stderr when showing the progress meter and displaying <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE</a> data.
-<p class="level0"><a name="CURLOPTFAILONERROR"></a><span class="nroffip">CURLOPT_FAILONERROR</span>
-<p class="level1">A parameter set to 1 tells the library to fail silently if the HTTP code returned is equal to or larger than 400. The default action would be to return the page normally, ignoring that code.
-<p class="level1">This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response codes 401 and 407).
-<p class="level1">You might get some amounts of headers transferred before this situation is detected, like when a "100-continue" is received as a response to a POST/PUT and a 401 or 407 is received immediately afterwards. <a name="NETWORK"></a><h2 class="nroffsh">NETWORK OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTURL"></a><span class="nroffip">CURLOPT_URL</span>
-<p class="level1">The actual URL to deal with. The parameter should be a char * to a zero terminated string.
-<p class="level1">If the given URL lacks the protocol part ("http://" or "ftp://" etc), it will attempt to guess which protocol to use based on the given host name. If the given protocol of the set URL is not supported, libcurl will return on error (<span Class="emphasis">CURLE_UNSUPPORTED_PROTOCOL</span>) when you call <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> or <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. Use <a class="emphasis" href="./curl_version_info.html">curl_version_info(3)</a> for detailed info on which protocols are supported.
-<p class="level1">The string given to CURLOPT_URL must be url-encoded and follow RFC 2396 (<a href="http://curl.haxx.se/rfc/rfc2396.txt">http://curl.haxx.se/rfc/rfc2396.txt</a>).
-<p class="level1">Starting with version 7.20.0, the fragment part of the URI will not be send as part of the path, which was the case previously.
-<p class="level1"><a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> is the only option that <span Class="bold">must</span> be set before <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> is called.
-<p class="level1"><a class="emphasis" href="#CURLOPTPROTOCOLS">CURLOPT_PROTOCOLS</a> can be used to limit what protocols libcurl will use for this transfer, independent of what libcurl has been compiled to support. That may be useful if you accept the URL from an external source and want to limit the accessibility.
-<p class="level0"><a name="CURLOPTPROTOCOLS"></a><span class="nroffip">CURLOPT_PROTOCOLS</span>
-<p class="level1">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. See also <a class="emphasis" href="#CURLOPTREDIRPROTOCOLS">CURLOPT_REDIR_PROTOCOLS</a>. (Added in 7.19.4)
-<p class="level0"><a name="CURLOPTREDIRPROTOCOLS"></a><span class="nroffip">CURLOPT_REDIR_PROTOCOLS</span>
-<p class="level1">Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask limits what protocols libcurl may use in a transfer that it follows to in a redirect when <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a> 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. This is a difference compared to pre-7.19.4 versions which unconditionally would follow to all protocols supported. (Added in 7.19.4)
-<p class="level0"><a name="CURLOPTPROXY"></a><span class="nroffip">CURLOPT_PROXY</span>
-<p class="level1">Set HTTP proxy to use. The parameter should be a char * to a zero terminated string holding the host name or dotted IP address. To specify port number in this string, append :[port] to the end of the host name. The proxy string may be prefixed with [protocol]:// since any such prefix will be ignored. The proxy's port number may optionally be specified with the separate option. If not specified, libcurl will default to using port 1080 for proxies. <a class="emphasis" href="#CURLOPTPROXYPORT">CURLOPT_PROXYPORT</a>.
-<p class="level1">When you tell the library to use an HTTP proxy, libcurl will transparently convert operations to HTTP even if you specify an FTP URL etc. This may have an impact on what other features of the library you can use, such as <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a> and similar FTP specifics that don't work unless you tunnel through the HTTP proxy. Such tunneling is activated with <a class="emphasis" href="#CURLOPTHTTPPROXYTUNNEL">CURLOPT_HTTPPROXYTUNNEL</a>.
-<p class="level1">libcurl respects the environment variables <span Class="bold">http_proxy</span>, <span Class="bold">ftp_proxy</span>, <span Class="bold">all_proxy</span> etc, if any of those are set. The <a class="emphasis" href="#CURLOPTPROXY">CURLOPT_PROXY</a> option does however override any possibly set environment variables.
-<p class="level1">Setting the proxy string to "" (an empty string) will explicitly disable the use of a proxy, even if there is an environment variable set for it.
-<p class="level1">Since 7.14.1, the proxy host string given in environment variables can be specified the exact same way as the proxy can be set with <a class="emphasis" href="#CURLOPTPROXY">CURLOPT_PROXY</a>, include protocol prefix (http://) and embedded user + password.
-<p class="level0"><a name="CURLOPTPROXYPORT"></a><span class="nroffip">CURLOPT_PROXYPORT</span>
-<p class="level1">Pass a long with this option to set the proxy port to connect to unless it is specified in the proxy string <a class="emphasis" href="#CURLOPTPROXY">CURLOPT_PROXY</a>.
-<p class="level0"><a name="CURLOPTPROXYTYPE"></a><span class="nroffip">CURLOPT_PROXYTYPE</span>
-<p class="level1">Pass a long with this option to set type of the proxy. Available options for this are <span Class="emphasis">CURLPROXY_HTTP</span>, <span Class="emphasis">CURLPROXY_HTTP_1_0</span> (added in 7.19.4), <span Class="emphasis">CURLPROXY_SOCKS4</span> (added in 7.15.2), <span Class="emphasis">CURLPROXY_SOCKS5</span>, <span Class="emphasis">CURLPROXY_SOCKS4A</span> (added in 7.18.0) and <span Class="emphasis">CURLPROXY_SOCKS5_HOSTNAME</span> (added in 7.18.0). The HTTP type is default. (Added in 7.10)
-<p class="level0"><a name="CURLOPTNOPROXY"></a><span class="nroffip">CURLOPT_NOPROXY</span>
-<p class="level1">Pass a pointer to a zero terminated string. The should be a comma- separated list of hosts which do not use a proxy, if one is specified. The only wildcard is a single * character, which matches all hosts, and effectively disables the proxy. Each name in this list is matched as either a domain which contains the hostname, or the hostname itself. For example, local.com would match local.com, local.com:80, and www.local.com, but not www.notlocal.com. (Added in 7.19.4)
-<p class="level0"><a name="CURLOPTHTTPPROXYTUNNEL"></a><span class="nroffip">CURLOPT_HTTPPROXYTUNNEL</span>
-<p class="level1">Set the parameter to 1 to make the library tunnel all operations through a given HTTP proxy. There is a big difference between using a proxy and to tunnel through it. If you don't know what this means, you probably don't want this tunneling option.
-<p class="level0"><a name="CURLOPTSOCKS5GSSAPISERVICE"></a><span class="nroffip">CURLOPT_SOCKS5_GSSAPI_SERVICE</span>
-<p class="level1">Pass a char * as parameter to a string holding the name of the service. The default service name for a SOCKS5 server is rcmd/server-fqdn. This option allows you to change it. (Added in 7.19.4)
-<p class="level0"><a name="CURLOPTSOCKS5GSSAPINEC"></a><span class="nroffip">CURLOPT_SOCKS5_GSSAPI_NEC</span>
-<p class="level1">Pass a long set to 1 to enable or 0 to disable. As part of the gssapi negotiation a protection mode is negotiated. The rfc1961 says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not. If enabled, this option allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
-<p class="level0"><a name="CURLOPTINTERFACE"></a><span class="nroffip">CURLOPT_INTERFACE</span>
-<p class="level1">Pass a char * as parameter. This sets the interface name to use as outgoing network interface. The name can be an interface name, an IP address, or a host name.
-<p class="level0"><a name="CURLOPTLOCALPORT"></a><span class="nroffip">CURLOPT_LOCALPORT</span>
-<p class="level1">Pass a long. This sets the local port number of the socket used for connection. This can be used in combination with <a class="emphasis" href="#CURLOPTINTERFACE">CURLOPT_INTERFACE</a> and you are recommended to use <a class="emphasis" href="#CURLOPTLOCALPORTRANGE">CURLOPT_LOCALPORTRANGE</a> as well when this is set. Valid port numbers are 1 - 65535. (Added in 7.15.2)
-<p class="level0"><a name="CURLOPTLOCALPORTRANGE"></a><span class="nroffip">CURLOPT_LOCALPORTRANGE</span>
-<p class="level1">Pass a long. This is the number of attempts libcurl should make to find a working local port number. It starts with the given <a class="emphasis" href="#CURLOPTLOCALPORT">CURLOPT_LOCALPORT</a> and adds one to the number for each retry. Setting this to 1 or below will make libcurl do only one try for the exact port number. Port numbers by nature are scarce resources that will be busy at times so setting this value to something too low might cause unnecessary connection setup failures. (Added in 7.15.2)
-<p class="level0"><a name="CURLOPTDNSCACHETIMEOUT"></a><span class="nroffip">CURLOPT_DNS_CACHE_TIMEOUT</span>
-<p class="level1">Pass a long, this sets the timeout in seconds. Name resolves will be kept in memory for this number of seconds. Set to zero to completely disable caching, or set to -1 to make the cached entries remain forever. By default, libcurl caches this info for 60 seconds.
-<p class="level1">The name resolve functions of various libc implementations don't re-read name server information unless explicitly told so (for example, by calling <span Class="emphasis">res_init(3)</span>). This may cause libcurl to keep using the older server even if DHCP has updated the server info, and this may look like a DNS cache issue to the casual libcurl-app user.
-<p class="level0"><a name="CURLOPTDNSUSEGLOBALCACHE"></a><span class="nroffip">CURLOPT_DNS_USE_GLOBAL_CACHE</span>
-<p class="level1">Pass a long. If the value is 1, it tells curl to use a global DNS cache that will survive between easy handle creations and deletions. This is not thread-safe and this will use a global variable.
-<p class="level1"><span Class="bold">WARNING:</span> this option is considered obsolete. Stop using it. Switch over to using the share interface instead! See <a class="emphasis" href="#CURLOPTSHARE">CURLOPT_SHARE</a> and <a class="emphasis" href="./curl_share_init.html">curl_share_init(3)</a>.
-<p class="level0"><a name="CURLOPTBUFFERSIZE"></a><span class="nroffip">CURLOPT_BUFFERSIZE</span>
-<p class="level1">Pass a long specifying your preferred size (in bytes) for the receive buffer in libcurl. The main point of this would be that the write callback gets called more often and with smaller chunks. This is just treated as a request, not an order. You cannot be guaranteed to actually get the given size. (Added in 7.10)
-<p class="level1">This size is by default set as big as possible (CURL_MAX_WRITE_SIZE), so it only makes sense to use this option if you want it smaller.
-<p class="level0"><a name="CURLOPTPORT"></a><span class="nroffip">CURLOPT_PORT</span>
-<p class="level1">Pass a long specifying what remote port number to connect to, instead of the one specified in the URL or the default port for the used protocol.
-<p class="level0"><a name="CURLOPTTCPNODELAY"></a><span class="nroffip">CURLOPT_TCP_NODELAY</span>
-<p class="level1">Pass a long specifying whether the TCP_NODELAY option should be set or cleared (1 = set, 0 = clear). The option is cleared by default. This will have no effect after the connection has been established.
-<p class="level1">Setting this option will disable TCP's Nagle algorithm. The purpose of this algorithm is to try to minimize the number of small packets on the network (where "small packets" means TCP segments less than the Maximum Segment Size (MSS) for the network).
-<p class="level1">Maximizing the amount of data sent per TCP segment is good because it amortizes the overhead of the send. However, in some cases (most notably telnet or rlogin) small segments may need to be sent without delay. This is less efficient than sending larger amounts of data at a time, and can contribute to congestion on the network if overdone.
-<p class="level0"><a name="CURLOPTADDRESSSCOPE"></a><span class="nroffip">CURLOPT_ADDRESS_SCOPE</span>
-<p class="level1">Pass a long specifying the scope_id value to use when connecting to IPv6 link-local or site-local addresses. (Added in 7.19.0) <a name="NAMES"></a><h2 class="nroffsh">NAMES and PASSWORDS OPTIONS (Authentication)</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTNETRC"></a><span class="nroffip">CURLOPT_NETRC</span>
-<p class="level1">This parameter controls the preference of libcurl between using user names and passwords from your <span Class="emphasis">~/.netrc</span> file, relative to user names and passwords in the URL supplied with <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a>.
-<p class="level1">libcurl uses a user name (and supplied or prompted password) supplied with <a class="emphasis" href="#CURLOPTUSERPWD">CURLOPT_USERPWD</a> in preference to any of the options controlled by this parameter.
-<p class="level1">Pass a long, set to one of the values described below.
-<p class="level2">
-<p class="level1"><a name="CURLNETRCOPTIONAL"></a><span class="nroffip">CURL_NETRC_OPTIONAL</span>
-<p class="level2">The use of your <span Class="emphasis">~/.netrc</span> file is optional, and information in the URL is to be preferred. The file will be scanned for the host and user name (to find the password only) or for the host only, to find the first user name and password after that <span Class="emphasis">machine</span>, which ever information is not specified in the URL.
-<p class="level2">Undefined values of the option will have this effect.
-<p class="level1"><a name="CURLNETRCIGNORED"></a><span class="nroffip">CURL_NETRC_IGNORED</span>
-<p class="level2">The library will ignore the file and use only the information in the URL.
-<p class="level2">This is the default.
-<p class="level1"><a name="CURLNETRCREQUIRED"></a><span class="nroffip">CURL_NETRC_REQUIRED</span>
-<p class="level2">This value tells the library that use of the file is required, to ignore the information in the URL, and to search the file for the host only.
-<p class="level1">Only machine name, user name and password are taken into account (init macros and similar things aren't supported).
-<p class="level1">libcurl does not verify that the file has the correct properties set (as the standard Unix ftp client does). It should only be readable by user.
-<p class="level0"><a name="CURLOPTNETRCFILE"></a><span class="nroffip">CURLOPT_NETRC_FILE</span>
-<p class="level1">Pass a char * as parameter, pointing to a zero terminated string containing the full path name to the file you want libcurl to use as .netrc file. If this option is omitted, and <a class="emphasis" href="#CURLOPTNETRC">CURLOPT_NETRC</a> is set, libcurl will attempt to find a .netrc file in the current user's home directory. (Added in 7.10.9)
-<p class="level0"><a name="CURLOPTUSERPWD"></a><span class="nroffip">CURLOPT_USERPWD</span>
-<p class="level1">Pass a char * as parameter, which should be [user name]:[password] to use for the connection. Use <a class="emphasis" href="#CURLOPTHTTPAUTH">CURLOPT_HTTPAUTH</a> to decide the authentication method.
-<p class="level1">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.
-<p class="level1">When using HTTP and <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a>, libcurl might perform several requests to possibly different hosts. libcurl will only send this user and password information to hosts using the initial host name (unless <a class="emphasis" href="#CURLOPTUNRESTRICTEDAUTH">CURLOPT_UNRESTRICTED_AUTH</a> is set), so if libcurl follows locations to other hosts it will not send the user and password to those. This is enforced to prevent accidental information leakage.
-<p class="level0"><a name="CURLOPTPROXYUSERPWD"></a><span class="nroffip">CURLOPT_PROXYUSERPWD</span>
-<p class="level1">Pass a char * as parameter, which should be [user name]:[password] to use for the connection to the HTTP proxy. Use <a class="emphasis" href="#CURLOPTPROXYAUTH">CURLOPT_PROXYAUTH</a> to decide the authentication method.
-<p class="level0"><a name="CURLOPTUSERNAME"></a><span class="nroffip">CURLOPT_USERNAME</span>
-<p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated user name to use for the transfer.
-<p class="level1"><a class="bold" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> sets the user name to be used in protocol authentication. You should not use this option together with the (older) CURLOPT_USERPWD option.
-<p class="level1">In order to specify the password to be used in conjunction with the user name use the <a class="emphasis" href="#CURLOPTPASSWORD">CURLOPT_PASSWORD</a> option. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTPASSWORD"></a><span class="nroffip">CURLOPT_PASSWORD</span>
-<p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated password to use for the transfer.
-<p class="level1">The CURLOPT_PASSWORD option should be used in conjunction with the <a class="emphasis" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> option. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTPROXYUSERNAME"></a><span class="nroffip">CURLOPT_PROXYUSERNAME</span>
-<p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated user name to use for the transfer while connecting to Proxy.
-<p class="level1">The CURLOPT_PROXYUSERNAME option should be used in same way as the <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> is used. In comparison to <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> the CURLOPT_PROXYUSERNAME allows the username to contain a colon, like in the following example: "sip:user@example.com". The CURLOPT_PROXYUSERNAME option is an alternative way to set the user name while connecting to Proxy. There is no meaning to use it together with the <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> option.
-<p class="level1">In order to specify the password to be used in conjunction with the user name use the <a class="emphasis" href="#CURLOPTPROXYPASSWORD">CURLOPT_PROXYPASSWORD</a> option. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTPROXYPASSWORD"></a><span class="nroffip">CURLOPT_PROXYPASSWORD</span>
-<p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated password to use for the transfer while connecting to Proxy.
-<p class="level1">The CURLOPT_PROXYPASSWORD option should be used in conjunction with the <a class="emphasis" href="#CURLOPTPROXYUSERNAME">CURLOPT_PROXYUSERNAME</a> option. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTHTTPAUTH"></a><span class="nroffip">CURLOPT_HTTPAUTH</span>
-<p class="level1">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use. The available bits are listed below. If more than one bit is set, libcurl will first query the site to see which authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set the actual name and password with the <a class="emphasis" href="#CURLOPTUSERPWD">CURLOPT_USERPWD</a> option or with the <a class="emphasis" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> and the <span Class="emphasis">CURLOPT_USERPASSWORD</span> options. (Added in 7.10.6)
-<p class="level2">
-<p class="level1"><a name="CURLAUTHBASIC"></a><span class="nroffip">CURLAUTH_BASIC</span>
-<p class="level2">HTTP Basic authentication. This is the default choice, and the only method that is in wide-spread use and supported virtually everywhere. This sends the user name and password over the network in plain text, easily captured by others.
-<p class="level1"><a name="CURLAUTHDIGEST"></a><span class="nroffip">CURLAUTH_DIGEST</span>
-<p class="level2">HTTP Digest authentication. Digest authentication is defined in RFC2617 and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method.
-<p class="level1"><a name="CURLAUTHDIGESTIE"></a><span class="nroffip">CURLAUTH_DIGEST_IE</span>
-<p class="level2">HTTP Digest authentication with an IE flavor. Digest authentication is 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. (This define was added in 7.19.3)
-<p class="level1"><a name="CURLAUTHGSSNEGOTIATE"></a><span class="nroffip">CURLAUTH_GSSNEGOTIATE</span>
-<p class="level2">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.
-<p class="level2">You need to build libcurl with a suitable GSS-API library for this to work.
-<p class="level1"><a name="CURLAUTHNTLM"></a><span class="nroffip">CURLAUTH_NTLM</span>
-<p class="level2">HTTP NTLM authentication. A proprietary protocol invented and used by Microsoft. It uses a challenge-response and hash concept similar to Digest, to prevent the password from being eavesdropped.
-<p class="level2">You need to build libcurl with OpenSSL support for this option to work, or build libcurl on Windows.
-<p class="level1"><a name="CURLAUTHANY"></a><span class="nroffip">CURLAUTH_ANY</span>
-<p class="level2">This is a convenience macro that sets all bits and thus makes libcurl pick any it finds suitable. libcurl will automatically select the one it finds most secure.
-<p class="level1"><a name="CURLAUTHANYSAFE"></a><span class="nroffip">CURLAUTH_ANYSAFE</span>
-<p class="level2">This is a convenience macro that sets all bits except Basic and thus makes libcurl pick any it finds suitable. libcurl will automatically select the one it finds most secure.
-<p class="level1">
-<p class="level0"><a name="CURLOPTPROXYAUTH"></a><span class="nroffip">CURLOPT_PROXYAUTH</span>
-<p class="level1">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use for your proxy authentication. If more than one bit is set, libcurl will first query the site to see what authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set the actual name and password with the <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> option. The bitmask can be constructed by or'ing together the bits listed above for the <a class="emphasis" href="#CURLOPTHTTPAUTH">CURLOPT_HTTPAUTH</a> option. As of this writing, only Basic, Digest and NTLM work. (Added in 7.10.7) <a name="HTTP"></a><h2 class="nroffsh">HTTP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTAUTOREFERER"></a><span class="nroffip">CURLOPT_AUTOREFERER</span>
-<p class="level1">Pass a parameter set to 1 to enable this. When enabled, libcurl will automatically set the Referer: field in requests where it follows a Location: redirect.
-<p class="level0"><a name="CURLOPTENCODING"></a><span class="nroffip">CURLOPT_ENCODING</span>
-<p class="level1">Sets the contents of the Accept-Encoding: header sent in an HTTP request, and enables decoding of a response when a Content-Encoding: header is received. Three encodings are supported: <span Class="emphasis">identity</span>, which does nothing, <span Class="emphasis">deflate</span> which requests the server to compress its response using the zlib algorithm, and <span Class="emphasis">gzip</span> which requests the gzip algorithm. If a zero-length string is set, then an Accept-Encoding: header containing all supported encodings is sent.
-<p class="level1">This is a request, not an order; the server may or may not do it. This option must be set (to any non-NULL value) or else any unsolicited encoding done by the server is ignored. See the special file lib/README.encoding for details.
-<p class="level0"><a name="CURLOPTFOLLOWLOCATION"></a><span class="nroffip">CURLOPT_FOLLOWLOCATION</span>
-<p class="level1">A parameter set to 1 tells the library to follow any Location: header that the server sends as part of an HTTP header.
-<p class="level1">This means that the library will re-send the same request on the new location and follow new Location: headers all the way until no more such headers are returned. <a class="emphasis" href="#CURLOPTMAXREDIRS">CURLOPT_MAXREDIRS</a> can be used to limit the number of redirects libcurl will follow.
-<p class="level1">Since 7.19.4, libcurl can limit what protocols it will automatically follow. The accepted protocols are set with <a class="emphasis" href="#CURLOPTREDIRPROTOCOLS">CURLOPT_REDIR_PROTOCOLS</a> and it excludes the FILE protocol by default.
-<p class="level0"><a name="CURLOPTUNRESTRICTEDAUTH"></a><span class="nroffip">CURLOPT_UNRESTRICTED_AUTH</span>
-<p class="level1">A parameter set to 1 tells the library it can continue to send authentication (user+password) when following locations, even when hostname changed. This option is meaningful only when setting <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a>.
-<p class="level0"><a name="CURLOPTMAXREDIRS"></a><span class="nroffip">CURLOPT_MAXREDIRS</span>
-<p class="level1">Pass a long. The set number will be the redirection limit. If that many redirections have been followed, the next redirect will cause an error (<span Class="emphasis">CURLE_TOO_MANY_REDIRECTS</span>). This option only makes sense if the <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a> is used at the same time. Added in 7.15.1: Setting the limit to 0 will make libcurl refuse any redirect. Set it to -1 for an infinite number of redirects (which is the default)
-<p class="level0"><a name="CURLOPTPOSTREDIR"></a><span class="nroffip">CURLOPT_POSTREDIR</span>
-<p class="level1">Pass a bitmask to control how libcurl acts on redirects after POSTs that get a 301 or 302 response back. A parameter with bit 0 set (value <span Class="bold">CURL_REDIR_POST_301</span>) tells the library to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. Setting bit 1 (value CURL_REDIR_POST_302) makes libcurl maintain the request method after a 302 redirect. CURL_REDIR_POST_ALL is a convenience define that sets both bits.
-<p class="level1">The non-RFC behaviour is ubiquitous in web browsers, so the library does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when setting <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a>. (Added in 7.17.1) (This option was known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 way before then)
-<p class="level0"><a name="CURLOPTPUT"></a><span class="nroffip">CURLOPT_PUT</span>
-<p class="level1">A parameter set to 1 tells the library to use HTTP PUT to transfer data. The data should be set with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> and <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a>.
-<p class="level1">This option is deprecated and starting with version 7.12.1 you should instead use <a class="emphasis" href="#CURLOPTUPLOAD">CURLOPT_UPLOAD</a>.
-<p class="level0"><a name="CURLOPTPOST"></a><span class="nroffip">CURLOPT_POST</span>
-<p class="level1">A parameter set to 1 tells the library to do a regular HTTP post. This will also make the library use a "Content-Type: application/x-www-form-urlencoded" header. (This is by far the most commonly used POST method).
-<p class="level1">Use one of <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> or <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a> options to specify what data to post and <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDSIZELARGE">CURLOPT_POSTFIELDSIZE_LARGE</a> to set the data size.
-<p class="level1">Optionally, you can provide data to POST using the <a class="emphasis" href="#CURLOPTREADFUNCTION">CURLOPT_READFUNCTION</a> and <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> options but then you must make sure to not set <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> to anything but NULL. When providing data with a callback, you must transmit it using chunked transfer-encoding or you must set the size of the data with the <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDSIZELARGE">CURLOPT_POSTFIELDSIZE_LARGE</a> option. To enable chunked encoding, you simply pass in the appropriate Transfer-Encoding header, see the post-callback.c example.
-<p class="level1">You can override the default POST Content-Type: header by setting your own with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>.
-<p class="level1">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> as usual.
-<p class="level1">If you use POST to a HTTP 1.1 server, you can send data without knowing the size before starting the POST if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>. With HTTP 1.0 or without chunked transfer, you must specify the size in the request.
-<p class="level1">When setting <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> to 1, it will automatically set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 0 (since 7.14.1).
-<p class="level1">If you issue a POST request and then want to make a HEAD or GET using the same re-used handle, you must explicitly set the new request type using <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> or <a class="emphasis" href="#CURLOPTHTTPGET">CURLOPT_HTTPGET</a> or similar.
-<p class="level0"><a name="CURLOPTPOSTFIELDS"></a><span class="nroffip">CURLOPT_POSTFIELDS</span>
-<p class="level1">Pass a void * as parameter, which should be the full data to post in an HTTP POST operation. You must make sure that the data is formatted the way you want the server to receive it. libcurl will not convert or encode it for you. Most web servers will assume this data to be url-encoded.
-<p class="level1">The pointed data are NOT copied by the library: as a consequence, they must be preserved by the calling application until the transfer finishes.
-<p class="level1">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 the most commonly used one by HTML forms. See also the <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a>. Using <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> implies <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a>.
-<p class="level1">If you want to do a zero-byte POST, you need to set <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> explicitly to zero, as simply setting <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> to NULL or "" just effectively disables the sending of the specified string. libcurl will instead assume that you'll send the POST data using the read callback!
-<p class="level1">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> as usual.
-<p class="level1">To make multipart/formdata posts (aka RFC2388-posts), check out the <a class="emphasis" href="#CURLOPTHTTPPOST">CURLOPT_HTTPPOST</a> option.
-<p class="level0"><a name="CURLOPTPOSTFIELDSIZE"></a><span class="nroffip">CURLOPT_POSTFIELDSIZE</span>
-<p class="level1">If you want to post data to the server without letting libcurl do a strlen() to measure the data size, this option must be used. When this option is used you can post fully binary data, which otherwise is likely to fail. If this size is set to -1, the library will use strlen() to get the size.
-<p class="level0"><a name="CURLOPTPOSTFIELDSIZELARGE"></a><span class="nroffip">CURLOPT_POSTFIELDSIZE_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. Use this to set the size of the <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> data to prevent libcurl from doing strlen() on the data to figure out the size. This is the large file version of the <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> option. (Added in 7.11.1)
-<p class="level0"><a name="CURLOPTCOPYPOSTFIELDS"></a><span class="nroffip">CURLOPT_COPYPOSTFIELDS</span>
-<p class="level1">Pass a char * as parameter, which should be the full data to post in an HTTP POST operation. It behaves as the <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> option, but the original data are copied by the library, allowing the application to overwrite the original data after setting this option.
-<p class="level1">Because data are copied, care must be taken when using this option in conjunction with <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDSIZELARGE">CURLOPT_POSTFIELDSIZE_LARGE</a>: If the size has not been set prior to <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a>, the data are assumed to be a NUL-terminated string; else the stored size informs the library about the data byte count to copy. In any case, the size must not be changed after <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a>, unless another <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> or <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a> option is issued. (Added in 7.17.1)
-<p class="level0"><a name="CURLOPTHTTPPOST"></a><span class="nroffip">CURLOPT_HTTPPOST</span>
-<p class="level1">Tells libcurl you want a multipart/formdata HTTP POST to be made and you instruct what data to pass on to the server. Pass a pointer to a linked list of curl_httppost structs as parameter. The easiest way to create such a list, is to use <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a> as documented. The data in this list must remain intact until you close this curl handle again with <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>.
-<p class="level1">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> as usual.
-<p class="level1">When setting <a class="emphasis" href="#CURLOPTHTTPPOST">CURLOPT_HTTPPOST</a>, it will automatically set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 0 (since 7.14.1).
-<p class="level0"><a name="CURLOPTREFERER"></a><span class="nroffip">CURLOPT_REFERER</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to set the Referer: header in the http request sent to the remote server. This can be used to fool servers or scripts. You can also set any custom header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>.
-<p class="level0"><a name="CURLOPTUSERAGENT"></a><span class="nroffip">CURLOPT_USERAGENT</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to set the User-Agent: header in the http request sent to the remote server. This can be used to fool servers or scripts. You can also set any custom header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>.
-<p class="level0"><a name="CURLOPTHTTPHEADER"></a><span class="nroffip">CURLOPT_HTTPHEADER</span>
-<p class="level1">Pass a pointer to a linked list of HTTP headers to pass to the server in your HTTP request. The linked list should be a fully valid list of <span class="bold">struct curl_slist</span> structs properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list. If you add a header that is otherwise generated and used by libcurl internally, your added one will be used instead. If you add a header with no content as in 'Accept:' (no data on the right side of the colon), the internally used header will get disabled. Thus, using this option you can add new headers, replace internal headers and remove internal headers. To add a header with no content, make the content be two quotes: "". The headers included in the linked list must not be CRLF-terminated, because curl adds CRLF after each header item. Failure to comply with this will result in strange bugs because the server will most likely ignore part of the headers you specified.
-<p class="level1">The first line in a request (containing the method, usually a GET or POST) is not a header and cannot be replaced using this option. Only the lines 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.
-<p class="level1">Pass a NULL to this to reset back to no custom headers.
-<p class="level1">The most commonly replaced headers have "shortcuts" in the options <a class="emphasis" href="#CURLOPTCOOKIE">CURLOPT_COOKIE</a>, <a class="emphasis" href="#CURLOPTUSERAGENT">CURLOPT_USERAGENT</a> and <a class="emphasis" href="#CURLOPTREFERER">CURLOPT_REFERER</a>.
-<p class="level0"><a name="CURLOPTHTTP200ALIASES"></a><span class="nroffip">CURLOPT_HTTP200ALIASES</span>
-<p class="level1">Pass a pointer to a linked list of aliases to be treated as valid HTTP 200 responses. Some servers respond with a custom header response line. For example, IceCast servers respond with "ICY 200 OK". By including this string in your list of aliases, the response will be treated as a valid HTTP header line such as "HTTP/1.0 200 OK". (Added in 7.10.3)
-<p class="level1">The linked list should be a fully valid list of struct curl_slist structs, and be properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list.
-<p class="level1">The alias itself is not parsed for any version strings. Before libcurl 7.16.3, Libcurl used the value set by option <a class="emphasis" href="#CURLOPTHTTPVERSION">CURLOPT_HTTP_VERSION</a>, but starting with 7.16.3 the protocol is assumed to match HTTP 1.0 when an alias matched.
-<p class="level0"><a name="CURLOPTCOOKIE"></a><span class="nroffip">CURLOPT_COOKIE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to set a cookie in the http request. The format of the string should be NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie should contain.
-<p class="level1">If you need to set multiple cookies, you need to set them all using a single option and thus you need to concatenate them all in one single string. Set multiple cookies in one string like this: "name1=content1; name2=content2;" etc.
-<p class="level1">This option sets the cookie header explictly in the outgoing request(s). If multiple requests are done due to authentication, followed redirections or similar, they will all get this cookie passed on.
-<p class="level1">Using this option multiple times will only make the latest string override the previous ones.
-<p class="level0"><a name="CURLOPTCOOKIEFILE"></a><span class="nroffip">CURLOPT_COOKIEFILE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It should contain the name of your file holding cookie data to read. The cookie data may be in Netscape / Mozilla cookie data format or just regular HTTP-style headers dumped to a file.
-<p class="level1">Given an empty or non-existing file or by passing the empty string (""), this option will enable cookies for this curl handle, making it understand and parse received cookies and then use matching cookies in future requests.
-<p class="level1">If you use this option multiple times, you just add more files to read. Subsequent files will add more cookies.
-<p class="level0"><a name="CURLOPTCOOKIEJAR"></a><span class="nroffip">CURLOPT_COOKIEJAR</span>
-<p class="level1">Pass a file name as char *, zero terminated. This will make libcurl write all internally known cookies to the specified file when <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> is called. If no cookies are known, no file will be created. Specify "-" to instead have the cookies written to stdout. Using this option also enables cookies for this session, so if you for example follow a location it will make matching cookies get sent accordingly.
-<p class="level1">If the cookie jar file can't be created or written to (when the <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> is called), libcurl will not and cannot report an error for this. Using <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE</a> or <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> will get a warning to display, but that is the only visible feedback you get about this possibly lethal situation.
-<p class="level0"><a name="CURLOPTCOOKIESESSION"></a><span class="nroffip">CURLOPT_COOKIESESSION</span>
-<p class="level1">Pass a long set to 1 to mark this as a new cookie "session". It will force libcurl to ignore all cookies it is about to load that are "session cookies" from the previous session. By default, libcurl always stores and loads all cookies, independent if they are session cookies or not. Session cookies are cookies without expiry date and they are meant to be alive and existing for this "session" only.
-<p class="level0"><a name="CURLOPTCOOKIELIST"></a><span class="nroffip">CURLOPT_COOKIELIST</span>
-<p class="level1">Pass a char * to a cookie string. Cookie can be either in Netscape / Mozilla format or just regular HTTP-style header (Set-Cookie: ...) format. If cURL cookie engine was not enabled it will enable its cookie engine. Passing a magic string "ALL" will erase all cookies known by cURL. (Added in 7.14.1) Passing the special string "SESS" will only erase all session cookies known by cURL. (Added in 7.15.4) Passing the special string "FLUSH" will write all cookies known by cURL to the file specified by <a class="emphasis" href="#CURLOPTCOOKIEJAR">CURLOPT_COOKIEJAR</a>. (Added in 7.17.1)
-<p class="level0"><a name="CURLOPTHTTPGET"></a><span class="nroffip">CURLOPT_HTTPGET</span>
-<p class="level1">Pass a long. If the long is 1, this forces the HTTP request to get back to GET. Usable if a POST, HEAD, PUT, or a custom request has been used previously using the same curl handle.
-<p class="level1">When setting <a class="emphasis" href="#CURLOPTHTTPGET">CURLOPT_HTTPGET</a> to 1, it will automatically set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 0 (since 7.14.1).
-<p class="level0"><a name="CURLOPTHTTPVERSION"></a><span class="nroffip">CURLOPT_HTTP_VERSION</span>
-<p class="level1">Pass a long, set to one of the values described below. They force libcurl to use the specific HTTP versions. This is not sensible to do unless you have a good reason.
-<p class="level2">
-<p class="level1"><a name="CURLHTTPVERSIONNONE"></a><span class="nroffip">CURL_HTTP_VERSION_NONE</span>
-<p class="level2">We don't care about what version the library uses. libcurl will use whatever it thinks fit.
-<p class="level1"><a name="CURLHTTPVERSION10"></a><span class="nroffip">CURL_HTTP_VERSION_1_0</span>
-<p class="level2">Enforce HTTP 1.0 requests.
-<p class="level1"><a name="CURLHTTPVERSION11"></a><span class="nroffip">CURL_HTTP_VERSION_1_1</span>
-<p class="level2">Enforce HTTP 1.1 requests.
-<p class="level1">
-<p class="level0"><a name="CURLOPTIGNORECONTENTLENGTH"></a><span class="nroffip">CURLOPT_IGNORE_CONTENT_LENGTH</span>
-<p class="level1">Ignore the Content-Length header. This is useful for Apache 1.x (and similar servers) which will report incorrect content length for files over 2 gigabytes. If this option is used, curl will not be able to accurately report progress, and will simply stop the download when the server ends the connection. (added in 7.14.1)
-<p class="level0"><a name="CURLOPTHTTPCONTENTDECODING"></a><span class="nroffip">CURLOPT_HTTP_CONTENT_DECODING</span>
-<p class="level1">Pass a long to tell libcurl how to act on content decoding. If set to zero, content decoding will be disabled. If set to 1 it is enabled. Libcurl has no default content decoding but requires you to use <a class="emphasis" href="#CURLOPTENCODING">CURLOPT_ENCODING</a> for that. (added in 7.16.2)
-<p class="level0"><a name="CURLOPTHTTPTRANSFERDECODING"></a><span class="nroffip">CURLOPT_HTTP_TRANSFER_DECODING</span>
-<p class="level1">Pass a long to tell libcurl how to act on transfer decoding. If set to zero, transfer decoding will be disabled, if set to 1 it is enabled (default). libcurl does chunked transfer decoding by default unless this option is set to zero. (added in 7.16.2) <a name="SMTP"></a><h2 class="nroffsh">SMTP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTMAILFROM"></a><span class="nroffip">CURLOPT_MAIL_FROM</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to specify the sender address in a mail when sending an SMTP mail with libcurl.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="CURLOPTMAILRCPT"></a><span class="nroffip">CURLOPT_MAIL_RCPT</span>
-<p class="level1">Pass a pointer to a linked list of recipients to pass to the server in your SMTP mail request. The linked list should be a fully valid list of <span class="bold">struct curl_slist</span> structs properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list.
-<p class="level1">Each recipient in SMTP lingo is specified with angle brackets (&lt;&gt;), but should you not use an angle bracket as first letter libcurl will assume you provide a single email address only and enclose that with angle brackets for you.
-<p class="level1">(Added in 7.20.0) <a name="TFTP"></a><h2 class="nroffsh">TFTP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTTFTPBLKSIZE"></a><span class="nroffip">CURLOPT_TFTP_BLKSIZE</span>
-<p class="level1">Specify block size to use for TFTP data transmission. Valid range as per RFC 2348 is 8-65464 bytes. The default of 512 bytes will be used if this option is not specified. The specified block size will only be used pending support by the remote server. If the server does not return an option acknowledgement or returns an option acknowledgement with no blksize, the default of 512 bytes will be used. (added in 7.19.4) <a name="FTP"></a><h2 class="nroffsh">FTP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTFTPPORT"></a><span class="nroffip">CURLOPT_FTPPORT</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to get the IP address to use for the FTP PORT instruction. The PORT instruction tells the remote server to connect to our specified IP address. The string may be a plain IP address, a host name, a network interface name (under Unix) or just a '-' symbol to let the library use your system's default IP address. Default FTP operations are passive, and thus won't use PORT.
-<p class="level1">The address can be followed by a ':' to specify a port, optionally followed by a '-' to specify a port range. If the port specified is 0, the operating system will pick a free port. If a range is provided and all ports in the range are not available, libcurl will report CURLE_FTP_PORT_FAILED for the handle. Invalid port/range settings are ignored. IPv6 addresses followed by a port or portrange have to be in brackets. IPv6 addresses without port/range specifier can be in brackets. (added in 7.19.5)
-<p class="level1">Examples with specified ports:
-<p class="level1"><pre>
-<p class="level1">&nbsp; eth0:0
- &nbsp; 192.168.1.2:32000-33000
- &nbsp; curl.se:32123
- &nbsp; [::1]:1234-4567
- </pre>
-
-<p class="level1">
-<p class="level1">You disable PORT again and go back to using the passive version by setting this option to NULL.
-<p class="level0"><a name="CURLOPTQUOTE"></a><span class="nroffip">CURLOPT_QUOTE</span>
-<p class="level1">Pass a pointer to a linked list of FTP or SFTP commands to pass to the server prior to your FTP request. This will be done before any other commands are issued (even before the CWD command for FTP). The linked list should be a fully valid list of 'struct curl_slist' structs properly filled in with text strings. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to append strings (commands) to the list, and clear the entire list afterwards with <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a>. Disable this operation again by setting a NULL to this option. The set of valid FTP commands depends on the server (see RFC959 for a list of mandatory commands). The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd, rename, rm, rmdir, symlink (see <span Class="manpage">curl (1))</span> (SFTP support added in 7.16.3)
-<p class="level0"><a name="CURLOPTPOSTQUOTE"></a><span class="nroffip">CURLOPT_POSTQUOTE</span>
-<p class="level1">Pass a pointer to a linked list of FTP or SFTP commands to pass to the server after your FTP transfer request. The commands will only be run if no error occurred. The linked list should be a fully valid list of struct curl_slist structs properly filled in as described for <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a>. Disable this operation again by setting a NULL to this option.
-<p class="level0"><a name="CURLOPTPREQUOTE"></a><span class="nroffip">CURLOPT_PREQUOTE</span>
-<p class="level1">Pass a pointer to a linked list of FTP commands to pass to the server after the transfer type is set. The linked list should be a fully valid list of struct curl_slist structs properly filled in as described for <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a>. Disable this operation again by setting a NULL to this option. Before version 7.15.6, if you also set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 1, this option didn't work.
-<p class="level0"><a name="CURLOPTDIRLISTONLY"></a><span class="nroffip">CURLOPT_DIRLISTONLY</span>
-<p class="level1">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.
-<p class="level1">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.
-<p class="level1">Setting this option to 1 also implies a directory listing even if the URL doesn't end with a slash, which otherwise is necessary.
-<p class="level1">Do NOT use this option if you also use <a class="emphasis" href="#CURLOPTWILDCARDMATCH">CURLOPT_WILDCARDMATCH</a> as it will effectively break that feature then.
-<p class="level1">(This option was known as CURLOPT_FTPLISTONLY up to 7.16.4)
-<p class="level0"><a name="CURLOPTAPPEND"></a><span class="nroffip">CURLOPT_APPEND</span>
-<p class="level1">A parameter set to 1 tells the library to append to the remote file instead of overwrite it. This is only useful when uploading to an FTP site.
-<p class="level1">(This option was known as CURLOPT_FTPAPPEND up to 7.16.4)
-<p class="level0"><a name="CURLOPTFTPUSEEPRT"></a><span class="nroffip">CURLOPT_FTP_USE_EPRT</span>
-<p class="level1">Pass a long. If the value is 1, it tells curl to use the EPRT (and LPRT) command when doing active FTP downloads (which is enabled by <a class="emphasis" href="#CURLOPTFTPPORT">CURLOPT_FTPPORT</a>). Using EPRT means that it will first attempt to use EPRT and then LPRT before using PORT, but if you pass zero to this option, it will not try using EPRT or LPRT, only plain PORT. (Added in 7.10.5)
-<p class="level1">If the server is an IPv6 host, this option will have no effect as of 7.12.3.
-<p class="level0"><a name="CURLOPTFTPUSEEPSV"></a><span class="nroffip">CURLOPT_FTP_USE_EPSV</span>
-<p class="level1">Pass a long. If the value is 1, it tells curl to use the EPSV command when doing passive FTP downloads (which it always does by default). Using EPSV means that it will first attempt to use EPSV before using PASV, but if you pass zero to this option, it will not try using EPSV, only plain PASV.
-<p class="level1">If the server is an IPv6 host, this option will have no effect as of 7.12.3.
-<p class="level0"><a name="CURLOPTFTPUSEPRET"></a><span class="nroffip">CURLOPT_FTP_USE_PRET</span>
-<p class="level1">Pass a long. If the value is 1, it tells curl to send a PRET command before PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard command for directory listings as well as up and downloads in PASV mode. Has no effect when using the active FTP transfers mode. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTFTPCREATEMISSINGDIRS"></a><span class="nroffip">CURLOPT_FTP_CREATE_MISSING_DIRS</span>
-<p class="level1">Pass a long. If the value is 1, curl will attempt to create any remote directory that it fails to CWD into. CWD is the command that changes working directory. (Added in 7.10.7)
-<p class="level1">This setting also applies to SFTP-connections. curl will attempt to create the remote directory if it can't obtain a handle to the target-location. The creation will fail if a file of the same name as the directory to create already exists or lack of permissions prevents creation. (Added in 7.16.3)
-<p class="level1">Starting with 7.19.4, you can also set this value to 2, which will make libcurl retry the CWD command again if the subsequent MKD command fails. This is especially useful if you're doing many simultanoes connections against the same server and they all have this option enabled, as then CWD may first fail but then another connection does MKD before this connection and thus MKD fails but trying CWD works! 7.19.4 also introduced the <span Class="emphasis">CURLFTP_CREATE_DIR</span> and <span Class="emphasis">CURLFTP_CREATE_DIR_RETRY</span> enum names for these arguments.
-<p class="level1">Before version 7.19.4, libcurl will simply ignore arguments set to 2 and act as if 1 was selected.
-<p class="level0"><a name="CURLOPTFTPRESPONSETIMEOUT"></a><span class="nroffip">CURLOPT_FTP_RESPONSE_TIMEOUT</span>
-<p class="level1">Pass a long. Causes curl to set a timeout period (in seconds) on the amount of time that the server is allowed to take in order to generate a response message for a command before the session is considered hung. While curl is waiting for a response, this value overrides <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a>. It is recommended that if used in conjunction with <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a>, you set <a class="emphasis" href="#CURLOPTFTPRESPONSETIMEOUT">CURLOPT_FTP_RESPONSE_TIMEOUT</a> to a value smaller than <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a>. (Added in 7.10.8)
-<p class="level0"><a name="CURLOPTFTPALTERNATIVETOUSER"></a><span class="nroffip">CURLOPT_FTP_ALTERNATIVE_TO_USER</span>
-<p class="level1">Pass a char * as parameter, pointing to a string which will be used to authenticate if the usual FTP "USER user" and "PASS password" negotiation fails. This is currently only known to be required when connecting to Tumbleweed's Secure Transport FTPS server using client certificates for authentication. (Added in 7.15.5)
-<p class="level0"><a name="CURLOPTFTPSKIPPASVIP"></a><span class="nroffip">CURLOPT_FTP_SKIP_PASV_IP</span>
-<p class="level1">Pass a long. If set to 1, it instructs libcurl to not use the IP address the server suggests in its 227-response to libcurl's PASV command when libcurl connects the data connection. Instead libcurl will re-use the same IP address it already uses for the control connection. But it will use the port number from the 227-response. (Added in 7.14.2)
-<p class="level1">This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
-<p class="level0"><a name="CURLOPTUSESSL"></a><span class="nroffip">CURLOPT_USE_SSL</span>
-<p class="level1">Pass a long using one of the values from below, to make libcurl use your desired level of SSL for the FTP transfer. (Added in 7.11.0)
-<p class="level1">(This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants were known as CURLFTPSSL_*)
-<p class="level2">
-<p class="level1"><a name="CURLUSESSLNONE"></a><span class="nroffip">CURLUSESSL_NONE</span>
-<p class="level2">Don't attempt to use SSL.
-<p class="level1"><a name="CURLUSESSLTRY"></a><span class="nroffip">CURLUSESSL_TRY</span>
-<p class="level2">Try using SSL, proceed as normal otherwise.
-<p class="level1"><a name="CURLUSESSLCONTROL"></a><span class="nroffip">CURLUSESSL_CONTROL</span>
-<p class="level2">Require SSL for the control connection or fail with <span Class="emphasis">CURLE_USE_SSL_FAILED</span>.
-<p class="level1"><a name="CURLUSESSLALL"></a><span class="nroffip">CURLUSESSL_ALL</span>
-<p class="level2">Require SSL for all communication or fail with <span Class="emphasis">CURLE_USE_SSL_FAILED</span>.
-<p class="level1">
-<p class="level0"><a name="CURLOPTFTPSSLAUTH"></a><span class="nroffip">CURLOPT_FTPSSLAUTH</span>
-<p class="level1">Pass a long using one of the values from below, to alter how libcurl issues "AUTH TLS" or "AUTH SSL" when FTP over SSL is activated (see <a class="emphasis" href="#CURLOPTUSESSL">CURLOPT_USE_SSL</a>). (Added in 7.12.2)
-<p class="level2">
-<p class="level1"><a name="CURLFTPAUTHDEFAULT"></a><span class="nroffip">CURLFTPAUTH_DEFAULT</span>
-<p class="level2">Allow libcurl to decide.
-<p class="level1"><a name="CURLFTPAUTHSSL"></a><span class="nroffip">CURLFTPAUTH_SSL</span>
-<p class="level2">Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
-<p class="level1"><a name="CURLFTPAUTHTLS"></a><span class="nroffip">CURLFTPAUTH_TLS</span>
-<p class="level2">Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
-<p class="level1">
-<p class="level0"><a name="CURLOPTFTPSSLCCC"></a><span class="nroffip">CURLOPT_FTP_SSL_CCC</span>
-<p class="level1">If enabled, this option makes libcurl use CCC (Clear Command Channel). It shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This allows NAT routers to follow the FTP transaction. Pass a long using one of the values below. (Added in 7.16.1)
-<p class="level2">
-<p class="level1"><a name="CURLFTPSSLCCCNONE"></a><span class="nroffip">CURLFTPSSL_CCC_NONE</span>
-<p class="level2">Don't attempt to use CCC.
-<p class="level1"><a name="CURLFTPSSLCCCPASSIVE"></a><span class="nroffip">CURLFTPSSL_CCC_PASSIVE</span>
-<p class="level2">Do not initiate the shutdown, but wait for the server to do it. Do not send a reply.
-<p class="level1"><a name="CURLFTPSSLCCCACTIVE"></a><span class="nroffip">CURLFTPSSL_CCC_ACTIVE</span>
-<p class="level2">Initiate the shutdown and wait for a reply.
-<p class="level1">
-<p class="level0"><a name="CURLOPTFTPACCOUNT"></a><span class="nroffip">CURLOPT_FTP_ACCOUNT</span>
-<p class="level1">Pass a pointer to a zero-terminated string (or NULL to disable). When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command. (Added in 7.13.0)
-<p class="level0"><a name="CURLOPTFTPFILEMETHOD"></a><span class="nroffip">CURLOPT_FTP_FILEMETHOD</span>
-<p class="level1">Pass a long that should have one of the following values. This option controls what method libcurl should use to reach a file on a FTP(S) server. The argument should be one of the following alternatives:
-<p class="level2">
-<p class="level1"><a name="CURLFTPMETHODMULTICWD"></a><span class="nroffip">CURLFTPMETHOD_MULTICWD</span>
-<p class="level2">libcurl does a single CWD operation for each path part in the given URL. For deep hierarchies this means many commands. This is how RFC1738 says it should be done. This is the default but the slowest behavior.
-<p class="level1"><a name="CURLFTPMETHODNOCWD"></a><span class="nroffip">CURLFTPMETHOD_NOCWD</span>
-<p class="level2">libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior.
-<p class="level1"><a name="CURLFTPMETHODSINGLECWD"></a><span class="nroffip">CURLFTPMETHOD_SINGLECWD</span>
-<p class="level2">libcurl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'.
-<p class="level1">(Added in 7.15.1) <a name="RTSP"></a><h2 class="nroffsh">RTSP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTRTSPREQUEST"></a><span class="nroffip">CURLOPT_RTSP_REQUEST</span>
-<p class="level1">Tell libcurl what kind of RTSP request to make. Pass one of the following RTSP enum values. Unless noted otherwise, commands require the Session ID to be initialized. (Added in 7.20.0)
-<p class="level2">
-<p class="level1"><a name="CURLRTSPREQOPTIONS"></a><span class="nroffip">CURL_RTSPREQ_OPTIONS</span>
-<p class="level2">Used to retrieve the available methods of the server. The application is responsbile for parsing and obeying the response. <span class="bold">(The session ID is not needed for this method.)</span> (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQDESCRIBE"></a><span class="nroffip">CURL_RTSPREQ_DESCRIBE</span>
-<p class="level2">Used to get the low level description of a stream. The application should note what formats it understands in the <span Class="emphasis">'Accept:'</span> header. Unless set manually, libcurl will automatically fill in <span class="emphasis">'Accept: application/sdp'</span>. Time-condition headers will be added to Describe requests if the <a class="emphasis" href="#CURLOPTTIMECONDITION">CURLOPT_TIMECONDITION</a> option is active. <span class="bold">(The session ID is not needed for this method)</span> (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQANNOUNCE"></a><span class="nroffip">CURL_RTSPREQ_ANNOUNCE</span>
-<p class="level2">When sent by a client, this method changes the description of the session. For example, if a client is using the server to record a meeting, the client can use Announce to inform the server of all the meta-information about the session. ANNOUNCE acts like an HTTP PUT or POST just like <a class="emphasis" href="#CURLRTSPREQSETPARAMETER">CURL_RTSPREQ_SET_PARAMETER</a> (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQSETUP"></a><span class="nroffip">CURL_RTSPREQ_SETUP</span>
-<p class="level2">Setup is used to initialize the transport layer for the session. The application must set the desired Transport options for a session by using the <a class="emphasis" href="#CURLOPTRTSPTRANSPORT">CURLOPT_RTSP_TRANSPORT</a> option prior to calling setup. If no session ID is currently set with <a class="emphasis" href="#CURLOPTRTSPSESSIONID">CURLOPT_RTSP_SESSION_ID</a>, libcurl will extract and use the session ID in the response to this request. <span class="bold">(The session ID is not needed for this method).</span> (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQPLAY"></a><span class="nroffip">CURL_RTSPREQ_PLAY</span>
-<p class="level2">Send a Play command to the server. Use the <a class="emphasis" href="#CURLOPTRANGE">CURLOPT_RANGE</a> option to modify the playback time (e.g. 'npt=10-15'). (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQPAUSE"></a><span class="nroffip">CURL_RTSPREQ_PAUSE</span>
-<p class="level2">Send a Pause command to the server. Use the <a class="emphasis" href="#CURLOPTRANGE">CURLOPT_RANGE</a> option with a single value to indicate when the stream should be halted. (e.g. npt='25') (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQTEARDOWN"></a><span class="nroffip">CURL_RTSPREQ_TEARDOWN</span>
-<p class="level2">This command terminates an RTSP session. Simply closing a connection does not terminate the RTSP session since it is valid to control an RTSP session over different connections. (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQGETPARAMETER"></a><span class="nroffip">CURL_RTSPREQ_GET_PARAMETER</span>
-<p class="level2">Retrieve a parameter from the server. By default, libcurl will automatically include a <span Class="emphasis">Content-Type: text/parameters</span> header on all non-empty requests unless a custom one is set. GET_PARAMETER acts just like an HTTP PUT or POST (see <a class="emphasis" href="#CURLRTSPREQSETPARAMETER">CURL_RTSPREQ_SET_PARAMETER</a>). Applications wishing to send a heartbeat message (e.g. in the presence of a server-specified timeout) should send use an empty GET_PARAMETER request. (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQSETPARAMETER"></a><span class="nroffip">CURL_RTSPREQ_SET_PARAMETER</span>
-<p class="level2">Set a parameter on the server. By default, libcurl will automatically include a <span Class="emphasis">Content-Type: text/parameters</span> header unless a custom one is set. The interaction with SET_PARAMTER is much like an HTTP PUT or POST. An application may either use <a class="emphasis" href="#CURLOPTUPLOAD">CURLOPT_UPLOAD</a> with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> like an HTTP PUT, or it may use <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> like an HTTP POST. No chunked transfers are allowed, so the application must set the <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a> in the former and <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> in the latter. Also, there is no use of multi-part POSTs within RTSP. (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQRECORD"></a><span class="nroffip">CURL_RTSPREQ_RECORD</span>
-<p class="level2">Used to tell the server to record a session. Use the <a class="emphasis" href="#CURLOPTRANGE">CURLOPT_RANGE</a> option to modify the record time. (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQRECEIVE"></a><span class="nroffip">CURL_RTSPREQ_RECEIVE</span>
-<p class="level2">This is a special request because it does not send any data to the server. The application may call this function in order to receive interleaved RTP data. It will return after processing one read buffer of data in order to give the application a chance to run. (Added in 7.20.0)
-<p class="level1">
-<p class="level0"><a name="CURLOPTRTSPSESSIONID"></a><span class="nroffip">CURLOPT_RTSP_SESSION_ID</span>
-<p class="level1">Pass a char * as a parameter to set the value of the current RTSP Session ID for the handle. Useful for resuming an in-progress session. Once this value is set to any non-NULL value, libcurl will return <span Class="emphasis">CURLE_RTSP_SESSION_ERROR</span> if ID received from the server does not match. If unset (or set to NULL), libcurl will automatically set the ID the first time the server sets it in a response. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPSTREAMURI"></a><span class="nroffip">CURLOPT_RTSP_STREAM_URI</span>
-<p class="level1">Set the stream URI to operate on by passing a char * . For example, a single session may be controlling <span Class="emphasis">rtsp://foo/twister/audio</span> and <span Class="emphasis">rtsp://foo/twister/video</span> and the application can switch to the appropriate stream using this option. If unset, libcurl will default to operating on generic server options by passing '*' in the place of the RTSP Stream URI. This option is distinct from <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a>. When working with RTSP, the <span Class="emphasis">CURLOPT_STREAM_URI</span> indicates what URL to send to the server in the request header while the <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> indicates where to make the connection to. (e.g. the <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> for the above examples might be set to <span Class="emphasis">rtsp://foo/twister</span> (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPTRANSPORT"></a><span class="nroffip">CURLOPT_RTSP_TRANSPORT</span>
-<p class="level1">Pass a char * to tell libcurl what to pass for the Transport: header for this RTSP session. This is mainly a convenience method to avoid needing to set a custom Transport: header for every SETUP request. The application must set a Transport: header before issuing a SETUP request. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPHEADER"></a><span class="nroffip">CURLOPT_RTSP_HEADER</span>
-<p class="level1">This option is simply an alias for <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTP_HEADER</a>. Use this to replace the standard headers that RTSP and HTTP share. It is also valid to use the shortcuts such as <a class="emphasis" href="#CURLOPTUSERAGENT">CURLOPT_USERAGENT</a>. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPCLIENTCSEQ"></a><span class="nroffip">CURLOPT_RTSP_CLIENT_CSEQ</span>
-<p class="level1">Manually set the the CSEQ number to issue for the next RTSP request. Useful if the application is resuming a previously broken connection. The CSEQ will increment from this new number henceforth. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPSERVERCSEQ"></a><span class="nroffip">CURLOPT_RTSP_SERVER_CSEQ</span>
-<p class="level1">Manually set the CSEQ number to expect for the next RTSP Server-&gt;Client request. At the moment, this feature (listening for Server requests) is unimplemented. (Added in 7.20.0) <a name="PROTOCOL"></a><h2 class="nroffsh">PROTOCOL OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTTRANSFERTEXT"></a><span class="nroffip">CURLOPT_TRANSFERTEXT</span>
-<p class="level1">A parameter set to 1 tells the library to use ASCII mode for FTP transfers, instead of the default binary transfer. For win32 systems it does not set the stdout to binary mode. This option can be usable when transferring text data between systems with different views on certain characters, such as newlines or similar.
-<p class="level1">libcurl does not do a complete ASCII conversion when doing ASCII transfers over FTP. This is a known limitation/flaw that nobody has rectified. libcurl simply sets the mode to ASCII and performs a standard transfer.
-<p class="level0"><a name="CURLOPTPROXYTRANSFERMODE"></a><span class="nroffip">CURLOPT_PROXY_TRANSFER_MODE</span>
-<p class="level1">Pass a long. If the value is set to 1 (one), it tells libcurl to set the transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by appending ;type=a or ;type=i to the URL. Without this setting, or it being set to 0 (zero, the default), <a class="emphasis" href="#CURLOPTTRANSFERTEXT">CURLOPT_TRANSFERTEXT</a> has no effect when doing FTP via a proxy. Beware that not all proxies support this feature. (Added in 7.18.0)
-<p class="level0"><a name="CURLOPTCRLF"></a><span class="nroffip">CURLOPT_CRLF</span>
-<p class="level1">Convert Unix newlines to CRLF newlines on transfers.
-<p class="level0"><a name="CURLOPTRANGE"></a><span class="nroffip">CURLOPT_RANGE</span>
-<p class="level1">Pass a char * as parameter, which should contain the specified range you want. It should be in the format "X-Y", where X or Y may be left out. HTTP transfers also support several intervals, separated with commas as in <span Class="emphasis">"X-Y,N-M"</span>. Using this kind of multiple intervals will cause the HTTP server to send the response document in pieces (using standard MIME separation techniques). For RTSP, the formatting of a range should follow RFC 2326 Section 12.29. For RTSP, byte ranges are <span Class="bold">not</span> permitted. Instead, ranges should be given in npt, utc, or smpte formats.
-<p class="level1">Pass a NULL to this option to disable the use of ranges.
-<p class="level1">Ranges work on HTTP, FTP, FILE (since 7.18.0), and RTSP (since 7.20.0) transfers only.
-<p class="level0"><a name="CURLOPTRESUMEFROM"></a><span class="nroffip">CURLOPT_RESUME_FROM</span>
-<p class="level1">Pass a long as parameter. It contains the offset in number of bytes that you want the transfer to start from. Set this option to 0 to make the transfer start from the beginning (effectively disabling resume). For FTP, set this option to -1 to make the transfer start from the end of the target file (useful to continue an interrupted upload).
-<p class="level1">When doing uploads with FTP, the resume position is where in the local/source file libcurl should try to resume the upload from and it will then append the source file to the remote target file.
-<p class="level0"><a name="CURLOPTRESUMEFROMLARGE"></a><span class="nroffip">CURLOPT_RESUME_FROM_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. It contains the offset in number of bytes that you want the transfer to start from. (Added in 7.11.0)
-<p class="level0"><a name="CURLOPTCUSTOMREQUEST"></a><span class="nroffip">CURLOPT_CUSTOMREQUEST</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST when doing a FTP directory listing. This is useful for doing DELETE or other more or less obscure HTTP requests. Don't do this at will, make sure your server supports the command first.
-<p class="level1">When you change the request method by setting <a class="bold" href="#CURLOPTCUSTOMREQUEST">CURLOPT_CUSTOMREQUEST</a> to something, you don't actually change how libcurl behaves or acts in regards to the particular request method, it will only change the actual string sent in the request.
-<p class="level1">For example: if you tell libcurl to do a HEAD request, but then change the request to a "GET" with <a class="bold" href="#CURLOPTCUSTOMREQUEST">CURLOPT_CUSTOMREQUEST</a> you'll still see libcurl act as if it sent a HEAD even when it does send a GET.
-<p class="level1">To switch to a proper HEAD, use <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a>, to switch to a proper POST, use <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> and so on.
-<p class="level1">Restore to the internal default by setting this to NULL.
-<p class="level1">Many people have wrongly used this option to replace the entire request with their own, including multiple headers and POST contents. While that might work in many cases, it will cause libcurl to send invalid requests and it could possibly confuse the remote server badly. Use <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> and <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> to set POST data. Use <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> to replace or extend the set of headers sent by libcurl. Use <a class="emphasis" href="#CURLOPTHTTPVERSION">CURLOPT_HTTP_VERSION</a> to change HTTP version.
-<p class="level0"><a name="CURLOPTFILETIME"></a><span class="nroffip">CURLOPT_FILETIME</span>
-<p class="level1">Pass a long. If it is 1, libcurl will attempt to get the modification date of the remote document in this operation. This requires that the remote server sends the time or replies to a time querying command. The <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> function with the <span Class="emphasis">CURLINFO_FILETIME</span> argument can be used after a transfer to extract the received time (if any).
-<p class="level0"><a name="CURLOPTNOBODY"></a><span class="nroffip">CURLOPT_NOBODY</span>
-<p class="level1">A parameter set to 1 tells the library to not include the body-part in the output. This is only relevant for protocols that have separate header and body parts. On HTTP(S) servers, this will make libcurl do a HEAD request.
-<p class="level1">To change request to GET, you should use <a class="emphasis" href="#CURLOPTHTTPGET">CURLOPT_HTTPGET</a>. Change request to POST with <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> etc.
-<p class="level0"><a name="CURLOPTINFILESIZE"></a><span class="nroffip">CURLOPT_INFILESIZE</span>
-<p class="level1">When uploading a file to a remote site, this option should be used to tell libcurl what the expected size of the infile is. This value should be passed as a long. See also <a class="emphasis" href="#CURLOPTINFILESIZELARGE">CURLOPT_INFILESIZE_LARGE</a>.
-<p class="level1">For uploading using SCP, this option or <a class="emphasis" href="#CURLOPTINFILESIZELARGE">CURLOPT_INFILESIZE_LARGE</a> is mandatory.
-<p class="level1">This option does not limit how much data libcurl will actually send, as that is controlled entirely by what the read callback returns.
-<p class="level0"><a name="CURLOPTINFILESIZELARGE"></a><span class="nroffip">CURLOPT_INFILESIZE_LARGE</span>
-<p class="level1">When uploading a file to a remote site, this option should be used to tell libcurl what the expected size of the infile is. This value should be passed as a curl_off_t. (Added in 7.11.0)
-<p class="level1">For uploading using SCP, this option or <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a> is mandatory.
-<p class="level1">This option does not limit how much data libcurl will actually send, as that is controlled entirely by what the read callback returns.
-<p class="level0"><a name="CURLOPTUPLOAD"></a><span class="nroffip">CURLOPT_UPLOAD</span>
-<p class="level1">A parameter set to 1 tells the library to prepare for an upload. The <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> and <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a> or <a class="emphasis" href="#CURLOPTINFILESIZELARGE">CURLOPT_INFILESIZE_LARGE</a> options are also interesting for uploads. If the protocol is HTTP, uploading means using the PUT request unless you tell libcurl otherwise.
-<p class="level1">Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> as usual.
-<p class="level1">If you use PUT to a HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>. With HTTP 1.0 or without chunked transfer, you must specify the size.
-<p class="level0"><a name="CURLOPTMAXFILESIZE"></a><span class="nroffip">CURLOPT_MAXFILESIZE</span>
-<p class="level1">Pass a long as parameter. This allows you to specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and CURLE_FILESIZE_EXCEEDED will be returned.
-<p class="level1">The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers.
-<p class="level0"><a name="CURLOPTMAXFILESIZELARGE"></a><span class="nroffip">CURLOPT_MAXFILESIZE_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. This allows you to specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and <span Class="emphasis">CURLE_FILESIZE_EXCEEDED</span> will be returned. (Added in 7.11.0)
-<p class="level1">The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers.
-<p class="level0"><a name="CURLOPTTIMECONDITION"></a><span class="nroffip">CURLOPT_TIMECONDITION</span>
-<p class="level1">Pass a long as parameter. This defines how the <a class="emphasis" href="#CURLOPTTIMEVALUE">CURLOPT_TIMEVALUE</a> time value is treated. You can set this parameter to <span Class="emphasis">CURL_TIMECOND_IFMODSINCE</span> or <span Class="emphasis">CURL_TIMECOND_IFUNMODSINCE</span>. This feature applies to HTTP, FTP, and RTSP.
-<p class="level1">The last modification time of a file is not always known and in such instances this feature will have no effect even if the given time condition would not have been met. <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with the <span Class="emphasis">CURLINFO_CONDITION_UNMET</span> option can be used after a transfer to learn if a zero-byte successful "transfer" was due to this condition not matching.
-<p class="level0"><a name="CURLOPTTIMEVALUE"></a><span class="nroffip">CURLOPT_TIMEVALUE</span>
-<p class="level1">Pass a long as parameter. This should be the time in seconds since 1 Jan 1970, and the time will be used in a condition as specified with <a class="emphasis" href="#CURLOPTTIMECONDITION">CURLOPT_TIMECONDITION</a>. <a name="CONNECTION"></a><h2 class="nroffsh">CONNECTION OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTTIMEOUT"></a><span class="nroffip">CURLOPT_TIMEOUT</span>
-<p class="level1">Pass a long as parameter containing the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. This option will cause curl to use the SIGALRM to enable time-outing system calls.
-<p class="level1">In unix-like systems, this might cause signals to be used unless <a class="emphasis" href="#CURLOPTNOSIGNAL">CURLOPT_NOSIGNAL</a> is set.
-<p class="level0"><a name="CURLOPTTIMEOUTMS"></a><span class="nroffip">CURLOPT_TIMEOUT_MS</span>
-<p class="level1">Like <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a> but takes number of milliseconds instead. If libcurl is built to use the standard system name resolver, that portion of the transfer will still use full-second resolution for timeouts with a minimum timeout allowed of one second. (Added in 7.16.2)
-<p class="level0"><a name="CURLOPTLOWSPEEDLIMIT"></a><span class="nroffip">CURLOPT_LOW_SPEED_LIMIT</span>
-<p class="level1">Pass a long as parameter. It contains the transfer speed in bytes per second that the transfer should be below during <a class="emphasis" href="#CURLOPTLOWSPEEDTIME">CURLOPT_LOW_SPEED_TIME</a> seconds for the library to consider it too slow and abort.
-<p class="level0"><a name="CURLOPTLOWSPEEDTIME"></a><span class="nroffip">CURLOPT_LOW_SPEED_TIME</span>
-<p class="level1">Pass a long as parameter. It contains the time in seconds that the transfer should be below the <a class="emphasis" href="#CURLOPTLOWSPEEDLIMIT">CURLOPT_LOW_SPEED_LIMIT</a> for the library to consider it too slow and abort.
-<p class="level0"><a name="CURLOPTMAXSENDSPEEDLARGE"></a><span class="nroffip">CURLOPT_MAX_SEND_SPEED_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. If an upload exceeds this speed (counted in bytes per second) on cumulative average during the transfer, the transfer will pause to keep the average rate less than or equal to the parameter value. Defaults to unlimited speed. (Added in 7.15.5)
-<p class="level0"><a name="CURLOPTMAXRECVSPEEDLARGE"></a><span class="nroffip">CURLOPT_MAX_RECV_SPEED_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. If a download exceeds this speed (counted in bytes per second) on cumulative average during the transfer, the transfer will pause to keep the average rate less than or equal to the parameter value. Defaults to unlimited speed. (Added in 7.15.5)
-<p class="level0"><a name="CURLOPTMAXCONNECTS"></a><span class="nroffip">CURLOPT_MAXCONNECTS</span>
-<p class="level1">Pass a long. The set number will be the persistent connection cache size. The set amount will be the maximum amount of simultaneously open connections that libcurl may cache in this easy 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.
-<p class="level1">When reaching the maximum limit, curl closes the oldest one in the cache to prevent increasing the number of open connections.
-<p class="level1">If you already have performed transfers with this curl handle, setting a smaller MAXCONNECTS than before may cause open connections to get closed unnecessarily.
-<p class="level1">If you add this easy handle to a multi handle, this setting is not acknowledged, and you must instead use <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and the <span Class="emphasis">CURLMOPT_MAXCONNECTS</span> option.
-<p class="level0"><a name="CURLOPTCLOSEPOLICY"></a><span class="nroffip">CURLOPT_CLOSEPOLICY</span>
-<p class="level1">(Obsolete) This option does nothing.
-<p class="level0"><a name="CURLOPTFRESHCONNECT"></a><span class="nroffip">CURLOPT_FRESH_CONNECT</span>
-<p class="level1">Pass a long. Set to 1 to make the next transfer use a new (fresh) connection by force. If the connection cache is full before this connection, one of the existing connections will be closed as according to the selected or default policy. This option should be used with caution and only if you understand what it does. Set this to 0 to have libcurl attempt re-using an existing connection (default behavior).
-<p class="level0"><a name="CURLOPTFORBIDREUSE"></a><span class="nroffip">CURLOPT_FORBID_REUSE</span>
-<p class="level1">Pass a long. Set to 1 to make the next transfer explicitly close the connection when done. Normally, libcurl keeps all connections alive when done with one transfer in case a succeeding one follows that can re-use them. This option should be used with caution and only if you understand what it does. Set to 0 to have libcurl keep the connection open for possible later re-use (default behavior).
-<p class="level0"><a name="CURLOPTCONNECTTIMEOUT"></a><span class="nroffip">CURLOPT_CONNECTTIMEOUT</span>
-<p class="level1">Pass a long. It should contain the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to disable connection timeout (it will then only timeout on the system's internal timeouts). See also the <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a> option.
-<p class="level1">In unix-like systems, this might cause signals to be used unless <a class="emphasis" href="#CURLOPTNOSIGNAL">CURLOPT_NOSIGNAL</a> is set.
-<p class="level0"><a name="CURLOPTCONNECTTIMEOUTMS"></a><span class="nroffip">CURLOPT_CONNECTTIMEOUT_MS</span>
-<p class="level1">Like <a class="emphasis" href="#CURLOPTCONNECTTIMEOUT">CURLOPT_CONNECTTIMEOUT</a> but takes the number of milliseconds instead. If libcurl is built to use the standard system name resolver, that portion of the connect will still use full-second resolution for timeouts with a minimum timeout allowed of one second. (Added in 7.16.2)
-<p class="level0"><a name="CURLOPTIPRESOLVE"></a><span class="nroffip">CURLOPT_IPRESOLVE</span>
-<p class="level1">Allows an application to select what kind of IP addresses to use when resolving host names. This is only interesting when using host names that resolve addresses using more than one version of IP. The allowed values are:
-<p class="level2">
-<p class="level1"><a name="CURLIPRESOLVEWHATEVER"></a><span class="nroffip">CURL_IPRESOLVE_WHATEVER</span>
-<p class="level2">Default, resolves addresses to all IP versions that your system allows.
-<p class="level1"><a name="CURLIPRESOLVEV4"></a><span class="nroffip">CURL_IPRESOLVE_V4</span>
-<p class="level2">Resolve to IPv4 addresses.
-<p class="level1"><a name="CURLIPRESOLVEV6"></a><span class="nroffip">CURL_IPRESOLVE_V6</span>
-<p class="level2">Resolve to IPv6 addresses.
-<p class="level1">
-<p class="level0"><a name="CURLOPTCONNECTONLY"></a><span class="nroffip">CURLOPT_CONNECT_ONLY</span>
-<p class="level1">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. This option is useful only on HTTP URLs.
-<p class="level1">This option is useful with the <span Class="emphasis">CURLINFO_LASTSOCKET</span> option to <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a>. The library can set up the connection and then the application can obtain the most recently used socket for special data transfers. (Added in 7.15.2) <a name="SSL"></a><h2 class="nroffsh">SSL and SECURITY OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTSSLCERT"></a><span class="nroffip">CURLOPT_SSLCERT</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the file name of your certificate. The default format is "PEM" and can be changed with <a class="emphasis" href="#CURLOPTSSLCERTTYPE">CURLOPT_SSLCERTTYPE</a>.
-<p class="level1">With NSS this is the nickname of the certificate you wish to authenticate with.
-<p class="level0"><a name="CURLOPTSSLCERTTYPE"></a><span class="nroffip">CURLOPT_SSLCERTTYPE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the format of your certificate. Supported formats are "PEM" and "DER". (Added in 7.9.3)
-<p class="level0"><a name="CURLOPTSSLKEY"></a><span class="nroffip">CURLOPT_SSLKEY</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the file name of your private key. The default format is "PEM" and can be changed with <a class="emphasis" href="#CURLOPTSSLKEYTYPE">CURLOPT_SSLKEYTYPE</a>.
-<p class="level0"><a name="CURLOPTSSLKEYTYPE"></a><span class="nroffip">CURLOPT_SSLKEYTYPE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the format of your private key. Supported formats are "PEM", "DER" and "ENG".
-<p class="level1">The format "ENG" enables you to load the private key from a crypto engine. In this case <a class="emphasis" href="#CURLOPTSSLKEY">CURLOPT_SSLKEY</a> is used as an identifier passed to the engine. You have to set the crypto engine with <a class="emphasis" href="#CURLOPTSSLENGINE">CURLOPT_SSLENGINE</a>. "DER" format key file currently does not work because of a bug in OpenSSL.
-<p class="level0"><a name="CURLOPTKEYPASSWD"></a><span class="nroffip">CURLOPT_KEYPASSWD</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used as the password required to use the <a class="emphasis" href="#CURLOPTSSLKEY">CURLOPT_SSLKEY</a> or <a class="emphasis" href="#CURLOPTSSHPRIVATEKEYFILE">CURLOPT_SSH_PRIVATE_KEYFILE</a> private key. You never needed a pass phrase to load a certificate but you need one to load your private key.
-<p class="level1">(This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and CURLOPT_SSLCERTPASSWD up to 7.9.2)
-<p class="level0"><a name="CURLOPTSSLENGINE"></a><span class="nroffip">CURLOPT_SSLENGINE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used as the identifier for the crypto engine you want to use for your private key.
-<p class="level1">If the crypto device cannot be loaded, <span Class="emphasis">CURLE_SSL_ENGINE_NOTFOUND</span> is returned.
-<p class="level0"><a name="CURLOPTSSLENGINEDEFAULT"></a><span class="nroffip">CURLOPT_SSLENGINE_DEFAULT</span>
-<p class="level1">Sets the actual crypto engine as the default for (asymmetric) crypto operations.
-<p class="level1">If the crypto device cannot be set, <span Class="emphasis">CURLE_SSL_ENGINE_SETFAILED</span> is returned.
-<p class="level1">Even though this option doesn't need any parameter, in some configurations <span Class="emphasis">curl_easy_setopt</span> might be defined as a macro taking exactly three arguments. Therefore, it's recommended to pass 1 as parameter to this option.
-<p class="level0"><a name="CURLOPTSSLVERSION"></a><span class="nroffip">CURLOPT_SSLVERSION</span>
-<p class="level1">Pass a long as parameter to control what version of SSL/TLS to attempt to use. The available options are:
-<p class="level2">
-<p class="level1"><a name="CURLSSLVERSIONDEFAULT"></a><span class="nroffip">CURL_SSLVERSION_DEFAULT</span>
-<p class="level2">The default action. This will attempt to figure out the remote SSL protocol version, i.e. either SSLv3 or TLSv1 (but not SSLv2, which became disabled by default with 7.18.1).
-<p class="level1"><a name="CURLSSLVERSIONTLSv1"></a><span class="nroffip">CURL_SSLVERSION_TLSv1</span>
-<p class="level2">Force TLSv1
-<p class="level1"><a name="CURLSSLVERSIONSSLv2"></a><span class="nroffip">CURL_SSLVERSION_SSLv2</span>
-<p class="level2">Force SSLv2
-<p class="level1"><a name="CURLSSLVERSIONSSLv3"></a><span class="nroffip">CURL_SSLVERSION_SSLv3</span>
-<p class="level2">Force SSLv3
-<p class="level1">
-<p class="level0"><a name="CURLOPTSSLVERIFYPEER"></a><span class="nroffip">CURLOPT_SSL_VERIFYPEER</span>
-<p class="level1">Pass a long as parameter.
-<p class="level1">This option determines whether curl verifies the authenticity of the peer's certificate. A value of 1 means curl verifies; zero means it doesn't. The default is nonzero, but before 7.10, it was zero.
-<p class="level1">When negotiating an SSL connection, the server sends a certificate indicating its identity. Curl verifies whether the certificate is authentic, i.e. that you can trust that the server is who the certificate says it is. This trust is based on a chain of digital signatures, rooted in certification authority (CA) certificates you supply. As of 7.10, curl installs a default bundle of CA certificates and you can specify alternate certificates with the <a class="emphasis" href="#CURLOPTCAINFO">CURLOPT_CAINFO</a> option or the <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> option.
-<p class="level1">When <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is nonzero, and the verification fails to prove that the certificate is authentic, the connection fails. When the option is zero, the connection succeeds regardless.
-<p class="level1">Authenticating the certificate is not by itself very useful. You typically want to ensure that the server, as authentically identified by its certificate, is the server you mean to be talking to. Use <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> to control that.
-<p class="level0"><a name="CURLOPTCAINFO"></a><span class="nroffip">CURLOPT_CAINFO</span>
-<p class="level1">Pass a char * to a zero terminated string naming a file holding one or more certificates to verify the peer with. This makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option. If <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is zero, <a class="emphasis" href="#CURLOPTCAINFO">CURLOPT_CAINFO</a> need not even indicate an accessible file.
-<p class="level1">This option is by default set to the system path where libcurl's cacert bundle is assumed to be stored, as established at build time.
-<p class="level1">When built against NSS, this is the directory that the NSS certificate database resides in.
-<p class="level0"><a name="CURLOPTISSUERCERT"></a><span class="nroffip">CURLOPT_ISSUERCERT</span>
-<p class="level1">Pass a char * to a zero terminated string naming a file holding a CA certificate in PEM format. If the option is set, an additional check against the peer certificate is performed to verify the issuer is indeed the one associated with the certificate provided by the option. This additional check is useful in multi-level PKI where one needs to enforce that the peer certificate is from a specific branch of the tree.
-<p class="level1">This option makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option. Otherwise, the result of the check is not considered as failure.
-<p class="level1">A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option, which is returned if the setup of the SSL/TLS session has failed due to a mismatch with the issuer of peer certificate (<a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> has to be set too for the check to fail). (Added in 7.19.0)
-<p class="level0"><a name="CURLOPTCAPATH"></a><span class="nroffip">CURLOPT_CAPATH</span>
-<p class="level1">Pass a char * to a zero terminated string naming a directory holding multiple CA certificates to verify the peer with. The certificate directory must be prepared using the openssl c_rehash utility. This makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option. If <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is zero, <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> need not even indicate an accessible path. The <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> function apparently does not work in Windows due to some limitation in openssl. This option is OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
-<p class="level0"><a name="CURLOPTCRLFILE"></a><span class="nroffip">CURLOPT_CRLFILE</span>
-<p class="level1">Pass a char * to a zero terminated string naming a file with the concatenation of CRL (in PEM format) to use in the certificate validation that occurs during the SSL exchange.
-<p class="level1">When curl is built to use NSS or GnuTLS, there is no way to influence the use of CRL passed to help in the verification process. When libcurl is built with OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both set, requiring CRL check against all the elements of the certificate chain if a CRL file is passed.
-<p class="level1">This option makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option.
-<p class="level1">A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It is returned when the SSL exchange fails because the CRL file cannot be loaded. A failure in certificate verification due to a revocation information found in the CRL does not trigger this specific error. (Added in 7.19.0)
-<p class="level0"><a name="CURLOPTCERTINFO"></a><span class="nroffip">CURLOPT_CERTINFO</span>
-<p class="level1">Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With this enabled, libcurl (if built with OpenSSL) will extract lots of information and data about the certificates in the certificate chain used in the SSL connection. This data is then possible to extract after a transfer using <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> and its option <span Class="emphasis">CURLINFO_CERTINFO</span>. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTRANDOMFILE"></a><span class="nroffip">CURLOPT_RANDOM_FILE</span>
-<p class="level1">Pass a char * to a zero terminated file name. The file will be used to read from to seed the random engine for SSL. The more random the specified file is, the more secure the SSL connection will become.
-<p class="level0"><a name="CURLOPTEGDSOCKET"></a><span class="nroffip">CURLOPT_EGDSOCKET</span>
-<p class="level1">Pass a char * to the zero terminated path name to the Entropy Gathering Daemon socket. It will be used to seed the random engine for SSL.
-<p class="level0"><a name="CURLOPTSSLVERIFYHOST"></a><span class="nroffip">CURLOPT_SSL_VERIFYHOST</span>
-<p class="level1">Pass a long as parameter.
-<p class="level1">This option determines whether libcurl verifies that the server cert is for the server it is known as.
-<p class="level1">When negotiating a SSL connection, the server sends a certificate indicating its identity.
-<p class="level1">When <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> is 2, that certificate must indicate that the server is the server to which you meant to connect, or the connection fails.
-<p class="level1">Curl considers the server the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the URL to which you told Curl to connect.
-<p class="level1">When the value is 1, the certificate must contain a Common Name field, but it doesn't matter what name it says. (This is not ordinarily a useful setting).
-<p class="level1">When the value is 0, the connection succeeds regardless of the names in the certificate.
-<p class="level1">The default, since 7.10, is 2.
-<p class="level1">This option controls checking the server's claimed identity. The server could be lying. To control lying, see <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a>.
-<p class="level0"><a name="CURLOPTSSLCIPHERLIST"></a><span class="nroffip">CURLOPT_SSL_CIPHER_LIST</span>
-<p class="level1">Pass a char *, pointing to a zero terminated string holding the list of ciphers to use for the SSL connection. The list must be syntactically correct, it consists of one or more cipher strings separated by colons. Commas or spaces are also acceptable separators but colons are normally used, !, - and + can be used as operators.
-<p class="level1">For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA', &acute;SHA1+DES&acute;, 'TLSv1' and 'DEFAULT'. The default list is normally set when you compile OpenSSL.
-<p class="level1">You'll find more details about cipher lists on this URL: <span Class="emphasis"><a href="http://www.openssl.org/docs/apps/ciphers.html">http://www.openssl.org/docs/apps/ciphers.html</a></span>
-<p class="level1">For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5', &acute;rsa_aes_128_sha&acute;, etc. With NSS you don't add/remove ciphers. If one uses this option then all known ciphers are disabled and only those passed in are enabled.
-<p class="level1">You'll find more details about the NSS cipher lists on this URL: <span Class="emphasis"><a href="http://directory.fedora.redhat.com/docs/mod_nss.html">http://directory.fedora.redhat.com/docs/mod_nss.html</a>#Directives</span>
-<p class="level1">
-<p class="level0"><a name="CURLOPTSSLSESSIONIDCACHE"></a><span class="nroffip">CURLOPT_SSL_SESSIONID_CACHE</span>
-<p class="level1">Pass a long set to 0 to disable libcurl's use of SSL session-ID caching. Set this to 1 to enable it. By default all transfers are done using the cache. While nothing ever should get hurt by attempting to reuse SSL session-IDs, there seem to be broken SSL implementations in the wild that may require you to disable this in order for you to succeed. (Added in 7.16.0)
-<p class="level0"><a name="CURLOPTKRBLEVEL"></a><span class="nroffip">CURLOPT_KRBLEVEL</span>
-<p class="level1">Pass a char * as parameter. Set the kerberos security level for FTP; this also enables kerberos awareness. This is a string, 'clear', 'safe', 'confidential' or 'private'. If the string is set but doesn't match one of these, 'private' will be used. Set the string to NULL to disable kerberos support for FTP.
-<p class="level1">(This option was known as CURLOPT_KRB4LEVEL up to 7.16.3) <a name="SSH"></a><h2 class="nroffsh">SSH OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTSSHAUTHTYPES"></a><span class="nroffip">CURLOPT_SSH_AUTH_TYPES</span>
-<p class="level1">Pass a long set to a bitmask consisting of one or more of CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST, CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one. (Added in 7.16.1)
-<p class="level0"><a name="CURLOPTSSHHOSTPUBLICKEYMD5"></a><span class="nroffip">CURLOPT_SSH_HOST_PUBLIC_KEY_MD5</span>
-<p class="level1">Pass a char * pointing to a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, and libcurl will reject the connection to the host unless the md5sums match. This option is only for SCP and SFTP transfers. (Added in 7.17.1)
-<p class="level0"><a name="CURLOPTSSHPUBLICKEYFILE"></a><span class="nroffip">CURLOPT_SSH_PUBLIC_KEYFILE</span>
-<p class="level1">Pass a char * pointing to a file name for your public key. If not used, libcurl defaults to using <span Class="bold">~/.ssh/id_dsa.pub</span>. (Added in 7.16.1)
-<p class="level0"><a name="CURLOPTSSHPRIVATEKEYFILE"></a><span class="nroffip">CURLOPT_SSH_PRIVATE_KEYFILE</span>
-<p class="level1">Pass a char * pointing to a file name for your private key. If not used, libcurl defaults to using <span Class="bold">~/.ssh/id_dsa</span>. If the file is password-protected, set the password with <a class="emphasis" href="#CURLOPTKEYPASSWD">CURLOPT_KEYPASSWD</a>. (Added in 7.16.1)
-<p class="level0"><a name="CURLOPTSSHKNOWNHOSTS"></a><span class="nroffip">CURLOPT_SSH_KNOWNHOSTS</span>
-<p class="level1">Pass a pointer to a zero terminated string holding the file name of the known_host file to use. The known_hosts file should use the OpenSSH file format as supported by libssh2. If this file is specified, libcurl will only accept connections with hosts that are known and present in that file, with a matching public key. Use <a class="emphasis" href="#CURLOPTSSHKEYFUNCTION">CURLOPT_SSH_KEYFUNCTION</a> to alter the default behavior on host and key (mis)matching. (Added in 7.19.6)
-<p class="level0"><a name="CURLOPTSSHKEYFUNCTION"></a><span class="nroffip">CURLOPT_SSH_KEYFUNCTION</span>
-<p class="level1">Pass a pointer to a curl_sshkeycallback function. It gets called when the known_host matching has been done, to allow the application to act and decide for libcurl how to proceed. It gets passed the CURL handle, the key from the known_hosts file, the key from the remote site, info from libcurl on the matching status and a custom pointer (set with <a class="emphasis" href="#CURLOPTSSHKEYDATA">CURLOPT_SSH_KEYDATA</a>). It MUST return one of the following return codes to tell libcurl how to act:
-<p class="level2">
-<p class="level1"><a name="CURLKHSTATFINEADDTOFILE"></a><span class="nroffip">CURLKHSTAT_FINE_ADD_TO_FILE</span>
-<p class="level2">The host+key is accepted and libcurl will append it to the known_hosts file before continuing with the connection. This will also add the host+key combo to the known_host pool kept in memory if it wasn't already present there. The adding of data to the file is done by completely replacing the file with a new copy, so the permissions of the file must allow this.
-<p class="level1"><a name="CURLKHSTATFINE"></a><span class="nroffip">CURLKHSTAT_FINE</span>
-<p class="level2">The host+key is accepted libcurl will continue with the connection. This will also add the host+key combo to the known_host pool kept in memory if it wasn't already present there.
-<p class="level1"><a name="CURLKHSTATREJECT"></a><span class="nroffip">CURLKHSTAT_REJECT</span>
-<p class="level2">The host+key is rejected. libcurl will deny the connection to continue and it will be closed.
-<p class="level1"><a name="CURLKHSTATDEFER"></a><span class="nroffip">CURLKHSTAT_DEFER</span>
-<p class="level2">The host+key is rejected, but the SSH connection is asked to be kept alive. This feature could be used when the app wants to somehow return back and act on the host+key situation and then retry without needing the overhead of setting it up from scratch again.
-<p class="level1">&nbsp;(Added in 7.19.6)
-<p class="level0"><a name="CURLOPTSSHKEYDATA"></a><span class="nroffip">CURLOPT_SSH_KEYDATA</span>
-<p class="level1">Pass a void * as parameter. This pointer will be passed along verbatim to the callback set with <a class="emphasis" href="#CURLOPTSSHKEYFUNCTION">CURLOPT_SSH_KEYFUNCTION</a>. (Added in 7.19.6) <a name="OTHER"></a><h2 class="nroffsh">OTHER OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTPRIVATE"></a><span class="nroffip">CURLOPT_PRIVATE</span>
-<p class="level1">Pass a void * as parameter, pointing to data that should be associated with this curl handle. The pointer can subsequently be retrieved using <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with the CURLINFO_PRIVATE option. libcurl itself does nothing with this data. (Added in 7.10.3)
-<p class="level0"><a name="CURLOPTSHARE"></a><span class="nroffip">CURLOPT_SHARE</span>
-<p class="level1">Pass a share handle as a parameter. The share handle must have been created by a previous call to <a class="emphasis" href="./curl_share_init.html">curl_share_init(3)</a>. Setting this option, will make this curl handle use the data from the shared handle instead of keeping the data to itself. This enables several curl handles to share data. If the curl handles are used simultaneously in multiple threads, you <span Class="bold">MUST</span> use the locking methods in the share handle. See <a class="emphasis" href="./curl_share_setopt.html">curl_share_setopt(3)</a> for details.
-<p class="level1">If you add a share that is set to share cookies, your easy handle will use that cookie cache and get the cookie engine enabled. If you unshare an object that was using cookies (or change to another object that doesn't share cookies), the easy handle will get its cookie engine disabled.
-<p class="level1">Data that the share object is not set to share will be dealt with the usual way, as if no share was used.
-<p class="level0"><a name="CURLOPTNEWFILEPERMS"></a><span class="nroffip">CURLOPT_NEW_FILE_PERMS</span>
-<p class="level1">Pass a long as a parameter, containing the value of the permissions that will be assigned to newly created files on the remote server. The default value is <span Class="emphasis">0644</span>, but any valid value can be used. The only protocols that can use this are <span Class="emphasis">sftp://</span>, <span Class="emphasis">scp://</span>, and <span Class="emphasis">file://</span>. (Added in 7.16.4)
-<p class="level0"><a name="CURLOPTNEWDIRECTORYPERMS"></a><span class="nroffip">CURLOPT_NEW_DIRECTORY_PERMS</span>
-<p class="level1">Pass a long as a parameter, containing the value of the permissions that will be assigned to newly created directories on the remote server. The default value is <span Class="emphasis">0755</span>, but any valid value can be used. The only protocols that can use this are <span Class="emphasis">sftp://</span>, <span Class="emphasis">scp://</span>, and <span Class="emphasis">file://</span>. (Added in 7.16.4) <a name="TELNET"></a><h2 class="nroffsh">TELNET OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTTELNETOPTIONS"></a><span class="nroffip">CURLOPT_TELNETOPTIONS</span>
-<p class="level1">Provide a pointer to a curl_slist with variables to pass to the telnet negotiations. The variables should be in the format &lt;option=value&gt;. libcurl supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'. See the TELNET standard for details. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLE_OK (zero) means that the option was set properly, non-zero means an error occurred as <span Class="emphasis">&lt;curl/curl.h&gt;</span> defines. See the <span Class="emphasis">libcurl-errors(3)</span> man page for the full list with descriptions.
-<p class="level0">If you try to set an option that libcurl doesn't know about, perhaps because the library is too old to support it or the option was removed in a recent version, this function will return <span Class="emphasis">CURLE_FAILED_INIT</span>. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <a class="manpage" href="./curl_easy_cleanup.html"> curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_reset.html"> curl_easy_reset (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_setopt.pdf b/docs/libcurl/curl_easy_setopt.pdf
deleted file mode 100644
index 9723fb1b..00000000
--- a/docs/libcurl/curl_easy_setopt.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_strerror.3 b/docs/libcurl/curl_easy_strerror.3
index 1afbd12b..557d4676 100644
--- a/docs/libcurl/curl_easy_strerror.3
+++ b/docs/libcurl/curl_easy_strerror.3
@@ -1,16 +1,37 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_easy_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_easy_strerror - return string describing error code
.SH SYNOPSIS
-.nf
-.B #include <curl/curl.h>
-.BI "const char *curl_easy_strerror(CURLcode " errornum ");"
+#include <curl/curl.h>
+
+const char *curl_easy_strerror(CURLcode errornum);
.SH DESCRIPTION
-The curl_easy_strerror() function returns a string describing the CURLcode
-error code passed in the argument \fIerrornum\fP.
+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.
.SH AVAILABILITY
This function was added in libcurl 7.12.0
.SH RETURN VALUE
diff --git a/docs/libcurl/curl_easy_strerror.html b/docs/libcurl/curl_easy_strerror.html
deleted file mode 100644
index 1dcca6c7..00000000
--- a/docs/libcurl/curl_easy_strerror.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_strerror man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_strerror - return string describing error code <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<span Class="bold">const char *curl_easy_strerror(CURLcode errornum );</span>
-</pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">The curl_easy_strerror() function returns a string describing the CURLcode error code passed in the argument <span Class="emphasis">errornum</span>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.12.0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">libcurl-errors (3)</span> <a class="manpage" href="./curl_multi_strerror.html"> curl_multi_strerror (3)</a> <a class="manpage" href="./curl_share_strerror.html"> curl_share_strerror (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_strerror.pdf b/docs/libcurl/curl_easy_strerror.pdf
deleted file mode 100644
index ae50e6e5..00000000
--- a/docs/libcurl/curl_easy_strerror.pdf
+++ /dev/null
@@ -1,108 +0,0 @@
-%PDF-1.4
-%Çì¢
-5 0 obj
-<</Length 6 0 R/Filter /FlateDecode>>
-stream
-xœ•Tmo›0þί8iÕpmc^¬M“hM™Ò¤Kh¥**JhÊ”–UÛ¯ßÙBšTÕ„Äœïyîyîü ”0 êjŸÉÚ8ú°,
-ßñ^ÏÓÐ>’5œE¨…èÁhö1ð9øB@´6ó‰Ë z1æfR«»4.ÿÜ•U‘Ŧ¸5[ VÙ½údÙÜ¥„Rß¼ˆó:^ÁñÖ¯è‡aS™„(At‰èDºŠ€ãA42Ìqh}DÂø•¹Ä•’Š†y1°¢ß=ºœA}°WŸ©by„$ØP¤U]ä€+Y¾„EZ&Ev¯^›€d³H›Ì=*6r±™G =»O.gÃÙ.¬¥Û‚›²<YÕ‹¾(§ê‡<~Uá*`dD'(à&/+HãNöxZ, ”¹ÌD>Ý»’ëüj:Òì”f§SF·F.¡^#Ë\ï®’ÞÁ]y½nÃ;šá­„·ÖçÃJ¹+ ïWûm0;Ÿ/£ád¼¯ø®`J<­wô˜5ûâ¡Î“*Ûä­ü%ÄG¨pÿ¶Êžð—eº€,×q¡x”ÆóÛJ–µ­ÖìvqëÃ:Í«†s'çÄ}Oª®@Ÿe-ÑŒ¸ApЪ¶ôˆ£B;Ù0
--Jx ¡Úª[»ÔsÙÖ€á(<Ž†Ñ;°ØçŽ@”~/ÏQܬÜÉøbI"%÷3F-‹FžvúÀ'ŒÚsþXÏÍé ºšŽáÚbŽ Òcf8ºè]J%]ä¡ÙføÔ•Ãñ™”m9›,¯Òª šû7-6€ÿÖYWH®1›ö:Eo¼G³É[ã57Û2m=!>‘ðÐÀò•}n@˜ ]³«ãæÓ~N„ô¼mD{¦­ëU•5sˆ™¥Ã_Íá+@êÊà?AJû]þnꩼ‹&¸ôûhº+¹t•ž(¦ØSH7‚…Òr×ĹŸ
-à”
-XxÛÓ”©4ƒÈø‰×?­…›endstream
-endobj
-6 0 obj
-721
-endobj
-4 0 obj
-<</Type/Page/MediaBox [0 0 612 792]
-/Rotate 0/Parent 3 0 R
-/Resources<</ProcSet[/PDF /Text]
-/ExtGState 11 0 R
-/Font 12 0 R
->>
-/Contents 5 0 R
->>
-endobj
-3 0 obj
-<< /Type /Pages /Kids [
-4 0 R
-] /Count 1
->>
-endobj
-1 0 obj
-<</Type /Catalog /Pages 3 0 R
-/Metadata 13 0 R
->>
-endobj
-7 0 obj
-<</Type/ExtGState
-/OPM 1>>endobj
-11 0 obj
-<</R7
-7 0 R>>
-endobj
-12 0 obj
-<</R10
-10 0 R/R9
-9 0 R/R8
-8 0 R>>
-endobj
-10 0 obj
-<</BaseFont/Times-Italic/Type/Font
-/Subtype/Type1>>
-endobj
-9 0 obj
-<</BaseFont/Times-Bold/Type/Font
-/Subtype/Type1>>
-endobj
-8 0 obj
-<</BaseFont/Times-Roman/Type/Font
-/Subtype/Type1>>
-endobj
-13 0 obj
-<</Type/Metadata
-/Subtype/XML/Length 1321>>stream
-<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
-<?adobe-xap-filters esc="CRLF"?>
-<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
-<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
-<rdf:Description rdf:about='3542fb5a-0e69-11eb-0000-1db77fb63b0c' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.71'/>
-<rdf:Description rdf:about='3542fb5a-0e69-11eb-0000-1db77fb63b0c' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-10-13T00:04:18+02:00</xmp:ModifyDate>
-<xmp:CreateDate>2010-10-13T00:04:18+02:00</xmp:CreateDate>
-<xmp:CreatorTool>groff version 1.20.1</xmp:CreatorTool></rdf:Description>
-<rdf:Description rdf:about='3542fb5a-0e69-11eb-0000-1db77fb63b0c' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='3542fb5a-0e69-11eb-0000-1db77fb63b0c'/>
-<rdf:Description rdf:about='3542fb5a-0e69-11eb-0000-1db77fb63b0c' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
-</rdf:RDF>
-</x:xmpmeta>
-
-
-<?xpacket end='w'?>
-endstream
-endobj
-2 0 obj
-<</Producer(GPL Ghostscript 8.71)
-/CreationDate(D:20101013000418+02'00')
-/ModDate(D:20101013000418+02'00')
-/Creator(groff version 1.20.1)>>endobj
-xref
-0 14
-0000000000 65535 f
-0000001044 00000 n
-0000002827 00000 n
-0000000985 00000 n
-0000000825 00000 n
-0000000015 00000 n
-0000000806 00000 n
-0000001109 00000 n
-0000001363 00000 n
-0000001298 00000 n
-0000001230 00000 n
-0000001150 00000 n
-0000001180 00000 n
-0000001429 00000 n
-trailer
-<< /Size 14 /Root 1 0 R /Info 2 0 R
-/ID [<EEB2A5763C0B6FFAD180418B9853F3B5><EEB2A5763C0B6FFAD180418B9853F3B5>]
->>
-startxref
-2981
-%%EOF
diff --git a/docs/libcurl/curl_easy_unescape.3 b/docs/libcurl/curl_easy_unescape.3
index 9b03fd0f..23ce9c3c 100644
--- a/docs/libcurl/curl_easy_unescape.3
+++ b/docs/libcurl/curl_easy_unescape.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,4 +48,4 @@ Added in 7.15.4 and replaces the old \fIcurl_unescape(3)\fP function.
.SH RETURN VALUE
A pointer to a zero terminated string or NULL if it failed.
.SH "SEE ALSO"
-.I curl_easy_escape(3), curl_free(3), RFC 2396
+.BR curl_easy_escape "(3), " curl_free "(3)," RFC 3986
diff --git a/docs/libcurl/curl_easy_unescape.html b/docs/libcurl/curl_easy_unescape.html
deleted file mode 100644
index 38448625..00000000
--- a/docs/libcurl/curl_easy_unescape.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_easy_unescape man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_unescape - URL decodes the given string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">char *curl_easy_unescape( CURL * curl , char * url , int inlength</span> <span Class="bold">, int * outlength );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function converts the given URL encoded input string to a "plain string" and returns that in an allocated memory area. All input characters that are URL encoded (%XX where XX is a two-digit hexadecimal number) are converted to their binary versions.
-<p class="level0">If the <span Class="bold">length</span> argument is set to 0 (zero), <a class="emphasis" href="./curl_easy_unescape.html">curl_easy_unescape(3)</a> will use strlen() on the input <span Class="emphasis">url</span> string to find out the size.
-<p class="level0">If <span Class="bold">outlength</span> is non-NULL, the function will write the length of the returned string in the integer it points to. This allows an escaped string containing %00 to still get used properly after unescaping.
-<p class="level0">You must <a class="emphasis" href="./curl_free.html">curl_free(3)</a> the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Added in 7.15.4 and replaces the old <a class="emphasis" href="./curl_unescape.html">curl_unescape(3)</a> function. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="emphasis">curl_easy_escape(3), curl_free(3), RFC 2396</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_unescape.pdf b/docs/libcurl/curl_easy_unescape.pdf
deleted file mode 100644
index 9c06ecd5..00000000
--- a/docs/libcurl/curl_easy_unescape.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_escape.3 b/docs/libcurl/curl_escape.3
index 59906150..75fd51f2 100644
--- a/docs/libcurl/curl_escape.3
+++ b/docs/libcurl/curl_escape.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual"
.SH NAME
curl_escape - URL encodes the given string
diff --git a/docs/libcurl/curl_escape.html b/docs/libcurl/curl_escape.html
deleted file mode 100644
index 4e1c6ffb..00000000
--- a/docs/libcurl/curl_escape.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_escape man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_escape - URL encodes the given string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">char *curl_escape( char * url , int length );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Obsolete function. Use <a class="emphasis" href="./curl_easy_escape.html">curl_easy_escape(3)</a> instead!
-<p class="level0">This function will convert the given input string to an URL encoded string and return that as a new allocated string. All input characters that are not a-z, A-Z or 0-9 will be converted to their "URL escaped" version (%NN where NN is a two-digit hexadecimal number).
-<p class="level0">If the 'length' argument is set to 0, curl_escape() will use strlen() on the input 'url' string to find out the size.
-<p class="level0">You must curl_free() the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Since 7.15.4, <a class="emphasis" href="./curl_easy_escape.html">curl_easy_escape(3)</a> should be used. This function will be removed in a future release. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_unescape.html">curl_unescape (3)</a> <a class="manpage" href="./curl_free.html"> curl_free (3)</a> <span Class="manpage"> RFC 2396</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_escape.pdf b/docs/libcurl/curl_escape.pdf
deleted file mode 100644
index f8b8613a..00000000
--- a/docs/libcurl/curl_escape.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_formadd.3 b/docs/libcurl/curl_formadd.3
index 06757ed0..3e48149e 100644
--- a/docs/libcurl/curl_formadd.3
+++ b/docs/libcurl/curl_formadd.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_formadd 3 "24 June 2002" "libcurl 7.9.8" "libcurl Manual"
.SH NAME
curl_formadd - add a section to a multipart/formdata HTTP POST
@@ -12,21 +30,22 @@ curl_formadd - add a section to a multipart/formdata HTTP POST
.ad
.SH DESCRIPTION
curl_formadd() is used to append sections when building a multipart/formdata
-HTTP POST (sometimes referred to as RFC2388-style posts). Append one section at
-a time until you've added all the sections you want included and then you pass
-the \fIfirstitem\fP pointer as parameter to \fBCURLOPT_HTTPPOST\fP.
-\fIlastitem\fP is set after each call and on repeated invokes it should be
-left as set to allow repeated invokes to find the end of the list faster.
+HTTP POST (sometimes referred to as RFC2388-style posts). Append one section
+at a time until you've added all the sections you want included and then you
+pass the \fIfirstitem\fP pointer as parameter to \fBCURLOPT_HTTPPOST(3)\fP.
+\fIlastitem\fP is set after each \fIcurl_formadd(3)\fP call and on repeated
+invokes it should be left as set to allow repeated invokes to find the end of
+the list faster.
After the \fIlastitem\fP pointer follow the real arguments.
-The pointers \fI*firstitem\fP and \fI*lastitem\fP should both be pointing to
+The pointers \fIfirstitem\fP and \fIlastitem\fP should both be pointing to
NULL in the first call to this function. All list-data will be allocated by
-the function itself. You must call \fIcurl_formfree(3)\fP after the form post
-has been done to free the resources.
+the function itself. You must call \fIcurl_formfree(3)\fP on the
+\fIfirstitem\fP after the form post has been done to free the resources.
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
-You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
+You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
First, there are some basics you need to understand about multipart/formdata
posts. Each part consists of at least a NAME and a CONTENTS part. If the part
@@ -67,6 +86,10 @@ 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
@@ -102,12 +125,13 @@ to the buffer to be uploaded. This buffer must not be freed until after
is used in combination with \fICURLFORM_BUFFER\fP. The parameter is a
long which gives the length of the buffer.
.IP CURLFORM_STREAM
-Tells libcurl to use the \fICURLOPT_READFUNCTION\fP callback to get data. The
-parameter you pass to \fICURLFORM_STREAM\fP is the pointer passed on to the
-read callback's fourth argument. If you want the part to look like a file
-upload one, set the \fICURLFORM_FILENAME\fP parameter as well. Note that when
-using \fICURLFORM_STREAM\fP, \fICURLFORM_CONTENTSLENGTH\fP must also be set
-with the total expected length of the part. (Option added in libcurl 7.18.2)
+Tells libcurl to use the \fICURLOPT_READFUNCTION(3)\fP callback to get
+data. The parameter you pass to \fICURLFORM_STREAM\fP is the pointer passed on
+to the read callback's fourth argument. If you want the part to look like a
+file upload one, set the \fICURLFORM_FILENAME\fP parameter as well. Note that
+when using \fICURLFORM_STREAM\fP, \fICURLFORM_CONTENTSLENGTH\fP must also be
+set with the total expected length of the part. (Option added in libcurl
+7.18.2)
.IP CURLFORM_ARRAY
Another possibility to send options to curl_formadd() is the
\fBCURLFORM_ARRAY\fP option, that passes a struct curl_forms array pointer as
@@ -123,7 +147,7 @@ the POST occurs, if you free it before the post completes you may experience
problems.
When you've passed the HttpPost pointer to \fIcurl_easy_setopt(3)\fP (using
-the \fICURLOPT_HTTPPOST\fP option), you must not free the list until after
+the \fICURLOPT_HTTPPOST(3)\fP option), you must not free the list until after
you've called \fIcurl_easy_cleanup(3)\fP for the curl handle.
See example below.
diff --git a/docs/libcurl/curl_formadd.html b/docs/libcurl/curl_formadd.html
deleted file mode 100644
index f6557db6..00000000
--- a/docs/libcurl/curl_formadd.html
+++ /dev/null
@@ -1,161 +0,0 @@
-<html><head>
-<title>curl_formadd man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_formadd - add a section to a multipart/formdata HTTP POST <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURLFORMcode curl_formadd(struct curl_httppost ** firstitem,</span> <span Class="bold">struct curl_httppost ** lastitem, ...);</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_formadd() is used to append sections when building a multipart/formdata HTTP POST (sometimes referred to as RFC2388-style posts). Append one section at a time until you've added all the sections you want included and then you pass the <span Class="emphasis">firstitem</span> pointer as parameter to <span Class="bold">CURLOPT_HTTPPOST</span>. <span Class="emphasis">lastitem</span> is set after each call and on repeated invokes it should be left as set to allow repeated invokes to find the end of the list faster.
-<p class="level0">After the <span Class="emphasis">lastitem</span> pointer follow the real arguments.
-<p class="level0">The pointers <span Class="emphasis">*firstitem</span> and <span Class="emphasis">*lastitem</span> should both be pointing to NULL in the first call to this function. All list-data will be allocated by the function itself. You must call <a class="emphasis" href="./curl_formfree.html">curl_formfree(3)</a> after the form post has been done to free the resources.
-<p class="level0">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <span Class="emphasis">CURLOPT_HTTPHEADER</span> as usual.
-<p class="level0">First, there are some basics you need to understand about multipart/formdata posts. Each part consists of at least a NAME and a CONTENTS part. If the part is made for file upload, there are also a stored CONTENT-TYPE and a FILENAME. Below, we'll discuss what options you use to set these properties in the parts you want to add to your post.
-<p class="level0">The options listed first are for making normal parts. The options from <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a> through <a class="emphasis" href="#CURLFORMBUFFERLENGTH">CURLFORM_BUFFERLENGTH</a> are for file upload parts. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLFORMCOPYNAME"></a><span class="nroffip">CURLFORM_COPYNAME</span>
-<p class="level1">followed by a string which provides the <span Class="emphasis">name</span> of this part. libcurl copies the string so your application doesn't need to keep it around after this function call. If the name isn't NUL-terminated, or if you'd like it to contain zero bytes, you must set its length with <span Class="bold">CURLFORM_NAMELENGTH</span>. The copied data will be freed by <a class="emphasis" href="./curl_formfree.html">curl_formfree(3)</a>.
-<p class="level0"><a name="CURLFORMPTRNAME"></a><span class="nroffip">CURLFORM_PTRNAME</span>
-<p class="level1">followed by a string which provides the <span Class="emphasis">name</span> of this part. libcurl will use the pointer and refer to the data in your application, so you must make sure it remains until curl no longer needs it. If the name isn't NUL-terminated, or if you'd like it to contain zero bytes, you must set its length with <span Class="bold">CURLFORM_NAMELENGTH</span>.
-<p class="level0"><a name="CURLFORMCOPYCONTENTS"></a><span class="nroffip">CURLFORM_COPYCONTENTS</span>
-<p class="level1">followed by a pointer to the contents of this part, the actual data to send away. libcurl copies the provided data, so your application doesn't need to keep it around after this function call. If the data isn't null terminated, or if you'd like it to contain zero bytes, you must set the length of the name with <a class="bold" href="#CURLFORMCONTENTSLENGTH">CURLFORM_CONTENTSLENGTH</a>. The copied data will be freed by <a class="emphasis" href="./curl_formfree.html">curl_formfree(3)</a>.
-<p class="level0"><a name="CURLFORMPTRCONTENTS"></a><span class="nroffip">CURLFORM_PTRCONTENTS</span>
-<p class="level1">followed by a pointer to the contents of this part, the actual data to send away. libcurl will use the pointer and refer to the data in your application, so you must make sure it remains until curl no longer needs it. If the data isn't NUL-terminated, or if you'd like it to contain zero bytes, you must set its length with <a class="bold" href="#CURLFORMCONTENTSLENGTH">CURLFORM_CONTENTSLENGTH</a>.
-<p class="level0"><a name="CURLFORMCONTENTSLENGTH"></a><span class="nroffip">CURLFORM_CONTENTSLENGTH</span>
-<p class="level1">followed by a long giving the length of the contents. Note that for <a class="emphasis" href="#CURLFORMSTREAM">CURLFORM_STREAM</a> contents, this option is mandatory.
-<p class="level0"><a name="CURLFORMFILECONTENT"></a><span class="nroffip">CURLFORM_FILECONTENT</span>
-<p class="level1">followed by a filename, causes that file to be read and its contents used as data in this part. This part does <span Class="emphasis">not</span> automatically become a file upload part simply because its data was read from a file.
-<p class="level0"><a name="CURLFORMFILE"></a><span class="nroffip">CURLFORM_FILE</span>
-<p class="level1">followed by a filename, makes this part a file upload part. It sets the <span Class="emphasis">filename</span> field to the basename of the provided filename, it reads the contents of the file and passes them as data and sets the content-type if the given file match one of the internally known file extensions. For <a class="bold" href="#CURLFORMFILE">CURLFORM_FILE</a> the user may send one or more files in one part by providing multiple <a class="bold" href="#CURLFORMFILE">CURLFORM_FILE</a> arguments each followed by the filename (and each <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a> is allowed to have a <a class="emphasis" href="#CURLFORMCONTENTTYPE">CURLFORM_CONTENTTYPE</a>).
-<p class="level0"><a name="CURLFORMCONTENTTYPE"></a><span class="nroffip">CURLFORM_CONTENTTYPE</span>
-<p class="level1">is used in combination with <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a>. Followed by a pointer to a string which provides the content-type for this part, possibly instead of an internally chosen one.
-<p class="level0"><a name="CURLFORMFILENAME"></a><span class="nroffip">CURLFORM_FILENAME</span>
-<p class="level1">is used in combination with <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a>. Followed by a pointer to a string, it tells libcurl to use the given string as the <span Class="emphasis">filename</span> in the file upload part instead of the actual file name.
-<p class="level0"><a name="CURLFORMBUFFER"></a><span class="nroffip">CURLFORM_BUFFER</span>
-<p class="level1">is used for custom file upload parts without use of <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a>. It tells libcurl that the file contents are already present in a buffer. The parameter is a string which provides the <span Class="emphasis">filename</span> field in the content header.
-<p class="level0"><a name="CURLFORMBUFFERPTR"></a><span class="nroffip">CURLFORM_BUFFERPTR</span>
-<p class="level1">is used in combination with <a class="emphasis" href="#CURLFORMBUFFER">CURLFORM_BUFFER</a>. The parameter is a pointer to the buffer to be uploaded. This buffer must not be freed until after <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> is called. You must also use <a class="emphasis" href="#CURLFORMBUFFERLENGTH">CURLFORM_BUFFERLENGTH</a> to set the number of bytes in the buffer.
-<p class="level0"><a name="CURLFORMBUFFERLENGTH"></a><span class="nroffip">CURLFORM_BUFFERLENGTH</span>
-<p class="level1">is used in combination with <a class="emphasis" href="#CURLFORMBUFFER">CURLFORM_BUFFER</a>. The parameter is a long which gives the length of the buffer.
-<p class="level0"><a name="CURLFORMSTREAM"></a><span class="nroffip">CURLFORM_STREAM</span>
-<p class="level1">Tells libcurl to use the <span Class="emphasis">CURLOPT_READFUNCTION</span> callback to get data. The parameter you pass to <a class="emphasis" href="#CURLFORMSTREAM">CURLFORM_STREAM</a> is the pointer passed on to the read callback's fourth argument. If you want the part to look like a file upload one, set the <a class="emphasis" href="#CURLFORMFILENAME">CURLFORM_FILENAME</a> parameter as well. Note that when using <a class="emphasis" href="#CURLFORMSTREAM">CURLFORM_STREAM</a>, <a class="emphasis" href="#CURLFORMCONTENTSLENGTH">CURLFORM_CONTENTSLENGTH</a> must also be set with the total expected length of the part. (Option added in libcurl 7.18.2)
-<p class="level0"><a name="CURLFORMARRAY"></a><span class="nroffip">CURLFORM_ARRAY</span>
-<p class="level1">Another possibility to send options to curl_formadd() is the <a class="bold" href="#CURLFORMARRAY">CURLFORM_ARRAY</a> option, that passes a struct curl_forms array pointer as its value. Each curl_forms structure element has a CURLformoption and a char pointer. The final element in the array must be a CURLFORM_END. All available options can be used in an array, except the CURLFORM_ARRAY option itself! The last argument in such an array must always be <span Class="bold">CURLFORM_END</span>.
-<p class="level0"><a name="CURLFORMCONTENTHEADER"></a><span class="nroffip">CURLFORM_CONTENTHEADER</span>
-<p class="level1">specifies extra headers for the form POST section. This takes a curl_slist prepared in the usual way using <span Class="bold">curl_slist_append</span> and appends the list of headers to those libcurl automatically generates. The list must exist while the POST occurs, if you free it before the post completes you may experience problems.
-<p class="level1">When you've passed the HttpPost pointer to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> (using the <span Class="emphasis">CURLOPT_HTTPPOST</span> option), you must not free the list until after you've called <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> for the curl handle.
-<p class="level1">See example below. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">0 means everything was ok, non-zero means an error occurred corresponding to a CURL_FORMADD_* constant defined in <span Class="emphasis">&lt;curl/curl.h&gt;</span> <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0"><pre>
-<p class="level0"><p class="level0">&nbsp;struct curl_httppost* post = NULL;
- &nbsp;struct curl_httppost* last = NULL;
- &nbsp;char namebuffer[] = "name buffer";
- &nbsp;long namelength = strlen(namebuffer);
- &nbsp;char buffer[] = "test buffer";
- &nbsp;char htmlbuffer[] = "&lt;HTML&gt;test buffer&lt;/HTML&gt;";
- &nbsp;long htmlbufferlength = strlen(htmlbuffer);
- &nbsp;struct curl_forms forms[3];
- &nbsp;char file1[] = "my-face.jpg";
- &nbsp;char file2[] = "your-face.jpg";
- &nbsp;/* add null character into htmlbuffer, to demonstrate that
- &nbsp; transfers of buffers containing null characters actually work
- &nbsp;*/
- &nbsp;htmlbuffer[8] = '\0';
- <p class="level0">&nbsp;/* Add simple name/content section */
- &nbsp;curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
- &nbsp; CURLFORM_COPYCONTENTS, "content", CURLFORM_END);
- <p class="level0">&nbsp;/* Add simple name/content/contenttype section */
- &nbsp;curl_formadd(&post, &last, CURLFORM_COPYNAME, "htmlcode",
- &nbsp; CURLFORM_COPYCONTENTS, "&lt;HTML&gt;&lt;/HTML&gt;",
- &nbsp; CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
- <p class="level0">&nbsp;/* Add name/ptrcontent section */
- &nbsp;curl_formadd(&post, &last, CURLFORM_COPYNAME, "name_for_ptrcontent",
- &nbsp; CURLFORM_PTRCONTENTS, buffer, CURLFORM_END);
- <p class="level0">&nbsp;/* Add ptrname/ptrcontent section */
- &nbsp;curl_formadd(&post, &last, CURLFORM_PTRNAME, namebuffer,
- &nbsp; CURLFORM_PTRCONTENTS, buffer, CURLFORM_NAMELENGTH,
- &nbsp; namelength, CURLFORM_END);
- <p class="level0">&nbsp;/* Add name/ptrcontent/contenttype section */
- &nbsp;curl_formadd(&post, &last, CURLFORM_COPYNAME, "html_code_with_hole",
- &nbsp; CURLFORM_PTRCONTENTS, htmlbuffer,
- &nbsp; CURLFORM_CONTENTSLENGTH, htmlbufferlength,
- &nbsp; CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
- <p class="level0">&nbsp;/* Add simple file section */
- &nbsp;curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
- &nbsp; CURLFORM_FILE, "my-face.jpg", CURLFORM_END);
- <p class="level0">&nbsp;/* Add file/contenttype section */
- &nbsp;curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
- &nbsp; CURLFORM_FILE, "my-face.jpg",
- &nbsp; CURLFORM_CONTENTTYPE, "image/jpeg", CURLFORM_END);
- <p class="level0">&nbsp;/* Add two file section */
- &nbsp;curl_formadd(&post, &last, CURLFORM_COPYNAME, "pictures",
- &nbsp; CURLFORM_FILE, "my-face.jpg",
- &nbsp; CURLFORM_FILE, "your-face.jpg", CURLFORM_END);
- <p class="level0">&nbsp;/* Add two file section using CURLFORM_ARRAY */
- &nbsp;forms[0].option = CURLFORM_FILE;
- &nbsp;forms[0].value = file1;
- &nbsp;forms[1].option = CURLFORM_FILE;
- &nbsp;forms[1].value = file2;
- &nbsp;forms[2].option = CURLFORM_END;
- <p class="level0">&nbsp;/* Add a buffer to upload */
- &nbsp;curl_formadd(&post, &last,
- &nbsp; CURLFORM_COPYNAME, "name",
- &nbsp; CURLFORM_BUFFER, "data",
- &nbsp; CURLFORM_BUFFERPTR, record,
- &nbsp; CURLFORM_BUFFERLENGTH, record_length,
- &nbsp; CURLFORM_END);
- <p class="level0">&nbsp;/* no option needed for the end marker */
- &nbsp;curl_formadd(&post, &last, CURLFORM_COPYNAME, "pictures",
- &nbsp; CURLFORM_ARRAY, forms, CURLFORM_END);
- &nbsp;/* Add the content of a file as a normal post text value */
- &nbsp;curl_formadd(&post, &last, CURLFORM_COPYNAME, "filecontent",
- &nbsp; CURLFORM_FILECONTENT, ".bashrc", CURLFORM_END);
- &nbsp;/* Set the form info */
- &nbsp;curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);
- <p class="level0"></pre>
-<a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_formfree.html">curl_formfree (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_formadd.pdf b/docs/libcurl/curl_formadd.pdf
deleted file mode 100644
index b5b31a85..00000000
--- a/docs/libcurl/curl_formadd.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_formfree.3 b/docs/libcurl/curl_formfree.3
index 2fba295a..fd19491c 100644
--- a/docs/libcurl/curl_formfree.3
+++ b/docs/libcurl/curl_formfree.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_formfree 3 "6 April 2001" "libcurl 7.7.1" "libcurl Manual"
.SH NAME
curl_formfree - free a previously build multipart/formdata HTTP POST chain
@@ -13,6 +31,13 @@ curl_formfree - free a previously build multipart/formdata HTTP POST chain
curl_formfree() is used to clean up data previously built/appended with
\fIcurl_formadd(3)\fP. This must be called when the data has been used, which
typically means after \fIcurl_easy_perform(3)\fP has been called.
+
+The pointer to free is the same pointer you passed to the
+\fBCURLOPT_HTTPPOST(3)\fP option, which is the \fIfirstitem\fP pointer from
+the \fIcurl_formadd(3)\fP invoke(s).
+
+\fBform\fP is the pointer as returned from a previous call to
+\fIcurl_formadd(3)\fP and may be NULL.
.SH RETURN VALUE
None
.SH "SEE ALSO"
diff --git a/docs/libcurl/curl_formfree.html b/docs/libcurl/curl_formfree.html
deleted file mode 100644
index 73837b08..00000000
--- a/docs/libcurl/curl_formfree.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<html><head>
-<title>curl_formfree man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_formfree - free a previously build multipart/formdata HTTP POST chain <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">void curl_formfree(struct curl_httppost * form);</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_formfree() is used to clean up data previously built/appended with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. This must be called when the data has been used, which typically means after <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> has been called. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">None <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_formadd.html">curl_formadd (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_formfree.pdf b/docs/libcurl/curl_formfree.pdf
deleted file mode 100644
index f03fae9c..00000000
--- a/docs/libcurl/curl_formfree.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_formget.3 b/docs/libcurl/curl_formget.3
index b0dd8fea..b5262213 100644
--- a/docs/libcurl/curl_formget.3
+++ b/docs/libcurl/curl_formget.3
@@ -1,28 +1,49 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_formget 3 "20 June 2006" "libcurl 7.15.5" "libcurl Manual"
.SH NAME
curl_formget - serialize a previously built multipart/formdata HTTP POST chain
.SH SYNOPSIS
+.nf
.B #include <curl/curl.h>
-.sp
-.BI "void curl_formget(struct curl_httppost *" form, " void *" arg,
-.BI " curl_formget_callback " append ");"
-.ad
+
+void curl_formget(struct curl_httppost * form, void *userp,
+ curl_formget_callback append );
.SH DESCRIPTION
curl_formget() is used to serialize data previously built/appended with
-\fIcurl_formadd(3)\fP. Accepts a void pointer as second argument which will be
-passed to the curl_formget_callback function.
+\fIcurl_formadd(3)\fP. Accepts a void pointer as second argument named
+\fIuserp\fP which will be passed as the first argument to the
+curl_formget_callback function.
-.BI "typedef size_t (*curl_formget_callback)(void *" arg, " const char *" buf,
+.BI "typedef size_t (*curl_formget_callback)(void *" userp, " const char *" buf,
.BI " size_t " len ");"
-.nf
The curl_formget_callback will be executed for each part of the HTTP POST
-chain. The void *arg pointer will be the one passed as second argument to
-curl_formget(). The character buffer passed to it must not be freed. The
+chain. The character buffer passed to the callback must not be freed. The
callback should return the buffer length passed to it on success.
+
+If the \fBCURLFORM_STREAM\fP option is used in the formpost, it will prevent
+\fIcurl_formget(3)\fP from working until you've performed the actual HTTP
+request as only then will libcurl get the actual read callback to use!
.SH RETURN VALUE
0 means everything was ok, non-zero means an error occurred
.SH EXAMPLE
@@ -34,6 +55,7 @@ callback should return the buffer length passed to it on success.
(*(size_t *) arg) += len;
return len;
}
+
size_t print_httppost(struct curl_httppost *post)
{
size_t total_size = 0;
diff --git a/docs/libcurl/curl_formget.html b/docs/libcurl/curl_formget.html
deleted file mode 100644
index 0564f61b..00000000
--- a/docs/libcurl/curl_formget.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<html><head>
-<title>curl_formget man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_formget - serialize a previously built multipart/formdata HTTP POST chain <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">void curl_formget(struct curl_httppost * form, void * arg,</span> <span Class="bold"> curl_formget_callback append );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_formget() is used to serialize data previously built/appended with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. Accepts a void pointer as second argument which will be passed to the curl_formget_callback function.
-<p class="level0"><span Class="bold">typedef size_t (*curl_formget_callback)(void * arg, const char * buf,</span> <span Class="bold"> size_t len );</span> <pre>
-<p class="level0"><p class="level0">The curl_formget_callback will be executed for each part of the HTTP POST
- chain. The void *arg pointer will be the one passed as second argument to
- curl_formget(). The character buffer passed to it must not be freed. The
- callback should return the buffer length passed to it on success.
- </pre>
-<a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">0 means everything was ok, non-zero means an error occurred <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0"><pre>
-<p class="level0"><p class="level0">&nbsp;size_t print_httppost_callback(void *arg, const char *buf, size_t len)
- &nbsp;{
- &nbsp; fwrite(buf, len, 1, stdout);
- &nbsp; (*(size_t *) arg) += len;
- &nbsp; return len;
- &nbsp;}
- &nbsp;size_t print_httppost(struct curl_httppost *post)
- &nbsp;{
- &nbsp; size_t total_size = 0;
- &nbsp; if(curl_formget(post, &total_size, print_httppost_callback)) {
- &nbsp; return (size_t) -1;
- &nbsp; }
- &nbsp; return total_size;
- &nbsp;}
- </pre>
-<a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.5 <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_formadd.html">curl_formadd (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_formget.pdf b/docs/libcurl/curl_formget.pdf
deleted file mode 100644
index 20120311..00000000
--- a/docs/libcurl/curl_formget.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_free.3 b/docs/libcurl/curl_free.3
index f8546935..9e5570fa 100644
--- a/docs/libcurl/curl_free.3
+++ b/docs/libcurl/curl_free.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_free 3 "12 Aug 2003" "libcurl 7.10" "libcurl Manual"
.SH NAME
curl_free - reclaim memory that has been obtained through a libcurl call
@@ -11,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
-curl_free() instead of free() to avoid anomalies that can result from
+\fIcurl_free(3)\fP instead of free() to avoid anomalies that can result from
differences in memory management between your application and libcurl.
.SH "SEE ALSO"
-.I curl_unescape(3)
+.BR curl_easy_unescape "(3), " curl_easy_escape "(3) "
diff --git a/docs/libcurl/curl_free.html b/docs/libcurl/curl_free.html
deleted file mode 100644
index 4bffdc10..00000000
--- a/docs/libcurl/curl_free.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html><head>
-<title>curl_free man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_free - reclaim memory that has been obtained through a libcurl call <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">void curl_free( char * ptr );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_free reclaims memory that has been obtained through a libcurl call. Use curl_free() instead of free() to avoid anomalies that can result from differences in memory management between your application and libcurl. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="emphasis" href="./curl_unescape.html">curl_unescape(3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_free.pdf b/docs/libcurl/curl_free.pdf
deleted file mode 100644
index 202b34ae..00000000
--- a/docs/libcurl/curl_free.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_getdate.3 b/docs/libcurl/curl_getdate.3
index 73cd3ef1..2e7d7aa7 100644
--- a/docs/libcurl/curl_getdate.3
+++ b/docs/libcurl/curl_getdate.3
@@ -1,24 +1,37 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 curl_getdate 3 "12 Aug 2005" "libcurl 7.0" "libcurl Manual"
.SH NAME
-curl_getdate - Convert a date string to number of seconds since January 1,
-1970
+curl_getdate - Convert a date string to number of seconds
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "time_t curl_getdate(char *" datestring ", time_t *"now " );"
.ad
.SH DESCRIPTION
-This function returns the number of seconds since January 1st 1970 in the UTC
-time zone, for the date and time that the \fIdatestring\fP parameter
-specifies. The \fInow\fP parameter is not used, pass a NULL there.
-
-\fBNOTE:\fP This function was rewritten for the 7.12.2 release and this
-documentation covers the functionality of the new one. The new one is not
-feature-complete with the old one, but most of the formats supported by the
-new one was supported by the old too.
+\fIcurl_getdate(3)\fP returns the number of seconds since the Epoch, January
+1st 1970 00:00:00 in the UTC time zone, for the date and time that the
+\fIdatestring\fP parameter specifies. The \fInow\fP parameter is not used,
+pass a NULL there.
.SH PARSING DATES AND TIMES
A "date" is a string containing several items separated by whitespace. The
order of the items is immaterial. A date string may contain many flavors of
@@ -78,7 +91,7 @@ Sat, 11 Sep 2004 21:32:11 +0200
This parser was written to handle date formats specified in RFC 822 (including
the update in RFC 1123) using time zone name or time zone delta and RFC 850
(obsoleted by RFC 1036) and ANSI C's asctime() format. These formats are the
-only ones RFC2616 says HTTP applications may use.
+only ones RFC 7231 says HTTP applications may use.
.SH RETURN VALUE
This function returns -1 when it fails to parse the date string. Otherwise it
returns the number of seconds as described.
@@ -89,11 +102,7 @@ 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\fP will return -1 in this case.
-.SH REWRITE
-The former version of this function was built with yacc and was not only very
-large, it was also never quite understood and it wasn't possible to build with
-non-GNU tools since only GNU Bison could make it thread-safe!
-
-The rewrite was done for 7.12.2. The new one is much smaller and uses simpler
-code.
+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) "
diff --git a/docs/libcurl/curl_getdate.html b/docs/libcurl/curl_getdate.html
deleted file mode 100644
index cd1612d6..00000000
--- a/docs/libcurl/curl_getdate.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<html><head>
-<title>curl_getdate man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_getdate - Convert a date string to number of seconds since January 1, 1970 <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">time_t curl_getdate(char * datestring , time_t *now );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function returns the number of seconds since January 1st 1970 in the UTC time zone, for the date and time that the <span Class="emphasis">datestring</span> parameter specifies. The <span Class="emphasis">now</span> parameter is not used, pass a NULL there.
-<p class="level0"><span Class="bold">NOTE:</span> This function was rewritten for the 7.12.2 release and this documentation covers the functionality of the new one. The new one is not feature-complete with the old one, but most of the formats supported by the new one was supported by the old too. <a name="PARSING"></a><h2 class="nroffsh">PARSING DATES AND TIMES</h2>
-<p class="level0">A "date" is a string containing several items separated by whitespace. The order of the items is immaterial. A date string may contain many flavors of items:
-<p class="level0"><span Class="bold">calendar date items</span> Can be specified several ways. Month names can only be three-letter english abbreviations, numbers can be zero-prefixed and the year may use 2 or 4 digits. Examples: 06 Nov 1994, 06-Nov-94 and Nov-94 6.
-<p class="level0"><span Class="bold">time of the day items</span> This string specifies the time on a given day. You must specify it with 6 digits with two colons: HH:MM:SS. To not include the time in a date string, will make the function assume 00:00:00. Example: 18:19:21.
-<p class="level0"><span Class="bold">time zone items</span> Specifies international time zone. There are a few acronyms supported, but in general you should instead use the specific relative time compared to UTC. Supported formats include: -1200, MST, +0100.
-<p class="level0"><span Class="bold">day of the week items</span> Specifies a day of the week. Days of the week may be spelled out in full (using english): `Sunday', `Monday', etc or they may be abbreviated to their first three letters. This is usually not info that adds anything.
-<p class="level0"><span Class="bold">pure numbers</span> If a decimal number of the form YYYYMMDD appears, then YYYY is read as the year, MM as the month number and DD as the day of the month, for the specified calendar date.
-<p class="level0"><a name="EXAMPLES"></a><h2 class="nroffsh">EXAMPLES</h2>
-<p class="level0"><pre>
-<p class="level0">Sun, 06 Nov 1994 08:49:37 GMT
- Sunday, 06-Nov-94 08:49:37 GMT
- Sun Nov 6 08:49:37 1994
- 06 Nov 1994 08:49:37 GMT
- 06-Nov-94 08:49:37 GMT
- Nov 6 08:49:37 1994
- 06 Nov 1994 08:49:37
- 06-Nov-94 08:49:37
- 1994 Nov 6 08:49:37
- GMT 08:49:37 06-Nov-94 Sunday
- 94 6 Nov 08:49:37
- 1994 Nov 6
- 06-Nov-94
- Sun Nov 6 94
- 1994.Nov.6
- Sun/Nov/6/94/GMT
- Sun, 06 Nov 1994 08:49:37 CET
- 06 Nov 1994 08:49:37 EST
- Sun, 12 Sep 2004 15:05:58 -0700
- Sat, 11 Sep 2004 21:32:11 +0200
- 20040912 15:05:58 -0700
- 20040911 +0200
- </pre>
-
-<p class="level0"><a name="STANDARDS"></a><h2 class="nroffsh">STANDARDS</h2>
-<p class="level0">This parser was written to handle date formats specified in RFC 822 (including the update in RFC 1123) using time zone name or time zone delta and RFC 850 (obsoleted by RFC 1036) and ANSI C's asctime() format. These formats are the only ones RFC2616 says HTTP applications may use. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">This function returns -1 when it fails to parse the date string. Otherwise it returns the number of seconds as described.
-<p class="level0">If the year is larger than 2037 on systems with 32 bit time_t, this function will return 0x7fffffff (since that is the largest possible signed 32 bit number).
-<p class="level0">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(), <span Class="emphasis">curl_getdate</span> will return -1 in this case. <a name="REWRITE"></a><h2 class="nroffsh">REWRITE</h2>
-<p class="level0">The former version of this function was built with yacc and was not only very large, it was also never quite understood and it wasn't possible to build with non-GNU tools since only GNU Bison could make it thread-safe!
-<p class="level0">The rewrite was done for 7.12.2. The new one is much smaller and uses simpler code. <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_getdate.pdf b/docs/libcurl/curl_getdate.pdf
deleted file mode 100644
index 4499afe8..00000000
--- a/docs/libcurl/curl_getdate.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_getenv.3 b/docs/libcurl/curl_getenv.3
index 74132921..33554476 100644
--- a/docs/libcurl/curl_getenv.3
+++ b/docs/libcurl/curl_getenv.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_getenv 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_getenv - return value for environment name
diff --git a/docs/libcurl/curl_getenv.html b/docs/libcurl/curl_getenv.html
deleted file mode 100644
index be1a007b..00000000
--- a/docs/libcurl/curl_getenv.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html><head>
-<title>curl_getenv man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_getenv - return value for environment name <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">char *curl_getenv(const char * name );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_getenv() is a portable wrapper for the getenv() function, meant to emulate its behaviour and provide an identical interface for all operating systems libcurl builds on (including win32). <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function will be removed from the public libcurl API in a near future. It will instead be made "available" by source code access only, and then as curlx_getenv(). <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If successful, curl_getenv() returns a pointer to the value of the specified environment. The memory it refers to is malloc()ed so the application must free() this when the data is no longer needed. When <a class="emphasis" href="./curl_getenv.html">curl_getenv(3)</a> fails to find the specified name, it returns a null pointer. <a name="NOTE"></a><h2 class="nroffsh">NOTE</h2>
-<p class="level0">Under unix operating systems, there isn't any point in returning an allocated memory, although other systems won't work properly if this isn't done. The unix implementation thus has to suffer slightly from the drawbacks of other systems. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">getenv (3C)</span> <span Class="manpage"> </span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_getenv.pdf b/docs/libcurl/curl_getenv.pdf
deleted file mode 100644
index 2c371ffc..00000000
--- a/docs/libcurl/curl_getenv.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_global_cleanup.3 b/docs/libcurl/curl_global_cleanup.3
index 9ca11d6f..83a54e46 100644
--- a/docs/libcurl/curl_global_cleanup.3
+++ b/docs/libcurl/curl_global_cleanup.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_global_cleanup 3 "17 Feb 2006" "libcurl 7.8" "libcurl Manual"
.SH NAME
curl_global_cleanup - global libcurl cleanup
diff --git a/docs/libcurl/curl_global_cleanup.html b/docs/libcurl/curl_global_cleanup.html
deleted file mode 100644
index ac8cad85..00000000
--- a/docs/libcurl/curl_global_cleanup.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_global_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_global_cleanup - global libcurl cleanup <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">void curl_global_cleanup(void);</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function releases resources acquired by <a class="bold" href="./curl_global_init.html">curl_global_init(3)</a>.
-<p class="level0">You should call <a class="emphasis" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a> once for each call you make to <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a>, after you are done using libcurl.
-<p class="level0"><span Class="bold">This function is not thread safe.</span> 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 <a class="bold" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a> calls functions of other libraries that are similarly thread unsafe, it could conflict with any other thread that uses these other libraries.
-<p class="level0">See the description in <a class="bold" href="./libcurl.html">libcurl(3)</a> of global environment requirements for details of how to use this function.
-<p class="level0"><a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_global_init.html">curl_global_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./libcurl.html">libcurl (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_global_cleanup.pdf b/docs/libcurl/curl_global_cleanup.pdf
deleted file mode 100644
index aae973a4..00000000
--- a/docs/libcurl/curl_global_cleanup.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3
index e732911f..77172be6 100644
--- a/docs/libcurl/curl_global_init.3
+++ b/docs/libcurl/curl_global_init.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_global_init - Global libcurl initialisation
@@ -28,17 +46,18 @@ 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()\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(3)\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\fP(3) of global environment requirements for
+See the description in \fBlibcurl(3)\fP of global environment requirements for
details of how to use this function.
.SH FLAGS
.TP 5
.B CURL_GLOBAL_ALL
-Initialize everything possible. This sets all known bits.
+Initialize everything possible. This sets all known bits except
+\fBCURL_GLOBAL_ACK_EINTR\fP.
.TP
.B CURL_GLOBAL_SSL
Initialize SSL
@@ -48,6 +67,15 @@ Initialize the Win32 socket libraries.
.TP
.B CURL_GLOBAL_NOTHING
Initialise nothing extra. This sets no bit.
+.TP
+.B CURL_GLOBAL_DEFAULT
+A sensible default. It will init both SSL and Win32. Right now, this equals
+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)
.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_global_init.html b/docs/libcurl/curl_global_init.html
deleted file mode 100644
index e54ced3a..00000000
--- a/docs/libcurl/curl_global_init.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<html><head>
-<title>curl_global_init man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_global_init - Global libcurl initialisation <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURLcode curl_global_init(long flags );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function sets up the program environment that libcurl needs. Think of it as an extension of the library loader.
-<p class="level0">This function must be called at least once within a program (a program is all the code that shares a memory space) before the program calls any other function in libcurl. The environment it sets up is constant for the life of the program and is the same for every program, so multiple calls have the same effect as one call.
-<p class="level0">The flags option is a bit pattern that tells libcurl exactly what features to init, as described below. Set the desired bits by ORing the values together. In normal operation, you must specify CURL_GLOBAL_ALL. Don't use any other value unless you are familiar with it and mean to control internal operations of libcurl.
-<p class="level0"><span Class="bold">This function is not thread safe.</span> 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 <span Class="emphasis">curl_global_init()</span> calls functions of other libraries that are similarly thread unsafe, it could conflict with any other thread that uses these other libraries.
-<p class="level0">See the description in <span Class="bold">libcurl</span>(3) of global environment requirements for details of how to use this function.
-<p class="level0"><a name="FLAGS"></a><h2 class="nroffsh">FLAGS</h2>
-<p class="level0">
-<p class="level0"><span Class="bold">CURL_GLOBAL_ALL</span> Initialize everything possible. This sets all known bits.
-<p class="level0"><span Class="bold">CURL_GLOBAL_SSL</span> Initialize SSL
-<p class="level0"><span Class="bold">CURL_GLOBAL_WIN32</span> Initialize the Win32 socket libraries.
-<p class="level0"><span Class="bold">CURL_GLOBAL_NOTHING</span> Initialise nothing extra. This sets no bit. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns non-zero, something went wrong and you cannot use the other curl functions. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_global_init_mem.html">curl_global_init_mem (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_global_cleanup.html">curl_global_cleanup (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_init.html">curl_easy_init (3) </a> <a class="manpage" href="./libcurl.html">libcurl (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_global_init.pdf b/docs/libcurl/curl_global_init.pdf
deleted file mode 100644
index 9e5af529..00000000
--- a/docs/libcurl/curl_global_init.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_global_init_mem.3 b/docs/libcurl/curl_global_init_mem.3
index 57ae6aee..9cddef7c 100644
--- a/docs/libcurl/curl_global_init_mem.3
+++ b/docs/libcurl/curl_global_init_mem.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_global_init_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual"
.SH NAME
curl_global_init_mem - Global libcurl initialisation with memory callbacks
@@ -34,7 +52,7 @@ To replace strdup()
.IP "void *calloc_callback(size_t nmemb, size_t size);"
To replace calloc()
.SH "CAUTION"
-Manipulating these gives considerable powers to the application to severly
+Manipulating these gives considerable powers to the application to severely
screw things up for libcurl. Take care!
.SH "SEE ALSO"
.BR curl_global_init "(3), "
diff --git a/docs/libcurl/curl_global_init_mem.html b/docs/libcurl/curl_global_init_mem.html
deleted file mode 100644
index 055d9dbb..00000000
--- a/docs/libcurl/curl_global_init_mem.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<html><head>
-<title>curl_global_init_mem man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_global_init_mem - Global libcurl initialisation with memory callbacks <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span> <pre>
-<p class="level0"><span Class="bold">CURLcode curl_global_init_mem(long flags,</span>
-<span Class="bold"> curl_malloc_callback m,</span>
-<span Class="bold"> curl_free_callback f,</span>
-<span Class="bold"> curl_realloc_callback r,</span>
-<span Class="bold"> curl_strdup_callback s,</span>
-<span Class="bold"> curl_calloc_callback c );</span>
-</pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function works exactly as <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> with one addition: it allows the application to set callbacks to replace the otherwise used internal memory functions.
-<p class="level0">This man page only adds documentation for the callbacks, see the <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> man page for all the rest. When you use this function, all callback arguments must be set to valid function pointers.
-<p class="level0">The prototypes for the given callbacks should match these:
-<p class="level0"><a name="void"></a><span class="nroffip">void *malloc_callback(size_t size);</span>
-<p class="level1">To replace malloc()
-<p class="level0"><a name="void"></a><span class="nroffip">void free_callback(void *ptr);</span>
-<p class="level1">To replace free()
-<p class="level0"><a name="void"></a><span class="nroffip">void *realloc_callback(void *ptr, size_t size);</span>
-<p class="level1">To replace realloc()
-<p class="level0"><a name="char"></a><span class="nroffip">char *strdup_callback(const char *str);</span>
-<p class="level1">To replace strdup()
-<p class="level0"><a name="void"></a><span class="nroffip">void *calloc_callback(size_t nmemb, size_t size);</span>
-<p class="level1">To replace calloc() <a name="CAUTION"></a><h2 class="nroffsh">CAUTION</h2>
-<p class="level0">Manipulating these gives considerable powers to the application to severly screw things up for libcurl. Take care! <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_global_init.html">curl_global_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_global_cleanup.html">curl_global_cleanup (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_global_init_mem.pdf b/docs/libcurl/curl_global_init_mem.pdf
deleted file mode 100644
index 79f78a7b..00000000
--- a/docs/libcurl/curl_global_init_mem.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_mprintf.3 b/docs/libcurl/curl_mprintf.3
index ade7f65f..cbf10e1a 100644
--- a/docs/libcurl/curl_mprintf.3
+++ b/docs/libcurl/curl_mprintf.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_printf 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
diff --git a/docs/libcurl/curl_mprintf.html b/docs/libcurl/curl_mprintf.html
deleted file mode 100644
index 5a16d574..00000000
--- a/docs/libcurl/curl_mprintf.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<html><head>
-<title>curl_printf man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf, curl_mvsprintf - formatted output conversion <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/mprintf.h&gt;</span>
-<p class="level0"><span Class="bold">int curl_mprintf(const char * format , ...);</span> <br><span Class="bold">int curl_mfprintf(FILE * fd , const char * format , ...);</span> <br><span Class="bold">int curl_msprintf(char * buffer , const char * format , ...);</span> <br><span Class="bold">int curl_msnprintf(char * buffer , size_t maxlength , const char * format , ...);</span> <br><span Class="bold">int curl_mvprintf(const char * format , va_list args );</span> <br><span Class="bold">int curl_mvfprintf(FILE * fd , const char * format , va_list args );</span> <br><span Class="bold">int curl_mvsprintf(char * buffer , const char * format , va_list args );</span> <br><span Class="bold">int curl_mvsnprintf(char * buffer , size_t maxlength , const char * format , va_list args );</span> <br><span Class="bold">char *curl_maprintf(const char * format , ...);</span> <br><span Class="bold">char *curl_mvaprintf(const char * format , va_list args );</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">These are all functions that produce output according to a format string and given arguments. These are mostly clones of the well-known C-style functions and there will be no detailed explanation of all available formatting rules and usage here.
-<p class="level0">See this table for notable exceptions.
-<p class="level1">
-<p class="level1"><span Class="bold">curl_mprintf()</span> Normal printf() clone.
-<p class="level1"><span Class="bold">curl_mfprintf()</span> Normal fprintf() clone.
-<p class="level1"><span Class="bold">curl_msprintf()</span> Normal sprintf() clone.
-<p class="level1"><span Class="bold">curl_msnprintf()</span> snprintf() clone. Many systems don't have this. It is just like <span Class="bold">sprintf</span> but with an extra argument after the buffer that specifies the length of the target buffer.
-<p class="level1"><span Class="bold">curl_mvprintf()</span> Normal vprintf() clone.
-<p class="level1"><span Class="bold">curl_mvfprintf()</span> Normal vfprintf() clone.
-<p class="level1"><span Class="bold">curl_mvsprintf()</span> Normal vsprintf() clone.
-<p class="level1"><span Class="bold">curl_mvsnprintf()</span> vsnprintf() clone. Many systems don't have this. It is just like <span Class="bold">vsprintf</span> but with an extra argument after the buffer that specifies the length of the target buffer.
-<p class="level1"><span Class="bold">curl_maprintf()</span> Like printf() but returns the output string as a malloc()ed string. The returned string must be free()ed by the receiver.
-<p class="level1"><span Class="bold">curl_mvaprintf()</span> Like curl_maprintf() but takes a va_list pointer argument instead of a variable amount of arguments.
-<p class="level0">
-<p class="level0">To easily use all these cloned functions instead of the normal ones, #define _MPRINTF_REPLACE before you include the &lt;curl/mprintf.h&gt; file. Then all the normal names like printf, fprintf, sprintf etc will use the curl-functions instead. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">These function will be removed from the public libcurl API in a near future. They will instead be made "available" by source code access only, and then as curlx_-prefixed functions. See lib/README.curlx for further details. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">The <span Class="bold">curl_maprintf</span> and <span Class="bold">curl_mvaprintf</span> functions return a pointer to a newly allocated string, or NULL if it failed.
-<p class="level0">All other functions return the number of characters they actually outputted. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">printf (3)</span> <span Class="manpage"> sprintf (3)</span> <span Class="manpage"> fprintf (3)</span> <span Class="manpage"> vprintf (3) </span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_mprintf.pdf b/docs/libcurl/curl_mprintf.pdf
deleted file mode 100644
index 544b5c14..00000000
--- a/docs/libcurl/curl_mprintf.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_add_handle.3 b/docs/libcurl/curl_multi_add_handle.3
index 85f199ed..253b864b 100644
--- a/docs/libcurl/curl_multi_add_handle.3
+++ b/docs/libcurl/curl_multi_add_handle.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_add_handle 3 "4 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_add_handle - add an easy handle to a multi session
@@ -10,21 +30,34 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
.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.
-Furthermore, libcurl now initiates the connection associated with the
-specified \fIeasy_handle\fP.
-When an easy handle has been added to a multi stack, you can not and you must
-not use \fIcurl_easy_perform(3)\fP on that handle!
+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.
-If the easy handle is not set to use a shared (CURLOPT_SHARE) or global DNS
-cache (CURLOPT_DNS_USE_GLOBAL_CACHE), 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.
+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.
-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:
+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:
1 - \fIcurl_multi_remove_handle(3)\fP
@@ -34,4 +67,5 @@ 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_cleanup "(3)," curl_multi_init "(3), "
+.BR curl_multi_setopt "(3), " curl_multi_socket_action "(3) "
diff --git a/docs/libcurl/curl_multi_add_handle.html b/docs/libcurl/curl_multi_add_handle.html
deleted file mode 100644
index 75ca2719..00000000
--- a/docs/libcurl/curl_multi_add_handle.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html><head>
-<title>curl_multi_add_handle man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_add_handle - add an easy handle to a multi session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include &lt;curl/curl.h&gt;
-<p class="level0">CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Adds a standard easy handle to the multi stack. This function call will make this <span Class="emphasis">multi_handle</span> control the specified <span Class="emphasis">easy_handle</span>. Furthermore, libcurl now initiates the connection associated with the specified <span Class="emphasis">easy_handle</span>.
-<p class="level0">When an easy handle has been added to a multi stack, you can not and you must not use <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> on that handle!
-<p class="level0">If the easy handle is not set to use a shared (CURLOPT_SHARE) or global DNS cache (CURLOPT_DNS_USE_GLOBAL_CACHE), it will be made to use the DNS cache that is shared between all easy handles within the multi handle when <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a> is called.
-<p class="level0">The easy handle will remain added until you remove it again with <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a>. You should remove the easy handle from the multi stack before you terminate first the easy handle and then the multi handle:
-<p class="level0">1 - <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a>
-<p class="level0">2 - <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>
-<p class="level0">3 - <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a> <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_add_handle.pdf b/docs/libcurl/curl_multi_add_handle.pdf
deleted file mode 100644
index 9fd8fd47..00000000
--- a/docs/libcurl/curl_multi_add_handle.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_assign.3 b/docs/libcurl/curl_multi_assign.3
index 3e15d73e..0a2378de 100644
--- a/docs/libcurl/curl_multi_assign.3
+++ b/docs/libcurl/curl_multi_assign.3
@@ -1,16 +1,36 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_assign 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
-curl_multi_assign \- set data to association with an internal socket
+curl_multi_assign \- set data to associate with an internal socket
.SH SYNOPSIS
#include <curl/curl.h>
CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd,
void *sockptr);
.SH DESCRIPTION
-This function assigns an association in the multi handle between the given
-socket and a private pointer of the application. This is (only) useful for
-\fIcurl_multi_socket(3)\fP uses.
+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.
When set, the \fIsockptr\fP pointer will be passed to all future socket
callbacks for the specific \fIsockfd\fP socket.
@@ -31,13 +51,13 @@ The standard CURLMcode for multi interface error codes.
.SH "TYPICAL USAGE"
In a typical application you allocate a struct or at least use some kind of
semi-dynamic data for each socket that we must wait for action on when using
-the \fIcurl_multi_socket(3)\fP approach.
+the \fIcurl_multi_socket_action(3)\fP approach.
When our socket-callback gets called by libcurl and we get to know about yet
another socket to wait for, we can use \fIcurl_multi_assign(3)\fP to point out
the particular data so that when we get updates about this same socket again,
we don't have to find the struct associated with this socket by ourselves.
.SH AVAILABILITY
-This function was added in libcurl 7.15.5, although not deemed stable yet.
+This function was added in libcurl 7.15.5.
.SH "SEE ALSO"
-.BR curl_multi_setopt "(3), " curl_multi_socket "(3) "
+.BR curl_multi_setopt "(3), " curl_multi_socket_action "(3) "
diff --git a/docs/libcurl/curl_multi_assign.html b/docs/libcurl/curl_multi_assign.html
deleted file mode 100644
index e560218a..00000000
--- a/docs/libcurl/curl_multi_assign.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html><head>
-<title>curl_multi_assign man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_assign - set data to association with an internal socket <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include &lt;curl/curl.h&gt;
-<p class="level0">CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd, &nbsp; void *sockptr); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function assigns an association in the multi handle between the given socket and a private pointer of the application. This is (only) useful for <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> uses.
-<p class="level0">When set, the <span Class="emphasis">sockptr</span> pointer will be passed to all future socket callbacks for the specific <span Class="emphasis">sockfd</span> socket.
-<p class="level0">If the given <span Class="emphasis">sockfd</span> isn't already in use by libcurl, this function will return an error.
-<p class="level0">libcurl only keeps one single pointer associated with a socket, so calling this function several times for the same socket will make the last set pointer get used.
-<p class="level0">The idea here being that this association (socket to private pointer) is something that just about every application that uses this API will need and then libcurl can just as well do it since it already has an internal hash table lookup for this. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">The standard CURLMcode for multi interface error codes. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">In a typical application you allocate a struct or at least use some kind of semi-dynamic data for each socket that we must wait for action on when using the <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> approach.
-<p class="level0">When our socket-callback gets called by libcurl and we get to know about yet another socket to wait for, we can use <a class="emphasis" href="./curl_multi_assign.html">curl_multi_assign(3)</a> to point out the particular data so that when we get updates about this same socket again, we don't have to find the struct associated with this socket by ourselves. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.5, although not deemed stable yet. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_setopt.html">curl_multi_setopt (3)</a> <a class="manpage" href="./curl_multi_socket.html"> curl_multi_socket (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_assign.pdf b/docs/libcurl/curl_multi_assign.pdf
deleted file mode 100644
index 06d204a2..00000000
--- a/docs/libcurl/curl_multi_assign.pdf
+++ /dev/null
@@ -1,117 +0,0 @@
-%PDF-1.4
-%Çì¢
-5 0 obj
-<</Length 6 0 R/Filter /FlateDecode>>
-stream
-xœ½WÛnÛH}×W4°¡«ÓÍ;1‹4Yc s[É °M¶$Ž)RÃKýÃüÊüãœê&)Šq’·…Kf7YU§Î9Õü“ .™ Ÿî3ÙÏ^Ýl[Ïûÿ·³?gRo`ÝG²g?¯±)¤ ëÍÌÜ'Y`³ÀuÙz?“2ä^ÄÖÇÙ½•´UþyßæMö9®ël[<XÎÃœåÙ#­Ì¶'¸õ&.Ú8gÏoŸÿoýël!¸-ñÔ±#Äæ‘G៭ofÖÛåüÒŪôÜAJëtf½¹ž¯ÿ%k -¤MËâ9²¿Y­–ÆMÌš’áb™dq“•;fÍŽÅËŠFU2ÆÒÓ\
-K5:Ë‹ÜHn!}ê\î>½}÷þnuw™‘Þ¢³±þ•IÞ¦Šý›2zE¿øî?´Ýv©ÈõË{ëõ‡Û›7I‰MÏ@¥ÙKsqi®®Ì>eÄ£Ðs<¤ú¹ÑyoÒ«Z‚.C._JŠ«¿A3KÙKºïÐTóŸLãr%°Gÿ÷úîõíêýzõîí·Š<š*Öz—ÕlÓ‰ÆÙ”TÔcø³‚5;Åt…ÌTÈUsTÊ,l3
-„z¤G©Û¾9Q—þE‹NO£ˆÛaºÝbQK›KÑßDÀaAºÜq¢±YÌUÐÖ]ŸûJèÆ#å9ê¢Å¥æ+7úIN(¹zµ¨´øpȳDÃÀ™ ÿ¬²ÈOT[«M›³MY¤¥èåéãy^—Ј3À´‡ŠòóÎ]~RCÖ!B!ú…ƈñ¢“èutÆYÔ\?Öv.!4b.~ß¡AÐÔui’¡ #¢ÃìÞ¢Ä$¨ÙELëd5PGòÀ=ïîÑ;fy&°Ø¢R­Z\Ø´M[)Ö³?²ýz—`í1NžjÂKó¦>¨$û+éb ©a?¢}•™°-hg’˜ðÐm5…í "72sBx“+TV›çH‹
-ÝŽ´âÂN` ¸÷,„ßKÔÊêâ…6®Cƒå¡Œzê7cúB¦Ñ€z^©8=‘ÑqöxêýœÚ;V±îJ¥Ð„‚”¬ª
-üô<«ÃC
-Aƒ¢ƒÖìCîžÆˆÛŒÜ• éE–R‡×Э¬Øægåô¾{ž6ü
-tÓqß$ÃZõØ6þ°¯`üM¶WŒtý€ o2\êxÿ55.ûøIÇî°}X„ƒÃ<½¾äqÝèÕ°Åw4"5Ò‹<>ÂTF¾Id;³TÅl§*2MƒEÜ@Æ&û0¥/ɉœ®ŸÆ[%éÖýÕ.…@u¹WˆØÿ£E-ñcÙ6L]¨€|+ò~¤ªO“ƪNÆ!¦QÀ}w4e„ëèmÆ@Mlr+SýòýÊô¤P Y{C†Õó0wM¢5;*lKK–5DÃDÑ—¸ÓÃ.®/Îø{§‡‡M㻳òøÔÍËò©=tìÉà™/¾sr¸·n¯×nß²sé¸<ò¥µ¼ùp=5Æ¡ZÓëºAq•²ó‘™ѩSÜ '‚uhq2ÚWóeàÓûÕëå ûp·œ{H)°#ë—ogDG·@—¿‚°ætÀ$ËÇ#Ê–,»ÄŸŠÜTmÒ0d„FåŠOVCìaOTn }¶HOE¼ÏsX£UœìŒà€¼k»<œ Q-ú‹—BÕ”8ÒÙ±ŽƒZcô—¿ S#j´µ¡°šŽ pŸ‡áÿiÞÀªD½ÝÌ <îž•ßQþÞ ß²­
-íHŒE?É@jm`ÿÙ͵€ÈÖ8ÀSQö~EO†ø.·ÜãÙ0FláÈ~ZhuŸô™©bUf†«G^g/Gýh)8¨×k[ÐûHÓõ TtÁŠáhwuŸÞØà£]Ç1iÒ ‡N/ìì@°É(uؾýuÇï$m qÚq‡¾•ÆòÕMþWM–´y\šb¶Qc:€Û–àGÆ µ+ÑèÐéK¼¶„8‡L&Ëd¨ÄÛ9”ºÒ`Å=8-1Þ/gLˆ¾cÍ®?»jÜð9ÌŸ…­]ž°ÿÂÎüû„ÓïéuS²¿Œaö¢ÎcSÌÐsקlA3P²Vù—¹¤´=×êg!¹ MßôÒ¥Ñr¶!ì† Ël9$ °|OöÝ[Ý,^ݬ֟&:ò¸ã†áÒËw‘  /iŠz²óP@Çqš»‚i5»²ÝîÈÍR¥öØV—?õ'¿ï½^_³åÍÝ»óÛÔä­pì!ª)Íe!Ð|/KóêòIäûçóò¥#;21ïÀ'Å„ã'“džp8˜Ipè1:MÚP³Þ=¢_Ï4’Ü Ï/ 9³…ðõNÈ]·¿CÒ¥ëõì7üükEˆ9endstream
-endobj
-6 0 obj
-1774
-endobj
-4 0 obj
-<</Type/Page/MediaBox [0 0 612 792]
-/Rotate 0/Parent 3 0 R
-/Resources<</ProcSet[/PDF /Text]
-/ExtGState 11 0 R
-/Font 12 0 R
->>
-/Contents 5 0 R
->>
-endobj
-3 0 obj
-<< /Type /Pages /Kids [
-4 0 R
-] /Count 1
->>
-endobj
-1 0 obj
-<</Type /Catalog /Pages 3 0 R
-/Metadata 14 0 R
->>
-endobj
-7 0 obj
-<</Type/ExtGState
-/OPM 1>>endobj
-11 0 obj
-<</R7
-7 0 R>>
-endobj
-12 0 obj
-<</R10
-10 0 R/R9
-9 0 R/R8
-8 0 R>>
-endobj
-10 0 obj
-<</BaseFont/Times-Italic/Type/Font
-/Subtype/Type1>>
-endobj
-9 0 obj
-<</BaseFont/Times-Bold/Type/Font
-/Subtype/Type1>>
-endobj
-8 0 obj
-<</BaseFont/Times-Roman/Type/Font
-/Encoding 13 0 R/Subtype/Type1>>
-endobj
-13 0 obj
-<</Type/Encoding/Differences[
-140/fi
-173/minus]>>
-endobj
-14 0 obj
-<</Type/Metadata
-/Subtype/XML/Length 1321>>stream
-<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
-<?adobe-xap-filters esc="CRLF"?>
-<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
-<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
-<rdf:Description rdf:about='370cbeda-0e69-11eb-0000-cb573b64c622' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.71'/>
-<rdf:Description rdf:about='370cbeda-0e69-11eb-0000-cb573b64c622' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-10-13T00:04:21+02:00</xmp:ModifyDate>
-<xmp:CreateDate>2010-10-13T00:04:21+02:00</xmp:CreateDate>
-<xmp:CreatorTool>groff version 1.20.1</xmp:CreatorTool></rdf:Description>
-<rdf:Description rdf:about='370cbeda-0e69-11eb-0000-cb573b64c622' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='370cbeda-0e69-11eb-0000-cb573b64c622'/>
-<rdf:Description rdf:about='370cbeda-0e69-11eb-0000-cb573b64c622' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
-</rdf:RDF>
-</x:xmpmeta>
-
-
-<?xpacket end='w'?>
-endstream
-endobj
-2 0 obj
-<</Producer(GPL Ghostscript 8.71)
-/CreationDate(D:20101013000421+02'00')
-/ModDate(D:20101013000421+02'00')
-/Creator(groff version 1.20.1)>>endobj
-xref
-0 15
-0000000000 65535 f
-0000002098 00000 n
-0000003963 00000 n
-0000002039 00000 n
-0000001879 00000 n
-0000000015 00000 n
-0000001859 00000 n
-0000002163 00000 n
-0000002417 00000 n
-0000002352 00000 n
-0000002284 00000 n
-0000002204 00000 n
-0000002234 00000 n
-0000002499 00000 n
-0000002565 00000 n
-trailer
-<< /Size 15 /Root 1 0 R /Info 2 0 R
-/ID [<EC7A968ED9EE001D56172FED80DF0731><EC7A968ED9EE001D56172FED80DF0731>]
->>
-startxref
-4117
-%%EOF
diff --git a/docs/libcurl/curl_multi_cleanup.3 b/docs/libcurl/curl_multi_cleanup.3
index d40173c9..50bc8adb 100644
--- a/docs/libcurl/curl_multi_cleanup.3
+++ b/docs/libcurl/curl_multi_cleanup.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_cleanup 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_cleanup - close down a multi session
@@ -21,6 +41,7 @@ handle is no longer connected to the multi handle
3 - \fIcurl_multi_cleanup(3)\fP should be called when all easy handles are
removed
.SH RETURN VALUE
-CURLMcode type, general libcurl multi interface error code.
+CURLMcode type, general libcurl multi interface error code. On success,
+CURLM_OK is returned.
.SH "SEE ALSO"
.BR curl_multi_init "(3)," curl_easy_cleanup "(3)," curl_easy_init "(3)"
diff --git a/docs/libcurl/curl_multi_cleanup.html b/docs/libcurl/curl_multi_cleanup.html
deleted file mode 100644
index 40381fda..00000000
--- a/docs/libcurl/curl_multi_cleanup.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_multi_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_cleanup - close down a multi session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURLMcode curl_multi_cleanup( CURLM *multi_handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Cleans up and removes a whole multi stack. It does not free or touch any individual easy handles in any way - they still need to be closed individually, using the usual <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> way. The order of cleaning up should be:
-<p class="level0">1 - <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> before any easy handles are cleaned up
-<p class="level0">2 - <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> can now be called independently since the easy handle is no longer connected to the multi handle
-<p class="level0">3 - <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a> should be called when all easy handles are removed <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_init.html">curl_multi_init (3)</a> <a class="manpage" href="./curl_easy_cleanup.html"> curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_init.html"> curl_easy_init (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_cleanup.pdf b/docs/libcurl/curl_multi_cleanup.pdf
deleted file mode 100644
index 2d55d43d..00000000
--- a/docs/libcurl/curl_multi_cleanup.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_fdset.3 b/docs/libcurl/curl_multi_fdset.3
index 79281056..908ef55f 100644
--- a/docs/libcurl/curl_multi_fdset.3
+++ b/docs/libcurl/curl_multi_fdset.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_fdset 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_fdset - extracts file descriptor information from a multi handle
@@ -17,25 +37,47 @@ 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.
+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.
-To be sure to have up-to-date results, you should call
-\fIcurl_multi_perform\fP until it does not return CURLM_CALL_MULTI_PERFORM
-prior to calling \fIcurl_multi_fdset\fP. This will make sure that libcurl has
-updated the handles' socket states.
+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.
If no file descriptors are set by libcurl, \fImax_fd\fP will contain -1 when
-this function returns. Otherwise it will contain the higher descriptor number
-libcurl set.
+this function returns. Otherwise it will contain the highest 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.
+
+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
+larger than FD_SETSIZE, then libcurl will try to not set it. Setting a too
+large file descriptor in an fd_set implies an out of bounds write which can
+cause crashes, or worse. The effect of NOT storing it will possibly save you
+from the crash, but will make your program NOT wait for sockets it should wait
+for...
.SH RETURN VALUE
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_timeout "(3), " curl_multi_perform "(3) "
+.BR curl_multi_wait "(3), "
+.BR curl_multi_timeout "(3), " curl_multi_perform "(3), " select "(2) "
diff --git a/docs/libcurl/curl_multi_fdset.html b/docs/libcurl/curl_multi_fdset.html
deleted file mode 100644
index 51e444cf..00000000
--- a/docs/libcurl/curl_multi_fdset.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<html><head>
-<title>curl_multi_fdset man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_fdset - extracts file descriptor information from a multi handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0">#include &lt;curl/curl.h&gt;
- <p class="level0">CURLMcode curl_multi_fdset(CURLM *multi_handle,
- &nbsp; fd_set *read_fd_set,
- &nbsp; fd_set *write_fd_set,
- &nbsp; fd_set *exc_fd_set,
- &nbsp; int *max_fd);
- <p class="level0"></pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">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 <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> only adds its own descriptors, it doesn't zero or otherwise remove any others. The <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> function should be called as soon as one of them is ready to be read from or written to.
-<p class="level0">To be sure to have up-to-date results, you should call <span Class="emphasis">curl_multi_perform</span> until it does not return CURLM_CALL_MULTI_PERFORM prior to calling <span Class="emphasis">curl_multi_fdset</span>. This will make sure that libcurl has updated the handles' socket states.
-<p class="level0">If no file descriptors are set by libcurl, <span Class="emphasis">max_fd</span> will contain -1 when this function returns. Otherwise it will contain the higher descriptor number libcurl set.
-<p class="level0">When doing select(), you should use <span Class="bold">curl_multi_timeout</span> to figure out how long to wait for action. Call <span Class="emphasis">curl_multi_perform</span> 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. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code. See <span Class="emphasis">libcurl-errors(3)</span> <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_timeout.html">curl_multi_timeout (3)</a> <a class="manpage" href="./curl_multi_perform.html"> curl_multi_perform (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_fdset.pdf b/docs/libcurl/curl_multi_fdset.pdf
deleted file mode 100644
index 86fa5ebf..00000000
--- a/docs/libcurl/curl_multi_fdset.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_info_read.3 b/docs/libcurl/curl_multi_info_read.3
index 9ff08e70..03be341b 100644
--- a/docs/libcurl/curl_multi_info_read.3
+++ b/docs/libcurl/curl_multi_info_read.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_info_read 3 "18 Dec 2004" "libcurl 7.10.3" "libcurl Manual"
.SH NAME
curl_multi_info_read - read multi stack informationals
@@ -29,8 +49,8 @@ calling \fIcurl_multi_cleanup(3)\fP, \fIcurl_multi_remove_handle(3)\fP or
\fIcurl_easy_cleanup(3)\fP.
The 'CURLMsg' struct is very simple and only contains very basic information.
-If more involved information is wanted, the particular "easy handle" in
-present in that struct and can thus be used in subsequent regular
+If more involved information is wanted, the particular "easy handle" is
+present in that struct and can be used in subsequent regular
\fIcurl_easy_getinfo(3)\fP calls (or similar):
.nf
@@ -48,6 +68,24 @@ is done, and then \fBresult\fP contains the return code for the easy handle
that just completed.
At this point, there are no other \fBmsg\fP types defined.
+.SH EXAMPLE
+.nf
+struct CURLMsg *m;
+
+/* call curl_multi_perform or curl_multi_socket_action first, then loop
+ through and check if there are any transfers that have completed */
+
+do {
+ int msgq = 0;
+ m = curl_multi_info_read(multi_handle, &msgq);
+ if(m && (m->msg == CURLMSG_DONE)) {
+ CURL *e = m->easy_handle;
+ transfers--;
+ curl_multi_remove_handle(multi_handle, e);
+ curl_easy_cleanup(e);
+ }
+} while(m);
+.fi
.SH "RETURN VALUE"
A pointer to a filled-in struct, or NULL if it failed or ran out of
structs. It also writes the number of messages left in the queue (after this
diff --git a/docs/libcurl/curl_multi_info_read.html b/docs/libcurl/curl_multi_info_read.html
deleted file mode 100644
index 2f53e6d8..00000000
--- a/docs/libcurl/curl_multi_info_read.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<html><head>
-<title>curl_multi_info_read man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_info_read - read multi stack informationals <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include &lt;curl/curl.h&gt;
-<p class="level0">CURLMsg *curl_multi_info_read( CURLM *multi_handle, &nbsp; int *msgs_in_queue);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Ask the multi handle if there are any messages/informationals from the individual transfers. Messages may include informationals such as an error code from the transfer or just the fact that a transfer is completed. More details on these should be written down as well.
-<p class="level0">Repeated calls to this function will return a new struct each time, until a NULL is returned as a signal that there is no more to get at this point. The integer pointed to with <span Class="emphasis">msgs_in_queue</span> will contain the number of remaining messages after this function was called.
-<p class="level0">When you fetch a message using this function, it is removed from the internal queue so calling this function again will not return the same message again. It will instead return new messages at each new invoke until the queue is emptied.
-<p class="level0"><span Class="bold">WARNING:</span> The data the returned pointer points to will not survive calling <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a>, <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> or <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>.
-<p class="level0">The 'CURLMsg' struct is very simple and only contains very basic information. If more involved information is wanted, the particular "easy handle" in present in that struct and can thus be used in subsequent regular <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> calls (or similar):
-<p class="level0"><pre>
-<p class="level0">&nbsp;struct CURLMsg {
- &nbsp; CURLMSG msg; /* what this message means */
- &nbsp; CURL *easy_handle; /* the handle it concerns */
- &nbsp; union {
- &nbsp; void *whatever; /* message-specific data */
- &nbsp; CURLcode result; /* return code for transfer */
- &nbsp; } data;
- &nbsp;};
- </pre>
-
-<p class="level0">When <span Class="bold">msg</span> is <span Class="emphasis">CURLMSG_DONE</span>, the message identifies a transfer that is done, and then <span Class="bold">result</span> contains the return code for the easy handle that just completed.
-<p class="level0">At this point, there are no other <span Class="bold">msg</span> types defined. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a filled-in struct, or NULL if it failed or ran out of structs. It also writes the number of messages left in the queue (after this read) in the integer the second argument points to. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <a class="manpage" href="./curl_multi_perform.html"> curl_multi_perform (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_info_read.pdf b/docs/libcurl/curl_multi_info_read.pdf
deleted file mode 100644
index 0a145991..00000000
--- a/docs/libcurl/curl_multi_info_read.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_init.3 b/docs/libcurl/curl_multi_init.3
index 0ac298ef..ca9374e1 100644
--- a/docs/libcurl/curl_multi_init.3
+++ b/docs/libcurl/curl_multi_init.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_init 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_init - create a multi handle
diff --git a/docs/libcurl/curl_multi_init.html b/docs/libcurl/curl_multi_init.html
deleted file mode 100644
index cf9b3049..00000000
--- a/docs/libcurl/curl_multi_init.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<html><head>
-<title>curl_multi_init man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_init - create a multi handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURLM *curl_multi_init( );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function returns a CURLM handle to be used as input to all the other multi-functions, sometimes referred to as a multi handle in some places in the documentation. This init call MUST have a corresponding call to <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a> when the operation is complete. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns NULL, something went wrong and you cannot use the other curl functions. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_global_init.html"> curl_global_init (3)</a> <a class="manpage" href="./curl_easy_init.html"> curl_easy_init (3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_init.pdf b/docs/libcurl/curl_multi_init.pdf
deleted file mode 100644
index 67f10ed2..00000000
--- a/docs/libcurl/curl_multi_init.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_perform.3 b/docs/libcurl/curl_multi_perform.3
index ede23905..3ec1fade 100644
--- a/docs/libcurl/curl_multi_perform.3
+++ b/docs/libcurl/curl_multi_perform.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_perform 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_perform - reads/writes available data from each easy handle
@@ -8,29 +28,81 @@ curl_multi_perform - reads/writes available data from each easy handle
CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
.ad
.SH DESCRIPTION
-When the app thinks there's data available for the multi_handle, it should
-call this function to read/write whatever there is to read or write right
-now. curl_multi_perform() returns as soon as the reads/writes are done. This
+This function handles transfers on all the added handles that need attention
+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
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
integer-pointer.
-When you call curl_multi_perform() and the amount of \fIrunning_handles\fP is
-changed from the previous call (or is less than the amount of easy handles
-you've added to the multi handle), you know that there is one or more
-transfers less "running". You can then call \fIcurl_multi_info_read(3)\fP to
-get information about each individual completed transfer, and that returned
-info includes CURLcode and more. If an added handle fails very quickly, it may
-never be counted as a running_handle.
+If the amount of \fIrunning_handles\fP is changed from the previous call (or
+is less than the amount of easy handles you've added to the multi handle), you
+know that there is one or more transfers less "running". You can then call
+\fIcurl_multi_info_read(3)\fP to get information about each individual
+completed transfer, and that returned info includes CURLcode and more. If an
+added handle fails very quickly, it may never be counted as a running_handle.
When \fIrunning_handles\fP is set to zero (0) on the return of this function,
there is no longer any transfers in progress.
+.SH EXAMPLE
+.nf
+#ifdef _WIN32
+#define SHORT_SLEEP Sleep(100)
+#else
+#define SHORT_SLEEP usleep(100000)
+#endif
+
+fd_set fdread;
+fd_set fdwrite;
+fd_set fdexcep;
+int maxfd = -1;
+
+long curl_timeo;
+
+curl_multi_timeout(multi_handle, &curl_timeo);
+if(curl_timeo < 0)
+ curl_timeo = 1000;
+
+timeout.tv_sec = curl_timeo / 1000;
+timeout.tv_usec = (curl_timeo % 1000) * 1000;
+
+FD_ZERO(&fdread);
+FD_ZERO(&fdwrite);
+FD_ZERO(&fdexcep);
+
+/* get file descriptors from the transfers */
+mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+if(maxfd == -1) {
+ SHORT_SLEEP;
+ rc = 0;
+}
+else
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+switch(rc) {
+case -1:
+ /* select error */
+ break;
+case 0:
+default:
+ /* timeout or readable/writable sockets */
+ curl_multi_perform(multi_handle, &still_running);
+ break;
+}
+
+/* if there are still transfers, loop! */
+.fi
.SH "RETURN VALUE"
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\fP again, before
+basically means that you should call \fIcurl_multi_perform(3)\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
@@ -41,13 +113,16 @@ need to wait for \&"action" and then call this function again.
This function only returns errors etc regarding the whole multi stack.
Problems still might have occurred on individual transfers even when this
-function returns \fICURLM_OK\fP.
+function returns \fICURLM_OK\fP. Use \fIcurl_multi_info_read(3)\fP to figure
+out how individual transfers did.
.SH "TYPICAL USAGE"
Most applications will use \fIcurl_multi_fdset(3)\fP to get the multi_handle's
-file descriptors, then it'll wait for action on them using \fBselect(3)\fP and
-as soon as one or more of them are ready, \fIcurl_multi_perform(3)\fP gets
-called.
+file descriptors, and \fIcurl_multi_timeout(3)\fP to get a suitable timeout
+period, then it'll wait for action on the file descriptors using
+\fBselect(3)\fP. As soon as one or more file descriptor is ready,
+\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_perform.html b/docs/libcurl/curl_multi_perform.html
deleted file mode 100644
index 46fc2269..00000000
--- a/docs/libcurl/curl_multi_perform.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<html><head>
-<title>curl_multi_perform man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_perform - reads/writes available data from each easy handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include &lt;curl/curl.h&gt;
-<p class="level0">CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">When the app thinks there's data available for the multi_handle, it should call this function to read/write whatever there is to read or write right now. 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 integer-pointer.
-<p class="level0">When you call curl_multi_perform() and the amount of <span Class="emphasis">running_handles</span> is changed from the previous call (or is less than the amount of easy handles you've added to the multi handle), you know that there is one or more transfers less "running". You can then call <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to get information about each individual completed transfer, and that returned info includes CURLcode and more. If an added handle fails very quickly, it may never be counted as a running_handle.
-<p class="level0">When <span Class="emphasis">running_handles</span> is set to zero (0) on the return of this function, there is no longer any transfers in progress. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code.
-<p class="level0">Before version 7.20.0: If you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <span Class="emphasis">curl_multi_perform</span> 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 <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> will return <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span> only when it wants to be called again <span Class="bold">immediately</span>. When things are fine and there is nothing immediate it wants done, it'll return <span Class="emphasis">CURLM_OK</span> and you need to wait for "action" and then call this function again.
-<p class="level0">This function only returns errors etc regarding the whole multi stack. Problems still might have occurred on individual transfers even when this function returns <span Class="emphasis">CURLM_OK</span>. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">Most applications will use <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> to get the multi_handle's file descriptors, then it'll wait for action on them using <span Class="bold">select(3)</span> and as soon as one or more of them are ready, <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> gets called. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <span Class="manpage"> </span> <span Class="manpage">libcurl-errors (3)</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_perform.pdf b/docs/libcurl/curl_multi_perform.pdf
deleted file mode 100644
index 70f138bf..00000000
--- a/docs/libcurl/curl_multi_perform.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_remove_handle.3 b/docs/libcurl/curl_multi_remove_handle.3
index efecb109..1c2165b6 100644
--- a/docs/libcurl/curl_multi_remove_handle.3
+++ b/docs/libcurl/curl_multi_remove_handle.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_remove_handle 3 "6 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_remove_handle - remove an easy handle from a multi session
@@ -8,16 +28,17 @@ 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 easy_handle from the multi_handle. This will make the
-specified easy handle be removed from this multi handle's control.
+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.
When the easy handle has been removed from a multi stack, it is again
-perfectly legal to invoke \fIcurl_easy_perform()\fP on this easy handle.
+perfectly legal to invoke \fIcurl_easy_perform(3)\fP on this easy handle.
-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.
+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.
.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_cleanup "(3)," curl_multi_init "(3), "
+.BR curl_multi_add_handle "(3) "
diff --git a/docs/libcurl/curl_multi_remove_handle.html b/docs/libcurl/curl_multi_remove_handle.html
deleted file mode 100644
index 15bd02b7..00000000
--- a/docs/libcurl/curl_multi_remove_handle.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html><head>
-<title>curl_multi_remove_handle man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_remove_handle - remove an easy handle from a multi session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include &lt;curl/curl.h&gt;
-<p class="level0">CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *easy_handle);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Removes a given easy_handle from the multi_handle. This will make the specified easy handle be removed from this multi handle's control.
-<p class="level0">When the easy handle has been removed from a multi stack, it is again perfectly legal to invoke <span Class="emphasis">curl_easy_perform()</span> on this easy handle.
-<p class="level0">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. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_remove_handle.pdf b/docs/libcurl/curl_multi_remove_handle.pdf
deleted file mode 100644
index 5a549413..00000000
--- a/docs/libcurl/curl_multi_remove_handle.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_setopt.3 b/docs/libcurl/curl_multi_setopt.3
index a1cbb70d..951349f7 100644
--- a/docs/libcurl/curl_multi_setopt.3
+++ b/docs/libcurl/curl_multi_setopt.3
@@ -1,5 +1,25 @@
-.\"
-.TH curl_multi_setopt 3 "10 Oct 2006" "libcurl 7.16.0" "libcurl Manual"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_setopt 3 "4 Nov 2014" "libcurl 7.39.0" "libcurl Manual"
.SH NAME
curl_multi_setopt \- set options for a curl multi handle
.SH SYNOPSIS
@@ -7,71 +27,42 @@ curl_multi_setopt \- set options for a curl multi handle
CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param);
.SH DESCRIPTION
-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.
+\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.
.SH OPTIONS
.IP CURLMOPT_SOCKETFUNCTION
-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.
+See \fICURLMOPT_SOCKETFUNCTION(3)\fP
.IP CURLMOPT_SOCKETDATA
-Pass a pointer to whatever you want passed to the \fBcurl_socket_callback\fP's
-forth argument, the userp pointer. This is not used by libcurl but only
-passed-thru as-is. Set the callback pointer with
-\fICURLMOPT_SOCKETFUNCTION\fP.
+See \fICURLMOPT_SOCKETDATA(3)\fP
.IP CURLMOPT_PIPELINING
-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)
+See \fICURLMOPT_PIPELINING(3)\fP
.IP CURLMOPT_TIMERFUNCTION
-Pass a pointer to a function matching the \fBcurl_multi_timer_callback\fP
-prototype. 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. This
-callback can be used instead of, or in addition to,
-\fIcurl_multi_timeout(3)\fP. (Added in 7.16.0)
+See \fICURLMOPT_TIMERFUNCTION(3)\fP
.IP CURLMOPT_TIMERDATA
-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)
+See \fICURLMOPT_TIMERDATA(3)\fP
.IP CURLMOPT_MAXCONNECTS
-Pass a long. The set number will be used as the maximum amount of
-simultaneously open connections that libcurl may cache. Default is 10, and
-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\fP option.
-
-(Added in 7.16.3)
+See \fICURLMOPT_MAXCONNECTS(3)\fP
+.IP CURLMOPT_MAX_HOST_CONNECTIONS
+See \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP
+.IP CURLMOPT_MAX_PIPELINE_LENGTH
+See \fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP
+.IP CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
+See \fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP
+.IP CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
+See \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP
+.IP CURLMOPT_PIPELINING_SITE_BL
+See \fICURLMOPT_PIPELINING_SITE_BL(3)\fP
+.IP CURLMOPT_PIPELINING_SERVER_BL
+See \fICURLMOPT_PIPELINING_SERVER_BL(3)\fP
+.IP CURLMOPT_MAX_TOTAL_CONNECTIONS
+See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP
.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_setopt.html b/docs/libcurl/curl_multi_setopt.html
deleted file mode 100644
index 1e675822..00000000
--- a/docs/libcurl/curl_multi_setopt.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<html><head>
-<title>curl_multi_setopt man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_setopt - set options for a curl multi handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include &lt;curl/curl.h&gt;
-<p class="level0">CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_multi_setopt() is used to tell a libcurl multi handle how to behave. By using the appropriate options to <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>, you can change libcurl's behaviour when using that multi handle. All options are set with the <span Class="emphasis">option</span> followed by the parameter <span Class="emphasis">param</span>. That parameter can be a <span Class="bold">long</span>, a <span Class="bold">function pointer</span>, an <span Class="bold">object pointer</span> or a <span Class="bold">curl_off_t</span> 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.
-<p class="level0"><a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLMOPTSOCKETFUNCTION"></a><span class="nroffip">CURLMOPT_SOCKETFUNCTION</span>
-<p class="level1">Pass a pointer to a function matching the <span Class="bold">curl_socket_callback</span> prototype. The <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> 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 <span Class="bold">param</span> argument. They update the status with changes since the previous time a <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> function was called. If the given callback pointer is NULL, no callback will be called. Set the callback's <span Class="bold">userp</span> argument with <a class="emphasis" href="#CURLMOPTSOCKETDATA">CURLMOPT_SOCKETDATA</a>. See <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> for more callback details.
-<p class="level0"><a name="CURLMOPTSOCKETDATA"></a><span class="nroffip">CURLMOPT_SOCKETDATA</span>
-<p class="level1">Pass a pointer to whatever you want passed to the <span Class="bold">curl_socket_callback</span>'s forth argument, the userp pointer. This is not used by libcurl but only passed-thru as-is. Set the callback pointer with <a class="emphasis" href="#CURLMOPTSOCKETFUNCTION">CURLMOPT_SOCKETFUNCTION</a>.
-<p class="level0"><a name="CURLMOPTPIPELINING"></a><span class="nroffip">CURLMOPT_PIPELINING</span>
-<p class="level1">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)
-<p class="level0"><a name="CURLMOPTTIMERFUNCTION"></a><span class="nroffip">CURLMOPT_TIMERFUNCTION</span>
-<p class="level1">Pass a pointer to a function matching the <span Class="bold">curl_multi_timer_callback</span> prototype. 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 (<a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> and <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>) - 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 <a class="emphasis" href="#CURLMOPTTIMERDATA">CURLMOPT_TIMERDATA</a>. This callback can be used instead of, or in addition to, <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a>. (Added in 7.16.0)
-<p class="level0"><a name="CURLMOPTTIMERDATA"></a><span class="nroffip">CURLMOPT_TIMERDATA</span>
-<p class="level1">Pass a pointer to whatever you want passed to the <span Class="bold">curl_multi_timer_callback</span>'s third argument, the userp pointer. This is not used by libcurl but only passed-thru as-is. Set the callback pointer with <a class="emphasis" href="#CURLMOPTTIMERFUNCTION">CURLMOPT_TIMERFUNCTION</a>. (Added in 7.16.0)
-<p class="level0"><a name="CURLMOPTMAXCONNECTS"></a><span class="nroffip">CURLMOPT_MAXCONNECTS</span>
-<p class="level1">Pass a long. The set number will be used as the maximum amount of simultaneously open connections that libcurl may cache. Default is 10, and libcurl will enlarge the size for each added easy handle to make it fit 4 times the number of added easy handles.
-<p class="level1">By setting this option, you can prevent the cache size from growing beyond the limit set by you.
-<p class="level1">When the cache is full, curl closes the oldest one in the cache to prevent the number of open connections from increasing.
-<p class="level1">This option is for the multi handle's use only, when using the easy interface you should instead use the <span Class="emphasis">CURLOPT_MAXCONNECTS</span> option.
-<p class="level1">(Added in 7.16.3) <a name="RETURNS"></a><h2 class="nroffsh">RETURNS</h2>
-<p class="level0">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 doesn't know of. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.4. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_socket.html">curl_multi_socket (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_setopt.pdf b/docs/libcurl/curl_multi_setopt.pdf
deleted file mode 100644
index 53ce9521..00000000
--- a/docs/libcurl/curl_multi_setopt.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_socket.3 b/docs/libcurl/curl_multi_socket.3
index 18b571c1..6b262f29 100644
--- a/docs/libcurl/curl_multi_socket.3
+++ b/docs/libcurl/curl_multi_socket.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_socket 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_socket \- reads/writes available data
diff --git a/docs/libcurl/curl_multi_socket.html b/docs/libcurl/curl_multi_socket.html
deleted file mode 100644
index 72d803f6..00000000
--- a/docs/libcurl/curl_multi_socket.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<html><head>
-<title>curl_multi_socket man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_socket - reads/writes available data <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0">#include &lt;curl/curl.h&gt;
- CURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t sockfd,
- &nbsp; int *running_handles);
- <p class="level0">CURLMcode curl_multi_socket_all(CURLM *multi_handle,
- &nbsp; int *running_handles);
- </pre>
-
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">These functions are deprecated. Do not use! See <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> instead!
-<p class="level0">At return, the integer <span Class="bold">running_handles</span> points to will contain the number of still running easy handles within the multi handle. When this number reaches zero, all transfers are complete/done. Note that when you call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> on a specific socket and the counter decreases by one, it DOES NOT necessarily mean that this exact socket/transfer is the one that completed. Use <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to figure out which easy handle that completed.
-<p class="level0">The <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> functions inform the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the socket callback function set with the CURLMOPT_SOCKETFUNCTION option to <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. They update the status with changes since the previous time the callback was called.
-<p class="level0">Get the timeout time by setting the <span Class="emphasis">CURLMOPT_TIMERFUNCTION</span> option with <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. Your application will then get called with information on how long to wait for socket actions at most before doing the timeout action: call the <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT. You can also use the <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> function to poll the value at any given time, but for an event-based system using the callback is far better than relying on polling the timeout value.
-<p class="level0">Usage of <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> is deprecated, whereas the function is equivalent to <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with <span Class="bold">ev_bitmask</span> set to 0.
-<p class="level0">Force libcurl to (re-)check all its internal sockets and transfers instead of just a single one by calling <a class="bold" href="./curl_multi_socket_all.html">curl_multi_socket_all(3)</a>. Note that there should not be any reason to use this function! <a name="CALLBACK"></a><h2 class="nroffsh">CALLBACK DETAILS</h2>
-<p class="level0">
-<p class="level0">The socket <span Class="bold">callback</span> function uses a prototype like this <pre>
-<p class="level0"><p class="level0">&nbsp; int curl_socket_callback(CURL *easy, /* easy handle */
- &nbsp; curl_socket_t s, /* socket */
- &nbsp; int action, /* see values below */
- &nbsp; void *userp, /* private callback pointer */
- &nbsp; void *socketp); /* private socket pointer */
- <p class="level0"></pre>
-
-<p class="level0">The callback MUST return 0.
-<p class="level0">The <span Class="emphasis">easy</span> argument is a pointer to the easy handle that deals with this particular socket. Note that a single handle may work with several sockets simultaneously.
-<p class="level0">The <span Class="emphasis">s</span> argument is the actual socket value as you use it within your system.
-<p class="level0">The <span Class="emphasis">action</span> argument to the callback has one of five values:
-<p class="level1">
-<p class="level0"><a name="CURLPOLLNONE"></a><span class="nroffip">CURL_POLL_NONE (0)</span>
-<p class="level1">register, not interested in readiness (yet)
-<p class="level0"><a name="CURLPOLLIN"></a><span class="nroffip">CURL_POLL_IN (1)</span>
-<p class="level1">register, interested in read readiness
-<p class="level0"><a name="CURLPOLLOUT"></a><span class="nroffip">CURL_POLL_OUT (2)</span>
-<p class="level1">register, interested in write readiness
-<p class="level0"><a name="CURLPOLLINOUT"></a><span class="nroffip">CURL_POLL_INOUT (3)</span>
-<p class="level1">register, interested in both read and write readiness
-<p class="level0"><a name="CURLPOLLREMOVE"></a><span class="nroffip">CURL_POLL_REMOVE (4)</span>
-<p class="level1">unregister
-<p class="level0">
-<p class="level0">The <span Class="emphasis">socketp</span> argument is a private pointer you have previously set with <a class="emphasis" href="./curl_multi_assign.html">curl_multi_assign(3)</a> to be associated with the <span Class="emphasis">s</span> socket. If no pointer has been set, socketp will be NULL. This argument is of course a service to applications that want to keep certain data or structs that are strictly associated to the given socket.
-<p class="level0">The <span Class="emphasis">userp</span> argument is a private pointer you have previously set with <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and the CURLMOPT_SOCKETDATA option. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code.
-<p class="level0">Legacy: If you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> again, before you wait for more actions on libcurl's sockets. 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".
-<p class="level0">In modern libcurls, <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span> or <span Class="emphasis">CURLM_CALL_MULTI_SOKCET</span> should not be returned and no application needs to care about them.
-<p class="level0">NOTE that the return code is for the whole multi stack. Problems still might have occurred on individual transfers even when one of these functions return OK. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">1. Create a multi handle
-<p class="level0">2. Set the socket callback with CURLMOPT_SOCKETFUNCTION
-<p class="level0">3. Set the timeout callback with CURLMOPT_TIMERFUNCTION, to get to know what timeout value to use when waiting for socket activities.
-<p class="level0">4. Add easy handles with curl_multi_add_handle()
-<p class="level0">5. Provide some means to manage the sockets libcurl is using, so you can check them for activity. This can be done through your application code, or by way of an external library such as libevent or glib.
-<p class="level0">6. Wait for activity on any of libcurl's sockets, use the timeout value your callback has been told
-<p class="level0">7, When activity is detected, call curl_multi_socket_action() for the socket(s) that got action. If no activity is detected and the timeout expires, call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with <span Class="emphasis">CURL_SOCKET_TIMEOUT</span>
-<p class="level0">8. Go back to step 6. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0.
-<p class="level0"><a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> is deprecated, use <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> instead! <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <span Class="manpage"> </span> <span Class="manpage">the hiperfifo.c example</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_socket.pdf b/docs/libcurl/curl_multi_socket.pdf
deleted file mode 100644
index edbe43c3..00000000
--- a/docs/libcurl/curl_multi_socket.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_socket_action.3 b/docs/libcurl/curl_multi_socket_action.3
index 94e6f10a..45b61058 100644
--- a/docs/libcurl/curl_multi_socket_action.3
+++ b/docs/libcurl/curl_multi_socket_action.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_socket_action 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_socket_action \- reads/writes available data given an action
@@ -18,7 +38,9 @@ can be passed as an events bitmask \fBev_bitmask\fP by first setting
\fBev_bitmask\fP to 0, and then adding using bitwise OR (|) any combination of
events to be chosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or
CURL_CSELECT_ERR. When the events on a socket are unknown, pass 0 instead, and
-libcurl will test the descriptor internally.
+libcurl will test the descriptor internally. It is also permissible to pass
+CURL_SOCKET_TIMEOUT to the \fBsockfd\fP parameter in order to initiate the
+whole process or when a timeout occurs.
At return, the integer \fBrunning_handles\fP points to will contain the number
of running easy handles within the multi handle. When this number reaches
@@ -51,7 +73,10 @@ The socket \fBcallback\fP function uses a prototype like this
curl_socket_t s, /* socket */
int action, /* see values below */
void *userp, /* private callback pointer */
- void *socketp); /* private socket pointer */
+ void *socketp); /* private socket pointer,
+ \fBNULL\fP if not
+ previously assigned with
+ \fBcurl_multi_assign(3)\fP */
.fi
The callback MUST return 0.
@@ -112,15 +137,15 @@ timeout value to use when waiting for socket activities.
them for activity. This can be done through your application code, or by way
of an external library such as libevent or glib.
-6. Call curl_multi_socket_action() to kickstart everything. To get one or more
-callbacks called.
+6. Call curl_multi_socket_action(..., CURL_SOCKET_TIMEOUT, 0, ...)
+to kickstart everything. To get one or more callbacks called.
7. Wait for activity on any of libcurl's sockets, use the timeout value your
-callback has been told
+callback has been told.
8, When activity is detected, call curl_multi_socket_action() for the
socket(s) that got action. If no activity is detected and the timeout expires,
-call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
+call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP.
.SH AVAILABILITY
This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0.
.SH "SEE ALSO"
diff --git a/docs/libcurl/curl_multi_socket_action.html b/docs/libcurl/curl_multi_socket_action.html
deleted file mode 100644
index eee2bdef..00000000
--- a/docs/libcurl/curl_multi_socket_action.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<html><head>
-<title>curl_multi_socket_action man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_socket_action - reads/writes available data given an action <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0">#include &lt;curl/curl.h&gt;
- <p class="level0">CURLMcode curl_multi_socket_action(CURLM * multi_handle,
- &nbsp; curl_socket_t sockfd, int ev_bitmask,
- &nbsp; int *running_handles);
- </pre>
-
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">When the application has detected action on a socket handled by libcurl, it should call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with the <span Class="bold">sockfd</span> argument set to the socket with the action. When the events on a socket are known, they can be passed as an events bitmask <span Class="bold">ev_bitmask</span> by first setting <span Class="bold">ev_bitmask</span> to 0, and then adding using bitwise OR (|) any combination of events to be chosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or CURL_CSELECT_ERR. When the events on a socket are unknown, pass 0 instead, and libcurl will test the descriptor internally.
-<p class="level0">At return, the integer <span Class="bold">running_handles</span> points to will contain the number of running easy handles within the multi handle. When this number reaches zero, all transfers are complete/done. When you call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> on a specific socket and the counter decreases by one, it DOES NOT necessarily mean that this exact socket/transfer is the one that completed. Use <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to figure out which easy handle that completed.
-<p class="level0">The <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> functions inform the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the socket callback function set with the CURLMOPT_SOCKETFUNCTION option to <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. They update the status with changes since the previous time the callback was called.
-<p class="level0">Get the timeout time by setting the <span Class="emphasis">CURLMOPT_TIMERFUNCTION</span> option with <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. Your application will then get called with information on how long to wait for socket actions at most before doing the timeout action: call the <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT. You can also use the <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> function to poll the value at any given time, but for an event-based system using the callback is far better than relying on polling the timeout value. <a name="CALLBACK"></a><h2 class="nroffsh">CALLBACK DETAILS</h2>
-<p class="level0">
-<p class="level0">The socket <span Class="bold">callback</span> function uses a prototype like this <pre>
-<p class="level0"><p class="level0">&nbsp; int curl_socket_callback(CURL *easy, /* easy handle */
- &nbsp; curl_socket_t s, /* socket */
- &nbsp; int action, /* see values below */
- &nbsp; void *userp, /* private callback pointer */
- &nbsp; void *socketp); /* private socket pointer */
- <p class="level0"></pre>
-
-<p class="level0">The callback MUST return 0.
-<p class="level0">The <span Class="emphasis">easy</span> argument is a pointer to the easy handle that deals with this particular socket. Note that a single handle may work with several sockets simultaneously.
-<p class="level0">The <span Class="emphasis">s</span> argument is the actual socket value as you use it within your system.
-<p class="level0">The <span Class="emphasis">action</span> argument to the callback has one of five values:
-<p class="level1">
-<p class="level0"><a name="CURLPOLLNONE"></a><span class="nroffip">CURL_POLL_NONE (0)</span>
-<p class="level1">register, not interested in readiness (yet)
-<p class="level0"><a name="CURLPOLLIN"></a><span class="nroffip">CURL_POLL_IN (1)</span>
-<p class="level1">register, interested in read readiness
-<p class="level0"><a name="CURLPOLLOUT"></a><span class="nroffip">CURL_POLL_OUT (2)</span>
-<p class="level1">register, interested in write readiness
-<p class="level0"><a name="CURLPOLLINOUT"></a><span class="nroffip">CURL_POLL_INOUT (3)</span>
-<p class="level1">register, interested in both read and write readiness
-<p class="level0"><a name="CURLPOLLREMOVE"></a><span class="nroffip">CURL_POLL_REMOVE (4)</span>
-<p class="level1">unregister
-<p class="level0">
-<p class="level0">The <span Class="emphasis">socketp</span> argument is a private pointer you have previously set with <a class="emphasis" href="./curl_multi_assign.html">curl_multi_assign(3)</a> to be associated with the <span Class="emphasis">s</span> socket. If no pointer has been set, socketp will be NULL. This argument is of course a service to applications that want to keep certain data or structs that are strictly associated to the given socket.
-<p class="level0">The <span Class="emphasis">userp</span> argument is a private pointer you have previously set with <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and the CURLMOPT_SOCKETDATA option. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code.
-<p class="level0">Before version 7.20.0: If you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> again before you wait for more actions on libcurl's sockets. 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".
-<p class="level0">The return code from this function is for the whole multi stack. Problems still might have occurred on individual transfers even when one of these functions return OK. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">1. Create a multi handle
-<p class="level0">2. Set the socket callback with CURLMOPT_SOCKETFUNCTION
-<p class="level0">3. Set the timeout callback with CURLMOPT_TIMERFUNCTION, to get to know what timeout value to use when waiting for socket activities.
-<p class="level0">4. Add easy handles with curl_multi_add_handle()
-<p class="level0">5. Provide some means to manage the sockets libcurl is using, so you can check them for activity. This can be done through your application code, or by way of an external library such as libevent or glib.
-<p class="level0">6. Call curl_multi_socket_action() to kickstart everything. To get one or more callbacks called.
-<p class="level0">7. Wait for activity on any of libcurl's sockets, use the timeout value your callback has been told
-<p class="level0">8, When activity is detected, call curl_multi_socket_action() for the socket(s) that got action. If no activity is detected and the timeout expires, call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with <span Class="emphasis">CURL_SOCKET_TIMEOUT</span> <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <span Class="manpage"> </span> <span Class="manpage">the hiperfifo.c example</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_socket_action.pdf b/docs/libcurl/curl_multi_socket_action.pdf
deleted file mode 100644
index c40e8d65..00000000
--- a/docs/libcurl/curl_multi_socket_action.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_socket_all.3 b/docs/libcurl/curl_multi_socket_all.3
new file mode 100644
index 00000000..428dd06f
--- /dev/null
+++ b/docs/libcurl/curl_multi_socket_all.3
@@ -0,0 +1 @@
+.so man3/curl_multi_socket.3
diff --git a/docs/libcurl/curl_multi_strerror.3 b/docs/libcurl/curl_multi_strerror.3
index 2d9801d6..40d0974c 100644
--- a/docs/libcurl/curl_multi_strerror.3
+++ b/docs/libcurl/curl_multi_strerror.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_multi_strerror - return string describing error code
diff --git a/docs/libcurl/curl_multi_strerror.html b/docs/libcurl/curl_multi_strerror.html
deleted file mode 100644
index ac885aa9..00000000
--- a/docs/libcurl/curl_multi_strerror.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_multi_strerror man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_strerror - return string describing error code <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<span Class="bold">const char *curl_multi_strerror(CURLMcode errornum );</span>
-</pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">The curl_multi_strerror() function returns a string describing the CURLMcode error code passed in the argument <span Class="emphasis">errornum</span>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.12.0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">libcurl-errors (3)</span> <a class="manpage" href="./curl_easy_strerror.html"> curl_easy_strerror (3)</a> <a class="manpage" href="./curl_share_strerror.html"> curl_share_strerror (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_strerror.pdf b/docs/libcurl/curl_multi_strerror.pdf
deleted file mode 100644
index 12a9cf71..00000000
--- a/docs/libcurl/curl_multi_strerror.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_timeout.3 b/docs/libcurl/curl_multi_timeout.3
index 9e53d0b8..f0c90796 100644
--- a/docs/libcurl/curl_multi_timeout.3
+++ b/docs/libcurl/curl_multi_timeout.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_timeout 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_timeout \- how long to wait for action before proceeding
@@ -22,13 +42,29 @@ of milliseconds at this very moment. If 0, it means you should proceed
immediately without waiting for anything. If it returns -1, there's no timeout
at all set.
-An application that uses the multi_socket API SHOULD not use this function, but
+An application that uses the multi_socket API SHOULD NOT use this function, but
SHOULD instead use \fIcurl_multi_setopt(3)\fP and its
\fPCURLMOPT_TIMERFUNCTION\fP option for proper and desired behavior.
Note: if libcurl returns a -1 timeout here, it just means that libcurl
currently has no stored timeout value. You must not wait too long (more than a
few seconds perhaps) before you call curl_multi_perform() again.
+.SH EXAMPLE
+.nf
+struct timeval timeout;
+long timeo;
+
+curl_multi_timeout(multi_handle, &timeo);
+if(timeo < 0)
+ /* no set timeout, use a default */
+ timeo = 980;
+
+timeout.tv_sec = timeo / 1000;
+timeout.tv_usec = (timeo % 1000) * 1000;
+
+/* wait for activities no longer than the set timeout */
+select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+.fi
.SH "RETURN VALUE"
The standard CURLMcode for multi interface error codes.
.SH "TYPICAL USAGE"
diff --git a/docs/libcurl/curl_multi_timeout.html b/docs/libcurl/curl_multi_timeout.html
deleted file mode 100644
index 78a383f2..00000000
--- a/docs/libcurl/curl_multi_timeout.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<html><head>
-<title>curl_multi_timeout man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_timeout - how long to wait for action before proceeding <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include &lt;curl/curl.h&gt;
-<p class="level0">CURLMcode curl_multi_timeout(CURLM *multi_handle, long *timeout); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">
-<p class="level0">An application using the libcurl multi interface should call <a class="bold" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> to figure out how long it should wait for socket actions - at most - before proceeding.
-<p class="level0">Proceeding means either doing the socket-style timeout action: call the <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT, or call <a class="bold" href="./curl_multi_perform.html">curl_multi_perform(3)</a> if you're using the simpler and older multi interface approach.
-<p class="level0">The timeout value returned in the long <span Class="bold">timeout</span> points to, is in number of milliseconds at this very moment. If 0, it means you should proceed immediately without waiting for anything. If it returns -1, there's no timeout at all set.
-<p class="level0">An application that uses the multi_socket API SHOULD not use this function, but SHOULD instead use <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and its </span>CURLMOPT_TIMERFUNCTION</span> option for proper and desired behavior.
-<p class="level0">Note: if libcurl returns a -1 timeout here, it just means that libcurl currently has no stored timeout value. You must not wait too long (more than a few seconds perhaps) before you call curl_multi_perform() again. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">The standard CURLMcode for multi interface error codes. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">Call <a class="bold" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a>, then wait for action on the sockets. You figure out which sockets to wait for by calling <a class="bold" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> or by a previous call to <a class="bold" href="./curl_multi_socket.html">curl_multi_socket(3)</a>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.4. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_socket.html">curl_multi_socket (3)</a> <a class="manpage" href="./curl_multi_setopt.html"> curl_multi_setopt (3) </a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_timeout.pdf b/docs/libcurl/curl_multi_timeout.pdf
deleted file mode 100644
index 90d744cd..00000000
--- a/docs/libcurl/curl_multi_timeout.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_wait.3 b/docs/libcurl/curl_multi_wait.3
new file mode 100644
index 00000000..45c2e8c9
--- /dev/null
+++ b/docs/libcurl/curl_multi_wait.3
@@ -0,0 +1,80 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_multi_wait 3 "12 Jul 2012" "libcurl 7.28.0" "libcurl Manual"
+.SH NAME
+curl_multi_wait - polls on all easy handles in a multi handle
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLMcode curl_multi_wait(CURLM *multi_handle,
+ struct curl_waitfd extra_fds[],
+ unsigned int extra_nfds,
+ int timeout_ms,
+ 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.
+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.
+
+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
+total number of file descriptors on which interesting events occurred. This
+number can include both libcurl internal descriptors as well as descriptors
+provided in \fIextra_fds\fP.
+
+If no extra file descriptors are provided and libcurl has no file descriptor
+to offer to wait for, this function will return immediately.
+
+This function is encouraged to be used instead of select(3) when using the
+multi interface to allow applications to easier circumvent the common problem
+with 1024 maximum file descriptors.
+.SH curl_waitfd
+.nf
+struct curl_waitfd {
+ curl_socket_t fd;
+ short events;
+ short revents;
+};
+.fi
+.IP CURL_WAIT_POLLIN
+Bit flag to curl_waitfd.events indicating the socket should poll on read
+events such as new data received.
+.IP CURL_WAIT_POLLPRI
+Bit flag to curl_waitfd.events indicating the socket should poll on high
+priority read events such as out of band data.
+.IP CURL_WAIT_POLLOUT
+Bit flag to curl_waitfd.events indicating the socket should poll on write
+events such as the socket being clear to write without blocking.
+.SH RETURN VALUE
+CURLMcode type, general libcurl multi interface error code. See
+\fIlibcurl-errors(3)\fP
+.SH AVAILABILITY
+This function was added in libcurl 7.28.0.
+.SH "SEE ALSO"
+.BR curl_multi_fdset "(3), " curl_multi_perform "(3)"
diff --git a/docs/libcurl/curl_share_cleanup.3 b/docs/libcurl/curl_share_cleanup.3
index 222197cc..3af1707b 100644
--- a/docs/libcurl/curl_share_cleanup.3
+++ b/docs/libcurl/curl_share_cleanup.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_share_cleanup 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
.SH NAME
curl_share_cleanup - Clean up a shared object
diff --git a/docs/libcurl/curl_share_cleanup.html b/docs/libcurl/curl_share_cleanup.html
deleted file mode 100644
index 758f1e9a..00000000
--- a/docs/libcurl/curl_share_cleanup.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<html><head>
-<title>curl_share_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_share_cleanup - Clean up a shared object <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURLSHcode curl_share_cleanup(CURLSH * share_handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function deletes a shared object. The share handle cannot be used anymore when this function has been called.
-<p class="level0"><a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLSHE_OK (zero) means that the option was set properly, non-zero means an error occurred as <span Class="emphasis">&lt;curl/curl.h&gt;</span> defines. See the <span Class="emphasis">libcurl-errors.3</span> man page for the full list with descriptions. If an error occurs, then the share object will not be deleted. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_share_init.html">curl_share_init (3)</a> <a class="manpage" href="./curl_share_setopt.html"> curl_share_setopt (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_share_cleanup.pdf b/docs/libcurl/curl_share_cleanup.pdf
deleted file mode 100644
index 74cab9cc..00000000
--- a/docs/libcurl/curl_share_cleanup.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_share_init.3 b/docs/libcurl/curl_share_init.3
index 871519cb..4833a8a8 100644
--- a/docs/libcurl/curl_share_init.3
+++ b/docs/libcurl/curl_share_init.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_share_init 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
.SH NAME
curl_share_init - Create a shared object
@@ -13,9 +33,9 @@ share-functions, sometimes referred to as a share handle in some places in the
documentation. This init call MUST have a corresponding call to
\fIcurl_share_cleanup\fP when all operations using the share are complete.
-This \fIshare handle\fP is what you pass to curl using the \fICURLOPT_SHARE\fP
-option with \fIcurl_easy_setopt(3)\fP, to make that specific curl handle use
-the data in this share.
+This \fIshare handle\fP is what you pass to curl using the
+\fICURLOPT_SHARE(3)\fP option with \fIcurl_easy_setopt(3)\fP, to make that
+specific curl handle use the data in this share.
.SH RETURN VALUE
If this function returns NULL, something went wrong (out of memory, etc.)
and therefore the share object was not created.
diff --git a/docs/libcurl/curl_share_init.html b/docs/libcurl/curl_share_init.html
deleted file mode 100644
index cbc8231c..00000000
--- a/docs/libcurl/curl_share_init.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html><head>
-<title>curl_share_init man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_share_init - Create a shared object <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">CURLSH *curl_share_init( );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function returns a CURLSH handle to be used as input to all the other share-functions, sometimes referred to as a share handle in some places in the documentation. This init call MUST have a corresponding call to <span Class="emphasis">curl_share_cleanup</span> when all operations using the share are complete.
-<p class="level0">This <span Class="emphasis">share handle</span> is what you pass to curl using the <span Class="emphasis">CURLOPT_SHARE</span> option with <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>, to make that specific curl handle use the data in this share. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns NULL, something went wrong (out of memory, etc.) and therefore the share object was not created. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_share_cleanup.html">curl_share_cleanup (3)</a> <a class="manpage" href="./curl_share_setopt.html"> curl_share_setopt (3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_share_init.pdf b/docs/libcurl/curl_share_init.pdf
deleted file mode 100644
index 02bf1c69..00000000
--- a/docs/libcurl/curl_share_init.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_share_setopt.3 b/docs/libcurl/curl_share_setopt.3
index 351360da..c196743f 100644
--- a/docs/libcurl/curl_share_setopt.3
+++ b/docs/libcurl/curl_share_setopt.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_share_setopt 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
.SH NAME
curl_share_setopt - Set options for a shared object
@@ -44,6 +64,11 @@ Cached DNS hosts will be shared across the easy handles using this shared
object. Note that when you use the multi interface, all easy handles added to
the same multi handle will share DNS cache by default without this having to
be used!
+.IP CURL_LOCK_DATA_SSL_SESSION
+SSL session IDs will be shared across the easy handles using this shared
+object. This will reduce the time spent in the SSL handshake when reconnecting
+to the same server. Note SSL session IDs are reused within the same easy handle
+by default.
.RE
.IP CURLSHOPT_UNSHARE
This option does the opposite of \fICURLSHOPT_SHARE\fP. It specifies that
diff --git a/docs/libcurl/curl_share_setopt.html b/docs/libcurl/curl_share_setopt.html
deleted file mode 100644
index 43923878..00000000
--- a/docs/libcurl/curl_share_setopt.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<html><head>
-<title>curl_share_setopt man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_share_setopt - Set options for a shared object <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0">CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Set the <span Class="emphasis">option</span> to <span Class="emphasis">parameter</span> for the given <span Class="emphasis">share</span>. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLSHOPTLOCKFUNC"></a><span class="nroffip">CURLSHOPT_LOCKFUNC</span>
-<p class="level1">The <span Class="emphasis">parameter</span> must be a pointer to a function matching the following prototype:
-<p class="level1">void lock_function(CURL *handle, curl_lock_data data, curl_lock_access access, void *userptr);
-<p class="level1"><span Class="emphasis">data</span> defines what data libcurl wants to lock, and you must make sure that only one lock is given at any time for each kind of data.
-<p class="level1"><span Class="emphasis">access</span> defines what access type libcurl wants, shared or single.
-<p class="level1"><span Class="emphasis">userptr</span> is the pointer you set with <a class="emphasis" href="#CURLSHOPTUSERDATA">CURLSHOPT_USERDATA</a>.
-<p class="level0"><a name="CURLSHOPTUNLOCKFUNC"></a><span class="nroffip">CURLSHOPT_UNLOCKFUNC</span>
-<p class="level1">The <span Class="emphasis">parameter</span> must be a pointer to a function matching the following prototype:
-<p class="level1">void unlock_function(CURL *handle, curl_lock_data data, void *userptr);
-<p class="level1"><span Class="emphasis">data</span> defines what data libcurl wants to unlock, and you must make sure that only one lock is given at any time for each kind of data.
-<p class="level1"><span Class="emphasis">userptr</span> is the pointer you set with <a class="emphasis" href="#CURLSHOPTUSERDATA">CURLSHOPT_USERDATA</a>.
-<p class="level0"><a name="CURLSHOPTSHARE"></a><span class="nroffip">CURLSHOPT_SHARE</span>
-<p class="level1">The <span Class="emphasis">parameter</span> specifies a type of data that should be shared. This may be set to one of the values described below.
-<p class="level2">
-<p class="level1"><a name="CURLLOCKDATACOOKIE"></a><span class="nroffip">CURL_LOCK_DATA_COOKIE</span>
-<p class="level2">Cookie data will be shared across the easy handles using this shared object.
-<p class="level1"><a name="CURLLOCKDATADNS"></a><span class="nroffip">CURL_LOCK_DATA_DNS</span>
-<p class="level2">Cached DNS hosts will be shared across the easy handles using this shared object. Note that when you use the multi interface, all easy handles added to the same multi handle will share DNS cache by default without this having to be used!
-<p class="level1">
-<p class="level0"><a name="CURLSHOPTUNSHARE"></a><span class="nroffip">CURLSHOPT_UNSHARE</span>
-<p class="level1">This option does the opposite of <a class="emphasis" href="#CURLSHOPTSHARE">CURLSHOPT_SHARE</a>. It specifies that the specified <span Class="emphasis">parameter</span> will no longer be shared. Valid values are the same as those for <a class="emphasis" href="#CURLSHOPTSHARE">CURLSHOPT_SHARE</a>.
-<p class="level0"><a name="CURLSHOPTUSERDATA"></a><span class="nroffip">CURLSHOPT_USERDATA</span>
-<p class="level1">The <span Class="emphasis">parameter</span> allows you to specify a pointer to data that will be passed to the lock_function and unlock_function each time it is called. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLSHE_OK (zero) means that the option was set properly, non-zero means an error occurred as <span Class="emphasis">&lt;curl/curl.h&gt;</span> defines. See the <span Class="emphasis">libcurl-errors.3</span> man page for the full list with descriptions. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_share_cleanup.html">curl_share_cleanup (3)</a> <a class="manpage" href="./curl_share_init.html"> curl_share_init (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_share_setopt.pdf b/docs/libcurl/curl_share_setopt.pdf
deleted file mode 100644
index 5cf89589..00000000
--- a/docs/libcurl/curl_share_setopt.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_share_strerror.3 b/docs/libcurl/curl_share_strerror.3
index 69087dbf..f1bc3986 100644
--- a/docs/libcurl/curl_share_strerror.3
+++ b/docs/libcurl/curl_share_strerror.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_share_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_share_strerror - return string describing error code
diff --git a/docs/libcurl/curl_share_strerror.html b/docs/libcurl/curl_share_strerror.html
deleted file mode 100644
index 0b5b0503..00000000
--- a/docs/libcurl/curl_share_strerror.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_share_strerror man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_share_strerror - return string describing error code <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<span Class="bold">const char *curl_share_strerror(CURLSHcode errornum );</span>
-</pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">The curl_share_strerror() function returns a string describing the CURLSHcode error code passed in the argument <span Class="emphasis">errornum</span>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.12.0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">libcurl-errors (3)</span> <a class="manpage" href="./curl_multi_strerror.html"> curl_multi_strerror (3)</a> <a class="manpage" href="./curl_easy_strerror.html"> curl_easy_strerror (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_share_strerror.pdf b/docs/libcurl/curl_share_strerror.pdf
deleted file mode 100644
index 9ee77986..00000000
--- a/docs/libcurl/curl_share_strerror.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_slist_append.3 b/docs/libcurl/curl_slist_append.3
index 5cca9b72..529560e8 100644
--- a/docs/libcurl/curl_slist_append.3
+++ b/docs/libcurl/curl_slist_append.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_slist_append 3 "19 Jun 2003" "libcurl 7.10.4" "libcurl Manual"
.SH NAME
curl_slist_append - add a string to an slist
diff --git a/docs/libcurl/curl_slist_append.html b/docs/libcurl/curl_slist_append.html
deleted file mode 100644
index 50436e80..00000000
--- a/docs/libcurl/curl_slist_append.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<html><head>
-<title>curl_slist_append man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_slist_append - add a string to an slist <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">struct curl_slist *curl_slist_append(struct curl_slist * list,</span> <span Class="bold">const char * string );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_slist_append() appends a specified string to a linked list of strings. The existing <span Class="emphasis">list</span> should be passed as the first argument while the new list is returned from this function. The specified <span Class="emphasis">string</span> has been appended when this function returns. curl_slist_append() copies the string.
-<p class="level0">The list should be freed again (after usage) with <a class="bold" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a>. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A null pointer is returned if anything went wrong, otherwise the new list pointer is returned. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0"><pre>
-<p class="level0">&nbsp;CURL handle;
- &nbsp;struct curl_slist *slist=NULL;
- <p class="level0">&nbsp;slist = curl_slist_append(slist, "pragma:");
- &nbsp;curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
- <p class="level0">&nbsp;curl_easy_perform(handle);
- <p class="level0">&nbsp;curl_slist_free_all(slist); /* free the list again */
- </pre>
-
-<p class="level0"><a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_slist_free_all.html">curl_slist_free_all (3)</a> <span Class="manpage"> </span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_slist_append.pdf b/docs/libcurl/curl_slist_append.pdf
deleted file mode 100644
index 9aa31a6f..00000000
--- a/docs/libcurl/curl_slist_append.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_slist_free_all.3 b/docs/libcurl/curl_slist_free_all.3
index ec1b3607..fab3d608 100644
--- a/docs/libcurl/curl_slist_free_all.3
+++ b/docs/libcurl/curl_slist_free_all.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_slist_free_all 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
.SH NAME
curl_slist_free_all - free an entire curl_slist list
diff --git a/docs/libcurl/curl_slist_free_all.html b/docs/libcurl/curl_slist_free_all.html
deleted file mode 100644
index 76a0a9de..00000000
--- a/docs/libcurl/curl_slist_free_all.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<html><head>
-<title>curl_slist_free_all man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_slist_free_all - free an entire curl_slist list <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">void curl_slist_free_all(struct curl_slist * list);</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_slist_free_all() removes all traces of a previously built curl_slist linked list. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">Nothing. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_slist_append.html">curl_slist_append (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_slist_free_all.pdf b/docs/libcurl/curl_slist_free_all.pdf
deleted file mode 100644
index a48fb6f9..00000000
--- a/docs/libcurl/curl_slist_free_all.pdf
+++ /dev/null
@@ -1,107 +0,0 @@
-%PDF-1.4
-%Çì¢
-5 0 obj
-<</Length 6 0 R/Filter /FlateDecode>>
-stream
-xœ…Së‹Ó@ÿž¿bÀnÄlg7Ù<P„ªAîèãls‚´RriÚFÓ´—GÅÿÞÝdKSì!K6agfç÷˜<R¨–~'{c0ó`[_ä³5ž Ö&€~%{øÉ$_D£«càqð¢½Á˜OQ@ôÛX¤)óU•gU½Ú”iºŠó|Iì¥ yö¤b¦ÅRDŒã¢‰sx©ÀüÝRΈÙ?ýi Û…hdÉÐ|-!Ë(T¶„­ 2Íèg0Gê ã*Œ
-ç-˜`ú„¸€´¨³2íAµu·ö`X‡Å\ê·mçß'Ó‡ùÝü’¦¡êÆäUV$y³Nὺx 6ºû Ò-冤Á–×épæР#µ ÙúZ*S‰ŽžOΚUuÙ$uô›VÃÁŒáÙ:סèj™TÊÒ|÷/+Ž²mŸÙçpþiv÷ÝM'×ÊöÈÝ´QÚ^¦ûÙ¢h­BF=Oc8¥*Æ©èÈr?ðªbêÜEêÛÈÎJH«ê2NÒ
-ˆáX¦&J ›œ²CSåàÉäHš,¯¯=,~™ »ÌtÝzJµD}þLxÔ.üdF³ |3™íHiŽC]yC‹É¡ÞeÅ–þo`†£ùôÅéii±¾Vß“Cïz@HûÓ¼m¥fŒQ!^Ø\·Ò?x{‚s
-XW/ƽ]jK't .“pDÖV:HÝóµ'ad|•ë/zëÏendstream
-endobj
-6 0 obj
-547
-endobj
-4 0 obj
-<</Type/Page/MediaBox [0 0 612 792]
-/Rotate 0/Parent 3 0 R
-/Resources<</ProcSet[/PDF /Text]
-/ExtGState 11 0 R
-/Font 12 0 R
->>
-/Contents 5 0 R
->>
-endobj
-3 0 obj
-<< /Type /Pages /Kids [
-4 0 R
-] /Count 1
->>
-endobj
-1 0 obj
-<</Type /Catalog /Pages 3 0 R
-/Metadata 13 0 R
->>
-endobj
-7 0 obj
-<</Type/ExtGState
-/OPM 1>>endobj
-11 0 obj
-<</R7
-7 0 R>>
-endobj
-12 0 obj
-<</R10
-10 0 R/R9
-9 0 R/R8
-8 0 R>>
-endobj
-10 0 obj
-<</BaseFont/Times-Italic/Type/Font
-/Subtype/Type1>>
-endobj
-9 0 obj
-<</BaseFont/Times-Bold/Type/Font
-/Subtype/Type1>>
-endobj
-8 0 obj
-<</BaseFont/Times-Roman/Type/Font
-/Subtype/Type1>>
-endobj
-13 0 obj
-<</Type/Metadata
-/Subtype/XML/Length 1321>>stream
-<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
-<?adobe-xap-filters esc="CRLF"?>
-<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
-<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
-<rdf:Description rdf:about='32480ada-0e69-11eb-0000-0d90648fa894' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.71'/>
-<rdf:Description rdf:about='32480ada-0e69-11eb-0000-0d90648fa894' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-10-13T00:04:13+02:00</xmp:ModifyDate>
-<xmp:CreateDate>2010-10-13T00:04:13+02:00</xmp:CreateDate>
-<xmp:CreatorTool>groff version 1.20.1</xmp:CreatorTool></rdf:Description>
-<rdf:Description rdf:about='32480ada-0e69-11eb-0000-0d90648fa894' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='32480ada-0e69-11eb-0000-0d90648fa894'/>
-<rdf:Description rdf:about='32480ada-0e69-11eb-0000-0d90648fa894' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
-</rdf:RDF>
-</x:xmpmeta>
-
-
-<?xpacket end='w'?>
-endstream
-endobj
-2 0 obj
-<</Producer(GPL Ghostscript 8.71)
-/CreationDate(D:20101013000413+02'00')
-/ModDate(D:20101013000413+02'00')
-/Creator(groff version 1.20.1)>>endobj
-xref
-0 14
-0000000000 65535 f
-0000000870 00000 n
-0000002653 00000 n
-0000000811 00000 n
-0000000651 00000 n
-0000000015 00000 n
-0000000632 00000 n
-0000000935 00000 n
-0000001189 00000 n
-0000001124 00000 n
-0000001056 00000 n
-0000000976 00000 n
-0000001006 00000 n
-0000001255 00000 n
-trailer
-<< /Size 14 /Root 1 0 R /Info 2 0 R
-/ID [<A9D90A968C5A2CABC7D7A610A03C900F><A9D90A968C5A2CABC7D7A610A03C900F>]
->>
-startxref
-2807
-%%EOF
diff --git a/docs/libcurl/curl_strequal.3 b/docs/libcurl/curl_strequal.3
index 8ab4234b..ce575d7a 100644
--- a/docs/libcurl/curl_strequal.3
+++ b/docs/libcurl/curl_strequal.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 curl_strequal 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_strequal, curl_strnequal - case insensitive string comparisons
diff --git a/docs/libcurl/curl_strequal.html b/docs/libcurl/curl_strequal.html
deleted file mode 100644
index eefdf10a..00000000
--- a/docs/libcurl/curl_strequal.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_strequal man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_strequal, curl_strnequal - case insensitive string comparisons <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">int curl_strequal(char * str1 , char * str2 );</span>
-<p class="level0"><span Class="bold">int curl_strenqual(char * str1 , char * str2 , size_t len );</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">The <span Class="bold">curl_strequal()</span> function compares the two strings <span Class="emphasis">str1</span> and <span Class="emphasis">str2</span>, ignoring the case of the characters. It returns a non-zero (TRUE) integer if the strings are identical.
-<p class="level0">The <span Class="bold">curl_strnequal()</span> function is similar, except it only compares the first <span Class="emphasis">len</span> characters of <span Class="emphasis">str1</span>.
-<p class="level0">These functions are provided by libcurl to enable applications to compare strings in a truly portable manner. There are no standard portable case insensitive string comparison functions. These two work on all platforms. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">These functions will be removed from the public libcurl API in a near future. They will instead be made "available" by source code access only, and then as curlx_strequal() and curlx_strenqual(). <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">Non-zero if the strings are identical. Zero if they're not. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">strcmp (3)</span> <span Class="manpage"> strcasecmp (3)</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_strequal.pdf b/docs/libcurl/curl_strequal.pdf
deleted file mode 100644
index e48fc084..00000000
--- a/docs/libcurl/curl_strequal.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_strnequal.3 b/docs/libcurl/curl_strnequal.3
new file mode 100644
index 00000000..ce41d3e4
--- /dev/null
+++ b/docs/libcurl/curl_strnequal.3
@@ -0,0 +1 @@
+.so man3/curl_strequal.3
diff --git a/docs/libcurl/curl_unescape.3 b/docs/libcurl/curl_unescape.3
index 9bb470f4..8d16852b 100644
--- a/docs/libcurl/curl_unescape.3
+++ b/docs/libcurl/curl_unescape.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_unescape 3 "22 March 2001" "libcurl 7.7" "libcurl Manual"
.SH NAME
curl_unescape - URL decodes the given string
@@ -20,11 +38,11 @@ converted to their plain text versions.
If the 'length' argument is set to 0, curl_unescape() will use strlen() on the
input 'url' string to find out the size.
-You must curl_free() the returned string when you're done with it.
+You must \fIcurl_free(3)\fP the returned string when you're done with it.
.SH AVAILABILITY
Since 7.15.4, \fIcurl_easy_unescape(3)\fP should be used. This function will
be removed in a future release.
.SH RETURN VALUE
A pointer to a zero terminated string or NULL if it failed.
.SH "SEE ALSO"
-.I curl_easy_escape(3), curl_easy_unescape(3), curl_free(3), RFC 2396
+.br curl_easy_escape "(3)," curl_easy_unescape "(3)," curl_free "(3)," RFC 2396
diff --git a/docs/libcurl/curl_unescape.html b/docs/libcurl/curl_unescape.html
deleted file mode 100644
index 5e34606e..00000000
--- a/docs/libcurl/curl_unescape.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_unescape man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_unescape - URL decodes the given string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">char *curl_unescape( char * url , int length );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Obsolete function. Use <a class="emphasis" href="./curl_easy_unescape.html">curl_easy_unescape(3)</a> instead!
-<p class="level0">This function will convert the given URL encoded input string to a "plain string" and return that as a new allocated string. All input characters that are URL encoded (%XX where XX is a two-digit hexadecimal number) will be converted to their plain text versions.
-<p class="level0">If the 'length' argument is set to 0, curl_unescape() will use strlen() on the input 'url' string to find out the size.
-<p class="level0">You must curl_free() the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Since 7.15.4, <a class="emphasis" href="./curl_easy_unescape.html">curl_easy_unescape(3)</a> should be used. This function will be removed in a future release. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="emphasis">curl_easy_escape(3), curl_easy_unescape(3), curl_free(3), RFC 2396</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_unescape.pdf b/docs/libcurl/curl_unescape.pdf
deleted file mode 100644
index ebce79b8..00000000
--- a/docs/libcurl/curl_unescape.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_version.3 b/docs/libcurl/curl_version.3
index 24793cae..03922c93 100644
--- a/docs/libcurl/curl_version.3
+++ b/docs/libcurl/curl_version.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 curl_version 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
.SH NAME
curl_version - returns the libcurl version string
@@ -12,7 +30,10 @@ curl_version - returns the libcurl version string
.SH DESCRIPTION
Returns a human readable string with the version number of libcurl and some of
its important components (like OpenSSL version).
+
+We recommend using \fIcurl_version_info(3)\fP instead!
.SH RETURN VALUE
-A pointer to a zero terminated string.
+A pointer to a zero terminated string. The string resides in a statically
+allocated buffer and must not be freed by the caller.
.SH "SEE ALSO"
.BR curl_version_info "(3)"
diff --git a/docs/libcurl/curl_version.html b/docs/libcurl/curl_version.html
deleted file mode 100644
index d2f1032a..00000000
--- a/docs/libcurl/curl_version.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<html><head>
-<title>curl_version man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_version - returns the libcurl version string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">char *curl_version( );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Returns a human readable string with the version number of libcurl and some of its important components (like OpenSSL version). <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_version_info.html">curl_version_info (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_version.pdf b/docs/libcurl/curl_version.pdf
deleted file mode 100644
index ba9bc8c5..00000000
--- a/docs/libcurl/curl_version.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_version_info.3 b/docs/libcurl/curl_version_info.3
index 4481830a..e9d5ab70 100644
--- a/docs/libcurl/curl_version_info.3
+++ b/docs/libcurl/curl_version_info.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_version_info 3 "10 June 2009" "libcurl 7.19.6" "libcurl Manual"
+.TH curl_version_info 3 "2 Nov 2014" "libcurl 7.40.0" "libcurl Manual"
.SH NAME
curl_version_info - returns run-time libcurl version info
.SH SYNOPSIS
@@ -29,12 +29,13 @@ curl_version_info - returns run-time libcurl version info
.BI "curl_version_info_data *curl_version_info( CURLversion "type ");"
.ad
.SH DESCRIPTION
-Returns a pointer to a filled in struct with information about various
-run-time features in libcurl. \fItype\fP should be set to the version of this
-functionality by the time you write your program. This way, libcurl will
-always return a proper struct that your program understands, while programs in
-the future might get a different struct. CURLVERSION_NOW will be the most
-recent one for the library you have installed:
+Returns a pointer to a filled in static struct with information about various
+features in the running version of libcurl. \fItype\fP should be set to the
+version of this functionality by the time you write your program. This way,
+libcurl will always return a proper struct that your program understands,
+while programs in the future might get a different
+struct. \fBCURLVERSION_NOW\fP will be the most recent one for the library you
+have installed:
data = curl_version_info(CURLVERSION_NOW);
@@ -56,7 +57,7 @@ typedef struct {
char *ssl_version; /* human readable string */
long ssl_version_num; /* not used, always zero */
const char *libz_version; /* human readable string */
- const char **protocols; /* list of protocols */
+ const char * const *protocols; /* protocols */
/* when 'age' is 1 or higher, the members below also exist: */
const char *ares; /* human readable string */
@@ -65,7 +66,8 @@ typedef struct {
/* when 'age' is 2 or higher, the member below also exists: */
const char *libidn; /* human readable string */
- /* when 'age' is 3 or higher, the members below also exist: */
+ /* when 'age' is 3 or higher (7.16.1 or later), the members below also
+ exist */
int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
const char *libssh_version; /* human readable string */
@@ -94,7 +96,10 @@ bits are:
.IP CURL_VERSION_IPV6
supports IPv6
.IP CURL_VERSION_KERBEROS4
-supports kerberos4 (when using FTP)
+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)
.IP CURL_VERSION_SSL
supports SSL (HTTPS/FTPS) (Added in 7.10)
.IP CURL_VERSION_LIBZ
@@ -122,18 +127,33 @@ 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 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)
+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)
.IP CURL_VERSION_CONV
libcurl was built with support for character conversions, as provided by the
CURLOPT_CONV_* callbacks. (Added in 7.15.4)
+.IP CURL_VERSION_TLSAUTH_SRP
+libcurl was built with support for TLS-SRP. (Added in 7.21.4)
+.IP CURL_VERSION_NTLM_WB
+libcurl was built with support for NTLM delegation to a winbind helper.
+(Added in 7.22.0)
+.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 the numerical OpenSSL version value as defined by the
-OpenSSL project. If libcurl has no SSL support, this is 0.
+\fIssl_version_num\fP is always 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/curl_version_info.html b/docs/libcurl/curl_version_info.html
deleted file mode 100644
index b6602bf2..00000000
--- a/docs/libcurl/curl_version_info.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<html><head>
-<title>curl_version_info man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_version_info - returns run-time libcurl version info <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
-<p class="level0"><span Class="bold">curl_version_info_data *curl_version_info( CURLversion type );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Returns a pointer to a filled in struct with information about various run-time features in libcurl. <span Class="emphasis">type</span> should be set to the version of this functionality by the time you write your program. This way, libcurl will always return a proper struct that your program understands, while programs in the future might get a different struct. CURLVERSION_NOW will be the most recent one for the library you have installed:
-<p class="level0">&nbsp; data = curl_version_info(CURLVERSION_NOW);
-<p class="level0">Applications should use this information to judge if things are possible to do or not, instead of using compile-time checks, as dynamic/DLL libraries can be changed independent of applications.
-<p class="level0">The curl_version_info_data struct looks like this
-<p class="level0"><pre>
-<p class="level0">typedef struct {
- &nbsp; CURLversion age; /* see description below */
- <p class="level0">&nbsp; /* when 'age' is 0 or higher, the members below also exist: */
- &nbsp; const char *version; /* human readable string */
- &nbsp; unsigned int version_num; /* numeric representation */
- &nbsp; const char *host; /* human readable string */
- &nbsp; int features; /* bitmask, see below */
- &nbsp; char *ssl_version; /* human readable string */
- &nbsp; long ssl_version_num; /* not used, always zero */
- &nbsp; const char *libz_version; /* human readable string */
- &nbsp; const char **protocols; /* list of protocols */
- <p class="level0">&nbsp; /* when 'age' is 1 or higher, the members below also exist: */
- &nbsp; const char *ares; /* human readable string */
- &nbsp; int ares_num; /* number */
- <p class="level0">&nbsp; /* when 'age' is 2 or higher, the member below also exists: */
- &nbsp; const char *libidn; /* human readable string */
- <p class="level0">&nbsp; /* when 'age' is 3 or higher, the members below also exist: */
- &nbsp; int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
- <p class="level0">&nbsp; const char *libssh_version; /* human readable string */
- <p class="level0">} curl_version_info_data;
- </pre>
-
-<p class="level0">
-<p class="level0"><span Class="emphasis">age</span> describes what the age of this struct is. The number depends on how new the libcurl you're using is. You are however guaranteed to get a struct that you have a matching struct for in the header, as you tell libcurl your "age" with the input argument.
-<p class="level0"><span Class="emphasis">version</span> is just an ascii string for the libcurl version.
-<p class="level0"><span Class="emphasis">version_num</span> is a 24 bit number created like this: &lt;8 bits major number&gt; | &lt;8 bits minor number&gt; | &lt;8 bits patch number&gt;. Version 7.9.8 is therefore returned as 0x070908.
-<p class="level0"><span Class="emphasis">host</span> is an ascii string showing what host information that this libcurl was built for. As discovered by a configure script or set by the build environment.
-<p class="level0"><span Class="emphasis">features</span> can have none, one or more bits set, and the currently defined bits are:
-<p class="level1">
-<p class="level0"><a name="CURLVERSIONIPV6"></a><span class="nroffip">CURL_VERSION_IPV6</span>
-<p class="level1">supports IPv6
-<p class="level0"><a name="CURLVERSIONKERBEROS4"></a><span class="nroffip">CURL_VERSION_KERBEROS4</span>
-<p class="level1">supports kerberos4 (when using FTP)
-<p class="level0"><a name="CURLVERSIONSSL"></a><span class="nroffip">CURL_VERSION_SSL</span>
-<p class="level1">supports SSL (HTTPS/FTPS) (Added in 7.10)
-<p class="level0"><a name="CURLVERSIONLIBZ"></a><span class="nroffip">CURL_VERSION_LIBZ</span>
-<p class="level1">supports HTTP deflate using libz (Added in 7.10)
-<p class="level0"><a name="CURLVERSIONNTLM"></a><span class="nroffip">CURL_VERSION_NTLM</span>
-<p class="level1">supports HTTP NTLM (added in 7.10.6)
-<p class="level0"><a name="CURLVERSIONGSSNEGOTIATE"></a><span class="nroffip">CURL_VERSION_GSSNEGOTIATE</span>
-<p class="level1">supports HTTP GSS-Negotiate (added in 7.10.6)
-<p class="level0"><a name="CURLVERSIONDEBUG"></a><span class="nroffip">CURL_VERSION_DEBUG</span>
-<p class="level1">libcurl was built with debug capabilities (added in 7.10.6)
-<p class="level0"><a name="CURLVERSIONCURLDEBUG"></a><span class="nroffip">CURL_VERSION_CURLDEBUG</span>
-<p class="level1">libcurl was built with memory tracking debug capabilities. This is mainly of interest for libcurl hackers. (added in 7.19.6)
-<p class="level0"><a name="CURLVERSIONASYNCHDNS"></a><span class="nroffip">CURL_VERSION_ASYNCHDNS</span>
-<p class="level1">libcurl was built with support for asynchronous name lookups, which allows more exact timeouts (even on Windows) and less blocking when using the multi interface. (added in 7.10.7)
-<p class="level0"><a name="CURLVERSIONSPNEGO"></a><span class="nroffip">CURL_VERSION_SPNEGO</span>
-<p class="level1">libcurl was built with support for SPNEGO authentication (Simple and Protected GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
-<p class="level0"><a name="CURLVERSIONLARGEFILE"></a><span class="nroffip">CURL_VERSION_LARGEFILE</span>
-<p class="level1">libcurl was built with support for large files. (Added in 7.11.1)
-<p class="level0"><a name="CURLVERSIONIDN"></a><span class="nroffip">CURL_VERSION_IDN</span>
-<p class="level1">libcurl was built with support for IDNA, domain names with international letters. (Added in 7.12.0)
-<p class="level0"><a name="CURLVERSIONSSPI"></a><span class="nroffip">CURL_VERSION_SSPI</span>
-<p class="level1">libcurl was built with support for SSPI. This is only available on Windows and 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)
-<p class="level0"><a name="CURLVERSIONCONV"></a><span class="nroffip">CURL_VERSION_CONV</span>
-<p class="level1">libcurl was built with support for character conversions, as provided by the CURLOPT_CONV_* callbacks. (Added in 7.15.4)
-<p class="level0"><span Class="emphasis">ssl_version</span> is an ASCII string for the OpenSSL version used. If libcurl has no SSL support, this is NULL.
-<p class="level0"><span Class="emphasis">ssl_version_num</span> is the numerical OpenSSL version value as defined by the OpenSSL project. If libcurl has no SSL support, this is 0.
-<p class="level0"><span Class="emphasis">libz_version</span> is an ASCII string (there is no numerical version). If libcurl has no libz support, this is NULL.
-<p class="level0"><span Class="emphasis">protocols</span> is a pointer to an array of char * pointers, containing the names protocols that libcurl supports (using lowercase letters). The protocol names are the same as would be used in URLs. The array is terminated by a NULL entry. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a curl_version_info_data struct. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="emphasis" href="./curl_version.html">curl_version(3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_version_info.pdf b/docs/libcurl/curl_version_info.pdf
deleted file mode 100644
index 356a0b4d..00000000
--- a/docs/libcurl/curl_version_info.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/getinfo-times b/docs/libcurl/getinfo-times
new file mode 100644
index 00000000..bb0fdcb1
--- /dev/null
+++ b/docs/libcurl/getinfo-times
@@ -0,0 +1,27 @@
+An overview of the six time values available from curl_easy_getinfo()
+
+curl_easy_perform()
+ |
+ |--NT
+ |--|--CT
+ |--|--|--PT
+ |--|--|--|--ST
+ |--|--|--TT
+ |--|--|--|--|--RT
+
+NT = CURLINFO_NAMELOOKUP_TIME. The time it took from the start until the name
+ resolving was completed.
+CT = CURLINFO_CONNECT_TIME. The time it took from the start until the connect
+ to the remote host (or proxy) was completed.
+PT = CURLINFO_PRETRANSFER_TIME. The time it took from the start until the file
+ transfer is just about to begin. This includes all pre-transfer commands
+ and negotiations that are specific to the particular protocol(s)
+ involved.
+ST = CURLINFO_STARTTRANSFER_TIME. The time it took from the start until the
+ first byte is just about to be transferred.
+TT = CURLINFO_TOTAL_TIME. Time of the previous transfer. This time does not
+ include the connect time (CT), so if you want the complete operation
+ time, you should add that.
+RT = CURLINFO_REDIRECT_TIME. The time it took for all redirection steps
+ include name lookup, connect, pretransfer and transfer before final
+ transaction was started. So, this is zero if no redirection took place.
diff --git a/docs/libcurl/index.html b/docs/libcurl/index.html
index 287a2dd6..ca773135 100644
--- a/docs/libcurl/index.html
+++ b/docs/libcurl/index.html
@@ -21,40 +21,49 @@
<H2>Library Functions (A-Z)</H2>
<a href="curl_easy_cleanup.html">curl_easy_cleanup</A>
<br><a href="curl_easy_duphandle.html">curl_easy_duphandle</A>
+<br><a href="curl_easy_escape.html">curl_easy_escape</A>
<br><a href="curl_easy_getinfo.html">curl_easy_getinfo</A>
<br><a href="curl_easy_init.html">curl_easy_init</A>
+<br><a href="curl_easy_pause.html">curl_easy_pause</A>
<br><a href="curl_easy_perform.html">curl_easy_perform</A>
<br><a href="curl_easy_recv.html">curl_easy_recv</A>
<br><a href="curl_easy_reset.html">curl_easy_reset</A>
<br><a href="curl_easy_send.html">curl_easy_send</A>
<br><a href="curl_easy_setopt.html">curl_easy_setopt</A>
<br><a href="curl_easy_strerror.html">curl_easy_strerror</A>
-<br><a href="curl_escape.html">curl_escape</A>
+<br><a href="curl_easy_unescape.html">curl_easy_unescape</A>
+<br><a href="curl_escape.html">curl_escape</A> (deprecated)
<br><a href="curl_formadd.html">curl_formadd</A>
<br><a href="curl_formfree.html">curl_formfree</A>
+<br><a href="curl_formget.html">curl_formget</A>
<br><a href="curl_free.html">curl_free</A>
<br><a href="curl_getdate.html">curl_getdate</A>
-<br><a href="curl_getenv.html">curl_getenv</A>
+<br><a href="curl_getenv.html">curl_getenv</A> (deprecated)
<br><a href="curl_global_cleanup.html">curl_global_cleanup</A>
<br><a href="curl_global_init.html">curl_global_init</A>
<br><a href="curl_global_init_mem.html">curl_global_init_mem</A>
-<br><a href="curl_mprintf.html">curl_mprintf</A>
+<br><a href="curl_mprintf.html">curl_mprintf</A> (deprecated)
<br><a href="curl_multi_add_handle.html">curl_multi_add_handle</a>
+<br><a href="curl_multi_assign.html">curl_multi_assign</a>
<br><a href="curl_multi_cleanup.html">curl_multi_cleanup</a>
<br><a href="curl_multi_fdset.html">curl_multi_fdset</a>
<br><a href="curl_multi_info_read.html">curl_multi_info_read</a>
<br><a href="curl_multi_init.html">curl_multi_init</a>
<br><a href="curl_multi_perform.html">curl_multi_perform</a>
<br><a href="curl_multi_remove_handle.html">curl_multi_remove_handle</a>
-<br><a href="curl_multi_strerror.html">curl_multi_strerror.html</a>
+<br><a href="curl_multi_setopt.html">curl_multi_setopt</a>
+<br><a href="curl_multi_socket.html">curl_multi_socket</a> (deprecated)
+<br><a href="curl_multi_socket_action.html">curl_multi_socket_action</a>
+<br><a href="curl_multi_strerror.html">curl_multi_strerror</a>
+<br><a href="curl_multi_timeout.html">curl_multi_timeout</a> (deprecated)
<br><a href="curl_share_cleanup.html">curl_share_cleanup</A>
<br><a href="curl_share_init.html">curl_share_init</A>
<br><a href="curl_share_setopt.html">curl_share_setopt</A>
-<br><a href="curl_share_strerror.html">curl_share_strerror.html</a>
+<br><a href="curl_share_strerror.html">curl_share_strerror</a>
<br><a href="curl_slist_append.html">curl_slist_append</A>
<br><a href="curl_slist_free_all.html">curl_slist_free_all</A>
<br><a href="curl_strequal.html">curl_strequal and curl_strnequal</A>
-<br><a href="curl_unescape.html">curl_unescape</A>
+<br><a href="curl_unescape.html">curl_unescape</A> (deprecated)
<br><a href="curl_version.html">curl_version</A>
<br><a href="curl_version_info.html">curl_version_info</A>
diff --git a/docs/libcurl/libcurl-easy.3 b/docs/libcurl/libcurl-easy.3
index 803e5424..f8506a26 100644
--- a/docs/libcurl/libcurl-easy.3
+++ b/docs/libcurl/libcurl-easy.3
@@ -1,7 +1,25 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
-.TH libcurl 3 "12 Aug 2003" "libcurl 7.10.7" "libcurl easy interface"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 libcurl 3 "19 Sep 2014" "libcurl" "libcurl easy interface"
.SH NAME
libcurl-easy \- easy interface overview
.SH DESCRIPTION
@@ -15,6 +33,17 @@ 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).
@@ -24,4 +53,6 @@ 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-easy.html b/docs/libcurl/libcurl-easy.html
deleted file mode 100644
index 8c9f5e51..00000000
--- a/docs/libcurl/libcurl-easy.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html><head>
-<title>libcurl man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-easy - easy interface overview <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">When using libcurl's "easy" interface you init your session and get a handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> to get the handle.
-<p class="level0">You continue by setting all the options you want in the upcoming transfer, the most important among them is the URL itself (you can't transfer anything 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. <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> is used for all this.
-<p class="level0">When all is setup, you tell libcurl to perform the transfer using <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a>. It will then do the entire operation and won't return until it is done (successfully or not).
-<p class="level0">After the transfer has been made, you can set new options and make another transfer, or if you're done, cleanup the session by calling <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>. If you want persistent connections, you don't cleanup immediately, but instead run ahead and perform other transfers using the same easy handle.
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-easy.pdf b/docs/libcurl/libcurl-easy.pdf
deleted file mode 100644
index b26357e8..00000000
--- a/docs/libcurl/libcurl-easy.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl-errors.3 b/docs/libcurl/libcurl-errors.3
index c3c854e9..07091b5e 100644
--- a/docs/libcurl/libcurl-errors.3
+++ b/docs/libcurl/libcurl-errors.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,11 +28,11 @@ This man page includes most, if not all, available error codes in libcurl.
Why they occur and possibly what you can do to fix the problem are also included.
.SH "CURLcode"
Almost all "easy" interface functions return a CURLcode error code. No matter
-what, using the \fIcurl_easy_setopt(3)\fP option \fICURLOPT_ERRORBUFFER\fP is
-a good idea as it will give you a human readable error string that may offer
-more details about the cause of the error than just the error code.
-\fIcurl_easy_strerror(3)\fP can be called to get an error string from a
-given CURLcode number.
+what, using the \fIcurl_easy_setopt(3)\fP option \fICURLOPT_ERRORBUFFER(3)\fP
+is a good idea as it will give you a human readable error string that may
+offer more details about the cause of the error than just the error code.
+\fIcurl_easy_strerror(3)\fP can be called to get an error string from a given
+CURLcode number.
CURLcode is one of the following:
.IP "CURLE_OK (0)"
@@ -44,9 +44,15 @@ can be a misspelled protocol string or just a protocol libcurl has no code
for.
.IP "CURLE_FAILED_INIT (2)"
Very early initialization code failed. This is likely to be an internal error
-or problem.
+or problem, or a resource problem where something fundamental couldn't get
+done at init time.
.IP "CURLE_URL_MALFORMAT (3)"
The URL was not properly formatted.
+.IP "CURLE_NOT_BUILT_IN (4)"
+A requested feature, protocol or option was not found built-in in this libcurl
+due to a build-time decision. This means that a feature or option was not
+enabled or explicitly disabled when libcurl was built and in order to get it
+to function you have to get a rebuilt libcurl.
.IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
Couldn't resolve proxy. The given proxy host could not be resolved.
.IP "CURLE_COULDNT_RESOLVE_HOST (6)"
@@ -60,22 +66,26 @@ remote server is probably not an OK FTP server.
.IP "CURLE_REMOTE_ACCESS_DENIED (9)"
We were denied access to the resource given in the URL. For FTP, this occurs
while trying to change to the remote directory.
+.IP "CURLE_FTP_ACCEPT_FAILED (10)"
+While waiting for the server to connect back when an active FTP session is
+used, an error code was sent over the control connection or similar.
.IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
After having sent the FTP password to the server, libcurl expects a proper
reply. This error code indicates that an unexpected code was returned.
+.IP "CURLE_FTP_ACCEPT_TIMEOUT (12)"
+During an active FTP session while waiting for the server to connect, the
+\fICURLOPT_ACCEPTTIMOUT_MS(3)\fP (or the internal default) timeout expired.
.IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
libcurl failed to get a sensible result back from the server as a response to
either a PASV or a EPSV command. The server is flawed.
.IP "CURLE_FTP_WEIRD_227_FORMAT (14)"
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_PRET_FAILED (84)"
-The FTP server does not understand the PRET command at all or does not support
-the given argument. Be careful when using \fICURLOPT_CUSTOMREQUEST\fP, a
-custom LIST command will be sent with PRET CMD before PASV as well. (Added in
-7.20.0)
.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)"
@@ -90,8 +100,8 @@ When sending custom "QUOTE" commands to the remote server, one of the commands
returned an error code that was 400 or higher (for FTP) or otherwise
indicated unsuccessful completion of the command.
.IP "CURLE_HTTP_RETURNED_ERROR (22)"
-This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server
-returns an error code that is >= 400.
+This is returned if \fICURLOPT_FAILONERROR(3)\fP is set TRUE and the HTTP
+server returns an error code that is >= 400.
.IP "CURLE_WRITE_ERROR (23)"
An error occurred when writing received data to a local file, or an error was
returned to libcurl from a write callback.
@@ -109,7 +119,8 @@ Operation timeout. The specified time-out period was reached according to the
conditions.
.IP "CURLE_FTP_PORT_FAILED (30)"
The FTP PORT command returned error. This mostly happens when you haven't
-specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
+specified a good enough address for libcurl to use. See
+\fICURLOPT_FTPPORT(3)\fP.
.IP "CURLE_FTP_COULDNT_USE_REST (31)"
The FTP REST command returned error. This should never happen if the server is
sane.
@@ -141,13 +152,15 @@ Internal error. A function was called with a bad parameter.
.IP "CURLE_INTERFACE_FAILED (45)"
Interface error. A specified outgoing interface could not be used. Set which
interface to use for outgoing connections' source IP address with
-CURLOPT_INTERFACE.
+\fICURLOPT_INTERFACE(3)\fP.
.IP "CURLE_TOO_MANY_REDIRECTS (47)"
Too many redirects. When following redirects, libcurl hit the maximum amount.
-Set your limit with CURLOPT_MAXREDIRS.
-.IP "CURLE_UNKNOWN_TELNET_OPTION (48)"
-An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to
-the appropriate documentation.
+Set your limit with \fICURLOPT_MAXREDIRS(3)\fP.
+.IP "CURLE_UNKNOWN_OPTION (48)"
+An option passed to libcurl is not recognized/known. Refer to the appropriate
+documentation. This is most likely a problem in the program that uses
+libcurl. The error buffer might contain more specific information about which
+exact option it concerns.
.IP "CURLE_TELNET_OPTION_SYNTAX (49)"
A telnet option string was Illegally formatted.
.IP "CURLE_PEER_FAILED_VERIFICATION (51)"
@@ -219,7 +232,10 @@ Failed to load CRL file (Added in 7.19.0)
.IP "CURLE_SSL_ISSUER_ERROR (83)"
Issuer check failed (Added in 7.19.0)
.IP "CURLE_FTP_PRET_FAILED (84)"
-PRET command failed
+The FTP server does not understand the PRET command at all or does not support
+the given argument. Be careful when using \fICURLOPT_CUSTOMREQUEST(3)\fP, a
+custom LIST command will be sent with PRET CMD before PASV as well. (Added in
+7.20.0)
.IP "CURLE_RTSP_CSEQ_ERROR (85)"
Mismatch of RTSP CSeq numbers.
.IP "CURLE_RTSP_SESSION_ERROR (86)"
@@ -228,6 +244,9 @@ Mismatch of RTSP Session Identifiers.
Unable to parse FTP file list (during FTP wildcard downloading).
.IP "CURLE_CHUNK_FAILED (88)"
Chunk callback reported error.
+.IP "CURLE_NO_CONNECTION_AVAILABLE (89)"
+(For internal use only, will never be returned by libcurl) No connection
+available, the session will be queued. (added in 7.30.0)
.IP "CURLE_OBSOLETE*"
These error codes will never be returned. They were used in an old libcurl
version and are currently unused.
@@ -236,7 +255,10 @@ This is the generic return code used by functions in the libcurl multi
interface. Also consider \fIcurl_multi_strerror(3)\fP.
.IP "CURLM_CALL_MULTI_PERFORM (-1)"
This is not really an error. It means you should call
-\fIcurl_multi_perform(3)\fP again without doing select() or similar in between.
+\fIcurl_multi_perform(3)\fP again without doing select() or similar in
+between. Before version 7.20.0 this could be returned by
+\fIcurl_multi_perform(3)\fP, but in later versions this return code is never
+used.
.IP "CURLM_OK (0)"
Things are fine.
.IP "CURLM_BAD_HANDLE (1)"
@@ -255,6 +277,9 @@ The passed-in socket is not a valid one that libcurl already knows about.
.IP "CURLM_UNKNOWN_OPTION (6)"
curl_multi_setopt() with unsupported option
(Added in 7.15.4)
+.IP "CURLM_ADDED_ALREADY (7)"
+An easy handle already added to a multi handle was attempted to get added a
+second time. (Added in 7.32.1)
.SH "CURLSHcode"
The "share" interface will return a CURLSHcode to indicate when an error has
occurred. Also consider \fIcurl_share_strerror(3)\fP.
@@ -269,3 +294,10 @@ An invalid share object was passed to the function.
.IP "CURLSHE_NOMEM (4)"
Not enough memory was available.
(Added in 7.12.0)
+.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-errors.html b/docs/libcurl/libcurl-errors.html
deleted file mode 100644
index 0a2cf708..00000000
--- a/docs/libcurl/libcurl-errors.html
+++ /dev/null
@@ -1,236 +0,0 @@
-<html><head>
-<title>libcurl-errors man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-errors - error codes in libcurl <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This man page includes most, if not all, available error codes in libcurl. Why they occur and possibly what you can do to fix the problem are also included. <a name="CURLcode"></a><h2 class="nroffsh">CURLcode</h2>
-<p class="level0">Almost all "easy" interface functions return a CURLcode error code. No matter what, using the <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> option <span Class="emphasis">CURLOPT_ERRORBUFFER</span> is a good idea as it will give you a human readable error string that may offer more details about the cause of the error than just the error code. <a class="emphasis" href="./curl_easy_strerror.html">curl_easy_strerror(3)</a> can be called to get an error string from a given CURLcode number.
-<p class="level0">CURLcode is one of the following:
-<p class="level0"><a name="CURLEOK"></a><span class="nroffip">CURLE_OK (0)</span>
-<p class="level1">All fine. Proceed as usual.
-<p class="level0"><a name="CURLEUNSUPPORTEDPROTOCOL"></a><span class="nroffip">CURLE_UNSUPPORTED_PROTOCOL (1)</span>
-<p class="level1">The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you didn't use, it can be a misspelled protocol string or just a protocol libcurl has no code for.
-<p class="level0"><a name="CURLEFAILEDINIT"></a><span class="nroffip">CURLE_FAILED_INIT (2)</span>
-<p class="level1">Very early initialization code failed. This is likely to be an internal error or problem.
-<p class="level0"><a name="CURLEURLMALFORMAT"></a><span class="nroffip">CURLE_URL_MALFORMAT (3)</span>
-<p class="level1">The URL was not properly formatted.
-<p class="level0"><a name="CURLECOULDNTRESOLVEPROXY"></a><span class="nroffip">CURLE_COULDNT_RESOLVE_PROXY (5)</span>
-<p class="level1">Couldn't resolve proxy. The given proxy host could not be resolved.
-<p class="level0"><a name="CURLECOULDNTRESOLVEHOST"></a><span class="nroffip">CURLE_COULDNT_RESOLVE_HOST (6)</span>
-<p class="level1">Couldn't resolve host. The given remote host was not resolved.
-<p class="level0"><a name="CURLECOULDNTCONNECT"></a><span class="nroffip">CURLE_COULDNT_CONNECT (7)</span>
-<p class="level1">Failed to connect() to host or proxy.
-<p class="level0"><a name="CURLEFTPWEIRDSERVERREPLY"></a><span class="nroffip">CURLE_FTP_WEIRD_SERVER_REPLY (8)</span>
-<p class="level1">After connecting to a FTP server, libcurl expects to get a certain reply back. This error code implies that it got a strange or bad reply. The given remote server is probably not an OK FTP server.
-<p class="level0"><a name="CURLEREMOTEACCESSDENIED"></a><span class="nroffip">CURLE_REMOTE_ACCESS_DENIED (9)</span>
-<p class="level1">We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory.
-<p class="level0"><a name="CURLEFTPWEIRDPASSREPLY"></a><span class="nroffip">CURLE_FTP_WEIRD_PASS_REPLY (11)</span>
-<p class="level1">After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned.
-<p class="level0"><a name="CURLEFTPWEIRDPASVREPLY"></a><span class="nroffip">CURLE_FTP_WEIRD_PASV_REPLY (13)</span>
-<p class="level1">libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command. The server is flawed.
-<p class="level0"><a name="CURLEFTPWEIRD227FORMAT"></a><span class="nroffip">CURLE_FTP_WEIRD_227_FORMAT (14)</span>
-<p class="level1">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.
-<p class="level0"><a name="CURLEFTPPRETFAILED"></a><span class="nroffip">CURLE_FTP_PRET_FAILED (84)</span>
-<p class="level1">The FTP server does not understand the PRET command at all or does not support the given argument. Be careful when using <span Class="emphasis">CURLOPT_CUSTOMREQUEST</span>, a custom LIST command will be sent with PRET CMD before PASV as well. (Added in 7.20.0)
-<p class="level0"><a name="CURLEFTPCANTGETHOST"></a><span class="nroffip">CURLE_FTP_CANT_GET_HOST (15)</span>
-<p class="level1">An internal failure to lookup the host used for the new connection.
-<p class="level0"><a name="CURLEFTPCOULDNTSETTYPE"></a><span class="nroffip">CURLE_FTP_COULDNT_SET_TYPE (17)</span>
-<p class="level1">Received an error when trying to set the transfer mode to binary or ASCII.
-<p class="level0"><a name="CURLEPARTIALFILE"></a><span class="nroffip">CURLE_PARTIAL_FILE (18)</span>
-<p class="level1">A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously given size.
-<p class="level0"><a name="CURLEFTPCOULDNTRETRFILE"></a><span class="nroffip">CURLE_FTP_COULDNT_RETR_FILE (19)</span>
-<p class="level1">This was either a weird reply to a 'RETR' command or a zero byte transfer complete.
-<p class="level0"><a name="CURLEQUOTEERROR"></a><span class="nroffip">CURLE_QUOTE_ERROR (21)</span>
-<p class="level1">When sending custom "QUOTE" commands to the remote server, one of the commands returned an error code that was 400 or higher (for FTP) or otherwise indicated unsuccessful completion of the command.
-<p class="level0"><a name="CURLEHTTPRETURNEDERROR"></a><span class="nroffip">CURLE_HTTP_RETURNED_ERROR (22)</span>
-<p class="level1">This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is &gt;= 400.
-<p class="level0"><a name="CURLEWRITEERROR"></a><span class="nroffip">CURLE_WRITE_ERROR (23)</span>
-<p class="level1">An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback.
-<p class="level0"><a name="CURLEUPLOADFAILED"></a><span class="nroffip">CURLE_UPLOAD_FAILED (25)</span>
-<p class="level1">Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server's explanation for this.
-<p class="level0"><a name="CURLEREADERROR"></a><span class="nroffip">CURLE_READ_ERROR (26)</span>
-<p class="level1">There was a problem reading a local file or an error returned by the read callback.
-<p class="level0"><a name="CURLEOUTOFMEMORY"></a><span class="nroffip">CURLE_OUT_OF_MEMORY (27)</span>
-<p class="level1">A memory allocation request failed. This is serious badness and things are severely screwed up if this ever occurs.
-<p class="level0"><a name="CURLEOPERATIONTIMEDOUT"></a><span class="nroffip">CURLE_OPERATION_TIMEDOUT (28)</span>
-<p class="level1">Operation timeout. The specified time-out period was reached according to the conditions.
-<p class="level0"><a name="CURLEFTPPORTFAILED"></a><span class="nroffip">CURLE_FTP_PORT_FAILED (30)</span>
-<p class="level1">The FTP PORT command returned error. This mostly happens when you haven't specified a good enough address for libcurl to use. See <span Class="emphasis">CURLOPT_FTPPORT</span>.
-<p class="level0"><a name="CURLEFTPCOULDNTUSEREST"></a><span class="nroffip">CURLE_FTP_COULDNT_USE_REST (31)</span>
-<p class="level1">The FTP REST command returned error. This should never happen if the server is sane.
-<p class="level0"><a name="CURLERANGEERROR"></a><span class="nroffip">CURLE_RANGE_ERROR (33)</span>
-<p class="level1">The server does not support or accept range requests.
-<p class="level0"><a name="CURLEHTTPPOSTERROR"></a><span class="nroffip">CURLE_HTTP_POST_ERROR (34)</span>
-<p class="level1">This is an odd error that mainly occurs due to internal confusion.
-<p class="level0"><a name="CURLESSLCONNECTERROR"></a><span class="nroffip">CURLE_SSL_CONNECT_ERROR (35)</span>
-<p class="level1">A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others.
-<p class="level0"><a name="CURLEBADDOWNLOADRESUME"></a><span class="nroffip">CURLE_BAD_DOWNLOAD_RESUME (36)</span>
-<p class="level1">The download could not be resumed because the specified offset was out of the file boundary.
-<p class="level0"><a name="CURLEFILECOULDNTREADFILE"></a><span class="nroffip">CURLE_FILE_COULDNT_READ_FILE (37)</span>
-<p class="level1">A file given with FILE:// couldn't be opened. Most likely because the file path doesn't identify an existing file. Did you check file permissions?
-<p class="level0"><a name="CURLELDAPCANNOTBIND"></a><span class="nroffip">CURLE_LDAP_CANNOT_BIND (38)</span>
-<p class="level1">LDAP cannot bind. LDAP bind operation failed.
-<p class="level0"><a name="CURLELDAPSEARCHFAILED"></a><span class="nroffip">CURLE_LDAP_SEARCH_FAILED (39)</span>
-<p class="level1">LDAP search failed.
-<p class="level0"><a name="CURLEFUNCTIONNOTFOUND"></a><span class="nroffip">CURLE_FUNCTION_NOT_FOUND (41)</span>
-<p class="level1">Function not found. A required zlib function was not found.
-<p class="level0"><a name="CURLEABORTEDBYCALLBACK"></a><span class="nroffip">CURLE_ABORTED_BY_CALLBACK (42)</span>
-<p class="level1">Aborted by callback. A callback returned "abort" to libcurl.
-<p class="level0"><a name="CURLEBADFUNCTIONARGUMENT"></a><span class="nroffip">CURLE_BAD_FUNCTION_ARGUMENT (43)</span>
-<p class="level1">Internal error. A function was called with a bad parameter.
-<p class="level0"><a name="CURLEINTERFACEFAILED"></a><span class="nroffip">CURLE_INTERFACE_FAILED (45)</span>
-<p class="level1">Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with CURLOPT_INTERFACE.
-<p class="level0"><a name="CURLETOOMANYREDIRECTS"></a><span class="nroffip">CURLE_TOO_MANY_REDIRECTS (47)</span>
-<p class="level1">Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit with CURLOPT_MAXREDIRS.
-<p class="level0"><a name="CURLEUNKNOWNTELNETOPTION"></a><span class="nroffip">CURLE_UNKNOWN_TELNET_OPTION (48)</span>
-<p class="level1">An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to the appropriate documentation.
-<p class="level0"><a name="CURLETELNETOPTIONSYNTAX"></a><span class="nroffip">CURLE_TELNET_OPTION_SYNTAX (49)</span>
-<p class="level1">A telnet option string was Illegally formatted.
-<p class="level0"><a name="CURLEPEERFAILEDVERIFICATION"></a><span class="nroffip">CURLE_PEER_FAILED_VERIFICATION (51)</span>
-<p class="level1">The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK.
-<p class="level0"><a name="CURLEGOTNOTHING"></a><span class="nroffip">CURLE_GOT_NOTHING (52)</span>
-<p class="level1">Nothing was returned from the server, and under the circumstances, getting nothing is considered an error.
-<p class="level0"><a name="CURLESSLENGINENOTFOUND"></a><span class="nroffip">CURLE_SSL_ENGINE_NOTFOUND (53)</span>
-<p class="level1">The specified crypto engine wasn't found.
-<p class="level0"><a name="CURLESSLENGINESETFAILED"></a><span class="nroffip">CURLE_SSL_ENGINE_SETFAILED (54)</span>
-<p class="level1">Failed setting the selected SSL crypto engine as default!
-<p class="level0"><a name="CURLESENDERROR"></a><span class="nroffip">CURLE_SEND_ERROR (55)</span>
-<p class="level1">Failed sending network data.
-<p class="level0"><a name="CURLERECVERROR"></a><span class="nroffip">CURLE_RECV_ERROR (56)</span>
-<p class="level1">Failure with receiving network data.
-<p class="level0"><a name="CURLESSLCERTPROBLEM"></a><span class="nroffip">CURLE_SSL_CERTPROBLEM (58)</span>
-<p class="level1">problem with the local client certificate.
-<p class="level0"><a name="CURLESSLCIPHER"></a><span class="nroffip">CURLE_SSL_CIPHER (59)</span>
-<p class="level1">Couldn't use specified cipher.
-<p class="level0"><a name="CURLESSLCACERT"></a><span class="nroffip">CURLE_SSL_CACERT (60)</span>
-<p class="level1">Peer certificate cannot be authenticated with known CA certificates.
-<p class="level0"><a name="CURLEBADCONTENTENCODING"></a><span class="nroffip">CURLE_BAD_CONTENT_ENCODING (61)</span>
-<p class="level1">Unrecognized transfer encoding.
-<p class="level0"><a name="CURLELDAPINVALIDURL"></a><span class="nroffip">CURLE_LDAP_INVALID_URL (62)</span>
-<p class="level1">Invalid LDAP URL.
-<p class="level0"><a name="CURLEFILESIZEEXCEEDED"></a><span class="nroffip">CURLE_FILESIZE_EXCEEDED (63)</span>
-<p class="level1">Maximum file size exceeded.
-<p class="level0"><a name="CURLEUSESSLFAILED"></a><span class="nroffip">CURLE_USE_SSL_FAILED (64)</span>
-<p class="level1">Requested FTP SSL level failed.
-<p class="level0"><a name="CURLESENDFAILREWIND"></a><span class="nroffip">CURLE_SEND_FAIL_REWIND (65)</span>
-<p class="level1">When doing a send operation curl had to rewind the data to retransmit, but the rewinding operation failed.
-<p class="level0"><a name="CURLESSLENGINEINITFAILED"></a><span class="nroffip">CURLE_SSL_ENGINE_INITFAILED (66)</span>
-<p class="level1">Initiating the SSL Engine failed.
-<p class="level0"><a name="CURLELOGINDENIED"></a><span class="nroffip">CURLE_LOGIN_DENIED (67)</span>
-<p class="level1">The remote server denied curl to login (Added in 7.13.1)
-<p class="level0"><a name="CURLETFTPNOTFOUND"></a><span class="nroffip">CURLE_TFTP_NOTFOUND (68)</span>
-<p class="level1">File not found on TFTP server.
-<p class="level0"><a name="CURLETFTPPERM"></a><span class="nroffip">CURLE_TFTP_PERM (69)</span>
-<p class="level1">Permission problem on TFTP server.
-<p class="level0"><a name="CURLEREMOTEDISKFULL"></a><span class="nroffip">CURLE_REMOTE_DISK_FULL (70)</span>
-<p class="level1">Out of disk space on the server.
-<p class="level0"><a name="CURLETFTPILLEGAL"></a><span class="nroffip">CURLE_TFTP_ILLEGAL (71)</span>
-<p class="level1">Illegal TFTP operation.
-<p class="level0"><a name="CURLETFTPUNKNOWNID"></a><span class="nroffip">CURLE_TFTP_UNKNOWNID (72)</span>
-<p class="level1">Unknown TFTP transfer ID.
-<p class="level0"><a name="CURLEREMOTEFILEEXISTS"></a><span class="nroffip">CURLE_REMOTE_FILE_EXISTS (73)</span>
-<p class="level1">File already exists and will not be overwritten.
-<p class="level0"><a name="CURLETFTPNOSUCHUSER"></a><span class="nroffip">CURLE_TFTP_NOSUCHUSER (74)</span>
-<p class="level1">This error should never be returned by a properly functioning TFTP server.
-<p class="level0"><a name="CURLECONVFAILED"></a><span class="nroffip">CURLE_CONV_FAILED (75)</span>
-<p class="level1">Character conversion failed.
-<p class="level0"><a name="CURLECONVREQD"></a><span class="nroffip">CURLE_CONV_REQD (76)</span>
-<p class="level1">Caller must register conversion callbacks.
-<p class="level0"><a name="CURLESSLCACERTBADFILE"></a><span class="nroffip">CURLE_SSL_CACERT_BADFILE (77)</span>
-<p class="level1">Problem with reading the SSL CA cert (path? access rights?)
-<p class="level0"><a name="CURLEREMOTEFILENOTFOUND"></a><span class="nroffip">CURLE_REMOTE_FILE_NOT_FOUND (78)</span>
-<p class="level1">The resource referenced in the URL does not exist.
-<p class="level0"><a name="CURLESSH"></a><span class="nroffip">CURLE_SSH (79)</span>
-<p class="level1">An unspecified error occurred during the SSH session.
-<p class="level0"><a name="CURLESSLSHUTDOWNFAILED"></a><span class="nroffip">CURLE_SSL_SHUTDOWN_FAILED (80)</span>
-<p class="level1">Failed to shut down the SSL connection.
-<p class="level0"><a name="CURLEAGAIN"></a><span class="nroffip">CURLE_AGAIN (81)</span>
-<p class="level1">Socket is not ready for send/recv wait till it's ready and try again. This return code is only returned from <a class="emphasis" href="./curl_easy_recv.html">curl_easy_recv(3)</a> and <a class="emphasis" href="./curl_easy_send.html">curl_easy_send(3)</a> (Added in 7.18.2)
-<p class="level0"><a name="CURLESSLCRLBADFILE"></a><span class="nroffip">CURLE_SSL_CRL_BADFILE (82)</span>
-<p class="level1">Failed to load CRL file (Added in 7.19.0)
-<p class="level0"><a name="CURLESSLISSUERERROR"></a><span class="nroffip">CURLE_SSL_ISSUER_ERROR (83)</span>
-<p class="level1">Issuer check failed (Added in 7.19.0)
-<p class="level0"><a name="CURLEFTPPRETFAILED"></a><span class="nroffip">CURLE_FTP_PRET_FAILED (84)</span>
-<p class="level1">PRET command failed
-<p class="level0"><a name="CURLERTSPCSEQERROR"></a><span class="nroffip">CURLE_RTSP_CSEQ_ERROR (85)</span>
-<p class="level1">Mismatch of RTSP CSeq numbers.
-<p class="level0"><a name="CURLERTSPSESSIONERROR"></a><span class="nroffip">CURLE_RTSP_SESSION_ERROR (86)</span>
-<p class="level1">Mismatch of RTSP Session Identifiers.
-<p class="level0"><a name="CURLEFTPBADFILELIST"></a><span class="nroffip">CURLE_FTP_BAD_FILE_LIST (87)</span>
-<p class="level1">Unable to parse FTP file list (during FTP wildcard downloading).
-<p class="level0"><a name="CURLECHUNKFAILED"></a><span class="nroffip">CURLE_CHUNK_FAILED (88)</span>
-<p class="level1">Chunk callback reported error.
-<p class="level0"><a name="CURLEOBSOLETE"></a><span class="nroffip">CURLE_OBSOLETE*</span>
-<p class="level1">These error codes will never be returned. They were used in an old libcurl version and are currently unused. <a name="CURLMcode"></a><h2 class="nroffsh">CURLMcode</h2>
-<p class="level0">This is the generic return code used by functions in the libcurl multi interface. Also consider <a class="emphasis" href="./curl_multi_strerror.html">curl_multi_strerror(3)</a>.
-<p class="level0"><a name="CURLMCALLMULTIPERFORM"></a><span class="nroffip">CURLM_CALL_MULTI_PERFORM (-1)</span>
-<p class="level1">This is not really an error. It means you should call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> again without doing select() or similar in between.
-<p class="level0"><a name="CURLMOK"></a><span class="nroffip">CURLM_OK (0)</span>
-<p class="level1">Things are fine.
-<p class="level0"><a name="CURLMBADHANDLE"></a><span class="nroffip">CURLM_BAD_HANDLE (1)</span>
-<p class="level1">The passed-in handle is not a valid CURLM handle.
-<p class="level0"><a name="CURLMBADEASYHANDLE"></a><span class="nroffip">CURLM_BAD_EASY_HANDLE (2)</span>
-<p class="level1">An easy handle was not good/valid. It could mean that it isn't an easy handle at all, or possibly that the handle already is in used by this or another multi handle.
-<p class="level0"><a name="CURLMOUTOFMEMORY"></a><span class="nroffip">CURLM_OUT_OF_MEMORY (3)</span>
-<p class="level1">You are doomed.
-<p class="level0"><a name="CURLMINTERNALERROR"></a><span class="nroffip">CURLM_INTERNAL_ERROR (4)</span>
-<p class="level1">This can only be returned if libcurl bugs. Please report it to us!
-<p class="level0"><a name="CURLMBADSOCKET"></a><span class="nroffip">CURLM_BAD_SOCKET (5)</span>
-<p class="level1">The passed-in socket is not a valid one that libcurl already knows about. (Added in 7.15.4)
-<p class="level0"><a name="CURLMUNKNOWNOPTION"></a><span class="nroffip">CURLM_UNKNOWN_OPTION (6)</span>
-<p class="level1">curl_multi_setopt() with unsupported option (Added in 7.15.4) <a name="CURLSHcode"></a><h2 class="nroffsh">CURLSHcode</h2>
-<p class="level0">The "share" interface will return a CURLSHcode to indicate when an error has occurred. Also consider <a class="emphasis" href="./curl_share_strerror.html">curl_share_strerror(3)</a>.
-<p class="level0"><a name="CURLSHEOK"></a><span class="nroffip">CURLSHE_OK (0)</span>
-<p class="level1">All fine. Proceed as usual.
-<p class="level0"><a name="CURLSHEBADOPTION"></a><span class="nroffip">CURLSHE_BAD_OPTION (1)</span>
-<p class="level1">An invalid option was passed to the function.
-<p class="level0"><a name="CURLSHEINUSE"></a><span class="nroffip">CURLSHE_IN_USE (2)</span>
-<p class="level1">The share object is currently in use.
-<p class="level0"><a name="CURLSHEINVALID"></a><span class="nroffip">CURLSHE_INVALID (3)</span>
-<p class="level1">An invalid share object was passed to the function.
-<p class="level0"><a name="CURLSHENOMEM"></a><span class="nroffip">CURLSHE_NOMEM (4)</span>
-<p class="level1">Not enough memory was available. (Added in 7.12.0) <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-errors.pdf b/docs/libcurl/libcurl-errors.pdf
deleted file mode 100644
index bcd53f26..00000000
--- a/docs/libcurl/libcurl-errors.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl-multi.3 b/docs/libcurl/libcurl-multi.3
index d84bafca..f77c366a 100644
--- a/docs/libcurl/libcurl-multi.3
+++ b/docs/libcurl/libcurl-multi.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "3 Feb 2007" "libcurl 7.16.0" "libcurl multi interface"
+.TH libcurl-multi 3 "19 Sep 2014" "libcurl" "libcurl multi interface"
.SH NAME
libcurl-multi \- how to use the multi interface
.SH DESCRIPTION
@@ -43,18 +43,28 @@ 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.
-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.
+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.
-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
+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
\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.
@@ -71,7 +81,8 @@ 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.
+may be all, it may be none. When there's nothing more to do for now, it
+returns back to the calling application.
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
@@ -80,15 +91,9 @@ 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.
-
-A little note here about the return codes from the multi functions, and
-especially the \fIcurl_multi_perform(3)\fP: if you receive
-\fICURLM_CALL_MULTI_PERFORM\fP, this basically means that you should call
-\fIcurl_multi_perform(3)\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".
+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.
\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
@@ -118,25 +123,62 @@ If you want to re-use an easy handle that was added to the multi handle for
transfer, you must first remove it from the multi stack and then re-add it
again (possibly after having altered some options at your own choice).
.SH "MULTI_SOCKET"
-Since 7.16.0, the \fIcurl_multi_socket_action(3)\fP function offers a way for
-applications to not only avoid being forced to use select(), but it also
-offers a much more high-performance API that will make a significant
-difference for applications using large numbers of simultaneous connections.
-
-\fIcurl_multi_socket_action(3)\fP is then used
-instead of \fIcurl_multi_perform(3)\fP.
+\fIcurl_multi_socket_action(3)\fP function offers a way for applications to
+not only avoid being forced to use select(), but it also offers a much more
+high-performance API that will make a significant difference for applications
+using large numbers of simultaneous connections.
+
+\fIcurl_multi_socket_action(3)\fP is then used instead of
+\fIcurl_multi_perform(3)\fP.
+
+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 current 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_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
the future, you should be aware of the following current restrictions:
.nf
- - Name resolves on non-windows unless c-ares is used
- - GnuTLS SSL connections
+ - Name resolves unless the c-ares or threaded-resolver backends are used
- NSS SSL connections
- - Active FTP connections
- HTTP proxy CONNECT operations
- SOCKS proxy handshakes
- file:// transfers
- TELNET transfers
.fi
+.SH "SEE ALSO"
+.BR libcurl-errors "(3), " libcurl-easy "(3), " libcurl "(3) "
diff --git a/docs/libcurl/libcurl-multi.html b/docs/libcurl/libcurl-multi.html
deleted file mode 100644
index 70601d1b..00000000
--- a/docs/libcurl/libcurl-multi.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<html><head>
-<title>libcurl-multi man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-multi - how to use the multi interface <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This is an overview on how to use the libcurl multi interface in your C programs. There are specific man pages for each function mentioned in here. There's also the <span Class="emphasis">libcurl-tutorial(3)</span> man page for a complete tutorial to programming with libcurl and the <span Class="emphasis">libcurl-easy(3)</span> man page for an overview of the libcurl easy interface.
-<p class="level0">All functions in the multi interface are prefixed with curl_multi. <a name="OBJECTIVES"></a><h2 class="nroffsh">OBJECTIVES</h2>
-<p class="level0">The multi interface offers several abilities that the easy interface doesn't. They are mainly:
-<p class="level0">1. Enable a "pull" interface. The application that uses libcurl decides where and when to ask libcurl to get/send data.
-<p class="level0">2. Enable multiple simultaneous transfers in the same thread without making it complicated for the application.
-<p class="level0">3. Enable the application to wait for action on its own file descriptors and curl's file descriptors simultaneous easily. <a name="ONE"></a><h2 class="nroffsh">ONE MULTI HANDLE MANY EASY HANDLES</h2>
-<p class="level0">To use the multi interface, you must first create a 'multi handle' with <a class="emphasis" href="./curl_multi_init.html">curl_multi_init(3)</a>. This handle is then used as input to all further curl_multi_* functions.
-<p class="level0">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 <a class="emphasis" href="./libcurl.html">libcurl(3)</a> man page, using <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>.
-<p class="level0">When the easy handle is setup for a transfer, then instead of using <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> (as when using the easy interface for transfers), you should instead add the easy handle to the multi handle using <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a>. The multi handle is sometimes referred to as a &acute;multi stack&acute; because of the fact that it may hold a large amount of easy handles.
-<p class="level0">Should you change your mind, the easy handle is again removed from the multi stack using <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a>. Once removed from the multi handle, you can again use other easy interface functions like <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> on the handle or whatever you think is necessary.
-<p class="level0">Adding the easy handle to the multi handle does not start the transfer. Remember that one of the main ideas with this interface is to let your application drive. You drive the transfers by invoking <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. libcurl will then transfer data if there is 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.
-<p class="level0">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 <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> like crazy. <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> offers an 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.
-<p class="level0">A little note here about the return codes from the multi functions, and especially the <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>: if you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> 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".
-<p class="level0"><a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> stores the number of still running transfers in one of its input arguments, and by reading that you can figure out when all the transfers in the multi handles are done. 'done' does not mean successful. One or more of the transfers may have failed. Tracking when this number changes, you know when one or more transfers are done.
-<p class="level0">To get information about completed transfers, to figure out success or not and similar, <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> should be called. It can return a message about a current or previous transfer. Repeated invokes of the function get more messages until the message queue is empty. The information you receive there includes an easy handle pointer which you may use to identify which easy handle the information regards.
-<p class="level0">When a single transfer is completed, the easy handle is still left added to the multi stack. You need to first remove the easy handle with <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> and then close it with <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>, or possibly set new options to it and add it again with <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a> to start another transfer.
-<p class="level0">When all transfers in the multi stack are done, cleanup the multi handle with <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a>. Be careful and please note that you <span Class="bold">MUST</span> invoke separate <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> calls on every single easy handle to clean them up properly.
-<p class="level0">If you want to re-use an easy handle that was added to the multi handle for transfer, you must first remove it from the multi stack and then re-add it again (possibly after having altered some options at your own choice). <a name="MULTISOCKET"></a><h2 class="nroffsh">MULTI_SOCKET</h2>
-<p class="level0">Since 7.16.0, the <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function offers a way for applications to not only avoid being forced to use select(), but it also offers a much more high-performance API that will make a significant difference for applications using large numbers of simultaneous connections.
-<p class="level0"><a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> is then used instead of <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. <a name="BLOCKING"></a><h2 class="nroffsh">BLOCKING</h2>
-<p class="level0">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 the future, you should be aware of the following current restrictions:
-<p class="level0"><pre>
-<p class="level0">&nbsp;- Name resolves on non-windows unless c-ares is used
- &nbsp;- GnuTLS SSL connections
- &nbsp;- NSS SSL connections
- &nbsp;- Active FTP connections
- &nbsp;- HTTP proxy CONNECT operations
- &nbsp;- SOCKS proxy handshakes
- &nbsp;- file:// transfers
- &nbsp;- TELNET transfers
- </pre>
-
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-multi.pdf b/docs/libcurl/libcurl-multi.pdf
deleted file mode 100644
index 1fd4af69..00000000
--- a/docs/libcurl/libcurl-multi.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3
index 2e58c0ba..b46eedae 100644
--- a/docs/libcurl/libcurl-share.3
+++ b/docs/libcurl/libcurl-share.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 libcurl-share 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl share interface"
.SH NAME
libcurl-share \- how to use the share interface
@@ -16,15 +34,16 @@ The share interface was added to enable sharing of data between curl
\&"handles".
.SH "ONE SET OF DATA - MANY TRANSFERS"
You can have multiple easy handles share data between them. Have them update
-and use the \fBsame\fP cookie database or DNS cache! This way, each single
-transfer will take advantage from data updates made by the other transfer(s).
+and use the \fBsame\fP cookie database, DNS cache, TLS session cache! This
+way, each single transfer will take advantage from data updates made by the
+other transfer(s). The sharing interface, however, does not share active or
+persistent connections between different easy handles.
.SH "SHARE OBJECT"
You create a shared object with \fIcurl_share_init(3)\fP. It returns a handle
for a newly created one.
You tell the shared object what data you want it to share by using
-\fIcurl_share_setopt(3)\fP. Currently you can only share DNS and/or COOKIE
-data.
+\fIcurl_share_setopt(3)\fP.
Since you can use this share from multiple threads, and libcurl has no
internal thread synchronization, you must provide mutex callbacks if you're
@@ -32,14 +51,16 @@ using this multi-threaded. You set lock and unlock functions with
\fIcurl_share_setopt(3)\fP too.
Then, you make an easy handle to use this share, you set the
-\fICURLOPT_SHARE\fP option with \fIcurl_easy_setopt(3)\fP, and pass in share
-handle. You can make any number of easy handles share the same share handle.
+\fICURLOPT_SHARE(3)\fP option with \fIcurl_easy_setopt(3)\fP, and pass in
+share handle. You can make any number of easy handles share the same share
+handle.
To make an easy handle stop using that particular share, you set
-\fICURLOPT_SHARE\fP to NULL for that easy handle. To make a handle stop
+\fICURLOPT_SHARE(3)\fP to NULL for that easy handle. To make a handle stop
sharing a particular data, you can \fICURLSHOPT_UNSHARE\fP it.
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-share.html b/docs/libcurl/libcurl-share.html
deleted file mode 100644
index 6a66f326..00000000
--- a/docs/libcurl/libcurl-share.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html><head>
-<title>libcurl-share man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-share - how to use the share interface <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This is an overview on how to use the libcurl share interface in your C programs. There are specific man pages for each function mentioned in here.
-<p class="level0">All functions in the share interface are prefixed with curl_share.
-<p class="level0"><a name="OBJECTIVES"></a><h2 class="nroffsh">OBJECTIVES</h2>
-<p class="level0">The share interface was added to enable sharing of data between curl "handles". <a name="ONE"></a><h2 class="nroffsh">ONE SET OF DATA - MANY TRANSFERS</h2>
-<p class="level0">You can have multiple easy handles share data between them. Have them update and use the <span Class="bold">same</span> cookie database or DNS cache! This way, each single transfer will take advantage from data updates made by the other transfer(s). <a name="SHARE"></a><h2 class="nroffsh">SHARE OBJECT</h2>
-<p class="level0">You create a shared object with <a class="emphasis" href="./curl_share_init.html">curl_share_init(3)</a>. It returns a handle for a newly created one.
-<p class="level0">You tell the shared object what data you want it to share by using <a class="emphasis" href="./curl_share_setopt.html">curl_share_setopt(3)</a>. Currently you can only share DNS and/or COOKIE data.
-<p class="level0">Since you can use this share from multiple threads, and libcurl has no internal thread synchronization, you must provide mutex callbacks if you're using this multi-threaded. You set lock and unlock functions with <a class="emphasis" href="./curl_share_setopt.html">curl_share_setopt(3)</a> too.
-<p class="level0">Then, you make an easy handle to use this share, you set the <span Class="emphasis">CURLOPT_SHARE</span> option with <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>, and pass in share handle. You can make any number of easy handles share the same share handle.
-<p class="level0">To make an easy handle stop using that particular share, you set <span Class="emphasis">CURLOPT_SHARE</span> to NULL for that easy handle. To make a handle stop sharing a particular data, you can <span Class="emphasis">CURLSHOPT_UNSHARE</span> it.
-<p class="level0">When you're done using the share, make sure that no easy handle is still using it, and call <a class="emphasis" href="./curl_share_cleanup.html">curl_share_cleanup(3)</a> on the handle. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_share_init.html">curl_share_init (3)</a> <a class="manpage" href="./curl_share_setopt.html"> curl_share_setopt (3)</a> <a class="manpage" href="./curl_share_cleanup.html"> curl_share_cleanup (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-share.pdf b/docs/libcurl/libcurl-share.pdf
deleted file mode 100644
index a4ba4cb7..00000000
--- a/docs/libcurl/libcurl-share.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl-tutorial.3 b/docs/libcurl/libcurl-tutorial.3
index 72f00296..11b01901 100644
--- a/docs/libcurl/libcurl-tutorial.3
+++ b/docs/libcurl/libcurl-tutorial.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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-tutorial 3 "4 Mar 2009" "libcurl" "libcurl programming"
+.TH libcurl-tutorial 3 "19 Sep 2014" "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,15 +137,17 @@ 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 "Handle the Easy libcurl"
+.SH "Two Interfaces"
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.
-
+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"
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
@@ -162,16 +164,21 @@ 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. Alas, multiple requests using the same handle will use
-the same options.
+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.
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 CURLOPT_URL in a manner similar to:
+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:
.nf
curl_easy_setopt(handle, CURLOPT_URL, "http://domain.com/");
@@ -197,27 +204,27 @@ by setting another property:
Using that property, you can easily pass local data between your application
and the function that gets invoked by libcurl. libcurl itself won't touch the
-data you pass with \fICURLOPT_WRITEDATA\fP.
+data you pass with \fICURLOPT_WRITEDATA(3)\fP.
-libcurl offers its own default internal callback that will take care of the data
-if you don't set the callback with \fICURLOPT_WRITEFUNCTION\fP. It will then
-simply output the received data to stdout. You can have the default callback
-write the data to a different file handle by passing a 'FILE *' to a file
-opened for writing with the \fICURLOPT_WRITEDATA\fP option.
+libcurl offers its own default internal callback that will take care of the
+data if you don't set the callback with \fICURLOPT_WRITEFUNCTION(3)\fP. It
+will then simply output the received data to stdout. You can have the default
+callback write the data to a different file handle by passing a 'FILE *' to a
+file opened for writing with the \fICURLOPT_WRITEDATA(3)\fP option.
Now, we need to take a step back and have a deep breath. Here's one of those
rare platform-dependent nitpicks. Did you spot it? On some platforms[2],
libcurl won't be able to operate on files opened by the program. Thus, if you
use the default callback and pass in an open file with
-\fICURLOPT_WRITEDATA\fP, it will crash. You should therefore avoid this to
+\fICURLOPT_WRITEDATA(3)\fP, it will crash. You should therefore avoid this to
make your program run fine virtually everywhere.
-(\fICURLOPT_WRITEDATA\fP was formerly known as \fICURLOPT_FILE\fP. Both names
-still work and do the same thing).
+(\fICURLOPT_WRITEDATA(3)\fP was formerly known as \fICURLOPT_FILE\fP. Both
+names still work and do the same thing).
If you're using libcurl as a win32 DLL, you MUST use the
-\fICURLOPT_WRITEFUNCTION\fP if you set \fICURLOPT_WRITEDATA\fP - or you will
-experience crashes.
+\fICURLOPT_WRITEFUNCTION(3)\fP if you set \fICURLOPT_WRITEDATA(3)\fP - or you
+will experience crashes.
There are of course many more options you can set, and we'll get back to a few
of them later. Let's instead continue to the actual transfer:
@@ -234,8 +241,8 @@ passed to it, libcurl will abort the operation and return with an error code.
When the transfer is complete, the function returns a return code that informs
you if it succeeded in its mission or not. If a return code isn't enough for
-you, you can use the CURLOPT_ERRORBUFFER to point libcurl to a buffer of yours
-where it'll store a human readable error message as well.
+you, you can use the \fICURLOPT_ERRORBUFFER(3)\fP to point libcurl to a buffer
+of yours where it'll store a human readable error message as well.
If you then want to transfer another file, the handle is ready to be used
again. Mind you, it is even preferred that you re-use an existing handle if
@@ -249,13 +256,15 @@ complication for you. Given simply the URL to a file, libcurl will take care
of all the details needed to get the file moved from one machine to another.
.SH "Multi-threading Issues"
-The first basic rule is that you must \fBnever\fP share a libcurl handle (be
-it easy or multi or whatever) between multiple threads. Only use one handle in
-one thread at a time.
+The first basic rule is that you must \fBnever\fP simultaneously share a
+libcurl handle (be it easy or multi or whatever) between multiple
+threads. Only use one handle in one thread at any time. You can pass the
+handles around among threads, but you must never use a single handle from more
+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 c-ares support and not on Windows.
+when built without using either the c-ares or threaded resolver backends.
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
@@ -269,7 +278,7 @@ OpenSSL
GnuTLS
- http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
+ http://gnutls.org/manual/html_node/Thread-safety.html
NSS
@@ -283,14 +292,22 @@ yassl
Required actions unknown.
-When using multiple threads you should set the CURLOPT_NOSIGNAL option to 1
-for all handles. Everything will or might work fine except that timeouts are
-not honored during the DNS lookup - which you can work around by building
-libcurl with c-ares support. c-ares is a library that provides asynchronous
-name resolves. On some platforms, libcurl simply will not function properly
-multi-threaded unless this option is set.
+axTLS
+
+ Required actions unknown.
+
+Secure Transport
-Also, note that CURLOPT_DNS_USE_GLOBAL_CACHE is not thread-safe.
+ The engine is fully thread-safe, and no additional steps are required.
+
+When using multiple threads you should set the \fICURLOPT_NOSIGNAL(3)\fP
+option to 1 for all handles. Everything will or might work fine except that
+timeouts are not honored during the DNS lookup - which you can work around by
+building libcurl with c-ares support. c-ares is a library that provides
+asynchronous name resolves. On some platforms, libcurl simply will not
+function properly multi-threaded unless this option is set.
+
+Also, note that \fICURLOPT_DNS_USE_GLOBAL_CACHE(3)\fP is not thread-safe.
.SH "When It Doesn't Work"
There will always be times when the transfer fails for some reason. You might
@@ -298,23 +315,23 @@ have set the wrong libcurl option or misunderstood what the libcurl option
actually does, or the remote server might return non-standard replies that
confuse the library which then confuses your program.
-There's one golden rule when these things occur: set the CURLOPT_VERBOSE
-option to 1. It'll cause the library to spew out the entire protocol
-details it sends, some internal info and some received protocol data as well
-(especially when using FTP). If you're using HTTP, adding the headers in the
-received output to study is also a clever way to get a better understanding
-why the server behaves the way it does. Include headers in the normal body
-output with CURLOPT_HEADER set 1.
+There's one golden rule when these things occur: set the
+\fICURLOPT_VERBOSE(3)\fP option to 1. It'll cause the library to spew out the
+entire protocol details it sends, some internal info and some received
+protocol data as well (especially when using FTP). If you're using HTTP,
+adding the headers in the received output to study is also a clever way to get
+a better understanding why the server behaves the way it does. Include headers
+in the normal body output with \fICURLOPT_HEADER(3)\fP set 1.
-Of course, there are bugs left. We need to know about them to be able
-to fix them, so we're quite dependent on your bug reports! When you do report
-suspected bugs in libcurl, please include as many details as you possibly can: a
-protocol dump that CURLOPT_VERBOSE produces, library version, as much as
-possible of your code that uses libcurl, operating system name and version,
-compiler name and version etc.
+Of course, there are bugs left. We need to know about them to be able to fix
+them, so we're quite dependent on your bug reports! When you do report
+suspected bugs in libcurl, please include as many details as you possibly can:
+a protocol dump that \fICURLOPT_VERBOSE(3)\fP produces, library version, as
+much as possible of your code that uses libcurl, operating system name and
+version, compiler name and version etc.
-If CURLOPT_VERBOSE is not enough, you increase the level of debug data your
-application receive by using the CURLOPT_DEBUGFUNCTION.
+If \fICURLOPT_VERBOSE(3)\fP is not enough, you increase the level of debug
+data your application receive by using the \fICURLOPT_DEBUGFUNCTION(3)\fP.
Getting some in-depth knowledge about the protocols involved is never wrong,
and if you're trying to do funny things, you might very well understand
@@ -353,7 +370,7 @@ Tell libcurl that we want to upload:
A few protocols won't behave properly when uploads are done without any prior
knowledge of the expected file size. So, set the upload file size using the
-CURLOPT_INFILESIZE_LARGE for all known file sizes like this[1]:
+\fICURLOPT_INFILESIZE_LARGE(3)\fP for all known file sizes like this[1]:
.nf
/* in this example, file_size must be an curl_off_t variable */
@@ -383,26 +400,26 @@ them URL encoded, as %XX where XX is a two-digit hexadecimal number.
libcurl also provides options to set various passwords. The user name and
password as shown embedded in the URL can instead get set with the
-CURLOPT_USERPWD option. The argument passed to libcurl should be a char * to
-a string in the format "user:password". In a manner like this:
+\fICURLOPT_USERPWD(3)\fP option. The argument passed to libcurl should be a
+char * to a string in the format "user:password". In a manner like this:
curl_easy_setopt(easyhandle, CURLOPT_USERPWD, "myname:thesecret");
Another case where name and password might be needed at times, is for those
users who need to authenticate themselves to a proxy they use. libcurl offers
-another option for this, the CURLOPT_PROXYUSERPWD. It is used quite similar
-to the CURLOPT_USERPWD option like this:
+another option for this, the \fICURLOPT_PROXYUSERPWD(3)\fP. It is used quite
+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
ability to use this file to figure out what set of user name and password to
use for a particular host. As an extension to the normal functionality,
libcurl also supports this file for non-FTP protocols such as HTTP. To make
-curl use this file, use the CURLOPT_NETRC option:
+curl use this file, use the \fICURLOPT_NETRC(3)\fP option:
curl_easy_setopt(easyhandle, CURLOPT_NETRC, 1L);
@@ -432,13 +449,13 @@ 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, GSS-Negotiate and SPNEGO. You can tell libcurl which one to use
-with CURLOPT_HTTPAUTH as in:
+Negotiate (SPNEGO). You can tell libcurl which one to use
+with \fICURLOPT_HTTPAUTH(3)\fP as in:
curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
And when you send authentication to a proxy, you can also set authentication
-type the same way but instead with CURLOPT_PROXYAUTH:
+type the same way but instead with \fICURLOPT_PROXYAUTH(3)\fP:
curl_easy_setopt(easyhandle, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
@@ -474,8 +491,8 @@ libcurl to post it all to the remote site:
.fi
Simple enough, huh? Since you set the POST options with the
-CURLOPT_POSTFIELDS, this automatically switches the handle to use POST in the
-upcoming request.
+\fICURLOPT_POSTFIELDS(3)\fP, this automatically switches the handle to use
+POST in the upcoming request.
Ok, so what if you want to post binary data that also requires you to set the
Content-Type: header of the post? Well, binary posts prevent libcurl from
@@ -566,14 +583,14 @@ post handle:
Since all options on an easyhandle are "sticky", they remain the same until
changed even if you do call \fIcurl_easy_perform(3)\fP, you may need to tell
-curl to go back to a plain GET request if you intend to do one as your
-next request. You force an easyhandle to go back to GET by using the
-CURLOPT_HTTPGET option:
+curl to go back to a plain GET request if you intend to do one as your next
+request. You force an easyhandle to go back to GET by using the
+\fICURLOPT_HTTPGET(3)\fP option:
curl_easy_setopt(easyhandle, CURLOPT_HTTPGET, 1L);
-Just setting CURLOPT_POSTFIELDS to "" or NULL will *not* stop libcurl from
-doing a POST. It will just make it POST without any data to send!
+Just setting \fICURLOPT_POSTFIELDS(3)\fP to "" or NULL will *not* stop libcurl
+from doing a POST. It will just make it POST without any data to send!
.SH "Showing Progress"
@@ -581,16 +598,16 @@ For historical and traditional reasons, libcurl has a built-in progress meter
that can be switched on and then makes it present a progress meter in your
terminal.
-Switch on the progress meter by, oddly enough, setting CURLOPT_NOPROGRESS to
-zero. This option is set to 1 by default.
+Switch on the progress meter by, oddly enough, setting
+\fICURLOPT_NOPROGRESS(3)\fP to zero. This option is set to 1 by default.
For most applications however, the built-in progress meter is useless and
what instead is interesting is the ability to specify a progress
callback. The function pointer you pass to libcurl will then be called on
irregular intervals with information about the current transfer.
-Set the progress callback by using CURLOPT_PROGRESSFUNCTION. And pass a
-pointer to a function that matches this prototype:
+Set the progress callback by using \fICURLOPT_PROGRESSFUNCTION(3)\fP. And pass
+a pointer to a function that matches this prototype:
.nf
int progress_callback(void *clientp,
@@ -602,7 +619,7 @@ pointer to a function that matches this prototype:
If any of the input arguments is unknown, a 0 will be passed. The first
argument, the 'clientp' is the pointer you pass to libcurl with
-CURLOPT_PROGRESSDATA. libcurl won't touch it.
+\fICURLOPT_PROGRESSDATA(3)\fP. libcurl won't touch it.
.SH "libcurl with C++"
@@ -661,11 +678,12 @@ pass that information similar to this:
curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "user:password");
-If you want to, you can specify the host name only in the CURLOPT_PROXY
-option, and set the port number separately with CURLOPT_PROXYPORT.
+If you want to, you can specify the host name only in the
+\fICURLOPT_PROXY(3)\fP option, and set the port number separately with
+\fICURLOPT_PROXYPORT(3)\fP.
-Tell libcurl what kind of proxy it is with CURLOPT_PROXYTYPE (if not, it will
-default to assume a HTTP proxy):
+Tell libcurl what kind of proxy it is with \fICURLOPT_PROXYTYPE(3)\fP (if not,
+it will default to assume a HTTP proxy):
curl_easy_setopt(easyhandle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
@@ -694,7 +712,8 @@ variable may say so. If 'no_proxy' is a plain asterisk ("*") it matches all
hosts.
To explicitly disable libcurl's checking for and using the proxy environment
-variables, set the proxy name to "" - an empty string - with CURLOPT_PROXY.
+variables, set the proxy name to "" - an empty string - with
+\fICURLOPT_PROXY(3)\fP.
.IP "SSL and Proxies"
SSL is for secure point-to-point connections. This involves strong encryption
@@ -790,31 +809,27 @@ may also be added in the future.
Each easy handle will attempt to keep the last few connections alive for a
while in case they are to be used again. You can set the size of this "cache"
-with the CURLOPT_MAXCONNECTS option. Default is 5. There is very seldom any
-point in changing this value, and if you think of changing this it is often
-just a matter of thinking again.
+with the \fICURLOPT_MAXCONNECTS(3)\fP option. Default is 5. There is very
+seldom any point in changing this value, and if you think of changing this it
+is often just a matter of thinking again.
To force your upcoming request to not use an already existing connection (it
will even close one first if there happens to be one alive to the same host
-you're about to operate on), you can do that by setting CURLOPT_FRESH_CONNECT
-to 1. In a similar spirit, you can also forbid the upcoming request to be
-"lying" around and possibly get re-used after the request by setting
-CURLOPT_FORBID_REUSE to 1.
+you're about to operate on), you can do that by setting
+\fICURLOPT_FRESH_CONNECT(3)\fP to 1. In a similar spirit, you can also forbid
+the upcoming request to be "lying" around and possibly get re-used after the
+request by setting \fICURLOPT_FORBID_REUSE(3)\fP to 1.
.SH "HTTP Headers Used by libcurl"
When you use libcurl to do HTTP requests, it'll pass along a series of headers
automatically. It might be good for you to know and understand these. You
-can replace or remove them by using the CURLOPT_HTTPHEADER option.
+can replace or remove them by using the \fICURLOPT_HTTPHEADER(3)\fP option.
.IP "Host"
This header is required by HTTP 1.1 and even many 1.0 servers and should be
the name of the server we want to talk to. This includes the port number if
anything but default.
-.IP "Pragma"
-\&"no-cache". Tells a possible proxy to not grab a copy from the cache but to
-fetch a fresh one.
-
.IP "Accept"
\&"*/*".
@@ -837,8 +852,8 @@ libcurl is your friend here too.
.IP CUSTOMREQUEST
If just changing the actual HTTP request keyword is what you want, like when
-GET, HEAD or POST is not good enough for you, CURLOPT_CUSTOMREQUEST is there
-for you. It is very simple to use:
+GET, HEAD or POST is not good enough for you, \fICURLOPT_CUSTOMREQUEST(3)\fP
+is there for you. It is very simple to use:
curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "MYOWNREQUEST");
@@ -933,28 +948,29 @@ A little example that deletes a given file before an operation:
If you would instead want this operation (or chain of operations) to happen
_after_ the data transfer took place the option to \fIcurl_easy_setopt(3)\fP
-would instead be called CURLOPT_POSTQUOTE and used the exact same way.
+would instead be called \fICURLOPT_POSTQUOTE(3)\fP and used the exact same
+way.
The custom FTP command will be issued to the server in the same order they are
added to the list, and if a command gets an error code returned back from the
server, no more commands will be issued and libcurl will bail out with an
-error code (CURLE_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send
-commands before a transfer, no transfer will actually take place when a quote
-command has failed.
+error code (CURLE_QUOTE_ERROR). Note that if you use \fICURLOPT_QUOTE(3)\fP to
+send commands before a transfer, no transfer will actually take place when a
+quote command has failed.
-If you set the CURLOPT_HEADER to 1, you will tell libcurl to get
+If you set the \fICURLOPT_HEADER(3)\fP to 1, you will tell libcurl to get
information about the target file and output "headers" about it. The headers
will be in "HTTP-style", looking like they do in HTTP.
The option to enable headers or to run custom FTP commands may be useful to
-combine with CURLOPT_NOBODY. If this option is set, no actual file content
-transfer will be performed.
+combine with \fICURLOPT_NOBODY(3)\fP. If this option is set, no actual file
+content transfer will be performed.
.IP "FTP Custom CUSTOMREQUEST"
-If you do want to list the contents of a FTP directory using your own defined FTP
-command, CURLOPT_CUSTOMREQUEST will do just that. "NLST" is the default one
-for listing directories but you're free to pass in your idea of a good
-alternative.
+If you do want to list the contents of a FTP directory using your own defined
+FTP command, \fICURLOPT_CUSTOMREQUEST(3)\fP will do just that. "NLST" is the
+default one for listing directories but you're free to pass in your idea of a
+good alternative.
.SH "Cookies Without Chocolate Chips"
In the HTTP sense, a cookie is a name with an associated value. A server sends
@@ -969,8 +985,8 @@ update them. Server use cookies to "track" users and to keep "sessions".
Cookies are sent from server to clients with the header Set-Cookie: and
they're sent from clients to servers with the Cookie: header.
-To just send whatever cookie you want to a server, you can use CURLOPT_COOKIE
-to set a cookie string like this:
+To just send whatever cookie you want to a server, you can use
+\fICURLOPT_COOKIE(3)\fP to set a cookie string like this:
curl_easy_setopt(easyhandle, CURLOPT_COOKIE, "name1=var1; name2=var2;");
@@ -981,29 +997,30 @@ are then used accordingly on later requests.
One way to do this, is to save all headers you receive in a plain file and
when you make a request, you tell libcurl to read the previous headers to
figure out which cookies to use. Set the header file to read cookies from with
-CURLOPT_COOKIEFILE.
-
-The CURLOPT_COOKIEFILE option also automatically enables the cookie parser in
-libcurl. Until the cookie parser is enabled, libcurl will not parse or
-understand incoming cookies and they will just be ignored. However, when the
-parser is enabled the cookies will be understood and the cookies will be kept
-in memory and used properly in subsequent requests when the same handle is
-used. Many times this is enough, and you may not have to save the cookies to
-disk at all. Note that the file you specify to CURLOPT_COOKIEFILE doesn't have
-to exist to enable the parser, so a common way to just enable the parser and
-not read any cookies is to use the name of a file you know doesn't exist.
+\fICURLOPT_COOKIEFILE(3)\fP.
+
+The \fICURLOPT_COOKIEFILE(3)\fP option also automatically enables the cookie
+parser in libcurl. Until the cookie parser is enabled, libcurl will not parse
+or understand incoming cookies and they will just be ignored. However, when
+the parser is enabled the cookies will be understood and the cookies will be
+kept in memory and used properly in subsequent requests when the same handle
+is used. Many times this is enough, and you may not have to save the cookies
+to disk at all. Note that the file you specify to \ICURLOPT_COOKIEFILE(3)\fP
+doesn't have to exist to enable the parser, so a common way to just enable the
+parser and not read any cookies is to use the name of a file you know doesn't
+exist.
If you would rather use existing cookies that you've previously received with
your Netscape or Mozilla browsers, you can make libcurl use that cookie file
-as input. The CURLOPT_COOKIEFILE is used for that too, as libcurl will
-automatically find out what kind of file it is and act accordingly.
+as input. The \fICURLOPT_COOKIEFILE(3)\fP is used for that too, as libcurl
+will automatically find out what kind of file it is and act accordingly.
Perhaps the most advanced cookie operation libcurl offers, is saving the
entire internal cookie state back into a Netscape/Mozilla formatted cookie
file. We call that the cookie-jar. When you set a file name with
-CURLOPT_COOKIEJAR, that file name will be created and all received cookies
-will be stored in it when \fIcurl_easy_cleanup(3)\fP is called. This enables
-cookies to get passed on properly between multiple handles without any
+\fICURLOPT_COOKIEJAR(3)\fP, that file name will be created and all received
+cookies will be stored in it when \fIcurl_easy_cleanup(3)\fP is called. This
+enables cookies to get passed on properly between multiple handles without any
information getting lost.
.SH "FTP Peculiarities We Need"
@@ -1022,36 +1039,36 @@ work it tries PASV instead. (EPSV is an extension to the original FTP spec
and does not exist nor work on all FTP servers.)
You can prevent libcurl from first trying the EPSV command by setting
-CURLOPT_FTP_USE_EPSV to zero.
+\fICURLOPT_FTP_USE_EPSV(3)\fP to zero.
In some cases, you will prefer to have the server connect back to you for the
second connection. This might be when the server is perhaps behind a firewall
or something and only allows connections on a single port. libcurl then
informs the remote server which IP address and port number to connect to.
-This is made with the CURLOPT_FTPPORT option. If you set it to "-", libcurl
-will use your system's "default IP address". If you want to use a particular
-IP, you can set the full IP address, a host name to resolve to an IP address
-or even a local network interface name that libcurl will get the IP address
-from.
+This is made with the \fICURLOPT_FTPPORT(3)\fP option. If you set it to "-",
+libcurl will use your system's "default IP address". If you want to use a
+particular IP, you can set the full IP address, a host name to resolve to an
+IP address or even a local network interface name that libcurl will get the IP
+address from.
When doing the "PORT" approach, libcurl will attempt to use the EPRT and the
LPRT before trying PORT, as they work with more protocols. You can disable
-this behavior by setting CURLOPT_FTP_USE_EPRT to zero.
+this behavior by setting \fICURLOPT_FTP_USE_EPRT(3)\fP to zero.
.SH "Headers Equal Fun"
Some protocols provide "headers", meta-data separated from the normal
-data. These headers are by default not included in the normal data stream,
-but you can make them appear in the data stream by setting CURLOPT_HEADER to
-1.
+data. These headers are by default not included in the normal data stream, but
+you can make them appear in the data stream by setting \fICURLOPT_HEADER(3)\fP
+to 1.
What might be even more useful, is libcurl's ability to separate the headers
from the data and thus make the callbacks differ. You can for example set a
different pointer to pass to the ordinary write callback by setting
-CURLOPT_WRITEHEADER.
+\fICURLOPT_HEADERDATA(3)\fP.
-Or, you can set an entirely separate function to receive the headers, by
-using CURLOPT_HEADERFUNCTION.
+Or, you can set an entirely separate function to receive the headers, by using
+\fICURLOPT_HEADERFUNCTION(3)\fP.
The headers are passed to the callback function one by one, and you can
depend on that fact. It makes it easier for you to add custom header parsers
@@ -1112,18 +1129,18 @@ 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 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.
+To avoid this problem, use an authentication mechanism or other protocol that
+doesn't let snoopers see your password: Digest, CRAM-MD5, Kerberos, SPNEGO or
+NTLM authentication, HTTPS, FTPS, SCP and SFTP are a few examples.
.IP "Redirects"
-The CURLOPT_FOLLOWLOCATION option automatically follows HTTP redirects sent
-by a remote server. These redirects can refer to any kind of URL, not just
-HTTP. A redirect to a file: URL would cause the libcurl to read (or write)
-arbitrary files from the local filesystem. If the application returns
-the data back to the user (as would happen in some kinds of CGI scripts),
-an attacker could leverage this to read otherwise forbidden data (e.g.
-file://localhost/etc/passwd).
+The \fICURLOPT_FOLLOWLOCATION(3)\fP option automatically follows HTTP
+redirects sent by a remote server. These redirects can refer to any kind of
+URL, not just HTTP. A redirect to a file: URL would cause the libcurl to read
+(or write) arbitrary files from the local filesystem. If the application
+returns the data back to the user (as would happen in some kinds of CGI
+scripts), an attacker could leverage this to read otherwise forbidden data
+(e.g. file://localhost/etc/passwd).
If authentication credentials are stored in the ~/.netrc file, or Kerberos
is in use, any other URL type (not just file:) that requires
@@ -1136,63 +1153,77 @@ the user running the libcurl application, SCP: or SFTP: URLs could access
password or private-key protected resources,
e.g. sftp://user@some-internal-server/etc/passwd
-The CURLOPT_REDIR_PROTOCOLS and CURLOPT_NETRC options can be used to
-mitigate against this kind of attack.
+The \fICURLOPT_REDIR_PROTOCOLS(3)\fP and \fICURLOPT_NETRC(3)\fP options can be
+used to mitigate against this kind of attack.
A redirect can also specify a location available only on the machine running
libcurl, including servers hidden behind a firewall from the attacker.
e.g. http://127.0.0.1/ or http://intranet/delete-stuff.cgi?delete=all or
tftp://bootp-server/pc-config-data
-Apps can mitigate against this by disabling CURLOPT_FOLLOWLOCATION and
-handling redirects itself, sanitizing URLs as necessary. Alternately, an
-app could leave CURLOPT_FOLLOWLOCATION enabled but set CURLOPT_REDIR_PROTOCOLS
-and install a CURLOPT_OPENSOCKETFUNCTION callback function in which addresses
-are sanitized before use.
+Apps can mitigate against this by disabling \fICURLOPT_FOLLOWLOCATION(3)\fP
+and handling redirects itself, sanitizing URLs as necessary. Alternately, an
+app could leave \fICURLOPT_FOLLOWLOCATION(3)\fP enabled but set
+\fICURLOPT_REDIR_PROTOCOLS(3)\fP and install a
+\fICURLOPT_OPENSOCKETFUNCTION(3)\fP callback function in which addresses are
+sanitized before use.
.IP "Private Resources"
-A user who can control the DNS server of a domain being passed in within
-a URL can change the address of the host to a local, private address
-which the libcurl application will then use. e.g. The innocuous URL
-http://fuzzybunnies.example.com/ could actually resolve to the IP address
-of a server behind a firewall, such as 127.0.0.1 or 10.1.2.3
-Apps can mitigate against this by setting a CURLOPT_OPENSOCKETFUNCTION
-and checking the address before a connection.
-
-All the malicious scenarios regarding redirected URLs apply just as well
-to non-redirected URLs, if the user is allowed to specify an arbitrary URL
-that could point to a private resource. For example, a web app providing
-a translation service might happily translate file://localhost/etc/passwd
-and display the result. Apps can mitigate against this with the
-CURLOPT_PROTOCOLS option as well as by similar mitigation techniques for
-redirections.
-
-A malicious FTP server could in response to the PASV command return an
-IP address and port number for a server local to the app running libcurl
-but behind a firewall. Apps can mitigate against this by using the
-CURLOPT_FTP_SKIP_PASV_IP option or CURLOPT_FTPPORT.
+A user who can control the DNS server of a domain being passed in within a URL
+can change the address of the host to a local, private address which a
+server-side libcurl-using application could then use. e.g. the innocuous URL
+http://fuzzybunnies.example.com/ could actually resolve to the IP address of a
+server behind a firewall, such as 127.0.0.1 or 10.1.2.3. Apps can mitigate
+against this by setting a \fICURLOPT_OPENSOCKETFUNCTION(3)\fP and checking the
+address before a connection.
+
+All the malicious scenarios regarding redirected URLs apply just as well to
+non-redirected URLs, if the user is allowed to specify an arbitrary URL that
+could point to a private resource. For example, a web app providing a
+translation service might happily translate file://localhost/etc/passwd and
+display the result. Apps can mitigate against this with the
+\fICURLOPT_PROTOCOLS(3)\fP option as well as by similar mitigation techniques
+for redirections.
+
+A malicious FTP server could in response to the PASV command return an IP
+address and port number for a server local to the app running libcurl but
+behind a firewall. Apps can mitigate against this by using the
+\fICURLOPT_FTP_SKIP_PASV_IP(3)\fP option or \fICURLOPT_FTPPORT(3)\fP.
+
+.IP "IPv6 Addresses"
+libcurl will normally handle IPv6 addresses transparently and just as easily
+as IPv4 addresses. That means that a sanitizing function that filters out
+addressses like 127.0.0.1 isn't sufficient--the equivalent IPv6 addresses ::1,
+::, 0:00::0:1, ::127.0.0.1 and ::ffff:7f00:1 supplied somehow by an attacker
+would all bypass a naive filter and could allow access to undesired local
+resources. IPv6 also has special address blocks like link-local and site-local
+that generally shouldn't be accessed by a server-side libcurl-using
+application. A poorly-configured firewall installed in a data center,
+organization or server may also be configured to limit IPv4 connections but
+leave IPv6 connections wide open. In some cases, the CURL_IPRESOLVE_V4 option
+can be used to limit resolved addresses to IPv4 only and bypass these issues.
.IP Uploads
When uploading, a redirect can cause a local (or remote) file to be
-overwritten. Apps must not allow any unsanitized URL to be passed in
-for uploads. Also, CURLOPT_FOLLOWLOCATION should not be used on uploads.
+overwritten. Apps must not allow any unsanitized URL to be passed in for
+uploads. Also, \fICURLOPT_FOLLOWLOCATION(3)\fP should not be used on uploads.
Instead, the app should handle redirects itself, sanitizing each URL first.
.IP Authentication
-Use of CURLOPT_UNRESTRICTED_AUTH could cause authentication information to
-be sent to an unknown second server. Apps can mitigate against this
-by disabling CURLOPT_FOLLOWLOCATION and handling redirects itself,
-sanitizing where necessary.
+Use of \fICURLOPT_UNRESTRICTED_AUTH(3)\fP could cause authentication
+information to be sent to an unknown second server. Apps can mitigate against
+this by disabling \fICURLOPT_FOLLOWLOCATION(3)\fP and handling redirects
+itself, sanitizing where necessary.
-Use of the CURLAUTH_ANY option to CURLOPT_HTTPAUTH could result in user
-name and password being sent in clear text to an HTTP server. Instead,
-use CURLAUTH_ANYSAFE which ensures that the password is encrypted over
-the network, or else fail the request.
+Use of the CURLAUTH_ANY option to \fICURLOPT_HTTPAUTH(3)\fP could result in
+user name and password being sent in clear text to an HTTP server. Instead,
+use CURLAUTH_ANYSAFE which ensures that the password is encrypted over the
+network, or else fail the request.
-Use of the CURLUSESSL_TRY option to CURLOPT_USE_SSL could result in user
-name and password being sent in clear text to an FTP server. Instead,
-use CURLUSESSL_CONTROL to ensure that an encrypted connection is used or
-else fail the request.
+Use of the CURLUSESSL_TRY option to \fICURLOPT_USE_SSL(3)\fP could result in
+user name and password being sent in clear text to an FTP server. Instead,
+use CURLUSESSL_CONTROL to ensure that an encrypted connection is used or else
+fail the request.
.IP Cookies
If cookies are enabled and cached, then a user could craft a URL which
@@ -1208,34 +1239,35 @@ scp://user:pass@host/a;date >/tmp/test;
Apps must not allow unsanitized SCP: URLs to be passed in for downloads.
.IP "Denial of Service"
-A malicious server could cause libcurl to effectively hang by sending
-a trickle of data through, or even no data at all but just keeping the TCP
+A malicious server could cause libcurl to effectively hang by sending a
+trickle of data through, or even no data at all but just keeping the TCP
connection open. This could result in a denial-of-service attack. The
-CURLOPT_TIMEOUT and/or CURLOPT_LOW_SPEED_LIMIT options can be used to
-mitigate against this.
-
-A malicious server could cause libcurl to effectively hang by starting to
-send data, then severing the connection without cleanly closing the
-TCP connection. The app could install a CURLOPT_SOCKOPTFUNCTION callback
-function and set the TCP SO_KEEPALIVE option to mitigate against this.
-Setting one of the timeout options would also work against this attack.
-
-A malicious server could cause libcurl to download an infinite amount of
-data, potentially causing all of memory or disk to be filled. Setting
-the CURLOPT_MAXFILESIZE_LARGE option is not sufficient to guard against this.
-Instead, the app should monitor the amount of data received within the
+\fICURLOPT_TIMEOUT(3)\fP and/or \fICURLOPT_LOW_SPEED_LIMIT(3)\fP options can
+be used to mitigate against this.
+
+A malicious server could cause libcurl to effectively hang by starting to send
+data, then severing the connection without cleanly closing the TCP connection.
+The app could install a \fICURLOPT_SOCKOPTFUNCTION(3)\fP callback function and
+set the TCP SO_KEEPALIVE option to mitigate against this. Setting one of the
+timeout options would also work against this attack.
+
+A malicious server could cause libcurl to download an infinite amount of data,
+potentially causing all of memory or disk to be filled. Setting the
+\fICURLOPT_MAXFILESIZE_LARGE(3)\fP option is not sufficient to guard against
+this. Instead, the app should monitor the amount of data received within the
write or progress callback and abort once the limit is reached.
A malicious HTTP server could cause an infinite redirection loop, causing a
-denial-of-service. This can be mitigated by using the CURLOPT_MAXREDIRS
-option.
+denial-of-service. This can be mitigated by using the
+\fICURLOPT_MAXREDIRS(3)\fP option.
.IP "Arbitrary Headers"
User-supplied data must be sanitized when used in options like
-CURLOPT_USERAGENT, CURLOPT_HTTPHEADER, CURLOPT_POSTFIELDS and others that
-are used to generate structured data. Characters like embedded carriage
-returns or ampersands could allow the user to create additional headers or
-fields that could cause malicious transactions.
+\fICURLOPT_USERAGENT(3)\fP, \fICURLOPT_HTTPHEADER(3)\fP,
+\fICURLOPT_POSTFIELDS(3)\fP and others that are used to generate structured
+data. Characters like embedded carriage returns or ampersands could allow the
+user to create additional headers or fields that could cause malicious
+transactions.
.IP "Server-supplied Names"
A server can supply data which the application may, in some cases, use as
@@ -1244,12 +1276,12 @@ using the Content-disposition: header to generate a file name. An application
could also use CURLINFO_EFFECTIVE_URL to generate a file name from a
server-supplied redirect URL. Special care must be taken to sanitize such
names to avoid the possibility of a malicious server supplying one like
-"/etc/passwd", "\autoexec.bat" or even ".bashrc".
+"/etc/passwd", "\\autoexec.bat", "prn:" or even ".bashrc".
.IP "Server Certificates"
-A secure application should never use the CURLOPT_SSL_VERIFYPEER option to
-disable certificate validation. There are numerous attacks that are enabled
-by apps that fail to properly validate server TLS/SSL certificates,
+A secure application should never use the \fICURLOPT_SSL_VERIFYPEER(3)\fP
+option to disable certificate validation. There are numerous attacks that are
+enabled by apps that fail to properly validate server TLS/SSL certificates,
thus enabling a malicious server to spoof a legitimate one. HTTPS without
validated certificates is potentially as insecure as a plain HTTP connection.
@@ -1257,49 +1289,57 @@ validated certificates is potentially as insecure as a plain HTTP connection.
On a related issue, be aware that even in situations like when you have
problems with libcurl and ask someone for help, everything you reveal in order
to get best possible help might also impose certain security related
-risks. Host names, user names, paths, operating system specifics, etc (not to
+risks. Host names, user names, paths, operating system specifics, etc. (not to
mention passwords of course) may in fact be used by intruders to gain
additional information of a potential target.
+Be sure to limit access to application logs if they could hold private or
+security-related data. Besides the obvious candidates like user names and
+passwords, things like URLs, cookies or even file names could also hold
+sensitive data.
+
To avoid this problem, you must of course use your common sense. Often, you
can just edit out the sensitive data or just search/replace your true
information with faked data.
-.SH "Multiple Transfers Using the multi Interface"
-
+.SH "The multi Interface"
The easy interface as described in detail in this document is a synchronous
interface that transfers one file at a time and doesn't return until it is
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 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.
+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.
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 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.
+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.
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 execute as little as
-possible and then return back control to your program. It is designed to never
-block. If it returns CURLM_CALL_MULTI_PERFORM you better call it again soon,
-as that is a signal that it still has local data to send or remote data to
-receive.
+\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.
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
@@ -1312,11 +1352,12 @@ 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, 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.
+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.
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
@@ -1335,9 +1376,21 @@ to figure out success on each individual transfer.
[ seeding, passwords, keys, certificates, ENGINE, ca certs ]
.SH "Sharing Data Between Easy Handles"
+You can share some data between easy handles when the easy interface is used,
+and some data is share automatically when you use the multi interface.
+
+When you add easy handles to a multi handle, these easy handles will
+automatically share a lot of the data that otherwise would be kept on a
+per-easy handle basis when the easy interface is used.
- [ fill in ]
+The DNS cache is shared between handles within a multi handle, making
+subsequent name resolving faster, and the connection pool that is kept to
+better allow persistent connections and connection re-use is also shared. If
+you're using the easy interface, you can still share these between specific
+easy handles by using the share interface, see \fIlibcurl-share(3)\fP.
+Some things are never shared automatically, not within multi handles, like for
+example cookies so the only way to share that is with the share interface.
.SH "Footnotes"
.IP "[1]"
@@ -1349,9 +1402,11 @@ 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-tutorial.html b/docs/libcurl/libcurl-tutorial.html
deleted file mode 100644
index 593d191d..00000000
--- a/docs/libcurl/libcurl-tutorial.html
+++ /dev/null
@@ -1,547 +0,0 @@
-<html><head>
-<title>libcurl-tutorial man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-tutorial - libcurl programming tutorial <a name="Objective"></a><h2 class="nroffsh">Objective</h2>
-<p class="level0">This document attempts to describe the general principles and some basic approaches to consider when programming with libcurl. The text will focus mainly on the C interface but might apply fairly well on other interfaces as well as they usually follow the C one pretty closely.
-<p class="level0">This document will refer to 'the user' as the person writing the source code that uses libcurl. That would probably be you or someone in your position. What will be generally referred to as 'the program' will be the collected source code that you write that is using libcurl for transfers. The program is outside libcurl and libcurl is outside of the program.
-<p class="level0">To get more details on all options and functions described herein, please refer to their respective man pages.
-<p class="level0"><a name="Building"></a><h2 class="nroffsh">Building</h2>
-<p class="level0">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 read this to get general information that may apply to your environment as well.
-<p class="level0"><a name="Compiling"></a><span class="nroffip">Compiling the Program</span>
-<p class="level1">Your compiler needs to know where the libcurl headers are located. Therefore you must set your compiler's include path to point to the directory where you installed them. The 'curl-config'[3] tool can be used to get this information:
-<p class="level1">$ curl-config --cflags
-<p class="level1">
-<p class="level0"><a name="Linking"></a><span class="nroffip">Linking the Program with libcurl</span>
-<p class="level1">When having compiled the program, you need to link your object files to create a single executable. For that to succeed, you need to link with libcurl and possibly also with other libraries that libcurl itself depends on. Like the OpenSSL libraries, but even some standard OS libraries may be needed on the command line. To figure out which flags to use, once again the 'curl-config' tool comes to the rescue:
-<p class="level1">$ curl-config --libs
-<p class="level1">
-<p class="level0"><a name="SSL"></a><span class="nroffip">SSL or Not</span>
-<p class="level1">libcurl can be built and customized in many ways. One of the things that varies from different libraries and builds is the support for SSL-based transfers, like HTTPS and FTPS. If a supported SSL library was detected properly at build-time, libcurl will be built with SSL support. To figure out if an installed libcurl has been built with SSL support enabled, use 'curl-config' like this:
-<p class="level1">$ curl-config --feature
-<p class="level1">And if SSL is supported, the keyword 'SSL' will be written to stdout, possibly together with a few other features that could be either on or off on for different libcurls.
-<p class="level1">See also the "Features libcurl Provides" further down.
-<p class="level0"><a name="autoconf"></a><span class="nroffip">autoconf macro</span>
-<p class="level1">When you write your configure script to detect libcurl and setup variables accordingly, we offer a prewritten macro that probably does everything you need in this area. See docs/libcurl/libcurl.m4 file - it includes docs on how to use it.
-<p class="level1"><a name="Portable"></a><h2 class="nroffsh">Portable Code in a Portable World</h2>
-<p class="level0">The people behind libcurl have put a considerable effort to make libcurl work on a large amount of different operating systems and environments.
-<p class="level0">You program libcurl the same way on all platforms that libcurl runs on. There are only very few minor considerations that differ. If you just make sure to write your code portable enough, you may very well create yourself a very portable program. libcurl shouldn't stop you from that.
-<p class="level0"><a name="Global"></a><h2 class="nroffsh">Global Preparation</h2>
-<p class="level0">The program must initialize some of the libcurl functionality globally. That means it should be done exactly once, no matter how many times you intend to use the library. Once for your program's entire life time. This is done using
-<p class="level0">&nbsp;curl_global_init()
-<p class="level0">and it takes one parameter which is a bit pattern that tells libcurl what to initialize. Using <span Class="emphasis">CURL_GLOBAL_ALL</span> will make it initialize all known internal sub modules, and might be a good default option. The current two bits that are specified are:
-<p class="level1">
-<p class="level0"><a name="CURLGLOBALWIN32"></a><span class="nroffip">CURL_GLOBAL_WIN32</span>
-<p class="level1">which only does anything on Windows machines. When used on a Windows machine, it'll make libcurl initialize the win32 socket stuff. Without having that initialized properly, your program cannot use sockets properly. You should only do this once for each application, so if your program already does this or of another library in use does it, you should not tell libcurl to do this as well.
-<p class="level0"><a name="CURLGLOBALSSL"></a><span class="nroffip">CURL_GLOBAL_SSL</span>
-<p class="level1">which only does anything on libcurls compiled and built SSL-enabled. On these systems, this will make libcurl initialize the SSL library properly for this application. This only needs to be done once for each application so if your program or another library already does this, this bit should not be needed.
-<p class="level0">
-<p class="level0">libcurl has a default protection mechanism that detects if <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> hasn't been called by the time <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> is called and if that is the case, libcurl runs the function itself with a guessed bit pattern. Please note that depending solely on this is not considered nice nor very good.
-<p class="level0">When the program no longer uses libcurl, it should call <a class="emphasis" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a>, which is the opposite of the init call. It will then do the reversed operations to cleanup the resources the <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> call initialized.
-<p class="level0">Repeated calls to <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> and <a class="emphasis" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a> should be avoided. They should only be called once each.
-<p class="level0"><a name="Features"></a><h2 class="nroffsh">Features libcurl Provides</h2>
-<p class="level0">It is considered best-practice to determine libcurl features at run-time rather than at build-time (if possible of course). By calling <a class="emphasis" href="./curl_version_info.html">curl_version_info(3)</a> and checking out the details of the returned struct, your program can figure out exactly what the currently running libcurl supports.
-<p class="level0"><a name="Handle"></a><h2 class="nroffsh">Handle the Easy libcurl</h2>
-<p class="level0">libcurl first introduced the so called easy interface. All operations in the easy interface are prefixed with 'curl_easy'.
-<p class="level0">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.
-<p class="level0">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 must never share the same handle in multiple threads.
-<p class="level0">Get an easy handle with
-<p class="level0">&nbsp;easyhandle = curl_easy_init();
-<p class="level0">It returns an easy handle. Using that you proceed to the next step: setting up your preferred actions. A handle is just a logic entity for the upcoming transfer or series of transfers.
-<p class="level0">You set properties and options for this handle using <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>. They control how the subsequent transfer or transfers will be made. Options remain set in the handle until set again to something different. Alas, multiple requests using the same handle will use the same options.
-<p class="level0">Many of the options you set in libcurl are "strings", pointers to data terminated with a zero byte. When you set strings with <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>, libcurl makes its own copy so that they don't need to be kept around in your application after being set[4].
-<p class="level0">One of the most basic properties to set in the handle is the URL. You set your preferred URL to transfer with CURLOPT_URL in a manner similar to:
-<p class="level0"><pre>
-<p class="level0">&nbsp;curl_easy_setopt(handle, CURLOPT_URL, "<a href="http://domain.com/">http://domain.com/</a>");
- </pre>
-
-<p class="level0">
-<p class="level0">Let's assume for a while that you want to receive data as the URL identifies a remote resource you want to get here. Since you write a sort of application that needs this transfer, I assume that you would like to get the data passed to you directly instead of simply getting it passed to stdout. So, you write your own function that matches this prototype:
-<p class="level0">&nbsp;size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
-<p class="level0">You tell libcurl to pass all data to this function by issuing a function similar to this:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_WRITEFUNCTION, write_data);
-<p class="level0">You can control what data your callback function gets in the fourth argument by setting another property:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, &internal_struct);
-<p class="level0">Using that property, you can easily pass local data between your application and the function that gets invoked by libcurl. libcurl itself won't touch the data you pass with <span Class="emphasis">CURLOPT_WRITEDATA</span>.
-<p class="level0">libcurl offers its own default internal callback that will take care of the data if you don't set the callback with <span Class="emphasis">CURLOPT_WRITEFUNCTION</span>. It will then simply output the received data to stdout. You can have the default callback write the data to a different file handle by passing a 'FILE *' to a file opened for writing with the <span Class="emphasis">CURLOPT_WRITEDATA</span> option.
-<p class="level0">Now, we need to take a step back and have a deep breath. Here's one of those rare platform-dependent nitpicks. Did you spot it? On some platforms[2], libcurl won't be able to operate on files opened by the program. Thus, if you use the default callback and pass in an open file with <span Class="emphasis">CURLOPT_WRITEDATA</span>, it will crash. You should therefore avoid this to make your program run fine virtually everywhere.
-<p class="level0">(<span Class="emphasis">CURLOPT_WRITEDATA</span> was formerly known as <span Class="emphasis">CURLOPT_FILE</span>. Both names still work and do the same thing).
-<p class="level0">If you're using libcurl as a win32 DLL, you MUST use the <span Class="emphasis">CURLOPT_WRITEFUNCTION</span> if you set <span Class="emphasis">CURLOPT_WRITEDATA</span> - or you will experience crashes.
-<p class="level0">There are of course many more options you can set, and we'll get back to a few of them later. Let's instead continue to the actual transfer:
-<p class="level0">&nbsp;success = curl_easy_perform(easyhandle);
-<p class="level0"><a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> will connect to the remote site, do the necessary commands and receive the transfer. Whenever it receives data, it calls the callback function we previously set. The function may get one byte at a time, or it may get many kilobytes at once. libcurl delivers as much as possible as often as possible. Your callback function should return the number of bytes it "took care of". If that is not the exact same amount of bytes that was passed to it, libcurl will abort the operation and return with an error code.
-<p class="level0">When the transfer is complete, the function returns a return code that informs you if it succeeded in its mission or not. If a return code isn't enough for you, you can use the CURLOPT_ERRORBUFFER to point libcurl to a buffer of yours where it'll store a human readable error message as well.
-<p class="level0">If you then want to transfer another file, the handle is ready to be used again. Mind you, it is even preferred that you re-use an existing handle if you intend to make another transfer. libcurl will then attempt to re-use the previous connection.
-<p class="level0">For some protocols, downloading a file can involve a complicated process of logging in, setting the transfer mode, changing the current directory and finally transferring the file data. libcurl takes care of all that complication for you. Given simply the URL to a file, libcurl will take care of all the details needed to get the file moved from one machine to another.
-<p class="level0"><a name="Multi-threading"></a><h2 class="nroffsh">Multi-threading Issues</h2>
-<p class="level0">The first basic rule is that you must <span Class="bold">never</span> share a libcurl handle (be it easy or multi or whatever) between multiple threads. Only use one handle in one thread at a time.
-<p class="level0">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 c-ares support and not on Windows.
-<p class="level0">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 might have their own requirements on this issue. Basically, you need to provide one or two functions to allow it to function properly. For all details, see this:
-<p class="level0">OpenSSL
-<p class="level0">&nbsp;<a href="http://www.openssl.org/docs/crypto/threads.html">http://www.openssl.org/docs/crypto/threads.html</a>#DESCRIPTION
-<p class="level0">GnuTLS
-<p class="level0">&nbsp;<a href="http://www.gnu.org/software/gnutls/manual/html_node/">http://www.gnu.org/software/gnutls/manual/html_node/</a>Multi_002dthreaded-applications.html
-<p class="level0">NSS
-<p class="level0">&nbsp;is claimed to be thread-safe already without anything required.
-<p class="level0">PolarSSL
-<p class="level0">&nbsp;Required actions unknown.
-<p class="level0">yassl
-<p class="level0">&nbsp;Required actions unknown.
-<p class="level0">When using multiple threads you should set the CURLOPT_NOSIGNAL option to 1 for all handles. Everything will or might work fine except that timeouts are not honored during the DNS lookup - which you can work around by building libcurl with c-ares support. c-ares is a library that provides asynchronous name resolves. On some platforms, libcurl simply will not function properly multi-threaded unless this option is set.
-<p class="level0">Also, note that CURLOPT_DNS_USE_GLOBAL_CACHE is not thread-safe.
-<p class="level0"><a name="When"></a><h2 class="nroffsh">When It Doesn't Work</h2>
-<p class="level0">There will always be times when the transfer fails for some reason. You might have set the wrong libcurl option or misunderstood what the libcurl option actually does, or the remote server might return non-standard replies that confuse the library which then confuses your program.
-<p class="level0">There's one golden rule when these things occur: set the CURLOPT_VERBOSE option to 1. It'll cause the library to spew out the entire protocol details it sends, some internal info and some received protocol data as well (especially when using FTP). If you're using HTTP, adding the headers in the received output to study is also a clever way to get a better understanding why the server behaves the way it does. Include headers in the normal body output with CURLOPT_HEADER set 1.
-<p class="level0">Of course, there are bugs left. We need to know about them to be able to fix them, so we're quite dependent on your bug reports! When you do report suspected bugs in libcurl, please include as many details as you possibly can: a protocol dump that CURLOPT_VERBOSE produces, library version, as much as possible of your code that uses libcurl, operating system name and version, compiler name and version etc.
-<p class="level0">If CURLOPT_VERBOSE is not enough, you increase the level of debug data your application receive by using the CURLOPT_DEBUGFUNCTION.
-<p class="level0">Getting some in-depth knowledge about the protocols involved is never wrong, and if you're trying to do funny things, you might very well understand libcurl and how to use it better if you study the appropriate RFC documents at least briefly.
-<p class="level0"><a name="Upload"></a><h2 class="nroffsh">Upload Data to a Remote Site</h2>
-<p class="level0">libcurl tries to keep a protocol independent approach to most transfers, thus uploading to a remote FTP site is very similar to uploading data to a HTTP server with a PUT request.
-<p class="level0">Of course, first you either create an easy handle or you re-use one existing one. Then you set the URL to operate on just like before. This is the remote URL, that we now will upload.
-<p class="level0">Since we write an application, we most likely want libcurl to get the upload data by asking us for it. To make it do that, we set the read callback and the custom pointer libcurl will pass to our read callback. The read callback should have a prototype similar to:
-<p class="level0">&nbsp;size_t function(char *bufptr, size_t size, size_t nitems, void *userp);
-<p class="level0">Where bufptr is the pointer to a buffer we fill in with data to upload and size*nitems is the size of the buffer and therefore also the maximum amount of data we can return to libcurl in this call. The 'userp' pointer is the custom pointer we set to point to a struct of ours to pass private data between the application and the callback.
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_READFUNCTION, read_function);
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_READDATA, &filedata);
-<p class="level0">Tell libcurl that we want to upload:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_UPLOAD, 1L);
-<p class="level0">A few protocols won't behave properly when uploads are done without any prior knowledge of the expected file size. So, set the upload file size using the CURLOPT_INFILESIZE_LARGE for all known file sizes like this[1]:
-<p class="level0"><pre>
-<p class="level0">&nbsp;/* in this example, file_size must be an curl_off_t variable */
- &nbsp;curl_easy_setopt(easyhandle, CURLOPT_INFILESIZE_LARGE, file_size);
- </pre>
-
-<p class="level0">
-<p class="level0">When you call <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> this time, it'll perform all the necessary operations and when it has invoked the upload it'll call your supplied callback to get the data to upload. The program should return as much data as possible in every invoke, as that is likely to make the upload perform as fast as possible. The callback should return the number of bytes it wrote in the buffer. Returning 0 will signal the end of the upload.
-<p class="level0"><a name="Passwords"></a><h2 class="nroffsh">Passwords</h2>
-<p class="level0">Many protocols use or even require that user name and password are provided to be able to download or upload the data of your choice. libcurl offers several ways to specify them.
-<p class="level0">Most protocols support that you specify the name and password in the URL itself. libcurl will detect this and use them accordingly. This is written like this:
-<p class="level0">&nbsp;protocol://user:password@example.com/path/
-<p class="level0">If you need any odd letters in your user name or password, you should enter them URL encoded, as %XX where XX is a two-digit hexadecimal number.
-<p class="level0">libcurl also provides options to set various passwords. The user name and password as shown embedded in the URL can instead get set with the CURLOPT_USERPWD option. The argument passed to libcurl should be a char * to a string in the format "user:password". In a manner like this:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_USERPWD, "myname:thesecret");
-<p class="level0">Another case where name and password might be needed at times, is for those users who need to authenticate themselves to a proxy they use. libcurl offers another option for this, the CURLOPT_PROXYUSERPWD. It is used quite similar to the CURLOPT_USERPWD option like this:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "myname:thesecret");
-<p class="level0">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 ability to use this file to figure out what set of user name and password to use for a particular host. As an extension to the normal functionality, libcurl also supports this file for non-FTP protocols such as HTTP. To make curl use this file, use the CURLOPT_NETRC option:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_NETRC, 1L);
-<p class="level0">And a very basic example of how such a .netrc file may look like:
-<p class="level0"><pre>
-<p class="level0">&nbsp;machine myhost.mydomain.com
- &nbsp;login userlogin
- &nbsp;password secretword
- </pre>
-
-<p class="level0">
-<p class="level0">All these examples have been cases where the password has been optional, or at least you could leave it out and have libcurl attempt to do its job without it. There are times when the password isn't optional, like when you're using an SSL private key for secure transfers.
-<p class="level0">To pass the known private key password to libcurl:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_KEYPASSWD, "keypassword");
-<p class="level0"><a name="HTTP"></a><h2 class="nroffsh">HTTP Authentication</h2>
-<p class="level0">The previous chapter showed how to set user name and password for getting URLs that require authentication. When using the HTTP protocol, there are many different ways a client can provide those credentials to the server and you can control which way libcurl will (attempt to) use them. The default HTTP authentication method is called 'Basic', which is sending the name and password in clear-text in the HTTP request, base64-encoded. This is insecure.
-<p class="level0">At the time of this writing, libcurl can be built to use: Basic, Digest, NTLM, Negotiate, GSS-Negotiate and SPNEGO. You can tell libcurl which one to use with CURLOPT_HTTPAUTH as in:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
-<p class="level0">And when you send authentication to a proxy, you can also set authentication type the same way but instead with CURLOPT_PROXYAUTH:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
-<p class="level0">Both these options allow you to set multiple types (by ORing them together), to make libcurl pick the most secure one out of the types the server/proxy claims to support. This method does however add a round-trip since libcurl must first ask the server what it supports:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH, &nbsp;CURLAUTH_DIGEST|CURLAUTH_BASIC);
-<p class="level0">For convenience, you can use the 'CURLAUTH_ANY' define (instead of a list with specific types) which allows libcurl to use whatever method it wants.
-<p class="level0">When asking for multiple types, libcurl will pick the available one it considers "best" in its own internal order of preference.
-<p class="level0"><a name="HTTP"></a><h2 class="nroffsh">HTTP POSTing</h2>
-<p class="level0">We get many questions regarding how to issue HTTP POSTs with libcurl the proper way. This chapter will thus include examples using both different versions of HTTP POST that libcurl supports.
-<p class="level0">The first version is the simple POST, the most common version, that most HTML pages using the &lt;form&gt; tag uses. We provide a pointer to the data and tell libcurl to post it all to the remote site:
-<p class="level0"><pre>
-<p class="level0">&nbsp; char *data="name=daniel&project=curl";
- &nbsp; curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, data);
- &nbsp; curl_easy_setopt(easyhandle, CURLOPT_URL, "<a href="http://posthere.com/">http://posthere.com/</a>");
- <p class="level0">&nbsp; curl_easy_perform(easyhandle); /* post away! */
- </pre>
-
-<p class="level0">
-<p class="level0">Simple enough, huh? Since you set the POST options with the CURLOPT_POSTFIELDS, this automatically switches the handle to use POST in the upcoming request.
-<p class="level0">Ok, so what if you want to post binary data that also requires you to set the Content-Type: header of the post? Well, binary posts prevent libcurl from being able to do strlen() on the data to figure out the size, so therefore we must tell libcurl the size of the post data. Setting headers in libcurl requests are done in a generic way, by building a list of our own headers and then passing that list to libcurl.
-<p class="level0"><pre>
-<p class="level0">&nbsp;struct curl_slist *headers=NULL;
- &nbsp;headers = curl_slist_append(headers, "Content-Type: text/xml");
- <p class="level0">&nbsp;/* post binary data */
- &nbsp;curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, binaryptr);
- <p class="level0">&nbsp;/* set the size of the postfields data */
- &nbsp;curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDSIZE, 23L);
- <p class="level0">&nbsp;/* pass our list of custom made headers */
- &nbsp;curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);
- <p class="level0">&nbsp;curl_easy_perform(easyhandle); /* post away! */
- <p class="level0">&nbsp;curl_slist_free_all(headers); /* free the header list */
- </pre>
-
-<p class="level0">
-<p class="level0">While the simple examples above cover the majority of all cases where HTTP POST operations are required, they don't do multi-part formposts. Multi-part formposts were introduced as a better way to post (possibly large) binary data and were first documented in the RFC1867 (updated in RFC2388). They're called multi-part because they're built by a chain of parts, each part being a single unit of data. Each part has its own name and contents. You can in fact create and post a multi-part formpost with the regular libcurl POST support described above, but that would require that you build a formpost yourself and provide to libcurl. To make that easier, libcurl provides <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. Using this function, you add parts to the form. When you're done adding parts, you post the whole form.
-<p class="level0">The following example sets two simple text parts with plain textual contents, and then a file with binary contents and uploads the whole thing.
-<p class="level0"><pre>
-<p class="level0">&nbsp;struct curl_httppost *post=NULL;
- &nbsp;struct curl_httppost *last=NULL;
- &nbsp;curl_formadd(&post, &last,
- &nbsp; CURLFORM_COPYNAME, "name",
- &nbsp; CURLFORM_COPYCONTENTS, "daniel", CURLFORM_END);
- &nbsp;curl_formadd(&post, &last,
- &nbsp; CURLFORM_COPYNAME, "project",
- &nbsp; CURLFORM_COPYCONTENTS, "curl", CURLFORM_END);
- &nbsp;curl_formadd(&post, &last,
- &nbsp; CURLFORM_COPYNAME, "logotype-image",
- &nbsp; CURLFORM_FILECONTENT, "curl.png", CURLFORM_END);
- <p class="level0">&nbsp;/* Set the form info */
- &nbsp;curl_easy_setopt(easyhandle, CURLOPT_HTTPPOST, post);
- <p class="level0">&nbsp;curl_easy_perform(easyhandle); /* post away! */
- <p class="level0">&nbsp;/* free the post data again */
- &nbsp;curl_formfree(post);
- </pre>
-
-<p class="level0">
-<p class="level0">Multipart formposts are chains of parts using MIME-style separators and headers. It means that each one of these separate parts get a few headers set that describe the individual content-type, size etc. To enable your application to handicraft this formpost even more, libcurl allows you to supply your own set of custom headers to such an individual form part. You can of course supply headers to as many parts as you like, but this little example will show how you set headers to one specific part when you add that to the post handle:
-<p class="level0"><pre>
-<p class="level0">&nbsp;struct curl_slist *headers=NULL;
- &nbsp;headers = curl_slist_append(headers, "Content-Type: text/xml");
- <p class="level0">&nbsp;curl_formadd(&post, &last,
- &nbsp; CURLFORM_COPYNAME, "logotype-image",
- &nbsp; CURLFORM_FILECONTENT, "curl.xml",
- &nbsp; CURLFORM_CONTENTHEADER, headers,
- &nbsp; CURLFORM_END);
- <p class="level0">&nbsp;curl_easy_perform(easyhandle); /* post away! */
- <p class="level0">&nbsp;curl_formfree(post); /* free post */
- &nbsp;curl_slist_free_all(headers); /* free custom header list */
- </pre>
-
-<p class="level0">
-<p class="level0">Since all options on an easyhandle are "sticky", they remain the same until changed even if you do call <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a>, you may need to tell curl to go back to a plain GET request if you intend to do one as your next request. You force an easyhandle to go back to GET by using the CURLOPT_HTTPGET option:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_HTTPGET, 1L);
-<p class="level0">Just setting CURLOPT_POSTFIELDS to "" or NULL will *not* stop libcurl from doing a POST. It will just make it POST without any data to send!
-<p class="level0"><a name="Showing"></a><h2 class="nroffsh">Showing Progress</h2>
-<p class="level0">
-<p class="level0">For historical and traditional reasons, libcurl has a built-in progress meter that can be switched on and then makes it present a progress meter in your terminal.
-<p class="level0">Switch on the progress meter by, oddly enough, setting CURLOPT_NOPROGRESS to zero. This option is set to 1 by default.
-<p class="level0">For most applications however, the built-in progress meter is useless and what instead is interesting is the ability to specify a progress callback. The function pointer you pass to libcurl will then be called on irregular intervals with information about the current transfer.
-<p class="level0">Set the progress callback by using CURLOPT_PROGRESSFUNCTION. And pass a pointer to a function that matches this prototype:
-<p class="level0"><pre>
-<p class="level0">&nbsp;int progress_callback(void *clientp,
- &nbsp; double dltotal,
- &nbsp; double dlnow,
- &nbsp; double ultotal,
- &nbsp; double ulnow);
- </pre>
-
-<p class="level0">
-<p class="level0">If any of the input arguments is unknown, a 0 will be passed. The first argument, the 'clientp' is the pointer you pass to libcurl with CURLOPT_PROGRESSDATA. libcurl won't touch it.
-<p class="level0"><a name="libcurl"></a><h2 class="nroffsh">libcurl with C++</h2>
-<p class="level0">
-<p class="level0">There's basically only one thing to keep in mind when using C++ instead of C when interfacing libcurl:
-<p class="level0">The callbacks CANNOT be non-static class member functions
-<p class="level0">Example C++ code:
-<p class="level0"><pre>
-<p class="level0">class AClass {
- &nbsp; static size_t write_data(void *ptr, size_t size, size_t nmemb,
- &nbsp; void *ourpointer)
- &nbsp; {
- &nbsp; /* do what you want with the data */
- &nbsp; }
- &nbsp;}
- </pre>
-
-<p class="level0">
-<p class="level0"><a name="Proxies"></a><h2 class="nroffsh">Proxies</h2>
-<p class="level0">
-<p class="level0">What "proxy" means according to Merriam-Webster: "a person authorized to act for another" but also "the agency, function, or office of a deputy who acts as a substitute for another".
-<p class="level0">Proxies are exceedingly common these days. Companies often only offer Internet access to employees through their proxies. Network clients or user-agents ask the proxy for documents, the proxy does the actual request and then it returns them.
-<p class="level0">libcurl supports SOCKS and HTTP proxies. When a given URL is wanted, libcurl will ask the proxy for it instead of trying to connect to the actual host identified in the URL.
-<p class="level0">If you're using a SOCKS proxy, you may find that libcurl doesn't quite support all operations through it.
-<p class="level0">For HTTP proxies: the fact that the proxy is a HTTP proxy puts certain restrictions on what can actually happen. A requested URL that might not be a HTTP URL will be still be passed to the HTTP proxy to deliver back to libcurl. This happens transparently, and an application may not need to know. I say "may", because at times it is very important to understand that all operations over a HTTP proxy use the HTTP protocol. For example, you can't invoke your own custom FTP commands or even proper FTP directory listings.
-<p class="level0">
-<p class="level0"><a name="Proxy"></a><span class="nroffip">Proxy Options</span>
-<p class="level1">
-<p class="level1">To tell libcurl to use a proxy at a given port number:
-<p class="level1">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_PROXY, "proxy-host.com:8080");
-<p class="level1">Some proxies require user authentication before allowing a request, and you pass that information similar to this:
-<p class="level1">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "user:password");
-<p class="level1">If you want to, you can specify the host name only in the CURLOPT_PROXY option, and set the port number separately with CURLOPT_PROXYPORT.
-<p class="level1">Tell libcurl what kind of proxy it is with CURLOPT_PROXYTYPE (if not, it will default to assume a HTTP proxy):
-<p class="level1">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
-<p class="level1">
-<p class="level0"><a name="Environment"></a><span class="nroffip">Environment Variables</span>
-<p class="level1">
-<p class="level1">libcurl automatically checks and uses a set of environment variables to know what proxies to use for certain protocols. The names of the variables are following an ancient de facto standard and are built up as "[protocol]_proxy" (note the lower casing). Which makes the variable 'http_proxy' checked for a name of a proxy to use when the input URL is HTTP. Following the same rule, the variable named 'ftp_proxy' is checked for FTP URLs. Again, the proxies are always HTTP proxies, the different names of the variables simply allows different HTTP proxies to be used.
-<p class="level1">The proxy environment variable contents should be in the format "[protocol://][user:password@]machine[:port]". Where the protocol:// part is simply ignored if present (so <a href="http://proxy">http://proxy</a> and bluerk://proxy will do the same) and the optional port number specifies on which port the proxy operates on the host. If not specified, the internal default port number will be used and that is most likely *not* the one you would like it to be.
-<p class="level1">There are two special environment variables. 'all_proxy' is what sets proxy for any URL in case the protocol specific variable wasn't set, and 'no_proxy' defines a list of hosts that should not use a proxy even though a variable may say so. If 'no_proxy' is a plain asterisk ("*") it matches all hosts.
-<p class="level1">To explicitly disable libcurl's checking for and using the proxy environment variables, set the proxy name to "" - an empty string - with CURLOPT_PROXY.
-<p class="level0"><a name="SSL"></a><span class="nroffip">SSL and Proxies</span>
-<p class="level1">
-<p class="level1">SSL is for secure point-to-point connections. This involves strong encryption and similar things, which effectively makes it impossible for a proxy to operate as a "man in between" which the proxy's task is, as previously discussed. Instead, the only way to have SSL work over a HTTP proxy is to ask the proxy to tunnel trough everything without being able to check or fiddle with the traffic.
-<p class="level1">Opening an SSL connection over a HTTP proxy is therefor a matter of asking the proxy for a straight connection to the target host on a specified port. This is made with the HTTP request CONNECT. ("please mr proxy, connect me to that remote host").
-<p class="level1">Because of the nature of this operation, where the proxy has no idea what kind of data that is passed in and out through this tunnel, this breaks some of the very few advantages that come from using a proxy, such as caching. Many organizations prevent this kind of tunneling to other destination port numbers than 443 (which is the default HTTPS port number).
-<p class="level1">
-<p class="level0"><a name="Tunneling"></a><span class="nroffip">Tunneling Through Proxy</span>
-<p class="level1">As explained above, tunneling is required for SSL to work and often even restricted to the operation intended for SSL; HTTPS.
-<p class="level1">This is however not the only time proxy-tunneling might offer benefits to you or your application.
-<p class="level1">As tunneling opens a direct connection from your application to the remote machine, it suddenly also re-introduces the ability to do non-HTTP operations over a HTTP proxy. You can in fact use things such as FTP upload or FTP custom commands this way.
-<p class="level1">Again, this is often prevented by the administrators of proxies and is rarely allowed.
-<p class="level1">Tell libcurl to use proxy tunneling like this:
-<p class="level1">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_HTTPPROXYTUNNEL, 1L);
-<p class="level1">In fact, there might even be times when you want to do plain HTTP operations using a tunnel like this, as it then enables you to operate on the remote server instead of asking the proxy to do so. libcurl will not stand in the way for such innovative actions either!
-<p class="level1">
-<p class="level0"><a name="Proxy"></a><span class="nroffip">Proxy Auto-Config</span>
-<p class="level1">
-<p class="level1">Netscape first came up with this. It is basically a web page (usually using a .pac extension) with a Javascript that when executed by the browser with the requested URL as input, returns information to the browser on how to connect to the URL. The returned information might be "DIRECT" (which means no proxy should be used), "PROXY host:port" (to tell the browser where the proxy for this particular URL is) or "SOCKS host:port" (to direct the browser to a SOCKS proxy).
-<p class="level1">libcurl has no means to interpret or evaluate Javascript and thus it doesn't support this. If you get yourself in a position where you face this nasty invention, the following advice have been mentioned and used in the past:
-<p class="level1">- Depending on the Javascript complexity, write up a script that translates it to another language and execute that.
-<p class="level1">- Read the Javascript code and rewrite the same logic in another language.
-<p class="level1">- Implement a Javascript interpreter; people have successfully used the Mozilla Javascript engine in the past.
-<p class="level1">- Ask your admins to stop this, for a static proxy setup or similar.
-<p class="level1"><a name="Persistence"></a><h2 class="nroffsh">Persistence Is The Way to Happiness</h2>
-<p class="level0">
-<p class="level0">Re-cycling the same easy handle several times when doing multiple requests is the way to go.
-<p class="level0">After each single <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> operation, libcurl will keep the connection alive and open. A subsequent request using the same easy handle to the same host might just be able to use the already open connection! This reduces network impact a lot.
-<p class="level0">Even if the connection is dropped, all connections involving SSL to the same host again, will benefit from libcurl's session ID cache that drastically reduces re-connection time.
-<p class="level0">FTP connections that are kept alive save a lot of time, as the command- response round-trips are skipped, and also you don't risk getting blocked without permission to login again like on many FTP servers only allowing N persons to be logged in at the same time.
-<p class="level0">libcurl caches DNS name resolving results, to make lookups of a previously looked up name a lot faster.
-<p class="level0">Other interesting details that improve performance for subsequent requests may also be added in the future.
-<p class="level0">Each easy handle will attempt to keep the last few connections alive for a while in case they are to be used again. You can set the size of this "cache" with the CURLOPT_MAXCONNECTS option. Default is 5. There is very seldom any point in changing this value, and if you think of changing this it is often just a matter of thinking again.
-<p class="level0">To force your upcoming request to not use an already existing connection (it will even close one first if there happens to be one alive to the same host you're about to operate on), you can do that by setting CURLOPT_FRESH_CONNECT to 1. In a similar spirit, you can also forbid the upcoming request to be "lying" around and possibly get re-used after the request by setting CURLOPT_FORBID_REUSE to 1.
-<p class="level0"><a name="HTTP"></a><h2 class="nroffsh">HTTP Headers Used by libcurl</h2>
-<p class="level0">When you use libcurl to do HTTP requests, it'll pass along a series of headers automatically. It might be good for you to know and understand these. You can replace or remove them by using the CURLOPT_HTTPHEADER option.
-<p class="level0">
-<p class="level0"><a name="Host"></a><span class="nroffip">Host</span>
-<p class="level1">This header is required by HTTP 1.1 and even many 1.0 servers and should be the name of the server we want to talk to. This includes the port number if anything but default.
-<p class="level1">
-<p class="level0"><a name="Pragma"></a><span class="nroffip">Pragma</span>
-<p class="level1">"no-cache". Tells a possible proxy to not grab a copy from the cache but to fetch a fresh one.
-<p class="level1">
-<p class="level0"><a name="Accept"></a><span class="nroffip">Accept</span>
-<p class="level1">"*/*".
-<p class="level1">
-<p class="level0"><a name="Expect"></a><span class="nroffip">Expect</span>
-<p class="level1">When doing POST requests, libcurl sets this header to "100-continue" to ask the server for an "OK" message before it proceeds with sending the data part of the post. If the POSTed data amount is deemed "small", libcurl will not use this header.
-<p class="level1"><a name="Customizing"></a><h2 class="nroffsh">Customizing Operations</h2>
-<p class="level0">There is an ongoing development today where more and more protocols are built upon HTTP for transport. This has obvious benefits as HTTP is a tested and reliable protocol that is widely deployed and has excellent proxy-support.
-<p class="level0">When you use one of these protocols, and even when doing other kinds of programming you may need to change the traditional HTTP (or FTP or...) manners. You may need to change words, headers or various data.
-<p class="level0">libcurl is your friend here too.
-<p class="level0">
-<p class="level0"><a name="CUSTOMREQUEST"></a><span class="nroffip">CUSTOMREQUEST</span>
-<p class="level1">If just changing the actual HTTP request keyword is what you want, like when GET, HEAD or POST is not good enough for you, CURLOPT_CUSTOMREQUEST is there for you. It is very simple to use:
-<p class="level1">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "MYOWNREQUEST");
-<p class="level1">When using the custom request, you change the request keyword of the actual request you are performing. Thus, by default you make a GET request but you can also make a POST operation (as described before) and then replace the POST keyword if you want to. You're the boss.
-<p class="level1">
-<p class="level0"><a name="Modify"></a><span class="nroffip">Modify Headers</span>
-<p class="level1">HTTP-like protocols pass a series of headers to the server when doing the request, and you're free to pass any amount of extra headers that you think fit. Adding headers is this easy:
-<p class="level1"><pre>
-<p class="level1">&nbsp;struct curl_slist *headers=NULL; /* init to NULL is important */
- <p class="level1">&nbsp;headers = curl_slist_append(headers, "Hey-server-hey: how are you?");
- &nbsp;headers = curl_slist_append(headers, "X-silly-content: yes");
- <p class="level1">&nbsp;/* pass our list of custom made headers */
- &nbsp;curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);
- <p class="level1">&nbsp;curl_easy_perform(easyhandle); /* transfer http */
- <p class="level1">&nbsp;curl_slist_free_all(headers); /* free the header list */
- </pre>
-
-<p class="level1">
-<p class="level1">... and if you think some of the internally generated headers, such as Accept: or Host: don't contain the data you want them to contain, you can replace them by simply setting them too:
-<p class="level1"><pre>
-<p class="level1">&nbsp;headers = curl_slist_append(headers, "Accept: Agent-007");
- &nbsp;headers = curl_slist_append(headers, "Host: munged.host.line");
- </pre>
-
-<p class="level1">
-<p class="level1">
-<p class="level0"><a name="Delete"></a><span class="nroffip">Delete Headers</span>
-<p class="level1">If you replace an existing header with one with no contents, you will prevent the header from being sent. For instance, if you want to completely prevent the "Accept:" header from being sent, you can disable it with code similar to this:
-<p class="level1">&nbsp;headers = curl_slist_append(headers, "Accept:");
-<p class="level1">Both replacing and canceling internal headers should be done with careful consideration and you should be aware that you may violate the HTTP protocol when doing so.
-<p class="level1">
-<p class="level0"><a name="Enforcing"></a><span class="nroffip">Enforcing chunked transfer-encoding</span>
-<p class="level1">
-<p class="level1">By making sure a request uses the custom header "Transfer-Encoding: chunked" when doing a non-GET HTTP operation, libcurl will switch over to "chunked" upload, even though the size of the data to upload might be known. By default, libcurl usually switches over to chunked upload automatically if the upload data size is unknown.
-<p class="level1">
-<p class="level0"><a name="HTTP"></a><span class="nroffip">HTTP Version</span>
-<p class="level1">
-<p class="level1">All HTTP requests includes the version number to tell the server which version we support. libcurl speaks HTTP 1.1 by default. Some very old servers don't like getting 1.1-requests and when dealing with stubborn old things like that, you can tell libcurl to use 1.0 instead by doing something like this:
-<p class="level1">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
-<p class="level1">
-<p class="level0"><a name="FTP"></a><span class="nroffip">FTP Custom Commands</span>
-<p class="level1">
-<p class="level1">Not all protocols are HTTP-like, and thus the above may not help you when you want to make, for example, your FTP transfers to behave differently.
-<p class="level1">Sending custom commands to a FTP server means that you need to send the commands exactly as the FTP server expects them (RFC959 is a good guide here), and you can only use commands that work on the control-connection alone. All kinds of commands that require data interchange and thus need a data-connection must be left to libcurl's own judgement. Also be aware that libcurl will do its very best to change directory to the target directory before doing any transfer, so if you change directory (with CWD or similar) you might confuse libcurl and then it might not attempt to transfer the file in the correct remote directory.
-<p class="level1">A little example that deletes a given file before an operation:
-<p class="level1"><pre>
-<p class="level1">&nbsp;headers = curl_slist_append(headers, "DELE file-to-remove");
- <p class="level1">&nbsp;/* pass the list of custom commands to the handle */
- &nbsp;curl_easy_setopt(easyhandle, CURLOPT_QUOTE, headers);
- <p class="level1">&nbsp;curl_easy_perform(easyhandle); /* transfer ftp data! */
- <p class="level1">&nbsp;curl_slist_free_all(headers); /* free the header list */
- </pre>
-
-<p class="level1">
-<p class="level1">If you would instead want this operation (or chain of operations) to happen _after_ the data transfer took place the option to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> would instead be called CURLOPT_POSTQUOTE and used the exact same way.
-<p class="level1">The custom FTP command will be issued to the server in the same order they are added to the list, and if a command gets an error code returned back from the server, no more commands will be issued and libcurl will bail out with an error code (CURLE_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send commands before a transfer, no transfer will actually take place when a quote command has failed.
-<p class="level1">If you set the CURLOPT_HEADER to 1, you will tell libcurl to get information about the target file and output "headers" about it. The headers will be in "HTTP-style", looking like they do in HTTP.
-<p class="level1">The option to enable headers or to run custom FTP commands may be useful to combine with CURLOPT_NOBODY. If this option is set, no actual file content transfer will be performed.
-<p class="level1">
-<p class="level0"><a name="FTP"></a><span class="nroffip">FTP Custom CUSTOMREQUEST</span>
-<p class="level1">If you do want to list the contents of a FTP directory using your own defined FTP command, CURLOPT_CUSTOMREQUEST will do just that. "NLST" is the default one for listing directories but you're free to pass in your idea of a good alternative.
-<p class="level1"><a name="Cookies"></a><h2 class="nroffsh">Cookies Without Chocolate Chips</h2>
-<p class="level0">In the HTTP sense, a cookie is a name with an associated value. A server sends the name and value to the client, and expects it to get sent back on every subsequent request to the server that matches the particular conditions set. The conditions include that the domain name and path match and that the cookie hasn't become too old.
-<p class="level0">In real-world cases, servers send new cookies to replace existing ones to update them. Server use cookies to "track" users and to keep "sessions".
-<p class="level0">Cookies are sent from server to clients with the header Set-Cookie: and they're sent from clients to servers with the Cookie: header.
-<p class="level0">To just send whatever cookie you want to a server, you can use CURLOPT_COOKIE to set a cookie string like this:
-<p class="level0">&nbsp;curl_easy_setopt(easyhandle, CURLOPT_COOKIE, "name1=var1; name2=var2;");
-<p class="level0">In many cases, that is not enough. You might want to dynamically save whatever cookies the remote server passes to you, and make sure those cookies are then used accordingly on later requests.
-<p class="level0">One way to do this, is to save all headers you receive in a plain file and when you make a request, you tell libcurl to read the previous headers to figure out which cookies to use. Set the header file to read cookies from with CURLOPT_COOKIEFILE.
-<p class="level0">The CURLOPT_COOKIEFILE option also automatically enables the cookie parser in libcurl. Until the cookie parser is enabled, libcurl will not parse or understand incoming cookies and they will just be ignored. However, when the parser is enabled the cookies will be understood and the cookies will be kept in memory and used properly in subsequent requests when the same handle is used. Many times this is enough, and you may not have to save the cookies to disk at all. Note that the file you specify to CURLOPT_COOKIEFILE doesn't have to exist to enable the parser, so a common way to just enable the parser and not read any cookies is to use the name of a file you know doesn't exist.
-<p class="level0">If you would rather use existing cookies that you've previously received with your Netscape or Mozilla browsers, you can make libcurl use that cookie file as input. The CURLOPT_COOKIEFILE is used for that too, as libcurl will automatically find out what kind of file it is and act accordingly.
-<p class="level0">Perhaps the most advanced cookie operation libcurl offers, is saving the entire internal cookie state back into a Netscape/Mozilla formatted cookie file. We call that the cookie-jar. When you set a file name with CURLOPT_COOKIEJAR, that file name will be created and all received cookies will be stored in it when <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> is called. This enables cookies to get passed on properly between multiple handles without any information getting lost.
-<p class="level0"><a name="FTP"></a><h2 class="nroffsh">FTP Peculiarities We Need</h2>
-<p class="level0">
-<p class="level0">FTP transfers use a second TCP/IP connection for the data transfer. This is usually a fact you can forget and ignore but at times this fact will come back to haunt you. libcurl offers several different ways to customize how the second connection is being made.
-<p class="level0">libcurl can either connect to the server a second time or tell the server to connect back to it. The first option is the default and it is also what works best for all the people behind firewalls, NATs or IP-masquerading setups. libcurl then tells the server to open up a new port and wait for a second connection. This is by default attempted with EPSV first, and if that doesn't work it tries PASV instead. (EPSV is an extension to the original FTP spec and does not exist nor work on all FTP servers.)
-<p class="level0">You can prevent libcurl from first trying the EPSV command by setting CURLOPT_FTP_USE_EPSV to zero.
-<p class="level0">In some cases, you will prefer to have the server connect back to you for the second connection. This might be when the server is perhaps behind a firewall or something and only allows connections on a single port. libcurl then informs the remote server which IP address and port number to connect to. This is made with the CURLOPT_FTPPORT option. If you set it to "-", libcurl will use your system's "default IP address". If you want to use a particular IP, you can set the full IP address, a host name to resolve to an IP address or even a local network interface name that libcurl will get the IP address from.
-<p class="level0">When doing the "PORT" approach, libcurl will attempt to use the EPRT and the LPRT before trying PORT, as they work with more protocols. You can disable this behavior by setting CURLOPT_FTP_USE_EPRT to zero.
-<p class="level0"><a name="Headers"></a><h2 class="nroffsh">Headers Equal Fun</h2>
-<p class="level0">
-<p class="level0">Some protocols provide "headers", meta-data separated from the normal data. These headers are by default not included in the normal data stream, but you can make them appear in the data stream by setting CURLOPT_HEADER to 1.
-<p class="level0">What might be even more useful, is libcurl's ability to separate the headers from the data and thus make the callbacks differ. You can for example set a different pointer to pass to the ordinary write callback by setting CURLOPT_WRITEHEADER.
-<p class="level0">Or, you can set an entirely separate function to receive the headers, by using CURLOPT_HEADERFUNCTION.
-<p class="level0">The headers are passed to the callback function one by one, and you can depend on that fact. It makes it easier for you to add custom header parsers etc.
-<p class="level0">"Headers" for FTP transfers equal all the FTP server responses. They aren't actually true headers, but in this case we pretend they are! ;-)
-<p class="level0"><a name="Post"></a><h2 class="nroffsh">Post Transfer Information</h2>
-<p class="level0">
-<p class="level0">&nbsp;[ curl_easy_getinfo ]
-<p class="level0"><a name="Security"></a><h2 class="nroffsh">Security Considerations</h2>
-<p class="level0">
-<p class="level0">The libcurl project takes security seriously. The library is written with caution and precautions are taken to mitigate many kinds of risks encountered while operating with potentially malicious servers on the Internet. It is a powerful library, however, which allows application writers to make trade offs between ease of writing and exposure to potential risky operations. If used the right way, you can use libcurl to transfer data pretty safely.
-<p class="level0">Many applications are used in closed networks where users and servers can be trusted, but many others are used on arbitrary servers and are fed input from potentially untrusted users. Following is a discussion about some risks in the ways in which applications commonly use libcurl and potential mitigations of those risks. It is by no means comprehensive, but shows classes of attacks that robust applications should consider. The Common Weakness Enumeration project at <a href="http://cwe.mitre.org/">http://cwe.mitre.org/</a> is a good reference for many of these and similar types of weaknesses of which application writers should be aware.
-<p class="level0">
-<p class="level0"><a name="Command"></a><span class="nroffip">Command Lines</span>
-<p class="level1">If you use a command line tool (such as curl) that uses libcurl, and you give options to the tool on the command line those options can very likely get read by other users of your system when they use 'ps' or other tools to list currently running processes.
-<p class="level1">To avoid this problem, never feed sensitive things to programs using command line options. Write them to a protected file and use the -K option to avoid this.
-<p class="level1">
-<p class="level0"><a name="netrc"></a><span class="nroffip">.netrc</span>
-<p class="level1">.netrc is a pretty handy file/feature that allows you to login quickly and automatically to frequently visited sites. The file contains passwords in clear text and is a real security risk. In some cases, your .netrc is also stored in a home directory that is NFS mounted or used on another network based file system, so the clear text password will fly through your network every time anyone reads that file!
-<p class="level1">To avoid this problem, don't use .netrc files and never store passwords in plain text anywhere.
-<p class="level1">
-<p class="level0"><a name="Clear"></a><span class="nroffip">Clear Text Passwords</span>
-<p class="level1">Many of the protocols libcurl supports send name and password unencrypted as clear text (HTTP Basic authentication, FTP, TELNET etc). It is very easy for anyone on your network or a network nearby yours to just fire up a network analyzer tool and eavesdrop on your passwords. Don't let the fact that HTTP Basic uses base64 encoded passwords fool you. They may not look readable at a first glance, but they very easily "deciphered" by anyone within seconds.
-<p class="level1">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.
-<p class="level1">
-<p class="level0"><a name="Redirects"></a><span class="nroffip">Redirects</span>
-<p class="level1">The CURLOPT_FOLLOWLOCATION option automatically follows HTTP redirects sent by a remote server. These redirects can refer to any kind of URL, not just HTTP. A redirect to a file: URL would cause the libcurl to read (or write) arbitrary files from the local filesystem. If the application returns the data back to the user (as would happen in some kinds of CGI scripts), an attacker could leverage this to read otherwise forbidden data (e.g. file://localhost/etc/passwd).
-<p class="level1">If authentication credentials are stored in the ~/.netrc file, or Kerberos is in use, any other URL type (not just file:) that requires authentication is also at risk. A redirect such as <a href="ftp://some-internal-server/private-file">ftp://some-internal-server/private-file</a> would then return data even when the server is password protected.
-<p class="level1">In the same way, if an unencrypted SSH private key has been configured for the user running the libcurl application, SCP: or SFTP: URLs could access password or private-key protected resources, e.g. s<a href="ftp://user">ftp://user</a>@some-internal-server/etc/passwd
-<p class="level1">The CURLOPT_REDIR_PROTOCOLS and CURLOPT_NETRC options can be used to mitigate against this kind of attack.
-<p class="level1">A redirect can also specify a location available only on the machine running libcurl, including servers hidden behind a firewall from the attacker. e.g. <a href="http://127.0.0.1/">http://127.0.0.1/</a> or <a href="http://intranet/delete-stuff.cgi">http://intranet/delete-stuff.cgi</a>?delete=all or t<a href="ftp://bootp-server/pc-config-data">ftp://bootp-server/pc-config-data</a>
-<p class="level1">Apps can mitigate against this by disabling CURLOPT_FOLLOWLOCATION and handling redirects itself, sanitizing URLs as necessary. Alternately, an app could leave CURLOPT_FOLLOWLOCATION enabled but set CURLOPT_REDIR_PROTOCOLS and install a CURLOPT_OPENSOCKETFUNCTION callback function in which addresses are sanitized before use.
-<p class="level1">
-<p class="level0"><a name="Private"></a><span class="nroffip">Private Resources</span>
-<p class="level1">A user who can control the DNS server of a domain being passed in within a URL can change the address of the host to a local, private address which the libcurl application will then use. e.g. The innocuous URL <a href="http://fuzzybunnies.example.com/">http://fuzzybunnies.example.com/</a> could actually resolve to the IP address of a server behind a firewall, such as 127.0.0.1 or 10.1.2.3 Apps can mitigate against this by setting a CURLOPT_OPENSOCKETFUNCTION and checking the address before a connection.
-<p class="level1">All the malicious scenarios regarding redirected URLs apply just as well to non-redirected URLs, if the user is allowed to specify an arbitrary URL that could point to a private resource. For example, a web app providing a translation service might happily translate file://localhost/etc/passwd and display the result. Apps can mitigate against this with the CURLOPT_PROTOCOLS option as well as by similar mitigation techniques for redirections.
-<p class="level1">A malicious FTP server could in response to the PASV command return an IP address and port number for a server local to the app running libcurl but behind a firewall. Apps can mitigate against this by using the CURLOPT_FTP_SKIP_PASV_IP option or CURLOPT_FTPPORT.
-<p class="level1">
-<p class="level0"><a name="Uploads"></a><span class="nroffip">Uploads</span>
-<p class="level1">When uploading, a redirect can cause a local (or remote) file to be overwritten. Apps must not allow any unsanitized URL to be passed in for uploads. Also, CURLOPT_FOLLOWLOCATION should not be used on uploads. Instead, the app should handle redirects itself, sanitizing each URL first.
-<p class="level1">
-<p class="level0"><a name="Authentication"></a><span class="nroffip">Authentication</span>
-<p class="level1">Use of CURLOPT_UNRESTRICTED_AUTH could cause authentication information to be sent to an unknown second server. Apps can mitigate against this by disabling CURLOPT_FOLLOWLOCATION and handling redirects itself, sanitizing where necessary.
-<p class="level1">Use of the CURLAUTH_ANY option to CURLOPT_HTTPAUTH could result in user name and password being sent in clear text to an HTTP server. Instead, use CURLAUTH_ANYSAFE which ensures that the password is encrypted over the network, or else fail the request.
-<p class="level1">Use of the CURLUSESSL_TRY option to CURLOPT_USE_SSL could result in user name and password being sent in clear text to an FTP server. Instead, use CURLUSESSL_CONTROL to ensure that an encrypted connection is used or else fail the request.
-<p class="level1">
-<p class="level0"><a name="Cookies"></a><span class="nroffip">Cookies</span>
-<p class="level1">If cookies are enabled and cached, then a user could craft a URL which performs some malicious action to a site whose authentication is already stored in a cookie. e.g. <a href="http://mail.example.com/delete-stuff.cgi">http://mail.example.com/delete-stuff.cgi</a>?delete=all Apps can mitigate against this by disabling cookies or clearing them between requests.
-<p class="level1">
-<p class="level0"><a name="Dangerous"></a><span class="nroffip">Dangerous URLs</span>
-<p class="level1">SCP URLs can contain raw commands within the scp: URL, which is a side effect of how the SCP protocol is designed. e.g. scp://user:pass@host/a;date &gt;/tmp/test; Apps must not allow unsanitized SCP: URLs to be passed in for downloads.
-<p class="level1">
-<p class="level0"><a name="Denial"></a><span class="nroffip">Denial of Service</span>
-<p class="level1">A malicious server could cause libcurl to effectively hang by sending a trickle of data through, or even no data at all but just keeping the TCP connection open. This could result in a denial-of-service attack. The CURLOPT_TIMEOUT and/or CURLOPT_LOW_SPEED_LIMIT options can be used to mitigate against this.
-<p class="level1">A malicious server could cause libcurl to effectively hang by starting to send data, then severing the connection without cleanly closing the TCP connection. The app could install a CURLOPT_SOCKOPTFUNCTION callback function and set the TCP SO_KEEPALIVE option to mitigate against this. Setting one of the timeout options would also work against this attack.
-<p class="level1">A malicious server could cause libcurl to download an infinite amount of data, potentially causing all of memory or disk to be filled. Setting the CURLOPT_MAXFILESIZE_LARGE option is not sufficient to guard against this. Instead, the app should monitor the amount of data received within the write or progress callback and abort once the limit is reached.
-<p class="level1">A malicious HTTP server could cause an infinite redirection loop, causing a denial-of-service. This can be mitigated by using the CURLOPT_MAXREDIRS option.
-<p class="level1">
-<p class="level0"><a name="Arbitrary"></a><span class="nroffip">Arbitrary Headers</span>
-<p class="level1">User-supplied data must be sanitized when used in options like CURLOPT_USERAGENT, CURLOPT_HTTPHEADER, CURLOPT_POSTFIELDS and others that are used to generate structured data. Characters like embedded carriage returns or ampersands could allow the user to create additional headers or fields that could cause malicious transactions.
-<p class="level1">
-<p class="level0"><a name="Server-supplied"></a><span class="nroffip">Server-supplied Names</span>
-<p class="level1">A server can supply data which the application may, in some cases, use as a file name. The curl command-line tool does this with --remote-header-name, using the Content-disposition: header to generate a file name. An application could also use CURLINFO_EFFECTIVE_URL to generate a file name from a server-supplied redirect URL. Special care must be taken to sanitize such names to avoid the possibility of a malicious server supplying one like "/etc/passwd", "autoexec.bat" or even ".bashrc".
-<p class="level1">
-<p class="level0"><a name="Server"></a><span class="nroffip">Server Certificates</span>
-<p class="level1">A secure application should never use the CURLOPT_SSL_VERIFYPEER option to disable certificate validation. There are numerous attacks that are enabled by apps that fail to properly validate server TLS/SSL certificates, thus enabling a malicious server to spoof a legitimate one. HTTPS without validated certificates is potentially as insecure as a plain HTTP connection.
-<p class="level1">
-<p class="level0"><a name="Showing"></a><span class="nroffip">Showing What You Do</span>
-<p class="level1">On a related issue, be aware that even in situations like when you have problems with libcurl and ask someone for help, everything you reveal in order to get best possible help might also impose certain security related risks. Host names, user names, paths, operating system specifics, etc (not to mention passwords of course) may in fact be used by intruders to gain additional information of a potential target.
-<p class="level1">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.
-<p class="level1"><a name="Multiple"></a><h2 class="nroffsh">Multiple Transfers Using the multi Interface</h2>
-<p class="level0">
-<p class="level0">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.
-<p class="level0">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 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.
-<p class="level0">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".
-<p class="level0">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 <a class="emphasis" href="./curl_multi_init.html">curl_multi_init(3)</a> and add all those easy handles to that multi handle with <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a>.
-<p class="level0">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 <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>.
-<p class="level0"><a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> is asynchronous. It will only execute as little as possible and then return back control to your program. It is designed to never block. If it returns CURLM_CALL_MULTI_PERFORM you better call it again soon, as that is a signal that it still has local data to send or remote data to receive.
-<p class="level0">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 makes it easy for you to wait and respond to actions on your own application's sockets/handles. You figure out what to select() for by using <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a>, that fills in a set of fd_set variables for you with the particular file descriptors libcurl uses for the moment.
-<p class="level0">When you then call select(), it'll return when one of the file handles signal action and you then call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> 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 <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>, 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 <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> immediately before the select() call since the current set of file descriptors may change when calling a curl function.
-<p class="level0">If you want to stop the transfer of one of the easy handles in the stack, you can use <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> to remove individual easy handles. Remember that easy handles should be <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>ed.
-<p class="level0">When a transfer within the multi stack has finished, the counter of running transfers (as filled in by <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>) will decrease. When the number reaches zero, all transfers are done.
-<p class="level0"><a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> can be used to get information about completed transfers. It then returns the CURLcode for each easy transfer, to allow you to figure out success on each individual transfer.
-<p class="level0"><a name="SSL"></a><h2 class="nroffsh">SSL, Certificates and Other Tricks</h2>
-<p class="level0">
-<p class="level0">&nbsp;[ seeding, passwords, keys, certificates, ENGINE, ca certs ]
-<p class="level0"><a name="Sharing"></a><h2 class="nroffsh">Sharing Data Between Easy Handles</h2>
-<p class="level0">
-<p class="level0">&nbsp;[ fill in ]
-<p class="level0"><a name="Footnotes"></a><h2 class="nroffsh">Footnotes</h2>
-<p class="level0">
-<p class="level0">
-<p class="level0"><a name="1"></a><span class="nroffip">[1]</span>
-<p class="level1">libcurl 7.10.3 and later have the ability to switch over to chunked Transfer-Encoding in cases where HTTP uploads are done with data of an unknown size.
-<p class="level0"><a name="2"></a><span class="nroffip">[2]</span>
-<p class="level1">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.
-<p class="level0"><a name="3"></a><span class="nroffip">[3]</span>
-<p class="level1">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.
-<p class="level0"><a name="4"></a><span class="nroffip">[4]</span>
-<p class="level1">This behavior was different in versions before 7.17.0, where strings had to remain valid past the end of the <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> call. <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-tutorial.pdf b/docs/libcurl/libcurl-tutorial.pdf
deleted file mode 100644
index 9ed755e6..00000000
--- a/docs/libcurl/libcurl-tutorial.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl.3 b/docs/libcurl/libcurl.3
index c0b221fe..39bcccd4 100644
--- a/docs/libcurl/libcurl.3
+++ b/docs/libcurl/libcurl.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 libcurl 3 "19 March 2002" "libcurl 7.9.6" "libcurl overview"
.SH NAME
libcurl \- client-side URL transfers
@@ -9,18 +29,24 @@ specific man pages for each function mentioned in here. There are also the
\fIlibcurl-share(3)\fP man page and the \fIlibcurl-tutorial(3)\fP man page for
in-depth understanding on how to program with libcurl.
-There are more than thirty custom bindings available that bring libcurl access
-to your favourite language. Look elsewhere for documentation on those.
+There are many bindings available that bring libcurl access to your favourite
+language. Look elsewhere for documentation on those.
-libcurl has a global constant environment that you must set up and
-maintain while using libcurl. This essentially means you call
+libcurl has a global constant environment that you must set up and maintain
+while using libcurl. This essentially means you call
\fIcurl_global_init(3)\fP at the start of your program and
-\fIcurl_global_cleanup(3)\fP at the end. See GLOBAL CONSTANTS below
-for details.
+\fIcurl_global_cleanup(3)\fP at the end. See \fBGLOBAL CONSTANTS\fP below for
+details.
-To transfer files, you always set up an "easy handle" using
-\fIcurl_easy_init(3)\fP, but when you want the file(s) transferred you have
-the option of using the "easy" interface, or the "multi" interface.
+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
+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.
+
+To actually transfer data you have the option of using the "easy" interface,
+or the "multi" interface.
The easy interface is a synchronous interface with which you call
\fIcurl_easy_perform(3)\fP and let it perform the transfer. When it is
@@ -31,7 +57,8 @@ The multi interface on the other hand is an asynchronous interface, that you
call and that performs only a little piece of the transfer on each invoke. It
is perfect if you want to do things while the transfer is in progress, or
similar. The multi interface allows you to select() on libcurl action, and
-even to easily download multiple files simultaneously using a single thread. See further details in the \fIlibcurl-multi(3)\fP man page.
+even to easily download multiple files simultaneously using a single
+thread. See further details in the \fIlibcurl-multi(3)\fP man page.
You can have multiple easy handles share certain data, even if they are used
in different threads. This magic is setup using the share interface, as
@@ -70,6 +97,8 @@ Unix-like operating system that ship libcurl as part of their distributions
often don't provide the curl-config tool, but simply install the library and
headers in the common path for this purpose.
+Many Linux and similar sytems use pkg-config to provide build and link options
+about libraries and libcurl supports that as well.
.SH "LIBCURL SYMBOL NAMES"
All public functions in the libcurl interface are prefixed with 'curl_' (with
a lowercase c). You can find other functions in the library source code, but
@@ -87,27 +116,29 @@ several threads. libcurl is thread-safe and can be used in any number of
threads, but you must use separate curl handles if you want to use libcurl in
more than one thread simultaneously.
-The global environment functions are not thread-safe. See GLOBAL CONSTANTS
-below for details.
+The global environment functions are not thread-safe. See \fBGLOBAL
+CONSTANTS\fP below for details.
.SH "PERSISTENT CONNECTIONS"
Persistent connections means that libcurl can re-use the same connection for
several transfers, if the conditions are right.
libcurl will \fBalways\fP attempt to use persistent connections. Whenever you
-use \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP, libcurl will
-attempt to use an existing connection to do the transfer, and if none exists
-it'll open a new one that will be subject for re-use on a possible following
-call to \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP.
+use \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP etc, libcurl
+will attempt to use an existing connection to do the transfer, and if none
+exists it'll open a new one that will be subject for re-use on a possible
+following call to \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP.
To allow libcurl to take full advantage of persistent connections, you should
-do as many of your file transfers as possible using the same curl handle. When
-you call \fIcurl_easy_cleanup(3)\fP, all the possibly open connections held by
-libcurl will be closed and forgotten.
+do as many of your file transfers as possible using the same handle.
-Note that the options set with \fIcurl_easy_setopt(3)\fP will be used on
-every repeated \fIcurl_easy_perform(3)\fP call.
+If you use the easy interface, and you call \fIcurl_easy_cleanup(3)\fP, all
+the possibly open connections held by libcurl will be closed and forgotten.
+When you've created a multi handle and are using the multi interface, the
+connection pool is instead kept in the multi handle so closing and creating
+new easy handles to do transfers will not affect them. Instead all added easy
+handles can take advantage of the single shared pool.
.SH "GLOBAL CONSTANTS"
There are a variety of constants that libcurl uses, mainly through its
internal use of other libraries, which are too complicated for the
@@ -117,18 +148,16 @@ 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()\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.
+\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.
-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.
+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.
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.
@@ -153,48 +182,42 @@ 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()\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.
+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.
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.html b/docs/libcurl/libcurl.html
deleted file mode 100644
index 43b9bdd0..00000000
--- a/docs/libcurl/libcurl.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<html><head>
-<title>libcurl man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl - client-side URL transfers <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This is a short overview on how to use libcurl in your C programs. There are specific man pages for each function mentioned in here. There are also the <span Class="emphasis">libcurl-easy(3)</span> man page, the <span Class="emphasis">libcurl-multi(3)</span> man page, the <span Class="emphasis">libcurl-share(3)</span> man page and the <span Class="emphasis">libcurl-tutorial(3)</span> man page for in-depth understanding on how to program with libcurl.
-<p class="level0">There are more than thirty custom bindings available that bring libcurl access to your favourite language. Look elsewhere for documentation on those.
-<p class="level0">libcurl has a global constant environment that you must set up and maintain while using libcurl. This essentially means you call <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> at the start of your program and <a class="emphasis" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a> at the end. See GLOBAL CONSTANTS below for details.
-<p class="level0">To transfer files, you always set up an "easy handle" using <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a>, but when you want the file(s) transferred you have the option of using the "easy" interface, or the "multi" interface.
-<p class="level0">The easy interface is a synchronous interface with which you call <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> and let it perform the transfer. When it is completed, the function returns and you can continue. More details are found in the <span Class="emphasis">libcurl-easy(3)</span> man page.
-<p class="level0">The multi interface on the other hand is an asynchronous interface, that you call and that performs only a little piece of the transfer on each invoke. It is perfect if you want to do things while the transfer is in progress, or similar. The multi interface allows you to select() on libcurl action, and even to easily download multiple files simultaneously using a single thread. See further details in the <span Class="emphasis">libcurl-multi(3)</span> man page.
-<p class="level0">You can have multiple easy handles share certain data, even if they are used in different threads. This magic is setup using the share interface, as described in the <span Class="emphasis">libcurl-share(3)</span> man page.
-<p class="level0">There is also a series of other helpful functions to use, including these:
-<p class="level1">
-<p class="level0"><a name="curlversioninfo"></a><span class="nroffip">curl_version_info()</span>
-<p class="level1">gets detailed libcurl (and other used libraries) version info
-<p class="level0"><a name="curlgetdate"></a><span class="nroffip">curl_getdate()</span>
-<p class="level1">converts a date string to time_t
-<p class="level0"><a name="curleasygetinfo"></a><span class="nroffip">curl_easy_getinfo()</span>
-<p class="level1">get information about a performed transfer
-<p class="level0"><a name="curlformadd"></a><span class="nroffip">curl_formadd()</span>
-<p class="level1">helps building an HTTP form POST
-<p class="level0"><a name="curlformfree"></a><span class="nroffip">curl_formfree()</span>
-<p class="level1">free a list built with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>
-<p class="level0"><a name="curlslistappend"></a><span class="nroffip">curl_slist_append()</span>
-<p class="level1">builds a linked list
-<p class="level0"><a name="curlslistfreeall"></a><span class="nroffip">curl_slist_free_all()</span>
-<p class="level1">frees a whole curl_slist
-<p class="level0">
-<p class="level0"><a name="LINKING"></a><h2 class="nroffsh">LINKING WITH LIBCURL</h2>
-<p class="level0">On unix-like machines, there's a tool named curl-config that gets installed with the rest of the curl stuff when 'make install' is performed.
-<p class="level0">curl-config is added to make it easier for applications to link with libcurl and developers to learn about libcurl and how to use it.
-<p class="level0">Run 'curl-config --libs' to get the (additional) linker options you need to link with the particular version of libcurl you've installed. See the <span Class="emphasis">curl-config(1)</span> man page for further details.
-<p class="level0">Unix-like operating system that ship libcurl as part of their distributions often don't provide the curl-config tool, but simply install the library and headers in the common path for this purpose.
-<p class="level0"><a name="LIBCURL"></a><h2 class="nroffsh">LIBCURL SYMBOL NAMES</h2>
-<p class="level0">All public functions in the libcurl interface are prefixed with 'curl_' (with a lowercase c). You can find other functions in the library source code, but other prefixes indicate that the functions are private and may change without further notice in the next release.
-<p class="level0">Only use documented functions and functionality! <a name="PORTABILITY"></a><h2 class="nroffsh">PORTABILITY</h2>
-<p class="level0">libcurl works <span Class="bold">exactly</span> the same, on any of the platforms it compiles and builds on. <a name="THREADS"></a><h2 class="nroffsh">THREADS</h2>
-<p class="level0">Never ever call curl-functions simultaneously using the same handle from several threads. libcurl is thread-safe and can be used in any number of threads, but you must use separate curl handles if you want to use libcurl in more than one thread simultaneously.
-<p class="level0">The global environment functions are not thread-safe. See GLOBAL CONSTANTS below for details.
-<p class="level0"><a name="PERSISTENT"></a><h2 class="nroffsh">PERSISTENT CONNECTIONS</h2>
-<p class="level0">Persistent connections means that libcurl can re-use the same connection for several transfers, if the conditions are right.
-<p class="level0">libcurl will <span Class="bold">always</span> attempt to use persistent connections. Whenever you use <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> or <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>, libcurl will attempt to use an existing connection to do the transfer, and if none exists it'll open a new one that will be subject for re-use on a possible following call to <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> or <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>.
-<p class="level0">To allow libcurl to take full advantage of persistent connections, you should do as many of your file transfers as possible using the same curl handle. When you call <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>, all the possibly open connections held by libcurl will be closed and forgotten.
-<p class="level0">Note that the options set with <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> will be used on every repeated <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> call.
-<p class="level0"><a name="GLOBAL"></a><h2 class="nroffsh">GLOBAL CONSTANTS</h2>
-<p class="level0">There are a variety of constants that libcurl uses, mainly through its internal use of other libraries, which are too complicated for the library loader to set up. Therefore, a program must call a library function after the program is loaded and running to finish setting up 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.
-<p class="level0"><span Class="emphasis">curl_global_init()</span> 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 <span Class="emphasis">curl_global_cleanup()</span> releases them.
-<p class="level0">The basic rule for constructing a program that uses libcurl is this: Call <span Class="emphasis">curl_global_init()</span>, with a <span Class="emphasis">CURL_GLOBAL_ALL</span> argument, immediately after the program starts, while it is still only one thread and before it uses libcurl at all. Call <span Class="emphasis">curl_global_cleanup()</span> immediately before the program exits, when the program is again only one thread and after its last use of libcurl.
-<p class="level0">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.
-<p class="level0">It isn't actually required that the functions be called at the beginning and end of the program -- that's just usually the easiest way to do it. It <span Class="emphasis">is</span> required that the functions be called when no other thread in the program is running.
-<p class="level0">These global constant functions are <span Class="emphasis">not thread safe</span>, so you must not call them when any other thread in the program is running. It isn't good enough that no other thread is using libcurl at the time, because these functions internally call similar functions of other libraries, and those functions are similarly thread-unsafe. You can't generally know what these libraries are, or whether other threads are using them.
-<p class="level0">The global constant situation merits special consideration when the code you are writing to use libcurl is not the main program, but rather a modular piece of a program, e.g. another library. As a module, 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.
-<p class="level0">A module like this must have global constant functions of its own, just like <span Class="emphasis">curl_global_init()</span> and <span Class="emphasis">curl_global_cleanup()</span>. 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 <span Class="emphasis">curl_global_init()</span> and the last <span Class="emphasis">curl_global_cleanup()</span> in a program change anything. (libcurl uses a reference count in static memory).
-<p class="level0">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 <span Class="emphasis">curl_global_init()</span> and the destructor call <span Class="emphasis">curl_global_cleanup()</span> and satisfy libcurl's requirements without your user having to think about it.
-<p class="level0"><span Class="emphasis">curl_global_init()</span> has an argument that tells what particular parts of the global constant environment to set up. In order to successfully use any value except <span Class="emphasis">CURL_GLOBAL_ALL</span> (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.
-<p class="level0">A special part of the global constant environment is the identity of the memory allocator. <span Class="emphasis">curl_global_init()</span> selects the system default memory allocator, but you can use <span Class="emphasis">curl_global_init_mem()</span> to supply one of your own. However, there is no way to use <span Class="emphasis">curl_global_init_mem()</span> in a modular program -- all modules in the program that might use libcurl would have to agree on one allocator.
-<p class="level0">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: <span Class="emphasis">curl_easy_init()</span> 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.
-<p class="level0">This failsafe feature exists mainly for backward compatibility because there was a time when the global functions didn't exist. Because it is sufficient only in the simplest of programs, it is not recommended for any program to rely on it. <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl.m4 b/docs/libcurl/libcurl.m4
index 952b79f4..2cf3edd1 100644
--- a/docs/libcurl/libcurl.m4
+++ b/docs/libcurl/libcurl.m4
@@ -1,3 +1,24 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2006, David Shaw <dshaw@jabberwocky.com>
+#
+# 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])
# ----------------------------------------------------------
@@ -146,18 +167,19 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
_libcurl_save_libs=$LIBS
LIBS="$LIBCURL $LIBS"
- AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
/* Try and use a few common options to force a failure if we are
missing symbols or can't link. */
int x;
curl_easy_setopt(NULL,CURLOPT_URL,NULL);
x=CURL_ERROR_SIZE;
x=CURLOPT_WRITEFUNCTION;
-x=CURLOPT_FILE;
+x=CURLOPT_WRITEDATA;
x=CURLOPT_ERRORBUFFER;
x=CURLOPT_STDERR;
x=CURLOPT_VERBOSE;
-]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
+if (x) ;
+]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
CPPFLAGS=$_libcurl_save_cppflags
LIBS=$_libcurl_save_libs
diff --git a/docs/libcurl/libcurl.pdf b/docs/libcurl/libcurl.pdf
deleted file mode 100644
index 6974679a..00000000
--- a/docs/libcurl/libcurl.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/mksymbolsmanpage.pl b/docs/libcurl/mksymbolsmanpage.pl
new file mode 100644
index 00000000..1bca4d07
--- /dev/null
+++ b/docs/libcurl/mksymbolsmanpage.pl
@@ -0,0 +1,93 @@
+#!/usr/bin/perl
+# ***************************************************************************
+# * _ _ ____ _
+# * Project ___| | | | _ \| |
+# * / __| | | | |_) | |
+# * | (__| |_| | _ <| |___
+# * \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+# *
+# ***************************************************************************
+
+my $version="7.41.0";
+
+use POSIX qw(strftime);
+my $date = strftime "%b %e, %Y", localtime;
+my $year = strftime "%Y", localtime;
+
+print <<HEADER
+.\\" **************************************************************************
+.\\" * _ _ ____ _
+.\\" * Project ___| | | | _ \\| |
+.\\" * / __| | | | |_) | |
+.\\" * | (__| |_| | _ <| |___
+.\\" * \\___|\\___/|_| \\_\\_____|
+.\\" *
+.\\" * Copyright (C) 1998 - $year, Daniel Stenberg, <daniel\@haxx.se>, 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 libcurl-symbols 3 "$date" "libcurl $version" "libcurl symbols"
+.SH NAME
+libcurl-symbols \\- libcurl symbol version information
+.SH "libcurl symbols"
+This man page details version information for public symbols provided in the
+libcurl header files. This lists the first version in which the symbol was
+introduced and for some symbols two additional information pieces:
+
+The first version in which the symbol is marked "deprecated" - meaning that
+since that version no new code should be written to use the symbol as it is
+marked for getting removed in a future.
+
+The last version that featured the specific symbol. Using the symbol in source
+code will make it no longer compile error-free after that specified version.
+
+This man page is automatically generated from the symbols-in-versions file.
+HEADER
+ ;
+
+while(<STDIN>) {
+ if($_ =~ /^(CURL[A-Z0-9_.]*) *(.*)/) {
+ my ($symbol, $rest)=($1,$2);
+ my ($intro, $dep, $rem);
+ if($rest =~ s/^([0-9.]*) *//) {
+ $intro = $1;
+ }
+ if($rest =~ s/^([0-9.]*) *//) {
+ $dep = $1;
+ }
+ if($rest =~ s/^([0-9.]*) *//) {
+ $rem = $1;
+ }
+ print ".IP $symbol\nIntroduced in $intro\n";
+ if($dep) {
+ print "Deprecated since $dep\n";
+ }
+ if($rem) {
+ print "Last used in $dep\n";
+ }
+ }
+
+}
diff --git a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
new file mode 100644
index 00000000..66ceab82
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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
new file mode 100644
index 00000000..203b6acc
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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
new file mode 100644
index 00000000..759ce086
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
@@ -0,0 +1,62 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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
new file mode 100644
index 00000000..7522d437
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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 (a host being the
+same as a host name + port number pair). 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.
+
+This set limit is also used for proxy connections, and then the proxy is
+considered to be the host for which this limit counts.
+.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
new file mode 100644
index 00000000..c2adb457
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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
new file mode 100644
index 00000000..2783a7d8
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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
new file mode 100644
index 00000000..c795c48e
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_PIPELINING.3
@@ -0,0 +1,68 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, long bits);
+.SH DESCRIPTION
+Set the \fBbits\fP parameter to 1 to make libcurl use HTTP pipelining for
+HTTP/1.1 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.
+
+Starting in 7.43.0, the \fBbits\fP parameter's bit 1 also has a meaning and
+libcurl is now offering symbol names for the bits:
+.IP CURLPIPE_NOTHING (0)
+Default, which means doing no attempts at pipelining or multiplexing.
+.IP CURLPIPE_HTTP1 (1)
+If this bit is set, libcurl will try to pipeline HTTP/1.1 requests on
+connections that are already established and in use to hosts.
+.IP CURLPIPE_MULTIPLEX (2)
+If this bit is set, libcurl will try to multiplex the new transfer over an
+existing connection if possible. This requires HTTP/2.
+.SH DEFAULT
+0 (off)
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.0. Multiplex support bit added in 7.43.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
new file mode 100644
index 00000000..e3ea4b1a
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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_PIPELINING_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
new file mode 100644
index 00000000..cf6e6e7b
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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_PIPELINING_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
new file mode 100644
index 00000000..bf7e6a75
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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
new file mode 100644
index 00000000..d64fe112
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
@@ -0,0 +1,62 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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
new file mode 100644
index 00000000..41627da1
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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
new file mode 100644
index 00000000..f509b453
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
@@ -0,0 +1,101 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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.
+
+Certain features, such as timeouts and retries, require you to call libcurl
+even when there is no activity on the file descriptors.
+
+Your callback function \fBtimer_callback\fP should install a non-repeating
+timer with an interval of \fBtimeout_ms\fP. Each time that timer fires, call
+either \fIcurl_multi_socket_action(3)\fP or \fIcurl_multi_perform(3)\fP,
+depending on which interface you use.
+
+A \fBtimeout_ms\fP value of -1 means you should delete your timer.
+
+A \fBtimeout_ms\fP value of 0 means you should call
+\fIcurl_multi_socket_action(3)\fP or \fIcurl_multi_perform(3)\fP (once) as soon
+as possible.
+
+\fBtimer_callback\fP will only be called when the \fBtimeout_ms\fP 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
+.nf
+static gboolean timeout_cb(gpointer user_data) {
+ if (user_data) {
+ g_free(user_data);
+ curl_multi_setopt(curl_handle, CURLMOPT_TIMERDATA, NULL);
+ }
+ int running;
+ curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0, &running);
+ return G_SOURCE_REMOVE;
+}
+
+static int timerfunc(CURLM *multi, long timeout_ms, void *userp) {
+ guint *id = userp;
+
+ if (id)
+ g_source_remove(*id);
+
+ // -1 means we should just delete our timer.
+ if (timeout_ms == -1) {
+ g_free(id);
+ id = NULL;
+ } else {
+ if (!id)
+ id = g_new(guint, 1);
+ *id = g_timeout_add(timeout_ms, timeout_cb, id);
+ }
+ curl_multi_setopt(multi, CURLMOPT_TIMERDATA, id);
+ return 0;
+}
+
+curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, timerfunc);
+.fi
+.SH AVAILABILITY
+Added in 7.16.0
+.SH RETURN VALUE
+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_ACCEPTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3
new file mode 100644
index 00000000..a51c86a8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_ACCEPTTIMEOUT_MS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ACCEPTTIMEOUT_MS \- timeout waiting for FTP server to connect back
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);
+.SH DESCRIPTION
+Pass a long telling libcurl the maximum number of milliseconds to wait for a
+server to connect back to libcurl when an active FTP connection is used.
+.SH DEFAULT
+If no timeout is set, the internal default of 60000 (one minute) will be used.
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.24.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3
new file mode 100644
index 00000000..376799a2
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_ACCEPT_ENCODING 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ACCEPT_ENCODING \- enables automatic decompression of HTTP downloads
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPT_ENCODING, char *enc);
+.SH DESCRIPTION
+Pass a char * argument specifying what encoding you'd like.
+
+Sets the contents of the Accept-Encoding: header sent in a HTTP request, and
+enables decoding of a response when a Content-Encoding: header is received.
+Three encodings are supported: \fIidentity\fP, which does nothing,
+\fIdeflate\fP which requests the server to compress its response using the
+zlib algorithm, and \fIgzip\fP which requests the gzip algorithm.
+
+If a zero-length string is set like "", then an Accept-Encoding: header
+containing all built-in supported encodings is sent.
+
+You can also opt to just include the Accept-Encoding: header in your request
+with \fICURLOPT_HTTPHEADER(3)\fP but then there will be no automatic
+decompressing when receiving data.
+
+This is a request, not an order; the server may or may not do it. This option
+must be set (to any non-NULL value) or else any unsolicited encoding done by
+the server is ignored. See the special file lib/README.encoding for further
+details.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was called CURLOPT_ENCODING before 7.21.6
+.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_TRANSFER_ENCODING "(3), " CURLOPT_HTTPHEADER "(3), "
+.BR CURLOPT_HTTP_CONTENT_DECODING "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3
new file mode 100644
index 00000000..510e3b37
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_ADDRESS_SCOPE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ADDRESS_SCOPE \- set scope for local IPv6 addresses
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ADDRESS_SCOPE, long scope);
+.SH DESCRIPTION
+Pass a long specifying the scope_id value to use when connecting to IPv6
+link-local or site-local addresses.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All, when using IPv6
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_APPEND.3 b/docs/libcurl/opts/CURLOPT_APPEND.3
new file mode 100644
index 00000000..03522966
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_APPEND.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_APPEND 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_APPEND \- enable appending to the remote file
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append);
+.SH DESCRIPTION
+A parameter set to 1 tells the library to append to the remote file instead of
+overwrite it. This is only useful when uploading to an FTP site.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was known as CURLOPT_FTPAPPEND 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"
+.BR CURLOPT_DIRLISTONLY "(3), " CURLOPT_RESUME_FROM "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3
new file mode 100644
index 00000000..f8d5668b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_AUTOREFERER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_AUTOREFERER \- automatically update the referer header
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AUTOREFERER, long autorefer);
+.SH DESCRIPTION
+Pass a parameter set to 1 to enable this. When enabled, libcurl will
+automatically set the Referer: header field in HTTP requests where it follows
+a Location: redirect.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+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_REFERER "(3), " CURLOPT_FOLLOWLOCATION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3
new file mode 100644
index 00000000..9e31ae92
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_BUFFERSIZE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_BUFFERSIZE \- set preferred receive buffer size
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_BUFFERSIZE, long size);
+.SH DESCRIPTION
+Pass a long specifying your preferred \fIsize\fP (in bytes) for the receive
+buffer in libcurl. The main point of this would be that the write callback
+gets called more often and with smaller chunks. This is just treated as a
+request, not an order. You cannot be guaranteed to actually get the given
+size.
+
+This size is by default set as big as possible (\fICURL_MAX_WRITE_SIZE\fP), so
+it only makes sense to use this option if you want it smaller.
+.SH DEFAULT
+CURL_MAX_WRITE_SIZE
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAX_RECV_SPEED "(3), " CURLOPT_WRITEFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CAINFO.3 b/docs/libcurl/opts/CURLOPT_CAINFO.3
new file mode 100644
index 00000000..85c9ba30
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CAINFO.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CAINFO 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CAINFO \- path to Certificate Authority (CA) bundle
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAINFO, char *path);
+.SH DESCRIPTION
+Pass a char * to a zero terminated string naming a file holding one or more
+certificates to verify the peer with.
+
+If \fICURLOPT_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the
+server's certificate, \fICURLOPT_CAINFO(3)\fP need not even indicate an
+accessible file.
+
+This option is by default set to the system path where libcurl's cacert bundle
+is assumed to be stored, as established at build time.
+
+If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
+(libnsspem.so) needs to be available for this option to work properly.
+.SH DEFAULT
+Built-in system specific
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+For SSL engines that don't support certificate files the CURLOPT_CAINFO option
+is ignored. Refer to http://curl.haxx.se/docs/ssl-compared.html
+.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_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
new file mode 100644
index 00000000..6695f9f3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CAPATH.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CAPATH 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CAPATH \- specify directory holding CA certificates
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAPATH, char *capath);
+.SH DESCRIPTION
+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.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option is supported by the OpenSSL, GnuTLS and PolarSSL backends. The NSS
+backend provides the option only for backward compatibility.
+.SH RETURN VALUE
+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
new file mode 100644
index 00000000..a508b867
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CERTINFO.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_CERTINFO 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CERTINFO \- request SSL certificate information
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+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 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 \fICURLINFO_CERTINFO\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All TLS-based
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option is supported by the OpenSSL, GnuTLS, NSS and GSKit backends.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CAINFO "(3), " CURLOPT_SSL_VERIFYPEER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3
new file mode 100644
index 00000000..4dd79077
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3
@@ -0,0 +1,69 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CHUNK_BGN_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CHUNK_BGN_FUNCTION \- callback before a transfer with FTP wildcardmatch
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+long chunk_bgn_callback(const void *transfer_info, void *ptr,
+ int remains);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_BGN_FUNCTION,
+ chunk_bgn_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+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.
+
+This callback makes sense only when using the \fICURLOPT_WILDCARDMATCH(3)\fP
+option for now.
+
+The target of transfer_info parameter is a "feature depended" structure. For
+the FTP wildcard download, the target is curl_fileinfo structure (see
+\fIcurl/curl.h\fP). The parameter \fIptr\fP is a pointer given by
+\fICURLOPT_CHUNK_DATA(3)\fP. The parameter remains contains number of chunks
+remaining per the transfer. If the feature is not available, the parameter has
+zero value.
+
+Return \fICURL_CHUNK_BGN_FUNC_OK\fP if everything is fine,
+\fICURL_CHUNK_BGN_FUNC_SKIP\fP if you want to skip the concrete chunk or
+\fICURL_CHUNK_BGN_FUNC_FAIL\fP to tell libcurl to stop if some error occurred.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This was added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CHUNK_END_FUNCTION "(3), " CURLOPT_WILDCARDMATCH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3
new file mode 100644
index 00000000..4d0ff3da
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CHUNK_DATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CHUNK_DATA \- custom pointer to the FTP chunk callbacks
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_DATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the ptr
+argument to the \fICURL_CHUNK_BGN_FUNCTION(3)\fP and
+\fICURL_CHUNK_END_FUNCTION(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CHUNK_BGN_FUNCTION "(3), " CURLOPT_WILDCARDMATCH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3
new file mode 100644
index 00000000..64f829ce
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CHUNK_END_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CHUNK_END_FUNCTION \- callback after a transfer with FTP wildcardmatch
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+long chunk_end_callback(void *ptr);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_END_FUNCTION,
+ chunk_end_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This function gets called by libcurl as soon as a part of the stream has been
+transferred (or skipped).
+
+Return \fICURL_CHUNK_END_FUNC_OK\fP if everything is fine or
+\fBCURL_CHUNK_END_FUNC_FAIL\fP to tell the lib to stop if some error occurred.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_WILDCARDMATCH "(3), " CURLOPT_CHUNK_BGN_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3
new file mode 100644
index 00000000..b8af3531
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CLOSESOCKETDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CLOSESOCKETDATA \- pointer passed to the socket close callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CLOSESOCKETDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the closesocket callback set with
+\fICURLOPT_CLOSESOCKETFUNCTION(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All except file:
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.7
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CLOSESOCKETFUNCTION "(3), " CURLOPT_OPENSOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3
new file mode 100644
index 00000000..2594b16d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CLOSESOCKETFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CLOSESOCKETFUNCTION \- callback to socket close replacement function
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+int closesocket_callback(void *clientp, curl_socket_t item);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CLOSESOCKETFUNCTION, closesocket_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl instead of the \fIclose(3)\fP or
+\fIclosesocket(3)\fP call when sockets are closed (not for any other file
+descriptors). This is pretty much the reverse to the
+\fICURLOPT_OPENSOCKETFUNCTION(3)\fP option. Return 0 to signal success and 1
+if there was an error.
+
+The \fIclientp\fP pointer is set with
+\fICURLOPT_CLOSESOCKETDATA(3)\fP. \fIitem\fP is the socket libcurl wants to be
+closed.
+.SH DEFAULT
+By default libcurl uses the standard socket close function.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.7
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CLOSESOCKETDATA "(3), " CURLOPT_OPENSOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3
new file mode 100644
index 00000000..7f28e635
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_CONNECTTIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONNECTTIMEOUT \- timeout for the connect phase
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT, long timeout);
+.SH DESCRIPTION
+Pass a long. It should contain the maximum time in seconds that you allow the
+connection phase to the server to take. This only limits the connection
+phase, it has no impact once it has connected. Set to zero to switch to the
+default built-in connection timeout - 300 seconds. See also the
+\fICURLOPT_TIMEOUT(3)\fP option.
+
+In unix-like systems, this might cause signals to be used unless
+\fICURLOPT_NOSIGNAL(3)\fP is set.
+.SH DEFAULT
+300
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* complete connection within 10 seconds */
+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3
new file mode 100644
index 00000000..d81118e5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_CONNECTTIMEOUT_MS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONNECTTIMEOUT_MS \- timeout for the connect phase
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT_MS, long timeout);
+.SH DESCRIPTION
+Pass a long. It should contain the maximum time in milliseconds that you allow
+the connection phase to the server to take. This only limits the connection
+phase, it has no impact once it has connected. Set to zero to switch to the
+default built-in connection timeout - 300 seconds. See also the
+\fICURLOPT_TIMEOUT_MS(3)\fP option.
+
+In unix-like systems, this might cause signals to be used unless
+\fICURLOPT_NOSIGNAL(3)\fP is set.
+.SH DEFAULT
+300000
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* complete connection within 10000 milliseconds */
+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10000L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3
new file mode 100644
index 00000000..afb3cfdc
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CONNECT_ONLY 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONNECT_ONLY \- stop when connected to target server
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+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.
+
+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
+\fIcurl_easy_getinfo(3)\fP as the library can set up the connection and then
+the application can obtain the most recently used socket for special data
+transfers.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP, SMTP, POP3 and IMAP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_HTTPPROXYTUNNEL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3
new file mode 100644
index 00000000..ebc4d77e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3
@@ -0,0 +1,82 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CONV_FROM_NETWORK_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONV_FROM_NETWORK_FUNCTION \- convert data from network to host encoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode conv_callback(char *ptr, size_t length);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONV_FROM_NETWORK_FUNCTION,
+ conv_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+Applies to non-ASCII platforms. \fIcurl_version_info(3)\fP will return the
+CURL_VERSION_CONV feature bit set if this option is provided.
+
+The data to be converted is in a buffer pointed to by the \fIptr\fP parameter.
+The amount of data to convert is indicated by the \fIlength\fP parameter. The
+converted data overlays the input data in the buffer pointed to by the ptr
+parameter. \fICURLE_OK\fP must be returned upon successful conversion. A
+CURLcode return value defined by curl.h, such as \fICURLE_CONV_FAILED\fP,
+should be returned if an error was encountered.
+
+\fBCURLOPT_CONV_FROM_NETWORK_FUNCTION\fP converts to host encoding from the
+network encoding. It is used when commands or ASCII data are received over
+the network.
+
+If you set a callback pointer to NULL, or don't set it at all, the built-in
+libcurl iconv functions will be used. If HAVE_ICONV was not defined when
+libcurl was built, and no callback has been established, conversion will
+return the CURLE_CONV_REQD error code.
+
+If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
+For example:
+
+ \&#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
+
+The iconv code in libcurl will default the network and UTF8 codeset names as
+follows:
+
+ \&#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+
+ \&#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
+
+You will need to override these definitions if they are different on your
+system.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP, SMTP, IMAP, POP3
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Available only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CONV_TO_NETWORK_FUNCTION "(3), " CURLOPT_CONV_FROM_UTF8_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3
new file mode 100644
index 00000000..682e1c5c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3
@@ -0,0 +1,81 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CONV_FROM_UTF8_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONV_FROM_UTF8_FUNCTION \- convert data from UTF8 to host encoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode conv_callback(char *ptr, size_t length);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONV_FROM_UTF8_FUNCTION,
+ conv_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+Applies to non-ASCII platforms. \fIcurl_version_info(3)\fP will return the
+CURL_VERSION_CONV feature bit set if this option is provided.
+
+The data to be converted is in a buffer pointed to by the \fIptr\fP parameter.
+The amount of data to convert is indicated by the \fIlength\fP parameter. The
+converted data overlays the input data in the buffer pointed to by the ptr
+parameter. \fICURLE_OK\fP must be returned upon successful conversion. A
+CURLcode return value defined by curl.h, such as \fICURLE_CONV_FAILED\fP,
+should be returned if an error was encountered.
+
+\fBCURLOPT_CONV_FROM_UTF8_FUNCTION\fP converts to host encoding from UTF8
+encoding. It is required only for SSL processing.
+
+If you set a callback pointer to NULL, or don't set it at all, the built-in
+libcurl iconv functions will be used. If HAVE_ICONV was not defined when
+libcurl was built, and no callback has been established, conversion will
+return the CURLE_CONV_REQD error code.
+
+If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
+For example:
+
+ \&#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
+
+The iconv code in libcurl will default the network and UTF8 codeset names as
+follows:
+
+ \&#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+
+ \&#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
+
+You will need to override these definitions if they are different on your
+system.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+TLS-based protocols.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Available only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CONV_TO_NETWORK_FUNCTION "(3), " CURLOPT_CONV_FROM_NETWORK_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3
new file mode 100644
index 00000000..e8817f86
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3
@@ -0,0 +1,82 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CONV_TO_NETWORK_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONV_TO_NETWORK_FUNCTION \- convert data to network from host encoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode conv_callback(char *ptr, size_t length);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONV_TO_NETWORK_FUNCTION,
+ conv_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+Applies to non-ASCII platforms. \fIcurl_version_info(3)\fP will return the
+CURL_VERSION_CONV feature bit set if this option is provided.
+
+The data to be converted is in a buffer pointed to by the \fIptr\fP parameter.
+The amount of data to convert is indicated by the \fIlength\fP parameter. The
+converted data overlays the input data in the buffer pointed to by the ptr
+parameter. \fICURLE_OK\fP must be returned upon successful conversion. A
+CURLcode return value defined by curl.h, such as \fICURLE_CONV_FAILED\fP,
+should be returned if an error was encountered.
+
+\fBCURLOPT_CONV_TO_NETWORK_FUNCTION\fP converts from host encoding to the
+network encoding. It is used when commands or ASCII data are sent over the
+network.
+
+If you set a callback pointer to NULL, or don't set it at all, the built-in
+libcurl iconv functions will be used. If HAVE_ICONV was not defined when
+libcurl was built, and no callback has been established, conversion will
+return the CURLE_CONV_REQD error code.
+
+If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
+For example:
+
+ \&#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
+
+The iconv code in libcurl will default the network and UTF8 codeset names as
+follows:
+
+ \&#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+
+ \&#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
+
+You will need to override these definitions if they are different on your
+system.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP, SMTP, IMAP, POP3
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Available only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CONV_FROM_NETWORK_FUNCTION "(3), " CURLOPT_CONV_TO_UTF8_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIE.3 b/docs/libcurl/opts/CURLOPT_COOKIE.3
new file mode 100644
index 00000000..a390135f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIE.3
@@ -0,0 +1,80 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_COOKIE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIE \- set contents of HTTP Cookie header
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIE, char *cookie);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used to
+set a cookie in the HTTP request. The format of the string should be
+NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie
+should contain.
+
+If you need to set multiple cookies, set them all using a single option
+concatenated like this: "name1=content1; name2=content2;" etc.
+
+This option sets the cookie header explicitly in the outgoing request(s). If
+multiple requests are done due to authentication, followed redirections or
+similar, they will all get this cookie passed on.
+
+The cookies set by this option are separate from the internal cookie storage
+held by the cookie engine and will not be modified by it. If you enable the
+cookie engine and either you've imported a cookie of the same name (e.g. 'foo')
+or the server has set one, it will have no effect on the cookies you set here.
+A request to the server will send both the 'foo' held by the cookie engine and
+the 'foo' held by this option. To set a cookie that is instead held by the
+cookie engine and can be modified by the server use
+\fICURLOPT_COOKIELIST(3)\fP.
+
+Using this option multiple times will only make the latest string override the
+previous ones.
+
+This option will not enable the cookie engine. Use \fICURLOPT_COOKIEFILE(3)\fP
+or \fICURLOPT_COOKIEJAR(3)\fP to enable parsing and sending cookies
+automatically.
+.SH DEFAULT
+NULL, no cookies
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_setopt(curl, CURLOPT_COOKIE, "tool=curl; fun=yes;");
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+If HTTP is enabled
+.SH RETURN VALUE
+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_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
new file mode 100644
index 00000000..a4c3b02b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_COOKIEFILE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIEFILE \- file name to read cookies from
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIEFILE, char *filename);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It should point to
+the file name of your file holding cookie data to read. The cookie data can be
+in either the old Netscape / Mozilla cookie data format or just regular
+HTTP-style headers dumped to a file.
+
+It also enables the cookie engine, making libcurl parse and send cookies on
+subsequent requests with this handle.
+
+Given an empty or non-existing file or by passing the empty string ("") to
+this option, you can enable the cookie engine without reading any initial
+cookies.
+
+This option only \fBreads\fP cookies. To make libcurl write cookies to file,
+see \fICURLOPT_COOKIEJAR(3)\fP.
+
+If you use this option multiple times, you just add more files to read.
+Subsequent files will add more cookies.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+As long as HTTP is supported
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_COOKIE "(3), " CURLOPT_COOKIEJAR "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3
new file mode 100644
index 00000000..936d4d8a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_COOKIEJAR 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIEJAR \- file name to store cookies to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIEJAR, char *filename);
+.SH DESCRIPTION
+Pass a \fIfilename\fP as char *, zero terminated. This will make libcurl write
+all internally known cookies to the specified file when
+\fIcurl_easy_cleanup(3)\fP is called. If no cookies are known, no file will be
+created. Specify "-" as filename to instead have the cookies written to
+stdout. Using this option also enables cookies for this session, so if you for
+example follow a location it will make matching cookies get sent accordingly.
+
+Note that libcurl doesn't read any cookies from the cookie jar. If you want to
+read cookies from a file, use \fICURLOPT_COOKIEFILE(3)\fP.
+
+If the cookie jar file can't be created or written to (when the
+\fIcurl_easy_cleanup(3)\fP is called), libcurl will not and cannot report an
+error for this. Using \fICURLOPT_VERBOSE(3)\fP or
+\fICURLOPT_DEBUGFUNCTION(3)\fP will get a warning to display, but that is the
+only visible feedback you get about this possibly lethal situation.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+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), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 b/docs/libcurl/opts/CURLOPT_COOKIELIST.3
new file mode 100644
index 00000000..937c79db
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIELIST.3
@@ -0,0 +1,120 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_COOKIELIST 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIELIST \- add to or manipulate cookies held in memory
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIELIST,
+ char *cookie);
+.SH DESCRIPTION
+Pass a char * to a \fIcookie\fP string.
+
+Such a cookie can be either a single line in Netscape / Mozilla format or just
+regular HTTP-style header (Set-Cookie: ...) format. This will also enable the
+cookie engine. This adds that single cookie to the internal cookie store.
+
+If you use the Set-Cookie format and don't specify a domain then the cookie
+is sent for any domain and will not be modified. If a server sets a cookie of
+the same name (or maybe you've imported one) then both will be sent on a future
+transfer to that server, likely not what you intended. Either set a domain in
+Set-Cookie (doing that will include sub domains) or use the Netscape format as
+shown in EXAMPLE.
+
+Starting in 7.43.0 the aforementioned any-domain cookies will not appear in the
+lists exported by \fICURLINFO_COOKIELIST(3)\fP and \fICURLOPT_COOKIEJAR(3)\fP.
+
+Additionally, there are commands available that perform actions if you pass in
+these exact strings:
+.IP ALL
+erases all cookies held in memory
+
+.IP SESS
+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
+HTTP
+.SH EXAMPLE
+.nf
+/* This example shows an inline import of a cookie in Netscape format.
+You can set the cookie as HttpOnly to prevent XSS attacks by prepending
+#HttpOnly_ to the hostname. That may be useful if the cookie will later
+be imported by a browser.
+*/
+
+#define SEP "\\t" /* Tab separates the fields */
+
+char *my_cookie =
+ "example.com" /* Hostname */
+ SEP "FALSE" /* Include subdomains */
+ SEP "/" /* Path */
+ SEP "FALSE" /* Secure */
+ SEP "0" /* Expiry in epoch time format. 0 == Session */
+ SEP "foo" /* Name */
+ SEP "bar"; /* Value */
+
+/* my_cookie is imported immediately via CURLOPT_COOKIELIST.
+*/
+curl_easy_setopt(curl, CURLOPT_COOKIELIST, my_cookie);
+
+/* The list of cookies in cookies.txt will not be imported until right
+before a transfer is performed. Cookies in the list that have the same
+hostname, path and name as in my_cookie are skipped. That is because
+libcurl has already imported my_cookie and it's considered a "live"
+cookie. A live cookie won't be replaced by one read from a file.
+*/
+curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "cookies.txt"); /* import */
+
+/* Cookies are exported after curl_easy_cleanup is called. The server
+may have added, deleted or modified cookies by then. The cookies that
+were skipped on import are not exported.
+*/
+curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookies.txt"); /* export */
+
+res = curl_easy_perform(curl); /* cookies imported from cookies.txt */
+
+curl_easy_cleanup(curl); /* cookies exported to cookies.txt */
+.fi
+.SH AVAILABILITY
+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), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3
new file mode 100644
index 00000000..0d560763
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_COOKIESESSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIESESSION \- start a new cookie session
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIESESSION, long init);
+.SH DESCRIPTION
+Pass a long set to 1 to mark this as a new cookie "session". It will force
+libcurl to ignore all cookies it is about to load that are "session cookies"
+from the previous session. By default, libcurl always stores and loads all
+cookies, independent if they are session cookies or not. Session cookies are
+cookies without expiry date and they are meant to be alive and existing for
+this "session" only.
+
+A "session" is usually defined in browser land for as long as you have your
+browser up, more or less.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3
new file mode 100644
index 00000000..d35aebd6
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3
@@ -0,0 +1,70 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_COPYPOSTFIELDS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COPYPOSTFIELDS \- have libcurl copy data to POST
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+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.
+
+Because data are copied, care must be taken when using this option in
+conjunction with \fICURLOPT_POSTFIELDSIZE(3)\fP or
+\fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP: If the size has not been set prior to
+\fICURLOPT_COPYPOSTFIELDS(3)\fP, the data is assumed to be a zero terminated
+string; else the stored size informs the library about the byte count to
+copy. In any case, the size must not be changed after
+\fICURLOPT_COPYPOSTFIELDS(3)\fP, unless another \fICURLOPT_POSTFIELDS(3)\fP or
+\fICURLOPT_COPYPOSTFIELDS(3)\fP option is issued.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP(S)
+.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
+.SH AVAILABILITY
+Added in 7.17.1
+.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_POSTFIELDS "(3), " CURLOPT_POSTFIELDSIZE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CRLF.3 b/docs/libcurl/opts/CURLOPT_CRLF.3
new file mode 100644
index 00000000..32d8b79c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CRLF.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CRLF 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CRLF \- enable/disable CRLF conversion
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLF, long conv);
+.SH DESCRIPTION
+Pass a long. If the value is set to 1 (one), libcurl converts Unix newlines to
+CRLF newlines on transfers. Disable this option again by setting the value to
+0 (zero).
+
+This is a legacy option of questionable use.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+SMTP since 7.40.0, other protocols since they were introduced
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_CONV_FROM_NETWORK_FUNCTION "(3), " CURLOPT_CONV_TO_NETWORK_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CRLFILE.3 b/docs/libcurl/opts/CURLOPT_CRLFILE.3
new file mode 100644
index 00000000..adc0e99d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CRLFILE.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CRLFILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CRLFILE \- specify a Certificate Revocation List file
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLFILE, char *file);
+.SH DESCRIPTION
+Pass a char * to a zero terminated string naming a \fIfile\fP with the
+concatenation of CRL (in PEM format) to use in the certificate validation that
+occurs during the SSL exchange.
+
+When curl is built to use NSS or GnuTLS, there is no way to influence the use
+of CRL passed to help in the verification process. When libcurl is built with
+OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both
+set, requiring CRL check against all the elements of the certificate chain if
+a CRL file is passed.
+
+This option makes sense only when used in combination with the
+\fICURLOPT_SSL_VERIFYPEER(3)\fP option.
+
+A specific error code (\fICURLE_SSL_CRL_BADFILE\fP) is defined with the
+option. It is returned when the SSL exchange fails because the CRL file cannot
+be loaded. A failure in certificate verification due to a revocation
+information found in the CRL does not trigger this specific error.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.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_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3
new file mode 100644
index 00000000..fd33118a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3
@@ -0,0 +1,95 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CUSTOMREQUEST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CUSTOMREQUEST \- custom string for request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CUSTOMREQUEST, char *request);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter.
+
+When you change the request method by setting \fBCURLOPT_CUSTOMREQUEST(3)\fP
+to something, you don't actually change how libcurl behaves or acts in regards
+to the particular request method, it will only change the actual string sent
+in the request.
+
+Restore to the internal default by setting this to NULL.
+
+This option can be used to specify the request:
+.IP HTTP
+Instead of GET or HEAD when performing HTTP based requests. This is
+particularly useful, for example, for performing a HTTP DELETE request.
+
+For example:
+
+When you tell libcurl to do a HEAD request, but then specify a GET though a
+custom request libcurl will still act as if it sent a HEAD. To switch to a
+proper HEAD use \fICURLOPT_NOBODY(3)\fP, to switch to a proper POST use
+\fICURLOPT_POST(3)\fP or \fICURLOPT_POSTFIELDS(3)\fP and to switch to a proper
+GET use \fICURLOPT_HTTPGET(3)\fP.
+
+Many people have wrongly used this option to replace the entire request with
+their own, including multiple headers and POST contents. While that might work
+in many cases, it will cause libcurl to send invalid requests and it could
+possibly confuse the remote server badly. Use \fICURLOPT_POST(3)\fP and
+\fICURLOPT_POSTFIELDS(3)\fP to set POST data. Use \fICURLOPT_HTTPHEADER(3)\fP
+to replace or extend the set of headers sent by libcurl. Use
+\fICURLOPT_HTTP_VERSION(3)\fP to change HTTP version.
+
+.IP FTP
+Instead of LIST and NLST when performing FTP directory listings.
+.IP IMAP
+Instead of LIST when issuing IMAP based requests.
+.IP POP3
+Instead of LIST and RETR when issuing POP3 based requests.
+
+For example:
+
+When you tell libcurl to use a custom request it will behave like a LIST or
+RETR command was sent where it expects data to be returned by the server. As
+such \fICURLOPT_NOBODY(3)\fP should be used when specifying commands such as
+DELE and NOOP for example.
+.IP SMTP
+Instead of a HELP or VRFY when issuing SMTP based requests.
+
+For example:
+
+Normally a multiline response is returned which can be used, in conjunction
+with \fICURLOPT_MAIL_RCPT(3)\fP, to specify an EXPN request. If the
+\fICURLOPT_NOBODY(3)\fP option is specified then the request can be used to
+issue NOOP and RSET commands.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP, FTP, IMAP, POP3 and SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+IMAP is supported since 7.30.0, POP3 since 7.26.0 and SMTP since 7.34.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_HTTPHEADER "(3), " CURLOPT_NOBODY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3
new file mode 100644
index 00000000..ebdb0c55
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_DEBUGDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DEBUGDATA \- custom pointer for debug callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DEBUGDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP to whatever you want passed in to your
+\fICURLOPT_DEBUGFUNCTION(3)\fP in the last void * argument. This pointer is
+not used by libcurl, it is only passed to the callback.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/debug.html
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3
new file mode 100644
index 00000000..6c4721b7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3
@@ -0,0 +1,184 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_DEBUGFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DEBUGFUNCTION \- debug callback
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLINFO_TEXT = 0,
+ CURLINFO_HEADER_IN, /* 1 */
+ CURLINFO_HEADER_OUT, /* 2 */
+ CURLINFO_DATA_IN, /* 3 */
+ CURLINFO_DATA_OUT, /* 4 */
+ CURLINFO_SSL_DATA_IN, /* 5 */
+ CURLINFO_SSL_DATA_OUT, /* 6 */
+ CURLINFO_END
+} curl_infotype;
+
+int debug_callback(CURL *handle,
+ curl_infotype type,
+ char *data,
+ size_t size,
+ void *userptr);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DEBUGFUNCTION,
+ debug_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+\fICURLOPT_DEBUGFUNCTION(3)\fP replaces the standard debug function used when
+\fICURLOPT_VERBOSE(3)\fP is in effect. This callback receives debug
+information, as specified in the \fItype\fP argument. This function must
+return 0. The \fIdata\fP pointed to by the char * passed to this function WILL
+NOT be zero terminated, but will be exactly of the \fIsize\fP as told by the
+\fIsize\fP argument.
+
+The \fIuserptr\fP argument is the pointer set with \fICURLOPT_DEBUGDATA(3)\fP.
+
+Available curl_infotype values:
+.IP CURLINFO_TEXT
+The data is informational text.
+.IP CURLINFO_HEADER_IN
+The data is header (or header-like) data received from the peer.
+.IP CURLINFO_HEADER_OUT
+The data is header (or header-like) data sent to the peer.
+.IP CURLINFO_DATA_IN
+The data is protocol data received from the peer.
+.IP CURLINFO_DATA_OUT
+The data is protocol data sent to the peer.
+.IP CURLINFO_SSL_DATA_OUT
+The data is SSL/TLS (binary) data sent to the peer.
+.IP CURLINFO_SSL_DATA_IN
+The data is SSL/TLS (binary) data received from the peer.
+.SH DEFAULT
+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<size; i+= width) {
+ fprintf(stream, "%4.4lx: ", (long)i);
+
+ /* show hex to the left */
+ for(c = 0; c < width; c++) {
+ if(i+c < size)
+ fprintf(stream, "%02x ", ptr[i+c]);
+ else
+ fputs(" ", stream);
+ }
+
+ /* show data on the right */
+ for(c = 0; (c < width) && (i+c < size); c++)
+ fputc(ptr[i+c]>=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
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_DEBUGDATA "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3
new file mode 100644
index 00000000..a81f9076
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3
@@ -0,0 +1,61 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_DIRLISTONLY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DIRLISTONLY \- ask for names only in a directory listing
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+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.
+
+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.
+
+Setting this option to 1 also implies a directory listing even if the URL
+doesn't end with a slash, which otherwise is necessary.
+
+Do NOT use this option if you also use \fICURLOPT_WILDCARDMATCH(3)\fP as it
+will effectively break that feature then.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+FTP, SFTP and POP3
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was known as CURLOPT_FTPLISTONLY up to 7.16.4. POP3 is supported
+since 7.21.5.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CUSTOMREQUEST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3
new file mode 100644
index 00000000..93327806
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_DNS_CACHE_TIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_CACHE_TIMEOUT \- set life-time for DNS cache entries
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_CACHE_TIMEOUT, long age);
+.SH DESCRIPTION
+Pass a long, this sets the timeout in seconds. Name resolves will be kept in
+memory and used for this number of seconds. Set to zero to completely disable
+caching, or set to -1 to make the cached entries remain forever. By default,
+libcurl caches this info for 60 seconds.
+
+The name resolve functions of various libc implementations don't re-read name
+server information unless explicitly told so (for example, by calling
+\fIres_init(3)\fP). This may cause libcurl to keep using the older server even
+if DHCP has updated the server info, and this may look like a DNS cache issue
+to the casual libcurl-app user.
+
+Note that DNS entries have a "TTL" property but libcurl doesn't use that. This
+DNS cache timeout is entirely speculative that a name will resolve to the same
+address for a certain small amount of time into the future.
+.SH DEFAULT
+60
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_USE_GLOBAL_CACHE "(3), " CURLOPT_DNS_SERVERS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3
new file mode 100644
index 00000000..c33d7917
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_DNS_INTERFACE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_INTERFACE \- set interface to speak DNS over
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_INTERFACE, char *ifname);
+.SH DESCRIPTION
+Pass a char * as parameter. Set the name of the network interface that the DNS
+resolver should bind to. This must be an interface name (not an address). Set
+this option to NULL to use the default setting (don't bind to a specific
+interface).
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.33.0. This option also requires that libcurl was built with a
+resolver backend that supports this operation. The c-ares backend is the only
+such one.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
+or CURLE_NOT_BUILT_IN if support was disabled at compile-time.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_SERVERS "(3), " CURLOPT_DNS_LOCAL_IP4 "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3
new file mode 100644
index 00000000..f5db645f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_DNS_LOCAL_IP4 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_LOCAL_IP4 \- IPv4 address to bind DNS resolves to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP4, char *address);
+.SH DESCRIPTION
+Set the local IPv4 \fIaddress\fP that the resolver should bind to. The
+argument should be of type char * and contain a single numerical IPv4 address
+as a string. Set this option to NULL to use the default setting (don't bind
+to a specific IP address).
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one.
+
+Added in 7.33.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
+CURLE_NOT_BUILT_IN if support was disabled at compile-time, or
+CURLE_BAD_FUNCTION_ARGUMENT when given a bad address.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_INTERFACE "(3), " CURLOPT_DNS_LOCAL_IP4 "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3
new file mode 100644
index 00000000..56865bb5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_DNS_LOCAL_IP6 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_LOCAL_IP6 \- IPv6 address to bind DNS resolves to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP6, char *address);
+.SH DESCRIPTION
+Set the local IPv6 \fIaddress\fP that the resolver should bind to. The
+argument should be of type char * and contain a single IPv6 address as a
+string. Set this option to NULL to use the default setting (don't bind to a
+specific IP address).
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one.
+
+Added in 7.33.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
+CURLE_NOT_BUILT_IN if support was disabled at compile-time, or
+CURLE_BAD_FUNCTION_ARGUMENT when given a bad address.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_INTERFACE "(3), " CURLOPT_DNS_LOCAL_IP4 "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3
new file mode 100644
index 00000000..9f517888
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_DNS_SERVERS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_SERVERS \- set preferred DNS servers
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_SERVERS, char *servers);
+.SH DESCRIPTION
+Pass a char * that is the list of DNS servers to be used instead of the system
+default. The format of the dns servers option is:
+
+host[:port][,host[:port]]...
+
+For example:
+
+192.168.1.100,192.168.1.101,3.4.5.6
+.SH DEFAULT
+NULL - use system default
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one.
+
+Added in 7.24.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
+CURLE_NOT_BUILT_IN if support was disabled at compile-time,
+CURLE_BAD_FUNCTION_ARGUMENT when given an invalid server list, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_LOCAL_IP4 "(3), " CURLOPT_DNS_CACHE_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3
new file mode 100644
index 00000000..db53c0b9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_DNS_USE_GLOBAL_CACHE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_USE_GLOBAL_CACHE \- enable/disable global DNS cache
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_USE_GLOBAL_CACHE,
+ long enable);
+.SH DESCRIPTION
+Pass a long. If the \fIenable\fP value is 1, it tells curl to use a global DNS
+cache that will survive between easy handle creations and deletions. This is
+not thread-safe and this will use a global variable.
+
+\fBWARNING:\fP this option is considered obsolete. Stop using it. Switch over
+to using the share interface instead! See \fICURLOPT_SHARE(3)\fP and
+\fIcurl_share_init(3)\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Subject for removal in the future. Do not use!
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SHARE "(3), " CURLOPT_DNS_CACHE_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3
new file mode 100644
index 00000000..2e72ecc7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_EGDSOCKET 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_EGDSOCKET \- set EGD socket path
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EGDSOCKET, char *path);
+.SH DESCRIPTION
+Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
+socket. It will be used to seed the random engine for SSL.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled. Only the OpenSSL and GnuTLS backends will use this.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_RANDOM_FILE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
new file mode 100644
index 00000000..577202cf
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
@@ -0,0 +1,72 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_ERRORBUFFER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ERRORBUFFER \- set error buffer for error messages
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ERRORBUFFER, char *buf);
+.SH DESCRIPTION
+Pass a char * to a buffer that the libcurl may store human readable error
+messages in on failures or problems. This may be more helpful than just the
+return code from \fIcurl_easy_perform(3)\fP and related functions. The buffer
+\fBmust be at least CURL_ERROR_SIZE bytes big\fP.
+
+You must keep the associated buffer available until libcurl no longer needs
+it. Failing to do so will cause very odd behavior or even crashes. libcurl
+will need it until you call \fIcurl_easy_cleanup(3)\fP or you set the same
+option again to use a different pointer.
+
+Consider \fICURLOPT_VERBOSE(3)\fP and \fICURLOPT_DEBUGFUNCTION(3)\fP to better
+debug and trace why errors happen.
+
+If the library does not return an error, the buffer may not have been
+touched. Do not rely on the contents in those cases.
+.SH DEFAULT
+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
+.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_EXPECT_100_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3
new file mode 100644
index 00000000..81f4571d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_EXPECT_100_TIMEOUT_MS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_EXPECT_100_TIMEOUT_MS \- timeout for Expect: 100-continue response
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EXPECT_100_TIMEOUT_MS,
+ long milliseconds);
+.SH DESCRIPTION
+Pass a long to tell libcurl the number of \fImilliseconds\fP to wait for a
+server response with the HTTP status 100 (Continue), 417 (Expectation Failed)
+or similar after sending a HTTP request containing an Expect: 100-continue
+header. If this times out before a response is received, the request body is
+sent anyway.
+.SH DEFAULT
+1000 milliseconds
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.36.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_POST "(3), " CURLOPT_HTTPPOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FAILONERROR.3 b/docs/libcurl/opts/CURLOPT_FAILONERROR.3
new file mode 100644
index 00000000..a8267fd3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FAILONERROR.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FAILONERROR 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FAILONERROR \- request failure on HTTP response >= 400
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FAILONERROR, long fail);
+.SH DESCRIPTION
+A long parameter set to 1 tells the library to fail the request if the HTTP
+code returned is equal to or larger than 400. The default action would be to
+return the page normally, ignoring that code.
+
+This method is not fail-safe and there are occasions where non-successful
+response codes will slip through, especially when authentication is involved
+(response codes 401 and 407).
+
+You might get some amounts of headers transferred before this situation is
+detected, like when a "100-continue" is received as a response to a POST/PUT
+and a 401 or 407 is received immediately afterwards.
+.SH DEFAULT
+0, do not fail on error
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP200ALIASES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FILETIME.3 b/docs/libcurl/opts/CURLOPT_FILETIME.3
new file mode 100644
index 00000000..7c57affe
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FILETIME.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FILETIME 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FILETIME \- get the modification time of the remote resource
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FILETIME, long gettime);
+.SH DESCRIPTION
+Pass a long. If it is 1, libcurl will attempt to get the modification time of
+the remote document in this operation. This requires that the remote server
+sends the time or replies to a time querying command. The
+\fIcurl_easy_getinfo(3)\fP function with the \fICURLINFO_FILETIME\fP argument
+can be used after a transfer to extract the received time (if any).
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP, FTP, SFTP, FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR curl_easy_getinfo "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3
new file mode 100644
index 00000000..a0466fe5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FNMATCH_DATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FNMATCH_DATA \- custom pointer to fnmatch callback
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FNMATCH_DATA,
+ void *pointer);
+.SH DESCRIPTION
+Pass a pointer that will be untouched by libcurl and passed as the ptr
+argument to the \fICURL_FNMATCH_FUNCTION(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FNMATCH_FUNCTION "(3), " CURLOPT_WILDCARDMATCH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3
new file mode 100644
index 00000000..fc119a9c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FNMATCH_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FNMATCH_FUNCTION \- wildcard matching function callback
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+int fnmatch_callback(void *ptr,
+ const char *pattern,
+ const char *string);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FNMATCH_FUNCTION,
+ fnmatch_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback s used for wildcard matching.
+
+Return \fICURL_FNMATCHFUNC_MATCH\fP if pattern matches the string,
+\fICURL_FNMATCHFUNC_NOMATCH\fP if not or \fICURL_FNMATCHFUNC_FAIL\fP if an
+error occurred.
+.SH DEFAULT
+NULL == an internal function for wildcard matching.
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FNMATCH_DATA "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3
new file mode 100644
index 00000000..3a32caef
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3
@@ -0,0 +1,70 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FOLLOWLOCATION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FOLLOWLOCATION, long enable);
+.SH DESCRIPTION
+A parameter set to 1 tells the library to follow any Location: header that the
+server sends as part of a HTTP header in a 3xx response.
+
+This means that libcurl will re-send the same request on the new location and
+follow new Location: headers all the way until no more such headers are
+returned. \fICURLOPT_MAXREDIRS(3)\fP can be used to limit the number of
+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)
+.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
+.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_FORBID_REUSE.3 b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3
new file mode 100644
index 00000000..c588ca53
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FORBID_REUSE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FORBID_REUSE \- make connection get closed at once after use
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FORBID_REUSE, long close);
+.SH DESCRIPTION
+Pass a long. Set \fIclose\fP to 1 to make libcurl explicitly close the
+connection when done with the transfer. Normally, libcurl keeps all
+connections alive when done with one transfer in case a succeeding one follows
+that can re-use them. This option should be used with caution and only if you
+understand what it does as it can seriously impact performance.
+
+Set to 0 to have libcurl keep the connection open for possible later re-use
+(default behavior).
+.SH DEFAULT
+0
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_FRESH_CONNECT "(3), " CURLOPT_MAXCONNECTS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3
new file mode 100644
index 00000000..1caaf61e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FRESH_CONNECT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FRESH_CONNECT \- force a new connection to be used
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FRESH_CONNECT, long fresh);
+.SH DESCRIPTION
+Pass a long. Set to 1 to make the next transfer use a new (fresh) connection
+by force instead of trying to re-use an existing one. This option should be
+used with caution and only if you understand what it does as it may seriously
+impact performance.
+
+Related functionality is \fICURLOPT_FORBID_REUSE(3)\fP which makes sure the
+connection is closed after use so that it won't be re-used.
+
+Set \fIfresh\fP to 0 to have libcurl attempt re-using an existing connection
+(default behavior).
+.SH DEFAULT
+0
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_FORBID_REUSE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTPPORT.3 b/docs/libcurl/opts/CURLOPT_FTPPORT.3
new file mode 100644
index 00000000..fd87bb23
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTPPORT.3
@@ -0,0 +1,72 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTPPORT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTPPORT \- make FTP transfer active
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPPORT, char *spec);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It specifies that the
+FTP transfer will be made actively and the given string will be used to get
+the IP address to use for the FTP PORT instruction.
+
+The PORT instruction tells the remote server to connect to our specified IP
+address. The string may be a plain IP address, a host name, a network
+interface name (under Unix) or just a '-' symbol to let the library use your
+system's default IP address. Default FTP operations are passive, and thus
+won't use PORT.
+
+The address can be followed by a ':' to specify a port, optionally followed by
+a '-' to specify a port range. If the port specified is 0, the operating
+system will pick a free port. If a range is provided and all ports in the
+range are not available, libcurl will report CURLE_FTP_PORT_FAILED for the
+handle. Invalid port/range settings are ignored. IPv6 addresses followed by
+a port or portrange have to be in brackets. IPv6 addresses without port/range
+specifier can be in brackets.
+
+Examples with specified ports:
+
+.nf
+ eth0:0
+ 192.168.1.2:32000-33000
+ curl.se:32123
+ [::1]:1234-4567
+.fi
+
+You disable PORT again and go back to using the passive version by setting
+this option to NULL.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Port range support was added in 7.19.5
+.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_FTP_USE_EPRT "(3), " CURLOPT_FTP_USE_EPSV "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3
new file mode 100644
index 00000000..bfbea9c2
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_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
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPSSLAUTH, long order);
+.SH DESCRIPTION
+Pass a long using one of the values from below, to alter how libcurl issues
+\&"AUTH TLS" or "AUTH SSL" when FTP over SSL is activated. This is only
+interesting if \fICURLOPT_USE_SSL(3)\fP is also set.
+
+Possible \fIorder\fP values:
+.IP CURLFTPAUTH_DEFAULT
+Allow libcurl to decide.
+.IP CURLFTPAUTH_SSL
+Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
+.IP CURLFTPAUTH_TLS
+Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
+.SH DEFAULT
+CURLFTPAUTH_DEFAULT
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.12.2
+.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_FTP_SSL_CCC "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3
new file mode 100644
index 00000000..3c342475
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_ACCOUNT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_ACCOUNT \- set account info for FTP
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ACCOUNT, char *account);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string (or NULL to disable). When an FTP
+server asks for "account data" after user name and password has been provided,
+this data is sent off using the ACCT command.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.13.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_USERNAME "(3), " CURLOPT_PASSWORD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3
new file mode 100644
index 00000000..b51e4dd1
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_ALTERNATIVE_TO_USER 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_ALTERNATIVE_TO_USER \- command to use instead of USER with FTP
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ALTERNATIVE_TO_USER,
+ char *cmd);
+.SH DESCRIPTION
+Pass a char * as parameter, pointing to a string which will be used to
+authenticate if the usual FTP "USER user" and "PASS password" negotiation
+fails. This is currently only known to be required when connecting to
+Tumbleweed's Secure Transport FTPS server using client certificates for
+authentication.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.5
+.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_FTP_SKIP_PASV_IP "(3), " CURLOPT_FTP_RESPONSE_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3
new file mode 100644
index 00000000..a52863e8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3
@@ -0,0 +1,70 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_CREATE_MISSING_DIRS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_CREATE_MISSING_DIRS \- create missing dirs for FTP and SFTP
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLFTP_CREATE_DIR_NONE,
+ CURLFTP_CREATE_DIR,
+ CURLFTP_CREATE_DIR_RETRY
+} curl_ftpcreatedir;
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_CREATE_MISSING_DIRS,
+ long create);
+.SH DESCRIPTION
+Pass a long telling libcurl to \fIcreate\fP the dir. If the value is
+\fICURLFTP_CREATE_DIR\fP (1), libcurl will attempt to create any remote
+directory that it fails to "move" into.
+
+For FTP requests, that means a CWD command fails. CWD being the command that
+changes working directory.
+
+For SFTP requests, libcurl will attempt to create the remote directory if it
+can't obtain a handle to the target-location. The creation will fail if a file
+of the same name as the directory to create already exists or lack of
+permissions prevents creation.
+
+Setting \fIcreate\fP to \fICURLFTP_CREATE_DIR_RETRY\fP (2), tells libcurl to
+retry the CWD command again if the subsequent MKD command fails. This is
+especially useful if you're doing many simultaneous connections against the
+same server and they all have this option enabled, as then CWD may first fail
+but then another connection does MKD before this connection and thus MKD fails
+but trying CWD works!
+.SH DEFAULT
+CURLFTP_CREATE_DIR_NONE (0)
+.SH PROTOCOLS
+FTP and SFTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.7. SFTP support added in 7.16.3. The retry option was added in
+7.19.4.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if the
+create value is not.
+.SH "SEE ALSO"
+.BR CURLOPT_FTP_FILEMETHOD "(3), " CURLOPT_FTP_USE_EPSV "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3
new file mode 100644
index 00000000..62396b97
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3
@@ -0,0 +1,62 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_FILEMETHOD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_FILEMETHOD \- select directory traversing method for FTP
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_FILEMETHOD,
+ long method);
+.SH DESCRIPTION
+Pass a long telling libcurl which \fImethod\fP to use to reach a file on a
+FTP(S) server.
+
+This option exists because some server implementations aren't compliant to
+what the standards say should work.
+
+The argument should be one of the following alternatives:
+.IP CURLFTPMETHOD_MULTICWD
+libcurl does a single CWD operation for each path part in the given URL. For
+deep hierarchies this means many commands. This is how RFC1738 says it should
+be done. This is the default but the slowest behavior.
+.IP CURLFTPMETHOD_NOCWD
+libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a
+full path to the server for all these commands. This is the fastest behavior.
+.IP CURLFTPMETHOD_SINGLECWD
+libcurl does one CWD with the full target directory and then operates on the
+file \&"normally" (like in the multicwd case). This is somewhat more standards
+compliant than 'nocwd' but without the full penalty of 'multicwd'.
+.SH DEFAULT
+CURLFTPMETHOD_MULTICWD
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.1
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FTPLISTONLY "(3), " CURLOPT_FTP_SKIP_PASV_IP "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3
new file mode 100644
index 00000000..18dbc2fe
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_RESPONSE_TIMEOUT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_RESPONSE_TIMEOUT \- time allowed to wait for FTP response
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_RESPONSE_TIMEOUT, long timeout);
+.SH DESCRIPTION
+Pass a long. Causes libcurl to set a \fItimeout\fP period (in seconds) on the
+amount of time that the server is allowed to take in order to send a response
+message for a command before the session is considered dead. While libcurl is
+waiting for a response, this value overrides \fICURLOPT_TIMEOUT(3)\fP. It is
+recommended that if used in conjunction with \fICURLOPT_TIMEOUT(3)\fP, you set
+\fICURLOPT_FTP_RESPONSE_TIMEOUT(3)\fP to a value smaller than
+\fICURLOPT_TIMEOUT(3)\fP.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.8
+.SH RETURN VALUE
+Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT "(3), " CURLOPT_CONNECTTIMEOUT "(3), "
+.BR CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3
new file mode 100644
index 00000000..b1803fd7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_SKIP_PASV_IP 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_SKIP_PASV_IP \- ignore the IP address in the PASV response
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SKIP_PASV_IP, long skip);
+.SH DESCRIPTION
+Pass a long. If \fIskip\fP is set to 1, it instructs libcurl to not use the IP
+address the server suggests in its 227-response to libcurl's PASV command when
+libcurl connects the data connection. Instead libcurl will re-use the same IP
+address it already uses for the control connection. But it will use the port
+number from the 227-response.
+
+This option thus allows libcurl to work around broken server installations
+that due to NATs, firewalls or incompetence report the wrong IP address back.
+
+This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.14.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FTPPORT "(3), " CURLOPT_FTP_USE_EPRT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3
new file mode 100644
index 00000000..5391285e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_SSL_CCC 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_SSL_CCC \- switch off SSL again with FTP after auth
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SSL_CCC,
+ long how);
+.SH DESCRIPTION
+If enabled, this option makes libcurl use CCC (Clear Command Channel). It
+shuts down the SSL/TLS layer after authenticating. The rest of the control
+channel communication will be unencrypted. This allows NAT routers to follow
+the FTP transaction. Pass a long using one of the values below
+.IP CURLFTPSSL_CCC_NONE
+Don't attempt to use CCC.
+.IP CURLFTPSSL_CCC_PASSIVE
+Do not initiate the shutdown, but wait for the server to do it. Do not send a
+reply.
+.IP CURLFTPSSL_CCC_ACTIVE
+Initiate the shutdown and wait for a reply.
+.SH DEFAULT
+CURLFTPSSL_CCC_NONE
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.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_FTPSSLAUTH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3
new file mode 100644
index 00000000..d26af0c4
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_USE_EPRT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_USE_EPRT \- enable/disable use of EPRT with FTP
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPRT, long enabled);
+.SH DESCRIPTION
+Pass a long. If the value is 1, it tells curl to use the EPRT command when
+doing active FTP downloads (which is enabled by
+\fICURLOPT_FTPPORT(3)\fP). Using EPRT means that it will first attempt to use
+EPRT before using PORT, but if you pass zero to this option, it will not try
+using EPRT, only plain PORT.
+
+If the server is an IPv6 host, this option will have no effect as EPRT is
+necessary then.
+.SH DEFAULT
+.SH PROTOCOLS
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.10.5
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_FTP_USE_EPSV "(3), " CURLOPT_FTPPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3
new file mode 100644
index 00000000..172985a9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_USE_EPSV 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_USE_EPSV \- enable/disable use of EPSV
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPSV, long epsv);
+.SH DESCRIPTION
+Pass \fIepsv\fP as a long. If the value is 1, it tells curl to use the EPSV
+command when doing passive FTP downloads (which it does by default). Using
+EPSV means that it will first attempt to use EPSV before using PASV, but if
+you pass zero to this option, it will not try using EPSV, only plain PASV.
+
+If the server is an IPv6 host, this option will have no effect as of 7.12.3.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with FTP
+.SH RETURN VALUE
+Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FTP_USE_EPRT "(3), " CURLOPT_FTPPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3
new file mode 100644
index 00000000..b20f3fb8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_FTP_USE_PRET 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_USE_PRET \- enable the PRET command
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_PRET, long enable);
+.SH DESCRIPTION
+Pass a long. If the value is 1, it tells curl to send a PRET command before
+PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard
+command for directory listings as well as up and downloads in PASV mode. Has
+no effect when using the active FTP transfers mode.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FTP_USE_EPRT "(3), " CURLOPT_FTP_USE_EPSV "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3
new file mode 100644
index 00000000..13f3cecb
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_GSSAPI_DELEGATION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_GSSAPI_DELEGATION \- set allowed GSS-API delegation
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_GSSAPI_DELEGATION, long level);
+.SH DESCRIPTION
+Set the long parameter \fIlevel\fP to CURLGSSAPI_DELEGATION_FLAG to allow
+unconditional GSSAPI credential delegation. The delegation is disabled by
+default since 7.21.7. Set the parameter to CURLGSSAPI_DELEGATION_POLICY_FLAG
+to delegate only if the OK-AS-DELEGATE flag is set in the service ticket in
+case this feature is supported by the GSS-API implementation and the definition
+of GSS_C_DELEG_POLICY_FLAG was available at compile-time.
+.SH DEFAULT
+CURLGSSAPI_DELEGATION_NONE
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.22.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HEADER.3 b/docs/libcurl/opts/CURLOPT_HEADER.3
new file mode 100644
index 00000000..f5a4be8d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HEADER.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_HEADER 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HEADER \- pass headers to the data stream
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADER, long onoff);
+.SH DESCRIPTION
+Pass in \fIonoff\fP set to 1 to tell the library to include the header in the
+body output for requests with this \fIhandle\fP. This option is relevant for
+protocols that actually have headers or other meta-data (like HTTP and FTP).
+
+When asking to get the header info passed to the same callback as the body, it
+is not possible to accurately separate them again without detailed knowledge
+about the protocol in use.
+
+It is often better to use \fICURLOPT_HEADERFUNCTION(3)\fP to get the header
+data separately.
+
+While named confusingly similar, \fICURLOPT_HTTPHEADER(3)\fP is used to set
+custom HTTP headers!
+.SH DEFAULT
+0
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH RETURN VALUE
+Returns CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_HEADERFUNCTION "(3), "
+.BR CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HEADERDATA.3 b/docs/libcurl/opts/CURLOPT_HEADERDATA.3
new file mode 100644
index 00000000..c0a45f26
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HEADERDATA.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_HEADERDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HEADERDATA \- pointer to pass to header callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADERDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP to be used to write the header part of the received data
+to.
+
+If \fICURLOPT_WRITEFUNCTION(3)\fP or \fICURLOPT_HEADERFUNCTION(3)\fP is used,
+\fIpointer\fP will be passed in to the respective callback.
+
+If neither of those options are set, \fIpointer\fP must be a valid FILE * and
+it will be used by a plain fwrite() to write headers to.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_HEADERFUNCTION "(3), " CURLOPT_WRITEFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
new file mode 100644
index 00000000..f8ed0ab8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
@@ -0,0 +1,106 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_HEADERFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HEADERFUNCTION \- callback that receives header data
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+size_t header_callback(char *buffer,
+ size_t size,
+ size_t nitems,
+ void *userdata);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADERFUNCTION, header_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This function gets called by libcurl as soon as it has received header
+data. The header callback will be called once for each header and only
+complete header lines are passed on to the callback. Parsing headers is very
+easy using this. The size of the data pointed to by \fIbuffer\fP is \fIsize\fP
+multiplied with \fInmemb\fP. Do not assume that the header line is zero
+terminated! The pointer named \fIuserdata\fP is the one you set with the
+\fICURLOPT_HEADERDATA(3)\fP option. This callback function must return the
+number of bytes actually taken care of. If that amount differs from the amount
+passed in to your function, it'll signal an error to the library. This will
+cause the transfer to get aborted and the libcurl function in progress will
+return \fICURLE_WRITE_ERROR\fP.
+
+A complete HTTP header that is passed to this function can be up to
+\fICURL_MAX_HTTP_HEADER\fP (100K) bytes.
+
+If this option is not set, or if it is set to NULL, but
+\fICURLOPT_HEADERDATA(3)\fP is set to anything but NULL, the function used to
+accept response data will be used instead. That is, it will be the function
+specified with \fICURLOPT_WRITEFUNCTION(3)\fP, or if it is not specified or
+NULL - the default, stream-writing function.
+
+It's important to note that the callback will be invoked for the headers of
+all responses received after initiating a request and not just the final
+response. This includes all responses which occur during authentication
+negotiation. If you need to operate on only the headers from the final
+response, you will need to collect headers in the callback yourself and use
+HTTP status lines, for example, to delimit response boundaries.
+
+When a server sends a chunked encoded transfer, it may contain a trailer. That
+trailer is identical to a HTTP header and if such a trailer is received it is
+passed to the application using this callback as well. There are several ways
+to detect it being a trailer and not an ordinary header: 1) it comes after the
+response-body. 2) it comes after the final header line (CR LF) 3) a Trailer:
+header among the regular response-headers mention what header(s) to expect in
+the trailer.
+
+For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will get
+called with the server responses to the commands that libcurl sends.
+.SH DEFAULT
+Nothing.
+.SH PROTOCOLS
+Used for all protocols with headers or meta-data concept: HTTP, FTP, POP3,
+IMAP, SMTP and more.
+.SH EXAMPLE
+.nf
+static size_t header_callback(char *buffer, size_t size,
+ size_t nitems, void *userdata)
+{
+ /* received header is nitems * size long in 'buffer' NOT ZERO TERMINATED */
+ /* 'userdata' is set with CURLOPT_WRITEDATA */
+ return nitems * size;
+}
+
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_HEADERDATA "(3), " CURLOPT_WRITEFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HEADEROPT.3 b/docs/libcurl/opts/CURLOPT_HEADEROPT.3
new file mode 100644
index 00000000..7776b921
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HEADEROPT.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_HEADEROPT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HEADEROPT \- set how to send HTTP headers
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADEROPT, long bitmask);
+.SH DESCRIPTION
+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_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
+the server.
+.SH DEFAULT
+CURLHEADER_SEPARATE (changed in 7.42.1, ased CURLHEADER_UNIFIED before then)
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.37.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTPHEADER "(3), " CURLOPT_PROXYHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3
new file mode 100644
index 00000000..b87db464
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_HTTP200ALIASES 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTP200ALIASES \- specify alternative matches for HTTP 200 OK
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP200ALIASES,
+ struct curl_slist *aliases);
+.SH DESCRIPTION
+Pass a pointer to a linked list of \fIaliases\fP to be treated as valid HTTP
+200 responses. Some servers respond with a custom header response line. For
+example, SHOUTcast servers respond with "ICY 200 OK". Also some very old
+Icecast 1.3.x servers will respond like that for certain user agent headers or
+in absence of such. By including this string in your list of aliases,
+the response will be treated as a valid HTTP header line such as
+"HTTP/1.0 200 OK".
+
+The linked list should be a fully valid list of struct curl_slist structs, and
+be properly filled in. Use \fIcurl_slist_append(3)\fP to create the list and
+\fIcurl_slist_free_all(3)\fP to clean up an entire list.
+
+The alias itself is not parsed for any version strings. The protocol is
+assumed to match HTTP 1.0 when an alias match.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.3
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP_VERSION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3
new file mode 100644
index 00000000..35d75aa5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3
@@ -0,0 +1,116 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_HTTPAUTH 3 "2 Aug 2014" "libcurl 7.38.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTPAUTH \- set HTTP server authentication methods to try
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPAUTH, long bitmask);
+.SH DESCRIPTION
+Pass a long as parameter, which is set to a bitmask, to tell libcurl which
+authentication method(s) you want it to use speaking to the remote server.
+
+The available bits are listed below. If more than one bit is set, libcurl will
+first query the site to see which authentication methods it supports and then
+pick the best one you allow it to use. For some methods, this will induce an
+extra network round-trip. Set the actual name and password with the
+\fICURLOPT_USERPWD(3)\fP option or with the \fICURLOPT_USERNAME(3)\fP and the
+\fICURLOPT_PASSWORD(3)\fP options.
+
+For authentication with a proxy, see \fICURLOPT_PROXYAUTH(3)\fP.
+
+.IP CURLAUTH_BASIC
+HTTP Basic authentication. This is the default choice, and the only method
+that is in wide-spread use and supported virtually everywhere. This sends
+the user name and password over the network in plain text, easily captured by
+others.
+.IP CURLAUTH_DIGEST
+HTTP Digest authentication. Digest authentication is defined in RFC2617 and
+is a more secure way to do authentication over public networks than the
+regular old-fashioned Basic method.
+.IP CURLAUTH_DIGEST_IE
+HTTP Digest authentication with an IE flavor. Digest authentication is
+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.
+
+You need to build libcurl with a suitable GSS-API library or SSPI on Windows
+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
+prevent the password from being eavesdropped.
+
+You need to build libcurl with either OpenSSL, GnuTLS or NSS support for this
+option to work, or build libcurl on Windows with SSPI support.
+.IP CURLAUTH_NTLM_WB
+NTLM delegating to winbind helper. Authentication is performed by a separate
+binary application that is executed when needed. The name of the application
+is specified at compile time but is typically /usr/bin/ntlm_auth
+
+Note that libcurl will fork when necessary to run the winbind application and
+kill it when complete, calling waitpid() to await its exit when done. On POSIX
+operating systems, killing the process will cause a SIGCHLD signal to be
+raised (regardless of whether \fICURLOPT_NOSIGNAL(3)\fP is set), which must be
+handled intelligently by the application. In particular, the application must
+not unconditionally call wait() in its SIGCHLD signal handler to avoid being
+subject to a race condition. This behavior is subject to change in future
+versions of libcurl.
+.IP CURLAUTH_ANY
+This is a convenience macro that sets all bits and thus makes libcurl pick any
+it finds suitable. libcurl will automatically select the one it finds most
+secure.
+.IP CURLAUTH_ANYSAFE
+This is a convenience macro that sets all bits except Basic and thus makes
+libcurl pick any it finds suitable. libcurl will automatically select the one
+it finds most secure.
+.IP CURLAUTH_ONLY
+This is a meta symbol. OR this value together with a single specific auth
+value to force libcurl to probe for un-restricted auth and if not, only that
+single auth algorithm is acceptable.
+.SH DEFAULT
+CURLAUTH_BASIC
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Option Added in 7.10.6.
+
+CURLAUTH_DIGEST_IE was added added in 7.19.3
+
+CURLAUTH_ONLY was added in 7.21.3
+
+CURLAUTH_NTLM_WB was added in 7.22.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication
+methods.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXYAUTH "(3), " CURLOPT_USERPWD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTPGET.3 b/docs/libcurl/opts/CURLOPT_HTTPGET.3
new file mode 100644
index 00000000..c14c3878
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPGET.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_HTTPGET 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTPGET \- ask for a HTTP GET request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPGET, long useget);
+.SH DESCRIPTION
+Pass a long. If \fIuseget\fP is 1, this forces the HTTP request to get back to
+using GET. Usable if a POST, HEAD, PUT, etc has been used previously using the
+same curl \fIhandle\fP.
+
+When setting \fICURLOPT_HTTPGET(3)\fP to 1, it will automatically set
+\fICURLOPT_NOBODY(3)\fP to 0 and \fICURLOPT_UPLOAD(3)\fP to 0.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP(S)
+.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
+.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_NOBODY "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
new file mode 100644
index 00000000..cd504314
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
@@ -0,0 +1,110 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_HTTPHEADER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTPHEADER \- set custom HTTP headers
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPHEADER, struct curl_slist *headers);
+.SH DESCRIPTION
+Pass a pointer to a linked list of HTTP headers to pass to the server and/or
+proxy in your HTTP request. The same list can be used for both host and proxy
+requests!
+
+The linked list should be a fully valid list of \fBstruct curl_slist\fP
+structs properly filled in. Use \fIcurl_slist_append(3)\fP to create the list
+and \fIcurl_slist_free_all(3)\fP to clean up an entire list. If you add a
+header that is otherwise generated and used by libcurl internally, your added
+one will be used instead. If you add a header with no content as in 'Accept:'
+(no data on the right side of the colon), the internally used header will get
+disabled. With this option you can add new headers, replace internal headers
+and remove internal headers. To add a header with no content (nothing to the
+right side of the colon), use the form 'MyHeader;' (note the ending
+semicolon).
+
+The headers included in the linked list \fBmust not\fP be CRLF-terminated,
+because libcurl adds CRLF after each header item. Failure to comply with this
+will result in strange bugs because the server will most likely ignore part of
+the headers you specified.
+
+The first line in a request (containing the method, usually a GET or POST) is
+not a header and cannot be replaced using this option. Only the lines
+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
+\fICURLOPT_COOKIE(3)\fP, \fICURLOPT_USERAGENT(3)\fP and
+\fICURLOPT_REFERER(3)\fP. We recommend using those.
+
+There's an alternative option that sets or replaces headers only for requests
+that are sent with CONNECT to a proxy: \fICURLOPT_PROXYHEADER(3)\fP. Use
+\fICURLOPT_HEADEROPT(3)\fP to control the behavior.
+.SH SECURITY CONCERNS
+By default, this option makes libcurl send the given headers in all HTTP
+requests done by this handle. You should therefore use this option with
+caution if you for example connect to the remote site using a proxy and a
+CONNECT request, you should to consider if that proxy is supposed to also get
+the headers. They may be private or otherwise sensitive to leak.
+
+Use \fICURLOPT_HEADEROPT(3)\fP to make the headers only get sent to where you
+intend them to get sent.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+
+struct curl_slist *list = NULL;
+
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ list = curl_slist_append(list, "Shoesize: 10");
+ list = curl_slist_append(list, "Accept:");
+
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list);
+
+ curl_easy_perform(curl);
+
+ curl_slist_free_all(list); /* free the list again */
+}
+.fi
+
+.SH AVAILABILITY
+As long as HTTP is enabled
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CUSTOMREQUEST "(3), " CURLOPT_HEADEROPT "(3), "
+.BR CURLOPT_PROXYHEADER "(3), " CURLOPT_HEADER "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_HTTPPOST.3 b/docs/libcurl/opts/CURLOPT_HTTPPOST.3
new file mode 100644
index 00000000..0f35b632
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPPOST.3
@@ -0,0 +1,78 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_HTTPPOST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTPPOST \- specify the multipart formpost content
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPPOST,
+ struct curl_httppost *formpost);
+.SH DESCRIPTION
+Tells libcurl you want a multipart/formdata HTTP POST to be made and you
+instruct what data to pass on to the server in the \fIformpost\fP argument.
+Pass a pointer to a linked list of curl_httppost structs as parameter. The
+easiest way to create such a list, is to use \fIcurl_formadd(3)\fP as
+documented. The data in this list must remain intact until you close this curl
+handle again with \fIcurl_easy_cleanup(3)\fP.
+
+Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
+You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP.
+
+When setting \fICURLOPT_HTTPPOST(3)\fP, it will automatically set
+\fICURLOPT_NOBODY(3)\fP to 0.
+.SH DEFAULT
+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
+.SH AVAILABILITY
+As long as HTTP is enabled
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_POSTFIELDS "(3), " CURLOPT_POST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3
new file mode 100644
index 00000000..f861afbd
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_HTTPPROXYTUNNEL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTPPROXYTUNNEL \- tunnel through HTTP proxy
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPPROXYTUNNEL, long tunnel);
+.SH DESCRIPTION
+Set the parameter to 1 to make libcurl tunnel all operations through the HTTP
+proxy. There is a big difference between using a proxy and to tunnel through
+it. If you don't know what this means, you probably don't want this tunneling
+option.
+
+Tunneling essentially means that a CONNECT is sent to the proxy, asking it to
+connect to a remote host on a specific port number and then the traffic is
+just passed through the proxy. Proxies tend to whitelist specific port numbers
+it allows CONNECT requests to and often only port 80 and 443 are allowed.
+
+When using this, it only makes sense to use \fICURLOPT_PROXYTYPE(3)\fP set to
+a HTTP proxy.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All network protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), " CURLOPT_PROXYPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3
new file mode 100644
index 00000000..65472ec6
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_HTTP_CONTENT_DECODING 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTP_CONTENT_DECODING \- enable/disable HTTP content decoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_CONTENT_DECODING,
+ long enabled);
+.SH DESCRIPTION
+Pass a long to tell libcurl how to act on content decoding. If set to zero,
+content decoding will be disabled. If set to 1 it is enabled. Libcurl has no
+default content decoding but requires you to use
+\fICURLOPT_ACCEPT_ENCODING(3)\fP for that.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.2
+.SH RETURN VALUE
+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_HTTP_TRANSFER_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3
new file mode 100644
index 00000000..26662db3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_HTTP_TRANSFER_DECODING 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTP_TRANSFER_DECODING \- enable/disable HTTP transfer decoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_TRANSFER_DECODING,
+ long enabled);
+.SH DESCRIPTION
+Pass a long to tell libcurl how to act on transfer decoding. If set to zero,
+transfer decoding will be disabled, if set to 1 it is enabled
+(default). libcurl does chunked transfer decoding by default unless this
+option is set to zero.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP_CONTENT_DECODING "(3), " CURLOPT_ACCEPT_ENCODING "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
new file mode 100644
index 00000000..c85d1448
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_HTTP_VERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_VERSION, long version);
+.SH DESCRIPTION
+Pass \fIversion\fP a long, set to one of the values described below. They
+force libcurl to use the specific HTTP versions. This is not sensible to do
+unless you have a good reason. You have to set this option if you want to use
+libcurl's HTTP/2 support.
+
+.IP CURL_HTTP_VERSION_NONE
+We don't care about what version the library uses. libcurl will use whatever
+it thinks fit.
+.IP CURL_HTTP_VERSION_1_0
+Enforce HTTP 1.0 requests.
+.IP CURL_HTTP_VERSION_1_1
+Enforce HTTP 1.1 requests.
+.IP CURL_HTTP_VERSION_2_0
+Attempt HTTP 2 requests. libcurl will fall back to HTTP 1.x if HTTP 2 can't be
+negotiated with the server. (Added in 7.33.0)
+.SH DEFAULT
+CURL_HTTP_VERSION_NONE
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+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_SSLVERSION "(3), " CURLOPT_HTTP200ALIASES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3
new file mode 100644
index 00000000..51fd6b08
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3
@@ -0,0 +1,61 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_IGNORE_CONTENT_LENGTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_IGNORE_CONTENT_LENGTH \- ignore Content-Length in HTTP response
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IGNORE_CONTENT_LENGTH,
+ long ignore);
+.SH DESCRIPTION
+If \fIignore\fP is set to 1, ignore the Content-Length header in the HTTP
+response. This is useful for Apache 1.x (and similar servers) which will
+report incorrect content length for files over 2 gigabytes. If this option is
+used, curl will not be able to accurately report progress, and will simply
+stop the download when the server ends the connection.
+
+Only use this option if strictly necessary.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* we know the server is silly, ignore content-length */
+ curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 1L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.14.1
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP_VERSION "(3), " CURLOPT_MAXFILESIZE_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE.3
new file mode 100644
index 00000000..fd49e21a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INFILESIZE.3
@@ -0,0 +1,71 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_INFILESIZE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_INFILESIZE \- set size of the input file to send off
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INFILESIZE, long filesize);
+.SH DESCRIPTION
+When uploading a file to a remote site, \fIfilesize\fP should be used to tell
+libcurl what the expected size of the input file is. This value must be passed
+as a long. See also \fICURLOPT_INFILESIZE_LARGE(3)\fP for sending files larger
+than 2GB.
+
+For uploading using SCP, this option or \fICURLOPT_INFILESIZE_LARGE(3)\fP is
+mandatory.
+
+To unset this value again, set it to -1.
+
+When sending emails using SMTP, this command can be used to specify the
+optional SIZE parameter for the MAIL FROM command.
+
+This option does not limit how much data libcurl will actually send, as that
+is controlled entirely by what the read callback returns, but telling one
+value and sending a different amount may lead to errors.
+.SH DEFAULT
+Unset
+.SH PROTOCOLS
+Many
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ long uploadsize = FILE_SIZE;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/destination.tar.gz");
+
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE, uploadsize);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+SMTP support added in 7.23.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_INFILESIZE_LARGE "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3
new file mode 100644
index 00000000..114676d0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3
@@ -0,0 +1,72 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_INFILESIZE_LARGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_INFILESIZE_LARGE \- set size of the input file to send off
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INFILESIZE_LARGE,
+ curl_off_t filesize);
+.SH DESCRIPTION
+When uploading a file to a remote site, \fIfilesize\fP should be used to tell
+libcurl what the expected size of the input file is. This value must be passed
+as a \fBcurl_off_t\fP.
+
+For uploading using SCP, this option or \fICURLOPT_INFILESIZE(3)\fP is
+mandatory.
+
+To unset this value again, set it to -1.
+
+When sending emails using SMTP, this command can be used to specify the
+optional SIZE parameter for the MAIL FROM command.
+
+This option does not limit how much data libcurl will actually send, as that
+is controlled entirely by what the read callback returns, but telling one
+value and sending a different amount may lead to errors.
+.SH DEFAULT
+Unset
+.SH PROTOCOLS
+Many
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_off_t uploadsize = FILE_SIZE;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/destination.tar.gz");
+
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadsize);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+SMTP support added in 7.23.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_INFILESIZE "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_INTERFACE.3
new file mode 100644
index 00000000..0890eb6c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INTERFACE.3
@@ -0,0 +1,55 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_INTERFACE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_INTERFACE \- source interface for outgoing traffic
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERFACE, char *interface);
+.SH DESCRIPTION
+Pass a char * as parameter. This sets the \fIinterface\fP name to use as
+outgoing network interface. The name can be an interface name, an IP address,
+or a host name.
+
+If the parameter starts with "if!" then it is treated as only as interface
+name and no attempt will ever be named to do treat it as an IP address or to
+do name resolution on it. If the parameter starts with \&"host!" it is
+treated as either an IP address or a hostname. Hostnames are resolved
+synchronously. Using the if! format is highly recommended when using the
+multi interfaces to avoid allowing the code to block. If "if!" is specified
+but the parameter does not match an existing interface, CURLE_INTERFACE_FAILED
+is returned from the libcurl function used to perform the transfer.
+.SH DEFAULT
+NULL, use whatever the TCP stack finds suitable
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+The "if!" and "host!" syntax was added in 7.24.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_SOCKOPTFUNCTION "(3), " CURLOPT_TCP_NODELAY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3
new file mode 100644
index 00000000..836dfac1
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_INTERLEAVEDATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_INTERLEAVEDATA \- custom pointer to RTSP interleave callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEDATA, void *pointer);
+.SH DESCRIPTION
+This is the userdata \fIpointer\fP that will be passed to
+\fICURLOPT_INTERLEAVEFUNCTION(3)\fP when interleaved RTP data is
+received.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_INTERLEAVEFUNCTION "(3), " CURLOPT_RTSP_REQUEST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3
new file mode 100644
index 00000000..b965529d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3
@@ -0,0 +1,68 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_INTERLEAVEFUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_INTERLEAVEFUNCTION \- callback function for RTSP interleaved data
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+size_t interleave_callback(void *ptr, size_t size, size_t nmemb,
+ void *userdata);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEFUNCTION,
+ interleave_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl as soon as it has received
+interleaved RTP data. This function gets called for each $ block and therefore
+contains exactly one upper-layer protocol unit (e.g. one RTP packet). Curl
+writes the interleaved header as well as the included data for each call. The
+first byte is always an ASCII dollar sign. The dollar sign is followed by a
+one byte channel identifier and then a 2 byte integer length in network byte
+order. See \fIRFC2326 Section 10.12\fP for more information on how RTP
+interleaving behaves. If unset or set to NULL, curl will use the default write
+function.
+
+Interleaved RTP poses some challenges for the client application. Since the
+stream data is sharing the RTSP control connection, it is critical to service
+the RTP in a timely fashion. If the RTP data is not handled quickly,
+subsequent response processing may become unreasonably delayed and the
+connection may close. The application may use \fICURL_RTSPREQ_RECEIVE\fP to
+service RTP data when no requests are desired. If the application makes a
+request, (e.g. \fICURL_RTSPREQ_PAUSE\fP) then the response handler will
+process any pending RTP data before marking the request as finished.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_INTERLEAVEFUNCTION "(3), " CURLOPT_RTSP_REQUEST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3
new file mode 100644
index 00000000..456080cf
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_IOCTLDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_IOCTLDATA \- custom pointer passed to I/O callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IOCTLDATA, void *pointer);
+.SH DESCRIPTION
+Pass the \fIpointer\fP that will be untouched by libcurl and passed as the 3rd
+argument in the ioctl callback set with \fICURLOPT_IOCTLFUNCTION(3)\fP.
+.SH DEFAULT
+By default, the value of this parameter is NULL.
+.SH PROTOCOLS
+Used with HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.12.3
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_IOCTLFUNCTION "(3), " CURLOPT_SEEKFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3
new file mode 100644
index 00000000..ebfe8dfc
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3
@@ -0,0 +1,76 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_IOCTLFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_IOCTLFUNCTION \- callback for I/O operations
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLIOE_OK, /* I/O operation successful */
+ CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
+ CURLIOE_FAILRESTART, /* failed to restart the read */
+ CURLIOE_LAST /* never use */
+} curlioerr;
+
+typedef enum {
+ CURLIOCMD_NOP, /* no operation */
+ CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
+ CURLIOCMD_LAST /* never use */
+} curliocmd;
+
+curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IOCTLFUNCTION, ioctl_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl when something special
+I/O-related needs to be done that the library can't do by itself. For now,
+rewinding the read data stream is the only action it can request. The
+rewinding of the read data stream may be necessary when doing a HTTP PUT or
+POST with a multi-pass authentication method.
+
+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.
+
+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
+parameter will be ignored when seeking.
+.SH DEFAULT
+By default, this parameter is set to NULL. Not used.
+.SH PROTOCOLS
+Used with HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.12.3
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_IOCTLDATA "(3), " CURLOPT_SEEKFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3
new file mode 100644
index 00000000..ad9827a4
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_IPRESOLVE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_IPRESOLVE \- specify which IP protocol version to use
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IPRESOLVE, long resolve);
+.SH DESCRIPTION
+Allows an application to select what kind of IP addresses to use when
+resolving host names. This is only interesting when using host names that
+resolve addresses using more than one version of IP. The allowed values are:
+.IP CURL_IPRESOLVE_WHATEVER
+Default, resolves addresses to all IP versions that your system allows.
+.IP CURL_IPRESOLVE_V4
+Resolve to IPv4 addresses.
+.IP CURL_IPRESOLVE_V6
+Resolve to IPv6 addresses.
+.SH DEFAULT
+CURL_IPRESOLVE_WHATEVER
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP_VERSION "(3), " CURLOPT_SSLVERSION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3
new file mode 100644
index 00000000..08afb29e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_ISSUERCERT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ISSUERCERT \- issuer SSL certificate filename
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ISSUERCERT, char *file);
+.SH DESCRIPTION
+Pass a char * to a zero terminated string naming a \fIfile\fP holding a CA
+certificate in PEM format. If the option is set, an additional check against
+the peer certificate is performed to verify the issuer is indeed the one
+associated with the certificate provided by the option. This additional check
+is useful in multi-level PKI where one needs to enforce that the peer
+certificate is from a specific branch of the tree.
+
+This option makes sense only when used in combination with the
+\fICURLOPT_SSL_VERIFYPEER(3)\fP option. Otherwise, the result of the check is
+not considered as failure.
+
+A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option,
+which is returned if the setup of the SSL/TLS session has failed due to a
+mismatch with the issuer of peer certificate (\fICURLOPT_SSL_VERIFYPEER(3)\fP
+has to be set too for the check to fail). (Added in 7.19.0)
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled
+.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_CRLFILE "(3), " CURLOPT_SSL_VERIFYPEER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3
new file mode 100644
index 00000000..0ed0c875
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_KEYPASSWD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_KEYPASSWD \- set passphrase to private key
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KEYPASSWD, char *pwd);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used as
+the password required to use the \fICURLOPT_SSLKEY(3)\fP or
+\fICURLOPT_SSH_PRIVATE_KEYFILE(3)\fP private key. You never needed a pass
+phrase to load a certificate but you need one to load your private key.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and
+CURLOPT_SSLCERTPASSWD up to 7.9.2.
+.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_SSLKEY "(3), " CURLOPT_SSH_PRIVATE_KEYFILE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3
new file mode 100644
index 00000000..571eba3b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_KRBLEVEL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_KRBLEVEL \- set FTP kerberos security level
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KRBLEVEL, char *level);
+.SH DESCRIPTION
+Pass a char * as parameter. Set the kerberos security level for FTP; this also
+enables kerberos awareness. This is a string that should match one of the
+following: \&'clear', \&'safe', \&'confidential' or \&'private'. If the
+string is set but doesn't match one of these, 'private' will be used. Set the
+string to NULL to disable kerberos support for FTP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was known as CURLOPT_KRB4LEVEL up to 7.16.3
+.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_KRBLEVEL "(3), " CURLOPT_FTP_SSL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORT.3 b/docs/libcurl/opts/CURLOPT_LOCALPORT.3
new file mode 100644
index 00000000..88ca1f87
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOCALPORT.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_LOCALPORT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOCALPORT \- set local port number to use for socket
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORT, long port);
+.SH DESCRIPTION
+Pass a long. This sets the local port number of the socket used for the
+connection. This can be used in combination with \fICURLOPT_INTERFACE(3)\fP
+and you are recommended to use \fICURLOPT_LOCALPORTRANGE(3)\fP as well when
+this option is set. Valid port numbers are 1 - 65535.
+.SH DEFAULT
+0, disabled - use whatever the system thinks is fine
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.2
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_LOCALPORTRANGE "(3), " CURLOPT_INTERFACE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3
new file mode 100644
index 00000000..3a7c701f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_LOCALPORTRANGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOCALPORTRANGE \- number of additional local ports to try
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORTRANGE,
+ long range);
+.SH DESCRIPTION
+Pass a long. The \fIrange\fP argument is the number of attempts libcurl will
+make to find a working local port number. It starts with the given
+\fICURLOPT_LOCALPORT(3)\fP and adds one to the number for each retry. Setting
+this option to 1 or below will make libcurl do only one try for the exact port
+number. Port numbers by nature are scarce resources that will be busy at times
+so setting this value to something too low might cause unnecessary connection
+setup failures.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_LOCALPORT "(3), " CURLOPT_INTERFACE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3
new file mode 100644
index 00000000..dde3c6ed
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_LOGIN_OPTIONS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOGIN_OPTIONS \- set login options
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOGIN_OPTIONS, char *options);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+\fIoptions\fP string to use for the transfer.
+
+For more information about the login options please see RFC2384, RFC5092 and
+IETF draft draft-earhart-url-smtp-00.txt
+
+\fBCURLOPT_LOGIN_OPTIONS(3)\fP can be used to set protocol specific login
+options, such as the preferred authentication mechanism via "AUTH=NTLM" or
+"AUTH=*", and should be used in conjunction with the \fICURLOPT_USERNAME(3)\fP
+option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+Only IMAP, POP3 and SMTP support login options.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.34.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_USERNAME "(3), " CURLOPT_PASSWORD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3
new file mode 100644
index 00000000..893c1b14
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_LOW_SPEED_LIMIT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOW_SPEED_LIMIT \- set low speed limit in bytes per second
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_LIMIT, long speedlimit);
+.SH DESCRIPTION
+Pass a long as parameter. It contains the average transfer speed in bytes per
+second that the transfer should be below during
+\fICURLOPT_LOW_SPEED_TIME(3)\fP seconds for libcurl to consider it to be too
+slow and abort.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_LOW_SPEED_TIME "(3), " CURLOPT_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3
new file mode 100644
index 00000000..90b19f2a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_LOW_SPEED_TIME 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOW_SPEED_TIME \- set low speed limit time period
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_TIME, long speedtime);
+.SH DESCRIPTION
+Pass a long as parameter. It contains the time in number seconds that the
+transfer speed should be below the \fICURLOPT_LOW_SPEED_LIMIT(3)\fP for the
+library to consider it too slow and abort.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_LOW_SPEED_LIMIT "(3), " CURLOPT_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3
new file mode 100644
index 00000000..4591a01e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_MAIL_AUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAIL_AUTH \- SMTP authentication address
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_AUTH, char *auth);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. This will be used to
+specify the authentication address (identity) of a submitted message that is
+being relayed to another server.
+
+This optional parameter allows co-operating agents in a trusted environment to
+communicate the authentication of individual messages and should only be used
+by the application program, using libcurl, if the application is itself a mail
+server acting in such an environment. If the application is operating as such
+and the AUTH address is not known or is invalid, then an empty string should
+be used for this parameter.
+
+Unlike \fICURLOPT_MAIL_FROM(3)\fP and \fICURLOPT_MAIL_RCPT(3)\fP, the address
+should not be specified within a pair of angled brackets (<>). However, if an
+empty string is used then a pair of brackets will be sent by libcurl as
+required by RFC2554.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.25.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_MAIL_FROM "(3), " CURLOPT_MAIL_RCPT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3
new file mode 100644
index 00000000..bf7160eb
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_MAIL_FROM 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAIL_FROM \- SMTP sender address
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_FROM, char *from);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. This should be used
+to specify the sender's email address when sending SMTP mail with libcurl.
+
+An originator email address should be specified with angled brackets (<>)
+around it, which if not specified will be added automatically.
+
+If this parameter is not specified then an empty address will be sent to the
+mail server which may cause the email to be rejected.
+.SH DEFAULT
+blank
+.SH PROTOCOLS
+SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.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_MAIL_RCPT "(3), " CURLOPT_MAIL_AUTH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
new file mode 100644
index 00000000..95665e77
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_MAIL_RCPT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAIL_RCPT \- list of SMTP mail recipients
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_RCPT,
+ struct curl_slist *rcpts);
+.SH DESCRIPTION
+Pass a pointer to a linked list of recipients to pass to the server in your
+SMTP mail request. The linked list should be a fully valid list of \fBstruct
+curl_slist\fP structs properly filled in. Use \fIcurl_slist_append(3)\fP to
+create the list and \fIcurl_slist_free_all(3)\fP to clean up an entire list.
+
+When performing a mail transfer, each recipient should be specified within a
+pair of angled brackets (<>), however, should you not use an angled bracket as
+the first character libcurl will assume you provided a single email address
+and enclose that address within brackets for you.
+
+When performing an address verification (VRFY command), each recipient should
+be specified as the user name or user name and domain (as per Section 3.5 of
+RFC5321).
+
+When performing a mailing list expand (EXPN command), each recipient should be
+specified using the mailing list name, such as "Friends" or "London-Office".
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0. The VRFY and EXPN logic was added in 7.34.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAIL_FROM "(3), " CURLOPT_MAIL_AUTH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3
new file mode 100644
index 00000000..2a41b375
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_MAXCONNECTS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAXCONNECTS \- maximum connection cache size
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+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.
+
+When reaching the maximum limit, curl closes the oldest one in the cache to
+prevent increasing the number of open connections.
+
+If you already have performed transfers with this curl handle, setting a
+smaller \fICURLOPT_MAXCONNECTS(3)\fP than before may cause open connections to
+get closed unnecessarily.
+
+If you add this easy handle to a multi handle, this setting is not
+acknowledged, and you must instead use \fIcurl_multi_setopt(3)\fP and the
+\fICURLMOPT_MAXCONNECTS\fP option.
+.SH DEFAULT
+5
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLMOPT_MAXCONNECTS "(3), " CURLOPT_MAXREDIRS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3
new file mode 100644
index 00000000..e0ce0660
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_MAXFILESIZE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAXFILESIZE \- maximum file size allowed to download
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXFILESIZE, long size);
+.SH DESCRIPTION
+Pass a long as parameter. This allows you to specify the maximum \fIsize\fP
+(in bytes) of a file to download. If the file requested is found larger than
+this value, the transfer will not start and \fICURLE_FILESIZE_EXCEEDED\fP will
+be returned.
+
+The file size is not always known prior to download, and for such files this
+option has no effect even if the file transfer ends up being larger than this
+given limit. This concerns both FTP and HTTP transfers.
+
+If you want a limit above 2GB, use \fICURLOPT_MAXFILESIZE_LARGE(3)\fP.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+FTP and HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_MAXFILESIZE_LARGE "(3), " CURLOPT_MAX_RECV_SPEED_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3
new file mode 100644
index 00000000..b3130018
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_MAXFILESIZE_LARGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAXFILESIZE_LARGE \- maximum file size allowed to download
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXFILESIZE_LARGE,
+ curl_off_t size);
+.SH DESCRIPTION
+Pass a curl_off_t as parameter. This allows you to specify the maximum
+\fIsize\fP (in bytes) of a file to download. If the file requested is found
+larger than this value, the transfer will not start and
+\fICURLE_FILESIZE_EXCEEDED\fP will be returned.
+
+The file size is not always known prior to download, and for such files this
+option has no effect even if the file transfer ends up being larger than this
+given limit. This concerns both FTP and HTTP transfers.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+FTP and HTTP
+.SH EXAMPLE
+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_MAXFILESIZE "(3), " CURLOPT_MAX_RECV_SPEED_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3
new file mode 100644
index 00000000..34608c39
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3
@@ -0,0 +1,64 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_MAXREDIRS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAXREDIRS \- maximum number of redirects allowed
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXREDIRS, long amount);
+.SH DESCRIPTION
+Pass a long. The set number will be the redirection limit \fIamount\fP. If
+that many redirections have been followed, the next redirect will cause an
+error (\fICURLE_TOO_MANY_REDIRECTS\fP). This option only makes sense if the
+\fICURLOPT_FOLLOWLOCATION(3)\fP is used at the same time.
+
+Setting the limit to 0 will make libcurl refuse any redirect.
+
+Set it to -1 for an infinite number of redirects.
+.SH DEFAULT
+-1, unlimited
+.SH PROTOCOLS
+HTTP(S)
+.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
+.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_FOLLOWLOCATION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3
new file mode 100644
index 00000000..e73ad22b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_MAX_RECV_SPEED_LARGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAX_RECV_SPEED_LARGE \- rate limit data download speed
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAX_RECV_SPEED_LARGE,
+ curl_off_t speed);
+.SH DESCRIPTION
+Pass a curl_off_t as parameter. If a download exceeds this \fIspeed\fP
+(counted in bytes per second) on cumulative average during the transfer, the
+transfer will pause to keep the average rate less than or equal to the
+parameter value. Defaults to unlimited speed.
+
+This option doesn't affect transfer speeds done with FILE:// URLs.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+All but file://
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.15.5
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAX_SEND_SPEED_LARGE "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3
new file mode 100644
index 00000000..4893b392
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_MAX_SEND_SPEED_LARGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAX_SEND_SPEED_LARGE \- rate limit data upload speed
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAX_SEND_SPEED_LARGE,
+ curl_off_t maxspeed);
+.SH DESCRIPTION
+Pass a curl_off_t as parameter with the \fImaxspeed\fP. If an upload exceeds
+this speed (counted in bytes per second) on cumulative average during the
+transfer, the transfer will pause to keep the average rate less than or equal
+to the parameter value. Defaults to unlimited speed.
+
+This option doesn't affect transfer speeds done with FILE:// URLs.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+All except file://
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.5
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAX_RECV_SPEED_LARGE "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NETRC.3 b/docs/libcurl/opts/CURLOPT_NETRC.3
new file mode 100644
index 00000000..9fb13b32
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NETRC.3
@@ -0,0 +1,73 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_NETRC 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NETRC \- request that .netrc is used
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC, long level);
+.SH DESCRIPTION
+This parameter controls the preference \fIlevel\fP of libcurl between using
+user names and passwords from your \fI~/.netrc\fP file, relative to user names
+and passwords in the URL supplied with \fICURLOPT_URL(3)\fP.
+
+libcurl uses a user name (and supplied or prompted password) supplied with
+\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP in preference to any of
+the options controlled by this parameter.
+
+Only machine name, user name and password are taken into account (init macros
+and similar things aren't supported).
+
+libcurl does not verify that the file has the correct properties set (as the
+standard Unix ftp client does). It should only be readable by user.
+
+\fIlevel\fP should be set to one of the values described below.
+
+.IP CURL_NETRC_OPTIONAL
+The use of your \fI~/.netrc\fP file is optional, and information in the URL is
+to be preferred. The file will be scanned for the host and user name (to
+find the password only) or for the host only, to find the first user name and
+password after that \fImachine\fP, which ever information is not specified in
+the URL.
+
+Undefined values of the option will have this effect.
+.IP CURL_NETRC_IGNORED
+The library will ignore the file and use only the information in the URL.
+
+This is the default.
+.IP CURL_NETRC_REQUIRED
+This value tells the library that use of the file is required, to ignore the
+information in the URL, and to search the file for the host only.
+.SH DEFAULT
+CURL_NETRC_IGNORED
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_USERPWD "(3), " CURLOPT_USERNAME "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3
new file mode 100644
index 00000000..7291999e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_NETRC_FILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NETRC_FILE \- file name to read .netrc info from
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC_FILE, char *file);
+.SH DESCRIPTION
+Pass a char * as parameter, pointing to a zero terminated string containing
+the full path name to the \fIfile\fP you want libcurl to use as .netrc
+file. If this option is omitted, and \fICURLOPT_NETRC(3)\fP is set, libcurl
+will attempt to find a .netrc file in the current user's home
+directory.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.9
+.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_NETRC "(3), " CURLOPT_USERNAME "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3
new file mode 100644
index 00000000..2d22595e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_NEW_DIRECTORY_PERMS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NEW_DIRECTORY_PERMS \- permissions for remotely created directories
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NEW_DIRECTORY_PERMS,
+ long mode);
+.SH DESCRIPTION
+Pass a long as a parameter, containing the value of the permissions that will
+be assigned to newly created directories on the remote server. The default value is
+\fI0755\fP, but any valid value can be used. The only protocols that can use
+this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP.
+.SH DEFAULT
+0755
+.SH PROTOCOLS
+SFTP, SCP and FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_NEW_FILE_PERMS "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3
new file mode 100644
index 00000000..eb51f462
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_NEW_FILE_PERMS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NEW_FILE_PERMS \- permissions for remotely created files
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NEW_FILE_PERMS,
+ long mode);
+.SH DESCRIPTION
+Pass a long as a parameter, containing the value of the permissions that will
+be assigned to newly created files on the remote server. The default value is
+\fI0644\fP, but any valid value can be used. The only protocols that can use
+this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP.
+.SH DEFAULT
+0644
+.SH PROTOCOLS
+SFTP, SCP and FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_NEW_DIRECTORY_PERMS "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NOBODY.3 b/docs/libcurl/opts/CURLOPT_NOBODY.3
new file mode 100644
index 00000000..b303b95d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NOBODY.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_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
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+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.
+.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
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_HTTPGET "(3), " CURLOPT_POST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3
new file mode 100644
index 00000000..ebdecb04
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3
@@ -0,0 +1,42 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_NOPROGRESS 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NOPROGRESS \- switch off the progress meter
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROGRESS, long onoff);
+.SH DESCRIPTION
+If \fIonoff\fP is to 1, it tells the library to shut off the progress meter
+completely for requests done with this \fIhandle\fP. It will also prevent the
+\fICURLOPT_PROGRESSFUNCTION(3)\fP from getting called.
+
+Future versions of libcurl are likely to not have any built-in progress meter
+at all.
+.SH DEFAULT
+1, meaning it normally runs without a progress meter.
+.SH RETURN VALUE
+Returns CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_PROGRESSFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NOPROXY.3 b/docs/libcurl/opts/CURLOPT_NOPROXY.3
new file mode 100644
index 00000000..7e2e7199
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NOPROXY.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_NOPROXY 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NOPROXY \- disable proxy use for specific hosts
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROXY, char *noproxy);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string. The string consists of a comma
+separated list of host names that do not require a proxy to get reached, even
+if one is specified. The only wildcard available is a single * character,
+which matches all hosts, and effectively disables the proxy. Each name in this
+list is matched as either a domain which contains the hostname, or the
+hostname itself. For example, example.com would match example.com,
+example.com:80, and www.example.com, but not www.notanexample.com or
+example.com.othertld.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.4
+.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_PROXY "(3), " CURLOPT_PROXYAUTH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3
new file mode 100644
index 00000000..27fe1580
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3
@@ -0,0 +1,55 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_NOSIGNAL 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NOSIGNAL \- skip all signal handling
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOSIGNAL, long onoff);
+.SH DESCRIPTION
+If \fIonoff\fP is 1, libcurl will not use any functions that install signal
+handlers or any functions that cause signals to be sent to the process. This
+option is here to allow multi-threaded unix applications to still set/use all
+timeout options etc, without risking getting signals.
+
+If this option is set and libcurl has been built with the standard name
+resolver, timeouts will not occur while the name resolve takes place.
+Consider building libcurl with the c-ares or threaded resolver backends to
+enable asynchronous DNS lookups, to enable timeouts for name resolves without
+the use of signals.
+
+Setting \fICURLOPT_NOSIGNAL(3)\fP to 1 makes libcurl NOT ask the system to
+ignore SIGPIPE signals, which otherwise are sent by the system when trying to
+send data to a socket which is closed in the other end. libcurl makes an
+effort to never cause such SIGPIPEs to trigger, but some operating systems
+have no way to avoid them and even on those that have there are some corner
+cases when they may still happen, contrary to our desire. In addition, using
+\fICURLAUTH_NTLM_WB\fP authentication could cause a SIGCHLD signal to be
+raised.
+.SH DEFAULT
+0
+.SH AVAILABILITY
+Added in 7.10
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3
new file mode 100644
index 00000000..a397c3e3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_OPENSOCKETDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_OPENSOCKETDATA \- custom pointer passed to open socket callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_OPENSOCKETDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the opensocket callback set with \fICURLOPT_OPENSOCKETFUNCTION(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.17.1
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_OPENSOCKETFUNCTION "(3), " CURLOPT_SOCKOPTFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
new file mode 100644
index 00000000..d5f461d0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
@@ -0,0 +1,90 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_OPENSOCKETFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_OPENSOCKETFUNCTION \- set callback for opening sockets
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
+ CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
+ CURLSOCKTYPE_LAST /* never use */
+} curlsocktype;
+
+struct curl_sockaddr {
+ int family;
+ int socktype;
+ int protocol;
+ unsigned int addrlen;
+ struct sockaddr addr;
+};
+
+curl_socket_t opensocket_callback(void *clientp,
+ curlsocktype purpose,
+ struct curl_sockaddr *address);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_OPENSOCKETFUNCTION, opensocket_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl instead of the \fIsocket(2)\fP
+call. The callback's \fIpurpose\fP argument identifies the exact purpose for
+this particular socket: \fICURLSOCKTYPE_IPCXN\fP is for IP based connections
+and \fICURLSOCKTYPE_ACCEPT\fP is for sockets created after accept() - such as
+when doing active FTP. Future versions of libcurl may support more
+purposes.
+
+The \fIclientp\fP pointer contains whatever user-defined value set using the
+\fICURLOPT_OPENSOCKETDATA(3)\fP function.
+
+The callback gets the resolved peer address as the \fIaddress\fP argument and
+is allowed to modify the address or refuse to connect completely. The callback
+function should return the newly created socket or \fICURL_SOCKET_BAD\fP in
+case no connection could be established or another error was detected. Any
+additional \fIsetsockopt(2)\fP calls can of course be done on the socket at
+the user's discretion. A \fICURL_SOCKET_BAD\fP return value from the callback
+function will signal an unrecoverable error to libcurl and it will return
+\fICURLE_COULDNT_CONNECT\fP from the function that triggered this callback.
+This return code can be used for IP address blacklisting.
+
+If you want to pass in a socket with an already established connection, pass
+the socket back with this callback and then use
+\fICURLOPT_SOCKOPTFUNCTION(3)\fP to signal that it already is connected.
+.SH DEFAULT
+The default behavior is the equivalent of this:
+.nf
+ return socket(addr->family, addr->socktype, addr->protocol);
+.fi
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.17.1.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_OPENSOCKETDATA "(3), " CURLOPT_SOCKOPTFUNCTION "(3), "
+.BR CURLOPT_CLOSESOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_PASSWORD.3
new file mode 100644
index 00000000..b460658f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PASSWORD.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PASSWORD \- password to use in authentication
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PASSWORD, char *pwd);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+password to use for the transfer.
+
+The \fICURLOPT_PASSWORD(3)\fP option should be used in conjunction with the
+\fICURLOPT_USERNAME(3)\fP option.
+.SH DEFAULT
+blank
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.1
+.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_USERPWD "(3), " CURLOPT_USERNAME "(3), "
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3)"
+
diff --git a/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3
new file mode 100644
index 00000000..490aca0d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_PATH_AS_IS 3 "17 Jun 2014" "libcurl 7.42.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PATH_AS_IS \- do not handle dot dot sequences
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PATH_AS_IS, long leaveit);
+.SH DESCRIPTION
+By setting the long \fIleavit\fP to 1, to explicitly tell libcurl to not alter
+the given path before passing it on to the server.
+
+This tells libcurl to NOT squash sequences of "/../" or "/./" that may exist
+in the URL's path part and that is supposed to be removed according to RFC
+3986 section 5.2.4.
+
+Some server implementations are known to (erroneously) require the dot dot
+sequences to remain in the path and some clients want to pass these on in
+order to try out server implementations.
+
+By default libcurl will merge such sequences before using the path.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/../../etc/password");
+
+ curl_easy_setopt(curl, CURLOPT_PATH_AS_IS, 1L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Aded in 7.42.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
new file mode 100644
index 00000000..94cad31f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
@@ -0,0 +1,76 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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 PUBLIC KEY EXTRACTION
+If you do not have the server's public key file you can extract it from the
+server's certificate.
+.nf
+openssl x509 -in www.test.com.pem -pubkey -noout > www.test.com.pubkey.pem
+.fi
+The public key is output in PEM format and contains a header, base64 data and a
+footer:
+.nf
+-----BEGIN PUBLIC KEY-----
+[BASE 64 DATA]
+-----END PUBLIC KEY-----
+.fi
+.SH AVAILABILITY
+Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for
+NSS and wolfSSL/CyaSSL. Other SSL backends not supported.
+.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_PIPEWAIT.3 b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3
new file mode 100644
index 00000000..5f641959
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_PIPEWAIT 3 "12 May 2015" "libcurl 7.43.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PIPEWAIT \- wait for pipelining/multiplexing
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PIPEWAIT, long wait);
+.SH DESCRIPTION
+Set \fIwait\fP to 1L to tell libcurl to prefer to wait for a connection to
+confirm or deny that it can do pipelining or multiplexing before continuing.
+
+When about to perform a new transfer that allows pipelining or multiplexing,
+libcurl will check for existing connections to re-use and pipeline on. If no
+such connection exists it will immediately continue and create a fresh new
+connection to use.
+
+By setting this option to 1 - and having \fICURLMOPT_PIPELINE\fP enabled for
+the multi handle this transfer is associated with - libcurl will instead wait
+for the connection to reveal if it is possible to pipeline/multiplex on before
+it continues. This enables libcurl to much better keep the number of
+connections to a minimum when using pipelining or multiplexing protocols.
+
+The effect thus becomes that with this option set, libcurl prefers to wait and
+re-use an existing connection for pipelining rather than the opposite: prefer
+to open a new connection rather than waiting.
+
+The waiting time is as long as it takes for the connection to get up and for
+libcurl to get the necessary response back that informs it about its protocol
+and support level.
+.SH DEFAULT
+0 (off)
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.43.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FORBID_REUSE "(3), " CURLOPT_FRESH_CONNECT "(3), "
+.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PORT.3 b/docs/libcurl/opts/CURLOPT_PORT.3
new file mode 100644
index 00000000..5fd19c79
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PORT.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PORT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PORT \- set remote port number to work with
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PORT, long number);
+.SH DESCRIPTION
+This option sets \fInumber\fP to be the remote port number to connect to,
+instead of the one specified in the URL or the default port for the used
+protocol.
+
+Usually, you just let the URL decide which port to use but this allows the
+application to override that.
+
+While this option accepts a 'long', a port number is usually a 16 bit number
+and therefore using a port number over 65535 will cause a run-time error.
+.SH DEFAULT
+By default this is 0 which makes it not used.
+.SH PROTOCOLS
+Used for all protocols that speak to a port number.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POST.3 b/docs/libcurl/opts/CURLOPT_POST.3
new file mode 100644
index 00000000..cd6b6d44
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POST.3
@@ -0,0 +1,77 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_POST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POST \- request a HTTP POST
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POST, long post);
+.SH DESCRIPTION
+A parameter set to 1 tells libcurl to do a regular HTTP post. This will also
+make the library use a "Content-Type: application/x-www-form-urlencoded"
+header. (This is by far the most commonly used POST method).
+
+Use one of \fICURLOPT_POSTFIELDS(3)\fP or \fICURLOPT_COPYPOSTFIELDS(3)\fP
+options to specify what data to post and \fICURLOPT_POSTFIELDSIZE(3)\fP or
+\fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP to set the data size.
+
+Optionally, you can provide data to POST using the
+\fICURLOPT_READFUNCTION(3)\fP and \fICURLOPT_READDATA(3)\fP options but then
+you must make sure to not set \fICURLOPT_POSTFIELDS(3)\fP to anything but
+NULL. When providing data with a callback, you must transmit it using chunked
+transfer-encoding or you must set the size of the data with the
+\fICURLOPT_POSTFIELDSIZE(3)\fP or \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP
+options. To enable chunked encoding, you simply pass in the appropriate
+Transfer-Encoding header, see the post-callback.c example.
+
+You can override the default POST Content-Type: header by setting your own
+with \fICURLOPT_HTTPHEADER(3)\fP.
+
+Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
+You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
+
+If you use POST to a HTTP 1.1 server, you can send data without knowing the
+size before starting the POST if you use chunked encoding. You enable this by
+adding a header like "Transfer-Encoding: chunked" with
+\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you
+must specify the size in the request.
+
+When setting \fICURLOPT_POST(3)\fP to 1, it will automatically set
+\fICURLOPT_NOBODY(3)\fP to 0.
+
+If you issue a POST request and then want to make a HEAD or GET using the same
+re-used handle, you must explicitly set the new request type using
+\fICURLOPT_NOBODY(3)\fP or \fICURLOPT_HTTPGET(3)\fP or similar.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+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_HTTPPOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
new file mode 100644
index 00000000..27e4510b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
@@ -0,0 +1,87 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_POSTFIELDS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTFIELDS \- specify data to POST to server
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDS, char *postdata);
+.SH DESCRIPTION
+Pass a char * as parameter, pointing to the full data to send in a HTTP POST
+operation. You must make sure that the data is formatted the way you want the
+server to receive it. libcurl will not convert or encode it for you in any
+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
+used by HTML forms. Change Content-Type with \fICURLOPT_HTTPHEADER(3)\fP.
+
+Using \fICURLOPT_POSTFIELDS(3)\fP implies \fICURLOPT_POST(3)\fP.
+
+You can use \fIcurl_easy_escape(3)\fP to url-encode your data, if necessary. It
+returns a pointer to an encoded string that can be passed as \fIpostdata\fP.
+
+If you want to do a zero-byte POST, you need to set
+\fICURLOPT_POSTFIELDSIZE(3)\fP explicitly to zero, as simply setting
+\fICURLOPT_POSTFIELDS(3)\fP to NULL or "" just effectively disables the
+sending of the specified string. libcurl will instead assume that you'll send
+the POST data using the read callback!
+
+Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
+You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
+
+To make multipart/formdata posts (aka RFC2388-posts), check out the
+\fICURLOPT_HTTPPOST(3)\fP option combined with \fIcurl_formadd(3)\fP.
+.SH DEFAULT
+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
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_POSTFIELDSIZE "(3), " CURLOPT_READFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3
new file mode 100644
index 00000000..01668056
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3
@@ -0,0 +1,62 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_POSTFIELDSIZE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTFIELDSIZE \- size of POST data pointed to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE, long size);
+.SH DESCRIPTION
+If you want to post data to the server without having libcurl do a strlen() to
+measure the data size, this option must be used. When this option is used you
+can post fully binary data, which otherwise is likely to fail. If this size is
+set to -1, the library will use strlen() to get the size.
+
+If you post more than 2GB, use \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP.
+.SH DEFAULT
+-1
+.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
+.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_POSTFIELDSIZE_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
new file mode 100644
index 00000000..50fc3519
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
@@ -0,0 +1,64 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_POSTFIELDSIZE_LARGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTFIELDSIZE_LARGE \- size of POST data pointed to
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE_LARGE,
+ curl_off_t size);
+.SH DESCRIPTION
+If you want to post data to the server without having libcurl do a strlen() to
+measure the data size, this option must be used. When this option is used you
+can post fully binary data, which otherwise is likely to fail. If this size is
+set to -1, the library will use strlen() to get the size.
+.SH DEFAULT
+-1
+.SH PROTOCOLS
+HTTP(S)
+.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
+.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_POSTQUOTE.3 b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3
new file mode 100644
index 00000000..72692fd9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_POSTQUOTE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTQUOTE \- (S)FTP commands to run after the transfer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTQUOTE, struct curl_slist *cmds);
+.SH DESCRIPTION
+Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
+after your FTP transfer request. The commands will only be run if no error
+occurred. The linked list should be a fully valid list of struct curl_slist
+structs properly filled in as described for \fICURLOPT_QUOTE(3)\fP.
+
+Disable this operation again by setting a NULL to this option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If support for the protocols are built-in.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_QUOTE "(3), " CURLOPT_PREQUOTE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POSTREDIR.3 b/docs/libcurl/opts/CURLOPT_POSTREDIR.3
new file mode 100644
index 00000000..aa36bd0f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTREDIR.3
@@ -0,0 +1,73 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_POSTREDIR 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTREDIR \- how to act on a HTTP POST redirect
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTREDIR,
+ long bitmask);
+.SH DESCRIPTION
+Pass a bitmask to control how libcurl acts on redirects after POSTs that get a
+301, 302 or 303 response back. A parameter with bit 0 set (value
+\fBCURL_REDIR_POST_301\fP) tells the library to respect RFC2616/10.3.2 and not
+convert POST requests into GET requests when following a 301 redirection.
+Setting bit 1 (value \fBCURL_REDIR_POST_302\fP) makes libcurl maintain the
+request method after a 302 redirect whilst setting bit 2 (value
+\fBCURL_REDIR_POST_303\fP) makes libcurl maintain the request method after a
+303 redirect. The value \fBCURL_REDIR_POST_ALL\fP is a convenience define that
+sets all three bits.
+
+The non-RFC behaviour is ubiquitous in web browsers, so the library does the
+conversion by default to maintain consistency. However, a server may require a
+POST to remain a POST after such a redirection. This option is meaningful only
+when setting \fICURLOPT_FOLLOWLOCATION(3)\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP(S)
+.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
+.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.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FOLLOWLOCATION "(3), " CURLOPT_POSTFIELDS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PREQUOTE.3 b/docs/libcurl/opts/CURLOPT_PREQUOTE.3
new file mode 100644
index 00000000..e4163e88
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PREQUOTE.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PREQUOTE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PREQUOTE \- commands to run before FTP or SFTP transfer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PREQUOTE, char *cmds);
+.SH DESCRIPTION
+Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
+after the transfer type is set. The linked list should be a fully valid list
+of struct curl_slist structs properly filled in as described for
+\fICURLOPT_QUOTE(3)\fP. Disable this operation again by setting a NULL to this
+option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP and SFTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with the protocol support
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_QUOTE "(3), " CURLOPT_POSTQUOTE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PRIVATE.3 b/docs/libcurl/opts/CURLOPT_PRIVATE.3
new file mode 100644
index 00000000..9907f975
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PRIVATE.3
@@ -0,0 +1,61 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_PRIVATE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PRIVATE \- store a private pointer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRIVATE, void *pointer);
+.SH DESCRIPTION
+Pass a void * as parameter, pointing to data that should be associated with
+this curl handle. The pointer can subsequently be retrieved using
+\fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself
+never does nothing with this data.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+struct private secrets;
+if(curl) {
+ struct private *extracted;
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* store a pointer to our private struct */
+ curl_easy_setopt(curl, CURLOPT_PRIVATE, &secrets);
+
+ curl_easy_perform(curl);
+
+ /* we can extract the private pointer again too */
+ curl_easy_getinfo(curl, CURLINFO_PRIVATE, &extracted);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.10.3
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_STDERR "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3
new file mode 100644
index 00000000..c4785dca
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROGRESSDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROGRESSDATA \- custom pointer passed to the progress callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROGRESSDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the progress callback set with \fICURLOPT_PROGRESSFUNCTION(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/progressfunc.html
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PROGRESSFUNCTION "(3), " CURLOPT_XFERINFOFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3
new file mode 100644
index 00000000..d8e7a667
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3
@@ -0,0 +1,84 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROGRESSFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROGRESSFUNCTION \- callback to progress meter function
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+int progress_callback(void *clientp,
+ double dltotal,
+ double dlnow,
+ double ultotal,
+ double ulnow);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROGRESSFUNCTION, progress_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+We encourage users to use the newer \fICURLOPT_XFERINFOFUNCTION(3)\fP instead,
+if you can.
+
+This function gets called by libcurl instead of its internal equivalent with a
+frequent interval. While data is being transferred it will be called very
+frequently, and during slow periods like when nothing is being transferred it
+can slow down to about one call per second.
+
+\fIclientp\fP is the pointer set with \fICURLOPT_PROGRESSDATA(3)\fP, it is not
+used by libcurl but is only passed along from the application to the callback.
+
+The callback gets told how much data libcurl will transfer and has
+transferred, in number of bytes. \fIdltotal\fP is the total number of bytes
+libcurl expects to download in this transfer. \fIdlnow\fP is the number of
+bytes downloaded so far. \fIultotal\fP is the total number of bytes libcurl
+expects to upload in this transfer. \fIulnow\fP is the number of bytes
+uploaded so far.
+
+Unknown/unused argument values passed to the callback will be set to zero
+(like if you only download data, the upload size will remain 0). Many times
+the callback will be called one or more times first, before it knows the data
+sizes so a program must be made to handle that.
+
+Returning a non-zero value from this callback will cause libcurl to abort the
+transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP.
+
+If you transfer data with the multi interface, this function will not be
+called during periods of idleness unless you call the appropriate libcurl
+function that performs transfers.
+
+\fICURLOPT_NOPROGRESS(3)\fP must be set to 0 to make this function actually
+get called.
+.SH DEFAULT
+By default, libcurl has an internal progress meter. That's rarely wanted by
+users.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/progressfunc.html
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_NOPROGRESS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3
new file mode 100644
index 00000000..958eeeb9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3
@@ -0,0 +1,92 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROTOCOLS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROTOCOLS \- set allowed protocols
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROTOCOLS, long bitmask);
+.SH DESCRIPTION
+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
+\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
+.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), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXY.3 b/docs/libcurl/opts/CURLOPT_PROXY.3
new file mode 100644
index 00000000..b419e51b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXY.3
@@ -0,0 +1,85 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROXY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXY \- set proxy to use
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY, char *proxy);
+.SH DESCRIPTION
+Set the \fIproxy\fP to use for the upcoming request. The parameter should be a
+char * to a zero terminated string holding the host name or dotted IP
+address.
+
+To specify port number in this string, append :[port] to the end of the host
+name. The proxy's port number may optionally be specified with the separate
+option \fICURLOPT_PROXYPORT(3)\fP. If not specified, libcurl will default to
+using port 1080 for proxies.
+
+The proxy string may be prefixed with [scheme]:// to specify which kind of
+proxy is used. Use socks4://, socks4a://, socks5:// or socks5h:// (the last
+one to enable socks5 and asking the proxy to do the resolving, also known as
+\fICURLPROXY_SOCKS5_HOSTNAME\fP type) to request the specific SOCKS version to
+be used. No protocol specified, http:// and all others will be treated as HTTP
+proxies.
+
+Without a scheme prefix, \fICURLOPT_PROXYTYPE(3)\fP can be used to specify
+which kind of proxy the string identifies.
+
+When you tell the library to use a HTTP proxy, libcurl will transparently
+convert operations to HTTP even if you specify an FTP URL etc. This may have
+an impact on what other features of the library you can use, such as
+\fICURLOPT_QUOTE(3)\fP and similar FTP specifics that don't work unless you
+tunnel through the HTTP proxy. Such tunneling is activated with
+\fICURLOPT_HTTPPROXYTUNNEL(3)\fP.
+
+libcurl respects the environment variables \fBhttp_proxy\fP, \fBftp_proxy\fP,
+\fBall_proxy\fP etc, if any of those are set. The \fICURLOPT_PROXY(3)\fP
+option does however override any possibly set environment variables.
+
+Setting the proxy string to "" (an empty string) will explicitly disable the
+use of a proxy, even if there is an environment variable set for it.
+
+A proxy host string given in an environment variable can also include protocol
+scheme (http://) and embedded user + password.
+.SH DEFAULT
+Default is NULL, meaning no proxy is used.
+
+When you set a host name to use, do not assume that there's any particular
+single port number used widely for proxies. Specify it!
+.SH PROTOCOLS
+All except file://. Note that some protocols don't do very well over proxy.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Since 7.14.1 the proxy environment variable names can include the protocol
+scheme.
+
+Since 7.21.7 the proxy string supports the socks protocols as "schemes".
+.SH RETURN VALUE
+Returns CURLE_OK if proxies are supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXYPORT "(3), " CURLOPT_HTTPPROXYTUNNEL "(3), "
+.BR CURLOPT_PROXYTYPE "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3
new file mode 100644
index 00000000..fe742c03
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3
@@ -0,0 +1,55 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROXYAUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYAUTH \- set HTTP proxy authentication methods to try
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYAUTH, long bitmask);
+.SH DESCRIPTION
+Pass a long as parameter, which is set to a bitmask, to tell libcurl which
+HTTP authentication method(s) you want it to use for your proxy
+authentication. If more than one bit is set, libcurl will first query the
+site to see what authentication methods it supports and then pick the best one
+you allow it to use. For some methods, this will induce an extra network
+round-trip. Set the actual name and password with the
+\fICURLOPT_PROXYUSERPWD(3)\fP option.
+
+The bitmask can be constructed by or'ing together the bits fully listed and
+described in the \fICURLOPT_HTTPAUTH(3)\fP man page.
+.SH DEFAULT
+CURLAUTH_BASIC
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.7
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication
+methods.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
+.BR CURLOPT_PROXYUSERPWD "(3), " CURLOPT_PROXYPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3
new file mode 100644
index 00000000..bfa7a7a2
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROXYHEADER 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYHEADER \- custom HTTP headers to pass to proxy
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYHEADER,
+ struct curl_slist *headers);
+.SH DESCRIPTION
+Pass a pointer to a linked list of HTTP headers to pass in your HTTP request
+sent to a proxy. The rules for this list is identical to the
+\fICURLOPT_HTTPHEADER(3)\fP option's.
+
+The headers set with this option is only ever used in requests sent to a proxy
+- when there's also a request sent to a host.
+
+The first line in a request (containing the method, usually a GET or POST) is
+NOT a header and cannot be replaced using this option. Only the lines
+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.
+
+Pass a NULL to this to reset back to no custom headers.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.37.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HEADEROPT "(3), " CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3
new file mode 100644
index 00000000..43536ca1
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROXYPASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYPASSWORD \- password to use with proxy authentication
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPASSWORD, char *pwd);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+password to use for authentication with the proxy.
+
+The \fICURLOPT_PROXYPASSWORD(3)\fP option should be used in conjunction with
+the \fICURLOPT_PROXYUSERNAME(3)\fP option.
+.SH DEFAULT
+blank
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.1
+.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_PASSWORD "(3), " CURLOPT_PROXYUSERNAME "(3), "
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_PROXYPORT.3 b/docs/libcurl/opts/CURLOPT_PROXYPORT.3
new file mode 100644
index 00000000..d8a1bb1f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYPORT.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROXYPORT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYPORT \- port number the proxy listens on
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPORT, long port);
+.SH DESCRIPTION
+Pass a long with this option to set the proxy port to connect to unless it is
+specified in the proxy string \fICURLOPT_PROXY(3)\fP or uses the default one.
+
+While this accepts a 'long', the port number is 16 bit so it can't be larger
+than 65535.
+.SH DEFAULT
+0, not specified which makes it use the default port
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3
new file mode 100644
index 00000000..2ce0cc0c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROXYTYPE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYTYPE \- proxy protocol type
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYTYPE, long type);
+.SH DESCRIPTION
+Pass a long with this option to set type of the proxy. Available options for
+this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_HTTP_1_0\fP
+\fICURLPROXY_SOCKS4\fP, \fICURLPROXY_SOCKS5\fP, \fICURLPROXY_SOCKS4A\fP and
+\fICURLPROXY_SOCKS5_HOSTNAME\fP. The HTTP type is default.
+
+If you set \fBCURLOPT_PROXYTYPE(3)\fP to \fICURLPROXY_HTTP_1_0\fP, it will
+only affect how libcurl speaks to a proxy when CONNECT is used. The HTTP
+version used for "regular" HTTP requests is instead controlled with
+\fICURLOPT_HTTP_VERSION(3)\fP.
+
+Often it is more convenient to specify the proxy type with the scheme part of
+the \fICURLOPT_PROXY(3)\fP string.
+.SH DEFAULT
+CURLPROXY_HTTP
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3
new file mode 100644
index 00000000..c342ec4f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROXYUSERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYUSERNAME \- user name to use for proxy authentication
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYUSERNAME,
+ char *username);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+user name to use for the transfer.
+
+\fBCURLOPT_PROXYUSERNAME(3)\fP sets the user name to be used in protocol
+authentication with the proxy.
+
+To specify the proxy password use the \fICURLOPT_PROXYPASSWORD(3)\fP.
+.SH DEFAULT
+blank
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.1
+.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_PROXYPASSWORD "(3), " CURLOPT_USERNAME "(3), "
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3
new file mode 100644
index 00000000..bbf0da52
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_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
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYUSERPWD, char *userpwd);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be [user name]:[password] to use for
+the connection to the HTTP proxy. Both the name and the password will be URL
+decoded before use, so to include for example a colon in the user name you
+should encode it as %3A. (This is different to how \fICURLOPT_USERPWD(3)\fP is
+used - beware.)
+
+Use \fICURLOPT_PROXYAUTH(3)\fP to specify the authentication method.
+.SH DEFAULT
+This is NULL by default.
+.SH PROTOCOLS
+Used with all protocols that can use a proxy
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK if proxies are supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3
new file mode 100644
index 00000000..a6224fb7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_PROXY_SERVICE_NAME 3 "17 Jun 2015" "libcurl 7.43.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXY_SERVICE_NAME \- proxy service name
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SERVICE_NAME, char *name);
+.SH DESCRIPTION
+Pass a char * as parameter to a string holding the \fIname\fP of the
+service. The default service name is "HTTP". This option allows you to change it.
+..SH DEFAULT
+See above
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.43.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_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3
new file mode 100644
index 00000000..ae5ede77
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PROXY_TRANSFER_MODE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXY_TRANSFER_MODE \- append FTP transfer mode to URL for proxy
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TRANSFER_MODE, long enabled);
+.SH DESCRIPTION
+Pass a long. If the value is set to 1 (one), it tells libcurl to set the
+transfer mode (binary or ASCII) for FTP transfers done via a HTTP proxy, by
+appending ;type=a or ;type=i to the URL. Without this setting, or it being set
+to 0 (zero, the default), \fICURLOPT_TRANSFERTEXT(3)\fP has no effect when
+doing FTP via a proxy. Beware that not all proxies support this feature.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+FTP over proxy
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.18.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if the
+enabled value is not supported.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_HTTPPROXYTUNNEL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PUT.3 b/docs/libcurl/opts/CURLOPT_PUT.3
new file mode 100644
index 00000000..bd40b7f8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PUT.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_PUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PUT \- make a HTTP PUT request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PUT, long put);
+.SH DESCRIPTION
+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
+\fICURLOPT_UPLOAD(3)\fP!
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Deprecated since 7.12.1. Do not use.
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_UPLOAD "(3), " CURLOPT_HTTPGET "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_QUOTE.3 b/docs/libcurl/opts/CURLOPT_QUOTE.3
new file mode 100644
index 00000000..8bf3c14a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_QUOTE.3
@@ -0,0 +1,86 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_QUOTE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_QUOTE \- (S)FTP commands to run before transfer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_QUOTE, struct curl_slist *cmds);
+.SH DESCRIPTION
+Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
+prior to your request. This will be done before any other commands are issued
+(even before the CWD command for FTP). The linked list should be a fully valid
+list of 'struct curl_slist' structs properly filled in with text strings. Use
+\fIcurl_slist_append(3)\fP to append strings (commands) to the list, and clear
+the entire list afterwards with \fIcurl_slist_free_all(3)\fP. Disable this
+operation again by setting a NULL to this option. When speaking to a FTP
+server, prefix the command with an asterisk (*) to make libcurl continue even
+if the command fails as by default libcurl will stop at first failure.
+
+The set of valid FTP commands depends on the server (see RFC959 for a list of
+mandatory commands).
+
+The valid SFTP commands are:
+.RS
+.IP "chgrp group file"
+The chgrp command sets the group ID of the file named by the file operand to
+the group ID specified by the group operand. The group operand is a decimal
+integer group ID.
+.IP "chmod mode file"
+The chmod command modifies the file mode bits of the specified file. The
+mode operand is an octal integer mode number.
+.IP "chown user file"
+The chown command sets the owner of the file named by the file operand to the
+user ID specified by the user operand. The user operand is a decimal
+integer user ID.
+.IP "ln source_file target_file"
+The ln and symlink commands create a symbolic link at the target_file location
+pointing to the source_file location.
+.IP "mkdir directory_name"
+The mkdir command creates the directory named by the directory_name operand.
+.IP "pwd"
+The pwd command returns the absolute pathname of the current working directory.
+.IP "rename source target"
+The rename command renames the file or directory named by the source
+operand to the destination path named by the target operand.
+.IP "rm file"
+The rm command removes the file specified by the file operand.
+.IP "rmdir directory"
+The rmdir command removes the directory entry specified by the directory
+operand, provided it is empty.
+.IP "symlink source_file target_file"
+See ln.
+.RE
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+SFTP support added in 7.16.3. *-prefix for SFTP added in 7.24.0
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_POSTQUOTE "(3), " CURLOPT_PREQUOTE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3
new file mode 100644
index 00000000..0c2d6884
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RANDOM_FILE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RANDOM_FILE \- specify a source for random data
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char *path);
+.SH DESCRIPTION
+Pass a char * to a zero terminated file name. The file will be used to read
+from to seed the random engine for SSL and more.
+.SH DEFAULT
+NULL, not used
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK on success or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_EGDSOCKET "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RANGE.3 b/docs/libcurl/opts/CURLOPT_RANGE.3
new file mode 100644
index 00000000..f5dd555c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RANGE.3
@@ -0,0 +1,66 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RANGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RANGE \- set byte range to request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANGE, char *range);
+.SH DESCRIPTION
+Pass a char * as parameter, which should contain the specified range you want
+to retrieve. It should be in the format "X-Y", where either X or Y may be left
+out and X and Y are byte indexes.
+
+HTTP transfers also support several intervals, separated with commas as in
+\fI"X-Y,N-M"\fP. Using this kind of multiple intervals will cause the HTTP
+server to send the response document in pieces (using standard MIME separation
+techniques). For RTSP, the formatting of a range should follow RFC2326 Section
+12.29. For RTSP, byte ranges are \fBnot\fP permitted. Instead, ranges should
+be given in npt, utc, or smpte formats.
+
+Pass a NULL to this option to disable the use of ranges.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP, FTP, FILE, RTSP and SFTP.
+.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
+.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), "
diff --git a/docs/libcurl/opts/CURLOPT_READDATA.3 b/docs/libcurl/opts/CURLOPT_READDATA.3
new file mode 100644
index 00000000..a67f4154
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_READDATA.3
@@ -0,0 +1,64 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_READDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_READDATA \- custom pointer passed to the read callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_READDATA, void *pointer);
+.SH DESCRIPTION
+Data \fIpointer\fP to pass to the file read function. If you use the
+\fICURLOPT_READFUNCTION(3)\fP option, this is the pointer you'll get as
+input in the 4th argument to the callback.
+
+If you don't specify a read callback but instead rely on the default internal
+read function, this data must be a valid readable FILE * (cast to 'void *').
+
+If you're using libcurl as a win32 DLL, you MUST use a
+\fICURLOPT_READFUNCTION(3)\fP if you set this option.
+.SH DEFAULT
+By default, this is a FILE * to stdin.
+.SH PROTOCOLS
+This is used for all protocols when sending data.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+struct MyData this;
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* pass pointer that gets passed in to the
+ CURLOPT_READFUNCTION callback */
+ curl_easy_setopt(curl, CURLOPT_READDATA, &this);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+This option was once known by the older name \fICURLOPT_INFILE\fP, the name
+\fICURLOPT_READDATA\fP was introduced in 7.9.7.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_READFUNCTION "(3), " CURLOPT_WRITEDATA "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_READFUNCTION.3 b/docs/libcurl/opts/CURLOPT_READFUNCTION.3
new file mode 100644
index 00000000..edd9bdbf
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_READFUNCTION.3
@@ -0,0 +1,79 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_READFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_READFUNCTION \- read callback for data uploads
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+size_t read_callback(char *buffer, size_t size, size_t nitems, void *instream);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_READFUNCTION, read_callback);
+
+.SH DESCRIPTION
+Pass a pointer to your callback function, as the prototype shows above.
+
+This callback function gets called by libcurl as soon as it needs to read data
+in order to send it to the peer - like if you ask it to upload or post data to
+the server. The data area pointed at by the pointer \fIbuffer\fP should be
+filled up with at most \fIsize\fP multiplied with \fInmemb\fP number of bytes
+by your function.
+
+Your function must then return the actual number of bytes that it stored in
+that memory area. Returning 0 will signal end-of-file to the library and cause
+it to stop the current transfer.
+
+If you stop the current transfer by returning 0 "pre-maturely" (i.e before the
+server expected it, like when you've said you will upload N bytes and you
+upload less than N bytes), you may experience that the server "hangs" waiting
+for the rest of the data that won't come.
+
+The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current
+operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error
+code from the transfer.
+
+The callback can return \fICURL_READFUNC_PAUSE\fP to cause reading from this
+connection to pause. See \fIcurl_easy_pause(3)\fP for further details.
+
+\fBBugs\fP: when doing TFTP uploads, you must return the exact amount of data
+that the callback wants, or it will be considered the final packet by the
+server end and the transfer will end there.
+
+If you set this callback pointer to NULL, or don't set it at all, the default
+internal read function will be used. It is doing an fread() on the FILE *
+userdata set with \fICURLOPT_READDATA(3)\fP.
+.SH DEFAULT
+The default internal read callback is fread().
+.SH PROTOCOLS
+This is used for all protocols when doing uploads.
+.SH EXAMPLE
+Here's an example setting a read callback for reading that to upload to an FTP
+site: http://curl.haxx.se/libcurl/c/ftpupload.html
+.SH AVAILABILITY
+CURL_READFUNC_PAUSE return code was added in 7.18.0 and CURL_READFUNC_ABORT
+was added in 7.12.1.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_READDATA "(3), " CURLOPT_WRITEFUNCTION "(3), "
+.BR CURLOPT_SEEKFUNCTION "(3), " CURLOPT_UPLOAD "(3), " CURLOPT_POST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3
new file mode 100644
index 00000000..fbec9f5c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3
@@ -0,0 +1,92 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_REDIR_PROTOCOLS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_REDIR_PROTOCOLS \- set protocols allowed to redirect to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REDIR_PROTOCOLS, long bitmask);
+.SH DESCRIPTION
+Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask
+limits what protocols libcurl may use in a transfer that it follows to in a
+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.
+.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
+.SH AVAILABILITY
+Added in 7.19.4, before then it would follow all protocols.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_PROTOCOLS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_REFERER.3 b/docs/libcurl/opts/CURLOPT_REFERER.3
new file mode 100644
index 00000000..bcb16251
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_REFERER.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_REFERER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_REFERER \- set the HTTP referer header
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REFERER, char *where);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used to
+set the Referer: header in the http request sent to the remote server. This
+can be used to fool servers or scripts. You can also set any custom header
+with \fICURLOPT_HTTPHEADER(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* tell it where we found the link to this place */
+ curl_easy_setopt(curl, CURLOPT_REFERER, "http://example.com/aboutme.html");
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+If built with HTTP support
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP support is enabled, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_USERAGENT "(3), " CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RESOLVE.3 b/docs/libcurl/opts/CURLOPT_RESOLVE.3
new file mode 100644
index 00000000..06a393a7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RESOLVE.3
@@ -0,0 +1,82 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RESOLVE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RESOLVE \- provide custom host name to IP address resolves
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESOLVE,
+ struct curl_slist *hosts);
+.SH DESCRIPTION
+Pass a pointer to a linked list of strings with host name resolve information
+to use for requests with this handle. The linked list should be a fully valid
+list of \fBstruct curl_slist\fP structs properly filled in. Use
+\fIcurl_slist_append(3)\fP to create the list and \fIcurl_slist_free_all(3)\fP
+to clean up an entire list.
+
+Each single name resolve string should be written using the format
+HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve, PORT is
+the port number of the service where libcurl wants to connect to the HOST and
+ADDRESS is the numerical IP address. If libcurl is built to support IPv6,
+ADDRESS can of course be either IPv4 or IPv6 style addressing.
+
+This option effectively pre-populates the DNS cache with entries for the
+host+port pair so redirects and everything that operations against the
+HOST+PORT will instead use your provided ADDRESS. Addresses to set with
+\fICURL_RESOLVE\fP will not time-out from the DNS cache like ordinary
+entries.
+
+You can remove names from the DNS cache again, to stop providing these fake
+resolves, by including a string in the linked list that uses the format
+\&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
+and port number must exactly match what was already added previously.
+.SH DEFAULT
+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
+.SH AVAILABILITY
+Added in 7.21.3
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_IPRESOLVE "(3), " CURLOPT_DNS_CACHE_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3
new file mode 100644
index 00000000..c25c6466
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3
@@ -0,0 +1,72 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RESUME_FROM 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RESUME_FROM \- set a point to resume transfer from
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESUME_FROM, long from);
+.SH DESCRIPTION
+Pass a long as parameter. It contains the offset in number of bytes that you
+want the transfer to start from. Set this option to 0 to make the transfer
+start from the beginning (effectively disabling resume). For FTP, set this
+option to -1 to make the transfer start from the end of the target file
+(useful to continue an interrupted upload).
+
+When doing uploads with FTP, the resume position is where in the local/source
+file libcurl should try to resume the upload from and it will then append the
+source file to the remote target file.
+
+If you need to resume a transfer beyond the 2GB limit, use
+\fICURLOPT_RESUME_FROM_LARGE(3)\fP instead.
+.SH DEFAULT
+0, not used
+.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
+.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
new file mode 100644
index 00000000..bcb30af4
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3
@@ -0,0 +1,74 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RESUME_FROM_LARGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RESUME_FROM_LARGE \- set a point to resume transfer from
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESUME_FROM_LARGE,
+ curl_off_t from);
+.SH DESCRIPTION
+Pass a curl_off_t as parameter. It contains the offset in number of bytes that
+you want the transfer to start from. Set this option to 0 to make the transfer
+start from the beginning (effectively disabling resume). For FTP, set this
+option to -1 to make the transfer start from the end of the target file
+(useful to continue an interrupted upload).
+
+When doing uploads with FTP, the resume position is where in the local/source
+file libcurl should try to resume the upload from and it will then append the
+source file to the remote target file.
+.SH DEFAULT
+0, not used
+.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
+.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_RTSP_CLIENT_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3
new file mode 100644
index 00000000..c9510168
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RTSP_CLIENT_CSEQ 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_CLIENT_CSEQ \- set the RTSP client CSEQ number
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_CLIENT_CSEQ, long cseq);
+.SH DESCRIPTION
+Pass a long to set the the CSEQ number to issue for the next RTSP
+request. Useful if the application is resuming a previously broken
+connection. The CSEQ will increment from this new number henceforth.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_RTSP_SERVER_CSEQ "(3), " CURLOPT_RTSP_REQUEST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3
new file mode 100644
index 00000000..9ab175da
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3
@@ -0,0 +1,101 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RTSP_REQUEST 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_REQUEST \- specify RTSP request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_REQUEST, long request);
+.SH DESCRIPTION
+Tell libcurl what kind of RTSP request to make. Pass one of the following RTSP
+enum values as a long in the \fIrequest\fP argument. Unless noted otherwise,
+commands require the Session ID to be initialized.
+.IP CURL_RTSPREQ_OPTIONS
+Used to retrieve the available methods of the server. The application is
+responsible for parsing and obeying the response. \fB(The session ID is not
+needed for this method.)\fP
+.IP CURL_RTSPREQ_DESCRIBE
+Used to get the low level description of a stream. The application should note
+what formats it understands in the \fI'Accept:'\fP header. Unless set
+manually, libcurl will automatically fill in \fI'Accept:
+application/sdp'\fP. Time-condition headers will be added to Describe requests
+if the \fICURLOPT_TIMECONDITION(3)\fP option is active. \fB(The session ID is
+not needed for this method)\fP
+.IP CURL_RTSPREQ_ANNOUNCE
+When sent by a client, this method changes the description of the session. For
+example, if a client is using the server to record a meeting, the client can
+use Announce to inform the server of all the meta-information about the
+session. ANNOUNCE acts like a HTTP PUT or POST just like
+\fICURL_RTSPREQ_SET_PARAMETER\fP
+.IP CURL_RTSPREQ_SETUP
+Setup is used to initialize the transport layer for the session. The
+application must set the desired Transport options for a session by using the
+\fICURLOPT_RTSP_TRANSPORT(3)\fP option prior to calling setup. If no session
+ID is currently set with \fICURLOPT_RTSP_SESSION_ID(3)\fP, libcurl will
+extract and use the session ID in the response to this request. \fB(The
+session ID is not needed for this method).\fP
+.IP CURL_RTSPREQ_PLAY
+Send a Play command to the server. Use the \fICURLOPT_RANGE(3)\fP option to
+modify the playback time (e.g. 'npt=10-15').
+.IP CURL_RTSPREQ_PAUSE
+Send a Pause command to the server. Use the \fICURLOPT_RANGE(3)\fP option with
+a single value to indicate when the stream should be halted. (e.g. npt='25')
+.IP CURL_RTSPREQ_TEARDOWN
+This command terminates an RTSP session. Simply closing a connection does not
+terminate the RTSP session since it is valid to control an RTSP session over
+different connections.
+.IP CURL_RTSPREQ_GET_PARAMETER
+Retrieve a parameter from the server. By default, libcurl will automatically
+include a \fIContent-Type: text/parameters\fP header on all non-empty requests
+unless a custom one is set. GET_PARAMETER acts just like a HTTP PUT or POST
+(see \fICURL_RTSPREQ_SET_PARAMETER\fP).
+Applications wishing to send a heartbeat message (e.g. in the presence of a
+server-specified timeout) should send use an empty GET_PARAMETER request.
+.IP CURL_RTSPREQ_SET_PARAMETER
+Set a parameter on the server. By default, libcurl will automatically include
+a \fIContent-Type: text/parameters\fP header unless a custom one is set. The
+interaction with SET_PARAMETER is much like a HTTP PUT or POST. An application
+may either use \fICURLOPT_UPLOAD(3)\fP with \fICURLOPT_READDATA(3)\fP like a
+HTTP PUT, or it may use \fICURLOPT_POSTFIELDS(3)\fP like a HTTP POST. No
+chunked transfers are allowed, so the application must set the
+\fICURLOPT_INFILESIZE(3)\fP in the former and \fICURLOPT_POSTFIELDSIZE(3)\fP
+in the latter. Also, there is no use of multi-part POSTs within RTSP.
+.IP CURL_RTSPREQ_RECORD
+Used to tell the server to record a session. Use the \fICURLOPT_RANGE(3)\fP
+option to modify the record time.
+.IP CURL_RTSPREQ_RECEIVE
+This is a special request because it does not send any data to the server. The
+application may call this function in order to receive interleaved RTP
+data. It will return after processing one read buffer of data in order to give
+the application a chance to run.
+.SH DEFAULT
+.SH PROTOCOLS
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_RTSP_SESSION_ID "(3), " CURLOPT_RTSP_STREAM_URI "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3
new file mode 100644
index 00000000..9e7cf3a5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RTSP_SERVER_CSEQ 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_SERVER_CSEQ \- set the RTSP server CSEQ number
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SERVER_CSEQ, long cseq);
+.SH DESCRIPTION
+Pass a long to set the CSEQ number to expect for the next RTSP Server->Client
+request. \fBNOTE\fP: this feature (listening for Server requests) is
+unimplemented.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_RTSP_CLIENT_CSEQ "(3), " CURLOPT_RTSP_STREAM_URI "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3
new file mode 100644
index 00000000..ec3d3877
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RTSP_SESSION_ID 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_SESSION_ID \- set RTSP session ID
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SESSION_ID, char *id);
+.SH DESCRIPTION
+Pass a char * as a parameter to set the value of the current RTSP Session ID
+for the handle. Useful for resuming an in-progress session. Once this value is
+set to any non-NULL value, libcurl will return \fICURLE_RTSP_SESSION_ERROR\fP
+if ID received from the server does not match. If unset (or set to NULL),
+libcurl will automatically set the ID the first time the server sets it in a
+response.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.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_RTSP_REQUEST "(3), " CURLOPT_RTSP_STREAM_URI "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3
new file mode 100644
index 00000000..6a10ea02
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RTSP_STREAM_URI 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_STREAM_URI \- set RTSP stream URI
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_STREAM_URI, char *URI);
+.SH DESCRIPTION
+Set the stream \fIURI\fP to operate on by passing a char * . For example, a
+single session may be controlling \fIrtsp://foo/twister/audio\fP and
+\fIrtsp://foo/twister/video\fP and the application can switch to the
+appropriate stream using this option. If unset, libcurl will default to
+operating on generic server options by passing '*' in the place of the RTSP
+Stream URI. This option is distinct from \fICURLOPT_URL(3)\fP. When working
+with RTSP, the \fICURLOPT_STREAM_URI(3)\fP indicates what URL to send to the
+server in the request header while the \fICURLOPT_URL(3)\fP indicates where to
+make the connection to. (e.g. the \fICURLOPT_URL(3)\fP for the above examples
+might be set to \fIrtsp://foo/twister\fP
+.SH DEFAULT
+'*'
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.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_RTSP_REQUEST "(3), " CURLOPT_RTSP_TRANSPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3
new file mode 100644
index 00000000..4d0a4c05
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_RTSP_TRANSPORT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_TRANSPORT \- set RTSP Transport: header
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_TRANSPORT,
+ char *transport);
+.SH DESCRIPTION
+Pass a char * to tell libcurl what to pass for the Transport: header for this
+RTSP session. This is mainly a convenience method to avoid needing to set a
+custom Transport: header for every SETUP request. The application must set a
+Transport: header before issuing a SETUP request.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.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_RTSP_REQUEST "(3), " CURLOPT_RTSP_SESSION_ID "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SASL_IR.3 b/docs/libcurl/opts/CURLOPT_SASL_IR.3
new file mode 100644
index 00000000..7714217b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SASL_IR.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SASL_IR 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SASL_IR \- enable sending initial response in first packet
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+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
+
+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
+SASL-IR CAPABILITY.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+IMAP, POP3 and SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.31.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAIL_AUTH "(3), " CURLOPT_MAIL_FROM "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SEEKDATA.3 b/docs/libcurl/opts/CURLOPT_SEEKDATA.3
new file mode 100644
index 00000000..830f099c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SEEKDATA.3
@@ -0,0 +1,43 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SEEKDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SEEKDATA \- custom pointer passed to the seek callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, void *pointer);
+.SH DESCRIPTION
+Data \fIpointer\fP to pass to the seek callback function. If you use the
+\fICURLOPT_SEEKFUNCTION(3)\fP option, this is the pointer you'll get as
+input.
+.SH DEFAULT
+If you don't set this, NULL is passed to the callback.
+.SH PROTOCOLS
+HTTP, FTP, SFTP
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.18.0
+.SH RETURN VALUE
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3
new file mode 100644
index 00000000..bf7e3045
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3
@@ -0,0 +1,76 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_SEEKFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SEEKFUNCTION \- user callback for seeking in input stream
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+/* These are the return codes for the seek callbacks */
+#define CURL_SEEKFUNC_OK 0
+#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */
+#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
+ libcurl might try other means instead */
+
+int seek_callback(void *userp, curl_off_t offset, int origin);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SEEKFUNCTION, seek_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This function gets called by libcurl to seek to a certain position in the
+input stream and can be used to fast forward a file in a resumed upload
+(instead of reading all uploaded bytes with the normal read
+function/callback). It is also called to rewind a stream when data has already
+been sent to the server and needs to be sent again. This may happen when doing
+a HTTP PUT or POST with a multi-pass authentication method, or when an
+existing HTTP connection is reused too late and the server closes the
+connection. The function shall work like fseek(3) or lseek(3) and it gets
+SEEK_SET, SEEK_CUR or SEEK_END as argument for \fIorigin\fP, although libcurl
+currently only passes SEEK_SET.
+
+\fIuserp\fP is the pointer you set with \fICURLOPT_SEEKDATA(3)\fP.
+
+The callback function must return \fICURL_SEEKFUNC_OK\fP on success,
+\fICURL_SEEKFUNC_FAIL\fP to cause the upload operation to fail or
+\fICURL_SEEKFUNC_CANTSEEK\fP to indicate that while the seek failed, libcurl
+is free to work around the problem if possible. The latter can sometimes be
+done by instead reading from the input or similar.
+
+If you forward the input arguments directly to fseek(3) or lseek(3), note that
+the data type for \fIoffset\fP is not the same as defined for curl_off_t on
+many systems!
+.SH DEFAULT
+By default, this is NULL and unused.
+.SH PROTOCOLS
+HTTP, FTP, SFTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.18.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SEEKDATA "(3), " CURLOPT_IOCTLFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3
new file mode 100644
index 00000000..116fdbe7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_SERVICE_NAME 3 "17 Jun 2015" "libcurl 7.43.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SERVICE_NAME \- SPNEGO service name
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SERVICE_NAME, char *name);
+.SH DESCRIPTION
+Pass a char * as parameter to a string holding the \fIname\fP of the
+service. The default service name is "HTTP". This option allows you to
+change it.
+..SH DEFAULT
+See above
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.43.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_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SHARE.3 b/docs/libcurl/opts/CURLOPT_SHARE.3
new file mode 100644
index 00000000..a483540e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SHARE.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SHARE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SHARE \- specify share handle to use
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SHARE, CURLSH *share);
+.SH DESCRIPTION
+Pass a \fIshare\fP handle as a parameter. The share handle must have been
+created by a previous call to \fIcurl_share_init(3)\fP. Setting this option,
+will make this curl handle use the data from the shared handle instead of
+keeping the data to itself. This enables several curl handles to share
+data. If the curl handles are used simultaneously in multiple threads, you
+\fBMUST\fP use the locking methods in the share handle. See
+\fIcurl_share_setopt(3)\fP for details.
+
+If you add a share that is set to share cookies, your easy handle will use
+that cookie cache and get the cookie engine enabled. If you unshare an object
+that was using cookies (or change to another object that doesn't share
+cookies), the easy handle will get its cookie engine disabled.
+
+Data that the share object is not set to share will be dealt with the usual
+way, as if no share was used.
+
+Set this option to NULL again to stop using that share object.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_COOKIE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3
new file mode 100644
index 00000000..61c2b5e6
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SOCKOPTDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SOCKOPTDATA \- custom pointer to pass to sockopt callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKOPTDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the sockopt callback set with \fICURLOPT_SOCKOPTFUNCTION(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.0
+.SH RETURN VALUE
+Returns \fICURLE_OK\fP if the option is supported, and \fICURLE_UNKNOWN_OPTION\fP if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SOCKOPTFUNCTION "(3), " CURLOPT_OPENSOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
new file mode 100644
index 00000000..e99fb79f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
@@ -0,0 +1,88 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SOCKOPTFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SOCKOPTFUNCTION \- set callback for setting socket options
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
+ CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
+ CURLSOCKTYPE_LAST /* never use */
+} curlsocktype;
+
+#define CURL_SOCKOPT_OK 0
+#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
+ CURLE_ABORTED_BY_CALLBACK */
+#define CURL_SOCKOPT_ALREADY_CONNECTED 2
+
+int sockopt_callback(void *clientp,
+ curl_socket_t curlfd,
+ curlsocktype purpose);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+When set, this callback function gets called by libcurl when the socket has
+been created, but before the connect call to allow applications to change
+specific socket options. The callback's \fIpurpose\fP argument identifies the
+exact purpose for this particular socket:
+
+\fICURLSOCKTYPE_IPCXN\fP for actively created connections or since 7.28.0
+\fICURLSOCKTYPE_ACCEPT\fP for FTP when the connection was setup with PORT/EPSV
+(in earlier versions these sockets weren't passed to this callback).
+
+Future versions of libcurl may support more purposes. libcurl passes the newly
+created socket descriptor to the callback in the \fIcurlfd\fP parameter so
+additional setsockopt() calls can be done at the user's discretion.
+
+The \fIclientp\fP pointer contains whatever user-defined value set using the
+\fICURLOPT_SOCKOPTDATA(3)\fP function.
+
+Return \fICURL_SOCKOPT_OK\fP from the callback on success. Return
+\fICURL_SOCKOPT_ERROR\fP from the callback function to signal an unrecoverable
+error to the library and it will close the socket and return
+\fICURLE_COULDNT_CONNECT\fP.
+Alternatively, the callback function can return
+\fICURL_SOCKOPT_ALREADY_CONNECTED\fP, to tell libcurl that the socket is
+already connected and then libcurl will not attempt to connect it. This allows
+an application to pass in an already connected socket with
+\fICURLOPT_OPENSOCKETFUNCTION(3)\fP and then have this function make libcurl
+not attempt to connect (again).
+.SH DEFAULT
+By default, this callback is NULL and unused.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.0. The \fICURL_SOCKOPT_ALREADY_CONNECTED\fP return code was
+added in 7.21.5.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SOCKOPTDATA "(3), " CURLOPT_OPENSOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3
new file mode 100644
index 00000000..cb318fca
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SOCKS5_GSSAPI_NEC 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SOCKS5_GSSAPI_NEC \- set socks proxy gssapi negotiation protection
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_NEC, long nec);
+.SH DESCRIPTION
+Pass a long set to 1 to enable or 0 to disable. As part of the gssapi
+negotiation a protection mode is negotiated. The RFC1961 says in section
+4.3/4.4 it should be protected, but the NEC reference implementation does not.
+If enabled, this option allows the unprotected exchange of the protection mode
+negotiation.
+.SH DEFAULT
+?
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+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_SOCKS5_GSSAPI_SERVICE "(3), " CURLOPT_PROXY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3
new file mode 100644
index 00000000..d18ea9f9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SOCKS5_GSSAPI_SERVICE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SOCKS5_GSSAPI_SERVICE \- proxy socks gssapi service name
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_SERVICE, char *name);
+.SH DESCRIPTION
+Pass a char * as parameter to a string holding the \fIname\fP of the
+service. The default service name for a SOCKS5 server is
+rcmd/server-fqdn. This option allows you to change it.
+.SH DEFAULT
+See above
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.4
+.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_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3
new file mode 100644
index 00000000..966f7460
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSH_AUTH_TYPES 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_AUTH_TYPES \- set desired auth types for SFTP and SCP
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_AUTH_TYPES, long bitmask);
+.SH DESCRIPTION
+Pass a long set to a bitmask consisting of one or more of
+CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST,
+CURLSSH_AUTH_KEYBOARD and CURLSSH_AUTH_AGENT.
+
+Set \fICURLSSH_AUTH_ANY\fP to let libcurl pick a suitable one. Currently
+CURLSSH_AUTH_HOST has no effect. If CURLSSH_AUTH_AGENT is used, libcurl
+attempts to connect to ssh-agent or pageant and let the agent attempt the
+authentication.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+CURLSSH_AUTH_HOST was added in 7.16.1, CURLSSH_AUTH_AGENT was added in 7.28.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 "(3), " CURLOPT_SSH_PUBLIC_KEYFILE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3
new file mode 100644
index 00000000..12e7720d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSH_HOST_PUBLIC_KEY_MD5 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 \- checksum of SSH server public key
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
+ char *md5);
+.SH DESCRIPTION
+Pass a char * pointing to a string containing 32 hexadecimal digits. The
+string should be the 128 bit MD5 checksum of the remote host's public key, and
+libcurl will reject the connection to the host unless the md5sums match.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SCP and SFTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.17.1
+.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_SSH_PUBLIC_KEYFILE "(3), " CURLOPT_SSH_AUTH_TYPES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3
new file mode 100644
index 00000000..45e7d7a9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_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
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KEYDATA, void *pointer);
+.SH DESCRIPTION
+Pass a void * as parameter. This \fIpointer\fP will be passed along verbatim
+to the callback set with \fICURLOPT_SSH_KEYFUNCTION(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.6
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSH_KEYDATA "(3), " CURLOPT_SSH_KNOWNHOSTS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3
new file mode 100644
index 00000000..4af9a3bf
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3
@@ -0,0 +1,105 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSH_KEYFUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_KEYFUNCTION \- callback for known host matching logic
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+enum curl_khstat {
+ CURLKHSTAT_FINE_ADD_TO_FILE,
+ CURLKHSTAT_FINE,
+ CURLKHSTAT_REJECT, /* reject the connection, return an error */
+ CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right
+ now so this causes a CURLE_DEFER error but
+ otherwise the connection will be left intact
+ etc */
+};
+
+enum curl_khmatch {
+ CURLKHMATCH_OK, /* match */
+ CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
+ CURLKHMATCH_MISSING, /* no matching host/key found */
+};
+
+struct curl_khkey {
+ const char *key; /* points to a zero-terminated string encoded with
+ base64 if len is zero, otherwise to the "raw"
+ data */
+ size_t len;
+ enum curl_khtype keytype;
+};
+
+int ssh_keycallback(CURL *easy,
+ const struct curl_khkey *knownkey,
+ const struct curl_khkey *foundkey,
+ enum curl_khmatch,
+ void *clientp);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KEYFUNCTION,
+ ssh_keycallback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+It gets called when the known_host matching has been done, to allow the
+application to act and decide for libcurl how to proceed. The callback will
+only be called if \fICURLOPT_SSH_KNOWNHOSTS(3)\fP is also set.
+
+This callback function gets passed the CURL handle, the key from the
+known_hosts file \fIknownkey\fP, the key from the remote site \fIfoundkey\fP,
+info from libcurl on the matching status and a custom pointer (set with
+\fICURLOPT_SSH_KEYDATA(3)\fP). It MUST return one of the following return
+codes to tell libcurl how to act:
+
+.IP CURLKHSTAT_FINE_ADD_TO_FILE
+The host+key is accepted and libcurl will append it to the known_hosts file
+before continuing with the connection. This will also add the host+key combo
+to the known_host pool kept in memory if it wasn't already present there. The
+adding of data to the file is done by completely replacing the file with a new
+copy, so the permissions of the file must allow this.
+.IP CURLKHSTAT_FINE
+The host+key is accepted libcurl will continue with the connection. This will
+also add the host+key combo to the known_host pool kept in memory if it wasn't
+already present there.
+.IP CURLKHSTAT_REJECT
+The host+key is rejected. libcurl will deny the connection to continue and it
+will be closed.
+.IP CURLKHSTAT_DEFER
+The host+key is rejected, but the SSH connection is asked to be kept alive.
+This feature could be used when the app wants to somehow return back and act
+on the host+key situation and then retry without needing the overhead of
+setting it up from scratch again.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.6
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSH_KEYDATA "(3), " CURLOPT_SSH_KNOWNHOSTS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3
new file mode 100644
index 00000000..85574ced
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSH_KNOWNHOSTS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_KNOWNHOSTS \- file name holding the SSH known hosts
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KNOWNHOSTS, char *fname);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string holding the file name of the
+known_host file to use. The known_hosts file should use the OpenSSH file
+format as supported by libssh2. If this file is specified, libcurl will only
+accept connections with hosts that are known and present in that file, with a
+matching public key. Use \fICURLOPT_SSH_KEYFUNCTION(3)\fP to alter the default
+behavior on host and key (mis)matching.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.6
+.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_SSH_AUTH_TYPES "(3), " CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3
new file mode 100644
index 00000000..f357f2c9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSH_PRIVATE_KEYFILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_PRIVATE_KEYFILE \- set private key file for SSH auth
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_PRIVATE_KEYFILE,
+ char *filename);
+.SH DESCRIPTION
+Pass a char * pointing to a \fIfilename\fP for your private key. If not used,
+libcurl defaults to \fB$HOME/.ssh/id_dsa\fP if the HOME environment variable
+is set, and just "id_dsa" in the current directory if HOME is not set.
+
+If the file is password-protected, set the password with
+\fICURLOPT_KEYPASSWD(3)\fP.
+.SH DEFAULT
+As explained above
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.1
+.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_SSH_PUBLIC_KEYFILE "(3), " CURLOPT_SSH_AUTH_TYPES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3
new file mode 100644
index 00000000..35f2a199
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSH_PUBLIC_KEYFILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_PUBLIC_KEYFILE \- set public key file for SSH auth
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_PUBLIC_KEYFILE,
+ char *filename);
+.SH DESCRIPTION
+Pass a char * pointing to a \fIfilename\fP for your public key. If not used,
+libcurl defaults to \fB$HOME/.ssh/id_dsa.pub\fP if the HOME environment
+variable is set, and just "id_dsa.pub" in the current directory if HOME is not
+set.
+
+If an empty string is passed, libcurl will pass no public key to libssh2 which
+then tries to compute it from the private key, this is known to work when
+libssh2 1.4.0+ is linked against OpenSSL.
+.SH DEFAULT
+As explained above
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+The "" trick was added in 7.26.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_SSH_PRIVATE_KEYFILE "(3), " CURLOPT_SSH_AUTH_TYPES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLCERT.3 b/docs/libcurl/opts/CURLOPT_SSLCERT.3
new file mode 100644
index 00000000..7ae54f15
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLCERT.3
@@ -0,0 +1,55 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSLCERT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLCERT \- set SSL client certificate
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERT, char *cert);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. The string should be
+the file name of your client certificate. The default format is "P12" on
+Secure Transport and "PEM" on other engines, and can be changed with
+\fICURLOPT_SSLCERTTYPE(3)\fP.
+
+With NSS or Secure Transport, this can also be the nickname of the certificate
+you wish to authenticate with as it is named in the security database. If you
+want to use a file from the current directory, please precede it with "./"
+prefix, in order to avoid confusion with a nickname.
+
+When using a client certificate, you most likely also need to provide a
+private key with \fICURLOPT_SSLKEY(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.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_SSLCERTTYPE "(3), " CURLOPT_SSLKEY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3
new file mode 100644
index 00000000..b19d5178
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSLCERTTYPE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLCERTTYPE \- specify type of the client SSL certificate
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERTTYPE, char *type);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. The string should be
+the format of your certificate. Supported formats are "PEM" and "DER", except
+with Secure Transport. OpenSSL (versions 0.9.3 and later) and Secure Transport
+(on iOS 5 or later, or OS X 10.7 or later) also support "P12" for
+PKCS#12-encoded files.
+.SH DEFAULT
+"PEM"
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled. Added in 7.9.3
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLCERT "(3), " CURLOPT_SSLKEY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE.3
new file mode 100644
index 00000000..a88a5a72
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLENGINE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSLENGINE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLENGINE \- set SSL engine identifier
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE, char *id);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used as
+the identifier for the crypto engine you want to use for your private key.
+
+If the crypto device cannot be loaded, \fICURLE_SSL_ENGINE_NOTFOUND\fP is
+returned.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLENGINE_DEFAULT "(3), " CURLOPT_SSLKEY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3
new file mode 100644
index 00000000..6570df10
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSLENGINE_DEFAULT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLENGINE_DEFAULT \- make SSL engine default
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE_DEFAULT, long val);
+.SH DESCRIPTION
+Pass a long set to 1 as parameter. Sets the actual crypto engine as the
+default for (asymmetric) crypto operations.
+
+If the crypto device cannot be set, \fICURLE_SSL_ENGINE_SETFAILED\fP is
+returned.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLENGINE "(3), " CURLOPT_SSLCERT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLKEY.3 b/docs/libcurl/opts/CURLOPT_SSLKEY.3
new file mode 100644
index 00000000..add69d89
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLKEY.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSLKEY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLKEY \- specify private keyfile for TLS and SSL client cert
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLKEY, char *keyfile);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. The string should be
+the file name of your private key. The default format is "PEM" and can be
+changed with \fICURLOPT_SSLKEYTYPE(3)\fP.
+
+(iOS and Mac OS X only) This option is ignored if curl was built against
+Secure Transport. Secure Transport expects the private key to be already
+present in the keychain or PKCS#12 file containing the certificate.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLKEYTYPE "(3), " CURLOPT_SSLCERT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3
new file mode 100644
index 00000000..d4916349
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSLKEYTYPE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLKEYTYPE \- set type of the private key file
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLKEYTYPE, char *type);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. The string should be
+the format of your private key. Supported formats are "PEM", "DER" and "ENG".
+
+The format "ENG" enables you to load the private key from a crypto engine. In
+this case \fICURLOPT_SSLKEY(3)\fP is used as an identifier passed to the
+engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE(3)\fP.
+\&"DER" format key file currently does not work because of a bug in OpenSSL.
+.SH DEFAULT
+"PEM"
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLKEY "(3), " CURLOPT_SSLCERT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLVERSION.3 b/docs/libcurl/opts/CURLOPT_SSLVERSION.3
new file mode 100644
index 00000000..a10dabd9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLVERSION.3
@@ -0,0 +1,78 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SSLVERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLVERSION \- set preferred TLS/SSL version
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLVERSION, long version);
+.SH DESCRIPTION
+Pass a long as parameter to control which version of SSL/TLS to attempt to
+use.
+
+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.
+.IP CURL_SSLVERSION_TLSv1
+TLSv1.x
+.IP CURL_SSLVERSION_SSLv2
+SSLv2
+.IP CURL_SSLVERSION_SSLv3
+SSLv3
+.IP CURL_SSLVERSION_TLSv1_0
+TLSv1.0 (Added in 7.34.0)
+.IP CURL_SSLVERSION_TLSv1_1
+TLSv1.1 (Added in 7.34.0)
+.IP CURL_SSLVERSION_TLSv1_2
+TLSv1.2 (Added in 7.34.0)
+.RE
+.SH DEFAULT
+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
+.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.
+.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_CIPHER_LIST.3 b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3
new file mode 100644
index 00000000..7e05a590
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3
@@ -0,0 +1,65 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CIPHER_LIST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_CIPHER_LIST \- specify ciphers to use for TLS
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CIPHER_LIST, char *list);
+.SH DESCRIPTION
+Pass a char *, pointing to a zero terminated string holding the list of
+ciphers to use for the SSL connection. The list must be syntactically correct,
+it consists of one or more cipher strings separated by colons. Commas or
+spaces are also acceptable separators but colons are normally used, \&!, \&-
+and \&+ can be used as operators.
+
+For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA',
+\'SHA1+DES\', 'TLSv1' and 'DEFAULT'. The default list is normally set when you
+compile OpenSSL.
+
+You'll find more details about cipher lists on this URL:
+
+ http://www.openssl.org/docs/apps/ciphers.html
+
+For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5',
+\'rsa_aes_128_sha\', etc. With NSS you don't add/remove ciphers. If one uses
+this option then all known ciphers are disabled and only those passed in are
+enabled.
+
+You'll find more details about the NSS cipher lists on this URL:
+
+ http://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives
+.SH DEFAULT
+NULL, use internal default
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLVERSION "(3), " CURLOPT_USE_SSL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3
new file mode 100644
index 00000000..977cc12d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CTX_DATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_CTX_DATA \- custom pointer passed to ssl_ctx callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_DATA, void *pointer);
+.SH DESCRIPTION
+Data \fIpointer\fP to pass to the ssl context callback set by the option
+\fICURLOPT_SSL_CTX_FUNCTION(3)\fP, this is the pointer you'll get as third
+parameter.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Other SSL
+backends not supported.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_CTX_FUNCTION "(3), " CURLOPT_SSLVERSION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3
new file mode 100644
index 00000000..e3e01707
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3
@@ -0,0 +1,71 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_CTX_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL or wolfSSL/CyaSSL
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode ssl_ctx_callback(CURL *curl, void *ssl_ctx, void *userptr);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_FUNCTION,
+ ssl_ctx_callback);
+.SH DESCRIPTION
+This option only works for libcurl powered by OpenSSL or wolfSSL/CyaSSL. If
+libcurl was built against another SSL library this functionality is absent.
+
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl just before the initialization
+of an SSL connection after having processed all other SSL related options to
+give a last chance to an application to modify the behaviour of the SSL
+initialization. The \fIssl_ctx\fP parameter is actually a pointer to the SSL
+library's \fISSL_CTX\fP. If an error is returned from the callback no attempt
+to establish a connection is made and the perform operation will return the
+callback's error code. Set the \fIuserptr\fP argument with the
+\fICURLOPT_SSL_CTX_DATA(3)\fP option.
+
+This function will get called on all new connections made to a server, during
+the SSL negotiation. The SSL_CTX pointer will be a new one every time.
+
+To use this properly, a non-trivial amount of knowledge of your SSL library
+is necessary. For example, you can use this function to call library-specific
+callbacks to add additional validation code for certificates, and even to
+change the actual URI of a HTTPS request (example used in the lib509 test
+case). See also the example section for a replacement of the key, certificate
+and trust file settings.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Other SSL
+backends not supported.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_CTX_DATA "(3), " CURLOPT_SSL_VERIFYPEER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3
new file mode 100644
index 00000000..6716f721
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_ENABLE_ALPN 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_ENABLE_ALPN \- enable ALPN
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_ALPN, long npn);
+.SH DESCRIPTION
+Pass a long as parameter, 0 or 1 where 1 is for enable and 0 for disable. This
+option enables/disables ALPN in the SSL handshake (if the SSL backend libcurl
+is built to use supports it), which can be used to negotiate http2.
+.SH DEFAULT
+1, enabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.36.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_ENABLE_NPN "(3), " CURLOPT_SSL_OPTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3
new file mode 100644
index 00000000..5db9b510
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_ENABLE_NPN 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_ENABLE_NPN \- enable NPN
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_NPN, long npn);
+.SH DESCRIPTION
+Pass a long as parameter, 0 or 1 where 1 is for enable and 0 for disable. This
+option enables/disables NPN in the SSL handshake (if the SSL backend libcurl
+is built to use supports it), which can be used to negotiate http2.
+.SH DEFAULT
+1, enabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.36.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_ENABLE_ALPN "(3), " CURLOPT_SSL_OPTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3
new file mode 100644
index 00000000..31a05e68
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_FALSESTART 3 "14 Feb 2015" "libcurl 7.41.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_FALSESTART \- enable TLS false start
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_FALSESTART, long enable);
+.SH DESCRIPTION
+Pass a long as parameter set to 1 to enable or 0 to disable.
+
+This option determines whether libcurl should use false start during the TLS
+handshake. False start is a mode where a TLS client will start sending
+application data before verifying the server's Finished message, thus saving a
+round trip when performing a full handshake.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.42.0. This option is currently only supported by the NSS and
+Secure Transport (on iOS 7.0 or later, or OS X 10.9 or later) TLS backends.
+.SH RETURN VALUE
+Returns CURLE_OK if false start is supported by the SSL backend, otherwise
+returns CURLE_NOT_BUILT_IN.
diff --git a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3
new file mode 100644
index 00000000..09bcb96c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_OPTIONS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_OPTIONS \- set SSL behavior options
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long bitmask);
+.SH DESCRIPTION
+Pass a long with a bitmask to tell libcurl about specific SSL behaviors.
+
+\fICURLSSLOPT_ALLOW_BEAST\fP is the only supported bit and by setting this the
+user will tell libcurl to not attempt to use any workarounds for a security
+flaw in the SSL3 and TLS1.0 protocols. If this option isn't used or this bit
+is set to 0, the SSL layer libcurl uses may use a work-around for this flaw
+although it might cause interoperability problems with some (older) SSL
+implementations. WARNING: avoiding this work-around lessens the security, and
+by setting this option to 1 you ask for exactly that.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.25.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLVERSION "(3), " CURLOPT_SSL_CIPHER_LIST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3
new file mode 100644
index 00000000..4baa0616
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_SESSIONID_CACHE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_SESSIONID_CACHE \- enable/disable use of the SSL session-ID cache
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_SESSIONID_CACHE,
+ long enabled);
+.SH DESCRIPTION
+Pass a long set to 0 to disable libcurl's use of SSL session-ID caching. Set
+this to 1 to enable it. By default all transfers are done using the cache
+enabled. While nothing ever should get hurt by attempting to reuse SSL
+session-IDs, there seem to be or have been broken SSL implementations in the
+wild that may require you to disable this in order for you to succeed.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+All TLS-based
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_CACHE_TIMEOUT "(3), " CURLOPT_SSLVERSION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3
new file mode 100644
index 00000000..fbf20428
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3
@@ -0,0 +1,87 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_VERIFYHOST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_VERIFYHOST \- verify the certificate's name against host
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYHOST, long verify);
+.SH DESCRIPTION
+Pass a long as parameter specifying what to \fIverify\fP.
+
+This option determines whether libcurl verifies that the server cert is for
+the server it is known as.
+
+When negotiating TLS and SSL connections, the server sends a certificate
+indicating its identity.
+
+When \fICURLOPT_SSL_VERIFYHOST(3)\fP is 2, that certificate must indicate that
+the server is the server to which you meant to connect, or the connection
+fails. Simply put, it means it has to have the same name in the certificate as
+is in the URL you operate against.
+
+Curl considers the server the intended one when the Common Name field or a
+Subject Alternate Name field in the certificate matches the host name in the
+URL to which you told Curl to connect.
+
+When the \fIverify\fP value is 1, \fIcurl_easy_setopt\fP will return an error
+and the option value will not be changed. It was previously (in 7.28.0 and
+earlier) a debug option of some sorts, but it is no longer supported due to
+frequently leading to programmer mistakes. Future versions will stop returning
+an error for 1 and just treat 1 and 2 the same.
+
+When the \fIverify\fP value is 0, the connection succeeds regardless of the
+names in the certificate. Use that ability with caution!
+
+The default value for this option is 2.
+
+This option controls checking the server's certificate's claimed identity.
+The server could be lying. To control lying, see
+\fICURLOPT_SSL_VERIFYPEER(3)\fP. If libcurl is built against NSS and
+\fICURLOPT_SSL_VERIFYPEER(3)\fP is zero, \fICURLOPT_SSL_VERIFYHOST(3)\fP is
+also set to zero and cannot be overridden.
+.SH DEFAULT
+2
+.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");
+
+ /* Set the default value: strict name check please */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, and CURLE_UNKNOWN_OPTION if not.
+
+If 1 is set as argument, \fICURLE_BAD_FUNCTION_ARGUMENT\fP is returned.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_CAINFO "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3
new file mode 100644
index 00000000..81bb5939
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3
@@ -0,0 +1,81 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_VERIFYPEER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_VERIFYPEER \- verify the peer's SSL certificate
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYPEER, long verify);
+.SH DESCRIPTION
+Pass a long as parameter to enable or disable.
+
+This option determines whether curl verifies the authenticity of the peer's
+certificate. A value of 1 means curl verifies; 0 (zero) means it doesn't.
+
+When negotiating a TLS or SSL connection, the server sends a certificate
+indicating its identity. Curl verifies whether the certificate is authentic,
+i.e. that you can trust that the server is who the certificate says it is.
+This trust is based on a chain of digital signatures, rooted in certification
+authority (CA) certificates you supply. curl uses a default bundle of CA
+certificates (the path for that is determined at build time) and you can
+specify alternate certificates with the \fICURLOPT_CAINFO(3)\fP option or the
+\fICURLOPT_CAPATH(3)\fP option.
+
+When \fICURLOPT_SSL_VERIFYPEER(3)\fP is enabled, and the verification fails to
+prove that the certificate is authentic, the connection fails. When the
+option is zero, the peer certificate verification succeeds regardless.
+
+Authenticating the certificate is not enough to be sure about the server. You
+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
+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");
+
+ /* Set the default value: strict certificate check please */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3
new file mode 100644
index 00000000..d7f011a4
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYSTATUS, long verify);
+.SH DESCRIPTION
+Pass a long as parameter set to 1 to enable or 0 to 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
+Added in 7.41.0. This option is currently only supported by the OpenSSL, 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_STDERR.3 b/docs/libcurl/opts/CURLOPT_STDERR.3
new file mode 100644
index 00000000..8ef1a32a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_STDERR.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_STDERR 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_STDERR \- redirect stderr to another stream
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STDERR, FILE *stream);
+.SH DESCRIPTION
+Pass a FILE * as parameter. Tell libcurl to use this \fIstream\fP instead of
+stderr when showing the progress meter and displaying \fICURLOPT_VERBOSE(3)\fP
+data.
+.SH DEFAULT
+stderr
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+FILE *filep = fopen("dump", "wb");
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+ curl_easy_setopt(curl, CURLOPT_STDERR, filep);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_NOPROGRESS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3
new file mode 100644
index 00000000..941cc488
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_TCP_KEEPALIVE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TCP_KEEPALIVE \- enable TCP keep-alive probing
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPALIVE, long probe);
+.SH DESCRIPTION
+Pass a long. If set to 1, TCP keepalive probes will be sent. The delay and
+frequency of these probes can be controlled by the
+\fICURLOPT_TCP_KEEPIDLE(3)\fP and \fICURLOPT_TCP_KEEPINTVL(3)\fP options,
+provided the operating system supports them. Set to 0 (default behavior) to
+disable keepalive probes
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* enable TCP keep-alive for this transfer */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
+
+ /* keep-alive idle time to 120 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
+
+ /* interval time between keep-alive probes: 60 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.25.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TCP_KEEPIDLE "(3), " CURLOPT_TCP_KEEPINTVL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3
new file mode 100644
index 00000000..d60a3dff
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3
@@ -0,0 +1,61 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_TCP_KEEPIDLE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TCP_KEEPIDLE \- set TCP keep-alive idle time wait
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPIDLE, long delay);
+.SH DESCRIPTION
+Pass a long. Sets the \fIdelay\fP, in seconds, that the operating system will
+wait while the connection is idle before sending keepalive probes. Not all
+operating systems support this option.
+.SH DEFAULT
+?
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* enable TCP keep-alive for this transfer */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
+
+ /* set keep-alive idle time to 120 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
+
+ /* interval time between keep-alive probes: 60 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.25.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TCP_KEEPALIVE "(3), " CURLOPT_TCP_KEEPINTVL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3
new file mode 100644
index 00000000..42bc0b4e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_TCP_KEEPINTVL 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TCP_KEEPINTVL \- set TCP keep-alive interval
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPINTVL, long interval);
+.SH DESCRIPTION
+Pass a long. Sets the interval, in seconds, that the operating system will
+wait between sending keepalive probes. Not all operating systems support this
+option. (Added in 7.25.0)
+.SH DEFAULT
+.SH PROTOCOLS
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* enable TCP keep-alive for this transfer */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
+
+ /* keep-alive idle time to 120 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
+
+ /* interval time between keep-alive probes: 60 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TCP_KEEPALIVE "(3), " CURLOPT_TCP_KEEPIDLE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3
new file mode 100644
index 00000000..bd135167
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_TCP_NODELAY 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TCP_NODELAY \- set the TCP_NODELAY option
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_NODELAY, long nodelay);
+.SH DESCRIPTION
+Pass a long specifying whether the TCP_NODELAY option is to be set or cleared
+(1 = set, 0 = clear). The option is cleared by default. This will have no
+effect after the connection has been established.
+
+Setting this option will disable TCP's Nagle algorithm. The purpose of this
+algorithm is to try to minimize the number of small packets on the network
+(where "small packets" means TCP segments less than the Maximum Segment Size
+(MSS) for the network).
+
+Maximizing the amount of data sent per TCP segment is good because it
+amortizes the overhead of the send. However, in some cases small segments may
+need to be sent without delay. This is less efficient than sending larger
+amounts of data at a time, and can contribute to congestion on the network if
+overdone.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_SOCKOPTFUNCTION "(3), " CURLOPT_TCP_KEEPALIVE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3
new file mode 100644
index 00000000..f5a9bc5a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_TELNETOPTIONS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TELNETOPTIONS \- custom telnet options
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TELNETOPTIONS,
+ struct curl_slist *cmds);
+.SH DESCRIPTION
+Provide a pointer to a curl_slist with variables to pass to the telnet
+negotiations. The variables should be in the format <option=value>. libcurl
+supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'. See the TELNET
+standard for details.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+TELNET
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with TELNET
+.SH RETURN VALUE
+Returns CURLE_OK if TELNET is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTPHEADER "(3), " CURLOPT_QUOTE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3
new file mode 100644
index 00000000..05bc639c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_TFTP_BLKSIZE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TFTP_BLKSIZE \- TFTP block size
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_BLKSIZE, long blocksize);
+.SH DESCRIPTION
+Specify \fIblocksize\fP to use for TFTP data transmission. Valid range as per
+RFC2348 is 8-65464 bytes. The default of 512 bytes will be used if this option
+is not specified. The specified block size will only be used pending support
+by the remote server. If the server does not return an option acknowledgement
+or returns an option acknowledgement with no blksize, the default of 512 bytes
+will be used.
+.SH DEFAULT
+512
+.SH PROTOCOLS
+TFTP
+.SH EXAMPLE
+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_MAXFILESIZE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3
new file mode 100644
index 00000000..66c34ff8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_TIMECONDITION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TIMECONDITION \- select condition for a time request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMECONDITION, long cond);
+.SH DESCRIPTION
+Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE(3)\fP time
+value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
+or \fICURL_TIMECOND_IFUNMODSINCE\fP.
+
+The last modification time of a file is not always known and in such instances
+this feature will have no effect even if the given time condition would not
+have been met. \fIcurl_easy_getinfo(3)\fP with the
+\fICURLINFO_CONDITION_UNMET\fP option can be used after a transfer to learn if
+a zero-byte successful "transfer" was due to this condition not matching.
+.SH DEFAULT
+CURL_TIMECOND_NONE (0)
+.SH PROTOCOLS
+HTTP, FTP, RTSP, and FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEVALUE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT.3
new file mode 100644
index 00000000..6440ffea
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TIMEOUT.3
@@ -0,0 +1,70 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_TIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TIMEOUT \- set maximum time the request is allowed to take
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT, long timeout);
+.SH DESCRIPTION
+Pass a long as parameter containing \fItimeout\fP - the maximum time in
+seconds that you allow the libcurl transfer operation to take. Normally, name
+lookups can take a considerable time and limiting operations to less than a
+few minutes risk aborting perfectly normal operations. This option may cause
+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,
+\fICURLOPT_LOW_SPEED_TIME(3)\fP or using \fICURLOPT_PROGRESSFUNCTION(3)\fP to
+implement your own timeout logic.
+.SH DEFAULT
+Default timeout is 0 (zero) which means it never times out during transfer.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* complete within 20 seconds */
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT_MS "(3), "
+.BR CURLOPT_CONNECTTIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3
new file mode 100644
index 00000000..3727133b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3
@@ -0,0 +1,74 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_TIMEOUT_MS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TIMEOUT_MS \- set maximum time the request is allowed to take
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT_MS, long timeout);
+.SH DESCRIPTION
+Pass a long as parameter containing \fItimeout\fP - the maximum time in
+milliseconds that you allow the libcurl transfer operation to take. Normally,
+name lookups can take a considerable time and limiting operations to less than
+a few minutes risk aborting perfectly normal operations. This option may cause
+libcurl to use the SIGALRM signal to timeout system calls.
+
+If libcurl is built to use the standard system name resolver, that portion of
+the transfer will still use full-second resolution for timeouts with a minimum
+timeout allowed of one second.
+
+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,
+\fICURLOPT_LOW_SPEED_TIME(3)\fP or using \fICURLOPT_PROGRESSFUNCTION(3)\fP to
+implement your own timeout logic.
+.SH DEFAULT
+Default timeout is 0 (zero) which means it never times out during transfer.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* complete within 20000 milliseconds */
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 20000L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT "(3), "
+.BR CURLOPT_CONNECTTIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3
new file mode 100644
index 00000000..43a3871c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_TIMEVALUE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TIMEVALUE \- set time value for conditional
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE, long val);
+.SH DESCRIPTION
+Pass a long \fIval\fP as parameter. This should be the time counted as seconds
+since 1 Jan 1970, and the time will be used in a condition as specified with
+\fICURLOPT_TIMECONDITION(3)\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP, FTP, RTSP, and FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMECONDITION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3
new file mode 100644
index 00000000..1c8697f7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_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
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_PASSWORD, char *pwd);
+.SH DESCRIPTION
+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.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.4
+.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_TLSAUTH_TYPE "(3), " CURLOPT_TLSAUTH_USERNAME "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3
new file mode 100644
index 00000000..b5cdd5bc
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_TLSAUTH_TYPE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TLSAUTH_TYPE \- set TLS authentication methods
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_TYPE, long bitmask);
+.SH DESCRIPTION
+Pass a long as parameter, which is set to a bitmask, to tell libcurl which
+authentication method(s) you want it to use for TLS authentication.
+
+.IP CURL_TLSAUTH_SRP
+TLS-SRP authentication. Secure Remote Password authentication for TLS is
+defined in RFC5054 and provides mutual authentication if both sides have a
+shared secret. To use TLS-SRP, you must also set the
+\fICURLOPT_TLSAUTH_USERNAME(3)\fP and \fICURLOPT_TLSAUTH_PASSWORD(3)\fP
+options.
+.SH DEFAULT
+CURL_TLSAUTH_NONE (0)
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+You need to build libcurl with GnuTLS or OpenSSL with TLS-SRP support for this
+to work. Added in 7.21.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TLSAUTH_USERNAME "(3), " CURLOPT_TLSAUTH_PASSWORD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3
new file mode 100644
index 00000000..c5bb2dfb
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_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
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_USERNAME, char *user);
+.SH DESCRIPTION
+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.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.4
+.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_TLSAUTH_TYPE "(3), " CURLOPT_TLSAUTH_PASSWORD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3
new file mode 100644
index 00000000..6e62413d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_TRANSFERTEXT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TRANSFERTEXT \- request a text based transfer for FTP
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFERTEXT, long text);
+.SH DESCRIPTION
+A parameter set to 1 tells the library to use ASCII mode for FTP transfers,
+instead of the default binary transfer. For win32 systems it does not set the
+stdout to binary mode. This option can be usable when transferring text data
+between systems with different views on certain characters, such as newlines
+or similar.
+
+libcurl does not do a complete ASCII conversion when doing ASCII transfers
+over FTP. This is a known limitation/flaw that nobody has rectified. libcurl
+simply sets the mode to ASCII and performs a standard transfer.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with FTP
+.SH RETURN VALUE
+Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CRLF "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3
new file mode 100644
index 00000000..7f2a11ca
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_TRANSFER_ENCODING 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TRANSFER_ENCODING \- ask for HTTP Transfer Encoding
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFER_ENCODING, long enable);
+.SH DESCRIPTION
+Pass a long set to 1 to \fIenable\fP or 0 to disable.
+
+Adds a request for compressed Transfer Encoding in the outgoing HTTP
+request. If the server supports this and so desires, it can respond with the
+HTTP response sent using a compressed Transfer-Encoding that will be
+automatically uncompressed by libcurl on reception.
+
+Transfer-Encoding differs slightly from the Content-Encoding you ask for with
+\fBCURLOPT_ACCEPT_ENCODING(3)\fP in that a Transfer-Encoding is strictly meant
+to be for the transfer and thus MUST be decoded before the data arrives in the
+client. Traditionally, Transfer-Encoding has been much less used and supported
+by both HTTP clients and HTTP servers.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.6
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_ACCEPT_ENCODING "(3), " CURLOPT_HTTP_TRANSFER_DECODING "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3
new file mode 100644
index 00000000..a659cd2c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3
@@ -0,0 +1,78 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+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_UNRESTRICTED_AUTH.3 b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3
new file mode 100644
index 00000000..68c38607
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_UNRESTRICTED_AUTH 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_UNRESTRICTED_AUTH \- send credentials to other hosts too
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UNRESTRICTED_AUTH,
+ long goahead);
+.SH DESCRIPTION
+A long parameter set to 1 tells libcurl it can continue to send authentication
+(user+password) credentials when following locations, even when hostname
+changed. This option is meaningful only when setting
+\fICURLOPT_FOLLOWLOCATION(3)\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+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_FOLLOWLOCATION "(3), " CURLOPT_USERPWD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD.3 b/docs/libcurl/opts/CURLOPT_UPLOAD.3
new file mode 100644
index 00000000..d24bd289
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_UPLOAD.3
@@ -0,0 +1,78 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_UPLOAD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_UPLOAD \- enable data upload
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UPLOAD, long upload);
+.SH DESCRIPTION
+The long parameter \fIupload\fP set to 1 tells the library to prepare for and
+perform an upload. The \fICURLOPT_READDATA(3)\fP and
+\fICURLOPT_INFILESIZE(3)\fP or \fICURLOPT_INFILESIZE_LARGE(3)\fP options are
+also interesting for uploads. If the protocol is HTTP, uploading means using
+the PUT request unless you tell libcurl otherwise.
+
+Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
+You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
+
+If you use PUT to a HTTP 1.1 server, you can upload data without knowing the
+size before starting the transfer if you use chunked encoding. You enable this
+by adding a header like "Transfer-Encoding: chunked" with
+\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you
+must specify the size.
+.SH DEFAULT
+0, default is download
+.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
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PUT "(3), " CURLOPT_READFUNCTION "(3), "
+.BR CURLOPT_INFILESIZE_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_URL.3 b/docs/libcurl/opts/CURLOPT_URL.3
new file mode 100644
index 00000000..6e4824a9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_URL.3
@@ -0,0 +1,333 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_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
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_URL, char *URL);
+.SH DESCRIPTION
+Pass in a pointer to the \fIURL\fP to work with. The parameter should be a
+char * to a zero terminated string which must be URL-encoded in the following
+format:
+
+scheme://host:port/path
+
+For a greater explanation of the format please see RFC3986.
+
+libcurl doesn't validate the syntax or use this variable until the transfer is
+issued. Even if you set a crazy value here, \fIcurl_easy_setopt(3)\fP will
+still return \fICURLE_OK\fP.
+
+If the given URL lacks the scheme (such as "http://" or "ftp://" etc) then
+libcurl will attempt to resolve the protocol based on one of the following
+given host names: HTTP, FTP, DICT, LDAP, IMAP, POP3 or SMTP
+
+Should the protocol, either that specified by the scheme or deduced by libcurl
+from the host name, not be supported by libcurl then
+\fICURLE_UNSUPPORTED_PROTOCOL\fP will be returned from either the
+\fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP functions when you
+call them. Use \fIcurl_version_info(3)\fP for detailed information of which
+protocols are supported by the build of libcurl you are using.
+
+\fICURLOPT_PROTOCOLS(3)\fP can be used to limit what protocols libcurl will
+use for this transfer, independent of what libcurl has been compiled to
+support. That may be useful if you accept the URL from an external source and
+want to limit the accessibility.
+
+\fICURLOPT_URL(3)\fP is the only option that \fBmust\fP be set before a
+transfer is started.
+
+The host part of the URL contains the address of the server that you want to
+connect to. This can be the fully qualified domain name of the server, the
+local network name of the machine on your network or the IP address of the
+server or machine represented by either an IPv4 or IPv6 address. For example:
+
+http://www.example.com/
+
+http://hostname/
+
+http://192.168.0.1/
+
+http://[2001:1890:1112:1::20]/
+
+It is also possible to specify the user name, password and any supported login
+options as part of the host, for the following protocols, when connecting to
+servers that require authentication:
+
+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
+
+smtp://user:password;options@mail.example.com
+
+At present only IMAP, POP3 and SMTP support login options as part of the host.
+For more information about the login options in URL syntax please see RFC2384,
+RFC5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in 7.31.0).
+
+The port is optional and when not specified libcurl will use the default port
+based on the determined or specified protocol: 80 for HTTP, 21 for FTP and 25
+for SMTP, etc. The following examples show how to specify the port:
+
+http://www.example.com:8080/ - This will connect to a web server using port
+8080 rather than 80.
+
+smtp://mail.example.com:587/ - This will connect to a SMTP server on the
+alternative mail port.
+
+The path part of the URL is protocol specific and whilst some examples are
+given below this list is not conclusive:
+
+.IP HTTP
+The path part of a HTTP request specifies the file to retrieve and from what
+directory. If the directory is not specified then the web server's root
+directory is used. If the file is omitted then the default document will be
+retrieved for either the directory specified or the root directory. The exact
+resource returned for each URL is entirely dependent on the server's
+configuration.
+
+http://www.example.com - This gets the main page from the web server.
+
+http://www.example.com/index.html - This returns the main page by explicitly
+requesting it.
+
+http://www.example.com/contactus/ - This returns the default document from
+the contactus directory.
+
+.IP FTP
+The path part of an FTP request specifies the file to retrieve and from what
+directory. If the file part is omitted then libcurl downloads the directory
+listing for the directory specified. If the directory is omitted then
+the directory listing for the root / home directory will be returned.
+
+ftp://ftp.example.com - This retrieves the directory listing for the root
+directory.
+
+ftp://ftp.example.com/readme.txt - This downloads the file readme.txt from the
+root directory.
+
+ftp://ftp.example.com/libcurl/readme.txt - This downloads readme.txt from the
+libcurl directory.
+
+ftp://user:password@ftp.example.com/readme.txt - This retrieves the readme.txt
+file from the user's home directory. When a username and password is
+specified, everything that is specified in the path part is relative to the
+user's home directory. To retrieve files from the root directory or a
+directory underneath the root directory then the absolute path must be
+specified by prepending an additional forward slash to the beginning of the
+path.
+
+ftp://user:password@ftp.example.com//readme.txt - This retrieves the readme.txt
+from the root directory when logging in as a specified user.
+
+.IP SMTP
+The path part of a SMTP request specifies the host name to present during
+communication with the mail server. If the path is omitted then libcurl will
+attempt to resolve the local computer's host name. However, this may not
+return the fully qualified domain name that is required by some mail servers
+and specifying this path allows you to set an alternative name, such as
+your machine's fully qualified domain name, which you might have obtained
+from an external function such as gethostname or getaddrinfo.
+
+smtp://mail.example.com - This connects to the mail server at example.com and
+sends your local computer's host name in the HELO / EHLO command.
+
+smtp://mail.example.com/client.example.com - This will send client.example.com in
+the HELO / EHLO command to the mail server at example.com.
+
+.IP POP3
+The path part of a POP3 request specifies the message ID to retrieve. If the
+ID is not specified then a list of waiting messages is returned instead.
+
+pop3://user:password@mail.example.com - This lists the available messages for
+the user
+
+pop3://user:password@mail.example.com/1 - This retrieves the first message for
+the user
+
+.IP IMAP
+The path part of an IMAP request not only specifies the mailbox to list (Added
+in 7.30.0) or select, but can also be used to check the UIDVALIDITY of the
+mailbox, to specify the UID, SECTION (Added in 7.30.0) and PARTIAL octets
+(Added in 7.37.0) of the message to fetch and to specify what messages to
+search for (Added in 7.37.0).
+
+imap://user:password@mail.example.com - Performs a top level folder list
+
+imap://user:password@mail.example.com/INBOX - Performs a folder list on the
+user's inbox
+
+imap://user:password@mail.example.com/INBOX/;UID=1 - Selects the user's inbox
+and fetches message 1
+
+imap://user:password@mail.example.com/INBOX;UIDVALIDITY=50/;UID=2 - Selects
+the user's inbox, checks the UIDVALIDITY of the mailbox is 50 and fetches
+message 2 if it is
+
+imap://user:password@mail.example.com/INBOX/;UID=3/;SECTION=TEXT - Selects the
+user's inbox and fetches the text portion of message 3
+
+imap://user:password@mail.example.com/INBOX/;UID=4/;PARTIAL=0.1024 - Selects
+the user's inbox and fetches the first 1024 octets of message 4
+
+imap://user:password@mail.example.com/INBOX?NEW - Selects the user's inbox and
+checks for NEW messages
+
+imap://user:password@mail.example.com/INBOX?SUBJECT%20shadows - Selects the
+user's inbox and searches for messages containing "shadows" in the subject
+line
+
+For more information about the individual components of an IMAP URL please
+see RFC5092.
+
+.IP SCP
+The path part of a SCP request specifies the file to retrieve and from what
+directory. The file part may not be omitted. The file is taken as an absolute
+path from the root directory on the server. To specify a path relative to the
+user's home directory on the server, prepend ~/ to the path portion. 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.
+
+scp://user@example.com/etc/issue - This specifies the file /etc/issue
+
+scp://example.com/~/my-file - This specifies the file my-file in the
+user's home directory on the server
+
+.IP SFTP
+The path part of a SFTP request specifies the file to retrieve and from what
+directory. If the file part is omitted then libcurl downloads the directory
+listing for the directory specified. If the path ends in a / then a directory
+listing is returned instead of a file. If the path is omitted entirely then
+the directory listing for the root / home directory will be returned. 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.
+
+sftp://user:password@example.com/etc/issue - This specifies the file
+/etc/issue
+
+sftp://user@example.com/~/my-file - This specifies the file my-file in the
+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
+is separated by a question mark and when that field is not required an empty
+string with the question mark separator should be included.
+
+ldap://ldap.example.com/o=My%20Organisation - This will perform a LDAP search
+with the DN as My Organisation.
+
+ldap://ldap.example.com/o=My%20Organisation?postalAddress - This will perform
+the same search but will only return postalAddress attributes.
+
+ldap://ldap.example.com/?rootDomainNamingContext - This specifies an empty DN
+and requests information about the rootDomainNamingContext attribute for an
+Active Directory server.
+
+For more information about the individual components of a LDAP URL please
+see RFC4516.
+.IP RTMP
+There's no official URL spec for RTMP so libcurl uses the URL syntax supported
+by the underlying librtmp library. It has a syntax where it wants a
+traditional URL, followed by a space and a series of space-separated
+name=value pairs.
+
+While space is not typically a "legal" letter, libcurl accepts them. When a
+user wants to pass in a '#' (hash) character it will be treated as a fragment
+and get cut off by libcurl if provided literally. You will instead have to
+escape it by providing it as backslash and its ASCII value in hexadecimal:
+"\\23".
+.SH DEFAULT
+There is no default URL. If this option isn't set, no transfer can be
+performed.
+.SH SECURITY CONCERNS
+Applications may at times find it convenient to allow users to specify URLs
+for various purposes and that string would then end up fed to this option.
+
+Getting a URL from an external untrusted party will bring reasons for several
+security concerns:
+
+If you have an application that runs as or in a server application, getting an
+unfiltered URL can easily trick your application to access a local resource
+instead of a remote. Protecting yourself against localhost accesses is very
+hard when accepting user provided URLs.
+
+Such custom URLs can also access other ports than you planned as port numbers
+are part of the regular URL format. The combination of a local host and a
+custom port number can allow external users to play tricks with your local
+services.
+
+Accepting external URLs may also use other protocols than http:// or other
+common ones. Restrict what accept with \fICURLOPT_PROTOCOLS(3)\fP.
+
+User provided URLs can also be made to point to sites that redirect further on
+(possibly to other protocols too). Consider your
+\fICURLOPT_FOLLOWLOCATION(3)\fP and \fICURLOPT_REDIR_PROTOCOLS(3)\fP settings.
+.SH PROTOCOLS
+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
+.SH AVAILABILITY
+POP3 and SMTP were 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.
+.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_USERAGENT.3 b/docs/libcurl/opts/CURLOPT_USERAGENT.3
new file mode 100644
index 00000000..4d7036d8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_USERAGENT.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_USERAGENT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_USERAGENT \- set HTTP user-agent header
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERAGENT, char *ua);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used to
+set the User-Agent: header in the HTTP request sent to the remote server. This
+can be used to fool servers or scripts. You can also set any custom header
+with \fICURLOPT_HTTPHEADER(3)\fP.
+.SH DEFAULT
+NULL, no User-Agent: header is used by default.
+.SH PROTOCOLS
+HTTP, HTTPS
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, "Dark Secret Ninja/1.0");
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+As long as HTTP is supported
+.SH RETURN VALUE
+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_REFERER "(3), " CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_USERNAME.3 b/docs/libcurl/opts/CURLOPT_USERNAME.3
new file mode 100644
index 00000000..7546f743
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_USERNAME.3
@@ -0,0 +1,71 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_USERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_USERNAME \- user name to use in authentication
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERNAME,
+ char *username);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+user name to use for the transfer.
+
+\fBCURLOPT_USERNAME(3)\fP sets the user name to be used in protocol
+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
+blank
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.1
+.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_USERPWD "(3), " CURLOPT_PASSWORD "(3), "
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_USERPWD.3 b/docs/libcurl/opts/CURLOPT_USERPWD.3
new file mode 100644
index 00000000..22e920f3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_USERPWD.3
@@ -0,0 +1,76 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_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
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERPWD, char *userpwd);
+.SH DESCRIPTION
+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 HTTP and \fICURLOPT_FOLLOWLOCATION(3)\fP, libcurl might perform
+several requests to possibly different hosts. libcurl will only send this user
+and password information to hosts using the initial host name (unless
+\fICURLOPT_UNRESTRICTED_AUTH(3)\fP is set), so if libcurl follows locations to
+other hosts it will not send the user and password to those. This is enforced
+to prevent accidental information leakage.
+
+Use \fICURLOPT_HTTPAUTH(3)\fP to specify the authentication method for HTTP
+based connections or \fICURLOPT_LOGIN_OPTIONS(3)\fP to control IMAP, POP3 and
+SMTP options.
+
+The user and password strings are not URL decoded, so there's no way to send
+in a user name containing a colon using this option. Use
+\fICURLOPT_USERNAME(3)\fP for that, or include it in the URL.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK on success or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_USERNAME "(3), " CURLOPT_PASSWORD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_USE_SSL.3 b/docs/libcurl/opts/CURLOPT_USE_SSL.3
new file mode 100644
index 00000000..348f1b0c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_USE_SSL.3
@@ -0,0 +1,69 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_USE_SSL 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_USE_SSL \- request using SSL / TLS for the transfer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USE_SSL, long level);
+.SH DESCRIPTION
+Pass a long using one of the values from below, to make libcurl use your
+desired \fIlevel\fP of SSL for the transfer.
+
+These are all protocols that start out plain text and get "upgraded" to SSL
+using the STARTTLS command.
+
+This is for enabling SSL/TLS when you use FTP, SMTP, POP3, IMAP etc.
+.IP CURLUSESSL_NONE
+Don't attempt to use SSL.
+.IP CURLUSESSL_TRY
+Try using SSL, proceed as normal otherwise.
+.IP CURLUSESSL_CONTROL
+Require SSL for the control connection or fail with \fICURLE_USE_SSL_FAILED\fP.
+.IP CURLUSESSL_ALL
+Require SSL for all communication or fail with \fICURLE_USE_SSL_FAILED\fP.
+.SH DEFAULT
+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_*
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLVERSION "(3), " CURLOPT_SSL_OPTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_VERBOSE.3 b/docs/libcurl/opts/CURLOPT_VERBOSE.3
new file mode 100644
index 00000000..732b8c41
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_VERBOSE.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_VERBOSE 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_VERBOSE \- set verbose mode on/off
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_VERBOSE, long onoff);
+.SH DESCRIPTION
+Set the \fIonoff\fP parameter to 1 to make the library display a lot of
+verbose information about its operations on this \fIhandle\fP. Very useful for
+libcurl and/or protocol debugging and understanding. The verbose information
+will be sent to stderr, or the stream set with \fICURLOPT_STDERR(3)\fP.
+
+You hardly ever want this set in production use, you will almost always want
+this when you debug/report problems.
+
+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
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
new file mode 100644
index 00000000..b567045e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
@@ -0,0 +1,87 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_WILDCARDMATCH 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_WILDCARDMATCH \- enable directory wildcard transfers
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WILDCARDMATCH, long onoff);
+.SH DESCRIPTION
+Set \fIonoff\fP to 1 if you want to transfer multiple files according to a
+file name pattern. The pattern can be specified as part of the
+\fICURLOPT_URL(3)\fP option, using an fnmatch-like pattern (Shell Pattern
+Matching) in the last part of URL (file name).
+
+By default, libcurl uses its internal wildcard matching implementation. You
+can provide your own matching function by the
+\fICURLOPT_FNMATCH_FUNCTION(3)\fP option.
+
+A brief introduction of its syntax follows:
+.RS
+.IP "* - ASTERISK"
+\&ftp://example.com/some/path/\fB*.txt\fP (for all txt's from the root
+directory)
+.RE
+.RS
+.IP "? - QUESTION MARK"
+Question mark matches any (exactly one) character.
+
+\&ftp://example.com/some/path/\fBphoto?.jpeg\fP
+.RE
+.RS
+.IP "[ - BRACKET EXPRESSION"
+The left bracket opens a bracket expression. The question mark and asterisk have
+no special meaning in a bracket expression. Each bracket expression ends by the
+right bracket and matches exactly one character. Some examples follow:
+
+\fB[a-zA-Z0\-9]\fP or \fB[f\-gF\-G]\fP \- character interval
+
+\fB[abc]\fP - character enumeration
+
+\fB[^abc]\fP or \fB[!abc]\fP - negation
+
+\fB[[:\fP\fIname\fP\fB:]]\fP class expression. Supported classes are
+\fBalnum\fP,\fBlower\fP, \fBspace\fP, \fBalpha\fP, \fBdigit\fP, \fBprint\fP,
+\fBupper\fP, \fBblank\fP, \fBgraph\fP, \fBxdigit\fP.
+
+\fB[][-!^]\fP - special case \- matches only '\-', ']', '[', '!' or '^'. These
+characters have no special purpose.
+
+\fB[\\[\\]\\\\]\fP - escape syntax. Matches '[', ']' or '\\'.
+
+Using the rules above, a file name pattern can be constructed:
+
+\&ftp://example.com/some/path/\fB[a-z[:upper:]\\\\].jpeg\fP
+.RE
+.PP
+.SH PROTOCOLS
+This feature is only supported for FTP download.
+.SH EXAMPLE
+See http://curl.haxx.se/libcurl/c/ftp-wildcard.html
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FNMATCH_FUNCTION "(3), " CURLOPT_URL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_WRITEDATA.3 b/docs/libcurl/opts/CURLOPT_WRITEDATA.3
new file mode 100644
index 00000000..0b7a5028
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_WRITEDATA.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_WRITEDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_WRITEDATA \- custom pointer passed to the write callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WRITEDATA, void *pointer);
+.SH DESCRIPTION
+A data \fIpointer\fP to pass to the write callback. If you use the
+\fICURLOPT_WRITEFUNCTION(3)\fP option, this is the pointer you'll get in that
+callback's 4th argument. If you don't use a write callback, you must make
+\fIpointer\fP a 'FILE *' (cast to 'void *') as libcurl will pass this to
+\fIfwrite(3)\fP when writing data.
+
+The internal \fICURLOPT_WRITEFUNCTION(3)\fP will write the data to the FILE *
+given with this option, or to stdout if this option hasn't been set.
+
+If you're using libcurl as a win32 DLL, you \fBMUST\fP use the
+\fICURLOPT_WRITEFUNCTION(3)\fP if you set this option or you will experience
+crashes.
+.SH DEFAULT
+By default, this is a FILE * to stdout.
+.SH PROTOCOLS
+Used for all protocols.
+.SH EXAMPLE
+A common technique is to use the write callback to store the incoming data
+into a dynamically growing allocated buffer, and then this
+\fICURLOPT_WRITEDATA(3)\fP is used to point to a struct or the buffer to store
+data in. Like in the getinmemory example:
+http://curl.haxx.se/libcurl/c/getinmemory.html
+.SH AVAILABILITY
+Available in all libcurl versions. This option was formerly known as
+\fICURLOPT_FILE\fP, the name \fICURLOPT_WRITEDATA(3)\fP was introduced in
+7.9.7.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_WRITEFUNCTION "(3), " CURLOPT_READDATA "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3
new file mode 100644
index 00000000..f5a45a3c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3
@@ -0,0 +1,81 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_WRITEFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_WRITEFUNCTION \- set callback for writing received data
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userdata);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WRITEFUNCTION, write_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl as soon as there is data
+received that needs to be saved. \fIptr\fP points to the delivered data, and
+the size of that data is \fIsize\fP multiplied with \fInmemb\fP.
+
+The callback function will be passed as much data as possible in all invokes,
+but you must not make any assumptions. It may be one byte, it may be
+thousands. The maximum amount of body data that will be passed to the write
+callback is defined in the curl.h header file: \fICURL_MAX_WRITE_SIZE\fP (the
+usual default is 16K). If \fICURLOPT_HEADER(3)\fP is enabled, which makes
+header data get passed to the write callback, you can get up to
+\fICURL_MAX_HTTP_HEADER\fP bytes of header data passed into it. This usually
+means 100K.
+
+This function may be called with zero bytes data if the transferred file is
+empty.
+
+The data passed to this function will not be zero terminated!
+
+Set the \fIuserdata\fP argument with the \fICURLOPT_WRITEDATA(3)\fP option.
+
+Your callback should return the number of bytes actually taken care of. If
+that amount differs from the amount passed to your callback function, it'll
+signal an error condition to the library. This will cause the transfer to get
+aborted and the libcurl function used will return \fICURLE_WRITE_ERROR\fP.
+
+If your callback function returns CURL_WRITEFUNC_PAUSE it will cause this
+transfer to become paused. See \fIcurl_easy_pause(3)\fP for further details.
+
+Set this option to NULL to get the internal default function used instead of
+your callback. The internal default function will write the data to the FILE *
+given with \fICURLOPT_WRITEDATA(3)\fP.
+.SH DEFAULT
+libcurl will use 'fwrite' as a callback by default.
+.SH PROTOCOLS
+For all protocols
+.SH AVAILABILITY
+Support for the CURL_WRITEFUNC_PAUSE return code was added in version 7.18.0.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH EXAMPLE
+A common technique is to use this callback to store the incoming data into a
+dynamically growing allocated buffer. Like in the getinmemory example:
+http://curl.haxx.se/libcurl/c/getinmemory.html
+.SH "SEE ALSO"
+.BR CURLOPT_WRITEDATA "(3), " CURLOPT_READFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3
new file mode 100644
index 00000000..b2c170f6
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_XFERINFODATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_XFERINFODATA \- custom pointer passed to the progress callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XFERINFODATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the progress callback set with \fICURLOPT_XFERINFOFUNCTION(3)\fP.
+
+This is an alias for \fICURLOPT_PROGRESSDATA(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/progressfunc.html
+.SH AVAILABILITY
+Added in 7.32.0
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_XFERINFOFUNCTION "(3), " CURLOPT_XFERINFOFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3
new file mode 100644
index 00000000..cad81182
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3
@@ -0,0 +1,81 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_XFERINFOFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_XFERINFOFUNCTION \- callback to progress meter function
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+int progress_callback(void *clientp,
+ curl_off_t dltotal,
+ curl_off_t dlnow,
+ curl_off_t ultotal,
+ curl_off_t ulnow);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XFERINFOFUNCTION, progress_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This function gets called by libcurl instead of its internal equivalent with a
+frequent interval. While data is being transferred it will be called very
+frequently, and during slow periods like when nothing is being transferred it
+can slow down to about one call per second.
+
+\fIclientp\fP is the pointer set with \fICURLOPT_XFERINFODATA(3)\fP, it is not
+used by libcurl but is only passed along from the application to the callback.
+
+The callback gets told how much data libcurl will transfer and has
+transferred, in number of bytes. \fIdltotal\fP is the total number of bytes
+libcurl expects to download in this transfer. \fIdlnow\fP is the number of
+bytes downloaded so far. \fIultotal\fP is the total number of bytes libcurl
+expects to upload in this transfer. \fIulnow\fP is the number of bytes
+uploaded so far.
+
+Unknown/unused argument values passed to the callback will be set to zero
+(like if you only download data, the upload size will remain 0). Many times
+the callback will be called one or more times first, before it knows the data
+sizes so a program must be made to handle that.
+
+Returning a non-zero value from this callback will cause libcurl to abort the
+transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP.
+
+If you transfer data with the multi interface, this function will not be
+called during periods of idleness unless you call the appropriate libcurl
+function that performs transfers.
+
+\fICURLOPT_NOPROGRESS(3)\fP must be set to 0 to make this function actually
+get called.
+.SH DEFAULT
+By default, libcurl has an internal progress meter. That's rarely wanted by
+users.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/progressfunc.html
+.SH AVAILABILITY
+Added in 7.32.0. This callback replaces \fICURLOPT_PROGRESSFUNCTION(3)\fP
+.SH RETURN VALUE
+Returns CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_XFERINFODATA "(3), " CURLOPT_NOPROGRESS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3
new file mode 100644
index 00000000..2644c883
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_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
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XOAUTH2_BEARER, char *token);
+.SH DESCRIPTION
+Pass a char * as parameter, which should point to the zero terminated OAuth
+2.0 Bearer Access Token for use with IMAP, POP3 and SMTP servers that support
+the OAuth 2.0 Authorization Framework.
+
+Note: The user name used to generate the Bearer Token should be supplied via
+the \fICURLOPT_USERNAME(3)\fP option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+IMAP, POP3 and SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.33.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_MAIL_AUTH "(3), " CURLOPT_USERNAME "(3), "
diff --git a/docs/libcurl/opts/Makefile.am b/docs/libcurl/opts/Makefile.am
new file mode 100644
index 00000000..5517811d
--- /dev/null
+++ b/docs/libcurl/opts/Makefile.am
@@ -0,0 +1,355 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+
+AUTOMAKE_OPTIONS = foreign no-dependencies
+
+man_MANS = CURLOPT_ACCEPT_ENCODING.3 CURLOPT_ACCEPTTIMEOUT_MS.3 \
+ CURLOPT_ADDRESS_SCOPE.3 CURLOPT_APPEND.3 CURLOPT_AUTOREFERER.3 \
+ CURLOPT_BUFFERSIZE.3 CURLOPT_CAINFO.3 CURLOPT_CAPATH.3 \
+ CURLOPT_CERTINFO.3 CURLOPT_CHUNK_BGN_FUNCTION.3 CURLOPT_CHUNK_DATA.3 \
+ CURLOPT_CHUNK_END_FUNCTION.3 CURLOPT_CLOSESOCKETDATA.3 \
+ CURLOPT_CLOSESOCKETFUNCTION.3 CURLOPT_CONNECT_ONLY.3 \
+ CURLOPT_CONNECTTIMEOUT.3 CURLOPT_CONNECTTIMEOUT_MS.3 \
+ CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 CURLOPT_CONV_FROM_UTF8_FUNCTION.3 \
+ CURLOPT_CONV_TO_NETWORK_FUNCTION.3 CURLOPT_COOKIE.3 \
+ CURLOPT_COOKIEFILE.3 CURLOPT_COOKIEJAR.3 CURLOPT_COOKIELIST.3 \
+ CURLOPT_COOKIESESSION.3 CURLOPT_COPYPOSTFIELDS.3 CURLOPT_CRLF.3 \
+ CURLOPT_CRLFILE.3 CURLOPT_CUSTOMREQUEST.3 CURLOPT_DEBUGDATA.3 \
+ CURLOPT_DEBUGFUNCTION.3 CURLOPT_DIRLISTONLY.3 \
+ CURLOPT_DNS_CACHE_TIMEOUT.3 CURLOPT_DNS_INTERFACE.3 \
+ CURLOPT_DNS_LOCAL_IP4.3 CURLOPT_DNS_LOCAL_IP6.3 CURLOPT_DNS_SERVERS.3 \
+ CURLOPT_DNS_USE_GLOBAL_CACHE.3 CURLOPT_EGDSOCKET.3 \
+ CURLOPT_ERRORBUFFER.3 CURLOPT_EXPECT_100_TIMEOUT_MS.3 \
+ CURLOPT_FAILONERROR.3 CURLOPT_FILETIME.3 CURLOPT_FNMATCH_DATA.3 \
+ CURLOPT_FNMATCH_FUNCTION.3 CURLOPT_FOLLOWLOCATION.3 \
+ CURLOPT_FORBID_REUSE.3 CURLOPT_FRESH_CONNECT.3 CURLOPT_FTP_ACCOUNT.3 \
+ CURLOPT_FTP_ALTERNATIVE_TO_USER.3 CURLOPT_FTP_CREATE_MISSING_DIRS.3 \
+ CURLOPT_FTP_FILEMETHOD.3 CURLOPT_FTPPORT.3 \
+ CURLOPT_FTP_RESPONSE_TIMEOUT.3 CURLOPT_FTP_SKIP_PASV_IP.3 \
+ CURLOPT_FTPSSLAUTH.3 CURLOPT_FTP_SSL_CCC.3 CURLOPT_FTP_USE_EPRT.3 \
+ CURLOPT_FTP_USE_EPSV.3 CURLOPT_FTP_USE_PRET.3 \
+ CURLOPT_GSSAPI_DELEGATION.3 CURLOPT_HEADER.3 CURLOPT_HEADERDATA.3 \
+ CURLOPT_HEADERFUNCTION.3 CURLOPT_HEADEROPT.3 CURLOPT_HTTP200ALIASES.3 \
+ CURLOPT_HTTPAUTH.3 CURLOPT_HTTP_CONTENT_DECODING.3 CURLOPT_HTTPGET.3 \
+ CURLOPT_HTTPHEADER.3 CURLOPT_HTTPPOST.3 CURLOPT_HTTPPROXYTUNNEL.3 \
+ CURLOPT_HTTP_TRANSFER_DECODING.3 CURLOPT_HTTP_VERSION.3 \
+ CURLOPT_IGNORE_CONTENT_LENGTH.3 CURLOPT_INFILESIZE.3 \
+ CURLOPT_INFILESIZE_LARGE.3 CURLOPT_INTERFACE.3 \
+ CURLOPT_INTERLEAVEDATA.3 CURLOPT_INTERLEAVEFUNCTION.3 \
+ CURLOPT_IOCTLDATA.3 CURLOPT_IOCTLFUNCTION.3 CURLOPT_IPRESOLVE.3 \
+ CURLOPT_ISSUERCERT.3 CURLOPT_KEYPASSWD.3 CURLOPT_KRBLEVEL.3 \
+ CURLOPT_LOCALPORT.3 CURLOPT_LOCALPORTRANGE.3 CURLOPT_LOGIN_OPTIONS.3 \
+ CURLOPT_LOW_SPEED_LIMIT.3 CURLOPT_LOW_SPEED_TIME.3 CURLOPT_MAIL_AUTH.3 \
+ CURLOPT_MAIL_FROM.3 CURLOPT_MAIL_RCPT.3 CURLOPT_MAXCONNECTS.3 \
+ CURLOPT_MAXFILESIZE.3 CURLOPT_MAXFILESIZE_LARGE.3 \
+ CURLOPT_MAX_RECV_SPEED_LARGE.3 CURLOPT_MAXREDIRS.3 \
+ CURLOPT_MAX_SEND_SPEED_LARGE.3 CURLOPT_NETRC.3 CURLOPT_NETRC_FILE.3 \
+ CURLOPT_NEW_DIRECTORY_PERMS.3 CURLOPT_NEW_FILE_PERMS.3 \
+ CURLOPT_NOBODY.3 CURLOPT_NOPROGRESS.3 CURLOPT_NOPROXY.3 \
+ CURLOPT_NOSIGNAL.3 CURLOPT_OPENSOCKETDATA.3 \
+ CURLOPT_OPENSOCKETFUNCTION.3 CURLOPT_PASSWORD.3 \
+ CURLOPT_PINNEDPUBLICKEY.3 CURLOPT_PORT.3 CURLOPT_POST.3 \
+ CURLOPT_POSTFIELDS.3 CURLOPT_POSTFIELDSIZE.3 \
+ CURLOPT_POSTFIELDSIZE_LARGE.3 CURLOPT_POSTQUOTE.3 CURLOPT_POSTREDIR.3 \
+ CURLOPT_PREQUOTE.3 CURLOPT_PRIVATE.3 CURLOPT_PROGRESSDATA.3 \
+ CURLOPT_PROGRESSFUNCTION.3 CURLOPT_PROTOCOLS.3 CURLOPT_PROXY.3 \
+ CURLOPT_PROXYAUTH.3 CURLOPT_PROXYHEADER.3 CURLOPT_PROXYPASSWORD.3 \
+ CURLOPT_PROXYPORT.3 CURLOPT_PROXY_TRANSFER_MODE.3 CURLOPT_PROXYTYPE.3 \
+ CURLOPT_PROXYUSERNAME.3 CURLOPT_PROXYUSERPWD.3 CURLOPT_PUT.3 \
+ CURLOPT_QUOTE.3 CURLOPT_RANDOM_FILE.3 CURLOPT_RANGE.3 \
+ CURLOPT_READDATA.3 CURLOPT_READFUNCTION.3 CURLOPT_REDIR_PROTOCOLS.3 \
+ CURLOPT_REFERER.3 CURLOPT_RESOLVE.3 CURLOPT_RESUME_FROM.3 \
+ CURLOPT_RESUME_FROM_LARGE.3 CURLOPT_RTSP_CLIENT_CSEQ.3 \
+ CURLOPT_RTSP_REQUEST.3 CURLOPT_RTSP_SERVER_CSEQ.3 \
+ CURLOPT_RTSP_SESSION_ID.3 CURLOPT_RTSP_STREAM_URI.3 \
+ CURLOPT_RTSP_TRANSPORT.3 CURLOPT_SASL_IR.3 CURLOPT_SEEKDATA.3 \
+ CURLOPT_SEEKFUNCTION.3 CURLOPT_SHARE.3 CURLOPT_SOCKOPTDATA.3 \
+ CURLOPT_SOCKOPTFUNCTION.3 CURLOPT_SOCKS5_GSSAPI_NEC.3 \
+ CURLOPT_SOCKS5_GSSAPI_SERVICE.3 CURLOPT_SSH_AUTH_TYPES.3 \
+ CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 CURLOPT_SSH_KEYDATA.3 \
+ CURLOPT_SSH_KEYFUNCTION.3 CURLOPT_SSH_KNOWNHOSTS.3 \
+ CURLOPT_SSH_PRIVATE_KEYFILE.3 CURLOPT_SSH_PUBLIC_KEYFILE.3 \
+ CURLOPT_SSLCERT.3 CURLOPT_SSLCERTTYPE.3 CURLOPT_SSL_CIPHER_LIST.3 \
+ CURLOPT_SSL_CTX_DATA.3 CURLOPT_SSL_CTX_FUNCTION.3 \
+ CURLOPT_SSL_ENABLE_ALPN.3 CURLOPT_SSL_ENABLE_NPN.3 CURLOPT_SSLENGINE.3 \
+ CURLOPT_SSLENGINE_DEFAULT.3 CURLOPT_SSL_FALSESTART.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_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_PATH_AS_IS.3 CURLOPT_PROXY_SERVICE_NAME.3 \
+ CURLOPT_SERVICE_NAME.3 CURLOPT_PIPEWAIT.3
+
+HTMLPAGES = CURLOPT_ACCEPT_ENCODING.html CURLOPT_ACCEPTTIMEOUT_MS.html \
+ CURLOPT_ADDRESS_SCOPE.html CURLOPT_APPEND.html \
+ CURLOPT_AUTOREFERER.html CURLOPT_BUFFERSIZE.html CURLOPT_CAINFO.html \
+ CURLOPT_CAPATH.html CURLOPT_CERTINFO.html \
+ CURLOPT_CHUNK_BGN_FUNCTION.html CURLOPT_CHUNK_DATA.html \
+ CURLOPT_CHUNK_END_FUNCTION.html CURLOPT_CLOSESOCKETDATA.html \
+ CURLOPT_CLOSESOCKETFUNCTION.html CURLOPT_CONNECT_ONLY.html \
+ CURLOPT_CONNECTTIMEOUT.html CURLOPT_CONNECTTIMEOUT_MS.html \
+ CURLOPT_CONV_FROM_NETWORK_FUNCTION.html \
+ CURLOPT_CONV_FROM_UTF8_FUNCTION.html \
+ CURLOPT_CONV_TO_NETWORK_FUNCTION.html CURLOPT_COOKIE.html \
+ CURLOPT_COOKIEFILE.html CURLOPT_COOKIEJAR.html CURLOPT_COOKIELIST.html \
+ CURLOPT_COOKIESESSION.html CURLOPT_COPYPOSTFIELDS.html \
+ CURLOPT_CRLF.html CURLOPT_CRLFILE.html CURLOPT_CUSTOMREQUEST.html \
+ CURLOPT_DEBUGDATA.html CURLOPT_DEBUGFUNCTION.html \
+ CURLOPT_DIRLISTONLY.html CURLOPT_DNS_CACHE_TIMEOUT.html \
+ CURLOPT_DNS_INTERFACE.html CURLOPT_DNS_LOCAL_IP4.html \
+ CURLOPT_DNS_LOCAL_IP6.html CURLOPT_DNS_SERVERS.html \
+ CURLOPT_DNS_USE_GLOBAL_CACHE.html CURLOPT_EGDSOCKET.html \
+ CURLOPT_ERRORBUFFER.html CURLOPT_EXPECT_100_TIMEOUT_MS.html \
+ CURLOPT_FAILONERROR.html CURLOPT_FILETIME.html \
+ CURLOPT_FNMATCH_DATA.html CURLOPT_FNMATCH_FUNCTION.html \
+ CURLOPT_FOLLOWLOCATION.html CURLOPT_FORBID_REUSE.html \
+ CURLOPT_FRESH_CONNECT.html CURLOPT_FTP_ACCOUNT.html \
+ CURLOPT_FTP_ALTERNATIVE_TO_USER.html \
+ CURLOPT_FTP_CREATE_MISSING_DIRS.html CURLOPT_FTP_FILEMETHOD.html \
+ CURLOPT_FTPPORT.html CURLOPT_FTP_RESPONSE_TIMEOUT.html \
+ CURLOPT_FTP_SKIP_PASV_IP.html CURLOPT_FTPSSLAUTH.html \
+ CURLOPT_FTP_SSL_CCC.html CURLOPT_FTP_USE_EPRT.html \
+ CURLOPT_FTP_USE_EPSV.html CURLOPT_FTP_USE_PRET.html \
+ CURLOPT_GSSAPI_DELEGATION.html CURLOPT_HEADER.html \
+ CURLOPT_HEADERDATA.html CURLOPT_HEADERFUNCTION.html \
+ CURLOPT_HEADEROPT.html CURLOPT_HTTP200ALIASES.html \
+ CURLOPT_HTTPAUTH.html CURLOPT_HTTP_CONTENT_DECODING.html \
+ CURLOPT_HTTPGET.html CURLOPT_HTTPHEADER.html CURLOPT_HTTPPOST.html \
+ CURLOPT_HTTPPROXYTUNNEL.html CURLOPT_HTTP_TRANSFER_DECODING.html \
+ CURLOPT_HTTP_VERSION.html CURLOPT_IGNORE_CONTENT_LENGTH.html \
+ CURLOPT_INFILESIZE.html CURLOPT_INFILESIZE_LARGE.html \
+ CURLOPT_INTERFACE.html CURLOPT_INTERLEAVEDATA.html \
+ CURLOPT_INTERLEAVEFUNCTION.html CURLOPT_IOCTLDATA.html \
+ CURLOPT_IOCTLFUNCTION.html CURLOPT_IPRESOLVE.html \
+ CURLOPT_ISSUERCERT.html CURLOPT_KEYPASSWD.html CURLOPT_KRBLEVEL.html \
+ CURLOPT_LOCALPORT.html CURLOPT_LOCALPORTRANGE.html \
+ CURLOPT_LOGIN_OPTIONS.html CURLOPT_LOW_SPEED_LIMIT.html \
+ CURLOPT_LOW_SPEED_TIME.html CURLOPT_MAIL_AUTH.html \
+ CURLOPT_MAIL_FROM.html CURLOPT_MAIL_RCPT.html CURLOPT_MAXCONNECTS.html \
+ CURLOPT_MAXFILESIZE.html CURLOPT_MAXFILESIZE_LARGE.html \
+ CURLOPT_MAX_RECV_SPEED_LARGE.html CURLOPT_MAXREDIRS.html \
+ CURLOPT_MAX_SEND_SPEED_LARGE.html CURLOPT_NETRC.html \
+ CURLOPT_NETRC_FILE.html CURLOPT_NEW_DIRECTORY_PERMS.html \
+ CURLOPT_NEW_FILE_PERMS.html CURLOPT_NOBODY.html \
+ CURLOPT_NOPROGRESS.html CURLOPT_NOPROXY.html CURLOPT_NOSIGNAL.html \
+ CURLOPT_OPENSOCKETDATA.html CURLOPT_OPENSOCKETFUNCTION.html \
+ CURLOPT_PASSWORD.html CURLOPT_PINNEDPUBLICKEY.html CURLOPT_PORT.html \
+ CURLOPT_POST.html CURLOPT_POSTFIELDS.html CURLOPT_POSTFIELDSIZE.html \
+ CURLOPT_POSTFIELDSIZE_LARGE.html CURLOPT_POSTQUOTE.html \
+ CURLOPT_POSTREDIR.html CURLOPT_PREQUOTE.html CURLOPT_PRIVATE.html \
+ CURLOPT_PROGRESSDATA.html CURLOPT_PROGRESSFUNCTION.html \
+ CURLOPT_PROTOCOLS.html CURLOPT_PROXY.html CURLOPT_PROXYAUTH.html \
+ CURLOPT_PROXYHEADER.html CURLOPT_PROXYPASSWORD.html \
+ CURLOPT_PROXYPORT.html CURLOPT_PROXY_TRANSFER_MODE.html \
+ CURLOPT_PROXYTYPE.html CURLOPT_PROXYUSERNAME.html \
+ CURLOPT_PROXYUSERPWD.html CURLOPT_PUT.html CURLOPT_QUOTE.html \
+ CURLOPT_RANDOM_FILE.html CURLOPT_RANGE.html CURLOPT_READDATA.html \
+ CURLOPT_READFUNCTION.html CURLOPT_REDIR_PROTOCOLS.html \
+ CURLOPT_REFERER.html CURLOPT_RESOLVE.html CURLOPT_RESUME_FROM.html \
+ CURLOPT_RESUME_FROM_LARGE.html CURLOPT_RTSP_CLIENT_CSEQ.html \
+ CURLOPT_RTSP_REQUEST.html CURLOPT_RTSP_SERVER_CSEQ.html \
+ CURLOPT_RTSP_SESSION_ID.html CURLOPT_RTSP_STREAM_URI.html \
+ CURLOPT_RTSP_TRANSPORT.html CURLOPT_SASL_IR.html CURLOPT_SEEKDATA.html \
+ CURLOPT_SEEKFUNCTION.html CURLOPT_SHARE.html CURLOPT_SOCKOPTDATA.html \
+ CURLOPT_SOCKOPTFUNCTION.html CURLOPT_SOCKS5_GSSAPI_NEC.html \
+ CURLOPT_SOCKS5_GSSAPI_SERVICE.html CURLOPT_SSH_AUTH_TYPES.html \
+ CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.html CURLOPT_SSH_KEYDATA.html \
+ CURLOPT_SSH_KEYFUNCTION.html CURLOPT_SSH_KNOWNHOSTS.html \
+ CURLOPT_SSH_PRIVATE_KEYFILE.html CURLOPT_SSH_PUBLIC_KEYFILE.html \
+ CURLOPT_SSLCERT.html CURLOPT_SSLCERTTYPE.html \
+ CURLOPT_SSL_CIPHER_LIST.html CURLOPT_SSL_CTX_DATA.html \
+ CURLOPT_SSL_CTX_FUNCTION.html CURLOPT_SSL_ENABLE_ALPN.html \
+ CURLOPT_SSL_ENABLE_NPN.html CURLOPT_SSLENGINE.html \
+ CURLOPT_SSLENGINE_DEFAULT.html CURLOPT_SSL_FALSESTART.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_TCP_KEEPIDLE.html CURLOPT_TCP_KEEPINTVL.html \
+ CURLOPT_TCP_NODELAY.html CURLOPT_TELNETOPTIONS.html \
+ CURLOPT_TFTP_BLKSIZE.html CURLOPT_TIMECONDITION.html \
+ CURLOPT_TIMEOUT.html CURLOPT_TIMEOUT_MS.html CURLOPT_TIMEVALUE.html \
+ CURLOPT_TLSAUTH_PASSWORD.html CURLOPT_TLSAUTH_TYPE.html \
+ CURLOPT_TLSAUTH_USERNAME.html CURLOPT_TRANSFER_ENCODING.html \
+ CURLOPT_TRANSFERTEXT.html CURLOPT_UNRESTRICTED_AUTH.html \
+ CURLOPT_UPLOAD.html CURLOPT_URL.html CURLOPT_USERAGENT.html \
+ CURLOPT_USERNAME.html CURLOPT_USERPWD.html CURLOPT_USE_SSL.html \
+ CURLOPT_VERBOSE.html CURLOPT_WILDCARDMATCH.html CURLOPT_WRITEDATA.html \
+ CURLOPT_WRITEFUNCTION.html CURLOPT_XFERINFODATA.html \
+ CURLOPT_XFERINFOFUNCTION.html CURLOPT_XOAUTH2_BEARER.html \
+ 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_PATH_AS_IS.html \
+ CURLOPT_PROXY_SERVICE_NAME.html CURLOPT_SERVICE_NAME.html \
+ CURLOPT_PIPEWAIT.html
+
+PDFPAGES = CURLOPT_ACCEPT_ENCODING.pdf CURLOPT_ACCEPTTIMEOUT_MS.pdf \
+ CURLOPT_ADDRESS_SCOPE.pdf CURLOPT_APPEND.pdf CURLOPT_AUTOREFERER.pdf \
+ CURLOPT_BUFFERSIZE.pdf CURLOPT_CAINFO.pdf CURLOPT_CAPATH.pdf \
+ CURLOPT_CERTINFO.pdf CURLOPT_CHUNK_BGN_FUNCTION.pdf \
+ CURLOPT_CHUNK_DATA.pdf CURLOPT_CHUNK_END_FUNCTION.pdf \
+ CURLOPT_CLOSESOCKETDATA.pdf CURLOPT_CLOSESOCKETFUNCTION.pdf \
+ CURLOPT_CONNECT_ONLY.pdf CURLOPT_CONNECTTIMEOUT.pdf \
+ CURLOPT_CONNECTTIMEOUT_MS.pdf CURLOPT_CONV_FROM_NETWORK_FUNCTION.pdf \
+ CURLOPT_CONV_FROM_UTF8_FUNCTION.pdf \
+ CURLOPT_CONV_TO_NETWORK_FUNCTION.pdf CURLOPT_COOKIE.pdf \
+ CURLOPT_COOKIEFILE.pdf CURLOPT_COOKIEJAR.pdf CURLOPT_COOKIELIST.pdf \
+ CURLOPT_COOKIESESSION.pdf CURLOPT_COPYPOSTFIELDS.pdf CURLOPT_CRLF.pdf \
+ CURLOPT_CRLFILE.pdf CURLOPT_CUSTOMREQUEST.pdf CURLOPT_DEBUGDATA.pdf \
+ CURLOPT_DEBUGFUNCTION.pdf CURLOPT_DIRLISTONLY.pdf \
+ CURLOPT_DNS_CACHE_TIMEOUT.pdf CURLOPT_DNS_INTERFACE.pdf \
+ CURLOPT_DNS_LOCAL_IP4.pdf CURLOPT_DNS_LOCAL_IP6.pdf \
+ CURLOPT_DNS_SERVERS.pdf CURLOPT_DNS_USE_GLOBAL_CACHE.pdf \
+ CURLOPT_EGDSOCKET.pdf CURLOPT_ERRORBUFFER.pdf \
+ CURLOPT_EXPECT_100_TIMEOUT_MS.pdf CURLOPT_FAILONERROR.pdf \
+ CURLOPT_FILETIME.pdf CURLOPT_FNMATCH_DATA.pdf \
+ CURLOPT_FNMATCH_FUNCTION.pdf CURLOPT_FOLLOWLOCATION.pdf \
+ CURLOPT_FORBID_REUSE.pdf CURLOPT_FRESH_CONNECT.pdf \
+ CURLOPT_FTP_ACCOUNT.pdf CURLOPT_FTP_ALTERNATIVE_TO_USER.pdf \
+ CURLOPT_FTP_CREATE_MISSING_DIRS.pdf CURLOPT_FTP_FILEMETHOD.pdf \
+ CURLOPT_FTPPORT.pdf CURLOPT_FTP_RESPONSE_TIMEOUT.pdf \
+ CURLOPT_FTP_SKIP_PASV_IP.pdf CURLOPT_FTPSSLAUTH.pdf \
+ CURLOPT_FTP_SSL_CCC.pdf CURLOPT_FTP_USE_EPRT.pdf \
+ CURLOPT_FTP_USE_EPSV.pdf CURLOPT_FTP_USE_PRET.pdf \
+ CURLOPT_GSSAPI_DELEGATION.pdf CURLOPT_HEADER.pdf \
+ CURLOPT_HEADERDATA.pdf CURLOPT_HEADERFUNCTION.pdf \
+ CURLOPT_HEADEROPT.pdf CURLOPT_HTTP200ALIASES.pdf CURLOPT_HTTPAUTH.pdf \
+ CURLOPT_HTTP_CONTENT_DECODING.pdf CURLOPT_HTTPGET.pdf \
+ CURLOPT_HTTPHEADER.pdf CURLOPT_HTTPPOST.pdf \
+ CURLOPT_HTTPPROXYTUNNEL.pdf CURLOPT_HTTP_TRANSFER_DECODING.pdf \
+ CURLOPT_HTTP_VERSION.pdf CURLOPT_IGNORE_CONTENT_LENGTH.pdf \
+ CURLOPT_INFILESIZE.pdf CURLOPT_INFILESIZE_LARGE.pdf \
+ CURLOPT_INTERFACE.pdf CURLOPT_INTERLEAVEDATA.pdf \
+ CURLOPT_INTERLEAVEFUNCTION.pdf CURLOPT_IOCTLDATA.pdf \
+ CURLOPT_IOCTLFUNCTION.pdf CURLOPT_IPRESOLVE.pdf CURLOPT_ISSUERCERT.pdf \
+ CURLOPT_KEYPASSWD.pdf CURLOPT_KRBLEVEL.pdf CURLOPT_LOCALPORT.pdf \
+ CURLOPT_LOCALPORTRANGE.pdf CURLOPT_LOGIN_OPTIONS.pdf \
+ CURLOPT_LOW_SPEED_LIMIT.pdf CURLOPT_LOW_SPEED_TIME.pdf \
+ CURLOPT_MAIL_AUTH.pdf CURLOPT_MAIL_FROM.pdf CURLOPT_MAIL_RCPT.pdf \
+ CURLOPT_MAXCONNECTS.pdf CURLOPT_MAXFILESIZE.pdf \
+ CURLOPT_MAXFILESIZE_LARGE.pdf CURLOPT_MAX_RECV_SPEED_LARGE.pdf \
+ CURLOPT_MAXREDIRS.pdf CURLOPT_MAX_SEND_SPEED_LARGE.pdf \
+ CURLOPT_NETRC.pdf CURLOPT_NETRC_FILE.pdf \
+ CURLOPT_NEW_DIRECTORY_PERMS.pdf CURLOPT_NEW_FILE_PERMS.pdf \
+ CURLOPT_NOBODY.pdf CURLOPT_NOPROGRESS.pdf CURLOPT_NOPROXY.pdf \
+ CURLOPT_NOSIGNAL.pdf CURLOPT_OPENSOCKETDATA.pdf \
+ CURLOPT_OPENSOCKETFUNCTION.pdf CURLOPT_PASSWORD.pdf \
+ CURLOPT_PINNEDPUBLICKEY.pdf CURLOPT_PORT.pdf CURLOPT_POST.pdf \
+ CURLOPT_POSTFIELDS.pdf CURLOPT_POSTFIELDSIZE.pdf \
+ CURLOPT_POSTFIELDSIZE_LARGE.pdf CURLOPT_POSTQUOTE.pdf \
+ CURLOPT_POSTREDIR.pdf CURLOPT_PREQUOTE.pdf CURLOPT_PRIVATE.pdf \
+ CURLOPT_PROGRESSDATA.pdf CURLOPT_PROGRESSFUNCTION.pdf \
+ CURLOPT_PROTOCOLS.pdf CURLOPT_PROXY.pdf CURLOPT_PROXYAUTH.pdf \
+ CURLOPT_PROXYHEADER.pdf CURLOPT_PROXYPASSWORD.pdf \
+ CURLOPT_PROXYPORT.pdf CURLOPT_PROXY_TRANSFER_MODE.pdf \
+ CURLOPT_PROXYTYPE.pdf CURLOPT_PROXYUSERNAME.pdf \
+ CURLOPT_PROXYUSERPWD.pdf CURLOPT_PUT.pdf CURLOPT_QUOTE.pdf \
+ CURLOPT_RANDOM_FILE.pdf CURLOPT_RANGE.pdf CURLOPT_READDATA.pdf \
+ CURLOPT_READFUNCTION.pdf CURLOPT_REDIR_PROTOCOLS.pdf \
+ CURLOPT_REFERER.pdf CURLOPT_RESOLVE.pdf CURLOPT_RESUME_FROM.pdf \
+ CURLOPT_RESUME_FROM_LARGE.pdf CURLOPT_RTSP_CLIENT_CSEQ.pdf \
+ CURLOPT_RTSP_REQUEST.pdf CURLOPT_RTSP_SERVER_CSEQ.pdf \
+ CURLOPT_RTSP_SESSION_ID.pdf CURLOPT_RTSP_STREAM_URI.pdf \
+ CURLOPT_RTSP_TRANSPORT.pdf CURLOPT_SASL_IR.pdf CURLOPT_SEEKDATA.pdf \
+ CURLOPT_SEEKFUNCTION.pdf CURLOPT_SHARE.pdf CURLOPT_SOCKOPTDATA.pdf \
+ CURLOPT_SOCKOPTFUNCTION.pdf CURLOPT_SOCKS5_GSSAPI_NEC.pdf \
+ CURLOPT_SOCKS5_GSSAPI_SERVICE.pdf CURLOPT_SSH_AUTH_TYPES.pdf \
+ CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.pdf CURLOPT_SSH_KEYDATA.pdf \
+ CURLOPT_SSH_KEYFUNCTION.pdf CURLOPT_SSH_KNOWNHOSTS.pdf \
+ CURLOPT_SSH_PRIVATE_KEYFILE.pdf CURLOPT_SSH_PUBLIC_KEYFILE.pdf \
+ CURLOPT_SSLCERT.pdf CURLOPT_SSLCERTTYPE.pdf \
+ CURLOPT_SSL_CIPHER_LIST.pdf CURLOPT_SSL_CTX_DATA.pdf \
+ CURLOPT_SSL_CTX_FUNCTION.pdf CURLOPT_SSL_ENABLE_ALPN.pdf \
+ CURLOPT_SSL_ENABLE_NPN.pdf CURLOPT_SSLENGINE.pdf \
+ CURLOPT_SSLENGINE_DEFAULT.pdf CURLOPT_SSL_FALSESTART.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_PATH_AS_IS.pdf \
+ CURLOPT_PROXY_SERVICE_NAME.pdf CURLOPT_SERVICE_NAME.pdf \
+ CURLOPT_PIPEWAIT.pdf
+
+CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
+
+EXTRA_DIST = $(man_MANS) $(HTMLPAGES) $(PDFPAGES)
+MAN2HTML= roffit --mandir=. < $< >$@
+
+SUFFIXES = .3 .html
+
+html: $(HTMLPAGES)
+
+.3.html:
+ $(MAN2HTML)
+
+pdf: $(PDFPAGES)
+
+.3.pdf:
+ @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
+ groff -Tps -man $< >$$foo.ps; \
+ ps2pdf $$foo.ps $@; \
+ rm $$foo.ps; \
+ echo "converted $< to $@")
+
+mancheck:
+ @cd $(top_srcdir)/docs/libcurl/opts && ls `awk -F, '!/OBSOLETE/ && /^ CINIT/ { a=substr($$1, 9); print "CURLOPT_" a ".3"}' $(top_srcdir)/include/curl/curl.h`
diff --git a/docs/libcurl/opts/template.3 b/docs/libcurl/opts/template.3
new file mode 100644
index 00000000..184e471e
--- /dev/null
+++ b/docs/libcurl/opts/template.3
@@ -0,0 +1,38 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_TEMPLATE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TEMPLATE \- [short desc]
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TEMPLATE, [argument]);
+.SH DESCRIPTION
+.SH DEFAULT
+.SH PROTOCOLS
+.SH EXAMPLE
+.SH AVAILABILITY
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions
index a02ead45..8299a517 100644
--- a/docs/libcurl/symbols-in-versions
+++ b/docs/libcurl/symbols-in-versions
@@ -17,27 +17,40 @@ 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
+CURLAUTH_GSSNEGOTIATE 7.10.6 7.38.0
+CURLAUTH_NEGOTIATE 7.38.0
+CURLAUTH_NONE 7.10.6
CURLAUTH_NTLM 7.10.6
+CURLAUTH_NTLM_WB 7.22.0
+CURLAUTH_ONLY 7.21.3
CURLCLOSEPOLICY_CALLBACK 7.7
CURLCLOSEPOLICY_LEAST_RECENTLY_USED 7.7
CURLCLOSEPOLICY_LEAST_TRAFFIC 7.7
+CURLCLOSEPOLICY_NONE 7.7
CURLCLOSEPOLICY_OLDEST 7.7
CURLCLOSEPOLICY_SLOWEST 7.7
CURLE_ABORTED_BY_CALLBACK 7.1
CURLE_AGAIN 7.18.2
+CURLE_ALREADY_COMPLETE 7.7.2
CURLE_BAD_CALLING_ORDER 7.1 7.17.0
CURLE_BAD_CONTENT_ENCODING 7.10
+CURLE_BAD_DOWNLOAD_RESUME 7.10
CURLE_BAD_FUNCTION_ARGUMENT 7.1
-CURLE_BAD_PASSWORD_ENTERED - 7.17.0
+CURLE_BAD_PASSWORD_ENTERED 7.4.2 7.17.0
+CURLE_CHUNK_FAILED 7.21.0
+CURLE_CONV_FAILED 7.15.4
+CURLE_CONV_REQD 7.15.4
CURLE_COULDNT_CONNECT 7.1
CURLE_COULDNT_RESOLVE_HOST 7.1
CURLE_COULDNT_RESOLVE_PROXY 7.1
CURLE_FAILED_INIT 7.1
CURLE_FILESIZE_EXCEEDED 7.10.8
CURLE_FILE_COULDNT_READ_FILE 7.1
+CURLE_FTP_ACCEPT_FAILED 7.24.0
+CURLE_FTP_ACCEPT_TIMEOUT 7.24.0
CURLE_FTP_ACCESS_DENIED 7.1
CURLE_FTP_BAD_DOWNLOAD_RESUME 7.1 7.1
+CURLE_FTP_BAD_FILE_LIST 7.21.0
CURLE_FTP_CANT_GET_HOST 7.1
CURLE_FTP_CANT_RECONNECT 7.1 7.17.0
CURLE_FTP_COULDNT_GET_SIZE 7.1 7.17.0
@@ -51,7 +64,7 @@ CURLE_FTP_PARTIAL_FILE 7.1 7.1
CURLE_FTP_PORT_FAILED 7.1
CURLE_FTP_PRET_FAILED 7.20.0
CURLE_FTP_QUOTE_ERROR 7.1 7.17.0
-CURLE_FTP_SSL_FAILED - 7.17.0
+CURLE_FTP_SSL_FAILED 7.11.0 7.17.0
CURLE_FTP_USER_PASSWORD_INCORRECT 7.1 7.17.0
CURLE_FTP_WEIRD_227_FORMAT 7.1
CURLE_FTP_WEIRD_PASS_REPLY 7.1
@@ -61,18 +74,23 @@ 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.12.0
+CURLE_HTTP_PORT_FAILED 7.3 7.12.0
CURLE_HTTP_POST_ERROR 7.1
CURLE_HTTP_RANGE_ERROR 7.1 7.17.0
+CURLE_HTTP_RETURNED_ERROR 7.10.3
CURLE_INTERFACE_FAILED 7.12.0
CURLE_LDAP_CANNOT_BIND 7.1
CURLE_LDAP_INVALID_URL 7.10.8
CURLE_LDAP_SEARCH_FAILED 7.1
CURLE_LIBRARY_NOT_FOUND 7.1 7.17.0
+CURLE_LOGIN_DENIED 7.13.1
CURLE_MALFORMAT_USER 7.1 7.17.0
+CURLE_NOT_BUILT_IN 7.21.5
+CURLE_NO_CONNECTION_AVAILABLE 7.30.0
CURLE_OK 7.1
-CURLE_OPERATION_TIMEDOUT 7.17.0
+CURLE_OPERATION_TIMEDOUT 7.10.2
CURLE_OPERATION_TIMEOUTED 7.1 7.17.0
CURLE_OUT_OF_MEMORY 7.1
CURLE_PARTIAL_FILE 7.1
@@ -80,50 +98,95 @@ CURLE_PEER_FAILED_VERIFICATION 7.17.1
CURLE_QUOTE_ERROR 7.17.0
CURLE_RANGE_ERROR 7.17.0
CURLE_READ_ERROR 7.1
-CURLE_RECV_ERROR 7.13.0
+CURLE_RECV_ERROR 7.10
CURLE_REMOTE_ACCESS_DENIED 7.17.0
CURLE_REMOTE_DISK_FULL 7.17.0
+CURLE_REMOTE_FILE_EXISTS 7.17.0
+CURLE_REMOTE_FILE_NOT_FOUND 7.16.1
CURLE_RTSP_CSEQ_ERROR 7.20.0
CURLE_RTSP_SESSION_ERROR 7.20.0
-CURLE_SEND_ERROR 7.13.0
-CURLE_SHARE_IN_USE - 7.17.0
+CURLE_SEND_ERROR 7.10
+CURLE_SEND_FAIL_REWIND 7.12.3
+CURLE_SHARE_IN_USE 7.9.6 7.17.0
CURLE_SSH 7.16.1
CURLE_SSL_CACERT 7.10
+CURLE_SSL_CACERT_BADFILE 7.16.0
CURLE_SSL_CERTPROBLEM 7.10
CURLE_SSL_CIPHER 7.10
CURLE_SSL_CONNECT_ERROR 7.1
CURLE_SSL_CRL_BADFILE 7.19.0
-CURLE_SSL_ENGINE_INITFAILED 7.13.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.17.1
+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
CURLE_TFTP_EXISTS 7.15.0 7.17.0
CURLE_TFTP_ILLEGAL 7.15.0
CURLE_TFTP_NOSUCHUSER 7.15.0
+CURLE_TFTP_NOTFOUND 7.15.0
+CURLE_TFTP_PERM 7.15.0
CURLE_TFTP_UNKNOWNID 7.15.0
CURLE_TOO_MANY_REDIRECTS 7.5
+CURLE_UNKNOWN_OPTION 7.21.5
CURLE_UNKNOWN_TELNET_OPTION 7.7
CURLE_UNSUPPORTED_PROTOCOL 7.1
+CURLE_UPLOAD_FAILED 7.16.3
CURLE_URL_MALFORMAT 7.1
CURLE_URL_MALFORMAT_USER 7.1 7.17.0
CURLE_USE_SSL_FAILED 7.17.0
CURLE_WRITE_ERROR 7.1
+CURLFILETYPE_DEVICE_BLOCK 7.21.0
+CURLFILETYPE_DEVICE_CHAR 7.21.0
+CURLFILETYPE_DIRECTORY 7.21.0
+CURLFILETYPE_DOOR 7.21.0
+CURLFILETYPE_FILE 7.21.0
+CURLFILETYPE_NAMEDPIPE 7.21.0
+CURLFILETYPE_SOCKET 7.21.0
+CURLFILETYPE_SYMLINK 7.21.0
+CURLFILETYPE_UNKNOWN 7.21.0
+CURLFINFOFLAG_KNOWN_FILENAME 7.21.0
+CURLFINFOFLAG_KNOWN_FILETYPE 7.21.0
+CURLFINFOFLAG_KNOWN_GID 7.21.0
+CURLFINFOFLAG_KNOWN_HLINKCOUNT 7.21.0
+CURLFINFOFLAG_KNOWN_PERM 7.21.0
+CURLFINFOFLAG_KNOWN_SIZE 7.21.0
+CURLFINFOFLAG_KNOWN_TIME 7.21.0
+CURLFINFOFLAG_KNOWN_UID 7.21.0
+CURLFORM_ARRAY 7.9.1
+CURLFORM_ARRAY_END 7.9.1 7.9.5 7.9.6
+CURLFORM_ARRAY_START 7.9.1 7.9.5 7.9.6
+CURLFORM_BUFFER 7.9.8
+CURLFORM_BUFFERLENGTH 7.9.8
+CURLFORM_BUFFERPTR 7.9.8
+CURLFORM_CONTENTHEADER 7.9.3
+CURLFORM_CONTENTSLENGTH 7.9
+CURLFORM_CONTENTTYPE 7.9
+CURLFORM_COPYCONTENTS 7.9
+CURLFORM_COPYNAME 7.9
+CURLFORM_END 7.9
+CURLFORM_FILE 7.9
+CURLFORM_FILECONTENT 7.9.1
+CURLFORM_FILENAME 7.9.6
+CURLFORM_NAMELENGTH 7.9
+CURLFORM_NOTHING 7.9
+CURLFORM_PTRCONTENTS 7.9
+CURLFORM_PTRNAME 7.9
+CURLFORM_STREAM 7.18.2
CURLFTPAUTH_DEFAULT 7.12.2
-CURLFTPAUTH_DEFAULT 7.12.2
-CURLFTPAUTH_SSL 7.12.2
CURLFTPAUTH_SSL 7.12.2
CURLFTPAUTH_TLS 7.12.2
-CURLFTPAUTH_TLS 7.12.2
-CURLFTPMETHOD_MULTICWD 7.15.1
-CURLFTPMETHOD_NOCWD 7.15.1
-CURLFTPMETHOD_SINGLECWD 7.15.1
-CURLFTPSSL_ALL - 7.17.0
-CURLFTPSSL_CCC_ACTIVE 7.16.1
-CURLFTPSSL_CCC_NONE 7.16.1
+CURLFTPMETHOD_DEFAULT 7.15.3
+CURLFTPMETHOD_MULTICWD 7.15.3
+CURLFTPMETHOD_NOCWD 7.15.3
+CURLFTPMETHOD_SINGLECWD 7.15.3
+CURLFTPSSL_ALL 7.11.0 7.17.0
+CURLFTPSSL_CCC_ACTIVE 7.16.2
+CURLFTPSSL_CCC_NONE 7.16.2
CURLFTPSSL_CCC_PASSIVE 7.16.1
CURLFTPSSL_CONTROL 7.11.0 7.17.0
CURLFTPSSL_NONE 7.11.0 7.17.0
@@ -131,6 +194,11 @@ CURLFTPSSL_TRY 7.11.0 7.17.0
CURLFTP_CREATE_DIR 7.19.4
CURLFTP_CREATE_DIR_NONE 7.19.4
CURLFTP_CREATE_DIR_RETRY 7.19.4
+CURLGSSAPI_DELEGATION_FLAG 7.22.0
+CURLGSSAPI_DELEGATION_NONE 7.22.0
+CURLGSSAPI_DELEGATION_POLICY_FLAG 7.22.0
+CURLHEADER_SEPARATE 7.37.0
+CURLHEADER_UNIFIED 7.37.0
CURLINFO_APPCONNECT_TIME 7.19.0
CURLINFO_CERTINFO 7.19.1
CURLINFO_CONDITION_UNMET 7.19.4
@@ -141,7 +209,9 @@ CURLINFO_CONTENT_TYPE 7.9.4
CURLINFO_COOKIELIST 7.14.1
CURLINFO_DATA_IN 7.9.6
CURLINFO_DATA_OUT 7.9.6
-CURLINFO_EFFECTIVE_URL 7.3
+CURLINFO_DOUBLE 7.4.1
+CURLINFO_EFFECTIVE_URL 7.4
+CURLINFO_END 7.9.6
CURLINFO_FILETIME 7.5
CURLINFO_FTP_ENTRY_PATH 7.15.4
CURLINFO_HEADER_IN 7.9.6
@@ -150,42 +220,94 @@ CURLINFO_HEADER_SIZE 7.4.1
CURLINFO_HTTPAUTH_AVAIL 7.10.8
CURLINFO_HTTP_CODE 7.4.1 7.10.8
CURLINFO_HTTP_CONNECTCODE 7.10.7
+CURLINFO_LASTONE 7.4.1
CURLINFO_LASTSOCKET 7.15.2
CURLINFO_LOCAL_IP 7.21.0
CURLINFO_LOCAL_PORT 7.21.0
+CURLINFO_LONG 7.4.1
+CURLINFO_MASK 7.4.1
CURLINFO_NAMELOOKUP_TIME 7.4.1
+CURLINFO_NONE 7.4.1
CURLINFO_NUM_CONNECTS 7.12.3
CURLINFO_OS_ERRNO 7.12.2
CURLINFO_PRETRANSFER_TIME 7.4.1
CURLINFO_PRIMARY_IP 7.19.0
CURLINFO_PRIMARY_PORT 7.21.0
CURLINFO_PRIVATE 7.10.3
-CURLINFO_PRIVATE 7.10.3
CURLINFO_PROXYAUTH_AVAIL 7.10.8
CURLINFO_REDIRECT_COUNT 7.9.7
CURLINFO_REDIRECT_TIME 7.9.7
CURLINFO_REDIRECT_URL 7.18.2
CURLINFO_REQUEST_SIZE 7.4.1
CURLINFO_RESPONSE_CODE 7.10.8
+CURLINFO_RTSP_CLIENT_CSEQ 7.20.0
+CURLINFO_RTSP_CSEQ_RECV 7.20.0
+CURLINFO_RTSP_SERVER_CSEQ 7.20.0
+CURLINFO_RTSP_SESSION_ID 7.20.0
CURLINFO_SIZE_DOWNLOAD 7.4.1
CURLINFO_SIZE_UPLOAD 7.4.1
+CURLINFO_SLIST 7.12.3
CURLINFO_SPEED_DOWNLOAD 7.4.1
CURLINFO_SPEED_UPLOAD 7.4.1
+CURLINFO_SSL_DATA_IN 7.12.1
+CURLINFO_SSL_DATA_OUT 7.12.1
CURLINFO_SSL_ENGINES 7.12.3
CURLINFO_SSL_VERIFYRESULT 7.5
CURLINFO_STARTTRANSFER_TIME 7.9.2
+CURLINFO_STRING 7.4.1
CURLINFO_TEXT 7.9.6
+CURLINFO_TLS_SESSION 7.34.0
CURLINFO_TOTAL_TIME 7.4.1
+CURLINFO_TYPEMASK 7.4.1
+CURLIOCMD_NOP 7.12.3
+CURLIOCMD_RESTARTREAD 7.12.3
+CURLIOE_FAILRESTART 7.12.3
+CURLIOE_OK 7.12.3
+CURLIOE_UNKNOWNCMD 7.12.3
+CURLKHMATCH_MISMATCH 7.19.6
+CURLKHMATCH_MISSING 7.19.6
+CURLKHMATCH_OK 7.19.6
+CURLKHSTAT_DEFER 7.19.6
+CURLKHSTAT_FINE 7.19.6
+CURLKHSTAT_FINE_ADD_TO_FILE 7.19.6
+CURLKHSTAT_REJECT 7.19.6
+CURLKHTYPE_DSS 7.19.6
+CURLKHTYPE_RSA 7.19.6
+CURLKHTYPE_RSA1 7.19.6
+CURLKHTYPE_UNKNOWN 7.19.6
+CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 7.30.0
+CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 7.30.0
+CURLMOPT_MAXCONNECTS 7.16.3
+CURLMOPT_MAX_HOST_CONNECTIONS 7.30.0
+CURLMOPT_MAX_PIPELINE_LENGTH 7.30.0
+CURLMOPT_MAX_TOTAL_CONNECTIONS 7.30.0
+CURLMOPT_PIPELINING 7.16.0
+CURLMOPT_PIPELINING_SERVER_BL 7.30.0
+CURLMOPT_PIPELINING_SITE_BL 7.30.0
+CURLMOPT_SOCKETDATA 7.15.4
+CURLMOPT_SOCKETFUNCTION 7.15.4
+CURLMOPT_TIMERDATA 7.16.0
+CURLMOPT_TIMERFUNCTION 7.16.0
CURLMSG_DONE 7.9.6
+CURLMSG_NONE 7.9.6
+CURLM_ADDED_ALREADY 7.32.1
CURLM_BAD_EASY_HANDLE 7.9.6
CURLM_BAD_HANDLE 7.9.6
+CURLM_BAD_SOCKET 7.15.4
CURLM_CALL_MULTI_PERFORM 7.9.6
CURLM_CALL_MULTI_SOCKET 7.15.5
CURLM_INTERNAL_ERROR 7.9.6
CURLM_OK 7.9.6
CURLM_OUT_OF_MEMORY 7.9.6
+CURLM_UNKNOWN_OPTION 7.15.4
+CURLOPTTYPE_FUNCTIONPOINT 7.1
+CURLOPTTYPE_LONG 7.1
+CURLOPTTYPE_OBJECTPOINT 7.1
+CURLOPTTYPE_OFF_T 7.11.0
+CURLOPT_ACCEPTTIMEOUT_MS 7.24.0
+CURLOPT_ACCEPT_ENCODING 7.21.6
CURLOPT_ADDRESS_SCOPE 7.19.0
-CURLOPT_APPEND 7.16.4
+CURLOPT_APPEND 7.17.0
CURLOPT_AUTOREFERER 7.1
CURLOPT_BUFFERSIZE 7.10
CURLOPT_CAINFO 7.4.2
@@ -194,8 +316,10 @@ CURLOPT_CERTINFO 7.19.1
CURLOPT_CHUNK_BGN_FUNCTION 7.21.0
CURLOPT_CHUNK_DATA 7.21.0
CURLOPT_CHUNK_END_FUNCTION 7.21.0
-CURLOPT_CLOSEFUNCTION 7.7 7.11.1 7.15.4
+CURLOPT_CLOSEFUNCTION 7.7 7.11.1 7.15.5
CURLOPT_CLOSEPOLICY 7.7 7.16.1
+CURLOPT_CLOSESOCKETDATA 7.21.7
+CURLOPT_CLOSESOCKETFUNCTION 7.21.7
CURLOPT_CONNECTTIMEOUT 7.7
CURLOPT_CONNECTTIMEOUT_MS 7.16.2
CURLOPT_CONNECT_ONLY 7.15.2
@@ -205,7 +329,7 @@ CURLOPT_CONV_TO_NETWORK_FUNCTION 7.15.4
CURLOPT_COOKIE 7.1
CURLOPT_COOKIEFILE 7.1
CURLOPT_COOKIEJAR 7.9
-CURLOPT_COOKIELIST 7.17.1
+CURLOPT_COOKIELIST 7.14.1
CURLOPT_COOKIESESSION 7.9.7
CURLOPT_COPYPOSTFIELDS 7.17.1
CURLOPT_CRLF 7.1
@@ -213,27 +337,31 @@ CURLOPT_CRLFILE 7.19.0
CURLOPT_CUSTOMREQUEST 7.1
CURLOPT_DEBUGDATA 7.9.6
CURLOPT_DEBUGFUNCTION 7.9.6
-CURLOPT_DIRLISTONLY 7.16.4
+CURLOPT_DIRLISTONLY 7.17.0
CURLOPT_DNS_CACHE_TIMEOUT 7.9.3
+CURLOPT_DNS_INTERFACE 7.33.0
+CURLOPT_DNS_LOCAL_IP4 7.33.0
+CURLOPT_DNS_LOCAL_IP6 7.33.0
+CURLOPT_DNS_SERVERS 7.24.0
CURLOPT_DNS_USE_GLOBAL_CACHE 7.9.3 7.11.1
CURLOPT_EGDSOCKET 7.7
-CURLOPT_ENCODING 7.12.2
+CURLOPT_ENCODING 7.10
CURLOPT_ERRORBUFFER 7.1
+CURLOPT_EXPECT_100_TIMEOUT_MS 7.36.0
CURLOPT_FAILONERROR 7.1
CURLOPT_FILE 7.1 7.9.7
CURLOPT_FILETIME 7.5
-CURLOPT_FLAGS 7.1 - 7.9.2
CURLOPT_FNMATCH_DATA 7.21.0
CURLOPT_FNMATCH_FUNCTION 7.21.0
CURLOPT_FOLLOWLOCATION 7.1
CURLOPT_FORBID_REUSE 7.7
CURLOPT_FRESH_CONNECT 7.7
CURLOPT_FTPAPPEND 7.1 7.16.4
-CURLOPT_FTPASCII 7.1 7.11.1 7.15.4
+CURLOPT_FTPASCII 7.1 7.11.1 7.15.5
CURLOPT_FTPLISTONLY 7.1 7.16.4
CURLOPT_FTPPORT 7.1
CURLOPT_FTPSSLAUTH 7.12.2
-CURLOPT_FTP_ACCOUNT 7.13.1
+CURLOPT_FTP_ACCOUNT 7.13.0
CURLOPT_FTP_ALTERNATIVE_TO_USER 7.15.5
CURLOPT_FTP_CREATE_MISSING_DIRS 7.10.7
CURLOPT_FTP_FILEMETHOD 7.15.1
@@ -244,16 +372,18 @@ CURLOPT_FTP_SSL_CCC 7.16.1
CURLOPT_FTP_USE_EPRT 7.10.5
CURLOPT_FTP_USE_EPSV 7.9.2
CURLOPT_FTP_USE_PRET 7.20.0
+CURLOPT_GSSAPI_DELEGATION 7.22.0
CURLOPT_HEADER 7.1
CURLOPT_HEADERDATA 7.10
CURLOPT_HEADERFUNCTION 7.7.2
+CURLOPT_HEADEROPT 7.37.0
CURLOPT_HTTP200ALIASES 7.10.3
CURLOPT_HTTPAUTH 7.10.6
CURLOPT_HTTPGET 7.8.1
CURLOPT_HTTPHEADER 7.1
CURLOPT_HTTPPOST 7.1
CURLOPT_HTTPPROXYTUNNEL 7.3
-CURLOPT_HTTPREQUEST 7.1 - 7.15.4
+CURLOPT_HTTPREQUEST 7.1 - 7.15.5
CURLOPT_HTTP_CONTENT_DECODING 7.16.2
CURLOPT_HTTP_TRANSFER_DECODING 7.16.2
CURLOPT_HTTP_VERSION 7.9.1
@@ -268,13 +398,15 @@ CURLOPT_IOCTLDATA 7.12.3
CURLOPT_IOCTLFUNCTION 7.12.3
CURLOPT_IPRESOLVE 7.10.8
CURLOPT_ISSUERCERT 7.19.0
-CURLOPT_KEYPASSWD - 7.17.0
+CURLOPT_KEYPASSWD 7.17.0
CURLOPT_KRB4LEVEL 7.3 7.17.0
-CURLOPT_KRBLEVEL 7.17.0
+CURLOPT_KRBLEVEL 7.16.4
CURLOPT_LOCALPORT 7.15.2
CURLOPT_LOCALPORTRANGE 7.15.2
+CURLOPT_LOGIN_OPTIONS 7.34.0
CURLOPT_LOW_SPEED_LIMIT 7.1
CURLOPT_LOW_SPEED_TIME 7.1
+CURLOPT_MAIL_AUTH 7.25.0
CURLOPT_MAIL_FROM 7.20.0
CURLOPT_MAIL_RCPT 7.20.0
CURLOPT_MAXCONNECTS 7.7
@@ -283,7 +415,7 @@ CURLOPT_MAXFILESIZE_LARGE 7.11.0
CURLOPT_MAXREDIRS 7.5
CURLOPT_MAX_RECV_SPEED_LARGE 7.15.5
CURLOPT_MAX_SEND_SPEED_LARGE 7.15.5
-CURLOPT_MUTE 7.1 7.8 7.15.4
+CURLOPT_MUTE 7.1 7.8 7.15.5
CURLOPT_NETRC 7.1
CURLOPT_NETRC_FILE 7.11.0
CURLOPT_NEW_DIRECTORY_PERMS 7.16.4
@@ -292,12 +424,16 @@ CURLOPT_NOBODY 7.1
CURLOPT_NOPROGRESS 7.1
CURLOPT_NOPROXY 7.19.4
CURLOPT_NOSIGNAL 7.10
+CURLOPT_NOTHING 7.1.1 7.11.1 7.11.0
CURLOPT_OPENSOCKETDATA 7.17.1
CURLOPT_OPENSOCKETFUNCTION 7.17.1
-CURLOPT_PASSWDDATA 7.1 7.11.1 7.15.4
-CURLOPT_PASSWDFUNCTION 7.1 7.11.1 7.15.4
+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_POST 7.12.1 - 7.13.0
+CURLOPT_PASV_HOST 7.12.1 7.16.0 7.15.5
+CURLOPT_PATH_AS_IS 7.42.0
+CURLOPT_PINNEDPUBLICKEY 7.39.0
+CURLOPT_PIPEWAIT 7.43.0
CURLOPT_PORT 7.1
CURLOPT_POST 7.1
CURLOPT_POST301 7.17.1 7.19.1
@@ -309,16 +445,17 @@ CURLOPT_POSTREDIR 7.19.1
CURLOPT_PREQUOTE 7.9.5
CURLOPT_PRIVATE 7.10.3
CURLOPT_PROGRESSDATA 7.1
-CURLOPT_PROGRESSFUNCTION 7.1
-CURLOPT_PROGRESSMODE 7.1 - 7.9.2
+CURLOPT_PROGRESSFUNCTION 7.1 7.32.0
CURLOPT_PROTOCOLS 7.19.4
CURLOPT_PROXY 7.1
CURLOPT_PROXYAUTH 7.10.7
+CURLOPT_PROXYHEADER 7.37.0
CURLOPT_PROXYPASSWORD 7.19.1
CURLOPT_PROXYPORT 7.1
CURLOPT_PROXYTYPE 7.10
CURLOPT_PROXYUSERNAME 7.19.1
CURLOPT_PROXYUSERPWD 7.1
+CURLOPT_PROXY_SERVICE_NAME 7.43.0
CURLOPT_PROXY_TRANSFER_MODE 7.18.0
CURLOPT_PUT 7.1
CURLOPT_QUOTE 7.1
@@ -328,58 +465,78 @@ CURLOPT_READDATA 7.9.7
CURLOPT_READFUNCTION 7.1
CURLOPT_REDIR_PROTOCOLS 7.19.4
CURLOPT_REFERER 7.1
+CURLOPT_RESOLVE 7.21.3
CURLOPT_RESUME_FROM 7.1
CURLOPT_RESUME_FROM_LARGE 7.11.0
+CURLOPT_RTSPHEADER 7.20.0
CURLOPT_RTSP_CLIENT_CSEQ 7.20.0
CURLOPT_RTSP_REQUEST 7.20.0
CURLOPT_RTSP_SERVER_CSEQ 7.20.0
CURLOPT_RTSP_SESSION_ID 7.20.0
CURLOPT_RTSP_STREAM_URI 7.20.0
CURLOPT_RTSP_TRANSPORT 7.20.0
-CURLOPT_SEEKDATA 7.18.1
-CURLOPT_SEEKFUNCTION 7.18.1
+CURLOPT_SASL_IR 7.31.0
+CURLOPT_SEEKDATA 7.18.0
+CURLOPT_SEEKFUNCTION 7.18.0
+CURLOPT_SERVER_RESPONSE_TIMEOUT 7.20.0
+CURLOPT_SERVICE_NAME 7.43.0
CURLOPT_SHARE 7.10
CURLOPT_SOCKOPTDATA 7.16.0
CURLOPT_SOCKOPTFUNCTION 7.16.0
CURLOPT_SOCKS5_GSSAPI_NEC 7.19.4
CURLOPT_SOCKS5_GSSAPI_SERVICE 7.19.4
-CURLOPT_SOURCE_HOST 7.12.1 - 7.13.0
-CURLOPT_SOURCE_PATH 7.12.1 - 7.13.0
-CURLOPT_SOURCE_PORT 7.12.1 - 7.13.0
-CURLOPT_SOURCE_POSTQUOTE 7.12.1 - 7.15.4
-CURLOPT_SOURCE_PREQUOTE 7.12.1 - 7.15.4
-CURLOPT_SOURCE_QUOTE 7.13.0 - 7.15.4
-CURLOPT_SOURCE_URL 7.13.0 - 7.15.4
-CURLOPT_SOURCE_USERPWD 7.12.1 - 7.15.4
+CURLOPT_SOURCE_HOST 7.12.1 - 7.15.5
+CURLOPT_SOURCE_PATH 7.12.1 - 7.15.5
+CURLOPT_SOURCE_PORT 7.12.1 - 7.15.5
+CURLOPT_SOURCE_POSTQUOTE 7.12.1 - 7.15.5
+CURLOPT_SOURCE_PREQUOTE 7.12.1 - 7.15.5
+CURLOPT_SOURCE_QUOTE 7.13.0 - 7.15.5
+CURLOPT_SOURCE_URL 7.13.0 - 7.15.5
+CURLOPT_SOURCE_USERPWD 7.12.1 - 7.15.5
CURLOPT_SSH_AUTH_TYPES 7.16.1
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 7.17.1
+CURLOPT_SSH_KEYDATA 7.19.6
+CURLOPT_SSH_KEYFUNCTION 7.19.6
+CURLOPT_SSH_KNOWNHOSTS 7.19.6
CURLOPT_SSH_PRIVATE_KEYFILE 7.16.1
CURLOPT_SSH_PUBLIC_KEYFILE 7.16.1
CURLOPT_SSLCERT 7.1
-CURLOPT_SSLCERTPASSWD 7.17.0
+CURLOPT_SSLCERTPASSWD 7.1.1 7.17.0
CURLOPT_SSLCERTTYPE 7.9.3
CURLOPT_SSLENGINE 7.9.3
CURLOPT_SSLENGINE_DEFAULT 7.9.3
CURLOPT_SSLKEY 7.9.3
-CURLOPT_SSLKEYPASSWD 7.17.0
-CURLOPT_SSLKEYPASSWD 7.17.0
+CURLOPT_SSLKEYPASSWD 7.9.3 7.17.0
CURLOPT_SSLKEYTYPE 7.9.3
CURLOPT_SSLVERSION 7.1
CURLOPT_SSL_CIPHER_LIST 7.9
CURLOPT_SSL_CTX_DATA 7.10.6
CURLOPT_SSL_CTX_FUNCTION 7.10.6
+CURLOPT_SSL_ENABLE_ALPN 7.36.0
+CURLOPT_SSL_ENABLE_NPN 7.36.0
+CURLOPT_SSL_FALSESTART 7.42.0
+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
+CURLOPT_TCP_KEEPINTVL 7.25.0
CURLOPT_TCP_NODELAY 7.11.2
CURLOPT_TELNETOPTIONS 7.7
-CURLOPT_TFTPBLKSIZE 7.19.4
+CURLOPT_TFTP_BLKSIZE 7.19.4
CURLOPT_TIMECONDITION 7.1
CURLOPT_TIMEOUT 7.1
CURLOPT_TIMEOUT_MS 7.16.2
CURLOPT_TIMEVALUE 7.1
-CURLOPT_TRANSFERTEXT 7.11.1
+CURLOPT_TLSAUTH_PASSWORD 7.21.4
+CURLOPT_TLSAUTH_TYPE 7.21.4
+CURLOPT_TLSAUTH_USERNAME 7.21.4
+CURLOPT_TRANSFERTEXT 7.1.1
+CURLOPT_TRANSFER_ENCODING 7.21.6
+CURLOPT_UNIX_SOCKET_PATH 7.40.0
CURLOPT_UNRESTRICTED_AUTH 7.10.4
CURLOPT_UPLOAD 7.1
CURLOPT_URL 7.1
@@ -392,11 +549,25 @@ CURLOPT_WILDCARDMATCH 7.21.0
CURLOPT_WRITEDATA 7.9.7
CURLOPT_WRITEFUNCTION 7.1
CURLOPT_WRITEHEADER 7.1
+CURLOPT_WRITEINFO 7.1
+CURLOPT_XFERINFODATA 7.32.0
+CURLOPT_XFERINFOFUNCTION 7.32.0
+CURLOPT_XOAUTH2_BEARER 7.33.0
+CURLPAUSE_ALL 7.18.0
+CURLPAUSE_CONT 7.18.0
+CURLPAUSE_RECV 7.18.0
+CURLPAUSE_RECV_CONT 7.18.0
+CURLPAUSE_SEND 7.18.0
+CURLPAUSE_SEND_CONT 7.18.0
+CURLPIPE_HTTP1 7.43.0
+CURLPIPE_MULTIPLEX 7.43.0
+CURLPIPE_NOTHING 7.43.0
CURLPROTO_ALL 7.19.4
CURLPROTO_DICT 7.19.4
CURLPROTO_FILE 7.19.4
CURLPROTO_FTP 7.19.4
CURLPROTO_FTPS 7.19.4
+CURLPROTO_GOPHER 7.21.2
CURLPROTO_HTTP 7.19.4
CURLPROTO_HTTPS 7.19.4
CURLPROTO_IMAP 7.20.0
@@ -414,6 +585,8 @@ 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
@@ -424,21 +597,46 @@ CURLPROXY_SOCKS4 7.10
CURLPROXY_SOCKS4A 7.18.0
CURLPROXY_SOCKS5 7.10
CURLPROXY_SOCKS5_HOSTNAME 7.18.0
+CURLSHE_BAD_OPTION 7.10.3
+CURLSHE_INVALID 7.10.3
+CURLSHE_IN_USE 7.10.3
+CURLSHE_NOMEM 7.12.0
+CURLSHE_NOT_BUILT_IN 7.23.0
+CURLSHE_OK 7.10.3
+CURLSHOPT_LOCKFUNC 7.10.3
+CURLSHOPT_NONE 7.10.3
+CURLSHOPT_SHARE 7.10.3
+CURLSHOPT_UNLOCKFUNC 7.10.3
+CURLSHOPT_UNSHARE 7.10.3
+CURLSHOPT_USERDATA 7.10.3
+CURLSOCKTYPE_ACCEPT 7.28.0
+CURLSOCKTYPE_IPCXN 7.16.0
+CURLSSH_AUTH_AGENT 7.28.0
+CURLSSH_AUTH_ANY 7.16.1
CURLSSH_AUTH_DEFAULT 7.16.1
CURLSSH_AUTH_HOST 7.16.1
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
+CURLSSLBACKEND_GSKIT 7.34.0
+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_SCHANNEL 7.34.0
+CURLSSLOPT_ALLOW_BEAST 7.25.0
CURLUSESSL_ALL 7.17.0
-CURLUSESSL_ALL 7.17.0
-CURLUSESSL_CONTROL 7.17.0
CURLUSESSL_CONTROL 7.17.0
CURLUSESSL_NONE 7.17.0
-CURLUSESSL_NONE 7.17.0
-CURLUSESSL_TRY 7.17.0
CURLUSESSL_TRY 7.17.0
CURLVERSION_FIRST 7.10
+CURLVERSION_FOURTH 7.16.1
CURLVERSION_NOW 7.10
CURLVERSION_SECOND 7.11.1
CURLVERSION_THIRD 7.12.0
@@ -447,39 +645,124 @@ CURL_CHUNK_BGN_FUNC_OK 7.21.0
CURL_CHUNK_BGN_FUNC_SKIP 7.21.0
CURL_CHUNK_END_FUNC_FAIL 7.21.0
CURL_CHUNK_END_FUNC_OK 7.21.0
+CURL_CSELECT_ERR 7.16.3
+CURL_CSELECT_IN 7.16.3
+CURL_CSELECT_OUT 7.16.3
+CURL_EASY_NONE 7.14.0 - 7.15.4
+CURL_EASY_TIMEOUT 7.14.0 - 7.15.4
+CURL_ERROR_SIZE 7.1
CURL_FNMATCHFUNC_FAIL 7.21.0
CURL_FNMATCHFUNC_MATCH 7.21.0
CURL_FNMATCHFUNC_NOMATCH 7.21.0
+CURL_FORMADD_DISABLED 7.12.1
+CURL_FORMADD_ILLEGAL_ARRAY 7.9.8
+CURL_FORMADD_INCOMPLETE 7.9.8
+CURL_FORMADD_MEMORY 7.9.8
+CURL_FORMADD_NULL 7.9.8
+CURL_FORMADD_OK 7.9.8
+CURL_FORMADD_OPTION_TWICE 7.9.8
+CURL_FORMADD_UNKNOWN_OPTION 7.9.8
+CURL_GLOBAL_ACK_EINTR 7.30.0
+CURL_GLOBAL_ALL 7.8
+CURL_GLOBAL_DEFAULT 7.8
+CURL_GLOBAL_NOTHING 7.8
+CURL_GLOBAL_SSL 7.8
+CURL_GLOBAL_WIN32 7.8.1
CURL_HTTP_VERSION_1_0 7.9.1
CURL_HTTP_VERSION_1_1 7.9.1
+CURL_HTTP_VERSION_2_0 7.33.0
+CURL_HTTP_VERSION_2 7.43.0
CURL_HTTP_VERSION_NONE 7.9.1
CURL_IPRESOLVE_V4 7.10.8
CURL_IPRESOLVE_V6 7.10.8
CURL_IPRESOLVE_WHATEVER 7.10.8
+CURL_LOCK_ACCESS_NONE 7.10.3
+CURL_LOCK_ACCESS_SHARED 7.10.3
+CURL_LOCK_ACCESS_SINGLE 7.10.3
+CURL_LOCK_DATA_CONNECT 7.10.3
+CURL_LOCK_DATA_COOKIE 7.10.3
+CURL_LOCK_DATA_DNS 7.10.3
+CURL_LOCK_DATA_NONE 7.10.3
+CURL_LOCK_DATA_SHARE 7.10.4
+CURL_LOCK_DATA_SSL_SESSION 7.10.3
+CURL_LOCK_TYPE_CONNECT 7.10 - 7.10.2
+CURL_LOCK_TYPE_COOKIE 7.10 - 7.10.2
+CURL_LOCK_TYPE_DNS 7.10 - 7.10.2
+CURL_LOCK_TYPE_NONE 7.10 - 7.10.2
+CURL_LOCK_TYPE_SSL_SESSION 7.10 - 7.10.2
+CURL_MAX_HTTP_HEADER 7.19.7
+CURL_MAX_WRITE_SIZE 7.9.7
CURL_NETRC_IGNORED 7.9.8
CURL_NETRC_OPTIONAL 7.9.8
CURL_NETRC_REQUIRED 7.9.8
+CURL_POLL_IN 7.14.0
+CURL_POLL_INOUT 7.14.0
+CURL_POLL_NONE 7.14.0
+CURL_POLL_OUT 7.14.0
+CURL_POLL_REMOVE 7.14.0
+CURL_PROGRESS_BAR 7.1.1 - 7.4.1
+CURL_PROGRESS_STATS 7.1.1 - 7.4.1
+CURL_READFUNC_ABORT 7.12.1
+CURL_READFUNC_PAUSE 7.18.0
+CURL_REDIR_GET_ALL 7.19.1
+CURL_REDIR_POST_301 7.19.1
+CURL_REDIR_POST_302 7.19.1
+CURL_REDIR_POST_303 7.25.1
+CURL_REDIR_POST_ALL 7.19.1
+CURL_RTSPREQ_ANNOUNCE 7.20.0
+CURL_RTSPREQ_DESCRIBE 7.20.0
+CURL_RTSPREQ_GET_PARAMETER 7.20.0
+CURL_RTSPREQ_NONE 7.20.0
+CURL_RTSPREQ_OPTIONS 7.20.0
+CURL_RTSPREQ_PAUSE 7.20.0
+CURL_RTSPREQ_PLAY 7.20.0
+CURL_RTSPREQ_RECEIVE 7.20.0
+CURL_RTSPREQ_RECORD 7.20.0
+CURL_RTSPREQ_SETUP 7.20.0
+CURL_RTSPREQ_SET_PARAMETER 7.20.0
+CURL_RTSPREQ_TEARDOWN 7.20.0
CURL_SEEKFUNC_CANTSEEK 7.19.5
CURL_SEEKFUNC_FAIL 7.19.5
CURL_SEEKFUNC_OK 7.19.5
+CURL_SOCKET_BAD 7.14.0
+CURL_SOCKET_TIMEOUT 7.14.0
+CURL_SOCKOPT_ALREADY_CONNECTED 7.21.5
+CURL_SOCKOPT_ERROR 7.21.5
+CURL_SOCKOPT_OK 7.21.5
CURL_SSLVERSION_DEFAULT 7.9.2
CURL_SSLVERSION_SSLv2 7.9.2
CURL_SSLVERSION_SSLv3 7.9.2
CURL_SSLVERSION_TLSv1 7.9.2
+CURL_SSLVERSION_TLSv1_0 7.34.0
+CURL_SSLVERSION_TLSv1_1 7.34.0
+CURL_SSLVERSION_TLSv1_2 7.34.0
CURL_TIMECOND_IFMODSINCE 7.9.7
CURL_TIMECOND_IFUNMODSINCE 7.9.7
CURL_TIMECOND_LASTMOD 7.9.7
+CURL_TIMECOND_NONE 7.9.7
+CURL_TLSAUTH_NONE 7.21.4
+CURL_TLSAUTH_SRP 7.21.4
CURL_VERSION_ASYNCHDNS 7.10.7
CURL_VERSION_CONV 7.15.4
CURL_VERSION_CURLDEBUG 7.19.6
CURL_VERSION_DEBUG 7.10.6
-CURL_VERSION_GSSNEGOTIATE 7.10.6
+CURL_VERSION_GSSAPI 7.38.0
+CURL_VERSION_GSSNEGOTIATE 7.10.6 7.38.0
+CURL_VERSION_HTTP2 7.33.0
CURL_VERSION_IDN 7.12.0
CURL_VERSION_IPV6 7.10
-CURL_VERSION_KERBEROS4 7.10
+CURL_VERSION_KERBEROS4 7.10 7.33.0
+CURL_VERSION_KERBEROS5 7.40.0
CURL_VERSION_LARGEFILE 7.11.1
CURL_VERSION_LIBZ 7.10
CURL_VERSION_NTLM 7.10.6
+CURL_VERSION_NTLM_WB 7.22.0
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
+CURL_WRITEFUNC_PAUSE 7.18.0
diff --git a/docs/libcurl/symbols.pl b/docs/libcurl/symbols.pl
new file mode 100755
index 00000000..a7b76e23
--- /dev/null
+++ b/docs/libcurl/symbols.pl
@@ -0,0 +1,100 @@
+#!/usr/bin/perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+#
+# Experience has shown that the symbols-in-versions file is very useful to
+# applications that want to build with a wide range of libcurl versions.
+# It is however easy to get it wrong and the source gets a bit messy with all
+# the fixed numerical comparisons.
+#
+# The point of this script is to provide an easy-to-use macro for libcurl-
+# using applications to do preprocessor checks for specific libcurl defines,
+# and yet make the code clearly show what the macro is used for.
+#
+# Run this script and generate libcurl-symbols.h and then use that header in
+# a fashion similar to:
+#
+# #include "libcurl-symbols.h"
+#
+# #if LIBCURL_HAS(CURLOPT_MUTE)
+# has mute
+# #else
+# no mute
+# #endif
+#
+#
+open F, "<symbols-in-versions";
+
+sub str2num {
+ my ($str)=@_;
+ if($str =~ /([0-9]*)\.([0-9]*)\.*([0-9]*)/) {
+ return sprintf("0x%06x", $1<<16 | $2 << 8 | $3);
+ }
+}
+
+print <<EOS
+
+#include <curl/curl.h>
+
+#define LIBCURL_HAS(x) \\
+ (defined(x ## _FIRST) && (x ## _FIRST <= LIBCURL_VERSION_NUM) && \\
+ (!defined(x ## _LAST) || ( x ## _LAST >= LIBCURL_VERSION_NUM)))
+
+EOS
+ ;
+
+while(<F>) {
+ if(/^(CURL[^ ]*)[ \t]*(.*)/) {
+ my ($sym, $vers)=($1, $2);
+
+ my $intr;
+ my $rm;
+ my $dep;
+
+ # is there removed info?
+ if($vers =~ /([\d.]+)[ \t-]+([\d.-]+)[ \t]+([\d.]+)/) {
+ ($intr, $dep, $rm)=($1, $2, $3);
+ }
+ # is it a dep-only line?
+ elsif($vers =~ /([\d.]+)[ \t-]+([\d.]+)/) {
+ ($intr, $dep)=($1, $2);
+ }
+ else {
+ $intr = $vers;
+ }
+
+ my $inum = str2num($intr);
+
+ print <<EOS
+#define ${sym}_FIRST $inum /* Added in $intr */
+EOS
+;
+ my $irm = str2num($rm);
+ if($rm) {
+ print <<EOS
+#define ${sym}_LAST $irm /* Last featured in $rm */
+EOS
+;
+ }
+
+ }
+}
diff --git a/docs/mk-ca-bundle.1 b/docs/mk-ca-bundle.1
new file mode 100644
index 00000000..164c9c34
--- /dev/null
+++ b/docs/mk-ca-bundle.1
@@ -0,0 +1,110 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 2008 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 mk-ca-bundle 1 "5 Jan 2013" "version 1.20" "mk-ca-bundle manual"
+.SH NAME
+mk-ca-bundle \- convert mozilla's certdata.txt to PEM format
+.SH SYNOPSIS
+mk-ca-bundle [bilnpqstuv]
+.I [outputfile]
+.SH DESCRIPTION
+The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source
+tree over HTTP, then parses certdata.txt and extracts certificates
+into PEM format. By default, only CA root certificates trusted to issue SSL
+server authentication certificates are extracted. These are then processed with
+the OpenSSL commandline tool to produce the final ca-bundle file.
+
+The default \fIoutputfile\fP name is \fBca-bundle.crt\fP. By setting it to '-'
+(a single dash) you will get the output sent to STDOUT instead of a file.
+
+The PEM format this scripts uses for output makes the result readily available
+for use by just about all OpenSSL or GnuTLS powered applications, such as
+curl, wget and more.
+.SH OPTIONS
+The following options are supported:
+.IP -b
+backup an existing version of \fIoutputfilename\fP
+.IP "-d [name]"
+specify which Mozilla tree to pull certdata.txt from (or a custom URL). Valid
+names are: aurora, beta, central, mozilla, nss, release (default). They are
+shortcuts for which source tree to get the cert data from.
+.IP -f
+force rebuild even if certdata.txt is current (Added in version 1.17)
+.IP -i
+print version info about used modules
+.IP -l
+print license info about certdata.txt
+.IP -n
+no download of certdata.txt (to use existing)
+.IP "-p [purposes]:[levels]"
+list of Mozilla trust purposes and levels for certificates to include in output.
+Takes the form of a comma separated list of purposes, a colon, and a comma
+separated list of levels. The default is to include all certificates trusted
+to issue SSL Server certificates (SERVER_AUTH:TRUSTED_DELEGATOR).
+
+(Added in version 1.21, Perl only)
+
+Valid purposes are:
+.RS
+ALL, DIGITAL_SIGNATURE, NON_REPUDIATION, KEY_ENCIPHERMENT,
+DATA_ENCIPHERMENT, KEY_AGREEMENT, KEY_CERT_SIGN, CRL_SIGN,
+SERVER_AUTH (default), CLIENT_AUTH, CODE_SIGNING, EMAIL_PROTECTION,
+IPSEC_END_SYSTEM, IPSEC_TUNNEL, IPSEC_USER, TIME_STAMPING, STEP_UP_APPROVED
+.RE
+.IP
+Valid trust levels are:
+.RS
+ALL, TRUSTED_DELEGATOR (default), NOT_TRUSTED, MUST_VERIFY_TRUST, TRUSTED
+.RE
+.IP -q
+be really quiet (no progress output at all)
+.IP -t
+include plain text listing of certificates
+.IP "-s [algorithms]"
+comma separated list of signature algorithms with which to hash/fingerprint
+each certificate and output when run in plain text mode.
+
+(Added in version 1.21, Perl only)
+
+Valid algorithms are:
+.RS
+ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512
+.RE
+.IP -u
+unlink (remove) certdata.txt after processing
+.IP -v
+be verbose and print out processed CAs
+.SH EXIT STATUS
+Returns 0 on success. Returns 1 if it fails to download data.
+.SH CERTDATA FORMAT
+The file format used by Mozilla for this trust information seems to be documented here:
+.nf
+http://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html
+.fi
+.SH SEE ALSO
+.BR curl (1)
+.SH HISTORY
+\fBmk-ca-bundle\fP is a command line tool that is shipped as part of every
+curl and libcurl release (see http://curl.haxx.se/). It was originally based
+on the parse-certs script written by Roland Krikava and was later much
+improved by Guenter Knauf. This manual page was initially written by Jan
+Schaumann \&<jschauma@netmeister.org>.
diff --git a/include/Makefile.in b/include/Makefile.in
deleted file mode 100644
index 169197fd..00000000
--- a/include/Makefile.in
+++ /dev/null
@@ -1,566 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = include
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-depcomp =
-am__depfiles_maybe =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-SUBDIRS = curl
-EXTRA_DIST = README
-AUTOMAKE_OPTIONS = foreign no-dependencies
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign include/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/include/README b/include/README
index 205f9f7d..3e52a1d0 100644
--- a/include/README
+++ b/include/README
@@ -36,7 +36,7 @@ The following notes apply to libcurl version 7.19.0 and later.
* If you intend to distribute an already compiled libcurl library you _MUST_
also distribute along with it the generated curl/curlbuild.h which has been
used to compile it. Otherwise the library will be of no use for the users of
- the library that you have built. It is _your_ responsability to provide this
+ the library that you have built. It is _your_ responsibility to provide this
file. No one at the cURL project can know how you have built the library.
* File curl/curlbuild.h includes platform and configuration dependent info,
diff --git a/include/curl/.gitignore b/include/curl/.gitignore
new file mode 100644
index 00000000..8adbe411
--- /dev/null
+++ b/include/curl/.gitignore
@@ -0,0 +1,4 @@
+curlbuild.h
+stamp-h2
+stamp-h3
+curlver.h.dist
diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am
index a3b44438..86e8b783 100644
--- a/include/curl/Makefile.am
+++ b/include/curl/Makefile.am
@@ -1,5 +1,26 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
pkginclude_HEADERS = \
- curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \
+ curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \
typecheck-gcc.h curlbuild.h curlrules.h
pkgincludedir= $(includedir)/curl
@@ -23,3 +44,10 @@ EXTRA_DIST = curlbuild.h.in
DISTCLEANFILES = curlbuild.h
+checksrc:
+ @@PERL@ $(top_srcdir)/lib/checksrc.pl -Wcurlbuild.h -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) $(EXTRA_DIST)
+
+if CURLDEBUG
+# for debug builds, we scan the sources on all regular make invokes
+all-local: checksrc
+endif
diff --git a/include/curl/Makefile.in b/include/curl/Makefile.in
deleted file mode 100644
index 0b90bab2..00000000
--- a/include/curl/Makefile.in
+++ /dev/null
@@ -1,521 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = include/curl
-DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/curlbuild.h.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(pkgincludedir)"
-pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
-HEADERS = $(pkginclude_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-pkgincludedir = $(includedir)/curl
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-pkginclude_HEADERS = \
- curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \
- typecheck-gcc.h curlbuild.h curlrules.h
-
-
-# curlbuild.h does not exist in the git tree. When the original libcurl
-# source code distribution archive file is created, curlbuild.h.dist is
-# renamed to curlbuild.h and included in the tarball so that it can be
-# used directly on non-configure systems.
-#
-# The distributed curlbuild.h will be overwritten on configure systems
-# when the configure script runs, with one that is suitable and specific
-# to the library being configured and built.
-#
-# curlbuild.h.in is the distributed template file from which the configure
-# script creates curlbuild.h at library configuration time, overwiting the
-# one included in the distribution archive.
-#
-# curlbuild.h.dist is not included in the source code distribution archive.
-EXTRA_DIST = curlbuild.h.in
-DISTCLEANFILES = curlbuild.h
-all: curlbuild.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/curl/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign include/curl/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-curlbuild.h: stamp-h3
- @if test ! -f $@; then \
- rm -f stamp-h3; \
- $(MAKE) stamp-h3; \
- else :; fi
-
-stamp-h3: $(srcdir)/curlbuild.h.in $(top_builddir)/config.status
- @rm -f stamp-h3
- cd $(top_builddir) && $(SHELL) ./config.status include/curl/curlbuild.h
-$(srcdir)/curlbuild.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_srcdir) && $(AUTOHEADER)
- rm -f stamp-h3
- touch $@
-
-distclean-hdr:
- -rm -f curlbuild.h stamp-h3
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-pkgincludeHEADERS: $(pkginclude_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
- @list='$(pkginclude_HEADERS)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
- $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
- done
-
-uninstall-pkgincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(pkginclude_HEADERS)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
- rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) curlbuild.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) curlbuild.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) curlbuild.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) curlbuild.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(HEADERS) curlbuild.h
-installdirs:
- for dir in "$(DESTDIR)$(pkgincludedir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-hdr \
- distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-pkgincludeHEADERS
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-pkgincludeHEADERS
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool ctags distclean distclean-generic distclean-hdr \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-pkgincludeHEADERS \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-pkgincludeHEADERS
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 5bc85cb8..eab2f6e9 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -55,34 +55,32 @@
#include <sys/types.h>
#include <time.h>
-#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \
- !defined(__CYGWIN__) || defined(__MINGW32__)
-#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H))
+#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
+#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || defined(__LWIP_OPT_H__))
/* The check above prevents the winsock2 inclusion if winsock.h already was
included, since they can't co-exist without problems */
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
-#else
+#endif
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
- libc5-based Linux systems. Only include it on system that are known to
+ libc5-based Linux systems. Only include it on systems that are known to
require it! */
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
- defined(ANDROID) || \
+ defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
#include <sys/select.h>
#endif
-#ifndef _WIN32_WCE
+#if !defined(WIN32) && !defined(_WIN32_WCE)
#include <sys/socket.h>
#endif
+
#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
#include <sys/time.h>
#endif
-#include <sys/types.h>
-#endif
#ifdef __BEOS__
#include <support/SupportDefs.h>
@@ -95,34 +93,26 @@ extern "C" {
typedef void CURL;
/*
- * Decorate exportable functions for Win32 and Symbian OS DLL linking.
- * This avoids using a .def file for building libcurl.dll.
+ * libcurl external API function linkage decorations.
*/
-#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \
- !defined(CURL_STATICLIB)
-#if defined(BUILDING_LIBCURL)
-#define CURL_EXTERN __declspec(dllexport)
-#else
-#define CURL_EXTERN __declspec(dllimport)
-#endif
-#else
-#ifdef CURL_HIDDEN_SYMBOLS
-/*
- * This definition is used to make external definitions visible in the
- * shared library when symbols are hidden by default. It makes no
- * difference when compiling applications whether this is set or not,
- * only when compiling the library.
- */
-#define CURL_EXTERN CURL_EXTERN_SYMBOL
+#ifdef CURL_STATICLIB
+# define CURL_EXTERN
+#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
+# if defined(BUILDING_LIBCURL)
+# define CURL_EXTERN __declspec(dllexport)
+# else
+# define CURL_EXTERN __declspec(dllimport)
+# endif
+#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
+# define CURL_EXTERN CURL_EXTERN_SYMBOL
#else
-#define CURL_EXTERN
-#endif
+# define CURL_EXTERN
#endif
#ifndef curl_socket_typedef
/* socket typedef */
-#ifdef WIN32
+#if defined(WIN32) && !defined(__LWIP_OPT_H__)
typedef SOCKET curl_socket_t;
#define CURL_SOCKET_BAD INVALID_SOCKET
#else
@@ -166,12 +156,22 @@ struct curl_httppost {
HTTPPOST_CALLBACK posts */
};
+/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered
+ deprecated but was the only choice up until 7.31.0 */
typedef int (*curl_progress_callback)(void *clientp,
double dltotal,
double dlnow,
double ultotal,
double ulnow);
+/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in
+ 7.32.0, it avoids floating point and provides more detailed information. */
+typedef int (*curl_xferinfo_callback)(void *clientp,
+ curl_off_t dltotal,
+ curl_off_t dlnow,
+ curl_off_t ultotal,
+ curl_off_t ulnow);
+
#ifndef CURL_MAX_WRITE_SIZE
/* Tests have proven that 20K is a very bad buffer size for uploads on
Windows, while 16K for some odd reason performed a lot better.
@@ -179,7 +179,7 @@ typedef int (*curl_progress_callback)(void *clientp,
time for those who feel adventurous. The practical minimum is about
400 bytes since libcurl uses a buffer of this size as a scratch area
(unrelated to network send operations). */
-#define CURL_MAX_WRITE_SIZE 32768
+#define CURL_MAX_WRITE_SIZE 16384
#endif
#ifndef CURL_MAX_HTTP_HEADER
@@ -189,10 +189,10 @@ typedef int (*curl_progress_callback)(void *clientp,
#define CURL_MAX_HTTP_HEADER (100*1024)
#endif
-
/* This is a magic return code for the write callback that, when returned,
will signal libcurl to pause receiving on the current transfer. */
#define CURL_WRITEFUNC_PAUSE 0x10000001
+
typedef size_t (*curl_write_callback)(char *buffer,
size_t size,
size_t nitems,
@@ -311,10 +311,18 @@ typedef size_t (*curl_read_callback)(char *buffer,
void *instream);
typedef enum {
- CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
- CURLSOCKTYPE_LAST /* never use */
+ CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
+ CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
+ CURLSOCKTYPE_LAST /* never use */
} curlsocktype;
+/* The return code from the sockopt_callback can signal information back
+ to libcurl: */
+#define CURL_SOCKOPT_OK 0
+#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
+ CURLE_ABORTED_BY_CALLBACK */
+#define CURL_SOCKOPT_ALREADY_CONNECTED 2
+
typedef int (*curl_sockopt_callback)(void *clientp,
curl_socket_t curlfd,
curlsocktype purpose);
@@ -334,6 +342,9 @@ typedef curl_socket_t
curlsocktype purpose,
struct curl_sockaddr *address);
+typedef int
+(*curl_closesocket_callback)(void *clientp, curl_socket_t item);
+
typedef enum {
CURLIOE_OK, /* I/O operation successful */
CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
@@ -394,7 +405,8 @@ typedef enum {
CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
CURLE_FAILED_INIT, /* 2 */
CURLE_URL_MALFORMAT, /* 3 */
- CURLE_OBSOLETE4, /* 4 - NOT USED */
+ CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for
+ 7.17.0, reused in April 2011 for 7.21.5] */
CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
CURLE_COULDNT_RESOLVE_HOST, /* 6 */
CURLE_COULDNT_CONNECT, /* 7 */
@@ -402,13 +414,18 @@ typedef enum {
CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server
due to lack of access - when login fails
this is not returned. */
- CURLE_OBSOLETE10, /* 10 - NOT USED */
+ CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for
+ 7.15.4, reused in Dec 2011 for 7.24.0]*/
CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */
- CURLE_OBSOLETE12, /* 12 - NOT USED */
+ CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server
+ [was obsoleted in August 2007 for 7.17.0,
+ reused in Dec 2011 for 7.24.0]*/
CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */
CURLE_FTP_WEIRD_227_FORMAT, /* 14 */
CURLE_FTP_CANT_GET_HOST, /* 15 */
- CURLE_OBSOLETE16, /* 16 - NOT USED */
+ 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_FTP_COULDNT_SET_TYPE, /* 17 */
CURLE_PARTIAL_FILE, /* 18 */
CURLE_FTP_COULDNT_RETR_FILE, /* 19 */
@@ -444,7 +461,7 @@ typedef enum {
CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
CURLE_OBSOLETE46, /* 46 - NOT USED */
CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
- CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */
+ CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */
CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
CURLE_OBSOLETE50, /* 50 - NOT USED */
CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
@@ -459,7 +476,7 @@ typedef enum {
CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */
CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */
CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */
- CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */
+ CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */
CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */
CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */
CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
@@ -499,17 +516,32 @@ typedef enum {
7.19.0) */
CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */
CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */
- CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Identifiers */
+ CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */
CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */
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! */
-/* Backwards compatibility with older names */
+/* 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 */
+#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
+#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
+
+/* compatibility with older names */
+#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
+
+/* The following were added in 7.21.5, April 2011 */
+#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
/* The following were added in 7.17.1 */
/* These are scheduled to disappear by 2009 */
@@ -517,7 +549,7 @@ typedef enum {
/* The following were added in 7.17.0 */
/* These are scheduled to disappear by 2009 */
-#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */
+#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */
#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
@@ -529,7 +561,7 @@ typedef enum {
#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
-#define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4
+#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
@@ -555,6 +587,16 @@ typedef enum {
make programs break */
#define CURLE_ALREADY_COMPLETE 99999
+/* Provide defines for really old option names */
+#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */
+#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */
+#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA
+
+/* Since long deprecated options with no code in the lib that does anything
+ with them. */
+#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
+#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
+
#endif /*!CURL_NO_OLDIES*/
/* This prototype applies to all conversion callbacks */
@@ -579,14 +621,35 @@ typedef enum {
in 7.18.0 */
} curl_proxytype; /* this enum was added in 7.10 */
-#define CURLAUTH_NONE 0 /* nothing */
-#define CURLAUTH_BASIC (1<<0) /* Basic (default) */
-#define CURLAUTH_DIGEST (1<<1) /* Digest */
-#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */
-#define CURLAUTH_NTLM (1<<3) /* NTLM */
-#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */
-#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */
-#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
+/*
+ * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
+ *
+ * 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_NTLM - HTTP NTLM authentication
+ * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour
+ * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper
+ * CURLAUTH_ONLY - Use together with a single other type to force no
+ * authentication or just that single type
+ * CURLAUTH_ANY - All fine types set
+ * CURLAUTH_ANYSAFE - All fine types except Basic
+ */
+
+#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_NTLM (((unsigned long)1)<<3)
+#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
+#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
+#define CURLAUTH_ONLY (((unsigned long)1)<<31)
+#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
+#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */
#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */
@@ -594,20 +657,27 @@ typedef enum {
#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */
#define CURLSSH_AUTH_HOST (1<<2) /* host key files */
#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */
+#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */
#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
+#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */
+#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
+#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */
+
#define CURL_ERROR_SIZE 256
+enum curl_khtype {
+ CURLKHTYPE_UNKNOWN,
+ CURLKHTYPE_RSA1,
+ CURLKHTYPE_RSA,
+ CURLKHTYPE_DSS
+};
+
struct curl_khkey {
const char *key; /* points to a zero-terminated string encoded with base64
if len is zero, otherwise to the "raw" data */
size_t len;
- enum type {
- CURLKHTYPE_UNKNOWN,
- CURLKHTYPE_RSA1,
- CURLKHTYPE_RSA,
- CURLKHTYPE_DSS
- } keytype;
+ enum curl_khtype keytype;
};
/* this is the set of return values expected from the curl_sshkeycallback
@@ -646,6 +716,15 @@ typedef enum {
CURLUSESSL_LAST /* not an option, never use */
} curl_usessl;
+/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
+
+/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
+ name of improving interoperability with older servers. Some SSL libraries
+ have introduced work-arounds for this flaw but those work-arounds sometimes
+ make the SSL communication fail. To regain functionality with those broken
+ servers, a user can this way allow the vulnerability back. */
+#define CURLSSLOPT_ALLOW_BEAST (1<<0)
+
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */
@@ -696,6 +775,10 @@ typedef enum {
CURLFTPMETHOD_LAST /* not an option, never use */
} curl_ftpmethod;
+/* bitmask defines for CURLOPT_HEADEROPT */
+#define CURLHEADER_UNIFIED 0
+#define CURLHEADER_SEPARATE (1<<0)
+
/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
#define CURLPROTO_HTTP (1<<0)
#define CURLPROTO_HTTPS (1<<1)
@@ -723,6 +806,8 @@ 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
@@ -740,7 +825,7 @@ typedef enum {
#endif
#ifdef CURL_ISOCPP
-#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
+#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu
#else
/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
#define LONG CURLOPTTYPE_LONG
@@ -758,10 +843,10 @@ typedef enum {
typedef enum {
/* This is the FILE * or void * the regular output should be written to. */
- CINIT(FILE, OBJECTPOINT, 1),
+ 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),
@@ -769,10 +854,10 @@ typedef enum {
/* Name of proxy to use. */
CINIT(PROXY, OBJECTPOINT, 4),
- /* "name:password" to use when fetching. */
+ /* "user:password;options" to use when fetching. */
CINIT(USERPWD, OBJECTPOINT, 5),
- /* "name:password" to use with proxy. */
+ /* "user:password" to use with proxy. */
CINIT(PROXYUSERPWD, OBJECTPOINT, 6),
/* Range to get, specified as an ASCII string. */
@@ -781,7 +866,7 @@ typedef enum {
/* not used */
/* Specified file stream to upload from (use as input): */
- CINIT(INFILE, OBJECTPOINT, 9),
+ CINIT(READDATA, OBJECTPOINT, 9),
/* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
* bytes big. If this is not used, error messages go to stderr instead: */
@@ -845,7 +930,8 @@ typedef enum {
/* Set cookie in request: */
CINIT(COOKIE, OBJECTPOINT, 22),
- /* This points to a linked list of headers, struct curl_slist kind */
+ /* This points to a linked list of headers, struct curl_slist kind. This
+ list is also used for RTSP (in spite of its name) */
CINIT(HTTPHEADER, OBJECTPOINT, 23),
/* This points to a linked list of post entries, struct curl_httppost */
@@ -865,7 +951,7 @@ typedef enum {
/* send FILE * or void * to store headers to, if you use a callback it
is simply passed to the callback unmodified */
- CINIT(WRITEHEADER, OBJECTPOINT, 29),
+ CINIT(HEADERDATA, OBJECTPOINT, 29),
/* point to a file to read the initial cookies from, also enables
"cookie awareness" */
@@ -898,18 +984,16 @@ typedef enum {
/* send linked-list of post-transfer QUOTE commands */
CINIT(POSTQUOTE, OBJECTPOINT, 39),
- /* Pass a pointer to string of the output using full variable-replacement
- as described elsewhere. */
- CINIT(WRITEINFO, OBJECTPOINT, 40),
+ CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */
CINIT(VERBOSE, LONG, 41), /* talk a lot */
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 >= 300 */
+ CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 400 */
CINIT(UPLOAD, LONG, 46), /* this is an upload */
CINIT(POST, LONG, 47), /* HTTP POST method */
- CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */
+ CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */
CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */
@@ -924,13 +1008,16 @@ typedef enum {
/* 55 = OBSOLETE */
- /* Function that will be called instead of the internal progress display
+ /* DEPRECATED
+ * Function that will be called instead of the internal progress display
* function. This function should be defined as the curl_progress_callback
* prototype defines. */
CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),
- /* Data passed to the progress callback */
+ /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
+ callbacks */
CINIT(PROGRESSDATA, OBJECTPOINT, 57),
+#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA
/* We want the referrer field set automatically when following locations */
CINIT(AUTOREFERER, LONG, 58),
@@ -976,9 +1063,7 @@ typedef enum {
/* Max amount of cached alive connections */
CINIT(MAXCONNECTS, LONG, 71),
- /* What policy to use when closing connections when the cache is filled
- up */
- CINIT(CLOSEPOLICY, LONG, 72),
+ CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */
/* 73 = OBSOLETE */
@@ -999,9 +1084,8 @@ typedef enum {
/* Set to the Entropy Gathering Daemon socket pathname */
CINIT(EGDSOCKET, OBJECTPOINT, 77),
- /* Time-out connect operations after this amount of seconds, if connects
- are OK within this time, then fine... This only aborts the connect
- phase. [Only works on unix-style/SIGALRM operating systems] */
+ /* Time-out connect operations after this amount of seconds, if connects are
+ OK within this time, then fine... This only aborts the connect phase. */
CINIT(CONNECTTIMEOUT, LONG, 78),
/* Function that will be called to store headers (instead of fwrite). The
@@ -1052,7 +1136,7 @@ typedef enum {
CINIT(SSLENGINE_DEFAULT, LONG, 90),
/* Non-zero value means to use the global dns cache */
- CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */
+ CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */
/* DNS cache timeout */
CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
@@ -1089,8 +1173,9 @@ typedef enum {
CINIT(PROXYTYPE, LONG, 101),
/* Set the Accept-Encoding string. Use this to tell a server you would like
- the response to be compressed. */
- CINIT(ENCODING, OBJECTPOINT, 102),
+ the response to be compressed. Before 7.21.6, this was known as
+ CURLOPT_ENCODING */
+ CINIT(ACCEPT_ENCODING, OBJECTPOINT, 102),
/* Set pointer to private data */
CINIT(PRIVATE, OBJECTPOINT, 103),
@@ -1103,8 +1188,8 @@ typedef enum {
and password to whatever host the server decides. */
CINIT(UNRESTRICTED_AUTH, LONG, 105),
- /* Specifically switch on or off the FTP engine's use of the EPRT command ( it
- also disables the LPRT attempt). By default, those ones will always be
+ /* Specifically switch on or off the FTP engine's use of the EPRT command (
+ it also disables the LPRT attempt). By default, those ones will always be
attempted before the good old traditional PORT command. */
CINIT(FTP_USE_EPRT, LONG, 106),
@@ -1174,9 +1259,9 @@ typedef enum {
CINIT(NETRC_FILE, OBJECTPOINT, 118),
/* Enable SSL/TLS for FTP, pick one of:
- CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise
- CURLFTPSSL_CONTROL - SSL for the control connection or fail
- CURLFTPSSL_ALL - SSL for all communication or fail
+ CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
+ CURLUSESSL_CONTROL - SSL for the control connection or fail
+ CURLUSESSL_ALL - SSL for all communication or fail
*/
CINIT(USE_SSL, LONG, 119),
@@ -1331,8 +1416,7 @@ typedef enum {
CINIT(ADDRESS_SCOPE, LONG, 171),
/* Collect certificate chain info and allow it to get retrievable with
- CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only
- working with OpenSSL-powered builds. */
+ CURLINFO_CERTINFO after the transfer is complete. */
CINIT(CERTINFO, LONG, 172),
/* "name" and "pwd" to use when fetching. */
@@ -1436,6 +1520,127 @@ typedef enum {
/* FNMATCH_FUNCTION user pointer */
CINIT(FNMATCH_DATA, OBJECTPOINT, 202),
+ /* send linked-list of name:port:address sets */
+ CINIT(RESOLVE, OBJECTPOINT, 203),
+
+ /* Set a username for authenticated TLS */
+ CINIT(TLSAUTH_USERNAME, OBJECTPOINT, 204),
+
+ /* Set a password for authenticated TLS */
+ CINIT(TLSAUTH_PASSWORD, OBJECTPOINT, 205),
+
+ /* Set authentication type for authenticated TLS */
+ CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206),
+
+ /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
+ compressed transfer-encoded responses. Set to 0 to disable the use of TE:
+ in outgoing requests. The current default is 0, but it might change in a
+ future libcurl release.
+
+ libcurl will ask for the compressed methods it knows of, and if that
+ isn't any, it will not ask for transfer-encoding at all even if this
+ option is set to 1.
+
+ */
+ CINIT(TRANSFER_ENCODING, LONG, 207),
+
+ /* Callback function for closing socket (instead of close(2)). The callback
+ should have type curl_closesocket_callback */
+ CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),
+ CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),
+
+ /* allow GSSAPI credential delegation */
+ CINIT(GSSAPI_DELEGATION, LONG, 210),
+
+ /* Set the name servers to use for DNS resolution */
+ CINIT(DNS_SERVERS, OBJECTPOINT, 211),
+
+ /* Time-out accept operations (currently for FTP only) after this amount
+ of miliseconds. */
+ CINIT(ACCEPTTIMEOUT_MS, LONG, 212),
+
+ /* Set TCP keepalive */
+ CINIT(TCP_KEEPALIVE, LONG, 213),
+
+ /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
+ CINIT(TCP_KEEPIDLE, LONG, 214),
+ CINIT(TCP_KEEPINTVL, LONG, 215),
+
+ /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
+ CINIT(SSL_OPTIONS, LONG, 216),
+
+ /* Set the SMTP auth originator */
+ CINIT(MAIL_AUTH, OBJECTPOINT, 217),
+
+ /* Enable/disable SASL initial response */
+ CINIT(SASL_IR, LONG, 218),
+
+ /* Function that will be called instead of the internal progress display
+ * function. This function should be defined as the curl_xferinfo_callback
+ * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
+ CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219),
+
+ /* The XOAUTH2 bearer token */
+ CINIT(XOAUTH2_BEARER, OBJECTPOINT, 220),
+
+ /* Set the interface string to use as outgoing network
+ * interface for DNS requests.
+ * Only supported by the c-ares DNS backend */
+ CINIT(DNS_INTERFACE, OBJECTPOINT, 221),
+
+ /* Set the local IPv4 address to use for outgoing DNS requests.
+ * Only supported by the c-ares DNS backend */
+ CINIT(DNS_LOCAL_IP4, OBJECTPOINT, 222),
+
+ /* Set the local IPv4 address to use for outgoing DNS requests.
+ * Only supported by the c-ares DNS backend */
+ CINIT(DNS_LOCAL_IP6, OBJECTPOINT, 223),
+
+ /* Set authentication options directly */
+ CINIT(LOGIN_OPTIONS, OBJECTPOINT, 224),
+
+ /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
+ CINIT(SSL_ENABLE_NPN, LONG, 225),
+
+ /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
+ CINIT(SSL_ENABLE_ALPN, LONG, 226),
+
+ /* Time to wait for a response to a HTTP request containing an
+ * Expect: 100-continue header before sending the data anyway. */
+ CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227),
+
+ /* This points to a linked list of headers used for proxy requests only,
+ struct curl_slist kind */
+ CINIT(PROXYHEADER, OBJECTPOINT, 228),
+
+ /* 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),
+
+ /* Set if we should enable TLS false start. */
+ CINIT(SSL_FALSESTART, LONG, 233),
+
+ /* Do not squash dot-dot sequences */
+ CINIT(PATH_AS_IS, LONG, 234),
+
+ /* Proxy Service Name */
+ CINIT(PROXY_SERVICE_NAME, OBJECTPOINT, 235),
+
+ /* Service Name */
+ CINIT(SERVICE_NAME, OBJECTPOINT, 236),
+
+ /* Wait/don't wait for pipe/mutex to clarify */
+ CINIT(PIPEWAIT, LONG, 237),
+
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;
@@ -1472,13 +1677,10 @@ 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_WRITEDATA CURLOPT_FILE
-#define CURLOPT_READDATA CURLOPT_INFILE
-#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER
#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
/* These enums are for use with the CURLOPT_HTTP_VERSION option. */
@@ -1488,10 +1690,16 @@ enum {
for us! */
CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
+ CURL_HTTP_VERSION_2_0, /* please use HTTP 2.0 in the request */
CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
};
+/* Convenience definition simple because the name of the version is HTTP/2 and
+ not 2.0. The 2_0 version of the enum name was set while the version was
+ still planned to be 2.0 and we stick to it for compatibility. */
+#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
+
/*
* Public API enums for RTSP requests
*/
@@ -1525,21 +1733,33 @@ enum CURL_NETRC_OPTION {
enum {
CURL_SSLVERSION_DEFAULT,
- CURL_SSLVERSION_TLSv1,
+ CURL_SSLVERSION_TLSv1, /* TLS 1.x */
CURL_SSLVERSION_SSLv2,
CURL_SSLVERSION_SSLv3,
+ CURL_SSLVERSION_TLSv1_0,
+ CURL_SSLVERSION_TLSv1_1,
+ CURL_SSLVERSION_TLSv1_2,
CURL_SSLVERSION_LAST /* never use, keep last */
};
+enum CURL_TLSAUTH {
+ CURL_TLSAUTH_NONE,
+ CURL_TLSAUTH_SRP,
+ CURL_TLSAUTH_LAST /* never use, keep last */
+};
+
/* symbols to use with CURLOPT_POSTREDIR.
- CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that
- CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */
+ CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
+ can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
+ | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
#define CURL_REDIR_GET_ALL 0
#define CURL_REDIR_POST_301 1
#define CURL_REDIR_POST_302 2
-#define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302)
+#define CURL_REDIR_POST_303 4
+#define CURL_REDIR_POST_ALL \
+ (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
typedef enum {
CURL_TIMECOND_NONE,
@@ -1658,7 +1878,8 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
* Should return the buffer length passed to it as the argument "len" on
* success.
*/
-typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len);
+typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
+ size_t len);
/*
* NAME curl_formget()
@@ -1836,6 +2057,29 @@ struct curl_certinfo {
format "name: value" */
};
+/* enum for the different supported SSL backends */
+typedef enum {
+ CURLSSLBACKEND_NONE = 0,
+ CURLSSLBACKEND_OPENSSL = 1,
+ CURLSSLBACKEND_GNUTLS = 2,
+ CURLSSLBACKEND_NSS = 3,
+ CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */
+ CURLSSLBACKEND_GSKIT = 5,
+ CURLSSLBACKEND_POLARSSL = 6,
+ CURLSSLBACKEND_CYASSL = 7,
+ CURLSSLBACKEND_SCHANNEL = 8,
+ CURLSSLBACKEND_DARWINSSL = 9,
+ CURLSSLBACKEND_AXTLS = 10
+} curl_sslbackend;
+
+/* Information about the SSL library used and the respective internal SSL
+ handle, which can be used to obtain further information regarding the
+ connection. Asked for with CURLINFO_TLS_SESSION. */
+struct curl_tlssessioninfo {
+ curl_sslbackend backend;
+ void *internals;
+};
+
#define CURLINFO_STRING 0x100000
#define CURLINFO_LONG 0x200000
#define CURLINFO_DOUBLE 0x300000
@@ -1887,9 +2131,10 @@ typedef enum {
CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
+ CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43,
/* Fill in new entries below here! */
- CURLINFO_LASTONE = 42
+ CURLINFO_LASTONE = 43
} CURLINFO;
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
@@ -1913,6 +2158,7 @@ typedef enum {
#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
#define CURL_GLOBAL_NOTHING 0
#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
+#define CURL_GLOBAL_ACK_EINTR (1<<2)
/*****************************************************************************
@@ -1957,8 +2203,9 @@ typedef enum {
CURLSHE_BAD_OPTION, /* 1 */
CURLSHE_IN_USE, /* 2 */
CURLSHE_INVALID, /* 3 */
- CURLSHE_NOMEM, /* out of memory */
- CURLSHE_LAST /* never use */
+ CURLSHE_NOMEM, /* 4 out of memory */
+ CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */
+ CURLSHE_LAST /* never use */
} CURLSHcode;
typedef enum {
@@ -2023,22 +2270,32 @@ typedef struct {
} curl_version_info_data;
-#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_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 */
+
+ /*
* NAME curl_version_info()
*
* DESCRIPTION
diff --git a/include/curl/curlbuild.h b/include/curl/curlbuild.h
deleted file mode 100644
index d0b32acb..00000000
--- a/include/curl/curlbuild.h
+++ /dev/null
@@ -1,583 +0,0 @@
-#ifndef __CURL_CURLBUILD_H
-#define __CURL_CURLBUILD_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-/* ================================================================ */
-/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
-/* ================================================================ */
-
-/*
- * NOTE 1:
- * -------
- *
- * See file include/curl/curlbuild.h.in, run configure, and forget
- * that this file exists it is only used for non-configure systems.
- * But you can keep reading if you want ;-)
- *
- */
-
-/* ================================================================ */
-/* NOTES FOR NON-CONFIGURE SYSTEMS */
-/* ================================================================ */
-
-/*
- * NOTE 1:
- * -------
- *
- * Nothing in this file is intended to be modified or adjusted by the
- * curl library user nor by the curl library builder.
- *
- * If you think that something actually needs to be changed, adjusted
- * or fixed in this file, then, report it on the libcurl development
- * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/
- *
- * Try to keep one section per platform, compiler and architecture,
- * otherwise, if an existing section is reused for a different one and
- * later on the original is adjusted, probably the piggybacking one can
- * be adversely changed.
- *
- * In order to differentiate between platforms/compilers/architectures
- * use only compiler built in predefined preprocessor symbols.
- *
- * This header file shall only export symbols which are 'curl' or 'CURL'
- * prefixed, otherwise public name space would be polluted.
- *
- * NOTE 2:
- * -------
- *
- * For any given platform/compiler curl_off_t must be typedef'ed to a
- * 64-bit wide signed integral data type. The width of this data type
- * must remain constant and independent of any possible large file
- * support settings.
- *
- * As an exception to the above, curl_off_t shall be typedef'ed to a
- * 32-bit wide signed integral data type if there is no 64-bit type.
- *
- * As a general rule, curl_off_t shall not be mapped to off_t. This
- * rule shall only be violated if off_t is the only 64-bit data type
- * available and the size of off_t is independent of large file support
- * settings. Keep your build on the safe side avoiding an off_t gating.
- * If you have a 64-bit off_t then take for sure that another 64-bit
- * data type exists, dig deeper and you will find it.
- *
- * NOTE 3:
- * -------
- *
- * Right now you might be staring at file include/curl/curlbuild.h.dist or
- * at file include/curl/curlbuild.h, this is due to the following reason:
- * file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h
- * when the libcurl source code distribution archive file is created.
- *
- * File include/curl/curlbuild.h.dist is not included in the distribution
- * archive. File include/curl/curlbuild.h is not present in the git tree.
- *
- * The distributed include/curl/curlbuild.h file is only intended to be used
- * on systems which can not run the also distributed configure script.
- *
- * On systems capable of running the configure script, the configure process
- * will overwrite the distributed include/curl/curlbuild.h file with one that
- * is suitable and specific to the library being configured and built, which
- * is generated from the include/curl/curlbuild.h.in template file.
- *
- * If you check out from git on a non-configure platform, you must run the
- * appropriate buildconf* script to set up curlbuild.h and other local files.
- *
- */
-
-/* ================================================================ */
-/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
-/* ================================================================ */
-
-#ifdef CURL_SIZEOF_LONG
-# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
-#endif
-
-#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
-# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
-#endif
-
-#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
-# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
-#endif
-
-#ifdef CURL_TYPEOF_CURL_OFF_T
-# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
-#endif
-
-#ifdef CURL_FORMAT_CURL_OFF_T
-# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
-#endif
-
-#ifdef CURL_FORMAT_CURL_OFF_TU
-# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
-#endif
-
-#ifdef CURL_FORMAT_OFF_T
-# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
-#endif
-
-#ifdef CURL_SIZEOF_CURL_OFF_T
-# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
-#endif
-
-#ifdef CURL_SUFFIX_CURL_OFF_T
-# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
-#endif
-
-#ifdef CURL_SUFFIX_CURL_OFF_TU
-# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
- Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
-#endif
-
-/* ================================================================ */
-/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */
-/* ================================================================ */
-
-#if defined(__DJGPP__) || defined(__GO32__)
-# if defined(__DJGPP__) && (__DJGPP__ > 1)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# else
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__SALFORDC__)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__BORLANDC__)
-# if (__BORLANDC__ < 0x520)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# else
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T __int64
-# define CURL_FORMAT_CURL_OFF_T "I64d"
-# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_FORMAT_OFF_T "%I64d"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__TURBOC__)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__WATCOMC__)
-# if defined(__386__)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T __int64
-# define CURL_FORMAT_CURL_OFF_T "I64d"
-# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_FORMAT_OFF_T "%I64d"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# else
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__POCC__)
-# if (__POCC__ < 280)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# elif defined(_MSC_VER)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T __int64
-# define CURL_FORMAT_CURL_OFF_T "I64d"
-# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_FORMAT_OFF_T "%I64d"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# else
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__LCC__)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__SYMBIAN32__)
-# if defined(__EABI__) /* Treat all ARM compilers equally */
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# elif defined(__CW32__)
-# pragma longlong on
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# elif defined(__VC32__)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T __int64
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__MWERKS__)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(_WIN32_WCE)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T __int64
-# define CURL_FORMAT_CURL_OFF_T "I64d"
-# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_FORMAT_OFF_T "%I64d"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__MINGW32__)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "I64d"
-# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_FORMAT_OFF_T "%I64d"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__VMS)
-# if defined(__VAX)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# else
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-#elif defined(__OS400__)
-# if defined(__ILEC400__)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-# define CURL_PULL_SYS_TYPES_H 1
-# define CURL_PULL_SYS_SOCKET_H 1
-# endif
-
-#elif defined(__MVS__)
-# if defined(__IBMC__) || defined(__IBMCPP__)
-# if defined(_ILP32)
-# define CURL_SIZEOF_LONG 4
-# elif defined(_LP64)
-# define CURL_SIZEOF_LONG 8
-# endif
-# if defined(_LONG_LONG)
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# elif defined(_LP64)
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# else
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-# define CURL_PULL_SYS_TYPES_H 1
-# define CURL_PULL_SYS_SOCKET_H 1
-# endif
-
-#elif defined(__370__)
-# if defined(__IBMC__) || defined(__IBMCPP__)
-# if defined(_ILP32)
-# define CURL_SIZEOF_LONG 4
-# elif defined(_LP64)
-# define CURL_SIZEOF_LONG 8
-# endif
-# if defined(_LONG_LONG)
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# elif defined(_LP64)
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# else
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-# define CURL_PULL_SYS_TYPES_H 1
-# define CURL_PULL_SYS_SOCKET_H 1
-# endif
-
-#elif defined(TPF)
-# define CURL_SIZEOF_LONG 8
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-/* ===================================== */
-/* KEEP MSVC THE PENULTIMATE ENTRY */
-/* ===================================== */
-
-#elif defined(_MSC_VER)
-# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T __int64
-# define CURL_FORMAT_CURL_OFF_T "I64d"
-# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_FORMAT_OFF_T "%I64d"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# else
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 4
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-
-/* ===================================== */
-/* KEEP GENERIC GCC THE LAST ENTRY */
-/* ===================================== */
-
-#elif defined(__GNUC__)
-# if defined(__i386__) || defined(__ppc__)
-# define CURL_SIZEOF_LONG 4
-# define CURL_TYPEOF_CURL_OFF_T long long
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_SUFFIX_CURL_OFF_TU ULL
-# elif defined(__x86_64__) || defined(__ppc64__)
-# define CURL_SIZEOF_LONG 8
-# define CURL_TYPEOF_CURL_OFF_T long
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SIZEOF_CURL_OFF_T 8
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
-# define CURL_SIZEOF_CURL_SOCKLEN_T 4
-# define CURL_PULL_SYS_TYPES_H 1
-# define CURL_PULL_SYS_SOCKET_H 1
-
-#else
-# error "Unknown non-configure build target!"
- Error Compilation_aborted_Unknown_non_configure_build_target
-#endif
-
-/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */
-/* sys/types.h is required here to properly make type definitions below. */
-#ifdef CURL_PULL_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
-/* sys/socket.h is required here to properly make type definitions below. */
-#ifdef CURL_PULL_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-
-/* Data type definition of curl_socklen_t. */
-
-#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
- typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
-#endif
-
-/* Data type definition of curl_off_t. */
-
-#ifdef CURL_TYPEOF_CURL_OFF_T
- typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
-#endif
-
-#endif /* __CURL_CURLBUILD_H */
diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake
index 3aa772fc..60bc7a70 100644
--- a/include/curl/curlbuild.h.cmake
+++ b/include/curl/curlbuild.h.cmake
@@ -58,51 +58,52 @@
/* ================================================================ */
#ifdef CURL_SIZEOF_LONG
-# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
+#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
#endif
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
-# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
#endif
#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
-# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
#endif
+
#ifdef CURL_TYPEOF_CURL_OFF_T
-# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
#endif
#ifdef CURL_FORMAT_CURL_OFF_T
-# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
#endif
#ifdef CURL_FORMAT_CURL_OFF_TU
-# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
+#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
#endif
#ifdef CURL_FORMAT_OFF_T
-# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
#endif
#ifdef CURL_SIZEOF_CURL_OFF_T
-# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
#endif
#ifdef CURL_SUFFIX_CURL_OFF_T
-# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
#endif
#ifdef CURL_SUFFIX_CURL_OFF_TU
-# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
+#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
#endif
@@ -110,71 +111,87 @@
/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
/* ================================================================ */
+/* Configure process defines this to 1 when it finds out that system */
+/* header file ws2tcpip.h must be included by the external interface. */
+#cmakedefine CURL_PULL_WS2TCPIP_H
+#ifdef CURL_PULL_WS2TCPIP_H
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# include <winsock2.h>
+# include <ws2tcpip.h>
+#endif
+
/* Configure process defines this to 1 when it finds out that system */
/* header file sys/types.h must be included by the external interface. */
-#cmakedefine CURL_PULL_SYS_TYPES_H ${CURL_PULL_SYS_TYPES_H}
+#cmakedefine CURL_PULL_SYS_TYPES_H
#ifdef CURL_PULL_SYS_TYPES_H
# include <sys/types.h>
#endif
/* Configure process defines this to 1 when it finds out that system */
/* header file stdint.h must be included by the external interface. */
-#cmakedefine CURL_PULL_STDINT_H ${CURL_PULL_STDINT_H}
+#cmakedefine CURL_PULL_STDINT_H
#ifdef CURL_PULL_STDINT_H
# include <stdint.h>
#endif
/* Configure process defines this to 1 when it finds out that system */
/* header file inttypes.h must be included by the external interface. */
-#cmakedefine CURL_PULL_INTTYPES_H ${CURL_PULL_INTTYPES_H}
+#cmakedefine CURL_PULL_INTTYPES_H
#ifdef CURL_PULL_INTTYPES_H
# include <inttypes.h>
#endif
+/* Configure process defines this to 1 when it finds out that system */
+/* header file sys/socket.h must be included by the external interface. */
+#cmakedefine CURL_PULL_SYS_SOCKET_H
+#ifdef CURL_PULL_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+/* Configure process defines this to 1 when it finds out that system */
+/* header file sys/poll.h must be included by the external interface. */
+#cmakedefine CURL_PULL_SYS_POLL_H
+#ifdef CURL_PULL_SYS_POLL_H
+# include <sys/poll.h>
+#endif
+
/* The size of `long', as computed by sizeof. */
-#cmakedefine CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG}
+#define CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG}
/* Integral data type used for curl_socklen_t. */
-#cmakedefine CURL_TYPEOF_CURL_SOCKLEN_T ${CURL_TYPEOF_CURL_SOCKLEN_T}
-
-/* on windows socklen_t is in here */
-#ifdef _WIN32
-# include <winsock2.h>
-# include <ws2tcpip.h>
-#endif
+#define CURL_TYPEOF_CURL_SOCKLEN_T ${CURL_TYPEOF_CURL_SOCKLEN_T}
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
+/* The size of `curl_socklen_t', as computed by sizeof. */
+#define CURL_SIZEOF_CURL_SOCKLEN_T ${CURL_SIZEOF_CURL_SOCKLEN_T}
/* Data type definition of curl_socklen_t. */
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
-/* The size of `curl_socklen_t', as computed by sizeof. */
-#cmakedefine CURL_SIZEOF_CURL_SOCKLEN_T ${CURL_SIZEOF_CURL_SOCKLEN_T}
-
/* Signed integral data type used for curl_off_t. */
-#cmakedefine CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T}
+#define CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T}
/* Data type definition of curl_off_t. */
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
/* curl_off_t formatting string directive without "%" conversion specifier. */
-#cmakedefine CURL_FORMAT_CURL_OFF_T "${CURL_FORMAT_CURL_OFF_T}"
+#define CURL_FORMAT_CURL_OFF_T "${CURL_FORMAT_CURL_OFF_T}"
/* unsigned curl_off_t formatting string without "%" conversion specifier. */
-#cmakedefine CURL_FORMAT_CURL_OFF_TU "${CURL_FORMAT_CURL_OFF_TU}"
+#define CURL_FORMAT_CURL_OFF_TU "${CURL_FORMAT_CURL_OFF_TU}"
/* curl_off_t formatting string directive with "%" conversion specifier. */
-#cmakedefine CURL_FORMAT_OFF_T "${CURL_FORMAT_OFF_T}"
+#define CURL_FORMAT_OFF_T "${CURL_FORMAT_OFF_T}"
/* The size of `curl_off_t', as computed by sizeof. */
-#cmakedefine CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T}
+#define CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T}
/* curl_off_t constant suffix. */
-#cmakedefine CURL_SUFFIX_CURL_OFF_T ${CURL_SUFFIX_CURL_OFF_T}
+#define CURL_SUFFIX_CURL_OFF_T ${CURL_SUFFIX_CURL_OFF_T}
/* unsigned curl_off_t constant suffix. */
-#cmakedefine CURL_SUFFIX_CURL_OFF_TU ${CURL_SUFFIX_CURL_OFF_TU}
+#define CURL_SUFFIX_CURL_OFF_TU ${CURL_SUFFIX_CURL_OFF_TU}
#endif /* __CURL_CURLBUILD_H */
diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist
new file mode 100644
index 00000000..f09419a8
--- /dev/null
+++ b/include/curl/curlbuild.h.dist
@@ -0,0 +1,585 @@
+#ifndef __CURL_CURLBUILD_H
+#define __CURL_CURLBUILD_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/* ================================================================ */
+/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
+/* ================================================================ */
+
+/*
+ * NOTE 1:
+ * -------
+ *
+ * See file include/curl/curlbuild.h.in, run configure, and forget
+ * that this file exists it is only used for non-configure systems.
+ * But you can keep reading if you want ;-)
+ *
+ */
+
+/* ================================================================ */
+/* NOTES FOR NON-CONFIGURE SYSTEMS */
+/* ================================================================ */
+
+/*
+ * NOTE 1:
+ * -------
+ *
+ * Nothing in this file is intended to be modified or adjusted by the
+ * curl library user nor by the curl library builder.
+ *
+ * If you think that something actually needs to be changed, adjusted
+ * or fixed in this file, then, report it on the libcurl development
+ * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/
+ *
+ * Try to keep one section per platform, compiler and architecture,
+ * otherwise, if an existing section is reused for a different one and
+ * later on the original is adjusted, probably the piggybacking one can
+ * be adversely changed.
+ *
+ * In order to differentiate between platforms/compilers/architectures
+ * use only compiler built in predefined preprocessor symbols.
+ *
+ * This header file shall only export symbols which are 'curl' or 'CURL'
+ * prefixed, otherwise public name space would be polluted.
+ *
+ * NOTE 2:
+ * -------
+ *
+ * For any given platform/compiler curl_off_t must be typedef'ed to a
+ * 64-bit wide signed integral data type. The width of this data type
+ * must remain constant and independent of any possible large file
+ * support settings.
+ *
+ * As an exception to the above, curl_off_t shall be typedef'ed to a
+ * 32-bit wide signed integral data type if there is no 64-bit type.
+ *
+ * As a general rule, curl_off_t shall not be mapped to off_t. This
+ * rule shall only be violated if off_t is the only 64-bit data type
+ * available and the size of off_t is independent of large file support
+ * settings. Keep your build on the safe side avoiding an off_t gating.
+ * If you have a 64-bit off_t then take for sure that another 64-bit
+ * data type exists, dig deeper and you will find it.
+ *
+ * NOTE 3:
+ * -------
+ *
+ * Right now you might be staring at file include/curl/curlbuild.h.dist or
+ * at file include/curl/curlbuild.h, this is due to the following reason:
+ * file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h
+ * when the libcurl source code distribution archive file is created.
+ *
+ * File include/curl/curlbuild.h.dist is not included in the distribution
+ * archive. File include/curl/curlbuild.h is not present in the git tree.
+ *
+ * The distributed include/curl/curlbuild.h file is only intended to be used
+ * on systems which can not run the also distributed configure script.
+ *
+ * On systems capable of running the configure script, the configure process
+ * will overwrite the distributed include/curl/curlbuild.h file with one that
+ * is suitable and specific to the library being configured and built, which
+ * is generated from the include/curl/curlbuild.h.in template file.
+ *
+ * If you check out from git on a non-configure platform, you must run the
+ * appropriate buildconf* script to set up curlbuild.h and other local files.
+ *
+ */
+
+/* ================================================================ */
+/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
+/* ================================================================ */
+
+#ifdef CURL_SIZEOF_LONG
+# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
+#endif
+
+#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
+# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
+#endif
+
+#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
+# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
+#endif
+
+#ifdef CURL_TYPEOF_CURL_OFF_T
+# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_FORMAT_CURL_OFF_T
+# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_FORMAT_CURL_OFF_TU
+# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
+#endif
+
+#ifdef CURL_FORMAT_OFF_T
+# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
+#endif
+
+#ifdef CURL_SIZEOF_CURL_OFF_T
+# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_SUFFIX_CURL_OFF_T
+# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_SUFFIX_CURL_OFF_TU
+# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
+ Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
+#endif
+
+/* ================================================================ */
+/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */
+/* ================================================================ */
+
+#if defined(__DJGPP__) || defined(__GO32__)
+# if defined(__DJGPP__) && (__DJGPP__ > 1)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# else
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__SALFORDC__)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__BORLANDC__)
+# if (__BORLANDC__ < 0x520)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# else
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T __int64
+# define CURL_FORMAT_CURL_OFF_T "I64d"
+# define CURL_FORMAT_CURL_OFF_TU "I64u"
+# define CURL_FORMAT_OFF_T "%I64d"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T i64
+# define CURL_SUFFIX_CURL_OFF_TU ui64
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__TURBOC__)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__WATCOMC__)
+# if defined(__386__)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T __int64
+# define CURL_FORMAT_CURL_OFF_T "I64d"
+# define CURL_FORMAT_CURL_OFF_TU "I64u"
+# define CURL_FORMAT_OFF_T "%I64d"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T i64
+# define CURL_SUFFIX_CURL_OFF_TU ui64
+# else
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__POCC__)
+# if (__POCC__ < 280)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# elif defined(_MSC_VER)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T __int64
+# define CURL_FORMAT_CURL_OFF_T "I64d"
+# define CURL_FORMAT_CURL_OFF_TU "I64u"
+# define CURL_FORMAT_OFF_T "%I64d"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T i64
+# define CURL_SUFFIX_CURL_OFF_TU ui64
+# else
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__LCC__)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__SYMBIAN32__)
+# if defined(__EABI__) /* Treat all ARM compilers equally */
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# elif defined(__CW32__)
+# pragma longlong on
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# elif defined(__VC32__)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T __int64
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__MWERKS__)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(_WIN32_WCE)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T __int64
+# define CURL_FORMAT_CURL_OFF_T "I64d"
+# define CURL_FORMAT_CURL_OFF_TU "I64u"
+# define CURL_FORMAT_OFF_T "%I64d"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T i64
+# define CURL_SUFFIX_CURL_OFF_TU ui64
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__MINGW32__)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "I64d"
+# define CURL_FORMAT_CURL_OFF_TU "I64u"
+# define CURL_FORMAT_OFF_T "%I64d"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__VMS)
+# if defined(__VAX)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# else
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__OS400__)
+# if defined(__ILEC400__)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+# define CURL_PULL_SYS_TYPES_H 1
+# define CURL_PULL_SYS_SOCKET_H 1
+# endif
+
+#elif defined(__MVS__)
+# if defined(__IBMC__) || defined(__IBMCPP__)
+# if defined(_ILP32)
+# define CURL_SIZEOF_LONG 4
+# elif defined(_LP64)
+# define CURL_SIZEOF_LONG 8
+# endif
+# if defined(_LONG_LONG)
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# elif defined(_LP64)
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# else
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+# define CURL_PULL_SYS_TYPES_H 1
+# define CURL_PULL_SYS_SOCKET_H 1
+# endif
+
+#elif defined(__370__)
+# if defined(__IBMC__) || defined(__IBMCPP__)
+# if defined(_ILP32)
+# define CURL_SIZEOF_LONG 4
+# elif defined(_LP64)
+# define CURL_SIZEOF_LONG 8
+# endif
+# if defined(_LONG_LONG)
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# elif defined(_LP64)
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# else
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+# define CURL_PULL_SYS_TYPES_H 1
+# define CURL_PULL_SYS_SOCKET_H 1
+# endif
+
+#elif defined(TPF)
+# define CURL_SIZEOF_LONG 8
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+/* ===================================== */
+/* KEEP MSVC THE PENULTIMATE ENTRY */
+/* ===================================== */
+
+#elif defined(_MSC_VER)
+# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T __int64
+# define CURL_FORMAT_CURL_OFF_T "I64d"
+# define CURL_FORMAT_CURL_OFF_TU "I64u"
+# define CURL_FORMAT_OFF_T "%I64d"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T i64
+# define CURL_SUFFIX_CURL_OFF_TU ui64
+# else
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+/* ===================================== */
+/* KEEP GENERIC GCC THE LAST ENTRY */
+/* ===================================== */
+
+#elif defined(__GNUC__)
+# if defined(__ILP32__) || \
+ defined(__i386__) || defined(__ppc__) || defined(__arm__) || defined(__sparc__)
+# define CURL_SIZEOF_LONG 4
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# elif defined(__LP64__) || \
+ defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__)
+# define CURL_SIZEOF_LONG 8
+# define CURL_TYPEOF_CURL_OFF_T long
+# define CURL_FORMAT_CURL_OFF_T "ld"
+# define CURL_FORMAT_CURL_OFF_TU "lu"
+# define CURL_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# endif
+# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+# define CURL_SIZEOF_CURL_SOCKLEN_T 4
+# define CURL_PULL_SYS_TYPES_H 1
+# define CURL_PULL_SYS_SOCKET_H 1
+
+#else
+# error "Unknown non-configure build target!"
+ Error Compilation_aborted_Unknown_non_configure_build_target
+#endif
+
+/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */
+/* sys/types.h is required here to properly make type definitions below. */
+#ifdef CURL_PULL_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
+/* sys/socket.h is required here to properly make type definitions below. */
+#ifdef CURL_PULL_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+/* Data type definition of curl_socklen_t. */
+
+#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
+ typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
+#endif
+
+/* Data type definition of curl_off_t. */
+
+#ifdef CURL_TYPEOF_CURL_OFF_T
+ typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
+#endif
+
+#endif /* __CURL_CURLBUILD_H */
diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in
index cb1de80a..e29f195d 100644
--- a/include/curl/curlbuild.h.in
+++ b/include/curl/curlbuild.h.in
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,52 +58,52 @@
/* ================================================================ */
#ifdef CURL_SIZEOF_LONG
-# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
+#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
#endif
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
-# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
#endif
#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
-# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
#endif
#ifdef CURL_TYPEOF_CURL_OFF_T
-# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
#endif
#ifdef CURL_FORMAT_CURL_OFF_T
-# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
#endif
#ifdef CURL_FORMAT_CURL_OFF_TU
-# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
+#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
#endif
#ifdef CURL_FORMAT_OFF_T
-# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
#endif
#ifdef CURL_SIZEOF_CURL_OFF_T
-# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
#endif
#ifdef CURL_SUFFIX_CURL_OFF_T
-# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
#endif
#ifdef CURL_SUFFIX_CURL_OFF_TU
-# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
+#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
#endif
@@ -151,6 +151,13 @@
# include <sys/socket.h>
#endif
+/* Configure process defines this to 1 when it finds out that system */
+/* header file sys/poll.h must be included by the external interface. */
+#undef CURL_PULL_SYS_POLL_H
+#ifdef CURL_PULL_SYS_POLL_H
+# include <sys/poll.h>
+#endif
+
/* The size of `long', as computed by sizeof. */
#undef CURL_SIZEOF_LONG
diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h
index 8aad1df6..7c2ede35 100644
--- a/include/curl/curlrules.h
+++ b/include/curl/curlrules.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,7 +190,7 @@ typedef char
* CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
* these to be visible and exported by the external libcurl interface API,
* while also making them visible to the library internals, simply including
- * setup.h, without actually needing to include curl.h internally.
+ * curl_setup.h, without actually needing to include curl.h internally.
* If some day this section would grow big enough, all this should be moved
* to its own header file.
*/
@@ -216,14 +216,23 @@ typedef char
* Macros for minimum-width signed and unsigned curl_off_t integer constants.
*/
-#ifdef CURL_ISOCPP
-# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val ## Suffix
+#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)
+# define __CURL_OFF_T_C_HLPR2(x) x
+# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x)
+# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
+ __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)
+# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
+ __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)
#else
-# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix
+# ifdef CURL_ISOCPP
+# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix
+# else
+# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix
+# endif
+# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix)
+# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)
+# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)
#endif
-#define __CURL_OFF_T_C_HELPER1(Val,Suffix) __CURL_OFF_T_C_HELPER2(Val,Suffix)
-#define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T)
-#define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU)
/*
* Get rid of macros private to this header file.
@@ -239,6 +248,7 @@ typedef char
#undef CURL_PULL_WS2TCPIP_H
#undef CURL_PULL_SYS_TYPES_H
#undef CURL_PULL_SYS_SOCKET_H
+#undef CURL_PULL_SYS_POLL_H
#undef CURL_PULL_STDINT_H
#undef CURL_PULL_INTTYPES_H
diff --git a/include/curl/curlver.h b/include/curl/curlver.h
index e345f56d..be442eff 100644
--- a/include/curl/curlver.h
+++ b/include/curl/curlver.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 - 2010 Daniel Stenberg, <daniel@haxx.se>."
+#define LIBCURL_COPYRIGHT "1996 - 2015 Daniel Stenberg, <daniel@haxx.se>."
/* This is the version number of the libcurl package from which this header
file origins: */
-#define LIBCURL_VERSION "7.21.2"
+#define LIBCURL_VERSION "7.43.0-DEV"
/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 7
-#define LIBCURL_VERSION_MINOR 21
-#define LIBCURL_VERSION_PATCH 2
+#define LIBCURL_VERSION_MINOR 43
+#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
@@ -52,8 +52,12 @@
This 6-digit (24 bits) hexadecimal number does not show pre-release number,
and it is always a greater number in a more recent release. It makes
comparisons with greater than and less than work.
+
+ Note: This define is the full hex number and _does not_ use the
+ CURL_VERSION_BITS() macro since curl's own configure script greps for it
+ and needs it to contain the full number.
*/
-#define LIBCURL_VERSION_NUM 0x071502
+#define LIBCURL_VERSION_NUM 0x072B00
/*
* This is the date and time when the full source package was created. The
@@ -64,6 +68,10 @@
*
* "Mon Feb 12 11:35:33 UTC 2007"
*/
-#define LIBCURL_TIMESTAMP "Tue Oct 12 22:03:31 UTC 2010"
+#define LIBCURL_TIMESTAMP "DEV"
+
+#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
+#define CURL_AT_LEAST_VERSION(x,y,z) \
+ (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
#endif /* __CURL_CURLVER_H */
diff --git a/include/curl/easy.h b/include/curl/easy.h
index 1ddb4fe5..c1e3e760 100644
--- a/include/curl/easy.h
+++ b/include/curl/easy.h
@@ -53,8 +53,8 @@ CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
*
* Creates a new curl session handle with the same options set for the handle
* passed in. Duplicating a handle could only be a matter of cloning data and
- * options, internal state info and things like persistant connections cannot
- * be transfered. It is useful in multithreaded applications when you can run
+ * options, internal state info and things like persistent connections cannot
+ * be transferred. It is useful in multithreaded applications when you can run
* curl_easy_duphandle() for each new thread to avoid a series of identical
* curl_easy_setopt() invokes in every thread.
*/
diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h
index de7dd2f3..c6b0d767 100644
--- a/include/curl/mprintf.h
+++ b/include/curl/mprintf.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,15 +57,8 @@ CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
# undef vaprintf
# define printf curl_mprintf
# define fprintf curl_mfprintf
-#ifdef CURLDEBUG
-/* When built with CURLDEBUG we define away the sprintf() functions since we
- don't want internal code to be using them */
-# define sprintf sprintf_was_used
-# define vsprintf vsprintf_was_used
-#else
# define sprintf curl_msprintf
# define vsprintf curl_mvsprintf
-#endif
# define snprintf curl_msnprintf
# define vprintf curl_mvprintf
# define vfprintf curl_mvfprintf
diff --git a/include/curl/multi.h b/include/curl/multi.h
index f9656666..0d859f8f 100644
--- a/include/curl/multi.h
+++ b/include/curl/multi.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,6 +64,8 @@ typedef enum {
CURLM_INTERNAL_ERROR, /* this is a libcurl bug */
CURLM_BAD_SOCKET, /* the passed in socket argument did not match */
CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */
+ CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was
+ attempted to get added - again */
CURLM_LAST
} CURLMcode;
@@ -72,6 +74,11 @@ typedef enum {
curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */
#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM
+/* bitmask bits for CURLMOPT_PIPELINING */
+#define CURLPIPE_NOTHING 0L
+#define CURLPIPE_HTTP1 1L
+#define CURLPIPE_MULTIPLEX 2L
+
typedef enum {
CURLMSG_NONE, /* first, not used */
CURLMSG_DONE, /* This easy handle has completed. 'result' contains
@@ -89,6 +96,19 @@ struct CURLMsg {
};
typedef struct CURLMsg CURLMsg;
+/* Based on poll(2) structure and values.
+ * We don't use pollfd and POLL* constants explicitly
+ * to cover platforms without poll(). */
+#define CURL_WAIT_POLLIN 0x0001
+#define CURL_WAIT_POLLPRI 0x0002
+#define CURL_WAIT_POLLOUT 0x0004
+
+struct curl_waitfd {
+ curl_socket_t fd;
+ short events;
+ short revents; /* not supported yet */
+};
+
/*
* Name: curl_multi_init()
*
@@ -133,6 +153,20 @@ CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
fd_set *exc_fd_set,
int *max_fd);
+/*
+ * Name: curl_multi_wait()
+ *
+ * Desc: Poll on all fds within a CURLM set as well as any
+ * additional fds passed to the function.
+ *
+ * Returns: CURLMcode type, general multi error code.
+ */
+CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
+ struct curl_waitfd extra_fds[],
+ unsigned int extra_nfds,
+ int timeout_ms,
+ int *ret);
+
/*
* Name: curl_multi_perform()
*
@@ -311,6 +345,31 @@ typedef enum {
/* maximum number of entries in the connection cache */
CINIT(MAXCONNECTS, LONG, 6),
+ /* maximum number of (pipelining) connections to one host */
+ CINIT(MAX_HOST_CONNECTIONS, LONG, 7),
+
+ /* maximum number of requests in a pipeline */
+ CINIT(MAX_PIPELINE_LENGTH, LONG, 8),
+
+ /* a connection with a content-length longer than this
+ will not be considered for pipelining */
+ CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9),
+
+ /* a connection with a chunk length longer than this
+ will not be considered for pipelining */
+ CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10),
+
+ /* a list of site names(+port) that are blacklisted from
+ pipelining */
+ CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11),
+
+ /* a list of server types that are blacklisted from
+ pipelining */
+ CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12),
+
+ /* maximum number of open connections in total */
+ CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13),
+
CURLMOPT_LASTENTRY /* the last unused */
} CURLMoption;
diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h
index e6f74a95..13fb0fa9 100644
--- a/include/curl/typecheck-gcc.h
+++ b/include/curl/typecheck-gcc.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,66 +41,66 @@
#define curl_easy_setopt(handle, option, value) \
__extension__ ({ \
__typeof__ (option) _curl_opt = option; \
- if (__builtin_constant_p(_curl_opt)) { \
- if (_curl_is_long_option(_curl_opt)) \
- if (!_curl_is_long(value)) \
+ if(__builtin_constant_p(_curl_opt)) { \
+ if(_curl_is_long_option(_curl_opt)) \
+ if(!_curl_is_long(value)) \
_curl_easy_setopt_err_long(); \
- if (_curl_is_off_t_option(_curl_opt)) \
- if (!_curl_is_off_t(value)) \
+ if(_curl_is_off_t_option(_curl_opt)) \
+ if(!_curl_is_off_t(value)) \
_curl_easy_setopt_err_curl_off_t(); \
- if (_curl_is_string_option(_curl_opt)) \
- if (!_curl_is_string(value)) \
+ if(_curl_is_string_option(_curl_opt)) \
+ if(!_curl_is_string(value)) \
_curl_easy_setopt_err_string(); \
- if (_curl_is_write_cb_option(_curl_opt)) \
- if (!_curl_is_write_cb(value)) \
+ if(_curl_is_write_cb_option(_curl_opt)) \
+ if(!_curl_is_write_cb(value)) \
_curl_easy_setopt_err_write_callback(); \
- if ((_curl_opt) == CURLOPT_READFUNCTION) \
- if (!_curl_is_read_cb(value)) \
+ if((_curl_opt) == CURLOPT_READFUNCTION) \
+ if(!_curl_is_read_cb(value)) \
_curl_easy_setopt_err_read_cb(); \
- if ((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
- if (!_curl_is_ioctl_cb(value)) \
+ if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
+ if(!_curl_is_ioctl_cb(value)) \
_curl_easy_setopt_err_ioctl_cb(); \
- if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
- if (!_curl_is_sockopt_cb(value)) \
+ if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
+ if(!_curl_is_sockopt_cb(value)) \
_curl_easy_setopt_err_sockopt_cb(); \
- if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
- if (!_curl_is_opensocket_cb(value)) \
+ if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
+ if(!_curl_is_opensocket_cb(value)) \
_curl_easy_setopt_err_opensocket_cb(); \
- if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
- if (!_curl_is_progress_cb(value)) \
+ if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
+ if(!_curl_is_progress_cb(value)) \
_curl_easy_setopt_err_progress_cb(); \
- if ((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
- if (!_curl_is_debug_cb(value)) \
+ if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
+ if(!_curl_is_debug_cb(value)) \
_curl_easy_setopt_err_debug_cb(); \
- if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
- if (!_curl_is_ssl_ctx_cb(value)) \
+ if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
+ if(!_curl_is_ssl_ctx_cb(value)) \
_curl_easy_setopt_err_ssl_ctx_cb(); \
- if (_curl_is_conv_cb_option(_curl_opt)) \
- if (!_curl_is_conv_cb(value)) \
+ if(_curl_is_conv_cb_option(_curl_opt)) \
+ if(!_curl_is_conv_cb(value)) \
_curl_easy_setopt_err_conv_cb(); \
- if ((_curl_opt) == CURLOPT_SEEKFUNCTION) \
- if (!_curl_is_seek_cb(value)) \
+ if((_curl_opt) == CURLOPT_SEEKFUNCTION) \
+ if(!_curl_is_seek_cb(value)) \
_curl_easy_setopt_err_seek_cb(); \
- if (_curl_is_cb_data_option(_curl_opt)) \
- if (!_curl_is_cb_data(value)) \
+ if(_curl_is_cb_data_option(_curl_opt)) \
+ if(!_curl_is_cb_data(value)) \
_curl_easy_setopt_err_cb_data(); \
- if ((_curl_opt) == CURLOPT_ERRORBUFFER) \
- if (!_curl_is_error_buffer(value)) \
+ if((_curl_opt) == CURLOPT_ERRORBUFFER) \
+ if(!_curl_is_error_buffer(value)) \
_curl_easy_setopt_err_error_buffer(); \
- if ((_curl_opt) == CURLOPT_STDERR) \
- if (!_curl_is_FILE(value)) \
+ if((_curl_opt) == CURLOPT_STDERR) \
+ if(!_curl_is_FILE(value)) \
_curl_easy_setopt_err_FILE(); \
- if (_curl_is_postfields_option(_curl_opt)) \
- if (!_curl_is_postfields(value)) \
+ if(_curl_is_postfields_option(_curl_opt)) \
+ if(!_curl_is_postfields(value)) \
_curl_easy_setopt_err_postfields(); \
- if ((_curl_opt) == CURLOPT_HTTPPOST) \
- if (!_curl_is_arr((value), struct curl_httppost)) \
+ if((_curl_opt) == CURLOPT_HTTPPOST) \
+ if(!_curl_is_arr((value), struct curl_httppost)) \
_curl_easy_setopt_err_curl_httpost(); \
- if (_curl_is_slist_option(_curl_opt)) \
- if (!_curl_is_arr((value), struct curl_slist)) \
+ if(_curl_is_slist_option(_curl_opt)) \
+ if(!_curl_is_arr((value), struct curl_slist)) \
_curl_easy_setopt_err_curl_slist(); \
- if ((_curl_opt) == CURLOPT_SHARE) \
- if (!_curl_is_ptr((value), CURLSH)) \
+ if((_curl_opt) == CURLOPT_SHARE) \
+ if(!_curl_is_ptr((value), CURLSH)) \
_curl_easy_setopt_err_CURLSH(); \
} \
curl_easy_setopt(handle, _curl_opt, value); \
@@ -111,18 +111,18 @@ __extension__ ({ \
#define curl_easy_getinfo(handle, info, arg) \
__extension__ ({ \
__typeof__ (info) _curl_info = info; \
- if (__builtin_constant_p(_curl_info)) { \
- if (_curl_is_string_info(_curl_info)) \
- if (!_curl_is_arr((arg), char *)) \
+ if(__builtin_constant_p(_curl_info)) { \
+ if(_curl_is_string_info(_curl_info)) \
+ if(!_curl_is_arr((arg), char *)) \
_curl_easy_getinfo_err_string(); \
- if (_curl_is_long_info(_curl_info)) \
- if (!_curl_is_arr((arg), long)) \
+ if(_curl_is_long_info(_curl_info)) \
+ if(!_curl_is_arr((arg), long)) \
_curl_easy_getinfo_err_long(); \
- if (_curl_is_double_info(_curl_info)) \
- if (!_curl_is_arr((arg), double)) \
+ if(_curl_is_double_info(_curl_info)) \
+ if(!_curl_is_arr((arg), double)) \
_curl_easy_getinfo_err_double(); \
- if (_curl_is_slist_info(_curl_info)) \
- if (!_curl_is_arr((arg), struct curl_slist *)) \
+ if(_curl_is_slist_info(_curl_info)) \
+ if(!_curl_is_arr((arg), struct curl_slist *)) \
_curl_easy_getinfo_err_curl_slist(); \
} \
curl_easy_getinfo(handle, _curl_info, arg); \
@@ -141,15 +141,17 @@ __extension__ ({ \
/* To define a new warning, use _CURL_WARNING(identifier, "message") */
#define _CURL_WARNING(id, message) \
- static void __attribute__((warning(message))) __attribute__((unused)) \
- __attribute__((noinline)) id(void) { __asm__(""); }
+ static void __attribute__((__warning__(message))) \
+ __attribute__((__unused__)) __attribute__((__noinline__)) \
+ id(void) { __asm__(""); }
_CURL_WARNING(_curl_easy_setopt_err_long,
"curl_easy_setopt expects a long argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_curl_off_t,
"curl_easy_setopt expects a curl_off_t argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_string,
- "curl_easy_setopt expects a string (char* or char[]) argument for this option"
+ "curl_easy_setopt expects a "
+ "string (char* or char[]) argument for this option"
)
_CURL_WARNING(_curl_easy_setopt_err_write_callback,
"curl_easy_setopt expects a curl_write_callback argument for this option")
@@ -160,7 +162,8 @@ _CURL_WARNING(_curl_easy_setopt_err_ioctl_cb,
_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb,
"curl_easy_setopt expects a curl_sockopt_callback argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb,
- "curl_easy_setopt expects a curl_opensocket_callback argument for this option"
+ "curl_easy_setopt expects a "
+ "curl_opensocket_callback argument for this option"
)
_CURL_WARNING(_curl_easy_setopt_err_progress_cb,
"curl_easy_setopt expects a curl_progress_callback argument for this option")
@@ -173,9 +176,11 @@ _CURL_WARNING(_curl_easy_setopt_err_conv_cb,
_CURL_WARNING(_curl_easy_setopt_err_seek_cb,
"curl_easy_setopt expects a curl_seek_callback argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_cb_data,
- "curl_easy_setopt expects a private data pointer as argument for this option")
+ "curl_easy_setopt expects a "
+ "private data pointer as argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_error_buffer,
- "curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option")
+ "curl_easy_setopt expects a "
+ "char buffer of CURL_ERROR_SIZE as argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_FILE,
"curl_easy_setopt expects a FILE* argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_postfields,
@@ -224,7 +229,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
(option) == CURLOPT_PROXYUSERNAME || \
(option) == CURLOPT_PROXYPASSWORD || \
(option) == CURLOPT_NOPROXY || \
- (option) == CURLOPT_ENCODING || \
+ (option) == CURLOPT_ACCEPT_ENCODING || \
(option) == CURLOPT_REFERER || \
(option) == CURLOPT_USERAGENT || \
(option) == CURLOPT_COOKIE || \
@@ -259,6 +264,14 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
(option) == CURLOPT_RTSP_SESSION_ID || \
(option) == CURLOPT_RTSP_STREAM_URI || \
(option) == CURLOPT_RTSP_TRANSPORT || \
+ (option) == CURLOPT_XOAUTH2_BEARER || \
+ (option) == CURLOPT_DNS_SERVERS || \
+ (option) == CURLOPT_DNS_INTERFACE || \
+ (option) == CURLOPT_DNS_LOCAL_IP4 || \
+ (option) == CURLOPT_DNS_LOCAL_IP6 || \
+ (option) == CURLOPT_LOGIN_OPTIONS || \
+ (option) == CURLOPT_PROXY_SERVICE_NAME || \
+ (option) == CURLOPT_SERVICE_NAME || \
0)
/* evaluates to true if option takes a curl_write_callback argument */
@@ -280,7 +293,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
(option) == CURLOPT_SOCKOPTDATA || \
(option) == CURLOPT_OPENSOCKETDATA || \
(option) == CURLOPT_PROGRESSDATA || \
- (option) == CURLOPT_WRITEHEADER || \
+ (option) == CURLOPT_HEADERDATA || \
(option) == CURLOPT_DEBUGDATA || \
(option) == CURLOPT_SSL_CTX_DATA || \
(option) == CURLOPT_SEEKDATA || \
@@ -388,7 +401,8 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
/* XXX: also check size of an char[] array? */
#define _curl_is_error_buffer(expr) \
- (__builtin_types_compatible_p(__typeof__(expr), char *) || \
+ (_curl_is_NULL(expr) || \
+ __builtin_types_compatible_p(__typeof__(expr), char *) || \
__builtin_types_compatible_p(__typeof__(expr), char[]))
/* evaluates to true if expr is of type (const) void* or (const) FILE* */
@@ -481,7 +495,8 @@ typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);
typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t,
curlsocktype);
-/* evaluates to true if expr is of type curl_opensocket_callback or "similar" */
+/* evaluates to true if expr is of type curl_opensocket_callback or
+ "similar" */
#define _curl_is_opensocket_cb(expr) \
(_curl_is_NULL(expr) || \
__builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\
@@ -516,7 +531,11 @@ typedef int (_curl_progress_callback2)(const void *,
_curl_callback_compatible((expr), _curl_debug_callback1) || \
_curl_callback_compatible((expr), _curl_debug_callback2) || \
_curl_callback_compatible((expr), _curl_debug_callback3) || \
- _curl_callback_compatible((expr), _curl_debug_callback4))
+ _curl_callback_compatible((expr), _curl_debug_callback4) || \
+ _curl_callback_compatible((expr), _curl_debug_callback5) || \
+ _curl_callback_compatible((expr), _curl_debug_callback6) || \
+ _curl_callback_compatible((expr), _curl_debug_callback7) || \
+ _curl_callback_compatible((expr), _curl_debug_callback8))
typedef int (_curl_debug_callback1) (CURL *,
curl_infotype, char *, size_t, void *);
typedef int (_curl_debug_callback2) (CURL *,
@@ -525,6 +544,14 @@ typedef int (_curl_debug_callback3) (CURL *,
curl_infotype, const char *, size_t, void *);
typedef int (_curl_debug_callback4) (CURL *,
curl_infotype, const char *, size_t, const void *);
+typedef int (_curl_debug_callback5) (CURL *,
+ curl_infotype, unsigned char *, size_t, void *);
+typedef int (_curl_debug_callback6) (CURL *,
+ curl_infotype, unsigned char *, size_t, const void *);
+typedef int (_curl_debug_callback7) (CURL *,
+ curl_infotype, const unsigned char *, size_t, void *);
+typedef int (_curl_debug_callback8) (CURL *,
+ curl_infotype, const unsigned char *, size_t, const void *);
/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
/* this is getting even messier... */
@@ -550,7 +577,8 @@ typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *);
typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *);
typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *);
typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *);
-typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *);
+typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX,
+ const void *);
#else
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;
diff --git a/include/curl/types.h b/include/curl/types.h
deleted file mode 100644
index d37d6ae9..00000000
--- a/include/curl/types.h
+++ /dev/null
@@ -1 +0,0 @@
-/* not used */
diff --git a/install-sh b/install-sh
deleted file mode 100755
index a85c2029..00000000
--- a/install-sh
+++ /dev/null
@@ -1,250 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `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
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/lib/.gitignore b/lib/.gitignore
new file mode 100644
index 00000000..e289640c
--- /dev/null
+++ b/lib/.gitignore
@@ -0,0 +1,15 @@
+curl_config.h
+curl_config.h.in
+stamp-h1
+*.orig
+*.rej
+TAGS
+Makefile.vc8.dist
+Makefile.vc9.dist
+libcurl.plist.dist
+Makefile.vc10.dist
+libcurl.vers
+*.a
+*.res
+*.imp
+*.nlm
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index aec1a3c5..49a34093 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -48,25 +48,6 @@ 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
@@ -76,7 +57,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(CURL_USE_ARES)
+if(USE_ARES)
include_directories(${CARES_INCLUDE_DIR})
endif()
@@ -94,6 +75,10 @@ add_library(
${HHEADERS} ${CSOURCES}
)
+if(MSVC AND CURL_STATICLIB)
+ set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
+endif()
+
target_link_libraries(${LIB_NAME} ${CURL_LIBS})
if(WIN32)
@@ -102,23 +87,18 @@ 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 "")
-if(MSVC)
- if(NOT BUILD_RELEASE_DEBUG_DIRS)
- # Ugly workaround to remove the "/debug" or "/release" in each output
- set_target_properties(${LIB_NAME} PROPERTIES PREFIX "../")
- set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
- endif()
-endif()
-
if(WIN32)
if(NOT CURL_STATICLIB)
# Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib"
set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
endif()
endif()
+
+install(TARGETS ${LIB_NAME}
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin)
diff --git a/lib/Makefile.Watcom b/lib/Makefile.Watcom
index a611be60..0b7ba59c 100644
--- a/lib/Makefile.Watcom
+++ b/lib/Makefile.Watcom
@@ -3,11 +3,23 @@
# G. Vanem <gvanem@broadpark.no>
#
+.ERASE
+
+!if $(__VERSION__) < 1280
+!message !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!message ! This Open Watcom version is too old and is no longer supported !
+!message ! Please download latest version from www.openwatcom.org !
+!message !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!error Unsupported version of Open Watcom
+!endif
+
!ifndef %watcom
!error WATCOM environment variable not set!
-!else
-SYS_INCL = -I$(%watcom)\h\nt -I$(%watcom)\h
-SYS_LIBS = $(%watcom)\lib386\nt;$(%watcom)\lib386
+!endif
+
+# In order to process Makefile.inc wmake must be called with -u switch!
+!ifndef %MAKEFLAGS
+!error You MUST call wmake with the -u switch!
!endif
!ifdef %libname
@@ -15,7 +27,7 @@ LIBNAME = $(%libname)
!else
LIBNAME = libcurl
!endif
-TARGETS = $(LIBNAME).dll $(LIBNAME)_imp.lib $(LIBNAME).lib
+TARGETS = $(LIBNAME).dll $(LIBNAME).lib
CC = wcc386
LD = wlink
@@ -26,25 +38,29 @@ RC = wrc
! loaddll wcc386 wccd386
! loaddll wpp386 wppd386
! loaddll wlib wlibd
-! if $(__VERSION__) > 1270
-! loaddll wlink wlinkd
-! else
-! loaddll wlink wlink
-! endif
+! loaddll wlink wlinkd
!endif
-!if $(__VERSION__) < 1250
-RM = del /q /f 2>NUL
-!else
-RM = rm -f
-!endif
+!ifdef __LINUX__
+CP = cp
+MD = mkdir -p
+!else
+CP = copy 2>NUL
MD = mkdir
+!endif
+!if $(__VERSION__) > 1290
+RD = rm -rf
+!else ifdef __UNIX__
+RD = rm -rf
+!else
RD = rmdir /q /s 2>NUL
-CP = copy
+!endif
+
+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 -dHAVE_SPNEGO=1 -I. -I..\include $(SYS_INCL)
+ -dBUILDING_LIBCURL -I. -I"../include" $(SYS_INCL)
!ifdef %debug
DEBUG = -dDEBUG=1 -dDEBUGBUILD
@@ -61,162 +77,180 @@ 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
+CFLAGS += -dWANT_IDN_PROTOTYPES
+! endif
+!endif
+
#
# Change to suite.
#
!ifdef %zlib_root
ZLIB_ROOT = $(%zlib_root)
!else
-ZLIB_ROOT = ..\..\zlib-1.2.5
+ZLIB_ROOT = ../../zlib-1.2.8
!endif
!ifdef %libssh2_root
LIBSSH2_ROOT = $(%libssh2_root)
!else
-LIBSSH2_ROOT = ..\..\libssh2-1.2.7
+LIBSSH2_ROOT = ../../libssh2-1.5.0
!endif
!ifdef %librtmp_root
LIBRTMP_ROOT = $(%librtmp_root)
!else
-LIBRTMP_ROOT = ..\..\librtmp-2.3
+LIBRTMP_ROOT = ../../rtmpdump-2.3
!endif
!ifdef %openssl_root
OPENSSL_ROOT = $(%openssl_root)
!else
-OPENSSL_ROOT = ..\..\openssl-0.9.8o
+OPENSSL_ROOT = ../../openssl-1.0.2a
!endif
!ifdef %ares_root
ARES_ROOT = $(%ares_root)
!else
-ARES_ROOT = ..\ares
+ARES_ROOT = ../ares
!endif
!ifdef %use_zlib
-CFLAGS += -dHAVE_ZLIB_H -dHAVE_LIBZ -I$(ZLIB_ROOT)
+CFLAGS += -dHAVE_ZLIB_H -dHAVE_LIBZ -I"$(ZLIB_ROOT)"
!endif
!ifdef %use_rtmp
-CFLAGS += -dUSE_LIBRTMP -I$(LIBRTMP_ROOT)
+CFLAGS += -dUSE_LIBRTMP -I"$(LIBRTMP_ROOT)"
!endif
!ifdef %use_ssh2
-CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H -I$(LIBSSH2_ROOT)\include -I$(LIBSSH2_ROOT)\win32
+CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H -I"$(LIBSSH2_ROOT)/include" -I"$(LIBSSH2_ROOT)/win32"
!endif
!ifdef %use_ssl
-CFLAGS += -wcd=138 -dUSE_OPENSSL -dUSE_SSLEAY -I$(OPENSSL_ROOT)\inc32
+CFLAGS += -wcd=138 -dUSE_OPENSSL -dUSE_SSLEAY -I"$(OPENSSL_ROOT)/inc32"
!endif
!ifdef %use_ares
-CFLAGS += -dUSE_ARES -I$(ARES_ROOT)
+CFLAGS += -dUSE_ARES -I"$(ARES_ROOT)"
!endif
!ifdef %use_watt32
-CFLAGS += -dUSE_WATT32 -I$(%watt_root)\inc
+CFLAGS += -dUSE_WATT32 -I"$(%watt_root)/inc"
!endif
OBJ_BASE = WC_Win32.obj
-LINK_ARG = $(OBJ_BASE)\dyn\wlink.arg
-LIB_ARG = $(OBJ_BASE)\stat\wlib.arg
-
-# In order to process Makefile.inc wmake must be called with -u switch!
-!ifndef %MAKEFLAGS
-!error You MUST call wmake with the -u switch!
+!if $(__VERSION__) > 1290
+OBJ_STAT = $(OBJ_BASE)/stat
+OBJ_DYN = $(OBJ_BASE)/dyn
+!else ifdef __UNIX__
+OBJ_STAT = $(OBJ_BASE)/stat
+OBJ_DYN = $(OBJ_BASE)/dyn
!else
-!include Makefile.inc
+OBJ_STAT = $(OBJ_BASE)\stat
+OBJ_DYN = $(OBJ_BASE)\dyn
!endif
-OBJS = $(CSOURCES:.c=.obj)
-OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
+LINK_ARG = $(OBJ_DYN)/wlink.arg
+LIB_ARG = $(OBJ_STAT)/wlib.arg
-#
-# Use $(OBJS) as a template to generate $(OBJS_STAT) and $(OBJS_DYN).
-#
-OBJ_DIR = $(OBJ_BASE)\stat
-OBJS_STAT = $+ $(OBJS) $-
+!include Makefile.inc
+
+OBJS1 = ./$(CSOURCES:.c=.obj)
+OBJS2 = $(OBJS1:vtls/=)
+OBJS3 = $(OBJS2: = ./)
+OBJS_STAT = $(OBJS3:./=$(OBJ_STAT)/)
+OBJS_DYN = $(OBJS3:./=$(OBJ_DYN)/)
+
+CURLBUILDH = ../include/curl/curlbuild.h
+RESOURCE = $(OBJ_DYN)/libcurl.res
-OBJ_DIR = $(OBJ_BASE)\dyn
-OBJS_DYN = $+ $(OBJS) $-
+DIRS = $(OBJ_BASE) $(OBJ_BASE)/stat $(OBJ_BASE)/dyn
-CURLBUILDH = ..\include\curl\curlbuild.h
-RESOURCE = $(OBJ_BASE)\dyn\libcurl.res
+.c : vtls
-all: $(CURLBUILDH) $(OBJ_BASE) $(TARGETS) .SYMBOLIC
+all: $(CURLBUILDH) $(DIRS) $(TARGETS) .SYMBOLIC
@echo Welcome to libcurl
clean: .SYMBOLIC
- -$(RM) $(OBJS_STAT)
- -$(RM) $(OBJS_DYN)
- -$(RM) $(RESOURCE) $(LINK_ARG) $(LIB_ARG)
+ -rm -f $(OBJS_STAT)
+ -rm -f $(OBJS_DYN)
+ -rm -f $(RESOURCE) $(LINK_ARG) $(LIB_ARG)
vclean distclean: clean .SYMBOLIC
- -$(RM) $(TARGETS) $(LIBNAME).map $(LIBNAME).sym
- -$(RD) $(OBJ_BASE)\stat
- -$(RD) $(OBJ_BASE)\dyn
+ -rm -f $(TARGETS) $(LIBNAME).map $(LIBNAME).sym
+ -$(RD) $(OBJ_STAT)
+ -$(RD) $(OBJ_DYN)
-$(RD) $(OBJ_BASE)
-$(OBJ_BASE):
+$(DIRS):
-$(MD) $^@
- -$(MD) $^@\stat
- -$(MD) $^@\dyn
$(CURLBUILDH): .EXISTSONLY
$(CP) $^@.dist $^@
-$(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG)
- $(LD) name $^@ @$]@
-
-$(LIBNAME).lib: $(OBJS_STAT) $(LIB_ARG)
- $(AR) -q -b -c $^@ @$]@
-
-.ERASE
-$(RESOURCE): libcurl.rc
- $(RC) $(DEBUG) -q -r -zm -I..\include $(SYS_INCL) $[@ -fo=$^@
-
-.ERASE
-.c{$(OBJ_BASE)\dyn}.obj:
- $(CC) $(CFLAGS) -bd -br $[@ -fo=$^@
-
-.ERASE
-.c{$(OBJ_BASE)\stat}.obj:
- $(CC) $(CFLAGS) -DCURL_STATICLIB $[@ -fo=$^@
-
-$(LINK_ARG): $(__MAKEFILES__)
- %create $^@
- @%append $^@ system nt dll
- @%append $^@ file { $(OBJS_DYN) }
+$(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(__MAKEFILES__)
+ %create $(LINK_ARG)
+ @%append $(LINK_ARG) system nt dll
!ifdef %debug
- @%append $^@ debug all
- @%append $^@ option symfile
+ @%append $(LINK_ARG) debug all
+ @%append $(LINK_ARG) option symfile
!endif
- @%append $^@ option quiet, map, caseexact, eliminate, implib=$(LIBNAME)_imp.lib,
- @%append $^@ res=$(RESOURCE) libpath $(SYS_LIBS)
- @%append $^@ library wldap32.lib
+ @%append $(LINK_ARG) option quiet, caseexact, eliminate
+ @%append $(LINK_ARG) option map=$(OBJ_DYN)/$(LIBNAME).map
+ @%append $(LINK_ARG) option implib=$(LIBNAME)_imp.lib
+ @%append $(LINK_ARG) option res=$(RESOURCE)
+ @for %f in ($(OBJS_DYN)) do @%append $(LINK_ARG) file %f
+ @%append $(LINK_ARG) library wldap32.lib
!ifdef %use_watt32
- @%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
+ @%append $(LINK_ARG) library '$(%watt_root)/lib/wattcpw_imp.lib'
!else
- @%append $^@ library ws2_32.lib
+ @%append $(LINK_ARG) library ws2_32.lib
!endif
!ifdef %use_zlib
- @%append $^@ library $(ZLIB_ROOT)\zlib.lib
+ @%append $(LINK_ARG) library '$(ZLIB_ROOT)/zlib.lib'
!endif
!ifdef %use_rtmp
- @%append $^@ library $(LIBRTMP_ROOT)\librtmp\librtmp.lib
+ @%append $(LINK_ARG) library '$(LIBRTMP_ROOT)/librtmp/librtmp.lib'
!endif
!ifdef %use_ssh2
- @%append $^@ library $(LIBSSH2_ROOT)\win32\libssh2.lib
+ @%append $(LINK_ARG) library '$(LIBSSH2_ROOT)/win32/libssh2.lib'
!endif
!ifdef %use_ssl
- @%append $^@ library $(OPENSSL_ROOT)\out32\libeay32.lib, $(OPENSSL_ROOT)\out32\ssleay32.lib
+ @%append $(LINK_ARG) library '$(OPENSSL_ROOT)/out32/libeay32.lib'
+ @%append $(LINK_ARG) library '$(OPENSSL_ROOT)/out32/ssleay32.lib'
!endif
!ifdef %use_ares
- @%append $^@ library $(ARES_ROOT)\cares.lib
+ @%append $(LINK_ARG) library '$(ARES_ROOT)/cares.lib'
!endif
+!ifdef %use_winidn
+! if $(__VERSION__) > 1290
+ @%append $(LINK_ARG) library normaliz.lib
+! else
+ @%append $(LINK_ARG) import '_IdnToAscii@20' 'NORMALIZ.DLL'.'IdnToAscii'
+ @%append $(LINK_ARG) import '_IdnToUnicode@20' 'NORMALIZ.DLL'.'IdnToUnicode'
+! endif
+!endif
+ $(LD) name $^@ @$(LINK_ARG)
+
+$(LIBNAME).lib: $(OBJS_STAT)
+ %create $(LIB_ARG)
+ @for %f in ($<) do @%append $(LIB_ARG) +- %f
+ $(AR) -q -b -c -pa $^@ @$(LIB_ARG)
+
+$(RESOURCE): libcurl.rc
+ $(RC) $(DEBUG) -q -r -zm -bt=nt -I"../include" $(SYS_INCL) $[@ -fo=$^@
-$(LIB_ARG): $(__MAKEFILES__)
- %create $^@
- @for %f in ($(OBJS_STAT)) do @%append $^@ +- %f
+.c{$(OBJ_DYN)}.obj:
+ $(CC) $(CFLAGS) -bd -br $[@ -fo=$^@
+.c{$(OBJ_STAT)}.obj:
+ $(CC) $(CFLAGS) -DCURL_STATICLIB $[@ -fo=$^@
+
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 9a603320..a2c3dc56 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,29 +21,24 @@
###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
-DSP = vc6libcurl.dsp
-VCPROJ = libcurl.vcproj
-
-DOCS = README.encoding README.memoryleak README.ares README.curlx \
- README.hostip README.multi_socket README.httpauth README.pipelining \
- README.curl_off_t README.pingpong
-
CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
-EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos $(DSP) \
- vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h \
- config-mac.h curl_config.h.in makefile.dj config.dos libcurl.plist \
- libcurl.rc config-amigaos.h amigaos.c amigaos.h makefile.amiga \
- Makefile.netware nwlib.c nwos.c libcurl.imp msvcproj.head msvcproj.foot \
- config-win32ce.h config-os400.h setup-os400.h config-symbian.h \
- Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl \
- mk-ca-bundle.vbs firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h \
- Makefile.vxworks
-
-CLEANFILES = $(DSP) $(VCPROJ)
+EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 config-win32.h \
+ config-win32ce.h config-riscos.h config-mac.h curl_config.h.in \
+ makefile.dj config-dos.h libcurl.plist libcurl.rc config-amigaos.h \
+ makefile.amiga Makefile.netware nwlib.c nwos.c config-win32ce.h \
+ config-os400.h setup-os400.h config-symbian.h Makefile.Watcom \
+ config-tpf.h mk-ca-bundle.pl mk-ca-bundle.vbs $(CMAKE_DIST) \
+ firefox-db2pem.sh config-vxworks.h Makefile.vxworks checksrc.pl \
+ objnames-test08.sh objnames-test10.sh objnames.inc checksrc.whitelist
lib_LTLIBRARIES = libcurl.la
-LIBCURL_LIBS = @LIBCURL_LIBS@
+
+if BUILD_UNITTESTS
+noinst_LTLIBRARIES = libcurlu.la
+else
+noinst_LTLIBRARIES =
+endif
# This might hold -Werror
CFLAGS += @CURL_CFLAG_EXTRAS@
@@ -54,29 +49,27 @@ CFLAGS += @CURL_CFLAG_EXTRAS@
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib
+
if USE_EMBEDDED_ARES
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/lib \
- -I$(top_srcdir)/lib \
- -I$(top_builddir)/ares \
- -I$(top_srcdir)/ares
-else
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/lib \
- -I$(top_srcdir)/lib
+AM_CPPFLAGS += -I$(top_builddir)/ares \
+ -I$(top_srcdir)/ares
endif
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
if SONAME_BUMP
#
# Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
@@ -87,9 +80,9 @@ if SONAME_BUMP
#
# This conditional soname bump SHOULD be removed at next "proper" bump.
#
-VERSIONINFO=-version-info 7:0:2
+VERSIONINFO=-version-info 8:0:3
else
-VERSIONINFO=-version-info 6:0:2
+VERSIONINFO=-version-info 7:0:3
endif
# This flag accepts an argument of the form current[:revision[:age]]. So,
@@ -105,71 +98,57 @@ endif
#
# For the full guide on libcurl ABI rules, see docs/libcurl/ABI
-if NO_UNDEFINED
-# The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
-UNDEF = -no-undefined
+AM_CPPFLAGS += -DBUILDING_LIBCURL
+AM_LDFLAGS =
+AM_CFLAGS =
+
+libcurl_la_CPPFLAGS_EXTRA =
+libcurl_la_LDFLAGS_EXTRA =
+libcurl_la_CFLAGS_EXTRA =
+
+if CURL_LT_SHLIB_USE_VERSION_INFO
+libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO)
endif
-if MIMPURE
-# This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
-# allocatable but non-writable sections" problems.
-MIMPURE = -mimpure-text
+if CURL_LT_SHLIB_USE_NO_UNDEFINED
+libcurl_la_LDFLAGS_EXTRA += -no-undefined
endif
-libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
+if CURL_LT_SHLIB_USE_MIMPURE_TEXT
+libcurl_la_LDFLAGS_EXTRA += -mimpure-text
+endif
+
+if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS
+libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
+endif
+
+if USE_CPPFLAG_CURL_STATICLIB
+libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
+endif
+
+if DOING_CURL_SYMBOL_HIDING
+libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
+libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
+endif
+
+libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
+libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
+libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
+
+libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
+libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS)
+libcurlu_la_CFLAGS = $(AM_CFLAGS)
# Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc
libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
+libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
-WIN32SOURCES = $(CSOURCES)
-WIN32HEADERS = $(HHEADERS) config-win32.h
-
-DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
-VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
-
-$(DSP): msvcproj.head msvcproj.foot Makefile.am
- echo "creating $(DSP)"
- @(cp $(srcdir)/msvcproj.head $(DSP); \
- echo "# Begin Group \"Source Files\"" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "# PROP Default_Filter \"\"" $(DSPOUT); \
- win32_srcs='$(WIN32SOURCES)'; \
- sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
- for file in $$sorted_srcs; do \
- echo "# Begin Source File" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "SOURCE=.\\"$$file $(DSPOUT); \
- echo "# End Source File" $(DSPOUT); \
- done; \
- echo "# End Group" $(DSPOUT); \
- echo "# Begin Group \"Header Files\"" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "# PROP Default_Filter \"\"" $(DSPOUT); \
- win32_hdrs='$(WIN32HEADERS)'; \
- sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
- for file in $$sorted_hdrs; do \
- echo "# Begin Source File" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "SOURCE=.\\"$$file $(DSPOUT); \
- echo "# End Source File" $(DSPOUT); \
- done; \
- echo "# End Group" $(DSPOUT); \
- cat $(srcdir)/msvcproj.foot $(DSPOUT) )
-
-$(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
- echo "creating $(VCPROJ)"
- @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
- win32_srcs='$(WIN32SOURCES)'; \
- sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
- for file in $$sorted_srcs; do \
- echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
- done; \
- echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT); \
- win32_hdrs='$(WIN32HEADERS)'; \
- sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
- for file in $$sorted_hdrs; do \
- echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
- done; \
- cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
+checksrc:
+ @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
+
+if CURLDEBUG
+# for debug builds, we scan the sources on all regular make invokes
+all-local: checksrc
+endif
diff --git a/lib/Makefile.b32 b/lib/Makefile.b32
index 509ae270..37c26487 100644
--- a/lib/Makefile.b32
+++ b/lib/Makefile.b32
@@ -6,19 +6,28 @@
#
# 'BCCDIR' has to be set up to point to the base directory
# of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55
-# where c:\Borland\BCC55 is the compiler is installed
#
-# Written by Jaepil Kim, pit@paradise.net.nz
+# Initially written by Jaepil Kim, pit@paradise.net.nz
############################################################
+!if "$(__MAKE__)" == ""
+!error __MAKE__ not defined. Use Borlands's MAKE to process this makefile.
+!endif
+
+# Borland's $(MAKEDIR) expands to the path where make.exe is located,
+# use this feature to define BCCDIR when user has not defined BCCDIR.
+!ifndef BCCDIR
+BCCDIR = $(MAKEDIR)\..
+!endif
+
# Edit the path below to point to the base of your Zlib sources.
!ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.1
+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.7d
+OPENSSL_PATH = ..\..\openssl-1.0.2a
!endif
# Set libcurl static lib, dll and import lib
@@ -27,55 +36,116 @@ LIBCURL_DLL = libcurl.dll
LIBCURL_IMPLIB = libcurl_imp.lib
# Setup environment
-CXX = bcc32
+PP_CMD = cpp32 -q -P-
+CC_CMD = bcc32 -q -c
LD = bcc32
-CP = copy
-RM = del
+RM = del 2>NUL
+MKDIR = md
+RMDIR = rd /q
LIB = tlib
IMPLIB = implib
-CXXFLAGS = -q -5 -O2 -w-aus -w-ccc -w-csu -w-par -w-pia -w-rch -w-inl -w-ngu -w-pro -tWM
+CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -w-inl -w-pia -w-pin -Dinline=__inline
LIBFLAGS = /C /P32
LDFLAGS = -q -lq -laa -tWD
-INCDIRS = -I.;../include
-LINKLIB = $(BCCDIR)/lib/cw32mt.lib
+SRCDIR = .;.\vtls
+OBJDIR = .\BCC_objs
+INCDIRS = -I.;.\lib;..\include
+LINKLIB = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib
+DEFINES = -DNDEBUG -DWIN32 -DBUILDING_LIBCURL
-# If you build with SSL support, set WITH_SSL=1
-DEFINES = -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -DBUILDING_LIBCURL
+# By default SSPI support is enabled for BCC
+!ifndef DISABLE_SSPI
+DEFINES = $(DEFINES) -DUSE_WINDOWS_SSPI
+!endif
+# By default LDAP support is disabled for BCC
+!ifndef WITH_LDAP
+DEFINES = $(DEFINES) -DCURL_DISABLE_LDAP
+!endif
+
+# ZLIB support is enabled setting WITH_ZLIB=1
!ifdef WITH_ZLIB
DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
INCDIRS = $(INCDIRS);$(ZLIB_PATH)
-LINKLIB = $(LINKLIB) $(ZLIB_PATH)/zlib.lib
+LINKLIB = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
!endif
+# SSL support is enabled setting WITH_SSL=1
!ifdef WITH_SSL
-DEFINES = $(DEFINES) -DUSE_SSLEAY
-INCDIRS = $(INCDIRS);$(OPENSSL_PATH)/inc32;$(OPENSSL_PATH)/inc32/openssl
-LINKLIB = $(LINKLIB) $(OPENSSL_PATH)/out32/ssleay32.lib $(OPENSSL_PATH)/out32/libeay32.lib
+DEFINES = $(DEFINES) -DUSE_OPENSSL
+INCDIRS = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
+LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
!endif
.autodepend
+.path.c = $(SRCDIR)
+.path.obj = $(OBJDIR)
+.path.int = $(OBJDIR)
+
# Makefile.inc provides the CSOURCES and HHEADERS defines
!include Makefile.inc
-OBJECTS = $(CSOURCES:.c=.obj)
+# Borland's command line librarian program TLIB version 4.5 is not capable
+# of building a library when any of its objects contains an hypen in its
+# name, due to a command line parsing bug. In order to workaround this, we
+# build source files with hyphens in their name as objects with underscores
+# using explicit compilation build rules instead of implicit ones.
+
+NOHYPHEN1 = $(CSOURCES:-=_)
+NOHYPHEN2 = $(NOHYPHEN1:vtls/=)
+
+OBJECTS = $(NOHYPHEN2:.c=.obj)
+PREPROCESSED = $(NOHYPHEN2:.c=.int)
+
+# Borland's command line compiler (BCC32) version 5.5.1 integrated
+# preprocessor has a bug which results in silently generating wrong
+# definitions for libcurl macros such as CURL_OFF_T_C, on the other
+# hand Borland's command line preprocessor (CPP32) version 5.5.1 does
+# not have the bug and achieves proper results. In order to avoid the
+# silent bug we first preprocess source files and later compile the
+# preprocessed result.
.c.obj:
- $(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
+ @-$(RM) $(@R).int
+ $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
+ $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
+
+all: $(OBJDIR) $(LIBCURL_LIB) $(LIBCURL_DLL)
+
+asyn_ares.obj: asyn-ares.c
+ @-$(RM) $(@R).int
+ $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
+ $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
+
+asyn_thread.obj: asyn-thread.c
+ @-$(RM) $(@R).int
+ $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
+ $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
-all: $(LIBCURL_LIB) $(LIBCURL_DLL)
+non_ascii.obj: non-ascii.c
+ @-$(RM) $(@R).int
+ $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
+ $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
clean:
- -$(RM) $(LIBCURL_LIB)
- -$(RM) $(LIBCURL_IMPLIB)
- -$(RM) libcurl.tds
- -$(RM) *.obj
+ cd $(OBJDIR)
+ @-$(RM) $(OBJECTS)
+ @-$(RM) $(PREPROCESSED)
+ cd ..
+ @-$(RMDIR) $(OBJDIR)
+ @-$(RM) $(LIBCURL_LIB)
+ @-$(RM) $(LIBCURL_IMPLIB)
+ @-$(RM) libcurl.tds
+
+$(OBJDIR):
+ @-$(RMDIR) $(OBJDIR)
+ @-$(MKDIR) $(OBJDIR)
$(LIBCURL_LIB): $(OBJECTS)
- @-$(RM) $@
+ @-$(RM) $(LIBCURL_LIB)
$(LIB) $(LIBFLAGS) $@ @&&!
+$(**: = &^
+)
@@ -84,6 +154,11 @@ $(LIBCURL_LIB): $(OBJECTS)
$(LIBCURL_DLL) $(LIBCURL_IMPLIB): $(OBJECTS) $(LINKLIB)
@-$(RM) $(LIBCURL_DLL)
@-$(RM) $(LIBCURL_IMPLIB)
- $(LD) $(LDFLAGS) -e$(LIBCURL_DLL) $**
+ $(LD) $(LDFLAGS) -e$(LIBCURL_DLL) @&&!
+$(**: = ^
+)
+!
$(IMPLIB) $(LIBCURL_IMPLIB) $(LIBCURL_DLL)
+
+# End of Makefile.b32
diff --git a/lib/Makefile.in b/lib/Makefile.in
deleted file mode 100644
index a4beebe8..00000000
--- a/lib/Makefile.in
+++ /dev/null
@@ -1,865 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# ./lib/Makefile.inc
-# Using the backslash as line continuation character might be problematic
-# with some make flavours, as Watcom's wmake showed us already. If we
-# ever want to change this in a portable manner then we should consider
-# this idea (posted to the libcurl list by Adam Kellas):
-# CSRC1 = file1.c file2.c file3.c
-# CSRC2 = file4.c file5.c file6.c
-# CSOURCES = $(CSRC1) $(CSRC2)
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/Makefile.inc $(srcdir)/curl_config.h.in
-subdir = lib
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = curl_config.h $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(libdir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libcurl_la_LIBADD =
-am__objects_1 = file.lo timeval.lo base64.lo hostip.lo progress.lo \
- formdata.lo cookie.lo http.lo sendf.lo ftp.lo url.lo dict.lo \
- if2ip.lo speedcheck.lo ldap.lo ssluse.lo version.lo getenv.lo \
- escape.lo mprintf.lo telnet.lo netrc.lo getinfo.lo transfer.lo \
- strequal.lo easy.lo security.lo krb4.lo curl_fnmatch.lo \
- fileinfo.lo ftplistparser.lo wildcard.lo krb5.lo memdebug.lo \
- http_chunks.lo strtok.lo connect.lo llist.lo hash.lo multi.lo \
- content_encoding.lo share.lo http_digest.lo md4.lo md5.lo \
- curl_rand.lo http_negotiate.lo http_ntlm.lo inet_pton.lo \
- strtoofft.lo strerror.lo hostares.lo hostasyn.lo hostip4.lo \
- hostip6.lo hostsyn.lo hostthre.lo inet_ntop.lo parsedate.lo \
- select.lo gtls.lo sslgen.lo tftp.lo splay.lo strdup.lo \
- socks.lo ssh.lo nss.lo qssl.lo rawstr.lo curl_addrinfo.lo \
- socks_gssapi.lo socks_sspi.lo curl_sspi.lo slist.lo \
- nonblock.lo curl_memrchr.lo imap.lo pop3.lo smtp.lo \
- pingpong.lo rtsp.lo curl_threads.lo warnless.lo hmac.lo \
- polarssl.lo curl_rtmp.lo openldap.lo curl_gethostname.lo \
- gopher.lo
-am__objects_2 =
-am_libcurl_la_OBJECTS = $(am__objects_1) $(am__objects_2)
-libcurl_la_OBJECTS = $(am_libcurl_la_OBJECTS)
-DEFAULT_INCLUDES =
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libcurl_la_SOURCES)
-DIST_SOURCES = $(libcurl_la_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-
-# This might hold -Werror
-CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-###########################################################################
-AUTOMAKE_OPTIONS = foreign nostdinc
-DSP = vc6libcurl.dsp
-VCPROJ = libcurl.vcproj
-DOCS = README.encoding README.memoryleak README.ares README.curlx \
- README.hostip README.multi_socket README.httpauth README.pipelining \
- README.curl_off_t README.pingpong
-
-CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
-EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos $(DSP) \
- vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h \
- config-mac.h curl_config.h.in makefile.dj config.dos libcurl.plist \
- libcurl.rc config-amigaos.h amigaos.c amigaos.h makefile.amiga \
- Makefile.netware nwlib.c nwos.c libcurl.imp msvcproj.head msvcproj.foot \
- config-win32ce.h config-os400.h setup-os400.h config-symbian.h \
- Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl \
- mk-ca-bundle.vbs firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h \
- Makefile.vxworks
-
-CLEANFILES = $(DSP) $(VCPROJ)
-lib_LTLIBRARIES = libcurl.la
-@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib
-
-
-# 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
-# might possibly already be installed in the system.
-#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
-# $(top_srcdir)/include is for libcurl's external include files
-# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
-# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
-# $(top_srcdir)/ares is for in-tree c-ares's external include files
-@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares
-
-@SONAME_BUMP_FALSE@VERSIONINFO = -version-info 6:0:2
-
-#
-# Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
-# it is. The problem is that we try to avoid the bump as hard as possible, but
-# yet it is still necessary for a few rare situations. The configure script will
-# attempt to figure out these situations, and it can be forced to consider this
-# to be such a case! See README.curl_off_t for further details.
-#
-# This conditional soname bump SHOULD be removed at next "proper" bump.
-#
-@SONAME_BUMP_TRUE@VERSIONINFO = -version-info 7:0:2
-
-# This flag accepts an argument of the form current[:revision[:age]]. So,
-# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
-# 1.
-#
-# Here's the simplified rule guide on how to change -version-info:
-# (current version is C:R:A)
-#
-# 1. if there are only source changes, use C:R+1:A
-# 2. if interfaces were added use C+1:0:A+1
-# 3. if interfaces were removed, then use C+1:0:0
-#
-# For the full guide on libcurl ABI rules, see docs/libcurl/ABI
-
-# The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
-@NO_UNDEFINED_TRUE@UNDEF = -no-undefined
-
-# This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
-# allocatable but non-writable sections" problems.
-@MIMPURE_TRUE@MIMPURE = -mimpure-text
-libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
-CSOURCES = 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 ssluse.c version.c getenv.c escape.c mprintf.c telnet.c \
- netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.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 curl_rand.c \
- http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c \
- hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
- inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c \
- strdup.c socks.c ssh.c nss.c 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 polarssl.c curl_rtmp.c openldap.c curl_gethostname.c\
- gopher.c
-
-HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.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 ssluse.h escape.h telnet.h \
- getinfo.h strequal.h krb4.h memdebug.h http_chunks.h curl_rand.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 http_ntlm.h inet_pton.h \
- strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h setup.h \
- transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h \
- tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.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 polarssl.h curl_rtmp.h curl_gethostname.h \
- gopher.h
-
-
-# Makefile.inc provides the CSOURCES and HHEADERS defines
-libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
-WIN32SOURCES = $(CSOURCES)
-WIN32HEADERS = $(HHEADERS) config-win32.h
-DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
-VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
-all: curl_config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign lib/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-curl_config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
- else :; fi
-
-stamp-h1: $(srcdir)/curl_config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status lib/curl_config.h
-$(srcdir)/curl_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_srcdir) && $(AUTOHEADER)
- rm -f stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f curl_config.h stamp-h1
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
- else :; fi; \
- done
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
- done
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-libcurl.la: $(libcurl_la_OBJECTS) $(libcurl_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libcurl_la_LDFLAGS) $(libcurl_la_OBJECTS) $(libcurl_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/content_encoding.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cookie.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_addrinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_fnmatch.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_gethostname.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_memrchr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_rand.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_rtmp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_sspi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_threads.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dict.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/easy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escape.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formdata.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftplistparser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getenv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gopher.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtls.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostares.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostasyn.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostip4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostip6.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostsyn.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostthre.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_chunks.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_digest.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_negotiate.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_ntlm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/if2ip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krb4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krb5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memdebug.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netrc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonblock.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nss.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openldap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsedate.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pingpong.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polarssl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progress.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qssl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawstr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtsp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/share.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socks.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socks_gssapi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socks_sspi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speedcheck.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splay.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sslgen.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssluse.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strequal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtok.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoofft.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/telnet.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeval.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transfer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/warnless.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wildcard.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) curl_config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) curl_config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) curl_config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) curl_config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) curl_config.h
-installdirs:
- for dir in "$(DESTDIR)$(libdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am: install-libLTLIBRARIES
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool ctags distclean \
- distclean-compile distclean-generic distclean-hdr \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-libLTLIBRARIES install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-info-am uninstall-libLTLIBRARIES
-
-
-$(DSP): msvcproj.head msvcproj.foot Makefile.am
- echo "creating $(DSP)"
- @(cp $(srcdir)/msvcproj.head $(DSP); \
- echo "# Begin Group \"Source Files\"" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "# PROP Default_Filter \"\"" $(DSPOUT); \
- win32_srcs='$(WIN32SOURCES)'; \
- sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
- for file in $$sorted_srcs; do \
- echo "# Begin Source File" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "SOURCE=.\\"$$file $(DSPOUT); \
- echo "# End Source File" $(DSPOUT); \
- done; \
- echo "# End Group" $(DSPOUT); \
- echo "# Begin Group \"Header Files\"" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "# PROP Default_Filter \"\"" $(DSPOUT); \
- win32_hdrs='$(WIN32HEADERS)'; \
- sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
- for file in $$sorted_hdrs; do \
- echo "# Begin Source File" $(DSPOUT); \
- echo "" $(DSPOUT); \
- echo "SOURCE=.\\"$$file $(DSPOUT); \
- echo "# End Source File" $(DSPOUT); \
- done; \
- echo "# End Group" $(DSPOUT); \
- cat $(srcdir)/msvcproj.foot $(DSPOUT) )
-
-$(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
- echo "creating $(VCPROJ)"
- @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
- win32_srcs='$(WIN32SOURCES)'; \
- sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
- for file in $$sorted_srcs; do \
- echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
- done; \
- echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT); \
- win32_hdrs='$(WIN32HEADERS)'; \
- sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
- for file in $$sorted_hdrs; do \
- echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
- done; \
- cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/lib/Makefile.inc b/lib/Makefile.inc
index 41ab8277..d444a6b2 100644
--- a/lib/Makefile.inc
+++ b/lib/Makefile.inc
@@ -1,40 +1,73 @@
-# ./lib/Makefile.inc
-# Using the backslash as line continuation character might be problematic
-# with some make flavours, as Watcom's wmake showed us already. If we
-# ever want to change this in a portable manner then we should consider
-# this idea (posted to the libcurl list by Adam Kellas):
-# CSRC1 = file1.c file2.c file3.c
-# CSRC2 = file4.c file5.c file6.c
-# CSOURCES = $(CSRC1) $(CSRC2)
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
-CSOURCES = 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 ssluse.c version.c getenv.c escape.c mprintf.c telnet.c \
- netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.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 curl_rand.c \
- http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c \
- hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
- inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c \
- strdup.c socks.c ssh.c nss.c 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 polarssl.c curl_rtmp.c openldap.c curl_gethostname.c\
- gopher.c
+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 \
+ vtls/cyassl.c vtls/schannel.c vtls/darwinssl.c vtls/gskit.c
-HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.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 ssluse.h escape.h telnet.h \
- getinfo.h strequal.h krb4.h memdebug.h http_chunks.h curl_rand.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 http_ntlm.h inet_pton.h \
- strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h setup.h \
- transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h \
- tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.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 polarssl.h curl_rtmp.h curl_gethostname.h \
- gopher.h
+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 \
+ vtls/cyassl.h vtls/schannel.h vtls/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 conncache.c pipeline.c dotdot.c x509asn1.c \
+ http2.c curl_sasl_sspi.c smb.c curl_sasl_gssapi.c curl_endian.c \
+ curl_des.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 \
+ conncache.h curl_setup_once.h multihandle.h setup-vms.h pipeline.h \
+ dotdot.h x509asn1.h http2.h sigpipe.h smb.h curl_endian.h curl_des.h \
+ curl_printf.h
+
+LIB_RCFILES = libcurl.rc
+
+CSOURCES = $(LIB_CFILES) $(LIB_VTLS_CFILES)
+HHEADERS = $(LIB_HFILES) $(LIB_VTLS_HFILES)
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 08b665b8..ee47d670 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -1,102 +1,262 @@
-#########################################################################
+###########################################################################
#
-## Makefile for building libcurl.a with MingW32 (GCC-3.2 or later)
-## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5)
+## Makefile for building libcurl.a with MingW (GCC-3.2 or later)
+## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4)
##
-## Usage:
-## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [RTMP=1] [DYN=1]
+## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
+## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-sspi-winidn
##
## Hint: you can also set environment vars to control the build, f.e.:
-## set ZLIB_PATH=c:/zlib-1.2.5
+## set ZLIB_PATH=c:/zlib-1.2.8
## set ZLIB=1
-##
-## Comments to: Troy Engel <tengel@sonic.net> or
-## Joern Hartroth <hartroth@acm.org>
-#########################################################################
+#
+###########################################################################
# Edit the path below to point to the base of your Zlib sources.
ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+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.8o
+OPENSSL_PATH = ../../openssl-1.0.2a
endif
# Edit the path below to point to the base of your LibSSH2 package.
ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2.7
+LIBSSH2_PATH = ../../libssh2-1.5.0
+endif
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../librtmp-2.4
endif
# Edit the path below to point to the base of your libidn package.
ifndef LIBIDN_PATH
-LIBIDN_PATH = ../../libidn-1.18
+LIBIDN_PATH = ../../libidn-1.30
endif
-# Edit the path below to point to the base of your librtmp package.
-ifndef LIBRTMP_PATH
-LIBRTMP_PATH = ../../librtmp-2.3
+# Edit the path below to point to the base of your MS IDN package.
+# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
+# https://www.microsoft.com/en-us/download/details.aspx?id=734
+ifndef WINIDN_PATH
+WINIDN_PATH = ../../Microsoft IDN Mitigation APIs
endif
# Edit the path below to point to the base of your Novell LDAP NDK.
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-1.0.0
+endif
+
+PROOT = ..
# Edit the path below to point to the base of your c-ares package.
ifndef LIBCARES_PATH
-LIBCARES_PATH = ../ares
+LIBCARES_PATH = $(PROOT)/ares
endif
-CC = gcc
-AR = ar
+CC = $(CROSSPREFIX)gcc
+CFLAGS = $(CURL_CFLAG_EXTRAS) -g -O2 -Wall
+CFLAGS += -fno-strict-aliasing
# comment LDFLAGS below to keep debug info
-LDFLAGS = -s
-RANLIB = ranlib
-RC = windres
-RCFLAGS = --include-dir=../include -DDEBUGBUILD=0 -O COFF -i
-RM = del /q /f 2>NUL
-STRIP = strip -g
+LDFLAGS = -s
+AR = $(CROSSPREFIX)ar
+RANLIB = $(CROSSPREFIX)ranlib
+RC = $(CROSSPREFIX)windres
+RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF
+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_
+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
+RMDIR = rm -fr $1
+MKDIR = mkdir -p $1
+COPY = -cp -afv $1 $2
+#COPYR = -cp -afr $1/* $2
+COPYR = -rsync -aC $1/* $2
+TOUCH = touch $1
+CAT = cat
+ECHONL = echo ""
+DL = '
+else
+ifeq "$(OS)" "Windows_NT"
+DEL = -del 2>NUL /q /f $(subst /,\,$1)
+RMDIR = -rd 2>NUL /q /s $(subst /,\,$1)
+else
+DEL = -del 2>NUL $(subst /,\,$1)
+RMDIR = -deltree 2>NUL /y $(subst /,\,$1)
+endif
+MKDIR = -md 2>NUL $(subst /,\,$1)
+COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
+COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
+TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,,
+CAT = type
+ECHONL = $(ComSpec) /c echo.
+endif
########################################################
## Nothing more to do below this line!
+ifeq ($(findstring -dyn,$(CFG)),-dyn)
+DYN = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+ARES = 1
+endif
+ifeq ($(findstring -sync,$(CFG)),-sync)
+SYNC = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+RTMP = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+SSH2 = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+SSL = 1
+endif
+ifeq ($(findstring -srp,$(CFG)),-srp)
+SRP = 1
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+IDN = 1
+endif
+ifeq ($(findstring -winidn,$(CFG)),-winidn)
+WINIDN = 1
+endif
+ifeq ($(findstring -sspi,$(CFG)),-sspi)
+SSPI = 1
+endif
+ifeq ($(findstring -ldaps,$(CFG)),-ldaps)
+LDAPS = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+IPV6 = 1
+endif
+ifeq ($(findstring -winssl,$(CFG)),-winssl)
+WINSSL = 1
+SSPI = 1
+endif
+ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
+NGHTTP2 = 1
+endif
+
INCLUDES = -I. -I../include
-CFLAGS = -g -O2 -DBUILDING_LIBCURL
-ifdef ARES
- INCLUDES += -I$(LIBCARES_PATH)
- CFLAGS += -DUSE_ARES
- DLL_LIBS += -L$(LIBCARES_PATH) -lcares
- libcurl_dll_DEPENDENCIES = $(LIBCARES_PATH)/libcares.a
+CFLAGS += -DBUILDING_LIBCURL
+
+ifdef SYNC
+ CFLAGS += -DUSE_SYNC_DNS
+else
+ ifdef ARES
+ INCLUDES += -I"$(LIBCARES_PATH)"
+ CFLAGS += -DUSE_ARES -DCARES_STATICLIB
+ DLL_LIBS += -L"$(LIBCARES_PATH)" -lcares
+ libcurl_dll_DEPENDENCIES = $(LIBCARES_PATH)/libcares.a
+ endif
endif
ifdef RTMP
INCLUDES += -I"$(LIBRTMP_PATH)"
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
- DLL_LIBS += -L$(LIBSSH2_PATH)/win32 -lssh2
+ DLL_LIBS += -L"$(LIBSSH2_PATH)/win32" -lssh2
endif
ifdef SSL
- INCLUDES += -I"$(OPENSSL_PATH)/outinc" -I"$(OPENSSL_PATH)/outinc/openssl"
- CFLAGS += -DUSE_SSLEAY -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H \
+ ifndef OPENSSL_INCLUDE
+ ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc"
+ OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
+ endif
+ ifeq "$(wildcard $(OPENSSL_PATH)/include)" "$(OPENSSL_PATH)/include"
+ OPENSSL_INCLUDE = $(OPENSSL_PATH)/include
+ endif
+ endif
+ ifneq "$(wildcard $(OPENSSL_INCLUDE)/openssl/opensslv.h)" "$(OPENSSL_INCLUDE)/openssl/opensslv.h"
+ $(error Invalid path to OpenSSL package: $(OPENSSL_PATH))
+ endif
+ ifndef OPENSSL_LIBPATH
+ ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
+ OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
+ OPENSSL_LIBS = -leay32 -lssl32
+ endif
+ ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
+ OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
+ OPENSSL_LIBS = -lcrypto -lssl
+ endif
+ endif
+ ifndef DYN
+ OPENSSL_LIBS += -lgdi32 -lcrypt32
+ endif
+ INCLUDES += -I"$(OPENSSL_INCLUDE)"
+ CFLAGS += -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H \
-DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 \
-DCURL_WANTS_CA_BUNDLE_ENV
- DLL_LIBS += -L$(OPENSSL_PATH)/out -leay32 -lssl32
+ DLL_LIBS += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
+ ifdef SRP
+ ifeq "$(wildcard $(OPENSSL_INCLUDE)/openssl/srp.h)" "$(OPENSSL_INCLUDE)/openssl/srp.h"
+ CFLAGS += -DHAVE_OPENSSL_SRP -DUSE_TLS_SRP
+ endif
+ endif
endif
ifdef ZLIB
INCLUDES += -I"$(ZLIB_PATH)"
CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
- DLL_LIBS += -L$(ZLIB_PATH) -lz
+ DLL_LIBS += -L"$(ZLIB_PATH)" -lz
endif
ifdef IDN
INCLUDES += -I"$(LIBIDN_PATH)/include"
CFLAGS += -DUSE_LIBIDN
- DLL_LIBS += -L$(LIBIDN_PATH)/lib -lidn
+ DLL_LIBS += -L"$(LIBIDN_PATH)/lib" -lidn
+else
+ifdef WINIDN
+ CFLAGS += -DUSE_WIN32_IDN
+ CFLAGS += -DWANT_IDN_PROTOTYPES
+ DLL_LIBS += -L"$(WINIDN_PATH)" -lnormaliz
+endif
endif
ifdef SSPI
CFLAGS += -DUSE_WINDOWS_SSPI
+ ifdef WINSSL
+ CFLAGS += -DUSE_SCHANNEL
+ endif
+endif
+ifdef SPNEGO
+ CFLAGS += -DHAVE_SPNEGO
endif
ifdef IPV6
- CFLAGS += -DENABLE_IPV6
+ CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
endif
ifdef LDAPS
CFLAGS += -DHAVE_LDAP_SSL
@@ -113,11 +273,10 @@ ifdef USE_LDAP_OPENLDAP
endif
ifndef USE_LDAP_NOVELL
ifndef USE_LDAP_OPENLDAP
-DLL_LIBS += -lwldap32
+ DLL_LIBS += -lwldap32
endif
endif
DLL_LIBS += -lws2_32
-COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
# Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc
@@ -131,12 +290,11 @@ libcurl_a_DEPENDENCIES := $(strip $(CSOURCES) $(HHEADERS))
RESOURCE = libcurl.res
-.SUFFIXES: .rc .res
all: $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY)
$(libcurl_a_LIBRARY): $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
- -$(RM) $@
+ @$(call DEL, $@)
$(AR) cru $@ $(libcurl_a_OBJECTS)
$(RANLIB) $@
$(STRIP) $@
@@ -144,24 +302,29 @@ $(libcurl_a_LIBRARY): $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
# remove the last line above to keep debug info
$(libcurl_dll_LIBRARY): $(libcurl_a_OBJECTS) $(RESOURCE) $(libcurl_dll_DEPENDENCIES)
- -$(RM) $@
- $(CC) $(LDFLAGS) -shared -Wl,--out-implib,$(libcurl_dll_a_LIBRARY) \
- -o $@ $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS)
+ @$(call DEL, $@)
+ $(CC) $(LDFLAGS) -shared -o $@ \
+ -Wl,--output-def,$(@:.dll=.def),--out-implib,$(libcurl_dll_a_LIBRARY) \
+ $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS)
-.c.o:
- $(COMPILE) -c $<
+%.o: %.c $(PROOT)/include/curl/curlbuild.h
+ $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
-.rc.res:
- $(RC) $(RCFLAGS) $< -o $@
+%.res: %.rc
+ $(RC) $(RCFLAGS) -i $< -o $@
clean:
- -$(RM) $(libcurl_a_OBJECTS) $(RESOURCE)
+ifeq "$(wildcard $(PROOT)/include/curl/curlbuild.h.dist)" "$(PROOT)/include/curl/curlbuild.h.dist"
+ @$(call DEL, $(PROOT)/include/curl/curlbuild.h)
+endif
+ @$(call DEL, $(libcurl_a_OBJECTS) $(RESOURCE))
distclean vclean: clean
- -$(RM) $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_a_LIBRARY)
+ @$(call DEL, $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_LIBRARY:.dll=.def) $(libcurl_dll_a_LIBRARY))
-FORCE: ;
+$(PROOT)/include/curl/curlbuild.h:
+ @echo Creating $@
+ @$(call COPY, $@.dist, $@)
$(LIBCARES_PATH)/libcares.a:
$(MAKE) -C $(LIBCARES_PATH) -f Makefile.m32
-
diff --git a/lib/Makefile.netware b/lib/Makefile.netware
index 655c7e3e..5a955f88 100644
--- a/lib/Makefile.netware
+++ b/lib/Makefile.netware
@@ -14,17 +14,22 @@ endif
# Edit the path below to point to the base of your Zlib sources.
ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+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.8o
+OPENSSL_PATH = ../../openssl-1.0.2a
endif
# Edit the path below to point to the base of your LibSSH2 package.
ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2.7
+LIBSSH2_PATH = ../../libssh2-1.5.0
+endif
+
+# Edit the path below to point to the base of your axTLS package.
+ifndef AXTLS_PATH
+AXTLS_PATH = ../../axTLS-1.2.7
endif
# Edit the path below to point to the base of your libidn package.
@@ -37,6 +42,16 @@ 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
+endif
+
# Edit the path below to point to the base of your c-ares package.
ifndef LIBCARES_PATH
LIBCARES_PATH = ../ares
@@ -54,7 +69,8 @@ DESCR = cURL libcurl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - http://curl.haxx.se
MTSAFE = YES
STACK = 64000
SCREEN = none
-EXPORTS = @libcurl.imp
+EXPORTF = $(TARGET).imp
+EXPORTS = @$(EXPORTF)
# Uncomment the next line to enable linking with POSIX semantics.
# POSIXFL = 1
@@ -90,7 +106,7 @@ else
endif
PERL = perl
# Here you can find a native Win32 binary of the original awk:
-# http://www.gknw.net/development/prgtools/awk-20070501.zip
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
AWK = awk
CP = cp -afv
MKDIR = mkdir
@@ -140,7 +156,11 @@ AR = ar
ARFLAGS = -cq
LIBEXT = a
RANLIB = ranlib
-CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
+CFLAGS += -m32
+CFLAGS += -fno-builtin -fno-strict-aliasing
+ifeq ($(findstring gcc,$(CC)),gcc)
+CFLAGS += -fpcc-struct-return
+endif
CFLAGS += -Wall # -pedantic
ifeq ($(LIBARCH),LIBC)
ifeq ($(POSIXFL),1)
@@ -172,6 +192,48 @@ CURL_LIB = ../lib
INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
+ifeq ($(findstring -static,$(CFG)),-static)
+LINK_STATIC = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+WITH_ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+WITH_RTMP = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+WITH_SSH2 = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -axtls,$(CFG)),-axtls)
+WITH_AXTLS = 1
+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)
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+WITH_IDN = 1
+endif
+ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
+WITH_NGHTTP2 = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+ENABLE_IPV6 = 1
+endif
+
ifdef WITH_ARES
INCLUDES += -I$(LIBCARES_PATH)
LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT)
@@ -195,6 +257,17 @@ ifdef WITH_SSL
LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
IMPORTS += GetProcessSwitchCount RunningProcess
INSTDEP += ca-bundle.crt
+else
+ifdef WITH_AXTLS
+ INCLUDES += -I$(AXTLS_PATH)/inc
+ifdef LINK_STATIC
+ LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
+else
+ MODULES += libaxtls.nlm
+ IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
+endif
+ INSTDEP += ca-bundle.crt
+endif
endif
ifdef WITH_ZLIB
INCLUDES += -I$(ZLIB_PATH)
@@ -209,6 +282,10 @@ 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
@@ -248,10 +325,12 @@ endif
# Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc
-OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES))) $(OBJDIR)/nwos.o
+OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(notdir $(CSOURCES)))) $(OBJDIR)/nwos.o
OBJL = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS)
+vpath %.c . vtls
+
all: lib nlm
nlm: prebuild $(TARGET).nlm
@@ -264,7 +343,7 @@ $(OBJDIR)/%.o: %.c
# @echo Compiling $<
$(CC) $(CFLAGS) -c $< -o $@
-$(OBJDIR)/version.inc: ../include/curl/curlver.h $(OBJDIR)
+$(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
@echo Creating $@
@$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
@@ -284,7 +363,7 @@ clean:
-$(RM) -r $(OBJDIR)
distclean vclean: clean
- -$(RM) $(TARGET).$(LIBEXT) $(TARGET).nlm
+ -$(RM) $(TARGET).$(LIBEXT) $(TARGET).nlm $(TARGET).imp
-$(RM) certdata.txt ca-bundle.crt
$(OBJDIR) $(INSTDIR):
@@ -298,7 +377,7 @@ ifdef RANLIB
@$(RANLIB) $@
endif
-$(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJL) $(XDCDATA)
+$(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJL) $(EXPORTF) $(XDCDATA)
@echo Linking $@
@-$(RM) $@
@$(LD) $(LDFLAGS) $<
@@ -424,6 +503,7 @@ ifeq ($(LIBARCH),CLIB)
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
+ @echo $(DL)#define SIZEOF_SIZE_T 4$(DL) >> $@
@echo $(DL)#define pressanykey PressAnyKeyToContinue$(DL) >> $@
else
@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
@@ -459,6 +539,7 @@ else
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
@echo $(DL)#define SIZEOF_OFF_T 8$(DL) >> $@
+ @echo $(DL)#define SIZEOF_SIZE_T 8$(DL) >> $@
@echo $(DL)#define _LARGEFILE 1$(DL) >> $@
ifdef ENABLE_IPV6
@echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
@@ -476,6 +557,7 @@ endif
@echo $(DL)#define USE_MANUAL 1$(DL) >> $@
@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
@@ -561,6 +643,17 @@ 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
+else
+ifdef WITH_AXTLS
+ @echo $(DL)#define USE_AXTLS 1$(DL) >> $@
+endif
endif
ifdef WITH_SSH2
@echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
@@ -573,6 +666,9 @@ 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) >> $@
@@ -584,6 +680,10 @@ else
@echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
endif
+$(EXPORTF): $(CURL_INC)/curl/curl.h $(CURL_INC)/curl/easy.h $(CURL_INC)/curl/multi.h $(CURL_INC)/curl/mprintf.h
+ @echo Creating $@
+ @$(AWK) -f ../packages/NetWare/get_exp.awk $^ > $@
+
FORCE: ;
info: $(OBJDIR)/version.inc
@@ -599,6 +699,11 @@ 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
@@ -609,24 +714,22 @@ 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
-$(LIBCARES_PATH)/libcares.$(LIBEXT):
- $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
-
-ca-bundle.crt: mk-ca-bundle.pl
- @echo Creating $@
- @-$(PERL) $< -b -n $@
-
$(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE
@echo Creating $@
@echo $(DL)/* $@ intended for NetWare target.$(DL) > $@
@@ -665,3 +768,10 @@ endif
@echo $(DL)typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;$(DL) >> $@
@echo $(DL)#endif /* __CURL_CURLBUILD_H */$(DL) >> $@
+$(LIBCARES_PATH)/libcares.$(LIBEXT):
+ $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
+
+ca-bundle.crt: mk-ca-bundle.pl
+ @echo Creating $@
+ @-$(PERL) $< -b -n $@
+
diff --git a/lib/Makefile.riscos b/lib/Makefile.riscos
deleted file mode 100644
index 8c919878..00000000
--- a/lib/Makefile.riscos
+++ /dev/null
@@ -1,232 +0,0 @@
-# Makefile for project libcurl
-
-# Project objects:
-objs = o.base64 o.connect o.cookie o.dict \
- o.dllinit o.easy o.escape o.file \
- o.formdata o.ftp o.getenv o.gopher \
- o.getinfo o.getpass o.hostip \
- o.hostip4 o.hostsyn o.http \
- o.http_chunks o.inet_ntop o.inet_pton o.if2ip o.krb4 o.ldap \
- o.curl_fnmatch o.fileinfo o.ftplistparser o.wildcard \
- o.memdebug o.mprintf o.netrc o.parsedate o.progress \
- o.security o.select o.sendf o.speedcheck o.ssluse \
- o.strequal o.strtok o.telnet o.timeval \
- o.transfer o.url o.version o.strtoofft o.sslgen o.gtls \
- o.rawstr o.curl_addrinfo o.slist o.nonblock o.curl_rand \
- o.curl_memrchr o.imap o.pop3 o.smtp o.pingpong o.rtsp \
- o.curl_threads o.warnless o.hmac o.md5 o.curl_rtmp \
- o.openldap o.polarssl o.md4 o.curl_gethostname
-
-
-# Compile options:
-linkopts = -o libcurl
-compileropts = -mpoke-function-name -IUtilLib: -mthrowback
-
-# Project target:
-libcurl: $(objs)
- makealf $(linkopts) $(objs)
-
-# Static dependancies:
-o.base64: c.base64
- gcc $(compileropts) -c -o base64.o c.base64
-
-o.connect: c.connect
- gcc $(compileropts) -c -o connect.o c.connect
-
-o.cookie: c.cookie
- gcc $(compileropts) -c -o cookie.o c.cookie
-
-o.curl_addrinfo: c.curl_addrinfo
- gcc $(compileropts) -c -o curl_addrinfo.o c.curl_addrinfo
-
-o.curl_gethostname: c.curl_gethostname
- gcc $(compileropts) -c -o curl_gethostname.o c.curl_gethostname
-
-o.curl_memrchr: c.curl_memrchr
- gcc $(compileropts) -c -o curl_memrchr.o c.curl_memrchr
-
-o.curl_rand: c.curl_rand
- gcc $(compileropts) -c -o curl_rand.o c.curl_rand
-
-o.curl_rtmp: c.curl_rtmp
- gcc $(compileropts) -c -o curl_rtmp.o c.curl_rtmp
-
-o.curl_threads: c.curl_threads
- gcc $(compileropts) -c -o curl_threads.o c.curl_threads
-
-o.dict: c.dict
- gcc $(compileropts) -c -o dict.o c.dict
-
-o.dllinit: c.dllinit
- gcc $(compileropts) -c -o dllinit.o c.dllinit
-
-o.easy: c.easy
- gcc $(compileropts) -c -o easy.o c.easy
-
-o.escape: c.escape
- gcc $(compileropts) -c -o escape.o c.escape
-
-o.file: c.file
- gcc $(compileropts) -c -o file.o c.file
-
-o.formdata: c.formdata
- gcc $(compileropts) -c -o formdata.o c.formdata
-
-o.ftp: c.ftp
- gcc $(compileropts) -c -o ftp.o c.ftp
-
-o.getenv: c.getenv
- gcc $(compileropts) -c -o getenv.o c.getenv
-
-o.getinfo: c.getinfo
- gcc $(compileropts) -c -o getinfo.o c.getinfo
-
-o.getpass: c.getpass
- gcc $(compileropts) -c -o getpass.o c.getpass
-
-o.gopher: c.gopher
- gcc $(compileropts) -c -o gopher.o c.gopher
-
-o.hmac: c.hmac
- gcc $(compileropts) -c -o hmac.o c.hmac
-
-o.hostip: c.hostip
- gcc $(compileropts) -c -o hostip.o c.hostip
-
-o.hostip4: c.hostip4
- gcc $(compileropts) -c -o hostip4.o c.hostip4
-
-o.hostsyn: c.hostsyn
- gcc $(compileropts) -c -o hostsyn.o c.hostsyn
-
-o.http: c.http
- gcc $(compileropts) -c -o http.o c.http
-
-o.http_chunks: c.http_chunks
- gcc $(compileropts) -c -o http_chunks.o c.http_chunks
-
-o.if2ip: c.if2ip
- gcc $(compileropts) -c -o if2ip.o c.if2ip
-
-o.imap: c.imap
- gcc $(compileropts) -c -o imap.o c.imap
-
-o.inet_ntop: c.inet_ntop
- gcc $(compileropts) -c -o inet_ntop.o c.inet_ntop
-
-o.inet_pton: c.inet_pton
- gcc $(compileropts) -c -o inet_pton.o c.inet_pton
-
-o.krb4: c.krb4
- gcc $(compileropts) -c -o krb4.o c.krb4
-
-o.ldap: c.ldap
- gcc $(compileropts) -IOpenLDAP: -c -o ldap.o c.ldap
-
-o.md4: c.md4
- gcc $(compileropts) -c -o md4.o c.md4
-
-o.md5: c.md5
- gcc $(compileropts) -c -o md5.o c.md5
-
-o.memdebug: c.memdebug
- gcc $(compileropts) -c -o memdebug.o c.memdebug
-
-o.mprintf: c.mprintf
- gcc $(compileropts) -c -o mprintf.o c.mprintf
-
-o.netrc: c.netrc
- gcc $(compileropts) -c -o netrc.o c.netrc
-
-o.openldap: c.openldap
- gcc $(compileropts) -c -o openldap.o c.openldap
-
-o.parsedate: c.parsedate
- gcc $(compileropts) -c -o parsedate.o c.parsedate
-
-o.pingpong: c.pingpong
- gcc $(compileropts) -c -o pingpong.o c.pingpong
-
-o.polarssl: c.polarssl
- gcc $(compileropts) -c -o polarssl.o c.polarssl
-
-o.pop3: c.pop3
- gcc $(compileropts) -c -o pop3.o c.pop3
-
-o.progress: c.progress
- gcc $(compileropts) -c -o progress.o c.progress
-
-o.rtsp: c.rtsp
- gcc $(compileropts) -c -o rtsp.o c.rtsp
-
-o.security: c.security
- gcc $(compileropts) -c -o security.o c.security
-
-o.select: c.select
- gcc $(compileropts) -c -o select.o c.select
-
-o.sendf: c.sendf
- gcc $(compileropts) -c -o sendf.o c.sendf
-
-o.slist: c.slist
- gcc $(compileropts) -c -o slist.o c.slist
-
-o.smtp: c.smtp
- gcc $(compileropts) -c -o smtp.o c.smtp
-
-o.speedcheck: c.speedcheck
- gcc $(compileropts) -c -o speedcheck.o c.speedcheck
-
-o.gtls: c.gtls
- gcc $(compileropts) -c -o gtls.o c.gtls
-
-o.sslgen: c.sslgen
- gcc $(compileropts) -c -o sslgen.o c.sslgen
-
-o.ssluse: c.ssluse
- gcc $(compileropts) -c -o ssluse.o c.ssluse
-
-o.nonblock: c.nonblock
- gcc $(compileropts) -c -o nonblock.o c.nonblock
-
-o.rawstr: c.rawstr
- gcc $(compileropts) -c -o rawstr.o c.rawstr
-
-o.strequal: c.strequal
- gcc $(compileropts) -c -o strequal.o c.strequal
-
-o.strtok: c.strtok
- gcc $(compileropts) -c -o strtok.o c.strtok
-
-o.strtoofft: c.strtoofft
- gcc $(compileropts) -c -o strtoofft.o c.strtoofft
-
-o.telnet: c.telnet
- gcc $(compileropts) -c -o telnet.o c.telnet
-
-o.timeval: c.timeval
- gcc $(compileropts) -c -o timeval.o c.timeval
-
-o.transfer: c.transfer
- gcc $(compileropts) -c -o transfer.o c.transfer
-
-o.url: c.url
- gcc $(compileropts) -c -o url.o c.url
-
-o.version: c.version
- gcc $(compileropts) -c -o version.o c.version
-
-o.warnless: c.warnless
- gcc $(compileropts) -c -o warnless.o c.warnless
-
-o.curl_fnmatch: c.curl_fnmatch
- gcc $(compileropts) -c -o curl_fnmatch.o c.curl_fnmatch
-
-o.fileinfo: c.fileinfo
- gcc $(compileropts) -c -o fileinfo.o c.fileinfo
-
-o.ftplistparser: c.ftplistparser
- gcc $(compileropts) -c -o ftplistparser.o c.ftplistparser
-
-o.wildcard: c.wildcard
- gcc $(compileropts) -c -o wildcard.o c.wildcard
diff --git a/lib/Makefile.vc10 b/lib/Makefile.vc10
deleted file mode 100644
index 96005279..00000000
--- a/lib/Makefile.vc10
+++ /dev/null
@@ -1,571 +0,0 @@
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-###########################################################################
-#
-# Makefile for building libcurl with MSVC10
-#
-# Usage: see usage message below
-# Should be invoked from \lib directory
-# Edit the paths and desired library name
-# SSL path is only required if you intend compiling
-# with SSL.
-#
-# This make file leaves the result either a .lib or .dll file
-# in the \lib directory. It should be called from the \lib
-# directory.
-#
-# An option would have been to allow the source directory to
-# be specified, but I saw no requirement.
-#
-# Another option would have been to leave the .lib and .dll
-# files in the "cfg" directory, but then the make file
-# in \src would need to be changed.
-#
-##############################################################
-
-#
-# Stem for static libs and DLLs
-#
-LIB_NAME = libcurl
-LIB_NAME_DEBUG = libcurld
-
-#
-# Stem for DLL import libs
-#
-IMPLIB_NAME = libcurl_imp
-IMPLIB_NAME_DEBUG = libcurld_imp
-
-!IFNDEF OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8o
-!ENDIF
-
-!IFNDEF ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
-!ENDIF
-
-!IFNDEF MACHINE
-MACHINE = X86
-!ENDIF
-
-# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication
-# without an openssl installation and offers the ability to authenticate
-# using the "current logged in user". Since at least with MSVC10 the sspi.h
-# header is broken it is either required to install the Windows SDK,
-# or to fix sspi.h with adding this define at the beginning of sspi.h:
-# #define FreeCredentialHandle FreeCredentialsHandle
-#
-# If, for some reason the Windows SDK is installed but not installed
-# in the default location, you can specify WINDOWS_SDK_PATH.
-# It can be downloaded from:
-# http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
-
-# WINDOWS_SSPI = 1
-
-!IFDEF WINDOWS_SSPI
-!IFNDEF WINDOWS_SDK_PATH
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
-!ENDIF
-!ENDIF
-
-#############################################################
-## Nothing more to do below this line!
-
-CCNODBG = cl.exe /O2 /DNDEBUG
-CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1
-CFLAGSSSL = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
-CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
-CFLAGS = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
-CFLAGSLIB = /DCURL_STATICLIB
-LNKDLL = link.exe /DLL
-LNKLIB = link.exe /lib
-LFLAGS = /nologo /machine:$(MACHINE)
-SSLLIBS = libeay32.lib ssleay32.lib
-ZLIBLIBSDLL= zdll.lib
-ZLIBLIBS = zlib.lib
-WINLIBS = ws2_32.lib wldap32.lib
-CFLAGS = $(CFLAGS)
-
-CFGSET = FALSE
-
-!IFDEF WINDOWS_SSPI
-CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
-!ENDIF
-
-!IFDEF USE_IPV6
-CFLAGS = $(CFLAGS) /DUSE_IPV6
-!ENDIF
-
-##############################################################
-# Runtime library configuration
-
-RTLIB = /MD
-RTLIBD = /MDd
-
-!IF "$(RTLIBCFG)" == "static"
-RTLIB = /MT
-RTLIBD = /MTd
-!ENDIF
-
-
-######################
-# release
-
-!IF "$(CFG)" == "release"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-zlib
-
-!IF "$(CFG)" == "release-zlib"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-dll
-
-!IF "$(CFG)" == "release-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# release-ssl
-
-!IF "$(CFG)" == "release-ssl"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-ssl-dll
-
-!IF "$(CFG)" == "release-ssl-dll"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-ssl-zlib
-
-!IF "$(CFG)" == "release-ssl-zlib"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-dll-ssl-dll
-
-!IF "$(CFG)" == "release-dll-ssl-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# release-zlib-dll
-
-!IF "$(CFG)" == "release-zlib-dll"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-dll-zlib-dll
-
-!IF "$(CFG)" == "release-dll-zlib-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# release-dll-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug
-
-!IF "$(CFG)" == "debug"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl
-
-!IF "$(CFG)" == "debug-ssl"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-zlib
-
-!IF "$(CFG)" == "debug-zlib"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl-dll
-
-!IF "$(CFG)" == "debug-ssl-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl-zlib
-
-!IF "$(CFG)" == "debug-ssl-zlib"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-zlib-dll
-
-!IF "$(CFG)" == "debug-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "debug-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-dll
-
-!IF "$(CFG)" == "debug-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug-dll-ssl-dll
-
-!IF "$(CFG)" == "debug-dll-ssl-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug-dll-zlib-dll
-
-!IF "$(CFG)" == "debug-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug-dll-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-#######################
-# Usage
-#
-!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != ""
-!MESSAGE Usage: nmake /f makefile.vc10 CFG=<config> <target>
-!MESSAGE where <config> is one of:
-!MESSAGE release - release static library
-!MESSAGE release-ssl - release static library with ssl
-!MESSAGE release-zlib - release static library with zlib
-!MESSAGE release-ssl-zlib - release static library with ssl and zlib
-!MESSAGE release-ssl-dll - release static library with dynamic ssl
-!MESSAGE release-zlib-dll - release static library with dynamic zlib
-!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib
-!MESSAGE release-dll - release dynamic library
-!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl
-!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib
-!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib
-!MESSAGE debug - debug static library
-!MESSAGE debug-ssl - debug static library with ssl
-!MESSAGE debug-zlib - debug static library with zlib
-!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib
-!MESSAGE debug-ssl-dll - debug static library with dynamic ssl
-!MESSAGE debug-zlib-dll - debug static library with dynamic zlib
-!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib
-!MESSAGE debug-dll - debug dynamic library
-!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl
-!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1
-!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib
-!MESSAGE <target> can be left blank in which case all is assumed
-!ERROR please choose a valid configuration "$(CFG)"
-!ENDIF
-
-#######################
-# Only the clean target can be used if a config was not provided.
-#
-!IF "$(CFGSET)" == "FALSE"
-clean:
- @-erase /s *.dll 2> NUL
- @-erase /s *.exp 2> NUL
- @-erase /s *.idb 2> NUL
- @-erase /s *.lib 2> NUL
- @-erase /s *.obj 2> NUL
- @-erase /s *.pch 2> NUL
- @-erase /s *.pdb 2> NUL
- @-erase /s *.res 2> NUL
-!ELSE
-# A config was provided, so the library can be built.
-#
-X_OBJS= \
- $(DIROBJ)\base64.obj \
- $(DIROBJ)\connect.obj \
- $(DIROBJ)\content_encoding.obj \
- $(DIROBJ)\cookie.obj \
- $(DIROBJ)\curl_addrinfo.obj \
- $(DIROBJ)\curl_fnmatch.obj \
- $(DIROBJ)\curl_gethostname.obj \
- $(DIROBJ)\curl_memrchr.obj \
- $(DIROBJ)\curl_rand.obj \
- $(DIROBJ)\curl_rtmp.obj \
- $(DIROBJ)\curl_sspi.obj \
- $(DIROBJ)\curl_threads.obj \
- $(DIROBJ)\dict.obj \
- $(DIROBJ)\easy.obj \
- $(DIROBJ)\escape.obj \
- $(DIROBJ)\fileinfo.obj \
- $(DIROBJ)\file.obj \
- $(DIROBJ)\formdata.obj \
- $(DIROBJ)\ftplistparser.obj \
- $(DIROBJ)\ftp.obj \
- $(DIROBJ)\getenv.obj \
- $(DIROBJ)\getinfo.obj \
- $(DIROBJ)\gtls.obj \
- $(DIROBJ)\gopher.obj \
- $(DIROBJ)\hash.obj \
- $(DIROBJ)\hmac.obj \
- $(DIROBJ)\hostares.obj \
- $(DIROBJ)\hostasyn.obj \
- $(DIROBJ)\hostip4.obj \
- $(DIROBJ)\hostip6.obj \
- $(DIROBJ)\hostip.obj \
- $(DIROBJ)\hostsyn.obj \
- $(DIROBJ)\hostthre.obj \
- $(DIROBJ)\http_chunks.obj \
- $(DIROBJ)\http_digest.obj \
- $(DIROBJ)\http_negotiate.obj \
- $(DIROBJ)\http_ntlm.obj \
- $(DIROBJ)\http.obj \
- $(DIROBJ)\if2ip.obj \
- $(DIROBJ)\imap.obj \
- $(DIROBJ)\inet_ntop.obj \
- $(DIROBJ)\inet_pton.obj \
- $(DIROBJ)\ldap.obj \
- $(DIROBJ)\llist.obj \
- $(DIROBJ)\md4.obj \
- $(DIROBJ)\md5.obj \
- $(DIROBJ)\memdebug.obj \
- $(DIROBJ)\mprintf.obj \
- $(DIROBJ)\multi.obj \
- $(DIROBJ)\netrc.obj \
- $(DIROBJ)\nonblock.obj \
- $(DIROBJ)\openldap.obj \
- $(DIROBJ)\parsedate.obj \
- $(DIROBJ)\pingpong.obj \
- $(DIROBJ)\polarssl.obj \
- $(DIROBJ)\pop3.obj \
- $(DIROBJ)\progress.obj \
- $(DIROBJ)\rawstr.obj \
- $(DIROBJ)\rtsp.obj \
- $(DIROBJ)\select.obj \
- $(DIROBJ)\sendf.obj \
- $(DIROBJ)\share.obj \
- $(DIROBJ)\slist.obj \
- $(DIROBJ)\smtp.obj \
- $(DIROBJ)\socks_gssapi.obj \
- $(DIROBJ)\socks.obj \
- $(DIROBJ)\socks_sspi.obj \
- $(DIROBJ)\speedcheck.obj \
- $(DIROBJ)\splay.obj \
- $(DIROBJ)\ssh.obj \
- $(DIROBJ)\sslgen.obj \
- $(DIROBJ)\ssluse.obj \
- $(DIROBJ)\strequal.obj \
- $(DIROBJ)\strerror.obj \
- $(DIROBJ)\strtok.obj \
- $(DIROBJ)\strtoofft.obj \
- $(DIROBJ)\telnet.obj \
- $(DIROBJ)\tftp.obj \
- $(DIROBJ)\timeval.obj \
- $(DIROBJ)\transfer.obj \
- $(DIROBJ)\url.obj \
- $(DIROBJ)\version.obj \
- $(DIROBJ)\warnless.obj \
- $(DIROBJ)\wildcard.obj \
- $(RESOURCE)
-
-all : $(TARGET)
-
-$(TARGET): $(X_OBJS)
- $(LNK) $(LFLAGS) $(X_OBJS)
- -xcopy $(DIROBJ)\$(LIB_NAME).dll . /y
- -xcopy $(DIROBJ)\$(LIB_NAME).lib . /y
- -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y
- -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y
- -xcopy $(DIROBJ)\$(IMPLIB_NAME).lib . /y
- -xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y
- -xcopy $(DIROBJ)\*.exp . /y
- -xcopy $(DIROBJ)\*.pdb . /y
-
-$(X_OBJS): $(DIROBJ)
-
-$(DIROBJ):
- @if not exist "$(DIROBJ)" mkdir $(DIROBJ)
-
-.SUFFIXES: .c .obj .res
-
-{.\}.c{$(DIROBJ)\}.obj:
- $(CC) $(CFLAGS) /Fo"$@" $<
-
-debug-dll\libcurl.res \
-debug-dll-ssl-dll\libcurl.res \
-debug-dll-zlib-dll\libcurl.res \
-debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
- rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc
-
-release-dll\libcurl.res \
-release-dll-ssl-dll\libcurl.res \
-release-dll-zlib-dll\libcurl.res \
-release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
- rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc
-!ENDIF # End of case where a config was provided.
diff --git a/lib/Makefile.vc6 b/lib/Makefile.vc6
index 2e18e145..c34c3dbc 100644
--- a/lib/Makefile.vc6
+++ b/lib/Makefile.vc6
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1999 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -18,6 +18,13 @@
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
+#***************************************************************************
+
+# All files in the Makefile.vc* series are generated automatically from the
+# one made for MSVC version 6. Alas, if you want to do changes to any of the
+# files and send back to the project, edit the version six, make your diff and
+# mail curl-library.
+
###########################################################################
#
# Makefile for building libcurl with MSVC6
@@ -41,24 +48,32 @@
#
##############################################################
-#
-# Stem for static libs and DLLs
-#
-LIB_NAME = libcurl
-LIB_NAME_DEBUG = libcurld
+# ----------------------------------------------
+# Verify that current subdir is libcurl's 'lib'
+# ----------------------------------------------
-#
-# Stem for DLL import libs
-#
-IMPLIB_NAME = libcurl_imp
-IMPLIB_NAME_DEBUG = libcurld_imp
+!IF ! EXIST(.\curl_addrinfo.c)
+! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory.
+! MESSAGE Change to libcurl's 'lib' subdirectory, and try again.
+! ERROR See previous message.
+!ENDIF
+
+# ------------------------------------------------
+# Makefile.msvc.names provides libcurl file names
+# ------------------------------------------------
+
+!INCLUDE ..\winbuild\Makefile.msvc.names
!IFNDEF OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8o
+OPENSSL_PATH = ../../openssl-1.0.2a
+!ENDIF
+
+!IFNDEF LIBSSH2_PATH
+LIBSSH2_PATH = ../../libssh2-1.5.0
!ENDIF
!IFNDEF ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+ZLIB_PATH = ../../zlib-1.2.8
!ENDIF
!IFNDEF MACHINE
@@ -75,35 +90,37 @@ MACHINE = X86
# If, for some reason the Windows SDK is installed but not installed
# in the default location, you can specify WINDOWS_SDK_PATH.
# It can be downloaded from:
-# http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
+# https://msdn.microsoft.com/windows/bb980924.aspx
# WINDOWS_SSPI = 1
!IFDEF WINDOWS_SSPI
!IFNDEF WINDOWS_SDK_PATH
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"
!ENDIF
!ENDIF
#############################################################
## Nothing more to do below this line!
-CCNODBG = cl.exe /O2 /DNDEBUG
-CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /GZ
-CFLAGSSSL = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
-CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
-CFLAGS = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL
-CFLAGSLIB = /DCURL_STATICLIB
-LNKDLL = link.exe /DLL
-LNKLIB = link.exe /lib
-LFLAGS = /nologo /machine:$(MACHINE)
-SSLLIBS = libeay32.lib ssleay32.lib
-ZLIBLIBSDLL= zdll.lib
-ZLIBLIBS = zlib.lib
-WINLIBS = ws2_32.lib wldap32.lib
-CFLAGS = $(CFLAGS)
-
-CFGSET = FALSE
+CCNODBG = cl.exe /O2 /DNDEBUG
+CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /GZ
+CFLAGSSSL = /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
+CFLAGSWINSSL = /DUSE_SCHANNEL
+CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include"
+CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
+CFLAGS = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1
+CFLAGSLIB = /DCURL_STATICLIB
+LNKDLL = link.exe /DLL
+LNKLIB = link.exe /lib
+LFLAGS = /nologo /machine:$(MACHINE)
+SSLLIBS = libeay32.lib ssleay32.lib
+ZLIBLIBSDLL = zdll.lib
+ZLIBLIBS = zlib.lib
+WINLIBS = ws2_32.lib wldap32.lib advapi32.lib
+CFLAGS = $(CFLAGS)
+
+CFGSET = FALSE
!IFDEF WINDOWS_SSPI
CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
@@ -113,6 +130,10 @@ 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
@@ -129,7 +150,7 @@ RTLIBD = /MTd
# release
!IF "$(CFG)" == "release"
-TARGET = $(LIB_NAME).lib
+TARGET = $(LIBCURL_STA_LIB_REL)
DIROBJ = $(CFG)
LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)
@@ -137,84 +158,97 @@ CFGSET = TRUE
!ENDIF
######################
-# release-zlib
+# release-ssl
-!IF "$(CFG)" == "release-zlib"
-TARGET = $(LIB_NAME).lib
+!IF "$(CFG)" == "release-ssl"
+TARGET = $(LIBCURL_STA_LIB_REL)
+DIROBJ = $(CFG)
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
+LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
+CFGSET = TRUE
+!ENDIF
+
+######################
+# release-winssl
+
+!IF "$(CFG)" == "release-winssl"
+TARGET = $(LIBCURL_STA_LIB_REL)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
+LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSLIB)
CFGSET = TRUE
!ENDIF
######################
-# release-dll
+# release-zlib
-!IF "$(CFG)" == "release-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
+!IF "$(CFG)" == "release-zlib"
+TARGET = $(LIBCURL_STA_LIB_REL)
+DIROBJ = $(CFG)
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
+LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
+CFGSET = TRUE
!ENDIF
######################
-# release-ssl
+# release-ssl-zlib
-!IF "$(CFG)" == "release-ssl"
-TARGET = $(LIB_NAME).lib
+!IF "$(CFG)" == "release-ssl-zlib"
+TARGET = $(LIBCURL_STA_LIB_REL)
DIROBJ = $(CFG)
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
+LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
CFGSET = TRUE
!ENDIF
######################
-# release-ssl-dll
+# release-winssl-zlib
-!IF "$(CFG)" == "release-ssl-dll"
-TARGET = $(LIB_NAME).lib
+!IF "$(CFG)" == "release-winssl-zlib"
+TARGET = $(LIBCURL_STA_LIB_REL)
DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
+LNK = $(LNKLIB) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
CFGSET = TRUE
!ENDIF
######################
-# release-ssl-zlib
+# release-ssl-ssh2-zlib
-!IF "$(CFG)" == "release-ssl-zlib"
-TARGET = $(LIB_NAME).lib
+!IF "$(CFG)" == "release-ssl-ssh2-zlib"
+TARGET = $(LIBCURL_STA_LIB_REL)
DIROBJ = $(CFG)
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
+LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)
CFGSET = TRUE
!ENDIF
######################
-# release-dll-ssl-dll
+# release-ssl-dll
-!IF "$(CFG)" == "release-dll-ssl-dll"
-TARGET = $(LIB_NAME).dll
+!IF "$(CFG)" == "release-ssl-dll"
+TARGET = $(LIBCURL_STA_LIB_REL)
DIROBJ = $(CFG)
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)
+LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
!ENDIF
######################
# release-zlib-dll
!IF "$(CFG)" == "release-zlib-dll"
-TARGET = $(LIB_NAME).lib
+TARGET = $(LIBCURL_STA_LIB_REL)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
@@ -226,7 +260,7 @@ CFGSET = TRUE
# release-ssl-dll-zlib-dll
!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME).lib
+TARGET = $(LIBCURL_STA_LIB_REL)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
@@ -236,13 +270,38 @@ CFGSET = TRUE
!ENDIF
######################
+# release-dll
+
+!IF "$(CFG)" == "release-dll"
+TARGET = $(LIBCURL_DYN_LIB_REL)
+DIROBJ = $(CFG)
+LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
+CC = $(CCNODBG) $(RTLIB)
+CFGSET = TRUE
+RESOURCE = $(DIROBJ)\libcurl.res
+!ENDIF
+
+######################
+# release-dll-ssl-dll
+
+!IF "$(CFG)" == "release-dll-ssl-dll"
+TARGET = $(LIBCURL_DYN_LIB_REL)
+DIROBJ = $(CFG)
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
+LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
+CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)
+CFGSET = TRUE
+RESOURCE = $(DIROBJ)\libcurl.res
+!ENDIF
+
+######################
# release-dll-zlib-dll
!IF "$(CFG)" == "release-dll-zlib-dll"
-TARGET = $(LIB_NAME).dll
+TARGET = $(LIBCURL_DYN_LIB_REL)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
+LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)
CFGSET = TRUE
RESOURCE = $(DIROBJ)\libcurl.res
@@ -252,11 +311,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
# release-dll-ssl-dll-zlib-dll
!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME).dll
+TARGET = $(LIBCURL_DYN_LIB_REL)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
+LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)
CFGSET = TRUE
RESOURCE = $(DIROBJ)\libcurl.res
@@ -266,7 +325,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
# debug
!IF "$(CFG)" == "debug"
-TARGET = $(LIB_NAME_DEBUG).lib
+TARGET = $(LIBCURL_STA_LIB_DBG)
DIROBJ = $(CFG)
LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)
@@ -277,7 +336,7 @@ CFGSET = TRUE
# debug-ssl
!IF "$(CFG)" == "debug-ssl"
-TARGET = $(LIB_NAME_DEBUG).lib
+TARGET = $(LIBCURL_STA_LIB_DBG)
DIROBJ = $(CFG)
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
@@ -289,7 +348,7 @@ CFGSET = TRUE
# debug-zlib
!IF "$(CFG)" == "debug-zlib"
-TARGET = $(LIB_NAME_DEBUG).lib
+TARGET = $(LIBCURL_STA_LIB_DBG)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
@@ -298,27 +357,41 @@ CFGSET = TRUE
!ENDIF
######################
-# debug-ssl-dll
+# debug-ssl-zlib
-!IF "$(CFG)" == "debug-ssl-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
+!IF "$(CFG)" == "debug-ssl-zlib"
+TARGET = $(LIBCURL_STA_LIB_DBG)
DIROBJ = $(CFG)
-LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
+LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
CFGSET = TRUE
!ENDIF
######################
-# debug-ssl-zlib
+# debug-ssl-ssh2-zlib
-!IF "$(CFG)" == "debug-ssl-zlib"
-TARGET = $(LIB_NAME_DEBUG).lib
+!IF "$(CFG)" == "debug-ssl-ssh2-zlib"
+TARGET = $(LIBCURL_STA_LIB_DBG)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
+LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)
+CFGSET = TRUE
+!ENDIF
+
+######################
+# debug-ssl-dll
+
+!IF "$(CFG)" == "debug-ssl-dll"
+TARGET = $(LIBCURL_STA_LIB_DBG)
+DIROBJ = $(CFG)
+LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll
+LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
+CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
CFGSET = TRUE
!ENDIF
@@ -326,7 +399,7 @@ CFGSET = TRUE
# debug-zlib-dll
!IF "$(CFG)" == "debug-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
+TARGET = $(LIBCURL_STA_LIB_DBG)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
@@ -338,7 +411,7 @@ CFGSET = TRUE
# debug-ssl-dll-zlib-dll
!IF "$(CFG)" == "debug-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
+TARGET = $(LIBCURL_STA_LIB_DBG)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
@@ -351,10 +424,10 @@ CFGSET = TRUE
# debug-dll
!IF "$(CFG)" == "debug-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
+TARGET = $(LIBCURL_DYN_LIB_DBG)
DIROBJ = $(CFG)
-LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD)
+LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
+CC = $(CCDEBUG) $(RTLIBD)
CFGSET = TRUE
RESOURCE = $(DIROBJ)\libcurl.res
!ENDIF
@@ -363,10 +436,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
# debug-dll-ssl-dll
!IF "$(CFG)" == "debug-dll-ssl-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
+TARGET = $(LIBCURL_DYN_LIB_DBG)
DIROBJ = $(CFG)
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
+LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)
CFGSET = TRUE
RESOURCE = $(DIROBJ)\libcurl.res
@@ -376,10 +449,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
# debug-dll-zlib-dll
!IF "$(CFG)" == "debug-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
+TARGET = $(LIBCURL_DYN_LIB_DBG)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
+LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)
CFGSET = TRUE
RESOURCE = $(DIROBJ)\libcurl.res
@@ -389,11 +462,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
# debug-dll-ssl-dll-zlib-dll
!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
+TARGET = $(LIBCURL_DYN_LIB_DBG)
DIROBJ = $(CFG)
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
+LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)
CFGSET = TRUE
RESOURCE = $(DIROBJ)\libcurl.res
@@ -409,6 +482,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
!MESSAGE release-ssl - release static library with ssl
!MESSAGE release-zlib - release static library with zlib
!MESSAGE release-ssl-zlib - release static library with ssl and zlib
+!MESSAGE release-ssl-ssh2-zlib - release static library with ssl, ssh2 and zlib
!MESSAGE release-ssl-dll - release static library with dynamic ssl
!MESSAGE release-zlib-dll - release static library with dynamic zlib
!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib
@@ -420,6 +494,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
!MESSAGE debug-ssl - debug static library with ssl
!MESSAGE debug-zlib - debug static library with zlib
!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib
+!MESSAGE debug-ssl-ssh2-zlib - debug static library with ssl, ssh2 and zlib
!MESSAGE debug-ssl-dll - debug static library with dynamic ssl
!MESSAGE debug-zlib-dll - debug static library with dynamic zlib
!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib
@@ -448,48 +523,68 @@ clean:
# A config was provided, so the library can be built.
#
X_OBJS= \
+ $(DIROBJ)\amigaos.obj \
+ $(DIROBJ)\asyn-ares.obj \
+ $(DIROBJ)\asyn-thread.obj \
+ $(DIROBJ)\axtls.obj \
$(DIROBJ)\base64.obj \
+ $(DIROBJ)\conncache.obj \
$(DIROBJ)\connect.obj \
$(DIROBJ)\content_encoding.obj \
$(DIROBJ)\cookie.obj \
$(DIROBJ)\curl_addrinfo.obj \
+ $(DIROBJ)\curl_des.obj \
+ $(DIROBJ)\curl_endian.obj \
$(DIROBJ)\curl_fnmatch.obj \
$(DIROBJ)\curl_gethostname.obj \
+ $(DIROBJ)\curl_gssapi.obj \
$(DIROBJ)\curl_memrchr.obj \
- $(DIROBJ)\curl_rand.obj \
+ $(DIROBJ)\curl_multibyte.obj \
+ $(DIROBJ)\curl_ntlm.obj \
+ $(DIROBJ)\curl_ntlm_core.obj \
+ $(DIROBJ)\curl_ntlm_msgs.obj \
+ $(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_sspi.obj \
$(DIROBJ)\curl_threads.obj \
+ $(DIROBJ)\cyassl.obj \
+ $(DIROBJ)\darwinssl.obj \
$(DIROBJ)\dict.obj \
+ $(DIROBJ)\dotdot.obj \
$(DIROBJ)\easy.obj \
$(DIROBJ)\escape.obj \
- $(DIROBJ)\fileinfo.obj \
$(DIROBJ)\file.obj \
+ $(DIROBJ)\fileinfo.obj \
$(DIROBJ)\formdata.obj \
- $(DIROBJ)\ftplistparser.obj \
$(DIROBJ)\ftp.obj \
+ $(DIROBJ)\ftplistparser.obj \
$(DIROBJ)\getenv.obj \
$(DIROBJ)\getinfo.obj \
- $(DIROBJ)\gtls.obj \
$(DIROBJ)\gopher.obj \
+ $(DIROBJ)\gtls.obj \
$(DIROBJ)\hash.obj \
$(DIROBJ)\hmac.obj \
- $(DIROBJ)\hostares.obj \
$(DIROBJ)\hostasyn.obj \
+ $(DIROBJ)\hostcheck.obj \
+ $(DIROBJ)\hostip.obj \
$(DIROBJ)\hostip4.obj \
$(DIROBJ)\hostip6.obj \
- $(DIROBJ)\hostip.obj \
$(DIROBJ)\hostsyn.obj \
- $(DIROBJ)\hostthre.obj \
+ $(DIROBJ)\http.obj \
$(DIROBJ)\http_chunks.obj \
$(DIROBJ)\http_digest.obj \
$(DIROBJ)\http_negotiate.obj \
- $(DIROBJ)\http_ntlm.obj \
- $(DIROBJ)\http.obj \
+ $(DIROBJ)\http_negotiate_sspi.obj \
+ $(DIROBJ)\http_proxy.obj \
+ $(DIROBJ)\idn_win32.obj \
$(DIROBJ)\if2ip.obj \
$(DIROBJ)\imap.obj \
$(DIROBJ)\inet_ntop.obj \
$(DIROBJ)\inet_pton.obj \
+ $(DIROBJ)\krb5.obj \
$(DIROBJ)\ldap.obj \
$(DIROBJ)\llist.obj \
$(DIROBJ)\md4.obj \
@@ -498,28 +593,36 @@ X_OBJS= \
$(DIROBJ)\mprintf.obj \
$(DIROBJ)\multi.obj \
$(DIROBJ)\netrc.obj \
- $(DIROBJ)\nonblock.obj \
+ $(DIROBJ)\non-ascii.obj \
+ $(DIROBJ)\nonblock.obj \
+ $(DIROBJ)\nss.obj \
$(DIROBJ)\openldap.obj \
$(DIROBJ)\parsedate.obj \
$(DIROBJ)\pingpong.obj \
+ $(DIROBJ)\pipeline.obj \
$(DIROBJ)\polarssl.obj \
+ $(DIROBJ)\polarssl_threadlock.obj \
$(DIROBJ)\pop3.obj \
$(DIROBJ)\progress.obj \
$(DIROBJ)\rawstr.obj \
$(DIROBJ)\rtsp.obj \
+ $(DIROBJ)\schannel.obj \
+ $(DIROBJ)\security.obj \
$(DIROBJ)\select.obj \
$(DIROBJ)\sendf.obj \
$(DIROBJ)\share.obj \
$(DIROBJ)\slist.obj \
+ $(DIROBJ)\smb.obj \
$(DIROBJ)\smtp.obj \
- $(DIROBJ)\socks_gssapi.obj \
$(DIROBJ)\socks.obj \
+ $(DIROBJ)\socks_gssapi.obj \
$(DIROBJ)\socks_sspi.obj \
$(DIROBJ)\speedcheck.obj \
$(DIROBJ)\splay.obj \
$(DIROBJ)\ssh.obj \
- $(DIROBJ)\sslgen.obj \
- $(DIROBJ)\ssluse.obj \
+ $(DIROBJ)\vtls.obj \
+ $(DIROBJ)\openssl.obj \
+ $(DIROBJ)\strdup.obj \
$(DIROBJ)\strequal.obj \
$(DIROBJ)\strerror.obj \
$(DIROBJ)\strtok.obj \
@@ -538,14 +641,14 @@ all : $(TARGET)
$(TARGET): $(X_OBJS)
$(LNK) $(LFLAGS) $(X_OBJS)
- -xcopy $(DIROBJ)\$(LIB_NAME).dll . /y
- -xcopy $(DIROBJ)\$(LIB_NAME).lib . /y
- -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y
- -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y
- -xcopy $(DIROBJ)\$(IMPLIB_NAME).lib . /y
- -xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y
- -xcopy $(DIROBJ)\*.exp . /y
- -xcopy $(DIROBJ)\*.pdb . /y
+ -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y
+ -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y
+ -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y
+ -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y
+ -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y
+ -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y
+ -xcopy $(DIROBJ)\*.exp . /y
+ -xcopy $(DIROBJ)\*.pdb . /y
$(X_OBJS): $(DIROBJ)
@@ -557,6 +660,9 @@ $(DIROBJ):
{.\}.c{$(DIROBJ)\}.obj:
$(CC) $(CFLAGS) /Fo"$@" $<
+{.\vtls\}.c{$(DIROBJ)\}.obj:
+ $(CC) $(CFLAGS) /Fo"$@" $<
+
debug-dll\libcurl.res \
debug-dll-ssl-dll\libcurl.res \
debug-dll-zlib-dll\libcurl.res \
diff --git a/lib/Makefile.vc8 b/lib/Makefile.vc8
deleted file mode 100644
index af6fbf07..00000000
--- a/lib/Makefile.vc8
+++ /dev/null
@@ -1,571 +0,0 @@
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-###########################################################################
-#
-# Makefile for building libcurl with MSVC8
-#
-# Usage: see usage message below
-# Should be invoked from \lib directory
-# Edit the paths and desired library name
-# SSL path is only required if you intend compiling
-# with SSL.
-#
-# This make file leaves the result either a .lib or .dll file
-# in the \lib directory. It should be called from the \lib
-# directory.
-#
-# An option would have been to allow the source directory to
-# be specified, but I saw no requirement.
-#
-# Another option would have been to leave the .lib and .dll
-# files in the "cfg" directory, but then the make file
-# in \src would need to be changed.
-#
-##############################################################
-
-#
-# Stem for static libs and DLLs
-#
-LIB_NAME = libcurl
-LIB_NAME_DEBUG = libcurld
-
-#
-# Stem for DLL import libs
-#
-IMPLIB_NAME = libcurl_imp
-IMPLIB_NAME_DEBUG = libcurld_imp
-
-!IFNDEF OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8o
-!ENDIF
-
-!IFNDEF ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
-!ENDIF
-
-!IFNDEF MACHINE
-MACHINE = X86
-!ENDIF
-
-# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication
-# without an openssl installation and offers the ability to authenticate
-# using the "current logged in user". Since at least with MSVC8 the sspi.h
-# header is broken it is either required to install the Windows SDK,
-# or to fix sspi.h with adding this define at the beginning of sspi.h:
-# #define FreeCredentialHandle FreeCredentialsHandle
-#
-# If, for some reason the Windows SDK is installed but not installed
-# in the default location, you can specify WINDOWS_SDK_PATH.
-# It can be downloaded from:
-# http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
-
-# WINDOWS_SSPI = 1
-
-!IFDEF WINDOWS_SSPI
-!IFNDEF WINDOWS_SDK_PATH
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
-!ENDIF
-!ENDIF
-
-#############################################################
-## Nothing more to do below this line!
-
-CCNODBG = cl.exe /O2 /DNDEBUG
-CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1
-CFLAGSSSL = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
-CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
-CFLAGS = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
-CFLAGSLIB = /DCURL_STATICLIB
-LNKDLL = link.exe /DLL
-LNKLIB = link.exe /lib
-LFLAGS = /nologo /machine:$(MACHINE)
-SSLLIBS = libeay32.lib ssleay32.lib
-ZLIBLIBSDLL= zdll.lib
-ZLIBLIBS = zlib.lib
-WINLIBS = ws2_32.lib bufferoverflowu.lib wldap32.lib
-CFLAGS = $(CFLAGS)
-
-CFGSET = FALSE
-
-!IFDEF WINDOWS_SSPI
-CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
-!ENDIF
-
-!IFDEF USE_IPV6
-CFLAGS = $(CFLAGS) /DUSE_IPV6
-!ENDIF
-
-##############################################################
-# Runtime library configuration
-
-RTLIB = /MD
-RTLIBD = /MDd
-
-!IF "$(RTLIBCFG)" == "static"
-RTLIB = /MT
-RTLIBD = /MTd
-!ENDIF
-
-
-######################
-# release
-
-!IF "$(CFG)" == "release"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-zlib
-
-!IF "$(CFG)" == "release-zlib"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-dll
-
-!IF "$(CFG)" == "release-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# release-ssl
-
-!IF "$(CFG)" == "release-ssl"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-ssl-dll
-
-!IF "$(CFG)" == "release-ssl-dll"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-ssl-zlib
-
-!IF "$(CFG)" == "release-ssl-zlib"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-dll-ssl-dll
-
-!IF "$(CFG)" == "release-dll-ssl-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# release-zlib-dll
-
-!IF "$(CFG)" == "release-zlib-dll"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-dll-zlib-dll
-
-!IF "$(CFG)" == "release-dll-zlib-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# release-dll-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug
-
-!IF "$(CFG)" == "debug"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl
-
-!IF "$(CFG)" == "debug-ssl"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-zlib
-
-!IF "$(CFG)" == "debug-zlib"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl-dll
-
-!IF "$(CFG)" == "debug-ssl-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl-zlib
-
-!IF "$(CFG)" == "debug-ssl-zlib"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-zlib-dll
-
-!IF "$(CFG)" == "debug-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "debug-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-dll
-
-!IF "$(CFG)" == "debug-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug-dll-ssl-dll
-
-!IF "$(CFG)" == "debug-dll-ssl-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug-dll-zlib-dll
-
-!IF "$(CFG)" == "debug-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug-dll-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-#######################
-# Usage
-#
-!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != ""
-!MESSAGE Usage: nmake /f makefile.vc6 CFG=<config> <target>
-!MESSAGE where <config> is one of:
-!MESSAGE release - release static library
-!MESSAGE release-ssl - release static library with ssl
-!MESSAGE release-zlib - release static library with zlib
-!MESSAGE release-ssl-zlib - release static library with ssl and zlib
-!MESSAGE release-ssl-dll - release static library with dynamic ssl
-!MESSAGE release-zlib-dll - release static library with dynamic zlib
-!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib
-!MESSAGE release-dll - release dynamic library
-!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl
-!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib
-!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib
-!MESSAGE debug - debug static library
-!MESSAGE debug-ssl - debug static library with ssl
-!MESSAGE debug-zlib - debug static library with zlib
-!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib
-!MESSAGE debug-ssl-dll - debug static library with dynamic ssl
-!MESSAGE debug-zlib-dll - debug static library with dynamic zlib
-!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib
-!MESSAGE debug-dll - debug dynamic library
-!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl
-!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1
-!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib
-!MESSAGE <target> can be left blank in which case all is assumed
-!ERROR please choose a valid configuration "$(CFG)"
-!ENDIF
-
-#######################
-# Only the clean target can be used if a config was not provided.
-#
-!IF "$(CFGSET)" == "FALSE"
-clean:
- @-erase /s *.dll 2> NUL
- @-erase /s *.exp 2> NUL
- @-erase /s *.idb 2> NUL
- @-erase /s *.lib 2> NUL
- @-erase /s *.obj 2> NUL
- @-erase /s *.pch 2> NUL
- @-erase /s *.pdb 2> NUL
- @-erase /s *.res 2> NUL
-!ELSE
-# A config was provided, so the library can be built.
-#
-X_OBJS= \
- $(DIROBJ)\base64.obj \
- $(DIROBJ)\connect.obj \
- $(DIROBJ)\content_encoding.obj \
- $(DIROBJ)\cookie.obj \
- $(DIROBJ)\curl_addrinfo.obj \
- $(DIROBJ)\curl_fnmatch.obj \
- $(DIROBJ)\curl_gethostname.obj \
- $(DIROBJ)\curl_memrchr.obj \
- $(DIROBJ)\curl_rand.obj \
- $(DIROBJ)\curl_rtmp.obj \
- $(DIROBJ)\curl_sspi.obj \
- $(DIROBJ)\curl_threads.obj \
- $(DIROBJ)\dict.obj \
- $(DIROBJ)\easy.obj \
- $(DIROBJ)\escape.obj \
- $(DIROBJ)\fileinfo.obj \
- $(DIROBJ)\file.obj \
- $(DIROBJ)\formdata.obj \
- $(DIROBJ)\ftplistparser.obj \
- $(DIROBJ)\ftp.obj \
- $(DIROBJ)\getenv.obj \
- $(DIROBJ)\getinfo.obj \
- $(DIROBJ)\gtls.obj \
- $(DIROBJ)\gopher.obj \
- $(DIROBJ)\hash.obj \
- $(DIROBJ)\hmac.obj \
- $(DIROBJ)\hostares.obj \
- $(DIROBJ)\hostasyn.obj \
- $(DIROBJ)\hostip4.obj \
- $(DIROBJ)\hostip6.obj \
- $(DIROBJ)\hostip.obj \
- $(DIROBJ)\hostsyn.obj \
- $(DIROBJ)\hostthre.obj \
- $(DIROBJ)\http_chunks.obj \
- $(DIROBJ)\http_digest.obj \
- $(DIROBJ)\http_negotiate.obj \
- $(DIROBJ)\http_ntlm.obj \
- $(DIROBJ)\http.obj \
- $(DIROBJ)\if2ip.obj \
- $(DIROBJ)\imap.obj \
- $(DIROBJ)\inet_ntop.obj \
- $(DIROBJ)\inet_pton.obj \
- $(DIROBJ)\ldap.obj \
- $(DIROBJ)\llist.obj \
- $(DIROBJ)\md4.obj \
- $(DIROBJ)\md5.obj \
- $(DIROBJ)\memdebug.obj \
- $(DIROBJ)\mprintf.obj \
- $(DIROBJ)\multi.obj \
- $(DIROBJ)\netrc.obj \
- $(DIROBJ)\nonblock.obj \
- $(DIROBJ)\openldap.obj \
- $(DIROBJ)\parsedate.obj \
- $(DIROBJ)\pingpong.obj \
- $(DIROBJ)\polarssl.obj \
- $(DIROBJ)\pop3.obj \
- $(DIROBJ)\progress.obj \
- $(DIROBJ)\rawstr.obj \
- $(DIROBJ)\rtsp.obj \
- $(DIROBJ)\select.obj \
- $(DIROBJ)\sendf.obj \
- $(DIROBJ)\share.obj \
- $(DIROBJ)\slist.obj \
- $(DIROBJ)\smtp.obj \
- $(DIROBJ)\socks_gssapi.obj \
- $(DIROBJ)\socks.obj \
- $(DIROBJ)\socks_sspi.obj \
- $(DIROBJ)\speedcheck.obj \
- $(DIROBJ)\splay.obj \
- $(DIROBJ)\ssh.obj \
- $(DIROBJ)\sslgen.obj \
- $(DIROBJ)\ssluse.obj \
- $(DIROBJ)\strequal.obj \
- $(DIROBJ)\strerror.obj \
- $(DIROBJ)\strtok.obj \
- $(DIROBJ)\strtoofft.obj \
- $(DIROBJ)\telnet.obj \
- $(DIROBJ)\tftp.obj \
- $(DIROBJ)\timeval.obj \
- $(DIROBJ)\transfer.obj \
- $(DIROBJ)\url.obj \
- $(DIROBJ)\version.obj \
- $(DIROBJ)\warnless.obj \
- $(DIROBJ)\wildcard.obj \
- $(RESOURCE)
-
-all : $(TARGET)
-
-$(TARGET): $(X_OBJS)
- $(LNK) $(LFLAGS) $(X_OBJS)
- -xcopy $(DIROBJ)\$(LIB_NAME).dll . /y
- -xcopy $(DIROBJ)\$(LIB_NAME).lib . /y
- -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y
- -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y
- -xcopy $(DIROBJ)\$(IMPLIB_NAME).lib . /y
- -xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y
- -xcopy $(DIROBJ)\*.exp . /y
- -xcopy $(DIROBJ)\*.pdb . /y
-
-$(X_OBJS): $(DIROBJ)
-
-$(DIROBJ):
- @if not exist "$(DIROBJ)" mkdir $(DIROBJ)
-
-.SUFFIXES: .c .obj .res
-
-{.\}.c{$(DIROBJ)\}.obj:
- $(CC) $(CFLAGS) /Fo"$@" $<
-
-debug-dll\libcurl.res \
-debug-dll-ssl-dll\libcurl.res \
-debug-dll-zlib-dll\libcurl.res \
-debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
- rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc
-
-release-dll\libcurl.res \
-release-dll-ssl-dll\libcurl.res \
-release-dll-zlib-dll\libcurl.res \
-release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
- rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc
-!ENDIF # End of case where a config was provided.
diff --git a/lib/Makefile.vc9 b/lib/Makefile.vc9
deleted file mode 100644
index 7d5eb2fb..00000000
--- a/lib/Makefile.vc9
+++ /dev/null
@@ -1,571 +0,0 @@
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-###########################################################################
-#
-# Makefile for building libcurl with MSVC9
-#
-# Usage: see usage message below
-# Should be invoked from \lib directory
-# Edit the paths and desired library name
-# SSL path is only required if you intend compiling
-# with SSL.
-#
-# This make file leaves the result either a .lib or .dll file
-# in the \lib directory. It should be called from the \lib
-# directory.
-#
-# An option would have been to allow the source directory to
-# be specified, but I saw no requirement.
-#
-# Another option would have been to leave the .lib and .dll
-# files in the "cfg" directory, but then the make file
-# in \src would need to be changed.
-#
-##############################################################
-
-#
-# Stem for static libs and DLLs
-#
-LIB_NAME = libcurl
-LIB_NAME_DEBUG = libcurld
-
-#
-# Stem for DLL import libs
-#
-IMPLIB_NAME = libcurl_imp
-IMPLIB_NAME_DEBUG = libcurld_imp
-
-!IFNDEF OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8o
-!ENDIF
-
-!IFNDEF ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
-!ENDIF
-
-!IFNDEF MACHINE
-MACHINE = X86
-!ENDIF
-
-# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication
-# without an openssl installation and offers the ability to authenticate
-# using the "current logged in user". Since at least with MSVC9 the sspi.h
-# header is broken it is either required to install the Windows SDK,
-# or to fix sspi.h with adding this define at the beginning of sspi.h:
-# #define FreeCredentialHandle FreeCredentialsHandle
-#
-# If, for some reason the Windows SDK is installed but not installed
-# in the default location, you can specify WINDOWS_SDK_PATH.
-# It can be downloaded from:
-# http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
-
-# WINDOWS_SSPI = 1
-
-!IFDEF WINDOWS_SSPI
-!IFNDEF WINDOWS_SDK_PATH
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
-!ENDIF
-!ENDIF
-
-#############################################################
-## Nothing more to do below this line!
-
-CCNODBG = cl.exe /O2 /DNDEBUG
-CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1
-CFLAGSSSL = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
-CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
-CFLAGS = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
-CFLAGSLIB = /DCURL_STATICLIB
-LNKDLL = link.exe /DLL
-LNKLIB = link.exe /lib
-LFLAGS = /nologo /machine:$(MACHINE)
-SSLLIBS = libeay32.lib ssleay32.lib
-ZLIBLIBSDLL= zdll.lib
-ZLIBLIBS = zlib.lib
-WINLIBS = ws2_32.lib wldap32.lib
-CFLAGS = $(CFLAGS)
-
-CFGSET = FALSE
-
-!IFDEF WINDOWS_SSPI
-CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
-!ENDIF
-
-!IFDEF USE_IPV6
-CFLAGS = $(CFLAGS) /DUSE_IPV6
-!ENDIF
-
-##############################################################
-# Runtime library configuration
-
-RTLIB = /MD
-RTLIBD = /MDd
-
-!IF "$(RTLIBCFG)" == "static"
-RTLIB = /MT
-RTLIBD = /MTd
-!ENDIF
-
-
-######################
-# release
-
-!IF "$(CFG)" == "release"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-zlib
-
-!IF "$(CFG)" == "release-zlib"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-dll
-
-!IF "$(CFG)" == "release-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# release-ssl
-
-!IF "$(CFG)" == "release-ssl"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-ssl-dll
-
-!IF "$(CFG)" == "release-ssl-dll"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-ssl-zlib
-
-!IF "$(CFG)" == "release-ssl-zlib"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-dll-ssl-dll
-
-!IF "$(CFG)" == "release-dll-ssl-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# release-zlib-dll
-
-!IF "$(CFG)" == "release-zlib-dll"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# release-dll-zlib-dll
-
-!IF "$(CFG)" == "release-dll-zlib-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# release-dll-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
-CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug
-
-!IF "$(CFG)" == "debug"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl
-
-!IF "$(CFG)" == "debug-ssl"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-zlib
-
-!IF "$(CFG)" == "debug-zlib"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl-dll
-
-!IF "$(CFG)" == "debug-ssl-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl-zlib
-
-!IF "$(CFG)" == "debug-ssl-zlib"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
-LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-zlib-dll
-
-!IF "$(CFG)" == "debug-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "debug-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).lib
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
-CFGSET = TRUE
-!ENDIF
-
-######################
-# debug-dll
-
-!IF "$(CFG)" == "debug-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug-dll-ssl-dll
-
-!IF "$(CFG)" == "debug-dll-ssl-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug-dll-zlib-dll
-
-!IF "$(CFG)" == "debug-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-######################
-# debug-dll-ssl-dll-zlib-dll
-
-!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"
-TARGET = $(LIB_NAME_DEBUG).dll
-DIROBJ = $(CFG)
-LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
-LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
-CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)
-CFGSET = TRUE
-RESOURCE = $(DIROBJ)\libcurl.res
-!ENDIF
-
-#######################
-# Usage
-#
-!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != ""
-!MESSAGE Usage: nmake /f makefile.vc9 CFG=<config> <target>
-!MESSAGE where <config> is one of:
-!MESSAGE release - release static library
-!MESSAGE release-ssl - release static library with ssl
-!MESSAGE release-zlib - release static library with zlib
-!MESSAGE release-ssl-zlib - release static library with ssl and zlib
-!MESSAGE release-ssl-dll - release static library with dynamic ssl
-!MESSAGE release-zlib-dll - release static library with dynamic zlib
-!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib
-!MESSAGE release-dll - release dynamic library
-!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl
-!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib
-!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib
-!MESSAGE debug - debug static library
-!MESSAGE debug-ssl - debug static library with ssl
-!MESSAGE debug-zlib - debug static library with zlib
-!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib
-!MESSAGE debug-ssl-dll - debug static library with dynamic ssl
-!MESSAGE debug-zlib-dll - debug static library with dynamic zlib
-!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib
-!MESSAGE debug-dll - debug dynamic library
-!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl
-!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1
-!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib
-!MESSAGE <target> can be left blank in which case all is assumed
-!ERROR please choose a valid configuration "$(CFG)"
-!ENDIF
-
-#######################
-# Only the clean target can be used if a config was not provided.
-#
-!IF "$(CFGSET)" == "FALSE"
-clean:
- @-erase /s *.dll 2> NUL
- @-erase /s *.exp 2> NUL
- @-erase /s *.idb 2> NUL
- @-erase /s *.lib 2> NUL
- @-erase /s *.obj 2> NUL
- @-erase /s *.pch 2> NUL
- @-erase /s *.pdb 2> NUL
- @-erase /s *.res 2> NUL
-!ELSE
-# A config was provided, so the library can be built.
-#
-X_OBJS= \
- $(DIROBJ)\base64.obj \
- $(DIROBJ)\connect.obj \
- $(DIROBJ)\content_encoding.obj \
- $(DIROBJ)\cookie.obj \
- $(DIROBJ)\curl_addrinfo.obj \
- $(DIROBJ)\curl_fnmatch.obj \
- $(DIROBJ)\curl_gethostname.obj \
- $(DIROBJ)\curl_memrchr.obj \
- $(DIROBJ)\curl_rand.obj \
- $(DIROBJ)\curl_rtmp.obj \
- $(DIROBJ)\curl_sspi.obj \
- $(DIROBJ)\curl_threads.obj \
- $(DIROBJ)\dict.obj \
- $(DIROBJ)\easy.obj \
- $(DIROBJ)\escape.obj \
- $(DIROBJ)\fileinfo.obj \
- $(DIROBJ)\file.obj \
- $(DIROBJ)\formdata.obj \
- $(DIROBJ)\ftplistparser.obj \
- $(DIROBJ)\ftp.obj \
- $(DIROBJ)\getenv.obj \
- $(DIROBJ)\getinfo.obj \
- $(DIROBJ)\gtls.obj \
- $(DIROBJ)\gopher.obj \
- $(DIROBJ)\hash.obj \
- $(DIROBJ)\hmac.obj \
- $(DIROBJ)\hostares.obj \
- $(DIROBJ)\hostasyn.obj \
- $(DIROBJ)\hostip4.obj \
- $(DIROBJ)\hostip6.obj \
- $(DIROBJ)\hostip.obj \
- $(DIROBJ)\hostsyn.obj \
- $(DIROBJ)\hostthre.obj \
- $(DIROBJ)\http_chunks.obj \
- $(DIROBJ)\http_digest.obj \
- $(DIROBJ)\http_negotiate.obj \
- $(DIROBJ)\http_ntlm.obj \
- $(DIROBJ)\http.obj \
- $(DIROBJ)\if2ip.obj \
- $(DIROBJ)\imap.obj \
- $(DIROBJ)\inet_ntop.obj \
- $(DIROBJ)\inet_pton.obj \
- $(DIROBJ)\ldap.obj \
- $(DIROBJ)\llist.obj \
- $(DIROBJ)\md4.obj \
- $(DIROBJ)\md5.obj \
- $(DIROBJ)\memdebug.obj \
- $(DIROBJ)\mprintf.obj \
- $(DIROBJ)\multi.obj \
- $(DIROBJ)\netrc.obj \
- $(DIROBJ)\nonblock.obj \
- $(DIROBJ)\openldap.obj \
- $(DIROBJ)\parsedate.obj \
- $(DIROBJ)\pingpong.obj \
- $(DIROBJ)\polarssl.obj \
- $(DIROBJ)\pop3.obj \
- $(DIROBJ)\progress.obj \
- $(DIROBJ)\rawstr.obj \
- $(DIROBJ)\rtsp.obj \
- $(DIROBJ)\select.obj \
- $(DIROBJ)\sendf.obj \
- $(DIROBJ)\share.obj \
- $(DIROBJ)\slist.obj \
- $(DIROBJ)\smtp.obj \
- $(DIROBJ)\socks_gssapi.obj \
- $(DIROBJ)\socks.obj \
- $(DIROBJ)\socks_sspi.obj \
- $(DIROBJ)\speedcheck.obj \
- $(DIROBJ)\splay.obj \
- $(DIROBJ)\ssh.obj \
- $(DIROBJ)\sslgen.obj \
- $(DIROBJ)\ssluse.obj \
- $(DIROBJ)\strequal.obj \
- $(DIROBJ)\strerror.obj \
- $(DIROBJ)\strtok.obj \
- $(DIROBJ)\strtoofft.obj \
- $(DIROBJ)\telnet.obj \
- $(DIROBJ)\tftp.obj \
- $(DIROBJ)\timeval.obj \
- $(DIROBJ)\transfer.obj \
- $(DIROBJ)\url.obj \
- $(DIROBJ)\version.obj \
- $(DIROBJ)\warnless.obj \
- $(DIROBJ)\wildcard.obj \
- $(RESOURCE)
-
-all : $(TARGET)
-
-$(TARGET): $(X_OBJS)
- $(LNK) $(LFLAGS) $(X_OBJS)
- -xcopy $(DIROBJ)\$(LIB_NAME).dll . /y
- -xcopy $(DIROBJ)\$(LIB_NAME).lib . /y
- -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y
- -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y
- -xcopy $(DIROBJ)\$(IMPLIB_NAME).lib . /y
- -xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y
- -xcopy $(DIROBJ)\*.exp . /y
- -xcopy $(DIROBJ)\*.pdb . /y
-
-$(X_OBJS): $(DIROBJ)
-
-$(DIROBJ):
- @if not exist "$(DIROBJ)" mkdir $(DIROBJ)
-
-.SUFFIXES: .c .obj .res
-
-{.\}.c{$(DIROBJ)\}.obj:
- $(CC) $(CFLAGS) /Fo"$@" $<
-
-debug-dll\libcurl.res \
-debug-dll-ssl-dll\libcurl.res \
-debug-dll-zlib-dll\libcurl.res \
-debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
- rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc
-
-release-dll\libcurl.res \
-release-dll-ssl-dll\libcurl.res \
-release-dll-zlib-dll\libcurl.res \
-release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
- rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc
-!ENDIF # End of case where a config was provided.
diff --git a/lib/Makefile.vxworks b/lib/Makefile.vxworks
index 796d1605..7ff197f0 100644
--- a/lib/Makefile.vxworks
+++ b/lib/Makefile.vxworks
@@ -5,7 +5,7 @@
#Description: makefile to be used in order to compile libcurl for VxWoorks 6.3.
#
#How to use:
-# 1. Adjust environment variables at the file begining
+# 1. Adjust environment variables at the file beginning
# 2. Open the Command Prompt window and change directory ('cd')
# into the 'lib' folder
# 3. Add <CYGWIN>/bin folder to the PATH environment variable
@@ -33,10 +33,10 @@ BUILD_TYPE := debug
USER_CFLAGS:=
# directories where to seek for includes and libraries
-OPENSSL_INC := D:/libraries/openssl/openssl-0.9.8a-vxWorks6.3/include
-OPENSSL_LIB := D:/libraries/openssl/openssl-0.9.8a-vxWorks6.3
-ZLIB_INC := D:/libraries/zlib/zlib-1.2.3-VxWorks6.3/zlib-1.2.3
-ZLIB_LIB := D:/libraries/zlib/zlib-1.2.3-VxWorks6.3/binaries/vxworks_3.1_gnu/Debug/lib
+OPENSSL_INC := D:/libraries/openssl/openssl-0.9.8zc-vxWorks6.3/include
+OPENSSL_LIB := D:/libraries/openssl/openssl-0.9.8zc-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 :=
ARES_LIB :=
diff --git a/lib/README.ares b/lib/README.ares
deleted file mode 100644
index 8c77937e..00000000
--- a/lib/README.ares
+++ /dev/null
@@ -1,69 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
- How To Build libcurl to Use c-ares For Asynch Name Resolves
- ===========================================================
-
-c-ares:
- http://c-ares.haxx.se/
-
-NOTE
- The latest libcurl version requires c-ares 1.6.0 or later.
-
- Once upon the time libcurl built fine with the "original" ares. That is no
- longer true. You need to use c-ares.
-
-Build c-ares
-============
-
-1. unpack the c-ares archive
-2. cd c-ares-dir
-3. ./configure
-4. make
-5. make install
-
-Build libcurl to use c-ares in the curl source tree
-===================================================
-
-1. name or symlink the c-ares source directory 'ares' in the curl source
- directory
-2. ./configure --enable-ares
-
- Optionally, you can point out the c-ares install tree root with the the
- --enable-ares option.
-
-3. make
-
-Build libcurl to use an installed c-ares
-========================================
-
-1. ./configure --enable-ares=/path/to/ares/install
-2. make
-
-c-ares on win32
-===============
-(description brought by Dominick Meglio)
-
-First I compiled c-ares. I changed the default C runtime library to be the
-single-threaded rather than the multi-threaded (this seems to be required to
-prevent linking errors later on). Then I simply build the areslib project (the
-other projects adig/ahost seem to fail under MSVC).
-
-Next was libcurl. I opened lib/config-win32.h and I added a:
- #define USE_ARES 1
-
-Next thing I did was I added the path for the ares includes to the include
-path, and the libares.lib to the libraries.
-
-Lastly, I also changed libcurl to be single-threaded rather than
-multi-threaded, again this was to prevent some duplicate symbol errors. I'm
-not sure why I needed to change everything to single-threaded, but when I
-didn't I got redefinition errors for several CRT functions (malloc, stricmp,
-etc.)
-
-I would have modified the MSVC++ project files, but I only have VC.NET and it
-uses a different format than VC6.0 so I didn't want to go and change
-everything and remove VC6.0 support from libcurl.
diff --git a/lib/README.curl_off_t b/lib/README.curl_off_t
deleted file mode 100644
index 923b2774..00000000
--- a/lib/README.curl_off_t
+++ /dev/null
@@ -1,68 +0,0 @@
-
- curl_off_t explained
- ====================
-
-curl_off_t is a data type provided by the external libcurl include headers. It
-is the type meant to be used for the curl_easy_setopt() options that end with
-LARGE. The type is 64bit large on most modern platforms.
-
-Transition from < 7.19.0 to >= 7.19.0
--------------------------------------
-
-Applications that used libcurl before 7.19.0 that are rebuilt with a libcurl
-that is 7.19.0 or later may or may not have to worry about anything of
-this. We have made a significant effort to make the transition really seamless
-and transparent.
-
-You have have to take notice if you are in one of the following situations:
-
-o Your app is using or will after the transition use a libcurl that is built
- with LFS (large file support) disabled even though your system otherwise
- supports it.
-
-o Your app is using or will after the transition use a libcurl that doesn't
- support LFS at all, but your system and compiler support 64bit data types.
-
-In both these cases, the curl_off_t type will now (after the transition) be
-64bit where it previously was 32bit. This will cause a binary incompatibility
-that you MAY need to deal with.
-
-Benefits
---------
-
-This new way has several benefits:
-
-o Platforms without LFS support can still use libcurl to do >32 bit file
- transfers and range operations etc as long as they have >32 bit data-types
- supported.
-
-o Applications will no longer easily build with the curl_off_t size
- mismatched, which has been a very frequent (and annoying) problem with
- libcurl <= 7.18.2
-
-Historically
-------------
-
-Previously, before 7.19.0, the curl_off_t type would be rather strongly
-connected to the size of the system off_t type, where currently curl_off_t is
-independent of that.
-
-The strong connection to off_t made it troublesome for application authors
-since when they did mistakes, they could get curl_off_t type of different
-sizes in the app vs libcurl, and that caused strange effects that were hard to
-track and detect by users of libcurl.
-
-SONAME
-------
-
-We opted to not bump the soname for the library unconditionally, simply
-because soname bumping is causing a lot of grief and moaning all over the
-community so we try to keep that at minimum. Also, our selected design path
-should be 100% backwards compatible for the vast majority of all libcurl
-users.
-
-Enforce SONAME bump
--------------------
-
-If configure doesn't detect your case where a bump is necessary, re-run it
-with the --enable-soname-bump command line option!
diff --git a/lib/README.curlx b/lib/README.curlx
deleted file mode 100644
index 5375b0d1..00000000
--- a/lib/README.curlx
+++ /dev/null
@@ -1,61 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
- Source Code Functions Apps Might Use
- ====================================
-
-The libcurl source code offers a few functions by source only. They are not
-part of the official libcurl API, but the source files might be useful for
-others so apps can optionally compile/build with these sources to gain
-additional functions.
-
-We provide them through a single header file for easy access for apps:
-"curlx.h"
-
- curlx_strtoofft()
-
- A macro that converts a string containing a number to a curl_off_t number.
- This might use the curlx_strtoll() function which is provided as source
- code in strtoofft.c. Note that the function is only provided if no
- strtoll() (or equivalent) function exist on your platform. If curl_off_t
- is only a 32 bit number on your platform, this macro uses strtol().
-
- curlx_tvnow()
-
- returns a struct timeval for the current time.
-
- curlx_tvdiff()
-
- returns the difference between two timeval structs, in number of
- milliseconds.
-
- curlx_tvdiff_secs()
-
- returns the same as curlx_tvdiff but with full usec resolution (as a
- double)
-
-FUTURE
-======
-
- Several functions will be removed from the public curl_ name space in a
- future libcurl release. They will then only become available as curlx_
- functions instead. To make the transition easier, we already today provide
- these functions with the curlx_ prefix to allow sources to get built properly
- with the new function names. The functions this concerns are:
-
- curlx_getenv
- curlx_strequal
- curlx_strnequal
- curlx_mvsnprintf
- curlx_msnprintf
- curlx_maprintf
- curlx_mvaprintf
- curlx_msprintf
- curlx_mprintf
- curlx_mfprintf
- curlx_mvsprintf
- curlx_mvprintf
- curlx_mvfprintf
diff --git a/lib/README.encoding b/lib/README.encoding
deleted file mode 100644
index 0d31b365..00000000
--- a/lib/README.encoding
+++ /dev/null
@@ -1,60 +0,0 @@
-
- Content Encoding Support for libcurl
-
-* About content encodings:
-
-HTTP/1.1 [RFC 2616] specifies that a client may request that a server encode
-its response. This is usually used to compress a response using one of a set
-of commonly available compression techniques. These schemes are `deflate' (the
-zlib algorithm), `gzip' and `compress' [sec 3.5, RFC 2616]. A client requests
-that the sever perform an encoding by including an Accept-Encoding header in
-the request document. The value of the header should be one of the recognized
-tokens `deflate', ... (there's a way to register new schemes/tokens, see sec
-3.5 of the spec). A server MAY honor the client's encoding request. When a
-response is encoded, the server includes a Content-Encoding header in the
-response. The value of the Content-Encoding header indicates which scheme was
-used to encode the data.
-
-A client may tell a server that it can understand several different encoding
-schemes. In this case the server may choose any one of those and use it to
-encode the response (indicating which one using the Content-Encoding header).
-It's also possible for a client to attach priorities to different schemes so
-that the server knows which it prefers. See sec 14.3 of RFC 2616 for more
-information on the Accept-Encoding header.
-
-* Current support for content encoding:
-
-Support for the 'deflate' and 'gzip' content encoding are supported by
-libcurl. Both regular and chunked transfers should work fine. The library
-zlib is required for this feature. 'deflate' support was added by James
-Gallagher, and support for the 'gzip' encoding was added by Dan Fandrich.
-
-* The libcurl interface:
-
-To cause libcurl to request a content encoding use:
-
- curl_easy_setopt(curl, CURLOPT_ENCODING, <string>)
-
-where <string> is the intended value of the Accept-Encoding header.
-
-Currently, libcurl only understands how to process responses that use the
-"deflate" or "gzip" Content-Encoding, so the only values for CURLOPT_ENCODING
-that will work (besides "identity," which does nothing) are "deflate" and
-"gzip" If a response is encoded using the "compress" or methods, libcurl will
-return an error indicating that the response could not be decoded. If
-<string> is NULL no Accept-Encoding header is generated. If <string> is a
-zero-length string, then an Accept-Encoding header containing all supported
-encodings will be generated.
-
-The CURLOPT_ENCODING must be set to any non-NULL value for content to be
-automatically decoded. If it is not set and the server still sends encoded
-content (despite not having been asked), the data is returned in its raw form
-and the Content-Encoding type is not checked.
-
-* The curl interface:
-
-Use the --compressed option with curl to cause it to ask servers to compress
-responses using any format supported by curl.
-
-James Gallagher <jgallagher@gso.uri.edu>
-Dan Fandrich <dan@coneharvesters.com>
diff --git a/lib/README.hostip b/lib/README.hostip
deleted file mode 100644
index 9723b93f..00000000
--- a/lib/README.hostip
+++ /dev/null
@@ -1,35 +0,0 @@
- hostip.c explained
- ==================
-
- The main COMPILE-TIME DEFINES to keep in mind when reading the host*.c
- source file are these:
-
- CURLRES_IPV6 - this host has getaddrinfo() and family, and thus we use
- that. The host may not be able to resolve IPv6, but we don't really have to
- take that into account. Hosts that aren't IPv6-enabled have CURLRES_IPV4
- defined.
-
- 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.
-
- 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
- supported asynch API will be the same as for ares-builds.
-
- If any of the two previous are defined, CURLRES_ASYNCH is defined too. If
- libcurl is not built to use an asynchronous resolver, CURLRES_SYNCH is
- defined.
-
- The host*.c sources files are split up like this:
-
- hostip.c - method-independent resolver functions and utility functions
- hostasyn.c - functions for asynchronous name resolves
- 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
-
- 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.
diff --git a/lib/README.httpauth b/lib/README.httpauth
deleted file mode 100644
index 96050451..00000000
--- a/lib/README.httpauth
+++ /dev/null
@@ -1,74 +0,0 @@
-
-1. PUT/POST without a known auth to use (possibly no auth required):
-
- (When explicitly set to use a multi-pass auth when doing a POST/PUT,
- libcurl should immediately go the Content-Length: 0 bytes route to avoid
- the first send all data phase, step 2. If told to use a single-pass auth,
- goto step 3.)
-
- Issue the proper PUT/POST request immediately, with the correct
- Content-Length and Expect: headers.
-
- If a 100 response is received or the wait for one times out, start sending
- the request-body.
-
- If a 401 (or 407 when talking through a proxy) is received, then:
-
- If we have "more than just a little" data left to send, close the
- connection. Exactly what "more than just a little" means will have to be
- determined. Possibly the current transfer speed should be taken into
- account as well.
-
- NOTE: if the size of the POST data is less than MAX_INITIAL_POST_SIZE (when
- CURLOPT_POSTFIELDS is used), libcurl will send everything in one single
- write() (all request-headers and request-body) and thus it will
- unconditionally send the full post data here.
-
-2. PUT/POST with multi-pass auth but not yet completely negotiated:
-
- Send a PUT/POST request, we know that it will be rejected and thus we claim
- Content-Length zero to avoid having to send the request-body. (This seems
- to be what IE does.)
-
-3. PUT/POST as the last step in the auth negotiation, that is when we have
- what we believe is a completed negotiation:
-
- Send a full and proper PUT/POST request (again) with the proper
- Content-Length and a following request-body.
-
- NOTE: this may very well be the second (or even third) time the whole or at
- least parts of the request body is sent to the server. Since the data may
- be provided to libcurl with a callback, we need a way to tell the app that
- the upload is to be restarted so that the callback will provide data from
- the start again. This requires an API method/mechanism that libcurl
- doesn't have today. See below.
-
-Data Rewind
-
- It will be troublesome for some apps to deal with a rewind like this in all
- circumstances. I'm thinking for example when using 'curl' to upload data
- from stdin. If libcurl ends up having to rewind the reading for a request
- to succeed, of course a lack of this callback or if it returns failure, will
- cause the request to fail completely.
-
- The new callback is set with CURLOPT_IOCTLFUNCTION (in an attempt to add a
- more generic function that might be used for other IO-related controls in
- the future):
-
- curlioerr curl_ioctl(CURL *handle, curliocmd cmd, void *clientp);
-
- And in the case where the read is to be rewinded, it would be called with a
- cmd named CURLIOCMD_RESTARTREAD. The callback would then return CURLIOE_OK,
- if things are fine, or CURLIOE_FAILRESTART if not.
-
-Backwards Compatibility
-
- The approach used until now, that issues a HEAD on the given URL to trigger
- the auth negotiation could still be supported and encouraged, but it would
- be up to the app to first fetch a URL with GET/HEAD to negotiate on, since
- then a following PUT/POST wouldn't need to negotiate authentication and
- thus avoid double-sending data.
-
- Optionally, we keep the current approach if some option is set
- (CURLOPT_HEADBEFOREAUTH or similar), since it seems to work fairly well for
- POST on most servers.
diff --git a/lib/README.memoryleak b/lib/README.memoryleak
deleted file mode 100644
index 16617779..00000000
--- a/lib/README.memoryleak
+++ /dev/null
@@ -1,55 +0,0 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
- How To Track Down Suspected Memory Leaks in libcurl
- ===================================================
-
-Single-threaded
-
- Please note that this memory leak system is not adjusted to work in more
- than one thread. If you want/need to use it in a multi-threaded app. Please
- adjust accordingly.
-
-
-Build
-
- Rebuild libcurl with -DCURLDEBUG (usually, rerunning configure with
- --enable-debug fixes this). 'make clean' first, then 'make' so that all
- files actually are rebuilt properly. It will also make sense to build
- libcurl with the debug option (usually -g to the compiler) so that debugging
- it will be easier if you actually do find a leak in the library.
-
- This will create a library that has memory debugging enabled.
-
-Modify Your Application
-
- Add a line in your application code:
-
- curl_memdebug("dump");
-
- This will make the malloc debug system output a full trace of all resource
- using functions to the given file name. Make sure you rebuild your program
- and that you link with the same libcurl you built for this purpose as
- described above.
-
-Run Your Application
-
- Run your program as usual. Watch the specified memory trace file grow.
-
- Make your program exit and use the proper libcurl cleanup functions etc. So
- that all non-leaks are returned/freed properly.
-
-Analyze the Flow
-
- Use the tests/memanalyze.pl perl script to analyze the dump file:
-
- tests/memanalyze.pl dump
-
- This now outputs a report on what resources that were allocated but never
- freed etc. This report is very fine for posting to the list!
-
- If this doesn't produce any output, no leak was detected in libcurl. Then
- the leak is mostly likely to be in your code.
diff --git a/lib/README.multi_socket b/lib/README.multi_socket
deleted file mode 100644
index d91e1d9f..00000000
--- a/lib/README.multi_socket
+++ /dev/null
@@ -1,53 +0,0 @@
-Implementation of the curl_multi_socket API
-
- The main ideas of the new API are simply:
-
- 1 - The application can use whatever event system it likes as it gets info
- from libcurl about what file descriptors libcurl waits for what action
- on. (The previous API returns fd_sets which is very select()-centric).
-
- 2 - When the application discovers action on a single socket, it calls
- libcurl and informs that there was action on this particular socket and
- libcurl can then act on that socket/transfer only and not care about
- any other transfers. (The previous API always had to scan through all
- the existing transfers.)
-
- The idea is that curl_multi_socket_action() calls a given callback with
- information about what socket to wait for what action on, and the callback
- only gets called if the status of that socket has changed.
-
- We also added a timer callback that makes libcurl call the application when
- the timeout value changes, and you set that with curl_multi_setopt() and the
- CURLMOPT_TIMERFUNCTION option. To get this to work, Internally, there's an
- added a struct to each easy handle in which we store an "expire time" (if
- any). The structs are then "splay sorted" so that we can add and remove
- times from the linked list and yet somewhat swiftly figure out both how long
- time there is until the next nearest timer expires and which timer (handle)
- we should take care of now. Of course, the upside of all this is that we get
- a curl_multi_timeout() that should also work with old-style applications
- that use curl_multi_perform().
-
- We created an internal "socket to easy handles" hash table that given
- a socket (file descriptor) return the easy handle that waits for action on
- that socket. This hash is made using the already existing hash code
- (previously only used for the DNS cache).
-
- To make libcurl able to report plain sockets in the socket callback, we had
- to re-organize the internals of the curl_multi_fdset() etc so that the
- conversion from sockets to fd_sets for that function is only done in the
- last step before the data is returned. I also had to extend c-ares to get a
- function that can return plain sockets, as that library too returned only
- fd_sets and that is no longer good enough. The changes done to c-ares are
- available in c-ares 1.3.1 and later.
-
- We have done a test runs with up to 9000 connections (with a single active
- one). The curl_multi_socket_action() invoke then takes less than 10
- microseconds in average (using the read-only-1-byte-at-a-time hack). We are
- now below the 60 microseconds "per socket action" goal (the extra 50 is the
- time libevent needs).
-
-Documentation
-
- http://curl.haxx.se/libcurl/c/curl_multi_socket_action.html
- http://curl.haxx.se/libcurl/c/curl_multi_timeout.html
- http://curl.haxx.se/libcurl/c/curl_multi_setopt.html
diff --git a/lib/README.pingpong b/lib/README.pingpong
deleted file mode 100644
index 69ba9aad..00000000
--- a/lib/README.pingpong
+++ /dev/null
@@ -1,30 +0,0 @@
-Date: December 5, 2009
-
-Pingpong
-========
-
- Pingpong is just my (Daniel's) jestful collective name on the protocols that
- share a very similar kind of back-and-forth procedure with command and
- responses to and from the server. FTP was previously the only protocol in
- that family that libcurl supported, but when POP3, IMAP and SMTP joined the
- team I moved some of the internals into a separate pingpong module to be
- easier to get used by all these protocols to reduce code duplication and ease
- code re-use between these protocols.
-
-FTP
-
- In 7.20.0 we converted code to use the new pingpong code from previously
- having been all "native" FTP code.
-
-POP3
-
- There's no support in the documented URL format to specify the exact mail to
- get, but we support that as the path specified in the URL.
-
-IMAP
-
-SMTP
-
- There's no official URL syntax defined for SMTP, but we use only the generic
- one and we provide two additional libcurl options to specify receivers and
- sender of the actual mail.
diff --git a/lib/README.pipelining b/lib/README.pipelining
deleted file mode 100644
index c7b46224..00000000
--- a/lib/README.pipelining
+++ /dev/null
@@ -1,51 +0,0 @@
-HTTP Pipelining with libcurl
-============================
-
-Background
-
-Since pipelining implies that one or more requests are sent to a server before
-the previous response(s) have been received, we only support it for multi
-interface use.
-
-Considerations
-
-When using the multi interface, you create one easy handle for each transfer.
-Bascially any number of handles can be created, added and used with the multi
-interface - simultaneously. It is an interface designed to allow many
-simultaneous transfers while still using a single thread. Pipelining does not
-change any of these details.
-
-API
-
-We've added a new option to curl_multi_setopt() called CURLMOPT_PIPELINING
-that enables "attempted pipelining" and then all easy handles used on that
-handle will attempt to use an existing pipeline.
-
-Details
-
-- A pipeline is only created if a previous connection exists to the same IP
- address that the new request is being made to use.
-
-- Pipelines are only supported for HTTP(S) as no other currently supported
- protocol has features resemembling this, but we still name this feature
- plain 'pipelining' to possibly one day support it for other protocols as
- well.
-
-- HTTP Pipelining is for GET and HEAD requests only.
-
-- When a pipeline is in use, we must take precautions so that when used easy
- handles (i.e those who still wait for a response) are removed from the multi
- handle, we must deal with the outstanding response nicely.
-
-- Explicitly asking for pipelining handle X and handle Y won't be supported.
- It isn't easy for an app to do this association. The lib should probably
- still resolve the second one properly to make sure that they actually _can_
- be considered for pipelining. Also, asking for explicit pipelining on handle
- X may be tricky when handle X get a closed connection.
-
-- We need options to control max pipeline length, and probably how to behave
- if we reach that limit. As was discussed on the list, it can probably be
- made very complicated, so perhaps we can think of a way to pass all
- variables involved to a callback and let the application decide how to act
- in specific situations. Either way, these fancy options are only interesting
- to work on when everything is working and we have working apps to test with.
diff --git a/lib/amigaos.c b/lib/amigaos.c
index 2055126f..e3ff85f9 100644
--- a/lib/amigaos.c
+++ b/lib/amigaos.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,11 +20,14 @@
*
***************************************************************************/
-#ifdef __AMIGA__ /* Any AmigaOS flavour */
+#include "curl_setup.h"
+
+#if defined(__AMIGA__) && !defined(__ixemul__)
-#include "amigaos.h"
#include <amitcp/socketbasetags.h>
+#include "amigaos.h"
+
struct Library *SocketBase = NULL;
extern int errno, h_errno;
@@ -35,7 +38,7 @@ void __request(const char *msg);
# define __request( msg ) Printf( msg "\n\a")
#endif
-void amiga_cleanup()
+void Curl_amiga_cleanup()
{
if(SocketBase) {
CloseLibrary(SocketBase);
@@ -43,7 +46,7 @@ void amiga_cleanup()
}
}
-BOOL amiga_init()
+bool Curl_amiga_init()
{
if(!SocketBase)
SocketBase = OpenLibrary("bsdsocket.library", 4);
@@ -61,20 +64,14 @@ BOOL amiga_init()
}
#ifndef __libnix__
- atexit(amiga_cleanup);
+ atexit(Curl_amiga_cleanup);
#endif
return TRUE;
}
#ifdef __libnix__
-ADD2EXIT(amiga_cleanup,-50);
-#endif
-
-#else /* __AMIGA__ */
-
-#ifdef __POCC__
-# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */
+ADD2EXIT(Curl_amiga_cleanup, -50);
#endif
-#endif /* __AMIGA__ */
+#endif /* __AMIGA__ && ! __ixemul__ */
diff --git a/lib/amigaos.h b/lib/amigaos.h
index d6ff0646..76578be8 100644
--- a/lib/amigaos.h
+++ b/lib/amigaos.h
@@ -1,5 +1,5 @@
-#ifndef LIBCURL_AMIGAOS_H
-#define LIBCURL_AMIGAOS_H
+#ifndef HEADER_CURL_AMIGAOS_H
+#define HEADER_CURL_AMIGAOS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,37 +21,19 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "curl_setup.h"
-#ifdef __AMIGA__ /* Any AmigaOS flavour */
+#if defined(__AMIGA__) && !defined(__ixemul__)
-#ifndef __ixemul__
+bool Curl_amiga_init();
+void Curl_amiga_cleanup();
-#include <exec/types.h>
-#include <exec/execbase.h>
+#else
-#include <proto/exec.h>
-#include <proto/dos.h>
+#define Curl_amiga_init() 1
+#define Curl_amiga_cleanup() Curl_nop_stmt
-#include <sys/socket.h>
-
-#include "config-amigaos.h"
-
-#ifndef select
-# define select(args...) WaitSelect( args, NULL)
-#endif
-#ifndef ioctl
-# define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c)
#endif
-#define _AMIGASF 1
-
-extern void amiga_cleanup();
-extern BOOL amiga_init();
-
-#else /* __ixemul__ */
-
-#warning compiling with ixemul...
-#endif /* __ixemul__ */
-#endif /* __AMIGA__ */
-#endif /* LIBCURL_AMIGAOS_H */
+#endif /* HEADER_CURL_AMIGAOS_H */
diff --git a/lib/arpa_telnet.h b/lib/arpa_telnet.h
index ddb14f6f..098d9a92 100644
--- a/lib/arpa_telnet.h
+++ b/lib/arpa_telnet.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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,11 @@
* Telnet option defines. Add more here if in need.
*/
#define CURL_TELOPT_BINARY 0 /* binary 8bit data */
-#define CURL_TELOPT_SGA 3 /* Supress Go Ahead */
+#define CURL_TELOPT_ECHO 1 /* just echo! */
+#define CURL_TELOPT_SGA 3 /* Suppress Go Ahead */
#define CURL_TELOPT_EXOPL 255 /* EXtended OPtions List */
#define CURL_TELOPT_TTYPE 24 /* Terminal TYPE */
+#define CURL_TELOPT_NAWS 31 /* Negotiate About Window Size */
#define CURL_TELOPT_XDISPLOC 35 /* X DISPlay LOCation */
#define CURL_TELOPT_NEW_ENVIRON 39 /* NEW ENVIRONment variables */
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
new file mode 100644
index 00000000..98ecdfd7
--- /dev/null
+++ b/lib/asyn-ares.c
@@ -0,0 +1,691 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef __VMS
+#include <in.h>
+#include <inet.h>
+#endif
+
+#ifdef HAVE_PROCESS_H
+#include <process.h>
+#endif
+
+#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
+#undef in_addr_t
+#define in_addr_t unsigned long
+#endif
+
+/***********************************************************************
+ * Only for ares-enabled builds
+ * And only for functions that fulfill the asynch resolver backend API
+ * as defined in asyn.h, nothing else belongs in this file!
+ **********************************************************************/
+
+#ifdef CURLRES_ARES
+
+#include "urldata.h"
+#include "sendf.h"
+#include "hostip.h"
+#include "hash.h"
+#include "share.h"
+#include "strerror.h"
+#include "url.h"
+#include "multiif.h"
+#include "inet_pton.h"
+#include "connect.h"
+#include "select.h"
+#include "progress.h"
+#include "curl_printf.h"
+
+# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
+ (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
+# define CARES_STATICLIB
+# endif
+# include <ares.h>
+# include <ares_version.h> /* really old c-ares didn't include this by
+ itself */
+
+#if ARES_VERSION >= 0x010500
+/* c-ares 1.5.0 or later, the callback proto is modified */
+#define HAVE_CARES_CALLBACK_TIMEOUTS 1
+#endif
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+struct ResolverResults {
+ int num_pending; /* number of ares_gethostbyname() requests */
+ Curl_addrinfo *temp_ai; /* intermediary result while fetching c-ares parts */
+ int last_status;
+};
+
+/*
+ * Curl_resolver_global_init() - the generic low-level asynchronous name
+ * resolve API. Called from curl_global_init() to initialize global resolver
+ * environment. Initializes ares library.
+ */
+int Curl_resolver_global_init(void)
+{
+#ifdef CARES_HAVE_ARES_LIBRARY_INIT
+ if(ares_library_init(ARES_LIB_INIT_ALL)) {
+ return CURLE_FAILED_INIT;
+ }
+#endif
+ return CURLE_OK;
+}
+
+/*
+ * Curl_resolver_global_cleanup()
+ *
+ * Called from curl_global_cleanup() to destroy global resolver environment.
+ * Deinitializes ares library.
+ */
+void Curl_resolver_global_cleanup(void)
+{
+#ifdef CARES_HAVE_ARES_LIBRARY_CLEANUP
+ ares_library_cleanup();
+#endif
+}
+
+/*
+ * Curl_resolver_init()
+ *
+ * Called from curl_easy_init() -> Curl_open() to initialize resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure). Fills the passed pointer by the initialized ares_channel.
+ */
+CURLcode Curl_resolver_init(void **resolver)
+{
+ int status = ares_init((ares_channel*)resolver);
+ if(status != ARES_SUCCESS) {
+ if(status == ARES_ENOMEM)
+ return CURLE_OUT_OF_MEMORY;
+ else
+ return CURLE_FAILED_INIT;
+ }
+ return CURLE_OK;
+ /* make sure that all other returns from this function should destroy the
+ ares channel before returning error! */
+}
+
+/*
+ * Curl_resolver_cleanup()
+ *
+ * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure). Destroys the ares channel.
+ */
+void Curl_resolver_cleanup(void *resolver)
+{
+ ares_destroy((ares_channel)resolver);
+}
+
+/*
+ * Curl_resolver_duphandle()
+ *
+ * Called from curl_easy_duphandle() to duplicate resolver URL-state specific
+ * environment ('resolver' member of the UrlState structure). Duplicates the
+ * 'from' ares channel and passes the resulting channel to the 'to' pointer.
+ */
+int Curl_resolver_duphandle(void **to, void *from)
+{
+ /* Clone the ares channel for the new handle */
+ if(ARES_SUCCESS != ares_dup((ares_channel*)to, (ares_channel)from))
+ return CURLE_FAILED_INIT;
+ return CURLE_OK;
+}
+
+static void destroy_async_data (struct Curl_async *async);
+
+/*
+ * Cancel all possibly still on-going resolves for this connection.
+ */
+void Curl_resolver_cancel(struct connectdata *conn)
+{
+ if(conn->data && conn->data->state.resolver)
+ ares_cancel((ares_channel)conn->data->state.resolver);
+ destroy_async_data(&conn->async);
+}
+
+/*
+ * destroy_async_data() cleans up async resolver data.
+ */
+static void destroy_async_data (struct Curl_async *async)
+{
+ free(async->hostname);
+
+ if(async->os_specific) {
+ struct ResolverResults *res = (struct ResolverResults *)async->os_specific;
+ if(res) {
+ if(res->temp_ai) {
+ Curl_freeaddrinfo(res->temp_ai);
+ res->temp_ai = NULL;
+ }
+ free(res);
+ }
+ async->os_specific = NULL;
+ }
+
+ async->hostname = NULL;
+}
+
+/*
+ * Curl_resolver_getsock() is called when someone from the outside world
+ * (using curl_multi_fdset()) wants to get our fd_set setup and we're talking
+ * with ares. The caller must make sure that this function is only called when
+ * we have a working ares channel.
+ *
+ * Returns: sockets-in-use-bitmap
+ */
+
+int Curl_resolver_getsock(struct connectdata *conn,
+ curl_socket_t *socks,
+ int numsocks)
+
+{
+ struct timeval maxtime;
+ struct timeval timebuf;
+ struct timeval *timeout;
+ long milli;
+ int max = ares_getsock((ares_channel)conn->data->state.resolver,
+ (ares_socket_t *)socks, numsocks);
+
+ maxtime.tv_sec = CURL_TIMEOUT_RESOLVE;
+ maxtime.tv_usec = 0;
+
+ timeout = ares_timeout((ares_channel)conn->data->state.resolver, &maxtime,
+ &timebuf);
+ milli = (timeout->tv_sec * 1000) + (timeout->tv_usec/1000);
+ if(milli == 0)
+ milli += 10;
+ Curl_expire_latest(conn->data, milli);
+
+ return max;
+}
+
+/*
+ * waitperform()
+ *
+ * 1) Ask ares what sockets it currently plays with, then
+ * 2) wait for the timeout period to check for action on ares' sockets.
+ * 3) tell ares to act on all the sockets marked as "with action"
+ *
+ * return number of sockets it worked on
+ */
+
+static int waitperform(struct connectdata *conn, int timeout_ms)
+{
+ struct SessionHandle *data = conn->data;
+ int nfds;
+ int bitmask;
+ ares_socket_t socks[ARES_GETSOCK_MAXNUM];
+ struct pollfd pfd[ARES_GETSOCK_MAXNUM];
+ int i;
+ int num = 0;
+
+ bitmask = ares_getsock((ares_channel)data->state.resolver, socks,
+ ARES_GETSOCK_MAXNUM);
+
+ for(i=0; i < ARES_GETSOCK_MAXNUM; i++) {
+ pfd[i].events = 0;
+ pfd[i].revents = 0;
+ if(ARES_GETSOCK_READABLE(bitmask, i)) {
+ pfd[i].fd = socks[i];
+ pfd[i].events |= POLLRDNORM|POLLIN;
+ }
+ if(ARES_GETSOCK_WRITABLE(bitmask, i)) {
+ pfd[i].fd = socks[i];
+ pfd[i].events |= POLLWRNORM|POLLOUT;
+ }
+ if(pfd[i].events != 0)
+ num++;
+ else
+ break;
+ }
+
+ if(num)
+ nfds = Curl_poll(pfd, num, timeout_ms);
+ else
+ nfds = 0;
+
+ if(!nfds)
+ /* Call ares_process() unconditonally here, even if we simply timed out
+ above, as otherwise the ares name resolve won't timeout! */
+ ares_process_fd((ares_channel)data->state.resolver, ARES_SOCKET_BAD,
+ ARES_SOCKET_BAD);
+ else {
+ /* move through the descriptors and ask for processing on them */
+ for(i=0; i < num; i++)
+ ares_process_fd((ares_channel)data->state.resolver,
+ pfd[i].revents & (POLLRDNORM|POLLIN)?
+ pfd[i].fd:ARES_SOCKET_BAD,
+ pfd[i].revents & (POLLWRNORM|POLLOUT)?
+ pfd[i].fd:ARES_SOCKET_BAD);
+ }
+ return nfds;
+}
+
+/*
+ * Curl_resolver_is_resolved() is called repeatedly to check if a previous
+ * name resolve request has completed. It should also make sure to time-out if
+ * the operation seems to take too long.
+ *
+ * Returns normal CURLcode errors.
+ */
+CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+ struct Curl_dns_entry **dns)
+{
+ struct SessionHandle *data = conn->data;
+ struct ResolverResults *res = (struct ResolverResults *)
+ conn->async.os_specific;
+ CURLcode result = CURLE_OK;
+
+ *dns = NULL;
+
+ waitperform(conn, 0);
+
+ if(res && !res->num_pending) {
+ (void)Curl_addrinfo_callback(conn, res->last_status, res->temp_ai);
+ /* temp_ai ownership is moved to the connection, so we need not free-up
+ them */
+ res->temp_ai = NULL;
+ 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:
+ CURLE_COULDNT_RESOLVE_HOST;
+ }
+ else
+ *dns = conn->async.dns;
+
+ destroy_async_data(&conn->async);
+ }
+
+ return result;
+}
+
+/*
+ * Curl_resolver_wait_resolv()
+ *
+ * waits for a resolve to finish. This function should be avoided since using
+ * this risk getting the multi interface to "hang".
+ *
+ * If 'entry' is non-NULL, make it point to the resolved dns entry
+ *
+ * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved, and
+ * CURLE_OPERATION_TIMEDOUT if a time-out occurred.
+ */
+CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+ struct Curl_dns_entry **entry)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ long timeout;
+ struct timeval now = Curl_tvnow();
+ struct Curl_dns_entry *temp_entry;
+
+ timeout = Curl_timeleft(data, &now, TRUE);
+ if(!timeout)
+ timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */
+
+ /* Wait for the name resolve query to complete. */
+ for(;;) {
+ struct timeval *tvp, tv, store;
+ long timediff;
+ int itimeout;
+ int timeout_ms;
+
+ itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
+
+ store.tv_sec = itimeout/1000;
+ store.tv_usec = (itimeout%1000)*1000;
+
+ tvp = ares_timeout((ares_channel)data->state.resolver, &store, &tv);
+
+ /* use the timeout period ares returned to us above if less than one
+ second is left, otherwise just use 1000ms to make sure the progress
+ callback gets called frequent enough */
+ if(!tvp->tv_sec)
+ timeout_ms = (int)(tvp->tv_usec/1000);
+ else
+ timeout_ms = 1000;
+
+ waitperform(conn, timeout_ms);
+ Curl_resolver_is_resolved(conn, &temp_entry);
+
+ if(conn->async.done)
+ break;
+
+ if(Curl_pgrsUpdate(conn)) {
+ result = CURLE_ABORTED_BY_CALLBACK;
+ timeout = -1; /* trigger the cancel below */
+ }
+ else {
+ struct timeval now2 = Curl_tvnow();
+ timediff = Curl_tvdiff(now2, now); /* spent time */
+ timeout -= timediff?timediff:1; /* always deduct at least 1 */
+ now = now2; /* for next loop */
+ }
+
+ if(timeout < 0) {
+ /* our timeout, so we cancel the ares operation */
+ ares_cancel((ares_channel)data->state.resolver);
+ break;
+ }
+ }
+
+ /* Operation complete, if the lookup was successful we now have the entry
+ in the cache. */
+ if(entry)
+ *entry = conn->async.dns;
+
+ if(result)
+ /* 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;
+}
+
+/* Connects results to the list */
+static void compound_results(struct ResolverResults *res,
+ Curl_addrinfo *ai)
+{
+ Curl_addrinfo *ai_tail;
+ if(!ai)
+ return;
+ ai_tail = ai;
+
+ while(ai_tail->ai_next)
+ ai_tail = ai_tail->ai_next;
+
+ /* Add the new results to the list of old results. */
+ ai_tail->ai_next = res->temp_ai;
+ res->temp_ai = ai;
+}
+
+/*
+ * ares_query_completed_cb() is the callback that ares will call when
+ * the host query initiated by ares_gethostbyname() from Curl_getaddrinfo(),
+ * when using ares, is completed either successfully or with failure.
+ */
+static void query_completed_cb(void *arg, /* (struct connectdata *) */
+ int status,
+#ifdef HAVE_CARES_CALLBACK_TIMEOUTS
+ int timeouts,
+#endif
+ struct hostent *hostent)
+{
+ struct connectdata *conn = (struct connectdata *)arg;
+ struct ResolverResults *res;
+
+#ifdef HAVE_CARES_CALLBACK_TIMEOUTS
+ (void)timeouts; /* ignored */
+#endif
+
+ if(ARES_EDESTRUCTION == status)
+ /* when this ares handle is getting destroyed, the 'arg' pointer may not
+ be valid so only defer it when we know the 'status' says its fine! */
+ return;
+
+ res = (struct ResolverResults *)conn->async.os_specific;
+ res->num_pending--;
+
+ if(CURL_ASYNC_SUCCESS == status) {
+ Curl_addrinfo *ai = Curl_he2ai(hostent, conn->async.port);
+ if(ai) {
+ compound_results(res, ai);
+ }
+ }
+ /* A successful result overwrites any previous error */
+ if(res->last_status != ARES_SUCCESS)
+ res->last_status = status;
+}
+
+/*
+ * Curl_resolver_getaddrinfo() - when using ares
+ *
+ * Returns name information about the given hostname and port number. If
+ * successful, the 'hostent' is returned and the forth argument will point to
+ * memory we need to free after use. That memory *MUST* be freed with
+ * Curl_freeaddrinfo(), nothing else.
+ */
+Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+ const char *hostname,
+ int port,
+ int *waitp)
+{
+ char *bufp;
+ struct SessionHandle *data = conn->data;
+ struct in_addr in;
+ int family = PF_INET;
+#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
+ struct in6_addr in6;
+#endif /* CURLRES_IPV6 */
+
+ *waitp = 0; /* default to synchronous response */
+
+ /* First check if this is an IPv4 address string */
+ if(Curl_inet_pton(AF_INET, hostname, &in) > 0) {
+ /* This is a dotted IP address 123.123.123.123-style */
+ return Curl_ip2addr(AF_INET, &in, hostname, port);
+ }
+
+#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
+ /* Otherwise, check if this is an IPv6 address string */
+ if(Curl_inet_pton (AF_INET6, hostname, &in6) > 0)
+ /* This must be an IPv6 address literal. */
+ return Curl_ip2addr(AF_INET6, &in6, hostname, port);
+
+ switch(conn->ip_version) {
+ default:
+#if ARES_VERSION >= 0x010601
+ family = PF_UNSPEC; /* supported by c-ares since 1.6.1, so for older
+ c-ares versions this just falls through and defaults
+ to PF_INET */
+ break;
+#endif
+ case CURL_IPRESOLVE_V4:
+ family = PF_INET;
+ break;
+ case CURL_IPRESOLVE_V6:
+ family = PF_INET6;
+ break;
+ }
+#endif /* CURLRES_IPV6 */
+
+ bufp = strdup(hostname);
+ if(bufp) {
+ struct ResolverResults *res = NULL;
+ free(conn->async.hostname);
+ conn->async.hostname = bufp;
+ conn->async.port = port;
+ conn->async.done = FALSE; /* not done */
+ conn->async.status = 0; /* clear */
+ conn->async.dns = NULL; /* clear */
+ res = calloc(sizeof(struct ResolverResults), 1);
+ if(!res) {
+ free(conn->async.hostname);
+ conn->async.hostname = NULL;
+ return NULL;
+ }
+ conn->async.os_specific = res;
+
+ /* initial status - failed */
+ res->last_status = ARES_ENOTFOUND;
+#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
+ if(family == PF_UNSPEC) {
+ if(Curl_ipv6works()) {
+ res->num_pending = 2;
+
+ /* areschannel is already setup in the Curl_open() function */
+ ares_gethostbyname((ares_channel)data->state.resolver, hostname,
+ PF_INET, query_completed_cb, conn);
+ ares_gethostbyname((ares_channel)data->state.resolver, hostname,
+ PF_INET6, query_completed_cb, conn);
+ }
+ else {
+ res->num_pending = 1;
+
+ /* areschannel is already setup in the Curl_open() function */
+ ares_gethostbyname((ares_channel)data->state.resolver, hostname,
+ PF_INET, query_completed_cb, conn);
+ }
+ }
+ else
+#endif /* CURLRES_IPV6 */
+ {
+ res->num_pending = 1;
+
+ /* areschannel is already setup in the Curl_open() function */
+ ares_gethostbyname((ares_channel)data->state.resolver, hostname, family,
+ query_completed_cb, conn);
+ }
+
+ *waitp = 1; /* expect asynchronous response */
+ }
+ return NULL; /* no struct yet */
+}
+
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
+ char *servers)
+{
+ CURLcode result = CURLE_NOT_BUILT_IN;
+ int ares_result;
+
+ /* If server is NULL or empty, this would purge all DNS servers
+ * from ares library, which will cause any and all queries to fail.
+ * So, just return OK if none are configured and don't actually make
+ * any changes to c-ares. This lets c-ares use it's defaults, which
+ * it gets from the OS (for instance from /etc/resolv.conf on Linux).
+ */
+ if(!(servers && servers[0]))
+ return CURLE_OK;
+
+#if (ARES_VERSION >= 0x010704)
+ ares_result = ares_set_servers_csv(data->state.resolver, servers);
+ switch(ares_result) {
+ case ARES_SUCCESS:
+ result = CURLE_OK;
+ break;
+ case ARES_ENOMEM:
+ result = CURLE_OUT_OF_MEMORY;
+ break;
+ case ARES_ENOTINITIALIZED:
+ case ARES_ENODATA:
+ case ARES_EBADSTR:
+ default:
+ result = CURLE_BAD_FUNCTION_ARGUMENT;
+ break;
+ }
+#else /* too old c-ares version! */
+ (void)data;
+ (void)(ares_result);
+#endif
+ return result;
+}
+
+CURLcode Curl_set_dns_interface(struct SessionHandle *data,
+ const char *interf)
+{
+#if (ARES_VERSION >= 0x010704)
+ if(!interf)
+ interf = "";
+
+ ares_set_local_dev((ares_channel)data->state.resolver, interf);
+
+ return CURLE_OK;
+#else /* c-ares version too old! */
+ (void)data;
+ (void)interf;
+ return CURLE_NOT_BUILT_IN;
+#endif
+}
+
+CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data,
+ const char *local_ip4)
+{
+#if (ARES_VERSION >= 0x010704)
+ struct in_addr a4;
+
+ if((!local_ip4) || (local_ip4[0] == 0)) {
+ a4.s_addr = 0; /* disabled: do not bind to a specific address */
+ }
+ else {
+ if(Curl_inet_pton(AF_INET, local_ip4, &a4) != 1) {
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ }
+ }
+
+ ares_set_local_ip4((ares_channel)data->state.resolver, ntohl(a4.s_addr));
+
+ return CURLE_OK;
+#else /* c-ares version too old! */
+ (void)data;
+ (void)local_ip4;
+ return CURLE_NOT_BUILT_IN;
+#endif
+}
+
+CURLcode Curl_set_dns_local_ip6(struct SessionHandle *data,
+ const char *local_ip6)
+{
+#if (ARES_VERSION >= 0x010704) && defined(ENABLE_IPV6)
+ unsigned char a6[INET6_ADDRSTRLEN];
+
+ if((!local_ip6) || (local_ip6[0] == 0)) {
+ /* disabled: do not bind to a specific address */
+ memset(a6, 0, sizeof(a6));
+ }
+ else {
+ if(Curl_inet_pton(AF_INET6, local_ip6, a6) != 1) {
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ }
+ }
+
+ ares_set_local_ip6((ares_channel)data->state.resolver, a6);
+
+ return CURLE_OK;
+#else /* c-ares version too old! */
+ (void)data;
+ (void)local_ip6;
+ return CURLE_NOT_BUILT_IN;
+#endif
+}
+#endif /* CURLRES_ARES */
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
new file mode 100644
index 00000000..bd47d5ad
--- /dev/null
+++ b/lib/asyn-thread.c
@@ -0,0 +1,698 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef __VMS
+#include <in.h>
+#include <inet.h>
+#endif
+
+#if defined(USE_THREADS_POSIX)
+# ifdef HAVE_PTHREAD_H
+# include <pthread.h>
+# endif
+#elif defined(USE_THREADS_WIN32)
+# ifdef HAVE_PROCESS_H
+# include <process.h>
+# endif
+#endif
+
+#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
+#undef in_addr_t
+#define in_addr_t unsigned long
+#endif
+
+#ifdef HAVE_GETADDRINFO
+# define RESOLVER_ENOMEM EAI_MEMORY
+#else
+# define RESOLVER_ENOMEM ENOMEM
+#endif
+
+#include "urldata.h"
+#include "sendf.h"
+#include "hostip.h"
+#include "hash.h"
+#include "share.h"
+#include "strerror.h"
+#include "url.h"
+#include "multiif.h"
+#include "inet_pton.h"
+#include "inet_ntop.h"
+#include "curl_threads.h"
+#include "connect.h"
+#include "curl_printf.h"
+#include "curl_memory.h"
+
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/***********************************************************************
+ * Only for threaded name resolves builds
+ **********************************************************************/
+#ifdef CURLRES_THREADED
+
+/*
+ * Curl_resolver_global_init()
+ * Called from curl_global_init() to initialize global resolver environment.
+ * Does nothing here.
+ */
+int Curl_resolver_global_init(void)
+{
+ return CURLE_OK;
+}
+
+/*
+ * Curl_resolver_global_cleanup()
+ * Called from curl_global_cleanup() to destroy global resolver environment.
+ * Does nothing here.
+ */
+void Curl_resolver_global_cleanup(void)
+{
+}
+
+/*
+ * Curl_resolver_init()
+ * Called from curl_easy_init() -> Curl_open() to initialize resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure). Does nothing here.
+ */
+CURLcode Curl_resolver_init(void **resolver)
+{
+ (void)resolver;
+ return CURLE_OK;
+}
+
+/*
+ * Curl_resolver_cleanup()
+ * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure). Does nothing here.
+ */
+void Curl_resolver_cleanup(void *resolver)
+{
+ (void)resolver;
+}
+
+/*
+ * Curl_resolver_duphandle()
+ * Called from curl_easy_duphandle() to duplicate resolver URL state-specific
+ * environment ('resolver' member of the UrlState structure). Does nothing
+ * here.
+ */
+int Curl_resolver_duphandle(void **to, void *from)
+{
+ (void)to;
+ (void)from;
+ return CURLE_OK;
+}
+
+static void destroy_async_data(struct Curl_async *);
+
+/*
+ * Cancel all possibly still on-going resolves for this connection.
+ */
+void Curl_resolver_cancel(struct connectdata *conn)
+{
+ destroy_async_data(&conn->async);
+}
+
+/* This function is used to init a threaded resolve */
+static bool init_resolve_thread(struct connectdata *conn,
+ const char *hostname, int port,
+ const struct addrinfo *hints);
+
+
+/* Data for synchronization between resolver thread and its parent */
+struct thread_sync_data {
+ curl_mutex_t * mtx;
+ int done;
+
+ char * hostname; /* hostname to resolve, Curl_async.hostname
+ duplicate */
+ int port;
+ int sock_error;
+ Curl_addrinfo *res;
+#ifdef HAVE_GETADDRINFO
+ struct addrinfo hints;
+#endif
+ struct thread_data *td; /* for thread-self cleanup */
+};
+
+struct thread_data {
+ curl_thread_t thread_hnd;
+ unsigned int poll_interval;
+ long interval_end;
+ struct thread_sync_data tsd;
+};
+
+static struct thread_sync_data *conn_thread_sync_data(struct connectdata *conn)
+{
+ return &(((struct thread_data *)conn->async.os_specific)->tsd);
+}
+
+#define CONN_THREAD_SYNC_DATA(conn) &(((conn)->async.os_specific)->tsd);
+
+/* Destroy resolver thread synchronization data */
+static
+void destroy_thread_sync_data(struct thread_sync_data * tsd)
+{
+ if(tsd->mtx) {
+ Curl_mutex_destroy(tsd->mtx);
+ free(tsd->mtx);
+ }
+
+ free(tsd->hostname);
+
+ if(tsd->res)
+ Curl_freeaddrinfo(tsd->res);
+
+ memset(tsd, 0, sizeof(*tsd));
+}
+
+/* Initialize resolver thread synchronization data */
+static
+int init_thread_sync_data(struct thread_data * td,
+ 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);
+ tsd->hints = *hints;
+#else
+ (void) hints;
+#endif
+
+ tsd->mtx = malloc(sizeof(curl_mutex_t));
+ if(tsd->mtx == NULL)
+ goto err_exit;
+
+ Curl_mutex_init(tsd->mtx);
+
+ tsd->sock_error = CURL_ASYNC_SUCCESS;
+
+ /* Copying hostname string because original can be destroyed by parent
+ * thread during gethostbyname execution.
+ */
+ tsd->hostname = strdup(hostname);
+ if(!tsd->hostname)
+ goto err_exit;
+
+ return 1;
+
+ err_exit:
+ /* Memory allocation failed */
+ destroy_thread_sync_data(tsd);
+ return 0;
+}
+
+static int getaddrinfo_complete(struct connectdata *conn)
+{
+ struct thread_sync_data *tsd = conn_thread_sync_data(conn);
+ int rc;
+
+ rc = Curl_addrinfo_callback(conn, tsd->sock_error, tsd->res);
+ /* The tsd->res structure has been copied to async.dns and perhaps the DNS
+ cache. Set our copy to NULL so destroy_thread_sync_data doesn't free it.
+ */
+ tsd->res = NULL;
+
+ return rc;
+}
+
+
+#ifdef HAVE_GETADDRINFO
+
+/*
+ * getaddrinfo_thread() resolves a name and then exits.
+ *
+ * For builds without ARES, but with ENABLE_IPV6, create a resolver thread
+ * and wait on it.
+ */
+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;
+
+ snprintf(service, sizeof(service), "%d", tsd->port);
+
+ rc = Curl_getaddrinfo_ex(tsd->hostname, service, &tsd->hints, &tsd->res);
+
+ if(rc != 0) {
+ tsd->sock_error = SOCKERRNO?SOCKERRNO:rc;
+ if(tsd->sock_error == 0)
+ tsd->sock_error = RESOLVER_ENOMEM;
+ }
+
+ 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);
+ }
+
+ return 0;
+}
+
+#else /* HAVE_GETADDRINFO */
+
+/*
+ * gethostbyname_thread() resolves a name and then exits.
+ */
+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);
+
+ if(!tsd->res) {
+ tsd->sock_error = SOCKERRNO;
+ if(tsd->sock_error == 0)
+ tsd->sock_error = RESOLVER_ENOMEM;
+ }
+
+ 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);
+ }
+
+ return 0;
+}
+
+#endif /* HAVE_GETADDRINFO */
+
+/*
+ * destroy_async_data() cleans up async resolver data and thread handle.
+ */
+static void destroy_async_data (struct Curl_async *async)
+{
+ 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);
+
+ free(async->os_specific);
+ }
+ }
+ async->os_specific = NULL;
+
+ free(async->hostname);
+ async->hostname = NULL;
+}
+
+/*
+ * init_resolve_thread() starts a new thread that performs the actual
+ * resolve. This function returns before the resolve is done.
+ *
+ * Returns FALSE in case of failure, otherwise TRUE.
+ */
+static bool init_resolve_thread (struct connectdata *conn,
+ const char *hostname, int port,
+ const struct addrinfo *hints)
+{
+ struct thread_data *td = calloc(1, sizeof(struct thread_data));
+ int err = RESOLVER_ENOMEM;
+
+ conn->async.os_specific = (void*) td;
+ if(!td)
+ goto err_exit;
+
+ conn->async.port = port;
+ conn->async.done = FALSE;
+ conn->async.status = 0;
+ conn->async.dns = NULL;
+ td->thread_hnd = curl_thread_t_null;
+
+ if(!init_thread_sync_data(td, hostname, port, hints))
+ goto err_exit;
+
+ free(conn->async.hostname);
+ conn->async.hostname = strdup(hostname);
+ if(!conn->async.hostname)
+ goto err_exit;
+
+#ifdef HAVE_GETADDRINFO
+ td->thread_hnd = Curl_thread_create(getaddrinfo_thread, &td->tsd);
+#else
+ td->thread_hnd = Curl_thread_create(gethostbyname_thread, &td->tsd);
+#endif
+
+ if(!td->thread_hnd) {
+#ifndef _WIN32_WCE
+ err = errno;
+#endif
+ goto err_exit;
+ }
+
+ return TRUE;
+
+ err_exit:
+ destroy_async_data(&conn->async);
+
+ SET_ERRNO(err);
+
+ return FALSE;
+}
+
+/*
+ * resolver_error() calls failf() with the appropriate message after a resolve
+ * error
+ */
+
+static CURLcode resolver_error(struct connectdata *conn)
+{
+ const char *host_or_proxy;
+ CURLcode result;
+
+ if(conn->bits.httpproxy) {
+ host_or_proxy = "proxy";
+ result = CURLE_COULDNT_RESOLVE_PROXY;
+ }
+ else {
+ host_or_proxy = "host";
+ result = CURLE_COULDNT_RESOLVE_HOST;
+ }
+
+ failf(conn->data, "Could not resolve %s: %s", host_or_proxy,
+ conn->async.hostname);
+
+ return result;
+}
+
+/*
+ * Curl_resolver_wait_resolv()
+ *
+ * waits for a resolve to finish. This function should be avoided since using
+ * this risk getting the multi interface to "hang".
+ *
+ * If 'entry' is non-NULL, make it point to the resolved dns entry
+ *
+ * This is the version for resolves-in-a-thread.
+ */
+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;
+
+ DEBUGASSERT(conn && td);
+
+ /* wait for the thread to resolve the name */
+ if(Curl_thread_join(&td->thread_hnd))
+ result = getaddrinfo_complete(conn);
+ else
+ DEBUGASSERT(0);
+
+ conn->async.done = TRUE;
+
+ if(entry)
+ *entry = conn->async.dns;
+
+ if(!conn->async.dns)
+ /* a name was not resolved, report error */
+ result = resolver_error(conn);
+
+ destroy_async_data(&conn->async);
+
+ if(!conn->async.dns)
+ connclose(conn, "asynch resolve failed");
+
+ return result;
+}
+
+/*
+ * Curl_resolver_is_resolved() is called repeatedly to check if a previous
+ * name resolve request has completed. It should also make sure to time-out if
+ * the operation seems to take too long.
+ */
+CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+ struct Curl_dns_entry **entry)
+{
+ struct SessionHandle *data = conn->data;
+ struct thread_data *td = (struct thread_data*) conn->async.os_specific;
+ int done = 0;
+
+ *entry = NULL;
+
+ if(!td) {
+ DEBUGASSERT(td);
+ return CURLE_COULDNT_RESOLVE_HOST;
+ }
+
+ Curl_mutex_acquire(td->tsd.mtx);
+ done = td->tsd.done;
+ Curl_mutex_release(td->tsd.mtx);
+
+ if(done) {
+ getaddrinfo_complete(conn);
+
+ if(!conn->async.dns) {
+ CURLcode result = resolver_error(conn);
+ destroy_async_data(&conn->async);
+ return result;
+ }
+ destroy_async_data(&conn->async);
+ *entry = conn->async.dns;
+ }
+ else {
+ /* poll for name lookup done with exponential backoff up to 250ms */
+ long elapsed = Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle);
+ if(elapsed < 0)
+ elapsed = 0;
+
+ if(td->poll_interval == 0)
+ /* Start at 1ms poll interval */
+ td->poll_interval = 1;
+ else if(elapsed >= td->interval_end)
+ /* Back-off exponentially if last interval expired */
+ td->poll_interval *= 2;
+
+ if(td->poll_interval > 250)
+ td->poll_interval = 250;
+
+ td->interval_end = elapsed + td->poll_interval;
+ Curl_expire(conn->data, td->poll_interval);
+ }
+
+ return CURLE_OK;
+}
+
+int Curl_resolver_getsock(struct connectdata *conn,
+ curl_socket_t *socks,
+ int numsocks)
+{
+ (void)conn;
+ (void)socks;
+ (void)numsocks;
+ return 0;
+}
+
+#ifndef HAVE_GETADDRINFO
+/*
+ * Curl_getaddrinfo() - for platforms without getaddrinfo
+ */
+Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+ const char *hostname,
+ int port,
+ int *waitp)
+{
+ struct in_addr in;
+
+ *waitp = 0; /* default to synchronous response */
+
+ if(Curl_inet_pton(AF_INET, hostname, &in) > 0)
+ /* This is a dotted IP address 123.123.123.123-style */
+ return Curl_ip2addr(AF_INET, &in, hostname, port);
+
+ /* fire up a new resolver thread! */
+ if(init_resolve_thread(conn, hostname, port, NULL)) {
+ *waitp = 1; /* expect asynchronous response */
+ return NULL;
+ }
+
+ /* fall-back to blocking version */
+ return Curl_ipv4_resolve_r(hostname, port);
+}
+
+#else /* !HAVE_GETADDRINFO */
+
+/*
+ * Curl_resolver_getaddrinfo() - for getaddrinfo
+ */
+Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+ const char *hostname,
+ int port,
+ int *waitp)
+{
+ struct addrinfo hints;
+ struct in_addr in;
+ Curl_addrinfo *res;
+ int error;
+ char sbuf[12];
+ int pf = PF_INET;
+#ifdef CURLRES_IPV6
+ struct in6_addr in6;
+#endif /* CURLRES_IPV6 */
+
+ *waitp = 0; /* default to synchronous response */
+
+ /* First check if this is an IPv4 address string */
+ if(Curl_inet_pton(AF_INET, hostname, &in) > 0)
+ /* This is a dotted IP address 123.123.123.123-style */
+ return Curl_ip2addr(AF_INET, &in, hostname, port);
+
+#ifdef CURLRES_IPV6
+ /* check if this is an IPv6 address string */
+ if(Curl_inet_pton (AF_INET6, hostname, &in6) > 0)
+ /* This is an IPv6 address literal */
+ return Curl_ip2addr(AF_INET6, &in6, hostname, port);
+
+ /*
+ * Check if a limited name resolve has been requested.
+ */
+ switch(conn->ip_version) {
+ case CURL_IPRESOLVE_V4:
+ pf = PF_INET;
+ break;
+ case CURL_IPRESOLVE_V6:
+ pf = PF_INET6;
+ break;
+ default:
+ pf = PF_UNSPEC;
+ break;
+ }
+
+ if((pf != PF_INET) && !Curl_ipv6works())
+ /* The stack seems to be a non-IPv6 one */
+ pf = PF_INET;
+
+#endif /* CURLRES_IPV6 */
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = pf;
+ hints.ai_socktype = conn->socktype;
+
+ snprintf(sbuf, sizeof(sbuf), "%d", port);
+
+ /* fire up a new resolver thread! */
+ if(init_resolve_thread(conn, hostname, port, &hints)) {
+ *waitp = 1; /* expect asynchronous response */
+ return NULL;
+ }
+
+ /* fall-back to blocking version */
+ infof(conn->data, "init_resolve_thread() failed for %s; %s\n",
+ hostname, Curl_strerror(conn, ERRNO));
+
+ error = Curl_getaddrinfo_ex(hostname, sbuf, &hints, &res);
+ if(error) {
+ infof(conn->data, "getaddrinfo() failed for %s:%d; %s\n",
+ hostname, port, Curl_strerror(conn, SOCKERRNO));
+ return NULL;
+ }
+ return res;
+}
+
+#endif /* !HAVE_GETADDRINFO */
+
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
+ char *servers)
+{
+ (void)data;
+ (void)servers;
+ return CURLE_NOT_BUILT_IN;
+
+}
+
+CURLcode Curl_set_dns_interface(struct SessionHandle *data,
+ const char *interf)
+{
+ (void)data;
+ (void)interf;
+ return CURLE_NOT_BUILT_IN;
+}
+
+CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data,
+ const char *local_ip4)
+{
+ (void)data;
+ (void)local_ip4;
+ return CURLE_NOT_BUILT_IN;
+}
+
+CURLcode Curl_set_dns_local_ip6(struct SessionHandle *data,
+ const char *local_ip6)
+{
+ (void)data;
+ (void)local_ip6;
+ return CURLE_NOT_BUILT_IN;
+}
+
+#endif /* CURLRES_THREADED */
diff --git a/lib/asyn.h b/lib/asyn.h
new file mode 100644
index 00000000..1b681ea1
--- /dev/null
+++ b/lib/asyn.h
@@ -0,0 +1,168 @@
+#ifndef HEADER_CURL_ASYN_H
+#define HEADER_CURL_ASYN_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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_addrinfo.h"
+
+struct addrinfo;
+struct hostent;
+struct SessionHandle;
+struct connectdata;
+struct Curl_dns_entry;
+
+/*
+ * This header defines all functions in the internal asynch resolver interface.
+ * All asynch resolvers need to provide these functions.
+ * asyn-ares.c and asyn-thread.c are the current implementations of asynch
+ * resolver backends.
+ */
+
+/*
+ * Curl_resolver_global_init()
+ *
+ * Called from curl_global_init() to initialize global resolver environment.
+ * Returning anything else than CURLE_OK fails curl_global_init().
+ */
+int Curl_resolver_global_init(void);
+
+/*
+ * Curl_resolver_global_cleanup()
+ * Called from curl_global_cleanup() to destroy global resolver environment.
+ */
+void Curl_resolver_global_cleanup(void);
+
+/*
+ * Curl_resolver_init()
+ * Called from curl_easy_init() -> Curl_open() to initialize resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure). Should fill the passed pointer by the initialized handler.
+ * Returning anything else than CURLE_OK fails curl_easy_init() with the
+ * correspondent code.
+ */
+CURLcode Curl_resolver_init(void **resolver);
+
+/*
+ * Curl_resolver_cleanup()
+ * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure). Should destroy the handler and free all resources connected to
+ * it.
+ */
+void Curl_resolver_cleanup(void *resolver);
+
+/*
+ * Curl_resolver_duphandle()
+ * Called from curl_easy_duphandle() to duplicate resolver URL-state specific
+ * environment ('resolver' member of the UrlState structure). Should
+ * duplicate the 'from' handle and pass the resulting handle to the 'to'
+ * pointer. Returning anything else than CURLE_OK causes failed
+ * curl_easy_duphandle() call.
+ */
+int Curl_resolver_duphandle(void **to, void *from);
+
+/*
+ * Curl_resolver_cancel().
+ *
+ * It is called from inside other functions to cancel currently performing
+ * resolver request. Should also free any temporary resources allocated to
+ * perform a request.
+ */
+void Curl_resolver_cancel(struct connectdata *conn);
+
+/* Curl_resolver_getsock()
+ *
+ * This function is called from the multi_getsock() function. 'sock' is a
+ * pointer to an array to hold the file descriptors, with 'numsock' being the
+ * size of that array (in number of entries). This function is supposed to
+ * return bitmask indicating what file descriptors (referring to array indexes
+ * in the 'sock' array) to wait for, read/write.
+ */
+int Curl_resolver_getsock(struct connectdata *conn, curl_socket_t *sock,
+ int numsocks);
+
+/*
+ * Curl_resolver_is_resolved()
+ *
+ * Called repeatedly to check if a previous name resolve request has
+ * completed. It should also make sure to time-out if the operation seems to
+ * take too long.
+ *
+ * Returns normal CURLcode errors.
+ */
+CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+ struct Curl_dns_entry **dns);
+
+/*
+ * Curl_resolver_wait_resolv()
+ *
+ * waits for a resolve to finish. This function should be avoided since using
+ * this risk getting the multi interface to "hang".
+ *
+ * If 'entry' is non-NULL, make it point to the resolved dns entry
+ *
+ * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved, and
+ * CURLE_OPERATION_TIMEDOUT if a time-out occurred.
+
+ */
+CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+ struct Curl_dns_entry **dnsentry);
+
+/*
+ * Curl_resolver_getaddrinfo() - when using this resolver
+ *
+ * Returns name information about the given hostname and port number. If
+ * successful, the 'hostent' is returned and the forth argument will point to
+ * memory we need to free after use. That memory *MUST* be freed with
+ * Curl_freeaddrinfo(), nothing else.
+ *
+ * Each resolver backend must of course make sure to return data in the
+ * correct format to comply with this.
+ */
+Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+ const char *hostname,
+ int port,
+ int *waitp);
+
+#ifndef CURLRES_ASYNCH
+/* convert these functions if an asynch resolver isn't used */
+#define Curl_resolver_cancel(x) Curl_nop_stmt
+#define Curl_resolver_is_resolved(x,y) CURLE_COULDNT_RESOLVE_HOST
+#define Curl_resolver_wait_resolv(x,y) CURLE_COULDNT_RESOLVE_HOST
+#define Curl_resolver_getsock(x,y,z) 0
+#define Curl_resolver_duphandle(x,y) CURLE_OK
+#define Curl_resolver_init(x) CURLE_OK
+#define Curl_resolver_global_init() CURLE_OK
+#define Curl_resolver_global_cleanup() Curl_nop_stmt
+#define Curl_resolver_cleanup(x) Curl_nop_stmt
+#endif
+
+#ifdef CURLRES_ASYNCH
+#define Curl_resolver_asynch() 1
+#else
+#define Curl_resolver_asynch() 0
+#endif
+
+
+/********** end of generic resolver interface functions *****************/
+#endif /* HEADER_CURL_ASYN_H */
diff --git a/lib/base64.c b/lib/base64.c
index edccf540..6b87eed4 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,182 +20,196 @@
*
***************************************************************************/
-/* Base64 encoding/decoding
- *
- * Test harnesses down the bottom - compile with -DTEST_ENCODE for
- * a program that will read in raw data from stdin and write out
- * a base64-encoded version to stdout, and the length returned by the
- * encoding function to stderr. Compile with -DTEST_DECODE for a program that
- * will go the other way.
- *
- * This code will break if int is smaller than 32 bits
- */
-
-#include "setup.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+/* Base64 encoding/decoding */
+#include "curl_setup.h"
+#include "curl_printf.h"
#include "urldata.h" /* for the SessionHandle definition */
-#include "easyif.h" /* for Curl_convert_... prototypes */
#include "warnless.h"
#include "curl_base64.h"
-#include "curl_memory.h"
+#include "non-ascii.h"
-/* include memdebug.h last */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
/* ---- Base64 Encoding/Decoding Table --- */
-static const char table64[]=
+static const char base64[]=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static void decodeQuantum(unsigned char *dest, const char *src)
+/* 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, v, x = 0;
+ unsigned long i, x = 0;
for(i = 0, s = src; i < 4; i++, s++) {
- v = 0;
- p = table64;
- while(*p && (*p != *s)) {
- v++;
- p++;
- }
- if(*p == *s)
- x = (x << 6) + v;
- else if(*s == '=')
+ unsigned long v = 0;
+
+ if(*s == '=') {
x = (x << 6);
+ padding++;
+ }
+ else {
+ p = base64;
+
+ while(*p && (*p != *s)) {
+ v++;
+ p++;
+ }
+
+ if(*p == *s)
+ x = (x << 6) + v;
+ else
+ return 0;
+ }
}
- dest[2] = curlx_ultouc(x);
+ if(padding < 1)
+ dest[2] = curlx_ultouc(x & 0xFFUL);
+
x >>= 8;
- dest[1] = curlx_ultouc(x);
+ if(padding < 2)
+ dest[1] = curlx_ultouc(x & 0xFFUL);
+
x >>= 8;
- dest[0] = curlx_ultouc(x);
+ dest[0] = curlx_ultouc(x & 0xFFUL);
+
+ return 3 - padding;
}
/*
* Curl_base64_decode()
*
- * Given a base64 string at src, decode it and return an allocated memory in
- * the *outptr. Returns the length of the decoded data.
+ * Given a base64 NUL-terminated string at src, decode it and return a
+ * pointer in *outptr to a newly allocated memory area holding decoded
+ * data. Size of decoded data is returned in variable pointed by outlen.
+ *
+ * Returns CURLE_OK on success, otherwise specific error code. Function
+ * output shall not be considered valid unless CURLE_OK is returned.
+ *
+ * When decoded data length is 0, returns NULL in *outptr.
+ *
+ * @unittest: 1302
*/
-size_t Curl_base64_decode(const char *src, unsigned char **outptr)
+CURLcode Curl_base64_decode(const char *src,
+ unsigned char **outptr, size_t *outlen)
{
+ size_t srclen = 0;
size_t length = 0;
- size_t equalsTerm = 0;
+ size_t padding = 0;
size_t i;
size_t numQuantums;
- unsigned char lastQuantum[3];
size_t rawlen = 0;
+ unsigned char *pos;
unsigned char *newstr;
*outptr = NULL;
+ *outlen = 0;
+ srclen = strlen(src);
+ /* Check the length of the input string is valid */
+ if(!srclen || srclen % 4)
+ return CURLE_BAD_CONTENT_ENCODING;
+
+ /* Find the position of any = padding characters */
while((src[length] != '=') && src[length])
length++;
+
/* A maximum of two = padding characters is allowed */
if(src[length] == '=') {
- equalsTerm++;
- if(src[length+equalsTerm] == '=')
- equalsTerm++;
+ padding++;
+ if(src[length + 1] == '=')
+ padding++;
}
- numQuantums = (length + equalsTerm) / 4;
- /* Don't allocate a buffer if the decoded length is 0 */
- if(numQuantums == 0)
- return 0;
+ /* Check the = padding characters weren't part way through the input */
+ if(length + padding != srclen)
+ return CURLE_BAD_CONTENT_ENCODING;
- rawlen = (numQuantums * 3) - equalsTerm;
+ /* Calculate the number of quantums */
+ numQuantums = srclen / 4;
- /* The buffer must be large enough to make room for the last quantum
- (which may be partially thrown out) and the zero terminator. */
- newstr = malloc(rawlen+4);
+ /* Calculate the size of the decoded string */
+ rawlen = (numQuantums * 3) - padding;
+
+ /* Allocate our buffer including room for a zero terminator */
+ newstr = malloc(rawlen + 1);
if(!newstr)
- return 0;
+ return CURLE_OUT_OF_MEMORY;
- *outptr = newstr;
+ pos = newstr;
+
+ /* Decode the quantums */
+ for(i = 0; i < numQuantums; i++) {
+ size_t result = decodeQuantum(pos, src);
+ if(!result) {
+ free(newstr);
+
+ return CURLE_BAD_CONTENT_ENCODING;
+ }
- /* Decode all but the last quantum (which may not decode to a
- multiple of 3 bytes) */
- for(i = 0; i < numQuantums - 1; i++) {
- decodeQuantum(newstr, src);
- newstr += 3; src += 4;
+ pos += result;
+ src += 4;
}
- /* This final decode may actually read slightly past the end of the buffer
- if the input string is missing pad bytes. This will almost always be
- harmless. */
- decodeQuantum(lastQuantum, src);
- for(i = 0; i < 3 - equalsTerm; i++)
- newstr[i] = lastQuantum[i];
+ /* Zero terminate */
+ *pos = '\0';
+
+ /* Return the decoded data */
+ *outptr = newstr;
+ *outlen = rawlen;
- newstr[i] = '\0'; /* zero terminate */
- return rawlen;
+ return CURLE_OK;
}
-/*
- * Curl_base64_encode()
- *
- * Returns the length of the newly created base64 string. The third argument
- * is a pointer to an allocated area holding the base64 data. If something
- * went wrong, 0 is returned.
- *
- */
-size_t Curl_base64_encode(struct SessionHandle *data,
- const char *inputbuff, size_t insize,
- char **outptr)
+static CURLcode base64_encode(const char *table64,
+ struct SessionHandle *data,
+ const char *inputbuff, size_t insize,
+ char **outptr, size_t *outlen)
{
+ CURLcode error;
unsigned char ibuf[3];
unsigned char obuf[4];
int i;
int inputparts;
char *output;
char *base64data;
-#ifdef CURL_DOES_CONVERSIONS
char *convbuf = NULL;
-#endif
const char *indata = inputbuff;
- *outptr = NULL; /* set to NULL in case of failure before we reach the end */
+ *outptr = NULL;
+ *outlen = 0;
if(0 == insize)
insize = strlen(indata);
base64data = output = malloc(insize*4/3+4);
if(NULL == output)
- return 0;
+ return CURLE_OUT_OF_MEMORY;
-#ifdef CURL_DOES_CONVERSIONS
/*
* The base64 data needs to be created using the network encoding
* not the host encoding. And we can't change the actual input
* so we copy it to a buffer, translate it, and use that instead.
*/
- if(data) {
- convbuf = malloc(insize);
- if(!convbuf) {
- free(output);
- return 0;
- }
- memcpy(convbuf, indata, insize);
- if(CURLE_OK != Curl_convert_to_network(data, convbuf, insize)) {
- free(convbuf);
- free(output);
- return 0;
- }
- indata = convbuf; /* switch to the converted buffer */
+ error = Curl_convert_clone(data, indata, insize, &convbuf);
+ if(error) {
+ free(output);
+ return error;
}
-#else
- (void)data;
-#endif
+
+ if(convbuf)
+ indata = (char *)convbuf;
while(insize > 0) {
- for (i = inputparts = 0; i < 3; i++) {
+ for(i = inputparts = 0; i < 3; i++) {
if(insize > 0) {
inputparts++;
ibuf[i] = (unsigned char) *indata;
@@ -235,13 +249,61 @@ size_t Curl_base64_encode(struct SessionHandle *data,
}
output += 4;
}
- *output=0;
- *outptr = base64data; /* make it return the actual data memory */
-
-#ifdef CURL_DOES_CONVERSIONS
- if(data)
- free(convbuf);
-#endif
- return strlen(base64data); /* return the length of the new data */
+ *output = '\0';
+ *outptr = base64data; /* return pointer to new data, allocated memory */
+
+ free(convbuf);
+
+ *outlen = strlen(base64data); /* return the length of the new data */
+
+ 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/checksrc.pl b/lib/checksrc.pl
new file mode 100755
index 00000000..8fad2cfc
--- /dev/null
+++ b/lib/checksrc.pl
@@ -0,0 +1,282 @@
+#!/usr/bin/perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2011 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+
+my $max_column = 79;
+my $indent = 2;
+
+my $warnings;
+my $errors;
+my $supressed; # whitelisted problems
+my $file;
+my $dir=".";
+my $wlist;
+my $windows_os = $^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin';
+
+my %whitelist;
+
+sub readwhitelist {
+ open(W, "<$dir/checksrc.whitelist");
+ my @all=<W>;
+ for(@all) {
+ $windows_os ? $_ =~ s/\r?\n$// : chomp;
+ $whitelist{$_}=1;
+ }
+ close(W);
+}
+
+sub checkwarn {
+ my ($num, $col, $file, $line, $msg, $error) = @_;
+
+ if($whitelist{$line}) {
+ $supressed++;
+ return;
+ }
+
+ my $w=$error?"error":"warning";
+
+ if($w) {
+ $warnings++;
+ }
+ else {
+ $errors++;
+ }
+
+ $col++;
+ print "$file:$num:$col: $w: $msg\n";
+ print " $line\n";
+
+ if($col < 80) {
+ my $pref = (' ' x $col);
+ print "${pref}^\n";
+ }
+}
+
+$file = shift @ARGV;
+
+while(1) {
+
+ if($file =~ /-D(.*)/) {
+ $dir = $1;
+ $file = shift @ARGV;
+ next;
+ }
+ elsif($file =~ /-W(.*)/) {
+ $wlist .= " $1 ";
+ $file = shift @ARGV;
+ next;
+ }
+
+ last;
+}
+
+if(!$file) {
+ print "checksrc.pl [option] <file1> [file2] ...\n";
+ print " Options:\n";
+ print " -D[DIR] Directory to prepend file names\n";
+ print " -W[file] Whitelist the given file - ignore all its flaws\n";
+ exit;
+}
+
+readwhitelist();
+
+do {
+ if("$wlist" !~ / $file /) {
+ my $fullname = $file;
+ $fullname = "$dir/$file" if ($fullname !~ '^\.?\.?/');
+ scanfile($fullname);
+ }
+ $file = shift @ARGV;
+
+} while($file);
+
+
+sub scanfile {
+ my ($file) = @_;
+
+ my $line = 1;
+ my $prevl;
+ my $l;
+ open(R, "<$file") || die "failed to open $file";
+
+ my $copyright=0;
+
+ while(<R>) {
+ $windows_os ? $_ =~ s/\r?\n$// : chomp;
+ my $l = $_;
+ my $column = 0;
+
+ # check for a copyright statement
+ if(!$copyright && ($l =~ /copyright .* \d\d\d\d/i)) {
+ $copyright=1;
+ }
+
+ # detect long lines
+ if(length($l) > $max_column) {
+ checkwarn($line, length($l), $file, $l, "Longer than $max_column columns");
+ }
+ # detect TAB characters
+ if($l =~ /^(.*)\t/) {
+ checkwarn($line, length($1), $file, $l, "Contains TAB character", 1);
+ }
+ # detect trailing white space
+ if($l =~ /^(.*)[ \t]+\z/) {
+ checkwarn($line, length($1), $file, $l, "Trailing whitespace");
+ }
+
+ # check spaces after for/if/while
+ if($l =~ /^(.*)(for|if|while) \(/) {
+ if($1 =~ / *\#/) {
+ # this is a #if, treat it differently
+ }
+ else {
+ checkwarn($line, length($1)+length($2), $file, $l,
+ "$2 with space");
+ }
+ }
+
+ # check spaces after open paren after for/if/while
+ if($l =~ /^(.*)(for|if|while)\( /) {
+ if($1 =~ / *\#/) {
+ # this is a #if, treat it differently
+ }
+ else {
+ checkwarn($line, length($1)+length($2)+1, $file, $l,
+ "$2 with space first in condition");
+ }
+ }
+
+ # check for "return(" without space
+ if($l =~ /^(.*)return\(/) {
+ if($1 =~ / *\#/) {
+ # this is a #if, treat it differently
+ }
+ else {
+ checkwarn($line, length($1)+6, $file, $l,
+ "return without space before paren");
+ }
+ }
+
+ # check for comma without space
+ if($l =~ /^(.*),[^ \n]/) {
+ my $pref=$1;
+ my $ign=0;
+ if($pref =~ / *\#/) {
+ # this is a #if, treat it differently
+ $ign=1;
+ }
+ elsif($pref =~ /\/\*/) {
+ # this is a comment
+ $ign=1;
+ }
+ elsif($pref =~ /[\"\']/) {
+ $ign = 1;
+ # There is a quote here, figure out whether the comma is
+ # within a string or '' or not.
+ if($pref =~ /\"/) {
+ # withing a string
+ }
+ elsif($pref =~ /\'$/) {
+ # a single letter
+ }
+ else {
+ $ign = 0;
+ }
+ }
+ if(!$ign) {
+ checkwarn($line, length($pref)+1, $file, $l,
+ "comma without following space");
+ }
+ }
+
+ # check for "} else"
+ if($l =~ /^(.*)\} *else/) {
+ checkwarn($line, length($1), $file, $l, "else after closing brace on same line");
+ }
+ # check for "){"
+ if($l =~ /^(.*)\)\{/) {
+ checkwarn($line, length($1)+1, $file, $l, "missing space after close paren");
+ }
+
+ # check for space before the semicolon last in a line
+ if($l =~ /^(.*[^ ].*) ;$/) {
+ checkwarn($line, length($1), $file, $l, "space before last semicolon");
+ }
+
+ # scan for use of banned functions
+ if($l =~ /^(.*\W)(sprintf|vsprintf|strcat|strncat|gets)\s*\(/) {
+ checkwarn($line, length($1), $file, $l,
+ "use of $2 is banned");
+ }
+
+ # scan for use of non-binary fopen without the macro
+ if($l =~ /^(.*\W)fopen\s*\([^"]*\"([^"]*)/) {
+ my $mode = $2;
+ if($mode !~ /b/) {
+ checkwarn($line, length($1), $file, $l,
+ "use of non-binary fopen without FOPEN_* macro");
+ }
+ }
+
+ # check for open brace first on line but not first column
+ # only alert if previous line ended with a close paren and wasn't a cpp
+ # line
+ if((($prevl =~ /\)\z/) && ($prevl !~ /^ *#/)) && ($l =~ /^( +)\{/)) {
+ checkwarn($line, length($1), $file, $l, "badly placed open brace");
+ }
+
+ # if the previous line starts with if/while/for AND ends with an open
+ # brace, check that this line is indented $indent more steps, if not
+ # a cpp line
+ if($prevl =~ /^( *)(if|while|for)\(.*\{\z/) {
+ my $first = length($1);
+
+ # this line has some character besides spaces
+ if(($l !~ /^ *#/) && ($l =~ /^( *)[^ ]/)) {
+ my $second = length($1);
+ my $expect = $first+$indent;
+ if($expect != $second) {
+ my $diff = $second - $first;
+ checkwarn($line, length($1), $file, $l,
+ "not indented $indent steps, uses $diff)");
+
+ }
+ }
+ }
+
+ $line++;
+ $prevl = $l;
+ }
+
+ if(!$copyright) {
+ checkwarn(1, 0, $file, "", "Missing copyright statement", 1);
+ }
+
+ close(R);
+
+}
+
+
+if($errors || $warnings) {
+ printf "checksrc: %d errors and %d warnings\n", $errors, $warnings;
+ exit 5; # return failure
+}
diff --git a/lib/checksrc.whitelist b/lib/checksrc.whitelist
new file mode 100644
index 00000000..e261b9da
--- /dev/null
+++ b/lib/checksrc.whitelist
@@ -0,0 +1,10 @@
+ 227 Entering Passive Mode (a1,a2,a3,a4,p1,p2)
+ 228 Entering Long Passive Mode (4,4,a1,a2,a3,a4,2,p1,p2)
+ 150 ASCII data connection for /bin/ls (137.167.104.91,37445) (0 bytes).
+ 150 Opening ASCII mode data connection for [file] (0.0.0.0,0) (545 bytes)
+ * no_proxy=domain1.dom,host.domain2.dom
+ Default values are (0,0) initialized by calloc.
+ file = fopen(name, "r"); /* VMS */
+ return fopen(file, "r"); /* VMS */
+ return fopen(file, "r", "rfm=stmlf", "ctx=stm");
+ curl_memlog("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n",
diff --git a/lib/config-amigaos.h b/lib/config-amigaos.h
index a9fd5677..04b18b74 100644
--- a/lib/config-amigaos.h
+++ b/lib/config-amigaos.h
@@ -1,5 +1,5 @@
-#ifndef LIBCURL_CONFIG_AMIGAOS_H
-#define LIBCURL_CONFIG_AMIGAOS_H
+#ifndef HEADER_CURL_CONFIG_AMIGAOS_H
+#define HEADER_CURL_CONFIG_AMIGAOS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,10 +22,15 @@
*
***************************************************************************/
+/* ================================================================ */
+/* Hand crafted config file for AmigaOS */
+/* ================================================================ */
+
#ifdef __AMIGA__ /* Any AmigaOS flavour */
#define HAVE_ARPA_INET_H 1
#define HAVE_CLOSESOCKET_CAMEL 1
+#define HAVE_ERRNO_H 1
#define HAVE_GETHOSTBYADDR 1
#define HAVE_INET_ADDR 1
#define HAVE_INTTYPES_H 1
@@ -71,8 +76,6 @@
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
-#define HAVE_TERMIOS_H 1
-#define HAVE_TERMIO_H 1
#define HAVE_TIME_H 1
#define HAVE_UNAME 1
#define HAVE_UNISTD_H 1
@@ -86,12 +89,12 @@
#define SIZEOF_INT 4
#define SIZEOF_SHORT 2
+#define SIZEOF_SIZE_T 4
+#define USE_MANUAL 1
#define USE_OPENSSL 1
-#define USE_SSLEAY 1
#define CURL_DISABLE_LDAP 1
-
#define OS "AmigaOS"
#define PACKAGE "curl"
@@ -112,8 +115,20 @@
#define in_addr_t int
+#ifndef F_OK
+# define F_OK 0
+#endif
+
#ifndef O_RDONLY
-# define O_RDONLY 0x0000
+# define O_RDONLY 0x0000
+#endif
+
+#ifndef LONG_MAX
+# define LONG_MAX 0x7fffffffL
+#endif
+
+#ifndef LONG_MIN
+# define LONG_MIN (-0x7fffffffL-1)
#endif
#define HAVE_GETNAMEINFO 1
@@ -148,4 +163,4 @@
#define SEND_TYPE_RETV int
#endif /* __AMIGA__ */
-#endif /* LIBCURL_CONFIG_AMIGAOS_H */
+#endif /* HEADER_CURL_CONFIG_AMIGAOS_H */
diff --git a/lib/config-dos.h b/lib/config-dos.h
new file mode 100644
index 00000000..288bd1db
--- /dev/null
+++ b/lib/config-dos.h
@@ -0,0 +1,181 @@
+#ifndef HEADER_CURL_CONFIG_DOS_H
+#define HEADER_CURL_CONFIG_DOS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+
+/* ================================================================ */
+/* lib/config-dos.h - Hand crafted config file for DOS */
+/* ================================================================ */
+
+#if defined(DJGPP)
+ #define OS "MSDOS/djgpp"
+#elif defined(__HIGHC__)
+ #define OS "MSDOS/HighC"
+#elif defined(__WATCOMC__)
+ #define OS "MSDOS/Watcom"
+#else
+ #define OS "MSDOS/?"
+#endif
+
+#define PACKAGE "curl"
+
+#define HAVE_ARPA_INET_H 1
+#define HAVE_ERRNO_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_GETADDRINFO 1
+#define HAVE_GETNAMEINFO 1
+#define HAVE_GETPROTOBYNAME 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_IO_H 1
+#define HAVE_IOCTL 1
+#define HAVE_IOCTL_FIONBIO 1
+#define HAVE_IOCTLSOCKET 1
+#define HAVE_IOCTLSOCKET_FIONBIO 1
+#define HAVE_LIMITS_H 1
+#define HAVE_LOCALE_H 1
+#define HAVE_LONGLONG 1
+#define HAVE_MEMORY_H 1
+#define HAVE_NETDB_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_NETINET_TCP_H 1
+#define HAVE_NET_IF_H 1
+#define HAVE_PROCESS_H 1
+#define HAVE_RECV 1
+#define HAVE_RECVFROM 1
+#define HAVE_SELECT 1
+#define HAVE_SEND 1
+#define HAVE_SETJMP_H 1
+#define HAVE_SETLOCALE 1
+#define HAVE_SETMODE 1
+#define HAVE_SIGNAL 1
+#define HAVE_SOCKET 1
+#define HAVE_STRDUP 1
+#define HAVE_STRICMP 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRUCT_TIMEVAL 1
+#define HAVE_STRUCT_IN6_ADDR 1
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_TIME_H 1
+#define HAVE_UNISTD_H 1
+
+#define NEED_MALLOC_H 1
+
+#define RETSIGTYPE void
+#define SIZEOF_INT 4
+#define SIZEOF_LONG_DOUBLE 16
+#define SIZEOF_SHORT 2
+#define SIZEOF_SIZE_T 4
+#define STDC_HEADERS 1
+#define TIME_WITH_SYS_TIME 1
+
+/* Qualifiers for send(), recv(), recvfrom() and getnameinfo(). */
+
+#define SEND_TYPE_ARG1 int
+#define SEND_QUAL_ARG2 const
+#define SEND_TYPE_ARG2 void *
+#define SEND_TYPE_ARG3 int
+#define SEND_TYPE_ARG4 int
+#define SEND_TYPE_RETV int
+
+#define RECV_TYPE_ARG1 int
+#define RECV_TYPE_ARG2 void *
+#define RECV_TYPE_ARG3 int
+#define RECV_TYPE_ARG4 int
+#define RECV_TYPE_RETV int
+
+#define RECVFROM_TYPE_ARG1 int
+#define RECVFROM_TYPE_ARG2 void
+#define RECVFROM_TYPE_ARG3 int
+#define RECVFROM_TYPE_ARG4 int
+#define RECVFROM_TYPE_ARG5 struct sockaddr
+#define RECVFROM_TYPE_ARG6 int
+#define RECVFROM_TYPE_RETV int
+#define RECVFROM_TYPE_ARG2_IS_VOID 1
+
+#define GETNAMEINFO_QUAL_ARG1 const
+#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
+#define GETNAMEINFO_TYPE_ARG2 int
+#define GETNAMEINFO_TYPE_ARG46 int
+#define GETNAMEINFO_TYPE_ARG7 int
+
+#define BSD
+
+/* CURLDEBUG definition enables memory tracking */
+/* #define CURLDEBUG */
+
+/* USE_ZLIB on cmd-line */
+#ifdef USE_ZLIB
+ #define HAVE_ZLIB_H 1
+ #define HAVE_LIBZ 1
+#endif
+
+/* USE_OPENSSL on cmd-line */
+#ifdef USE_OPENSSL
+ #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
+ #define HAVE_OPENSSL_ENGINE_H 1
+ #define OPENSSL_NO_KRB5 1
+#endif
+
+/* to disable LDAP */
+#define CURL_DISABLE_LDAP 1
+
+#define in_addr_t u_long
+
+#if defined(__HIGHC__) || \
+ (defined(__GNUC__) && (__GNUC__ < 4))
+ #define ssize_t int
+#endif
+
+#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
+
+/* Target HAVE_x section */
+
+#if defined(DJGPP)
+ #define HAVE_BASENAME 1
+ #define HAVE_STRCASECMP 1
+ #define HAVE_SIGACTION 1
+ #define HAVE_SIGSETJMP 1
+ #define HAVE_SYS_TIME_H 1
+ #define HAVE_TERMIOS_H 1
+ #define HAVE_VARIADIC_MACROS_GCC 1
+
+#elif defined(__WATCOMC__)
+ #define HAVE_STRCASECMP 1
+
+#elif defined(__HIGHC__)
+ #define HAVE_SYS_TIME_H 1
+ #define strerror(e) strerror_s_((e))
+#endif
+
+#ifdef MSDOS /* Watt-32 */
+ #define HAVE_CLOSE_S 1
+#endif
+
+#undef word
+#undef byte
+
+#endif /* HEADER_CURL_CONFIG_DOS_H */
+
diff --git a/lib/config-mac.h b/lib/config-mac.h
index 740f1d97..ee7a6590 100644
--- a/lib/config-mac.h
+++ b/lib/config-mac.h
@@ -1,14 +1,39 @@
-#ifndef __LIB_CONFIG_MAC_H
-#define __LIB_CONFIG_MAC_H
+#ifndef HEADER_CURL_CONFIG_MAC_H
+#define HEADER_CURL_CONFIG_MAC_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
/* =================================================================== */
-/* lib/config-mac.h - Hand crafted config file for Mac OS 9 */
+/* Hand crafted config file for Mac OS 9 */
/* =================================================================== */
/* On Mac OS X you must run configure to generate curl_config.h file */
/* =================================================================== */
#define OS "mac"
+/* Define if you want the built-in manual */
+#define USE_MANUAL 1
+
+#define HAVE_ERRNO_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_SELECT_H 1
@@ -21,15 +46,16 @@
#define HAVE_FCNTL_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_ALLOCA_H 1
-#define HAVE_TIME_H 1
#define HAVE_STDLIB_H 1
+#define HAVE_TIME_H 1
#define HAVE_UTIME_H 1
#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_UTIME_H 1
#define TIME_WITH_SYS_TIME 1
#define HAVE_ALARM 1
-#define HAVE_STRDUP 1
+#define HAVE_FTRUNCATE 1
#define HAVE_UTIME 1
#define HAVE_SETVBUF 1
#define HAVE_STRFTIME 1
@@ -39,14 +65,12 @@
#define HAVE_SOCKET 1
#define HAVE_STRUCT_TIMEVAL 1
-//#define HAVE_STRICMP 1
#define HAVE_SIGACTION 1
#define HAVE_SIGNAL_H 1
#define HAVE_SIG_ATOMIC_T 1
#ifdef MACOS_SSL_SUPPORT
-# define USE_SSLEAY 1
-# define USE_OPENSSL 1
+# define USE_OPENSSL 1
#endif
#define CURL_DISABLE_LDAP 1
@@ -61,6 +85,7 @@
#define SIZEOF_INT 4
#define SIZEOF_SHORT 2
+#define SIZEOF_SIZE_T 4
#define HAVE_GETNAMEINFO 1
#define GETNAMEINFO_QUAL_ARG1 const
@@ -97,4 +122,4 @@
#define HAVE_EXTRA_STRICMP_H 1
#define HAVE_EXTRA_STRDUP_H 1
-#endif /* __LIB_CONFIG_MAC_H */
+#endif /* HEADER_CURL_CONFIG_MAC_H */
diff --git a/lib/config-os400.h b/lib/config-os400.h
index dad4d0c3..1e622281 100644
--- a/lib/config-os400.h
+++ b/lib/config-os400.h
@@ -1,5 +1,29 @@
+#ifndef HEADER_CURL_CONFIG_OS400_H
+#define HEADER_CURL_CONFIG_OS400_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
/* ================================================================ */
-/* lib/config-os400.h - Hand crafted config file for OS/400 */
+/* Hand crafted config file for OS/400 */
/* ================================================================ */
#pragma enum(int)
@@ -76,6 +100,9 @@
/* Define if you have the <des.h> header file. */
#undef HAVE_DES_H
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H
+
/* Define if you have the <err.h> header file. */
#undef HAVE_ERR_H
@@ -148,6 +175,15 @@
/* 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
@@ -250,30 +286,33 @@
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H
+
+/* The following define is needed on OS400 to enable strcmpi(), stricmp() and
+ strdup(). */
+#define __cplusplus__strings__
+
/* Define if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define if you have the `strcmpi' function. */
-#undef HAVE_STRCMPI
+#define HAVE_STRCMPI
+
+/* Define if you have the `stricmp' function. */
+#define HAVE_STRICMP
/* Define if you have the `strdup' function. */
-#undef HAVE_STRDUP
+#define HAVE_STRDUP
+
/* Define if you have the `strftime' function. */
#define HAVE_STRFTIME
-/* Define if you have the `stricmp' function. */
-#undef HAVE_STRICMP
-
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H
-/* Define if you have the `strlcat' function. */
-#undef HAVE_STRLCAT
-
/* Define if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
@@ -364,6 +403,9 @@
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
+/* The size of `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 8
+
/* Whether long long constants must be suffixed by LL. */
#define HAVE_LL
@@ -407,10 +449,7 @@
/* To disable LDAP */
#undef CURL_DISABLE_LDAP
-/* To avoid external use of library hidden symbols */
-#define CURL_HIDDEN_SYMBOLS
-
-/* External symbols need no special keyword. */
+/* Definition to make a library symbol externally visible. */
#define CURL_EXTERN_SYMBOL
/* Define if you have the ldap_url_parse procedure. */
@@ -498,8 +537,14 @@
/* Define to the function return type for send. */
#define SEND_TYPE_RETV int
-/* Define to use the QsoSSL package. */
-#define 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"
@@ -515,3 +560,4 @@
#define qadrt_use_fread_inline /* Generate fread() wrapper inline. */
#define qadrt_use_fwrite_inline /* Generate fwrite() wrapper inline. */
+#endif /* HEADER_CURL_CONFIG_OS400_H */
diff --git a/lib/config-riscos.h b/lib/config-riscos.h
index 98bb7880..e4005778 100644
--- a/lib/config-riscos.h
+++ b/lib/config-riscos.h
@@ -1,4 +1,31 @@
-/* curl_config.h.in. Generated automatically from configure.in by autoheader. */
+#ifndef HEADER_CURL_CONFIG_RISCOS_H
+#define HEADER_CURL_CONFIG_RISCOS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/* ================================================================ */
+/* Hand crafted config file for RISC OS */
+/* ================================================================ */
+
/* Name of this package! */
#undef PACKAGE
@@ -11,6 +38,9 @@
/* Define cpu-machine-OS */
#define OS "ARM-RISC OS"
+/* Define if you want the built-in manual */
+#define USE_MANUAL
+
/* Define if you have the gethostbyaddr_r() function with 5 arguments */
#undef HAVE_GETHOSTBYADDR_R_5
@@ -53,8 +83,8 @@
/* Define if you want to enable IPv6 support */
#undef ENABLE_IPV6
-/* Define to 1 if you have the alarm function. */
-#define HAVE_ALARM 1
+/* Define if you have the alarm function. */
+#define HAVE_ALARM
/* Define if you have the <alloca.h> header file. */
#define HAVE_ALLOCA_H
@@ -71,12 +101,18 @@
/* Define if you have the <des.h> header file. */
#undef HAVE_DES_H
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H
+
/* Define if you have the <err.h> header file. */
#undef HAVE_ERR_H
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H
+/* Define if you have the `ftruncate' function. */
+#define HAVE_FTRUNCATE
+
/* Define if getaddrinfo exists and works */
#define HAVE_GETADDRINFO
@@ -120,7 +156,7 @@
#define HAVE_INTTYPES_H
/* Define if you have the <io.h> header file. */
-#define HAVE_IO_H
+#undef HAVE_IO_H
/* Define if you have the `krb_get_our_ip_for_realm' function. */
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
@@ -269,9 +305,6 @@
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H
-/* Define if you have the `strlcat' function. */
-#undef HAVE_STRLCAT
-
/* Define if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
@@ -350,6 +383,9 @@
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
+/* The size of `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 4
+
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -435,8 +471,8 @@
/* Define to the type pointed by arg 2 for recvfrom. */
#define RECVFROM_TYPE_ARG2 void
-/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
-#define RECVFROM_TYPE_ARG2_IS_VOID 1
+/* Define if the type pointed by arg 2 for recvfrom is void. */
+#define RECVFROM_TYPE_ARG2_IS_VOID
/* Define to the type of arg 3 for recvfrom. */
#define RECVFROM_TYPE_ARG3 size_t
@@ -473,3 +509,5 @@
/* Define to the function return type for send. */
#define SEND_TYPE_RETV ssize_t
+
+#endif /* HEADER_CURL_CONFIG_RISCOS_H */
diff --git a/lib/config-symbian.h b/lib/config-symbian.h
index 9f8b74a5..a40e3d8e 100644
--- a/lib/config-symbian.h
+++ b/lib/config-symbian.h
@@ -1,7 +1,30 @@
-/* config-symbian.h. Manually generated. */
-
-/* when building libcurl itself */
-/* #undef BUILDING_LIBCURL */
+#ifndef HEADER_CURL_CONFIG_SYMBIAN_H
+#define HEADER_CURL_CONFIG_SYMBIAN_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/* ================================================================ */
+/* Hand crafted config file for Symbian */
+/* ================================================================ */
/* Location of default ca bundle */
/* #define CURL_CA_BUNDLE "/etc/pki/tls/certs/ca-bundle.crt"*/
@@ -42,17 +65,11 @@
/* to disable verbose strings */
/* #define CURL_DISABLE_VERBOSE_STRINGS 1*/
-/* to make a symbol visible */
-/*#define CURL_EXTERN_SYMBOL __declspec(dllexport)*/
-
-/* to enable hidden symbols */
-/*#define CURL_HIDDEN_SYMBOLS 1*/
+/* Definition to make a library symbol externally visible. */
+/* #undef CURL_EXTERN_SYMBOL */
/* Use Windows LDAP implementation */
-/* #undef CURL_LDAP_WIN */
-
-/* when not building a shared library */
-/* #undef CURL_STATICLIB */
+/* #undef USE_WIN32_LDAP */
/* your Entropy Gathering Daemon socket pathname */
/* #undef EGD_SOCKET */
@@ -243,7 +260,8 @@
/* 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 <io.h> header file. */
@@ -379,9 +397,6 @@
/* Define to 1 if you have the `pipe' function. */
#define HAVE_PIPE 1
-/* if you have the function PK11_CreateGenericObject */
-/* #undef HAVE_PK11_CREATEGENERICOBJECT */
-
/* Define to 1 if you have the `poll' function. */
/*#define HAVE_POLL 1*/
@@ -466,9 +481,6 @@
/* 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*/
@@ -490,9 +502,6 @@
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
-/* Define to 1 if you have the `strcasestr' function. */
-#define HAVE_STRCASESTR 1
-
/* Define to 1 if you have the `strcmpi' function. */
/* #undef HAVE_STRCMPI */
@@ -511,9 +520,6 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
-/* Define to 1 if you have the `strlcat' function. */
-#define HAVE_STRLCAT 1
-
/* Define to 1 if you have the `strlcpy' function. */
#define HAVE_STRLCPY 1
@@ -625,9 +631,6 @@
/* Define to 1 if you have the <x509.h> header file. */
/* #undef HAVE_X509_H */
-/* Define to 1 if you are building a native Windows target. */
-/* #undef NATIVE_WINDOWS */
-
/* Define to 1 if you need the lber.h header file even with ldap.h */
/* #undef NEED_LBER_H */
@@ -654,7 +657,8 @@
/*#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"*/
@@ -804,8 +808,4 @@
#define HAVE_ZLIB_H 1
#endif
-/* Enable appropriate definitions only when OpenSSL support is enabled */
-#ifdef USE_SSLEAY
-/* if OpenSSL is in use */
-#define USE_OPENSSL
-#endif
+#endif /* HEADER_CURL_CONFIG_SYMBIAN_H */
diff --git a/lib/config-tpf.h b/lib/config-tpf.h
index 3e494f7c..d6b8cc2f 100644
--- a/lib/config-tpf.h
+++ b/lib/config-tpf.h
@@ -1,8 +1,29 @@
-#ifndef __LIBCONFIGTPF_H
-#define __LIBCONFIGTPF_H
+#ifndef HEADER_CURL_CONFIG_TPF_H
+#define HEADER_CURL_CONFIG_TPF_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
/* ================================================================ */
-/* lib/config-tpf.h - Hand crafted config file for TPF */
+/* Hand crafted config file for TPF */
/* ================================================================ */
/* ---------------------------------------------------------------- */
@@ -11,9 +32,6 @@
/* NOTE: Refer also to the .mak file for some of the flags below */
-/* when building libcurl itself */
-/* #undef BUILDING_LIBCURL */
-
/* to disable cookies support */
/* #undef CURL_DISABLE_COOKIES */
@@ -44,9 +62,6 @@
/* to disable verbose strings */
/* #undef CURL_DISABLE_VERBOSE_STRINGS */
-/* when not building a shared library */
-/* #undef CURL_STATICLIB */
-
/* lber dynamic library file */
/* #undef DL_LBER_FILE */
@@ -231,7 +246,8 @@
/* 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 <io.h> header file. */
@@ -421,9 +437,6 @@
/* 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.h> header file. */
/* #undef HAVE_SSL_H */
#define HAVE_SSL_H 1
@@ -456,9 +469,6 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
-/* Define to 1 if you have the `strlcat' function. */
-/* #undef HAVE_STRLCAT */
-
/* Define to 1 if you have the `strlcpy' function. */
/* #undef HAVE_STRLCPY */
@@ -569,7 +579,8 @@
#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"
@@ -635,7 +646,7 @@
/* #undef USE_OPENSSL */
/* if SSL is enabled */
-/* #undef USE_SSLEAY */
+/* #undef USE_OPENSSL */
/* to enable SSPI support */
/* #undef USE_WINDOWS_SSPI */
@@ -758,4 +769,4 @@
#endif
-#endif /* __LIBCONFIGTPF_H */
+#endif /* HEADER_CURL_CONFIG_TPF_H */
diff --git a/lib/config-vxworks.h b/lib/config-vxworks.h
index f7797fd0..d889efcd 100644
--- a/lib/config-vxworks.h
+++ b/lib/config-vxworks.h
@@ -1,13 +1,31 @@
-#ifndef __LIB_CONFIG_VXWORKS_H
-#define __LIB_CONFIG_VXWORKS_H
+#ifndef HEADER_CURL_CONFIG_VXWORKS_H
+#define HEADER_CURL_CONFIG_VXWORKS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
/* =============================================================== */
-/* lib/config-vxworks.h - Hand crafted config file for VxWorks */
+/* Hand crafted config file for VxWorks */
/* =============================================================== */
-/* when building libcurl itself */
-/* #undef BUILDING_LIBCURL */
-
/* Location of default ca bundle */
/* #undef CURL_CA_BUNDLE */
@@ -53,17 +71,11 @@
/* to disable verbose strings */
/* #undef CURL_DISABLE_VERBOSE_STRINGS */
-/* to make a symbol visible */
+/* Definition to make a library symbol externally visible. */
/* #undef CURL_EXTERN_SYMBOL */
-/* to enable hidden symbols */
-/* #undef CURL_HIDDEN_SYMBOLS */
-
/* Use Windows LDAP implementation */
-/* #undef CURL_LDAP_WIN */
-
-/* when not building a shared library */
-/* #undef CURL_STATICLIB */
+/* #undef USE_WIN32_LDAP */
/* your Entropy Gathering Daemon socket pathname */
/* #undef EGD_SOCKET */
@@ -448,9 +460,6 @@
/* Define to 1 if you have the `pipe' function. */
#define HAVE_PIPE 1
-/* if you have the function PK11_CreateGenericObject */
-/* #undef HAVE_PK11_CREATEGENERICOBJECT */
-
/* Define to 1 if you have a working poll function. */
/* #undef HAVE_POLL */
@@ -538,9 +547,6 @@
/* 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
@@ -562,9 +568,6 @@
/* Define to 1 if you have the strcasecmp function. */
#define HAVE_STRCASECMP 1
-/* Define to 1 if you have the strcasestr function. */
-/* #undef HAVE_STRCASESTR */
-
/* Define to 1 if you have the strcmpi function. */
/* #undef HAVE_STRCMPI */
@@ -583,9 +586,6 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
-/* Define to 1 if you have the strlcat function. */
-/* #undef HAVE_STRLCAT */
-
/* Define to 1 if you have the `strlcpy' function. */
/* #undef HAVE_STRLCPY */
@@ -724,9 +724,6 @@
/* if you have the zlib.h header file */
#define HAVE_ZLIB_H 1
-/* Define to 1 if you are building a native Windows target. */
-/* #undef NATIVE_WINDOWS */
-
/* Define to 1 if you need the lber.h header file even with ldap.h */
/* #undef NEED_LBER_H */
@@ -886,9 +883,6 @@
/* if OpenSSL is in use */
#define USE_OPENSSL 1
-/* if SSL is enabled */
-#define USE_SSLEAY 1
-
/* Define to 1 if you are building a Windows target without large file
support. */
/* #undef USE_WIN32_LARGE_FILES */
@@ -931,4 +925,4 @@
/* the signed version of size_t */
/* #undef ssize_t */
-#endif /* __LIB_CONFIG_VXWORKS_H */
+#endif /* HEADER_CURL_CONFIG_VXWORKS_H */
diff --git a/lib/config-win32.h b/lib/config-win32.h
index 5ee76065..e9a37121 100644
--- a/lib/config-win32.h
+++ b/lib/config-win32.h
@@ -1,50 +1,84 @@
-#ifndef __LIB_CONFIG_WIN32_H
-#define __LIB_CONFIG_WIN32_H
+#ifndef HEADER_CURL_CONFIG_WIN32_H
+#define HEADER_CURL_CONFIG_WIN32_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
/* ================================================================ */
-/* lib/config-win32.h - Hand crafted config file for Windows */
+/* Hand crafted config file for Windows */
/* ================================================================ */
/* ---------------------------------------------------------------- */
/* HEADER FILES */
/* ---------------------------------------------------------------- */
-/* Define if you have the <arpa/inet.h> header file. */
+/* Define if you have the <arpa/inet.h> header file. */
/* #define HAVE_ARPA_INET_H 1 */
-/* Define if you have the <assert.h> header file. */
+/* Define if you have the <assert.h> header file. */
#define HAVE_ASSERT_H 1
-/* Define if you have the <crypto.h> header file. */
+/* Define if you have the <crypto.h> header file. */
/* #define HAVE_CRYPTO_H 1 */
-/* Define if you have the <err.h> header file. */
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define if you have the <err.h> header file. */
/* #define HAVE_ERR_H 1 */
-/* Define if you have the <fcntl.h> header file. */
+/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
-/* Define if you have the <getopt.h> header file. */
-/* #define HAVE_GETOPT_H 1 */
+/* Define if you have the <getopt.h> header file. */
+#if defined(__MINGW32__) || defined(__POCC__)
+#define HAVE_GETOPT_H 1
+#endif
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1800)
+#define HAVE_INTTYPES_H 1
+#endif
-/* Define if you have the <io.h> header file. */
+/* Define if you have the <io.h> header file. */
#define HAVE_IO_H 1
-/* Define if you have the <limits.h> header file. */
+/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
-/* Define if you need the malloc.h header file even with stdlib.h */
+/* Define if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define if you need <malloc.h> header even with <stdlib.h> header file. */
#if !defined(__SALFORDC__) && !defined(__POCC__)
#define NEED_MALLOC_H 1
#endif
-/* Define if you have the <netdb.h> header file. */
+/* Define if you have the <netdb.h> header file. */
/* #define HAVE_NETDB_H 1 */
-/* Define if you have the <netinet/in.h> header file. */
+/* Define if you have the <netinet/in.h> header file. */
/* #define HAVE_NETINET_IN_H 1 */
-/* Define if you have the <process.h> header file. */
+/* Define if you have the <process.h> header file. */
#ifndef __SALFORDC__
#define HAVE_PROCESS_H 1
#endif
@@ -52,68 +86,73 @@
/* Define if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
-/* Define if you have the <sgtty.h> header file. */
+/* Define if you have the <sgtty.h> header file. */
/* #define HAVE_SGTTY_H 1 */
-/* Define if you have the <ssl.h> header file. */
+/* Define if you have the <ssl.h> header file. */
/* #define HAVE_SSL_H 1 */
-/* Define if you have the <stdlib.h> header file. */
+/* Define to 1 if you have the <stdbool.h> header file. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1800)
+#define HAVE_STDBOOL_H 1
+#endif
+
+/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
-/* Define if you have the <sys/param.h> header file. */
+/* Define if you have the <sys/param.h> header file. */
/* #define HAVE_SYS_PARAM_H 1 */
-/* Define if you have the <sys/select.h> header file. */
+/* Define if you have the <sys/select.h> header file. */
/* #define HAVE_SYS_SELECT_H 1 */
-/* Define if you have the <sys/socket.h> header file. */
+/* Define if you have the <sys/socket.h> header file. */
/* #define HAVE_SYS_SOCKET_H 1 */
-/* Define if you have the <sys/sockio.h> header file. */
+/* Define if you have the <sys/sockio.h> header file. */
/* #define HAVE_SYS_SOCKIO_H 1 */
-/* Define if you have the <sys/stat.h> header file. */
+/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
-/* Define if you have the <sys/time.h> header file */
+/* Define if you have the <sys/time.h> header file. */
/* #define HAVE_SYS_TIME_H 1 */
-/* Define if you have the <sys/types.h> header file. */
+/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
-/* Define if you have the <sys/utime.h> header file. */
+/* Define if you have the <sys/utime.h> header file. */
#ifndef __BORLANDC__
#define HAVE_SYS_UTIME_H 1
#endif
-/* Define if you have the <termio.h> header file. */
+/* Define if you have the <termio.h> header file. */
/* #define HAVE_TERMIO_H 1 */
-/* Define if you have the <termios.h> header file. */
+/* Define if you have the <termios.h> header file. */
/* #define HAVE_TERMIOS_H 1 */
-/* Define if you have the <time.h> header file. */
+/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
-/* Define if you have the <unistd.h> header file. */
+/* Define if you have the <unistd.h> header file. */
#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
defined(__POCC__)
#define HAVE_UNISTD_H 1
#endif
-/* Define if you have the <windows.h> header file. */
+/* Define if you have the <windows.h> header file. */
#define HAVE_WINDOWS_H 1
-/* Define if you have the <winsock.h> header file. */
+/* Define if you have the <winsock.h> header file. */
#define HAVE_WINSOCK_H 1
-/* Define if you have the <winsock2.h> header file. */
+/* Define if you have the <winsock2.h> header file. */
#ifndef __SALFORDC__
#define HAVE_WINSOCK2_H 1
#endif
-/* Define if you have the <ws2tcpip.h> header file. */
+/* Define if you have the <ws2tcpip.h> header file. */
#ifndef __SALFORDC__
#define HAVE_WS2TCPIP_H 1
#endif
@@ -125,41 +164,49 @@
/* Define if sig_atomic_t is an available typedef. */
#define HAVE_SIG_ATOMIC_T 1
-/* Define if you have the ANSI C header files. */
+/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
/* #define TIME_WITH_SYS_TIME 1 */
+/* Define to 1 if bool is an available type. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1800)
+#define HAVE_BOOL_T 1
+#endif
+
/* ---------------------------------------------------------------- */
/* FUNCTIONS */
/* ---------------------------------------------------------------- */
-/* Define if you have the closesocket function. */
+/* Define if you have the closesocket function. */
#define HAVE_CLOSESOCKET 1
-/* Define if you don't have vprintf but do have _doprnt. */
+/* Define if you don't have vprintf but do have _doprnt. */
/* #define HAVE_DOPRNT 1 */
-/* Define if you have the gethostbyaddr function. */
+/* Define if you have the ftruncate function. */
+#define HAVE_FTRUNCATE 1
+
+/* Define if you have the gethostbyaddr function. */
#define HAVE_GETHOSTBYADDR 1
-/* Define if you have the gethostname function. */
+/* Define if you have the gethostname function. */
#define HAVE_GETHOSTNAME 1
-/* Define if you have the getpass function. */
+/* Define if you have the getpass function. */
/* #define HAVE_GETPASS 1 */
-/* Define if you have the getservbyname function. */
+/* Define if you have the getservbyname function. */
#define HAVE_GETSERVBYNAME 1
-/* Define if you have the getprotobyname function. */
+/* Define if you have the getprotobyname function. */
#define HAVE_GETPROTOBYNAME
-/* Define if you have the gettimeofday function. */
+/* Define if you have the gettimeofday function. */
/* #define HAVE_GETTIMEOFDAY 1 */
-/* Define if you have the inet_addr function. */
+/* Define if you have the inet_addr function. */
#define HAVE_INET_ADDR 1
/* Define if you have the ioctlsocket function. */
@@ -168,35 +215,41 @@
/* Define if you have a working ioctlsocket FIONBIO function. */
#define HAVE_IOCTLSOCKET_FIONBIO 1
-/* Define if you have the perror function. */
+/* Define if you have the perror function. */
#define HAVE_PERROR 1
-/* Define if you have the RAND_screen function when using SSL */
+/* Define if you have the RAND_screen function when using SSL. */
#define HAVE_RAND_SCREEN 1
/* Define if you have the `RAND_status' function when using SSL. */
#define HAVE_RAND_STATUS 1
-/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function.
+/* Define if you have the `CRYPTO_cleanup_all_ex_data' function.
This is present in OpenSSL versions after 0.9.6b */
#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
-/* Define if you have the select function. */
+/* Define if you have the select function. */
#define HAVE_SELECT 1
-/* Define if you have the setvbuf function. */
+/* Define if you have the setlocale function. */
+#define HAVE_SETLOCALE 1
+
+/* Define if you have the setmode function. */
+#define HAVE_SETMODE 1
+
+/* Define if you have the setvbuf function. */
#define HAVE_SETVBUF 1
-/* Define if you have the socket function. */
+/* Define if you have the socket function. */
#define HAVE_SOCKET 1
-/* Define if you have the strcasecmp function. */
+/* Define if you have the strcasecmp function. */
/* #define HAVE_STRCASECMP 1 */
-/* Define if you have the strdup function. */
+/* Define if you have the strdup function. */
#define HAVE_STRDUP 1
-/* Define if you have the strftime function. */
+/* Define if you have the strftime function. */
#define HAVE_STRFTIME 1
/* Define if you have the stricmp function. */
@@ -208,21 +261,22 @@
/* Define if you have the strnicmp function. */
#define HAVE_STRNICMP 1
-/* Define if you have the strstr function. */
+/* Define if you have the strstr function. */
#define HAVE_STRSTR 1
-/* Define if you have the strtoll function. */
-#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__)
+/* Define if you have the strtoll function. */
+#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__) || \
+ (defined(_MSC_VER) && (_MSC_VER >= 1800))
#define HAVE_STRTOLL 1
#endif
-/* Define if you have the tcgetattr function. */
+/* Define if you have the tcgetattr function. */
/* #define HAVE_TCGETATTR 1 */
-/* Define if you have the tcsetattr function. */
+/* Define if you have the tcsetattr function. */
/* #define HAVE_TCSETATTR 1 */
-/* Define if you have the utime function */
+/* Define if you have the utime function. */
#ifndef __BORLANDC__
#define HAVE_UTIME 1
#endif
@@ -309,13 +363,13 @@
/* TYPEDEF REPLACEMENTS */
/* ---------------------------------------------------------------- */
-/* Define this if in_addr_t is not an available 'typedefed' type */
+/* Define if in_addr_t is not an available 'typedefed' type. */
#define in_addr_t unsigned long
-/* Define as the return type of signal handlers (int or void). */
+/* Define to the return type of signal handlers (int or void). */
#define RETSIGTYPE void
-/* Define ssize_t if it is not an available 'typedefed' type */
+/* Define if ssize_t is not an available 'typedefed' type. */
#ifndef _SSIZE_T_DEFINED
# if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
defined(__POCC__) || \
@@ -333,30 +387,57 @@
/* TYPE SIZES */
/* ---------------------------------------------------------------- */
-/* The size of `int', as computed by sizeof. */
+/* Define to the size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
-/* The size of `long double', as computed by sizeof. */
+/* Define to the size of `long double', as computed by sizeof. */
#define SIZEOF_LONG_DOUBLE 16
-/* The size of `long long', as computed by sizeof. */
+/* Define to the size of `long long', as computed by sizeof. */
/* #define SIZEOF_LONG_LONG 8 */
-/* The size of `short', as computed by sizeof. */
+/* Define to the size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
+/* Define to the size of `size_t', as computed by sizeof. */
+#if defined(_WIN64)
+# define SIZEOF_SIZE_T 8
+#else
+# define SIZEOF_SIZE_T 4
+#endif
+
/* ---------------------------------------------------------------- */
-/* STRUCT RELATED */
+/* BSD-style lwIP TCP/IP stack SPECIFIC */
/* ---------------------------------------------------------------- */
-/* Define this if you have struct sockaddr_storage */
-#ifndef __SALFORDC__
-#define HAVE_STRUCT_SOCKADDR_STORAGE 1
+/* Define to use BSD-style lwIP TCP/IP stack. */
+/* #define USE_LWIPSOCK 1 */
+
+#ifdef USE_LWIPSOCK
+# undef USE_WINSOCK
+# undef HAVE_WINSOCK_H
+# undef HAVE_WINSOCK2_H
+# undef HAVE_WS2TCPIP_H
+# undef HAVE_ERRNO_H
+# undef HAVE_GETHOSTNAME
+# undef HAVE_GETNAMEINFO
+# undef LWIP_POSIX_SOCKETS_IO_NAMES
+# undef RECV_TYPE_ARG1
+# undef RECV_TYPE_ARG3
+# undef SEND_TYPE_ARG1
+# undef SEND_TYPE_ARG3
+# define HAVE_FREEADDRINFO
+# define HAVE_GETADDRINFO
+# define HAVE_GETHOSTBYNAME
+# define HAVE_GETHOSTBYNAME_R
+# define HAVE_GETHOSTBYNAME_R_6
+# define LWIP_POSIX_SOCKETS_IO_NAMES 0
+# define RECV_TYPE_ARG1 int
+# define RECV_TYPE_ARG3 size_t
+# define SEND_TYPE_ARG1 int
+# define SEND_TYPE_ARG3 size_t
#endif
-/* Define this if you have struct timeval */
-#define HAVE_STRUCT_TIMEVAL 1
-
/* ---------------------------------------------------------------- */
/* Watt-32 tcp/ip SPECIFIC */
/* ---------------------------------------------------------------- */
@@ -385,8 +466,11 @@
/* COMPILER SPECIFIC */
/* ---------------------------------------------------------------- */
-/* Undef keyword 'const' if it does not work. */
-/* #undef const */
+/* Define to nothing if compiler does not support 'const' qualifier. */
+/* #define const */
+
+/* Define to nothing if compiler does not support 'volatile' qualifier. */
+/* #define volatile */
/* Windows should not have HAVE_GMTIME_R defined */
/* #undef HAVE_GMTIME_R */
@@ -397,18 +481,19 @@
#endif
/* Define if the compiler supports the 'long long' data type. */
-#if defined(__MINGW32__) || defined(__WATCOMC__)
+#if defined(__MINGW32__) || defined(__WATCOMC__) || \
+ (defined(_MSC_VER) && (_MSC_VER >= 1310))
#define HAVE_LONGLONG 1
#endif
-/* Define to avoid VS2005 complaining about portable C functions */
+/* Define to avoid VS2005 complaining about portable C functions. */
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
#define _CRT_SECURE_NO_DEPRECATE 1
#define _CRT_NONSTDC_NO_DEPRECATE 1
#endif
-/* VS2005 and later dafault size for time_t is 64-bit, unless */
-/* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
+/* VS2005 and later dafault size for time_t is 64-bit, unless
+ _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
# ifndef _USE_32BIT_TIME_T
# define SIZEOF_TIME_T 8
@@ -417,36 +502,68 @@
# endif
#endif
-/* 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 using
- Windows SDK versions 6.X and Windows 2000 as a build target are functional */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
-# define VS2008_MINIMUM_TARGET 0x0500
-#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. */
+# define VS2008_MIN_TARGET 0x0500
+
+ /* The minimum build target for VS2012 is Vista unless Update 1 is installed
+ and the v110_xp toolset is choosen. */
+# 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
-/* 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_DEFAULT_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
#endif
-/* VS2008 default target settings and minimum build target check */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+/* VS2008 default target settings and minimum build target check. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_MSC_VER <= 1600)
# ifndef _WIN32_WINNT
-# define _WIN32_WINNT VS2008_DEFAULT_TARGET
+# define _WIN32_WINNT VS2008_DEF_TARGET
# endif
# ifndef WINVER
-# define WINVER VS2008_DEFAULT_TARGET
+# define WINVER VS2008_DEF_TARGET
# endif
-# if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
+# if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET)
# error VS2008 does not support Windows build targets prior to Windows 2000
# 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)
@@ -489,6 +606,25 @@
#endif
/* ---------------------------------------------------------------- */
+/* STRUCT RELATED */
+/* ---------------------------------------------------------------- */
+
+/* Define if you have struct sockaddr_storage. */
+#if !defined(__SALFORDC__) && !defined(__BORLANDC__)
+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
+#endif
+
+/* Define if you have struct timeval. */
+#define HAVE_STRUCT_TIMEVAL 1
+
+/* Define if struct sockaddr_in6 has the sin6_scope_id member. */
+#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
+
+#if HAVE_WINSOCK2_H && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+#define HAVE_STRUCT_POLLFD 1
+#endif
+
+/* ---------------------------------------------------------------- */
/* LARGE FILE SUPPORT */
/* ---------------------------------------------------------------- */
@@ -521,14 +657,17 @@
/* ---------------------------------------------------------------- */
/*
- * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS
+ * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS.
*/
-/* Define USE_ARES to enable c-ares asynchronous DNS lookups */
+/* Define to enable c-ares asynchronous DNS lookups. */
/* #define USE_ARES 1 */
-/* Define USE_THREADS_WIN32 to enable threaded asynchronous DNS lookups */
-#define USE_THREADS_WIN32 1
+/* Default define to enable threaded asynchronous DNS lookups. */
+#if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && \
+ !defined(USE_THREADS_WIN32)
+# define USE_THREADS_WIN32 1
+#endif
#if defined(USE_ARES) && defined(USE_THREADS_WIN32)
# error "Only one DNS lookup specialty may be defined at most"
@@ -539,28 +678,33 @@
/* ---------------------------------------------------------------- */
#if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
-#undef CURL_LDAP_WIN
+#undef USE_WIN32_LDAP
#define HAVE_LDAP_SSL_H 1
#define HAVE_LDAP_URL_PARSE 1
#elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
-#undef CURL_LDAP_WIN
+#undef USE_WIN32_LDAP
#define HAVE_LDAP_URL_PARSE 1
#else
#undef HAVE_LDAP_URL_PARSE
-#define CURL_LDAP_WIN 1
+#define USE_WIN32_LDAP 1
#endif
-#if defined(__WATCOMC__) && defined(CURL_LDAP_WIN)
+#if defined(__WATCOMC__) && defined(USE_WIN32_LDAP)
#if __WATCOMC__ < 1280
#define WINBERAPI __declspec(cdecl)
#define WINLDAPAPI __declspec(cdecl)
#endif
#endif
-#if defined(__POCC__) && defined(CURL_LDAP_WIN)
+#if defined(__POCC__) && defined(USE_WIN32_LDAP)
# define CURL_DISABLE_LDAP 1
#endif
+/* Define to use the Windows crypto library. */
+#if !defined(USE_OPENSSL) && !defined(USE_NSS)
+#define USE_WIN32_CRYPTO
+#endif
+
/* ---------------------------------------------------------------- */
/* ADDITIONAL DEFINITIONS */
/* ---------------------------------------------------------------- */
@@ -569,10 +713,10 @@
#undef OS
#if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
#define OS "i386-pc-win32"
+#elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (MSVC >=2005 or gcc) */
+#define OS "x86_64-pc-win32"
#elif defined(_M_IA64) /* Itanium */
#define OS "ia64-pc-win32"
-#elif defined(_M_X64) /* AMD64/EM64T - Not defined until MSVC 2005 */
-#define OS "amd64-pc-win32"
#else
#define OS "unknown-pc-win32"
#endif
@@ -580,8 +724,11 @@
/* Name of package */
#define PACKAGE "curl"
+/* If you want to build curl with the built-in manual */
+#define USE_MANUAL 1
+
#if defined(__POCC__) || (USE_IPV6)
# define ENABLE_IPV6 1
#endif
-#endif /* __LIB_CONFIG_WIN32_H */
+#endif /* HEADER_CURL_CONFIG_WIN32_H */
diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h
index 1f417825..a723fd18 100644
--- a/lib/config-win32ce.h
+++ b/lib/config-win32ce.h
@@ -1,5 +1,26 @@
-#ifndef __LIB_CONFIG_WIN32CE_H
-#define __LIB_CONFIG_WIN32CE_H
+#ifndef HEADER_CURL_CONFIG_WIN32CE_H
+#define HEADER_CURL_CONFIG_WIN32CE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
/* ================================================================ */
/* lib/config-win32ce.h - Hand crafted config file for windows ce */
@@ -18,6 +39,9 @@
/* Define if you have the <crypto.h> header file. */
/* #define HAVE_CRYPTO_H 1 */
+/* Define if you have the <errno.h> header file. */
+/* #define HAVE_ERRNO_H 1 */
+
/* Define if you have the <err.h> header file. */
/* #define HAVE_ERR_H 1 */
@@ -55,7 +79,7 @@
#define HAVE_STDLIB_H 1
/* Define if you have the <process.h> header file. */
-#define HAVE_PROCESS_H 1
+/* #define HAVE_PROCESS_H 1 */
/* Define if you have the <sys/param.h> header file. */
/* #define HAVE_SYS_PARAM_H 1 */
@@ -322,6 +346,13 @@
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
+/* The size of `size_t', as computed by sizeof. */
+#if defined(_WIN64)
+# define SIZEOF_SIZE_T 8
+#else
+# define SIZEOF_SIZE_T 4
+#endif
+
/* ---------------------------------------------------------------- */
/* STRUCT RELATED */
/* ---------------------------------------------------------------- */
@@ -378,7 +409,7 @@
/* LDAP SUPPORT */
/* ---------------------------------------------------------------- */
-#define CURL_LDAP_WIN 1
+#define USE_WIN32_LDAP 1
#undef HAVE_LDAP_URL_PARSE
/* ---------------------------------------------------------------- */
@@ -396,6 +427,14 @@
/* WinCE */
/* ---------------------------------------------------------------- */
+#ifndef UNICODE
+# define UNICODE
+#endif
+
+#ifndef _UNICODE
+# define _UNICODE
+#endif
+
#define CURL_DISABLE_FILE 1
#define CURL_DISABLE_TELNET 1
#define CURL_DISABLE_LDAP 1
@@ -404,6 +443,6 @@
#define ENOMEM 2
#define EAGAIN 3
-extern int stat(const char *path,struct stat *buffer );
+extern int stat(const char *path, struct stat *buffer);
-#endif /* __LIB_CONFIG_WIN32CE_H */
+#endif /* HEADER_CURL_CONFIG_WIN32CE_H */
diff --git a/lib/config.dos b/lib/config.dos
deleted file mode 100644
index 78f0c6b6..00000000
--- a/lib/config.dos
+++ /dev/null
@@ -1,169 +0,0 @@
-#ifndef HEADER_CONFIG_DOS_H
-#define HEADER_CONFIG_DOS_H
-
-
-/* ================================================================ */
-/* lib/config.dos - Hand crafted config file for DOS */
-/* ================================================================ */
-
-#if defined(DJGPP)
- #define OS "MSDOS/djgpp"
-#elif defined(__HIGHC__)
- #define OS "MSDOS/HighC"
-#elif defined(__WATCOMC__)
- #define OS "MSDOS/Watcom"
-#else
- #define OS "MSDOS/?"
-#endif
-
-#define PACKAGE "curl"
-
-#define HAVE_ARPA_INET_H 1
-#define HAVE_FCNTL_H 1
-#define HAVE_GETADDRINFO 1
-#define HAVE_GETNAMEINFO 1
-#define HAVE_GETPROTOBYNAME 1
-#define HAVE_GETTIMEOFDAY 1
-#define HAVE_IO_H 1
-#define HAVE_IOCTL 1
-#define HAVE_IOCTL_FIONBIO 1
-#define HAVE_IOCTLSOCKET 1
-#define HAVE_IOCTLSOCKET_FIONBIO 1
-#define HAVE_LIMITS_H 1
-#define HAVE_LOCALE_H 1
-#define HAVE_LONGLONG 1
-#define HAVE_MEMORY_H 1
-#define HAVE_NETDB_H 1
-#define HAVE_NETINET_IN_H 1
-#define HAVE_NETINET_TCP_H 1
-#define HAVE_NET_IF_H 1
-#define HAVE_PROCESS_H 1
-#define HAVE_RECV 1
-#define HAVE_RECVFROM 1
-#define HAVE_SELECT 1
-#define HAVE_SEND 1
-#define HAVE_SETJMP_H 1
-#define HAVE_SETLOCALE 1
-#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
-#define HAVE_STRUCT_TIMEVAL 1
-#define HAVE_STRUCT_IN6_ADDR 1
-#define HAVE_SYS_IOCTL_H 1
-#define HAVE_SYS_SOCKET_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_TERMIOS_H 1
-#define HAVE_TIME_H 1
-#define HAVE_UNISTD_H 1
-
-#define NEED_MALLOC_H 1
-
-#define RETSIGTYPE void
-#define SIZEOF_INT 4
-#define SIZEOF_LONG_DOUBLE 16
-#define SIZEOF_SHORT 2
-#define STDC_HEADERS 1
-#define TIME_WITH_SYS_TIME 1
-
-/* Qualifiers for send(), recv(), recvfrom() and getnameinfo(). */
-
-#define SEND_TYPE_ARG1 int
-#define SEND_QUAL_ARG2 const
-#define SEND_TYPE_ARG2 void *
-#define SEND_TYPE_ARG3 int
-#define SEND_TYPE_ARG4 int
-#define SEND_TYPE_RETV int
-
-#define RECV_TYPE_ARG1 int
-#define RECV_TYPE_ARG2 void *
-#define RECV_TYPE_ARG3 int
-#define RECV_TYPE_ARG4 int
-#define RECV_TYPE_RETV int
-
-#define RECVFROM_TYPE_ARG1 int
-#define RECVFROM_TYPE_ARG2 void
-#define RECVFROM_TYPE_ARG3 int
-#define RECVFROM_TYPE_ARG4 int
-#define RECVFROM_TYPE_ARG5 struct sockaddr
-#define RECVFROM_TYPE_ARG6 int
-#define RECVFROM_TYPE_RETV int
-#define RECVFROM_TYPE_ARG2_IS_VOID 1
-
-#define GETNAMEINFO_QUAL_ARG1 const
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-#define GETNAMEINFO_TYPE_ARG2 int
-#define GETNAMEINFO_TYPE_ARG46 int
-#define GETNAMEINFO_TYPE_ARG7 int
-
-#define BSD
-
-/* CURLDEBUG definition enables memory tracking */
-/* #define CURLDEBUG */
-
-/* USE_ZLIB on cmd-line */
-#ifdef USE_ZLIB
- #define HAVE_ZLIB_H 1
- #define HAVE_LIBZ 1
-#endif
-
-/* USE_SSLEAY on cmd-line */
-#ifdef USE_SSLEAY
- #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
- #define HAVE_OPENSSL_ENGINE_H 1
- #define OPENSSL_NO_KRB5 1
- #define USE_OPENSSL 1
-#endif
-
-/* to disable LDAP */
-#define CURL_DISABLE_LDAP 1
-
-#define in_addr_t u_long
-
-#if defined(__HIGHC__) || \
- (defined(__GNUC__) && (__GNUC__ < 4))
-#define ssize_t int
-#endif
-
-#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
-
-/* Target HAVE_x section */
-
-#if defined(DJGPP)
- #define HAVE_BASENAME 1
- #define HAVE_STRCASECMP 1
- #define HAVE_SIGACTION 1
- #define HAVE_SIGSETJMP 1
- #define HAVE_SYS_TIME_H 1
- #define HAVE_VARIADIC_MACROS_GCC 1
-
- #if (DJGPP_MINOR >= 4)
- #define HAVE_STRLCAT 1
- #endif
-
- /* Because djgpp <= 2.03 doesn't have snprintf() etc. */
- #if (DJGPP_MINOR < 4)
- #define _MPRINTF_REPLACE
- #endif
-
-#elif defined(__WATCOMC__)
- #define HAVE_STRCASECMP 1
-
-#elif defined(__HIGHC__)
- #define HAVE_SYS_TIME_H 1
-#endif
-
-#ifdef MSDOS /* Watt-32 */
- #define HAVE_CLOSESOCKET_CAMEL 1
- #define CloseSocket(s) close_s((s))
-#endif
-
-#undef word
-#undef byte
-
-#endif /* HEADER_CONFIG_DOS_H */
-
diff --git a/lib/conncache.c b/lib/conncache.c
new file mode 100644
index 00000000..c712ed7b
--- /dev/null
+++ b/lib/conncache.c
@@ -0,0 +1,364 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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/curl.h>
+
+#include "urldata.h"
+#include "url.h"
+#include "progress.h"
+#include "multiif.h"
+#include "sendf.h"
+#include "rawstr.h"
+#include "conncache.h"
+#include "curl_printf.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+static void conn_llist_dtor(void *user, void *element)
+{
+ struct connectdata *data = element;
+ (void)user;
+
+ data->bundle = NULL;
+}
+
+static CURLcode bundle_create(struct SessionHandle *data,
+ struct connectbundle **cb_ptr)
+{
+ (void)data;
+ DEBUGASSERT(*cb_ptr == NULL);
+ *cb_ptr = malloc(sizeof(struct connectbundle));
+ if(!*cb_ptr)
+ return CURLE_OUT_OF_MEMORY;
+
+ (*cb_ptr)->num_connections = 0;
+ (*cb_ptr)->multiuse = BUNDLE_UNKNOWN;
+
+ (*cb_ptr)->conn_list = Curl_llist_alloc((curl_llist_dtor) conn_llist_dtor);
+ if(!(*cb_ptr)->conn_list) {
+ Curl_safefree(*cb_ptr);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ return CURLE_OK;
+}
+
+static void bundle_destroy(struct connectbundle *cb_ptr)
+{
+ if(!cb_ptr)
+ return;
+
+ if(cb_ptr->conn_list) {
+ Curl_llist_destroy(cb_ptr->conn_list, NULL);
+ cb_ptr->conn_list = NULL;
+ }
+ free(cb_ptr);
+}
+
+/* Add a connection to a bundle */
+static CURLcode bundle_add_conn(struct connectbundle *cb_ptr,
+ struct connectdata *conn)
+{
+ if(!Curl_llist_insert_next(cb_ptr->conn_list, cb_ptr->conn_list->tail, conn))
+ return CURLE_OUT_OF_MEMORY;
+
+ conn->bundle = cb_ptr;
+
+ cb_ptr->num_connections++;
+ return CURLE_OK;
+}
+
+/* Remove a connection from a bundle */
+static int bundle_remove_conn(struct connectbundle *cb_ptr,
+ struct connectdata *conn)
+{
+ struct curl_llist_element *curr;
+
+ curr = cb_ptr->conn_list->head;
+ while(curr) {
+ if(curr->ptr == conn) {
+ Curl_llist_remove(cb_ptr->conn_list, curr, NULL);
+ cb_ptr->num_connections--;
+ conn->bundle = NULL;
+ return 1; /* we removed a handle */
+ }
+ curr = curr->next;
+ }
+ return 0;
+}
+
+static void free_bundle_hash_entry(void *freethis)
+{
+ struct connectbundle *b = (struct connectbundle *) freethis;
+
+ bundle_destroy(b);
+}
+
+int Curl_conncache_init(struct conncache *connc, int size)
+{
+ return Curl_hash_init(&connc->hash, size, Curl_hash_str,
+ Curl_str_key_compare, free_bundle_hash_entry);
+}
+
+void Curl_conncache_destroy(struct conncache *connc)
+{
+ if(connc)
+ Curl_hash_destroy(&connc->hash);
+}
+
+/* returns an allocated key to find a bundle for this connection */
+static char *hashkey(struct connectdata *conn)
+{
+ return aprintf("%s:%d",
+ conn->bits.proxy?conn->proxy.name:conn->host.name,
+ conn->localport);
+}
+
+/* Look up the bundle with all the connections to the same host this
+ connectdata struct is setup to use. */
+struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn,
+ struct conncache *connc)
+{
+ struct connectbundle *bundle = NULL;
+ if(connc) {
+ char *key = hashkey(conn);
+ if(key) {
+ bundle = Curl_hash_pick(&connc->hash, key, strlen(key));
+ free(key);
+ }
+ }
+
+ return bundle;
+}
+
+static bool conncache_add_bundle(struct conncache *connc,
+ char *key,
+ struct connectbundle *bundle)
+{
+ void *p = Curl_hash_add(&connc->hash, key, strlen(key), bundle);
+
+ return p?TRUE:FALSE;
+}
+
+static void conncache_remove_bundle(struct conncache *connc,
+ struct connectbundle *bundle)
+{
+ struct curl_hash_iterator iter;
+ struct curl_hash_element *he;
+
+ if(!connc)
+ return;
+
+ Curl_hash_start_iterate(&connc->hash, &iter);
+
+ he = Curl_hash_next_element(&iter);
+ while(he) {
+ if(he->ptr == bundle) {
+ /* The bundle is destroyed by the hash destructor function,
+ free_bundle_hash_entry() */
+ Curl_hash_delete(&connc->hash, he->key, he->key_len);
+ return;
+ }
+
+ he = Curl_hash_next_element(&iter);
+ }
+}
+
+CURLcode Curl_conncache_add_conn(struct conncache *connc,
+ struct connectdata *conn)
+{
+ CURLcode result;
+ struct connectbundle *bundle;
+ struct connectbundle *new_bundle = NULL;
+ struct SessionHandle *data = conn->data;
+
+ bundle = Curl_conncache_find_bundle(conn, data->state.conn_cache);
+ if(!bundle) {
+ char *key;
+ int rc;
+
+ result = bundle_create(data, &new_bundle);
+ if(result)
+ return result;
+
+ key = hashkey(conn);
+ if(!key) {
+ bundle_destroy(new_bundle);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ rc = conncache_add_bundle(data->state.conn_cache, key, new_bundle);
+ free(key);
+ if(!rc) {
+ bundle_destroy(new_bundle);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ bundle = new_bundle;
+ }
+
+ result = bundle_add_conn(bundle, conn);
+ if(result) {
+ if(new_bundle)
+ conncache_remove_bundle(data->state.conn_cache, new_bundle);
+ return result;
+ }
+
+ 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;
+}
+
+void Curl_conncache_remove_conn(struct conncache *connc,
+ struct connectdata *conn)
+{
+ struct connectbundle *bundle = conn->bundle;
+
+ /* The bundle pointer can be NULL, since this function can be called
+ due to a failed connection attempt, before being added to a bundle */
+ if(bundle) {
+ bundle_remove_conn(bundle, conn);
+ if(bundle->num_connections == 0) {
+ conncache_remove_bundle(connc, bundle);
+ }
+
+ 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));
+ }
+ }
+}
+
+/* This function iterates the entire connection cache and calls the
+ function func() with the connection pointer as the first argument
+ and the supplied 'param' argument as the other,
+
+ Return 0 from func() to continue the loop, return 1 to abort it.
+ */
+void Curl_conncache_foreach(struct conncache *connc,
+ void *param,
+ int (*func)(struct connectdata *conn, void *param))
+{
+ struct curl_hash_iterator iter;
+ struct curl_llist_element *curr;
+ struct curl_hash_element *he;
+
+ if(!connc)
+ return;
+
+ Curl_hash_start_iterate(&connc->hash, &iter);
+
+ he = Curl_hash_next_element(&iter);
+ while(he) {
+ struct connectbundle *bundle;
+
+ 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;
+ curr = curr->next;
+
+ if(1 == func(conn, param))
+ return;
+ }
+ }
+}
+
+/* Return the first connection found in the cache. Used when closing all
+ connections */
+struct connectdata *
+Curl_conncache_find_first_connection(struct conncache *connc)
+{
+ struct curl_hash_iterator iter;
+ struct curl_hash_element *he;
+ struct connectbundle *bundle;
+
+ Curl_hash_start_iterate(&connc->hash, &iter);
+
+ he = Curl_hash_next_element(&iter);
+ while(he) {
+ struct curl_llist_element *curr;
+ bundle = he->ptr;
+
+ curr = bundle->conn_list->head;
+ if(curr) {
+ return curr->ptr;
+ }
+
+ he = Curl_hash_next_element(&iter);
+ }
+
+ return NULL;
+}
+
+
+#if 0
+/* Useful for debugging the connection cache */
+void Curl_conncache_print(struct conncache *connc)
+{
+ struct curl_hash_iterator iter;
+ struct curl_llist_element *curr;
+ struct curl_hash_element *he;
+
+ if(!connc)
+ return;
+
+ fprintf(stderr, "=Bundle cache=\n");
+
+ Curl_hash_start_iterate(connc->hash, &iter);
+
+ he = Curl_hash_next_element(&iter);
+ while(he) {
+ struct connectbundle *bundle;
+ struct connectdata *conn;
+
+ bundle = he->ptr;
+
+ fprintf(stderr, "%s -", he->key);
+ curr = bundle->conn_list->head;
+ while(curr) {
+ conn = curr->ptr;
+
+ fprintf(stderr, " [%p %d]", (void *)conn, conn->inuse);
+ curr = curr->next;
+ }
+ fprintf(stderr, "\n");
+
+ he = Curl_hash_next_element(&iter);
+ }
+}
+#endif
diff --git a/lib/conncache.h b/lib/conncache.h
new file mode 100644
index 00000000..59181bf3
--- /dev/null
+++ b/lib/conncache.h
@@ -0,0 +1,68 @@
+#ifndef HEADER_CURL_CONNCACHE_H
+#define HEADER_CURL_CONNCACHE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2014, Linus Nielsen Feltzing, <linus@haxx.se>
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+struct conncache {
+ struct curl_hash hash;
+ size_t num_connections;
+ long next_connection_id;
+ struct timeval last_cleanup;
+};
+
+#define BUNDLE_NO_MULTIUSE -1
+#define BUNDLE_UNKNOWN 0 /* initial value */
+#define BUNDLE_PIPELINING 1
+#define BUNDLE_MULTIPLEX 2
+
+struct connectbundle {
+ int multiuse; /* supports multi-use */
+ size_t num_connections; /* Number of connections in the bundle */
+ struct curl_llist *conn_list; /* The connectdata members of the bundle */
+};
+
+int Curl_conncache_init(struct conncache *, int size);
+
+void Curl_conncache_destroy(struct conncache *connc);
+
+/* return the correct bundle, to a host or a proxy */
+struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn,
+ struct conncache *connc);
+
+CURLcode Curl_conncache_add_conn(struct conncache *connc,
+ struct connectdata *conn);
+
+void Curl_conncache_remove_conn(struct conncache *connc,
+ struct connectdata *conn);
+
+void Curl_conncache_foreach(struct conncache *connc,
+ void *param,
+ int (*func)(struct connectdata *conn,
+ void *param));
+
+struct connectdata *
+Curl_conncache_find_first_connection(struct conncache *connc);
+
+void Curl_conncache_print(struct conncache *connc);
+
+#endif /* HEADER_CURL_CONNCACHE_H */
diff --git a/lib/connect.c b/lib/connect.c
index e178633d..7202fa63 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +20,8 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h> /* <netinet/tcp.h> may need it */
#endif
@@ -40,9 +34,6 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
@@ -52,9 +43,6 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
#if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE))
#include <sys/filio.h>
@@ -68,29 +56,26 @@
#include <inet.h>
#endif
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
#include "urldata.h"
#include "sendf.h"
#include "if2ip.h"
#include "strerror.h"
#include "connect.h"
-#include "curl_memory.h"
#include "select.h"
#include "url.h" /* for Curl_safefree() */
#include "multiif.h"
#include "sockaddr.h" /* required for Curl_sockaddr_storage */
#include "inet_ntop.h"
#include "inet_pton.h"
-#include "sslgen.h" /* for Curl_ssl_check_cxn() */
+#include "vtls/vtls.h" /* for Curl_ssl_check_cxn() */
#include "progress.h"
+#include "warnless.h"
+#include "conncache.h"
+#include "multihandle.h"
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
#ifdef __SYMBIAN32__
@@ -98,41 +83,105 @@
#undef SO_NOSIGPIPE
#endif
-struct Curl_sockaddr_ex {
- int family;
- int socktype;
- int protocol;
- unsigned int addrlen;
- union {
- struct sockaddr addr;
- struct Curl_sockaddr_storage buff;
- } _sa_ex_u;
+static bool verifyconnect(curl_socket_t sockfd, int *error);
+
+#if defined(__DragonFly__) || defined(HAVE_WINSOCK_H)
+/* DragonFlyBSD and Windows use millisecond units */
+#define KEEPALIVE_FACTOR(x) (x *= 1000)
+#else
+#define KEEPALIVE_FACTOR(x)
+#endif
+
+#if defined(HAVE_WINSOCK2_H) && !defined(SIO_KEEPALIVE_VALS)
+#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)
+
+struct tcp_keepalive {
+ u_long onoff;
+ u_long keepalivetime;
+ u_long keepaliveinterval;
};
-#define sa_addr _sa_ex_u.addr
+#endif
-static bool verifyconnect(curl_socket_t sockfd, int *error);
+static void
+tcpkeepalive(struct SessionHandle *data,
+ curl_socket_t sockfd)
+{
+ int optval = data->set.tcp_keepalive?1:0;
+
+ /* only set IDLE and INTVL if setting KEEPALIVE is successful */
+ if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE,
+ (void *)&optval, sizeof(optval)) < 0) {
+ infof(data, "Failed to set SO_KEEPALIVE on fd %d\n", sockfd);
+ }
+ else {
+#if defined(SIO_KEEPALIVE_VALS)
+ struct tcp_keepalive vals;
+ DWORD dummy;
+ vals.onoff = 1;
+ optval = curlx_sltosi(data->set.tcp_keepidle);
+ KEEPALIVE_FACTOR(optval);
+ vals.keepalivetime = optval;
+ optval = curlx_sltosi(data->set.tcp_keepintvl);
+ KEEPALIVE_FACTOR(optval);
+ vals.keepaliveinterval = optval;
+ if(WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, (LPVOID) &vals, sizeof(vals),
+ NULL, 0, &dummy, NULL, NULL) != 0) {
+ infof(data, "Failed to set SIO_KEEPALIVE_VALS on fd %d: %d\n",
+ (int)sockfd, WSAGetLastError());
+ }
+#else
+#ifdef TCP_KEEPIDLE
+ optval = curlx_sltosi(data->set.tcp_keepidle);
+ KEEPALIVE_FACTOR(optval);
+ if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
+ (void *)&optval, sizeof(optval)) < 0) {
+ infof(data, "Failed to set TCP_KEEPIDLE on fd %d\n", sockfd);
+ }
+#endif
+#ifdef TCP_KEEPINTVL
+ optval = curlx_sltosi(data->set.tcp_keepintvl);
+ KEEPALIVE_FACTOR(optval);
+ if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
+ (void *)&optval, sizeof(optval)) < 0) {
+ infof(data, "Failed to set TCP_KEEPINTVL on fd %d\n", sockfd);
+ }
+#endif
+#ifdef TCP_KEEPALIVE
+ /* Mac OS X style */
+ optval = curlx_sltosi(data->set.tcp_keepidle);
+ KEEPALIVE_FACTOR(optval);
+ if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE,
+ (void *)&optval, sizeof(optval)) < 0) {
+ infof(data, "Failed to set TCP_KEEPALIVE on fd %d\n", sockfd);
+ }
+#endif
+#endif
+ }
+}
static CURLcode
singleipconnect(struct connectdata *conn,
const Curl_addrinfo *ai, /* start connecting to this */
- long timeout_ms,
- curl_socket_t *sock,
- bool *connected);
+ curl_socket_t *sock);
/*
* Curl_timeleft() returns the amount of milliseconds left allowed for the
* transfer/connection. If the value is negative, the timeout time has already
* elapsed.
*
+ * The start time is stored in progress.t_startsingle - as set with
+ * Curl_pgrsTime(..., TIMER_STARTSINGLE);
+ *
* If 'nowp' is non-NULL, it points to the current time.
* 'duringconnect' is FALSE if not during a connect, as then of course the
* connect timeout is not taken into account!
+ *
+ * @unittest: 1303
*/
-long Curl_timeleft(struct connectdata *conn,
+long Curl_timeleft(struct SessionHandle *data,
struct timeval *nowp,
bool duringconnect)
{
- struct SessionHandle *data = conn->data;
int timeout_set = 0;
long timeout_ms = duringconnect?DEFAULT_CONNECT_TIMEOUT:0;
struct timeval now;
@@ -172,8 +221,13 @@ long Curl_timeleft(struct connectdata *conn,
nowp = &now;
}
- /* substract elapsed time */
- timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startsingle);
+ /* subtract elapsed time */
+ if(duringconnect)
+ /* since this most recent connect started */
+ timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startsingle);
+ else
+ /* since the entire operation started */
+ timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startop);
if(!timeout_ms)
/* avoid returning 0 as that means no timeout! */
return -1;
@@ -181,62 +235,8 @@ long Curl_timeleft(struct connectdata *conn,
return timeout_ms;
}
-/*
- * waitconnect() waits for a TCP connect on the given socket for the specified
- * number if milliseconds. It returns:
- */
-
-#define WAITCONN_CONNECTED 0
-#define WAITCONN_SELECT_ERROR -1
-#define WAITCONN_TIMEOUT 1
-#define WAITCONN_FDSET_ERROR 2
-#define WAITCONN_ABORTED 3
-
-static
-int waitconnect(struct connectdata *conn,
- curl_socket_t sockfd, /* socket */
- long timeout_msec)
-{
- int rc;
-#ifdef mpeix
- /* Call this function once now, and ignore the results. We do this to
- "clear" the error state on the socket so that we can later read it
- reliably. This is reported necessary on the MPE/iX operating system. */
- (void)verifyconnect(sockfd, NULL);
-#endif
-
- for(;;) {
-
- /* now select() until we get connect or timeout */
- rc = Curl_socket_ready(CURL_SOCKET_BAD, sockfd, (int)(timeout_msec>1000?
- 1000:timeout_msec));
- if(Curl_pgrsUpdate(conn))
- return WAITCONN_ABORTED;
-
- if(-1 == rc)
- /* error, no connect here, try next */
- return WAITCONN_SELECT_ERROR;
-
- else if(0 == rc) {
- /* timeout */
- timeout_msec -= 1000;
- if(timeout_msec <= 0)
- return WAITCONN_TIMEOUT;
-
- continue;
- }
-
- if(rc & CURL_CSELECT_ERR)
- /* error condition caught */
- return WAITCONN_FDSET_ERROR;
-
- break;
- }
- return WAITCONN_CONNECTED;
-}
-
static CURLcode bindlocal(struct connectdata *conn,
- curl_socket_t sockfd, int af)
+ curl_socket_t sockfd, int af, unsigned int scope)
{
struct SessionHandle *data = conn->data;
@@ -255,53 +255,83 @@ 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 */
/*************************************************************
* Select device to bind socket to
*************************************************************/
- if ( !dev && !port )
+ if(!dev && !port)
/* no local kind of binding was requested */
return CURLE_OK;
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;
+ }
+ else if(strncmp(host_prefix, dev, strlen(host_prefix)) == 0) {
+ dev += strlen(host_prefix);
+ is_host = TRUE;
+ }
/* interface */
- if(Curl_if2ip(af, dev, myhost, sizeof(myhost))) {
- /*
- * We now have the numerical IP address in the 'myhost' buffer
- */
- infof(data, "Local Interface %s is ip %s using address family %i\n",
- dev, myhost, af);
- done = 1;
+ if(!is_host) {
+ switch(Curl_if2ip(af, scope, conn->scope_id, dev,
+ myhost, sizeof(myhost))) {
+ case IF2IP_NOT_FOUND:
+ if(is_interface) {
+ /* Do not fall back to treating it as a host name */
+ failf(data, "Couldn't bind to interface '%s'", dev);
+ return CURLE_INTERFACE_FAILED;
+ }
+ break;
+ case IF2IP_AF_NOT_SUPPORTED:
+ /* Signal the caller to try another address family if available */
+ return CURLE_UNSUPPORTED_PROTOCOL;
+ case IF2IP_FOUND:
+ is_interface = TRUE;
+ /*
+ * We now have the numerical IP address in the 'myhost' buffer
+ */
+ infof(data, "Local Interface %s is ip %s using address family %i\n",
+ dev, myhost, af);
+ done = 1;
#ifdef SO_BINDTODEVICE
- /* I am not sure any other OSs than Linux that provide this feature, and
- * at the least I cannot test. --Ben
- *
- * This feature allows one to tightly bind the local socket to a
- * particular interface. This will force even requests to other local
- * interfaces to go out the external interface.
- *
- *
- * Only bind to the interface when specified as interface, not just as a
- * hostname or ip address.
- */
- if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
- dev, (curl_socklen_t)strlen(dev)+1) != 0) {
- error = SOCKERRNO;
- infof(data, "SO_BINDTODEVICE %s failed with errno %d: %s;"
- " will do regular bind\n",
- dev, error, Curl_strerror(conn, error));
- /* This is typically "errno 1, error: Operation not permitted" if
- you're not running as root or another suitable privileged user */
- }
+ /* I am not sure any other OSs than Linux that provide this feature,
+ * and at the least I cannot test. --Ben
+ *
+ * This feature allows one to tightly bind the local socket to a
+ * particular interface. This will force even requests to other
+ * local interfaces to go out the external interface.
+ *
+ *
+ * Only bind to the interface when specified as interface, not just
+ * as a hostname or ip address.
+ */
+ if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
+ dev, (curl_socklen_t)strlen(dev)+1) != 0) {
+ error = SOCKERRNO;
+ infof(data, "SO_BINDTODEVICE %s failed with errno %d: %s;"
+ " will do regular bind\n",
+ dev, error, Curl_strerror(conn, error));
+ /* This is typically "errno 1, error: Operation not permitted" if
+ you're not running as root or another suitable privileged
+ user */
+ }
#endif
+ break;
+ }
}
- else {
+ if(!is_interface) {
/*
* This was not an interface, resolve the name as a host name
* or IP number
@@ -310,20 +340,20 @@ static CURLcode bindlocal(struct connectdata *conn,
* of the connection. The resolve functions should really be changed
* to take a type parameter instead.
*/
- long ipver = data->set.ip_version;
+ long ipver = conn->ip_version;
int rc;
- if (af == AF_INET)
- data->set.ip_version = CURL_IPRESOLVE_V4;
+ if(af == AF_INET)
+ conn->ip_version = CURL_IPRESOLVE_V4;
#ifdef ENABLE_IPV6
- else if (af == AF_INET6)
- data->set.ip_version = CURL_IPRESOLVE_V6;
+ else if(af == AF_INET6)
+ conn->ip_version = CURL_IPRESOLVE_V6;
#endif
rc = Curl_resolv(conn, dev, 0, &h);
if(rc == CURLRESOLV_PENDING)
- (void)Curl_wait_for_resolv(conn, &h);
- data->set.ip_version = ipver;
+ (void)Curl_resolver_wait_resolv(conn, &h);
+ conn->ip_version = ipver;
if(h) {
/* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */
@@ -344,16 +374,30 @@ static CURLcode bindlocal(struct connectdata *conn,
if(done > 0) {
#ifdef ENABLE_IPV6
- /* ipv6 address */
- if((af == AF_INET6) &&
- (Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0)) {
- si6->sin6_family = AF_INET6;
- si6->sin6_port = htons(port);
+ /* IPv6 address */
+ if(af == AF_INET6) {
+#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
+ char *scope_ptr = strchr(myhost, '%');
+ if(scope_ptr)
+ *(scope_ptr++) = 0;
+#endif
+ if(Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) {
+ si6->sin6_family = AF_INET6;
+ si6->sin6_port = htons(port);
+#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
+ if(scope_ptr)
+ /* The "myhost" string either comes from Curl_if2ip or from
+ Curl_printable_address. The latter returns only numeric scope
+ IDs and the former returns none at all. So the scope ID, if
+ present, is known to be numeric */
+ si6->sin6_scope_id = atoi(scope_ptr);
+#endif
+ }
sizeof_sa = sizeof(struct sockaddr_in6);
}
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;
@@ -370,14 +414,14 @@ static CURLcode bindlocal(struct connectdata *conn,
else {
/* no device was given, prepare sa to match af's needs */
#ifdef ENABLE_IPV6
- if ( af == AF_INET6 ) {
+ if(af == AF_INET6) {
si6->sin6_family = AF_INET6;
si6->sin6_port = htons(port);
sizeof_sa = sizeof(struct sockaddr_in6);
}
else
#endif
- if ( af == AF_INET ) {
+ if(af == AF_INET) {
si4->sin_family = AF_INET;
si4->sin_port = htons(port);
sizeof_sa = sizeof(struct sockaddr_in);
@@ -385,8 +429,8 @@ static CURLcode bindlocal(struct connectdata *conn,
}
for(;;) {
- if( bind(sockfd, sock, sizeof_sa) >= 0) {
- /* we succeeded to bind */
+ if(bind(sockfd, sock, sizeof_sa) >= 0) {
+ /* we succeeded to bind */
struct Curl_sockaddr_storage add;
curl_socklen_t size = sizeof(add);
memset(&add, 0, sizeof(struct Curl_sockaddr_storage));
@@ -494,42 +538,70 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
more address exists or error */
static CURLcode trynextip(struct connectdata *conn,
int sockindex,
- bool *connected)
+ int tempindex)
{
- curl_socket_t sockfd;
- Curl_addrinfo *ai;
+ const int other = tempindex ^ 1;
+ CURLcode result = 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
file descriptor, which can prevent bugs when the curl_multi_socket_action
interface is used with certain select() replacements such as kqueue. */
- curl_socket_t fd_to_close = conn->sock[sockindex];
- conn->sock[sockindex] = CURL_SOCKET_BAD;
- *connected = FALSE;
+ curl_socket_t fd_to_close = conn->tempsock[tempindex];
+ conn->tempsock[tempindex] = CURL_SOCKET_BAD;
- if(sockindex != FIRSTSOCKET) {
- sclose(fd_to_close);
- return CURLE_COULDNT_CONNECT; /* no next */
- }
+ if(sockindex == FIRSTSOCKET) {
+ Curl_addrinfo *ai = NULL;
+ int family = AF_UNSPEC;
- /* try the next address */
- ai = conn->ip_addr->ai_next;
-
- while(ai) {
- CURLcode res = singleipconnect(conn, ai, 0L, &sockfd, connected);
- if(res)
- return res;
- if(sockfd != CURL_SOCKET_BAD) {
- /* store the new socket descriptor */
- conn->sock[sockindex] = sockfd;
- conn->ip_addr = ai;
- sclose(fd_to_close);
- return CURLE_OK;
+ if(conn->tempaddr[tempindex]) {
+ /* find next address in the same protocol family */
+ family = conn->tempaddr[tempindex]->ai_family;
+ ai = conn->tempaddr[tempindex]->ai_next;
+ }
+#ifdef ENABLE_IPV6
+ else if(conn->tempaddr[0]) {
+ /* happy eyeballs - try the other protocol family */
+ int firstfamily = conn->tempaddr[0]->ai_family;
+ family = (firstfamily == AF_INET) ? AF_INET6 : AF_INET;
+ ai = conn->tempaddr[0]->ai_next;
+ }
+#endif
+
+ while(ai) {
+ if(conn->tempaddr[other]) {
+ /* we can safely skip addresses of the other protocol family */
+ while(ai && ai->ai_family != family)
+ ai = ai->ai_next;
+ }
+
+ if(ai) {
+ result = singleipconnect(conn, ai, &conn->tempsock[tempindex]);
+ if(result == CURLE_COULDNT_CONNECT) {
+ ai = ai->ai_next;
+ continue;
+ }
+
+ conn->tempaddr[tempindex] = ai;
+ }
+ break;
}
- ai = ai->ai_next;
}
- sclose(fd_to_close);
- return CURLE_COULDNT_CONNECT;
+
+ if(fd_to_close != CURL_SOCKET_BAD)
+ Curl_closesocket(conn, fd_to_close);
+
+ return result;
+}
+
+/* Copies connection info into the session handle to make it available
+ when the session handle is no longer associated with a connection. */
+void Curl_persistconninfo(struct connectdata *conn)
+{
+ memcpy(conn->data->info.conn_primary_ip, conn->primary_ip, MAX_IPADR_LEN);
+ memcpy(conn->data->info.conn_local_ip, conn->local_ip, MAX_IPADR_LEN);
+ conn->data->info.conn_primary_port = conn->primary_port;
+ conn->data->info.conn_local_port = conn->local_port;
}
/* retrieves ip address and port from a sockaddr structure */
@@ -541,109 +613,134 @@ static bool getaddressinfo(struct sockaddr* sa, char* addr,
#ifdef ENABLE_IPV6
struct sockaddr_in6* si6 = NULL;
#endif
+#if defined(HAVE_SYS_UN_H) && defined(AF_UNIX)
+ struct sockaddr_un* su = NULL;
+#endif
switch (sa->sa_family) {
case AF_INET:
si = (struct sockaddr_in*) sa;
if(Curl_inet_ntop(sa->sa_family, &si->sin_addr,
- addr, MAX_IPADR_LEN) == NULL)
- return FALSE;
- us_port = ntohs(si->sin_port);
- *port = us_port;
+ addr, MAX_IPADR_LEN)) {
+ us_port = ntohs(si->sin_port);
+ *port = us_port;
+ return TRUE;
+ }
break;
#ifdef ENABLE_IPV6
case AF_INET6:
si6 = (struct sockaddr_in6*)sa;
if(Curl_inet_ntop(sa->sa_family, &si6->sin6_addr,
- addr, MAX_IPADR_LEN) == NULL)
- return FALSE;
- us_port = ntohs(si6->sin6_port);
- *port = us_port;
+ addr, MAX_IPADR_LEN)) {
+ us_port = ntohs(si6->sin6_port);
+ *port = us_port;
+ return TRUE;
+ }
break;
#endif
- default:
- addr[0] = '\0';
+#if defined(HAVE_SYS_UN_H) && defined(AF_UNIX)
+ case AF_UNIX:
+ su = (struct sockaddr_un*)sa;
+ snprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
*port = 0;
+ return TRUE;
+#endif
+ default:
+ break;
}
- return TRUE;
+
+ addr[0] = '\0';
+ *port = 0;
+
+ return FALSE;
}
/* retrieves the start/end point information of a socket of an established
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;
struct SessionHandle *data = conn->data;
- struct PureInfo *info = &conn->data->info;
- if(conn->bits.reuse)
- /* reusing same connection */
+ if(conn->socktype == SOCK_DGRAM)
+ /* there's no connection! */
return;
- len = sizeof(struct Curl_sockaddr_storage);
- if(getpeername(sockfd, (struct sockaddr*) &ssrem, &len)) {
- error = SOCKERRNO;
- failf(data, "getpeername() failed with errno %d: %s",
- error, Curl_strerror(conn, error));
- return;
- }
+ if(!conn->bits.reuse) {
+ int error;
- len = sizeof(struct Curl_sockaddr_storage);
- if(getsockname(sockfd, (struct sockaddr*) &ssloc, &len)) {
- error = SOCKERRNO;
- failf(data, "getsockname() failed with errno %d: %s",
- error, Curl_strerror(conn, error));
- return;
- }
+ len = sizeof(struct Curl_sockaddr_storage);
+ if(getpeername(sockfd, (struct sockaddr*) &ssrem, &len)) {
+ error = SOCKERRNO;
+ failf(data, "getpeername() failed with errno %d: %s",
+ error, Curl_strerror(conn, error));
+ return;
+ }
- if(!getaddressinfo((struct sockaddr*)&ssrem,
- info->ip, &info->port)) {
- error = ERRNO;
- failf(data, "ssrem inet_ntop() failed with errno %d: %s",
- error, Curl_strerror(conn, error));
- return;
- }
+ 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",
+ error, Curl_strerror(conn, error));
+ return;
+ }
+
+ if(!getaddressinfo((struct sockaddr*)&ssrem,
+ conn->primary_ip, &conn->primary_port)) {
+ error = ERRNO;
+ failf(data, "ssrem inet_ntop() failed with errno %d: %s",
+ error, Curl_strerror(conn, error));
+ return;
+ }
+ memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN);
+
+ if(!getaddressinfo((struct sockaddr*)&ssloc,
+ conn->local_ip, &conn->local_port)) {
+ error = ERRNO;
+ failf(data, "ssloc inet_ntop() failed with errno %d: %s",
+ error, Curl_strerror(conn, error));
+ return;
+ }
- if(!getaddressinfo((struct sockaddr*)&ssloc,
- info->localip, &info->localport)) {
- error = ERRNO;
- failf(data, "ssloc inet_ntop() failed with errno %d: %s",
- error, Curl_strerror(conn, error));
- return;
}
+
+ /* persist connection info in session handle */
+ Curl_persistconninfo(conn);
}
/*
- * Curl_is_connected() is used from the multi interface to check if the
- * firstsocket has connected.
+ * Curl_is_connected() checks if the socket has connected.
*/
CURLcode Curl_is_connected(struct connectdata *conn,
int sockindex,
bool *connected)
{
- int rc;
struct SessionHandle *data = conn->data;
- CURLcode code = CURLE_OK;
- curl_socket_t sockfd = conn->sock[sockindex];
- long allow = DEFAULT_CONNECT_TIMEOUT;
+ CURLcode result = CURLE_OK;
+ long allow;
int error = 0;
+ struct timeval now;
+ int rc;
+ int i;
DEBUGASSERT(sockindex >= FIRSTSOCKET && sockindex <= SECONDARYSOCKET);
*connected = FALSE; /* a very negative world view is best */
- if(conn->bits.tcpconnect) {
+ if(conn->bits.tcpconnect[sockindex]) {
/* we are connected already! */
*connected = TRUE;
return CURLE_OK;
}
+ now = Curl_tvnow();
+
/* figure out how long time we have left to connect */
- allow = Curl_timeleft(conn, NULL, TRUE);
+ allow = Curl_timeleft(data, &now, TRUE);
if(allow < 0) {
/* time-out, bail out, go home */
@@ -651,54 +748,113 @@ CURLcode Curl_is_connected(struct connectdata *conn,
return CURLE_OPERATION_TIMEDOUT;
}
- /* check for connect without timeout as we want to return immediately */
- rc = waitconnect(conn, sockfd, 0);
- if(WAITCONN_TIMEOUT == rc)
- /* not an error, but also no connection yet */
- return code;
-
- if(WAITCONN_CONNECTED == rc) {
- if(verifyconnect(sockfd, &error)) {
- /* we are connected, awesome! */
- conn->bits.tcpconnect = TRUE;
- *connected = TRUE;
- Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */
- Curl_verboseconnect(conn);
- Curl_updateconninfo(conn, sockfd);
+ for(i=0; i<2; i++) {
+ const int other = i ^ 1;
+ if(conn->tempsock[i] == CURL_SOCKET_BAD)
+ continue;
- return CURLE_OK;
+#ifdef mpeix
+ /* Call this function once now, and ignore the results. We do this to
+ "clear" the error state on the socket so that we can later read it
+ reliably. This is reported necessary on the MPE/iX operating system. */
+ (void)verifyconnect(conn->tempsock[i], NULL);
+#endif
+
+ /* check socket for connect */
+ rc = Curl_socket_ready(CURL_SOCKET_BAD, conn->tempsock[i], 0);
+
+ if(rc == 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);
+ error = ETIMEDOUT;
+ }
+
+ /* should we try another protocol family? */
+ if(i == 0 && conn->tempaddr[1] == NULL &&
+ curlx_tvdiff(now, conn->connecttime) >= HAPPY_EYEBALLS_TIMEOUT) {
+ trynextip(conn, sockindex, 1);
+ }
}
- /* nope, not connected for real */
- }
- else {
- /* nope, not connected */
- if(WAITCONN_FDSET_ERROR == rc) {
- (void)verifyconnect(sockfd, &error);
- infof(data, "%s\n",Curl_strerror(conn, error));
+ else if(rc == CURL_CSELECT_OUT) {
+ if(verifyconnect(conn->tempsock[i], &error)) {
+ /* we are connected with TCP, awesome! */
+
+ /* use this socket from now on */
+ conn->sock[sockindex] = conn->tempsock[i];
+ conn->ip_addr = conn->tempaddr[i];
+ conn->tempsock[i] = CURL_SOCKET_BAD;
+
+ /* close the other socket, if open */
+ if(conn->tempsock[other] != CURL_SOCKET_BAD) {
+ Curl_closesocket(conn, conn->tempsock[other]);
+ conn->tempsock[other] = CURL_SOCKET_BAD;
+ }
+
+ /* see if we need to do any proxy magic first once we connected */
+ result = Curl_connected_proxy(conn, sockindex);
+ if(result)
+ return result;
+
+ conn->bits.tcpconnect[sockindex] = TRUE;
+
+ *connected = TRUE;
+ if(sockindex == FIRSTSOCKET)
+ Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */
+ Curl_updateconninfo(conn, conn->sock[sockindex]);
+ Curl_verboseconnect(conn);
+
+ return CURLE_OK;
+ }
+ else
+ infof(data, "Connection failed\n");
}
- else
- infof(data, "Connection failed\n");
- }
+ else if(rc & CURL_CSELECT_ERR)
+ (void)verifyconnect(conn->tempsock[i], &error);
- /*
- * The connection failed here, we should attempt to connect to the "next
- * address" for the given host. But first remember the latest error.
- */
- if(error) {
- data->state.os_errno = error;
- SET_SOCKERRNO(error);
+ /*
+ * The connection failed here, we should attempt to connect to the "next
+ * address" for the given host. But first remember the latest error.
+ */
+ if(error) {
+ data->state.os_errno = error;
+ SET_SOCKERRNO(error);
+ if(conn->tempaddr[i]) {
+ CURLcode status;
+ 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));
+
+ conn->timeoutms_per_addr = conn->tempaddr[i]->ai_next == NULL ?
+ allow : allow / 2;
+
+ status = trynextip(conn, sockindex, i);
+ if(status != CURLE_COULDNT_CONNECT
+ || conn->tempsock[other] == CURL_SOCKET_BAD)
+ /* the last attempt failed and no other sockets remain open */
+ result = status;
+ }
+ }
}
- code = trynextip(conn, sockindex, connected);
+ if(result) {
+ /* 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;
+ }
- if(code) {
- error = SOCKERRNO;
- data->state.os_errno = error;
- failf(data, "Failed connect to %s:%ld; %s",
- conn->host.name, conn->port, Curl_strerror(conn, error));
+ failf(data, "Failed to connect to %s port %ld: %s",
+ conn->bits.proxy?conn->proxy.name:conn->host.name,
+ conn->port, Curl_strerror(conn, error));
}
- return code;
+ return result;
}
static void tcpnodelay(struct connectdata *conn,
@@ -707,7 +863,7 @@ static void tcpnodelay(struct connectdata *conn,
#ifdef TCP_NODELAY
struct SessionHandle *data= conn->data;
curl_socklen_t onoff = (curl_socklen_t) data->set.tcp_nodelay;
- int proto = IPPROTO_TCP;
+ int level = IPPROTO_TCP;
#if 0
/* The use of getprotobyname() is disabled since it isn't thread-safe on
@@ -719,15 +875,15 @@ static void tcpnodelay(struct connectdata *conn,
detected. */
struct protoent *pe = getprotobyname("tcp");
if(pe)
- proto = pe->p_proto;
+ level = pe->p_proto;
#endif
- if(setsockopt(sockfd, proto, TCP_NODELAY, (void *)&onoff,
+ if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff,
sizeof(onoff)) < 0)
infof(data, "Could not set TCP_NODELAY: %s\n",
Curl_strerror(conn, SOCKERRNO));
else
- infof(data,"TCP_NODELAY set\n");
+ infof(data, "TCP_NODELAY set\n");
#else
(void)conn;
(void)sockfd;
@@ -750,10 +906,10 @@ static void nosigpipe(struct connectdata *conn,
Curl_strerror(conn, SOCKERRNO));
}
#else
-#define nosigpipe(x,y)
+#define nosigpipe(x,y) Curl_nop_stmt
#endif
-#ifdef WIN32
+#ifdef USE_WINSOCK
/* When you run a program that uses the Windows Sockets API, you may
experience slow performance when you copy data to a TCP server.
@@ -762,22 +918,64 @@ static void nosigpipe(struct connectdata *conn,
Work-around: Make the Socket Send Buffer Size Larger Than the Program Send
Buffer Size
+ The problem described in this knowledge-base is applied only to pre-Vista
+ Windows. Following function trying to detect OS version and skips
+ SO_SNDBUF adjustment for Windows Vista and above.
*/
+#define DETECT_OS_NONE 0
+#define DETECT_OS_PREVISTA 1
+#define DETECT_OS_VISTA_OR_LATER 2
+
void Curl_sndbufset(curl_socket_t sockfd)
{
int val = CURL_MAX_WRITE_SIZE + 32;
int curval = 0;
int curlen = sizeof(curval);
+ DWORD majorVersion = 6;
- if (getsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (char *)&curval, &curlen) == 0)
- if (curval > val)
+ static int detectOsState = DETECT_OS_NONE;
+
+ if(detectOsState == DETECT_OS_NONE) {
+#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_WIN2K) || \
+ (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
+ OSVERSIONINFO osver;
+
+ memset(&osver, 0, sizeof(osver));
+ osver.dwOSVersionInfoSize = sizeof(osver);
+
+ detectOsState = DETECT_OS_PREVISTA;
+ if(GetVersionEx(&osver)) {
+ if(osver.dwMajorVersion >= majorVersion)
+ detectOsState = DETECT_OS_VISTA_OR_LATER;
+ }
+#else
+ ULONGLONG majorVersionMask;
+ OSVERSIONINFOEX osver;
+
+ memset(&osver, 0, sizeof(osver));
+ osver.dwOSVersionInfoSize = sizeof(osver);
+ osver.dwMajorVersion = majorVersion;
+ majorVersionMask = VerSetConditionMask(0, VER_MAJORVERSION,
+ VER_GREATER_EQUAL);
+
+ if(VerifyVersionInfo(&osver, VER_MAJORVERSION, majorVersionMask))
+ detectOsState = DETECT_OS_VISTA_OR_LATER;
+ else
+ detectOsState = DETECT_OS_PREVISTA;
+#endif
+ }
+
+ if(detectOsState == DETECT_OS_VISTA_OR_LATER)
+ return;
+
+ if(getsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (char *)&curval, &curlen) == 0)
+ if(curval > val)
return;
setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (const char *)&val, sizeof(val));
}
#endif
-
/*
* singleipconnect()
*
@@ -785,146 +983,117 @@ void Curl_sndbufset(curl_socket_t sockfd)
* CURL_SOCKET_BAD. Other errors will however return proper errors.
*
* singleipconnect() connects to the given IP only, and it may return without
- * having connected if used from the multi interface.
+ * having connected.
*/
-static CURLcode
-singleipconnect(struct connectdata *conn,
- const Curl_addrinfo *ai,
- long timeout_ms,
- curl_socket_t *sockp,
- bool *connected)
+static CURLcode singleipconnect(struct connectdata *conn,
+ const Curl_addrinfo *ai,
+ curl_socket_t *sockp)
{
struct Curl_sockaddr_ex addr;
- char addr_buf[128];
int rc;
- int error;
- bool isconnected;
+ int error = 0;
+ bool isconnected = FALSE;
struct SessionHandle *data = conn->data;
curl_socket_t sockfd;
- CURLcode res = CURLE_OK;
- const void *iptoprint;
- struct sockaddr_in * const sa4 = (void *)&addr.sa_addr;
-#ifdef ENABLE_IPV6
- struct sockaddr_in6 * const sa6 = (void *)&addr.sa_addr;
-#endif
+ CURLcode result;
+ char ipaddress[MAX_IPADR_LEN];
+ long port;
+ bool is_tcp;
*sockp = CURL_SOCKET_BAD;
- /*
- * The Curl_sockaddr_ex structure is basically libcurl's external API
- * curl_sockaddr structure with enough space available to directly hold
- * any protocol-specific address structures. The variable declared here
- * will be used to pass / receive data to/from the fopensocket callback
- * if this has been set, before that, it is initialized from parameters.
- */
-
- addr.family = ai->ai_family;
- addr.socktype = conn->socktype;
- addr.protocol = ai->ai_protocol;
- addr.addrlen = ai->ai_addrlen;
-
- if(addr.addrlen > sizeof(struct Curl_sockaddr_storage))
- addr.addrlen = sizeof(struct Curl_sockaddr_storage);
- memcpy(&addr.sa_addr, ai->ai_addr, addr.addrlen);
-
- *connected = FALSE; /* default is not connected */
-
- if(data->set.fopensocket)
- /*
- * If the opensocket callback is set, all the destination address
- * information is passed to the callback. Depending on this information the
- * callback may opt to abort the connection, this is indicated returning
- * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When
- * the callback returns a valid socket the destination address information
- * might have been changed and this 'new' address will actually be used
- * here to connect.
- */
- sockfd = data->set.fopensocket(data->set.opensocket_client,
- CURLSOCKTYPE_IPCXN,
- (struct curl_sockaddr *)&addr);
- else
- /* opensocket callback not set, so simply create the socket now */
- sockfd = socket(addr.family, addr.socktype, addr.protocol);
-
- if(sockfd == CURL_SOCKET_BAD)
- /* no socket, no connection */
+ result = Curl_socket(conn, ai, &addr, &sockfd);
+ if(result)
+ /* 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. */
return CURLE_OK;
-#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
- if (conn->scope && (addr.family == AF_INET6))
- sa6->sin6_scope_id = conn->scope;
-#endif
-
- /* FIXME: do we have Curl_printable_address-like with struct sockaddr* as
- argument? */
-#if defined(HAVE_SYS_UN_H) && defined(AF_UNIX)
- if(addr.family == AF_UNIX) {
- infof(data, " Trying %s... ",
- ((const struct sockaddr_un*)(&addr.sa_addr))->sun_path);
- snprintf(data->info.ip, MAX_IPADR_LEN, "%s",
- ((const struct sockaddr_un*)(&addr.sa_addr))->sun_path);
- strcpy(conn->ip_addr_str, data->info.ip);
+ /* store remote address and port used in this connection attempt */
+ if(!getaddressinfo((struct sockaddr*)&addr.sa_addr,
+ ipaddress, &port)) {
+ /* malformed address or bug in inet_ntop, try next address */
+ error = ERRNO;
+ failf(data, "sa_addr inet_ntop() failed with errno %d: %s",
+ error, Curl_strerror(conn, error));
+ Curl_closesocket(conn, sockfd);
+ return CURLE_OK;
}
- else
-#endif
- {
+ infof(data, " Trying %s...\n", ipaddress);
+
#ifdef ENABLE_IPV6
- if(addr.family == AF_INET6) {
- iptoprint = &sa6->sin6_addr;
- conn->bits.ipv6 = TRUE;
- }
- else
+ is_tcp = (addr.family == AF_INET || addr.family == AF_INET6) &&
+ addr.socktype == SOCK_STREAM;
+#else
+ is_tcp = (addr.family == AF_INET) && addr.socktype == SOCK_STREAM;
#endif
- {
- iptoprint = &sa4->sin_addr;
- }
-
- if(Curl_inet_ntop(addr.family, iptoprint, addr_buf,
- sizeof(addr_buf)) != NULL) {
- infof(data, " Trying %s... ", addr_buf);
- snprintf(data->info.ip, MAX_IPADR_LEN, "%s", addr_buf);
- strcpy(conn->ip_addr_str, data->info.ip);
- }
- }
-
- if(data->set.tcp_nodelay)
+ if(is_tcp && data->set.tcp_nodelay)
tcpnodelay(conn, sockfd);
nosigpipe(conn, sockfd);
Curl_sndbufset(sockfd);
+ if(is_tcp && data->set.tcp_keepalive)
+ tcpkeepalive(data, sockfd);
+
if(data->set.fsockopt) {
/* activate callback for setting socket options */
error = data->set.fsockopt(data->set.sockopt_client,
sockfd,
CURLSOCKTYPE_IPCXN);
- if(error) {
- sclose(sockfd); /* close the socket and bail out */
- return res;
+
+ if(error == CURL_SOCKOPT_ALREADY_CONNECTED)
+ isconnected = TRUE;
+ else if(error) {
+ Curl_closesocket(conn, sockfd); /* close the socket and bail out */
+ return CURLE_ABORTED_BY_CALLBACK;
}
}
/* possibly bind the local end to an IP, interface or port */
- res = bindlocal(conn, sockfd, addr.family);
- if(res) {
- sclose(sockfd); /* close socket and bail out */
- return res;
+ if(addr.family == AF_INET
+#ifdef ENABLE_IPV6
+ || addr.family == AF_INET6
+#endif
+ ) {
+ 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;
+ }
}
/* set socket non-blocking */
- curlx_nonblock(sockfd, TRUE);
+ (void)curlx_nonblock(sockfd, TRUE);
+
+ conn->connecttime = Curl_tvnow();
+ if(conn->num_addr > 1)
+ Curl_expire_latest(data, conn->timeoutms_per_addr);
/* Connect TCP sockets, bind UDP */
- if(conn->socktype == SOCK_STREAM)
+ if(!isconnected && (conn->socktype == SOCK_STREAM)) {
rc = connect(sockfd, &addr.sa_addr, addr.addrlen);
- else
- rc = 0;
+ if(-1 == rc)
+ error = SOCKERRNO;
+ }
+ else {
+ *sockp = sockfd;
+ return CURLE_OK;
+ }
- if(-1 == rc) {
- error = SOCKERRNO;
+#ifdef ENABLE_IPV6
+ conn->bits.ipv6 = (addr.family == AF_INET6)?TRUE:FALSE;
+#endif
- switch (error) {
+ if(-1 == rc) {
+ switch(error) {
case EINPROGRESS:
case EWOULDBLOCK:
#if defined(EAGAIN)
@@ -936,51 +1105,25 @@ singleipconnect(struct connectdata *conn,
case EAGAIN:
#endif
#endif
- rc = waitconnect(conn, sockfd, timeout_ms);
- if(WAITCONN_ABORTED == rc) {
- sclose(sockfd);
- return CURLE_ABORTED_BY_CALLBACK;
- }
+ result = CURLE_OK;
break;
+
default:
/* unknown error, fallthrough and try another address! */
- failf(data, "Failed to connect to %s: %s",
- addr_buf, Curl_strerror(conn,error));
+ infof(data, "Immediate connect fail for %s: %s\n",
+ ipaddress, Curl_strerror(conn, error));
data->state.os_errno = error;
- break;
- }
- }
- /* The 'WAITCONN_TIMEOUT == rc' comes from the waitconnect(), and not from
- connect(). We can be sure of this since connect() cannot return 1. */
- if((WAITCONN_TIMEOUT == rc) &&
- (data->state.used_interface == Curl_if_multi)) {
- /* Timeout when running the multi interface */
- *sockp = sockfd;
- return CURLE_OK;
+ /* connect failed */
+ Curl_closesocket(conn, sockfd);
+ result = CURLE_COULDNT_CONNECT;
+ }
}
- isconnected = verifyconnect(sockfd, &error);
-
- if(!rc && isconnected) {
- /* we are connected, awesome! */
- *connected = TRUE; /* this is a true connect */
- infof(data, "connected\n");
- Curl_updateconninfo(conn, sockfd);
+ if(!result)
*sockp = sockfd;
- return CURLE_OK;
- }
- else if(WAITCONN_TIMEOUT == rc)
- infof(data, "Timeout\n");
- else {
- data->state.os_errno = error;
- infof(data, "%s\n", Curl_strerror(conn, error));
- }
- /* connect failed or timed out */
- sclose(sockfd);
-
- return CURLE_OK;
+ return result;
}
/*
@@ -990,32 +1133,13 @@ singleipconnect(struct connectdata *conn,
*/
CURLcode Curl_connecthost(struct connectdata *conn, /* context */
- const struct Curl_dns_entry *remotehost,
- curl_socket_t *sockconn, /* the connected socket */
- Curl_addrinfo **addr, /* the one we used */
- bool *connected) /* really connected? */
+ const struct Curl_dns_entry *remotehost)
{
struct SessionHandle *data = conn->data;
- curl_socket_t sockfd = CURL_SOCKET_BAD;
- int aliasindex;
- int num_addr;
- Curl_addrinfo *ai;
- Curl_addrinfo *curr_addr;
-
- struct timeval after;
struct timeval before = Curl_tvnow();
+ CURLcode result = CURLE_COULDNT_CONNECT;
- /*************************************************************
- * Figure out what maximum time we have left
- *************************************************************/
- long timeout_ms;
- long timeout_per_addr;
-
- DEBUGASSERT(sockconn);
- *connected = FALSE; /* default to not connected */
-
- /* get the timeout left */
- timeout_ms = Curl_timeleft(conn, &before, TRUE);
+ long timeout_ms = Curl_timeleft(data, &before, TRUE);
if(timeout_ms < 0) {
/* a precaution, no need to continue if time already is up */
@@ -1023,65 +1147,51 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
return CURLE_OPERATION_TIMEDOUT;
}
- /* Max time for each address */
- num_addr = Curl_num_addresses(remotehost->addr);
- timeout_per_addr = timeout_ms / num_addr;
-
- ai = remotehost->addr;
-
- /* Below is the loop that attempts to connect to all IP-addresses we
- * know for the given host. One by one until one IP succeeds.
- */
-
- if(data->state.used_interface == Curl_if_multi)
- /* don't hang when doing multi */
- timeout_per_addr = 0;
-
- /*
- * Connecting with a Curl_addrinfo chain
- */
- for (curr_addr = ai, aliasindex=0; curr_addr;
- curr_addr = curr_addr->ai_next, aliasindex++) {
-
- /* start connecting to the IP curr_addr points to */
- CURLcode res =
- singleipconnect(conn, curr_addr, timeout_per_addr, &sockfd, connected);
-
- if(res)
- return res;
-
- if(sockfd != CURL_SOCKET_BAD)
+ conn->num_addr = Curl_num_addresses(remotehost->addr);
+ conn->tempaddr[0] = remotehost->addr;
+ conn->tempaddr[1] = NULL;
+ conn->tempsock[0] = CURL_SOCKET_BAD;
+ conn->tempsock[1] = CURL_SOCKET_BAD;
+ Curl_expire(conn->data, HAPPY_EYEBALLS_TIMEOUT);
+
+ /* Max time for the next connection attempt */
+ conn->timeoutms_per_addr =
+ conn->tempaddr[0]->ai_next == NULL ? timeout_ms : timeout_ms / 2;
+
+ /* start connecting to first IP */
+ while(conn->tempaddr[0]) {
+ result = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0]));
+ if(!result)
break;
-
- /* get a new timeout for next attempt */
- after = Curl_tvnow();
- timeout_ms -= Curl_tvdiff(after, before);
- if(timeout_ms < 0) {
- failf(data, "connect() timed out!");
- return CURLE_OPERATION_TIMEDOUT;
- }
- before = after;
- } /* end of connect-to-each-address loop */
-
- *sockconn = sockfd; /* the socket descriptor we've connected */
-
- if(sockfd == CURL_SOCKET_BAD) {
- /* no good connect was made */
- failf(data, "couldn't connect to host");
- return CURLE_COULDNT_CONNECT;
+ conn->tempaddr[0] = conn->tempaddr[0]->ai_next;
}
- /* leave the socket in non-blocking mode */
-
- /* store the address we use */
- if(addr)
- *addr = curr_addr;
+ if(conn->tempsock[0] == CURL_SOCKET_BAD) {
+ if(!result)
+ result = CURLE_COULDNT_CONNECT;
+ return result;
+ }
data->info.numconnects++; /* to track the number of connections made */
return CURLE_OK;
}
+struct connfind {
+ struct connectdata *tofind;
+ bool found;
+};
+
+static int conn_is_conn(struct connectdata *conn, void *param)
+{
+ struct connfind *f = (struct connfind *)param;
+ if(conn == f->tofind) {
+ f->found = TRUE;
+ return 1;
+ }
+ return 0;
+}
+
/*
* Used to extract socket and connectdata struct for the most recent
* transfer on the given SessionHandle.
@@ -1092,10 +1202,29 @@ curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
struct connectdata **connp)
{
curl_socket_t sockfd;
- if((data->state.lastconnect != -1) &&
- (data->state.connc->connects[data->state.lastconnect] != NULL)) {
- struct connectdata *c =
- data->state.connc->connects[data->state.lastconnect];
+
+ DEBUGASSERT(data);
+
+ /* this works for an easy handle:
+ * - that has been used for curl_easy_perform()
+ * - that is associated with a multi handle, and whose connection
+ * was detached with CURLOPT_CONNECT_ONLY
+ */
+ if(data->state.lastconnect && (data->multi_easy || data->multi)) {
+ struct connectdata *c = data->state.lastconnect;
+ struct connfind find;
+ find.tofind = data->state.lastconnect;
+ find.found = FALSE;
+
+ Curl_conncache_foreach(data->multi_easy?
+ &data->multi_easy->conn_cache:
+ &data->multi->conn_cache, &find, conn_is_conn);
+
+ if(!find.found) {
+ data->state.lastconnect = NULL;
+ return CURL_SOCKET_BAD;
+ }
+
if(connp)
/* only store this if the caller cares for it */
*connp = c;
@@ -1124,3 +1253,126 @@ curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
return sockfd;
}
+
+/*
+ * Close a socket.
+ *
+ * 'conn' can be NULL, beware!
+ */
+int Curl_closesocket(struct connectdata *conn,
+ curl_socket_t sock)
+{
+ if(conn && conn->fclosesocket) {
+ if((sock == conn->sock[SECONDARYSOCKET]) &&
+ conn->sock_accepted[SECONDARYSOCKET])
+ /* if this socket matches the second socket, and that was created with
+ accept, then we MUST NOT call the callback but clear the accepted
+ status */
+ conn->sock_accepted[SECONDARYSOCKET] = FALSE;
+ else {
+ Curl_multi_closed(conn, sock);
+ return conn->fclosesocket(conn->closesocket_client, sock);
+ }
+ }
+
+ if(conn)
+ /* tell the multi-socket code about this */
+ Curl_multi_closed(conn, sock);
+
+ sclose(sock);
+
+ return 0;
+}
+
+/*
+ * Create a socket based on info from 'conn' and 'ai'.
+ *
+ * 'addr' should be a pointer to the correct struct to get data back, or NULL.
+ * 'sockfd' must be a pointer to a socket descriptor.
+ *
+ * If the open socket callback is set, used that!
+ *
+ */
+CURLcode Curl_socket(struct connectdata *conn,
+ const Curl_addrinfo *ai,
+ struct Curl_sockaddr_ex *addr,
+ curl_socket_t *sockfd)
+{
+ struct SessionHandle *data = conn->data;
+ struct Curl_sockaddr_ex dummy;
+
+ if(!addr)
+ /* if the caller doesn't want info back, use a local temp copy */
+ addr = &dummy;
+
+ /*
+ * The Curl_sockaddr_ex structure is basically libcurl's external API
+ * curl_sockaddr structure with enough space available to directly hold
+ * any protocol-specific address structures. The variable declared here
+ * will be used to pass / receive data to/from the fopensocket callback
+ * if this has been set, before that, it is initialized from parameters.
+ */
+
+ addr->family = ai->ai_family;
+ addr->socktype = conn->socktype;
+ addr->protocol = conn->socktype==SOCK_DGRAM?IPPROTO_UDP:ai->ai_protocol;
+ addr->addrlen = ai->ai_addrlen;
+
+ if(addr->addrlen > sizeof(struct Curl_sockaddr_storage))
+ addr->addrlen = sizeof(struct Curl_sockaddr_storage);
+ memcpy(&addr->sa_addr, ai->ai_addr, addr->addrlen);
+
+ if(data->set.fopensocket)
+ /*
+ * If the opensocket callback is set, all the destination address
+ * information is passed to the callback. Depending on this information the
+ * callback may opt to abort the connection, this is indicated returning
+ * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When
+ * the callback returns a valid socket the destination address information
+ * might have been changed and this 'new' address will actually be used
+ * here to connect.
+ */
+ *sockfd = data->set.fopensocket(data->set.opensocket_client,
+ CURLSOCKTYPE_IPCXN,
+ (struct curl_sockaddr *)addr);
+ else
+ /* opensocket callback not set, so simply create the socket now */
+ *sockfd = socket(addr->family, addr->socktype, addr->protocol);
+
+ if(*sockfd == CURL_SOCKET_BAD)
+ /* no socket, no connection */
+ return CURLE_COULDNT_CONNECT;
+
+#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
+ if(conn->scope_id && (addr->family == AF_INET6)) {
+ struct sockaddr_in6 * const sa6 = (void *)&addr->sa_addr;
+ sa6->sin6_scope_id = conn->scope_id;
+ }
+#endif
+
+ return CURLE_OK;
+
+}
+
+#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
+ * 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
+ if(closeit != conn->bits.close) {
+ 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 */
+ }
+}
+#endif
diff --git a/lib/connect.h b/lib/connect.h
index 2c6b10a3..91646c75 100644
--- a/lib/connect.h
+++ b/lib/connect.h
@@ -1,5 +1,5 @@
-#ifndef __CONNECT_H
-#define __CONNECT_H
+#ifndef HEADER_CURL_CONNECT_H
+#define HEADER_CURL_CONNECT_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,27 +21,27 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "curl_setup.h"
#include "nonblock.h" /* for curlx_nonblock(), formerly Curl_nonblock() */
+#include "sockaddr.h"
CURLcode Curl_is_connected(struct connectdata *conn,
int sockindex,
bool *connected);
CURLcode Curl_connecthost(struct connectdata *conn,
- const struct Curl_dns_entry *host, /* connect to
- this */
- curl_socket_t *sockconn, /* not set if error */
- Curl_addrinfo **addr, /* the one we used */
- bool *connected); /* truly connected? */
+ const struct Curl_dns_entry *host);
/* generic function that returns how much time there's left to run, according
to the timeouts set */
-long Curl_timeleft(struct connectdata *conn,
+long Curl_timeleft(struct SessionHandle *data,
struct timeval *nowp,
bool duringconnect);
#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */
+#define HAPPY_EYEBALLS_TIMEOUT 200 /* milliseconds to wait between
+ IPv4/IPv6 connection attempts */
/*
* Used to extract socket and connectdata struct for the most recent
@@ -52,7 +52,7 @@ long Curl_timeleft(struct connectdata *conn,
curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
struct connectdata **connp);
-#ifdef WIN32
+#ifdef USE_WINSOCK
/* When you run a program that uses the Windows Sockets API, you may
experience slow performance when you copy data to a TCP server.
@@ -64,9 +64,59 @@ curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
*/
void Curl_sndbufset(curl_socket_t sockfd);
#else
-#define Curl_sndbufset(y)
+#define Curl_sndbufset(y) Curl_nop_stmt
#endif
void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd);
+void Curl_persistconninfo(struct connectdata *conn);
+int Curl_closesocket(struct connectdata *conn, curl_socket_t sock);
+
+/*
+ * The Curl_sockaddr_ex structure is basically libcurl's external API
+ * curl_sockaddr structure with enough space available to directly hold any
+ * protocol-specific address structures. The variable declared here will be
+ * used to pass / receive data to/from the fopensocket callback if this has
+ * been set, before that, it is initialized from parameters.
+ */
+struct Curl_sockaddr_ex {
+ int family;
+ int socktype;
+ int protocol;
+ unsigned int addrlen;
+ union {
+ struct sockaddr addr;
+ struct Curl_sockaddr_storage buff;
+ } _sa_ex_u;
+};
+#define sa_addr _sa_ex_u.addr
+
+/*
+ * Create a socket based on info from 'conn' and 'ai'.
+ *
+ * Fill in 'addr' and 'sockfd' accordingly if OK is returned. If the open
+ * socket callback is set, used that!
+ *
+ */
+CURLcode Curl_socket(struct connectdata *conn,
+ const Curl_addrinfo *ai,
+ struct Curl_sockaddr_ex *addr,
+ curl_socket_t *sockfd);
+
+#ifdef CURLDEBUG
+/*
+ * Curl_connclose() sets the bit.close bit to TRUE with an explanation.
+ * Nothing else.
+ */
+void Curl_conncontrol(struct connectdata *conn,
+ bool closeit,
+ const char *reason);
+#define connclose(x,y) Curl_conncontrol(x,TRUE, y)
+#define connkeep(x,y) Curl_conncontrol(x, FALSE, y)
+#else /* if !CURLDEBUG */
+
+#define connclose(x,y) (x)->bits.close = TRUE
+#define connkeep(x,y) (x)->bits.close = FALSE
#endif
+
+#endif /* HEADER_CURL_CONNECT_H */
diff --git a/lib/content_encoding.c b/lib/content_encoding.c
index 6fb7c8d3..c68e6e5f 100644
--- a/lib/content_encoding.c
+++ b/lib/content_encoding.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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,13 +20,10 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_LIBZ
-#include <stdlib.h>
-#include <string.h>
-
#include "urldata.h"
#include <curl/curl.h>
#include "sendf.h"
@@ -52,6 +49,21 @@
#define COMMENT 0x10 /* bit 4 set: file comment present */
#define RESERVED 0xE0 /* bits 5..7: reserved */
+static voidpf
+zalloc_cb(voidpf opaque, unsigned int items, unsigned int size)
+{
+ (void) opaque;
+ /* not a typo, keep it calloc() */
+ return (voidpf) calloc(items, size);
+}
+
+static void
+zfree_cb(voidpf opaque, voidpf ptr)
+{
+ (void) opaque;
+ free(ptr);
+}
+
static CURLcode
process_zlib_error(struct connectdata *conn, z_stream *z)
{
@@ -95,7 +107,7 @@ inflate_stream(struct connectdata *conn,
/* because the buffer size is fixed, iteratively decompress and transfer to
the client via client_write. */
- for (;;) {
+ for(;;) {
/* (re)set buffer for decompressed output for every iteration */
z->next_out = (Bytef *)decomp;
z->avail_out = DSIZ;
@@ -161,11 +173,10 @@ Curl_unencode_deflate_write(struct connectdata *conn,
/* Initialize zlib? */
if(k->zlib_init == ZLIB_UNINIT) {
- z->zalloc = (alloc_func)Z_NULL;
- z->zfree = (free_func)Z_NULL;
- z->opaque = 0;
- z->next_in = NULL;
- z->avail_in = 0;
+ memset(z, 0, sizeof(z_stream));
+ z->zalloc = (alloc_func)zalloc_cb;
+ z->zfree = (free_func)zfree_cb;
+
if(inflateInit(z) != Z_OK)
return process_zlib_error(conn, z);
k->zlib_init = ZLIB_INIT;
@@ -272,11 +283,9 @@ Curl_unencode_gzip_write(struct connectdata *conn,
/* Initialize zlib? */
if(k->zlib_init == ZLIB_UNINIT) {
- z->zalloc = (alloc_func)Z_NULL;
- z->zfree = (free_func)Z_NULL;
- z->opaque = 0;
- z->next_in = NULL;
- z->avail_in = 0;
+ memset(z, 0, sizeof(z_stream));
+ z->zalloc = (alloc_func)zalloc_cb;
+ z->zfree = (free_func)zfree_cb;
if(strcmp(zlibVersion(), "1.2.0.4") >= 0) {
/* zlib ver. >= 1.2.0.4 supports transparent gzip decompressing */
diff --git a/lib/content_encoding.h b/lib/content_encoding.h
index 3aff9d3c..501f6c8c 100644
--- a/lib/content_encoding.h
+++ b/lib/content_encoding.h
@@ -1,5 +1,5 @@
-#ifndef __CURL_CONTENT_ENCODING_H
-#define __CURL_CONTENT_ENCODING_H
+#ifndef HEADER_CURL_CONTENT_ENCODING_H
+#define HEADER_CURL_CONTENT_ENCODING_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
/*
* Comma-separated list all supported Content-Encodings ('identity' is implied)
@@ -32,7 +32,7 @@
void Curl_unencode_cleanup(struct connectdata *conn);
#else
#define ALL_CONTENT_ENCODINGS "identity"
-#define Curl_unencode_cleanup(x)
+#define Curl_unencode_cleanup(x) Curl_nop_stmt
#endif
CURLcode Curl_unencode_deflate_write(struct connectdata *conn,
@@ -45,4 +45,4 @@ Curl_unencode_gzip_write(struct connectdata *conn,
ssize_t nread);
-#endif
+#endif /* HEADER_CURL_CONTENT_ENCODING_H */
diff --git a/lib/cookie.c b/lib/cookie.c
index 21617adc..94f2a8b8 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +26,17 @@
RECEIVING COOKIE INFORMATION
============================
-struct CookieInfo *cookie_init(char *file);
+struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
+ const char *file, struct CookieInfo *inc, bool newsession);
Inits a cookie struct to store data in a local file. This is always
called before any cookies are set.
-int cookies_set(struct CookieInfo *cookie, char *cookie_line);
+struct Cookie *Curl_cookie_add(struct SessionHandle *data,
+ struct CookieInfo *c, bool httpheader, char *lineptr,
+ const char *domain, const char *path);
- The 'cookie_line' parameter is a full "Set-cookie:" line as
+ The 'lineptr' parameter is a full "Set-cookie:" line as
received from a server.
The function need to replace previously stored lines that this new
@@ -47,8 +50,8 @@ int cookies_set(struct CookieInfo *cookie, char *cookie_line);
SENDING COOKIE INFORMATION
==========================
-struct Cookies *cookie_getlist(struct CookieInfo *cookie,
- char *host, char *path, bool secure);
+struct Cookies *Curl_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
@@ -77,64 +80,181 @@ Example set of cookies:
****/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
-#include <stdlib.h>
-#include <string.h>
-
-#define _MPRINTF_REPLACE /* without this on windows OS we get undefined reference to snprintf */
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
#include "urldata.h"
#include "cookie.h"
#include "strequal.h"
#include "strtok.h"
#include "sendf.h"
-#include "curl_memory.h"
+#include "slist.h"
#include "share.h"
#include "strtoofft.h"
#include "rawstr.h"
#include "curl_memrchr.h"
+#include "inet_pton.h"
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
-
static void freecookie(struct Cookie *co)
{
- if(co->expirestr)
- free(co->expirestr);
- if(co->domain)
- free(co->domain);
- if(co->path)
- free(co->path);
- if(co->name)
- free(co->name);
- if(co->value)
- free(co->value);
- if(co->maxage)
- free(co->maxage);
- if(co->version)
- free(co->version);
-
+ free(co->expirestr);
+ free(co->domain);
+ free(co->path);
+ free(co->spath);
+ free(co->name);
+ free(co->value);
+ free(co->maxage);
+ free(co->version);
free(co);
}
-static bool tailmatch(const char *little, const char *bigone)
+static bool tailmatch(const char *cooke_domain, const char *hostname)
{
- size_t littlelen = strlen(little);
- size_t biglen = strlen(bigone);
+ size_t cookie_domain_len = strlen(cooke_domain);
+ size_t hostname_len = strlen(hostname);
+
+ if(hostname_len < cookie_domain_len)
+ return FALSE;
- if(littlelen > biglen)
+ if(!Curl_raw_equal(cooke_domain, hostname+hostname_len-cookie_domain_len))
return FALSE;
- return (bool)Curl_raw_equal(little, bigone+biglen-littlelen);
+ /* A lead char of cookie_domain is not '.'.
+ RFC6265 4.1.2.3. The Domain Attribute says:
+ For example, if the value of the Domain attribute is
+ "example.com", the user agent will include the cookie in the Cookie
+ header when making HTTP requests to example.com, www.example.com, and
+ www.corp.example.com.
+ */
+ if(hostname_len == cookie_domain_len)
+ return TRUE;
+ if('.' == *(hostname + hostname_len - cookie_domain_len - 1))
+ return TRUE;
+ return FALSE;
+}
+
+/*
+ * matching cookie path and url path
+ * RFC6265 5.1.4 Paths and Path-Match
+ */
+static bool pathmatch(const char* cookie_path, const char* request_uri)
+{
+ size_t cookie_path_len;
+ size_t uri_path_len;
+ char* uri_path = NULL;
+ char* pos;
+ bool ret = FALSE;
+
+ /* cookie_path must not have last '/' separator. ex: /sample */
+ cookie_path_len = strlen(cookie_path);
+ if(1 == cookie_path_len) {
+ /* cookie_path must be '/' */
+ return TRUE;
+ }
+
+ uri_path = strdup(request_uri);
+ if(!uri_path)
+ return FALSE;
+ pos = strchr(uri_path, '?');
+ if(pos)
+ *pos = 0x0;
+
+ /* #-fragments are already cut off! */
+ if(0 == strlen(uri_path) || uri_path[0] != '/') {
+ free(uri_path);
+ uri_path = strdup("/");
+ if(!uri_path)
+ return FALSE;
+ }
+
+ /* here, RFC6265 5.1.4 says
+ 4. Output the characters of the uri-path from the first character up
+ to, but not including, the right-most %x2F ("/").
+ but URL path /hoge?fuga=xxx means /hoge/index.cgi?fuga=xxx in some site
+ without redirect.
+ Ignore this algorithm because /hoge is uri path for this case
+ (uri path is not /).
+ */
+
+ uri_path_len = strlen(uri_path);
+
+ if(uri_path_len < cookie_path_len) {
+ ret = FALSE;
+ goto pathmatched;
+ }
+
+ /* not using checkprefix() because matching should be case-sensitive */
+ if(strncmp(cookie_path, uri_path, cookie_path_len)) {
+ ret = FALSE;
+ goto pathmatched;
+ }
+
+ /* The cookie-path and the uri-path are identical. */
+ if(cookie_path_len == uri_path_len) {
+ ret = TRUE;
+ goto pathmatched;
+ }
+
+ /* here, cookie_path_len < url_path_len */
+ if(uri_path[cookie_path_len] == '/') {
+ ret = TRUE;
+ goto pathmatched;
+ }
+
+ ret = FALSE;
+
+pathmatched:
+ free(uri_path);
+ return ret;
+}
+
+/*
+ * cookie path sanitize
+ */
+static char *sanitize_cookie_path(const char *cookie_path)
+{
+ size_t len;
+ char *new_path = strdup(cookie_path);
+ if(!new_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--;
+ }
+ if(len && (new_path[len - 1] == '\"')) {
+ new_path[len - 1] = 0x0;
+ len--;
+ }
+
+ /* RFC6265 5.2.4 The Path Attribute */
+ if(new_path[0] != '/') {
+ /* Let cookie-path be the default-path. */
+ free(new_path);
+ new_path = strdup("/");
+ return new_path;
+ }
+
+ /* convert /hoge/ to /hoge */
+ if(len && new_path[len - 1] == '/') {
+ new_path[len - 1] = 0x0;
+ }
+
+ return new_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)
{
@@ -142,15 +262,22 @@ void Curl_cookie_loadfiles(struct SessionHandle *data)
if(list) {
Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
while(list) {
- data->cookies = Curl_cookie_init(data,
- list->data,
- data->cookies,
- data->set.cookiesession);
+ 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;
list = list->next;
}
- Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
curl_slist_free_all(data->change.cookielist); /* clean up list */
data->change.cookielist = NULL; /* don't do this again! */
+ Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
}
}
@@ -162,11 +289,60 @@ void Curl_cookie_loadfiles(struct SessionHandle *data)
*/
static void strstore(char **str, const char *newstr)
{
- if(*str)
- free(*str);
+ free(*str);
*str = strdup(newstr);
}
+/*
+ * remove_expired() removes expired cookies.
+ */
+static void remove_expired(struct CookieInfo *cookies)
+{
+ struct Cookie *co, *nx, *pv;
+ curl_off_t now = (curl_off_t)time(NULL);
+
+ co = cookies->cookies;
+ pv = NULL;
+ while(co) {
+ nx = co->next;
+ if((co->expirestr || co->maxage) && co->expires < now) {
+ if(co == cookies->cookies) {
+ cookies->cookies = co->next;
+ }
+ else {
+ pv->next = co->next;
+ }
+ cookies->numcookies--;
+ freecookie(co);
+ }
+ else {
+ pv = co;
+ }
+ co = nx;
+ }
+}
+
+/*
+ * 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;
+}
/****************************************************************************
*
@@ -174,6 +350,11 @@ static void strstore(char **str, const char *newstr)
*
* Add a single cookie line to the cookie keeping object.
*
+ * 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 *
@@ -210,7 +391,6 @@ Curl_cookie_add(struct SessionHandle *data,
if(httpheader) {
/* This line was read off a HTTP-header */
const char *ptr;
- const char *sep;
const char *semiptr;
char *what;
@@ -227,183 +407,148 @@ Curl_cookie_add(struct SessionHandle *data,
ptr = lineptr;
do {
- /* we have a <what>=<this> pair or a 'secure' word here */
- sep = strchr(ptr, '=');
- if(sep && (!semiptr || (semiptr>sep)) ) {
- /*
- * There is a = sign and if there was a semicolon too, which make sure
- * that the semicolon comes _after_ the equal sign.
- */
-
- name[0]=what[0]=0; /* init the buffers */
- if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;=]=%"
- MAX_COOKIE_LINE_TXT "[^;\r\n]",
- name, what)) {
- /* this is a <name>=<what> pair. We use strstore() below to properly
- deal with received cookie headers that have the same string
- property set more than once, and then we use the last one. */
-
- const char *whatptr;
-
- /* Strip off trailing whitespace from the 'what' */
- size_t len=strlen(what);
- while(len && ISBLANK(what[len-1])) {
- what[len-1]=0;
- len--;
- }
+ /* we have a <what>=<this> pair or a stand-alone word here */
+ name[0]=what[0]=0; /* init the buffers */
+ if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;\r\n =] =%"
+ MAX_COOKIE_LINE_TXT "[^;\r\n]",
+ name, what)) {
+ /* Use strstore() below to properly deal with received cookie
+ headers that have the same string property set more than once,
+ and then we use the last one. */
+ const char *whatptr;
+ bool done = FALSE;
+ bool sep;
+ size_t len=strlen(what);
+ const char *endofn = &ptr[ strlen(name) ];
+
+ /* skip trailing spaces in name */
+ while(*endofn && ISBLANK(*endofn))
+ endofn++;
+
+ /* name ends with a '=' ? */
+ sep = (*endofn == '=')?TRUE:FALSE;
+
+ /* Strip off trailing whitespace from the 'what' */
+ while(len && ISBLANK(what[len-1])) {
+ what[len-1]=0;
+ len--;
+ }
- /* Skip leading whitespace from the 'what' */
- whatptr=what;
- while(*whatptr && ISBLANK(*whatptr)) {
- whatptr++;
- }
+ /* Skip leading whitespace from the 'what' */
+ whatptr=what;
+ while(*whatptr && ISBLANK(*whatptr))
+ whatptr++;
- if(Curl_raw_equal("path", name)) {
- strstore(&co->path, whatptr);
- if(!co->path) {
- badcookie = TRUE; /* out of memory bad */
- break;
- }
- }
- else if(Curl_raw_equal("domain", name)) {
- /* note that this name may or may not have a preceeding dot, but
- we don't care about that, we treat the names the same anyway */
-
- const char *domptr=whatptr;
- int dotcount=1;
-
- /* Count the dots, we need to make sure that there are enough
- of them. */
-
- if('.' == whatptr[0])
- /* don't count the initial dot, assume it */
- domptr++;
-
- do {
- domptr = strchr(domptr, '.');
- if(domptr) {
- domptr++;
- dotcount++;
- }
- } while(domptr);
-
- /* The original Netscape cookie spec defined that this domain name
- MUST have three dots (or two if one of the seven holy TLDs),
- but it seems that these kinds of cookies are in use "out there"
- so we cannot be that strict. I've therefore lowered the check
- to not allow less than two dots. */
-
- if(dotcount < 2) {
- /* Received and skipped a cookie with a domain using too few
- dots. */
- badcookie=TRUE; /* mark this as a bad cookie */
- infof(data, "skipped cookie with illegal dotcount domain: %s\n",
- whatptr);
- }
- else {
- /* 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 preceeding dot */
-
- 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;
- }
- co->tailmatch=TRUE; /* we always do that if the domain name was
- given */
- }
- else {
- /* we did not get a tailmatch and then the attempted set domain
- is not a domain to which the current host belongs. Mark as
- bad. */
- badcookie=TRUE;
- infof(data, "skipped cookie with bad tailmatch domain: %s\n",
- whatptr);
- }
- }
+ if(!len) {
+ /* this was a "<name>=" with no content, and we must allow
+ 'secure' and 'httponly' specified this weirdly */
+ done = TRUE;
+ if(Curl_raw_equal("secure", name))
+ co->secure = TRUE;
+ else if(Curl_raw_equal("httponly", name))
+ co->httponly = TRUE;
+ else if(sep)
+ /* there was a '=' so we're not done parsing this field */
+ done = FALSE;
+ }
+ if(done)
+ ;
+ else if(Curl_raw_equal("path", name)) {
+ strstore(&co->path, whatptr);
+ if(!co->path) {
+ badcookie = TRUE; /* out of memory bad */
+ break;
}
- else if(Curl_raw_equal("version", name)) {
- strstore(&co->version, whatptr);
- if(!co->version) {
- badcookie = TRUE;
- break;
- }
+ co->spath = sanitize_cookie_path(co->path);
+ if(!co->spath) {
+ badcookie = TRUE; /* out of memory bad */
+ break;
}
- else if(Curl_raw_equal("max-age", name)) {
- /* Defined in RFC2109:
-
- Optional. The Max-Age attribute defines the lifetime of the
- cookie, in seconds. The delta-seconds value is a decimal non-
- negative integer. After delta-seconds seconds elapse, the
- client should discard the cookie. A value of zero means the
- cookie should be discarded immediately.
-
- */
- strstore(&co->maxage, whatptr);
- if(!co->maxage) {
+ }
+ 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(!co->domain) {
badcookie = TRUE;
break;
}
- co->expires =
- atoi((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0]) +
- (long)now;
+ if(!is_ip)
+ co->tailmatch=TRUE; /* we always do that if the domain name was
+ given */
}
- else if(Curl_raw_equal("expires", name)) {
- strstore(&co->expirestr, whatptr);
- if(!co->expirestr) {
- badcookie = TRUE;
- break;
- }
- /* Note that if the date couldn't get parsed for whatever reason,
- the cookie will be treated as a session cookie */
- co->expires = curl_getdate(what, &now);
-
- /* Session cookies have expires set to 0 so if we get that back
- from the date parser let's add a second to make it a
- non-session cookie */
- if (co->expires == 0)
- co->expires = 1;
- else if( co->expires < 0 )
- co->expires = 0;
+ else {
+ /* we did not get a tailmatch and then the attempted set domain
+ is not a domain to which the current host belongs. Mark as
+ bad. */
+ badcookie=TRUE;
+ infof(data, "skipped cookie with bad tailmatch domain: %s\n",
+ whatptr);
}
- else if(!co->name) {
- co->name = strdup(name);
- co->value = strdup(whatptr);
- if(!co->name || !co->value) {
- badcookie = TRUE;
- break;
- }
+ }
+ else if(Curl_raw_equal("version", name)) {
+ strstore(&co->version, whatptr);
+ if(!co->version) {
+ badcookie = TRUE;
+ break;
}
- /*
- else this is the second (or more) name we don't know
- about! */
}
- else {
- /* this is an "illegal" <what>=<this> pair */
+ else if(Curl_raw_equal("max-age", name)) {
+ /* Defined in RFC2109:
+
+ Optional. The Max-Age attribute defines the lifetime of the
+ cookie, in seconds. The delta-seconds value is a decimal non-
+ negative integer. After delta-seconds seconds elapse, the
+ client should discard the cookie. A value of zero means the
+ cookie should be discarded immediately.
+
+ */
+ strstore(&co->maxage, whatptr);
+ if(!co->maxage) {
+ badcookie = TRUE;
+ break;
+ }
}
- }
- else {
- if(sscanf(ptr, "%" MAX_COOKIE_LINE_TXT "[^;\r\n]",
- what)) {
- if(Curl_raw_equal("secure", what)) {
- co->secure = TRUE;
+ else if(Curl_raw_equal("expires", name)) {
+ strstore(&co->expirestr, whatptr);
+ if(!co->expirestr) {
+ badcookie = TRUE;
+ break;
}
- else if (Curl_raw_equal("httponly", what)) {
- co->httponly = TRUE;
+ }
+ else if(!co->name) {
+ co->name = strdup(name);
+ co->value = strdup(whatptr);
+ if(!co->name || !co->value) {
+ badcookie = TRUE;
+ break;
}
- /* else,
- unsupported keyword without assign! */
-
}
+ /*
+ else this is the second (or more) name we don't know
+ about! */
+ }
+ else {
+ /* this is an "illegal" <what>=<this> pair */
}
+
if(!semiptr || !*semiptr) {
/* we already know there are no more cookies */
semiptr = NULL;
@@ -421,6 +566,30 @@ Curl_cookie_add(struct SessionHandle *data,
semiptr=strchr(ptr, '\0');
} while(semiptr);
+ if(co->maxage) {
+ co->expires =
+ curlx_strtoofft((*co->maxage=='\"')?
+ &co->maxage[1]:&co->maxage[0], NULL, 10);
+ if(CURL_OFF_T_MAX - now < co->expires)
+ /* avoid overflow */
+ co->expires = CURL_OFF_T_MAX;
+ else
+ co->expires += now;
+ }
+ else if(co->expirestr) {
+ /* Note that if the date couldn't get parsed for whatever reason,
+ the cookie will be treated as a session cookie */
+ co->expires = curl_getdate(co->expirestr, NULL);
+
+ /* Session cookies have expires set to 0 so if we get that back
+ from the date parser let's add a second to make it a
+ non-session cookie */
+ if(co->expires == 0)
+ co->expires = 1;
+ else if(co->expires < 0)
+ co->expires = 0;
+ }
+
if(!badcookie && !co->domain) {
if(domain) {
/* no domain was given in the header line, set the default */
@@ -449,6 +618,9 @@ Curl_cookie_add(struct SessionHandle *data,
if(co->path) {
memcpy(co->path, path, pathlen);
co->path[pathlen]=0; /* zero terminate */
+ co->spath = sanitize_cookie_path(co->path);
+ if(!co->spath)
+ badcookie = TRUE; /* out of memory bad */
}
else
badcookie = TRUE;
@@ -477,10 +649,10 @@ Curl_cookie_add(struct SessionHandle *data,
marked with httpOnly after the domain name are not accessible
from javascripts, but since curl does not operate at javascript
level, we include them anyway. In Firefox's cookie files, these
- lines are preceeded with #HttpOnly_ and then everything is
+ lines are preceded with #HttpOnly_ and then everything is
as usual, so we skip 10 characters of the line..
*/
- if (strncmp(lineptr, "#HttpOnly_", 10) == 0) {
+ if(strncmp(lineptr, "#HttpOnly_", 10) == 0) {
lineptr += 10;
co->httponly = TRUE;
}
@@ -500,19 +672,13 @@ Curl_cookie_add(struct SessionHandle *data,
firstptr=strtok_r(lineptr, "\t", &tok_buf); /* tokenize it on the TAB */
- /* Here's a quick check to eliminate normal HTTP-headers from this */
- if(!firstptr || strchr(firstptr, ':')) {
- free(co);
- return NULL;
- }
-
/* Now loop through the fields and init the struct we already have
allocated */
for(ptr=firstptr, fields=0; ptr && !badcookie;
ptr=strtok_r(NULL, "\t", &tok_buf), fields++) {
switch(fields) {
case 0:
- if(ptr[0]=='.') /* skip preceeding dots */
+ if(ptr[0]=='.') /* skip preceding dots */
ptr++;
co->domain = strdup(ptr);
if(!co->domain)
@@ -529,7 +695,7 @@ Curl_cookie_add(struct SessionHandle *data,
As far as I can see, it is set to true when the cookie says
.domain.com and to false when the domain is complete www.domain.com
*/
- co->tailmatch=(bool)Curl_raw_equal(ptr, "TRUE"); /* store information */
+ co->tailmatch = Curl_raw_equal(ptr, "TRUE")?TRUE:FALSE;
break;
case 2:
/* It turns out, that sometimes the file format allows the path
@@ -540,16 +706,25 @@ Curl_cookie_add(struct SessionHandle *data,
co->path = strdup(ptr);
if(!co->path)
badcookie = TRUE;
+ else {
+ co->spath = sanitize_cookie_path(co->path);
+ if(!co->spath) {
+ badcookie = TRUE; /* out of memory bad */
+ }
+ }
break;
}
/* this doesn't look like a path, make one up! */
co->path = strdup("/");
if(!co->path)
badcookie = TRUE;
+ co->spath = strdup("/");
+ if(!co->spath)
+ badcookie = TRUE;
fields++; /* add a field and fall down to secure */
/* FALLTHROUGH */
case 3:
- co->secure = (bool)Curl_raw_equal(ptr, "TRUE");
+ co->secure = Curl_raw_equal(ptr, "TRUE")?TRUE:FALSE;
break;
case 4:
co->expires = curlx_strtoofft(ptr, NULL, 10);
@@ -599,6 +774,9 @@ Curl_cookie_add(struct SessionHandle *data,
superceeds an already existing cookie, which it may if the previous have
the same domain and path as this */
+ /* at first, remove expired cookies */
+ remove_expired(c);
+
clist = c->cookies;
replace_old = FALSE;
while(clist) {
@@ -616,14 +794,14 @@ Curl_cookie_add(struct SessionHandle *data,
if(replace_old) {
/* the domains were identical */
- if(clist->path && co->path) {
- if(Curl_raw_equal(clist->path, co->path)) {
+ if(clist->spath && co->spath) {
+ if(Curl_raw_equal(clist->spath, co->spath)) {
replace_old = TRUE;
}
else
replace_old = FALSE;
}
- else if(!clist->path && !co->path)
+ else if(!clist->spath && !co->spath)
replace_old = TRUE;
else
replace_old = FALSE;
@@ -646,19 +824,13 @@ Curl_cookie_add(struct SessionHandle *data,
/* then free all the old pointers */
free(clist->name);
- if(clist->value)
- free(clist->value);
- if(clist->domain)
- free(clist->domain);
- if(clist->path)
- free(clist->path);
- if(clist->expirestr)
- free(clist->expirestr);
-
- if(clist->version)
- free(clist->version);
- if(clist->maxage)
- free(clist->maxage);
+ free(clist->value);
+ free(clist->domain);
+ free(clist->path);
+ free(clist->spath);
+ free(clist->expirestr);
+ free(clist->version);
+ free(clist->maxage);
*clist = *co; /* then store all the new data */
@@ -681,7 +853,7 @@ Curl_cookie_add(struct SessionHandle *data,
if(c->running)
/* Only show this when NOT reading the cookies from a file */
infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, "
- "expire %" FORMAT_OFF_T "\n",
+ "expire %" CURL_FORMAT_CURL_OFF_T "\n",
replace_old?"Replaced":"Added", co->name, co->value,
co->domain, co->path, co->expires);
@@ -691,9 +863,9 @@ Curl_cookie_add(struct SessionHandle *data,
lastc->next = co;
else
c->cookies = co;
+ c->numcookies++; /* one more cookie in the jar */
}
- c->numcookies++; /* one more cookie in the jar */
return co;
}
@@ -706,6 +878,7 @@ 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,
@@ -713,8 +886,9 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
bool newsession)
{
struct CookieInfo *c;
- FILE *fp;
+ FILE *fp = NULL;
bool fromfile=TRUE;
+ char *line = NULL;
if(NULL == inc) {
/* we didn't get a struct, create one */
@@ -722,6 +896,8 @@ 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 */
@@ -738,7 +914,7 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
fp = NULL;
}
else
- fp = file?fopen(file, "r"):NULL;
+ fp = file?fopen(file, FOPEN_READTEXT):NULL;
c->newsession = newsession; /* new session? */
@@ -746,25 +922,26 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
char *lineptr;
bool headerline;
- 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);
+ 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;
}
- free(line); /* free the line buffer */
+ while(*lineptr && ISBLANK(*lineptr))
+ lineptr++;
+
+ Curl_cookie_add(data, c, headerline, lineptr, NULL, NULL);
}
+ free(line); /* free the line buffer */
+
if(fromfile)
fclose(fp);
}
@@ -772,6 +949,16 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
c->running = TRUE; /* now, we're running */
return c;
+
+fail:
+ free(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 */
@@ -779,11 +966,28 @@ static int cookie_sort(const void *p1, const void *p2)
{
struct Cookie *c1 = *(struct Cookie **)p1;
struct Cookie *c2 = *(struct Cookie **)p2;
+ size_t l1, l2;
+
+ /* 1 - compare cookie path lengths */
+ l1 = c1->path ? strlen(c1->path) : 0;
+ l2 = c2->path ? strlen(c2->path) : 0;
+
+ if(l1 != l2)
+ return (l2 > l1) ? 1 : -1 ; /* avoid size_t <=> int conversions */
- size_t l1 = c1->path?strlen(c1->path):0;
- size_t l2 = c2->path?strlen(c2->path):0;
+ /* 2 - compare cookie domain lengths */
+ l1 = c1->domain ? strlen(c1->domain) : 0;
+ l2 = c2->domain ? strlen(c2->domain) : 0;
- return (l2 > l1) ? 1 : (l2 < l1) ? -1 : 0 ;
+ if(l1 != l2)
+ return (l2 > l1) ? 1 : -1 ; /* avoid size_t <=> int conversions */
+
+ /* 3 - compare cookie names */
+ if(c1->name && c2->name)
+ return strcmp(c1->name, c2->name);
+
+ /* sorry, can't be more deterministic */
+ return 0;
}
/*****************************************************************************
@@ -807,32 +1011,36 @@ 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 */
+ /* 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) {
/* only process this cookie if it is not expired or had no expire
date AND that if the cookie requires we're secure we must only
continue if we are! */
- if( (!co->expires || (co->expires > now)) &&
- (co->secure?secure:TRUE) ) {
+ if((!co->expires || (co->expires > now)) &&
+ (co->secure?secure:TRUE)) {
/* now check if the domain is correct */
if(!co->domain ||
- (co->tailmatch && tailmatch(co->domain, host)) ||
- (!co->tailmatch && Curl_raw_equal(host, co->domain)) ) {
+ (co->tailmatch && !is_ip && tailmatch(co->domain, host)) ||
+ ((!co->tailmatch || is_ip) && Curl_raw_equal(host, co->domain)) ) {
/* the right part of the host matches the domain stuff in the
cookie data */
/* now check the left part of the path with the cookies path
requirement */
- if(!co->path ||
- /* not using checkprefix() because matching should be
- case-sensitive */
- !strncmp(co->path, path, strlen(co->path)) ) {
+ if(!co->spath || pathmatch(co->spath, path) ) {
/* and now, we know this is a match and we should create an
entry for the return-linked-list */
@@ -875,7 +1083,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
size_t i;
/* alloc an array and store all cookie pointers */
- array = (struct Cookie **)malloc(sizeof(struct Cookie *) * matches);
+ array = malloc(sizeof(struct Cookie *) * matches);
if(!array)
goto fail;
@@ -884,7 +1092,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
for(i=0; co; co = co->next)
array[i++] = co;
- /* now sort the cookie pointers in path lenth order */
+ /* now sort the cookie pointers in path length order */
qsort(array, matches, sizeof(struct Cookie *), cookie_sort);
/* remake the linked list order according to the new order */
@@ -930,16 +1138,14 @@ void Curl_cookie_clearall(struct CookieInfo *cookies)
void Curl_cookie_freelist(struct Cookie *co, bool cookiestoo)
{
struct Cookie *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;
- }
+ 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;
}
}
@@ -986,23 +1192,14 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies)
*
* Curl_cookie_cleanup()
*
- * Free a "cookie object" previous created with cookie_init().
+ * Free a "cookie object" previous created with Curl_cookie_init().
*
****************************************************************************/
void Curl_cookie_cleanup(struct CookieInfo *c)
{
- struct Cookie *co;
- struct Cookie *next;
if(c) {
- if(c->filename)
- free(c->filename);
- co = c->cookies;
-
- while(co) {
- next = co->next;
- freecookie(co);
- co = next;
- }
+ free(c->filename);
+ Curl_cookie_freelist(c->cookies, TRUE);
free(c); /* free the base struct as well */
}
}
@@ -1021,7 +1218,7 @@ static char *get_netscape_format(const struct Cookie *co)
"%s\t" /* tailmatch */
"%s\t" /* path */
"%s\t" /* secure */
- "%" FORMAT_OFF_T "\t" /* expires */
+ "%" CURL_FORMAT_CURL_OFF_T "\t" /* expires */
"%s\t" /* name */
"%s", /* value */
co->httponly?"#HttpOnly_":"",
@@ -1038,14 +1235,14 @@ static char *get_netscape_format(const struct Cookie *co)
}
/*
- * Curl_cookie_output()
+ * cookie_output()
*
* Writes all internally known cookies to the specified file. Specify
* "-" as file name to write to stdout.
*
* The function returns non-zero on write failure.
*/
-int Curl_cookie_output(struct CookieInfo *c, const char *dumphere)
+static int cookie_output(struct CookieInfo *c, const char *dumphere)
{
struct Cookie *co;
FILE *out;
@@ -1056,13 +1253,16 @@ int Curl_cookie_output(struct CookieInfo *c, const char *dumphere)
destination file */
return 0;
+ /* at first, remove expired cookies */
+ remove_expired(c);
+
if(strequal("-", dumphere)) {
/* use stdout */
out = stdout;
use_stdout=TRUE;
}
else {
- out = fopen(dumphere, "w");
+ out = fopen(dumphere, FOPEN_WRITETEXT);
if(!out)
return 1; /* failure */
}
@@ -1071,12 +1271,14 @@ int Curl_cookie_output(struct CookieInfo *c, const char *dumphere)
char *format_ptr;
fputs("# Netscape HTTP Cookie File\n"
- "# http://curl.haxx.se/rfc/cookie_spec.html\n"
+ "# http://curl.haxx.se/docs/http-cookies.html\n"
"# This file was generated by libcurl! Edit at your own risk.\n\n",
out);
co = c->cookies;
while(co) {
+ if(!co->domain)
+ continue;
format_ptr = get_netscape_format(co);
if(format_ptr == NULL) {
fprintf(out, "#\n# Fatal libcurl error\n");
@@ -1109,27 +1311,58 @@ struct curl_slist *Curl_cookie_list(struct SessionHandle *data)
c = data->cookies->cookies;
- beg = list;
while(c) {
- /* fill the list with _all_ the cookies we know */
+ if(!c->domain)
+ continue;
line = get_netscape_format(c);
- if(line == NULL) {
- curl_slist_free_all(beg);
+ if(!line) {
+ curl_slist_free_all(list);
return NULL;
}
- list = curl_slist_append(list, line);
- free(line);
- if(list == NULL) {
- curl_slist_free_all(beg);
+ beg = Curl_slist_append_nodup(list, line);
+ if(!beg) {
+ free(line);
+ curl_slist_free_all(list);
return NULL;
}
- else if(beg == NULL) {
- beg = list;
- }
+ list = beg;
c = c->next;
}
return list;
}
+void Curl_flush_cookies(struct SessionHandle *data, int cleanup)
+{
+ if(data->set.str[STRING_COOKIEJAR]) {
+ if(data->change.cookielist) {
+ /* If there is a list of cookie files to read, do it first so that
+ we have all the told files read before we write the new jar.
+ Curl_cookie_loadfiles() LOCKS and UNLOCKS the share itself! */
+ Curl_cookie_loadfiles(data);
+ }
+
+ Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
+
+ /* if we have a destination file for all the cookies to get dumped to */
+ if(cookie_output(data->cookies, data->set.str[STRING_COOKIEJAR]))
+ infof(data, "WARNING: failed to save cookies in %s\n",
+ data->set.str[STRING_COOKIEJAR]);
+ }
+ else {
+ if(cleanup && data->change.cookielist) {
+ /* since nothing is written, we can just free the list of cookie file
+ names */
+ curl_slist_free_all(data->change.cookielist); /* clean up list */
+ data->change.cookielist = NULL;
+ }
+ Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
+ }
+
+ if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
+ Curl_cookie_cleanup(data->cookies);
+ }
+ Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
+}
+
#endif /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */
diff --git a/lib/cookie.h b/lib/cookie.h
index e8c005f2..bd890827 100644
--- a/lib/cookie.h
+++ b/lib/cookie.h
@@ -1,5 +1,5 @@
-#ifndef __COOKIE_H
-#define __COOKIE_H
+#ifndef HEADER_CURL_COOKIE_H
+#define HEADER_CURL_COOKIE_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -21,15 +21,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#include <stdio.h>
-#if defined(WIN32)
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#endif
+#include "curl_setup.h"
#include <curl/curl.h>
@@ -37,7 +29,8 @@ struct Cookie {
struct Cookie *next; /* next in the chain */
char *name; /* <this> = value */
char *value; /* name = <this> */
- char *path; /* path = <this> */
+ char *path; /* path = <this> which is in Set-Cookie: */
+ char *spath; /* sanitized cookie path */
char *domain; /* domain = <this> */
curl_off_t expires; /* expires = <this> */
char *expirestr; /* the plain text version */
@@ -87,22 +80,25 @@ struct Cookie *Curl_cookie_add(struct SessionHandle *data,
struct CookieInfo *, bool header, char *lineptr,
const char *domain, const char *path);
-struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
- const char *, struct CookieInfo *, bool);
struct Cookie *Curl_cookie_getlist(struct CookieInfo *, const char *,
const char *, bool);
void Curl_cookie_freelist(struct Cookie *cookies, bool cookiestoo);
void Curl_cookie_clearall(struct CookieInfo *cookies);
void Curl_cookie_clearsess(struct CookieInfo *cookies);
-void Curl_cookie_cleanup(struct CookieInfo *);
-int Curl_cookie_output(struct CookieInfo *, const char *);
#if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_COOKIES)
#define Curl_cookie_list(x) NULL
-#define Curl_cookie_loadfiles(x) do { } while (0)
+#define Curl_cookie_loadfiles(x) Curl_nop_stmt
+#define Curl_cookie_init(x,y,z,w) NULL
+#define Curl_cookie_cleanup(x) Curl_nop_stmt
+#define Curl_flush_cookies(x,y) Curl_nop_stmt
#else
+void Curl_flush_cookies(struct SessionHandle *data, int cleanup);
+void Curl_cookie_cleanup(struct CookieInfo *);
+struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
+ const char *, struct CookieInfo *, bool);
struct curl_slist *Curl_cookie_list(struct SessionHandle *data);
void Curl_cookie_loadfiles(struct SessionHandle *data);
#endif
-#endif
+#endif /* HEADER_CURL_COOKIE_H */
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c
index 5098fa43..6627a6b9 100644
--- a/lib/curl_addrinfo.c
+++ b/lib/curl_addrinfo.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,13 +20,10 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
@@ -36,11 +33,13 @@
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
+#ifdef HAVE_SYS_UN_H
+# include <sys/un.h>
+#endif
#ifdef __VMS
# include <in.h>
# include <inet.h>
-# include <stdlib.h>
#endif
#if defined(NETWARE) && defined(__NOVELL_LIBC__)
@@ -49,15 +48,14 @@
#endif
#include "curl_addrinfo.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "inet_pton.h"
+#include "warnless.h"
+#include "curl_printf.h"
#include "curl_memory.h"
+
/* The last #include file should be: */
#include "memdebug.h"
-
/*
* Curl_freeaddrinfo()
*
@@ -82,13 +80,8 @@ Curl_freeaddrinfo(Curl_addrinfo *cahead)
Curl_addrinfo *ca;
for(ca = cahead; ca != NULL; ca = canext) {
-
- if(ca->ai_addr)
- free(ca->ai_addr);
-
- if(ca->ai_canonname)
- free(ca->ai_canonname);
-
+ free(ca->ai_addr);
+ free(ca->ai_canonname);
canext = ca->ai_next;
free(ca);
@@ -117,12 +110,12 @@ Curl_getaddrinfo_ex(const char *nodename,
const struct addrinfo *hints,
Curl_addrinfo **result)
{
- const struct addrinfo *ainext;
const struct addrinfo *ai;
struct addrinfo *aihead;
Curl_addrinfo *cafirst = NULL;
Curl_addrinfo *calast = NULL;
Curl_addrinfo *ca;
+ size_t ss_size;
int error;
*result = NULL; /* assume failure */
@@ -131,7 +124,28 @@ Curl_getaddrinfo_ex(const char *nodename,
if(error)
return error;
- for(ai = aihead; ai != NULL; ai = ainext) {
+ /* traverse the addrinfo list */
+
+ for(ai = aihead; ai != NULL; ai = ai->ai_next) {
+
+ /* ignore elements with unsupported address family, */
+ /* settle family-specific sockaddr structure size. */
+ if(ai->ai_family == AF_INET)
+ ss_size = sizeof(struct sockaddr_in);
+#ifdef ENABLE_IPV6
+ else if(ai->ai_family == AF_INET6)
+ ss_size = sizeof(struct sockaddr_in6);
+#endif
+ else
+ continue;
+
+ /* ignore elements without required address info */
+ if((ai->ai_addr == NULL) || !(ai->ai_addrlen > 0))
+ continue;
+
+ /* ignore elements with bogus address size */
+ if((size_t)ai->ai_addrlen < ss_size)
+ continue;
if((ca = malloc(sizeof(Curl_addrinfo))) == NULL) {
error = EAI_MEMORY;
@@ -139,35 +153,28 @@ Curl_getaddrinfo_ex(const char *nodename,
}
/* copy each structure member individually, member ordering, */
- /* size, or padding might be different for each structure. */
+ /* size, or padding might be different for each platform. */
ca->ai_flags = ai->ai_flags;
ca->ai_family = ai->ai_family;
ca->ai_socktype = ai->ai_socktype;
ca->ai_protocol = ai->ai_protocol;
- ca->ai_addrlen = 0;
+ ca->ai_addrlen = (curl_socklen_t)ss_size;
ca->ai_addr = NULL;
ca->ai_canonname = NULL;
ca->ai_next = NULL;
- if((ai->ai_addrlen > 0) && (ai->ai_addr != NULL)) {
- /* typecast below avoid warning on at least win64:
- conversion from 'size_t' to 'curl_socklen_t', possible loss of data
- */
- ca->ai_addrlen = (curl_socklen_t)ai->ai_addrlen;
- if((ca->ai_addr = malloc(ca->ai_addrlen)) == NULL) {
- error = EAI_MEMORY;
- free(ca);
- break;
- }
- memcpy(ca->ai_addr, ai->ai_addr, ca->ai_addrlen);
+ if((ca->ai_addr = malloc(ss_size)) == NULL) {
+ error = EAI_MEMORY;
+ free(ca);
+ break;
}
+ memcpy(ca->ai_addr, ai->ai_addr, ss_size);
if(ai->ai_canonname != NULL) {
if((ca->ai_canonname = strdup(ai->ai_canonname)) == NULL) {
error = EAI_MEMORY;
- if(ca->ai_addr)
- free(ca->ai_addr);
+ free(ca->ai_addr);
free(ca);
break;
}
@@ -182,8 +189,6 @@ Curl_getaddrinfo_ex(const char *nodename,
calast->ai_next = ca;
calast = ca;
- /* fetch next element fom the addrinfo list */
- ainext = ai->ai_next;
}
/* destroy the addrinfo list */
@@ -195,6 +200,18 @@ Curl_getaddrinfo_ex(const char *nodename,
Curl_freeaddrinfo(cafirst);
cafirst = NULL;
}
+ else if(!cafirst) {
+#ifdef EAI_NONAME
+ /* rfc3493 conformant */
+ error = EAI_NONAME;
+#else
+ /* rfc3493 obsoleted */
+ error = EAI_NODATA;
+#endif
+#ifdef USE_WINSOCK
+ SET_SOCKERRNO(error);
+#endif
+ }
*result = cafirst;
@@ -269,7 +286,7 @@ Curl_he2ai(const struct hostent *he, int port)
size_t ss_size;
#ifdef ENABLE_IPV6
- if (he->h_addrtype == AF_INET6)
+ if(he->h_addrtype == AF_INET6)
ss_size = sizeof (struct sockaddr_in6);
else
#endif
@@ -332,7 +349,7 @@ Curl_he2ai(const struct hostent *he, int port)
prevai = ai;
}
- if(result != CURLE_OK) {
+ if(result) {
Curl_freeaddrinfo(firstai);
firstai = NULL;
}
@@ -434,6 +451,62 @@ Curl_ip2addr(int af, const void *inaddr, const char *hostname, int port)
return ai;
}
+/*
+ * Given an IPv4 or IPv6 dotted string address, this converts it to a proper
+ * allocated Curl_addrinfo struct and returns it.
+ */
+Curl_addrinfo *Curl_str2addr(char *address, int port)
+{
+ struct in_addr in;
+ if(Curl_inet_pton(AF_INET, address, &in) > 0)
+ /* This is a dotted IP address 123.123.123.123-style */
+ return Curl_ip2addr(AF_INET, &in, address, port);
+#ifdef ENABLE_IPV6
+ else {
+ struct in6_addr in6;
+ if(Curl_inet_pton(AF_INET6, address, &in6) > 0)
+ /* This is a dotted IPv6 address ::1-style */
+ return Curl_ip2addr(AF_INET6, &in6, address, port);
+ }
+#endif
+ 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)
/*
@@ -441,7 +514,7 @@ Curl_ip2addr(int af, const void *inaddr, const char *hostname, int port)
*
* This is strictly for memory tracing and are using the same style as the
* family otherwise present in memdebug.c. I put these ones here since they
- * require a bunch of structs I didn't wanna include in memdebug.c
+ * require a bunch of structs I didn't want to include in memdebug.c
*/
void
@@ -461,7 +534,7 @@ curl_dofreeaddrinfo(struct addrinfo *freethis,
*
* This is strictly for memory tracing and are using the same style as the
* family otherwise present in memdebug.c. I put these ones here since they
- * require a bunch of structs I didn't wanna include in memdebug.c
+ * require a bunch of structs I didn't want to include in memdebug.c
*/
int
diff --git a/lib/curl_addrinfo.h b/lib/curl_addrinfo.h
index 63159cc4..4ef88270 100644
--- a/lib/curl_addrinfo.h
+++ b/lib/curl_addrinfo.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -22,11 +22,8 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
@@ -80,6 +77,12 @@ Curl_he2ai(const struct hostent *he, int port);
Curl_addrinfo *
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 2498a0a2..92896fec 100644
--- a/lib/curl_base64.h
+++ b/lib/curl_base64.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,10 +22,14 @@
*
***************************************************************************/
-size_t Curl_base64_encode(struct SessionHandle *data,
- const char *inputbuff, size_t insize,
- char **outptr);
+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);
-size_t Curl_base64_decode(const char *src, unsigned char **outptr);
+CURLcode Curl_base64_decode(const char *src,
+ unsigned char **outptr, size_t *outlen);
#endif /* HEADER_CURL_BASE64_H */
diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake
index deebe71d..5376aa7e 100644
--- a/lib/curl_config.h.cmake
+++ b/lib/curl_config.h.cmake
@@ -1,10 +1,7 @@
-/* lib/curl_config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the $func function. */
-#cmakedefine AS_TR_CPP ${AS_TR_CPP}
+/* lib/curl_config.h.in. Generated somehow by cmake. */
/* when building libcurl itself */
-#cmakedefine BUILDING_LIBCURL ${BUILDING_LIBCURL}
+#cmakedefine BUILDING_LIBCURL 1
/* Location of default ca bundle */
#cmakedefine CURL_CA_BUNDLE ${CURL_CA_BUNDLE}
@@ -13,65 +10,62 @@
#cmakedefine CURL_CA_PATH ${CURL_CA_PATH}
/* to disable cookies support */
-#cmakedefine CURL_DISABLE_COOKIES ${CURL_DISABLE_COOKIES}
+#cmakedefine CURL_DISABLE_COOKIES 1
/* to disable cryptographic authentication */
-#cmakedefine CURL_DISABLE_CRYPTO_AUTH ${CURL_DISABLE_CRYPTO_AUTH}
+#cmakedefine CURL_DISABLE_CRYPTO_AUTH 1
/* to disable DICT */
-#cmakedefine CURL_DISABLE_DICT ${CURL_DISABLE_DICT}
+#cmakedefine CURL_DISABLE_DICT 1
/* to disable FILE */
-#cmakedefine CURL_DISABLE_FILE ${CURL_DISABLE_FILE}
+#cmakedefine CURL_DISABLE_FILE 1
/* to disable FTP */
-#cmakedefine CURL_DISABLE_FTP ${CURL_DISABLE_FTP}
+#cmakedefine CURL_DISABLE_FTP 1
/* to disable HTTP */
-#cmakedefine CURL_DISABLE_HTTP ${CURL_DISABLE_HTTP}
+#cmakedefine CURL_DISABLE_HTTP 1
/* to disable LDAP */
-#cmakedefine CURL_DISABLE_LDAP ${CURL_DISABLE_LDAP}
+#cmakedefine CURL_DISABLE_LDAP 1
/* to disable LDAPS */
-#cmakedefine CURL_DISABLE_LDAPS ${CURL_DISABLE_LDAPS}
+#cmakedefine CURL_DISABLE_LDAPS 1
/* to disable proxies */
-#cmakedefine CURL_DISABLE_PROXY ${CURL_DISABLE_PROXY}
+#cmakedefine CURL_DISABLE_PROXY 1
/* to disable TELNET */
-#cmakedefine CURL_DISABLE_TELNET ${CURL_DISABLE_TELNET}
+#cmakedefine CURL_DISABLE_TELNET 1
/* to disable TFTP */
-#cmakedefine CURL_DISABLE_TFTP ${CURL_DISABLE_TFTP}
+#cmakedefine CURL_DISABLE_TFTP 1
/* to disable verbose strings */
-#cmakedefine CURL_DISABLE_VERBOSE_STRINGS ${CURL_DISABLE_VERBOSE_STRINGS}
+#cmakedefine CURL_DISABLE_VERBOSE_STRINGS 1
/* to make a symbol visible */
-#cmakedefine CURL_EXTERN_SYMBOL ${CURL_EXTERN_SYMBOL}
+#cmakedefine CURL_EXTERN_SYMBOL 1
/* Ensure using CURL_EXTERN_SYMBOL is possible */
#ifndef CURL_EXTERN_SYMBOL
#define CURL_EXTERN_SYMBOL
#endif
-/* to enable hidden symbols */
-#cmakedefine CURL_HIDDEN_SYMBOLS ${CURL_HIDDEN_SYMBOLS}
-
/* Use Windows LDAP implementation */
-#cmakedefine CURL_LDAP_WIN ${CURL_LDAP_WIN}
+#cmakedefine USE_WIN32_LDAP 1
/* when not building a shared library */
-#cmakedefine CURL_STATICLIB ${CURL_STATICLIB}
+#cmakedefine CURL_STATICLIB 1
/* Set to explicitly specify we don't want to use thread-safe functions */
-#cmakedefine DISABLED_THREADSAFE ${DISABLED_THREADSAFE}
+#cmakedefine DISABLED_THREADSAFE 1
/* your Entropy Gathering Daemon socket pathname */
#cmakedefine EGD_SOCKET ${EGD_SOCKET}
/* Define if you want to enable IPv6 support */
-#cmakedefine ENABLE_IPV6 ${ENABLE_IPV6}
+#cmakedefine ENABLE_IPV6 1
/* Define to the type qualifier of arg 1 for getnameinfo. */
#cmakedefine GETNAMEINFO_QUAL_ARG1 ${GETNAMEINFO_QUAL_ARG1}
@@ -95,652 +89,660 @@
#cmakedefine GETSERVBYPORT_R_BUFSIZE ${GETSERVBYPORT_R_BUFSIZE}
/* Define to 1 if you have the alarm function. */
-#cmakedefine HAVE_ALARM ${HAVE_ALARM}
+#cmakedefine HAVE_ALARM 1
/* Define to 1 if you have the <alloca.h> header file. */
-#cmakedefine HAVE_ALLOCA_H ${HAVE_ALLOCA_H}
+#cmakedefine HAVE_ALLOCA_H 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
-#cmakedefine HAVE_ARPA_INET_H ${HAVE_ARPA_INET_H}
+#cmakedefine HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <arpa/tftp.h> header file. */
-#cmakedefine HAVE_ARPA_TFTP_H ${HAVE_ARPA_TFTP_H}
+#cmakedefine HAVE_ARPA_TFTP_H 1
/* Define to 1 if you have the <assert.h> header file. */
-#cmakedefine HAVE_ASSERT_H ${HAVE_ASSERT_H}
+#cmakedefine HAVE_ASSERT_H 1
/* Define to 1 if you have the `basename' function. */
-#cmakedefine HAVE_BASENAME ${HAVE_BASENAME}
+#cmakedefine HAVE_BASENAME 1
/* Define to 1 if bool is an available type. */
-#cmakedefine HAVE_BOOL_T ${HAVE_BOOL_T}
+#cmakedefine HAVE_BOOL_T 1
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
-#cmakedefine HAVE_CLOCK_GETTIME_MONOTONIC ${HAVE_CLOCK_GETTIME_MONOTONIC}
+#cmakedefine HAVE_CLOCK_GETTIME_MONOTONIC 1
/* Define to 1 if you have the `closesocket' function. */
-#cmakedefine HAVE_CLOSESOCKET ${HAVE_CLOSESOCKET}
+#cmakedefine HAVE_CLOSESOCKET 1
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
-#cmakedefine HAVE_CRYPTO_CLEANUP_ALL_EX_DATA ${HAVE_CRYPTO_CLEANUP_ALL_EX_DATA}
+#cmakedefine HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
/* Define to 1 if you have the <crypto.h> header file. */
-#cmakedefine HAVE_CRYPTO_H ${HAVE_CRYPTO_H}
+#cmakedefine HAVE_CRYPTO_H 1
/* Define to 1 if you have the <des.h> header file. */
-#cmakedefine HAVE_DES_H ${HAVE_DES_H}
+#cmakedefine HAVE_DES_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
-#cmakedefine HAVE_DLFCN_H ${HAVE_DLFCN_H}
+#cmakedefine HAVE_DLFCN_H 1
/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */
-#cmakedefine HAVE_ENGINE_LOAD_BUILTIN_ENGINES ${HAVE_ENGINE_LOAD_BUILTIN_ENGINES}
+#cmakedefine HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1
/* Define to 1 if you have the <errno.h> header file. */
-#cmakedefine HAVE_ERRNO_H ${HAVE_ERRNO_H}
+#cmakedefine HAVE_ERRNO_H 1
/* Define to 1 if you have the <err.h> header file. */
-#cmakedefine HAVE_ERR_H ${HAVE_ERR_H}
+#cmakedefine HAVE_ERR_H 1
/* Define to 1 if you have the fcntl function. */
-#cmakedefine HAVE_FCNTL ${HAVE_FCNTL}
+#cmakedefine HAVE_FCNTL 1
/* Define to 1 if you have the <fcntl.h> header file. */
-#cmakedefine HAVE_FCNTL_H ${HAVE_FCNTL_H}
+#cmakedefine HAVE_FCNTL_H 1
/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
-#cmakedefine HAVE_FCNTL_O_NONBLOCK ${HAVE_FCNTL_O_NONBLOCK}
+#cmakedefine HAVE_FCNTL_O_NONBLOCK 1
/* Define to 1 if you have the fdopen function. */
-#cmakedefine HAVE_FDOPEN ${HAVE_FDOPEN}
+#cmakedefine HAVE_FDOPEN 1
/* Define to 1 if you have the `fork' function. */
-#cmakedefine HAVE_FORK ${HAVE_FORK}
+#cmakedefine HAVE_FORK 1
/* Define to 1 if you have the freeaddrinfo function. */
-#cmakedefine HAVE_FREEADDRINFO ${HAVE_FREEADDRINFO}
+#cmakedefine HAVE_FREEADDRINFO 1
/* Define to 1 if you have the freeifaddrs function. */
-#cmakedefine HAVE_FREEIFADDRS ${HAVE_FREEIFADDRS}
+#cmakedefine HAVE_FREEIFADDRS 1
/* Define to 1 if you have the ftruncate function. */
-#cmakedefine HAVE_FTRUNCATE ${HAVE_FTRUNCATE}
+#cmakedefine HAVE_FTRUNCATE 1
/* Define to 1 if you have a working getaddrinfo function. */
-#cmakedefine HAVE_GETADDRINFO ${HAVE_GETADDRINFO}
+#cmakedefine HAVE_GETADDRINFO 1
/* Define to 1 if you have the `geteuid' function. */
-#cmakedefine HAVE_GETEUID ${HAVE_GETEUID}
+#cmakedefine HAVE_GETEUID 1
/* Define to 1 if you have the gethostbyaddr function. */
-#cmakedefine HAVE_GETHOSTBYADDR ${HAVE_GETHOSTBYADDR}
+#cmakedefine HAVE_GETHOSTBYADDR 1
/* Define to 1 if you have the gethostbyaddr_r function. */
-#cmakedefine HAVE_GETHOSTBYADDR_R ${HAVE_GETHOSTBYADDR_R}
+#cmakedefine HAVE_GETHOSTBYADDR_R 1
/* gethostbyaddr_r() takes 5 args */
-#cmakedefine HAVE_GETHOSTBYADDR_R_5 ${HAVE_GETHOSTBYADDR_R_5}
+#cmakedefine HAVE_GETHOSTBYADDR_R_5 1
/* gethostbyaddr_r() takes 7 args */
-#cmakedefine HAVE_GETHOSTBYADDR_R_7 ${HAVE_GETHOSTBYADDR_R_7}
+#cmakedefine HAVE_GETHOSTBYADDR_R_7 1
/* gethostbyaddr_r() takes 8 args */
-#cmakedefine HAVE_GETHOSTBYADDR_R_8 ${HAVE_GETHOSTBYADDR_R_8}
+#cmakedefine HAVE_GETHOSTBYADDR_R_8 1
/* Define to 1 if you have the gethostbyname function. */
-#cmakedefine HAVE_GETHOSTBYNAME ${HAVE_GETHOSTBYNAME}
+#cmakedefine HAVE_GETHOSTBYNAME 1
/* Define to 1 if you have the gethostbyname_r function. */
-#cmakedefine HAVE_GETHOSTBYNAME_R ${HAVE_GETHOSTBYNAME_R}
+#cmakedefine HAVE_GETHOSTBYNAME_R 1
/* gethostbyname_r() takes 3 args */
-#cmakedefine HAVE_GETHOSTBYNAME_R_3 ${HAVE_GETHOSTBYNAME_R_3}
+#cmakedefine HAVE_GETHOSTBYNAME_R_3 1
/* gethostbyname_r() takes 5 args */
-#cmakedefine HAVE_GETHOSTBYNAME_R_5 ${HAVE_GETHOSTBYNAME_R_5}
+#cmakedefine HAVE_GETHOSTBYNAME_R_5 1
/* gethostbyname_r() takes 6 args */
-#cmakedefine HAVE_GETHOSTBYNAME_R_6 ${HAVE_GETHOSTBYNAME_R_6}
+#cmakedefine HAVE_GETHOSTBYNAME_R_6 1
/* Define to 1 if you have the gethostname function. */
-#cmakedefine HAVE_GETHOSTNAME ${HAVE_GETHOSTNAME}
+#cmakedefine HAVE_GETHOSTNAME 1
/* Define to 1 if you have a working getifaddrs function. */
-#cmakedefine HAVE_GETIFADDRS ${HAVE_GETIFADDRS}
+#cmakedefine HAVE_GETIFADDRS 1
/* Define to 1 if you have the getnameinfo function. */
-#cmakedefine HAVE_GETNAMEINFO ${HAVE_GETNAMEINFO}
+#cmakedefine HAVE_GETNAMEINFO 1
/* Define to 1 if you have the `getpass_r' function. */
-#cmakedefine HAVE_GETPASS_R ${HAVE_GETPASS_R}
+#cmakedefine HAVE_GETPASS_R 1
/* Define to 1 if you have the `getppid' function. */
-#cmakedefine HAVE_GETPPID ${HAVE_GETPPID}
+#cmakedefine HAVE_GETPPID 1
/* Define to 1 if you have the `getprotobyname' function. */
-#cmakedefine HAVE_GETPROTOBYNAME ${HAVE_GETPROTOBYNAME}
+#cmakedefine HAVE_GETPROTOBYNAME 1
/* Define to 1 if you have the `getpwuid' function. */
-#cmakedefine HAVE_GETPWUID ${HAVE_GETPWUID}
+#cmakedefine HAVE_GETPWUID 1
/* Define to 1 if you have the `getrlimit' function. */
-#cmakedefine HAVE_GETRLIMIT ${HAVE_GETRLIMIT}
+#cmakedefine HAVE_GETRLIMIT 1
/* Define to 1 if you have the getservbyport_r function. */
-#cmakedefine HAVE_GETSERVBYPORT_R ${HAVE_GETSERVBYPORT_R}
+#cmakedefine HAVE_GETSERVBYPORT_R 1
/* Define to 1 if you have the `gettimeofday' function. */
-#cmakedefine HAVE_GETTIMEOFDAY ${HAVE_GETTIMEOFDAY}
+#cmakedefine HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have a working glibc-style strerror_r function. */
-#cmakedefine HAVE_GLIBC_STRERROR_R ${HAVE_GLIBC_STRERROR_R}
+#cmakedefine HAVE_GLIBC_STRERROR_R 1
/* Define to 1 if you have a working gmtime_r function. */
-#cmakedefine HAVE_GMTIME_R ${HAVE_GMTIME_R}
+#cmakedefine HAVE_GMTIME_R 1
/* if you have the gssapi libraries */
-#cmakedefine HAVE_GSSAPI ${HAVE_GSSAPI}
+#cmakedefine HAVE_GSSAPI 1
/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
-#cmakedefine HAVE_GSSAPI_GSSAPI_GENERIC_H ${HAVE_GSSAPI_GSSAPI_GENERIC_H}
+#cmakedefine HAVE_GSSAPI_GSSAPI_GENERIC_H 1
/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
-#cmakedefine HAVE_GSSAPI_GSSAPI_H ${HAVE_GSSAPI_GSSAPI_H}
+#cmakedefine HAVE_GSSAPI_GSSAPI_H 1
/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
-#cmakedefine HAVE_GSSAPI_GSSAPI_KRB5_H ${HAVE_GSSAPI_GSSAPI_KRB5_H}
+#cmakedefine HAVE_GSSAPI_GSSAPI_KRB5_H 1
/* if you have the GNU gssapi libraries */
-#cmakedefine HAVE_GSSGNU ${HAVE_GSSGNU}
+#cmakedefine HAVE_GSSGNU 1
/* if you have the Heimdal gssapi libraries */
-#cmakedefine HAVE_GSSHEIMDAL ${HAVE_GSSHEIMDAL}
+#cmakedefine HAVE_GSSHEIMDAL 1
/* if you have the MIT gssapi libraries */
-#cmakedefine HAVE_GSSMIT ${HAVE_GSSMIT}
+#cmakedefine HAVE_GSSMIT 1
/* Define to 1 if you have the `idna_strerror' function. */
-#cmakedefine HAVE_IDNA_STRERROR ${HAVE_IDNA_STRERROR}
+#cmakedefine HAVE_IDNA_STRERROR 1
/* Define to 1 if you have the `idn_free' function. */
-#cmakedefine HAVE_IDN_FREE ${HAVE_IDN_FREE}
+#cmakedefine HAVE_IDN_FREE 1
/* Define to 1 if you have the <idn-free.h> header file. */
-#cmakedefine HAVE_IDN_FREE_H ${HAVE_IDN_FREE_H}
+#cmakedefine HAVE_IDN_FREE_H 1
/* Define to 1 if you have the <ifaddrs.h> header file. */
-#cmakedefine HAVE_IFADDRS_H ${HAVE_IFADDRS_H}
+#cmakedefine HAVE_IFADDRS_H 1
/* Define to 1 if you have the `inet_addr' function. */
-#cmakedefine HAVE_INET_ADDR ${HAVE_INET_ADDR}
+#cmakedefine HAVE_INET_ADDR 1
/* Define to 1 if you have the inet_ntoa_r function. */
-#cmakedefine HAVE_INET_NTOA_R ${HAVE_INET_NTOA_R}
+#cmakedefine HAVE_INET_NTOA_R 1
/* inet_ntoa_r() takes 2 args */
-#cmakedefine HAVE_INET_NTOA_R_2 ${HAVE_INET_NTOA_R_2}
+#cmakedefine HAVE_INET_NTOA_R_2 1
/* inet_ntoa_r() takes 3 args */
-#cmakedefine HAVE_INET_NTOA_R_3 ${HAVE_INET_NTOA_R_3}
+#cmakedefine HAVE_INET_NTOA_R_3 1
/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
-#cmakedefine HAVE_INET_NTOP ${HAVE_INET_NTOP}
+#cmakedefine HAVE_INET_NTOP 1
/* Define to 1 if you have a IPv6 capable working inet_pton function. */
-#cmakedefine HAVE_INET_PTON ${HAVE_INET_PTON}
+#cmakedefine HAVE_INET_PTON 1
/* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H}
+#cmakedefine HAVE_INTTYPES_H 1
/* Define to 1 if you have the ioctl function. */
-#cmakedefine HAVE_IOCTL ${HAVE_IOCTL}
+#cmakedefine HAVE_IOCTL 1
/* Define to 1 if you have the ioctlsocket function. */
-#cmakedefine HAVE_IOCTLSOCKET ${HAVE_IOCTLSOCKET}
+#cmakedefine HAVE_IOCTLSOCKET 1
/* Define to 1 if you have the IoctlSocket camel case function. */
-#cmakedefine HAVE_IOCTLSOCKET_CAMEL ${HAVE_IOCTLSOCKET_CAMEL}
+#cmakedefine HAVE_IOCTLSOCKET_CAMEL 1
/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function.
*/
-#cmakedefine HAVE_IOCTLSOCKET_CAMEL_FIONBIO ${HAVE_IOCTLSOCKET_CAMEL_FIONBIO}
+#cmakedefine HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1
/* Define to 1 if you have a working ioctlsocket FIONBIO function. */
-#cmakedefine HAVE_IOCTLSOCKET_FIONBIO ${HAVE_IOCTLSOCKET_FIONBIO}
+#cmakedefine HAVE_IOCTLSOCKET_FIONBIO 1
/* Define to 1 if you have a working ioctl FIONBIO function. */
-#cmakedefine HAVE_IOCTL_FIONBIO ${HAVE_IOCTL_FIONBIO}
+#cmakedefine HAVE_IOCTL_FIONBIO 1
/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
-#cmakedefine HAVE_IOCTL_SIOCGIFADDR ${HAVE_IOCTL_SIOCGIFADDR}
+#cmakedefine HAVE_IOCTL_SIOCGIFADDR 1
/* Define to 1 if you have the <io.h> header file. */
-#cmakedefine HAVE_IO_H ${HAVE_IO_H}
+#cmakedefine HAVE_IO_H 1
/* if you have the Kerberos4 libraries (including -ldes) */
-#cmakedefine HAVE_KRB4 ${HAVE_KRB4}
+#cmakedefine HAVE_KRB4 1
/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
-#cmakedefine HAVE_KRB_GET_OUR_IP_FOR_REALM ${HAVE_KRB_GET_OUR_IP_FOR_REALM}
+#cmakedefine HAVE_KRB_GET_OUR_IP_FOR_REALM 1
/* Define to 1 if you have the <krb.h> header file. */
-#cmakedefine HAVE_KRB_H ${HAVE_KRB_H}
+#cmakedefine HAVE_KRB_H 1
/* Define to 1 if you have the lber.h header file. */
-#cmakedefine HAVE_LBER_H ${HAVE_LBER_H}
+#cmakedefine HAVE_LBER_H 1
/* Define to 1 if you have the ldapssl.h header file. */
-#cmakedefine HAVE_LDAPSSL_H ${HAVE_LDAPSSL_H}
+#cmakedefine HAVE_LDAPSSL_H 1
/* Define to 1 if you have the ldap.h header file. */
-#cmakedefine HAVE_LDAP_H ${HAVE_LDAP_H}
+#cmakedefine HAVE_LDAP_H 1
/* Use LDAPS implementation */
-#cmakedefine HAVE_LDAP_SSL ${HAVE_LDAP_SSL}
+#cmakedefine HAVE_LDAP_SSL 1
/* Define to 1 if you have the ldap_ssl.h header file. */
-#cmakedefine HAVE_LDAP_SSL_H ${HAVE_LDAP_SSL_H}
+#cmakedefine HAVE_LDAP_SSL_H 1
/* Define to 1 if you have the `ldap_url_parse' function. */
-#cmakedefine HAVE_LDAP_URL_PARSE ${HAVE_LDAP_URL_PARSE}
+#cmakedefine HAVE_LDAP_URL_PARSE 1
/* Define to 1 if you have the <libgen.h> header file. */
-#cmakedefine HAVE_LIBGEN_H ${HAVE_LIBGEN_H}
+#cmakedefine HAVE_LIBGEN_H 1
/* Define to 1 if you have the `idn' library (-lidn). */
-#cmakedefine HAVE_LIBIDN ${HAVE_LIBIDN}
+#cmakedefine HAVE_LIBIDN 1
/* Define to 1 if you have the `resolv' library (-lresolv). */
-#cmakedefine HAVE_LIBRESOLV ${HAVE_LIBRESOLV}
+#cmakedefine HAVE_LIBRESOLV 1
/* Define to 1 if you have the `resolve' library (-lresolve). */
-#cmakedefine HAVE_LIBRESOLVE ${HAVE_LIBRESOLVE}
+#cmakedefine HAVE_LIBRESOLVE 1
/* Define to 1 if you have the `socket' library (-lsocket). */
-#cmakedefine HAVE_LIBSOCKET ${HAVE_LIBSOCKET}
+#cmakedefine HAVE_LIBSOCKET 1
/* Define to 1 if you have the `ssh2' library (-lssh2). */
-#cmakedefine HAVE_LIBSSH2 ${HAVE_LIBSSH2}
+#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
/* Define to 1 if you have the <libssh2.h> header file. */
-#cmakedefine HAVE_LIBSSH2_H ${HAVE_LIBSSH2_H}
+#cmakedefine HAVE_LIBSSH2_H 1
/* Define to 1 if you have the `ssl' library (-lssl). */
-#cmakedefine HAVE_LIBSSL ${HAVE_LIBSSL}
+#cmakedefine HAVE_LIBSSL 1
/* if zlib is available */
-#cmakedefine HAVE_LIBZ ${HAVE_LIBZ}
+#cmakedefine HAVE_LIBZ 1
/* Define to 1 if you have the <limits.h> header file. */
-#cmakedefine HAVE_LIMITS_H ${HAVE_LIMITS_H}
+#cmakedefine HAVE_LIMITS_H 1
/* if your compiler supports LL */
-#cmakedefine HAVE_LL ${HAVE_LL}
+#cmakedefine HAVE_LL 1
/* Define to 1 if you have the <locale.h> header file. */
-#cmakedefine HAVE_LOCALE_H ${HAVE_LOCALE_H}
+#cmakedefine HAVE_LOCALE_H 1
/* Define to 1 if you have a working localtime_r function. */
-#cmakedefine HAVE_LOCALTIME_R ${HAVE_LOCALTIME_R}
+#cmakedefine HAVE_LOCALTIME_R 1
/* Define to 1 if the compiler supports the 'long long' data type. */
-#cmakedefine HAVE_LONGLONG ${HAVE_LONGLONG}
+#cmakedefine HAVE_LONGLONG 1
/* Define to 1 if you have the malloc.h header file. */
-#cmakedefine HAVE_MALLOC_H ${HAVE_MALLOC_H}
+#cmakedefine HAVE_MALLOC_H 1
/* Define to 1 if you have the <memory.h> header file. */
-#cmakedefine HAVE_MEMORY_H ${HAVE_MEMORY_H}
+#cmakedefine HAVE_MEMORY_H 1
/* Define to 1 if you have the MSG_NOSIGNAL flag. */
-#cmakedefine HAVE_MSG_NOSIGNAL ${HAVE_MSG_NOSIGNAL}
+#cmakedefine HAVE_MSG_NOSIGNAL 1
/* Define to 1 if you have the <netdb.h> header file. */
-#cmakedefine HAVE_NETDB_H ${HAVE_NETDB_H}
+#cmakedefine HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
-#cmakedefine HAVE_NETINET_IN_H ${HAVE_NETINET_IN_H}
+#cmakedefine HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#cmakedefine HAVE_NETINET_TCP_H ${HAVE_NETINET_TCP_H}
+#cmakedefine HAVE_NETINET_TCP_H 1
/* Define to 1 if you have the <net/if.h> header file. */
-#cmakedefine HAVE_NET_IF_H ${HAVE_NET_IF_H}
+#cmakedefine HAVE_NET_IF_H 1
/* Define to 1 if NI_WITHSCOPEID exists and works. */
-#cmakedefine HAVE_NI_WITHSCOPEID ${HAVE_NI_WITHSCOPEID}
+#cmakedefine HAVE_NI_WITHSCOPEID 1
-/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
- */
-#cmakedefine HAVE_OLD_GSSMIT ${HAVE_OLD_GSSMIT}
+/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE */
+#cmakedefine HAVE_OLD_GSSMIT 1
/* Define to 1 if you have the <openssl/crypto.h> header file. */
-#cmakedefine HAVE_OPENSSL_CRYPTO_H ${HAVE_OPENSSL_CRYPTO_H}
+#cmakedefine HAVE_OPENSSL_CRYPTO_H 1
/* Define to 1 if you have the <openssl/engine.h> header file. */
-#cmakedefine HAVE_OPENSSL_ENGINE_H ${HAVE_OPENSSL_ENGINE_H}
+#cmakedefine HAVE_OPENSSL_ENGINE_H 1
/* Define to 1 if you have the <openssl/err.h> header file. */
-#cmakedefine HAVE_OPENSSL_ERR_H ${HAVE_OPENSSL_ERR_H}
+#cmakedefine HAVE_OPENSSL_ERR_H 1
/* Define to 1 if you have the <openssl/pem.h> header file. */
-#cmakedefine HAVE_OPENSSL_PEM_H ${HAVE_OPENSSL_PEM_H}
+#cmakedefine HAVE_OPENSSL_PEM_H 1
/* Define to 1 if you have the <openssl/pkcs12.h> header file. */
-#cmakedefine HAVE_OPENSSL_PKCS12_H ${HAVE_OPENSSL_PKCS12_H}
+#cmakedefine HAVE_OPENSSL_PKCS12_H 1
/* Define to 1 if you have the <openssl/rsa.h> header file. */
-#cmakedefine HAVE_OPENSSL_RSA_H ${HAVE_OPENSSL_RSA_H}
+#cmakedefine HAVE_OPENSSL_RSA_H 1
/* Define to 1 if you have the <openssl/ssl.h> header file. */
-#cmakedefine HAVE_OPENSSL_SSL_H ${HAVE_OPENSSL_SSL_H}
+#cmakedefine HAVE_OPENSSL_SSL_H 1
/* Define to 1 if you have the <openssl/x509.h> header file. */
-#cmakedefine HAVE_OPENSSL_X509_H ${HAVE_OPENSSL_X509_H}
+#cmakedefine HAVE_OPENSSL_X509_H 1
/* Define to 1 if you have the <pem.h> header file. */
-#cmakedefine HAVE_PEM_H ${HAVE_PEM_H}
+#cmakedefine HAVE_PEM_H 1
/* Define to 1 if you have the `perror' function. */
-#cmakedefine HAVE_PERROR ${HAVE_PERROR}
+#cmakedefine HAVE_PERROR 1
/* Define to 1 if you have the `pipe' function. */
-#cmakedefine HAVE_PIPE ${HAVE_PIPE}
-
-/* if you have the function PK11_CreateGenericObject */
-#cmakedefine HAVE_PK11_CREATEGENERICOBJECT ${HAVE_PK11_CREATEGENERICOBJECT}
+#cmakedefine HAVE_PIPE 1
/* Define to 1 if you have a working poll function. */
-#cmakedefine HAVE_POLL ${HAVE_POLL}
+#cmakedefine HAVE_POLL 1
/* If you have a fine poll */
-#cmakedefine HAVE_POLL_FINE ${HAVE_POLL_FINE}
+#cmakedefine HAVE_POLL_FINE 1
/* Define to 1 if you have the <poll.h> header file. */
-#cmakedefine HAVE_POLL_H ${HAVE_POLL_H}
+#cmakedefine HAVE_POLL_H 1
/* Define to 1 if you have a working POSIX-style strerror_r function. */
-#cmakedefine HAVE_POSIX_STRERROR_R ${HAVE_POSIX_STRERROR_R}
+#cmakedefine HAVE_POSIX_STRERROR_R 1
+
+/* Define to 1 if you have the <pthread.h> header file */
+#cmakedefine HAVE_PTHREAD_H 1
/* Define to 1 if you have the <pwd.h> header file. */
-#cmakedefine HAVE_PWD_H ${HAVE_PWD_H}
+#cmakedefine HAVE_PWD_H 1
/* Define to 1 if you have the `RAND_egd' function. */
-#cmakedefine HAVE_RAND_EGD ${HAVE_RAND_EGD}
+#cmakedefine HAVE_RAND_EGD 1
/* Define to 1 if you have the `RAND_screen' function. */
-#cmakedefine HAVE_RAND_SCREEN ${HAVE_RAND_SCREEN}
+#cmakedefine HAVE_RAND_SCREEN 1
/* Define to 1 if you have the `RAND_status' function. */
-#cmakedefine HAVE_RAND_STATUS ${HAVE_RAND_STATUS}
+#cmakedefine HAVE_RAND_STATUS 1
/* Define to 1 if you have the recv function. */
-#cmakedefine HAVE_RECV ${HAVE_RECV}
+#cmakedefine HAVE_RECV 1
/* Define to 1 if you have the recvfrom function. */
-#cmakedefine HAVE_RECVFROM ${HAVE_RECVFROM}
+#cmakedefine HAVE_RECVFROM 1
/* Define to 1 if you have the <rsa.h> header file. */
-#cmakedefine HAVE_RSA_H ${HAVE_RSA_H}
+#cmakedefine HAVE_RSA_H 1
/* Define to 1 if you have the select function. */
-#cmakedefine HAVE_SELECT ${HAVE_SELECT}
+#cmakedefine HAVE_SELECT 1
/* Define to 1 if you have the send function. */
-#cmakedefine HAVE_SEND ${HAVE_SEND}
+#cmakedefine HAVE_SEND 1
/* Define to 1 if you have the <setjmp.h> header file. */
-#cmakedefine HAVE_SETJMP_H ${HAVE_SETJMP_H}
+#cmakedefine HAVE_SETJMP_H 1
/* Define to 1 if you have the `setlocale' function. */
-#cmakedefine HAVE_SETLOCALE ${HAVE_SETLOCALE}
+#cmakedefine HAVE_SETLOCALE 1
/* Define to 1 if you have the `setmode' function. */
-#cmakedefine HAVE_SETMODE ${HAVE_SETMODE}
+#cmakedefine HAVE_SETMODE 1
/* Define to 1 if you have the `setrlimit' function. */
-#cmakedefine HAVE_SETRLIMIT ${HAVE_SETRLIMIT}
+#cmakedefine HAVE_SETRLIMIT 1
/* Define to 1 if you have the setsockopt function. */
-#cmakedefine HAVE_SETSOCKOPT ${HAVE_SETSOCKOPT}
+#cmakedefine HAVE_SETSOCKOPT 1
/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
-#cmakedefine HAVE_SETSOCKOPT_SO_NONBLOCK ${HAVE_SETSOCKOPT_SO_NONBLOCK}
+#cmakedefine HAVE_SETSOCKOPT_SO_NONBLOCK 1
/* Define to 1 if you have the <sgtty.h> header file. */
-#cmakedefine HAVE_SGTTY_H ${HAVE_SGTTY_H}
+#cmakedefine HAVE_SGTTY_H 1
/* Define to 1 if you have the sigaction function. */
-#cmakedefine HAVE_SIGACTION ${HAVE_SIGACTION}
+#cmakedefine HAVE_SIGACTION 1
/* Define to 1 if you have the siginterrupt function. */
-#cmakedefine HAVE_SIGINTERRUPT ${HAVE_SIGINTERRUPT}
+#cmakedefine HAVE_SIGINTERRUPT 1
/* Define to 1 if you have the signal function. */
-#cmakedefine HAVE_SIGNAL ${HAVE_SIGNAL}
+#cmakedefine HAVE_SIGNAL 1
/* Define to 1 if you have the <signal.h> header file. */
-#cmakedefine HAVE_SIGNAL_H ${HAVE_SIGNAL_H}
+#cmakedefine HAVE_SIGNAL_H 1
/* Define to 1 if you have the sigsetjmp function or macro. */
-#cmakedefine HAVE_SIGSETJMP ${HAVE_SIGSETJMP}
+#cmakedefine HAVE_SIGSETJMP 1
/* Define to 1 if sig_atomic_t is an available typedef. */
-#cmakedefine HAVE_SIG_ATOMIC_T ${HAVE_SIG_ATOMIC_T}
+#cmakedefine HAVE_SIG_ATOMIC_T 1
/* Define to 1 if sig_atomic_t is already defined as volatile. */
-#cmakedefine HAVE_SIG_ATOMIC_T_VOLATILE ${HAVE_SIG_ATOMIC_T_VOLATILE}
+#cmakedefine HAVE_SIG_ATOMIC_T_VOLATILE 1
/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */
-#cmakedefine HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID ${HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID}
+#cmakedefine HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* Define to 1 if you have the `socket' function. */
-#cmakedefine HAVE_SOCKET ${HAVE_SOCKET}
-
-/* Define this if you have the SPNEGO library fbopenssl */
-#cmakedefine HAVE_SPNEGO ${HAVE_SPNEGO}
+#cmakedefine HAVE_SOCKET 1
/* Define to 1 if you have the `SSL_get_shutdown' function. */
-#cmakedefine HAVE_SSL_GET_SHUTDOWN ${HAVE_SSL_GET_SHUTDOWN}
+#cmakedefine HAVE_SSL_GET_SHUTDOWN 1
/* Define to 1 if you have the <ssl.h> header file. */
-#cmakedefine HAVE_SSL_H ${HAVE_SSL_H}
+#cmakedefine HAVE_SSL_H 1
/* Define to 1 if you have the <stdbool.h> header file. */
-#cmakedefine HAVE_STDBOOL_H ${HAVE_STDBOOL_H}
+#cmakedefine HAVE_STDBOOL_H 1
/* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H}
+#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
-#cmakedefine HAVE_STDIO_H ${HAVE_STDIO_H}
+#cmakedefine HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H ${HAVE_STDLIB_H}
+#cmakedefine HAVE_STDLIB_H 1
/* Define to 1 if you have the strcasecmp function. */
-#cmakedefine HAVE_STRCASECMP ${HAVE_STRCASECMP}
+#cmakedefine HAVE_STRCASECMP 1
/* Define to 1 if you have the strcasestr function. */
-#cmakedefine HAVE_STRCASESTR ${HAVE_STRCASESTR}
+#cmakedefine HAVE_STRCASESTR 1
/* Define to 1 if you have the strcmpi function. */
-#cmakedefine HAVE_STRCMPI ${HAVE_STRCMPI}
+#cmakedefine HAVE_STRCMPI 1
/* Define to 1 if you have the strdup function. */
-#cmakedefine HAVE_STRDUP ${HAVE_STRDUP}
+#cmakedefine HAVE_STRDUP 1
/* Define to 1 if you have the strerror_r function. */
-#cmakedefine HAVE_STRERROR_R ${HAVE_STRERROR_R}
+#cmakedefine HAVE_STRERROR_R 1
/* Define to 1 if you have the stricmp function. */
-#cmakedefine HAVE_STRICMP ${HAVE_STRICMP}
+#cmakedefine HAVE_STRICMP 1
/* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H}
+#cmakedefine HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H ${HAVE_STRING_H}
+#cmakedefine HAVE_STRING_H 1
/* Define to 1 if you have the strlcat function. */
-#cmakedefine HAVE_STRLCAT ${HAVE_STRLCAT}
+#cmakedefine HAVE_STRLCAT 1
/* Define to 1 if you have the `strlcpy' function. */
-#cmakedefine HAVE_STRLCPY ${HAVE_STRLCPY}
+#cmakedefine HAVE_STRLCPY 1
/* Define to 1 if you have the strncasecmp function. */
-#cmakedefine HAVE_STRNCASECMP ${HAVE_STRNCASECMP}
+#cmakedefine HAVE_STRNCASECMP 1
/* Define to 1 if you have the strncmpi function. */
-#cmakedefine HAVE_STRNCMPI ${HAVE_STRNCMPI}
+#cmakedefine HAVE_STRNCMPI 1
/* Define to 1 if you have the strnicmp function. */
-#cmakedefine HAVE_STRNICMP ${HAVE_STRNICMP}
+#cmakedefine HAVE_STRNICMP 1
/* Define to 1 if you have the <stropts.h> header file. */
-#cmakedefine HAVE_STROPTS_H ${HAVE_STROPTS_H}
+#cmakedefine HAVE_STROPTS_H 1
/* Define to 1 if you have the strstr function. */
-#cmakedefine HAVE_STRSTR ${HAVE_STRSTR}
+#cmakedefine HAVE_STRSTR 1
/* Define to 1 if you have the strtok_r function. */
-#cmakedefine HAVE_STRTOK_R ${HAVE_STRTOK_R}
+#cmakedefine HAVE_STRTOK_R 1
/* Define to 1 if you have the strtoll function. */
-#cmakedefine HAVE_STRTOLL ${HAVE_STRTOLL}
+#cmakedefine HAVE_STRTOLL 1
/* if struct sockaddr_storage is defined */
-#cmakedefine HAVE_STRUCT_SOCKADDR_STORAGE ${HAVE_STRUCT_SOCKADDR_STORAGE}
+#cmakedefine HAVE_STRUCT_SOCKADDR_STORAGE 1
/* Define to 1 if you have the timeval struct. */
-#cmakedefine HAVE_STRUCT_TIMEVAL ${HAVE_STRUCT_TIMEVAL}
+#cmakedefine HAVE_STRUCT_TIMEVAL 1
/* Define to 1 if you have the <sys/filio.h> header file. */
-#cmakedefine HAVE_SYS_FILIO_H ${HAVE_SYS_FILIO_H}
+#cmakedefine HAVE_SYS_FILIO_H 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#cmakedefine HAVE_SYS_IOCTL_H ${HAVE_SYS_IOCTL_H}
+#cmakedefine HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
-#cmakedefine HAVE_SYS_PARAM_H ${HAVE_SYS_PARAM_H}
+#cmakedefine HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/poll.h> header file. */
-#cmakedefine HAVE_SYS_POLL_H ${HAVE_SYS_POLL_H}
+#cmakedefine HAVE_SYS_POLL_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
-#cmakedefine HAVE_SYS_RESOURCE_H ${HAVE_SYS_RESOURCE_H}
+#cmakedefine HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
-#cmakedefine HAVE_SYS_SELECT_H ${HAVE_SYS_SELECT_H}
+#cmakedefine HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
-#cmakedefine HAVE_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H}
+#cmakedefine HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/sockio.h> header file. */
-#cmakedefine HAVE_SYS_SOCKIO_H ${HAVE_SYS_SOCKIO_H}
+#cmakedefine HAVE_SYS_SOCKIO_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine HAVE_SYS_STAT_H ${HAVE_SYS_STAT_H}
+#cmakedefine HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
-#cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H}
+#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
-#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H}
+#cmakedefine HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/uio.h> header file. */
-#cmakedefine HAVE_SYS_UIO_H ${HAVE_SYS_UIO_H}
+#cmakedefine HAVE_SYS_UIO_H 1
/* Define to 1 if you have the <sys/un.h> header file. */
-#cmakedefine HAVE_SYS_UN_H ${HAVE_SYS_UN_H}
+#cmakedefine HAVE_SYS_UN_H 1
/* Define to 1 if you have the <sys/utime.h> header file. */
-#cmakedefine HAVE_SYS_UTIME_H ${HAVE_SYS_UTIME_H}
+#cmakedefine HAVE_SYS_UTIME_H 1
/* Define to 1 if you have the <termios.h> header file. */
-#cmakedefine HAVE_TERMIOS_H ${HAVE_TERMIOS_H}
+#cmakedefine HAVE_TERMIOS_H 1
/* Define to 1 if you have the <termio.h> header file. */
-#cmakedefine HAVE_TERMIO_H ${HAVE_TERMIO_H}
+#cmakedefine HAVE_TERMIO_H 1
/* Define to 1 if you have the <time.h> header file. */
-#cmakedefine HAVE_TIME_H ${HAVE_TIME_H}
+#cmakedefine HAVE_TIME_H 1
/* Define to 1 if you have the <tld.h> header file. */
-#cmakedefine HAVE_TLD_H ${HAVE_TLD_H}
+#cmakedefine HAVE_TLD_H 1
/* Define to 1 if you have the `tld_strerror' function. */
-#cmakedefine HAVE_TLD_STRERROR ${HAVE_TLD_STRERROR}
+#cmakedefine HAVE_TLD_STRERROR 1
/* Define to 1 if you have the `uname' function. */
-#cmakedefine HAVE_UNAME ${HAVE_UNAME}
+#cmakedefine HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
-#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}
+#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have the `utime' function. */
-#cmakedefine HAVE_UTIME ${HAVE_UTIME}
+#cmakedefine HAVE_UTIME 1
/* Define to 1 if you have the <utime.h> header file. */
-#cmakedefine HAVE_UTIME_H ${HAVE_UTIME_H}
+#cmakedefine HAVE_UTIME_H 1
/* Define to 1 if compiler supports C99 variadic macro style. */
-#cmakedefine HAVE_VARIADIC_MACROS_C99 ${HAVE_VARIADIC_MACROS_C99}
+#cmakedefine HAVE_VARIADIC_MACROS_C99 1
/* Define to 1 if compiler supports old gcc variadic macro style. */
-#cmakedefine HAVE_VARIADIC_MACROS_GCC ${HAVE_VARIADIC_MACROS_GCC}
+#cmakedefine HAVE_VARIADIC_MACROS_GCC 1
/* Define to 1 if you have the winber.h header file. */
-#cmakedefine HAVE_WINBER_H ${HAVE_WINBER_H}
+#cmakedefine HAVE_WINBER_H 1
/* Define to 1 if you have the windows.h header file. */
-#cmakedefine HAVE_WINDOWS_H ${HAVE_WINDOWS_H}
+#cmakedefine HAVE_WINDOWS_H 1
/* Define to 1 if you have the winldap.h header file. */
-#cmakedefine HAVE_WINLDAP_H ${HAVE_WINLDAP_H}
+#cmakedefine HAVE_WINLDAP_H 1
/* Define to 1 if you have the winsock2.h header file. */
-#cmakedefine HAVE_WINSOCK2_H ${HAVE_WINSOCK2_H}
+#cmakedefine HAVE_WINSOCK2_H 1
/* Define to 1 if you have the winsock.h header file. */
-#cmakedefine HAVE_WINSOCK_H ${HAVE_WINSOCK_H}
+#cmakedefine HAVE_WINSOCK_H 1
/* Define this symbol if your OS supports changing the contents of argv */
-#cmakedefine HAVE_WRITABLE_ARGV ${HAVE_WRITABLE_ARGV}
+#cmakedefine HAVE_WRITABLE_ARGV 1
/* Define to 1 if you have the writev function. */
-#cmakedefine HAVE_WRITEV ${HAVE_WRITEV}
+#cmakedefine HAVE_WRITEV 1
/* Define to 1 if you have the ws2tcpip.h header file. */
-#cmakedefine HAVE_WS2TCPIP_H ${HAVE_WS2TCPIP_H}
+#cmakedefine HAVE_WS2TCPIP_H 1
/* Define to 1 if you have the <x509.h> header file. */
-#cmakedefine HAVE_X509_H ${HAVE_X509_H}
+#cmakedefine HAVE_X509_H 1
/* Define if you have the <process.h> header file. */
-#cmakedefine HAVE_PROCESS_H ${HAVE_PROCESS_H}
+#cmakedefine HAVE_PROCESS_H 1
/* if you have the zlib.h header file */
-#cmakedefine HAVE_ZLIB_H ${HAVE_ZLIB_H}
+#cmakedefine HAVE_ZLIB_H 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#cmakedefine LT_OBJDIR ${LT_OBJDIR}
-/* Define to 1 if you are building a native Windows target. */
-#cmakedefine NATIVE_WINDOWS ${NATIVE_WINDOWS}
-
/* If you lack a fine basename() prototype */
-#cmakedefine NEED_BASENAME_PROTO ${NEED_BASENAME_PROTO}
+#cmakedefine NEED_BASENAME_PROTO 1
/* Define to 1 if you need the lber.h header file even with ldap.h */
-#cmakedefine NEED_LBER_H ${NEED_LBER_H}
+#cmakedefine NEED_LBER_H 1
/* Define to 1 if you need the malloc.h header file even with stdlib.h */
-#cmakedefine NEED_MALLOC_H ${NEED_MALLOC_H}
+#cmakedefine NEED_MALLOC_H 1
/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
-#cmakedefine NEED_REENTRANT ${NEED_REENTRANT}
+#cmakedefine NEED_REENTRANT 1
/* cpu-machine-OS */
#cmakedefine OS ${OS}
@@ -773,7 +775,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 ${RECVFROM_TYPE_ARG2_IS_VOID}
+#cmakedefine RECVFROM_TYPE_ARG2_IS_VOID 1
/* Define to the type of arg 3 for recvfrom. */
#cmakedefine RECVFROM_TYPE_ARG3 ${RECVFROM_TYPE_ARG3}
@@ -785,13 +787,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 ${RECVFROM_TYPE_ARG5_IS_VOID}
+#cmakedefine RECVFROM_TYPE_ARG5_IS_VOID 1
/* 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 ${RECVFROM_TYPE_ARG6_IS_VOID}
+#cmakedefine RECVFROM_TYPE_ARG6_IS_VOID 1
/* Define to the function return type for recvfrom. */
#cmakedefine RECVFROM_TYPE_RETV ${RECVFROM_TYPE_RETV}
@@ -869,56 +871,62 @@
#cmakedefine SIZEOF_VOIDP ${SIZEOF_VOIDP}
/* Define to 1 if you have the ANSI C header files. */
-#cmakedefine STDC_HEADERS ${STDC_HEADERS}
+#cmakedefine STDC_HEADERS 1
/* 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 <sys/time.h> and <time.h>. */
-#cmakedefine TIME_WITH_SYS_TIME ${TIME_WITH_SYS_TIME}
+#cmakedefine TIME_WITH_SYS_TIME 1
/* Define if you want to enable c-ares support */
-#cmakedefine USE_ARES ${USE_ARES}
+#cmakedefine USE_ARES 1
+
+/* Define if you want to enable POSIX threaded DNS lookup */
+#cmakedefine USE_THREADS_POSIX 1
/* Define to disable non-blocking sockets. */
-#cmakedefine USE_BLOCKING_SOCKETS ${USE_BLOCKING_SOCKETS}
+#cmakedefine USE_BLOCKING_SOCKETS 1
/* if GnuTLS is enabled */
-#cmakedefine USE_GNUTLS ${USE_GNUTLS}
+#cmakedefine USE_GNUTLS 1
/* if PolarSSL is enabled */
-#cmakedefine USE_POLARSSL ${USE_POLARSSL}
+#cmakedefine USE_POLARSSL 1
/* if libSSH2 is in use */
-#cmakedefine USE_LIBSSH2 ${USE_LIBSSH2}
+#cmakedefine USE_LIBSSH2 1
/* If you want to build curl with the built-in manual */
-#cmakedefine USE_MANUAL ${USE_MANUAL}
+#cmakedefine USE_MANUAL 1
/* if NSS is enabled */
-#cmakedefine USE_NSS ${USE_NSS}
+#cmakedefine USE_NSS 1
+
+/* if you want to use OpenLDAP code instead of legacy ldap implementation */
+#cmakedefine USE_OPENLDAP 1
/* if OpenSSL is in use */
-#cmakedefine USE_OPENSSL ${USE_OPENSSL}
+#cmakedefine USE_OPENSSL 1
-/* if SSL is enabled */
-#cmakedefine USE_SSLEAY ${USE_SSLEAY}
+/* if Unix domain sockets are enabled */
+#cmakedefine USE_UNIX_SOCKETS
/* Define to 1 if you are building a Windows target without large file
support. */
-#cmakedefine USE_WIN32_LARGE_FILES ${USE_WIN32_LARGE_FILES}
+#cmakedefine USE_WIN32_LARGE_FILES 1
/* to enable SSPI support */
-#cmakedefine USE_WINDOWS_SSPI ${USE_WINDOWS_SSPI}
+#cmakedefine USE_WINDOWS_SSPI 1
/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */
-#cmakedefine USE_YASSLEMUL ${USE_YASSLEMUL}
+#cmakedefine USE_YASSLEMUL 1
/* Version number of package */
#cmakedefine VERSION ${VERSION}
/* Define to avoid automatic inclusion of winsock.h */
-#cmakedefine WIN32_LEAN_AND_MEAN ${WIN32_LEAN_AND_MEAN}
+#cmakedefine WIN32_LEAN_AND_MEAN 1
/* Define to 1 if OS is AIX. */
#ifndef _ALL_SOURCE
diff --git a/lib/curl_config.h.in b/lib/curl_config.h.in
deleted file mode 100644
index 15ea387f..00000000
--- a/lib/curl_config.h.in
+++ /dev/null
@@ -1,1006 +0,0 @@
-/* lib/curl_config.h.in. Generated from configure.ac by autoheader. */
-
-/* when building libcurl itself */
-#undef BUILDING_LIBCURL
-
-/* Location of default ca bundle */
-#undef CURL_CA_BUNDLE
-
-/* Location of default ca path */
-#undef CURL_CA_PATH
-
-/* to disable cookies support */
-#undef CURL_DISABLE_COOKIES
-
-/* to disable cryptographic authentication */
-#undef CURL_DISABLE_CRYPTO_AUTH
-
-/* to disable DICT */
-#undef CURL_DISABLE_DICT
-
-/* to disable FILE */
-#undef CURL_DISABLE_FILE
-
-/* to disable FTP */
-#undef CURL_DISABLE_FTP
-
-/* to disable Gopher */
-#undef CURL_DISABLE_GOPHER
-
-/* to disable HTTP */
-#undef CURL_DISABLE_HTTP
-
-/* to disable IMAP */
-#undef CURL_DISABLE_IMAP
-
-/* to disable LDAP */
-#undef CURL_DISABLE_LDAP
-
-/* to disable LDAPS */
-#undef CURL_DISABLE_LDAPS
-
-/* to disable POP3 */
-#undef CURL_DISABLE_POP3
-
-/* to disable proxies */
-#undef CURL_DISABLE_PROXY
-
-/* to disable RTSP */
-#undef CURL_DISABLE_RTSP
-
-/* to disable SMTP */
-#undef CURL_DISABLE_SMTP
-
-/* to disable TELNET */
-#undef CURL_DISABLE_TELNET
-
-/* to disable TFTP */
-#undef CURL_DISABLE_TFTP
-
-/* to disable verbose strings */
-#undef CURL_DISABLE_VERBOSE_STRINGS
-
-/* to make a symbol visible */
-#undef CURL_EXTERN_SYMBOL
-
-/* to enable hidden symbols */
-#undef CURL_HIDDEN_SYMBOLS
-
-/* Use Windows LDAP implementation */
-#undef CURL_LDAP_WIN
-
-/* when not building a shared library */
-#undef CURL_STATICLIB
-
-/* your Entropy Gathering Daemon socket pathname */
-#undef EGD_SOCKET
-
-/* Define if you want to enable IPv6 support */
-#undef ENABLE_IPV6
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#undef GETNAMEINFO_QUAL_ARG1
-
-/* Define to the type of arg 1 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG1
-
-/* Define to the type of arg 2 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG2
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG46
-
-/* Define to the type of arg 7 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG7
-
-/* Specifies the number of arguments to getservbyport_r */
-#undef GETSERVBYPORT_R_ARGS
-
-/* Specifies the size of the buffer to pass to getservbyport_r */
-#undef GETSERVBYPORT_R_BUFSIZE
-
-/* Define to 1 if you have the alarm function. */
-#undef HAVE_ALARM
-
-/* Define to 1 if you have the <alloca.h> header file. */
-#undef HAVE_ALLOCA_H
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
-
-/* Define to 1 if you have the <arpa/tftp.h> header file. */
-#undef HAVE_ARPA_TFTP_H
-
-/* Define to 1 if you have the <assert.h> header file. */
-#undef HAVE_ASSERT_H
-
-/* Define to 1 if you have the basename function. */
-#undef HAVE_BASENAME
-
-/* Define to 1 if bool is an available type. */
-#undef HAVE_BOOL_T
-
-/* Define to 1 if you have the clock_gettime function and monotonic timer. */
-#undef HAVE_CLOCK_GETTIME_MONOTONIC
-
-/* Define to 1 if you have the closesocket function. */
-#undef HAVE_CLOSESOCKET
-
-/* Define to 1 if you have the CloseSocket camel case function. */
-#undef HAVE_CLOSESOCKET_CAMEL
-
-/* Define to 1 if you have the connect function. */
-#undef HAVE_CONNECT
-
-/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
-#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
-
-/* Define to 1 if you have the <crypto.h> header file. */
-#undef HAVE_CRYPTO_H
-
-/* Define to 1 if you have the <des.h> header file. */
-#undef HAVE_DES_H
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the `ENGINE_cleanup' function. */
-#undef HAVE_ENGINE_CLEANUP
-
-/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */
-#undef HAVE_ENGINE_LOAD_BUILTIN_ENGINES
-
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define to 1 if you have the fcntl function. */
-#undef HAVE_FCNTL
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
-#undef HAVE_FCNTL_O_NONBLOCK
-
-/* Define to 1 if you have the fdopen function. */
-#undef HAVE_FDOPEN
-
-/* Define to 1 if you have the `fork' function. */
-#undef HAVE_FORK
-
-/* Define to 1 if you have the freeaddrinfo function. */
-#undef HAVE_FREEADDRINFO
-
-/* Define to 1 if you have the freeifaddrs function. */
-#undef HAVE_FREEIFADDRS
-
-/* Define to 1 if you have the ftruncate function. */
-#undef HAVE_FTRUNCATE
-
-/* Define to 1 if you have a working getaddrinfo function. */
-#undef HAVE_GETADDRINFO
-
-/* Define to 1 if the getaddrinfo function is threadsafe. */
-#undef HAVE_GETADDRINFO_THREADSAFE
-
-/* Define to 1 if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
-/* Define to 1 if you have the gethostbyaddr function. */
-#undef HAVE_GETHOSTBYADDR
-
-/* Define to 1 if you have the gethostbyaddr_r function. */
-#undef HAVE_GETHOSTBYADDR_R
-
-/* gethostbyaddr_r() takes 5 args */
-#undef HAVE_GETHOSTBYADDR_R_5
-
-/* gethostbyaddr_r() takes 7 args */
-#undef HAVE_GETHOSTBYADDR_R_7
-
-/* gethostbyaddr_r() takes 8 args */
-#undef HAVE_GETHOSTBYADDR_R_8
-
-/* Define to 1 if you have the gethostbyname function. */
-#undef HAVE_GETHOSTBYNAME
-
-/* Define to 1 if you have the gethostbyname_r function. */
-#undef HAVE_GETHOSTBYNAME_R
-
-/* gethostbyname_r() takes 3 args */
-#undef HAVE_GETHOSTBYNAME_R_3
-
-/* gethostbyname_r() takes 5 args */
-#undef HAVE_GETHOSTBYNAME_R_5
-
-/* gethostbyname_r() takes 6 args */
-#undef HAVE_GETHOSTBYNAME_R_6
-
-/* Define to 1 if you have the gethostname function. */
-#undef HAVE_GETHOSTNAME
-
-/* Define to 1 if you have a working getifaddrs function. */
-#undef HAVE_GETIFADDRS
-
-/* Define to 1 if you have the getnameinfo function. */
-#undef HAVE_GETNAMEINFO
-
-/* Define to 1 if you have the `getpass_r' function. */
-#undef HAVE_GETPASS_R
-
-/* Define to 1 if you have the `getppid' function. */
-#undef HAVE_GETPPID
-
-/* Define to 1 if you have the `getprotobyname' function. */
-#undef HAVE_GETPROTOBYNAME
-
-/* Define to 1 if you have the `getpwuid' function. */
-#undef HAVE_GETPWUID
-
-/* Define to 1 if you have the `getrlimit' function. */
-#undef HAVE_GETRLIMIT
-
-/* Define to 1 if you have the getservbyport_r function. */
-#undef HAVE_GETSERVBYPORT_R
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define to 1 if you have a working glibc-style strerror_r function. */
-#undef HAVE_GLIBC_STRERROR_R
-
-/* Define to 1 if you have a working gmtime_r function. */
-#undef HAVE_GMTIME_R
-
-/* if you have the gssapi libraries */
-#undef HAVE_GSSAPI
-
-/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
-
-/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_H
-
-/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_KRB5_H
-
-/* if you have the GNU gssapi libraries */
-#undef HAVE_GSSGNU
-
-/* if you have the Heimdal gssapi libraries */
-#undef HAVE_GSSHEIMDAL
-
-/* if you have the MIT gssapi libraries */
-#undef HAVE_GSSMIT
-
-/* Define to 1 if you have the `idna_strerror' function. */
-#undef HAVE_IDNA_STRERROR
-
-/* Define to 1 if you have the `idn_free' function. */
-#undef HAVE_IDN_FREE
-
-/* Define to 1 if you have the <idn-free.h> header file. */
-#undef HAVE_IDN_FREE_H
-
-/* Define to 1 if you have the <ifaddrs.h> header file. */
-#undef HAVE_IFADDRS_H
-
-/* Define to 1 if you have the `inet_addr' function. */
-#undef HAVE_INET_ADDR
-
-/* Define to 1 if you have the inet_ntoa_r function. */
-#undef HAVE_INET_NTOA_R
-
-/* inet_ntoa_r() takes 2 args */
-#undef HAVE_INET_NTOA_R_2
-
-/* inet_ntoa_r() takes 3 args */
-#undef HAVE_INET_NTOA_R_3
-
-/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
-#undef HAVE_INET_NTOP
-
-/* Define to 1 if you have a IPv6 capable working inet_pton function. */
-#undef HAVE_INET_PTON
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the ioctl function. */
-#undef HAVE_IOCTL
-
-/* Define to 1 if you have the ioctlsocket function. */
-#undef HAVE_IOCTLSOCKET
-
-/* 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.
- */
-#undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
-
-/* Define to 1 if you have a working ioctlsocket FIONBIO function. */
-#undef HAVE_IOCTLSOCKET_FIONBIO
-
-/* Define to 1 if you have a working ioctl FIONBIO function. */
-#undef HAVE_IOCTL_FIONBIO
-
-/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
-#undef HAVE_IOCTL_SIOCGIFADDR
-
-/* Define to 1 if you have the <io.h> header file. */
-#undef HAVE_IO_H
-
-/* if you have the Kerberos4 libraries (including -ldes) */
-#undef HAVE_KRB4
-
-/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
-#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
-
-/* Define to 1 if you have the <krb.h> header file. */
-#undef HAVE_KRB_H
-
-/* Define to 1 if you have the lber.h header file. */
-#undef HAVE_LBER_H
-
-/* Define to 1 if you have the ldapssl.h header file. */
-#undef HAVE_LDAPSSL_H
-
-/* Define to 1 if you have the ldap.h header file. */
-#undef HAVE_LDAP_H
-
-/* Define to 1 if you have the `ldap_init_fd' function. */
-#undef HAVE_LDAP_INIT_FD
-
-/* Use LDAPS implementation */
-#undef HAVE_LDAP_SSL
-
-/* Define to 1 if you have the ldap_ssl.h header file. */
-#undef HAVE_LDAP_SSL_H
-
-/* Define to 1 if you have the `ldap_url_parse' function. */
-#undef HAVE_LDAP_URL_PARSE
-
-/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */
-#undef HAVE_LIBGCRYPT
-
-/* Define to 1 if you have the <libgen.h> header file. */
-#undef HAVE_LIBGEN_H
-
-/* Define to 1 if you have the `idn' library (-lidn). */
-#undef HAVE_LIBIDN
-
-/* Define to 1 if you have the `resolv' library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define to 1 if you have the `resolve' library (-lresolve). */
-#undef HAVE_LIBRESOLVE
-
-/* Define to 1 if you have the <librtmp/rtmp.h> header file. */
-#undef HAVE_LIBRTMP_RTMP_H
-
-/* Define to 1 if you have the `ssh2' library (-lssh2). */
-#undef HAVE_LIBSSH2
-
-/* Define to 1 if you have the `libssh2_exit' function. */
-#undef HAVE_LIBSSH2_EXIT
-
-/* Define to 1 if you have the <libssh2.h> header file. */
-#undef HAVE_LIBSSH2_H
-
-/* Define to 1 if you have the `libssh2_init' function. */
-#undef HAVE_LIBSSH2_INIT
-
-/* Define to 1 if you have the `libssh2_scp_send64' function. */
-#undef HAVE_LIBSSH2_SCP_SEND64
-
-/* Define to 1 if you have the `libssh2_version' function. */
-#undef HAVE_LIBSSH2_VERSION
-
-/* Define to 1 if you have the `ssl' library (-lssl). */
-#undef HAVE_LIBSSL
-
-/* if zlib is available */
-#undef HAVE_LIBZ
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* if your compiler supports LL */
-#undef HAVE_LL
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if you have a working localtime_r function. */
-#undef HAVE_LOCALTIME_R
-
-/* Define to 1 if the compiler supports the 'long long' data type. */
-#undef HAVE_LONGLONG
-
-/* Define to 1 if you have the malloc.h header file. */
-#undef HAVE_MALLOC_H
-
-/* Define to 1 if you have the memory.h header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the memrchr function or macro. */
-#undef HAVE_MEMRCHR
-
-/* Define to 1 if you have the MSG_NOSIGNAL flag. */
-#undef HAVE_MSG_NOSIGNAL
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#undef HAVE_NETINET_TCP_H
-
-/* Define to 1 if you have the <net/if.h> header file. */
-#undef HAVE_NET_IF_H
-
-/* Define to 1 if NI_WITHSCOPEID exists and works. */
-#undef HAVE_NI_WITHSCOPEID
-
-/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
- */
-#undef HAVE_OLD_GSSMIT
-
-/* Define to 1 if you have the <openssl/crypto.h> header file. */
-#undef HAVE_OPENSSL_CRYPTO_H
-
-/* Define to 1 if you have the <openssl/engine.h> header file. */
-#undef HAVE_OPENSSL_ENGINE_H
-
-/* Define to 1 if you have the <openssl/err.h> header file. */
-#undef HAVE_OPENSSL_ERR_H
-
-/* Define to 1 if you have the <openssl/pem.h> header file. */
-#undef HAVE_OPENSSL_PEM_H
-
-/* Define to 1 if you have the <openssl/pkcs12.h> header file. */
-#undef HAVE_OPENSSL_PKCS12_H
-
-/* Define to 1 if you have the <openssl/rsa.h> header file. */
-#undef HAVE_OPENSSL_RSA_H
-
-/* Define to 1 if you have the <openssl/ssl.h> header file. */
-#undef HAVE_OPENSSL_SSL_H
-
-/* Define to 1 if you have the <openssl/x509.h> header file. */
-#undef HAVE_OPENSSL_X509_H
-
-/* Define to 1 if you have the <pem.h> header file. */
-#undef HAVE_PEM_H
-
-/* Define to 1 if you have the `perror' function. */
-#undef HAVE_PERROR
-
-/* Define to 1 if you have the `pipe' function. */
-#undef HAVE_PIPE
-
-/* if you have the function PK11_CreateGenericObject */
-#undef HAVE_PK11_CREATEGENERICOBJECT
-
-/* Define to 1 if you have a working poll function. */
-#undef HAVE_POLL
-
-/* If you have a fine poll */
-#undef HAVE_POLL_FINE
-
-/* Define to 1 if you have the <poll.h> header file. */
-#undef HAVE_POLL_H
-
-/* Define to 1 if you have a working POSIX-style strerror_r function. */
-#undef HAVE_POSIX_STRERROR_R
-
-/* if you have <pthread.h> */
-#undef HAVE_PTHREAD_H
-
-/* Define to 1 if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H
-
-/* Define to 1 if you have the `RAND_egd' function. */
-#undef HAVE_RAND_EGD
-
-/* Define to 1 if you have the `RAND_screen' function. */
-#undef HAVE_RAND_SCREEN
-
-/* Define to 1 if you have the `RAND_status' function. */
-#undef HAVE_RAND_STATUS
-
-/* Define to 1 if you have the recv function. */
-#undef HAVE_RECV
-
-/* Define to 1 if you have the recvfrom function. */
-#undef HAVE_RECVFROM
-
-/* Define to 1 if you have the <rsa.h> header file. */
-#undef HAVE_RSA_H
-
-/* Define to 1 if you have the select function. */
-#undef HAVE_SELECT
-
-/* Define to 1 if you have the send function. */
-#undef HAVE_SEND
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#undef HAVE_SETJMP_H
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
-/* Define to 1 if you have the `setmode' function. */
-#undef HAVE_SETMODE
-
-/* Define to 1 if you have the `setrlimit' function. */
-#undef HAVE_SETRLIMIT
-
-/* Define to 1 if you have the setsockopt function. */
-#undef HAVE_SETSOCKOPT
-
-/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
-#undef HAVE_SETSOCKOPT_SO_NONBLOCK
-
-/* Define to 1 if you have the <sgtty.h> header file. */
-#undef HAVE_SGTTY_H
-
-/* Define to 1 if you have the sigaction function. */
-#undef HAVE_SIGACTION
-
-/* Define to 1 if you have the siginterrupt function. */
-#undef HAVE_SIGINTERRUPT
-
-/* Define to 1 if you have the signal function. */
-#undef HAVE_SIGNAL
-
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
-/* Define to 1 if you have the sigsetjmp function or macro. */
-#undef HAVE_SIGSETJMP
-
-/* Define to 1 if sig_atomic_t is an available typedef. */
-#undef HAVE_SIG_ATOMIC_T
-
-/* Define to 1 if sig_atomic_t is already defined as volatile. */
-#undef HAVE_SIG_ATOMIC_T_VOLATILE
-
-/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */
-#undef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-
-/* Define to 1 if you have the socket function. */
-#undef HAVE_SOCKET
-
-/* Define to 1 if you have the <socket.h> header file. */
-#undef HAVE_SOCKET_H
-
-/* Define this if you have the SPNEGO library fbopenssl */
-#undef HAVE_SPNEGO
-
-/* Define to 1 if you have the `SSL_get_shutdown' function. */
-#undef HAVE_SSL_GET_SHUTDOWN
-
-/* Define to 1 if you have the <ssl.h> header file. */
-#undef HAVE_SSL_H
-
-/* Define to 1 if you have the <stdbool.h> header file. */
-#undef HAVE_STDBOOL_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdio.h> header file. */
-#undef HAVE_STDIO_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
-
-/* Define to 1 if you have the strcasestr function. */
-#undef HAVE_STRCASESTR
-
-/* Define to 1 if you have the strcmpi function. */
-#undef HAVE_STRCMPI
-
-/* Define to 1 if you have the strdup function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the strerror_r function. */
-#undef HAVE_STRERROR_R
-
-/* Define to 1 if you have the stricmp function. */
-#undef HAVE_STRICMP
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the strlcat function. */
-#undef HAVE_STRLCAT
-
-/* Define to 1 if you have the `strlcpy' function. */
-#undef HAVE_STRLCPY
-
-/* Define to 1 if you have the strncasecmp function. */
-#undef HAVE_STRNCASECMP
-
-/* Define to 1 if you have the strncmpi function. */
-#undef HAVE_STRNCMPI
-
-/* Define to 1 if you have the strnicmp function. */
-#undef HAVE_STRNICMP
-
-/* Define to 1 if you have the <stropts.h> header file. */
-#undef HAVE_STROPTS_H
-
-/* Define to 1 if you have the strstr function. */
-#undef HAVE_STRSTR
-
-/* Define to 1 if you have the strtok_r function. */
-#undef HAVE_STRTOK_R
-
-/* Define to 1 if you have the strtoll function. */
-#undef HAVE_STRTOLL
-
-/* if struct sockaddr_storage is defined */
-#undef HAVE_STRUCT_SOCKADDR_STORAGE
-
-/* Define to 1 if you have the timeval struct. */
-#undef HAVE_STRUCT_TIMEVAL
-
-/* Define to 1 if you have the <sys/filio.h> header file. */
-#undef HAVE_SYS_FILIO_H
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/poll.h> header file. */
-#undef HAVE_SYS_POLL_H
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/sockio.h> header file. */
-#undef HAVE_SYS_SOCKIO_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-#undef HAVE_SYS_UIO_H
-
-/* Define to 1 if you have the <sys/un.h> header file. */
-#undef HAVE_SYS_UN_H
-
-/* Define to 1 if you have the <sys/utime.h> header file. */
-#undef HAVE_SYS_UTIME_H
-
-/* Define to 1 if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H
-
-/* Define to 1 if you have the <termio.h> header file. */
-#undef HAVE_TERMIO_H
-
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define to 1 if you have the <tld.h> header file. */
-#undef HAVE_TLD_H
-
-/* Define to 1 if you have the `tld_strerror' function. */
-#undef HAVE_TLD_STRERROR
-
-/* Define to 1 if you have the `uname' function. */
-#undef HAVE_UNAME
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `utime' function. */
-#undef HAVE_UTIME
-
-/* Define to 1 if you have the <utime.h> header file. */
-#undef HAVE_UTIME_H
-
-/* Define to 1 if compiler supports C99 variadic macro style. */
-#undef HAVE_VARIADIC_MACROS_C99
-
-/* Define to 1 if compiler supports old gcc variadic macro style. */
-#undef HAVE_VARIADIC_MACROS_GCC
-
-/* Define to 1 if you have the winber.h header file. */
-#undef HAVE_WINBER_H
-
-/* Define to 1 if you have the windows.h header file. */
-#undef HAVE_WINDOWS_H
-
-/* Define to 1 if you have the winldap.h header file. */
-#undef HAVE_WINLDAP_H
-
-/* Define to 1 if you have the winsock2.h header file. */
-#undef HAVE_WINSOCK2_H
-
-/* Define to 1 if you have the winsock.h header file. */
-#undef HAVE_WINSOCK_H
-
-/* Define this symbol if your OS supports changing the contents of argv */
-#undef HAVE_WRITABLE_ARGV
-
-/* Define to 1 if you have the writev function. */
-#undef HAVE_WRITEV
-
-/* Define to 1 if you have the ws2tcpip.h header file. */
-#undef HAVE_WS2TCPIP_H
-
-/* Define to 1 if you have the <x509.h> header file. */
-#undef HAVE_X509_H
-
-/* if you have the zlib.h header file */
-#undef HAVE_ZLIB_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#undef LT_OBJDIR
-
-/* Define to 1 if you are building a native Windows target. */
-#undef NATIVE_WINDOWS
-
-/* Define to 1 if you need the lber.h header file even with ldap.h */
-#undef NEED_LBER_H
-
-/* Define to 1 if you need the malloc.h header file even with stdlib.h */
-#undef NEED_MALLOC_H
-
-/* Define to 1 if you need the memory.h header file even with stdlib.h */
-#undef NEED_MEMORY_H
-
-/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
-#undef NEED_REENTRANT
-
-/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */
-#undef NEED_THREAD_SAFE
-
-/* cpu-machine-OS */
-#undef OS
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* a suitable file to read random data from */
-#undef RANDOM_FILE
-
-/* Define to the type of arg 1 for recvfrom. */
-#undef RECVFROM_TYPE_ARG1
-
-/* Define to the type pointed by arg 2 for recvfrom. */
-#undef RECVFROM_TYPE_ARG2
-
-/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG2_IS_VOID
-
-/* Define to the type of arg 3 for recvfrom. */
-#undef RECVFROM_TYPE_ARG3
-
-/* Define to the type of arg 4 for recvfrom. */
-#undef RECVFROM_TYPE_ARG4
-
-/* Define to the type pointed by arg 5 for recvfrom. */
-#undef RECVFROM_TYPE_ARG5
-
-/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG5_IS_VOID
-
-/* Define to the type pointed by arg 6 for recvfrom. */
-#undef RECVFROM_TYPE_ARG6
-
-/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG6_IS_VOID
-
-/* Define to the function return type for recvfrom. */
-#undef RECVFROM_TYPE_RETV
-
-/* Define to the type of arg 1 for recv. */
-#undef RECV_TYPE_ARG1
-
-/* Define to the type of arg 2 for recv. */
-#undef RECV_TYPE_ARG2
-
-/* Define to the type of arg 3 for recv. */
-#undef RECV_TYPE_ARG3
-
-/* Define to the type of arg 4 for recv. */
-#undef RECV_TYPE_ARG4
-
-/* Define to the function return type for recv. */
-#undef RECV_TYPE_RETV
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Define to the type qualifier of arg 5 for select. */
-#undef SELECT_QUAL_ARG5
-
-/* Define to the type of arg 1 for select. */
-#undef SELECT_TYPE_ARG1
-
-/* Define to the type of args 2, 3 and 4 for select. */
-#undef SELECT_TYPE_ARG234
-
-/* Define to the type of arg 5 for select. */
-#undef SELECT_TYPE_ARG5
-
-/* Define to the function return type for select. */
-#undef SELECT_TYPE_RETV
-
-/* Define to the type qualifier of arg 2 for send. */
-#undef SEND_QUAL_ARG2
-
-/* Define to the type of arg 1 for send. */
-#undef SEND_TYPE_ARG1
-
-/* Define to the type of arg 2 for send. */
-#undef SEND_TYPE_ARG2
-
-/* Define to the type of arg 3 for send. */
-#undef SEND_TYPE_ARG3
-
-/* Define to the type of arg 4 for send. */
-#undef SEND_TYPE_ARG4
-
-/* Define to the function return type for send. */
-#undef SEND_TYPE_RETV
-
-/* The size of `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* The size of `off_t', as computed by sizeof. */
-#undef SIZEOF_OFF_T
-
-/* The size of `short', as computed by sizeof. */
-#undef SIZEOF_SHORT
-
-/* The size of `size_t', as computed by sizeof. */
-#undef SIZEOF_SIZE_T
-
-/* The size of `time_t', as computed by sizeof. */
-#undef SIZEOF_TIME_T
-
-/* The size of `void*', as computed by sizeof. */
-#undef SIZEOF_VOIDP
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to the type of arg 3 for strerror_r. */
-#undef STRERROR_R_TYPE_ARG3
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to enable c-ares support */
-#undef USE_ARES
-
-/* Define to disable non-blocking sockets. */
-#undef USE_BLOCKING_SOCKETS
-
-/* if GnuTLS is enabled */
-#undef USE_GNUTLS
-
-/* if librtmp is in use */
-#undef USE_LIBRTMP
-
-/* if libSSH2 is in use */
-#undef USE_LIBSSH2
-
-/* If you want to build curl with the built-in manual */
-#undef USE_MANUAL
-
-/* if NSS is enabled */
-#undef USE_NSS
-
-/* Use OpenLDAP-specific code */
-#undef USE_OPENLDAP
-
-/* if OpenSSL is in use */
-#undef USE_OPENSSL
-
-/* if PolarSSL is enabled */
-#undef USE_POLARSSL
-
-/* if SSL is enabled */
-#undef USE_SSLEAY
-
-/* if you want POSIX threaded DNS lookup */
-#undef USE_THREADS_POSIX
-
-/* Define to 1 if you are building a Windows target without large file
- support. */
-#undef USE_WIN32_LARGE_FILES
-
-/* to enable SSPI support */
-#undef USE_WINDOWS_SSPI
-
-/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */
-#undef USE_YASSLEMUL
-
-/* Version number of package */
-#undef VERSION
-
-/* Define to avoid automatic inclusion of winsock.h */
-#undef WIN32_LEAN_AND_MEAN
-
-/* Define to 1 if OS is AIX. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Type to use in place of in_addr_t when system does not provide it. */
-#undef in_addr_t
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef size_t
-
-/* the signed version of size_t */
-#undef ssize_t
diff --git a/lib/curl_des.c b/lib/curl_des.c
new file mode 100644
index 00000000..42c1df95
--- /dev/null
+++ b/lib/curl_des.c
@@ -0,0 +1,63 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2015, Steve Holme, <steve_holme@hotmail.com>.
+ *
+ * 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(USE_NTLM) && (!defined(USE_OPENSSL) || defined(HAVE_BORINGSSL))
+
+#include "curl_des.h"
+
+/*
+ * Curl_des_set_odd_parity()
+ *
+ * This is used to apply odd parity to the given byte array. It is typically
+ * used by when a cryptography engines doesn't have it's own version.
+ *
+ * The function is a port of the Java based oddParity() function over at:
+ *
+ * http://davenport.sourceforge.net/ntlm.html
+ *
+ * Parameters:
+ *
+ * bytes [in/out] - The data whose parity bits are to be adjusted for
+ * odd parity.
+ * len [out] - The length of the data.
+ */
+void Curl_des_set_odd_parity(unsigned char *bytes, size_t len)
+{
+ size_t i;
+
+ for(i = 0; i < len; i++) {
+ unsigned char b = bytes[i];
+
+ bool needs_parity = (((b >> 7) ^ (b >> 6) ^ (b >> 5) ^
+ (b >> 4) ^ (b >> 3) ^ (b >> 2) ^
+ (b >> 1)) & 0x01) == 0;
+
+ if(needs_parity)
+ bytes[i] |= 0x01;
+ else
+ bytes[i] &= 0xfe;
+ }
+}
+
+#endif /* USE_NTLM && (!USE_OPENSSL || HAVE_BORINGSSL) */
diff --git a/lib/curl_des.h b/lib/curl_des.h
new file mode 100644
index 00000000..b855db4c
--- /dev/null
+++ b/lib/curl_des.h
@@ -0,0 +1,34 @@
+#ifndef HEADER_CURL_DES_H
+#define HEADER_CURL_DES_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2015, Steve Holme, <steve_holme@hotmail.com>.
+ *
+ * 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(USE_NTLM) && (!defined(USE_OPENSSL) || defined(HAVE_BORINGSSL))
+
+/* Applies odd parity to the given byte array */
+void Curl_des_set_odd_parity(unsigned char *bytes, size_t length);
+
+#endif /* USE_NTLM && (!USE_OPENSSL || HAVE_BORINGSSL) */
+
+#endif /* HEADER_CURL_DES_H */
diff --git a/lib/curl_endian.c b/lib/curl_endian.c
new file mode 100644
index 00000000..bcd66ed8
--- /dev/null
+++ b/lib/curl_endian.c
@@ -0,0 +1,236 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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]);
+}
+
+#if (CURL_SIZEOF_CURL_OFF_T > 4)
+/*
+ * Curl_read64_be()
+ *
+ * This function converts a 64-bit integer from the big endian format, as
+ * used in the incoming package to whatever endian format we're using
+ * natively.
+ *
+ * Parameters:
+ *
+ * buf [in] - A pointer to a 8 byte buffer.
+ *
+ * Returns the integer.
+ */
+#if defined(HAVE_LONGLONG)
+unsigned long long Curl_read64_be(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
+
+#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */
+
+/*
+ * Curl_write16_le()
+ *
+ * This function converts a 16-bit integer from the native endian format,
+ * to little endian format ready for sending down the wire.
+ *
+ * Parameters:
+ *
+ * value [in] - The 16-bit integer value.
+ * buffer [in] - A pointer to the output buffer.
+ */
+void Curl_write16_le(const short value, unsigned char *buffer)
+{
+ buffer[0] = (char)(value & 0x00FF);
+ buffer[1] = (char)((value & 0xFF00) >> 8);
+}
+
+/*
+ * Curl_write32_le()
+ *
+ * This function converts a 32-bit integer from the native endian format,
+ * 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
new file mode 100644
index 00000000..e384279f
--- /dev/null
+++ b/lib/curl_endian.h
@@ -0,0 +1,70 @@
+#ifndef HEADER_CURL_ENDIAN_H
+#define HEADER_CURL_ENDIAN_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_fnmatch.c b/lib/curl_fnmatch.c
index ad4ec187..1e53918d 100644
--- a/lib/curl_fnmatch.c
+++ b/lib/curl_fnmatch.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +20,11 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "curl_fnmatch.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
#include "curl_memory.h"
+
/* The last #include file should be: */
#include "memdebug.h"
@@ -317,7 +314,7 @@ static int loop(const unsigned char *pattern, const unsigned char *string)
unsigned char charset[CURLFNM_CHSET_SIZE] = { 0 };
int rc = 0;
- for (;;) {
+ for(;;) {
switch(state) {
case CURLFNM_LOOP_DEFAULT:
if(*p == '*') {
@@ -413,6 +410,9 @@ static int loop(const unsigned char *pattern, const unsigned char *string)
}
}
+/*
+ * @unittest: 1307
+ */
int Curl_fnmatch(void *ptr, const char *pattern, const char *string)
{
(void)ptr; /* the argument is specified by the curl_fnmatch_callback
diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c
index 7f0bfed5..ded1e6f9 100644
--- a/lib/curl_gethostname.c
+++ b/lib/curl_gethostname.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,11 +20,7 @@
*
***************************************************************************/
-#include "setup.h"
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include "curl_setup.h"
#include "curl_gethostname.h"
@@ -32,12 +28,16 @@
* Curl_gethostname() is a wrapper around gethostname() which allows
* overriding the host name that the function would normally return.
* This capability is used by the test suite to verify exact matching
- * of NTLM authentication, which exercises libcurl's MD4 and DES code.
+ * of NTLM authentication, which exercises libcurl's MD4 and DES code
+ * as well as by the SMTP module when a hostname is not provided.
*
* For libcurl debug enabled builds host name overriding takes place
* when environment variable CURL_GETHOSTNAME is set, using the value
* held by the variable to override returned host name.
*
+ * Note: The function always returns the un-qualified hostname rather
+ * than being provider dependent.
+ *
* For libcurl shared library release builds the test suite preloads
* another shared library named libhostname using the LD_PRELOAD
* mechanism which intercepts, and might override, the gethostname()
@@ -58,6 +58,8 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) {
return -1;
#else
+ int err;
+ char* dot;
#ifdef DEBUGBUILD
@@ -65,17 +67,34 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) {
const char *force_hostname = getenv("CURL_GETHOSTNAME");
if(force_hostname) {
strncpy(name, force_hostname, namelen);
- name[namelen-1] = '\0';
- return 0;
+ err = 0;
+ }
+ else {
+ name[0] = '\0';
+ err = gethostname(name, namelen);
}
-#endif /* DEBUGBUILD */
+#else /* DEBUGBUILD */
/* The call to system's gethostname() might get intercepted by the
libhostname library when libcurl is built as a non-debug shared
library when running the test suite. */
- return gethostname(name, namelen);
+ name[0] = '\0';
+ err = gethostname(name, namelen);
+
+#endif
+
+ name[namelen - 1] = '\0';
+
+ if(err)
+ return err;
+
+ /* Truncate domain, leave only machine name */
+ dot = strchr(name, '.');
+ if(dot)
+ *dot = '\0';
+ return 0;
#endif
}
diff --git a/lib/curl_gethostname.h b/lib/curl_gethostname.h
index b8ecf88d..48740f62 100644
--- a/lib/curl_gethostname.h
+++ b/lib/curl_gethostname.h
@@ -22,6 +22,10 @@
*
***************************************************************************/
+/* Hostname buffer size */
+#define HOSTNAME_MAX 1024
+
+/* This returns the local machine's un-qualified hostname */
int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen);
#endif /* HEADER_CURL_GETHOSTNAME_H */
diff --git a/lib/curl_gssapi.c b/lib/curl_gssapi.c
new file mode 100644
index 00000000..2cd14fff
--- /dev/null
+++ b/lib/curl_gssapi.c
@@ -0,0 +1,120 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2011 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 HAVE_GSSAPI
+
+#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,
+ 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 req_flags = GSS_C_REPLAY_FLAG;
+
+ if(mutual_auth)
+ req_flags |= GSS_C_MUTUAL_FLAG;
+
+ if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_POLICY_FLAG) {
+#ifdef GSS_C_DELEG_POLICY_FLAG
+ req_flags |= GSS_C_DELEG_POLICY_FLAG;
+#else
+ infof(data, "warning: support for CURLGSSAPI_DELEGATION_POLICY_FLAG not "
+ "compiled in\n");
+#endif
+ }
+
+ if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_FLAG)
+ req_flags |= GSS_C_DELEG_FLAG;
+
+ return gss_init_sec_context(minor_status,
+ GSS_C_NO_CREDENTIAL, /* cred_handle */
+ context,
+ target_name,
+ mech_type,
+ req_flags,
+ 0, /* time_req */
+ input_chan_bindings,
+ input_token,
+ NULL, /* actual_mech_type */
+ output_token,
+ ret_flags,
+ 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
new file mode 100644
index 00000000..19aab64e
--- /dev/null
+++ b/lib/curl_gssapi.h
@@ -0,0 +1,75 @@
+#ifndef HEADER_CURL_GSSAPI_H
+#define HEADER_CURL_GSSAPI_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2011 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "urldata.h"
+
+#ifdef HAVE_GSSAPI
+
+#ifdef HAVE_GSSGNU
+# include <gss.h>
+#elif defined HAVE_GSSMIT
+ /* MIT style */
+# include <gssapi/gssapi.h>
+# include <gssapi/gssapi_generic.h>
+# include <gssapi/gssapi_krb5.h>
+#else
+ /* Heimdal-style */
+# include <gssapi.h>
+#endif
+
+extern gss_OID_desc Curl_spnego_mech_oid;
+extern gss_OID_desc Curl_krb5_mech_oid;
+
+/* 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,
+ 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
+
+#endif /* HAVE_GSSAPI */
+
+#endif /* HEADER_CURL_GSSAPI_H */
diff --git a/lib/curl_ldap.h b/lib/curl_ldap.h
index 3cce4bf7..93fb4b07 100644
--- a/lib/curl_ldap.h
+++ b/lib/curl_ldap.h
@@ -1,6 +1,5 @@
-#ifndef __CURL_LDAP_H
-#define __CURL_LDAP_H
-
+#ifndef HEADER_CURL_LDAP_H
+#define HEADER_CURL_LDAP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -25,10 +24,12 @@
#ifndef CURL_DISABLE_LDAP
extern const struct Curl_handler Curl_handler_ldap;
-#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \
- (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))
+#if !defined(CURL_DISABLE_LDAPS) && \
+ ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \
+ (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))
extern const struct Curl_handler Curl_handler_ldaps;
#endif
#endif
-#endif /* __CURL_LDAP_H */
+#endif /* HEADER_CURL_LDAP_H */
+
diff --git a/lib/curl_md4.h b/lib/curl_md4.h
index 6b6c16e1..13c79034 100644
--- a/lib/curl_md4.h
+++ b/lib/curl_md4.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,12 +22,14 @@
*
***************************************************************************/
-#include "setup.h"
+#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 /* USE_NSS */
+
+#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */
#endif /* HEADER_CURL_MD4_H */
diff --git a/lib/curl_md5.h b/lib/curl_md5.h
index ddc61e3e..9c0e0b5e 100644
--- a/lib/curl_md5.h
+++ b/lib/curl_md5.h
@@ -25,10 +25,39 @@
#ifndef CURL_DISABLE_CRYPTO_AUTH
#include "curl_hmac.h"
+#define MD5_DIGEST_LEN 16
+
+typedef void (* Curl_MD5_init_func)(void *context);
+typedef void (* Curl_MD5_update_func)(void *context,
+ const unsigned char *data,
+ unsigned int len);
+typedef void (* Curl_MD5_final_func)(unsigned char *result, void *context);
+
+typedef struct {
+ Curl_MD5_init_func md5_init_func; /* Initialize context procedure */
+ Curl_MD5_update_func md5_update_func; /* Update context with data */
+ Curl_MD5_final_func md5_final_func; /* Get final result procedure */
+ unsigned int md5_ctxtsize; /* Context structure size */
+ unsigned int md5_resultlen; /* Result length (bytes) */
+} MD5_params;
+
+typedef struct {
+ const MD5_params *md5_hash; /* Hash function definition */
+ void *md5_hashctx; /* Hash function context */
+} MD5_context;
+
+extern const MD5_params Curl_DIGEST_MD5[1];
extern const HMAC_params Curl_HMAC_MD5[1];
void Curl_md5it(unsigned char *output,
const unsigned char *input);
+
+MD5_context * Curl_MD5_init(const MD5_params *md5params);
+int Curl_MD5_update(MD5_context *context,
+ const unsigned char *data,
+ unsigned int len);
+int Curl_MD5_final(MD5_context *context, unsigned char *result);
+
#endif
#endif /* HEADER_CURL_MD5_H */
diff --git a/lib/curl_memory.h b/lib/curl_memory.h
index e1194582..bc744ccd 100644
--- a/lib/curl_memory.h
+++ b/lib/curl_memory.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,17 +22,89 @@
*
***************************************************************************/
-#include <curl/curl.h> /* for the typedefs */
+/*
+ * Nasty internal details ahead...
+ *
+ * File curl_memory.h must be included by _all_ *.c source files
+ * that use memory related functions strdup, malloc, calloc, realloc
+ * or free, and given source file is used to build libcurl library.
+ * It should be included immediately before memdebug.h as the last files
+ * included to avoid undesired interaction with other memory function
+ * headers in dependent libraries.
+ *
+ * There is nearly no exception to above rule. All libcurl source
+ * files in 'lib' subdirectory as well as those living deep inside
+ * 'packages' subdirectories and linked together in order to build
+ * libcurl library shall follow it.
+ *
+ * File lib/strdup.c is an exception, given that it provides a strdup
+ * clone implementation while using malloc. Extra care needed inside
+ * this one. TODO: revisit this paragraph and related code.
+ *
+ * The need for curl_memory.h inclusion is due to libcurl's feature
+ * of allowing library user to provide memory replacement functions,
+ * memory callbacks, at runtime with curl_global_init_mem()
+ *
+ * Any *.c source file used to build libcurl library that does not
+ * include curl_memory.h and uses any memory function of the five
+ * mentioned above will compile without any indication, but it will
+ * trigger weird memory related issues at runtime.
+ *
+ * OTOH some source files from 'lib' subdirectory may additionally be
+ * used directly as source code when using some curlx_ functions by
+ * third party programs that don't even use libcurl at all. When using
+ * these source files in this way it is necessary these are compiled
+ * with CURLX_NO_MEMORY_CALLBACKS defined, in order to ensure that no
+ * attempt of calling libcurl's memory callbacks is done from code
+ * which can not use this machinery.
+ *
+ * Notice that libcurl's 'memory tracking' system works chaining into
+ * the memory callback machinery. This implies that when compiling
+ * 'lib' source files with CURLX_NO_MEMORY_CALLBACKS defined this file
+ * disengages usage of libcurl's 'memory tracking' system, defining
+ * MEMDEBUG_NODEFINES and overriding CURLDEBUG purpose.
+ *
+ * CURLX_NO_MEMORY_CALLBACKS takes precedence over CURLDEBUG. This is
+ * done in order to allow building a 'memory tracking' enabled libcurl
+ * and at the same time allow building programs which do not use it.
+ *
+ * Programs and libraries in 'tests' subdirectories have specific
+ * purposes and needs, and as such each one will use whatever fits
+ * best, depending additionally wether it links with libcurl or not.
+ *
+ * Caveat emptor. Proper curlx_* separation is a work in progress
+ * the same as CURLX_NO_MEMORY_CALLBACKS usage, some adjustments may
+ * still be required. IOW don't use them yet, there are sharp edges.
+ */
+
+#ifdef HEADER_CURL_MEMDEBUG_H
+#error "Header memdebug.h shall not be included before curl_memory.h"
+#endif
+
+#ifndef CURLX_NO_MEMORY_CALLBACKS
+
+#include <curl/curl.h> /* for the callback typedefs */
extern curl_malloc_callback Curl_cmalloc;
extern curl_free_callback Curl_cfree;
extern curl_realloc_callback Curl_crealloc;
extern curl_strdup_callback Curl_cstrdup;
extern curl_calloc_callback Curl_ccalloc;
+#if defined(WIN32) && defined(UNICODE)
+extern curl_wcsdup_callback Curl_cwcsdup;
+#endif
#ifndef CURLDEBUG
-/* Only do this define-mania if we're not using the memdebug system, as that
- has preference on this magic. */
+
+/*
+ * libcurl's 'memory tracking' system defines strdup, malloc, calloc,
+ * realloc and free, along with others, in memdebug.h in a different
+ * way although still using memory callbacks forward declared above.
+ * When using the 'memory tracking' system (CURLDEBUG defined) we do
+ * not define here the five memory functions given that definitions
+ * from memdebug.h are the ones that shall be used.
+ */
+
#undef strdup
#define strdup(ptr) Curl_cstrdup(ptr)
#undef malloc
@@ -44,6 +116,28 @@ extern curl_calloc_callback Curl_ccalloc;
#undef free
#define free(ptr) Curl_cfree(ptr)
+#ifdef WIN32
+# ifdef UNICODE
+# undef wcsdup
+# define wcsdup(ptr) Curl_cwcsdup(ptr)
+# undef _wcsdup
+# define _wcsdup(ptr) Curl_cwcsdup(ptr)
+# undef _tcsdup
+# define _tcsdup(ptr) Curl_cwcsdup(ptr)
+# else
+# undef _tcsdup
+# define _tcsdup(ptr) Curl_cstrdup(ptr)
+# endif
#endif
+#endif /* CURLDEBUG */
+
+#else /* CURLX_NO_MEMORY_CALLBACKS */
+
+#ifndef MEMDEBUG_NODEFINES
+#define MEMDEBUG_NODEFINES
+#endif
+
+#endif /* CURLX_NO_MEMORY_CALLBACKS */
+
#endif /* HEADER_CURL_MEMORY_H */
diff --git a/lib/curl_memrchr.c b/lib/curl_memrchr.c
index a1e2bf0e..6722c6a2 100644
--- a/lib/curl_memrchr.c
+++ b/lib/curl_memrchr.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +20,10 @@
*
***************************************************************************/
-#include "setup.h"
-
+#include "curl_setup.h"
#include "curl_memrchr.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
#include "curl_memory.h"
+
/* The last #include file should be: */
#include "memdebug.h"
@@ -50,8 +46,8 @@ Curl_memrchr(const void *s, int c, size_t n)
p += n - 1;
- while (p >= q) {
- if (*p == (unsigned char)c)
+ while(p >= q) {
+ if(*p == (unsigned char)c)
return (void *)p;
p--;
}
diff --git a/lib/curl_memrchr.h b/lib/curl_memrchr.h
index 37061b60..324c73a7 100644
--- a/lib/curl_memrchr.h
+++ b/lib/curl_memrchr.h
@@ -22,7 +22,7 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_MEMRCHR
diff --git a/lib/curl_multibyte.c b/lib/curl_multibyte.c
new file mode 100644
index 00000000..403d0053
--- /dev/null
+++ b/lib/curl_multibyte.c
@@ -0,0 +1,82 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \
+ defined(USE_WIN32_LDAP)) && defined(UNICODE))
+
+ /*
+ * MultiByte conversions using Windows kernel32 library.
+ */
+
+#include "curl_multibyte.h"
+#include "curl_memory.h"
+
+/* The last #include file should be: */
+#include "memdebug.h"
+
+wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8)
+{
+ wchar_t *str_w = NULL;
+
+ if(str_utf8) {
+ int str_w_len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS,
+ str_utf8, -1, NULL, 0);
+ if(str_w_len > 0) {
+ str_w = malloc(str_w_len * sizeof(wchar_t));
+ if(str_w) {
+ if(MultiByteToWideChar(CP_UTF8, 0, str_utf8, -1, str_w,
+ str_w_len) == 0) {
+ free(str_w);
+ return NULL;
+ }
+ }
+ }
+ }
+
+ return str_w;
+}
+
+char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w)
+{
+ char *str_utf8 = NULL;
+
+ if(str_w) {
+ int str_utf8_len = WideCharToMultiByte(CP_UTF8, 0, str_w, -1, NULL,
+ 0, NULL, NULL);
+ if(str_utf8_len > 0) {
+ str_utf8 = malloc(str_utf8_len * sizeof(wchar_t));
+ if(str_utf8) {
+ if(WideCharToMultiByte(CP_UTF8, 0, str_w, -1, str_utf8, str_utf8_len,
+ NULL, FALSE) == 0) {
+ free(str_utf8);
+ return NULL;
+ }
+ }
+ }
+ }
+
+ return str_utf8;
+}
+
+#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || USE_WIN32_LDAP) && UNICODE) */
diff --git a/lib/curl_multibyte.h b/lib/curl_multibyte.h
new file mode 100644
index 00000000..dc7ed4c3
--- /dev/null
+++ b/lib/curl_multibyte.h
@@ -0,0 +1,92 @@
+#ifndef HEADER_CURL_MULTIBYTE_H
+#define HEADER_CURL_MULTIBYTE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \
+ defined(USE_WIN32_LDAP)) && defined(UNICODE))
+
+ /*
+ * MultiByte conversions using Windows kernel32 library.
+ */
+
+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 || USE_WIN32_LDAP) && UNICODE) */
+
+
+#if defined(USE_WIN32_IDN) || defined(USE_WINDOWS_SSPI) || \
+ defined(USE_WIN32_LDAP)
+
+/*
+ * Macros Curl_convert_UTF8_to_tchar(), Curl_convert_tchar_to_UTF8()
+ * and Curl_unicodefree() main purpose is to minimize the number of
+ * preprocessor conditional directives needed by code using these
+ * to differentiate UNICODE from non-UNICODE builds.
+ *
+ * When building with UNICODE defined, this two macros
+ * Curl_convert_UTF8_to_tchar() and Curl_convert_tchar_to_UTF8()
+ * return a pointer to a newly allocated memory area holding result.
+ * When the result is no longer needed, allocated memory is intended
+ * to be free'ed with Curl_unicodefree().
+ *
+ * When building without UNICODE defined, this macros
+ * Curl_convert_UTF8_to_tchar() and Curl_convert_tchar_to_UTF8()
+ * return the pointer received as argument. Curl_unicodefree() does
+ * no actual free'ing of this pointer it is simply set to NULL.
+ */
+
+#ifdef UNICODE
+
+#define Curl_convert_UTF8_to_tchar(ptr) Curl_convert_UTF8_to_wchar((ptr))
+#define Curl_convert_tchar_to_UTF8(ptr) Curl_convert_wchar_to_UTF8((ptr))
+#define Curl_unicodefree(ptr) \
+ do {if((ptr)) {free((ptr)); (ptr) = NULL;}} WHILE_FALSE
+
+typedef union {
+ unsigned short *tchar_ptr;
+ const unsigned short *const_tchar_ptr;
+ unsigned short *tbyte_ptr;
+ const unsigned short *const_tbyte_ptr;
+} xcharp_u;
+
+#else
+
+#define Curl_convert_UTF8_to_tchar(ptr) (ptr)
+#define Curl_convert_tchar_to_UTF8(ptr) (ptr)
+#define Curl_unicodefree(ptr) \
+ do {(ptr) = NULL;} WHILE_FALSE
+
+typedef union {
+ char *tchar_ptr;
+ const char *const_tchar_ptr;
+ unsigned char *tbyte_ptr;
+ const unsigned char *const_tbyte_ptr;
+} xcharp_u;
+
+#endif /* UNICODE */
+
+#endif /* USE_WIN32_IDN || USE_WINDOWS_SSPI || USE_WIN32_LDAP */
+
+#endif /* HEADER_CURL_MULTIBYTE_H */
diff --git a/lib/curl_ntlm.c b/lib/curl_ntlm.c
new file mode 100644
index 00000000..1f3bdccd
--- /dev/null
+++ b/lib/curl_ntlm.c
@@ -0,0 +1,232 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_HTTP) && defined(USE_NTLM)
+
+/*
+ * NTLM details:
+ *
+ * http://davenport.sourceforge.net/ntlm.html
+ * http://www.innovation.ch/java/ntlm.html
+ */
+
+#define DEBUG_ME 0
+
+#include "urldata.h"
+#include "sendf.h"
+#include "rawstr.h"
+#include "curl_ntlm.h"
+#include "curl_ntlm_msgs.h"
+#include "curl_ntlm_wb.h"
+#include "curl_sasl.h"
+#include "url.h"
+#include "curl_printf.h"
+
+#if defined(USE_NSS)
+#include "vtls/nssg.h"
+#elif defined(USE_WINDOWS_SSPI)
+#include "curl_sspi.h"
+#endif
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#if DEBUG_ME
+# define DEBUG_OUT(x) x
+#else
+# define DEBUG_OUT(x) Curl_nop_stmt
+#endif
+
+CURLcode Curl_input_ntlm(struct connectdata *conn,
+ bool proxy, /* if proxy or not */
+ const char *header) /* rest of the www-authenticate:
+ header */
+{
+ /* point to the correct struct with this */
+ struct ntlmdata *ntlm;
+ CURLcode result = CURLE_OK;
+
+ ntlm = proxy ? &conn->proxyntlm : &conn->ntlm;
+
+ if(checkprefix("NTLM", header)) {
+ header += strlen("NTLM");
+
+ while(*header && ISSPACE(*header))
+ header++;
+
+ if(*header) {
+ result = Curl_sasl_decode_ntlm_type2_message(conn->data, header, ntlm);
+ if(result)
+ return result;
+
+ ntlm->state = NTLMSTATE_TYPE2; /* We got a type-2 message */
+ }
+ else {
+ if(ntlm->state == NTLMSTATE_TYPE3) {
+ infof(conn->data, "NTLM handshake rejected\n");
+ Curl_http_ntlm_cleanup(conn);
+ ntlm->state = NTLMSTATE_NONE;
+ return CURLE_REMOTE_ACCESS_DENIED;
+ }
+ else if(ntlm->state >= NTLMSTATE_TYPE1) {
+ infof(conn->data, "NTLM handshake failure (internal error)\n");
+ return CURLE_REMOTE_ACCESS_DENIED;
+ }
+
+ ntlm->state = NTLMSTATE_TYPE1; /* We should send away a type-1 */
+ }
+ }
+
+ return result;
+}
+
+/*
+ * This is for creating ntlm header output
+ */
+CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
+{
+ char *base64 = NULL;
+ size_t len = 0;
+ CURLcode result;
+
+ /* 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 */
+ char **allocuserpwd;
+
+ /* point to the name and password for this */
+ const char *userp;
+ const char *passwdp;
+
+ /* point to the correct struct with this */
+ struct ntlmdata *ntlm;
+ struct auth *authp;
+
+ DEBUGASSERT(conn);
+ DEBUGASSERT(conn->data);
+
+#ifdef USE_NSS
+ if(CURLE_OK != Curl_nss_force_init(conn->data))
+ return CURLE_OUT_OF_MEMORY;
+#endif
+
+ if(proxy) {
+ allocuserpwd = &conn->allocptr.proxyuserpwd;
+ userp = conn->proxyuser;
+ passwdp = conn->proxypasswd;
+ ntlm = &conn->proxyntlm;
+ authp = &conn->data->state.authproxy;
+ }
+ else {
+ allocuserpwd = &conn->allocptr.userpwd;
+ userp = conn->user;
+ passwdp = conn->passwd;
+ ntlm = &conn->ntlm;
+ authp = &conn->data->state.authhost;
+ }
+ authp->done = FALSE;
+
+ /* not set means empty */
+ if(!userp)
+ userp = "";
+
+ if(!passwdp)
+ passwdp = "";
+
+#ifdef USE_WINDOWS_SSPI
+ if(s_hSecDll == NULL) {
+ /* not thread safe and leaks - use curl_global_init() to avoid */
+ CURLcode err = Curl_sspi_global_init();
+ if(s_hSecDll == NULL)
+ return err;
+ }
+#endif
+
+ switch(ntlm->state) {
+ 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;
+
+ if(base64) {
+ free(*allocuserpwd);
+ *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
+ proxy ? "Proxy-" : "",
+ base64);
+ 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;
+
+ if(base64) {
+ free(*allocuserpwd);
+ *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
+ proxy ? "Proxy-" : "",
+ base64);
+ 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 */
+ authp->done = TRUE;
+ }
+ break;
+
+ case NTLMSTATE_TYPE3:
+ /* connection is already authenticated,
+ * don't send a header in future requests */
+ Curl_safefree(*allocuserpwd);
+ authp->done = TRUE;
+ break;
+ }
+
+ return CURLE_OK;
+}
+
+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)
+ Curl_ntlm_wb_cleanup(conn);
+#endif
+}
+
+#endif /* !CURL_DISABLE_HTTP && USE_NTLM */
diff --git a/lib/curl_ntlm.h b/lib/curl_ntlm.h
new file mode 100644
index 00000000..947eac20
--- /dev/null
+++ b/lib/curl_ntlm.h
@@ -0,0 +1,40 @@
+#ifndef HEADER_CURL_NTLM_H
+#define HEADER_CURL_NTLM_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_HTTP) && defined(USE_NTLM)
+
+/* this is for ntlm header input */
+CURLcode Curl_input_ntlm(struct connectdata *conn, bool proxy,
+ const char *header);
+
+/* this is for creating ntlm header output */
+CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy);
+
+void Curl_http_ntlm_cleanup(struct connectdata *conn);
+
+#endif /* !CURL_DISABLE_HTTP && USE_NTLM */
+
+#endif /* HEADER_CURL_NTLM_H */
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
new file mode 100644
index 00000000..2e5b573f
--- /dev/null
+++ b/lib/curl_ntlm_core.c
@@ -0,0 +1,765 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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(USE_NTLM)
+
+/*
+ * NTLM details:
+ *
+ * http://davenport.sourceforge.net/ntlm.html
+ * http://www.innovation.ch/java/ntlm.html
+ */
+
+#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
+
+#ifdef USE_OPENSSL
+
+# ifdef USE_OPENSSL
+# include <openssl/des.h>
+# ifndef OPENSSL_NO_MD4
+# include <openssl/md4.h>
+# endif
+# include <openssl/md5.h>
+# include <openssl/ssl.h>
+# include <openssl/rand.h>
+# else
+# include <des.h>
+# ifndef OPENSSL_NO_MD4
+# include <md4.h>
+# endif
+# include <md5.h>
+# include <ssl.h>
+# include <rand.h>
+# endif
+# if (OPENSSL_VERSION_NUMBER < 0x00907001L)
+# define DES_key_schedule des_key_schedule
+# define DES_cblock des_cblock
+# define DES_set_odd_parity des_set_odd_parity
+# define DES_set_key des_set_key
+# define DES_ecb_encrypt des_ecb_encrypt
+# define DESKEY(x) x
+# define DESKEYARG(x) x
+# else
+# define DESKEYARG(x) *x
+# define DESKEY(x) &x
+# endif
+
+#elif defined(USE_GNUTLS_NETTLE)
+
+# include <nettle/des.h>
+# include <nettle/md4.h>
+
+#elif defined(USE_GNUTLS)
+
+# include <gcrypt.h>
+# define MD5_DIGEST_LENGTH 16
+# define MD4_DIGEST_LENGTH 16
+
+#elif defined(USE_NSS)
+
+# include <nss.h>
+# include <pk11pub.h>
+# include <hasht.h>
+# include "curl_md4.h"
+# define MD5_DIGEST_LENGTH MD5_LENGTH
+
+#elif defined(USE_DARWINSSL)
+
+# include <CommonCrypto/CommonCryptor.h>
+# include <CommonCrypto/CommonDigest.h>
+
+#elif defined(USE_OS400CRYPTO)
+# include "cipher.mih" /* mih/cipher */
+# include "curl_md4.h"
+#elif defined(USE_WIN32_CRYPTO)
+# include <wincrypt.h>
+#else
+# error "Can't compile NTLM support without a crypto library."
+#endif
+
+#include "urldata.h"
+#include "non-ascii.h"
+#include "rawstr.h"
+#include "curl_ntlm_core.h"
+#include "curl_md5.h"
+#include "curl_hmac.h"
+#include "warnless.h"
+#include "curl_endian.h"
+#include "curl_des.h"
+#include "curl_printf.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#define NTLM_HMAC_MD5_LEN (16)
+#define NTLMv2_BLOB_SIGNATURE "\x01\x01\x00\x00"
+#define NTLMv2_BLOB_LEN (44 -16 + ntlm->target_info_len + 4)
+
+/*
+* Turns a 56-bit key into being 64-bit wide.
+*/
+static void extend_key_56_to_64(const unsigned char *key_56, char *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));
+ 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);
+}
+
+#ifdef USE_OPENSSL
+/*
+ * 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;
+
+ /* Expand the 56-bit key to 64-bits */
+ extend_key_56_to_64(key_56, (char *) key);
+
+ /* Set the key parity to odd */
+#if defined(HAVE_BORINGSSL)
+ Curl_des_set_odd_parity((unsigned char *) &key, sizeof(key));
+#else
+ DES_set_odd_parity(&key);
+#endif
+
+ /* Set the key */
+ DES_set_key(&key, ks);
+}
+
+#elif defined(USE_GNUTLS_NETTLE)
+
+static void setup_des_key(const unsigned char *key_56,
+ struct des_ctx *des)
+{
+ char key[8];
+
+ /* Expand the 56-bit key to 64-bits */
+ extend_key_56_to_64(key_56, key);
+
+ /* Set the key parity to odd */
+ Curl_des_set_odd_parity((unsigned char *) key, sizeof(key));
+
+ /* Set the key */
+ des_set_key(des, (const uint8_t *) key);
+}
+
+#elif defined(USE_GNUTLS)
+
+/*
+ * Turns a 56 bit key into the 64 bit, odd parity key and sets the key.
+ */
+static void setup_des_key(const unsigned char *key_56,
+ gcry_cipher_hd_t *des)
+{
+ char key[8];
+
+ /* Expand the 56-bit key to 64-bits */
+ extend_key_56_to_64(key_56, key);
+
+ /* Set the key parity to odd */
+ Curl_des_set_odd_parity((unsigned char *) key, sizeof(key));
+
+ /* Set the key */
+ gcry_cipher_setkey(*des, key, sizeof(key));
+}
+
+#elif defined(USE_NSS)
+
+/*
+ * Expands a 56 bit key KEY_56 to 64 bit and encrypts 64 bit of data, using
+ * the expanded key. The caller is responsible for giving 64 bit of valid
+ * data is IN and (at least) 64 bit large buffer as OUT.
+ */
+static bool encrypt_des(const unsigned char *in, unsigned char *out,
+ const unsigned char *key_56)
+{
+ const CK_MECHANISM_TYPE mech = CKM_DES_ECB; /* DES cipher in ECB mode */
+ PK11SlotInfo *slot = NULL;
+ char key[8]; /* expanded 64 bit key */
+ SECItem key_item;
+ PK11SymKey *symkey = NULL;
+ SECItem *param = NULL;
+ PK11Context *ctx = NULL;
+ int out_len; /* not used, required by NSS */
+ bool rv = FALSE;
+
+ /* use internal slot for DES encryption (requires NSS to be initialized) */
+ slot = PK11_GetInternalKeySlot();
+ if(!slot)
+ return FALSE;
+
+ /* Expand the 56-bit key to 64-bits */
+ extend_key_56_to_64(key_56, key);
+
+ /* Set the key parity to odd */
+ Curl_des_set_odd_parity((unsigned char *) key, sizeof(key));
+
+ /* Import the key */
+ key_item.data = (unsigned char *)key;
+ key_item.len = sizeof(key);
+ symkey = PK11_ImportSymKey(slot, mech, PK11_OriginUnwrap, CKA_ENCRYPT,
+ &key_item, NULL);
+ if(!symkey)
+ goto fail;
+
+ /* Create the DES encryption context */
+ param = PK11_ParamFromIV(mech, /* no IV in ECB mode */ NULL);
+ if(!param)
+ goto fail;
+ ctx = PK11_CreateContextBySymKey(mech, CKA_ENCRYPT, symkey, param);
+ if(!ctx)
+ goto fail;
+
+ /* Perform the encryption */
+ if(SECSuccess == PK11_CipherOp(ctx, out, &out_len, /* outbuflen */ 8,
+ (unsigned char *)in, /* inbuflen */ 8)
+ && SECSuccess == PK11_Finalize(ctx))
+ rv = /* all OK */ TRUE;
+
+fail:
+ /* cleanup */
+ if(ctx)
+ PK11_DestroyContext(ctx, PR_TRUE);
+ if(symkey)
+ PK11_FreeSymKey(symkey);
+ if(param)
+ SECITEM_FreeItem(param, PR_TRUE);
+ PK11_FreeSlot(slot);
+ return rv;
+}
+
+#elif defined(USE_DARWINSSL)
+
+static bool encrypt_des(const unsigned char *in, unsigned char *out,
+ const unsigned char *key_56)
+{
+ char key[8];
+ size_t out_len;
+ CCCryptorStatus err;
+
+ /* Expand the 56-bit key to 64-bits */
+ extend_key_56_to_64(key_56, key);
+
+ /* Set the key parity to odd */
+ Curl_des_set_odd_parity((unsigned char *) key, sizeof(key));
+
+ /* Perform the encryption */
+ err = CCCrypt(kCCEncrypt, kCCAlgorithmDES, kCCOptionECBMode, key,
+ kCCKeySizeDES, NULL, in, 8 /* inbuflen */, out,
+ 8 /* outbuflen */, &out_len);
+
+ 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;
+
+ /* Setup the cipher control structure */
+ ctl.Func_ID = ENCRYPT_ONLY;
+ ctl.Data_Len = sizeof(key);
+
+ /* Expand the 56-bit key to 64-bits */
+ extend_key_56_to_64(key_56, ctl.Crypto_Key);
+
+ /* Set the key parity to odd */
+ Curl_des_set_odd_parity((unsigned char *) ctl.Crypto_Key, ctl.Data_Len);
+
+ /* Perform the encryption */
+ _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;
+
+ /* Setup the key blob structure */
+ memset(&blob, 0, sizeof(blob));
+ blob.hdr.bType = PLAINTEXTKEYBLOB;
+ blob.hdr.bVersion = 2;
+ blob.hdr.aiKeyAlg = CALG_DES;
+ blob.len = sizeof(blob.key);
+
+ /* Expand the 56-bit key to 64-bits */
+ extend_key_56_to_64(key_56, blob.key);
+
+ /* Set the key parity to odd */
+ Curl_des_set_odd_parity((unsigned char *) blob.key, 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) */
+
+ /*
+ * takes a 21 byte array and treats it as 3 56-bit DES keys. The
+ * 8 byte plaintext is encrypted with each key and the resulting 24
+ * bytes are stored in the results array.
+ */
+void Curl_ntlm_core_lm_resp(const unsigned char *keys,
+ const unsigned char *plaintext,
+ unsigned char *results)
+{
+#ifdef USE_OPENSSL
+ DES_key_schedule ks;
+
+ setup_des_key(keys, DESKEY(ks));
+ DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) results,
+ DESKEY(ks), DES_ENCRYPT);
+
+ setup_des_key(keys + 7, DESKEY(ks));
+ DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 8),
+ DESKEY(ks), DES_ENCRYPT);
+
+ setup_des_key(keys + 14, DESKEY(ks));
+ DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 16),
+ DESKEY(ks), DES_ENCRYPT);
+#elif defined(USE_GNUTLS_NETTLE)
+ struct des_ctx des;
+ setup_des_key(keys, &des);
+ des_encrypt(&des, 8, results, plaintext);
+ setup_des_key(keys + 7, &des);
+ des_encrypt(&des, 8, results + 8, plaintext);
+ setup_des_key(keys + 14, &des);
+ des_encrypt(&des, 8, results + 16, plaintext);
+#elif defined(USE_GNUTLS)
+ gcry_cipher_hd_t des;
+
+ gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+ setup_des_key(keys, &des);
+ gcry_cipher_encrypt(des, results, 8, plaintext, 8);
+ gcry_cipher_close(des);
+
+ gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+ setup_des_key(keys + 7, &des);
+ gcry_cipher_encrypt(des, results + 8, 8, plaintext, 8);
+ gcry_cipher_close(des);
+
+ gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+ 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)
+ encrypt_des(plaintext, results, keys);
+ encrypt_des(plaintext, results + 8, keys + 7);
+ encrypt_des(plaintext, results + 16, keys + 14);
+#endif
+}
+
+/*
+ * Set up lanmanager hashed password
+ */
+CURLcode Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data,
+ const char *password,
+ unsigned char *lmbuffer /* 21 bytes */)
+{
+ CURLcode result;
+ unsigned char pw[14];
+ static const unsigned char magic[] = {
+ 0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
+ };
+ size_t len = CURLMIN(strlen(password), 14);
+
+ Curl_strntoupper((char *)pw, password, len);
+ memset(&pw[len], 0, 14 - len);
+
+ /*
+ * 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;
+
+ {
+ /* Create LanManager hashed password. */
+
+#ifdef USE_OPENSSL
+ DES_key_schedule ks;
+
+ setup_des_key(pw, DESKEY(ks));
+ DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)lmbuffer,
+ DESKEY(ks), DES_ENCRYPT);
+
+ setup_des_key(pw + 7, DESKEY(ks));
+ DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)(lmbuffer + 8),
+ DESKEY(ks), DES_ENCRYPT);
+#elif defined(USE_GNUTLS_NETTLE)
+ struct des_ctx des;
+ setup_des_key(pw, &des);
+ des_encrypt(&des, 8, lmbuffer, magic);
+ setup_des_key(pw + 7, &des);
+ des_encrypt(&des, 8, lmbuffer + 8, magic);
+#elif defined(USE_GNUTLS)
+ gcry_cipher_hd_t des;
+
+ gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+ setup_des_key(pw, &des);
+ gcry_cipher_encrypt(des, lmbuffer, 8, magic, 8);
+ gcry_cipher_close(des);
+
+ gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+ 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)
+ 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
+static void ascii_to_unicode_le(unsigned char *dest, const char *src,
+ size_t srclen)
+{
+ size_t i;
+ for(i = 0; i < srclen; i++) {
+ dest[2 * i] = (unsigned char)src[i];
+ dest[2 * i + 1] = '\0';
+ }
+}
+
+#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI)
+
+static void ascii_uppercase_to_unicode_le(unsigned char *dest,
+ const char *src, size_t srclen)
+{
+ size_t i;
+ for(i = 0; i < srclen; i++) {
+ dest[2 * i] = (unsigned char)(toupper(src[i]));
+ dest[2 * i + 1] = '\0';
+ }
+}
+
+#endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */
+
+/*
+ * Set up nt hashed passwords
+ * @unittest: 1600
+ */
+CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *data,
+ const char *password,
+ unsigned char *ntbuffer /* 21 bytes */)
+{
+ size_t len = strlen(password);
+ unsigned char *pw = malloc(len * 2);
+ CURLcode result;
+ if(!pw)
+ return CURLE_OUT_OF_MEMORY;
+
+ ascii_to_unicode_le(pw, password, len);
+
+ /*
+ * The NT 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, len * 2);
+ if(result)
+ return result;
+
+ {
+ /* Create NT hashed password. */
+#ifdef USE_OPENSSL
+ MD4_CTX MD4pw;
+ MD4_Init(&MD4pw);
+ MD4_Update(&MD4pw, pw, 2 * len);
+ MD4_Final(ntbuffer, &MD4pw);
+#elif defined(USE_GNUTLS_NETTLE)
+ struct md4_ctx MD4pw;
+ md4_init(&MD4pw);
+ md4_update(&MD4pw, (unsigned int)(2 * len), pw);
+ md4_digest(&MD4pw, MD4_DIGEST_SIZE, ntbuffer);
+#elif defined(USE_GNUTLS)
+ gcry_md_hd_t MD4pw;
+ gcry_md_open(&MD4pw, GCRY_MD_MD4, 0);
+ 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)
+ 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);
+ }
+
+ free(pw);
+
+ 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,
+ unsigned char *output)
+{
+ HMAC_context *ctxt = Curl_HMAC_init(Curl_HMAC_MD5, key, keylen);
+
+ if(!ctxt)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Update the digest with the given challenge */
+ Curl_HMAC_update(ctxt, data, datalen);
+
+ /* Finalise the digest */
+ Curl_HMAC_final(ctxt, output);
+
+ return CURLE_OK;
+}
+
+/* This creates the NTLMv2 hash by using NTLM hash as the key and Unicode
+ * (uppercase UserName + Domain) as the data
+ */
+CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen,
+ const char *domain, size_t domlen,
+ unsigned char *ntlmhash,
+ unsigned char *ntlmv2hash)
+{
+ /* Unicode representation */
+ size_t identity_len = (userlen + domlen) * 2;
+ unsigned char *identity = malloc(identity_len);
+ CURLcode result = CURLE_OK;
+
+ if(!identity)
+ return CURLE_OUT_OF_MEMORY;
+
+ 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);
+
+ free(identity);
+
+ return result;
+}
+
+/*
+ * Curl_ntlm_core_mk_ntlmv2_resp()
+ *
+ * This creates the NTLMv2 response as set in the ntlm type-3 message.
+ *
+ * Parameters:
+ *
+ * ntlmv2hash [in] - The ntlmv2 hash (16 bytes)
+ * challenge_client [in] - The client nonce (8 bytes)
+ * ntlm [in] - The ntlm data struct being used to read TargetInfo
+ and Server challenge received in the type-2 message
+ * ntresp [out] - The address where a pointer to newly allocated
+ * memory holding the NTLMv2 response.
+ * ntresp_len [out] - The length of the output message.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash,
+ unsigned char *challenge_client,
+ struct ntlmdata *ntlm,
+ unsigned char **ntresp,
+ unsigned int *ntresp_len)
+{
+/* NTLMv2 response structure :
+------------------------------------------------------------------------------
+0 HMAC MD5 16 bytes
+------BLOB--------------------------------------------------------------------
+16 Signature 0x01010000
+20 Reserved long (0x00000000)
+24 Timestamp LE, 64-bit signed value representing the number of
+ tenths of a microsecond since January 1, 1601.
+32 Client Nonce 8 bytes
+40 Unknown 4 bytes
+44 Target Info N bytes (from the type-2 message)
+44+N Unknown 4 bytes
+------------------------------------------------------------------------------
+*/
+
+ unsigned int len = 0;
+ unsigned char *ptr = NULL;
+ unsigned char hmac_output[NTLM_HMAC_MD5_LEN];
+#if defined(HAVE_LONGLONG)
+ long long tw;
+#else
+ __int64 tw;
+#endif
+ CURLcode result = CURLE_OK;
+
+ /* Calculate the timestamp */
+#ifdef DEBUGBUILD
+ char *force_timestamp = getenv("CURL_FORCETIME");
+ if(force_timestamp)
+ tw = 11644473600ULL * 10000000ULL;
+ else
+#endif
+ tw = ((long long)time(NULL) + 11644473600ULL) * 10000000ULL;
+
+ /* Calculate the response len */
+ len = NTLM_HMAC_MD5_LEN + NTLMv2_BLOB_LEN;
+
+ /* Allocate the response */
+ ptr = malloc(len);
+ if(!ptr)
+ return CURLE_OUT_OF_MEMORY;
+
+ memset(ptr, 0, len);
+
+ /* Create the BLOB structure */
+ snprintf((char *)ptr + NTLM_HMAC_MD5_LEN, NTLMv2_BLOB_LEN,
+ NTLMv2_BLOB_SIGNATURE
+ "%c%c%c%c", /* Reserved = 0 */
+ 0, 0, 0, 0);
+
+ Curl_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) {
+ free(ptr);
+ return result;
+ }
+
+ /* Concatenate the HMAC MD5 output with the BLOB */
+ memcpy(ptr, hmac_output, NTLM_HMAC_MD5_LEN);
+
+ /* Return the response */
+ *ntresp = ptr;
+ *ntresp_len = len;
+
+ return result;
+}
+
+/*
+ * Curl_ntlm_core_mk_lmv2_resp()
+ *
+ * This creates the LMv2 response as used in the ntlm type-3 message.
+ *
+ * Parameters:
+ *
+ * ntlmv2hash [in] - The ntlmv2 hash (16 bytes)
+ * challenge_client [in] - The client nonce (8 bytes)
+ * challenge_client [in] - The server challenge (8 bytes)
+ * lmresp [out] - The LMv2 response (24 bytes)
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash,
+ unsigned char *challenge_client,
+ unsigned char *challenge_server,
+ unsigned char *lmresp)
+{
+ unsigned char data[16];
+ unsigned char hmac_output[16];
+ CURLcode result = 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;
+
+ /* Concatenate the HMAC MD5 output with the client nonce */
+ memcpy(lmresp, hmac_output, 16);
+ memcpy(lmresp+16, challenge_client, 8);
+
+ return result;
+}
+
+#endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */
+
+#endif /* USE_NTRESPONSES */
+
+#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */
+
+#endif /* USE_NTLM */
diff --git a/lib/curl_ntlm_core.h b/lib/curl_ntlm_core.h
new file mode 100644
index 00000000..3a763592
--- /dev/null
+++ b/lib/curl_ntlm_core.h
@@ -0,0 +1,106 @@
+#ifndef HEADER_CURL_NTLM_CORE_H
+#define HEADER_CURL_NTLM_CORE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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(USE_NTLM)
+
+#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
+
+#ifdef USE_OPENSSL
+# if !defined(OPENSSL_VERSION_NUMBER) && \
+ !defined(HEADER_SSL_H) && !defined(HEADER_MD5_H)
+# error "curl_ntlm_core.h shall not be included before OpenSSL headers."
+# endif
+# ifdef OPENSSL_NO_MD4
+# define USE_NTRESPONSES 0
+# define USE_NTLM2SESSION 0
+# define USE_NTLM_V2 0
+# endif
+#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_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
+#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 */);
+
+#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_ntlmv2_hash(const char *user, size_t userlen,
+ const char *domain, size_t domlen,
+ unsigned char *ntlmhash,
+ unsigned char *ntlmv2hash);
+
+CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash,
+ unsigned char *challenge_client,
+ struct ntlmdata *ntlm,
+ unsigned char **ntresp,
+ unsigned int *ntresp_len);
+
+CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash,
+ unsigned char *challenge_client,
+ 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 /* USE_NTLM */
+
+#endif /* HEADER_CURL_NTLM_CORE_H */
diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c
new file mode 100644
index 00000000..7f07decb
--- /dev/null
+++ b/lib/curl_ntlm_msgs.c
@@ -0,0 +1,817 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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(USE_NTLM) && !defined(USE_WINDOWS_SSPI)
+
+/*
+ * NTLM details:
+ *
+ * http://davenport.sourceforge.net/ntlm.html
+ * http://www.innovation.ch/java/ntlm.html
+ */
+
+#define DEBUG_ME 0
+
+#include "urldata.h"
+#include "non-ascii.h"
+#include "sendf.h"
+#include "curl_base64.h"
+#include "curl_ntlm_core.h"
+#include "curl_gethostname.h"
+#include "curl_multibyte.h"
+#include "warnless.h"
+
+#include "vtls/vtls.h"
+
+#ifdef USE_NSS
+#include "vtls/nssg.h" /* for Curl_nss_force_init() */
+#endif
+
+#define BUILDING_CURL_NTLM_MSGS_C
+#include "curl_ntlm_msgs.h"
+#include "curl_sasl.h"
+#include "curl_endian.h"
+#include "curl_printf.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+/* "NTLMSSP" signature is always in ASCII regardless of the platform */
+#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"
+
+#define SHORTPAIR(x) ((x) & 0xff), (((x) >> 8) & 0xff)
+#define LONGQUARTET(x) ((x) & 0xff), (((x) >> 8) & 0xff), \
+ (((x) >> 16) & 0xff), (((x) >> 24) & 0xff)
+
+#if DEBUG_ME
+# define DEBUG_OUT(x) x
+static void ntlm_print_flags(FILE *handle, unsigned long flags)
+{
+ if(flags & NTLMFLAG_NEGOTIATE_UNICODE)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_UNICODE ");
+ if(flags & NTLMFLAG_NEGOTIATE_OEM)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_OEM ");
+ if(flags & NTLMFLAG_REQUEST_TARGET)
+ fprintf(handle, "NTLMFLAG_REQUEST_TARGET ");
+ if(flags & (1<<3))
+ fprintf(handle, "NTLMFLAG_UNKNOWN_3 ");
+ if(flags & NTLMFLAG_NEGOTIATE_SIGN)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_SIGN ");
+ if(flags & NTLMFLAG_NEGOTIATE_SEAL)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_SEAL ");
+ if(flags & NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE ");
+ if(flags & NTLMFLAG_NEGOTIATE_LM_KEY)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_LM_KEY ");
+ if(flags & NTLMFLAG_NEGOTIATE_NETWARE)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_NETWARE ");
+ if(flags & NTLMFLAG_NEGOTIATE_NTLM_KEY)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM_KEY ");
+ if(flags & (1<<10))
+ fprintf(handle, "NTLMFLAG_UNKNOWN_10 ");
+ if(flags & NTLMFLAG_NEGOTIATE_ANONYMOUS)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_ANONYMOUS ");
+ if(flags & NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED ");
+ if(flags & NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED ");
+ if(flags & NTLMFLAG_NEGOTIATE_LOCAL_CALL)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_LOCAL_CALL ");
+ if(flags & NTLMFLAG_NEGOTIATE_ALWAYS_SIGN)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_ALWAYS_SIGN ");
+ if(flags & NTLMFLAG_TARGET_TYPE_DOMAIN)
+ fprintf(handle, "NTLMFLAG_TARGET_TYPE_DOMAIN ");
+ if(flags & NTLMFLAG_TARGET_TYPE_SERVER)
+ fprintf(handle, "NTLMFLAG_TARGET_TYPE_SERVER ");
+ if(flags & NTLMFLAG_TARGET_TYPE_SHARE)
+ fprintf(handle, "NTLMFLAG_TARGET_TYPE_SHARE ");
+ if(flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM2_KEY ");
+ if(flags & NTLMFLAG_REQUEST_INIT_RESPONSE)
+ fprintf(handle, "NTLMFLAG_REQUEST_INIT_RESPONSE ");
+ if(flags & NTLMFLAG_REQUEST_ACCEPT_RESPONSE)
+ fprintf(handle, "NTLMFLAG_REQUEST_ACCEPT_RESPONSE ");
+ if(flags & NTLMFLAG_REQUEST_NONNT_SESSION_KEY)
+ fprintf(handle, "NTLMFLAG_REQUEST_NONNT_SESSION_KEY ");
+ if(flags & NTLMFLAG_NEGOTIATE_TARGET_INFO)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_TARGET_INFO ");
+ if(flags & (1<<24))
+ fprintf(handle, "NTLMFLAG_UNKNOWN_24 ");
+ if(flags & (1<<25))
+ fprintf(handle, "NTLMFLAG_UNKNOWN_25 ");
+ if(flags & (1<<26))
+ fprintf(handle, "NTLMFLAG_UNKNOWN_26 ");
+ if(flags & (1<<27))
+ fprintf(handle, "NTLMFLAG_UNKNOWN_27 ");
+ if(flags & (1<<28))
+ fprintf(handle, "NTLMFLAG_UNKNOWN_28 ");
+ if(flags & NTLMFLAG_NEGOTIATE_128)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_128 ");
+ if(flags & NTLMFLAG_NEGOTIATE_KEY_EXCHANGE)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_KEY_EXCHANGE ");
+ if(flags & NTLMFLAG_NEGOTIATE_56)
+ fprintf(handle, "NTLMFLAG_NEGOTIATE_56 ");
+}
+
+static void ntlm_print_hex(FILE *handle, const char *buf, size_t len)
+{
+ const char *p = buf;
+ (void)handle;
+ fprintf(stderr, "0x");
+ while(len-- > 0)
+ fprintf(stderr, "%02.2x", (unsigned int)*p++);
+}
+#else
+# define DEBUG_OUT(x) Curl_nop_stmt
+#endif
+
+/*
+ * 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.
+ *
+ * Returns CURLE_OK on success.
+ */
+static CURLcode 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_offset = 0;
+
+ if(size >= 48) {
+ target_info_len = Curl_read16_le(&buffer[40]);
+ target_info_offset = Curl_read32_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;
+ }
+
+ ntlm->target_info = malloc(target_info_len);
+ if(!ntlm->target_info)
+ return CURLE_OUT_OF_MEMORY;
+
+ memcpy(ntlm->target_info, &buffer[target_info_offset], target_info_len);
+ }
+ }
+
+ ntlm->target_info_len = target_info_len;
+
+ return CURLE_OK;
+}
+
+/*
+ NTLM message structure notes:
+
+ A 'short' is a 'network short', a little-endian 16-bit unsigned value.
+
+ A 'long' is a 'network long', a little-endian, 32-bit unsigned value.
+
+ A 'security buffer' represents a triplet used to point to a buffer,
+ consisting of two shorts and one long:
+
+ 1. A 'short' containing the length of the buffer content in bytes.
+ 2. A 'short' containing the allocated space for the buffer in bytes.
+ 3. A 'long' containing the offset to the start of the buffer in bytes,
+ from the beginning of the NTLM message.
+*/
+
+/*
+ * Curl_sasl_decode_ntlm_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.
+ *
+ * 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)
+{
+ static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 };
+
+ /* NTLM type-2 message structure:
+
+ Index Description Content
+ 0 NTLMSSP Signature Null-terminated ASCII "NTLMSSP"
+ (0x4e544c4d53535000)
+ 8 NTLM Message Type long (0x02000000)
+ 12 Target Name security buffer
+ 20 Flags long
+ 24 Challenge 8 bytes
+ (32) Context 8 bytes (two consecutive longs) (*)
+ (40) Target Information security buffer (*)
+ (48) OS Version Structure 8 bytes (*)
+ 32 (48) (56) Start of data block (*)
+ (*) -> Optional
+ */
+
+ CURLcode result = CURLE_OK;
+ unsigned char *type2 = NULL;
+ size_t type2_len = 0;
+
+#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)
+ (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;
+ }
+
+ ntlm->flags = 0;
+
+ if((type2_len < 32) ||
+ (memcmp(type2, NTLMSSP_SIGNATURE, 8) != 0) ||
+ (memcmp(type2 + 8, type2_marker, sizeof(type2_marker)) != 0)) {
+ /* This was not a good enough type-2 message */
+ free(type2);
+ infof(data, "NTLM handshake failure (bad type-2 message)\n");
+ return CURLE_BAD_CONTENT_ENCODING;
+ }
+
+ ntlm->flags = Curl_read32_le(&type2[20]);
+ memcpy(ntlm->nonce, &type2[24], 8);
+
+ if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) {
+ result = ntlm_decode_type2_target(data, type2, type2_len, ntlm);
+ if(result) {
+ free(type2);
+ infof(data, "NTLM handshake failure (bad type-2 message)\n");
+ return result;
+ }
+ }
+
+ DEBUG_OUT({
+ fprintf(stderr, "**** TYPE2 header flags=0x%08.8lx ", ntlm->flags);
+ ntlm_print_flags(stderr, ntlm->flags);
+ fprintf(stderr, "\n nonce=");
+ ntlm_print_hex(stderr, (char *)ntlm->nonce, 8);
+ fprintf(stderr, "\n****\n");
+ fprintf(stderr, "**** Header %s\n ", header);
+ });
+
+ free(type2);
+
+ return result;
+}
+
+/* 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)
+{
+ size_t i;
+ for(i = 0; i < length; i++) {
+ dest[2 * i] = (unsigned char)src[i];
+ dest[2 * i + 1] = '\0';
+ }
+}
+
+/*
+ * Curl_sasl_create_ntlm_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.
+ *
+ * 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)
+{
+ /* NTLM type-1 message structure:
+
+ Index Description Content
+ 0 NTLMSSP Signature Null-terminated ASCII "NTLMSSP"
+ (0x4e544c4d53535000)
+ 8 NTLM Message Type long (0x01000000)
+ 12 Flags long
+ (16) Supplied Domain security buffer (*)
+ (24) Supplied Workstation security buffer (*)
+ (32) OS Version Structure 8 bytes (*)
+ (32) (40) Start of data block (*)
+ (*) -> Optional
+ */
+
+ size_t size;
+
+ unsigned char ntlmbuf[NTLM_BUFSIZE];
+ const char *host = ""; /* empty */
+ const char *domain = ""; /* empty */
+ size_t hostlen = 0;
+ size_t domlen = 0;
+ size_t hostoff = 0;
+ size_t domoff = hostoff + hostlen; /* This is 0: remember that host and
+ domain are empty */
+ (void)userp;
+ (void)passwdp;
+
+ /* Clean up any former leftovers and initialise to defaults */
+ Curl_sasl_ntlm_cleanup(ntlm);
+
+#if USE_NTRESPONSES && USE_NTLM2SESSION
+#define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY
+#else
+#define NTLM2FLAG 0
+#endif
+ snprintf((char *)ntlmbuf, NTLM_BUFSIZE,
+ NTLMSSP_SIGNATURE "%c"
+ "\x01%c%c%c" /* 32-bit type = 1 */
+ "%c%c%c%c" /* 32-bit NTLM flag field */
+ "%c%c" /* domain length */
+ "%c%c" /* domain allocated space */
+ "%c%c" /* domain name offset */
+ "%c%c" /* 2 zeroes */
+ "%c%c" /* host length */
+ "%c%c" /* host allocated space */
+ "%c%c" /* host name offset */
+ "%c%c" /* 2 zeroes */
+ "%s" /* host name */
+ "%s", /* domain string */
+ 0, /* trailing zero */
+ 0, 0, 0, /* part of type-1 long */
+
+ LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM |
+ NTLMFLAG_REQUEST_TARGET |
+ NTLMFLAG_NEGOTIATE_NTLM_KEY |
+ NTLM2FLAG |
+ NTLMFLAG_NEGOTIATE_ALWAYS_SIGN),
+ SHORTPAIR(domlen),
+ SHORTPAIR(domlen),
+ SHORTPAIR(domoff),
+ 0, 0,
+ SHORTPAIR(hostlen),
+ SHORTPAIR(hostlen),
+ SHORTPAIR(hostoff),
+ 0, 0,
+ host, /* this is empty */
+ domain /* this is empty */);
+
+ /* Initial packet length */
+ size = 32 + hostlen + domlen;
+
+ DEBUG_OUT({
+ fprintf(stderr, "* TYPE1 header flags=0x%02.2x%02.2x%02.2x%02.2x "
+ "0x%08.8x ",
+ LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM |
+ NTLMFLAG_REQUEST_TARGET |
+ NTLMFLAG_NEGOTIATE_NTLM_KEY |
+ NTLM2FLAG |
+ NTLMFLAG_NEGOTIATE_ALWAYS_SIGN),
+ NTLMFLAG_NEGOTIATE_OEM |
+ NTLMFLAG_REQUEST_TARGET |
+ NTLMFLAG_NEGOTIATE_NTLM_KEY |
+ NTLM2FLAG |
+ NTLMFLAG_NEGOTIATE_ALWAYS_SIGN);
+ ntlm_print_flags(stderr,
+ NTLMFLAG_NEGOTIATE_OEM |
+ NTLMFLAG_REQUEST_TARGET |
+ NTLMFLAG_NEGOTIATE_NTLM_KEY |
+ NTLM2FLAG |
+ NTLMFLAG_NEGOTIATE_ALWAYS_SIGN);
+ fprintf(stderr, "\n****\n");
+ });
+
+ /* Return with binary blob encoded into base64 */
+ return Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen);
+}
+
+/*
+ * Curl_sasl_create_ntlm_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.
+ *
+ * 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)
+
+{
+ /* NTLM type-3 message structure:
+
+ Index Description Content
+ 0 NTLMSSP Signature Null-terminated ASCII "NTLMSSP"
+ (0x4e544c4d53535000)
+ 8 NTLM Message Type long (0x03000000)
+ 12 LM/LMv2 Response security buffer
+ 20 NTLM/NTLMv2 Response security buffer
+ 28 Target Name security buffer
+ 36 User Name security buffer
+ 44 Workstation Name security buffer
+ (52) Session Key security buffer (*)
+ (60) Flags long (*)
+ (64) OS Version Structure 8 bytes (*)
+ 52 (64) (72) Start of data block
+ (*) -> Optional
+ */
+
+ CURLcode result = CURLE_OK;
+ size_t size;
+ unsigned char ntlmbuf[NTLM_BUFSIZE];
+ int lmrespoff;
+ unsigned char lmresp[24]; /* fixed-size */
+#if USE_NTRESPONSES
+ int ntrespoff;
+ unsigned int ntresplen = 24;
+ unsigned char ntresp[24]; /* fixed-size */
+ unsigned char *ptr_ntresp = &ntresp[0];
+ unsigned char *ntlmv2resp = NULL;
+#endif
+ bool unicode = (ntlm->flags & NTLMFLAG_NEGOTIATE_UNICODE) ? TRUE : FALSE;
+ char host[HOSTNAME_MAX + 1] = "";
+ const char *user;
+ const char *domain = "";
+ size_t hostoff = 0;
+ size_t useroff = 0;
+ size_t domoff = 0;
+ size_t hostlen = 0;
+ size_t userlen = 0;
+ size_t domlen = 0;
+
+ user = strchr(userp, '\\');
+ if(!user)
+ user = strchr(userp, '/');
+
+ if(user) {
+ domain = userp;
+ domlen = (user - domain);
+ user++;
+ }
+ else
+ user = userp;
+
+ if(user)
+ userlen = strlen(user);
+
+ /* Get the machine's un-qualified host name as NTLM doesn't like the fully
+ qualified domain name */
+ if(Curl_gethostname(host, sizeof(host))) {
+ infof(data, "gethostname() failed, continuing without!\n");
+ hostlen = 0;
+ }
+ else {
+ hostlen = strlen(host);
+ }
+
+#if USE_NTRESPONSES && USE_NTLM_V2
+ if(ntlm->target_info_len) {
+ unsigned char ntbuffer[0x18];
+ unsigned int entropy[2];
+ unsigned char ntlmv2hash[0x18];
+
+ entropy[0] = Curl_rand(data);
+ entropy[1] = Curl_rand(data);
+
+ result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer);
+ if(result)
+ return result;
+
+ result = Curl_ntlm_core_mk_ntlmv2_hash(user, userlen, domain, domlen,
+ ntbuffer, ntlmv2hash);
+ if(result)
+ return result;
+
+ /* LMv2 response */
+ result = Curl_ntlm_core_mk_lmv2_resp(ntlmv2hash,
+ (unsigned char *)&entropy[0],
+ &ntlm->nonce[0], lmresp);
+ if(result)
+ return result;
+
+ /* NTLMv2 response */
+ result = Curl_ntlm_core_mk_ntlmv2_resp(ntlmv2hash,
+ (unsigned char *)&entropy[0],
+ ntlm, &ntlmv2resp, &ntresplen);
+ if(result)
+ return result;
+
+ ptr_ntresp = ntlmv2resp;
+ }
+ else
+#endif
+
+#if USE_NTRESPONSES && USE_NTLM2SESSION
+ /* We don't support NTLM2 if we don't have USE_NTRESPONSES */
+ if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) {
+ unsigned char ntbuffer[0x18];
+ unsigned char tmp[0x18];
+ unsigned char md5sum[MD5_DIGEST_LENGTH];
+ unsigned int entropy[2];
+
+ /* Need to create 8 bytes random data */
+ entropy[0] = Curl_rand(data);
+ entropy[1] = Curl_rand(data);
+
+ /* 8 bytes random data as challenge in lmresp */
+ memcpy(lmresp, entropy, 8);
+
+ /* Pad with zeros */
+ memset(lmresp + 8, 0, 0x10);
+
+ /* Fill tmp with challenge(nonce?) + entropy */
+ memcpy(tmp, &ntlm->nonce[0], 8);
+ memcpy(tmp + 8, entropy, 8);
+
+ result = Curl_ssl_md5sum(tmp, 16, md5sum, MD5_DIGEST_LENGTH);
+ if(!result)
+ /* 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;
+
+ Curl_ntlm_core_lm_resp(ntbuffer, md5sum, ntresp);
+
+ /* End of NTLM2 Session code */
+
+ }
+ else
+#endif
+ {
+
+#if USE_NTRESPONSES
+ unsigned char ntbuffer[0x18];
+#endif
+ unsigned char lmbuffer[0x18];
+
+#if USE_NTRESPONSES
+ result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer);
+ if(result)
+ return result;
+
+ 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_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 */
+ }
+
+ if(unicode) {
+ domlen = domlen * 2;
+ userlen = userlen * 2;
+ hostlen = hostlen * 2;
+ }
+
+ lmrespoff = 64; /* size of the message header */
+#if USE_NTRESPONSES
+ ntrespoff = lmrespoff + 0x18;
+ domoff = ntrespoff + ntresplen;
+#else
+ domoff = lmrespoff + 0x18;
+#endif
+ useroff = domoff + domlen;
+ hostoff = useroff + userlen;
+
+ /* Create the big type-3 message binary blob */
+ size = snprintf((char *)ntlmbuf, NTLM_BUFSIZE,
+ NTLMSSP_SIGNATURE "%c"
+ "\x03%c%c%c" /* 32-bit type = 3 */
+
+ "%c%c" /* LanManager length */
+ "%c%c" /* LanManager allocated space */
+ "%c%c" /* LanManager offset */
+ "%c%c" /* 2 zeroes */
+
+ "%c%c" /* NT-response length */
+ "%c%c" /* NT-response allocated space */
+ "%c%c" /* NT-response offset */
+ "%c%c" /* 2 zeroes */
+
+ "%c%c" /* domain length */
+ "%c%c" /* domain allocated space */
+ "%c%c" /* domain name offset */
+ "%c%c" /* 2 zeroes */
+
+ "%c%c" /* user length */
+ "%c%c" /* user allocated space */
+ "%c%c" /* user offset */
+ "%c%c" /* 2 zeroes */
+
+ "%c%c" /* host length */
+ "%c%c" /* host allocated space */
+ "%c%c" /* host offset */
+ "%c%c" /* 2 zeroes */
+
+ "%c%c" /* session key length (unknown purpose) */
+ "%c%c" /* session key allocated space (unknown purpose) */
+ "%c%c" /* session key offset (unknown purpose) */
+ "%c%c" /* 2 zeroes */
+
+ "%c%c%c%c", /* flags */
+
+ /* domain string */
+ /* user string */
+ /* host string */
+ /* LanManager response */
+ /* NT response */
+
+ 0, /* zero termination */
+ 0, 0, 0, /* type-3 long, the 24 upper bits */
+
+ SHORTPAIR(0x18), /* LanManager response length, twice */
+ SHORTPAIR(0x18),
+ SHORTPAIR(lmrespoff),
+ 0x0, 0x0,
+
+#if USE_NTRESPONSES
+ SHORTPAIR(ntresplen), /* NT-response length, twice */
+ SHORTPAIR(ntresplen),
+ SHORTPAIR(ntrespoff),
+ 0x0, 0x0,
+#else
+ 0x0, 0x0,
+ 0x0, 0x0,
+ 0x0, 0x0,
+ 0x0, 0x0,
+#endif
+ SHORTPAIR(domlen),
+ SHORTPAIR(domlen),
+ SHORTPAIR(domoff),
+ 0x0, 0x0,
+
+ SHORTPAIR(userlen),
+ SHORTPAIR(userlen),
+ SHORTPAIR(useroff),
+ 0x0, 0x0,
+
+ SHORTPAIR(hostlen),
+ SHORTPAIR(hostlen),
+ SHORTPAIR(hostoff),
+ 0x0, 0x0,
+
+ 0x0, 0x0,
+ 0x0, 0x0,
+ 0x0, 0x0,
+ 0x0, 0x0,
+
+ LONGQUARTET(ntlm->flags));
+
+ DEBUGASSERT(size == 64);
+ DEBUGASSERT(size == (size_t)lmrespoff);
+
+ /* We append the binary hashes */
+ if(size < (NTLM_BUFSIZE - 0x18)) {
+ memcpy(&ntlmbuf[size], lmresp, 0x18);
+ size += 0x18;
+ }
+
+ DEBUG_OUT({
+ fprintf(stderr, "**** TYPE3 header lmresp=");
+ ntlm_print_hex(stderr, (char *)&ntlmbuf[lmrespoff], 0x18);
+ });
+
+#if USE_NTRESPONSES
+ if(size < (NTLM_BUFSIZE - ntresplen)) {
+ DEBUGASSERT(size == (size_t)ntrespoff);
+ memcpy(&ntlmbuf[size], ptr_ntresp, ntresplen);
+ size += ntresplen;
+ }
+
+ DEBUG_OUT({
+ fprintf(stderr, "\n ntresp=");
+ ntlm_print_hex(stderr, (char *)&ntlmbuf[ntrespoff], ntresplen);
+ });
+
+ free(ntlmv2resp);/* Free the dynamic buffer allocated for NTLMv2 */
+
+#endif
+
+ DEBUG_OUT({
+ fprintf(stderr, "\n flags=0x%02.2x%02.2x%02.2x%02.2x 0x%08.8x ",
+ LONGQUARTET(ntlm->flags), ntlm->flags);
+ ntlm_print_flags(stderr, ntlm->flags);
+ fprintf(stderr, "\n****\n");
+ });
+
+ /* Make sure that the domain, user and host strings fit in the
+ buffer before we copy them there. */
+ if(size + userlen + domlen + hostlen >= NTLM_BUFSIZE) {
+ failf(data, "user + domain + host name too big");
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ DEBUGASSERT(size == domoff);
+ if(unicode)
+ unicodecpy(&ntlmbuf[size], domain, domlen / 2);
+ else
+ memcpy(&ntlmbuf[size], domain, domlen);
+
+ size += domlen;
+
+ DEBUGASSERT(size == useroff);
+ if(unicode)
+ unicodecpy(&ntlmbuf[size], user, userlen / 2);
+ else
+ memcpy(&ntlmbuf[size], user, userlen);
+
+ size += userlen;
+
+ DEBUGASSERT(size == hostoff);
+ if(unicode)
+ unicodecpy(&ntlmbuf[size], host, hostlen / 2);
+ else
+ memcpy(&ntlmbuf[size], host, hostlen);
+
+ 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)
+ 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);
+
+ return result;
+}
+
+#endif /* USE_NTLM && !USE_WINDOWS_SSPI */
diff --git a/lib/curl_ntlm_msgs.h b/lib/curl_ntlm_msgs.h
new file mode 100644
index 00000000..2a714319
--- /dev/null
+++ b/lib/curl_ntlm_msgs.h
@@ -0,0 +1,143 @@
+#ifndef HEADER_CURL_NTLM_MSGS_H
+#define HEADER_CURL_NTLM_MSGS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_NTLM
+
+/* NTLM buffer fixed size, large enough for long user + host + domain */
+#define NTLM_BUFSIZE 1024
+
+/* Stuff only required for curl_ntlm_msgs.c */
+#ifdef BUILDING_CURL_NTLM_MSGS_C
+
+/* Flag bits definitions based on http://davenport.sourceforge.net/ntlm.html */
+
+#define NTLMFLAG_NEGOTIATE_UNICODE (1<<0)
+/* Indicates that Unicode strings are supported for use in security buffer
+ data. */
+
+#define NTLMFLAG_NEGOTIATE_OEM (1<<1)
+/* Indicates that OEM strings are supported for use in security buffer data. */
+
+#define NTLMFLAG_REQUEST_TARGET (1<<2)
+/* Requests that the server's authentication realm be included in the Type 2
+ message. */
+
+/* unknown (1<<3) */
+#define NTLMFLAG_NEGOTIATE_SIGN (1<<4)
+/* Specifies that authenticated communication between the client and server
+ should carry a digital signature (message integrity). */
+
+#define NTLMFLAG_NEGOTIATE_SEAL (1<<5)
+/* Specifies that authenticated communication between the client and server
+ should be encrypted (message confidentiality). */
+
+#define NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE (1<<6)
+/* Indicates that datagram authentication is being used. */
+
+#define NTLMFLAG_NEGOTIATE_LM_KEY (1<<7)
+/* Indicates that the LAN Manager session key should be used for signing and
+ sealing authenticated communications. */
+
+#define NTLMFLAG_NEGOTIATE_NETWARE (1<<8)
+/* unknown purpose */
+
+#define NTLMFLAG_NEGOTIATE_NTLM_KEY (1<<9)
+/* Indicates that NTLM authentication is being used. */
+
+/* unknown (1<<10) */
+
+#define NTLMFLAG_NEGOTIATE_ANONYMOUS (1<<11)
+/* Sent by the client in the Type 3 message to indicate that an anonymous
+ context has been established. This also affects the response fields. */
+
+#define NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED (1<<12)
+/* Sent by the client in the Type 1 message to indicate that a desired
+ authentication realm is included in the message. */
+
+#define NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED (1<<13)
+/* Sent by the client in the Type 1 message to indicate that the client
+ workstation's name is included in the message. */
+
+#define NTLMFLAG_NEGOTIATE_LOCAL_CALL (1<<14)
+/* Sent by the server to indicate that the server and client are on the same
+ machine. Implies that the client may use a pre-established local security
+ context rather than responding to the challenge. */
+
+#define NTLMFLAG_NEGOTIATE_ALWAYS_SIGN (1<<15)
+/* Indicates that authenticated communication between the client and server
+ should be signed with a "dummy" signature. */
+
+#define NTLMFLAG_TARGET_TYPE_DOMAIN (1<<16)
+/* Sent by the server in the Type 2 message to indicate that the target
+ authentication realm is a domain. */
+
+#define NTLMFLAG_TARGET_TYPE_SERVER (1<<17)
+/* Sent by the server in the Type 2 message to indicate that the target
+ authentication realm is a server. */
+
+#define NTLMFLAG_TARGET_TYPE_SHARE (1<<18)
+/* Sent by the server in the Type 2 message to indicate that the target
+ authentication realm is a share. Presumably, this is for share-level
+ authentication. Usage is unclear. */
+
+#define NTLMFLAG_NEGOTIATE_NTLM2_KEY (1<<19)
+/* Indicates that the NTLM2 signing and sealing scheme should be used for
+ protecting authenticated communications. */
+
+#define NTLMFLAG_REQUEST_INIT_RESPONSE (1<<20)
+/* unknown purpose */
+
+#define NTLMFLAG_REQUEST_ACCEPT_RESPONSE (1<<21)
+/* unknown purpose */
+
+#define NTLMFLAG_REQUEST_NONNT_SESSION_KEY (1<<22)
+/* unknown purpose */
+
+#define NTLMFLAG_NEGOTIATE_TARGET_INFO (1<<23)
+/* Sent by the server in the Type 2 message to indicate that it is including a
+ Target Information block in the message. */
+
+/* unknown (1<24) */
+/* unknown (1<25) */
+/* unknown (1<26) */
+/* unknown (1<27) */
+/* unknown (1<28) */
+
+#define NTLMFLAG_NEGOTIATE_128 (1<<29)
+/* Indicates that 128-bit encryption is supported. */
+
+#define NTLMFLAG_NEGOTIATE_KEY_EXCHANGE (1<<30)
+/* Indicates that the client will provide an encrypted master key in
+ the "Session Key" field of the Type 3 message. */
+
+#define NTLMFLAG_NEGOTIATE_56 (1<<31)
+/* Indicates that 56-bit encryption is supported. */
+
+#endif /* BUILDING_CURL_NTLM_MSGS_C */
+
+#endif /* USE_NTLM */
+
+#endif /* HEADER_CURL_NTLM_MSGS_H */
diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c
new file mode 100644
index 00000000..d63fb277
--- /dev/null
+++ b/lib/curl_ntlm_wb.c
@@ -0,0 +1,431 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_HTTP) && defined(USE_NTLM) && \
+ defined(NTLM_WB_ENABLED)
+
+/*
+ * NTLM details:
+ *
+ * http://davenport.sourceforge.net/ntlm.html
+ * http://www.innovation.ch/java/ntlm.html
+ */
+
+#define DEBUG_ME 0
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+
+#include "urldata.h"
+#include "sendf.h"
+#include "select.h"
+#include "curl_ntlm_msgs.h"
+#include "curl_ntlm_wb.h"
+#include "url.h"
+#include "strerror.h"
+#include "curl_printf.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#if DEBUG_ME
+# define DEBUG_OUT(x) x
+#else
+# define DEBUG_OUT(x) Curl_nop_stmt
+#endif
+
+/* Portable 'sclose_nolog' used only in child process instead of 'sclose'
+ to avoid fooling the socket leak detector */
+#if defined(HAVE_CLOSESOCKET)
+# define sclose_nolog(x) closesocket((x))
+#elif defined(HAVE_CLOSESOCKET_CAMEL)
+# define sclose_nolog(x) CloseSocket((x))
+#else
+# define sclose_nolog(x) close((x))
+#endif
+
+void Curl_ntlm_wb_cleanup(struct connectdata *conn)
+{
+ if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD) {
+ sclose(conn->ntlm_auth_hlpr_socket);
+ conn->ntlm_auth_hlpr_socket = CURL_SOCKET_BAD;
+ }
+
+ if(conn->ntlm_auth_hlpr_pid) {
+ int i;
+ for(i = 0; i < 4; i++) {
+ pid_t ret = waitpid(conn->ntlm_auth_hlpr_pid, NULL, WNOHANG);
+ if(ret == conn->ntlm_auth_hlpr_pid || errno == ECHILD)
+ break;
+ switch(i) {
+ case 0:
+ kill(conn->ntlm_auth_hlpr_pid, SIGTERM);
+ break;
+ case 1:
+ /* Give the process another moment to shut down cleanly before
+ bringing down the axe */
+ Curl_wait_ms(1);
+ break;
+ case 2:
+ kill(conn->ntlm_auth_hlpr_pid, SIGKILL);
+ break;
+ case 3:
+ break;
+ }
+ }
+ conn->ntlm_auth_hlpr_pid = 0;
+ }
+
+ free(conn->challenge_header);
+ conn->challenge_header = NULL;
+ free(conn->response_header);
+ conn->response_header = NULL;
+}
+
+static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp)
+{
+ curl_socket_t sockfds[2];
+ pid_t child_pid;
+ const char *username;
+ 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 */
+ if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD ||
+ conn->ntlm_auth_hlpr_pid)
+ 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)
+ return CURLE_OUT_OF_MEMORY;
+ slash = domain + (slash - username);
+ *slash = '\0';
+ username = username + (slash - domain) + 1;
+ }
+
+ /* For testing purposes, when DEBUGBUILD is defined and environment
+ variable CURL_NTLM_WB_FILE is set a fake_ntlm is used to perform
+ NTLM challenge/response which only accepts commands and output
+ strings pre-written in test case definitions */
+#ifdef DEBUGBUILD
+ ntlm_auth_alloc = curl_getenv("CURL_NTLM_WB_FILE");
+ if(ntlm_auth_alloc)
+ ntlm_auth = ntlm_auth_alloc;
+ else
+#endif
+ ntlm_auth = NTLM_WB_FILE;
+
+ if(access(ntlm_auth, X_OK) != 0) {
+ error = ERRNO;
+ failf(conn->data, "Could not access ntlm_auth: %s errno %d: %s",
+ ntlm_auth, error, Curl_strerror(conn, error));
+ goto done;
+ }
+
+ if(socketpair(AF_UNIX, SOCK_STREAM, 0, sockfds)) {
+ error = ERRNO;
+ failf(conn->data, "Could not open socket pair. errno %d: %s",
+ error, Curl_strerror(conn, error));
+ goto done;
+ }
+
+ child_pid = fork();
+ if(child_pid == -1) {
+ error = ERRNO;
+ sclose(sockfds[0]);
+ sclose(sockfds[1]);
+ failf(conn->data, "Could not fork. errno %d: %s",
+ error, Curl_strerror(conn, error));
+ goto done;
+ }
+ else if(!child_pid) {
+ /*
+ * child process
+ */
+
+ /* Don't use sclose in the child since it fools the socket leak detector */
+ sclose_nolog(sockfds[0]);
+ if(dup2(sockfds[1], STDIN_FILENO) == -1) {
+ error = ERRNO;
+ failf(conn->data, "Could not redirect child stdin. errno %d: %s",
+ error, Curl_strerror(conn, error));
+ exit(1);
+ }
+
+ if(dup2(sockfds[1], STDOUT_FILENO) == -1) {
+ error = ERRNO;
+ failf(conn->data, "Could not redirect child stdout. errno %d: %s",
+ error, Curl_strerror(conn, error));
+ exit(1);
+ }
+
+ if(domain)
+ execl(ntlm_auth, ntlm_auth,
+ "--helper-protocol", "ntlmssp-client-1",
+ "--use-cached-creds",
+ "--username", username,
+ "--domain", domain,
+ NULL);
+ else
+ execl(ntlm_auth, ntlm_auth,
+ "--helper-protocol", "ntlmssp-client-1",
+ "--use-cached-creds",
+ "--username", username,
+ NULL);
+
+ error = ERRNO;
+ sclose_nolog(sockfds[1]);
+ failf(conn->data, "Could not execl(). errno %d: %s",
+ error, Curl_strerror(conn, error));
+ exit(1);
+ }
+
+ sclose(sockfds[1]);
+ conn->ntlm_auth_hlpr_socket = sockfds[0];
+ conn->ntlm_auth_hlpr_pid = child_pid;
+ free(domain);
+ free(ntlm_auth_alloc);
+ return CURLE_OK;
+
+done:
+ free(domain);
+ free(ntlm_auth_alloc);
+ return CURLE_REMOTE_ACCESS_DENIED;
+}
+
+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;
+
+ while(len_in > 0) {
+ ssize_t written = swrite(conn->ntlm_auth_hlpr_socket, input, len_in);
+ if(written == -1) {
+ /* Interrupted by a signal, retry it */
+ if(errno == EINTR)
+ continue;
+ /* write failed if other errors happen */
+ goto done;
+ }
+ input += written;
+ 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);
+ if(size == -1) {
+ if(errno == EINTR)
+ continue;
+ goto done;
+ }
+ else if(size == 0)
+ goto done;
+
+ len_out += size;
+ if(buf[len_out - 1] == '\n') {
+ buf[len_out - 1] = '\0';
+ break;
+ }
+ newbuf = realloc(buf, len_out + NTLM_BUFSIZE);
+ if(!newbuf) {
+ free(buf);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ buf = newbuf;
+ }
+
+ /* Samba/winbind installed but not configured */
+ if(state == NTLMSTATE_TYPE1 &&
+ len_out == 3 &&
+ buf[0] == 'P' && buf[1] == 'W')
+ return CURLE_REMOTE_ACCESS_DENIED;
+ /* invalid response */
+ if(len_out < 4)
+ goto done;
+ if(state == NTLMSTATE_TYPE1 &&
+ (buf[0]!='Y' || buf[1]!='R' || buf[2]!=' '))
+ goto done;
+ if(state == NTLMSTATE_TYPE2 &&
+ (buf[0]!='K' || buf[1]!='K' || buf[2]!=' ') &&
+ (buf[0]!='A' || buf[1]!='F' || buf[2]!=' '))
+ goto done;
+
+ conn->response_header = aprintf("NTLM %.*s", len_out - 4, buf + 3);
+ free(buf);
+ return CURLE_OK;
+done:
+ free(buf);
+ return CURLE_REMOTE_ACCESS_DENIED;
+}
+
+/*
+ * This is for creating ntlm header output by delegating challenge/response
+ * to Samba's winbind daemon helper ntlm_auth.
+ */
+CURLcode Curl_output_ntlm_wb(struct connectdata *conn,
+ bool proxy)
+{
+ /* 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 */
+ char **allocuserpwd;
+ /* point to the name and password for this */
+ const char *userp;
+ /* point to the correct struct with this */
+ struct ntlmdata *ntlm;
+ struct auth *authp;
+
+ CURLcode res = CURLE_OK;
+ char *input;
+
+ DEBUGASSERT(conn);
+ DEBUGASSERT(conn->data);
+
+ if(proxy) {
+ allocuserpwd = &conn->allocptr.proxyuserpwd;
+ userp = conn->proxyuser;
+ ntlm = &conn->proxyntlm;
+ authp = &conn->data->state.authproxy;
+ }
+ else {
+ allocuserpwd = &conn->allocptr.userpwd;
+ userp = conn->user;
+ ntlm = &conn->ntlm;
+ authp = &conn->data->state.authhost;
+ }
+ authp->done = FALSE;
+
+ /* not set means empty */
+ if(!userp)
+ userp="";
+
+ switch(ntlm->state) {
+ case NTLMSTATE_TYPE1:
+ default:
+ /* Use Samba's 'winbind' daemon to support NTLM authentication,
+ * by delegating the NTLM challenge/response protocal to a helper
+ * in ntlm_auth.
+ * http://devel.squid-cache.org/ntlm/squid_helper_protocol.html
+ * http://www.samba.org/samba/docs/man/manpages-3/winbindd.8.html
+ * http://www.samba.org/samba/docs/man/manpages-3/ntlm_auth.1.html
+ * Preprocessor symbol 'NTLM_WB_ENABLED' is defined when this
+ * feature is enabled and 'NTLM_WB_FILE' symbol holds absolute
+ * filename of ntlm_auth helper.
+ * If NTLM authentication using winbind fails, go back to original
+ * request handling process.
+ */
+ /* Create communication with ntlm_auth */
+ res = ntlm_wb_init(conn, userp);
+ if(res)
+ return res;
+ res = ntlm_wb_response(conn, "YR\n", ntlm->state);
+ if(res)
+ return res;
+
+ free(*allocuserpwd);
+ *allocuserpwd = aprintf("%sAuthorization: %s\r\n",
+ proxy ? "Proxy-" : "",
+ conn->response_header);
+ DEBUG_OUT(fprintf(stderr, "**** Header %s\n ", *allocuserpwd));
+ free(conn->response_header);
+ conn->response_header = NULL;
+ break;
+ case NTLMSTATE_TYPE2:
+ input = aprintf("TT %s\n", conn->challenge_header);
+ if(!input)
+ return CURLE_OUT_OF_MEMORY;
+ res = ntlm_wb_response(conn, input, ntlm->state);
+ free(input);
+ input = NULL;
+ if(res)
+ return res;
+
+ free(*allocuserpwd);
+ *allocuserpwd = aprintf("%sAuthorization: %s\r\n",
+ proxy ? "Proxy-" : "",
+ conn->response_header);
+ DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd));
+ ntlm->state = NTLMSTATE_TYPE3; /* we sent a type-3 */
+ authp->done = TRUE;
+ Curl_ntlm_wb_cleanup(conn);
+ break;
+ case NTLMSTATE_TYPE3:
+ /* connection is already authenticated,
+ * don't send a header in future requests */
+ free(*allocuserpwd);
+ *allocuserpwd=NULL;
+ authp->done = TRUE;
+ break;
+ }
+
+ return CURLE_OK;
+}
+
+#endif /* !CURL_DISABLE_HTTP && USE_NTLM && NTLM_WB_ENABLED */
diff --git a/lib/curl_ntlm_wb.h b/lib/curl_ntlm_wb.h
new file mode 100644
index 00000000..828bb576
--- /dev/null
+++ b/lib/curl_ntlm_wb.h
@@ -0,0 +1,38 @@
+#ifndef HEADER_CURL_NTLM_WB_H
+#define HEADER_CURL_NTLM_WB_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_HTTP) && 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 */
+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 /* HEADER_CURL_NTLM_WB_H */
diff --git a/lib/curl_printf.h b/lib/curl_printf.h
new file mode 100644
index 00000000..086923f1
--- /dev/null
+++ b/lib/curl_printf.h
@@ -0,0 +1,56 @@
+#ifndef HEADER_CURL_PRINTF_H
+#define HEADER_CURL_PRINTF_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 header should be included by ALL code in libcurl that uses any
+ * *rintf() functions.
+ */
+
+#include <curl/mprintf.h>
+
+# undef printf
+# undef fprintf
+# undef snprintf
+# undef vprintf
+# undef vfprintf
+# undef vsnprintf
+# undef aprintf
+# undef vaprintf
+# define printf curl_mprintf
+# define fprintf curl_mfprintf
+# define snprintf curl_msnprintf
+# define vprintf curl_mvprintf
+# define vfprintf curl_mvfprintf
+# define vsnprintf curl_mvsnprintf
+# define aprintf curl_maprintf
+# define vaprintf curl_mvaprintf
+
+/* We define away the sprintf functions unconditonally since we don't want
+ internal code to be using them, intentionally or by mistake!*/
+# undef sprintf
+# undef vsprintf
+# define sprintf sprintf_was_used
+# define vsprintf vsprintf_was_used
+
+#endif /* HEADER_CURL_PRINTF_H */
diff --git a/lib/curl_rand.c b/lib/curl_rand.c
deleted file mode 100644
index 047b7f34..00000000
--- a/lib/curl_rand.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#include <curl/curl.h>
-
-#include "curl_rand.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-#include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
-
-/* Private pseudo-random number seed. Unsigned integer >= 32bit. Threads
- mutual exclusion is not implemented to acess it since we do not require
- high quality random numbers (only used in form boudary generation). */
-
-static unsigned int randseed;
-
-/* Pseudo-random number support. */
-
-unsigned int Curl_rand(void)
-{
- unsigned int r;
- /* Return an unsigned 32-bit pseudo-random number. */
- r = randseed = randseed * 1103515245 + 12345;
- return (r << 16) | ((r >> 16) & 0xFFFF);
-}
-
-void Curl_srand(void)
-{
- /* Randomize pseudo-random number sequence. */
-
- randseed = (unsigned int) time(NULL);
- Curl_rand();
- Curl_rand();
- Curl_rand();
-}
-
diff --git a/lib/curl_rand.h b/lib/curl_rand.h
deleted file mode 100644
index 26cfb7f0..00000000
--- a/lib/curl_rand.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef HEADER_CURL_RAND_H
-#define HEADER_CURL_RAND_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-void Curl_srand(void);
-
-unsigned int Curl_rand(void);
-
-#endif /* HEADER_CURL_RAND_H */
diff --git a/lib/curl_rtmp.c b/lib/curl_rtmp.c
index df30dc1f..29389728 100644
--- a/lib/curl_rtmp.c
+++ b/lib/curl_rtmp.c
@@ -5,6 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 2010, Howard Chu, <hyc@highlandsun.com>
*
* This software is licensed as described in the file COPYING, which
@@ -20,7 +21,7 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_LIBRTMP
@@ -28,12 +29,9 @@
#include "nonblock.h" /* for curlx_nonblock */
#include "progress.h" /* for Curl_pgrsSetUploadSize */
#include "transfer.h"
+#include "warnless.h"
#include <curl/curl.h>
#include <librtmp/rtmp.h>
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -47,11 +45,11 @@
#define DEF_BUFTIME (2*60*60*1000) /* 2 hours */
-static CURLcode rtmp_setup(struct connectdata *conn);
+static CURLcode rtmp_setup_connection(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);
-static CURLcode rtmp_disconnect(struct connectdata *conn);
+static CURLcode rtmp_disconnect(struct connectdata *conn, bool dead);
static Curl_recv rtmp_recv;
static Curl_send rtmp_send;
@@ -62,7 +60,7 @@ static Curl_send rtmp_send;
const struct Curl_handler Curl_handler_rtmp = {
"RTMP", /* scheme */
- rtmp_setup, /* setup_connection */
+ rtmp_setup_connection, /* setup_connection */
rtmp_do, /* do_it */
rtmp_done, /* done */
ZERO_NULL, /* do_more */
@@ -71,15 +69,18 @@ const struct Curl_handler Curl_handler_rtmp = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_RTMP, /* defport */
- PROT_RTMP /* protocol */
+ CURLPROTO_RTMP, /* protocol */
+ PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmpt = {
"RTMPT", /* scheme */
- rtmp_setup, /* setup_connection */
+ rtmp_setup_connection, /* setup_connection */
rtmp_do, /* do_it */
rtmp_done, /* done */
ZERO_NULL, /* do_more */
@@ -88,15 +89,18 @@ const struct Curl_handler Curl_handler_rtmpt = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_RTMPT, /* defport */
- PROT_RTMPT /* protocol */
+ CURLPROTO_RTMPT, /* protocol */
+ PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmpe = {
"RTMPE", /* scheme */
- rtmp_setup, /* setup_connection */
+ rtmp_setup_connection, /* setup_connection */
rtmp_do, /* do_it */
rtmp_done, /* done */
ZERO_NULL, /* do_more */
@@ -105,15 +109,18 @@ const struct Curl_handler Curl_handler_rtmpe = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_RTMP, /* defport */
- PROT_RTMPE /* protocol */
+ CURLPROTO_RTMPE, /* protocol */
+ PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmpte = {
"RTMPTE", /* scheme */
- rtmp_setup, /* setup_connection */
+ rtmp_setup_connection, /* setup_connection */
rtmp_do, /* do_it */
rtmp_done, /* done */
ZERO_NULL, /* do_more */
@@ -122,15 +129,18 @@ const struct Curl_handler Curl_handler_rtmpte = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_RTMPT, /* defport */
- PROT_RTMPTE /* protocol */
+ CURLPROTO_RTMPTE, /* protocol */
+ PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmps = {
"RTMPS", /* scheme */
- rtmp_setup, /* setup_connection */
+ rtmp_setup_connection, /* setup_connection */
rtmp_do, /* do_it */
rtmp_done, /* done */
ZERO_NULL, /* do_more */
@@ -139,14 +149,18 @@ const struct Curl_handler Curl_handler_rtmps = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_RTMPS, /* defport */
- PROT_RTMPS /* protocol */
+ CURLPROTO_RTMPS, /* protocol */
+ PROTOPT_NONE /* flags*/
};
+
const struct Curl_handler Curl_handler_rtmpts = {
"RTMPTS", /* scheme */
- rtmp_setup, /* setup_connection */
+ rtmp_setup_connection, /* setup_connection */
rtmp_do, /* do_it */
rtmp_done, /* done */
ZERO_NULL, /* do_more */
@@ -155,22 +169,24 @@ const struct Curl_handler Curl_handler_rtmpts = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_RTMPS, /* defport */
- PROT_RTMPTS /* protocol */
+ CURLPROTO_RTMPTS, /* protocol */
+ PROTOPT_NONE /* flags*/
};
-static CURLcode rtmp_setup(struct connectdata *conn)
+static CURLcode rtmp_setup_connection(struct connectdata *conn)
{
RTMP *r = RTMP_Alloc();
-
- if (!r)
+ if(!r)
return CURLE_OUT_OF_MEMORY;
RTMP_Init(r);
RTMP_SetBufferMS(r, DEF_BUFTIME);
- if (!RTMP_SetupURL(r, conn->data->change.url)) {
+ if(!RTMP_SetupURL(r, conn->data->change.url)) {
RTMP_Free(r);
return CURLE_URL_MALFORMAT;
}
@@ -181,24 +197,26 @@ static CURLcode rtmp_setup(struct connectdata *conn)
static CURLcode rtmp_connect(struct connectdata *conn, bool *done)
{
RTMP *r = conn->proto.generic;
- SET_RCVTIMEO(tv,10);
+ SET_RCVTIMEO(tv, 10);
r->m_sb.sb_socket = conn->sock[FIRSTSOCKET];
/* We have to know if it's a write before we send the
* connect request packet
*/
- if (conn->data->set.upload)
+ if(conn->data->set.upload)
r->Link.protocol |= RTMP_FEATURE_WRITE;
/* For plain streams, use the buffer toggle trick to keep data flowing */
- if (!(r->Link.lFlags & RTMP_LF_LIVE) && !(r->Link.protocol & RTMP_FEATURE_HTTP))
+ if(!(r->Link.lFlags & RTMP_LF_LIVE) &&
+ !(r->Link.protocol & RTMP_FEATURE_HTTP))
r->Link.lFlags |= RTMP_LF_BUFX;
- curlx_nonblock(r->m_sb.sb_socket, FALSE);
- setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(tv));
+ (void)curlx_nonblock(r->m_sb.sb_socket, FALSE);
+ setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_RCVTIMEO,
+ (char *)&tv, sizeof(tv));
- if (!RTMP_Connect1(r, NULL))
+ if(!RTMP_Connect1(r, NULL))
return CURLE_FAILED_INIT;
/* Clients must send a periodic BytesReceived report to the server */
@@ -214,13 +232,14 @@ static CURLcode rtmp_do(struct connectdata *conn, bool *done)
{
RTMP *r = conn->proto.generic;
- if (!RTMP_ConnectStream(r, 0))
+ if(!RTMP_ConnectStream(r, 0))
return CURLE_FAILED_INIT;
- if (conn->data->set.upload) {
- Curl_pgrsSetUploadSize(conn->data, conn->data->set.infilesize);
+ if(conn->data->set.upload) {
+ Curl_pgrsSetUploadSize(conn->data, conn->data->state.infilesize);
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL);
- } else
+ }
+ else
Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL);
*done = TRUE;
return CURLE_OK;
@@ -236,10 +255,12 @@ static CURLcode rtmp_done(struct connectdata *conn, CURLcode status,
return CURLE_OK;
}
-static CURLcode rtmp_disconnect(struct connectdata *conn)
+static CURLcode rtmp_disconnect(struct connectdata *conn,
+ bool dead_connection)
{
RTMP *r = conn->proto.generic;
- if (r) {
+ (void)dead_connection;
+ if(r) {
conn->proto.generic = NULL;
RTMP_Close(r);
RTMP_Free(r);
@@ -255,13 +276,14 @@ static ssize_t rtmp_recv(struct connectdata *conn, int sockindex, char *buf,
(void)sockindex; /* unused */
- nread = RTMP_Read(r, buf, len);
- if (nread < 0) {
- if (r->m_read.status == RTMP_READ_COMPLETE ||
+ nread = RTMP_Read(r, buf, curlx_uztosi(len));
+ if(nread < 0) {
+ if(r->m_read.status == RTMP_READ_COMPLETE ||
r->m_read.status == RTMP_READ_EOF) {
conn->data->req.size = conn->data->req.bytecount;
nread = 0;
- } else
+ }
+ else
*err = CURLE_RECV_ERROR;
}
return nread;
@@ -275,10 +297,10 @@ static ssize_t rtmp_send(struct connectdata *conn, int sockindex,
(void)sockindex; /* unused */
- num = RTMP_Write(r, (char *)buf, len);
- if (num < 0) {
+ num = RTMP_Write(r, (char *)buf, curlx_uztosi(len));
+ if(num < 0)
*err = CURLE_SEND_ERROR;
- }
+
return num;
}
#endif /* USE_LIBRTMP */
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
new file mode 100644
index 00000000..68646bc1
--- /dev/null
+++ b/lib/curl_sasl.c
@@ -0,0 +1,1669 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ * RFC2195 CRAM-MD5 authentication
+ * RFC2617 Basic and Digest Access Authentication
+ * RFC2831 DIGEST-MD5 authentication
+ * RFC4422 Simple Authentication and Security Layer (SASL)
+ * RFC4616 PLAIN authentication
+ * RFC6749 OAuth 2.0 Authorization Framework
+ * Draft LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt>
+ *
+ ***************************************************************************/
+
+#include "curl_setup.h"
+
+#include <curl/curl.h>
+#include "urldata.h"
+
+#include "curl_base64.h"
+#include "curl_md5.h"
+#include "vtls/vtls.h"
+#include "curl_hmac.h"
+#include "curl_sasl.h"
+#include "warnless.h"
+#include "strtok.h"
+#include "strequal.h"
+#include "rawstr.h"
+#include "sendf.h"
+#include "non-ascii.h" /* included for Curl_convert_... prototypes */
+#include "curl_printf.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+/* Supported mechanisms */
+const struct {
+ const char *name; /* Name */
+ size_t len; /* Name length */
+ unsigned int bit; /* Flag bit */
+} mechtable[] = {
+ { "LOGIN", 5, SASL_MECH_LOGIN },
+ { "PLAIN", 5, SASL_MECH_PLAIN },
+ { "CRAM-MD5", 8, SASL_MECH_CRAM_MD5 },
+ { "DIGEST-MD5", 10, SASL_MECH_DIGEST_MD5 },
+ { "GSSAPI", 6, SASL_MECH_GSSAPI },
+ { "EXTERNAL", 8, SASL_MECH_EXTERNAL },
+ { "NTLM", 4, SASL_MECH_NTLM },
+ { "XOAUTH2", 7, SASL_MECH_XOAUTH2 },
+ { ZERO_NULL, 0, 0 }
+};
+
+#if !defined(CURL_DISABLE_CRYPTO_AUTH) && !defined(USE_WINDOWS_SSPI)
+#define DIGEST_QOP_VALUE_AUTH (1 << 0)
+#define DIGEST_QOP_VALUE_AUTH_INT (1 << 1)
+#define DIGEST_QOP_VALUE_AUTH_CONF (1 << 2)
+
+#define DIGEST_QOP_VALUE_STRING_AUTH "auth"
+#define DIGEST_QOP_VALUE_STRING_AUTH_INT "auth-int"
+#define DIGEST_QOP_VALUE_STRING_AUTH_CONF "auth-conf"
+
+/* 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; \
+ }
+
+#endif
+
+#if !defined(CURL_DISABLE_CRYPTO_AUTH)
+/*
+ * Returns 0 on success and then the buffers are filled in fine.
+ *
+ * Non-zero means failure to parse.
+ */
+int Curl_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! */
+}
+#endif
+
+#if !defined(CURL_DISABLE_CRYPTO_AUTH) && !defined(USE_WINDOWS_SSPI)
+/* 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
+ */
+static bool sasl_digest_get_key_value(const char *chlg,
+ const char *key,
+ char *value,
+ size_t max_val_len,
+ char end_char)
+{
+ char *find_pos;
+ size_t i;
+
+ find_pos = strstr(chlg, key);
+ if(!find_pos)
+ return FALSE;
+
+ find_pos += strlen(key);
+
+ for(i = 0; *find_pos && *find_pos != end_char && i < max_val_len - 1; ++i)
+ value[i] = *find_pos++;
+ value[i] = '\0';
+
+ return TRUE;
+}
+
+static CURLcode sasl_digest_get_qop_values(const char *options, int *value)
+{
+ char *tmp;
+ char *token;
+ char *tok_buf;
+
+ /* Initialise the output */
+ *value = 0;
+
+ /* Tokenise the list of qop values. Use a temporary clone of the buffer since
+ strtok_r() ruins it. */
+ tmp = strdup(options);
+ 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))
+ *value |= DIGEST_QOP_VALUE_AUTH;
+ else if(Curl_raw_equal(token, DIGEST_QOP_VALUE_STRING_AUTH_INT))
+ *value |= DIGEST_QOP_VALUE_AUTH_INT;
+ else if(Curl_raw_equal(token, DIGEST_QOP_VALUE_STRING_AUTH_CONF))
+ *value |= DIGEST_QOP_VALUE_AUTH_CONF;
+
+ token = strtok_r(NULL, ",", &tok_buf);
+ }
+
+ free(tmp);
+
+ 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:
+ *
+ * service [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
+
+/*
+ * sasl_create_plain_message()
+ *
+ * This is used to generate an already encoded PLAIN message ready
+ * for sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data [in] - The session handle.
+ * userp [in] - The user name.
+ * passdwp [in] - The user's password.
+ * 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.
+ */
+static CURLcode sasl_create_plain_message(struct SessionHandle *data,
+ const char *userp,
+ const char *passwdp,
+ char **outptr, size_t *outlen)
+{
+ CURLcode result;
+ char *plainauth;
+ size_t ulen;
+ size_t plen;
+
+ ulen = strlen(userp);
+ plen = strlen(passwdp);
+
+ plainauth = malloc(2 * ulen + plen + 2);
+ if(!plainauth) {
+ *outlen = 0;
+ *outptr = NULL;
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ /* Calculate the reply */
+ memcpy(plainauth, userp, ulen);
+ plainauth[ulen] = '\0';
+ memcpy(plainauth + ulen + 1, userp, ulen);
+ plainauth[2 * ulen + 1] = '\0';
+ memcpy(plainauth + 2 * ulen + 2, passwdp, plen);
+
+ /* Base64 encode the reply */
+ result = Curl_base64_encode(data, plainauth, 2 * ulen + plen + 2, outptr,
+ outlen);
+ free(plainauth);
+ return result;
+}
+
+/*
+ * sasl_create_login_message()
+ *
+ * This is used to generate an already encoded LOGIN message containing the
+ * user name or password ready for sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data [in] - The session handle.
+ * valuep [in] - The user name or user's password.
+ * 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.
+ */
+static CURLcode sasl_create_login_message(struct SessionHandle *data,
+ const char *valuep, char **outptr,
+ size_t *outlen)
+{
+ size_t vlen = strlen(valuep);
+
+ if(!vlen) {
+ /* Calculate an empty reply */
+ *outptr = strdup("=");
+ if(*outptr) {
+ *outlen = (size_t) 1;
+ return CURLE_OK;
+ }
+
+ *outlen = 0;
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ /* Base64 encode the value */
+ return Curl_base64_encode(data, valuep, vlen, outptr, outlen);
+}
+
+/*
+ * sasl_create_external_message()
+ *
+ * This is used to generate an already encoded EXTERNAL message containing
+ * the user name ready for sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data [in] - The session handle.
+ * user [in] - The user name.
+ * 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.
+ */
+static CURLcode sasl_create_external_message(struct SessionHandle *data,
+ const char *user, char **outptr,
+ size_t *outlen)
+{
+ /* This is the same formatting as the login message. */
+ return sasl_create_login_message(data, user, outptr, outlen);
+}
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+ /*
+ * sasl_decode_cram_md5_message()
+ *
+ * This is used to decode an already encoded CRAM-MD5 challenge message.
+ *
+ * Parameters:
+ *
+ * chlg64 [in] - 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.
+ *
+ * Returns CURLE_OK on success.
+ */
+static CURLcode sasl_decode_cram_md5_message(const char *chlg64, char **outptr,
+ size_t *outlen)
+{
+ CURLcode result = CURLE_OK;
+ size_t chlg64len = strlen(chlg64);
+
+ *outptr = NULL;
+ *outlen = 0;
+
+ /* Decode the challenge if necessary */
+ if(chlg64len && *chlg64 != '=')
+ result = Curl_base64_decode(chlg64, (unsigned char **) outptr, outlen);
+
+ return result;
+ }
+
+ /*
+ * sasl_create_cram_md5_message()
+ *
+ * This is used to generate an already encoded CRAM-MD5 response message ready
+ * for sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data [in] - The session handle.
+ * chlg [in] - The challenge.
+ * userp [in] - The user name.
+ * passdwp [in] - The user's password.
+ * 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.
+ */
+static CURLcode sasl_create_cram_md5_message(struct SessionHandle *data,
+ const char *chlg,
+ const char *userp,
+ const char *passwdp,
+ char **outptr, size_t *outlen)
+{
+ CURLcode result = CURLE_OK;
+ size_t chlglen = 0;
+ HMAC_context *ctxt;
+ unsigned char digest[MD5_DIGEST_LEN];
+ char *response;
+
+ if(chlg)
+ chlglen = strlen(chlg);
+
+ /* Compute the digest using the password as the key */
+ ctxt = Curl_HMAC_init(Curl_HMAC_MD5,
+ (const unsigned char *) passwdp,
+ curlx_uztoui(strlen(passwdp)));
+ if(!ctxt)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Update the digest with the given challenge */
+ if(chlglen > 0)
+ Curl_HMAC_update(ctxt, (const unsigned char *) chlg,
+ curlx_uztoui(chlglen));
+
+ /* Finalise the digest */
+ Curl_HMAC_final(ctxt, digest);
+
+ /* Generate the response */
+ response = aprintf(
+ "%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ userp, digest[0], digest[1], digest[2], digest[3], digest[4],
+ digest[5], digest[6], digest[7], digest[8], digest[9], digest[10],
+ digest[11], digest[12], digest[13], digest[14], digest[15]);
+ if(!response)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Base64 encode the response */
+ result = Curl_base64_encode(data, response, 0, outptr, outlen);
+
+ free(response);
+
+ return result;
+}
+
+#ifndef USE_WINDOWS_SSPI
+/*
+ * sasl_decode_digest_md5_message()
+ *
+ * This is used internally to decode an already encoded DIGEST-MD5 challenge
+ * message into the seperate attributes.
+ *
+ * Parameters:
+ *
+ * chlg64 [in] - 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.
+ * rlen [in] - The length of the realm buffer.
+ * alg [in/out] - The buffer where the algorithm will be stored.
+ * alen [in] - The length of the algorithm buffer.
+ * qop [in/out] - The buffer where the qop-options will be stored.
+ * qlen [in] - The length of the qop buffer.
+ *
+ * Returns CURLE_OK on success.
+ */
+static CURLcode sasl_decode_digest_md5_message(const char *chlg64,
+ char *nonce, size_t nlen,
+ char *realm, size_t rlen,
+ char *alg, size_t alen,
+ char *qop, size_t qlen)
+{
+ CURLcode result = CURLE_OK;
+ unsigned char *chlg = NULL;
+ size_t chlglen = 0;
+ size_t chlg64len = strlen(chlg64);
+
+ /* Decode the base-64 encoded challenge message */
+ if(chlg64len && *chlg64 != '=') {
+ result = Curl_base64_decode(chlg64, &chlg, &chlglen);
+ if(result)
+ return result;
+ }
+
+ /* Ensure we have a valid challenge message */
+ if(!chlg)
+ return CURLE_BAD_CONTENT_ENCODING;
+
+ /* Retrieve nonce string from the challenge */
+ if(!sasl_digest_get_key_value((char *)chlg, "nonce=\"", nonce, nlen, '\"')) {
+ free(chlg);
+ return CURLE_BAD_CONTENT_ENCODING;
+ }
+
+ /* Retrieve realm string from the challenge */
+ if(!sasl_digest_get_key_value((char *)chlg, "realm=\"", realm, rlen, '\"')) {
+ /* Challenge does not have a realm, set empty string [RFC2831] page 6 */
+ strcpy(realm, "");
+ }
+
+ /* Retrieve algorithm string from the challenge */
+ if(!sasl_digest_get_key_value((char *)chlg, "algorithm=", alg, alen, ',')) {
+ free(chlg);
+ return CURLE_BAD_CONTENT_ENCODING;
+ }
+
+ /* Retrieve qop-options string from the challenge */
+ if(!sasl_digest_get_key_value((char *)chlg, "qop=\"", qop, qlen, '\"')) {
+ free(chlg);
+ return CURLE_BAD_CONTENT_ENCODING;
+ }
+
+ free(chlg);
+
+ return CURLE_OK;
+}
+
+/*
+ * Curl_sasl_create_digest_md5_message()
+ *
+ * This is used to generate an already encoded DIGEST-MD5 response message
+ * ready for sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data [in] - The session handle.
+ * chlg64 [in] - 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
+ * 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_md5_message(struct SessionHandle *data,
+ const char *chlg64,
+ const char *userp,
+ const char *passwdp,
+ const char *service,
+ char **outptr, size_t *outlen)
+{
+ CURLcode result = CURLE_OK;
+ size_t i;
+ MD5_context *ctxt;
+ char *response = NULL;
+ unsigned char digest[MD5_DIGEST_LEN];
+ char HA1_hex[2 * MD5_DIGEST_LEN + 1];
+ char HA2_hex[2 * MD5_DIGEST_LEN + 1];
+ char resp_hash_hex[2 * MD5_DIGEST_LEN + 1];
+ char nonce[64];
+ char realm[128];
+ char algorithm[64];
+ char qop_options[64];
+ int qop_values;
+ char cnonce[33];
+ unsigned int entropy[4];
+ char nonceCount[] = "00000001";
+ char method[] = "AUTHENTICATE";
+ char qop[] = DIGEST_QOP_VALUE_STRING_AUTH;
+ char *spn = NULL;
+
+ /* Decode the challange message */
+ result = sasl_decode_digest_md5_message(chlg64, nonce, sizeof(nonce),
+ realm, sizeof(realm),
+ algorithm, sizeof(algorithm),
+ qop_options, sizeof(qop_options));
+ if(result)
+ return result;
+
+ /* We only support md5 sessions */
+ if(strcmp(algorithm, "md5-sess") != 0)
+ return CURLE_BAD_CONTENT_ENCODING;
+
+ /* Get the qop-values from the qop-options */
+ result = sasl_digest_get_qop_values(qop_options, &qop_values);
+ if(result)
+ return result;
+
+ /* We only support auth quality-of-protection */
+ if(!(qop_values & DIGEST_QOP_VALUE_AUTH))
+ return CURLE_BAD_CONTENT_ENCODING;
+
+ /* Generate 16 bytes of random data */
+ entropy[0] = Curl_rand(data);
+ entropy[1] = Curl_rand(data);
+ entropy[2] = Curl_rand(data);
+ entropy[3] = Curl_rand(data);
+
+ /* Convert the random data into a 32 byte hex string */
+ snprintf(cnonce, sizeof(cnonce), "%08x%08x%08x%08x",
+ entropy[0], entropy[1], entropy[2], entropy[3]);
+
+ /* So far so good, now calculate A1 and H(A1) according to RFC 2831 */
+ ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+ if(!ctxt)
+ return CURLE_OUT_OF_MEMORY;
+
+ Curl_MD5_update(ctxt, (const unsigned char *) userp,
+ curlx_uztoui(strlen(userp)));
+ Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+ Curl_MD5_update(ctxt, (const unsigned char *) realm,
+ curlx_uztoui(strlen(realm)));
+ Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+ Curl_MD5_update(ctxt, (const unsigned char *) passwdp,
+ curlx_uztoui(strlen(passwdp)));
+ Curl_MD5_final(ctxt, digest);
+
+ ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+ if(!ctxt)
+ return CURLE_OUT_OF_MEMORY;
+
+ Curl_MD5_update(ctxt, (const unsigned char *) digest, MD5_DIGEST_LEN);
+ Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+ Curl_MD5_update(ctxt, (const unsigned char *) nonce,
+ curlx_uztoui(strlen(nonce)));
+ Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+ Curl_MD5_update(ctxt, (const unsigned char *) cnonce,
+ curlx_uztoui(strlen(cnonce)));
+ Curl_MD5_final(ctxt, digest);
+
+ /* Convert calculated 16 octet hex into 32 bytes string */
+ 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;
+
+ /* Calculate H(A2) */
+ ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+ if(!ctxt) {
+ free(spn);
+
+ 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_final(ctxt, digest);
+
+ for(i = 0; i < MD5_DIGEST_LEN; i++)
+ snprintf(&HA2_hex[2 * i], 3, "%02x", digest[i]);
+
+ /* Now calculate the response hash */
+ ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+ if(!ctxt) {
+ free(spn);
+
+ 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);
+ Curl_MD5_update(ctxt, (const unsigned char *) nonce,
+ curlx_uztoui(strlen(nonce)));
+ Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+
+ Curl_MD5_update(ctxt, (const unsigned char *) nonceCount,
+ curlx_uztoui(strlen(nonceCount)));
+ Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+ Curl_MD5_update(ctxt, (const unsigned char *) cnonce,
+ curlx_uztoui(strlen(cnonce)));
+ Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+ Curl_MD5_update(ctxt, (const unsigned char *) qop,
+ curlx_uztoui(strlen(qop)));
+ Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+
+ Curl_MD5_update(ctxt, (const unsigned char *) HA2_hex, 2 * MD5_DIGEST_LEN);
+ Curl_MD5_final(ctxt, digest);
+
+ for(i = 0; i < MD5_DIGEST_LEN; i++)
+ snprintf(&resp_hash_hex[2 * i], 3, "%02x", digest[i]);
+
+ /* Generate the response */
+ response = aprintf("username=\"%s\",realm=\"%s\",nonce=\"%s\","
+ "cnonce=\"%s\",nc=\"%s\",digest-uri=\"%s\",response=%s,"
+ "qop=%s",
+ userp, realm, nonce,
+ cnonce, nonceCount, spn, resp_hash_hex, qop);
+ free(spn);
+ if(!response)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Base64 encode the response */
+ result = Curl_base64_encode(data, response, 0, outptr, outlen);
+
+ free(response);
+
+ 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)
+{
+ 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(!Curl_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;
+}
+
+/*
+ * 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.
+ * 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)
+{
+ 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);
+ free(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);
+ free(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");
+ free(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);
+ free(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);
+ free(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);
+ }
+ free(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;
+}
+
+/*
+ * 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)
+{
+ 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 */
+
+#endif /* CURL_DISABLE_CRYPTO_AUTH */
+
+#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI)
+/*
+ * 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 the target info */
+ Curl_safefree(ntlm->target_info);
+
+ /* Reset any variables */
+ ntlm->target_info_len = 0;
+}
+#endif /* USE_NTLM && !USE_WINDOWS_SSPI*/
+
+/*
+ * sasl_create_xoauth2_message()
+ *
+ * This is used to generate an already encoded OAuth 2.0 message ready for
+ * sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data [in] - The session handle.
+ * user [in] - The user name.
+ * bearer [in] - The bearer token.
+ * 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.
+ */
+static CURLcode sasl_create_xoauth2_message(struct SessionHandle *data,
+ const char *user,
+ const char *bearer,
+ char **outptr, size_t *outlen)
+{
+ CURLcode result = CURLE_OK;
+ char *xoauth = NULL;
+
+ /* Generate the message */
+ xoauth = aprintf("user=%s\1auth=Bearer %s\1\1", user, bearer);
+ if(!xoauth)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Base64 encode the reply */
+ result = Curl_base64_encode(data, xoauth, strlen(xoauth), outptr, outlen);
+
+ free(xoauth);
+
+ return result;
+}
+
+/*
+ * Curl_sasl_cleanup()
+ *
+ * This is used to cleanup any libraries or curl modules used by the sasl
+ * functions.
+ *
+ * Parameters:
+ *
+ * conn [in] - 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)
+ /* Cleanup the ntlm structure */
+ if(authused == SASL_MECH_NTLM) {
+ Curl_sasl_ntlm_cleanup(&conn->ntlm);
+ }
+#endif
+
+#if !defined(USE_KERBEROS5) && !defined(USE_NTLM)
+ /* Reserved for future use */
+ (void)conn;
+ (void)authused;
+#endif
+}
+
+/*
+ * Curl_sasl_decode_mech()
+ *
+ * Convert a SASL mechanism name into a token.
+ *
+ * Parameters:
+ *
+ * ptr [in] - The mechanism string.
+ * maxlen [in] - Maximum mechanism string length.
+ * len [out] - If not NULL, effective name length.
+ *
+ * Returns the SASL mechanism token or 0 if no match.
+ */
+unsigned int Curl_sasl_decode_mech(const char *ptr, size_t maxlen, size_t *len)
+{
+ unsigned int i;
+ char c;
+
+ for(i = 0; mechtable[i].name; i++) {
+ if(maxlen >= mechtable[i].len &&
+ !memcmp(ptr, mechtable[i].name, mechtable[i].len)) {
+ if(len)
+ *len = mechtable[i].len;
+
+ if(maxlen == mechtable[i].len)
+ return mechtable[i].bit;
+
+ c = ptr[mechtable[i].len];
+ if(!ISUPPER(c) && !ISDIGIT(c) && c != '-' && c != '_')
+ return mechtable[i].bit;
+ }
+ }
+
+ return 0;
+}
+
+/*
+ * Curl_sasl_parse_url_auth_option()
+ *
+ * Parse the URL login options.
+ */
+CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl,
+ const char *value, size_t len)
+{
+ CURLcode result = CURLE_OK;
+ unsigned int mechbit;
+ size_t mechlen;
+
+ if(!len)
+ return CURLE_URL_MALFORMAT;
+
+ if(sasl->resetprefs) {
+ sasl->resetprefs = FALSE;
+ sasl->prefmech = SASL_AUTH_NONE;
+ }
+
+ if(strnequal(value, "*", len))
+ sasl->prefmech = SASL_AUTH_DEFAULT;
+ else if((mechbit = Curl_sasl_decode_mech(value, len, &mechlen)) &&
+ mechlen == len)
+ sasl->prefmech |= mechbit;
+ else
+ result = CURLE_URL_MALFORMAT;
+
+ return result;
+}
+
+/*
+ * Curl_sasl_init()
+ *
+ * Initializes the SASL structure.
+ */
+void Curl_sasl_init(struct SASL *sasl, const struct SASLproto *params)
+{
+ sasl->params = params; /* Set protocol dependent parameters */
+ sasl->state = SASL_STOP; /* Not yet running */
+ sasl->authmechs = SASL_AUTH_NONE; /* No known authentication mechanism yet */
+ sasl->prefmech = SASL_AUTH_DEFAULT; /* Prefer all mechanisms */
+ sasl->authused = SASL_AUTH_NONE; /* No the authentication mechanism used */
+ sasl->resetprefs = TRUE; /* Reset prefmech upon AUTH parsing. */
+ sasl->mutual_auth = FALSE; /* No mutual authentication (GSSAPI only) */
+ sasl->force_ir = FALSE; /* Respect external option */
+}
+
+/*
+ * state()
+ *
+ * This is the ONLY way to change SASL state!
+ */
+static void state(struct SASL *sasl, struct connectdata *conn,
+ saslstate newstate)
+{
+#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
+ /* for debug purposes */
+ static const char * const names[]={
+ "STOP",
+ "PLAIN",
+ "LOGIN",
+ "LOGIN_PASSWD",
+ "EXTERNAL",
+ "CRAMMD5",
+ "DIGESTMD5",
+ "DIGESTMD5_RESP",
+ "NTLM",
+ "NTLM_TYPE2MSG",
+ "GSSAPI",
+ "GSSAPI_TOKEN",
+ "GSSAPI_NO_DATA",
+ "XOAUTH2",
+ "CANCEL",
+ "FINAL",
+ /* LAST */
+ };
+
+ if(sasl->state != newstate)
+ infof(conn->data, "SASL %p state change from %s to %s\n",
+ (void *)sasl, names[sasl->state], names[newstate]);
+#else
+ (void) conn;
+#endif
+
+ sasl->state = newstate;
+}
+
+/*
+ * Curl_sasl_can_authenticate()
+ *
+ * Check if we have enough auth data and capabilities to authenticate.
+ */
+bool Curl_sasl_can_authenticate(struct SASL *sasl, struct connectdata *conn)
+{
+ /* Have credentials been provided? */
+ if(conn->bits.user_passwd)
+ return TRUE;
+
+ /* EXTERNAL can authenticate without a user name and/or password */
+ if(sasl->authmechs & sasl->prefmech & SASL_MECH_EXTERNAL)
+ return TRUE;
+
+ return FALSE;
+}
+
+/*
+ * Curl_sasl_start()
+ *
+ * Calculate the required login details for SASL authentication.
+ */
+CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
+ bool force_ir, saslprogress *progress)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ unsigned int enabledmechs;
+ const char *mech = NULL;
+ char *resp = NULL;
+ size_t len = 0;
+ saslstate state1 = SASL_STOP;
+ saslstate state2 = SASL_FINAL;
+
+ sasl->force_ir = force_ir; /* Latch for future use */
+ sasl->authused = 0; /* No mechanism used yet */
+ enabledmechs = sasl->authmechs & sasl->prefmech;
+ *progress = SASL_IDLE;
+
+ /* Calculate the supported authentication mechanism, by decreasing order of
+ security, as well as the initial response where appropriate */
+ if((enabledmechs & SASL_MECH_EXTERNAL) && !conn->passwd[0]) {
+ mech = SASL_MECH_STRING_EXTERNAL;
+ state1 = SASL_EXTERNAL;
+ sasl->authused = SASL_MECH_EXTERNAL;
+
+ if(force_ir || data->set.sasl_ir)
+ result = sasl_create_external_message(data, conn->user, &resp, &len);
+ }
+ else if(conn->bits.user_passwd) {
+#if defined(USE_KERBEROS5)
+ if(enabledmechs & SASL_MECH_GSSAPI) {
+ sasl->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */
+ mech = SASL_MECH_STRING_GSSAPI;
+ state1 = SASL_GSSAPI;
+ state2 = SASL_GSSAPI_TOKEN;
+ sasl->authused = SASL_MECH_GSSAPI;
+
+ if(force_ir || data->set.sasl_ir)
+ result = Curl_sasl_create_gssapi_user_message(data, conn->user,
+ conn->passwd,
+ sasl->params->service,
+ sasl->mutual_auth,
+ NULL, &conn->krb5,
+ &resp, &len);
+ }
+ else
+#endif
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+ if(enabledmechs & SASL_MECH_DIGEST_MD5) {
+ mech = SASL_MECH_STRING_DIGEST_MD5;
+ state1 = SASL_DIGESTMD5;
+ sasl->authused = SASL_MECH_DIGEST_MD5;
+ }
+ else if(enabledmechs & SASL_MECH_CRAM_MD5) {
+ mech = SASL_MECH_STRING_CRAM_MD5;
+ state1 = SASL_CRAMMD5;
+ sasl->authused = SASL_MECH_CRAM_MD5;
+ }
+ else
+#endif
+#ifdef USE_NTLM
+ if(enabledmechs & SASL_MECH_NTLM) {
+ mech = SASL_MECH_STRING_NTLM;
+ state1 = SASL_NTLM;
+ state2 = SASL_NTLM_TYPE2MSG;
+ sasl->authused = SASL_MECH_NTLM;
+
+ if(force_ir || data->set.sasl_ir)
+ result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+ &conn->ntlm, &resp, &len);
+ }
+ else
+#endif
+ if((enabledmechs & SASL_MECH_XOAUTH2) || conn->xoauth2_bearer) {
+ mech = SASL_MECH_STRING_XOAUTH2;
+ state1 = SASL_XOAUTH2;
+ sasl->authused = SASL_MECH_XOAUTH2;
+
+ if(force_ir || data->set.sasl_ir)
+ result = sasl_create_xoauth2_message(data, conn->user,
+ conn->xoauth2_bearer,
+ &resp, &len);
+ }
+ else if(enabledmechs & SASL_MECH_LOGIN) {
+ mech = SASL_MECH_STRING_LOGIN;
+ state1 = SASL_LOGIN;
+ state2 = SASL_LOGIN_PASSWD;
+ sasl->authused = SASL_MECH_LOGIN;
+
+ if(force_ir || data->set.sasl_ir)
+ result = sasl_create_login_message(data, conn->user, &resp, &len);
+ }
+ else if(enabledmechs & SASL_MECH_PLAIN) {
+ mech = SASL_MECH_STRING_PLAIN;
+ state1 = SASL_PLAIN;
+ sasl->authused = SASL_MECH_PLAIN;
+
+ if(force_ir || data->set.sasl_ir)
+ result = sasl_create_plain_message(data, conn->user, conn->passwd,
+ &resp, &len);
+ }
+ }
+
+ if(!result) {
+ if(resp && sasl->params->maxirlen &&
+ strlen(mech) + len > sasl->params->maxirlen) {
+ free(resp);
+ resp = NULL;
+ }
+
+ if(mech) {
+ result = sasl->params->sendauth(conn, mech, resp);
+ if(!result) {
+ *progress = SASL_INPROGRESS;
+ state(sasl, conn, resp? state2: state1);
+ }
+ }
+ }
+
+ free(resp);
+
+ return result;
+}
+
+/*
+ * Curl_sasl_continue()
+ *
+ * Continue the authentication.
+ */
+CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
+ int code, saslprogress *progress)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ saslstate newstate = SASL_FINAL;
+ char *resp = NULL;
+#if !defined(CURL_DISABLE_CRYPTO_AUTH)
+ char *serverdata;
+ char *chlg = NULL;
+ size_t chlglen = 0;
+#endif
+ size_t len = 0;
+
+ *progress = SASL_INPROGRESS;
+
+ if(sasl->state == SASL_FINAL) {
+ if(code != sasl->params->finalcode)
+ result = CURLE_LOGIN_DENIED;
+ *progress = SASL_DONE;
+ state(sasl, conn, SASL_STOP);
+ return result;
+ }
+
+ if(sasl->state != SASL_CANCEL && code != sasl->params->contcode) {
+ *progress = SASL_DONE;
+ state(sasl, conn, SASL_STOP);
+ return CURLE_LOGIN_DENIED;
+ }
+
+ switch(sasl->state) {
+ case SASL_STOP:
+ *progress = SASL_DONE;
+ return result;
+ case SASL_PLAIN:
+ result = sasl_create_plain_message(data, conn->user, conn->passwd, &resp,
+ &len);
+ break;
+ case SASL_LOGIN:
+ result = sasl_create_login_message(data, conn->user, &resp, &len);
+ newstate = SASL_LOGIN_PASSWD;
+ break;
+ case SASL_LOGIN_PASSWD:
+ result = sasl_create_login_message(data, conn->passwd, &resp, &len);
+ break;
+ case SASL_EXTERNAL:
+ result = sasl_create_external_message(data, conn->user, &resp, &len);
+ break;
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+ case SASL_CRAMMD5:
+ sasl->params->getmessage(data->state.buffer, &serverdata);
+ result = sasl_decode_cram_md5_message(serverdata, &chlg, &chlglen);
+ if(!result)
+ result = sasl_create_cram_md5_message(data, chlg, conn->user,
+ conn->passwd, &resp, &len);
+ free(chlg);
+ break;
+ case SASL_DIGESTMD5:
+ sasl->params->getmessage(data->state.buffer, &serverdata);
+ result = Curl_sasl_create_digest_md5_message(data, serverdata,
+ conn->user, conn->passwd,
+ sasl->params->service,
+ &resp, &len);
+ newstate = SASL_DIGESTMD5_RESP;
+ break;
+ case SASL_DIGESTMD5_RESP:
+ if(!(resp = strdup("")))
+ result = CURLE_OUT_OF_MEMORY;
+ break;
+#endif
+
+#ifdef USE_NTLM
+ case SASL_NTLM:
+ /* Create the type-1 message */
+ result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+ &conn->ntlm, &resp, &len);
+ newstate = SASL_NTLM_TYPE2MSG;
+ break;
+ case SASL_NTLM_TYPE2MSG:
+ /* Decode the type-2 message */
+ sasl->params->getmessage(data->state.buffer, &serverdata);
+ result = Curl_sasl_decode_ntlm_type2_message(data, serverdata,
+ &conn->ntlm);
+ if(!result)
+ result = Curl_sasl_create_ntlm_type3_message(data, conn->user,
+ conn->passwd, &conn->ntlm,
+ &resp, &len);
+ break;
+#endif
+
+#if defined(USE_KERBEROS5)
+ case SASL_GSSAPI:
+ result = Curl_sasl_create_gssapi_user_message(data, conn->user,
+ conn->passwd,
+ sasl->params->service,
+ sasl->mutual_auth, NULL,
+ &conn->krb5,
+ &resp, &len);
+ newstate = SASL_GSSAPI_TOKEN;
+ break;
+ case SASL_GSSAPI_TOKEN:
+ sasl->params->getmessage(data->state.buffer, &serverdata);
+ if(sasl->mutual_auth) {
+ /* Decode the user token challenge and create the optional response
+ message */
+ result = Curl_sasl_create_gssapi_user_message(data, NULL, NULL, NULL,
+ sasl->mutual_auth,
+ serverdata, &conn->krb5,
+ &resp, &len);
+ newstate = SASL_GSSAPI_NO_DATA;
+ }
+ else
+ /* Decode the security challenge and create the response message */
+ result = Curl_sasl_create_gssapi_security_message(data, serverdata,
+ &conn->krb5,
+ &resp, &len);
+ break;
+ case SASL_GSSAPI_NO_DATA:
+ sasl->params->getmessage(data->state.buffer, &serverdata);
+ /* Decode the security challenge and create the response message */
+ result = Curl_sasl_create_gssapi_security_message(data, serverdata,
+ &conn->krb5,
+ &resp, &len);
+ break;
+#endif
+
+ case SASL_XOAUTH2:
+ /* Create the authorisation message */
+ result = sasl_create_xoauth2_message(data, conn->user,
+ conn->xoauth2_bearer, &resp, &len);
+ break;
+ case SASL_CANCEL:
+ /* Remove the offending mechanism from the supported list */
+ sasl->authmechs ^= sasl->authused;
+
+ /* Start an alternative SASL authentication */
+ result = Curl_sasl_start(sasl, conn, sasl->force_ir, progress);
+ newstate = sasl->state; /* Use state from Curl_sasl_start() */
+ break;
+ default:
+ failf(data, "Unsupported SASL authentication mechanism");
+ result = CURLE_UNSUPPORTED_PROTOCOL; /* Should not happen */
+ break;
+ }
+
+ switch(result) {
+ case CURLE_BAD_CONTENT_ENCODING:
+ /* Cancel dialog */
+ result = sasl->params->sendcont(conn, "*");
+ newstate = SASL_CANCEL;
+ break;
+ case CURLE_OK:
+ if(resp)
+ result = sasl->params->sendcont(conn, resp);
+ break;
+ default:
+ newstate = SASL_STOP; /* Stop on error */
+ *progress = SASL_DONE;
+ break;
+ }
+
+ free(resp);
+
+ state(sasl, conn, newstate);
+
+ return result;
+}
diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h
new file mode 100644
index 00000000..117d60e3
--- /dev/null
+++ b/lib/curl_sasl.h
@@ -0,0 +1,254 @@
+#ifndef HEADER_CURL_SASL_H
+#define HEADER_CURL_SASL_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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/curl.h>
+
+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 flags */
+#define SASL_MECH_LOGIN (1 << 0)
+#define SASL_MECH_PLAIN (1 << 1)
+#define SASL_MECH_CRAM_MD5 (1 << 2)
+#define SASL_MECH_DIGEST_MD5 (1 << 3)
+#define SASL_MECH_GSSAPI (1 << 4)
+#define SASL_MECH_EXTERNAL (1 << 5)
+#define SASL_MECH_NTLM (1 << 6)
+#define SASL_MECH_XOAUTH2 (1 << 7)
+
+/* Authentication mechanism values */
+#define SASL_AUTH_NONE 0
+#define SASL_AUTH_ANY ~0U
+#define SASL_AUTH_DEFAULT (SASL_AUTH_ANY & \
+ ~(SASL_MECH_EXTERNAL | SASL_MECH_XOAUTH2))
+
+/* Authentication mechanism strings */
+#define SASL_MECH_STRING_LOGIN "LOGIN"
+#define SASL_MECH_STRING_PLAIN "PLAIN"
+#define SASL_MECH_STRING_CRAM_MD5 "CRAM-MD5"
+#define SASL_MECH_STRING_DIGEST_MD5 "DIGEST-MD5"
+#define SASL_MECH_STRING_GSSAPI "GSSAPI"
+#define SASL_MECH_STRING_EXTERNAL "EXTERNAL"
+#define SASL_MECH_STRING_NTLM "NTLM"
+#define SASL_MECH_STRING_XOAUTH2 "XOAUTH2"
+
+#if !defined(CURL_DISABLE_CRYPTO_AUTH)
+#define DIGEST_MAX_VALUE_LENGTH 256
+#define DIGEST_MAX_CONTENT_LENGTH 1024
+#endif
+
+enum {
+ CURLDIGESTALGO_MD5,
+ CURLDIGESTALGO_MD5SESS
+};
+
+/* SASL machine states */
+typedef enum {
+ SASL_STOP,
+ SASL_PLAIN,
+ SASL_LOGIN,
+ SASL_LOGIN_PASSWD,
+ SASL_EXTERNAL,
+ SASL_CRAMMD5,
+ SASL_DIGESTMD5,
+ SASL_DIGESTMD5_RESP,
+ SASL_NTLM,
+ SASL_NTLM_TYPE2MSG,
+ SASL_GSSAPI,
+ SASL_GSSAPI_TOKEN,
+ SASL_GSSAPI_NO_DATA,
+ SASL_XOAUTH2,
+ SASL_CANCEL,
+ SASL_FINAL
+} saslstate;
+
+/* Progress indicator */
+typedef enum {
+ SASL_IDLE,
+ SASL_INPROGRESS,
+ SASL_DONE
+} saslprogress;
+
+/* Protocol dependent SASL parameters */
+struct SASLproto {
+ const char *service; /* The service name */
+ int contcode; /* Code to receive when continuation is expected */
+ int finalcode; /* Code to receive upon authentication success */
+ size_t maxirlen; /* Maximum initial response length */
+ CURLcode (*sendauth)(struct connectdata *conn,
+ const char *mech, const char *ir);
+ /* Send authentication command */
+ CURLcode (*sendcont)(struct connectdata *conn, const char *contauth);
+ /* Send authentication continuation */
+ void (*getmessage)(char *buffer, char **outptr);
+ /* Get SASL response message */
+};
+
+/* Per-connection parameters */
+struct SASL {
+ const struct SASLproto *params; /* Protocol dependent parameters */
+ saslstate state; /* Current machine state */
+ unsigned int authmechs; /* Accepted authentication mechanisms */
+ unsigned int prefmech; /* Preferred authentication mechanism */
+ unsigned int authused; /* Auth mechanism used for the connection */
+ bool resetprefs; /* For URL auth option parsing. */
+ bool mutual_auth; /* Mutual authentication enabled (GSSAPI only) */
+ bool force_ir; /* Protocol always supports initial response */
+};
+
+/* 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 extract the realm from a challenge message */
+int Curl_sasl_digest_get_pair(const char *str, char *value, char *content,
+ const char **endptr);
+
+#if defined(HAVE_GSSAPI)
+char *Curl_sasl_build_gssapi_spn(const char *service, const char *host);
+#endif
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+
+/* This is used to generate a base64 encoded DIGEST-MD5 response message */
+CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
+ const char *chlg64,
+ const char *userp,
+ 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
+/* This is used to generate a base64 encoded NTLM type-1 message */
+CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
+ const char *passwdp,
+ struct ntlmdata *ntlm,
+ char **outptr,
+ size_t *outlen);
+
+/* This is used to decode a base64 encoded NTLM type-2 message */
+CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data,
+ const char *type2msg,
+ struct ntlmdata *ntlm);
+
+/* This is used to generate a base64 encoded NTLM type-3 message */
+CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
+ const char *userp,
+ const char *passwdp,
+ 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 cleanup any libraries or curl modules used by the sasl
+ functions */
+void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused);
+
+/* Convert a mechanism name to a token */
+unsigned int Curl_sasl_decode_mech(const char *ptr,
+ size_t maxlen, size_t *len);
+
+/* Parse the URL login options */
+CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl,
+ const char *value, size_t len);
+
+/* Initializes an SASL structure */
+void Curl_sasl_init(struct SASL *sasl, const struct SASLproto *params);
+
+/* Check if we have enough auth data and capabilities to authenticate */
+bool Curl_sasl_can_authenticate(struct SASL *sasl, struct connectdata *conn);
+
+/* Calculate the required login details for SASL authentication */
+CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
+ bool force_ir, saslprogress *progress);
+
+/* Continue an SASL authentication */
+CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
+ int code, saslprogress *progress);
+
+#endif /* HEADER_CURL_SASL_H */
diff --git a/lib/curl_sasl_gssapi.c b/lib/curl_sasl_gssapi.c
new file mode 100644
index 00000000..3c6f3ce3
--- /dev/null
+++ b/lib/curl_sasl_gssapi.c
@@ -0,0 +1,392 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2014 - 2015, Steve Holme, <steve_holme@hotmail.com>.
+ * Copyright (C) 2015, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
+
+#include "curl_sasl.h"
+#include "urldata.h"
+#include "curl_base64.h"
+#include "curl_gssapi.h"
+#include "sendf.h"
+#include "curl_printf.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#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.
+*/
+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: ");
+
+ free(spn);
+
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ free(spn);
+ }
+ 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);
+
+ free(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: ");
+
+ free(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: ");
+
+ free(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);
+ free(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);
+ free(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);
+ free(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: ");
+
+ free(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 */
+ free(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
new file mode 100644
index 00000000..b149530f
--- /dev/null
+++ b/lib/curl_sasl_sspi.c
@@ -0,0 +1,1281 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2014 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2014, Steve Holme, <steve_holme@hotmail.com>.
+ *
+ * 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.
+ *
+ * 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)
+
+#include <curl/curl.h>
+
+#include "curl_sasl.h"
+#include "urldata.h"
+#include "curl_base64.h"
+#include "warnless.h"
+#include "curl_multibyte.h"
+#include "sendf.h"
+#include "strdup.h"
+#include "curl_printf.h"
+#include "rawstr.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#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) {
+ free(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
+ * ready for sending to the recipient.
+ *
+ * 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.
+ * 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
+ * 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_md5_message(struct SessionHandle *data,
+ const char *chlg64,
+ const char *userp,
+ const char *passwdp,
+ const char *service,
+ char **outptr, size_t *outlen)
+{
+ CURLcode result = CURLE_OK;
+ TCHAR *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;
+ 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 */
+
+ /* Decode the base-64 encoded challenge message */
+ if(strlen(chlg64) && *chlg64 != '=') {
+ result = Curl_base64_decode(chlg64, &input_token, &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");
+
+ return CURLE_BAD_CONTENT_ENCODING;
+ }
+
+ /* Query the security package for DigestSSP */
+ status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
+ &SecurityPackage);
+ if(status != SEC_E_OK) {
+ free(input_token);
+
+ 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) {
+ free(input_token);
+
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ /* Generate our SPN */
+ spn = Curl_sasl_build_spn(service, data->easy_conn->host.name);
+ if(!spn) {
+ free(output_token);
+ free(input_token);
+
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ if(userp && *userp) {
+ /* Populate our identity structure */
+ result = Curl_create_sspi_identity(userp, passwdp, &identity);
+ if(result) {
+ free(spn);
+ free(output_token);
+ free(input_token);
+
+ return result;
+ }
+
+ /* 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_sspi_free_identity(p_identity);
+ free(spn);
+ free(output_token);
+ free(input_token);
+
+ return CURLE_LOGIN_DENIED;
+ }
+
+ /* 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 = input_token;
+ 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 = 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);
+
+ 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);
+ free(spn);
+ free(output_token);
+ free(input_token);
+
+ return CURLE_RECV_ERROR;
+ }
+
+ /* Base64 encode the response */
+ result = Curl_base64_encode(data, (char *) output_token, resp_buf.cbBuffer,
+ outptr, outlen);
+
+ /* Free our handles */
+ s_pSecFn->DeleteSecurityContext(&context);
+ s_pSecFn->FreeCredentialsHandle(&credentials);
+
+ /* Free the identity structure */
+ Curl_sspi_free_identity(p_identity);
+
+ /* Free the SPN */
+ free(spn);
+
+ /* Free the response buffer */
+ free(output_token);
+
+ /* Free the decoded challenge message */
+ free(input_token);
+
+ return result;
+}
+
+/*
+* Curl_override_sspi_http_realm()
+*
+* This is used to populate the domain in a SSPI identity structure
+* The realm is extracted from the challenge message and used as the
+* domain if it is not already explicitly set.
+*
+* Parameters:
+*
+* chlg [in] - The challenge message.
+* identity [in/out] - The identity structure.
+*
+* Returns CURLE_OK on success.
+*/
+CURLcode Curl_override_sspi_http_realm(const char *chlg,
+ SEC_WINNT_AUTH_IDENTITY *identity)
+{
+ xcharp_u domain, dup_domain;
+
+ /* If domain is blank or unset, check challenge message for realm */
+ if(!identity->Domain || !identity->DomainLength) {
+ 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(!Curl_sasl_digest_get_pair(chlg, value, content, &chlg)) {
+ if(Curl_raw_equal(value, "realm")) {
+
+ /* Setup identity's domain and length */
+ domain.tchar_ptr = Curl_convert_UTF8_to_tchar((char *)content);
+ if(!domain.tchar_ptr)
+ return CURLE_OUT_OF_MEMORY;
+ dup_domain.tchar_ptr = _tcsdup(domain.tchar_ptr);
+ if(!dup_domain.tchar_ptr) {
+ Curl_unicodefree(domain.tchar_ptr);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ identity->Domain = dup_domain.tbyte_ptr;
+ identity->DomainLength = curlx_uztoul(_tcslen(dup_domain.tchar_ptr));
+ dup_domain.tchar_ptr = NULL;
+
+ Curl_unicodefree(domain.tchar_ptr);
+ }
+ 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++;
+ }
+ }
+
+ return CURLE_OK;
+}
+
+/*
+ * 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;
+
+ /* Populate our identity domain */
+ if(Curl_override_sspi_http_realm((const char*)digest->input_token,
+ &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) {
+ free(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);
+
+ free(output_token);
+
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ resp = malloc(resp_buf.cbBuffer + 1);
+ if(!resp) {
+ s_pSecFn->DeleteSecurityContext(&context);
+ s_pSecFn->FreeCredentialsHandle(&credentials);
+
+ free(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 */
+ free(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) {
+ free(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(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) {
+ free(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) {
+ free(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");
+
+ free(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");
+
+ free(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);
+ free(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) {
+ free(trailer);
+
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ /* Allocate our message */
+ messagelen = sizeof(outdata) + strlen(user_name) + 1;
+ message = malloc(messagelen);
+ if(!message) {
+ free(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) {
+ free(message);
+ free(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) {
+ free(padding);
+ free(message);
+ free(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) {
+ free(padding);
+ free(message);
+ free(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 */
+ free(appdata);
+ free(padding);
+ free(message);
+ free(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 */
diff --git a/lib/curl_sec.h b/lib/curl_sec.h
new file mode 100644
index 00000000..6c48da24
--- /dev/null
+++ b/lib/curl_sec.h
@@ -0,0 +1,51 @@
+#ifndef HEADER_CURL_SECURITY_H
+#define HEADER_CURL_SECURITY_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+struct Curl_sec_client_mech {
+ const char *name;
+ size_t size;
+ int (*init)(void *);
+ int (*auth)(void *, struct connectdata *);
+ void (*end)(void *);
+ int (*check_prot)(void *, int);
+ int (*overhead)(void *, int, int);
+ int (*encode)(void *, const void*, int, int, void**);
+ int (*decode)(void *, void*, int, int, struct connectdata *);
+};
+
+#define AUTH_OK 0
+#define AUTH_CONTINUE 1
+#define AUTH_ERROR 2
+
+#ifdef HAVE_GSSAPI
+int Curl_sec_read_msg (struct connectdata *conn, char *,
+ enum protection_level);
+void Curl_sec_end (struct connectdata *);
+CURLcode Curl_sec_login (struct connectdata *);
+int Curl_sec_request_prot (struct connectdata *conn, const char *level);
+
+extern struct Curl_sec_client_mech Curl_krb5_client_mech;
+#endif
+
+#endif /* HEADER_CURL_SECURITY_H */
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
new file mode 100644
index 00000000..ab0c1394
--- /dev/null
+++ b/lib/curl_setup.h
@@ -0,0 +1,730 @@
+#ifndef HEADER_CURL_SETUP_H
+#define HEADER_CURL_SETUP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Define WIN32 when build target is Win32 API
+ */
+
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && \
+ !defined(__SYMBIAN32__)
+#define WIN32
+#endif
+
+/*
+ * Include configuration script results or hand-crafted
+ * configuration file for platforms which lack config tool.
+ */
+
+#ifdef HAVE_CONFIG_H
+
+#include "curl_config.h"
+
+#else /* HAVE_CONFIG_H */
+
+#ifdef _WIN32_WCE
+# include "config-win32ce.h"
+#else
+# ifdef WIN32
+# include "config-win32.h"
+# endif
+#endif
+
+#if defined(macintosh) && defined(__MRC__)
+# include "config-mac.h"
+#endif
+
+#ifdef __riscos__
+# include "config-riscos.h"
+#endif
+
+#ifdef __AMIGA__
+# include "config-amigaos.h"
+#endif
+
+#ifdef __SYMBIAN32__
+# include "config-symbian.h"
+#endif
+
+#ifdef __OS400__
+# include "config-os400.h"
+#endif
+
+#ifdef TPF
+# include "config-tpf.h"
+#endif
+
+#ifdef __VXWORKS__
+# include "config-vxworks.h"
+#endif
+
+#endif /* HAVE_CONFIG_H */
+
+/* ================================================================ */
+/* Definition of preprocessor macros/symbols which modify compiler */
+/* behavior or generated code characteristics must be done here, */
+/* as appropriate, before any system header file is included. It is */
+/* also possible to have them defined in the config file included */
+/* before this point. As a result of all this we frown inclusion of */
+/* system header files in our config files, avoid this at any cost. */
+/* ================================================================ */
+
+/*
+ * AIX 4.3 and newer needs _THREAD_SAFE defined to build
+ * proper reentrant code. Others may also need it.
+ */
+
+#ifdef NEED_THREAD_SAFE
+# ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+# endif
+#endif
+
+/*
+ * Tru64 needs _REENTRANT set for a few function prototypes and
+ * things to appear in the system header files. Unixware needs it
+ * to build proper reentrant code. Others may also need it.
+ */
+
+#ifdef NEED_REENTRANT
+# ifndef _REENTRANT
+# define _REENTRANT
+# endif
+#endif
+
+/* Solaris needs this to get a POSIX-conformant getpwuid_r */
+#if defined(sun) || defined(__sun)
+# ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+# endif
+#endif
+
+/* ================================================================ */
+/* If you need to include a system header file for your platform, */
+/* please, do it beyond the point further indicated in this file. */
+/* ================================================================ */
+
+/*
+ * libcurl's external interface definitions are also used internally,
+ * and might also include required system header files to define them.
+ */
+
+#include <curl/curlbuild.h>
+
+/*
+ * Compile time sanity checks must also be done when building the library.
+ */
+
+#include <curl/curlrules.h>
+
+/*
+ * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro
+ */
+
+#ifdef SIZEOF_CURL_OFF_T
+# error "SIZEOF_CURL_OFF_T shall not be defined!"
+ Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined
+#endif
+
+/*
+ * Disable other protocols when http is the only one desired.
+ */
+
+#ifdef HTTP_ONLY
+# ifndef CURL_DISABLE_TFTP
+# define CURL_DISABLE_TFTP
+# endif
+# ifndef CURL_DISABLE_FTP
+# define CURL_DISABLE_FTP
+# endif
+# ifndef CURL_DISABLE_LDAP
+# define CURL_DISABLE_LDAP
+# endif
+# ifndef CURL_DISABLE_TELNET
+# define CURL_DISABLE_TELNET
+# endif
+# ifndef CURL_DISABLE_DICT
+# define CURL_DISABLE_DICT
+# endif
+# ifndef CURL_DISABLE_FILE
+# define CURL_DISABLE_FILE
+# endif
+# ifndef CURL_DISABLE_RTSP
+# define CURL_DISABLE_RTSP
+# endif
+# ifndef CURL_DISABLE_POP3
+# define CURL_DISABLE_POP3
+# endif
+# ifndef CURL_DISABLE_IMAP
+# define CURL_DISABLE_IMAP
+# endif
+# ifndef CURL_DISABLE_SMTP
+# define CURL_DISABLE_SMTP
+# endif
+# ifndef CURL_DISABLE_RTSP
+# define CURL_DISABLE_RTSP
+# endif
+# ifndef CURL_DISABLE_RTMP
+# define CURL_DISABLE_RTMP
+# endif
+# ifndef CURL_DISABLE_GOPHER
+# define CURL_DISABLE_GOPHER
+# endif
+# ifndef CURL_DISABLE_SMB
+# define CURL_DISABLE_SMB
+# endif
+#endif
+
+/*
+ * When http is disabled rtsp is not supported.
+ */
+
+#if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_RTSP)
+# define CURL_DISABLE_RTSP
+#endif
+
+/* ================================================================ */
+/* No system header file shall be included in this file before this */
+/* point. The only allowed ones are those included from curlbuild.h */
+/* ================================================================ */
+
+/*
+ * OS/400 setup file includes some system headers.
+ */
+
+#ifdef __OS400__
+# include "setup-os400.h"
+#endif
+
+/*
+ * VMS setup file includes some system headers.
+ */
+
+#ifdef __VMS
+# include "setup-vms.h"
+#endif
+
+/*
+ * Include header files for windows builds before redefining anything.
+ * Use this preprocessor block only to include or exclude windows.h,
+ * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
+ * to any other further and independent block. Under Cygwin things work
+ * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
+ * never be included when __CYGWIN__ is defined. configure script takes
+ * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
+ * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
+ */
+
+#ifdef HAVE_WINDOWS_H
+# if defined(UNICODE) && !defined(_UNICODE)
+# define _UNICODE
+# endif
+# if defined(_UNICODE) && !defined(UNICODE)
+# define UNICODE
+# endif
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+# ifdef HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+# endif
+# else
+# ifdef HAVE_WINSOCK_H
+# include <winsock.h>
+# endif
+# endif
+# include <tchar.h>
+# ifdef UNICODE
+ typedef wchar_t *(*curl_wcsdup_callback)(const wchar_t *str);
+# endif
+#endif
+
+/*
+ * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
+ * define USE_WINSOCK to 1 if we have and use WINSOCK API, else
+ * undefine USE_WINSOCK.
+ */
+
+#undef USE_WINSOCK
+
+#ifdef HAVE_WINSOCK2_H
+# define USE_WINSOCK 2
+#else
+# ifdef HAVE_WINSOCK_H
+# define USE_WINSOCK 1
+# endif
+#endif
+
+#ifdef USE_LWIPSOCK
+# include <lwip/init.h>
+# include <lwip/sockets.h>
+# include <lwip/netdb.h>
+#endif
+
+#ifdef HAVE_EXTRA_STRICMP_H
+# include <extra/stricmp.h>
+#endif
+
+#ifdef HAVE_EXTRA_STRDUP_H
+# include <extra/strdup.h>
+#endif
+
+#ifdef TPF
+# include <strings.h> /* for bzero, strcasecmp, and strncasecmp */
+# include <string.h> /* for strcpy and strlen */
+# include <stdlib.h> /* for rand and srand */
+# include <sys/socket.h> /* for select and ioctl*/
+# include <netdb.h> /* for in_addr_t definition */
+# include <tpf/sysapi.h> /* for tpf_process_signals */
+ /* change which select is used for libcurl */
+# define select(a,b,c,d,e) tpf_select_libcurl(a,b,c,d,e)
+#endif
+
+#ifdef __VXWORKS__
+# include <sockLib.h> /* for generic BSD socket functions */
+# include <ioLib.h> /* for basic I/O interface functions */
+#endif
+
+#ifdef __AMIGA__
+# ifndef __ixemul__
+# include <exec/types.h>
+# include <exec/execbase.h>
+# include <proto/exec.h>
+# include <proto/dos.h>
+# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
+# endif
+#endif
+
+#include <stdio.h>
+#ifdef HAVE_ASSERT_H
+#include <assert.h>
+#endif
+
+#ifdef __TANDEM /* for nsr-tandem-nsk systems */
+#include <floss.h>
+#endif
+
+#ifndef STDC_HEADERS /* no standard C headers! */
+#include <curl/stdcheaders.h>
+#endif
+
+#ifdef __POCC__
+# include <sys/types.h>
+# include <unistd.h>
+# define sys_nerr EILSEQ
+#endif
+
+/*
+ * Salford-C kludge section (mostly borrowed from wxWidgets).
+ */
+#ifdef __SALFORDC__
+ #pragma suppress 353 /* Possible nested comments */
+ #pragma suppress 593 /* Define not used */
+ #pragma suppress 61 /* enum has no name */
+ #pragma suppress 106 /* unnamed, unused parameter */
+ #include <clib.h>
+#endif
+
+/*
+ * Large file (>2Gb) support using WIN32 functions.
+ */
+
+#ifdef USE_WIN32_LARGE_FILES
+# include <io.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# undef lseek
+# define lseek(fdes,offset,whence) _lseeki64(fdes, offset, whence)
+# undef fstat
+# define fstat(fdes,stp) _fstati64(fdes, stp)
+# undef stat
+# define stat(fname,stp) _stati64(fname, stp)
+# define struct_stat struct _stati64
+# define LSEEK_ERROR (__int64)-1
+#endif
+
+/*
+ * Small file (<2Gb) support using WIN32 functions.
+ */
+
+#ifdef USE_WIN32_SMALL_FILES
+# include <io.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# ifndef _WIN32_WCE
+# undef lseek
+# define lseek(fdes,offset,whence) _lseek(fdes, (long)offset, whence)
+# define fstat(fdes,stp) _fstat(fdes, stp)
+# define stat(fname,stp) _stat(fname, stp)
+# define struct_stat struct _stat
+# endif
+# define LSEEK_ERROR (long)-1
+#endif
+
+#ifndef struct_stat
+# define struct_stat struct stat
+#endif
+
+#ifndef LSEEK_ERROR
+# define LSEEK_ERROR (off_t)-1
+#endif
+
+/*
+ * Default sizeof(off_t) in case it hasn't been defined in config file.
+ */
+
+#ifndef SIZEOF_OFF_T
+# if defined(__VMS) && !defined(__VAX)
+# if defined(_LARGEFILE)
+# define SIZEOF_OFF_T 8
+# endif
+# elif defined(__OS400__) && defined(__ILEC400__)
+# if defined(_LARGE_FILES)
+# define SIZEOF_OFF_T 8
+# endif
+# elif defined(__MVS__) && defined(__IBMC__)
+# if defined(_LP64) || defined(_LARGE_FILES)
+# define SIZEOF_OFF_T 8
+# endif
+# elif defined(__370__) && defined(__IBMC__)
+# if defined(_LP64) || defined(_LARGE_FILES)
+# define SIZEOF_OFF_T 8
+# endif
+# endif
+# ifndef SIZEOF_OFF_T
+# define SIZEOF_OFF_T 4
+# endif
+#endif
+
+/*
+ * Arg 2 type for gethostname in case it hasn't been defined in config file.
+ */
+
+#ifndef GETHOSTNAME_TYPE_ARG2
+# ifdef USE_WINSOCK
+# define GETHOSTNAME_TYPE_ARG2 int
+# else
+# define GETHOSTNAME_TYPE_ARG2 size_t
+# endif
+#endif
+
+/* Below we define some functions. They should
+
+ 4. set the SIGALRM signal timeout
+ 5. set dir/file naming defines
+ */
+
+#ifdef WIN32
+
+# define DIR_CHAR "\\"
+# define DOT_CHAR "_"
+
+#else /* WIN32 */
+
+# ifdef MSDOS /* Watt-32 */
+
+# include <sys/ioctl.h>
+# define select(n,r,w,x,t) select_s(n,r,w,x,t)
+# define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z))
+# include <tcp.h>
+# ifdef word
+# undef word
+# endif
+# ifdef byte
+# undef byte
+# endif
+
+# endif /* MSDOS */
+
+# ifdef __minix
+ /* Minix 3 versions up to at least 3.1.3 are missing these prototypes */
+ extern char * strtok_r(char *s, const char *delim, char **last);
+ extern struct tm * gmtime_r(const time_t * const timep, struct tm *tmp);
+# endif
+
+# define DIR_CHAR "/"
+# ifndef DOT_CHAR
+# define DOT_CHAR "."
+# endif
+
+# ifdef MSDOS
+# undef DOT_CHAR
+# define DOT_CHAR "_"
+# endif
+
+# ifndef fileno /* sunos 4 have this as a macro! */
+ int fileno( FILE *stream);
+# endif
+
+#endif /* WIN32 */
+
+/*
+ * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN
+ * defined in ws2tcpip.h as well as to provide IPv6 support.
+ */
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+# if !defined(HAVE_WS2TCPIP_H) || \
+ ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
+# undef HAVE_GETADDRINFO_THREADSAFE
+# undef HAVE_FREEADDRINFO
+# undef HAVE_GETADDRINFO
+# undef HAVE_GETNAMEINFO
+# undef ENABLE_IPV6
+# endif
+#endif
+
+/* ---------------------------------------------------------------- */
+/* resolver specialty compile-time defines */
+/* CURLRES_* defines to use in the host*.c sources */
+/* ---------------------------------------------------------------- */
+
+/*
+ * lcc-win32 doesn't have _beginthreadex(), lacks threads support.
+ */
+
+#if defined(__LCC__) && defined(WIN32)
+# undef USE_THREADS_POSIX
+# undef USE_THREADS_WIN32
+#endif
+
+/*
+ * MSVC threads support requires a multi-threaded runtime library.
+ * _beginthreadex() is not available in single-threaded ones.
+ */
+
+#if defined(_MSC_VER) && !defined(__POCC__) && !defined(_MT)
+# undef USE_THREADS_POSIX
+# undef USE_THREADS_WIN32
+#endif
+
+/*
+ * Mutually exclusive CURLRES_* definitions.
+ */
+
+#ifdef USE_ARES
+# define CURLRES_ASYNCH
+# define CURLRES_ARES
+/* now undef the stock libc functions just to avoid them being used */
+# undef HAVE_GETADDRINFO
+# undef HAVE_GETHOSTBYNAME
+#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
+# define CURLRES_ASYNCH
+# define CURLRES_THREADED
+#else
+# define CURLRES_SYNCH
+#endif
+
+#ifdef ENABLE_IPV6
+# define CURLRES_IPV6
+#else
+# define CURLRES_IPV4
+#endif
+
+/* ---------------------------------------------------------------- */
+
+/*
+ * When using WINSOCK, TELNET protocol requires WINSOCK2 API.
+ */
+
+#if defined(USE_WINSOCK) && (USE_WINSOCK != 2)
+# define CURL_DISABLE_TELNET 1
+#endif
+
+/*
+ * msvc 6.0 does not have struct sockaddr_storage and
+ * does not define IPPROTO_ESP in winsock2.h. But both
+ * are available if PSDK is properly installed.
+ */
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+# if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP))
+# undef HAVE_STRUCT_SOCKADDR_STORAGE
+# endif
+#endif
+
+/*
+ * Intentionally fail to build when using msvc 6.0 without PSDK installed.
+ * The brave of heart can circumvent this, defining ALLOW_MSVC6_WITHOUT_PSDK
+ * in lib/config-win32.h although absolutely discouraged and unsupported.
+ */
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+# if !defined(HAVE_WINDOWS_H) || ((_MSC_VER < 1300) && !defined(_FILETIME_))
+# if !defined(ALLOW_MSVC6_WITHOUT_PSDK)
+# error MSVC 6.0 requires "February 2003 Platform SDK" a.k.a. \
+ "Windows Server 2003 PSDK"
+# else
+# define CURL_DISABLE_LDAP 1
+# endif
+# endif
+#endif
+
+#ifdef NETWARE
+int netware_init(void);
+#ifndef __NOVELL_LIBC__
+#include <sys/bsdskt.h>
+#include <sys/timeval.h>
+#endif
+#endif
+
+#if defined(HAVE_LIBIDN) && defined(HAVE_TLD_H)
+/* The lib was present and the tld.h header (which is missing in libidn 0.3.X
+ but we only work with libidn 0.4.1 or later) */
+#define USE_LIBIDN
+#endif
+
+#ifndef SIZEOF_TIME_T
+/* assume default size of time_t to be 32 bit */
+#define SIZEOF_TIME_T 4
+#endif
+
+#define LIBIDN_REQUIRED_VERSION "0.4.1"
+
+#if defined(USE_GNUTLS) || defined(USE_OPENSSL) || defined(USE_NSS) || \
+ 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
+#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)
+#if defined(USE_OPENSSL) || defined(USE_WINDOWS_SSPI) || \
+ defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) || \
+ defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO)
+
+#ifdef HAVE_BORINGSSL /* BoringSSL is not NTLM capable */
+#undef USE_NTLM
+#else
+#define USE_NTLM
+#endif
+#endif
+#endif
+
+/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */
+#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE)
+#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
+#endif
+
+/*
+ * Provide a mechanism to silence picky compilers, such as gcc 4.6+.
+ * Parameters should of course normally not be unused, but for example when
+ * we have multiple implementations of the same interface it may happen.
+ */
+
+#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
+
+/*
+ * Include macros and defines that should only be processed once.
+ */
+
+#ifndef HEADER_CURL_SETUP_ONCE_H
+#include "curl_setup_once.h"
+#endif
+
+/*
+ * Definition of our NOP statement Object-like macro
+ */
+
+#ifndef Curl_nop_stmt
+# define Curl_nop_stmt do { } WHILE_FALSE
+#endif
+
+/*
+ * Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
+ */
+
+#if defined(__LWIP_OPT_H__)
+# if defined(SOCKET) || \
+ defined(USE_WINSOCK) || \
+ defined(HAVE_WINSOCK_H) || \
+ defined(HAVE_WINSOCK2_H) || \
+ defined(HAVE_WS2TCPIP_H)
+# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
+# endif
+#endif
+
+/*
+ * Portable symbolic names for Winsock shutdown() mode flags.
+ */
+
+#ifdef USE_WINSOCK
+# define SHUT_RD 0x00
+# define SHUT_WR 0x01
+# define SHUT_RDWR 0x02
+#endif
+
+/* Define S_ISREG if not defined by system headers, f.e. MSVC */
+#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
+/* Define S_ISDIR if not defined by system headers, f.e. MSVC */
+#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#endif
+
+/* In Windows the default file mode is text but an application can override it.
+Therefore we specify it explicitly. https://github.com/bagder/curl/pull/258
+*/
+#if defined(WIN32) || defined(MSDOS)
+#define FOPEN_READTEXT "rt"
+#define FOPEN_WRITETEXT "wt"
+#elif defined(__CYGWIN__)
+/* Cygwin has specific behavior we need to address when WIN32 is not defined.
+https://cygwin.com/cygwin-ug-net/using-textbinary.html
+For write we want our output to have line endings of LF and be compatible with
+other Cygwin utilities. For read we want to handle input that may have line
+endings either CRLF or LF so 't' is appropriate.
+*/
+#define FOPEN_READTEXT "rt"
+#define FOPEN_WRITETEXT "w"
+#else
+#define FOPEN_READTEXT "r"
+#define FOPEN_WRITETEXT "w"
+#endif
+
+#endif /* HEADER_CURL_SETUP_H */
diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h
new file mode 100644
index 00000000..69d6d479
--- /dev/null
+++ b/lib/curl_setup_once.h
@@ -0,0 +1,551 @@
+#ifndef HEADER_CURL_SETUP_ONCE_H
+#define HEADER_CURL_SETUP_ONCE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+
+/*
+ * Inclusion of common header files.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <ctype.h>
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef NEED_MALLOC_H
+#include <malloc.h>
+#endif
+
+#ifdef NEED_MEMORY_H
+#include <memory.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#endif
+#else
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#endif
+
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+#if defined(HAVE_STDBOOL_H) && defined(HAVE_BOOL_T)
+#include <stdbool.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef __hpux
+# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
+# ifdef _APP32_64BIT_OFF_T
+# define OLD_APP32_64BIT_OFF_T _APP32_64BIT_OFF_T
+# undef _APP32_64BIT_OFF_T
+# else
+# undef OLD_APP32_64BIT_OFF_T
+# endif
+# endif
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef __hpux
+# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
+# ifdef OLD_APP32_64BIT_OFF_T
+# define _APP32_64BIT_OFF_T OLD_APP32_64BIT_OFF_T
+# undef OLD_APP32_64BIT_OFF_T
+# endif
+# endif
+#endif
+
+
+/*
+ * Definition of timeval struct for platforms that don't have it.
+ */
+
+#ifndef HAVE_STRUCT_TIMEVAL
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+};
+#endif
+
+
+/*
+ * If we have the MSG_NOSIGNAL define, make sure we use
+ * it as the fourth argument of function send()
+ */
+
+#ifdef HAVE_MSG_NOSIGNAL
+#define SEND_4TH_ARG MSG_NOSIGNAL
+#else
+#define SEND_4TH_ARG 0
+#endif
+
+
+#if defined(__minix)
+/* Minix doesn't support recv on TCP sockets */
+#define sread(x,y,z) (ssize_t)read((RECV_TYPE_ARG1)(x), \
+ (RECV_TYPE_ARG2)(y), \
+ (RECV_TYPE_ARG3)(z))
+
+#elif defined(HAVE_RECV)
+/*
+ * The definitions for the return type and arguments types
+ * of functions recv() and send() belong and come from the
+ * configuration file. Do not define them in any other place.
+ *
+ * HAVE_RECV is defined if you have a function named recv()
+ * which is used to read incoming data from sockets. If your
+ * function has another name then don't define HAVE_RECV.
+ *
+ * If HAVE_RECV is defined then RECV_TYPE_ARG1, RECV_TYPE_ARG2,
+ * RECV_TYPE_ARG3, RECV_TYPE_ARG4 and RECV_TYPE_RETV must also
+ * be defined.
+ *
+ * HAVE_SEND is defined if you have a function named send()
+ * which is used to write outgoing data on a connected socket.
+ * If yours has another name then don't define HAVE_SEND.
+ *
+ * If HAVE_SEND is defined then SEND_TYPE_ARG1, SEND_QUAL_ARG2,
+ * SEND_TYPE_ARG2, SEND_TYPE_ARG3, SEND_TYPE_ARG4 and
+ * SEND_TYPE_RETV must also be defined.
+ */
+
+#if !defined(RECV_TYPE_ARG1) || \
+ !defined(RECV_TYPE_ARG2) || \
+ !defined(RECV_TYPE_ARG3) || \
+ !defined(RECV_TYPE_ARG4) || \
+ !defined(RECV_TYPE_RETV)
+ /* */
+ Error Missing_definition_of_return_and_arguments_types_of_recv
+ /* */
+#else
+#define sread(x,y,z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
+ (RECV_TYPE_ARG2)(y), \
+ (RECV_TYPE_ARG3)(z), \
+ (RECV_TYPE_ARG4)(0))
+#endif
+#else /* HAVE_RECV */
+#ifndef sread
+ /* */
+ Error Missing_definition_of_macro_sread
+ /* */
+#endif
+#endif /* HAVE_RECV */
+
+
+#if defined(__minix)
+/* Minix doesn't support send on TCP sockets */
+#define swrite(x,y,z) (ssize_t)write((SEND_TYPE_ARG1)(x), \
+ (SEND_TYPE_ARG2)(y), \
+ (SEND_TYPE_ARG3)(z))
+
+#elif defined(HAVE_SEND)
+#if !defined(SEND_TYPE_ARG1) || \
+ !defined(SEND_QUAL_ARG2) || \
+ !defined(SEND_TYPE_ARG2) || \
+ !defined(SEND_TYPE_ARG3) || \
+ !defined(SEND_TYPE_ARG4) || \
+ !defined(SEND_TYPE_RETV)
+ /* */
+ Error Missing_definition_of_return_and_arguments_types_of_send
+ /* */
+#else
+#define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
+ (SEND_TYPE_ARG2)(y), \
+ (SEND_TYPE_ARG3)(z), \
+ (SEND_TYPE_ARG4)(SEND_4TH_ARG))
+#endif
+#else /* HAVE_SEND */
+#ifndef swrite
+ /* */
+ Error Missing_definition_of_macro_swrite
+ /* */
+#endif
+#endif /* HAVE_SEND */
+
+
+#if 0
+#if defined(HAVE_RECVFROM)
+/*
+ * Currently recvfrom is only used on udp sockets.
+ */
+#if !defined(RECVFROM_TYPE_ARG1) || \
+ !defined(RECVFROM_TYPE_ARG2) || \
+ !defined(RECVFROM_TYPE_ARG3) || \
+ !defined(RECVFROM_TYPE_ARG4) || \
+ !defined(RECVFROM_TYPE_ARG5) || \
+ !defined(RECVFROM_TYPE_ARG6) || \
+ !defined(RECVFROM_TYPE_RETV)
+ /* */
+ Error Missing_definition_of_return_and_arguments_types_of_recvfrom
+ /* */
+#else
+#define sreadfrom(s,b,bl,f,fl) (ssize_t)recvfrom((RECVFROM_TYPE_ARG1) (s), \
+ (RECVFROM_TYPE_ARG2 *)(b), \
+ (RECVFROM_TYPE_ARG3) (bl), \
+ (RECVFROM_TYPE_ARG4) (0), \
+ (RECVFROM_TYPE_ARG5 *)(f), \
+ (RECVFROM_TYPE_ARG6 *)(fl))
+#endif
+#else /* HAVE_RECVFROM */
+#ifndef sreadfrom
+ /* */
+ Error Missing_definition_of_macro_sreadfrom
+ /* */
+#endif
+#endif /* HAVE_RECVFROM */
+
+
+#ifdef RECVFROM_TYPE_ARG6_IS_VOID
+# define RECVFROM_ARG6_T int
+#else
+# define RECVFROM_ARG6_T RECVFROM_TYPE_ARG6
+#endif
+#endif /* if 0 */
+
+
+/*
+ * Function-like macro definition used to close a socket.
+ */
+
+#if defined(HAVE_CLOSESOCKET)
+# define sclose(x) closesocket((x))
+#elif defined(HAVE_CLOSESOCKET_CAMEL)
+# define sclose(x) CloseSocket((x))
+#elif defined(HAVE_CLOSE_S)
+# define sclose(x) close_s((x))
+#elif defined(USE_LWIPSOCK)
+# define sclose(x) lwip_close((x))
+#else
+# define sclose(x) close((x))
+#endif
+
+/*
+ * Stack-independent version of fcntl() on sockets:
+ */
+#if defined(USE_LWIPSOCK)
+# define sfcntl lwip_fcntl
+#else
+# define sfcntl fcntl
+#endif
+
+/*
+ * Uppercase macro versions of ANSI/ISO is*() functions/macros which
+ * avoid negative number inputs with argument byte codes > 127.
+ */
+
+#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
+#define ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
+#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
+#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
+#define ISGRAPH(x) (isgraph((int) ((unsigned char)x)))
+#define ISALPHA(x) (isalpha((int) ((unsigned char)x)))
+#define ISPRINT(x) (isprint((int) ((unsigned char)x)))
+#define ISUPPER(x) (isupper((int) ((unsigned char)x)))
+#define ISLOWER(x) (islower((int) ((unsigned char)x)))
+#define ISASCII(x) (isascii((int) ((unsigned char)x)))
+
+#define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \
+ (((unsigned char)x) == '\t'))
+
+#define TOLOWER(x) (tolower((int) ((unsigned char)x)))
+
+
+/*
+ * 'bool' stuff compatible with HP-UX headers.
+ */
+
+#if defined(__hpux) && !defined(HAVE_BOOL_T)
+ typedef int bool;
+# define false 0
+# define true 1
+# define HAVE_BOOL_T
+#endif
+
+
+/*
+ * 'bool' exists on platforms with <stdbool.h>, i.e. C99 platforms.
+ * On non-C99 platforms there's no bool, so define an enum for that.
+ * On C99 platforms 'false' and 'true' also exist. Enum uses a
+ * global namespace though, so use bool_false and bool_true.
+ */
+
+#ifndef HAVE_BOOL_T
+ typedef enum {
+ bool_false = 0,
+ bool_true = 1
+ } bool;
+
+/*
+ * Use a define to let 'true' and 'false' use those enums. There
+ * are currently no use of true and false in libcurl proper, but
+ * there are some in the examples. This will cater for any later
+ * code happening to use true and false.
+ */
+# define false bool_false
+# define true bool_true
+# define HAVE_BOOL_T
+#endif
+
+
+/*
+ * Redefine TRUE and FALSE too, to catch current use. With this
+ * change, 'bool found = 1' will give a warning on MIPSPro, but
+ * 'bool found = TRUE' will not. Change tested on IRIX/MIPSPro,
+ * AIX 5.1/Xlc, Tru64 5.1/cc, w/make test too.
+ */
+
+#ifndef TRUE
+#define TRUE true
+#endif
+#ifndef FALSE
+#define FALSE false
+#endif
+
+
+/*
+ * Macro WHILE_FALSE may be used to build single-iteration do-while loops,
+ * avoiding compiler warnings. Mostly intended for other macro definitions.
+ */
+
+#define WHILE_FALSE while(0)
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+# undef WHILE_FALSE
+# if (_MSC_VER < 1500)
+# define WHILE_FALSE while(1, 0)
+# else
+# define WHILE_FALSE \
+__pragma(warning(push)) \
+__pragma(warning(disable:4127)) \
+while(0) \
+__pragma(warning(pop))
+# endif
+#endif
+
+
+/*
+ * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
+ */
+
+#ifndef HAVE_SIG_ATOMIC_T
+typedef int sig_atomic_t;
+#define HAVE_SIG_ATOMIC_T
+#endif
+
+
+/*
+ * Convenience SIG_ATOMIC_T definition
+ */
+
+#ifdef HAVE_SIG_ATOMIC_T_VOLATILE
+#define SIG_ATOMIC_T static sig_atomic_t
+#else
+#define SIG_ATOMIC_T static volatile sig_atomic_t
+#endif
+
+
+/*
+ * Default return type for signal handlers.
+ */
+
+#ifndef RETSIGTYPE
+#define RETSIGTYPE void
+#endif
+
+
+/*
+ * Macro used to include code only in debug builds.
+ */
+
+#ifdef DEBUGBUILD
+#define DEBUGF(x) x
+#else
+#define DEBUGF(x) do { } WHILE_FALSE
+#endif
+
+
+/*
+ * Macro used to include assertion code only in debug builds.
+ */
+
+#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
+#define DEBUGASSERT(x) assert(x)
+#else
+#define DEBUGASSERT(x) do { } WHILE_FALSE
+#endif
+
+
+/*
+ * Macro SOCKERRNO / SET_SOCKERRNO() returns / sets the *socket-related* errno
+ * (or equivalent) on this platform to hide platform details to code using it.
+ */
+
+#ifdef USE_WINSOCK
+#define SOCKERRNO ((int)WSAGetLastError())
+#define SET_SOCKERRNO(x) (WSASetLastError((int)(x)))
+#else
+#define SOCKERRNO (errno)
+#define SET_SOCKERRNO(x) (errno = (x))
+#endif
+
+
+/*
+ * Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno
+ * (or equivalent) on this platform to hide platform details to code using it.
+ */
+
+#if defined(WIN32) && !defined(USE_LWIPSOCK)
+#define ERRNO ((int)GetLastError())
+#define SET_ERRNO(x) (SetLastError((DWORD)(x)))
+#else
+#define ERRNO (errno)
+#define SET_ERRNO(x) (errno = (x))
+#endif
+
+
+/*
+ * Portable error number symbolic names defined to Winsock error codes.
+ */
+
+#ifdef USE_WINSOCK
+#undef EBADF /* override definition in errno.h */
+#define EBADF WSAEBADF
+#undef EINTR /* override definition in errno.h */
+#define EINTR WSAEINTR
+#undef EINVAL /* override definition in errno.h */
+#define EINVAL WSAEINVAL
+#undef EWOULDBLOCK /* override definition in errno.h */
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#undef EINPROGRESS /* override definition in errno.h */
+#define EINPROGRESS WSAEINPROGRESS
+#undef EALREADY /* override definition in errno.h */
+#define EALREADY WSAEALREADY
+#undef ENOTSOCK /* override definition in errno.h */
+#define ENOTSOCK WSAENOTSOCK
+#undef EDESTADDRREQ /* override definition in errno.h */
+#define EDESTADDRREQ WSAEDESTADDRREQ
+#undef EMSGSIZE /* override definition in errno.h */
+#define EMSGSIZE WSAEMSGSIZE
+#undef EPROTOTYPE /* override definition in errno.h */
+#define EPROTOTYPE WSAEPROTOTYPE
+#undef ENOPROTOOPT /* override definition in errno.h */
+#define ENOPROTOOPT WSAENOPROTOOPT
+#undef EPROTONOSUPPORT /* override definition in errno.h */
+#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+#undef EOPNOTSUPP /* override definition in errno.h */
+#define EOPNOTSUPP WSAEOPNOTSUPP
+#define EPFNOSUPPORT WSAEPFNOSUPPORT
+#undef EAFNOSUPPORT /* override definition in errno.h */
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#undef EADDRINUSE /* override definition in errno.h */
+#define EADDRINUSE WSAEADDRINUSE
+#undef EADDRNOTAVAIL /* override definition in errno.h */
+#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+#undef ENETDOWN /* override definition in errno.h */
+#define ENETDOWN WSAENETDOWN
+#undef ENETUNREACH /* override definition in errno.h */
+#define ENETUNREACH WSAENETUNREACH
+#undef ENETRESET /* override definition in errno.h */
+#define ENETRESET WSAENETRESET
+#undef ECONNABORTED /* override definition in errno.h */
+#define ECONNABORTED WSAECONNABORTED
+#undef ECONNRESET /* override definition in errno.h */
+#define ECONNRESET WSAECONNRESET
+#undef ENOBUFS /* override definition in errno.h */
+#define ENOBUFS WSAENOBUFS
+#undef EISCONN /* override definition in errno.h */
+#define EISCONN WSAEISCONN
+#undef ENOTCONN /* override definition in errno.h */
+#define ENOTCONN WSAENOTCONN
+#define ESHUTDOWN WSAESHUTDOWN
+#define ETOOMANYREFS WSAETOOMANYREFS
+#undef ETIMEDOUT /* override definition in errno.h */
+#define ETIMEDOUT WSAETIMEDOUT
+#undef ECONNREFUSED /* override definition in errno.h */
+#define ECONNREFUSED WSAECONNREFUSED
+#undef ELOOP /* override definition in errno.h */
+#define ELOOP WSAELOOP
+#ifndef ENAMETOOLONG /* possible previous definition in errno.h */
+#define ENAMETOOLONG WSAENAMETOOLONG
+#endif
+#define EHOSTDOWN WSAEHOSTDOWN
+#undef EHOSTUNREACH /* override definition in errno.h */
+#define EHOSTUNREACH WSAEHOSTUNREACH
+#ifndef ENOTEMPTY /* possible previous definition in errno.h */
+#define ENOTEMPTY WSAENOTEMPTY
+#endif
+#define EPROCLIM WSAEPROCLIM
+#define EUSERS WSAEUSERS
+#define EDQUOT WSAEDQUOT
+#define ESTALE WSAESTALE
+#define EREMOTE WSAEREMOTE
+#endif
+
+/*
+ * Macro argv_item_t hides platform details to code using it.
+ */
+
+#ifdef __VMS
+#define argv_item_t __char_ptr32
+#else
+#define argv_item_t char *
+#endif
+
+
+/*
+ * We use this ZERO_NULL to avoid picky compiler warnings,
+ * when assigning a NULL pointer to a function pointer var.
+ */
+
+#define ZERO_NULL 0
+
+
+#endif /* HEADER_CURL_SETUP_ONCE_H */
+
diff --git a/lib/curl_sspi.c b/lib/curl_sspi.c
index b985dbce..43fcb637 100644
--- a/lib/curl_sspi.c
+++ b/lib/curl_sspi.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,31 +20,38 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_WINDOWS_SSPI
#include <curl/curl.h>
-
#include "curl_sspi.h"
+#include "curl_multibyte.h"
+#include "warnless.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+/* The last #include files should be: */
#include "curl_memory.h"
-/* The last #include file should be: */
#include "memdebug.h"
-
/* We use our own typedef here since some headers might lack these */
-typedef PSecurityFunctionTableA (APIENTRY *INITSECURITYINTERFACE_FN_A)(VOID);
+typedef PSecurityFunctionTable (APIENTRY *INITSECURITYINTERFACE_FN)(VOID);
+
+/* See definition of SECURITY_ENTRYPOINT in sspi.h */
+#ifdef UNICODE
+# ifdef _WIN32_WCE
+# define SECURITYENTRYPOINT L"InitSecurityInterfaceW"
+# else
+# define SECURITYENTRYPOINT "InitSecurityInterfaceW"
+# endif
+#else
+# define SECURITYENTRYPOINT "InitSecurityInterfaceA"
+#endif
/* Handle of security.dll or secur32.dll, depending on Windows version */
HMODULE s_hSecDll = NULL;
/* Pointer to SSPI dispatch table */
-PSecurityFunctionTableA s_pSecFn = NULL;
-
+PSecurityFunctionTable s_pSecFn = NULL;
/*
* Curl_sspi_global_init()
@@ -57,59 +64,82 @@ PSecurityFunctionTableA s_pSecFn = NULL;
* Once this function has been executed, Windows SSPI functions can be
* called through the Security Service Provider Interface dispatch table.
*/
-
-CURLcode
-Curl_sspi_global_init(void)
+CURLcode Curl_sspi_global_init(void)
{
- OSVERSIONINFO osver;
- INITSECURITYINTERFACE_FN_A pInitSecurityInterface;
+ bool securityDll = FALSE;
+ INITSECURITYINTERFACE_FN pInitSecurityInterface;
/* If security interface is not yet initialized try to do this */
- if(s_hSecDll == NULL) {
+ if(!s_hSecDll) {
+ /* Security Service Provider Interface (SSPI) functions are located in
+ * security.dll on WinNT 4.0 and in secur32.dll on Win9x. Win2K and XP
+ * have both these DLLs (security.dll forwards calls to secur32.dll) */
+ DWORD majorVersion = 4;
+ DWORD platformId = VER_PLATFORM_WIN32_NT;
+
+#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_WIN2K) || \
+ (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
+ OSVERSIONINFO osver;
- /* Find out Windows version */
memset(&osver, 0, sizeof(osver));
osver.dwOSVersionInfoSize = sizeof(osver);
- if(! GetVersionEx(&osver))
+
+ /* Find out Windows version */
+ if(!GetVersionEx(&osver))
return CURLE_FAILED_INIT;
- /* Security Service Provider Interface (SSPI) functions are located in
- * security.dll on WinNT 4.0 and in secur32.dll on Win9x. Win2K and XP
- * have both these DLLs (security.dll forwards calls to secur32.dll) */
+ /* Verify the major version number == 4 and platform id == WIN_NT */
+ if(osver.dwMajorVersion == majorVersion &&
+ osver.dwPlatformId == platformId)
+ securityDll = TRUE;
+#else
+ ULONGLONG majorVersionMask;
+ ULONGLONG platformIdMask;
+ OSVERSIONINFOEX osver;
+
+ memset(&osver, 0, sizeof(osver));
+ osver.dwOSVersionInfoSize = sizeof(osver);
+ osver.dwMajorVersion = majorVersion;
+ osver.dwPlatformId = platformId;
+ majorVersionMask = VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL);
+ platformIdMask = VerSetConditionMask(0, VER_PLATFORMID, VER_EQUAL);
+
+ /* Verify the major version number == 4 and platform id == WIN_NT */
+ if(VerifyVersionInfo(&osver, VER_MAJORVERSION, majorVersionMask) &&
+ VerifyVersionInfo(&osver, VER_PLATFORMID, platformIdMask))
+ securityDll = TRUE;
+#endif
/* Load SSPI dll into the address space of the calling process */
- if(osver.dwPlatformId == VER_PLATFORM_WIN32_NT
- && osver.dwMajorVersion == 4)
- s_hSecDll = LoadLibrary("security.dll");
+ if(securityDll)
+ s_hSecDll = LoadLibrary(TEXT("security.dll"));
else
- s_hSecDll = LoadLibrary("secur32.dll");
- if(! s_hSecDll)
+ s_hSecDll = LoadLibrary(TEXT("secur32.dll"));
+ if(!s_hSecDll)
return CURLE_FAILED_INIT;
/* Get address of the InitSecurityInterfaceA function from the SSPI dll */
- pInitSecurityInterface = (INITSECURITYINTERFACE_FN_A)
- GetProcAddress(s_hSecDll, "InitSecurityInterfaceA");
- if(! pInitSecurityInterface)
+ pInitSecurityInterface = (INITSECURITYINTERFACE_FN)
+ GetProcAddress(s_hSecDll, SECURITYENTRYPOINT);
+ if(!pInitSecurityInterface)
return CURLE_FAILED_INIT;
/* Get pointer to Security Service Provider Interface dispatch table */
s_pSecFn = pInitSecurityInterface();
- if(! s_pSecFn)
+ if(!s_pSecFn)
return CURLE_FAILED_INIT;
-
}
+
return CURLE_OK;
}
-
/*
* Curl_sspi_global_cleanup()
*
* This deinitializes the Security Service Provider Interface from libcurl.
*/
-void
-Curl_sspi_global_cleanup(void)
+void Curl_sspi_global_cleanup(void)
{
if(s_hSecDll) {
FreeLibrary(s_hSecDll);
@@ -118,4 +148,105 @@ Curl_sspi_global_cleanup(void)
}
}
+/*
+ * Curl_create_sspi_identity()
+ *
+ * This is used to populate a SSPI identity structure based on the supplied
+ * username and password.
+ *
+ * Parameters:
+ *
+ * userp [in] - The user name in the format User or Domain\User.
+ * passdwp [in] - The user's password.
+ * identity [in/out] - The identity structure.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_create_sspi_identity(const char *userp, const char *passwdp,
+ SEC_WINNT_AUTH_IDENTITY *identity)
+{
+ xcharp_u useranddomain;
+ xcharp_u user, dup_user;
+ xcharp_u domain, dup_domain;
+ xcharp_u passwd, dup_passwd;
+ size_t domlen = 0;
+
+ domain.const_tchar_ptr = TEXT("");
+
+ /* Initialize the identity */
+ memset(identity, 0, sizeof(*identity));
+
+ useranddomain.tchar_ptr = Curl_convert_UTF8_to_tchar((char *)userp);
+ if(!useranddomain.tchar_ptr)
+ return CURLE_OUT_OF_MEMORY;
+
+ user.const_tchar_ptr = _tcschr(useranddomain.const_tchar_ptr, TEXT('\\'));
+ if(!user.const_tchar_ptr)
+ user.const_tchar_ptr = _tcschr(useranddomain.const_tchar_ptr, TEXT('/'));
+
+ if(user.tchar_ptr) {
+ domain.tchar_ptr = useranddomain.tchar_ptr;
+ domlen = user.tchar_ptr - useranddomain.tchar_ptr;
+ user.tchar_ptr++;
+ }
+ else {
+ user.tchar_ptr = useranddomain.tchar_ptr;
+ domain.const_tchar_ptr = TEXT("");
+ domlen = 0;
+ }
+
+ /* Setup the identity's user and length */
+ dup_user.tchar_ptr = _tcsdup(user.tchar_ptr);
+ if(!dup_user.tchar_ptr) {
+ Curl_unicodefree(useranddomain.tchar_ptr);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ identity->User = dup_user.tbyte_ptr;
+ identity->UserLength = curlx_uztoul(_tcslen(dup_user.tchar_ptr));
+ dup_user.tchar_ptr = NULL;
+
+ /* Setup the identity's domain and length */
+ dup_domain.tchar_ptr = malloc(sizeof(TCHAR) * (domlen + 1));
+ if(!dup_domain.tchar_ptr) {
+ Curl_unicodefree(useranddomain.tchar_ptr);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ _tcsncpy(dup_domain.tchar_ptr, domain.tchar_ptr, domlen);
+ *(dup_domain.tchar_ptr + domlen) = TEXT('\0');
+ identity->Domain = dup_domain.tbyte_ptr;
+ identity->DomainLength = curlx_uztoul(domlen);
+ dup_domain.tchar_ptr = NULL;
+
+ Curl_unicodefree(useranddomain.tchar_ptr);
+
+ /* Setup ntlm identity's password and length */
+ passwd.tchar_ptr = Curl_convert_UTF8_to_tchar((char *)passwdp);
+ if(!passwd.tchar_ptr)
+ return CURLE_OUT_OF_MEMORY;
+ dup_passwd.tchar_ptr = _tcsdup(passwd.tchar_ptr);
+ if(!dup_passwd.tchar_ptr) {
+ Curl_unicodefree(passwd.tchar_ptr);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ identity->Password = dup_passwd.tbyte_ptr;
+ identity->PasswordLength = curlx_uztoul(_tcslen(dup_passwd.tchar_ptr));
+ dup_passwd.tchar_ptr = NULL;
+
+ Curl_unicodefree(passwd.tchar_ptr);
+
+ /* Setup the identity's flags */
+ identity->Flags = SECFLAG_WINNT_AUTH_IDENTITY;
+
+ return CURLE_OK;
+}
+
+void Curl_sspi_free_identity(SEC_WINNT_AUTH_IDENTITY *identity)
+{
+ if(identity) {
+ Curl_safefree(identity->User);
+ Curl_safefree(identity->Password);
+ Curl_safefree(identity->Domain);
+ }
+}
+
#endif /* USE_WINDOWS_SSPI */
diff --git a/lib/curl_sspi.h b/lib/curl_sspi.h
index 221bce12..8655715e 100644
--- a/lib/curl_sspi.h
+++ b/lib/curl_sspi.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -22,14 +22,14 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_WINDOWS_SSPI
#include <curl/curl.h>
/*
- * When including the folowing three headers, it is mandatory to define either
+ * When including the following three headers, it is mandatory to define either
* SECURITY_WIN32 or SECURITY_KERNEL, indicating who is compiling the code.
*/
@@ -40,34 +40,307 @@
#include <sspi.h>
#include <rpc.h>
-/* Provide some definitions missing in MinGW's headers */
+CURLcode Curl_sspi_global_init(void);
+void Curl_sspi_global_cleanup(void);
-#ifndef SEC_I_CONTEXT_EXPIRED
-# define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L)
+/* This is used to populate the domain in a SSPI identity structure */
+CURLcode Curl_override_sspi_http_realm(const char *chlg,
+ SEC_WINNT_AUTH_IDENTITY *identity);
+
+/* This is used to generate an SSPI identity structure */
+CURLcode Curl_create_sspi_identity(const char *userp, const char *passwdp,
+ SEC_WINNT_AUTH_IDENTITY *identity);
+
+/* This is used to free an SSPI identity structure */
+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 SEC_E_BUFFER_TOO_SMALL
-# define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L)
+
+#ifndef ISC_RET_REPLAY_DETECT
+#define ISC_RET_REPLAY_DETECT 0x00000004
#endif
-#ifndef SEC_E_CONTEXT_EXPIRED
-# define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L)
+
+#ifndef ISC_RET_SEQUENCE_DETECT
+#define ISC_RET_SEQUENCE_DETECT 0x00000008
#endif
-#ifndef SEC_E_CRYPTO_SYSTEM_INVALID
-# define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L)
+
+#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)
+#endif
+#ifndef SEC_E_INVALID_HANDLE
+# define SEC_E_INVALID_HANDLE ((HRESULT)0x80090301L)
+#endif
+#ifndef SEC_E_UNSUPPORTED_FUNCTION
+# define SEC_E_UNSUPPORTED_FUNCTION ((HRESULT)0x80090302L)
+#endif
+#ifndef SEC_E_TARGET_UNKNOWN
+# define SEC_E_TARGET_UNKNOWN ((HRESULT)0x80090303L)
+#endif
+#ifndef SEC_E_INTERNAL_ERROR
+# define SEC_E_INTERNAL_ERROR ((HRESULT)0x80090304L)
+#endif
+#ifndef SEC_E_SECPKG_NOT_FOUND
+# define SEC_E_SECPKG_NOT_FOUND ((HRESULT)0x80090305L)
+#endif
+#ifndef SEC_E_NOT_OWNER
+# define SEC_E_NOT_OWNER ((HRESULT)0x80090306L)
+#endif
+#ifndef SEC_E_CANNOT_INSTALL
+# define SEC_E_CANNOT_INSTALL ((HRESULT)0x80090307L)
+#endif
+#ifndef SEC_E_INVALID_TOKEN
+# define SEC_E_INVALID_TOKEN ((HRESULT)0x80090308L)
+#endif
+#ifndef SEC_E_CANNOT_PACK
+# define SEC_E_CANNOT_PACK ((HRESULT)0x80090309L)
+#endif
+#ifndef SEC_E_QOP_NOT_SUPPORTED
+# define SEC_E_QOP_NOT_SUPPORTED ((HRESULT)0x8009030AL)
+#endif
+#ifndef SEC_E_NO_IMPERSONATION
+# define SEC_E_NO_IMPERSONATION ((HRESULT)0x8009030BL)
+#endif
+#ifndef SEC_E_LOGON_DENIED
+# define SEC_E_LOGON_DENIED ((HRESULT)0x8009030CL)
+#endif
+#ifndef SEC_E_UNKNOWN_CREDENTIALS
+# define SEC_E_UNKNOWN_CREDENTIALS ((HRESULT)0x8009030DL)
+#endif
+#ifndef SEC_E_NO_CREDENTIALS
+# 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)
+#endif
+#ifndef SEC_E_BAD_PKGID
+# define SEC_E_BAD_PKGID ((HRESULT)0x80090316L)
+#endif
+#ifndef SEC_E_CONTEXT_EXPIRED
+# define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L)
+#endif
+#ifndef SEC_E_INCOMPLETE_MESSAGE
+# define SEC_E_INCOMPLETE_MESSAGE ((HRESULT)0x80090318L)
+#endif
+#ifndef SEC_E_INCOMPLETE_CREDENTIALS
+# define SEC_E_INCOMPLETE_CREDENTIALS ((HRESULT)0x80090320L)
+#endif
+#ifndef SEC_E_BUFFER_TOO_SMALL
+# define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L)
+#endif
+#ifndef SEC_E_WRONG_PRINCIPAL
+# define SEC_E_WRONG_PRINCIPAL ((HRESULT)0x80090322L)
+#endif
+#ifndef SEC_E_TIME_SKEW
+# define SEC_E_TIME_SKEW ((HRESULT)0x80090324L)
+#endif
+#ifndef SEC_E_UNTRUSTED_ROOT
+# define SEC_E_UNTRUSTED_ROOT ((HRESULT)0x80090325L)
+#endif
+#ifndef SEC_E_ILLEGAL_MESSAGE
+# define SEC_E_ILLEGAL_MESSAGE ((HRESULT)0x80090326L)
+#endif
+#ifndef SEC_E_CERT_UNKNOWN
+# define SEC_E_CERT_UNKNOWN ((HRESULT)0x80090327L)
+#endif
+#ifndef SEC_E_CERT_EXPIRED
+# define SEC_E_CERT_EXPIRED ((HRESULT)0x80090328L)
+#endif
+#ifndef SEC_E_ENCRYPT_FAILURE
+# define SEC_E_ENCRYPT_FAILURE ((HRESULT)0x80090329L)
+#endif
+#ifndef SEC_E_DECRYPT_FAILURE
+# define SEC_E_DECRYPT_FAILURE ((HRESULT)0x80090330L)
+#endif
+#ifndef SEC_E_ALGORITHM_MISMATCH
+# define SEC_E_ALGORITHM_MISMATCH ((HRESULT)0x80090331L)
+#endif
+#ifndef SEC_E_SECURITY_QOS_FAILED
+# define SEC_E_SECURITY_QOS_FAILED ((HRESULT)0x80090332L)
+#endif
+#ifndef SEC_E_UNFINISHED_CONTEXT_DELETED
+# define SEC_E_UNFINISHED_CONTEXT_DELETED ((HRESULT)0x80090333L)
+#endif
+#ifndef SEC_E_NO_TGT_REPLY
+# define SEC_E_NO_TGT_REPLY ((HRESULT)0x80090334L)
+#endif
+#ifndef SEC_E_NO_IP_ADDRESSES
+# define SEC_E_NO_IP_ADDRESSES ((HRESULT)0x80090335L)
+#endif
+#ifndef SEC_E_WRONG_CREDENTIAL_HANDLE
+# define SEC_E_WRONG_CREDENTIAL_HANDLE ((HRESULT)0x80090336L)
+#endif
+#ifndef SEC_E_CRYPTO_SYSTEM_INVALID
+# define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L)
+#endif
+#ifndef SEC_E_MAX_REFERRALS_EXCEEDED
+# define SEC_E_MAX_REFERRALS_EXCEEDED ((HRESULT)0x80090338L)
+#endif
+#ifndef SEC_E_MUST_BE_KDC
+# 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)
+#endif
+#ifndef SEC_E_TOO_MANY_PRINCIPALS
+# define SEC_E_TOO_MANY_PRINCIPALS ((HRESULT)0x8009033BL)
+#endif
+#ifndef SEC_E_NO_PA_DATA
+# define SEC_E_NO_PA_DATA ((HRESULT)0x8009033CL)
+#endif
+#ifndef SEC_E_PKINIT_NAME_MISMATCH
+# define SEC_E_PKINIT_NAME_MISMATCH ((HRESULT)0x8009033DL)
+#endif
+#ifndef SEC_E_SMARTCARD_LOGON_REQUIRED
+# define SEC_E_SMARTCARD_LOGON_REQUIRED ((HRESULT)0x8009033EL)
+#endif
+#ifndef SEC_E_SHUTDOWN_IN_PROGRESS
+# define SEC_E_SHUTDOWN_IN_PROGRESS ((HRESULT)0x8009033FL)
+#endif
+#ifndef SEC_E_KDC_INVALID_REQUEST
+# 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)
+#endif
+#ifndef SEC_E_KDC_UNKNOWN_ETYPE
+# define SEC_E_KDC_UNKNOWN_ETYPE ((HRESULT)0x80090342L)
+#endif
+#ifndef SEC_E_UNSUPPORTED_PREAUTH
+# define SEC_E_UNSUPPORTED_PREAUTH ((HRESULT)0x80090343L)
+#endif
+#ifndef SEC_E_DELEGATION_REQUIRED
+# define SEC_E_DELEGATION_REQUIRED ((HRESULT)0x80090345L)
+#endif
+#ifndef SEC_E_BAD_BINDINGS
+# define SEC_E_BAD_BINDINGS ((HRESULT)0x80090346L)
+#endif
+#ifndef SEC_E_MULTIPLE_ACCOUNTS
+# define SEC_E_MULTIPLE_ACCOUNTS ((HRESULT)0x80090347L)
+#endif
+#ifndef SEC_E_NO_KERB_KEY
+# define SEC_E_NO_KERB_KEY ((HRESULT)0x80090348L)
+#endif
+#ifndef SEC_E_CERT_WRONG_USAGE
+# define SEC_E_CERT_WRONG_USAGE ((HRESULT)0x80090349L)
+#endif
+#ifndef SEC_E_DOWNGRADE_DETECTED
+# define SEC_E_DOWNGRADE_DETECTED ((HRESULT)0x80090350L)
+#endif
+#ifndef SEC_E_SMARTCARD_CERT_REVOKED
+# define SEC_E_SMARTCARD_CERT_REVOKED ((HRESULT)0x80090351L)
+#endif
+#ifndef SEC_E_ISSUING_CA_UNTRUSTED
+# define SEC_E_ISSUING_CA_UNTRUSTED ((HRESULT)0x80090352L)
+#endif
+#ifndef SEC_E_REVOCATION_OFFLINE_C
+# define SEC_E_REVOCATION_OFFLINE_C ((HRESULT)0x80090353L)
+#endif
+#ifndef SEC_E_PKINIT_CLIENT_FAILURE
+# define SEC_E_PKINIT_CLIENT_FAILURE ((HRESULT)0x80090354L)
+#endif
+#ifndef SEC_E_SMARTCARD_CERT_EXPIRED
+# 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)
+#endif
+#ifndef SEC_E_CROSSREALM_DELEGATION_FAILURE
+# define SEC_E_CROSSREALM_DELEGATION_FAILURE ((HRESULT)0x80090357L)
+#endif
+#ifndef SEC_E_REVOCATION_OFFLINE_KDC
+# 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)
+#endif
+#ifndef SEC_E_KDC_CERT_EXPIRED
+# define SEC_E_KDC_CERT_EXPIRED ((HRESULT)0x8009035AL)
+#endif
+#ifndef SEC_E_KDC_CERT_REVOKED
+# define SEC_E_KDC_CERT_REVOKED ((HRESULT)0x8009035BL)
+#endif
+#ifndef SEC_E_INVALID_PARAMETER
+# define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL)
+#endif
+#ifndef SEC_E_DELEGATION_POLICY
+# define SEC_E_DELEGATION_POLICY ((HRESULT)0x8009035EL)
+#endif
+#ifndef SEC_E_POLICY_NLTM_ONLY
+# define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL)
#endif
-CURLcode Curl_sspi_global_init(void);
-void Curl_sspi_global_cleanup(void);
+#ifndef SEC_I_CONTINUE_NEEDED
+# define SEC_I_CONTINUE_NEEDED ((HRESULT)0x00090312L)
+#endif
+#ifndef SEC_I_COMPLETE_NEEDED
+# define SEC_I_COMPLETE_NEEDED ((HRESULT)0x00090313L)
+#endif
+#ifndef SEC_I_COMPLETE_AND_CONTINUE
+# define SEC_I_COMPLETE_AND_CONTINUE ((HRESULT)0x00090314L)
+#endif
+#ifndef SEC_I_LOCAL_LOGON
+# define SEC_I_LOCAL_LOGON ((HRESULT)0x00090315L)
+#endif
+#ifndef SEC_I_CONTEXT_EXPIRED
+# define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L)
+#endif
+#ifndef SEC_I_INCOMPLETE_CREDENTIALS
+# define SEC_I_INCOMPLETE_CREDENTIALS ((HRESULT)0x00090320L)
+#endif
+#ifndef SEC_I_RENEGOTIATE
+# define SEC_I_RENEGOTIATE ((HRESULT)0x00090321L)
+#endif
+#ifndef SEC_I_NO_LSA_CONTEXT
+# define SEC_I_NO_LSA_CONTEXT ((HRESULT)0x00090323L)
+#endif
+#ifndef SEC_I_SIGNATURE_NEEDED
+# define SEC_I_SIGNATURE_NEEDED ((HRESULT)0x0009035CL)
+#endif
-/* Forward-declaration of global variables defined in curl_sspi.c */
+#ifdef UNICODE
+# define SECFLAG_WINNT_AUTH_IDENTITY \
+ (unsigned long)SEC_WINNT_AUTH_IDENTITY_UNICODE
+#else
+# define SECFLAG_WINNT_AUTH_IDENTITY \
+ (unsigned long)SEC_WINNT_AUTH_IDENTITY_ANSI
+#endif
-extern HMODULE s_hSecDll;
-extern PSecurityFunctionTableA s_pSecFn;
+/*
+ * 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 fd10bd48..f9b812ea 100644
--- a/lib/curl_threads.c
+++ b/lib/curl_threads.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -19,7 +19,8 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+
+#include "curl_setup.h"
#if defined(USE_THREADS_POSIX)
# ifdef HAVE_PTHREAD_H
@@ -32,10 +33,6 @@
#endif
#include "curl_threads.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -62,32 +59,38 @@ static void *curl_thread_create_thunk(void *arg)
curl_thread_t Curl_thread_create(unsigned int (*func) (void*), void *arg)
{
- curl_thread_t t;
+ curl_thread_t t = malloc(sizeof(pthread_t));
struct curl_actual_call *ac = malloc(sizeof(struct curl_actual_call));
- if(!ac)
- return curl_thread_t_null;
+ if(!(ac && t))
+ goto err;
ac->func = func;
ac->arg = arg;
- if(pthread_create(&t, NULL, curl_thread_create_thunk, ac) != 0) {
- free(ac);
- return curl_thread_t_null;
- }
+ if(pthread_create(t, NULL, curl_thread_create_thunk, ac) != 0)
+ goto err;
return t;
+
+err:
+ free(t);
+ free(ac);
+ return curl_thread_t_null;
}
void Curl_thread_destroy(curl_thread_t hnd)
{
- if(hnd != curl_thread_t_null)
- pthread_detach(hnd);
+ if(hnd != curl_thread_t_null) {
+ pthread_detach(*hnd);
+ free(hnd);
+ }
}
int Curl_thread_join(curl_thread_t *hnd)
{
- int ret = (pthread_join(*hnd, NULL) == 0);
+ int ret = (pthread_join(**hnd, NULL) == 0);
+ free(*hnd);
*hnd = curl_thread_t_null;
return ret;
@@ -95,7 +98,8 @@ int Curl_thread_join(curl_thread_t *hnd)
#elif defined(USE_THREADS_WIN32)
-curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void*), void *arg)
+curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void*),
+ void *arg)
{
#ifdef _WIN32_WCE
return CreateThread(NULL, 0, func, arg, 0, NULL);
@@ -115,7 +119,12 @@ 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 ba81054a..0f3191ab 100644
--- a/lib/curl_threads.h
+++ b/lib/curl_threads.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,13 +21,13 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_THREADS_POSIX)
# define CURL_STDCALL
# define curl_mutex_t pthread_mutex_t
-# define curl_thread_t pthread_t
-# define curl_thread_t_null (pthread_t)0
+# define curl_thread_t pthread_t *
+# define curl_thread_t_null (pthread_t *)0
# define Curl_mutex_init(m) pthread_mutex_init(m, NULL)
# define Curl_mutex_acquire(m) pthread_mutex_lock(m)
# define Curl_mutex_release(m) pthread_mutex_unlock(m)
@@ -37,7 +37,12 @@
# define curl_mutex_t CRITICAL_SECTION
# define curl_thread_t HANDLE
# define curl_thread_t_null (HANDLE)0
-# define Curl_mutex_init(m) InitializeCriticalSection(m)
+# 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_acquire(m) EnterCriticalSection(m)
# define Curl_mutex_release(m) LeaveCriticalSection(m)
# define Curl_mutex_destroy(m) DeleteCriticalSection(m)
diff --git a/lib/curlx.h b/lib/curlx.h
index 2b7fec58..979e7d7a 100644
--- a/lib/curlx.h
+++ b/lib/curlx.h
@@ -1,5 +1,5 @@
-#ifndef __CURLX_H
-#define __CURLX_H
+#ifndef HEADER_CURL_CURLX_H
+#define HEADER_CURL_CURLX_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -89,9 +89,8 @@
#ifdef ENABLE_CURLX_PRINTF
/* If this define is set, we define all "standard" printf() functions to use
- the curlx_* version instead. It makes the source code transparant and
- easier to understand/patch. Undefine them first in case _MPRINTF_REPLACE
- is set. */
+ the curlx_* version instead. It makes the source code transparent and
+ easier to understand/patch. Undefine them first. */
# undef printf
# undef fprintf
# undef sprintf
@@ -115,4 +114,5 @@
# define vaprintf curlx_mvaprintf
#endif /* ENABLE_CURLX_PRINTF */
-#endif /* __CURLX_H */
+#endif /* HEADER_CURL_CURLX_H */
+
diff --git a/lib/dict.c b/lib/dict.c
index d86923a9..06d76992 100644
--- a/lib/dict.c
+++ b/lib/dict.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,32 +20,16 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_DICT
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -64,9 +48,6 @@
#include <sys/select.h>
#endif
-
-#endif
-
#include "urldata.h"
#include <curl/curl.h>
#include "transfer.h"
@@ -76,14 +57,10 @@
#include "strequal.h"
#include "dict.h"
#include "rawstr.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
-
/*
* Forward declarations.
*/
@@ -105,10 +82,13 @@ const struct Curl_handler Curl_handler_dict = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_DICT, /* defport */
- PROT_DICT /* protocol */
+ CURLPROTO_DICT, /* protocol */
+ PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */
};
static char *unescape_word(struct SessionHandle *data, const char *inputbuff)
@@ -117,7 +97,7 @@ static char *unescape_word(struct SessionHandle *data, const char *inputbuff)
char *dictp;
char *ptr;
int len;
- char byte;
+ char ch;
int olen=0;
newp = curl_easy_unescape(data, inputbuff, 0, &len);
@@ -129,18 +109,17 @@ static char *unescape_word(struct SessionHandle *data, const char *inputbuff)
/* According to RFC2229 section 2.2, these letters need to be escaped with
\[letter] */
for(ptr = newp;
- (byte = *ptr) != 0;
+ (ch = *ptr) != 0;
ptr++) {
- if((byte <= 32) || (byte == 127) ||
- (byte == '\'') || (byte == '\"') || (byte == '\\')) {
+ if((ch <= 32) || (ch == 127) ||
+ (ch == '\'') || (ch == '\"') || (ch == '\\')) {
dictp[olen++] = '\\';
}
- dictp[olen++] = byte;
+ dictp[olen++] = ch;
}
dictp[olen]=0;
-
- free(newp);
}
+ free(newp);
return dictp;
}
@@ -188,7 +167,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
}
if((word == NULL) || (*word == (char)0)) {
- infof(data, "lookup word is missing");
+ infof(data, "lookup word is missing\n");
word=(char *)"default";
}
if((database == NULL) || (*database == (char)0)) {
@@ -242,7 +221,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
}
if((word == NULL) || (*word == (char)0)) {
- infof(data, "lookup word is missing");
+ infof(data, "lookup word is missing\n");
word=(char *)"default";
}
if((database == NULL) || (*database == (char)0)) {
@@ -278,7 +257,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
int i;
ppath++;
- for (i = 0; ppath[i]; i++) {
+ for(i = 0; ppath[i]; i++) {
if(ppath[i] == ':')
ppath[i] = ' ';
}
diff --git a/lib/dotdot.c b/lib/dotdot.c
new file mode 100644
index 00000000..ae169411
--- /dev/null
+++ b/lib/dotdot.c
@@ -0,0 +1,170 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "dotdot.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/*
+ * "Remove Dot Segments"
+ * http://tools.ietf.org/html/rfc3986#section-5.2.4
+ */
+
+/*
+ * Curl_dedotdotify()
+ *
+ * This function gets a zero-terminated path with dot and dotdot sequences
+ * passed in and strips them off according to the rules in RFC 3986 section
+ * 5.2.4.
+ *
+ * The function handles a query part ('?' + stuff) appended but it expects
+ * that fragments ('#' + stuff) have already been cut off.
+ *
+ * RETURNS
+ *
+ * an allocated dedotdotified output string
+ */
+char *Curl_dedotdotify(const char *input)
+{
+ size_t inlen = strlen(input);
+ char *clone;
+ size_t clen = inlen; /* the length of the cloned input */
+ char *out = malloc(inlen+1);
+ char *outptr;
+ char *orgclone;
+ char *queryp;
+ if(!out)
+ return NULL; /* out of memory */
+
+ /* get a cloned copy of the input */
+ clone = strdup(input);
+ if(!clone) {
+ free(out);
+ return NULL;
+ }
+ orgclone = clone;
+ outptr = out;
+
+ /*
+ * To handle query-parts properly, we must find it and remove it during the
+ * dotdot-operation and then append it again at the end to the output
+ * string.
+ */
+ queryp = strchr(clone, '?');
+ if(queryp)
+ *queryp = 0;
+
+ do {
+
+ /* A. If the input buffer begins with a prefix of "../" or "./", then
+ remove that prefix from the input buffer; otherwise, */
+
+ if(!strncmp("./", clone, 2)) {
+ clone+=2;
+ clen-=2;
+ }
+ else if(!strncmp("../", clone, 3)) {
+ clone+=3;
+ clen-=3;
+ }
+
+ /* B. if the input buffer begins with a prefix of "/./" or "/.", where
+ "." is a complete path segment, then replace that prefix with "/" in
+ the input buffer; otherwise, */
+ else if(!strncmp("/./", clone, 3)) {
+ clone+=2;
+ clen-=2;
+ }
+ else if(!strcmp("/.", clone)) {
+ clone[1]='/';
+ clone++;
+ clen-=1;
+ }
+
+ /* C. if the input buffer begins with a prefix of "/../" or "/..", where
+ ".." is a complete path segment, then replace that prefix with "/" in
+ the input buffer and remove the last segment and its preceding "/" (if
+ any) from the output buffer; otherwise, */
+
+ else if(!strncmp("/../", clone, 4)) {
+ clone+=3;
+ clen-=3;
+ /* remove the last segment from the output buffer */
+ while(outptr > out) {
+ outptr--;
+ if(*outptr == '/')
+ break;
+ }
+ *outptr = 0; /* zero-terminate where it stops */
+ }
+ else if(!strcmp("/..", clone)) {
+ clone[2]='/';
+ clone+=2;
+ clen-=2;
+ /* remove the last segment from the output buffer */
+ while(outptr > out) {
+ outptr--;
+ if(*outptr == '/')
+ break;
+ }
+ *outptr = 0; /* zero-terminate where it stops */
+ }
+
+ /* D. if the input buffer consists only of "." or "..", then remove
+ that from the input buffer; otherwise, */
+
+ else if(!strcmp(".", clone) || !strcmp("..", clone)) {
+ *clone=0;
+ }
+
+ else {
+ /* E. move the first path segment in the input buffer to the end of
+ the output buffer, including the initial "/" character (if any) and
+ any subsequent characters up to, but not including, the next "/"
+ character or the end of the input buffer. */
+
+ do {
+ *outptr++ = *clone++;
+ clen--;
+ } while(*clone && (*clone != '/'));
+ *outptr = 0;
+ }
+
+ } while(*clone);
+
+ if(queryp) {
+ size_t qlen;
+ /* There was a query part, append that to the output. The 'clone' string
+ may now have been altered so we copy from the original input string
+ from the correct index. */
+ size_t oindex = queryp - orgclone;
+ qlen = strlen(&input[oindex]);
+ memcpy(outptr, &input[oindex], qlen+1); /* include the ending zero byte */
+ }
+
+ free(orgclone);
+ return out;
+}
diff --git a/lib/dotdot.h b/lib/dotdot.h
new file mode 100644
index 00000000..cd57822b
--- /dev/null
+++ b/lib/dotdot.h
@@ -0,0 +1,25 @@
+#ifndef HEADER_CURL_DOTDOT_H
+#define HEADER_CURL_DOTDOT_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+char *Curl_dedotdotify(const char *input);
+#endif
diff --git a/lib/easy.c b/lib/easy.c
index 1f839fe2..316acb1d 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,34 +20,19 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include "strequal.h"
+/*
+ * See comment in curl_memory.h for the explanation of this sanity check.
+ */
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
+#ifdef CURLX_NO_MEMORY_CALLBACKS
+#error "libcurl shall not ever be built with CURLX_NO_MEMORY_CALLBACKS defined"
#endif
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
@@ -65,43 +50,34 @@
#include <sys/param.h>
#endif
-#endif /* WIN32 ... */
-
+#include "strequal.h"
#include "urldata.h"
#include <curl/curl.h>
#include "transfer.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "url.h"
#include "getinfo.h"
#include "hostip.h"
#include "share.h"
#include "strdup.h"
-#include "curl_memory.h"
#include "progress.h"
#include "easyif.h"
#include "select.h"
#include "sendf.h" /* for failf function prototype */
-#include "http_ntlm.h"
+#include "curl_ntlm.h"
#include "connect.h" /* for Curl_getconnectinfo */
#include "slist.h"
-#include "curl_rand.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
-#include <iconv.h>
-/* set default codesets for iconv */
-#ifndef CURL_ICONV_CODESET_OF_NETWORK
-#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
-#endif
-#ifndef CURL_ICONV_CODESET_FOR_UTF8
-#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
-#endif
-#define ICONV_ERROR (size_t)-1
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
-
-/* The last #include file should be: */
+#include "amigaos.h"
+#include "non-ascii.h"
+#include "warnless.h"
+#include "conncache.h"
+#include "multiif.h"
+#include "sigpipe.h"
+#include "ssh.h"
+#include "curl_printf.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
/* win32_cleanup() is for win32 socket cleanup functionality, the opposite
@@ -144,8 +120,8 @@ static CURLcode win32_init(void)
/* wVersionRequested in wVersion. wHighVersion contains the */
/* highest supported version. */
- if( LOBYTE( wsaData.wVersion ) != LOBYTE(wVersionRequested) ||
- HIBYTE( wsaData.wVersion ) != HIBYTE(wVersionRequested) ) {
+ if(LOBYTE( wsaData.wVersion ) != LOBYTE(wVersionRequested) ||
+ HIBYTE( wsaData.wVersion ) != HIBYTE(wVersionRequested) ) {
/* Tell the user that we couldn't find a useable */
/* winsock.dll. */
@@ -153,13 +129,15 @@ static CURLcode win32_init(void)
return CURLE_FAILED_INIT;
}
/* The Windows Sockets DLL is acceptable. Proceed. */
+#elif defined(USE_LWIPSOCK)
+ lwip_init();
#endif
#ifdef USE_WINDOWS_SSPI
{
- CURLcode err = Curl_sspi_global_init();
- if (err != CURLE_OK)
- return err;
+ CURLcode result = Curl_sspi_global_init();
+ if(result)
+ return result;
}
#endif
@@ -219,6 +197,9 @@ curl_free_callback Curl_cfree = (curl_free_callback)free;
curl_realloc_callback Curl_crealloc = (curl_realloc_callback)realloc;
curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)system_strdup;
curl_calloc_callback Curl_ccalloc = (curl_calloc_callback)calloc;
+#if defined(WIN32) && defined(UNICODE)
+curl_wcsdup_callback Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup;
+#endif
#else
/*
* Symbian OS doesn't support initialization to code in writeable static data.
@@ -250,6 +231,9 @@ CURLcode curl_global_init(long flags)
Curl_crealloc = (curl_realloc_callback)realloc;
Curl_cstrdup = (curl_strdup_callback)system_strdup;
Curl_ccalloc = (curl_calloc_callback)calloc;
+#if defined(WIN32) && defined(UNICODE)
+ Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup;
+#endif
if(flags & CURL_GLOBAL_SSL)
if(!Curl_ssl_init()) {
@@ -258,14 +242,14 @@ CURLcode curl_global_init(long flags)
}
if(flags & CURL_GLOBAL_WIN32)
- if(win32_init() != CURLE_OK) {
+ if(win32_init()) {
DEBUGF(fprintf(stderr, "Error: win32_init failed\n"));
return CURLE_FAILED_INIT;
}
#ifdef __AMIGA__
- if(!amiga_init()) {
- DEBUGF(fprintf(stderr, "Error: amiga_init failed\n"));
+ if(!Curl_amiga_init()) {
+ DEBUGF(fprintf(stderr, "Error: Curl_amiga_init failed\n"));
return CURLE_FAILED_INIT;
}
#endif
@@ -280,12 +264,10 @@ CURLcode curl_global_init(long flags)
idna_init();
#endif
-#ifdef CARES_HAVE_ARES_LIBRARY_INIT
- if(ares_library_init(ARES_LIB_INIT_ALL)) {
- DEBUGF(fprintf(stderr, "Error: ares_library_init failed\n"));
+ if(Curl_resolver_global_init()) {
+ DEBUGF(fprintf(stderr, "Error: resolver_global_init failed\n"));
return CURLE_FAILED_INIT;
}
-#endif
#if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_INIT)
if(libssh2_init(0)) {
@@ -294,11 +276,10 @@ CURLcode curl_global_init(long flags)
}
#endif
- init_flags = flags;
-
- /* Preset pseudo-random number sequence. */
+ if(flags & CURL_GLOBAL_ACK_EINTR)
+ Curl_ack_eintr = 1;
- Curl_srand();
+ init_flags = flags;
return CURLE_OK;
}
@@ -311,19 +292,23 @@ 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 code = CURLE_OK;
+ CURLcode result = CURLE_OK;
/* Invalid input, return immediately */
if(!m || !f || !r || !s || !c)
return CURLE_FAILED_INIT;
- /* Already initialized, don't do it again */
- if( initialized )
+ if(initialized) {
+ /* Already initialized, don't do it again, but bump the variable anyway to
+ work like curl_global_init() and require the same amount of cleanup
+ calls. */
+ initialized++;
return CURLE_OK;
+ }
/* Call the actual init function first */
- code = curl_global_init(flags);
- if(code == CURLE_OK) {
+ result = curl_global_init(flags);
+ if(!result) {
Curl_cmalloc = m;
Curl_cfree = f;
Curl_cstrdup = s;
@@ -331,7 +316,7 @@ CURLcode curl_global_init_mem(long flags, curl_malloc_callback m,
Curl_ccalloc = c;
}
- return code;
+ return result;
}
/**
@@ -351,16 +336,12 @@ void curl_global_cleanup(void)
if(init_flags & CURL_GLOBAL_SSL)
Curl_ssl_cleanup();
-#ifdef CARES_HAVE_ARES_LIBRARY_CLEANUP
- ares_library_cleanup();
-#endif
+ Curl_resolver_global_cleanup();
if(init_flags & CURL_GLOBAL_WIN32)
win32_cleanup();
-#ifdef __AMIGA__
- amiga_cleanup();
-#endif
+ Curl_amiga_cleanup();
#if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_EXIT)
(void)libssh2_exit();
@@ -375,13 +356,13 @@ void curl_global_cleanup(void)
*/
CURL *curl_easy_init(void)
{
- CURLcode res;
+ CURLcode result;
struct SessionHandle *data;
/* Make sure we inited the global SSL stuff */
if(!initialized) {
- res = curl_global_init(CURL_GLOBAL_DEFAULT);
- if(res) {
+ result = curl_global_init(CURL_GLOBAL_DEFAULT);
+ if(result) {
/* something in the global init failed, return nothing */
DEBUGF(fprintf(stderr, "Error: curl_global_init failed\n"));
return NULL;
@@ -389,8 +370,8 @@ CURL *curl_easy_init(void)
}
/* We use curl_open() with undefined URL so far */
- res = Curl_open(&data);
- if(res != CURLE_OK) {
+ result = Curl_open(&data);
+ if(result) {
DEBUGF(fprintf(stderr, "Error: Curl_open failed\n"));
return NULL;
}
@@ -408,164 +389,449 @@ CURLcode curl_easy_setopt(CURL *curl, CURLoption tag, ...)
{
va_list arg;
struct SessionHandle *data = curl;
- CURLcode ret;
+ CURLcode result;
if(!curl)
return CURLE_BAD_FUNCTION_ARGUMENT;
va_start(arg, tag);
- ret = Curl_setopt(data, tag, arg);
+ result = Curl_setopt(data, tag, arg);
va_end(arg);
- return ret;
+ return result;
}
-#ifdef CURL_MULTIEASY
-/***************************************************************************
- * This function is still only for testing purposes. It makes a great way
- * to run the full test suite on the multi interface instead of the easy one.
- ***************************************************************************
+#ifdef CURLDEBUG
+
+struct socketmonitor {
+ struct socketmonitor *next; /* the next node in the list or NULL */
+ struct pollfd socket; /* socket info of what to monitor */
+};
+
+struct events {
+ long ms; /* timeout, run the timeout function when reached */
+ bool msbump; /* set TRUE when timeout is set by callback */
+ int num_sockets; /* number of nodes in the monitor list */
+ struct socketmonitor *list; /* list of sockets to monitor */
+ int running_handles; /* store the returned number */
+};
+
+/* events_timer
*
- * The *new* curl_easy_perform() is the external interface that performs a
- * transfer previously setup.
+ * Callback that gets called with a new value when the timeout should be
+ * updated.
+ */
+
+static int events_timer(CURLM *multi, /* multi handle */
+ long timeout_ms, /* see above */
+ void *userp) /* private callback pointer */
+{
+ struct events *ev = userp;
+ (void)multi;
+ if(timeout_ms == -1)
+ /* timeout removed */
+ timeout_ms = 0;
+ else if(timeout_ms == 0)
+ /* timeout is already reached! */
+ timeout_ms = 1; /* trigger asap */
+
+ ev->ms = timeout_ms;
+ ev->msbump = TRUE;
+ return 0;
+}
+
+
+/* poll2cselect
*
- * Wrapper-function that: creates a multi handle, adds the easy handle to it,
- * runs curl_multi_perform() until the transfer is done, then detaches the
- * easy handle, destroys the multi handle and returns the easy handle's return
- * code. This will make everything internally use and assume multi interface.
+ * convert from poll() bit definitions to libcurl's CURL_CSELECT_* ones
*/
-CURLcode curl_easy_perform(CURL *easy)
+static int poll2cselect(int pollmask)
{
- CURLM *multi;
- CURLMcode mcode;
- CURLcode code = CURLE_OK;
- int still_running;
- struct timeval timeout;
- int rc;
- CURLMsg *msg;
- fd_set fdread;
- fd_set fdwrite;
- fd_set fdexcep;
- int maxfd;
-
- if(!easy)
- return CURLE_BAD_FUNCTION_ARGUMENT;
+ int omask=0;
+ if(pollmask & POLLIN)
+ omask |= CURL_CSELECT_IN;
+ if(pollmask & POLLOUT)
+ omask |= CURL_CSELECT_OUT;
+ if(pollmask & POLLERR)
+ omask |= CURL_CSELECT_ERR;
+ return omask;
+}
- multi = curl_multi_init();
- if(!multi)
- return CURLE_OUT_OF_MEMORY;
- mcode = curl_multi_add_handle(multi, easy);
- if(mcode) {
- curl_multi_cleanup(multi);
- if(mcode == CURLM_OUT_OF_MEMORY)
- return CURLE_OUT_OF_MEMORY;
- else
- return CURLE_FAILED_INIT;
+/* socketcb2poll
+ *
+ * convert from libcurl' CURL_POLL_* bit definitions to poll()'s
+ */
+static short socketcb2poll(int pollmask)
+{
+ short omask=0;
+ if(pollmask & CURL_POLL_IN)
+ omask |= POLLIN;
+ if(pollmask & CURL_POLL_OUT)
+ omask |= POLLOUT;
+ return omask;
+}
+
+/* events_socket
+ *
+ * Callback that gets called with information about socket activity to
+ * monitor.
+ */
+static int events_socket(CURL *easy, /* easy handle */
+ curl_socket_t s, /* socket */
+ int what, /* see above */
+ void *userp, /* private callback
+ pointer */
+ void *socketp) /* private socket
+ pointer */
+{
+ 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;
+ while(m) {
+ if(m->socket.fd == s) {
+
+ if(what == CURL_POLL_REMOVE) {
+ struct socketmonitor *nxt = m->next;
+ /* remove this node from the list of monitored sockets */
+ if(prev)
+ prev->next = nxt;
+ else
+ ev->list = nxt;
+ free(m);
+ m = nxt;
+ infof(easy, "socket cb: socket %d REMOVED\n", s);
+ }
+ else {
+ /* The socket 's' is already being monitored, update the activity
+ mask. Convert from libcurl bitmask to the poll one. */
+ m->socket.events = socketcb2poll(what);
+ infof(easy, "socket cb: socket %d UPDATED as %s%s\n", s,
+ what&CURL_POLL_IN?"IN":"",
+ what&CURL_POLL_OUT?"OUT":"");
+ }
+ break;
+ }
+ prev = m;
+ m = m->next; /* move to next node */
+ }
+ if(!m) {
+ if(what == CURL_POLL_REMOVE) {
+ /* this happens a bit too often, libcurl fix perhaps? */
+ /* fprintf(stderr,
+ "%s: socket %d asked to be REMOVED but not present!\n",
+ __func__, s); */
+ }
+ else {
+ m = malloc(sizeof(struct socketmonitor));
+ m->next = ev->list;
+ m->socket.fd = s;
+ m->socket.events = socketcb2poll(what);
+ m->socket.revents = 0;
+ ev->list = m;
+ infof(easy, "socket cb: socket %d ADDED as %s%s\n", s,
+ what&CURL_POLL_IN?"IN":"",
+ what&CURL_POLL_OUT?"OUT":"");
+ }
}
- /* we start some action by calling perform right away */
+ return 0;
+}
- do {
- while(CURLM_CALL_MULTI_PERFORM ==
- curl_multi_perform(multi, &still_running));
- if(!still_running)
- break;
+/*
+ * events_setup()
+ *
+ * Do the multi handle setups that only event-based transfers need.
+ */
+static void events_setup(CURLM *multi, struct events *ev)
+{
+ /* timer callback */
+ curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, events_timer);
+ curl_multi_setopt(multi, CURLMOPT_TIMERDATA, ev);
- FD_ZERO(&fdread);
- FD_ZERO(&fdwrite);
- FD_ZERO(&fdexcep);
+ /* socket callback */
+ curl_multi_setopt(multi, CURLMOPT_SOCKETFUNCTION, events_socket);
+ curl_multi_setopt(multi, CURLMOPT_SOCKETDATA, ev);
+}
- /* timeout once per second */
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
- /* Old deprecated style: get file descriptors from the transfers */
- curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
- rc = Curl_select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+/* wait_or_timeout()
+ *
+ * waits for activity on any of the given sockets, or the timeout to trigger.
+ */
- /* The way is to extract the sockets and wait for them without using
- select. This whole alternative version should probably rather use the
- curl_multi_socket() approach. */
+static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
+{
+ bool done = FALSE;
+ CURLMcode mcode;
+ CURLcode result = CURLE_OK;
- if(rc == -1)
- /* select error */
- break;
+ while(!done) {
+ CURLMsg *msg;
+ struct socketmonitor *m;
+ struct pollfd *f;
+ struct pollfd fds[4];
+ int numfds=0;
+ int pollrc;
+ int i;
+ struct timeval before;
+ struct timeval after;
+
+ /* populate the fds[] array */
+ for(m = ev->list, f=&fds[0]; m; m = m->next) {
+ f->fd = m->socket.fd;
+ f->events = m->socket.events;
+ f->revents = 0;
+ /* fprintf(stderr, "poll() %d check socket %d\n", numfds, f->fd); */
+ f++;
+ numfds++;
+ }
- /* timeout or data to send/receive => loop! */
- } while(still_running);
+ /* get the time stamp to use to figure out how long poll takes */
+ before = curlx_tvnow();
- msg = curl_multi_info_read(multi, &rc);
- if(msg)
- code = msg->data.result;
+ /* wait for activity or timeout */
+ pollrc = Curl_poll(fds, numfds, (int)ev->ms);
- mcode = curl_multi_remove_handle(multi, easy);
- /* what to do if it fails? */
+ after = curlx_tvnow();
- mcode = curl_multi_cleanup(multi);
- /* what to do if it fails? */
+ ev->msbump = FALSE; /* reset here */
- return code;
+ if(0 == pollrc) {
+ /* timeout! */
+ ev->ms = 0;
+ /* fprintf(stderr, "call curl_multi_socket_action( TIMEOUT )\n"); */
+ mcode = curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0,
+ &ev->running_handles);
+ }
+ else if(pollrc > 0) {
+ /* loop over the monitored sockets to see which ones had activity */
+ for(i = 0; i< numfds; i++) {
+ if(fds[i].revents) {
+ /* socket activity, tell libcurl */
+ int act = poll2cselect(fds[i].revents); /* convert */
+ infof(multi->easyp, "call curl_multi_socket_action( socket %d )\n",
+ fds[i].fd);
+ mcode = curl_multi_socket_action(multi, fds[i].fd, act,
+ &ev->running_handles);
+ }
+ }
+
+ if(!ev->msbump)
+ /* If nothing updated the timeout, we decrease it by the spent time.
+ * If it was updated, it has the new timeout time stored already.
+ */
+ ev->ms += curlx_tvdiff(after, before);
+
+ }
+ else
+ return CURLE_RECV_ERROR;
+
+ if(mcode)
+ return CURLE_URL_MALFORMAT; /* TODO: return a proper error! */
+
+ /* we don't really care about the "msgs_in_queue" value returned in the
+ second argument */
+ msg = curl_multi_info_read(multi, &pollrc);
+ if(msg) {
+ result = msg->data.result;
+ done = TRUE;
+ }
+ }
+
+ return result;
}
-#else
-/*
- * curl_easy_perform() is the external interface that performs a transfer
- * previously setup.
+
+
+/* easy_events()
+ *
+ * Runs a transfer in a blocking manner using the events-based API
*/
-CURLcode curl_easy_perform(CURL *curl)
+static CURLcode easy_events(CURLM *multi)
{
- struct SessionHandle *data = (struct SessionHandle *)curl;
+ struct events evs= {2, FALSE, 0, NULL, 0};
- if(!data)
- return CURLE_BAD_FUNCTION_ARGUMENT;
+ /* if running event-based, do some further multi inits */
+ events_setup(multi, &evs);
- if( ! (data->share && data->share->hostcache) ) {
- /* this handle is not using a shared dns cache */
+ return wait_or_timeout(multi, &evs);
+}
+#else /* CURLDEBUG */
+/* when not built with debug, this function doesn't exist */
+#define easy_events(x) CURLE_NOT_BUILT_IN
+#endif
- if(data->set.global_dns_cache &&
- (data->dns.hostcachetype != HCACHE_GLOBAL)) {
- /* global dns cache was requested but still isn't */
- struct curl_hash *ptr;
+static CURLcode easy_transfer(CURLM *multi)
+{
+ bool done = FALSE;
+ CURLMcode mcode = CURLM_OK;
+ CURLcode result = CURLE_OK;
+ struct timeval before;
+ int without_fds = 0; /* count number of consecutive returns from
+ curl_multi_wait() without any filedescriptors */
+
+ while(!done && !mcode) {
+ int still_running = 0;
+ int ret;
- if(data->dns.hostcachetype == HCACHE_PRIVATE) {
- /* if the current cache is private, kill it first */
- Curl_hash_destroy(data->dns.hostcache);
- data->dns.hostcachetype = HCACHE_NONE;
- data->dns.hostcache = NULL;
+ before = curlx_tvnow();
+ mcode = curl_multi_wait(multi, NULL, 0, 1000, &ret);
+
+ if(mcode == CURLM_OK) {
+ if(ret == -1) {
+ /* poll() failed not on EINTR, indicate a network problem */
+ result = CURLE_RECV_ERROR;
+ break;
}
+ else if(ret == 0) {
+ struct timeval after = curlx_tvnow();
+ /* If it returns without any filedescriptor instantly, we need to
+ avoid busy-looping during periods where it has nothing particular
+ to wait for */
+ if(curlx_tvdiff(after, before) <= 10) {
+ without_fds++;
+ if(without_fds > 2) {
+ int sleep_ms = without_fds < 10 ? (1 << (without_fds-1)): 1000;
+ Curl_wait_ms(sleep_ms);
+ }
+ }
+ else
+ /* it wasn't "instant", restart counter */
+ without_fds = 0;
+ }
+ else
+ /* got file descriptor, restart counter */
+ without_fds = 0;
+
+ mcode = curl_multi_perform(multi, &still_running);
+ }
- ptr = Curl_global_host_cache_init();
- if(ptr) {
- /* only do this if the global cache init works */
- data->dns.hostcache = ptr;
- data->dns.hostcachetype = HCACHE_GLOBAL;
+ /* only read 'still_running' if curl_multi_perform() return OK */
+ if((mcode == CURLM_OK) && !still_running) {
+ int rc;
+ CURLMsg *msg = curl_multi_info_read(multi, &rc);
+ if(msg) {
+ result = msg->data.result;
+ done = TRUE;
}
}
+ }
- if(!data->dns.hostcache) {
- data->dns.hostcachetype = HCACHE_PRIVATE;
- data->dns.hostcache = Curl_mk_dnscache();
+ /* Make sure to return some kind of error if there was a multi problem */
+ if(mcode) {
+ return (mcode == CURLM_OUT_OF_MEMORY) ? CURLE_OUT_OF_MEMORY :
+ /* The other multi errors should never happen, so return
+ something suitably generic */
+ CURLE_BAD_FUNCTION_ARGUMENT;
+ }
+
+ return result;
+}
- if(!data->dns.hostcache)
- /* While we possibly could survive and do good without a host cache,
- the fact that creating it failed indicates that things are truly
- screwed up and we should bail out! */
- return CURLE_OUT_OF_MEMORY;
- }
+/*
+ * easy_perform() is the external interface that performs a blocking
+ * transfer as previously setup.
+ *
+ * CONCEPT: This function creates a multi handle, adds the easy handle to it,
+ * runs curl_multi_perform() until the transfer is done, then detaches the
+ * easy handle, destroys the multi handle and returns the easy handle's return
+ * code.
+ *
+ * REALITY: it can't just create and destroy the multi handle that easily. It
+ * needs to keep it around since if this easy handle is used again by this
+ * function, the same multi handle must be re-used so that the same pools and
+ * caches can be used.
+ *
+ * DEBUG: if 'events' is set TRUE, this function will use a replacement engine
+ * instead of curl_multi_perform() and use curl_multi_socket_action().
+ */
+static CURLcode easy_perform(struct SessionHandle *data, bool events)
+{
+ CURLM *multi;
+ CURLMcode mcode;
+ CURLcode result = CURLE_OK;
+ SIGPIPE_VARIABLE(pipe_st);
+
+ if(!data)
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+
+ if(data->multi) {
+ failf(data, "easy handle already used in multi handle");
+ return CURLE_FAILED_INIT;
}
- if(!data->state.connc) {
- /* oops, no connection cache, make one up */
- data->state.connc = Curl_mk_connc(CONNCACHE_PRIVATE, -1L);
- if(!data->state.connc)
+ if(data->multi_easy)
+ multi = data->multi_easy;
+ else {
+ /* this multi handle will only ever have a single easy handled attached
+ to it, so make it use minimal hashes */
+ multi = Curl_multi_handle(1, 3);
+ if(!multi)
+ return CURLE_OUT_OF_MEMORY;
+ data->multi_easy = multi;
+ }
+
+ /* Copy the MAXCONNECTS option to the multi handle */
+ curl_multi_setopt(multi, CURLMOPT_MAXCONNECTS, data->set.maxconnects);
+
+ mcode = curl_multi_add_handle(multi, data);
+ if(mcode) {
+ curl_multi_cleanup(multi);
+ if(mcode == CURLM_OUT_OF_MEMORY)
return CURLE_OUT_OF_MEMORY;
+ else
+ return CURLE_FAILED_INIT;
}
- return Curl_perform(data);
+ sigpipe_ignore(data, &pipe_st);
+
+ /* assign this after curl_multi_add_handle() since that function checks for
+ it and rejects this handle otherwise */
+ data->multi = multi;
+
+ /* run the transfer */
+ result = 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! */
+ (void)curl_multi_remove_handle(multi, data);
+
+ sigpipe_restore(&pipe_st);
+
+ /* The multi handle is kept alive, owned by the easy handle */
+ return result;
}
+
+
+/*
+ * curl_easy_perform() is the external interface that performs a blocking
+ * transfer as previously setup.
+ */
+CURLcode curl_easy_perform(CURL *easy)
+{
+ return easy_perform(easy, FALSE);
+}
+
+#ifdef CURLDEBUG
+/*
+ * curl_easy_perform_ev() is the external interface that performs a blocking
+ * transfer using the event-based API internally.
+ */
+CURLcode curl_easy_perform_ev(CURL *easy)
+{
+ return easy_perform(easy, TRUE);
+}
+
#endif
/*
@@ -575,31 +841,14 @@ CURLcode curl_easy_perform(CURL *curl)
void curl_easy_cleanup(CURL *curl)
{
struct SessionHandle *data = (struct SessionHandle *)curl;
+ SIGPIPE_VARIABLE(pipe_st);
if(!data)
return;
+ sigpipe_ignore(data, &pipe_st);
Curl_close(data);
-}
-
-/*
- * Store a pointed to the multi handle within the easy handle's data struct.
- */
-void Curl_easy_addmulti(struct SessionHandle *data,
- void *multi)
-{
- data->multi = multi;
- if(multi == NULL)
- /* the association is cleared, mark the easy handle as not used by an
- interface */
- data->state.used_interface = Curl_if_none;
-}
-
-void Curl_easy_initHandleData(struct SessionHandle *data)
-{
- memset(&data->req, 0, sizeof(struct SingleRequest));
-
- data->req.maxdownload = -1;
+ sigpipe_restore(&pipe_st);
}
/*
@@ -611,12 +860,16 @@ CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...)
{
va_list arg;
void *paramp;
+ CURLcode result;
struct SessionHandle *data = (struct SessionHandle *)curl;
va_start(arg, info);
paramp = va_arg(arg, void *);
- return Curl_getinfo(data, info, paramp);
+ result = Curl_getinfo(data, info, paramp);
+
+ va_end(arg);
+ return result;
}
/*
@@ -626,125 +879,93 @@ CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...)
*/
CURL *curl_easy_duphandle(CURL *incurl)
{
- bool fail = TRUE;
struct SessionHandle *data=(struct SessionHandle *)incurl;
struct SessionHandle *outcurl = calloc(1, sizeof(struct SessionHandle));
-
if(NULL == outcurl)
- return NULL; /* failure */
-
- do {
-
- /*
- * We setup a few buffers we need. We should probably make them
- * get setup on-demand in the code, as that would probably decrease
- * the likeliness of us forgetting to init a buffer here in the future.
- */
- outcurl->state.headerbuff = malloc(HEADERSIZE);
- if(!outcurl->state.headerbuff) {
- break;
- }
- outcurl->state.headersize=HEADERSIZE;
-
- /* copy all userdefined values */
- if(Curl_dupset(outcurl, data) != CURLE_OK)
- break;
-
- /* the connection cache is setup on demand */
- outcurl->state.connc = NULL;
-
- outcurl->state.lastconnect = -1;
-
- outcurl->progress.flags = data->progress.flags;
- outcurl->progress.callback = data->progress.callback;
-
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
- if(data->cookies) {
- /* If cookies are enabled in the parent handle, we enable them
- in the clone as well! */
- outcurl->cookies = Curl_cookie_init(data,
- data->cookies->filename,
- outcurl->cookies,
- data->set.cookiesession);
- if(!outcurl->cookies) {
- break;
- }
- }
-#endif /* CURL_DISABLE_HTTP */
-
- /* duplicate all values in 'change' */
-
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
- if(data->change.cookielist) {
- outcurl->change.cookielist =
- Curl_slist_duplicate(data->change.cookielist);
+ goto fail;
+
+ /*
+ * We setup a few buffers we need. We should probably make them
+ * get setup on-demand in the code, as that would probably decrease
+ * the likeliness of us forgetting to init a buffer here in the future.
+ */
+ outcurl->state.headerbuff = malloc(HEADERSIZE);
+ if(!outcurl->state.headerbuff)
+ goto fail;
+ outcurl->state.headersize = HEADERSIZE;
+
+ /* copy all userdefined values */
+ if(Curl_dupset(outcurl, data))
+ goto fail;
+
+ /* the connection cache is setup on demand */
+ outcurl->state.conn_cache = NULL;
+
+ outcurl->state.lastconnect = NULL;
+
+ outcurl->progress.flags = data->progress.flags;
+ outcurl->progress.callback = data->progress.callback;
+
+ if(data->cookies) {
+ /* If cookies are enabled in the parent handle, we enable them
+ in the clone as well! */
+ outcurl->cookies = Curl_cookie_init(data,
+ data->cookies->filename,
+ outcurl->cookies,
+ data->set.cookiesession);
+ if(!outcurl->cookies)
+ goto fail;
+ }
- if (!outcurl->change.cookielist)
- break;
- }
-#endif /* CURL_DISABLE_HTTP */
+ /* duplicate all values in 'change' */
+ if(data->change.cookielist) {
+ outcurl->change.cookielist =
+ Curl_slist_duplicate(data->change.cookielist);
+ if(!outcurl->change.cookielist)
+ goto fail;
+ }
- if(data->change.url) {
- outcurl->change.url = strdup(data->change.url);
- if(!outcurl->change.url)
- break;
- outcurl->change.url_alloc = TRUE;
- }
+ if(data->change.url) {
+ outcurl->change.url = strdup(data->change.url);
+ if(!outcurl->change.url)
+ goto fail;
+ outcurl->change.url_alloc = TRUE;
+ }
- if(data->change.referer) {
- outcurl->change.referer = strdup(data->change.referer);
- if(!outcurl->change.referer)
- break;
- outcurl->change.referer_alloc = TRUE;
- }
+ if(data->change.referer) {
+ outcurl->change.referer = strdup(data->change.referer);
+ if(!outcurl->change.referer)
+ goto fail;
+ outcurl->change.referer_alloc = TRUE;
+ }
-#ifdef USE_ARES
- /* If we use ares, we clone the ares channel for the new handle */
- if(ARES_SUCCESS != ares_dup(&outcurl->state.areschannel,
- data->state.areschannel))
- break;
-#endif
+ /* Clone the resolver handle, if present, for the new handle */
+ if(Curl_resolver_duphandle(&outcurl->state.resolver,
+ data->state.resolver))
+ goto fail;
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
- outcurl->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
- CURL_ICONV_CODESET_OF_NETWORK);
- outcurl->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
- CURL_ICONV_CODESET_OF_HOST);
- outcurl->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
- CURL_ICONV_CODESET_FOR_UTF8);
-#endif
+ Curl_convert_setup(outcurl);
- Curl_easy_initHandleData(outcurl);
+ outcurl->magic = CURLEASY_MAGIC_NUMBER;
- outcurl->magic = CURLEASY_MAGIC_NUMBER;
+ /* we reach this point and thus we are OK */
- fail = FALSE; /* we reach this point and thus we are OK */
+ return outcurl;
- } while(0);
+ fail:
- if(fail) {
- if(outcurl) {
- if(outcurl->state.connc &&
- (outcurl->state.connc->type == CONNCACHE_PRIVATE))
- Curl_rm_connc(outcurl->state.connc);
- if(outcurl->state.headerbuff)
- free(outcurl->state.headerbuff);
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
- if(outcurl->change.cookielist)
- curl_slist_free_all(outcurl->change.cookielist);
-#endif
- if(outcurl->change.url)
- free(outcurl->change.url);
- if(outcurl->change.referer)
- free(outcurl->change.referer);
- Curl_freeset(outcurl);
- free(outcurl); /* free the memory again */
- outcurl = NULL;
- }
+ if(outcurl) {
+ curl_slist_free_all(outcurl->change.cookielist);
+ outcurl->change.cookielist = NULL;
+ Curl_safefree(outcurl->state.headerbuff);
+ Curl_safefree(outcurl->change.url);
+ Curl_safefree(outcurl->change.referer);
+ Curl_freeset(outcurl);
+ free(outcurl);
}
- return outcurl;
+ return NULL;
}
/*
@@ -756,10 +977,10 @@ void curl_easy_reset(CURL *curl)
struct SessionHandle *data = (struct SessionHandle *)curl;
Curl_safefree(data->state.pathbuffer);
- data->state.pathbuffer=NULL;
- Curl_safefree(data->state.proto.generic);
- data->state.proto.generic=NULL;
+ data->state.path = NULL;
+
+ Curl_free_request_state(data);
/* zero out UserDefined data: */
Curl_freeset(data);
@@ -769,9 +990,6 @@ void curl_easy_reset(CURL *curl)
/* zero out Progress data: */
memset(&data->progress, 0, sizeof(struct Progress));
- /* init Handle data */
- Curl_easy_initHandleData(data);
-
data->progress.flags |= PGRS_HIDE;
data->state.current_speed = -1; /* init to negative == impossible */
}
@@ -803,271 +1021,30 @@ CURLcode curl_easy_pause(CURL *curl, int action)
k->keepon = newstate;
if(!(newstate & KEEP_RECV_PAUSE) && data->state.tempwrite) {
- /* we have a buffer for sending that we now seem to be able to deliver since
- the receive pausing is lifted! */
+ /* we have a buffer for sending that we now seem to be able to deliver
+ since the receive pausing is lifted! */
- /* 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
+ /* get the pointer in local copy since the function may return PAUSE
+ again and then we'll get a new copy allocted and stored in
the tempwrite variables */
char *tempwrite = data->state.tempwrite;
- 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;
-
- /* 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->state.current_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 */
- }
-
- return result;
-}
-
-#ifdef CURL_DOES_CONVERSIONS
-/*
- * Curl_convert_to_network() is an internal function
- * for performing ASCII conversions on non-ASCII platforms.
- */
-CURLcode Curl_convert_to_network(struct SessionHandle *data,
- char *buffer, size_t length)
-{
- CURLcode rc;
-
- if(data->set.convtonetwork) {
- /* use translation callback */
- rc = data->set.convtonetwork(buffer, length);
- if(rc != CURLE_OK) {
- failf(data,
- "CURLOPT_CONV_TO_NETWORK_FUNCTION callback returned %d: %s",
- (int)rc, curl_easy_strerror(rc));
- }
- return(rc);
- }
- else {
-#ifdef HAVE_ICONV
- /* do the translation ourselves */
- char *input_ptr, *output_ptr;
- size_t in_bytes, out_bytes, rc;
- int error;
-
- /* open an iconv conversion descriptor if necessary */
- if(data->outbound_cd == (iconv_t)-1) {
- data->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
- CURL_ICONV_CODESET_OF_HOST);
- if(data->outbound_cd == (iconv_t)-1) {
- error = ERRNO;
- failf(data,
- "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
- CURL_ICONV_CODESET_OF_NETWORK,
- CURL_ICONV_CODESET_OF_HOST,
- error, strerror(error));
- return CURLE_CONV_FAILED;
- }
- }
- /* call iconv */
- input_ptr = output_ptr = buffer;
- in_bytes = out_bytes = length;
- rc = iconv(data->outbound_cd, (const char**)&input_ptr, &in_bytes,
- &output_ptr, &out_bytes);
- if((rc == ICONV_ERROR) || (in_bytes != 0)) {
- error = ERRNO;
- failf(data,
- "The Curl_convert_to_network iconv call failed with errno %i: %s",
- error, strerror(error));
- return CURLE_CONV_FAILED;
- }
-#else
- failf(data, "CURLOPT_CONV_TO_NETWORK_FUNCTION callback required");
- return CURLE_CONV_REQD;
-#endif /* HAVE_ICONV */
- }
-
- return CURLE_OK;
-}
-
-/*
- * Curl_convert_from_network() is an internal function
- * for performing ASCII conversions on non-ASCII platforms.
- */
-CURLcode Curl_convert_from_network(struct SessionHandle *data,
- char *buffer, size_t length)
-{
- CURLcode rc;
-
- if(data->set.convfromnetwork) {
- /* use translation callback */
- rc = data->set.convfromnetwork(buffer, length);
- if(rc != CURLE_OK) {
- failf(data,
- "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback returned %d: %s",
- (int)rc, curl_easy_strerror(rc));
- }
- return(rc);
- }
- else {
-#ifdef HAVE_ICONV
- /* do the translation ourselves */
- char *input_ptr, *output_ptr;
- size_t in_bytes, out_bytes, rc;
- int error;
-
- /* open an iconv conversion descriptor if necessary */
- if(data->inbound_cd == (iconv_t)-1) {
- data->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
- CURL_ICONV_CODESET_OF_NETWORK);
- if(data->inbound_cd == (iconv_t)-1) {
- error = ERRNO;
- failf(data,
- "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
- CURL_ICONV_CODESET_OF_HOST,
- CURL_ICONV_CODESET_OF_NETWORK,
- error, strerror(error));
- return CURLE_CONV_FAILED;
- }
- }
- /* call iconv */
- input_ptr = output_ptr = buffer;
- in_bytes = out_bytes = length;
- rc = iconv(data->inbound_cd, (const char **)&input_ptr, &in_bytes,
- &output_ptr, &out_bytes);
- if((rc == ICONV_ERROR) || (in_bytes != 0)) {
- error = ERRNO;
- failf(data,
- "The Curl_convert_from_network iconv call failed with errno %i: %s",
- error, strerror(error));
- return CURLE_CONV_FAILED;
- }
-#else
- failf(data, "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback required");
- return CURLE_CONV_REQD;
-#endif /* HAVE_ICONV */
+ data->state.tempwrite = NULL;
+ result = Curl_client_chop_write(data->easy_conn, data->state.tempwritetype,
+ tempwrite, data->state.tempwritesize);
+ free(tempwrite);
}
- return CURLE_OK;
-}
-
-/*
- * Curl_convert_from_utf8() is an internal function
- * for performing UTF-8 conversions on non-ASCII platforms.
- */
-CURLcode Curl_convert_from_utf8(struct SessionHandle *data,
- char *buffer, size_t length)
-{
- CURLcode rc;
-
- if(data->set.convfromutf8) {
- /* use translation callback */
- rc = data->set.convfromutf8(buffer, length);
- if(rc != CURLE_OK) {
- failf(data,
- "CURLOPT_CONV_FROM_UTF8_FUNCTION callback returned %d: %s",
- (int)rc, curl_easy_strerror(rc));
- }
- return(rc);
- }
- else {
-#ifdef HAVE_ICONV
- /* do the translation ourselves */
- const char *input_ptr;
- char *output_ptr;
- size_t in_bytes, out_bytes, rc;
- int error;
-
- /* open an iconv conversion descriptor if necessary */
- if(data->utf8_cd == (iconv_t)-1) {
- data->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
- CURL_ICONV_CODESET_FOR_UTF8);
- if(data->utf8_cd == (iconv_t)-1) {
- error = ERRNO;
- failf(data,
- "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
- CURL_ICONV_CODESET_OF_HOST,
- CURL_ICONV_CODESET_FOR_UTF8,
- error, strerror(error));
- return CURLE_CONV_FAILED;
- }
- }
- /* call iconv */
- input_ptr = output_ptr = buffer;
- in_bytes = out_bytes = length;
- rc = iconv(data->utf8_cd, &input_ptr, &in_bytes,
- &output_ptr, &out_bytes);
- if((rc == ICONV_ERROR) || (in_bytes != 0)) {
- error = ERRNO;
- failf(data,
- "The Curl_convert_from_utf8 iconv call failed with errno %i: %s",
- error, strerror(error));
- return CURLE_CONV_FAILED;
- }
- if(output_ptr < input_ptr) {
- /* null terminate the now shorter output string */
- *output_ptr = 0x00;
- }
-#else
- failf(data, "CURLOPT_CONV_FROM_UTF8_FUNCTION callback required");
- return CURLE_CONV_REQD;
-#endif /* HAVE_ICONV */
- }
+ /* if there's no error and we're not pausing both directions, we want
+ to have this handle checked soon */
+ if(!result &&
+ ((newstate&(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
+ (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) )
+ Curl_expire(data, 1); /* get this handle going again */
- return CURLE_OK;
+ return result;
}
-#endif /* CURL_DOES_CONVERSIONS */
static CURLcode easy_connection(struct SessionHandle *data,
curl_socket_t *sfd,
@@ -1100,20 +1077,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 ret;
+ CURLcode result;
ssize_t n1;
struct connectdata *c;
struct SessionHandle *data = (struct SessionHandle *)curl;
- ret = easy_connection(data, &sfd, &c);
- if(ret)
- return ret;
+ result = easy_connection(data, &sfd, &c);
+ if(result)
+ return result;
*n = 0;
- ret = Curl_read(c, sfd, buffer, buflen, &n1);
+ result = Curl_read(c, sfd, buffer, buflen, &n1);
- if(ret != CURLE_OK)
- return ret;
+ if(result)
+ return result;
*n = (size_t)n1;
@@ -1128,26 +1105,26 @@ CURLcode curl_easy_send(CURL *curl, const void *buffer, size_t buflen,
size_t *n)
{
curl_socket_t sfd;
- CURLcode ret;
+ CURLcode result;
ssize_t n1;
struct connectdata *c = NULL;
struct SessionHandle *data = (struct SessionHandle *)curl;
- ret = easy_connection(data, &sfd, &c);
- if(ret)
- return ret;
+ result = easy_connection(data, &sfd, &c);
+ if(result)
+ return result;
*n = 0;
- ret = Curl_write(c, sfd, buffer, buflen, &n1);
+ result = Curl_write(c, sfd, buffer, buflen, &n1);
if(n1 == -1)
return CURLE_SEND_ERROR;
/* detect EAGAIN */
- if((CURLE_OK == ret) && (0 == n1))
+ if(!result && !n1)
return CURLE_AGAIN;
*n = (size_t)n1;
- return ret;
+ return result;
}
diff --git a/lib/easyif.h b/lib/easyif.h
index 8a0a51cc..043ff437 100644
--- a/lib/easyif.h
+++ b/lib/easyif.h
@@ -1,5 +1,5 @@
-#ifndef __EASYIF_H
-#define __EASYIF_H
+#ifndef HEADER_CURL_EASYIF_H
+#define HEADER_CURL_EASYIF_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,15 +25,9 @@
/*
* Prototypes for library-wide functions provided by easy.c
*/
-void Curl_easy_addmulti(struct SessionHandle *data, void *multi);
+#ifdef CURLDEBUG
+CURL_EXTERN CURLcode curl_easy_perform_ev(CURL *easy);
+#endif
-void Curl_easy_initHandleData(struct SessionHandle *data);
+#endif /* HEADER_CURL_EASYIF_H */
-CURLcode Curl_convert_to_network(struct SessionHandle *data,
- char *buffer, size_t length);
-CURLcode Curl_convert_from_network(struct SessionHandle *data,
- char *buffer, size_t length);
-CURLcode Curl_convert_from_utf8(struct SessionHandle *data,
- char *buffer, size_t length);
-
-#endif /* __EASYIF_H */
diff --git a/lib/escape.c b/lib/escape.c
index 735e1d8a..24abb930 100644
--- a/lib/escape.c
+++ b/lib/escape.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,23 +23,18 @@
/* Escape and unescape URL encoding in strings. The functions return a new
* allocated string or NULL if an error occurred. */
-#include "setup.h"
-#include <ctype.h>
+#include "curl_setup.h"
+
#include <curl/curl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "curl_memory.h"
-/* urldata.h and easyif.h are included for Curl_convert_... prototypes */
#include "urldata.h"
-#include "easyif.h"
#include "warnless.h"
+#include "non-ascii.h"
+#include "escape.h"
+#include "curl_printf.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
/* Portable character check (remember EBCDIC). Do not use isalnum() because
@@ -88,13 +83,10 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
char *testing_ptr = NULL;
unsigned char in; /* we need to treat the characters unsigned */
size_t newlen = alloc;
- int strindex=0;
+ size_t strindex=0;
size_t length;
+ CURLcode result;
-#ifndef CURL_DOES_CONVERSIONS
- /* avoid compiler warnings */
- (void)handle;
-#endif
ns = malloc(alloc);
if(!ns)
return NULL;
@@ -103,10 +95,9 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
while(length--) {
in = *string;
- if (Curl_isunreserved(in)) {
+ if(Curl_isunreserved(in))
/* just copy this */
ns[strindex++]=in;
- }
else {
/* encode it */
newlen += 2; /* the size grows with two, since this'll become a %XX */
@@ -122,15 +113,12 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
}
}
-#ifdef CURL_DOES_CONVERSIONS
-/* escape sequences are always in ASCII so convert them on non-ASCII hosts */
- if(!handle ||
- (Curl_convert_to_network(handle, &in, 1) != CURLE_OK)) {
+ result = Curl_convert_to_network(handle, &in, 1);
+ if(result) {
/* Curl_convert_to_network calls failf if unsuccessful */
free(ns);
return NULL;
}
-#endif /* CURL_DOES_CONVERSIONS */
snprintf(&ns[strindex], 4, "%%%02X", in);
@@ -143,30 +131,34 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
}
/*
- * Unescapes the given URL escaped string of given length. Returns a
- * pointer to a malloced string with length given in *olen.
- * If length == 0, the length is assumed to be strlen(string).
- * If olen == NULL, no output length is stored.
+ * Curl_urldecode() URL decodes the given string.
+ *
+ * Optionally detects control characters (byte codes lower than 32) in the
+ * data and rejects such data.
+ *
+ * Returns a pointer to a malloced string in *ostring with length given in
+ * *olen. If length == 0, the length is assumed to be strlen(string).
+ *
*/
-char *curl_easy_unescape(CURL *handle, const char *string, int length,
- int *olen)
+CURLcode Curl_urldecode(struct SessionHandle *data,
+ const char *string, size_t length,
+ char **ostring, size_t *olen,
+ bool reject_ctrl)
{
- int alloc = (length?length:(int)strlen(string))+1;
+ size_t alloc = (length?length:strlen(string))+1;
char *ns = malloc(alloc);
unsigned char in;
- int strindex=0;
+ size_t strindex=0;
unsigned long hex;
+ CURLcode result;
-#ifndef CURL_DOES_CONVERSIONS
- /* avoid compiler warnings */
- (void)handle;
-#endif
- if( !ns )
- return NULL;
+ if(!ns)
+ return CURLE_OUT_OF_MEMORY;
while(--alloc > 0) {
in = *string;
- if(('%' == in) && ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
+ if(('%' == in) && (alloc > 2) &&
+ ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
/* this is two hexadecimal digits following a '%' */
char hexstr[3];
char *ptr;
@@ -178,20 +170,22 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
in = curlx_ultouc(hex); /* this long is never bigger than 255 anyway */
-#ifdef CURL_DOES_CONVERSIONS
-/* escape sequences are always in ASCII so convert them on non-ASCII hosts */
- if(!handle ||
- (Curl_convert_from_network(handle, &in, 1) != CURLE_OK)) {
+ result = Curl_convert_from_network(data, &in, 1);
+ if(result) {
/* Curl_convert_from_network calls failf if unsuccessful */
free(ns);
- return NULL;
+ return result;
}
-#endif /* CURL_DOES_CONVERSIONS */
string+=2;
alloc-=2;
}
+ if(reject_ctrl && (in < 0x20)) {
+ free(ns);
+ return CURLE_URL_MALFORMAT;
+ }
+
ns[strindex++] = in;
string++;
}
@@ -200,7 +194,32 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
if(olen)
/* store output size */
*olen = strindex;
- return ns;
+
+ /* store output string */
+ *ostring = ns;
+
+ return CURLE_OK;
+}
+
+/*
+ * Unescapes the given URL escaped string of given length. Returns a
+ * pointer to a malloced string with length given in *olen.
+ * If length == 0, the length is assumed to be strlen(string).
+ * If olen == NULL, no output length is stored.
+ */
+char *curl_easy_unescape(CURL *handle, const char *string, int length,
+ int *olen)
+{
+ char *str = NULL;
+ size_t inputlen = length;
+ size_t outputlen;
+ CURLcode res = Curl_urldecode(handle, string, inputlen, &str, &outputlen,
+ FALSE);
+ if(res)
+ return NULL;
+ if(olen)
+ *olen = curlx_uztosi(outputlen);
+ return str;
}
/* For operating systems/environments that use different malloc/free
@@ -208,6 +227,5 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
the library's memory system */
void curl_free(void *p)
{
- if(p)
- free(p);
+ free(p);
}
diff --git a/lib/escape.h b/lib/escape.h
index 04b06a97..731b1365 100644
--- a/lib/escape.h
+++ b/lib/escape.h
@@ -1,6 +1,5 @@
-#ifndef __ESCAPE_H
-#define __ESCAPE_H
-
+#ifndef HEADER_CURL_ESCAPE_H
+#define HEADER_CURL_ESCAPE_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -8,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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,5 +24,10 @@
/* Escape and unescape URL encoding in strings. The functions return a new
* allocated string or NULL if an error occurred. */
+CURLcode Curl_urldecode(struct SessionHandle *data,
+ const char *string, size_t length,
+ char **ostring, size_t *olen,
+ bool reject_crlf);
+
+#endif /* HEADER_CURL_ESCAPE_H */
-#endif
diff --git a/lib/file.c b/lib/file.c
index 91176aa1..175b1073 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,33 +20,13 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FILE
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#include <fcntl.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
@@ -68,8 +48,6 @@
#include <fcntl.h>
#endif
-#endif /* WIN32 */
-
#include "strtoofft.h"
#include "urldata.h"
#include <curl/curl.h>
@@ -81,16 +59,16 @@
#include "getinfo.h"
#include "transfer.h"
#include "url.h"
-#include "curl_memory.h"
#include "parsedate.h" /* for the week day and month names */
+#include "warnless.h"
+#include "curl_printf.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
-#if defined(WIN32) || defined(MSDOS) || defined(__EMX__) || defined(__SYMBIAN32__)
+#if defined(WIN32) || defined(MSDOS) || defined(__EMX__) || \
+ defined(__SYMBIAN32__)
#define DOS_FILESYSTEM 1
#endif
@@ -108,6 +86,9 @@ static CURLcode file_do(struct connectdata *, bool *done);
static CURLcode file_done(struct connectdata *conn,
CURLcode status, bool premature);
static CURLcode file_connect(struct connectdata *conn, bool *done);
+static CURLcode file_disconnect(struct connectdata *conn,
+ bool dead_connection);
+static CURLcode file_setup_connection(struct connectdata *conn);
/*
* FILE scheme handler.
@@ -115,7 +96,7 @@ static CURLcode file_connect(struct connectdata *conn, bool *done);
const struct Curl_handler Curl_handler_file = {
"FILE", /* scheme */
- ZERO_NULL, /* setup_connection */
+ file_setup_connection, /* setup_connection */
file_do, /* do_it */
file_done, /* done */
ZERO_NULL, /* do_more */
@@ -124,13 +105,26 @@ const struct Curl_handler Curl_handler_file = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
- ZERO_NULL, /* disconnect */
+ file_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
0, /* defport */
- PROT_FILE /* protocol */
+ CURLPROTO_FILE, /* protocol */
+ PROTOPT_NONETWORK | PROTOPT_NOURLQUERY /* flags */
};
+static CURLcode file_setup_connection(struct connectdata *conn)
+{
+ /* allocate the FILE specific struct */
+ conn->data->req.protop = calloc(1, sizeof(struct FILEPROTO));
+ if(!conn->data->req.protop)
+ return CURLE_OUT_OF_MEMORY;
+
+ return CURLE_OK;
+}
+
/*
Check if this is a range download, and if so, set the internal variables
properly. This code is copied from the FTP implementation and might as
@@ -146,7 +140,7 @@ static CURLcode file_range(struct connectdata *conn)
if(data->state.use_range && data->state.range) {
from=curlx_strtoofft(data->state.range, &ptr, 0);
- while(*ptr && (isspace((int)*ptr) || (*ptr=='-')))
+ while(*ptr && (ISSPACE(*ptr) || (*ptr=='-')))
ptr++;
to=curlx_strtoofft(ptr, &ptr2, 0);
if(ptr == ptr2) {
@@ -156,14 +150,14 @@ static CURLcode file_range(struct connectdata *conn)
if((-1 == to) && (from>=0)) {
/* X - */
data->state.resume_from = from;
- DEBUGF(infof(data, "RANGE %" FORMAT_OFF_T " to end of file\n",
+ DEBUGF(infof(data, "RANGE %" CURL_FORMAT_CURL_OFF_T " to end of file\n",
from));
}
else if(from < 0) {
/* -Y */
data->req.maxdownload = -from;
data->state.resume_from = from;
- DEBUGF(infof(data, "RANGE the last %" FORMAT_OFF_T " bytes\n",
+ DEBUGF(infof(data, "RANGE the last %" CURL_FORMAT_CURL_OFF_T " bytes\n",
-from));
}
else {
@@ -171,12 +165,13 @@ static CURLcode file_range(struct connectdata *conn)
totalsize = to-from;
data->req.maxdownload = totalsize+1; /* include last byte */
data->state.resume_from = from;
- DEBUGF(infof(data, "RANGE from %" FORMAT_OFF_T
- " getting %" FORMAT_OFF_T " bytes\n",
+ DEBUGF(infof(data, "RANGE from %" CURL_FORMAT_CURL_OFF_T
+ " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n",
from, data->req.maxdownload));
}
- DEBUGF(infof(data, "range-download from %" FORMAT_OFF_T
- " to %" FORMAT_OFF_T ", totally %" FORMAT_OFF_T " bytes\n",
+ DEBUGF(infof(data, "range-download from %" CURL_FORMAT_CURL_OFF_T
+ " to %" CURL_FORMAT_CURL_OFF_T ", totally %"
+ CURL_FORMAT_CURL_OFF_T " bytes\n",
from, to, data->req.maxdownload));
}
else
@@ -192,40 +187,19 @@ static CURLcode file_range(struct connectdata *conn)
static CURLcode file_connect(struct connectdata *conn, bool *done)
{
struct SessionHandle *data = conn->data;
- char *real_path = curl_easy_unescape(data, data->state.path, 0, NULL);
- struct FILEPROTO *file;
+ char *real_path;
+ struct FILEPROTO *file = data->req.protop;
int fd;
#ifdef DOS_FILESYSTEM
int i;
char *actual_path;
#endif
+ int real_path_len;
+ real_path = curl_easy_unescape(data, data->state.path, 0, &real_path_len);
if(!real_path)
return CURLE_OUT_OF_MEMORY;
- /* If there already is a protocol-specific struct allocated for this
- sessionhandle, deal with it */
- Curl_reset_reqproto(conn);
-
- if(!data->state.proto.file) {
- file = calloc(1, sizeof(struct FILEPROTO));
- if(!file) {
- free(real_path);
- return CURLE_OUT_OF_MEMORY;
- }
- data->state.proto.file = file;
- }
- else {
- /* file is not a protocol that can deal with "persistancy" */
- file = data->state.proto.file;
- Curl_safefree(file->freepath);
- if(file->fd != -1)
- close(file->fd);
- file->path = NULL;
- file->freepath = NULL;
- file->fd = -1;
- }
-
#ifdef DOS_FILESYSTEM
/* If the first character is a slash, and there's
something that looks like a drive at the beginning of
@@ -244,20 +218,26 @@ static CURLcode file_connect(struct connectdata *conn, bool *done)
actual_path = real_path;
if((actual_path[0] == '/') &&
actual_path[1] &&
- (actual_path[2] == ':' || actual_path[2] == '|'))
- {
+ (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; actual_path[i] != '\0'; ++i)
+ for(i=0; i < real_path_len; ++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); /* no CR/LF translation */
+ 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
@@ -277,13 +257,34 @@ static CURLcode file_connect(struct connectdata *conn, bool *done)
static CURLcode file_done(struct connectdata *conn,
CURLcode status, bool premature)
{
- struct FILEPROTO *file = conn->data->state.proto.file;
+ struct FILEPROTO *file = conn->data->req.protop;
(void)status; /* not used */
(void)premature; /* not used */
- Curl_safefree(file->freepath);
- if(file->fd != -1)
- close(file->fd);
+ if(file) {
+ Curl_safefree(file->freepath);
+ file->path = NULL;
+ if(file->fd != -1)
+ close(file->fd);
+ file->fd = -1;
+ }
+
+ return CURLE_OK;
+}
+
+static CURLcode file_disconnect(struct connectdata *conn,
+ bool dead_connection)
+{
+ struct FILEPROTO *file = conn->data->req.protop;
+ (void)dead_connection; /* not used */
+
+ if(file) {
+ Curl_safefree(file->freepath);
+ file->path = NULL;
+ if(file->fd != -1)
+ close(file->fd);
+ file->fd = -1;
+ }
return CURLE_OK;
}
@@ -296,10 +297,11 @@ static CURLcode file_done(struct connectdata *conn,
static CURLcode file_upload(struct connectdata *conn)
{
- struct FILEPROTO *file = conn->data->state.proto.file;
+ struct FILEPROTO *file = conn->data->req.protop;
const char *dir = strchr(file->path, DIRSEP);
- FILE *fp;
- CURLcode res=CURLE_OK;
+ int fd;
+ int mode;
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
char *buf = data->state.buffer;
size_t nread;
@@ -313,49 +315,39 @@ static CURLcode file_upload(struct connectdata *conn)
* Since FILE: doesn't do the full init, we need to provide some extra
* assignments here.
*/
- conn->fread_func = data->set.fread_func;
- conn->fread_in = data->set.in;
conn->data->req.upload_fromhere = buf;
if(!dir)
return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */
if(!dir[1])
- return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */
-
- if(data->state.resume_from)
- fp = fopen( file->path, "ab" );
- else {
- int fd;
+ return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */
-#ifdef DOS_FILESYSTEM
- fd = open(file->path, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY,
- conn->data->set.new_file_perms);
+#ifdef O_BINARY
+#define MODE_DEFAULT O_WRONLY|O_CREAT|O_BINARY
#else
- fd = open(file->path, O_WRONLY|O_CREAT|O_TRUNC,
- conn->data->set.new_file_perms);
+#define MODE_DEFAULT O_WRONLY|O_CREAT
#endif
- if(fd < 0) {
- failf(data, "Can't open %s for writing", file->path);
- return CURLE_WRITE_ERROR;
- }
- close(fd);
- fp = fopen(file->path, "wb");
- }
- if(!fp) {
+ if(data->state.resume_from)
+ mode = MODE_DEFAULT|O_APPEND;
+ else
+ mode = MODE_DEFAULT|O_TRUNC;
+
+ fd = open(file->path, mode, conn->data->set.new_file_perms);
+ if(fd < 0) {
failf(data, "Can't open %s for writing", file->path);
return CURLE_WRITE_ERROR;
}
- if(-1 != data->set.infilesize)
+ if(-1 != data->state.infilesize)
/* known size of data to "upload" */
- Curl_pgrsSetUploadSize(data, data->set.infilesize);
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
/* treat the negative resume offset value as the case of "-" */
if(data->state.resume_from < 0) {
- if(fstat(fileno(fp), &file_stat)) {
- fclose(fp);
+ if(fstat(fd, &file_stat)) {
+ close(fd);
failf(data, "Can't get the size of %s", file->path);
return CURLE_WRITE_ERROR;
}
@@ -363,10 +355,10 @@ static CURLcode file_upload(struct connectdata *conn)
data->state.resume_from = (curl_off_t)file_stat.st_size;
}
- while(res == CURLE_OK) {
+ while(!result) {
int readcount;
- res = Curl_fillreadbuffer(conn, BUFSIZE, &readcount);
- if(res)
+ result = Curl_fillreadbuffer(conn, BUFSIZE, &readcount);
+ if(result)
break;
if(readcount <= 0) /* fix questionable compare error. curlvms */
@@ -376,7 +368,7 @@ static CURLcode file_upload(struct connectdata *conn)
/*skip bytes before resume point*/
if(data->state.resume_from) {
- if( (curl_off_t)nread <= data->state.resume_from ) {
+ if((curl_off_t)nread <= data->state.resume_from ) {
data->state.resume_from -= nread;
nread = 0;
buf2 = buf;
@@ -391,9 +383,9 @@ static CURLcode file_upload(struct connectdata *conn)
buf2 = buf;
/* write the data to the target */
- nwrite = fwrite(buf2, 1, nread, fp);
+ nwrite = write(fd, buf2, nread);
if(nwrite != nread) {
- res = CURLE_SEND_ERROR;
+ result = CURLE_SEND_ERROR;
break;
}
@@ -402,16 +394,16 @@ static CURLcode file_upload(struct connectdata *conn)
Curl_pgrsSetUploadCounter(data, bytecount);
if(Curl_pgrsUpdate(conn))
- res = CURLE_ABORTED_BY_CALLBACK;
+ result = CURLE_ABORTED_BY_CALLBACK;
else
- res = Curl_speedcheck(data, now);
+ result = Curl_speedcheck(data, now);
}
- if(!res && Curl_pgrsUpdate(conn))
- res = CURLE_ABORTED_BY_CALLBACK;
+ if(!result && Curl_pgrsUpdate(conn))
+ result = CURLE_ABORTED_BY_CALLBACK;
- fclose(fp);
+ close(fd);
- return res;
+ return result;
}
/*
@@ -429,19 +421,19 @@ 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 res = CURLE_OK;
+ CURLcode result = 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' */
curl_off_t expected_size=0;
bool fstated=FALSE;
ssize_t nread;
- size_t bytestoread;
struct SessionHandle *data = conn->data;
char *buf = data->state.buffer;
curl_off_t bytecount = 0;
int fd;
struct timeval now = Curl_tvnow();
+ struct FILEPROTO *file;
*done = TRUE; /* unconditionally */
@@ -451,11 +443,13 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
if(data->set.upload)
return file_upload(conn);
+ file = conn->data->req.protop;
+
/* get the fd from the connection phase */
- fd = conn->data->state.proto.file->fd;
+ fd = file->fd;
/* VMS: This only works reliable for STREAMLF files */
- if( -1 != fstat(fd, &statbuf)) {
+ if(-1 != fstat(fd, &statbuf)) {
/* we could stat it, then read out the size */
expected_size = statbuf.st_size;
/* and store the modification time */
@@ -463,13 +457,19 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
fstated = TRUE;
}
+ if(fstated && !data->state.range && data->set.timecondition) {
+ if(!Curl_meets_timecondition(data, (time_t)data->info.filetime)) {
+ *done = TRUE;
+ return CURLE_OK;
+ }
+ }
+
/* If we have selected NOBODY and HEADER, it means that we only want file
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: %" FORMAT_OFF_T "\r\n", expected_size);
+ "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", expected_size);
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
if(result)
return result;
@@ -480,14 +480,13 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
return result;
if(fstated) {
- const struct tm *tm;
time_t filetime = (time_t)statbuf.st_mtime;
-#ifdef HAVE_GMTIME_R
struct tm buffer;
- tm = (const struct tm *)gmtime_r(&filetime, &buffer);
-#else
- tm = gmtime(&filetime);
-#endif
+ const struct tm *tm = &buffer;
+ result = Curl_gmtime(filetime, &buffer);
+ if(result)
+ return result;
+
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
snprintf(buf, BUFSIZE-1,
"Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",
@@ -529,7 +528,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
}
/* A high water mark has been specified so we obey... */
- if (data->req.maxdownload > 0)
+ if(data->req.maxdownload > 0)
expected_size = data->req.maxdownload;
if(fstated && (expected_size == 0))
@@ -550,35 +549,38 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
Curl_pgrsTime(data, TIMER_STARTTRANSFER);
- while(res == CURLE_OK) {
+ while(!result) {
/* Don't fill a whole buffer if we want less than all data */
- bytestoread = (expected_size < BUFSIZE-1)?(size_t)expected_size:BUFSIZE-1;
+ size_t bytestoread =
+ (expected_size < CURL_OFF_T_C(BUFSIZE) - CURL_OFF_T_C(1)) ?
+ curlx_sotouz(expected_size) : BUFSIZE - 1;
+
nread = read(fd, buf, bytestoread);
- if( nread > 0)
+ if(nread > 0)
buf[nread] = 0;
- if (nread <= 0 || expected_size == 0)
+ if(nread <= 0 || expected_size == 0)
break;
bytecount += nread;
expected_size -= nread;
- res = Curl_client_write(conn, CLIENTWRITE_BODY, buf, nread);
- if(res)
- return res;
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, buf, nread);
+ if(result)
+ return result;
Curl_pgrsSetDownloadCounter(data, bytecount);
if(Curl_pgrsUpdate(conn))
- res = CURLE_ABORTED_BY_CALLBACK;
+ result = CURLE_ABORTED_BY_CALLBACK;
else
- res = Curl_speedcheck(data, now);
+ result = Curl_speedcheck(data, now);
}
if(Curl_pgrsUpdate(conn))
- res = CURLE_ABORTED_BY_CALLBACK;
+ result = CURLE_ABORTED_BY_CALLBACK;
- return res;
+ return result;
}
#endif
diff --git a/lib/file.h b/lib/file.h
index 5e3bd756..997474bc 100644
--- a/lib/file.h
+++ b/lib/file.h
@@ -1,6 +1,5 @@
-#ifndef __FILE_H
-#define __FILE_H
-
+#ifndef HEADER_CURL_FILE_H
+#define HEADER_CURL_FILE_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -37,4 +36,6 @@ struct FILEPROTO {
#ifndef CURL_DISABLE_FILE
extern const struct Curl_handler Curl_handler_file;
#endif
-#endif
+
+#endif /* HEADER_CURL_FILE_H */
+
diff --git a/lib/fileinfo.c b/lib/fileinfo.c
index f5dbfce4..0904937a 100644
--- a/lib/fileinfo.c
+++ b/lib/fileinfo.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2010 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,15 +20,10 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#include <stdlib.h>
#include "strdup.h"
#include "fileinfo.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -49,27 +44,7 @@ void Curl_fileinfo_dtor(void *user, void *element)
if(!finfo)
return;
- if(finfo->b_data){
- free(finfo->b_data);
- }
+ Curl_safefree(finfo->b_data);
free(finfo);
}
-
-struct curl_fileinfo *Curl_fileinfo_dup(const struct curl_fileinfo *src)
-{
- struct curl_fileinfo *ptr = malloc(sizeof(struct curl_fileinfo));
- if(!ptr)
- return NULL;
- *ptr = *src;
-
- ptr->b_data = malloc(src->b_size);
- if(!ptr->b_data) {
- free(ptr);
- return NULL;
- }
- else {
- memcpy(ptr->b_data, src->b_data, src->b_size);
- return ptr;
- }
-}
diff --git a/lib/firefox-db2pem.sh b/lib/firefox-db2pem.sh
index 14ac5760..3f5fe75f 100644
--- a/lib/firefox-db2pem.sh
+++ b/lib/firefox-db2pem.sh
@@ -6,7 +6,7 @@
# * | (__| |_| | _ <| |___
# * \___|\___/|_| \_\_____|
# *
-# * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 @@
# It extracts all ca certs it finds in the local Firefox database and converts
# them all into PEM format.
#
-db=`ls -1d $HOME/.mozilla/firefox/*default`
+db=`ls -1d $HOME/.mozilla/firefox/*default*`
out=$1
if test -z "$out"; then
diff --git a/lib/formdata.c b/lib/formdata.c
index c98246e2..9e8ce4ea 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,126 +20,35 @@
*
***************************************************************************/
-/*
- Debug the form generator stand-alone by compiling this source file with:
-
- gcc -DHAVE_CONFIG_H -I../ -g -D_FORM_DEBUG -DCURLDEBUG -o formdata \
- -I../include formdata.c strequal.c memdebug.c mprintf.c strerror.c
-
- (depending on circumstances you may need further externals added)
-
- run the 'formdata' executable the output should end with:
- All Tests seem to have worked ...
- and the following parts should be there:
-
-Content-Disposition: form-data; name="simple_COPYCONTENTS"
-value for simple COPYCONTENTS
-
-Content-Disposition: form-data; name="COPYCONTENTS_+_CONTENTTYPE"
-Content-Type: image/gif
-value for COPYCONTENTS + CONTENTTYPE
-
-Content-Disposition: form-data; name="PRNAME_+_NAMELENGTH_+_COPYNAME_+_CONTENTSLENGTH"
-vlue for PTRNAME + NAMELENGTH + COPYNAME + CONTENTSLENGTH
-(or you might see P^@RNAME and v^@lue at the start)
-
-Content-Disposition: form-data; name="simple_PTRCONTENTS"
-value for simple PTRCONTENTS
-
-Content-Disposition: form-data; name="PTRCONTENTS_+_CONTENTSLENGTH"
-vlue for PTRCONTENTS + CONTENTSLENGTH
-(or you might see v^@lue at the start)
-
-Content-Disposition: form-data; name="PTRCONTENTS_+_CONTENTSLENGTH_+_CONTENTTYPE"
-Content-Type: application/octet-stream
-vlue for PTRCONTENTS + CONTENTSLENGTH + CONTENTTYPE
-(or you might see v^@lue at the start)
-
-Content-Disposition: form-data; name="FILE1_+_CONTENTTYPE"; filename="formdata.h"
-Content-Type: text/html
-...
-
-Content-Disposition: form-data; name="FILE1_+_FILE2"
-Content-Type: multipart/mixed, boundary=curlz1s0dkticx49MV1KGcYP5cvfSsz
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="Makefile.b32"
-Content-Type: application/octet-stream
-...
-
-Content-Disposition: form-data; name="FILE1_+_FILE2_+_FILE3"
-Content-Type: multipart/mixed, boundary=curlirkYPmPwu6FrJ1vJ1u1BmtIufh1
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="Makefile.b32"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-
-
-Content-Disposition: form-data; name="ARRAY: FILE1_+_FILE2_+_FILE3"
-Content-Type: multipart/mixed, boundary=curlirkYPmPwu6FrJ1vJ1u1BmtIufh1
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="Makefile.b32"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-
-Content-Disposition: form-data; name="FILECONTENT"
-...
-
- */
+#include "curl_setup.h"
-#include "setup.h"
#include <curl/curl.h>
-/* Length of the random boundary string. */
-#define BOUNDARY_LENGTH 40
-
-#if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY)
+#ifndef CURL_DISABLE_HTTP
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <time.h>
#if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
#include <libgen.h>
#endif
+
#include "urldata.h" /* for struct SessionHandle */
-#include "easyif.h" /* for Curl_convert_... prototypes */
#include "formdata.h"
-#include "curl_rand.h"
+#include "vtls/vtls.h"
#include "strequal.h"
-#include "curl_memory.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "sendf.h"
+#include "strdup.h"
+#include "curl_printf.h"
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#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))
#endif
static size_t readfromfile(struct Form *form, char *buffer, size_t size);
+static char *formboundary(struct SessionHandle *data);
/* What kind of Content-Type to use on un-specified files with unrecognized
extensions. */
@@ -240,8 +149,6 @@ static FormInfo * AddFormInfo(char *value,
/* then move the original 'more' to point to ourselves */
parent_form_info->more = form_info;
}
- else
- return NULL;
return form_info;
}
@@ -256,8 +163,8 @@ static FormInfo * AddFormInfo(char *value,
* Returns some valid contenttype for filename.
*
***************************************************************************/
-static const char * ContentTypeForFilename (const char *filename,
- const char *prevtype)
+static const char *ContentTypeForFilename(const char *filename,
+ const char *prevtype)
{
const char *contenttype = NULL;
unsigned int i;
@@ -266,7 +173,7 @@ static const char * ContentTypeForFilename (const char *filename,
* extensions and pick the first we match!
*/
struct ContentType {
- char extension[6];
+ const char *extension;
const char *type;
};
static const struct ContentType ctts[]={
@@ -302,46 +209,6 @@ 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.
@@ -382,7 +249,7 @@ static char *memdup(const char *src, size_t buffer_length)
* CURL_FORMADD_NULL if a null pointer was given for a char
* CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed
* CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
- * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or an error)
+ * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error)
* CURL_FORMADD_MEMORY if a HttpPost struct cannot be allocated
* CURL_FORMADD_MEMORY if some allocation for string copying failed.
* CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array
@@ -422,7 +289,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
while(return_value == CURL_FORMADD_OK) {
/* first see if we have more parts of the array param */
- if( array_state && forms ) {
+ if(array_state && forms) {
/* get the upcoming option from the given array */
option = forms->option;
array_value = (char *)forms->value;
@@ -460,8 +327,10 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
*/
case CURLFORM_PTRNAME:
#ifdef CURL_DOES_CONVERSIONS
- /* treat CURLFORM_PTR like CURLFORM_COPYNAME so we'll
- have safe memory for the eventual conversion */
+ /* Treat CURLFORM_PTR like CURLFORM_COPYNAME so that libcurl will copy
+ * the data in all cases so that we'll have safe memory for the eventual
+ * conversion.
+ */
#else
current_form->flags |= HTTPPOST_PTRNAME; /* fall through */
#endif
@@ -512,7 +381,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
/* Get contents from a given file name */
case CURLFORM_FILECONTENT:
- if(current_form->flags != 0)
+ if(current_form->flags & (HTTPPOST_PTRCONTENTS|HTTPPOST_READFILE))
return_value = CURL_FORMADD_OPTION_TWICE;
else {
const char *filename = array_state?
@@ -540,9 +409,21 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
if(current_form->value) {
if(current_form->flags & HTTPPOST_FILENAME) {
if(filename) {
- if((current_form = AddFormInfo(strdup(filename),
- NULL, current_form)) == NULL)
+ char *fname = strdup(filename);
+ if(!fname)
return_value = CURL_FORMADD_MEMORY;
+ else {
+ form = AddFormInfo(fname, NULL, current_form);
+ if(!form) {
+ free(fname);
+ return_value = CURL_FORMADD_MEMORY;
+ }
+ else {
+ form->value_alloc = TRUE;
+ current_form = form;
+ form = NULL;
+ }
+ }
}
else
return_value = CURL_FORMADD_NULL;
@@ -566,46 +447,18 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
break;
}
- case CURLFORM_BUFFER:
- {
- const char *filename = array_state?array_value:
- va_arg(params, char *);
-
- if(current_form->value) {
- if(current_form->flags & HTTPPOST_BUFFER) {
- if(filename) {
- if((current_form = AddFormInfo(strdup(filename),
- NULL, current_form)) == NULL)
- return_value = CURL_FORMADD_MEMORY;
- }
- else
- return_value = CURL_FORMADD_NULL;
- }
- else
- return_value = CURL_FORMADD_OPTION_TWICE;
- }
- else {
- if(filename) {
- current_form->value = strdup(filename);
- if(!current_form->value)
- return_value = CURL_FORMADD_MEMORY;
- }
- else
- return_value = CURL_FORMADD_NULL;
- current_form->flags |= HTTPPOST_BUFFER;
- }
- break;
- }
-
case CURLFORM_BUFFERPTR:
- current_form->flags |= HTTPPOST_PTRBUFFER;
+ current_form->flags |= HTTPPOST_PTRBUFFER|HTTPPOST_BUFFER;
if(current_form->buffer)
return_value = CURL_FORMADD_OPTION_TWICE;
else {
char *buffer =
array_state?array_value:va_arg(params, char *);
- if(buffer)
+ if(buffer) {
current_form->buffer = buffer; /* store for the moment */
+ current_form->value = buffer; /* make it non-NULL to be accepted
+ as fine */
+ }
else
return_value = CURL_FORMADD_NULL;
}
@@ -645,10 +498,21 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
if(current_form->contenttype) {
if(current_form->flags & HTTPPOST_FILENAME) {
if(contenttype) {
- if((current_form = AddFormInfo(NULL,
- strdup(contenttype),
- current_form)) == NULL)
+ char *type = strdup(contenttype);
+ if(!type)
return_value = CURL_FORMADD_MEMORY;
+ else {
+ form = AddFormInfo(NULL, type, current_form);
+ if(!form) {
+ free(type);
+ return_value = CURL_FORMADD_MEMORY;
+ }
+ else {
+ form->contenttype_alloc = TRUE;
+ current_form = form;
+ form = NULL;
+ }
+ }
}
else
return_value = CURL_FORMADD_NULL;
@@ -677,7 +541,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
(struct curl_slist*)array_value:
va_arg(params, struct curl_slist*);
- if( current_form->contentheader )
+ if(current_form->contentheader)
return_value = CURL_FORMADD_OPTION_TWICE;
else
current_form->contentheader = list;
@@ -685,10 +549,11 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
break;
}
case CURLFORM_FILENAME:
+ case CURLFORM_BUFFER:
{
const char *filename = array_state?array_value:
va_arg(params, char *);
- if( current_form->showfilename )
+ if(current_form->showfilename)
return_value = CURL_FORMADD_OPTION_TWICE;
else {
current_form->showfilename = strdup(filename);
@@ -701,6 +566,31 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
}
default:
return_value = CURL_FORMADD_UNKNOWN_OPTION;
+ break;
+ }
+ }
+
+ if(CURL_FORMADD_OK != return_value) {
+ /* On error, free allocated fields for all nodes of the FormInfo linked
+ list without deallocating nodes. List nodes are deallocated later on */
+ FormInfo *ptr;
+ for(ptr = first_form; ptr != NULL; ptr = ptr->more) {
+ if(ptr->name_alloc) {
+ Curl_safefree(ptr->name);
+ ptr->name_alloc = FALSE;
+ }
+ if(ptr->value_alloc) {
+ Curl_safefree(ptr->value);
+ ptr->value_alloc = FALSE;
+ }
+ if(ptr->contenttype_alloc) {
+ Curl_safefree(ptr->contenttype);
+ ptr->contenttype_alloc = FALSE;
+ }
+ if(ptr->showfilename_alloc) {
+ Curl_safefree(ptr->showfilename);
+ ptr->showfilename_alloc = FALSE;
+ }
}
}
@@ -712,53 +602,60 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
for(form = first_form;
form != NULL;
form = form->more) {
- if( ((!form->name || !form->value) && !post) ||
- ( (form->contentslength) &&
- (form->flags & HTTPPOST_FILENAME) ) ||
- ( (form->flags & HTTPPOST_FILENAME) &&
- (form->flags & HTTPPOST_PTRCONTENTS) ) ||
-
- ( (!form->buffer) &&
- (form->flags & HTTPPOST_BUFFER) &&
- (form->flags & HTTPPOST_PTRBUFFER) ) ||
-
- ( (form->flags & HTTPPOST_READFILE) &&
- (form->flags & HTTPPOST_PTRCONTENTS) )
+ if(((!form->name || !form->value) && !post) ||
+ ( (form->contentslength) &&
+ (form->flags & HTTPPOST_FILENAME) ) ||
+ ( (form->flags & HTTPPOST_FILENAME) &&
+ (form->flags & HTTPPOST_PTRCONTENTS) ) ||
+
+ ( (!form->buffer) &&
+ (form->flags & HTTPPOST_BUFFER) &&
+ (form->flags & HTTPPOST_PTRBUFFER) ) ||
+
+ ( (form->flags & HTTPPOST_READFILE) &&
+ (form->flags & HTTPPOST_PTRCONTENTS) )
) {
return_value = CURL_FORMADD_INCOMPLETE;
break;
}
else {
- if( ((form->flags & HTTPPOST_FILENAME) ||
- (form->flags & HTTPPOST_BUFFER)) &&
- !form->contenttype ) {
+ if(((form->flags & HTTPPOST_FILENAME) ||
+ (form->flags & HTTPPOST_BUFFER)) &&
+ !form->contenttype ) {
+ char *f = form->flags & HTTPPOST_BUFFER?
+ form->showfilename : form->value;
+
/* our contenttype is missing */
- form->contenttype
- = strdup(ContentTypeForFilename(form->value, prevtype));
+ form->contenttype = strdup(ContentTypeForFilename(f, prevtype));
if(!form->contenttype) {
return_value = CURL_FORMADD_MEMORY;
break;
}
form->contenttype_alloc = TRUE;
}
- if( !(form->flags & HTTPPOST_PTRNAME) &&
- (form == first_form) ) {
+ if(!(form->flags & HTTPPOST_PTRNAME) &&
+ (form == first_form) ) {
/* Note that there's small risk that form->name is NULL here if the
app passed in a bad combo, so we better check for that first. */
- if(form->name)
+ if(form->name) {
/* copy name (without strdup; possibly contains null characters) */
- form->name = memdup(form->name, form->namelength);
+ form->name = Curl_memdup(form->name, form->namelength?
+ form->namelength:
+ strlen(form->name)+1);
+ }
if(!form->name) {
return_value = CURL_FORMADD_MEMORY;
break;
}
form->name_alloc = TRUE;
}
- if( !(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
- HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
- HTTPPOST_CALLBACK)) ) {
+ if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
+ HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
+ HTTPPOST_CALLBACK)) && form->value) {
/* copy value (without strdup; possibly contains null characters) */
- form->value = memdup(form->value, form->contentslength);
+ form->value = Curl_memdup(form->value, form->contentslength?
+ form->contentslength:
+ strlen(form->value)+1);
if(!form->value) {
return_value = CURL_FORMADD_MEMORY;
break;
@@ -783,32 +680,39 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
prevtype = form->contenttype;
}
}
- }
-
- if(return_value) {
- /* we return on error, free possibly allocated fields */
- if(!form)
- form = current_form;
- if(form) {
- if(form->name_alloc)
- free(form->name);
- if(form->value_alloc)
- free(form->value);
- if(form->contenttype_alloc)
- free(form->contenttype);
- if(form->showfilename_alloc)
- free(form->showfilename);
+ if(CURL_FORMADD_OK != return_value) {
+ /* On error, free allocated fields for nodes of the FormInfo linked
+ list which are not already owned by the httppost linked list
+ without deallocating nodes. List nodes are deallocated later on */
+ FormInfo *ptr;
+ for(ptr = form; ptr != NULL; ptr = ptr->more) {
+ if(ptr->name_alloc) {
+ Curl_safefree(ptr->name);
+ ptr->name_alloc = FALSE;
+ }
+ if(ptr->value_alloc) {
+ Curl_safefree(ptr->value);
+ ptr->value_alloc = FALSE;
+ }
+ if(ptr->contenttype_alloc) {
+ Curl_safefree(ptr->contenttype);
+ ptr->contenttype_alloc = FALSE;
+ }
+ if(ptr->showfilename_alloc) {
+ Curl_safefree(ptr->showfilename);
+ ptr->showfilename_alloc = FALSE;
+ }
+ }
}
}
- /* always delete the allocated memory before returning */
- form = first_form;
- while(form != NULL) {
- FormInfo *delete_form;
-
- delete_form = form;
- form = form->more;
- free (delete_form);
+ /* Always deallocate FormInfo linked list nodes without touching node
+ fields given that these have either been deallocated or are owned
+ now by the httppost linked list */
+ while(first_form) {
+ FormInfo *ptr = first_form->more;
+ free(first_form);
+ first_form = ptr;
}
return return_value;
@@ -816,6 +720,8 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
/*
* curl_formadd() is a public API to add a section to the multipart formpost.
+ *
+ * @unittest: 1308
*/
CURLFORMcode curl_formadd(struct curl_httppost **httppost,
@@ -830,6 +736,70 @@ CURLFORMcode curl_formadd(struct curl_httppost **httppost,
return result;
}
+#ifdef __VMS
+#include <fabdef.h>
+/*
+ * get_vms_file_size does what it takes to get the real size of the file
+ *
+ * For fixed files, find out the size of the EOF block and adjust.
+ *
+ * For all others, have to read the entire file in, discarding the contents.
+ * Most posted text files will be small, and binary files like zlib archives
+ * and CD/DVD images should be either a STREAM_LF format or a fixed format.
+ *
+ */
+curl_off_t VmsRealFileSize(const char * name,
+ const struct_stat * stat_buf)
+{
+ char buffer[8192];
+ curl_off_t count;
+ int ret_stat;
+ FILE * file;
+
+ file = fopen(name, "r"); /* VMS */
+ if(file == NULL)
+ return 0;
+
+ count = 0;
+ ret_stat = 1;
+ while(ret_stat > 0) {
+ ret_stat = fread(buffer, 1, sizeof(buffer), file);
+ if(ret_stat != 0)
+ count += ret_stat;
+ }
+ fclose(file);
+
+ return count;
+}
+
+/*
+ *
+ * VmsSpecialSize checks to see if the stat st_size can be trusted and
+ * if not to call a routine to get the correct size.
+ *
+ */
+static curl_off_t VmsSpecialSize(const char * name,
+ const struct_stat * stat_buf)
+{
+ switch(stat_buf->st_fab_rfm) {
+ case FAB$C_VAR:
+ case FAB$C_VFC:
+ return VmsRealFileSize(name, stat_buf);
+ break;
+ default:
+ return stat_buf->st_size;
+ }
+}
+
+#endif
+
+#ifndef __VMS
+#define filesize(name, stat_data) (stat_data.st_size)
+#else
+ /* Getting the expected file size needs help on VMS */
+#define filesize(name, stat_data) VmsSpecialSize(name, &stat_data)
+#endif
+
/*
* AddFormData() adds a chunk of data to the FormData linked list.
*
@@ -884,9 +854,10 @@ static CURLcode AddFormData(struct FormData **formp,
file */
if(!strequal("-", newform->line)) {
struct_stat file;
- if(!stat(newform->line, &file)) {
- *size += file.st_size;
- }
+ if(!stat(newform->line, &file) && !S_ISDIR(file.st_mode))
+ *size += filesize(newform->line, file);
+ else
+ return CURLE_BAD_FUNCTION_ARGUMENT;
}
}
}
@@ -933,54 +904,26 @@ void Curl_formclean(struct FormData **form_ptr)
*form_ptr = NULL;
}
-#ifdef CURL_DOES_CONVERSIONS
-/*
- * Curl_formcovert() is used from http.c, this converts any
- form items that need to be sent in the network encoding.
- Returns CURLE_OK on success.
- */
-CURLcode Curl_formconvert(struct SessionHandle *data, struct FormData *form)
-{
- struct FormData *next;
- CURLcode rc;
-
- if(!form)
- return CURLE_OK;
-
- if(!data)
- return CURLE_BAD_FUNCTION_ARGUMENT;
-
- do {
- next=form->next; /* the following form line */
- if(form->type == FORM_DATA) {
- rc = Curl_convert_to_network(data, form->line, form->length);
- /* Curl_convert_to_network calls failf if unsuccessful */
- if(rc != CURLE_OK)
- return rc;
- }
- } while((form = next) != NULL); /* continue */
- return CURLE_OK;
-}
-#endif /* CURL_DOES_CONVERSIONS */
-
/*
* curl_formget()
* Serialize a curl_httppost struct.
* Returns 0 on success.
+ *
+ * @unittest: 1308
*/
int curl_formget(struct curl_httppost *form, void *arg,
curl_formget_callback append)
{
- CURLcode rc;
+ CURLcode result;
curl_off_t size;
struct FormData *data, *ptr;
- rc = Curl_getFormData(&data, form, NULL, &size);
- if(rc != CURLE_OK)
- return (int)rc;
+ result = Curl_getformdata(NULL, &data, form, NULL, &size);
+ if(result)
+ return (int)result;
- for (ptr = data; ptr; ptr = ptr->next) {
- if(ptr->type == FORM_FILE) {
+ for(ptr = data; ptr; ptr = ptr->next) {
+ if((ptr->type == FORM_FILE) || (ptr->type == FORM_CALLBACK)) {
char buffer[8192];
size_t nread;
struct Form temp;
@@ -989,14 +932,15 @@ int curl_formget(struct curl_httppost *form, void *arg,
do {
nread = readfromfile(&temp, buffer, sizeof(buffer));
- if((nread == (size_t) -1) || (nread != append(arg, buffer, nread))) {
- if(temp.fp) {
+ if((nread == (size_t) -1) ||
+ (nread > sizeof(buffer)) ||
+ (nread != append(arg, buffer, nread))) {
+ if(temp.fp)
fclose(temp.fp);
- }
Curl_formclean(&data);
return -1;
}
- } while(nread == sizeof(buffer));
+ } while(nread);
}
else {
if(ptr->length != append(arg, ptr->line, ptr->length)) {
@@ -1025,18 +969,16 @@ void curl_formfree(struct curl_httppost *form)
next=form->next; /* the following form line */
/* recurse to sub-contents */
- if(form->more)
- curl_formfree(form->more);
+ curl_formfree(form->more);
- if( !(form->flags & HTTPPOST_PTRNAME) && form->name)
+ if(!(form->flags & HTTPPOST_PTRNAME))
free(form->name); /* free the name */
- if( !(form->flags & (HTTPPOST_PTRCONTENTS|HTTPPOST_CALLBACK)) &&
- form->contents)
+ if(!(form->flags &
+ (HTTPPOST_PTRCONTENTS|HTTPPOST_BUFFER|HTTPPOST_CALLBACK))
+ )
free(form->contents); /* free the contents */
- if(form->contenttype)
- free(form->contenttype); /* free the content type */
- if(form->showfilename)
- free(form->showfilename); /* free the faked file name */
+ free(form->contenttype); /* free the content type */
+ free(form->showfilename); /* free the faked file name */
free(form); /* free the struct */
} while((form = next) != NULL); /* continue */
@@ -1104,16 +1046,64 @@ static char *strippath(const char *fullfile)
return base; /* returns an allocated string or NULL ! */
}
+static CURLcode formdata_add_filename(const struct curl_httppost *file,
+ struct FormData **form,
+ curl_off_t *size)
+{
+ CURLcode result = CURLE_OK;
+ char *filename = file->showfilename;
+ char *filebasename = NULL;
+ char *filename_escaped = NULL;
+
+ if(!filename) {
+ filebasename = strippath(file->contents);
+ if(!filebasename)
+ return CURLE_OUT_OF_MEMORY;
+ filename = filebasename;
+ }
+
+ if(strchr(filename, '\\') || strchr(filename, '"')) {
+ char *p0, *p1;
+
+ /* filename need be escaped */
+ filename_escaped = malloc(strlen(filename)*2+1);
+ if(!filename_escaped) {
+ free(filebasename);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ p0 = filename_escaped;
+ p1 = filename;
+ while(*p1) {
+ if(*p1 == '\\' || *p1 == '"')
+ *p0++ = '\\';
+ *p0++ = *p1++;
+ }
+ *p0 = '\0';
+ filename = filename_escaped;
+ }
+ result = AddFormDataf(form, size,
+ "; filename=\"%s\"",
+ filename);
+ free(filename_escaped);
+ free(filebasename);
+ return result;
+}
+
/*
- * Curl_getFormData() converts a linked list of "meta data" into a complete
+ * Curl_getformdata() converts a linked list of "meta data" into a complete
* (possibly huge) multipart formdata. The input list is in 'post', while the
* output resulting linked lists gets stored in '*finalform'. *sizep will get
* the total size of the whole POST.
* A multipart/form_data content-type is built, unless a custom content-type
* is passed in 'custom_content_type'.
+ *
+ * This function will not do a failf() for the potential memory failures but
+ * should for all other errors it spots. Just note that this function MAY get
+ * a NULL pointer in the 'data' argument.
*/
-CURLcode Curl_getFormData(struct FormData **finalform,
+CURLcode Curl_getformdata(struct SessionHandle *data,
+ struct FormData **finalform,
struct curl_httppost *post,
const char *custom_content_type,
curl_off_t *sizep)
@@ -1123,17 +1113,17 @@ CURLcode Curl_getFormData(struct FormData **finalform,
struct curl_httppost *file;
CURLcode result = CURLE_OK;
- curl_off_t size=0; /* support potentially ENORMOUS formposts */
+ curl_off_t size = 0; /* support potentially ENORMOUS formposts */
char *boundary;
- char *fileboundary=NULL;
+ char *fileboundary = NULL;
struct curl_slist* curList;
- *finalform=NULL; /* default form is empty */
+ *finalform = NULL; /* default form is empty */
if(!post)
return result; /* no input => no output! */
- boundary = Curl_FormBoundary();
+ boundary = formboundary(data);
if(!boundary)
return CURLE_OUT_OF_MEMORY;
@@ -1188,10 +1178,15 @@ CURLcode Curl_getFormData(struct FormData **finalform,
/* If used, this is a link to more file names, we must then do
the magic to include several files with the same field name */
- fileboundary = Curl_FormBoundary();
+ free(fileboundary);
+ fileboundary = formboundary(data);
+ if(!fileboundary) {
+ result = CURLE_OUT_OF_MEMORY;
+ break;
+ }
result = AddFormDataf(&form, &size,
- "\r\nContent-Type: multipart/mixed,"
+ "\r\nContent-Type: multipart/mixed;"
" boundary=%s\r\n",
fileboundary);
if(result)
@@ -1208,24 +1203,13 @@ CURLcode Curl_getFormData(struct FormData **finalform,
if(post->more) {
/* if multiple-file */
- char *filebasename= NULL;
- if(!file->showfilename) {
- filebasename = strippath(file->contents);
- if(!filebasename) {
- Curl_formclean(&firstform);
- free(boundary);
- return CURLE_OUT_OF_MEMORY;
- }
- }
-
result = AddFormDataf(&form, &size,
"\r\n--%s\r\nContent-Disposition: "
- "attachment; filename=\"%s\"",
- fileboundary,
- (file->showfilename?file->showfilename:
- filebasename));
- if(filebasename)
- free(filebasename);
+ "attachment",
+ fileboundary);
+ if(result)
+ break;
+ result = formdata_add_filename(file, &form, &size);
if(result)
break;
}
@@ -1234,15 +1218,9 @@ CURLcode Curl_getFormData(struct FormData **finalform,
/* it should be noted that for the HTTPPOST_FILENAME and
HTTPPOST_CALLBACK cases the ->showfilename struct member is always
assigned at this point */
- char *filebasename=
- (!post->showfilename)?strippath(post->contents):NULL;
-
- result = AddFormDataf(&form, &size,
- "; filename=\"%s\"",
- (post->showfilename?post->showfilename:
- filebasename));
- if(filebasename)
- free(filebasename);
+ if(post->showfilename || (post->flags & HTTPPOST_FILENAME)) {
+ result = formdata_add_filename(post, &form, &size);
+ }
if(result)
break;
@@ -1258,35 +1236,15 @@ CURLcode Curl_getFormData(struct FormData **finalform,
}
curList = file->contentheader;
- while( curList ) {
+ while(curList) {
/* Process the additional headers specified for this form */
result = AddFormDataf( &form, &size, "\r\n%s", curList->data );
if(result)
break;
curList = curList->next;
}
- if(result) {
- Curl_formclean(&firstform);
- free(boundary);
- return result;
- }
-
-#if 0
- /* The header Content-Transfer-Encoding: seems to confuse some receivers
- * (like the built-in PHP engine). While I can't see any reason why it
- * should, I can just as well skip this to the benefit of the users who
- * are using such confused receivers.
- */
-
- if(file->contenttype &&
- !checkprefix("text/", file->contenttype)) {
- /* this is not a text content, mention our binary encoding */
- result = AddFormDataf(&form, &size,
- "\r\nContent-Transfer-Encoding: binary");
- if(result)
- break;
- }
-#endif
+ if(result)
+ break;
result = AddFormDataf(&form, &size, "\r\n\r\n");
if(result)
@@ -1308,7 +1266,7 @@ CURLcode Curl_getFormData(struct FormData **finalform,
if(fileread) {
if(fileread != stdin) {
- /* close the file again */
+ /* close the file */
fclose(fileread);
/* add the file name only - for later reading from this */
result = AddFormData(&form, FORM_FILE, file->contents, 0, &size);
@@ -1327,55 +1285,33 @@ CURLcode Curl_getFormData(struct FormData **finalform,
break;
}
}
-
- if(result) {
- Curl_formclean(&firstform);
- free(boundary);
- return result;
- }
-
}
else {
-#ifdef _FORM_DEBUG
- fprintf(stderr,
- "\n==> Curl_getFormData couldn't open/read \"%s\"\n",
- file->contents);
-#endif
- Curl_formclean(&firstform);
- free(boundary);
+ if(data)
+ failf(data, "couldn't open file \"%s\"", file->contents);
*finalform = NULL;
- return CURLE_READ_ERROR;
+ result = CURLE_READ_ERROR;
}
-
}
- else if(post->flags & HTTPPOST_BUFFER) {
+ else if(post->flags & HTTPPOST_BUFFER)
/* include contents of buffer */
result = AddFormData(&form, FORM_CONTENT, post->buffer,
post->bufferlength, &size);
- if(result)
- break;
- }
- else if(post->flags & HTTPPOST_CALLBACK) {
+ else if(post->flags & HTTPPOST_CALLBACK)
/* the contents should be read with the callback and the size
is set with the contentslength */
result = AddFormData(&form, FORM_CALLBACK, post->userp,
post->contentslength, &size);
- if(result)
- break;
- }
- else {
+ else
/* include the contents we got */
result = AddFormData(&form, FORM_CONTENT, post->contents,
post->contentslength, &size);
- if(result)
- break;
- }
- } while((file = file->more) != NULL); /* for each specified file for this field */
- if(result) {
- Curl_formclean(&firstform);
- free(boundary);
- return result;
- }
+
+ file = file->more;
+ } while(file && !result); /* for each specified file for this field */
+
+ if(result)
+ break;
if(post->more) {
/* this was a multiple-file inclusion, make a termination file
@@ -1383,33 +1319,29 @@ CURLcode Curl_getFormData(struct FormData **finalform,
result = AddFormDataf(&form, &size,
"\r\n--%s--",
fileboundary);
- free(fileboundary);
if(result)
break;
}
} while((post = post->next) != NULL); /* for each field */
- if(result) {
- Curl_formclean(&firstform);
- free(boundary);
- return result;
- }
/* end-boundary for everything */
- result = AddFormDataf(&form, &size,
- "\r\n--%s--\r\n",
- boundary);
+ if(!result)
+ result = AddFormDataf(&form, &size, "\r\n--%s--\r\n", boundary);
+
if(result) {
Curl_formclean(&firstform);
+ free(fileboundary);
free(boundary);
return result;
}
*sizep = size;
+ free(fileboundary);
free(boundary);
- *finalform=firstform;
+ *finalform = firstform;
return result;
}
@@ -1431,26 +1363,67 @@ int Curl_FormInit(struct Form *form, struct FormData *formdata )
return 0;
}
+#ifndef __VMS
+# define fopen_read fopen
+#else
+ /*
+ * vmsfopenread
+ *
+ * For upload to work as expected on VMS, different optional
+ * parameters must be added to the fopen command based on
+ * record format of the file.
+ *
+ */
+# define fopen_read vmsfopenread
+static FILE * vmsfopenread(const char *file, const char *mode) {
+ struct_stat statbuf;
+ int result;
+
+ result = stat(file, &statbuf);
+
+ switch (statbuf.st_fab_rfm) {
+ case FAB$C_VAR:
+ case FAB$C_VFC:
+ case FAB$C_STMCR:
+ return fopen(file, "r"); /* VMS */
+ break;
+ default:
+ return fopen(file, "r", "rfm=stmlf", "ctx=stm");
+ }
+}
+#endif
+
+/*
+ * readfromfile()
+ *
+ * The read callback that this function may use can return a value larger than
+ * 'size' (which then this function returns) that indicates a problem and it
+ * must be properly dealt with
+ */
static size_t readfromfile(struct Form *form, char *buffer,
size_t size)
{
size_t nread;
- bool callback = (bool)(form->data->type == FORM_CALLBACK);
+ bool callback = (form->data->type == FORM_CALLBACK)?TRUE:FALSE;
- if(callback)
- nread = form->fread_func(buffer, 1, size, form->data->line);
+ if(callback) {
+ if(form->fread_func == ZERO_NULL)
+ return 0;
+ else
+ nread = form->fread_func(buffer, 1, size, form->data->line);
+ }
else {
if(!form->fp) {
/* this file hasn't yet been opened */
- form->fp = fopen(form->data->line, "rb"); /* b is for binary */
+ form->fp = fopen_read(form->data->line, "rb"); /* b is for binary */
if(!form->fp)
return (size_t)-1; /* failure */
}
nread = fread(buffer, 1, size, form->fp);
}
- if(!nread || nread > size) {
+ if(!nread) {
/* this is the last chunk from the file, move on */
- if(!callback) {
+ if(form->fp) {
fclose(form->fp);
form->fp = NULL;
}
@@ -1490,7 +1463,7 @@ size_t Curl_FormReader(char *buffer,
}
do {
- if( (form->data->length - form->sent ) > wantedsize - gotsize) {
+ if((form->data->length - form->sent ) > wantedsize - gotsize) {
memcpy(buffer + gotsize , form->data->line + form->sent,
wantedsize - gotsize);
@@ -1537,168 +1510,18 @@ char *Curl_formpostheader(void *formp, size_t *len)
return header;
}
-
-#ifdef _FORM_DEBUG
-int FormAddTest(const char * errormsg,
- struct curl_httppost **httppost,
- struct curl_httppost **last_post,
- ...)
-{
- int result;
- va_list arg;
- va_start(arg, last_post);
- if((result = FormAdd(httppost, last_post, arg)))
- fprintf (stderr, "ERROR doing FormAdd ret: %d action: %s\n", result,
- errormsg);
- va_end(arg);
- return result;
-}
-
-
-int main(int argc, argv_item_t argv[])
+/*
+ * formboundary() creates a suitable boundary string and returns an allocated
+ * one.
+ */
+static char *formboundary(struct SessionHandle *data)
{
- char name1[] = "simple_COPYCONTENTS";
- char name2[] = "COPYCONTENTS_+_CONTENTTYPE";
- char name3[] = "PTRNAME_+_NAMELENGTH_+_COPYNAME_+_CONTENTSLENGTH";
- char name4[] = "simple_PTRCONTENTS";
- char name5[] = "PTRCONTENTS_+_CONTENTSLENGTH";
- char name6[] = "PTRCONTENTS_+_CONTENTSLENGTH_+_CONTENTTYPE";
- char name7[] = "FILE1_+_CONTENTTYPE";
- char name8[] = "FILE1_+_FILE2";
- char name9[] = "FILE1_+_FILE2_+_FILE3";
- char name10[] = "ARRAY: FILE1_+_FILE2_+_FILE3";
- char name11[] = "FILECONTENT";
- char value1[] = "value for simple COPYCONTENTS";
- char value2[] = "value for COPYCONTENTS + CONTENTTYPE";
- char value3[] = "value for PTRNAME + NAMELENGTH + COPYNAME + CONTENTSLENGTH";
- char value4[] = "value for simple PTRCONTENTS";
- char value5[] = "value for PTRCONTENTS + CONTENTSLENGTH";
- char value6[] = "value for PTRCONTENTS + CONTENTSLENGTH + CONTENTTYPE";
- char value7[] = "formdata.h";
- char value8[] = "Makefile.b32";
- char type2[] = "image/gif";
- char type6[] = "text/plain";
- char type7[] = "text/html";
- int name3length = strlen(name3);
- int value3length = strlen(value3);
- int value5length = strlen(value5);
- int value6length = strlen(value6);
- int errors = 0;
- CURLcode rc;
- curl_off_t size;
- size_t nread;
- char buffer[4096];
- struct curl_httppost *httppost=NULL;
- struct curl_httppost *last_post=NULL;
- struct curl_forms forms[4];
-
- struct FormData *form;
- struct Form formread;
-
- (void) argc;
- (void) argv;
-
- Curl_srand(); /* Because we do not call curl_global_init() here. */
-
- if(FormAddTest("simple COPYCONTENTS test", &httppost, &last_post,
- CURLFORM_COPYNAME, name1, CURLFORM_COPYCONTENTS, value1,
- CURLFORM_END))
- ++errors;
- if(FormAddTest("COPYCONTENTS + CONTENTTYPE test", &httppost, &last_post,
- CURLFORM_COPYNAME, name2, CURLFORM_COPYCONTENTS, value2,
- CURLFORM_CONTENTTYPE, type2, CURLFORM_END))
- ++errors;
- /* make null character at start to check that contentslength works
- correctly */
- name3[1] = '\0';
- value3[1] = '\0';
- if(FormAddTest("PTRNAME + NAMELENGTH + COPYNAME + CONTENTSLENGTH test",
- &httppost, &last_post,
- CURLFORM_PTRNAME, name3, CURLFORM_COPYCONTENTS, value3,
- CURLFORM_CONTENTSLENGTH, value3length,
- CURLFORM_NAMELENGTH, name3length, CURLFORM_END))
- ++errors;
- if(FormAddTest("simple PTRCONTENTS test", &httppost, &last_post,
- CURLFORM_COPYNAME, name4, CURLFORM_PTRCONTENTS, value4,
- CURLFORM_END))
- ++errors;
- /* make null character at start to check that contentslength works
- correctly */
- value5[1] = '\0';
- if(FormAddTest("PTRCONTENTS + CONTENTSLENGTH test", &httppost, &last_post,
- CURLFORM_COPYNAME, name5, CURLFORM_PTRCONTENTS, value5,
- CURLFORM_CONTENTSLENGTH, value5length, CURLFORM_END))
- ++errors;
- /* make null character at start to check that contentslength works
- correctly */
- value6[1] = '\0';
- if(FormAddTest("PTRCONTENTS + CONTENTSLENGTH + CONTENTTYPE test",
- &httppost, &last_post,
- CURLFORM_COPYNAME, name6, CURLFORM_PTRCONTENTS, value6,
- CURLFORM_CONTENTSLENGTH, value6length,
- CURLFORM_CONTENTTYPE, type6, CURLFORM_END))
- ++errors;
- if(FormAddTest("FILE + CONTENTTYPE test", &httppost, &last_post,
- CURLFORM_COPYNAME, name7, CURLFORM_FILE, value7,
- CURLFORM_CONTENTTYPE, type7, CURLFORM_END))
- ++errors;
- if(FormAddTest("FILE1 + FILE2 test", &httppost, &last_post,
- CURLFORM_COPYNAME, name8, CURLFORM_FILE, value7,
- CURLFORM_FILE, value8, CURLFORM_END))
- ++errors;
- if(FormAddTest("FILE1 + FILE2 + FILE3 test", &httppost, &last_post,
- CURLFORM_COPYNAME, name9, CURLFORM_FILE, value7,
- CURLFORM_FILE, value8, CURLFORM_FILE, value7, CURLFORM_END))
- ++errors;
- forms[0].option = CURLFORM_FILE;
- forms[0].value = value7;
- forms[1].option = CURLFORM_FILE;
- forms[1].value = value8;
- forms[2].option = CURLFORM_FILE;
- forms[2].value = value7;
- forms[3].option = CURLFORM_END;
- if(FormAddTest("FILE1 + FILE2 + FILE3 ARRAY test", &httppost, &last_post,
- CURLFORM_COPYNAME, name10, CURLFORM_ARRAY, forms,
- CURLFORM_END))
- ++errors;
- if(FormAddTest("FILECONTENT test", &httppost, &last_post,
- CURLFORM_COPYNAME, name11, CURLFORM_FILECONTENT, value7,
- CURLFORM_END))
- ++errors;
-
- rc = Curl_getFormData(&form, httppost, NULL, &size);
- if(rc != CURLE_OK) {
- if(rc != CURLE_READ_ERROR) {
- const char *errortext = curl_easy_strerror(rc);
- fprintf(stdout, "\n==> Curl_getFormData error: %s\n", errortext);
- }
- return 0;
- }
-
- Curl_FormInit(&formread, form);
-
- do {
- nread = Curl_FormReader(buffer, 1, sizeof(buffer),
- (FILE *)&formread);
-
- if(nread < 1)
- break;
- fwrite(buffer, nread, 1, stdout);
- } while(1);
-
- fprintf(stdout, "size: ");
- fprintf(stdout, "%" FORMAT_OFF_T, size);
- fprintf(stdout, "\n");
- if(errors)
- fprintf(stdout, "\n==> %d Test(s) failed!\n", errors);
- else
- fprintf(stdout, "\nAll Tests seem to have worked (please check output)\n");
-
- return 0;
+ /* 24 dashes and 16 hexadecimal digits makes 64 bit (18446744073709551615)
+ combinations */
+ return aprintf("------------------------%08x%08x",
+ Curl_rand(data), Curl_rand(data));
}
-#endif /* _FORM_DEBUG */
-
#else /* CURL_DISABLE_HTTP */
CURLFORMcode curl_formadd(struct curl_httppost **httppost,
struct curl_httppost **last_post,
@@ -1724,37 +1547,5 @@ void curl_formfree(struct curl_httppost *form)
/* does nothing HTTP is disabled */
}
-#endif /* CURL_DISABLE_HTTP */
-
-#if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY)
-
-/*
- * Curl_FormBoundary() creates a suitable boundary string and returns an
- * allocated one. This is also used by SSL-code so it must be present even
- * if HTTP is disabled!
- */
-char *Curl_FormBoundary(void)
-{
- char *retstring;
- size_t i;
-
- static const char table16[]="0123456789abcdef";
-
- retstring = malloc(BOUNDARY_LENGTH+1);
-
- if(!retstring)
- return NULL; /* failed */
-
- strcpy(retstring, "----------------------------");
-
- for(i=strlen(retstring); i<BOUNDARY_LENGTH; i++)
- retstring[i] = table16[Curl_rand()%16];
-
- /* 28 dashes and 12 hexadecimal digits makes 12^16 (184884258895036416)
- combinations */
- retstring[BOUNDARY_LENGTH]=0; /* zero terminate */
-
- return retstring;
-}
-#endif /* !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY) */
+#endif /* !defined(CURL_DISABLE_HTTP) */
diff --git a/lib/formdata.h b/lib/formdata.h
index 0c9db442..22f504bb 100644
--- a/lib/formdata.h
+++ b/lib/formdata.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -70,11 +70,11 @@ typedef struct FormInfo {
int Curl_FormInit(struct Form *form, struct FormData *formdata );
-CURLcode
-Curl_getFormData(struct FormData **,
- struct curl_httppost *post,
- const char *custom_contenttype,
- curl_off_t *size);
+CURLcode Curl_getformdata(struct SessionHandle *data,
+ struct FormData **,
+ struct curl_httppost *post,
+ const char *custom_contenttype,
+ curl_off_t *size);
/* fread() emulation */
size_t Curl_FormReader(char *buffer,
diff --git a/lib/ftp.c b/lib/ftp.c
index 60d95172..de628a2d 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,22 +20,10 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FTP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -61,8 +49,6 @@
#include <curl/curl.h>
#include "urldata.h"
#include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
#include "if2ip.h"
#include "hostip.h"
#include "progress.h"
@@ -73,14 +59,10 @@
#include "ftp.h"
#include "fileinfo.h"
#include "ftplistparser.h"
-
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
-#include "krb4.h"
-#endif
-
+#include "curl_sec.h"
#include "strtoofft.h"
#include "strequal.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "connect.h"
#include "strerror.h"
#include "inet_ntop.h"
@@ -93,9 +75,9 @@
#include "rawstr.h"
#include "speedcheck.h"
#include "warnless.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "http_proxy.h"
+#include "non-ascii.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
@@ -109,10 +91,21 @@
#endif
#ifdef CURL_DISABLE_VERBOSE_STRINGS
-#define ftp_pasv_verbose(a,b,c,d) do { } while(0)
+#define ftp_pasv_verbose(a,b,c,d) Curl_nop_stmt
#endif
/* Local API functions */
+#ifndef DEBUGBUILD
+static void _state(struct connectdata *conn,
+ ftpstate newstate);
+#define state(x,y) _state(x,y)
+#else
+static void _state(struct connectdata *conn,
+ ftpstate newstate,
+ int lineno);
+#define state(x,y) _state(x,y,__LINE__)
+#endif
+
static CURLcode ftp_sendquote(struct connectdata *conn,
struct curl_slist *quote);
static CURLcode ftp_quit(struct connectdata *conn);
@@ -124,8 +117,8 @@ static void ftp_pasv_verbose(struct connectdata *conn,
char *newhost, /* ascii version */
int port);
#endif
-static CURLcode ftp_state_post_rest(struct connectdata *conn);
-static CURLcode ftp_state_post_cwd(struct connectdata *conn);
+static CURLcode ftp_state_prepare_transfer(struct connectdata *conn);
+static CURLcode ftp_state_mdtm(struct connectdata *conn);
static CURLcode ftp_state_quote(struct connectdata *conn,
bool init, ftpstate instate);
static CURLcode ftp_nb_type(struct connectdata *conn,
@@ -136,12 +129,13 @@ static CURLcode ftp_do(struct connectdata *conn, bool *done);
static CURLcode ftp_done(struct connectdata *conn,
CURLcode, bool premature);
static CURLcode ftp_connect(struct connectdata *conn, bool *done);
-static CURLcode ftp_disconnect(struct connectdata *conn);
-static CURLcode ftp_nextconnect(struct connectdata *conn);
+static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection);
+static CURLcode ftp_do_more(struct connectdata *conn, int *completed);
static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done);
-static int ftp_getsock(struct connectdata *conn,
- curl_socket_t *socks,
+static int ftp_getsock(struct connectdata *conn, curl_socket_t *socks,
int numsocks);
+static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks,
+ int numsocks);
static CURLcode ftp_doing(struct connectdata *conn,
bool *dophase_done);
static CURLcode ftp_setup_connection(struct connectdata * conn);
@@ -151,13 +145,17 @@ static CURLcode wc_statemach(struct connectdata *conn);
static void wc_data_dtor(void *ptr);
-static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
- curl_off_t filesize);
+static CURLcode ftp_state_retr(struct connectdata *conn, curl_off_t filesize);
+
+static CURLcode ftp_readresp(curl_socket_t sockfd,
+ struct pingpong *pp,
+ int *ftpcode,
+ size_t *size);
+static CURLcode ftp_dophase_done(struct connectdata *conn,
+ bool connected);
/* easy-to-use macro: */
-#define FTPSENDF(x,y,z) if((result = Curl_ftpsendf(x,y,z)) != CURLE_OK) \
- return result
-#define PPSENDF(x,y,z) if((result = Curl_pp_sendf(x,y,z)) != CURLE_OK) \
+#define PPSENDF(x,y,z) if((result = Curl_pp_sendf(x,y,z))) \
return result
@@ -170,16 +168,20 @@ const struct Curl_handler Curl_handler_ftp = {
ftp_setup_connection, /* setup_connection */
ftp_do, /* do_it */
ftp_done, /* done */
- ftp_nextconnect, /* do_more */
+ ftp_do_more, /* do_more */
ftp_connect, /* connect_it */
ftp_multi_statemach, /* connecting */
ftp_doing, /* doing */
ftp_getsock, /* proto_getsock */
ftp_getsock, /* doing_getsock */
+ ftp_domore_getsock, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ftp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_FTP, /* defport */
- PROT_FTP /* protocol */
+ CURLPROTO_FTP, /* protocol */
+ PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD
+ | PROTOPT_NOURLQUERY /* flags */
};
@@ -193,16 +195,20 @@ const struct Curl_handler Curl_handler_ftps = {
ftp_setup_connection, /* setup_connection */
ftp_do, /* do_it */
ftp_done, /* done */
- ftp_nextconnect, /* do_more */
+ ftp_do_more, /* do_more */
ftp_connect, /* connect_it */
ftp_multi_statemach, /* connecting */
ftp_doing, /* doing */
ftp_getsock, /* proto_getsock */
ftp_getsock, /* doing_getsock */
+ ftp_domore_getsock, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ftp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_FTPS, /* defport */
- PROT_FTP | PROT_FTPS | PROT_SSL /* protocol */
+ CURLPROTO_FTPS, /* protocol */
+ PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION |
+ PROTOPT_NEEDSPWD | PROTOPT_NOURLQUERY /* flags */
};
#endif
@@ -213,7 +219,7 @@ const struct Curl_handler Curl_handler_ftps = {
static const struct Curl_handler Curl_handler_ftp_proxy = {
"FTP", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -222,10 +228,13 @@ static const struct Curl_handler Curl_handler_ftp_proxy = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_FTP, /* defport */
- PROT_HTTP /* protocol */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
@@ -236,7 +245,7 @@ static const struct Curl_handler Curl_handler_ftp_proxy = {
static const struct Curl_handler Curl_handler_ftps_proxy = {
"FTPS", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -245,10 +254,13 @@ static const struct Curl_handler Curl_handler_ftps_proxy = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_FTPS, /* defport */
- PROT_HTTP /* protocol */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
#endif
#endif
@@ -270,20 +282,18 @@ static void freedirs(struct ftp_conn *ftpc)
{
int i;
if(ftpc->dirs) {
- for (i=0; i < ftpc->dirdepth; i++){
- if(ftpc->dirs[i]) {
- free(ftpc->dirs[i]);
- ftpc->dirs[i]=NULL;
- }
+ for(i=0; i < ftpc->dirdepth; i++) {
+ free(ftpc->dirs[i]);
+ ftpc->dirs[i]=NULL;
}
free(ftpc->dirs);
ftpc->dirs = NULL;
ftpc->dirdepth = 0;
}
- if(ftpc->file) {
- free(ftpc->file);
- ftpc->file = NULL;
- }
+ Curl_safefree(ftpc->file);
+
+ /* no longer of any use */
+ Curl_safefree(ftpc->newhost);
}
/* Returns non-zero if the given string contains CR (\r) or LF (\n),
@@ -294,25 +304,22 @@ static void freedirs(struct ftp_conn *ftpc)
*/
static bool isBadFtpString(const char *string)
{
- return (bool)((NULL != strchr(string, '\r')) ||
- (NULL != strchr(string, '\n')));
+ return ((NULL != strchr(string, '\r')) ||
+ (NULL != strchr(string, '\n'))) ? TRUE : FALSE;
}
/***********************************************************************
*
- * AllowServerConnect()
+ * AcceptServerConnect()
*
- * When we've issue the PORT command, we have told the server to connect
- * to us. This function will sit and wait here until the server has
- * connected.
+ * After connection request is received from the server this function is
+ * called to accept the connection and close the listening socket
*
*/
-static CURLcode AllowServerConnect(struct connectdata *conn)
+static CURLcode AcceptServerConnect(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
curl_socket_t sock = conn->sock[SECONDARYSOCKET];
- long timeout_ms;
- long interval_ms;
curl_socket_t s = CURL_SOCKET_BAD;
#ifdef ENABLE_IPV6
struct Curl_sockaddr_storage add;
@@ -321,47 +328,255 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
#endif
curl_socklen_t size = (curl_socklen_t) sizeof(add);
- for(;;) {
- timeout_ms = Curl_timeleft(conn, NULL, TRUE);
+ if(0 == getsockname(sock, (struct sockaddr *) &add, &size)) {
+ size = sizeof(add);
+
+ s=accept(sock, (struct sockaddr *) &add, &size);
+ }
+ Curl_closesocket(conn, sock); /* close the first socket */
+
+ if(CURL_SOCKET_BAD == s) {
+ failf(data, "Error accept()ing server connect");
+ return CURLE_FTP_PORT_FAILED;
+ }
+ infof(data, "Connection accepted from server\n");
- if(timeout_ms < 0) {
- /* if a timeout was already reached, bail out */
- failf(data, "Timeout while waiting for server connect");
- return CURLE_OPERATION_TIMEDOUT;
+ conn->sock[SECONDARYSOCKET] = s;
+ (void)curlx_nonblock(s, TRUE); /* enable non-blocking */
+ conn->sock_accepted[SECONDARYSOCKET] = TRUE;
+
+ if(data->set.fsockopt) {
+ int error = 0;
+
+ /* activate callback for setting socket options */
+ error = data->set.fsockopt(data->set.sockopt_client,
+ s,
+ CURLSOCKTYPE_ACCEPT);
+
+ if(error) {
+ Curl_closesocket(conn, s); /* close the socket and bail out */
+ conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
+ return CURLE_ABORTED_BY_CALLBACK;
}
+ }
- interval_ms = 1000; /* use 1 second timeout intervals */
- if(timeout_ms < interval_ms)
- interval_ms = timeout_ms;
+ return CURLE_OK;
- switch (Curl_socket_ready(sock, CURL_SOCKET_BAD, (int)interval_ms)) {
- case -1: /* error */
- /* let's die here */
- failf(data, "Error while waiting for server connect");
- return CURLE_FTP_PORT_FAILED;
- case 0: /* timeout */
- break; /* loop */
- default:
- /* we have received data here */
- if(0 == getsockname(sock, (struct sockaddr *) &add, &size)) {
- size = sizeof(add);
+}
- s=accept(sock, (struct sockaddr *) &add, &size);
- }
- sclose(sock); /* close the first socket */
+/*
+ * ftp_timeleft_accept() returns the amount of milliseconds left allowed for
+ * waiting server to connect. If the value is negative, the timeout time has
+ * already elapsed.
+ *
+ * The start time is stored in progress.t_acceptdata - as set with
+ * Curl_pgrsTime(..., TIMER_STARTACCEPT);
+ *
+ */
+static long ftp_timeleft_accept(struct SessionHandle *data)
+{
+ long timeout_ms = DEFAULT_ACCEPT_TIMEOUT;
+ long other;
+ struct timeval now;
- if(CURL_SOCKET_BAD == s) {
- failf(data, "Error accept()ing server connect");
- return CURLE_FTP_PORT_FAILED;
- }
- infof(data, "Connection accepted from server\n");
+ if(data->set.accepttimeout > 0)
+ timeout_ms = data->set.accepttimeout;
- conn->sock[SECONDARYSOCKET] = s;
- curlx_nonblock(s, TRUE); /* enable non-blocking */
- return CURLE_OK;
- } /* switch() */
+ now = Curl_tvnow();
+
+ /* check if the generic timeout possibly is set shorter */
+ other = Curl_timeleft(data, &now, FALSE);
+ if(other && (other < timeout_ms))
+ /* note that this also works fine for when other happens to be negative
+ due to it already having elapsed */
+ timeout_ms = other;
+ else {
+ /* subtract elapsed time */
+ timeout_ms -= Curl_tvdiff(now, data->progress.t_acceptdata);
+ if(!timeout_ms)
+ /* avoid returning 0 as that means no timeout! */
+ return -1;
+ }
+
+ return timeout_ms;
+}
+
+
+/***********************************************************************
+ *
+ * ReceivedServerConnect()
+ *
+ * After allowing server to connect to us from data port, this function
+ * checks both data connection for connection establishment and ctrl
+ * connection for a negative response regarding a failure in connecting
+ *
+ */
+static CURLcode ReceivedServerConnect(struct connectdata *conn, bool *received)
+{
+ struct SessionHandle *data = conn->data;
+ curl_socket_t ctrl_sock = conn->sock[FIRSTSOCKET];
+ curl_socket_t data_sock = conn->sock[SECONDARYSOCKET];
+ struct ftp_conn *ftpc = &conn->proto.ftpc;
+ struct pingpong *pp = &ftpc->pp;
+ int result;
+ long timeout_ms;
+ ssize_t nread;
+ int ftpcode;
+
+ *received = FALSE;
+
+ timeout_ms = ftp_timeleft_accept(data);
+ infof(data, "Checking for server connect\n");
+ if(timeout_ms < 0) {
+ /* if a timeout was already reached, bail out */
+ failf(data, "Accept timeout occurred while waiting server connect");
+ return CURLE_FTP_ACCEPT_TIMEOUT;
+ }
+
+ /* First check whether there is a cached response from server */
+ if(pp->cache_size && pp->cache && pp->cache[0] > '3') {
+ /* Data connection could not be established, let's return */
+ infof(data, "There is negative response in cache while serv connect\n");
+ Curl_GetFTPResponse(&nread, conn, &ftpcode);
+ return CURLE_FTP_ACCEPT_FAILED;
+ }
+
+ result = Curl_socket_check(ctrl_sock, data_sock, CURL_SOCKET_BAD, 0);
+
+ /* see if the connection request is already here */
+ switch (result) {
+ case -1: /* error */
+ /* let's die here */
+ failf(data, "Error while waiting for server connect");
+ return CURLE_FTP_ACCEPT_FAILED;
+ case 0: /* Server connect is not received yet */
+ break; /* loop */
+ default:
+
+ if(result & CURL_CSELECT_IN2) {
+ infof(data, "Ready to accept data connection from server\n");
+ *received = TRUE;
+ }
+ else if(result & CURL_CSELECT_IN) {
+ infof(data, "Ctrl conn has data while waiting for data conn\n");
+ Curl_GetFTPResponse(&nread, conn, &ftpcode);
+
+ if(ftpcode/100 > 3)
+ return CURLE_FTP_ACCEPT_FAILED;
+
+ return CURLE_FTP_WEIRD_SERVER_REPLY;
+ }
+
+ break;
+ } /* switch() */
+
+ return CURLE_OK;
+}
+
+
+/***********************************************************************
+ *
+ * InitiateTransfer()
+ *
+ * After connection from server is accepted this function is called to
+ * setup transfer parameters and initiate the data transfer.
+ *
+ */
+static CURLcode InitiateTransfer(struct connectdata *conn)
+{
+ struct SessionHandle *data = conn->data;
+ struct FTP *ftp = data->req.protop;
+ CURLcode result = CURLE_OK;
+
+ if(conn->ssl[SECONDARYSOCKET].use) {
+ /* since we only have a plaintext TCP connection here, we must now
+ * do the TLS stuff */
+ infof(data, "Doing the SSL/TLS handshake on the data stream\n");
+ result = Curl_ssl_connect(conn, SECONDARYSOCKET);
+ if(result)
+ return result;
}
- /* never reaches this point */
+
+ if(conn->proto.ftpc.state_saved == FTP_STOR) {
+ *(ftp->bytecountp)=0;
+
+ /* When we know we're uploading a specified file, we can get the file
+ size prior to the actual upload. */
+
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
+
+ /* set the SO_SNDBUF for the secondary socket for those who need it */
+ Curl_sndbufset(conn->sock[SECONDARYSOCKET]);
+
+ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
+ SECONDARYSOCKET, ftp->bytecountp);
+ }
+ else {
+ /* FTP download: */
+ Curl_setup_transfer(conn, SECONDARYSOCKET,
+ conn->proto.ftpc.retr_size_saved, FALSE,
+ ftp->bytecountp, -1, NULL); /* no upload here */
+ }
+
+ conn->proto.ftpc.pp.pending_resp = TRUE; /* expect server response */
+ state(conn, FTP_STOP);
+
+ return CURLE_OK;
+}
+
+/***********************************************************************
+ *
+ * AllowServerConnect()
+ *
+ * When we've issue the PORT command, we have told the server to connect to
+ * us. This function checks whether data connection is established if so it is
+ * accepted.
+ *
+ */
+static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected)
+{
+ struct SessionHandle *data = conn->data;
+ long timeout_ms;
+ CURLcode result = CURLE_OK;
+
+ *connected = FALSE;
+ infof(data, "Preparing for accepting server on data port\n");
+
+ /* Save the time we start accepting server connect */
+ Curl_pgrsTime(data, TIMER_STARTACCEPT);
+
+ timeout_ms = ftp_timeleft_accept(data);
+ if(timeout_ms < 0) {
+ /* if a timeout was already reached, bail out */
+ failf(data, "Accept timeout occurred while waiting server connect");
+ return CURLE_FTP_ACCEPT_TIMEOUT;
+ }
+
+ /* see if the connection request is already here */
+ result = ReceivedServerConnect(conn, connected);
+ if(result)
+ return result;
+
+ if(*connected) {
+ result = AcceptServerConnect(conn);
+ if(result)
+ return result;
+
+ result = InitiateTransfer(conn);
+ if(result)
+ return result;
+ }
+ else {
+ /* Add timeout to multi handle and break out of the loop */
+ if(!result && *connected == FALSE) {
+ if(data->set.accepttimeout > 0)
+ Curl_expire(data, data->set.accepttimeout);
+ else
+ Curl_expire(data, DEFAULT_ACCEPT_TIMEOUT);
+ }
+ }
+
+ return result;
}
/* macro to check for a three-digit ftp status code at the start of the
@@ -372,17 +587,17 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
/* macro to check for the last line in an FTP server response */
#define LASTLINE(line) (STATUSCODE(line) && (' ' == line[3]))
-static int ftp_endofresp(struct pingpong *pp,
- int *code)
+static bool ftp_endofresp(struct connectdata *conn, char *line, size_t len,
+ int *code)
{
- char *line = pp->linestart_resp;
- size_t len = pp->nread_resp;
+ (void)conn;
if((len > 3) && LASTLINE(line)) {
- *code = atoi(line);
- return 1;
+ *code = curlx_sltosi(strtol(line, NULL, 10));
+ return TRUE;
}
- return 0;
+
+ return FALSE;
}
static CURLcode ftp_readresp(curl_socket_t sockfd,
@@ -391,8 +606,8 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
size_t *size) /* size of the response */
{
struct connectdata *conn = pp->conn;
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
struct SessionHandle *data = conn->data;
+#ifdef HAVE_GSSAPI
char * const buf = data->state.buffer;
#endif
CURLcode result = CURLE_OK;
@@ -400,18 +615,18 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
result = Curl_pp_readresp(sockfd, pp, &code, size);
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+#if defined(HAVE_GSSAPI)
/* handle the security-oriented responses 6xx ***/
/* FIXME: some errorchecking perhaps... ***/
switch(code) {
case 631:
- code = Curl_sec_read_msg(conn, buf, prot_safe);
+ code = Curl_sec_read_msg(conn, buf, PROT_SAFE);
break;
case 632:
- code = Curl_sec_read_msg(conn, buf, prot_private);
+ code = Curl_sec_read_msg(conn, buf, PROT_PRIVATE);
break;
case 633:
- code = Curl_sec_read_msg(conn, buf, prot_confidential);
+ code = Curl_sec_read_msg(conn, buf, PROT_CONFIDENTIAL);
break;
default:
/* normal ftp stuff we pass through! */
@@ -420,11 +635,24 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
#endif
/* store the latest code for later retrieval */
- conn->data->info.httpcode=code;
+ data->info.httpcode=code;
if(ftpcode)
*ftpcode = code;
+ if(421 == code) {
+ /* 421 means "Service not available, closing control connection." and FTP
+ * servers use it to signal that idle session timeout has been exceeded.
+ * If we ignored the response, it could end up hanging in some cases.
+ *
+ * This response code can come at any point so having it treated
+ * generically is a good idea.
+ */
+ infof(data, "We got a 421 - timeout!\n");
+ state(conn, FTP_STOP);
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
return result;
}
@@ -502,7 +730,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
*/
}
else {
- switch (Curl_socket_ready(sockfd, CURL_SOCKET_BAD, (int)interval_ms)) {
+ switch (Curl_socket_ready(sockfd, CURL_SOCKET_BAD, interval_ms)) {
case -1: /* select() error, stop reading */
failf(data, "FTP response aborted due to select/poll error: %d",
SOCKERRNO);
@@ -539,63 +767,76 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
return result;
}
-/* This is the ONLY way to change FTP state! */
-static void state(struct connectdata *conn,
- ftpstate newstate)
-{
#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
/* for debug purposes */
- static const char * const names[]={
- "STOP",
- "WAIT220",
- "AUTH",
- "USER",
- "PASS",
- "ACCT",
- "PBSZ",
- "PROT",
- "CCC",
- "PWD",
- "SYST",
- "NAMEFMT",
- "QUOTE",
- "RETR_PREQUOTE",
- "STOR_PREQUOTE",
- "POSTQUOTE",
- "CWD",
- "MKD",
- "MDTM",
- "TYPE",
- "LIST_TYPE",
- "RETR_TYPE",
- "STOR_TYPE",
- "SIZE",
- "RETR_SIZE",
- "STOR_SIZE",
- "REST",
- "RETR_REST",
- "PORT",
- "PRET",
- "PASV",
- "LIST",
- "RETR",
- "STOR",
- "QUIT"
- };
+static const char * const ftp_state_names[]={
+ "STOP",
+ "WAIT220",
+ "AUTH",
+ "USER",
+ "PASS",
+ "ACCT",
+ "PBSZ",
+ "PROT",
+ "CCC",
+ "PWD",
+ "SYST",
+ "NAMEFMT",
+ "QUOTE",
+ "RETR_PREQUOTE",
+ "STOR_PREQUOTE",
+ "POSTQUOTE",
+ "CWD",
+ "MKD",
+ "MDTM",
+ "TYPE",
+ "LIST_TYPE",
+ "RETR_TYPE",
+ "STOR_TYPE",
+ "SIZE",
+ "RETR_SIZE",
+ "STOR_SIZE",
+ "REST",
+ "RETR_REST",
+ "PORT",
+ "PRET",
+ "PASV",
+ "LIST",
+ "RETR",
+ "STOR",
+ "QUIT"
+};
+#endif
+
+/* This is the ONLY way to change FTP state! */
+static void _state(struct connectdata *conn,
+ ftpstate newstate
+#ifdef DEBUGBUILD
+ , int lineno
#endif
+ )
+{
struct ftp_conn *ftpc = &conn->proto.ftpc;
-#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
+
+#if defined(DEBUGBUILD)
+
+#if defined(CURL_DISABLE_VERBOSE_STRINGS)
+ (void) lineno;
+#else
if(ftpc->state != newstate)
- infof(conn->data, "FTP %p state change from %s to %s\n",
- ftpc, names[ftpc->state], names[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;
}
static CURLcode ftp_state_user(struct connectdata *conn)
{
CURLcode result;
- struct FTP *ftp = conn->data->state.proto.ftp;
+ struct FTP *ftp = conn->data->req.protop;
/* send USER */
PPSENDF(&conn->proto.ftpc.pp, "USER %s", ftp->user?ftp->user:"");
@@ -610,7 +851,7 @@ static CURLcode ftp_state_pwd(struct connectdata *conn)
CURLcode result;
/* send PWD to discover our entry point */
- PPSENDF(&conn->proto.ftpc.pp, "PWD", NULL);
+ PPSENDF(&conn->proto.ftpc.pp, "%s", "PWD");
state(conn, FTP_PWD);
return CURLE_OK;
@@ -624,6 +865,50 @@ static int ftp_getsock(struct connectdata *conn,
return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks);
}
+/* For the FTP "DO_MORE" phase only */
+static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks,
+ int numsocks)
+{
+ struct ftp_conn *ftpc = &conn->proto.ftpc;
+
+ if(!numsocks)
+ return GETSOCK_BLANK;
+
+ /* When in DO_MORE state, we could be either waiting for us to connect to a
+ * remote site, or we could wait for that site to connect to us. Or just
+ * handle ordinary commands.
+ */
+
+ if(FTP_STOP == ftpc->state) {
+ int bits = GETSOCK_READSOCK(0);
+
+ /* if stopped and still in this state, then we're also waiting for a
+ connect on the secondary connection */
+ socks[0] = conn->sock[FIRSTSOCKET];
+
+ if(!conn->data->set.ftp_use_port) {
+ int s;
+ int i;
+ /* PORT is used to tell the server to connect to us, and during that we
+ don't do happy eyeballs, but we do if we connect to the server */
+ for(s=1, i=0; i<2; i++) {
+ if(conn->tempsock[i] != CURL_SOCKET_BAD) {
+ socks[s] = conn->tempsock[i];
+ bits |= GETSOCK_WRITESOCK(s++);
+ }
+ }
+ }
+ else {
+ socks[1] = conn->sock[SECONDARYSOCKET];
+ bits |= GETSOCK_WRITESOCK(1);
+ }
+
+ return bits;
+ }
+ else
+ return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks);
+}
+
/* This is called after the FTP_QUOTE state is passed.
ftp_state_cwd() sends the range of CWD commands to the server to change to
@@ -637,7 +922,7 @@ static CURLcode ftp_state_cwd(struct connectdata *conn)
if(ftpc->cwddone)
/* already done and fine */
- result = ftp_state_post_cwd(conn);
+ result = ftp_state_mdtm(conn);
else {
ftpc->count2 = 0; /* count2 counts failed CWDs */
@@ -665,7 +950,7 @@ static CURLcode ftp_state_cwd(struct connectdata *conn)
}
else {
/* No CWD necessary */
- result = ftp_state_post_cwd(conn);
+ result = ftp_state_mdtm(conn);
}
}
}
@@ -701,12 +986,13 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
static const char mode[][5] = { "EPRT", "PORT" };
int rc;
int error;
- char *host=NULL;
+ char *host = NULL;
char *string_ftpport = data->set.str[STRING_FTPPORT];
struct Curl_dns_entry *h=NULL;
unsigned short port_min = 0;
unsigned short port_max = 0;
unsigned short port;
+ bool possibly_non_local = TRUE;
char *addr = NULL;
@@ -731,7 +1017,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
char *port_sep = NULL;
addr = calloc(addrlen+1, 1);
- if (!addr)
+ if(!addr)
return CURLE_OUT_OF_MEMORY;
#ifdef ENABLE_IPV6
@@ -743,11 +1029,11 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
}
else
#endif
- if( *string_ftpport == ':') {
+ if(*string_ftpport == ':') {
/* :port */
ip_end = string_ftpport;
}
- else if( (ip_end = strchr(string_ftpport, ':')) != NULL) {
+ else if((ip_end = strchr(string_ftpport, ':')) != NULL) {
/* either ipv6 or (ipv4|domain|interface):port(-range) */
#ifdef ENABLE_IPV6
if(Curl_inet_pton(AF_INET6, string_ftpport, sa6) == 1) {
@@ -755,19 +1041,18 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
port_min = port_max = 0;
strcpy(addr, string_ftpport);
ip_end = NULL; /* this got no port ! */
- } else
+ }
+ else
#endif
- {
/* (ipv4|domain|interface):port(-range) */
strncpy(addr, string_ftpport, ip_end - ip_start );
- }
}
else
/* ipv4|interface */
strcpy(addr, string_ftpport);
/* parse the port */
- if( ip_end != NULL ) {
+ if(ip_end != NULL) {
if((port_start = strchr(ip_end, ':')) != NULL) {
port_min = curlx_ultous(strtoul(port_start+1, NULL, 10));
if((port_sep = strchr(port_start, '-')) != NULL) {
@@ -790,13 +1075,20 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
if(*addr != '\0') {
/* attempt to get the address of the given interface name */
- if(!Curl_if2ip(conn->ip_addr->ai_family, addr,
- hbuf, sizeof(hbuf)))
- /* not an interface, use the given string as host name instead */
- host = addr;
- else
- host = hbuf; /* use the hbuf for host name */
- }else
+ switch(Curl_if2ip(conn->ip_addr->ai_family,
+ Curl_ipv6_scope(conn->ip_addr->ai_addr),
+ conn->scope_id, addr, hbuf, sizeof(hbuf))) {
+ case IF2IP_NOT_FOUND:
+ /* not an interface, use the given string as host name instead */
+ host = addr;
+ break;
+ case IF2IP_AF_NOT_SUPPORTED:
+ return CURLE_FTP_PORT_FAILED;
+ case IF2IP_FOUND:
+ host = hbuf; /* use the hbuf for host name */
+ }
+ }
+ else
/* there was only a port(-range) given, default the host */
host = NULL;
} /* data->set.ftpport */
@@ -809,28 +1101,27 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
if(getsockname(conn->sock[FIRSTSOCKET], sa, &sslen)) {
failf(data, "getsockname() failed: %s",
Curl_strerror(conn, SOCKERRNO) );
- if (addr)
- free(addr);
+ free(addr);
return CURLE_FTP_PORT_FAILED;
}
- switch(sa->sa_family)
- {
+ switch(sa->sa_family) {
#ifdef ENABLE_IPV6
- case AF_INET6:
- Curl_inet_ntop(sa->sa_family, &sa6->sin6_addr, hbuf, sizeof(hbuf));
- break;
+ case AF_INET6:
+ Curl_inet_ntop(sa->sa_family, &sa6->sin6_addr, hbuf, sizeof(hbuf));
+ break;
#endif
- default:
- Curl_inet_ntop(sa->sa_family, &sa4->sin_addr, hbuf, sizeof(hbuf));
- break;
+ default:
+ Curl_inet_ntop(sa->sa_family, &sa4->sin_addr, hbuf, sizeof(hbuf));
+ break;
}
host = hbuf; /* use this host name */
+ possibly_non_local = FALSE; /* we know it is local now */
}
/* resolv ip/host to ip */
rc = Curl_resolv(conn, host, 0, &h);
if(rc == CURLRESOLV_PENDING)
- (void)Curl_wait_for_resolv(conn, &h);
+ (void)Curl_resolver_wait_resolv(conn, &h);
if(h) {
res = h->addr;
/* when we return from this function, we can forget about this entry
@@ -840,27 +1131,22 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
else
res = NULL; /* failure! */
- if (addr)
+ if(res == NULL) {
+ failf(data, "failed to resolve the address provided to PORT: %s", host);
free(addr);
-
- if (res == NULL) {
- failf(data, "Curl_resolv failed, we can not recover!");
return CURLE_FTP_PORT_FAILED;
}
+ free(addr);
+ host = NULL;
+
/* step 2, create a socket for the requested address */
portsock = CURL_SOCKET_BAD;
error = 0;
- for (ai = res; ai; ai = ai->ai_next) {
- /*
- * Workaround for AIX5 getaddrinfo() problem (it doesn't set ai_socktype):
- */
- if(ai->ai_socktype == 0)
- ai->ai_socktype = conn->socktype;
-
- portsock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
- if(portsock == CURL_SOCKET_BAD) {
+ for(ai = res; ai; ai = ai->ai_next) {
+ result = Curl_socket(conn, ai, NULL, &portsock);
+ if(result) {
error = SOCKERRNO;
continue;
}
@@ -876,8 +1162,8 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
memcpy(sa, ai->ai_addr, ai->ai_addrlen);
sslen = ai->ai_addrlen;
- for( port = port_min; port <= port_max; ) {
- if( sa->sa_family == AF_INET )
+ for(port = port_min; port <= port_max;) {
+ if(sa->sa_family == AF_INET)
sa4->sin_port = htons(port);
#ifdef ENABLE_IPV6
else
@@ -887,28 +1173,29 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
if(bind(portsock, sa, sslen) ) {
/* It failed. */
error = SOCKERRNO;
- if(error == EADDRNOTAVAIL) {
-
+ if(possibly_non_local && (error == EADDRNOTAVAIL)) {
/* The requested bind address is not local. Use the address used for
* the control connection instead and restart the port loop
*/
- failf(data, "bind(port=%hu) failed: %s", port,
+
+ infof(data, "bind(port=%hu) on non-local address failed: %s\n", port,
Curl_strerror(conn, error) );
sslen = sizeof(ss);
if(getsockname(conn->sock[FIRSTSOCKET], sa, &sslen)) {
failf(data, "getsockname() failed: %s",
Curl_strerror(conn, SOCKERRNO) );
- sclose(portsock);
+ Curl_closesocket(conn, portsock);
return CURLE_FTP_PORT_FAILED;
}
port = port_min;
+ possibly_non_local = FALSE; /* don't try this again */
continue;
}
else if(error != EADDRINUSE && error != EACCES) {
failf(data, "bind(port=%hu) failed: %s", port,
Curl_strerror(conn, error) );
- sclose(portsock);
+ Curl_closesocket(conn, portsock);
return CURLE_FTP_PORT_FAILED;
}
}
@@ -919,9 +1206,9 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
}
/* maybe all ports were in use already*/
- if (port > port_max) {
+ if(port > port_max) {
failf(data, "bind() failed, we ran out of ports!");
- sclose(portsock);
+ Curl_closesocket(conn, portsock);
return CURLE_FTP_PORT_FAILED;
}
@@ -931,7 +1218,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
if(getsockname(portsock, (struct sockaddr *)sa, &sslen)) {
failf(data, "getsockname() failed: %s",
Curl_strerror(conn, SOCKERRNO) );
- sclose(portsock);
+ Curl_closesocket(conn, portsock);
return CURLE_FTP_PORT_FAILED;
}
@@ -939,7 +1226,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
if(listen(portsock, 1)) {
failf(data, "socket failure: %s", Curl_strerror(conn, SOCKERRNO));
- sclose(portsock);
+ Curl_closesocket(conn, portsock);
return CURLE_FTP_PORT_FAILED;
}
@@ -956,17 +1243,17 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
conn->bits.ftp_use_eprt = TRUE;
#endif
- for (; fcmd != DONE; fcmd++) {
+ for(; fcmd != DONE; fcmd++) {
if(!conn->bits.ftp_use_eprt && (EPRT == fcmd))
/* if disabled, goto next */
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;
@@ -991,8 +1278,16 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd],
sa->sa_family == AF_INET?1:2,
myhost, port);
- if(result)
+ if(result) {
+ failf(data, "Failure sending EPRT command: %s",
+ curl_easy_strerror(result));
+ Curl_closesocket(conn, portsock);
+ /* don't retry using PORT */
+ ftpc->count1 = PORT;
+ /* bail out */
+ state(conn, FTP_STOP);
return result;
+ }
break;
}
else if(PORT == fcmd) {
@@ -1012,8 +1307,14 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff));
result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp);
- if(result)
+ if(result) {
+ failf(data, "Failure sending PORT command: %s",
+ curl_easy_strerror(result));
+ Curl_closesocket(conn, portsock);
+ /* bail out */
+ state(conn, FTP_STOP);
return result;
+ }
break;
}
}
@@ -1025,7 +1326,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
the cleanup function will close it in case we fail before the true
secondary stuff is made */
if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET])
- sclose(conn->sock[SECONDARYSOCKET]);
+ Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
conn->sock[SECONDARYSOCKET] = portsock;
/* this tcpconnect assignment below is a hackish work-around to make the
@@ -1035,7 +1336,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
The *proper* fix is to make sure that the active connection from the
server is done in a non-blocking way. Currently, it is still BLOCKING.
*/
- conn->bits.tcpconnect = TRUE;
+ conn->bits.tcpconnect[SECONDARYSOCKET] = TRUE;
state(conn, FTP_PORT);
return result;
@@ -1080,13 +1381,17 @@ static CURLcode ftp_state_use_pasv(struct connectdata *conn)
return result;
}
-/* REST is the last command in the chain of commands when a "head"-like
- request is made. Thus, if an actual transfer is to be made this is where
- we take off for real. */
-static CURLcode ftp_state_post_rest(struct connectdata *conn)
+/*
+ * ftp_state_prepare_transfer() starts PORT, PASV or PRET etc.
+ *
+ * REST is the last command in the chain of commands when a "head"-like
+ * request is made. Thus, if an actual transfer is to be made this is where we
+ * take off for real.
+ */
+static CURLcode ftp_state_prepare_transfer(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
- struct FTP *ftp = conn->data->state.proto.ftp;
+ struct FTP *ftp = conn->data->req.protop;
struct SessionHandle *data = conn->data;
if(ftp->transfer != FTPTRANSFER_BODY) {
@@ -1126,10 +1431,10 @@ static CURLcode ftp_state_post_rest(struct connectdata *conn)
return result;
}
-static CURLcode ftp_state_post_size(struct connectdata *conn)
+static CURLcode ftp_state_rest(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
- struct FTP *ftp = conn->data->state.proto.ftp;
+ struct FTP *ftp = conn->data->req.protop;
struct ftp_conn *ftpc = &conn->proto.ftpc;
if((ftp->transfer != FTPTRANSFER_BODY) && ftpc->file) {
@@ -1142,15 +1447,15 @@ static CURLcode ftp_state_post_size(struct connectdata *conn)
state(conn, FTP_REST);
}
else
- result = ftp_state_post_rest(conn);
+ result = ftp_state_prepare_transfer(conn);
return result;
}
-static CURLcode ftp_state_post_type(struct connectdata *conn)
+static CURLcode ftp_state_size(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
- struct FTP *ftp = conn->data->state.proto.ftp;
+ struct FTP *ftp = conn->data->req.protop;
struct ftp_conn *ftpc = &conn->proto.ftpc;
if((ftp->transfer == FTPTRANSFER_INFO) && ftpc->file) {
@@ -1162,12 +1467,12 @@ static CURLcode ftp_state_post_type(struct connectdata *conn)
state(conn, FTP_SIZE);
}
else
- result = ftp_state_post_size(conn);
+ result = ftp_state_rest(conn);
return result;
}
-static CURLcode ftp_state_post_listtype(struct connectdata *conn)
+static CURLcode ftp_state_list(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
@@ -1186,13 +1491,13 @@ static CURLcode ftp_state_post_listtype(struct connectdata *conn)
The other ftp_filemethods will CWD into dir/dir/ first and
then just do LIST (in that case: nothing to do here)
*/
- char *cmd,*lstArg,*slashPos;
+ char *cmd, *lstArg, *slashPos;
lstArg = NULL;
if((data->set.ftp_filemethod == FTPFILE_NOCWD) &&
data->state.path &&
data->state.path[0] &&
- strchr(data->state.path,'/')) {
+ strchr(data->state.path, '/')) {
lstArg = strdup(data->state.path);
if(!lstArg)
@@ -1202,7 +1507,7 @@ static CURLcode ftp_state_post_listtype(struct connectdata *conn)
if(lstArg[strlen(lstArg) - 1] != '/') {
/* chop off the file part if format is dir/dir/file */
- slashPos = strrchr(lstArg,'/');
+ slashPos = strrchr(lstArg, '/');
if(slashPos)
*(slashPos+1) = '\0';
}
@@ -1216,24 +1521,24 @@ static CURLcode ftp_state_post_listtype(struct connectdata *conn)
lstArg? lstArg: "" );
if(!cmd) {
- if(lstArg)
- free(lstArg);
+ free(lstArg);
return CURLE_OUT_OF_MEMORY;
}
- PPSENDF(&conn->proto.ftpc.pp, "%s",cmd);
-
- if(lstArg)
- free(lstArg);
+ result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", cmd);
+ free(lstArg);
free(cmd);
+ if(result)
+ return result;
+
state(conn, FTP_LIST);
return result;
}
-static CURLcode ftp_state_post_retrtype(struct connectdata *conn)
+static CURLcode ftp_state_retr_prequote(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
@@ -1244,7 +1549,7 @@ static CURLcode ftp_state_post_retrtype(struct connectdata *conn)
return result;
}
-static CURLcode ftp_state_post_stortype(struct connectdata *conn)
+static CURLcode ftp_state_stor_prequote(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
@@ -1255,10 +1560,10 @@ static CURLcode ftp_state_post_stortype(struct connectdata *conn)
return result;
}
-static CURLcode ftp_state_post_mdtm(struct connectdata *conn)
+static CURLcode ftp_state_type(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
- struct FTP *ftp = conn->data->state.proto.ftp;
+ struct FTP *ftp = conn->data->req.protop;
struct SessionHandle *data = conn->data;
struct ftp_conn *ftpc = &conn->proto.ftpc;
@@ -1281,14 +1586,14 @@ static CURLcode ftp_state_post_mdtm(struct connectdata *conn)
return result;
}
else
- result = ftp_state_post_type(conn);
+ result = ftp_state_size(conn);
return result;
}
/* This is called after the CWD commands have been done in the beginning of
the DO phase */
-static CURLcode ftp_state_post_cwd(struct connectdata *conn)
+static CURLcode ftp_state_mdtm(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
@@ -1304,7 +1609,7 @@ static CURLcode ftp_state_post_cwd(struct connectdata *conn)
state(conn, FTP_MDTM);
}
else
- result = ftp_state_post_mdtm(conn);
+ result = ftp_state_type(conn);
return result;
}
@@ -1315,7 +1620,7 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn,
bool sizechecked)
{
CURLcode result = CURLE_OK;
- struct FTP *ftp = conn->data->state.proto.ftp;
+ struct FTP *ftp = conn->data->req.protop;
struct SessionHandle *data = conn->data;
struct ftp_conn *ftpc = &conn->proto.ftpc;
int seekerr = CURL_SEEKFUNC_OK;
@@ -1360,18 +1665,16 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn,
else {
curl_off_t passed=0;
do {
- curl_off_t readthisamountnow = (data->state.resume_from - passed);
- curl_off_t actuallyread;
-
- if(readthisamountnow > BUFSIZE)
- readthisamountnow = BUFSIZE;
+ size_t readthisamountnow =
+ (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ?
+ BUFSIZE : curlx_sotouz(data->state.resume_from - passed);
- actuallyread = (curl_off_t)
- conn->fread_func(data->state.buffer, 1, (size_t)readthisamountnow,
- conn->fread_in);
+ size_t actuallyread =
+ data->set.fread_func(data->state.buffer, 1, readthisamountnow,
+ data->set.in);
passed += actuallyread;
- if((actuallyread <= 0) || (actuallyread > readthisamountnow)) {
+ if((actuallyread == 0) || (actuallyread > readthisamountnow)) {
/* this checks for greater-than only to make sure that the
CURL_READFUNC_ABORT return code still aborts */
failf(data, "Failed to read data");
@@ -1381,10 +1684,10 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn,
}
}
/* now, decrease the size of the read */
- if(data->set.infilesize>0) {
- data->set.infilesize -= data->state.resume_from;
+ if(data->state.infilesize>0) {
+ data->state.infilesize -= data->state.resume_from;
- if(data->set.infilesize <= 0) {
+ if(data->state.infilesize <= 0) {
infof(data, "File already completely uploaded\n");
/* no data to transfer */
@@ -1415,7 +1718,7 @@ static CURLcode ftp_state_quote(struct connectdata *conn,
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *ftp = data->state.proto.ftp;
+ struct FTP *ftp = data->req.protop;
struct ftp_conn *ftpc = &conn->proto.ftpc;
bool quote=FALSE;
struct curl_slist *item;
@@ -1481,7 +1784,7 @@ static CURLcode ftp_state_quote(struct connectdata *conn,
else {
if(ftpc->known_filesize != -1) {
Curl_pgrsSetDownloadSize(data, ftpc->known_filesize);
- result = ftp_state_post_retr_size(conn, ftpc->known_filesize);
+ result = ftp_state_retr(conn, ftpc->known_filesize);
}
else {
PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file);
@@ -1500,25 +1803,139 @@ static CURLcode ftp_state_quote(struct connectdata *conn,
return result;
}
+/* called from ftp_state_pasv_resp to switch to PASV in case of EPSV
+ problems */
+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;
+ conn->data->state.errorbuf = FALSE; /* allow error message to get
+ rewritten */
+ PPSENDF(&conn->proto.ftpc.pp, "%s", "PASV");
+ conn->proto.ftpc.count1++;
+ /* remain in/go to the FTP_PASV state */
+ state(conn, FTP_PASV);
+ return result;
+}
+
+/*
+ * Perform the necessary magic that needs to be done once the TCP connection
+ * to the proxy has completed.
+ */
+static CURLcode proxy_magic(struct connectdata *conn,
+ char *newhost, unsigned short newport,
+ bool *magicdone)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+
+#if defined(CURL_DISABLE_PROXY)
+ (void) newhost;
+ (void) newport;
+#endif
+
+ *magicdone = FALSE;
+
+ switch(conn->proxytype) {
+ case CURLPROXY_SOCKS5:
+ case CURLPROXY_SOCKS5_HOSTNAME:
+ result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost,
+ newport, SECONDARYSOCKET, conn);
+ *magicdone = TRUE;
+ break;
+ case CURLPROXY_SOCKS4:
+ result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
+ SECONDARYSOCKET, conn, FALSE);
+ *magicdone = TRUE;
+ break;
+ case CURLPROXY_SOCKS4A:
+ result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
+ SECONDARYSOCKET, conn, TRUE);
+ *magicdone = TRUE;
+ break;
+ case CURLPROXY_HTTP:
+ case CURLPROXY_HTTP_1_0:
+ /* do nothing here. handled later. */
+ break;
+ default:
+ failf(data, "unknown proxytype option given");
+ result = CURLE_COULDNT_CONNECT;
+ break;
+ }
+
+ if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
+ /* BLOCKING */
+ /* We want "seamless" FTP operations through HTTP proxy tunnel */
+
+ /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the
+ * member conn->proto.http; we want FTP through HTTP and we have to
+ * change the member temporarily for connecting to the HTTP proxy. After
+ * Curl_proxyCONNECT we have to set back the member to the original
+ * struct FTP pointer
+ */
+ struct HTTP http_proxy;
+ struct FTP *ftp_save = data->req.protop;
+ memset(&http_proxy, 0, sizeof(http_proxy));
+ data->req.protop = &http_proxy;
+
+ result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, newhost, newport);
+
+ data->req.protop = ftp_save;
+
+ if(result)
+ return result;
+
+ if(conn->tunnel_state[SECONDARYSOCKET] != TUNNEL_COMPLETE) {
+ /* the CONNECT procedure is not complete, the tunnel is not yet up */
+ state(conn, FTP_STOP); /* this phase is completed */
+ return result;
+ }
+ else
+ *magicdone = TRUE;
+ }
+
+ return result;
+}
+
+static char *control_address(struct connectdata *conn)
+{
+ /* Returns the control connection IP address.
+ If a proxy tunnel is used, returns the original host name instead, because
+ the effective control connection address is the proxy address,
+ not the ftp host. */
+ if(conn->bits.tunnel_proxy ||
+ conn->proxytype == CURLPROXY_SOCKS5 ||
+ conn->proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
+ conn->proxytype == CURLPROXY_SOCKS4 ||
+ conn->proxytype == CURLPROXY_SOCKS4A)
+ return conn->host.name;
+
+ return conn->ip_addr_str;
+}
+
static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
int ftpcode)
{
struct ftp_conn *ftpc = &conn->proto.ftpc;
CURLcode result;
struct SessionHandle *data=conn->data;
- Curl_addrinfo *conninfo;
struct Curl_dns_entry *addr=NULL;
int rc;
unsigned short connectport; /* the local port connect() should use! */
- unsigned short newport=0; /* remote port */
- bool connected;
-
- /* 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];
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 */
@@ -1527,12 +1944,12 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
unsigned int num;
char separator[4];
ptr++;
- if(5 == sscanf(ptr, "%c%c%c%u%c",
- &separator[0],
- &separator[1],
- &separator[2],
- &num,
- &separator[3])) {
+ if(5 == sscanf(ptr, "%c%c%c%u%c",
+ &separator[0],
+ &separator[1],
+ &separator[2],
+ &num,
+ &separator[3])) {
const char sep1 = separator[0];
int i;
@@ -1544,20 +1961,15 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
break;
}
}
+ if(num > 0xffff) {
+ failf(data, "Illegal port number in EPSV reply");
+ return CURLE_FTP_WEIRD_PASV_REPLY;
+ }
if(ptr) {
- newport = (unsigned short)(num & 0xffff);
-
- if(conn->bits.tunnel_proxy ||
- data->set.proxytype == CURLPROXY_SOCKS5 ||
- data->set.proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
- data->set.proxytype == CURLPROXY_SOCKS4 ||
- data->set.proxytype == CURLPROXY_SOCKS4A)
- /* proxy tunnel -> use other host info because ip_addr_str is the
- proxy address not the ftp host */
- snprintf(newhost, sizeof(newhost), "%s", conn->host.name);
- else
- /* use the same IP we are already connected to */
- snprintf(newhost, NEWHOST_BUFSIZE, "%s", conn->ip_addr_str);
+ ftpc->newport = (unsigned short)(num & 0xffff);
+ ftpc->newhost = strdup(control_address(conn));
+ if(!ftpc->newhost)
+ return CURLE_OUT_OF_MEMORY;
}
}
else
@@ -1585,8 +1997,8 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
*/
while(*str) {
if(6 == sscanf(str, "%d,%d,%d,%d,%d,%d",
- &ip[0], &ip[1], &ip[2], &ip[3],
- &port[0], &port[1]))
+ &ip[0], &ip[1], &ip[2], &ip[3],
+ &port[0], &port[1]))
break;
str++;
}
@@ -1598,57 +2010,41 @@ 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 one we used
+ /* told to ignore the remotely given IP but instead use the host we used
for the control connection */
- infof(data, "Skips %d.%d.%d.%d for data connection, uses %s instead\n",
+ infof(data, "Skip %d.%d.%d.%d for data connection, re-use %s instead\n",
ip[0], ip[1], ip[2], ip[3],
- conn->ip_addr_str);
- if(conn->bits.tunnel_proxy ||
- data->set.proxytype == CURLPROXY_SOCKS5 ||
- data->set.proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
- data->set.proxytype == CURLPROXY_SOCKS4 ||
- data->set.proxytype == CURLPROXY_SOCKS4A)
- /* proxy tunnel -> use other host info because ip_addr_str is the
- proxy address not the ftp host */
- snprintf(newhost, sizeof(newhost), "%s", conn->host.name);
- else
- snprintf(newhost, sizeof(newhost), "%s", conn->ip_addr_str);
+ conn->host.name);
+ ftpc->newhost = strdup(control_address(conn));
}
else
- snprintf(newhost, sizeof(newhost),
- "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
- newport = (unsigned short)(((port[0]<<8) + port[1]) & 0xffff);
+ ftpc->newhost = aprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
+
+ if(!ftpc->newhost)
+ return CURLE_OUT_OF_MEMORY;
+
+ ftpc->newport = (unsigned short)(((port[0]<<8) + port[1]) & 0xffff);
}
else if(ftpc->count1 == 0) {
/* EPSV failed, move on to PASV */
-
- /* disable it for next transfer */
- conn->bits.ftp_use_epsv = FALSE;
- infof(data, "disabling EPSV usage\n");
-
- PPSENDF(&ftpc->pp, "PASV", NULL);
- ftpc->count1++;
- /* remain in the FTP_PASV state */
- return result;
+ return ftp_epsv_disable(conn);
}
else {
failf(data, "Bad PASV/EPSV response: %03d", ftpcode);
return CURLE_FTP_WEIRD_PASV_REPLY;
}
- if(data->set.str[STRING_PROXY] && *data->set.str[STRING_PROXY]) {
+ if(conn->bits.proxy) {
/*
- * This is a tunnel through a http proxy and we need to connect to the
- * proxy again here.
- *
- * We don't want to rely on a former host lookup that might've expired
- * now, instead we remake the lookup here and now!
+ * This connection uses a proxy and we need to connect to the proxy again
+ * here. We don't want to rely on a former host lookup that might've
+ * expired now, instead we remake the lookup here and now!
*/
rc = Curl_resolv(conn, conn->proxy.name, (int)conn->port, &addr);
if(rc == CURLRESOLV_PENDING)
/* BLOCKING, ignores the return code but 'addr' will be NULL in
case of failure */
- (void)Curl_wait_for_resolv(conn, &addr);
+ (void)Curl_resolver_wait_resolv(conn, &addr);
connectport =
(unsigned short)conn->port; /* we connect to the proxy's port */
@@ -1661,109 +2057,43 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
}
else {
/* normal, direct, ftp connection */
- rc = Curl_resolv(conn, newhost, newport, &addr);
+ rc = Curl_resolv(conn, ftpc->newhost, ftpc->newport, &addr);
if(rc == CURLRESOLV_PENDING)
/* BLOCKING */
- (void)Curl_wait_for_resolv(conn, &addr);
+ (void)Curl_resolver_wait_resolv(conn, &addr);
- connectport = newport; /* we connect to the remote port */
+ connectport = ftpc->newport; /* we connect to the remote port */
if(!addr) {
- failf(data, "Can't resolve new host %s:%hu", newhost, connectport);
+ failf(data, "Can't resolve new host %s:%hu", ftpc->newhost, connectport);
return CURLE_FTP_CANT_GET_HOST;
}
}
- result = Curl_connecthost(conn,
- addr,
- &conn->sock[SECONDARYSOCKET],
- &conninfo,
- &connected);
+ conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE;
+ result = Curl_connecthost(conn, addr);
- Curl_resolv_unlock(data, addr); /* we're done using this address */
+ if(result) {
+ Curl_resolv_unlock(data, addr); /* we're done using this address */
+ if(ftpc->count1 == 0 && ftpcode == 229)
+ return ftp_epsv_disable(conn);
- if(result && ftpc->count1 == 0 && ftpcode == 229) {
- infof(data, "got positive EPSV response, but can't connect. "
- "Disabling EPSV\n");
- /* disable it for next transfer */
- conn->bits.ftp_use_epsv = FALSE;
- data->state.errorbuf = FALSE; /* allow error message to get rewritten */
- PPSENDF(&ftpc->pp, "PASV", NULL);
- ftpc->count1++;
- /* remain in the FTP_PASV state */
- return result;
- }
-
- if(result)
return result;
+ }
- conn->bits.tcpconnect = connected; /* simply TRUE or FALSE */
/*
* When this is used from the multi interface, this might've returned with
* the 'connected' set to FALSE and thus we are now awaiting a non-blocking
- * connect to connect and we should not be "hanging" here waiting.
+ * connect to connect.
*/
if(data->set.verbose)
/* this just dumps information about this second connection */
- ftp_pasv_verbose(conn, conninfo, newhost, connectport);
-
- switch(data->set.proxytype) {
-#ifndef CURL_DISABLE_PROXY
- /* FIX: this MUST wait for a proper connect first if 'connected' is
- * FALSE */
- case CURLPROXY_SOCKS5:
- case CURLPROXY_SOCKS5_HOSTNAME:
- result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport,
- SECONDARYSOCKET, conn);
- break;
- case CURLPROXY_SOCKS4:
- result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
- SECONDARYSOCKET, conn, FALSE);
- break;
- case CURLPROXY_SOCKS4A:
- result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
- SECONDARYSOCKET, conn, TRUE);
- break;
-#endif /* CURL_DISABLE_PROXY */
- case CURLPROXY_HTTP:
- case CURLPROXY_HTTP_1_0:
- /* do nothing here. handled later. */
- break;
- default:
- failf(data, "unknown proxytype option given");
- result = CURLE_COULDNT_CONNECT;
- break;
- }
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
- if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
- /* FIX: this MUST wait for a proper connect first if 'connected' is
- * FALSE */
-
- /* BLOCKING */
- /* We want "seamless" FTP operations through HTTP proxy tunnel */
-
- /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
- * conn->proto.http; we want FTP through HTTP and we have to change the
- * member temporarily for connecting to the HTTP proxy. After
- * Curl_proxyCONNECT we have to set back the member to the original struct
- * FTP pointer
- */
- struct HTTP http_proxy;
- struct FTP *ftp_save = data->state.proto.ftp;
- memset(&http_proxy, 0, sizeof(http_proxy));
- data->state.proto.http = &http_proxy;
-
- result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, newhost, newport);
-
- data->state.proto.ftp = ftp_save;
-
- if(CURLE_OK != result)
- return result;
- }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
+ ftp_pasv_verbose(conn, addr->addr, ftpc->newhost, connectport);
+ Curl_resolv_unlock(data, addr); /* we're done using this address */
+ conn->bits.do_more = TRUE;
state(conn, FTP_STOP); /* this phase is completed */
return result;
@@ -1777,7 +2107,9 @@ static CURLcode ftp_state_port_resp(struct connectdata *conn,
ftpport fcmd = (ftpport)ftpc->count1;
CURLcode result = CURLE_OK;
- if(ftpcode != 200) {
+ /* The FTP spec tells a positive response should have code 200.
+ Be more permissive here to tolerate deviant servers. */
+ if(ftpcode / 100 != 2) {
/* the command failed */
if(EPRT == fcmd) {
@@ -1797,6 +2129,7 @@ static CURLcode ftp_state_port_resp(struct connectdata *conn,
else {
infof(data, "Connect data stream actively\n");
state(conn, FTP_STOP); /* end of DO phase */
+ result = ftp_dophase_done(conn, FALSE);
}
return result;
@@ -1807,7 +2140,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
{
CURLcode result = CURLE_OK;
struct SessionHandle *data=conn->data;
- struct FTP *ftp = data->state.proto.ftp;
+ struct FTP *ftp = data->req.protop;
struct ftp_conn *ftpc = &conn->proto.ftpc;
switch(ftpcode) {
@@ -1837,14 +2170,14 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
ftpc->file &&
data->set.get_filetime &&
(data->info.filetime>=0) ) {
- struct tm *tm;
time_t filetime = (time_t)data->info.filetime;
-#ifdef HAVE_GMTIME_R
struct tm buffer;
- tm = (struct tm *)gmtime_r(&filetime, &buffer);
-#else
- tm = gmtime(&filetime);
-#endif
+ const struct tm *tm = &buffer;
+
+ result = Curl_gmtime(filetime, &buffer);
+ if(result)
+ return result;
+
/* format: "Tue, 15 Nov 1994 12:45:26" */
snprintf(buf, BUFSIZE-1,
"Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",
@@ -1901,7 +2234,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
}
if(!result)
- result = ftp_state_post_mdtm(conn);
+ result = ftp_state_type(conn);
return result;
}
@@ -1925,23 +2258,23 @@ static CURLcode ftp_state_type_resp(struct connectdata *conn,
ftpcode);
if(instate == FTP_TYPE)
- result = ftp_state_post_type(conn);
+ result = ftp_state_size(conn);
else if(instate == FTP_LIST_TYPE)
- result = ftp_state_post_listtype(conn);
+ result = ftp_state_list(conn);
else if(instate == FTP_RETR_TYPE)
- result = ftp_state_post_retrtype(conn);
+ result = ftp_state_retr_prequote(conn);
else if(instate == FTP_STOR_TYPE)
- result = ftp_state_post_stortype(conn);
+ result = ftp_state_stor_prequote(conn);
return result;
}
-static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
+static CURLcode ftp_state_retr(struct connectdata *conn,
curl_off_t filesize)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data=conn->data;
- struct FTP *ftp = data->state.proto.ftp;
+ struct FTP *ftp = data->req.protop;
struct ftp_conn *ftpc = &conn->proto.ftpc;
if(data->set.max_filesize && (filesize > data->set.max_filesize)) {
@@ -1966,8 +2299,8 @@ static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
if(data->state.resume_from< 0) {
/* We're supposed to download the last abs(from) bytes */
if(filesize < -data->state.resume_from) {
- failf(data, "Offset (%" FORMAT_OFF_T
- ") was beyond file size (%" FORMAT_OFF_T ")",
+ failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T
+ ") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")",
data->state.resume_from, filesize);
return CURLE_BAD_DOWNLOAD_RESUME;
}
@@ -1978,8 +2311,8 @@ static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
}
else {
if(filesize < data->state.resume_from) {
- failf(data, "Offset (%" FORMAT_OFF_T
- ") was beyond file size (%" FORMAT_OFF_T ")",
+ failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T
+ ") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")",
data->state.resume_from, filesize);
return CURLE_BAD_DOWNLOAD_RESUME;
}
@@ -2001,13 +2334,13 @@ static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
}
/* Set resume file transfer offset */
- infof(data, "Instructs server to resume from offset %" FORMAT_OFF_T
- "\n", data->state.resume_from);
+ infof(data, "Instructs server to resume from offset %"
+ CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from);
- PPSENDF(&ftpc->pp, "REST %" FORMAT_OFF_T, data->state.resume_from);
+ PPSENDF(&ftpc->pp, "REST %" CURL_FORMAT_CURL_OFF_T,
+ data->state.resume_from);
state(conn, FTP_RETR_REST);
-
}
else {
/* no resume */
@@ -2034,18 +2367,18 @@ static CURLcode ftp_state_size_resp(struct connectdata *conn,
#ifdef CURL_FTP_HTTPSTYLE_HEAD
if(-1 != filesize) {
snprintf(buf, sizeof(data->state.buffer),
- "Content-Length: %" FORMAT_OFF_T "\r\n", filesize);
+ "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", filesize);
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
if(result)
return result;
}
#endif
Curl_pgrsSetDownloadSize(data, filesize);
- result = ftp_state_post_size(conn);
+ result = ftp_state_rest(conn);
}
else if(instate == FTP_RETR_SIZE) {
Curl_pgrsSetDownloadSize(data, filesize);
- result = ftp_state_post_retr_size(conn, filesize);
+ result = ftp_state_retr(conn, filesize);
}
else if(instate == FTP_STOR_SIZE) {
data->state.resume_from = filesize;
@@ -2073,7 +2406,7 @@ static CURLcode ftp_state_rest_resp(struct connectdata *conn,
return result;
}
#endif
- result = ftp_state_post_rest(conn);
+ result = ftp_state_prepare_transfer(conn);
break;
case FTP_RETR_REST:
@@ -2092,53 +2425,40 @@ static CURLcode ftp_state_rest_resp(struct connectdata *conn,
}
static CURLcode ftp_state_stor_resp(struct connectdata *conn,
- int ftpcode)
+ int ftpcode, ftpstate instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *ftp = data->state.proto.ftp;
if(ftpcode>=400) {
failf(data, "Failed FTP upload: %0d", ftpcode);
+ state(conn, FTP_STOP);
/* oops, we never close the sockets! */
return CURLE_UPLOAD_FAILED;
}
+ conn->proto.ftpc.state_saved = instate;
+
+ /* PORT means we are now awaiting the server to connect to us. */
if(data->set.ftp_use_port) {
- /* BLOCKING */
- /* PORT means we are now awaiting the server to connect to us. */
- result = AllowServerConnect(conn);
- if( result )
- return result;
- }
+ bool connected;
- if(conn->ssl[SECONDARYSOCKET].use) {
- /* since we only have a plaintext TCP connection here, we must now
- do the TLS stuff */
- infof(data, "Doing the SSL/TLS handshake on the data stream\n");
- /* BLOCKING */
- result = Curl_ssl_connect(conn, SECONDARYSOCKET);
+ state(conn, FTP_STOP); /* no longer in STOR state */
+
+ result = AllowServerConnect(conn, &connected);
if(result)
return result;
- }
-
- *(ftp->bytecountp)=0;
- /* When we know we're uploading a specified file, we can get the file
- size prior to the actual upload. */
-
- Curl_pgrsSetUploadSize(data, data->set.infilesize);
-
- /* set the SO_SNDBUF for the secondary socket for those who need it */
- Curl_sndbufset(conn->sock[SECONDARYSOCKET]);
-
- Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
- SECONDARYSOCKET, ftp->bytecountp);
- state(conn, FTP_STOP);
-
- conn->proto.ftpc.pp.pending_resp = TRUE; /* expect a server response */
+ if(!connected) {
+ struct ftp_conn *ftpc = &conn->proto.ftpc;
+ infof(data, "Data conn was not available immediately\n");
+ ftpc->wait_data_conn = TRUE;
+ }
- return result;
+ return CURLE_OK;
+ }
+ else
+ return InitiateTransfer(conn);
}
/* for LIST and RETR responses */
@@ -2148,7 +2468,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *ftp = data->state.proto.ftp;
+ struct FTP *ftp = data->req.protop;
char *buf = data->state.buffer;
if((ftpcode == 150) || (ftpcode == 125)) {
@@ -2156,7 +2476,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
/*
A;
150 Opening BINARY mode data connection for /etc/passwd (2241
- bytes). (ok, the file is being transfered)
+ bytes). (ok, the file is being transferred)
B:
150 Opening ASCII mode data connection for /bin/ls
@@ -2165,7 +2485,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
150 ASCII data connection for /bin/ls (137.167.104.91,37445) (0 bytes).
D:
- 150 Opening ASCII mode data connection for /linux/fisk/kpanelrc (0.0.0.0,0) (545 bytes).
+ 150 Opening ASCII mode data connection for [file] (0.0.0.0,0) (545 bytes)
E:
125 Data connection already open; Transfer starting. */
@@ -2188,7 +2508,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
/*
* It seems directory listings either don't show the size or very
* often uses size 0 anyway. ASCII transfers may very well turn out
- * that the transfered amount of data is not the same as this line
+ * that the transferred amount of data is not the same as this line
* tells, why using this number in those cases only confuses us.
*
* Example D above makes this parsing a little tricky */
@@ -2219,38 +2539,38 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
else if(ftp->downloadsize > -1)
size = ftp->downloadsize;
- if(data->set.ftp_use_port) {
- /* BLOCKING */
- result = AllowServerConnect(conn);
- if( result )
- return result;
- }
-
- if(conn->ssl[SECONDARYSOCKET].use) {
- /* since we only have a plaintext TCP connection here, we must now
- do the TLS stuff */
- infof(data, "Doing the SSL/TLS handshake on the data stream\n");
- result = Curl_ssl_connect(conn, SECONDARYSOCKET);
- if(result)
- return result;
- }
-
if(size > data->req.maxdownload && data->req.maxdownload > 0)
size = data->req.size = data->req.maxdownload;
else if((instate != FTP_LIST) && (data->set.prefer_ascii))
size = -1; /* kludge for servers that understate ASCII mode file size */
- infof(data, "Maxdownload = %" FORMAT_OFF_T "\n", data->req.maxdownload);
+ infof(data, "Maxdownload = %" CURL_FORMAT_CURL_OFF_T "\n",
+ data->req.maxdownload);
if(instate != FTP_LIST)
- infof(data, "Getting file with size: %" FORMAT_OFF_T "\n", size);
+ infof(data, "Getting file with size: %" CURL_FORMAT_CURL_OFF_T "\n",
+ size);
/* FTP download: */
- Curl_setup_transfer(conn, SECONDARYSOCKET, size, FALSE,
- ftp->bytecountp, -1, NULL); /* no upload here */
+ conn->proto.ftpc.state_saved = instate;
+ conn->proto.ftpc.retr_size_saved = size;
- conn->proto.ftpc.pp.pending_resp = TRUE; /* expect server response */
- state(conn, FTP_STOP);
+ if(data->set.ftp_use_port) {
+ bool connected;
+
+ result = AllowServerConnect(conn, &connected);
+ if(result)
+ return result;
+
+ if(!connected) {
+ struct ftp_conn *ftpc = &conn->proto.ftpc;
+ infof(data, "Data conn was not available immediately\n");
+ state(conn, FTP_STOP);
+ ftpc->wait_data_conn = TRUE;
+ }
+ }
+ else
+ return InitiateTransfer(conn);
}
else {
if((instate == FTP_LIST) && (ftpcode == 450)) {
@@ -2274,19 +2594,6 @@ static CURLcode ftp_state_loggedin(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
-#ifdef HAVE_KRB4
- if(conn->data->set.krb) {
- /* We may need to issue a KAUTH here to have access to the files
- * do it if user supplied a password
- */
- if(conn->passwd && *conn->passwd) {
- /* BLOCKING */
- result = Curl_krb_kauth(conn);
- if(result)
- return result;
- }
- }
-#endif
if(conn->ssl[FIRSTSOCKET].use) {
/* PBSZ = PROTECTION BUFFER SIZE.
@@ -2318,7 +2625,7 @@ static CURLcode ftp_state_user_resp(struct connectdata *conn,
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *ftp = data->state.proto.ftp;
+ struct FTP *ftp = data->req.protop;
struct ftp_conn *ftpc = &conn->proto.ftpc;
(void)instate; /* no use for this yet */
@@ -2398,7 +2705,6 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
if(pp->sendleft)
return Curl_pp_flushsend(pp);
- /* we read a piece of response */
result = ftp_readresp(sock, pp, &ftpcode, &nread);
if(result)
return result;
@@ -2407,14 +2713,17 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
/* we have now received a full FTP server response */
switch(ftpc->state) {
case FTP_WAIT220:
- if(ftpcode != 220) {
+ if(ftpcode == 230)
+ /* 230 User logged in - already! */
+ return ftp_state_user_resp(conn, ftpcode, ftpc->state);
+ else if(ftpcode != 220) {
failf(data, "Got a %03d ftp-server response when 220 was expected",
ftpcode);
return CURLE_FTP_WEIRD_SERVER_REPLY;
}
/* We have received a 220 response fine, now we proceed. */
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+#ifdef HAVE_GSSAPI
if(data->set.krb) {
/* If not anonymous login, try a secure login. Note that this
procedure is still BLOCKING. */
@@ -2424,14 +2733,14 @@ 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) != CURLE_OK)
+ if(Curl_sec_login(conn))
infof(data, "Logging in with password in cleartext!\n");
else
infof(data, "Authentication successful\n");
}
#endif
- if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
+ if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
/* We don't have a SSL/TLS connection yet, but FTPS is
requested. Try a FTPS connection now */
@@ -2449,7 +2758,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
default:
failf(data, "unsupported parameter to CURLOPT_FTPSSLAUTH: %d",
(int)data->set.ftpsslauth);
- return CURLE_FAILED_INIT; /* we don't know what to do */
+ return CURLE_UNKNOWN_OPTION; /* we don't know what to do */
}
PPSENDF(&ftpc->pp, "AUTH %s", ftpauth[ftpc->count1]);
state(conn, FTP_AUTH);
@@ -2475,8 +2784,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(CURLE_OK == result) {
- conn->protocol |= PROT_FTPS;
+ if(!result) {
conn->ssl[SECONDARYSOCKET].use = FALSE; /* clear-text data */
result = ftp_state_user(conn);
}
@@ -2488,7 +2796,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
/* remain in this same state */
}
else {
- if(data->set.ftp_ssl > CURLUSESSL_TRY)
+ if(data->set.use_ssl > CURLUSESSL_TRY)
/* we failed and CURLUSESSL_CONTROL or CURLUSESSL_ALL is set */
result = CURLE_USE_SSL_FAILED;
else
@@ -2511,7 +2819,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
case FTP_PBSZ:
PPSENDF(&ftpc->pp, "PROT %c",
- data->set.ftp_ssl == CURLUSESSL_CONTROL ? 'C' : 'P');
+ data->set.use_ssl == CURLUSESSL_CONTROL ? 'C' : 'P');
state(conn, FTP_PROT);
break;
@@ -2520,17 +2828,17 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
if(ftpcode/100 == 2)
/* We have enabled SSL for the data connection! */
conn->ssl[SECONDARYSOCKET].use =
- (bool)(data->set.ftp_ssl != CURLUSESSL_CONTROL);
+ (data->set.use_ssl != CURLUSESSL_CONTROL) ? TRUE : FALSE;
/* FTP servers typically responds with 500 if they decide to reject
our 'P' request */
- else if(data->set.ftp_ssl > CURLUSESSL_CONTROL)
+ else if(data->set.use_ssl > CURLUSESSL_CONTROL)
/* we failed and bails out */
return CURLE_USE_SSL_FAILED;
if(data->set.ftp_ccc) {
/* CCC - Clear Command Channel
*/
- PPSENDF(&ftpc->pp, "CCC", NULL);
+ PPSENDF(&ftpc->pp, "%s", "CCC");
state(conn, FTP_CCC);
}
else {
@@ -2568,17 +2876,23 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
return CURLE_OUT_OF_MEMORY;
/* Reply format is like
- 257<space>"<directory-name>"<space><commentary> and the RFC959
- says
+ 257<space>[rubbish]"<directory-name>"<space><commentary> and the
+ RFC959 says
The directory name can contain any character; embedded
double-quotes should be escaped by double-quotes (the
"quote-doubling" convention).
*/
+
+ /* scan for the first double-quote for non-standard responses */
+ while(ptr < &data->state.buffer[sizeof(data->state.buffer)]
+ && *ptr != '\n' && *ptr != '\0' && *ptr != '"')
+ ptr++;
+
if('\"' == *ptr) {
/* it started good */
ptr++;
- for (store = dir; *ptr;) {
+ for(store = dir; *ptr;) {
if('\"' == *ptr) {
if('\"' == ptr[1]) {
/* "quote-doubling" */
@@ -2596,12 +2910,6 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
store++;
ptr++;
}
- if(ftpc->entrypath)
- free(ftpc->entrypath);
- ftpc->entrypath =dir; /* remember this */
- infof(data, "Entry path is '%s'\n", ftpc->entrypath);
- /* also save it where getinfo can access it: */
- data->state.most_recent_ftp_entrypath = ftpc->entrypath;
/* If the path name does not look like an absolute path (i.e.: it
does not start with a '/'), we probably need some server-dependent
@@ -2615,11 +2923,27 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
if the path name looks strange to minimize overhead on other
systems. */
- if(!ftpc->server_os && ftpc->entrypath[0] != '/') {
- PPSENDF(&ftpc->pp, "SYST", NULL);
+ if(!ftpc->server_os && dir[0] != '/') {
+
+ result = Curl_pp_sendf(&ftpc->pp, "%s", "SYST");
+ if(result) {
+ free(dir);
+ return result;
+ }
+ Curl_safefree(ftpc->entrypath);
+ ftpc->entrypath = dir; /* remember this */
+ infof(data, "Entry path is '%s'\n", ftpc->entrypath);
+ /* also save it where getinfo can access it: */
+ data->state.most_recent_ftp_entrypath = ftpc->entrypath;
state(conn, FTP_SYST);
break;
}
+
+ Curl_safefree(ftpc->entrypath);
+ ftpc->entrypath = dir; /* remember this */
+ infof(data, "Entry path is '%s'\n", ftpc->entrypath);
+ /* also save it where getinfo can access it: */
+ data->state.most_recent_ftp_entrypath = ftpc->entrypath;
}
else {
/* couldn't get the path */
@@ -2644,24 +2968,33 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
/* Reply format is like
215<space><OS-name><space><commentary>
*/
- while (*ptr == ' ')
+ while(*ptr == ' ')
ptr++;
- for (store = os; *ptr && *ptr != ' ';)
+ for(store = os; *ptr && *ptr != ' ';)
*store++ = *ptr++;
*store = '\0'; /* zero terminate */
- ftpc->server_os = os;
/* Check for special servers here. */
- if(strequal(ftpc->server_os, "OS/400")) {
+ if(strequal(os, "OS/400")) {
/* Force OS400 name format 1. */
- PPSENDF(&ftpc->pp, "SITE NAMEFMT 1", NULL);
+ result = Curl_pp_sendf(&ftpc->pp, "%s", "SITE NAMEFMT 1");
+ if(result) {
+ free(os);
+ return result;
+ }
+ /* remember target server OS */
+ Curl_safefree(ftpc->server_os);
+ ftpc->server_os = os;
state(conn, FTP_NAMEFMT);
break;
}
- else {
- /* Nothing special for the target server. */
- }
+ else {
+ /* Nothing special for the target server. */
+ /* remember target server OS */
+ Curl_safefree(ftpc->server_os);
+ ftpc->server_os = os;
+ }
}
else {
/* Cannot identify server OS. Continue anyway and cross fingers. */
@@ -2687,7 +3020,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
case FTP_RETR_PREQUOTE:
case FTP_STOR_PREQUOTE:
if((ftpcode >= 400) && !ftpc->count2) {
- /* failure reponse code, and not allowed to fail */
+ /* failure response code, and not allowed to fail */
failf(conn->data, "QUOT command failed with %03d", ftpcode);
return CURLE_QUOTE_ERROR;
}
@@ -2723,7 +3056,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->count1 - 1]);
}
else {
- result = ftp_state_post_cwd(conn);
+ result = ftp_state_mdtm(conn);
if(result)
return result;
}
@@ -2765,7 +3098,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
case FTP_PRET:
if(ftpcode != 200) {
- /* there only is this one standard OK return code. */
+ /* there only is this one standard OK return code. */
failf(data, "PRET command not accepted: %03d", ftpcode);
return CURLE_FTP_PRET_FAILED;
}
@@ -2786,7 +3119,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
break;
case FTP_STOR:
- result = ftp_state_stor_resp(conn, ftpcode);
+ result = ftp_state_stor_resp(conn, ftpcode, ftpc->state);
break;
case FTP_QUIT:
@@ -2807,24 +3140,24 @@ static CURLcode ftp_multi_statemach(struct connectdata *conn,
bool *done)
{
struct ftp_conn *ftpc = &conn->proto.ftpc;
- CURLcode result = Curl_pp_multi_statemach(&ftpc->pp);
+ CURLcode result = Curl_pp_statemach(&ftpc->pp, FALSE);
/* Check for the state outside of the Curl_socket_ready() return code checks
since at times we are in fact already in this state when this function
gets called. */
- *done = (bool)(ftpc->state == FTP_STOP);
+ *done = (ftpc->state == FTP_STOP) ? TRUE : FALSE;
return result;
}
-static CURLcode ftp_easy_statemach(struct connectdata *conn)
+static CURLcode ftp_block_statemach(struct connectdata *conn)
{
struct ftp_conn *ftpc = &conn->proto.ftpc;
struct pingpong *pp = &ftpc->pp;
CURLcode result = CURLE_OK;
while(ftpc->state != FTP_STOP) {
- result = Curl_pp_easy_statemach(pp);
+ result = Curl_pp_statemach(pp, TRUE);
if(result)
break;
}
@@ -2833,122 +3166,32 @@ static CURLcode ftp_easy_statemach(struct connectdata *conn)
}
/*
- * Allocate and initialize the struct FTP for the current SessionHandle. If
- * need be.
- */
-
-#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \
- defined(__OPTIMIZE__) && defined(__unix__) && defined(__i386__)
- /* workaround icc 9.1 optimizer issue */
-#pragma optimize("", off)
-#endif
-
-static CURLcode ftp_init(struct connectdata *conn)
-{
- struct FTP *ftp;
-
- if(NULL == conn->data->state.proto.ftp) {
- conn->data->state.proto.ftp = malloc(sizeof(struct FTP));
- if(NULL == conn->data->state.proto.ftp)
- return CURLE_OUT_OF_MEMORY;
- }
-
- ftp = conn->data->state.proto.ftp;
-
- /* get some initial data into the ftp struct */
- ftp->bytecountp = &conn->data->req.bytecount;
- ftp->transfer = FTPTRANSFER_BODY;
- ftp->downloadsize = 0;
-
- /* No need to duplicate user+password, the connectdata struct won't change
- during a session, but we re-init them here since on subsequent inits
- since the conn struct may have changed or been replaced.
- */
- ftp->user = conn->user;
- ftp->passwd = conn->passwd;
- if(TRUE == isBadFtpString(ftp->user))
- return CURLE_URL_MALFORMAT;
- if(TRUE == isBadFtpString(ftp->passwd))
- return CURLE_URL_MALFORMAT;
-
- conn->proto.ftpc.known_filesize = -1; /* unknown size for now */
-
- return CURLE_OK;
-}
-
-#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \
- defined(__OPTIMIZE__) && defined(__unix__) && defined(__i386__)
- /* workaround icc 9.1 optimizer issue */
-#pragma optimize("", on)
-#endif
-
-/*
* ftp_connect() should do everything that is to be considered a part of
* the connection phase.
*
* The variable 'done' points to will be TRUE if the protocol-layer connect
- * phase is done when this function returns, or FALSE is not. When called as
- * a part of the easy interface, it will always be TRUE.
+ * phase is done when this function returns, or FALSE if not.
+ *
*/
static CURLcode ftp_connect(struct connectdata *conn,
bool *done) /* see description above */
{
CURLcode result;
struct ftp_conn *ftpc = &conn->proto.ftpc;
- struct SessionHandle *data=conn->data;
struct pingpong *pp = &ftpc->pp;
*done = FALSE; /* default to not done yet */
- /* If there already is a protocol-specific struct allocated for this
- sessionhandle, deal with it */
- Curl_reset_reqproto(conn);
-
- result = ftp_init(conn);
- if(CURLE_OK != result)
- return result;
-
- /* We always support persistant connections on ftp */
- conn->bits.close = FALSE;
+ /* We always support persistent connections on ftp */
+ connkeep(conn, "FTP default");
pp->response_time = RESP_TIMEOUT; /* set default response time-out */
pp->statemach_act = ftp_statemach_act;
pp->endofresp = ftp_endofresp;
pp->conn = conn;
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
- if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
- /* for FTP over HTTP proxy */
- struct HTTP http_proxy;
- struct FTP *ftp_save;
-
- /* BLOCKING */
- /* We want "seamless" FTP operations through HTTP proxy tunnel */
-
- /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
- * conn->proto.http; we want FTP through HTTP and we have to change the
- * member temporarily for connecting to the HTTP proxy. After
- * Curl_proxyCONNECT we have to set back the member to the original struct
- * FTP pointer
- */
- ftp_save = data->state.proto.ftp;
- memset(&http_proxy, 0, sizeof(http_proxy));
- data->state.proto.http = &http_proxy;
-
- result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
- conn->host.name, conn->remote_port);
-
- data->state.proto.ftp = ftp_save;
-
- if(CURLE_OK != result)
- return result;
- }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
-
- if(conn->protocol & PROT_FTPS) {
+ if(conn->handler->flags & PROTOPT_SSL) {
/* BLOCKING */
- /* FTPS is simply ftp with SSL for the control channel */
- /* now, perform the SSL initialization for this socket */
result = Curl_ssl_connect(conn, FIRSTSOCKET);
if(result)
return result;
@@ -2960,13 +3203,7 @@ static CURLcode ftp_connect(struct connectdata *conn,
response */
state(conn, FTP_WAIT220);
- if(data->state.used_interface == Curl_if_multi)
- result = ftp_multi_statemach(conn, done);
- else {
- result = ftp_easy_statemach(conn);
- if(!result)
- *done = TRUE;
- }
+ result = ftp_multi_statemach(conn, done);
return result;
}
@@ -2984,12 +3221,12 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
bool premature)
{
struct SessionHandle *data = conn->data;
- struct FTP *ftp = data->state.proto.ftp;
+ struct FTP *ftp = data->req.protop;
struct ftp_conn *ftpc = &conn->proto.ftpc;
struct pingpong *pp = &ftpc->pp;
ssize_t nread;
int ftpcode;
- CURLcode result=CURLE_OK;
+ CURLcode result = CURLE_OK;
bool was_ctl_valid = ftpc->ctl_valid;
char *path;
const char *path_to_use = data->state.path;
@@ -3006,8 +3243,11 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
case CURLE_BAD_DOWNLOAD_RESUME:
case CURLE_FTP_WEIRD_PASV_REPLY:
case CURLE_FTP_PORT_FAILED:
+ case CURLE_FTP_ACCEPT_FAILED:
+ case CURLE_FTP_ACCEPT_TIMEOUT:
case CURLE_FTP_COULDNT_SET_TYPE:
case CURLE_FTP_COULDNT_RETR_FILE:
+ case CURLE_PARTIAL_FILE:
case CURLE_UPLOAD_FAILED:
case CURLE_REMOTE_ACCESS_DENIED:
case CURLE_FILESIZE_EXCEEDED:
@@ -3027,14 +3267,13 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
ftpc->ctl_valid = FALSE;
ftpc->cwdfail = TRUE; /* set this TRUE to prevent us to remember the
current path, as this connection is going */
- conn->bits.close = TRUE; /* marked for closure */
+ connclose(conn, "FTP ended with bad error code");
result = status; /* use the already set error code */
break;
}
/* now store a copy of the directory we are in */
- if(ftpc->prevpath)
- free(ftpc->prevpath);
+ free(ftpc->prevpath);
if(data->set.wildcardmatch) {
if(data->set.chunk_end && ftpc->file) {
@@ -3047,8 +3286,12 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
path = curl_easy_unescape(data, path_to_use, 0, NULL);
if(!path) {
/* out of memory, but we can limp along anyway (and should try to
- * since we're in the out of memory cleanup path) */
- ftpc->prevpath = NULL; /* no path */
+ * since we may already be in the out of memory cleanup path) */
+ if(!result)
+ result = CURLE_OUT_OF_MEMORY;
+ ftpc->ctl_valid = FALSE; /* mark control connection as bad */
+ connclose(conn, "FTP: out of memory!"); /* mark for connection closure */
+ ftpc->prevpath = NULL; /* no path remembering */
}
else {
size_t flen = ftpc->file?strlen(ftpc->file):0; /* file is "raw" already */
@@ -3079,10 +3322,21 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
/* shut down the socket to inform the server we're done */
#ifdef _WIN32_WCE
- shutdown(conn->sock[SECONDARYSOCKET],2); /* SD_BOTH */
+ shutdown(conn->sock[SECONDARYSOCKET], 2); /* SD_BOTH */
#endif
if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) {
+ if(!result && ftpc->dont_check && data->req.maxdownload > 0) {
+ /* partial download completed */
+ result = Curl_pp_sendf(pp, "%s", "ABOR");
+ if(result) {
+ failf(data, "Failure sending ABOR command: %s",
+ curl_easy_strerror(result));
+ ftpc->ctl_valid = FALSE; /* mark control connection as bad */
+ connclose(conn, "ABOR command failed"); /* connection closure */
+ }
+ }
+
if(conn->ssl[SECONDARYSOCKET].use) {
/* The secondary socket is using SSL so we must close down that part
first before we close the socket for real */
@@ -3092,17 +3346,18 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
still requested to use SSL */
}
if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) {
- sclose(conn->sock[SECONDARYSOCKET]);
+ Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
+ conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE;
}
}
- if((ftp->transfer == FTPTRANSFER_BODY) && ftpc->ctl_valid &&
+ if(!result && (ftp->transfer == FTPTRANSFER_BODY) && ftpc->ctl_valid &&
pp->pending_resp && !premature) {
/*
* Let's see what the server says about the transfer we just performed,
* but lower the timeout as sometimes this connection has died while the
- * data has been transfered. This happens when doing through NATs etc that
+ * data has been transferred. This happens when doing through NATs etc that
* abandon old silent connections.
*/
long old_time = pp->response_time;
@@ -3117,12 +3372,20 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
if(!nread && (CURLE_OPERATION_TIMEDOUT == result)) {
failf(data, "control connection looks dead");
ftpc->ctl_valid = FALSE; /* mark control connection as bad */
- conn->bits.close = TRUE; /* mark for closure */
+ connclose(conn, "Timeout or similar in FTP DONE operation"); /* close */
}
if(result)
return result;
+ if(ftpc->dont_check && data->req.maxdownload > 0) {
+ /* we have just sent ABOR and there is no reliable way to check if it was
+ * successful or not; we have to close the connection now */
+ infof(data, "partial download completed, closing connection\n");
+ connclose(conn, "Partial download with no ability to check");
+ return result;
+ }
+
if(!ftpc->dont_check) {
/* 226 Transfer complete, 250 Requested file action okay, completed. */
if((ftpcode != 226) && (ftpcode != 250)) {
@@ -3137,13 +3400,13 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
use checking further */
;
else if(data->set.upload) {
- if((-1 != data->set.infilesize) &&
- (data->set.infilesize != *ftp->bytecountp) &&
+ if((-1 != data->state.infilesize) &&
+ (data->state.infilesize != *ftp->bytecountp) &&
!data->set.crlf &&
(ftp->transfer == FTPTRANSFER_BODY)) {
- failf(data, "Uploaded unaligned file size (%" FORMAT_OFF_T
- " out of %" FORMAT_OFF_T " bytes)",
- *ftp->bytecountp, data->set.infilesize);
+ failf(data, "Uploaded unaligned file size (%" CURL_FORMAT_CURL_OFF_T
+ " out of %" CURL_FORMAT_CURL_OFF_T " bytes)",
+ *ftp->bytecountp, data->state.infilesize);
result = CURLE_PARTIAL_FILE;
}
}
@@ -3159,8 +3422,8 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
*ftp->bytecountp) &&
#endif /* CURL_DO_LINEEND_CONV */
(data->req.maxdownload != *ftp->bytecountp)) {
- failf(data, "Received only partial file: %" FORMAT_OFF_T " bytes",
- *ftp->bytecountp);
+ failf(data, "Received only partial file: %" CURL_FORMAT_CURL_OFF_T
+ " bytes", *ftp->bytecountp);
result = CURLE_PARTIAL_FILE;
}
else if(!ftpc->dont_check &&
@@ -3218,7 +3481,7 @@ CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote)
acceptfail = TRUE;
}
- FTPSENDF(conn, "%s", cmd);
+ PPSENDF(&conn->proto.ftpc.pp, "%s", cmd);
pp->response = Curl_tvnow(); /* timeout relative now */
@@ -3325,26 +3588,27 @@ static CURLcode ftp_range(struct connectdata *conn)
if((-1 == to) && (from>=0)) {
/* X - */
data->state.resume_from = from;
- DEBUGF(infof(conn->data, "FTP RANGE %" FORMAT_OFF_T " to end of file\n",
- from));
+ DEBUGF(infof(conn->data, "FTP RANGE %" CURL_FORMAT_CURL_OFF_T
+ " to end of file\n", from));
}
else if(from < 0) {
/* -Y */
data->req.maxdownload = -from;
data->state.resume_from = from;
- DEBUGF(infof(conn->data, "FTP RANGE the last %" FORMAT_OFF_T " bytes\n",
- -from));
+ DEBUGF(infof(conn->data, "FTP RANGE the last %" CURL_FORMAT_CURL_OFF_T
+ " bytes\n", -from));
}
else {
/* X-Y */
data->req.maxdownload = (to-from)+1; /* include last byte */
data->state.resume_from = from;
- DEBUGF(infof(conn->data, "FTP RANGE from %" FORMAT_OFF_T
- " getting %" FORMAT_OFF_T " bytes\n",
+ DEBUGF(infof(conn->data, "FTP RANGE from %" CURL_FORMAT_CURL_OFF_T
+ " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n",
from, data->req.maxdownload));
}
- DEBUGF(infof(conn->data, "range-download from %" FORMAT_OFF_T
- " to %" FORMAT_OFF_T ", totally %" FORMAT_OFF_T " bytes\n",
+ DEBUGF(infof(conn->data, "range-download from %" CURL_FORMAT_CURL_OFF_T
+ " to %" CURL_FORMAT_CURL_OFF_T ", totally %"
+ CURL_FORMAT_CURL_OFF_T " bytes\n",
from, to, data->req.maxdownload));
ftpc->dont_check = TRUE; /* dont check for successful transfer */
}
@@ -3355,31 +3619,108 @@ static CURLcode ftp_range(struct connectdata *conn)
/*
- * ftp_nextconnect()
+ * ftp_do_more()
*
* This function shall be called when the second FTP (data) connection is
* connected.
+ *
+ * 'complete' can return 0 for incomplete, 1 for done and -1 for go back
+ * (which basically is only for when PASV is being sent to retry a failed
+ * EPSV).
*/
-static CURLcode ftp_nextconnect(struct connectdata *conn)
+static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
{
struct SessionHandle *data=conn->data;
struct ftp_conn *ftpc = &conn->proto.ftpc;
CURLcode result = CURLE_OK;
+ bool connected = FALSE;
+ bool complete = FALSE;
/* the ftp struct is inited in ftp_connect() */
- struct FTP *ftp = data->state.proto.ftp;
+ struct FTP *ftp = data->req.protop;
+
+ /* if the second connection isn't done yet, wait for it */
+ if(!conn->bits.tcpconnect[SECONDARYSOCKET]) {
+ if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) {
+ /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port
+ aren't used so we blank their arguments. TODO: make this nicer */
+ result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0);
+
+ return result;
+ }
+
+ result = Curl_is_connected(conn, SECONDARYSOCKET, &connected);
+
+ /* Ready to do more? */
+ if(connected) {
+ DEBUGF(infof(data, "DO-MORE connected phase starts\n"));
+ if(conn->bits.proxy) {
+ infof(data, "Connection to proxy confirmed\n");
+ result = proxy_magic(conn, ftpc->newhost, ftpc->newport, &connected);
+ }
+ }
+ else {
+ if(result && (ftpc->count1 == 0)) {
+ *completep = -1; /* go back to DOING please */
+ /* this is a EPSV connect failing, try PASV instead */
+ return ftp_epsv_disable(conn);
+ }
+ return result;
+ }
+ }
+
+ if(ftpc->state) {
+ /* already in a state so skip the intial commands.
+ They are only done to kickstart the do_more state */
+ result = ftp_multi_statemach(conn, &complete);
- DEBUGF(infof(data, "DO-MORE phase starts\n"));
+ *completep = (int)complete;
+
+ /* if we got an error or if we don't wait for a data connection return
+ immediately */
+ if(result || (ftpc->wait_data_conn != TRUE))
+ return result;
+
+ if(ftpc->wait_data_conn)
+ /* if we reach the end of the FTP state machine here, *complete will be
+ TRUE but so is ftpc->wait_data_conn, which says we need to wait for
+ the data connection and therefore we're not actually complete */
+ *completep = 0;
+ }
if(ftp->transfer <= FTPTRANSFER_INFO) {
/* a transfer is about to take place, or if not a file name was given
so we'll do a SIZE on it later and then we need the right TYPE first */
- if(data->set.upload) {
+ if(ftpc->wait_data_conn == TRUE) {
+ bool serv_conned;
+
+ result = ReceivedServerConnect(conn, &serv_conned);
+ if(result)
+ return result; /* Failed to accept data connection */
+
+ if(serv_conned) {
+ /* It looks data connection is established */
+ result = AcceptServerConnect(conn);
+ ftpc->wait_data_conn = FALSE;
+ if(!result)
+ result = InitiateTransfer(conn);
+
+ if(result)
+ return result;
+
+ *completep = 1; /* this state is now complete when the server has
+ connected back to us */
+ }
+ }
+ else if(data->set.upload) {
result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_STOR_TYPE);
if(result)
return result;
+
+ result = ftp_multi_statemach(conn, &complete);
+ *completep = (int)complete;
}
else {
/* download */
@@ -3406,17 +3747,23 @@ static CURLcode ftp_nextconnect(struct connectdata *conn)
if(result)
return result;
}
+
+ result = ftp_multi_statemach(conn, &complete);
+ *completep = (int)complete;
}
- result = ftp_easy_statemach(conn);
+ return result;
}
- if((result == CURLE_OK) && (ftp->transfer != FTPTRANSFER_BODY))
+ if(!result && (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);
- /* end of transfer */
- DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result));
+ if(!ftpc->wait_data_conn) {
+ /* no waiting for the data connection so this is now complete */
+ *completep = 1;
+ DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result));
+ }
return result;
}
@@ -3443,11 +3790,10 @@ CURLcode ftp_perform(struct connectdata *conn,
if(conn->data->set.opt_no_body) {
/* requested no body means no transfer... */
- struct FTP *ftp = conn->data->state.proto.ftp;
+ struct FTP *ftp = conn->data->req.protop;
ftp->transfer = FTPTRANSFER_INFO;
}
-
*dophase_done = FALSE; /* not done yet */
/* start the first command in the DO phase */
@@ -3456,16 +3802,14 @@ CURLcode ftp_perform(struct connectdata *conn,
return result;
/* run the state-machine */
- if(conn->data->state.used_interface == Curl_if_multi)
- result = ftp_multi_statemach(conn, dophase_done);
- else {
- result = ftp_easy_statemach(conn);
- *dophase_done = TRUE; /* with the easy interface we are done here */
- }
- *connected = conn->bits.tcpconnect;
+ result = ftp_multi_statemach(conn, dophase_done);
+
+ *connected = conn->bits.tcpconnect[SECONDARYSOCKET];
+
+ infof(conn->data, "ftp_perform ends with SECONDARY: %d\n", *connected);
if(*dophase_done)
- DEBUGF(infof(conn->data, "DO phase is complete\n"));
+ DEBUGF(infof(conn->data, "DO phase is complete1\n"));
return result;
}
@@ -3475,7 +3819,7 @@ static void wc_data_dtor(void *ptr)
struct ftp_wc_tmpdata *tmp = ptr;
if(tmp)
Curl_ftp_parselist_data_free(&tmp->parser);
- Curl_safefree(tmp);
+ free(tmp);
}
static CURLcode init_wc_data(struct connectdata *conn)
@@ -3483,7 +3827,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 ret = CURLE_OK;
+ CURLcode result = CURLE_OK;
struct ftp_wc_tmpdata *ftp_tmp;
last_slash = strrchr(conn->data->state.path, '/');
@@ -3491,12 +3835,12 @@ static CURLcode init_wc_data(struct connectdata *conn)
last_slash++;
if(last_slash[0] == '\0') {
wildcard->state = CURLWC_CLEAN;
- ret = ftp_parse_url_path(conn);
- return ret;
+ result = ftp_parse_url_path(conn);
+ return result;
}
else {
wildcard->pattern = strdup(last_slash);
- if (!wildcard->pattern)
+ if(!wildcard->pattern)
return CURLE_OUT_OF_MEMORY;
last_slash[0] = '\0'; /* cut file from path */
}
@@ -3504,14 +3848,14 @@ static CURLcode init_wc_data(struct connectdata *conn)
else { /* there is only 'wildcard pattern' or nothing */
if(path[0]) {
wildcard->pattern = strdup(path);
- if (!wildcard->pattern)
+ if(!wildcard->pattern)
return CURLE_OUT_OF_MEMORY;
path[0] = '\0';
}
else { /* only list */
wildcard->state = CURLWC_CLEAN;
- ret = ftp_parse_url_path(conn);
- return ret;
+ result = ftp_parse_url_path(conn);
+ return result;
}
}
@@ -3519,14 +3863,16 @@ static CURLcode init_wc_data(struct connectdata *conn)
resources for wildcard transfer */
/* allocate ftp protocol specific temporary wildcard data */
- ftp_tmp = malloc(sizeof(struct ftp_wc_tmpdata));
+ ftp_tmp = calloc(1, sizeof(struct ftp_wc_tmpdata));
if(!ftp_tmp) {
+ Curl_safefree(wildcard->pattern);
return CURLE_OUT_OF_MEMORY;
}
/* INITIALIZE parselist structure */
ftp_tmp->parser = Curl_ftp_parselist_data_alloc();
if(!ftp_tmp->parser) {
+ Curl_safefree(wildcard->pattern);
free(ftp_tmp);
return CURLE_OUT_OF_MEMORY;
}
@@ -3539,53 +3885,61 @@ static CURLcode init_wc_data(struct connectdata *conn)
conn->data->set.ftp_filemethod = FTPFILE_MULTICWD;
/* try to parse ftp url */
- ret = ftp_parse_url_path(conn);
- if(ret) {
- return ret;
+ result = ftp_parse_url_path(conn);
+ if(result) {
+ Curl_safefree(wildcard->pattern);
+ wildcard->tmp_dtor(wildcard->tmp);
+ wildcard->tmp_dtor = ZERO_NULL;
+ wildcard->tmp = NULL;
+ return result;
+ }
+
+ wildcard->path = strdup(conn->data->state.path);
+ if(!wildcard->path) {
+ Curl_safefree(wildcard->pattern);
+ wildcard->tmp_dtor(wildcard->tmp);
+ wildcard->tmp_dtor = ZERO_NULL;
+ wildcard->tmp = NULL;
+ return CURLE_OUT_OF_MEMORY;
}
/* backup old write_function */
ftp_tmp->backup.write_function = conn->data->set.fwrite_func;
- /* parsing write function (callback included directly from ftplistparser.c) */
+ /* parsing write function */
conn->data->set.fwrite_func = Curl_ftp_parselist;
/* backup old file descriptor */
ftp_tmp->backup.file_descriptor = conn->data->set.out;
/* let the writefunc callback know what curl pointer is working with */
conn->data->set.out = conn;
- wildcard->path = strdup(conn->data->state.path);
- if(!wildcard->path) {
- return CURLE_OUT_OF_MEMORY;
- }
-
infof(conn->data, "Wildcard - Parsing started\n");
return CURLE_OK;
}
+/* This is called recursively */
static CURLcode wc_statemach(struct connectdata *conn)
{
- struct ftp_conn *ftpc = &conn->proto.ftpc;
- struct WildcardData *wildcard = &(conn->data->wildcard);
- struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp;
- char *tmp_path;
- CURLcode ret = CURLE_OK;
- long userresponse = 0;
+ struct WildcardData * const wildcard = &(conn->data->wildcard);
+ CURLcode result = CURLE_OK;
+
switch (wildcard->state) {
case CURLWC_INIT:
- ret = init_wc_data(conn);
+ result = init_wc_data(conn);
if(wildcard->state == CURLWC_CLEAN)
/* only listing! */
break;
else
- wildcard->state = ret ? CURLWC_ERROR : CURLWC_MATCHING;
+ wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING;
break;
- case CURLWC_MATCHING:
+ case CURLWC_MATCHING: {
/* In this state is LIST response successfully parsed, so lets restore
previous WRITEFUNCTION callback and WRITEDATA pointer */
- ftp_tmp = wildcard->tmp;
+ struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp;
conn->data->set.fwrite_func = ftp_tmp->backup.write_function;
conn->data->set.out = ftp_tmp->backup.file_descriptor;
+ ftp_tmp->backup.write_function = ZERO_NULL;
+ ftp_tmp->backup.file_descriptor = NULL;
wildcard->state = CURLWC_DOWNLOADING;
if(Curl_ftp_parselist_geterror(ftp_tmp->parser)) {
@@ -3598,32 +3952,27 @@ static CURLcode wc_statemach(struct connectdata *conn)
wildcard->state = CURLWC_CLEAN;
return CURLE_REMOTE_FILE_NOT_FOUND;
}
- ret = wc_statemach(conn);
- break;
+ return wc_statemach(conn);
+ }
case CURLWC_DOWNLOADING: {
/* filelist has at least one file, lets get first one */
+ struct ftp_conn *ftpc = &conn->proto.ftpc;
struct curl_fileinfo *finfo = wildcard->filelist->head->ptr;
- tmp_path = malloc(strlen(conn->data->state.path) +
- strlen(finfo->filename) + 1);
- if(!tmp_path) {
+
+ char *tmp_path = aprintf("%s%s", wildcard->path, finfo->filename);
+ if(!tmp_path)
return CURLE_OUT_OF_MEMORY;
- }
- tmp_path[0] = 0;
- /* make full path to matched file */
- strcat(tmp_path, wildcard->path);
- strcat(tmp_path, finfo->filename);
/* switch default "state.pathbuffer" and tmp_path, good to see
ftp_parse_url_path function to understand this trick */
- if(conn->data->state.pathbuffer)
- free(conn->data->state.pathbuffer);
+ Curl_safefree(conn->data->state.pathbuffer);
conn->data->state.pathbuffer = tmp_path;
conn->data->state.path = tmp_path;
infof(conn->data, "Wildcard - START of \"%s\"\n", finfo->filename);
if(conn->data->set.chunk_bgn) {
- userresponse = conn->data->set.chunk_bgn(
+ long userresponse = conn->data->set.chunk_bgn(
finfo, wildcard->customptr, (int)wildcard->filelist->size);
switch(userresponse) {
case CURL_CHUNK_BGN_FUNC_SKIP:
@@ -3644,10 +3993,9 @@ static CURLcode wc_statemach(struct connectdata *conn)
if(finfo->flags & CURLFINFOFLAG_KNOWN_SIZE)
ftpc->known_filesize = finfo->size;
- ret = ftp_parse_url_path(conn);
- if(ret) {
- return ret;
- }
+ result = ftp_parse_url_path(conn);
+ if(result)
+ return result;
/* we don't need the Curl_fileinfo of first file anymore */
Curl_llist_remove(wildcard->filelist, wildcard->filelist->head, NULL);
@@ -3666,23 +4014,24 @@ static CURLcode wc_statemach(struct connectdata *conn)
Curl_llist_remove(wildcard->filelist, wildcard->filelist->head, NULL);
wildcard->state = (wildcard->filelist->size == 0) ?
CURLWC_CLEAN : CURLWC_DOWNLOADING;
- ret = wc_statemach(conn);
- } break;
+ return wc_statemach(conn);
+ }
- case CURLWC_CLEAN:
- ret = CURLE_OK;
- if(ftp_tmp) {
- ret = Curl_ftp_parselist_geterror(ftp_tmp->parser);
- }
- wildcard->state = ret ? CURLWC_ERROR : CURLWC_DONE;
- break;
+ 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;
+ } break;
case CURLWC_DONE:
case CURLWC_ERROR:
break;
}
- return ret;
+ return result;
}
/***********************************************************************
@@ -3696,40 +4045,31 @@ static CURLcode wc_statemach(struct connectdata *conn)
*/
static CURLcode ftp_do(struct connectdata *conn, bool *done)
{
- CURLcode retcode = CURLE_OK;
+ CURLcode result = CURLE_OK;
+ struct ftp_conn *ftpc = &conn->proto.ftpc;
*done = FALSE; /* default to false */
-
- /*
- Since connections can be re-used between SessionHandles, this might be a
- connection already existing but on a fresh SessionHandle struct so we must
- make sure we have a good 'struct FTP' to play with. For new connections,
- the struct FTP is allocated and setup in the ftp_connect() function.
- */
- Curl_reset_reqproto(conn);
- retcode = ftp_init(conn);
- if(retcode)
- return retcode;
+ ftpc->wait_data_conn = FALSE; /* default to no such wait */
if(conn->data->set.wildcardmatch) {
- retcode = wc_statemach(conn);
+ result = 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(retcode) /* error, loop or skipping the file */
- return retcode;
+ if(result) /* error, loop or skipping the file */
+ return result;
}
else { /* no wildcard FSM needed */
- retcode = ftp_parse_url_path(conn);
- if(retcode)
- return retcode;
+ result = ftp_parse_url_path(conn);
+ if(result)
+ return result;
}
- retcode = ftp_regular_transfer(conn, done);
+ result = ftp_regular_transfer(conn, done);
- return retcode;
+ return result;
}
@@ -3741,40 +4081,38 @@ CURLcode Curl_ftpsendf(struct connectdata *conn,
char s[SBUF_SIZE];
size_t write_len;
char *sptr=s;
- CURLcode res = CURLE_OK;
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+ CURLcode result = CURLE_OK;
+#ifdef HAVE_GSSAPI
enum protection_level data_sec = conn->data_prot;
#endif
va_list ap;
va_start(ap, fmt);
- vsnprintf(s, SBUF_SIZE-3, fmt, ap);
+ write_len = vsnprintf(s, SBUF_SIZE-3, fmt, ap);
va_end(ap);
- strcat(s, "\r\n"); /* append a trailing CRLF */
+ strcpy(&s[write_len], "\r\n"); /* append a trailing CRLF */
+ write_len +=2;
bytes_written=0;
- write_len = strlen(s);
-#ifdef CURL_DOES_CONVERSIONS
- res = Curl_convert_to_network(conn->data, s, write_len);
+ result = Curl_convert_to_network(conn->data, s, write_len);
/* Curl_convert_to_network calls failf if unsuccessful */
- if(res != CURLE_OK) {
- return(res);
- }
-#endif /* CURL_DOES_CONVERSIONS */
+ if(result)
+ return result;
for(;;) {
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
- conn->data_prot = prot_cmd;
+#ifdef HAVE_GSSAPI
+ conn->data_prot = PROT_CMD;
#endif
- res = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len,
- &bytes_written);
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+ result = 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(CURLE_OK != res)
+ if(result)
break;
if(conn->data->set.verbose)
@@ -3789,7 +4127,7 @@ CURLcode Curl_ftpsendf(struct connectdata *conn,
break;
}
- return res;
+ return result;
}
/***********************************************************************
@@ -3807,10 +4145,19 @@ static CURLcode ftp_quit(struct connectdata *conn)
CURLcode result = CURLE_OK;
if(conn->proto.ftpc.ctl_valid) {
- PPSENDF(&conn->proto.ftpc.pp, "QUIT", NULL);
+ result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", "QUIT");
+ if(result) {
+ failf(conn->data, "Failure sending QUIT command: %s",
+ curl_easy_strerror(result));
+ conn->proto.ftpc.ctl_valid = FALSE; /* mark control connection as bad */
+ connclose(conn, "QUIT command failed"); /* mark for connection closure */
+ state(conn, FTP_STOP);
+ return result;
+ }
+
state(conn, FTP_QUIT);
- result = ftp_easy_statemach(conn);
+ result = ftp_block_statemach(conn);
}
return result;
@@ -3823,7 +4170,7 @@ static CURLcode ftp_quit(struct connectdata *conn)
* Disconnect from an FTP server. Cleanup protocol-specific per-connection
* resources. BLOCKING.
*/
-static CURLcode ftp_disconnect(struct connectdata *conn)
+static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection)
{
struct ftp_conn *ftpc= &conn->proto.ftpc;
struct pingpong *pp = &ftpc->pp;
@@ -3835,6 +4182,8 @@ static CURLcode ftp_disconnect(struct connectdata *conn)
ftp_quit() will check the state of ftp->ctl_valid. If it's ok it
will try to send the QUIT command, otherwise it will just return.
*/
+ if(dead_connection)
+ ftpc->ctl_valid = FALSE;
/* The FTP session may or may not have been allocated/setup at this point! */
(void)ftp_quit(conn); /* ignore errors on the QUIT */
@@ -3849,18 +4198,14 @@ static CURLcode ftp_disconnect(struct connectdata *conn)
}
freedirs(ftpc);
- if(ftpc->prevpath) {
- free(ftpc->prevpath);
- ftpc->prevpath = NULL;
- }
- if(ftpc->server_os) {
- free(ftpc->server_os);
- ftpc->server_os = NULL;
- }
+ free(ftpc->prevpath);
+ ftpc->prevpath = NULL;
+ free(ftpc->server_os);
+ ftpc->server_os = NULL;
Curl_pp_disconnect(pp);
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+#ifdef HAVE_GSSAPI
Curl_sec_end(conn);
#endif
@@ -3879,7 +4224,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
/* the ftp struct is already inited in ftp_connect() */
- struct FTP *ftp = data->state.proto.ftp;
+ struct FTP *ftp = data->req.protop;
struct ftp_conn *ftpc = &conn->proto.ftpc;
const char *slash_pos; /* position of the first '/' char in curpos */
const char *path_to_use = data->state.path;
@@ -3924,12 +4269,17 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
}
slash_pos=strrchr(cur_pos, '/');
if(slash_pos || !*cur_pos) {
+ size_t dirlen = slash_pos-cur_pos;
+
ftpc->dirs = calloc(1, sizeof(ftpc->dirs[0]));
if(!ftpc->dirs)
return CURLE_OUT_OF_MEMORY;
+ if(!dirlen)
+ dirlen++;
+
ftpc->dirs[0] = curl_easy_unescape(conn->data, slash_pos ? cur_pos : "/",
- slash_pos?(int)(slash_pos-cur_pos):1,
+ slash_pos ? curlx_uztosi(dirlen) : 1,
NULL);
if(!ftpc->dirs[0]) {
freedirs(ftpc);
@@ -3959,16 +4309,16 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
else {
/* parse the URL path into separate path components */
while((slash_pos = strchr(cur_pos, '/')) != NULL) {
- /* 1 or 0 to indicate absolute directory */
- bool absolute_dir = (bool)((cur_pos - data->state.path > 0) &&
- (ftpc->dirdepth == 0));
+ /* 1 or 0 pointer offset to indicate absolute directory */
+ ssize_t absolute_dir = ((cur_pos - data->state.path > 0) &&
+ (ftpc->dirdepth == 0))?1:0;
/* seek out the next path component */
if(slash_pos-cur_pos) {
/* we skip empty path components, like "x//y" since the FTP command
- CWD requires a parameter and a non-existant parameter a) doesn't
+ CWD requires a parameter and a non-existent parameter a) doesn't
work on many servers and b) has no effect on the others. */
- int len = (int)(slash_pos - cur_pos + absolute_dir);
+ int len = curlx_sztosi(slash_pos - cur_pos + absolute_dir);
ftpc->dirs[ftpc->dirdepth] =
curl_easy_unescape(conn->data, cur_pos - absolute_dir, len, NULL);
if(!ftpc->dirs[ftpc->dirdepth]) { /* run out of memory ... */
@@ -3984,20 +4334,29 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
}
else {
cur_pos = slash_pos + 1; /* jump to the rest of the string */
+ if(!ftpc->dirdepth) {
+ /* path starts with a slash, add that as a directory */
+ ftpc->dirs[ftpc->dirdepth] = strdup("/");
+ if(!ftpc->dirs[ftpc->dirdepth++]) { /* run out of memory ... */
+ failf(data, "no memory");
+ freedirs(ftpc);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ }
continue;
}
cur_pos = slash_pos + 1; /* jump to the rest of the string */
if(++ftpc->dirdepth >= ftpc->diralloc) {
/* enlarge array */
- char *bigger;
+ char **bigger;
ftpc->diralloc *= 2; /* double the size each time */
bigger = realloc(ftpc->dirs, ftpc->diralloc * sizeof(ftpc->dirs[0]));
if(!bigger) {
freedirs(ftpc);
return CURLE_OUT_OF_MEMORY;
}
- ftpc->dirs = (char **)bigger;
+ ftpc->dirs = bigger;
}
}
}
@@ -4039,8 +4398,8 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
return CURLE_OUT_OF_MEMORY;
}
- dlen -= ftpc->file?(int)strlen(ftpc->file):0;
- if((dlen == (int)strlen(ftpc->prevpath)) &&
+ dlen -= ftpc->file?curlx_uztosi(strlen(ftpc->file)):0;
+ if((dlen == curlx_uztosi(strlen(ftpc->prevpath))) &&
strnequal(path, ftpc->prevpath, dlen)) {
infof(data, "Request has same path as previous transfer\n");
ftpc->cwddone = TRUE;
@@ -4055,18 +4414,21 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
static CURLcode ftp_dophase_done(struct connectdata *conn,
bool connected)
{
- CURLcode result = CURLE_OK;
- struct FTP *ftp = conn->data->state.proto.ftp;
+ struct FTP *ftp = conn->data->req.protop;
struct ftp_conn *ftpc = &conn->proto.ftpc;
- if(connected)
- result = ftp_nextconnect(conn);
+ if(connected) {
+ int completed;
+ CURLcode result = ftp_do_more(conn, &completed);
- if(result && (conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD)) {
- /* Failure detected, close the second socket if it was created already */
- sclose(conn->sock[SECONDARYSOCKET]);
- conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
- return result;
+ if(result) {
+ if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) {
+ /* close the second socket if it was created already */
+ Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
+ conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
+ }
+ return result;
+ }
}
if(ftp->transfer != FTPTRANSFER_BODY)
@@ -4078,20 +4440,21 @@ static CURLcode ftp_dophase_done(struct connectdata *conn,
ftpc->ctl_valid = TRUE; /* seems good */
- return result;
+ return CURLE_OK;
}
/* called from multi.c while DOing */
static CURLcode ftp_doing(struct connectdata *conn,
- bool *dophase_done)
+ bool *dophase_done)
{
- CURLcode result;
- result = ftp_multi_statemach(conn, dophase_done);
+ CURLcode result = ftp_multi_statemach(conn, dophase_done);
- if(*dophase_done) {
+ if(result)
+ DEBUGF(infof(conn->data, "DO phase failed\n"));
+ else if(*dophase_done) {
result = ftp_dophase_done(conn, FALSE /* not connected */);
- DEBUGF(infof(conn->data, "DO phase is complete\n"));
+ DEBUGF(infof(conn->data, "DO phase is complete2\n"));
}
return result;
}
@@ -4120,8 +4483,8 @@ CURLcode ftp_regular_transfer(struct connectdata *conn,
Curl_pgrsSetUploadCounter(data, 0);
Curl_pgrsSetDownloadCounter(data, 0);
- Curl_pgrsSetUploadSize(data, 0);
- Curl_pgrsSetDownloadSize(data, 0);
+ Curl_pgrsSetUploadSize(data, -1);
+ Curl_pgrsSetDownloadSize(data, -1);
ftpc->ctl_valid = TRUE; /* starts good */
@@ -4129,13 +4492,14 @@ CURLcode ftp_regular_transfer(struct connectdata *conn,
&connected, /* have we connected after PASV/PORT */
dophase_done); /* all commands in the DO-phase done? */
- if(CURLE_OK == result) {
+ if(!result) {
if(!*dophase_done)
/* the DO phase has not completed yet */
return CURLE_OK;
result = ftp_dophase_done(conn, connected);
+
if(result)
return result;
}
@@ -4145,11 +4509,12 @@ CURLcode ftp_regular_transfer(struct connectdata *conn,
return result;
}
-static CURLcode ftp_setup_connection(struct connectdata * conn)
+static CURLcode ftp_setup_connection(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
- char * type;
+ char *type;
char command;
+ struct FTP *ftp;
if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) {
/* Unless we have asked to tunnel ftp operations through the proxy, we
@@ -4165,18 +4530,18 @@ static CURLcode ftp_setup_connection(struct connectdata * conn)
return CURLE_UNSUPPORTED_PROTOCOL;
#endif
}
- /*
- * We explicitly mark this connection as persistent here as we're doing
- * FTP over HTTP and thus we accidentally avoid setting this value
- * otherwise.
- */
- conn->bits.close = FALSE;
+ /* set it up as a HTTP connection instead */
+ return conn->handler->setup_connection(conn);
#else
failf(data, "FTP over http proxy requires HTTP support built-in!");
return CURLE_UNSUPPORTED_PROTOCOL;
#endif
}
+ conn->data->req.protop = ftp = malloc(sizeof(struct FTP));
+ if(NULL == ftp)
+ return CURLE_OUT_OF_MEMORY;
+
data->state.path++; /* don't include the initial slash */
data->state.slash_removed = TRUE; /* we've skipped the slash */
@@ -4209,6 +4574,24 @@ static CURLcode ftp_setup_connection(struct connectdata * conn)
}
}
+ /* get some initial data into the ftp struct */
+ ftp->bytecountp = &conn->data->req.bytecount;
+ ftp->transfer = FTPTRANSFER_BODY;
+ ftp->downloadsize = 0;
+
+ /* No need to duplicate user+password, the connectdata struct won't change
+ during a session, but we re-init them here since on subsequent inits
+ since the conn struct may have changed or been replaced.
+ */
+ ftp->user = conn->user;
+ ftp->passwd = conn->passwd;
+ if(isBadFtpString(ftp->user))
+ return CURLE_URL_MALFORMAT;
+ if(isBadFtpString(ftp->passwd))
+ return CURLE_URL_MALFORMAT;
+
+ conn->proto.ftpc.known_filesize = -1; /* unknown size for now */
+
return CURLE_OK;
}
diff --git a/lib/ftp.h b/lib/ftp.h
index d8ef3482..833447bc 100644
--- a/lib/ftp.h
+++ b/lib/ftp.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -66,7 +66,7 @@ typedef enum {
FTP_STOR_TYPE, /* set type when about to STOR a file */
FTP_SIZE, /* get the remote file's size for head-like request */
FTP_RETR_SIZE, /* get the remote file's size for RETR */
- FTP_STOR_SIZE, /* get the size for (resumed) STOR */
+ FTP_STOR_SIZE, /* get the size for STOR */
FTP_REST, /* when used to check if the server supports it in head-like */
FTP_RETR_REST, /* when asking for "resume" in for RETR */
FTP_PORT, /* generic state for PORT, LPRT and EPRT, check count1 */
@@ -93,16 +93,10 @@ struct ftp_wc_tmpdata {
typedef enum {
FTPFILE_MULTICWD = 1, /* as defined by RFC1738 */
FTPFILE_NOCWD = 2, /* use SIZE / RETR / STOR on the full path */
- FTPFILE_SINGLECWD = 3 /* make one CWD, then SIZE / RETR / STOR on the file */
+ FTPFILE_SINGLECWD = 3 /* make one CWD, then SIZE / RETR / STOR on the
+ file */
} curl_ftpfile;
-typedef enum {
- FTPTRANSFER_BODY, /* yes do transfer a body */
- FTPTRANSFER_INFO, /* do still go through to get info/headers */
- FTPTRANSFER_NONE, /* don't get anything and don't get info */
- FTPTRANSFER_LAST /* end of list marker, never used */
-} curl_ftptransfer;
-
/* This FTP struct is used in the SessionHandle. All FTP data that is
connection-oriented must be in FTP_conn to properly deal with the fact that
perhaps the SessionHandle is changed between the times the connection is
@@ -114,7 +108,7 @@ struct FTP {
/* transfer a file/body or not, done as a typedefed enum just to make
debuggers display the full symbol and not just the numerical value */
- curl_ftptransfer transfer;
+ curl_pp_transfer transfer;
curl_off_t downloadsize;
};
@@ -138,6 +132,7 @@ struct ftp_conn {
already has been done */
bool cwdfail; /* set TRUE if a CWD command fails, as then we must prevent
caching the current directory */
+ bool wait_data_conn; /* this is set TRUE if data connection is waited */
char *prevpath; /* conn->path from the previous transfer */
char transfertype; /* set by ftp_transfertype for use by Curl_client_write()a
and others (A/I or zero) */
@@ -145,9 +140,20 @@ struct ftp_conn {
int count2; /* general purpose counter for the state machine */
int count3; /* general purpose counter for the state machine */
ftpstate state; /* always use ftp.c:state() to change state! */
+ ftpstate state_saved; /* transfer type saved to be reloaded after
+ data connection is established */
+ curl_off_t retr_size_saved; /* Size of retrieved file saved */
char * server_os; /* The target server operating system. */
curl_off_t known_filesize; /* file size is different from -1, if wildcard
- LIST parsing was done and wc_statemach set it */
+ 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 */
+
};
+#define DEFAULT_ACCEPT_TIMEOUT 60000 /* milliseconds == one minute */
+
#endif /* HEADER_CURL_FTP_H */
diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c
index c59ea7e1..17e0a66f 100644
--- a/lib/ftplistparser.c
+++ b/lib/ftplistparser.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,36 +23,32 @@
/**
* 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 <DIR> prog
*/
-#include "setup.h"
+#include "curl_setup.h"
-#include <time.h>
+#ifndef CURL_DISABLE_FTP
-#include "ftplistparser.h"
-#include "curl_fnmatch.h"
+#include <curl/curl.h>
#include "urldata.h"
-#include "ftp.h"
#include "fileinfo.h"
#include "llist.h"
#include "strtoofft.h"
#include "rawstr.h"
#include "ftp.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "ftplistparser.h"
+#include "curl_fnmatch.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -191,8 +187,7 @@ struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void)
void Curl_ftp_parselist_data_free(struct ftp_parselist_data **pl_data)
{
- if(*pl_data)
- free(*pl_data);
+ free(*pl_data);
*pl_data = NULL;
}
@@ -329,7 +324,8 @@ static CURLcode ftp_pl_insert_finfo(struct connectdata *conn,
compare = Curl_fnmatch;
/* filter pattern-corresponding filenames */
- if(compare(conn->data->set.fnmatch_data, wc->pattern, finfo->filename) == 0) {
+ if(compare(conn->data->set.fnmatch_data, wc->pattern,
+ finfo->filename) == 0) {
/* discard symlink which is containing multiple " -> " */
if((finfo->filetype == CURLFILETYPE_SYMLINK) && finfo->strings.target &&
(strstr(finfo->strings.target, " -> "))) {
@@ -364,7 +360,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 rc;
+ CURLcode result;
if(parser->error) { /* error in previous call */
/* scenario:
@@ -447,9 +443,13 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
else if(c == '\n') {
finfo->b_data[parser->item_length - 1] = 0;
if(strncmp("total ", finfo->b_data, 6) == 0) {
- char *endptr = NULL;
- /* here we can deal with directory size */
- curlx_strtoofft(finfo->b_data+6, &endptr, 10);
+ char *endptr = finfo->b_data+6;
+ /* here we can deal with directory size, pass the leading white
+ spaces and then the digits */
+ while(ISSPACE(*endptr))
+ endptr++;
+ while(ISDIGIT(*endptr))
+ endptr++;
if(*endptr != 0) {
PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST);
return bufflen;
@@ -644,7 +644,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
parser->state.UNIX.main = PL_UNIX_TIME;
parser->state.UNIX.sub.time = PL_UNIX_TIME_PREPART1;
}
- else if (!ISDIGIT(c)) {
+ else if(!ISDIGIT(c)) {
PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST);
return bufflen;
}
@@ -753,9 +753,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;
- rc = ftp_pl_insert_finfo(conn, finfo);
- if(rc) {
- PL_ERROR(conn, rc);
+ result = ftp_pl_insert_finfo(conn, finfo);
+ if(result) {
+ PL_ERROR(conn, result);
return bufflen;
}
}
@@ -765,9 +765,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;
- rc = ftp_pl_insert_finfo(conn, finfo);
- if(rc) {
- PL_ERROR(conn, rc);
+ result = ftp_pl_insert_finfo(conn, finfo);
+ if(result) {
+ PL_ERROR(conn, result);
return bufflen;
}
}
@@ -861,9 +861,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;
- rc = ftp_pl_insert_finfo(conn, finfo);
- if(rc) {
- PL_ERROR(conn, rc);
+ result = ftp_pl_insert_finfo(conn, finfo);
+ if(result) {
+ PL_ERROR(conn, result);
return bufflen;
}
parser->state.UNIX.main = PL_UNIX_FILETYPE;
@@ -873,9 +873,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;
- rc = ftp_pl_insert_finfo(conn, finfo);
- if(rc) {
- PL_ERROR(conn, rc);
+ result = ftp_pl_insert_finfo(conn, finfo);
+ if(result) {
+ PL_ERROR(conn, result);
return bufflen;
}
parser->state.UNIX.main = PL_UNIX_FILETYPE;
@@ -959,7 +959,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
}
else {
char *endptr;
- finfo->size = curlx_strtoofft(finfo->b_data + parser->item_offset,
+ finfo->size = curlx_strtoofft(finfo->b_data +
+ parser->item_offset,
&endptr, 10);
if(!*endptr) {
if(finfo->size == CURL_OFF_T_MAX ||
@@ -1005,9 +1006,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;
- rc = ftp_pl_insert_finfo(conn, finfo);
- if(rc) {
- PL_ERROR(conn, rc);
+ result = ftp_pl_insert_finfo(conn, finfo);
+ if(result) {
+ PL_ERROR(conn, result);
return bufflen;
}
parser->state.NT.main = PL_WINNT_DATE;
@@ -1017,9 +1018,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;
- rc = ftp_pl_insert_finfo(conn, finfo);
- if(rc) {
- PL_ERROR(conn, rc);
+ result = ftp_pl_insert_finfo(conn, finfo);
+ if(result) {
+ PL_ERROR(conn, result);
return bufflen;
}
parser->state.NT.main = PL_WINNT_DATE;
@@ -1035,7 +1036,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
}
break;
default:
- return bufflen+1;
+ return bufflen + 1;
}
i++;
@@ -1043,3 +1044,5 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
return bufflen;
}
+
+#endif /* CURL_DISABLE_FTP */
diff --git a/lib/ftplistparser.h b/lib/ftplistparser.h
index 67a06c29..96764e2a 100644
--- a/lib/ftplistparser.h
+++ b/lib/ftplistparser.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,8 +21,9 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "curl_setup.h"
-#include <curl/curl.h>
+#ifndef CURL_DISABLE_FTP
/* WRITEFUNCTION callback for parsing LIST responses */
size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
@@ -36,4 +37,5 @@ struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void);
void Curl_ftp_parselist_data_free(struct ftp_parselist_data **pl_data);
+#endif /* CURL_DISABLE_FTP */
#endif /* HEADER_CURL_FTPLISTPARSER_H */
diff --git a/lib/getenv.c b/lib/getenv.c
index 36fbb758..36215aab 100644
--- a/lib/getenv.c
+++ b/lib/getenv.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,15 +20,7 @@
*
***************************************************************************/
-#include "setup.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef __VMS
-#include <unixlib.h>
-#endif
+#include "curl_setup.h"
#include <curl/curl.h>
#include "curl_memory.h"
@@ -46,14 +38,10 @@ char *GetEnv(const char *variable)
char *temp = getenv(variable);
env[0] = '\0';
if(temp != NULL)
- ExpandEnvironmentStrings(temp, env, sizeof(env));
+ ExpandEnvironmentStringsA(temp, env, sizeof(env));
return (env[0] != '\0')?strdup(env):NULL;
#else
char *env = getenv(variable);
-#ifdef __VMS
- if(env && strcmp("HOME",variable) == 0)
- env = decc_translate_vms(env);
-#endif
return (env && env[0])?strdup(env):NULL;
#endif
#endif
diff --git a/lib/getinfo.c b/lib/getinfo.c
index c00e675e..910f520e 100644
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,23 +20,19 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
#include "getinfo.h"
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include "curl_memory.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "connect.h" /* Curl_getconnectinfo() */
#include "progress.h"
-/* Make this the last #include */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
/*
@@ -46,85 +42,94 @@
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;
+ pro->t_appconnect = 0;
pro->t_pretransfer = 0;
pro->t_starttransfer = 0;
pro->timespent = 0;
pro->t_redirect = 0;
info->httpcode = 0;
- info->httpversion=0;
- info->filetime=-1; /* -1 is an illegal time and thus means unknown */
+ info->httpproxycode = 0;
+ info->httpversion = 0;
+ info->filetime = -1; /* -1 is an illegal time and thus means unknown */
+ info->timecond = FALSE;
- if(info->contenttype)
- free(info->contenttype);
+ free(info->contenttype);
info->contenttype = NULL;
info->header_size = 0;
info->request_size = 0;
info->numconnects = 0;
- info->ip[0] = 0;
- info->port = 0;
- info->localip[0] = 0;
- info->localport = 0;
+ info->conn_primary_ip[0] = '\0';
+ info->conn_local_ip[0] = '\0';
+ info->conn_primary_port = 0;
+ info->conn_local_port = 0;
return CURLE_OK;
}
-CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
+static CURLcode getinfo_char(struct SessionHandle *data, CURLINFO info,
+ char **param_charp)
{
- va_list arg;
- long *param_longp=NULL;
- double *param_doublep=NULL;
- char **param_charp=NULL;
- struct curl_slist **param_slistp=NULL;
- int type;
- curl_socket_t sockfd;
-
- union {
- struct curl_certinfo * to_certinfo;
- struct curl_slist * to_slist;
- } ptr;
-
- if(!data)
- return CURLE_BAD_FUNCTION_ARGUMENT;
-
- va_start(arg, info);
-
- type = CURLINFO_TYPEMASK & (int)info;
- switch(type) {
- case CURLINFO_STRING:
- param_charp = va_arg(arg, char **);
- if(NULL == param_charp)
- return CURLE_BAD_FUNCTION_ARGUMENT;
+ switch(info) {
+ case CURLINFO_EFFECTIVE_URL:
+ *param_charp = data->change.url?data->change.url:(char *)"";
break;
- case CURLINFO_LONG:
- param_longp = va_arg(arg, long *);
- if(NULL == param_longp)
- return CURLE_BAD_FUNCTION_ARGUMENT;
+ case CURLINFO_CONTENT_TYPE:
+ *param_charp = data->info.contenttype;
break;
- case CURLINFO_DOUBLE:
- param_doublep = va_arg(arg, double *);
- if(NULL == param_doublep)
- return CURLE_BAD_FUNCTION_ARGUMENT;
+ case CURLINFO_PRIVATE:
+ *param_charp = (char *) data->set.private_data;
break;
- case CURLINFO_SLIST:
- param_slistp = va_arg(arg, struct curl_slist **);
- if(NULL == param_slistp)
- return CURLE_BAD_FUNCTION_ARGUMENT;
+ case CURLINFO_FTP_ENTRY_PATH:
+ /* Return the entrypath string from the most recent connection.
+ This pointer was copied from the connectdata structure by FTP.
+ The actual string may be free()ed by subsequent libcurl calls so
+ it must be copied to a safer area before the next libcurl call.
+ Callers must never free it themselves. */
+ *param_charp = data->state.most_recent_ftp_entrypath;
+ break;
+ case CURLINFO_REDIRECT_URL:
+ /* Return the URL this request would have been redirected to if that
+ option had been enabled! */
+ *param_charp = data->info.wouldredirect;
+ break;
+ case CURLINFO_PRIMARY_IP:
+ /* Return the ip address of the most recent (primary) connection */
+ *param_charp = data->info.conn_primary_ip;
+ break;
+ case CURLINFO_LOCAL_IP:
+ /* Return the source/local ip address of the most recent (primary)
+ connection */
+ *param_charp = data->info.conn_local_ip;
break;
+ case CURLINFO_RTSP_SESSION_ID:
+ *param_charp = data->set.str[STRING_RTSP_SESSION_ID];
+ break;
+
default:
return CURLE_BAD_FUNCTION_ARGUMENT;
}
+ return CURLE_OK;
+}
+
+static CURLcode getinfo_long(struct SessionHandle *data, CURLINFO info,
+ long *param_longp)
+{
+ curl_socket_t sockfd;
+
+ union {
+ unsigned long *to_ulong;
+ long *to_long;
+ } lptr;
+
switch(info) {
- case CURLINFO_EFFECTIVE_URL:
- *param_charp = data->change.url?data->change.url:(char *)"";
- break;
case CURLINFO_RESPONSE_CODE:
*param_longp = data->info.httpcode;
break;
@@ -140,6 +145,71 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
case CURLINFO_REQUEST_SIZE:
*param_longp = data->info.request_size;
break;
+ case CURLINFO_SSL_VERIFYRESULT:
+ *param_longp = data->set.ssl.certverifyresult;
+ break;
+ case CURLINFO_REDIRECT_COUNT:
+ *param_longp = data->set.followlocation;
+ break;
+ case CURLINFO_HTTPAUTH_AVAIL:
+ lptr.to_long = param_longp;
+ *lptr.to_ulong = data->info.httpauthavail;
+ break;
+ case CURLINFO_PROXYAUTH_AVAIL:
+ lptr.to_long = param_longp;
+ *lptr.to_ulong = data->info.proxyauthavail;
+ break;
+ case CURLINFO_OS_ERRNO:
+ *param_longp = data->state.os_errno;
+ break;
+ case CURLINFO_NUM_CONNECTS:
+ *param_longp = data->info.numconnects;
+ break;
+ case CURLINFO_LASTSOCKET:
+ sockfd = Curl_getconnectinfo(data, NULL);
+
+ /* note: this is not a good conversion for systems with 64 bit sockets and
+ 32 bit longs */
+ if(sockfd != CURL_SOCKET_BAD)
+ *param_longp = (long)sockfd;
+ else
+ /* this interface is documented to return -1 in case of badness, which
+ may not be the same as the CURL_SOCKET_BAD value */
+ *param_longp = -1;
+ break;
+ case CURLINFO_PRIMARY_PORT:
+ /* Return the (remote) port of the most recent (primary) connection */
+ *param_longp = data->info.conn_primary_port;
+ break;
+ case CURLINFO_LOCAL_PORT:
+ /* Return the local port of the most recent (primary) connection */
+ *param_longp = data->info.conn_local_port;
+ break;
+ case CURLINFO_CONDITION_UNMET:
+ /* return if the condition prevented the document to get transferred */
+ *param_longp = data->info.timecond ? 1L : 0L;
+ break;
+ case CURLINFO_RTSP_CLIENT_CSEQ:
+ *param_longp = data->state.rtsp_next_client_CSeq;
+ break;
+ case CURLINFO_RTSP_SERVER_CSEQ:
+ *param_longp = data->state.rtsp_next_server_CSeq;
+ break;
+ case CURLINFO_RTSP_CSEQ_RECV:
+ *param_longp = data->state.rtsp_CSeq_recv;
+ break;
+
+ default:
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ }
+
+ return CURLE_OK;
+}
+
+static CURLcode getinfo_double(struct SessionHandle *data, CURLINFO info,
+ double *param_doublep)
+{
+ switch(info) {
case CURLINFO_TOTAL_TIME:
*param_doublep = data->progress.timespent;
break;
@@ -170,9 +240,6 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
case CURLINFO_SPEED_UPLOAD:
*param_doublep = (double)data->progress.ulspeed;
break;
- case CURLINFO_SSL_VERIFYRESULT:
- *param_longp = data->set.ssl.certverifyresult;
- break;
case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
*param_doublep = (data->progress.flags & PGRS_DL_SIZE_KNOWN)?
(double)data->progress.size_dl:-1;
@@ -184,100 +251,132 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
case CURLINFO_REDIRECT_TIME:
*param_doublep = data->progress.t_redirect;
break;
- case CURLINFO_REDIRECT_COUNT:
- *param_longp = data->set.followlocation;
- break;
- case CURLINFO_CONTENT_TYPE:
- *param_charp = data->info.contenttype;
- break;
- case CURLINFO_PRIVATE:
- *param_charp = (char *) data->set.private_data;
- break;
- case CURLINFO_HTTPAUTH_AVAIL:
- *param_longp = data->info.httpauthavail;
- break;
- case CURLINFO_PROXYAUTH_AVAIL:
- *param_longp = data->info.proxyauthavail;
- break;
- case CURLINFO_OS_ERRNO:
- *param_longp = data->state.os_errno;
- break;
- case CURLINFO_NUM_CONNECTS:
- *param_longp = data->info.numconnects;
- break;
+
+ default:
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ }
+
+ return CURLE_OK;
+}
+
+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;
+ } ptr;
+
+ switch(info) {
case CURLINFO_SSL_ENGINES:
*param_slistp = Curl_ssl_engines_list(data);
break;
case CURLINFO_COOKIELIST:
*param_slistp = Curl_cookie_list(data);
break;
- case CURLINFO_FTP_ENTRY_PATH:
- /* Return the entrypath string from the most recent connection.
- This pointer was copied from the connectdata structure by FTP.
- The actual string may be free()ed by subsequent libcurl calls so
- it must be copied to a safer area before the next libcurl call.
- Callers must never free it themselves. */
- *param_charp = data->state.most_recent_ftp_entrypath;
- break;
- case CURLINFO_LASTSOCKET:
- sockfd = Curl_getconnectinfo(data, NULL);
-
- /* note: this is not a good conversion for systems with 64 bit sockets and
- 32 bit longs */
- if(sockfd != CURL_SOCKET_BAD)
- *param_longp = (long)sockfd;
- else
- /* this interface is documented to return -1 in case of badness, which
- may not be the same as the CURL_SOCKET_BAD value */
- *param_longp = -1;
- break;
- case CURLINFO_REDIRECT_URL:
- /* Return the URL this request would have been redirected to if that
- option had been enabled! */
- *param_charp = data->info.wouldredirect;
- break;
- case CURLINFO_PRIMARY_IP:
- /* Return the ip address of the most recent (primary) connection */
- *param_charp = data->info.ip;
- break;
- case CURLINFO_PRIMARY_PORT:
- /* Return the (remote) port of the most recent (primary) connection */
- *param_longp = data->info.port;
- break;
- case CURLINFO_LOCAL_IP:
- /* Return the source/local ip address of the most recent (primary)
- connection */
- *param_charp = data->info.localip;
- break;
- case CURLINFO_LOCAL_PORT:
- /* Return the local port of the most recent (primary) connection */
- *param_longp = data->info.localport;
- break;
case CURLINFO_CERTINFO:
/* Return the a pointer to the certinfo struct. Not really an slist
pointer but we can pretend it is here */
ptr.to_certinfo = &data->info.certs;
*param_slistp = ptr.to_slist;
break;
- case CURLINFO_CONDITION_UNMET:
- /* return if the condition prevented the document to get transfered */
- *param_longp = data->info.timecond;
+ case CURLINFO_TLS_SESSION:
+ {
+ struct curl_tlssessioninfo **tsip = (struct curl_tlssessioninfo **)
+ param_slistp;
+ 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;
+ tsi->internals = NULL;
+
+ if(!conn)
+ break;
+
+ /* Find the active ("in use") SSL connection, if any */
+ while((sockindex < sizeof(conn->ssl) / sizeof(conn->ssl[0])) &&
+ (!conn->ssl[sockindex].use))
+ sockindex++;
+
+ if(sockindex == sizeof(conn->ssl) / sizeof(conn->ssl[0]))
+ break; /* no SSL session found */
+
+ /* Return the TLS session information from the relevant backend */
+#ifdef USE_OPENSSL
+ internals = conn->ssl[sockindex].ctx;
+#endif
+#ifdef USE_GNUTLS
+ internals = conn->ssl[sockindex].session;
+#endif
+#ifdef USE_NSS
+ internals = conn->ssl[sockindex].handle;
+#endif
+#ifdef USE_GSKIT
+ 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
+ interpreted as "not supported" */
+ }
break;
- case CURLINFO_RTSP_SESSION_ID:
- *param_charp = data->set.str[STRING_RTSP_SESSION_ID];
+ 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;
+ int type;
+ /* default return code is to error out! */
+ CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
+
+ if(!data)
+ return result;
+
+ va_start(arg, info);
+
+ type = CURLINFO_TYPEMASK & (int)info;
+ switch(type) {
+ case CURLINFO_STRING:
+ param_charp = va_arg(arg, char **);
+ if(param_charp)
+ result = getinfo_char(data, info, param_charp);
break;
- case CURLINFO_RTSP_CLIENT_CSEQ:
- *param_longp = data->state.rtsp_next_client_CSeq;
+ case CURLINFO_LONG:
+ param_longp = va_arg(arg, long *);
+ if(param_longp)
+ result = getinfo_long(data, info, param_longp);
break;
- case CURLINFO_RTSP_SERVER_CSEQ:
- *param_longp = data->state.rtsp_next_server_CSeq;
+ case CURLINFO_DOUBLE:
+ param_doublep = va_arg(arg, double *);
+ if(param_doublep)
+ result = getinfo_double(data, info, param_doublep);
break;
- case CURLINFO_RTSP_CSEQ_RECV:
- *param_longp = data->state.rtsp_CSeq_recv;
+ case CURLINFO_SLIST:
+ param_slistp = va_arg(arg, struct curl_slist **);
+ if(param_slistp)
+ result = getinfo_slist(data, info, param_slistp);
break;
-
default:
- return CURLE_BAD_FUNCTION_ARGUMENT;
+ break;
}
- return CURLE_OK;
+
+ va_end(arg);
+
+ return result;
}
diff --git a/lib/gopher.c b/lib/gopher.c
index aa9c45b0..954cad8e 100644
--- a/lib/gopher.c
+++ b/lib/gopher.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,53 +20,10 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_GOPHER
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#include <netinet/in.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <netdb.h>
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
-
-#endif
-
#include "urldata.h"
#include <curl/curl.h>
#include "transfer.h"
@@ -78,14 +35,11 @@
#include "rawstr.h"
#include "select.h"
#include "url.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "warnless.h"
+#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
-
/*
* Forward declarations.
*/
@@ -109,10 +63,13 @@ const struct Curl_handler Curl_handler_gopher = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_GOPHER, /* defport */
- PROT_GOPHER /* protocol */
+ CURLPROTO_GOPHER, /* protocol */
+ PROTOPT_NONE /* flags */
};
static CURLcode gopher_do(struct connectdata *conn, bool *done)
@@ -130,7 +87,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
*done = TRUE; /* unconditionally */
/* Create selector. Degenerate cases: / and /1 => convert to "" */
- if (strlen(path) <= 2)
+ if(strlen(path) <= 2)
sel = (char *)"";
else {
char *newp;
@@ -149,31 +106,31 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
/* ... and finally unescape */
sel = curl_easy_unescape(data, newp, 0, &len);
- if (!sel)
+ if(!sel)
return CURLE_OUT_OF_MEMORY;
sel_org = sel;
}
/* We use Curl_write instead of Curl_sendf to make sure the entire buffer is
sent, which could be sizeable with long selectors. */
- k = strlen(sel);
+ k = curlx_uztosz(strlen(sel));
for(;;) {
result = Curl_write(conn, sockfd, sel, k, &amount);
- if (CURLE_OK == result) { /* Which may not have written it all! */
+ if(!result) { /* Which may not have written it all! */
result = Curl_client_write(conn, CLIENTWRITE_HEADER, sel, amount);
if(result) {
- Curl_safefree(sel_org);
+ free(sel_org);
return result;
}
k -= amount;
sel += amount;
- if (k < 1)
+ if(k < 1)
break; /* but it did write it all */
}
else {
failf(data, "Failed sending Gopher request");
- Curl_safefree(sel_org);
+ free(sel_org);
return result;
}
/* Don't busyloop. The entire loop thing is a work-around as it causes a
@@ -188,12 +145,12 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
Curl_socket_ready(CURL_SOCKET_BAD, sockfd, 100);
}
- Curl_safefree(sel_org);
+ free(sel_org);
/* 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 != CURLE_OK) {
+ if(result) {
failf(data, "Failed sending Gopher request");
return result;
}
diff --git a/lib/gtls.c b/lib/gtls.c
deleted file mode 100644
index 99be073a..00000000
--- a/lib/gtls.c
+++ /dev/null
@@ -1,918 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-/*
- * Source file for all GnuTLS-specific code for the TLS/SSL layer. No code
- * but sslgen.c should ever call or use these functions.
- *
- * Note: don't use the GnuTLS' *_t variable type names in this source code,
- * since they were not present in 1.0.X.
- */
-
-#include "setup.h"
-#ifdef USE_GNUTLS
-#include <gnutls/gnutls.h>
-#include <gnutls/x509.h>
-#include <gcrypt.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#include "urldata.h"
-#include "sendf.h"
-#include "inet_pton.h"
-#include "gtls.h"
-#include "sslgen.h"
-#include "parsedate.h"
-#include "connect.h" /* for the connect timeout */
-#include "select.h"
-#include "rawstr.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-#include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
-
-/*
- Some hackish cast macros based on:
- http://library.gnome.org/devel/glib/unstable/glib-Type-Conversion-Macros.html
-*/
-#ifndef GNUTLS_POINTER_TO_INT_CAST
-#define GNUTLS_POINTER_TO_INT_CAST(p) ((int) (long) (p))
-#endif
-#ifndef GNUTLS_INT_TO_POINTER_CAST
-#define GNUTLS_INT_TO_POINTER_CAST(i) ((void*) (long) (i))
-#endif
-
-/* Enable GnuTLS debugging by defining GTLSDEBUG */
-/*#define GTLSDEBUG */
-
-#ifdef GTLSDEBUG
-static void tls_log_func(int level, const char *str)
-{
- fprintf(stderr, "|<%d>| %s", level, str);
-}
-#endif
-static bool gtls_inited = FALSE;
-/*
- * Custom push and pull callback functions used by GNU TLS to read and write
- * to the socket. These functions are simple wrappers to send() and recv()
- * (although here using the sread/swrite macros as defined by setup_once.h).
- * We use custom functions rather than the GNU TLS defaults because it allows
- * us to get specific about the fourth "flags" argument, and to use arbitrary
- * private data with gnutls_transport_set_ptr if we wish.
- */
-static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len)
-{
- return swrite(GNUTLS_POINTER_TO_INT_CAST(s), buf, len);
-}
-
-static ssize_t Curl_gtls_pull(void *s, void *buf, size_t len)
-{
- return sread(GNUTLS_POINTER_TO_INT_CAST(s), buf, len);
-}
-
-/* Curl_gtls_init()
- *
- * Global GnuTLS init, called from Curl_ssl_init(). This calls functions that
- * are not thread-safe and thus this function itself is not thread-safe and
- * must only be called from within curl_global_init() to keep the thread
- * situation under control!
- */
-int Curl_gtls_init(void)
-{
- int ret = 1;
- if(!gtls_inited) {
- ret = gnutls_global_init()?0:1;
-#ifdef GTLSDEBUG
- gnutls_global_set_log_function(tls_log_func);
- gnutls_global_set_log_level(2);
-#endif
- gtls_inited = TRUE;
- }
- return ret;
-}
-
-int Curl_gtls_cleanup(void)
-{
- if(gtls_inited) {
- gnutls_global_deinit();
- gtls_inited = FALSE;
- }
- return 1;
-}
-
-static void showtime(struct SessionHandle *data,
- const char *text,
- time_t stamp)
-{
- struct tm *tm;
-#ifdef HAVE_GMTIME_R
- struct tm buffer;
- tm = (struct tm *)gmtime_r(&stamp, &buffer);
-#else
- tm = gmtime(&stamp);
-#endif
- snprintf(data->state.buffer,
- BUFSIZE,
- "\t %s: %s, %02d %s %4d %02d:%02d:%02d GMT\n",
- text,
- Curl_wkday[tm->tm_wday?tm->tm_wday-1:6],
- tm->tm_mday,
- Curl_month[tm->tm_mon],
- tm->tm_year + 1900,
- tm->tm_hour,
- tm->tm_min,
- tm->tm_sec);
- infof(data, "%s", data->state.buffer);
-}
-
-static gnutls_datum load_file (const char *file)
-{
- FILE *f;
- gnutls_datum loaded_file = { NULL, 0 };
- long filelen;
- void *ptr;
-
- if (!(f = fopen(file, "r")))
- return loaded_file;
- if (fseek(f, 0, SEEK_END) != 0
- || (filelen = ftell(f)) < 0
- || fseek(f, 0, SEEK_SET) != 0
- || !(ptr = malloc((size_t)filelen)))
- goto out;
- if (fread(ptr, 1, (size_t)filelen, f) < (size_t)filelen) {
- free(ptr);
- goto out;
- }
-
- loaded_file.data = ptr;
- loaded_file.size = (unsigned int)filelen;
-out:
- fclose(f);
- return loaded_file;
-}
-
-static void unload_file(gnutls_datum data) {
- free(data.data);
-}
-
-
-/* this function does a SSL/TLS (re-)handshake */
-static CURLcode handshake(struct connectdata *conn,
- int sockindex,
- bool duringconnect,
- bool nonblocking)
-{
- struct SessionHandle *data = conn->data;
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
- gnutls_session session = conn->ssl[sockindex].session;
- curl_socket_t sockfd = conn->sock[sockindex];
- long timeout_ms;
- int rc;
- int what;
-
- while(1) {
- /* check allowed time left */
- timeout_ms = Curl_timeleft(conn, NULL, duringconnect);
-
- if(timeout_ms < 0) {
- /* no need to continue if time already is up */
- failf(data, "SSL connection timeout");
- return CURLE_OPERATION_TIMEDOUT;
- }
-
- /* 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) {
-
- curl_socket_t writefd = ssl_connect_2_writing==
- connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
- curl_socket_t readfd = ssl_connect_2_reading==
- connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
-
- what = Curl_socket_ready(readfd, writefd,
- nonblocking?0:(int)timeout_ms);
- if(what < 0) {
- /* fatal error */
- failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
- return CURLE_SSL_CONNECT_ERROR;
- }
- else if(0 == what) {
- if(nonblocking) {
- return CURLE_OK;
- }
- else {
- /* timeout */
- failf(data, "SSL connection timeout");
- return CURLE_OPERATION_TIMEDOUT;
- }
- }
- /* socket is readable or writable */
- }
-
- rc = gnutls_handshake(session);
-
- if((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED)) {
- connssl->connecting_state =
- gnutls_record_get_direction(session)?
- ssl_connect_2_writing:ssl_connect_2_reading;
- if(nonblocking) {
- return CURLE_OK;
- }
- } else if (rc < 0) {
- failf(data, "gnutls_handshake() failed: %s", gnutls_strerror(rc));
- } else {
- /* Reset our connect state machine */
- connssl->connecting_state = ssl_connect_1;
- return CURLE_OK;
- }
- }
-}
-
-static gnutls_x509_crt_fmt do_file_type(const char *type)
-{
- if(!type || !type[0])
- return GNUTLS_X509_FMT_PEM;
- if(Curl_raw_equal(type, "PEM"))
- return GNUTLS_X509_FMT_PEM;
- if(Curl_raw_equal(type, "DER"))
- return GNUTLS_X509_FMT_DER;
- return -1;
-}
-
-static CURLcode
-gtls_connect_step1(struct connectdata *conn,
- int sockindex)
-{
- static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 };
- struct SessionHandle *data = conn->data;
- gnutls_session session;
- int rc;
- void *ssl_sessionid;
- size_t ssl_idsize;
- bool sni = TRUE; /* default is SNI enabled */
-#ifdef ENABLE_IPV6
- struct in6_addr addr;
-#else
- struct in_addr addr;
-#endif
-
- if(conn->ssl[sockindex].state == ssl_connection_complete)
- /* to make us tolerant against being called more than once for the
- same connection */
- return CURLE_OK;
-
- if(!gtls_inited)
- Curl_gtls_init();
-
- /* GnuTLS only supports SSLv3 and TLSv1 */
- if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) {
- failf(data, "GnuTLS does not support SSLv2");
- return CURLE_SSL_CONNECT_ERROR;
- }
- else if(data->set.ssl.version == CURL_SSLVERSION_SSLv3)
- sni = FALSE; /* SSLv3 has no SNI */
-
- /* allocate a cred struct */
- rc = gnutls_certificate_allocate_credentials(&conn->ssl[sockindex].cred);
- if(rc != GNUTLS_E_SUCCESS) {
- failf(data, "gnutls_cert_all_cred() failed: %s", gnutls_strerror(rc));
- return CURLE_SSL_CONNECT_ERROR;
- }
-
- if(data->set.ssl.CAfile) {
- /* set the trusted CA cert bundle file */
- gnutls_certificate_set_verify_flags(conn->ssl[sockindex].cred,
- GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
-
- rc = gnutls_certificate_set_x509_trust_file(conn->ssl[sockindex].cred,
- data->set.ssl.CAfile,
- GNUTLS_X509_FMT_PEM);
- if(rc < 0) {
- infof(data, "error reading ca cert file %s (%s)\n",
- data->set.ssl.CAfile, gnutls_strerror(rc));
- if(data->set.ssl.verifypeer)
- return CURLE_SSL_CACERT_BADFILE;
- }
- else
- infof(data, "found %d certificates in %s\n",
- rc, data->set.ssl.CAfile);
- }
-
- if(data->set.ssl.CRLfile) {
- /* set the CRL list file */
- rc = gnutls_certificate_set_x509_crl_file(conn->ssl[sockindex].cred,
- data->set.ssl.CRLfile,
- GNUTLS_X509_FMT_PEM);
- if(rc < 0) {
- failf(data, "error reading crl file %s (%s)\n",
- data->set.ssl.CRLfile, gnutls_strerror(rc));
- return CURLE_SSL_CRL_BADFILE;
- }
- else
- infof(data, "found %d CRL in %s\n",
- rc, data->set.ssl.CRLfile);
- }
-
- /* Initialize TLS session as a client */
- rc = gnutls_init(&conn->ssl[sockindex].session, GNUTLS_CLIENT);
- if(rc != GNUTLS_E_SUCCESS) {
- failf(data, "gnutls_init() failed: %d", rc);
- return CURLE_SSL_CONNECT_ERROR;
- }
-
- /* convenient assign */
- session = conn->ssl[sockindex].session;
-
- if ((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) &&
-#ifdef ENABLE_IPV6
- (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) &&
-#endif
- sni &&
- (gnutls_server_name_set(session, GNUTLS_NAME_DNS, conn->host.name,
- strlen(conn->host.name)) < 0))
- infof(data, "WARNING: failed to configure server name indication (SNI) "
- "TLS extension\n");
-
- /* Use default priorities */
- rc = gnutls_set_default_priority(session);
- if(rc != GNUTLS_E_SUCCESS)
- return CURLE_SSL_CONNECT_ERROR;
-
- if(data->set.ssl.version == CURL_SSLVERSION_SSLv3) {
- static const int protocol_priority[] = { GNUTLS_SSL3, 0 };
- gnutls_protocol_set_priority(session, protocol_priority);
- if(rc != GNUTLS_E_SUCCESS)
- return CURLE_SSL_CONNECT_ERROR;
- }
-
- /* Sets the priority on the certificate types supported by gnutls. Priority
- is higher for types specified before others. After specifying the types
- you want, you must append a 0. */
- rc = gnutls_certificate_type_set_priority(session, cert_type_priority);
- if(rc != GNUTLS_E_SUCCESS)
- return CURLE_SSL_CONNECT_ERROR;
-
- if(data->set.str[STRING_CERT]) {
- if( gnutls_certificate_set_x509_key_file(
- conn->ssl[sockindex].cred,
- data->set.str[STRING_CERT],
- data->set.str[STRING_KEY] ?
- data->set.str[STRING_KEY] : data->set.str[STRING_CERT],
- do_file_type(data->set.str[STRING_CERT_TYPE]) ) != GNUTLS_E_SUCCESS) {
- failf(data, "error reading X.509 key or certificate file");
- return CURLE_SSL_CONNECT_ERROR;
- }
- }
-
- /* put the credentials to the current session */
- rc = gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE,
- conn->ssl[sockindex].cred);
-
- /* set the connection handle (file descriptor for the socket) */
- gnutls_transport_set_ptr(session,
- GNUTLS_INT_TO_POINTER_CAST(conn->sock[sockindex]));
-
- /* register callback functions to send and receive data. */
- gnutls_transport_set_push_function(session, Curl_gtls_push);
- gnutls_transport_set_pull_function(session, Curl_gtls_pull);
-
- /* lowat must be set to zero when using custom push and pull functions. */
- gnutls_transport_set_lowat(session, 0);
-
- /* This might be a reconnect, so we check for a session ID in the cache
- to speed up things */
-
- if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, &ssl_idsize)) {
- /* we got a session id, use it! */
- gnutls_session_set_data(session, ssl_sessionid, ssl_idsize);
-
- /* Informational message */
- infof (data, "SSL re-using session ID\n");
- }
-
- return CURLE_OK;
-}
-
-static Curl_recv gtls_recv;
-static Curl_send gtls_send;
-
-static CURLcode
-gtls_connect_step3(struct connectdata *conn,
- int sockindex)
-{
- unsigned int cert_list_size;
- const gnutls_datum *chainp;
- unsigned int verify_status;
- gnutls_x509_crt x509_cert,x509_issuer;
- gnutls_datum issuerp;
- char certbuf[256]; /* big enough? */
- size_t size;
- unsigned int algo;
- unsigned int bits;
- time_t certclock;
- const char *ptr;
- struct SessionHandle *data = conn->data;
- gnutls_session session = conn->ssl[sockindex].session;
- int rc;
- int incache;
- void *ssl_sessionid;
-
- /* This function will return the peer's raw certificate (chain) as sent by
- the peer. These certificates are in raw format (DER encoded for
- X.509). In case of a X.509 then a certificate list may be present. The
- first certificate in the list is the peer's certificate, following the
- issuer's certificate, then the issuer's issuer etc. */
-
- chainp = gnutls_certificate_get_peers(session, &cert_list_size);
- if(!chainp) {
- if(data->set.ssl.verifypeer ||
- data->set.ssl.verifyhost ||
- data->set.ssl.issuercert) {
- failf(data, "failed to get server cert");
- return CURLE_PEER_FAILED_VERIFICATION;
- }
- infof(data, "\t common name: WARNING couldn't obtain\n");
- }
-
- if(data->set.ssl.verifypeer) {
- /* This function will try to verify the peer's certificate and return its
- status (trusted, invalid etc.). The value of status should be one or
- more of the gnutls_certificate_status_t enumerated elements bitwise
- or'd. To avoid denial of service attacks some default upper limits
- regarding the certificate key size and chain size are set. To override
- them use gnutls_certificate_set_verify_limits(). */
-
- rc = gnutls_certificate_verify_peers2(session, &verify_status);
- if(rc < 0) {
- failf(data, "server cert verify failed: %d", rc);
- return CURLE_SSL_CONNECT_ERROR;
- }
-
- /* verify_status is a bitmask of gnutls_certificate_status bits */
- if(verify_status & GNUTLS_CERT_INVALID) {
- if(data->set.ssl.verifypeer) {
- failf(data, "server certificate verification failed. CAfile: %s "
- "CRLfile: %s", data->set.ssl.CAfile?data->set.ssl.CAfile:"none",
- data->set.ssl.CRLfile?data->set.ssl.CRLfile:"none");
- return CURLE_SSL_CACERT;
- }
- else
- infof(data, "\t server certificate verification FAILED\n");
- }
- else
- infof(data, "\t server certificate verification OK\n");
- }
- else
- infof(data, "\t server certificate verification SKIPPED\n");
-
- /* initialize an X.509 certificate structure. */
- gnutls_x509_crt_init(&x509_cert);
-
- /* convert the given DER or PEM encoded Certificate to the native
- gnutls_x509_crt_t format */
- gnutls_x509_crt_import(x509_cert, chainp, GNUTLS_X509_FMT_DER);
-
- if (data->set.ssl.issuercert) {
- gnutls_x509_crt_init(&x509_issuer);
- 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);
- unload_file(issuerp);
- if (rc <= 0) {
- failf(data, "server certificate issuer check failed (IssuerCert: %s)",
- data->set.ssl.issuercert?data->set.ssl.issuercert:"none");
- return CURLE_SSL_ISSUER_ERROR;
- }
- infof(data,"\t server certificate issuer check OK (Issuer Cert: %s)\n",
- data->set.ssl.issuercert?data->set.ssl.issuercert:"none");
- }
-
- size=sizeof(certbuf);
- rc = gnutls_x509_crt_get_dn_by_oid(x509_cert, GNUTLS_OID_X520_COMMON_NAME,
- 0, /* the first and only one */
- FALSE,
- certbuf,
- &size);
- if(rc) {
- infof(data, "error fetching CN from cert:%s\n",
- gnutls_strerror(rc));
- }
-
- /* This function will check if the given certificate's subject matches the
- given hostname. This is a basic implementation of the matching described
- in RFC2818 (HTTPS), which takes into account wildcards, and the subject
- alternative name PKIX extension. Returns non zero on success, and zero on
- failure. */
- rc = gnutls_x509_crt_check_hostname(x509_cert, conn->host.name);
-
- if(!rc) {
- if(data->set.ssl.verifyhost > 1) {
- failf(data, "SSL: certificate subject name (%s) does not match "
- "target host name '%s'", certbuf, conn->host.dispname);
- gnutls_x509_crt_deinit(x509_cert);
- return CURLE_PEER_FAILED_VERIFICATION;
- }
- else
- infof(data, "\t common name: %s (does not match '%s')\n",
- certbuf, conn->host.dispname);
- }
- else
- infof(data, "\t common name: %s (matched)\n", certbuf);
-
- /* Check for time-based validity */
- certclock = gnutls_x509_crt_get_expiration_time(x509_cert);
-
- if(certclock == (time_t)-1) {
- failf(data, "server cert expiration date verify failed");
- return CURLE_SSL_CONNECT_ERROR;
- }
-
- if(certclock < time(NULL)) {
- if(data->set.ssl.verifypeer) {
- failf(data, "server certificate expiration date has passed.");
- return CURLE_PEER_FAILED_VERIFICATION;
- }
- else
- infof(data, "\t server certificate expiration date FAILED\n");
- }
- else
- infof(data, "\t server certificate expiration date OK\n");
-
- certclock = gnutls_x509_crt_get_activation_time(x509_cert);
-
- if(certclock == (time_t)-1) {
- failf(data, "server cert activation date verify failed");
- return CURLE_SSL_CONNECT_ERROR;
- }
-
- if(certclock > time(NULL)) {
- if(data->set.ssl.verifypeer) {
- failf(data, "server certificate not activated yet.");
- return CURLE_PEER_FAILED_VERIFICATION;
- }
- else
- infof(data, "\t server certificate activation date FAILED\n");
- }
- else
- infof(data, "\t server certificate activation date OK\n");
-
- /* Show:
-
- - ciphers used
- - subject
- - start date
- - expire date
- - common name
- - issuer
-
- */
-
- /* public key algorithm's parameters */
- algo = gnutls_x509_crt_get_pk_algorithm(x509_cert, &bits);
- infof(data, "\t certificate public key: %s\n",
- gnutls_pk_algorithm_get_name(algo));
-
- /* version of the X.509 certificate. */
- infof(data, "\t certificate version: #%d\n",
- gnutls_x509_crt_get_version(x509_cert));
-
-
- size = sizeof(certbuf);
- gnutls_x509_crt_get_dn(x509_cert, certbuf, &size);
- infof(data, "\t subject: %s\n", certbuf);
-
- certclock = gnutls_x509_crt_get_activation_time(x509_cert);
- showtime(data, "start date", certclock);
-
- certclock = gnutls_x509_crt_get_expiration_time(x509_cert);
- showtime(data, "expire date", certclock);
-
- size = sizeof(certbuf);
- gnutls_x509_crt_get_issuer_dn(x509_cert, certbuf, &size);
- infof(data, "\t issuer: %s\n", certbuf);
-
- gnutls_x509_crt_deinit(x509_cert);
-
- /* compression algorithm (if any) */
- ptr = gnutls_compression_get_name(gnutls_compression_get(session));
- /* the *_get_name() says "NULL" if GNUTLS_COMP_NULL is returned */
- infof(data, "\t compression: %s\n", ptr);
-
- /* the name of the cipher used. ie 3DES. */
- ptr = gnutls_cipher_get_name(gnutls_cipher_get(session));
- infof(data, "\t cipher: %s\n", ptr);
-
- /* the MAC algorithms name. ie SHA1 */
- ptr = gnutls_mac_get_name(gnutls_mac_get(session));
- infof(data, "\t MAC: %s\n", ptr);
-
- conn->ssl[sockindex].state = ssl_connection_complete;
- conn->recv[sockindex] = gtls_recv;
- conn->send[sockindex] = gtls_send;
-
- {
- /* we always unconditionally get the session id here, as even if we
- already got it from the cache and asked to use it in the connection, it
- might've been rejected and then a new one is in use now and we need to
- detect that. */
- void *connect_sessionid;
- size_t connect_idsize;
-
- /* get the session ID data size */
- gnutls_session_get_data(session, NULL, &connect_idsize);
- connect_sessionid = malloc(connect_idsize); /* get a buffer for it */
-
- if(connect_sessionid) {
- /* extract session ID to the allocated buffer */
- gnutls_session_get_data(session, connect_sessionid, &connect_idsize);
-
- incache = !(Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL));
- if (incache) {
- /* there was one before in the cache, so instead of risking that the
- previous one was rejected, we just kill that and store the new */
- Curl_ssl_delsessionid(conn, ssl_sessionid);
- }
-
- /* store this session id */
- return Curl_ssl_addsessionid(conn, connect_sessionid, connect_idsize);
- }
- }
-
- return CURLE_OK;
-}
-
-
-/*
- * This function is called after the TCP connect has completed. Setup the TLS
- * layer and do all necessary magic.
- */
-/* We use connssl->connecting_state to keep track of the connection status;
- there are three states: 'ssl_connect_1' (not started yet or complete),
- 'ssl_connect_2_reading' (waiting for data from server), and
- 'ssl_connect_2_writing' (waiting to be able to write).
- */
-static CURLcode
-gtls_connect_common(struct connectdata *conn,
- int sockindex,
- bool nonblocking,
- bool *done)
-{
- int rc;
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-
- /* Initiate the connection, if not already done */
- if(ssl_connect_1==connssl->connecting_state) {
- rc = gtls_connect_step1 (conn, sockindex);
- if(rc)
- return rc;
- }
-
- rc = handshake(conn, sockindex, TRUE, nonblocking);
- if(rc)
- /* handshake() sets its own error message with failf() */
- return rc;
-
- /* Finish connecting once the handshake is done */
- if(ssl_connect_1==connssl->connecting_state) {
- rc = gtls_connect_step3(conn, sockindex);
- if(rc)
- return rc;
- }
-
- *done = ssl_connect_1==connssl->connecting_state;
-
- return CURLE_OK;
-}
-
-CURLcode
-Curl_gtls_connect_nonblocking(struct connectdata *conn,
- int sockindex,
- bool *done)
-{
- return gtls_connect_common(conn, sockindex, TRUE, done);
-}
-
-CURLcode
-Curl_gtls_connect(struct connectdata *conn,
- int sockindex)
-
-{
- CURLcode retcode;
- bool done = FALSE;
-
- retcode = gtls_connect_common(conn, sockindex, FALSE, &done);
- if(retcode)
- return retcode;
-
- DEBUGASSERT(done);
-
- return CURLE_OK;
-}
-
-static ssize_t gtls_send(struct connectdata *conn,
- int sockindex,
- const void *mem,
- size_t len,
- CURLcode *curlcode)
-{
- ssize_t rc = gnutls_record_send(conn->ssl[sockindex].session, mem, len);
-
- if(rc < 0 ) {
- *curlcode = (rc == GNUTLS_E_AGAIN)
- ? CURLE_AGAIN
- : CURLE_SEND_ERROR;
-
- rc = -1;
- }
-
- return rc;
-}
-
-void Curl_gtls_close_all(struct SessionHandle *data)
-{
- /* FIX: make the OpenSSL code more generic and use parts of it here */
- (void)data;
-}
-
-static void close_one(struct connectdata *conn,
- int idx)
-{
- if(conn->ssl[idx].session) {
- gnutls_bye(conn->ssl[idx].session, GNUTLS_SHUT_RDWR);
- gnutls_deinit(conn->ssl[idx].session);
- conn->ssl[idx].session = NULL;
- }
- if(conn->ssl[idx].cred) {
- gnutls_certificate_free_credentials(conn->ssl[idx].cred);
- conn->ssl[idx].cred = NULL;
- }
-}
-
-void Curl_gtls_close(struct connectdata *conn, int sockindex)
-{
- close_one(conn, sockindex);
-}
-
-/*
- * This function is called to shut down the SSL layer but keep the
- * socket open (CCC - Clear Command Channel)
- */
-int Curl_gtls_shutdown(struct connectdata *conn, int sockindex)
-{
- ssize_t result;
- int retval = 0;
- struct SessionHandle *data = conn->data;
- int done = 0;
- char buf[120];
-
- /* This has only been tested on the proftpd server, and the mod_tls code
- sends a close notify alert without waiting for a close notify alert in
- response. Thus we wait for a close notify alert from the server, but
- we do not send one. Let's hope other servers do the same... */
-
- if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE)
- gnutls_bye(conn->ssl[sockindex].session, GNUTLS_SHUT_WR);
-
- if(conn->ssl[sockindex].session) {
- while(!done) {
- int what = Curl_socket_ready(conn->sock[sockindex],
- CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
- if(what > 0) {
- /* Something to read, let's do it and hope that it is the close
- notify alert from the server */
- result = gnutls_record_recv(conn->ssl[sockindex].session,
- buf, sizeof(buf));
- switch(result) {
- case 0:
- /* This is the expected response. There was no data but only
- the close notify alert */
- done = 1;
- break;
- case GNUTLS_E_AGAIN:
- case GNUTLS_E_INTERRUPTED:
- infof(data, "GNUTLS_E_AGAIN || GNUTLS_E_INTERRUPTED\n");
- break;
- default:
- retval = -1;
- done = 1;
- break;
- }
- }
- else if(0 == what) {
- /* timeout */
- failf(data, "SSL shutdown timeout");
- done = 1;
- break;
- }
- else {
- /* anything that gets here is fatally bad */
- failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
- retval = -1;
- done = 1;
- }
- }
- gnutls_deinit(conn->ssl[sockindex].session);
- }
- gnutls_certificate_free_credentials(conn->ssl[sockindex].cred);
-
- conn->ssl[sockindex].cred = NULL;
- conn->ssl[sockindex].session = NULL;
-
- return retval;
-}
-
-static ssize_t gtls_recv(struct connectdata *conn, /* connection data */
- int num, /* socketindex */
- char *buf, /* store read data here */
- size_t buffersize, /* max amount to read */
- CURLcode *curlcode)
-{
- ssize_t ret;
-
- ret = gnutls_record_recv(conn->ssl[num].session, buf, buffersize);
- if((ret == GNUTLS_E_AGAIN) || (ret == GNUTLS_E_INTERRUPTED)) {
- *curlcode = CURLE_AGAIN;
- return -1;
- }
-
- 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 rc = handshake(conn, num, FALSE, FALSE);
- if(rc)
- /* handshake() writes error message on its own */
- *curlcode = rc;
- else
- *curlcode = CURLE_AGAIN; /* then return as if this was a wouldblock */
- return -1;
- }
-
- if(ret < 0) {
- failf(conn->data, "GnuTLS recv error (%d): %s",
- (int)ret, gnutls_strerror((int)ret));
- *curlcode = CURLE_RECV_ERROR;
- return -1;
- }
-
- return ret;
-}
-
-void Curl_gtls_session_free(void *ptr)
-{
- free(ptr);
-}
-
-size_t Curl_gtls_version(char *buffer, size_t size)
-{
- return snprintf(buffer, size, "GnuTLS/%s", gnutls_check_version(NULL));
-}
-
-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 */
- gcry_fast_random_poll();
-
- if(!ssl_seeded || data->set.str[STRING_SSL_RANDOM_FILE] ||
- data->set.str[STRING_SSL_EGDSOCKET]) {
-
- /* TODO: to a good job seeding the RNG
- This may involve the gcry_control function and these options:
- GCRYCTL_SET_RANDOM_SEED_FILE
- GCRYCTL_SET_RNDEGD_SOCKET
- */
- ssl_seeded = TRUE;
- }
- return 0;
-}
-
-#endif /* USE_GNUTLS */
diff --git a/lib/gtls.h b/lib/gtls.h
deleted file mode 100644
index 51e0af1f..00000000
--- a/lib/gtls.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef __GTLS_H
-#define __GTLS_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-#ifdef USE_GNUTLS
-
-int Curl_gtls_init(void);
-int Curl_gtls_cleanup(void);
-CURLcode Curl_gtls_connect(struct connectdata *conn, int sockindex);
-CURLcode Curl_gtls_connect_nonblocking(struct connectdata *conn,
- int sockindex,
- bool *done);
-
-/* tell GnuTLS to close down all open information regarding connections (and
- thus session ID caching etc) */
-void Curl_gtls_close_all(struct SessionHandle *data);
-
- /* close a SSL connection */
-void Curl_gtls_close(struct connectdata *conn, int sockindex);
-
-void Curl_gtls_session_free(void *ptr);
-size_t Curl_gtls_version(char *buffer, size_t size);
-int Curl_gtls_shutdown(struct connectdata *conn, int sockindex);
-int Curl_gtls_seed(struct SessionHandle *data);
-
-/* API setup for GnuTLS */
-#define curlssl_init Curl_gtls_init
-#define curlssl_cleanup Curl_gtls_cleanup
-#define curlssl_connect Curl_gtls_connect
-#define curlssl_connect_nonblocking Curl_gtls_connect_nonblocking
-#define curlssl_session_free(x) Curl_gtls_session_free(x)
-#define curlssl_close_all 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) (x=x, y=y, CURLE_FAILED_INIT)
-#define curlssl_set_engine_default(x) (x=x, CURLE_FAILED_INIT)
-#define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
-#define curlssl_version Curl_gtls_version
-#define curlssl_check_cxn(x) (x=x, -1)
-#define curlssl_data_pending(x,y) (x=x, y=y, 0)
-
-#endif /* USE_GNUTLS */
-#endif
diff --git a/lib/hash.c b/lib/hash.c
index cdcd2601..c46760ae 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,17 +20,10 @@
*
***************************************************************************/
-#include "setup.h"
-
-#include <string.h>
-#include <stdlib.h>
+#include "curl_setup.h"
#include "hash.h"
#include "llist.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -41,11 +34,14 @@ hash_element_dtor(void *user, void *element)
struct curl_hash *h = (struct curl_hash *) user;
struct curl_hash_element *e = (struct curl_hash_element *) element;
- if(e->key)
- free(e->key);
+ Curl_safefree(e->key);
- if(e->ptr)
+ if(e->ptr) {
h->dtor(e->ptr);
+ e->ptr = NULL;
+ }
+
+ e->key_len = 0;
free(e);
}
@@ -72,47 +68,27 @@ Curl_hash_init(struct curl_hash *h,
h->table = malloc(slots * sizeof(struct curl_llist *));
if(h->table) {
- for (i = 0; i < slots; ++i) {
+ for(i = 0; i < slots; ++i) {
h->table[i] = Curl_llist_alloc((curl_llist_dtor) hash_element_dtor);
if(!h->table[i]) {
- while(i--)
+ while(i--) {
Curl_llist_destroy(h->table[i], NULL);
+ h->table[i] = NULL;
+ }
free(h->table);
+ h->table = NULL;
+ h->slots = 0;
return 1; /* failure */
}
}
return 0; /* fine */
}
- else
+ else {
+ h->slots = 0;
return 1; /* failure */
-}
-
-struct curl_hash *
-Curl_hash_alloc(int slots,
- hash_function hfunc,
- comp_function comparator,
- curl_hash_dtor dtor)
-{
- struct curl_hash *h;
-
- if(!slots || !hfunc || !comparator ||!dtor) {
- return NULL; /* failure */
- }
-
- h = malloc(sizeof(struct curl_hash));
- if(h) {
- if(Curl_hash_init(h, slots, hfunc, comparator, dtor)) {
- /* failure */
- free(h);
- h = NULL;
- }
}
-
- return h;
}
-
-
static struct curl_hash_element *
mk_hash_element(const void *key, size_t key_len, const void *p)
{
@@ -140,7 +116,10 @@ mk_hash_element(const void *key, size_t key_len, const void *p)
#define FETCH_LIST(x,y,z) x->table[x->hash_func(y, z, x->slots)]
/* Insert the data in the hash. If there already was a match in the hash,
- that data is replaced. */
+ * that data is replaced.
+ *
+ * @unittest: 1305
+ */
void *
Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p)
{
@@ -148,7 +127,7 @@ Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p)
struct curl_llist_element *le;
struct curl_llist *l = FETCH_LIST (h, key, key_len);
- for (le = l->head; le; le = le->next) {
+ for(le = l->head; le; le = le->next) {
he = (struct curl_hash_element *) le->ptr;
if(h->comp_func(he->key, he->key_len, key, key_len)) {
Curl_llist_remove(l, le, (void *)h);
@@ -183,10 +162,11 @@ int Curl_hash_delete(struct curl_hash *h, void *key, size_t key_len)
struct curl_hash_element *he;
struct curl_llist *l = FETCH_LIST(h, key, key_len);
- for (le = l->head; le; le = le->next) {
+ for(le = l->head; le; le = le->next) {
he = le->ptr;
if(h->comp_func(he->key, he->key_len, key, key_len)) {
Curl_llist_remove(l, le, (void *) h);
+ --h->size;
return 0;
}
}
@@ -198,12 +178,15 @@ Curl_hash_pick(struct curl_hash *h, void *key, size_t key_len)
{
struct curl_llist_element *le;
struct curl_hash_element *he;
- struct curl_llist *l = FETCH_LIST(h, key, key_len);
+ struct curl_llist *l;
- for (le = l->head; le; le = le->next) {
- he = le->ptr;
- if(h->comp_func(he->key, he->key_len, key, key_len)) {
- return he->ptr;
+ if(h) {
+ l = FETCH_LIST(h, key, key_len);
+ for(le = l->head; le; le = le->next) {
+ he = le->ptr;
+ if(h->comp_func(he->key, he->key_len, key, key_len)) {
+ return he->ptr;
+ }
}
}
@@ -218,10 +201,10 @@ Curl_hash_apply(curl_hash *h, void *user,
struct curl_llist_element *le;
int i;
- for (i = 0; i < h->slots; ++i) {
- for (le = (h->table[i])->head;
- le;
- le = le->next) {
+ for(i = 0; i < h->slots; ++i) {
+ for(le = (h->table[i])->head;
+ le;
+ le = le->next) {
curl_hash_element *el = le->ptr;
cb(user, el->ptr);
}
@@ -229,19 +212,35 @@ Curl_hash_apply(curl_hash *h, void *user,
}
#endif
+/* Destroys all the entries in the given hash and resets its attributes,
+ * prepping the given hash for [static|dynamic] deallocation.
+ */
void
-Curl_hash_clean(struct curl_hash *h)
+Curl_hash_destroy(struct curl_hash *h)
{
int i;
- for (i = 0; i < h->slots; ++i) {
+ for(i = 0; i < h->slots; ++i) {
Curl_llist_destroy(h->table[i], (void *) h);
h->table[i] = NULL;
}
- free(h->table);
+ Curl_safefree(h->table);
+ h->size = 0;
+ h->slots = 0;
}
+/* Removes all the entries in the given hash.
+ *
+ * @unittest: 1602
+ */
+void
+Curl_hash_clean(struct curl_hash *h)
+{
+ Curl_hash_clean_with_criterium(h, NULL, NULL);
+}
+
+/* Cleans all entries that pass the comp function criteria. */
void
Curl_hash_clean_with_criterium(struct curl_hash *h, void *user,
int (*comp)(void *, void *))
@@ -251,14 +250,17 @@ Curl_hash_clean_with_criterium(struct curl_hash *h, void *user,
struct curl_llist *list;
int i;
- for (i = 0; i < h->slots; ++i) {
+ if(!h)
+ return;
+
+ for(i = 0; i < h->slots; ++i) {
list = h->table[i];
le = list->head; /* get first list entry */
while(le) {
struct curl_hash_element *he = le->ptr;
lnext = le->next;
/* ask the callback function if we shall remove this entry or not */
- if(comp(user, he->ptr)) {
+ if(comp == NULL || comp(user, he->ptr)) {
Curl_llist_remove(list, le, (void *) h);
--h->size; /* one less entry in the hash now */
}
@@ -267,17 +269,6 @@ Curl_hash_clean_with_criterium(struct curl_hash *h, void *user,
}
}
-void
-Curl_hash_destroy(struct curl_hash *h)
-{
- if(!h)
- return;
-
- Curl_hash_clean(h);
-
- free(h);
-}
-
size_t Curl_hash_str(void* key, size_t key_length, size_t slots_num)
{
const char* key_str = (const char *) key;
@@ -292,48 +283,86 @@ size_t Curl_hash_str(void* key, size_t key_length, size_t slots_num)
return (h % slots_num);
}
-size_t Curl_str_key_compare(void*k1, size_t key1_len, void*k2, size_t key2_len)
+size_t Curl_str_key_compare(void *k1, size_t key1_len,
+ void *k2, size_t key2_len)
{
- char *key1 = (char *)k1;
- char *key2 = (char *)k2;
-
- if(key1_len == key2_len &&
- *key1 == *key2 &&
- memcmp(key1, key2, key1_len) == 0) {
+ if((key1_len == key2_len) && !memcmp(k1, k2, key1_len))
return 1;
- }
return 0;
}
+void Curl_hash_start_iterate(struct curl_hash *hash,
+ struct curl_hash_iterator *iter)
+{
+ iter->hash = hash;
+ iter->slot_index = 0;
+ iter->current_element = NULL;
+}
+
+struct curl_hash_element *
+Curl_hash_next_element(struct curl_hash_iterator *iter)
+{
+ int i;
+ struct curl_hash *h = iter->hash;
+
+ /* Get the next element in the current list, if any */
+ if(iter->current_element)
+ iter->current_element = iter->current_element->next;
+
+ /* If we have reached the end of the list, find the next one */
+ if(!iter->current_element) {
+ for(i = iter->slot_index;i < h->slots;i++) {
+ if(h->table[i]->head) {
+ iter->current_element = h->table[i]->head;
+ iter->slot_index = i+1;
+ break;
+ }
+ }
+ }
+
+ if(iter->current_element) {
+ struct curl_hash_element *he = iter->current_element->ptr;
+ return he;
+ }
+ else {
+ iter->current_element = NULL;
+ return NULL;
+ }
+}
+
#if 0 /* useful function for debugging hashes and their contents */
void Curl_hash_print(struct curl_hash *h,
void (*func)(void *))
{
- int i;
- struct curl_llist_element *le;
- struct curl_llist *list;
- struct curl_hash_element *he;
+ struct curl_hash_iterator iter;
+ struct curl_hash_element *he;
+ int last_index = -1;
+
if(!h)
return;
fprintf(stderr, "=Hash dump=\n");
- for (i = 0; i < h->slots; i++) {
- list = h->table[i];
- le = list->head; /* get first list entry */
- if(le) {
- fprintf(stderr, "index %d:", i);
- while(le) {
- he = le->ptr;
- if(func)
- func(he->ptr);
- else
- fprintf(stderr, " [%p]", he->ptr);
- le = le->next;
+ Curl_hash_start_iterate(h, &iter);
+
+ he = Curl_hash_next_element(&iter);
+ while(he) {
+ if(iter.slot_index != last_index) {
+ fprintf(stderr, "index %d:", iter.slot_index);
+ if(last_index >= 0) {
+ fprintf(stderr, "\n");
}
- fprintf(stderr, "\n");
+ last_index = iter.slot_index;
}
+
+ if(func)
+ func(he->ptr);
+ else
+ fprintf(stderr, " [%p]", (void *)he->ptr);
+
+ he = Curl_hash_next_element(&iter);
}
+ fprintf(stderr, "\n");
}
#endif
diff --git a/lib/hash.h b/lib/hash.h
index 993aaedd..b13a236b 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -1,5 +1,5 @@
-#ifndef __HASH_H
-#define __HASH_H
+#ifndef HEADER_CURL_HASH_H
+#define HEADER_CURL_HASH_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
+#include "curl_setup.h"
#include <stddef.h>
@@ -62,6 +62,11 @@ struct curl_hash_element {
size_t key_len;
};
+struct curl_hash_iterator {
+ struct curl_hash *hash;
+ int slot_index;
+ struct curl_llist_element *current_element;
+};
int Curl_hash_init(struct curl_hash *h,
int slots,
@@ -69,24 +74,27 @@ int Curl_hash_init(struct curl_hash *h,
comp_function comparator,
curl_hash_dtor dtor);
-struct curl_hash *Curl_hash_alloc(int slots,
- hash_function hfunc,
- comp_function comparator,
- curl_hash_dtor dtor);
-
void *Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p);
int Curl_hash_delete(struct curl_hash *h, void *key, size_t key_len);
void *Curl_hash_pick(struct curl_hash *, void * key, size_t key_len);
void Curl_hash_apply(struct curl_hash *h, void *user,
void (*cb)(void *user, void *ptr));
int Curl_hash_count(struct curl_hash *h);
+void Curl_hash_destroy(struct curl_hash *h);
void Curl_hash_clean(struct curl_hash *h);
void Curl_hash_clean_with_criterium(struct curl_hash *h, void *user,
int (*comp)(void *, void *));
-void Curl_hash_destroy(struct curl_hash *h);
-
size_t Curl_hash_str(void* key, size_t key_length, size_t slots_num);
size_t Curl_str_key_compare(void*k1, size_t key1_len, void*k2,
size_t key2_len);
-#endif
+void Curl_hash_start_iterate(struct curl_hash *hash,
+ struct curl_hash_iterator *iter);
+struct curl_hash_element *
+Curl_hash_next_element(struct curl_hash_iterator *iter);
+
+void Curl_hash_print(struct curl_hash *h,
+ void (*func)(void *));
+
+
+#endif /* HEADER_CURL_HASH_H */
diff --git a/lib/hmac.c b/lib/hmac.c
index 0c01d118..0d2d5f45 100644
--- a/lib/hmac.c
+++ b/lib/hmac.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,15 +22,11 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_CRYPTO_AUTH
#include "curl_hmac.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -59,8 +55,9 @@ Curl_HMAC_init(const HMAC_params * hashparams,
unsigned char b;
/* Create HMAC context. */
- i = sizeof *ctxt + 2 * hashparams->hmac_ctxtsize + hashparams->hmac_resultlen;
- ctxt = (HMAC_context *) malloc(i);
+ i = sizeof *ctxt + 2 * hashparams->hmac_ctxtsize +
+ hashparams->hmac_resultlen;
+ ctxt = malloc(i);
if(!ctxt)
return ctxt;
@@ -84,14 +81,14 @@ Curl_HMAC_init(const HMAC_params * hashparams,
(*hashparams->hmac_hinit)(ctxt->hmac_hashctxt1);
(*hashparams->hmac_hinit)(ctxt->hmac_hashctxt2);
- for (i = 0; i < keylen; i++) {
- b = *key ^ hmac_ipad;
+ for(i = 0; i < keylen; i++) {
+ b = (unsigned char)(*key ^ hmac_ipad);
(*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt1, &b, 1);
- b = *key++ ^ hmac_opad;
+ b = (unsigned char)(*key++ ^ hmac_opad);
(*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt2, &b, 1);
}
- for (; i < hashparams->hmac_maxkeylen; i++) {
+ for(; i < hashparams->hmac_maxkeylen; i++) {
(*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt1, &hmac_ipad, 1);
(*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt2, &hmac_opad, 1);
}
@@ -114,7 +111,8 @@ int Curl_HMAC_final(HMAC_context * ctxt, unsigned char * result)
{
const HMAC_params * hashparams = ctxt->hmac_hash;
- /* Do not get result if called with a null parameter: only release storage. */
+ /* Do not get result if called with a null parameter: only release
+ storage. */
if(!result)
result = (unsigned char *) ctxt->hmac_hashctxt2 +
diff --git a/lib/hostares.c b/lib/hostares.c
deleted file mode 100644
index a00fefa0..00000000
--- a/lib/hostares.c
+++ /dev/null
@@ -1,416 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#include <string.h>
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for the close() proto */
-#endif
-#ifdef __VMS
-#include <in.h>
-#include <inet.h>
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_PROCESS_H
-#include <process.h>
-#endif
-
-#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
-#undef in_addr_t
-#define in_addr_t unsigned long
-#endif
-
-#include "urldata.h"
-#include "sendf.h"
-#include "hostip.h"
-#include "hash.h"
-#include "share.h"
-#include "strerror.h"
-#include "url.h"
-#include "multiif.h"
-#include "inet_pton.h"
-#include "connect.h"
-#include "select.h"
-#include "progress.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-#include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
-
-/***********************************************************************
- * Only for ares-enabled builds
- **********************************************************************/
-
-#ifdef CURLRES_ARES
-
-/*
- * Curl_resolv_fdset() is called when someone from the outside world (using
- * curl_multi_fdset()) wants to get our fd_set setup and we're talking with
- * ares. The caller must make sure that this function is only called when we
- * have a working ares channel.
- *
- * Returns: CURLE_OK always!
- */
-
-int Curl_resolv_getsock(struct connectdata *conn,
- curl_socket_t *socks,
- int numsocks)
-
-{
- struct timeval maxtime;
- struct timeval timebuf;
- struct timeval *timeout;
- int max = ares_getsock(conn->data->state.areschannel,
- (ares_socket_t *)socks, numsocks);
-
-
- maxtime.tv_sec = CURL_TIMEOUT_RESOLVE;
- maxtime.tv_usec = 0;
-
- timeout = ares_timeout(conn->data->state.areschannel, &maxtime, &timebuf);
-
- Curl_expire(conn->data,
- (timeout->tv_sec * 1000) + (timeout->tv_usec/1000));
-
- return max;
-}
-
-/*
- * waitperform()
- *
- * 1) Ask ares what sockets it currently plays with, then
- * 2) wait for the timeout period to check for action on ares' sockets.
- * 3) tell ares to act on all the sockets marked as "with action"
- *
- * return number of sockets it worked on
- */
-
-static int waitperform(struct connectdata *conn, int timeout_ms)
-{
- struct SessionHandle *data = conn->data;
- int nfds;
- int bitmask;
- ares_socket_t socks[ARES_GETSOCK_MAXNUM];
- struct pollfd pfd[ARES_GETSOCK_MAXNUM];
- int i;
- int num = 0;
-
- bitmask = ares_getsock(data->state.areschannel, socks, ARES_GETSOCK_MAXNUM);
-
- for(i=0; i < ARES_GETSOCK_MAXNUM; i++) {
- pfd[i].events = 0;
- pfd[i].revents = 0;
- if(ARES_GETSOCK_READABLE(bitmask, i)) {
- pfd[i].fd = socks[i];
- pfd[i].events |= POLLRDNORM|POLLIN;
- }
- if(ARES_GETSOCK_WRITABLE(bitmask, i)) {
- pfd[i].fd = socks[i];
- pfd[i].events |= POLLWRNORM|POLLOUT;
- }
- if(pfd[i].events != 0)
- num++;
- else
- break;
- }
-
- if(num)
- nfds = Curl_poll(pfd, num, timeout_ms);
- else
- nfds = 0;
-
- if(!nfds)
- /* Call ares_process() unconditonally here, even if we simply timed out
- above, as otherwise the ares name resolve won't timeout! */
- ares_process_fd(data->state.areschannel, ARES_SOCKET_BAD, ARES_SOCKET_BAD);
- else {
- /* move through the descriptors and ask for processing on them */
- for(i=0; i < num; i++)
- ares_process_fd(data->state.areschannel,
- pfd[i].revents & (POLLRDNORM|POLLIN)?
- pfd[i].fd:ARES_SOCKET_BAD,
- pfd[i].revents & (POLLWRNORM|POLLOUT)?
- pfd[i].fd:ARES_SOCKET_BAD);
- }
- return nfds;
-}
-
-/*
- * Curl_is_resolved() is called repeatedly to check if a previous name resolve
- * request has completed. It should also make sure to time-out if the
- * operation seems to take too long.
- *
- * Returns normal CURLcode errors.
- */
-CURLcode Curl_is_resolved(struct connectdata *conn,
- struct Curl_dns_entry **dns)
-{
- struct SessionHandle *data = conn->data;
-
- *dns = NULL;
-
- waitperform(conn, 0);
-
- if(conn->async.done) {
- /* we're done, kill the ares handle */
- if(!conn->async.dns) {
- failf(data, "Could not resolve host: %s (%s)", conn->host.dispname,
- ares_strerror(conn->async.status));
- return CURLE_COULDNT_RESOLVE_HOST;
- }
- *dns = conn->async.dns;
- }
-
- return CURLE_OK;
-}
-
-/*
- * Curl_wait_for_resolv() waits for a resolve to finish. This function should
- * be avoided since using this risk getting the multi interface to "hang".
- *
- * If 'entry' is non-NULL, make it point to the resolved dns entry
- *
- * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved, and
- * CURLE_OPERATION_TIMEDOUT if a time-out occurred.
- */
-CURLcode Curl_wait_for_resolv(struct connectdata *conn,
- struct Curl_dns_entry **entry)
-{
- CURLcode rc=CURLE_OK;
- struct SessionHandle *data = conn->data;
- long timeout;
- struct timeval now = Curl_tvnow();
-
- /* now, see if there's a connect timeout or a regular timeout to
- use instead of the default one */
- if(conn->data->set.connecttimeout)
- timeout = conn->data->set.connecttimeout;
- else if(conn->data->set.timeout)
- timeout = conn->data->set.timeout;
- else
- timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */
-
- /* Wait for the name resolve query to complete. */
- while(1) {
- struct timeval *tvp, tv, store;
- long timediff;
- int itimeout;
- int timeout_ms;
-
- itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
-
- store.tv_sec = itimeout/1000;
- store.tv_usec = (itimeout%1000)*1000;
-
- tvp = ares_timeout(data->state.areschannel, &store, &tv);
-
- /* use the timeout period ares returned to us above if less than one
- second is left, otherwise just use 1000ms to make sure the progress
- callback gets called frequent enough */
- if(!tvp->tv_sec)
- timeout_ms = (int)(tvp->tv_usec/1000);
- else
- timeout_ms = 1000;
-
- waitperform(conn, timeout_ms);
-
- if(conn->async.done)
- break;
-
- if(Curl_pgrsUpdate(conn)) {
- rc = CURLE_ABORTED_BY_CALLBACK;
- timeout = -1; /* trigger the cancel below */
- }
- else {
- timediff = Curl_tvdiff(Curl_tvnow(), now); /* spent time */
- timeout -= timediff?timediff:1; /* always deduct at least 1 */
- }
- if(timeout < 0) {
- /* our timeout, so we cancel the ares operation */
- ares_cancel(data->state.areschannel);
- break;
- }
- }
-
- /* Operation complete, if the lookup was successful we now have the entry
- in the cache. */
-
- if(entry)
- *entry = conn->async.dns;
-
- if(!conn->async.dns) {
- /* a name was not resolved */
- if((timeout < 0) || (conn->async.status == ARES_ETIMEOUT)) {
- if (conn->bits.httpproxy) {
- failf(data, "Resolving proxy timed out: %s", conn->proxy.dispname);
- rc = CURLE_COULDNT_RESOLVE_PROXY;
- }
- else {
- failf(data, "Resolving host timed out: %s", conn->host.dispname);
- rc = CURLE_COULDNT_RESOLVE_HOST;
- }
- }
- else if(conn->async.done) {
- if (conn->bits.httpproxy) {
- failf(data, "Could not resolve proxy: %s (%s)", conn->proxy.dispname,
- ares_strerror(conn->async.status));
- rc = CURLE_COULDNT_RESOLVE_PROXY;
- }
- else {
- failf(data, "Could not resolve host: %s (%s)", conn->host.dispname,
- ares_strerror(conn->async.status));
- rc = CURLE_COULDNT_RESOLVE_HOST;
- }
- }
- else
- rc = CURLE_OPERATION_TIMEDOUT;
-
- /* close the connection, since we can't return failure here without
- cleaning up this connection properly */
- conn->bits.close = TRUE;
- }
-
- return rc;
-}
-
-/*
- * ares_query_completed_cb() is the callback that ares will call when
- * the host query initiated by ares_gethostbyname() from Curl_getaddrinfo(),
- * when using ares, is completed either successfully or with failure.
- */
-static void ares_query_completed_cb(void *arg, /* (struct connectdata *) */
- int status,
-#ifdef HAVE_CARES_CALLBACK_TIMEOUTS
- int timeouts,
-#endif
- struct hostent *hostent)
-{
- struct connectdata *conn = (struct connectdata *)arg;
- struct Curl_addrinfo * ai = NULL;
-
-#ifdef HAVE_CARES_CALLBACK_TIMEOUTS
- (void)timeouts; /* ignored */
-#endif
-
- if (status == CURL_ASYNC_SUCCESS) {
- ai = Curl_he2ai(hostent, conn->async.port);
- }
-
- (void)Curl_addrinfo_callback(arg, status, ai);
-}
-
-/*
- * Curl_getaddrinfo() - when using ares
- *
- * Returns name information about the given hostname and port number. If
- * successful, the 'hostent' is returned and the forth argument will point to
- * memory we need to free after use. That memory *MUST* be freed with
- * Curl_freeaddrinfo(), nothing else.
- */
-Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
- const char *hostname,
- int port,
- int *waitp)
-{
- char *bufp;
- struct SessionHandle *data = conn->data;
- struct in_addr in;
- int family = PF_INET;
-#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
- struct in6_addr in6;
-#endif /* CURLRES_IPV6 */
-
- *waitp = 0; /* default to synchronous response */
-
- /* First check if this is an IPv4 address string */
- if(Curl_inet_pton(AF_INET, hostname, &in) > 0) {
- /* This is a dotted IP address 123.123.123.123-style */
- return Curl_ip2addr(AF_INET, &in, hostname, port);
- }
-
-#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
- /* Otherwise, check if this is an IPv6 address string */
- if (Curl_inet_pton (AF_INET6, hostname, &in6) > 0) {
- /* This must be an IPv6 address literal. */
- return Curl_ip2addr(AF_INET6, &in6, hostname, port);
- }
-
- switch(data->set.ip_version) {
- default:
-#if ARES_VERSION >= 0x010601
- family = PF_UNSPEC; /* supported by c-ares since 1.6.1, so for older
- c-ares versions this just falls through and defaults
- to PF_INET */
- break;
-#endif
- case CURL_IPRESOLVE_V4:
- family = PF_INET;
- break;
- case CURL_IPRESOLVE_V6:
- family = PF_INET6;
- break;
- }
-#endif /* CURLRES_IPV6 */
-
- bufp = strdup(hostname);
-
- if(bufp) {
- Curl_safefree(conn->async.hostname);
- conn->async.hostname = bufp;
- conn->async.port = port;
- conn->async.done = FALSE; /* not done */
- conn->async.status = 0; /* clear */
- conn->async.dns = NULL; /* clear */
-
- /* areschannel is already setup in the Curl_open() function */
- ares_gethostbyname(data->state.areschannel, hostname, family,
- (ares_host_callback)ares_query_completed_cb, conn);
-
- *waitp = 1; /* expect asynchronous response */
- }
- return NULL; /* no struct yet */
-}
-#endif /* CURLRES_ARES */
diff --git a/lib/hostasyn.c b/lib/hostasyn.c
index 127b8d33..17b8be07 100644
--- a/lib/hostasyn.c
+++ b/lib/hostasyn.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,13 +20,8 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#include <string.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -36,16 +31,9 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for the close() proto */
-#endif
#ifdef __VMS
#include <in.h>
#include <inet.h>
-#include <stdlib.h>
#endif
#ifdef HAVE_PROCESS_H
@@ -59,10 +47,6 @@
#include "share.h"
#include "strerror.h"
#include "url.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -82,12 +66,12 @@
*
* The storage operation locks and unlocks the DNS cache.
*/
-CURLcode Curl_addrinfo_callback(struct connectdata * conn,
+CURLcode Curl_addrinfo_callback(struct connectdata *conn,
int status,
struct Curl_addrinfo *ai)
{
struct Curl_dns_entry *dns = NULL;
- CURLcode rc = CURLE_OK;
+ CURLcode result = CURLE_OK;
conn->async.status = status;
@@ -104,14 +88,15 @@ CURLcode Curl_addrinfo_callback(struct connectdata * conn,
if(!dns) {
/* failed to store, cleanup and return error */
Curl_freeaddrinfo(ai);
- rc = CURLE_OUT_OF_MEMORY;
+ result = CURLE_OUT_OF_MEMORY;
}
if(data->share)
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
}
- else
- rc = CURLE_OUT_OF_MEMORY;
+ else {
+ result = CURLE_OUT_OF_MEMORY;
+ }
}
conn->async.dns = dns;
@@ -121,9 +106,48 @@ 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 rc;
+ return result;
+}
+
+/* Call this function after Curl_connect() has returned async=TRUE and
+ then a successful name resolve has been received.
+
+ Note: this function disconnects and frees the conn data in case of
+ resolve failure */
+CURLcode Curl_async_resolved(struct connectdata *conn,
+ bool *protocol_done)
+{
+ CURLcode result;
+
+ if(conn->async.dns) {
+ conn->dns_entry = conn->async.dns;
+ conn->async.dns = NULL;
+ }
+
+ result = Curl_setup_conn(conn, protocol_done);
+
+ if(result)
+ /* We're not allowed to return failure with memory left allocated
+ in the connectdata struct, free those here */
+ Curl_disconnect(conn, FALSE); /* close the connection */
+
+ return result;
+}
+
+/*
+ * Curl_getaddrinfo() is the generic low-level name resolve API within this
+ * source file. There are several versions of this function - for different
+ * name resolve layers (selected at build-time). They all take this same set
+ * of arguments
+ */
+Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
+ const char *hostname,
+ int port,
+ int *waitp)
+{
+ return Curl_resolver_getaddrinfo(conn, hostname, port, waitp);
}
#endif /* CURLRES_ASYNCH */
diff --git a/lib/hostcheck.c b/lib/hostcheck.c
new file mode 100644
index 00000000..62a26e4f
--- /dev/null
+++ b/lib/hostcheck.c
@@ -0,0 +1,147 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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(USE_OPENSSL) || defined(USE_AXTLS) || defined(USE_GSKIT)
+/* these backends use functions from this file */
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#include "hostcheck.h"
+#include "rawstr.h"
+#include "inet_pton.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/*
+ * Match a hostname against a wildcard pattern.
+ * E.g.
+ * "foo.host.com" matches "*.host.com".
+ *
+ * We use the matching rule described in RFC6125, section 6.4.3.
+ * http://tools.ietf.org/html/rfc6125#section-6.4.3
+ *
+ * In addition: ignore trailing dots in the host names and wildcards, so that
+ * the names are used normalized. This is what the browsers do.
+ *
+ * Do not allow wildcard matching on IP numbers. There are apparently
+ * certificates being used with an IP address in the CN field, thus making no
+ * apparent distinction between a name and an IP. We need to detect the use of
+ * an IP address and not wildcard match on such names.
+ *
+ * NOTE: hostmatch() gets called with copied buffers so that it can modify the
+ * contents at will.
+ */
+
+static int hostmatch(char *hostname, char *pattern)
+{
+ const char *pattern_label_end, *pattern_wildcard, *hostname_label_end;
+ int wildcard_enabled;
+ size_t prefixlen, suffixlen;
+ struct in_addr ignored;
+#ifdef ENABLE_IPV6
+ struct sockaddr_in6 si6;
+#endif
+
+ /* normalize pattern and hostname by stripping off trailing dots */
+ size_t len = strlen(hostname);
+ if(hostname[len-1]=='.')
+ hostname[len-1]=0;
+ len = strlen(pattern);
+ if(pattern[len-1]=='.')
+ pattern[len-1]=0;
+
+ pattern_wildcard = strchr(pattern, '*');
+ if(pattern_wildcard == NULL)
+ return Curl_raw_equal(pattern, hostname) ?
+ CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+
+ /* detect IP address as hostname and fail the match if so */
+ if(Curl_inet_pton(AF_INET, hostname, &ignored) > 0)
+ return CURL_HOST_NOMATCH;
+#ifdef ENABLE_IPV6
+ else if(Curl_inet_pton(AF_INET6, hostname, &si6.sin6_addr) > 0)
+ return CURL_HOST_NOMATCH;
+#endif
+
+ /* We require at least 2 dots in pattern to avoid too wide wildcard
+ match. */
+ wildcard_enabled = 1;
+ pattern_label_end = strchr(pattern, '.');
+ if(pattern_label_end == NULL || strchr(pattern_label_end+1, '.') == NULL ||
+ pattern_wildcard > pattern_label_end ||
+ Curl_raw_nequal(pattern, "xn--", 4)) {
+ wildcard_enabled = 0;
+ }
+ if(!wildcard_enabled)
+ return Curl_raw_equal(pattern, hostname) ?
+ CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+
+ hostname_label_end = strchr(hostname, '.');
+ if(hostname_label_end == NULL ||
+ !Curl_raw_equal(pattern_label_end, hostname_label_end))
+ return CURL_HOST_NOMATCH;
+
+ /* The wildcard must match at least one character, so the left-most
+ label of the hostname is at least as large as the left-most label
+ of the pattern. */
+ if(hostname_label_end - hostname < pattern_label_end - pattern)
+ return CURL_HOST_NOMATCH;
+
+ prefixlen = pattern_wildcard - pattern;
+ suffixlen = pattern_label_end - (pattern_wildcard+1);
+ return Curl_raw_nequal(pattern, hostname, prefixlen) &&
+ Curl_raw_nequal(pattern_wildcard+1, hostname_label_end - suffixlen,
+ suffixlen) ?
+ CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+}
+
+int Curl_cert_hostcheck(const char *match_pattern, const char *hostname)
+{
+ char *matchp;
+ char *hostp;
+ int res = 0;
+ if(!match_pattern || !*match_pattern ||
+ !hostname || !*hostname) /* sanity check */
+ ;
+ else {
+ matchp = strdup(match_pattern);
+ if(matchp) {
+ hostp = strdup(hostname);
+ if(hostp) {
+ if(hostmatch(hostp, matchp) == CURL_HOST_MATCH)
+ res= 1;
+ free(hostp);
+ }
+ free(matchp);
+ }
+ }
+
+ return res;
+}
+
+#endif /* OPENSSL or AXTLS or GSKIT */
diff --git a/lib/hostcheck.h b/lib/hostcheck.h
new file mode 100644
index 00000000..f4a517a8
--- /dev/null
+++ b/lib/hostcheck.h
@@ -0,0 +1,32 @@
+#ifndef HEADER_CURL_HOSTCHECK_H
+#define HEADER_CURL_HOSTCHECK_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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/curl.h>
+
+#define CURL_HOST_NOMATCH 0
+#define CURL_HOST_MATCH 1
+int Curl_cert_hostcheck(const char *match_pattern, const char *hostname);
+
+#endif /* HEADER_CURL_HOSTCHECK_H */
+
diff --git a/lib/hostip.c b/lib/hostip.c
index 6185c132..82f3897f 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,13 +20,8 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#include <string.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -36,16 +31,9 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for the close() proto */
-#endif
#ifdef __VMS
#include <in.h>
#include <inet.h>
-#include <stdlib.h>
#endif
#ifdef HAVE_SETJMP_H
@@ -67,10 +55,8 @@
#include "strerror.h"
#include "url.h"
#include "inet_ntop.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "warnless.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -78,9 +64,7 @@
#if defined(CURLRES_SYNCH) && \
defined(HAVE_ALARM) && defined(SIGALRM) && defined(HAVE_SIGSETJMP)
/* alarm-based timeouts can only be used with all the dependencies satisfied */
-// Disable this timeout, as there are a *lot* of crashes that seem to happen in
-// this code on Mac, but not on Windows
-// #define USE_ALARM_TIMEOUT
+#define USE_ALARM_TIMEOUT
#endif
/*
@@ -111,13 +95,15 @@
* hostip.c - method-independent resolver functions and utility functions
* hostasyn.c - functions for asynchronous name resolves
* 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 two asynchronous name resolver backends are implemented in:
+ * asyn-ares.c - functions for ares-using name resolves
+ * asyn-thread.c - functions for threaded name resolves
+
* The hostip.h is the united header file for all this. It defines the
- * CURLRES_* defines based on the config*.h and setup.h defines.
+ * CURLRES_* defines based on the config*.h and curl_setup.h defines.
*/
/* These two symbols are for the global DNS cache */
@@ -151,7 +137,7 @@ struct curl_hash *Curl_global_host_cache_init(void)
void Curl_global_host_cache_dtor(void)
{
if(host_cache_initialized) {
- Curl_hash_clean(&hostname_cache);
+ Curl_hash_destroy(&hostname_cache);
host_cache_initialized = 0;
}
}
@@ -206,14 +192,23 @@ Curl_printable_address(const Curl_addrinfo *ai, char *buf, size_t bufsize)
}
/*
- * Return a hostcache id string for the providing host + port, to be used by
+ * Return a hostcache id string for the provided host + port, to be used by
* the DNS caching.
*/
static char *
-create_hostcache_id(const char *server, int port)
+create_hostcache_id(const char *name, int port)
{
/* create and return the new allocated entry */
- return aprintf("%s:%d", server, port);
+ char *id = aprintf("%s:%d", name, port);
+ char *ptr = id;
+ if(ptr) {
+ /* lower case the name part */
+ while(*ptr && (*ptr != ':')) {
+ *ptr = (char)TOLOWER(*ptr);
+ ptr++;
+ }
+ }
+ return id;
}
struct hostcache_prune_data {
@@ -235,7 +230,8 @@ hostcache_timestamp_remove(void *datap, void *hc)
(struct hostcache_prune_data *) datap;
struct Curl_dns_entry *c = (struct Curl_dns_entry *) hc;
- return (data->now - c->timestamp >= data->cache_timeout);
+ return (0 != c->timestamp)
+ && (data->now - c->timestamp >= data->cache_timeout);
}
/*
@@ -281,40 +277,89 @@ void Curl_hostcache_prune(struct SessionHandle *data)
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
}
-/*
- * Check if the entry should be pruned. Assumes a locked cache.
- */
-static int
-remove_entry_if_stale(struct SessionHandle *data, struct Curl_dns_entry *dns)
+#ifdef HAVE_SIGSETJMP
+/* Beware this is a global and unique instance. This is used to store the
+ return address that we can jump back to from inside a signal handler. This
+ is not thread-safe stuff. */
+sigjmp_buf curl_jmpenv;
+#endif
+
+/* lookup address, returns entry if found and not stale */
+static struct Curl_dns_entry *
+fetch_addr(struct connectdata *conn,
+ const char *hostname,
+ int port)
{
- struct hostcache_prune_data user;
+ char *entry_id = NULL;
+ struct Curl_dns_entry *dns = NULL;
+ size_t entry_len;
+ struct SessionHandle *data = conn->data;
- if( !dns || (data->set.dns_cache_timeout == -1) || !data->dns.hostcache)
- /* cache forever means never prune, and NULL hostcache means
- we can't do it */
- return 0;
+ /* 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;
- time(&user.now);
- user.cache_timeout = data->set.dns_cache_timeout;
+ entry_len = strlen(entry_id);
- if( !hostcache_timestamp_remove(&user,dns) )
- return 0;
+ /* See if its already in our dns cache */
+ dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1);
- Curl_hash_clean_with_criterium(data->dns.hostcache,
- (void *) &user,
- hostcache_timestamp_remove);
+ if(dns && (data->set.dns_cache_timeout != -1)) {
+ /* See whether the returned entry is stale. Done before we release lock */
+ struct hostcache_prune_data user;
+
+ time(&user.now);
+ user.cache_timeout = data->set.dns_cache_timeout;
+
+ if(hostcache_timestamp_remove(&user, dns)) {
+ infof(data, "Hostname in DNS cache was stale, zapped\n");
+ dns = NULL; /* the memory deallocation is being handled by the hash */
+ Curl_hash_delete(data->dns.hostcache, entry_id, entry_len+1);
+ }
+ }
+
+ /* free the allocated entry_id again */
+ free(entry_id);
- return 1;
+ return dns;
}
+/*
+ * 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.
+ *
+ * The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after
+ * use, or we'll leak memory!
+ */
+struct Curl_dns_entry *
+Curl_fetch_addr(struct connectdata *conn,
+ const char *hostname,
+ int port)
+{
+ struct SessionHandle *data = conn->data;
+ struct Curl_dns_entry *dns = NULL;
+
+ if(data->share)
+ Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
-#ifdef HAVE_SIGSETJMP
-/* Beware this is a global and unique instance. This is used to store the
- return address that we can jump back to from inside a signal handler. This
- is not thread-safe stuff. */
-sigjmp_buf curl_jmpenv;
-#endif
+ dns = fetch_addr(conn, hostname, port);
+ if(dns) dns->inuse++; /* we use it! */
+
+ if(data->share)
+ Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
+
+ return dns;
+}
/*
* Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache.
@@ -350,11 +395,11 @@ Curl_cache_addr(struct SessionHandle *data,
return NULL;
}
- dns->inuse = 0; /* init to not used */
+ dns->inuse = 1; /* the cache has the first reference */
dns->addr = addr; /* this is the address(es) */
time(&dns->timestamp);
if(dns->timestamp == 0)
- dns->timestamp = 1; /* zero indicates that entry isn't in hash table */
+ dns->timestamp = 1; /* zero indicates CURLOPT_RESOLVE entry */
/* Store the resolved data in our DNS cache. */
dns2 = Curl_hash_add(data->dns.hostcache, entry_id, entry_len+1,
@@ -368,7 +413,7 @@ Curl_cache_addr(struct SessionHandle *data,
dns = dns2;
dns->inuse++; /* mark entry as in-use */
- /* free the allocated entry_id again */
+ /* free the allocated entry_id */
free(entry_id);
return dns;
@@ -400,34 +445,20 @@ 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);
- /* See if its already in our dns cache */
- dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1);
-
- /* See whether the returned entry is stale. Done before we release lock */
- if( remove_entry_if_stale(data, dns) )
- dns = NULL; /* the memory deallocation is being handled by the hash */
+ dns = fetch_addr(conn, hostname, port);
if(dns) {
+ infof(data, "Hostname %s was found in DNS cache\n", hostname);
dns->inuse++; /* we use it! */
rc = CURLRESOLV_RESOLVED;
}
@@ -435,9 +466,6 @@ int Curl_resolv(struct connectdata *conn,
if(data->share)
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
- /* free the allocated entry_id again */
- free(entry_id);
-
if(!dns) {
/* The entry was not in the cache. Resolve it to IP address */
@@ -446,7 +474,7 @@ int Curl_resolv(struct connectdata *conn,
/* Check what IP specifics the app has requested and if we can provide it.
* If not, bail out. */
- if(!Curl_ipvalid(data))
+ if(!Curl_ipvalid(conn))
return CURLRESOLV_ERROR;
/* If Curl_getaddrinfo() returns NULL, 'respwait' might be set to a
@@ -465,7 +493,7 @@ int Curl_resolv(struct connectdata *conn,
/* the response to our resolve call will come asynchronously at
a later time, good or bad */
/* First, check that we haven't received the info by now */
- result = Curl_is_resolved(conn, &dns);
+ result = Curl_resolver_is_resolved(conn, &dns);
if(result) /* error detected */
return CURLRESOLV_ERROR;
if(dns)
@@ -559,8 +587,12 @@ int Curl_resolv_timeout(struct connectdata *conn,
*entry = NULL;
+ if(timeoutms < 0)
+ /* got an already expired timeout */
+ return CURLRESOLV_TIMEDOUT;
+
#ifdef USE_ALARM_TIMEOUT
- if (data->set.no_signal)
+ if(data->set.no_signal)
/* Ignore the timeout when signals are disabled */
timeout = 0;
else
@@ -575,32 +607,6 @@ int Curl_resolv_timeout(struct connectdata *conn,
we want to wait less than one second we must bail out already now. */
return CURLRESOLV_TIMEDOUT;
- /*************************************************************
- * Set signal handler to catch SIGALRM
- * Store the old value to be able to set it back later!
- *************************************************************/
-#ifdef HAVE_SIGACTION
- sigaction(SIGALRM, NULL, &sigact);
- keep_sigact = sigact;
- keep_copysig = TRUE; /* yes, we have a copy */
- sigact.sa_handler = alarmfunc;
-#ifdef SA_RESTART
- /* HPUX doesn't have SA_RESTART but defaults to that behaviour! */
- sigact.sa_flags &= ~SA_RESTART;
-#endif
- /* now set the new struct */
- sigaction(SIGALRM, &sigact, NULL);
-#else /* HAVE_SIGACTION */
- /* no sigaction(), revert to the much lamer signal() */
-#ifdef HAVE_SIGNAL
- keep_sigact = signal(SIGALRM, alarmfunc);
-#endif
-#endif /* HAVE_SIGACTION */
-
- /* alarm() makes a signal get sent when the timeout fires off, and that
- will abort system calls */
- prev_alarm = alarm((unsigned int) (timeout/1000L));
-
/* This allows us to time-out from the name resolver, as the timeout
will generate a signal and we will siglongjmp() from that here.
This technique has problems (see alarmfunc).
@@ -613,6 +619,33 @@ int Curl_resolv_timeout(struct connectdata *conn,
rc = CURLRESOLV_ERROR;
goto clean_up;
}
+ else {
+ /*************************************************************
+ * Set signal handler to catch SIGALRM
+ * Store the old value to be able to set it back later!
+ *************************************************************/
+#ifdef HAVE_SIGACTION
+ sigaction(SIGALRM, NULL, &sigact);
+ keep_sigact = sigact;
+ keep_copysig = TRUE; /* yes, we have a copy */
+ sigact.sa_handler = alarmfunc;
+#ifdef SA_RESTART
+ /* HPUX doesn't have SA_RESTART but defaults to that behaviour! */
+ sigact.sa_flags &= ~SA_RESTART;
+#endif
+ /* now set the new struct */
+ sigaction(SIGALRM, &sigact, NULL);
+#else /* HAVE_SIGACTION */
+ /* no sigaction(), revert to the much lamer signal() */
+#ifdef HAVE_SIGNAL
+ keep_sigact = signal(SIGALRM, alarmfunc);
+#endif
+#endif /* HAVE_SIGACTION */
+
+ /* alarm() makes a signal get sent when the timeout fires off, and that
+ will abort system calls */
+ prev_alarm = alarm(curlx_sltoui(timeout/1000L));
+ }
#else
#ifndef CURLRES_ASYNCH
@@ -679,45 +712,169 @@ clean_up:
* Curl_resolv_unlock() unlocks the given cached DNS entry. When this has been
* made, the struct may be destroyed due to pruning. It is important that only
* one unlock is made for each Curl_resolv() call.
+ *
+ * May be called with 'data' == NULL for global cache.
*/
void Curl_resolv_unlock(struct SessionHandle *data, struct Curl_dns_entry *dns)
{
- DEBUGASSERT(dns && (dns->inuse>0));
-
- if(data->share)
+ if(data && data->share)
Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
- dns->inuse--;
- /* only free if nobody is using AND it is not in hostcache (timestamp ==
- 0) */
- if (dns->inuse == 0 && dns->timestamp == 0) {
- Curl_freeaddrinfo(dns->addr);
- free(dns);
- }
+ freednsentry(dns);
- if(data->share)
+ if(data && data->share)
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
}
/*
- * File-internal: free a cache dns entry.
+ * File-internal: release cache dns entry reference, free if inuse drops to 0
*/
static void freednsentry(void *freethis)
{
- struct Curl_dns_entry *p = (struct Curl_dns_entry *) freethis;
+ struct Curl_dns_entry *dns = (struct Curl_dns_entry *) freethis;
+ DEBUGASSERT(dns && (dns->inuse>0));
- /* mark the entry as not in hostcache */
- p->timestamp = 0;
- if (p->inuse == 0) {
- Curl_freeaddrinfo(p->addr);
- free(p);
+ dns->inuse--;
+ if(dns->inuse == 0) {
+ Curl_freeaddrinfo(dns->addr);
+ free(dns);
}
}
/*
- * Curl_mk_dnscache() creates a new DNS cache and returns the handle for it.
+ * Curl_mk_dnscache() inits a new DNS cache and returns success/failure.
+ */
+int Curl_mk_dnscache(struct curl_hash *hash)
+{
+ return Curl_hash_init(hash, 7, Curl_hash_str, Curl_str_key_compare,
+ freednsentry);
+}
+
+/*
+ * Curl_hostcache_clean()
+ *
+ * This _can_ be called with 'data' == NULL but then of course no locking
+ * can be done!
*/
-struct curl_hash *Curl_mk_dnscache(void)
+
+void Curl_hostcache_clean(struct SessionHandle *data,
+ struct curl_hash *hash)
+{
+ if(data && data->share)
+ Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
+
+ Curl_hash_clean(hash);
+
+ if(data && data->share)
+ Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
+}
+
+
+CURLcode Curl_loadhostpairs(struct SessionHandle *data)
{
- return Curl_hash_alloc(7, Curl_hash_str, Curl_str_key_compare, freednsentry);
+ struct curl_slist *hostp;
+ char hostname[256];
+ char address[256];
+ int port;
+
+ for(hostp = data->change.resolve; hostp; hostp = hostp->next ) {
+ if(!hostp->data)
+ continue;
+ if(hostp->data[0] == '-') {
+ char *entry_id;
+ size_t entry_len;
+
+ if(2 != sscanf(hostp->data + 1, "%255[^:]:%d", hostname, &port)) {
+ infof(data, "Couldn't parse CURLOPT_RESOLVE removal entry '%s'!\n",
+ hostp->data);
+ continue;
+ }
+
+ /* 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 CURLE_OUT_OF_MEMORY;
+ }
+
+ entry_len = strlen(entry_id);
+
+ if(data->share)
+ Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
+
+ /* delete entry, ignore if it didn't exist */
+ Curl_hash_delete(data->dns.hostcache, entry_id, entry_len+1);
+
+ if(data->share)
+ Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
+
+ /* free the allocated entry_id again */
+ free(entry_id);
+ }
+ else {
+ struct Curl_dns_entry *dns;
+ Curl_addrinfo *addr;
+ char *entry_id;
+ size_t entry_len;
+
+ if(3 != sscanf(hostp->data, "%255[^:]:%d:%255s", hostname, &port,
+ address)) {
+ infof(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'!\n",
+ hostp->data);
+ continue;
+ }
+
+ addr = Curl_str2addr(address, port);
+ if(!addr) {
+ infof(data, "Address in '%s' found illegal!\n", hostp->data);
+ continue;
+ }
+
+ /* 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) {
+ Curl_freeaddrinfo(addr);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ entry_len = strlen(entry_id);
+
+ if(data->share)
+ Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
+
+ /* See if its already in our dns cache */
+ dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1);
+
+ /* free the allocated entry_id again */
+ free(entry_id);
+
+ if(!dns) {
+ /* if not in the cache already, put this host in the cache */
+ dns = Curl_cache_addr(data, addr, hostname, port);
+ if(dns) {
+ dns->timestamp = 0; /* mark as added by CURLOPT_RESOLVE */
+ /* release the returned reference; the cache itself will keep the
+ * entry alive: */
+ dns->inuse--;
+ }
+ }
+ else
+ /* this is a duplicate, free it again */
+ Curl_freeaddrinfo(addr);
+
+ if(data->share)
+ Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
+
+ if(!dns) {
+ Curl_freeaddrinfo(addr);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ infof(data, "Added %s:%d:%s to DNS cache\n",
+ hostname, port, address);
+ }
+ }
+ data->change.resolve = NULL; /* dealt with now */
+
+ return CURLE_OK;
}
diff --git a/lib/hostip.h b/lib/hostip.h
index 33e573cd..d5b44bc9 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -22,9 +22,10 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "hash.h"
#include "curl_addrinfo.h"
+#include "asyn.h"
#ifdef HAVE_SETJMP_H
#include <setjmp.h>
@@ -35,14 +36,6 @@
#define in_addr_t unsigned long
#endif
-/*
- * Comfortable CURLRES_* definitions are included from setup.h
- */
-
-#ifdef USE_ARES
-#include <ares_version.h>
-#endif
-
/* Allocate enough memory to hold the full name information structs and
* everything. OSF1 is known to require at least 8872 bytes. The buffer
* required for storing all possible aliases and IP numbers is according to
@@ -53,17 +46,7 @@
#define CURL_TIMEOUT_RESOLVE 300 /* when using asynch methods, we allow this
many seconds for a name resolve */
-#ifdef CURLRES_ARES
-#define CURL_ASYNC_SUCCESS ARES_SUCCESS
-#if ARES_VERSION >= 0x010500
-/* c-ares 1.5.0 or later, the callback proto is modified */
-#define HAVE_CARES_CALLBACK_TIMEOUTS 1
-#endif
-#else
#define CURL_ASYNC_SUCCESS CURLE_OK
-#define ares_cancel(x) do {} while(0)
-#define ares_destroy(x) do {} while(0)
-#endif
struct addrinfo;
struct hostent;
@@ -82,11 +65,10 @@ void Curl_global_host_cache_dtor(void);
struct Curl_dns_entry {
Curl_addrinfo *addr;
- /* timestamp == 0 -- entry not in hostcache
- timestamp != 0 -- entry is in hostcache */
+ /* timestamp == 0 -- CURLOPT_RESOLVE entry, doesn't timeout */
time_t timestamp;
- long inuse; /* use-counter, make very sure you decrease this
- when you're done using the address you received */
+ /* use-counter, use Curl_resolv_unlock to release reference */
+ long inuse;
};
/*
@@ -107,11 +89,21 @@ int Curl_resolv_timeout(struct connectdata *conn, const char *hostname,
int port, struct Curl_dns_entry **dnsentry,
long timeoutms);
+#ifdef CURLRES_IPV6
+/*
+ * Curl_ipv6works() returns TRUE if IPv6 seems to work.
+ */
+bool Curl_ipv6works(void);
+#else
+#define Curl_ipv6works() FALSE
+#endif
+
/*
* Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
* been set and returns TRUE if they are OK.
*/
-bool Curl_ipvalid(struct SessionHandle *data);
+bool Curl_ipvalid(struct connectdata *conn);
+
/*
* Curl_getaddrinfo() is the generic low-level name resolve API within this
@@ -124,20 +116,6 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
int port,
int *waitp);
-CURLcode Curl_is_resolved(struct connectdata *conn,
- struct Curl_dns_entry **dns);
-CURLcode Curl_wait_for_resolv(struct connectdata *conn,
- struct Curl_dns_entry **dnsentry);
-
-/* Curl_resolv_getsock() is a generic function that exists in multiple
- versions depending on what name resolve technology we've built to use. The
- function is called from the multi_getsock() function. 'sock' is a pointer
- to an array to hold the file descriptors, with 'numsock' being the size of
- that array (in number of entries). This function is supposed to return
- bitmask indicating what file descriptors (referring to array indexes in the
- 'sock' array) to wait for, read/write. */
-int Curl_resolv_getsock(struct connectdata *conn, curl_socket_t *sock,
- int numsocks);
/* unlock a previously resolved dns entry */
void Curl_resolv_unlock(struct SessionHandle *data,
@@ -146,8 +124,8 @@ void Curl_resolv_unlock(struct SessionHandle *data,
/* for debugging purposes only: */
void Curl_scan_cache_used(void *user, void *ptr);
-/* make a new dns cache and return the handle */
-struct curl_hash *Curl_mk_dnscache(void);
+/* init a new dns cache and return success */
+int Curl_mk_dnscache(struct curl_hash *hash);
/* prune old entries from the DNS cache */
void Curl_hostcache_prune(struct SessionHandle *data);
@@ -167,11 +145,18 @@ int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa,
/* IPv4 threadsafe resolve function used for synch and asynch builds */
Curl_addrinfo *Curl_ipv4_resolve_r(const char * hostname, int port);
+CURLcode Curl_async_resolved(struct connectdata *conn,
+ bool *protocol_connect);
+
+#ifndef CURLRES_ASYNCH
+#define Curl_async_resolved(x,y) CURLE_OK
+#endif
+
/*
* Curl_addrinfo_callback() is used when we build with any asynch specialty.
* Handles end of async request processing. Inserts ai into hostcache when
* status is CURL_ASYNC_SUCCESS. Twiddles fields in conn to indicate async
- * request completed wether successfull or failed.
+ * request completed whether successful or failed.
*/
CURLcode Curl_addrinfo_callback(struct connectdata *conn,
int status,
@@ -186,6 +171,18 @@ 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.
+ *
+ * The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after
+ * use, or we'll leak memory!
+ */
+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.
@@ -194,13 +191,6 @@ struct Curl_dns_entry *
Curl_cache_addr(struct SessionHandle *data, Curl_addrinfo *addr,
const char *hostname, int port);
-/*
- * Curl_destroy_thread_data() cleans up async resolver data.
- * Complementary of ares_destroy.
- */
-struct Curl_async; /* forward-declaration */
-void Curl_destroy_thread_data(struct Curl_async *async);
-
#ifndef INADDR_NONE
#define CURL_INADDR_NONE (in_addr_t) ~0
#else
@@ -216,4 +206,45 @@ void Curl_destroy_thread_data(struct Curl_async *async);
extern sigjmp_buf curl_jmpenv;
#endif
+/*
+ * Function provided by the resolver backend to set DNS servers to use.
+ */
+CURLcode Curl_set_dns_servers(struct SessionHandle *data, char *servers);
+
+/*
+ * Function provided by the resolver backend to set
+ * outgoing interface to use for DNS requests
+ */
+CURLcode Curl_set_dns_interface(struct SessionHandle *data,
+ const char *interf);
+
+/*
+ * Function provided by the resolver backend to set
+ * local IPv4 address to use as source address for DNS requests
+ */
+CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data,
+ const char *local_ip4);
+
+/*
+ * Function provided by the resolver backend to set
+ * local IPv6 address to use as source address for DNS requests
+ */
+CURLcode Curl_set_dns_local_ip6(struct SessionHandle *data,
+ const char *local_ip6);
+
+/*
+ * Clean off entries from the cache
+ */
+void Curl_hostcache_clean(struct SessionHandle *data, struct curl_hash *hash);
+
+/*
+ * Destroy the hostcache of this handle.
+ */
+void Curl_hostcache_destroy(struct SessionHandle *data);
+
+/*
+ * Populate the cache with specified entries from CURLOPT_RESOLVE.
+ */
+CURLcode Curl_loadhostpairs(struct SessionHandle *data);
+
#endif /* HEADER_CURL_HOSTIP_H */
diff --git a/lib/hostip4.c b/lib/hostip4.c
index 05dd73e0..37b03691 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +20,8 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#include <string.h>
-#include <errno.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -37,16 +31,9 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for the close() proto */
-#endif
#ifdef __VMS
#include <in.h>
#include <inet.h>
-#include <stdlib.h>
#endif
#ifdef HAVE_PROCESS_H
@@ -61,34 +48,32 @@
#include "strerror.h"
#include "url.h"
#include "inet_pton.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#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.
*/
-bool Curl_ipvalid(struct SessionHandle *data)
+bool Curl_ipvalid(struct connectdata *conn)
{
- if(data->set.ip_version == CURL_IPRESOLVE_V6)
- /* an ipv6 address was requested and we can't get/use one */
+ if(conn->ip_version == CURL_IPRESOLVE_V6)
+ /* An IPv6 address was requested and we can't get/use one */
return FALSE;
return TRUE; /* OK, proceed */
}
#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.
@@ -125,6 +110,8 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
#endif /* CURLRES_SYNCH */
#endif /* CURLRES_IPV4 */
+#if defined(CURLRES_IPV4) && !defined(CURLRES_ARES)
+
/*
* Curl_ipv4_resolve_r() - ipv4 threadsafe resolver function.
*
@@ -150,7 +137,7 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname,
#if defined(HAVE_GETADDRINFO_THREADSAFE)
else {
struct addrinfo hints;
- char sbuf[NI_MAXSERV];
+ char sbuf[12];
char *sbufptr = NULL;
memset(&hints, 0, sizeof(hints));
@@ -317,3 +304,4 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname,
return ai;
}
+#endif /* defined(CURLRES_IPV4) && !defined(CURLRES_ARES) */
diff --git a/lib/hostip6.c b/lib/hostip6.c
index 7d0a9122..6ab131a8 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,13 +20,8 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#include <string.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -36,16 +31,9 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for the close() proto */
-#endif
#ifdef __VMS
#include <in.h>
#include <inet.h>
-#include <stdlib.h>
#endif
#ifdef HAVE_PROCESS_H
@@ -61,16 +49,13 @@
#include "url.h"
#include "inet_pton.h"
#include "connect.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
/***********************************************************************
- * Only for ipv6-enabled builds
+ * Only for IPv6-enabled builds
**********************************************************************/
#ifdef CURLRES_IPV6
@@ -78,7 +63,7 @@
#if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO)
/* These are strictly for memory tracing and are using the same style as the
* family otherwise present in memdebug.c. I put these ones here since they
- * require a bunch of structs I didn't wanna include in memdebug.c
+ * require a bunch of structs I didn't want to include in memdebug.c
*/
/*
@@ -109,19 +94,36 @@ int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa,
#endif /* defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO) */
/*
- * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
- * been set and returns TRUE if they are OK.
+ * Curl_ipv6works() returns TRUE if IPv6 seems to work.
*/
-bool Curl_ipvalid(struct SessionHandle *data)
+bool Curl_ipv6works(void)
{
- if(data->set.ip_version == CURL_IPRESOLVE_V6) {
- /* see if we have an IPv6 stack */
+ /* the nature of most system is that IPv6 status doesn't come and go
+ during a program's lifetime so we only probe the first time and then we
+ have the info kept for fast re-use */
+ static int ipv6_works = -1;
+ if(-1 == ipv6_works) {
+ /* 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 and we can't get/use one */
- return FALSE;
- sclose(s);
+ /* an IPv6 address was requested but we can't get/use one */
+ ipv6_works = 0;
+ else {
+ ipv6_works = 1;
+ Curl_closesocket(NULL, s);
+ }
}
+ return (ipv6_works>0)?TRUE:FALSE;
+}
+
+/*
+ * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
+ * been set and returns TRUE if they are OK.
+ */
+bool Curl_ipvalid(struct connectdata *conn)
+{
+ if(conn->ip_version == CURL_IPRESOLVE_V6)
+ return Curl_ipv6works();
return TRUE;
}
@@ -131,7 +133,7 @@ bool Curl_ipvalid(struct SessionHandle *data)
static void dump_addrinfo(struct connectdata *conn, const Curl_addrinfo *ai)
{
printf("dump_addrinfo:\n");
- for ( ; ai; ai = ai->ai_next) {
+ for(; ai; ai = ai->ai_next) {
char buf[INET6_ADDRSTRLEN];
printf(" fam %2d, CNAME %s, ",
@@ -143,11 +145,11 @@ static void dump_addrinfo(struct connectdata *conn, const Curl_addrinfo *ai)
}
}
#else
-#define dump_addrinfo(x,y)
+#define dump_addrinfo(x,y) Curl_nop_stmt
#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
@@ -163,7 +165,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
struct addrinfo hints;
Curl_addrinfo *res;
int error;
- char sbuf[NI_MAXSERV];
+ char sbuf[12];
char *sbufptr = NULL;
char addrbuf[128];
int pf;
@@ -174,7 +176,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
/*
* Check if a limited name resolve has been requested.
*/
- switch(data->set.ip_version) {
+ switch(conn->ip_version) {
case CURL_IPRESOLVE_V4:
pf = PF_INET;
break;
@@ -186,23 +188,9 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
break;
}
- if (pf != PF_INET) {
- /* see if we have an IPv6 stack */
- curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0);
- if(s == CURL_SOCKET_BAD) {
- /* Some non-IPv6 stacks have been found to make very slow name resolves
- * when PF_UNSPEC is used, so thus we switch to a mere PF_INET lookup if
- * the stack seems to be a non-ipv6 one. */
-
- pf = PF_INET;
- }
- else {
- /* This seems to be an IPv6-capable stack, use PF_UNSPEC for the widest
- * possible checks. And close the socket again.
- */
- sclose(s);
- }
- }
+ if((pf != PF_INET) && !Curl_ipv6works())
+ /* The stack seems to be a non-IPv6 one */
+ pf = PF_INET;
memset(&hints, 0, sizeof(hints));
hints.ai_family = pf;
diff --git a/lib/hostsyn.c b/lib/hostsyn.c
index b68e4702..fb1de35c 100644
--- a/lib/hostsyn.c
+++ b/lib/hostsyn.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,13 +20,8 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#include <string.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -36,16 +31,9 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for the close() proto */
-#endif
#ifdef __VMS
#include <in.h>
#include <inet.h>
-#include <stdlib.h>
#endif
#ifdef HAVE_PROCESS_H
@@ -59,10 +47,6 @@
#include "share.h"
#include "strerror.h"
#include "url.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -73,51 +57,51 @@
#ifdef CURLRES_SYNCH
/*
- * Curl_wait_for_resolv() for synch-builds. Curl_resolv() can never return
- * wait==TRUE, so this function will never be called. If it still gets called,
- * we return failure at once.
- *
- * We provide this function only to allow multi.c to remain unaware if we are
- * doing asynch resolves or not.
+ * Function provided by the resolver backend to set DNS servers to use.
*/
-CURLcode Curl_wait_for_resolv(struct connectdata *conn,
- struct Curl_dns_entry **entry)
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
+ char *servers)
{
- (void)conn;
- *entry=NULL;
- return CURLE_COULDNT_RESOLVE_HOST;
+ (void)data;
+ (void)servers;
+ return CURLE_NOT_BUILT_IN;
+
}
/*
- * This function will never be called when synch-built. If it still gets
- * called, we return failure at once.
- *
- * We provide this function only to allow multi.c to remain unaware if we are
- * doing asynch resolves or not.
+ * Function provided by the resolver backend to set
+ * outgoing interface to use for DNS requests
*/
-CURLcode Curl_is_resolved(struct connectdata *conn,
- struct Curl_dns_entry **dns)
+CURLcode Curl_set_dns_interface(struct SessionHandle *data,
+ const char *interf)
{
- (void)conn;
- *dns = NULL;
-
- return CURLE_COULDNT_RESOLVE_HOST;
+ (void)data;
+ (void)interf;
+ return CURLE_NOT_BUILT_IN;
}
/*
- * We just return OK, this function is never actually used for synch builds.
- * It is present here to keep #ifdefs out from multi.c
+ * Function provided by the resolver backend to set
+ * local IPv4 address to use as source address for DNS requests
*/
-
-int Curl_resolv_getsock(struct connectdata *conn,
- curl_socket_t *sock,
- int numsocks)
+CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data,
+ const char *local_ip4)
{
- (void)conn;
- (void)sock;
- (void)numsocks;
+ (void)data;
+ (void)local_ip4;
+ return CURLE_NOT_BUILT_IN;
+}
- return 0; /* no bits since we don't use any socks */
+/*
+ * Function provided by the resolver backend to set
+ * local IPv6 address to use as source address for DNS requests
+ */
+CURLcode Curl_set_dns_local_ip6(struct SessionHandle *data,
+ const char *local_ip6)
+{
+ (void)data;
+ (void)local_ip6;
+ return CURLE_NOT_BUILT_IN;
}
#endif /* truly sync */
diff --git a/lib/hostthre.c b/lib/hostthre.c
deleted file mode 100644
index e8dfa540..00000000
--- a/lib/hostthre.c
+++ /dev/null
@@ -1,579 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#include <string.h>
-#include <errno.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for the close() proto */
-#endif
-#ifdef __VMS
-#include <in.h>
-#include <inet.h>
-#include <stdlib.h>
-#endif
-
-#if defined(USE_THREADS_POSIX)
-# ifdef HAVE_PTHREAD_H
-# include <pthread.h>
-# endif
-#elif defined(USE_THREADS_WIN32)
-# ifdef HAVE_PROCESS_H
-# include <process.h>
-# endif
-#endif
-
-#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
-#undef in_addr_t
-#define in_addr_t unsigned long
-#endif
-
-#include "urldata.h"
-#include "sendf.h"
-#include "hostip.h"
-#include "hash.h"
-#include "share.h"
-#include "strerror.h"
-#include "url.h"
-#include "multiif.h"
-#include "inet_pton.h"
-#include "inet_ntop.h"
-#include "curl_threads.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-#include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
-
-/***********************************************************************
- * Only for threaded name resolves builds
- **********************************************************************/
-#ifdef CURLRES_THREADED
-
-/* This function is used to init a threaded resolve */
-static bool init_resolve_thread(struct connectdata *conn,
- const char *hostname, int port,
- const struct addrinfo *hints);
-
-
-/* Data for synchronization between resolver thread and its parent */
-struct thread_sync_data {
- curl_mutex_t * mtx;
- int done;
-
- char * hostname; /* hostname to resolve, Curl_async.hostname
- duplicate */
- int port;
- int sock_error;
- Curl_addrinfo *res;
-#ifdef HAVE_GETADDRINFO
- struct addrinfo hints;
-#endif
-};
-
-struct thread_data {
- curl_thread_t thread_hnd;
- curl_socket_t dummy_sock;
- unsigned int poll_interval;
- int interval_end;
- struct thread_sync_data tsd;
-};
-
-static struct thread_sync_data * conn_thread_sync_data(struct connectdata *conn)
-{
- return &(((struct thread_data *)conn->async.os_specific)->tsd);
-}
-
-#define CONN_THREAD_SYNC_DATA(conn) &(((conn)->async.os_specific)->tsd);
-
-/* Destroy resolver thread synchronization data */
-static
-void destroy_thread_sync_data(struct thread_sync_data * tsd)
-{
- if (tsd->mtx) {
- Curl_mutex_destroy(tsd->mtx);
- free(tsd->mtx);
- }
-
- if(tsd->hostname)
- free(tsd->hostname);
-
- if (tsd->res)
- Curl_freeaddrinfo(tsd->res);
-
- memset(tsd,0,sizeof(*tsd));
-}
-
-/* Initialize resolver thread synchronization data */
-static
-int init_thread_sync_data(struct thread_sync_data * tsd,
- const char * hostname,
- int port,
- const struct addrinfo *hints)
-{
- memset(tsd, 0, sizeof(*tsd));
-
- tsd->port = port;
-#ifdef CURLRES_IPV6
- DEBUGASSERT(hints);
- tsd->hints = *hints;
-#else
- (void) hints;
-#endif
-
- tsd->mtx = malloc(sizeof(curl_mutex_t));
- if (tsd->mtx == NULL) goto err_exit;
-
- Curl_mutex_init(tsd->mtx);
-
- tsd->sock_error = CURL_ASYNC_SUCCESS;
-
- /* Copying hostname string because original can be destroyed by parent
- * thread during gethostbyname execution.
- */
- tsd->hostname = strdup(hostname);
- if (!tsd->hostname) goto err_exit;
-
- return 1;
-
- err_exit:
- /* Memory allocation failed */
- destroy_thread_sync_data(tsd);
- return 0;
-}
-
-static int getaddrinfo_complete(struct connectdata *conn)
-{
- struct thread_sync_data *tsd = conn_thread_sync_data(conn);
- int rc;
-
- rc = Curl_addrinfo_callback(conn, tsd->sock_error, tsd->res);
- /* The tsd->res structure has been copied to async.dns and perhaps the DNS cache.
- Set our copy to NULL so destroy_thread_sync_data doesn't free it.
- */
- tsd->res = NULL;
-
- return rc;
-}
-
-
-#ifdef HAVE_GETADDRINFO
-
-/*
- * getaddrinfo_thread() resolves a name and then exits.
- *
- * For builds without ARES, but with ENABLE_IPV6, create a resolver thread
- * and wait on it.
- */
-static unsigned int CURL_STDCALL getaddrinfo_thread (void *arg)
-{
- struct thread_sync_data *tsd = (struct thread_sync_data*)arg;
- char service [NI_MAXSERV];
- int rc;
-
- snprintf(service, sizeof(service), "%d", tsd->port);
-
- rc = Curl_getaddrinfo_ex(tsd->hostname, service, &tsd->hints, &tsd->res);
-
- if (rc != 0) {
- tsd->sock_error = SOCKERRNO;
- if (tsd->sock_error == 0)
- tsd->sock_error = ENOMEM;
- }
-
- Curl_mutex_acquire(tsd->mtx);
- tsd->done = 1;
- Curl_mutex_release(tsd->mtx);
-
- return 0;
-}
-
-#else /* HAVE_GETADDRINFO */
-
-/*
- * gethostbyname_thread() resolves a name and then exits.
- */
-static unsigned int CURL_STDCALL gethostbyname_thread (void *arg)
-{
- struct thread_sync_data *tsd = (struct thread_sync_data *)arg;
-
- tsd->res = Curl_ipv4_resolve_r(tsd->hostname, tsd->port);
-
- if (!tsd->res) {
- tsd->sock_error = SOCKERRNO;
- if (tsd->sock_error == 0)
- tsd->sock_error = ENOMEM;
- }
-
- Curl_mutex_acquire(tsd->mtx);
- tsd->done = 1;
- Curl_mutex_release(tsd->mtx);
-
- return 0;
-}
-
-#endif /* HAVE_GETADDRINFO */
-
-/*
- * Curl_destroy_thread_data() cleans up async resolver data and thread handle.
- * Complementary of ares_destroy.
- */
-void Curl_destroy_thread_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;
-
- if (td->dummy_sock != CURL_SOCKET_BAD)
- sclose(td->dummy_sock);
-
- if (td->thread_hnd != curl_thread_t_null)
- Curl_thread_join(&td->thread_hnd);
-
- destroy_thread_sync_data(&td->tsd);
-
- free(async->os_specific);
- }
- async->hostname = NULL;
- async->os_specific = NULL;
-}
-
-/*
- * init_resolve_thread() starts a new thread that performs the actual
- * resolve. This function returns before the resolve is done.
- *
- * Returns FALSE in case of failure, otherwise TRUE.
- */
-static bool init_resolve_thread (struct connectdata *conn,
- const char *hostname, int port,
- const struct addrinfo *hints)
-{
- struct thread_data *td = calloc(1, sizeof(struct thread_data));
- int err = ENOMEM;
-
- conn->async.os_specific = (void*) td;
- if(!td)
- goto err_exit;
-
- conn->async.port = port;
- conn->async.done = FALSE;
- conn->async.status = 0;
- conn->async.dns = NULL;
- td->dummy_sock = CURL_SOCKET_BAD;
- td->thread_hnd = curl_thread_t_null;
-
- if (!init_thread_sync_data(&td->tsd, hostname, port, hints))
- goto err_exit;
-
- Curl_safefree(conn->async.hostname);
- conn->async.hostname = strdup(hostname);
- if(!conn->async.hostname)
- goto err_exit;
-
-#ifdef WIN32
- /* This socket is only to keep Curl_resolv_fdset() and select() happy;
- * should never become signalled for read since it's unbound but
- * Windows needs at least 1 socket in select().
- */
- td->dummy_sock = socket(AF_INET, SOCK_DGRAM, 0);
- if (td->dummy_sock == CURL_SOCKET_BAD)
- goto err_exit;
-#endif
-
-#ifdef HAVE_GETADDRINFO
- td->thread_hnd = Curl_thread_create(getaddrinfo_thread, &td->tsd);
-#else
- td->thread_hnd = Curl_thread_create(gethostbyname_thread, &td->tsd);
-#endif
-
- if(!td->thread_hnd) {
-#ifndef _WIN32_WCE
- err = errno;
-#endif
- goto err_exit;
- }
-
- return TRUE;
-
- err_exit:
- Curl_destroy_thread_data(&conn->async);
-
- SET_ERRNO(err);
-
- return FALSE;
-}
-
-
-/*
- * Curl_wait_for_resolv() waits for a resolve to finish. This function should
- * be avoided since using this risk getting the multi interface to "hang".
- *
- * If 'entry' is non-NULL, make it point to the resolved dns entry
- *
- * This is the version for resolves-in-a-thread.
- */
-CURLcode Curl_wait_for_resolv(struct connectdata *conn,
- struct Curl_dns_entry **entry)
-{
- struct thread_data *td = (struct thread_data*) conn->async.os_specific;
- struct SessionHandle *data = conn->data;
- CURLcode rc = CURLE_OK;
-
- DEBUGASSERT(conn && td);
-
- /* wait for the thread to resolve the name */
- if (Curl_thread_join(&td->thread_hnd)) {
- rc = getaddrinfo_complete(conn);
- } else {
- DEBUGASSERT(0);
- }
-
- conn->async.done = TRUE;
-
- if(entry)
- *entry = conn->async.dns;
-
- if(!conn->async.dns) {
- /* a name was not resolved */
- if (conn->bits.httpproxy) {
- failf(data, "Could not resolve proxy: %s; %s",
- conn->async.hostname, Curl_strerror(conn, conn->async.status));
- rc = CURLE_COULDNT_RESOLVE_PROXY;
- } else {
- failf(data, "Could not resolve host: %s; %s",
- conn->async.hostname, Curl_strerror(conn, conn->async.status));
- rc = CURLE_COULDNT_RESOLVE_HOST;
- }
- }
-
- Curl_destroy_thread_data(&conn->async);
-
- if(!conn->async.dns)
- conn->bits.close = TRUE;
-
- return (rc);
-}
-
-/*
- * Curl_is_resolved() is called repeatedly to check if a previous name resolve
- * request has completed. It should also make sure to time-out if the
- * operation seems to take too long.
- */
-CURLcode Curl_is_resolved(struct connectdata *conn,
- struct Curl_dns_entry **entry)
-{
- struct SessionHandle *data = conn->data;
- struct thread_data *td = (struct thread_data*) conn->async.os_specific;
- int done = 0;
-
- *entry = NULL;
-
- if (!td) {
- DEBUGASSERT(td);
- return CURLE_COULDNT_RESOLVE_HOST;
- }
-
- Curl_mutex_acquire(td->tsd.mtx);
- done = td->tsd.done;
- Curl_mutex_release(td->tsd.mtx);
-
- if (done) {
- getaddrinfo_complete(conn);
- Curl_destroy_thread_data(&conn->async);
-
- if(!conn->async.dns) {
- failf(data, "Could not resolve host: %s; %s",
- conn->host.name, Curl_strerror(conn, conn->async.status));
- return CURLE_COULDNT_RESOLVE_HOST;
- }
- *entry = conn->async.dns;
- } else {
- /* poll for name lookup done with exponential backoff up to 250ms */
- int elapsed = Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle);
- if (elapsed < 0)
- elapsed = 0;
-
- if (td->poll_interval == 0)
- /* Start at 1ms poll interval */
- td->poll_interval = 1;
- else if (elapsed >= td->interval_end)
- /* Back-off exponentially if last interval expired */
- td->poll_interval *= 2;
-
- if (td->poll_interval > 250)
- td->poll_interval = 250;
-
- td->interval_end = elapsed + td->poll_interval;
- Curl_expire(conn->data, td->poll_interval);
- }
-
- return CURLE_OK;
-}
-
-int Curl_resolv_getsock(struct connectdata *conn,
- curl_socket_t *socks,
- int numsocks)
-{
- const struct thread_data *td =
- (const struct thread_data *) conn->async.os_specific;
-
- if(td && td->dummy_sock != CURL_SOCKET_BAD) {
- if(numsocks) {
- /* return one socket waiting for readable, even though this is just
- a dummy */
- socks[0] = td->dummy_sock;
- return GETSOCK_READSOCK(0);
- }
- }
- return 0;
-}
-
-#ifndef HAVE_GETADDRINFO
-/*
- * Curl_getaddrinfo() - for platforms without getaddrinfo
- */
-Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
- const char *hostname,
- int port,
- int *waitp)
-{
- struct in_addr in;
-
- *waitp = 0; /* default to synchronous response */
-
- if(Curl_inet_pton(AF_INET, hostname, &in) > 0)
- /* This is a dotted IP address 123.123.123.123-style */
- return Curl_ip2addr(AF_INET, &in, hostname, port);
-
- /* fire up a new resolver thread! */
- if(init_resolve_thread(conn, hostname, port, NULL)) {
- *waitp = 1; /* expect asynchronous response */
- return NULL;
- }
-
- /* fall-back to blocking version */
- return Curl_ipv4_resolve_r(hostname, port);
-}
-
-#else /* !HAVE_GETADDRINFO */
-
-/*
- * Curl_getaddrinfo() - for getaddrinfo
- */
-Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
- const char *hostname,
- int port,
- int *waitp)
-{
- struct addrinfo hints;
- Curl_addrinfo *res;
- int error;
- char sbuf[NI_MAXSERV];
- int pf = PF_INET;
- struct SessionHandle *data = conn->data;
-
- *waitp = 0; /* default to synchronous response */
-
-#ifndef CURLRES_IPV4
- /*
- * Check if a limited name resolve has been requested.
- */
- switch(data->set.ip_version) {
- case CURL_IPRESOLVE_V4:
- pf = PF_INET;
- break;
- case CURL_IPRESOLVE_V6:
- pf = PF_INET6;
- break;
- default:
- pf = PF_UNSPEC;
- break;
- }
-
- if (pf != PF_INET) {
- /* see if we have an IPv6 stack */
- curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0);
- if(s == CURL_SOCKET_BAD) {
- /* Some non-IPv6 stacks have been found to make very slow name resolves
- * when PF_UNSPEC is used, so thus we switch to a mere PF_INET lookup if
- * the stack seems to be a non-ipv6 one. */
-
- pf = PF_INET;
- }
- else {
- /* This seems to be an IPv6-capable stack, use PF_UNSPEC for the widest
- * possible checks. And close the socket again.
- */
- sclose(s);
- }
- }
-#endif /* !CURLRES_IPV4 */
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = pf;
- hints.ai_socktype = conn->socktype;
-
- snprintf(sbuf, sizeof(sbuf), "%d", port);
-
- /* fire up a new resolver thread! */
- if(init_resolve_thread(conn, hostname, port, &hints)) {
- *waitp = 1; /* expect asynchronous response */
- return NULL;
- }
-
- /* fall-back to blocking version */
- infof(data, "init_resolve_thread() failed for %s; %s\n",
- hostname, Curl_strerror(conn, ERRNO));
-
- error = Curl_getaddrinfo_ex(hostname, sbuf, &hints, &res);
- if(error) {
- infof(data, "getaddrinfo() failed for %s:%d; %s\n",
- hostname, port, Curl_strerror(conn, SOCKERRNO));
- return NULL;
- }
- return res;
-}
-
-#endif /* !HAVE_GETADDRINFO */
-
-#endif /* CURLRES_THREADED */
diff --git a/lib/http.c b/lib/http.c
index 413ef3d8..e06c798e 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,39 +20,14 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_HTTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_TIME_H
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
@@ -70,51 +45,53 @@
#include <sys/param.h>
#endif
-#endif
-
#include "urldata.h"
#include <curl/curl.h>
#include "transfer.h"
#include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
#include "formdata.h"
#include "progress.h"
#include "curl_base64.h"
#include "cookie.h"
#include "strequal.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "http_digest.h"
-#include "http_ntlm.h"
+#include "curl_ntlm.h"
+#include "curl_ntlm_wb.h"
#include "http_negotiate.h"
#include "url.h"
#include "share.h"
#include "hostip.h"
#include "http.h"
-#include "curl_memory.h"
#include "select.h"
#include "parsedate.h" /* for the week day and month names */
#include "strtoofft.h"
#include "multiif.h"
#include "rawstr.h"
#include "content_encoding.h"
-#include "rtsp.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-/* The last #include file should be: */
+#include "http_proxy.h"
+#include "warnless.h"
+#include "non-ascii.h"
+#include "conncache.h"
+#include "pipeline.h"
+#include "http2.h"
+#include "connect.h"
+#include "curl_printf.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
-/* Default proxy timeout in milliseconds */
-#define PROXY_TIMEOUT (3600*1000)
-
/*
* Forward declarations.
*/
+static CURLcode http_disconnect(struct connectdata *conn, bool dead);
static int http_getsock_do(struct connectdata *conn,
curl_socket_t *socks,
int numsocks);
+static int http_should_fail(struct connectdata *conn);
+
#ifdef USE_SSL
static CURLcode https_connecting(struct connectdata *conn, bool *done);
static int https_getsock(struct connectdata *conn,
@@ -129,7 +106,7 @@ static int https_getsock(struct connectdata *conn,
*/
const struct Curl_handler Curl_handler_http = {
"HTTP", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -138,10 +115,13 @@ const struct Curl_handler Curl_handler_http = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
http_getsock_do, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
- ZERO_NULL, /* disconnect */
+ http_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_HTTP, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_CREDSPERREQUEST /* flags */
};
#ifdef USE_SSL
@@ -150,7 +130,7 @@ const struct Curl_handler Curl_handler_http = {
*/
const struct Curl_handler Curl_handler_https = {
"HTTPS", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -159,26 +139,90 @@ const struct Curl_handler Curl_handler_https = {
ZERO_NULL, /* doing */
https_getsock, /* proto_getsock */
http_getsock_do, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
- ZERO_NULL, /* disconnect */
+ http_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_HTTPS, /* defport */
- PROT_HTTP | PROT_HTTPS | PROT_SSL /* protocol */
+ CURLPROTO_HTTPS, /* protocol */
+ PROTOPT_SSL | PROTOPT_CREDSPERREQUEST /* flags */
};
#endif
+CURLcode Curl_http_setup_conn(struct connectdata *conn)
+{
+ /* allocate the HTTP-specific struct for the SessionHandle, only to survive
+ during this request */
+ struct HTTP *http;
+ DEBUGASSERT(conn->data->req.protop == NULL);
+
+ http = calloc(1, sizeof(struct HTTP));
+ if(!http)
+ return CURLE_OUT_OF_MEMORY;
+
+ conn->data->req.protop = http;
+
+ Curl_http2_setup_conn(conn);
+
+ return CURLE_OK;
+}
+
+static CURLcode http_disconnect(struct connectdata *conn, bool dead_connection)
+{
+#ifdef USE_NGHTTP2
+ struct HTTP *http = conn->data->req.protop;
+ if(http) {
+ Curl_add_buffer_free(http->header_recvbuf);
+ http->header_recvbuf = NULL; /* clear the pointer */
+ }
+#else
+ (void)conn;
+#endif
+ (void)dead_connection;
+ return CURLE_OK;
+}
+
/*
* checkheaders() checks the linked list of custom HTTP headers for a
* particular header (prefix).
*
* Returns a pointer to the first matching header or NULL if none matched.
*/
-char *Curl_checkheaders(struct SessionHandle *data, const char *thisheader)
+char *Curl_checkheaders(const struct connectdata *conn,
+ const char *thisheader)
+{
+ struct curl_slist *head;
+ size_t thislen = strlen(thisheader);
+ struct SessionHandle *data = conn->data;
+
+ for(head = data->set.headers;head; head=head->next) {
+ if(Curl_raw_nequal(head->data, thisheader, thislen))
+ return head->data;
+ }
+ return NULL;
+}
+
+/*
+ * checkProxyHeaders() checks the linked list of custom proxy headers
+ * if proxy headers are not available, then it will lookup into http header
+ * link list
+ *
+ * It takes a connectdata struct as input instead of the SessionHandle simply
+ * to know if this is a proxy request or not, as it then might check a
+ * different header list.
+ *
+ */
+char *Curl_checkProxyheaders(const struct connectdata *conn,
+ const char *thisheader)
{
struct curl_slist *head;
size_t thislen = strlen(thisheader);
+ struct SessionHandle *data = conn->data;
- for(head = data->set.headers; head; head=head->next) {
+ for(head = (conn->bits.proxy && data->set.sep_headers)?
+ data->set.proxyheaders:data->set.headers;
+ head; head=head->next) {
if(Curl_raw_nequal(head->data, thisheader, thislen))
return head->data;
}
@@ -191,25 +235,25 @@ char *Curl_checkheaders(struct SessionHandle *data, const char *thisheader)
* case of allocation failure. Returns an empty string if the header value
* consists entirely of whitespace.
*/
-char *Curl_copy_header_value(const char *h)
+char *Curl_copy_header_value(const char *header)
{
const char *start;
const char *end;
char *value;
size_t len;
- DEBUGASSERT(h);
+ DEBUGASSERT(header);
/* Find the end of the header name */
- while (*h && (*h != ':'))
- ++h;
+ while(*header && (*header != ':'))
+ ++header;
- if (*h)
+ if(*header)
/* Skip over colon */
- ++h;
+ ++header;
/* Find the first non-space letter */
- start = h;
+ start = header;
while(*start && ISSPACE(*start))
start++;
@@ -228,7 +272,7 @@ char *Curl_copy_header_value(const char *h)
end--;
/* get length of the type */
- len = end-start+1;
+ len = end - start + 1;
value = malloc(len + 1);
if(!value)
@@ -248,11 +292,13 @@ char *Curl_copy_header_value(const char *h)
*/
static CURLcode http_output_basic(struct connectdata *conn, bool proxy)
{
- char *authorization;
- struct SessionHandle *data=conn->data;
+ size_t size = 0;
+ char *authorization = NULL;
+ struct SessionHandle *data = conn->data;
char **userp;
const char *user;
const char *pwd;
+ CURLcode result;
if(proxy) {
userp = &conn->allocptr.proxyuserpwd;
@@ -266,20 +312,24 @@ static CURLcode http_output_basic(struct connectdata *conn, bool proxy)
}
snprintf(data->state.buffer, sizeof(data->state.buffer), "%s:%s", user, pwd);
- if(Curl_base64_encode(data, data->state.buffer,
- strlen(data->state.buffer),
- &authorization) > 0) {
- if(*userp)
- free(*userp);
- *userp = aprintf( "%sAuthorization: Basic %s\r\n",
- proxy?"Proxy-":"",
- authorization);
- free(authorization);
- if(!*userp)
- return CURLE_OUT_OF_MEMORY;
- }
- else
+
+ result = Curl_base64_encode(data,
+ data->state.buffer, strlen(data->state.buffer),
+ &authorization, &size);
+ if(result)
+ return result;
+
+ if(!authorization)
+ return CURLE_REMOTE_ACCESS_DENIED;
+
+ free(*userp);
+ *userp = aprintf("%sAuthorization: Basic %s\r\n",
+ proxy?"Proxy-":"",
+ authorization);
+ free(authorization);
+ if(!*userp)
return CURLE_OUT_OF_MEMORY;
+
return CURLE_OK;
}
@@ -292,17 +342,19 @@ static bool pickoneauth(struct auth *pick)
{
bool picked;
/* only deal with authentication we want */
- long avail = pick->avail & pick->want;
+ unsigned long avail = pick->avail & pick->want;
picked = TRUE;
/* 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_GSSNEGOTIATE)
- pick->picked = CURLAUTH_GSSNEGOTIATE;
+ if(avail & CURLAUTH_NEGOTIATE)
+ pick->picked = CURLAUTH_NEGOTIATE;
else if(avail & CURLAUTH_DIGEST)
pick->picked = CURLAUTH_DIGEST;
else if(avail & CURLAUTH_NTLM)
pick->picked = CURLAUTH_NTLM;
+ else if(avail & CURLAUTH_NTLM_WB)
+ pick->picked = CURLAUTH_NTLM_WB;
else if(avail & CURLAUTH_BASIC)
pick->picked = CURLAUTH_BASIC;
else {
@@ -337,17 +389,16 @@ static bool pickoneauth(struct auth *pick)
* }
* }
*/
-CURLcode Curl_http_perhapsrewind(struct connectdata *conn)
+static CURLcode http_perhapsrewind(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
- struct HTTP *http = data->state.proto.http;
+ struct HTTP *http = data->req.protop;
curl_off_t bytessent;
curl_off_t expectsend = -1; /* default is unknown */
- if(!http || !(conn->protocol & PROT_HTTP))
- /* If this is still NULL, we have not reach very far and we can
- safely skip this rewinding stuff, or this is attempted to get used
- when HTTP isn't activated */
+ if(!http)
+ /* If this is still NULL, we have not reach very far and we can safely
+ skip this rewinding stuff */
return CURLE_OK;
switch(data->set.httpreq) {
@@ -360,22 +411,27 @@ CURLcode Curl_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) {
case HTTPREQ_POST:
- if(data->set.postfieldsize != -1)
- expectsend = data->set.postfieldsize;
+ if(data->state.infilesize != -1)
+ expectsend = data->state.infilesize;
else if(data->set.postfields)
expectsend = (curl_off_t)strlen(data->set.postfields);
break;
case HTTPREQ_PUT:
- if(data->set.infilesize != -1)
- expectsend = data->set.infilesize;
+ if(data->state.infilesize != -1)
+ expectsend = data->state.infilesize;
break;
case HTTPREQ_POST_FORM:
expectsend = http->postsize;
@@ -388,31 +444,39 @@ CURLcode Curl_http_perhapsrewind(struct connectdata *conn)
conn->bits.rewindaftersend = FALSE; /* default */
if((expectsend == -1) || (expectsend > bytessent)) {
+#if defined(USE_NTLM)
/* There is still data left to send */
if((data->state.authproxy.picked == CURLAUTH_NTLM) ||
- (data->state.authhost.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->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)
+ if(!conn->bits.authneg) {
conn->bits.rewindaftersend = TRUE;
+ infof(data, "Rewind stream after send\n");
+ }
return CURLE_OK;
}
+
if(conn->bits.close)
/* this is already marked to get closed */
return CURLE_OK;
- infof(data, "NTLM send, close instead of sending %" FORMAT_OFF_T
- " bytes\n", (curl_off_t)(expectsend - bytessent));
+ infof(data, "NTLM send, close instead of sending %"
+ CURL_FORMAT_CURL_OFF_T " bytes\n",
+ (curl_off_t)(expectsend - bytessent));
}
+#endif
- /* This is not NTLM or NTLM with many bytes left to send: close
- */
- conn->bits.close = TRUE;
+ /* 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 */
/* There still is data left to send, but this connection is marked for
@@ -438,7 +502,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
struct SessionHandle *data = conn->data;
bool pickhost = FALSE;
bool pickproxy = FALSE;
- CURLcode code = CURLE_OK;
+ CURLcode result = CURLE_OK;
if(100 <= data->req.httpcode && 199 >= data->req.httpcode)
/* this is a transient response code, ignore */
@@ -474,9 +538,9 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
if((data->set.httpreq != HTTPREQ_GET) &&
(data->set.httpreq != HTTPREQ_HEAD) &&
!conn->bits.rewindaftersend) {
- code = Curl_http_perhapsrewind(conn);
- if(code)
- return code;
+ result = http_perhapsrewind(conn);
+ if(result)
+ return result;
}
}
@@ -495,13 +559,13 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
data->state.authhost.done = TRUE;
}
}
- if(Curl_http_should_fail(conn)) {
+ if(http_should_fail(conn)) {
failf (data, "The requested URL returned error: %d",
data->req.httpcode);
- code = CURLE_HTTP_RETURNED_ERROR;
+ result = CURLE_HTTP_RETURNED_ERROR;
}
- return code;
+ return result;
}
@@ -516,10 +580,12 @@ output_auth_headers(struct connectdata *conn,
const char *path,
bool proxy)
{
- struct SessionHandle *data = conn->data;
- const char *auth=NULL;
+ const char *auth = NULL;
CURLcode result = CURLE_OK;
-#ifdef HAVE_GSSAPI
+#if defined(USE_SPNEGO) || !defined(CURL_DISABLE_VERBOSE_STRINGS)
+ struct SessionHandle *data = conn->data;
+#endif
+#ifdef USE_SPNEGO
struct negotiatedata *negdata = proxy?
&data->state.proxyneg:&data->state.negotiate;
#endif
@@ -529,10 +595,11 @@ output_auth_headers(struct connectdata *conn,
(void)path;
#endif
-#ifdef HAVE_GSSAPI
- if((authstatus->picked == CURLAUTH_GSSNEGOTIATE) &&
+#ifdef USE_SPNEGO
+ negdata->state = GSS_AUTHNONE;
+ if((authstatus->picked == CURLAUTH_NEGOTIATE) &&
negdata->context && !GSS_ERROR(negdata->status)) {
- auth="GSS-Negotiate";
+ auth="Negotiate";
result = Curl_output_negotiate(conn, proxy);
if(result)
return result;
@@ -550,6 +617,15 @@ output_auth_headers(struct connectdata *conn,
}
else
#endif
+#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
+ if(authstatus->picked == CURLAUTH_NTLM_WB) {
+ auth="NTLM_WB";
+ result = Curl_output_ntlm_wb(conn, proxy);
+ if(result)
+ return result;
+ }
+ else
+#endif
#ifndef CURL_DISABLE_CRYPTO_AUTH
if(authstatus->picked == CURLAUTH_DIGEST) {
auth="Digest";
@@ -565,9 +641,9 @@ output_auth_headers(struct connectdata *conn,
if(authstatus->picked == CURLAUTH_BASIC) {
/* Basic */
if((proxy && conn->bits.proxy_user_passwd &&
- !Curl_checkheaders(data, "Proxy-authorization:")) ||
+ !Curl_checkProxyheaders(conn, "Proxy-authorization:")) ||
(!proxy && conn->bits.user_passwd &&
- !Curl_checkheaders(data, "Authorization:"))) {
+ !Curl_checkheaders(conn, "Authorization:"))) {
auth="Basic";
result = http_output_basic(conn, proxy);
if(result)
@@ -583,7 +659,7 @@ output_auth_headers(struct connectdata *conn,
proxy?"Proxy":"Server", auth,
proxy?(conn->proxyuser?conn->proxyuser:""):
(conn->user?conn->user:""));
- authstatus->multi = (bool)(!authstatus->done);
+ authstatus->multi = (!authstatus->done) ? TRUE : FALSE;
}
else
authstatus->multi = FALSE;
@@ -605,12 +681,12 @@ output_auth_headers(struct connectdata *conn,
*
* @returns CURLcode
*/
-static CURLcode
-http_output_auth(struct connectdata *conn,
- const char *request,
- const char *path,
- bool proxytunnel) /* TRUE if this is the request setting
- up the proxy tunnel */
+CURLcode
+Curl_http_output_auth(struct connectdata *conn,
+ const char *request,
+ const char *path,
+ bool proxytunnel) /* TRUE if this is the request setting
+ up the proxy tunnel */
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
@@ -624,7 +700,7 @@ http_output_auth(struct connectdata *conn,
if((conn->bits.httpproxy && conn->bits.proxy_user_passwd) ||
conn->bits.user_passwd)
- /* continue please */ ;
+ /* continue please */;
else {
authhost->done = TRUE;
authproxy->done = TRUE;
@@ -681,34 +757,30 @@ http_output_auth(struct connectdata *conn,
* proxy CONNECT loop.
*/
-CURLcode Curl_http_input_auth(struct connectdata *conn,
- int httpcode,
- const char *header) /* the first non-space */
+CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy,
+ const char *auth) /* the first non-space */
{
/*
* This resource requires authentication
*/
struct SessionHandle *data = conn->data;
- long *availp;
- const char *start;
+#ifdef USE_SPNEGO
+ struct negotiatedata *negdata = proxy?
+ &data->state.proxyneg:&data->state.negotiate;
+#endif
+ unsigned long *availp;
struct auth *authp;
- if(httpcode == 407) {
- start = header+strlen("Proxy-authenticate:");
+ if(proxy) {
availp = &data->info.proxyauthavail;
authp = &data->state.authproxy;
}
else {
- start = header+strlen("WWW-Authenticate:");
availp = &data->info.httpauthavail;
authp = &data->state.authhost;
}
- /* pass all white spaces */
- while(*start && ISSPACE(*start))
- start++;
-
/*
* Here we check if we want the specific single authentication (using ==) and
* if we do, we initiate usage of it.
@@ -726,73 +798,65 @@ CURLcode Curl_http_input_auth(struct connectdata *conn,
*
*/
-#ifdef HAVE_GSSAPI
- if(checkprefix("GSS-Negotiate", start) ||
- checkprefix("Negotiate", start)) {
- int neg;
- *availp |= CURLAUTH_GSSNEGOTIATE;
- authp->avail |= 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 {
- neg = Curl_input_negotiate(conn, (bool)(httpcode == 407), start);
- if(neg == 0) {
- DEBUGASSERT(!data->req.newurl);
- data->req.newurl = strdup(data->change.url);
- if(!data->req.newurl)
- return CURLE_OUT_OF_MEMORY;
- data->state.authproblem = FALSE;
- /* we received GSS auth info and we dealt with it fine */
- data->state.negotiate.state = GSS_AUTHRECV;
- }
- else {
- data->state.authproblem = TRUE;
- }
- }
- }
- else
-#endif
-#ifdef USE_NTLM
- /* NTLM support requires the SSL crypto libs */
- if(checkprefix("NTLM", start)) {
- *availp |= CURLAUTH_NTLM;
- authp->avail |= CURLAUTH_NTLM;
- if(authp->picked == CURLAUTH_NTLM) {
- /* NTLM authentication is picked and activated */
- CURLntlm ntlm =
- Curl_input_ntlm(conn, (bool)(httpcode == 407), start);
-
- if(CURLNTLM_BAD != ntlm)
- data->state.authproblem = FALSE;
- else {
- infof(data, "Authentication problem. Ignoring this.\n");
- data->state.authproblem = TRUE;
+ while(*auth) {
+#ifdef USE_SPNEGO
+ if(checkprefix("Negotiate", auth)) {
+ *availp |= CURLAUTH_NEGOTIATE;
+ authp->avail |= CURLAUTH_NEGOTIATE;
+
+ if(authp->picked == CURLAUTH_NEGOTIATE) {
+ if(negdata->state == GSS_AUTHSENT || negdata->state == GSS_AUTHNONE) {
+ CURLcode result = Curl_input_negotiate(conn, proxy, auth);
+ if(!result) {
+ DEBUGASSERT(!data->req.newurl);
+ data->req.newurl = strdup(data->change.url);
+ 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;
+ }
+ else
+ data->state.authproblem = TRUE;
}
}
}
else
#endif
-#ifndef CURL_DISABLE_CRYPTO_AUTH
- if(checkprefix("Digest", start)) {
- if((authp->avail & CURLAUTH_DIGEST) != 0) {
- infof(data, "Ignoring duplicate digest auth header.\n");
- }
- else {
- CURLdigest dig;
- *availp |= CURLAUTH_DIGEST;
- authp->avail |= CURLAUTH_DIGEST;
-
- /* We call this function on input Digest headers even if Digest
- * authentication isn't activated yet, as we need to store the
- * incoming data from this header in case we are gonna use Digest. */
- dig = Curl_input_digest(conn, (bool)(httpcode == 407), start);
-
- if(CURLDIGEST_FINE != dig) {
+#ifdef USE_NTLM
+ /* NTLM support requires the SSL crypto libs */
+ if(checkprefix("NTLM", auth)) {
+ *availp |= CURLAUTH_NTLM;
+ authp->avail |= CURLAUTH_NTLM;
+ 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) {
+ data->state.authproblem = FALSE;
+#ifdef NTLM_WB_ENABLED
+ if(authp->picked == CURLAUTH_NTLM_WB) {
+ *availp &= ~CURLAUTH_NTLM;
+ authp->avail &= ~CURLAUTH_NTLM;
+ *availp |= CURLAUTH_NTLM_WB;
+ authp->avail |= CURLAUTH_NTLM_WB;
+
+ /* Get the challenge-message which will be passed to
+ * ntlm_auth for generating the type 3 message later */
+ while(*auth && ISSPACE(*auth))
+ auth++;
+ if(checkprefix("NTLM", auth)) {
+ auth += strlen("NTLM");
+ while(*auth && ISSPACE(*auth))
+ auth++;
+ if(*auth)
+ if((conn->challenge_header = strdup(auth)) == NULL)
+ return CURLE_OUT_OF_MEMORY;
+ }
+ }
+#endif
+ }
+ else {
infof(data, "Authentication problem. Ignoring this.\n");
data->state.authproblem = TRUE;
}
@@ -800,24 +864,55 @@ CURLcode Curl_http_input_auth(struct connectdata *conn,
}
else
#endif
- if(checkprefix("Basic", start)) {
- *availp |= CURLAUTH_BASIC;
- authp->avail |= CURLAUTH_BASIC;
- if(authp->picked == CURLAUTH_BASIC) {
- /* We asked for Basic authentication but got a 40X back
- anyway, which basically means our name+password isn't
- valid. */
- authp->avail = CURLAUTH_NONE;
- infof(data, "Authentication problem. Ignoring this.\n");
- data->state.authproblem = TRUE;
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+ if(checkprefix("Digest", auth)) {
+ if((authp->avail & CURLAUTH_DIGEST) != 0) {
+ infof(data, "Ignoring duplicate digest auth header.\n");
+ }
+ else {
+ CURLcode result;
+ *availp |= CURLAUTH_DIGEST;
+ authp->avail |= CURLAUTH_DIGEST;
+
+ /* We call this function on input Digest headers even if Digest
+ * 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) {
+ infof(data, "Authentication problem. Ignoring this.\n");
+ data->state.authproblem = TRUE;
+ }
+ }
}
- }
+ else
+#endif
+ if(checkprefix("Basic", auth)) {
+ *availp |= CURLAUTH_BASIC;
+ authp->avail |= CURLAUTH_BASIC;
+ if(authp->picked == CURLAUTH_BASIC) {
+ /* We asked for Basic authentication but got a 40X back
+ anyway, which basically means our name+password isn't
+ valid. */
+ authp->avail = CURLAUTH_NONE;
+ infof(data, "Authentication problem. Ignoring this.\n");
+ data->state.authproblem = TRUE;
+ }
+ }
+ /* there may be multiple methods on one line, so keep reading */
+ while(*auth && *auth != ',') /* read up to the next comma */
+ auth++;
+ if(*auth == ',') /* if we're on a comma, skip it */
+ auth++;
+ while(*auth && ISSPACE(*auth))
+ auth++;
+ }
return CURLE_OK;
}
/**
- * Curl_http_should_fail() determines whether an HTTP response has gotten us
+ * http_should_fail() determines whether an HTTP response has gotten us
* into an error state or not.
*
* @param conn all information about the current connection
@@ -826,7 +921,7 @@ CURLcode Curl_http_input_auth(struct connectdata *conn,
*
* @retval 1 communications should not continue
*/
-int Curl_http_should_fail(struct connectdata *conn)
+static int http_should_fail(struct connectdata *conn)
{
struct SessionHandle *data;
int httpcode;
@@ -850,14 +945,6 @@ int Curl_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
@@ -884,16 +971,6 @@ int Curl_http_should_fail(struct connectdata *conn)
** the client needs to reauthenticate. Once that info is
** available, use it here.
*/
-#if 0 /* set to 1 when debugging this functionality */
- infof(data,"%s: authstage = %d\n",__FUNCTION__,data->state.authstage);
- infof(data,"%s: authwant = 0x%08x\n",__FUNCTION__,data->state.authwant);
- infof(data,"%s: authavail = 0x%08x\n",__FUNCTION__,data->state.authavail);
- infof(data,"%s: httpcode = %d\n",__FUNCTION__,k->httpcode);
- infof(data,"%s: authdone = %d\n",__FUNCTION__,data->state.authdone);
- infof(data,"%s: newurl = %s\n",__FUNCTION__,data->req.newurl ?
- data->req.newurl : "(null)");
- infof(data,"%s: authproblem = %d\n",__FUNCTION__,data->state.authproblem);
-#endif
/*
** Either we're not authenticating, or we're supposed to
@@ -921,7 +998,7 @@ static size_t readmoredata(char *buffer,
void *userp)
{
struct connectdata *conn = (struct connectdata *)userp;
- struct HTTP *http = conn->data->state.proto.http;
+ struct HTTP *http = conn->data->req.protop;
size_t fullsize = size * nitems;
if(0 == http->postsize)
@@ -929,7 +1006,7 @@ static size_t readmoredata(char *buffer,
return 0;
/* make sure that a HTTP request is never sent away chunked! */
- conn->data->req.forbidchunk = (bool)(http->sending == HTTPSEND_REQUEST);
+ conn->data->req.forbidchunk = (http->sending == HTTPSEND_REQUEST)?TRUE:FALSE;
if(http->postsize <= (curl_off_t)fullsize) {
memcpy(buffer, http->postdata, (size_t)http->postsize);
@@ -939,8 +1016,8 @@ static size_t readmoredata(char *buffer,
/* move backup data into focus and continue on that */
http->postdata = http->backup.postdata;
http->postsize = http->backup.postsize;
- conn->fread_func = http->backup.fread_func;
- conn->fread_in = http->backup.fread_in;
+ conn->data->set.fread_func = http->backup.fread_func;
+ conn->data->set.in = http->backup.fread_in;
http->sending++; /* move one step up */
@@ -971,6 +1048,16 @@ Curl_send_buffer *Curl_add_buffer_init(void)
}
/*
+ * Curl_add_buffer_free() frees all associated resources.
+ */
+void Curl_add_buffer_free(Curl_send_buffer *buff)
+{
+ if(buff) /* deal with NULL input */
+ free(buff->buffer);
+ free(buff);
+}
+
+/*
* Curl_add_buffer_send() sends a header buffer and frees all associated
* memory. Body data may be appended to the header data if desired.
*
@@ -989,10 +1076,10 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
{
ssize_t amount;
- CURLcode res;
+ CURLcode result;
char *ptr;
size_t size;
- struct HTTP *http = conn->data->state.proto.http;
+ struct HTTP *http = conn->data->req.protop;
size_t sendsize;
curl_socket_t sockfd;
size_t headersize;
@@ -1012,19 +1099,16 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
DEBUGASSERT(size > included_body_bytes);
-#ifdef CURL_DOES_CONVERSIONS
- res = Curl_convert_to_network(conn->data, ptr, headersize);
+ result = Curl_convert_to_network(conn->data, ptr, headersize);
/* Curl_convert_to_network calls failf if unsuccessful */
- if(res != CURLE_OK) {
+ if(result) {
/* conversion failed, free memory and return to the caller */
- if(in->buffer)
- free(in->buffer);
- free(in);
- return res;
+ Curl_add_buffer_free(in);
+ return result;
}
-#endif /* CURL_DOES_CONVERSIONS */
- if(conn->protocol & PROT_HTTPS) {
+
+ if(conn->handler->flags & PROTOPT_SSL) {
/* We never send more than CURL_MAX_WRITE_SIZE bytes in one single chunk
when we speak HTTPS, as if only a fraction of it is sent now, this data
needs to fit into the normal read-callback buffer later on and that
@@ -1045,9 +1129,9 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
else
sendsize = size;
- res = Curl_write(conn, sockfd, ptr, sendsize, &amount);
+ result = Curl_write(conn, sockfd, ptr, sendsize, &amount);
- if(CURLE_OK == res) {
+ if(!result) {
/*
* 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
@@ -1060,7 +1144,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
if(conn->data->set.verbose) {
/* this data _may_ contain binary stuff */
Curl_debug(conn->data, CURLINFO_HEADER_OUT, ptr, headlen, conn);
- if((size_t)amount > headlen) {
+ if(bodylen) {
/* there was body data sent beyond the initial header part, pass that
on to the debug callback too */
Curl_debug(conn->data, CURLINFO_DATA_OUT,
@@ -1088,14 +1172,14 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
ptr = in->buffer + amount;
/* backup the currently set pointers */
- http->backup.fread_func = conn->fread_func;
- http->backup.fread_in = conn->fread_in;
+ http->backup.fread_func = conn->data->set.fread_func;
+ http->backup.fread_in = conn->data->set.in;
http->backup.postdata = http->postdata;
http->backup.postsize = http->postsize;
/* set the new pointers for the request-sending */
- conn->fread_func = (curl_read_callback)readmoredata;
- conn->fread_in = (void *)conn;
+ conn->data->set.fread_func = (curl_read_callback)readmoredata;
+ conn->data->set.in = (void *)conn;
http->postdata = ptr;
http->postsize = (curl_off_t)size;
@@ -1118,14 +1202,12 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
*/
return CURLE_SEND_ERROR;
else
- conn->writechannel_inuse = FALSE;
+ Curl_pipeline_leave_write(conn);
}
}
- if(in->buffer)
- free(in->buffer);
- free(in);
+ Curl_add_buffer_free(in);
- return res;
+ return result;
}
@@ -1146,8 +1228,7 @@ CURLcode Curl_add_bufferf(Curl_send_buffer *in, const char *fmt, ...)
return result;
}
/* If we failed, we cleanup the whole buffer and return error */
- if(in->buffer)
- free(in->buffer);
+ free(in->buffer);
free(in);
return CURLE_OUT_OF_MEMORY;
}
@@ -1266,529 +1347,35 @@ Curl_compareheader(const char *headerline, /* line to check */
return FALSE; /* no match */
}
-#ifndef CURL_DISABLE_PROXY
-/*
- * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This
- * function will issue the necessary commands to get a seamless tunnel through
- * this proxy. After that, the socket can be used just as a normal socket.
- *
- * This badly needs to be rewritten. CONNECT should be sent and dealt with
- * like any ordinary HTTP request, and not specially crafted like this. This
- * function only remains here like this for now since the rewrite is a bit too
- * much work to do at the moment.
- *
- * This function is BLOCKING which is nasty for all multi interface using apps.
- */
-
-CURLcode Curl_proxyCONNECT(struct connectdata *conn,
- int sockindex,
- const char *hostname,
- unsigned short remote_port)
-{
- int subversion=0;
- 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;
- bool chunked_encoding = FALSE;
- long check;
-
-#define SELECT_OK 0
-#define SELECT_ERROR 1
-#define SELECT_TIMEOUT 2
- int error = SELECT_OK;
-
- conn->bits.proxy_connect_closed = FALSE;
-
- do {
- if(!conn->bits.tunnel_connecting) { /* BEGIN CONNECT PHASE */
- char *host_port;
- Curl_send_buffer *req_buffer;
-
- infof(data, "Establish HTTP proxy tunnel to %s:%hu\n",
- hostname, remote_port);
-
- if(data->req.newurl) {
- /* This only happens if we've looped here due to authentication
- reasons, and we don't really use the newly cloned URL here
- then. Just free() it. */
- free(data->req.newurl);
- data->req.newurl = NULL;
- }
-
- /* initialize a dynamic send-buffer */
- req_buffer = Curl_add_buffer_init();
-
- if(!req_buffer)
- return CURLE_OUT_OF_MEMORY;
-
- host_port = aprintf("%s:%hu", hostname, remote_port);
- if(!host_port) {
- free(req_buffer);
- return CURLE_OUT_OF_MEMORY;
- }
-
- /* Setup the proxy-authorization header, if any */
- result = http_output_auth(conn, "CONNECT", host_port, TRUE);
-
- if(CURLE_OK == result) {
- char *host=(char *)"";
- const char *proxyconn="";
- const char *useragent="";
- const char *http = (conn->proxytype == CURLPROXY_HTTP_1_0) ?
- "1.0" : "1.1";
-
- if(!Curl_checkheaders(data, "Host:")) {
- host = aprintf("Host: %s\r\n", host_port);
- if(!host) {
- free(req_buffer);
- free(host_port);
- return CURLE_OUT_OF_MEMORY;
- }
- }
- if(!Curl_checkheaders(data, "Proxy-Connection:"))
- proxyconn = "Proxy-Connection: Keep-Alive\r\n";
-
- if(!Curl_checkheaders(data, "User-Agent:") &&
- data->set.str[STRING_USERAGENT])
- useragent = conn->allocptr.uagent;
-
- /* Send the connect request to the proxy */
- /* BLOCKING */
- result =
- Curl_add_bufferf(req_buffer,
- "CONNECT %s:%hu HTTP/%s\r\n"
- "%s" /* Host: */
- "%s" /* Proxy-Authorization */
- "%s" /* User-Agent */
- "%s", /* Proxy-Connection */
- hostname, remote_port, http,
- host,
- conn->allocptr.proxyuserpwd?
- conn->allocptr.proxyuserpwd:"",
- useragent,
- proxyconn);
-
- if(host && *host)
- free(host);
-
- if(CURLE_OK == result)
- result = Curl_add_custom_headers(conn, req_buffer);
-
- if(CURLE_OK == result)
- /* CRLF terminate the request */
- result = Curl_add_bufferf(req_buffer, "\r\n");
-
- if(CURLE_OK == result) {
- /* Now send off the request */
- result = Curl_add_buffer_send(req_buffer, conn,
- &data->info.request_size, 0, sockindex);
- }
- req_buffer = NULL;
- if(result)
- failf(data, "Failed sending CONNECT to proxy");
- }
- free(host_port);
- Curl_safefree(req_buffer);
- if(result)
- return result;
-
- conn->bits.tunnel_connecting = TRUE;
- } /* END CONNECT PHASE */
-
- /* now we've issued the CONNECT and we're waiting to hear back -
- we try not to block here in multi-mode because that might be a LONG
- wait if the proxy cannot connect-through to the remote host. */
-
- /* if timeout is requested, find out how much remaining time we have */
- check = timeout - /* timeout time */
- Curl_tvdiff(Curl_tvnow(), conn->now); /* spent time */
- if(check <= 0) {
- failf(data, "Proxy CONNECT aborted due to timeout");
- return CURLE_RECV_ERROR;
- }
-
- /* if we're in multi-mode and we would block, return instead for a retry */
- if(Curl_if_multi == data->state.used_interface) {
- if(0 == Curl_socket_ready(tunnelsocket, CURL_SOCKET_BAD, 0))
- /* return so we'll be called again polling-style */
- return CURLE_OK;
- else {
- DEBUGF(infof(data,
- "Multi mode finished polling for response from "
- "proxy CONNECT."));
- }
- }
- else {
- DEBUGF(infof(data, "Easy mode waiting response from proxy CONNECT."));
- }
-
- /* at this point, either:
- 1) we're in easy-mode and so it's okay to block waiting for a CONNECT
- response
- 2) we're in multi-mode and we didn't block - it's either an error or we
- now have some data waiting.
- In any case, the tunnel_connecting phase is over. */
- conn->bits.tunnel_connecting = FALSE;
-
- { /* BEGIN NEGOTIATION PHASE */
- size_t nread; /* total size read */
- int perline; /* count bytes per line */
- int keepon=TRUE;
- ssize_t gotbytes;
- char *ptr;
- char *line_start;
-
- ptr=data->state.buffer;
- line_start = ptr;
-
- nread=0;
- perline=0;
- keepon=TRUE;
-
- while((nread<BUFSIZE) && (keepon && !error)) {
-
- /* if timeout is requested, find out how much remaining time we have */
- check = timeout - /* timeout time */
- Curl_tvdiff(Curl_tvnow(), conn->now); /* spent time */
- if(check <= 0) {
- failf(data, "Proxy CONNECT aborted due to timeout");
- error = SELECT_TIMEOUT; /* already too little time */
- break;
- }
-
- /* loop every second at least, less if the timeout is near */
- switch (Curl_socket_ready(tunnelsocket, CURL_SOCKET_BAD,
- check<1000L?(int)check:1000)) {
- case -1: /* select() error, stop reading */
- error = SELECT_ERROR;
- failf(data, "Proxy CONNECT aborted due to select/poll error");
- break;
- case 0: /* timeout */
- break;
- default:
- DEBUGASSERT(ptr+BUFSIZE-nread <= data->state.buffer+BUFSIZE+1);
- result = Curl_read(conn, tunnelsocket, ptr, BUFSIZE-nread, &gotbytes);
- if(result==CURLE_AGAIN)
- continue; /* go loop yourself */
- else if(result)
- keepon = FALSE;
- else if(gotbytes <= 0) {
- keepon = FALSE;
- if(data->set.proxyauth && data->state.authproxy.avail) {
- /* proxy auth was requested and there was proxy auth available,
- then deem this as "mere" proxy disconnect */
- conn->bits.proxy_connect_closed = TRUE;
- }
- else {
- error = SELECT_ERROR;
- failf(data, "Proxy CONNECT aborted");
- }
- }
- else {
- /*
- * We got a whole chunk of data, which can be anything from one
- * byte to a set of lines and possibly just a piece of the last
- * line.
- */
- int i;
-
- nread += gotbytes;
-
- if(keepon > TRUE) {
- /* This means we are currently ignoring a response-body */
-
- nread = 0; /* make next read start over in the read buffer */
- ptr=data->state.buffer;
- if(cl) {
- /* A Content-Length based body: simply count down the counter
- and make sure to break out of the loop when we're done! */
- cl -= gotbytes;
- if(cl<=0) {
- keepon = FALSE;
- break;
- }
- }
- else {
- /* chunked-encoded body, so we need to do the chunked dance
- properly to know when the end of the body is reached */
- CHUNKcode r;
- ssize_t tookcareof=0;
-
- /* now parse the chunked piece of data so that we can
- properly tell when the stream ends */
- r = Curl_httpchunk_read(conn, ptr, gotbytes, &tookcareof);
- if(r == CHUNKE_STOP) {
- /* we're done reading chunks! */
- infof(data, "chunk reading DONE\n");
- keepon = FALSE;
- }
- else
- infof(data, "Read %zd bytes of chunk, continue\n",
- tookcareof);
- }
- }
- else
- for(i = 0; i < gotbytes; ptr++, i++) {
- perline++; /* amount of bytes in this line so far */
- if(*ptr == 0x0a) {
- char letter;
- int writetype;
-
-#ifdef CURL_DOES_CONVERSIONS
- /* convert from the network encoding */
- result = Curl_convert_from_network(data, line_start,
- perline);
- /* Curl_convert_from_network calls failf if unsuccessful */
- if(result)
- return result;
-#endif /* CURL_DOES_CONVERSIONS */
-
- /* output debug if that is requested */
- if(data->set.verbose)
- Curl_debug(data, CURLINFO_HEADER_IN,
- line_start, (size_t)perline, conn);
-
- /* send the header to the callback */
- writetype = CLIENTWRITE_HEADER;
- if(data->set.include_header)
- writetype |= CLIENTWRITE_BODY;
-
- result = Curl_client_write(conn, writetype, line_start,
- perline);
- if(result)
- return result;
-
- /* Newlines are CRLF, so the CR is ignored as the line isn't
- really terminated until the LF comes. Treat a following CR
- as end-of-headers as well.*/
-
- if(('\r' == line_start[0]) ||
- ('\n' == line_start[0])) {
- /* end of response-headers from the proxy */
- nread = 0; /* make next read start over in the read
- buffer */
- ptr=data->state.buffer;
- if((407 == k->httpcode) && !data->state.authproblem) {
- /* If we get a 407 response code with content length
- when we have no auth problem, we must ignore the
- whole response-body */
- keepon = 2;
-
- if(cl) {
-
- infof(data, "Ignore %" FORMAT_OFF_T
- " bytes of response-body\n", cl);
- /* remove the remaining chunk of what we already
- read */
- cl -= (gotbytes - i);
-
- if(cl<=0)
- /* if the whole thing was already read, we are done!
- */
- keepon=FALSE;
- }
- else if(chunked_encoding) {
- CHUNKcode r;
- /* We set ignorebody true here since the chunked
- decoder function will acknowledge that. Pay
- attention so that this is cleared again when this
- function returns! */
- k->ignorebody = TRUE;
- infof(data, "%zd bytes of chunk left\n", gotbytes-i);
-
- if(line_start[1] == '\n') {
- /* this can only be a LF if the letter at index 0
- was a CR */
- line_start++;
- i++;
- }
-
- /* now parse the chunked piece of data so that we can
- properly tell when the stream ends */
- r = Curl_httpchunk_read(conn, line_start+1,
- gotbytes -i, &gotbytes);
- if(r == CHUNKE_STOP) {
- /* we're done reading chunks! */
- infof(data, "chunk reading DONE\n");
- keepon = FALSE;
- }
- else
- infof(data, "Read %zd bytes of chunk, continue\n",
- gotbytes);
- }
- else {
- /* without content-length or chunked encoding, we
- can't keep the connection alive since the close is
- the end signal so we bail out at once instead */
- keepon=FALSE;
- }
- }
- else
- keepon = FALSE;
- break; /* breaks out of for-loop, not switch() */
- }
-
- /* keep a backup of the position we are about to blank */
- letter = line_start[perline];
- line_start[perline]=0; /* zero terminate the buffer */
- if((checkprefix("WWW-Authenticate:", line_start) &&
- (401 == k->httpcode)) ||
- (checkprefix("Proxy-authenticate:", line_start) &&
- (407 == k->httpcode))) {
- result = Curl_http_input_auth(conn, k->httpcode,
- line_start);
- if(result)
- return result;
- }
- else if(checkprefix("Content-Length:", line_start)) {
- cl = curlx_strtoofft(line_start +
- strlen("Content-Length:"), NULL, 10);
- }
- else if(Curl_compareheader(line_start,
- "Connection:", "close"))
- closeConnection = TRUE;
- else if(Curl_compareheader(line_start,
- "Transfer-Encoding:",
- "chunked")) {
- infof(data, "CONNECT responded chunked\n");
- chunked_encoding = TRUE;
- /* init our chunky engine */
- Curl_httpchunk_init(conn);
- }
- else if(Curl_compareheader(line_start,
- "Proxy-Connection:", "close"))
- closeConnection = TRUE;
- else if(2 == sscanf(line_start, "HTTP/1.%d %d",
- &subversion,
- &k->httpcode)) {
- /* store the HTTP code from the proxy */
- data->info.httpproxycode = k->httpcode;
- }
- /* put back the letter we blanked out before */
- line_start[perline]= letter;
-
- perline=0; /* line starts over here */
- line_start = ptr+1; /* this skips the zero byte we wrote */
- }
- }
- }
- break;
- } /* switch */
- if(Curl_pgrsUpdate(conn))
- return CURLE_ABORTED_BY_CALLBACK;
- } /* while there's buffer left and loop is requested */
-
- if(error)
- return CURLE_RECV_ERROR;
-
- if(data->info.httpproxycode != 200) {
- /* Deal with the possibly already received authenticate
- headers. 'newurl' is set to a new URL if we must loop. */
- result = Curl_http_auth_act(conn);
- if(result)
- return result;
-
- if(conn->bits.close)
- /* the connection has been marked for closure, most likely in the
- Curl_http_auth_act() function and thus we can kill it at once
- below
- */
- closeConnection = TRUE;
- }
-
- if(closeConnection && data->req.newurl) {
- /* Connection closed by server. Don't use it anymore */
- sclose(conn->sock[sockindex]);
- conn->sock[sockindex] = CURL_SOCKET_BAD;
- break;
- }
- } /* END NEGOTIATION PHASE */
- } while(data->req.newurl);
-
- if(200 != data->req.httpcode) {
- failf(data, "Received HTTP code %d from proxy after CONNECT",
- data->req.httpcode);
-
- if(closeConnection && data->req.newurl)
- conn->bits.proxy_connect_closed = TRUE;
-
- return CURLE_RECV_ERROR;
- }
-
- /* If a proxy-authorization header was used for the proxy, then we should
- make sure that it isn't accidentally used for the document request
- after we've connected. So let's free and clear it here. */
- Curl_safefree(conn->allocptr.proxyuserpwd);
- conn->allocptr.proxyuserpwd = NULL;
-
- data->state.authproxy.done = TRUE;
-
- infof (data, "Proxy replied OK to CONNECT request\n");
- data->req.ignorebody = FALSE; /* put it (back) to non-ignore state */
- return CURLE_OK;
-}
-#endif /* CURL_DISABLE_PROXY */
-
/*
* Curl_http_connect() performs HTTP stuff to do at connect-time, called from
* the generic Curl_connect().
*/
CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
{
- struct SessionHandle *data;
CURLcode result;
- data=conn->data;
-
/* We default to persistent connections. We set this already in this connect
function to make the re-use checks properly be able to check this bit. */
- conn->bits.close = FALSE;
+ connkeep(conn, "HTTP default");
-#ifndef CURL_DISABLE_PROXY
- /* If we are not using a proxy and we want a secure connection, perform SSL
- * initialization & connection now. If using a proxy with https, then we
- * must tell the proxy to CONNECT to the host we want to talk to. Only
- * after the connect has occurred, can we start talking SSL
- */
- if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
-
- /* either SSL over proxy, or explicitly asked for */
- result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
- conn->host.name,
- conn->remote_port);
- if(CURLE_OK != result)
- return result;
- }
+ /* the CONNECT procedure might not have been completed */
+ result = Curl_proxy_connect(conn);
+ if(result)
+ return result;
- if(conn->bits.tunnel_connecting) {
+ if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
/* nothing else to do except wait right now - we're not done here. */
return CURLE_OK;
- }
-#endif /* CURL_DISABLE_PROXY */
- if(conn->protocol & PROT_HTTPS) {
+ if(conn->given->flags & PROTOPT_SSL) {
/* perform SSL initialization */
- if(data->state.used_interface == Curl_if_multi) {
- result = https_connecting(conn, done);
- if(result)
- return result;
- }
- else {
- /* BLOCKING */
- result = Curl_ssl_connect(conn, FIRSTSOCKET);
- if(result)
- return result;
- *done = TRUE;
- }
+ result = https_connecting(conn, done);
+ if(result)
+ return result;
}
- else {
+ else
*done = TRUE;
- }
return CURLE_OK;
}
@@ -1810,25 +1397,26 @@ static int http_getsock_do(struct connectdata *conn,
static CURLcode https_connecting(struct connectdata *conn, bool *done)
{
CURLcode result;
- DEBUGASSERT((conn) && (conn->protocol & PROT_HTTPS));
+ DEBUGASSERT((conn) && (conn->handler->flags & PROTOPT_SSL));
/* perform SSL initialization for this socket */
result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, done);
if(result)
- conn->bits.close = TRUE; /* a failed connection is marked for closure
- to prevent (bad) re-use or similar */
+ connclose(conn, "Failed HTTPS connection");
+
return result;
}
#endif
-#if defined(USE_SSLEAY) || defined(USE_GNUTLS)
-/* This function is for OpenSSL and GnuTLS only. It should be made to query
- the generic SSL layer instead. */
+#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
+ defined(USE_DARWINSSL) || defined(USE_POLARSSL) || defined(USE_NSS)
+/* This function is for OpenSSL, GnuTLS, darwinssl, schannel and polarssl only.
+ It should be made to query the generic SSL layer instead. */
static int https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
{
- if(conn->protocol & PROT_HTTPS) {
+ if(conn->handler->flags & PROTOPT_SSL) {
struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
if(!numsocks)
@@ -1848,29 +1436,7 @@ static int https_getsock(struct connectdata *conn,
return CURLE_OK;
}
#else
-#ifdef USE_NSS
-static int https_getsock(struct connectdata *conn,
- curl_socket_t *socks,
- int numsocks)
-{
- (void)conn;
- (void)socks;
- (void)numsocks;
- return GETSOCK_BLANK;
-}
-#else
-#ifdef USE_QSOSSL
-static int https_getsock(struct connectdata *conn,
- curl_socket_t *socks,
- int numsocks)
-{
- (void)conn;
- (void)socks;
- (void)numsocks;
- return GETSOCK_BLANK;
-}
-#else
-#ifdef USE_POLARSSL
+#ifdef USE_SSL
static int https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
@@ -1880,10 +1446,8 @@ static int https_getsock(struct connectdata *conn,
(void)numsocks;
return GETSOCK_BLANK;
}
-#endif
-#endif
-#endif
-#endif
+#endif /* USE_SSL */
+#endif /* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL */
/*
* Curl_http_done() gets called from Curl_done() after a single HTTP request
@@ -1894,14 +1458,23 @@ CURLcode Curl_http_done(struct connectdata *conn,
CURLcode status, bool premature)
{
struct SessionHandle *data = conn->data;
- struct HTTP *http =data->state.proto.http;
- (void)premature; /* not used */
+ struct HTTP *http =data->req.protop;
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/407 as a WA only needed for
+ * 401/407 that signal auth failure (empty) otherwise 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 */
conn->seek_func = data->set.seek_func; /* restore */
conn->seek_client = data->set.seek_client; /* restore */
@@ -1909,13 +1482,18 @@ CURLcode Curl_http_done(struct connectdata *conn,
return CURLE_OK;
if(http->send_buffer) {
- Curl_send_buffer *buff = http->send_buffer;
-
- free(buff->buffer);
- free(buff);
+ Curl_add_buffer_free(http->send_buffer);
http->send_buffer = NULL; /* clear the pointer */
}
+#ifdef USE_NGHTTP2
+ if(http->header_recvbuf) {
+ DEBUGF(infof(data, "free header_recvbuf!!\n"));
+ Curl_add_buffer_free(http->header_recvbuf);
+ http->header_recvbuf = NULL; /* clear the pointer */
+ }
+#endif
+
if(HTTPREQ_POST_FORM == data->set.httpreq) {
data->req.bytecount = http->readbytecount + http->writebytecount;
@@ -1929,12 +1507,13 @@ CURLcode Curl_http_done(struct connectdata *conn,
else if(HTTPREQ_PUT == data->set.httpreq)
data->req.bytecount = http->readbytecount + http->writebytecount;
- if(status != CURLE_OK)
- return (status);
+ if(status)
+ return status;
if(!premature && /* this check is pointless when DONE is called before the
entire operation is complete */
!conn->bits.retry &&
+ !data->set.connect_only &&
((http->readbytecount +
data->req.headerbytecount -
data->req.deductheadercount)) <= 0) {
@@ -1949,18 +1528,23 @@ CURLcode Curl_http_done(struct connectdata *conn,
}
-/* Determine if we should use HTTP 1.1 for this request. Reasons to avoid it
- are if the user specifically requested HTTP 1.0, if the server we are
- connected to only supports 1.0, or if any server previously contacted to
- handle this request only supports 1.0. */
-static bool use_http_1_1(const struct SessionHandle *data,
- const struct connectdata *conn)
+/*
+ * Determine if we should use HTTP 1.1 (OR BETTER) for this request. Reasons
+ * to avoid it include:
+ *
+ * - if the user specifically requested HTTP 1.0
+ * - if the server we are connected to only supports 1.0
+ * - if any server previously contacted to handle this request only supports
+ * 1.0.
+ */
+static bool use_http_1_1plus(const struct SessionHandle *data,
+ const struct connectdata *conn)
{
- return (bool)((data->set.httpversion == CURL_HTTP_VERSION_1_1) ||
+ return ((data->set.httpversion >= CURL_HTTP_VERSION_1_1) ||
((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
((conn->httpversion == 11) ||
((conn->httpversion != 10) &&
- (data->state.httpversion != 10)))));
+ (data->state.httpversion != 10))))) ? TRUE : FALSE;
}
/* check and possibly add an Expect: header */
@@ -1972,66 +1556,140 @@ static CURLcode expect100(struct SessionHandle *data,
const char *ptr;
data->state.expect100header = FALSE; /* default to false unless it is set
to TRUE below */
- if(use_http_1_1(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
- (as there is one packet coming back from the web server) */
- ptr = Curl_checkheaders(data, "Expect:");
- if (ptr) {
+ if(use_http_1_1plus(data, conn) &&
+ (conn->httpversion != 20)) {
+ /* if not doing HTTP 1.0 or version 2, or disabled explicitly, we add an
+ Expect: 100-continue to the headers which actually speeds up post
+ operations (as there is one packet coming back from the web server) */
+ ptr = Curl_checkheaders(conn, "Expect:");
+ if(ptr) {
data->state.expect100header =
Curl_compareheader(ptr, "Expect:", "100-continue");
}
else {
result = Curl_add_bufferf(req_buffer,
"Expect: 100-continue\r\n");
- if(result == CURLE_OK)
+ if(!result)
data->state.expect100header = TRUE;
}
}
return result;
}
+enum proxy_use {
+ HEADER_SERVER, /* direct to server */
+ HEADER_PROXY, /* regular request to proxy */
+ HEADER_CONNECT /* sending CONNECT to a proxy */
+};
+
CURLcode Curl_add_custom_headers(struct connectdata *conn,
- Curl_send_buffer *req_buffer)
+ bool is_connect,
+ Curl_send_buffer *req_buffer)
{
char *ptr;
- struct curl_slist *headers=conn->data->set.headers;
+ struct curl_slist *h[2];
+ struct curl_slist *headers;
+ int numlists=1; /* by default */
+ struct SessionHandle *data = conn->data;
+ int i;
- while(headers) {
- ptr = strchr(headers->data, ':');
- if(ptr) {
- /* we require a colon for this to be a true header */
+ enum proxy_use proxy;
- ptr++; /* pass the colon */
- while(*ptr && ISSPACE(*ptr))
- ptr++;
+ if(is_connect)
+ proxy = HEADER_CONNECT;
+ else
+ proxy = conn->bits.httpproxy && !conn->bits.tunnel_proxy?
+ HEADER_PROXY:HEADER_SERVER;
- if(*ptr) {
- /* only send this if the contents was non-blank */
+ switch(proxy) {
+ case HEADER_SERVER:
+ h[0] = data->set.headers;
+ break;
+ case HEADER_PROXY:
+ h[0] = data->set.headers;
+ if(data->set.sep_headers) {
+ h[1] = data->set.proxyheaders;
+ numlists++;
+ }
+ break;
+ case HEADER_CONNECT:
+ if(data->set.sep_headers)
+ h[0] = data->set.proxyheaders;
+ else
+ h[0] = data->set.headers;
+ break;
+ }
- if(conn->allocptr.host &&
- /* a Host: header was sent already, don't pass on any custom Host:
- header as that will produce *two* in the same request! */
- checkprefix("Host:", headers->data))
- ;
- else if(conn->data->set.httpreq == HTTPREQ_POST_FORM &&
- /* this header (extended by formdata.c) is sent later */
- checkprefix("Content-Type:", headers->data))
- ;
- else if(conn->bits.authneg &&
- /* while doing auth neg, don't allow the custom length since
- we will force length zero then */
- checkprefix("Content-Length", headers->data))
- ;
- else {
- CURLcode result = Curl_add_bufferf(req_buffer, "%s\r\n",
- headers->data);
- if(result)
- return result;
+ /* loop through one or two lists */
+ for(i=0; i < numlists; i++) {
+ headers = h[i];
+
+ while(headers) {
+ ptr = strchr(headers->data, ':');
+ if(ptr) {
+ /* we require a colon for this to be a true header */
+
+ ptr++; /* pass the colon */
+ while(*ptr && ISSPACE(*ptr))
+ ptr++;
+
+ if(*ptr) {
+ /* only send this if the contents was non-blank */
+
+ if(conn->allocptr.host &&
+ /* a Host: header was sent already, don't pass on any custom Host:
+ header as that will produce *two* in the same request! */
+ checkprefix("Host:", headers->data))
+ ;
+ else if(data->set.httpreq == HTTPREQ_POST_FORM &&
+ /* this header (extended by formdata.c) is sent later */
+ checkprefix("Content-Type:", headers->data))
+ ;
+ else if(conn->bits.authneg &&
+ /* while doing auth neg, don't allow the custom length since
+ we will force length zero then */
+ checkprefix("Content-Length", headers->data))
+ ;
+ else if(conn->allocptr.te &&
+ /* when asking for Transfer-Encoding, don't pass on a custom
+ Connection: */
+ checkprefix("Connection", headers->data))
+ ;
+ else {
+ CURLcode result = Curl_add_bufferf(req_buffer, "%s\r\n",
+ headers->data);
+ if(result)
+ return result;
+ }
}
}
+ else {
+ ptr = strchr(headers->data, ';');
+ if(ptr) {
+
+ ptr++; /* pass the semicolon */
+ while(*ptr && ISSPACE(*ptr))
+ ptr++;
+
+ if(*ptr) {
+ /* this may be used for something else in the future */
+ }
+ else {
+ if(*(--ptr) == ';') {
+ CURLcode result;
+
+ /* send no-value custom header if terminated by semicolon */
+ *ptr = ':';
+ result = Curl_add_bufferf(req_buffer, "%s\r\n",
+ headers->data);
+ if(result)
+ return result;
+ }
+ }
+ }
+ }
+ headers = headers->next;
}
- headers = headers->next;
}
return CURLE_OK;
}
@@ -2039,9 +1697,15 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn,
CURLcode Curl_add_timecondition(struct SessionHandle *data,
Curl_send_buffer *req_buffer)
{
- struct tm *tm;
+ const struct tm *tm;
char *buf = data->state.buffer;
- CURLcode result = CURLE_OK;
+ struct tm keeptime;
+ CURLcode result = Curl_gmtime(data->set.timevalue, &keeptime);
+ if(result) {
+ failf(data, "Invalid TIMEVALUE");
+ return result;
+ }
+ tm = &keeptime;
/* The If-Modified-Since header family should have their times set in
* GMT as RFC2616 defines: "All HTTP date/time stamps MUST be
@@ -2050,14 +1714,6 @@ CURLcode Curl_add_timecondition(struct SessionHandle *data,
* Time)." (see page 20 of RFC2616).
*/
-#ifdef HAVE_GMTIME_R
- /* thread-safe version */
- struct tm keeptime;
- tm = (struct tm *)gmtime_r(&data->set.timevalue, &keeptime);
-#else
- tm = gmtime(&data->set.timevalue);
-#endif
-
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
snprintf(buf, BUFSIZE-1,
"%s, %02d %s %4d %02d:%02d:%02d GMT",
@@ -2095,8 +1751,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;
@@ -2106,11 +1762,13 @@ 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;
- curl_off_t postsize; /* off_t type to be able to hold a large file size */
+ curl_off_t postsize = 0; /* curl_off_t to handle large file sizes */
int seekerr = CURL_SEEKFUNC_OK;
/* Always consider the DO phase done after this function call, even if there
@@ -2118,34 +1776,52 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
the rest of the request in the PERFORM phase. */
*done = TRUE;
- /* If there already is a protocol-specific struct allocated for this
- sessionhandle, deal with it */
- Curl_reset_reqproto(conn);
+ if(conn->httpversion < 20) { /* unless the connection is re-used and already
+ http2 */
+ switch(conn->negnpn) {
+ case CURL_HTTP_VERSION_2_0:
+ conn->httpversion = 20; /* we know we're on HTTP/2 now */
+ result = Curl_http2_init(conn);
+ if(result)
+ return result;
- if(!data->state.proto.http) {
- /* Only allocate this struct if we don't already have it! */
+ result = Curl_http2_setup(conn);
+ if(result)
+ return result;
- http = calloc(1, sizeof(struct HTTP));
- if(!http)
- return CURLE_OUT_OF_MEMORY;
- data->state.proto.http = http;
+ result = Curl_http2_switched(conn, NULL, 0);
+ if(result)
+ return result;
+ break;
+ case CURL_HTTP_VERSION_1_1:
+ /* continue with HTTP/1.1 when explicitly requested */
+ break;
+ default:
+ /* and as fallback */
+ break;
+ }
}
- else
- http = data->state.proto.http;
+ else {
+ /* prepare for a http2 request */
+ result = Curl_http2_setup(conn);
+ if(result)
+ return result;
+ }
+
+ http = data->req.protop;
if(!data->state.this_is_a_follow) {
- /* this is not a followed location, get the original host name */
- if(data->state.first_host)
- /* Free to avoid leaking memory on multiple requests*/
- free(data->state.first_host);
+ /* Free to avoid leaking memory on multiple requests*/
+ free(data->state.first_host);
data->state.first_host = strdup(conn->host.name);
if(!data->state.first_host)
return CURLE_OUT_OF_MEMORY;
}
+ http->writebytecount = http->readbytecount = 0;
- if( (conn->protocol&(PROT_HTTP|PROT_FTP)) &&
- data->set.upload) {
+ if((conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_FTP)) &&
+ data->set.upload) {
httpreq = HTTPREQ_PUT;
}
@@ -2180,13 +1856,13 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
it might have been used in the proxy connect, but if we have got a header
with the user-agent string specified, we erase the previously made string
here. */
- if(Curl_checkheaders(data, "User-Agent:") && conn->allocptr.uagent) {
+ if(Curl_checkheaders(conn, "User-Agent:")) {
free(conn->allocptr.uagent);
conn->allocptr.uagent=NULL;
}
/* setup the authentication headers */
- result = http_output_auth(conn, request, ppath, FALSE);
+ result = Curl_http_output_auth(conn, request, ppath, FALSE);
if(result)
return result;
@@ -2201,15 +1877,20 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
conn->bits.authneg = FALSE;
Curl_safefree(conn->allocptr.ref);
- if(data->change.referer && !Curl_checkheaders(data, "Referer:"))
+ if(data->change.referer && !Curl_checkheaders(conn, "Referer:")) {
conn->allocptr.ref = aprintf("Referer: %s\r\n", data->change.referer);
+ if(!conn->allocptr.ref)
+ return CURLE_OUT_OF_MEMORY;
+ }
else
conn->allocptr.ref = NULL;
- if(data->set.str[STRING_COOKIE] && !Curl_checkheaders(data, "Cookie:"))
+#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(data, "Accept-Encoding:") &&
+ if(!Curl_checkheaders(conn, "Accept-Encoding:") &&
data->set.str[STRING_ENCODING]) {
Curl_safefree(conn->allocptr.accept_encoding);
conn->allocptr.accept_encoding =
@@ -2218,40 +1899,69 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
return CURLE_OUT_OF_MEMORY;
}
- ptr = Curl_checkheaders(data, "Transfer-Encoding:");
- if(ptr) {
- /* Some kind of TE is requested, check if 'chunked' is chosen */
- data->req.upload_chunky =
- Curl_compareheader(ptr, "Transfer-Encoding:", "chunked");
+#ifdef HAVE_LIBZ
+ /* we only consider transfer-encoding magic if libz support is built-in */
+
+ if(!Curl_checkheaders(conn, "TE:") &&
+ data->set.http_transfer_encoding) {
+ /* When we are to insert a TE: header in the request, we must also insert
+ TE in a Connection: header, so we need to merge the custom provided
+ Connection: header and prevent the original to get sent. Note that if
+ the user has inserted his/hers own TE: header we don't do this magic
+ but then assume that the user will handle it all! */
+ char *cptr = Curl_checkheaders(conn, "Connection:");
+#define TE_HEADER "TE: gzip\r\n"
+
+ Curl_safefree(conn->allocptr.te);
+
+ /* Create the (updated) Connection: header */
+ conn->allocptr.te = cptr? aprintf("%s, TE\r\n" TE_HEADER, cptr):
+ strdup("Connection: TE\r\n" TE_HEADER);
+
+ if(!conn->allocptr.te)
+ return CURLE_OUT_OF_MEMORY;
}
+#endif
+
+ if(conn->httpversion == 20)
+ /* In HTTP2 forbids Transfer-Encoding: chunked */
+ ptr = NULL;
else {
- if((conn->protocol&PROT_HTTP) &&
- data->set.upload &&
- (data->set.infilesize == -1)) {
- if(conn->bits.authneg)
- /* don't enable chunked during auth neg */
- ;
- else if(use_http_1_1(data, conn)) {
- /* HTTP, upload, unknown file size and not HTTP 1.0 */
- data->req.upload_chunky = TRUE;
+ ptr = Curl_checkheaders(conn, "Transfer-Encoding:");
+ if(ptr) {
+ /* Some kind of TE is requested, check if 'chunked' is chosen */
+ data->req.upload_chunky =
+ Curl_compareheader(ptr, "Transfer-Encoding:", "chunked");
+ }
+ else {
+ if((conn->handler->protocol&PROTO_FAMILY_HTTP) &&
+ data->set.upload &&
+ (data->state.infilesize == -1)) {
+ if(conn->bits.authneg)
+ /* don't enable chunked during auth neg */
+ ;
+ else if(use_http_1_1plus(data, conn)) {
+ /* HTTP, upload, unknown file size and not HTTP 1.0 */
+ data->req.upload_chunky = TRUE;
+ }
+ else {
+ failf(data, "Chunky upload is not supported by HTTP 1.0");
+ return CURLE_UPLOAD_FAILED;
+ }
}
else {
- failf(data, "Chunky upload is not supported by HTTP 1.0");
- return CURLE_UPLOAD_FAILED;
+ /* else, no chunky upload */
+ data->req.upload_chunky = FALSE;
}
- }
- else {
- /* else, no chunky upload */
- data->req.upload_chunky = FALSE;
- }
- if(data->req.upload_chunky)
- te = "Transfer-Encoding: chunked\r\n";
+ if(data->req.upload_chunky)
+ te = "Transfer-Encoding: chunked\r\n";
+ }
}
Curl_safefree(conn->allocptr.host);
- ptr = Curl_checkheaders(data, "Host:");
+ ptr = Curl_checkheaders(conn, "Host:");
if(ptr && (!data->state.this_is_a_follow ||
Curl_raw_equal(data->state.first_host, conn->host.name))) {
#if !defined(CURL_DISABLE_COOKIES)
@@ -2261,29 +1971,52 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
redirected request is being out on thin ice. Except if the host name
is the same as the first one! */
char *cookiehost = Curl_copy_header_value(ptr);
- if (!cookiehost)
+ if(!cookiehost)
return CURLE_OUT_OF_MEMORY;
- if (!*cookiehost)
+ if(!*cookiehost)
/* ignore empty data */
free(cookiehost);
else {
- char *colon = strchr(cookiehost, ':');
- if (colon)
- *colon = 0; /* The host must not include an embedded port number */
+ /* If the host begins with '[', we start searching for the port after
+ the bracket has been closed */
+ int startsearch = 0;
+ if(*cookiehost == '[') {
+ char *closingbracket;
+ /* since the 'cookiehost' is an allocated memory area that will be
+ freed later we cannot simply increment the pointer */
+ memmove(cookiehost, cookiehost + 1, strlen(cookiehost) - 1);
+ closingbracket = strchr(cookiehost, ']');
+ if(closingbracket)
+ *closingbracket = 0;
+ }
+ else {
+ char *colon = strchr(cookiehost + startsearch, ':');
+ if(colon)
+ *colon = 0; /* The host must not include an embedded port number */
+ }
Curl_safefree(conn->allocptr.cookiehost);
conn->allocptr.cookiehost = cookiehost;
}
#endif
- conn->allocptr.host = NULL;
+ if(strcmp("Host:", ptr)) {
+ conn->allocptr.host = aprintf("%s\r\n", ptr);
+ if(!conn->allocptr.host)
+ return CURLE_OUT_OF_MEMORY;
+ }
+ else
+ /* when clearing the header */
+ conn->allocptr.host = NULL;
}
else {
/* When building Host: headers, we must put the host name within
[brackets] if the host name is a plain IPv6-address. RFC2732-style. */
- if(((conn->protocol&PROT_HTTPS) && (conn->remote_port == PORT_HTTPS)) ||
- (!(conn->protocol&PROT_HTTPS) && (conn->remote_port == PORT_HTTP)) )
- /* if(HTTPS on port 443) OR (non-HTTPS on port 80) then don't include
+ if(((conn->given->protocol&CURLPROTO_HTTPS) &&
+ (conn->remote_port == PORT_HTTPS)) ||
+ ((conn->given->protocol&CURLPROTO_HTTP) &&
+ (conn->remote_port == PORT_HTTP)) )
+ /* if(HTTPS on port 443) OR (HTTP on port 80) then don't include
the port number in the host string */
conn->allocptr.host = aprintf("Host: %s%s%s\r\n",
conn->bits.ipv6_ip?"[":"",
@@ -2333,8 +2066,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
memcpy(newurl + newlen + (ptr - url),
ptr + currlen, /* copy the trailing zero byte too */
urllen - (ptr-url) - currlen + 1);
- if(data->change.url_alloc)
- free(data->change.url);
+ if(data->change.url_alloc) {
+ Curl_safefree(data->change.url);
+ data->change.url_alloc = FALSE;
+ }
data->change.url = newurl;
data->change.url_alloc = TRUE;
}
@@ -2344,7 +2079,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
}
ppath = data->change.url;
if(checkprefix("ftp://", ppath)) {
- if (data->set.proxy_transfer_mode) {
+ if(data->set.proxy_transfer_mode) {
/* when doing ftp, append ;type=<a|i> if not present */
char *type = strstr(ppath, ";type=");
if(type && type[6] && type[7] == 0) {
@@ -2361,34 +2096,30 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
char *p = ftp_typecode;
/* avoid sending invalid URLs like ftp://example.com;type=i if the
* user specified ftp://example.com without the slash */
- if (!*data->state.path && ppath[strlen(ppath) - 1] != '/') {
+ if(!*data->state.path && ppath[strlen(ppath) - 1] != '/') {
*p++ = '/';
}
snprintf(p, sizeof(ftp_typecode) - 1, ";type=%c",
data->set.prefer_ascii ? 'a' : 'i');
}
}
- if (conn->bits.user_passwd && !conn->bits.userpwd_in_url)
+ if(conn->bits.user_passwd && !conn->bits.userpwd_in_url)
paste_ftp_userpwd = TRUE;
}
}
#endif /* CURL_DISABLE_PROXY */
if(HTTPREQ_POST_FORM == httpreq) {
- /* we must build the whole darned post sequence first, so that we have
- a size of the whole shebang before we start to send it */
- result = Curl_getFormData(&http->sendit, data->set.httppost,
- Curl_checkheaders(data, "Content-Type:"),
- &http->postsize);
- if(CURLE_OK != result) {
- /* Curl_getFormData() doesn't use failf() */
- failf(data, "failed creating formpost data");
- return result;
- }
+ /* we must build the whole post sequence first, so that we have a size of
+ the whole transfer before we start to send it */
+ result = Curl_getformdata(data, &http->sendit, data->set.httppost,
+ Curl_checkheaders(conn, "Content-Type:"),
+ &http->postsize);
+ if(result)
+ return result;
}
-
- http->p_accept = Curl_checkheaders(data, "Accept:")?NULL:"Accept: */*\r\n";
+ http->p_accept = Curl_checkheaders(conn, "Accept:")?NULL:"Accept: */*\r\n";
if(( (HTTPREQ_POST == httpreq) ||
(HTTPREQ_POST_FORM == httpreq) ||
@@ -2407,7 +2138,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
* This is meant to get the size of the present remote-file by itself.
* We don't support this now. Bail out!
*/
- data->state.resume_from = 0;
+ data->state.resume_from = 0;
}
if(data->state.resume_from && !data->state.this_is_a_follow) {
@@ -2428,35 +2159,32 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
/* when seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */
else {
curl_off_t passed=0;
-
do {
- size_t readthisamountnow = (size_t)(data->state.resume_from -
- passed);
- size_t actuallyread;
-
- if(readthisamountnow > BUFSIZE)
- readthisamountnow = BUFSIZE;
+ size_t readthisamountnow =
+ (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ?
+ BUFSIZE : curlx_sotouz(data->state.resume_from - passed);
- actuallyread = data->set.fread_func(data->state.buffer, 1,
- (size_t)readthisamountnow,
- data->set.in);
+ size_t actuallyread =
+ data->set.fread_func(data->state.buffer, 1, readthisamountnow,
+ data->set.in);
passed += actuallyread;
- if(actuallyread != readthisamountnow) {
- failf(data, "Could only read %" FORMAT_OFF_T
- " bytes from the input",
- passed);
+ if((actuallyread == 0) || (actuallyread > readthisamountnow)) {
+ /* this checks for greater-than only to make sure that the
+ CURL_READFUNC_ABORT return code still aborts */
+ failf(data, "Could only read %" CURL_FORMAT_CURL_OFF_T
+ " bytes from the input", passed);
return CURLE_READ_ERROR;
}
- } while(passed != data->state.resume_from); /* loop until done */
+ } while(passed < data->state.resume_from);
}
}
/* now, decrease the size of the read */
- if(data->set.infilesize>0) {
- data->set.infilesize -= data->state.resume_from;
+ if(data->state.infilesize>0) {
+ data->state.infilesize -= data->state.resume_from;
- if(data->set.infilesize <= 0) {
+ if(data->state.infilesize <= 0) {
failf(data, "File already completely uploaded");
return CURLE_PARTIAL_FILE;
}
@@ -2471,46 +2199,44 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
* ones if any such are specified.
*/
if(((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD)) &&
- !Curl_checkheaders(data, "Range:")) {
+ !Curl_checkheaders(conn, "Range:")) {
/* if a line like this was already allocated, free the previous one */
- if(conn->allocptr.rangeline)
- free(conn->allocptr.rangeline);
+ free(conn->allocptr.rangeline);
conn->allocptr.rangeline = aprintf("Range: bytes=%s\r\n",
data->state.range);
}
else if((httpreq != HTTPREQ_GET) &&
- !Curl_checkheaders(data, "Content-Range:")) {
+ !Curl_checkheaders(conn, "Content-Range:")) {
/* if a line like this was already allocated, free the previous one */
- if(conn->allocptr.rangeline)
- free(conn->allocptr.rangeline);
+ free(conn->allocptr.rangeline);
if(data->set.set_resume_from < 0) {
/* Upload resume was asked for, but we don't know the size of the
remote part so we tell the server (and act accordingly) that we
upload the whole file (again) */
conn->allocptr.rangeline =
- aprintf("Content-Range: bytes 0-%" FORMAT_OFF_T
- "/%" FORMAT_OFF_T "\r\n",
- data->set.infilesize - 1, data->set.infilesize);
+ aprintf("Content-Range: bytes 0-%" CURL_FORMAT_CURL_OFF_T
+ "/%" CURL_FORMAT_CURL_OFF_T "\r\n",
+ data->state.infilesize - 1, data->state.infilesize);
}
else if(data->state.resume_from) {
/* This is because "resume" was selected */
curl_off_t total_expected_size=
- data->state.resume_from + data->set.infilesize;
+ data->state.resume_from + data->state.infilesize;
conn->allocptr.rangeline =
- aprintf("Content-Range: bytes %s%" FORMAT_OFF_T
- "/%" FORMAT_OFF_T "\r\n",
- data->state.range, total_expected_size-1,
- total_expected_size);
+ aprintf("Content-Range: bytes %s%" CURL_FORMAT_CURL_OFF_T
+ "/%" CURL_FORMAT_CURL_OFF_T "\r\n",
+ data->state.range, total_expected_size-1,
+ total_expected_size);
}
else {
/* Range was selected and then we just pass the incoming range and
append total size */
conn->allocptr.rangeline =
- aprintf("Content-Range: bytes %s/%" FORMAT_OFF_T "\r\n",
- data->state.range, data->set.infilesize);
+ aprintf("Content-Range: bytes %s/%" CURL_FORMAT_CURL_OFF_T "\r\n",
+ data->state.range, data->state.infilesize);
}
if(!conn->allocptr.rangeline)
return CURLE_OUT_OF_MEMORY;
@@ -2519,7 +2245,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
/* Use 1.1 unless the user specifically asked for 1.0 or the server only
supports 1.0 */
- httpstring= use_http_1_1(data, conn)?"1.1":"1.0";
+ httpstring= use_http_1_1plus(data, conn)?"1.1":"1.0";
/* initialize a dynamic send-buffer */
req_buffer = Curl_add_buffer_init();
@@ -2530,69 +2256,90 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
/* add the main request stuff */
/* GET/HEAD/POST/PUT */
result = Curl_add_bufferf(req_buffer, "%s ", request);
- if (result)
+ if(result)
return result;
/* url */
- if (paste_ftp_userpwd)
+ if(paste_ftp_userpwd)
result = Curl_add_bufferf(req_buffer, "ftp://%s:%s@%s",
conn->user, conn->passwd,
ppath + sizeof("ftp://") - 1);
else
result = Curl_add_buffer(req_buffer, ppath, strlen(ppath));
- if (result)
+ if(result)
return result;
- result = Curl_add_bufferf(req_buffer,
- "%s" /* ftp typecode (;type=x) */
- " HTTP/%s\r\n" /* HTTP version */
- "%s" /* proxyuserpwd */
- "%s" /* userpwd */
- "%s" /* range */
- "%s" /* user agent */
- "%s" /* host */
- "%s" /* accept */
- "%s" /* accept-encoding */
- "%s" /* referer */
- "%s" /* Proxy-Connection */
- "%s",/* transfer-encoding */
-
- ftp_typecode,
- httpstring,
- conn->allocptr.proxyuserpwd?
- conn->allocptr.proxyuserpwd:"",
- conn->allocptr.userpwd?conn->allocptr.userpwd:"",
- (data->state.use_range && conn->allocptr.rangeline)?
- conn->allocptr.rangeline:"",
- (data->set.str[STRING_USERAGENT] &&
- *data->set.str[STRING_USERAGENT] && conn->allocptr.uagent)?
- conn->allocptr.uagent:"",
- (conn->allocptr.host?conn->allocptr.host:""), /* Host: host */
- http->p_accept?http->p_accept:"",
- (data->set.str[STRING_ENCODING] &&
- *data->set.str[STRING_ENCODING] &&
- conn->allocptr.accept_encoding)?
- conn->allocptr.accept_encoding:"",
- (data->change.referer && conn->allocptr.ref)?
- conn->allocptr.ref:"" /* Referer: <data> */,
- (conn->bits.httpproxy &&
- !conn->bits.tunnel_proxy &&
- !Curl_checkheaders(data, "Proxy-Connection:"))?
- "Proxy-Connection: Keep-Alive\r\n":"",
- te
+ result =
+ Curl_add_bufferf(req_buffer,
+ "%s" /* ftp typecode (;type=x) */
+ " HTTP/%s\r\n" /* HTTP version */
+ "%s" /* host */
+ "%s" /* proxyuserpwd */
+ "%s" /* userpwd */
+ "%s" /* range */
+ "%s" /* user agent */
+ "%s" /* accept */
+ "%s" /* TE: */
+ "%s" /* accept-encoding */
+ "%s" /* referer */
+ "%s" /* Proxy-Connection */
+ "%s",/* transfer-encoding */
+
+ ftp_typecode,
+ httpstring,
+ (conn->allocptr.host?conn->allocptr.host:""),
+ conn->allocptr.proxyuserpwd?
+ conn->allocptr.proxyuserpwd:"",
+ conn->allocptr.userpwd?conn->allocptr.userpwd:"",
+ (data->state.use_range && conn->allocptr.rangeline)?
+ conn->allocptr.rangeline:"",
+ (data->set.str[STRING_USERAGENT] &&
+ *data->set.str[STRING_USERAGENT] &&
+ conn->allocptr.uagent)?
+ conn->allocptr.uagent:"",
+ http->p_accept?http->p_accept:"",
+ conn->allocptr.te?conn->allocptr.te:"",
+ (data->set.str[STRING_ENCODING] &&
+ *data->set.str[STRING_ENCODING] &&
+ conn->allocptr.accept_encoding)?
+ conn->allocptr.accept_encoding:"",
+ (data->change.referer && conn->allocptr.ref)?
+ conn->allocptr.ref:"" /* Referer: <data> */,
+ (conn->bits.httpproxy &&
+ !conn->bits.tunnel_proxy &&
+ !Curl_checkProxyheaders(conn, "Proxy-Connection:"))?
+ "Proxy-Connection: Keep-Alive\r\n":"",
+ te
);
+ /* clear userpwd to avoid re-using credentials from re-used connections */
+ Curl_safefree(conn->allocptr.userpwd);
+
/*
- * Free userpwd now --- cannot reuse this for Negotiate and possibly NTLM
- * with basic and digest, it will be freed anyway by the next request
+ * Free proxyuserpwd for Negotiate/NTLM. Cannot reuse as it is associated
+ * with the connection and shouldn't be repeated over it either.
*/
-
- Curl_safefree (conn->allocptr.userpwd);
- conn->allocptr.userpwd = NULL;
+ switch (data->state.authproxy.picked) {
+ case CURLAUTH_NEGOTIATE:
+ case CURLAUTH_NTLM:
+ case CURLAUTH_NTLM_WB:
+ Curl_safefree(conn->allocptr.proxyuserpwd);
+ break;
+ }
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 */
+ result = Curl_http2_request_upgrade(req_buffer, conn);
+ if(result)
+ return result;
+ }
+
#if !defined(CURL_DISABLE_COOKIES)
if(data->cookies || addcookies) {
struct Cookie *co=NULL; /* no cookies from start */
@@ -2604,7 +2351,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
conn->allocptr.cookiehost?
conn->allocptr.cookiehost:host,
data->state.path,
- (bool)(conn->protocol&PROT_HTTPS?TRUE:FALSE));
+ (conn->handler->protocol&CURLPROTO_HTTPS)?
+ TRUE:FALSE);
Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
}
if(co) {
@@ -2618,8 +2366,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
break;
}
result = Curl_add_bufferf(req_buffer,
- "%s%s=%s", count?"; ":"",
- co->name, co->value);
+ "%s%s=%s", count?"; ":"",
+ co->name, co->value);
if(result)
break;
count++;
@@ -2628,17 +2376,16 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
}
Curl_cookie_freelist(store, FALSE); /* free the cookie list */
}
- if(addcookies && (CURLE_OK == result)) {
+ if(addcookies && !result) {
if(!count)
result = Curl_add_bufferf(req_buffer, "Cookie: ");
- if(CURLE_OK == result) {
- result = Curl_add_bufferf(req_buffer, "%s%s",
- count?"; ":"",
- addcookies);
+ if(!result) {
+ result = Curl_add_bufferf(req_buffer, "%s%s", count?"; ":"",
+ addcookies);
count++;
}
}
- if(count && (CURLE_OK == result))
+ if(count && !result)
result = Curl_add_buffer(req_buffer, "\r\n", 2);
if(result)
@@ -2647,17 +2394,17 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
#endif
if(data->set.timecondition) {
- result = Curl_add_timecondition(data, req_buffer);
+ result = Curl_add_timecondition(data, req_buffer);
if(result)
return result;
}
- result = Curl_add_custom_headers(conn, req_buffer);
+ result = Curl_add_custom_headers(conn, FALSE, req_buffer);
if(result)
return result;
http->postdata = NULL; /* nothing to post at this point */
- Curl_pgrsSetUploadSize(data, 0); /* upload size is 0 atm */
+ Curl_pgrsSetUploadSize(data, -1); /* upload size is unknown 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
@@ -2690,22 +2437,23 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
/* Get the currently set callback function pointer and store that in the
form struct since we might want the actual user-provided callback later
- on. The conn->fread_func pointer itself will be changed for the
+ on. The data->set.fread_func pointer itself will be changed for the
multipart case to the function that returns a multipart formatted
stream. */
- http->form.fread_func = conn->fread_func;
+ http->form.fread_func = data->set.fread_func;
/* Set the read function to read from the generated form data */
- conn->fread_func = (curl_read_callback)Curl_FormReader;
- conn->fread_in = &http->form;
+ data->set.fread_func = (curl_read_callback)Curl_FormReader;
+ data->set.in = &http->form;
http->sending = HTTPSEND_BODY;
- if(!data->req.upload_chunky) {
+ if(!data->req.upload_chunky &&
+ !Curl_checkheaders(conn, "Content-Length:")) {
/* only add Content-Length if not uploading chunked */
result = Curl_add_bufferf(req_buffer,
- "Content-Length: %" FORMAT_OFF_T "\r\n",
- http->postsize);
+ "Content-Length: %" CURL_FORMAT_CURL_OFF_T
+ "\r\n", http->postsize);
if(result)
return result;
}
@@ -2755,14 +2503,14 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
Curl_formclean(&http->sendit); /* free that whole lot */
return result;
}
-#ifdef CURL_DOES_CONVERSIONS
-/* time to convert the form data... */
- result = Curl_formconvert(data, http->sendit);
+
+ /* convert the form data */
+ result = Curl_convert_form(data, http->sendit);
if(result) {
Curl_formclean(&http->sendit); /* free that whole lot */
return result;
}
-#endif /* CURL_DOES_CONVERSIONS */
+
break;
case HTTPREQ_PUT: /* Let's PUT the data to the server! */
@@ -2770,20 +2518,23 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
if(conn->bits.authneg)
postsize = 0;
else
- postsize = data->set.infilesize;
+ postsize = data->state.infilesize;
- if((postsize != -1) && !data->req.upload_chunky) {
+ if((postsize != -1) && !data->req.upload_chunky &&
+ !Curl_checkheaders(conn, "Content-Length:")) {
/* only add Content-Length if not uploading chunked */
result = Curl_add_bufferf(req_buffer,
- "Content-Length: %" FORMAT_OFF_T "\r\n",
- postsize );
+ "Content-Length: %" CURL_FORMAT_CURL_OFF_T
+ "\r\n", postsize);
if(result)
return result;
}
- result = expect100(data, conn, req_buffer);
- if(result)
- return result;
+ if(postsize != 0) {
+ result = expect100(data, conn, req_buffer);
+ if(result)
+ return result;
+ }
result = Curl_add_buffer(req_buffer, "\r\n", 2); /* end of headers */
if(result)
@@ -2813,27 +2564,26 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
postsize = 0;
else {
/* figure out the size of the postfields */
- postsize = (data->set.postfieldsize != -1)?
- data->set.postfieldsize:
+ postsize = (data->state.infilesize != -1)?
+ data->state.infilesize:
(data->set.postfields? (curl_off_t)strlen(data->set.postfields):-1);
}
- if(!data->req.upload_chunky) {
- /* We only set Content-Length and allow a custom Content-Length if
- we don't upload data chunked, as RFC2616 forbids us to set both
- kinds of headers (Transfer-Encoding: chunked and Content-Length) */
-
- if(conn->bits.authneg || !Curl_checkheaders(data, "Content-Length:")) {
- /* we allow replacing this header if not during auth negotiation,
- although it isn't very wise to actually set your own */
- result = Curl_add_bufferf(req_buffer,
- "Content-Length: %" FORMAT_OFF_T"\r\n",
- postsize);
- if(result)
- return result;
- }
+
+ /* We only set Content-Length and allow a custom Content-Length if
+ we don't upload data chunked, as RFC2616 forbids us to set both
+ kinds of headers (Transfer-Encoding: chunked and Content-Length) */
+ if((postsize != -1) && !data->req.upload_chunky &&
+ !Curl_checkheaders(conn, "Content-Length:")) {
+ /* we allow replacing this header if not during auth negotiation,
+ although it isn't very wise to actually set your own */
+ result = Curl_add_bufferf(req_buffer,
+ "Content-Length: %" CURL_FORMAT_CURL_OFF_T
+ "\r\n", postsize);
+ if(result)
+ return result;
}
- if(!Curl_checkheaders(data, "Content-Type:")) {
+ if(!Curl_checkheaders(conn, "Content-Type:")) {
result = Curl_add_bufferf(req_buffer,
"Content-Type: application/"
"x-www-form-urlencoded\r\n");
@@ -2845,7 +2595,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
the somewhat bigger ones we allow the app to disable it. Just make
sure that the expect100header is always set to the preferred value
here. */
- ptr = Curl_checkheaders(data, "Expect:");
+ ptr = Curl_checkheaders(conn, "Expect:");
if(ptr) {
data->state.expect100header =
Curl_compareheader(ptr, "Expect:", "100-continue");
@@ -2860,7 +2610,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
if(data->set.postfields) {
- if(!data->state.expect100header &&
+ /* In HTTP2, we send request body in DATA frame regardless of
+ its size. */
+ if(conn->httpversion != 20 &&
+ !data->state.expect100header &&
(postsize < MAX_INITIAL_POST_SIZE)) {
/* if we don't use expect: 100 AND
postsize is less than MAX_INITIAL_POST_SIZE
@@ -2877,20 +2630,25 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
/* We're not sending it 'chunked', append it to the request
already now to reduce the number if send() calls */
result = Curl_add_buffer(req_buffer, data->set.postfields,
- (size_t)postsize);
+ (size_t)postsize);
included_body = postsize;
}
else {
- /* Append the POST data chunky-style */
- result = Curl_add_bufferf(req_buffer, "%x\r\n", (int)postsize);
- if(CURLE_OK == result)
- result = Curl_add_buffer(req_buffer, data->set.postfields,
- (size_t)postsize);
- if(CURLE_OK == result)
- result = Curl_add_buffer(req_buffer,
- "\x0d\x0a\x30\x0d\x0a\x0d\x0a", 7);
- /* CR LF 0 CR LF CR LF */
- included_body = postsize + 7;
+ if(postsize) {
+ /* Append the POST data chunky-style */
+ result = Curl_add_bufferf(req_buffer, "%x\r\n", (int)postsize);
+ if(!result) {
+ result = Curl_add_buffer(req_buffer, data->set.postfields,
+ (size_t)postsize);
+ if(!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);
+ /* 0 CR LF CR LF */
+ included_body += 5;
}
if(result)
return result;
@@ -2904,8 +2662,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
http->sending = HTTPSEND_BODY;
- conn->fread_func = (curl_read_callback)readmoredata;
- conn->fread_in = (void *)conn;
+ data->set.fread_func = (curl_read_callback)readmoredata;
+ data->set.in = (void *)conn;
/* set the upload size to the progress meter */
Curl_pgrsSetUploadSize(data, http->postsize);
@@ -2924,13 +2682,13 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
/* Chunky upload is selected and we're negotiating auth still, send
end-of-data only */
result = Curl_add_buffer(req_buffer,
- "\x0d\x0a\x30\x0d\x0a\x0d\x0a", 7);
- /* CR LF 0 CR LF CR LF */
+ "\x30\x0d\x0a\x0d\x0a", 5);
+ /* 0 CR LF CR LF */
if(result)
return result;
}
- else if(data->set.postfieldsize) {
+ else if(data->state.infilesize) {
/* set the upload size to the progress meter */
Curl_pgrsSetUploadSize(data, postsize?postsize:-1);
@@ -2981,6 +2739,17 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
Curl_pgrsSetUploadCounter(data, http->writebytecount);
if(Curl_pgrsUpdate(conn))
result = CURLE_ABORTED_BY_CALLBACK;
+
+ if(http->writebytecount >= postsize) {
+ /* already sent the entire request body, mark the "upload" as
+ complete */
+ infof(data, "upload completely sent off: %" CURL_FORMAT_CURL_OFF_T
+ " out of %" CURL_FORMAT_CURL_OFF_T " bytes\n",
+ http->writebytecount, postsize);
+ data->req.upload_done = TRUE;
+ data->req.keepon &= ~KEEP_SEND; /* we're done writing */
+ data->req.exp100 = EXP100_SEND_DATA; /* already sent */
+ }
}
return result;
@@ -3001,13 +2770,13 @@ checkhttpprefix(struct SessionHandle *data,
/* convert from the network encoding using a scratch area */
char *scratch = strdup(s);
if(NULL == scratch) {
- failf (data, "Failed to allocate memory for conversion!");
- return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */
+ failf (data, "Failed to allocate memory for conversion!");
+ return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */
}
if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s)+1)) {
/* Curl_convert_from_network calls failf if unsuccessful */
- free(scratch);
- return FALSE; /* can't return CURLE_foobar so return FALSE */
+ free(scratch);
+ return FALSE; /* can't return CURLE_foobar so return FALSE */
}
s = scratch;
#endif /* CURL_DOES_CONVERSIONS */
@@ -3020,9 +2789,8 @@ checkhttpprefix(struct SessionHandle *data,
head = head->next;
}
- if((rc != TRUE) && (checkprefix("HTTP/", s))) {
+ if(!rc && (checkprefix("HTTP/", s)))
rc = TRUE;
- }
#ifdef CURL_DOES_CONVERSIONS
free(scratch);
@@ -3064,7 +2832,7 @@ checkprotoprefix(struct SessionHandle *data, struct connectdata *conn,
const char *s)
{
#ifndef CURL_DISABLE_RTSP
- if(conn->protocol & PROT_RTSP)
+ if(conn->handler->protocol & CURLPROTO_RTSP)
return checkrtspprefix(data, s);
#else
(void)conn;
@@ -3116,6 +2884,42 @@ static CURLcode header_append(struct SessionHandle *data,
return CURLE_OK;
}
+static void print_http_error(struct SessionHandle *data)
+{
+ struct SingleRequest *k = &data->req;
+ char *beg = k->p;
+
+ /* make sure that data->req.p points to the HTTP status line */
+ if(!strncmp(beg, "HTTP", 4)) {
+
+ /* skip to HTTP status code */
+ beg = strchr(beg, ' ');
+ if(beg && *++beg) {
+
+ /* find trailing CR */
+ char end_char = '\r';
+ char *end = strchr(beg, end_char);
+ if(!end) {
+ /* try to find LF (workaround for non-compliant HTTP servers) */
+ end_char = '\n';
+ end = strchr(beg, end_char);
+ }
+
+ if(end) {
+ /* temporarily replace CR or LF by NUL and print the error message */
+ *end = '\0';
+ failf(data, "The requested URL returned error: %s", beg);
+
+ /* restore the previously replaced CR or LF */
+ *end = end_char;
+ return;
+ }
+ }
+ }
+
+ /* fall-back to printing the HTTP status code only */
+ failf(data, "The requested URL returned error: %d", k->httpcode);
+}
/*
* Read any HTTP header lines from the server and pass them to the client app.
@@ -3230,17 +3034,40 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
k->header = TRUE;
k->headerline = 0; /* restart the header line counter */
- /* if we did wait for this do enable write now! */
- if(k->exp100) {
- k->exp100 = EXP100_SEND_DATA;
- k->keepon |= KEEP_SEND;
+ /* "A user agent MAY ignore unexpected 1xx status responses." */
+ switch(k->httpcode) {
+ case 100:
+ /* if we did wait for this do enable write now! */
+ if(k->exp100) {
+ k->exp100 = EXP100_SEND_DATA;
+ k->keepon |= KEEP_SEND;
+ }
+ break;
+ case 101:
+ /* Switching Protocols */
+ if(k->upgr101 == UPGR101_REQUESTED) {
+ 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;
+ }
+ break;
+ default:
+ break;
}
}
else {
k->header = FALSE; /* no more header to parse! */
if((k->size == -1) && !k->chunk && !conn->bits.close &&
- (conn->httpversion >= 11) && !(conn->protocol & PROT_RTSP)) {
+ (conn->httpversion == 11) &&
+ !(conn->handler->protocol & CURLPROTO_RTSP) &&
+ data->set.httpreq != HTTPREQ_HEAD) {
/* On HTTP 1.1, when connection is not to get closed, but no
Content-Length nor Content-Encoding chunked have been
received, according to RFC2616 section 4.4 point 5, we
@@ -3248,26 +3075,28 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
signal the end of the document. */
infof(data, "no chunk, no close, no size. Assume close to "
"signal end\n");
- conn->bits.close = TRUE;
+ connclose(conn, "HTTP: No end-of-message indicator");
}
}
- if(417 == k->httpcode) {
- /*
- * we got: "417 Expectation Failed" this means:
- * we have made a HTTP call and our Expect Header
- * seems to cause a problem => abort the write operations
- * (or prevent them from starting).
- */
- k->exp100 = EXP100_FAILED;
- k->keepon &= ~KEEP_SEND;
+ /* At this point we have some idea about the fate of the connection.
+ If we are closing the connection it may result auth failure. */
+#if defined(USE_NTLM)
+ if(conn->bits.close &&
+ (((data->req.httpcode == 401) &&
+ (conn->ntlm.state == NTLMSTATE_TYPE2)) ||
+ ((data->req.httpcode == 407) &&
+ (conn->proxyntlm.state == NTLMSTATE_TYPE2)))) {
+ infof(data, "Connection closure while negotiating auth (HTTP 1.0?)\n");
+ data->state.authproblem = TRUE;
}
+#endif
/*
* When all the headers have been parsed, see if we should give
* up and return an error.
*/
- if(Curl_http_should_fail(conn)) {
+ if(http_should_fail(conn)) {
failf (data, "The requested URL returned error: %d",
k->httpcode);
return CURLE_HTTP_RETURNED_ERROR;
@@ -3302,6 +3131,46 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
if(result)
return result;
+ if(k->httpcode >= 300) {
+ if((!conn->bits.authneg) && !conn->bits.close &&
+ !conn->bits.rewindaftersend) {
+ /*
+ * General treatment of errors when about to send data. Including :
+ * "417 Expectation Failed", while waiting for 100-continue.
+ *
+ * The check for close above is done simply because of something
+ * else has already deemed the connection to get closed then
+ * something else should've considered the big picture and we
+ * avoid this check.
+ *
+ * rewindaftersend indicates that something has told libcurl to
+ * continue sending even if it gets discarded
+ */
+
+ switch(data->set.httpreq) {
+ case HTTPREQ_PUT:
+ case HTTPREQ_POST:
+ case HTTPREQ_POST_FORM:
+ /* We got an error response. If this happened before the whole
+ * request body has been sent we stop sending and mark the
+ * connection for closure after we've read the entire response.
+ */
+ if(!k->upload_done) {
+ infof(data, "HTTP error before end of send, stop sending\n");
+ connclose(conn, "Stop sending data before everything sent");
+ k->upload_done = TRUE;
+ k->keepon &= ~KEEP_SEND; /* don't send */
+ if(data->state.expect100header)
+ k->exp100 = EXP100_FAILED;
+ }
+ break;
+
+ default: /* default label present to avoid compiler warnings */
+ break;
+ }
+ }
+ }
+
if(conn->bits.rewindaftersend) {
/* We rewind after a complete send, so thus we continue
sending now */
@@ -3393,33 +3262,45 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
res = Curl_convert_from_network(data,
&scratch[0],
SCRATCHSIZE);
- if(CURLE_OK != res) {
+ if(res)
/* Curl_convert_from_network calls failf if unsuccessful */
return res;
- }
#else
#define HEADER1 k->p /* no conversion needed, just use k->p */
#endif /* CURL_DOES_CONVERSIONS */
- if(conn->protocol & PROT_HTTP) {
+ 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 %3d",
- &httpversion_major,
- &conn->httpversion,
- &k->httpcode);
+ " HTTP/%d.%d %d",
+ &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
NCSA 1.5.x returns this crap when asked for HTTP/1.1
- */
+ */
nc=sscanf(HEADER1, " HTTP %3d", &k->httpcode);
conn->httpversion = 10;
/* If user has set option HTTP200ALIASES,
compare header line against list of aliases
- */
+ */
if(!nc) {
if(checkhttpprefix(data, k->p)) {
nc = 1;
@@ -3429,7 +3310,7 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
}
}
}
- else if(conn->protocol & PROT_RTSP) {
+ else if(conn->handler->protocol & CURLPROTO_RTSP) {
nc = sscanf(HEADER1,
" RTSP/%d.%d %3d",
&rtspversion_major,
@@ -3449,8 +3330,8 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
data->info.httpcode = k->httpcode;
data->info.httpversion = conn->httpversion;
- if (!data->state.httpversion ||
- data->state.httpversion > conn->httpversion)
+ if(!data->state.httpversion ||
+ data->state.httpversion > conn->httpversion)
/* store the lowest server version we encounter */
data->state.httpversion = conn->httpversion;
@@ -3474,8 +3355,7 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
}
else {
/* serious error, go home! */
- failf (data, "The requested URL returned error: %d",
- k->httpcode);
+ print_http_error(data);
return CURLE_HTTP_RETURNED_ERROR;
}
}
@@ -3485,7 +3365,15 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
we get one of those fancy headers that tell us the
server keeps it open for us! */
infof(data, "HTTP 1.0, assume close after body\n");
- conn->bits.close = TRUE;
+ connclose(conn, "HTTP/1.0 close after body");
+ }
+ else if(conn->httpversion == 20 ||
+ (k->upgr101 == UPGR101_REQUESTED && k->httpcode == 101)) {
+ DEBUGF(infof(data, "HTTP/2 found, allow multiplexing\n"));
+
+ /* HTTP/2 cannot blacklist multiplexing since it is a core
+ functionality of the protocol */
+ conn->bundle->multiuse = BUNDLE_MULTIPLEX;
}
else if(conn->httpversion >= 11 &&
!conn->bits.close) {
@@ -3494,7 +3382,11 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
DEBUGF(infof(data,
"HTTP 1.1 or later with persistent connection, "
"pipelining supported\n"));
- conn->server_supports_pipelining = TRUE;
+ /* Activate pipelining if needed */
+ if(conn->bundle) {
+ if(!Curl_pipeline_site_blacklisted(data, conn))
+ conn->bundle->multiuse = BUNDLE_PIPELINING;
+ }
}
switch(k->httpcode) {
@@ -3527,14 +3419,10 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
}
}
-#ifdef CURL_DOES_CONVERSIONS
- /* convert from the network encoding */
result = Curl_convert_from_network(data, k->p, strlen(k->p));
- if(CURLE_OK != result) {
- return(result);
- }
/* Curl_convert_from_network calls failf if unsuccessful */
-#endif /* CURL_DOES_CONVERSIONS */
+ if(result)
+ return result;
/* Check for Content-Length: header lines to get size */
if(!k->ignorecl && !data->set.ignorecl &&
@@ -3557,17 +3445,17 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
/* Negative Content-Length is really odd, and we know it
happens for example when older Apache servers send large
files */
- conn->bits.close = TRUE;
- infof(data, "Negative content-length: %" FORMAT_OFF_T
+ connclose(conn, "negative content-length");
+ infof(data, "Negative content-length: %" CURL_FORMAT_CURL_OFF_T
", closing after transfer\n", contentlength);
}
}
/* check for Content-Type: header lines to get the MIME-type */
else if(checkprefix("Content-Type:", k->p)) {
char *contenttype = Curl_copy_header_value(k->p);
- if (!contenttype)
+ if(!contenttype)
return CURLE_OUT_OF_MEMORY;
- if (!*contenttype)
+ if(!*contenttype)
/* ignore empty data */
free(contenttype);
else {
@@ -3575,6 +3463,19 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
data->info.contenttype = contenttype;
}
}
+ else if(checkprefix("Server:", k->p)) {
+ if(conn->httpversion < 20) {
+ /* only do this for non-h2 servers */
+ char *server_name = Curl_copy_header_value(k->p);
+
+ /* Turn off pipelining if the server version is blacklisted */
+ if(conn->bundle && (conn->bundle->multiuse == BUNDLE_PIPELINING)) {
+ if(Curl_pipeline_server_blacklisted(data, server_name))
+ conn->bundle->multiuse = BUNDLE_NO_MULTIUSE;
+ }
+ free(server_name);
+ }
+ }
else if((conn->httpversion == 10) &&
conn->bits.httpproxy &&
Curl_compareheader(k->p,
@@ -3585,7 +3486,7 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
* connection will be kept alive for our pleasure.
* Default action for 1.0 is to close.
*/
- conn->bits.close = FALSE; /* don't close when done */
+ connkeep(conn, "Proxy-Connection keep-alive"); /* don't close */
infof(data, "HTTP/1.0 proxy connection set to keep alive!\n");
}
else if((conn->httpversion == 11) &&
@@ -3596,7 +3497,7 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
* We get a HTTP/1.1 response from a proxy and it says it'll
* close down after this transfer.
*/
- conn->bits.close = TRUE; /* close when done */
+ connclose(conn, "Proxy-Connection: asked to close after done");
infof(data, "HTTP/1.1 proxy connection set close!\n");
}
else if((conn->httpversion == 10) &&
@@ -3607,7 +3508,7 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
* pleasure. Default action for 1.0 is to close.
*
* [RFC2068, section 19.7.1] */
- conn->bits.close = FALSE; /* don't close when done */
+ connkeep(conn, "Connection keep-alive");
infof(data, "HTTP/1.0 connection set to keep alive!\n");
}
else if(Curl_compareheader(k->p, "Connection:", "close")) {
@@ -3617,10 +3518,11 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
* the connection will close when this request has been
* served.
*/
- conn->bits.close = TRUE; /* close when done */
+ connclose(conn, "Connection: close used");
}
- else if(Curl_compareheader(k->p, "Transfer-Encoding:", "chunked") &&
- !(conn->protocol & PROT_RTSP)) {
+ else if(checkprefix("Transfer-Encoding:", k->p)) {
+ /* One or more encodings. We check for chunked and/or a compression
+ algorithm. */
/*
* [RFC 2616, section 3.6.1] A 'chunked' transfer encoding
* means that the server will send a series of "chunks". Each
@@ -3629,13 +3531,64 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
* with the previously mentioned size. There can be any amount
* of chunks, and a chunk-data set to zero signals the
* end-of-chunks. */
- k->chunk = TRUE; /* chunks coming our way */
- /* init our chunky engine */
- Curl_httpchunk_init(conn);
+ char *start;
+
+ /* Find the first non-space letter */
+ start = k->p + 18;
+
+ for(;;) {
+ /* skip whitespaces and commas */
+ while(*start && (ISSPACE(*start) || (*start == ',')))
+ start++;
+
+ if(checkprefix("chunked", start)) {
+ k->chunk = TRUE; /* chunks coming our way */
+
+ /* init our chunky engine */
+ Curl_httpchunk_init(conn);
+
+ start += 7;
+ }
+
+ if(k->auto_decoding)
+ /* TODO: we only support the first mentioned compression for now */
+ break;
+
+ if(checkprefix("identity", start)) {
+ k->auto_decoding = IDENTITY;
+ start += 8;
+ }
+ else if(checkprefix("deflate", start)) {
+ k->auto_decoding = DEFLATE;
+ start += 7;
+ }
+ else if(checkprefix("gzip", start)) {
+ k->auto_decoding = GZIP;
+ start += 4;
+ }
+ else if(checkprefix("x-gzip", start)) {
+ k->auto_decoding = GZIP;
+ start += 6;
+ }
+ else if(checkprefix("compress", start)) {
+ k->auto_decoding = COMPRESS;
+ start += 8;
+ }
+ else if(checkprefix("x-compress", start)) {
+ k->auto_decoding = COMPRESS;
+ start += 10;
+ }
+ else
+ /* unknown! */
+ break;
+
+ }
+
}
else if(checkprefix("Content-Encoding:", k->p) &&
- data->set.str[STRING_ENCODING]) {
+ (data->set.str[STRING_ENCODING] ||
+ conn->httpversion == 20)) {
/*
* Process Content-Encoding. Look for the values: identity,
* gzip, deflate, compress, x-gzip and x-compress. x-gzip and
@@ -3652,37 +3605,44 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
/* Record the content-encoding for later use */
if(checkprefix("identity", start))
- k->content_encoding = IDENTITY;
+ k->auto_decoding = IDENTITY;
else if(checkprefix("deflate", start))
- k->content_encoding = DEFLATE;
+ k->auto_decoding = DEFLATE;
else if(checkprefix("gzip", start)
|| checkprefix("x-gzip", start))
- k->content_encoding = GZIP;
+ k->auto_decoding = GZIP;
else if(checkprefix("compress", start)
|| checkprefix("x-compress", start))
- k->content_encoding = COMPRESS;
+ k->auto_decoding = COMPRESS;
}
else if(checkprefix("Content-Range:", k->p)) {
/* 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 */
- while(*ptr && !ISDIGIT(*ptr))
+ /* Move forward until first digit or asterisk */
+ while(*ptr && !ISDIGIT(*ptr) && *ptr != '*')
ptr++;
- k->offset = curlx_strtoofft(ptr, NULL, 10);
+ /* if it truly stopped on a digit */
+ if(ISDIGIT(*ptr)) {
+ k->offset = curlx_strtoofft(ptr, NULL, 10);
- if(data->state.resume_from == k->offset)
- /* we asked for a resume and we got it */
- k->content_range = TRUE;
+ if(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 !defined(CURL_DISABLE_COOKIES)
else if(data->cookies &&
@@ -3711,21 +3671,30 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
(401 == k->httpcode)) ||
(checkprefix("Proxy-authenticate:", k->p) &&
(407 == k->httpcode))) {
- result = Curl_http_input_auth(conn, k->httpcode, k->p);
+
+ bool proxy = (k->httpcode == 407) ? TRUE : FALSE;
+ char *auth = Curl_copy_header_value(k->p);
+ if(!auth)
+ return CURLE_OUT_OF_MEMORY;
+
+ result = Curl_http_input_auth(conn, proxy, auth);
+
+ free(auth);
+
if(result)
return result;
}
else if((k->httpcode >= 300 && k->httpcode < 400) &&
- checkprefix("Location:", k->p)) {
+ checkprefix("Location:", k->p) &&
+ !data->req.location) {
/* this is the URL that the server advises us to use instead */
char *location = Curl_copy_header_value(k->p);
- if (!location)
+ if(!location)
return CURLE_OUT_OF_MEMORY;
- if (!*location)
+ if(!*location)
/* ignore empty data */
free(location);
else {
- DEBUGASSERT(!data->req.location);
data->req.location = location;
if(data->set.http_follow_location) {
@@ -3736,19 +3705,18 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
/* some cases of POST and PUT etc needs to rewind the data
stream at this point */
- result = Curl_http_perhapsrewind(conn);
+ result = http_perhapsrewind(conn);
if(result)
return result;
}
}
}
-#ifndef CURL_DISABLE_RTSP
- else if(conn->protocol & PROT_RTSP) {
+ else if(conn->handler->protocol & CURLPROTO_RTSP) {
result = Curl_rtsp_parseheader(conn, k->p);
if(result)
return result;
}
-#endif
+
/*
* End of header-checks. Write them to the client.
*/
diff --git a/lib/http.h b/lib/http.h
index 3007c319..415be39e 100644
--- a/lib/http.h
+++ b/lib/http.h
@@ -1,6 +1,5 @@
-#ifndef __HTTP_H
-#define __HTTP_H
-
+#ifndef HEADER_CURL_HTTP_H
+#define HEADER_CURL_HTTP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -8,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,23 +21,31 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "curl_setup.h"
+
#ifndef CURL_DISABLE_HTTP
+#ifdef USE_NGHTTP2
+#include <nghttp2/nghttp2.h>
+#endif
+
extern const struct Curl_handler Curl_handler_http;
#ifdef USE_SSL
extern const struct Curl_handler Curl_handler_https;
#endif
+/* Header specific functions */
bool Curl_compareheader(const char *headerline, /* line to check */
const char *header, /* header keyword _with_ colon */
const char *content); /* content string to find */
-char *Curl_checkheaders(struct SessionHandle *data, const char *thisheader);
-
-char *Curl_copy_header_value(const char *h);
-
+char *Curl_checkheaders(const struct connectdata *conn,
+ const char *thisheader);
+char *Curl_copy_header_value(const char *header);
+char *Curl_checkProxyheaders(const struct connectdata *conn,
+ const char *thisheader);
/* ------------------------------------------------------------------------- */
/*
* The add_buffer series of functions are used to build one large memory chunk
@@ -53,6 +60,7 @@ struct Curl_send_buffer {
typedef struct Curl_send_buffer Curl_send_buffer;
Curl_send_buffer *Curl_add_buffer_init(void);
+void Curl_add_buffer_free(Curl_send_buffer *buff);
CURLcode Curl_add_bufferf(Curl_send_buffer *in, const char *fmt, ...);
CURLcode Curl_add_buffer(Curl_send_buffer *in, const void *inptr, size_t size);
CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
@@ -64,18 +72,14 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
CURLcode Curl_add_timecondition(struct SessionHandle *data,
Curl_send_buffer *buf);
CURLcode Curl_add_custom_headers(struct connectdata *conn,
- Curl_send_buffer *req_buffer);
-
-
-/* ftp can use this as well */
-CURLcode Curl_proxyCONNECT(struct connectdata *conn,
- int tunnelsocket,
- const char *hostname, unsigned short remote_port);
+ bool is_connect,
+ Curl_send_buffer *req_buffer);
/* protocol-specific functions set up to be called by the main engine */
CURLcode Curl_http(struct connectdata *conn, bool *done);
CURLcode Curl_http_done(struct connectdata *, CURLcode, bool premature);
CURLcode Curl_http_connect(struct connectdata *conn, bool *done);
+CURLcode Curl_http_setup_conn(struct connectdata *conn);
/* The following functions are defined in http_chunks.c */
void Curl_httpchunk_init(struct connectdata *conn);
@@ -84,13 +88,11 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap,
/* These functions are in http.c */
void Curl_http_auth_stage(struct SessionHandle *data, int stage);
-CURLcode Curl_http_input_auth(struct connectdata *conn,
- int httpcode, const char *header);
+CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy,
+ const char *auth);
CURLcode Curl_http_auth_act(struct connectdata *conn);
CURLcode Curl_http_perhapsrewind(struct connectdata *conn);
-int Curl_http_should_fail(struct connectdata *conn);
-
/* If only the PICKNONE bit is set, there has been a round-trip and we
selected to use no auth at all. Ie, we actively select no auth, as opposed
to not having one selected. The other CURLAUTH_* defines are present in the
@@ -151,6 +153,69 @@ struct HTTP {
void *send_buffer; /* used if the request couldn't be sent in one chunk,
points to an allocated send_buffer struct */
+
+#ifdef USE_NGHTTP2
+ /*********** for HTTP/2 we store stream-local data here *************/
+ int32_t stream_id; /* stream we are interested in */
+
+ bool bodystarted;
+ /* We store non-final and final response headers here, per-stream */
+ Curl_send_buffer *header_recvbuf;
+ size_t nread_header_recvbuf; /* number of bytes in header_recvbuf fed into
+ upper layer */
+ int status_code; /* HTTP status code */
+ const uint8_t *pausedata; /* pointer to data received in on_data_chunk */
+ size_t pauselen; /* the number of bytes left in data */
+ bool closed; /* TRUE on HTTP2 stream close */
+ uint32_t error_code; /* HTTP/2 error code */
+
+ char *mem; /* points to a buffer in memory to store received data */
+ size_t len; /* size of the buffer 'mem' points to */
+ size_t memlen; /* size of data copied to mem */
+
+ const uint8_t *upload_mem; /* points to a buffer to read from */
+ size_t upload_len; /* size of the buffer 'upload_mem' points to */
+ curl_off_t upload_left; /* number of bytes left to upload */
+#endif
+};
+
+typedef int (*sending)(void); /* Curl_send */
+typedef int (*recving)(void); /* Curl_recv */
+
+#ifdef USE_NGHTTP2
+/* h2 settings for this connection */
+struct h2settings {
+ uint32_t max_concurrent_streams;
+ bool enable_push;
+};
+#endif
+
+
+struct http_conn {
+#ifdef USE_NGHTTP2
+#define H2_BINSETTINGS_LEN 80
+ nghttp2_session *h2;
+ uint8_t binsettings[H2_BINSETTINGS_LEN];
+ size_t binlen; /* length of the binsettings data */
+ sending send_underlying; /* underlying send Curl_send callback */
+ recving recv_underlying; /* underlying recv Curl_recv callback */
+ char *inbuf; /* buffer to receive data from underlying socket */
+ size_t inbuflen; /* number of bytes filled in inbuf */
+ size_t nread_inbuf; /* number of bytes read from in inbuf */
+ /* We need separate buffer for transmission and reception because we
+ may call nghttp2_session_send() after the
+ nghttp2_session_mem_recv() but mem buffer is still not full. In
+ this case, we wrongly sends the content of mem buffer if we share
+ them for both cases. */
+ int32_t pause_stream_id; /* stream ID which paused
+ nghttp2_session_mem_recv */
+
+ /* this is a hash of all individual streams (SessionHandle structs) */
+ struct curl_hash streamsh;
+ struct h2settings settings;
+#else
+ int unused; /* prevent a compiler warning */
+#endif
};
CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
@@ -158,4 +223,26 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
ssize_t *nread,
bool *stop_reading);
-#endif
+/**
+ * Curl_http_output_auth() setups the authentication headers for the
+ * host/proxy and the correct authentication
+ * method. conn->data->state.authdone is set to TRUE when authentication is
+ * done.
+ *
+ * @param conn all information about the current connection
+ * @param request pointer to the request keyword
+ * @param path pointer to the requested path
+ * @param proxytunnel boolean if this is the request setting up a "proxy
+ * tunnel"
+ *
+ * @returns CURLcode
+ */
+CURLcode
+Curl_http_output_auth(struct connectdata *conn,
+ const char *request,
+ const char *path,
+ bool proxytunnel); /* TRUE if this is the request setting
+ up the proxy tunnel */
+
+#endif /* HEADER_CURL_HTTP_H */
+
diff --git a/lib/http2.c b/lib/http2.c
new file mode 100644
index 00000000..fa47d0ec
--- /dev/null
+++ b/lib/http2.c
@@ -0,0 +1,1343 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_NGHTTP2
+#include "curl_printf.h"
+#include <nghttp2/nghttp2.h>
+#include "urldata.h"
+#include "http2.h"
+#include "http.h"
+#include "sendf.h"
+#include "curl_base64.h"
+#include "rawstr.h"
+#include "multiif.h"
+#include "conncache.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#define MIN(x,y) ((x)<(y)?(x):(y))
+
+#if (NGHTTP2_VERSION_NUM < 0x000600)
+#error too old nghttp2 version, upgrade!
+#endif
+
+static int http2_perform_getsock(const struct connectdata *conn,
+ curl_socket_t *sock, /* points to
+ numsocks
+ number of
+ sockets */
+ int numsocks)
+{
+ const struct http_conn *c = &conn->proto.httpc;
+ int bitmap = GETSOCK_BLANK;
+ (void)numsocks;
+
+ /* TODO We should check underlying socket state if it is SSL socket
+ because of renegotiation. */
+ sock[0] = conn->sock[FIRSTSOCKET];
+
+ if(nghttp2_session_want_read(c->h2))
+ bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);
+
+ if(nghttp2_session_want_write(c->h2))
+ bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET);
+
+ return bitmap;
+}
+
+static int http2_getsock(struct connectdata *conn,
+ curl_socket_t *sock, /* points to numsocks
+ number of sockets */
+ int numsocks)
+{
+ return http2_perform_getsock(conn, sock, numsocks);
+}
+
+static CURLcode http2_disconnect(struct connectdata *conn,
+ bool dead_connection)
+{
+ struct http_conn *c = &conn->proto.httpc;
+ (void)dead_connection;
+
+ DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n"));
+
+ nghttp2_session_del(c->h2);
+ Curl_safefree(c->inbuf);
+ Curl_hash_destroy(&c->streamsh);
+
+ DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n"));
+
+ return CURLE_OK;
+}
+
+/* called from Curl_http_setup_conn */
+void Curl_http2_setup_conn(struct connectdata *conn)
+{
+ struct HTTP *http = conn->data->req.protop;
+
+ conn->proto.httpc.settings.max_concurrent_streams =
+ DEFAULT_MAX_CONCURRENT_STREAMS;
+
+ http->nread_header_recvbuf = 0;
+ http->bodystarted = FALSE;
+ http->status_code = -1;
+ http->pausedata = NULL;
+ http->pauselen = 0;
+ http->error_code = NGHTTP2_NO_ERROR;
+ http->closed = FALSE;
+
+ /* where to store incoming data for this stream and how big the buffer is */
+ http->mem = conn->data->state.buffer;
+ http->len = BUFSIZE;
+ http->memlen = 0;
+}
+
+/*
+ * HTTP2 handler interface. This isn't added to the general list of protocols
+ * but will be used at run-time when the protocol is dynamically switched from
+ * HTTP to HTTP2.
+ */
+const struct Curl_handler Curl_handler_http2 = {
+ "HTTP2", /* scheme */
+ ZERO_NULL, /* setup_connection */
+ Curl_http, /* do_it */
+ Curl_http_done, /* done */
+ ZERO_NULL, /* do_more */
+ ZERO_NULL, /* connect_it */
+ ZERO_NULL, /* connecting */
+ ZERO_NULL, /* doing */
+ http2_getsock, /* proto_getsock */
+ http2_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
+ http2_perform_getsock, /* perform_getsock */
+ http2_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
+ PORT_HTTP, /* defport */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
+};
+
+const struct Curl_handler Curl_handler_http2_ssl = {
+ "HTTP2", /* scheme */
+ ZERO_NULL, /* setup_connection */
+ Curl_http, /* do_it */
+ Curl_http_done, /* done */
+ ZERO_NULL, /* do_more */
+ ZERO_NULL, /* connect_it */
+ ZERO_NULL, /* connecting */
+ ZERO_NULL, /* doing */
+ http2_getsock, /* proto_getsock */
+ http2_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
+ http2_perform_getsock, /* perform_getsock */
+ http2_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
+ PORT_HTTP, /* defport */
+ CURLPROTO_HTTPS, /* protocol */
+ PROTOPT_SSL /* flags */
+};
+
+/*
+ * Store nghttp2 version info in this buffer, Prefix with a space. Return
+ * total length written.
+ */
+int Curl_http2_ver(char *p, size_t len)
+{
+ nghttp2_info *h2 = nghttp2_version(0);
+ return snprintf(p, len, " nghttp2/%s", h2->version_str);
+}
+
+/*
+ * The implementation of nghttp2_send_callback type. Here we write |data| with
+ * size |length| to the network and return the number of bytes actually
+ * written. See the documentation of nghttp2_send_callback for the details.
+ */
+static ssize_t send_callback(nghttp2_session *h2,
+ const uint8_t *data, size_t length, int flags,
+ void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ struct http_conn *c = &conn->proto.httpc;
+ ssize_t written;
+ CURLcode result = CURLE_OK;
+
+ (void)h2;
+ (void)flags;
+
+ written = ((Curl_send*)c->send_underlying)(conn, FIRSTSOCKET,
+ data, length, &result);
+
+ if(result == CURLE_AGAIN) {
+ return NGHTTP2_ERR_WOULDBLOCK;
+ }
+
+ if(written == -1) {
+ failf(conn->data, "Failed sending HTTP2 data");
+ return NGHTTP2_ERR_CALLBACK_FAILURE;
+ }
+
+ if(!written)
+ return NGHTTP2_ERR_WOULDBLOCK;
+
+ return written;
+}
+
+static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
+ void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ struct http_conn *httpc = &conn->proto.httpc;
+ struct SessionHandle *data_s = NULL;
+ struct HTTP *stream = NULL;
+ int rv;
+ size_t left, ncopy;
+ int32_t stream_id = frame->hd.stream_id;
+
+ (void)session;
+ (void)frame;
+ DEBUGF(infof(conn->data, "on_frame_recv() header %x stream %x\n",
+ frame->hd.type, stream_id));
+
+ if(stream_id) {
+ /* get the stream from the hash based on Stream ID, stream ID zero is for
+ connection-oriented stuff */
+ data_s = Curl_hash_pick(&httpc->streamsh, &stream_id,
+ sizeof(stream_id));
+ if(!data_s) {
+ /* Receiving a Stream ID not in the hash should not happen, this is an
+ internal error more than anything else! */
+ failf(conn->data, "Received frame on Stream ID: %x not in stream hash!",
+ stream_id);
+ return NGHTTP2_ERR_CALLBACK_FAILURE;
+ }
+ stream = data_s->req.protop;
+ }
+ else
+ /* we do nothing on stream zero */
+ return 0;
+
+ switch(frame->hd.type) {
+ case NGHTTP2_DATA:
+ /* If body started on this stream, then receiving DATA is illegal. */
+ if(!stream->bodystarted) {
+ rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE,
+ 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(stream->bodystarted) {
+ /* Only valid HEADERS after body started is trailer HEADERS. We
+ ignores trailer HEADERS for now. nghttp2 guarantees that it
+ has END_STREAM flag set. */
+ break;
+ }
+
+ /* nghttp2 guarantees that :status is received, and we store it to
+ stream->status_code */
+ DEBUGASSERT(stream->status_code != -1);
+
+ /* Only final status code signals the end of header */
+ if(stream->status_code / 100 != 1) {
+ stream->bodystarted = TRUE;
+ stream->status_code = -1;
+ }
+
+ Curl_add_buffer(stream->header_recvbuf, "\r\n", 2);
+
+ left = stream->header_recvbuf->size_used - stream->nread_header_recvbuf;
+ ncopy = MIN(stream->len, left);
+
+ memcpy(&stream->mem[stream->memlen],
+ stream->header_recvbuf->buffer + stream->nread_header_recvbuf,
+ ncopy);
+ stream->nread_header_recvbuf += ncopy;
+
+ DEBUGF(infof(data_s, "Store %zu bytes headers from stream %u at %p\n",
+ ncopy, stream_id, stream->mem));
+
+ stream->len -= ncopy;
+ stream->memlen += ncopy;
+
+ data_s->state.drain++;
+ Curl_expire(data_s, 1);
+ break;
+ case NGHTTP2_PUSH_PROMISE:
+ DEBUGF(infof(data_s, "Got PUSH_PROMISE, RST_STREAM it!\n"));
+ rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE,
+ frame->push_promise.promised_stream_id,
+ NGHTTP2_CANCEL);
+ if(nghttp2_is_fatal(rv)) {
+ return rv;
+ }
+ break;
+ case NGHTTP2_SETTINGS:
+ {
+ uint32_t max_conn = httpc->settings.max_concurrent_streams;
+ DEBUGF(infof(conn->data, "Got SETTINGS for stream %u!\n", stream_id));
+ httpc->settings.max_concurrent_streams =
+ nghttp2_session_get_remote_settings(
+ session, NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS);
+ httpc->settings.enable_push =
+ nghttp2_session_get_remote_settings(
+ session, NGHTTP2_SETTINGS_ENABLE_PUSH);
+ DEBUGF(infof(conn->data, "MAX_CONCURRENT_STREAMS == %d\n",
+ httpc->settings.max_concurrent_streams));
+ DEBUGF(infof(conn->data, "ENABLE_PUSH == %s\n",
+ httpc->settings.enable_push?"TRUE":"false"));
+ if(max_conn != httpc->settings.max_concurrent_streams) {
+ /* only signal change if the value actually changed */
+ infof(conn->data,
+ "Connection state changed (MAX_CONCURRENT_STREAMS updated)!\n");
+ Curl_multi_connchanged(conn->data->multi);
+ }
+ }
+ break;
+ default:
+ DEBUGF(infof(conn->data, "Got frame type %x for stream %u!\n",
+ frame->hd.type, stream_id));
+ break;
+ }
+ return 0;
+}
+
+static int on_invalid_frame_recv(nghttp2_session *session,
+ const nghttp2_frame *frame,
+ int lib_error_code, void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ (void)session;
+ (void)frame;
+ DEBUGF(infof(conn->data,
+ "on_invalid_frame_recv() was called, error=%d:%s\n",
+ lib_error_code, nghttp2_strerror(lib_error_code)));
+ return 0;
+}
+
+static int on_data_chunk_recv(nghttp2_session *session, uint8_t flags,
+ int32_t stream_id,
+ const uint8_t *data, size_t len, void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ struct HTTP *stream;
+ struct SessionHandle *data_s;
+ size_t nread;
+ (void)session;
+ (void)flags;
+ (void)data;
+ DEBUGF(infof(conn->data, "on_data_chunk_recv() "
+ "len = %u, stream %u\n", len, stream_id));
+
+ DEBUGASSERT(stream_id); /* should never be a zero stream ID here */
+
+ /* get the stream from the hash based on Stream ID */
+ data_s = Curl_hash_pick(&conn->proto.httpc.streamsh, &stream_id,
+ sizeof(stream_id));
+ if(!data_s) {
+ /* Receiving a Stream ID not in the hash should not happen, this is an
+ internal error more than anything else! */
+ failf(conn->data, "Received frame on Stream ID: %x not in stream hash!",
+ stream_id);
+ return NGHTTP2_ERR_CALLBACK_FAILURE;
+ }
+ stream = data_s->req.protop;
+
+ nread = MIN(stream->len, len);
+ memcpy(&stream->mem[stream->memlen], data, nread);
+
+ stream->len -= nread;
+ stream->memlen += nread;
+
+ data_s->state.drain++;
+ Curl_expire(data_s, 1); /* TODO: fix so that this can be set to 0 for
+ immediately? */
+
+ DEBUGF(infof(data_s, "%zu data received for stream %u "
+ "(%zu left in buffer %p, total %zu)\n",
+ nread, stream_id,
+ stream->len, stream->mem,
+ stream->memlen));
+
+ if(nread < len) {
+ stream->pausedata = data + nread;
+ stream->pauselen = len - nread;
+ DEBUGF(infof(data_s, "NGHTTP2_ERR_PAUSE - %zu bytes out of buffer"
+ ", stream %u\n",
+ len - nread, stream_id));
+ conn->proto.httpc.pause_stream_id = stream_id;
+ return NGHTTP2_ERR_PAUSE;
+ }
+ return 0;
+}
+
+static int before_frame_send(nghttp2_session *session,
+ const nghttp2_frame *frame,
+ void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ (void)session;
+ (void)frame;
+ DEBUGF(infof(conn->data, "before_frame_send() was called\n"));
+ return 0;
+}
+static int on_frame_send(nghttp2_session *session,
+ const nghttp2_frame *frame,
+ void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ (void)session;
+ (void)frame;
+ DEBUGF(infof(conn->data, "on_frame_send() was called, length = %zd\n",
+ frame->hd.length));
+ return 0;
+}
+static int on_frame_not_send(nghttp2_session *session,
+ const nghttp2_frame *frame,
+ int lib_error_code, void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ (void)session;
+ (void)frame;
+ DEBUGF(infof(conn->data,
+ "on_frame_not_send() was called, lib_error_code = %d\n",
+ lib_error_code));
+ return 0;
+}
+static int on_stream_close(nghttp2_session *session, int32_t stream_id,
+ uint32_t error_code, void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ struct SessionHandle *data_s;
+ struct HTTP *stream;
+ (void)session;
+ (void)stream_id;
+ DEBUGF(infof(conn->data, "on_stream_close(), error_code = %d, stream %u\n",
+ error_code, stream_id));
+
+ if(stream_id) {
+ /* get the stream from the hash based on Stream ID, stream ID zero is for
+ connection-oriented stuff */
+ data_s = Curl_hash_pick(&conn->proto.httpc.streamsh, &stream_id,
+ sizeof(stream_id));
+ if(!data_s) {
+ /* We could get stream ID not in the hash. For example, if we
+ decided to reject stream (e.g., PUSH_PROMISE). We call infof
+ as a debugging purpose for now. */
+ infof(conn->data,
+ "Received frame on Stream ID: %x not in stream hash!\n",
+ stream_id);
+ return 0;
+ }
+ stream = data_s->req.protop;
+
+ stream->error_code = error_code;
+ stream->closed = TRUE;
+
+ /* remove the entry from the hash as the stream is now gone */
+ Curl_hash_delete(&conn->proto.httpc.streamsh,
+ &stream_id, sizeof(stream_id));
+ DEBUGF(infof(conn->data, "Removed stream %u hash!\n", stream_id));
+ }
+ return 0;
+}
+
+static int on_begin_headers(nghttp2_session *session,
+ const nghttp2_frame *frame, void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ (void)session;
+ (void)frame;
+ DEBUGF(infof(conn->data, "on_begin_headers() was called\n"));
+ 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;
+}
+
+/* frame->hd.type is either NGHTTP2_HEADERS or NGHTTP2_PUSH_PROMISE */
+static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
+ const uint8_t *name, size_t namelen,
+ const uint8_t *value, size_t valuelen,
+ uint8_t flags,
+ void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ struct HTTP *stream;
+ struct SessionHandle *data_s;
+ int32_t stream_id = frame->hd.stream_id;
+
+ (void)session;
+ (void)frame;
+ (void)flags;
+
+ /* Ignore PUSH_PROMISE for now */
+ if(frame->hd.type != NGHTTP2_HEADERS) {
+ return 0;
+ }
+
+ DEBUGASSERT(stream_id); /* should never be a zero stream ID here */
+
+ /* get the stream from the hash based on Stream ID */
+ data_s = Curl_hash_pick(&conn->proto.httpc.streamsh, &stream_id,
+ sizeof(stream_id));
+ if(!data_s) {
+ /* Receiving a Stream ID not in the hash should not happen, this is an
+ internal error more than anything else! */
+ failf(conn->data, "Received frame on Stream ID: %x not in stream hash!",
+ stream_id);
+ return NGHTTP2_ERR_CALLBACK_FAILURE;
+ }
+ stream = data_s->req.protop;
+
+ if(stream->bodystarted)
+ /* Ignore trailer or HEADERS not mapped to HTTP semantics. The
+ consequence is handled in on_frame_recv(). */
+ return 0;
+
+ if(namelen == sizeof(":status") - 1 &&
+ memcmp(":status", name, namelen) == 0) {
+ /* nghttp2 guarantees :status is received first and only once, and
+ value is 3 digits status code, and decode_status_code always
+ succeeds. */
+ stream->status_code = decode_status_code(value, valuelen);
+ DEBUGASSERT(stream->status_code != -1);
+
+ Curl_add_buffer(stream->header_recvbuf, "HTTP/2.0 ", 9);
+ Curl_add_buffer(stream->header_recvbuf, value, valuelen);
+ Curl_add_buffer(stream->header_recvbuf, "\r\n", 2);
+ data_s->state.drain++;
+ Curl_expire(data_s, 1);
+
+ DEBUGF(infof(data_s, "h2 status: HTTP/2 %03d\n",
+ stream->status_code));
+ return 0;
+ }
+
+ /* nghttp2 guarantees that namelen > 0, and :status was already
+ received, and this is not pseudo-header field . */
+ /* convert to a HTTP1-style header */
+ Curl_add_buffer(stream->header_recvbuf, name, namelen);
+ Curl_add_buffer(stream->header_recvbuf, ":", 1);
+ Curl_add_buffer(stream->header_recvbuf, value, valuelen);
+ Curl_add_buffer(stream->header_recvbuf, "\r\n", 2);
+ data_s->state.drain++;
+ Curl_expire(data_s, 1);
+
+ DEBUGF(infof(data_s, "h2 header: %.*s: %.*s\n", namelen, name, valuelen,
+ value));
+
+ return 0; /* 0 is successful */
+}
+
+static ssize_t data_source_read_callback(nghttp2_session *session,
+ int32_t stream_id,
+ uint8_t *buf, size_t length,
+ uint32_t *data_flags,
+ nghttp2_data_source *source,
+ void *userp)
+{
+ struct connectdata *conn = (struct connectdata *)userp;
+ struct http_conn *c = &conn->proto.httpc;
+ struct SessionHandle *data_s;
+ struct HTTP *stream = NULL;
+ size_t nread;
+ (void)session;
+ (void)stream_id;
+ (void)source;
+
+ if(stream_id) {
+ /* get the stream from the hash based on Stream ID, stream ID zero is for
+ connection-oriented stuff */
+ data_s = Curl_hash_pick(&c->streamsh, &stream_id, sizeof(stream_id));
+ if(!data_s) {
+ /* Receiving a Stream ID not in the hash should not happen, this is an
+ internal error more than anything else! */
+ failf(conn->data, "Asked for data to stream %u not in hash!", stream_id);
+ return NGHTTP2_ERR_CALLBACK_FAILURE;
+ }
+ stream = data_s->req.protop;
+ }
+ else {
+ failf(conn->data, "nghttp2 confusion");
+ return NGHTTP2_ERR_INVALID_ARGUMENT;
+ }
+
+ nread = MIN(stream->upload_len, length);
+ if(nread > 0) {
+ memcpy(buf, stream->upload_mem, nread);
+ stream->upload_mem += nread;
+ stream->upload_len -= nread;
+ stream->upload_left -= nread;
+ }
+
+ if(stream->upload_left == 0)
+ *data_flags = 1;
+ else if(nread == 0)
+ return NGHTTP2_ERR_DEFERRED;
+
+ DEBUGF(infof(data_s, "data_source_read_callback: "
+ "returns %zu bytes stream %u\n",
+ nread, stream_id));
+
+ return nread;
+}
+
+/*
+ * The HTTP2 settings we send in the Upgrade request
+ */
+static nghttp2_settings_entry settings[] = {
+ { NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 100 },
+ { NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, NGHTTP2_INITIAL_WINDOW_SIZE },
+};
+
+#define H2_BUFSIZE 32768
+
+static void freestreamentry(void *freethis)
+{
+ (void)freethis;
+}
+
+/*
+ * Initialize nghttp2 for a Curl connection
+ */
+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);
+
+ if(rc) {
+ failf(conn->data, "Couldn't initialize nghttp2!");
+ return CURLE_OUT_OF_MEMORY; /* most likely at least */
+ }
+
+ rc = Curl_hash_init(&conn->proto.httpc.streamsh, 7, Curl_hash_str,
+ Curl_str_key_compare, freestreamentry);
+ if(rc) {
+ failf(conn->data, "Couldn't init stream hash!");
+ return CURLE_OUT_OF_MEMORY; /* most likely at least */
+ }
+ }
+ return CURLE_OK;
+}
+
+/*
+ * Send a request using http2
+ */
+CURLcode Curl_http2_send_request(struct connectdata *conn)
+{
+ (void)conn;
+ return CURLE_OK;
+}
+
+/*
+ * Append headers to ask for a HTTP1.1 to HTTP2 upgrade.
+ */
+CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req,
+ struct connectdata *conn)
+{
+ CURLcode result;
+ ssize_t binlen;
+ char *base64;
+ size_t blen;
+ struct SingleRequest *k = &conn->data->req;
+ uint8_t *binsettings = conn->proto.httpc.binsettings;
+
+ /* As long as we have a fixed set of settings, we don't have to dynamically
+ * figure out the base64 strings since it'll always be the same. However,
+ * the settings will likely not be fixed every time in the future.
+ */
+
+ /* this returns number of bytes it wrote */
+ binlen = nghttp2_pack_settings_payload(binsettings, H2_BINSETTINGS_LEN,
+ settings,
+ sizeof(settings)/sizeof(settings[0]));
+ if(!binlen) {
+ failf(conn->data, "nghttp2 unexpectedly failed on pack_settings_payload");
+ return CURLE_FAILED_INIT;
+ }
+ conn->proto.httpc.binlen = binlen;
+
+ result = Curl_base64url_encode(conn->data, (const char *)binsettings, binlen,
+ &base64, &blen);
+ if(result)
+ return result;
+
+ result = Curl_add_bufferf(req,
+ "Connection: Upgrade, HTTP2-Settings\r\n"
+ "Upgrade: %s\r\n"
+ "HTTP2-Settings: %s\r\n",
+ NGHTTP2_CLEARTEXT_PROTO_VERSION_ID, base64);
+ free(base64);
+
+ k->upgr101 = UPGR101_REQUESTED;
+
+ return result;
+}
+
+static ssize_t http2_handle_stream_close(struct http_conn *httpc,
+ struct SessionHandle *data,
+ struct HTTP *stream, CURLcode *err) {
+ if(httpc->pause_stream_id == stream->stream_id) {
+ httpc->pause_stream_id = 0;
+ }
+ /* Reset to FALSE to prevent infinite loop in readwrite_data
+ function. */
+ stream->closed = FALSE;
+ if(stream->error_code != NGHTTP2_NO_ERROR) {
+ failf(data, "HTTP/2 stream %u was not closed cleanly: error_code = %d",
+ stream->stream_id, stream->error_code);
+ *err = CURLE_HTTP2;
+ return -1;
+ }
+ DEBUGF(infof(data, "http2_recv returns 0, http2_handle_stream_close\n"));
+ return 0;
+}
+
+/*
+ * If the read would block (EWOULDBLOCK) we return -1. Otherwise we return
+ * a regular CURLcode value.
+ */
+static ssize_t http2_recv(struct connectdata *conn, int sockindex,
+ char *mem, size_t len, CURLcode *err)
+{
+ CURLcode result = CURLE_OK;
+ ssize_t rv;
+ ssize_t nread;
+ struct http_conn *httpc = &conn->proto.httpc;
+ struct SessionHandle *data = conn->data;
+ struct HTTP *stream = data->req.protop;
+
+ (void)sockindex; /* we always do HTTP2 on sockindex 0 */
+
+ /* If stream is closed, return 0 to signal the http routine to close
+ the connection. We need to handle stream closure here,
+ otherwise, we may be going to read from underlying connection,
+ and gets EAGAIN, and we will get stuck there. */
+ if(stream->memlen == 0 && stream->closed) {
+ return http2_handle_stream_close(httpc, data, stream, err);
+ }
+
+ /* Nullify here because we call nghttp2_session_send() and they
+ might refer to the old buffer. */
+ stream->upload_mem = NULL;
+ stream->upload_len = 0;
+
+ /*
+ * At this point 'stream' is just in the SessionHandle the connection
+ * identifies as its owner at this time.
+ */
+
+ if(stream->bodystarted &&
+ stream->nread_header_recvbuf < stream->header_recvbuf->size_used) {
+ /* If there is body data pending for this stream to return, do that */
+ size_t left =
+ stream->header_recvbuf->size_used - stream->nread_header_recvbuf;
+ size_t ncopy = MIN(len, left);
+ memcpy(mem, stream->header_recvbuf->buffer + stream->nread_header_recvbuf,
+ ncopy);
+ stream->nread_header_recvbuf += ncopy;
+
+ infof(data, "http2_recv: Got %d bytes from header_recvbuf\n",
+ (int)ncopy);
+ return ncopy;
+ }
+
+ infof(data, "http2_recv: %d bytes buffer at %p (stream %u)\n",
+ len, mem, stream->stream_id);
+
+ if((data->state.drain) && stream->memlen) {
+ DEBUGF(infof(data, "http2_recv: DRAIN %zu bytes stream %u!! (%p => %p)\n",
+ stream->memlen, stream->stream_id,
+ stream->mem, mem));
+ if(mem != stream->mem) {
+ /* if we didn't get the same buffer this time, we must move the data to
+ the beginning */
+ memmove(mem, stream->mem, stream->memlen);
+ stream->len = len - stream->memlen;
+ stream->mem = mem;
+ }
+ }
+ else if(stream->pausedata) {
+ nread = MIN(len, stream->pauselen);
+ memcpy(mem, stream->pausedata, nread);
+
+ stream->pausedata += nread;
+ stream->pauselen -= nread;
+
+ infof(data, "%zu data bytes written\n", nread);
+ if(stream->pauselen == 0) {
+ DEBUGF(infof(data, "Unpaused by stream %u\n", stream->stream_id));
+ assert(httpc->pause_stream_id == stream->stream_id);
+ httpc->pause_stream_id = 0;
+
+ stream->pausedata = NULL;
+ stream->pauselen = 0;
+ }
+ infof(data, "http2_recv: returns unpaused %zd bytes on stream %u\n",
+ nread, stream->stream_id);
+ return nread;
+ }
+ else if(httpc->pause_stream_id) {
+ /* If a stream paused nghttp2_session_mem_recv previously, and has
+ not processed all data, it still refers to the buffer in
+ nghttp2_session. If we call nghttp2_session_mem_recv(), we may
+ overwrite that buffer. To avoid that situation, just return
+ here with CURLE_AGAIN. This could be busy loop since data in
+ socket is not read. But it seems that usually streams are
+ notified with its drain property, and socket is read again
+ quickly. */
+ *err = CURLE_AGAIN;
+ return -1;
+ }
+ else {
+ char *inbuf;
+ /* remember where to store incoming data for this stream and how big the
+ buffer is */
+ stream->mem = mem;
+ stream->len = len;
+ stream->memlen = 0;
+
+ if(httpc->inbuflen == 0) {
+ nread = ((Curl_recv *)httpc->recv_underlying)(
+ conn, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, &result);
+
+ if(result == CURLE_AGAIN) {
+ *err = result;
+ return -1;
+ }
+
+ if(nread == -1) {
+ failf(data, "Failed receiving HTTP2 data");
+ *err = result;
+ return 0;
+ }
+
+ if(nread == 0) {
+ failf(data, "Unexpected EOF");
+ *err = CURLE_RECV_ERROR;
+ return -1;
+ }
+
+ DEBUGF(infof(data, "nread=%zd\n", nread));
+
+ httpc->inbuflen = nread;
+ inbuf = httpc->inbuf;
+ }
+ else {
+ nread = httpc->inbuflen - httpc->nread_inbuf;
+ inbuf = httpc->inbuf + httpc->nread_inbuf;
+
+ DEBUGF(infof(data, "Use data left in connection buffer, nread=%zd\n",
+ nread));
+ }
+ rv = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)inbuf, nread);
+
+ if(nghttp2_is_fatal((int)rv)) {
+ failf(data, "nghttp2_session_mem_recv() returned %d:%s\n",
+ rv, nghttp2_strerror((int)rv));
+ *err = CURLE_RECV_ERROR;
+ return 0;
+ }
+ DEBUGF(infof(data, "nghttp2_session_mem_recv() returns %zd\n", rv));
+ if(nread == rv) {
+ DEBUGF(infof(data, "All data in connection buffer processed\n"));
+ httpc->inbuflen = 0;
+ httpc->nread_inbuf = 0;
+ }
+ else {
+ httpc->nread_inbuf += rv;
+ DEBUGF(infof(data, "%zu bytes left in connection buffer\n",
+ httpc->inbuflen - httpc->nread_inbuf));
+ }
+ /* Always send pending frames in nghttp2 session, because
+ nghttp2_session_mem_recv() may queue new frame */
+ rv = nghttp2_session_send(httpc->h2);
+ if(rv != 0) {
+ *err = CURLE_SEND_ERROR;
+ return 0;
+ }
+ }
+ if(stream->memlen) {
+ ssize_t retlen = stream->memlen;
+ infof(data, "http2_recv: returns %zd for stream %u\n",
+ retlen, stream->stream_id);
+ stream->memlen = 0;
+
+ if(httpc->pause_stream_id == stream->stream_id) {
+ /* data for this stream is returned now, but this stream caused a pause
+ already so we need it called again asap */
+ DEBUGF(infof(data, "Data returned for PAUSED stream %u\n",
+ stream->stream_id));
+ }
+ else
+ data->state.drain = 0; /* this stream is hereby drained */
+
+ return retlen;
+ }
+ /* If stream is closed, return 0 to signal the http routine to close
+ the connection */
+ if(stream->closed) {
+ return http2_handle_stream_close(httpc, data, stream, err);
+ }
+ *err = CURLE_AGAIN;
+ DEBUGF(infof(data, "http2_recv returns AGAIN for stream %u\n",
+ stream->stream_id));
+ 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)
+{
+ /*
+ * BIG TODO: Currently, we send request in this function, but this
+ * function is also used to send request body. It would be nice to
+ * add dedicated function for request.
+ */
+ int rv;
+ struct http_conn *httpc = &conn->proto.httpc;
+ struct HTTP *stream = conn->data->req.protop;
+ nghttp2_nv *nva;
+ size_t nheader;
+ size_t i;
+ size_t authority_idx;
+ char *hdbuf = (char*)mem;
+ char *end;
+ nghttp2_data_provider data_prd;
+ int32_t stream_id;
+ nghttp2_session *h2 = httpc->h2;
+
+ (void)sockindex;
+
+ DEBUGF(infof(conn->data, "http2_send len=%zu\n", len));
+
+ if(stream->stream_id != -1) {
+ /* If stream_id != -1, we have dispatched request HEADERS, and now
+ are going to send or sending request body in DATA frame */
+ stream->upload_mem = mem;
+ stream->upload_len = len;
+ nghttp2_session_resume_data(h2, stream->stream_id);
+ rv = nghttp2_session_send(h2);
+ if(nghttp2_is_fatal(rv)) {
+ *err = CURLE_SEND_ERROR;
+ return -1;
+ }
+ len -= stream->upload_len;
+
+ /* Nullify here because we call nghttp2_session_send() and they
+ might refer to the old buffer. */
+ stream->upload_mem = NULL;
+ stream->upload_len = 0;
+
+ if(stream->upload_left) {
+ /* we are sure that we have more data to send here. Calling the
+ following API will make nghttp2_session_want_write() return
+ nonzero if remote window allows it, which then libcurl checks
+ socket is writable or not. See http2_perform_getsock(). */
+ nghttp2_session_resume_data(h2, stream->stream_id);
+ }
+
+ DEBUGF(infof(conn->data, "http2_send returns %zu for stream %u\n", len,
+ stream->stream_id));
+ return len;
+ }
+
+ /* Calculate number of headers contained in [mem, mem + len) */
+ /* Here, we assume the curl http code generate *correct* HTTP header
+ field block */
+ nheader = 0;
+ for(i = 0; i < len; ++i) {
+ if(hdbuf[i] == 0x0a) {
+ ++nheader;
+ }
+ }
+ /* We counted additional 2 \n in the first and last line. We need 3
+ new headers: :method, :path and :scheme. Therefore we need one
+ more space. */
+ nheader += 1;
+ nva = malloc(sizeof(nghttp2_nv) * nheader);
+ if(nva == NULL) {
+ *err = CURLE_OUT_OF_MEMORY;
+ return -1;
+ }
+ /* Extract :method, :path from request line */
+ end = strchr(hdbuf, ' ');
+ nva[0].name = (unsigned char *)":method";
+ nva[0].namelen = (uint16_t)strlen((char *)nva[0].name);
+ nva[0].value = (unsigned char *)hdbuf;
+ nva[0].valuelen = (uint16_t)(end - hdbuf);
+ nva[0].flags = NGHTTP2_NV_FLAG_NONE;
+
+ hdbuf = end + 1;
+
+ end = strchr(hdbuf, ' ');
+ nva[1].name = (unsigned char *)":path";
+ nva[1].namelen = (uint16_t)strlen((char *)nva[1].name);
+ nva[1].value = (unsigned char *)hdbuf;
+ nva[1].valuelen = (uint16_t)(end - hdbuf);
+ nva[1].flags = NGHTTP2_NV_FLAG_NONE;
+
+ nva[2].name = (unsigned char *)":scheme";
+ nva[2].namelen = (uint16_t)strlen((char *)nva[2].name);
+ if(conn->handler->flags & PROTOPT_SSL)
+ nva[2].value = (unsigned char *)"https";
+ else
+ nva[2].value = (unsigned char *)"http";
+ nva[2].valuelen = (uint16_t)strlen((char *)nva[2].value);
+ nva[2].flags = NGHTTP2_NV_FLAG_NONE;
+
+ 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);
+ }
+ else {
+ nva[i].name = (unsigned char *)hdbuf;
+ nva[i].namelen = (uint16_t)(end - hdbuf);
+ }
+ hdbuf = end + 1;
+ for(; *hdbuf == ' '; ++hdbuf);
+ end = strchr(hdbuf, 0x0d);
+ assert(end);
+ nva[i].value = (unsigned char *)hdbuf;
+ nva[i].valuelen = (uint16_t)(end - hdbuf);
+ nva[i].flags = NGHTTP2_NV_FLAG_NONE;
+
+ hdbuf = end + 2;
+ /* Inspect Content-Length header field and retrieve the request
+ entity length so that we can set END_STREAM to the last DATA
+ frame. */
+ if(nva[i].namelen == 14 &&
+ Curl_raw_nequal("content-length", (char*)nva[i].name, 14)) {
+ size_t j;
+ stream->upload_left = 0;
+ for(j = 0; j < nva[i].valuelen; ++j) {
+ stream->upload_left *= 10;
+ stream->upload_left += nva[i].value[j] - '0';
+ }
+ DEBUGF(infof(conn->data,
+ "request content-length=%"
+ CURL_FORMAT_CURL_OFF_T
+ "\n", stream->upload_left));
+ }
+ }
+
+ /* :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:
+ case HTTPREQ_PUT:
+ data_prd.read_callback = data_source_read_callback;
+ data_prd.source.ptr = NULL;
+ stream_id = nghttp2_submit_request(h2, NULL, nva, nheader,
+ &data_prd, NULL);
+ break;
+ default:
+ stream_id = nghttp2_submit_request(h2, NULL, nva, nheader,
+ NULL, NULL);
+ }
+
+ free(nva);
+
+ if(stream_id < 0) {
+ DEBUGF(infof(conn->data, "http2_send() send error\n"));
+ *err = CURLE_SEND_ERROR;
+ return -1;
+ }
+
+ infof(conn->data, "Using Stream ID: %x (easy handle %p)\n",
+ stream_id, conn->data);
+ stream->stream_id = stream_id;
+
+ /* put the SessionHandle in the hash with the stream_id as key */
+ if(!Curl_hash_add(&httpc->streamsh, &stream->stream_id, sizeof(stream_id),
+ conn->data)) {
+ failf(conn->data, "Couldn't add stream to hash!");
+ *err = CURLE_OUT_OF_MEMORY;
+ return -1;
+ }
+
+ rv = nghttp2_session_send(h2);
+
+ if(rv != 0) {
+ *err = CURLE_SEND_ERROR;
+ return -1;
+ }
+
+ if(stream->stream_id != -1) {
+ /* If whole HEADERS frame was sent off to the underlying socket,
+ the nghttp2 library calls data_source_read_callback. But only
+ it found that no data available, so it deferred the DATA
+ transmission. Which means that nghttp2_session_want_write()
+ returns 0 on http2_perform_getsock(), which results that no
+ writable socket check is performed. To workaround this, we
+ issue nghttp2_session_resume_data() here to bring back DATA
+ transmission from deferred state. */
+ nghttp2_session_resume_data(h2, stream->stream_id);
+ }
+
+ return len;
+}
+
+CURLcode Curl_http2_setup(struct connectdata *conn)
+{
+ CURLcode result;
+ struct http_conn *httpc = &conn->proto.httpc;
+ struct HTTP *stream = conn->data->req.protop;
+
+ stream->stream_id = -1;
+
+ if(!stream->header_recvbuf)
+ stream->header_recvbuf = Curl_add_buffer_init();
+
+ if((conn->handler == &Curl_handler_http2_ssl) ||
+ (conn->handler == &Curl_handler_http2))
+ return CURLE_OK; /* already done */
+
+ if(conn->handler->flags & PROTOPT_SSL)
+ conn->handler = &Curl_handler_http2_ssl;
+ else
+ conn->handler = &Curl_handler_http2;
+
+ result = Curl_http2_init(conn);
+ if(result)
+ return result;
+
+ infof(conn->data, "Using HTTP2, server supports multi-use\n");
+ stream->upload_left = 0;
+ stream->upload_mem = NULL;
+ stream->upload_len = 0;
+
+ httpc->inbuflen = 0;
+ httpc->nread_inbuf = 0;
+
+ httpc->pause_stream_id = 0;
+
+ conn->bits.multiplex = TRUE; /* at least potentially multiplexed */
+ conn->httpversion = 20;
+ conn->bundle->multiuse = BUNDLE_MULTIPLEX;
+
+ infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n");
+ Curl_multi_connchanged(conn->data->multi);
+
+ return CURLE_OK;
+}
+
+CURLcode Curl_http2_switched(struct connectdata *conn,
+ const char *mem, size_t nread)
+{
+ CURLcode result;
+ struct http_conn *httpc = &conn->proto.httpc;
+ int rv;
+ ssize_t nproc;
+ struct SessionHandle *data = conn->data;
+ struct HTTP *stream = conn->data->req.protop;
+
+ result = Curl_http2_setup(conn);
+ if(result)
+ return result;
+
+ httpc->recv_underlying = (recving)conn->recv[FIRSTSOCKET];
+ httpc->send_underlying = (sending)conn->send[FIRSTSOCKET];
+ conn->recv[FIRSTSOCKET] = http2_recv;
+ conn->send[FIRSTSOCKET] = http2_send;
+
+ if(conn->data->req.upgr101 == UPGR101_RECEIVED) {
+ /* stream 1 is opened implicitly on upgrade */
+ stream->stream_id = 1;
+ /* queue SETTINGS frame (again) */
+ rv = nghttp2_session_upgrade(httpc->h2, httpc->binsettings,
+ httpc->binlen, NULL);
+ if(rv != 0) {
+ failf(data, "nghttp2_session_upgrade() failed: %s(%d)",
+ nghttp2_strerror(rv), rv);
+ return CURLE_HTTP2;
+ }
+
+ /* put the SessionHandle in the hash with the stream->stream_id as key */
+ if(!Curl_hash_add(&httpc->streamsh, &stream->stream_id,
+ sizeof(stream->stream_id), conn->data)) {
+ failf(conn->data, "Couldn't add stream to hash!");
+ return CURLE_OUT_OF_MEMORY;
+ }
+ }
+ else {
+ /* stream ID is unknown at this point */
+ stream->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)",
+ nghttp2_strerror(rv), rv);
+ return CURLE_HTTP2;
+ }
+ }
+
+ /* we are going to copy mem to httpc->inbuf. This is required since
+ mem is part of buffer pointed by stream->mem, and callbacks
+ called by nghttp2_session_mem_recv() will write stream specific
+ data into stream->mem, overwriting data already there. */
+ if(H2_BUFSIZE < nread) {
+ failf(data, "connection buffer size is too small to store data following "
+ "HTTP Upgrade response header: buflen=%zu, datalen=%zu",
+ H2_BUFSIZE, nread);
+ return CURLE_HTTP2;
+ }
+
+ infof(conn->data, "Copying HTTP/2 data in stream buffer to connection buffer"
+ " after upgrade: len=%zu\n",
+ nread);
+
+ memcpy(httpc->inbuf, mem, nread);
+ httpc->inbuflen = nread;
+
+ nproc = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)httpc->inbuf,
+ httpc->inbuflen);
+
+ if(nghttp2_is_fatal((int)nproc)) {
+ failf(data, "nghttp2_session_mem_recv() failed: %s(%d)",
+ nghttp2_strerror((int)nproc), (int)nproc);
+ return CURLE_HTTP2;
+ }
+
+ DEBUGF(infof(data, "nghttp2_session_mem_recv() returns %zd\n", nproc));
+
+ if((ssize_t)nread == nproc) {
+ httpc->inbuflen = 0;
+ httpc->nread_inbuf = 0;
+ }
+ else {
+ httpc->nread_inbuf += nproc;
+ }
+
+ /* Try to send some frames since we may read SETTINGS already. */
+ rv = nghttp2_session_send(httpc->h2);
+
+ if(rv != 0) {
+ failf(data, "nghttp2_session_send() failed: %s(%d)",
+ nghttp2_strerror(rv), rv);
+ return CURLE_HTTP2;
+ }
+
+ return CURLE_OK;
+}
+
+#endif
diff --git a/lib/http2.h b/lib/http2.h
new file mode 100644
index 00000000..1614736d
--- /dev/null
+++ b/lib/http2.h
@@ -0,0 +1,59 @@
+#ifndef HEADER_CURL_HTTP2_H
+#define HEADER_CURL_HTTP2_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_NGHTTP2
+#include "http.h"
+
+/* value for MAX_CONCURRENT_STREAMS we use until we get an updated setting
+ from the peer */
+#define DEFAULT_MAX_CONCURRENT_STREAMS 13
+
+/*
+ * Store nghttp2 version info in this buffer, Prefix with a space. Return
+ * total length written.
+ */
+int Curl_http2_ver(char *p, size_t len);
+
+CURLcode Curl_http2_init(struct connectdata *conn);
+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);
+/* called from Curl_http_setup_conn */
+void Curl_http2_setup_conn(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_setup_conn(x)
+#endif
+
+#endif /* HEADER_CURL_HTTP2_H */
+
diff --git a/lib/http_chunks.c b/lib/http_chunks.c
index 0d41979a..80c0f954 100644
--- a/lib/http_chunks.c
+++ b/lib/http_chunks.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,28 +19,22 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+
+#include "curl_setup.h"
#ifndef CURL_DISABLE_HTTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
#include "urldata.h" /* it includes http_chunks.h */
#include "sendf.h" /* for the client write stuff */
#include "content_encoding.h"
#include "http.h"
-#include "curl_memory.h"
-#include "easyif.h" /* for Curl_convert_to_network prototype */
+#include "non-ascii.h" /* for Curl_convert_to_network prototype */
+#include "strtoofft.h"
+#include "warnless.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
/*
@@ -84,16 +78,16 @@
We avoid the use of isxdigit to accommodate non-ASCII hosts. */
static bool Curl_isxdigit(char digit)
{
- return (bool)( (digit >= 0x30 && digit <= 0x39) /* 0-9 */
- || (digit >= 0x41 && digit <= 0x46) /* A-F */
- || (digit >= 0x61 && digit <= 0x66) ); /* a-f */
+ return ( (digit >= 0x30 && digit <= 0x39) /* 0-9 */
+ || (digit >= 0x41 && digit <= 0x46) /* A-F */
+ || (digit >= 0x61 && digit <= 0x66) /* a-f */ ) ? TRUE : FALSE;
}
void Curl_httpchunk_init(struct connectdata *conn)
{
struct Curl_chunker *chunk = &conn->chunk;
- chunk->hexindex=0; /* start at 0 */
- chunk->dataleft=0; /* no data left yet! */
+ chunk->hexindex=0; /* start at 0 */
+ chunk->dataleft=0; /* no data left yet! */
chunk->state = CHUNK_HEX; /* we get hex first! */
}
@@ -118,7 +112,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
struct Curl_chunker *ch = &conn->chunk;
struct SingleRequest *k = &data->req;
size_t piece;
- size_t length = (size_t)datalen;
+ curl_off_t length = (curl_off_t)datalen;
size_t *wrote = (size_t *)wrotep;
*wrote = 0; /* nothing's written yet */
@@ -146,74 +140,62 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
}
}
else {
- if(0 == ch->hexindex) {
+ char *endptr;
+ if(0 == ch->hexindex)
/* This is illegal data, we received junk where we expected
a hexadecimal digit. */
return CHUNKE_ILLEGAL_HEX;
- }
+
/* length and datap are unmodified */
ch->hexbuffer[ch->hexindex]=0;
-#ifdef CURL_DOES_CONVERSIONS
+
/* convert to host encoding before calling strtoul */
- result = Curl_convert_from_network(conn->data,
- ch->hexbuffer,
+ result = Curl_convert_from_network(conn->data, ch->hexbuffer,
ch->hexindex);
- if(result != CURLE_OK) {
+ if(result) {
/* Curl_convert_from_network calls failf if unsuccessful */
/* Treat it as a bad hex character */
- return(CHUNKE_ILLEGAL_HEX);
+ return CHUNKE_ILLEGAL_HEX;
}
-#endif /* CURL_DOES_CONVERSIONS */
- ch->datasize=strtoul(ch->hexbuffer, NULL, 16);
- ch->state = CHUNK_POSTHEX;
- }
- break;
- case CHUNK_POSTHEX:
- /* In this state, we're waiting for CRLF to arrive. We support
- this to allow so called chunk-extensions to show up here
- before the CRLF comes. */
- if(*datap == 0x0d)
- ch->state = CHUNK_CR;
- length--;
- datap++;
+ ch->datasize=curlx_strtoofft(ch->hexbuffer, &endptr, 16);
+ if((ch->datasize == CURL_OFF_T_MAX) && (errno == ERANGE))
+ /* overflow is an error */
+ return CHUNKE_ILLEGAL_HEX;
+ ch->state = CHUNK_LF; /* now wait for the CRLF */
+ }
break;
- case CHUNK_CR:
- /* waiting for the LF */
+ case CHUNK_LF:
+ /* waiting for the LF after a chunk size */
if(*datap == 0x0a) {
/* we're now expecting data to come, unless size was zero! */
if(0 == ch->datasize) {
ch->state = CHUNK_TRAILER; /* now check for trailers */
conn->trlPos=0;
}
- else {
+ else
ch->state = CHUNK_DATA;
- }
}
- else
- /* previously we got a fake CR, go back to CR waiting! */
- ch->state = CHUNK_CR;
+
datap++;
length--;
break;
case CHUNK_DATA:
- /* we get pure and fine data
-
- We expect another 'datasize' of data. We have 'length' right now,
- it can be more or less than 'datasize'. Get the smallest piece.
+ /* We expect 'datasize' of data. We have 'length' right now, it can be
+ more or less than 'datasize'. Get the smallest piece.
*/
- piece = (ch->datasize >= length)?length:ch->datasize;
+ piece = curlx_sotouz((ch->datasize >= length)?length:ch->datasize);
/* Write the data portion available */
#ifdef HAVE_LIBZ
switch (conn->data->set.http_ce_skip?
- IDENTITY : data->req.content_encoding) {
+ IDENTITY : data->req.auto_decoding) {
case IDENTITY:
#endif
if(!k->ignorebody) {
- if( !data->set.http_te_skip )
+ if(!data->set.http_te_skip)
result = Curl_client_write(conn, CLIENTWRITE_BODY, datap,
piece);
else
@@ -257,37 +239,22 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
if(0 == ch->datasize)
/* end of data this round, we now expect a trailing CRLF */
- ch->state = CHUNK_POSTCR;
- break;
-
- case CHUNK_POSTCR:
- if(*datap == 0x0d) {
ch->state = CHUNK_POSTLF;
- datap++;
- length--;
- }
- else
- return CHUNKE_BAD_CHUNK;
-
break;
case CHUNK_POSTLF:
if(*datap == 0x0a) {
- /*
- * The last one before we go back to hex state and start all
- * over.
- */
- Curl_httpchunk_init(conn);
- datap++;
- length--;
+ /* The last one before we go back to hex state and start all over. */
+ Curl_httpchunk_init(conn); /* sets state back to CHUNK_HEX */
}
- else
+ else if(*datap != 0x0d)
return CHUNKE_BAD_CHUNK;
-
+ datap++;
+ length--;
break;
case CHUNK_TRAILER:
- if(*datap == 0x0d) {
+ if((*datap == 0x0d) || (*datap == 0x0a)) {
/* this is the end of a trailer, but if the trailer was zero bytes
there was no trailer and we move on */
@@ -297,17 +264,14 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
conn->trailer[conn->trlPos++]=0x0a;
conn->trailer[conn->trlPos]=0;
-#ifdef CURL_DOES_CONVERSIONS
/* Convert to host encoding before calling Curl_client_write */
- result = Curl_convert_from_network(conn->data,
- conn->trailer,
+ result = Curl_convert_from_network(conn->data, conn->trailer,
conn->trlPos);
- if(result != CURLE_OK)
+ if(result)
/* Curl_convert_from_network calls failf if unsuccessful */
/* Treat it as a bad chunk */
return CHUNKE_BAD_CHUNK;
-#endif /* CURL_DOES_CONVERSIONS */
if(!data->set.http_te_skip) {
result = Curl_client_write(conn, CLIENTWRITE_HEADER,
conn->trailer, conn->trlPos);
@@ -316,6 +280,9 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
}
conn->trlPos=0;
ch->state = CHUNK_TRAILER_CR;
+ if(*datap == 0x0a)
+ /* already on the LF */
+ break;
}
else {
/* no trailer, we're on the final CRLF pair */
@@ -342,7 +309,6 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
return CHUNKE_OUT_OF_MEMORY;
conn->trailer = ptr;
}
- fprintf(stderr, "MOO: %c\n", *datap);
conn->trailer[conn->trlPos++]=*datap;
}
datap++;
@@ -362,27 +328,18 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
case CHUNK_TRAILER_POSTCR:
/* We enter this state when a CR should arrive so we expect to
have to first pass a CR before we wait for LF */
- if(*datap != 0x0d) {
+ if((*datap != 0x0d) && (*datap != 0x0a)) {
/* not a CR then it must be another header in the trailer */
ch->state = CHUNK_TRAILER;
break;
}
- datap++;
- length--;
- /* now wait for the final LF */
- ch->state = CHUNK_STOP;
- break;
-
- case CHUNK_STOPCR:
- /* Read the final CRLF that ends all chunk bodies */
-
if(*datap == 0x0d) {
- ch->state = CHUNK_STOP;
+ /* skip if CR */
datap++;
length--;
}
- else
- return CHUNKE_BAD_CHUNK;
+ /* now wait for the final LF */
+ ch->state = CHUNK_STOP;
break;
case CHUNK_STOP:
@@ -391,17 +348,35 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
/* Record the length of any data left in the end of the buffer
even if there's no more chunks to read */
+ ch->dataleft = curlx_sotouz(length);
- ch->dataleft = length;
return CHUNKE_STOP; /* return stop */
}
else
return CHUNKE_BAD_CHUNK;
-
- default:
- return CHUNKE_STATE_ERROR;
}
}
return CHUNKE_OK;
}
+
+const char *Curl_chunked_strerror(CHUNKcode code)
+{
+ switch (code) {
+ default:
+ return "OK";
+ case CHUNKE_TOO_LONG_HEX:
+ return "Too long hexadecimal number";
+ case CHUNKE_ILLEGAL_HEX:
+ return "Illegal or missing hexadecimal sequence";
+ case CHUNKE_BAD_CHUNK:
+ return "Malformed encoding found";
+ case CHUNKE_WRITE_ERROR:
+ return "Write error";
+ case CHUNKE_BAD_ENCODING:
+ return "Bad content-encoding found";
+ case CHUNKE_OUT_OF_MEMORY:
+ return "Out of memory";
+ }
+}
+
#endif /* CURL_DISABLE_HTTP */
diff --git a/lib/http_chunks.h b/lib/http_chunks.h
index 6056e188..0489eb85 100644
--- a/lib/http_chunks.h
+++ b/lib/http_chunks.h
@@ -1,5 +1,5 @@
-#ifndef __HTTP_CHUNKS_H
-#define __HTTP_CHUNKS_H
+#ifndef HEADER_CURL_HTTP_CHUNKS_H
+#define HEADER_CURL_HTTP_CHUNKS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -29,40 +29,25 @@
#define MAXNUM_SIZE 16
typedef enum {
- CHUNK_FIRST, /* never use */
-
- /* In this we await and buffer all hexadecimal digits until we get one
- that isn't a hexadecimal digit. When done, we go POSTHEX */
+ /* await and buffer all hexadecimal digits until we get one that isn't a
+ hexadecimal digit. When done, we go CHUNK_LF */
CHUNK_HEX,
- /* We have received the hexadecimal digit and we eat all characters until
- we get a CRLF pair. When we see a CR we go to the CR state. */
- CHUNK_POSTHEX,
-
- /* A single CR has been found and we should get a LF right away in this
- state or we go back to POSTHEX. When LF is received, we go to DATA.
- If the size given was zero, we set state to STOP and return. */
- CHUNK_CR,
+ /* wait for LF, ignore all else */
+ CHUNK_LF,
/* We eat the amount of data specified. When done, we move on to the
POST_CR state. */
CHUNK_DATA,
- /* POSTCR should get a CR and nothing else, then move to POSTLF */
- CHUNK_POSTCR,
-
- /* POSTLF should get a LF and nothing else, then move back to HEX as the
- CRLF combination marks the end of a chunk */
+ /* POSTLF should get a CR and then a LF and nothing else, then move back to
+ HEX as the CRLF combination marks the end of a chunk. A missing CR is no
+ big deal. */
CHUNK_POSTLF,
- /* Each Chunk body should end with a CRLF. Read a CR and nothing else,
- then move to CHUNK_STOP */
- CHUNK_STOPCR,
-
- /* This is mainly used to really mark that we're out of the game.
- NOTE: that there's a 'dataleft' field in the struct that will tell how
- many bytes that were not passed to the client in the end of the last
- buffer! */
+ /* Used to mark that we're out of the game. NOTE: that there's a 'dataleft'
+ field in the struct that will tell how many bytes that were not passed to
+ the client in the end of the last buffer! */
CHUNK_STOP,
/* At this point optional trailer headers can be found, unless the next line
@@ -77,10 +62,7 @@ typedef enum {
signalled If this is an empty trailer CHUNKE_STOP will be signalled.
Otherwise the trailer will be broadcasted via Curl_client_write() and the
next state will be CHUNK_TRAILER */
- CHUNK_TRAILER_POSTCR,
-
- CHUNK_LAST /* never use */
-
+ CHUNK_TRAILER_POSTCR
} ChunkyState;
typedef enum {
@@ -90,18 +72,20 @@ typedef enum {
CHUNKE_ILLEGAL_HEX,
CHUNKE_BAD_CHUNK,
CHUNKE_WRITE_ERROR,
- CHUNKE_STATE_ERROR,
CHUNKE_BAD_ENCODING,
CHUNKE_OUT_OF_MEMORY,
CHUNKE_LAST
} CHUNKcode;
+const char *Curl_chunked_strerror(CHUNKcode code);
+
struct Curl_chunker {
char hexbuffer[ MAXNUM_SIZE + 1];
int hexindex;
ChunkyState state;
- size_t datasize;
+ curl_off_t datasize;
size_t dataleft; /* untouched data amount at the end of the last buffer */
};
-#endif
+#endif /* HEADER_CURL_HTTP_CHUNKS_H */
+
diff --git a/lib/http_digest.c b/lib/http_digest.c
index be40fc7f..929e2c60 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,104 +19,21 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
#include "urldata.h"
-#include "sendf.h"
#include "rawstr.h"
-#include "curl_base64.h"
-#include "curl_md5.h"
+#include "curl_sasl.h"
#include "http_digest.h"
-#include "strtok.h"
-#include "url.h" /* for Curl_safefree() */
-#include "curl_memory.h"
-#include "easyif.h" /* included for Curl_convert_... prototypes */
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
-#define MAX_VALUE_LENGTH 256
-#define MAX_CONTENT_LENGTH 1024
-
-/*
- * 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"
@@ -124,149 +41,31 @@ Proxy-Authenticate: Digest realm="testrealm", nonce="1053604598"
*/
-CURLdigest Curl_input_digest(struct connectdata *conn,
- bool proxy,
- const char *header) /* rest of the *-authenticate:
- header */
+CURLcode Curl_input_digest(struct connectdata *conn,
+ bool proxy,
+ const char *header) /* rest of the *-authenticate:
+ header */
{
- 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;
+ struct SessionHandle *data = conn->data;
+
+ /* Point to the correct struct with this */
+ struct digestdata *digest;
if(proxy) {
- d = &data->state.proxydigest;
+ digest = &data->state.proxydigest;
}
else {
- d = &data->state.digest;
+ digest = &data->state.digest;
}
- /* skip initial whitespaces */
+ if(!checkprefix("Digest", header))
+ return CURLE_BAD_CONTENT_ENCODING;
+
+ header += strlen("Digest");
while(*header && ISSPACE(*header))
header++;
- 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 */
- Curl_digest_cleanup_one(d);
-
- while(1) {
- 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;
-
- return CURLDIGEST_FINE;
-}
-
-/* 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]);
+ return Curl_sasl_decode_digest_http_message(header, digest);
}
CURLcode Curl_output_digest(struct connectdata *conn,
@@ -274,137 +73,60 @@ CURLcode Curl_output_digest(struct connectdata *conn,
const unsigned char *request,
const unsigned char *uripath)
{
- /* 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, */
- unsigned char md5buf[16]; /* 16 bytes/128 bits */
- unsigned char request_digest[33];
- unsigned char *md5this;
- unsigned char *ha1;
- unsigned char ha2[33];/* 32 digits and 1 zero byte */
- char cnoncebuf[7];
- char *cnonce;
- char *tmp = NULL;
- struct timeval now;
-
+ 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 */
char **allocuserpwd;
+
+ /* Point to the name and password for this */
const char *userp;
const char *passwdp;
- struct auth *authp;
- struct SessionHandle *data = conn->data;
- struct digestdata *d;
-#ifdef CURL_DOES_CONVERSIONS
- 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; \
- }
-#else
-#define CURL_OUTPUT_DIGEST_CONV(a, b)
-#endif /* CURL_DOES_CONVERSIONS */
+ /* Point to the correct struct with this */
+ struct digestdata *digest;
+ struct auth *authp;
if(proxy) {
- d = &data->state.proxydigest;
+ digest = &data->state.proxydigest;
allocuserpwd = &conn->allocptr.proxyuserpwd;
userp = conn->proxyuser;
passwdp = conn->proxypasswd;
authp = &data->state.authproxy;
}
else {
- d = &data->state.digest;
+ digest = &data->state.digest;
allocuserpwd = &conn->allocptr.userpwd;
userp = conn->user;
passwdp = conn->passwd;
authp = &data->state.authhost;
}
- if(*allocuserpwd) {
- Curl_safefree(*allocuserpwd);
- *allocuserpwd = NULL;
- }
+ Curl_safefree(*allocuserpwd);
/* not set means empty */
if(!userp)
- userp="";
+ userp = "";
if(!passwdp)
- passwdp="";
+ passwdp = "";
- if(!d->nonce) {
+#if defined(USE_WINDOWS_SSPI)
+ have_chlg = digest->input_token ? TRUE : FALSE;
+#else
+ have_chlg = digest->nonce ? TRUE : FALSE;
+#endif
+
+ if(!have_chlg) {
authp->done = FALSE;
return CURLE_OK;
}
- authp->done = TRUE;
-
- if(!d->nc)
- d->nc = 1;
-
- if(!d->cnonce) {
- /* Generate a cnonce */
- now = Curl_tvnow();
- snprintf(cnoncebuf, sizeof(cnoncebuf), "%06ld", (long)now.tv_sec);
- if(Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), &cnonce))
- d->cnonce = cnonce;
- else
- return CURLE_OUT_OF_MEMORY;
- }
-
- /*
- 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);
- free(md5this); /* free this again */
-
- ha1 = malloc(33); /* 32 digits and 1 zero byte */
- if(!ha1)
- return CURLE_OUT_OF_MEMORY;
-
- 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);
- free(tmp); /* free this again */
- 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
@@ -418,167 +140,40 @@ CURLcode Curl_output_digest(struct connectdata *conn,
Further details on Digest implementation differences:
http://www.fngtps.com/2006/09/http-authentication
*/
+
if(authp->iestyle && ((tmp = strchr((char *)uripath, '?')) != NULL)) {
- md5this = (unsigned char *)aprintf("%s:%.*s", request,
- (int)(tmp - (char *)uripath), uripath);
- }
- else
- md5this = (unsigned char *)aprintf("%s:%s", request, uripath);
+ size_t urilen = tmp - (char *)uripath;
- if(!md5this) {
- free(ha1);
- return CURLE_OUT_OF_MEMORY;
+ path = (unsigned char *) aprintf("%.*s", urilen, uripath);
}
+ else
+ path = (unsigned char *) strdup((char *) uripath);
- if(d->qop && Curl_raw_equal(d->qop, "auth-int")) {
- /* We don't support auth-int at the moment. I can't see a easy way to get
- entity-body here */
- /* TODO: Append H(entity-body)*/
- }
- CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */
- Curl_md5it(md5buf, md5this);
- free(md5this); /* free this again */
- 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);
- }
- free(ha1);
- if(!md5this)
+ if(!path)
return CURLE_OUT_OF_MEMORY;
- CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */
- Curl_md5it(md5buf, md5this);
- free(md5this); /* free this again */
- md5_to_ascii(md5buf, request_digest);
+ result = Curl_sasl_create_digest_http_message(data, userp, passwdp, request,
+ path, digest, &response, &len);
+ free(path);
+ if(result)
+ return result;
- /* for test case 64 (snooped from a Mozilla 1.3a request)
-
- Authorization: Digest username="testuser", realm="testrealm", \
- nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca"
- */
-
- 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,
- d->realm,
- d->nonce,
- 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,
- d->realm,
- d->nonce,
- uripath, /* this is the PATH part of the URL */
- request_digest);
- }
+ *allocuserpwd = aprintf("%sAuthorization: Digest %s\r\n",
+ proxy ? "Proxy-" : "",
+ response);
+ free(response);
if(!*allocuserpwd)
return CURLE_OUT_OF_MEMORY;
- /* 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 */
- tmp = realloc(*allocuserpwd, strlen(*allocuserpwd) + 3);
- if(!tmp)
- return CURLE_OUT_OF_MEMORY;
- strcat(tmp, "\r\n");
- *allocuserpwd = tmp;
+ authp->done = TRUE;
return CURLE_OK;
}
-void Curl_digest_cleanup_one(struct digestdata *d)
-{
- if(d->nonce)
- free(d->nonce);
- d->nonce = NULL;
-
- if(d->cnonce)
- free(d->cnonce);
- d->cnonce = NULL;
-
- if(d->realm)
- free(d->realm);
- d->realm = NULL;
-
- if(d->opaque)
- free(d->opaque);
- d->opaque = NULL;
-
- if(d->qop)
- free(d->qop);
- d->qop = NULL;
-
- if(d->algorithm)
- free(d->algorithm);
- d->algorithm = NULL;
-
- 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_digest_cleanup_one(&data->state.digest);
- Curl_digest_cleanup_one(&data->state.proxydigest);
+ Curl_sasl_digest_cleanup(&data->state.digest);
+ Curl_sasl_digest_cleanup(&data->state.proxydigest);
}
#endif
diff --git a/lib/http_digest.h b/lib/http_digest.h
index 8c96378d..d13d5637 100644
--- a/lib/http_digest.h
+++ b/lib/http_digest.h
@@ -1,5 +1,5 @@
-#ifndef __HTTP_DIGEST_H
-#define __HTTP_DIGEST_H
+#ifndef HEADER_CURL_HTTP_DIGEST_H
+#define HEADER_CURL_HTTP_DIGEST_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,37 +21,22 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-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
-};
+#include "curl_setup.h"
/* this is for digest header input */
-CURLdigest Curl_input_digest(struct connectdata *conn,
- bool proxy, const char *header);
+CURLcode 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,
bool proxy,
const unsigned char *request,
const unsigned char *uripath);
-void Curl_digest_cleanup_one(struct digestdata *dig);
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
void Curl_digest_cleanup(struct SessionHandle *data);
#else
-#define Curl_digest_cleanup(x) do {} while(0)
+#define Curl_digest_cleanup(x) Curl_nop_stmt
#endif
-#endif
+#endif /* HEADER_CURL_HTTP_DIGEST_H */
diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
index 80b0b507..a1baf29c 100644
--- a/lib/http_negotiate.c
+++ b/lib/http_negotiate.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,327 +19,170 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
-#ifdef HAVE_GSSAPI
-#ifdef HAVE_OLD_GSSMIT
-#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
-#endif
+#include "curl_setup.h"
-#ifndef CURL_DISABLE_HTTP
- /* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
+#if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
#include "urldata.h"
#include "sendf.h"
+#include "curl_gssapi.h"
#include "rawstr.h"
#include "curl_base64.h"
#include "http_negotiate.h"
-#include "curl_memory.h"
+#include "curl_sasl.h"
+#include "url.h"
+#include "curl_printf.h"
-#ifdef HAVE_SPNEGO
-# include <spnegohelp.h>
-# ifdef USE_SSLEAY
-# ifdef USE_OPENSSL
-# include <openssl/objects.h>
-# else
-# include <objects.h>
-# endif
-# else
-# error "Can't compile SPNEGO support without OpenSSL."
-# endif
-#endif
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
-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;
-
- /* GSSAPI implementation by Globus (known as GSI) requires the name to be
- of form "<service>/<fqdn>" instead of <service>@<fqdn> (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 <service>@<fqdn> 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;
- if(token.length + 1 > sizeof(name))
- return EMSGSIZE;
-
- snprintf(name, sizeof(name), "%s@%s", service, proxy ? conn->proxy.name :
- conn->host.name);
-
- token.value = (void *) name;
- major_status = gss_import_name(&minor_status,
- &token,
- GSS_C_NT_HOSTBASED_SERVICE,
- server);
-
- return GSS_ERROR(major_status) ? -1 : 0;
-}
-
-static void
-log_gss_error(struct connectdata *conn, OM_uint32 error_status, const char *prefix)
+CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+ const char *header)
{
- OM_uint32 maj_stat, min_stat;
- OM_uint32 msg_ctx = 0;
- gss_buffer_desc status_string;
- char buf[1024];
+ struct SessionHandle *data = conn->data;
+ struct negotiatedata *neg_ctx = proxy?&data->state.proxyneg:
+ &data->state.negotiate;
+ OM_uint32 major_status, minor_status, discard_st;
+ 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;
size_t len;
+ size_t rawlen = 0;
+ CURLcode result;
- 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);
+ if(neg_ctx->context && neg_ctx->status == GSS_S_COMPLETE) {
+ /* We finished successfully our part of authentication, but server
+ * rejected it (since we're again here). Exit with an error since we
+ * can't invent anything better */
+ Curl_cleanup_negotiate(data);
+ return CURLE_LOGIN_DENIED;
+ }
- infof(conn->data, "%s", buf);
-}
+ if(!neg_ctx->server_name) {
+ /* Generate our SPN */
+ char *spn = Curl_sasl_build_gssapi_spn(
+ proxy ? data->set.str[STRING_PROXY_SERVICE_NAME] :
+ data->set.str[STRING_SERVICE_NAME],
+ proxy ? conn->proxy.name : conn->host.name);
+ if(!spn)
+ return CURLE_OUT_OF_MEMORY;
-/* 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)
-{
- struct negotiatedata *neg_ctx = proxy?&conn->data->state.proxyneg:
- &conn->data->state.negotiate;
- OM_uint32 major_status, minor_status, minor_status2;
- gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
- gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
- int ret;
- size_t len, rawlen;
- bool gss;
- const char* protocol;
+ /* Populate the SPN structure */
+ spn_token.value = spn;
+ spn_token.length = strlen(spn);
- while(*header && ISSPACE(*header))
- header++;
- if(checkprefix("GSS-Negotiate", header)) {
- protocol = "GSS-Negotiate";
- gss = TRUE;
- }
- else if(checkprefix("Negotiate", header)) {
- protocol = "Negotiate";
- gss = FALSE;
- }
- else
- return -1;
+ /* Import the SPN */
+ major_status = gss_import_name(&minor_status, &spn_token,
+ GSS_C_NT_HOSTBASED_SERVICE,
+ &neg_ctx->server_name);
+ if(GSS_ERROR(major_status)) {
+ Curl_gss_log_error(data, minor_status, "gss_import_name() failed: ");
+
+ free(spn);
- if(neg_ctx->context) {
- if(neg_ctx->gss != gss) {
- return -1;
+ return CURLE_OUT_OF_MEMORY;
}
- }
- else {
- neg_ctx->protocol = protocol;
- neg_ctx->gss = gss;
- }
- if(neg_ctx->context && neg_ctx->status == GSS_S_COMPLETE) {
- /* We finished succesfully our part of authentication, but server
- * rejected it (since we're again here). Exit with an error since we
- * can't invent anything better */
- Curl_cleanup_negotiate(conn->data);
- return -1;
+ free(spn);
}
- if(neg_ctx->server_name == NULL &&
- (ret = get_gss_name(conn, proxy, &neg_ctx->server_name)))
- return ret;
-
- header += strlen(neg_ctx->protocol);
+ header += strlen("Negotiate");
while(*header && ISSPACE(*header))
header++;
len = strlen(header);
if(len > 0) {
- rawlen = Curl_base64_decode(header,
- (unsigned char **)&input_token.value);
- if(rawlen == 0)
- return -1;
- input_token.length = rawlen;
+ result = Curl_base64_decode(header, (unsigned char **)&input_token.value,
+ &rawlen);
+ if(result)
+ return result;
+
+ if(!rawlen) {
+ infof(data, "Negotiate handshake failure (empty challenge message)\n");
-#ifdef HAVE_SPNEGO /* Handle SPNEGO */
- if(checkprefix("Negotiate", header)) {
- ASN1_OBJECT * object = NULL;
- int rc = 1;
- unsigned char * spnegoToken = NULL;
- size_t spnegoTokenLength = 0;
- unsigned char * mechToken = NULL;
- size_t mechTokenLength = 0;
-
- if(input_token.value == NULL)
- return CURLE_OUT_OF_MEMORY;
-
- spnegoToken = malloc(input_token.length);
- if(spnegoToken == NULL)
- return CURLE_OUT_OF_MEMORY;
-
- spnegoTokenLength = input_token.length;
-
- object = OBJ_txt2obj ("1.2.840.113554.1.2.2", 1);
- if(!parseSpnegoTargetToken(spnegoToken,
- spnegoTokenLength,
- NULL,
- NULL,
- &mechToken,
- &mechTokenLength,
- NULL,
- NULL)) {
- free(spnegoToken);
- spnegoToken = NULL;
- infof(conn->data, "Parse SPNEGO Target Token failed\n");
- }
- else {
- free(input_token.value);
- input_token.value = malloc(mechTokenLength);
- if (input_token.value == NULL)
- return CURLE_OUT_OF_MEMORY;
-
- memcpy(input_token.value, mechToken,mechTokenLength);
- input_token.length = mechTokenLength;
- free(mechToken);
- mechToken = NULL;
- infof(conn->data, "Parse SPNEGO Target Token succeeded\n");
- }
+ return CURLE_BAD_CONTENT_ENCODING;
}
-#endif
+
+ input_token.length = rawlen;
+
+ DEBUGASSERT(input_token.value != NULL);
}
- major_status = gss_init_sec_context(&minor_status,
- GSS_C_NO_CREDENTIAL,
- &neg_ctx->context,
- neg_ctx->server_name,
- GSS_C_NO_OID,
- GSS_C_DELEG_FLAG,
- 0,
- GSS_C_NO_CHANNEL_BINDINGS,
- &input_token,
- NULL,
- &output_token,
- NULL,
- NULL);
- if(input_token.length > 0)
- gss_release_buffer(&minor_status2, &input_token);
+ 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);
+
neg_ctx->status = major_status;
if(GSS_ERROR(major_status)) {
- /* Curl_cleanup_negotiate(conn->data) ??? */
- log_gss_error(conn, minor_status,
- "gss_init_sec_context() failed: ");
- return -1;
+ if(output_token.value)
+ gss_release_buffer(&discard_st, &output_token);
+ Curl_gss_log_error(conn->data, minor_status,
+ "gss_init_sec_context() failed: ");
+ return CURLE_OUT_OF_MEMORY;
}
- if(output_token.length == 0) {
- return -1;
+ if(!output_token.value || !output_token.length) {
+ if(output_token.value)
+ gss_release_buffer(&discard_st, &output_token);
+ return CURLE_OUT_OF_MEMORY;
}
neg_ctx->output_token = output_token;
- /* conn->bits.close = FALSE; */
- return 0;
+ return CURLE_OK;
}
-
CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
{
struct negotiatedata *neg_ctx = proxy?&conn->data->state.proxyneg:
&conn->data->state.negotiate;
char *encoded = NULL;
- size_t len;
+ size_t len = 0;
char *userp;
-
-#ifdef HAVE_SPNEGO /* Handle SPNEGO */
- if(checkprefix("Negotiate", neg_ctx->protocol)) {
- ASN1_OBJECT * object = NULL;
- int rc = 1;
- unsigned char * spnegoToken = NULL;
- size_t spnegoTokenLength = 0;
- unsigned char * responseToken = NULL;
- size_t responseTokenLength = 0;
-
- 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(!makeSpnegoInitialToken (object,
- responseToken,
- responseTokenLength,
- &spnegoToken,
- &spnegoTokenLength)) {
- free(responseToken);
- responseToken = NULL;
- infof(conn->data, "Make SPNEGO Initial Token failed\n");
- }
- else {
- free(responseToken);
- responseToken = NULL;
- free(neg_ctx->output_token.value);
- neg_ctx->output_token.value = malloc(spnegoTokenLength);
- if(neg_ctx->output_token.value == NULL) {
- free(spnegoToken);
- spnegoToken = NULL;
- return CURLE_OUT_OF_MEMORY;
- }
- memcpy(neg_ctx->output_token.value, spnegoToken,spnegoTokenLength);
- neg_ctx->output_token.length = spnegoTokenLength;
- free(spnegoToken);
- spnegoToken = NULL;
- infof(conn->data, "Make SPNEGO Initial Token succeeded\n");
- }
+ CURLcode result;
+ OM_uint32 discard_st;
+
+ result = Curl_base64_encode(conn->data,
+ neg_ctx->output_token.value,
+ neg_ctx->output_token.length,
+ &encoded, &len);
+ if(result) {
+ gss_release_buffer(&discard_st, &neg_ctx->output_token);
+ neg_ctx->output_token.value = NULL;
+ neg_ctx->output_token.length = 0;
+ return result;
}
-#endif
- len = Curl_base64_encode(conn->data,
- neg_ctx->output_token.value,
- neg_ctx->output_token.length,
- &encoded);
-
- if(len == 0)
- return CURLE_OUT_OF_MEMORY;
- userp = aprintf("%sAuthorization: %s %s\r\n", proxy ? "Proxy-" : "",
- neg_ctx->protocol, encoded);
+ if(!encoded || !len) {
+ gss_release_buffer(&discard_st, &neg_ctx->output_token);
+ neg_ctx->output_token.value = NULL;
+ neg_ctx->output_token.length = 0;
+ return CURLE_REMOTE_ACCESS_DENIED;
+ }
- if(proxy)
+ userp = aprintf("%sAuthorization: Negotiate %s\r\n", proxy ? "Proxy-" : "",
+ encoded);
+ if(proxy) {
+ Curl_safefree(conn->allocptr.proxyuserpwd);
conn->allocptr.proxyuserpwd = userp;
- else
+ }
+ else {
+ Curl_safefree(conn->allocptr.userpwd);
conn->allocptr.userpwd = userp;
+ }
+
free(encoded);
- Curl_cleanup_negotiate (conn->data);
+
return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK;
}
@@ -349,7 +192,7 @@ static void cleanup(struct negotiatedata *neg_ctx)
if(neg_ctx->context != GSS_C_NO_CONTEXT)
gss_delete_sec_context(&minor_status, &neg_ctx->context, GSS_C_NO_BUFFER);
- if(neg_ctx->output_token.length != 0)
+ if(neg_ctx->output_token.value)
gss_release_buffer(&minor_status, &neg_ctx->output_token);
if(neg_ctx->server_name != GSS_C_NO_NAME)
@@ -364,6 +207,4 @@ void Curl_cleanup_negotiate(struct SessionHandle *data)
cleanup(&data->state.proxyneg);
}
-
-#endif
-#endif
+#endif /* HAVE_GSSAPI && !CURL_DISABLE_HTTP && USE_SPNEGO */
diff --git a/lib/http_negotiate.h b/lib/http_negotiate.h
index 35501f04..a8eb9801 100644
--- a/lib/http_negotiate.h
+++ b/lib/http_negotiate.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,17 +22,21 @@
*
***************************************************************************/
-#ifdef HAVE_GSSAPI
+#ifdef USE_SPNEGO
/* this is for Negotiate header input */
-int Curl_input_negotiate(struct connectdata *conn, bool proxy,
- const char *header);
+CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+ const char *header);
/* this is for creating Negotiate header output */
CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy);
void Curl_cleanup_negotiate(struct SessionHandle *data);
-#endif /* HAVE_GSSAPI */
+#ifdef USE_WINDOWS_SSPI
+#define GSS_ERROR(status) (status & 0x80000000)
+#endif
+
+#endif /* USE_SPNEGO */
#endif /* HEADER_CURL_HTTP_NEGOTIATE_H */
diff --git a/lib/http_negotiate_sspi.c b/lib/http_negotiate_sspi.c
new file mode 100644
index 00000000..a50ea96f
--- /dev/null
+++ b/lib/http_negotiate_sspi.c
@@ -0,0 +1,300 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_WINDOWS_SSPI
+
+#if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
+
+#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_multibyte.h"
+#include "curl_printf.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+ const char *header)
+{
+ struct SessionHandle *data = conn->data;
+ BYTE *input_token = NULL;
+ SecBufferDesc out_buff_desc;
+ SecBuffer out_sec_buff;
+ SecBufferDesc in_buff_desc;
+ SecBuffer in_sec_buff;
+ SECURITY_STATUS status;
+ unsigned long attrs;
+ TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
+ size_t len = 0, input_token_len = 0;
+ CURLcode result;
+
+ /* Point to the username and password */
+ const char *userp;
+ const char *passwdp;
+
+ /* Point to the correct struct with this */
+ struct negotiatedata *neg_ctx;
+
+ if(proxy) {
+ userp = conn->proxyuser;
+ passwdp = conn->proxypasswd;
+ neg_ctx = &data->state.proxyneg;
+ }
+ else {
+ userp = conn->user;
+ passwdp = conn->passwd;
+ neg_ctx = &data->state.negotiate;
+ }
+
+ /* 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
+ * can't invent anything better */
+ Curl_cleanup_negotiate(data);
+ return CURLE_LOGIN_DENIED;
+ }
+
+ if(!neg_ctx->server_name) {
+ /* Check proxy auth requested but no given proxy name */
+ if(proxy && !conn->proxy.name)
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+
+ /* Generate our SPN */
+ neg_ctx->server_name = Curl_sasl_build_spn(
+ proxy ? data->set.str[STRING_PROXY_SERVICE_NAME] :
+ data->set.str[STRING_SERVICE_NAME],
+ proxy ? conn->proxy.name : conn->host.name);
+ if(!neg_ctx->server_name)
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ if(!neg_ctx->output_token) {
+ PSecPkgInfo SecurityPackage;
+ status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *)
+ TEXT(SP_NAME_NEGOTIATE),
+ &SecurityPackage);
+ if(status != SEC_E_OK)
+ return CURLE_NOT_BUILT_IN;
+
+ /* 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);
+ s_pSecFn->FreeContextBuffer(SecurityPackage);
+ }
+
+ /* Obtain the input token, if any */
+ header += strlen("Negotiate");
+ 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 CURLE_LOGIN_DENIED;
+ }
+
+ /* 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 CURLE_OUT_OF_MEMORY;
+
+ if(userp && *userp) {
+ /* Populate our identity structure */
+ result = Curl_create_sspi_identity(userp, passwdp, &neg_ctx->identity);
+ if(result)
+ return result;
+
+ /* 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);
+ if(neg_ctx->status != SEC_E_OK)
+ return CURLE_LOGIN_DENIED;
+ }
+ else {
+ result = Curl_base64_decode(header,
+ (unsigned char **)&input_token,
+ &input_token_len);
+ if(result)
+ return result;
+
+ if(!input_token_len) {
+ infof(data,
+ "Negotiate handshake failure (empty challenge message)\n");
+
+ return CURLE_BAD_CONTENT_ENCODING;
+ }
+ }
+
+ /* Setup the "output" security buffer */
+ out_buff_desc.ulVersion = SECBUFFER_VERSION;
+ out_buff_desc.cBuffers = 1;
+ out_buff_desc.pBuffers = &out_sec_buff;
+ 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.cBuffers = 1;
+ in_buff_desc.pBuffers = &in_sec_buff;
+ in_sec_buff.BufferType = SECBUFFER_TOKEN;
+ in_sec_buff.pvBuffer = input_token;
+ in_sec_buff.cbBuffer = curlx_uztoul(input_token_len);
+ }
+
+ /* Generate our message */
+ neg_ctx->status = s_pSecFn->InitializeSecurityContext(
+ neg_ctx->credentials,
+ input_token ? neg_ctx->context : NULL,
+ neg_ctx->server_name,
+ ISC_REQ_CONFIDENTIALITY,
+ 0,
+ SECURITY_NATIVE_DREP,
+ input_token ? &in_buff_desc : NULL,
+ 0,
+ neg_ctx->context,
+ &out_buff_desc,
+ &attrs,
+ &expiry);
+
+ free(input_token);
+
+ if(GSS_ERROR(neg_ctx->status))
+ return CURLE_OUT_OF_MEMORY;
+
+ if(neg_ctx->status == SEC_I_COMPLETE_NEEDED ||
+ neg_ctx->status == SEC_I_COMPLETE_AND_CONTINUE) {
+ neg_ctx->status = s_pSecFn->CompleteAuthToken(neg_ctx->context,
+ &out_buff_desc);
+ if(GSS_ERROR(neg_ctx->status))
+ return CURLE_RECV_ERROR;
+ }
+
+ neg_ctx->output_token_length = out_sec_buff.cbBuffer;
+
+ return CURLE_OK;
+}
+
+CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
+{
+ struct negotiatedata *neg_ctx = proxy?&conn->data->state.proxyneg:
+ &conn->data->state.negotiate;
+ char *encoded = NULL;
+ size_t len = 0;
+ char *userp;
+ CURLcode error;
+
+ error = Curl_base64_encode(conn->data,
+ (const char*)neg_ctx->output_token,
+ neg_ctx->output_token_length,
+ &encoded, &len);
+ if(error)
+ return error;
+
+ if(!len)
+ return CURLE_REMOTE_ACCESS_DENIED;
+
+ userp = aprintf("%sAuthorization: Negotiate %s\r\n", proxy ? "Proxy-" : "",
+ encoded);
+
+ if(proxy) {
+ Curl_safefree(conn->allocptr.proxyuserpwd);
+ conn->allocptr.proxyuserpwd = userp;
+ }
+ else {
+ Curl_safefree(conn->allocptr.userpwd);
+ conn->allocptr.userpwd = userp;
+ }
+ free(encoded);
+ 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;
+ }
+
+ /* Free our credentials handle */
+ if(neg_ctx->credentials) {
+ s_pSecFn->FreeCredentialsHandle(neg_ctx->credentials);
+ free(neg_ctx->credentials);
+ neg_ctx->credentials = NULL;
+ }
+
+ /* 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);
+
+ /* Reset any variables */
+ neg_ctx->token_max = 0;
+}
+
+void Curl_cleanup_negotiate(struct SessionHandle *data)
+{
+ cleanup(&data->state.negotiate);
+ cleanup(&data->state.proxyneg);
+}
+
+#endif /* !CURL_DISABLE_HTTP && USE_SPNEGO */
+
+#endif /* USE_WINDOWS_SSPI */
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
deleted file mode 100644
index f5b696a6..00000000
--- a/lib/http_ntlm.c
+++ /dev/null
@@ -1,1305 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-/* NTLM details:
-
- http://davenport.sourceforge.net/ntlm.html
- http://www.innovation.ch/java/ntlm.html
-
- Another implementation:
- http://lxr.mozilla.org/mozilla/source/security/manager/ssl/src/nsNTLMAuthModule.cpp
-
-*/
-
-#ifndef CURL_DISABLE_HTTP
-#ifdef USE_NTLM
-
-#define DEBUG_ME 0
-
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
-#include <netdb.h>
-#endif
-
-#include "urldata.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-#include "sendf.h"
-#include "rawstr.h"
-#include "curl_base64.h"
-#include "http_ntlm.h"
-#include "url.h"
-#include "curl_gethostname.h"
-#include "curl_memory.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-/* "NTLMSSP" signature is always in ASCII regardless of the platform */
-#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"
-
-#ifdef USE_SSLEAY
-#include "ssluse.h"
-# ifdef USE_OPENSSL
-# include <openssl/des.h>
-# ifndef OPENSSL_NO_MD4
-# include <openssl/md4.h>
-# endif
-# include <openssl/md5.h>
-# include <openssl/ssl.h>
-# include <openssl/rand.h>
-# else
-# include <des.h>
-# ifndef OPENSSL_NO_MD4
-# include <md4.h>
-# endif
-# include <md5.h>
-# include <ssl.h>
-# include <rand.h>
-# endif
-
-#if OPENSSL_VERSION_NUMBER < 0x00907001L
-#define DES_key_schedule des_key_schedule
-#define DES_cblock des_cblock
-#define DES_set_odd_parity des_set_odd_parity
-#define DES_set_key des_set_key
-#define DES_ecb_encrypt des_ecb_encrypt
-
-/* This is how things were done in the old days */
-#define DESKEY(x) x
-#define DESKEYARG(x) x
-#else
-/* Modern version */
-#define DESKEYARG(x) *x
-#define DESKEY(x) &x
-#endif
-
-#ifdef OPENSSL_NO_MD4
-/* This requires MD4, but OpenSSL was compiled without it */
-#define USE_NTRESPONSES 0
-#define USE_NTLM2SESSION 0
-#endif
-
-#elif defined(USE_GNUTLS)
-
-#include "gtls.h"
-#include <gcrypt.h>
-
-#define MD5_DIGEST_LENGTH 16
-#define MD4_DIGEST_LENGTH 16
-
-#elif defined(USE_NSS)
-
-#include "curl_md4.h"
-#include "nssg.h"
-#include <nss.h>
-#include <pk11pub.h>
-#include <hasht.h>
-#define MD5_DIGEST_LENGTH MD5_LENGTH
-
-#elif defined(USE_WINDOWS_SSPI)
-
-#include "curl_sspi.h"
-
-#else
-# error "Can't compile NTLM support without a crypto library."
-#endif
-
-/* The last #include file should be: */
-#include "memdebug.h"
-
-#ifndef USE_NTRESPONSES
-/* Define this to make the type-3 message include the NT response message */
-#define USE_NTRESPONSES 1
-
-/* Define this to make the type-3 message include the NTLM2Session response
- message, requires USE_NTRESPONSES. */
-#define USE_NTLM2SESSION 1
-#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 */
-static unsigned int readint_le(unsigned char *buf) /* must point to a
- 4 bytes buffer*/
-{
- return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) |
- ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24);
-}
-#endif
-
-#if DEBUG_ME
-# define DEBUG_OUT(x) x
-static void print_flags(FILE *handle, unsigned long flags)
-{
- if(flags & NTLMFLAG_NEGOTIATE_UNICODE)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_UNICODE ");
- if(flags & NTLMFLAG_NEGOTIATE_OEM)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_OEM ");
- if(flags & NTLMFLAG_REQUEST_TARGET)
- fprintf(handle, "NTLMFLAG_REQUEST_TARGET ");
- if(flags & (1<<3))
- fprintf(handle, "NTLMFLAG_UNKNOWN_3 ");
- if(flags & NTLMFLAG_NEGOTIATE_SIGN)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_SIGN ");
- if(flags & NTLMFLAG_NEGOTIATE_SEAL)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_SEAL ");
- if(flags & NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE ");
- if(flags & NTLMFLAG_NEGOTIATE_LM_KEY)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_LM_KEY ");
- if(flags & NTLMFLAG_NEGOTIATE_NETWARE)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_NETWARE ");
- if(flags & NTLMFLAG_NEGOTIATE_NTLM_KEY)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM_KEY ");
- if(flags & (1<<10))
- fprintf(handle, "NTLMFLAG_UNKNOWN_10 ");
- if(flags & NTLMFLAG_NEGOTIATE_ANONYMOUS)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_ANONYMOUS ");
- if(flags & NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED ");
- if(flags & NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED ");
- if(flags & NTLMFLAG_NEGOTIATE_LOCAL_CALL)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_LOCAL_CALL ");
- if(flags & NTLMFLAG_NEGOTIATE_ALWAYS_SIGN)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_ALWAYS_SIGN ");
- if(flags & NTLMFLAG_TARGET_TYPE_DOMAIN)
- fprintf(handle, "NTLMFLAG_TARGET_TYPE_DOMAIN ");
- if(flags & NTLMFLAG_TARGET_TYPE_SERVER)
- fprintf(handle, "NTLMFLAG_TARGET_TYPE_SERVER ");
- if(flags & NTLMFLAG_TARGET_TYPE_SHARE)
- fprintf(handle, "NTLMFLAG_TARGET_TYPE_SHARE ");
- if(flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM2_KEY ");
- if(flags & NTLMFLAG_REQUEST_INIT_RESPONSE)
- fprintf(handle, "NTLMFLAG_REQUEST_INIT_RESPONSE ");
- if(flags & NTLMFLAG_REQUEST_ACCEPT_RESPONSE)
- fprintf(handle, "NTLMFLAG_REQUEST_ACCEPT_RESPONSE ");
- if(flags & NTLMFLAG_REQUEST_NONNT_SESSION_KEY)
- fprintf(handle, "NTLMFLAG_REQUEST_NONNT_SESSION_KEY ");
- if(flags & NTLMFLAG_NEGOTIATE_TARGET_INFO)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_TARGET_INFO ");
- if(flags & (1<<24))
- fprintf(handle, "NTLMFLAG_UNKNOWN_24 ");
- if(flags & (1<<25))
- fprintf(handle, "NTLMFLAG_UNKNOWN_25 ");
- if(flags & (1<<26))
- fprintf(handle, "NTLMFLAG_UNKNOWN_26 ");
- if(flags & (1<<27))
- fprintf(handle, "NTLMFLAG_UNKNOWN_27 ");
- if(flags & (1<<28))
- fprintf(handle, "NTLMFLAG_UNKNOWN_28 ");
- if(flags & NTLMFLAG_NEGOTIATE_128)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_128 ");
- if(flags & NTLMFLAG_NEGOTIATE_KEY_EXCHANGE)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_KEY_EXCHANGE ");
- if(flags & NTLMFLAG_NEGOTIATE_56)
- fprintf(handle, "NTLMFLAG_NEGOTIATE_56 ");
-}
-
-static void print_hex(FILE *handle, const char *buf, size_t len)
-{
- const char *p = buf;
- fprintf(stderr, "0x");
- while(len-- > 0)
- fprintf(stderr, "%02.2x", (unsigned int)*p++);
-}
-#else
-# define DEBUG_OUT(x)
-#endif
-
-/*
- (*) = A "security buffer" is a triplet consisting of two shorts and one
- long:
-
- 1. a 'short' containing the length of the buffer in bytes
- 2. a 'short' containing the allocated space for the buffer in bytes
- 3. a 'long' containing the offset to the start of the buffer from the
- beginning of the NTLM message, in bytes.
-*/
-
-
-CURLntlm Curl_input_ntlm(struct connectdata *conn,
- bool proxy, /* if proxy or not */
- const char *header) /* rest of the www-authenticate:
- header */
-{
- /* point to the correct struct with this */
- struct ntlmdata *ntlm;
-#ifndef USE_WINDOWS_SSPI
- static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 };
-#endif
-
-#ifdef USE_NSS
- if(CURLE_OK != Curl_nss_force_init(conn->data))
- return CURLNTLM_BAD;
-#endif
-
- ntlm = proxy?&conn->proxyntlm:&conn->ntlm;
-
- /* skip initial whitespaces */
- while(*header && ISSPACE(*header))
- header++;
-
- if(checkprefix("NTLM", header)) {
- header += strlen("NTLM");
-
- while(*header && ISSPACE(*header))
- header++;
-
- if(*header) {
- /* We got a type-2 message here:
-
- Index Description Content
- 0 NTLMSSP Signature Null-terminated ASCII "NTLMSSP"
- (0x4e544c4d53535000)
- 8 NTLM Message Type long (0x02000000)
- 12 Target Name security buffer(*)
- 20 Flags long
- 24 Challenge 8 bytes
- (32) Context (optional) 8 bytes (two consecutive longs)
- (40) Target Information (optional) security buffer(*)
- 32 (48) start of data block
- */
- size_t size;
- unsigned char *buffer;
- size = Curl_base64_decode(header, &buffer);
- if(!buffer)
- return CURLNTLM_BAD;
-
- ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */
-
-#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 = size;
- memcpy(ntlm->type_2, buffer, size);
-#else
- ntlm->flags = 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(buffer);
- return CURLNTLM_BAD;
- }
-
- ntlm->flags = readint_le(&buffer[20]);
- memcpy(ntlm->nonce, &buffer[24], 8);
-
- DEBUG_OUT({
- fprintf(stderr, "**** TYPE2 header flags=0x%08.8lx ", ntlm->flags);
- print_flags(stderr, ntlm->flags);
- fprintf(stderr, "\n nonce=");
- print_hex(stderr, (char *)ntlm->nonce, 8);
- fprintf(stderr, "\n****\n");
- fprintf(stderr, "**** Header %s\n ", header);
- });
-#endif
- free(buffer);
- }
- else {
- if(ntlm->state >= NTLMSTATE_TYPE1)
- return CURLNTLM_BAD;
-
- ntlm->state = NTLMSTATE_TYPE1; /* we should sent away a type-1 */
- }
- }
- return CURLNTLM_FINE;
-}
-
-#ifndef USE_WINDOWS_SSPI
-
-#ifdef 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.
- */
-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));
- 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);
-
- DES_set_odd_parity(&key);
- DES_set_key(&key, ks);
-}
-
-#else /* defined(USE_SSLEAY) */
-
-/*
- * Turns a 56 bit key into the 64 bit, odd parity key. Used by GnuTLS and NSS.
- */
-static void extend_key_56_to_64(const unsigned char *key_56, char *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));
- 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);
-}
-
-#if defined(USE_GNUTLS)
-
-/*
- * Turns a 56 bit key into the 64 bit, odd parity key and sets the key.
- */
-static void setup_des_key(const unsigned char *key_56,
- gcry_cipher_hd_t *des)
-{
- char key[8];
- extend_key_56_to_64(key_56, key);
- gcry_cipher_setkey(*des, key, 8);
-}
-
-#elif defined(USE_NSS)
-
-/*
- * Expands a 56 bit key KEY_56 to 64 bit and encrypts 64 bit of data, using
- * the expanded key. The caller is responsible for giving 64 bit of valid
- * data is IN and (at least) 64 bit large buffer as OUT.
- */
-static bool encrypt_des(const unsigned char *in, unsigned char *out,
- const unsigned char *key_56)
-{
- const CK_MECHANISM_TYPE mech = CKM_DES_ECB; /* DES cipher in ECB mode */
- PK11SlotInfo *slot = NULL;
- char key[8]; /* expanded 64 bit key */
- SECItem key_item;
- PK11SymKey *symkey = NULL;
- SECItem *param = NULL;
- PK11Context *ctx = NULL;
- int out_len; /* not used, required by NSS */
- bool rv = FALSE;
-
- /* use internal slot for DES encryption (requires NSS to be initialized) */
- slot = PK11_GetInternalKeySlot();
- if(!slot)
- return FALSE;
-
- /* expand the 56 bit key to 64 bit and wrap by NSS */
- extend_key_56_to_64(key_56, key);
- key_item.data = (unsigned char *)key;
- key_item.len = /* hard-wired */ 8;
- symkey = PK11_ImportSymKey(slot, mech, PK11_OriginUnwrap, CKA_ENCRYPT,
- &key_item, NULL);
- if(!symkey)
- goto fail;
-
- /* create DES encryption context */
- param = PK11_ParamFromIV(mech, /* no IV in ECB mode */ NULL);
- if(!param)
- goto fail;
- ctx = PK11_CreateContextBySymKey(mech, CKA_ENCRYPT, symkey, param);
- if(!ctx)
- goto fail;
-
- /* perform the encryption */
- if(SECSuccess == PK11_CipherOp(ctx, out, &out_len, /* outbuflen */ 8,
- (unsigned char *)in, /* inbuflen */ 8)
- && SECSuccess == PK11_Finalize(ctx))
- rv = /* all OK */ TRUE;
-
-fail:
- /* cleanup */
- if(ctx)
- PK11_DestroyContext(ctx, PR_TRUE);
- if(symkey)
- PK11_FreeSymKey(symkey);
- if(param)
- SECITEM_FreeItem(param, PR_TRUE);
- PK11_FreeSlot(slot);
- return rv;
-}
-
-#endif /* defined(USE_NSS) */
-
-#endif /* defined(USE_SSLEAY) */
-
- /*
- * takes a 21 byte array and treats it as 3 56-bit DES keys. The
- * 8 byte plaintext is encrypted with each key and the resulting 24
- * bytes are stored in the results array.
- */
-static void lm_resp(const unsigned char *keys,
- const unsigned char *plaintext,
- unsigned char *results)
-{
-#ifdef USE_SSLEAY
- DES_key_schedule ks;
-
- setup_des_key(keys, DESKEY(ks));
- DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) results,
- DESKEY(ks), DES_ENCRYPT);
-
- setup_des_key(keys+7, DESKEY(ks));
- DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results+8),
- DESKEY(ks), DES_ENCRYPT);
-
- setup_des_key(keys+14, DESKEY(ks));
- DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results+16),
- DESKEY(ks), DES_ENCRYPT);
-#elif defined(USE_GNUTLS)
- gcry_cipher_hd_t des;
-
- gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
- setup_des_key(keys, &des);
- gcry_cipher_encrypt(des, results, 8, plaintext, 8);
- gcry_cipher_close(des);
-
- gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
- setup_des_key(keys+7, &des);
- gcry_cipher_encrypt(des, results+8, 8, plaintext, 8);
- gcry_cipher_close(des);
-
- gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
- setup_des_key(keys+14, &des);
- gcry_cipher_encrypt(des, results+16, 8, plaintext, 8);
- gcry_cipher_close(des);
-#elif defined(USE_NSS)
- encrypt_des(plaintext, results, keys);
- encrypt_des(plaintext, results+8, keys+7);
- encrypt_des(plaintext, results+16, keys+14);
-#endif
-}
-
-
-/*
- * Set up lanmanager hashed password
- */
-static void mk_lm_hash(struct SessionHandle *data,
- const char *password,
- unsigned char *lmbuffer /* 21 bytes */)
-{
- unsigned char pw[14];
- static const unsigned char magic[] = {
- 0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
- };
- size_t len = CURLMIN(strlen(password), 14);
-
- Curl_strntoupper((char *)pw, password, len);
- memset(&pw[len], 0, 14-len);
-
-#ifdef CURL_DOES_CONVERSIONS
- /*
- * The LanManager hashed password needs to be created using the
- * password in the network encoding not the host encoding.
- */
- if(data)
- Curl_convert_to_network(data, (char *)pw, 14);
-#else
- (void)data;
-#endif
-
- {
- /* Create LanManager hashed password. */
-
-#ifdef USE_SSLEAY
- DES_key_schedule ks;
-
- setup_des_key(pw, DESKEY(ks));
- DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)lmbuffer,
- DESKEY(ks), DES_ENCRYPT);
-
- setup_des_key(pw+7, DESKEY(ks));
- DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)(lmbuffer+8),
- DESKEY(ks), DES_ENCRYPT);
-#elif defined(USE_GNUTLS)
- gcry_cipher_hd_t des;
-
- gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
- setup_des_key(pw, &des);
- gcry_cipher_encrypt(des, lmbuffer, 8, magic, 8);
- gcry_cipher_close(des);
-
- gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
- setup_des_key(pw+7, &des);
- gcry_cipher_encrypt(des, lmbuffer+8, 8, magic, 8);
- gcry_cipher_close(des);
-#elif defined(USE_NSS)
- encrypt_des(magic, lmbuffer, pw);
- encrypt_des(magic, lmbuffer+8, pw+7);
-#endif
-
- memset(lmbuffer + 16, 0, 21 - 16);
- }
-}
-
-#if USE_NTRESPONSES
-static void ascii_to_unicode_le(unsigned char *dest, const char *src,
- size_t srclen)
-{
- size_t i;
- for (i=0; i<srclen; i++) {
- dest[2*i] = (unsigned char)src[i];
- dest[2*i+1] = '\0';
- }
-}
-
-/*
- * Set up nt hashed passwords
- */
-static CURLcode mk_nt_hash(struct SessionHandle *data,
- const char *password,
- unsigned char *ntbuffer /* 21 bytes */)
-{
- size_t len = strlen(password);
- unsigned char *pw = malloc(len*2);
- if(!pw)
- return CURLE_OUT_OF_MEMORY;
-
- ascii_to_unicode_le(pw, password, len);
-
-#ifdef CURL_DOES_CONVERSIONS
- /*
- * The NT hashed password needs to be created using the
- * password in the network encoding not the host encoding.
- */
- if(data)
- Curl_convert_to_network(data, (char *)pw, len*2);
-#else
- (void)data;
-#endif
-
- {
- /* Create NT hashed password. */
-#ifdef USE_SSLEAY
- MD4_CTX MD4pw;
- MD4_Init(&MD4pw);
- MD4_Update(&MD4pw, pw, 2*len);
- MD4_Final(ntbuffer, &MD4pw);
-#elif defined(USE_GNUTLS)
- gcry_md_hd_t MD4pw;
- gcry_md_open(&MD4pw, GCRY_MD_MD4, 0);
- gcry_md_write(MD4pw, pw, 2*len);
- memcpy (ntbuffer, gcry_md_read (MD4pw, 0), MD4_DIGEST_LENGTH);
- gcry_md_close(MD4pw);
-#elif defined(USE_NSS)
- Curl_md4it(ntbuffer, pw, 2*len);
-#endif
-
- memset(ntbuffer + 16, 0, 21 - 16);
- }
-
- free(pw);
- return CURLE_OK;
-}
-#endif
-
-
-#endif
-
-#ifdef USE_WINDOWS_SSPI
-
-static void
-ntlm_sspi_cleanup(struct ntlmdata *ntlm)
-{
- if(ntlm->type_2) {
- free(ntlm->type_2);
- ntlm->type_2 = NULL;
- }
- if(ntlm->has_handles) {
- s_pSecFn->DeleteSecurityContext(&ntlm->c_handle);
- s_pSecFn->FreeCredentialsHandle(&ntlm->handle);
- ntlm->has_handles = 0;
- }
- if(ntlm->p_identity) {
- if(ntlm->identity.User) free(ntlm->identity.User);
- if(ntlm->identity.Password) free(ntlm->identity.Password);
- if(ntlm->identity.Domain) free(ntlm->identity.Domain);
- ntlm->p_identity = NULL;
- }
-}
-
-#endif
-
-#define SHORTPAIR(x) ((x) & 0xff), (((x) >> 8) & 0xff)
-#define LONGQUARTET(x) ((x) & 0xff), (((x) >> 8)&0xff), \
- (((x) >>16)&0xff), (((x)>>24) & 0xff)
-
-#define HOSTNAME_MAX 1024
-
-/* this is for creating ntlm header output */
-CURLcode Curl_output_ntlm(struct connectdata *conn,
- bool proxy)
-{
- const char *domain=""; /* empty */
- char host [HOSTNAME_MAX+ 1] = ""; /* empty */
-#ifndef USE_WINDOWS_SSPI
- size_t domlen = strlen(domain);
- size_t hostlen = strlen(host);
- size_t hostoff; /* host name offset */
- size_t domoff; /* domain name offset */
-#endif
- size_t size;
- char *base64=NULL;
- unsigned char ntlmbuf[1024]; /* enough, unless the user+host+domain is very
- long */
-
- /* point to the address of the pointer that holds the string to sent to the
- server, which is for a plain host or for a HTTP proxy */
- char **allocuserpwd;
-
- /* point to the name and password for this */
- const char *userp;
- const char *passwdp;
- /* point to the correct struct with this */
- struct ntlmdata *ntlm;
- struct auth *authp;
-
- DEBUGASSERT(conn);
- DEBUGASSERT(conn->data);
-
-#ifdef USE_NSS
- if(CURLE_OK != Curl_nss_force_init(conn->data))
- return CURLE_OUT_OF_MEMORY;
-#endif
-
- if(proxy) {
- allocuserpwd = &conn->allocptr.proxyuserpwd;
- userp = conn->proxyuser;
- passwdp = conn->proxypasswd;
- ntlm = &conn->proxyntlm;
- authp = &conn->data->state.authproxy;
- }
- else {
- allocuserpwd = &conn->allocptr.userpwd;
- userp = conn->user;
- passwdp = conn->passwd;
- ntlm = &conn->ntlm;
- authp = &conn->data->state.authhost;
- }
- authp->done = FALSE;
-
- /* not set means empty */
- if(!userp)
- userp="";
-
- if(!passwdp)
- passwdp="";
-
-#ifdef USE_WINDOWS_SSPI
- if (s_hSecDll == NULL) {
- /* not thread safe and leaks - use curl_global_init() to avoid */
- CURLcode err = Curl_sspi_global_init();
- if (s_hSecDll == NULL)
- return err;
- }
-#endif
-
- switch(ntlm->state) {
- case NTLMSTATE_TYPE1:
- default: /* for the weird cases we (re)start here */
-#ifdef USE_WINDOWS_SSPI
- {
- SecBuffer buf;
- SecBufferDesc desc;
- SECURITY_STATUS status;
- ULONG attrs;
- const char *user;
- int domlen;
- TimeStamp tsDummy; /* For Windows 9x compatibility of SPPI calls */
-
- ntlm_sspi_cleanup(ntlm);
-
- user = strchr(userp, '\\');
- if(!user)
- user = strchr(userp, '/');
-
- if(user) {
- domain = userp;
- domlen = user - userp;
- user++;
- }
- else {
- user = userp;
- domain = "";
- domlen = 0;
- }
-
- if(user && *user) {
- /* note: initialize all of this before doing the mallocs so that
- * it can be cleaned up later without leaking memory.
- */
- ntlm->p_identity = &ntlm->identity;
- memset(ntlm->p_identity, 0, sizeof(*ntlm->p_identity));
- if((ntlm->identity.User = (unsigned char *)strdup(user)) == NULL)
- return CURLE_OUT_OF_MEMORY;
- ntlm->identity.UserLength = strlen(user);
- if((ntlm->identity.Password = (unsigned char *)strdup(passwdp)) == NULL)
- return CURLE_OUT_OF_MEMORY;
- ntlm->identity.PasswordLength = strlen(passwdp);
- if((ntlm->identity.Domain = malloc(domlen+1)) == NULL)
- return CURLE_OUT_OF_MEMORY;
- strncpy((char *)ntlm->identity.Domain, domain, domlen);
- ntlm->identity.Domain[domlen] = '\0';
- ntlm->identity.DomainLength = domlen;
- ntlm->identity.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI;
- }
- else {
- ntlm->p_identity = NULL;
- }
-
- if(s_pSecFn->AcquireCredentialsHandleA(
- NULL, (char *)"NTLM", SECPKG_CRED_OUTBOUND, NULL, ntlm->p_identity,
- NULL, NULL, &ntlm->handle, &tsDummy
- ) != SEC_E_OK) {
- return CURLE_OUT_OF_MEMORY;
- }
-
- desc.ulVersion = SECBUFFER_VERSION;
- desc.cBuffers = 1;
- desc.pBuffers = &buf;
- buf.cbBuffer = sizeof(ntlmbuf);
- buf.BufferType = SECBUFFER_TOKEN;
- buf.pvBuffer = ntlmbuf;
-
- status = s_pSecFn->InitializeSecurityContextA(&ntlm->handle, NULL,
- (char *) host,
- ISC_REQ_CONFIDENTIALITY |
- ISC_REQ_REPLAY_DETECT |
- ISC_REQ_CONNECTION,
- 0, SECURITY_NETWORK_DREP,
- NULL, 0,
- &ntlm->c_handle, &desc,
- &attrs, &tsDummy);
-
- if(status == SEC_I_COMPLETE_AND_CONTINUE ||
- status == SEC_I_CONTINUE_NEEDED) {
- s_pSecFn->CompleteAuthToken(&ntlm->c_handle, &desc);
- }
- else if(status != SEC_E_OK) {
- s_pSecFn->FreeCredentialsHandle(&ntlm->handle);
- return CURLE_RECV_ERROR;
- }
-
- ntlm->has_handles = 1;
- size = buf.cbBuffer;
- }
-#else
- hostoff = 0;
- domoff = hostoff + hostlen; /* This is 0: remember that host and domain
- are empty */
-
- /* Create and send a type-1 message:
-
- Index Description Content
- 0 NTLMSSP Signature Null-terminated ASCII "NTLMSSP"
- (0x4e544c4d53535000)
- 8 NTLM Message Type long (0x01000000)
- 12 Flags long
- 16 Supplied Domain security buffer(*)
- 24 Supplied Workstation security buffer(*)
- 32 start of data block
-
- */
-#if USE_NTLM2SESSION
-#define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY
-#else
-#define NTLM2FLAG 0
-#endif
- snprintf((char *)ntlmbuf, sizeof(ntlmbuf), NTLMSSP_SIGNATURE "%c"
- "\x01%c%c%c" /* 32-bit type = 1 */
- "%c%c%c%c" /* 32-bit NTLM flag field */
- "%c%c" /* domain length */
- "%c%c" /* domain allocated space */
- "%c%c" /* domain name offset */
- "%c%c" /* 2 zeroes */
- "%c%c" /* host length */
- "%c%c" /* host allocated space */
- "%c%c" /* host name offset */
- "%c%c" /* 2 zeroes */
- "%s" /* host name */
- "%s", /* domain string */
- 0, /* trailing zero */
- 0,0,0, /* part of type-1 long */
-
- LONGQUARTET(
- NTLMFLAG_NEGOTIATE_OEM|
- NTLMFLAG_REQUEST_TARGET|
- NTLMFLAG_NEGOTIATE_NTLM_KEY|
- NTLM2FLAG|
- NTLMFLAG_NEGOTIATE_ALWAYS_SIGN
- ),
- SHORTPAIR(domlen),
- SHORTPAIR(domlen),
- SHORTPAIR(domoff),
- 0,0,
- SHORTPAIR(hostlen),
- SHORTPAIR(hostlen),
- SHORTPAIR(hostoff),
- 0,0,
- host /* this is empty */, domain /* this is empty */);
-
- /* 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 ",
- LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM|
- NTLMFLAG_REQUEST_TARGET|
- NTLMFLAG_NEGOTIATE_NTLM_KEY|
- NTLM2FLAG|
- NTLMFLAG_NEGOTIATE_ALWAYS_SIGN),
- NTLMFLAG_NEGOTIATE_OEM|
- NTLMFLAG_REQUEST_TARGET|
- NTLMFLAG_NEGOTIATE_NTLM_KEY|
- NTLM2FLAG|
- NTLMFLAG_NEGOTIATE_ALWAYS_SIGN);
- print_flags(stderr,
- NTLMFLAG_NEGOTIATE_OEM|
- NTLMFLAG_REQUEST_TARGET|
- NTLMFLAG_NEGOTIATE_NTLM_KEY|
- NTLM2FLAG|
- NTLMFLAG_NEGOTIATE_ALWAYS_SIGN);
- fprintf(stderr, "\n****\n");
- });
-
- /* now size is the size of the base64 encoded package size */
- size = Curl_base64_encode(NULL, (char *)ntlmbuf, size, &base64);
-
- if(size >0 ) {
- Curl_safefree(*allocuserpwd);
- *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
- proxy?"Proxy-":"",
- base64);
- DEBUG_OUT(fprintf(stderr, "**** Header %s\n ", *allocuserpwd));
- free(base64);
- }
- else
- return CURLE_OUT_OF_MEMORY; /* FIX TODO */
-
- break;
-
- case NTLMSTATE_TYPE2:
- /* We received the type-2 message already, create a type-3 message:
-
- Index Description Content
- 0 NTLMSSP Signature Null-terminated ASCII "NTLMSSP"
- (0x4e544c4d53535000)
- 8 NTLM Message Type long (0x03000000)
- 12 LM/LMv2 Response security buffer(*)
- 20 NTLM/NTLMv2 Response security buffer(*)
- 28 Domain Name security buffer(*)
- 36 User Name security buffer(*)
- 44 Workstation Name security buffer(*)
- (52) Session Key (optional) security buffer(*)
- (60) Flags (optional) long
- 52 (64) start of data block
-
- */
-
- {
-#ifdef USE_WINDOWS_SSPI
- SecBuffer type_2, type_3;
- SecBufferDesc type_2_desc, type_3_desc;
- SECURITY_STATUS status;
- ULONG attrs;
- TimeStamp tsDummy; /* For Windows 9x compatibility of SPPI calls */
-
- type_2_desc.ulVersion = type_3_desc.ulVersion = SECBUFFER_VERSION;
- type_2_desc.cBuffers = type_3_desc.cBuffers = 1;
- type_2_desc.pBuffers = &type_2;
- type_3_desc.pBuffers = &type_3;
-
- type_2.BufferType = SECBUFFER_TOKEN;
- type_2.pvBuffer = ntlm->type_2;
- type_2.cbBuffer = ntlm->n_type_2;
- type_3.BufferType = SECBUFFER_TOKEN;
- type_3.pvBuffer = ntlmbuf;
- type_3.cbBuffer = sizeof(ntlmbuf);
-
- status = s_pSecFn->InitializeSecurityContextA(&ntlm->handle, &ntlm->c_handle,
- (char *) host,
- 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.cbBuffer;
-
- ntlm_sspi_cleanup(ntlm);
-
-#else
- int lmrespoff;
- unsigned char lmresp[24]; /* fixed-size */
-#if USE_NTRESPONSES
- int ntrespoff;
- unsigned char ntresp[24]; /* fixed-size */
-#endif
- size_t useroff;
- const char *user;
- size_t userlen;
-
- user = strchr(userp, '\\');
- if(!user)
- user = strchr(userp, '/');
-
- if(user) {
- domain = userp;
- domlen = (user - domain);
- user++;
- }
- else
- user = userp;
- userlen = strlen(user);
-
- if(Curl_gethostname(host, HOSTNAME_MAX)) {
- infof(conn->data, "gethostname() failed, continuing without!");
- hostlen = 0;
- }
- else {
- /* If the workstation if configured with a full DNS name (i.e.
- * workstation.somewhere.net) gethostname() returns the fully qualified
- * name, which NTLM doesn't like.
- */
- char *dot = strchr(host, '.');
- if(dot)
- *dot = '\0';
- hostlen = strlen(host);
- }
-
-#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];
- unsigned char tmp[0x18];
- unsigned char md5sum[MD5_DIGEST_LENGTH];
- unsigned char entropy[8];
-
- /* Need to create 8 bytes random data */
-#ifdef USE_SSLEAY
- MD5_CTX MD5pw;
- Curl_ossl_seed(conn->data); /* Initiate the seed if not already done */
- RAND_bytes(entropy,8);
-#elif defined(USE_GNUTLS)
- gcry_md_hd_t MD5pw;
- Curl_gtls_seed(conn->data); /* Initiate the seed if not already done */
- gcry_randomize(entropy, 8, GCRY_STRONG_RANDOM);
-#elif defined(USE_NSS)
- PK11Context *MD5pw;
- unsigned int outlen;
- Curl_nss_seed(conn->data); /* Initiate the seed if not already done */
- PK11_GenerateRandom(entropy, 8);
-#endif
-
- /* 8 bytes random data as challenge in lmresp */
- memcpy(lmresp,entropy,8);
- /* Pad with zeros */
- memset(lmresp+8,0,0x10);
-
- /* Fill tmp with challenge(nonce?) + entropy */
- memcpy(tmp,&ntlm->nonce[0],8);
- memcpy(tmp+8,entropy,8);
-
-#ifdef USE_SSLEAY
- MD5_Init(&MD5pw);
- MD5_Update(&MD5pw, tmp, 16);
- MD5_Final(md5sum, &MD5pw);
-#elif defined(USE_GNUTLS)
- gcry_md_open(&MD5pw, GCRY_MD_MD5, 0);
- gcry_md_write(MD5pw, tmp, MD5_DIGEST_LENGTH);
- memcpy(md5sum, gcry_md_read (MD5pw, 0), MD5_DIGEST_LENGTH);
- gcry_md_close(MD5pw);
-#elif defined(USE_NSS)
- MD5pw = PK11_CreateDigestContext(SEC_OID_MD5);
- PK11_DigestOp(MD5pw, tmp, 16);
- PK11_DigestFinal(MD5pw, md5sum, &outlen, MD5_DIGEST_LENGTH);
- PK11_DestroyContext(MD5pw, PR_TRUE);
-#endif
-
- /* We shall only use the first 8 bytes of md5sum,
- but the des code in lm_resp only encrypt the first 8 bytes */
- if(mk_nt_hash(conn->data, passwdp, ntbuffer) == CURLE_OUT_OF_MEMORY)
- return CURLE_OUT_OF_MEMORY;
- lm_resp(ntbuffer, md5sum, ntresp);
-
- /* End of NTLM2 Session code */
- }
- else
-#endif
- {
-
-#if USE_NTRESPONSES
- unsigned char ntbuffer[0x18];
-#endif
- unsigned char lmbuffer[0x18];
-
-#if USE_NTRESPONSES
- if(mk_nt_hash(conn->data, passwdp, ntbuffer) == CURLE_OUT_OF_MEMORY)
- return CURLE_OUT_OF_MEMORY;
- lm_resp(ntbuffer, &ntlm->nonce[0], ntresp);
-#endif
-
- mk_lm_hash(conn->data, passwdp, lmbuffer);
- lm_resp(lmbuffer, &ntlm->nonce[0], lmresp);
- /* A safer but less compatible alternative is:
- * lm_resp(ntbuffer, &ntlm->nonce[0], lmresp);
- * See http://davenport.sourceforge.net/ntlm.html#ntlmVersion2 */
- }
-
- lmrespoff = 64; /* size of the message header */
-#if USE_NTRESPONSES
- ntrespoff = lmrespoff + 0x18;
- domoff = ntrespoff + 0x18;
-#else
- domoff = lmrespoff + 0x18;
-#endif
- useroff = domoff + domlen;
- hostoff = useroff + userlen;
-
- /*
- * In the case the server sets the flag NTLMFLAG_NEGOTIATE_UNICODE, we
- * need to filter it off because libcurl doesn't UNICODE encode the
- * strings it packs into the NTLM authenticate packet.
- */
- ntlm->flags &= ~NTLMFLAG_NEGOTIATE_UNICODE;
-
- /* Create the big type-3 message binary blob */
- size = snprintf((char *)ntlmbuf, sizeof(ntlmbuf),
- NTLMSSP_SIGNATURE "%c"
- "\x03%c%c%c" /* type-3, 32 bits */
-
- "%c%c" /* LanManager length */
- "%c%c" /* LanManager allocated space */
- "%c%c" /* LanManager offset */
- "%c%c" /* 2 zeroes */
-
- "%c%c" /* NT-response length */
- "%c%c" /* NT-response allocated space */
- "%c%c" /* NT-response offset */
- "%c%c" /* 2 zeroes */
-
- "%c%c" /* domain length */
- "%c%c" /* domain allocated space */
- "%c%c" /* domain name offset */
- "%c%c" /* 2 zeroes */
-
- "%c%c" /* user length */
- "%c%c" /* user allocated space */
- "%c%c" /* user offset */
- "%c%c" /* 2 zeroes */
-
- "%c%c" /* host length */
- "%c%c" /* host allocated space */
- "%c%c" /* host offset */
- "%c%c" /* 2 zeroes */
-
- "%c%c" /* session key length (unknown purpose) */
- "%c%c" /* session key allocated space (unknown purpose) */
- "%c%c" /* session key offset (unknown purpose) */
- "%c%c" /* 2 zeroes */
-
- "%c%c%c%c" /* flags */
-
- /* domain string */
- /* user string */
- /* host string */
- /* LanManager response */
- /* NT response */
- ,
- 0, /* zero termination */
- 0,0,0, /* type-3 long, the 24 upper bits */
-
- SHORTPAIR(0x18), /* LanManager response length, twice */
- SHORTPAIR(0x18),
- SHORTPAIR(lmrespoff),
- 0x0, 0x0,
-
-#if USE_NTRESPONSES
- SHORTPAIR(0x18), /* NT-response length, twice */
- SHORTPAIR(0x18),
- SHORTPAIR(ntrespoff),
- 0x0, 0x0,
-#else
- 0x0, 0x0,
- 0x0, 0x0,
- 0x0, 0x0,
- 0x0, 0x0,
-#endif
- SHORTPAIR(domlen),
- SHORTPAIR(domlen),
- SHORTPAIR(domoff),
- 0x0, 0x0,
-
- SHORTPAIR(userlen),
- SHORTPAIR(userlen),
- SHORTPAIR(useroff),
- 0x0, 0x0,
-
- SHORTPAIR(hostlen),
- SHORTPAIR(hostlen),
- SHORTPAIR(hostoff),
- 0x0, 0x0,
-
- 0x0, 0x0,
- 0x0, 0x0,
- 0x0, 0x0,
- 0x0, 0x0,
-
- LONGQUARTET(ntlm->flags));
- DEBUGASSERT(size==64);
-
- DEBUGASSERT(size == (size_t)lmrespoff);
- /* We append the binary hashes */
- if(size < (sizeof(ntlmbuf) - 0x18)) {
- memcpy(&ntlmbuf[size], lmresp, 0x18);
- size += 0x18;
- }
-
- DEBUG_OUT({
- fprintf(stderr, "**** TYPE3 header lmresp=");
- print_hex(stderr, (char *)&ntlmbuf[lmrespoff], 0x18);
- });
-
-#if USE_NTRESPONSES
- if(size < (sizeof(ntlmbuf) - 0x18)) {
- DEBUGASSERT(size == (size_t)ntrespoff);
- memcpy(&ntlmbuf[size], ntresp, 0x18);
- size += 0x18;
- }
-
- DEBUG_OUT({
- fprintf(stderr, "\n ntresp=");
- print_hex(stderr, (char *)&ntlmbuf[ntrespoff], 0x18);
- });
-
-#endif
-
- DEBUG_OUT({
- fprintf(stderr, "\n flags=0x%02.2x%02.2x%02.2x%02.2x 0x%08.8x ",
- LONGQUARTET(ntlm->flags), ntlm->flags);
- print_flags(stderr, ntlm->flags);
- fprintf(stderr, "\n****\n");
- });
-
-
- /* Make sure that the domain, user and host strings fit in the target
- buffer before we copy them there. */
- if(size + userlen + domlen + hostlen >= sizeof(ntlmbuf)) {
- failf(conn->data, "user + domain + host name too big");
- return CURLE_OUT_OF_MEMORY;
- }
-
- DEBUGASSERT(size == domoff);
- memcpy(&ntlmbuf[size], domain, domlen);
- size += domlen;
-
- DEBUGASSERT(size == useroff);
- memcpy(&ntlmbuf[size], user, userlen);
- size += userlen;
-
- DEBUGASSERT(size == hostoff);
- memcpy(&ntlmbuf[size], host, hostlen);
- size += hostlen;
-
-#ifdef CURL_DOES_CONVERSIONS
- /* convert domain, user, and host to ASCII but leave the rest as-is */
- if(CURLE_OK != Curl_convert_to_network(conn->data,
- (char *)&ntlmbuf[domoff],
- size-domoff)) {
- return CURLE_CONV_FAILED;
- }
-#endif /* CURL_DOES_CONVERSIONS */
-
-#endif
-
- /* convert the binary blob into base64 */
- size = Curl_base64_encode(NULL, (char *)ntlmbuf, size, &base64);
-
- if(size >0 ) {
- Curl_safefree(*allocuserpwd);
- *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
- proxy?"Proxy-":"",
- base64);
- DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd));
- free(base64);
- }
- else
- return CURLE_OUT_OF_MEMORY; /* FIX TODO */
-
- ntlm->state = NTLMSTATE_TYPE3; /* we sent a type-3 */
- authp->done = TRUE;
- }
- break;
-
- case NTLMSTATE_TYPE3:
- /* connection is already authenticated,
- * don't send a header in future requests */
- if(*allocuserpwd) {
- free(*allocuserpwd);
- *allocuserpwd=NULL;
- }
- authp->done = TRUE;
- break;
- }
-
- return CURLE_OK;
-}
-
-
-void
-Curl_ntlm_cleanup(struct connectdata *conn)
-{
-#ifdef USE_WINDOWS_SSPI
- ntlm_sspi_cleanup(&conn->ntlm);
- ntlm_sspi_cleanup(&conn->proxyntlm);
-#else
- (void)conn;
-#endif
-}
-
-
-#endif /* USE_NTLM */
-#endif /* !CURL_DISABLE_HTTP */
diff --git a/lib/http_ntlm.h b/lib/http_ntlm.h
deleted file mode 100644
index c7422d70..00000000
--- a/lib/http_ntlm.h
+++ /dev/null
@@ -1,149 +0,0 @@
-#ifndef __HTTP_NTLM_H
-#define __HTTP_NTLM_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-typedef enum {
- CURLNTLM_NONE, /* not a ntlm */
- CURLNTLM_BAD, /* an ntlm, but one we don't like */
- CURLNTLM_FIRST, /* the first 401-reply we got with NTLM */
- CURLNTLM_FINE, /* an ntlm we act on */
-
- CURLNTLM_LAST /* last entry in this enum, don't use */
-} CURLntlm;
-
-/* this is for ntlm header input */
-CURLntlm Curl_input_ntlm(struct connectdata *conn, bool proxy,
- const char *header);
-
-/* this is for creating ntlm header output */
-CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy);
-
-void Curl_ntlm_cleanup(struct connectdata *conn);
-#ifndef USE_NTLM
-#define Curl_ntlm_cleanup(x)
-#endif
-
-/* Flag bits definitions based on http://davenport.sourceforge.net/ntlm.html */
-
-#define NTLMFLAG_NEGOTIATE_UNICODE (1<<0)
-/* Indicates that Unicode strings are supported for use in security buffer
- data. */
-
-#define NTLMFLAG_NEGOTIATE_OEM (1<<1)
-/* Indicates that OEM strings are supported for use in security buffer data. */
-
-#define NTLMFLAG_REQUEST_TARGET (1<<2)
-/* Requests that the server's authentication realm be included in the Type 2
- message. */
-
-/* unknown (1<<3) */
-#define NTLMFLAG_NEGOTIATE_SIGN (1<<4)
-/* Specifies that authenticated communication between the client and server
- should carry a digital signature (message integrity). */
-
-#define NTLMFLAG_NEGOTIATE_SEAL (1<<5)
-/* Specifies that authenticated communication between the client and server
- should be encrypted (message confidentiality). */
-
-#define NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE (1<<6)
-/* Indicates that datagram authentication is being used. */
-
-#define NTLMFLAG_NEGOTIATE_LM_KEY (1<<7)
-/* Indicates that the LAN Manager session key should be used for signing and
- sealing authenticated communications. */
-
-#define NTLMFLAG_NEGOTIATE_NETWARE (1<<8)
-/* unknown purpose */
-
-#define NTLMFLAG_NEGOTIATE_NTLM_KEY (1<<9)
-/* Indicates that NTLM authentication is being used. */
-
-/* unknown (1<<10) */
-
-#define NTLMFLAG_NEGOTIATE_ANONYMOUS (1<<11)
-/* Sent by the client in the Type 3 message to indicate that an anonymous
- context has been established. This also affects the response fields. */
-
-#define NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED (1<<12)
-/* Sent by the client in the Type 1 message to indicate that a desired
- authentication realm is included in the message. */
-
-#define NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED (1<<13)
-/* Sent by the client in the Type 1 message to indicate that the client
- workstation's name is included in the message. */
-
-#define NTLMFLAG_NEGOTIATE_LOCAL_CALL (1<<14)
-/* Sent by the server to indicate that the server and client are on the same
- machine. Implies that the client may use a pre-established local security
- context rather than responding to the challenge. */
-
-#define NTLMFLAG_NEGOTIATE_ALWAYS_SIGN (1<<15)
-/* Indicates that authenticated communication between the client and server
- should be signed with a "dummy" signature. */
-
-#define NTLMFLAG_TARGET_TYPE_DOMAIN (1<<16)
-/* Sent by the server in the Type 2 message to indicate that the target
- authentication realm is a domain. */
-
-#define NTLMFLAG_TARGET_TYPE_SERVER (1<<17)
-/* Sent by the server in the Type 2 message to indicate that the target
- authentication realm is a server. */
-
-#define NTLMFLAG_TARGET_TYPE_SHARE (1<<18)
-/* Sent by the server in the Type 2 message to indicate that the target
- authentication realm is a share. Presumably, this is for share-level
- authentication. Usage is unclear. */
-
-#define NTLMFLAG_NEGOTIATE_NTLM2_KEY (1<<19)
-/* Indicates that the NTLM2 signing and sealing scheme should be used for
- protecting authenticated communications. */
-
-#define NTLMFLAG_REQUEST_INIT_RESPONSE (1<<20)
-/* unknown purpose */
-
-#define NTLMFLAG_REQUEST_ACCEPT_RESPONSE (1<<21)
-/* unknown purpose */
-
-#define NTLMFLAG_REQUEST_NONNT_SESSION_KEY (1<<22)
-/* unknown purpose */
-
-#define NTLMFLAG_NEGOTIATE_TARGET_INFO (1<<23)
-/* Sent by the server in the Type 2 message to indicate that it is including a
- Target Information block in the message. */
-
-/* unknown (1<24) */
-/* unknown (1<25) */
-/* unknown (1<26) */
-/* unknown (1<27) */
-/* unknown (1<28) */
-
-#define NTLMFLAG_NEGOTIATE_128 (1<<29)
-/* Indicates that 128-bit encryption is supported. */
-
-#define NTLMFLAG_NEGOTIATE_KEY_EXCHANGE (1<<30)
-/* Indicates that the client will provide an encrypted master key in
- the "Session Key" field of the Type 3 message. */
-
-#define NTLMFLAG_NEGOTIATE_56 (1<<31)
-/* Indicates that 56-bit encryption is supported. */
-#endif
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
new file mode 100644
index 00000000..5ab9915a
--- /dev/null
+++ b/lib/http_proxy.c
@@ -0,0 +1,590 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_PROXY) && !defined(CURL_DISABLE_HTTP)
+
+#include "urldata.h"
+#include <curl/curl.h>
+#include "http_proxy.h"
+#include "sendf.h"
+#include "http.h"
+#include "url.h"
+#include "select.h"
+#include "rawstr.h"
+#include "progress.h"
+#include "non-ascii.h"
+#include "connect.h"
+#include "curl_printf.h"
+#include "curlx.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+CURLcode Curl_proxy_connect(struct connectdata *conn)
+{
+ if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
+#ifndef CURL_DISABLE_PROXY
+ /* for [protocol] tunneled through HTTP proxy */
+ struct HTTP http_proxy;
+ void *prot_save;
+ CURLcode result;
+
+ /* BLOCKING */
+ /* We want "seamless" operations through HTTP proxy tunnel */
+
+ /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the
+ * member conn->proto.http; we want [protocol] through HTTP and we have
+ * to change the member temporarily for connecting to the HTTP
+ * proxy. After Curl_proxyCONNECT we have to set back the member to the
+ * original pointer
+ *
+ * This function might be called several times in the multi interface case
+ * if the proxy's CONNTECT response is not instant.
+ */
+ prot_save = conn->data->req.protop;
+ memset(&http_proxy, 0, sizeof(http_proxy));
+ conn->data->req.protop = &http_proxy;
+ connkeep(conn, "HTTP proxy CONNECT");
+ result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
+ conn->host.name, conn->remote_port);
+ conn->data->req.protop = prot_save;
+ if(CURLE_OK != result)
+ return result;
+ Curl_safefree(conn->allocptr.proxyuserpwd);
+#else
+ return CURLE_NOT_BUILT_IN;
+#endif
+ }
+ /* no HTTP tunnel proxy, just return */
+ return CURLE_OK;
+}
+
+/*
+ * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This
+ * function will issue the necessary commands to get a seamless tunnel through
+ * this proxy. After that, the socket can be used just as a normal socket.
+ */
+
+CURLcode Curl_proxyCONNECT(struct connectdata *conn,
+ int sockindex,
+ const char *hostname,
+ int remote_port)
+{
+ int subversion=0;
+ struct SessionHandle *data=conn->data;
+ struct SingleRequest *k = &data->req;
+ CURLcode result;
+ curl_socket_t tunnelsocket = conn->sock[sockindex];
+ curl_off_t cl=0;
+ bool closeConnection = FALSE;
+ bool chunked_encoding = FALSE;
+ long check;
+
+#define SELECT_OK 0
+#define SELECT_ERROR 1
+#define SELECT_TIMEOUT 2
+ int error = SELECT_OK;
+
+ if(conn->tunnel_state[sockindex] == TUNNEL_COMPLETE)
+ return CURLE_OK; /* CONNECT is already completed */
+
+ conn->bits.proxy_connect_closed = FALSE;
+
+ do {
+ if(TUNNEL_INIT == conn->tunnel_state[sockindex]) {
+ /* BEGIN CONNECT PHASE */
+ char *host_port;
+ Curl_send_buffer *req_buffer;
+
+ infof(data, "Establish HTTP proxy tunnel to %s:%hu\n",
+ hostname, remote_port);
+
+ /* This only happens if we've looped here due to authentication
+ reasons, and we don't really use the newly cloned URL here
+ then. Just free() it. */
+ free(data->req.newurl);
+ data->req.newurl = NULL;
+
+ /* initialize a dynamic send-buffer */
+ req_buffer = Curl_add_buffer_init();
+
+ if(!req_buffer)
+ return CURLE_OUT_OF_MEMORY;
+
+ host_port = aprintf("%s:%hu", hostname, remote_port);
+ if(!host_port) {
+ Curl_add_buffer_free(req_buffer);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ /* Setup the proxy-authorization header, if any */
+ result = Curl_http_output_auth(conn, "CONNECT", host_port, TRUE);
+
+ free(host_port);
+
+ if(!result) {
+ char *host=(char *)"";
+ const char *proxyconn="";
+ const char *useragent="";
+ const char *http = (conn->proxytype == CURLPROXY_HTTP_1_0) ?
+ "1.0" : "1.1";
+ char *hostheader= /* host:port with IPv6 support */
+ aprintf("%s%s%s:%hu", conn->bits.ipv6_ip?"[":"",
+ hostname, conn->bits.ipv6_ip?"]":"",
+ remote_port);
+ if(!hostheader) {
+ Curl_add_buffer_free(req_buffer);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ if(!Curl_checkProxyheaders(conn, "Host:")) {
+ host = aprintf("Host: %s\r\n", hostheader);
+ if(!host) {
+ free(hostheader);
+ Curl_add_buffer_free(req_buffer);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ }
+ if(!Curl_checkProxyheaders(conn, "Proxy-Connection:"))
+ proxyconn = "Proxy-Connection: Keep-Alive\r\n";
+
+ if(!Curl_checkProxyheaders(conn, "User-Agent:") &&
+ data->set.str[STRING_USERAGENT])
+ useragent = conn->allocptr.uagent;
+
+ result =
+ Curl_add_bufferf(req_buffer,
+ "CONNECT %s HTTP/%s\r\n"
+ "%s" /* Host: */
+ "%s" /* Proxy-Authorization */
+ "%s" /* User-Agent */
+ "%s", /* Proxy-Connection */
+ hostheader,
+ http,
+ host,
+ conn->allocptr.proxyuserpwd?
+ conn->allocptr.proxyuserpwd:"",
+ useragent,
+ proxyconn);
+
+ if(host && *host)
+ free(host);
+ free(hostheader);
+
+ if(!result)
+ result = Curl_add_custom_headers(conn, TRUE, req_buffer);
+
+ if(!result)
+ /* CRLF terminate the request */
+ result = Curl_add_bufferf(req_buffer, "\r\n");
+
+ if(!result) {
+ /* Send the connect request to the proxy */
+ /* BLOCKING */
+ result =
+ Curl_add_buffer_send(req_buffer, conn,
+ &data->info.request_size, 0, sockindex);
+ }
+ req_buffer = NULL;
+ if(result)
+ failf(data, "Failed sending CONNECT to proxy");
+ }
+
+ Curl_add_buffer_free(req_buffer);
+ if(result)
+ 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 */
+ return CURLE_OK;
+ else {
+ DEBUGF(infof(data,
+ "Read response immediately from proxy CONNECT\n"));
+ }
+
+ /* at this point, the tunnel_connecting phase is over. */
+
+ { /* READING RESPONSE PHASE */
+ size_t nread; /* total size read */
+ int perline; /* count bytes per line */
+ int keepon=TRUE;
+ ssize_t gotbytes;
+ char *ptr;
+ char *line_start;
+
+ ptr=data->state.buffer;
+ line_start = ptr;
+
+ nread=0;
+ perline=0;
+
+ while((nread<BUFSIZE) && (keepon && !error)) {
+
+ check = Curl_timeleft(data, NULL, TRUE);
+ if(check <= 0) {
+ failf(data, "Proxy CONNECT aborted due to timeout");
+ error = SELECT_TIMEOUT; /* already too little time */
+ break;
+ }
+
+ /* loop every second at least, less if the timeout is near */
+ switch (Curl_socket_ready(tunnelsocket, CURL_SOCKET_BAD,
+ check<1000L?check:1000)) {
+ case -1: /* select() error, stop reading */
+ error = SELECT_ERROR;
+ failf(data, "Proxy CONNECT aborted due to select/poll error");
+ break;
+ case 0: /* timeout */
+ break;
+ default:
+ DEBUGASSERT(ptr+BUFSIZE-nread <= data->state.buffer+BUFSIZE+1);
+ result = Curl_read(conn, tunnelsocket, ptr, BUFSIZE-nread,
+ &gotbytes);
+ if(result==CURLE_AGAIN)
+ continue; /* go loop yourself */
+ else if(result)
+ keepon = FALSE;
+ else if(gotbytes <= 0) {
+ keepon = FALSE;
+ if(data->set.proxyauth && data->state.authproxy.avail) {
+ /* 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\n");
+ }
+ else {
+ error = SELECT_ERROR;
+ failf(data, "Proxy CONNECT aborted");
+ }
+ }
+ else {
+ /*
+ * We got a whole chunk of data, which can be anything from one
+ * byte to a set of lines and possibly just a piece of the last
+ * line.
+ */
+ int i;
+
+ nread += gotbytes;
+
+ if(keepon > TRUE) {
+ /* This means we are currently ignoring a response-body */
+
+ nread = 0; /* make next read start over in the read buffer */
+ ptr=data->state.buffer;
+ if(cl) {
+ /* A Content-Length based body: simply count down the counter
+ and make sure to break out of the loop when we're done! */
+ cl -= gotbytes;
+ if(cl<=0) {
+ keepon = FALSE;
+ break;
+ }
+ }
+ else {
+ /* chunked-encoded body, so we need to do the chunked dance
+ properly to know when the end of the body is reached */
+ CHUNKcode r;
+ ssize_t tookcareof=0;
+
+ /* now parse the chunked piece of data so that we can
+ properly tell when the stream ends */
+ r = Curl_httpchunk_read(conn, ptr, gotbytes, &tookcareof);
+ if(r == CHUNKE_STOP) {
+ /* we're done reading chunks! */
+ infof(data, "chunk reading DONE\n");
+ keepon = FALSE;
+ /* we did the full CONNECT treatment, go COMPLETE */
+ conn->tunnel_state[sockindex] = TUNNEL_COMPLETE;
+ }
+ else
+ infof(data, "Read %zd bytes of chunk, continue\n",
+ tookcareof);
+ }
+ }
+ else
+ for(i = 0; i < gotbytes; ptr++, i++) {
+ perline++; /* amount of bytes in this line so far */
+ if(*ptr == 0x0a) {
+ char letter;
+ int writetype;
+
+ /* convert from the network encoding */
+ result = Curl_convert_from_network(data, line_start,
+ perline);
+ /* Curl_convert_from_network calls failf if unsuccessful */
+ if(result)
+ return result;
+
+ /* output debug if that is requested */
+ if(data->set.verbose)
+ Curl_debug(data, CURLINFO_HEADER_IN,
+ line_start, (size_t)perline, conn);
+
+ /* send the header to the callback */
+ writetype = CLIENTWRITE_HEADER;
+ if(data->set.include_header)
+ writetype |= CLIENTWRITE_BODY;
+
+ result = Curl_client_write(conn, writetype, line_start,
+ perline);
+
+ data->info.header_size += (long)perline;
+ data->req.headerbytecount += (long)perline;
+
+ if(result)
+ return result;
+
+ /* Newlines are CRLF, so the CR is ignored as the line isn't
+ really terminated until the LF comes. Treat a following CR
+ as end-of-headers as well.*/
+
+ if(('\r' == line_start[0]) ||
+ ('\n' == line_start[0])) {
+ /* end of response-headers from the proxy */
+ nread = 0; /* make next read start over in the read
+ buffer */
+ ptr=data->state.buffer;
+ if((407 == k->httpcode) && !data->state.authproblem) {
+ /* If we get a 407 response code with content length
+ when we have no auth problem, we must ignore the
+ whole response-body */
+ keepon = 2;
+
+ if(cl) {
+ infof(data, "Ignore %" CURL_FORMAT_CURL_OFF_T
+ " bytes of response-body\n", cl);
+
+ /* remove the remaining chunk of what we already
+ read */
+ cl -= (gotbytes - i);
+
+ if(cl<=0)
+ /* if the whole thing was already read, we are done!
+ */
+ keepon=FALSE;
+ }
+ else if(chunked_encoding) {
+ CHUNKcode r;
+ /* We set ignorebody true here since the chunked
+ decoder function will acknowledge that. Pay
+ attention so that this is cleared again when this
+ function returns! */
+ k->ignorebody = TRUE;
+ infof(data, "%zd bytes of chunk left\n", gotbytes-i);
+
+ if(line_start[1] == '\n') {
+ /* this can only be a LF if the letter at index 0
+ was a CR */
+ line_start++;
+ i++;
+ }
+
+ /* now parse the chunked piece of data so that we can
+ properly tell when the stream ends */
+ r = Curl_httpchunk_read(conn, line_start+1,
+ gotbytes -i, &gotbytes);
+ if(r == CHUNKE_STOP) {
+ /* we're done reading chunks! */
+ infof(data, "chunk reading DONE\n");
+ keepon = FALSE;
+ /* we did the full CONNECT treatment, go to
+ COMPLETE */
+ conn->tunnel_state[sockindex] = TUNNEL_COMPLETE;
+ }
+ else
+ infof(data, "Read %zd bytes of chunk, continue\n",
+ gotbytes);
+ }
+ else {
+ /* without content-length or chunked encoding, we
+ can't keep the connection alive since the close is
+ the end signal so we bail out at once instead */
+ keepon=FALSE;
+ }
+ }
+ else {
+ keepon = FALSE;
+ if(200 == data->info.httpproxycode) {
+ if(gotbytes - (i+1))
+ failf(data, "Proxy CONNECT followed by %zd bytes "
+ "of opaque data. Data ignored (known bug #39)",
+ gotbytes - (i+1));
+ }
+ }
+ /* we did the full CONNECT treatment, go to COMPLETE */
+ conn->tunnel_state[sockindex] = TUNNEL_COMPLETE;
+ break; /* breaks out of for-loop, not switch() */
+ }
+
+ /* keep a backup of the position we are about to blank */
+ letter = line_start[perline];
+ line_start[perline]=0; /* zero terminate the buffer */
+ if((checkprefix("WWW-Authenticate:", line_start) &&
+ (401 == k->httpcode)) ||
+ (checkprefix("Proxy-authenticate:", line_start) &&
+ (407 == k->httpcode))) {
+
+ bool proxy = (k->httpcode == 407) ? TRUE : FALSE;
+ char *auth = Curl_copy_header_value(line_start);
+ if(!auth)
+ return CURLE_OUT_OF_MEMORY;
+
+ result = Curl_http_input_auth(conn, proxy, auth);
+
+ free(auth);
+
+ if(result)
+ return result;
+ }
+ else if(checkprefix("Content-Length:", line_start)) {
+ cl = curlx_strtoofft(line_start +
+ strlen("Content-Length:"), NULL, 10);
+ }
+ else if(Curl_compareheader(line_start,
+ "Connection:", "close"))
+ closeConnection = TRUE;
+ else if(Curl_compareheader(line_start,
+ "Transfer-Encoding:",
+ "chunked")) {
+ infof(data, "CONNECT responded chunked\n");
+ chunked_encoding = TRUE;
+ /* init our chunky engine */
+ Curl_httpchunk_init(conn);
+ }
+ else if(Curl_compareheader(line_start,
+ "Proxy-Connection:", "close"))
+ closeConnection = TRUE;
+ else if(2 == sscanf(line_start, "HTTP/1.%d %d",
+ &subversion,
+ &k->httpcode)) {
+ /* store the HTTP code from the proxy */
+ data->info.httpproxycode = k->httpcode;
+ }
+ /* put back the letter we blanked out before */
+ line_start[perline]= letter;
+
+ perline=0; /* line starts over here */
+ line_start = ptr+1; /* this skips the zero byte we wrote */
+ }
+ }
+ }
+ break;
+ } /* switch */
+ if(Curl_pgrsUpdate(conn))
+ return CURLE_ABORTED_BY_CALLBACK;
+ } /* while there's buffer left and loop is requested */
+
+ if(error)
+ return CURLE_RECV_ERROR;
+
+ if(data->info.httpproxycode != 200) {
+ /* Deal with the possibly already received authenticate
+ headers. 'newurl' is set to a new URL if we must loop. */
+ result = Curl_http_auth_act(conn);
+ if(result)
+ return result;
+
+ if(conn->bits.close)
+ /* the connection has been marked for closure, most likely in the
+ Curl_http_auth_act() function and thus we can kill it at once
+ below
+ */
+ closeConnection = TRUE;
+ }
+
+ if(closeConnection && data->req.newurl) {
+ /* Connection closed by server. Don't use it anymore */
+ Curl_closesocket(conn, conn->sock[sockindex]);
+ conn->sock[sockindex] = CURL_SOCKET_BAD;
+ break;
+ }
+ } /* END READING RESPONSE 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
+ * is complete we start over in INIT state */
+ if(data->req.newurl &&
+ (TUNNEL_COMPLETE == conn->tunnel_state[sockindex])) {
+ conn->tunnel_state[sockindex] = TUNNEL_INIT;
+ infof(data, "TUNNEL_STATE switched to: %d\n",
+ conn->tunnel_state[sockindex]);
+ }
+
+ } while(data->req.newurl);
+
+ if(200 != data->req.httpcode) {
+ if(closeConnection && data->req.newurl) {
+ conn->bits.proxy_connect_closed = TRUE;
+ infof(data, "Connect me again please\n");
+ }
+ else {
+ 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;
+ }
+
+ /* 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;
+ }
+ }
+
+ conn->tunnel_state[sockindex] = TUNNEL_COMPLETE;
+
+ /* If a proxy-authorization header was used for the proxy, then we should
+ make sure that it isn't accidentally used for the document request
+ after we've connected. So let's free and clear it here. */
+ Curl_safefree(conn->allocptr.proxyuserpwd);
+ conn->allocptr.proxyuserpwd = NULL;
+
+ data->state.authproxy.done = TRUE;
+
+ infof (data, "Proxy replied OK to CONNECT request\n");
+ data->req.ignorebody = FALSE; /* put it (back) to non-ignore state */
+ conn->bits.rewindaftersend = FALSE; /* make sure this isn't set for the
+ document request */
+ return CURLE_OK;
+}
+#endif /* CURL_DISABLE_PROXY */
diff --git a/lib/http_proxy.h b/lib/http_proxy.h
new file mode 100644
index 00000000..2b5e9c9b
--- /dev/null
+++ b/lib/http_proxy.h
@@ -0,0 +1,41 @@
+#ifndef HEADER_CURL_HTTP_PROXY_H
+#define HEADER_CURL_HTTP_PROXY_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
+/* ftp can use this as well */
+CURLcode Curl_proxyCONNECT(struct connectdata *conn,
+ int tunnelsocket,
+ const char *hostname, int remote_port);
+
+/* Default proxy timeout in milliseconds */
+#define PROXY_TIMEOUT (3600*1000)
+
+CURLcode Curl_proxy_connect(struct connectdata *conn);
+
+#else
+#define Curl_proxyCONNECT(x,y,z,w) CURLE_NOT_BUILT_IN
+#define Curl_proxy_connect(x) CURLE_OK
+#endif
+
+#endif /* HEADER_CURL_HTTP_PROXY_H */
diff --git a/lib/idn_win32.c b/lib/idn_win32.c
new file mode 100644
index 00000000..b3697234
--- /dev/null
+++ b/lib/idn_win32.c
@@ -0,0 +1,108 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+ /*
+ * IDN conversions using Windows kernel32 and normaliz libraries.
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_WIN32_IDN
+
+#include "curl_multibyte.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#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
+#endif
+
+#define IDN_MAX_LENGTH 255
+
+int curl_win32_idn_to_ascii(const char *in, char **out);
+int curl_win32_ascii_to_idn(const char *in, size_t in_len, char **out_utf8);
+
+int curl_win32_idn_to_ascii(const char *in, char **out)
+{
+ wchar_t *in_w = Curl_convert_UTF8_to_wchar(in);
+ if(in_w) {
+ wchar_t punycode[IDN_MAX_LENGTH];
+ if(IdnToAscii(0, in_w, -1, punycode, IDN_MAX_LENGTH) == 0) {
+ wprintf(L"ERROR %d converting to Punycode\n", GetLastError());
+ free(in_w);
+ return 0;
+ }
+ free(in_w);
+
+ *out = Curl_convert_wchar_to_UTF8(punycode);
+ if(!*out)
+ return 0;
+ }
+ return 1;
+}
+
+int curl_win32_ascii_to_idn(const char *in, size_t in_len, char **out_utf8)
+{
+ (void)in_len; /* unused */
+ if(in) {
+ WCHAR unicode[IDN_MAX_LENGTH];
+
+ if(IdnToUnicode(0, (wchar_t *)in, -1, unicode, IDN_MAX_LENGTH) == 0) {
+ wprintf(L"ERROR %d converting to Punycode\n", GetLastError());
+ return 0;
+ }
+ else {
+ *out_utf8 = Curl_convert_wchar_to_UTF8(unicode);
+ if(!*out_utf8)
+ return 0;
+ }
+ }
+ return 1;
+}
+
+#endif /* USE_WIN32_IDN */
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 19504d1f..6e6f9692 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +20,8 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
@@ -59,9 +53,7 @@
#include "inet_ntop.h"
#include "strequal.h"
#include "if2ip.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
@@ -69,92 +61,211 @@
/* ------------------------------------------------------------------ */
+/* 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)
-char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
+bool Curl_if_is_interface_name(const char *interf)
+{
+ bool result = FALSE;
+
+ struct ifaddrs *iface, *head;
+
+ if(getifaddrs(&head) >= 0) {
+ for(iface=head; iface != NULL; iface=iface->ifa_next) {
+ if(curl_strequal(iface->ifa_name, interf)) {
+ result = TRUE;
+ break;
+ }
+ }
+ freeifaddrs(head);
+ }
+ return result;
+}
+
+if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
+ unsigned int remote_scope_id, const char *interf,
+ char *buf, int buf_size)
{
struct ifaddrs *iface, *head;
- char *ip=NULL;
-
- if (getifaddrs(&head) >= 0) {
- for (iface=head; iface != NULL; iface=iface->ifa_next) {
- if ((iface->ifa_addr != NULL) &&
- (iface->ifa_addr->sa_family == af) &&
- curl_strequal(iface->ifa_name, interface)) {
- void *addr;
- char scope[12]="";
+ 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) {
+ 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 ipstr[64];
#ifdef ENABLE_IPV6
- if (af == AF_INET6) {
- unsigned int scopeid = 0;
- addr = &((struct sockaddr_in6 *)iface->ifa_addr)->sin6_addr;
+ 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;
+ /* 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;
+
+ continue;
+ }
#endif
- if (scopeid)
- snprintf(scope, sizeof(scope), "%%%u", scopeid);
- }
- else
+ if(scopeid)
+ snprintf(scope, sizeof(scope), "%%%u", scopeid);
+ }
+ else
#endif
- addr = &((struct sockaddr_in *)iface->ifa_addr)->sin_addr;
- ip = (char *) Curl_inet_ntop(af, addr, buf, buf_size);
- strlcat(buf, scope, buf_size);
- break;
+ addr = &((struct sockaddr_in *)iface->ifa_addr)->sin_addr;
+ res = IF2IP_FOUND;
+ ip = (char *) Curl_inet_ntop(af, addr, ipstr, sizeof(ipstr));
+ snprintf(buf, buf_size, "%s%s", ip, scope);
+ break;
+ }
+ }
+ else if((res == IF2IP_NOT_FOUND) &&
+ curl_strequal(iface->ifa_name, interf)) {
+ res = IF2IP_AF_NOT_SUPPORTED;
+ }
}
}
+
freeifaddrs(head);
}
- return ip;
+
+ return res;
}
#elif defined(HAVE_IOCTL_SIOCGIFADDR)
-char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
+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)) ==
+ 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)
{
struct ifreq req;
struct in_addr in;
struct sockaddr_in *s;
curl_socket_t dummy;
size_t len;
- char *ip;
- if(!interface || (af != AF_INET))
- return NULL;
+ (void)remote_scope;
+ (void)remote_scope_id;
+
+ if(!interf || (af != AF_INET))
+ return IF2IP_NOT_FOUND;
- len = strlen(interface);
+ len = strlen(interf);
if(len >= sizeof(req.ifr_name))
- return NULL;
+ return IF2IP_NOT_FOUND;
dummy = socket(AF_INET, SOCK_STREAM, 0);
if(CURL_SOCKET_BAD == dummy)
- return NULL;
+ return IF2IP_NOT_FOUND;
memset(&req, 0, sizeof(req));
- memcpy(req.ifr_name, interface, len+1);
+ memcpy(req.ifr_name, interf, len+1);
req.ifr_addr.sa_family = AF_INET;
if(ioctl(dummy, SIOCGIFADDR, &req) < 0) {
sclose(dummy);
- return NULL;
+ /* With SIOCGIFADDR, we cannot tell the difference between an interface
+ that does not exist and an interface that has no address of the
+ correct family. Assume the interface does not exist */
+ return IF2IP_NOT_FOUND;
}
s = (struct sockaddr_in *)&req.ifr_addr;
memcpy(&in, &s->sin_addr, sizeof(in));
- ip = (char *) Curl_inet_ntop(s->sin_family, &in, buf, buf_size);
+ Curl_inet_ntop(s->sin_family, &in, buf, buf_size);
sclose(dummy);
- return ip;
+ return IF2IP_FOUND;
}
#else
-char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size)
+bool Curl_if_is_interface_name(const char *interf)
+{
+ (void) interf;
+
+ return FALSE;
+}
+
+if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
+ unsigned int remote_scope_id, const char *interf,
+ char *buf, int buf_size)
{
(void) af;
+ (void) remote_scope;
+ (void) remote_scope_id;
(void) interf;
(void) buf;
(void) buf_size;
- return NULL;
+ return IF2IP_NOT_FOUND;
}
#endif
diff --git a/lib/if2ip.h b/lib/if2ip.h
index cdf2638a..78bb0bd5 100644
--- a/lib/if2ip.h
+++ b/lib/if2ip.h
@@ -1,5 +1,5 @@
-#ifndef __IF2IP_H
-#define __IF2IP_H
+#ifndef HEADER_CURL_IF2IP_H
+#define HEADER_CURL_IF2IP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,12 +21,29 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-extern char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size);
+/* 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 {
+ IF2IP_NOT_FOUND = 0, /* Interface not found */
+ IF2IP_AF_NOT_SUPPORTED = 1, /* Int. exists but has no address for this af */
+ IF2IP_FOUND = 2 /* The address has been stored in "buf" */
+} 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);
#ifdef __INTERIX
-#include <sys/socket.h>
/* Nedelcho Stanev's work-around for SFU 3.0 */
struct ifreq {
@@ -60,6 +77,7 @@ struct ifreq {
#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
#define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */
-#endif /* interix */
-#endif
+#endif /* __INTERIX */
+
+#endif /* HEADER_CURL_IF2IP_H */
diff --git a/lib/imap.c b/lib/imap.c
index cdadd171..e6d83f2c 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -18,27 +18,24 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
+ * RFC2195 CRAM-MD5 authentication
+ * RFC2595 Using TLS with IMAP, POP3 and ACAP
+ * RFC2831 DIGEST-MD5 authentication
* 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
+ * Draft LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_IMAP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -64,9 +61,6 @@
#include <curl/curl.h>
#include "urldata.h"
#include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
-#include "if2ip.h"
#include "hostip.h"
#include "progress.h"
#include "transfer.h"
@@ -77,37 +71,44 @@
#include "strtoofft.h"
#include "strequal.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "connect.h"
#include "strerror.h"
#include "select.h"
#include "multiif.h"
#include "url.h"
#include "rawstr.h"
-#include "strtoofft.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_sasl.h"
+#include "warnless.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
/* Local API functions */
-static CURLcode imap_parse_url_path(struct connectdata *conn);
static CURLcode imap_regular_transfer(struct connectdata *conn, bool *done);
static CURLcode imap_do(struct connectdata *conn, bool *done);
-static CURLcode imap_done(struct connectdata *conn,
- CURLcode, bool premature);
+static CURLcode imap_done(struct connectdata *conn, CURLcode status,
+ bool premature);
static CURLcode imap_connect(struct connectdata *conn, bool *done);
-static CURLcode imap_disconnect(struct connectdata *conn);
+static CURLcode imap_disconnect(struct connectdata *conn, bool dead);
static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done);
-static int imap_getsock(struct connectdata *conn,
- curl_socket_t *socks,
+static int imap_getsock(struct connectdata *conn, curl_socket_t *socks,
int numsocks);
-static CURLcode imap_doing(struct connectdata *conn,
- bool *dophase_done);
-static CURLcode imap_setup_connection(struct connectdata * conn);
+static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done);
+static CURLcode imap_setup_connection(struct connectdata *conn);
+static char *imap_atom(const char *str);
+static CURLcode imap_sendf(struct connectdata *conn, const char *fmt, ...);
+static CURLcode imap_parse_url_options(struct connectdata *conn);
+static CURLcode imap_parse_url_path(struct connectdata *conn);
+static CURLcode imap_parse_custom_request(struct connectdata *conn);
+static CURLcode imap_perform_authenticate(struct connectdata *conn,
+ const char *mech,
+ const char *initresp);
+static CURLcode imap_continue_authenticate(struct connectdata *conn,
+ const char *resp);
+static void imap_get_message(char *buffer, char** outptr);
/*
* IMAP protocol handler.
@@ -124,13 +125,15 @@ const struct Curl_handler Curl_handler_imap = {
imap_doing, /* doing */
imap_getsock, /* proto_getsock */
imap_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
imap_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_IMAP, /* defport */
- PROT_IMAP /* protocol */
+ CURLPROTO_IMAP, /* protocol */
+ PROTOPT_CLOSEACTION /* flags */
};
-
#ifdef USE_SSL
/*
* IMAPS protocol handler.
@@ -147,10 +150,13 @@ const struct Curl_handler Curl_handler_imaps = {
imap_doing, /* doing */
imap_getsock, /* proto_getsock */
imap_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
imap_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_IMAPS, /* defport */
- PROT_IMAP | PROT_IMAPS | PROT_SSL /* protocol */
+ CURLPROTO_IMAPS, /* protocol */
+ PROTOPT_CLOSEACTION | PROTOPT_SSL /* flags */
};
#endif
@@ -161,7 +167,7 @@ const struct Curl_handler Curl_handler_imaps = {
static const struct Curl_handler Curl_handler_imap_proxy = {
"IMAP", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -170,13 +176,15 @@ static const struct Curl_handler Curl_handler_imap_proxy = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_IMAP, /* defport */
- PROT_HTTP /* protocol */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
-
#ifdef USE_SSL
/*
* HTTP-proxyed IMAPS protocol handler.
@@ -184,7 +192,7 @@ static const struct Curl_handler Curl_handler_imap_proxy = {
static const struct Curl_handler Curl_handler_imaps_proxy = {
"IMAPS", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -193,213 +201,930 @@ static const struct Curl_handler Curl_handler_imaps_proxy = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_IMAPS, /* defport */
- PROT_HTTP /* protocol */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
#endif
#endif
+/* SASL parameters for the imap protocol */
+static const struct SASLproto saslimap = {
+ "imap", /* The service name */
+ '+', /* Code received when continuation is expected */
+ 'O', /* Code to receive upon authentication success */
+ 0, /* Maximum initial response length (no max) */
+ imap_perform_authenticate, /* Send authentication command */
+ imap_continue_authenticate, /* Send authentication continuation */
+ imap_get_message /* Get SASL response message */
+};
+
+
+#ifdef USE_SSL
+static void imap_to_imaps(struct connectdata *conn)
+{
+ conn->handler = &Curl_handler_imaps;
+}
+#else
+#define imap_to_imaps(x) Curl_nop_stmt
+#endif
+
/***********************************************************************
*
- * imapsendf()
- *
- * Sends the formated string as an IMAP command to a server
+ * imap_matchresp()
*
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
+ * Determines whether the untagged response is related to the specified
+ * command by checking if it is in format "* <command-name> ..." or
+ * "* <number> <command-name> ...".
*
- * Designed to never block.
+ * The "* " marker is assumed to have already been checked by the caller.
*/
-static CURLcode imapsendf(struct connectdata *conn,
- const char *idstr, /* id to wait for at the
- completion of this command */
- const char *fmt, ...)
+static bool imap_matchresp(const char *line, size_t len, const char *cmd)
{
- CURLcode res;
- struct imap_conn *imapc = &conn->proto.imapc;
- va_list ap;
- va_start(ap, fmt);
+ const char *end = line + len;
+ size_t cmd_len = strlen(cmd);
- imapc->idstr = idstr; /* this is the thing */
+ /* Skip the untagged response marker */
+ line += 2;
- res = Curl_pp_vsendf(&imapc->pp, fmt, ap);
+ /* Do we have a number after the marker? */
+ if(line < end && ISDIGIT(*line)) {
+ /* Skip the number */
+ do
+ line++;
+ while(line < end && ISDIGIT(*line));
- va_end(ap);
+ /* Do we have the space character? */
+ if(line == end || *line != ' ')
+ return FALSE;
+
+ line++;
+ }
+
+ /* Does the command name match and is it followed by a space character or at
+ the end of line? */
+ if(line + cmd_len <= end && Curl_raw_nequal(line, cmd, cmd_len) &&
+ (line[cmd_len] == ' ' || line + cmd_len + 2 == end))
+ return TRUE;
- return res;
+ return FALSE;
}
-static const char *getcmdid(struct connectdata *conn)
+/***********************************************************************
+ *
+ * imap_endofresp()
+ *
+ * Checks whether the given string is a valid tagged, untagged or continuation
+ * response which can be processed by the response handler.
+ */
+static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
+ int *resp)
{
- static const char * const ids[]= {
- "A",
- "B",
- "C",
- "D"
- };
-
+ struct IMAP *imap = conn->data->req.protop;
struct imap_conn *imapc = &conn->proto.imapc;
+ const char *id = imapc->resptag;
+ size_t id_len = strlen(id);
- /* get the next id, but wrap at end of table */
- imapc->cmdid = (int)((imapc->cmdid+1) % (sizeof(ids)/sizeof(ids[0])));
+ /* Do we have a tagged command response? */
+ if(len >= id_len + 1 && !memcmp(id, line, id_len) && line[id_len] == ' ') {
+ line += id_len + 1;
+ len -= id_len + 1;
+
+ if(len >= 2 && !memcmp(line, "OK", 2))
+ *resp = 'O';
+ else if(len >= 2 && !memcmp(line, "NO", 2))
+ *resp = 'N';
+ else if(len >= 3 && !memcmp(line, "BAD", 3))
+ *resp = 'B';
+ else {
+ failf(conn->data, "Bad tagged response");
+ *resp = -1;
+ }
- return ids[imapc->cmdid];
-}
+ return TRUE;
+ }
-/* For the IMAP "protocol connect" and "doing" phases only */
-static int imap_getsock(struct connectdata *conn,
- curl_socket_t *socks,
- int numsocks)
-{
- return Curl_pp_getsock(&conn->proto.imapc.pp, socks, numsocks);
+ /* Do we have an untagged command response? */
+ if(len >= 2 && !memcmp("* ", line, 2)) {
+ switch(imapc->state) {
+ /* States which are interested in untagged responses */
+ case IMAP_CAPABILITY:
+ if(!imap_matchresp(line, len, "CAPABILITY"))
+ return FALSE;
+ break;
+
+ case IMAP_LIST:
+ if((!imap->custom && !imap_matchresp(line, len, "LIST")) ||
+ (imap->custom && !imap_matchresp(line, len, imap->custom) &&
+ (strcmp(imap->custom, "STORE") ||
+ !imap_matchresp(line, len, "FETCH")) &&
+ strcmp(imap->custom, "SELECT") &&
+ strcmp(imap->custom, "EXAMINE") &&
+ strcmp(imap->custom, "SEARCH") &&
+ strcmp(imap->custom, "EXPUNGE") &&
+ strcmp(imap->custom, "LSUB") &&
+ strcmp(imap->custom, "UID") &&
+ strcmp(imap->custom, "NOOP")))
+ return FALSE;
+ break;
+
+ case IMAP_SELECT:
+ /* SELECT is special in that its untagged responses do not have a
+ common prefix so accept anything! */
+ break;
+
+ case IMAP_FETCH:
+ if(!imap_matchresp(line, len, "FETCH"))
+ return FALSE;
+ break;
+
+ case IMAP_SEARCH:
+ if(!imap_matchresp(line, len, "SEARCH"))
+ return FALSE;
+ break;
+
+ /* Ignore other untagged responses */
+ default:
+ return FALSE;
+ }
+
+ *resp = '*';
+ return TRUE;
+ }
+
+ /* Do we have a continuation response? This should be a + symbol followed by
+ a space and optionally some text as per RFC-3501 for the AUTHENTICATE and
+ APPEND commands and as outlined in Section 4. Examples of RFC-4959 but
+ some e-mail servers ignore this and only send a single + instead. */
+ if((len == 3 && !memcmp("+", line, 1)) ||
+ (len >= 2 && !memcmp("+ ", line, 2))) {
+ switch(imapc->state) {
+ /* States which are interested in continuation responses */
+ case IMAP_AUTHENTICATE:
+ case IMAP_APPEND:
+ *resp = '+';
+ break;
+
+ default:
+ failf(conn->data, "Unexpected continuation response");
+ *resp = -1;
+ break;
+ }
+
+ return TRUE;
+ }
+
+ return FALSE; /* Nothing for us */
}
-/* fucntion that checks for an imap status code at the start of the
- given string */
-static int imap_endofresp(struct pingpong *pp, int *resp)
+/***********************************************************************
+ *
+ * imap_get_message()
+ *
+ * Gets the authentication message from the response buffer.
+ */
+static void imap_get_message(char *buffer, char** outptr)
{
- char *line = pp->linestart_resp;
- size_t len = pp->nread_resp;
- struct imap_conn *imapc = &pp->conn->proto.imapc;
- const char *id = imapc->idstr;
- size_t id_len = strlen(id);
+ size_t len = 0;
+ char* message = NULL;
- if(len >= id_len + 3) {
- if(!memcmp(id, line, id_len) && (line[id_len] == ' ') ) {
- /* end of response */
- *resp = line[id_len+1]; /* O, N or B */
- return TRUE;
- }
- else if((imapc->state == IMAP_FETCH) &&
- !memcmp("* ", line, 2) ) {
- /* FETCH response we're interested in */
- *resp = '*';
- return TRUE;
- }
+ /* Find the start of the message */
+ for(message = buffer + 2; *message == ' ' || *message == '\t'; message++)
+ ;
+
+ /* Find the end of the message */
+ for(len = strlen(message); len--;)
+ if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' &&
+ message[len] != '\t')
+ break;
+
+ /* Terminate the message */
+ if(++len) {
+ message[len] = '\0';
}
- return FALSE; /* nothing for us */
+
+ *outptr = message;
}
-/* This is the ONLY way to change IMAP state! */
-static void state(struct connectdata *conn,
- imapstate newstate)
+/***********************************************************************
+ *
+ * state()
+ *
+ * This is the ONLY way to change IMAP state!
+ */
+static void state(struct connectdata *conn, imapstate newstate)
{
+ struct imap_conn *imapc = &conn->proto.imapc;
#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
/* for debug purposes */
static const char * const names[]={
"STOP",
"SERVERGREET",
- "LOGIN",
+ "CAPABILITY",
"STARTTLS",
+ "UPGRADETLS",
+ "AUTHENTICATE",
+ "LOGIN",
+ "LIST",
"SELECT",
"FETCH",
+ "FETCH_FINAL",
+ "APPEND",
+ "APPEND_FINAL",
+ "SEARCH",
"LOGOUT",
/* LAST */
};
-#endif
- struct imap_conn *imapc = &conn->proto.imapc;
-#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
+
if(imapc->state != newstate)
infof(conn->data, "IMAP %p state change from %s to %s\n",
- imapc, names[imapc->state], names[newstate]);
+ (void *)imapc, names[imapc->state], names[newstate]);
#endif
+
imapc->state = newstate;
}
-static CURLcode imap_state_login(struct connectdata *conn)
+/***********************************************************************
+ *
+ * imap_perform_capability()
+ *
+ * Sends the CAPABILITY command in order to obtain a list of server side
+ * supported capabilities.
+ */
+static CURLcode imap_perform_capability(struct connectdata *conn)
{
- CURLcode result;
- struct FTP *imap = conn->data->state.proto.imap;
- const char *str;
+ CURLcode result = CURLE_OK;
+ struct imap_conn *imapc = &conn->proto.imapc;
- str = getcmdid(conn);
+ imapc->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */
+ imapc->sasl.authused = SASL_AUTH_NONE; /* Clear the auth. mechanism used */
+ imapc->tls_supported = FALSE; /* Clear the TLS capability */
+
+ /* Send the CAPABILITY command */
+ result = imap_sendf(conn, "CAPABILITY");
+
+ if(!result)
+ state(conn, IMAP_CAPABILITY);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_starttls()
+ *
+ * Sends the STARTTLS command to start the upgrade to TLS.
+ */
+static CURLcode imap_perform_starttls(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+
+ /* Send the STARTTLS command */
+ result = imap_sendf(conn, "STARTTLS");
+
+ if(!result)
+ state(conn, IMAP_STARTTLS);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_upgrade_tls()
+ *
+ * Performs the upgrade to TLS.
+ */
+static CURLcode imap_perform_upgrade_tls(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct imap_conn *imapc = &conn->proto.imapc;
+
+ /* Start the SSL connection */
+ result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone);
+
+ if(!result) {
+ if(imapc->state != IMAP_UPGRADETLS)
+ state(conn, IMAP_UPGRADETLS);
+
+ if(imapc->ssldone) {
+ imap_to_imaps(conn);
+ result = imap_perform_capability(conn);
+ }
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_login()
+ *
+ * Sends a clear text LOGIN command to authenticate with.
+ */
+static CURLcode imap_perform_login(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ char *user;
+ char *passwd;
+
+ /* Check we have a username and password to authenticate with and end the
+ connect phase if we don't */
+ if(!conn->bits.user_passwd) {
+ state(conn, IMAP_STOP);
- /* send USER and password */
- result = imapsendf(conn, str, "%s LOGIN %s %s", str,
- imap->user?imap->user:"",
- imap->passwd?imap->passwd:"");
- if(result)
return result;
+ }
- state(conn, IMAP_LOGIN);
+ /* Make sure the username and password are in the correct atom format */
+ user = imap_atom(conn->user);
+ passwd = imap_atom(conn->passwd);
- return CURLE_OK;
+ /* Send the LOGIN command */
+ result = imap_sendf(conn, "LOGIN %s %s", user ? user : "",
+ passwd ? passwd : "");
+
+ free(user);
+ free(passwd);
+
+ if(!result)
+ state(conn, IMAP_LOGIN);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_authenticate()
+ *
+ * Sends an AUTHENTICATE command allowing the client to login with the given
+ * SASL authentication mechanism.
+ */
+static CURLcode imap_perform_authenticate(struct connectdata *conn,
+ const char *mech,
+ const char *initresp)
+{
+ CURLcode result = CURLE_OK;
+
+ if(initresp) {
+ /* Send the AUTHENTICATE command with the initial response */
+ result = imap_sendf(conn, "AUTHENTICATE %s %s", mech, initresp);
+ }
+ else {
+ /* Send the AUTHENTICATE command */
+ result = imap_sendf(conn, "AUTHENTICATE %s", mech);
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_continue_authenticate()
+ *
+ * Sends SASL continuation data or cancellation.
+ */
+static CURLcode imap_continue_authenticate(struct connectdata *conn,
+ const char *resp)
+{
+ struct imap_conn *imapc = &conn->proto.imapc;
+
+ return Curl_pp_sendf(&imapc->pp, "%s", resp);
+}
+
+/***********************************************************************
+ *
+ * imap_perform_authentication()
+ *
+ * Initiates the authentication sequence, with the appropriate SASL
+ * authentication mechanism, falling back to clear text should a common
+ * mechanism not be available between the client and server.
+ */
+static CURLcode imap_perform_authentication(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct imap_conn *imapc = &conn->proto.imapc;
+ saslprogress progress;
+
+ /* Check we have enough data to authenticate with and end the
+ connect phase if we don't */
+ if(!Curl_sasl_can_authenticate(&imapc->sasl, conn)) {
+ state(conn, IMAP_STOP);
+ return result;
+ }
+
+ /* Calculate the SASL login details */
+ result = Curl_sasl_start(&imapc->sasl, conn, imapc->ir_supported, &progress);
+
+ if(!result) {
+ if(progress == SASL_INPROGRESS)
+ state(conn, IMAP_AUTHENTICATE);
+ else if(!imapc->login_disabled && (imapc->preftype & IMAP_TYPE_CLEARTEXT))
+ /* Perform clear text authentication */
+ result = imap_perform_login(conn);
+ else {
+ /* Other mechanisms not supported */
+ infof(conn->data, "No known authentication mechanisms supported!\n");
+ result = CURLE_LOGIN_DENIED;
+ }
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_list()
+ *
+ * Sends a LIST command or an alternative custom request.
+ */
+static CURLcode imap_perform_list(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct IMAP *imap = data->req.protop;
+ char *mailbox;
+
+ if(imap->custom)
+ /* Send the custom request */
+ result = imap_sendf(conn, "%s%s", imap->custom,
+ imap->custom_params ? imap->custom_params : "");
+ else {
+ /* Make sure the mailbox is in the correct atom format */
+ mailbox = imap_atom(imap->mailbox ? imap->mailbox : "");
+ if(!mailbox)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Send the LIST command */
+ result = imap_sendf(conn, "LIST \"%s\" *", mailbox);
+
+ free(mailbox);
+ }
+
+ if(!result)
+ state(conn, IMAP_LIST);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_select()
+ *
+ * Sends a SELECT command to ask the server to change the selected mailbox.
+ */
+static CURLcode imap_perform_select(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct IMAP *imap = data->req.protop;
+ struct imap_conn *imapc = &conn->proto.imapc;
+ char *mailbox;
+
+ /* Invalidate old information as we are switching mailboxes */
+ Curl_safefree(imapc->mailbox);
+ Curl_safefree(imapc->mailbox_uidvalidity);
+
+ /* Check we have a mailbox */
+ if(!imap->mailbox) {
+ failf(conn->data, "Cannot SELECT without a mailbox.");
+ return CURLE_URL_MALFORMAT;
+ }
+
+ /* Make sure the mailbox is in the correct atom format */
+ mailbox = imap_atom(imap->mailbox);
+ if(!mailbox)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Send the SELECT command */
+ result = imap_sendf(conn, "SELECT %s", mailbox);
+
+ free(mailbox);
+
+ if(!result)
+ state(conn, IMAP_SELECT);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_fetch()
+ *
+ * Sends a FETCH command to initiate the download of a message.
+ */
+static CURLcode imap_perform_fetch(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct IMAP *imap = conn->data->req.protop;
+
+ /* Check we have a UID */
+ if(!imap->uid) {
+ failf(conn->data, "Cannot FETCH without a UID.");
+ return CURLE_URL_MALFORMAT;
+ }
+
+ /* Send the FETCH command */
+ if(imap->partial)
+ result = imap_sendf(conn, "FETCH %s BODY[%s]<%s>",
+ imap->uid,
+ imap->section ? imap->section : "",
+ imap->partial);
+ else
+ result = imap_sendf(conn, "FETCH %s BODY[%s]",
+ imap->uid,
+ imap->section ? imap->section : "");
+
+ if(!result)
+ state(conn, IMAP_FETCH);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_append()
+ *
+ * Sends an APPEND command to initiate the upload of a message.
+ */
+static CURLcode imap_perform_append(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct IMAP *imap = conn->data->req.protop;
+ char *mailbox;
+
+ /* Check we have a mailbox */
+ if(!imap->mailbox) {
+ failf(conn->data, "Cannot APPEND without a mailbox.");
+ return CURLE_URL_MALFORMAT;
+ }
+
+ /* Check we know the size of the upload */
+ if(conn->data->state.infilesize < 0) {
+ failf(conn->data, "Cannot APPEND with unknown input file size\n");
+ return CURLE_UPLOAD_FAILED;
+ }
+
+ /* Make sure the mailbox is in the correct atom format */
+ mailbox = imap_atom(imap->mailbox);
+ if(!mailbox)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Send the APPEND command */
+ result = imap_sendf(conn, "APPEND %s (\\Seen) {%" CURL_FORMAT_CURL_OFF_T "}",
+ mailbox, conn->data->state.infilesize);
+
+ free(mailbox);
+
+ if(!result)
+ state(conn, IMAP_APPEND);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_search()
+ *
+ * Sends a SEARCH command.
+ */
+static CURLcode imap_perform_search(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct IMAP *imap = conn->data->req.protop;
+
+ /* Check we have a query string */
+ if(!imap->query) {
+ failf(conn->data, "Cannot SEARCH without a query string.");
+ return CURLE_URL_MALFORMAT;
+ }
+
+ /* Send the SEARCH command */
+ result = imap_sendf(conn, "SEARCH %s", imap->query);
+
+ if(!result)
+ state(conn, IMAP_SEARCH);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_perform_logout()
+ *
+ * Performs the logout action prior to sclose() being called.
+ */
+static CURLcode imap_perform_logout(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+
+ /* Send the LOGOUT command */
+ result = imap_sendf(conn, "LOGOUT");
+
+ if(!result)
+ state(conn, IMAP_LOGOUT);
+
+ return result;
+}
+
+/* For the initial server greeting */
+static CURLcode imap_state_servergreet_resp(struct connectdata *conn,
+ int imapcode,
+ imapstate instate)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+
+ (void)instate; /* no use for this yet */
+
+ if(imapcode != 'O') {
+ failf(data, "Got unexpected imap-server response");
+ result = CURLE_FTP_WEIRD_SERVER_REPLY; /* TODO: fix this code */
+ }
+ else
+ result = imap_perform_capability(conn);
+
+ return result;
+}
+
+/* For CAPABILITY responses */
+static CURLcode imap_state_capability_resp(struct connectdata *conn,
+ int imapcode,
+ imapstate instate)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct imap_conn *imapc = &conn->proto.imapc;
+ const char *line = data->state.buffer;
+ size_t wordlen;
+
+ (void)instate; /* no use for this yet */
+
+ /* Do we have a untagged response? */
+ if(imapcode == '*') {
+ line += 2;
+
+ /* Loop through the data line */
+ for(;;) {
+ while(*line &&
+ (*line == ' ' || *line == '\t' ||
+ *line == '\r' || *line == '\n')) {
+
+ line++;
+ }
+
+ if(!*line)
+ break;
+
+ /* Extract the word */
+ for(wordlen = 0; line[wordlen] && line[wordlen] != ' ' &&
+ line[wordlen] != '\t' && line[wordlen] != '\r' &&
+ line[wordlen] != '\n';)
+ wordlen++;
+
+ /* Does the server support the STARTTLS capability? */
+ if(wordlen == 8 && !memcmp(line, "STARTTLS", 8))
+ imapc->tls_supported = TRUE;
+
+ /* Has the server explicitly disabled clear text authentication? */
+ else if(wordlen == 13 && !memcmp(line, "LOGINDISABLED", 13))
+ imapc->login_disabled = TRUE;
+
+ /* Does the server support the SASL-IR capability? */
+ else if(wordlen == 7 && !memcmp(line, "SASL-IR", 7))
+ imapc->ir_supported = TRUE;
+
+ /* Do we have a SASL based authentication mechanism? */
+ else if(wordlen > 5 && !memcmp(line, "AUTH=", 5)) {
+ size_t llen;
+ unsigned int mechbit;
+
+ line += 5;
+ wordlen -= 5;
+
+ /* Test the word for a matching authentication mechanism */
+ if((mechbit = Curl_sasl_decode_mech(line, wordlen, &llen)) &&
+ llen == wordlen)
+ imapc->sasl.authmechs |= mechbit;
+ }
+
+ line += wordlen;
+ }
+ }
+ else if(imapcode == 'O') {
+ if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
+ /* We don't have a SSL/TLS connection yet, but SSL is requested */
+ if(imapc->tls_supported)
+ /* Switch to TLS connection now */
+ result = imap_perform_starttls(conn);
+ else if(data->set.use_ssl == CURLUSESSL_TRY)
+ /* Fallback and carry on with authentication */
+ result = imap_perform_authentication(conn);
+ else {
+ failf(data, "STARTTLS not supported.");
+ result = CURLE_USE_SSL_FAILED;
+ }
+ }
+ else
+ result = imap_perform_authentication(conn);
+ }
+ else
+ result = imap_perform_authentication(conn);
+
+ return result;
}
-/* for STARTTLS responses */
+/* For STARTTLS responses */
static CURLcode imap_state_starttls_resp(struct connectdata *conn,
int imapcode,
imapstate instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
+
(void)instate; /* no use for this yet */
if(imapcode != 'O') {
- failf(data, "STARTTLS denied. %c", imapcode);
- result = CURLE_LOGIN_DENIED;
- }
- else {
- /* Curl_ssl_connect is BLOCKING */
- result = Curl_ssl_connect(conn, FIRSTSOCKET);
- if(CURLE_OK == result) {
- conn->protocol |= PROT_IMAPS;
- result = imap_state_login(conn);
+ if(data->set.use_ssl != CURLUSESSL_TRY) {
+ failf(data, "STARTTLS denied. %c", imapcode);
+ result = CURLE_USE_SSL_FAILED;
}
+ else
+ result = imap_perform_authentication(conn);
}
- state(conn, IMAP_STOP);
+ else
+ result = imap_perform_upgrade_tls(conn);
+
return result;
}
-/* for LOGIN responses */
+/* For SASL authentication responses */
+static CURLcode imap_state_auth_resp(struct connectdata *conn,
+ int imapcode,
+ imapstate instate)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct imap_conn *imapc = &conn->proto.imapc;
+ saslprogress progress;
+
+ (void)instate; /* no use for this yet */
+
+ result = Curl_sasl_continue(&imapc->sasl, conn, imapcode, &progress);
+ if(!result)
+ switch(progress) {
+ case SASL_DONE:
+ state(conn, IMAP_STOP); /* Authenticated */
+ break;
+ case SASL_IDLE: /* No mechanism left after cancellation */
+ if((!imapc->login_disabled) && (imapc->preftype & IMAP_TYPE_CLEARTEXT))
+ /* Perform clear text authentication */
+ result = imap_perform_login(conn);
+ else {
+ failf(data, "Authentication cancelled");
+ result = CURLE_LOGIN_DENIED;
+ }
+ break;
+ default:
+ break;
+ }
+
+ return result;
+}
+
+/* For LOGIN responses */
static CURLcode imap_state_login_resp(struct connectdata *conn,
int imapcode,
imapstate instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
+
(void)instate; /* no use for this yet */
if(imapcode != 'O') {
failf(data, "Access denied. %c", imapcode);
result = CURLE_LOGIN_DENIED;
}
+ else
+ /* End of connect phase */
+ state(conn, IMAP_STOP);
+
+ return result;
+}
+
+/* For LIST responses */
+static CURLcode imap_state_list_resp(struct connectdata *conn, int imapcode,
+ imapstate instate)
+{
+ CURLcode result = CURLE_OK;
+ char *line = conn->data->state.buffer;
+ size_t len = strlen(line);
+
+ (void)instate; /* No use for this yet */
+
+ if(imapcode == '*') {
+ /* Temporarily add the LF character back and send as body to the client */
+ line[len] = '\n';
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1);
+ line[len] = '\0';
+ }
+ else if(imapcode != 'O')
+ result = CURLE_QUOTE_ERROR; /* TODO: Fix error code */
+ else
+ /* End of DO phase */
+ state(conn, IMAP_STOP);
- state(conn, IMAP_STOP);
return result;
}
-/* for the (first line of) FETCH BODY[TEXT] response */
-static CURLcode imap_state_fetch_resp(struct connectdata *conn,
- int imapcode,
+/* For SELECT responses */
+static CURLcode imap_state_select_resp(struct connectdata *conn, int imapcode,
+ imapstate instate)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct IMAP *imap = conn->data->req.protop;
+ struct imap_conn *imapc = &conn->proto.imapc;
+ const char *line = data->state.buffer;
+ char tmp[20];
+
+ (void)instate; /* no use for this yet */
+
+ if(imapcode == '*') {
+ /* See if this is an UIDVALIDITY response */
+ if(sscanf(line + 2, "OK [UIDVALIDITY %19[0123456789]]", tmp) == 1) {
+ Curl_safefree(imapc->mailbox_uidvalidity);
+ imapc->mailbox_uidvalidity = strdup(tmp);
+ }
+ }
+ else if(imapcode == 'O') {
+ /* Check if the UIDVALIDITY has been specified and matches */
+ if(imap->uidvalidity && imapc->mailbox_uidvalidity &&
+ strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)) {
+ failf(conn->data, "Mailbox UIDVALIDITY has changed");
+ result = CURLE_REMOTE_FILE_NOT_FOUND;
+ }
+ else {
+ /* Note the currently opened mailbox on this connection */
+ imapc->mailbox = strdup(imap->mailbox);
+
+ if(imap->custom)
+ result = imap_perform_list(conn);
+ else if(imap->query)
+ result = imap_perform_search(conn);
+ else
+ result = imap_perform_fetch(conn);
+ }
+ }
+ else {
+ failf(data, "Select failed");
+ result = CURLE_LOGIN_DENIED;
+ }
+
+ return result;
+}
+
+/* For the (first line of the) FETCH responses */
+static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
imapstate instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
struct imap_conn *imapc = &conn->proto.imapc;
- struct FTP *imap = data->state.proto.imap;
struct pingpong *pp = &imapc->pp;
const char *ptr = data->state.buffer;
+ bool parsed = FALSE;
+ curl_off_t size;
+
(void)instate; /* no use for this yet */
- if('*' != imapcode) {
- Curl_pgrsSetDownloadSize(data, 0);
+ if(imapcode != '*') {
+ Curl_pgrsSetDownloadSize(data, -1);
state(conn, IMAP_STOP);
- return CURLE_OK;
+ return CURLE_REMOTE_FILE_NOT_FOUND; /* TODO: Fix error code */
}
- /* Something like this comes "* 1 FETCH (BODY[TEXT] {2021}\r" */
+ /* Something like this is received "* 1 FETCH (BODY[TEXT] {2021}\r" so parse
+ the continuation data contained within the curly brackets */
while(*ptr && (*ptr != '{'))
ptr++;
if(*ptr == '{') {
- curl_off_t filesize = curlx_strtoofft(ptr+1, NULL, 10);
- if(filesize)
- Curl_pgrsSetDownloadSize(data, filesize);
+ char *endptr;
+ size = curlx_strtoofft(ptr + 1, &endptr, 10);
+ if(endptr - ptr > 1 && endptr[0] == '}' &&
+ endptr[1] == '\r' && endptr[2] == '\0')
+ parsed = TRUE;
+ }
- infof(data, "Found %" FORMAT_OFF_TU " bytes to download\n", filesize);
+ if(parsed) {
+ infof(data, "Found %" CURL_FORMAT_CURL_OFF_TU " bytes to download\n",
+ size);
+ Curl_pgrsSetDownloadSize(data, size);
if(pp->cache) {
/* At this point there is a bunch of data in the header "cache" that is
@@ -407,322 +1132,333 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn,
that there may even be additional "headers" after the body. */
size_t chunk = pp->cache_size;
- if(chunk > (size_t)filesize)
- /* the conversion from curl_off_t to size_t is always fine here */
- chunk = (size_t)filesize;
+ if(chunk > (size_t)size)
+ /* The conversion from curl_off_t to size_t is always fine here */
+ chunk = (size_t)size;
result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk);
if(result)
return result;
- filesize -= chunk;
+ data->req.bytecount += chunk;
- /* we've now used parts of or the entire cache */
+ infof(data, "Written %" CURL_FORMAT_CURL_OFF_TU
+ " bytes, %" CURL_FORMAT_CURL_OFF_TU
+ " bytes are left for transfer\n", (curl_off_t)chunk,
+ size - chunk);
+
+ /* Have we used the entire cache or just part of it?*/
if(pp->cache_size > chunk) {
- /* part of, move the trailing data to the start and reduce the size */
- memmove(pp->cache, pp->cache+chunk,
- pp->cache_size - chunk);
+ /* Only part of it so shrink the cache to fit the trailing data */
+ memmove(pp->cache, pp->cache + chunk, pp->cache_size - chunk);
pp->cache_size -= chunk;
}
else {
- /* cache is drained */
- free(pp->cache);
- pp->cache = NULL;
+ /* Free the cache */
+ Curl_safefree(pp->cache);
+
+ /* Reset the cache size */
pp->cache_size = 0;
}
}
- infof(data, "Filesize left: %" FORMAT_OFF_T "\n", filesize);
-
- if(!filesize)
- /* the entire data is already transfered! */
+ if(data->req.bytecount == size)
+ /* The entire data is already transferred! */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
- else
+ else {
/* IMAP download */
- Curl_setup_transfer(conn, FIRSTSOCKET, filesize, FALSE,
- imap->bytecountp, -1, NULL); /* no upload here */
-
- data->req.maxdownload = filesize;
+ data->req.maxdownload = size;
+ Curl_setup_transfer(conn, FIRSTSOCKET, size, FALSE, NULL, -1, NULL);
+ }
}
- else
+ else {
/* We don't know how to parse this line */
+ failf(pp->conn->data, "Failed to parse FETCH response.");
result = CURLE_FTP_WEIRD_SERVER_REPLY; /* TODO: fix this code */
+ }
+ /* End of DO phase */
state(conn, IMAP_STOP);
+
return result;
}
-/* start the DO phase */
-static CURLcode imap_select(struct connectdata *conn)
+/* For final FETCH responses performed after the download */
+static CURLcode imap_state_fetch_final_resp(struct connectdata *conn,
+ int imapcode,
+ imapstate instate)
{
CURLcode result = CURLE_OK;
- struct imap_conn *imapc = &conn->proto.imapc;
- const char *str;
- str = getcmdid(conn);
+ (void)instate; /* No use for this yet */
- result = imapsendf(conn, str, "%s SELECT %s", str,
- imapc->mailbox?imapc->mailbox:"");
- if(result)
- return result;
+ if(imapcode != 'O')
+ result = CURLE_FTP_WEIRD_SERVER_REPLY; /* TODO: Fix error code */
+ else
+ /* End of DONE phase */
+ state(conn, IMAP_STOP);
- state(conn, IMAP_SELECT);
return result;
}
-static CURLcode imap_fetch(struct connectdata *conn)
+/* For APPEND responses */
+static CURLcode imap_state_append_resp(struct connectdata *conn, int imapcode,
+ imapstate instate)
{
CURLcode result = CURLE_OK;
- const char *str;
+ struct SessionHandle *data = conn->data;
- str = getcmdid(conn);
+ (void)instate; /* No use for this yet */
- /* TODO: make this select the correct mail
- * Use "1 body[text]" to get the full mail body of mail 1
- */
- result = imapsendf(conn, str, "%s FETCH 1 BODY[TEXT]", str);
- if(result)
- return result;
+ if(imapcode != '+') {
+ result = CURLE_UPLOAD_FAILED;
+ }
+ else {
+ /* Set the progress upload size */
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
+
+ /* IMAP upload */
+ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL);
+
+ /* End of DO phase */
+ state(conn, IMAP_STOP);
+ }
+
+ return result;
+}
+
+/* For final APPEND responses performed after the upload */
+static CURLcode imap_state_append_final_resp(struct connectdata *conn,
+ int imapcode,
+ imapstate instate)
+{
+ CURLcode result = CURLE_OK;
+
+ (void)instate; /* No use for this yet */
- /*
- * When issued, the server will respond with a single line similar to
- * '* 1 FETCH (BODY[TEXT] {2021}'
- *
- * Identifying the fetch and how many bytes of contents we can expect. We
- * must extract that number before continuing to "download as usual".
- */
+ if(imapcode != 'O')
+ result = CURLE_UPLOAD_FAILED;
+ else
+ /* End of DONE phase */
+ state(conn, IMAP_STOP);
- state(conn, IMAP_FETCH);
return result;
}
-/* for SELECT responses */
-static CURLcode imap_state_select_resp(struct connectdata *conn,
- int imapcode,
+/* For SEARCH responses */
+static CURLcode imap_state_search_resp(struct connectdata *conn, int imapcode,
imapstate instate)
{
CURLcode result = CURLE_OK;
- struct SessionHandle *data = conn->data;
- (void)instate; /* no use for this yet */
+ char *line = conn->data->state.buffer;
+ size_t len = strlen(line);
- if(imapcode != 'O') {
- failf(data, "Select failed");
- result = CURLE_LOGIN_DENIED;
+ (void)instate; /* No use for this yet */
+
+ if(imapcode == '*') {
+ /* Temporarily add the LF character back and send as body to the client */
+ line[len] = '\n';
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1);
+ line[len] = '\0';
}
+ else if(imapcode != 'O')
+ result = CURLE_QUOTE_ERROR; /* TODO: Fix error code */
else
- result = imap_fetch(conn);
+ /* End of DO phase */
+ state(conn, IMAP_STOP);
+
return result;
}
static CURLcode imap_statemach_act(struct connectdata *conn)
{
- CURLcode result;
+ CURLcode result = CURLE_OK;
curl_socket_t sock = conn->sock[FIRSTSOCKET];
- struct SessionHandle *data=conn->data;
int imapcode;
struct imap_conn *imapc = &conn->proto.imapc;
struct pingpong *pp = &imapc->pp;
size_t nread = 0;
+ /* Busy upgrading the connection; right now all I/O is SSL/TLS, not IMAP */
+ if(imapc->state == IMAP_UPGRADETLS)
+ return imap_perform_upgrade_tls(conn);
+
+ /* Flush any data that needs to be sent */
if(pp->sendleft)
return Curl_pp_flushsend(pp);
- /* we read a piece of response */
- result = Curl_pp_readresp(sock, pp, &imapcode, &nread);
- if(result)
- return result;
+ do {
+ /* Read the response from the server */
+ result = Curl_pp_readresp(sock, pp, &imapcode, &nread);
+ if(result)
+ return result;
- if(imapcode)
- /* we have now received a full IMAP server response */
- switch(imapc->state) {
- case IMAP_SERVERGREET:
- if(imapcode != 'O') {
- failf(data, "Got unexpected imap-server response");
+ /* Was there an error parsing the response line? */
+ if(imapcode == -1)
return CURLE_FTP_WEIRD_SERVER_REPLY;
- }
- if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
- /* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
- to TLS connection now */
- const char *str;
+ if(!imapcode)
+ break;
- str = getcmdid(conn);
- result = imapsendf(conn, str, "%s STARTTLS", str);
- state(conn, IMAP_STARTTLS);
- }
- else
- result = imap_state_login(conn);
- if(result)
- return result;
- break;
+ /* We have now received a full IMAP server response */
+ switch(imapc->state) {
+ case IMAP_SERVERGREET:
+ result = imap_state_servergreet_resp(conn, imapcode, imapc->state);
+ break;
- case IMAP_LOGIN:
- result = imap_state_login_resp(conn, imapcode, imapc->state);
- break;
+ case IMAP_CAPABILITY:
+ result = imap_state_capability_resp(conn, imapcode, imapc->state);
+ break;
- case IMAP_STARTTLS:
- result = imap_state_starttls_resp(conn, imapcode, imapc->state);
- break;
+ case IMAP_STARTTLS:
+ result = imap_state_starttls_resp(conn, imapcode, imapc->state);
+ break;
- case IMAP_FETCH:
- result = imap_state_fetch_resp(conn, imapcode, imapc->state);
- break;
+ case IMAP_AUTHENTICATE:
+ result = imap_state_auth_resp(conn, imapcode, imapc->state);
+ break;
- case IMAP_SELECT:
- result = imap_state_select_resp(conn, imapcode, imapc->state);
- break;
+ case IMAP_LOGIN:
+ result = imap_state_login_resp(conn, imapcode, imapc->state);
+ break;
- case IMAP_LOGOUT:
- /* fallthrough, just stop! */
- default:
- /* internal error */
- state(conn, IMAP_STOP);
- break;
- }
+ case IMAP_LIST:
+ result = imap_state_list_resp(conn, imapcode, imapc->state);
+ break;
+
+ case IMAP_SELECT:
+ result = imap_state_select_resp(conn, imapcode, imapc->state);
+ break;
+
+ case IMAP_FETCH:
+ result = imap_state_fetch_resp(conn, imapcode, imapc->state);
+ break;
+
+ case IMAP_FETCH_FINAL:
+ result = imap_state_fetch_final_resp(conn, imapcode, imapc->state);
+ break;
+
+ case IMAP_APPEND:
+ result = imap_state_append_resp(conn, imapcode, imapc->state);
+ break;
+
+ case IMAP_APPEND_FINAL:
+ result = imap_state_append_final_resp(conn, imapcode, imapc->state);
+ break;
+
+ case IMAP_SEARCH:
+ result = imap_state_search_resp(conn, imapcode, imapc->state);
+ break;
+
+ case IMAP_LOGOUT:
+ /* fallthrough, just stop! */
+ default:
+ /* internal error */
+ state(conn, IMAP_STOP);
+ break;
+ }
+ } while(!result && imapc->state != IMAP_STOP && Curl_pp_moredata(pp));
return result;
}
-/* called repeatedly until done from multi.c */
-static CURLcode imap_multi_statemach(struct connectdata *conn,
- bool *done)
+/* Called repeatedly until done from multi.c */
+static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done)
{
+ CURLcode result = CURLE_OK;
struct imap_conn *imapc = &conn->proto.imapc;
- CURLcode result = Curl_pp_multi_statemach(&imapc->pp);
- *done = (bool)(imapc->state == IMAP_STOP);
+ if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone) {
+ result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone);
+ if(result || !imapc->ssldone)
+ return result;
+ }
+
+ result = Curl_pp_statemach(&imapc->pp, FALSE);
+ *done = (imapc->state == IMAP_STOP) ? TRUE : FALSE;
return result;
}
-static CURLcode imap_easy_statemach(struct connectdata *conn)
+static CURLcode imap_block_statemach(struct connectdata *conn)
{
- struct imap_conn *imapc = &conn->proto.imapc;
- struct pingpong *pp = &imapc->pp;
CURLcode result = CURLE_OK;
+ struct imap_conn *imapc = &conn->proto.imapc;
- while(imapc->state != IMAP_STOP) {
- result = Curl_pp_easy_statemach(pp);
- if(result)
- break;
- }
+ while(imapc->state != IMAP_STOP && !result)
+ result = Curl_pp_statemach(&imapc->pp, TRUE);
return result;
}
-/*
- * Allocate and initialize the struct IMAP for the current SessionHandle. If
- * need be.
- */
+/* Allocate and initialize the struct IMAP for the current SessionHandle if
+ required */
static CURLcode imap_init(struct connectdata *conn)
{
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *imap = data->state.proto.imap;
- if(!imap) {
- imap = data->state.proto.imap = calloc(sizeof(struct FTP), 1);
- if(!imap)
- return CURLE_OUT_OF_MEMORY;
- }
+ struct IMAP *imap;
- /* get some initial data into the imap struct */
- imap->bytecountp = &data->req.bytecount;
+ imap = data->req.protop = calloc(sizeof(struct IMAP), 1);
+ if(!imap)
+ result = CURLE_OUT_OF_MEMORY;
- /* No need to duplicate user+password, the connectdata struct won't change
- during a session, but we re-init them here since on subsequent inits
- since the conn struct may have changed or been replaced.
- */
- imap->user = conn->user;
- imap->passwd = conn->passwd;
+ return result;
+}
- return CURLE_OK;
+/* For the IMAP "protocol connect" and "doing" phases only */
+static int imap_getsock(struct connectdata *conn, curl_socket_t *socks,
+ int numsocks)
+{
+ return Curl_pp_getsock(&conn->proto.imapc.pp, socks, numsocks);
}
-/*
- * imap_connect() should do everything that is to be considered a part of
- * the connection phase.
+/***********************************************************************
+ *
+ * imap_connect()
+ *
+ * This function should do everything that is to be considered a part of the
+ * connection phase.
*
* The variable 'done' points to will be TRUE if the protocol-layer connect
- * phase is done when this function returns, or FALSE is not. When called as
- * a part of the easy interface, it will always be TRUE.
+ * phase is done when this function returns, or FALSE if not.
*/
-static CURLcode imap_connect(struct connectdata *conn,
- bool *done) /* see description above */
+static CURLcode imap_connect(struct connectdata *conn, bool *done)
{
- CURLcode result;
+ CURLcode result = CURLE_OK;
struct imap_conn *imapc = &conn->proto.imapc;
- struct SessionHandle *data=conn->data;
struct pingpong *pp = &imapc->pp;
*done = FALSE; /* default to not done yet */
- /* If there already is a protocol-specific struct allocated for this
- sessionhandle, deal with it */
- Curl_reset_reqproto(conn);
-
- result = imap_init(conn);
- if(CURLE_OK != result)
- return result;
-
- /* We always support persistant connections on imap */
- conn->bits.close = FALSE;
+ /* We always support persistent connections in IMAP */
+ connkeep(conn, "IMAP default");
- pp->response_time = RESP_TIMEOUT; /* set default response time-out */
+ /* Set the default response time-out */
+ pp->response_time = RESP_TIMEOUT;
pp->statemach_act = imap_statemach_act;
pp->endofresp = imap_endofresp;
pp->conn = conn;
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
- if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
- /* for IMAP over HTTP proxy */
- struct HTTP http_proxy;
- struct FTP *imap_save;
-
- /* BLOCKING */
- /* We want "seamless" IMAP operations through HTTP proxy tunnel */
-
- /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
- * conn->proto.http; we want IMAP through HTTP and we have to change the
- * member temporarily for connecting to the HTTP proxy. After
- * Curl_proxyCONNECT we have to set back the member to the original struct
- * IMAP pointer
- */
- imap_save = data->state.proto.imap;
- memset(&http_proxy, 0, sizeof(http_proxy));
- data->state.proto.http = &http_proxy;
-
- result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
- conn->host.name, conn->remote_port);
-
- data->state.proto.imap = imap_save;
-
- if(CURLE_OK != result)
- return result;
- }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
+ /* Set the default preferred authentication type and mechanism */
+ imapc->preftype = IMAP_TYPE_ANY;
+ Curl_sasl_init(&imapc->sasl, &saslimap);
- if(conn->protocol & PROT_IMAPS) {
- /* BLOCKING */
- /* IMAPS is simply imap with SSL for the control channel */
- /* now, perform the SSL initialization for this socket */
- result = Curl_ssl_connect(conn, FIRSTSOCKET);
- if(result)
- return result;
- }
+ /* Initialise the pingpong layer */
+ Curl_pp_init(pp);
- Curl_pp_init(pp); /* init generic pingpong data */
+ /* Parse the URL options */
+ result = imap_parse_url_options(conn);
+ if(result)
+ return result;
- /* When we connect, we start in the state where we await the server greeting
- response */
+ /* Start off waiting for the server greeting response */
state(conn, IMAP_SERVERGREET);
- imapc->idstr = "*"; /* we start off waiting for a '*' response */
- if(data->state.used_interface == Curl_if_multi)
- result = imap_multi_statemach(conn, done);
- else {
- result = imap_easy_statemach(conn);
- if(!result)
- *done = TRUE;
- }
+ /* Start off with an response id of '*' */
+ strcpy(imapc->resptag, "*");
+
+ result = imap_multi_statemach(conn, done);
return result;
}
@@ -739,25 +1475,57 @@ static CURLcode imap_connect(struct connectdata *conn,
static CURLcode imap_done(struct connectdata *conn, CURLcode status,
bool premature)
{
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *imap = data->state.proto.imap;
- CURLcode result=CURLE_OK;
+ struct IMAP *imap = data->req.protop;
+
(void)premature;
if(!imap)
- /* When the easy handle is removed from the multi while libcurl is still
- * trying to resolve the host name, it seems that the imap struct is not
- * yet initialized, but the removal action calls Curl_done() which calls
- * this function. So we simply return success if no imap pointer is set.
- */
+ /* When the easy handle is removed from the multi interface while libcurl
+ is still trying to resolve the host name, the IMAP struct is not yet
+ initialized. However, the removal action calls Curl_done() which in
+ turn calls this function, so we simply return success. */
return CURLE_OK;
if(status) {
- conn->bits.close = TRUE; /* marked for closure */
- result = status; /* use the already set error code */
+ connclose(conn, "IMAP done with bad status"); /* marked for closure */
+ result = status; /* use the already set error code */
+ }
+ else if(!data->set.connect_only && !imap->custom &&
+ (imap->uid || data->set.upload)) {
+ /* Handle responses after FETCH or APPEND transfer has finished */
+ if(!data->set.upload)
+ state(conn, IMAP_FETCH_FINAL);
+ else {
+ /* End the APPEND command first by sending an empty line */
+ result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", "");
+ if(!result)
+ state(conn, IMAP_APPEND_FINAL);
+ }
+
+ /* Run the state-machine
+
+ TODO: when the multi interface is used, this _really_ should be using
+ the imap_multi_statemach function but we have no general support for
+ non-blocking DONE operations, not in the multi state machine and with
+ Curl_done() invokes on several places in the code!
+ */
+ if(!result)
+ result = imap_block_statemach(conn);
}
- /* clear these for next connection */
+ /* Cleanup our per-request based variables */
+ Curl_safefree(imap->mailbox);
+ Curl_safefree(imap->uidvalidity);
+ Curl_safefree(imap->uid);
+ Curl_safefree(imap->section);
+ Curl_safefree(imap->partial);
+ Curl_safefree(imap->query);
+ Curl_safefree(imap->custom);
+ Curl_safefree(imap->custom_params);
+
+ /* Clear the transfer mode for the next request */
imap->transfer = FTPTRANSFER_BODY;
return result;
@@ -767,41 +1535,64 @@ static CURLcode imap_done(struct connectdata *conn, CURLcode status,
*
* imap_perform()
*
- * This is the actual DO function for IMAP. Get a file/directory according to
- * the options previously setup.
+ * This is the actual DO function for IMAP. Fetch or append a message, or do
+ * other things according to the options previously setup.
*/
-
-static
-CURLcode imap_perform(struct connectdata *conn,
- bool *connected, /* connect status after PASV / PORT */
- bool *dophase_done)
+static CURLcode imap_perform(struct connectdata *conn, bool *connected,
+ bool *dophase_done)
{
- /* this is IMAP and no proxy */
- CURLcode result=CURLE_OK;
+ /* This is IMAP and no proxy */
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct IMAP *imap = data->req.protop;
+ struct imap_conn *imapc = &conn->proto.imapc;
+ bool selected = FALSE;
DEBUGF(infof(conn->data, "DO phase starts\n"));
if(conn->data->set.opt_no_body) {
- /* requested no body means no transfer... */
- struct FTP *imap = conn->data->state.proto.imap;
+ /* Requested no body means no transfer */
imap->transfer = FTPTRANSFER_INFO;
}
*dophase_done = FALSE; /* not done yet */
- /* start the first command in the DO phase */
- result = imap_select(conn);
+ /* Determine if the requested mailbox (with the same UIDVALIDITY if set)
+ has already been selected on this connection */
+ if(imap->mailbox && imapc->mailbox &&
+ !strcmp(imap->mailbox, imapc->mailbox) &&
+ (!imap->uidvalidity || !imapc->mailbox_uidvalidity ||
+ !strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)))
+ selected = TRUE;
+
+ /* Start the first command in the DO phase */
+ if(conn->data->set.upload)
+ /* APPEND can be executed directly */
+ result = imap_perform_append(conn);
+ else if(imap->custom && (selected || !imap->mailbox))
+ /* Custom command using the same mailbox or no mailbox */
+ result = imap_perform_list(conn);
+ else if(!imap->custom && selected && imap->uid)
+ /* FETCH from the same mailbox */
+ result = imap_perform_fetch(conn);
+ else if(!imap->custom && selected && imap->query)
+ /* SEARCH the current mailbox */
+ result = imap_perform_search(conn);
+ else if(imap->mailbox && !selected &&
+ (imap->custom || imap->uid || imap->query))
+ /* SELECT the mailbox */
+ result = imap_perform_select(conn);
+ else
+ /* LIST */
+ result = imap_perform_list(conn);
+
if(result)
return result;
- /* run the state-machine */
- if(conn->data->state.used_interface == Curl_if_multi)
- result = imap_multi_statemach(conn, dophase_done);
- else {
- result = imap_easy_statemach(conn);
- *dophase_done = TRUE; /* with the easy interface we are done here */
- }
- *connected = conn->bits.tcpconnect;
+ /* Run the state-machine */
+ result = imap_multi_statemach(conn, dophase_done);
+
+ *connected = conn->bits.tcpconnect[FIRSTSOCKET];
if(*dophase_done)
DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -820,52 +1611,21 @@ CURLcode imap_perform(struct connectdata *conn,
*/
static CURLcode imap_do(struct connectdata *conn, bool *done)
{
- CURLcode retcode = CURLE_OK;
+ CURLcode result = CURLE_OK;
*done = FALSE; /* default to false */
- /*
- Since connections can be re-used between SessionHandles, this might be a
- connection already existing but on a fresh SessionHandle struct so we must
- make sure we have a good 'struct IMAP' to play with. For new connections,
- the struct IMAP is allocated and setup in the imap_connect() function.
- */
- Curl_reset_reqproto(conn);
- retcode = imap_init(conn);
- if(retcode)
- return retcode;
-
- retcode = imap_parse_url_path(conn);
- if(retcode)
- return retcode;
-
- retcode = imap_regular_transfer(conn, done);
-
- return retcode;
-}
-
-/***********************************************************************
- *
- * imap_logout()
- *
- * This should be called before calling sclose(). We should then wait for the
- * response from the server before returning. The calling code should then try
- * to close the connection.
- *
- */
-static CURLcode imap_logout(struct connectdata *conn)
-{
- CURLcode result = CURLE_OK;
- const char *str;
-
- str = getcmdid(conn);
+ /* Parse the URL path */
+ result = imap_parse_url_path(conn);
+ if(result)
+ return result;
- result = imapsendf(conn, str, "%s LOGOUT", str, NULL);
+ /* Parse the custom request */
+ result = imap_parse_custom_request(conn);
if(result)
return result;
- state(conn, IMAP_LOGOUT);
- result = imap_easy_statemach(conn);
+ result = imap_regular_transfer(conn, done);
return result;
}
@@ -877,53 +1637,38 @@ static CURLcode imap_logout(struct connectdata *conn)
* Disconnect from an IMAP server. Cleanup protocol-specific per-connection
* resources. BLOCKING.
*/
-static CURLcode imap_disconnect(struct connectdata *conn)
+static CURLcode imap_disconnect(struct connectdata *conn, bool dead_connection)
{
- struct imap_conn *imapc= &conn->proto.imapc;
+ struct imap_conn *imapc = &conn->proto.imapc;
+
+ /* We cannot send quit unconditionally. If this connection is stale or
+ bad in any way, sending quit and waiting around here will make the
+ disconnect wait in vain and cause more problems than we need to. */
/* The IMAP session may or may not have been allocated/setup at this
point! */
- if (imapc->pp.conn)
- (void)imap_logout(conn); /* ignore errors on the LOGOUT */
+ if(!dead_connection && imapc->pp.conn && imapc->pp.conn->bits.protoconnstart)
+ if(!imap_perform_logout(conn))
+ (void)imap_block_statemach(conn); /* ignore errors on LOGOUT */
+ /* Disconnect from the server */
Curl_pp_disconnect(&imapc->pp);
+ /* Cleanup the SASL module */
+ Curl_sasl_cleanup(conn, imapc->sasl.authused);
+
+ /* Cleanup our connection based variables */
Curl_safefree(imapc->mailbox);
+ Curl_safefree(imapc->mailbox_uidvalidity);
return CURLE_OK;
}
-/***********************************************************************
- *
- * imap_parse_url_path()
- *
- * Parse the URL path into separate path components.
- *
- */
-static CURLcode imap_parse_url_path(struct connectdata *conn)
+/* Call this when the DO phase has completed */
+static CURLcode imap_dophase_done(struct connectdata *conn, bool connected)
{
- /* the imap struct is already inited in imap_connect() */
- struct imap_conn *imapc = &conn->proto.imapc;
- struct SessionHandle *data = conn->data;
- const char *path = data->state.path;
- int len;
-
- if(!*path)
- path = "INBOX";
+ struct IMAP *imap = conn->data->req.protop;
- /* url decode the path and use this mailbox */
- imapc->mailbox = curl_easy_unescape(data, path, 0, &len);
- if(!imapc->mailbox)
- return CURLE_OUT_OF_MEMORY;
-
- return CURLE_OK;
-}
-
-/* call this when the DO phase has completed */
-static CURLcode imap_dophase_done(struct connectdata *conn,
- bool connected)
-{
- struct FTP *imap = conn->data->state.proto.imap;
(void)connected;
if(imap->transfer != FTPTRANSFER_BODY)
@@ -933,18 +1678,19 @@ static CURLcode imap_dophase_done(struct connectdata *conn,
return CURLE_OK;
}
-/* called from multi.c while DOing */
-static CURLcode imap_doing(struct connectdata *conn,
- bool *dophase_done)
+/* Called from multi.c while DOing */
+static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done)
{
- CURLcode result;
- result = imap_multi_statemach(conn, dophase_done);
+ CURLcode result = imap_multi_statemach(conn, dophase_done);
- if(*dophase_done) {
+ if(result)
+ DEBUGF(infof(conn->data, "DO phase failed\n"));
+ else if(*dophase_done) {
result = imap_dophase_done(conn, FALSE /* not connected */);
DEBUGF(infof(conn->data, "DO phase is complete\n"));
}
+
return result;
}
@@ -956,46 +1702,44 @@ static CURLcode imap_doing(struct connectdata *conn,
*
* Performs all commands done before a regular transfer between a local and a
* remote host.
- *
*/
-static
-CURLcode imap_regular_transfer(struct connectdata *conn,
- bool *dophase_done)
+static CURLcode imap_regular_transfer(struct connectdata *conn,
+ bool *dophase_done)
{
- CURLcode result=CURLE_OK;
- bool connected=FALSE;
+ CURLcode result = CURLE_OK;
+ bool connected = FALSE;
struct SessionHandle *data = conn->data;
- data->req.size = -1; /* make sure this is unknown at this point */
+ /* Make sure size is unknown at this point */
+ data->req.size = -1;
+
+ /* Set the progress data */
Curl_pgrsSetUploadCounter(data, 0);
Curl_pgrsSetDownloadCounter(data, 0);
- Curl_pgrsSetUploadSize(data, 0);
- Curl_pgrsSetDownloadSize(data, 0);
+ Curl_pgrsSetUploadSize(data, -1);
+ Curl_pgrsSetDownloadSize(data, -1);
- result = imap_perform(conn,
- &connected, /* have we connected after PASV/PORT */
- dophase_done); /* all commands in the DO-phase done? */
-
- if(CURLE_OK == result) {
-
- if(!*dophase_done)
- /* the DO phase has not completed yet */
- return CURLE_OK;
+ /* Carry out the perform */
+ result = imap_perform(conn, &connected, dophase_done);
+ /* Perform post DO phase operations if necessary */
+ if(!result && *dophase_done)
result = imap_dophase_done(conn, connected);
- if(result)
- return result;
- }
return result;
}
-static CURLcode imap_setup_connection(struct connectdata * conn)
+static CURLcode imap_setup_connection(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
+ /* Initialise the IMAP layer */
+ CURLcode result = imap_init(conn);
+ if(result)
+ return result;
+
if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) {
- /* Unless we have asked to tunnel imap operations through the proxy, we
+ /* Unless we have asked to tunnel IMAP operations through the proxy, we
switch and use HTTP operations only */
#ifndef CURL_DISABLE_HTTP
if(conn->handler == &Curl_handler_imap)
@@ -1008,12 +1752,9 @@ static CURLcode imap_setup_connection(struct connectdata * conn)
return CURLE_UNSUPPORTED_PROTOCOL;
#endif
}
- /*
- * We explicitly mark this connection as persistent here as we're doing
- * IMAP over HTTP and thus we accidentally avoid setting this value
- * otherwise.
- */
- conn->bits.close = FALSE;
+
+ /* set it up as an HTTP connection instead */
+ return conn->handler->setup_connection(conn);
#else
failf(data, "IMAP over http proxy requires HTTP support built-in!");
return CURLE_UNSUPPORTED_PROTOCOL;
@@ -1025,4 +1766,377 @@ static CURLcode imap_setup_connection(struct connectdata * conn)
return CURLE_OK;
}
+/***********************************************************************
+ *
+ * imap_sendf()
+ *
+ * Sends the formated string as an IMAP command to the server.
+ *
+ * Designed to never block.
+ */
+static CURLcode imap_sendf(struct connectdata *conn, const char *fmt, ...)
+{
+ CURLcode result = CURLE_OK;
+ struct imap_conn *imapc = &conn->proto.imapc;
+ char *taggedfmt;
+ va_list ap;
+
+ DEBUGASSERT(fmt);
+
+ /* Calculate the next command ID wrapping at 3 digits */
+ imapc->cmdid = (imapc->cmdid + 1) % 1000;
+
+ /* Calculate the tag based on the connection ID and command ID */
+ snprintf(imapc->resptag, sizeof(imapc->resptag), "%c%03d",
+ 'A' + curlx_sltosi(conn->connection_id % 26), imapc->cmdid);
+
+ /* Prefix the format with the tag */
+ taggedfmt = aprintf("%s %s", imapc->resptag, fmt);
+ if(!taggedfmt)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Send the data with the tag */
+ va_start(ap, fmt);
+ result = Curl_pp_vsendf(&imapc->pp, taggedfmt, ap);
+ va_end(ap);
+
+ free(taggedfmt);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_atom()
+ *
+ * Checks the input string for characters that need escaping and returns an
+ * atom ready for sending to the server.
+ *
+ * The returned string needs to be freed.
+ *
+ */
+static char *imap_atom(const char *str)
+{
+ const char *p1;
+ char *p2;
+ size_t backsp_count = 0;
+ size_t quote_count = 0;
+ bool space_exists = FALSE;
+ size_t newlen = 0;
+ char *newstr = NULL;
+
+ if(!str)
+ return NULL;
+
+ /* Count any unescaped characters */
+ p1 = str;
+ while(*p1) {
+ if(*p1 == '\\')
+ backsp_count++;
+ else if(*p1 == '"')
+ quote_count++;
+ else if(*p1 == ' ')
+ space_exists = TRUE;
+
+ p1++;
+ }
+
+ /* Does the input contain any unescaped characters? */
+ if(!backsp_count && !quote_count && !space_exists)
+ return strdup(str);
+
+ /* Calculate the new string length */
+ newlen = strlen(str) + backsp_count + quote_count + (space_exists ? 2 : 0);
+
+ /* Allocate the new string */
+ newstr = (char *) malloc((newlen + 1) * sizeof(char));
+ if(!newstr)
+ return NULL;
+
+ /* Surround the string in quotes if necessary */
+ p2 = newstr;
+ if(space_exists) {
+ newstr[0] = '"';
+ newstr[newlen - 1] = '"';
+ p2++;
+ }
+
+ /* Copy the string, escaping backslash and quote characters along the way */
+ p1 = str;
+ while(*p1) {
+ if(*p1 == '\\' || *p1 == '"') {
+ *p2 = '\\';
+ p2++;
+ }
+
+ *p2 = *p1;
+
+ p1++;
+ p2++;
+ }
+
+ /* Terminate the string */
+ newstr[newlen] = '\0';
+
+ return newstr;
+}
+
+/***********************************************************************
+ *
+ * imap_is_bchar()
+ *
+ * Portable test of whether the specified char is a "bchar" as defined in the
+ * grammar of RFC-5092.
+ */
+static bool imap_is_bchar(char ch)
+{
+ switch(ch) {
+ /* bchar */
+ case ':': case '@': case '/':
+ /* bchar -> achar */
+ case '&': case '=':
+ /* bchar -> achar -> uchar -> unreserved */
+ case '0': case '1': case '2': case '3': case '4': case '5': case '6':
+ case '7': case '8': case '9':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G':
+ case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N':
+ case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U':
+ case 'V': case 'W': case 'X': case 'Y': case 'Z':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g':
+ case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
+ case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u':
+ case 'v': case 'w': case 'x': case 'y': case 'z':
+ case '-': case '.': case '_': case '~':
+ /* bchar -> achar -> uchar -> sub-delims-sh */
+ case '!': case '$': case '\'': case '(': case ')': case '*':
+ case '+': case ',':
+ /* bchar -> achar -> uchar -> pct-encoded */
+ case '%': /* HEXDIG chars are already included above */
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+/***********************************************************************
+ *
+ * imap_parse_url_options()
+ *
+ * Parse the URL login options.
+ */
+static CURLcode imap_parse_url_options(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct imap_conn *imapc = &conn->proto.imapc;
+ const char *ptr = conn->options;
+
+ imapc->sasl.resetprefs = TRUE;
+
+ while(!result && ptr && *ptr) {
+ const char *key = ptr;
+ const char *value;
+
+ while(*ptr && *ptr != '=')
+ ptr++;
+
+ value = ptr + 1;
+
+ while(*ptr && *ptr != ';')
+ ptr++;
+
+ if(strnequal(key, "AUTH=", 5))
+ result = Curl_sasl_parse_url_auth_option(&imapc->sasl,
+ value, ptr - value);
+ else
+ result = CURLE_URL_MALFORMAT;
+
+ if(*ptr == ';')
+ ptr++;
+ }
+
+ switch(imapc->sasl.prefmech) {
+ case SASL_AUTH_NONE:
+ imapc->preftype = IMAP_TYPE_NONE;
+ break;
+ case SASL_AUTH_DEFAULT:
+ imapc->preftype = IMAP_TYPE_ANY;
+ break;
+ default:
+ imapc->preftype = IMAP_TYPE_SASL;
+ break;
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * imap_parse_url_path()
+ *
+ * Parse the URL path into separate path components.
+ *
+ */
+static CURLcode imap_parse_url_path(struct connectdata *conn)
+{
+ /* The imap struct is already initialised in imap_connect() */
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct IMAP *imap = data->req.protop;
+ const char *begin = data->state.path;
+ const char *ptr = begin;
+
+ /* See how much of the URL is a valid path and decode it */
+ while(imap_is_bchar(*ptr))
+ ptr++;
+
+ if(ptr != begin) {
+ /* Remove the trailing slash if present */
+ const char *end = ptr;
+ if(end > begin && end[-1] == '/')
+ end--;
+
+ result = Curl_urldecode(data, begin, end - begin, &imap->mailbox, NULL,
+ TRUE);
+ if(result)
+ return result;
+ }
+ else
+ imap->mailbox = NULL;
+
+ /* There can be any number of parameters in the form ";NAME=VALUE" */
+ while(*ptr == ';') {
+ char *name;
+ char *value;
+ size_t valuelen;
+
+ /* Find the length of the name parameter */
+ begin = ++ptr;
+ while(*ptr && *ptr != '=')
+ ptr++;
+
+ if(!*ptr)
+ return CURLE_URL_MALFORMAT;
+
+ /* Decode the name parameter */
+ result = Curl_urldecode(data, begin, ptr - begin, &name, NULL, TRUE);
+ if(result)
+ return result;
+
+ /* Find the length of the value parameter */
+ begin = ++ptr;
+ while(imap_is_bchar(*ptr))
+ ptr++;
+
+ /* Decode the value parameter */
+ result = Curl_urldecode(data, begin, ptr - begin, &value, &valuelen, TRUE);
+ if(result) {
+ free(name);
+ return result;
+ }
+
+ DEBUGF(infof(conn->data, "IMAP URL parameter '%s' = '%s'\n", name, value));
+
+ /* Process the known hierarchical parameters (UIDVALIDITY, UID, SECTION and
+ PARTIAL) stripping of the trailing slash character if it is present.
+
+ Note: Unknown parameters trigger a URL_MALFORMAT error. */
+ if(Curl_raw_equal(name, "UIDVALIDITY") && !imap->uidvalidity) {
+ if(valuelen > 0 && value[valuelen - 1] == '/')
+ value[valuelen - 1] = '\0';
+
+ imap->uidvalidity = value;
+ value = NULL;
+ }
+ else if(Curl_raw_equal(name, "UID") && !imap->uid) {
+ if(valuelen > 0 && value[valuelen - 1] == '/')
+ value[valuelen - 1] = '\0';
+
+ imap->uid = value;
+ value = NULL;
+ }
+ else if(Curl_raw_equal(name, "SECTION") && !imap->section) {
+ if(valuelen > 0 && value[valuelen - 1] == '/')
+ value[valuelen - 1] = '\0';
+
+ imap->section = value;
+ value = NULL;
+ }
+ else if(Curl_raw_equal(name, "PARTIAL") && !imap->partial) {
+ if(valuelen > 0 && value[valuelen - 1] == '/')
+ value[valuelen - 1] = '\0';
+
+ imap->partial = value;
+ value = NULL;
+ }
+ else {
+ free(name);
+ free(value);
+
+ return CURLE_URL_MALFORMAT;
+ }
+
+ free(name);
+ free(value);
+ }
+
+ /* Does the URL contain a query parameter? Only valid when we have a mailbox
+ and no UID as per RFC-5092 */
+ if(imap->mailbox && !imap->uid && *ptr == '?') {
+ /* Find the length of the query parameter */
+ begin = ++ptr;
+ while(imap_is_bchar(*ptr))
+ ptr++;
+
+ /* Decode the query parameter */
+ result = Curl_urldecode(data, begin, ptr - begin, &imap->query, NULL,
+ TRUE);
+ if(result)
+ return result;
+ }
+
+ /* Any extra stuff at the end of the URL is an error */
+ if(*ptr)
+ return CURLE_URL_MALFORMAT;
+
+ return CURLE_OK;
+}
+
+/***********************************************************************
+ *
+ * imap_parse_custom_request()
+ *
+ * Parse the custom request.
+ */
+static CURLcode imap_parse_custom_request(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct IMAP *imap = data->req.protop;
+ const char *custom = data->set.str[STRING_CUSTOMREQUEST];
+
+ if(custom) {
+ /* URL decode the custom request */
+ result = Curl_urldecode(data, custom, 0, &imap->custom, NULL, TRUE);
+
+ /* Extract the parameters if specified */
+ if(!result) {
+ const char *params = imap->custom;
+
+ while(*params && *params != ' ')
+ params++;
+
+ if(*params) {
+ imap->custom_params = strdup(params);
+ imap->custom[params - imap->custom] = '\0';
+
+ if(!imap->custom_params)
+ result = CURLE_OUT_OF_MEMORY;
+ }
+ }
+ }
+
+ return result;
+}
+
#endif /* CURL_DISABLE_IMAP */
diff --git a/lib/imap.h b/lib/imap.h
index 2f0b62a6..3189daa3 100644
--- a/lib/imap.h
+++ b/lib/imap.h
@@ -1,5 +1,5 @@
-#ifndef __IMAP_H
-#define __IMAP_H
+#ifndef HEADER_CURL_IMAP_H
+#define HEADER_CURL_IMAP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2009 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,33 +23,74 @@
***************************************************************************/
#include "pingpong.h"
+#include "curl_sasl.h"
/****************************************************************************
* IMAP unique setup
***************************************************************************/
typedef enum {
- IMAP_STOP, /* do nothing state, stops the state machine */
- IMAP_SERVERGREET, /* waiting for the initial greeting immediately after
- a connect */
- IMAP_LOGIN,
+ IMAP_STOP, /* do nothing state, stops the state machine */
+ IMAP_SERVERGREET, /* waiting for the initial greeting immediately after
+ a connect */
+ IMAP_CAPABILITY,
IMAP_STARTTLS,
+ IMAP_UPGRADETLS, /* asynchronously upgrade the connection to SSL/TLS
+ (multi mode only) */
+ IMAP_AUTHENTICATE,
+ IMAP_LOGIN,
+ IMAP_LIST,
IMAP_SELECT,
IMAP_FETCH,
+ IMAP_FETCH_FINAL,
+ IMAP_APPEND,
+ IMAP_APPEND_FINAL,
+ IMAP_SEARCH,
IMAP_LOGOUT,
- IMAP_LAST /* never used */
+ IMAP_LAST /* never used */
} imapstate;
+/* This IMAP struct is used in the SessionHandle. All IMAP data that is
+ connection-oriented must be in imap_conn to properly deal with the fact that
+ perhaps the SessionHandle is changed between the times the connection is
+ used. */
+struct IMAP {
+ curl_pp_transfer transfer;
+ char *mailbox; /* Mailbox to select */
+ char *uidvalidity; /* UIDVALIDITY to check in select */
+ char *uid; /* Message UID to fetch */
+ char *section; /* Message SECTION to fetch */
+ char *partial; /* Message PARTIAL to fetch */
+ char *query; /* Query to search for */
+ char *custom; /* Custom request */
+ char *custom_params; /* Parameters for the custom request */
+};
+
/* imap_conn is used for struct connection-oriented data in the connectdata
struct */
struct imap_conn {
struct pingpong pp;
- char *mailbox; /* what to FETCH */
- imapstate state; /* always use imap.c:state() to change state! */
- int cmdid; /* id number/index */
- const char *idstr; /* pointer to a string for which to wait for as id */
+ imapstate state; /* Always use imap.c:state() to change state! */
+ bool ssldone; /* Is connect() over SSL done? */
+ struct SASL sasl; /* SASL-related parameters */
+ unsigned int preftype; /* Preferred authentication type */
+ int cmdid; /* Last used command ID */
+ char resptag[5]; /* Response tag to wait for */
+ bool tls_supported; /* StartTLS capability supported by server */
+ bool login_disabled; /* LOGIN command disabled by server */
+ bool ir_supported; /* Initial response supported by server */
+ char *mailbox; /* The last selected mailbox */
+ char *mailbox_uidvalidity; /* UIDVALIDITY parsed from select response */
};
extern const struct Curl_handler Curl_handler_imap;
extern const struct Curl_handler Curl_handler_imaps;
-#endif /* __IMAP_H */
+/* Authentication type flags */
+#define IMAP_TYPE_CLEARTEXT (1 << 0)
+#define IMAP_TYPE_SASL (1 << 1)
+
+/* Authentication type values */
+#define IMAP_TYPE_NONE 0
+#define IMAP_TYPE_ANY ~0U
+
+#endif /* HEADER_CURL_IMAP_H */
diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c
index 26867f4d..da9a3ab4 100644
--- a/lib/inet_ntop.c
+++ b/lib/inet_ntop.c
@@ -18,27 +18,21 @@
* Original code by Paul Vixie. "curlified" by Gisle Vanem.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef HAVE_INET_NTOP
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#include <string.h>
-#include <errno.h>
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#include "inet_ntop.h"
@@ -69,8 +63,7 @@ static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size)
((int)((unsigned char)src[3])) & 0xff);
len = strlen(tmp);
- if(len == 0 || len >= size)
- {
+ if(len == 0 || len >= size) {
SET_ERRNO(ENOSPC);
return (NULL);
}
@@ -105,61 +98,51 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
* Find the longest run of 0x00's in src[] for :: shorthanding.
*/
memset(words, '\0', sizeof(words));
- for (i = 0; i < IN6ADDRSZ; i++)
- words[i/2] |= (src[i] << ((1 - (i % 2)) << 3));
+ for(i = 0; i < IN6ADDRSZ; i++)
+ words[i/2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
cur.base = -1;
best.len = 0;
cur.len = 0;
- for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++)
- {
- if(words[i] == 0)
- {
+ for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+ if(words[i] == 0) {
if(cur.base == -1)
cur.base = i, cur.len = 1;
else
cur.len++;
}
- else if(cur.base != -1)
- {
+ else if(cur.base != -1) {
if(best.base == -1 || cur.len > best.len)
- best = cur;
+ best = cur;
cur.base = -1;
}
}
if((cur.base != -1) && (best.base == -1 || cur.len > best.len))
- best = cur;
+ best = cur;
if(best.base != -1 && best.len < 2)
- best.base = -1;
-
- /* Format the result.
- */
+ best.base = -1;
+ /* Format the result. */
tp = tmp;
- for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++)
- {
- /* Are we inside the best run of 0x00's?
- */
- if(best.base != -1 && i >= best.base && i < (best.base + best.len))
- {
+ for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+ /* Are we inside the best run of 0x00's? */
+ if(best.base != -1 && i >= best.base && i < (best.base + best.len)) {
if(i == best.base)
- *tp++ = ':';
+ *tp++ = ':';
continue;
}
/* Are we following an initial run of 0x00s or any real hex?
*/
if(i != 0)
- *tp++ = ':';
+ *tp++ = ':';
/* Is this address an encapsulated IPv4?
*/
if(i == 6 && best.base == 0 &&
- (best.len == 6 || (best.len == 5 && words[5] == 0xffff)))
- {
- if(!inet_ntop4(src+12, tp, sizeof(tmp) - (tp - tmp)))
- {
+ (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
+ if(!inet_ntop4(src+12, tp, sizeof(tmp) - (tp - tmp))) {
SET_ERRNO(ENOSPC);
return (NULL);
}
@@ -177,8 +160,7 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
/* Check for overflow, copy, and we're done.
*/
- if((size_t)(tp - tmp) > size)
- {
+ if((size_t)(tp - tmp) > size) {
SET_ERRNO(ENOSPC);
return (NULL);
}
@@ -195,9 +177,9 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
* error, EAFNOSUPPORT or ENOSPC.
*
* On Windows we store the error in the thread errno, not
- * in the winsock error code. This is to avoid loosing the
+ * in the winsock error code. This is to avoid losing the
* actual last winsock error. So use macro ERRNO to fetch the
- * errno this funtion sets when returning NULL, not SOCKERRNO.
+ * errno this function sets when returning NULL, not SOCKERRNO.
*/
char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size)
{
diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h
index 8db9775c..cc4bdbb8 100644
--- a/lib/inet_ntop.h
+++ b/lib/inet_ntop.h
@@ -1,5 +1,5 @@
-#ifndef __INET_NTOP_H
-#define __INET_NTOP_H
+#ifndef HEADER_CURL_INET_NTOP_H
+#define HEADER_CURL_INET_NTOP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
+#include "curl_setup.h"
char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size);
@@ -31,7 +31,8 @@ char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size);
#include <arpa/inet.h>
#endif
#define Curl_inet_ntop(af,addr,buf,size) \
- inet_ntop(af,addr,buf,(curl_socklen_t)size)
+ inet_ntop(af, addr, buf, (curl_socklen_t)size)
#endif
-#endif /* __INET_NTOP_H */
+#endif /* HEADER_CURL_INET_NTOP_H */
+
diff --git a/lib/inet_pton.c b/lib/inet_pton.c
index db4f3930..f50b365d 100644
--- a/lib/inet_pton.c
+++ b/lib/inet_pton.c
@@ -16,24 +16,19 @@
* SOFTWARE.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef HAVE_INET_PTON
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#include <string.h>
-#include <errno.h>
#include "inet_pton.h"
@@ -61,9 +56,9 @@ static int inet_pton6(const char *src, unsigned char *dst);
* -1 if some other error occurred (`dst' is untouched in this case, too)
* notice:
* On Windows we store the error in the thread errno, not
- * in the winsock error code. This is to avoid loosing the
+ * in the winsock error code. This is to avoid losing the
* actual last winsock error. So use macro ERRNO to fetch the
- * errno this funtion sets when returning (-1), not SOCKERRNO.
+ * errno this function sets when returning (-1), not SOCKERRNO.
* author:
* Paul Vixie, 1996.
*/
@@ -218,14 +213,14 @@ inet_pton6(const char *src, unsigned char *dst)
* Since some memmove()'s erroneously fail to handle
* overlapping regions, we'll do the shift by hand.
*/
- const size_t n = tp - colonp;
- size_t i;
+ const ssize_t n = tp - colonp;
+ ssize_t i;
if(tp == endp)
return (0);
- for (i = 1; i <= n; i++) {
- endp[- i] = colonp[n - i];
- colonp[n - i] = 0;
+ for(i = 1; i <= n; i++) {
+ *(endp - i) = *(colonp + n - i);
+ *(colonp + n - i) = 0;
}
tp = endp;
}
diff --git a/lib/inet_pton.h b/lib/inet_pton.h
index d53fddff..43c54914 100644
--- a/lib/inet_pton.h
+++ b/lib/inet_pton.h
@@ -1,5 +1,5 @@
-#ifndef __INET_PTON_H
-#define __INET_PTON_H
+#ifndef HEADER_CURL_INET_PTON_H
+#define HEADER_CURL_INET_PTON_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -22,7 +22,7 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
int Curl_inet_pton(int, const char *, void *);
@@ -33,4 +33,5 @@ int Curl_inet_pton(int, const char *, void *);
#define Curl_inet_pton(x,y,z) inet_pton(x,y,z)
#endif
-#endif /* __INET_PTON_H */
+#endif /* HEADER_CURL_INET_PTON_H */
+
diff --git a/lib/krb4.c b/lib/krb4.c
deleted file mode 100644
index 2b59fec8..00000000
--- a/lib/krb4.c
+++ /dev/null
@@ -1,422 +0,0 @@
-/* This source code was modified by Martin Hedenfalk <mhe@stacken.kth.se> for
- * use in Curl. Martin's latest changes were done 2000-09-18.
- *
- * It has since been patched away like a madman by Daniel Stenberg to make it
- * better applied to curl conditions, and to make it not use globals, pollute
- * name space and more.
- *
- * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * Copyright (c) 2004 - 2009 Daniel Stenberg
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the Institute nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include "setup.h"
-
-#ifndef CURL_DISABLE_FTP
-#ifdef HAVE_KRB4
-
-#include <stdlib.h>
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#include <string.h>
-#include <krb.h>
-#include <des.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for getpid() */
-#endif
-
-#include "urldata.h"
-#include "curl_base64.h"
-#include "ftp.h"
-#include "sendf.h"
-#include "krb4.h"
-#include "inet_ntop.h"
-#include "curl_memory.h"
-
-/* The last #include file should be: */
-#include "memdebug.h"
-
-#define LOCAL_ADDR (&conn->local_addr)
-#define REMOTE_ADDR conn->ip_addr->ai_addr
-#define myctladdr LOCAL_ADDR
-#define hisctladdr REMOTE_ADDR
-
-struct krb4_data {
- des_cblock key;
- des_key_schedule schedule;
- char name[ANAME_SZ];
- char instance[INST_SZ];
- char realm[REALM_SZ];
-};
-
-#ifndef HAVE_STRLCPY
-/* if it ever goes non-static, make it Curl_ prefixed! */
-static size_t
-strlcpy (char *dst, const char *src, size_t dst_sz)
-{
- size_t n;
- char *p;
-
- for (p = dst, n = 0;
- n + 1 < dst_sz && *src != '\0';
- ++p, ++src, ++n)
- *p = *src;
- *p = '\0';
- if(*src == '\0')
- return n;
- else
- return n + strlen (src);
-}
-#else
-size_t strlcpy (char *dst, const char *src, size_t dst_sz);
-#endif
-
-static int
-krb4_check_prot(void *app_data, int level)
-{
- app_data = NULL; /* prevent compiler warning */
- if(level == prot_confidential)
- return -1;
- return 0;
-}
-
-static int
-krb4_decode(void *app_data, void *buf, int len, int level,
- struct connectdata *conn)
-{
- MSG_DAT m;
- int e;
- struct krb4_data *d = app_data;
-
- if(level == prot_safe)
- e = krb_rd_safe(buf, len, &d->key,
- (struct sockaddr_in *)REMOTE_ADDR,
- (struct sockaddr_in *)LOCAL_ADDR, &m);
- else
- e = krb_rd_priv(buf, len, d->schedule, &d->key,
- (struct sockaddr_in *)REMOTE_ADDR,
- (struct sockaddr_in *)LOCAL_ADDR, &m);
- if(e) {
- struct SessionHandle *data = conn->data;
- infof(data, "krb4_decode: %s\n", krb_get_err_text(e));
- return -1;
- }
- memmove(buf, m.app_data, m.app_length);
- return m.app_length;
-}
-
-static int
-krb4_overhead(void *app_data, int level, int len)
-{
- /* no arguments are used, just init them to prevent compiler warnings */
- app_data = NULL;
- level = 0;
- len = 0;
- return 31;
-}
-
-static int
-krb4_encode(void *app_data, const void *from, int length, int level, void **to,
- struct connectdata *conn)
-{
- struct krb4_data *d = app_data;
- *to = malloc(length + 31);
- if(!*to)
- return -1;
- if(level == prot_safe)
- /* NOTE that the void* cast is safe, krb_mk_safe/priv don't modify the
- * input buffer
- */
- return krb_mk_safe((void*)from, *to, length, &d->key,
- (struct sockaddr_in *)LOCAL_ADDR,
- (struct sockaddr_in *)REMOTE_ADDR);
- else if(level == prot_private)
- return krb_mk_priv((void*)from, *to, length, d->schedule, &d->key,
- (struct sockaddr_in *)LOCAL_ADDR,
- (struct sockaddr_in *)REMOTE_ADDR);
- else
- return -1;
-}
-
-static int
-mk_auth(struct krb4_data *d, KTEXT adat,
- const char *service, char *host, int checksum)
-{
- int ret;
- CREDENTIALS cred;
- char sname[SNAME_SZ], inst[INST_SZ], realm[REALM_SZ];
-
- strlcpy(sname, service, sizeof(sname));
- strlcpy(inst, krb_get_phost(host), sizeof(inst));
- strlcpy(realm, krb_realmofhost(host), sizeof(realm));
- ret = krb_mk_req(adat, sname, inst, realm, checksum);
- if(ret)
- return ret;
- strlcpy(sname, service, sizeof(sname));
- strlcpy(inst, krb_get_phost(host), sizeof(inst));
- strlcpy(realm, krb_realmofhost(host), sizeof(realm));
- ret = krb_get_cred(sname, inst, realm, &cred);
- memmove(&d->key, &cred.session, sizeof(des_cblock));
- des_key_sched(&d->key, d->schedule);
- memset(&cred, 0, sizeof(cred));
- return ret;
-}
-
-#ifdef HAVE_KRB_GET_OUR_IP_FOR_REALM
-int krb_get_our_ip_for_realm(char *, struct in_addr *);
-#endif
-
-static int
-krb4_auth(void *app_data, struct connectdata *conn)
-{
- int ret;
- char *p;
- unsigned char *ptr;
- size_t len;
- KTEXT_ST adat;
- MSG_DAT msg_data;
- int checksum;
- u_int32_t cs;
- struct krb4_data *d = app_data;
- char *host = conn->host.name;
- ssize_t nread;
- int l = sizeof(conn->local_addr);
- struct SessionHandle *data = conn->data;
- CURLcode result;
-
- if(getsockname(conn->sock[FIRSTSOCKET],
- (struct sockaddr *)LOCAL_ADDR, &l) < 0)
- perror("getsockname()");
-
- checksum = getpid();
- ret = mk_auth(d, &adat, "ftp", host, checksum);
- if(ret == KDC_PR_UNKNOWN)
- ret = mk_auth(d, &adat, "rcmd", host, checksum);
- if(ret) {
- infof(data, "%s\n", krb_get_err_text(ret));
- return AUTH_CONTINUE;
- }
-
-#ifdef HAVE_KRB_GET_OUR_IP_FOR_REALM
- if(krb_get_config_bool("nat_in_use")) {
- struct sockaddr_in *localaddr = (struct sockaddr_in *)LOCAL_ADDR;
- struct in_addr natAddr;
-
- if(krb_get_our_ip_for_realm(krb_realmofhost(host),
- &natAddr) != KSUCCESS
- && krb_get_our_ip_for_realm(NULL, &natAddr) != KSUCCESS)
- infof(data, "Can't get address for realm %s\n",
- krb_realmofhost(host));
- else {
- if(natAddr.s_addr != localaddr->sin_addr.s_addr) {
- char addr_buf[128];
- if(Curl_inet_ntop(AF_INET, natAddr, addr_buf, sizeof(addr_buf)))
- infof(data, "Using NAT IP address (%s) for kerberos 4\n", addr_buf);
- localaddr->sin_addr = natAddr;
- }
- }
- }
-#endif
-
- if(Curl_base64_encode(conn->data, (char *)adat.dat, adat.length, &p) < 1) {
- Curl_failf(data, "Out of memory base64-encoding");
- return AUTH_CONTINUE;
- }
-
- result = Curl_ftpsendf(conn, "ADAT %s", p);
-
- free(p);
-
- if(result)
- return -2;
-
- if(Curl_GetFTPResponse(&nread, conn, NULL))
- return -1;
-
- if(data->state.buffer[0] != '2'){
- Curl_failf(data, "Server didn't accept auth data");
- return AUTH_ERROR;
- }
-
- p = strstr(data->state.buffer, "ADAT=");
- if(!p) {
- Curl_failf(data, "Remote host didn't send adat reply");
- return AUTH_ERROR;
- }
- p += 5;
- len = Curl_base64_decode(p, &ptr);
- if(len > sizeof(adat.dat)-1) {
- free(ptr);
- len=0;
- }
- if(!len || !ptr) {
- Curl_failf(data, "Failed to decode base64 from server");
- return AUTH_ERROR;
- }
- memcpy((char *)adat.dat, ptr, len);
- free(ptr);
- adat.length = len;
- ret = krb_rd_safe(adat.dat, adat.length, &d->key,
- (struct sockaddr_in *)hisctladdr,
- (struct sockaddr_in *)myctladdr, &msg_data);
- if(ret) {
- Curl_failf(data, "Error reading reply from server: %s",
- krb_get_err_text(ret));
- return AUTH_ERROR;
- }
- krb_get_int(msg_data.app_data, &cs, 4, 0);
- if(cs - checksum != 1) {
- Curl_failf(data, "Bad checksum returned from server");
- return AUTH_ERROR;
- }
- return AUTH_OK;
-}
-
-struct Curl_sec_client_mech Curl_krb4_client_mech = {
- "KERBEROS_V4",
- sizeof(struct krb4_data),
- NULL, /* init */
- krb4_auth,
- NULL, /* end */
- krb4_check_prot,
- krb4_overhead,
- krb4_encode,
- krb4_decode
-};
-
-CURLcode Curl_krb_kauth(struct connectdata *conn)
-{
- des_cblock key;
- des_key_schedule schedule;
- KTEXT_ST tkt, tktcopy;
- char *name;
- char *p;
- char passwd[100];
- size_t tmp;
- ssize_t nread;
- int save;
- CURLcode result;
- unsigned char *ptr;
-
- save = Curl_set_command_prot(conn, prot_private);
-
- result = Curl_ftpsendf(conn, "SITE KAUTH %s", conn->user);
-
- if(result)
- return result;
-
- result = Curl_GetFTPResponse(&nread, conn, NULL);
- if(result)
- return result;
-
- if(conn->data->state.buffer[0] != '3'){
- Curl_set_command_prot(conn, save);
- return CURLE_FTP_WEIRD_SERVER_REPLY;
- }
-
- p = strstr(conn->data->state.buffer, "T=");
- if(!p) {
- Curl_failf(conn->data, "Bad reply from server");
- Curl_set_command_prot(conn, save);
- return CURLE_FTP_WEIRD_SERVER_REPLY;
- }
-
- p += 2;
- tmp = Curl_base64_decode(p, &ptr);
- if(tmp >= sizeof(tkt.dat)) {
- free(ptr);
- tmp=0;
- }
- if(!tmp || !ptr) {
- Curl_failf(conn->data, "Failed to decode base64 in reply");
- Curl_set_command_prot(conn, save);
- return CURLE_FTP_WEIRD_SERVER_REPLY;
- }
- memcpy((char *)tkt.dat, ptr, tmp);
- free(ptr);
- tkt.length = tmp;
- tktcopy.length = tkt.length;
-
- p = strstr(conn->data->state.buffer, "P=");
- if(!p) {
- Curl_failf(conn->data, "Bad reply from server");
- Curl_set_command_prot(conn, save);
- return CURLE_FTP_WEIRD_SERVER_REPLY;
- }
- name = p + 2;
- for(; *p && *p != ' ' && *p != '\r' && *p != '\n'; p++);
- *p = 0;
-
- des_string_to_key (conn->passwd, &key);
- des_key_sched(&key, schedule);
-
- des_pcbc_encrypt((void *)tkt.dat, (void *)tktcopy.dat,
- tkt.length,
- schedule, &key, DES_DECRYPT);
- if(strcmp ((char*)tktcopy.dat + 8,
- KRB_TICKET_GRANTING_TICKET) != 0) {
- afs_string_to_key(passwd,
- krb_realmofhost(conn->host.name),
- &key);
- des_key_sched(&key, schedule);
- des_pcbc_encrypt((void *)tkt.dat, (void *)tktcopy.dat,
- tkt.length,
- schedule, &key, DES_DECRYPT);
- }
- memset(key, 0, sizeof(key));
- memset(schedule, 0, sizeof(schedule));
- memset(passwd, 0, sizeof(passwd));
- if(Curl_base64_encode(conn->data, (char *)tktcopy.dat, tktcopy.length, &p)
- < 1) {
- failf(conn->data, "Out of memory base64-encoding.");
- Curl_set_command_prot(conn, save);
- return CURLE_OUT_OF_MEMORY;
- }
- memset (tktcopy.dat, 0, tktcopy.length);
-
- result = Curl_ftpsendf(conn, "SITE KAUTH %s %s", name, p);
- free(p);
- if(result)
- return result;
-
- result = Curl_GetFTPResponse(&nread, conn, NULL);
- if(result)
- return result;
- Curl_set_command_prot(conn, save);
-
- return CURLE_OK;
-}
-
-#endif /* HAVE_KRB4 */
-#endif /* CURL_DISABLE_FTP */
diff --git a/lib/krb4.h b/lib/krb4.h
deleted file mode 100644
index 5da1dc6e..00000000
--- a/lib/krb4.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef __KRB4_H
-#define __KRB4_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-struct Curl_sec_client_mech {
- const char *name;
- size_t size;
- int (*init)(void *);
- int (*auth)(void *, struct connectdata *);
- void (*end)(void *);
- int (*check_prot)(void *, int);
- int (*overhead)(void *, int, int);
- int (*encode)(void *, const void*, int, int, void**, struct connectdata *);
- int (*decode)(void *, void*, int, int, struct connectdata *);
-};
-
-
-#define AUTH_OK 0
-#define AUTH_CONTINUE 1
-#define AUTH_ERROR 2
-
-#ifdef HAVE_KRB4
-extern struct Curl_sec_client_mech Curl_krb4_client_mech;
-#endif
-#ifdef HAVE_GSSAPI
-extern struct Curl_sec_client_mech Curl_krb5_client_mech;
-#endif
-
-CURLcode Curl_krb_kauth(struct connectdata *conn);
-int Curl_sec_fprintf (struct connectdata *, FILE *, const char *, ...);
-int Curl_sec_getc (struct connectdata *conn, FILE *);
-int Curl_sec_putc (struct connectdata *conn, int, FILE *);
-int Curl_sec_read_msg (struct connectdata *conn, char *, int);
-
-int Curl_sec_vfprintf(struct connectdata *, FILE *, const char *, va_list);
-int Curl_sec_fprintf2(struct connectdata *conn, FILE *f, const char *fmt, ...);
-int Curl_sec_vfprintf2(struct connectdata *conn, FILE *, const char *, va_list);
-
-void Curl_sec_end (struct connectdata *);
-CURLcode Curl_sec_login (struct connectdata *);
-void Curl_sec_prot (int, char **);
-int Curl_sec_request_prot (struct connectdata *conn, const char *level);
-int Curl_sec_set_protection_level(struct connectdata *conn);
-void Curl_sec_status (void);
-
-enum protection_level Curl_set_command_prot(struct connectdata *,
- enum protection_level);
-
-
-#endif
diff --git a/lib/krb5.c b/lib/krb5.c
index 2530395d..ad7dd67a 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -1,8 +1,8 @@
/* GSSAPI/krb5 support for FTP - loosely based on old krb4.c
*
- * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2010 Kungliga Tekniska Högskolan
+ * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
- * Copyright (c) 2004 - 2009 Daniel Stenberg
+ * Copyright (c) 2004 - 2015 Daniel Stenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -32,44 +32,25 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. */
-#include "setup.h"
+#include "curl_setup.h"
-#ifndef CURL_DISABLE_FTP
-#ifdef HAVE_GSSAPI
+#if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_FTP)
-#ifdef HAVE_OLD_GSSMIT
-#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
-#endif
-
-#include <stdlib.h>
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
-#include <string.h>
-
-#ifdef HAVE_GSSGNU
-# include <gss.h>
-#elif defined HAVE_GSSMIT
- /* MIT style */
-# include <gssapi/gssapi.h>
-# include <gssapi/gssapi_generic.h>
-# include <gssapi/gssapi_krb5.h>
-#else
- /* Heimdal-style */
-# include <gssapi.h>
-#endif
#include "urldata.h"
#include "curl_base64.h"
#include "ftp.h"
+#include "curl_gssapi.h"
#include "sendf.h"
-#include "krb4.h"
-#include "curl_memory.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_sec.h"
+#include "warnless.h"
+#include "curl_printf.h"
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
#define LOCAL_ADDR (&conn->local_addr)
@@ -88,22 +69,22 @@ static int
krb5_check_prot(void *app_data, int level)
{
(void)app_data; /* unused */
- if(level == prot_confidential)
+ if(level == PROT_CONFIDENTIAL)
return -1;
return 0;
}
static int
-krb5_decode(void *app_data, void *buf, int len, int level,
- struct connectdata *conn)
+krb5_decode(void *app_data, void *buf, int len,
+ int level UNUSED_PARAM,
+ struct connectdata *conn UNUSED_PARAM)
{
gss_ctx_id_t *context = app_data;
OM_uint32 maj, min;
gss_buffer_desc enc, dec;
- /* shut gcc up */
- level = 0;
- conn = NULL;
+ (void)level;
+ (void)conn;
enc.value = buf;
enc.length = len;
@@ -115,7 +96,7 @@ krb5_decode(void *app_data, void *buf, int len, int level,
}
memcpy(buf, dec.value, dec.length);
- len = dec.length;
+ len = curlx_uztosi(dec.length);
gss_release_buffer(&min, &dec);
return len;
@@ -124,16 +105,15 @@ krb5_decode(void *app_data, void *buf, int len, int level,
static int
krb5_overhead(void *app_data, int level, int len)
{
- /* no arguments are used, just init them to prevent compiler warnings */
- app_data = NULL;
- level = 0;
- len = 0;
+ /* no arguments are used */
+ (void)app_data;
+ (void)level;
+ (void)len;
return 0;
}
static int
-krb5_encode(void *app_data, const void *from, int length, int level, void **to,
- struct connectdata *conn)
+krb5_encode(void *app_data, const void *from, int length, int level, void **to)
{
gss_ctx_id_t *context = app_data;
gss_buffer_desc dec, enc;
@@ -141,28 +121,26 @@ 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()
*/
dec.value = (void*)from;
dec.length = length;
maj = gss_seal(&min, *context,
- level == prot_private,
+ level == PROT_PRIVATE,
GSS_C_QOP_DEFAULT,
&dec, &state, &enc);
if(maj != GSS_S_COMPLETE)
return -1;
- /* malloc a new buffer, in case gss_release_buffer doesn't work as expected */
+ /* malloc a new buffer, in case gss_release_buffer doesn't work as
+ expected */
*to = malloc(enc.length);
if(!*to)
return -1;
memcpy(*to, enc.value, enc.length);
- len = enc.length;
+ len = curlx_uztosi(enc.length);
gss_release_buffer(&min, &enc);
return len;
}
@@ -183,6 +161,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
gss_name_t gssname;
gss_ctx_id_t *context = app_data;
struct gss_channel_bindings_struct chan;
+ size_t base64_sz = 0;
if(getsockname(conn->sock[FIRSTSOCKET],
(struct sockaddr *)LOCAL_ADDR, &l) < 0)
@@ -200,7 +179,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
chan.application_data.value = NULL;
/* this loop will execute twice (once for service, once for host) */
- while(1) {
+ for(;;) {
/* this really shouldn't be repeated here, but can't help it */
if(service == srv_host) {
result = Curl_ftpsendf(conn, "AUTH GSSAPI");
@@ -222,7 +201,8 @@ krb5_auth(void *app_data, struct connectdata *conn)
if(maj != GSS_S_COMPLETE) {
gss_release_name(&min, &gssname);
if(service == srv_host) {
- Curl_failf(data, "Error importing service name %s", input_buffer.value);
+ Curl_failf(data, "Error importing service name %s",
+ input_buffer.value);
return AUTH_ERROR;
}
service = srv_host;
@@ -240,35 +220,34 @@ krb5_auth(void *app_data, struct connectdata *conn)
taken care by a final gss_release_buffer. */
gss_release_buffer(&min, &output_buffer);
ret = AUTH_OK;
- maj = gss_init_sec_context(&min,
- GSS_C_NO_CREDENTIAL,
- context,
- gssname,
- GSS_C_NO_OID,
- GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG,
- 0,
- &chan,
- gssresp,
- NULL,
- &output_buffer,
- NULL,
- NULL);
+ maj = Curl_gss_init_sec_context(data,
+ &min,
+ context,
+ gssname,
+ &Curl_krb5_mech_oid,
+ &chan,
+ gssresp,
+ &output_buffer,
+ TRUE,
+ NULL);
if(gssresp) {
free(_gssresp.value);
gssresp = NULL;
}
- if(maj != GSS_S_COMPLETE && maj != GSS_S_CONTINUE_NEEDED) {
- Curl_infof(data, "Error creating security context");
+ if(GSS_ERROR(maj)) {
+ Curl_infof(data, "Error creating security context\n");
ret = AUTH_ERROR;
break;
}
if(output_buffer.length != 0) {
- if(Curl_base64_encode(data, (char *)output_buffer.value,
- output_buffer.length, &p) < 1) {
- Curl_infof(data, "Out of memory base64-encoding");
+ result = Curl_base64_encode(data, (char *)output_buffer.value,
+ output_buffer.length, &p, &base64_sz);
+ if(result) {
+ Curl_infof(data, "base64-encoding: %s\n",
+ curl_easy_strerror(result));
ret = AUTH_CONTINUE;
break;
}
@@ -287,7 +266,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
break;
}
- if(data->state.buffer[0] != '2' && data->state.buffer[0] != '3'){
+ if(data->state.buffer[0] != '2' && data->state.buffer[0] != '3') {
Curl_infof(data, "Server didn't accept auth data\n");
ret = AUTH_ERROR;
break;
@@ -296,10 +275,12 @@ krb5_auth(void *app_data, struct connectdata *conn)
p = data->state.buffer + 4;
p = strstr(p, "ADAT=");
if(p) {
- _gssresp.length = Curl_base64_decode(p + 5, (unsigned char **)
- &_gssresp.value);
- if(_gssresp.length < 1) {
- Curl_failf(data, "Out of memory base64-encoding");
+ result = Curl_base64_decode(p + 5,
+ (unsigned char **)&_gssresp.value,
+ &_gssresp.length);
+ if(result) {
+ Curl_failf(data, "base64-decoding: %s",
+ curl_easy_strerror(result));
ret = AUTH_CONTINUE;
break;
}
@@ -325,10 +306,13 @@ krb5_auth(void *app_data, struct connectdata *conn)
static void krb5_end(void *app_data)
{
- OM_uint32 maj, min;
+ OM_uint32 min;
gss_ctx_id_t *context = app_data;
- if (*context != GSS_C_NO_CONTEXT) {
- maj = gss_delete_sec_context(&min, context, GSS_C_NO_BUFFER);
+ if(*context != GSS_C_NO_CONTEXT) {
+#ifdef DEBUGBUILD
+ OM_uint32 maj =
+#endif
+ gss_delete_sec_context(&min, context, GSS_C_NO_BUFFER);
DEBUGASSERT(maj == GSS_S_COMPLETE);
}
}
@@ -345,5 +329,4 @@ struct Curl_sec_client_mech Curl_krb5_client_mech = {
krb5_decode
};
-#endif /* HAVE_GSSAPI */
-#endif /* CURL_DISABLE_FTP */
+#endif /* HAVE_GSSAPI && !CURL_DISABLE_FTP */
diff --git a/lib/ldap.c b/lib/ldap.c
index d6556c90..4d912822 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_LDAP) && !defined(USE_OPENLDAP)
@@ -35,18 +35,11 @@
* OpenLDAP library versions, USE_OPENLDAP shall not be defined.
*/
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
-#ifdef CURL_LDAP_WIN /* Use Windows LDAP implementation. */
+#ifdef USE_WIN32_LDAP /* Use Windows LDAP implementation. */
# include <winldap.h>
# ifndef LDAP_VENDOR_NAME
-# error Your Platform SDK is NOT sufficient for LDAP support! Update your Platform SDK, or disable LDAP support!
+# error Your Platform SDK is NOT sufficient for LDAP support! \
+ Update your Platform SDK, or disable LDAP support!
# else
# include <winber.h>
# endif
@@ -61,8 +54,13 @@
# endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */
#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
+/* These are macros in both <wincrypt.h> (in above <winldap.h>) and typedefs
+ * in BoringSSL's <openssl/x509.h>
+ */
+#ifdef HAVE_BORINGSSL
+# undef X509_NAME
+# undef X509_CERT_PAIR
+# undef X509_EXTENSIONS
#endif
#include "urldata.h"
@@ -74,13 +72,14 @@
#include "strequal.h"
#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"
+#include "curl_printf.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
#ifndef HAVE_LDAP_URL_PARSE
@@ -88,13 +87,25 @@
/* Use our own implementation. */
typedef struct {
- char *lud_host;
- int lud_port;
- char *lud_dn;
- char **lud_attrs;
- int lud_scope;
- char *lud_filter;
- char **lud_exts;
+ char *lud_host;
+ int lud_port;
+#if defined(USE_WIN32_LDAP)
+ TCHAR *lud_dn;
+ TCHAR **lud_attrs;
+#else
+ char *lud_dn;
+ char **lud_attrs;
+#endif
+ int lud_scope;
+#if defined(USE_WIN32_LDAP)
+ 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
+ without HAVE_LDAP_URL_PARSE defined */
} CURL_LDAPURLDesc;
#undef LDAPURLDesc
@@ -112,11 +123,11 @@ static void _ldap_free_urldesc (LDAPURLDesc *ludp);
#define LDAP_TRACE(x) do { \
_ldap_trace ("%u: ", __LINE__); \
_ldap_trace x; \
- } while(0)
+ } WHILE_FALSE
static void _ldap_trace (const char *fmt, ...);
#else
- #define LDAP_TRACE(x) ((void)0)
+ #define LDAP_TRACE(x) Curl_nop_stmt
#endif
@@ -137,10 +148,13 @@ const struct Curl_handler Curl_handler_ldap = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_LDAP, /* defport */
- PROT_LDAP /* protocol */
+ CURLPROTO_LDAP, /* protocol */
+ PROTOPT_NONE /* flags */
};
#ifdef HAVE_LDAP_SSL
@@ -159,31 +173,43 @@ const struct Curl_handler Curl_handler_ldaps = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_LDAPS, /* defport */
- PROT_LDAP | PROT_SSL /* protocol */
+ CURLPROTO_LDAPS, /* protocol */
+ PROTOPT_SSL /* flags */
};
#endif
static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
{
- CURLcode status = CURLE_OK;
+ CURLcode result = CURLE_OK;
int rc = 0;
LDAP *server = NULL;
LDAPURLDesc *ludp = NULL;
- LDAPMessage *result = NULL;
+ LDAPMessage *ldapmsg = NULL;
LDAPMessage *entryIterator;
int num = 0;
struct SessionHandle *data=conn->data;
int ldap_proto = LDAP_VERSION3;
int ldap_ssl = 0;
- char *val_b64;
- size_t val_b64_sz;
- curl_off_t dlsize=0;
+ char *val_b64 = NULL;
+ size_t val_b64_sz = 0;
+ curl_off_t dlsize = 0;
#ifdef LDAP_OPT_NETWORK_TIMEOUT
- struct timeval ldap_timeout = {10,0}; /* 10 sec connection/search timeout */
+ struct timeval ldap_timeout = {10, 0}; /* 10 sec connection/search timeout */
+#endif
+#if defined(USE_WIN32_LDAP)
+ TCHAR *host = NULL;
+ TCHAR *user = NULL;
+ TCHAR *passwd = NULL;
+#else
+ char *host = NULL;
+ char *user = NULL;
+ char *passwd = NULL;
#endif
*done = TRUE; /* unconditionally */
@@ -198,16 +224,42 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
#endif
if(rc != 0) {
failf(data, "LDAP local: %s", ldap_err2string(rc));
- status = CURLE_LDAP_INVALID_URL;
+ result = CURLE_LDAP_INVALID_URL;
goto quit;
}
/* Get the URL scheme ( either ldap or ldaps ) */
- if(conn->protocol & PROT_SSL)
+ if(conn->given->flags & PROTOPT_SSL)
ldap_ssl = 1;
infof(data, "LDAP local: trying to establish %s connection\n",
ldap_ssl ? "encrypted" : "cleartext");
+#if defined(USE_WIN32_LDAP)
+ 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
@@ -215,9 +267,9 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
if(ldap_ssl) {
#ifdef HAVE_LDAP_SSL
-#ifdef CURL_LDAP_WIN
- /* Win32 LDAP SDK doesnt support insecure mode without CA! */
- server = ldap_sslinit(conn->host.name, (int)conn->port, 1);
+#ifdef USE_WIN32_LDAP
+ /* Win32 LDAP SDK doesn't support insecure mode without CA! */
+ server = ldap_sslinit(host, (int)conn->port, 1);
ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON);
#else
int ldap_option;
@@ -226,7 +278,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));
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
if(data->set.ssl.verifypeer) {
@@ -238,7 +290,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"));
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
infof(data, "LDAP local: using %s CA cert '%s'\n",
@@ -249,25 +301,25 @@ 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));
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
ldap_option = LDAPSSL_VERIFY_SERVER;
- } else {
- ldap_option = LDAPSSL_VERIFY_NONE;
}
+ else
+ ldap_option = LDAPSSL_VERIFY_NONE;
rc = ldapssl_set_verify_mode(ldap_option);
if(rc != LDAP_SUCCESS) {
failf(data, "LDAP local: ERROR setting cert verify mode: %s",
ldap_err2string(rc));
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
- server = ldapssl_init(conn->host.name, (int)conn->port, 1);
+ server = ldapssl_init(host, (int)conn->port, 1);
if(server == NULL) {
- failf(data, "LDAP local: Cannot connect to %s:%hu",
- conn->host.name, conn->port);
- status = CURLE_COULDNT_CONNECT;
+ failf(data, "LDAP local: Cannot connect to %s:%ld",
+ conn->host.dispname, conn->port);
+ result = CURLE_COULDNT_CONNECT;
goto quit;
}
#elif defined(LDAP_OPT_X_TLS)
@@ -275,13 +327,13 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
/* OpenLDAP SDK supports BASE64 files. */
if((data->set.str[STRING_CERT_TYPE]) &&
(!Curl_raw_equal(data->set.str[STRING_CERT_TYPE], "PEM"))) {
- failf(data, "LDAP local: ERROR OpenLDAP does only support PEM cert-type!");
- status = CURLE_SSL_CERTPROBLEM;
+ failf(data, "LDAP local: ERROR OpenLDAP only supports PEM cert-type!");
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
if(!ldap_ca) {
failf(data, "LDAP local: ERROR PEM CA cert not set!");
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
infof(data, "LDAP local: using PEM CA cert: %s\n", ldap_ca);
@@ -289,25 +341,26 @@ 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));
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
ldap_option = LDAP_OPT_X_TLS_DEMAND;
- } else {
- ldap_option = LDAP_OPT_X_TLS_NEVER;
}
+ else
+ ldap_option = LDAP_OPT_X_TLS_NEVER;
+
rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &ldap_option);
if(rc != LDAP_SUCCESS) {
failf(data, "LDAP local: ERROR setting cert verify mode: %s",
ldap_err2string(rc));
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
- server = ldap_init(conn->host.name, (int)conn->port);
+ server = ldap_init(host, (int)conn->port);
if(server == NULL) {
- failf(data, "LDAP local: Cannot connect to %s:%hu",
- conn->host.name, conn->port);
- status = CURLE_COULDNT_CONNECT;
+ failf(data, "LDAP local: Cannot connect to %s:%ld",
+ conn->host.dispname, conn->port);
+ result = CURLE_COULDNT_CONNECT;
goto quit;
}
ldap_option = LDAP_OPT_X_TLS_HARD;
@@ -315,7 +368,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));
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
/*
@@ -323,7 +376,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));
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
}
*/
@@ -332,119 +385,278 @@ 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");
- status = CURLE_SSL_CERTPROBLEM;
+ result = CURLE_SSL_CERTPROBLEM;
goto quit;
#endif
#endif
#endif /* CURL_LDAP_USE_SSL */
- } else {
- server = ldap_init(conn->host.name, (int)conn->port);
+ }
+ else {
+ server = ldap_init(host, (int)conn->port);
if(server == NULL) {
- failf(data, "LDAP local: Cannot connect to %s:%hu",
- conn->host.name, conn->port);
- status = CURLE_COULDNT_CONNECT;
+ failf(data, "LDAP local: Cannot connect to %s:%ld",
+ conn->host.dispname, conn->port);
+ result = CURLE_COULDNT_CONNECT;
goto quit;
}
}
-#ifdef CURL_LDAP_WIN
+#ifdef USE_WIN32_LDAP
ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto);
#endif
- rc = ldap_simple_bind_s(server,
- conn->bits.user_passwd ? conn->user : NULL,
- conn->bits.user_passwd ? conn->passwd : NULL);
+ rc = ldap_simple_bind_s(server, user, passwd);
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,
- conn->bits.user_passwd ? conn->user : NULL,
- conn->bits.user_passwd ? conn->passwd : NULL);
+ rc = ldap_simple_bind_s(server, user, passwd);
}
if(rc != 0) {
- failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc));
- status = CURLE_LDAP_CANNOT_BIND;
- goto quit;
+ failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc));
+ result = CURLE_LDAP_CANNOT_BIND;
+ goto quit;
}
rc = ldap_search_s(server, ludp->lud_dn, ludp->lud_scope,
- ludp->lud_filter, ludp->lud_attrs, 0, &result);
+ ludp->lud_filter, ludp->lud_attrs, 0, &ldapmsg);
if(rc != 0 && rc != LDAP_SIZELIMIT_EXCEEDED) {
failf(data, "LDAP remote: %s", ldap_err2string(rc));
- status = CURLE_LDAP_SEARCH_FAILED;
+ result = CURLE_LDAP_SEARCH_FAILED;
goto quit;
}
- for(num = 0, entryIterator = ldap_first_entry(server, result);
+ for(num = 0, entryIterator = ldap_first_entry(server, ldapmsg);
entryIterator;
- entryIterator = ldap_next_entry(server, entryIterator), num++)
- {
+ entryIterator = ldap_next_entry(server, entryIterator), num++) {
BerElement *ber = NULL;
+#if defined(USE_WIN32_LDAP)
+ TCHAR *attribute;
+#else
char *attribute; /*! suspicious that this isn't 'const' */
- char *dn = ldap_get_dn(server, entryIterator);
+#endif
int i;
- 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);
+ /* Get the DN and write it to the client */
+ {
+ char *name;
+ size_t name_len;
+#if defined(USE_WIN32_LDAP)
+ TCHAR *dn = ldap_get_dn(server, entryIterator);
+ name = Curl_convert_tchar_to_UTF8(dn);
+ if(!name) {
+ ldap_memfree(dn);
- dlsize += strlen(dn)+5;
+ result = CURLE_OUT_OF_MEMORY;
- for (attribute = ldap_first_attribute(server, entryIterator, &ber);
- attribute;
- attribute = ldap_next_attribute(server, entryIterator, ber))
- {
- BerValue **vals = ldap_get_values_len(server, entryIterator, attribute);
-
- if(vals != NULL)
- {
- for (i = 0; (vals[i] != NULL); i++)
- {
- 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)) {
+ 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(USE_WIN32_LDAP)
+ Curl_unicodefree(name);
+#endif
+ ldap_memfree(dn);
+
+ goto quit;
+ }
+
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *) name,
+ name_len);
+ if(result) {
+#if defined(USE_WIN32_LDAP)
+ Curl_unicodefree(name);
+#endif
+ ldap_memfree(dn);
+
+ goto quit;
+ }
+
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
+ if(result) {
+#if defined(USE_WIN32_LDAP)
+ Curl_unicodefree(name);
+#endif
+ ldap_memfree(dn);
+
+ goto quit;
+ }
+
+ dlsize += name_len + 5;
+
+#if defined(USE_WIN32_LDAP)
+ 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(USE_WIN32_LDAP)
+ char *attr = Curl_convert_tchar_to_UTF8(attribute);
+ if(!attr) {
+ if(ber)
+ ber_free(ber, 0);
+
+ result = CURLE_OUT_OF_MEMORY;
+
+ 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(USE_WIN32_LDAP)
+ 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(USE_WIN32_LDAP)
+ 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(USE_WIN32_LDAP)
+ 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)) {
/* Binary attribute, encode to base64. */
- val_b64_sz = Curl_base64_encode(data,
- vals[i]->bv_val,
- vals[i]->bv_len,
- &val_b64);
+ result = Curl_base64_encode(data,
+ vals[i]->bv_val,
+ vals[i]->bv_len,
+ &val_b64,
+ &val_b64_sz);
+ if(result) {
+ ldap_value_free_len(vals);
+#if defined(USE_WIN32_LDAP)
+ Curl_unicodefree(attr);
+#endif
+ ldap_memfree(attribute);
+ if(ber)
+ ber_free(ber, 0);
+
+ goto quit;
+ }
+
if(val_b64_sz > 0) {
- Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, val_b64_sz);
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64,
+ val_b64_sz);
free(val_b64);
+ if(result) {
+ ldap_value_free_len(vals);
+#if defined(USE_WIN32_LDAP)
+ Curl_unicodefree(attr);
+#endif
+ ldap_memfree(attribute);
+ if(ber)
+ ber_free(ber, 0);
+
+ goto quit;
+ }
+
dlsize += val_b64_sz;
}
}
else {
- Curl_client_write(conn, CLIENTWRITE_BODY, vals[i]->bv_val,
- vals[i]->bv_len);
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, vals[i]->bv_val,
+ vals[i]->bv_len);
+ if(result) {
+ ldap_value_free_len(vals);
+#if defined(USE_WIN32_LDAP)
+ Curl_unicodefree(attr);
+#endif
+ ldap_memfree(attribute);
+ if(ber)
+ ber_free(ber, 0);
+
+ goto quit;
+ }
+
dlsize += vals[i]->bv_len;
}
- Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
+ if(result) {
+ ldap_value_free_len(vals);
+#if defined(USE_WIN32_LDAP)
+ Curl_unicodefree(attr);
+#endif
+ ldap_memfree(attribute);
+ if(ber)
+ ber_free(ber, 0);
+
+ goto quit;
+ }
+
dlsize++;
}
/* Free memory used to store values */
ldap_value_free_len(vals);
}
- Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
+
+ /* Free the attribute as we are done with it */
+#if defined(USE_WIN32_LDAP)
+ Curl_unicodefree(attr);
+#endif
+ ldap_memfree(attribute);
+
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
+ if(result)
+ goto quit;
dlsize++;
Curl_pgrsSetDownloadCounter(data, dlsize);
- ldap_memfree(attribute);
}
- ldap_memfree(dn);
+
if(ber)
ber_free(ber, 0);
}
quit:
- if(result) {
- ldap_msgfree(result);
+ if(ldapmsg) {
+ ldap_msgfree(ldapmsg);
LDAP_TRACE (("Received %d entries\n", num));
}
if(rc == LDAP_SIZELIMIT_EXCEEDED)
@@ -458,11 +670,17 @@ quit:
ldapssl_client_deinit();
#endif /* HAVE_LDAP_SSL && CURL_HAS_NOVELL_LDAPSDK */
+#if defined(USE_WIN32_LDAP)
+ Curl_unicodefree(passwd);
+ Curl_unicodefree(user);
+ Curl_unicodefree(host);
+#endif
+
/* no data to transfer */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
- conn->bits.close = TRUE;
+ connclose(conn, "LDAP connection always disable re-use");
- return status;
+ return result;
}
#ifdef DEBUG_LDAP
@@ -473,7 +691,7 @@ static void _ldap_trace (const char *fmt, ...)
if(do_trace == -1) {
const char *env = getenv("CURL_TRACE");
- do_trace = (env && atoi(env) > 0);
+ do_trace = (env && strtol(env, NULL, 10) > 0);
}
if(!do_trace)
return;
@@ -506,61 +724,34 @@ static int str2scope (const char *p)
/*
* Split 'str' into strings separated by commas.
- * Note: res[] points into 'str'.
+ * Note: out[] points into 'str'.
*/
-static char **split_str (char *str)
+static bool split_str(char *str, char ***out, size_t *count)
{
- char **res, *lasts, *s;
- int i;
-
- for (i = 2, s = strchr(str,','); s; i++)
- s = strchr(++s,',');
+ char **res;
+ char *lasts;
+ char *s;
+ size_t i;
+ size_t items = 1;
+
+ s = strchr(str, ',');
+ while(s) {
+ items++;
+ s = strchr(++s, ',');
+ }
- res = calloc(i, sizeof(char*));
+ res = calloc(items, sizeof(char *));
if(!res)
- return NULL;
+ return FALSE;
- for (i = 0, s = strtok_r(str, ",", &lasts); s;
- s = strtok_r(NULL, ",", &lasts), i++)
+ for(i = 0, s = strtok_r(str, ",", &lasts); s && i < items;
+ 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;
- if(ludp->lud_filter) {
- ludp->lud_filter = curl_easy_unescape(data, ludp->lud_filter, 0, NULL);
- if(!ludp->lud_filter)
- return (FALSE);
- }
+ *out = res;
+ *count = items;
- 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);
- }
-
- for (i = 0; ludp->lud_exts && ludp->lud_exts[i]; i++) {
- ludp->lud_exts[i] = curl_easy_unescape(data, ludp->lud_exts[i], 0, NULL);
- if(!ludp->lud_exts[i])
- return (FALSE);
- }
-
- 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);
+ return TRUE;
}
/*
@@ -579,8 +770,11 @@ static bool unescape_elements (void *data, LDAPURLDesc *ludp)
*/
static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
{
- char *p, *q;
- int i;
+ int rc = LDAP_SUCCESS;
+ char *path;
+ char *p;
+ char *q;
+ size_t i;
if(!conn->data ||
!conn->data->state.path ||
@@ -592,85 +786,190 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
ludp->lud_port = conn->remote_port;
ludp->lud_host = conn->host.name;
- /* parse DN (Distinguished Name).
- */
- ludp->lud_dn = strdup(conn->data->state.path+1);
- if(!ludp->lud_dn)
+ /* Duplicate the path */
+ p = path = strdup(conn->data->state.path + 1);
+ if(!path)
return LDAP_NO_MEMORY;
- p = strchr(ludp->lud_dn, '?');
- LDAP_TRACE (("DN '%.*s'\n", p ? (size_t)(p-ludp->lud_dn) :
- strlen(ludp->lud_dn), ludp->lud_dn));
+ /* Parse the DN (Distinguished Name) */
+ q = strchr(p, '?');
+ if(q)
+ *q++ = '\0';
- if(!p)
- goto success;
+ if(*p) {
+ char *dn = p;
+ char *unescaped;
+
+ LDAP_TRACE (("DN '%s'\n", dn));
- *p++ = '\0';
+ /* Unescape the DN */
+ unescaped = curl_easy_unescape(conn->data, dn, 0, NULL);
+ if(!unescaped) {
+ rc = LDAP_NO_MEMORY;
- /* parse attributes. skip "??".
- */
+ goto quit;
+ }
+
+#if defined(USE_WIN32_LDAP)
+ /* 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 = q;
+ if(!p)
+ goto quit;
+
+ /* Parse the attributes. skip "??" */
q = strchr(p, '?');
if(q)
*q++ = '\0';
- if(*p && *p != '?') {
- ludp->lud_attrs = split_str(p);
- if(!ludp->lud_attrs)
- return LDAP_NO_MEMORY;
+ 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;
+ }
+
+ /* Allocate our array (+1 for the NULL entry) */
+#if defined(USE_WIN32_LDAP)
+ ludp->lud_attrs = calloc(count + 1, sizeof(TCHAR *));
+#else
+ ludp->lud_attrs = calloc(count + 1, sizeof(char *));
+#endif
+ if(!ludp->lud_attrs) {
+ free(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) {
+ free(attributes);
+
+ rc = LDAP_NO_MEMORY;
+
+ goto quit;
+ }
+
+#if defined(USE_WIN32_LDAP)
+ /* 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]) {
+ free(attributes);
+
+ rc = LDAP_NO_MEMORY;
- for (i = 0; ludp->lud_attrs[i]; i++)
- LDAP_TRACE (("attr[%d] '%s'\n", i, ludp->lud_attrs[i]));
+ goto quit;
+ }
+#else
+ ludp->lud_attrs[i] = unescaped;
+#endif
+
+ ludp->lud_attrs_dups++;
+ }
+
+ free(attributes);
}
p = q;
if(!p)
- goto success;
+ goto quit;
- /* parse scope. skip "??"
- */
+ /* Parse the scope. skip "??" */
q = strchr(p, '?');
if(q)
*q++ = '\0';
- if(*p && *p != '?') {
+ if(*p) {
ludp->lud_scope = str2scope(p);
- if(ludp->lud_scope == -1)
- return LDAP_INVALID_SYNTAX;
+ if(ludp->lud_scope == -1) {
+ rc = LDAP_INVALID_SYNTAX;
+
+ goto quit;
+ }
LDAP_TRACE (("scope %d\n", ludp->lud_scope));
}
p = q;
if(!p)
- goto success;
+ goto quit;
- /* parse filter
- */
+ /* Parse the filter */
q = strchr(p, '?');
if(q)
*q++ = '\0';
- if(!*p)
- return LDAP_INVALID_SYNTAX;
- ludp->lud_filter = p;
- LDAP_TRACE (("filter '%s'\n", ludp->lud_filter));
+ 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(USE_WIN32_LDAP)
+ /* 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)
- goto success;
+ if(p && !*p) {
+ rc = LDAP_INVALID_SYNTAX;
- /* parse extensions
- */
- ludp->lud_exts = split_str(p);
- if(!ludp->lud_exts)
- return LDAP_NO_MEMORY;
+ goto quit;
+ }
- for (i = 0; ludp->lud_exts[i]; i++)
- LDAP_TRACE (("exts[%d] '%s'\n", i, ludp->lud_exts[i]));
+quit:
+ free(path);
- success:
- if(!unescape_elements(conn->data, ludp))
- return LDAP_NO_MEMORY;
- return LDAP_SUCCESS;
+ return rc;
}
static int _ldap_url_parse (const struct connectdata *conn,
@@ -694,28 +993,20 @@ static int _ldap_url_parse (const struct connectdata *conn,
static void _ldap_free_urldesc (LDAPURLDesc *ludp)
{
- int i;
+ size_t i;
if(!ludp)
- return;
-
- if(ludp->lud_dn)
- free(ludp->lud_dn);
+ return;
- if(ludp->lud_filter)
- free(ludp->lud_filter);
+ free(ludp->lud_dn);
+ free(ludp->lud_filter);
if(ludp->lud_attrs) {
- for (i = 0; ludp->lud_attrs[i]; i++)
- free(ludp->lud_attrs[i]);
+ for(i = 0; i < ludp->lud_attrs_dups; i++)
+ free(ludp->lud_attrs[i]);
free(ludp->lud_attrs);
}
- if(ludp->lud_exts) {
- for (i = 0; ludp->lud_exts[i]; i++)
- free(ludp->lud_exts[i]);
- free(ludp->lud_exts);
- }
free (ludp);
}
#endif /* !HAVE_LDAP_URL_PARSE */
diff --git a/lib/libcurl.def b/lib/libcurl.def
new file mode 100644
index 00000000..e051970b
--- /dev/null
+++ b/lib/libcurl.def
@@ -0,0 +1,53 @@
+;
+; Definition file for the DLL version of the LIBCURL library from curl
+;
+
+LIBRARY LIBCURL
+
+;DESCRIPTION 'curl libcurl - http://curl.haxx.se'
+
+EXPORTS
+ curl_easy_cleanup @ 1 ;
+ curl_easy_getinfo @ 2 ;
+ curl_easy_init @ 3 ;
+ curl_easy_perform @ 4 ;
+ curl_easy_setopt @ 5 ;
+ curl_escape @ 6 ;
+ curl_unescape @ 7;
+ curl_formfree @ 9 ;
+ curl_getdate @ 10 ;
+ curl_getenv @ 11 ;
+ curl_global_cleanup @ 12 ;
+ curl_global_init @ 13 ;
+ curl_slist_append @ 14 ;
+ curl_slist_free_all @ 15 ;
+ curl_version @ 16 ;
+ curl_maprintf @ 17 ;
+ curl_mfprintf @ 18 ;
+ curl_mprintf @ 19 ;
+ curl_msprintf @ 20 ;
+ curl_msnprintf @ 21 ;
+ curl_mvfprintf @ 22 ;
+ curl_strequal @ 23 ;
+ curl_strnequal @ 24 ;
+ curl_easy_duphandle @ 25 ;
+ curl_formadd @ 26 ;
+ curl_multi_init @ 27;
+ curl_multi_add_handle @ 28;
+ curl_multi_remove_handle @ 29;
+ curl_multi_fdset @ 30;
+ curl_multi_perform @ 31;
+ curl_multi_cleanup @ 32;
+ curl_multi_info_read @ 33;
+ curl_free @ 34;
+ curl_version_info @ 35;
+ curl_share_init @ 36;
+ curl_share_setopt @ 37;
+ curl_share_cleanup @ 38;
+ curl_global_init_mem @ 39;
+ curl_easy_strerror @ 40;
+ curl_multi_strerror @ 41;
+ curl_share_strerror @ 42;
+ curl_easy_reset @ 43;
+ curl_mvsnprintf @ 44 ;
+
diff --git a/lib/libcurl.imp b/lib/libcurl.imp
deleted file mode 100644
index 74943afa..00000000
--- a/lib/libcurl.imp
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Definition file for the NLM version of the LIBCURL library from curl
-#
-# (LIBCURL)
- curl_easy_cleanup,
- curl_easy_escape,
- curl_easy_unescape,
- curl_easy_getinfo,
- curl_easy_init,
- curl_easy_pause,
- curl_easy_perform,
- curl_easy_setopt,
- curl_escape,
- curl_unescape,
- curl_formfree,
- curl_getdate,
- curl_getenv,
- curl_global_cleanup,
- curl_global_init,
- curl_slist_append,
- curl_slist_free_all,
- curl_version,
- curl_maprintf,
- curl_mfprintf,
- curl_mprintf,
- curl_msprintf,
- curl_msnprintf,
- curl_mvfprintf,
- curl_mvsnprintf,
- curl_strequal,
- curl_strnequal,
- curl_easy_duphandle,
- curl_formadd,
- curl_multi_init,
- curl_multi_add_handle,
- curl_multi_remove_handle,
- curl_multi_fdset,
- curl_multi_perform,
- curl_multi_cleanup,
- curl_multi_info_read,
- curl_free,
- curl_version_info,
- curl_share_init,
- curl_share_setopt,
- curl_share_cleanup,
- curl_global_init_mem,
- curl_easy_strerror,
- curl_multi_strerror,
- curl_share_strerror,
- curl_easy_reset
-
diff --git a/lib/libcurl.plist b/lib/libcurl.plist
index 0ea606f6..622f66cf 100644
--- a/lib/libcurl.plist
+++ b/lib/libcurl.plist
@@ -3,33 +3,33 @@
<plist version="0.9">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
-
+ <string>6.0</string>
+
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
-
+
<key>CFBundleExecutable</key>
<string>curl</string>
-
+
<key>CFBundleIdentifier</key>
- <string>com.libcurl.libcurl</string>
-
+ <string>se.haxx.curl.libcurl</string>
+
<key>CFBundleVersion</key>
- <string>7.21.2</string>
+ <string>7.12.3</string>
<key>CFBundleName</key>
<string>libcurl</string>
<key>CFBundlePackageType</key>
- <string>FMWK</string>
-
+ <string>FMWK</string>
+
<key>CFBundleSignature</key>
- <string>????</string>
-
+ <string>????</string>
+
<key>CFBundleShortVersionString</key>
- <string>libcurl 7.21.2</string>
-
+ <string>libcurl 7.12.3</string>
+
<key>CFBundleGetInfoString</key>
- <string>libcurl.plist 7.21.2</string>
+ <string>libcurl.plist 7.12.3</string>
</dict>
-</plist> \ No newline at end of file
+</plist>
diff --git a/lib/libcurl.vcproj b/lib/libcurl.vcproj
deleted file mode 100755
index fe74b97b..00000000
--- a/lib/libcurl.vcproj
+++ /dev/null
@@ -1,2515 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="libcurl"
- ProjectGUID="{F6829817-CDBC-4BBE-B629-3BD21F4A797D}"
- RootNamespace="libcurl"
- TargetFrameworkVersion="0"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- EnableManagedIncrementalBuild="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".;..\include;..\..\openssl\Win32\include;..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_LIBCURL;CURL_STATICLIB;CURL_DISABLE_LDAP;USE_SSLEAY;USE_OPENSSL;HAVE_ZLIB_H"
- MinimalRebuild="true"
- RuntimeLibrary="3"
- EnableEnhancedInstructionSet="1"
- PrecompiledHeaderFile=""
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="4"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- EnableManagedIncrementalBuild="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=".;..\include;..\..\openssl\Win32\include;..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;CURL_DISABLE_LDAP;USE_SSLEAY;USE_OPENSSL;HAVE_ZLIB_H"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="1"
- PrecompiledHeaderFile=""
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="base64.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="connect.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="content_encoding.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="cookie.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="curl_addrinfo.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="curl_fnmatch.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="curl_gethostname.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="curl_memrchr.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="curl_rand.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="curl_rtmp.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="curl_sspi.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="curl_threads.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="dict.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="easy.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="escape.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="file.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="fileinfo.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="formdata.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="ftp.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="ftplistparser.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="getenv.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="getinfo.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="gopher.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="gtls.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hash.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hmac.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hostares.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hostasyn.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hostip.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hostip4.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hostip6.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hostsyn.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hostthre.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="http.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="http_chunks.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="http_digest.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="http_negotiate.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="http_ntlm.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="if2ip.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="imap.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="inet_ntop.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="inet_pton.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="krb4.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="krb5.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="ldap.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="llist.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="md4.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="md5.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="memdebug.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="mprintf.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="multi.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="netrc.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="nonblock.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="nss.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="openldap.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="parsedate.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="pingpong.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="polarssl.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="pop3.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="progress.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="qssl.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="rawstr.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="rtsp.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="security.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="select.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="sendf.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="share.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="slist.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="smtp.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="socks.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="socks_gssapi.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="socks_sspi.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="speedcheck.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="splay.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="ssh.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="sslgen.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="ssluse.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="strdup.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="strequal.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="strerror.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="strtok.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="strtoofft.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="telnet.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="tftp.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="timeval.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="transfer.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="url.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="version.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="warnless.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="wildcard.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="arpa_telnet.h"
- >
- </File>
- <File
- RelativePath="config-win32.h"
- >
- </File>
- <File
- RelativePath="connect.h"
- >
- </File>
- <File
- RelativePath="content_encoding.h"
- >
- </File>
- <File
- RelativePath="cookie.h"
- >
- </File>
- <File
- RelativePath="curl_addrinfo.h"
- >
- </File>
- <File
- RelativePath="curl_base64.h"
- >
- </File>
- <File
- RelativePath="curl_fnmatch.h"
- >
- </File>
- <File
- RelativePath="curl_gethostname.h"
- >
- </File>
- <File
- RelativePath="curl_hmac.h"
- >
- </File>
- <File
- RelativePath="curl_ldap.h"
- >
- </File>
- <File
- RelativePath="curl_md4.h"
- >
- </File>
- <File
- RelativePath="curl_md5.h"
- >
- </File>
- <File
- RelativePath="curl_memory.h"
- >
- </File>
- <File
- RelativePath="curl_memrchr.h"
- >
- </File>
- <File
- RelativePath="curl_rand.h"
- >
- </File>
- <File
- RelativePath="curl_rtmp.h"
- >
- </File>
- <File
- RelativePath="curl_sspi.h"
- >
- </File>
- <File
- RelativePath="curl_threads.h"
- >
- </File>
- <File
- RelativePath="curlx.h"
- >
- </File>
- <File
- RelativePath="dict.h"
- >
- </File>
- <File
- RelativePath="easyif.h"
- >
- </File>
- <File
- RelativePath="escape.h"
- >
- </File>
- <File
- RelativePath="file.h"
- >
- </File>
- <File
- RelativePath="fileinfo.h"
- >
- </File>
- <File
- RelativePath="formdata.h"
- >
- </File>
- <File
- RelativePath="ftp.h"
- >
- </File>
- <File
- RelativePath="ftplistparser.h"
- >
- </File>
- <File
- RelativePath="getinfo.h"
- >
- </File>
- <File
- RelativePath="gopher.h"
- >
- </File>
- <File
- RelativePath="gtls.h"
- >
- </File>
- <File
- RelativePath="hash.h"
- >
- </File>
- <File
- RelativePath="hostip.h"
- >
- </File>
- <File
- RelativePath="http.h"
- >
- </File>
- <File
- RelativePath="http_chunks.h"
- >
- </File>
- <File
- RelativePath="http_digest.h"
- >
- </File>
- <File
- RelativePath="http_negotiate.h"
- >
- </File>
- <File
- RelativePath="http_ntlm.h"
- >
- </File>
- <File
- RelativePath="if2ip.h"
- >
- </File>
- <File
- RelativePath="imap.h"
- >
- </File>
- <File
- RelativePath="inet_ntop.h"
- >
- </File>
- <File
- RelativePath="inet_pton.h"
- >
- </File>
- <File
- RelativePath="krb4.h"
- >
- </File>
- <File
- RelativePath="llist.h"
- >
- </File>
- <File
- RelativePath="memdebug.h"
- >
- </File>
- <File
- RelativePath="multiif.h"
- >
- </File>
- <File
- RelativePath="netrc.h"
- >
- </File>
- <File
- RelativePath="nonblock.h"
- >
- </File>
- <File
- RelativePath="nssg.h"
- >
- </File>
- <File
- RelativePath="parsedate.h"
- >
- </File>
- <File
- RelativePath="pingpong.h"
- >
- </File>
- <File
- RelativePath="polarssl.h"
- >
- </File>
- <File
- RelativePath="pop3.h"
- >
- </File>
- <File
- RelativePath="progress.h"
- >
- </File>
- <File
- RelativePath="qssl.h"
- >
- </File>
- <File
- RelativePath="rawstr.h"
- >
- </File>
- <File
- RelativePath="rtsp.h"
- >
- </File>
- <File
- RelativePath="select.h"
- >
- </File>
- <File
- RelativePath="sendf.h"
- >
- </File>
- <File
- RelativePath="setup.h"
- >
- </File>
- <File
- RelativePath="setup_once.h"
- >
- </File>
- <File
- RelativePath="share.h"
- >
- </File>
- <File
- RelativePath="slist.h"
- >
- </File>
- <File
- RelativePath="smtp.h"
- >
- </File>
- <File
- RelativePath="sockaddr.h"
- >
- </File>
- <File
- RelativePath="socks.h"
- >
- </File>
- <File
- RelativePath="speedcheck.h"
- >
- </File>
- <File
- RelativePath="splay.h"
- >
- </File>
- <File
- RelativePath="ssh.h"
- >
- </File>
- <File
- RelativePath="sslgen.h"
- >
- </File>
- <File
- RelativePath="ssluse.h"
- >
- </File>
- <File
- RelativePath="strdup.h"
- >
- </File>
- <File
- RelativePath="strequal.h"
- >
- </File>
- <File
- RelativePath="strerror.h"
- >
- </File>
- <File
- RelativePath="strtok.h"
- >
- </File>
- <File
- RelativePath="strtoofft.h"
- >
- </File>
- <File
- RelativePath="telnet.h"
- >
- </File>
- <File
- RelativePath="tftp.h"
- >
- </File>
- <File
- RelativePath="timeval.h"
- >
- </File>
- <File
- RelativePath="transfer.h"
- >
- </File>
- <File
- RelativePath="url.h"
- >
- </File>
- <File
- RelativePath="urldata.h"
- >
- </File>
- <File
- RelativePath="warnless.h"
- >
- </File>
- <File
- RelativePath="wildcard.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- >
- <File
- RelativePath="libcurl.rc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/lib/libcurl.vers.in b/lib/libcurl.vers.in
new file mode 100644
index 00000000..ae978a48
--- /dev/null
+++ b/lib/libcurl.vers.in
@@ -0,0 +1,13 @@
+HIDDEN
+{
+ local:
+ __*;
+ _rest*;
+ _save*;
+};
+
+CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@4
+{
+ global: curl_*;
+ local: *;
+};
diff --git a/lib/llist.c b/lib/llist.c
index 71238fa7..40bb6283 100644
--- a/lib/llist.c
+++ b/lib/llist.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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,10 +20,7 @@
*
***************************************************************************/
-#include "setup.h"
-
-#include <string.h>
-#include <stdlib.h>
+#include "curl_setup.h"
#include "llist.h"
#include "curl_memory.h"
@@ -31,6 +28,9 @@
/* this must be the last include file */
#include "memdebug.h"
+/*
+ * @unittest: 1300
+ */
static void
llist_init(struct curl_llist *l, curl_llist_dtor dtor)
{
@@ -46,7 +46,7 @@ Curl_llist_alloc(curl_llist_dtor dtor)
struct curl_llist *list;
list = malloc(sizeof(struct curl_llist));
- if(NULL == list)
+ if(!list)
return NULL;
llist_init(list, dtor);
@@ -62,6 +62,8 @@ Curl_llist_alloc(curl_llist_dtor dtor)
* inserted first in the list.
*
* Returns: 1 on success and 0 on failure.
+ *
+ * @unittest: 1300
*/
int
Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e,
@@ -101,6 +103,9 @@ Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e,
return 1;
}
+/*
+ * @unittest: 1300
+ */
int
Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
void *user)
@@ -115,7 +120,8 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
list->tail = NULL;
else
e->next->prev = NULL;
- } else {
+ }
+ else {
e->prev->next = e->next;
if(!e->next)
list->tail = e->prev;
@@ -125,6 +131,10 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
list->dtor(user, e->ptr);
+ e->ptr = NULL;
+ e->prev = NULL;
+ e->next = NULL;
+
free(e);
--list->size;
@@ -148,8 +158,12 @@ Curl_llist_count(struct curl_llist *list)
return list->size;
}
+/*
+ * @unittest: 1300
+ */
int Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e,
- struct curl_llist *to_list, struct curl_llist_element *to_e)
+ struct curl_llist *to_list,
+ struct curl_llist_element *to_e)
{
/* Remove element from list */
if(e == NULL || list->size == 0)
diff --git a/lib/llist.h b/lib/llist.h
index c33912a4..27ddb719 100644
--- a/lib/llist.h
+++ b/lib/llist.h
@@ -1,5 +1,5 @@
-#ifndef __LLIST_H
-#define __LLIST_H
+#ifndef HEADER_CURL_LLIST_H
+#define HEADER_CURL_LLIST_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -22,7 +22,7 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <stddef.h>
typedef void (*curl_llist_dtor)(void *, void *);
@@ -53,4 +53,5 @@ void Curl_llist_destroy(struct curl_llist *, void *);
int Curl_llist_move(struct curl_llist *, struct curl_llist_element *,
struct curl_llist *, struct curl_llist_element *);
-#endif
+#endif /* HEADER_CURL_LLIST_H */
+
diff --git a/lib/makefile.amiga b/lib/makefile.amiga
index 7b7fa8fa..c692e5eb 100644
--- a/lib/makefile.amiga
+++ b/lib/makefile.amiga
@@ -11,7 +11,6 @@ CC = m68k-amigaos-gcc
CFLAGS = -I$(ATCPSDKI) -m68020-60 -O2 -msoft-float -noixemul -g -I. -I../include -W -Wall
include Makefile.inc
-CSOURCES += amigaos.c
OBJS = $(CSOURCES:.c=.o)
all: $(OBJS)
diff --git a/lib/makefile.dj b/lib/makefile.dj
index 90faf337..7b2ca86b 100644
--- a/lib/makefile.dj
+++ b/lib/makefile.dj
@@ -1,6 +1,6 @@
#
# Adapted for djgpp2 / Watt-32 / DOS by
-# Gisle Vanem <giva@bgnett.no>
+# Gisle Vanem <gvanem@broadpark.no>
#
DEPEND_PREREQ = curl_config.h
@@ -21,7 +21,7 @@ all: $(OBJ_DIR) curl_config.h $(CURL_LIB)
$(CURL_LIB): $(OBJECTS)
ar rs $@ $?
-curl_config.h: config.dos
+curl_config.h: config-dos.h
$(COPY) $^ $@
# clean generated files
diff --git a/lib/md4.c b/lib/md4.c
index ecf3bfcd..60f73a28 100644
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -1,281 +1,304 @@
-/*-
- Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
-
- License to copy and use this software is granted provided that it
- is identified as the "RSA Data Security, Inc. MD4 Message-Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
-
- License is also granted to make and use derivative works provided
- that such works are identified as "derived from the RSA Data
- Security, Inc. MD4 Message-Digest Algorithm" in all material
- mentioning or referencing the derived work.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
+/*
+ * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
+ * MD4 Message-Digest Algorithm (RFC 1320).
+ *
+ * Homepage:
+ http://openwall.info/wiki/people/solar/software/public-domain-source-code/md4
+ *
+ * Author:
+ * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
+ *
+ * This software was written by Alexander Peslyak in 2001. No copyright is
+ * claimed, and the software is hereby placed in the public domain. In case
+ * this attempt to disclaim copyright and place the software in the public
+ * domain is deemed null and void, then the software is Copyright (c) 2001
+ * Alexander Peslyak and it is hereby released to the general public under the
+ * following terms:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted.
+ *
+ * There's ABSOLUTELY NO WARRANTY, express or implied.
+ *
+ * (This is a heavily cut-down "BSD license".)
+ *
+ * This differs from Colin Plumb's older public domain implementation in that
+ * no exactly 32-bit integer data type is required (any 32-bit or wider
+ * unsigned integer data type will do), there's no compile-time endianness
+ * configuration, and the function prototypes match OpenSSL's. No code from
+ * Colin Plumb's implementation has been reused; this comment merely compares
+ * the properties of the two independent implementations.
+ *
+ * The primary goals of this implementation are portability and ease of use.
+ * It is meant to be fast, but not as fast as possible. Some known
+ * optimizations are not included to reduce source code size and avoid
+ * compile-time configuration.
*/
-#include "setup.h"
+#include "curl_setup.h"
-/* NSS crypto library does not provide the MD4 hash algorithm, so that we have
- * a local implementation of it */
-#ifdef USE_NSS
+/* 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)
#include "curl_md4.h"
+#include "warnless.h"
+
+#ifndef HAVE_OPENSSL
+
#include <string.h>
-typedef unsigned int UINT4;
+/* Any 32-bit or wider unsigned integer data type will do */
+typedef unsigned int MD4_u32plus;
-typedef struct MD4Context {
- UINT4 state[4]; /* state (ABCD) */
- UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
- unsigned char buffer[64]; /* input buffer */
+typedef struct {
+ MD4_u32plus lo, hi;
+ MD4_u32plus a, b, c, d;
+ unsigned char buffer[64];
+ MD4_u32plus block[16];
} MD4_CTX;
-/* Constants for MD4Transform routine.
- */
-#define S11 3
-#define S12 7
-#define S13 11
-#define S14 19
-#define S21 3
-#define S22 5
-#define S23 9
-#define S24 13
-#define S31 3
-#define S32 9
-#define S33 11
-#define S34 15
-
-static void MD4Transform(UINT4 [4], const unsigned char [64]);
-static void Encode(unsigned char *, UINT4 *, unsigned int);
-static void Decode(UINT4 *, const unsigned char *, unsigned int);
-
-static unsigned char PADDING[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/* F, G and H are basic MD4 functions.
- */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
+static void MD4_Init(MD4_CTX *ctx);
+static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size);
+static void MD4_Final(unsigned char *result, MD4_CTX *ctx);
-/* ROTATE_LEFT rotates x left n bits.
+/*
+ * The basic MD4 functions.
+ *
+ * F and G are optimized compared to their RFC 1320 definitions, with the
+ * optimization for F borrowed from Colin Plumb's MD5 implementation.
*/
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/* FF, GG and HH are transformations for rounds 1, 2 and 3 */
-/* Rotation is separate from addition to prevent recomputation */
-#define FF(a, b, c, d, x, s) { \
- (a) += F ((b), (c), (d)) + (x); \
- (a) = ROTATE_LEFT ((a), (s)); \
- }
-#define GG(a, b, c, d, x, s) { \
- (a) += G ((b), (c), (d)) + (x) + (UINT4)0x5a827999; \
- (a) = ROTATE_LEFT ((a), (s)); \
- }
-#define HH(a, b, c, d, x, s) { \
- (a) += H ((b), (c), (d)) + (x) + (UINT4)0x6ed9eba1; \
- (a) = ROTATE_LEFT ((a), (s)); \
- }
+#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
+#define G(x, y, z) (((x) & ((y) | (z))) | ((y) & (z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
-/* MD4 initialization. Begins an MD4 operation, writing a new context.
+/*
+ * The MD4 transformation for all three rounds.
*/
-static void MD4Init(MD4_CTX *context)
+#define STEP(f, a, b, c, d, x, s) \
+ (a) += f((b), (c), (d)) + (x); \
+ (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s))));
+
+/*
+ * SET reads 4 input bytes in little-endian byte order and stores them
+ * in a properly aligned word in host byte order.
+ *
+ * The check for little-endian architectures that tolerate unaligned
+ * memory accesses is just an optimization. Nothing will break if it
+ * doesn't work.
+ */
+#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
+#define SET(n) \
+ (*(MD4_u32plus *)&ptr[(n) * 4])
+#define GET(n) \
+ SET(n)
+#else
+#define SET(n) \
+ (ctx->block[(n)] = \
+ (MD4_u32plus)ptr[(n) * 4] | \
+ ((MD4_u32plus)ptr[(n) * 4 + 1] << 8) | \
+ ((MD4_u32plus)ptr[(n) * 4 + 2] << 16) | \
+ ((MD4_u32plus)ptr[(n) * 4 + 3] << 24))
+#define GET(n) \
+ (ctx->block[(n)])
+#endif
+
+/*
+ * This processes one or more 64-byte data blocks, but does NOT update
+ * the bit counters. There are no alignment requirements.
+ */
+static const void *body(MD4_CTX *ctx, const void *data, unsigned long size)
{
- context->count[0] = context->count[1] = 0;
-
- /* Load magic initialization constants.
- */
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
+ const unsigned char *ptr;
+ MD4_u32plus a, b, c, d;
+ MD4_u32plus saved_a, saved_b, saved_c, saved_d;
+
+ ptr = (const unsigned char *)data;
+
+ a = ctx->a;
+ b = ctx->b;
+ c = ctx->c;
+ d = ctx->d;
+
+ do {
+ saved_a = a;
+ saved_b = b;
+ saved_c = c;
+ saved_d = d;
+
+/* Round 1 */
+ STEP(F, a, b, c, d, SET(0), 3)
+ STEP(F, d, a, b, c, SET(1), 7)
+ STEP(F, c, d, a, b, SET(2), 11)
+ STEP(F, b, c, d, a, SET(3), 19)
+ STEP(F, a, b, c, d, SET(4), 3)
+ STEP(F, d, a, b, c, SET(5), 7)
+ STEP(F, c, d, a, b, SET(6), 11)
+ STEP(F, b, c, d, a, SET(7), 19)
+ STEP(F, a, b, c, d, SET(8), 3)
+ STEP(F, d, a, b, c, SET(9), 7)
+ STEP(F, c, d, a, b, SET(10), 11)
+ STEP(F, b, c, d, a, SET(11), 19)
+ STEP(F, a, b, c, d, SET(12), 3)
+ STEP(F, d, a, b, c, SET(13), 7)
+ STEP(F, c, d, a, b, SET(14), 11)
+ STEP(F, b, c, d, a, SET(15), 19)
+
+/* Round 2 */
+ STEP(G, a, b, c, d, GET(0) + 0x5a827999, 3)
+ STEP(G, d, a, b, c, GET(4) + 0x5a827999, 5)
+ STEP(G, c, d, a, b, GET(8) + 0x5a827999, 9)
+ STEP(G, b, c, d, a, GET(12) + 0x5a827999, 13)
+ STEP(G, a, b, c, d, GET(1) + 0x5a827999, 3)
+ STEP(G, d, a, b, c, GET(5) + 0x5a827999, 5)
+ STEP(G, c, d, a, b, GET(9) + 0x5a827999, 9)
+ STEP(G, b, c, d, a, GET(13) + 0x5a827999, 13)
+ STEP(G, a, b, c, d, GET(2) + 0x5a827999, 3)
+ STEP(G, d, a, b, c, GET(6) + 0x5a827999, 5)
+ STEP(G, c, d, a, b, GET(10) + 0x5a827999, 9)
+ STEP(G, b, c, d, a, GET(14) + 0x5a827999, 13)
+ STEP(G, a, b, c, d, GET(3) + 0x5a827999, 3)
+ STEP(G, d, a, b, c, GET(7) + 0x5a827999, 5)
+ STEP(G, c, d, a, b, GET(11) + 0x5a827999, 9)
+ STEP(G, b, c, d, a, GET(15) + 0x5a827999, 13)
+
+/* Round 3 */
+ STEP(H, a, b, c, d, GET(0) + 0x6ed9eba1, 3)
+ STEP(H, d, a, b, c, GET(8) + 0x6ed9eba1, 9)
+ STEP(H, c, d, a, b, GET(4) + 0x6ed9eba1, 11)
+ STEP(H, b, c, d, a, GET(12) + 0x6ed9eba1, 15)
+ STEP(H, a, b, c, d, GET(2) + 0x6ed9eba1, 3)
+ STEP(H, d, a, b, c, GET(10) + 0x6ed9eba1, 9)
+ STEP(H, c, d, a, b, GET(6) + 0x6ed9eba1, 11)
+ STEP(H, b, c, d, a, GET(14) + 0x6ed9eba1, 15)
+ STEP(H, a, b, c, d, GET(1) + 0x6ed9eba1, 3)
+ STEP(H, d, a, b, c, GET(9) + 0x6ed9eba1, 9)
+ STEP(H, c, d, a, b, GET(5) + 0x6ed9eba1, 11)
+ STEP(H, b, c, d, a, GET(13) + 0x6ed9eba1, 15)
+ STEP(H, a, b, c, d, GET(3) + 0x6ed9eba1, 3)
+ STEP(H, d, a, b, c, GET(11) + 0x6ed9eba1, 9)
+ STEP(H, c, d, a, b, GET(7) + 0x6ed9eba1, 11)
+ STEP(H, b, c, d, a, GET(15) + 0x6ed9eba1, 15)
+
+ a += saved_a;
+ b += saved_b;
+ c += saved_c;
+ d += saved_d;
+
+ ptr += 64;
+ } while(size -= 64);
+
+ ctx->a = a;
+ ctx->b = b;
+ ctx->c = c;
+ ctx->d = d;
+
+ return ptr;
}
-/* MD4 block update operation. Continues an MD4 message-digest
- operation, processing another message block, and updating the
- context.
- */
-static void MD4Update(MD4_CTX *context, const unsigned char *input,
- unsigned int inputLen)
+static void MD4_Init(MD4_CTX *ctx)
{
- unsigned int i, bufindex, partLen;
-
- /* Compute number of bytes mod 64 */
- bufindex = (unsigned int)((context->count[0] >> 3) & 0x3F);
- /* Update number of bits */
- if ((context->count[0] += ((UINT4)inputLen << 3))
- < ((UINT4)inputLen << 3))
- context->count[1]++;
- context->count[1] += ((UINT4)inputLen >> 29);
-
- partLen = 64 - bufindex;
- /* Transform as many times as possible.
- */
- if (inputLen >= partLen) {
- memcpy(&context->buffer[bufindex], input, partLen);
- MD4Transform (context->state, context->buffer);
-
- for (i = partLen; i + 63 < inputLen; i += 64)
- MD4Transform (context->state, &input[i]);
-
- bufindex = 0;
- }
- else
- i = 0;
+ ctx->a = 0x67452301;
+ ctx->b = 0xefcdab89;
+ ctx->c = 0x98badcfe;
+ ctx->d = 0x10325476;
- /* Buffer remaining input */
- memcpy(&context->buffer[bufindex], &input[i], inputLen-i);
+ ctx->lo = 0;
+ ctx->hi = 0;
}
-/* MD4 padding. */
-static void MD4Pad(MD4_CTX *context)
+static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
{
- unsigned char bits[8];
- unsigned int bufindex, padLen;
+ MD4_u32plus saved_lo;
+ unsigned long used, available;
- /* Save number of bits */
- Encode (bits, context->count, 8);
+ saved_lo = ctx->lo;
+ if((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
+ ctx->hi++;
+ ctx->hi += (MD4_u32plus)size >> 29;
- /* Pad out to 56 mod 64.
- */
- bufindex = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (bufindex < 56) ? (56 - bufindex) : (120 - bufindex);
- MD4Update (context, PADDING, padLen);
+ used = saved_lo & 0x3f;
- /* Append length (before padding) */
- MD4Update (context, bits, 8);
-}
+ if(used) {
+ available = 64 - used;
-/* MD4 finalization. Ends an MD4 message-digest operation, writing the
- the message digest and zeroizing the context.
- */
-static void MD4Final (unsigned char digest[16], MD4_CTX *context)
-{
- /* Do padding */
- MD4Pad (context);
+ if(size < available) {
+ memcpy(&ctx->buffer[used], data, size);
+ return;
+ }
- /* Store state in digest */
- Encode (digest, context->state, 16);
+ memcpy(&ctx->buffer[used], data, available);
+ data = (const unsigned char *)data + available;
+ size -= available;
+ body(ctx, ctx->buffer, 64);
+ }
- /* Zeroize sensitive information.
- */
- memset(context, 0, sizeof(*context));
-}
+ if(size >= 64) {
+ data = body(ctx, data, size & ~(unsigned long)0x3f);
+ size &= 0x3f;
+ }
-/* MD4 basic transformation. Transforms state based on block.
- */
-static void MD4Transform (UINT4 state[4], const unsigned char block[64])
-{
- UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- Decode (x, block, 64);
-
- /* Round 1 */
- FF (a, b, c, d, x[ 0], S11); /* 1 */
- FF (d, a, b, c, x[ 1], S12); /* 2 */
- FF (c, d, a, b, x[ 2], S13); /* 3 */
- FF (b, c, d, a, x[ 3], S14); /* 4 */
- FF (a, b, c, d, x[ 4], S11); /* 5 */
- FF (d, a, b, c, x[ 5], S12); /* 6 */
- FF (c, d, a, b, x[ 6], S13); /* 7 */
- FF (b, c, d, a, x[ 7], S14); /* 8 */
- FF (a, b, c, d, x[ 8], S11); /* 9 */
- FF (d, a, b, c, x[ 9], S12); /* 10 */
- FF (c, d, a, b, x[10], S13); /* 11 */
- FF (b, c, d, a, x[11], S14); /* 12 */
- FF (a, b, c, d, x[12], S11); /* 13 */
- FF (d, a, b, c, x[13], S12); /* 14 */
- FF (c, d, a, b, x[14], S13); /* 15 */
- FF (b, c, d, a, x[15], S14); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, x[ 0], S21); /* 17 */
- GG (d, a, b, c, x[ 4], S22); /* 18 */
- GG (c, d, a, b, x[ 8], S23); /* 19 */
- GG (b, c, d, a, x[12], S24); /* 20 */
- GG (a, b, c, d, x[ 1], S21); /* 21 */
- GG (d, a, b, c, x[ 5], S22); /* 22 */
- GG (c, d, a, b, x[ 9], S23); /* 23 */
- GG (b, c, d, a, x[13], S24); /* 24 */
- GG (a, b, c, d, x[ 2], S21); /* 25 */
- GG (d, a, b, c, x[ 6], S22); /* 26 */
- GG (c, d, a, b, x[10], S23); /* 27 */
- GG (b, c, d, a, x[14], S24); /* 28 */
- GG (a, b, c, d, x[ 3], S21); /* 29 */
- GG (d, a, b, c, x[ 7], S22); /* 30 */
- GG (c, d, a, b, x[11], S23); /* 31 */
- GG (b, c, d, a, x[15], S24); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, x[ 0], S31); /* 33 */
- HH (d, a, b, c, x[ 8], S32); /* 34 */
- HH (c, d, a, b, x[ 4], S33); /* 35 */
- HH (b, c, d, a, x[12], S34); /* 36 */
- HH (a, b, c, d, x[ 2], S31); /* 37 */
- HH (d, a, b, c, x[10], S32); /* 38 */
- HH (c, d, a, b, x[ 6], S33); /* 39 */
- HH (b, c, d, a, x[14], S34); /* 40 */
- HH (a, b, c, d, x[ 1], S31); /* 41 */
- HH (d, a, b, c, x[ 9], S32); /* 42 */
- HH (c, d, a, b, x[ 5], S33); /* 43 */
- HH (b, c, d, a, x[13], S34); /* 44 */
- HH (a, b, c, d, x[ 3], S31); /* 45 */
- HH (d, a, b, c, x[11], S32); /* 46 */
- HH (c, d, a, b, x[ 7], S33); /* 47 */
- HH (b, c, d, a, x[15], S34); /* 48 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* Zeroize sensitive information.
- */
- memset(x, 0, sizeof(x));
+ memcpy(ctx->buffer, data, size);
}
-/* Encodes input (UINT4) into output (unsigned char). Assumes len is
- a multiple of 4.
- */
-static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
+static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
{
- unsigned int i, j;
+ unsigned long used, available;
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (unsigned char)(input[i] & 0xff);
- output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
- }
-}
+ used = ctx->lo & 0x3f;
-/* Decodes input (unsigned char) into output (UINT4). Assumes len is
- a multiple of 4.
- */
-static void Decode (UINT4 *output, const unsigned char *input, unsigned int len)
-{
- unsigned int i, j;
+ ctx->buffer[used++] = 0x80;
+
+ available = 64 - used;
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
- (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
+ if(available < 8) {
+ memset(&ctx->buffer[used], 0, available);
+ body(ctx, ctx->buffer, 64);
+ used = 0;
+ available = 64;
+ }
+
+ memset(&ctx->buffer[used], 0, available - 8);
+
+ ctx->lo <<= 3;
+ ctx->buffer[56] = curlx_ultouc((ctx->lo)&0xff);
+ ctx->buffer[57] = curlx_ultouc((ctx->lo >> 8)&0xff);
+ ctx->buffer[58] = curlx_ultouc((ctx->lo >> 16)&0xff);
+ ctx->buffer[59] = curlx_ultouc((ctx->lo >> 24)&0xff);
+ ctx->buffer[60] = curlx_ultouc((ctx->hi)&0xff);
+ ctx->buffer[61] = curlx_ultouc((ctx->hi >> 8)&0xff);
+ ctx->buffer[62] = curlx_ultouc((ctx->hi >> 16)&0xff);
+ ctx->buffer[63] = curlx_ultouc(ctx->hi >> 24);
+
+ body(ctx, ctx->buffer, 64);
+
+ result[0] = curlx_ultouc((ctx->a)&0xff);
+ result[1] = curlx_ultouc((ctx->a >> 8)&0xff);
+ result[2] = curlx_ultouc((ctx->a >> 16)&0xff);
+ result[3] = curlx_ultouc(ctx->a >> 24);
+ result[4] = curlx_ultouc((ctx->b)&0xff);
+ result[5] = curlx_ultouc((ctx->b >> 8)&0xff);
+ result[6] = curlx_ultouc((ctx->b >> 16)&0xff);
+ result[7] = curlx_ultouc(ctx->b >> 24);
+ result[8] = curlx_ultouc((ctx->c)&0xff);
+ result[9] = curlx_ultouc((ctx->c >> 8)&0xff);
+ result[10] = curlx_ultouc((ctx->c >> 16)&0xff);
+ result[11] = curlx_ultouc(ctx->c >> 24);
+ result[12] = curlx_ultouc((ctx->d)&0xff);
+ result[13] = curlx_ultouc((ctx->d >> 8)&0xff);
+ result[14] = curlx_ultouc((ctx->d >> 16)&0xff);
+ result[15] = curlx_ultouc(ctx->d >> 24);
+
+ memset(ctx, 0, sizeof(*ctx));
}
+#endif
+
void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len)
{
MD4_CTX ctx;
- MD4Init(&ctx);
- MD4Update(&ctx, input, (unsigned int)len);
- MD4Final(output, &ctx);
+ MD4_Init(&ctx);
+ MD4_Update(&ctx, input, curlx_uztoui(len));
+ MD4_Final(output, &ctx);
}
-#endif /* USE_NSS */
+#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */
diff --git a/lib/md5.c b/lib/md5.c
index b3912c58..b604c109 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,18 +20,46 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_CRYPTO_AUTH
-#include <string.h>
-
#include "curl_md5.h"
#include "curl_hmac.h"
+#include "warnless.h"
+
+#if defined(USE_GNUTLS_NETTLE)
+
+#include <nettle/md5.h>
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+typedef struct md5_ctx MD5_CTX;
+
+static void MD5_Init(MD5_CTX * ctx)
+{
+ md5_init(ctx);
+}
+
+static void MD5_Update(MD5_CTX * ctx,
+ const unsigned char * input,
+ unsigned int inputLen)
+{
+ md5_update(ctx, inputLen, input);
+}
-#ifdef USE_GNUTLS
+static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx)
+{
+ md5_digest(ctx, 16, digest);
+}
+
+#elif defined(USE_GNUTLS)
#include <gcrypt.h>
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
typedef gcry_md_hd_t MD5_CTX;
@@ -53,323 +81,405 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx)
gcry_md_close(*ctx);
}
-#else
-
-#ifdef USE_SSLEAY
+#elif defined(USE_OPENSSL)
/* When OpenSSL is available we use the MD5-function from OpenSSL */
+#include <openssl/md5.h>
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
+ (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
+ (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
+ (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000))
+
+/* For Apple operating systems: CommonCrypto has the functions we need.
+ These functions are available on Tiger and later, as well as iOS 2.0
+ and later. If you're building for an older cat, well, sorry.
+
+ Declaring the functions as static like this seems to be a bit more
+ reliable than defining COMMON_DIGEST_FOR_OPENSSL on older cats. */
+# include <CommonCrypto/CommonDigest.h>
+# define MD5_CTX CC_MD5_CTX
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+static void MD5_Init(MD5_CTX *ctx)
+{
+ CC_MD5_Init(ctx);
+}
-# ifdef USE_OPENSSL
-# include <openssl/md5.h>
-# else
-# include <md5.h>
-# endif
+static void MD5_Update(MD5_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ CC_MD5_Update(ctx, input, inputLen);
+}
-#else /* USE_SSLEAY */
-/* When OpenSSL is not available we use this code segment */
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+ CC_MD5_Final(digest, ctx);
+}
-/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
-rights reserved.
+#elif defined(_WIN32)
-License to copy and use this software is granted provided that it
-is identified as the "RSA Data Security, Inc. MD5 Message-Digest
-Algorithm" in all material mentioning or referencing this software
-or this function.
+#include <wincrypt.h>
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
-License is also granted to make and use derivative works provided
-that such works are identified as "derived from the RSA Data
-Security, Inc. MD5 Message-Digest Algorithm" in all material
-mentioning or referencing the derived work.
+typedef struct {
+ HCRYPTPROV hCryptProv;
+ HCRYPTHASH hHash;
+} MD5_CTX;
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
+static void MD5_Init(MD5_CTX *ctx)
+{
+ if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL,
+ PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+ CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash);
+ }
+}
-These notices must be retained in any copies of any part of this
-documentation and/or software.
- */
+static void MD5_Update(MD5_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
+}
-/* UINT4 defines a four byte word */
-typedef unsigned int UINT4;
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+ unsigned long length = 0;
+ CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0);
+ if(length == 16)
+ CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0);
+ if(ctx->hHash)
+ CryptDestroyHash(ctx->hHash);
+ if(ctx->hCryptProv)
+ CryptReleaseContext(ctx->hCryptProv, 0);
+}
-/* MD5 context. */
-struct md5_ctx {
- UINT4 state[4]; /* state (ABCD) */
- UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
- unsigned char buffer[64]; /* input buffer */
-};
+#elif defined(USE_AXTLS)
+#include <axTLS/config.h>
+#include <axTLS/os_int.h>
+#include <axTLS/crypto.h>
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+#else
+/* When no other crypto library is available we use this code segment */
+/*
+ * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
+ * MD5 Message-Digest Algorithm (RFC 1321).
+ *
+ * Homepage:
+ http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
+ *
+ * Author:
+ * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
+ *
+ * This software was written by Alexander Peslyak in 2001. No copyright is
+ * claimed, and the software is hereby placed in the public domain.
+ * In case this attempt to disclaim copyright and place the software in the
+ * public domain is deemed null and void, then the software is
+ * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
+ * general public under the following terms:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted.
+ *
+ * There's ABSOLUTELY NO WARRANTY, express or implied.
+ *
+ * (This is a heavily cut-down "BSD license".)
+ *
+ * This differs from Colin Plumb's older public domain implementation in that
+ * no exactly 32-bit integer data type is required (any 32-bit or wider
+ * unsigned integer data type will do), there's no compile-time endianness
+ * configuration, and the function prototypes match OpenSSL's. No code from
+ * Colin Plumb's implementation has been reused; this comment merely compares
+ * the properties of the two independent implementations.
+ *
+ * The primary goals of this implementation are portability and ease of use.
+ * It is meant to be fast, but not as fast as possible. Some known
+ * optimizations are not included to reduce source code size and avoid
+ * compile-time configuration.
+ */
-typedef struct md5_ctx MD5_CTX;
+#include <string.h>
-static void MD5_Init(struct md5_ctx *);
-static void MD5_Update(struct md5_ctx *, const unsigned char *, unsigned int);
-static void MD5_Final(unsigned char [16], struct md5_ctx *);
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
-/* Constants for MD5Transform routine.
- */
+/* Any 32-bit or wider unsigned integer data type will do */
+typedef unsigned int MD5_u32plus;
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
-
-static void MD5Transform(UINT4 [4], const unsigned char [64]);
-static void Encode(unsigned char *, UINT4 *, unsigned int);
-static void Decode(UINT4 *, const unsigned char *, unsigned int);
-
-static const unsigned char PADDING[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
+typedef struct {
+ MD5_u32plus lo, hi;
+ MD5_u32plus a, b, c, d;
+ unsigned char buffer[64];
+ MD5_u32plus block[16];
+} MD5_CTX;
-/* F, G, H and I are basic MD5 functions.
- */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define I(x, y, z) ((y) ^ ((x) | (~z)))
+static void MD5_Init(MD5_CTX *ctx);
+static void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size);
+static void MD5_Final(unsigned char *result, MD5_CTX *ctx);
-/* ROTATE_LEFT rotates x left n bits.
+/*
+ * The basic MD5 functions.
+ *
+ * F and G are optimized compared to their RFC 1321 definitions for
+ * architectures that lack an AND-NOT instruction, just like in Colin Plumb's
+ * implementation.
*/
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
-Rotation is separate from addition to prevent recomputation.
+#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
+#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y))))
+#define H(x, y, z) (((x) ^ (y)) ^ (z))
+#define H2(x, y, z) ((x) ^ ((y) ^ (z)))
+#define I(x, y, z) ((y) ^ ((x) | ~(z)))
+
+/*
+ * The MD5 transformation for all four rounds.
*/
-#define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-
-/* MD5 initialization. Begins an MD5 operation, writing a new context.
+#define STEP(f, a, b, c, d, x, t, s) \
+ (a) += f((b), (c), (d)) + (x) + (t); \
+ (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
+ (a) += (b);
+
+/*
+ * SET reads 4 input bytes in little-endian byte order and stores them
+ * in a properly aligned word in host byte order.
+ *
+ * The check for little-endian architectures that tolerate unaligned
+ * memory accesses is just an optimization. Nothing will break if it
+ * doesn't work.
*/
-static void MD5_Init(struct md5_ctx *context)
+#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
+#define SET(n) \
+ (*(MD5_u32plus *)&ptr[(n) * 4])
+#define GET(n) \
+ SET(n)
+#else
+#define SET(n) \
+ (ctx->block[(n)] = \
+ (MD5_u32plus)ptr[(n) * 4] | \
+ ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
+ ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
+ ((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
+#define GET(n) \
+ (ctx->block[(n)])
+#endif
+
+/*
+ * This processes one or more 64-byte data blocks, but does NOT update
+ * the bit counters. There are no alignment requirements.
+ */
+static const void *body(MD5_CTX *ctx, const void *data, unsigned long size)
{
- context->count[0] = context->count[1] = 0;
- /* Load magic initialization constants. */
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
+ const unsigned char *ptr;
+ MD5_u32plus a, b, c, d;
+ MD5_u32plus saved_a, saved_b, saved_c, saved_d;
+
+ ptr = (const unsigned char *)data;
+
+ a = ctx->a;
+ b = ctx->b;
+ c = ctx->c;
+ d = ctx->d;
+
+ do {
+ saved_a = a;
+ saved_b = b;
+ saved_c = c;
+ saved_d = d;
+
+/* Round 1 */
+ STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
+ STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
+ STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
+ STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
+ STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
+ STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
+ STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
+ STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
+ STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
+ STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
+ STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
+ STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
+ STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
+ STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
+ STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
+ STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)
+
+/* Round 2 */
+ STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
+ STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
+ STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
+ STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
+ STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
+ STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
+ STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
+ STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
+ STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
+ STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
+ STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
+ STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
+ STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
+ STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
+ STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
+ STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)
+
+/* Round 3 */
+ STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
+ STEP(H2, d, a, b, c, GET(8), 0x8771f681, 11)
+ STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)
+ STEP(H2, b, c, d, a, GET(14), 0xfde5380c, 23)
+ STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)
+ STEP(H2, d, a, b, c, GET(4), 0x4bdecfa9, 11)
+ STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)
+ STEP(H2, b, c, d, a, GET(10), 0xbebfbc70, 23)
+ STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)
+ STEP(H2, d, a, b, c, GET(0), 0xeaa127fa, 11)
+ STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)
+ STEP(H2, b, c, d, a, GET(6), 0x04881d05, 23)
+ STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)
+ STEP(H2, d, a, b, c, GET(12), 0xe6db99e5, 11)
+ STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)
+ STEP(H2, b, c, d, a, GET(2), 0xc4ac5665, 23)
+
+/* Round 4 */
+ STEP(I, a, b, c, d, GET(0), 0xf4292244, 6)
+ STEP(I, d, a, b, c, GET(7), 0x432aff97, 10)
+ STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)
+ STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)
+ STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)
+ STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)
+ STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)
+ STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)
+ STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)
+ STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)
+ STEP(I, c, d, a, b, GET(6), 0xa3014314, 15)
+ STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)
+ STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)
+ STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)
+ STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)
+ STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)
+
+ a += saved_a;
+ b += saved_b;
+ c += saved_c;
+ d += saved_d;
+
+ ptr += 64;
+ } while(size -= 64);
+
+ ctx->a = a;
+ ctx->b = b;
+ ctx->c = c;
+ ctx->d = d;
+
+ return ptr;
}
-/* MD5 block update operation. Continues an MD5 message-digest
- operation, processing another message block, and updating the
- context.
- */
-static void MD5_Update (struct md5_ctx *context, /* context */
- const unsigned char *input, /* input block */
- unsigned int inputLen) /* length of input block */
+static void MD5_Init(MD5_CTX *ctx)
+{
+ ctx->a = 0x67452301;
+ ctx->b = 0xefcdab89;
+ ctx->c = 0x98badcfe;
+ ctx->d = 0x10325476;
+
+ ctx->lo = 0;
+ ctx->hi = 0;
+}
+
+static void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
{
- unsigned int i, bufindex, partLen;
+ MD5_u32plus saved_lo;
+ unsigned long used, available;
- /* Compute number of bytes mod 64 */
- bufindex = (unsigned int)((context->count[0] >> 3) & 0x3F);
+ saved_lo = ctx->lo;
+ if((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
+ ctx->hi++;
+ ctx->hi += (MD5_u32plus)size >> 29;
- /* Update number of bits */
- if((context->count[0] += ((UINT4)inputLen << 3))
- < ((UINT4)inputLen << 3))
- context->count[1]++;
- context->count[1] += ((UINT4)inputLen >> 29);
+ used = saved_lo & 0x3f;
- partLen = 64 - bufindex;
+ if(used) {
+ available = 64 - used;
- /* Transform as many times as possible. */
- if(inputLen >= partLen) {
- memcpy(&context->buffer[bufindex], input, partLen);
- MD5Transform(context->state, context->buffer);
+ if(size < available) {
+ memcpy(&ctx->buffer[used], data, size);
+ return;
+ }
- for (i = partLen; i + 63 < inputLen; i += 64)
- MD5Transform(context->state, &input[i]);
+ memcpy(&ctx->buffer[used], data, available);
+ data = (const unsigned char *)data + available;
+ size -= available;
+ body(ctx, ctx->buffer, 64);
+ }
- bufindex = 0;
+ if(size >= 64) {
+ data = body(ctx, data, size & ~(unsigned long)0x3f);
+ size &= 0x3f;
}
- else
- i = 0;
- /* Buffer remaining input */
- memcpy(&context->buffer[bufindex], &input[i], inputLen-i);
+ memcpy(ctx->buffer, data, size);
}
-/* MD5 finalization. Ends an MD5 message-digest operation, writing the
- the message digest and zeroizing the context.
-*/
-static void MD5_Final(unsigned char digest[16], /* message digest */
- struct md5_ctx *context) /* context */
+static void MD5_Final(unsigned char *result, MD5_CTX *ctx)
{
- unsigned char bits[8];
- unsigned int count, padLen;
-
- /* Save number of bits */
- Encode (bits, context->count, 8);
-
- /* Pad out to 56 mod 64. */
- count = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (count < 56) ? (56 - count) : (120 - count);
- MD5_Update (context, PADDING, padLen);
-
- /* Append length (before padding) */
- MD5_Update (context, bits, 8);
+ unsigned long used, available;
- /* Store state in digest */
- Encode (digest, context->state, 16);
+ used = ctx->lo & 0x3f;
- /* Zeroize sensitive information. */
- memset ((void *)context, 0, sizeof (*context));
-}
-
-/* MD5 basic transformation. Transforms state based on block. */
-static void MD5Transform(UINT4 state[4],
- const unsigned char block[64])
-{
- UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- Decode (x, block, 64);
-
- /* Round 1 */
- FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
- FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
- FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
- FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
- FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
- FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
- FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
- FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
- FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
- FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
- FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
- FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
- FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
- FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
- FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
- FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
- GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
- GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
- GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
- GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
- GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
- GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
- GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
- GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
- GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
- GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
- GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
- GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
- GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
- GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
- HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
- HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
- HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
- HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
- HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
- HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
- HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
- HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
- HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
- HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
- HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
- HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
- HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
- HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-
- /* Round 4 */
- II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
- II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
- II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
- II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
- II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
- II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
- II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
- II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
- II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
- II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
- II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
- II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
- II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
- II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
- II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
- II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* Zeroize sensitive information. */
- memset((void *)x, 0, sizeof (x));
-}
+ ctx->buffer[used++] = 0x80;
-/* Encodes input (UINT4) into output (unsigned char). Assumes len is
- a multiple of 4.
- */
-static void Encode (unsigned char *output,
- UINT4 *input,
- unsigned int len)
-{
- unsigned int i, j;
+ available = 64 - used;
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (unsigned char)(input[i] & 0xff);
- output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
+ if(available < 8) {
+ memset(&ctx->buffer[used], 0, available);
+ body(ctx, ctx->buffer, 64);
+ used = 0;
+ available = 64;
}
-}
-/* Decodes input (unsigned char) into output (UINT4). Assumes len is
- a multiple of 4.
-*/
-static void Decode (UINT4 *output,
- const unsigned char *input,
- unsigned int len)
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
- (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
+ memset(&ctx->buffer[used], 0, available - 8);
+
+ ctx->lo <<= 3;
+ ctx->buffer[56] = curlx_ultouc((ctx->lo)&0xff);
+ ctx->buffer[57] = curlx_ultouc((ctx->lo >> 8)&0xff);
+ ctx->buffer[58] = curlx_ultouc((ctx->lo >> 16)&0xff);
+ ctx->buffer[59] = curlx_ultouc(ctx->lo >> 24);
+ ctx->buffer[60] = curlx_ultouc((ctx->hi)&0xff);
+ ctx->buffer[61] = curlx_ultouc((ctx->hi >> 8)&0xff);
+ ctx->buffer[62] = curlx_ultouc((ctx->hi >> 16)&0xff);
+ ctx->buffer[63] = curlx_ultouc(ctx->hi >> 24);
+
+ body(ctx, ctx->buffer, 64);
+
+ result[0] = curlx_ultouc((ctx->a)&0xff);
+ result[1] = curlx_ultouc((ctx->a >> 8)&0xff);
+ result[2] = curlx_ultouc((ctx->a >> 16)&0xff);
+ result[3] = curlx_ultouc(ctx->a >> 24);
+ result[4] = curlx_ultouc((ctx->b)&0xff);
+ result[5] = curlx_ultouc((ctx->b >> 8)&0xff);
+ result[6] = curlx_ultouc((ctx->b >> 16)&0xff);
+ result[7] = curlx_ultouc(ctx->b >> 24);
+ result[8] = curlx_ultouc((ctx->c)&0xff);
+ result[9] = curlx_ultouc((ctx->c >> 8)&0xff);
+ result[10] = curlx_ultouc((ctx->c >> 16)&0xff);
+ result[11] = curlx_ultouc(ctx->c >> 24);
+ result[12] = curlx_ultouc((ctx->d)&0xff);
+ result[13] = curlx_ultouc((ctx->d >> 8)&0xff);
+ result[14] = curlx_ultouc((ctx->d >> 16)&0xff);
+ result[15] = curlx_ultouc(ctx->d >> 24);
+
+ memset(ctx, 0, sizeof(*ctx));
}
-#endif /* USE_SSLEAY */
-
-#endif /* USE_GNUTLS */
+#endif /* CRYPTO LIBS */
const HMAC_params Curl_HMAC_MD5[] = {
{
@@ -382,14 +492,69 @@ const HMAC_params Curl_HMAC_MD5[] = {
}
};
+const MD5_params Curl_DIGEST_MD5[] = {
+ {
+ (Curl_MD5_init_func) MD5_Init, /* Digest initialization function */
+ (Curl_MD5_update_func) MD5_Update, /* Digest update function */
+ (Curl_MD5_final_func) MD5_Final, /* Digest computation end function */
+ sizeof(MD5_CTX), /* Size of digest context struct */
+ 16 /* Result size */
+ }
+};
+/*
+ * @unittest: 1601
+ */
void Curl_md5it(unsigned char *outbuffer, /* 16 bytes */
const unsigned char *input)
{
MD5_CTX ctx;
MD5_Init(&ctx);
- MD5_Update(&ctx, input, (unsigned int)strlen((char *)input));
+ MD5_Update(&ctx, input, curlx_uztoui(strlen((char *)input)));
MD5_Final(outbuffer, &ctx);
}
+MD5_context *Curl_MD5_init(const MD5_params *md5params)
+{
+ MD5_context *ctxt;
+
+ /* Create MD5 context */
+ ctxt = malloc(sizeof *ctxt);
+
+ if(!ctxt)
+ return ctxt;
+
+ ctxt->md5_hashctx = malloc(md5params->md5_ctxtsize);
+
+ if(!ctxt->md5_hashctx) {
+ free(ctxt);
+ return NULL;
+ }
+
+ ctxt->md5_hash = md5params;
+
+ (*md5params->md5_init_func)(ctxt->md5_hashctx);
+
+ return ctxt;
+}
+
+int Curl_MD5_update(MD5_context *context,
+ const unsigned char *data,
+ unsigned int len)
+{
+ (*context->md5_hash->md5_update_func)(context->md5_hashctx, data, len);
+
+ return 0;
+}
+
+int Curl_MD5_final(MD5_context *context, unsigned char *result)
+{
+ (*context->md5_hash->md5_final_func)(result, context->md5_hashctx);
+
+ free(context->md5_hashctx);
+ free(context);
+
+ return 0;
+}
+
#endif /* CURL_DISABLE_CRYPTO_AUTH */
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 69e204b6..dd8889b2 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,38 +20,73 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef CURLDEBUG
-#include <curl/curl.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+#include <curl/curl.h>
-#define _MPRINTF_REPLACE
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#include "urldata.h"
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#define MEMDEBUG_NODEFINES /* don't redefine the standard functions */
#include "curl_memory.h"
#include "memdebug.h"
#ifndef HAVE_ASSERT_H
-# define assert(x) do { } while (0)
+# define assert(x) Curl_nop_stmt
+#endif
+
+/*
+ * Until 2011-08-17 libcurl's Memory Tracking feature also performed
+ * automatic malloc and free filling operations using 0xA5 and 0x13
+ * values. Our own preinitialization of dynamically allocated memory
+ * might be useful when not using third party memory debuggers, but
+ * on the other hand this would fool memory debuggers into thinking
+ * that all dynamically allocated memory is properly initialized.
+ *
+ * As a default setting, libcurl's Memory Tracking feature no longer
+ * performs preinitialization of dynamically allocated memory on its
+ * own. If you know what you are doing, and really want to retain old
+ * behavior, you can achieve this compiling with preprocessor symbols
+ * CURL_MT_MALLOC_FILL and CURL_MT_FREE_FILL defined with appropriate
+ * values.
+ */
+
+#ifdef CURL_MT_MALLOC_FILL
+# if (CURL_MT_MALLOC_FILL < 0) || (CURL_MT_MALLOC_FILL > 0xff)
+# error "invalid CURL_MT_MALLOC_FILL or out of range"
+# endif
+#endif
+
+#ifdef CURL_MT_FREE_FILL
+# if (CURL_MT_FREE_FILL < 0) || (CURL_MT_FREE_FILL > 0xff)
+# error "invalid CURL_MT_FREE_FILL or out of range"
+# endif
+#endif
+
+#if defined(CURL_MT_MALLOC_FILL) && defined(CURL_MT_FREE_FILL)
+# if (CURL_MT_MALLOC_FILL == CURL_MT_FREE_FILL)
+# error "CURL_MT_MALLOC_FILL same as CURL_MT_FREE_FILL"
+# endif
+#endif
+
+#ifdef CURL_MT_MALLOC_FILL
+# define mt_malloc_fill(buf,len) memset((buf), CURL_MT_MALLOC_FILL, (len))
+#else
+# define mt_malloc_fill(buf,len) Curl_nop_stmt
+#endif
+
+#ifdef CURL_MT_FREE_FILL
+# define mt_free_fill(buf,len) memset((buf), CURL_MT_FREE_FILL, (len))
+#else
+# define mt_free_fill(buf,len) Curl_nop_stmt
#endif
struct memdebug {
size_t size;
union {
+ curl_off_t o;
double d;
void * p;
} mem[1];
@@ -76,8 +111,8 @@ static long memsize = 0; /* set number of mallocs allowed */
void curl_memdebug(const char *logname)
{
if(!logfile) {
- if(logname)
- logfile = fopen(logname, "w");
+ if(logname && *logname)
+ logfile = fopen(logname, FOPEN_WRITETEXT);
else
logfile = stderr;
#ifdef MEMDEBUG_LOG_SYNC
@@ -144,13 +179,15 @@ void *curl_domalloc(size_t wantedsize, int line, const char *source)
mem = (Curl_cmalloc)(size);
if(mem) {
/* fill memory with junk */
- memset(mem->mem, 0xA5, wantedsize);
+ mt_malloc_fill(mem->mem, wantedsize);
mem->size = wantedsize;
}
if(source)
- curl_memlog("MEM %s:%d malloc(%zd) = %p\n",
- source, line, wantedsize, mem ? mem->mem : 0);
+ curl_memlog("MEM %s:%d malloc(%zu) = %p\n",
+ source, line, wantedsize,
+ mem ? (void *)mem->mem : (void *)0);
+
return (mem ? mem->mem : NULL);
}
@@ -170,16 +207,15 @@ void *curl_docalloc(size_t wanted_elements, size_t wanted_size,
user_size = wanted_size * wanted_elements;
size = sizeof(struct memdebug) + user_size;
- mem = (Curl_cmalloc)(size);
- if(mem) {
- /* fill memory with zeroes */
- memset(mem->mem, 0, user_size);
+ mem = (Curl_ccalloc)(1, size);
+ if(mem)
mem->size = user_size;
- }
if(source)
curl_memlog("MEM %s:%d calloc(%zu,%zu) = %p\n",
- source, line, wanted_elements, wanted_size, mem?mem->mem:0);
+ source, line, wanted_elements, wanted_size,
+ mem ? (void *)mem->mem : (void *)0);
+
return (mem ? mem->mem : NULL);
}
@@ -201,11 +237,37 @@ char *curl_dostrdup(const char *str, int line, const char *source)
if(source)
curl_memlog("MEM %s:%d strdup(%p) (%zu) = %p\n",
- source, line, str, len, mem);
+ source, line, (void *)str, len, (void *)mem);
return mem;
}
+#if defined(WIN32) && defined(UNICODE)
+wchar_t *curl_dowcsdup(const wchar_t *str, int line, const char *source)
+{
+ wchar_t *mem;
+ size_t wsiz, bsiz;
+
+ assert(str != NULL);
+
+ if(countcheck("wcsdup", line, source))
+ return NULL;
+
+ wsiz = wcslen(str) + 1;
+ bsiz = wsiz * sizeof(wchar_t);
+
+ mem = curl_domalloc(bsiz, 0, NULL); /* NULL prevents logging */
+ if(mem)
+ memcpy(mem, str, bsiz);
+
+ if(source)
+ curl_memlog("MEM %s:%d wcsdup(%p) (%zu) = %p\n",
+ source, line, (void *)str, bsiz, (void *)mem);
+
+ return mem;
+}
+#endif
+
/* We provide a realloc() that accepts a NULL as pointer, which then
performs a malloc(). In order to work with ares. */
void *curl_dorealloc(void *ptr, size_t wantedsize,
@@ -236,7 +298,8 @@ void *curl_dorealloc(void *ptr, size_t wantedsize,
mem = (Curl_crealloc)(mem, size);
if(source)
curl_memlog("MEM %s:%d realloc(%p, %zu) = %p\n",
- source, line, ptr, wantedsize, mem?mem->mem:NULL);
+ source, line, (void *)ptr, wantedsize,
+ mem ? (void *)mem->mem : (void *)0);
if(mem) {
mem->size = wantedsize;
@@ -250,7 +313,7 @@ void curl_dofree(void *ptr, int line, const char *source)
{
struct memdebug *mem;
- assert(ptr != NULL);
+ if(ptr) {
#ifdef __INTEL_COMPILER
# pragma warning(push)
@@ -258,51 +321,77 @@ void curl_dofree(void *ptr, int line, const char *source)
/* 1684: conversion from pointer to same-sized integral type */
#endif
- mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
+ mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
#ifdef __INTEL_COMPILER
# pragma warning(pop)
#endif
- /* destroy */
- memset(mem->mem, 0x13, mem->size);
+ /* destroy */
+ mt_free_fill(mem->mem, mem->size);
- /* free for real */
- (Curl_cfree)(mem);
+ /* free for real */
+ (Curl_cfree)(mem);
+ }
if(source)
- curl_memlog("MEM %s:%d free(%p)\n", source, line, ptr);
+ curl_memlog("MEM %s:%d free(%p)\n", source, line, (void *)ptr);
}
curl_socket_t curl_socket(int domain, int type, int protocol,
int line, const char *source)
{
const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ?
- "FD %s:%d socket() = %d\n" :
- (sizeof(curl_socket_t) == sizeof(long)) ?
- "FD %s:%d socket() = %ld\n" :
- "FD %s:%d socket() = %zd\n" ;
+ "FD %s:%d socket() = %d\n" :
+ (sizeof(curl_socket_t) == sizeof(long)) ?
+ "FD %s:%d socket() = %ld\n" :
+ "FD %s:%d socket() = %zd\n";
curl_socket_t sockfd = socket(domain, type, protocol);
+
if(source && (sockfd != CURL_SOCKET_BAD))
curl_memlog(fmt, source, line, sockfd);
+
return sockfd;
}
+#ifdef HAVE_SOCKETPAIR
+int curl_socketpair(int domain, int type, int protocol,
+ curl_socket_t socket_vector[2],
+ int line, const char *source)
+{
+ const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ?
+ "FD %s:%d socketpair() = %d %d\n" :
+ (sizeof(curl_socket_t) == sizeof(long)) ?
+ "FD %s:%d socketpair() = %ld %ld\n" :
+ "FD %s:%d socketpair() = %zd %zd\n";
+
+ int res = socketpair(domain, type, protocol, socket_vector);
+
+ if(source && (0 == res))
+ curl_memlog(fmt, source, line, socket_vector[0], socket_vector[1]);
+
+ return res;
+}
+#endif
+
curl_socket_t curl_accept(curl_socket_t s, void *saddr, void *saddrlen,
int line, const char *source)
{
const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ?
- "FD %s:%d accept() = %d\n" :
- (sizeof(curl_socket_t) == sizeof(long)) ?
- "FD %s:%d accept() = %ld\n" :
- "FD %s:%d accept() = %zd\n" ;
+ "FD %s:%d accept() = %d\n" :
+ (sizeof(curl_socket_t) == sizeof(long)) ?
+ "FD %s:%d accept() = %ld\n" :
+ "FD %s:%d accept() = %zd\n";
struct sockaddr *addr = (struct sockaddr *)saddr;
curl_socklen_t *addrlen = (curl_socklen_t *)saddrlen;
+
curl_socket_t sockfd = accept(s, addr, addrlen);
+
if(source && (sockfd != CURL_SOCKET_BAD))
curl_memlog(fmt, source, line, sockfd);
+
return sockfd;
}
@@ -310,10 +399,10 @@ curl_socket_t curl_accept(curl_socket_t s, void *saddr, void *saddrlen,
void curl_mark_sclose(curl_socket_t sockfd, int line, const char *source)
{
const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ?
- "FD %s:%d sclose(%d)\n" :
- (sizeof(curl_socket_t) == sizeof(long)) ?
- "FD %s:%d sclose(%ld)\n" :
- "FD %s:%d sclose(%zd)\n" ;
+ "FD %s:%d sclose(%d)\n":
+ (sizeof(curl_socket_t) == sizeof(long)) ?
+ "FD %s:%d sclose(%ld)\n":
+ "FD %s:%d sclose(%zd)\n";
if(source)
curl_memlog(fmt, source, line, sockfd);
@@ -331,9 +420,11 @@ FILE *curl_fopen(const char *file, const char *mode,
int line, const char *source)
{
FILE *res=fopen(file, mode);
+
if(source)
curl_memlog("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n",
- source, line, file, mode, res);
+ source, line, file, mode, (void *)res);
+
return res;
}
@@ -342,9 +433,11 @@ FILE *curl_fdopen(int filedes, const char *mode,
int line, const char *source)
{
FILE *res=fdopen(filedes, mode);
+
if(source)
curl_memlog("FILE %s:%d fdopen(\"%d\",\"%s\") = %p\n",
- source, line, filedes, mode, res);
+ source, line, filedes, mode, (void *)res);
+
return res;
}
#endif
@@ -356,9 +449,11 @@ int curl_fclose(FILE *file, int line, const char *source)
assert(file != NULL);
res=fclose(file);
+
if(source)
curl_memlog("FILE %s:%d fclose(%p)\n",
- source, line, file);
+ source, line, (void *)file);
+
return res;
}
diff --git a/lib/memdebug.h b/lib/memdebug.h
index 56b9f12b..cfac1e07 100644
--- a/lib/memdebug.h
+++ b/lib/memdebug.h
@@ -1,6 +1,6 @@
+#ifndef HEADER_CURL_MEMDEBUG_H
+#define HEADER_CURL_MEMDEBUG_H
#ifdef CURLDEBUG
-#ifndef _CURL_MEMDEBUG_H
-#define _CURL_MEMDEBUG_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -8,7 +8,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,18 +28,11 @@
* as well as the library. Do not mix with library internals!
*/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#include <stdio.h>
+#define CURL_MT_LOGFNAME_BUFSIZE 512
#define logfile curl_debuglogfile
@@ -47,10 +40,17 @@ extern FILE *logfile;
/* memory functions */
CURL_EXTERN void *curl_domalloc(size_t size, int line, const char *source);
-CURL_EXTERN void *curl_docalloc(size_t elements, size_t size, int line, const char *source);
-CURL_EXTERN void *curl_dorealloc(void *ptr, size_t size, int line, const char *source);
+CURL_EXTERN void *curl_docalloc(size_t elements, size_t size, int line,
+ const char *source);
+CURL_EXTERN void *curl_dorealloc(void *ptr, size_t size, int line,
+ const char *source);
CURL_EXTERN void curl_dofree(void *ptr, int line, const char *source);
CURL_EXTERN char *curl_dostrdup(const char *str, int line, const char *source);
+#if defined(WIN32) && defined(UNICODE)
+CURL_EXTERN wchar_t *curl_dowcsdup(const wchar_t *str, int line,
+ const char *source);
+#endif
+
CURL_EXTERN void curl_memdebug(const char *logname);
CURL_EXTERN void curl_memlimit(long limit);
CURL_EXTERN void curl_memlog(const char *format, ...);
@@ -64,6 +64,11 @@ CURL_EXTERN int curl_sclose(curl_socket_t sockfd,
int line , const char *source);
CURL_EXTERN curl_socket_t curl_accept(curl_socket_t s, void *a, void *alen,
int line, const char *source);
+#ifdef HAVE_SOCKETPAIR
+CURL_EXTERN int curl_socketpair(int domain, int type, int protocol,
+ curl_socket_t socket_vector[2],
+ int line , const char *source);
+#endif
/* FILE functions */
CURL_EXTERN FILE *curl_fopen(const char *file, const char *mode, int line,
@@ -84,11 +89,29 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);
#define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__)
#define free(ptr) curl_dofree(ptr, __LINE__, __FILE__)
+#ifdef WIN32
+# ifdef UNICODE
+# undef wcsdup
+# define wcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
+# undef _wcsdup
+# define _wcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
+# undef _tcsdup
+# define _tcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
+# else
+# undef _tcsdup
+# define _tcsdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__)
+# endif
+#endif
+
#define socket(domain,type,protocol)\
- curl_socket(domain,type,protocol,__LINE__,__FILE__)
+ curl_socket(domain, type, protocol, __LINE__, __FILE__)
#undef accept /* for those with accept as a macro */
#define accept(sock,addr,len)\
- curl_accept(sock,addr,len,__LINE__,__FILE__)
+ curl_accept(sock, addr, len, __LINE__, __FILE__)
+#ifdef HAVE_SOCKETPAIR
+#define socketpair(domain,type,protocol,socket_vector)\
+ curl_socketpair(domain, type, protocol, socket_vector, __LINE__, __FILE__)
+#endif
#ifdef HAVE_GETADDRINFO
#if defined(getaddrinfo) && defined(__osf__)
@@ -96,25 +119,25 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);
our macro as for other platforms. Instead, we redefine the new name they
define getaddrinfo to become! */
#define ogetaddrinfo(host,serv,hint,res) \
- curl_dogetaddrinfo(host,serv,hint,res,__LINE__,__FILE__)
+ curl_dogetaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
#else
#undef getaddrinfo
#define getaddrinfo(host,serv,hint,res) \
- curl_dogetaddrinfo(host,serv,hint,res,__LINE__,__FILE__)
+ curl_dogetaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
#endif
#endif /* HAVE_GETADDRINFO */
#ifdef HAVE_GETNAMEINFO
#undef getnameinfo
#define getnameinfo(sa,salen,host,hostlen,serv,servlen,flags) \
- curl_dogetnameinfo(sa,salen,host,hostlen,serv,servlen,flags, __LINE__, \
- __FILE__)
+ curl_dogetnameinfo(sa, salen, host, hostlen, serv, servlen, flags, \
+ __LINE__, __FILE__)
#endif /* HAVE_GETNAMEINFO */
#ifdef HAVE_FREEADDRINFO
#undef freeaddrinfo
#define freeaddrinfo(data) \
- curl_dofreeaddrinfo(data,__LINE__,__FILE__)
+ curl_dofreeaddrinfo(data, __LINE__, __FILE__)
#endif /* HAVE_FREEADDRINFO */
/* sclose is probably already defined, redefine it! */
@@ -131,9 +154,23 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);
#endif /* MEMDEBUG_NODEFINES */
-#endif /* _CURL_MEMDEBUG_H */
#endif /* CURLDEBUG */
+/*
+** Following section applies even when CURLDEBUG is not defined.
+*/
+
#ifndef fake_sclose
-#define fake_sclose(x)
+#define fake_sclose(x) Curl_nop_stmt
#endif
+
+/*
+ * Curl_safefree defined as a macro to allow MemoryTracking feature
+ * to log free() calls at same location where Curl_safefree is used.
+ * This macro also assigns NULL to given pointer when free'd.
+ */
+
+#define Curl_safefree(ptr) \
+ do { free((ptr)); (ptr) = NULL;} WHILE_FALSE
+
+#endif /* HEADER_CURL_MEMDEBUG_H */
diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl
index 3586dc46..c2080e95 100755
--- a/lib/mk-ca-bundle.pl
+++ b/lib/mk-ca-bundle.pl
@@ -6,7 +6,7 @@
# * | (__| |_| | _ <| |___
# * \___|\___/|_| \_\_____|
# *
-# * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,100 +34,347 @@ use Getopt::Std;
use MIME::Base64;
use LWP::UserAgent;
use strict;
-use vars qw($opt_b $opt_h $opt_i $opt_l $opt_n $opt_q $opt_t $opt_u $opt_v);
+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',
+ 'central' =>
+ 'http://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt',
+ 'aurora' =>
+ 'http://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt',
+ 'beta' =>
+ 'http://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt',
+ 'release' =>
+ 'http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt',
+);
+
+$opt_d = 'release';
-my $url = 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1';
# If the OpenSSL commandline is not in search path you can configure it here!
my $openssl = 'openssl';
-my $version = '1.14';
+my $version = '1.25';
+
+$opt_w = 76; # default base64 encoded lines length
+
+# default cert types to include in the output (default is to include CAs which may issue SSL server certs)
+my $default_mozilla_trust_purposes = "SERVER_AUTH";
+my $default_mozilla_trust_levels = "TRUSTED_DELEGATOR";
+$opt_p = $default_mozilla_trust_purposes . ":" . $default_mozilla_trust_levels;
+
+my @valid_mozilla_trust_purposes = (
+ "DIGITAL_SIGNATURE",
+ "NON_REPUDIATION",
+ "KEY_ENCIPHERMENT",
+ "DATA_ENCIPHERMENT",
+ "KEY_AGREEMENT",
+ "KEY_CERT_SIGN",
+ "CRL_SIGN",
+ "SERVER_AUTH",
+ "CLIENT_AUTH",
+ "CODE_SIGNING",
+ "EMAIL_PROTECTION",
+ "IPSEC_END_SYSTEM",
+ "IPSEC_TUNNEL",
+ "IPSEC_USER",
+ "TIME_STAMPING",
+ "STEP_UP_APPROVED"
+);
+
+my @valid_mozilla_trust_levels = (
+ "TRUSTED_DELEGATOR", # CAs
+ "NOT_TRUSTED", # Don't trust these certs.
+ "MUST_VERIFY_TRUST", # This explicitly tells us that it ISN'T a CA but is otherwise ok. In other words, this should tell the app to ignore any other sources that claim this is a CA.
+ "TRUSTED" # This cert is trusted, but only for itself and not for delegates (i.e. it is not a CA).
+);
+
+my $default_signature_algorithms = $opt_s = "MD5";
+
+my @valid_signature_algorithms = (
+ "MD5",
+ "SHA1",
+ "SHA256",
+ "SHA384",
+ "SHA512"
+);
+
+$0 =~ s@.*(/|\\)@@;
+$Getopt::Std::STANDARD_HELP_VERSION = 1;
+getopts('bd:fhilnp:qs:tuvw:');
+
+if(!defined($opt_d)) {
+ # to make plain "-d" use not cause warnings, and actually still work
+ $opt_d = 'release';
+}
+
+# Use predefined URL or else custom URL specified on command line.
+my $url = ( defined( $urls{$opt_d} ) ) ? $urls{$opt_d} : $opt_d;
-getopts('bhilnqtuv');
+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 "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 ("=" x 78 . "\n");
}
-$0 =~ s/\\/\//g;
-$0 = substr($0, rindex($0, '/') + 1);
-if ($opt_h) {
- printf("Usage:\t%s [-b] [-i] [-l] [-n] [-q] [-t] [-u] [-v] [<outputfile>]\n", $0);
+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";
+ exit;
+ } else { # Short Form Warning
+ print "Warning: Use of this script may pose some risk, -d risk for more details.\n";
+ }
+}
+
+sub HELP_MESSAGE() {
+ print "Usage:\t${0} [-b] [-d<certdata>] [-f] [-i] [-l] [-n] [-p<purposes:levels>] [-q] [-s<algorithms>] [-t] [-u] [-v] [-w<l>] [<outputfile>]\n";
print "\t-b\tbackup an existing version of ca-bundle.crt\n";
+ print "\t-d\tspecify Mozilla tree to pull certdata.txt or custom URL\n";
+ print "\t\t Valid names are:\n";
+ print "\t\t ", join( ", ", map { ( $_ =~ m/$opt_d/ ) ? "$_ (default)" : "$_" } sort keys %urls ), "\n";
+ print "\t-f\tforce rebuild even if certdata.txt is current\n";
print "\t-i\tprint version info about used modules\n";
print "\t-l\tprint license info about certdata.txt\n";
print "\t-n\tno download of certdata.txt (to use existing)\n";
+ print wrap("\t","\t\t", "-p\tlist of Mozilla trust purposes and levels for certificates to include in output. Takes the form of a comma separated list of purposes, a colon, and a comma separated list of levels. (default: $default_mozilla_trust_purposes:$default_mozilla_trust_levels)"), "\n";
+ print "\t\t Valid purposes are:\n";
+ print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_purposes ) ), "\n";
+ print "\t\t Valid levels are:\n";
+ print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_levels ) ), "\n";
print "\t-q\tbe really quiet (no progress output at all)\n";
+ print wrap("\t","\t\t", "-s\tcomma separated list of certificate signatures/hashes to output in plain text mode. (default: $default_signature_algorithms)\n");
+ print "\t\t Valid signature algorithms are:\n";
+ print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_signature_algorithms ) ), "\n";
print "\t-t\tinclude plain text listing of certificates\n";
print "\t-u\tunlink (remove) certdata.txt after processing\n";
print "\t-v\tbe verbose and print out processed CAs\n";
+ print "\t-w <l>\twrap base64 output lines after <l> chars (default: ${opt_w})\n";
exit;
}
+sub VERSION_MESSAGE() {
+ print "${0} version ${version} running Perl ${]} on ${^O}\n";
+}
+
+warning_message() unless ($opt_q || $url =~ m/^(ht|f)tps:/i );
+HELP_MESSAGE() if ($opt_h);
+
+sub report($@) {
+ my $output = shift;
+
+ print STDERR $output . "\n" unless $opt_q;
+}
+
+sub is_in_list($@) {
+ my $target = shift;
+
+ return defined(List::Util::first { $target eq $_ } @_);
+}
+
+# Parses $param_string as a case insensitive comma separated list with optional whitespace
+# validates that only allowed parameters are supplied
+sub parse_csv_param($$@) {
+ my $description = shift;
+ my $param_string = shift;
+ my @valid_values = @_;
+
+ my @values = map {
+ s/^\s+//; # strip leading spaces
+ s/\s+$//; # strip trailing spaces
+ uc $_ # return the modified string as upper case
+ } 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;
+
+ 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) );
+
+ 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(<C>) {
+ 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_signature_algorithms = parse_csv_param( "signature algorithm", $opt_s, @valid_signature_algorithms );
+
+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 0;
+}
+
my $crt = $ARGV[0] || 'ca-bundle.crt';
-my $txt = substr($url, rindex($url, '/') + 1);
-$txt =~ s/\?.*//;
+(my $txt = $url) =~ s@(.*/|\?.*)@@g;
-if (!$opt_n || !-e $txt) {
- print "Downloading '$txt' ...\n" if (!$opt_q);
- my $ua = new LWP::UserAgent(agent => "$0/$version");
- my $req = new HTTP::Request('GET', $url);
- my $res = $ua->request($req);
- if ($res->is_success) {
- open(TXT,">$txt") or die "Couldn't open $txt: $!";
- print TXT $res->content . "\n";
- close(TXT) or die "Couldn't close $txt: $!";
+my $stdout = $crt eq '-';
+my $resp;
+my $fetched;
+
+my $oldsha1 = oldsha1($crt);
+
+report "SHA1 of old file: $oldsha1";
+
+report "Downloading '$txt' ...";
+
+if($curl && !$opt_n) {
+ my $https = $url;
+ $https =~ s/^http:/https:/;
+ report "Get certdata over HTTPS with curl!";
+ my $quiet = $opt_q ? "-s" : "";
+ my @out = `curl -w %{response_code} $quiet -O $https`;
+ if(@out && $out[0] == 200) {
+ $fetched = 1;
} else {
- die $res->status_line;
+ report "Failed downloading HTTPS with curl, trying HTTP with LWP";
}
}
-if ($opt_b && -e $crt) {
- my $bk = 1;
- while (-e "$crt.~${bk}~") {
- $bk++;
+unless ($fetched || ($opt_n and -e $txt)) {
+ my $ua = new LWP::UserAgent(agent => "$0/$version");
+ $ua->env_proxy();
+ $resp = $ua->mirror($url, $txt);
+ if ($resp && $resp->code eq '304') {
+ report "Not modified";
+ exit 0 if -e $crt && !$opt_f;
+ } else {
+ $fetched = 1;
+ }
+ if( !$resp || $resp->code !~ /^(?:200|304)$/ ) {
+ report "Unable to download latest data: "
+ . ($resp? $resp->code . ' - ' . $resp->message : "LWP failed");
+ exit 1 if -e $crt || ! -r $txt;
}
- rename $crt, "$crt.~${bk}~";
}
+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) {
+ report "Downloaded file identical to previous run\'s source file. Exiting";
+ exit;
+}
+
+report "SHA1 of new file: $newsha1";
+
+my $currentdate = scalar gmtime($filedate);
+
my $format = $opt_t ? "plain text and " : "";
-my $currentdate = scalar gmtime() . " UTC";
-open(CRT,">$crt") or die "Couldn't open $crt: $!";
+if( $stdout ) {
+ open(CRT, '> -') or die "Couldn't open STDOUT: $!\n";
+} else {
+ open(CRT,">$crt.~") or die "Couldn't open $crt.~: $!\n";
+}
print CRT <<EOT;
##
-## $crt -- Bundle of CA Root Certificates
+## Bundle of CA Root Certificates
##
-## Converted at: ${currentdate}
+## Certificate data from Mozilla ${datesrc}: ${currentdate}
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
-## '/mozilla/security/nss/lib/ckfw/builtins/certdata.txt'
+## ${url}
##
## It contains the certificates in ${format}PEM format and therefore
## can be directly used with curl / libcurl / php_curl, or with
## an Apache+mod_ssl webserver for SSL client authentication.
## Just configure this file as the SSLCACertificateFile.
##
+## Conversion done with mk-ca-bundle.pl version $version.
+## SHA1: $newsha1
+##
EOT
-close(CRT) or die "Couldn't close $crt: $!";
-
-print "Processing '$txt' ...\n" if (!$opt_q);
+report "Processing '$txt' ...";
my $caname;
my $certnum = 0;
-open(TXT,"$txt") or die "Couldn't open $txt: $!";
+my $skipnum = 0;
+my $start_of_cert = 0;
+
+open(TXT,"$txt") or die "Couldn't open $txt: $!\n";
while (<TXT>) {
if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) {
- open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
print CRT;
print if ($opt_l);
while (<TXT>) {
@@ -135,19 +382,22 @@ while (<TXT>) {
print if ($opt_l);
last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/);
}
- close(CRT) or die "Couldn't close $crt: $!";
}
next if /^#|^\s*$/;
chomp;
if (/^CVS_ID\s+\"(.*)\"/) {
- open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
print CRT "# $1\n";
- close(CRT) or die "Couldn't close $crt: $!";
}
- if (/^CKA_LABEL\s+[A-Z0-9]+\s+\"(.*)\"/) {
+
+ # this is a match for the start of a certificate
+ if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) {
+ $start_of_cert = 1
+ }
+ if ($start_of_cert && /^CKA_LABEL UTF8 \"(.*)\"/) {
$caname = $1;
}
- if (/^CKA_VALUE MULTILINE_OCTAL/) {
+ my %trust_purposes_by_level;
+ if ($start_of_cert && /^CKA_VALUE MULTILINE_OCTAL/) {
my $data;
while (<TXT>) {
last if (/^END/);
@@ -158,29 +408,92 @@ while (<TXT>) {
$data .= chr(oct);
}
}
- my $pem = "-----BEGIN CERTIFICATE-----\n"
- . MIME::Base64::encode($data)
- . "-----END CERTIFICATE-----\n";
- open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
- print CRT "\n$caname\n";
- print CRT ("=" x length($caname) . "\n");
- if (!$opt_t) {
- print CRT $pem;
+ # scan forwards until the trust part
+ while (<TXT>) {
+ last if (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/);
+ chomp;
}
- close(CRT) or die "Couldn't close $crt: $!";
- if ($opt_t) {
- open(TMP, "|$openssl x509 -md5 -fingerprint -text -inform PEM >> $crt") or die "Couldn't open openssl pipe: $!";
- print TMP $pem;
- close(TMP) or die "Couldn't close openssl pipe: $!";
+ # now scan the trust part to determine how we should trust this cert
+ while (<TXT>) {
+ 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) ) {
+ report "Warning: Unrecognized trust purpose for cert: $caname. Trust purpose: $1. Trust Level: $2";
+ } elsif ( !is_in_list($2,@valid_mozilla_trust_levels) ) {
+ report "Warning: Unrecognized trust level for cert: $caname. Trust purpose: $1. Trust Level: $2";
+ } else {
+ push @{$trust_purposes_by_level{$2}}, $1;
+ }
+ }
+ }
+
+ if ( !should_output_cert(%trust_purposes_by_level) ) {
+ $skipnum ++;
+ } else {
+ my $encoded = MIME::Base64::encode_base64($data, '');
+ $encoded =~ s/(.{1,${opt_w}})/$1\n/g;
+ my $pem = "-----BEGIN CERTIFICATE-----\n"
+ . $encoded
+ . "-----END CERTIFICATE-----\n";
+ print CRT "\n$caname\n";
+
+ my $maxStringLength = length($caname);
+ if ($opt_t) {
+ foreach my $key (keys %trust_purposes_by_level) {
+ my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}});
+ $maxStringLength = List::Util::max( length($string), $maxStringLength );
+ print CRT $string . "\n";
+ }
+ }
+ print CRT ("=" x $maxStringLength . "\n");
+ if (!$opt_t) {
+ print CRT $pem;
+ } else {
+ my $pipe = "";
+ foreach my $hash (@included_signature_algorithms) {
+ $pipe = "|$openssl x509 -" . $hash . " -fingerprint -noout -inform PEM";
+ if (!$stdout) {
+ $pipe .= " >> $crt.~";
+ close(CRT) or die "Couldn't close $crt.~: $!";
+ }
+ open(TMP, $pipe) or die "Couldn't open openssl pipe: $!";
+ print TMP $pem;
+ close(TMP) or die "Couldn't close openssl pipe: $!";
+ if (!$stdout) {
+ open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!";
+ }
+ }
+ $pipe = "|$openssl x509 -text -inform PEM";
+ if (!$stdout) {
+ $pipe .= " >> $crt.~";
+ close(CRT) or die "Couldn't close $crt.~: $!";
+ }
+ open(TMP, $pipe) or die "Couldn't open openssl pipe: $!";
+ print TMP $pem;
+ close(TMP) or die "Couldn't close openssl pipe: $!";
+ if (!$stdout) {
+ open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!";
+ }
+ }
+ report "Parsing: $caname" if ($opt_v);
+ $certnum ++;
+ $start_of_cert = 0;
}
- print "Parsing: $caname\n" if ($opt_v);
- $certnum ++;
}
}
-close(TXT) or die "Couldn't close $txt: $!";
+close(TXT) or die "Couldn't close $txt: $!\n";
+close(CRT) or die "Couldn't close $crt.~: $!\n";
+unless( $stdout ) {
+ if ($opt_b && -e $crt) {
+ my $bk = 1;
+ while (-e "$crt.~${bk}~") {
+ $bk++;
+ }
+ rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n";
+ } elsif( -e $crt ) {
+ unlink( $crt ) or die "Failed to remove $crt: $!\n";
+ }
+ rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n";
+}
unlink $txt if ($opt_u);
-print "Done ($certnum CA certs processed).\n" if (!$opt_q);
-
-exit;
-
-
+report "Done ($certnum CA certs processed, $skipnum skipped).";
diff --git a/lib/mk-ca-bundle.vbs b/lib/mk-ca-bundle.vbs
index 5a4b4ed9..2d82e7d8 100755
--- a/lib/mk-ca-bundle.vbs
+++ b/lib/mk-ca-bundle.vbs
@@ -5,7 +5,7 @@
'* | (__| |_| | _ <| |___
'* \___|\___/|_| \_\_____|
'*
-'* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+'* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,16 +26,16 @@
'* Hacked by Guenter Knauf
'***************************************************************************
Option Explicit
-Const myVersion = "0.3.5"
-
-Const myUrl = "http://mxr.mozilla.org/firefox/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1"
+Const myVersion = "0.3.9"
+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
Const myCaBakF = TRUE ' Flag: backup existing ca-bundle certificate
Const myAskLiF = TRUE ' Flag: display certdata.txt license agreement
Const myAskTiF = TRUE ' Flag: ask to include certificate text info
+Const myWrapLe = 76 ' Default length of base64 output lines
'******************* Nothing to configure below! *******************
Dim objShell, objNetwork, objFSO, objHttp
@@ -47,7 +47,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, InstrRev(myUrl, "?") - InstrRev(myUrl, "/") - 1)
+myCdFile = Mid(myUrl, InstrRev(myUrl, "/") + 1)
myCaFile = "ca-bundle.crt"
myTmpName = InputBox("Enter output filename:", mySelf, myCaFile)
If Not (myTmpName = "") Then
@@ -59,8 +59,8 @@ objHttp.SetTimeouts 0, 5000, 10000, 10000
objHttp.Open "GET", myUrl, FALSE
objHttp.setRequestHeader "User-Agent", WScript.ScriptName & "/" & myVersion
objHttp.Send ""
-If Not (objHttp.statusText = "OK") Then
- MsgBox("Failed to download '" & myCdFile & "': " & objHttp.statusText), vbCritical, mySelf
+If Not (objHttp.Status = 200) Then
+ MsgBox("Failed to download '" & myCdFile & "': " & objHttp.Status & " - " & objHttp.StatusText), vbCritical, mySelf
WScript.Quit 1
End If
' Convert data from ResponseBody instead of using ResponseText because of UTF-8
@@ -96,8 +96,10 @@ If (myAskTiF = TRUE) Then
End If
End If
' Process the received data
-Dim myLines, myPattern, myInsideCert, myInsideLicense, myLicenseText, myNumCerts
-Dim myLabel, myOctets, myData, myPem, myRev, j
+Dim myLines, myPattern, myInsideCert, myInsideLicense, myLicenseText, myNumCerts, myNumSkipped
+Dim myLabel, myOctets, myData, myPem, myRev, myUntrusted, j
+myNumSkipped = 0
+myNumCerts = 0
myData = ""
myLines = Split(myCdData, vbLf, -1)
Set myFh = objFSO.OpenTextFile(myCaFile, 2, TRUE)
@@ -109,7 +111,7 @@ myFh.Write "##" & vbLf
myFh.Write "## This is a bundle of X.509 certificates of public Certificate Authorities" & vbLf
myFh.Write "## (CA). These were automatically extracted from Mozilla's root certificates" & vbLf
myFh.Write "## file (certdata.txt). This file can be found in the mozilla source tree:" & vbLf
-myFh.Write "## '/mozilla/security/nss/lib/ckfw/builtins/certdata.txt'" & vbLf
+myFh.Write "## '/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt'" & vbLf
myFh.Write "##" & vbLf
myFh.Write "## It contains the certificates in PEM format and therefore" & vbLf
myFh.Write "## can be directly used with curl / libcurl / php_curl, or with" & vbLf
@@ -125,36 +127,45 @@ For i = 0 To UBound(myLines)
If (myInsideCert = TRUE) Then
If InstrRev(myLines(i), "END") Then
myInsideCert = FALSE
- myFh.Write myLabel & vbLf
- myFh.Write String(Len(myLabel), "=") & vbLf
- myPem = "-----BEGIN CERTIFICATE-----" & vbLf & _
- Base64Encode(myData) & vbLf & _
- "-----END CERTIFICATE-----" & vbLf
- If (myOptTxt = FALSE) Then
- myFh.Write myPem & vbLf
+ While (i < UBound(myLines)) And Not (myLines(i) = "#")
+ i = i + 1
+ If InstrRev(myLines(i), "CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR") Then
+ myUntrusted = FALSE
+ End If
+ Wend
+ If (myUntrusted = TRUE) Then
+ myNumSkipped = myNumSkipped + 1
Else
- Dim myCmd, myRval, myTmpIn, myTmpOut
- myTmpIn = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName
- myTmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName
- Set myTmpFh = objFSO.OpenTextFile(myTmpIn, 2, TRUE)
- myTmpFh.Write myPem
- myTmpFh.Close
- myCmd = myOpenssl & " x509 -md5 -fingerprint -text -inform PEM" & _
- " -in " & myTmpIn & " -out " & myTmpOut
- myRval = objShell.Run (myCmd, 0, TRUE)
- objFSO.DeleteFile myTmpIn, TRUE
- If Not (myRval = 0) Then
- MsgBox("Failed to process PEM cert with OpenSSL commandline!"), vbCritical, mySelf
+ myFh.Write myLabel & vbLf
+ myFh.Write String(Len(myLabel), "=") & vbLf
+ myPem = "-----BEGIN CERTIFICATE-----" & vbLf & _
+ Base64Encode(myData) & vbLf & _
+ "-----END CERTIFICATE-----" & vbLf
+ If (myOptTxt = FALSE) Then
+ myFh.Write myPem & vbLf
+ Else
+ Dim myCmd, myRval, myTmpIn, myTmpOut
+ myTmpIn = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName
+ myTmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName
+ Set myTmpFh = objFSO.OpenTextFile(myTmpIn, 2, TRUE)
+ myTmpFh.Write myPem
+ myTmpFh.Close
+ myCmd = myOpenssl & " x509 -md5 -fingerprint -text -inform PEM" & _
+ " -in " & myTmpIn & " -out " & myTmpOut
+ myRval = objShell.Run (myCmd, 0, TRUE)
+ objFSO.DeleteFile myTmpIn, TRUE
+ If Not (myRval = 0) Then
+ MsgBox("Failed to process PEM cert with OpenSSL commandline!"), vbCritical, mySelf
+ objFSO.DeleteFile myTmpOut, TRUE
+ WScript.Quit 3
+ End If
+ Set myTmpFh = objFSO.OpenTextFile(myTmpOut, 1)
+ myFh.Write myTmpFh.ReadAll & vbLf
+ myTmpFh.Close
objFSO.DeleteFile myTmpOut, TRUE
- WScript.Quit 3
End If
- Set myTmpFh = objFSO.OpenTextFile(myTmpOut, 1)
- myFh.Write myTmpFh.ReadAll & vbLf
- myTmpFh.Close
- objFSO.DeleteFile myTmpOut, TRUE
+ myNumCerts = myNumCerts + 1
End If
- myData = ""
- myNumCerts = myNumCerts + 1
Else
myOctets = Split(myLines(i), "\")
For j = 1 To UBound(myOctets)
@@ -169,6 +180,8 @@ For i = 0 To UBound(myLines)
End If
If InstrRev(myLines(i), "CKA_VALUE MULTILINE_OCTAL") Then
myInsideCert = TRUE
+ myUntrusted = TRUE
+ myData = ""
End If
If InstrRev(myLines(i), "***** BEGIN LICENSE BLOCK *****") Then
myInsideLicense = TRUE
@@ -191,7 +204,8 @@ For i = 0 To UBound(myLines)
End If
Next
myFh.Close
-objShell.PopUp "Done (" & myNumCerts & " CA certs processed).", 20, mySelf, vbInformation
+objShell.PopUp "Done (" & myNumCerts & " CA certs processed, " & myNumSkipped & _
+ " untrusted skipped).", 20, mySelf, vbInformation
WScript.Quit 0
Function ConvertBinaryData(arrBytes)
@@ -224,7 +238,8 @@ End Function
Function Base64Encode(inData)
Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
- Dim cOut, sOut, I
+ Dim cOut, sOut, lWrap, I
+ lWrap = Int(myWrapLe * 3 / 4)
'For each group of 3 bytes
For I = 1 To Len(inData) Step 3
@@ -250,9 +265,9 @@ Function Base64Encode(inData)
'Add the part To OutPut string
sOut = sOut + pOut
- 'Add a new line For Each 76 chars In dest (76*3/4 = 57)
+ 'Add a new line For Each myWrapLe chars In dest
If (I < Len(inData) - 2) Then
- If (I + 2) Mod 57 = 0 Then sOut = sOut & vbLf
+ If (I + 2) Mod lWrap = 0 Then sOut = sOut & vbLf
End If
Next
Select Case Len(inData) Mod 3
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 536c0c24..23070a76 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1999 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,12 +35,7 @@
* page at http://daniel.haxx.se/trio/
*/
-#include "setup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <string.h>
+#include "curl_setup.h"
#if defined(DJGPP) && (DJGPP_MINOR < 4)
#undef _MPRINTF_REPLACE /* don't use x_was_used() here */
@@ -78,6 +73,19 @@
#endif
/*
+ * Non-ANSI integer extensions
+ */
+
+#if (defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)) || \
+ (defined(__WATCOMC__) && defined(__386__)) || \
+ (defined(__POCC__) && defined(_MSC_VER)) || \
+ (defined(_WIN32_WCE)) || \
+ (defined(__MINGW32__)) || \
+ (defined(_MSC_VER) && (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64))
+# define MP_HAVE_INT_EXTENSIONS
+#endif
+
+/*
* Max integer data types that mprintf.c is capable
*/
@@ -108,7 +116,7 @@ static const char upper_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
done++; \
else \
return done; /* return immediately on failure */ \
- } while(0)
+ } WHILE_FALSE
/* Data type to read from the arglist */
typedef enum {
@@ -124,7 +132,7 @@ typedef enum {
FORMAT_WIDTH /* For internal use */
} FormatType;
-/* convertion and display flags */
+/* conversion and display flags */
enum {
FLAGS_NEW = 0,
FLAGS_SPACE = 1<<0,
@@ -194,114 +202,29 @@ static long dprintf_DollarString(char *input, char **end)
return 0;
}
-static int dprintf_IsQualifierNoDollar(char c)
+static bool dprintf_IsQualifierNoDollar(const char *fmt)
{
- switch (c) {
+#if defined(MP_HAVE_INT_EXTENSIONS)
+ if(!strncmp(fmt, "I32", 3) || !strncmp(fmt, "I64", 3)) {
+ return TRUE;
+ }
+#endif
+
+ switch(*fmt) {
case '-': case '+': case ' ': case '#': case '.':
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
case 'h': case 'l': case 'L': case 'z': case 'q':
case '*': case 'O':
- return 1; /* true */
- default:
- return 0; /* false */
- }
-}
-
-#ifdef DPRINTF_DEBUG2
-static void dprintf_Pass1Report(va_stack_t *vto, int max)
-{
- int i;
- char buffer[256];
- int bit;
- int flags;
-
- for(i=0; i<max; i++) {
- char *type;
- switch(vto[i].type) {
- case FORMAT_UNKNOWN:
- type = "unknown";
- break;
- case FORMAT_STRING:
- type ="string";
- break;
- case FORMAT_PTR:
- type ="pointer";
- break;
- case FORMAT_INT:
- type = "int";
- break;
- case FORMAT_INTPTR:
- type = "intptr";
- break;
- case FORMAT_LONG:
- type = "long";
- break;
- case FORMAT_LONGLONG:
- type = "long long";
- break;
- case FORMAT_DOUBLE:
- type = "double";
- break;
- case FORMAT_LONGDOUBLE:
- type = "long double";
- break;
- }
-
-
- buffer[0]=0;
-
- for(bit=0; bit<31; bit++) {
- flags = vto[i].flags & (1<<bit);
-
- if(flags & FLAGS_SPACE)
- strcat(buffer, "space ");
- else if(flags & FLAGS_SHOWSIGN)
- strcat(buffer, "plus ");
- else if(flags & FLAGS_LEFT)
- strcat(buffer, "left ");
- else if(flags & FLAGS_ALT)
- strcat(buffer, "alt ");
- else if(flags & FLAGS_SHORT)
- strcat(buffer, "short ");
- else if(flags & FLAGS_LONG)
- strcat(buffer, "long ");
- else if(flags & FLAGS_LONGLONG)
- strcat(buffer, "longlong ");
- else if(flags & FLAGS_LONGDOUBLE)
- strcat(buffer, "longdouble ");
- else if(flags & FLAGS_PAD_NIL)
- strcat(buffer, "padnil ");
- else if(flags & FLAGS_UNSIGNED)
- strcat(buffer, "unsigned ");
- else if(flags & FLAGS_OCTAL)
- strcat(buffer, "octal ");
- else if(flags & FLAGS_HEX)
- strcat(buffer, "hex ");
- else if(flags & FLAGS_UPPER)
- strcat(buffer, "upper ");
- else if(flags & FLAGS_WIDTH)
- strcat(buffer, "width ");
- else if(flags & FLAGS_WIDTHPARAM)
- strcat(buffer, "widthparam ");
- else if(flags & FLAGS_PREC)
- strcat(buffer, "precision ");
- else if(flags & FLAGS_PRECPARAM)
- strcat(buffer, "precparam ");
- else if(flags & FLAGS_CHAR)
- strcat(buffer, "char ");
- else if(flags & FLAGS_FLOATE)
- strcat(buffer, "floate ");
- else if(flags & FLAGS_FLOATG)
- strcat(buffer, "floatg ");
- }
- printf("REPORT: %d. %s [%s]\n", i, type, buffer);
+#if defined(MP_HAVE_INT_EXTENSIONS)
+ case 'I':
+#endif
+ return TRUE;
+ default:
+ return FALSE;
}
-
-
}
-#endif
/******************************************************************
*
@@ -355,8 +278,20 @@ static long dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos,
/* Handle the flags */
- while(dprintf_IsQualifierNoDollar(*fmt)) {
- switch (*fmt++) {
+ while(dprintf_IsQualifierNoDollar(fmt)) {
+#if defined(MP_HAVE_INT_EXTENSIONS)
+ if(!strncmp(fmt, "I32", 3)) {
+ flags |= FLAGS_LONG;
+ fmt += 3;
+ }
+ else if(!strncmp(fmt, "I64", 3)) {
+ flags |= FLAGS_LONGLONG;
+ fmt += 3;
+ }
+ else
+#endif
+
+ switch(*fmt++) {
case ' ':
flags |= FLAGS_SPACE;
break;
@@ -396,6 +331,15 @@ static long dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos,
case 'h':
flags |= FLAGS_SHORT;
break;
+#if defined(MP_HAVE_INT_EXTENSIONS)
+ case 'I':
+#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
+ flags |= FLAGS_LONGLONG;
+#else
+ flags |= FLAGS_LONG;
+#endif
+ break;
+#endif
case 'l':
if(flags & FLAGS_LONG)
flags |= FLAGS_LONGLONG;
@@ -480,11 +424,11 @@ static long dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos,
break;
case 'x':
vto[i].type = FORMAT_INT;
- flags |= FLAGS_HEX;
+ flags |= FLAGS_HEX|FLAGS_UNSIGNED;
break;
case 'X':
vto[i].type = FORMAT_INT;
- flags |= FLAGS_HEX|FLAGS_UPPER;
+ flags |= FLAGS_HEX|FLAGS_UPPER|FLAGS_UNSIGNED;
break;
case 'c':
vto[i].type = FORMAT_INT;
@@ -542,72 +486,66 @@ static long dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos,
}
}
-#ifdef DPRINTF_DEBUG2
- dprintf_Pass1Report(vto, max_param);
-#endif
-
/* Read the arg list parameters into our data list */
- for (i=0; i<max_param; i++) {
- if((i + 1 < max_param) && (vto[i + 1].type == FORMAT_WIDTH))
- {
- /* Width/precision arguments must be read before the main argument
- * they are attached to
- */
- vto[i + 1].data.num.as_signed = (mp_intmax_t)va_arg(arglist, int);
- }
+ for(i=0; i<max_param; i++) {
+ if((i + 1 < max_param) && (vto[i + 1].type == FORMAT_WIDTH)) {
+ /* Width/precision arguments must be read before the main argument
+ * they are attached to
+ */
+ vto[i + 1].data.num.as_signed = (mp_intmax_t)va_arg(arglist, int);
+ }
- switch (vto[i].type)
- {
- case FORMAT_STRING:
- vto[i].data.str = va_arg(arglist, char *);
- break;
+ switch (vto[i].type) {
+ case FORMAT_STRING:
+ vto[i].data.str = va_arg(arglist, char *);
+ break;
- case FORMAT_INTPTR:
- case FORMAT_UNKNOWN:
- case FORMAT_PTR:
- vto[i].data.ptr = va_arg(arglist, void *);
- break;
+ case FORMAT_INTPTR:
+ case FORMAT_UNKNOWN:
+ case FORMAT_PTR:
+ vto[i].data.ptr = va_arg(arglist, void *);
+ break;
- case FORMAT_INT:
+ case FORMAT_INT:
#ifdef HAVE_LONG_LONG_TYPE
- if((vto[i].flags & FLAGS_LONGLONG) && (vto[i].flags & FLAGS_UNSIGNED))
+ if((vto[i].flags & FLAGS_LONGLONG) && (vto[i].flags & FLAGS_UNSIGNED))
+ vto[i].data.num.as_unsigned =
+ (mp_uintmax_t)va_arg(arglist, mp_uintmax_t);
+ else if(vto[i].flags & FLAGS_LONGLONG)
+ vto[i].data.num.as_signed =
+ (mp_intmax_t)va_arg(arglist, mp_intmax_t);
+ else
+#endif
+ {
+ if((vto[i].flags & FLAGS_LONG) && (vto[i].flags & FLAGS_UNSIGNED))
vto[i].data.num.as_unsigned =
- (mp_uintmax_t)va_arg(arglist, mp_uintmax_t);
- else if(vto[i].flags & FLAGS_LONGLONG)
+ (mp_uintmax_t)va_arg(arglist, unsigned long);
+ else if(vto[i].flags & FLAGS_LONG)
vto[i].data.num.as_signed =
- (mp_intmax_t)va_arg(arglist, mp_intmax_t);
+ (mp_intmax_t)va_arg(arglist, long);
+ else if(vto[i].flags & FLAGS_UNSIGNED)
+ vto[i].data.num.as_unsigned =
+ (mp_uintmax_t)va_arg(arglist, unsigned int);
else
-#endif
- {
- if((vto[i].flags & FLAGS_LONG) && (vto[i].flags & FLAGS_UNSIGNED))
- vto[i].data.num.as_unsigned =
- (mp_uintmax_t)va_arg(arglist, unsigned long);
- else if(vto[i].flags & FLAGS_LONG)
- vto[i].data.num.as_signed =
- (mp_intmax_t)va_arg(arglist, long);
- else if(vto[i].flags & FLAGS_UNSIGNED)
- vto[i].data.num.as_unsigned =
- (mp_uintmax_t)va_arg(arglist, unsigned int);
- else
- vto[i].data.num.as_signed =
- (mp_intmax_t)va_arg(arglist, int);
- }
- break;
+ vto[i].data.num.as_signed =
+ (mp_intmax_t)va_arg(arglist, int);
+ }
+ break;
- case FORMAT_DOUBLE:
- vto[i].data.dnum = va_arg(arglist, double);
- break;
+ case FORMAT_DOUBLE:
+ vto[i].data.dnum = va_arg(arglist, double);
+ break;
- case FORMAT_WIDTH:
- /* Argument has been read. Silently convert it into an integer
- * for later use
- */
- vto[i].type = FORMAT_INT;
- break;
+ case FORMAT_WIDTH:
+ /* Argument has been read. Silently convert it into an integer
+ * for later use
+ */
+ vto[i].type = FORMAT_INT;
+ break;
- default:
- break;
- }
+ default:
+ break;
+ }
}
return max_param;
@@ -692,7 +630,7 @@ static int dprintf_formatf(
continue;
}
- /* If this is a positional parameter, the position must follow imediately
+ /* If this is a positional parameter, the position must follow immediately
after the %, thus create a %<num>$ sequence */
param=dprintf_DollarString(f, &f);
@@ -739,23 +677,23 @@ static int dprintf_formatf(
OUTCHAR(' ');
break;
}
- if(p->flags & FLAGS_UNSIGNED) {
- /* Decimal unsigned integer. */
- base = 10;
- goto unsigned_number;
- }
if(p->flags & FLAGS_OCTAL) {
/* Octal unsigned integer. */
base = 8;
goto unsigned_number;
}
- if(p->flags & FLAGS_HEX) {
+ else if(p->flags & FLAGS_HEX) {
/* Hexadecimal unsigned integer. */
digits = (p->flags & FLAGS_UPPER)? upper_digits : lower_digits;
base = 16;
goto unsigned_number;
}
+ else if(p->flags & FLAGS_UNSIGNED) {
+ /* Decimal unsigned integer. */
+ base = 10;
+ goto unsigned_number;
+ }
/* Decimal integer. */
base = 10;
@@ -853,7 +791,7 @@ static int dprintf_formatf(
size_t len;
str = (char *) p->data.str;
- if( str == NULL) {
+ if(str == NULL) {
/* Write null[] if there's space. */
if(prec == -1 || prec >= (long) sizeof(null) - 1) {
str = null;
@@ -866,11 +804,11 @@ static int dprintf_formatf(
len = 0;
}
}
+ else if(prec != -1)
+ len = (size_t)prec;
else
len = strlen(str);
- if(prec != -1 && (size_t) prec < len)
- len = (size_t)prec;
width -= (long)len;
if(p->flags & FLAGS_ALT)
@@ -880,7 +818,7 @@ static int dprintf_formatf(
while(width-- > 0)
OUTCHAR(' ');
- while(len-- > 0)
+ while((len-- > 0) && *str)
OUTCHAR(*str++);
if(p->flags&FLAGS_LEFT)
while(width-- > 0)
@@ -914,7 +852,7 @@ static int dprintf_formatf(
if(p->flags & FLAGS_LEFT)
while(width-- > 0)
OUTCHAR(' ');
- for (point = strnil; *point != '\0'; ++point)
+ for(point = strnil; *point != '\0'; ++point)
OUTCHAR(*point);
if(! (p->flags & FLAGS_LEFT))
while(width-- > 0)
@@ -926,7 +864,7 @@ static int dprintf_formatf(
case FORMAT_DOUBLE:
{
char formatbuf[32]="%";
- char *fptr;
+ char *fptr = &formatbuf[1];
size_t left = sizeof(formatbuf)-strlen(formatbuf);
int len;
@@ -943,15 +881,15 @@ static int dprintf_formatf(
prec = (long)vto[p->precision].data.num.as_signed;
if(p->flags & FLAGS_LEFT)
- strcat(formatbuf, "-");
+ *fptr++ = '-';
if(p->flags & FLAGS_SHOWSIGN)
- strcat(formatbuf, "+");
+ *fptr++ = '+';
if(p->flags & FLAGS_SPACE)
- strcat(formatbuf, " ");
+ *fptr++ = ' ';
if(p->flags & FLAGS_ALT)
- strcat(formatbuf, "#");
+ *fptr++ = '#';
- fptr=&formatbuf[strlen(formatbuf)];
+ *fptr = 0;
if(width >= 0) {
/* RECURSIVE USAGE */
@@ -976,8 +914,8 @@ static int dprintf_formatf(
*fptr = 0; /* and a final zero termination */
- /* NOTE NOTE NOTE!! Not all sprintf() implementations returns number
- of output characters */
+ /* NOTE NOTE NOTE!! Not all sprintf implementations return number of
+ output characters */
(sprintf)(work, formatbuf, p->data.dnum);
for(fptr=work; *fptr; fptr++)
@@ -1202,45 +1140,3 @@ int curl_mvfprintf(FILE *whereto, const char *format, va_list ap_save)
{
return dprintf_formatf(whereto, fputc, format, ap_save);
}
-
-#ifdef DPRINTF_DEBUG
-int main()
-{
- char buffer[129];
- char *ptr;
-#ifdef HAVE_LONG_LONG_TYPE
- LONG_LONG_TYPE one=99;
- LONG_LONG_TYPE two=100;
- LONG_LONG_TYPE test = 0x1000000000LL;
- curl_mprintf("%lld %lld %lld\n", one, two, test);
-#endif
-
- curl_mprintf("%3d %5d\n", 10, 1998);
-
- ptr=curl_maprintf("test this then baby %s%s%s%s%s%s %d %d %d loser baby get a kiss in yer face now!", "", "pretty long string pretty long string pretty long string pretty long string pretty long string", "/", "/", "/", "pretty long string", 1998, 1999, 2001);
-
- puts(ptr);
-
- memset(ptr, 55, strlen(ptr)+1);
-
- free(ptr);
-
-#if 1
- curl_mprintf(buffer, "%s %s %d", "daniel", "stenberg", 19988);
- puts(buffer);
-
- curl_mfprintf(stderr, "%s %#08x\n", "dummy", 65);
-
- printf("%s %#08x\n", "dummy", 65);
- {
- double tryout = 3.14156592;
- curl_mprintf(buffer, "%.2g %G %f %e %E", tryout, tryout, tryout, tryout, tryout);
- puts(buffer);
- printf("%.2g %G %f %e %E\n", tryout, tryout, tryout, tryout, tryout);
- }
-#endif
-
- return 0;
-}
-
-#endif
diff --git a/lib/msvcproj.foot b/lib/msvcproj.foot
deleted file mode 100644
index 8ce4ca0a..00000000
--- a/lib/msvcproj.foot
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# Begin Group "Resource Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\libcurl.rc
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/lib/msvcproj.head b/lib/msvcproj.head
deleted file mode 100644
index 5714ef74..00000000
--- a/lib/msvcproj.head
+++ /dev/null
@@ -1,147 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libcurl" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=libcurl - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "libcurl.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "libcurl.mak" CFG="libcurl - Win32 LIB Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "libcurl - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libcurl - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libcurl - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "libcurl - Win32 LIB Release" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "libcurl - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "DLL-Debug"
-# PROP BASE Intermediate_Dir "DLL-Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "DLL-Debug"
-# PROP Intermediate_Dir "DLL-Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /GZ /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /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 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"DLL-Debug/libcurld.dll" /implib:"DLL-Debug/libcurld_imp.lib" /pdbtype:sept
-# ADD LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"DLL-Debug/libcurld.dll" /implib:"DLL-Debug/libcurld_imp.lib" /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "DLL-Release"
-# PROP BASE Intermediate_Dir "DLL-Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "DLL-Release"
-# PROP Intermediate_Dir "DLL-Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /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 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /pdb:none /machine:I386 /out:"DLL-Release/libcurl.dll" /implib:"DLL-Release/libcurl_imp.lib"
-# ADD LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /pdb:none /machine:I386 /out:"DLL-Release/libcurl.dll" /implib:"DLL-Release/libcurl_imp.lib"
-
-!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "LIB-Debug"
-# PROP BASE Intermediate_Dir "LIB-Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "LIB-Debug"
-# PROP Intermediate_Dir "LIB-Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /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:"LIB-Debug/libcurld.lib" /machine:I386
-# ADD LIB32 /nologo /out:"LIB-Debug/libcurld.lib" /machine:I386
-
-!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "LIB-Release"
-# PROP BASE Intermediate_Dir "LIB-Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "LIB-Release"
-# PROP Intermediate_Dir "LIB-Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /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 /out:"LIB-Release/libcurl.lib" /machine:I386
-# ADD LIB32 /nologo /out:"LIB-Release/libcurl.lib" /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "libcurl - Win32 DLL Debug"
-# Name "libcurl - Win32 DLL Release"
-# Name "libcurl - Win32 LIB Debug"
-# Name "libcurl - Win32 LIB Release"
diff --git a/lib/multi.c b/lib/multi.c
index 875e136e..b63f8bf7 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +20,7 @@
*
***************************************************************************/
-#include "setup.h"
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "curl_setup.h"
#include <curl/curl.h>
@@ -37,14 +30,19 @@
#include "connect.h"
#include "progress.h"
#include "easyif.h"
+#include "share.h"
#include "multiif.h"
#include "sendf.h"
#include "timeval.h"
#include "http.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "select.h"
+#include "warnless.h"
+#include "speedcheck.h"
+#include "conncache.h"
+#include "multihandle.h"
+#include "pipeline.h"
+#include "sigpipe.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -58,151 +56,34 @@
#define CURL_SOCKET_HASH_TABLE_SIZE 911
#endif
-struct Curl_message {
- /* the 'CURLMsg' is the part that is visible to the external user */
- struct CURLMsg extmsg;
-};
-
-/* NOTE: if you add a state here, add the name to the statename[] array as
- well!
-*/
-typedef enum {
- CURLM_STATE_INIT, /* start in this state */
- CURLM_STATE_CONNECT, /* resolve/connect has been sent off */
- CURLM_STATE_WAITRESOLVE, /* awaiting the resolve to finalize */
- CURLM_STATE_WAITCONNECT, /* awaiting the connect to finalize */
- CURLM_STATE_WAITPROXYCONNECT, /* awaiting proxy CONNECT to finalize */
- CURLM_STATE_PROTOCONNECT, /* completing the protocol-specific connect phase */
- CURLM_STATE_WAITDO, /* wait for our turn to send the request */
- CURLM_STATE_DO, /* start send off the request (part 1) */
- CURLM_STATE_DOING, /* sending off the request (part 1) */
- CURLM_STATE_DO_MORE, /* send off the request (part 2) */
- CURLM_STATE_DO_DONE, /* done sending off request */
- CURLM_STATE_WAITPERFORM, /* wait for our turn to read the response */
- CURLM_STATE_PERFORM, /* transfer data */
- CURLM_STATE_TOOFAST, /* wait because limit-rate exceeded */
- CURLM_STATE_DONE, /* post data transfer operation */
- CURLM_STATE_COMPLETED, /* operation complete */
- CURLM_STATE_MSGSENT, /* the operation complete message is sent */
- CURLM_STATE_LAST /* not a true state, never use this */
-} CURLMstate;
-
-/* we support N sockets per easy handle. Set the corresponding bit to what
- action we should wait for */
-#define MAX_SOCKSPEREASYHANDLE 5
-#define GETSOCK_READABLE (0x00ff)
-#define GETSOCK_WRITABLE (0xff00)
-
-struct closure {
- struct closure *next; /* a simple one-way list of structs */
- struct SessionHandle *easy_handle;
-};
-
-struct Curl_one_easy {
- /* first, two fields for the linked list of these */
- struct Curl_one_easy *next;
- struct Curl_one_easy *prev;
-
- struct SessionHandle *easy_handle; /* the easy handle for this unit */
- struct connectdata *easy_conn; /* the "unit's" connection */
-
- CURLMstate state; /* the handle's state */
- CURLcode result; /* previous result */
-
- struct Curl_message msg; /* A single posted message. */
-
- /* Array with the plain socket numbers this handle takes care of, in no
- particular order. Note that all sockets are added to the sockhash, where
- the state etc are also kept. This array is mostly used to detect when a
- socket is to be removed from the hash. See singlesocket(). */
- curl_socket_t sockets[MAX_SOCKSPEREASYHANDLE];
- int numsocks;
-};
+#define CURL_CONNECTION_HASH_SIZE 97
#define CURL_MULTI_HANDLE 0x000bab1e
#define GOOD_MULTI_HANDLE(x) \
- ((x)&&(((struct Curl_multi *)(x))->type == CURL_MULTI_HANDLE))
+ ((x) && (((struct Curl_multi *)(x))->type == CURL_MULTI_HANDLE))
#define GOOD_EASY_HANDLE(x) \
- (((struct SessionHandle *)(x))->magic == CURLEASY_MAGIC_NUMBER)
+ ((x) && (((struct SessionHandle *)(x))->magic == CURLEASY_MAGIC_NUMBER))
-/* This is the struct known as CURLM on the outside */
-struct Curl_multi {
- /* First a simple identifier to easier detect if a user mix up
- this multi handle with an easy handle. Set this to CURL_MULTI_HANDLE. */
- long type;
-
- /* We have a linked list with easy handles */
- struct Curl_one_easy easy;
-
- int num_easy; /* amount of entries in the linked list above. */
- int num_alive; /* amount of easy handles that are added but have not yet
- reached COMPLETE state */
-
- struct curl_llist *msglist; /* a list of messages from completed transfers */
-
- /* callback function and user data pointer for the *socket() API */
- curl_socket_callback socket_cb;
- void *socket_userp;
-
- /* Hostname cache */
- struct curl_hash *hostcache;
-
- /* timetree points to the splay-tree of time nodes to figure out expire
- times of all currently set timers */
- struct Curl_tree *timetree;
-
- /* 'sockhash' is the lookup hash for socket descriptor => easy handles (note
- the pluralis form, there can be more than one easy handle waiting on the
- same actual socket) */
- struct curl_hash *sockhash;
-
- /* Whether pipelining is enabled for this multi handle */
- bool pipelining_enabled;
-
- /* shared connection cache */
- struct conncache *connc;
- long maxconnects; /* if >0, a fixed limit of the maximum number of entries
- we're allowed to grow the connection cache to */
-
- /* list of easy handles kept around for doing nice connection closures */
- struct closure *closure;
-
- /* timer callback and user data pointer for the *socket() API */
- curl_multi_timer_callback timer_cb;
- void *timer_userp;
- struct timeval timer_lastcall; /* the fixed time for the timeout for the
- previous callback */
-};
-
-static void multi_connc_remove_handle(struct Curl_multi *multi,
- struct SessionHandle *data);
static void singlesocket(struct Curl_multi *multi,
- struct Curl_one_easy *easy);
-static CURLMcode add_closure(struct Curl_multi *multi,
- struct SessionHandle *data);
+ struct SessionHandle *data);
static int update_timer(struct Curl_multi *multi);
-static CURLcode addHandleToSendOrPendPipeline(struct SessionHandle *handle,
- struct connectdata *conn);
-static int checkPendPipeline(struct connectdata *conn);
-static void moveHandleFromSendToRecvPipeline(struct SessionHandle *handle,
- struct connectdata *conn);
-static void moveHandleFromRecvToDonePipeline(struct SessionHandle *handle,
- struct connectdata *conn);
-static bool isHandleAtHead(struct SessionHandle *handle,
- struct curl_llist *pipeline);
static CURLMcode add_next_timeout(struct timeval now,
struct Curl_multi *multi,
struct SessionHandle *d);
+static CURLMcode multi_timeout(struct Curl_multi *multi,
+ long *timeout_ms);
#ifdef DEBUGBUILD
static const char * const statename[]={
"INIT",
+ "CONNECT_PEND",
"CONNECT",
"WAITRESOLVE",
"WAITCONNECT",
"WAITPROXYCONNECT",
+ "SENDPROTOCONNECT",
"PROTOCONNECT",
"WAITDO",
"DO",
@@ -221,43 +102,56 @@ static const char * const statename[]={
static void multi_freetimeout(void *a, void *b);
/* always use this function to change state, to make debugging easier */
-static void multistate(struct Curl_one_easy *easy, CURLMstate state)
-{
+static void mstate(struct SessionHandle *data, CURLMstate state
#ifdef DEBUGBUILD
- long connectindex = -5000;
+ , int lineno
+#endif
+)
+{
+ CURLMstate oldstate = data->mstate;
+
+#if defined(DEBUGBUILD) && defined(CURL_DISABLE_VERBOSE_STRINGS)
+ (void) lineno;
#endif
- CURLMstate oldstate = easy->state;
if(oldstate == state)
/* don't bother when the new state is the same as the old state */
return;
- easy->state = state;
+ data->mstate = state;
-#ifdef DEBUGBUILD
- if(easy->easy_conn) {
- if(easy->state > CURLM_STATE_CONNECT &&
- easy->state < CURLM_STATE_COMPLETED)
- connectindex = easy->easy_conn->connectindex;
-
- infof(easy->easy_handle,
- "STATE: %s => %s handle %p; (connection #%ld) \n",
- statename[oldstate], statename[easy->state],
- (char *)easy, connectindex);
+#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
+ 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;
+
+ infof(data,
+ "STATE: %s => %s handle %p; line %d (connection #%ld) \n",
+ statename[oldstate], statename[data->mstate],
+ (void *)data, lineno, connection_id);
}
#endif
+
if(state == CURLM_STATE_COMPLETED)
/* changing to COMPLETED means there's one less easy handle 'alive' */
- easy->easy_handle->multi->num_alive--;
+ data->multi->num_alive--;
}
+#ifndef DEBUGBUILD
+#define multistate(x,y) mstate(x,y)
+#else
+#define multistate(x,y) mstate(x,y, __LINE__)
+#endif
+
/*
* We add one of these structs to the sockhash for a particular socket
*/
struct Curl_sh_entry {
struct SessionHandle *easy;
- time_t timestamp;
int action; /* what action READ/WRITE this socket waits for */
curl_socket_t socket; /* mainly to ease debugging */
void *socketp; /* settable by users with curl_multi_assign() */
@@ -284,11 +178,12 @@ 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(NULL == Curl_hash_add(sh, (char *)&s, sizeof(curl_socket_t), check)) {
+ if(!Curl_hash_add(sh, (char *)&s, sizeof(curl_socket_t), check)) {
free(check);
return NULL; /* major failure */
}
@@ -318,20 +213,19 @@ static void sh_freeentry(void *freethis)
{
struct Curl_sh_entry *p = (struct Curl_sh_entry *) freethis;
- if(p)
- free(p);
+ free(p);
}
-static size_t fd_key_compare(void*k1, size_t k1_len, void*k2, size_t k2_len)
+static size_t fd_key_compare(void *k1, size_t k1_len, void *k2, size_t k2_len)
{
(void) k1_len; (void) k2_len;
- return (*((int* ) k1)) == (*((int* ) k2));
+ return (*((int *) k1)) == (*((int *) k2));
}
-static size_t hash_fd(void* key, size_t key_length, size_t slots_num)
+static size_t hash_fd(void *key, size_t key_length, size_t slots_num)
{
- int fd = * ((int* ) key);
+ int fd = *((int *) key);
(void) key_length;
return (fd % (int)slots_num);
@@ -355,10 +249,10 @@ static size_t hash_fd(void* key, size_t key_length, size_t slots_num)
* per call."
*
*/
-static struct curl_hash *sh_init(void)
+static int sh_init(struct curl_hash *hash, int hashsize)
{
- return Curl_hash_alloc(CURL_SOCKET_HASH_TABLE_SIZE, hash_fd, fd_key_compare,
- sh_freeentry);
+ return Curl_hash_init(hash, hashsize, hash_fd, fd_key_compare,
+ sh_freeentry);
}
/*
@@ -387,8 +281,8 @@ static void multi_freeamsg(void *a, void *b)
(void)b;
}
-
-CURLM *curl_multi_init(void)
+struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */
+ int chashsize) /* connection hash */
{
struct Curl_multi *multi = calloc(1, sizeof(struct Curl_multi));
@@ -397,50 +291,63 @@ CURLM *curl_multi_init(void)
multi->type = CURL_MULTI_HANDLE;
- multi->hostcache = Curl_mk_dnscache();
- if(!multi->hostcache)
+ if(Curl_mk_dnscache(&multi->hostcache))
goto error;
- multi->sockhash = sh_init();
- if(!multi->sockhash)
+ if(sh_init(&multi->sockhash, hashsize))
goto error;
- multi->connc = Curl_mk_connc(CONNCACHE_MULTI, -1L);
- if(!multi->connc)
+ if(Curl_conncache_init(&multi->conn_cache, chashsize))
goto error;
multi->msglist = Curl_llist_alloc(multi_freeamsg);
if(!multi->msglist)
goto error;
- /* Let's make the doubly-linked list a circular list. This makes
- the linked list code simpler and allows inserting at the end
- with less work (we didn't keep a tail pointer before). */
- multi->easy.next = &multi->easy;
- multi->easy.prev = &multi->easy;
+ multi->pending = Curl_llist_alloc(multi_freeamsg);
+ if(!multi->pending)
+ goto error;
+
+ /* allocate a new easy handle to use when closing cached connections */
+ multi->closure_handle = curl_easy_init();
+ if(!multi->closure_handle)
+ goto error;
+
+ multi->closure_handle->multi = multi;
+ multi->closure_handle->state.conn_cache = &multi->conn_cache;
+
+ multi->max_pipeline_length = 5;
+ /* -1 means it not set by user, use the default value */
+ multi->maxconnects = -1;
return (CURLM *) multi;
error:
- if(multi->sockhash)
- Curl_hash_destroy(multi->sockhash);
- if(multi->hostcache)
- Curl_hash_destroy(multi->hostcache);
- if(multi->connc)
- Curl_rm_connc(multi->connc);
+
+ Curl_hash_destroy(&multi->sockhash);
+ Curl_hash_destroy(&multi->hostcache);
+ Curl_conncache_destroy(&multi->conn_cache);
+ Curl_close(multi->closure_handle);
+ multi->closure_handle = NULL;
+ Curl_llist_destroy(multi->msglist, NULL);
+ Curl_llist_destroy(multi->pending, NULL);
free(multi);
return NULL;
}
+CURLM *curl_multi_init(void)
+{
+ return Curl_multi_handle(CURL_SOCKET_HASH_TABLE_SIZE,
+ CURL_CONNECTION_HASH_SIZE);
+}
+
CURLMcode curl_multi_add_handle(CURLM *multi_handle,
CURL *easy_handle)
{
- struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
- struct closure *cl;
- struct closure *prev=NULL;
- struct SessionHandle *data = easy_handle;
+ struct curl_llist *timeoutlist;
+ struct Curl_multi *multi = (struct Curl_multi *)multi_handle;
+ struct SessionHandle *data = (struct SessionHandle *)easy_handle;
/* First, make some basic checks that the CURLM handle is a good handle */
if(!GOOD_MULTI_HANDLE(multi))
@@ -450,95 +357,77 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
if(!GOOD_EASY_HANDLE(easy_handle))
return CURLM_BAD_EASY_HANDLE;
- /* Prevent users to add the same handle more than once! */
- if(((struct SessionHandle *)easy_handle)->multi)
- /* possibly we should create a new unique error code for this condition */
- return CURLM_BAD_EASY_HANDLE;
+ /* Prevent users from adding same easy handle more than once and prevent
+ adding to more than one multi stack */
+ if(data->multi)
+ return CURLM_ADDED_ALREADY;
- data->state.timeoutlist = Curl_llist_alloc(multi_freetimeout);
- if(!data->state.timeoutlist)
+ /* Allocate and initialize timeout list for easy handle */
+ timeoutlist = Curl_llist_alloc(multi_freetimeout);
+ if(!timeoutlist)
return CURLM_OUT_OF_MEMORY;
- /* Now, time to add an easy handle to the multi stack */
- easy = calloc(1, sizeof(struct Curl_one_easy));
- if(!easy)
- return CURLM_OUT_OF_MEMORY;
+ /*
+ * No failure allowed in this function beyond this point. And no
+ * modification of easy nor multi handle allowed before this except for
+ * potential multi's connection cache growing which won't be undone in this
+ * function no matter what.
+ */
- cl = multi->closure;
- while(cl) {
- struct closure *next = cl->next;
- if(cl->easy_handle == (struct SessionHandle *)easy_handle) {
- /* remove this handle from the closure list */
- free(cl);
- if(prev)
- prev->next = next;
- else
- multi->closure = next;
- break; /* no need to continue since this handle can only be present once
- in the list */
- }
- prev = cl;
- cl = next;
- }
+ /* Make easy handle use timeout list initialized above */
+ data->state.timeoutlist = timeoutlist;
+ timeoutlist = NULL;
/* set the easy handle */
- easy->easy_handle = easy_handle;
- multistate(easy, CURLM_STATE_INIT);
-
- /* set the back pointer to one_easy to assist in removal */
- easy->easy_handle->multi_pos = easy;
-
+ multistate(data, CURLM_STATE_INIT);
+
+ if((data->set.global_dns_cache) &&
+ (data->dns.hostcachetype != HCACHE_GLOBAL)) {
+ /* global dns cache was requested but still isn't */
+ struct curl_hash *global = Curl_global_host_cache_init();
+ if(global) {
+ /* only do this if the global cache init works */
+ data->dns.hostcache = global;
+ data->dns.hostcachetype = HCACHE_GLOBAL;
+ }
+ }
/* for multi interface connections, we share DNS cache automatically if the
- easy handle's one is currently private. */
- if(easy->easy_handle->dns.hostcache &&
- (easy->easy_handle->dns.hostcachetype == HCACHE_PRIVATE)) {
- Curl_hash_destroy(easy->easy_handle->dns.hostcache);
- easy->easy_handle->dns.hostcache = NULL;
- easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
+ easy handle's one is currently not set. */
+ else if(!data->dns.hostcache ||
+ (data->dns.hostcachetype == HCACHE_NONE)) {
+ data->dns.hostcache = &multi->hostcache;
+ data->dns.hostcachetype = HCACHE_MULTI;
}
- if(!easy->easy_handle->dns.hostcache ||
- (easy->easy_handle->dns.hostcachetype == HCACHE_NONE)) {
- easy->easy_handle->dns.hostcache = multi->hostcache;
- easy->easy_handle->dns.hostcachetype = HCACHE_MULTI;
- }
+ /* Point to the multi's connection cache */
+ data->state.conn_cache = &multi->conn_cache;
- if(easy->easy_handle->state.connc) {
- if(easy->easy_handle->state.connc->type == CONNCACHE_PRIVATE) {
- /* kill old private version */
- Curl_rm_connc(easy->easy_handle->state.connc);
- /* point out our shared one instead */
- easy->easy_handle->state.connc = multi->connc;
- }
- /* else it is already using multi? */
- }
+ if(data->set.httpreq == HTTPREQ_PUT)
+ data->state.infilesize = data->set.filesize;
else
- /* point out our shared one */
- easy->easy_handle->state.connc = multi->connc;
-
- /* Make sure the type is setup correctly */
- easy->easy_handle->state.connc->type = CONNCACHE_MULTI;
-
- /* This adds the new entry at the back of the list
- to try and maintain a FIFO queue so the pipelined
- requests are in order. */
-
- /* We add this new entry last in the list. We make our 'next' point to the
- 'first' struct and our 'prev' point to the previous 'prev' */
- easy->next = &multi->easy;
- easy->prev = multi->easy.prev;
+ data->state.infilesize = data->set.postfieldsize;
- /* make 'easy' the last node in the chain */
- multi->easy.prev = easy;
+ /* This adds the new entry at the 'end' of the doubly-linked circular
+ list of SessionHandle structs to try and maintain a FIFO queue so
+ the pipelined requests are in order. */
- /* if there was a prev node, make sure its 'next' pointer links to
- the new node */
- easy->prev->next = easy;
+ /* We add this new entry last in the list. */
- Curl_easy_addmulti(easy_handle, multi_handle);
+ data->next = NULL; /* end of the line */
+ if(multi->easyp) {
+ struct SessionHandle *last = multi->easylp;
+ last->next = data;
+ data->prev = last;
+ multi->easylp = data; /* the new last node */
+ }
+ else {
+ /* first node, make prev NULL! */
+ data->prev = NULL;
+ multi->easylp = multi->easyp = data; /* both first and last */
+ }
- /* make the SessionHandle struct refer back to this struct */
- easy->easy_handle->set.one_easy = easy;
+ /* make the SessionHandle refer back to this multi handle */
+ data->multi = multi_handle;
/* Set the timeout for this handle to expire really soon so that it will
be taken care of even when this handle is added in the midst of operation
@@ -546,32 +435,11 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
sockets that time-out or have actions will be dealt with. Since this
handle has no action yet, we make sure it times out to get things to
happen. */
- Curl_expire(easy->easy_handle, 1);
+ Curl_expire(data, 1);
/* increase the node-counter */
multi->num_easy++;
- if((multi->num_easy * 4) > multi->connc->num) {
- /* We want the connection cache to have plenty room. Before we supported
- the shared cache every single easy handle had 5 entries in their cache
- by default. */
- long newmax = multi->num_easy * 4;
-
- if(multi->maxconnects && (multi->maxconnects < newmax))
- /* don't grow beyond the allowed size */
- newmax = multi->maxconnects;
-
- if(newmax > multi->connc->num) {
- /* we only do this is we can in fact grow the cache */
- CURLcode res = Curl_ch_connc(easy_handle, multi->connc, newmax);
- if(res != CURLE_OK) {
- /* FIXME: may need to do more cleanup here */
- curl_multi_remove_handle(multi_handle, easy_handle);
- return CURLM_OUT_OF_MEMORY;
- }
- }
- }
-
/* increase the alive-counter */
multi->num_alive++;
@@ -603,7 +471,7 @@ static void debug_print_sock_hash(void *p)
struct Curl_sh_entry *sh = (struct Curl_sh_entry *)p;
fprintf(stderr, " [easy %p/magic %x/socket %d]",
- (void *)sh->easy, sh->easy->magic, (int)sh->socket);
+ (void *)sh->data, sh->data->magic, (int)sh->socket);
}
#endif
@@ -611,8 +479,11 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
CURL *curl_handle)
{
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
- struct SessionHandle *data = curl_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))
@@ -622,169 +493,163 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
if(!GOOD_EASY_HANDLE(curl_handle))
return CURLM_BAD_EASY_HANDLE;
- /* pick-up from the 'curl_handle' the kept position in the list */
- easy = data->multi_pos;
-
- if(easy) {
- bool premature = (bool)(easy->state < CURLM_STATE_COMPLETED);
- bool easy_owns_conn = (bool)(easy->easy_conn &&
- (easy->easy_conn->data == easy->easy_handle));
-
- /* 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(easy->easy_conn &&
- (easy->easy_conn->send_pipe->size +
- easy->easy_conn->recv_pipe->size > 1) &&
- easy->state > CURLM_STATE_WAITDO &&
- easy->state < CURLM_STATE_COMPLETED) {
- /* If the handle is in a pipeline and has started sending off its
- request but not received its reponse yet, we need to close
- connection. */
- easy->easy_conn->bits.close = TRUE;
- /* Set connection owner so that Curl_done() closes it.
- We can sefely do this here since connection is killed. */
- easy->easy_conn->data = easy->easy_handle;
- }
+ /* Prevent users from trying to remove same easy handle more than once */
+ if(!data->multi)
+ return CURLM_OK; /* it is already removed so let's say it is fine! */
- /* The timer must be shut down before easy->multi is set to NULL,
- else the timenode will remain in the splay tree after
- curl_easy_cleanup is called. */
- Curl_expire(easy->easy_handle, 0);
+ premature = (data->mstate < CURLM_STATE_COMPLETED) ? TRUE : FALSE;
+ easy_owns_conn = (data->easy_conn && (data->easy_conn->data == easy)) ?
+ TRUE : FALSE;
- /* 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 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(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) {
- /* clear out the usage of the shared DNS cache */
- easy->easy_handle->dns.hostcache = NULL;
- easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
- }
-
- if(easy->easy_conn) {
+ /* When this handle gets removed, other handles may be able to get the
+ connection */
+ Curl_multi_process_pending_handles(multi);
+ }
- /* 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) {
+ 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;
+ }
- /* Curl_done() clears the conn->data field to lose the association
- between the easy handle and the connection
+ /* 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);
- Note that this ignores the return code simply because there's
- nothing really useful to do with it anyway! */
- (void)Curl_done(&easy->easy_conn, easy->result, premature);
+ /* 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(easy->easy_conn)
- /* the connection is still alive, set back the association to enable
- the check below to trigger TRUE */
- easy->easy_conn->data = easy->easy_handle;
- }
- else
- /* Clear connection pipelines, if Curl_done above was not called */
- Curl_getoff_all_pipelines(easy->easy_handle, easy->easy_conn);
- }
+ if(data->dns.hostcachetype == HCACHE_MULTI) {
+ /* stop using the multi handle's DNS cache */
+ data->dns.hostcache = NULL;
+ data->dns.hostcachetype = HCACHE_NONE;
+ }
- /* figure out if the easy handle is used by one or more connections in the
- cache */
- multi_connc_remove_handle(multi, easy->easy_handle);
-
- if(easy->easy_handle->state.connc->type == CONNCACHE_MULTI) {
- /* if this was using the shared connection cache we clear the pointer
- to that since we're not part of that handle anymore */
- easy->easy_handle->state.connc = NULL;
-
- /* Since we return the connection back to the communal connection pool
- we mark the last connection as inaccessible */
- easy->easy_handle->state.lastconnect = -1;
-
- /* Modify the connectindex since this handle can't point to the
- connection cache anymore.
-
- TODO: consider if this is really what we want. The connection cache
- is within the multi handle and that owns the connections so we should
- not need to touch connections like this when we just remove an easy
- handle...
- */
- if(easy->easy_conn && easy_owns_conn &&
- (easy->easy_conn->send_pipe->size +
- easy->easy_conn->recv_pipe->size == 0))
- easy->easy_conn->connectindex = -1;
- }
+ if(data->easy_conn) {
- /* change state without using multistate(), only to make singlesocket() do
- what we want */
- easy->state = CURLM_STATE_COMPLETED;
- singlesocket(multi, easy); /* to let the application know what sockets
- that vanish with this handle */
+ /* 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_easy_addmulti(easy->easy_handle, NULL); /* clear the association
- to this multi handle */
+ /* Curl_done() clears the conn->data field to lose the association
+ between the easy handle and the connection
- {
- /* make sure there's no pending message in the queue sent from this easy
- handle */
- struct curl_llist_element *e;
+ 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);
+ }
- for(e = multi->msglist->head; e; e = e->next) {
- struct Curl_message *msg = e->ptr;
+ Curl_wildcard_dtor(&data->wildcard);
- if(msg->extmsg.easy_handle == easy->easy_handle) {
- Curl_llist_remove(multi->msglist, e, NULL);
- /* there can only be one from this specific handle */
- break;
- }
- }
- }
+ /* 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;
- /* make the previous node point to our next */
- if(easy->prev)
- easy->prev->next = easy->next;
- /* make our next point to our previous node */
- if(easy->next)
- easy->next->prev = easy->prev;
+ /* 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 */
- easy->easy_handle->set.one_easy = NULL; /* detached */
+ /* Remove the association between the connection and the handle */
+ if(data->easy_conn) {
+ data->easy_conn->data = NULL;
+ data->easy_conn = NULL;
+ }
- /* Null the position in the controlling structure */
- easy->easy_handle->multi_pos = NULL;
+ data->multi = NULL; /* clear the association to this multi handle */
- /* NOTE NOTE NOTE
- We do not touch the easy handle here! */
- free(easy);
+ /* make sure there's no pending message in the queue sent from this easy
+ handle */
- multi->num_easy--; /* one less to care about now */
+ for(e = multi->msglist->head; e; e = e->next) {
+ struct Curl_message *msg = e->ptr;
- update_timer(multi);
- return CURLM_OK;
+ 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 our next point to our previous node */
+ if(data->next)
+ data->next->prev = data->prev;
else
- return CURLM_BAD_EASY_HANDLE; /* twasn't found */
+ 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 */
+
+ update_timer(multi);
+ return CURLM_OK;
}
-bool Curl_multi_canPipeline(const struct Curl_multi* multi)
+/* Return TRUE if the application asked for a certain set of pipelining */
+bool Curl_pipeline_wanted(const struct Curl_multi *multi, int bits)
{
- return multi->pipelining_enabled;
+ return (multi && (multi->pipelining & bits)) ? TRUE : FALSE;
}
void Curl_multi_handlePipeBreak(struct SessionHandle *data)
{
- struct Curl_one_easy *one_easy = data->set.one_easy;
-
- if(one_easy)
- one_easy->easy_conn = NULL;
+ data->easy_conn = NULL;
}
static int waitconnect_getsock(struct connectdata *conn,
curl_socket_t *sock,
int numsocks)
{
+ int i;
+ int s=0;
+ int rc=0;
+
+ if(!numsocks)
+ return GETSOCK_BLANK;
+
+ for(i=0; i<2; i++) {
+ if(conn->tempsock[i] != CURL_SOCKET_BAD) {
+ sock[s] = conn->tempsock[i];
+ rc |= GETSOCK_WRITESOCK(s++);
+ }
+ }
+
+ return rc;
+}
+
+static int waitproxyconnect_getsock(struct connectdata *conn,
+ curl_socket_t *sock,
+ int numsocks)
+{
if(!numsocks)
return GETSOCK_BLANK;
@@ -792,31 +657,23 @@ static int waitconnect_getsock(struct connectdata *conn,
/* when we've sent a CONNECT to a proxy, we should rather wait for the
socket to become readable to be able to get the response headers */
- if(conn->bits.tunnel_connecting)
+ if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
return GETSOCK_READSOCK(0);
return GETSOCK_WRITESOCK(0);
}
static int domore_getsock(struct connectdata *conn,
- curl_socket_t *sock,
+ curl_socket_t *socks,
int numsocks)
{
- if(!numsocks)
- return GETSOCK_BLANK;
-
- /* When in DO_MORE state, we could be either waiting for us
- to connect to a remote site, or we could wait for that site
- to connect to us. It makes a difference in the way: if we
- connect to the site we wait for the socket to become writable, if
- the site connects to us we wait for it to become readable */
- sock[0] = conn->sock[SECONDARYSOCKET];
-
- return GETSOCK_WRITESOCK(0);
+ if(conn && conn->handler->domore_getsock)
+ return conn->handler->domore_getsock(conn, socks, numsocks);
+ return GETSOCK_BLANK;
}
/* returns bitmapped flags for this handle and its sockets */
-static int multi_getsock(struct Curl_one_easy *easy,
+static int multi_getsock(struct SessionHandle *data,
curl_socket_t *socks, /* points to numsocks number
of sockets */
int numsocks)
@@ -826,16 +683,16 @@ static int multi_getsock(struct Curl_one_easy *easy,
happen when this is called from curl_multi_remove_handle() =>
singlesocket() => multi_getsock().
*/
- if(easy->easy_handle->state.pipe_broke || !easy->easy_conn)
+ if(data->state.pipe_broke || !data->easy_conn)
return 0;
- if(easy->state > CURLM_STATE_CONNECT &&
- easy->state < CURLM_STATE_COMPLETED) {
+ if(data->mstate > CURLM_STATE_CONNECT &&
+ data->mstate < CURLM_STATE_COMPLETED) {
/* Set up ownership correctly */
- easy->easy_conn->data = easy->easy_handle;
+ data->easy_conn->data = data;
}
- switch(easy->state) {
+ switch(data->mstate) {
default:
#if 0 /* switch back on these cases to get the compiler to check for all enums
to be present */
@@ -853,27 +710,31 @@ static int multi_getsock(struct Curl_one_easy *easy,
return 0;
case CURLM_STATE_WAITRESOLVE:
- return Curl_resolv_getsock(easy->easy_conn, socks, numsocks);
+ return Curl_resolver_getsock(data->easy_conn, socks, numsocks);
case CURLM_STATE_PROTOCONNECT:
- return Curl_protocol_getsock(easy->easy_conn, socks, numsocks);
+ case CURLM_STATE_SENDPROTOCONNECT:
+ return Curl_protocol_getsock(data->easy_conn, socks, numsocks);
case CURLM_STATE_DO:
case CURLM_STATE_DOING:
- return Curl_doing_getsock(easy->easy_conn, socks, numsocks);
+ return Curl_doing_getsock(data->easy_conn, socks, numsocks);
case CURLM_STATE_WAITPROXYCONNECT:
+ return waitproxyconnect_getsock(data->easy_conn, socks, numsocks);
+
case CURLM_STATE_WAITCONNECT:
- return waitconnect_getsock(easy->easy_conn, socks, numsocks);
+ return waitconnect_getsock(data->easy_conn, socks, numsocks);
case CURLM_STATE_DO_MORE:
- return domore_getsock(easy->easy_conn, socks, numsocks);
+ return domore_getsock(data->easy_conn, socks, numsocks);
case CURLM_STATE_DO_DONE: /* since is set after DO is completed, we switch
- to waiting for the same as the *PERFORM states */
+ to waiting for the same as the *PERFORM
+ states */
case CURLM_STATE_PERFORM:
case CURLM_STATE_WAITPERFORM:
- return Curl_single_getsock(easy->easy_conn, socks, numsocks);
+ return Curl_single_getsock(data->easy_conn, socks, numsocks);
}
}
@@ -886,7 +747,7 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
Some easy handles may not have connected to the remote host yet,
and then we must make sure that is done. */
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
+ struct SessionHandle *data;
int this_max_fd=-1;
curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
int bitmap;
@@ -896,18 +757,18 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
if(!GOOD_MULTI_HANDLE(multi))
return CURLM_BAD_HANDLE;
- easy=multi->easy.next;
- while(easy != &multi->easy) {
- bitmap = multi_getsock(easy, sockbunch, MAX_SOCKSPEREASYHANDLE);
+ data=multi->easyp;
+ while(data) {
+ bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE);
for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) {
curl_socket_t s = CURL_SOCKET_BAD;
- if(bitmap & GETSOCK_READSOCK(i)) {
+ if((bitmap & GETSOCK_READSOCK(i)) && VALID_SOCK((sockbunch[i]))) {
FD_SET(sockbunch[i], read_fd_set);
s = sockbunch[i];
}
- if(bitmap & GETSOCK_WRITESOCK(i)) {
+ if((bitmap & GETSOCK_WRITESOCK(i)) && VALID_SOCK((sockbunch[i]))) {
FD_SET(sockbunch[i], write_fd_set);
s = sockbunch[i];
}
@@ -920,7 +781,7 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
}
}
- easy = easy->next; /* check next handle */
+ data = data->next; /* check next handle */
}
*max_fd = this_max_fd;
@@ -928,126 +789,343 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
return CURLM_OK;
}
+CURLMcode curl_multi_wait(CURLM *multi_handle,
+ struct curl_waitfd extra_fds[],
+ unsigned int extra_nfds,
+ int timeout_ms,
+ int *ret)
+{
+ struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
+ struct SessionHandle *data;
+ curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
+ int bitmap;
+ unsigned int i;
+ unsigned int nfds = 0;
+ unsigned int curlfds;
+ struct pollfd *ufds = NULL;
+ long timeout_internal;
+
+ if(!GOOD_MULTI_HANDLE(multi))
+ return CURLM_BAD_HANDLE;
+
+ /* If the internally desired timeout is actually shorter than requested from
+ the outside, then use the shorter time! But only if the internal timer
+ is actually larger than -1! */
+ (void)multi_timeout(multi, &timeout_internal);
+ if((timeout_internal >= 0) && (timeout_internal < (long)timeout_ms))
+ timeout_ms = (int)timeout_internal;
+
+ /* Count up how many fds we have from the multi handle */
+ data=multi->easyp;
+ while(data) {
+ bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE);
+
+ for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) {
+ curl_socket_t s = CURL_SOCKET_BAD;
+
+ if(bitmap & GETSOCK_READSOCK(i)) {
+ ++nfds;
+ s = sockbunch[i];
+ }
+ if(bitmap & GETSOCK_WRITESOCK(i)) {
+ ++nfds;
+ s = sockbunch[i];
+ }
+ if(s == CURL_SOCKET_BAD) {
+ break;
+ }
+ }
+
+ data = data->next; /* check next handle */
+ }
+
+ curlfds = nfds; /* number of internal file descriptors */
+ nfds += extra_nfds; /* add the externally provided ones */
+
+ if(nfds || extra_nfds) {
+ ufds = malloc(nfds * sizeof(struct pollfd));
+ if(!ufds)
+ return CURLM_OUT_OF_MEMORY;
+ }
+ nfds = 0;
+
+ /* only do the second loop if we found descriptors in the first stage run
+ above */
+
+ if(curlfds) {
+ /* Add the curl handles to our pollfds first */
+ data=multi->easyp;
+ while(data) {
+ bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE);
+
+ for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) {
+ curl_socket_t s = CURL_SOCKET_BAD;
+
+ if(bitmap & GETSOCK_READSOCK(i)) {
+ ufds[nfds].fd = sockbunch[i];
+ ufds[nfds].events = POLLIN;
+ ++nfds;
+ s = sockbunch[i];
+ }
+ if(bitmap & GETSOCK_WRITESOCK(i)) {
+ ufds[nfds].fd = sockbunch[i];
+ ufds[nfds].events = POLLOUT;
+ ++nfds;
+ s = sockbunch[i];
+ }
+ if(s == CURL_SOCKET_BAD) {
+ break;
+ }
+ }
+
+ data = data->next; /* check next handle */
+ }
+ }
+
+ /* Add external file descriptions from poll-like struct curl_waitfd */
+ for(i = 0; i < extra_nfds; i++) {
+ ufds[nfds].fd = extra_fds[i].fd;
+ ufds[nfds].events = 0;
+ if(extra_fds[i].events & CURL_WAIT_POLLIN)
+ ufds[nfds].events |= POLLIN;
+ if(extra_fds[i].events & CURL_WAIT_POLLPRI)
+ ufds[nfds].events |= POLLPRI;
+ if(extra_fds[i].events & CURL_WAIT_POLLOUT)
+ ufds[nfds].events |= POLLOUT;
+ ++nfds;
+ }
+
+ if(nfds) {
+ /* wait... */
+ infof(data, "Curl_poll(%d ds, %d ms)\n", nfds, timeout_ms);
+ i = Curl_poll(ufds, nfds, timeout_ms);
+
+ if(i) {
+ unsigned int j;
+ /* copy revents results from the poll to the curl_multi_wait poll
+ struct, the bit values of the actual underlying poll() implementation
+ may not be the same as the ones in the public libcurl API! */
+ for(j = 0; j < extra_nfds; j++) {
+ unsigned short mask = 0;
+ unsigned r = ufds[curlfds + j].revents;
+
+ if(r & POLLIN)
+ mask |= CURL_WAIT_POLLIN;
+ if(r & POLLOUT)
+ mask |= CURL_WAIT_POLLOUT;
+ if(r & POLLPRI)
+ mask |= CURL_WAIT_POLLPRI;
+
+ extra_fds[j].revents = mask;
+ }
+ }
+ }
+ else
+ i = 0;
+
+ free(ufds);
+ if(ret)
+ *ret = i;
+ return CURLM_OK;
+}
+
+/*
+ * Curl_multi_connchanged() is called to tell that there is a connection in
+ * this multi handle that has changed state (pipelining become possible, the
+ * number of allowed streams changed or similar), and a subsequent use of this
+ * multi handle should move CONNECT_PEND handles back to CONNECT to have them
+ * retry.
+ */
+void Curl_multi_connchanged(struct Curl_multi *multi)
+{
+ multi->recheckstate = TRUE;
+}
+
+/*
+ * multi_ischanged() is called
+ *
+ * Returns TRUE/FALSE whether the state is changed to trigger a CONNECT_PEND
+ * => CONNECT action.
+ *
+ * Set 'clear' to TRUE to have it also clear the state variable.
+ */
+static bool multi_ischanged(struct Curl_multi *multi, bool clear)
+{
+ bool retval = multi->recheckstate;
+ if(clear)
+ multi->recheckstate = FALSE;
+ return retval;
+}
+
static CURLMcode multi_runsingle(struct Curl_multi *multi,
struct timeval now,
- struct Curl_one_easy *easy)
+ struct SessionHandle *data)
{
struct Curl_message *msg = NULL;
bool connected;
bool async;
bool protocol_connect = FALSE;
- bool dophase_done;
+ bool dophase_done = FALSE;
bool done = FALSE;
- CURLMcode result = CURLM_OK;
+ CURLMcode rc;
+ CURLcode result = CURLE_OK;
struct SingleRequest *k;
- struct SessionHandle *data;
long timeout_ms;
+ int control;
- if(!GOOD_EASY_HANDLE(easy->easy_handle))
+ if(!GOOD_EASY_HANDLE(data))
return CURLM_BAD_EASY_HANDLE;
- data = easy->easy_handle;
-
do {
- /* this is a 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 0x%p, url = %s\n",
- easy, data->state.path);
+ infof(data, "Pipe broke: handle %p, url = %s\n",
+ (void *)data, data->state.path);
- if(easy->state < CURLM_STATE_COMPLETED) {
+ if(data->mstate < CURLM_STATE_COMPLETED) {
/* Head back to the CONNECT state */
- multistate(easy, CURLM_STATE_CONNECT);
- result = CURLM_CALL_MULTI_PERFORM;
- easy->result = CURLE_OK;
+ multistate(data, CURLM_STATE_CONNECT);
+ rc = CURLM_CALL_MULTI_PERFORM;
+ result = CURLE_OK;
}
data->state.pipe_broke = FALSE;
- easy->easy_conn = NULL;
- break;
+ data->easy_conn = NULL;
+ continue;
+ }
+
+ if(!data->easy_conn &&
+ data->mstate > CURLM_STATE_CONNECT &&
+ data->mstate < CURLM_STATE_DONE) {
+ /* In all these states, the code will blindly access 'data->easy_conn'
+ so this is precaution that it isn't NULL. And it silences static
+ analyzers. */
+ failf(data, "In state %d with no easy_conn, bail out!\n", data->mstate);
+ return CURLM_INTERNAL_ERROR;
+ }
+
+ if(multi_ischanged(multi, TRUE)) {
+ DEBUGF(infof(data, "multi changed, check CONNECT_PEND queue!\n"));
+ Curl_multi_process_pending_handles(multi);
}
- if(easy->easy_conn && easy->state > CURLM_STATE_CONNECT &&
- easy->state < CURLM_STATE_COMPLETED)
+ if(data->easy_conn && data->mstate > CURLM_STATE_CONNECT &&
+ data->mstate < CURLM_STATE_COMPLETED)
/* Make sure we set the connection's current owner */
- easy->easy_conn->data = data;
+ data->easy_conn->data = data;
- if(easy->easy_conn && (easy->state >= CURLM_STATE_CONNECT)) {
- /* we need to wait for the connect state as only then is the
- start time stored */
+ if(data->easy_conn &&
+ (data->mstate >= CURLM_STATE_CONNECT) &&
+ (data->mstate < CURLM_STATE_COMPLETED)) {
+ /* we need to wait for the connect state as only then is the start time
+ stored, but we must not check already completed handles */
- timeout_ms = Curl_timeleft(easy->easy_conn, &now,
- easy->state <= CURLM_STATE_WAITDO);
+ timeout_ms = Curl_timeleft(data, &now,
+ (data->mstate <= CURLM_STATE_WAITDO)?
+ TRUE:FALSE);
if(timeout_ms < 0) {
/* Handle timed out */
- if(easy->state == CURLM_STATE_WAITRESOLVE)
+ if(data->mstate == CURLM_STATE_WAITRESOLVE)
failf(data, "Resolving timed out after %ld milliseconds",
Curl_tvdiff(now, data->progress.t_startsingle));
- else if(easy->state == CURLM_STATE_WAITCONNECT)
+ else if(data->mstate == CURLM_STATE_WAITCONNECT)
failf(data, "Connection timed out after %ld milliseconds",
Curl_tvdiff(now, data->progress.t_startsingle));
else {
k = &data->req;
- failf(data, "Operation timed out after %ld milliseconds with %"
- FORMAT_OFF_T " out of %" FORMAT_OFF_T " bytes received",
- Curl_tvdiff(now, data->progress.t_startsingle), k->bytecount,
- k->size);
+ if(k->size != -1) {
+ failf(data, "Operation timed out after %ld milliseconds with %"
+ CURL_FORMAT_CURL_OFF_T " out of %"
+ CURL_FORMAT_CURL_OFF_T " bytes received",
+ Curl_tvdiff(k->now, data->progress.t_startsingle),
+ k->bytecount, k->size);
+ }
+ else {
+ failf(data, "Operation timed out after %ld milliseconds with %"
+ CURL_FORMAT_CURL_OFF_T " bytes received",
+ Curl_tvdiff(now, data->progress.t_startsingle),
+ k->bytecount);
+ }
}
- easy->result = CURLE_OPERATION_TIMEDOUT;
- multistate(easy, CURLM_STATE_COMPLETED);
- break;
+
+ /* 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;
+ (void)Curl_done(&data->easy_conn, result, TRUE);
+ /* Skip the statemachine and go directly to error handling section. */
+ goto statemachine_end;
}
}
- switch(easy->state) {
+ switch(data->mstate) {
case CURLM_STATE_INIT:
/* init this transfer. */
- easy->result=Curl_pretransfer(data);
+ result=Curl_pretransfer(data);
- if(CURLE_OK == easy->result) {
+ if(!result) {
/* after init, go CONNECT */
- multistate(easy, CURLM_STATE_CONNECT);
- result = CURLM_CALL_MULTI_PERFORM;
-
- data->state.used_interface = Curl_if_multi;
+ multistate(data, CURLM_STATE_CONNECT);
+ Curl_pgrsTime(data, TIMER_STARTOP);
+ rc = CURLM_CALL_MULTI_PERFORM;
}
break;
+ case CURLM_STATE_CONNECT_PEND:
+ /* We will stay here until there is a connection available. Then
+ we try again in the CURLM_STATE_CONNECT state. */
+ break;
+
case CURLM_STATE_CONNECT:
- /* Connect. We get a connection identifier filled in. */
+ /* Connect. We want to get a connection identifier filled in. */
Curl_pgrsTime(data, TIMER_STARTSINGLE);
- easy->result = Curl_connect(data, &easy->easy_conn,
- &async, &protocol_connect);
+ result = Curl_connect(data, &data->easy_conn,
+ &async, &protocol_connect);
+ if(CURLE_NO_CONNECTION_AVAILABLE == 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;
+ break;
+ }
- if(CURLE_OK == easy->result) {
+ if(!result) {
/* Add this handle to the send or pend pipeline */
- easy->result = addHandleToSendOrPendPipeline(data,
- easy->easy_conn);
- if(CURLE_OK == easy->result) {
+ result = Curl_add_handle_to_pipeline(data, data->easy_conn);
+ if(result)
+ disconnect_conn = TRUE;
+ else {
if(async)
/* We're now waiting for an asynchronous name lookup */
- multistate(easy, CURLM_STATE_WAITRESOLVE);
+ multistate(data, CURLM_STATE_WAITRESOLVE);
else {
/* 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! */
- result = CURLM_CALL_MULTI_PERFORM;
+ rc = CURLM_CALL_MULTI_PERFORM;
if(protocol_connect)
- multistate(easy, multi->pipelining_enabled?
+ multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)?
CURLM_STATE_WAITDO:CURLM_STATE_DO);
else {
#ifndef CURL_DISABLE_HTTP
- if(easy->easy_conn->bits.tunnel_connecting)
- multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
+ if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
+ multistate(data, CURLM_STATE_WAITPROXYCONNECT);
else
#endif
- multistate(easy, CURLM_STATE_WAITCONNECT);
+ multistate(data, CURLM_STATE_WAITCONNECT);
}
}
}
@@ -1058,43 +1136,58 @@ 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 */
- easy->result = Curl_is_resolved(easy->easy_conn, &dns);
+ dns = Curl_fetch_addr(conn, conn->host.name, (int)conn->port);
if(dns) {
- /* Update sockets here. Mainly because the socket(s) may have been
- closed and the application thus needs to be told, even if it is
- likely that the same socket(s) will again be used further down. */
- singlesocket(multi, easy);
+#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(!dns)
+ 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
+ is likely that the same socket(s) will again be used further
+ down. If the name has not yet been resolved, it is likely
+ that new sockets have been opened in an attempt to contact
+ another resolver. */
+ singlesocket(multi, data);
+
+ if(dns) {
/* Perform the next step in the connection phase, and then move on
to the WAITCONNECT state */
- easy->result = Curl_async_resolved(easy->easy_conn,
- &protocol_connect);
+ result = Curl_async_resolved(data->easy_conn, &protocol_connect);
- if(CURLE_OK != easy->result)
+ if(result)
/* if Curl_async_resolved() returns failure, the connection struct
is already freed and gone */
- easy->easy_conn = NULL; /* no more connection */
+ data->easy_conn = NULL; /* no more connection */
else {
/* call again please so that we get the next socket setup */
- result = CURLM_CALL_MULTI_PERFORM;
+ rc = CURLM_CALL_MULTI_PERFORM;
if(protocol_connect)
- multistate(easy, multi->pipelining_enabled?
+ multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)?
CURLM_STATE_WAITDO:CURLM_STATE_DO);
else {
#ifndef CURL_DISABLE_HTTP
- if(easy->easy_conn->bits.tunnel_connecting)
- multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
+ if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
+ multistate(data, CURLM_STATE_WAITPROXYCONNECT);
else
#endif
- multistate(easy, CURLM_STATE_WAITCONNECT);
+ multistate(data, CURLM_STATE_WAITCONNECT);
}
}
}
- if(CURLE_OK != easy->result) {
+ if(result) {
/* failure detected */
disconnect_conn = TRUE;
break;
@@ -1105,157 +1198,133 @@ 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... */
- easy->result = Curl_http_connect(easy->easy_conn, &protocol_connect);
-
- if(easy->easy_conn->bits.proxy_connect_closed) {
- /* reset the error buffer */
- if(data->set.errorbuffer)
- data->set.errorbuffer[0] = '\0';
- data->state.errorbuf = FALSE;
-
- easy->result = CURLE_OK;
- result = CURLM_CALL_MULTI_PERFORM;
- multistate(easy, CURLM_STATE_CONNECT);
+ result = Curl_http_connect(data->easy_conn, &protocol_connect);
+
+ rc = CURLM_CALL_MULTI_PERFORM;
+ if(data->easy_conn->bits.proxy_connect_closed) {
+ /* connect back to proxy again */
+ result = CURLE_OK;
+ Curl_done(&data->easy_conn, CURLE_OK, FALSE);
+ multistate(data, CURLM_STATE_CONNECT);
}
- else if (CURLE_OK == easy->result) {
- if(!easy->easy_conn->bits.tunnel_connecting)
- multistate(easy, CURLM_STATE_WAITCONNECT);
+ else if(!result) {
+ if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_COMPLETE)
+ /* initiate protocol connect phase */
+ multistate(data, CURLM_STATE_SENDPROTOCONNECT);
}
break;
#endif
case CURLM_STATE_WAITCONNECT:
- /* awaiting a completion of an asynch connect */
- easy->result = Curl_is_connected(easy->easy_conn,
- FIRSTSOCKET,
- &connected);
- if(connected) {
- /* see if we need to do any proxy magic first once we connected */
- easy->result = Curl_connected_proxy(easy->easy_conn);
-
- if(!easy->result)
- /* if everything is still fine we do the protocol-specific connect
- setup */
- easy->result = Curl_protocol_connect(easy->easy_conn,
- &protocol_connect);
+ /* awaiting a completion of an asynch TCP connect */
+ result = Curl_is_connected(data->easy_conn, FIRSTSOCKET, &connected);
+ if(connected && !result) {
+ rc = CURLM_CALL_MULTI_PERFORM;
+ multistate(data, data->easy_conn->bits.tunnel_proxy?
+ CURLM_STATE_WAITPROXYCONNECT:
+ CURLM_STATE_SENDPROTOCONNECT);
}
-
- if(CURLE_OK != easy->result) {
+ else if(result) {
/* failure detected */
/* Just break, the cleaning up is handled all in one place */
disconnect_conn = TRUE;
break;
}
+ break;
- if(connected) {
- if(!protocol_connect) {
- /* We have a TCP connection, but 'protocol_connect' may be false
- and then we continue to 'STATE_PROTOCONNECT'. If protocol
- connect is TRUE, we move on to STATE_DO.
- BUT if we are using a proxy we must change to WAITPROXYCONNECT
- */
-#ifndef CURL_DISABLE_HTTP
- if(easy->easy_conn->bits.tunnel_connecting)
- multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
- else
-#endif
- multistate(easy, CURLM_STATE_PROTOCONNECT);
-
- }
- else
- /* after the connect has completed, go WAITDO or DO */
- multistate(easy, multi->pipelining_enabled?
- CURLM_STATE_WAITDO:CURLM_STATE_DO);
-
- result = CURLM_CALL_MULTI_PERFORM;
+ case CURLM_STATE_SENDPROTOCONNECT:
+ result = Curl_protocol_connect(data->easy_conn, &protocol_connect);
+ if(!protocol_connect)
+ /* switch to waiting state */
+ multistate(data, CURLM_STATE_PROTOCONNECT);
+ else if(!result) {
+ /* protocol connect has completed, go WAITDO or DO */
+ multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)?
+ CURLM_STATE_WAITDO:CURLM_STATE_DO);
+ rc = CURLM_CALL_MULTI_PERFORM;
+ }
+ else if(result) {
+ /* failure detected */
+ Curl_posttransfer(data);
+ Curl_done(&data->easy_conn, result, TRUE);
+ disconnect_conn = TRUE;
}
break;
case CURLM_STATE_PROTOCONNECT:
/* protocol-specific connect phase */
- easy->result = Curl_protocol_connecting(easy->easy_conn,
- &protocol_connect);
- if((easy->result == CURLE_OK) && protocol_connect) {
+ result = Curl_protocol_connecting(data->easy_conn, &protocol_connect);
+ if(!result && protocol_connect) {
/* after the connect has completed, go WAITDO or DO */
- multistate(easy, multi->pipelining_enabled?
+ multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)?
CURLM_STATE_WAITDO:CURLM_STATE_DO);
- result = CURLM_CALL_MULTI_PERFORM;
+ rc = CURLM_CALL_MULTI_PERFORM;
}
- else if(easy->result) {
+ else if(result) {
/* failure detected */
Curl_posttransfer(data);
- Curl_done(&easy->easy_conn, easy->result, FALSE);
+ Curl_done(&data->easy_conn, result, TRUE);
disconnect_conn = TRUE;
}
break;
case CURLM_STATE_WAITDO:
/* Wait for our turn to DO when we're pipelining requests */
-#ifdef DEBUGBUILD
- infof(data, "Conn %ld send pipe %zu inuse %d athead %d\n",
- easy->easy_conn->connectindex,
- easy->easy_conn->send_pipe->size,
- easy->easy_conn->writechannel_inuse?1:0,
- isHandleAtHead(data,
- easy->easy_conn->send_pipe)?1:0);
-#endif
- if(!easy->easy_conn->writechannel_inuse &&
- isHandleAtHead(data,
- easy->easy_conn->send_pipe)) {
- /* Grab the channel */
- easy->easy_conn->writechannel_inuse = TRUE;
- multistate(easy, CURLM_STATE_DO);
- result = CURLM_CALL_MULTI_PERFORM;
+ if(Curl_pipeline_checkget_write(data, data->easy_conn)) {
+ /* Grabbed the channel */
+ multistate(data, CURLM_STATE_DO);
+ rc = CURLM_CALL_MULTI_PERFORM;
}
break;
case CURLM_STATE_DO:
if(data->set.connect_only) {
/* keep connection open for application to use the socket */
- easy->easy_conn->bits.close = FALSE;
- multistate(easy, CURLM_STATE_DONE);
- easy->result = CURLE_OK;
- result = CURLM_OK;
+ connkeep(data->easy_conn, "CONNECT_ONLY");
+ multistate(data, CURLM_STATE_DONE);
+ result = CURLE_OK;
+ rc = CURLM_CALL_MULTI_PERFORM;
}
else {
/* Perform the protocol's DO action */
- easy->result = Curl_do(&easy->easy_conn,
- &dophase_done);
+ result = Curl_do(&data->easy_conn, &dophase_done);
+
+ /* When Curl_do() returns failure, data->easy_conn might be NULL! */
- if(CURLE_OK == easy->result) {
+ if(!result) {
if(!dophase_done) {
/* some steps needed for wildcard matching */
if(data->set.wildcardmatch) {
struct WildcardData *wc = &data->wildcard;
if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) {
/* skip some states if it is important */
- Curl_done(&easy->easy_conn, CURLE_OK, FALSE);
- multistate(easy, CURLM_STATE_DONE);
- result = CURLM_CALL_MULTI_PERFORM;
+ Curl_done(&data->easy_conn, CURLE_OK, FALSE);
+ multistate(data, CURLM_STATE_DONE);
+ rc = CURLM_CALL_MULTI_PERFORM;
break;
}
}
/* DO was not completed in one function call, we must continue
DOING... */
- multistate(easy, CURLM_STATE_DOING);
- result = CURLM_OK;
+ multistate(data, CURLM_STATE_DOING);
+ rc = CURLM_OK;
}
/* after DO, go DO_DONE... or DO_MORE */
- else if(easy->easy_conn->bits.do_more) {
+ else if(data->easy_conn->bits.do_more) {
/* we're supposed to do more, but we need to sit down, relax
and wait a little while first */
- multistate(easy, CURLM_STATE_DO_MORE);
- result = CURLM_OK;
+ multistate(data, CURLM_STATE_DO_MORE);
+ rc = CURLM_OK;
}
else {
/* we're done with the DO, now DO_DONE */
- multistate(easy, CURLM_STATE_DO_DONE);
- result = CURLM_CALL_MULTI_PERFORM;
+ multistate(data, CURLM_STATE_DO_DONE);
+ rc = CURLM_CALL_MULTI_PERFORM;
}
}
- else if ((CURLE_SEND_ERROR == easy->result) &&
- easy->easy_conn->bits.reuse) {
+ else if((CURLE_SEND_ERROR == result) &&
+ data->easy_conn->bits.reuse) {
/*
* In this situation, a connection that we were trying to use
* may have unexpectedly died. If possible, send the connection
@@ -1266,50 +1335,52 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
CURLcode drc;
bool retry = FALSE;
- drc = Curl_retry_request(easy->easy_conn, &newurl);
+ drc = Curl_retry_request(data->easy_conn, &newurl);
if(drc) {
/* a failure here pretty much implies an out of memory */
- easy->result = drc;
+ result = drc;
disconnect_conn = TRUE;
}
else
- retry = (bool)(newurl?TRUE:FALSE);
+ retry = (newurl)?TRUE:FALSE;
Curl_posttransfer(data);
- drc = Curl_done(&easy->easy_conn, easy->result, FALSE);
+ drc = Curl_done(&data->easy_conn, result, FALSE);
/* When set to retry the connection, we must to go back to
* the CONNECT state */
if(retry) {
- if ((drc == CURLE_OK) || (drc == CURLE_SEND_ERROR)) {
+ if(!drc || (drc == CURLE_SEND_ERROR)) {
follow = FOLLOW_RETRY;
drc = Curl_follow(data, newurl, follow);
- if(drc == CURLE_OK) {
- multistate(easy, CURLM_STATE_CONNECT);
- result = CURLM_CALL_MULTI_PERFORM;
- easy->result = CURLE_OK;
+ if(!drc) {
+ multistate(data, CURLM_STATE_CONNECT);
+ rc = CURLM_CALL_MULTI_PERFORM;
+ result = CURLE_OK;
}
else {
/* Follow failed */
- easy->result = drc;
+ result = drc;
free(newurl);
}
}
else {
/* done didn't return OK or SEND_ERROR */
- easy->result = drc;
+ 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);
- Curl_done(&easy->easy_conn, easy->result, FALSE);
+ if(data->easy_conn)
+ Curl_done(&data->easy_conn, result, FALSE);
disconnect_conn = TRUE;
}
}
@@ -1317,182 +1388,190 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
case CURLM_STATE_DOING:
/* we continue DOING until the DO phase is complete */
- easy->result = Curl_protocol_doing(easy->easy_conn,
- &dophase_done);
- if(CURLE_OK == easy->result) {
+ result = Curl_protocol_doing(data->easy_conn,
+ &dophase_done);
+ if(!result) {
if(dophase_done) {
- /* after DO, go PERFORM... or DO_MORE */
- if(easy->easy_conn->bits.do_more) {
- /* we're supposed to do more, but we need to sit down, relax
- and wait a little while first */
- multistate(easy, CURLM_STATE_DO_MORE);
- result = CURLM_OK;
- }
- else {
- /* we're done with the DO, now DO_DONE */
- multistate(easy, CURLM_STATE_DO_DONE);
- result = CURLM_CALL_MULTI_PERFORM;
- }
+ /* 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;
} /* dophase_done */
}
else {
/* failure detected */
Curl_posttransfer(data);
- Curl_done(&easy->easy_conn, easy->result, FALSE);
+ Curl_done(&data->easy_conn, result, FALSE);
disconnect_conn = TRUE;
}
break;
case CURLM_STATE_DO_MORE:
- /* Ready to do more? */
- easy->result = Curl_is_connected(easy->easy_conn,
- SECONDARYSOCKET,
- &connected);
- if(connected) {
- /*
- * When we are connected, DO MORE and then go DO_DONE
- */
- easy->result = Curl_do_more(easy->easy_conn);
-
- /* No need to remove ourselves from the send pipeline here since that
- is done for us in Curl_done() */
-
- if(CURLE_OK == easy->result) {
- multistate(easy, CURLM_STATE_DO_DONE);
- result = CURLM_CALL_MULTI_PERFORM;
- }
- else {
- /* failure detected */
- Curl_posttransfer(data);
- Curl_done(&easy->easy_conn, easy->result, FALSE);
- disconnect_conn = TRUE;
+ /*
+ * When we are connected, DO MORE and then go DO_DONE
+ */
+ 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(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;
}
+ else
+ /* stay in DO_MORE */
+ rc = CURLM_OK;
+ }
+ else {
+ /* failure detected */
+ Curl_posttransfer(data);
+ Curl_done(&data->easy_conn, result, FALSE);
+ disconnect_conn = TRUE;
}
break;
case CURLM_STATE_DO_DONE:
/* Move ourselves from the send to recv pipeline */
- moveHandleFromSendToRecvPipeline(data, easy->easy_conn);
+ Curl_move_handle_from_send_to_recv_pipe(data, data->easy_conn);
/* Check if we can move pending requests to send pipe */
- checkPendPipeline(easy->easy_conn);
- multistate(easy, CURLM_STATE_WAITPERFORM);
- result = CURLM_CALL_MULTI_PERFORM;
+ Curl_multi_process_pending_handles(multi);
+
+ /* Only perform the transfer if there's a good socket to work with.
+ Having both BAD is a signal to skip immediately to DONE */
+ if((data->easy_conn->sockfd != CURL_SOCKET_BAD) ||
+ (data->easy_conn->writesockfd != CURL_SOCKET_BAD))
+ multistate(data, CURLM_STATE_WAITPERFORM);
+ else
+ multistate(data, CURLM_STATE_DONE);
+ rc = CURLM_CALL_MULTI_PERFORM;
break;
case CURLM_STATE_WAITPERFORM:
/* Wait for our turn to PERFORM */
- if(!easy->easy_conn->readchannel_inuse &&
- isHandleAtHead(data,
- easy->easy_conn->recv_pipe)) {
- /* Grab the channel */
- easy->easy_conn->readchannel_inuse = TRUE;
- multistate(easy, CURLM_STATE_PERFORM);
- result = CURLM_CALL_MULTI_PERFORM;
+ if(Curl_pipeline_checkget_read(data, data->easy_conn)) {
+ /* Grabbed the channel */
+ multistate(data, CURLM_STATE_PERFORM);
+ rc = CURLM_CALL_MULTI_PERFORM;
}
-#ifdef DEBUGBUILD
- else {
- infof(data, "Conn %ld recv pipe %zu inuse %d athead %d\n",
- easy->easy_conn->connectindex,
- easy->easy_conn->recv_pipe->size,
- easy->easy_conn->readchannel_inuse?1:0,
- isHandleAtHead(data,
- easy->easy_conn->recv_pipe)?1:0);
- }
-#endif
break;
case CURLM_STATE_TOOFAST: /* limit-rate exceeded in either direction */
/* if both rates are within spec, resume transfer */
- if( ( (data->set.max_send_speed == 0) ||
- (data->progress.ulspeed < data->set.max_send_speed )) &&
- ( (data->set.max_recv_speed == 0) ||
- (data->progress.dlspeed < data->set.max_recv_speed) ) )
- multistate(easy, CURLM_STATE_PERFORM);
+ if(Curl_pgrsUpdate(data->easy_conn))
+ result = CURLE_ABORTED_BY_CALLBACK;
+ else
+ result = Curl_speedcheck(data, now);
+
+ if(( (data->set.max_send_speed == 0) ||
+ (data->progress.ulspeed < data->set.max_send_speed )) &&
+ ( (data->set.max_recv_speed == 0) ||
+ (data->progress.dlspeed < data->set.max_recv_speed)))
+ multistate(data, CURLM_STATE_PERFORM);
break;
case CURLM_STATE_PERFORM:
+ {
+ char *newurl = NULL;
+ bool retry = FALSE;
+
/* check if over send speed */
- if( (data->set.max_send_speed > 0) &&
- (data->progress.ulspeed > data->set.max_send_speed) ) {
+ if((data->set.max_send_speed > 0) &&
+ (data->progress.ulspeed > data->set.max_send_speed)) {
int buffersize;
- multistate(easy, CURLM_STATE_TOOFAST);
+ multistate(data, CURLM_STATE_TOOFAST);
/* calculate upload rate-limitation timeout. */
buffersize = (int)(data->set.buffer_size ?
data->set.buffer_size : BUFSIZE);
timeout_ms = Curl_sleep_time(data->set.max_send_speed,
data->progress.ulspeed, buffersize);
- Curl_expire(data, timeout_ms);
+ Curl_expire_latest(data, timeout_ms);
break;
}
/* check if over recv speed */
- if( (data->set.max_recv_speed > 0) &&
- (data->progress.dlspeed > data->set.max_recv_speed) ) {
+ if((data->set.max_recv_speed > 0) &&
+ (data->progress.dlspeed > data->set.max_recv_speed)) {
int buffersize;
- multistate(easy, CURLM_STATE_TOOFAST);
+ 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(data, timeout_ms);
+ Curl_expire_latest(data, timeout_ms);
break;
}
/* read/write data if it is ready to do so */
- easy->result = Curl_readwrite(easy->easy_conn, &done);
+ result = Curl_readwrite(data->easy_conn, data, &done);
k = &data->req;
- if(!(k->keepon & KEEP_RECV)) {
+ if(!(k->keepon & KEEP_RECV))
/* We're done receiving */
- easy->easy_conn->readchannel_inuse = FALSE;
- }
+ Curl_pipeline_leave_read(data->easy_conn);
- if(!(k->keepon & KEEP_SEND)) {
+ if(!(k->keepon & KEEP_SEND))
/* We're done sending */
- easy->easy_conn->writechannel_inuse = FALSE;
+ Curl_pipeline_leave_write(data->easy_conn);
+
+ if(done || (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.
+ */
+ CURLcode ret = Curl_retry_request(data->easy_conn, &newurl);
+ if(!ret)
+ retry = (newurl)?TRUE:FALSE;
+
+ if(retry) {
+ /* if we are to retry, set the result to OK and consider the
+ request as done */
+ result = CURLE_OK;
+ done = TRUE;
+ }
}
- if(easy->result) {
- /* The transfer phase returned error, we mark the connection to get
+ if(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
* know if the connection is in a good shape or not now. Unless it is
* a protocol which uses two "channels" like FTP, as then the error
* happened in the data connection.
*/
- if(!(easy->easy_conn->protocol & PROT_DUALCHANNEL))
- easy->easy_conn->bits.close = TRUE;
+
+ if(!(data->easy_conn->handler->flags & PROTOPT_DUAL))
+ connclose(data->easy_conn, "Transfer returned error");
Curl_posttransfer(data);
- Curl_done(&easy->easy_conn, easy->result, FALSE);
+ Curl_done(&data->easy_conn, result, FALSE);
}
- else if(TRUE == done) {
- char *newurl = NULL;
- bool retry = FALSE;
+ else if(done) {
followtype follow=FOLLOW_NONE;
- easy->result = Curl_retry_request(easy->easy_conn, &newurl);
- if(!easy->result)
- retry = (bool)(newurl?TRUE:FALSE);
-
/* call this even if the readwrite function returned error */
Curl_posttransfer(data);
- /* we're no longer receving */
- moveHandleFromRecvToDonePipeline(data,
- easy->easy_conn);
+ /* we're no longer receiving */
+ Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe);
/* expire the new receiving pipeline head */
- if(easy->easy_conn->recv_pipe->head)
- Curl_expire(easy->easy_conn->recv_pipe->head->ptr, 1);
+ if(data->easy_conn->recv_pipe->head)
+ Curl_expire_latest(data->easy_conn->recv_pipe->head->ptr, 1);
/* Check if we can move pending requests to send pipe */
- checkPendPipeline(easy->easy_conn);
+ Curl_multi_process_pending_handles(multi);
/* When we follow redirects or is set to retry the connection, we must
to go back to the CONNECT state */
@@ -1500,89 +1579,91 @@ 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 */
+ free(newurl);
newurl = data->req.newurl;
data->req.newurl = NULL;
follow = FOLLOW_REDIR;
}
else
follow = FOLLOW_RETRY;
- easy->result = Curl_done(&easy->easy_conn, CURLE_OK, FALSE);
- if(easy->result == CURLE_OK)
- easy->result = Curl_follow(data, newurl, follow);
- if(CURLE_OK == easy->result) {
- multistate(easy, CURLM_STATE_CONNECT);
- result = CURLM_CALL_MULTI_PERFORM;
+ result = Curl_done(&data->easy_conn, CURLE_OK, FALSE);
+ if(!result) {
+ result = Curl_follow(data, newurl, follow);
+ if(!result) {
+ multistate(data, CURLM_STATE_CONNECT);
+ rc = CURLM_CALL_MULTI_PERFORM;
+ newurl = NULL; /* handed over the memory ownership to
+ Curl_follow(), make sure we don't free() it
+ here */
+ }
}
- else if(newurl)
- /* Since we "took it", we are in charge of freeing this on
- failure */
- free(newurl);
}
else {
/* after the transfer is done, go DONE */
/* but first check to see if we got a location info even though we're
not following redirects */
- if (data->req.location) {
+ if(data->req.location) {
+ free(newurl);
newurl = data->req.location;
data->req.location = NULL;
- easy->result = Curl_follow(data, newurl, FOLLOW_FAKE);
- if (easy->result)
- free(newurl);
+ result = Curl_follow(data, newurl, FOLLOW_FAKE);
+ if(!result)
+ newurl = NULL; /* allocation was handed over Curl_follow() */
+ else
+ disconnect_conn = TRUE;
}
- multistate(easy, CURLM_STATE_DONE);
- result = CURLM_CALL_MULTI_PERFORM;
+ multistate(data, CURLM_STATE_DONE);
+ rc = CURLM_CALL_MULTI_PERFORM;
}
}
+ free(newurl);
break;
+ }
case CURLM_STATE_DONE:
+ /* this state is highly transient, so run another loop after this */
+ rc = CURLM_CALL_MULTI_PERFORM;
- if(easy->easy_conn) {
- /* Remove ourselves from the receive and done pipelines. Handle
- should be on one of these lists, depending upon how we got here. */
- Curl_removeHandleFromPipeline(data,
- easy->easy_conn->recv_pipe);
- Curl_removeHandleFromPipeline(data,
- easy->easy_conn->done_pipe);
- /* Check if we can move pending requests to send pipe */
- checkPendPipeline(easy->easy_conn);
+ if(data->easy_conn) {
+ CURLcode res;
- if(easy->easy_conn->bits.stream_was_rewound) {
- /* This request read past its response boundary so we quickly let
- the other requests consume those bytes since there is no
- guarantee that the socket will become active again */
- result = CURLM_CALL_MULTI_PERFORM;
- }
+ /* Remove ourselves from the receive pipeline, if we are there. */
+ Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe);
+ /* Check if we can move pending requests to send pipe */
+ Curl_multi_process_pending_handles(multi);
/* post-transfer command */
- easy->result = Curl_done(&easy->easy_conn, CURLE_OK, FALSE);
+ res = Curl_done(&data->easy_conn, result, FALSE);
+
+ /* allow a previously set error code take precedence */
+ if(!result)
+ result = res;
+
/*
* If there are other handles on the pipeline, Curl_done won't set
* easy_conn to NULL. In such a case, curl_multi_remove_handle() can
* access free'd data, if the connection is free'd and the handle
* removed before we perform the processing in CURLM_STATE_COMPLETED
*/
- if (easy->easy_conn)
- easy->easy_conn = NULL;
+ if(data->easy_conn)
+ data->easy_conn = NULL;
}
if(data->set.wildcardmatch) {
if(data->wildcard.state != CURLWC_DONE) {
/* if a wildcard is set and we are not ending -> lets start again
with CURLM_STATE_INIT */
- result = CURLM_CALL_MULTI_PERFORM;
- multistate(easy, CURLM_STATE_INIT);
+ multistate(data, CURLM_STATE_INIT);
break;
}
}
/* after we have DONE what we're supposed to do, go COMPLETED, and
it doesn't matter what the Curl_done() returned! */
- multistate(easy, CURLM_STATE_COMPLETED);
-
+ multistate(data, CURLM_STATE_COMPLETED);
break;
case CURLM_STATE_COMPLETED:
@@ -1593,20 +1674,22 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* Important: reset the conn pointer so that we don't point to memory
that could be freed anytime */
- easy->easy_conn = NULL;
+ data->easy_conn = NULL;
Curl_expire(data, 0); /* stop all timers */
break;
case CURLM_STATE_MSGSENT:
+ data->result = result;
return CURLM_OK; /* do nothing */
default:
return CURLM_INTERNAL_ERROR;
}
+ statemachine_end:
- if(CURLM_STATE_COMPLETED > easy->state) {
- if(CURLE_OK != easy->result) {
+ if(data->mstate < CURLM_STATE_COMPLETED) {
+ if(result) {
/*
* If an error was returned, and we aren't in completed state now,
* then we go to completed and consider this transfer aborted.
@@ -1617,64 +1700,74 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
data->state.pipe_broke = FALSE;
- if(easy->easy_conn) {
+ /* Check if we can move pending requests to send pipe */
+ Curl_multi_process_pending_handles(multi);
+
+ if(data->easy_conn) {
/* if this has a connection, unsubscribe from the pipelines */
- easy->easy_conn->writechannel_inuse = FALSE;
- easy->easy_conn->readchannel_inuse = FALSE;
- Curl_removeHandleFromPipeline(data,
- easy->easy_conn->send_pipe);
- Curl_removeHandleFromPipeline(data,
- easy->easy_conn->recv_pipe);
- Curl_removeHandleFromPipeline(data,
- easy->easy_conn->done_pipe);
- /* Check if we can move pending requests to send pipe */
- checkPendPipeline(easy->easy_conn);
+ Curl_pipeline_leave_write(data->easy_conn);
+ Curl_pipeline_leave_read(data->easy_conn);
+ Curl_removeHandleFromPipeline(data, data->easy_conn->send_pipe);
+ Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe);
+
+ 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);
+
+ /* 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
+ failure is detected */
+ data->easy_conn = NULL;
+ }
}
-
- if(disconnect_conn) {
- Curl_disconnect(easy->easy_conn); /* disconnect properly */
-
- /* 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
- failure is detected */
- easy->easy_conn = NULL;
+ else if(data->mstate == CURLM_STATE_CONNECT) {
+ /* Curl_connect() failed */
+ (void)Curl_posttransfer(data);
}
- multistate(easy, CURLM_STATE_COMPLETED);
+ multistate(data, CURLM_STATE_COMPLETED);
}
/* if there's still a connection to use, call the progress function */
- else if(easy->easy_conn && Curl_pgrsUpdate(easy->easy_conn))
- easy->result = CURLE_ABORTED_BY_CALLBACK;
+ 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;
+ 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;
+ }
}
- } while(0);
- if(CURLM_STATE_COMPLETED == easy->state) {
- if(data->dns.hostcachetype == HCACHE_MULTI) {
- /* clear out the usage of the shared DNS cache */
- data->dns.hostcache = NULL;
- data->dns.hostcachetype = HCACHE_NONE;
- }
+ if(CURLM_STATE_COMPLETED == data->mstate) {
+ /* now fill in the Curl_message with this info */
+ msg = &data->msg;
- /* now fill in the Curl_message with this info */
- msg = &easy->msg;
+ msg->extmsg.msg = CURLMSG_DONE;
+ msg->extmsg.easy_handle = data;
+ msg->extmsg.data.result = result;
- msg->extmsg.msg = CURLMSG_DONE;
- msg->extmsg.easy_handle = data;
- msg->extmsg.data.result = easy->result;
+ rc = multi_addmsg(multi, msg);
- result = multi_addmsg(multi, msg);
+ multistate(data, CURLM_STATE_MSGSENT);
+ }
+ } while((rc == CURLM_CALL_MULTI_PERFORM) || multi_ischanged(multi, FALSE));
- multistate(easy, CURLM_STATE_MSGSENT);
- }
+ data->result = result;
- return result;
+
+ return rc;
}
CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
{
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
+ struct SessionHandle *data;
CURLMcode returncode=CURLM_OK;
struct Curl_tree *t;
struct timeval now = Curl_tvnow();
@@ -1682,12 +1775,13 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
if(!GOOD_MULTI_HANDLE(multi))
return CURLM_BAD_HANDLE;
- easy=multi->easy.next;
- while(easy != &multi->easy) {
+ data=multi->easyp;
+ while(data) {
CURLMcode result;
- struct WildcardData *wc = &easy->easy_handle->wildcard;
+ struct WildcardData *wc = &data->wildcard;
+ SIGPIPE_VARIABLE(pipe_st);
- if(easy->easy_handle->set.wildcardmatch) {
+ if(data->set.wildcardmatch) {
if(!wc->filelist) {
CURLcode ret = Curl_wildcard_init(wc); /* init wildcard structures */
if(ret)
@@ -1695,11 +1789,11 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
}
}
- do
- result = multi_runsingle(multi, now, easy);
- while (CURLM_CALL_MULTI_PERFORM == result);
+ sigpipe_ignore(data, &pipe_st);
+ result = multi_runsingle(multi, now, data);
+ sigpipe_restore(&pipe_st);
- if(easy->easy_handle->set.wildcardmatch) {
+ if(data->set.wildcardmatch) {
/* destruct wildcard structures if it is needed */
if(wc->state == CURLWC_DONE || result)
Curl_wildcard_dtor(wc);
@@ -1708,7 +1802,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
if(result)
returncode = result;
- easy = easy->next; /* operate on next handle */
+ data = data->next; /* operate on next handle */
}
/*
@@ -1731,75 +1825,88 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
*running_handles = multi->num_alive;
- if( CURLM_OK >= returncode )
+ if(CURLM_OK >= returncode)
update_timer(multi);
return returncode;
}
+static void close_all_connections(struct Curl_multi *multi)
+{
+ struct connectdata *conn;
+
+ conn = Curl_conncache_find_first_connection(&multi->conn_cache);
+ while(conn) {
+ SIGPIPE_VARIABLE(pipe_st);
+ conn->data = multi->closure_handle;
+
+ sigpipe_ignore(conn->data, &pipe_st);
+ /* This will remove the connection from the cache */
+ (void)Curl_disconnect(conn, FALSE);
+ sigpipe_restore(&pipe_st);
+
+ conn = Curl_conncache_find_first_connection(&multi->conn_cache);
+ }
+}
+
CURLMcode curl_multi_cleanup(CURLM *multi_handle)
{
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
- struct Curl_one_easy *nexteasy;
- int i;
- struct closure *cl;
- struct closure *n;
+ struct SessionHandle *data;
+ struct SessionHandle *nextdata;
if(GOOD_MULTI_HANDLE(multi)) {
+ bool restore_pipe = FALSE;
+ SIGPIPE_VARIABLE(pipe_st);
+
multi->type = 0; /* not good anymore */
- Curl_hash_destroy(multi->hostcache);
- Curl_hash_destroy(multi->sockhash);
- multi->hostcache = NULL;
- multi->sockhash = NULL;
-
- /* go over all connections that have close actions */
- for(i=0; i< multi->connc->num; i++) {
- if(multi->connc->connects[i] &&
- multi->connc->connects[i]->protocol & PROT_CLOSEACTION) {
- Curl_disconnect(multi->connc->connects[i]);
- multi->connc->connects[i] = NULL;
- }
- }
- /* now walk through the list of handles we kept around only to be
- able to close connections "properly" */
- cl = multi->closure;
- while(cl) {
- cl->easy_handle->state.shared_conn = NULL; /* no more shared */
- if(cl->easy_handle->state.closed)
- /* close handle only if curl_easy_cleanup() already has been called
- for this easy handle */
- Curl_close(cl->easy_handle);
- n = cl->next;
- free(cl);
- cl= n;
- }
- Curl_rm_connc(multi->connc);
+ /* Close all the connections in the connection cache */
+ close_all_connections(multi);
+
+ if(multi->closure_handle) {
+ sigpipe_ignore(multi->closure_handle, &pipe_st);
+ restore_pipe = TRUE;
+
+ multi->closure_handle->dns.hostcache = &multi->hostcache;
+ Curl_hostcache_clean(multi->closure_handle,
+ multi->closure_handle->dns.hostcache);
- /* remove the pending list of messages */
+ Curl_close(multi->closure_handle);
+ }
+
+ Curl_hash_destroy(&multi->sockhash);
+ Curl_conncache_destroy(&multi->conn_cache);
Curl_llist_destroy(multi->msglist, NULL);
+ Curl_llist_destroy(multi->pending, NULL);
/* remove all easy handles */
- easy = multi->easy.next;
- while(easy != &multi->easy) {
- nexteasy=easy->next;
- if(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) {
+ data = multi->easyp;
+ while(data) {
+ nextdata=data->next;
+ if(data->dns.hostcachetype == HCACHE_MULTI) {
/* clear out the usage of the shared DNS cache */
- easy->easy_handle->dns.hostcache = NULL;
- easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
+ Curl_hostcache_clean(data, data->dns.hostcache);
+ data->dns.hostcache = NULL;
+ data->dns.hostcachetype = HCACHE_NONE;
}
/* Clear the pointer to the connection cache */
- easy->easy_handle->state.connc = NULL;
+ data->state.conn_cache = NULL;
+ data->multi = NULL; /* clear the association */
- Curl_easy_addmulti(easy->easy_handle, NULL); /* clear the association */
-
- free(easy);
- easy = nexteasy;
+ data = nextdata;
}
+ Curl_hash_destroy(&multi->hostcache);
+
+ /* Free the blacklists by setting them to NULL */
+ Curl_pipeline_set_site_blacklist(NULL, &multi->pipelining_site_bl);
+ Curl_pipeline_set_server_blacklist(NULL, &multi->pipelining_server_bl);
+
free(multi);
+ if(restore_pipe)
+ sigpipe_restore(&pipe_st);
return CURLM_OK;
}
@@ -1836,7 +1943,7 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue)
/* remove the extracted entry */
Curl_llist_remove(multi->msglist, e, NULL);
- *msgs_in_queue = (int)Curl_llist_count(multi->msglist);
+ *msgs_in_queue = curlx_uztosi(Curl_llist_count(multi->msglist));
return &msg->extmsg;
}
@@ -1850,7 +1957,7 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue)
* call the callback accordingly.
*/
static void singlesocket(struct Curl_multi *multi,
- struct Curl_one_easy *easy)
+ struct SessionHandle *data)
{
curl_socket_t socks[MAX_SOCKSPEREASYHANDLE];
int i;
@@ -1858,7 +1965,6 @@ static void singlesocket(struct Curl_multi *multi,
curl_socket_t s;
int num;
unsigned int curraction;
- struct Curl_one_easy *easy_by_hash;
bool remove_sock_from_hash;
for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++)
@@ -1866,7 +1972,7 @@ static void singlesocket(struct Curl_multi *multi,
/* Fill in the 'current' struct with the state as it is now: what sockets to
supervise and for what actions */
- curraction = multi_getsock(easy, socks, MAX_SOCKSPEREASYHANDLE);
+ curraction = multi_getsock(data, socks, MAX_SOCKSPEREASYHANDLE);
/* We have 0 .. N sockets already and we get to know about the 0 .. M
sockets we should have from now on. Detect the differences, remove no
@@ -1881,7 +1987,7 @@ static void singlesocket(struct Curl_multi *multi,
s = socks[i];
/* get it from the hash */
- entry = Curl_hash_pick(multi->sockhash, (char *)&s, sizeof(s));
+ entry = Curl_hash_pick(&multi->sockhash, (char *)&s, sizeof(s));
if(curraction & GETSOCK_READSOCK(i))
action |= CURL_POLL_IN;
@@ -1896,18 +2002,19 @@ static void singlesocket(struct Curl_multi *multi,
}
else {
/* this is a socket we didn't have before, add it! */
- entry = sh_addentry(multi->sockhash, s, easy->easy_handle);
+ entry = sh_addentry(&multi->sockhash, s, data);
if(!entry)
/* fatal */
return;
}
/* we know (entry != NULL) at this point, see the logic above */
- multi->socket_cb(easy->easy_handle,
- s,
- action,
- multi->socket_userp,
- entry->socketp);
+ if(multi->socket_cb)
+ multi->socket_cb(data,
+ s,
+ action,
+ multi->socket_userp,
+ entry->socketp);
entry->action = action; /* store the current action state */
}
@@ -1916,9 +2023,9 @@ static void singlesocket(struct Curl_multi *multi,
/* when we've walked over all the sockets we should have right now, we must
make sure to detect sockets that are removed */
- for(i=0; i< easy->numsocks; i++) {
+ for(i=0; i< data->numsocks; i++) {
int j;
- s = easy->sockets[i];
+ s = data->sockets[i];
for(j=0; j<num; j++) {
if(s == socks[j]) {
/* this is still supervised */
@@ -1931,39 +2038,36 @@ static void singlesocket(struct Curl_multi *multi,
/* this socket has been removed. Tell the app to remove it */
remove_sock_from_hash = TRUE;
- entry = Curl_hash_pick(multi->sockhash, (char *)&s, sizeof(s));
+ entry = Curl_hash_pick(&multi->sockhash, (char *)&s, sizeof(s));
if(entry) {
/* check if the socket to be removed serves a connection which has
other easy-s in a pipeline. In this case the socket should not be
removed. */
- struct connectdata *easy_conn;
-
- easy_by_hash = entry->easy->multi_pos;
- easy_conn = easy_by_hash->easy_conn;
+ struct connectdata *easy_conn = data->easy_conn;
if(easy_conn) {
- if (easy_conn->recv_pipe && easy_conn->recv_pipe->size > 1) {
+ if(easy_conn->recv_pipe && easy_conn->recv_pipe->size > 1) {
/* the handle should not be removed from the pipe yet */
remove_sock_from_hash = FALSE;
/* Update the sockhash entry to instead point to the next in line
for the recv_pipe, or the first (in case this particular easy
isn't already) */
- if (entry->easy == easy->easy_handle) {
- if (isHandleAtHead(easy->easy_handle, easy_conn->recv_pipe))
+ if(entry->easy == data) {
+ if(Curl_recvpipe_head(data, easy_conn))
entry->easy = easy_conn->recv_pipe->head->next->ptr;
else
entry->easy = easy_conn->recv_pipe->head->ptr;
}
}
- if (easy_conn->send_pipe && easy_conn->send_pipe->size > 1) {
+ if(easy_conn->send_pipe && easy_conn->send_pipe->size > 1) {
/* the handle should not be removed from the pipe yet */
remove_sock_from_hash = FALSE;
/* Update the sockhash entry to instead point to the next in line
for the send_pipe, or the first (in case this particular easy
isn't already) */
- if (entry->easy == easy->easy_handle) {
- if (isHandleAtHead(easy->easy_handle, easy_conn->send_pipe))
+ if(entry->easy == data) {
+ if(Curl_sendpipe_head(data, easy_conn))
entry->easy = easy_conn->send_pipe->head->next->ptr;
else
entry->easy = easy_conn->send_pipe->head->ptr;
@@ -1981,23 +2085,58 @@ static void singlesocket(struct Curl_multi *multi,
either since it never got to know about it */
remove_sock_from_hash = FALSE;
- if (remove_sock_from_hash) {
- multi->socket_cb(easy->easy_handle,
- s,
- CURL_POLL_REMOVE,
- multi->socket_userp,
- entry ? entry->socketp : NULL);
- sh_delentry(multi->sockhash, s);
+ if(remove_sock_from_hash) {
+ /* in this case 'entry' is always non-NULL */
+ if(multi->socket_cb)
+ multi->socket_cb(data,
+ s,
+ CURL_POLL_REMOVE,
+ multi->socket_userp,
+ entry->socketp);
+ sh_delentry(&multi->sockhash, s);
}
}
}
- memcpy(easy->sockets, socks, num*sizeof(curl_socket_t));
- easy->numsocks = num;
+ memcpy(data->sockets, socks, num*sizeof(curl_socket_t));
+ data->numsocks = num;
}
/*
+ * 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
+ * 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.
+ */
+
+void Curl_multi_closed(struct connectdata *conn, curl_socket_t s)
+{
+ struct Curl_multi *multi = conn->data->multi;
+ if(multi) {
+ /* this is set if this connection is part of a handle that is added to
+ a multi handle, and only then this is necessary */
+ struct Curl_sh_entry *entry =
+ Curl_hash_pick(&multi->sockhash, (char *)&s, sizeof(s));
+
+ if(entry) {
+ if(multi->socket_cb)
+ multi->socket_cb(conn->data, s, CURL_POLL_REMOVE,
+ multi->socket_userp,
+ entry->socketp);
+
+ /* now remove it from the socket hash */
+ sh_delentry(&multi->sockhash, s);
+ }
+ }
+}
+
+
+
+/*
* add_next_timeout()
*
* Each SessionHandle has a list of timeouts. The add_next_timeout() is called
@@ -2031,14 +2170,14 @@ static CURLMcode add_next_timeout(struct timeval now,
break;
e = n;
}
- if(!list->size) {
+ e = list->head;
+ if(!e) {
/* clear the expire times within the handles that we remove from the
splay tree */
tv->tv_sec = 0;
tv->tv_usec = 0;
}
else {
- e = list->head;
/* copy the first entry to 'tv' */
memcpy(tv, e->ptr, sizeof(*tv));
@@ -2052,7 +2191,6 @@ static CURLMcode add_next_timeout(struct timeval now,
return CURLM_OK;
}
-
static CURLMcode multi_socket(struct Curl_multi *multi,
bool checkall,
curl_socket_t s,
@@ -2065,16 +2203,17 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
struct timeval now = Curl_tvnow();
if(checkall) {
- struct Curl_one_easy *easyp;
/* *perform() deals with running_handles on its own */
result = curl_multi_perform(multi, running_handles);
/* walk through each easy handle and do the socket state change magic
and callbacks */
- easyp=multi->easy.next;
- while(easyp != &multi->easy) {
- singlesocket(multi, easyp);
- easyp = easyp->next;
+ if(result != CURLM_BAD_HANDLE) {
+ data=multi->easyp;
+ while(data) {
+ singlesocket(multi, data);
+ data = data->next;
+ }
}
/* or should we fall-through and do the timer-based stuff? */
@@ -2083,7 +2222,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
else if(s != CURL_SOCKET_TIMEOUT) {
struct Curl_sh_entry *entry =
- Curl_hash_pick(multi->sockhash, (char *)&s, sizeof(s));
+ Curl_hash_pick(&multi->sockhash, (char *)&s, sizeof(s));
if(!entry)
/* Unmatched socket, we can't act on it but we ignore this fact. In
@@ -2093,6 +2232,8 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
and just move on. */
;
else {
+ SIGPIPE_VARIABLE(pipe_st);
+
data = entry->easy;
if(data->magic != CURLEASY_MAGIC_NUMBER)
@@ -2102,31 +2243,35 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
/* If the pipeline is enabled, take the handle which is in the head of
the pipeline. If we should write into the socket, take the send_pipe
head. If we should read from the socket, take the recv_pipe head. */
- if(data->set.one_easy->easy_conn) {
- if ((ev_bitmask & CURL_POLL_OUT) &&
- data->set.one_easy->easy_conn->send_pipe &&
- data->set.one_easy->easy_conn->send_pipe->head)
- data = data->set.one_easy->easy_conn->send_pipe->head->ptr;
- else if ((ev_bitmask & CURL_POLL_IN) &&
- data->set.one_easy->easy_conn->recv_pipe &&
- data->set.one_easy->easy_conn->recv_pipe->head)
- data = data->set.one_easy->easy_conn->recv_pipe->head->ptr;
+ if(data->easy_conn) {
+ if((ev_bitmask & CURL_POLL_OUT) &&
+ data->easy_conn->send_pipe &&
+ data->easy_conn->send_pipe->head)
+ data = data->easy_conn->send_pipe->head->ptr;
+ else if((ev_bitmask & CURL_POLL_IN) &&
+ data->easy_conn->recv_pipe &&
+ data->easy_conn->recv_pipe->head)
+ data = data->easy_conn->recv_pipe->head->ptr;
}
- if(data->set.one_easy->easy_conn) /* set socket event bitmask */
- data->set.one_easy->easy_conn->cselect_bits = ev_bitmask;
+ if(data->easy_conn &&
+ !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK))
+ /* set socket event bitmask if they're not locked */
+ data->easy_conn->cselect_bits = ev_bitmask;
- do
- result = multi_runsingle(multi, now, data->set.one_easy);
- while (CURLM_CALL_MULTI_PERFORM == result);
+ sigpipe_ignore(data, &pipe_st);
+ result = multi_runsingle(multi, now, data);
+ sigpipe_restore(&pipe_st);
- if(data->set.one_easy->easy_conn)
- data->set.one_easy->easy_conn->cselect_bits = 0;
+ if(data->easy_conn &&
+ !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK))
+ /* clear the bitmask only if not locked */
+ data->easy_conn->cselect_bits = 0;
if(CURLM_OK >= result)
/* get the socket(s) and check if the state has been changed since
last */
- singlesocket(multi, data->set.one_easy);
+ singlesocket(multi, data);
/* Now we fall-through and do the timer-based stuff, since we don't want
to force the user to have to deal with timeouts as long as at least
@@ -2134,14 +2279,16 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
data = NULL; /* set data to NULL again to avoid calling
multi_runsingle() in case there's no need to */
+ now = Curl_tvnow(); /* get a newer time since the multi_runsingle() loop
+ may have taken some time */
}
}
-
- now.tv_usec += 40000; /* compensate for bad precision timers that might've
- triggered too early */
- if(now.tv_usec > 1000000) {
- now.tv_sec++;
- now.tv_usec -= 1000000;
+ else {
+ /* Asked to run due to time-out. Clear the 'lastcall' variable to force
+ update_timer() to trigger a callback to the app again even if the same
+ timeout is still the one to run after this call. That handles the case
+ when the application asks libcurl to run the timeout prematurely. */
+ memset(&multi->timer_lastcall, 0, sizeof(multi->timer_lastcall));
}
/*
@@ -2152,14 +2299,16 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
do {
/* the first loop lap 'data' can be NULL */
if(data) {
- do
- result = multi_runsingle(multi, now, data->set.one_easy);
- while (CURLM_CALL_MULTI_PERFORM == result);
+ SIGPIPE_VARIABLE(pipe_st);
+
+ sigpipe_ignore(data, &pipe_st);
+ result = multi_runsingle(multi, now, data);
+ sigpipe_restore(&pipe_st);
if(CURLM_OK >= result)
/* get the socket(s) and check if the state has been changed since
last */
- singlesocket(multi, data->set.one_easy);
+ singlesocket(multi, data);
}
/* Check if there's one (more) expired timer to deal with! This function
@@ -2198,7 +2347,7 @@ CURLMcode curl_multi_setopt(CURLM *multi_handle,
multi->socket_userp = va_arg(param, void *);
break;
case CURLMOPT_PIPELINING:
- multi->pipelining_enabled = (bool)(0 != va_arg(param, long));
+ multi->pipelining = va_arg(param, long);
break;
case CURLMOPT_TIMERFUNCTION:
multi->timer_cb = va_arg(param, curl_multi_timer_callback);
@@ -2209,6 +2358,29 @@ CURLMcode curl_multi_setopt(CURLM *multi_handle,
case CURLMOPT_MAXCONNECTS:
multi->maxconnects = va_arg(param, long);
break;
+ case CURLMOPT_MAX_HOST_CONNECTIONS:
+ multi->max_host_connections = va_arg(param, long);
+ break;
+ case CURLMOPT_MAX_PIPELINE_LENGTH:
+ multi->max_pipeline_length = va_arg(param, long);
+ break;
+ case CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE:
+ multi->content_length_penalty_size = va_arg(param, long);
+ break;
+ case CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE:
+ multi->chunk_length_penalty_size = va_arg(param, long);
+ break;
+ case CURLMOPT_PIPELINING_SITE_BL:
+ res = Curl_pipeline_set_site_blacklist(va_arg(param, char **),
+ &multi->pipelining_site_bl);
+ break;
+ case CURLMOPT_PIPELINING_SERVER_BL:
+ res = Curl_pipeline_set_server_blacklist(va_arg(param, char **),
+ &multi->pipelining_server_bl);
+ break;
+ case CURLMOPT_MAX_TOTAL_CONNECTIONS:
+ multi->max_total_connections = va_arg(param, long);
+ break;
default:
res = CURLM_UNKNOWN_OPTION;
break;
@@ -2253,7 +2425,7 @@ CURLMcode curl_multi_socket_all(CURLM *multi_handle, int *running_handles)
static CURLMcode multi_timeout(struct Curl_multi *multi,
long *timeout_ms)
{
- static struct timeval tv_zero = {0,0};
+ static struct timeval tv_zero = {0, 0};
if(multi->timetree) {
/* we have a tree of expire times */
@@ -2310,8 +2482,8 @@ static int update_timer(struct Curl_multi *multi)
if(multi_timeout(multi, &timeout_ms)) {
return -1;
}
- if( timeout_ms < 0 ) {
- static const struct timeval none={0,0};
+ if(timeout_ms < 0) {
+ static const struct timeval none={0, 0};
if(Curl_splaycomparekeys(none, multi->timer_lastcall)) {
multi->timer_lastcall = none;
/* there's no timeout now but there was one previously, tell the app to
@@ -2333,135 +2505,6 @@ static int update_timer(struct Curl_multi *multi)
return multi->timer_cb((CURLM*)multi, timeout_ms, multi->timer_userp);
}
-static CURLcode addHandleToSendOrPendPipeline(struct SessionHandle *handle,
- struct connectdata *conn)
-{
- size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size;
- struct curl_llist_element *sendhead = conn->send_pipe->head;
- struct curl_llist *pipeline;
- CURLcode rc;
-
- if(!Curl_isPipeliningEnabled(handle) ||
- pipeLen == 0)
- pipeline = conn->send_pipe;
- else {
- if(conn->server_supports_pipelining &&
- pipeLen < MAX_PIPELINE_LENGTH)
- pipeline = conn->send_pipe;
- else
- pipeline = conn->pend_pipe;
- }
-
- rc = Curl_addHandleToPipeline(handle, pipeline);
-
- if (pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) {
- /* this is a new one as head, expire it */
- conn->writechannel_inuse = FALSE; /* not in use yet */
- infof(conn->data, "%p is at send pipe head!\n",
- conn->send_pipe->head->ptr);
- Curl_expire(conn->send_pipe->head->ptr, 1);
- }
-
- return rc;
-}
-
-static int checkPendPipeline(struct connectdata *conn)
-{
- int result = 0;
- struct curl_llist_element *sendhead = conn->send_pipe->head;
-
- size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size;
- if (conn->server_supports_pipelining || pipeLen == 0) {
- struct curl_llist_element *curr = conn->pend_pipe->head;
- const size_t maxPipeLen =
- conn->server_supports_pipelining ? MAX_PIPELINE_LENGTH : 1;
-
- while(pipeLen < maxPipeLen && curr) {
- Curl_llist_move(conn->pend_pipe, curr,
- conn->send_pipe, conn->send_pipe->tail);
- Curl_pgrsTime(curr->ptr, TIMER_PRETRANSFER);
- ++result; /* count how many handles we moved */
- curr = conn->pend_pipe->head;
- ++pipeLen;
- }
- }
-
- if (result) {
- conn->now = Curl_tvnow();
- /* something moved, check for a new send pipeline leader */
- if(sendhead != conn->send_pipe->head) {
- /* this is a new one as head, expire it */
- conn->writechannel_inuse = FALSE; /* not in use yet */
- infof(conn->data, "%p is at send pipe head!\n",
- conn->send_pipe->head->ptr);
- Curl_expire(conn->send_pipe->head->ptr, 1);
- }
- }
-
- return result;
-}
-
-/* Move this transfer from the sending list to the receiving list.
-
- Pay special attention to the new sending list "leader" as it needs to get
- checked to update what sockets it acts on.
-
-*/
-static void moveHandleFromSendToRecvPipeline(struct SessionHandle *handle,
- struct connectdata *conn)
-{
- struct curl_llist_element *curr;
-
- curr = conn->send_pipe->head;
- while(curr) {
- if(curr->ptr == handle) {
- Curl_llist_move(conn->send_pipe, curr,
- conn->recv_pipe, conn->recv_pipe->tail);
-
- if(conn->send_pipe->head) {
- /* Since there's a new easy handle at the start of the send pipeline,
- set its timeout value to 1ms to make it trigger instantly */
- conn->writechannel_inuse = FALSE; /* not used now */
- infof(conn->data, "%p is at send pipe head B!\n",
- conn->send_pipe->head->ptr);
- Curl_expire(conn->send_pipe->head->ptr, 1);
- }
-
- /* The receiver's list is not really interesting here since either this
- handle is now first in the list and we'll deal with it soon, or
- another handle is already first and thus is already taken care of */
-
- break; /* we're done! */
- }
- curr = curr->next;
- }
-}
-
-static void moveHandleFromRecvToDonePipeline(struct SessionHandle *handle,
- struct connectdata *conn)
-{
- struct curl_llist_element *curr;
-
- curr = conn->recv_pipe->head;
- while(curr) {
- if(curr->ptr == handle) {
- Curl_llist_move(conn->recv_pipe, curr,
- conn->done_pipe, conn->done_pipe->tail);
- break;
- }
- curr = curr->next;
- }
-}
-static bool isHandleAtHead(struct SessionHandle *handle,
- struct curl_llist *pipeline)
-{
- struct curl_llist_element *curr = pipeline->head;
- if(curr)
- return (bool)(curr->ptr == handle);
-
- return FALSE;
-}
-
/*
* multi_freetimeout()
*
@@ -2537,8 +2580,8 @@ void Curl_expire(struct SessionHandle *data, long milli)
struct timeval *nowp = &data->state.expiretime;
int rc;
- /* this is only interesting for multi-interface using libcurl, and only
- while there is still a multi interface struct remaining! */
+ /* this is only interesting while there is still an associated multi struct
+ remaining! */
if(!multi)
return;
@@ -2559,22 +2602,21 @@ void Curl_expire(struct SessionHandle *data, long milli)
while(list->size > 0)
Curl_llist_remove(list, list->tail, NULL);
+#ifdef DEBUGBUILD
infof(data, "Expire cleared\n");
+#endif
nowp->tv_sec = 0;
nowp->tv_usec = 0;
}
}
else {
struct timeval set;
- int rest;
set = Curl_tvnow();
set.tv_sec += milli/1000;
set.tv_usec += (milli%1000)*1000;
- rest = (int)(set.tv_usec - 1000000);
- if(rest > 0) {
- /* bigger than a full microsec */
+ if(set.tv_usec >= 1000000) {
set.tv_sec++;
set.tv_usec -= 1000000;
}
@@ -2615,6 +2657,46 @@ 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)
{
@@ -2622,7 +2704,8 @@ CURLMcode curl_multi_assign(CURLM *multi_handle,
struct Curl_multi *multi = (struct Curl_multi *)multi_handle;
if(s != CURL_SOCKET_BAD)
- there = Curl_hash_pick(multi->sockhash, (char *)&s, sizeof(curl_socket_t));
+ there = Curl_hash_pick(&multi->sockhash, (char *)&s,
+ sizeof(curl_socket_t));
if(!there)
return CURLM_BAD_SOCKET;
@@ -2632,139 +2715,76 @@ CURLMcode curl_multi_assign(CURLM *multi_handle,
return CURLM_OK;
}
-static void multi_connc_remove_handle(struct Curl_multi *multi,
- struct SessionHandle *data)
+size_t Curl_multi_max_host_connections(struct Curl_multi *multi)
{
- /* a connection in the connection cache pointing to the given 'data' ? */
- int i;
+ return multi ? multi->max_host_connections : 0;
+}
- for(i=0; i< multi->connc->num; i++) {
- struct connectdata * conn = multi->connc->connects[i];
-
- if(conn && conn->data == data) {
- /* If this easy_handle was the last one in charge for one or more
- connections in the shared connection cache, we might need to keep
- this handle around until either A) the connection is closed and
- killed properly, or B) another easy_handle uses the connection.
-
- The reason why we need to have a easy_handle associated with a live
- connection is simply that some connections will need a handle to get
- closed down properly. Currently, the only connections that need to
- keep a easy_handle handle around are using FTP(S). Such connections
- have the PROT_CLOSEACTION bit set.
-
- Thus, we need to check for all connections in the shared cache that
- points to this handle and are using PROT_CLOSEACTION. If there's any,
- we need to add this handle to the list of "easy handles kept around
- for nice connection closures".
- */
-
- if(conn->protocol & PROT_CLOSEACTION) {
- /* this handle is still being used by a shared connection and
- thus we leave it around for now */
- if(add_closure(multi, data) == CURLM_OK)
- data->state.shared_conn = multi;
- else {
- /* out of memory - so much for graceful shutdown */
- Curl_disconnect(conn);
- multi->connc->connects[i] = NULL;
- }
- }
- else
- /* disconect the easy handle from the connection since the connection
- will now remain but this easy handle is going */
- conn->data = NULL;
- }
- }
+size_t Curl_multi_max_total_connections(struct Curl_multi *multi)
+{
+ return multi ? multi->max_total_connections : 0;
}
-/* Add the given data pointer to the list of 'closure handles' that are kept
- around only to be able to close some connections nicely - just make sure
- that this handle isn't already added, like for the cases when an easy
- handle is removed, added and removed again... */
-static CURLMcode add_closure(struct Curl_multi *multi,
- struct SessionHandle *data)
+curl_off_t Curl_multi_content_length_penalty_size(struct Curl_multi *multi)
{
- struct closure *cl = multi->closure;
- struct closure *p = NULL;
- bool add = TRUE;
-
- /* Before adding, scan through all the other currently kept handles and see
- if there are any connections still referring to them and kill them if
- not. */
- while(cl) {
- struct closure *n;
- bool inuse = FALSE;
- int i;
-
- for(i=0; i< multi->connc->num; i++) {
- if(multi->connc->connects[i] &&
- (multi->connc->connects[i]->data == cl->easy_handle)) {
- inuse = TRUE;
- break;
- }
- }
+ return multi ? multi->content_length_penalty_size : 0;
+}
+
+curl_off_t Curl_multi_chunk_length_penalty_size(struct Curl_multi *multi)
+{
+ return multi ? multi->chunk_length_penalty_size : 0;
+}
- n = cl->next;
+struct curl_llist *Curl_multi_pipelining_site_bl(struct Curl_multi *multi)
+{
+ return multi->pipelining_site_bl;
+}
- if(!inuse) {
- /* cl->easy_handle is now killable */
+struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi)
+{
+ return multi->pipelining_server_bl;
+}
- /* unmark it as not having a connection around that uses it anymore */
- cl->easy_handle->state.shared_conn= NULL;
+void Curl_multi_process_pending_handles(struct Curl_multi *multi)
+{
+ struct curl_llist_element *e = multi->pending->head;
- if(cl->easy_handle->state.closed) {
- infof(data, "Delayed kill of easy handle %p\n", cl->easy_handle);
- /* close handle only if curl_easy_cleanup() already has been called
- for this easy handle */
- Curl_close(cl->easy_handle);
- }
- if(p)
- p->next = n;
- else
- multi->closure = n;
- free(cl);
- } else {
- if(cl->easy_handle == data)
- add = FALSE;
+ while(e) {
+ struct SessionHandle *data = e->ptr;
+ struct curl_llist_element *next = e->next;
- p = cl;
- }
+ if(data->mstate == CURLM_STATE_CONNECT_PEND) {
+ multistate(data, CURLM_STATE_CONNECT);
- cl = n;
- }
+ /* Remove this node from the list */
+ Curl_llist_remove(multi->pending, e, NULL);
- if (add) {
- cl = calloc(1, sizeof(struct closure));
- if(!cl)
- return CURLM_OUT_OF_MEMORY;
+ /* Make sure that the handle will be processed soonish. */
+ Curl_expire_latest(data, 1);
+ }
- cl->easy_handle = data;
- cl->next = multi->closure;
- multi->closure = cl;
+ e = next; /* operate on next handle */
}
-
- return CURLM_OK;
}
#ifdef DEBUGBUILD
void Curl_multi_dump(const struct Curl_multi *multi_handle)
{
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
- struct Curl_one_easy *easy;
+ struct SessionHandle *data;
int i;
fprintf(stderr, "* Multi status: %d handles, %d alive\n",
multi->num_easy, multi->num_alive);
- for(easy=multi->easy.next; easy != &multi->easy; easy = easy->next) {
- if(easy->state < CURLM_STATE_COMPLETED) {
+ for(data=multi->easyp; data; data = data->next) {
+ if(data->mstate < CURLM_STATE_COMPLETED) {
/* only display handles that are not completed */
fprintf(stderr, "handle %p, state %s, %d sockets\n",
- (void *)easy->easy_handle,
- statename[easy->state], easy->numsocks);
- for(i=0; i < easy->numsocks; i++) {
- curl_socket_t s = easy->sockets[i];
+ (void *)data,
+ statename[data->mstate], data->numsocks);
+ for(i=0; i < data->numsocks; i++) {
+ curl_socket_t s = data->sockets[i];
struct Curl_sh_entry *entry =
- Curl_hash_pick(multi->sockhash, (char *)&s, sizeof(s));
+ Curl_hash_pick(&multi->sockhash, (char *)&s, sizeof(s));
fprintf(stderr, "%d ", (int)s);
if(!entry) {
@@ -2775,7 +2795,7 @@ void Curl_multi_dump(const struct Curl_multi *multi_handle)
entry->action&CURL_POLL_IN?"RECVING":"",
entry->action&CURL_POLL_OUT?"SENDING":"");
}
- if(easy->numsocks)
+ if(data->numsocks)
fprintf(stderr, "\n");
}
}
diff --git a/lib/multihandle.h b/lib/multihandle.h
new file mode 100644
index 00000000..cad44d1d
--- /dev/null
+++ b/lib/multihandle.h
@@ -0,0 +1,148 @@
+#ifndef HEADER_CURL_MULTIHANDLE_H
+#define HEADER_CURL_MULTIHANDLE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "conncache.h"
+
+struct Curl_message {
+ /* the 'CURLMsg' is the part that is visible to the external user */
+ struct CURLMsg extmsg;
+};
+
+/* NOTE: if you add a state here, add the name to the statename[] array as
+ well!
+*/
+typedef enum {
+ CURLM_STATE_INIT, /* 0 - start in this state */
+ CURLM_STATE_CONNECT_PEND, /* 1 - no connections, waiting for one */
+ CURLM_STATE_CONNECT, /* 2 - resolve/connect has been sent off */
+ CURLM_STATE_WAITRESOLVE, /* 3 - awaiting the resolve to finalize */
+ CURLM_STATE_WAITCONNECT, /* 4 - awaiting the TCP connect to finalize */
+ CURLM_STATE_WAITPROXYCONNECT, /* 5 - awaiting proxy CONNECT to finalize */
+ CURLM_STATE_SENDPROTOCONNECT, /* 6 - initiate protocol connect procedure */
+ CURLM_STATE_PROTOCONNECT, /* 7 - completing the protocol-specific connect
+ phase */
+ CURLM_STATE_WAITDO, /* 8 - wait for our turn to send the request */
+ CURLM_STATE_DO, /* 9 - start send off the request (part 1) */
+ CURLM_STATE_DOING, /* 10 - sending off the request (part 1) */
+ CURLM_STATE_DO_MORE, /* 11 - send off the request (part 2) */
+ CURLM_STATE_DO_DONE, /* 12 - done sending off request */
+ CURLM_STATE_WAITPERFORM, /* 13 - wait for our turn to read the response */
+ CURLM_STATE_PERFORM, /* 14 - transfer data */
+ CURLM_STATE_TOOFAST, /* 15 - wait because limit-rate exceeded */
+ CURLM_STATE_DONE, /* 16 - post data transfer operation */
+ CURLM_STATE_COMPLETED, /* 17 - operation complete */
+ CURLM_STATE_MSGSENT, /* 18 - the operation complete message is sent */
+ CURLM_STATE_LAST /* 19 - not a true state, never use this */
+} CURLMstate;
+
+/* we support N sockets per easy handle. Set the corresponding bit to what
+ action we should wait for */
+#define MAX_SOCKSPEREASYHANDLE 5
+#define GETSOCK_READABLE (0x00ff)
+#define GETSOCK_WRITABLE (0xff00)
+
+#define CURLPIPE_ANY (CURLPIPE_HTTP1 | CURLPIPE_MULTIPLEX)
+
+/* This is the struct known as CURLM on the outside */
+struct Curl_multi {
+ /* First a simple identifier to easier detect if a user mix up
+ this multi handle with an easy handle. Set this to CURL_MULTI_HANDLE. */
+ long type;
+
+ /* We have a doubly-linked circular list with easy handles */
+ struct SessionHandle *easyp;
+ struct SessionHandle *easylp; /* last node */
+
+ int num_easy; /* amount of entries in the linked list above. */
+ int num_alive; /* amount of easy handles that are added but have not yet
+ reached COMPLETE state */
+
+ struct curl_llist *msglist; /* a list of messages from completed transfers */
+
+ struct curl_llist *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;
+
+ /* Hostname cache */
+ struct curl_hash hostcache;
+
+ /* timetree points to the splay-tree of time nodes to figure out expire
+ times of all currently set timers */
+ struct Curl_tree *timetree;
+
+ /* 'sockhash' is the lookup hash for socket descriptor => easy handles (note
+ the pluralis form, there can be more than one easy handle waiting on the
+ same actual socket) */
+ struct curl_hash sockhash;
+
+ /* pipelining wanted bits (CURLPIPE*) */
+ long pipelining;
+
+ bool recheckstate; /* see Curl_multi_connchanged */
+
+ /* Shared connection cache (bundles)*/
+ struct conncache conn_cache;
+
+ /* This handle will be used for closing the cached connections in
+ curl_multi_cleanup() */
+ struct SessionHandle *closure_handle;
+
+ long maxconnects; /* if >0, a fixed limit of the maximum number of entries
+ we're allowed to grow the connection cache to */
+
+ long max_host_connections; /* if >0, a fixed limit of the maximum number
+ of connections per host */
+
+ long max_total_connections; /* if >0, a fixed limit of the maximum number
+ of connections in total */
+
+ long max_pipeline_length; /* if >0, maximum number of requests in a
+ pipeline */
+
+ long content_length_penalty_size; /* a connection with a
+ content-length bigger than
+ this is not considered
+ for pipelining */
+
+ long chunk_length_penalty_size; /* a connection with a chunk length
+ bigger than this is not
+ considered for pipelining */
+
+ struct curl_llist *pipelining_site_bl; /* List of sites that are blacklisted
+ from pipelining */
+
+ struct curl_llist *pipelining_server_bl; /* List of server types that are
+ blacklisted from pipelining */
+
+ /* timer callback and user data pointer for the *socket() API */
+ curl_multi_timer_callback timer_cb;
+ void *timer_userp;
+ struct timeval timer_lastcall; /* the fixed time for the timeout for the
+ previous callback */
+};
+
+#endif /* HEADER_CURL_MULTIHANDLE_H */
diff --git a/lib/multiif.h b/lib/multiif.h
index 76918181..5052f65a 100644
--- a/lib/multiif.h
+++ b/lib/multiif.h
@@ -1,5 +1,5 @@
-#ifndef __MULTIIF_H
-#define __MULTIIF_H
+#ifndef HEADER_CURL_MULTIIF_H
+#define HEADER_CURL_MULTIIF_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,10 +26,14 @@
* Prototypes for library-wide functions provided by multi.c
*/
void Curl_expire(struct SessionHandle *data, long milli);
-
-bool Curl_multi_canPipeline(const struct Curl_multi* multi);
+void Curl_expire_latest(struct SessionHandle *data, long milli);
+bool Curl_pipeline_wanted(const struct Curl_multi* multi, int bits);
void Curl_multi_handlePipeBreak(struct SessionHandle *data);
+/* Internal version of curl_multi_init() accepts size parameters for the
+ socket and connection hashes */
+struct Curl_multi *Curl_multi_handle(int hashsize, int chashsize);
+
/* the write bits start at bit 16 for the *getsock() bitmap */
#define GETSOCK_WRITEBITSTART 16
@@ -50,4 +54,38 @@ void Curl_multi_handlePipeBreak(struct SessionHandle *data);
void Curl_multi_dump(const struct Curl_multi *multi_handle);
#endif
-#endif /* __MULTIIF_H */
+void Curl_multi_process_pending_handles(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_MAX_HOST_CONNECTIONS option */
+size_t Curl_multi_max_host_connections(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE option */
+curl_off_t Curl_multi_content_length_penalty_size(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE option */
+curl_off_t Curl_multi_chunk_length_penalty_size(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_PIPELINING_SITE_BL option */
+struct curl_llist *Curl_multi_pipelining_site_bl(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_PIPELINING_SERVER_BL option */
+struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_MAX_TOTAL_CONNECTIONS option */
+size_t Curl_multi_max_total_connections(struct Curl_multi *multi);
+
+void Curl_multi_connchanged(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
+ * 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.
+ */
+
+void Curl_multi_closed(struct connectdata *conn, curl_socket_t s);
+
+#endif /* HEADER_CURL_MULTIIF_H */
diff --git a/lib/netrc.c b/lib/netrc.c
index e9443253..06f8ea15 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,70 +20,48 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
-#ifdef __VMS
-#include <unixlib.h>
-#endif
#include <curl/curl.h>
#include "netrc.h"
#include "strequal.h"
#include "strtok.h"
-#include "curl_memory.h"
#include "rawstr.h"
+#include "curl_printf.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
-/* Debug this single source file with:
- 'make netrc' then run './netrc'!
-
- Oh, make sure you have a .netrc file too ;-)
- */
-
/* Get user and password from .netrc when given a machine name */
-enum {
+enum host_lookup_state {
NOTHING,
HOSTFOUND, /* the 'machine' keyword was found */
- HOSTCOMPLETE, /* the machine name following the keyword was found too */
- HOSTVALID, /* this is "our" machine! */
-
- HOSTEND /* LAST enum */
+ HOSTVALID /* this is "our" machine! */
};
-/* make sure we have room for at least this size: */
-#define LOGINSIZE 64
-#define PASSWORDSIZE 64
-
-/* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */
+/*
+ * @unittest: 1304
+ *
+ * *loginp and *passwordp MUST be allocated if they aren't NULL when passed
+ * in.
+ */
int Curl_parsenetrc(const char *host,
- char *login,
- char *password,
+ char **loginp,
+ char **passwordp,
char *netrcfile)
{
FILE *file;
int retcode=1;
- int specific_login = (login[0] != 0);
- char *home = NULL;
- bool home_alloc = FALSE;
+ int specific_login = (*loginp && **loginp != 0);
bool netrc_alloc = FALSE;
- int state=NOTHING;
+ enum host_lookup_state state=NOTHING;
char state_login=0; /* Found a login keyword */
char state_password=0; /* Found a password keyword */
@@ -91,53 +69,49 @@ int Curl_parsenetrc(const char *host,
#define NETRC DOT_CHAR "netrc"
-#ifdef DEBUGBUILD
- {
- /* This is a hack to allow testing.
- * If compiled with --enable-debug and CURL_DEBUG_NETRC is defined,
- * then it's the path to a substitute .netrc for testing purposes *only* */
-
- char *override = curl_getenv("CURL_DEBUG_NETRC");
-
- if(override) {
- fprintf(stderr, "NETRC: overridden " NETRC " file: %s\n", override);
- netrcfile = override;
- netrc_alloc = TRUE;
- }
- }
-#endif /* DEBUGBUILD */
if(!netrcfile) {
- home = curl_getenv("HOME"); /* portable environment reader */
+ bool home_alloc = FALSE;
+ char *home = curl_getenv("HOME"); /* portable environment reader */
if(home) {
home_alloc = TRUE;
-#if defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
+#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
+ }
+ else {
+ struct passwd pw, *pw_res;
+ char pwbuf[1024];
+ if(!getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res)
+ && pw_res) {
+ home = strdup(pw.pw_dir);
+ if(!home)
+ return CURLE_OUT_OF_MEMORY;
+ home_alloc = TRUE;
+ }
+#elif defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
}
else {
struct passwd *pw;
pw= getpwuid(geteuid());
if(pw) {
-#ifdef __VMS
- home = decc_translate_vms(pw->pw_dir);
-#else
home = pw->pw_dir;
-#endif
}
#endif
}
if(!home)
- return -1;
+ return retcode; /* no home directory found (or possibly out of memory) */
netrcfile = curl_maprintf("%s%s%s", home, DIR_CHAR, NETRC);
+ if(home_alloc)
+ free(home);
if(!netrcfile) {
- if(home_alloc)
- free(home);
return -1;
}
netrc_alloc = TRUE;
}
- file = fopen(netrcfile, "r");
+ file = fopen(netrcfile, FOPEN_READTEXT);
+ if(netrc_alloc)
+ free(netrcfile);
if(file) {
char *tok;
char *tok_buf;
@@ -149,7 +123,7 @@ int Curl_parsenetrc(const char *host,
tok=strtok_r(netrcbuffer, " \t\n", &tok_buf);
while(!done && tok) {
- if(login[0] && password[0]) {
+ if((*loginp && **loginp) && (*passwordp && **passwordp)) {
done=TRUE;
break;
}
@@ -163,14 +137,15 @@ int Curl_parsenetrc(const char *host,
'password'. */
state=HOSTFOUND;
}
+ else if(Curl_raw_equal("default", tok)) {
+ state=HOSTVALID;
+ retcode=0; /* we did find our host */
+ }
break;
case HOSTFOUND:
if(Curl_raw_equal(host, tok)) {
/* and yes, this is our host! */
state=HOSTVALID;
-#ifdef _NETRC_DEBUG
- fprintf(stderr, "HOST: %s\n", tok);
-#endif
retcode=0; /* we did find our host */
}
else
@@ -181,22 +156,26 @@ int Curl_parsenetrc(const char *host,
/* we are now parsing sub-keywords concerning "our" host */
if(state_login) {
if(specific_login) {
- state_our_login = Curl_raw_equal(login, tok);
+ state_our_login = Curl_raw_equal(*loginp, tok);
}
else {
- strncpy(login, tok, LOGINSIZE-1);
-#ifdef _NETRC_DEBUG
- fprintf(stderr, "LOGIN: %s\n", login);
-#endif
+ free(*loginp);
+ *loginp = strdup(tok);
+ if(!*loginp) {
+ retcode = -1; /* allocation failed */
+ goto out;
+ }
}
state_login=0;
}
else if(state_password) {
if(state_our_login || !specific_login) {
- strncpy(password, tok, PASSWORDSIZE-1);
-#ifdef _NETRC_DEBUG
- fprintf(stderr, "PASSWORD: %s\n", password);
-#endif
+ free(*passwordp);
+ *passwordp = strdup(tok);
+ if(!*passwordp) {
+ retcode = -1; /* allocation failed */
+ goto out;
+ }
}
state_password=0;
}
@@ -216,30 +195,9 @@ int Curl_parsenetrc(const char *host,
} /* while(tok) */
} /* while fgets() */
+ out:
fclose(file);
}
- if(home_alloc)
- free(home);
- if(netrc_alloc)
- free(netrcfile);
-
return retcode;
}
-
-#ifdef _NETRC_DEBUG
-int main(int argc, argv_item_t argv[])
-{
- char login[64]="";
- char password[64]="";
-
- if(argc<2)
- return -1;
-
- if(0 == ParseNetrc(argv[1], login, password)) {
- printf("HOST: %s LOGIN: %s PASSWORD: %s\n",
- argv[1], login, password);
- }
-}
-
-#endif
diff --git a/lib/netrc.h b/lib/netrc.h
index 5406d4c5..a1456011 100644
--- a/lib/netrc.h
+++ b/lib/netrc.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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,14 +21,16 @@
* KIND, either express or implied.
*
***************************************************************************/
+
+/* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */
int Curl_parsenetrc(const char *host,
- char *login,
- char *password,
+ char **loginp,
+ char **passwordp,
char *filename);
- /* Assume: password[0]=0, host[0] != 0.
- * If login[0] = 0, search for login and password within a machine section
- * in the netrc.
- * If login[0] != 0, search for password within machine and login.
+ /* Assume: (*passwordp)[0]=0, host[0] != 0.
+ * If (*loginp)[0] = 0, search for login and password within a machine
+ * section in the netrc.
+ * If (*loginp)[0] != 0, search for password within machine and login.
*/
#endif /* HEADER_CURL_NETRC_H */
diff --git a/lib/non-ascii.c b/lib/non-ascii.c
new file mode 100644
index 00000000..6ccb4499
--- /dev/null
+++ b/lib/non-ascii.c
@@ -0,0 +1,338 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 CURL_DOES_CONVERSIONS
+
+#include <curl/curl.h>
+
+#include "non-ascii.h"
+#include "formdata.h"
+#include "sendf.h"
+#include "urldata.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+#ifdef HAVE_ICONV
+#include <iconv.h>
+/* set default codesets for iconv */
+#ifndef CURL_ICONV_CODESET_OF_NETWORK
+#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+#endif
+#ifndef CURL_ICONV_CODESET_FOR_UTF8
+#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
+#endif
+#define ICONV_ERROR (size_t)-1
+#endif /* HAVE_ICONV */
+
+/*
+ * Curl_convert_clone() returns a malloced copy of the source string (if
+ * returning CURLE_OK), with the data converted to network format.
+ */
+CURLcode Curl_convert_clone(struct SessionHandle *data,
+ const char *indata,
+ size_t insize,
+ char **outbuf)
+{
+ char *convbuf;
+ CURLcode result;
+
+ convbuf = malloc(insize);
+ if(!convbuf)
+ return CURLE_OUT_OF_MEMORY;
+
+ memcpy(convbuf, indata, insize);
+ result = Curl_convert_to_network(data, convbuf, insize);
+ if(result) {
+ free(convbuf);
+ return result;
+ }
+
+ *outbuf = convbuf; /* return the converted buffer */
+
+ return CURLE_OK;
+}
+
+/*
+ * Curl_convert_to_network() is an internal function for performing ASCII
+ * conversions on non-ASCII platforms. It convers the buffer _in place_.
+ */
+CURLcode Curl_convert_to_network(struct SessionHandle *data,
+ char *buffer, size_t length)
+{
+ if(data->set.convtonetwork) {
+ /* use translation callback */
+ CURLcode result = data->set.convtonetwork(buffer, length);
+ if(result) {
+ failf(data,
+ "CURLOPT_CONV_TO_NETWORK_FUNCTION callback returned %d: %s",
+ (int)result, curl_easy_strerror(result));
+ }
+
+ return result;
+ }
+ else {
+#ifdef HAVE_ICONV
+ /* do the translation ourselves */
+ char *input_ptr, *output_ptr;
+ size_t in_bytes, out_bytes, rc;
+ int error;
+
+ /* open an iconv conversion descriptor if necessary */
+ if(data->outbound_cd == (iconv_t)-1) {
+ data->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
+ CURL_ICONV_CODESET_OF_HOST);
+ if(data->outbound_cd == (iconv_t)-1) {
+ error = ERRNO;
+ failf(data,
+ "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
+ CURL_ICONV_CODESET_OF_NETWORK,
+ CURL_ICONV_CODESET_OF_HOST,
+ error, strerror(error));
+ return CURLE_CONV_FAILED;
+ }
+ }
+ /* call iconv */
+ input_ptr = output_ptr = buffer;
+ in_bytes = out_bytes = length;
+ rc = iconv(data->outbound_cd, (const char**)&input_ptr, &in_bytes,
+ &output_ptr, &out_bytes);
+ if((rc == ICONV_ERROR) || (in_bytes != 0)) {
+ error = ERRNO;
+ failf(data,
+ "The Curl_convert_to_network iconv call failed with errno %i: %s",
+ error, strerror(error));
+ return CURLE_CONV_FAILED;
+ }
+#else
+ failf(data, "CURLOPT_CONV_TO_NETWORK_FUNCTION callback required");
+ return CURLE_CONV_REQD;
+#endif /* HAVE_ICONV */
+ }
+
+ return CURLE_OK;
+}
+
+/*
+ * Curl_convert_from_network() is an internal function for performing ASCII
+ * conversions on non-ASCII platforms. It convers the buffer _in place_.
+ */
+CURLcode Curl_convert_from_network(struct SessionHandle *data,
+ char *buffer, size_t length)
+{
+ if(data->set.convfromnetwork) {
+ /* use translation callback */
+ CURLcode result = data->set.convfromnetwork(buffer, length);
+ if(result) {
+ failf(data,
+ "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback returned %d: %s",
+ (int)result, curl_easy_strerror(result));
+ }
+
+ return result;
+ }
+ else {
+#ifdef HAVE_ICONV
+ /* do the translation ourselves */
+ char *input_ptr, *output_ptr;
+ size_t in_bytes, out_bytes, rc;
+ int error;
+
+ /* open an iconv conversion descriptor if necessary */
+ if(data->inbound_cd == (iconv_t)-1) {
+ data->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+ CURL_ICONV_CODESET_OF_NETWORK);
+ if(data->inbound_cd == (iconv_t)-1) {
+ error = ERRNO;
+ failf(data,
+ "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
+ CURL_ICONV_CODESET_OF_HOST,
+ CURL_ICONV_CODESET_OF_NETWORK,
+ error, strerror(error));
+ return CURLE_CONV_FAILED;
+ }
+ }
+ /* call iconv */
+ input_ptr = output_ptr = buffer;
+ in_bytes = out_bytes = length;
+ rc = iconv(data->inbound_cd, (const char **)&input_ptr, &in_bytes,
+ &output_ptr, &out_bytes);
+ if((rc == ICONV_ERROR) || (in_bytes != 0)) {
+ error = ERRNO;
+ failf(data,
+ "Curl_convert_from_network iconv call failed with errno %i: %s",
+ error, strerror(error));
+ return CURLE_CONV_FAILED;
+ }
+#else
+ failf(data, "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback required");
+ return CURLE_CONV_REQD;
+#endif /* HAVE_ICONV */
+ }
+
+ return CURLE_OK;
+}
+
+/*
+ * Curl_convert_from_utf8() is an internal function for performing UTF-8
+ * conversions on non-ASCII platforms.
+ */
+CURLcode Curl_convert_from_utf8(struct SessionHandle *data,
+ char *buffer, size_t length)
+{
+ if(data->set.convfromutf8) {
+ /* use translation callback */
+ CURLcode result = data->set.convfromutf8(buffer, length);
+ if(result) {
+ failf(data,
+ "CURLOPT_CONV_FROM_UTF8_FUNCTION callback returned %d: %s",
+ (int)result, curl_easy_strerror(result));
+ }
+
+ return result;
+ }
+ else {
+#ifdef HAVE_ICONV
+ /* do the translation ourselves */
+ const char *input_ptr;
+ char *output_ptr;
+ size_t in_bytes, out_bytes, rc;
+ int error;
+
+ /* open an iconv conversion descriptor if necessary */
+ if(data->utf8_cd == (iconv_t)-1) {
+ data->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+ CURL_ICONV_CODESET_FOR_UTF8);
+ if(data->utf8_cd == (iconv_t)-1) {
+ error = ERRNO;
+ failf(data,
+ "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
+ CURL_ICONV_CODESET_OF_HOST,
+ CURL_ICONV_CODESET_FOR_UTF8,
+ error, strerror(error));
+ return CURLE_CONV_FAILED;
+ }
+ }
+ /* call iconv */
+ input_ptr = output_ptr = buffer;
+ in_bytes = out_bytes = length;
+ rc = iconv(data->utf8_cd, &input_ptr, &in_bytes,
+ &output_ptr, &out_bytes);
+ if((rc == ICONV_ERROR) || (in_bytes != 0)) {
+ error = ERRNO;
+ failf(data,
+ "The Curl_convert_from_utf8 iconv call failed with errno %i: %s",
+ error, strerror(error));
+ return CURLE_CONV_FAILED;
+ }
+ if(output_ptr < input_ptr) {
+ /* null terminate the now shorter output string */
+ *output_ptr = 0x00;
+ }
+#else
+ failf(data, "CURLOPT_CONV_FROM_UTF8_FUNCTION callback required");
+ return CURLE_CONV_REQD;
+#endif /* HAVE_ICONV */
+ }
+
+ return CURLE_OK;
+}
+
+/*
+ * Init conversion stuff for a SessionHandle
+ */
+void Curl_convert_init(struct SessionHandle *data)
+{
+#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
+ /* conversion descriptors for iconv calls */
+ data->outbound_cd = (iconv_t)-1;
+ data->inbound_cd = (iconv_t)-1;
+ data->utf8_cd = (iconv_t)-1;
+#else
+ (void)data;
+#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
+}
+
+/*
+ * Setup conversion stuff for a SessionHandle
+ */
+void Curl_convert_setup(struct SessionHandle *data)
+{
+ data->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+ CURL_ICONV_CODESET_OF_NETWORK);
+ data->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
+ CURL_ICONV_CODESET_OF_HOST);
+ data->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+ CURL_ICONV_CODESET_FOR_UTF8);
+}
+
+/*
+ * Close conversion stuff for a SessionHandle
+ */
+
+void Curl_convert_close(struct SessionHandle *data)
+{
+#ifdef HAVE_ICONV
+ /* close iconv conversion descriptors */
+ if(data->inbound_cd != (iconv_t)-1) {
+ iconv_close(data->inbound_cd);
+ }
+ if(data->outbound_cd != (iconv_t)-1) {
+ iconv_close(data->outbound_cd);
+ }
+ if(data->utf8_cd != (iconv_t)-1) {
+ iconv_close(data->utf8_cd);
+ }
+#else
+ (void)data;
+#endif /* HAVE_ICONV */
+}
+
+/*
+ * Curl_convert_form() is used from http.c, this converts any form items that
+ need to be sent in the network encoding. Returns CURLE_OK on success.
+ */
+CURLcode Curl_convert_form(struct SessionHandle *data, struct FormData *form)
+{
+ CURLcode result;
+
+ if(!data)
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+
+ while(form) {
+ if(form->type == FORM_DATA) {
+ result = Curl_convert_to_network(data, form->line, form->length);
+ /* Curl_convert_to_network calls failf if unsuccessful */
+ if(result)
+ return result;
+ }
+
+ form = form->next;
+ }
+
+ return CURLE_OK;
+}
+
+#endif /* CURL_DOES_CONVERSIONS */
diff --git a/lib/non-ascii.h b/lib/non-ascii.h
new file mode 100644
index 00000000..8b4b7c22
--- /dev/null
+++ b/lib/non-ascii.h
@@ -0,0 +1,63 @@
+#ifndef HEADER_CURL_NON_ASCII_H
+#define HEADER_CURL_NON_ASCII_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 CURL_DOES_CONVERSIONS
+
+#include "urldata.h"
+
+/*
+ * Curl_convert_clone() returns a malloced copy of the source string (if
+ * returning CURLE_OK), with the data converted to network format.
+ *
+ * If no conversion was needed *outbuf may be NULL.
+ */
+CURLcode Curl_convert_clone(struct SessionHandle *data,
+ const char *indata,
+ size_t insize,
+ char **outbuf);
+
+void Curl_convert_init(struct SessionHandle *data);
+void Curl_convert_setup(struct SessionHandle *data);
+void Curl_convert_close(struct SessionHandle *data);
+
+CURLcode Curl_convert_to_network(struct SessionHandle *data,
+ char *buffer, size_t length);
+CURLcode Curl_convert_from_network(struct SessionHandle *data,
+ char *buffer, size_t length);
+CURLcode Curl_convert_from_utf8(struct SessionHandle *data,
+ char *buffer, size_t length);
+CURLcode Curl_convert_form(struct SessionHandle *data, struct FormData *form);
+#else
+#define Curl_convert_clone(a,b,c,d) ((void)a, CURLE_OK)
+#define Curl_convert_init(x) Curl_nop_stmt
+#define Curl_convert_setup(x) Curl_nop_stmt
+#define Curl_convert_close(x) Curl_nop_stmt
+#define Curl_convert_to_network(a,b,c) ((void)a, CURLE_OK)
+#define Curl_convert_from_network(a,b,c) ((void)a, CURLE_OK)
+#define Curl_convert_from_utf8(a,b,c) ((void)a, CURLE_OK)
+#define Curl_convert_form(a,b) CURLE_OK
+#endif
+
+#endif /* HEADER_CURL_NON_ASCII_H */
diff --git a/lib/nonblock.c b/lib/nonblock.c
index cd819506..1447c877 100644
--- a/lib/nonblock.c
+++ b/lib/nonblock.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,23 +20,14 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
#if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE))
#include <sys/filio.h>
@@ -64,35 +55,34 @@ int curlx_nonblock(curl_socket_t sockfd, /* operate on this */
/* most recent unix versions */
int flags;
- flags = fcntl(sockfd, F_GETFL, 0);
- if(FALSE != nonblock)
- return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
+ flags = sfcntl(sockfd, F_GETFL, 0);
+ if(nonblock)
+ return sfcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
else
- return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
+ return sfcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
#elif defined(HAVE_IOCTL_FIONBIO)
/* older unix versions */
- int flags;
- flags = nonblock;
+ int flags = nonblock ? 1 : 0;
return ioctl(sockfd, FIONBIO, &flags);
#elif defined(HAVE_IOCTLSOCKET_FIONBIO)
/* Windows */
- unsigned long flags;
- flags = nonblock;
+ unsigned long flags = nonblock ? 1UL : 0UL;
return ioctlsocket(sockfd, FIONBIO, &flags);
#elif defined(HAVE_IOCTLSOCKET_CAMEL_FIONBIO)
/* Amiga */
- return IoctlSocket(sockfd, FIONBIO, (long)nonblock);
+ long flags = nonblock ? 1L : 0L;
+ return IoctlSocket(sockfd, FIONBIO, flags);
#elif defined(HAVE_SETSOCKOPT_SO_NONBLOCK)
/* BeOS */
- long b = nonblock ? 1 : 0;
+ long b = nonblock ? 1L : 0L;
return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b));
#else
diff --git a/lib/nonblock.h b/lib/nonblock.h
index adcd2c15..b540ae46 100644
--- a/lib/nonblock.h
+++ b/lib/nonblock.h
@@ -1,5 +1,5 @@
-#ifndef __NONBLOCK_H
-#define __NONBLOCK_H
+#ifndef HEADER_CURL_NONBLOCK_H
+#define HEADER_CURL_NONBLOCK_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -27,4 +27,5 @@
int curlx_nonblock(curl_socket_t sockfd, /* operate on this */
int nonblock /* TRUE or FALSE */);
-#endif
+#endif /* HEADER_CURL_NONBLOCK_H */
+
diff --git a/lib/nss.c b/lib/nss.c
deleted file mode 100644
index 6d3f12c0..00000000
--- a/lib/nss.c
+++ /dev/null
@@ -1,1481 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-/*
- * Source file for all NSS-specific code for the TLS/SSL layer. No code
- * but sslgen.c should ever call or use these functions.
- */
-
-#include "setup.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#include "urldata.h"
-#include "sendf.h"
-#include "formdata.h" /* for the boundary function */
-#include "url.h" /* for the ssl config check function */
-#include "connect.h"
-#include "strequal.h"
-#include "select.h"
-#include "sslgen.h"
-
-#define _MPRINTF_REPLACE /* use the internal *printf() functions */
-#include <curl/mprintf.h>
-
-#ifdef USE_NSS
-
-#include "nssg.h"
-#include <nspr.h>
-#include <nss.h>
-#include <ssl.h>
-#include <sslerr.h>
-#include <secerr.h>
-#include <secmod.h>
-#include <sslproto.h>
-#include <prtypes.h>
-#include <pk11pub.h>
-#include <prio.h>
-#include <secitem.h>
-#include <secport.h>
-#include <certdb.h>
-#include <base64.h>
-#include <cert.h>
-
-#include "curl_memory.h"
-#include "rawstr.h"
-#include "easyif.h" /* for Curl_convert_from_utf8 prototype */
-
-/* The last #include file should be: */
-#include "memdebug.h"
-
-#define SSL_DIR "/etc/pki/nssdb"
-
-/* enough to fit the string "PEM Token #[0|1]" */
-#define SLOTSIZE 13
-
-PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd);
-
-PRLock * nss_initlock = NULL;
-PRLock * nss_crllock = NULL;
-
-volatile int initialized = 0;
-
-typedef struct {
- const char *name;
- int num;
- PRInt32 version; /* protocol version valid for this cipher */
-} cipher_s;
-
-#define PK11_SETATTRS(x,id,v,l) (x)->type = (id); \
- (x)->pValue=(v); (x)->ulValueLen = (l)
-
-#define CERT_NewTempCertificate __CERT_NewTempCertificate
-
-enum sslversion { SSL2 = 1, SSL3 = 2, TLS = 4 };
-
-#define NUM_OF_CIPHERS sizeof(cipherlist)/sizeof(cipherlist[0])
-static const cipher_s cipherlist[] = {
- /* SSL2 cipher suites */
- {"rc4", SSL_EN_RC4_128_WITH_MD5, SSL2},
- {"rc4-md5", SSL_EN_RC4_128_WITH_MD5, SSL2},
- {"rc4export", SSL_EN_RC4_128_EXPORT40_WITH_MD5, SSL2},
- {"rc2", SSL_EN_RC2_128_CBC_WITH_MD5, SSL2},
- {"rc2export", SSL_EN_RC2_128_CBC_EXPORT40_WITH_MD5, SSL2},
- {"des", SSL_EN_DES_64_CBC_WITH_MD5, SSL2},
- {"desede3", SSL_EN_DES_192_EDE3_CBC_WITH_MD5, SSL2},
- /* SSL3/TLS cipher suites */
- {"rsa_rc4_128_md5", SSL_RSA_WITH_RC4_128_MD5, SSL3 | TLS},
- {"rsa_rc4_128_sha", SSL_RSA_WITH_RC4_128_SHA, SSL3 | TLS},
- {"rsa_3des_sha", SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL3 | TLS},
- {"rsa_des_sha", SSL_RSA_WITH_DES_CBC_SHA, SSL3 | TLS},
- {"rsa_rc4_40_md5", SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL3 | TLS},
- {"rsa_rc2_40_md5", SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5, SSL3 | TLS},
- {"rsa_null_md5", SSL_RSA_WITH_NULL_MD5, SSL3 | TLS},
- {"rsa_null_sha", SSL_RSA_WITH_NULL_SHA, SSL3 | TLS},
- {"fips_3des_sha", SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA, SSL3 | TLS},
- {"fips_des_sha", SSL_RSA_FIPS_WITH_DES_CBC_SHA, SSL3 | TLS},
- {"fortezza", SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA, SSL3 | TLS},
- {"fortezza_rc4_128_sha", SSL_FORTEZZA_DMS_WITH_RC4_128_SHA, SSL3 | TLS},
- {"fortezza_null", SSL_FORTEZZA_DMS_WITH_NULL_SHA, SSL3 | TLS},
- /* TLS 1.0: Exportable 56-bit Cipher Suites. */
- {"rsa_des_56_sha", TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA, SSL3 | TLS},
- {"rsa_rc4_56_sha", TLS_RSA_EXPORT1024_WITH_RC4_56_SHA, SSL3 | TLS},
- /* AES ciphers. */
- {"rsa_aes_128_sha", TLS_RSA_WITH_AES_128_CBC_SHA, SSL3 | TLS},
- {"rsa_aes_256_sha", TLS_RSA_WITH_AES_256_CBC_SHA, SSL3 | TLS},
-#ifdef NSS_ENABLE_ECC
- /* ECC ciphers. */
- {"ecdh_ecdsa_null_sha", TLS_ECDH_ECDSA_WITH_NULL_SHA, TLS},
- {"ecdh_ecdsa_rc4_128_sha", TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TLS},
- {"ecdh_ecdsa_3des_sha", TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS},
- {"ecdh_ecdsa_aes_128_sha", TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS},
- {"ecdh_ecdsa_aes_256_sha", TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS},
- {"ecdhe_ecdsa_null_sha", TLS_ECDHE_ECDSA_WITH_NULL_SHA, TLS},
- {"ecdhe_ecdsa_rc4_128_sha", TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS},
- {"ecdhe_ecdsa_3des_sha", TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS},
- {"ecdhe_ecdsa_aes_128_sha", TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS},
- {"ecdhe_ecdsa_aes_256_sha", TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS},
- {"ecdh_rsa_null_sha", TLS_ECDH_RSA_WITH_NULL_SHA, TLS},
- {"ecdh_rsa_128_sha", TLS_ECDH_RSA_WITH_RC4_128_SHA, TLS},
- {"ecdh_rsa_3des_sha", TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, TLS},
- {"ecdh_rsa_aes_128_sha", TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS},
- {"ecdh_rsa_aes_256_sha", TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS},
- {"echde_rsa_null", TLS_ECDHE_RSA_WITH_NULL_SHA, TLS},
- {"ecdhe_rsa_rc4_128_sha", TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS},
- {"ecdhe_rsa_3des_sha", TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS},
- {"ecdhe_rsa_aes_128_sha", TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS},
- {"ecdhe_rsa_aes_256_sha", TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS},
- {"ecdh_anon_null_sha", TLS_ECDH_anon_WITH_NULL_SHA, TLS},
- {"ecdh_anon_rc4_128sha", TLS_ECDH_anon_WITH_RC4_128_SHA, TLS},
- {"ecdh_anon_3des_sha", TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA, TLS},
- {"ecdh_anon_aes_128_sha", TLS_ECDH_anon_WITH_AES_128_CBC_SHA, TLS},
- {"ecdh_anon_aes_256_sha", TLS_ECDH_anon_WITH_AES_256_CBC_SHA, TLS},
-#endif
-};
-
-/* following ciphers are new in NSS 3.4 and not enabled by default, therefore
- they are enabled explicitly */
-static const int enable_ciphers_by_default[] = {
- TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
- TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
- TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
- TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
- TLS_RSA_WITH_AES_128_CBC_SHA,
- TLS_RSA_WITH_AES_256_CBC_SHA,
- SSL_NULL_WITH_NULL_NULL
-};
-
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
-static const char* pem_library = "libnsspem.so";
-#endif
-SECMODModule* mod = NULL;
-
-static SECStatus set_ciphers(struct SessionHandle *data, PRFileDesc * model,
- char *cipher_list)
-{
- unsigned int i;
- PRBool cipher_state[NUM_OF_CIPHERS];
- PRBool found;
- char *cipher;
- SECStatus rv;
-
- /* First disable all ciphers. This uses a different max value in case
- * NSS adds more ciphers later we don't want them available by
- * accident
- */
- for(i=0; i<SSL_NumImplementedCiphers; i++) {
- SSL_CipherPrefSet(model, SSL_ImplementedCiphers[i], SSL_NOT_ALLOWED);
- }
-
- /* Set every entry in our list to false */
- for(i=0; i<NUM_OF_CIPHERS; i++) {
- cipher_state[i] = PR_FALSE;
- }
-
- cipher = cipher_list;
-
- while(cipher_list && (cipher_list[0])) {
- while((*cipher) && (ISSPACE(*cipher)))
- ++cipher;
-
- if((cipher_list = strchr(cipher, ','))) {
- *cipher_list++ = '\0';
- }
-
- found = PR_FALSE;
-
- for(i=0; i<NUM_OF_CIPHERS; i++) {
- if(Curl_raw_equal(cipher, cipherlist[i].name)) {
- cipher_state[i] = PR_TRUE;
- found = PR_TRUE;
- break;
- }
- }
-
- if(found == PR_FALSE) {
- failf(data, "Unknown cipher in list: %s", cipher);
- return SECFailure;
- }
-
- if(cipher_list) {
- cipher = cipher_list;
- }
- }
-
- /* Finally actually enable the selected ciphers */
- for(i=0; i<NUM_OF_CIPHERS; i++) {
- rv = SSL_CipherPrefSet(model, cipherlist[i].num, cipher_state[i]);
- if(rv != SECSuccess) {
- failf(data, "Unknown cipher in cipher list");
- return SECFailure;
- }
- }
-
- return SECSuccess;
-}
-
-/*
- * Get the number of ciphers that are enabled. We use this to determine
- * if we need to call NSS_SetDomesticPolicy() to enable the default ciphers.
- */
-static int num_enabled_ciphers(void)
-{
- PRInt32 policy = 0;
- int count = 0;
- unsigned int i;
-
- for(i=0; i<NUM_OF_CIPHERS; i++) {
- SSL_CipherPolicyGet(cipherlist[i].num, &policy);
- if(policy)
- count++;
- }
- return count;
-}
-
-/*
- * Determine whether the nickname passed in is a filename that needs to
- * be loaded as a PEM or a regular NSS nickname.
- *
- * returns 1 for a file
- * returns 0 for not a file (NSS nickname)
- */
-static int is_file(const char *filename)
-{
- struct_stat st;
-
- if(filename == NULL)
- return 0;
-
- if(stat(filename, &st) == 0)
- if(S_ISREG(st.st_mode))
- return 1;
-
- return 0;
-}
-
-static char *fmt_nickname(char *str, bool *nickname_alloc)
-{
- char *nickname = NULL;
- *nickname_alloc = FALSE;
-
- if(is_file(str)) {
- char *n = strrchr(str, '/');
- if(n) {
- *nickname_alloc = TRUE;
- n++; /* skip last slash */
- nickname = aprintf("PEM Token #%d:%s", 1, n);
- }
- return nickname;
- }
-
- return str;
-}
-
-static int nss_load_cert(struct ssl_connect_data *ssl,
- const char *filename, PRBool cacert)
-{
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
- CK_SLOT_ID slotID;
- PK11SlotInfo * slot = NULL;
- CK_ATTRIBUTE *attrs;
- CK_ATTRIBUTE theTemplate[20];
- CK_BBOOL cktrue = CK_TRUE;
- CK_BBOOL ckfalse = CK_FALSE;
- CK_OBJECT_CLASS objClass = CKO_CERTIFICATE;
- char slotname[SLOTSIZE];
-#endif
- CERTCertificate *cert;
- char *nickname = NULL;
- char *n = NULL;
-
- /* If there is no slash in the filename it is assumed to be a regular
- * NSS nickname.
- */
- if(is_file(filename)) {
- n = strrchr(filename, '/');
- if(n)
- n++;
- if(!mod)
- return 1;
- }
- else {
- /* A nickname from the NSS internal database */
- if(cacert)
- return 0; /* You can't specify an NSS CA nickname this way */
- nickname = strdup(filename);
- if(!nickname)
- return 0;
- goto done;
- }
-
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
- attrs = theTemplate;
-
- /* All CA and trust objects go into slot 0. Other slots are used
- * for storing certificates. With each new user certificate we increment
- * the slot count. We only support 1 user certificate right now.
- */
- if(cacert)
- slotID = 0;
- else
- slotID = 1;
-
- snprintf(slotname, SLOTSIZE, "PEM Token #%ld", slotID);
-
- nickname = aprintf("PEM Token #%ld:%s", slotID, n);
- if(!nickname)
- return 0;
-
- slot = PK11_FindSlotByName(slotname);
-
- if(!slot) {
- free(nickname);
- return 0;
- }
-
- PK11_SETATTRS(attrs, CKA_CLASS, &objClass, sizeof(objClass) );
- attrs++;
- PK11_SETATTRS(attrs, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL) );
- attrs++;
- PK11_SETATTRS(attrs, CKA_LABEL, (unsigned char *)filename,
- strlen(filename)+1);
- attrs++;
- if(cacert) {
- PK11_SETATTRS(attrs, CKA_TRUST, &cktrue, sizeof(CK_BBOOL) );
- }
- else {
- PK11_SETATTRS(attrs, CKA_TRUST, &ckfalse, sizeof(CK_BBOOL) );
- }
- attrs++;
-
- /* This load the certificate in our PEM module into the appropriate
- * slot.
- */
- ssl->cacert[slotID] = PK11_CreateGenericObject(slot, theTemplate, 4,
- PR_FALSE /* isPerm */);
-
- PK11_FreeSlot(slot);
-
- if(ssl->cacert[slotID] == NULL) {
- free(nickname);
- return 0;
- }
-#else
- /* We don't have PK11_CreateGenericObject but a file-based cert was passed
- * in. We need to fail.
- */
- return 0;
-#endif
-
- done:
- /* Double-check that the certificate or nickname requested exists in
- * either the token or the NSS certificate database.
- */
- if(!cacert) {
- cert = PK11_FindCertFromNickname((char *)nickname, NULL);
-
- /* An invalid nickname was passed in */
- if(cert == NULL) {
- free(nickname);
- PR_SetError(SEC_ERROR_UNKNOWN_CERT, 0);
- return 0;
- }
-
- CERT_DestroyCertificate(cert);
- }
-
- free(nickname);
-
- return 1;
-}
-
-/* add given CRL to cache if it is not already there */
-static SECStatus nss_cache_crl(SECItem *crlDER)
-{
- CERTCertDBHandle *db = CERT_GetDefaultCertDB();
- CERTSignedCrl *crl = SEC_FindCrlByDERCert(db, crlDER, 0);
- if(crl) {
- /* CRL already cached */
- SEC_DestroyCrl(crl);
- SECITEM_FreeItem(crlDER, PR_FALSE);
- return SECSuccess;
- }
-
- /* acquire lock before call of CERT_CacheCRL() */
- PR_Lock(nss_crllock);
- if(SECSuccess != CERT_CacheCRL(db, crlDER)) {
- /* unable to cache CRL */
- PR_Unlock(nss_crllock);
- SECITEM_FreeItem(crlDER, PR_FALSE);
- return SECFailure;
- }
-
- /* we need to clear session cache, so that the CRL could take effect */
- SSL_ClearSessionCache();
- PR_Unlock(nss_crllock);
- return SECSuccess;
-}
-
-static SECStatus nss_load_crl(const char* crlfilename)
-{
- PRFileDesc *infile;
- PRFileInfo info;
- SECItem filedata = { 0, NULL, 0 };
- SECItem crlDER = { 0, NULL, 0 };
- char *body;
-
- infile = PR_Open(crlfilename, PR_RDONLY, 0);
- if(!infile)
- return SECFailure;
-
- if(PR_SUCCESS != PR_GetOpenFileInfo(infile, &info))
- goto fail;
-
- if(!SECITEM_AllocItem(NULL, &filedata, info.size + /* zero ended */ 1))
- goto fail;
-
- if(info.size != PR_Read(infile, filedata.data, info.size))
- goto fail;
-
- /* place a trailing zero right after the visible data */
- body = (char*)filedata.data;
- body[--filedata.len] = '\0';
-
- body = strstr(body, "-----BEGIN");
- if(body) {
- /* assume ASCII */
- char *trailer;
- char *begin = PORT_Strchr(body, '\n');
- if(!begin)
- begin = PORT_Strchr(body, '\r');
- if(!begin)
- goto fail;
-
- trailer = strstr(++begin, "-----END");
- if(!trailer)
- goto fail;
-
- /* retrieve DER from ASCII */
- *trailer = '\0';
- if(ATOB_ConvertAsciiToItem(&crlDER, begin))
- goto fail;
-
- SECITEM_FreeItem(&filedata, PR_FALSE);
- }
- else
- /* assume DER */
- crlDER = filedata;
-
- PR_Close(infile);
- return nss_cache_crl(&crlDER);
-
-fail:
- PR_Close(infile);
- SECITEM_FreeItem(&filedata, PR_FALSE);
- return SECFailure;
-}
-
-static int nss_load_key(struct connectdata *conn, int sockindex,
- char *key_file)
-{
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
- PK11SlotInfo * slot = NULL;
- CK_ATTRIBUTE *attrs;
- CK_ATTRIBUTE theTemplate[20];
- CK_BBOOL cktrue = CK_TRUE;
- CK_OBJECT_CLASS objClass = CKO_PRIVATE_KEY;
- CK_SLOT_ID slotID;
- char slotname[SLOTSIZE];
- struct ssl_connect_data *sslconn = &conn->ssl[sockindex];
-
- attrs = theTemplate;
-
- /* FIXME: grok the various file types */
-
- slotID = 1; /* hardcoded for now */
-
- snprintf(slotname, sizeof(slotname), "PEM Token #%ld", slotID);
- slot = PK11_FindSlotByName(slotname);
-
- if(!slot)
- return 0;
-
- PK11_SETATTRS(attrs, CKA_CLASS, &objClass, sizeof(objClass) ); attrs++;
- PK11_SETATTRS(attrs, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL) ); attrs++;
- PK11_SETATTRS(attrs, CKA_LABEL, (unsigned char *)key_file,
- strlen(key_file)+1); attrs++;
-
- /* When adding an encrypted key the PKCS#11 will be set as removed */
- sslconn->key = PK11_CreateGenericObject(slot, theTemplate, 3,
- PR_FALSE /* isPerm */);
- if(sslconn->key == NULL) {
- PR_SetError(SEC_ERROR_BAD_KEY, 0);
- return 0;
- }
-
- /* This will force the token to be seen as re-inserted */
- SECMOD_WaitForAnyTokenEvent(mod, 0, 0);
- PK11_IsPresent(slot);
-
- /* parg is initialized in nss_Init_Tokens() */
- if(PK11_Authenticate(slot, PR_TRUE,
- conn->data->set.str[STRING_KEY_PASSWD]) != SECSuccess) {
-
- PK11_FreeSlot(slot);
- return 0;
- }
- PK11_FreeSlot(slot);
-
- return 1;
-#else
- /* If we don't have PK11_CreateGenericObject then we can't load a file-based
- * key.
- */
- (void)conn; /* unused */
- (void)key_file; /* unused */
- return 0;
-#endif
-}
-
-static int display_error(struct connectdata *conn, PRInt32 err,
- const char *filename)
-{
- switch(err) {
- case SEC_ERROR_BAD_PASSWORD:
- failf(conn->data, "Unable to load client key: Incorrect password");
- return 1;
- case SEC_ERROR_UNKNOWN_CERT:
- failf(conn->data, "Unable to load certificate %s", filename);
- return 1;
- default:
- break;
- }
- return 0; /* The caller will print a generic error */
-}
-
-static int cert_stuff(struct connectdata *conn,
- int sockindex, char *cert_file, char *key_file)
-{
- struct SessionHandle *data = conn->data;
- int rv = 0;
-
- if(cert_file) {
- rv = nss_load_cert(&conn->ssl[sockindex], cert_file, PR_FALSE);
- if(!rv) {
- if(!display_error(conn, PR_GetError(), cert_file))
- failf(data, "Unable to load client cert %d.", PR_GetError());
- return 0;
- }
- }
- if(key_file || (is_file(cert_file))) {
- if(key_file)
- rv = nss_load_key(conn, sockindex, key_file);
- else
- /* In case the cert file also has the key */
- rv = nss_load_key(conn, sockindex, cert_file);
- if(!rv) {
- if(!display_error(conn, PR_GetError(), key_file))
- failf(data, "Unable to load client key %d.", PR_GetError());
-
- return 0;
- }
- }
- return 1;
-}
-
-static char * nss_get_password(PK11SlotInfo * slot, PRBool retry, void *arg)
-{
- (void)slot; /* unused */
- if(retry || NULL == arg)
- return NULL;
- else
- return (char *)PORT_Strdup((char *)arg);
-}
-
-static SECStatus BadCertHandler(void *arg, PRFileDesc *sock)
-{
- SECStatus success = SECSuccess;
- struct connectdata *conn = (struct connectdata *)arg;
- PRErrorCode err = PR_GetError();
- CERTCertificate *cert = NULL;
- char *subject, *subject_cn, *issuer;
-
- if(conn->data->set.ssl.certverifyresult!=0)
- return success;
-
- conn->data->set.ssl.certverifyresult=err;
- cert = SSL_PeerCertificate(sock);
- subject = CERT_NameToAscii(&cert->subject);
- subject_cn = CERT_GetCommonName(&cert->subject);
- issuer = CERT_NameToAscii(&cert->issuer);
- CERT_DestroyCertificate(cert);
-
- switch(err) {
- case SEC_ERROR_CA_CERT_INVALID:
- infof(conn->data, "Issuer certificate is invalid: '%s'\n", issuer);
- if(conn->data->set.ssl.verifypeer)
- success = SECFailure;
- break;
- case SEC_ERROR_UNTRUSTED_ISSUER:
- if(conn->data->set.ssl.verifypeer)
- success = SECFailure;
- infof(conn->data, "Certificate is signed by an untrusted issuer: '%s'\n",
- issuer);
- break;
- case SSL_ERROR_BAD_CERT_DOMAIN:
- if(conn->data->set.ssl.verifyhost) {
- failf(conn->data, "SSL: certificate subject name '%s' does not match "
- "target host name '%s'", subject_cn, conn->host.dispname);
- success = SECFailure;
- } else {
- infof(conn->data, "warning: SSL: certificate subject name '%s' does not "
- "match target host name '%s'\n", subject_cn, conn->host.dispname);
- }
- break;
- case SEC_ERROR_EXPIRED_CERTIFICATE:
- if(conn->data->set.ssl.verifypeer)
- success = SECFailure;
- infof(conn->data, "Remote Certificate has expired.\n");
- break;
- case SEC_ERROR_UNKNOWN_ISSUER:
- if(conn->data->set.ssl.verifypeer)
- success = SECFailure;
- infof(conn->data, "Peer's certificate issuer is not recognized: '%s'\n",
- issuer);
- break;
- default:
- if(conn->data->set.ssl.verifypeer)
- success = SECFailure;
- infof(conn->data, "Bad certificate received. Subject = '%s', "
- "Issuer = '%s'\n", subject, issuer);
- break;
- }
- if(success == SECSuccess)
- infof(conn->data, "SSL certificate verify ok.\n");
- PR_Free(subject);
- PR_Free(subject_cn);
- PR_Free(issuer);
-
- return success;
-}
-
-/**
- * Inform the application that the handshake is complete.
- */
-static SECStatus HandshakeCallback(PRFileDesc *sock, void *arg)
-{
- (void)sock;
- (void)arg;
- return SECSuccess;
-}
-
-static void display_cert_info(struct SessionHandle *data,
- CERTCertificate *cert)
-{
- char *subject, *issuer, *common_name;
- PRExplodedTime printableTime;
- char timeString[256];
- PRTime notBefore, notAfter;
-
- subject = CERT_NameToAscii(&cert->subject);
- issuer = CERT_NameToAscii(&cert->issuer);
- common_name = CERT_GetCommonName(&cert->subject);
- infof(data, "\tsubject: %s\n", subject);
-
- CERT_GetCertTimes(cert, &notBefore, &notAfter);
- PR_ExplodeTime(notBefore, PR_GMTParameters, &printableTime);
- PR_FormatTime(timeString, 256, "%b %d %H:%M:%S %Y GMT", &printableTime);
- infof(data, "\tstart date: %s\n", timeString);
- PR_ExplodeTime(notAfter, PR_GMTParameters, &printableTime);
- PR_FormatTime(timeString, 256, "%b %d %H:%M:%S %Y GMT", &printableTime);
- infof(data, "\texpire date: %s\n", timeString);
- infof(data, "\tcommon name: %s\n", common_name);
- infof(data, "\tissuer: %s\n", issuer);
-
- PR_Free(subject);
- PR_Free(issuer);
- PR_Free(common_name);
-}
-
-static void display_conn_info(struct connectdata *conn, PRFileDesc *sock)
-{
- SSLChannelInfo channel;
- SSLCipherSuiteInfo suite;
- CERTCertificate *cert;
-
- if(SSL_GetChannelInfo(sock, &channel, sizeof channel) ==
- SECSuccess && channel.length == sizeof channel &&
- channel.cipherSuite) {
- if(SSL_GetCipherSuiteInfo(channel.cipherSuite,
- &suite, sizeof suite) == SECSuccess) {
- infof(conn->data, "SSL connection using %s\n", suite.cipherSuiteName);
- }
- }
-
- infof(conn->data, "Server certificate:\n");
-
- cert = SSL_PeerCertificate(sock);
- display_cert_info(conn->data, cert);
- CERT_DestroyCertificate(cert);
-
- return;
-}
-
-/**
- *
- * Check that the Peer certificate's issuer certificate matches the one found
- * by issuer_nickname. This is not exactly the way OpenSSL and GNU TLS do the
- * issuer check, so we provide comments that mimic the OpenSSL
- * X509_check_issued function (in x509v3/v3_purp.c)
- */
-static SECStatus check_issuer_cert(PRFileDesc *sock,
- char *issuer_nickname)
-{
- CERTCertificate *cert,*cert_issuer,*issuer;
- SECStatus res=SECSuccess;
- void *proto_win = NULL;
-
- /*
- PRArenaPool *tmpArena = NULL;
- CERTAuthKeyID *authorityKeyID = NULL;
- SECITEM *caname = NULL;
- */
-
- cert = SSL_PeerCertificate(sock);
- cert_issuer = CERT_FindCertIssuer(cert,PR_Now(),certUsageObjectSigner);
-
- proto_win = SSL_RevealPinArg(sock);
- issuer = NULL;
- issuer = PK11_FindCertFromNickname(issuer_nickname, proto_win);
-
- if ((!cert_issuer) || (!issuer))
- res = SECFailure;
- else if (SECITEM_CompareItem(&cert_issuer->derCert,
- &issuer->derCert)!=SECEqual)
- res = SECFailure;
-
- CERT_DestroyCertificate(cert);
- CERT_DestroyCertificate(issuer);
- CERT_DestroyCertificate(cert_issuer);
- return res;
-}
-
-/**
- *
- * Callback to pick the SSL client certificate.
- */
-static SECStatus SelectClientCert(void *arg, PRFileDesc *sock,
- struct CERTDistNamesStr *caNames,
- struct CERTCertificateStr **pRetCert,
- struct SECKEYPrivateKeyStr **pRetKey)
-{
- static const char pem_nickname[] = "PEM Token #1";
- const char *pem_slotname = pem_nickname;
-
- struct ssl_connect_data *connssl = (struct ssl_connect_data *)arg;
- struct SessionHandle *data = connssl->data;
- const char *nickname = connssl->client_nickname;
-
- if (mod && nickname &&
- 0 == strncmp(nickname, pem_nickname, /* length of "PEM Token" */ 9)) {
-
- /* use the cert/key provided by PEM reader */
- PK11SlotInfo *slot;
- void *proto_win = SSL_RevealPinArg(sock);
- *pRetKey = NULL;
-
- *pRetCert = PK11_FindCertFromNickname(nickname, proto_win);
- if (NULL == *pRetCert) {
- failf(data, "NSS: client certificate not found: %s", nickname);
- return SECFailure;
- }
-
- slot = PK11_FindSlotByName(pem_slotname);
- if (NULL == slot) {
- failf(data, "NSS: PK11 slot not found: %s", pem_slotname);
- return SECFailure;
- }
-
- *pRetKey = PK11_FindPrivateKeyFromCert(slot, *pRetCert, NULL);
- PK11_FreeSlot(slot);
- if (NULL == *pRetKey) {
- failf(data, "NSS: private key not found for certificate: %s", nickname);
- return SECFailure;
- }
-
- infof(data, "NSS: client certificate: %s\n", nickname);
- display_cert_info(data, *pRetCert);
- return SECSuccess;
- }
-
- /* use the default NSS hook */
- if (SECSuccess != NSS_GetClientAuthData((void *)nickname, sock, caNames,
- pRetCert, pRetKey)
- || NULL == *pRetCert) {
-
- if (NULL == nickname)
- failf(data, "NSS: client certificate not found (nickname not "
- "specified)");
- else
- failf(data, "NSS: client certificate not found: %s", nickname);
-
- return SECFailure;
- }
-
- /* get certificate nickname if any */
- nickname = (*pRetCert)->nickname;
- if (NULL == nickname)
- nickname = "[unknown]";
-
- if (NULL == *pRetKey) {
- failf(data, "NSS: private key not found for certificate: %s", nickname);
- return SECFailure;
- }
-
- infof(data, "NSS: using client certificate: %s\n", nickname);
- display_cert_info(data, *pRetCert);
- 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;
- }
-}
-
-static CURLcode init_nss(struct SessionHandle *data)
-{
- char *cert_dir;
- struct_stat st;
- if(initialized)
- return CURLE_OK;
-
- /* First we check if $SSL_DIR points to a valid dir */
- cert_dir = getenv("SSL_DIR");
- if(cert_dir) {
- if((stat(cert_dir, &st) != 0) ||
- (!S_ISDIR(st.st_mode))) {
- cert_dir = NULL;
- }
- }
-
- /* Now we check if the default location is a valid dir */
- if(!cert_dir) {
- if((stat(SSL_DIR, &st) == 0) &&
- (S_ISDIR(st.st_mode))) {
- cert_dir = (char *)SSL_DIR;
- }
- }
-
- if(!NSS_IsInitialized()) {
- SECStatus rv;
- initialized = 1;
- infof(data, "Initializing NSS with certpath: %s\n",
- cert_dir ? cert_dir : "none");
- if(!cert_dir) {
- rv = NSS_NoDB_Init(NULL);
- }
- else {
- char *certpath =
- PR_smprintf("%s%s", NSS_VersionCheck("3.12.0") ? "sql:" : "", cert_dir);
- rv = NSS_Initialize(certpath, "", "", "", NSS_INIT_READONLY);
- PR_smprintf_free(certpath);
- }
- if(rv != SECSuccess) {
- infof(data, "Unable to initialize NSS database\n");
- initialized = 0;
- return CURLE_SSL_CACERT_BADFILE;
- }
- }
-
- if(num_enabled_ciphers() == 0)
- NSS_SetDomesticPolicy();
-
- return CURLE_OK;
-}
-
-/**
- * Global SSL init
- *
- * @retval 0 error initializing SSL
- * @retval 1 SSL initialized successfully
- */
-int Curl_nss_init(void)
-{
- /* curl_global_init() is not thread-safe so this test is ok */
- if (nss_initlock == NULL) {
- PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256);
- nss_initlock = PR_NewLock();
- nss_crllock = PR_NewLock();
- }
-
- /* We will actually initialize NSS later */
-
- return 1;
-}
-
-CURLcode Curl_nss_force_init(struct SessionHandle *data)
-{
- 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");
- return CURLE_OUT_OF_MEMORY;
- }
-
- PR_Lock(nss_initlock);
- rv = init_nss(data);
- PR_Unlock(nss_initlock);
- return rv;
-}
-
-/* Global cleanup */
-void Curl_nss_cleanup(void)
-{
- /* This function isn't required to be threadsafe and this is only done
- * as a safety feature.
- */
- PR_Lock(nss_initlock);
- if (initialized) {
- /* Free references to client certificates held in the SSL session cache.
- * Omitting this hampers destruction of the security module owning
- * the certificates. */
- SSL_ClearSessionCache();
-
- if(mod && SECSuccess == SECMOD_UnloadUserModule(mod)) {
- SECMOD_DestroyModule(mod);
- mod = NULL;
- }
- NSS_Shutdown();
- }
- PR_Unlock(nss_initlock);
-
- PR_DestroyLock(nss_initlock);
- PR_DestroyLock(nss_crllock);
- nss_initlock = NULL;
-
- initialized = 0;
-}
-
-/*
- * This function uses SSL_peek to determine connection status.
- *
- * Return codes:
- * 1 means the connection is still in place
- * 0 means the connection has been closed
- * -1 means the connection status is unknown
- */
-int
-Curl_nss_check_cxn(struct connectdata *conn)
-{
- int rc;
- char buf;
-
- rc =
- PR_Recv(conn->ssl[FIRSTSOCKET].handle, (void *)&buf, 1, PR_MSG_PEEK,
- PR_SecondsToInterval(1));
- if(rc > 0)
- return 1; /* connection still in place */
-
- if(rc == 0)
- return 0; /* connection has been closed */
-
- return -1; /* connection status unknown */
-}
-
-/*
- * This function is called when an SSL connection is closed.
- */
-void Curl_nss_close(struct connectdata *conn, int sockindex)
-{
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-
- if(connssl->handle) {
- PR_Close(connssl->handle);
-
- /* NSS closes the socket we previously handed to it, so we must mark it
- as closed to avoid double close */
- fake_sclose(conn->sock[sockindex]);
- conn->sock[sockindex] = CURL_SOCKET_BAD;
- if(connssl->client_nickname != NULL) {
- free(connssl->client_nickname);
- connssl->client_nickname = NULL;
- }
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
- if(connssl->key)
- (void)PK11_DestroyGenericObject(connssl->key);
- if(connssl->cacert[1])
- (void)PK11_DestroyGenericObject(connssl->cacert[1]);
- if(connssl->cacert[0])
- (void)PK11_DestroyGenericObject(connssl->cacert[0]);
-#endif
- connssl->handle = NULL;
- }
-}
-
-/*
- * This function is called when the 'data' struct is going away. Close
- * down everything and free all resources!
- */
-int Curl_nss_close_all(struct SessionHandle *data)
-{
- (void)data;
- return 0;
-}
-
-/* handle client certificate related errors if any; return false otherwise */
-static bool handle_cc_error(PRInt32 err, struct SessionHandle *data)
-{
- switch(err) {
- case SSL_ERROR_BAD_CERT_ALERT:
- failf(data, "SSL error: SSL_ERROR_BAD_CERT_ALERT");
- return true;
-
- case SSL_ERROR_REVOKED_CERT_ALERT:
- failf(data, "SSL error: SSL_ERROR_REVOKED_CERT_ALERT");
- return true;
-
- case SSL_ERROR_EXPIRED_CERT_ALERT:
- failf(data, "SSL error: SSL_ERROR_EXPIRED_CERT_ALERT");
- return true;
-
- default:
- return false;
- }
-}
-
-static Curl_recv nss_recv;
-static Curl_send nss_send;
-
-CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
-{
- PRInt32 err;
- PRFileDesc *model = NULL;
- PRBool ssl2 = PR_FALSE;
- PRBool ssl3 = PR_FALSE;
- PRBool tlsv1 = PR_FALSE;
- struct SessionHandle *data = conn->data;
- curl_socket_t sockfd = conn->sock[sockindex];
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
- int curlerr;
- const int *cipher_to_enable;
- PRSocketOptionData sock_opt;
- long time_left;
- PRUint32 timeout;
-
- if (connssl->state == ssl_connection_complete)
- return CURLE_OK;
-
- connssl->data = data;
-
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
- connssl->cacert[0] = NULL;
- connssl->cacert[1] = NULL;
- connssl->key = NULL;
-#endif
-
- /* FIXME. NSS doesn't support multiple databases open at the same time. */
- PR_Lock(nss_initlock);
- curlerr = init_nss(conn->data);
- if(CURLE_OK != curlerr) {
- PR_Unlock(nss_initlock);
- goto error;
- }
-
- curlerr = CURLE_SSL_CONNECT_ERROR;
-
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
- if(!mod) {
- char *configstring = aprintf("library=%s name=PEM", pem_library);
- if(!configstring) {
- PR_Unlock(nss_initlock);
- goto error;
- }
- mod = SECMOD_LoadUserModule(configstring, NULL, PR_FALSE);
- free(configstring);
-
- if(!mod || !mod->loaded) {
- if(mod) {
- SECMOD_DestroyModule(mod);
- mod = NULL;
- }
- infof(data, "WARNING: failed to load NSS PEM library %s. Using "
- "OpenSSL PEM certificates will not work.\n", pem_library);
- }
- }
-#endif
-
- PK11_SetPasswordFunc(nss_get_password);
- PR_Unlock(nss_initlock);
-
- model = PR_NewTCPSocket();
- if(!model)
- goto error;
- model = SSL_ImportFD(NULL, model);
-
- /* make the socket nonblocking */
- sock_opt.option = PR_SockOpt_Nonblocking;
- sock_opt.value.non_blocking = PR_TRUE;
- if(PR_SetSocketOption(model, &sock_opt) != SECSuccess)
- goto error;
-
- if(SSL_OptionSet(model, SSL_SECURITY, PR_TRUE) != SECSuccess)
- goto error;
- if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_SERVER, PR_FALSE) != SECSuccess)
- goto error;
- if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE) != SECSuccess)
- goto error;
-
- switch (data->set.ssl.version) {
- default:
- case CURL_SSLVERSION_DEFAULT:
- ssl3 = PR_TRUE;
- if (data->state.ssl_connect_retry)
- infof(data, "TLS disabled due to previous handshake failure\n");
- else
- tlsv1 = PR_TRUE;
- break;
- case CURL_SSLVERSION_TLSv1:
- tlsv1 = PR_TRUE;
- break;
- case CURL_SSLVERSION_SSLv2:
- ssl2 = PR_TRUE;
- break;
- case CURL_SSLVERSION_SSLv3:
- ssl3 = PR_TRUE;
- break;
- }
-
- if(SSL_OptionSet(model, SSL_ENABLE_SSL2, ssl2) != SECSuccess)
- goto error;
- if(SSL_OptionSet(model, SSL_ENABLE_SSL3, ssl3) != SECSuccess)
- goto error;
- if(SSL_OptionSet(model, SSL_ENABLE_TLS, tlsv1) != SECSuccess)
- goto error;
-
- if(SSL_OptionSet(model, SSL_V2_COMPATIBLE_HELLO, ssl2) != SECSuccess)
- goto error;
-
- /* reset the flag to avoid an infinite loop */
- data->state.ssl_connect_retry = FALSE;
-
- /* enable all ciphers from enable_ciphers_by_default */
- cipher_to_enable = enable_ciphers_by_default;
- while (SSL_NULL_WITH_NULL_NULL != *cipher_to_enable) {
- if (SSL_CipherPrefSet(model, *cipher_to_enable, PR_TRUE) != SECSuccess) {
- curlerr = CURLE_SSL_CIPHER;
- goto error;
- }
- cipher_to_enable++;
- }
-
- if(data->set.ssl.cipher_list) {
- if(set_ciphers(data, model, data->set.ssl.cipher_list) != SECSuccess) {
- curlerr = CURLE_SSL_CIPHER;
- goto error;
- }
- }
-
- if(data->set.ssl.verifyhost == 1)
- infof(data, "warning: ignoring unsupported value (1) of ssl.verifyhost\n");
-
- data->set.ssl.certverifyresult=0; /* not checked yet */
- if(SSL_BadCertHook(model, (SSLBadCertHandler) BadCertHandler, conn)
- != SECSuccess) {
- goto error;
- }
- if(SSL_HandshakeCallback(model, (SSLHandshakeCallback) HandshakeCallback,
- NULL) != SECSuccess)
- goto error;
-
- if(!data->set.ssl.verifypeer)
- /* skip the verifying of the peer */
- ;
- else if(data->set.ssl.CAfile) {
- int rc = nss_load_cert(&conn->ssl[sockindex], data->set.ssl.CAfile,
- PR_TRUE);
- if(!rc) {
- curlerr = CURLE_SSL_CACERT_BADFILE;
- goto error;
- }
- }
- else if(data->set.ssl.CApath) {
- struct_stat st;
- PRDir *dir;
- PRDirEntry *entry;
-
- if(stat(data->set.ssl.CApath, &st) == -1) {
- curlerr = CURLE_SSL_CACERT_BADFILE;
- goto error;
- }
-
- if(S_ISDIR(st.st_mode)) {
- int rc;
-
- dir = PR_OpenDir(data->set.ssl.CApath);
- do {
- entry = PR_ReadDir(dir, PR_SKIP_BOTH | PR_SKIP_HIDDEN);
-
- if(entry) {
- char fullpath[PATH_MAX];
-
- snprintf(fullpath, sizeof(fullpath), "%s/%s", data->set.ssl.CApath,
- entry->name);
- rc = nss_load_cert(&conn->ssl[sockindex], fullpath, PR_TRUE);
- /* FIXME: check this return value! */
- }
- /* This is purposefully tolerant of errors so non-PEM files
- * can be in the same directory */
- } while(entry != NULL);
- PR_CloseDir(dir);
- }
- }
- infof(data,
- " CAfile: %s\n"
- " CApath: %s\n",
- data->set.ssl.CAfile ? data->set.ssl.CAfile : "none",
- data->set.ssl.CApath ? data->set.ssl.CApath : "none");
-
- if (data->set.ssl.CRLfile) {
- if(SECSuccess != nss_load_crl(data->set.ssl.CRLfile)) {
- curlerr = CURLE_SSL_CRL_BADFILE;
- goto error;
- }
- infof(data,
- " CRLfile: %s\n",
- data->set.ssl.CRLfile ? data->set.ssl.CRLfile : "none");
- }
-
- if(data->set.str[STRING_CERT]) {
- bool nickname_alloc = FALSE;
- char *nickname = fmt_nickname(data->set.str[STRING_CERT], &nickname_alloc);
- if(!nickname)
- return CURLE_OUT_OF_MEMORY;
-
- if(!cert_stuff(conn, sockindex, data->set.str[STRING_CERT],
- data->set.str[STRING_KEY])) {
- /* failf() is already done in cert_stuff() */
- if(nickname_alloc)
- free(nickname);
- return CURLE_SSL_CERTPROBLEM;
- }
-
- /* this "takes over" the pointer to the allocated name or makes a
- dup of it */
- connssl->client_nickname = nickname_alloc?nickname:strdup(nickname);
- if(!connssl->client_nickname)
- return CURLE_OUT_OF_MEMORY;
-
- }
- else
- connssl->client_nickname = NULL;
-
- if(SSL_GetClientAuthDataHook(model, SelectClientCert,
- (void *)connssl) != SECSuccess) {
- curlerr = CURLE_SSL_CERTPROBLEM;
- goto error;
- }
-
- /* Import our model socket onto the existing file descriptor */
- connssl->handle = PR_ImportTCPSocket(sockfd);
- connssl->handle = SSL_ImportFD(model, connssl->handle);
- if(!connssl->handle)
- goto error;
-
- PR_Close(model); /* We don't need this any more */
- model = NULL;
-
- /* This is the password associated with the cert that we're using */
- if (data->set.str[STRING_KEY_PASSWD]) {
- SSL_SetPKCS11PinArg(connssl->handle, data->set.str[STRING_KEY_PASSWD]);
- }
-
- /* Force handshake on next I/O */
- SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE);
-
- SSL_SetURL(connssl->handle, conn->host.name);
-
- /* check timeout situation */
- time_left = Curl_timeleft(conn, NULL, TRUE);
- if(time_left < 0L) {
- failf(data, "timed out before SSL handshake");
- goto error;
- }
- timeout = PR_MillisecondsToInterval((PRUint32) time_left);
-
- /* Force the handshake now */
- if(SSL_ForceHandshakeWithTimeout(connssl->handle, timeout) != SECSuccess) {
- if(conn->data->set.ssl.certverifyresult == SSL_ERROR_BAD_CERT_DOMAIN)
- curlerr = CURLE_PEER_FAILED_VERIFICATION;
- else if(conn->data->set.ssl.certverifyresult!=0)
- curlerr = CURLE_SSL_CACERT;
- 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;
- bool nickname_alloc = FALSE;
- char *nickname = fmt_nickname(data->set.str[STRING_SSL_ISSUERCERT],
- &nickname_alloc);
-
- if(!nickname)
- return CURLE_OUT_OF_MEMORY;
-
- ret = check_issuer_cert(connssl->handle, nickname);
-
- if(nickname_alloc)
- free(nickname);
-
- if(SECFailure == ret) {
- infof(data,"SSL certificate issuer check failed\n");
- curlerr = CURLE_SSL_ISSUER_ERROR;
- goto error;
- }
- else {
- infof(data, "SSL certificate issuer check ok\n");
- }
- }
-
- return CURLE_OK;
-
- error:
- /* reset the flag to avoid an infinite loop */
- data->state.ssl_connect_retry = FALSE;
-
- err = PR_GetError();
- if(handle_cc_error(err, data))
- curlerr = CURLE_SSL_CERTPROBLEM;
- else
- infof(data, "NSS error %d\n", err);
-
- if(model)
- PR_Close(model);
-
- if (ssl3 && tlsv1 && 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;
-}
-
-static ssize_t nss_send(struct connectdata *conn, /* connection data */
- int sockindex, /* socketindex */
- const void *mem, /* send this data */
- size_t len, /* amount to write */
- CURLcode *curlcode)
-{
- int rc;
-
- rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0, -1);
-
- if(rc < 0) {
- PRInt32 err = PR_GetError();
- if(err == PR_WOULD_BLOCK_ERROR)
- *curlcode = CURLE_AGAIN;
- else if(handle_cc_error(err, conn->data))
- *curlcode = CURLE_SSL_CERTPROBLEM;
- else {
- failf(conn->data, "SSL write: error %d", err);
- *curlcode = CURLE_SEND_ERROR;
- }
- return -1;
- }
- return rc; /* number of bytes */
-}
-
-static ssize_t nss_recv(struct connectdata * conn, /* connection data */
- int num, /* socketindex */
- char *buf, /* store read data here */
- size_t buffersize, /* max amount to read */
- CURLcode *curlcode)
-{
- ssize_t nread;
-
- nread = PR_Recv(conn->ssl[num].handle, buf, (int)buffersize, 0, -1);
- if(nread < 0) {
- /* failed SSL read */
- PRInt32 err = PR_GetError();
-
- if(err == PR_WOULD_BLOCK_ERROR)
- *curlcode = CURLE_AGAIN;
- else if(handle_cc_error(err, conn->data))
- *curlcode = CURLE_SSL_CERTPROBLEM;
- else {
- failf(conn->data, "SSL read: errno %d", err);
- *curlcode = CURLE_RECV_ERROR;
- }
- return -1;
- }
- return nread;
-}
-
-size_t Curl_nss_version(char *buffer, size_t size)
-{
- return snprintf(buffer, size, "NSS/%s", NSS_VERSION);
-}
-
-int Curl_nss_seed(struct SessionHandle *data)
-{
- /* TODO: implement? */
- (void) data;
- return 0;
-}
-
-#endif /* USE_NSS */
diff --git a/lib/nssg.h b/lib/nssg.h
deleted file mode 100644
index f9cc46ae..00000000
--- a/lib/nssg.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef __NSSG_H
-#define __NSSG_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-#ifdef USE_NSS
-/*
- * This header should only be needed to get included by sslgen.c and nss.c
- */
-
-#include "urldata.h"
-CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex);
-CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn,
- int sockindex,
- bool *done);
-/* close a SSL connection */
-void Curl_nss_close(struct connectdata *conn, int sockindex);
-
-/* tell NSS to close down all open information regarding connections (and
- thus session ID caching etc) */
-int Curl_nss_close_all(struct SessionHandle *data);
-
-int Curl_nss_init(void);
-void Curl_nss_cleanup(void);
-
-size_t Curl_nss_version(char *buffer, size_t size);
-int Curl_nss_check_cxn(struct connectdata *cxn);
-int Curl_nss_seed(struct SessionHandle *data);
-
-/* initialize NSS library if not already */
-CURLcode Curl_nss_force_init(struct SessionHandle *data);
-
-/* API setup for NSS */
-#define curlssl_init Curl_nss_init
-#define curlssl_cleanup Curl_nss_cleanup
-#define curlssl_connect Curl_nss_connect
-
-/* NSS has its own session ID cache */
-#define curlssl_session_free(x)
-#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) (x=x, y=y, 1)
-#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_FAILED_INIT)
-#define curlssl_set_engine_default(x) (x=x, CURLE_FAILED_INIT)
-#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) (x=x, y=y, 0)
-
-#endif /* USE_NSS */
-#endif
diff --git a/lib/nwlib.c b/lib/nwlib.c
index f9c8a429..bd3f27ea 100644
--- a/lib/nwlib.c
+++ b/lib/nwlib.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,20 +20,21 @@
*
***************************************************************************/
-#ifdef NETWARE /* Novell NetWare */
+#include "curl_setup.h"
-#include <stdlib.h>
+#ifdef NETWARE /* Novell NetWare */
#ifdef __NOVELL_LIBC__
/* For native LibC-based NLM we need to register as a real lib. */
-#include <errno.h>
-#include <string.h>
#include <library.h>
#include <netware.h>
#include <screen.h>
#include <nks/thread.h>
#include <nks/synch.h>
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
typedef struct
{
@@ -57,9 +58,9 @@ rtag_t gAllocTag = (rtag_t) NULL;
NXMutex_t *gLibLock = (NXMutex_t *) NULL;
/* internal library function prototypes... */
-int DisposeLibraryData ( void * );
-void DisposeThreadData ( void * );
-int GetOrSetUpData ( int id, libdata_t **data, libthreaddata_t **threaddata );
+int DisposeLibraryData( void * );
+void DisposeThreadData( void * );
+int GetOrSetUpData( int id, libdata_t **data, libthreaddata_t **threaddata );
int _NonAppStart( void *NLMHandle,
@@ -92,12 +93,12 @@ int _NonAppStart( void *NLMHandle,
#pragma unused(messages)
#endif
-/*
-** Here we process our command line, post errors (to the error screen),
-** perform initializations and anything else we need to do before being able
-** to accept calls into us. If we succeed, we return non-zero and the NetWare
-** Loader will leave us up, otherwise we fail to load and get dumped.
-*/
+ /*
+ * Here we process our command line, post errors (to the error screen),
+ * perform initializations and anything else we need to do before being able
+ * to accept calls into us. If we succeed, we return non-zero and the NetWare
+ * Loader will leave us up, otherwise we fail to load and get dumped.
+ */
gAllocTag = AllocateResourceTag(NLMHandle,
"<library-name> memory allocations",
AllocSignature);
@@ -128,9 +129,9 @@ int _NonAppStart( void *NLMHandle,
}
/*
-** Here we clean up any resources we allocated. Resource tags is a big part
-** of what we created, but NetWare doesn't ask us to free those.
-*/
+ * Here we clean up any resources we allocated. Resource tags is a big part
+ * of what we created, but NetWare doesn't ask us to free those.
+ */
void _NonAppStop( void )
{
(void) unregister_library(gLibId);
@@ -138,16 +139,16 @@ void _NonAppStop( void )
}
/*
-** This function cannot be the first in the file for if the file is linked
-** first, then the check-unload function's offset will be nlmname.nlm+0
-** which is how to tell that there isn't one. When the check function is
-** first in the linked objects, it is ambiguous. For this reason, we will
-** put it inside this file after the stop function.
-**
-** Here we check to see if it's alright to ourselves to be unloaded. If not,
-** we return a non-zero value. Right now, there isn't any reason not to allow
-** it.
-*/
+ * This function cannot be the first in the file for if the file is linked
+ * first, then the check-unload function's offset will be nlmname.nlm+0
+ * which is how to tell that there isn't one. When the check function is
+ * first in the linked objects, it is ambiguous. For this reason, we will
+ * put it inside this file after the stop function.
+ *
+ * Here we check to see if it's alright to ourselves to be unloaded. If not,
+ * we return a non-zero value. Right now, there isn't any reason not to allow
+ * it.
+ */
int _NonAppCheckUnload( void )
{
return 0;
@@ -165,22 +166,22 @@ int GetOrSetUpData(int id, libdata_t **appData,
err = 0;
thread_data = (libthreaddata_t *) NULL;
-/*
-** Attempt to get our data for the application calling us. This is where we
-** store whatever application-specific information we need to carry in support
-** of calling applications.
-*/
+ /*
+ * Attempt to get our data for the application calling us. This is where we
+ * store whatever application-specific information we need to carry in
+ * support of calling applications.
+ */
app_data = (libdata_t *) get_app_data(id);
if(!app_data) {
-/*
-** This application hasn't called us before; set up application AND per-thread
-** data. Of course, just in case a thread from this same application is calling
-** us simultaneously, we better lock our application data-creation mutex. We
-** also need to recheck for data after we acquire the lock because WE might be
-** that other thread that was too late to create the data and the first thread
-** in will have created it.
-*/
+ /*
+ * This application hasn't called us before; set up application AND
+ * per-thread data. Of course, just in case a thread from this same
+ * application is calling us simultaneously, we better lock our application
+ * data-creation mutex. We also need to recheck for data after we acquire
+ * the lock because WE might be that other thread that was too late to
+ * create the data and the first thread in will have created it.
+ */
NXLock(gLibLock);
if(!(app_data = (libdata_t *) get_app_data(id))) {
@@ -202,13 +203,14 @@ int GetOrSetUpData(int id, libdata_t **appData,
}
if(app_data) {
-/*
-** Here we burn in the application data that we were trying to get by calling
-** get_app_data(). Next time we call the first function, we'll get this data
-** we're just now setting. We also go on here to establish the per-thread data
-** for the calling thread, something we'll have to do on each application
-** thread the first time it calls us.
-*/
+ /*
+ * Here we burn in the application data that we were trying to get
+ * by calling get_app_data(). Next time we call the first function,
+ * we'll get this data we're just now setting. We also go on here to
+ * establish the per-thread data for the calling thread, something
+ * we'll have to do on each application thread the first time
+ * it calls us.
+ */
err = set_app_data(gLibId, app_data);
if(err) {
@@ -238,13 +240,13 @@ int GetOrSetUpData(int id, libdata_t **appData,
if(key != -1 /* couldn't create a key? no thread data */
&& !(err = NXKeyGetValue(key, (void **) &thread_data))
&& !thread_data) {
-/*
-** Allocate the per-thread data for the calling thread. Regardless of whether
-** there was already application data or not, this may be the first call by a
-** a new thread. The fact that we allocation 20 bytes on a pointer is not very
-** important, this just helps to demonstrate that we can have arbitrarily
-** complex per-thread data.
-*/
+ /*
+ * Allocate the per-thread data for the calling thread. Regardless of
+ * whether there was already application data or not, this may be the
+ * first call by a new thread. The fact that we allocation 20 bytes on
+ * a pointer is not very important, this just helps to demonstrate that
+ * we can have arbitrarily complex per-thread data.
+ */
thread_data = malloc(sizeof(libthreaddata_t));
if(thread_data) {
@@ -280,9 +282,7 @@ int DisposeLibraryData( void *data )
if(data) {
void *tenbytes = ((libdata_t *) data)->tenbytes;
- if(tenbytes)
- free(tenbytes);
-
+ free(tenbytes);
free(data);
}
@@ -294,9 +294,7 @@ void DisposeThreadData( void *data )
if(data) {
void *twentybytes = ((libthreaddata_t *) data)->twentybytes;
- if(twentybytes)
- free(twentybytes);
-
+ free(twentybytes);
free(data);
}
}
@@ -307,13 +305,13 @@ void DisposeThreadData( void *data )
int main ( void )
{
- /* initialize any globals here... */
+ /* initialize any globals here... */
- /* do this if any global initializing was done
- SynchronizeStart();
- */
- ExitThread (TSR_THREAD, 0);
- return 0;
+ /* do this if any global initializing was done
+ SynchronizeStart();
+ */
+ ExitThread (TSR_THREAD, 0);
+ return 0;
}
#endif /* __NOVELL_LIBC__ */
diff --git a/lib/nwos.c b/lib/nwos.c
index ac365124..23ff2a71 100644
--- a/lib/nwos.c
+++ b/lib/nwos.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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,21 +20,20 @@
*
***************************************************************************/
-#ifdef NETWARE /* Novell NetWare */
+#include "curl_setup.h"
-#include <stdlib.h>
+#ifdef NETWARE /* Novell NetWare */
#ifdef __NOVELL_LIBC__
/* For native LibC-based NLM we need to do nothing. */
int netware_init ( void )
{
- return 0;
+ return 0;
}
#else /* __NOVELL_LIBC__ */
/* For native CLib-based NLM we need to initialize the LONG namespace. */
-#include <stdio.h>
#include <nwnspace.h>
#include <nwthread.h>
#include <nwadv.h>
@@ -48,48 +47,42 @@ NETINET_DEFINE_CONTEXT
int netware_init ( void )
{
- int rc = 0;
- unsigned int myHandle = GetNLMHandle();
- /* import UnAugmentAsterisk dynamically for NW4.x compatibility */
- void (*pUnAugmentAsterisk)(int) = (void(*)(int))
- ImportSymbol(myHandle, "UnAugmentAsterisk");
- /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */
- void (*pUseAccurateCaseForPaths)(int) = (void(*)(int))
- ImportSymbol(myHandle, "UseAccurateCaseForPaths");
- if(pUnAugmentAsterisk)
- pUnAugmentAsterisk(1);
- if(pUseAccurateCaseForPaths)
- pUseAccurateCaseForPaths(1);
- UnimportSymbol(myHandle, "UnAugmentAsterisk");
- UnimportSymbol(myHandle, "UseAccurateCaseForPaths");
- /* set long name space */
- if((SetCurrentNameSpace(4) == 255)) {
- rc = 1;
- }
- if((SetTargetNameSpace(4) == 255)) {
- rc = rc + 2;
- }
- return rc;
+ int rc = 0;
+ unsigned int myHandle = GetNLMHandle();
+ /* import UnAugmentAsterisk dynamically for NW4.x compatibility */
+ void (*pUnAugmentAsterisk)(int) = (void(*)(int))
+ ImportSymbol(myHandle, "UnAugmentAsterisk");
+ /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */
+ void (*pUseAccurateCaseForPaths)(int) = (void(*)(int))
+ ImportSymbol(myHandle, "UseAccurateCaseForPaths");
+ if(pUnAugmentAsterisk)
+ pUnAugmentAsterisk(1);
+ if(pUseAccurateCaseForPaths)
+ pUseAccurateCaseForPaths(1);
+ UnimportSymbol(myHandle, "UnAugmentAsterisk");
+ UnimportSymbol(myHandle, "UseAccurateCaseForPaths");
+ /* set long name space */
+ if((SetCurrentNameSpace(4) == 255)) {
+ rc = 1;
+ }
+ if((SetTargetNameSpace(4) == 255)) {
+ rc = rc + 2;
+ }
+ return rc;
}
/* dummy function to satisfy newer prelude */
int __init_environment ( void )
{
- return 0;
+ return 0;
}
/* dummy function to satisfy newer prelude */
int __deinit_environment ( void )
{
- return 0;
+ return 0;
}
#endif /* __NOVELL_LIBC__ */
-#else /* NETWARE */
-
-#ifdef __POCC__
-# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */
-#endif
-
#endif /* NETWARE */
diff --git a/lib/objnames-test08.sh b/lib/objnames-test08.sh
new file mode 100755
index 00000000..82bf4f97
--- /dev/null
+++ b/lib/objnames-test08.sh
@@ -0,0 +1,217 @@
+#!/bin/sh
+# ***************************************************************************
+# * _ _ ____ _
+# * Project ___| | | | _ \| |
+# * / __| | | | |_) | |
+# * | (__| |_| | _ <| |___
+# * \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, 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 Bourne shell script file is used by test case 1222 to do
+# unit testing of curl_8char_object_name() shell function which
+# is defined in file objnames.inc and sourced by this file and
+# any other shell script that may use it.
+#
+
+#
+# argument validation
+#
+
+if test $# -eq 1; then
+ :
+else
+ echo "Usage: ${0} srcdir"
+ exit 1
+fi
+
+if test -f "${1}/runtests.pl"; then
+ :
+else
+ echo "${0}: Wrong srcdir"
+ exit 1
+fi
+
+srcdir=${1}
+
+if test -f "$srcdir/../lib/objnames.inc"; then
+ :
+else
+ echo "$0: Missing objnames.inc"
+ exit 1
+fi
+
+#
+# Some variables
+#
+
+logdir=log
+tstnum=1222
+
+list_c=$logdir/${tstnum}_list_c
+list_obj=$logdir/${tstnum}_list_obj
+list_obj_c=$logdir/${tstnum}_list_obj_c
+list_obj_uniq=$logdir/${tstnum}_list_obj_uniq
+
+
+#
+# Source curl_8char_object_name() function definition
+#
+
+. $srcdir/../lib/objnames.inc
+
+#
+# Some curl_8char_object_name() unit tests
+#
+
+echo 'Testing curl_8char_object_name...'
+echo ""
+
+argstr=123__678__ABC__FGH__KLM__PQRSTUV
+expect=16AFKPQR
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678__ABC__FGH__KLM__PQ.S.UV
+expect=16AFKPQ
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678__ABC..FGH..KLM..PQRSTUV
+expect=16ABC
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678_.ABC._FGH__KLM__PQRSTUV
+expect=16
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123.567.90ABCDEFGHIJKLMNOPQRSTUV
+expect=123
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567.90A.CDEFGHIJKLMNOPQRSTUV
+expect=1234567
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890.BCD.FGHIJKLMNOPQRSTUV
+expect=12345678
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
+expect=1470AB
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
+expect=12345678
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90A_CDE_GHIJKLMNOPQRSTUV
+expect=159CGHIJ
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90A_CDEFGHIJKLMNOPQRSTUV
+expect=159CDEFG
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90ABCDEFGHIJKLMNOPQRSTUV
+expect=1590ABCD
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567890ABCDEFGHIJKLMNOPQRSTUV
+expect=1567890A
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
+expect=12345678
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+#
+# Verify that generated object name is distinct for
+# all *.c source files in lib and src subdirectories.
+#
+
+ls $srcdir/../lib/*.c > $list_c
+ls $srcdir/../src/*.c >> $list_c
+
+rm -f $list_obj
+
+for c_fname in `cat $list_c`; do
+ obj_name=`curl_8char_object_name $c_fname`
+ echo "$obj_name" >> $list_obj
+done
+
+sort -u $list_obj > $list_obj_uniq
+
+cnt_c=`cat $list_c | wc -l`
+cnt_u=`cat $list_obj_uniq | wc -l`
+
+echo ""
+echo ""
+echo ""
+if test $cnt_c -eq $cnt_u; then
+ echo "8-characters-or-less generated object names are unique."
+ obj_name_clash="no"
+else
+ echo "8-characters-or-less generated object names are clashing..."
+ obj_name_clash="yes"
+fi
+
+if test $obj_name_clash = "yes"; then
+ #
+ # Show clashing object names and respective source file names
+ #
+ echo ""
+ paste $list_obj $list_c | sort > $list_obj_c
+ prev_match="no"
+ prev_line="unknown"
+ prev_obj_name="unknown"
+ while read this_line; do
+ obj_name=`echo "$this_line" | cut -f1`
+ if test "x$obj_name" = "x$prev_obj_name"; then
+ if test "x$prev_match" != "xyes"; then
+ echo "$prev_line"
+ echo "$this_line"
+ prev_match="yes"
+ else
+ echo "$this_line"
+ fi
+ else
+ prev_match="no"
+ fi
+ prev_line=$this_line
+ prev_obj_name=$obj_name
+ done < $list_obj_c
+fi
+
+rm -f $list_c
+rm -f $list_obj
+rm -f $list_obj_c
+rm -f $list_obj_uniq
+
+# end of objnames-test.sh
diff --git a/lib/objnames-test10.sh b/lib/objnames-test10.sh
new file mode 100755
index 00000000..2d85b8f5
--- /dev/null
+++ b/lib/objnames-test10.sh
@@ -0,0 +1,217 @@
+#!/bin/sh
+# ***************************************************************************
+# * _ _ ____ _
+# * Project ___| | | | _ \| |
+# * / __| | | | |_) | |
+# * | (__| |_| | _ <| |___
+# * \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, 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 Bourne shell script file is used by test case 1221 to do
+# unit testing of curl_10char_object_name() shell function which
+# is defined in file objnames.inc and sourced by this file and
+# any other shell script that may use it.
+#
+
+#
+# argument validation
+#
+
+if test $# -eq 1; then
+ :
+else
+ echo "Usage: ${0} srcdir"
+ exit 1
+fi
+
+if test -f "${1}/runtests.pl"; then
+ :
+else
+ echo "${0}: Wrong srcdir"
+ exit 1
+fi
+
+srcdir=${1}
+
+if test -f "$srcdir/../lib/objnames.inc"; then
+ :
+else
+ echo "$0: Missing objnames.inc"
+ exit 1
+fi
+
+#
+# Some variables
+#
+
+logdir=log
+tstnum=1221
+
+list_c=$logdir/${tstnum}_list_c
+list_obj=$logdir/${tstnum}_list_obj
+list_obj_c=$logdir/${tstnum}_list_obj_c
+list_obj_uniq=$logdir/${tstnum}_list_obj_uniq
+
+
+#
+# Source curl_10char_object_name() function definition
+#
+
+. $srcdir/../lib/objnames.inc
+
+#
+# Some curl_10char_object_name() unit tests
+#
+
+echo 'Testing curl_10char_object_name...'
+echo ""
+
+argstr=123__678__ABC__FGH__KLM__PQRSTUV
+expect=16AFKPQRST
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678__ABC__FGH__KLM__PQ.S.UV
+expect=16AFKPQ
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678__ABC..FGH..KLM..PQRSTUV
+expect=16ABC
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678_.ABC._FGH__KLM__PQRSTUV
+expect=16
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123.567.90ABCDEFGHIJKLMNOPQRSTUV
+expect=123
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567.90A.CDEFGHIJKLMNOPQRSTUV
+expect=1234567
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890.BCD.FGHIJKLMNOPQRSTUV
+expect=1234567890
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
+expect=1470AB
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
+expect=1234567890
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90A_CDE_GHIJKLMNOPQRSTUV
+expect=159CGHIJKL
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90A_CDEFGHIJKLMNOPQRSTUV
+expect=159CDEFGHI
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90ABCDEFGHIJKLMNOPQRSTUV
+expect=1590ABCDEF
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567890ABCDEFGHIJKLMNOPQRSTUV
+expect=1567890ABC
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
+expect=1234567890
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+#
+# Verify that generated object name is distinct for
+# all *.c source files in lib and src subdirectories.
+#
+
+ls $srcdir/../lib/*.c > $list_c
+ls $srcdir/../src/*.c >> $list_c
+
+rm -f $list_obj
+
+for c_fname in `cat $list_c`; do
+ obj_name=`curl_10char_object_name $c_fname`
+ echo "$obj_name" >> $list_obj
+done
+
+sort -u $list_obj > $list_obj_uniq
+
+cnt_c=`cat $list_c | wc -l`
+cnt_u=`cat $list_obj_uniq | wc -l`
+
+echo ""
+echo ""
+echo ""
+if test $cnt_c -eq $cnt_u; then
+ echo "10-characters-or-less generated object names are unique."
+ obj_name_clash="no"
+else
+ echo "10-characters-or-less generated object names are clashing..."
+ obj_name_clash="yes"
+fi
+
+if test $obj_name_clash = "yes"; then
+ #
+ # Show clashing object names and respective source file names
+ #
+ echo ""
+ paste $list_obj $list_c | sort > $list_obj_c
+ prev_match="no"
+ prev_line="unknown"
+ prev_obj_name="unknown"
+ while read this_line; do
+ obj_name=`echo "$this_line" | cut -f1`
+ if test "x$obj_name" = "x$prev_obj_name"; then
+ if test "x$prev_match" != "xyes"; then
+ echo "$prev_line"
+ echo "$this_line"
+ prev_match="yes"
+ else
+ echo "$this_line"
+ fi
+ else
+ prev_match="no"
+ fi
+ prev_line=$this_line
+ prev_obj_name=$obj_name
+ done < $list_obj_c
+fi
+
+rm -f $list_c
+rm -f $list_obj
+rm -f $list_obj_c
+rm -f $list_obj_uniq
+
+# end of objnames-test10.sh
diff --git a/lib/objnames.inc b/lib/objnames.inc
new file mode 100644
index 00000000..8778492b
--- /dev/null
+++ b/lib/objnames.inc
@@ -0,0 +1,107 @@
+# ***************************************************************************
+# * _ _ ____ _
+# * Project ___| | | | _ \| |
+# * / __| | | | |_) | |
+# * | (__| |_| | _ <| |___
+# * \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 2012, Daniel Stenberg, <daniel@haxx.se>, 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 file is sourced from curl/packages/OS400/initscript.sh and
+# other Bourne shell scripts. Keep it as portable as possible.
+#
+
+#
+# curl_10char_object_name
+#
+# This shell function accepts a single string argument with unspecified
+# length representing a (*.c) source file name and returns a string which
+# is a transformation of given argument.
+#
+# The intended purpose of this function is to transliterate a (*.c) source
+# file name that may be longer than 10 characters, or not, into a string
+# with at most 10 characters which may be used as an OS/400 object name.
+#
+# This function might not be universally usefull, nor we care about it.
+#
+# It is intended to be used with libcurl's (*.c) source file names, so
+# dependency on libcurl's source file naming scheme is acceptable and
+# good enough for its intended use. Specifically it makes use of the fact
+# that libcurl's (*.c) source file names which may be longer than 10 chars
+# are conformed with underscore '_' separated substrings, or separated by
+# other character which does not belong to the [0-9], [a-z] or [A-Z] sets.
+#
+# This allows repeatable and automatic short object name generation with
+# no need for a hardcoded mapping table.
+#
+# Transformation is done in the following way:
+#
+# 1) Leading directory components are removed.
+# 2) Leftmost dot character and any other char following it are removed.
+# 3) Lowercase characters are transliterated to uppercase.
+# 4) Characters not in [A-Z] or [0-9] are transliterated to underscore '_'.
+# 5) Every sequence of one or more underscores is replaced with a single one.
+# 6) Five leftmost substrings which end in an underscore character are
+# replaced by the first character of each substring, while retaining
+# the rest of the string.
+# 7) Finally the result is truncated to 10 characters.
+#
+# Resulting object name may be shorter than 10 characters.
+#
+# Test case 1221 does unit testng of this function and also verifies
+# that it is possible to generate distinct short object names for all
+# curl and libcurl *.c source file names.
+#
+
+curl_10char_object_name() {
+ echo "${1}" | \
+ sed -e 's:.*/::' \
+ -e 's:[.].*::' \
+ -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' \
+ -e 's:[^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_]:_:g' \
+ -e 's:__*:_:g' \
+ -e 's:\([^_]\)[^_]*_\(.*\):\1\2:' \
+ -e 's:\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3:' \
+ -e 's:\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4:' \
+ -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5:' \
+ -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5\6:' \
+ -e 's:^\(..........\).*:\1:'
+}
+
+#
+# curl_8char_object_name
+#
+# Same as curl_10char_object_name() description and details above, except
+# that object name is limited to 8 charcters maximum.
+#
+
+curl_8char_object_name() {
+ echo "${1}" | \
+ sed -e 's:.*/::' \
+ -e 's:[.].*::' \
+ -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' \
+ -e 's:[^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_]:_:g' \
+ -e 's:__*:_:g' \
+ -e 's:\([^_]\)[^_]*_\(.*\):\1\2:' \
+ -e 's:\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3:' \
+ -e 's:\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4:' \
+ -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5:' \
+ -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5\6:' \
+ -e 's:^\(........\).*:\1:'
+}
+
+# end of objectname.inc
diff --git a/lib/openldap.c b/lib/openldap.c
index 4d5db4a5..bee552f3 100644
--- a/lib/openldap.c
+++ b/lib/openldap.c
@@ -6,6 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2010, Howard Chu, <hyc@openldap.org>
+ * Copyright (C) 2011 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 +21,7 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_LDAP) && defined(USE_OPENLDAP)
@@ -40,28 +41,29 @@
#include "urldata.h"
#include <curl/curl.h>
#include "sendf.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "transfer.h"
#include "curl_ldap.h"
-#include "curl_memory.h"
#include "curl_base64.h"
+#include "connect.h"
+#include "curl_printf.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
#ifndef _LDAP_PVT_H
extern int ldap_pvt_url_scheme2proto(const char *);
-extern int ldap_init_fd(ber_socket_t fd, int proto, const char *url, LDAP **ld);
+extern int ldap_init_fd(ber_socket_t fd, int proto, const char *url,
+ LDAP **ld);
#endif
-static CURLcode ldap_setup(struct connectdata *conn);
+static CURLcode ldap_setup_connection(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);
static CURLcode ldap_connecting(struct connectdata *conn, bool *done);
-static CURLcode ldap_disconnect(struct connectdata *conn);
+static CURLcode ldap_disconnect(struct connectdata *conn, bool dead);
static Curl_recv ldap_recv;
@@ -71,7 +73,7 @@ static Curl_recv ldap_recv;
const struct Curl_handler Curl_handler_ldap = {
"LDAP", /* scheme */
- ldap_setup, /* setup_connection */
+ ldap_setup_connection, /* setup_connection */
ldap_do, /* do_it */
ldap_done, /* done */
ZERO_NULL, /* do_more */
@@ -80,10 +82,13 @@ const struct Curl_handler Curl_handler_ldap = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ldap_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_LDAP, /* defport */
- PROT_LDAP /* protocol */
+ CURLPROTO_LDAP, /* protocol */
+ PROTOPT_NONE /* flags */
};
#ifdef USE_SSL
@@ -93,7 +98,7 @@ const struct Curl_handler Curl_handler_ldap = {
const struct Curl_handler Curl_handler_ldaps = {
"LDAPS", /* scheme */
- ldap_setup, /* setup_connection */
+ ldap_setup_connection, /* setup_connection */
ldap_do, /* do_it */
ldap_done, /* done */
ZERO_NULL, /* do_more */
@@ -102,10 +107,13 @@ const struct Curl_handler Curl_handler_ldaps = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ldap_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_LDAPS, /* defport */
- PROT_LDAP | PROT_SSL /* protocol */
+ CURLPROTO_LDAP, /* protocol */
+ PROTOPT_SSL /* flags */
};
#endif
@@ -139,7 +147,7 @@ typedef struct ldapreqinfo {
int nument;
} ldapreqinfo;
-static CURLcode ldap_setup(struct connectdata *conn)
+static CURLcode ldap_setup_connection(struct connectdata *conn)
{
ldapconninfo *li;
LDAPURLDesc *lud;
@@ -148,11 +156,11 @@ static CURLcode ldap_setup(struct connectdata *conn)
CURLcode status;
rc = ldap_url_parse(data->change.url, &lud);
- if (rc != LDAP_URL_SUCCESS) {
+ if(rc != LDAP_URL_SUCCESS) {
const char *msg = "url parsing problem";
status = CURLE_URL_MALFORMAT;
- if (rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) {
- if (rc == LDAP_URL_ERR_MEM)
+ if(rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) {
+ if(rc == LDAP_URL_ERR_MEM)
status = CURLE_OUT_OF_MEMORY;
msg = url_errs[rc];
}
@@ -163,9 +171,11 @@ static CURLcode ldap_setup(struct connectdata *conn)
ldap_free_urldesc(lud);
li = calloc(1, sizeof(ldapconninfo));
+ if(!li)
+ return CURLE_OUT_OF_MEMORY;
li->proto = proto;
conn->proto.generic = li;
- conn->bits.close = FALSE;
+ connkeep(conn, "OpenLDAP default");
/* TODO:
* - provide option to choose SASL Binds instead of Simple
*/
@@ -179,19 +189,22 @@ 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], *ptr;
+ char hosturl[1024];
+ char *ptr;
+
+ (void)done;
strcpy(hosturl, "ldap");
ptr = hosturl+4;
- if (conn->protocol & PROT_SSL)
+ if(conn->handler->flags & PROTOPT_SSL)
*ptr++ = 's';
snprintf(ptr, sizeof(hosturl)-(ptr-hosturl), "://%s:%d",
- conn->host.name, conn->port);
+ conn->host.name, conn->remote_port);
rc = ldap_init_fd(conn->sock[FIRSTSOCKET], li->proto, hosturl, &li->ld);
- if (rc) {
+ if(rc) {
failf(data, "LDAP local: Cannot connect to %s, %s",
hosturl, ldap_err2string(rc));
return CURLE_COULDNT_CONNECT;
@@ -199,76 +212,39 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done)
ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto);
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
- if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
- /* for LDAP over HTTP proxy */
- struct HTTP http_proxy;
- ldapconninfo *li_save;
+#ifdef USE_SSL
+ if(conn->handler->flags & PROTOPT_SSL) {
CURLcode result;
-
- /* BLOCKING */
- /* We want "seamless" LDAP operations through HTTP proxy tunnel */
-
- /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
- * conn->proto.http; we want LDAP through HTTP and we have to change the
- * member temporarily for connecting to the HTTP proxy. After
- * Curl_proxyCONNECT we have to set back the member to the original struct
- * LDAP pointer
- */
- li_save = data->state.proto.generic;
- memset(&http_proxy, 0, sizeof(http_proxy));
- data->state.proto.http = &http_proxy;
- result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
- conn->host.name, conn->remote_port);
-
- data->state.proto.generic = li_save;
-
- if(CURLE_OK != result)
+ result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone);
+ if(result)
return result;
}
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
-
-#ifdef USE_SSL
- if (conn->protocol & PROT_SSL) {
- CURLcode res;
- if (data->state.used_interface == Curl_if_easy) {
- res = Curl_ssl_connect(conn, FIRSTSOCKET);
- if (res)
- return res;
- li->ssldone = TRUE;
- } else {
- res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone);
- if (res)
- return res;
- }
- }
#endif
- if (data->state.used_interface == Curl_if_easy)
- return ldap_connecting(conn, done);
-
return CURLE_OK;
}
static CURLcode ldap_connecting(struct connectdata *conn, bool *done)
{
ldapconninfo *li = conn->proto.generic;
- struct SessionHandle *data=conn->data;
- LDAPMessage *result = NULL;
- struct timeval tv = {0,1}, *tvp;
+ struct SessionHandle *data = conn->data;
+ LDAPMessage *msg = NULL;
+ struct timeval tv = {0, 1}, *tvp;
int rc, err;
char *info = NULL;
#ifdef USE_SSL
- if (conn->protocol & PROT_SSL) {
+ if(conn->handler->flags & PROTOPT_SSL) {
/* Is the SSL handshake complete yet? */
- if (!li->ssldone) {
- CURLcode res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone);
- if (res || !li->ssldone)
- return res;
+ if(!li->ssldone) {
+ CURLcode result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET,
+ &li->ssldone);
+ if(result || !li->ssldone)
+ return result;
}
+
/* Have we installed the libcurl SSL handlers into the sockbuf yet? */
- if (!li->sslinst) {
+ if(!li->sslinst) {
Sockbuf *sb;
ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb);
ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, conn);
@@ -279,54 +255,57 @@ static CURLcode ldap_connecting(struct connectdata *conn, bool *done)
}
#endif
- if (data->state.used_interface == Curl_if_easy)
- tvp = NULL; /* let ldap_result block indefinitely */
- else
- tvp = &tv;
+ tvp = &tv;
retry:
- if (!li->didbind) {
+ if(!li->didbind) {
char *binddn;
struct berval passwd;
- if (conn->bits.user_passwd) {
+ if(conn->bits.user_passwd) {
binddn = conn->user;
passwd.bv_val = conn->passwd;
passwd.bv_len = strlen(passwd.bv_val);
- } else {
+ }
+ else {
binddn = NULL;
passwd.bv_val = NULL;
passwd.bv_len = 0;
}
rc = ldap_sasl_bind(li->ld, binddn, LDAP_SASL_SIMPLE, &passwd,
NULL, NULL, &li->msgid);
- if (rc)
+ if(rc)
return CURLE_LDAP_CANNOT_BIND;
li->didbind = TRUE;
- if (tvp)
+ if(tvp)
return CURLE_OK;
}
- rc = ldap_result(li->ld, li->msgid, LDAP_MSG_ONE, tvp, &result);
- if (rc < 0) {
+ rc = ldap_result(li->ld, li->msgid, LDAP_MSG_ONE, tvp, &msg);
+ if(rc < 0) {
failf(data, "LDAP local: bind ldap_result %s", ldap_err2string(rc));
return CURLE_LDAP_CANNOT_BIND;
}
- if (rc == 0) {
+ if(rc == 0) {
/* timed out */
return CURLE_OK;
}
- rc = ldap_parse_result(li->ld, result, &err, NULL, &info, NULL, NULL, 1);
- if (rc) {
+
+ rc = ldap_parse_result(li->ld, msg, &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) {
+ if(err == LDAP_PROTOCOL_ERROR) {
int proto;
ldap_get_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto);
- if (proto == LDAP_VERSION3) {
- ldap_memfree(info);
+ if(proto == LDAP_VERSION3) {
+ if(info) {
+ ldap_memfree(info);
+ info = NULL;
+ }
proto = LDAP_VERSION2;
ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto);
li->didbind = FALSE;
@@ -334,22 +313,29 @@ retry:
}
}
- if (err) {
+ if(err) {
failf(data, "LDAP remote: bind failed %s %s", ldap_err2string(rc),
info ? info : "");
+ if(info)
+ ldap_memfree(info);
return CURLE_LOGIN_DENIED;
}
+
+ if(info)
+ ldap_memfree(info);
conn->recv[FIRSTSOCKET] = ldap_recv;
*done = TRUE;
+
return CURLE_OK;
}
-static CURLcode ldap_disconnect(struct connectdata *conn)
+static CURLcode ldap_disconnect(struct connectdata *conn, bool dead_connection)
{
ldapconninfo *li = conn->proto.generic;
+ (void) dead_connection;
- if (li) {
- if (li->ld) {
+ if(li) {
+ if(li->ld) {
ldap_unbind_ext(li->ld, NULL, NULL);
li->ld = NULL;
}
@@ -369,16 +355,16 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done)
int msgid;
struct SessionHandle *data=conn->data;
- conn->bits.close = FALSE;
+ connkeep(conn, "OpenLDAP do");
infof(data, "LDAP local: %s\n", data->change.url);
rc = ldap_url_parse(data->change.url, &ludp);
- if (rc != LDAP_URL_SUCCESS) {
+ if(rc != LDAP_URL_SUCCESS) {
const char *msg = "url parsing problem";
status = CURLE_URL_MALFORMAT;
- if (rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) {
- if (rc == LDAP_URL_ERR_MEM)
+ if(rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) {
+ if(rc == LDAP_URL_ERR_MEM)
status = CURLE_OUT_OF_MEMORY;
msg = url_errs[rc];
}
@@ -390,13 +376,15 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done)
ludp->lud_filter, ludp->lud_attrs, 0,
NULL, NULL, NULL, 0, &msgid);
ldap_free_urldesc(ludp);
- if (rc != LDAP_SUCCESS) {
+ if(rc != LDAP_SUCCESS) {
failf(data, "LDAP local: ldap_search_ext %s", ldap_err2string(rc));
return CURLE_LDAP_SEARCH_FAILED;
}
- lr = calloc(1,sizeof(ldapreqinfo));
+ lr = calloc(1, sizeof(ldapreqinfo));
+ if(!lr)
+ return CURLE_OUT_OF_MEMORY;
lr->msgid = msgid;
- data->state.proto.generic = lr;
+ data->req.protop = lr;
Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL);
*done = TRUE;
return CURLE_OK;
@@ -405,20 +393,22 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done)
static CURLcode ldap_done(struct connectdata *conn, CURLcode res,
bool premature)
{
- ldapreqinfo *lr = conn->data->state.proto.generic;
+ ldapreqinfo *lr = conn->data->req.protop;
+
(void)res;
(void)premature;
- if (lr) {
+ if(lr) {
/* if there was a search in progress, abandon it */
- if (lr->msgid) {
+ if(lr->msgid) {
ldapconninfo *li = conn->proto.generic;
ldap_abandon_ext(li->ld, lr->msgid, NULL, NULL);
lr->msgid = 0;
}
- conn->data->state.proto.generic = NULL;
+ conn->data->req.protop = NULL;
free(lr);
}
+
return CURLE_OK;
}
@@ -426,19 +416,20 @@ 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;
- ldapreqinfo *lr = data->state.proto.generic;
+ struct SessionHandle *data = conn->data;
+ ldapreqinfo *lr = data->req.protop;
int rc, ret;
- LDAPMessage *result = NULL;
+ LDAPMessage *msg = NULL;
LDAPMessage *ent;
BerElement *ber = NULL;
- struct timeval tv = {0,1};
+ struct timeval tv = {0, 1};
+
(void)len;
(void)buf;
(void)sockindex;
- rc = ldap_result(li->ld, lr->msgid, LDAP_MSG_RECEIVED, &tv, &result);
- if (rc < 0) {
+ rc = ldap_result(li->ld, lr->msgid, LDAP_MSG_RECEIVED, &tv, &msg);
+ if(rc < 0) {
failf(data, "LDAP local: search ldap_result %s", ldap_err2string(rc));
*err = CURLE_RECV_ERROR;
return -1;
@@ -448,29 +439,32 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf,
ret = -1;
/* timed out */
- if (result == NULL)
+ if(!msg)
return ret;
- for (ent = ldap_first_message(li->ld, result); ent;
+ for(ent = ldap_first_message(li->ld, msg); ent;
ent = ldap_next_message(li->ld, ent)) {
struct berval bv, *bvals, **bvp = &bvals;
int binary = 0, msgtype;
msgtype = ldap_msgtype(ent);
- if (msgtype == LDAP_RES_SEARCH_RESULT) {
+ if(msgtype == LDAP_RES_SEARCH_RESULT) {
int code;
char *info = NULL;
rc = ldap_parse_result(li->ld, ent, &code, NULL, &info, NULL, NULL, 0);
- if (rc) {
- failf(data, "LDAP local: search ldap_parse_result %s", ldap_err2string(rc));
+ if(rc) {
+ failf(data, "LDAP local: search ldap_parse_result %s",
+ ldap_err2string(rc));
*err = CURLE_LDAP_SEARCH_FAILED;
- } else if (code && code != LDAP_SIZELIMIT_EXCEEDED) {
+ }
+ else if(code && code != LDAP_SIZELIMIT_EXCEEDED) {
failf(data, "LDAP remote: search failed %s %s", ldap_err2string(rc),
- info ? info : "");
+ info ? info : "");
*err = CURLE_LDAP_SEARCH_FAILED;
- } else {
+ }
+ else {
/* successful */
- if (code == LDAP_SIZELIMIT_EXCEEDED)
+ if(code == LDAP_SIZELIMIT_EXCEEDED)
infof(data, "There are more than %d entries\n", lr->nument);
data->req.size = data->req.bytecount;
*err = CURLE_OK;
@@ -479,81 +473,136 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf,
lr->msgid = 0;
ldap_memfree(info);
break;
- } else if (msgtype != LDAP_RES_SEARCH_ENTRY) {
- continue;
}
+ else if(msgtype != LDAP_RES_SEARCH_ENTRY)
+ continue;
lr->nument++;
rc = ldap_get_dn_ber(li->ld, ent, &ber, &bv);
- 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);
+ if(rc < 0) {
+ /* TODO: verify that this is really how this return code should be
+ handled */
+ *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;
data->req.bytecount += bv.bv_len + 5;
- for (rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp);
+ for(rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp);
rc == LDAP_SUCCESS;
rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp)) {
int i;
- if (bv.bv_val == NULL) break;
+ if(bv.bv_val == NULL) break;
- if (bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7))
+ if(bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7))
binary = 1;
+ else
+ binary = 0;
- for (i=0; bvals[i].bv_val != NULL; i++) {
+ for(i=0; bvals[i].bv_val != NULL; i++) {
int binval = 0;
- 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);
+ *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;
data->req.bytecount += bv.bv_len + 2;
- if (!binary) {
+ if(!binary) {
/* check for leading or trailing whitespace */
- if (isspace(bvals[i].bv_val[0]) ||
- isspace(bvals[i].bv_val[bvals[i].bv_len-1])) {
+ if(ISSPACE(bvals[i].bv_val[0]) ||
+ ISSPACE(bvals[i].bv_val[bvals[i].bv_len-1]))
binval = 1;
- } else {
+ else {
/* check for unprintable characters */
unsigned int j;
- for (j=0; j<bvals[i].bv_len; j++)
- if (!isprint(bvals[i].bv_val[j])) {
+ for(j=0; j<bvals[i].bv_len; j++)
+ if(!ISPRINT(bvals[i].bv_val[j])) {
binval = 1;
break;
}
}
}
- if (binary || binval) {
- char *val_b64;
+ if(binary || binval) {
+ char *val_b64 = NULL;
+ size_t val_b64_sz = 0;
/* Binary value, encode to base64. */
- size_t val_b64_sz = Curl_base64_encode(data,
- bvals[i].bv_val,
- bvals[i].bv_len,
- &val_b64);
- Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2);
+ CURLcode error = Curl_base64_encode(data,
+ bvals[i].bv_val,
+ bvals[i].bv_len,
+ &val_b64,
+ &val_b64_sz);
+ if(error) {
+ ber_memfree(bvals);
+ ber_free(ber, 0);
+ ldap_msgfree(msg);
+ *err = error;
+ return -1;
+ }
+ *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2);
+ if(*err)
+ return -1;
+
data->req.bytecount += 2;
if(val_b64_sz > 0) {
- Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, val_b64_sz);
+ *err = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64,
+ val_b64_sz);
+ if(*err)
+ return -1;
free(val_b64);
data->req.bytecount += val_b64_sz;
}
- } else {
- Curl_client_write(conn, CLIENTWRITE_BODY, (char *)" ", 1);
- Curl_client_write(conn, CLIENTWRITE_BODY, bvals[i].bv_val,
- bvals[i].bv_len);
+ }
+ 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;
+
data->req.bytecount += bvals[i].bv_len + 1;
}
- Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+ *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+ if(*err)
+ return -1;
+
data->req.bytecount++;
}
ber_memfree(bvals);
- Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+ *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+ if(*err)
+ return -1;
data->req.bytecount++;
}
- Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+ *err = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+ if(*err)
+ return -1;
data->req.bytecount++;
ber_free(ber, 0);
}
- ldap_msgfree(result);
+ ldap_msgfree(msg);
return ret;
}
@@ -584,7 +633,7 @@ static int
ldapsb_tls_ctrl(Sockbuf_IO_Desc *sbiod, int opt, void *arg)
{
(void)arg;
- if (opt == LBER_SB_OPT_DATA_READY) {
+ if(opt == LBER_SB_OPT_DATA_READY) {
struct connectdata *conn = sbiod->sbiod_pvt;
return Curl_ssl_data_pending(conn, FIRSTSOCKET);
}
@@ -600,7 +649,7 @@ ldapsb_tls_read(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
CURLcode err = CURLE_RECV_ERROR;
ret = li->recv(conn, FIRSTSOCKET, buf, len, &err);
- if (ret < 0 && err == CURLE_AGAIN) {
+ if(ret < 0 && err == CURLE_AGAIN) {
SET_SOCKERRNO(EWOULDBLOCK);
}
return ret;
@@ -615,7 +664,7 @@ ldapsb_tls_write(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
CURLcode err = CURLE_SEND_ERROR;
ret = li->send(conn, FIRSTSOCKET, buf, len, &err);
- if (ret < 0 && err == CURLE_AGAIN) {
+ if(ret < 0 && err == CURLE_AGAIN) {
SET_SOCKERRNO(EWOULDBLOCK);
}
return ret;
diff --git a/lib/parsedate.c b/lib/parsedate.c
index 5d8af269..3e168f5a 100644
--- a/lib/parsedate.c
+++ b/lib/parsedate.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,17 +72,16 @@
20040911 +0200
*/
-#include "setup.h"
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* for strtol() */
+#include "curl_setup.h"
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
#endif
#include <curl/curl.h>
#include "rawstr.h"
+#include "warnless.h"
#include "parsedate.h"
const char * const Curl_wkday[] =
@@ -99,6 +98,24 @@ struct tzinfo {
int offset; /* +/- in minutes */
};
+/*
+ * parsedate()
+ *
+ * Returns:
+ *
+ * PARSEDATE_OK - a fine conversion
+ * PARSEDATE_FAIL - failed to convert
+ * PARSEDATE_LATER - time overflow at the far end of time_t
+ * PARSEDATE_SOONER - time underflow at the low end of time_t
+ */
+
+static int parsedate(const char *date, time_t *output);
+
+#define PARSEDATE_OK 0
+#define PARSEDATE_FAIL -1
+#define PARSEDATE_LATER 1
+#define PARSEDATE_SOONER 2
+
/* Here's a bunch of frequently used time zone names. These were supported
by the old getdate parser. */
#define tDAYZONE -60 /* offset for daylight savings time */
@@ -159,7 +176,8 @@ static const struct tzinfo tz[]= {
{"G", +7 * 60}, /* Golf */
{"H", +8 * 60}, /* Hotel */
{"I", +9 * 60}, /* India */
- /* "J", Juliet is not used as a timezone, to indicate the observer's local time */
+ /* "J", Juliet is not used as a timezone, to indicate the observer's local
+ time */
{"K", +10 * 60}, /* Kilo */
{"L", +11 * 60}, /* Lima */
{"M", +12 * 60}, /* Mike */
@@ -281,11 +299,11 @@ static time_t my_timegm(struct my_tm *tm)
year = tm->tm_year + 1900;
month = tm->tm_mon;
- if (month < 0) {
+ if(month < 0) {
year += (11 - month) / 12;
month = 11 - (11 - month) % 12;
}
- else if (month >= 12) {
+ else if(month >= 12) {
year -= month / 12;
month = month % 12;
}
@@ -300,7 +318,7 @@ static time_t my_timegm(struct my_tm *tm)
}
/*
- * Curl_parsedate()
+ * parsedate()
*
* Returns:
*
@@ -310,7 +328,7 @@ static time_t my_timegm(struct my_tm *tm)
* PARSEDATE_SOONER - time underflow at the low end of time_t
*/
-int Curl_parsedate(const char *date, time_t *output)
+static int parsedate(const char *date, time_t *output)
{
time_t t = 0;
int wdaynum=-1; /* day of the week number, 0-6 (mon-sun) */
@@ -335,9 +353,11 @@ int Curl_parsedate(const char *date, time_t *output)
/* a name coming up */
char buf[32]="";
size_t len;
- sscanf(date, "%31[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]",
- buf);
- len = strlen(buf);
+ if(sscanf(date, "%31[ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "abcdefghijklmnopqrstuvwxyz]", buf))
+ len = strlen(buf);
+ else
+ len = 0;
if(wdaynum == -1) {
wdaynum = checkday(buf, len);
@@ -378,7 +398,26 @@ int Curl_parsedate(const char *date, time_t *output)
secnum = 0;
}
else {
- val = (int)strtol(date, &end, 10);
+ long lval;
+ int error;
+ int old_errno;
+
+ old_errno = ERRNO;
+ SET_ERRNO(0);
+ lval = strtol(date, &end, 10);
+ error = ERRNO;
+ if(error != old_errno)
+ SET_ERRNO(old_errno);
+
+ if(error)
+ return PARSEDATE_FAIL;
+
+#if LONG_MAX != INT_MAX
+ if((lval > (long)INT_MAX) || (lval < (long)INT_MIN))
+ return PARSEDATE_FAIL;
+#endif
+
+ val = curlx_sltosi(lval);
if((tzoff == -1) &&
((end - date) == 4) &&
@@ -386,7 +425,7 @@ int Curl_parsedate(const char *date, time_t *output)
(indate< date) &&
((date[-1] == '+' || date[-1] == '-'))) {
/* four digits and a value less than or equal to 1400 (to take into
- account all sorts of funny time zone diffs) and it is preceeded
+ account all sorts of funny time zone diffs) and it is preceded
with a plus or minus. This is a time zone indication. 1400 is
picked since +1300 is frequently used and +1400 is mentioned as
an edge number in the document "ISO C 200X Proposal: Timezone
@@ -465,6 +504,10 @@ int Curl_parsedate(const char *date, time_t *output)
return PARSEDATE_SOONER;
}
+ if((mdaynum > 31) || (monnum > 11) ||
+ (hournum > 23) || (minnum > 59) || (secnum > 60))
+ return PARSEDATE_FAIL; /* clearly an illegal date */
+
tm.tm_sec = secnum;
tm.tm_min = minnum;
tm.tm_hour = hournum;
@@ -487,8 +530,10 @@ int Curl_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 + delta < t))
- return -1; /* time_t overflow */
+ if((delta>0) && (t > LONG_MAX - delta)) {
+ *output = 0x7fffffff;
+ return PARSEDATE_LATER; /* time_t overflow */
+ }
t += delta;
}
@@ -500,8 +545,8 @@ int Curl_parsedate(const char *date, time_t *output)
time_t curl_getdate(const char *p, const time_t *now)
{
- time_t parsed;
- int rc = Curl_parsedate(p, &parsed);
+ time_t parsed = -1;
+ int rc = parsedate(p, &parsed);
(void)now; /* legacy argument from the past that we ignore */
switch(rc) {
@@ -513,3 +558,26 @@ time_t curl_getdate(const char *p, const time_t *now)
/* everything else is fail */
return -1;
}
+
+/*
+ * Curl_gmtime() is a gmtime() replacement for portability. Do not use the
+ * gmtime_r() or gmtime() functions anywhere else but here.
+ *
+ */
+
+CURLcode Curl_gmtime(time_t intime, struct tm *store)
+{
+ const struct tm *tm;
+#ifdef HAVE_GMTIME_R
+ /* thread-safe version */
+ tm = (struct tm *)gmtime_r(&intime, store);
+#else
+ tm = gmtime(&intime);
+ if(tm)
+ *store = *tm; /* copy the pointed struct to the local copy */
+#endif
+
+ if(!tm)
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ return CURLE_OK;
+}
diff --git a/lib/parsedate.h b/lib/parsedate.h
index e1bf5441..ade0f4f6 100644
--- a/lib/parsedate.h
+++ b/lib/parsedate.h
@@ -1,5 +1,5 @@
-#ifndef __CURL_PARSEDATE_H
-#define __CURL_PARSEDATE_H
+#ifndef HEADER_CURL_PARSEDATE_H
+#define HEADER_CURL_PARSEDATE_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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,22 +25,7 @@
extern const char * const Curl_wkday[7];
extern const char * const Curl_month[12];
-/*
- * Curl_parsedate()
- *
- * Returns:
- *
- * PARSEDATE_OK - a fine conversion
- * PARSEDATE_FAIL - failed to convert
- * PARSEDATE_LATER - time overflow at the far end of time_t
- * PARSEDATE_SOONER - time underflow at the low end of time_t
- */
-
-int Curl_parsedate(const char *date, time_t *output);
+CURLcode Curl_gmtime(time_t intime, struct tm *store);
-#define PARSEDATE_OK 0
-#define PARSEDATE_FAIL -1
-#define PARSEDATE_LATER 1
-#define PARSEDATE_SOONER 2
+#endif /* HEADER_CURL_PARSEDATE_H */
-#endif
diff --git a/lib/pingpong.c b/lib/pingpong.c
index 876a6a21..16707927 100644
--- a/lib/pingpong.c
+++ b/lib/pingpong.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,7 +23,7 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "urldata.h"
#include "sendf.h"
@@ -32,9 +32,9 @@
#include "speedcheck.h"
#include "pingpong.h"
#include "multiif.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "non-ascii.h"
+#include "vtls/vtls.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
@@ -75,48 +75,10 @@ long Curl_pp_state_timeout(struct pingpong *pp)
return timeout_ms;
}
-
/*
- * Curl_pp_multi_statemach()
- *
- * called repeatedly until done when the multi interface is used.
+ * Curl_pp_statemach()
*/
-CURLcode Curl_pp_multi_statemach(struct pingpong *pp)
-{
- struct connectdata *conn = pp->conn;
- curl_socket_t sock = conn->sock[FIRSTSOCKET];
- int rc;
- struct SessionHandle *data=conn->data;
- CURLcode result = CURLE_OK;
- long timeout_ms = Curl_pp_state_timeout(pp);
-
- if(timeout_ms <= 0) {
- failf(data, "server response timeout");
- return CURLE_OPERATION_TIMEDOUT;
- }
-
- rc = Curl_socket_ready(pp->sendleft?CURL_SOCKET_BAD:sock, /* reading */
- pp->sendleft?sock:CURL_SOCKET_BAD, /* writing */
- 0);
-
- if(rc == -1) {
- failf(data, "select/poll error");
- return CURLE_OUT_OF_MEMORY;
- }
- else if(rc != 0)
- result = pp->statemach_act(conn);
-
- /* if rc == 0, then select() timed out */
-
- return result;
-}
-
-/*
- * Curl_pp_easy_statemach()
- *
- * called repeatedly until done when the easy interface is used.
- */
-CURLcode Curl_pp_easy_statemach(struct pingpong *pp)
+CURLcode Curl_pp_statemach(struct pingpong *pp, bool block)
{
struct connectdata *conn = pp->conn;
curl_socket_t sock = conn->sock[FIRSTSOCKET];
@@ -124,29 +86,44 @@ CURLcode Curl_pp_easy_statemach(struct pingpong *pp)
long interval_ms;
long timeout_ms = Curl_pp_state_timeout(pp);
struct SessionHandle *data=conn->data;
- CURLcode result;
+ CURLcode result = CURLE_OK;
if(timeout_ms <=0 ) {
failf(data, "server response timeout");
return CURLE_OPERATION_TIMEDOUT; /* already too little time */
}
- interval_ms = 1000; /* use 1 second timeout intervals */
- if(timeout_ms < interval_ms)
- interval_ms = timeout_ms;
-
- rc = Curl_socket_ready(pp->sendleft?CURL_SOCKET_BAD:sock, /* reading */
- pp->sendleft?sock:CURL_SOCKET_BAD, /* writing */
- (int)interval_ms);
-
- if(Curl_pgrsUpdate(conn))
- result = CURLE_ABORTED_BY_CALLBACK;
+ if(block) {
+ interval_ms = 1000; /* use 1 second timeout intervals */
+ if(timeout_ms < interval_ms)
+ interval_ms = timeout_ms;
+ }
else
- result = Curl_speedcheck(data, Curl_tvnow());
+ interval_ms = 0; /* immediate */
+
+ if(Curl_pp_moredata(pp))
+ /* We are receiving and there is data in the cache so just read it */
+ rc = 1;
+ else if(!pp->sendleft && Curl_ssl_data_pending(conn, FIRSTSOCKET))
+ /* We are receiving and there is data ready in the SSL library */
+ rc = 1;
+ else
+ rc = Curl_socket_ready(pp->sendleft?CURL_SOCKET_BAD:sock, /* reading */
+ pp->sendleft?sock:CURL_SOCKET_BAD, /* writing */
+ interval_ms);
+
+ if(block) {
+ /* if we didn't wait, we don't have to spend time on this now */
+ if(Curl_pgrsUpdate(conn))
+ result = CURLE_ABORTED_BY_CALLBACK;
+ else
+ result = Curl_speedcheck(data, Curl_tvnow());
+
+ if(result)
+ return result;
+ }
- if(result)
- ;
- else if(rc == -1) {
+ if(rc == -1) {
failf(data, "select/poll error");
result = CURLE_OUT_OF_MEMORY;
}
@@ -170,15 +147,12 @@ void Curl_pp_init(struct pingpong *pp)
/***********************************************************************
*
- * Curl_pp_sendfv()
+ * Curl_pp_vsendf()
*
* Send the formated string as a command to a pingpong server. Note that
* the string should not have any CRLF appended, as this function will
* append the necessary things itself.
*
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
- *
* made to never block
*/
CURLcode Curl_pp_vsendf(struct pingpong *pp,
@@ -186,70 +160,75 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp,
va_list args)
{
ssize_t bytes_written;
-/* may still not be big enough for some krb5 tokens */
-#define SBUF_SIZE 1024
- char s[SBUF_SIZE];
size_t write_len;
- char *sptr=s;
- CURLcode res = CURLE_OK;
+ char *fmt_crlf;
+ char *s;
+ CURLcode result;
struct connectdata *conn = pp->conn;
struct SessionHandle *data = conn->data;
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+#ifdef HAVE_GSSAPI
enum protection_level data_sec = conn->data_prot;
#endif
- vsnprintf(s, SBUF_SIZE-3, fmt, args);
+ DEBUGASSERT(pp->sendleft == 0);
+ DEBUGASSERT(pp->sendsize == 0);
+ DEBUGASSERT(pp->sendthis == NULL);
+
+ fmt_crlf = aprintf("%s\r\n", fmt); /* append a trailing CRLF */
+ if(!fmt_crlf)
+ return CURLE_OUT_OF_MEMORY;
- strcat(s, "\r\n"); /* append a trailing CRLF */
+ s = vaprintf(fmt_crlf, args); /* trailing CRLF appended */
+ free(fmt_crlf);
+ if(!s)
+ return CURLE_OUT_OF_MEMORY;
- bytes_written=0;
+ bytes_written = 0;
write_len = strlen(s);
Curl_pp_init(pp);
-#ifdef CURL_DOES_CONVERSIONS
- res = Curl_convert_to_network(data, s, write_len);
+ result = Curl_convert_to_network(data, s, write_len);
/* Curl_convert_to_network calls failf if unsuccessful */
- if(res != CURLE_OK) {
- return res;
+ if(result) {
+ free(s);
+ return result;
}
-#endif /* CURL_DOES_CONVERSIONS */
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
- conn->data_prot = prot_cmd;
+#ifdef HAVE_GSSAPI
+ conn->data_prot = PROT_CMD;
#endif
- res = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len,
- &bytes_written);
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+ result = 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(CURLE_OK != res)
- return res;
+ if(result) {
+ free(s);
+ return result;
+ }
if(conn->data->set.verbose)
Curl_debug(conn->data, CURLINFO_HEADER_OUT,
- sptr, (size_t)bytes_written, conn);
+ s, (size_t)bytes_written, conn);
if(bytes_written != (ssize_t)write_len) {
- /* the whole chunk was not sent, store the rest of the data */
- write_len -= bytes_written;
- sptr += bytes_written;
- pp->sendthis = malloc(write_len);
- if(pp->sendthis) {
- memcpy(pp->sendthis, sptr, write_len);
- pp->sendsize = pp->sendleft = write_len;
- }
- else {
- failf(data, "out of memory");
- res = CURLE_OUT_OF_MEMORY;
- }
+ /* the whole chunk was not sent, keep it around and adjust sizes */
+ pp->sendthis = s;
+ pp->sendsize = write_len;
+ pp->sendleft = write_len - bytes_written;
}
- else
+ else {
+ free(s);
+ pp->sendthis = NULL;
+ pp->sendleft = pp->sendsize = 0;
pp->response = Curl_tvnow();
+ }
- return res;
+ return CURLE_OK;
}
@@ -261,23 +240,20 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp,
* the string should not have any CRLF appended, as this function will
* append the necessary things itself.
*
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
- *
* made to never block
*/
CURLcode Curl_pp_sendf(struct pingpong *pp,
const char *fmt, ...)
{
- CURLcode res;
+ CURLcode result;
va_list ap;
va_start(ap, fmt);
- res = Curl_pp_vsendf(pp, fmt, ap);
+ result = Curl_pp_vsendf(pp, fmt, ap);
va_end(ap);
- return res;
+ return result;
}
/*
@@ -307,18 +283,15 @@ 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_resp<BUFSIZE) && (keepon && !result)) {
if(pp->cache) {
/* we had data in the "cache", copy that instead of doing an actual
* read
*
- * ftp->cache_size is cast to int here. This should be safe,
- * because it would have been populated with something of size
- * int to begin with, even though its datatype may be larger
- * than an int.
+ * pp->cache_size is cast to ssize_t here. This should be safe, because
+ * it would have been populated with something of size int to begin
+ * with, even though its datatype may be larger than an int.
*/
DEBUGASSERT((ptr+pp->cache_size) <= (buf+BUFSIZE+1));
memcpy(ptr, pp->cache, pp->cache_size);
@@ -328,33 +301,28 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
pp->cache_size = 0; /* zero the size just in case */
}
else {
- int res;
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+#ifdef HAVE_GSSAPI
enum protection_level prot = conn->data_prot;
-
- conn->data_prot = 0;
+ conn->data_prot = PROT_CLEAR;
#endif
DEBUGASSERT((ptr+BUFSIZE-pp->nread_resp) <= (buf+BUFSIZE+1));
- res = Curl_read(conn, sockfd, ptr, BUFSIZE-pp->nread_resp,
- &gotbytes);
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+ result = 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(res == CURLE_AGAIN)
+ if(result == CURLE_AGAIN)
return CURLE_OK; /* return */
-#ifdef CURL_DOES_CONVERSIONS
- if((res == CURLE_OK) && (gotbytes > 0)) {
+ if(!result && (gotbytes > 0))
/* convert from the network encoding */
- res = Curl_convert_from_network(data, ptr, gotbytes);
- /* Curl_convert_from_network calls failf if unsuccessful */
- }
-#endif /* CURL_DOES_CONVERSIONS */
+ result = Curl_convert_from_network(data, ptr, gotbytes);
+ /* Curl_convert_from_network calls failf if unsuccessful */
- if(CURLE_OK != res) {
- result = (CURLcode)res; /* Set outer result variable to this error. */
+ if(result)
+ /* Set outer result variable to this error. */
keepon = FALSE;
- }
}
if(!keepon)
@@ -362,7 +330,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
else if(gotbytes <= 0) {
keepon = FALSE;
result = CURLE_RECV_ERROR;
- failf(data, "FTP response reading failed");
+ failf(data, "response reading failed");
}
else {
/* we got a whole chunk of data, which can be anything from one
@@ -378,11 +346,11 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
for(i = 0; i < gotbytes; ptr++, i++) {
perline++;
if(*ptr=='\n') {
- /* a newline is CRLF in ftp-talk, so the CR is ignored as
+ /* a newline is CRLF in pp-talk, so the CR is ignored as
the line isn't really terminated until the LF comes */
/* output debug output if that is requested */
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+#ifdef HAVE_GSSAPI
if(!conn->sec_complete)
#endif
if(data->set.verbose)
@@ -399,15 +367,12 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
if(result)
return result;
- if(pp->endofresp(pp, code)) {
+ if(pp->endofresp(conn, pp->linestart_resp, perline, code)) {
/* This is the end of the last line, copy the last line to the
- start of the buffer and zero terminate, for old times sake (and
- krb4)! */
- char *meow;
- int n;
- for(meow=pp->linestart_resp, n=0; meow<ptr; meow++, n++)
- buf[n] = *meow;
- *meow=0; /* zero terminate */
+ start of the buffer and zero terminate, for old times sake */
+ size_t n = ptr - pp->linestart_resp;
+ memmove(buf, pp->linestart_resp, n);
+ buf[n]=0; /* zero terminate */
keepon=FALSE;
pp->linestart_resp = ptr+1; /* advance pointer */
i++; /* skip this before getting out */
@@ -428,6 +393,9 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
it may actually contain another end of response already! */
clipamount = gotbytes - i;
restart = TRUE;
+ DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing "
+ "server response left\n",
+ (int)clipamount));
}
else if(keepon) {
@@ -435,8 +403,8 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
/* We got an excessive line without newlines and we need to deal
with it. We keep the first bytes of the line then we throw
away the rest. */
- infof(data, "Excessive server response line length received, %zd bytes."
- " Stripping\n", gotbytes);
+ infof(data, "Excessive server response line length received, "
+ "%zd bytes. Stripping\n", gotbytes);
restart = TRUE;
/* we keep 40 bytes since all our pingpong protocols are only
@@ -444,9 +412,9 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
clipamount = 40;
}
else if(pp->nread_resp > BUFSIZE/2) {
- /* We got a large chunk of data and there's potentially still trailing
- data to take care of, so we put any such part in the "cache", clear
- the buffer to make space and restart. */
+ /* We got a large chunk of data and there's potentially still
+ trailing data to take care of, so we put any such part in the
+ "cache", clear the buffer to make space and restart. */
clipamount = perline;
restart = TRUE;
}
@@ -504,11 +472,9 @@ 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];
-
- result = Curl_write(conn, sock, pp->sendthis + pp->sendsize -
- pp->sendleft, pp->sendleft, &written);
+ CURLcode result = Curl_write(conn, sock, pp->sendthis + pp->sendsize -
+ pp->sendleft, pp->sendleft, &written);
if(result)
return result;
@@ -527,13 +493,15 @@ CURLcode Curl_pp_flushsend(struct pingpong *pp)
CURLcode Curl_pp_disconnect(struct pingpong *pp)
{
- if(pp->cache) {
- free(pp->cache);
- pp->cache = NULL;
- }
+ free(pp->cache);
+ pp->cache = NULL;
return CURLE_OK;
}
-
+bool Curl_pp_moredata(struct pingpong *pp)
+{
+ return (!pp->sendleft && pp->cache && pp->nread_resp < pp->cache_size) ?
+ TRUE : FALSE;
+}
#endif
diff --git a/lib/pingpong.h b/lib/pingpong.h
index cbbff8f3..b925ab98 100644
--- a/lib/pingpong.h
+++ b/lib/pingpong.h
@@ -1,5 +1,5 @@
-#ifndef __PINGPONG_H
-#define __PINGPONG_H
+#ifndef HEADER_CURL_PINGPONG_H
+#define HEADER_CURL_PINGPONG_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -22,9 +22,7 @@
*
***************************************************************************/
-#include <stdarg.h>
-
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_FTP) || \
!defined(CURL_DISABLE_POP3) || !defined(CURL_DISABLE_SMTP)
@@ -34,6 +32,13 @@
/* forward-declaration, this is defined in urldata.h */
struct connectdata;
+typedef enum {
+ FTPTRANSFER_BODY, /* yes do transfer a body */
+ FTPTRANSFER_INFO, /* do still go through to get info/headers */
+ FTPTRANSFER_NONE, /* don't get anything and don't get info */
+ FTPTRANSFER_LAST /* end of list marker, never used */
+} curl_pp_transfer;
+
/*
* 'pingpong' is the generic struct used for protocols doing server<->client
* conversations in a back-and-forth style such as FTP, IMAP, POP3, SMTP etc.
@@ -66,23 +71,17 @@ struct pingpong {
CURLcode (*statemach_act)(struct connectdata *conn);
- int (*endofresp)(struct pingpong *pp, int *code);
+ bool (*endofresp)(struct connectdata *conn, char *ptr, size_t len,
+ int *code);
};
/*
- * Curl_pp_multi_statemach()
- *
- * called repeatedly until done when the multi interface is used.
- */
-CURLcode Curl_pp_multi_statemach(struct pingpong *pp);
-
-/*
- * Curl_pp_easy_statemach()
+ * Curl_pp_statemach()
*
- * called repeatedly until done when the easy interface is used.
+ * called repeatedly until done. Set 'wait' to make it wait a while on the
+ * socket if there's no traffic.
*/
-CURLcode Curl_pp_easy_statemach(struct pingpong *pp);
-
+CURLcode Curl_pp_statemach(struct pingpong *pp, bool block);
/* initialize stuff to prepare for reading a fresh new response */
void Curl_pp_init(struct pingpong *pp);
@@ -100,9 +99,6 @@ long Curl_pp_state_timeout(struct pingpong *pp);
* the string should not have any CRLF appended, as this function will
* append the necessary things itself.
*
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
- *
* made to never block
*/
CURLcode Curl_pp_sendf(struct pingpong *pp,
@@ -116,9 +112,6 @@ CURLcode Curl_pp_sendf(struct pingpong *pp,
* the string should not have any CRLF appended, as this function will
* append the necessary things itself.
*
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
- *
* made to never block
*/
CURLcode Curl_pp_vsendf(struct pingpong *pp,
@@ -144,4 +137,14 @@ CURLcode Curl_pp_disconnect(struct pingpong *pp);
int Curl_pp_getsock(struct pingpong *pp, curl_socket_t *socks,
int numsocks);
-#endif /* __PINGPONG_H */
+
+/***********************************************************************
+ *
+ * Curl_pp_moredata()
+ *
+ * Returns whether there are still more data in the cache and so a call
+ * to Curl_pp_readresp() will not block.
+ */
+bool Curl_pp_moredata(struct pingpong *pp);
+
+#endif /* HEADER_CURL_PINGPONG_H */
diff --git a/lib/pipeline.c b/lib/pipeline.c
new file mode 100644
index 00000000..1b38836c
--- /dev/null
+++ b/lib/pipeline.c
@@ -0,0 +1,433 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, 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/curl.h>
+
+#include "urldata.h"
+#include "url.h"
+#include "progress.h"
+#include "multiif.h"
+#include "pipeline.h"
+#include "sendf.h"
+#include "rawstr.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+struct site_blacklist_entry {
+ char *hostname;
+ unsigned short port;
+};
+
+static void site_blacklist_llist_dtor(void *user, void *element)
+{
+ struct site_blacklist_entry *entry = element;
+ (void)user;
+
+ Curl_safefree(entry->hostname);
+ free(entry);
+}
+
+static void server_blacklist_llist_dtor(void *user, void *element)
+{
+ (void)user;
+ free(element);
+}
+
+bool Curl_pipeline_penalized(struct SessionHandle *data,
+ struct connectdata *conn)
+{
+ if(data) {
+ bool penalized = FALSE;
+ curl_off_t penalty_size =
+ Curl_multi_content_length_penalty_size(data->multi);
+ curl_off_t chunk_penalty_size =
+ Curl_multi_chunk_length_penalty_size(data->multi);
+ curl_off_t recv_size = -2; /* Make it easy to spot in the log */
+
+ /* Find the head of the recv pipe, if any */
+ if(conn->recv_pipe && conn->recv_pipe->head) {
+ struct SessionHandle *recv_handle = conn->recv_pipe->head->ptr;
+
+ recv_size = recv_handle->req.size;
+
+ if(penalty_size > 0 && recv_size > penalty_size)
+ penalized = TRUE;
+ }
+
+ if(chunk_penalty_size > 0 &&
+ (curl_off_t)conn->chunk.datasize > chunk_penalty_size)
+ penalized = TRUE;
+
+ infof(data, "Conn: %ld (%p) Receive pipe weight: (%"
+ CURL_FORMAT_CURL_OFF_T "/%zu), penalized: %s\n",
+ conn->connection_id, (void *)conn, recv_size,
+ conn->chunk.datasize, penalized?"TRUE":"FALSE");
+ return penalized;
+ }
+ return FALSE;
+}
+
+static CURLcode addHandleToPipeline(struct SessionHandle *data,
+ struct curl_llist *pipeline)
+{
+ if(!Curl_llist_insert_next(pipeline, pipeline->tail, data))
+ return CURLE_OUT_OF_MEMORY;
+ return CURLE_OK;
+}
+
+
+CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle,
+ struct connectdata *conn)
+{
+ struct curl_llist_element *sendhead = conn->send_pipe->head;
+ struct curl_llist *pipeline;
+ CURLcode result;
+
+ pipeline = conn->send_pipe;
+
+ result = addHandleToPipeline(handle, pipeline);
+
+ if(pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) {
+ /* this is a new one as head, expire it */
+ Curl_pipeline_leave_write(conn); /* not in use yet */
+ Curl_expire(conn->send_pipe->head->ptr, 1);
+ }
+
+#if 0 /* enable for pipeline debugging */
+ print_pipeline(conn);
+#endif
+
+ return result;
+}
+
+/* Move this transfer from the sending list to the receiving list.
+
+ Pay special attention to the new sending list "leader" as it needs to get
+ checked to update what sockets it acts on.
+
+*/
+void Curl_move_handle_from_send_to_recv_pipe(struct SessionHandle *handle,
+ struct connectdata *conn)
+{
+ struct curl_llist_element *curr;
+
+ curr = conn->send_pipe->head;
+ while(curr) {
+ if(curr->ptr == handle) {
+ Curl_llist_move(conn->send_pipe, curr,
+ conn->recv_pipe, conn->recv_pipe->tail);
+
+ if(conn->send_pipe->head) {
+ /* Since there's a new easy handle at the start of the send pipeline,
+ set its timeout value to 1ms to make it trigger instantly */
+ Curl_pipeline_leave_write(conn); /* not used now */
+#ifdef DEBUGBUILD
+ infof(conn->data, "%p is at send pipe head B!\n",
+ (void *)conn->send_pipe->head->ptr);
+#endif
+ Curl_expire(conn->send_pipe->head->ptr, 1);
+ }
+
+ /* The receiver's list is not really interesting here since either this
+ handle is now first in the list and we'll deal with it soon, or
+ another handle is already first and thus is already taken care of */
+
+ break; /* we're done! */
+ }
+ curr = curr->next;
+ }
+}
+
+bool Curl_pipeline_site_blacklisted(struct SessionHandle *handle,
+ struct connectdata *conn)
+{
+ if(handle->multi) {
+ struct curl_llist *blacklist =
+ Curl_multi_pipelining_site_bl(handle->multi);
+
+ if(blacklist) {
+ struct curl_llist_element *curr;
+
+ curr = blacklist->head;
+ while(curr) {
+ struct site_blacklist_entry *site;
+
+ site = curr->ptr;
+ if(Curl_raw_equal(site->hostname, conn->host.name) &&
+ site->port == conn->remote_port) {
+ infof(handle, "Site %s:%d is pipeline blacklisted\n",
+ conn->host.name, conn->remote_port);
+ return TRUE;
+ }
+ curr = curr->next;
+ }
+ }
+ }
+ return FALSE;
+}
+
+CURLMcode Curl_pipeline_set_site_blacklist(char **sites,
+ struct curl_llist **list_ptr)
+{
+ struct curl_llist *old_list = *list_ptr;
+ struct curl_llist *new_list = NULL;
+
+ if(sites) {
+ new_list = Curl_llist_alloc((curl_llist_dtor) site_blacklist_llist_dtor);
+ if(!new_list)
+ return CURLM_OUT_OF_MEMORY;
+
+ /* Parse the URLs and populate the list */
+ while(*sites) {
+ char *hostname;
+ char *port;
+ struct site_blacklist_entry *entry;
+
+ hostname = strdup(*sites);
+ if(!hostname) {
+ Curl_llist_destroy(new_list, NULL);
+ return CURLM_OUT_OF_MEMORY;
+ }
+
+ entry = malloc(sizeof(struct site_blacklist_entry));
+ if(!entry) {
+ free(hostname);
+ Curl_llist_destroy(new_list, NULL);
+ return CURLM_OUT_OF_MEMORY;
+ }
+
+ port = strchr(hostname, ':');
+ if(port) {
+ *port = '\0';
+ port++;
+ entry->port = (unsigned short)strtol(port, NULL, 10);
+ }
+ else {
+ /* Default port number for HTTP */
+ entry->port = 80;
+ }
+
+ entry->hostname = hostname;
+
+ if(!Curl_llist_insert_next(new_list, new_list->tail, entry)) {
+ site_blacklist_llist_dtor(NULL, entry);
+ Curl_llist_destroy(new_list, NULL);
+ return CURLM_OUT_OF_MEMORY;
+ }
+
+ sites++;
+ }
+ }
+
+ /* Free the old list */
+ if(old_list) {
+ Curl_llist_destroy(old_list, NULL);
+ }
+
+ /* This might be NULL if sites == NULL, i.e the blacklist is cleared */
+ *list_ptr = new_list;
+
+ return CURLM_OK;
+}
+
+bool Curl_pipeline_server_blacklisted(struct SessionHandle *handle,
+ char *server_name)
+{
+ if(handle->multi && server_name) {
+ struct curl_llist *blacklist =
+ Curl_multi_pipelining_server_bl(handle->multi);
+
+ if(blacklist) {
+ struct curl_llist_element *curr;
+
+ curr = blacklist->head;
+ while(curr) {
+ char *bl_server_name;
+
+ bl_server_name = curr->ptr;
+ if(Curl_raw_nequal(bl_server_name, server_name,
+ strlen(bl_server_name))) {
+ infof(handle, "Server %s is blacklisted\n", server_name);
+ return TRUE;
+ }
+ curr = curr->next;
+ }
+ }
+
+ DEBUGF(infof(handle, "Server %s is not blacklisted\n", server_name));
+ }
+ return FALSE;
+}
+
+CURLMcode Curl_pipeline_set_server_blacklist(char **servers,
+ struct curl_llist **list_ptr)
+{
+ struct curl_llist *old_list = *list_ptr;
+ struct curl_llist *new_list = NULL;
+
+ if(servers) {
+ new_list = Curl_llist_alloc((curl_llist_dtor) server_blacklist_llist_dtor);
+ if(!new_list)
+ return CURLM_OUT_OF_MEMORY;
+
+ /* Parse the URLs and populate the list */
+ while(*servers) {
+ char *server_name;
+
+ server_name = strdup(*servers);
+ if(!server_name)
+ return CURLM_OUT_OF_MEMORY;
+
+ if(!Curl_llist_insert_next(new_list, new_list->tail, server_name))
+ return CURLM_OUT_OF_MEMORY;
+
+ servers++;
+ }
+ }
+
+ /* Free the old list */
+ if(old_list) {
+ Curl_llist_destroy(old_list, NULL);
+ }
+
+ /* This might be NULL if sites == NULL, i.e the blacklist is cleared */
+ *list_ptr = new_list;
+
+ return CURLM_OK;
+}
+
+static bool pipe_head(struct SessionHandle *data,
+ struct curl_llist *pipeline)
+{
+ struct curl_llist_element *curr = pipeline->head;
+ if(curr)
+ return (curr->ptr == data) ? TRUE : FALSE;
+
+ return FALSE;
+}
+
+/* returns TRUE if the given handle is head of the recv pipe */
+bool Curl_recvpipe_head(struct SessionHandle *data,
+ struct connectdata *conn)
+{
+ return pipe_head(data, conn->recv_pipe);
+}
+
+/* returns TRUE if the given handle is head of the send pipe */
+bool Curl_sendpipe_head(struct SessionHandle *data,
+ struct connectdata *conn)
+{
+ return pipe_head(data, conn->send_pipe);
+}
+
+
+/*
+ * Check if the write channel is available and this handle as at the head,
+ * then grab the channel and return TRUE.
+ *
+ * If not available, return FALSE.
+ */
+
+bool Curl_pipeline_checkget_write(struct SessionHandle *data,
+ struct connectdata *conn)
+{
+ if(conn->bits.multiplex)
+ /* when multiplexing, we can use it at once */
+ return TRUE;
+
+ if(!conn->writechannel_inuse && Curl_sendpipe_head(data, conn)) {
+ /* Grab the channel */
+ conn->writechannel_inuse = TRUE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+/*
+ * Check if the read channel is available and this handle as at the head, then
+ * grab the channel and return TRUE.
+ *
+ * If not available, return FALSE.
+ */
+
+bool Curl_pipeline_checkget_read(struct SessionHandle *data,
+ struct connectdata *conn)
+{
+ if(conn->bits.multiplex)
+ /* when multiplexing, we can use it at once */
+ return TRUE;
+
+ if(!conn->readchannel_inuse && Curl_recvpipe_head(data, conn)) {
+ /* Grab the channel */
+ conn->readchannel_inuse = TRUE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/*
+ * The current user of the pipeline write channel gives it up.
+ */
+void Curl_pipeline_leave_write(struct connectdata *conn)
+{
+ conn->writechannel_inuse = FALSE;
+}
+
+/*
+ * The current user of the pipeline read channel gives it up.
+ */
+void Curl_pipeline_leave_read(struct connectdata *conn)
+{
+ conn->readchannel_inuse = FALSE;
+}
+
+
+#if 0
+void print_pipeline(struct connectdata *conn)
+{
+ struct curl_llist_element *curr;
+ struct connectbundle *cb_ptr;
+ struct SessionHandle *data = conn->data;
+
+ cb_ptr = conn->bundle;
+
+ if(cb_ptr) {
+ curr = cb_ptr->conn_list->head;
+ while(curr) {
+ conn = curr->ptr;
+ infof(data, "- Conn %ld (%p) send_pipe: %zu, recv_pipe: %zu\n",
+ conn->connection_id,
+ (void *)conn,
+ conn->send_pipe->size,
+ conn->recv_pipe->size);
+ curr = curr->next;
+ }
+ }
+}
+
+#endif
diff --git a/lib/pipeline.h b/lib/pipeline.h
new file mode 100644
index 00000000..bf229f19
--- /dev/null
+++ b/lib/pipeline.h
@@ -0,0 +1,56 @@
+#ifndef HEADER_CURL_PIPELINE_H
+#define HEADER_CURL_PIPELINE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2013 - 2014, Linus Nielsen Feltzing, <linus@haxx.se>
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle,
+ struct connectdata *conn);
+void Curl_move_handle_from_send_to_recv_pipe(struct SessionHandle *handle,
+ struct connectdata *conn);
+bool Curl_pipeline_penalized(struct SessionHandle *data,
+ struct connectdata *conn);
+
+bool Curl_pipeline_site_blacklisted(struct SessionHandle *handle,
+ struct connectdata *conn);
+
+CURLMcode Curl_pipeline_set_site_blacklist(char **sites,
+ struct curl_llist **list_ptr);
+
+bool Curl_pipeline_server_blacklisted(struct SessionHandle *handle,
+ char *server_name);
+
+CURLMcode Curl_pipeline_set_server_blacklist(char **servers,
+ struct curl_llist **list_ptr);
+
+bool Curl_pipeline_checkget_write(struct SessionHandle *data,
+ struct connectdata *conn);
+bool Curl_pipeline_checkget_read(struct SessionHandle *data,
+ struct connectdata *conn);
+void Curl_pipeline_leave_write(struct connectdata *conn);
+void Curl_pipeline_leave_read(struct connectdata *conn);
+bool Curl_recvpipe_head(struct SessionHandle *data,
+ struct connectdata *conn);
+bool Curl_sendpipe_head(struct SessionHandle *data,
+ struct connectdata *conn);
+
+#endif /* HEADER_CURL_PIPELINE_H */
diff --git a/lib/polarssl.c b/lib/polarssl.c
deleted file mode 100644
index e81e6609..00000000
--- a/lib/polarssl.c
+++ /dev/null
@@ -1,375 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
- *
- * 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.
- *
- ***************************************************************************/
-
-/*
- * Source file for all PolarSSL-specific code for the TLS/SSL layer. No code
- * but sslgen.c should ever call or use these functions.
- *
- */
-
-#include "setup.h"
-#ifdef USE_POLARSSL
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#include <polarssl/net.h>
-#include <polarssl/ssl.h>
-#include <polarssl/havege.h>
-#include <polarssl/certs.h>
-#include <polarssl/x509.h>
-
-#include "urldata.h"
-#include "sendf.h"
-#include "inet_pton.h"
-#include "polarssl.h"
-#include "sslgen.h"
-#include "parsedate.h"
-#include "connect.h" /* for the connect timeout */
-#include "select.h"
-#include "rawstr.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-#include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
-
-/* Define this to enable lots of debugging for PolarSSL */
-#undef POLARSSL_DEBUG
-
-#ifdef POLARSSL_DEBUG
-static void polarssl_debug(void *context, int level, char *line)
-{
- struct SessionHandle *data = NULL;
-
- if(!context)
- return;
-
- data = (struct SessionHandle *)context;
-
- infof(data, "%s", line);
-}
-#else
-#endif
-
-static Curl_recv polarssl_recv;
-static Curl_send polarssl_send;
-
-/*
- * This function loads all the client/CA certificates and CRLs. Setup the TLS
- * layer and do all necessary magic.
- */
-CURLcode
-Curl_polarssl_connect(struct connectdata *conn,
- int sockindex)
-{
- struct SessionHandle *data = conn->data;
- bool sni = TRUE; /* default is SNI enabled */
- int ret = -1;
-#ifdef ENABLE_IPV6
- struct in6_addr addr;
-#else
- struct in_addr addr;
-#endif
- void *old_session = NULL;
- size_t old_session_size = 0;
- char buffer[1024];
-
- if(conn->ssl[sockindex].state == ssl_connection_complete)
- return CURLE_OK;
-
- /* PolarSSL only supports SSLv3 and TLSv1 */
- if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) {
- failf(data, "PolarSSL does not support SSLv2");
- return CURLE_SSL_CONNECT_ERROR;
- } else if(data->set.ssl.version == CURL_SSLVERSION_SSLv3) {
- sni = FALSE; /* SSLv3 has no SNI */
- }
-
- havege_init(&conn->ssl[sockindex].hs);
-
- /* Load the trusted CA */
- memset(&conn->ssl[sockindex].cacert, 0, sizeof(x509_cert));
-
- if(data->set.str[STRING_SSL_CAFILE]) {
- ret = x509parse_crtfile(&conn->ssl[sockindex].cacert,
- data->set.str[STRING_SSL_CAFILE]);
-
- if(ret) {
- failf(data, "Error reading ca cert file %s: -0x%04X",
- data->set.str[STRING_SSL_CAFILE], -ret);
-
- if(data->set.ssl.verifypeer)
- return CURLE_SSL_CACERT_BADFILE;
- }
- }
-
- /* Load the client certificate */
- memset(&conn->ssl[sockindex].clicert, 0, sizeof(x509_cert));
-
- if(data->set.str[STRING_CERT]) {
- ret = x509parse_crtfile(&conn->ssl[sockindex].clicert,
- data->set.str[STRING_CERT]);
-
- if(ret) {
- failf(data, "Error reading client cert file %s: -0x%04X",
- data->set.str[STRING_CERT], -ret);
- return CURLE_SSL_CERTPROBLEM;
- }
- }
-
- /* Load the client private key */
- if(data->set.str[STRING_KEY]) {
- ret = x509parse_keyfile(&conn->ssl[sockindex].rsa,
- data->set.str[STRING_KEY],
- data->set.str[STRING_KEY_PASSWD]);
-
- if(ret) {
- failf(data, "Error reading private key %s: -0x%04X",
- data->set.str[STRING_KEY], -ret);
- return CURLE_SSL_CERTPROBLEM;
- }
- }
-
- /* Load the CRL */
- memset(&conn->ssl[sockindex].crl, 0, sizeof(x509_crl));
-
- if(data->set.str[STRING_SSL_CRLFILE]) {
- ret = x509parse_crlfile(&conn->ssl[sockindex].crl,
- data->set.str[STRING_SSL_CRLFILE]);
-
- if(ret) {
- failf(data, "Error reading CRL file %s: -0x%04X",
- data->set.str[STRING_SSL_CRLFILE], -ret);
- return CURLE_SSL_CRL_BADFILE;
- }
- }
-
- infof(data, "PolarSSL: Connected to %s:%d\n",
- conn->host.name, conn->remote_port);
-
- havege_init(&conn->ssl[sockindex].hs);
-
- if(ssl_init(&conn->ssl[sockindex].ssl)) {
- failf(data, "PolarSSL: ssl_init failed");
- return CURLE_SSL_CONNECT_ERROR;
- }
-
- ssl_set_endpoint(&conn->ssl[sockindex].ssl, SSL_IS_CLIENT);
- ssl_set_authmode(&conn->ssl[sockindex].ssl, SSL_VERIFY_OPTIONAL);
-
- ssl_set_rng(&conn->ssl[sockindex].ssl, havege_rand,
- &conn->ssl[sockindex].hs);
- ssl_set_bio(&conn->ssl[sockindex].ssl,
- net_recv, &conn->sock[sockindex],
- net_send, &conn->sock[sockindex]);
-
- ssl_set_ciphers(&conn->ssl[sockindex].ssl, ssl_default_ciphers);
-
- if(!Curl_ssl_getsessionid(conn, &old_session, &old_session_size)) {
- memcpy(&conn->ssl[sockindex].ssn, old_session, old_session_size);
- infof(data, "PolarSSL re-using session\n");
- }
-
- ssl_set_session(&conn->ssl[sockindex].ssl, 1, 600,
- &conn->ssl[sockindex].ssn);
-
- ssl_set_ca_chain(&conn->ssl[sockindex].ssl,
- &conn->ssl[sockindex].cacert,
- &conn->ssl[sockindex].crl,
- conn->host.name);
-
- ssl_set_own_cert(&conn->ssl[sockindex].ssl,
- &conn->ssl[sockindex].clicert, &conn->ssl[sockindex].rsa);
-
- if(!Curl_inet_pton(AF_INET, conn->host.name, &addr) &&
-#ifdef ENABLE_IPV6
- !Curl_inet_pton(AF_INET6, conn->host.name, &addr) &&
-#endif
- sni && ssl_set_hostname(&conn->ssl[sockindex].ssl, conn->host.name)) {
- infof(data, "WARNING: failed to configure "
- "server name indication (SNI) TLS extension\n");
- }
-
- infof(data, "PolarSSL: performing SSL/TLS handshake...\n");
-
-#ifdef POLARSSL_DEBUG
- ssl_set_dbg(&conn->ssl[sockindex].ssl, polarssl_debug, data);
-#endif
-
- do {
- if (!(ret = ssl_handshake(&conn->ssl[sockindex].ssl))) {
- break;
- } else if(ret != POLARSSL_ERR_NET_TRY_AGAIN) {
- failf(data, "ssl_handshake returned -0x%04X", -ret);
- return CURLE_SSL_CONNECT_ERROR;
- } else {
- /* wait for data from server... */
- long timeout_ms = Curl_timeleft(conn, NULL, TRUE);
-
- if(timeout_ms < 0) {
- failf(data, "SSL connection timeout");
- return CURLE_OPERATION_TIMEDOUT;
- }
-
- switch(Curl_socket_ready(conn->sock[sockindex],
- CURL_SOCKET_BAD, timeout_ms)) {
- case 0:
- failf(data, "SSL handshake timeout");
- return CURLE_OPERATION_TIMEDOUT;
- break;
- case CURL_CSELECT_IN:
- continue;
- break;
- default:
- return CURLE_SSL_CONNECT_ERROR;
- break;
- }
- }
- } while (1);
-
- infof(data, "PolarSSL: Handshake complete, cipher is %s\n",
- ssl_get_cipher(&conn->ssl[sockindex].ssl));
-
- ret = ssl_get_verify_result(&conn->ssl[sockindex].ssl);
-
- if(ret && data->set.ssl.verifypeer) {
- if(ret & BADCERT_EXPIRED)
- failf(data, "Cert verify failed: BADCERT_EXPIRED\n");
-
- if(ret & BADCERT_REVOKED)
- failf(data, "Cert verify failed: BADCERT_REVOKED");
-
- if(ret & BADCERT_CN_MISMATCH)
- failf(data, "Cert verify failed: BADCERT_CN_MISMATCH");
-
- if(ret & BADCERT_NOT_TRUSTED)
- failf(data, "Cert verify failed: BADCERT_NOT_TRUSTED");
-
- return CURLE_SSL_CACERT;
- }
-
- if(conn->ssl[sockindex].ssl.peer_cert) {
- /* If the session was resumed, there will be no peer certs */
- memset(buffer, 0, sizeof(buffer));
-
- if(x509parse_cert_info(buffer, sizeof(buffer), (char *)"* ",
- conn->ssl[sockindex].ssl.peer_cert) != -1)
- infof(data, "Dumping cert info:\n%s\n", buffer);
- }
-
- conn->ssl[sockindex].state = ssl_connection_complete;
- conn->recv[sockindex] = polarssl_recv;
- conn->send[sockindex] = polarssl_send;
-
- /* Save the current session data for possible re-use */
- {
- void *new_session = malloc(sizeof(conn->ssl[sockindex].ssn));
-
- if(new_session) {
- memcpy(new_session, &conn->ssl[sockindex].ssn,
- sizeof(conn->ssl[sockindex].ssn));
-
- if(old_session)
- Curl_ssl_delsessionid(conn, old_session);
-
- return Curl_ssl_addsessionid(conn, new_session,
- sizeof(conn->ssl[sockindex].ssn));
- }
- }
-
- return CURLE_OK;
-}
-
-static ssize_t polarssl_send(struct connectdata *conn,
- int sockindex,
- const void *mem,
- size_t len,
- CURLcode *curlcode)
-{
- int ret = -1;
-
- ret = ssl_write(&conn->ssl[sockindex].ssl,
- (unsigned char *)mem, len);
-
- if(ret < 0) {
- *curlcode = (ret == POLARSSL_ERR_NET_TRY_AGAIN) ?
- CURLE_AGAIN : CURLE_SEND_ERROR;
- ret = -1;
- }
-
- return ret;
-}
-
-void Curl_polarssl_close_all(struct SessionHandle *data)
-{
- (void)data;
-}
-
-void Curl_polarssl_close(struct connectdata *conn, int sockindex)
-{
- rsa_free(&conn->ssl[sockindex].rsa);
- x509_free(&conn->ssl[sockindex].clicert);
- x509_free(&conn->ssl[sockindex].cacert);
- x509_crl_free(&conn->ssl[sockindex].crl);
- ssl_free(&conn->ssl[sockindex].ssl);
-}
-
-static ssize_t polarssl_recv(struct connectdata *conn,
- int num,
- char *buf,
- size_t buffersize,
- CURLcode *curlcode)
-{
- int ret = -1;
- ssize_t len = -1;
-
- memset(buf, 0, buffersize);
- ret = ssl_read(&conn->ssl[num].ssl, (unsigned char *)buf, buffersize);
-
- if(ret <= 0) {
- *curlcode = (ret == POLARSSL_ERR_NET_TRY_AGAIN) ?
- CURLE_AGAIN : CURLE_RECV_ERROR;
- return -1;
- }
-
- len = ret;
-
- return len;
-}
-
-void Curl_polarssl_session_free(void *ptr)
-{
- free(ptr);
-}
-
-size_t Curl_polarssl_version(char *buffer, size_t size)
-{
- return snprintf(buffer, size, "PolarSSL");
-}
-
-#endif
diff --git a/lib/polarssl.h b/lib/polarssl.h
deleted file mode 100644
index 964af172..00000000
--- a/lib/polarssl.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef HEADER_CURL_POLARSSL_H
-#define HEADER_CURL_POLARSSL_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
- *
- * 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.
- *
- * $Id: polarssl.h,v 1.10 2009-02-12 20:48:43 danf Exp $
- ***************************************************************************/
-
-#ifdef USE_POLARSSL
-
-CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex);
-
-/* tell PolarSSL to close down all open information regarding connections (and
- thus session ID caching etc) */
-void Curl_polarssl_close_all(struct SessionHandle *data);
-
- /* close a SSL connection */
-void Curl_polarssl_close(struct connectdata *conn, int sockindex);
-
-void Curl_polarssl_session_free(void *ptr);
-size_t Curl_polarssl_version(char *buffer, size_t size);
-int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex);
-
-/* API setup for PolarSSL */
-#define curlssl_init() (1)
-#define curlssl_cleanup()
-#define curlssl_connect Curl_polarssl_connect
-#define curlssl_session_free(x) Curl_polarssl_session_free(x)
-#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) (x=x, y=y, CURLE_FAILED_INIT)
-#define curlssl_set_engine_default(x) (x=x, CURLE_FAILED_INIT)
-#define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
-#define curlssl_version Curl_polarssl_version
-#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/pop3.c b/lib/pop3.c
index 9609b624..53510a21 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -18,28 +18,26 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
+ * RFC1734 POP3 Authentication
* RFC1939 POP3 protocol
+ * RFC2195 CRAM-MD5 authentication
* RFC2384 POP URL Scheme
+ * RFC2449 POP3 Extension Mechanism
* RFC2595 Using TLS with IMAP, POP3 and ACAP
+ * 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 <draft-murchison-sasl-login-00.txt>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_POP3
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -65,9 +63,6 @@
#include <curl/curl.h>
#include "urldata.h"
#include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
-#include "if2ip.h"
#include "hostip.h"
#include "progress.h"
#include "transfer.h"
@@ -78,37 +73,40 @@
#include "strtoofft.h"
#include "strequal.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "connect.h"
#include "strerror.h"
#include "select.h"
#include "multiif.h"
#include "url.h"
#include "rawstr.h"
-#include "strtoofft.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_sasl.h"
+#include "curl_md5.h"
+#include "warnless.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
/* Local API functions */
-static CURLcode pop3_parse_url_path(struct connectdata *conn);
static CURLcode pop3_regular_transfer(struct connectdata *conn, bool *done);
static CURLcode pop3_do(struct connectdata *conn, bool *done);
-static CURLcode pop3_done(struct connectdata *conn,
- CURLcode, bool premature);
+static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
+ bool premature);
static CURLcode pop3_connect(struct connectdata *conn, bool *done);
-static CURLcode pop3_disconnect(struct connectdata *conn);
+static CURLcode pop3_disconnect(struct connectdata *conn, bool dead);
static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done);
-static int pop3_getsock(struct connectdata *conn,
- curl_socket_t *socks,
+static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks,
int numsocks);
-static CURLcode pop3_doing(struct connectdata *conn,
- bool *dophase_done);
-static CURLcode pop3_setup_connection(struct connectdata * conn);
+static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done);
+static CURLcode pop3_setup_connection(struct connectdata *conn);
+static CURLcode pop3_parse_url_options(struct connectdata *conn);
+static CURLcode pop3_parse_url_path(struct connectdata *conn);
+static CURLcode pop3_parse_custom_request(struct connectdata *conn);
+static CURLcode pop3_perform_auth(struct connectdata *conn, const char *mech,
+ const char *initresp);
+static CURLcode pop3_continue_auth(struct connectdata *conn, const char *resp);
+static void pop3_get_message(char *buffer, char** outptr);
/*
* POP3 protocol handler.
@@ -125,13 +123,15 @@ const struct Curl_handler Curl_handler_pop3 = {
pop3_doing, /* doing */
pop3_getsock, /* proto_getsock */
pop3_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
pop3_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_POP3, /* defport */
- PROT_POP3 /* protocol */
+ CURLPROTO_POP3, /* protocol */
+ PROTOPT_CLOSEACTION | PROTOPT_NOURLQUERY /* flags */
};
-
#ifdef USE_SSL
/*
* POP3S protocol handler.
@@ -148,10 +148,14 @@ const struct Curl_handler Curl_handler_pop3s = {
pop3_doing, /* doing */
pop3_getsock, /* proto_getsock */
pop3_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
pop3_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_POP3S, /* defport */
- PROT_POP3 | PROT_POP3S | PROT_SSL /* protocol */
+ CURLPROTO_POP3S, /* protocol */
+ PROTOPT_CLOSEACTION | PROTOPT_SSL
+ | PROTOPT_NOURLQUERY /* flags */
};
#endif
@@ -162,7 +166,7 @@ const struct Curl_handler Curl_handler_pop3s = {
static const struct Curl_handler Curl_handler_pop3_proxy = {
"POP3", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -171,13 +175,15 @@ static const struct Curl_handler Curl_handler_pop3_proxy = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_POP3, /* defport */
- PROT_HTTP /* protocol */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
-
#ifdef USE_SSL
/*
* HTTP-proxyed POP3S protocol handler.
@@ -185,7 +191,7 @@ static const struct Curl_handler Curl_handler_pop3_proxy = {
static const struct Curl_handler Curl_handler_pop3s_proxy = {
"POP3S", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -194,320 +200,829 @@ static const struct Curl_handler Curl_handler_pop3s_proxy = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_POP3S, /* defport */
- PROT_HTTP /* protocol */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
#endif
#endif
+/* SASL parameters for the pop3 protocol */
+static const struct SASLproto saslpop3 = {
+ "pop", /* The service name */
+ '+', /* Code received when continuation is expected */
+ '+', /* Code to receive upon authentication success */
+ 255 - 8, /* Maximum initial response length (no max) */
+ pop3_perform_auth, /* Send authentication command */
+ pop3_continue_auth, /* Send authentication continuation */
+ pop3_get_message /* Get SASL response message */
+};
+
+#ifdef USE_SSL
+static void pop3_to_pop3s(struct connectdata *conn)
+{
+ conn->handler = &Curl_handler_pop3s;
+}
+#else
+#define pop3_to_pop3s(x) Curl_nop_stmt
+#endif
-/* function that checks for a pop3 status code at the start of the given
- string */
-static int pop3_endofresp(struct pingpong *pp,
- int *resp)
+/***********************************************************************
+ *
+ * pop3_endofresp()
+ *
+ * Checks for an ending POP3 status code at the start of the given string, but
+ * also detects the APOP timestamp from the server greeting and various
+ * capabilities from the CAPA response including the supported authentication
+ * types and allowed SASL mechanisms.
+ */
+static bool pop3_endofresp(struct connectdata *conn, char *line, size_t len,
+ int *resp)
{
- char *line = pp->linestart_resp;
- size_t len = pp->nread_resp;
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
+
+ /* Do we have an error response? */
+ if(len >= 4 && !memcmp("-ERR", line, 4)) {
+ *resp = '-';
- if( ((len >= 3) && !memcmp("+OK", line, 3)) ||
- ((len >= 4) && !memcmp("-ERR", line, 4)) ) {
- *resp=line[1]; /* O or E */
return TRUE;
}
- return FALSE; /* nothing for us */
+ /* Are we processing CAPA command responses? */
+ if(pop3c->state == POP3_CAPA) {
+ /* Do we have the terminating line? */
+ if(len >= 1 && !memcmp(line, ".", 1))
+ *resp = '+';
+ else
+ *resp = '*';
+
+ return TRUE;
+ }
+
+ /* Do we have a command or continuation response? */
+ if((len >= 3 && !memcmp("+OK", line, 3)) ||
+ (len >= 1 && !memcmp("+", line, 1))) {
+ *resp = '+';
+
+ return TRUE;
+ }
+
+ return FALSE; /* Nothing for us */
+}
+
+/***********************************************************************
+ *
+ * pop3_get_message()
+ *
+ * Gets the authentication message from the response buffer.
+ */
+static void pop3_get_message(char *buffer, char** outptr)
+{
+ size_t len = 0;
+ char* message = NULL;
+
+ /* Find the start of the message */
+ for(message = buffer + 2; *message == ' ' || *message == '\t'; message++)
+ ;
+
+ /* Find the end of the message */
+ for(len = strlen(message); len--;)
+ if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' &&
+ message[len] != '\t')
+ break;
+
+ /* Terminate the message */
+ if(++len) {
+ message[len] = '\0';
+ }
+
+ *outptr = message;
}
-/* This is the ONLY way to change POP3 state! */
-static void state(struct connectdata *conn,
- pop3state newstate)
+/***********************************************************************
+ *
+ * state()
+ *
+ * This is the ONLY way to change POP3 state!
+ */
+static void state(struct connectdata *conn, pop3state newstate)
{
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
/* for debug purposes */
- static const char * const names[]={
+ static const char * const names[] = {
"STOP",
"SERVERGREET",
+ "CAPA",
+ "STARTTLS",
+ "UPGRADETLS",
+ "AUTH",
+ "APOP",
"USER",
"PASS",
- "STARTTLS",
- "LIST",
- "RETR",
+ "COMMAND",
"QUIT",
/* LAST */
};
-#endif
- struct pop3_conn *pop3c = &conn->proto.pop3c;
-#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
+
if(pop3c->state != newstate)
infof(conn->data, "POP3 %p state change from %s to %s\n",
- pop3c, names[pop3c->state], names[newstate]);
+ (void *)pop3c, names[pop3c->state], names[newstate]);
#endif
+
pop3c->state = newstate;
}
-static CURLcode pop3_state_user(struct connectdata *conn)
+/***********************************************************************
+ *
+ * pop3_perform_capa()
+ *
+ * Sends the CAPA command in order to obtain a list of server side supported
+ * capabilities.
+ */
+static CURLcode pop3_perform_capa(struct connectdata *conn)
{
- CURLcode result;
- struct FTP *pop3 = conn->data->state.proto.pop3;
+ CURLcode result = CURLE_OK;
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
+
+ pop3c->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */
+ pop3c->sasl.authused = SASL_AUTH_NONE; /* Clear the auth. mechanism used */
+ pop3c->tls_supported = FALSE; /* Clear the TLS capability */
+
+ /* Send the CAPA command */
+ result = Curl_pp_sendf(&pop3c->pp, "%s", "CAPA");
+
+ if(!result)
+ state(conn, POP3_CAPA);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_perform_starttls()
+ *
+ * Sends the STLS command to start the upgrade to TLS.
+ */
+static CURLcode pop3_perform_starttls(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+
+ /* Send the STLS command */
+ result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "STLS");
+
+ if(!result)
+ state(conn, POP3_STARTTLS);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_perform_upgrade_tls()
+ *
+ * Performs the upgrade to TLS.
+ */
+static CURLcode pop3_perform_upgrade_tls(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
+
+ /* Start the SSL connection */
+ result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &pop3c->ssldone);
+
+ if(!result) {
+ if(pop3c->state != POP3_UPGRADETLS)
+ state(conn, POP3_UPGRADETLS);
+
+ if(pop3c->ssldone) {
+ pop3_to_pop3s(conn);
+ result = pop3_perform_capa(conn);
+ }
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_perform_user()
+ *
+ * Sends a clear text USER command to authenticate with.
+ */
+static CURLcode pop3_perform_user(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+
+ /* Check we have a username and password to authenticate with and end the
+ connect phase if we don't */
+ if(!conn->bits.user_passwd) {
+ state(conn, POP3_STOP);
- /* send USER */
- result = Curl_pp_sendf(&conn->proto.pop3c.pp, "USER %s",
- pop3->user?pop3->user:"");
- if(result)
return result;
+ }
- state(conn, POP3_USER);
+ /* Send the USER command */
+ result = Curl_pp_sendf(&conn->proto.pop3c.pp, "USER %s",
+ conn->user ? conn->user : "");
+ if(!result)
+ state(conn, POP3_USER);
- return CURLE_OK;
+ return result;
}
-/* For the POP3 "protocol connect" and "doing" phases only */
-static int pop3_getsock(struct connectdata *conn,
- curl_socket_t *socks,
- int numsocks)
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+/***********************************************************************
+ *
+ * pop3_perform_apop()
+ *
+ * Sends an APOP command to authenticate with.
+ */
+static CURLcode pop3_perform_apop(struct connectdata *conn)
{
- return Curl_pp_getsock(&conn->proto.pop3c.pp, socks, numsocks);
+ CURLcode result = CURLE_OK;
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
+ size_t i;
+ MD5_context *ctxt;
+ unsigned char digest[MD5_DIGEST_LEN];
+ char secret[2 * MD5_DIGEST_LEN + 1];
+
+ /* Check we have a username and password to authenticate with and end the
+ connect phase if we don't */
+ if(!conn->bits.user_passwd) {
+ state(conn, POP3_STOP);
+
+ return result;
+ }
+
+ /* Create the digest */
+ ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+ if(!ctxt)
+ return CURLE_OUT_OF_MEMORY;
+
+ Curl_MD5_update(ctxt, (const unsigned char *) pop3c->apoptimestamp,
+ curlx_uztoui(strlen(pop3c->apoptimestamp)));
+
+ Curl_MD5_update(ctxt, (const unsigned char *) conn->passwd,
+ curlx_uztoui(strlen(conn->passwd)));
+
+ /* Finalise the digest */
+ Curl_MD5_final(ctxt, digest);
+
+ /* Convert the calculated 16 octet digest into a 32 byte hex string */
+ for(i = 0; i < MD5_DIGEST_LEN; i++)
+ snprintf(&secret[2 * i], 3, "%02x", digest[i]);
+
+ result = Curl_pp_sendf(&pop3c->pp, "APOP %s %s", conn->user, secret);
+
+ if(!result)
+ state(conn, POP3_APOP);
+
+ return result;
}
+#endif
-/* for STARTTLS responses */
-static CURLcode pop3_state_starttls_resp(struct connectdata *conn,
- int pop3code,
- pop3state instate)
+/***********************************************************************
+ *
+ * pop3_perform_auth()
+ *
+ * Sends an AUTH command allowing the client to login with the given SASL
+ * authentication mechanism.
+ */
+static CURLcode pop3_perform_auth(struct connectdata *conn,
+ const char *mech,
+ const char *initresp)
{
CURLcode result = CURLE_OK;
- struct SessionHandle *data = conn->data;
- (void)instate; /* no use for this yet */
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
- if(pop3code != 'O') {
- failf(data, "STARTTLS denied. %c", pop3code);
- result = CURLE_LOGIN_DENIED;
+ if(initresp) { /* AUTH <mech> ...<crlf> */
+ /* Send the AUTH command with the initial response */
+ result = Curl_pp_sendf(&pop3c->pp, "AUTH %s %s", mech, initresp);
}
else {
- /* Curl_ssl_connect is BLOCKING */
- result = Curl_ssl_connect(conn, FIRSTSOCKET);
- if(CURLE_OK == result) {
- conn->protocol |= PROT_POP3S;
- result = pop3_state_user(conn);
+ /* Send the AUTH command */
+ result = Curl_pp_sendf(&pop3c->pp, "AUTH %s", mech);
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_continue_auth()
+ *
+ * Sends SASL continuation data or cancellation.
+ */
+static CURLcode pop3_continue_auth(struct connectdata *conn,
+ const char *resp)
+{
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
+
+ return Curl_pp_sendf(&pop3c->pp, "%s", resp);
+}
+
+/***********************************************************************
+ *
+ * pop3_perform_authentication()
+ *
+ * Initiates the authentication sequence, with the appropriate SASL
+ * authentication mechanism, falling back to APOP and clear text should a
+ * common mechanism not be available between the client and server.
+ */
+static CURLcode pop3_perform_authentication(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
+ saslprogress progress = SASL_IDLE;
+
+ /* Check we have enough data to authenticate with and end the
+ connect phase if we don't */
+ if(!Curl_sasl_can_authenticate(&pop3c->sasl, conn)) {
+ state(conn, POP3_STOP);
+ return result;
+ }
+
+ if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_SASL) {
+ /* Calculate the SASL login details */
+ result = Curl_sasl_start(&pop3c->sasl, conn, FALSE, &progress);
+
+ if(!result)
+ if(progress == SASL_INPROGRESS)
+ state(conn, POP3_AUTH);
+ }
+
+ if(!result && progress == SASL_IDLE) {
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+ if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
+ /* Perform APOP authentication */
+ result = pop3_perform_apop(conn);
+ else
+#endif
+ if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
+ /* Perform clear text authentication */
+ result = pop3_perform_user(conn);
+ else {
+ /* Other mechanisms not supported */
+ infof(conn->data, "No known authentication mechanisms supported!\n");
+ result = CURLE_LOGIN_DENIED;
}
}
- state(conn, POP3_STOP);
+
return result;
}
-/* for USER responses */
-static CURLcode pop3_state_user_resp(struct connectdata *conn,
- int pop3code,
- pop3state instate)
+/***********************************************************************
+ *
+ * pop3_perform_command()
+ *
+ * Sends a POP3 based command.
+ */
+static CURLcode pop3_perform_command(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *pop3 = data->state.proto.pop3;
+ struct POP3 *pop3 = data->req.protop;
+ const char *command = NULL;
- (void)instate; /* no use for this yet */
+ /* Calculate the default command */
+ if(pop3->id[0] == '\0' || conn->data->set.ftp_list_only) {
+ command = "LIST";
- if(pop3code != 'O') {
- failf(data, "Access denied. %c", pop3code);
- result = CURLE_LOGIN_DENIED;
+ if(pop3->id[0] != '\0')
+ /* Message specific LIST so skip the BODY transfer */
+ pop3->transfer = FTPTRANSFER_INFO;
}
else
- /* send PASS */
- result = Curl_pp_sendf(&conn->proto.pop3c.pp, "PASS %s",
- pop3->passwd?pop3->passwd:"");
- if(result)
- return result;
+ command = "RETR";
+
+ /* Send the command */
+ if(pop3->id[0] != '\0')
+ result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s %s",
+ (pop3->custom && pop3->custom[0] != '\0' ?
+ pop3->custom : command), pop3->id);
+ else
+ result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s",
+ (pop3->custom && pop3->custom[0] != '\0' ?
+ pop3->custom : command));
+
+ if(!result)
+ state(conn, POP3_COMMAND);
- state(conn, POP3_PASS);
return result;
}
-/* for PASS responses */
-static CURLcode pop3_state_pass_resp(struct connectdata *conn,
- int pop3code,
- pop3state instate)
+/***********************************************************************
+ *
+ * pop3_perform_quit()
+ *
+ * Performs the quit action prior to sclose() be called.
+ */
+static CURLcode pop3_perform_quit(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+
+ /* Send the QUIT command */
+ result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "QUIT");
+
+ if(!result)
+ state(conn, POP3_QUIT);
+
+ return result;
+}
+
+/* For the initial server greeting */
+static CURLcode pop3_state_servergreet_resp(struct connectdata *conn,
+ int pop3code,
+ pop3state instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
+ const char *line = data->state.buffer;
+ size_t len = strlen(line);
+ size_t i;
+
(void)instate; /* no use for this yet */
- if(pop3code != 'O') {
- failf(data, "Access denied. %c", pop3code);
- result = CURLE_LOGIN_DENIED;
+ if(pop3code != '+') {
+ failf(data, "Got unexpected pop3-server response");
+ result = CURLE_FTP_WEIRD_SERVER_REPLY;
+ }
+ else {
+ /* Does the server support APOP authentication? */
+ if(len >= 4 && line[len - 2] == '>') {
+ /* Look for the APOP timestamp */
+ for(i = 3; i < len - 2; ++i) {
+ if(line[i] == '<') {
+ /* Calculate the length of the timestamp */
+ size_t timestamplen = len - 1 - i;
+ if(!timestamplen)
+ break;
+
+ /* Allocate some memory for the timestamp */
+ pop3c->apoptimestamp = (char *)calloc(1, timestamplen + 1);
+
+ if(!pop3c->apoptimestamp)
+ break;
+
+ /* Copy the timestamp */
+ memcpy(pop3c->apoptimestamp, line + i, timestamplen);
+ pop3c->apoptimestamp[timestamplen] = '\0';
+
+ /* Store the APOP capability */
+ pop3c->authtypes |= POP3_TYPE_APOP;
+ break;
+ }
+ }
+ }
+
+ result = pop3_perform_capa(conn);
}
- state(conn, POP3_STOP);
return result;
}
-/* for the retr response */
-static CURLcode pop3_state_retr_resp(struct connectdata *conn,
- int pop3code,
+/* For CAPA responses */
+static CURLcode pop3_state_capa_resp(struct connectdata *conn, int pop3code,
pop3state instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *pop3 = data->state.proto.pop3;
struct pop3_conn *pop3c = &conn->proto.pop3c;
- struct pingpong *pp = &pop3c->pp;
+ const char *line = data->state.buffer;
+ size_t len = strlen(line);
+ size_t wordlen;
(void)instate; /* no use for this yet */
- if('O' != pop3code) {
- state(conn, POP3_STOP);
- return CURLE_RECV_ERROR;
+ /* Do we have a untagged response? */
+ if(pop3code == '*') {
+ /* Does the server support the STLS capability? */
+ if(len >= 4 && !memcmp(line, "STLS", 4))
+ pop3c->tls_supported = TRUE;
+
+ /* Does the server support clear text authentication? */
+ else if(len >= 4 && !memcmp(line, "USER", 4))
+ pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
+
+ /* Does the server support SASL based authentication? */
+ else if(len >= 5 && !memcmp(line, "SASL ", 5)) {
+ pop3c->authtypes |= POP3_TYPE_SASL;
+
+ /* Advance past the SASL keyword */
+ line += 5;
+ len -= 5;
+
+ /* Loop through the data line */
+ for(;;) {
+ size_t llen;
+ unsigned int mechbit;
+
+ while(len &&
+ (*line == ' ' || *line == '\t' ||
+ *line == '\r' || *line == '\n')) {
+
+ line++;
+ len--;
+ }
+
+ if(!len)
+ break;
+
+ /* Extract the word */
+ for(wordlen = 0; wordlen < len && line[wordlen] != ' ' &&
+ line[wordlen] != '\t' && line[wordlen] != '\r' &&
+ line[wordlen] != '\n';)
+ wordlen++;
+
+ /* Test the word for a matching authentication mechanism */
+ if((mechbit = Curl_sasl_decode_mech(line, wordlen, &llen)) &&
+ llen == wordlen)
+ pop3c->sasl.authmechs |= mechbit;
+
+ line += wordlen;
+ len -= wordlen;
+ }
+ }
}
+ else if(pop3code == '+') {
+ if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
+ /* We don't have a SSL/TLS connection yet, but SSL is requested */
+ if(pop3c->tls_supported)
+ /* Switch to TLS connection now */
+ result = pop3_perform_starttls(conn);
+ else if(data->set.use_ssl == CURLUSESSL_TRY)
+ /* Fallback and carry on with authentication */
+ result = pop3_perform_authentication(conn);
+ else {
+ failf(data, "STLS not supported.");
+ result = CURLE_USE_SSL_FAILED;
+ }
+ }
+ else
+ result = pop3_perform_authentication(conn);
+ }
+ else {
+ /* Clear text is supported when CAPA isn't recognised */
+ pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
- /* POP3 download */
- Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE,
- pop3->bytecountp, -1, NULL); /* no upload here */
+ result = pop3_perform_authentication(conn);
+ }
- if(pp->cache) {
- /* At this point there is a bunch of data in the header "cache" that is
- actually body content, send it as body and then skip it. Do note
- that there may even be additional "headers" after the body. */
+ return result;
+}
- /* we may get the EOB already here! */
- result = Curl_pop3_write(conn, pp->cache, pp->cache_size);
- if(result)
- return result;
+/* For STARTTLS responses */
+static CURLcode pop3_state_starttls_resp(struct connectdata *conn,
+ int pop3code,
+ pop3state instate)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
- /* cache is drained */
- free(pp->cache);
- pp->cache = NULL;
- pp->cache_size = 0;
+ (void)instate; /* no use for this yet */
+
+ if(pop3code != '+') {
+ if(data->set.use_ssl != CURLUSESSL_TRY) {
+ failf(data, "STARTTLS denied. %c", pop3code);
+ result = CURLE_USE_SSL_FAILED;
+ }
+ else
+ result = pop3_perform_authentication(conn);
}
+ else
+ result = pop3_perform_upgrade_tls(conn);
- state(conn, POP3_STOP);
return result;
}
-
-/* for the list response */
-static CURLcode pop3_state_list_resp(struct connectdata *conn,
+/* For SASL authentication responses */
+static CURLcode pop3_state_auth_resp(struct connectdata *conn,
int pop3code,
pop3state instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *pop3 = data->state.proto.pop3;
struct pop3_conn *pop3c = &conn->proto.pop3c;
- struct pingpong *pp = &pop3c->pp;
+ saslprogress progress;
(void)instate; /* no use for this yet */
- if('O' != pop3code) {
- state(conn, POP3_STOP);
- return CURLE_RECV_ERROR;
+ result = Curl_sasl_continue(&pop3c->sasl, conn, pop3code, &progress);
+ if(!result)
+ switch(progress) {
+ case SASL_DONE:
+ state(conn, POP3_STOP); /* Authenticated */
+ break;
+ case SASL_IDLE: /* No mechanism left after cancellation */
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+ if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
+ /* Perform APOP authentication */
+ result = pop3_perform_apop(conn);
+ else
+#endif
+ if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
+ /* Perform clear text authentication */
+ result = pop3_perform_user(conn);
+ else {
+ failf(data, "Authentication cancelled");
+ result = CURLE_LOGIN_DENIED;
+ }
+ break;
+ default:
+ break;
+ }
+
+ return result;
+}
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+/* For APOP responses */
+static CURLcode pop3_state_apop_resp(struct connectdata *conn, int pop3code,
+ pop3state instate)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+
+ (void)instate; /* no use for this yet */
+
+ if(pop3code != '+') {
+ failf(data, "Authentication failed: %d", pop3code);
+ result = CURLE_LOGIN_DENIED;
}
+ else
+ /* End of connect phase */
+ state(conn, POP3_STOP);
- /* POP3 download */
- Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, pop3->bytecountp,
- -1, NULL); /* no upload here */
+ return result;
+}
+#endif
- if(pp->cache) {
- /* cache holds the email ID listing */
+/* For USER responses */
+static CURLcode pop3_state_user_resp(struct connectdata *conn, int pop3code,
+ pop3state instate)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
- /* we may get the EOB already here! */
- result = Curl_pop3_write(conn, pp->cache, pp->cache_size);
- if(result)
- return result;
+ (void)instate; /* no use for this yet */
- /* cache is drained */
- free(pp->cache);
- pp->cache = NULL;
- pp->cache_size = 0;
+ if(pop3code != '+') {
+ failf(data, "Access denied. %c", pop3code);
+ result = CURLE_LOGIN_DENIED;
}
+ else
+ /* Send the PASS command */
+ result = Curl_pp_sendf(&conn->proto.pop3c.pp, "PASS %s",
+ conn->passwd ? conn->passwd : "");
+ if(!result)
+ state(conn, POP3_PASS);
- state(conn, POP3_STOP);
return result;
}
-/* start the DO phase for RETR */
-static CURLcode pop3_retr(struct connectdata *conn)
+/* For PASS responses */
+static CURLcode pop3_state_pass_resp(struct connectdata *conn, int pop3code,
+ pop3state instate)
{
CURLcode result = CURLE_OK;
- struct pop3_conn *pop3c = &conn->proto.pop3c;
+ struct SessionHandle *data = conn->data;
- result = Curl_pp_sendf(&conn->proto.pop3c.pp, "RETR %s", pop3c->mailbox);
- if(result)
- return result;
+ (void)instate; /* no use for this yet */
+
+ if(pop3code != '+') {
+ failf(data, "Access denied. %c", pop3code);
+ result = CURLE_LOGIN_DENIED;
+ }
+ else
+ /* End of connect phase */
+ state(conn, POP3_STOP);
- state(conn, POP3_RETR);
return result;
}
-/* start the DO phase for LIST */
-static CURLcode pop3_list(struct connectdata *conn)
+/* For command responses */
+static CURLcode pop3_state_command_resp(struct connectdata *conn,
+ int pop3code,
+ pop3state instate)
{
CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct POP3 *pop3 = data->req.protop;
struct pop3_conn *pop3c = &conn->proto.pop3c;
+ struct pingpong *pp = &pop3c->pp;
- result = Curl_pp_sendf(&conn->proto.pop3c.pp, "LIST %s", pop3c->mailbox);
- if(result)
- return result;
+ (void)instate; /* no use for this yet */
+
+ if(pop3code != '+') {
+ state(conn, POP3_STOP);
+ return CURLE_RECV_ERROR;
+ }
+
+ /* This 'OK' line ends with a CR LF pair which is the two first bytes of the
+ EOB string so count this is two matching bytes. This is necessary to make
+ the code detect the EOB if the only data than comes now is %2e CR LF like
+ when there is no body to return. */
+ pop3c->eob = 2;
+
+ /* But since this initial CR LF pair is not part of the actual body, we set
+ the strip counter here so that these bytes won't be delivered. */
+ pop3c->strip = 2;
+
+ if(pop3->transfer == FTPTRANSFER_BODY) {
+ /* POP3 download */
+ Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL);
+
+ if(pp->cache) {
+ /* The header "cache" contains a bunch of data that is actually body
+ content so send it as such. Note that there may even be additional
+ "headers" after the body */
+
+ if(!data->set.opt_no_body) {
+ result = Curl_pop3_write(conn, pp->cache, pp->cache_size);
+ if(result)
+ return result;
+ }
+
+ /* Free the cache */
+ Curl_safefree(pp->cache);
+
+ /* Reset the cache size */
+ pp->cache_size = 0;
+ }
+ }
+
+ /* End of DO phase */
+ state(conn, POP3_STOP);
- state(conn, POP3_LIST);
return result;
}
static CURLcode pop3_statemach_act(struct connectdata *conn)
{
- CURLcode result;
+ CURLcode result = CURLE_OK;
curl_socket_t sock = conn->sock[FIRSTSOCKET];
- struct SessionHandle *data=conn->data;
int pop3code;
struct pop3_conn *pop3c = &conn->proto.pop3c;
struct pingpong *pp = &pop3c->pp;
size_t nread = 0;
+ /* Busy upgrading the connection; right now all I/O is SSL/TLS, not POP3 */
+ if(pop3c->state == POP3_UPGRADETLS)
+ return pop3_perform_upgrade_tls(conn);
+
+ /* Flush any data that needs to be sent */
if(pp->sendleft)
return Curl_pp_flushsend(pp);
- /* we read a piece of response */
- result = Curl_pp_readresp(sock, pp, &pop3code, &nread);
- if(result)
- return result;
+ do {
+ /* Read the response from the server */
+ result = Curl_pp_readresp(sock, pp, &pop3code, &nread);
+ if(result)
+ return result;
- if(pop3code) {
- /* we have now received a full POP3 server response */
+ if(!pop3code)
+ break;
+
+ /* We have now received a full POP3 server response */
switch(pop3c->state) {
case POP3_SERVERGREET:
- if(pop3code != 'O') {
- failf(data, "Got unexpected pop3-server response");
- return CURLE_FTP_WEIRD_SERVER_REPLY;
- }
+ result = pop3_state_servergreet_resp(conn, pop3code, pop3c->state);
+ break;
- if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
- /* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
- to TLS connection now */
- result = Curl_pp_sendf(&pop3c->pp, "STARTTLS", NULL);
- state(conn, POP3_STARTTLS);
- }
- else
- result = pop3_state_user(conn);
- if(result)
- return result;
+ case POP3_CAPA:
+ result = pop3_state_capa_resp(conn, pop3code, pop3c->state);
break;
- case POP3_USER:
- result = pop3_state_user_resp(conn, pop3code, pop3c->state);
+ case POP3_STARTTLS:
+ result = pop3_state_starttls_resp(conn, pop3code, pop3c->state);
break;
- case POP3_PASS:
- result = pop3_state_pass_resp(conn, pop3code, pop3c->state);
+ case POP3_AUTH:
+ result = pop3_state_auth_resp(conn, pop3code, pop3c->state);
break;
- case POP3_STARTTLS:
- result = pop3_state_starttls_resp(conn, pop3code, pop3c->state);
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+ case POP3_APOP:
+ result = pop3_state_apop_resp(conn, pop3code, pop3c->state);
break;
+#endif
- case POP3_RETR:
- result = pop3_state_retr_resp(conn, pop3code, pop3c->state);
+ case POP3_USER:
+ result = pop3_state_user_resp(conn, pop3code, pop3c->state);
break;
- case POP3_LIST:
- result = pop3_state_list_resp(conn, pop3code, pop3c->state);
+ case POP3_PASS:
+ result = pop3_state_pass_resp(conn, pop3code, pop3c->state);
+ break;
+
+ case POP3_COMMAND:
+ result = pop3_state_command_resp(conn, pop3code, pop3c->state);
break;
case POP3_QUIT:
@@ -517,148 +1032,105 @@ static CURLcode pop3_statemach_act(struct connectdata *conn)
state(conn, POP3_STOP);
break;
}
- }
+ } while(!result && pop3c->state != POP3_STOP && Curl_pp_moredata(pp));
+
return result;
}
-/* called repeatedly until done from multi.c */
+/* Called repeatedly until done from multi.c */
static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done)
{
+ CURLcode result = CURLE_OK;
struct pop3_conn *pop3c = &conn->proto.pop3c;
- CURLcode result = Curl_pp_multi_statemach(&pop3c->pp);
- *done = (bool)(pop3c->state == POP3_STOP);
+ if((conn->handler->flags & PROTOPT_SSL) && !pop3c->ssldone) {
+ result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &pop3c->ssldone);
+ if(result || !pop3c->ssldone)
+ return result;
+ }
+
+ result = Curl_pp_statemach(&pop3c->pp, FALSE);
+ *done = (pop3c->state == POP3_STOP) ? TRUE : FALSE;
return result;
}
-static CURLcode pop3_easy_statemach(struct connectdata *conn)
+static CURLcode pop3_block_statemach(struct connectdata *conn)
{
- struct pop3_conn *pop3c = &conn->proto.pop3c;
- struct pingpong *pp = &pop3c->pp;
CURLcode result = CURLE_OK;
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
- while(pop3c->state != POP3_STOP) {
- result = Curl_pp_easy_statemach(pp);
- if(result)
- break;
- }
+ while(pop3c->state != POP3_STOP && !result)
+ result = Curl_pp_statemach(&pop3c->pp, TRUE);
return result;
}
-/*
- * Allocate and initialize the struct POP3 for the current SessionHandle. If
- * need be.
- */
+/* Allocate and initialize the POP3 struct for the current SessionHandle if
+ required */
static CURLcode pop3_init(struct connectdata *conn)
{
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *pop3 = data->state.proto.pop3;
- if(!pop3) {
- pop3 = data->state.proto.pop3 = calloc(sizeof(struct FTP), 1);
- if(!pop3)
- return CURLE_OUT_OF_MEMORY;
- }
+ struct POP3 *pop3;
- /* get some initial data into the pop3 struct */
- pop3->bytecountp = &data->req.bytecount;
+ pop3 = data->req.protop = calloc(sizeof(struct POP3), 1);
+ if(!pop3)
+ result = CURLE_OUT_OF_MEMORY;
- /* No need to duplicate user+password, the connectdata struct won't change
- during a session, but we re-init them here since on subsequent inits
- since the conn struct may have changed or been replaced.
- */
- pop3->user = conn->user;
- pop3->passwd = conn->passwd;
+ return result;
+}
- return CURLE_OK;
+/* For the POP3 "protocol connect" and "doing" phases only */
+static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks,
+ int numsocks)
+{
+ return Curl_pp_getsock(&conn->proto.pop3c.pp, socks, numsocks);
}
-/*
- * pop3_connect() should do everything that is to be considered a part of
- * the connection phase.
+/***********************************************************************
+ *
+ * pop3_connect()
+ *
+ * This function should do everything that is to be considered a part of the
+ * connection phase.
*
* The variable 'done' points to will be TRUE if the protocol-layer connect
- * phase is done when this function returns, or FALSE is not. When called as
- * a part of the easy interface, it will always be TRUE.
+ * phase is done when this function returns, or FALSE if not.
*/
-static CURLcode pop3_connect(struct connectdata *conn,
- bool *done) /* see description above */
+static CURLcode pop3_connect(struct connectdata *conn, bool *done)
{
- CURLcode result;
+ CURLcode result = CURLE_OK;
struct pop3_conn *pop3c = &conn->proto.pop3c;
- struct SessionHandle *data=conn->data;
struct pingpong *pp = &pop3c->pp;
*done = FALSE; /* default to not done yet */
- /* If there already is a protocol-specific struct allocated for this
- sessionhandle, deal with it */
- Curl_reset_reqproto(conn);
-
- result = pop3_init(conn);
- if(CURLE_OK != result)
- return result;
+ /* We always support persistent connections in POP3 */
+ connkeep(conn, "POP3 default");
- /* We always support persistant connections on pop3 */
- conn->bits.close = FALSE;
-
- pp->response_time = RESP_TIMEOUT; /* set default response time-out */
+ /* Set the default response time-out */
+ pp->response_time = RESP_TIMEOUT;
pp->statemach_act = pop3_statemach_act;
pp->endofresp = pop3_endofresp;
pp->conn = conn;
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
- if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
- /* for POP3 over HTTP proxy */
- struct HTTP http_proxy;
- struct FTP *pop3_save;
-
- /* BLOCKING */
- /* We want "seamless" POP3 operations through HTTP proxy tunnel */
+ /* Set the default preferred authentication type and mechanism */
+ pop3c->preftype = POP3_TYPE_ANY;
+ Curl_sasl_init(&pop3c->sasl, &saslpop3);
- /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
- * conn->proto.http; we want POP3 through HTTP and we have to change the
- * member temporarily for connecting to the HTTP proxy. After
- * Curl_proxyCONNECT we have to set back the member to the original struct
- * POP3 pointer
- */
- pop3_save = data->state.proto.pop3;
- memset(&http_proxy, 0, sizeof(http_proxy));
- data->state.proto.http = &http_proxy;
+ /* Initialise the pingpong layer */
+ Curl_pp_init(pp);
- result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
- conn->host.name, conn->remote_port);
-
- data->state.proto.pop3 = pop3_save;
-
- if(CURLE_OK != result)
- return result;
- }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
-
- if(conn->protocol & PROT_POP3S) {
- /* BLOCKING */
- /* POP3S is simply pop3 with SSL for the control channel */
- /* now, perform the SSL initialization for this socket */
- result = Curl_ssl_connect(conn, FIRSTSOCKET);
- if(result)
- return result;
- }
-
- Curl_pp_init(pp); /* init the response reader stuff */
+ /* Parse the URL options */
+ result = pop3_parse_url_options(conn);
+ if(result)
+ return result;
- /* When we connect, we start in the state where we await the server greet
- response */
+ /* Start off waiting for the server greeting response */
state(conn, POP3_SERVERGREET);
- if(data->state.used_interface == Curl_if_multi)
- result = pop3_multi_statemach(conn, done);
- else {
- result = pop3_easy_statemach(conn);
- if(!result)
- *done = TRUE;
- }
+ result = pop3_multi_statemach(conn, done);
return result;
}
@@ -675,25 +1147,29 @@ static CURLcode pop3_connect(struct connectdata *conn,
static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
bool premature)
{
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *pop3 = data->state.proto.pop3;
- CURLcode result=CURLE_OK;
+ struct POP3 *pop3 = data->req.protop;
+
(void)premature;
if(!pop3)
- /* When the easy handle is removed from the multi while libcurl is still
- * trying to resolve the host name, it seems that the pop3 struct is not
- * yet initialized, but the removal action calls Curl_done() which calls
- * this function. So we simply return success if no pop3 pointer is set.
- */
+ /* When the easy handle is removed from the multi interface while libcurl
+ is still trying to resolve the host name, the POP3 struct is not yet
+ initialized. However, the removal action calls Curl_done() which in
+ turn calls this function, so we simply return success. */
return CURLE_OK;
if(status) {
- conn->bits.close = TRUE; /* marked for closure */
- result = status; /* use the already set error code */
+ connclose(conn, "POP3 done with bad status");
+ result = status; /* use the already set error code */
}
- /* clear these for next connection */
+ /* Cleanup our per-request based variables */
+ Curl_safefree(pop3->id);
+ Curl_safefree(pop3->custom);
+
+ /* Clear the transfer mode for the next request */
pop3->transfer = FTPTRANSFER_BODY;
return result;
@@ -703,48 +1179,34 @@ static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
*
* pop3_perform()
*
- * This is the actual DO function for POP3. Get a file/directory according to
+ * This is the actual DO function for POP3. Get a message/listing according to
* the options previously setup.
*/
-
-static
-CURLcode pop3_perform(struct connectdata *conn,
- bool *connected, /* connect status after PASV / PORT */
- bool *dophase_done)
+static CURLcode pop3_perform(struct connectdata *conn, bool *connected,
+ bool *dophase_done)
{
- /* this is POP3 and no proxy */
- CURLcode result=CURLE_OK;
- struct pop3_conn *pop3c = &conn->proto.pop3c;
+ /* This is POP3 and no proxy */
+ CURLcode result = CURLE_OK;
+ struct POP3 *pop3 = conn->data->req.protop;
DEBUGF(infof(conn->data, "DO phase starts\n"));
if(conn->data->set.opt_no_body) {
- /* requested no body means no transfer... */
- struct FTP *pop3 = conn->data->state.proto.pop3;
+ /* Requested no body means no transfer */
pop3->transfer = FTPTRANSFER_INFO;
}
*dophase_done = FALSE; /* not done yet */
- /* start the first command in the DO phase */
- /* If mailbox is empty, then assume user wants listing for mail IDs,
- * otherwise, attempt to retrieve the mail-id stored in mailbox
- */
- if (strlen(pop3c->mailbox))
- result = pop3_retr(conn);
- else
- result = pop3_list(conn);
+ /* Start the first command in the DO phase */
+ result = pop3_perform_command(conn);
if(result)
return result;
- /* run the state-machine */
- if(conn->data->state.used_interface == Curl_if_multi)
- result = pop3_multi_statemach(conn, dophase_done);
- else {
- result = pop3_easy_statemach(conn);
- *dophase_done = TRUE; /* with the easy interface we are done here */
- }
- *connected = conn->bits.tcpconnect;
+ /* Run the state-machine */
+ result = pop3_multi_statemach(conn, dophase_done);
+
+ *connected = conn->bits.tcpconnect[FIRSTSOCKET];
if(*dophase_done)
DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -763,49 +1225,21 @@ CURLcode pop3_perform(struct connectdata *conn,
*/
static CURLcode pop3_do(struct connectdata *conn, bool *done)
{
- CURLcode retcode = CURLE_OK;
+ CURLcode result = CURLE_OK;
*done = FALSE; /* default to false */
- /*
- Since connections can be re-used between SessionHandles, this might be a
- connection already existing but on a fresh SessionHandle struct so we must
- make sure we have a good 'struct POP3' to play with. For new connections,
- the struct POP3 is allocated and setup in the pop3_connect() function.
- */
- Curl_reset_reqproto(conn);
- retcode = pop3_init(conn);
- if(retcode)
- return retcode;
-
- retcode = pop3_parse_url_path(conn);
- if(retcode)
- return retcode;
-
- retcode = pop3_regular_transfer(conn, done);
-
- return retcode;
-}
-
-/***********************************************************************
- *
- * pop3_quit()
- *
- * This should be called before calling sclose(). We should then wait for the
- * response from the server before returning. The calling code should then try
- * to close the connection.
- *
- */
-static CURLcode pop3_quit(struct connectdata *conn)
-{
- CURLcode result = CURLE_OK;
+ /* Parse the URL path */
+ result = pop3_parse_url_path(conn);
+ if(result)
+ return result;
- result = Curl_pp_sendf(&conn->proto.pop3c.pp, "QUIT", NULL);
+ /* Parse the custom request */
+ result = pop3_parse_custom_request(conn);
if(result)
return result;
- state(conn, POP3_QUIT);
- result = pop3_easy_statemach(conn);
+ result = pop3_regular_transfer(conn, done);
return result;
}
@@ -817,77 +1251,54 @@ static CURLcode pop3_quit(struct connectdata *conn)
* Disconnect from an POP3 server. Cleanup protocol-specific per-connection
* resources. BLOCKING.
*/
-static CURLcode pop3_disconnect(struct connectdata *conn)
+static CURLcode pop3_disconnect(struct connectdata *conn, bool dead_connection)
{
- struct pop3_conn *pop3c= &conn->proto.pop3c;
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
/* We cannot send quit unconditionally. If this connection is stale or
bad in any way, sending quit and waiting around here will make the
- disconnect wait in vain and cause more problems than we need to.
- */
+ disconnect wait in vain and cause more problems than we need to. */
/* The POP3 session may or may not have been allocated/setup at this
point! */
- if(pop3c->pp.conn)
- (void)pop3_quit(conn); /* ignore errors on the LOGOUT */
-
+ if(!dead_connection && pop3c->pp.conn && pop3c->pp.conn->bits.protoconnstart)
+ if(!pop3_perform_quit(conn))
+ (void)pop3_block_statemach(conn); /* ignore errors on QUIT */
+ /* Disconnect from the server */
Curl_pp_disconnect(&pop3c->pp);
- return CURLE_OK;
-}
-
-/***********************************************************************
- *
- * pop3_parse_url_path()
- *
- * Parse the URL path into separate path components.
- *
- */
-static CURLcode pop3_parse_url_path(struct connectdata *conn)
-{
- /* the pop3 struct is already inited in pop3_connect() */
- struct pop3_conn *pop3c = &conn->proto.pop3c;
- struct SessionHandle *data = conn->data;
- const char *path = data->state.path;
+ /* Cleanup the SASL module */
+ Curl_sasl_cleanup(conn, pop3c->sasl.authused);
- /* url decode the path and use this mailbox */
- pop3c->mailbox = curl_easy_unescape(data, path, 0, NULL);
- if (!pop3c->mailbox)
- return CURLE_OUT_OF_MEMORY;
+ /* Cleanup our connection based variables */
+ Curl_safefree(pop3c->apoptimestamp);
return CURLE_OK;
}
-/* call this when the DO phase has completed */
-static CURLcode pop3_dophase_done(struct connectdata *conn,
- bool connected)
+/* Call this when the DO phase has completed */
+static CURLcode pop3_dophase_done(struct connectdata *conn, bool connected)
{
- struct FTP *pop3 = conn->data->state.proto.pop3;
- struct pop3_conn *pop3c = &conn->proto.pop3c;
+ (void)conn;
(void)connected;
- if(pop3->transfer != FTPTRANSFER_BODY)
- /* no data to transfer */
- Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
-
- free(pop3c->mailbox);
-
return CURLE_OK;
}
-/* called from multi.c while DOing */
-static CURLcode pop3_doing(struct connectdata *conn,
- bool *dophase_done)
+/* Called from multi.c while DOing */
+static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done)
{
- CURLcode result;
- result = pop3_multi_statemach(conn, dophase_done);
+ CURLcode result = pop3_multi_statemach(conn, dophase_done);
- if(*dophase_done) {
+ if(result)
+ DEBUGF(infof(conn->data, "DO phase failed\n"));
+ else if(*dophase_done) {
result = pop3_dophase_done(conn, FALSE /* not connected */);
DEBUGF(infof(conn->data, "DO phase is complete\n"));
}
+
return result;
}
@@ -899,46 +1310,44 @@ static CURLcode pop3_doing(struct connectdata *conn,
*
* Performs all commands done before a regular transfer between a local and a
* remote host.
- *
*/
-static
-CURLcode pop3_regular_transfer(struct connectdata *conn,
- bool *dophase_done)
+static CURLcode pop3_regular_transfer(struct connectdata *conn,
+ bool *dophase_done)
{
- CURLcode result=CURLE_OK;
- bool connected=FALSE;
+ CURLcode result = CURLE_OK;
+ bool connected = FALSE;
struct SessionHandle *data = conn->data;
- data->req.size = -1; /* make sure this is unknown at this point */
+ /* Make sure size is unknown at this point */
+ data->req.size = -1;
+
+ /* Set the progress data */
Curl_pgrsSetUploadCounter(data, 0);
Curl_pgrsSetDownloadCounter(data, 0);
- Curl_pgrsSetUploadSize(data, 0);
- Curl_pgrsSetDownloadSize(data, 0);
+ Curl_pgrsSetUploadSize(data, -1);
+ Curl_pgrsSetDownloadSize(data, -1);
- result = pop3_perform(conn,
- &connected, /* have we connected after PASV/PORT */
- dophase_done); /* all commands in the DO-phase done? */
-
- if(CURLE_OK == result) {
-
- if(!*dophase_done)
- /* the DO phase has not completed yet */
- return CURLE_OK;
+ /* Carry out the perform */
+ result = pop3_perform(conn, &connected, dophase_done);
+ /* Perform post DO phase operations if necessary */
+ if(!result && *dophase_done)
result = pop3_dophase_done(conn, connected);
- if(result)
- return result;
- }
return result;
}
-static CURLcode pop3_setup_connection(struct connectdata * conn)
+static CURLcode pop3_setup_connection(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
+ /* Initialise the POP3 layer */
+ CURLcode result = pop3_init(conn);
+ if(result)
+ return result;
+
if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) {
- /* Unless we have asked to tunnel pop3 operations through the proxy, we
+ /* Unless we have asked to tunnel POP3 operations through the proxy, we
switch and use HTTP operations only */
#ifndef CURL_DISABLE_HTTP
if(conn->handler == &Curl_handler_pop3)
@@ -951,12 +1360,9 @@ static CURLcode pop3_setup_connection(struct connectdata * conn)
return CURLE_UNSUPPORTED_PROTOCOL;
#endif
}
- /*
- * We explicitly mark this connection as persistent here as we're doing
- * POP3 over HTTP and thus we accidentally avoid setting this value
- * otherwise.
- */
- conn->bits.close = FALSE;
+
+ /* set it up as an HTTP connection instead */
+ return conn->handler->setup_connection(conn);
#else
failf(data, "POP3 over http proxy requires HTTP support built-in!");
return CURLE_UNSUPPORTED_PROTOCOL;
@@ -968,54 +1374,226 @@ static CURLcode pop3_setup_connection(struct connectdata * conn)
return CURLE_OK;
}
-/* this is the 5-bytes End-Of-Body marker for POP3 */
-#define POP3_EOB "\x0d\x0a\x2e\x0d\x0a"
-#define POP3_EOB_LEN 5
+/***********************************************************************
+ *
+ * pop3_parse_url_options()
+ *
+ * Parse the URL login options.
+ */
+static CURLcode pop3_parse_url_options(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct pop3_conn *pop3c = &conn->proto.pop3c;
+ const char *ptr = conn->options;
-/*
+ pop3c->sasl.resetprefs = TRUE;
+
+ while(!result && ptr && *ptr) {
+ const char *key = ptr;
+ const char *value;
+
+ while(*ptr && *ptr != '=')
+ ptr++;
+
+ value = ptr + 1;
+
+ while(*ptr && *ptr != ';')
+ ptr++;
+
+ if(strnequal(key, "AUTH=", 5)) {
+ result = Curl_sasl_parse_url_auth_option(&pop3c->sasl,
+ value, ptr - value);
+
+ if(result && strnequal(value, "+APOP", ptr - value)) {
+ pop3c->preftype = POP3_TYPE_APOP;
+ pop3c->sasl.prefmech = SASL_AUTH_NONE;
+ result = CURLE_OK;
+ }
+ }
+ else
+ result = CURLE_URL_MALFORMAT;
+
+ if(*ptr == ';')
+ ptr++;
+ }
+
+ if(pop3c->preftype != POP3_TYPE_APOP)
+ switch(pop3c->sasl.prefmech) {
+ case SASL_AUTH_NONE:
+ pop3c->preftype = POP3_TYPE_NONE;
+ break;
+ case SASL_AUTH_DEFAULT:
+ pop3c->preftype = POP3_TYPE_ANY;
+ break;
+ default:
+ pop3c->preftype = POP3_TYPE_SASL;
+ break;
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_parse_url_path()
+ *
+ * Parse the URL path into separate path components.
+ */
+static CURLcode pop3_parse_url_path(struct connectdata *conn)
+{
+ /* The POP3 struct is already initialised in pop3_connect() */
+ struct SessionHandle *data = conn->data;
+ struct POP3 *pop3 = data->req.protop;
+ const char *path = data->state.path;
+
+ /* URL decode the path for the message ID */
+ return Curl_urldecode(data, path, 0, &pop3->id, NULL, TRUE);
+}
+
+/***********************************************************************
+ *
+ * pop3_parse_custom_request()
+ *
+ * Parse the custom request.
+ */
+static CURLcode pop3_parse_custom_request(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct POP3 *pop3 = data->req.protop;
+ const char *custom = data->set.str[STRING_CUSTOMREQUEST];
+
+ /* URL decode the custom request */
+ if(custom)
+ result = Curl_urldecode(data, custom, 0, &pop3->custom, NULL, TRUE);
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * Curl_pop3_write()
+ *
* This function scans the body after the end-of-body and writes everything
* until the end is found.
*/
-CURLcode Curl_pop3_write(struct connectdata *conn,
- char *str,
- size_t nread)
+CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread)
{
- /* This code could be made into a special function in the handler struct. */
- CURLcode result;
+ /* This code could be made into a special function in the handler struct */
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
struct SingleRequest *k = &data->req;
- /* Detect the end-of-body marker, which is 5 bytes:
- 0d 0a 2e 0d 0a. This marker can of course be spread out
- over up to 5 different data chunks. Deal with it! */
struct pop3_conn *pop3c = &conn->proto.pop3c;
- size_t checkmax = (nread >= POP3_EOB_LEN?POP3_EOB_LEN:nread);
- size_t checkleft = POP3_EOB_LEN-pop3c->eob;
- size_t check = (checkmax >= checkleft?checkleft:checkmax);
-
- if(!memcmp(POP3_EOB, &str[nread - check], check)) {
- /* substring match */
- pop3c->eob += check;
- if(pop3c->eob == POP3_EOB_LEN) {
- /* full match, the transfer is done! */
- str[nread - check] = '\0';
- nread -= check;
- k->keepon &= ~KEEP_RECV;
+ bool strip_dot = FALSE;
+ size_t last = 0;
+ size_t i;
+
+ /* Search through the buffer looking for the end-of-body marker which is
+ 5 bytes (0d 0a 2e 0d 0a). Note that a line starting with a dot matches
+ the eob so the server will have prefixed it with an extra dot which we
+ need to strip out. Additionally the marker could of course be spread out
+ over 5 different data chunks. */
+ for(i = 0; i < nread; i++) {
+ size_t prev = pop3c->eob;
+
+ switch(str[i]) {
+ case 0x0d:
+ if(pop3c->eob == 0) {
+ pop3c->eob++;
+
+ if(i) {
+ /* Write out the body part that didn't match */
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, &str[last],
+ i - last);
+
+ if(result)
+ return result;
+
+ last = i;
+ }
+ }
+ else if(pop3c->eob == 3)
+ pop3c->eob++;
+ else
+ /* If the character match wasn't at position 0 or 3 then restart the
+ pattern matching */
+ pop3c->eob = 1;
+ break;
+
+ case 0x0a:
+ if(pop3c->eob == 1 || pop3c->eob == 4)
+ pop3c->eob++;
+ else
+ /* If the character match wasn't at position 1 or 4 then start the
+ search again */
+ pop3c->eob = 0;
+ break;
+
+ case 0x2e:
+ if(pop3c->eob == 2)
+ pop3c->eob++;
+ else if(pop3c->eob == 3) {
+ /* We have an extra dot after the CRLF which we need to strip off */
+ strip_dot = TRUE;
+ pop3c->eob = 0;
+ }
+ else
+ /* If the character match wasn't at position 2 then start the search
+ again */
+ pop3c->eob = 0;
+ break;
+
+ default:
pop3c->eob = 0;
+ break;
+ }
+
+ /* Did we have a partial match which has subsequently failed? */
+ if(prev && prev >= pop3c->eob) {
+ /* Strip can only be non-zero for the very first mismatch after CRLF
+ and then both prev and strip are equal and nothing will be output
+ below */
+ while(prev && pop3c->strip) {
+ prev--;
+ pop3c->strip--;
+ }
+
+ if(prev) {
+ /* If the partial match was the CRLF and dot then only write the CRLF
+ as the server would have inserted the dot */
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, (char*)POP3_EOB,
+ strip_dot ? prev - 1 : prev);
+
+ if(result)
+ return result;
+
+ last = i;
+ strip_dot = FALSE;
+ }
}
}
- else if(pop3c->eob) {
- /* not a match, but we matched a piece before so we must now
- send that part as body first, before we move on and send
- this buffer */
- result = Curl_client_write(conn, CLIENTWRITE_BODY,
- (char *)POP3_EOB, pop3c->eob);
- if(result)
- return result;
+
+ if(pop3c->eob == POP3_EOB_LEN) {
+ /* We have a full match so the transfer is done, however we must transfer
+ the CRLF at the start of the EOB as this is considered to be part of the
+ message as per RFC-1939, sect. 3 */
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)POP3_EOB, 2);
+
+ k->keepon &= ~KEEP_RECV;
pop3c->eob = 0;
+
+ return result;
}
- result = Curl_client_write(conn, CLIENTWRITE_BODY, str, nread);
+ if(pop3c->eob)
+ /* While EOB is matching nothing should be output */
+ return CURLE_OK;
+
+ if(nread - last) {
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, &str[last],
+ nread - last);
+ }
return result;
}
diff --git a/lib/pop3.h b/lib/pop3.h
index 337421ca..7bc53aaf 100644
--- a/lib/pop3.h
+++ b/lib/pop3.h
@@ -1,5 +1,5 @@
-#ifndef __POP3_H
-#define __POP3_H
+#ifndef HEADER_CURL_POP3_H
+#define HEADER_CURL_POP3_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2009 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,41 +22,74 @@
*
***************************************************************************/
+#include "pingpong.h"
+#include "curl_sasl.h"
+
/****************************************************************************
* POP3 unique setup
***************************************************************************/
typedef enum {
- POP3_STOP, /* do nothing state, stops the state machine */
- POP3_SERVERGREET, /* waiting for the initial greeting immediately after
- a connect */
+ POP3_STOP, /* do nothing state, stops the state machine */
+ POP3_SERVERGREET, /* waiting for the initial greeting immediately after
+ a connect */
+ POP3_CAPA,
+ POP3_STARTTLS,
+ POP3_UPGRADETLS, /* asynchronously upgrade the connection to SSL/TLS
+ (multi mode only) */
+ POP3_AUTH,
+ POP3_APOP,
POP3_USER,
POP3_PASS,
- POP3_STARTTLS,
- POP3_LIST,
- POP3_RETR,
+ POP3_COMMAND,
POP3_QUIT,
- POP3_LAST /* never used */
+ POP3_LAST /* never used */
} pop3state;
+/* This POP3 struct is used in the SessionHandle. All POP3 data that is
+ connection-oriented must be in pop3_conn to properly deal with the fact that
+ perhaps the SessionHandle is changed between the times the connection is
+ used. */
+struct POP3 {
+ curl_pp_transfer transfer;
+ char *id; /* Message ID */
+ char *custom; /* Custom Request */
+};
+
/* pop3_conn is used for struct connection-oriented data in the connectdata
struct */
struct pop3_conn {
struct pingpong pp;
- char *mailbox; /* what to RETR */
- size_t eob; /* number of bytes of the EOB (End Of Body) that has been
- received thus far */
- pop3state state; /* always use pop3.c:state() to change state! */
+ pop3state state; /* Always use pop3.c:state() to change state! */
+ bool ssldone; /* Is connect() over SSL done? */
+ size_t eob; /* Number of bytes of the EOB (End Of Body) that
+ have been received so far */
+ size_t strip; /* Number of bytes from the start to ignore as
+ non-body */
+ struct SASL sasl; /* SASL-related storage */
+ unsigned int authtypes; /* Accepted authentication types */
+ unsigned int preftype; /* Preferred authentication type */
+ char *apoptimestamp; /* APOP timestamp from the server greeting */
+ bool tls_supported; /* StartTLS capability supported by server */
};
extern const struct Curl_handler Curl_handler_pop3;
extern const struct Curl_handler Curl_handler_pop3s;
-/*
- * This function scans the body after the end-of-body and writes everything
- * until the end is found.
- */
-CURLcode Curl_pop3_write(struct connectdata *conn,
- char *str,
- size_t nread);
+/* Authentication type flags */
+#define POP3_TYPE_CLEARTEXT (1 << 0)
+#define POP3_TYPE_APOP (1 << 1)
+#define POP3_TYPE_SASL (1 << 2)
+
+/* Authentication type values */
+#define POP3_TYPE_NONE 0
+#define POP3_TYPE_ANY ~0U
+
+/* This is the 5-bytes End-Of-Body marker for POP3 */
+#define POP3_EOB "\x0d\x0a\x2e\x0d\x0a"
+#define POP3_EOB_LEN 5
+
+/* This function scans the body after the end-of-body and writes everything
+ * until the end is found */
+CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread);
-#endif /* __POP3_H */
+#endif /* HEADER_CURL_POP3_H */
diff --git a/lib/progress.c b/lib/progress.c
index e0758f2a..b46e2740 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +20,12 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "urldata.h"
#include "sendf.h"
#include "progress.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
/* Provide a string that is 2 + 1 + 2 + 1 + 2 = 8 letters long (plus the zero
byte) */
@@ -42,8 +40,8 @@ static void time2str(char *r, curl_off_t seconds)
if(h <= CURL_OFF_T_C(99)) {
m = (seconds - (h*CURL_OFF_T_C(3600))) / CURL_OFF_T_C(60);
s = (seconds - (h*CURL_OFF_T_C(3600))) - (m*CURL_OFF_T_C(60));
- snprintf(r, 9, "%2" FORMAT_OFF_T ":%02" FORMAT_OFF_T ":%02" FORMAT_OFF_T,
- h, m, s);
+ snprintf(r, 9, "%2" CURL_FORMAT_CURL_OFF_T ":%02" CURL_FORMAT_CURL_OFF_T
+ ":%02" CURL_FORMAT_CURL_OFF_T, h, m, s);
}
else {
/* this equals to more than 99 hours, switch to a more suitable output
@@ -51,9 +49,10 @@ static void time2str(char *r, curl_off_t seconds)
d = seconds / CURL_OFF_T_C(86400);
h = (seconds - (d*CURL_OFF_T_C(86400))) / CURL_OFF_T_C(3600);
if(d <= CURL_OFF_T_C(999))
- snprintf(r, 9, "%3" FORMAT_OFF_T "d %02" FORMAT_OFF_T "h", d, h);
+ snprintf(r, 9, "%3" CURL_FORMAT_CURL_OFF_T
+ "d %02" CURL_FORMAT_CURL_OFF_T "h", d, h);
else
- snprintf(r, 9, "%7" FORMAT_OFF_T "d", d);
+ snprintf(r, 9, "%7" CURL_FORMAT_CURL_OFF_T "d", d);
}
}
@@ -69,40 +68,40 @@ static char *max5data(curl_off_t bytes, char *max5)
#define ONE_PETABYTE (CURL_OFF_T_C(1024) * ONE_TERABYTE)
if(bytes < CURL_OFF_T_C(100000))
- snprintf(max5, 6, "%5" FORMAT_OFF_T, bytes);
+ snprintf(max5, 6, "%5" CURL_FORMAT_CURL_OFF_T, bytes);
else if(bytes < CURL_OFF_T_C(10000) * ONE_KILOBYTE)
- snprintf(max5, 6, "%4" FORMAT_OFF_T "k", bytes/ONE_KILOBYTE);
+ snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "k", bytes/ONE_KILOBYTE);
else if(bytes < CURL_OFF_T_C(100) * ONE_MEGABYTE)
/* 'XX.XM' is good as long as we're less than 100 megs */
- snprintf(max5, 6, "%2" FORMAT_OFF_T ".%0" FORMAT_OFF_T "M",
- bytes/ONE_MEGABYTE,
+ snprintf(max5, 6, "%2" CURL_FORMAT_CURL_OFF_T ".%0"
+ CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE,
(bytes%ONE_MEGABYTE) / (ONE_MEGABYTE/CURL_OFF_T_C(10)) );
#if (CURL_SIZEOF_CURL_OFF_T > 4)
else if(bytes < CURL_OFF_T_C(10000) * ONE_MEGABYTE)
/* 'XXXXM' is good until we're at 10000MB or above */
- snprintf(max5, 6, "%4" FORMAT_OFF_T "M", bytes/ONE_MEGABYTE);
+ snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE);
else if(bytes < CURL_OFF_T_C(100) * ONE_GIGABYTE)
/* 10000 MB - 100 GB, we show it as XX.XG */
- snprintf(max5, 6, "%2" FORMAT_OFF_T ".%0" FORMAT_OFF_T "G",
- bytes/ONE_GIGABYTE,
+ snprintf(max5, 6, "%2" CURL_FORMAT_CURL_OFF_T ".%0"
+ CURL_FORMAT_CURL_OFF_T "G", bytes/ONE_GIGABYTE,
(bytes%ONE_GIGABYTE) / (ONE_GIGABYTE/CURL_OFF_T_C(10)) );
else if(bytes < CURL_OFF_T_C(10000) * ONE_GIGABYTE)
/* up to 10000GB, display without decimal: XXXXG */
- snprintf(max5, 6, "%4" FORMAT_OFF_T "G", bytes/ONE_GIGABYTE);
+ snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "G", bytes/ONE_GIGABYTE);
else if(bytes < CURL_OFF_T_C(10000) * ONE_TERABYTE)
/* up to 10000TB, display without decimal: XXXXT */
- snprintf(max5, 6, "%4" FORMAT_OFF_T "T", bytes/ONE_TERABYTE);
+ snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "T", bytes/ONE_TERABYTE);
else
/* up to 10000PB, display without decimal: XXXXP */
- snprintf(max5, 6, "%4" FORMAT_OFF_T "P", bytes/ONE_PETABYTE);
+ snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "P", bytes/ONE_PETABYTE);
/* 16384 petabytes (16 exabytes) is the maximum a 64 bit unsigned number
can hold, but our data type is signed so 8192PB will be the maximum. */
@@ -110,7 +109,7 @@ static char *max5data(curl_off_t bytes, char *max5)
#else
else
- snprintf(max5, 6, "%4" FORMAT_OFF_T "M", bytes/ONE_MEGABYTE);
+ snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE);
#endif
@@ -131,62 +130,84 @@ static char *max5data(curl_off_t bytes, char *max5)
*/
-void Curl_pgrsDone(struct connectdata *conn)
+int Curl_pgrsDone(struct connectdata *conn)
{
+ int rc;
struct SessionHandle *data = conn->data;
data->progress.lastshow=0;
- Curl_pgrsUpdate(conn); /* the final (forced) update */
+ rc = Curl_pgrsUpdate(conn); /* the final (forced) update */
+ if(rc)
+ return rc;
+
+ if(!(data->progress.flags & PGRS_HIDE) &&
+ !data->progress.callback)
+ /* only output if we don't use a progress callback and we're not
+ * hidden */
+ fprintf(data->set.err, "\n");
data->progress.speeder_c = 0; /* reset the progress meter display */
+ return 0;
}
-/* reset all times except redirect */
-void Curl_pgrsResetTimes(struct SessionHandle *data)
+/* reset all times except redirect, and reset the known transfer sizes */
+void Curl_pgrsResetTimesSizes(struct SessionHandle *data)
{
data->progress.t_nslookup = 0.0;
data->progress.t_connect = 0.0;
data->progress.t_pretransfer = 0.0;
data->progress.t_starttransfer = 0.0;
+
+ Curl_pgrsSetDownloadSize(data, -1);
+ Curl_pgrsSetUploadSize(data, -1);
}
void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
{
+ struct timeval now = Curl_tvnow();
+
switch(timer) {
default:
case TIMER_NONE:
/* mistake filter */
break;
+ case TIMER_STARTOP:
+ /* This is set at the start of a transfer */
+ data->progress.t_startop = now;
+ break;
case TIMER_STARTSINGLE:
- /* This is set at the start of a single fetch */
- data->progress.t_startsingle = Curl_tvnow();
+ /* This is set at the start of each single fetch */
+ data->progress.t_startsingle = now;
+ break;
+
+ case TIMER_STARTACCEPT:
+ data->progress.t_acceptdata = Curl_tvnow();
break;
case TIMER_NAMELOOKUP:
data->progress.t_nslookup =
- Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+ Curl_tvdiff_secs(now, data->progress.t_startsingle);
break;
case TIMER_CONNECT:
data->progress.t_connect =
- Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+ Curl_tvdiff_secs(now, data->progress.t_startsingle);
break;
case TIMER_APPCONNECT:
data->progress.t_appconnect =
- Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+ Curl_tvdiff_secs(now, data->progress.t_startsingle);
break;
case TIMER_PRETRANSFER:
data->progress.t_pretransfer =
- Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+ Curl_tvdiff_secs(now, data->progress.t_startsingle);
break;
case TIMER_STARTTRANSFER:
data->progress.t_starttransfer =
- Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+ Curl_tvdiff_secs(now, data->progress.t_startsingle);
break;
case TIMER_POSTRANSFER:
/* this is the normal end-of-transfer thing */
break;
case TIMER_REDIRECT:
- data->progress.t_redirect =
- Curl_tvdiff_secs(Curl_tvnow(), data->progress.start);
+ data->progress.t_redirect = Curl_tvdiff_secs(now, data->progress.start);
break;
}
}
@@ -195,6 +216,8 @@ void Curl_pgrsStartNow(struct SessionHandle *data)
{
data->progress.speeder_c = 0; /* reset the progress meter display */
data->progress.start = Curl_tvnow();
+ /* clear all bits except HIDE and HEADERS_OUT */
+ data->progress.flags &= PGRS_HIDE|PGRS_HEADERS_OUT;
}
void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, curl_off_t size)
@@ -209,22 +232,32 @@ void Curl_pgrsSetUploadCounter(struct SessionHandle *data, curl_off_t size)
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, curl_off_t size)
{
- data->progress.size_dl = size;
- if(size >= 0)
+ if(size >= 0) {
+ data->progress.size_dl = size;
data->progress.flags |= PGRS_DL_SIZE_KNOWN;
- else
+ }
+ else {
+ data->progress.size_dl = 0;
data->progress.flags &= ~PGRS_DL_SIZE_KNOWN;
+ }
}
void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size)
{
- data->progress.size_ul = size;
- if(size >= 0)
+ if(size >= 0) {
+ data->progress.size_ul = size;
data->progress.flags |= PGRS_UL_SIZE_KNOWN;
- else
+ }
+ else {
+ data->progress.size_ul = 0;
data->progress.flags &= ~PGRS_UL_SIZE_KNOWN;
+ }
}
+/*
+ * Curl_pgrsUpdate() returns 0 for success or the value returned by the
+ * progress callback!
+ */
int Curl_pgrsUpdate(struct connectdata *conn)
{
struct timeval now;
@@ -333,12 +366,21 @@ int Curl_pgrsUpdate(struct connectdata *conn)
} /* Calculations end */
if(!(data->progress.flags & PGRS_HIDE)) {
-
/* progress meter has not been shut off */
- if(data->set.fprogress) {
- /* There's a callback set, so we call that instead of writing
- anything ourselves. This really is the way to go. */
+ if(data->set.fxferinfo) {
+ /* There's a callback set, call that */
+ result= data->set.fxferinfo(data->set.progress_client,
+ data->progress.size_dl,
+ data->progress.downloaded,
+ data->progress.size_ul,
+ data->progress.uploaded);
+ if(result)
+ failf(data, "Callback aborted");
+ return result;
+ }
+ else if(data->set.fprogress) {
+ /* The older deprecated callback is set, call that */
result= data->set.fprogress(data->set.progress_client,
(double)data->progress.size_dl,
(double)data->progress.downloaded,
@@ -359,12 +401,14 @@ int Curl_pgrsUpdate(struct connectdata *conn)
if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
if(data->state.resume_from) {
fprintf(data->set.err,
- "** Resuming transfer from byte position %" FORMAT_OFF_T "\n",
- data->state.resume_from);
+ "** Resuming transfer from byte position %"
+ CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from);
}
fprintf(data->set.err,
- " %% Total %% Received %% Xferd Average Speed Time Time Time Current\n"
- " Dload Upload Total Spent Left Speed\n");
+ " %% Total %% Received %% Xferd Average Speed "
+ "Time Time Time Current\n"
+ " Dload Upload "
+ "Total Spent Left Speed\n");
data->progress.flags |= PGRS_HEADERS_OUT; /* headers are shown */
}
@@ -403,17 +447,17 @@ int Curl_pgrsUpdate(struct connectdata *conn)
time2str(time_total, total_estimate);
time2str(time_spent, timespent);
- /* Get the total amount of data expected to get transfered */
+ /* Get the total amount of data expected to get transferred */
total_expected_transfer =
(data->progress.flags & PGRS_UL_SIZE_KNOWN?
data->progress.size_ul:data->progress.uploaded)+
(data->progress.flags & PGRS_DL_SIZE_KNOWN?
data->progress.size_dl:data->progress.downloaded);
- /* We have transfered this much so far */
+ /* We have transferred this much so far */
total_transfer = data->progress.downloaded + data->progress.uploaded;
- /* Get the percentage of data transfered so far */
+ /* Get the percentage of data transferred so far */
if(total_expected_transfer > CURL_OFF_T_C(10000))
total_percen = total_transfer /
(total_expected_transfer/CURL_OFF_T_C(100));
@@ -422,9 +466,9 @@ int Curl_pgrsUpdate(struct connectdata *conn)
fprintf(data->set.err,
"\r"
- "%3" FORMAT_OFF_T " %s "
- "%3" FORMAT_OFF_T " %s "
- "%3" FORMAT_OFF_T " %s %s %s %s %s %s %s",
+ "%3" CURL_FORMAT_CURL_OFF_T " %s "
+ "%3" CURL_FORMAT_CURL_OFF_T " %s "
+ "%3" CURL_FORMAT_CURL_OFF_T " %s %s %s %s %s %s %s",
total_percen, /* 3 letters */ /* total % */
max5data(total_expected_transfer, max5[2]), /* total size */
dlpercen, /* 3 letters */ /* rcvd % */
diff --git a/lib/progress.h b/lib/progress.h
index 95944f0b..a1e6f1a2 100644
--- a/lib/progress.h
+++ b/lib/progress.h
@@ -1,5 +1,5 @@
-#ifndef __PROGRESS_H
-#define __PROGRESS_H
+#ifndef HEADER_CURL_PROGRESS_H
+#define HEADER_CURL_PROGRESS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,25 +27,27 @@
typedef enum {
TIMER_NONE,
+ TIMER_STARTOP,
+ TIMER_STARTSINGLE,
TIMER_NAMELOOKUP,
TIMER_CONNECT,
TIMER_APPCONNECT,
TIMER_PRETRANSFER,
TIMER_STARTTRANSFER,
TIMER_POSTRANSFER,
- TIMER_STARTSINGLE,
+ TIMER_STARTACCEPT,
TIMER_REDIRECT,
TIMER_LAST /* must be last */
} timerid;
-void Curl_pgrsDone(struct connectdata *);
+int Curl_pgrsDone(struct connectdata *);
void Curl_pgrsStartNow(struct SessionHandle *data);
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, curl_off_t size);
void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size);
void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, curl_off_t size);
void Curl_pgrsSetUploadCounter(struct SessionHandle *data, curl_off_t size);
int Curl_pgrsUpdate(struct connectdata *);
-void Curl_pgrsResetTimes(struct SessionHandle *data);
+void Curl_pgrsResetTimesSizes(struct SessionHandle *data);
void Curl_pgrsTime(struct SessionHandle *data, timerid timer);
@@ -67,4 +69,5 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer);
#define PGRS_HEADERS_OUT (1<<7) /* set when the headers have been written */
-#endif /* __PROGRESS_H */
+#endif /* HEADER_CURL_PROGRESS_H */
+
diff --git a/lib/qssl.c b/lib/qssl.c
deleted file mode 100644
index dd4f911d..00000000
--- a/lib/qssl.c
+++ /dev/null
@@ -1,501 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#ifdef USE_QSOSSL
-#include <qsossl.h>
-#include <errno.h>
-#include <string.h>
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#include <curl/curl.h>
-#include "urldata.h"
-#include "sendf.h"
-#include "qssl.h"
-#include "sslgen.h"
-#include "connect.h" /* for the connect timeout */
-#include "select.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 = NULL;
-
- if(!data->set.ssl.verifyhost)
- h->exitPgm = Curl_qsossl_trap_cert;
-
- /* figure out how long time we should wait at maximum */
- timeout_ms = Curl_timeleft(conn, 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;
- }
-
- 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;
- }
-
- 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);
- else {
- SSL_Destroy(connssl->handle);
- connssl->handle = NULL;
- connssl->use = FALSE;
- connssl->state = ssl_connection_none;
- }
- }
- if (rc == CURLE_OK) {
- connssl->state = ssl_connection_complete;
- conn->recv[sockindex] = qsossl_recv;
- conn->send[sockindex] = qsossl_send;
- }
-
- 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 basicly 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/qssl.h b/lib/qssl.h
deleted file mode 100644
index 45190e62..00000000
--- a/lib/qssl.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef __QSSL_H
-#define __QSSL_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, 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 header should only be needed to get included by sslgen.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)
-#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_FAILED_INIT
-#define curlssl_set_engine_default(x) CURLE_FAILED_INIT
-#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
diff --git a/lib/rawstr.c b/lib/rawstr.c
index f3b302dc..e27dac4a 100644
--- a/lib/rawstr.c
+++ b/lib/rawstr.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "rawstr.h"
@@ -133,10 +133,10 @@ int Curl_raw_nequal(const char *first, const char *second, size_t max)
*/
void Curl_strntoupper(char *dest, const char *src, size_t n)
{
- if (n < 1)
+ if(n < 1)
return;
do {
*dest++ = Curl_raw_toupper(*src);
- } while (*src++ && --n);
+ } while(*src++ && --n);
}
diff --git a/lib/rawstr.h b/lib/rawstr.h
index 7e9747a7..b491460d 100644
--- a/lib/rawstr.h
+++ b/lib/rawstr.h
@@ -1,5 +1,5 @@
-#ifndef __RAWSTR_H
-#define __RAWSTR_H
+#ifndef HEADER_CURL_RAWSTR_H
+#define HEADER_CURL_RAWSTR_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -29,7 +29,8 @@
* to be locale independent and only compare strings we know are safe for
* this.
*
- * The function is capable of comparing a-z case insensitively even for non-ascii.
+ * The function is capable of comparing a-z case insensitively even for
+ * non-ascii.
*/
int Curl_raw_equal(const char *first, const char *second);
int Curl_raw_nequal(const char *first, const char *second, size_t max);
@@ -40,5 +41,7 @@ char Curl_raw_toupper(char in);
argument is zero-byte terminated */
#define checkprefix(a,b) Curl_raw_nequal(a,b,strlen(a))
-#endif
void Curl_strntoupper(char *dest, const char *src, size_t n);
+
+#endif /* HEADER_CURL_RAWSTR_H */
+
diff --git a/lib/rtsp.c b/lib/rtsp.c
index 1254c738..e33069a9 100644
--- a/lib/rtsp.c
+++ b/lib/rtsp.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_RTSP
@@ -28,19 +28,18 @@
#include <curl/curl.h>
#include "transfer.h"
#include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
#include "multiif.h"
#include "http.h"
#include "url.h"
#include "progress.h"
#include "rtsp.h"
#include "rawstr.h"
-#include "curl_memory.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "select.h"
+#include "connect.h"
+#include "curl_printf.h"
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
/*
@@ -58,10 +57,31 @@
#define RTP_PKT_LENGTH(p) ((((int)((unsigned char)((p)[2]))) << 8) | \
((int)((unsigned char)((p)[3]))))
+/* protocol-specific functions set up to be called by the main engine */
+static CURLcode rtsp_do(struct connectdata *conn, bool *done);
+static CURLcode rtsp_done(struct connectdata *conn, CURLcode, bool premature);
+static CURLcode rtsp_connect(struct connectdata *conn, bool *done);
+static CURLcode rtsp_disconnect(struct connectdata *conn, bool dead);
+
static int rtsp_getsock_do(struct connectdata *conn,
curl_socket_t *socks,
int numsocks);
+/*
+ * Parse and write out any available RTP data.
+ *
+ * nread: amount of data left after k->str. will be modified if RTP
+ * data is parsed and k->str is moved up
+ * readmore: whether or not the RTP parser needs more data right away
+ */
+static CURLcode rtsp_rtp_readwrite(struct SessionHandle *data,
+ struct connectdata *conn,
+ ssize_t *nread,
+ bool *readmore);
+
+static CURLcode rtsp_setup_connection(struct connectdata *conn);
+
+
/* this returns the socket to wait for in the DO and DOING state for the multi
interface and then we're always _sending_ a request and thus we wait for
the single socket to become writable only */
@@ -84,22 +104,71 @@ CURLcode rtp_client_write(struct connectdata *conn, char *ptr, size_t len);
*/
const struct Curl_handler Curl_handler_rtsp = {
"RTSP", /* scheme */
- ZERO_NULL, /* setup_connection */
- Curl_rtsp, /* do_it */
- Curl_rtsp_done, /* done */
+ rtsp_setup_connection, /* setup_connection */
+ rtsp_do, /* do_it */
+ rtsp_done, /* done */
ZERO_NULL, /* do_more */
- Curl_rtsp_connect, /* connect_it */
+ rtsp_connect, /* connect_it */
ZERO_NULL, /* connecting */
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
rtsp_getsock_do, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
- Curl_rtsp_disconnect, /* disconnect */
+ rtsp_disconnect, /* disconnect */
+ rtsp_rtp_readwrite, /* readwrite */
PORT_RTSP, /* defport */
- PROT_RTSP, /* protocol */
+ CURLPROTO_RTSP, /* protocol */
+ PROTOPT_NONE /* flags */
};
-CURLcode Curl_rtsp_connect(struct connectdata *conn, bool *done)
+
+static CURLcode rtsp_setup_connection(struct connectdata *conn)
+{
+ struct RTSP *rtsp;
+
+ conn->data->req.protop = rtsp = calloc(1, sizeof(struct RTSP));
+ if(!rtsp)
+ return CURLE_OUT_OF_MEMORY;
+
+ return CURLE_OK;
+}
+
+
+/*
+ * The server may send us RTP data at any point, and RTSPREQ_RECEIVE does not
+ * want to block the application forever while receiving a stream. Therefore,
+ * we cannot assume that an RTSP socket is dead just because it is readable.
+ *
+ * Instead, if it is readable, run Curl_getconnectinfo() to peek at the socket
+ * and distinguish between closed and data.
+ */
+bool Curl_rtsp_connisdead(struct connectdata *check)
+{
+ int sval;
+ bool ret_val = TRUE;
+
+ sval = Curl_socket_ready(check->sock[FIRSTSOCKET], CURL_SOCKET_BAD, 0);
+ if(sval == 0) {
+ /* timeout */
+ ret_val = FALSE;
+ }
+ else if(sval & CURL_CSELECT_ERR) {
+ /* socket is in an error state */
+ ret_val = TRUE;
+ }
+ else if((sval & CURL_CSELECT_IN) && check->data) {
+ /* readable with no error. could be closed or could be alive but we can
+ only check if we have a proper SessionHandle for the connection */
+ curl_socket_t connectinfo = Curl_getconnectinfo(check->data, &check);
+ if(connectinfo != CURL_SOCKET_BAD)
+ ret_val = FALSE;
+ }
+
+ return ret_val;
+}
+
+static CURLcode rtsp_connect(struct connectdata *conn, bool *done)
{
CURLcode httpStatus;
struct SessionHandle *data = conn->data;
@@ -117,17 +186,19 @@ CURLcode Curl_rtsp_connect(struct connectdata *conn, bool *done)
return httpStatus;
}
-CURLcode Curl_rtsp_disconnect(struct connectdata *conn) {
+static CURLcode rtsp_disconnect(struct connectdata *conn, bool dead)
+{
+ (void) dead;
Curl_safefree(conn->proto.rtspc.rtp_buf);
return CURLE_OK;
}
-CURLcode Curl_rtsp_done(struct connectdata *conn,
- CURLcode status, bool premature)
+static CURLcode rtsp_done(struct connectdata *conn,
+ CURLcode status, bool premature)
{
struct SessionHandle *data = conn->data;
- struct RTSP *rtsp = data->state.proto.rtsp;
+ struct RTSP *rtsp = data->req.protop;
CURLcode httpStatus;
long CSeq_sent;
long CSeq_recv;
@@ -143,7 +214,8 @@ CURLcode Curl_rtsp_done(struct connectdata *conn,
CSeq_sent = rtsp->CSeq_sent;
CSeq_recv = rtsp->CSeq_recv;
if((data->set.rtspreq != RTSPREQ_RECEIVE) && (CSeq_sent != CSeq_recv)) {
- failf(data, "The CSeq of this request %ld did not match the response %ld",
+ failf(data,
+ "The CSeq of this request %ld did not match the response %ld",
CSeq_sent, CSeq_recv);
return CURLE_RTSP_CSEQ_ERROR;
}
@@ -157,12 +229,12 @@ CURLcode Curl_rtsp_done(struct connectdata *conn,
return httpStatus;
}
-CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
+static CURLcode rtsp_do(struct connectdata *conn, bool *done)
{
struct SessionHandle *data = conn->data;
CURLcode result=CURLE_OK;
Curl_RtspReq rtspreq = data->set.rtspreq;
- struct RTSP *rtsp;
+ struct RTSP *rtsp = data->req.protop;
struct HTTP *http;
Curl_send_buffer *req_buffer;
curl_off_t postsize = 0; /* for ANNOUNCE and SET_PARAMETER */
@@ -180,20 +252,6 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
*done = TRUE;
- Curl_reset_reqproto(conn);
-
- if(!data->state.proto.rtsp) {
- /* Only allocate this struct if we don't already have it! */
-
- rtsp = calloc(1, sizeof(struct RTSP));
- if(!rtsp)
- return CURLE_OUT_OF_MEMORY;
- data->state.proto.rtsp = rtsp;
- }
- else {
- rtsp = data->state.proto.rtsp;
- }
-
http = &(rtsp->http_wrapper);
/* Assert that no one has changed the RTSP struct in an evil way */
DEBUGASSERT((void *)http == (void *)rtsp);
@@ -205,11 +263,10 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
* Since all RTSP requests are included here, there is no need to
* support custom requests like HTTP.
**/
- DEBUGASSERT((rtspreq > RTSPREQ_NONE && rtspreq < RTSPREQ_LAST));
data->set.opt_no_body = TRUE; /* most requests don't contain a body */
switch(rtspreq) {
- case RTSPREQ_NONE:
- failf(data, "Got invalid RTSP request: RTSPREQ_NONE");
+ default:
+ failf(data, "Got invalid RTSP request");
return CURLE_BAD_FUNCTION_ARGUMENT;
case RTSPREQ_OPTIONS:
p_request = "OPTIONS";
@@ -236,6 +293,7 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
case RTSPREQ_GET_PARAMETER:
/* GET_PARAMETER's no_body status is determined later */
p_request = "GET_PARAMETER";
+ data->set.opt_no_body = FALSE;
break;
case RTSPREQ_SET_PARAMETER:
p_request = "SET_PARAMETER";
@@ -264,7 +322,7 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
if(!p_session_id &&
(rtspreq & ~(RTSPREQ_OPTIONS | RTSPREQ_DESCRIBE | RTSPREQ_SETUP))) {
failf(data, "Refusing to issue an RTSP request [%s] without a session ID.",
- p_request ? p_request : "");
+ p_request);
return CURLE_BAD_FUNCTION_ARGUMENT;
}
@@ -280,7 +338,7 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
}
/* Transport Header for SETUP requests */
- p_transport = Curl_checkheaders(data, "Transport:");
+ p_transport = Curl_checkheaders(conn, "Transport:");
if(rtspreq == RTSPREQ_SETUP && !p_transport) {
/* New Transport: setting? */
if(data->set.str[STRING_RTSP_TRANSPORT]) {
@@ -304,11 +362,11 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
/* Accept Headers for DESCRIBE requests */
if(rtspreq == RTSPREQ_DESCRIBE) {
/* Accept Header */
- p_accept = Curl_checkheaders(data, "Accept:")?
+ p_accept = Curl_checkheaders(conn, "Accept:")?
NULL:"Accept: application/sdp\r\n";
/* Accept-Encoding header */
- if(!Curl_checkheaders(data, "Accept-Encoding:") &&
+ if(!Curl_checkheaders(conn, "Accept-Encoding:") &&
data->set.str[STRING_ENCODING]) {
Curl_safefree(conn->allocptr.accept_encoding);
conn->allocptr.accept_encoding =
@@ -325,18 +383,18 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
it might have been used in the proxy connect, but if we have got a header
with the user-agent string specified, we erase the previously made string
here. */
- if(Curl_checkheaders(data, "User-Agent:") && conn->allocptr.uagent) {
+ if(Curl_checkheaders(conn, "User-Agent:") && conn->allocptr.uagent) {
Curl_safefree(conn->allocptr.uagent);
conn->allocptr.uagent = NULL;
}
- else if(!Curl_checkheaders(data, "User-Agent:") &&
+ else if(!Curl_checkheaders(conn, "User-Agent:") &&
data->set.str[STRING_USERAGENT]) {
p_uagent = conn->allocptr.uagent;
}
/* Referrer */
Curl_safefree(conn->allocptr.ref);
- if(data->change.referer && !Curl_checkheaders(data, "Referer:"))
+ if(data->change.referer && !Curl_checkheaders(conn, "Referer:"))
conn->allocptr.ref = aprintf("Referer: %s\r\n", data->change.referer);
else
conn->allocptr.ref = NULL;
@@ -353,7 +411,7 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
(rtspreq & (RTSPREQ_PLAY | RTSPREQ_PAUSE | RTSPREQ_RECORD))) {
/* Check to see if there is a range set in the custom headers */
- if(!Curl_checkheaders(data, "Range:") && data->state.range) {
+ if(!Curl_checkheaders(conn, "Range:") && data->state.range) {
Curl_safefree(conn->allocptr.rangeline);
conn->allocptr.rangeline = aprintf("Range: %s\r\n", data->state.range);
p_range = conn->allocptr.rangeline;
@@ -363,11 +421,11 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
/*
* Sanity check the custom headers
*/
- if(Curl_checkheaders(data, "CSeq:")) {
+ if(Curl_checkheaders(conn, "CSeq:")) {
failf(data, "CSeq cannot be set as a custom header.");
return CURLE_RTSP_CSEQ_ERROR;
}
- if(Curl_checkheaders(data, "Session:")) {
+ if(Curl_checkheaders(conn, "Session:")) {
failf(data, "Session ID cannot be set as a custom header.");
return CURLE_BAD_FUNCTION_ARGUMENT;
}
@@ -423,7 +481,7 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
return result;
}
- result = Curl_add_custom_headers(conn, req_buffer);
+ result = Curl_add_custom_headers(conn, FALSE, req_buffer);
if(result)
return result;
@@ -432,13 +490,13 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
rtspreq == RTSPREQ_GET_PARAMETER) {
if(data->set.upload) {
- putsize = data->set.infilesize;
+ putsize = data->state.infilesize;
data->set.httpreq = HTTPREQ_PUT;
}
else {
- postsize = (data->set.postfieldsize != -1)?
- data->set.postfieldsize:
+ postsize = (data->state.infilesize != -1)?
+ data->state.infilesize:
(data->set.postfields? (curl_off_t)strlen(data->set.postfields):0);
data->set.httpreq = HTTPREQ_POST;
}
@@ -446,9 +504,9 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
if(putsize > 0 || postsize > 0) {
/* As stated in the http comments, it is probably not wise to
* actually set a custom Content-Length in the headers */
- if(!Curl_checkheaders(data, "Content-Length:")) {
+ if(!Curl_checkheaders(conn, "Content-Length:")) {
result = Curl_add_bufferf(req_buffer,
- "Content-Length: %" FORMAT_OFF_T"\r\n",
+ "Content-Length: %" CURL_FORMAT_CURL_OFF_T"\r\n",
(data->set.upload ? putsize : postsize));
if(result)
return result;
@@ -456,7 +514,7 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
if(rtspreq == RTSPREQ_SET_PARAMETER ||
rtspreq == RTSPREQ_GET_PARAMETER) {
- if(!Curl_checkheaders(data, "Content-Type:")) {
+ if(!Curl_checkheaders(conn, "Content-Type:")) {
result = Curl_add_bufferf(req_buffer,
"Content-Type: text/parameters\r\n");
if(result)
@@ -465,7 +523,7 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
}
if(rtspreq == RTSPREQ_ANNOUNCE) {
- if(!Curl_checkheaders(data, "Content-Type:")) {
+ if(!Curl_checkheaders(conn, "Content-Type:")) {
result = Curl_add_bufferf(req_buffer,
"Content-Type: application/sdp\r\n");
if(result)
@@ -473,8 +531,9 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
}
}
- data->state.expect100header = FALSE; /* RTSP posts are simple/small */
- } else if(rtspreq == RTSPREQ_GET_PARAMETER) {
+ data->state.expect100header = FALSE; /* RTSP posts are simple/small */
+ }
+ else if(rtspreq == RTSPREQ_GET_PARAMETER) {
/* Check for an empty GET_PARAMETER (heartbeat) request */
data->set.httpreq = HTTPREQ_HEAD;
data->set.opt_no_body = TRUE;
@@ -521,10 +580,11 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
return result;
}
-CURLcode Curl_rtsp_rtp_readwrite(struct SessionHandle *data,
- struct connectdata *conn,
- ssize_t *nread,
- bool *readmore) {
+
+static CURLcode rtsp_rtp_readwrite(struct SessionHandle *data,
+ struct connectdata *conn,
+ ssize_t *nread,
+ bool *readmore) {
struct SingleRequest *k = &data->req;
struct rtsp_conn *rtspc = &(conn->proto.rtspc);
@@ -606,7 +666,7 @@ CURLcode Curl_rtsp_rtp_readwrite(struct SessionHandle *data,
}
if(rtp_dataleft != 0 && rtp[0] == '$') {
- DEBUGF(infof(data, "RTP Rewinding %zu %s\n", rtp_dataleft,
+ DEBUGF(infof(data, "RTP Rewinding %zd %s\n", rtp_dataleft,
*readmore ? "(READMORE)" : ""));
/* Store the incomplete RTP packet for a "rewind" */
@@ -685,15 +745,10 @@ CURLcode Curl_rtsp_parseheader(struct connectdata *conn,
if(checkprefix("CSeq:", header)) {
/* Store the received CSeq. Match is verified in rtsp_done */
- int nc;
- char *temp = strdup(header);
- if(!temp)
- return CURLE_OUT_OF_MEMORY;
- Curl_strntoupper(temp, temp, sizeof(temp));
- nc = sscanf(temp, "CSEQ: %ld", &CSeq);
- free(temp);
+ int nc = sscanf(&header[4], ": %ld", &CSeq);
if(nc == 1) {
- data->state.proto.rtsp->CSeq_recv = CSeq; /* mark the request */
+ struct RTSP *rtsp = data->req.protop;
+ rtsp->CSeq_recv = CSeq; /* mark the request */
data->state.rtsp_CSeq_recv = CSeq; /* update the handle */
}
else {
@@ -705,7 +760,7 @@ CURLcode Curl_rtsp_parseheader(struct connectdata *conn,
char *start;
/* Find the first non-space letter */
- start = header + 9;
+ start = header + 8;
while(*start && ISSPACE(*start))
start++;
diff --git a/lib/rtsp.h b/lib/rtsp.h
index c3f8bd74..3ffa70cc 100644
--- a/lib/rtsp.h
+++ b/lib/rtsp.h
@@ -1,6 +1,5 @@
-#ifndef __RTSP_H_
-#define __RTSP_H_
-
+#ifndef HEADER_CURL_RTSP_H
+#define HEADER_CURL_RTSP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -8,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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,27 +25,14 @@
extern const struct Curl_handler Curl_handler_rtsp;
-/*
- * Parse and write out any available RTP data.
- *
- * nread: amount of data left after k->str. will be modified if RTP
- * data is parsed and k->str is moved up
- * readmore: whether or not the RTP parser needs more data right away
- */
-CURLcode Curl_rtsp_rtp_readwrite(struct SessionHandle *data,
- struct connectdata *conn,
- ssize_t *nread,
- bool *readmore);
-
-
-/* protocol-specific functions set up to be called by the main engine */
-CURLcode Curl_rtsp(struct connectdata *conn, bool *done);
-CURLcode Curl_rtsp_done(struct connectdata *conn, CURLcode, bool premature);
-CURLcode Curl_rtsp_connect(struct connectdata *conn, bool *done);
-CURLcode Curl_rtsp_disconnect(struct connectdata *conn);
-
+bool Curl_rtsp_connisdead(struct connectdata *check);
CURLcode Curl_rtsp_parseheader(struct connectdata *conn, char *header);
+#else
+/* disabled */
+#define Curl_rtsp_parseheader(x,y) CURLE_NOT_BUILT_IN
+#define Curl_rtsp_connisdead(x) TRUE
+
#endif /* CURL_DISABLE_RTSP */
/*
@@ -79,4 +65,5 @@ struct RTSP {
};
-#endif /* __RTSP_H_ */
+#endif /* HEADER_CURL_RTSP_H */
+
diff --git a/lib/security.c b/lib/security.c
index 73a55401..014bbf1b 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -10,7 +10,7 @@
* Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
*
- * Copyright (C) 2001 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2001 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* All rights reserved.
*
@@ -41,29 +41,27 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. */
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FTP
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
-
-#include <stdarg.h>
-#include <string.h>
+#ifdef HAVE_GSSAPI
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
#endif
#include "urldata.h"
#include "curl_base64.h"
#include "curl_memory.h"
-#include "krb4.h"
+#include "curl_sec.h"
#include "ftp.h"
#include "sendf.h"
#include "rawstr.h"
+#include "warnless.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -72,10 +70,10 @@ static const struct {
enum protection_level level;
const char *name;
} level_names[] = {
- { prot_clear, "clear" },
- { prot_safe, "safe" },
- { prot_confidential, "confidential" },
- { prot_private, "private" }
+ { PROT_CLEAR, "clear" },
+ { PROT_SAFE, "safe" },
+ { PROT_CONFIDENTIAL, "confidential" },
+ { PROT_PRIVATE, "private" }
};
static enum protection_level
@@ -85,22 +83,22 @@ name_to_level(const char *name)
for(i = 0; i < (int)sizeof(level_names)/(int)sizeof(level_names[0]); i++)
if(checkprefix(name, level_names[i].name))
return level_names[i].level;
- return (enum protection_level)-1;
+ return PROT_NONE;
}
/* Convert a protocol |level| to its char representation.
We take an int to catch programming mistakes. */
static char level_to_char(int level) {
switch(level) {
- case prot_clear:
+ case PROT_CLEAR:
return 'C';
- case prot_safe:
+ case PROT_SAFE:
return 'S';
- case prot_confidential:
+ case PROT_CONFIDENTIAL:
return 'E';
- case prot_private:
+ case PROT_PRIVATE:
return 'P';
- case prot_cmd:
+ case PROT_CMD:
/* Fall through */
default:
/* Those 2 cases should not be reached! */
@@ -111,22 +109,12 @@ static char level_to_char(int level) {
return 'P';
}
-static const struct Curl_sec_client_mech * const mechs[] = {
-#if defined(HAVE_GSSAPI)
- &Curl_krb5_client_mech,
-#endif
-#if defined(HAVE_KRB4)
- &Curl_krb4_client_mech,
-#endif
- NULL
-};
-
/* Send an FTP command defined by |message| and the optional arguments. The
function returns the ftp_code. If an error occurs, -1 is returned. */
static int ftp_send_command(struct connectdata *conn, const char *message, ...)
{
int ftp_code;
- ssize_t nread;
+ ssize_t nread=0;
va_list args;
char print_buffer[50];
@@ -134,11 +122,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) != CURLE_OK) {
+ if(Curl_ftpsendf(conn, print_buffer)) {
ftp_code = -1;
}
else {
- if(Curl_GetFTPResponse(&nread, conn, &ftp_code) != CURLE_OK)
+ if(Curl_GetFTPResponse(&nread, conn, &ftp_code))
ftp_code = -1;
}
@@ -147,25 +135,25 @@ static int ftp_send_command(struct connectdata *conn, const char *message, ...)
}
/* Read |len| from the socket |fd| and store it in |to|. Return a CURLcode
- saying whether an error occured or CURLE_OK if |len| was read. */
+ saying whether an error occurred or CURLE_OK if |len| was read. */
static CURLcode
socket_read(curl_socket_t fd, void *to, size_t len)
{
char *to_p = to;
- CURLcode code;
+ CURLcode result;
ssize_t nread;
while(len > 0) {
- code = Curl_read_plain(fd, to_p, len, &nread);
- if(code == CURLE_OK) {
+ result = Curl_read_plain(fd, to_p, len, &nread);
+ if(!result) {
len -= nread;
to_p += nread;
}
else {
/* FIXME: We are doing a busy wait */
- if(code == CURLE_AGAIN)
+ if(result == CURLE_AGAIN)
continue;
- return code;
+ return result;
}
}
return CURLE_OK;
@@ -173,27 +161,27 @@ socket_read(curl_socket_t fd, void *to, size_t len)
/* Write |len| bytes from the buffer |to| to the socket |fd|. Return a
- CURLcode saying whether an error occured or CURLE_OK if |len| was
+ CURLcode saying whether an error occurred or CURLE_OK if |len| was
written. */
static CURLcode
socket_write(struct connectdata *conn, curl_socket_t fd, const void *to,
size_t len)
{
const char *to_p = to;
- CURLcode code;
+ CURLcode result;
ssize_t written;
while(len > 0) {
- code = Curl_write_plain(conn, fd, to_p, len, &written);
- if(code == CURLE_OK) {
+ result = Curl_write_plain(conn, fd, to_p, len, &written);
+ if(!result) {
len -= written;
to_p += written;
}
else {
/* FIXME: We are doing a busy wait */
- if(code == CURLE_AGAIN)
+ if(result == CURLE_AGAIN)
continue;
- return code;
+ return result;
}
}
return CURLE_OK;
@@ -201,25 +189,25 @@ socket_write(struct connectdata *conn, curl_socket_t fd, const void *to,
static CURLcode read_data(struct connectdata *conn,
curl_socket_t fd,
- struct krb4buffer *buf)
+ struct krb5buffer *buf)
{
int len;
void* tmp;
- CURLcode ret;
+ CURLcode result;
- ret = socket_read(fd, &len, sizeof(len));
- if (ret != CURLE_OK)
- return ret;
+ result = socket_read(fd, &len, sizeof(len));
+ if(result)
+ return result;
len = ntohl(len);
tmp = realloc(buf->data, len);
- if (tmp == NULL)
+ if(tmp == NULL)
return CURLE_OUT_OF_MEMORY;
buf->data = tmp;
- ret = socket_read(fd, buf->data, len);
- if (ret != CURLE_OK)
- return ret;
+ result = socket_read(fd, buf->data, len);
+ if(result)
+ return result;
buf->size = conn->mech->decode(conn->app_data, buf->data, len,
conn->data_prot, conn);
buf->index = 0;
@@ -227,7 +215,7 @@ static CURLcode read_data(struct connectdata *conn,
}
static size_t
-buffer_read(struct krb4buffer *buf, void *data, size_t len)
+buffer_read(struct krb5buffer *buf, void *data, size_t len)
{
if(buf->size - buf->index < len)
len = buf->size - buf->index;
@@ -247,7 +235,7 @@ static ssize_t sec_recv(struct connectdata *conn, int sockindex,
*err = CURLE_OK;
/* Handle clear text response. */
- if(conn->sec_complete == 0 || conn->data_prot == prot_clear)
+ if(conn->sec_complete == 0 || conn->data_prot == PROT_CLEAR)
return read(fd, buffer, len);
if(conn->in_buffer.eof_flag) {
@@ -261,7 +249,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) != CURLE_OK)
+ if(read_data(conn, fd, &conn->in_buffer))
return -1;
if(conn->in_buffer.size == 0) {
if(bytes_read > 0)
@@ -283,34 +271,45 @@ static ssize_t sec_recv(struct connectdata *conn, int sockindex,
static void do_sec_send(struct connectdata *conn, curl_socket_t fd,
const char *from, int length)
{
- size_t bytes;
- size_t htonl_bytes;
- char *buffer;
+ int bytes, htonl_bytes; /* 32-bit integers for htonl */
+ char *buffer = NULL;
char *cmd_buffer;
+ size_t cmd_size = 0;
+ CURLcode error;
enum protection_level prot_level = conn->data_prot;
- bool iscmd = prot_level == prot_cmd;
+ bool iscmd = (prot_level == PROT_CMD)?TRUE:FALSE;
+
+ DEBUGASSERT(prot_level > PROT_NONE && prot_level < PROT_LAST);
if(iscmd) {
if(!strncmp(from, "PASS ", 5) || !strncmp(from, "ACCT ", 5))
- prot_level = prot_private;
+ prot_level = PROT_PRIVATE;
else
prot_level = conn->command_prot;
}
bytes = conn->mech->encode(conn->app_data, from, length, prot_level,
- (void**)&buffer, conn);
+ (void**)&buffer);
+ if(!buffer || bytes <= 0)
+ return; /* error */
+
if(iscmd) {
- bytes = Curl_base64_encode(conn->data, buffer, bytes, &cmd_buffer);
- if(bytes > 0) {
+ error = Curl_base64_encode(conn->data, buffer, curlx_sitouz(bytes),
+ &cmd_buffer, &cmd_size);
+ if(error) {
+ free(buffer);
+ return; /* error */
+ }
+ if(cmd_size > 0) {
static const char *enc = "ENC ";
static const char *mic = "MIC ";
- if(prot_level == prot_private)
+ if(prot_level == PROT_PRIVATE)
socket_write(conn, fd, enc, 4);
else
socket_write(conn, fd, mic, 4);
- socket_write(conn, fd, cmd_buffer, bytes);
+ socket_write(conn, fd, cmd_buffer, cmd_size);
socket_write(conn, fd, "\r\n", 2);
- infof(conn->data, "Send: %s%s\n", prot_level == prot_private?enc:mic,
+ infof(conn->data, "Send: %s%s\n", prot_level == PROT_PRIVATE?enc:mic,
cmd_buffer);
free(cmd_buffer);
}
@@ -318,7 +317,7 @@ static void do_sec_send(struct connectdata *conn, curl_socket_t fd,
else {
htonl_bytes = htonl(bytes);
socket_write(conn, fd, &htonl_bytes, sizeof(htonl_bytes));
- socket_write(conn, fd, buffer, bytes);
+ socket_write(conn, fd, buffer, curlx_sitouz(bytes));
}
free(buffer);
}
@@ -326,19 +325,17 @@ 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 len = conn->buffer_size;
- int tx = 0;
+ ssize_t tx = 0, len = conn->buffer_size;
- len -= conn->mech->overhead(conn->app_data, conn->data_prot, len);
+ len -= conn->mech->overhead(conn->app_data, conn->data_prot,
+ curlx_sztosi(len));
if(len <= 0)
len = length;
while(length) {
- if(len >= 0 || length < (size_t)len) {
- /* FIXME: Check for overflow. */
+ if(length < (size_t)len)
len = length;
- }
- do_sec_send(conn, fd, buffer, len);
+
+ do_sec_send(conn, fd, buffer, curlx_sztosi(len));
length -= len;
buffer += len;
tx += len;
@@ -355,20 +352,28 @@ static ssize_t sec_send(struct connectdata *conn, int sockindex,
return sec_write(conn, fd, buffer, len);
}
-/* FIXME: |level| should not be an int but a struct protection_level */
-int Curl_sec_read_msg(struct connectdata *conn, char *buffer, int level)
+int Curl_sec_read_msg(struct connectdata *conn, char *buffer,
+ enum protection_level level)
{
/* decoded_len should be size_t or ssize_t but conn->mech->decode returns an
int */
int decoded_len;
char *buf;
- int ret_code;
+ int ret_code = 0;
+ size_t decoded_sz = 0;
+ CURLcode error;
- decoded_len = Curl_base64_decode(buffer + 4, (unsigned char **)&buf);
- if(decoded_len <= 0) {
+ DEBUGASSERT(level > PROT_NONE && level < PROT_LAST);
+
+ error = Curl_base64_decode(buffer + 4, (unsigned char **)&buf, &decoded_sz);
+ if(error || decoded_sz == 0)
+ return -1;
+
+ if(decoded_sz > (size_t)INT_MAX) {
free(buf);
return -1;
}
+ decoded_len = curlx_uztosi(decoded_sz);
decoded_len = conn->mech->decode(conn->app_data, buf, decoded_len,
level, conn);
@@ -383,13 +388,13 @@ int Curl_sec_read_msg(struct connectdata *conn, char *buffer, int level)
}
buf[decoded_len] = '\0';
- DEBUGASSERT(decoded_len > 3);
- if(buf[3] == '-')
- ret_code = 0;
- else {
- /* Check for error? */
- sscanf(buf, "%d", &ret_code);
- }
+ if(decoded_len <= 3)
+ /* suspiciously short */
+ return 0;
+
+ if(buf[3] != '-')
+ /* safe to ignore return code */
+ (void)sscanf(buf, "%d", &ret_code);
if(buf[decoded_len - 1] == '\n')
buf[decoded_len - 1] = '\0';
@@ -399,22 +404,16 @@ int Curl_sec_read_msg(struct connectdata *conn, char *buffer, int level)
return ret_code;
}
-enum protection_level
-Curl_set_command_prot(struct connectdata *conn, enum protection_level level)
-{
- enum protection_level old = conn->command_prot;
- conn->command_prot = level;
- return old;
-}
-
/* FIXME: The error code returned here is never checked. */
-int Curl_sec_set_protection_level(struct connectdata *conn)
+static int sec_set_protection_level(struct connectdata *conn)
{
int code;
char* pbsz;
static unsigned int buffer_size = 1 << 20; /* 1048576 */
enum protection_level level = conn->request_data_prot;
+ DEBUGASSERT(level > PROT_NONE && level < PROT_LAST);
+
if(!conn->sec_complete) {
infof(conn->data, "Trying to change the protection level after the"
"completion of the data exchange.\n");
@@ -438,8 +437,8 @@ int Curl_sec_set_protection_level(struct connectdata *conn)
pbsz = strstr(conn->data->state.buffer, "PBSZ=");
if(pbsz) {
- /* FIXME: Checks for errors in sscanf? */
- sscanf(pbsz, "PBSZ=%u", &buffer_size);
+ /* ignore return code, use default value if it fails */
+ (void)sscanf(pbsz, "PBSZ=%u", &buffer_size);
if(buffer_size < conn->buffer_size)
conn->buffer_size = buffer_size;
}
@@ -457,7 +456,7 @@ int Curl_sec_set_protection_level(struct connectdata *conn)
}
conn->data_prot = level;
- if(level == prot_private)
+ if(level == PROT_PRIVATE)
conn->command_prot = level;
return 0;
@@ -466,10 +465,11 @@ int Curl_sec_set_protection_level(struct connectdata *conn)
int
Curl_sec_request_prot(struct connectdata *conn, const char *level)
{
- int l = name_to_level(level);
- if(l == -1)
+ enum protection_level l = name_to_level(level);
+ if(l == PROT_NONE)
return -1;
- conn->request_data_prot = (enum protection_level)l;
+ DEBUGASSERT(l > PROT_NONE && l < PROT_LAST);
+ conn->request_data_prot = l;
return 0;
}
@@ -477,85 +477,75 @@ static CURLcode choose_mech(struct connectdata *conn)
{
int ret;
struct SessionHandle *data = conn->data;
- const struct Curl_sec_client_mech * const *mech;
void *tmp_allocation;
- const char *mech_name;
-
- for(mech = mechs; (*mech); ++mech) {
- mech_name = (*mech)->name;
- /* We have no mechanism with a NULL name but keep this check */
- DEBUGASSERT(mech_name != NULL);
- if(mech_name == NULL) {
- infof(data, "Skipping mechanism with empty name (%p)\n", mech);
- continue;
- }
- tmp_allocation = realloc(conn->app_data, (*mech)->size);
- if(tmp_allocation == NULL) {
- failf(data, "Failed realloc of size %u", (*mech)->size);
- mech = NULL;
- return CURLE_OUT_OF_MEMORY;
- }
- conn->app_data = tmp_allocation;
+ const struct Curl_sec_client_mech *mech = &Curl_krb5_client_mech;
- if((*mech)->init) {
- ret = (*mech)->init(conn);
- if(ret != 0) {
- infof(data, "Failed initialization for %s. Skipping it.\n", mech_name);
- continue;
- }
+ tmp_allocation = realloc(conn->app_data, mech->size);
+ if(tmp_allocation == NULL) {
+ failf(data, "Failed realloc of size %u", mech->size);
+ mech = NULL;
+ return CURLE_OUT_OF_MEMORY;
+ }
+ conn->app_data = tmp_allocation;
+
+ if(mech->init) {
+ ret = mech->init(conn->app_data);
+ if(ret) {
+ infof(data, "Failed initialization for %s. Skipping it.\n",
+ mech->name);
+ return CURLE_FAILED_INIT;
}
+ }
- infof(data, "Trying mechanism %s...\n", mech_name);
- ret = ftp_send_command(conn, "AUTH %s", mech_name);
- if(ret < 0)
- /* FIXME: This error is too generic but it is OK for now. */
- return CURLE_COULDNT_CONNECT;
-
- if(ret/100 != 3) {
- switch(ret) {
- case 504:
- infof(data, "Mechanism %s is not supported by the server (server "
- "returned ftp code: 504).\n", mech_name);
- break;
- case 534:
- infof(data, "Mechanism %s was rejected by the server (server returned "
- "ftp code: 534).\n", mech_name);
- break;
- default:
- if(ret/100 == 5) {
- infof(data, "The server does not support the security extensions.\n");
- return CURLE_USE_SSL_FAILED;
- }
- break;
+ infof(data, "Trying mechanism %s...\n", mech->name);
+ ret = ftp_send_command(conn, "AUTH %s", mech->name);
+ if(ret < 0)
+ /* FIXME: This error is too generic but it is OK for now. */
+ return CURLE_COULDNT_CONNECT;
+
+ if(ret/100 != 3) {
+ switch(ret) {
+ case 504:
+ infof(data, "Mechanism %s is not supported by the server (server "
+ "returned ftp code: 504).\n", mech->name);
+ break;
+ case 534:
+ infof(data, "Mechanism %s was rejected by the server (server returned "
+ "ftp code: 534).\n", mech->name);
+ break;
+ default:
+ if(ret/100 == 5) {
+ infof(data, "server does not support the security extensions\n");
+ return CURLE_USE_SSL_FAILED;
}
- continue;
+ break;
}
+ return CURLE_LOGIN_DENIED;
+ }
- /* Authenticate */
- ret = (*mech)->auth(conn->app_data, conn);
+ /* Authenticate */
+ ret = mech->auth(conn->app_data, conn);
- if(ret == AUTH_CONTINUE)
- continue;
- else if(ret != AUTH_OK) {
+ if(ret != AUTH_CONTINUE) {
+ if(ret != AUTH_OK) {
/* Mechanism has dumped the error to stderr, don't error here. */
return -1;
}
DEBUGASSERT(ret == AUTH_OK);
- conn->mech = *mech;
+ conn->mech = mech;
conn->sec_complete = 1;
conn->recv[FIRSTSOCKET] = sec_recv;
conn->send[FIRSTSOCKET] = sec_send;
conn->recv[SECONDARYSOCKET] = sec_recv;
conn->send[SECONDARYSOCKET] = sec_send;
- conn->command_prot = prot_safe;
+ conn->command_prot = PROT_SAFE;
/* Set the requested protection level */
/* BLOCKING */
- Curl_sec_set_protection_level(conn);
- break;
+ (void)sec_set_protection_level(conn);
}
- return mech != NULL ? CURLE_OK : CURLE_FAILED_INIT;
+ return CURLE_OK;
}
CURLcode
@@ -570,10 +560,8 @@ Curl_sec_end(struct connectdata *conn)
{
if(conn->mech != NULL && conn->mech->end)
conn->mech->end(conn->app_data);
- if(conn->app_data) {
- free(conn->app_data);
- conn->app_data = NULL;
- }
+ free(conn->app_data);
+ conn->app_data = NULL;
if(conn->in_buffer.data) {
free(conn->in_buffer.data);
conn->in_buffer.data = NULL;
@@ -583,10 +571,10 @@ Curl_sec_end(struct connectdata *conn)
conn->in_buffer.eof_flag = 0;
}
conn->sec_complete = 0;
- conn->data_prot = (enum protection_level)0;
+ conn->data_prot = PROT_CLEAR;
conn->mech = NULL;
}
-#endif /* HAVE_KRB4 || HAVE_GSSAPI */
+#endif /* HAVE_GSSAPI */
#endif /* CURL_DISABLE_FTP */
diff --git a/lib/select.c b/lib/select.c
index e6882da7..24dc5fd7 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +20,11 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
#if !defined(HAVE_SELECT) && !defined(HAVE_POLL_FINE)
#error "We can't compile without select() or poll() support."
@@ -42,35 +39,23 @@
#include <dos.h> /* delay() */
#endif
+#ifdef __VXWORKS__
+#include <strings.h> /* bzero() in FD_SET */
+#endif
+
#include <curl/curl.h>
#include "urldata.h"
#include "connect.h"
#include "select.h"
-
-/* Winsock and TPF sockets are not in range [0..FD_SETSIZE-1] */
-
-#if defined(USE_WINSOCK) || defined(TPF)
-#define VERIFY_SOCK(x) do { } while(0)
-#else
-#define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
-#define VERIFY_SOCK(x) do { \
- if(!VALID_SOCK(x)) { \
- SET_SOCKERRNO(EINVAL); \
- return -1; \
- } \
-} while(0)
-#endif
+#include "warnless.h"
/* Convenience local macros */
#define elapsed_ms (int)curlx_tvdiff(curlx_tvnow(), initial_tv)
-#ifdef CURL_ACKNOWLEDGE_EINTR
-#define error_not_EINTR (1)
-#else
-#define error_not_EINTR (error != EINTR)
-#endif
+int Curl_ack_eintr = 0;
+#define error_not_EINTR (Curl_ack_eintr || error != EINTR)
/*
* Internal function used for waiting a specific amount of ms
@@ -83,16 +68,12 @@
* Timeout resolution, accuracy, as well as maximum supported
* value is system dependent, neither factor is a citical issue
* for the intended use of this function in the library.
- * On non-DOS and non-Winsock platforms, when compiled with
- * CURL_ACKNOWLEDGE_EINTR defined, EINTR condition is honored
- * and function might exit early without awaiting full timeout,
- * otherwise EINTR will be ignored and full timeout will elapse.
*
* Return values:
* -1 = system call error, invalid timeout value, or interrupted
* 0 = specified timeout has elapsed
*/
-static int wait_ms(int timeout_ms)
+int Curl_wait_ms(int timeout_ms)
{
#if !defined(MSDOS) && !defined(USE_WINSOCK)
#ifndef HAVE_POLL_FINE
@@ -131,8 +112,10 @@ static int wait_ms(int timeout_ms)
if(error && error_not_EINTR)
break;
pending_ms = timeout_ms - elapsed_ms;
- if(pending_ms <= 0)
+ if(pending_ms <= 0) {
+ r = 0; /* Simulate a "call timed out" case */
break;
+ }
} while(r == -1);
#endif /* USE_WINSOCK */
if(r)
@@ -141,28 +124,32 @@ static int wait_ms(int timeout_ms)
}
/*
- * This is an internal function used for waiting for read or write
- * events on a pair of file descriptors. It uses poll() when a fine
- * poll() is available, in order to avoid limits with FD_SETSIZE,
- * otherwise select() is used. An error is returned if select() is
- * being used and a file descriptor is too large for FD_SETSIZE.
+ * Wait for read or write events on a set of file descriptors. It uses poll()
+ * when a fine poll() is available, in order to avoid limits with FD_SETSIZE,
+ * otherwise select() is used. An error is returned if select() is being used
+ * and a file descriptor is too large for FD_SETSIZE.
+ *
* A negative timeout value makes this function wait indefinitely,
* unles no valid file descriptor is given, when this happens the
* negative timeout is ignored and the function times out immediately.
- * When compiled with CURL_ACKNOWLEDGE_EINTR defined, EINTR condition
- * is honored and function might exit early without awaiting timeout,
- * otherwise EINTR will be ignored.
*
* Return values:
* -1 = system call error or fd >= FD_SETSIZE
* 0 = timeout
- * CURL_CSELECT_IN | CURL_CSELECT_OUT | CURL_CSELECT_ERR
+ * [bitmask] = action as described below
+ *
+ * CURL_CSELECT_IN - first socket is readable
+ * CURL_CSELECT_IN2 - second socket is readable
+ * CURL_CSELECT_OUT - write socket is writable
+ * CURL_CSELECT_ERR - an error condition occurred
*/
-int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
- int timeout_ms)
+int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
+ curl_socket_t readfd1,
+ curl_socket_t writefd, /* socket to write to */
+ long timeout_ms) /* milliseconds to wait */
{
#ifdef HAVE_POLL_FINE
- struct pollfd pfd[2];
+ struct pollfd pfd[3];
int num;
#else
struct timeval pending_tv;
@@ -172,14 +159,16 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
fd_set fds_err;
curl_socket_t maxfd;
#endif
- struct timeval initial_tv = {0,0};
+ struct timeval initial_tv = {0, 0};
int pending_ms = 0;
int error;
int r;
int ret;
- if((readfd == CURL_SOCKET_BAD) && (writefd == CURL_SOCKET_BAD)) {
- r = wait_ms(timeout_ms);
+ if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
+ (writefd == CURL_SOCKET_BAD)) {
+ /* no sockets, just wait */
+ r = Curl_wait_ms((int)timeout_ms);
return r;
}
@@ -189,15 +178,21 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
value indicating a blocking call should be performed. */
if(timeout_ms > 0) {
- pending_ms = timeout_ms;
+ pending_ms = (int)timeout_ms;
initial_tv = curlx_tvnow();
}
#ifdef HAVE_POLL_FINE
num = 0;
- if(readfd != CURL_SOCKET_BAD) {
- pfd[num].fd = readfd;
+ if(readfd0 != CURL_SOCKET_BAD) {
+ pfd[num].fd = readfd0;
+ pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI;
+ pfd[num].revents = 0;
+ num++;
+ }
+ if(readfd1 != CURL_SOCKET_BAD) {
+ pfd[num].fd = readfd1;
pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI;
pfd[num].revents = 0;
num++;
@@ -221,9 +216,11 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
if(error && error_not_EINTR)
break;
if(timeout_ms > 0) {
- pending_ms = timeout_ms - elapsed_ms;
- if(pending_ms <= 0)
+ pending_ms = (int)(timeout_ms - elapsed_ms);
+ if(pending_ms <= 0) {
+ r = 0; /* Simulate a "call timed out" case */
break;
+ }
}
} while(r == -1);
@@ -234,13 +231,20 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
ret = 0;
num = 0;
- if(readfd != CURL_SOCKET_BAD) {
+ if(readfd0 != CURL_SOCKET_BAD) {
if(pfd[num].revents & (POLLRDNORM|POLLIN|POLLERR|POLLHUP))
ret |= CURL_CSELECT_IN;
if(pfd[num].revents & (POLLRDBAND|POLLPRI|POLLNVAL))
ret |= CURL_CSELECT_ERR;
num++;
}
+ if(readfd1 != CURL_SOCKET_BAD) {
+ if(pfd[num].revents & (POLLRDNORM|POLLIN|POLLERR|POLLHUP))
+ ret |= CURL_CSELECT_IN2;
+ if(pfd[num].revents & (POLLRDBAND|POLLPRI|POLLNVAL))
+ ret |= CURL_CSELECT_ERR;
+ num++;
+ }
if(writefd != CURL_SOCKET_BAD) {
if(pfd[num].revents & (POLLWRNORM|POLLOUT))
ret |= CURL_CSELECT_OUT;
@@ -256,11 +260,18 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
maxfd = (curl_socket_t)-1;
FD_ZERO(&fds_read);
- if(readfd != CURL_SOCKET_BAD) {
- VERIFY_SOCK(readfd);
- FD_SET(readfd, &fds_read);
- FD_SET(readfd, &fds_err);
- maxfd = readfd;
+ if(readfd0 != CURL_SOCKET_BAD) {
+ VERIFY_SOCK(readfd0);
+ FD_SET(readfd0, &fds_read);
+ FD_SET(readfd0, &fds_err);
+ maxfd = readfd0;
+ }
+ if(readfd1 != CURL_SOCKET_BAD) {
+ VERIFY_SOCK(readfd1);
+ FD_SET(readfd1, &fds_read);
+ FD_SET(readfd1, &fds_err);
+ if(readfd1 > maxfd)
+ maxfd = readfd1;
}
FD_ZERO(&fds_write);
@@ -283,7 +294,37 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
pending_tv.tv_sec = 0;
pending_tv.tv_usec = 0;
}
- r = select((int)maxfd + 1, &fds_read, &fds_write, &fds_err, ptimeout);
+
+ /* WinSock select() must not be called with an fd_set that contains zero
+ fd flags, or it will return WSAEINVAL. But, it also can't be called
+ with no fd_sets at all! From the documentation:
+
+ Any two of the parameters, readfds, writefds, or exceptfds, can be
+ given as null. At least one must be non-null, and any non-null
+ descriptor set must contain at least one handle to a socket.
+
+ We know that we have at least one bit set in at least two fd_sets in
+ this case, but we may have no bits set in either fds_read or fd_write,
+ so check for that and handle it. Luckily, with WinSock, we can _also_
+ ask how many bits are set on an fd_set.
+
+ It is unclear why WinSock doesn't just handle this for us instead of
+ calling this an error.
+
+ Note also that WinSock ignores the first argument, so we don't worry
+ about the fact that maxfd is computed incorrectly with WinSock (since
+ curl_socket_t is unsigned in such cases and thus -1 is the largest
+ value).
+ */
+ r = select((int)maxfd + 1,
+#ifndef USE_WINSOCK
+ &fds_read,
+ &fds_write,
+#else
+ fds_read.fd_count ? &fds_read : NULL,
+ fds_write.fd_count ? &fds_write : NULL,
+#endif
+ &fds_err, ptimeout);
if(r != -1)
break;
error = SOCKERRNO;
@@ -291,8 +332,10 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
break;
if(timeout_ms > 0) {
pending_ms = timeout_ms - elapsed_ms;
- if(pending_ms <= 0)
+ if(pending_ms <= 0) {
+ r = 0; /* Simulate a "call timed out" case */
break;
+ }
}
} while(r == -1);
@@ -302,10 +345,16 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
return 0;
ret = 0;
- if(readfd != CURL_SOCKET_BAD) {
- if(FD_ISSET(readfd, &fds_read))
+ if(readfd0 != CURL_SOCKET_BAD) {
+ if(FD_ISSET(readfd0, &fds_read))
ret |= CURL_CSELECT_IN;
- if(FD_ISSET(readfd, &fds_err))
+ if(FD_ISSET(readfd0, &fds_err))
+ ret |= CURL_CSELECT_ERR;
+ }
+ if(readfd1 != CURL_SOCKET_BAD) {
+ if(FD_ISSET(readfd1, &fds_read))
+ ret |= CURL_CSELECT_IN2;
+ if(FD_ISSET(readfd1, &fds_err))
ret |= CURL_CSELECT_ERR;
}
if(writefd != CURL_SOCKET_BAD) {
@@ -328,9 +377,6 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
* A negative timeout value makes this function wait indefinitely,
* unles no valid file descriptor is given, when this happens the
* negative timeout is ignored and the function times out immediately.
- * When compiled with CURL_ACKNOWLEDGE_EINTR defined, EINTR condition
- * is honored and function might exit early without awaiting timeout,
- * otherwise EINTR will be ignored.
*
* Return values:
* -1 = system call error or fd >= FD_SETSIZE
@@ -347,7 +393,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
fd_set fds_err;
curl_socket_t maxfd;
#endif
- struct timeval initial_tv = {0,0};
+ struct timeval initial_tv = {0, 0};
bool fds_none = TRUE;
unsigned int i;
int pending_ms = 0;
@@ -355,7 +401,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
int r;
if(ufds) {
- for (i = 0; i < nfds; i++) {
+ for(i = 0; i < nfds; i++) {
if(ufds[i].fd != CURL_SOCKET_BAD) {
fds_none = FALSE;
break;
@@ -363,7 +409,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
}
}
if(fds_none) {
- r = wait_ms(timeout_ms);
+ r = Curl_wait_ms(timeout_ms);
return r;
}
@@ -392,8 +438,10 @@ 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)
+ if(pending_ms <= 0) {
+ r = 0; /* Simulate a "call timed out" case */
break;
+ }
}
} while(r == -1);
@@ -402,7 +450,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
if(r == 0)
return 0;
- for (i = 0; i < nfds; i++) {
+ for(i = 0; i < nfds; i++) {
if(ufds[i].fd == CURL_SOCKET_BAD)
continue;
if(ufds[i].revents & POLLHUP)
@@ -418,7 +466,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
FD_ZERO(&fds_err);
maxfd = (curl_socket_t)-1;
- for (i = 0; i < nfds; i++) {
+ for(i = 0; i < nfds; i++) {
ufds[i].revents = 0;
if(ufds[i].fd == CURL_SOCKET_BAD)
continue;
@@ -436,6 +484,16 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
}
}
+#ifdef USE_WINSOCK
+ /* WinSock select() can't handle zero events. See the comment about this in
+ Curl_check_socket(). */
+ if(fds_read.fd_count == 0 && fds_write.fd_count == 0
+ && fds_err.fd_count == 0) {
+ r = Curl_wait_ms(timeout_ms);
+ return r;
+ }
+#endif
+
ptimeout = (timeout_ms < 0) ? NULL : &pending_tv;
do {
@@ -447,7 +505,19 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
pending_tv.tv_sec = 0;
pending_tv.tv_usec = 0;
}
- r = select((int)maxfd + 1, &fds_read, &fds_write, &fds_err, ptimeout);
+ r = select((int)maxfd + 1,
+#ifndef USE_WINSOCK
+ &fds_read, &fds_write, &fds_err,
+#else
+ /* WinSock select() can't handle fd_sets with zero bits set, so
+ don't give it such arguments. See the comment about this in
+ Curl_check_socket().
+ */
+ fds_read.fd_count ? &fds_read : NULL,
+ fds_write.fd_count ? &fds_write : NULL,
+ fds_err.fd_count ? &fds_err : NULL,
+#endif
+ ptimeout);
if(r != -1)
break;
error = SOCKERRNO;
@@ -455,8 +525,10 @@ 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)
+ if(pending_ms <= 0) {
+ r = 0; /* Simulate a "call timed out" case */
break;
+ }
}
} while(r == -1);
@@ -466,7 +538,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
return 0;
r = 0;
- for (i = 0; i < nfds; i++) {
+ for(i = 0; i < nfds; i++) {
ufds[i].revents = 0;
if(ufds[i].fd == CURL_SOCKET_BAD)
continue;
@@ -501,6 +573,6 @@ int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes,
rc = tpf_select_bsd(maxfds, reads, writes, excepts, tv);
tpf_process_signals();
- return(rc);
+ return rc;
}
#endif /* TPF */
diff --git a/lib/select.h b/lib/select.h
index e431e5f0..c00afe16 100644
--- a/lib/select.h
+++ b/lib/select.h
@@ -1,5 +1,5 @@
-#ifndef __SELECT_H
-#define __SELECT_H
+#ifndef HEADER_CURL_SELECT_H
+#define HEADER_CURL_SELECT_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
@@ -31,24 +31,6 @@
#endif
/*
- * poll() function on Windows Vista and later is called WSAPoll()
- */
-
-#if defined(USE_WINSOCK) && (USE_WINSOCK > 1) && \
- defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
-# undef HAVE_POLL
-# define HAVE_POLL 1
-# undef HAVE_POLL_FINE
-# define HAVE_POLL_FINE 1
-# define poll(x,y,z) WSAPoll((x),(y),(z))
-# if defined(_MSC_VER) && defined(POLLRDNORM)
-# undef POLLPRI
-# define POLLPRI POLLRDBAND
-# define HAVE_STRUCT_POLLFD 1
-# endif
-#endif
-
-/*
* Definition of pollfd struct and constants for platforms lacking them.
*/
@@ -84,14 +66,49 @@ struct pollfd
#define POLLRDBAND POLLPRI
#endif
-int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
- int timeout_ms);
+/* there are three CSELECT defines that are defined in the public header that
+ are exposed to users, but this *IN2 bit is only ever used internally and
+ therefore defined here */
+#define CURL_CSELECT_IN2 (CURL_CSELECT_ERR << 1)
+
+int Curl_socket_check(curl_socket_t readfd, curl_socket_t readfd2,
+ curl_socket_t writefd,
+ long timeout_ms);
+
+/* provide the former API internally */
+#define Curl_socket_ready(x,y,z) \
+ Curl_socket_check(x, CURL_SOCKET_BAD, y, z)
int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
+/* On non-DOS and non-Winsock platforms, when Curl_ack_eintr is set,
+ * EINTR condition is honored and function might exit early without
+ * awaiting full timeout. Otherwise EINTR will be ignored and full
+ * timeout will elapse. */
+extern int Curl_ack_eintr;
+
+int Curl_wait_ms(int timeout_ms);
+
#ifdef TPF
int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes,
fd_set* excepts, struct timeval* tv);
#endif
-#endif /* __SELECT_H */
+/* Winsock and TPF sockets are not in range [0..FD_SETSIZE-1], which
+ unfortunately makes it impossible for us to easily check if they're valid
+*/
+#if defined(USE_WINSOCK) || defined(TPF)
+#define VALID_SOCK(x) 1
+#define VERIFY_SOCK(x) Curl_nop_stmt
+#else
+#define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
+#define VERIFY_SOCK(x) do { \
+ if(!VALID_SOCK(x)) { \
+ SET_SOCKERRNO(EINVAL); \
+ return -1; \
+ } \
+} WHILE_FALSE
+#endif
+
+#endif /* HEADER_CURL_SELECT_H */
+
diff --git a/lib/sendf.c b/lib/sendf.c
index b73c2243..5f39d1f2 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,46 +20,22 @@
*
***************************************************************************/
-#include "setup.h"
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h> /* required for send() & recv() prototypes */
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "curl_setup.h"
#include <curl/curl.h>
+
#include "urldata.h"
#include "sendf.h"
#include "connect.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "ssh.h"
#include "multiif.h"
-#include "rtsp.h"
-
-#define _MPRINTF_REPLACE /* use the internal *printf() functions */
-#include <curl/mprintf.h>
-
-/* the krb4 functions only exists for FTP and if krb4 or gssapi is defined */
-#if !defined(CURL_DISABLE_FTP) && (defined(HAVE_KRB4) || defined(HAVE_GSSAPI))
-#include "krb4.h"
-#else
-#define Curl_sec_send(a,b,c,d) -1
-#define Curl_sec_read(a,b,c,d) -1
-#endif
+#include "non-ascii.h"
+#include "curl_printf.h"
+#include "strerror.h"
-#include <string.h>
+/* The last #include files should be: */
#include "curl_memory.h"
-#include "strerror.h"
-#include "easyif.h" /* for the Curl_convert_from_network prototype */
-/* The last #include file should be: */
#include "memdebug.h"
#ifdef CURL_DO_LINEEND_CONV
@@ -76,10 +52,10 @@ static size_t convert_lineends(struct SessionHandle *data,
/* sanity check */
if((startPtr == NULL) || (size < 1)) {
- return(size);
+ return size;
}
- if(data->state.prev_block_had_trailing_cr == TRUE) {
+ if(data->state.prev_block_had_trailing_cr) {
/* The previous block of incoming data
had a trailing CR, which was turned into a LF. */
if(*startPtr == '\n') {
@@ -138,9 +114,9 @@ static size_t convert_lineends(struct SessionHandle *data,
/* tidy up by null terminating the now shorter data */
*outPtr = '\0';
- return(outPtr - startPtr);
+ return (outPtr - startPtr);
}
- return(size);
+ return size;
}
#endif /* CURL_DO_LINEEND_CONV */
@@ -195,7 +171,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 res = CURLE_OK;
+ CURLcode result = CURLE_OK;
char *s;
char *sptr;
va_list ap;
@@ -211,9 +187,9 @@ CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn,
for(;;) {
/* Write the buffer to the socket */
- res = Curl_write(conn, sockfd, sptr, write_len, &bytes_written);
+ result = Curl_write(conn, sockfd, sptr, write_len, &bytes_written);
- if(CURLE_OK != res)
+ if(result)
break;
if(data->set.verbose)
@@ -231,7 +207,7 @@ CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn,
free(s); /* free the output string */
- return res;
+ return result;
}
/*
@@ -248,10 +224,10 @@ CURLcode Curl_write(struct connectdata *conn,
ssize_t *written)
{
ssize_t bytes_written;
- CURLcode curlcode = CURLE_OK;
+ CURLcode result = CURLE_OK;
int num = (sockfd == conn->sock[SECONDARYSOCKET]);
- bytes_written = conn->send[num](conn, num, mem, len, &curlcode);
+ bytes_written = conn->send[num](conn, num, mem, len, &result);
*written = bytes_written;
if(bytes_written >= 0)
@@ -259,7 +235,7 @@ CURLcode Curl_write(struct connectdata *conn,
return CURLE_OK;
/* handle CURLE_AGAIN or a send failure */
- switch(curlcode) {
+ switch(result) {
case CURLE_AGAIN:
*written = 0;
return CURLE_OK;
@@ -270,7 +246,7 @@ CURLcode Curl_write(struct connectdata *conn,
default:
/* we got a specific curlcode, forward it */
- return (CURLcode)curlcode;
+ return result;
}
}
@@ -298,9 +274,11 @@ ssize_t Curl_send_plain(struct connectdata *conn, int num,
/* this is just a case of EWOULDBLOCK */
bytes_written=0;
*code = CURLE_AGAIN;
- } else {
+ }
+ else {
failf(conn->data, "Send failure: %s",
Curl_strerror(conn, err));
+ conn->data->state.os_errno = err;
*code = CURLE_SEND_ERROR;
}
}
@@ -319,14 +297,14 @@ CURLcode Curl_write_plain(struct connectdata *conn,
ssize_t *written)
{
ssize_t bytes_written;
- CURLcode retcode;
+ CURLcode result;
int num = (sockfd == conn->sock[SECONDARYSOCKET]);
- bytes_written = Curl_send_plain(conn, num, mem, len, &retcode);
+ bytes_written = Curl_send_plain(conn, num, mem, len, &result);
*written = bytes_written;
- return retcode;
+ return result;
}
ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf,
@@ -352,9 +330,11 @@ ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf,
) {
/* this is just a case of EWOULDBLOCK */
*code = CURLE_AGAIN;
- } else {
+ }
+ else {
failf(conn->data, "Recv failure: %s",
Curl_strerror(conn, err));
+ conn->data->state.os_errno = err;
*code = CURLE_RECV_ERROR;
}
}
@@ -391,25 +371,21 @@ static CURLcode pausewrite(struct SessionHandle *data,
}
-/* 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.
+/* 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.
*/
-CURLcode Curl_client_write(struct connectdata *conn,
- int type,
- char *ptr,
- size_t len)
+CURLcode Curl_client_chop_write(struct connectdata *conn,
+ int type,
+ char * ptr,
+ size_t len)
{
struct SessionHandle *data = conn->data;
- size_t wrote;
+ curl_write_callback writeheader = NULL;
+ curl_write_callback writebody = NULL;
- if(0 == len)
- len = strlen(ptr);
+ if(!len)
+ return CURLE_OK;
/* If reading is actually paused, we're forced to append this chunk of data
to the already held data, but only if it is the same type as otherwise it
@@ -434,72 +410,107 @@ CURLcode Curl_client_write(struct connectdata *conn,
/* update the pointer and the size */
data->state.tempwrite = newptr;
data->state.tempwritesize = newlen;
-
return CURLE_OK;
}
- if(type & CLIENTWRITE_BODY) {
- if((conn->protocol&PROT_FTP) && conn->proto.ftpc.transfertype == 'A') {
-#ifdef CURL_DOES_CONVERSIONS
- /* convert from the network encoding */
- size_t rc;
- rc = Curl_convert_from_network(data, ptr, len);
- /* Curl_convert_from_network calls failf if unsuccessful */
- if(rc != CURLE_OK)
- return rc;
-#endif /* CURL_DOES_CONVERSIONS */
-
-#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(CURL_WRITEFUNC_PAUSE == wrote)
- return pausewrite(data, type, ptr, len);
-
- if(wrote != len) {
- failf(data, "Failed writing body (%zu != %zu)", wrote, len);
- return CURLE_WRITE_ERROR;
- }
- }
-
+ /* 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) ) {
+ (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;
+ writeheader =
+ data->set.fwrite_header? data->set.fwrite_header: data->set.fwrite_func;
+ }
+
+ /* 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(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;
+ }
+ }
+
+ 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");
+ 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 */
+ }
+
+ return Curl_client_chop_write(conn, type, ptr, len);
+}
+
CURLcode Curl_read_plain(curl_socket_t sockfd,
char *buf,
size_t bytesfromsocket,
@@ -531,17 +542,16 @@ CURLcode Curl_read_plain(curl_socket_t sockfd,
* Returns a regular CURLcode value.
*/
CURLcode Curl_read(struct connectdata *conn, /* connection data */
- curl_socket_t sockfd, /* read from this socket */
- char *buf, /* store read data here */
- size_t sizerequested, /* max amount to read */
- ssize_t *n) /* amount bytes read */
+ curl_socket_t sockfd, /* read from this socket */
+ char *buf, /* store read data here */
+ size_t sizerequested, /* max amount to read */
+ ssize_t *n) /* amount bytes read */
{
- CURLcode curlcode = CURLE_RECV_ERROR;
+ CURLcode result = CURLE_RECV_ERROR;
ssize_t nread = 0;
size_t bytesfromsocket = 0;
char *buffertofill = NULL;
- bool pipelining = (bool)(conn->data->multi &&
- Curl_multi_canPipeline(conn->data->multi));
+ bool pipelining = Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1);
/* Set 'num' to 0 or 1, depending on which socket that has been sent here.
If it is the second socket, we set num to 1. Otherwise to 0. This lets
@@ -576,9 +586,9 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */
buffertofill = buf;
}
- nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &curlcode);
+ nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &result);
if(nread < 0)
- return curlcode;
+ return result;
if(pipelining) {
memcpy(buf, conn->master_buffer, nread);
@@ -620,7 +630,7 @@ static int showit(struct SessionHandle *data, curl_infotype type,
size_t i;
for(i = 0; i < size-4; i++) {
if(memcmp(&buf[i], "\x0d\x0a\x0d\x0a", 4) == 0) {
- /* convert everthing through this CRLFCRLF but no further */
+ /* convert everything through this CRLFCRLF but no further */
conv_size = i + 4;
break;
}
@@ -673,11 +683,13 @@ 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 8f0ea24d..86f06cf9 100644
--- a/lib/sendf.h
+++ b/lib/sendf.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
+#include "curl_setup.h"
CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *,
const char *fmt, ...);
@@ -32,9 +32,9 @@ void Curl_failf(struct SessionHandle *, const char *fmt, ...);
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
#if defined(HAVE_VARIADIC_MACROS_C99)
-#define infof(...) do { } while (0)
+#define infof(...) Curl_nop_stmt
#elif defined(HAVE_VARIADIC_MACROS_GCC)
-#define infof(x...) do { } while (0)
+#define infof(x...) Curl_nop_stmt
#else
#define infof (void)
#endif
@@ -51,8 +51,10 @@ 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);
+ size_t len) WARN_UNUSED_RESULT;
/* 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 cdeefe3d..fae8567d 100644
--- a/lib/setup-os400.h
+++ b/lib/setup-os400.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,14 +33,16 @@
typedef unsigned long u_int32_t;
-/* System API wrapper prototypes and definitions to support ASCII parameters. */
+/* System API wrapper prototypes & definitions to support ASCII parameters. */
#include <sys/socket.h>
#include <netdb.h>
-#include <qsossl.h>
+#include <gskssl.h>
+#include <qsoasync.h>
#include <gssapi.h>
-extern int Curl_getaddrinfo_a(const char * nodename, const char * servname,
+extern int Curl_getaddrinfo_a(const char * nodename,
+ const char * servname,
const struct addrinfo * hints,
struct addrinfo * * res);
#define getaddrinfo Curl_getaddrinfo_a
@@ -54,18 +56,91 @@ extern int Curl_getnameinfo_a(const struct sockaddr * sa,
#define getnameinfo Curl_getnameinfo_a
-/* SSL wrappers. */
+/* GSKit wrappers. */
-extern int Curl_SSL_Init_Application_a(SSLInitApp * init_app);
-#define SSL_Init_Application Curl_SSL_Init_Application_a
+extern int Curl_gsk_environment_open(gsk_handle * my_env_handle);
+#define gsk_environment_open Curl_gsk_environment_open
+extern int Curl_gsk_secure_soc_open(gsk_handle my_env_handle,
+ gsk_handle * my_session_handle);
+#define gsk_secure_soc_open Curl_gsk_secure_soc_open
-extern int Curl_SSL_Init_a(SSLInit * init);
-#define SSL_Init Curl_SSL_Init_a
+extern int Curl_gsk_environment_close(gsk_handle * my_env_handle);
+#define gsk_environment_close Curl_gsk_environment_close
+extern int Curl_gsk_secure_soc_close(gsk_handle * my_session_handle);
+#define gsk_secure_soc_close Curl_gsk_secure_soc_close
-extern char * Curl_SSL_Strerror_a(int sslreturnvalue, SSLErrorMsg * serrmsgp);
-#define SSL_Strerror Curl_SSL_Strerror_a
+extern int Curl_gsk_environment_init(gsk_handle my_env_handle);
+#define gsk_environment_init Curl_gsk_environment_init
+
+extern int Curl_gsk_secure_soc_init(gsk_handle my_session_handle);
+#define gsk_secure_soc_init Curl_gsk_secure_soc_init
+
+extern int Curl_gsk_attribute_set_buffer_a(gsk_handle my_gsk_handle,
+ GSK_BUF_ID bufID,
+ const char * buffer,
+ int bufSize);
+#define gsk_attribute_set_buffer Curl_gsk_attribute_set_buffer_a
+
+extern int Curl_gsk_attribute_set_enum(gsk_handle my_gsk_handle,
+ GSK_ENUM_ID enumID,
+ GSK_ENUM_VALUE enumValue);
+#define gsk_attribute_set_enum Curl_gsk_attribute_set_enum
+
+extern int Curl_gsk_attribute_set_numeric_value(gsk_handle my_gsk_handle,
+ GSK_NUM_ID numID,
+ int numValue);
+#define gsk_attribute_set_numeric_value Curl_gsk_attribute_set_numeric_value
+
+extern int Curl_gsk_attribute_set_callback(gsk_handle my_gsk_handle,
+ GSK_CALLBACK_ID callBackID,
+ void * callBackAreaPtr);
+#define gsk_attribute_set_callback Curl_gsk_attribute_set_callback
+
+extern int Curl_gsk_attribute_get_buffer_a(gsk_handle my_gsk_handle,
+ GSK_BUF_ID bufID,
+ const char * * buffer,
+ int * bufSize);
+#define gsk_attribute_get_buffer Curl_gsk_attribute_get_buffer_a
+
+extern int Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle,
+ GSK_ENUM_ID enumID,
+ GSK_ENUM_VALUE * enumValue);
+#define gsk_attribute_get_enum Curl_gsk_attribute_get_enum
+
+extern int Curl_gsk_attribute_get_numeric_value(gsk_handle my_gsk_handle,
+ GSK_NUM_ID numID,
+ int * numValue);
+#define gsk_attribute_get_numeric_value Curl_gsk_attribute_get_numeric_value
+
+extern int Curl_gsk_attribute_get_cert_info(gsk_handle my_gsk_handle,
+ GSK_CERT_ID certID,
+ const gsk_cert_data_elem * * certDataElem,
+ int * certDataElementCount);
+#define gsk_attribute_get_cert_info Curl_gsk_attribute_get_cert_info
+
+extern int Curl_gsk_secure_soc_misc(gsk_handle my_session_handle,
+ GSK_MISC_ID miscID);
+#define gsk_secure_soc_misc Curl_gsk_secure_soc_misc
+
+extern int Curl_gsk_secure_soc_read(gsk_handle my_session_handle,
+ char * readBuffer,
+ int readBufSize, int * amtRead);
+#define gsk_secure_soc_read Curl_gsk_secure_soc_read
+
+extern int Curl_gsk_secure_soc_write(gsk_handle my_session_handle,
+ char * writeBuffer,
+ int writeBufSize, int * amtWritten);
+#define gsk_secure_soc_write Curl_gsk_secure_soc_write
+
+extern const char * Curl_gsk_strerror_a(int gsk_return_value);
+#define gsk_strerror Curl_gsk_strerror_a
+
+extern int Curl_gsk_secure_soc_startInit(gsk_handle my_session_handle,
+ int IOCompletionPort,
+ Qso_OverlappedIO_t * communicationsArea);
+#define gsk_secure_soc_startInit Curl_gsk_secure_soc_startInit
/* GSSAPI wrappers. */
@@ -107,6 +182,7 @@ extern OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 * minor_status,
gss_buffer_t output_token);
#define gss_delete_sec_context Curl_gss_delete_sec_context_a
+
/* LDAP wrappers. */
#define BerValue struct berval
@@ -136,5 +212,12 @@ extern int Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags,
#define sendto Curl_os400_sendto
#define recvfrom Curl_os400_recvfrom
+#ifdef HAVE_LIBZ
+#define zlibVersion Curl_os400_zlibVersion
+#define inflateInit_ Curl_os400_inflateInit_
+#define inflateInit2_ Curl_os400_inflateInit2_
+#define inflate Curl_os400_inflate
+#define inflateEnd Curl_os400_inflateEnd
+#endif
#endif /* HEADER_CURL_SETUP_OS400_H */
diff --git a/lib/setup-vms.h b/lib/setup-vms.h
new file mode 100644
index 00000000..f6179a40
--- /dev/null
+++ b/lib/setup-vms.h
@@ -0,0 +1,430 @@
+#ifndef HEADER_CURL_SETUP_VMS_H
+#define HEADER_CURL_SETUP_VMS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/* */
+/* JEM, 12/30/12, VMS now generates config.h, so only define wrappers for */
+/* getenv(), getpwuid() and provide is_vms_shell() */
+/* Also need upper case symbols for system services, and */
+/* OpenSSL, and some Kerberos image */
+
+#ifdef __DECC
+#pragma message save
+#pragma message disable dollarid
+#endif
+
+/* Hide the stuff we are overriding */
+#define getenv decc_getenv
+#ifdef __DECC
+# if __INITIAL_POINTER_SIZE != 64
+# define getpwuid decc_getpwuid
+# endif
+#endif
+#include <stdlib.h>
+ char * decc$getenv(const char * __name);
+#include <pwd.h>
+
+#include <string.h>
+#include <unixlib.h>
+
+#undef getenv
+#undef getpwuid
+#define getenv vms_getenv
+#define getpwuid vms_getpwuid
+
+/* VAX needs these in upper case when compiling exact case */
+#define sys$assign SYS$ASSIGN
+#define sys$dassgn SYS$DASSGN
+#define sys$qiow SYS$QIOW
+
+#ifdef __DECC
+# if __INITIAL_POINTER_SIZE
+# pragma __pointer_size __save
+# endif
+#endif
+
+#if __USE_LONG_GID_T
+# define decc_getpwuid DECC$__LONG_GID_GETPWUID
+#else
+# if __INITIAL_POINTER_SIZE
+# define decc_getpwuid decc$__32_getpwuid
+# else
+# define decc_getpwuid decc$getpwuid
+# endif
+#endif
+
+ struct passwd * decc_getpwuid(uid_t uid);
+
+#ifdef __DECC
+# if __INITIAL_POINTER_SIZE == 32
+/* Translate the path, but only if the path is a VMS file specification */
+/* The translation is usually only needed for older versions of VMS */
+static char * vms_translate_path(const char * path) {
+char * unix_path;
+char * test_str;
+
+ /* See if the result is in VMS format, if not, we are done */
+ /* Assume that this is a PATH, not just some data */
+ test_str = strpbrk(path, ":[<^");
+ if(test_str == NULL) {
+ return (char *)path;
+ }
+
+ unix_path = decc$translate_vms(path);
+
+ if((int)unix_path <= 0) {
+ /* We can not translate it, so return the original string */
+ return (char *)path;
+ }
+}
+# else
+ /* VMS translate path is actually not needed on the current 64 bit */
+ /* VMS platforms, so instead of figuring out the pointer settings */
+ /* Change it to a noop */
+# define vms_translate_path(__path) __path
+# endif
+#endif
+
+#ifdef __DECC
+# if __INITIAL_POINTER_SIZE
+# pragma __pointer_size __restore
+# endif
+#endif
+
+static char * vms_getenv(const char * envvar) {
+
+char * result;
+char * vms_path;
+
+ /* first use the DECC getenv() function */
+ result = decc$getenv(envvar);
+ if(result == NULL) {
+ return result;
+ }
+
+ vms_path = result;
+ result = vms_translate_path(vms_path);
+
+ /* note that if you backport this to use VAX C RTL, that the VAX C RTL */
+ /* may do a malloc(2048) for each call to getenv(), so you will need */
+ /* to add a free(vms_path) */
+ /* Do not do a free() for DEC C RTL builds, which should be used for */
+ /* VMS 5.5-2 and later, even if using GCC */
+
+ return result;
+}
+
+
+static struct passwd vms_passwd_cache;
+
+static struct passwd * vms_getpwuid(uid_t uid) {
+
+struct passwd * my_passwd;
+
+/* Hack needed to support 64 bit builds, decc_getpwnam is 32 bit only */
+#ifdef __DECC
+# if __INITIAL_POINTER_SIZE
+__char_ptr32 unix_path;
+# else
+char * unix_path;
+# endif
+#else
+char * unix_path;
+#endif
+
+ my_passwd = decc_getpwuid(uid);
+ if(my_passwd == NULL) {
+ return my_passwd;
+ }
+
+ unix_path = vms_translate_path(my_passwd->pw_dir);
+
+ if((long)unix_path <= 0) {
+ /* We can not translate it, so return the original string */
+ return my_passwd;
+ }
+
+ /* If no changes needed just return it */
+ if(unix_path == my_passwd->pw_dir) {
+ return my_passwd;
+ }
+
+ /* Need to copy the structure returned */
+ /* Since curl is only using pw_dir, no need to fix up *
+ /* the pw_shell when running under Bash */
+ vms_passwd_cache.pw_name = my_passwd->pw_name;
+ vms_passwd_cache.pw_uid = my_passwd->pw_uid;
+ vms_passwd_cache.pw_gid = my_passwd->pw_uid;
+ vms_passwd_cache.pw_dir = unix_path;
+ vms_passwd_cache.pw_shell = my_passwd->pw_shell;
+
+ return &vms_passwd_cache;
+}
+
+#ifdef __DECC
+#pragma message restore
+#endif
+
+/* Bug - VMS OpenSSL and Kerberos universal symbols are in uppercase only */
+/* VMS libraries should have universal symbols in exact and uppercase */
+
+#define ASN1_INTEGER_get ASN1_INTEGER_GET
+#define ASN1_STRING_data ASN1_STRING_DATA
+#define ASN1_STRING_length ASN1_STRING_LENGTH
+#define ASN1_STRING_print ASN1_STRING_PRINT
+#define ASN1_STRING_to_UTF8 ASN1_STRING_TO_UTF8
+#define ASN1_STRING_type ASN1_STRING_TYPE
+#define BIO_ctrl BIO_CTRL
+#define BIO_free BIO_FREE
+#define BIO_new BIO_NEW
+#define BIO_s_mem BIO_S_MEM
+#define BN_bn2bin BN_BN2BIN
+#define BN_num_bits BN_NUM_BITS
+#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
+#define ENGINE_ctrl ENGINE_CTRL
+#define ENGINE_ctrl_cmd ENGINE_CTRL_CMD
+#define ENGINE_finish ENGINE_FINISH
+#define ENGINE_free ENGINE_FREE
+#define ENGINE_get_first ENGINE_GET_FIRST
+#define ENGINE_get_id ENGINE_GET_ID
+#define ENGINE_get_next ENGINE_GET_NEXT
+#define ENGINE_init ENGINE_INIT
+#define ENGINE_load_builtin_engines ENGINE_LOAD_BUILTIN_ENGINES
+#define ENGINE_load_private_key ENGINE_LOAD_PRIVATE_KEY
+#define ENGINE_set_default ENGINE_SET_DEFAULT
+#define ERR_clear_error ERR_CLEAR_ERROR
+#define ERR_error_string ERR_ERROR_STRING
+#define ERR_error_string_n ERR_ERROR_STRING_N
+#define ERR_free_strings ERR_FREE_STRINGS
+#define ERR_get_error ERR_GET_ERROR
+#define ERR_peek_error ERR_PEEK_ERROR
+#define ERR_remove_state ERR_REMOVE_STATE
+#define EVP_PKEY_copy_parameters EVP_PKEY_COPY_PARAMETERS
+#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
+#define MD5_Final MD5_FINAL
+#define MD5_Init MD5_INIT
+#define MD5_Update MD5_UPDATE
+#define OPENSSL_add_all_algo_noconf OPENSSL_ADD_ALL_ALGO_NOCONF
+#define PEM_read_X509 PEM_READ_X509
+#define PEM_write_bio_X509 PEM_WRITE_BIO_X509
+#define PKCS12_PBE_add PKCS12_PBE_ADD
+#define PKCS12_free PKCS12_FREE
+#define PKCS12_parse PKCS12_PARSE
+#define RAND_add RAND_ADD
+#define RAND_bytes RAND_BYTES
+#define RAND_egd RAND_EGD
+#define RAND_file_name RAND_FILE_NAME
+#define RAND_load_file RAND_LOAD_FILE
+#define RAND_status RAND_STATUS
+#define SSL_CIPHER_get_name SSL_CIPHER_GET_NAME
+#define SSL_CTX_add_client_CA SSL_CTX_ADD_CLIENT_CA
+#define SSL_CTX_callback_ctrl SSL_CTX_CALLBACK_CTRL
+#define SSL_CTX_check_private_key SSL_CTX_CHECK_PRIVATE_KEY
+#define SSL_CTX_ctrl SSL_CTX_CTRL
+#define SSL_CTX_free SSL_CTX_FREE
+#define SSL_CTX_get_cert_store SSL_CTX_GET_CERT_STORE
+#define SSL_CTX_load_verify_locations SSL_CTX_LOAD_VERIFY_LOCATIONS
+#define SSL_CTX_new SSL_CTX_NEW
+#define SSL_CTX_set_cipher_list SSL_CTX_SET_CIPHER_LIST
+#define SSL_CTX_set_def_passwd_cb_ud SSL_CTX_SET_DEF_PASSWD_CB_UD
+#define SSL_CTX_set_default_passwd_cb SSL_CTX_SET_DEFAULT_PASSWD_CB
+#define SSL_CTX_set_verify SSL_CTX_SET_VERIFY
+#define SSL_CTX_use_PrivateKey SSL_CTX_USE_PRIVATEKEY
+#define SSL_CTX_use_PrivateKey_file SSL_CTX_USE_PRIVATEKEY_FILE
+#define SSL_CTX_use_cert_chain_file SSL_CTX_USE_CERT_CHAIN_FILE
+#define SSL_CTX_use_certificate SSL_CTX_USE_CERTIFICATE
+#define SSL_CTX_use_certificate_file SSL_CTX_USE_CERTIFICATE_FILE
+#define SSL_SESSION_free SSL_SESSION_FREE
+#define SSL_connect SSL_CONNECT
+#define SSL_free SSL_FREE
+#define SSL_get1_session SSL_GET1_SESSION
+#define SSL_get_certificate SSL_GET_CERTIFICATE
+#define SSL_get_current_cipher SSL_GET_CURRENT_CIPHER
+#define SSL_get_error SSL_GET_ERROR
+#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
+#define SSL_load_error_strings SSL_LOAD_ERROR_STRINGS
+#define SSL_new SSL_NEW
+#define SSL_peek SSL_PEEK
+#define SSL_pending SSL_PENDING
+#define SSL_read SSL_READ
+#define SSL_set_connect_state SSL_SET_CONNECT_STATE
+#define SSL_set_fd SSL_SET_FD
+#define SSL_set_session SSL_SET_SESSION
+#define SSL_shutdown SSL_SHUTDOWN
+#define SSL_write SSL_WRITE
+#define SSLeay SSLEAY
+#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
+#define X509_LOOKUP_file X509_LOOKUP_FILE
+#define X509_NAME_ENTRY_get_data X509_NAME_ENTRY_GET_DATA
+#define X509_NAME_get_entry X509_NAME_GET_ENTRY
+#define X509_NAME_get_index_by_NID X509_NAME_GET_INDEX_BY_NID
+#define X509_NAME_print_ex X509_NAME_PRINT_EX
+#define X509_STORE_CTX_get_current_cert X509_STORE_CTX_GET_CURRENT_CERT
+#define X509_STORE_add_lookup X509_STORE_ADD_LOOKUP
+#define X509_STORE_set_flags X509_STORE_SET_FLAGS
+#define X509_check_issued X509_CHECK_ISSUED
+#define X509_free X509_FREE
+#define X509_get_ext_d2i X509_GET_EXT_D2I
+#define X509_get_issuer_name X509_GET_ISSUER_NAME
+#define X509_get_pubkey X509_GET_PUBKEY
+#define X509_get_serialNumber X509_GET_SERIALNUMBER
+#define X509_get_subject_name X509_GET_SUBJECT_NAME
+#define X509_load_crl_file X509_LOAD_CRL_FILE
+#define X509_verify_cert_error_string X509_VERIFY_CERT_ERROR_STRING
+#define d2i_PKCS12_fp D2I_PKCS12_FP
+#define i2t_ASN1_OBJECT I2T_ASN1_OBJECT
+#define sk_num SK_NUM
+#define sk_pop SK_POP
+#define sk_pop_free SK_POP_FREE
+#define sk_value SK_VALUE
+
+#define USE_UPPERCASE_GSSAPI 1
+#define gss_seal GSS_SEAL
+#define gss_unseal GSS_UNSEAL
+
+#define USE_UPPERCASE_KRBAPI 1
+
+/* AI_NUMERICHOST needed for IP V6 support in Curl */
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#ifndef AI_NUMERICHOST
+#ifdef ENABLE_IPV6
+#undef ENABLE_IPV6
+#endif
+#endif
+#endif
+
+/* VAX symbols are always in uppercase */
+#ifdef __VAX
+#define inflate INFLATE
+#define inflateEnd INFLATEEND
+#define inflateInit2_ INFLATEINIT2_
+#define inflateInit_ INFLATEINIT_
+#define zlibVersion ZLIBVERSION
+#endif
+
+/* Older VAX OpenSSL port defines these as Macros */
+/* Need to include the headers first and then redefine */
+/* that way a newer port will also work if some one has one */
+#ifdef __VAX
+
+# if (OPENSSL_VERSION_NUMBER < 0x00907001L)
+# define des_set_odd_parity DES_SET_ODD_PARITY
+# define des_set_key DES_SET_KEY
+# define des_ecb_encrypt DES_ECB_ENCRYPT
+
+# endif
+# include <openssl/evp.h>
+# ifndef OpenSSL_add_all_algorithms
+# define OpenSSL_add_all_algorithms OPENSSL_ADD_ALL_ALGORITHMS
+ void OPENSSL_ADD_ALL_ALGORITHMS(void);
+# endif
+
+ /* Curl defines these to lower case and VAX needs them in upper case */
+ /* So we need static routines */
+# if (OPENSSL_VERSION_NUMBER < 0x00907001L)
+
+# undef des_set_odd_parity
+# undef DES_set_odd_parity
+# undef des_set_key
+# undef DES_set_key
+# undef des_ecb_encrypt
+# undef DES_ecb_encrypt
+
+ static void des_set_odd_parity(des_cblock *key) {
+ DES_SET_ODD_PARITY(key);
+ }
+
+ static int des_set_key(const_des_cblock *key,
+ des_key_schedule schedule) {
+ return DES_SET_KEY(key, schedule);
+ }
+
+ static void des_ecb_encrypt(const_des_cblock *input,
+ des_cblock *output,
+ des_key_schedule ks, int enc) {
+ DES_ECB_ENCRYPT(input, output, ks, enc);
+ }
+#endif
+/* Need this to stop a macro redefinition error */
+#if OPENSSL_VERSION_NUMBER < 0x00907000L
+# ifdef X509_STORE_set_flags
+# undef X509_STORE_set_flags
+# define X509_STORE_set_flags(x,y) Curl_nop_stmt
+# endif
+#endif
+#endif
+
+#endif /* HEADER_CURL_SETUP_VMS_H */
diff --git a/lib/setup.h b/lib/setup.h
deleted file mode 100644
index cc016c9c..00000000
--- a/lib/setup.h
+++ /dev/null
@@ -1,568 +0,0 @@
-#ifndef HEADER_CURL_LIB_SETUP_H
-#define HEADER_CURL_LIB_SETUP_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-/*
- * Define WIN32 when build target is Win32 API
- */
-
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__)
-#define WIN32
-#endif
-
-/*
- * Include configuration script results or hand-crafted
- * configuration file for platforms which lack config tool.
- */
-
-#ifdef HAVE_CONFIG_H
-
-#include "curl_config.h"
-
-#else /* HAVE_CONFIG_H */
-
-#ifdef _WIN32_WCE
-# include "config-win32ce.h"
-#else
-# ifdef WIN32
-# include "config-win32.h"
-# endif
-#endif
-
-#if defined(macintosh) && defined(__MRC__)
-# include "config-mac.h"
-#endif
-
-#ifdef __AMIGA__
-# include "amigaos.h"
-#endif
-
-#ifdef __SYMBIAN32__
-# include "config-symbian.h"
-#endif
-
-#ifdef __OS400__
-# include "config-os400.h"
-#endif
-
-#ifdef TPF
-# include "config-tpf.h"
-#endif
-
-#ifdef __VXWORKS__
-# include "config-vxworks.h"
-#endif
-
-#endif /* HAVE_CONFIG_H */
-
-/* ================================================================ */
-/* Definition of preprocessor macros/symbols which modify compiler */
-/* behavior or generated code characteristics must be done here, */
-/* as appropriate, before any system header file is included. It is */
-/* also possible to have them defined in the config file included */
-/* before this point. As a result of all this we frown inclusion of */
-/* system header files in our config files, avoid this at any cost. */
-/* ================================================================ */
-
-/*
- * AIX 4.3 and newer needs _THREAD_SAFE defined to build
- * proper reentrant code. Others may also need it.
- */
-
-#ifdef NEED_THREAD_SAFE
-# ifndef _THREAD_SAFE
-# define _THREAD_SAFE
-# endif
-#endif
-
-/*
- * Tru64 needs _REENTRANT set for a few function prototypes and
- * things to appear in the system header files. Unixware needs it
- * to build proper reentrant code. Others may also need it.
- */
-
-#ifdef NEED_REENTRANT
-# ifndef _REENTRANT
-# define _REENTRANT
-# endif
-#endif
-
-/* ================================================================ */
-/* If you need to include a system header file for your platform, */
-/* please, do it beyond the point further indicated in this file. */
-/* ================================================================ */
-
-/*
- * libcurl's external interface definitions are also used internally,
- * and might also include required system header files to define them.
- */
-
-#include <curl/curlbuild.h>
-
-/*
- * Compile time sanity checks must also be done when building the library.
- */
-
-#include <curl/curlrules.h>
-
-/*
- * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro
- */
-
-#ifdef SIZEOF_CURL_OFF_T
-# error "SIZEOF_CURL_OFF_T shall not be defined!"
- Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined
-#endif
-
-/*
- * Set up internal curl_off_t formatting string directives for
- * exclusive use with libcurl's internal *printf functions.
- */
-
-#ifdef FORMAT_OFF_T
-# error "FORMAT_OFF_T shall not be defined before this point!"
- Error Compilation_aborted_FORMAT_OFF_T_already_defined
-#endif
-
-#ifdef FORMAT_OFF_TU
-# error "FORMAT_OFF_TU shall not be defined before this point!"
- Error Compilation_aborted_FORMAT_OFF_TU_already_defined
-#endif
-
-#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
-# define FORMAT_OFF_T "lld"
-# define FORMAT_OFF_TU "llu"
-#else
-# define FORMAT_OFF_T "ld"
-# define FORMAT_OFF_TU "lu"
-#endif
-
-/*
- * Disable other protocols when http is the only one desired.
- */
-
-#ifdef HTTP_ONLY
-# define CURL_DISABLE_TFTP
-# define CURL_DISABLE_FTP
-# define CURL_DISABLE_LDAP
-# define CURL_DISABLE_TELNET
-# define CURL_DISABLE_DICT
-# define CURL_DISABLE_FILE
-# define CURL_DISABLE_RTSP
-#endif
-
-/*
- * When http is disabled rtsp is not supported.
- */
-
-#if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_RTSP)
-# define CURL_DISABLE_RTSP
-#endif
-
-/* ================================================================ */
-/* No system header file shall be included in this file before this */
-/* point. The only allowed ones are those included from curlbuild.h */
-/* ================================================================ */
-
-/*
- * OS/400 setup file includes some system headers.
- */
-
-#ifdef __OS400__
-# include "setup-os400.h"
-#endif
-
-/*
- * Include header files for windows builds before redefining anything.
- * Use this preprocessor block only to include or exclude windows.h,
- * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
- * to any other further and independent block. Under Cygwin things work
- * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
- * never be included when __CYGWIN__ is defined. configure script takes
- * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
- * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
- */
-
-#ifdef HAVE_WINDOWS_H
-# ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-# endif
-# include <windows.h>
-# ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-# ifdef HAVE_WS2TCPIP_H
-# include <ws2tcpip.h>
-# endif
-# else
-# ifdef HAVE_WINSOCK_H
-# include <winsock.h>
-# endif
-# endif
-#endif
-
-/*
- * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
- * define USE_WINSOCK to 1 if we have and use WINSOCK API, else
- * undefine USE_WINSOCK.
- */
-
-#undef USE_WINSOCK
-
-#ifdef HAVE_WINSOCK2_H
-# define USE_WINSOCK 2
-#else
-# ifdef HAVE_WINSOCK_H
-# define USE_WINSOCK 1
-# endif
-#endif
-
-#ifdef HAVE_EXTRA_STRICMP_H
-# include <extra/stricmp.h>
-#endif
-
-#ifdef HAVE_EXTRA_STRDUP_H
-# include <extra/strdup.h>
-#endif
-
-#ifdef TPF
-# include <strings.h> /* for bzero, strcasecmp, and strncasecmp */
-# include <string.h> /* for strcpy and strlen */
-# include <stdlib.h> /* for rand and srand */
-# include <sys/socket.h> /* for select and ioctl*/
-# include <netdb.h> /* for in_addr_t definition */
-# include <tpf/sysapi.h> /* for tpf_process_signals */
- /* change which select is used for libcurl */
-# define select(a,b,c,d,e) tpf_select_libcurl(a,b,c,d,e)
-#endif
-
-#ifdef __VXWORKS__
-# include <sockLib.h> /* for generic BSD socket functions */
-# include <ioLib.h> /* for basic I/O interface functions */
-#endif
-
-#include <stdio.h>
-#ifdef HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#include <errno.h>
-
-#ifdef __TANDEM /* for nsr-tandem-nsk systems */
-#include <floss.h>
-#endif
-
-#ifndef STDC_HEADERS /* no standard C headers! */
-#include <curl/stdcheaders.h>
-#endif
-
-#ifdef __POCC__
-# include <sys/types.h>
-# include <unistd.h>
-# define sys_nerr EILSEQ
-#endif
-
-/*
- * Salford-C kludge section (mostly borrowed from wxWidgets).
- */
-#ifdef __SALFORDC__
- #pragma suppress 353 /* Possible nested comments */
- #pragma suppress 593 /* Define not used */
- #pragma suppress 61 /* enum has no name */
- #pragma suppress 106 /* unnamed, unused parameter */
- #include <clib.h>
-#endif
-
-/*
- * Large file (>2Gb) support using WIN32 functions.
- */
-
-#ifdef USE_WIN32_LARGE_FILES
-# include <io.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# define lseek(fdes,offset,whence) _lseeki64(fdes, offset, whence)
-# define fstat(fdes,stp) _fstati64(fdes, stp)
-# define stat(fname,stp) _stati64(fname, stp)
-# define struct_stat struct _stati64
-# define LSEEK_ERROR (__int64)-1
-#endif
-
-/*
- * Small file (<2Gb) support using WIN32 functions.
- */
-
-#ifdef USE_WIN32_SMALL_FILES
-# include <io.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# define lseek(fdes,offset,whence) _lseek(fdes, (long)offset, whence)
-# define fstat(fdes,stp) _fstat(fdes, stp)
-# define stat(fname,stp) _stat(fname, stp)
-# define struct_stat struct _stat
-# define LSEEK_ERROR (long)-1
-#endif
-
-#ifndef struct_stat
-# define struct_stat struct stat
-#endif
-
-#ifndef LSEEK_ERROR
-# define LSEEK_ERROR (off_t)-1
-#endif
-
-/*
- * Default sizeof(off_t) in case it hasn't been defined in config file.
- */
-
-#ifndef SIZEOF_OFF_T
-# if defined(__VMS) && !defined(__VAX)
-# if defined(_LARGEFILE)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(__OS400__) && defined(__ILEC400__)
-# if defined(_LARGE_FILES)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(__MVS__) && defined(__IBMC__)
-# if defined(_LP64) || defined(_LARGE_FILES)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(__370__) && defined(__IBMC__)
-# if defined(_LP64) || defined(_LARGE_FILES)
-# define SIZEOF_OFF_T 8
-# endif
-# endif
-# ifndef SIZEOF_OFF_T
-# define SIZEOF_OFF_T 4
-# endif
-#endif
-
-/*
- * Arg 2 type for gethostname in case it hasn't been defined in config file.
- */
-
-#ifndef GETHOSTNAME_TYPE_ARG2
-# ifdef USE_WINSOCK
-# define GETHOSTNAME_TYPE_ARG2 int
-# else
-# define GETHOSTNAME_TYPE_ARG2 size_t
-# endif
-#endif
-
-/* Below we define some functions. They should
-
- 4. set the SIGALRM signal timeout
- 5. set dir/file naming defines
- */
-
-#ifdef WIN32
-
-# define DIR_CHAR "\\"
-# define DOT_CHAR "_"
-
-#else /* WIN32 */
-
-# ifdef MSDOS /* Watt-32 */
-
-# include <sys/ioctl.h>
-# define select(n,r,w,x,t) select_s(n,r,w,x,t)
-# define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z))
-# include <tcp.h>
-# ifdef word
-# undef word
-# endif
-# ifdef byte
-# undef byte
-# endif
-
-# endif /* MSDOS */
-
-# ifdef __minix
- /* Minix 3 versions up to at least 3.1.3 are missing these prototypes */
- extern char * strtok_r(char *s, const char *delim, char **last);
- extern struct tm * gmtime_r(const time_t * const timep, struct tm *tmp);
-# endif
-
-# define DIR_CHAR "/"
-# ifndef DOT_CHAR
-# define DOT_CHAR "."
-# endif
-
-# ifdef MSDOS
-# undef DOT_CHAR
-# define DOT_CHAR "_"
-# endif
-
-# ifndef fileno /* sunos 4 have this as a macro! */
- int fileno( FILE *stream);
-# endif
-
-#endif /* WIN32 */
-
-/*
- * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN
- * defined in ws2tcpip.h as well as to provide IPv6 support.
- */
-
-#if defined(_MSC_VER) && !defined(__POCC__)
-# if !defined(HAVE_WS2TCPIP_H) || \
- ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
-# undef HAVE_GETADDRINFO_THREADSAFE
-# undef HAVE_FREEADDRINFO
-# undef HAVE_GETADDRINFO
-# undef HAVE_GETNAMEINFO
-# undef ENABLE_IPV6
-# endif
-#endif
-
-/* ---------------------------------------------------------------- */
-/* resolver specialty compile-time defines */
-/* CURLRES_* defines to use in the host*.c sources */
-/* ---------------------------------------------------------------- */
-
-/*
- * lcc-win32 doesn't have _beginthreadex(), lacks threads support.
- */
-
-#if defined(__LCC__) && defined(WIN32)
-# undef USE_THREADS_POSIX
-# undef USE_THREADS_WIN32
-#endif
-
-/*
- * MSVC threads support requires a multi-threaded runtime library.
- * _beginthreadex() is not available in single-threaded ones.
- */
-
-#if defined(_MSC_VER) && !defined(__POCC__) && !defined(_MT)
-# undef USE_THREADS_POSIX
-# undef USE_THREADS_WIN32
-#endif
-
-/*
- * Mutually exclusive CURLRES_* definitions.
- */
-
-#ifdef USE_ARES
-# define CURLRES_ASYNCH
-# define CURLRES_ARES
-#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
-# define CURLRES_ASYNCH
-# define CURLRES_THREADED
-#else
-# define CURLRES_SYNCH
-#endif
-
-#ifdef ENABLE_IPV6
-# define CURLRES_IPV6
-#else
-# define CURLRES_IPV4
-#endif
-
-/* ---------------------------------------------------------------- */
-
-/*
- * When using WINSOCK, TELNET protocol requires WINSOCK2 API.
- */
-
-#if defined(USE_WINSOCK) && (USE_WINSOCK != 2)
-# define CURL_DISABLE_TELNET 1
-#endif
-
-/*
- * msvc 6.0 does not have struct sockaddr_storage and
- * does not define IPPROTO_ESP in winsock2.h. But both
- * are available if PSDK is properly installed.
- */
-
-#if defined(_MSC_VER) && !defined(__POCC__)
-# if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP))
-# undef HAVE_STRUCT_SOCKADDR_STORAGE
-# endif
-#endif
-
-/*
- * Intentionally fail to build when using msvc 6.0 without PSDK installed.
- * The brave of heart can circumvent this, defining ALLOW_MSVC6_WITHOUT_PSDK
- * in lib/config-win32.h although absolutely discouraged and unsupported.
- */
-
-#if defined(_MSC_VER) && !defined(__POCC__)
-# if !defined(HAVE_WINDOWS_H) || ((_MSC_VER < 1300) && !defined(_FILETIME_))
-# if !defined(ALLOW_MSVC6_WITHOUT_PSDK)
-# error MSVC 6.0 requires "February 2003 Platform SDK" a.k.a. "Windows Server 2003 PSDK"
-# else
-# define CURL_DISABLE_LDAP 1
-# endif
-# endif
-#endif
-
-#ifdef NETWARE
-int netware_init(void);
-#ifndef __NOVELL_LIBC__
-#include <sys/bsdskt.h>
-#include <sys/timeval.h>
-#endif
-#endif
-
-#if defined(HAVE_LIBIDN) && defined(HAVE_TLD_H)
-/* The lib was present and the tld.h header (which is missing in libidn 0.3.X
- but we only work with libidn 0.4.1 or later) */
-#define USE_LIBIDN
-#endif
-
-#ifndef SIZEOF_TIME_T
-/* assume default size of time_t to be 32 bit */
-#define SIZEOF_TIME_T 4
-#endif
-
-#define LIBIDN_REQUIRED_VERSION "0.4.1"
-
-#if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || defined(USE_QSOSSL) || defined(USE_POLARSSL)
-#define USE_SSL /* SSL support has been enabled */
-#endif
-
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM)
-#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || defined(USE_GNUTLS) || defined(USE_NSS)
-#define USE_NTLM
-#endif
-#endif
-
-/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */
-#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE)
-#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
-#endif
-
-/* Define S_ISREG if not defined by system headers, f.e. MSVC */
-#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-
-/*
- * Include macros and defines that should only be processed once.
- */
-
-#ifndef __SETUP_ONCE_H
-#include "setup_once.h"
-#endif
-
-#endif /* HEADER_CURL_LIB_SETUP_H */
diff --git a/lib/setup_once.h b/lib/setup_once.h
deleted file mode 100644
index 85e78e8d..00000000
--- a/lib/setup_once.h
+++ /dev/null
@@ -1,493 +0,0 @@
-#ifndef __SETUP_ONCE_H
-#define __SETUP_ONCE_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-
-/********************************************************************
- * NOTICE *
- * ======== *
- * *
- * Content of header files lib/setup_once.h and ares/setup_once.h *
- * must be kept in sync. Modify the other one if you change this. *
- * *
- ********************************************************************/
-
-
-/*
- * Inclusion of common header files.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <errno.h>
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef NEED_MALLOC_H
-#include <malloc.h>
-#endif
-
-#ifdef NEED_MEMORY_H
-#include <memory.h>
-#endif
-
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-
-#ifdef WIN32
-#include <io.h>
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-
-
-/*
- * Definition of timeval struct for platforms that don't have it.
- */
-
-#ifndef HAVE_STRUCT_TIMEVAL
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-#endif
-
-
-/*
- * If we have the MSG_NOSIGNAL define, make sure we use
- * it as the fourth argument of function send()
- */
-
-#ifdef HAVE_MSG_NOSIGNAL
-#define SEND_4TH_ARG MSG_NOSIGNAL
-#else
-#define SEND_4TH_ARG 0
-#endif
-
-
-#if defined(__minix)
-/* Minix doesn't support recv on TCP sockets */
-#define sread(x,y,z) (ssize_t)read((RECV_TYPE_ARG1)(x), \
- (RECV_TYPE_ARG2)(y), \
- (RECV_TYPE_ARG3)(z))
-
-#elif defined(HAVE_RECV)
-/*
- * The definitions for the return type and arguments types
- * of functions recv() and send() belong and come from the
- * configuration file. Do not define them in any other place.
- *
- * HAVE_RECV is defined if you have a function named recv()
- * which is used to read incoming data from sockets. If your
- * function has another name then don't define HAVE_RECV.
- *
- * If HAVE_RECV is defined then RECV_TYPE_ARG1, RECV_TYPE_ARG2,
- * RECV_TYPE_ARG3, RECV_TYPE_ARG4 and RECV_TYPE_RETV must also
- * be defined.
- *
- * HAVE_SEND is defined if you have a function named send()
- * which is used to write outgoing data on a connected socket.
- * If yours has another name then don't define HAVE_SEND.
- *
- * If HAVE_SEND is defined then SEND_TYPE_ARG1, SEND_QUAL_ARG2,
- * SEND_TYPE_ARG2, SEND_TYPE_ARG3, SEND_TYPE_ARG4 and
- * SEND_TYPE_RETV must also be defined.
- */
-
-#if !defined(RECV_TYPE_ARG1) || \
- !defined(RECV_TYPE_ARG2) || \
- !defined(RECV_TYPE_ARG3) || \
- !defined(RECV_TYPE_ARG4) || \
- !defined(RECV_TYPE_RETV)
- /* */
- Error Missing_definition_of_return_and_arguments_types_of_recv
- /* */
-#else
-#define sread(x,y,z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
- (RECV_TYPE_ARG2)(y), \
- (RECV_TYPE_ARG3)(z), \
- (RECV_TYPE_ARG4)(0))
-#endif
-#else /* HAVE_RECV */
-#ifndef sread
- /* */
- Error Missing_definition_of_macro_sread
- /* */
-#endif
-#endif /* HAVE_RECV */
-
-
-#if defined(__minix)
-/* Minix doesn't support send on TCP sockets */
-#define swrite(x,y,z) (ssize_t)write((SEND_TYPE_ARG1)(x), \
- (SEND_TYPE_ARG2)(y), \
- (SEND_TYPE_ARG3)(z))
-
-#elif defined(HAVE_SEND)
-#if !defined(SEND_TYPE_ARG1) || \
- !defined(SEND_QUAL_ARG2) || \
- !defined(SEND_TYPE_ARG2) || \
- !defined(SEND_TYPE_ARG3) || \
- !defined(SEND_TYPE_ARG4) || \
- !defined(SEND_TYPE_RETV)
- /* */
- Error Missing_definition_of_return_and_arguments_types_of_send
- /* */
-#else
-#define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
- (SEND_TYPE_ARG2)(y), \
- (SEND_TYPE_ARG3)(z), \
- (SEND_TYPE_ARG4)(SEND_4TH_ARG))
-#endif
-#else /* HAVE_SEND */
-#ifndef swrite
- /* */
- Error Missing_definition_of_macro_swrite
- /* */
-#endif
-#endif /* HAVE_SEND */
-
-
-#if 0
-#if defined(HAVE_RECVFROM)
-/*
- * Currently recvfrom is only used on udp sockets.
- */
-#if !defined(RECVFROM_TYPE_ARG1) || \
- !defined(RECVFROM_TYPE_ARG2) || \
- !defined(RECVFROM_TYPE_ARG3) || \
- !defined(RECVFROM_TYPE_ARG4) || \
- !defined(RECVFROM_TYPE_ARG5) || \
- !defined(RECVFROM_TYPE_ARG6) || \
- !defined(RECVFROM_TYPE_RETV)
- /* */
- Error Missing_definition_of_return_and_arguments_types_of_recvfrom
- /* */
-#else
-#define sreadfrom(s,b,bl,f,fl) (ssize_t)recvfrom((RECVFROM_TYPE_ARG1) (s), \
- (RECVFROM_TYPE_ARG2 *)(b), \
- (RECVFROM_TYPE_ARG3) (bl), \
- (RECVFROM_TYPE_ARG4) (0), \
- (RECVFROM_TYPE_ARG5 *)(f), \
- (RECVFROM_TYPE_ARG6 *)(fl))
-#endif
-#else /* HAVE_RECVFROM */
-#ifndef sreadfrom
- /* */
- Error Missing_definition_of_macro_sreadfrom
- /* */
-#endif
-#endif /* HAVE_RECVFROM */
-
-
-#ifdef RECVFROM_TYPE_ARG6_IS_VOID
-# define RECVFROM_ARG6_T int
-#else
-# define RECVFROM_ARG6_T RECVFROM_TYPE_ARG6
-#endif
-#endif /* if 0 */
-
-
-/*
- * Function-like macro definition used to close a socket.
- */
-
-#if defined(HAVE_CLOSESOCKET)
-# define sclose(x) closesocket((x))
-#elif defined(HAVE_CLOSESOCKET_CAMEL)
-# define sclose(x) CloseSocket((x))
-#else
-# define sclose(x) close((x))
-#endif
-
-
-/*
- * Uppercase macro versions of ANSI/ISO is*() functions/macros which
- * avoid negative number inputs with argument byte codes > 127.
- */
-
-#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
-#define ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
-#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
-#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
-#define ISGRAPH(x) (isgraph((int) ((unsigned char)x)))
-#define ISALPHA(x) (isalpha((int) ((unsigned char)x)))
-#define ISPRINT(x) (isprint((int) ((unsigned char)x)))
-#define ISUPPER(x) (isupper((int) ((unsigned char)x)))
-#define ISLOWER(x) (islower((int) ((unsigned char)x)))
-
-#define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \
- (((unsigned char)x) == '\t'))
-
-
-/*
- * 'bool' exists on platforms with <stdbool.h>, i.e. C99 platforms.
- * On non-C99 platforms there's no bool, so define an enum for that.
- * On C99 platforms 'false' and 'true' also exist. Enum uses a
- * global namespace though, so use bool_false and bool_true.
- */
-
-#ifndef HAVE_BOOL_T
- typedef enum {
- bool_false = 0,
- bool_true = 1
- } bool;
-
-/*
- * Use a define to let 'true' and 'false' use those enums. There
- * are currently no use of true and false in libcurl proper, but
- * there are some in the examples. This will cater for any later
- * code happening to use true and false.
- */
-# define false bool_false
-# define true bool_true
-# define HAVE_BOOL_T
-#endif
-
-
-/*
- * Redefine TRUE and FALSE too, to catch current use. With this
- * change, 'bool found = 1' will give a warning on MIPSPro, but
- * 'bool found = TRUE' will not. Change tested on IRIX/MIPSPro,
- * AIX 5.1/Xlc, Tru64 5.1/cc, w/make test too.
- */
-
-#ifndef TRUE
-#define TRUE true
-#endif
-#ifndef FALSE
-#define FALSE false
-#endif
-
-
-/*
- * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
- */
-
-#ifndef HAVE_SIG_ATOMIC_T
-typedef int sig_atomic_t;
-#define HAVE_SIG_ATOMIC_T
-#endif
-
-
-/*
- * Convenience SIG_ATOMIC_T definition
- */
-
-#ifdef HAVE_SIG_ATOMIC_T_VOLATILE
-#define SIG_ATOMIC_T static sig_atomic_t
-#else
-#define SIG_ATOMIC_T static volatile sig_atomic_t
-#endif
-
-
-/*
- * Default return type for signal handlers.
- */
-
-#ifndef RETSIGTYPE
-#define RETSIGTYPE void
-#endif
-
-
-/*
- * Macro used to include code only in debug builds.
- */
-
-#ifdef DEBUGBUILD
-#define DEBUGF(x) x
-#else
-#define DEBUGF(x) do { } while (0)
-#endif
-
-
-/*
- * Macro used to include assertion code only in debug builds.
- */
-
-#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
-#define DEBUGASSERT(x) assert(x)
-#else
-#define DEBUGASSERT(x) do { } while (0)
-#endif
-
-
-/*
- * Macro SOCKERRNO / SET_SOCKERRNO() returns / sets the *socket-related* errno
- * (or equivalent) on this platform to hide platform details to code using it.
- */
-
-#ifdef USE_WINSOCK
-#define SOCKERRNO ((int)WSAGetLastError())
-#define SET_SOCKERRNO(x) (WSASetLastError((int)(x)))
-#else
-#define SOCKERRNO (errno)
-#define SET_SOCKERRNO(x) (errno = (x))
-#endif
-
-
-/*
- * Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno
- * (or equivalent) on this platform to hide platform details to code using it.
- */
-
-#ifdef WIN32
-#define ERRNO ((int)GetLastError())
-#define SET_ERRNO(x) (SetLastError((DWORD)(x)))
-#else
-#define ERRNO (errno)
-#define SET_ERRNO(x) (errno = (x))
-#endif
-
-
-/*
- * Portable error number symbolic names defined to Winsock error codes.
- */
-
-#ifdef USE_WINSOCK
-#undef EBADF /* override definition in errno.h */
-#define EBADF WSAEBADF
-#undef EINTR /* override definition in errno.h */
-#define EINTR WSAEINTR
-#undef EINVAL /* override definition in errno.h */
-#define EINVAL WSAEINVAL
-#undef EWOULDBLOCK /* override definition in errno.h */
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#undef EINPROGRESS /* override definition in errno.h */
-#define EINPROGRESS WSAEINPROGRESS
-#undef EALREADY /* override definition in errno.h */
-#define EALREADY WSAEALREADY
-#undef ENOTSOCK /* override definition in errno.h */
-#define ENOTSOCK WSAENOTSOCK
-#undef EDESTADDRREQ /* override definition in errno.h */
-#define EDESTADDRREQ WSAEDESTADDRREQ
-#undef EMSGSIZE /* override definition in errno.h */
-#define EMSGSIZE WSAEMSGSIZE
-#undef EPROTOTYPE /* override definition in errno.h */
-#define EPROTOTYPE WSAEPROTOTYPE
-#undef ENOPROTOOPT /* override definition in errno.h */
-#define ENOPROTOOPT WSAENOPROTOOPT
-#undef EPROTONOSUPPORT /* override definition in errno.h */
-#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
-#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
-#undef EOPNOTSUPP /* override definition in errno.h */
-#define EOPNOTSUPP WSAEOPNOTSUPP
-#define EPFNOSUPPORT WSAEPFNOSUPPORT
-#undef EAFNOSUPPORT /* override definition in errno.h */
-#define EAFNOSUPPORT WSAEAFNOSUPPORT
-#undef EADDRINUSE /* override definition in errno.h */
-#define EADDRINUSE WSAEADDRINUSE
-#undef EADDRNOTAVAIL /* override definition in errno.h */
-#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
-#undef ENETDOWN /* override definition in errno.h */
-#define ENETDOWN WSAENETDOWN
-#undef ENETUNREACH /* override definition in errno.h */
-#define ENETUNREACH WSAENETUNREACH
-#undef ENETRESET /* override definition in errno.h */
-#define ENETRESET WSAENETRESET
-#undef ECONNABORTED /* override definition in errno.h */
-#define ECONNABORTED WSAECONNABORTED
-#undef ECONNRESET /* override definition in errno.h */
-#define ECONNRESET WSAECONNRESET
-#undef ENOBUFS /* override definition in errno.h */
-#define ENOBUFS WSAENOBUFS
-#undef EISCONN /* override definition in errno.h */
-#define EISCONN WSAEISCONN
-#undef ENOTCONN /* override definition in errno.h */
-#define ENOTCONN WSAENOTCONN
-#define ESHUTDOWN WSAESHUTDOWN
-#define ETOOMANYREFS WSAETOOMANYREFS
-#undef ETIMEDOUT /* override definition in errno.h */
-#define ETIMEDOUT WSAETIMEDOUT
-#undef ECONNREFUSED /* override definition in errno.h */
-#define ECONNREFUSED WSAECONNREFUSED
-#undef ELOOP /* override definition in errno.h */
-#define ELOOP WSAELOOP
-#ifndef ENAMETOOLONG /* possible previous definition in errno.h */
-#define ENAMETOOLONG WSAENAMETOOLONG
-#endif
-#define EHOSTDOWN WSAEHOSTDOWN
-#undef EHOSTUNREACH /* override definition in errno.h */
-#define EHOSTUNREACH WSAEHOSTUNREACH
-#ifndef ENOTEMPTY /* possible previous definition in errno.h */
-#define ENOTEMPTY WSAENOTEMPTY
-#endif
-#define EPROCLIM WSAEPROCLIM
-#define EUSERS WSAEUSERS
-#define EDQUOT WSAEDQUOT
-#define ESTALE WSAESTALE
-#define EREMOTE WSAEREMOTE
-#endif
-
-
-/*
- * Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
- */
-
-#if defined(__VMS) && \
- defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
-#define getpwuid __32_getpwuid
-#endif
-
-
-/*
- * Macro argv_item_t hides platform details to code using it.
- */
-
-#ifdef __VMS
-#define argv_item_t __char_ptr32
-#else
-#define argv_item_t char *
-#endif
-
-
-/*
- * We use this ZERO_NULL to avoid picky compiler warnings,
- * when assigning a NULL pointer to a function pointer var.
- */
-
-#define ZERO_NULL 0
-
-
-#endif /* __SETUP_ONCE_H */
-
diff --git a/lib/share.c b/lib/share.c
index e6b8e7a1..17202486 100644
--- a/lib/share.c
+++ b/lib/share.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,13 +20,12 @@
*
***************************************************************************/
-#include "setup.h"
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
+#include "curl_setup.h"
+
#include <curl/curl.h>
#include "urldata.h"
#include "share.h"
+#include "vtls/vtls.h"
#include "curl_memory.h"
/* The last #include file should be: */
@@ -36,9 +35,15 @@ CURLSH *
curl_share_init(void)
{
struct Curl_share *share = calloc(1, sizeof(struct Curl_share));
- if(share)
+ if(share) {
share->specifier |= (1<<CURL_LOCK_DATA_SHARE);
+ if(Curl_mk_dnscache(&share->hostcache)) {
+ free(share);
+ return NULL;
+ }
+ }
+
return share;
}
@@ -52,6 +57,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
curl_lock_function lockfunc;
curl_unlock_function unlockfunc;
void *ptr;
+ CURLSHcode res = CURLSHE_OK;
if(share->dirty)
/* don't allow setting options while one or more handles are already
@@ -67,28 +73,40 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
share->specifier |= (1<<type);
switch( type ) {
case CURL_LOCK_DATA_DNS:
- if(!share->hostcache) {
- share->hostcache = Curl_mk_dnscache();
- if(!share->hostcache)
- return CURLSHE_NOMEM;
- }
break;
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
case CURL_LOCK_DATA_COOKIE:
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
if(!share->cookies) {
share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE );
if(!share->cookies)
- return CURLSHE_NOMEM;
+ res = CURLSHE_NOMEM;
}
+#else /* CURL_DISABLE_HTTP */
+ res = CURLSHE_NOT_BUILT_IN;
+#endif
+ break;
+
+ case CURL_LOCK_DATA_SSL_SESSION:
+#ifdef USE_SSL
+ if(!share->sslsession) {
+ share->max_ssl_sessions = 8;
+ share->sslsession = calloc(share->max_ssl_sessions,
+ sizeof(struct curl_ssl_session));
+ share->sessionage = 0;
+ if(!share->sslsession)
+ res = CURLSHE_NOMEM;
+ }
+#else
+ res = CURLSHE_NOT_BUILT_IN;
+#endif
break;
-#endif /* CURL_DISABLE_HTTP */
- case CURL_LOCK_DATA_SSL_SESSION: /* not supported (yet) */
case CURL_LOCK_DATA_CONNECT: /* not supported (yet) */
+ break;
default:
- return CURLSHE_BAD_OPTION;
+ res = CURLSHE_BAD_OPTION;
}
break;
@@ -96,32 +114,35 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
/* this is a type this share will no longer share */
type = va_arg(param, int);
share->specifier &= ~(1<<type);
- switch( type )
- {
- case CURL_LOCK_DATA_DNS:
- if(share->hostcache) {
- Curl_hash_destroy(share->hostcache);
- share->hostcache = NULL;
- }
- break;
+ switch( type ) {
+ case CURL_LOCK_DATA_DNS:
+ break;
+ case CURL_LOCK_DATA_COOKIE:
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
- case CURL_LOCK_DATA_COOKIE:
- if(share->cookies) {
- Curl_cookie_cleanup(share->cookies);
- share->cookies = NULL;
- }
- break;
-#endif /* CURL_DISABLE_HTTP */
-
- case CURL_LOCK_DATA_SSL_SESSION:
- break;
-
- case CURL_LOCK_DATA_CONNECT:
- break;
-
- default:
- return CURLSHE_BAD_OPTION;
+ if(share->cookies) {
+ Curl_cookie_cleanup(share->cookies);
+ share->cookies = NULL;
+ }
+#else /* CURL_DISABLE_HTTP */
+ res = CURLSHE_NOT_BUILT_IN;
+#endif
+ break;
+
+ case CURL_LOCK_DATA_SSL_SESSION:
+#ifdef USE_SSL
+ Curl_safefree(share->sslsession);
+#else
+ res = CURLSHE_NOT_BUILT_IN;
+#endif
+ break;
+
+ case CURL_LOCK_DATA_CONNECT:
+ break;
+
+ default:
+ res = CURLSHE_BAD_OPTION;
+ break;
}
break;
@@ -141,10 +162,13 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
break;
default:
- return CURLSHE_BAD_OPTION;
+ res = CURLSHE_BAD_OPTION;
+ break;
}
- return CURLSHE_OK;
+ va_end(param);
+
+ return res;
}
CURLSHcode
@@ -165,15 +189,20 @@ curl_share_cleanup(CURLSH *sh)
return CURLSHE_IN_USE;
}
- if(share->hostcache) {
- Curl_hash_destroy(share->hostcache);
- share->hostcache = NULL;
- }
+ Curl_hash_destroy(&share->hostcache);
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
- if(share->cookies)
- Curl_cookie_cleanup(share->cookies);
-#endif /* CURL_DISABLE_HTTP */
+ Curl_cookie_cleanup(share->cookies);
+#endif
+
+#ifdef USE_SSL
+ if(share->sslsession) {
+ size_t i;
+ for(i = 0; i < share->max_ssl_sessions; i++)
+ Curl_ssl_kill_session(&(share->sslsession[i]));
+ free(share->sslsession);
+ }
+#endif
if(share->unlockfunc)
share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
diff --git a/lib/share.h b/lib/share.h
index ea8e233d..8e6629b7 100644
--- a/lib/share.h
+++ b/lib/share.h
@@ -1,6 +1,5 @@
-#ifndef __CURL_SHARE_H
-#define __CURL_SHARE_H
-
+#ifndef HEADER_CURL_SHARE_H
+#define HEADER_CURL_SHARE_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -8,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 +22,10 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
#include "cookie.h"
+#include "urldata.h"
/* SalfordC says "A structure member may not be volatile". Hence:
*/
@@ -44,12 +44,18 @@ struct Curl_share {
curl_unlock_function unlockfunc;
void *clientdata;
- struct curl_hash *hostcache;
+ struct curl_hash hostcache;
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
struct CookieInfo *cookies;
+#endif
+
+ struct curl_ssl_session *sslsession;
+ size_t max_ssl_sessions;
+ long sessionage;
};
CURLSHcode Curl_share_lock (struct SessionHandle *, curl_lock_data,
curl_lock_access);
CURLSHcode Curl_share_unlock (struct SessionHandle *, curl_lock_data);
-#endif /* __CURL_SHARE_H */
+#endif /* HEADER_CURL_SHARE_H */
diff --git a/lib/sigpipe.h b/lib/sigpipe.h
new file mode 100644
index 00000000..e8d2acd6
--- /dev/null
+++ b/lib/sigpipe.h
@@ -0,0 +1,78 @@
+#ifndef HEADER_CURL_SIGPIPE_H
+#define HEADER_CURL_SIGPIPE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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(HAVE_SIGNAL_H) && defined(HAVE_SIGACTION) && defined(USE_OPENSSL)
+#include <signal.h>
+
+struct sigpipe_ignore {
+ struct sigaction old_pipe_act;
+ bool no_signal;
+};
+
+#define SIGPIPE_VARIABLE(x) struct sigpipe_ignore x
+
+/*
+ * sigpipe_ignore() makes sure we ignore SIGPIPE while running libcurl
+ * internals, and then sigpipe_restore() will restore the situation when we
+ * return from libcurl again.
+ */
+static void sigpipe_ignore(struct SessionHandle *data,
+ struct sigpipe_ignore *ig)
+{
+ /* get a local copy of no_signal because the SessionHandle might not be
+ around when we restore */
+ ig->no_signal = data->set.no_signal;
+ if(!data->set.no_signal) {
+ struct sigaction action;
+ /* first, extract the existing situation */
+ memset(&ig->old_pipe_act, 0, sizeof(struct sigaction));
+ sigaction(SIGPIPE, NULL, &ig->old_pipe_act);
+ action = ig->old_pipe_act;
+ /* ignore this signal */
+ action.sa_handler = SIG_IGN;
+ sigaction(SIGPIPE, &action, NULL);
+ }
+}
+
+/*
+ * sigpipe_restore() puts back the outside world's opinion of signal handler
+ * and SIGPIPE handling. It MUST only be called after a corresponding
+ * sigpipe_ignore() was used.
+ */
+static void sigpipe_restore(struct sigpipe_ignore *ig)
+{
+ if(!ig->no_signal)
+ /* restore the outside state */
+ sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
+}
+
+#else
+/* for systems without sigaction */
+#define sigpipe_ignore(x,y) Curl_nop_stmt
+#define sigpipe_restore(x) Curl_nop_stmt
+#define SIGPIPE_VARIABLE(x)
+#endif
+
+#endif /* HEADER_CURL_SIGPIPE_H */
diff --git a/lib/slist.c b/lib/slist.c
index 7c0f67b1..9c0b2a58 100644
--- a/lib/slist.c
+++ b/lib/slist.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,17 +20,12 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-
-#include <string.h>
-#include "curl_memory.h"
#include "slist.h"
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
/* returns last node in linked list */
@@ -51,6 +46,38 @@ static struct curl_slist *slist_get_last(struct curl_slist *list)
}
/*
+ * Curl_slist_append_nodup() appends a string to the linked list. Rather than
+ * copying the string in dynamic storage, it takes its ownership. The string
+ * should have been malloc()ated. Curl_slist_append_nodup always returns
+ * the address of the first record, so that you can use this function as an
+ * initialization function as well as an append function.
+ * If an error occurs, NULL is returned and the string argument is NOT
+ * released.
+ */
+struct curl_slist *Curl_slist_append_nodup(struct curl_slist *list, char *data)
+{
+ struct curl_slist *last;
+ struct curl_slist *new_item;
+
+ DEBUGASSERT(data);
+
+ new_item = malloc(sizeof(struct curl_slist));
+ if(!new_item)
+ return NULL;
+
+ new_item->next = NULL;
+ new_item->data = data;
+
+ /* if this is the first item, then new_item *is* the list */
+ if(!list)
+ return new_item;
+
+ last = slist_get_last(list);
+ last->next = new_item;
+ return list;
+}
+
+/*
* curl_slist_append() appends a string to the linked list. It always returns
* the address of the first record, so that you can use this function as an
* initialization function as well as an append function. If you find this
@@ -60,32 +87,16 @@ static struct curl_slist *slist_get_last(struct curl_slist *list)
struct curl_slist *curl_slist_append(struct curl_slist *list,
const char *data)
{
- struct curl_slist *last;
- struct curl_slist *new_item;
+ char *dupdata = strdup(data);
- new_item = malloc(sizeof(struct curl_slist));
- if(new_item) {
- char *dupdata = strdup(data);
- if(dupdata) {
- new_item->next = NULL;
- new_item->data = dupdata;
- }
- else {
- free(new_item);
- return NULL;
- }
- }
- else
+ if(!dupdata)
return NULL;
- if(list) {
- last = slist_get_last(list);
- last->next = new_item;
- return list;
- }
+ list = Curl_slist_append_nodup(list, dupdata);
+ if(!list)
+ free(dupdata);
- /* if this is the first item, then new_item *is* the list */
- return new_item;
+ return list;
}
/*
@@ -101,7 +112,7 @@ struct curl_slist *Curl_slist_duplicate(struct curl_slist *inlist)
while(inlist) {
tmp = curl_slist_append(outlist, inlist->data);
- if (!tmp) {
+ if(!tmp) {
curl_slist_free_all(outlist);
return NULL;
}
@@ -124,10 +135,7 @@ void curl_slist_free_all(struct curl_slist *list)
item = list;
do {
next = item->next;
-
- if(item->data) {
- free(item->data);
- }
+ Curl_safefree(item->data);
free(item);
item = next;
} while(next);
diff --git a/lib/slist.h b/lib/slist.h
index 161b1509..ea7dcc48 100644
--- a/lib/slist.h
+++ b/lib/slist.h
@@ -1,5 +1,5 @@
-#ifndef __SLIST_H
-#define __SLIST_H
+#ifndef HEADER_CURL_SLIST_H
+#define HEADER_CURL_SLIST_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -29,4 +29,12 @@
*/
struct curl_slist *Curl_slist_duplicate(struct curl_slist *inlist);
-#endif /* __SLIST_H */
+/*
+ * Curl_slist_append_nodup() takes ownership of the given string and appends
+ * it to the list.
+ */
+struct curl_slist *Curl_slist_append_nodup(struct curl_slist *list,
+ char *data);
+
+#endif /* HEADER_CURL_SLIST_H */
+
diff --git a/lib/smb.c b/lib/smb.c
new file mode 100644
index 00000000..d461a712
--- /dev/null
+++ b/lib/smb.c
@@ -0,0 +1,976 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2014, Bill Nagel <wnagel@tycoint.com>, Exacq Technologies
+ * Copyright (C) 2015, Daniel Stenberg, <daniel@haxx.se>, 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 <process.h>
+#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 "escape.h"
+#include "curl_endian.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#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) {
+ free(path);
+
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ slash = strchr(req->share, '/');
+ if(!slash)
+ slash = strchr(req->share, '\\');
+
+ /* The share must be present */
+ if(!slash) {
+ free(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 = '\\';
+ }
+
+ free(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
new file mode 100644
index 00000000..7852fa1d
--- /dev/null
+++ b/lib/smb.h
@@ -0,0 +1,271 @@
+#ifndef HEADER_CURL_SMB_H
+#define HEADER_CURL_SMB_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2014, Bill Nagel <wnagel@tycoint.com>, 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 55e03d5a..dada087a 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -18,30 +18,25 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
- * RFC2821 SMTP protocol
- * RFC3207 SMTP over TLS
- * RFC4954 SMTP Authentication
+ * RFC1870 SMTP Service Extension for Message Size
* RFC2195 CRAM-MD5 authentication
+ * RFC2831 DIGEST-MD5 authentication
+ * 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
+ * Draft SMTP URL Interface <draft-earhart-url-smtp-00.txt>
+ * Draft LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_SMTP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -67,9 +62,6 @@
#include <curl/curl.h>
#include "urldata.h"
#include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
-#include "if2ip.h"
#include "hostip.h"
#include "progress.h"
#include "transfer.h"
@@ -80,22 +72,17 @@
#include "strtoofft.h"
#include "strequal.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "connect.h"
#include "strerror.h"
#include "select.h"
#include "multiif.h"
#include "url.h"
#include "rawstr.h"
-#include "strtoofft.h"
-#include "curl_base64.h"
-#include "curl_md5.h"
-#include "curl_hmac.h"
#include "curl_gethostname.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_sasl.h"
+#include "warnless.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -103,18 +90,22 @@
/* Local API functions */
static CURLcode smtp_regular_transfer(struct connectdata *conn, bool *done);
static CURLcode smtp_do(struct connectdata *conn, bool *done);
-static CURLcode smtp_done(struct connectdata *conn,
- CURLcode, bool premature);
+static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
+ bool premature);
static CURLcode smtp_connect(struct connectdata *conn, bool *done);
-static CURLcode smtp_disconnect(struct connectdata *conn);
+static CURLcode smtp_disconnect(struct connectdata *conn, bool dead);
static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done);
-static int smtp_getsock(struct connectdata *conn,
- curl_socket_t *socks,
+static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks,
int numsocks);
-static CURLcode smtp_doing(struct connectdata *conn,
- bool *dophase_done);
-static CURLcode smtp_setup_connection(struct connectdata * conn);
-
+static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done);
+static CURLcode smtp_setup_connection(struct connectdata *conn);
+static CURLcode smtp_parse_url_options(struct connectdata *conn);
+static CURLcode smtp_parse_url_path(struct connectdata *conn);
+static CURLcode smtp_parse_custom_request(struct connectdata *conn);
+static CURLcode smtp_perform_auth(struct connectdata *conn, const char *mech,
+ const char *initresp);
+static CURLcode smtp_continue_auth(struct connectdata *conn, const char *resp);
+static void smtp_get_message(char *buffer, char** outptr);
/*
* SMTP protocol handler.
@@ -131,13 +122,15 @@ const struct Curl_handler Curl_handler_smtp = {
smtp_doing, /* doing */
smtp_getsock, /* proto_getsock */
smtp_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
smtp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_SMTP, /* defport */
- PROT_SMTP /* protocol */
+ CURLPROTO_SMTP, /* protocol */
+ PROTOPT_CLOSEACTION | PROTOPT_NOURLQUERY /* flags */
};
-
#ifdef USE_SSL
/*
* SMTPS protocol handler.
@@ -154,10 +147,14 @@ const struct Curl_handler Curl_handler_smtps = {
smtp_doing, /* doing */
smtp_getsock, /* proto_getsock */
smtp_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
smtp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_SMTPS, /* defport */
- PROT_SMTP | PROT_SMTPS | PROT_SSL /* protocol */
+ CURLPROTO_SMTPS, /* protocol */
+ PROTOPT_CLOSEACTION | PROTOPT_SSL
+ | PROTOPT_NOURLQUERY /* flags */
};
#endif
@@ -168,7 +165,7 @@ const struct Curl_handler Curl_handler_smtps = {
static const struct Curl_handler Curl_handler_smtp_proxy = {
"SMTP", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -177,13 +174,15 @@ static const struct Curl_handler Curl_handler_smtp_proxy = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_SMTP, /* defport */
- PROT_HTTP /* protocol */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
-
#ifdef USE_SSL
/*
* HTTP-proxyed SMTPS protocol handler.
@@ -191,7 +190,7 @@ static const struct Curl_handler Curl_handler_smtp_proxy = {
static const struct Curl_handler Curl_handler_smtps_proxy = {
"SMTPS", /* scheme */
- ZERO_NULL, /* setup_connection */
+ Curl_http_setup_conn, /* setup_connection */
Curl_http, /* do_it */
Curl_http_done, /* done */
ZERO_NULL, /* do_more */
@@ -200,96 +199,126 @@ static const struct Curl_handler Curl_handler_smtps_proxy = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_SMTPS, /* defport */
- PROT_HTTP /* protocol */
+ CURLPROTO_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
#endif
#endif
+/* SASL parameters for the smtp protocol */
+static const struct SASLproto saslsmtp = {
+ "smtp", /* The service name */
+ 334, /* Code received when continuation is expected */
+ 235, /* Code to receive upon authentication success */
+ 512 - 8, /* Maximum initial response length (no max) */
+ smtp_perform_auth, /* Send authentication command */
+ smtp_continue_auth, /* Send authentication continuation */
+ smtp_get_message /* Get SASL response message */
+};
+
+#ifdef USE_SSL
+static void smtp_to_smtps(struct connectdata *conn)
+{
+ conn->handler = &Curl_handler_smtps;
+}
+#else
+#define smtp_to_smtps(x) Curl_nop_stmt
+#endif
-/* Function that checks for an ending smtp status code at the start of the
- given string.
- As a side effect, it also flags allowed authentication mechanisms according
- to EHLO AUTH response. */
-static int smtp_endofresp(struct pingpong *pp, int *resp)
+/***********************************************************************
+ *
+ * smtp_endofresp()
+ *
+ * Checks for an ending SMTP status code at the start of the given string, but
+ * also detects various capabilities from the EHLO response including the
+ * supported authentication mechanisms.
+ */
+static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len,
+ int *resp)
{
- char *line = pp->linestart_resp;
- size_t len = pp->nread_resp;
- struct connectdata *conn = pp->conn;
struct smtp_conn *smtpc = &conn->proto.smtpc;
- int result;
- size_t wordlen;
+ bool result = FALSE;
+ /* Nothing for us */
if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2]))
- return FALSE; /* Nothing for us. */
+ return FALSE;
+
+ /* Do we have a command response? This should be the response code followed
+ by a space and optionally some text as per RFC-5321 and as outlined in
+ Section 4. Examples of RFC-4954 but some e-mail servers ignore this and
+ only send the response code instead as per Section 4.2. */
+ if(line[3] == ' ' || len == 5) {
+ result = TRUE;
+ *resp = curlx_sltosi(strtol(line, NULL, 10));
+
+ /* Make sure real server never sends internal value */
+ if(*resp == 1)
+ *resp = 0;
+ }
+ /* Do we have a multiline (continuation) response? */
+ else if(line[3] == '-' &&
+ (smtpc->state == SMTP_EHLO || smtpc->state == SMTP_COMMAND)) {
+ result = TRUE;
+ *resp = 1; /* Internal response code */
+ }
- if((result = line[3] == ' '))
- *resp = atoi(line);
+ return result;
+}
- line += 4;
- len -= 4;
+/***********************************************************************
+ *
+ * smtp_get_message()
+ *
+ * Gets the authentication message from the response buffer.
+ */
+static void smtp_get_message(char *buffer, char** outptr)
+{
+ size_t len = 0;
+ char* message = NULL;
- if(smtpc->state == SMTP_EHLO && len >= 5 && !memcmp(line, "AUTH ", 5)) {
- line += 5;
- len -= 5;
+ /* Find the start of the message */
+ for(message = buffer + 4; *message == ' ' || *message == '\t'; message++)
+ ;
- for (;;) {
- while (len &&
- (*line == ' ' || *line == '\t' ||
- *line == '\r' || *line == '\n')) {
- line++;
- len--;
- }
+ /* Find the end of the message */
+ for(len = strlen(message); len--;)
+ if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' &&
+ message[len] != '\t')
+ break;
- if(!len)
- break;
-
- for (wordlen = 0; wordlen < len && line[wordlen] != ' ' &&
- line[wordlen] != '\t' && line[wordlen] != '\r' &&
- line[wordlen] != '\n';)
- wordlen++;
-
- if(wordlen == 5 && !memcmp(line, "LOGIN", 5))
- smtpc->authmechs |= SMTP_AUTH_LOGIN;
- else if(wordlen == 5 && !memcmp(line, "PLAIN", 5))
- smtpc->authmechs |= SMTP_AUTH_PLAIN;
- else if(wordlen == 8 && !memcmp(line, "CRAM-MD5", 8))
- smtpc->authmechs |= SMTP_AUTH_CRAM_MD5;
- else if(wordlen == 10 && !memcmp(line, "DIGEST-MD5", 10))
- smtpc->authmechs |= SMTP_AUTH_DIGEST_MD5;
- else if(wordlen == 6 && !memcmp(line, "GSSAPI", 6))
- smtpc->authmechs |= SMTP_AUTH_GSSAPI;
- else if(wordlen == 8 && !memcmp(line, "EXTERNAL", 8))
- smtpc->authmechs |= SMTP_AUTH_EXTERNAL;
-
- line += wordlen;
- len -= wordlen;
- }
+ /* Terminate the message */
+ if(++len) {
+ message[len] = '\0';
}
- return result;
+ *outptr = message;
}
-/* This is the ONLY way to change SMTP state! */
-static void state(struct connectdata *conn,
- smtpstate newstate)
+/***********************************************************************
+ *
+ * state()
+ *
+ * This is the ONLY way to change SMTP state!
+ */
+static void state(struct connectdata *conn, smtpstate newstate)
{
struct smtp_conn *smtpc = &conn->proto.smtpc;
#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
/* for debug purposes */
- static const char * const names[]={
+ static const char * const names[] = {
"STOP",
"SERVERGREET",
"EHLO",
"HELO",
"STARTTLS",
- "AUTHPLAIN",
- "AUTHLOGIN",
- "AUTHPASSWD",
- "AUTHCRAM",
+ "UPGRADETLS",
"AUTH",
+ "COMMAND",
"MAIL",
"RCPT",
"DATA",
@@ -297,438 +326,479 @@ static void state(struct connectdata *conn,
"QUIT",
/* LAST */
};
+
if(smtpc->state != newstate)
infof(conn->data, "SMTP %p state change from %s to %s\n",
- smtpc, names[smtpc->state], names[newstate]);
+ (void *)smtpc, names[smtpc->state], names[newstate]);
#endif
+
smtpc->state = newstate;
}
-static CURLcode smtp_state_ehlo(struct connectdata *conn)
+/***********************************************************************
+ *
+ * smtp_perform_ehlo()
+ *
+ * Sends the EHLO command to not only initialise communication with the ESMTP
+ * server but to also obtain a list of server side supported capabilities.
+ */
+static CURLcode smtp_perform_ehlo(struct connectdata *conn)
{
- CURLcode result;
+ CURLcode result = CURLE_OK;
struct smtp_conn *smtpc = &conn->proto.smtpc;
- smtpc->authmechs = 0; /* No known authentication mechanisms yet. */
+ smtpc->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanism yet */
+ smtpc->sasl.authused = SASL_AUTH_NONE; /* Clear the authentication mechanism
+ used for esmtp connections */
+ smtpc->tls_supported = FALSE; /* Clear the TLS capability */
+ smtpc->auth_supported = FALSE; /* Clear the AUTH capability */
- /* send EHLO */
+ /* Send the EHLO command */
result = Curl_pp_sendf(&smtpc->pp, "EHLO %s", smtpc->domain);
- if(result)
- return result;
+ if(!result)
+ state(conn, SMTP_EHLO);
- state(conn, SMTP_EHLO);
- return CURLE_OK;
+ return result;
}
-static CURLcode smtp_state_helo(struct connectdata *conn)
+/***********************************************************************
+ *
+ * smtp_perform_helo()
+ *
+ * Sends the HELO command to initialise communication with the SMTP server.
+ */
+static CURLcode smtp_perform_helo(struct connectdata *conn)
{
- CURLcode result;
+ CURLcode result = CURLE_OK;
struct smtp_conn *smtpc = &conn->proto.smtpc;
- /* send HELO */
+ smtpc->sasl.authused = SASL_AUTH_NONE; /* No authentication mechanism used
+ in smtp connections */
+
+ /* Send the HELO command */
result = Curl_pp_sendf(&smtpc->pp, "HELO %s", smtpc->domain);
- if(result)
- return result;
+ if(!result)
+ state(conn, SMTP_HELO);
- state(conn, SMTP_HELO);
- return CURLE_OK;
-}
-
-static size_t smtp_auth_plain_data(struct connectdata * conn, char * * outptr)
-{
- char plainauth[2 * MAX_CURL_USER_LENGTH + MAX_CURL_PASSWORD_LENGTH];
- size_t ulen;
- size_t plen;
-
- ulen = strlen(conn->user);
- plen = strlen(conn->passwd);
-
- if(2 * ulen + plen + 2 > sizeof plainauth)
- return 0;
-
- memcpy(plainauth, conn->user, ulen);
- plainauth[ulen] = '\0';
- memcpy(plainauth + ulen + 1, conn->user, ulen);
- plainauth[2 * ulen + 1] = '\0';
- memcpy(plainauth + 2 * ulen + 2, conn->passwd, plen);
- return Curl_base64_encode(conn->data, plainauth, 2 * ulen + plen + 2, outptr);
+ return result;
}
-static size_t smtp_auth_login_user(struct connectdata * conn, char * * outptr)
+/***********************************************************************
+ *
+ * smtp_perform_starttls()
+ *
+ * Sends the STLS command to start the upgrade to TLS.
+ */
+static CURLcode smtp_perform_starttls(struct connectdata *conn)
{
- size_t ulen;
+ CURLcode result = CURLE_OK;
- ulen = strlen(conn->user);
+ /* Send the STARTTLS command */
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "STARTTLS");
- if(!ulen) {
- *outptr = strdup("=");
- return *outptr? 1: 0;
- }
+ if(!result)
+ state(conn, SMTP_STARTTLS);
- return Curl_base64_encode(conn->data, conn->user, ulen, outptr);
+ return result;
}
-static CURLcode smtp_authenticate(struct connectdata *conn)
+/***********************************************************************
+ *
+ * smtp_perform_upgrade_tls()
+ *
+ * Performs the upgrade to TLS.
+ */
+static CURLcode smtp_perform_upgrade_tls(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
struct smtp_conn *smtpc = &conn->proto.smtpc;
- char * initresp;
- const char * mech;
- size_t l;
- smtpstate state1;
- smtpstate state2;
-
- if(!conn->bits.user_passwd)
- state(conn, SMTP_STOP); /* End of connect phase. */
- else {
- initresp = (char *) NULL;
- l = 1;
-
- /* Check supported authentication mechanisms by decreasing order of
- preference. */
- mech = (const char *) NULL; /* Avoid compiler warnings. */
- state1 = SMTP_STOP;
- state2 = SMTP_STOP;
-
-#ifndef CURL_DISABLE_CRYPTO_AUTH
- if(smtpc->authmechs & SMTP_AUTH_CRAM_MD5) {
- mech = "CRAM-MD5";
- state1 = SMTP_AUTHCRAM;
- }
- else
-#endif
- if(smtpc->authmechs & SMTP_AUTH_PLAIN) {
- mech = "PLAIN";
- state1 = SMTP_AUTHPLAIN;
- state2 = SMTP_AUTH;
- l = smtp_auth_plain_data(conn, &initresp);
- }
- else if(smtpc->authmechs & SMTP_AUTH_LOGIN) {
- mech = "LOGIN";
- state1 = SMTP_AUTHLOGIN;
- state2 = SMTP_AUTHPASSWD;
- l = smtp_auth_login_user(conn, &initresp);
- }
- else {
- infof(conn->data, "No known auth mechanisms supported!\n");
- result = CURLE_LOGIN_DENIED; /* Other mechanisms not supported. */
- }
- if(!result) {
- if(!l)
- result = CURLE_OUT_OF_MEMORY;
- else if(initresp &&
- l + strlen(mech) <= 512 - 8) { /* AUTH <mech> ...<crlf> */
- result = Curl_pp_sendf(&smtpc->pp, "AUTH %s %s", mech, initresp);
- free(initresp);
-
- if(!result)
- state(conn, state2);
- }
- else {
- Curl_safefree(initresp);
+ /* Start the SSL connection */
+ result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &smtpc->ssldone);
- result = Curl_pp_sendf(&smtpc->pp, "AUTH %s", mech);
+ if(!result) {
+ if(smtpc->state != SMTP_UPGRADETLS)
+ state(conn, SMTP_UPGRADETLS);
- if(!result)
- state(conn, state1);
- }
+ if(smtpc->ssldone) {
+ smtp_to_smtps(conn);
+ result = smtp_perform_ehlo(conn);
}
}
return result;
}
-/* For the SMTP "protocol connect" and "doing" phases only */
-static int smtp_getsock(struct connectdata *conn,
- curl_socket_t *socks,
- int numsocks)
-{
- return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks);
-}
-
-/* for STARTTLS responses */
-static CURLcode smtp_state_starttls_resp(struct connectdata *conn,
- int smtpcode,
- smtpstate instate)
+/***********************************************************************
+ *
+ * smtp_perform_auth()
+ *
+ * Sends an AUTH command allowing the client to login with the given SASL
+ * authentication mechanism.
+ */
+static CURLcode smtp_perform_auth(struct connectdata *conn,
+ const char *mech,
+ const char *initresp)
{
CURLcode result = CURLE_OK;
- struct SessionHandle *data = conn->data;
- (void)instate; /* no use for this yet */
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
- if(smtpcode != 220) {
- if(data->set.ftp_ssl != CURLUSESSL_TRY) {
- failf(data, "STARTTLS denied. %c", smtpcode);
- result = CURLE_LOGIN_DENIED;
- }
- else
- result = smtp_authenticate(conn);
+ if(initresp) { /* AUTH <mech> ...<crlf> */
+ /* Send the AUTH command with the initial response */
+ result = Curl_pp_sendf(&smtpc->pp, "AUTH %s %s", mech, initresp);
}
else {
- /* Curl_ssl_connect is BLOCKING */
- result = Curl_ssl_connect(conn, FIRSTSOCKET);
- if(CURLE_OK == result) {
- conn->protocol |= PROT_SMTPS;
- result = smtp_state_ehlo(conn);
- }
+ /* Send the AUTH command */
+ result = Curl_pp_sendf(&smtpc->pp, "AUTH %s", mech);
}
+
return result;
}
-/* for EHLO responses */
-static CURLcode smtp_state_ehlo_resp(struct connectdata *conn,
- int smtpcode,
- smtpstate instate)
+/***********************************************************************
+ *
+ * smtp_continue_auth()
+ *
+ * Sends SASL continuation data or cancellation.
+ */
+static CURLcode smtp_continue_auth(struct connectdata *conn, const char *resp)
+{
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
+
+ return Curl_pp_sendf(&smtpc->pp, "%s", resp);
+}
+
+/***********************************************************************
+ *
+ * smtp_perform_authentication()
+ *
+ * Initiates the authentication sequence, with the appropriate SASL
+ * authentication mechanism.
+ */
+static CURLcode smtp_perform_authentication(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
- struct SessionHandle *data = conn->data;
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
+ saslprogress progress;
- (void)instate; /* no use for this yet */
+ /* Check we have enough data to authenticate with, and the
+ server supports authentiation, and end the connect phase if not */
+ if(!smtpc->auth_supported ||
+ !Curl_sasl_can_authenticate(&smtpc->sasl, conn)) {
+ state(conn, SMTP_STOP);
+ return result;
+ }
- if(smtpcode/100 != 2) {
- if((data->set.ftp_ssl <= CURLUSESSL_TRY || conn->ssl[FIRSTSOCKET].use) &&
- !conn->bits.user_passwd)
- result = smtp_state_helo(conn);
+ /* Calculate the SASL login details */
+ result = Curl_sasl_start(&smtpc->sasl, conn, FALSE, &progress);
+
+ if(!result) {
+ if(progress == SASL_INPROGRESS)
+ state(conn, SMTP_AUTH);
else {
- failf(data, "Access denied: %d", smtpcode);
+ /* Other mechanisms not supported */
+ infof(conn->data, "No known authentication mechanisms supported!\n");
result = CURLE_LOGIN_DENIED;
}
}
- else if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
- /* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
- to TLS connection now */
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "STARTTLS");
- state(conn, SMTP_STARTTLS);
- }
- else
- result = smtp_authenticate(conn);
return result;
}
-/* for HELO responses */
-static CURLcode smtp_state_helo_resp(struct connectdata *conn,
- int smtpcode,
- smtpstate instate)
+/***********************************************************************
+ *
+ * smtp_perform_command()
+ *
+ * Sends a SMTP based command.
+ */
+static CURLcode smtp_perform_command(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
+ struct SMTP *smtp = data->req.protop;
+
+ /* Send the command */
+ if(smtp->rcpt)
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s %s",
+ smtp->custom && smtp->custom[0] != '\0' ?
+ smtp->custom : "VRFY",
+ smtp->rcpt->data);
+ else
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s",
+ smtp->custom && smtp->custom[0] != '\0' ?
+ smtp->custom : "HELP");
- (void)instate; /* no use for this yet */
+ if(!result)
+ state(conn, SMTP_COMMAND);
- if(smtpcode/100 != 2) {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
- }
- else {
- /* end the connect phase */
- state(conn, SMTP_STOP);
- }
return result;
}
-/* for AUTH PLAIN (without initial response) responses */
-static CURLcode smtp_state_authplain_resp(struct connectdata *conn,
- int smtpcode,
- smtpstate instate)
+/***********************************************************************
+ *
+ * smtp_perform_mail()
+ *
+ * Sends an MAIL command to initiate the upload of a message.
+ */
+static CURLcode smtp_perform_mail(struct connectdata *conn)
{
+ char *from = NULL;
+ char *auth = NULL;
+ char *size = NULL;
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- size_t l;
- char * plainauth;
- (void)instate; /* no use for this yet */
+ /* Calculate the FROM parameter */
+ if(!data->set.str[STRING_MAIL_FROM])
+ /* Null reverse-path, RFC-5321, sect. 3.6.3 */
+ from = strdup("<>");
+ else if(data->set.str[STRING_MAIL_FROM][0] == '<')
+ from = aprintf("%s", data->set.str[STRING_MAIL_FROM]);
+ else
+ from = aprintf("<%s>", data->set.str[STRING_MAIL_FROM]);
+
+ if(!from)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* Calculate the optional AUTH parameter */
+ if(data->set.str[STRING_MAIL_AUTH] && conn->proto.smtpc.sasl.authused) {
+ if(data->set.str[STRING_MAIL_AUTH][0] != '\0')
+ auth = aprintf("%s", data->set.str[STRING_MAIL_AUTH]);
+ else
+ /* Empty AUTH, RFC-2554, sect. 5 */
+ auth = strdup("<>");
- if(smtpcode != 334) {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
+ if(!auth) {
+ free(from);
+
+ return CURLE_OUT_OF_MEMORY;
+ }
}
- else {
- l = smtp_auth_plain_data(conn, &plainauth);
- if(!l)
- result = CURLE_OUT_OF_MEMORY;
- else {
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth);
- free(plainauth);
+ /* Calculate the optional SIZE parameter */
+ if(conn->proto.smtpc.size_supported && conn->data->state.infilesize > 0) {
+ size = aprintf("%" CURL_FORMAT_CURL_OFF_T, data->state.infilesize);
- if(!result)
- state(conn, SMTP_AUTH);
+ if(!size) {
+ free(from);
+ free(auth);
+
+ return CURLE_OUT_OF_MEMORY;
}
}
+ /* Send the MAIL command */
+ if(!auth && !size)
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp,
+ "MAIL FROM:%s", from);
+ else if(auth && !size)
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp,
+ "MAIL FROM:%s AUTH=%s", from, auth);
+ else if(auth && size)
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp,
+ "MAIL FROM:%s AUTH=%s SIZE=%s", from, auth, size);
+ else
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp,
+ "MAIL FROM:%s SIZE=%s", from, size);
+
+ free(from);
+ free(auth);
+ free(size);
+
+ if(!result)
+ state(conn, SMTP_MAIL);
+
return result;
}
-/* for AUTH LOGIN (without initial response) responses */
-static CURLcode smtp_state_authlogin_resp(struct connectdata *conn,
- int smtpcode,
- smtpstate instate)
+/***********************************************************************
+ *
+ * smtp_perform_rcpt_to()
+ *
+ * Sends a RCPT TO command for a given recipient as part of the message upload
+ * process.
+ */
+static CURLcode smtp_perform_rcpt_to(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- size_t l;
- char * authuser;
+ struct SMTP *smtp = data->req.protop;
- (void)instate; /* no use for this yet */
+ /* Send the RCPT TO command */
+ if(smtp->rcpt->data[0] == '<')
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:%s",
+ smtp->rcpt->data);
+ else
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s>",
+ smtp->rcpt->data);
+ if(!result)
+ state(conn, SMTP_RCPT);
- if(smtpcode != 334) {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
- }
- else {
- l = smtp_auth_login_user(conn, &authuser);
+ return result;
+}
- if(!l)
- result = CURLE_OUT_OF_MEMORY;
- else {
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser);
- free(authuser);
+/***********************************************************************
+ *
+ * smtp_perform_quit()
+ *
+ * Performs the quit action prior to sclose() being called.
+ */
+static CURLcode smtp_perform_quit(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
- if(!result)
- state(conn, SMTP_AUTHPASSWD);
- }
- }
+ /* Send the QUIT command */
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "QUIT");
+
+ if(!result)
+ state(conn, SMTP_QUIT);
return result;
}
-/* for responses to user entry of AUTH LOGIN. */
-static CURLcode smtp_state_authpasswd_resp(struct connectdata *conn,
- int smtpcode,
- smtpstate instate)
+/* For the initial server greeting */
+static CURLcode smtp_state_servergreet_resp(struct connectdata *conn,
+ int smtpcode,
+ smtpstate instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- size_t plen;
- size_t l;
- char *authpasswd;
(void)instate; /* no use for this yet */
- if(smtpcode != 334) {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
- }
- else {
- plen = strlen(conn->passwd);
-
- if(!plen)
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "=");
- else {
- l = Curl_base64_encode(data, conn->passwd, plen, &authpasswd);
-
- if(!l)
- result = CURLE_OUT_OF_MEMORY;
- else {
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd);
- free(authpasswd);
-
- if(!result)
- state(conn, SMTP_AUTH);
- }
- }
+ if(smtpcode/100 != 2) {
+ failf(data, "Got unexpected smtp-server response: %d", smtpcode);
+ result = CURLE_FTP_WEIRD_SERVER_REPLY;
}
+ else
+ result = smtp_perform_ehlo(conn);
return result;
}
-#ifndef CURL_DISABLE_CRYPTO_AUTH
-
-/* for AUTH CRAM-MD5 responses. */
-static CURLcode smtp_state_authcram_resp(struct connectdata *conn,
+/* For STARTTLS responses */
+static CURLcode smtp_state_starttls_resp(struct connectdata *conn,
int smtpcode,
smtpstate instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- char * chlg64 = data->state.buffer;
- unsigned char * chlg;
- size_t chlglen;
- size_t l;
- char * rplyb64;
- HMAC_context * ctxt;
- unsigned char digest[16];
- char reply[MAX_CURL_USER_LENGTH + 32 /* 2 * size of MD5 digest */ + 1];
(void)instate; /* no use for this yet */
- if(smtpcode != 334) {
- failf(data, "Access denied: %d", smtpcode);
- return CURLE_LOGIN_DENIED;
+ if(smtpcode != 220) {
+ if(data->set.use_ssl != CURLUSESSL_TRY) {
+ failf(data, "STARTTLS denied. %c", smtpcode);
+ result = CURLE_USE_SSL_FAILED;
+ }
+ else
+ result = smtp_perform_authentication(conn);
}
+ else
+ result = smtp_perform_upgrade_tls(conn);
- /* Get the challenge. */
- for (chlg64 += 4; *chlg64 == ' ' || *chlg64 == '\t'; chlg64++)
- ;
-
- chlg = (unsigned char *) NULL;
- chlglen = 0;
+ return result;
+}
- if(*chlg64 != '=') {
- for (l = strlen(chlg64); l--;)
- if(chlg64[l] != '\r' && chlg64[l] != '\n' && chlg64[l] != ' ' &&
- chlg64[l] != '\t')
- break;
+/* For EHLO responses */
+static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
+ smtpstate instate)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
+ const char *line = data->state.buffer;
+ size_t len = strlen(line);
+ size_t wordlen;
- if(++l) {
- chlg64[l] = '\0';
+ (void)instate; /* no use for this yet */
- if(!(chlglen = Curl_base64_decode(chlg64, &chlg)))
- return CURLE_OUT_OF_MEMORY;
+ if(smtpcode/100 != 2 && smtpcode != 1) {
+ if(data->set.use_ssl <= CURLUSESSL_TRY || conn->ssl[FIRSTSOCKET].use)
+ result = smtp_perform_helo(conn);
+ else {
+ failf(data, "Remote access denied: %d", smtpcode);
+ result = CURLE_REMOTE_ACCESS_DENIED;
}
}
-
- /* Compute digest. */
- ctxt = Curl_HMAC_init(Curl_HMAC_MD5,
- (const unsigned char *) conn->passwd,
- (unsigned int)(strlen(conn->passwd)));
-
- if(!ctxt) {
- if(chlg)
- free(chlg);
-
- return CURLE_OUT_OF_MEMORY;
- }
-
- if(chlglen > 0)
- Curl_HMAC_update(ctxt, chlg, (unsigned int)(chlglen));
-
- if(chlg)
- free(chlg);
-
- Curl_HMAC_final(ctxt, digest);
-
- /* Prepare the reply. */
- snprintf(reply, sizeof reply,
- "%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
- conn->user, digest[0], digest[1], digest[2], digest[3], digest[4], digest[5],
- digest[6], digest[7], digest[8], digest[9], digest[10], digest[11],
- digest[12], digest[13], digest[14], digest[15]);
-
- /* Encode it to base64 and send it. */
- l = Curl_base64_encode(data, reply, 0, &rplyb64);
-
- if(!l)
- result = CURLE_OUT_OF_MEMORY;
else {
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", rplyb64);
- free(rplyb64);
+ line += 4;
+ len -= 4;
+
+ /* Does the server support the STARTTLS capability? */
+ if(len >= 8 && !memcmp(line, "STARTTLS", 8))
+ smtpc->tls_supported = TRUE;
+
+ /* Does the server support the SIZE capability? */
+ else if(len >= 4 && !memcmp(line, "SIZE", 4))
+ smtpc->size_supported = TRUE;
+
+ /* Does the server support authentication? */
+ else if(len >= 5 && !memcmp(line, "AUTH ", 5)) {
+ smtpc->auth_supported = TRUE;
+
+ /* Advance past the AUTH keyword */
+ line += 5;
+ len -= 5;
+
+ /* Loop through the data line */
+ for(;;) {
+ size_t llen;
+ unsigned int mechbit;
+
+ while(len &&
+ (*line == ' ' || *line == '\t' ||
+ *line == '\r' || *line == '\n')) {
+
+ line++;
+ len--;
+ }
+
+ if(!len)
+ break;
+
+ /* Extract the word */
+ for(wordlen = 0; wordlen < len && line[wordlen] != ' ' &&
+ line[wordlen] != '\t' && line[wordlen] != '\r' &&
+ line[wordlen] != '\n';)
+ wordlen++;
+
+ /* Test the word for a matching authentication mechanism */
+ if((mechbit = Curl_sasl_decode_mech(line, wordlen, &llen)) &&
+ llen == wordlen)
+ smtpc->sasl.authmechs |= mechbit;
+
+ line += wordlen;
+ len -= wordlen;
+ }
+ }
- if(!result)
- state(conn, SMTP_AUTH);
+ if(smtpcode != 1) {
+ if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
+ /* We don't have a SSL/TLS connection yet, but SSL is requested */
+ if(smtpc->tls_supported)
+ /* Switch to TLS connection now */
+ result = smtp_perform_starttls(conn);
+ else if(data->set.use_ssl == CURLUSESSL_TRY)
+ /* Fallback and carry on with authentication */
+ result = smtp_perform_authentication(conn);
+ else {
+ failf(data, "STARTTLS not supported.");
+ result = CURLE_USE_SSL_FAILED;
+ }
+ }
+ else
+ result = smtp_perform_authentication(conn);
+ }
}
return result;
}
-#endif
-
-/* for final responses to AUTH sequences. */
-static CURLcode smtp_state_auth_resp(struct connectdata *conn,
- int smtpcode,
+/* For HELO responses */
+static CURLcode smtp_state_helo_resp(struct connectdata *conn, int smtpcode,
smtpstate instate)
{
CURLcode result = CURLE_OK;
@@ -736,139 +806,176 @@ static CURLcode smtp_state_auth_resp(struct connectdata *conn,
(void)instate; /* no use for this yet */
- if(smtpcode != 235) {
- failf(data, "Authentication failed: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
+ if(smtpcode/100 != 2) {
+ failf(data, "Remote access denied: %d", smtpcode);
+ result = CURLE_REMOTE_ACCESS_DENIED;
}
else
- state(conn, SMTP_STOP); /* End of connect phase. */
+ /* End of connect phase */
+ state(conn, SMTP_STOP);
return result;
}
-/* start the DO phase */
-static CURLcode smtp_mail(struct connectdata *conn)
+/* For SASL authentication responses */
+static CURLcode smtp_state_auth_resp(struct connectdata *conn,
+ int smtpcode,
+ smtpstate instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
+ saslprogress progress;
- /* send MAIL */
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:%s",
- data->set.str[STRING_MAIL_FROM]);
- if(result)
- return result;
+ (void)instate; /* no use for this yet */
+
+ result = Curl_sasl_continue(&smtpc->sasl, conn, smtpcode, &progress);
+ if(!result)
+ switch(progress) {
+ case SASL_DONE:
+ state(conn, SMTP_STOP); /* Authenticated */
+ break;
+ case SASL_IDLE: /* No mechanism left after cancellation */
+ failf(data, "Authentication cancelled");
+ result = CURLE_LOGIN_DENIED;
+ break;
+ default:
+ break;
+ }
- state(conn, SMTP_MAIL);
return result;
}
-static CURLcode smtp_rcpt_to(struct connectdata *conn)
+/* For command responses */
+static CURLcode smtp_state_command_resp(struct connectdata *conn, int smtpcode,
+ smtpstate instate)
{
CURLcode result = CURLE_OK;
- struct smtp_conn *smtpc = &conn->proto.smtpc;
+ struct SessionHandle *data = conn->data;
+ struct SMTP *smtp = data->req.protop;
+ char *line = data->state.buffer;
+ size_t len = strlen(line);
- /* send RCPT TO */
- if(smtpc->rcpt) {
- if(smtpc->rcpt->data[0] == '<')
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:%s",
- smtpc->rcpt->data);
- else
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s>",
- smtpc->rcpt->data);
- if(!result)
- state(conn, SMTP_RCPT);
+ (void)instate; /* no use for this yet */
+
+ if((smtp->rcpt && smtpcode/100 != 2 && smtpcode != 553 && smtpcode != 1) ||
+ (!smtp->rcpt && smtpcode/100 != 2 && smtpcode != 1)) {
+ failf(data, "Command failed: %d", smtpcode);
+ result = CURLE_RECV_ERROR;
}
+ else {
+ /* Temporarily add the LF character back and send as body to the client */
+ if(!data->set.opt_no_body) {
+ line[len] = '\n';
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1);
+ line[len] = '\0';
+ }
+
+ if(smtpcode != 1) {
+ if(smtp->rcpt) {
+ smtp->rcpt = smtp->rcpt->next;
+
+ if(smtp->rcpt) {
+ /* Send the next command */
+ result = smtp_perform_command(conn);
+ }
+ else
+ /* End of DO phase */
+ state(conn, SMTP_STOP);
+ }
+ else
+ /* End of DO phase */
+ state(conn, SMTP_STOP);
+ }
+ }
+
return result;
}
-/* for MAIL responses */
-static CURLcode smtp_state_mail_resp(struct connectdata *conn,
- int smtpcode,
+/* For MAIL responses */
+static CURLcode smtp_state_mail_resp(struct connectdata *conn, int smtpcode,
smtpstate instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
+
(void)instate; /* no use for this yet */
if(smtpcode/100 != 2) {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
- state(conn, SMTP_STOP);
- }
- else {
- struct smtp_conn *smtpc = &conn->proto.smtpc;
- smtpc->rcpt = data->set.mail_rcpt;
-
- result = smtp_rcpt_to(conn);
+ failf(data, "MAIL failed: %d", smtpcode);
+ result = CURLE_SEND_ERROR;
}
+ else
+ /* Start the RCPT TO command */
+ result = smtp_perform_rcpt_to(conn);
return result;
}
-/* for RCPT responses */
-static CURLcode smtp_state_rcpt_resp(struct connectdata *conn,
- int smtpcode,
+/* For RCPT responses */
+static CURLcode smtp_state_rcpt_resp(struct connectdata *conn, int smtpcode,
smtpstate instate)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
+ struct SMTP *smtp = data->req.protop;
+
(void)instate; /* no use for this yet */
if(smtpcode/100 != 2) {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
- state(conn, SMTP_STOP);
+ failf(data, "RCPT failed: %d", smtpcode);
+ result = CURLE_SEND_ERROR;
}
else {
- struct smtp_conn *smtpc = &conn->proto.smtpc;
+ smtp->rcpt = smtp->rcpt->next;
- if(smtpc->rcpt) {
- smtpc->rcpt = smtpc->rcpt->next;
- result = smtp_rcpt_to(conn);
+ if(smtp->rcpt)
+ /* Send the next RCPT TO command */
+ result = smtp_perform_rcpt_to(conn);
+ else {
+ /* Send the DATA command */
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "DATA");
- /* if we failed or still is in RCPT sending, return */
- if(result || smtpc->rcpt)
- return result;
+ if(!result)
+ state(conn, SMTP_DATA);
}
-
- /* send DATA */
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "DATA");
- if(result)
- return result;
-
- state(conn, SMTP_DATA);
}
+
return result;
}
-/* for the DATA response */
-static CURLcode smtp_state_data_resp(struct connectdata *conn,
- int smtpcode,
+/* For DATA response */
+static CURLcode smtp_state_data_resp(struct connectdata *conn, int smtpcode,
smtpstate instate)
{
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *smtp = data->state.proto.smtp;
(void)instate; /* no use for this yet */
if(smtpcode != 354) {
- state(conn, SMTP_STOP);
- return CURLE_RECV_ERROR;
+ failf(data, "DATA failed: %d", smtpcode);
+ result = CURLE_SEND_ERROR;
}
+ else {
+ /* Set the progress upload size */
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
- /* SMTP upload */
- Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
- FIRSTSOCKET, smtp->bytecountp);
+ /* SMTP upload */
+ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL);
- state(conn, SMTP_STOP);
- return CURLE_OK;
+ /* End of DO phase */
+ state(conn, SMTP_STOP);
+ }
+
+ return result;
}
-/* for the POSTDATA response, which is received after the entire DATA
- part has been sent off to the server */
+/* For POSTDATA responses, which are received after the entire DATA
+ part has been sent to the server */
static CURLcode smtp_state_postdata_resp(struct connectdata *conn,
- int smtpcode,
- smtpstate instate)
+ int smtpcode,
+ smtpstate instate)
{
CURLcode result = CURLE_OK;
@@ -877,41 +984,47 @@ static CURLcode smtp_state_postdata_resp(struct connectdata *conn,
if(smtpcode != 250)
result = CURLE_RECV_ERROR;
+ /* End of DONE phase */
state(conn, SMTP_STOP);
+
return result;
}
static CURLcode smtp_statemach_act(struct connectdata *conn)
{
- CURLcode result;
+ CURLcode result = CURLE_OK;
curl_socket_t sock = conn->sock[FIRSTSOCKET];
- struct SessionHandle *data=conn->data;
+ struct SessionHandle *data = conn->data;
int smtpcode;
struct smtp_conn *smtpc = &conn->proto.smtpc;
struct pingpong *pp = &smtpc->pp;
size_t nread = 0;
+ /* Busy upgrading the connection; right now all I/O is SSL/TLS, not SMTP */
+ if(smtpc->state == SMTP_UPGRADETLS)
+ return smtp_perform_upgrade_tls(conn);
+
+ /* Flush any data that needs to be sent */
if(pp->sendleft)
- /* we have a piece of a command still left to send */
return Curl_pp_flushsend(pp);
- /* we read a piece of response */
- result = Curl_pp_readresp(sock, pp, &smtpcode, &nread);
- if(result)
- return result;
+ do {
+ /* Read the response from the server */
+ result = Curl_pp_readresp(sock, pp, &smtpcode, &nread);
+ if(result)
+ return result;
+
+ /* Store the latest response for later retrieval if necessary */
+ if(smtpc->state != SMTP_QUIT && smtpcode != 1)
+ data->info.httpcode = smtpcode;
+
+ if(!smtpcode)
+ break;
- if(smtpcode) {
- /* we have now received a full SMTP server response */
+ /* We have now received a full SMTP server response */
switch(smtpc->state) {
case SMTP_SERVERGREET:
- if(smtpcode/100 != 2) {
- failf(data, "Got unexpected smtp-server response: %d", smtpcode);
- return CURLE_FTP_WEIRD_SERVER_REPLY;
- }
-
- result = smtp_state_ehlo(conn);
- if(result)
- return result;
+ result = smtp_state_servergreet_resp(conn, smtpcode, smtpc->state);
break;
case SMTP_EHLO:
@@ -926,28 +1039,14 @@ static CURLcode smtp_statemach_act(struct connectdata *conn)
result = smtp_state_starttls_resp(conn, smtpcode, smtpc->state);
break;
- case SMTP_AUTHPLAIN:
- result = smtp_state_authplain_resp(conn, smtpcode, smtpc->state);
- break;
-
- case SMTP_AUTHLOGIN:
- result = smtp_state_authlogin_resp(conn, smtpcode, smtpc->state);
- break;
-
- case SMTP_AUTHPASSWD:
- result = smtp_state_authpasswd_resp(conn, smtpcode, smtpc->state);
- break;
-
-#ifndef CURL_DISABLE_CRYPTO_AUTH
- case SMTP_AUTHCRAM:
- result = smtp_state_authcram_resp(conn, smtpcode, smtpc->state);
- break;
-#endif
-
case SMTP_AUTH:
result = smtp_state_auth_resp(conn, smtpcode, smtpc->state);
break;
+ case SMTP_COMMAND:
+ result = smtp_state_command_resp(conn, smtpcode, smtpc->state);
+ break;
+
case SMTP_MAIL:
result = smtp_state_mail_resp(conn, smtpcode, smtpc->state);
break;
@@ -971,169 +1070,109 @@ static CURLcode smtp_statemach_act(struct connectdata *conn)
state(conn, SMTP_STOP);
break;
}
- }
+ } while(!result && smtpc->state != SMTP_STOP && Curl_pp_moredata(pp));
+
return result;
}
-/* called repeatedly until done from multi.c */
-static CURLcode smtp_multi_statemach(struct connectdata *conn,
- bool *done)
+/* Called repeatedly until done from multi.c */
+static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done)
{
+ CURLcode result = CURLE_OK;
struct smtp_conn *smtpc = &conn->proto.smtpc;
- CURLcode result = Curl_pp_multi_statemach(&smtpc->pp);
- *done = (bool)(smtpc->state == SMTP_STOP);
+ if((conn->handler->flags & PROTOPT_SSL) && !smtpc->ssldone) {
+ result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &smtpc->ssldone);
+ if(result || !smtpc->ssldone)
+ return result;
+ }
+
+ result = Curl_pp_statemach(&smtpc->pp, FALSE);
+ *done = (smtpc->state == SMTP_STOP) ? TRUE : FALSE;
return result;
}
-static CURLcode smtp_easy_statemach(struct connectdata *conn)
+static CURLcode smtp_block_statemach(struct connectdata *conn)
{
- struct smtp_conn *smtpc = &conn->proto.smtpc;
- struct pingpong *pp = &smtpc->pp;
CURLcode result = CURLE_OK;
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
- while(smtpc->state != SMTP_STOP) {
- result = Curl_pp_easy_statemach(pp);
- if(result)
- break;
- }
+ while(smtpc->state != SMTP_STOP && !result)
+ result = Curl_pp_statemach(&smtpc->pp, TRUE);
return result;
}
-/*
- * Allocate and initialize the struct SMTP for the current SessionHandle. If
- * need be.
- */
+/* Allocate and initialize the SMTP struct for the current SessionHandle if
+ required */
static CURLcode smtp_init(struct connectdata *conn)
{
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *smtp = data->state.proto.smtp;
- if(!smtp) {
- smtp = data->state.proto.smtp = calloc(sizeof(struct FTP), 1);
- if(!smtp)
- return CURLE_OUT_OF_MEMORY;
- }
+ struct SMTP *smtp;
- /* get some initial data into the smtp struct */
- smtp->bytecountp = &data->req.bytecount;
+ smtp = data->req.protop = calloc(sizeof(struct SMTP), 1);
+ if(!smtp)
+ result = CURLE_OUT_OF_MEMORY;
- /* No need to duplicate user+password, the connectdata struct won't change
- during a session, but we re-init them here since on subsequent inits
- since the conn struct may have changed or been replaced.
- */
- smtp->user = conn->user;
- smtp->passwd = conn->passwd;
+ return result;
+}
- return CURLE_OK;
+/* For the SMTP "protocol connect" and "doing" phases only */
+static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks,
+ int numsocks)
+{
+ return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks);
}
-/*
- * smtp_connect() should do everything that is to be considered a part of
+/***********************************************************************
+ *
+ * smtp_connect()
+ *
+ * This function should do everything that is to be considered a part of
* the connection phase.
*
- * The variable 'done' points to will be TRUE if the protocol-layer connect
- * phase is done when this function returns, or FALSE is not. When called as
- * a part of the easy interface, it will always be TRUE.
+ * The variable pointed to by 'done' will be TRUE if the protocol-layer
+ * connect phase is done when this function returns, or FALSE if not.
*/
-static CURLcode smtp_connect(struct connectdata *conn,
- bool *done) /* see description above */
+static CURLcode smtp_connect(struct connectdata *conn, bool *done)
{
- CURLcode result;
+ CURLcode result = CURLE_OK;
struct smtp_conn *smtpc = &conn->proto.smtpc;
- struct SessionHandle *data=conn->data;
- struct pingpong *pp=&smtpc->pp;
- const char *path = conn->data->state.path;
- int len;
- char localhost[1024 + 1];
+ struct pingpong *pp = &smtpc->pp;
*done = FALSE; /* default to not done yet */
- /* If there already is a protocol-specific struct allocated for this
- sessionhandle, deal with it */
- Curl_reset_reqproto(conn);
+ /* We always support persistent connections in SMTP */
+ connkeep(conn, "SMTP default");
- result = smtp_init(conn);
- if(CURLE_OK != result)
- return result;
-
- /* We always support persistant connections on smtp */
- conn->bits.close = FALSE;
-
- pp->response_time = RESP_TIMEOUT; /* set default response time-out */
+ /* Set the default response time-out */
+ pp->response_time = RESP_TIMEOUT;
pp->statemach_act = smtp_statemach_act;
pp->endofresp = smtp_endofresp;
pp->conn = conn;
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
- if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
- /* for SMTP over HTTP proxy */
- struct HTTP http_proxy;
- struct FTP *smtp_save;
-
- /* BLOCKING */
- /* We want "seamless" SMTP operations through HTTP proxy tunnel */
-
- /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
- * conn->proto.http; we want SMTP through HTTP and we have to change the
- * member temporarily for connecting to the HTTP proxy. After
- * Curl_proxyCONNECT we have to set back the member to the original struct
- * SMTP pointer
- */
- smtp_save = data->state.proto.smtp;
- memset(&http_proxy, 0, sizeof(http_proxy));
- data->state.proto.http = &http_proxy;
+ /* Initialize the SASL storage */
+ Curl_sasl_init(&smtpc->sasl, &saslsmtp);
- result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
- conn->host.name, conn->remote_port);
-
- data->state.proto.smtp = smtp_save;
-
- if(CURLE_OK != result)
- return result;
- }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
-
- if(conn->protocol & PROT_SMTPS) {
- /* BLOCKING */
- /* SMTPS is simply smtp with SSL for the control channel */
- /* now, perform the SSL initialization for this socket */
- result = Curl_ssl_connect(conn, FIRSTSOCKET);
- if(result)
- return result;
- }
+ /* Initialise the pingpong layer */
+ Curl_pp_init(pp);
- Curl_pp_init(pp); /* init the response reader stuff */
-
- pp->response_time = RESP_TIMEOUT; /* set default response time-out */
- pp->statemach_act = smtp_statemach_act;
- pp->endofresp = smtp_endofresp;
- pp->conn = conn;
-
- if(!*path) {
- if(!Curl_gethostname(localhost, sizeof localhost))
- path = localhost;
- else
- path = "localhost";
- }
+ /* Parse the URL options */
+ result = smtp_parse_url_options(conn);
+ if(result)
+ return result;
- /* url decode the path and use it as domain with EHLO */
- smtpc->domain = curl_easy_unescape(conn->data, path, 0, &len);
- if(!smtpc->domain)
- return CURLE_OUT_OF_MEMORY;
+ /* Parse the URL path */
+ result = smtp_parse_url_path(conn);
+ if(result)
+ return result;
- /* When we connect, we start in the state where we await the server greeting
- */
+ /* Start off waiting for the server greeting response */
state(conn, SMTP_SERVERGREET);
- if(data->state.used_interface == Curl_if_multi)
- result = smtp_multi_statemach(conn, done);
- else {
- result = smtp_easy_statemach(conn);
- if(!result)
- *done = TRUE;
- }
+ result = smtp_multi_statemach(conn, done);
return result;
}
@@ -1150,52 +1189,85 @@ static CURLcode smtp_connect(struct connectdata *conn,
static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
bool premature)
{
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *smtp = data->state.proto.smtp;
- CURLcode result=CURLE_OK;
+ struct SMTP *smtp = data->req.protop;
+ struct pingpong *pp = &conn->proto.smtpc.pp;
+ char *eob;
+ ssize_t len;
ssize_t bytes_written;
+
(void)premature;
- if(!smtp)
- /* When the easy handle is removed from the multi while libcurl is still
- * trying to resolve the host name, it seems that the smtp struct is not
- * yet initialized, but the removal action calls Curl_done() which calls
- * this function. So we simply return success if no smtp pointer is set.
- */
+ if(!smtp || !pp->conn)
+ /* 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
+ turn calls this function, so we simply return success. */
return CURLE_OK;
if(status) {
- conn->bits.close = TRUE; /* marked for closure */
- result = status; /* use the already set error code */
+ connclose(conn, "SMTP done with bad status"); /* marked for closure */
+ result = status; /* use the already set error code */
}
- else
- /* TODO: make this work even when the socket is EWOULDBLOCK in this call! */
+ 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. */
+ 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;
+ }
- /* write to socket (send away data) */
- result = Curl_write(conn,
- conn->writesockfd, /* socket to send to */
- SMTP_EOB, /* buffer pointer */
- SMTP_EOB_LEN, /* buffer size */
- &bytes_written); /* actually sent away */
+ 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);
+ 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->sendsize = len;
+ pp->sendleft = len - bytes_written;
+ }
+ else {
+ /* Successfully sent so adjust the response timeout relative to now */
+ pp->response = Curl_tvnow();
- if(status == CURLE_OK) {
- struct smtp_conn *smtpc = &conn->proto.smtpc;
- struct pingpong *pp= &smtpc->pp;
- pp->response = Curl_tvnow(); /* timeout relative now */
+ free(eob);
+ }
state(conn, SMTP_POSTDATA);
- /* run the state-machine
+
+ /* Run the state-machine
TODO: when the multi interface is used, this _really_ should be using
the smtp_multi_statemach function but we have no general support for
non-blocking DONE operations, not in the multi state machine and with
Curl_done() invokes on several places in the code!
*/
- result = smtp_easy_statemach(conn);
+ result = smtp_block_statemach(conn);
}
- /* clear these for next connection */
+ /* Cleanup our per-request based variables */
+ Curl_safefree(smtp->custom);
+
+ /* Clear the transfer mode for the next request */
smtp->transfer = FTPTRANSFER_BODY;
return result;
@@ -1205,41 +1277,44 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
*
* smtp_perform()
*
- * This is the actual DO function for SMTP. Get a file/directory according to
- * the options previously setup.
+ * This is the actual DO function for SMTP. Transfer a mail, send a command
+ * or get some data according to the options previously setup.
*/
-
-static
-CURLcode smtp_perform(struct connectdata *conn,
- bool *connected, /* connect status after PASV / PORT */
- bool *dophase_done)
+static CURLcode smtp_perform(struct connectdata *conn, bool *connected,
+ bool *dophase_done)
{
- /* this is SMTP and no proxy */
- CURLcode result=CURLE_OK;
+ /* This is SMTP and no proxy */
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct SMTP *smtp = data->req.protop;
DEBUGF(infof(conn->data, "DO phase starts\n"));
- if(conn->data->set.opt_no_body) {
- /* requested no body means no transfer... */
- struct FTP *smtp = conn->data->state.proto.smtp;
+ if(data->set.opt_no_body) {
+ /* Requested no body means no transfer */
smtp->transfer = FTPTRANSFER_INFO;
}
*dophase_done = FALSE; /* not done yet */
- /* start the first command in the DO phase */
- result = smtp_mail(conn);
+ /* Store the first recipient (or NULL if not specified) */
+ smtp->rcpt = data->set.mail_rcpt;
+
+ /* Start the first command in the DO phase */
+ if(data->set.upload && data->set.mail_rcpt)
+ /* MAIL transfer */
+ result = smtp_perform_mail(conn);
+ else
+ /* SMTP based command (VRFY, EXPN, NOOP, RSET or HELP) */
+ result = smtp_perform_command(conn);
+
if(result)
return result;
- /* run the state-machine */
- if(conn->data->state.used_interface == Curl_if_multi)
- result = smtp_multi_statemach(conn, dophase_done);
- else {
- result = smtp_easy_statemach(conn);
- *dophase_done = TRUE; /* with the easy interface we are done here */
- }
- *connected = conn->bits.tcpconnect;
+ /* Run the state-machine */
+ result = smtp_multi_statemach(conn, dophase_done);
+
+ *connected = conn->bits.tcpconnect[FIRSTSOCKET];
if(*dophase_done)
DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -1258,45 +1333,16 @@ CURLcode smtp_perform(struct connectdata *conn,
*/
static CURLcode smtp_do(struct connectdata *conn, bool *done)
{
- CURLcode retcode = CURLE_OK;
+ CURLcode result = CURLE_OK;
*done = FALSE; /* default to false */
- /*
- Since connections can be re-used between SessionHandles, this might be a
- connection already existing but on a fresh SessionHandle struct so we must
- make sure we have a good 'struct SMTP' to play with. For new connections,
- the struct SMTP is allocated and setup in the smtp_connect() function.
- */
- Curl_reset_reqproto(conn);
- retcode = smtp_init(conn);
- if(retcode)
- return retcode;
-
- retcode = smtp_regular_transfer(conn, done);
-
- return retcode;
-}
-
-/***********************************************************************
- *
- * smtp_quit()
- *
- * This should be called before calling sclose(). We should then wait for the
- * response from the server before returning. The calling code should then try
- * to close the connection.
- *
- */
-static CURLcode smtp_quit(struct connectdata *conn)
-{
- CURLcode result = CURLE_OK;
-
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "QUIT");
+ /* Parse the custom request */
+ result = smtp_parse_custom_request(conn);
if(result)
return result;
- state(conn, SMTP_QUIT);
- result = smtp_easy_statemach(conn);
+ result = smtp_regular_transfer(conn, done);
return result;
}
@@ -1308,59 +1354,59 @@ static CURLcode smtp_quit(struct connectdata *conn)
* Disconnect from an SMTP server. Cleanup protocol-specific per-connection
* resources. BLOCKING.
*/
-static CURLcode smtp_disconnect(struct connectdata *conn)
+static CURLcode smtp_disconnect(struct connectdata *conn, bool dead_connection)
{
- struct smtp_conn *smtpc= &conn->proto.smtpc;
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
/* We cannot send quit unconditionally. If this connection is stale or
bad in any way, sending quit and waiting around here will make the
- disconnect wait in vain and cause more problems than we need to.
- */
+ disconnect wait in vain and cause more problems than we need to. */
/* The SMTP session may or may not have been allocated/setup at this
point! */
- if(smtpc->pp.conn)
- (void)smtp_quit(conn); /* ignore errors on the LOGOUT */
+ if(!dead_connection && smtpc->pp.conn && smtpc->pp.conn->bits.protoconnstart)
+ if(!smtp_perform_quit(conn))
+ (void)smtp_block_statemach(conn); /* ignore errors on QUIT */
+ /* Disconnect from the server */
Curl_pp_disconnect(&smtpc->pp);
- /* This won't already be freed in some error cases */
+ /* Cleanup the SASL module */
+ Curl_sasl_cleanup(conn, smtpc->sasl.authused);
+
+ /* Cleanup our connection based variables */
Curl_safefree(smtpc->domain);
- smtpc->domain = NULL;
return CURLE_OK;
}
-/* call this when the DO phase has completed */
-static CURLcode smtp_dophase_done(struct connectdata *conn,
- bool connected)
+/* Call this when the DO phase has completed */
+static CURLcode smtp_dophase_done(struct connectdata *conn, bool connected)
{
- struct FTP *smtp = conn->data->state.proto.smtp;
- struct smtp_conn *smtpc= &conn->proto.smtpc;
+ struct SMTP *smtp = conn->data->req.protop;
+
(void)connected;
if(smtp->transfer != FTPTRANSFER_BODY)
/* no data to transfer */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
- free(smtpc->domain);
- smtpc->domain = NULL;
-
return CURLE_OK;
}
-/* called from multi.c while DOing */
-static CURLcode smtp_doing(struct connectdata *conn,
- bool *dophase_done)
+/* Called from multi.c while DOing */
+static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done)
{
- CURLcode result;
- result = smtp_multi_statemach(conn, dophase_done);
+ CURLcode result = smtp_multi_statemach(conn, dophase_done);
- if(*dophase_done) {
+ if(result)
+ DEBUGF(infof(conn->data, "DO phase failed\n"));
+ else if(*dophase_done) {
result = smtp_dophase_done(conn, FALSE /* not connected */);
DEBUGF(infof(conn->data, "DO phase is complete\n"));
}
+
return result;
}
@@ -1373,44 +1419,39 @@ static CURLcode smtp_doing(struct connectdata *conn,
* Performs all commands done before a regular transfer between a local and a
* remote host.
*/
-static
-CURLcode smtp_regular_transfer(struct connectdata *conn,
- bool *dophase_done)
+static CURLcode smtp_regular_transfer(struct connectdata *conn,
+ bool *dophase_done)
{
- CURLcode result=CURLE_OK;
- bool connected=FALSE;
+ CURLcode result = CURLE_OK;
+ bool connected = FALSE;
struct SessionHandle *data = conn->data;
- data->req.size = -1; /* make sure this is unknown at this point */
+ /* Make sure size is unknown at this point */
+ data->req.size = -1;
+
+ /* Set the progress data */
Curl_pgrsSetUploadCounter(data, 0);
Curl_pgrsSetDownloadCounter(data, 0);
- Curl_pgrsSetUploadSize(data, 0);
- Curl_pgrsSetDownloadSize(data, 0);
-
- result = smtp_perform(conn,
- &connected, /* have we connected after PASV/PORT */
- dophase_done); /* all commands in the DO-phase done? */
-
- if(CURLE_OK == result) {
+ Curl_pgrsSetUploadSize(data, -1);
+ Curl_pgrsSetDownloadSize(data, -1);
- if(!*dophase_done)
- /* the DO phase has not completed yet */
- return CURLE_OK;
+ /* Carry out the perform */
+ result = smtp_perform(conn, &connected, dophase_done);
+ /* Perform post DO phase operations if necessary */
+ if(!result && *dophase_done)
result = smtp_dophase_done(conn, connected);
- if(result)
- return result;
- }
return result;
}
-static CURLcode smtp_setup_connection(struct connectdata * conn)
+static CURLcode smtp_setup_connection(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
+ CURLcode result;
if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) {
- /* Unless we have asked to tunnel smtp operations through the proxy, we
+ /* Unless we have asked to tunnel SMTP operations through the proxy, we
switch and use HTTP operations only */
#ifndef CURL_DISABLE_HTTP
if(conn->handler == &Curl_handler_smtp)
@@ -1423,83 +1464,207 @@ static CURLcode smtp_setup_connection(struct connectdata * conn)
return CURLE_UNSUPPORTED_PROTOCOL;
#endif
}
- /*
- * We explicitly mark this connection as persistent here as we're doing
- * SMTP over HTTP and thus we accidentally avoid setting this value
- * otherwise.
- */
- conn->bits.close = FALSE;
+ /* set it up as a HTTP connection instead */
+ return conn->handler->setup_connection(conn);
+
#else
failf(data, "SMTP over http proxy requires HTTP support built-in!");
return CURLE_UNSUPPORTED_PROTOCOL;
#endif
}
+ /* Initialise the SMTP layer */
+ result = smtp_init(conn);
+ if(result)
+ return result;
+
data->state.path++; /* don't include the initial slash */
return CURLE_OK;
}
-CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread)
+/***********************************************************************
+ *
+ * smtp_parse_url_options()
+ *
+ * Parse the URL login options.
+ */
+static CURLcode smtp_parse_url_options(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
+ const char *ptr = conn->options;
+
+ smtpc->sasl.resetprefs = TRUE;
+
+ while(!result && ptr && *ptr) {
+ const char *key = ptr;
+ const char *value;
+
+ while(*ptr && *ptr != '=')
+ ptr++;
+
+ value = ptr + 1;
+
+ while(*ptr && *ptr != ';')
+ ptr++;
+
+ if(strnequal(key, "AUTH=", 5))
+ result = Curl_sasl_parse_url_auth_option(&smtpc->sasl,
+ value, ptr - value);
+ else
+ result = CURLE_URL_MALFORMAT;
+
+ if(*ptr == ';')
+ ptr++;
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ *
+ * smtp_parse_url_path()
+ *
+ * Parse the URL path into separate path components.
+ */
+static CURLcode smtp_parse_url_path(struct connectdata *conn)
+{
+ /* The SMTP struct is already initialised in smtp_connect() */
+ struct SessionHandle *data = conn->data;
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
+ const char *path = data->state.path;
+ char localhost[HOSTNAME_MAX + 1];
+
+ /* Calculate the path if necessary */
+ if(!*path) {
+ if(!Curl_gethostname(localhost, sizeof(localhost)))
+ path = localhost;
+ else
+ path = "localhost";
+ }
+
+ /* URL decode the path and use it as the domain in our EHLO */
+ return Curl_urldecode(conn->data, path, 0, &smtpc->domain, NULL, TRUE);
+}
+
+/***********************************************************************
+ *
+ * smtp_parse_custom_request()
+ *
+ * Parse the custom request.
+ */
+static CURLcode smtp_parse_custom_request(struct connectdata *conn)
{
- /* When sending SMTP payload, we must detect CRLF.CRLF sequences in
- * the data and make sure it is sent as CRLF..CRLF instead, as
- * otherwise it will wrongly be detected as end of data by the server.
- */
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct SMTP *smtp = data->req.protop;
+ const char *custom = data->set.str[STRING_CUSTOMREQUEST];
+
+ /* URL decode the custom request */
+ if(custom)
+ result = Curl_urldecode(data, custom, 0, &smtp->custom, NULL, TRUE);
+
+ return result;
+}
+
+CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const 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
+ be deleted by the server when not part of an EOB terminator and a
+ genuine CRLF.CRLF which isn't escaped will wrongly be detected as end of
+ data by the server
+ */
ssize_t i;
ssize_t si;
- struct smtp_conn *smtpc = &conn->proto.smtpc;
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;
- 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;
+ /* 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!");
+
+ 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++, si++) {
- ssize_t left = nread - i;
-
- if(left>= (ssize_t)(SMTP_EOB_LEN-smtpc->eob)) {
- if(!memcmp(SMTP_EOB+smtpc->eob, &data->req.upload_fromhere[i],
- SMTP_EOB_LEN-smtpc->eob)) {
- /* It matched, copy the replacement data to the target buffer
- instead. Note that the replacement does not contain the
- trailing CRLF but we instead continue to match on that one
- to deal with repeated sequences. Like CRLF.CRLF.CRLF etc
- */
- memcpy(&data->state.scratch[si], SMTP_EOB_REPL,
- SMTP_EOB_REPL_LEN);
- si+=SMTP_EOB_REPL_LEN-1; /* minus one since the for() increments
- it */
- i+=SMTP_EOB_LEN-smtpc->eob-1-2;
- smtpc->eob = 0; /* start over */
- continue;
- }
+ for(i = 0, si = 0; i < nread; i++) {
+ if(SMTP_EOB[smtp->eob] == data->req.upload_fromhere[i]) {
+ smtp->eob++;
+
+ /* Is the EOB potentially the terminating CRLF? */
+ if(2 == smtp->eob || SMTP_EOB_LEN == smtp->eob)
+ smtp->trailing_crlf = TRUE;
+ else
+ smtp->trailing_crlf = FALSE;
}
- else if(!memcmp(SMTP_EOB+smtpc->eob, &data->req.upload_fromhere[i],
- left)) {
- /* the last piece of the data matches the EOB so we can't send that
- until we know the rest of it */
- smtpc->eob += left;
- break;
+ 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;
+
+ /* Then compare the first byte */
+ if(SMTP_EOB[0] == data->req.upload_fromhere[i])
+ smtp->eob = 1;
+ else
+ smtp->eob = 0;
+
+ eob_sent = 0;
+
+ /* Reset the trailing CRLF flag as there was more data */
+ smtp->trailing_crlf = FALSE;
+ }
+
+ /* 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;
+ 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];
- } /* for() */
+ if(smtp->eob - eob_sent) {
+ /* 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;
+ }
+ /* Only use the new buffer if we replaced something */
if(si != nread) {
- /* only use the new buffer if we replaced something */
- nread = si;
+ /* Upload from the new (replaced) buffer instead */
+ data->req.upload_fromhere = scratch;
+
+ /* Save the buffer so it can be freed later */
+ data->state.scratch = scratch;
- /* upload from the new (replaced) buffer instead */
- data->req.upload_fromhere = data->state.scratch;
+ /* Free the old scratch buffer */
+ free(oldscratch);
- /* set the new amount too */
- data->req.upload_present = nread;
+ /* Set the new amount too */
+ data->req.upload_present = si;
}
+ else
+ free(newscratch);
+
return CURLE_OK;
}
diff --git a/lib/smtp.h b/lib/smtp.h
index 417fd52e..9fbe0c5b 100644
--- a/lib/smtp.h
+++ b/lib/smtp.h
@@ -1,5 +1,5 @@
-#ifndef __SMTP_H
-#define __SMTP_H
+#ifndef HEADER_CURL_SMTP_H
+#define HEADER_CURL_SMTP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2009 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2009 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,6 +23,7 @@
***************************************************************************/
#include "pingpong.h"
+#include "curl_sasl.h"
/****************************************************************************
* SMTP unique setup
@@ -34,50 +35,57 @@ typedef enum {
SMTP_EHLO,
SMTP_HELO,
SMTP_STARTTLS,
- SMTP_AUTHPLAIN,
- SMTP_AUTHLOGIN,
- SMTP_AUTHPASSWD,
- SMTP_AUTHCRAM,
+ SMTP_UPGRADETLS, /* asynchronously upgrade the connection to SSL/TLS
+ (multi mode only) */
SMTP_AUTH,
- SMTP_MAIL, /* MAIL FROM */
- SMTP_RCPT, /* RCPT TO */
+ SMTP_COMMAND, /* VRFY, EXPN, NOOP, RSET and HELP */
+ SMTP_MAIL, /* MAIL FROM */
+ SMTP_RCPT, /* RCPT TO */
SMTP_DATA,
SMTP_POSTDATA,
SMTP_QUIT,
- SMTP_LAST /* never used */
+ SMTP_LAST /* never used */
} smtpstate;
+/* This SMTP struct is used in the SessionHandle. All SMTP data that is
+ connection-oriented must be in smtp_conn to properly deal with the fact that
+ perhaps the SessionHandle is changed between the times the connection is
+ used. */
+struct SMTP {
+ curl_pp_transfer transfer;
+ char *custom; /* Custom Request */
+ struct curl_slist *rcpt; /* Recipient list */
+ size_t eob; /* Number of bytes of the EOB (End Of Body) that
+ have been received so far */
+ bool trailing_crlf; /* Specifies if the tailing CRLF is present */
+};
+
/* smtp_conn is used for struct connection-oriented data in the connectdata
struct */
struct smtp_conn {
struct pingpong pp;
- char *domain; /* what to send in the EHLO */
- size_t eob; /* number of bytes of the EOB (End Of Body) that has been
- received thus far */
- unsigned int authmechs; /* Accepted authentication methods. */
- smtpstate state; /* always use smtp.c:state() to change state! */
- struct curl_slist *rcpt;
+ smtpstate state; /* Always use smtp.c:state() to change state! */
+ bool ssldone; /* Is connect() over SSL done? */
+ char *domain; /* Client address/name to send in the EHLO */
+ struct SASL sasl; /* SASL-related storage */
+ bool tls_supported; /* StartTLS capability supported by server */
+ bool size_supported; /* If server supports SIZE extension according to
+ RFC 1870 */
+ bool auth_supported; /* AUTH capability supported by server */
};
-/* Authentication mechanism flags. */
-#define SMTP_AUTH_LOGIN 0x0001
-#define SMTP_AUTH_PLAIN 0x0002
-#define SMTP_AUTH_CRAM_MD5 0x0004
-#define SMTP_AUTH_DIGEST_MD5 0x0008
-#define SMTP_AUTH_GSSAPI 0x0010
-#define SMTP_AUTH_EXTERNAL 0x0020
-
extern const struct Curl_handler Curl_handler_smtp;
extern const struct Curl_handler Curl_handler_smtps;
/* this is the 5-bytes End-Of-Body marker for SMTP */
#define SMTP_EOB "\x0d\x0a\x2e\x0d\x0a"
#define SMTP_EOB_LEN 5
+#define SMTP_EOB_FIND_LEN 3
/* if found in data, replace it with this string instead */
#define SMTP_EOB_REPL "\x0d\x0a\x2e\x2e"
#define SMTP_EOB_REPL_LEN 4
-CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread);
+CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread);
-#endif /* __SMTP_H */
+#endif /* HEADER_CURL_SMTP_H */
diff --git a/lib/sockaddr.h b/lib/sockaddr.h
index c69411b5..6a2151c9 100644
--- a/lib/sockaddr.h
+++ b/lib/sockaddr.h
@@ -1,5 +1,5 @@
-#ifndef __SOCKADDR_H
-#define __SOCKADDR_H
+#ifndef HEADER_CURL_SOCKADDR_H
+#define HEADER_CURL_SOCKADDR_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -22,16 +22,22 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
struct Curl_sockaddr_storage {
- struct sockaddr_storage buffer;
-};
+ union {
+ struct sockaddr sa;
+ struct sockaddr_in sa_in;
+#ifdef ENABLE_IPV6
+ struct sockaddr_in6 sa_in6;
+#endif
+#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
+ struct sockaddr_storage sa_stor;
#else
-struct Curl_sockaddr_storage {
- char buffer[256]; /* this should be big enough to fit a lot */
-};
+ char cbuf[256]; /* this should be big enough to fit a lot */
#endif
+ } buffer;
+};
+
+#endif /* HEADER_CURL_SOCKADDR_H */
-#endif /* __SOCKADDR_H */
diff --git a/lib/socks.c b/lib/socks.c
index 7b5740be..7d3f782b 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,17 +20,10 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#if !defined(CURL_DISABLE_PROXY) || defined(USE_WINDOWS_SSPI)
-#include <string.h>
+#if !defined(CURL_DISABLE_PROXY)
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -60,28 +53,21 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */
curl_socket_t sockfd, /* read from this socket */
char *buf, /* store read data here */
ssize_t buffersize, /* max amount to read */
- ssize_t *n, /* amount bytes read */
- long conn_timeout) /* timeout for data wait
- relative to
- conn->created */
+ ssize_t *n) /* amount bytes read */
{
ssize_t nread;
ssize_t allread = 0;
int result;
- struct timeval tvnow;
- long conntime;
+ long timeleft;
*n = 0;
for(;;) {
- tvnow = Curl_tvnow();
- /* calculating how long connection is establishing */
- conntime = Curl_tvdiff(tvnow, conn->created);
- if(conntime > conn_timeout) {
+ timeleft = Curl_timeleft(conn->data, NULL, TRUE);
+ if(timeleft < 0) {
/* we already got the timeout */
result = CURLE_OPERATION_TIMEDOUT;
break;
}
- if(Curl_socket_ready(sockfd, CURL_SOCKET_BAD,
- (int)(conn_timeout - conntime)) <= 0) {
+ if(Curl_socket_ready(sockfd, CURL_SOCKET_BAD, timeleft) <= 0) {
result = ~CURLE_OK;
break;
}
@@ -133,19 +119,17 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
int result;
CURLcode code;
curl_socket_t sock = conn->sock[sockindex];
- long timeout;
struct SessionHandle *data = conn->data;
- /* get timeout */
- timeout = Curl_timeleft(conn, NULL, TRUE);
-
- if(timeout < 0) {
+ if(Curl_timeleft(data, NULL, TRUE) < 0) {
/* time-out, bail out, go home */
failf(data, "Connection time-out");
return CURLE_OPERATION_TIMEDOUT;
}
- curlx_nonblock(sock, FALSE);
+ (void)curlx_nonblock(sock, FALSE);
+
+ infof(data, "SOCKS4 communication to %s:%d\n", hostname, remote_port);
/*
* Compose socks4 request
@@ -160,10 +144,11 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
socksreq[0] = 4; /* version (SOCKS4) */
socksreq[1] = 1; /* connect */
- *((unsigned short*)&socksreq[2]) = htons((unsigned short)remote_port);
+ socksreq[2] = (unsigned char)((remote_port >> 8) & 0xff); /* PORT MSB */
+ socksreq[3] = (unsigned char)(remote_port & 0xff); /* PORT LSB */
/* DNS resolve only for SOCKS4, not SOCKS4a */
- if (!protocol4a) {
+ if(!protocol4a) {
struct Curl_dns_entry *dns;
Curl_addrinfo *hp=NULL;
int rc;
@@ -175,7 +160,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
if(rc == CURLRESOLV_PENDING)
/* ignores the return code, but 'dns' remains NULL on failure */
- (void)Curl_wait_for_resolv(conn, &dns);
+ (void)Curl_resolver_wait_resolv(conn, &dns);
/*
* We cannot use 'hostent' as a struct that Curl_resolv() returns. It
@@ -199,6 +184,8 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
else
hp = NULL; /* fail! */
+ infof(data, "SOCKS4 connect to %s (locally resolved)\n", buf);
+
Curl_resolv_unlock(data, dns); /* not used anymore from now on */
}
@@ -213,8 +200,15 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
* This is currently not supporting "Identification Protocol (RFC1413)".
*/
socksreq[8] = 0; /* ensure empty userid is NUL-terminated */
- if(proxy_name)
- strlcat((char*)socksreq + 8, proxy_name, sizeof(socksreq) - 8);
+ if(proxy_name) {
+ size_t plen = strlen(proxy_name);
+ if(plen >= sizeof(socksreq) - 8) {
+ failf(data, "Too long SOCKS proxy name, can't use!\n");
+ return CURLE_COULDNT_CONNECT;
+ }
+ /* copy the proxy name WITH trailing zero */
+ memcpy(socksreq + 8, proxy_name, plen+1);
+ }
/*
* Make connection
@@ -227,14 +221,14 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
(int)strlen((char*)socksreq + 8); /* size including NUL */
/* If SOCKS4a, set special invalid IP address 0.0.0.x */
- if (protocol4a) {
+ if(protocol4a) {
socksreq[4] = 0;
socksreq[5] = 0;
socksreq[6] = 0;
socksreq[7] = 1;
/* If still enough room in buffer, also append hostname */
hostnamelen = (ssize_t)strlen(hostname) + 1; /* length including NUL */
- if (packetsize + hostnamelen <= SOCKS4REQLEN)
+ if(packetsize + hostnamelen <= SOCKS4REQLEN)
strcpy((char*)socksreq + packetsize, hostname);
else
hostnamelen = 0; /* Flag: hostname did not fit in buffer */
@@ -244,16 +238,16 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
code = Curl_write_plain(conn, sock, (char *)socksreq,
packetsize + hostnamelen,
&written);
- if((code != CURLE_OK) || (written != packetsize + hostnamelen)) {
+ if(code || (written != packetsize + hostnamelen)) {
failf(data, "Failed to send SOCKS4 connect request.");
return CURLE_COULDNT_CONNECT;
}
- if (protocol4a && hostnamelen == 0) {
+ if(protocol4a && hostnamelen == 0) {
/* SOCKS4a with very long hostname - send that name separately */
hostnamelen = (ssize_t)strlen(hostname) + 1;
code = Curl_write_plain(conn, sock, (char *)hostname, hostnamelen,
&written);
- if((code != CURLE_OK) || (written != hostnamelen)) {
+ if(code || (written != hostnamelen)) {
failf(data, "Failed to send SOCKS4 connect request.");
return CURLE_COULDNT_CONNECT;
}
@@ -263,8 +257,8 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
/* Receive response */
result = Curl_blockread_all(conn, sock, (char *)socksreq, packetsize,
- &actualread, timeout);
- if((result != CURLE_OK) || (actualread != packetsize)) {
+ &actualread);
+ if(result || (actualread != packetsize)) {
failf(data, "Failed to receive SOCKS4 connect request ack.");
return CURLE_COULDNT_CONNECT;
}
@@ -296,13 +290,9 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
}
/* Result */
- switch(socksreq[1])
- {
+ switch(socksreq[1]) {
case 90:
- if (protocol4a)
- infof(data, "SOCKS4a request granted.\n");
- else
- infof(data, "SOCKS4 request granted.\n");
+ infof(data, "SOCKS4%s request granted.\n", protocol4a?"a":"");
break;
case 91:
failf(data,
@@ -310,7 +300,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
", request rejected or failed.",
(unsigned char)socksreq[4], (unsigned char)socksreq[5],
(unsigned char)socksreq[6], (unsigned char)socksreq[7],
- (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+ ((socksreq[8] << 8) | socksreq[9]),
socksreq[1]);
return CURLE_COULDNT_CONNECT;
case 92:
@@ -320,7 +310,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
"identd on the client.",
(unsigned char)socksreq[4], (unsigned char)socksreq[5],
(unsigned char)socksreq[6], (unsigned char)socksreq[7],
- (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+ ((socksreq[8] << 8) | socksreq[9]),
socksreq[1]);
return CURLE_COULDNT_CONNECT;
case 93:
@@ -330,7 +320,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
"report different user-ids.",
(unsigned char)socksreq[4], (unsigned char)socksreq[5],
(unsigned char)socksreq[6], (unsigned char)socksreq[7],
- (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+ ((socksreq[8] << 8) | socksreq[9]),
socksreq[1]);
return CURLE_COULDNT_CONNECT;
default:
@@ -339,13 +329,13 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
", Unknown.",
(unsigned char)socksreq[4], (unsigned char)socksreq[5],
(unsigned char)socksreq[6], (unsigned char)socksreq[7],
- (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+ ((socksreq[8] << 8) | socksreq[9]),
socksreq[1]);
return CURLE_COULDNT_CONNECT;
}
}
- curlx_nonblock(sock, TRUE);
+ (void)curlx_nonblock(sock, TRUE);
return CURLE_OK; /* Proxy was successful! */
}
@@ -386,20 +376,19 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
curl_socket_t sock = conn->sock[sockindex];
struct SessionHandle *data = conn->data;
long timeout;
- bool socks5_resolve_local = (bool)(data->set.proxytype == CURLPROXY_SOCKS5);
+ bool socks5_resolve_local = (conn->proxytype == CURLPROXY_SOCKS5)?TRUE:FALSE;
const size_t hostname_len = strlen(hostname);
- ssize_t packetsize = 0;
+ ssize_t len = 0;
/* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
- if(!socks5_resolve_local && hostname_len > 255)
- {
- infof(conn->data,"SOCKS5: server resolving disabled for hostnames of "
+ if(!socks5_resolve_local && hostname_len > 255) {
+ infof(conn->data, "SOCKS5: server resolving disabled for hostnames of "
"length > 255 [actual len=%zu]\n", hostname_len);
socks5_resolve_local = TRUE;
}
/* get timeout */
- timeout = Curl_timeleft(conn, NULL, TRUE);
+ timeout = Curl_timeleft(data, NULL, TRUE);
if(timeout < 0) {
/* time-out, bail out, go home */
@@ -407,10 +396,10 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
return CURLE_OPERATION_TIMEDOUT;
}
- curlx_nonblock(sock, TRUE);
+ (void)curlx_nonblock(sock, TRUE);
/* wait until socket gets connected */
- result = Curl_socket_ready(CURL_SOCKET_BAD, sock, (int)timeout);
+ result = Curl_socket_ready(CURL_SOCKET_BAD, sock, timeout);
if(-1 == result) {
failf(conn->data, "SOCKS5: no connection here");
@@ -422,7 +411,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
}
if(result & CURL_CSELECT_ERR) {
- failf(conn->data, "SOCKS5: error occured during connection");
+ failf(conn->data, "SOCKS5: error occurred during connection");
return CURLE_COULDNT_CONNECT;
}
@@ -430,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; /* gssapi */
+ socksreq[3] = 1; /* GSS-API */
socksreq[4] = 2; /* username/password */
#else
socksreq[1] = (char)(proxy_name ? 2 : 1); /* number of methods (below) */
@@ -438,18 +427,18 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
socksreq[3] = 2; /* username/password */
#endif
- curlx_nonblock(sock, FALSE);
+ (void)curlx_nonblock(sock, FALSE);
code = Curl_write_plain(conn, sock, (char *)socksreq, (2 + (int)socksreq[1]),
&written);
- if((code != CURLE_OK) || (written != (2 + (int)socksreq[1]))) {
+ if(code || (written != (2 + (int)socksreq[1]))) {
failf(data, "Unable to send initial SOCKS5 request.");
return CURLE_COULDNT_CONNECT;
}
- curlx_nonblock(sock, TRUE);
+ (void)curlx_nonblock(sock, TRUE);
- result = Curl_socket_ready(sock, CURL_SOCKET_BAD, (int)timeout);
+ result = Curl_socket_ready(sock, CURL_SOCKET_BAD, timeout);
if(-1 == result) {
failf(conn->data, "SOCKS5 nothing to read");
@@ -461,15 +450,14 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
}
if(result & CURL_CSELECT_ERR) {
- failf(conn->data, "SOCKS5 read error occured");
+ failf(conn->data, "SOCKS5 read error occurred");
return CURLE_RECV_ERROR;
}
- curlx_nonblock(sock, FALSE);
+ (void)curlx_nonblock(sock, FALSE);
- result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread,
- timeout);
- if((result != CURLE_OK) || (actualread != 2)) {
+ result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread);
+ if(result || (actualread != 2)) {
failf(data, "Unable to receive initial SOCKS5 response.");
return CURLE_COULDNT_CONNECT;
}
@@ -485,23 +473,22 @@ 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 != CURLE_OK) {
- failf(data, "Unable to negotiate SOCKS5 gssapi context.");
+ if(code) {
+ failf(data, "Unable to negotiate SOCKS5 GSS-API context.");
return CURLE_COULDNT_CONNECT;
}
}
#endif
else if(socksreq[1] == 2) {
/* Needs user name and password */
- size_t userlen, pwlen;
- int len;
+ size_t proxy_name_len, proxy_password_len;
if(proxy_name && proxy_password) {
- userlen = strlen(proxy_name);
- pwlen = strlen(proxy_password);
+ proxy_name_len = strlen(proxy_name);
+ proxy_password_len = strlen(proxy_password);
}
else {
- userlen = 0;
- pwlen = 0;
+ proxy_name_len = 0;
+ proxy_password_len = 0;
}
/* username/password request looks like
@@ -513,24 +500,23 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
*/
len = 0;
socksreq[len++] = 1; /* username/pw subnegotiation version */
- socksreq[len++] = (unsigned char) userlen;
- if(proxy_name && userlen)
- memcpy(socksreq + len, proxy_name, userlen);
- len += (int)userlen;
- socksreq[len++] = (unsigned char) pwlen;
- if(proxy_password && pwlen)
- memcpy(socksreq + len, proxy_password, pwlen);
- len += (int)pwlen;
+ socksreq[len++] = (unsigned char) proxy_name_len;
+ if(proxy_name && proxy_name_len)
+ memcpy(socksreq + len, proxy_name, proxy_name_len);
+ len += proxy_name_len;
+ socksreq[len++] = (unsigned char) proxy_password_len;
+ if(proxy_password && proxy_password_len)
+ memcpy(socksreq + len, proxy_password, proxy_password_len);
+ len += proxy_password_len;
code = Curl_write_plain(conn, sock, (char *)socksreq, len, &written);
- if((code != CURLE_OK) || (len != written)) {
+ if(code || (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,
- timeout);
- if((result != CURLE_OK) || (actualread != 2)) {
+ result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread);
+ if(result || (actualread != 2)) {
failf(data, "Unable to receive SOCKS5 sub-negotiation response.");
return CURLE_COULDNT_CONNECT;
}
@@ -575,36 +561,29 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
}
/* Authentication is complete, now specify destination to the proxy */
- socksreq[0] = 5; /* version (SOCKS5) */
- socksreq[1] = 1; /* connect */
- socksreq[2] = 0; /* must be zero */
+ len = 0;
+ socksreq[len++] = 5; /* version (SOCKS5) */
+ socksreq[len++] = 1; /* connect */
+ socksreq[len++] = 0; /* must be zero */
if(!socks5_resolve_local) {
- packetsize = (ssize_t)(5 + hostname_len + 2);
-
- socksreq[3] = 3; /* ATYP: domain name = 3 */
- socksreq[4] = (char) hostname_len; /* address length */
- memcpy(&socksreq[5], hostname, hostname_len); /* address bytes w/o NULL */
-
- *((unsigned short*)&socksreq[hostname_len+5]) =
- htons((unsigned short)remote_port);
+ socksreq[len++] = 3; /* ATYP: domain name = 3 */
+ socksreq[len++] = (char) hostname_len; /* address length */
+ memcpy(&socksreq[len], hostname, hostname_len); /* address str w/o NULL */
+ len += hostname_len;
}
else {
struct Curl_dns_entry *dns;
- Curl_addrinfo *hp=NULL;
+ Curl_addrinfo *hp = NULL;
int rc = Curl_resolv(conn, hostname, remote_port, &dns);
- packetsize = 10;
-
- socksreq[3] = 1; /* IPv4 = 1 */
-
if(rc == CURLRESOLV_ERROR)
return CURLE_COULDNT_RESOLVE_HOST;
if(rc == CURLRESOLV_PENDING) {
/* this requires that we're in "wait for resolve" state */
- code = Curl_wait_for_resolv(conn, &dns);
- if(code != CURLE_OK)
+ code = Curl_resolver_wait_resolv(conn, &dns);
+ if(code)
return code;
}
@@ -615,17 +594,31 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
if(dns)
hp=dns->addr;
if(hp) {
- char buf[64];
- unsigned short ip[4];
- Curl_printable_address(hp, buf, sizeof(buf));
+ struct sockaddr_in *saddr_in;
+#ifdef ENABLE_IPV6
+ struct sockaddr_in6 *saddr_in6;
+#endif
+ int i;
- if(4 == sscanf( buf, "%hu.%hu.%hu.%hu",
- &ip[0], &ip[1], &ip[2], &ip[3])) {
- socksreq[4] = (unsigned char)ip[0];
- socksreq[5] = (unsigned char)ip[1];
- socksreq[6] = (unsigned char)ip[2];
- socksreq[7] = (unsigned char)ip[3];
+ if(hp->ai_family == AF_INET) {
+ socksreq[len++] = 1; /* ATYP: IPv4 = 1 */
+
+ saddr_in = (struct sockaddr_in*)hp->ai_addr;
+ for(i = 0; i < 4; i++) {
+ socksreq[len++] = ((unsigned char*)&saddr_in->sin_addr.s_addr)[i];
+ infof(data, "%d\n", socksreq[len-1]);
+ }
}
+#ifdef ENABLE_IPV6
+ else if(hp->ai_family == AF_INET6) {
+ socksreq[len++] = 4; /* ATYP: IPv6 = 4 */
+
+ saddr_in6 = (struct sockaddr_in6*)hp->ai_addr;
+ for(i = 0; i < 16; i++) {
+ socksreq[len++] = ((unsigned char*)&saddr_in6->sin6_addr.s6_addr)[i];
+ }
+ }
+#endif
else
hp = NULL; /* fail! */
@@ -636,31 +629,36 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
hostname);
return CURLE_COULDNT_RESOLVE_HOST;
}
-
- *((unsigned short*)&socksreq[8]) = htons((unsigned short)remote_port);
}
+ socksreq[len++] = (unsigned char)((remote_port >> 8) & 0xff); /* PORT MSB */
+ socksreq[len++] = (unsigned char)(remote_port & 0xff); /* PORT LSB */
+
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
if(conn->socks5_gssapi_enctype) {
- failf(data, "SOCKS5 gssapi protection not yet implemented.");
- } else
+ failf(data, "SOCKS5 GSS-API protection not yet implemented.");
+ }
+ else
#endif
- code = Curl_write_plain(conn, sock, (char *)socksreq, packetsize, &written);
- if((code != CURLE_OK) || (written != packetsize)) {
+ code = Curl_write_plain(conn, sock, (char *)socksreq, len, &written);
+
+ if(code || (len != written)) {
failf(data, "Failed to send SOCKS5 connect request.");
return CURLE_COULDNT_CONNECT;
}
- packetsize = 10; /* minimum packet size is 10 */
+ len = 10; /* minimum packet size is 10 */
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
if(conn->socks5_gssapi_enctype) {
- failf(data, "SOCKS5 gssapi protection not yet implemented.");
- } else
+ failf(data, "SOCKS5 GSS-API protection not yet implemented.");
+ }
+ else
#endif
- result = Curl_blockread_all(conn, sock, (char *)socksreq, packetsize,
- &actualread, timeout);
- if((result != CURLE_OK) || (actualread != packetsize)) {
+ result = Curl_blockread_all(conn, sock, (char *)socksreq,
+ len, &actualread);
+
+ if(result || (len != actualread)) {
failf(data, "Failed to receive SOCKS5 connect request ack.");
return CURLE_COULDNT_CONNECT;
}
@@ -671,13 +669,37 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
return CURLE_COULDNT_CONNECT;
}
if(socksreq[1] != 0) { /* Anything besides 0 is an error */
+ if(socksreq[3] == 1) {
failf(data,
"Can't complete SOCKS5 connection to %d.%d.%d.%d:%d. (%d)",
(unsigned char)socksreq[4], (unsigned char)socksreq[5],
(unsigned char)socksreq[6], (unsigned char)socksreq[7],
- (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+ ((socksreq[8] << 8) | socksreq[9]),
socksreq[1]);
- return CURLE_COULDNT_CONNECT;
+ }
+ else if(socksreq[3] == 3) {
+ failf(data,
+ "Can't complete SOCKS5 connection to %s:%d. (%d)",
+ hostname,
+ ((socksreq[8] << 8) | socksreq[9]),
+ socksreq[1]);
+ }
+ else if(socksreq[3] == 4) {
+ failf(data,
+ "Can't complete SOCKS5 connection to %02x%02x:%02x%02x:"
+ "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%d. (%d)",
+ (unsigned char)socksreq[4], (unsigned char)socksreq[5],
+ (unsigned char)socksreq[6], (unsigned char)socksreq[7],
+ (unsigned char)socksreq[8], (unsigned char)socksreq[9],
+ (unsigned char)socksreq[10], (unsigned char)socksreq[11],
+ (unsigned char)socksreq[12], (unsigned char)socksreq[13],
+ (unsigned char)socksreq[14], (unsigned char)socksreq[15],
+ (unsigned char)socksreq[16], (unsigned char)socksreq[17],
+ (unsigned char)socksreq[18], (unsigned char)socksreq[19],
+ ((socksreq[8] << 8) | socksreq[9]),
+ socksreq[1]);
+ }
+ return CURLE_COULDNT_CONNECT;
}
/* Fix: in general, returned BND.ADDR is variable length parameter by RFC
@@ -700,11 +722,11 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
if(socksreq[3] == 3) {
/* domain name */
int addrlen = (int) socksreq[4];
- packetsize = 5 + addrlen + 2;
+ len = 5 + addrlen + 2;
}
else if(socksreq[3] == 4) {
/* IPv6 */
- packetsize = 4 + 16 + 2;
+ len = 4 + 16 + 2;
}
/* At this point we already read first 10 bytes */
@@ -712,11 +734,11 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
if(!conn->socks5_gssapi_enctype) {
/* decrypt_gssapi_blockread already read the whole packet */
#endif
- if(packetsize > 10) {
- packetsize -= 10;
+ if(len > 10) {
+ len -= 10;
result = Curl_blockread_all(conn, sock, (char *)&socksreq[10],
- packetsize, &actualread, timeout);
- if((result != CURLE_OK) || (actualread != packetsize)) {
+ len, &actualread);
+ if(result || (len != actualread)) {
failf(data, "Failed to receive SOCKS5 connect request ack.");
return CURLE_COULDNT_CONNECT;
}
@@ -725,7 +747,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
}
#endif
- curlx_nonblock(sock, TRUE);
+ (void)curlx_nonblock(sock, TRUE);
return CURLE_OK; /* Proxy was successful! */
}
diff --git a/lib/socks.h b/lib/socks.h
index 2bea66bf..29e3bf03 100644
--- a/lib/socks.h
+++ b/lib/socks.h
@@ -1,5 +1,5 @@
-#ifndef __SOCKS_H
-#define __SOCKS_H
+#ifndef HEADER_CURL_SOCKS_H
+#define HEADER_CURL_SOCKS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -22,6 +22,12 @@
*
***************************************************************************/
+#include "curl_setup.h"
+
+#ifdef CURL_DISABLE_PROXY
+#define Curl_SOCKS4(a,b,c,d,e,f) CURLE_NOT_BUILT_IN
+#define Curl_SOCKS5(a,b,c,d,e,f) CURLE_NOT_BUILT_IN
+#else
/*
* Helper read-from-socket functions. Does the same as Curl_read() but it
* blocks until all bytes amount of buffersize will be read. No more, no less.
@@ -33,8 +39,7 @@ int Curl_blockread_all(struct connectdata *conn,
curl_socket_t sockfd,
char *buf,
ssize_t buffersize,
- ssize_t *n,
- long conn_timeout);
+ ssize_t *n);
/*
* This function logs in to a SOCKS4(a) proxy and sends the specifics to the
@@ -60,10 +65,13 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
/*
- * This function handles the sockss5 gssapie negotiation and initialisation
+ * This function handles the SOCKS5 GSS-API negotiation and initialisation
*/
CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
struct connectdata *conn);
#endif
-#endif /* __SOCKS_H */
+#endif /* CURL_DISABLE_PROXY */
+
+#endif /* HEADER_CURL_SOCKS_H */
+
diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c
index 1ff6f601..8e575c27 100644
--- a/lib/socks_gssapi.c
+++ b/lib/socks_gssapi.c
@@ -5,7 +5,8 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2009, Markus Moeller, <markus_moeller@compuserve.com>
+ * Copyright (C) 2009, 2011, Markus Moeller, <markus_moeller@compuserve.com>
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,40 +21,26 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
-#ifndef CURL_DISABLE_PROXY
-
-#ifdef HAVE_GSSAPI
-#ifdef HAVE_OLD_GSSMIT
-#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
-#endif
-#ifndef gss_nt_service_name
-#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
-#endif
-#include <string.h>
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_PROXY)
+#include "curl_gssapi.h"
#include "urldata.h"
#include "sendf.h"
#include "connect.h"
#include "timeval.h"
#include "socks.h"
-
-static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "warnless.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
+static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
+
/*
- * Helper gssapi error functions.
+ * Helper GSS-API error functions.
*/
static int check_gss_err(struct SessionHandle *data,
OM_uint32 major_status,
@@ -61,7 +48,7 @@ static int check_gss_err(struct SessionHandle *data,
const char* function)
{
if(GSS_ERROR(major_status)) {
- OM_uint32 maj_stat,min_stat;
+ OM_uint32 maj_stat, min_stat;
OM_uint32 msg_ctx = 0;
gss_buffer_desc status_string;
char buf[1024];
@@ -97,20 +84,18 @@ static int check_gss_err(struct SessionHandle *data,
GSS_C_NULL_OID,
&msg_ctx, &status_string);
if(maj_stat == GSS_S_COMPLETE) {
- if(sizeof(buf) > len + status_string.length) {
+ if(sizeof(buf) > len + status_string.length)
strcpy(buf+len, (char*) status_string.value);
- len += status_string.length;
- }
gss_release_buffer(&min_stat, &status_string);
break;
}
gss_release_buffer(&min_stat, &status_string);
}
- failf(data, "GSSAPI error: %s failed:\n%s\n", function, buf);
- return(1);
+ failf(data, "GSS-API error: %s failed:\n%s", function, buf);
+ return 1;
}
- return(0);
+ return 0;
}
CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
@@ -122,7 +107,6 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
ssize_t actualread;
ssize_t written;
int result;
- long timeout;
OM_uint32 gss_major_status, gss_minor_status, gss_status;
OM_uint32 gss_ret_flags;
int gss_conf_state, gss_enc;
@@ -133,15 +117,12 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
gss_buffer_desc* gss_token = GSS_C_NO_BUFFER;
gss_name_t server = GSS_C_NO_NAME;
gss_name_t gss_client_name = GSS_C_NO_NAME;
- u_short us_length;
+ unsigned short us_length;
char *user=NULL;
- unsigned char socksreq[4]; /* room for gssapi exchange header only */
+ unsigned char socksreq[4]; /* room for GSS-API exchange header only */
char *serviceptr = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
- /* get timeout */
- timeout = Curl_timeleft(conn, NULL, TRUE);
-
- /* GSSAPI request looks like
+ /* GSS-API request looks like
* +----+------+-----+----------------+
* |VER | MTYP | LEN | TOKEN |
* +----+------+----------------------+
@@ -150,7 +131,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
*/
/* prepare service name */
- if (strchr(serviceptr,'/')) {
+ if(strchr(serviceptr, '/')) {
service.value = malloc(strlen(serviceptr));
if(!service.value)
return CURLE_OUT_OF_MEMORY;
@@ -169,13 +150,13 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
serviceptr, conn->proxy.name);
gss_major_status = gss_import_name(&gss_minor_status, &service,
- gss_nt_service_name, &server);
+ GSS_C_NT_HOSTBASED_SERVICE, &server);
}
gss_release_buffer(&gss_status, &service); /* clear allocated memory */
- if(check_gss_err(data,gss_major_status,
- gss_minor_status,"gss_import_name()")) {
+ if(check_gss_err(data, gss_major_status,
+ gss_minor_status, "gss_import_name()")) {
failf(data, "Failed to create service name.");
gss_release_name(&gss_status, &server);
return CURLE_COULDNT_CONNECT;
@@ -184,41 +165,38 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
/* As long as we need to keep sending some context info, and there's no */
/* errors, keep sending it... */
for(;;) {
- gss_major_status = gss_init_sec_context(&gss_minor_status,
- GSS_C_NO_CREDENTIAL,
- &gss_context, server,
- GSS_C_NULL_OID,
- GSS_C_MUTUAL_FLAG |
- GSS_C_REPLAY_FLAG,
- 0,
- NULL,
- gss_token,
- NULL,
- &gss_send_token,
- &gss_ret_flags,
- NULL);
+ gss_major_status = Curl_gss_init_sec_context(data,
+ &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)
gss_release_buffer(&gss_status, &gss_recv_token);
- if(check_gss_err(data,gss_major_status,
- gss_minor_status,"gss_init_sec_context")) {
+ if(check_gss_err(data, gss_major_status,
+ gss_minor_status, "gss_init_sec_context")) {
gss_release_name(&gss_status, &server);
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 GSSAPI token.");
+ failf(data, "Failed to initial GSS-API token.");
return CURLE_COULDNT_CONNECT;
}
if(gss_send_token.length != 0) {
- socksreq[0] = 1; /* gssapi subnegotiation version */
+ socksreq[0] = 1; /* GSS-API subnegotiation version */
socksreq[1] = 1; /* authentication message type */
us_length = htons((short)gss_send_token.length);
- memcpy(socksreq+2,&us_length,sizeof(short));
+ memcpy(socksreq+2, &us_length, sizeof(short));
code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
- if((code != CURLE_OK) || (4 != written)) {
- failf(data, "Failed to send GSSAPI authentication request.");
+ if(code || (4 != written)) {
+ failf(data, "Failed to send GSS-API authentication request.");
gss_release_name(&gss_status, &server);
gss_release_buffer(&gss_status, &gss_recv_token);
gss_release_buffer(&gss_status, &gss_send_token);
@@ -229,8 +207,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 != CURLE_OK) || ((ssize_t)gss_send_token.length != written)) {
- failf(data, "Failed to send GSSAPI authentication token.");
+ if(code || ((ssize_t)gss_send_token.length != written)) {
+ failf(data, "Failed to send GSS-API authentication token.");
gss_release_name(&gss_status, &server);
gss_release_buffer(&gss_status, &gss_recv_token);
gss_release_buffer(&gss_status, &gss_send_token);
@@ -246,7 +224,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
/* analyse response */
- /* GSSAPI response looks like
+ /* GSS-API response looks like
* +----+------+-----+----------------+
* |VER | MTYP | LEN | TOKEN |
* +----+------+----------------------+
@@ -254,10 +232,9 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
* +----+------+-----+----------------+
*/
- result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
- &actualread, timeout);
- if(result != CURLE_OK || actualread != 4) {
- failf(data, "Failed to receive GSSAPI authentication response.");
+ result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
+ if(result || (actualread != 4)) {
+ failf(data, "Failed to receive GSS-API authentication response.");
gss_release_name(&gss_status, &server);
gss_delete_sec_context(&gss_status, &gss_context, NULL);
return CURLE_COULDNT_CONNECT;
@@ -273,7 +250,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
}
if(socksreq[1] != 1) { /* status / messgae type */
- failf(data, "Invalid GSSAPI authentication response type (%d %d).",
+ failf(data, "Invalid GSS-API authentication response type (%d %d).",
socksreq[0], socksreq[1]);
gss_release_name(&gss_status, &server);
gss_delete_sec_context(&gss_status, &gss_context, NULL);
@@ -287,7 +264,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 GSSAPI authentication "
+ "Could not allocate memory for GSS-API authentication "
"response token.");
gss_release_name(&gss_status, &server);
gss_delete_sec_context(&gss_status, &gss_context, NULL);
@@ -295,11 +272,10 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
}
result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value,
- gss_recv_token.length,
- &actualread, timeout);
+ gss_recv_token.length, &actualread);
- if(result != CURLE_OK || actualread != us_length) {
- failf(data, "Failed to receive GSSAPI authentication token.");
+ if(result || (actualread != us_length)) {
+ failf(data, "Failed to receive GSS-API 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);
@@ -315,8 +291,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
gss_major_status = gss_inquire_context (&gss_minor_status, gss_context,
&gss_client_name, NULL, NULL, NULL,
NULL, NULL, NULL);
- if(check_gss_err(data,gss_major_status,
- gss_minor_status,"gss_inquire_context")) {
+ if(check_gss_err(data, gss_major_status,
+ gss_minor_status, "gss_inquire_context")) {
gss_delete_sec_context(&gss_status, &gss_context, NULL);
gss_release_name(&gss_status, &gss_client_name);
failf(data, "Failed to determine user name.");
@@ -324,8 +300,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
}
gss_major_status = gss_display_name(&gss_minor_status, gss_client_name,
&gss_send_token, NULL);
- if(check_gss_err(data,gss_major_status,
- gss_minor_status,"gss_display_name")) {
+ if(check_gss_err(data, gss_major_status,
+ gss_minor_status, "gss_display_name")) {
gss_delete_sec_context(&gss_status, &gss_context, NULL);
gss_release_name(&gss_status, &gss_client_name);
gss_release_buffer(&gss_status, &gss_send_token);
@@ -344,12 +320,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 gssapi.\n",user);
+ infof(data, "SOCKS5 server authencticated user %s with GSS-API.\n",user);
free(user);
user=NULL;
/* Do encryption */
- socksreq[0] = 1; /* gssapi subnegotiation version */
+ socksreq[0] = 1; /* GSS-API subnegotiation version */
socksreq[1] = 2; /* encryption message type */
gss_enc = 0; /* no data protection */
@@ -360,7 +336,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 gssapi %s data protection.\n",
+ infof(data, "SOCKS5 server supports GSS-API %s data protection.\n",
(gss_enc==0)?"no":((gss_enc==1)?"integrity":"confidentiality"));
/* force for the moment to no data protection */
gss_enc = 0;
@@ -396,7 +372,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
*/
if(data->set.socks5_gssapi_nec) {
us_length = htons((short)1);
- memcpy(socksreq+2,&us_length,sizeof(short));
+ memcpy(socksreq+2, &us_length, sizeof(short));
}
else {
gss_send_token.length = 1;
@@ -411,22 +387,22 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
GSS_C_QOP_DEFAULT, &gss_send_token,
&gss_conf_state, &gss_w_token);
- if(check_gss_err(data,gss_major_status,gss_minor_status,"gss_wrap")) {
+ if(check_gss_err(data, gss_major_status, gss_minor_status, "gss_wrap")) {
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 GSSAPI encryption value into token.");
+ failf(data, "Failed to wrap GSS-API encryption value into token.");
return CURLE_COULDNT_CONNECT;
}
gss_release_buffer(&gss_status, &gss_send_token);
us_length = htons((short)gss_w_token.length);
- memcpy(socksreq+2,&us_length,sizeof(short));
+ memcpy(socksreq+2, &us_length, sizeof(short));
}
code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
- if((code != CURLE_OK) || (4 != written)) {
- failf(data, "Failed to send GSSAPI encryption request.");
+ if(code || (4 != written)) {
+ failf(data, "Failed to send GSS-API encryption request.");
gss_release_buffer(&gss_status, &gss_w_token);
gss_delete_sec_context(&gss_status, &gss_context, NULL);
return CURLE_COULDNT_CONNECT;
@@ -435,16 +411,17 @@ 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 != CURLE_OK) || ( 1 != written)) {
- failf(data, "Failed to send GSSAPI encryption type.");
+ if(code || ( 1 != written)) {
+ failf(data, "Failed to send GSS-API encryption type.");
gss_delete_sec_context(&gss_status, &gss_context, NULL);
return CURLE_COULDNT_CONNECT;
}
- } else {
+ }
+ else {
code = Curl_write_plain(conn, sock, (char *)gss_w_token.value,
gss_w_token.length, &written);
- if((code != CURLE_OK) || ((ssize_t)gss_w_token.length != written)) {
- failf(data, "Failed to send GSSAPI encryption type.");
+ if(code || ((ssize_t)gss_w_token.length != written)) {
+ failf(data, "Failed to send GSS-API encryption type.");
gss_release_buffer(&gss_status, &gss_w_token);
gss_delete_sec_context(&gss_status, &gss_context, NULL);
return CURLE_COULDNT_CONNECT;
@@ -452,10 +429,9 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
gss_release_buffer(&gss_status, &gss_w_token);
}
- result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
- &actualread, timeout);
- if(result != CURLE_OK || actualread != 4) {
- failf(data, "Failed to receive GSSAPI encryption response.");
+ result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
+ if(result || (actualread != 4)) {
+ failf(data, "Failed to receive GSS-API encryption response.");
gss_delete_sec_context(&gss_status, &gss_context, NULL);
return CURLE_COULDNT_CONNECT;
}
@@ -469,7 +445,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
}
if(socksreq[1] != 2) { /* status / messgae type */
- failf(data, "Invalid GSSAPI encryption response type (%d %d).",
+ failf(data, "Invalid GSS-API encryption response type (%d %d).",
socksreq[0], socksreq[1]);
gss_delete_sec_context(&gss_status, &gss_context, NULL);
return CURLE_COULDNT_CONNECT;
@@ -485,11 +461,10 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
return CURLE_OUT_OF_MEMORY;
}
result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value,
- gss_recv_token.length,
- &actualread, timeout);
+ gss_recv_token.length, &actualread);
- if(result != CURLE_OK || actualread != us_length) {
- failf(data, "Failed to receive GSSAPI encryptrion type.");
+ if(result || (actualread != us_length)) {
+ failf(data, "Failed to receive GSS-API encryptrion type.");
gss_release_buffer(&gss_status, &gss_recv_token);
gss_delete_sec_context(&gss_status, &gss_context, NULL);
return CURLE_COULDNT_CONNECT;
@@ -500,42 +475,42 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
&gss_recv_token, &gss_w_token,
0, GSS_C_QOP_DEFAULT);
- if(check_gss_err(data,gss_major_status,gss_minor_status,"gss_unwrap")) {
+ if(check_gss_err(data, gss_major_status, gss_minor_status, "gss_unwrap")) {
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 GSSAPI encryption value into token.");
+ failf(data, "Failed to unwrap GSS-API 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 GSSAPI encryption response length (%d).",
+ failf(data, "Invalid GSS-API 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);
return CURLE_COULDNT_CONNECT;
}
- memcpy(socksreq,gss_w_token.value,gss_w_token.length);
+ memcpy(socksreq, gss_w_token.value, gss_w_token.length);
gss_release_buffer(&gss_status, &gss_w_token);
}
else {
if(gss_recv_token.length != 1) {
- failf(data, "Invalid GSSAPI encryption response length (%d).",
+ failf(data, "Invalid GSS-API 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);
return CURLE_COULDNT_CONNECT;
}
- memcpy(socksreq,gss_recv_token.value,gss_recv_token.length);
+ memcpy(socksreq, gss_recv_token.value, gss_recv_token.length);
gss_release_buffer(&gss_status, &gss_recv_token);
}
infof(data, "SOCKS5 access with%s protection granted.\n",
- (socksreq[0]==0)?"out gssapi data":
- ((socksreq[0]==1)?" gssapi integrity":" gssapi confidentiality"));
+ (socksreq[0]==0)?"out GSS-API data":
+ ((socksreq[0]==1)?" GSS-API integrity":" GSS-API confidentiality"));
conn->socks5_gssapi_enctype = socksreq[0];
if(socksreq[0] == 0)
@@ -543,6 +518,5 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
return CURLE_OK;
}
-#endif
-#endif /* CURL_DISABLE_PROXY */
+#endif /* HAVE_GSSAPI && !CURL_DISABLE_PROXY */
diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c
index e9fd551c..a7708b2d 100644
--- a/lib/socks_sspi.c
+++ b/lib/socks_sspi.c
@@ -5,7 +5,8 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2009, Markus Moeller, <markus_moeller@compuserve.com>
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2009, 2011, Markus Moeller, <markus_moeller@compuserve.com>
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,137 +21,37 @@
*
***************************************************************************/
+#include "curl_setup.h"
-#include "setup.h"
-
-#ifdef USE_WINDOWS_SSPI
-
-#include <string.h>
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_PROXY)
#include "urldata.h"
#include "sendf.h"
#include "connect.h"
+#include "strerror.h"
#include "timeval.h"
#include "socks.h"
#include "curl_sspi.h"
-
-#define _MPRINTF_REPLACE /* use the internal *printf() functions */
-#include <curl/mprintf.h>
-
+#include "curl_multibyte.h"
+#include "warnless.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#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 SessionHandle *data,
- SECURITY_STATUS major_status,
- SECURITY_STATUS minor_status,
+static int check_sspi_err(struct connectdata *conn,
+ SECURITY_STATUS status,
const char* function)
{
- const char *txt;
- (void)minor_status;
-
- if(major_status != SEC_E_OK &&
- major_status != SEC_I_COMPLETE_AND_CONTINUE &&
- major_status != SEC_I_COMPLETE_NEEDED &&
- major_status != SEC_I_CONTINUE_NEEDED) {
- failf(data, "SSPI error: %s failed: %d\n", function, major_status);
- switch (major_status) {
- case SEC_I_COMPLETE_AND_CONTINUE:
- txt="SEC_I_COMPLETE_AND_CONTINUE";
- break;
- case SEC_I_COMPLETE_NEEDED:
- txt="SEC_I_COMPLETE_NEEDED";
- break;
- case SEC_I_CONTINUE_NEEDED:
- txt="SEC_I_CONTINUE_NEEDED";
- break;
- case SEC_I_CONTEXT_EXPIRED:
- txt="SEC_I_CONTEXT_EXPIRED";
- break;
- case SEC_I_INCOMPLETE_CREDENTIALS:
- txt="SEC_I_INCOMPLETE_CREDENTIALS";
- break;
- case SEC_I_RENEGOTIATE:
- txt="SEC_I_RENEGOTIATE";
- break;
- case SEC_E_BUFFER_TOO_SMALL:
- txt="SEC_E_BUFFER_TOO_SMALL";
- break;
- case SEC_E_CONTEXT_EXPIRED:
- txt="SEC_E_CONTEXT_EXPIRED";
- break;
- case SEC_E_CRYPTO_SYSTEM_INVALID:
- txt="SEC_E_CRYPTO_SYSTEM_INVALID";
- break;
- case SEC_E_INCOMPLETE_MESSAGE:
- txt="SEC_E_INCOMPLETE_MESSAGE";
- break;
- case SEC_E_INSUFFICIENT_MEMORY:
- txt="SEC_E_INSUFFICIENT_MEMORY";
- break;
- case SEC_E_INTERNAL_ERROR:
- txt="SEC_E_INTERNAL_ERROR";
- break;
- case SEC_E_INVALID_HANDLE:
- txt="SEC_E_INVALID_HANDLE";
- break;
- case SEC_E_INVALID_TOKEN:
- txt="SEC_E_INVALID_TOKEN";
- break;
- case SEC_E_LOGON_DENIED:
- txt="SEC_E_LOGON_DENIED";
- break;
- case SEC_E_MESSAGE_ALTERED:
- txt="SEC_E_MESSAGE_ALTERED";
- break;
- case SEC_E_NO_AUTHENTICATING_AUTHORITY:
- txt="SEC_E_NO_AUTHENTICATING_AUTHORITY";
- break;
- case SEC_E_NO_CREDENTIALS:
- txt="SEC_E_NO_CREDENTIALS";
- break;
- case SEC_E_NOT_OWNER:
- txt="SEC_E_NOT_OWNER";
- break;
- case SEC_E_OUT_OF_SEQUENCE:
- txt="SEC_E_OUT_OF_SEQUENCE";
- break;
- case SEC_E_QOP_NOT_SUPPORTED:
- txt="SEC_E_QOP_NOT_SUPPORTED";
- break;
- case SEC_E_SECPKG_NOT_FOUND:
- txt="SEC_E_SECPKG_NOT_FOUND";
- break;
- case SEC_E_TARGET_UNKNOWN:
- txt="SEC_E_TARGET_UNKNOWN";
- break;
- case SEC_E_UNKNOWN_CREDENTIALS:
- txt="SEC_E_UNKNOWN_CREDENTIALS";
- break;
- case SEC_E_UNSUPPORTED_FUNCTION:
- txt="SEC_E_UNSUPPORTED_FUNCTION";
- break;
- case SEC_E_WRONG_PRINCIPAL:
- txt="SEC_E_WRONG_PRINCIPAL";
- break;
- default:
- txt="Unknown error";
-
- }
- failf(data, "SSPI error: %s failed: %s\n", function, txt);
+ if(status != SEC_E_OK &&
+ status != SEC_I_COMPLETE_AND_CONTINUE &&
+ status != SEC_I_COMPLETE_NEEDED &&
+ status != SEC_I_CONTINUE_NEEDED) {
+ failf(conn->data, "SSPI error: %s failed: %s", function,
+ Curl_sspi_strerror(conn, status));
return 1;
}
return 0;
@@ -166,10 +67,9 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
ssize_t actualread;
ssize_t written;
int result;
- long timeout;
- /* Needs GSSAPI authentication */
- SECURITY_STATUS sspi_major_status, sspi_minor_status=0;
- unsigned long sspi_ret_flags=0;
+ /* Needs GSS-API authentication */
+ SECURITY_STATUS status;
+ unsigned long sspi_ret_flags = 0;
int gss_enc;
SecBuffer sspi_send_token, sspi_recv_token, sspi_w_token[3];
SecBufferDesc input_desc, output_desc, wrap_desc;
@@ -179,16 +79,13 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
PCtxtHandle context_handle = NULL;
SecPkgCredentials_Names names;
TimeStamp expiry;
- char *service_name=NULL;
- u_short us_length;
- ULONG qop;
- unsigned char socksreq[4]; /* room for gssapi exchange header only */
+ char *service_name = NULL;
+ unsigned short us_length;
+ unsigned long qop;
+ unsigned char socksreq[4]; /* room for GSS-API exchange header only */
char *service = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
- /* get timeout */
- timeout = Curl_timeleft(conn, NULL, TRUE);
-
- /* GSSAPI request looks like
+ /* GSS-API request looks like
* +----+------+-----+----------------+
* |VER | MTYP | LEN | TOKEN |
* +----+------+----------------------+
@@ -197,7 +94,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
*/
/* prepare service name */
- if (strchr(service, '/')) {
+ if(strchr(service, '/')) {
service_name = malloc(strlen(service));
if(!service_name)
return CURLE_OUT_OF_MEMORY;
@@ -207,8 +104,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
service_name = malloc(strlen(service) + strlen(conn->proxy.name) + 2);
if(!service_name)
return CURLE_OUT_OF_MEMORY;
- snprintf(service_name,strlen(service) +strlen(conn->proxy.name)+2,"%s/%s",
- service,conn->proxy.name);
+ snprintf(service_name, strlen(service) +strlen(conn->proxy.name)+2,
+ "%s/%s", service, conn->proxy.name);
}
input_desc.cBuffers = 1;
@@ -234,21 +131,19 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
cred_handle.dwLower = 0;
cred_handle.dwUpper = 0;
- sspi_major_status = s_pSecFn->AcquireCredentialsHandleA( NULL,
- (char *)"Kerberos",
- SECPKG_CRED_OUTBOUND,
- NULL,
- NULL,
- NULL,
- NULL,
- &cred_handle,
- &expiry);
-
- if(check_sspi_err(data, sspi_major_status,sspi_minor_status,
- "AcquireCredentialsHandleA") ) {
+ status = s_pSecFn->AcquireCredentialsHandle(NULL,
+ (TCHAR *) TEXT("Kerberos"),
+ SECPKG_CRED_OUTBOUND,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &cred_handle,
+ &expiry);
+
+ if(check_sspi_err(conn, status, "AcquireCredentialsHandle")) {
failf(data, "Failed to acquire credentials.");
free(service_name);
- service_name=NULL;
s_pSecFn->FreeCredentialsHandle(&cred_handle);
return CURLE_COULDNT_CONNECT;
}
@@ -256,23 +151,29 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
/* As long as we need to keep sending some context info, and there's no */
/* errors, keep sending it... */
for(;;) {
+ TCHAR *sname;
+
+ sname = Curl_convert_UTF8_to_tchar(service_name);
+ if(!sname)
+ return CURLE_OUT_OF_MEMORY;
- sspi_major_status = s_pSecFn->InitializeSecurityContextA(
- &cred_handle,
- context_handle,
- service_name,
- ISC_REQ_MUTUAL_AUTH |
- ISC_REQ_ALLOCATE_MEMORY |
- ISC_REQ_CONFIDENTIALITY |
- ISC_REQ_REPLAY_DETECT,
- 0,
- SECURITY_NATIVE_DREP,
- &input_desc,
- 0,
- &sspi_context,
- &output_desc,
- &sspi_ret_flags,
- &expiry);
+ status = s_pSecFn->InitializeSecurityContext(&cred_handle,
+ context_handle,
+ sname,
+ ISC_REQ_MUTUAL_AUTH |
+ ISC_REQ_ALLOCATE_MEMORY |
+ ISC_REQ_CONFIDENTIALITY |
+ ISC_REQ_REPLAY_DETECT,
+ 0,
+ SECURITY_NATIVE_DREP,
+ &input_desc,
+ 0,
+ &sspi_context,
+ &output_desc,
+ &sspi_ret_flags,
+ &expiry);
+
+ Curl_unicodefree(sname);
if(sspi_recv_token.pvBuffer) {
s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
@@ -280,30 +181,30 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
sspi_recv_token.cbBuffer = 0;
}
- if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
- "InitializeSecurityContextA") ){
+ if(check_sspi_err(conn, status, "InitializeSecurityContext")) {
free(service_name);
- service_name=NULL;
s_pSecFn->FreeCredentialsHandle(&cred_handle);
s_pSecFn->DeleteSecurityContext(&sspi_context);
- s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
+ if(sspi_recv_token.pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
failf(data, "Failed to initialise security context.");
return CURLE_COULDNT_CONNECT;
}
if(sspi_send_token.cbBuffer != 0) {
- socksreq[0] = 1; /* gssapi subnegotiation version */
+ socksreq[0] = 1; /* GSS-API subnegotiation version */
socksreq[1] = 1; /* authentication message type */
us_length = htons((short)sspi_send_token.cbBuffer);
memcpy(socksreq+2, &us_length, sizeof(short));
code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
- if((code != CURLE_OK) || (4 != written)) {
+ if(code || (4 != written)) {
failf(data, "Failed to send SSPI authentication request.");
free(service_name);
- service_name=NULL;
- s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
- s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
+ if(sspi_send_token.pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
+ if(sspi_recv_token.pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
s_pSecFn->FreeCredentialsHandle(&cred_handle);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
@@ -311,12 +212,13 @@ 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 != CURLE_OK) || (sspi_send_token.cbBuffer != (size_t)written)) {
+ if(code || (sspi_send_token.cbBuffer != (size_t)written)) {
failf(data, "Failed to send SSPI authentication token.");
free(service_name);
- service_name=NULL;
- s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
- s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
+ if(sspi_send_token.pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
+ if(sspi_recv_token.pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
s_pSecFn->FreeCredentialsHandle(&cred_handle);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
@@ -324,17 +226,24 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
}
- s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
- sspi_send_token.pvBuffer = NULL;
+ if(sspi_send_token.pvBuffer) {
+ s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
+ sspi_send_token.pvBuffer = NULL;
+ }
sspi_send_token.cbBuffer = 0;
- s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
- sspi_recv_token.pvBuffer = NULL;
+
+ if(sspi_recv_token.pvBuffer) {
+ s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
+ sspi_recv_token.pvBuffer = NULL;
+ }
sspi_recv_token.cbBuffer = 0;
- if(sspi_major_status != SEC_I_CONTINUE_NEEDED) break;
+
+ if(status != SEC_I_CONTINUE_NEEDED)
+ break;
/* analyse response */
- /* GSSAPI response looks like
+ /* GSS-API response looks like
* +----+------+-----+----------------+
* |VER | MTYP | LEN | TOKEN |
* +----+------+----------------------+
@@ -342,12 +251,10 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
* +----+------+-----+----------------+
*/
- result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
- &actualread, timeout);
- if(result != CURLE_OK || actualread != 4) {
+ result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
+ if(result || (actualread != 4)) {
failf(data, "Failed to receive SSPI authentication response.");
free(service_name);
- service_name=NULL;
s_pSecFn->FreeCredentialsHandle(&cred_handle);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
@@ -355,20 +262,18 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
/* ignore the first (VER) byte */
if(socksreq[1] == 255) { /* status / message type */
- failf(data, "User was rejected by the SOCKS5 server (%d %d).",
- socksreq[0], socksreq[1]);
+ failf(data, "User was rejected by the SOCKS5 server (%u %u).",
+ (unsigned int)socksreq[0], (unsigned int)socksreq[1]);
free(service_name);
- service_name=NULL;
s_pSecFn->FreeCredentialsHandle(&cred_handle);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
}
if(socksreq[1] != 1) { /* status / messgae type */
- failf(data, "Invalid SSPI authentication response type (%d %d).",
- socksreq[0], socksreq[1]);
+ failf(data, "Invalid SSPI authentication response type (%u %u).",
+ (unsigned int)socksreq[0], (unsigned int)socksreq[1]);
free(service_name);
- service_name=NULL;
s_pSecFn->FreeCredentialsHandle(&cred_handle);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
@@ -382,20 +287,18 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
if(!sspi_recv_token.pvBuffer) {
free(service_name);
- service_name=NULL;
s_pSecFn->FreeCredentialsHandle(&cred_handle);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_OUT_OF_MEMORY;
}
result = Curl_blockread_all(conn, sock, (char *)sspi_recv_token.pvBuffer,
- sspi_recv_token.cbBuffer,
- &actualread, timeout);
+ sspi_recv_token.cbBuffer, &actualread);
- if(result != CURLE_OK || actualread != us_length) {
+ if(result || (actualread != us_length)) {
failf(data, "Failed to receive SSPI authentication token.");
free(service_name);
- service_name=NULL;
- s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
+ if(sspi_recv_token.pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
s_pSecFn->FreeCredentialsHandle(&cred_handle);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
@@ -405,26 +308,24 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
}
free(service_name);
- service_name=NULL;
/* Everything is good so far, user was authenticated! */
- sspi_major_status = s_pSecFn->QueryCredentialsAttributes( &cred_handle,
- SECPKG_CRED_ATTR_NAMES,
- &names);
+ status = s_pSecFn->QueryCredentialsAttributes(&cred_handle,
+ SECPKG_CRED_ATTR_NAMES,
+ &names);
s_pSecFn->FreeCredentialsHandle(&cred_handle);
- if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
- "QueryCredentialAttributes") ){
+ if(check_sspi_err(conn, status, "QueryCredentialAttributes")) {
s_pSecFn->DeleteSecurityContext(&sspi_context);
s_pSecFn->FreeContextBuffer(names.sUserName);
failf(data, "Failed to determine user name.");
return CURLE_COULDNT_CONNECT;
}
- infof(data, "SOCKS5 server authencticated user %s with gssapi.\n",
+ infof(data, "SOCKS5 server authencticated user %s with GSS-API.\n",
names.sUserName);
s_pSecFn->FreeContextBuffer(names.sUserName);
/* Do encryption */
- socksreq[0] = 1; /* gssapi subnegotiation version */
+ socksreq[0] = 1; /* GSS-API subnegotiation version */
socksreq[1] = 2; /* encryption message type */
gss_enc = 0; /* no data protection */
@@ -435,7 +336,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
else if(sspi_ret_flags & ISC_REQ_INTEGRITY)
gss_enc = 1;
- infof(data, "SOCKS5 server supports gssapi %s data protection.\n",
+ infof(data, "SOCKS5 server supports GSS-API %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;
@@ -475,11 +376,10 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
memcpy(socksreq+2, &us_length, sizeof(short));
}
else {
- sspi_major_status = s_pSecFn->QueryContextAttributesA( &sspi_context,
- SECPKG_ATTR_SIZES,
- &sspi_sizes);
- if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
- "QueryContextAttributesA")) {
+ status = s_pSecFn->QueryContextAttributes(&sspi_context,
+ SECPKG_ATTR_SIZES,
+ &sspi_sizes);
+ if(check_sspi_err(conn, status, "QueryContextAttributes")) {
s_pSecFn->DeleteSecurityContext(&sspi_context);
failf(data, "Failed to query security context attributes.");
return CURLE_COULDNT_CONNECT;
@@ -496,13 +396,13 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
sspi_w_token[1].cbBuffer = 1;
sspi_w_token[1].pvBuffer = malloc(1);
- if(!sspi_w_token[1].pvBuffer){
+ if(!sspi_w_token[1].pvBuffer) {
s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_OUT_OF_MEMORY;
}
- memcpy(sspi_w_token[1].pvBuffer,&gss_enc,1);
+ memcpy(sspi_w_token[1].pvBuffer, &gss_enc, 1);
sspi_w_token[2].BufferType = SECBUFFER_PADDING;
sspi_w_token[2].cbBuffer = sspi_sizes.cbBlockSize;
sspi_w_token[2].pvBuffer = malloc(sspi_sizes.cbBlockSize);
@@ -512,12 +412,11 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_OUT_OF_MEMORY;
}
- sspi_major_status = s_pSecFn->EncryptMessage( &sspi_context,
- KERB_WRAP_NO_ENCRYPT,
- &wrap_desc,
- 0);
- if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
- "EncryptMessage") ) {
+ status = s_pSecFn->EncryptMessage(&sspi_context,
+ KERB_WRAP_NO_ENCRYPT,
+ &wrap_desc,
+ 0);
+ if(check_sspi_err(conn, status, "EncryptMessage")) {
s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
s_pSecFn->FreeContextBuffer(sspi_w_token[2].pvBuffer);
@@ -557,40 +456,43 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
sspi_w_token[2].cbBuffer = 0;
us_length = htons((short)sspi_send_token.cbBuffer);
- memcpy(socksreq+2,&us_length,sizeof(short));
+ memcpy(socksreq+2, &us_length, sizeof(short));
}
code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
- if((code != CURLE_OK) || (4 != written)) {
+ if(code || (4 != written)) {
failf(data, "Failed to send SSPI encryption request.");
- s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
+ if(sspi_send_token.pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
}
if(data->set.socks5_gssapi_nec) {
- memcpy(socksreq,&gss_enc,1);
+ memcpy(socksreq, &gss_enc, 1);
code = Curl_write_plain(conn, sock, (char *)socksreq, 1, &written);
- if((code != CURLE_OK) || (1 != written)) {
+ if(code || (1 != written)) {
failf(data, "Failed to send SSPI encryption type.");
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
}
- } else {
+ }
+ else {
code = Curl_write_plain(conn, sock, (char *)sspi_send_token.pvBuffer,
sspi_send_token.cbBuffer, &written);
- if((code != CURLE_OK) || (sspi_send_token.cbBuffer != (size_t)written)) {
+ if(code || (sspi_send_token.cbBuffer != (size_t)written)) {
failf(data, "Failed to send SSPI encryption type.");
- s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
+ if(sspi_send_token.pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
}
- s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
+ if(sspi_send_token.pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
}
- result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
- &actualread, timeout);
- if(result != CURLE_OK || actualread != 4) {
+ result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
+ if(result || (actualread != 4)) {
failf(data, "Failed to receive SSPI encryption response.");
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
@@ -598,15 +500,15 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
/* ignore the first (VER) byte */
if(socksreq[1] == 255) { /* status / message type */
- failf(data, "User was rejected by the SOCKS5 server (%d %d).",
- socksreq[0], socksreq[1]);
+ failf(data, "User was rejected by the SOCKS5 server (%u %u).",
+ (unsigned int)socksreq[0], (unsigned int)socksreq[1]);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
}
if(socksreq[1] != 2) { /* status / message type */
- failf(data, "Invalid SSPI encryption response type (%d %d).",
- socksreq[0], socksreq[1]);
+ failf(data, "Invalid SSPI encryption response type (%u %u).",
+ (unsigned int)socksreq[0], (unsigned int)socksreq[1]);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
}
@@ -621,11 +523,10 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
return CURLE_OUT_OF_MEMORY;
}
- result=Curl_blockread_all(conn, sock, (char *)sspi_w_token[0].pvBuffer,
- sspi_w_token[0].cbBuffer,
- &actualread, timeout);
+ result = Curl_blockread_all(conn, sock, (char *)sspi_w_token[0].pvBuffer,
+ sspi_w_token[0].cbBuffer, &actualread);
- if(result != CURLE_OK || actualread != us_length) {
+ if(result || (actualread != us_length)) {
failf(data, "Failed to receive SSPI encryption type.");
s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
s_pSecFn->DeleteSecurityContext(&sspi_context);
@@ -640,55 +541,59 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
sspi_w_token[1].cbBuffer = 0;
sspi_w_token[1].pvBuffer = NULL;
- sspi_major_status = s_pSecFn->DecryptMessage( &sspi_context,
- &wrap_desc,
- 0,
- &qop);
+ status = s_pSecFn->DecryptMessage(&sspi_context,
+ &wrap_desc,
+ 0,
+ &qop);
- if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
- "DecryptMessage")) {
- s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
- s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
+ if(check_sspi_err(conn, status, "DecryptMessage")) {
+ if(sspi_w_token[0].pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
+ if(sspi_w_token[1].pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
s_pSecFn->DeleteSecurityContext(&sspi_context);
failf(data, "Failed to query security context attributes.");
return CURLE_COULDNT_CONNECT;
}
if(sspi_w_token[1].cbBuffer != 1) {
- failf(data, "Invalid SSPI encryption response length (%d).",
- sspi_w_token[1].cbBuffer);
- s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
- s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
+ failf(data, "Invalid SSPI encryption response length (%lu).",
+ (unsigned long)sspi_w_token[1].cbBuffer);
+ if(sspi_w_token[0].pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
+ if(sspi_w_token[1].pvBuffer)
+ s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
}
- memcpy(socksreq,sspi_w_token[1].pvBuffer,sspi_w_token[1].cbBuffer);
+ memcpy(socksreq, sspi_w_token[1].pvBuffer, sspi_w_token[1].cbBuffer);
s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
- } else {
+ }
+ else {
if(sspi_w_token[0].cbBuffer != 1) {
- failf(data, "Invalid SSPI encryption response length (%d).",
- sspi_w_token[0].cbBuffer);
+ failf(data, "Invalid SSPI encryption response length (%lu).",
+ (unsigned long)sspi_w_token[0].cbBuffer);
s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
s_pSecFn->DeleteSecurityContext(&sspi_context);
return CURLE_COULDNT_CONNECT;
}
- memcpy(socksreq,sspi_w_token[0].pvBuffer,sspi_w_token[0].cbBuffer);
+ memcpy(socksreq, sspi_w_token[0].pvBuffer, sspi_w_token[0].cbBuffer);
s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
}
infof(data, "SOCKS5 access with%s protection granted.\n",
- (socksreq[0]==0)?"out gssapi data":
- ((socksreq[0]==1)?" gssapi integrity":" gssapi confidentiality"));
+ (socksreq[0]==0)?"out GSS-API data":
+ ((socksreq[0]==1)?" GSS-API integrity":" GSS-API confidentiality"));
/* For later use if encryption is required
conn->socks5_gssapi_enctype = socksreq[0];
- if (socksreq[0] != 0)
- conn->socks5_sspi_context = sspi_context;
+ if(socksreq[0] != 0)
+ conn->socks5_sspi_context = sspi_context;
else {
- s_pSecFn->DeleteSecurityContext(&sspi_context);
- conn->socks5_sspi_context = sspi_context;
+ s_pSecFn->DeleteSecurityContext(&sspi_context);
+ conn->socks5_sspi_context = sspi_context;
}
*/
return CURLE_OK;
diff --git a/lib/speedcheck.c b/lib/speedcheck.c
index 38bad5a5..ac7447c4 100644
--- a/lib/speedcheck.c
+++ b/lib/speedcheck.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,10 +20,7 @@
*
***************************************************************************/
-#include "setup.h"
-
-#include <stdio.h>
-#include <string.h>
+#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
@@ -44,21 +41,24 @@ CURLcode Curl_speedcheck(struct SessionHandle *data,
(Curl_tvlong(data->state.keeps_speed) != 0) &&
(data->progress.current_speed < data->set.low_speed_limit)) {
long howlong = Curl_tvdiff(now, data->state.keeps_speed);
+ long nextcheck = (data->set.low_speed_time * 1000) - howlong;
/* We are now below the "low speed limit". If we are below it
for "low speed time" seconds we consider that enough reason
to abort the download. */
-
- if( (howlong/1000) > data->set.low_speed_time) {
+ if(nextcheck <= 0) {
/* we have been this slow for long enough, now die */
failf(data,
"Operation too slow. "
- "Less than %ld bytes/sec transfered the last %ld seconds",
+ "Less than %ld bytes/sec transferred the last %ld seconds",
data->set.low_speed_limit,
data->set.low_speed_time);
return CURLE_OPERATION_TIMEDOUT;
}
- Curl_expire(data, howlong);
+ else {
+ /* wait complete low_speed_time */
+ Curl_expire_latest(data, nextcheck);
+ }
}
else {
/* we keep up the required speed all right */
@@ -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(data, data->set.low_speed_time*1000);
+ Curl_expire_latest(data, data->set.low_speed_time*1000);
}
return CURLE_OK;
}
diff --git a/lib/speedcheck.h b/lib/speedcheck.h
index fc40e7d0..786cd121 100644
--- a/lib/speedcheck.h
+++ b/lib/speedcheck.h
@@ -22,7 +22,7 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "timeval.h"
diff --git a/lib/splay.c b/lib/splay.c
index dcc42cf2..b87b6cfe 100644
--- a/lib/splay.c
+++ b/lib/splay.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1997 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1997 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "splay.h"
@@ -48,7 +48,7 @@ struct Curl_tree *Curl_splay(struct timeval i,
N.smaller = N.larger = NULL;
l = r = &N;
- for (;;) {
+ for(;;) {
comp = compare(i, t->key);
if(comp < 0) {
if(t->smaller == NULL)
@@ -93,18 +93,21 @@ struct Curl_tree *Curl_splay(struct timeval i,
}
/* Insert key i into the tree t. Return a pointer to the resulting tree or
- NULL if something went wrong. */
+ * NULL if something went wrong.
+ *
+ * @unittest: 1309
+ */
struct Curl_tree *Curl_splayinsert(struct timeval i,
struct Curl_tree *t,
struct Curl_tree *node)
{
- static struct timeval KEY_NOTUSED = {-1,-1}; /* key that will *NEVER* appear */
+ static const struct timeval KEY_NOTUSED = {-1, -1}; /* will *NEVER* appear */
if(node == NULL)
return t;
if(t != NULL) {
- t = Curl_splay(i,t);
+ t = Curl_splay(i, t);
if(compare(i, t->key)==0) {
/* There already exists a node in the tree with the very same key. Build
a linked list of nodes. We make the new 'node' struct the new master
@@ -146,56 +149,6 @@ struct Curl_tree *Curl_splayinsert(struct timeval i,
return node;
}
-#if 0
-/* Deletes 'i' from the tree if it's there (with an exact match). Returns a
- pointer to the resulting tree.
-
- Function not used in libcurl.
-*/
-struct Curl_tree *Curl_splayremove(struct timeval i,
- struct Curl_tree *t,
- struct Curl_tree **removed)
-{
- struct Curl_tree *x;
-
- *removed = NULL; /* default to no removed */
-
- if(t==NULL)
- return NULL;
-
- t = Curl_splay(i,t);
- if(compare(i, t->key) == 0) { /* found it */
-
- /* FIRST! Check if there is a list with identical sizes */
- if((x = t->same) != NULL) {
- /* there is, pick one from the list */
-
- /* 'x' is the new root node */
-
- x->key = t->key;
- x->larger = t->larger;
- x->smaller = t->smaller;
-
- *removed = t;
- return x; /* new root */
- }
-
- if(t->smaller == NULL) {
- x = t->larger;
- }
- else {
- x = Curl_splay(i, t->smaller);
- x->larger = t->larger;
- }
- *removed = t;
-
- return x;
- }
- else
- return t; /* It wasn't there */
-}
-#endif
-
/* Finds and deletes the best-fit node from the tree. Return a pointer to the
resulting tree. best-fit means the node with the given or lower key */
struct Curl_tree *Curl_splaygetbest(struct timeval i,
@@ -209,7 +162,7 @@ struct Curl_tree *Curl_splaygetbest(struct timeval i,
return NULL;
}
- t = Curl_splay(i,t);
+ t = Curl_splay(i, t);
if(compare(i, t->key) < 0) {
/* too big node, try the smaller chain */
if(t->smaller)
@@ -256,19 +209,21 @@ struct Curl_tree *Curl_splaygetbest(struct timeval i,
/* Deletes the very node we point out from the tree if it's there. Stores a
- pointer to the new resulting tree in 'newroot'.
-
- Returns zero on success and non-zero on errors! TODO: document error codes.
- When returning error, it does not touch the 'newroot' pointer.
-
- NOTE: when the last node of the tree is removed, there's no tree left so
- 'newroot' will be made to point to NULL.
-*/
+ * pointer to the new resulting tree in 'newroot'.
+ *
+ * Returns zero on success and non-zero on errors! TODO: document error codes.
+ * When returning error, it does not touch the 'newroot' pointer.
+ *
+ * NOTE: when the last node of the tree is removed, there's no tree left so
+ * 'newroot' will be made to point to NULL.
+ *
+ * @unittest: 1309
+ */
int Curl_splayremovebyaddr(struct Curl_tree *t,
struct Curl_tree *removenode,
struct Curl_tree **newroot)
{
- static struct timeval KEY_NOTUSED = {-1,-1}; /* key that will *NEVER* appear */
+ static const struct timeval KEY_NOTUSED = {-1, -1}; /* will *NEVER* appear */
struct Curl_tree *x;
if(!t || !removenode)
@@ -331,108 +286,3 @@ int Curl_splayremovebyaddr(struct Curl_tree *t,
return 0;
}
-#ifdef DEBUGBUILD
-
-void Curl_splayprint(struct Curl_tree * t, int d, char output)
-{
- struct Curl_tree *node;
- int i;
- int count;
- if(t == NULL)
- return;
-
- Curl_splayprint(t->larger, d+1, output);
- for (i=0; i<d; i++)
- if(output)
- fprintf(stderr, " ");
-
- if(output) {
-#ifdef TEST_SPLAY
- fprintf(stderr, "%ld[%d]", (long)t->key.tv_usec, i);
-#else
- fprintf(stderr, "%ld.%ld[%d]", (long)t->key.tv_sec, (long)t->key.tv_usec, i);
-#endif
- }
-
- for(count=0, node = t->same; node; node = node->same, count++)
- ;
-
- if(output) {
- if(count)
- fprintf(stderr, " [%d more]\n", count);
- else
- fprintf(stderr, "\n");
- }
-
- Curl_splayprint(t->smaller, d+1, output);
-}
-#endif
-
-#ifdef TEST_SPLAY
-
-/*#define TEST2 */
-#define MAX 50
-#define TEST2
-
-/* A sample use of these functions. Start with the empty tree, insert some
- stuff into it, and then delete it */
-int main(int argc, argv_item_t argv[])
-{
- struct Curl_tree *root, *t;
- void *ptrs[MAX];
- int adds=0;
- int rc;
-
- static const long sizes[]={
- 50, 60, 50, 100, 60, 200, 120, 300, 400, 200, 256, 122, 60, 120, 200, 300,
- 220, 80, 90, 50, 100, 60, 200, 120, 300, 400, 200, 256, 122, 60, 120, 200,
- 300, 220, 80, 90, 50, 100, 60, 200, 120, 300, 400, 200, 256, 122, 60, 120,
- 200, 300, 220, 80, 90};
- int i;
- root = NULL; /* the empty tree */
-
- for (i = 0; i < MAX; i++) {
- struct timeval key;
- ptrs[i] = t = malloc(sizeof(struct Curl_tree));
- if(!t) {
- puts("out of memory!");
- return 0;
- }
-
- key.tv_sec = 0;
-#ifdef TEST2
- key.tv_usec = sizes[i];
-#elif defined(TEST1)
- key.tv_usec = (541*i)%1023;
-#elif defined(TEST3)
- key.tv_usec = 100;
-#endif
-
- t->payload = (void *)key.tv_usec; /* for simplicity */
- root = Curl_splayinsert(key, root, t);
- }
-
-#if 0
- puts("Result:");
- Curl_splayprint(root, 0, 1);
-#endif
-
-#if 1
- for (i = 0; i < MAX; i++) {
- int rem = (i+7)%MAX;
- struct Curl_tree *r;
- printf("Tree look:\n");
- Curl_splayprint(root, 0, 1);
- printf("remove pointer %d, payload %ld\n", rem,
- (long)((struct Curl_tree *)ptrs[rem])->payload);
- rc = Curl_splayremovebyaddr(root, (struct Curl_tree *)ptrs[rem], &root);
- if(rc)
- /* failed! */
- printf("remove %d failed!\n", rem);
- }
-#endif
-
- return 0;
-}
-
-#endif /* TEST_SPLAY */
diff --git a/lib/splay.h b/lib/splay.h
index 832e4e2b..5f9ef24c 100644
--- a/lib/splay.h
+++ b/lib/splay.h
@@ -1,5 +1,5 @@
-#ifndef __SPLAY_H
-#define __SPLAY_H
+#ifndef HEADER_CURL_SPLAY_H
+#define HEADER_CURL_SPLAY_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1997 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1997 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "curl_setup.h"
struct Curl_tree {
struct Curl_tree *smaller; /* smaller node */
@@ -59,7 +60,7 @@ int Curl_splayremovebyaddr(struct Curl_tree *t,
#ifdef DEBUGBUILD
void Curl_splayprint(struct Curl_tree * t, int d, char output);
#else
-#define Curl_splayprint(x,y,z)
+#define Curl_splayprint(x,y,z) Curl_nop_stmt
#endif
-#endif
+#endif /* HEADER_CURL_SPLAY_H */
diff --git a/lib/ssh.c b/lib/ssh.c
index 314d8984..f2064534 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -22,14 +22,10 @@
/* #define CURL_LIBSSH2_DEBUG */
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_LIBSSH2
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
+
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
@@ -37,22 +33,10 @@
#include <libssh2.h>
#include <libssh2_sftp.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-
-#ifndef WIN32
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -69,7 +53,6 @@
#include <in.h>
#include <inet.h>
#endif
-#endif /* !WIN32 */
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
#undef in_addr_t
@@ -79,8 +62,6 @@
#include <curl/curl.h>
#include "urldata.h"
#include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
#include "hostip.h"
#include "progress.h"
#include "transfer.h"
@@ -92,7 +73,7 @@
#include "getinfo.h"
#include "strequal.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "connect.h"
#include "strerror.h"
#include "inet_ntop.h"
@@ -101,24 +82,36 @@
#include "strtoofft.h"
#include "multiif.h"
#include "select.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "warnless.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
+#ifdef WIN32
+# undef PATH_MAX
+# define PATH_MAX MAX_PATH
+# ifndef R_OK
+# define R_OK 4
+# endif
+#endif
+
#ifndef PATH_MAX
#define PATH_MAX 1024 /* just an extra precaution since there are systems that
have their definition hidden well */
#endif
+#define sftp_libssh2_last_error(s) curlx_ultosi(libssh2_sftp_last_error(s))
+
+#define sftp_libssh2_realpath(s,p,t,m) \
+ libssh2_sftp_symlink_ex((s), (p), curlx_uztoui(strlen(p)), \
+ (t), (m), LIBSSH2_SFTP_REALPATH)
+
/* Local functions: */
-static const char *sftp_libssh2_strerror(unsigned long err);
-static LIBSSH2_ALLOC_FUNC(libssh2_malloc);
-static LIBSSH2_REALLOC_FUNC(libssh2_realloc);
-static LIBSSH2_FREE_FUNC(libssh2_free);
+static const char *sftp_libssh2_strerror(int err);
+static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc);
+static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc);
+static LIBSSH2_FREE_FUNC(my_libssh2_free);
static CURLcode get_pathname(const char **cpp, char **path);
@@ -134,13 +127,13 @@ static CURLcode scp_done(struct connectdata *conn,
CURLcode, bool premature);
static CURLcode scp_doing(struct connectdata *conn,
bool *dophase_done);
-static CURLcode scp_disconnect(struct connectdata *conn);
+static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection);
static CURLcode sftp_done(struct connectdata *conn,
CURLcode, bool premature);
static CURLcode sftp_doing(struct connectdata *conn,
bool *dophase_done);
-static CURLcode sftp_disconnect(struct connectdata *conn);
+static CURLcode sftp_disconnect(struct connectdata *conn, bool dead);
static
CURLcode sftp_perform(struct connectdata *conn,
bool *connected,
@@ -156,13 +149,15 @@ static int ssh_perform_getsock(const struct connectdata *conn,
number of sockets */
int numsocks);
+static CURLcode ssh_setup_connection(struct connectdata *conn);
+
/*
* SCP protocol handler.
*/
const struct Curl_handler Curl_handler_scp = {
"SCP", /* scheme */
- ZERO_NULL, /* setup_connection */
+ ssh_setup_connection, /* setup_connection */
ssh_do, /* do_it */
scp_done, /* done */
ZERO_NULL, /* do_more */
@@ -171,10 +166,14 @@ const struct Curl_handler Curl_handler_scp = {
scp_doing, /* doing */
ssh_getsock, /* proto_getsock */
ssh_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ssh_perform_getsock, /* perform_getsock */
scp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_SSH, /* defport */
- PROT_SCP /* protocol */
+ CURLPROTO_SCP, /* protocol */
+ PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION
+ | PROTOPT_NOURLQUERY /* flags */
};
@@ -184,7 +183,7 @@ const struct Curl_handler Curl_handler_scp = {
const struct Curl_handler Curl_handler_sftp = {
"SFTP", /* scheme */
- ZERO_NULL, /* setup_connection */
+ ssh_setup_connection, /* setup_connection */
ssh_do, /* do_it */
sftp_done, /* done */
ZERO_NULL, /* do_more */
@@ -193,13 +192,16 @@ const struct Curl_handler Curl_handler_sftp = {
sftp_doing, /* doing */
ssh_getsock, /* proto_getsock */
ssh_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ssh_perform_getsock, /* perform_getsock */
sftp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_SSH, /* defport */
- PROT_SFTP /* protocol */
+ CURLPROTO_SFTP, /* protocol */
+ PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION
+ | PROTOPT_NOURLQUERY /* flags */
};
-
static void
kbd_callback(const char *name, int name_len, const char *instruction,
int instruction_len, int num_prompts,
@@ -223,7 +225,7 @@ kbd_callback(const char *name, int name_len, const char *instruction,
#endif /* CURL_LIBSSH2_DEBUG */
if(num_prompts == 1) {
responses[0].text = strdup(conn->passwd);
- responses[0].length = (unsigned int)strlen(conn->passwd);
+ responses[0].length = curlx_uztoui(strlen(conn->passwd));
}
(void)prompts;
(void)abstract;
@@ -301,22 +303,23 @@ static CURLcode libssh2_session_error_to_CURLE(int err)
return CURLE_SSH;
}
-static LIBSSH2_ALLOC_FUNC(libssh2_malloc)
+static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc)
{
(void)abstract; /* arg not used */
return malloc(count);
}
-static LIBSSH2_REALLOC_FUNC(libssh2_realloc)
+static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc)
{
(void)abstract; /* arg not used */
return realloc(ptr, count);
}
-static LIBSSH2_FREE_FUNC(libssh2_free)
+static LIBSSH2_FREE_FUNC(my_libssh2_free)
{
(void)abstract; /* arg not used */
- free(ptr);
+ if(ptr) /* ssh2 agent sometimes call free with null ptr */
+ free(ptr);
}
/*
@@ -325,10 +328,12 @@ static LIBSSH2_FREE_FUNC(libssh2_free)
/* This is the ONLY way to change SSH state! */
static void state(struct connectdata *conn, sshstate nowstate)
{
+ struct ssh_conn *sshc = &conn->proto.sshc;
#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
/* for debug purposes */
static const char * const names[] = {
"SSH_STOP",
+ "SSH_INIT",
"SSH_S_STARTUP",
"SSH_HOSTKEY",
"SSH_AUTHLIST",
@@ -336,6 +341,9 @@ static void state(struct connectdata *conn, sshstate nowstate)
"SSH_AUTH_PKEY",
"SSH_AUTH_PASS_INIT",
"SSH_AUTH_PASS",
+ "SSH_AUTH_AGENT_INIT",
+ "SSH_AUTH_AGENT_LIST",
+ "SSH_AUTH_AGENT",
"SSH_AUTH_HOST_INIT",
"SSH_AUTH_HOST",
"SSH_AUTH_KEY_INIT",
@@ -380,13 +388,10 @@ static void state(struct connectdata *conn, sshstate nowstate)
"SSH_SESSION_FREE",
"QUIT"
};
-#endif
- struct ssh_conn *sshc = &conn->proto.sshc;
-#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
if(sshc->state != nowstate) {
infof(conn->data, "SFTP %p state change from %s to %s\n",
- sshc, names[sshc->state], names[nowstate]);
+ (void *)sshc, names[sshc->state], names[nowstate]);
}
#endif
@@ -410,19 +415,19 @@ static CURLcode ssh_getworkingpath(struct connectdata *conn,
return CURLE_OUT_OF_MEMORY;
/* Check for /~/ , indicating relative to the user's home directory */
- if(conn->protocol & PROT_SCP) {
+ if(conn->handler->protocol & CURLPROTO_SCP) {
real_path = malloc(working_path_len+1);
if(real_path == NULL) {
free(working_path);
return CURLE_OUT_OF_MEMORY;
}
- if((working_path_len > 1) && (working_path[1] == '~'))
- /* It is referenced to the home directory, so strip the leading '/' */
- memcpy(real_path, working_path+1, 1 + working_path_len-1);
+ if((working_path_len > 3) && (!memcmp(working_path, "/~/", 3)))
+ /* It is referenced to the home directory, so strip the leading '/~/' */
+ memcpy(real_path, working_path+3, 4 + working_path_len-3);
else
memcpy(real_path, working_path, 1 + working_path_len);
}
- else if(conn->protocol & PROT_SFTP) {
+ else if(conn->handler->protocol & CURLPROTO_SFTP) {
if((working_path_len > 1) && (working_path[1] == '~')) {
size_t homelen = strlen(homedir);
real_path = malloc(homelen + working_path_len + 1);
@@ -497,6 +502,194 @@ static int sshkeycallback(CURL *easy,
#endif
/*
+ * libssh2 1.2.8 fixed the problem with 32bit ints used for sockets on win64.
+ */
+#ifdef HAVE_LIBSSH2_SESSION_HANDSHAKE
+#define libssh2_session_startup(x,y) libssh2_session_handshake(x,y)
+#endif
+
+static CURLcode ssh_knownhost(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+
+#ifdef HAVE_LIBSSH2_KNOWNHOST_API
+ struct SessionHandle *data = conn->data;
+
+ if(data->set.str[STRING_SSH_KNOWNHOSTS]) {
+ /* we're asked to verify the host against a file */
+ struct ssh_conn *sshc = &conn->proto.sshc;
+ int rc;
+ int keytype;
+ size_t keylen;
+ const char *remotekey = libssh2_session_hostkey(sshc->ssh_session,
+ &keylen, &keytype);
+ int keycheck = LIBSSH2_KNOWNHOST_CHECK_FAILURE;
+ int keybit = 0;
+
+ if(remotekey) {
+ /*
+ * A subject to figure out is what host name we need to pass in here.
+ * What host name does OpenSSH store in its file if an IDN name is
+ * used?
+ */
+ struct libssh2_knownhost *host;
+ enum curl_khmatch keymatch;
+ curl_sshkeycallback func =
+ data->set.ssh_keyfunc?data->set.ssh_keyfunc:sshkeycallback;
+ struct curl_khkey knownkey;
+ struct curl_khkey *knownkeyp = NULL;
+ struct curl_khkey foundkey;
+
+ 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,
+ LIBSSH2_KNOWNHOST_TYPE_PLAIN|
+ LIBSSH2_KNOWNHOST_KEYENC_RAW|
+ keybit,
+ &host);
+#endif
+
+ infof(data, "SSH host check: %d, key: %s\n", keycheck,
+ (keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH)?
+ host->key:"<none>");
+
+ /* setup 'knownkey' */
+ if(keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH) {
+ knownkey.key = host->key;
+ knownkey.len = 0;
+ knownkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
+ CURLKHTYPE_RSA : CURLKHTYPE_DSS;
+ knownkeyp = &knownkey;
+ }
+
+ /* setup 'foundkey' */
+ foundkey.key = remotekey;
+ foundkey.len = keylen;
+ foundkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
+ CURLKHTYPE_RSA : CURLKHTYPE_DSS;
+
+ /*
+ * if any of the LIBSSH2_KNOWNHOST_CHECK_* defines and the
+ * curl_khmatch enum are ever modified, we need to introduce a
+ * translation table here!
+ */
+ keymatch = (enum curl_khmatch)keycheck;
+
+ /* Ask the callback how to behave */
+ rc = func(data, knownkeyp, /* from the knownhosts file */
+ &foundkey, /* from the remote host */
+ keymatch, data->set.ssh_keyfunc_userp);
+ }
+ else
+ /* no remotekey means failure! */
+ rc = CURLKHSTAT_REJECT;
+
+ 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;
+ break;
+ case CURLKHSTAT_FINE:
+ case CURLKHSTAT_FINE_ADD_TO_FILE:
+ /* proceed */
+ if(keycheck != LIBSSH2_KNOWNHOST_CHECK_MATCH) {
+ /* the found host+key didn't match but has been told to be fine
+ anyway so we add it in memory */
+ int addrc = libssh2_knownhost_add(sshc->kh,
+ conn->host.name, NULL,
+ remotekey, keylen,
+ LIBSSH2_KNOWNHOST_TYPE_PLAIN|
+ LIBSSH2_KNOWNHOST_KEYENC_RAW|
+ keybit, NULL);
+ if(addrc)
+ infof(data, "Warning adding the known host %s failed!\n",
+ conn->host.name);
+ else if(rc == CURLKHSTAT_FINE_ADD_TO_FILE) {
+ /* now we write the entire in-memory list of known hosts to the
+ known_hosts file */
+ int wrc =
+ libssh2_knownhost_writefile(sshc->kh,
+ data->set.str[STRING_SSH_KNOWNHOSTS],
+ LIBSSH2_KNOWNHOST_FILE_OPENSSH);
+ if(wrc) {
+ infof(data, "Warning, writing %s failed!\n",
+ data->set.str[STRING_SSH_KNOWNHOSTS]);
+ }
+ }
+ }
+ break;
+ }
+ }
+#else /* HAVE_LIBSSH2_KNOWNHOST_API */
+ (void)conn;
+#endif
+ return result;
+}
+
+static CURLcode ssh_check_fingerprint(struct connectdata *conn)
+{
+ struct ssh_conn *sshc = &conn->proto.sshc;
+ struct SessionHandle *data = conn->data;
+ const char *pubkey_md5 = data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5];
+ char md5buffer[33];
+ int i;
+
+ const char *fingerprint = libssh2_hostkey_hash(sshc->ssh_session,
+ LIBSSH2_HOSTKEY_HASH_MD5);
+
+ if(fingerprint) {
+ /* The fingerprint points to static storage (!), don't free() it. */
+ for(i = 0; i < 16; i++)
+ snprintf(&md5buffer[i*2], 3, "%02x", (unsigned char) fingerprint[i]);
+ infof(data, "SSH MD5 fingerprint: %s\n", md5buffer);
+ }
+
+ /* Before we authenticate we check the hostkey's MD5 fingerprint
+ * against a known fingerprint, if available.
+ */
+ if(pubkey_md5 && strlen(pubkey_md5) == 32) {
+ if(!fingerprint || !strequal(md5buffer, pubkey_md5)) {
+ if(fingerprint)
+ failf(data,
+ "Denied establishing ssh session: mismatch md5 fingerprint. "
+ "Remote %s is not equal to %s", md5buffer, pubkey_md5);
+ else
+ failf(data,
+ "Denied establishing ssh session: md5 fingerprint not available");
+ state(conn, SSH_SESSION_FREE);
+ sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
+ return sshc->actualcode;
+ }
+ else {
+ infof(data, "MD5 checksum match!\n");
+ /* as we already matched, we skip the check for known hosts */
+ return CURLE_OK;
+ }
+ }
+ else
+ return ssh_knownhost(conn);
+}
+
+/*
* ssh_statemach_act() runs the SSH state machine as far as it can without
* blocking and without reaching the end. The data the pointer 'block' points
* to will be set to TRUE if the libssh2 function returns LIBSSH2_ERROR_EAGAIN
@@ -507,14 +700,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct SSHPROTO *sftp_scp = data->state.proto.ssh;
+ struct SSHPROTO *sftp_scp = data->req.protop;
struct ssh_conn *sshc = &conn->proto.sshc;
curl_socket_t sock = conn->sock[FIRSTSOCKET];
-#ifdef CURL_LIBSSH2_DEBUG
- const char *fingerprint;
-#endif /* CURL_LIBSSH2_DEBUG */
- const char *host_public_key_md5;
- int rc = LIBSSH2_ERROR_NONE, i;
+ char *new_readdir_line;
+ int rc = LIBSSH2_ERROR_NONE;
int err;
int seekerr = CURL_SEEKFUNC_OK;
*block = 0; /* we're not blocking by default */
@@ -522,12 +712,20 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
do {
switch(sshc->state) {
- case SSH_S_STARTUP:
+ case SSH_INIT:
sshc->secondCreateDirs = 0;
sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_OK;
- rc = libssh2_session_startup(sshc->ssh_session, sock);
+ /* Set libssh2 to non-blocking, since everything internally is
+ non-blocking */
+ libssh2_session_set_blocking(sshc->ssh_session, 0);
+
+ state(conn, SSH_S_STARTUP);
+ /* fall-through */
+
+ case SSH_S_STARTUP:
+ rc = libssh2_session_startup(sshc->ssh_session, (int)sock);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
}
@@ -538,168 +736,19 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
break;
}
- /* Set libssh2 to non-blocking, since everything internally is
- non-blocking */
- libssh2_session_set_blocking(sshc->ssh_session, 0);
-
state(conn, SSH_HOSTKEY);
/* fall-through */
case SSH_HOSTKEY:
-
-#ifdef CURL_LIBSSH2_DEBUG
/*
* Before we authenticate we should check the hostkey's fingerprint
* against our known hosts. How that is handled (reading from file,
- * whatever) is up to us. As for know not much is implemented, besides
- * showing how to get the fingerprint.
+ * whatever) is up to us.
*/
- fingerprint = libssh2_hostkey_hash(sshc->ssh_session,
- LIBSSH2_HOSTKEY_HASH_MD5);
-
- /* The fingerprint points to static storage (!), don't free() it. */
- infof(data, "Fingerprint: ");
- for (rc = 0; rc < 16; rc++) {
- infof(data, "%02X ", (unsigned char) fingerprint[rc]);
- }
- infof(data, "\n");
-#endif /* CURL_LIBSSH2_DEBUG */
-
- /* Before we authenticate we check the hostkey's MD5 fingerprint
- * against a known fingerprint, if available. This implementation pulls
- * it from the curl option.
- */
- if(data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5] &&
- strlen(data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5]) == 32) {
- char buf[33];
- host_public_key_md5 = libssh2_hostkey_hash(sshc->ssh_session,
- LIBSSH2_HOSTKEY_HASH_MD5);
- for (i = 0; i < 16; i++)
- snprintf(&buf[i*2], 3, "%02x",
- (unsigned char) host_public_key_md5[i]);
- if(!strequal(buf, data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5])) {
- failf(data,
- "Denied establishing ssh session: mismatch md5 fingerprint. "
- "Remote %s is not equal to %s",
- buf, data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5]);
- state(conn, SSH_SESSION_FREE);
- sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
- break;
- }
- }
-
-#ifdef HAVE_LIBSSH2_KNOWNHOST_API
- if(data->set.str[STRING_SSH_KNOWNHOSTS]) {
- /* we're asked to verify the host against a file */
- int keytype;
- size_t keylen;
- const char *remotekey = libssh2_session_hostkey(sshc->ssh_session,
- &keylen, &keytype);
- int keycheck;
- int keybit;
-
- if(remotekey) {
- /*
- * A subject to figure out is what host name we need to pass in here.
- * What host name does OpenSSH store in its file if an IDN name is
- * used?
- */
- struct libssh2_knownhost *host;
- enum curl_khmatch keymatch;
- curl_sshkeycallback func =
- data->set.ssh_keyfunc?data->set.ssh_keyfunc:sshkeycallback;
- struct curl_khkey knownkey;
- struct curl_khkey *knownkeyp = NULL;
- struct curl_khkey foundkey;
-
- keybit = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
- LIBSSH2_KNOWNHOST_KEY_SSHRSA:LIBSSH2_KNOWNHOST_KEY_SSHDSS;
-
- keycheck = libssh2_knownhost_check(sshc->kh,
- conn->host.name,
- remotekey, keylen,
- LIBSSH2_KNOWNHOST_TYPE_PLAIN|
- LIBSSH2_KNOWNHOST_KEYENC_RAW|
- keybit,
- &host);
-
- infof(data, "SSH host check: %d, key: %s\n", keycheck,
- (keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH)?
- host->key:"<none>");
-
- /* setup 'knownkey' */
- if(keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH) {
- knownkey.key = host->key;
- knownkey.len = 0;
- knownkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
- CURLKHTYPE_RSA : CURLKHTYPE_DSS;
- knownkeyp = &knownkey;
- }
-
- /* setup 'foundkey' */
- foundkey.key = remotekey;
- foundkey.len = keylen;
- foundkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
- CURLKHTYPE_RSA : CURLKHTYPE_DSS;
-
- /*
- * if any of the LIBSSH2_KNOWNHOST_CHECK_* defines and the
- * curl_khmatch enum are ever modified, we need to introduce a
- * translation table here!
- */
- keymatch = (enum curl_khmatch)keycheck;
-
- /* Ask the callback how to behave */
- rc = func(data, knownkeyp, /* from the knownhosts file */
- &foundkey, /* from the remote host */
- keymatch, data->set.ssh_keyfunc_userp);
- }
- else
- /* no remotekey means failure! */
- rc = CURLKHSTAT_REJECT;
-
- switch(rc) {
- default: /* unknown return codes will equal reject */
- case CURLKHSTAT_REJECT:
- state(conn, SSH_SESSION_FREE);
- case CURLKHSTAT_DEFER:
- /* DEFER means bail out but keep the SSH_HOSTKEY state */
- result = sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
- break;
- case CURLKHSTAT_FINE:
- case CURLKHSTAT_FINE_ADD_TO_FILE:
- /* proceed */
- if(keycheck != LIBSSH2_KNOWNHOST_CHECK_MATCH) {
- /* the found host+key didn't match but has been told to be fine
- anyway so we add it in memory */
- int addrc = libssh2_knownhost_add(sshc->kh,
- conn->host.name, NULL,
- remotekey, keylen,
- LIBSSH2_KNOWNHOST_TYPE_PLAIN|
- LIBSSH2_KNOWNHOST_KEYENC_RAW|
- keybit, NULL);
- if(addrc)
- infof(data, "Warning adding the known host %s failed!\n",
- conn->host.name);
- else if(rc == CURLKHSTAT_FINE_ADD_TO_FILE) {
- /* now we write the entire in-memory list of known hosts to the
- known_hosts file */
- int wrc =
- libssh2_knownhost_writefile(sshc->kh,
- data->set.str[STRING_SSH_KNOWNHOSTS],
- LIBSSH2_KNOWNHOST_FILE_OPENSSH);
- if(wrc) {
- infof(data, "Warning, writing %s failed!\n",
- data->set.str[STRING_SSH_KNOWNHOSTS]);
- }
- }
- }
- break;
- }
- }
-#endif /* HAVE_LIBSSH2_KNOWNHOST_API */
-
- state(conn, SSH_AUTHLIST);
+ result = ssh_check_fingerprint(conn);
+ if(!result)
+ state(conn, SSH_AUTHLIST);
+ /* ssh_check_fingerprint sets state appropriately on error */
break;
case SSH_AUTHLIST:
@@ -715,10 +764,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
*/
sshc->authlist = libssh2_userauth_list(sshc->ssh_session,
conn->user,
- (unsigned int)strlen(conn->user));
+ curlx_uztoui(strlen(conn->user)));
if(!sshc->authlist) {
- if((err = libssh2_session_last_errno(sshc->ssh_session)) ==
+ if(libssh2_userauth_authenticated(sshc->ssh_session)) {
+ sshc->authed = TRUE;
+ infof(data, "SSH user accepted with no authentication\n");
+ state(conn, SSH_AUTH_DONE);
+ break;
+ }
+ else if((err = libssh2_session_last_errno(sshc->ssh_session)) ==
LIBSSH2_ERROR_EAGAIN) {
rc = LIBSSH2_ERROR_EAGAIN;
break;
@@ -744,7 +799,8 @@ 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;
+ char *home = NULL;
+ bool out_of_memory = FALSE;
sshc->rsa_pub = sshc->rsa = NULL;
@@ -752,35 +808,56 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
HOME environment variable etc? */
home = curl_getenv("HOME");
- 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");
-
- if(sshc->rsa_pub == NULL) {
- Curl_safefree(home);
- home = NULL;
- state(conn, SSH_SESSION_FREE);
- sshc->actualcode = CURLE_OUT_OF_MEMORY;
- break;
+ 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_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");
+ /*
+ * 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(sshc->rsa == NULL) {
- Curl_safefree(home);
- home = NULL;
+ if(out_of_memory || sshc->rsa == NULL) {
+ free(home);
+ Curl_safefree(sshc->rsa);
Curl_safefree(sshc->rsa_pub);
- sshc->rsa_pub = NULL;
state(conn, SSH_SESSION_FREE);
sshc->actualcode = CURLE_OUT_OF_MEMORY;
break;
@@ -790,11 +867,10 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
if(!sshc->passphrase)
sshc->passphrase = "";
- Curl_safefree(home);
- home = NULL;
+ free(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);
}
@@ -808,8 +884,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
*/
rc = libssh2_userauth_publickey_fromfile_ex(sshc->ssh_session,
conn->user,
- (unsigned int)
- strlen(conn->user),
+ curlx_uztoui(
+ strlen(conn->user)),
sshc->rsa_pub,
sshc->rsa, sshc->passphrase);
if(rc == LIBSSH2_ERROR_EAGAIN) {
@@ -817,9 +893,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
Curl_safefree(sshc->rsa_pub);
- sshc->rsa_pub = NULL;
Curl_safefree(sshc->rsa);
- sshc->rsa = NULL;
if(rc == 0) {
sshc->authed = TRUE;
@@ -847,9 +921,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
case SSH_AUTH_PASS:
rc = libssh2_userauth_password_ex(sshc->ssh_session, conn->user,
- (unsigned int)strlen(conn->user),
+ curlx_uztoui(strlen(conn->user)),
conn->passwd,
- (unsigned int)strlen(conn->passwd),
+ curlx_uztoui(strlen(conn->passwd)),
NULL);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
@@ -870,12 +944,102 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
state(conn, SSH_AUTH_HOST);
}
else {
- state(conn, SSH_AUTH_KEY_INIT);
+ state(conn, SSH_AUTH_AGENT_INIT);
}
break;
case SSH_AUTH_HOST:
- state(conn, SSH_AUTH_KEY_INIT);
+ state(conn, SSH_AUTH_AGENT_INIT);
+ break;
+
+ case SSH_AUTH_AGENT_INIT:
+#ifdef HAVE_LIBSSH2_AGENT_API
+ if((data->set.ssh_auth_types & CURLSSH_AUTH_AGENT)
+ && (strstr(sshc->authlist, "publickey") != NULL)) {
+
+ /* Connect to the ssh-agent */
+ /* The agent could be shared by a curl thread i believe
+ but nothing obvious as keys can be added/removed at any time */
+ if(!sshc->ssh_agent) {
+ sshc->ssh_agent = libssh2_agent_init(sshc->ssh_session);
+ if(!sshc->ssh_agent) {
+ infof(data, "Could not create agent object\n");
+
+ state(conn, SSH_AUTH_KEY_INIT);
+ break;
+ }
+ }
+
+ rc = libssh2_agent_connect(sshc->ssh_agent);
+ if(rc == LIBSSH2_ERROR_EAGAIN)
+ break;
+ if(rc < 0) {
+ infof(data, "Failure connecting to agent\n");
+ state(conn, SSH_AUTH_KEY_INIT);
+ }
+ else {
+ state(conn, SSH_AUTH_AGENT_LIST);
+ }
+ }
+ else
+#endif /* HAVE_LIBSSH2_AGENT_API */
+ state(conn, SSH_AUTH_KEY_INIT);
+ break;
+
+ case SSH_AUTH_AGENT_LIST:
+#ifdef HAVE_LIBSSH2_AGENT_API
+ rc = libssh2_agent_list_identities(sshc->ssh_agent);
+
+ if(rc == LIBSSH2_ERROR_EAGAIN)
+ break;
+ if(rc < 0) {
+ infof(data, "Failure requesting identities to agent\n");
+ state(conn, SSH_AUTH_KEY_INIT);
+ }
+ else {
+ state(conn, SSH_AUTH_AGENT);
+ sshc->sshagent_prev_identity = NULL;
+ }
+#endif
+ break;
+
+ case SSH_AUTH_AGENT:
+#ifdef HAVE_LIBSSH2_AGENT_API
+ /* as prev_identity evolves only after an identity user auth finished we
+ can safely request it again as long as EAGAIN is returned here or by
+ libssh2_agent_userauth */
+ rc = libssh2_agent_get_identity(sshc->ssh_agent,
+ &sshc->sshagent_identity,
+ sshc->sshagent_prev_identity);
+ if(rc == LIBSSH2_ERROR_EAGAIN)
+ break;
+
+ if(rc == 0) {
+ rc = libssh2_agent_userauth(sshc->ssh_agent, conn->user,
+ sshc->sshagent_identity);
+
+ if(rc < 0) {
+ if(rc != LIBSSH2_ERROR_EAGAIN) {
+ /* tried and failed? go to next identity */
+ sshc->sshagent_prev_identity = sshc->sshagent_identity;
+ }
+ break;
+ }
+ }
+
+ if(rc < 0)
+ infof(data, "Failure requesting identities to agent\n");
+ else if(rc == 1)
+ infof(data, "No identity would match\n");
+
+ if(rc == LIBSSH2_ERROR_NONE) {
+ sshc->authed = TRUE;
+ infof(data, "Agent based authentication successful\n");
+ state(conn, SSH_AUTH_DONE);
+ }
+ else
+ state(conn, SSH_AUTH_KEY_INIT);
+#endif
break;
case SSH_AUTH_KEY_INIT:
@@ -892,8 +1056,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* Authentication failed. Continue with keyboard-interactive now. */
rc = libssh2_userauth_keyboard_interactive_ex(sshc->ssh_session,
conn->user,
- (unsigned int)
- strlen(conn->user),
+ curlx_uztoui(
+ strlen(conn->user)),
&kbd_callback);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
@@ -923,7 +1087,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
conn->sockfd = sock;
conn->writesockfd = CURL_SOCKET_BAD;
- if(conn->protocol == PROT_SFTP) {
+ if(conn->handler->protocol == CURLPROTO_SFTP) {
state(conn, SSH_SFTP_INIT);
break;
}
@@ -963,7 +1127,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/*
* Get the "home" directory
*/
- rc = libssh2_sftp_realpath(sshc->sftp_session, ".",
+ rc = sftp_libssh2_realpath(sshc->sftp_session, ".",
tempHome, PATH_MAX-1);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
@@ -977,10 +1141,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
sshc->actualcode = CURLE_OUT_OF_MEMORY;
break;
}
+ conn->data->state.most_recent_ftp_entrypath = sshc->homedir;
}
else {
/* Return the error type */
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ err = sftp_libssh2_last_error(sshc->sftp_session);
result = sftp_libssh2_error_to_CURLE(err);
sshc->actualcode = result?result:CURLE_SSH;
DEBUGF(infof(data, "error = %d makes libcurl = %d\n",
@@ -1035,28 +1200,57 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/*
* Support some of the "FTP" commands
*/
- if(curl_strequal("pwd", sshc->quote_item->data)) {
+ char *cmd = sshc->quote_item->data;
+ sshc->acceptfail = FALSE;
+
+ /* if a command starts with an asterisk, which a legal SFTP command never
+ can, the command will be allowed to fail without it causing any
+ aborts or cancels etc. It will cause libcurl to act as if the command
+ is successful, whatever the server reponds. */
+
+ if(cmd[0] == '*') {
+ cmd++;
+ sshc->acceptfail = TRUE;
+ }
+
+ if(curl_strequal("pwd", cmd)) {
/* output debug output if that is requested */
+ char *tmp = aprintf("257 \"%s\" is current directory.\n",
+ sftp_scp->path);
+ if(!tmp) {
+ result = CURLE_OUT_OF_MEMORY;
+ state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
+ break;
+ }
if(data->set.verbose) {
- char tmp[PATH_MAX+1];
-
Curl_debug(data, CURLINFO_HEADER_OUT, (char *)"PWD\n", 4, conn);
- snprintf(tmp, PATH_MAX, "257 \"%s\" is current directory.\n",
- sftp_scp->path);
Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp), conn);
}
- state(conn, SSH_SFTP_NEXT_QUOTE);
+ /* this sends an FTP-like "header" to the header callback so that the
+ current directory can be read very similar to how it is read when
+ using ordinary FTP. */
+ result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp));
+ free(tmp);
+ if(result) {
+ state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
+ sshc->actualcode = result;
+ }
+ else
+ state(conn, SSH_SFTP_NEXT_QUOTE);
break;
}
- else if(sshc->quote_item->data) {
+ else if(cmd) {
/*
* the arguments following the command must be separated from the
* command with a space so we can check for it unconditionally
*/
- cp = strchr(sshc->quote_item->data, ' ');
+ cp = strchr(cmd, ' ');
if(cp == NULL) {
failf(data, "Syntax error in SFTP command. Supply parameter(s)!");
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
@@ -1072,19 +1266,20 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
else
failf(data, "Syntax error: Bad first parameter");
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = result;
break;
}
/*
- * SFTP is a binary protocol, so we don't send text commands to
- * the server. Instead, we scan for commands for commands used by
+ * SFTP is a binary protocol, so we don't send text commands
+ * to the server. Instead, we scan for commands used by
* OpenSSH's sftp program and call the appropriate libssh2
* functions.
*/
- if(curl_strnequal(sshc->quote_item->data, "chgrp ", 6) ||
- curl_strnequal(sshc->quote_item->data, "chmod ", 6) ||
- curl_strnequal(sshc->quote_item->data, "chown ", 6) ) {
+ if(curl_strnequal(cmd, "chgrp ", 6) ||
+ curl_strnequal(cmd, "chmod ", 6) ||
+ curl_strnequal(cmd, "chown ", 6) ) {
/* attribute change */
/* sshc->quote_path1 contains the mode to set */
@@ -1097,8 +1292,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
failf(data, "Syntax error in chgrp/chmod/chown: "
"Bad second parameter");
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = result;
break;
}
@@ -1106,8 +1301,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
state(conn, SSH_SFTP_QUOTE_STAT);
break;
}
- else if(curl_strnequal(sshc->quote_item->data, "ln ", 3) ||
- curl_strnequal(sshc->quote_item->data, "symlink ", 8)) {
+ else if(curl_strnequal(cmd, "ln ", 3) ||
+ curl_strnequal(cmd, "symlink ", 8)) {
/* symbolic linking */
/* sshc->quote_path1 is the source */
/* get the destination */
@@ -1119,20 +1314,20 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
failf(data,
"Syntax error in ln/symlink: Bad second parameter");
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = result;
break;
}
state(conn, SSH_SFTP_QUOTE_SYMLINK);
break;
}
- else if(curl_strnequal(sshc->quote_item->data, "mkdir ", 6)) {
+ else if(curl_strnequal(cmd, "mkdir ", 6)) {
/* create dir */
state(conn, SSH_SFTP_QUOTE_MKDIR);
break;
}
- else if(curl_strnequal(sshc->quote_item->data, "rename ", 7)) {
+ else if(curl_strnequal(cmd, "rename ", 7)) {
/* rename file */
/* first param is the source path */
/* second param is the dest. path */
@@ -1143,30 +1338,29 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
else
failf(data, "Syntax error in rename: Bad second parameter");
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = result;
break;
}
state(conn, SSH_SFTP_QUOTE_RENAME);
break;
}
- else if(curl_strnequal(sshc->quote_item->data, "rmdir ", 6)) {
+ else if(curl_strnequal(cmd, "rmdir ", 6)) {
/* delete dir */
state(conn, SSH_SFTP_QUOTE_RMDIR);
break;
}
- else if(curl_strnequal(sshc->quote_item->data, "rm ", 3)) {
+ else if(curl_strnequal(cmd, "rm ", 3)) {
state(conn, SSH_SFTP_QUOTE_UNLINK);
break;
}
failf(data, "Unknown SFTP command");
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
@@ -1177,14 +1371,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
break;
case SSH_SFTP_NEXT_QUOTE:
- if(sshc->quote_path1) {
- Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
- }
- if(sshc->quote_path2) {
- Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
- }
+ Curl_safefree(sshc->quote_path1);
+ Curl_safefree(sshc->quote_path2);
sshc->quote_item = sshc->quote_item->next;
@@ -1203,73 +1391,85 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
break;
case SSH_SFTP_QUOTE_STAT:
- if(!curl_strnequal(sshc->quote_item->data, "chmod", 5)) {
+ {
+ char *cmd = sshc->quote_item->data;
+ sshc->acceptfail = FALSE;
+
+ /* if a command starts with an asterisk, which a legal SFTP command never
+ can, the command will be allowed to fail without it causing any
+ aborts or cancels etc. It will cause libcurl to act as if the command
+ is successful, whatever the server reponds. */
+
+ if(cmd[0] == '*') {
+ cmd++;
+ sshc->acceptfail = TRUE;
+ }
+
+ if(!curl_strnequal(cmd, "chmod", 5)) {
/* Since chown and chgrp only set owner OR group but libssh2 wants to
* set them both at once, we need to obtain the current ownership
* first. This takes an extra protocol round trip.
*/
rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2,
- (unsigned int)strlen(sshc->quote_path2),
+ curlx_uztoui(strlen(sshc->quote_path2)),
LIBSSH2_SFTP_STAT,
&sshc->quote_attrs);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
}
- else if(rc != 0) { /* get those attributes */
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ else if(rc != 0 && !sshc->acceptfail) { /* get those attributes */
+ err = sftp_libssh2_last_error(sshc->sftp_session);
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
failf(data, "Attempt to get SFTP stats failed: %s",
sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
}
/* Now set the new attributes... */
- if(curl_strnequal(sshc->quote_item->data, "chgrp", 5)) {
+ if(curl_strnequal(cmd, "chgrp", 5)) {
sshc->quote_attrs.gid = strtoul(sshc->quote_path1, NULL, 10);
sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
- if(sshc->quote_attrs.gid == 0 && !ISDIGIT(sshc->quote_path1[0])) {
+ if(sshc->quote_attrs.gid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
+ !sshc->acceptfail) {
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
failf(data, "Syntax error: chgrp gid not a number");
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
}
- else if(curl_strnequal(sshc->quote_item->data, "chmod", 5)) {
+ else if(curl_strnequal(cmd, "chmod", 5)) {
sshc->quote_attrs.permissions = strtoul(sshc->quote_path1, NULL, 8);
sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_PERMISSIONS;
/* permissions are octal */
if(sshc->quote_attrs.permissions == 0 &&
!ISDIGIT(sshc->quote_path1[0])) {
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
failf(data, "Syntax error: chmod permissions not a number");
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
}
- else if(curl_strnequal(sshc->quote_item->data, "chown", 5)) {
+ else if(curl_strnequal(cmd, "chown", 5)) {
sshc->quote_attrs.uid = strtoul(sshc->quote_path1, NULL, 10);
sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
- if(sshc->quote_attrs.uid == 0 && !ISDIGIT(sshc->quote_path1[0])) {
+ if(sshc->quote_attrs.uid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
+ !sshc->acceptfail) {
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
failf(data, "Syntax error: chown uid not a number");
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
@@ -1278,24 +1478,24 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* Now send the completed structure... */
state(conn, SSH_SFTP_QUOTE_SETSTAT);
break;
+ }
case SSH_SFTP_QUOTE_SETSTAT:
rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2,
- (unsigned int)strlen(sshc->quote_path2),
+ curlx_uztoui(strlen(sshc->quote_path2)),
LIBSSH2_SFTP_SETSTAT,
&sshc->quote_attrs);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
}
- else if(rc != 0) {
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ else if(rc != 0 && !sshc->acceptfail) {
+ err = sftp_libssh2_last_error(sshc->sftp_session);
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
failf(data, "Attempt to set SFTP stats failed: %s",
sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
@@ -1304,22 +1504,21 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
case SSH_SFTP_QUOTE_SYMLINK:
rc = libssh2_sftp_symlink_ex(sshc->sftp_session, sshc->quote_path1,
- (unsigned int)strlen(sshc->quote_path1),
+ curlx_uztoui(strlen(sshc->quote_path1)),
sshc->quote_path2,
- (unsigned int)strlen(sshc->quote_path2),
+ curlx_uztoui(strlen(sshc->quote_path2)),
LIBSSH2_SFTP_SYMLINK);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
}
- else if(rc != 0) {
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ else if(rc != 0 && !sshc->acceptfail) {
+ err = sftp_libssh2_last_error(sshc->sftp_session);
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
failf(data, "symlink command failed: %s",
sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
@@ -1328,17 +1527,17 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
case SSH_SFTP_QUOTE_MKDIR:
rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sshc->quote_path1,
- (unsigned int)strlen(sshc->quote_path1),
- 0755);
+ curlx_uztoui(strlen(sshc->quote_path1)),
+ data->set.new_directory_perms);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
}
- else if(rc != 0) {
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ else if(rc != 0 && !sshc->acceptfail) {
+ err = sftp_libssh2_last_error(sshc->sftp_session);
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
failf(data, "mkdir command failed: %s", sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
@@ -1347,23 +1546,23 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
case SSH_SFTP_QUOTE_RENAME:
rc = libssh2_sftp_rename_ex(sshc->sftp_session, sshc->quote_path1,
- (unsigned int)strlen(sshc->quote_path1),
+ curlx_uztoui(strlen(sshc->quote_path1)),
sshc->quote_path2,
- (unsigned int)strlen(sshc->quote_path2),
+ curlx_uztoui(strlen(sshc->quote_path2)),
LIBSSH2_SFTP_RENAME_OVERWRITE |
LIBSSH2_SFTP_RENAME_ATOMIC |
LIBSSH2_SFTP_RENAME_NATIVE);
+
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
}
- else if(rc != 0) {
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ else if(rc != 0 && !sshc->acceptfail) {
+ err = sftp_libssh2_last_error(sshc->sftp_session);
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
Curl_safefree(sshc->quote_path2);
- sshc->quote_path2 = NULL;
failf(data, "rename command failed: %s", sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
@@ -1372,16 +1571,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
case SSH_SFTP_QUOTE_RMDIR:
rc = libssh2_sftp_rmdir_ex(sshc->sftp_session, sshc->quote_path1,
- (unsigned int)strlen(sshc->quote_path1));
+ curlx_uztoui(strlen(sshc->quote_path1)));
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
}
- else if(rc != 0) {
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ else if(rc != 0 && !sshc->acceptfail) {
+ err = sftp_libssh2_last_error(sshc->sftp_session);
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
failf(data, "rmdir command failed: %s", sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
@@ -1390,16 +1589,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
case SSH_SFTP_QUOTE_UNLINK:
rc = libssh2_sftp_unlink_ex(sshc->sftp_session, sshc->quote_path1,
- (unsigned int)strlen(sshc->quote_path1));
+ curlx_uztoui(strlen(sshc->quote_path1)));
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
}
- else if(rc != 0) {
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ else if(rc != 0 && !sshc->acceptfail) {
+ err = sftp_libssh2_last_error(sshc->sftp_session);
Curl_safefree(sshc->quote_path1);
- sshc->quote_path1 = NULL;
failf(data, "rm command failed: %s", sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE);
+ sshc->nextstate = SSH_NO_STATE;
sshc->actualcode = CURLE_QUOTE_ERROR;
break;
}
@@ -1410,9 +1609,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
if(data->set.upload)
state(conn, SSH_SFTP_UPLOAD_INIT);
else {
- if(data->set.opt_no_body)
- state(conn, SSH_STOP);
- else if(sftp_scp->path[strlen(sftp_scp->path)-1] == '/')
+ if(sftp_scp->path[strlen(sftp_scp->path)-1] == '/')
state(conn, SSH_SFTP_READDIR_INIT);
else
state(conn, SSH_SFTP_DOWNLOAD_INIT);
@@ -1431,9 +1628,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
if(data->state.resume_from != 0) {
LIBSSH2_SFTP_ATTRIBUTES attrs;
- if(data->state.resume_from< 0) {
+ if(data->state.resume_from < 0) {
rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path,
- (unsigned int)strlen(sftp_scp->path),
+ curlx_uztoui(strlen(sftp_scp->path)),
LIBSSH2_SFTP_STAT, &attrs);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
@@ -1444,7 +1641,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
else {
curl_off_t size = attrs.filesize;
if(size < 0) {
- failf(data, "Bad file size (%" FORMAT_OFF_T ")", size);
+ failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size);
return CURLE_BAD_DOWNLOAD_RESUME;
}
data->state.resume_from = attrs.filesize;
@@ -1455,7 +1652,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
if(data->set.ftp_append)
/* Try to open for append, but create if nonexisting */
flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_APPEND;
- else if (data->state.resume_from > 0)
+ else if(data->state.resume_from > 0)
/* If we have restart position then open for append */
flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_APPEND;
else
@@ -1464,7 +1661,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
sshc->sftp_handle =
libssh2_sftp_open_ex(sshc->sftp_session, sftp_scp->path,
- (unsigned int)strlen(sftp_scp->path),
+ curlx_uztoui(strlen(sftp_scp->path)),
flags, data->set.new_file_perms,
LIBSSH2_SFTP_OPENFILE);
@@ -1477,7 +1674,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
if(LIBSSH2_ERROR_SFTP_PROTOCOL == rc)
/* only when there was an SFTP protocol error can we extract
the sftp error! */
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ err = sftp_libssh2_last_error(sshc->sftp_session);
else
err = -1; /* not an sftp error at all */
@@ -1516,7 +1713,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
}
- /* If we have restart point then we need to seek to the correct
+ /* If we have a restart point then we need to seek to the correct
position. */
if(data->state.resume_from > 0) {
/* Let's read off the proper amount of bytes from the input. */
@@ -1525,7 +1722,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
SEEK_SET);
}
- if(seekerr != CURL_SEEKFUNC_OK){
+ if(seekerr != CURL_SEEKFUNC_OK) {
if(seekerr != CURL_SEEKFUNC_CANTSEEK) {
failf(data, "Could not seek stream");
@@ -1534,21 +1731,17 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */
else {
curl_off_t passed=0;
- curl_off_t readthisamountnow;
- curl_off_t actuallyread;
do {
- readthisamountnow = (data->state.resume_from - passed);
-
- if(readthisamountnow > BUFSIZE)
- readthisamountnow = BUFSIZE;
+ size_t readthisamountnow =
+ (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ?
+ BUFSIZE : curlx_sotouz(data->state.resume_from - passed);
- actuallyread =
- (curl_off_t) conn->fread_func(data->state.buffer, 1,
- (size_t)readthisamountnow,
- conn->fread_in);
+ size_t actuallyread =
+ data->set.fread_func(data->state.buffer, 1, readthisamountnow,
+ data->set.in);
passed += actuallyread;
- if((actuallyread <= 0) || (actuallyread > readthisamountnow)) {
+ if((actuallyread == 0) || (actuallyread > readthisamountnow)) {
/* this checks for greater-than only to make sure that the
CURL_READFUNC_ABORT return code still aborts */
failf(data, "Failed to read data");
@@ -1559,17 +1752,17 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
/* now, decrease the size of the read */
- if(data->set.infilesize>0) {
- data->set.infilesize -= data->state.resume_from;
- data->req.size = data->set.infilesize;
- Curl_pgrsSetUploadSize(data, data->set.infilesize);
+ if(data->state.infilesize > 0) {
+ data->state.infilesize -= data->state.resume_from;
+ data->req.size = data->state.infilesize;
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
}
SFTP_SEEK(sshc->sftp_handle, data->state.resume_from);
}
- if(data->set.infilesize>0) {
- data->req.size = data->set.infilesize;
- Curl_pgrsSetUploadSize(data, data->set.infilesize);
+ if(data->state.infilesize > 0) {
+ data->req.size = data->state.infilesize;
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
}
/* upload data */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL);
@@ -1586,6 +1779,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
figure out a "real" bitmask */
sshc->orig_waitfor = data->req.keepon;
+ /* we want to use the _sending_ function even when the socket turns
+ out readable as the underlying libssh2 sftp send function will deal
+ with both accordingly */
+ conn->cselect_bits = CURL_CSELECT_OUT;
+
+ /* since we don't really wait for anything at this point, we want the
+ state machine to move on as soon as possible so we set a very short
+ timeout here */
+ Curl_expire(data, 1);
+
state(conn, SSH_STOP);
}
break;
@@ -1602,7 +1805,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
break;
case SSH_SFTP_CREATE_DIRS:
- if((sshc->slash_pos = strchr(sshc->slash_pos, '/')) != NULL) {
+ sshc->slash_pos = strchr(sshc->slash_pos, '/');
+ if(sshc->slash_pos) {
*sshc->slash_pos = 0;
infof(data, "Creating directory '%s'\n", sftp_scp->path);
@@ -1617,7 +1821,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
case SSH_SFTP_CREATE_DIRS_MKDIR:
/* 'mode' - parameter is preliminary - default to 0644 */
rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sftp_scp->path,
- (unsigned int)strlen(sftp_scp->path),
+ curlx_uztoui(strlen(sftp_scp->path)),
data->set.new_directory_perms);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
@@ -1625,17 +1829,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
*sshc->slash_pos = '/';
++sshc->slash_pos;
if(rc == -1) {
- unsigned int sftp_err = 0;
/*
* Abort if failure wasn't that the dir already exists or the
* permission was denied (creation might succeed further down the
* path) - retry on unspecific FAILURE also
*/
- sftp_err = (unsigned int)(libssh2_sftp_last_error(sshc->sftp_session));
- if((sftp_err != LIBSSH2_FX_FILE_ALREADY_EXISTS) &&
- (sftp_err != LIBSSH2_FX_FAILURE) &&
- (sftp_err != LIBSSH2_FX_PERMISSION_DENIED)) {
- result = sftp_libssh2_error_to_CURLE(sftp_err);
+ err = sftp_libssh2_last_error(sshc->sftp_session);
+ if((err != LIBSSH2_FX_FILE_ALREADY_EXISTS) &&
+ (err != LIBSSH2_FX_FAILURE) &&
+ (err != LIBSSH2_FX_PERMISSION_DENIED)) {
+ result = sftp_libssh2_error_to_CURLE(err);
state(conn, SSH_SFTP_CLOSE);
sshc->actualcode = result?result:CURLE_SSH;
break;
@@ -1645,14 +1848,20 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
break;
case SSH_SFTP_READDIR_INIT:
+ Curl_pgrsSetDownloadSize(data, -1);
+ if(data->set.opt_no_body) {
+ state(conn, SSH_STOP);
+ break;
+ }
+
/*
* This is a directory that we are trying to get, so produce a directory
* listing
*/
sshc->sftp_handle = libssh2_sftp_open_ex(sshc->sftp_session,
sftp_scp->path,
- (unsigned int)
- strlen(sftp_scp->path),
+ curlx_uztoui(
+ strlen(sftp_scp->path)),
0, 0, LIBSSH2_SFTP_OPENDIR);
if(!sshc->sftp_handle) {
if(libssh2_session_last_errno(sshc->ssh_session) ==
@@ -1661,7 +1870,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
break;
}
else {
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ err = sftp_libssh2_last_error(sshc->sftp_session);
failf(data, "Could not open directory for reading: %s",
sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE);
@@ -1677,7 +1886,6 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
if((sshc->readdir_longentry = malloc(PATH_MAX+1)) == NULL) {
Curl_safefree(sshc->readdir_filename);
- sshc->readdir_filename = NULL;
state(conn, SSH_SFTP_CLOSE);
sshc->actualcode = CURLE_OUT_OF_MEMORY;
break;
@@ -1710,7 +1918,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
result = Curl_client_write(conn, CLIENTWRITE_BODY,
tmpLine, sshc->readdir_len+1);
- Curl_safefree(tmpLine);
+ free(tmpLine);
if(result) {
state(conn, SSH_STOP);
@@ -1732,9 +1940,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
sshc->readdir_line = calloc(sshc->readdir_totalLen, 1);
if(!sshc->readdir_line) {
Curl_safefree(sshc->readdir_filename);
- sshc->readdir_filename = NULL;
Curl_safefree(sshc->readdir_longentry);
- sshc->readdir_longentry = NULL;
state(conn, SSH_SFTP_CLOSE);
sshc->actualcode = CURLE_OUT_OF_MEMORY;
break;
@@ -1748,9 +1954,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
sshc->readdir_linkPath = malloc(PATH_MAX + 1);
if(sshc->readdir_linkPath == NULL) {
Curl_safefree(sshc->readdir_filename);
- sshc->readdir_filename = NULL;
Curl_safefree(sshc->readdir_longentry);
- sshc->readdir_longentry = NULL;
state(conn, SSH_SFTP_CLOSE);
sshc->actualcode = CURLE_OUT_OF_MEMORY;
break;
@@ -1767,23 +1971,19 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
else if(sshc->readdir_len == 0) {
Curl_safefree(sshc->readdir_filename);
- sshc->readdir_filename = NULL;
Curl_safefree(sshc->readdir_longentry);
- sshc->readdir_longentry = NULL;
state(conn, SSH_SFTP_READDIR_DONE);
break;
}
else if(sshc->readdir_len <= 0) {
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ err = sftp_libssh2_last_error(sshc->sftp_session);
result = sftp_libssh2_error_to_CURLE(err);
sshc->actualcode = result?result:CURLE_SSH;
failf(data, "Could not open remote file for reading: %s :: %d",
sftp_libssh2_strerror(err),
libssh2_session_last_errno(sshc->ssh_session));
Curl_safefree(sshc->readdir_filename);
- sshc->readdir_filename = NULL;
Curl_safefree(sshc->readdir_longentry);
- sshc->readdir_longentry = NULL;
state(conn, SSH_SFTP_CLOSE);
break;
}
@@ -1793,7 +1993,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
sshc->readdir_len =
libssh2_sftp_symlink_ex(sshc->sftp_session,
sshc->readdir_linkPath,
- (unsigned int) strlen(sshc->readdir_linkPath),
+ curlx_uztoui(strlen(sshc->readdir_linkPath)),
sshc->readdir_filename,
PATH_MAX, LIBSSH2_SFTP_READLINK);
if(sshc->readdir_len == LIBSSH2_ERROR_EAGAIN) {
@@ -1801,19 +2001,19 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
break;
}
Curl_safefree(sshc->readdir_linkPath);
- sshc->readdir_linkPath = NULL;
- sshc->readdir_line = realloc(sshc->readdir_line,
- sshc->readdir_totalLen + 4 +
- sshc->readdir_len);
- if(!sshc->readdir_line) {
+
+ /* get room for the filename and extra output */
+ sshc->readdir_totalLen += 4 + sshc->readdir_len;
+ new_readdir_line = realloc(sshc->readdir_line, sshc->readdir_totalLen);
+ if(!new_readdir_line) {
+ Curl_safefree(sshc->readdir_line);
Curl_safefree(sshc->readdir_filename);
- sshc->readdir_filename = NULL;
Curl_safefree(sshc->readdir_longentry);
- sshc->readdir_longentry = NULL;
state(conn, SSH_SFTP_CLOSE);
sshc->actualcode = CURLE_OUT_OF_MEMORY;
break;
}
+ sshc->readdir_line = new_readdir_line;
sshc->readdir_currLen += snprintf(sshc->readdir_line +
sshc->readdir_currLen,
@@ -1834,7 +2034,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
sshc->readdir_line,
sshc->readdir_currLen);
- if(result == CURLE_OK) {
+ if(!result) {
/* output debug output if that is requested */
if(data->set.verbose) {
@@ -1844,7 +2044,6 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
data->req.bytecount += sshc->readdir_currLen;
}
Curl_safefree(sshc->readdir_line);
- sshc->readdir_line = NULL;
if(result) {
state(conn, SSH_STOP);
}
@@ -1860,9 +2059,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
sshc->sftp_handle = NULL;
Curl_safefree(sshc->readdir_filename);
- sshc->readdir_filename = NULL;
Curl_safefree(sshc->readdir_longentry);
- sshc->readdir_longentry = NULL;
/* no data to transfer */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
@@ -1875,7 +2072,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
*/
sshc->sftp_handle =
libssh2_sftp_open_ex(sshc->sftp_session, sftp_scp->path,
- (unsigned int)strlen(sftp_scp->path),
+ curlx_uztoui(strlen(sftp_scp->path)),
LIBSSH2_FXF_READ, data->set.new_file_perms,
LIBSSH2_SFTP_OPENFILE);
if(!sshc->sftp_handle) {
@@ -1885,7 +2082,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
break;
}
else {
- err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+ err = sftp_libssh2_last_error(sshc->sftp_session);
failf(data, "Could not open remote file for reading: %s",
sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE);
@@ -1902,24 +2099,29 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
LIBSSH2_SFTP_ATTRIBUTES attrs;
rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path,
- (unsigned int)strlen(sftp_scp->path),
+ curlx_uztoui(strlen(sftp_scp->path)),
LIBSSH2_SFTP_STAT, &attrs);
if(rc == LIBSSH2_ERROR_EAGAIN) {
break;
}
- else if(rc) {
+ else if(rc ||
+ !(attrs.flags & LIBSSH2_SFTP_ATTR_SIZE) ||
+ (attrs.filesize == 0)) {
/*
* 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;
+ Curl_pgrsSetDownloadSize(data, -1);
}
else {
curl_off_t size = attrs.filesize;
if(size < 0) {
- failf(data, "Bad file size (%" FORMAT_OFF_T ")", size);
+ failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size);
return CURLE_BAD_DOWNLOAD_RESUME;
}
if(conn->data->state.use_range) {
@@ -1928,7 +2130,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
char *ptr2;
from=curlx_strtoofft(conn->data->state.range, &ptr, 0);
- while(*ptr && (isspace((int)*ptr) || (*ptr=='-')))
+ while(*ptr && (ISSPACE(*ptr) || (*ptr=='-')))
ptr++;
to=curlx_strtoofft(ptr, &ptr2, 0);
if((ptr == ptr2) /* no "to" value given */
@@ -1941,8 +2143,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
if(from >= size) {
failf(data, "Offset (%"
- FORMAT_OFF_T ") was beyond file size (%" FORMAT_OFF_T ")",
- from, attrs.filesize);
+ CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
+ CURL_FORMAT_CURL_OFF_T ")", from, attrs.filesize);
return CURLE_BAD_DOWNLOAD_RESUME;
}
if(from > to) {
@@ -1962,21 +2164,22 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* We can resume if we can seek to the resume position */
if(data->state.resume_from) {
- if(data->state.resume_from< 0) {
+ if(data->state.resume_from < 0) {
/* We're supposed to download the last abs(from) bytes */
if((curl_off_t)attrs.filesize < -data->state.resume_from) {
failf(data, "Offset (%"
- FORMAT_OFF_T ") was beyond file size (%" FORMAT_OFF_T ")",
+ CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
+ CURL_FORMAT_CURL_OFF_T ")",
data->state.resume_from, attrs.filesize);
return CURLE_BAD_DOWNLOAD_RESUME;
}
/* download from where? */
- data->state.resume_from = attrs.filesize - data->state.resume_from;
+ data->state.resume_from += attrs.filesize;
}
else {
if((curl_off_t)attrs.filesize < data->state.resume_from) {
- failf(data, "Offset (%" FORMAT_OFF_T
- ") was beyond file size (%" FORMAT_OFF_T ")",
+ failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T
+ ") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")",
data->state.resume_from, attrs.filesize);
return CURLE_BAD_DOWNLOAD_RESUME;
}
@@ -1990,6 +2193,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
SFTP_SEEK(sshc->sftp_handle, data->state.resume_from);
}
}
+
/* Setup the actual download */
if(data->req.size == 0) {
/* no data to transfer */
@@ -2005,11 +2209,14 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* not set by Curl_setup_transfer to preserve keepon bits */
conn->writesockfd = conn->sockfd;
- /* FIXME: here should be explained why we need it to start the
- * download */
+ /* we want to use the _receiving_ function even when the socket turns
+ out writableable as the underlying libssh2 recv function will deal
+ with both accordingly */
conn->cselect_bits = CURL_CSELECT_IN;
}
if(result) {
+ /* this should never occur; the close state should be entered
+ at the time the error occurs */
state(conn, SSH_SFTP_CLOSE);
sshc->actualcode = result;
}
@@ -2029,15 +2236,23 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
sshc->sftp_handle = NULL;
}
- Curl_safefree(sftp_scp->path);
- sftp_scp->path = NULL;
+ if(sftp_scp)
+ Curl_safefree(sftp_scp->path);
DEBUGF(infof(data, "SFTP DONE done\n"));
-#if 0 /* PREV */
- state(conn, SSH_SFTP_SHUTDOWN);
-#endif
- state(conn, SSH_STOP);
- result = sshc->actualcode;
+
+ /* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT
+ After nextstate is executed, the control should come back to
+ SSH_SFTP_CLOSE to pass the correct result back */
+ if(sshc->nextstate != SSH_NO_STATE &&
+ sshc->nextstate != SSH_SFTP_CLOSE) {
+ state(conn, sshc->nextstate);
+ sshc->nextstate = SSH_SFTP_CLOSE;
+ }
+ else {
+ state(conn, SSH_STOP);
+ result = sshc->actualcode;
+ }
break;
case SSH_SFTP_SHUTDOWN:
@@ -2067,7 +2282,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
Curl_safefree(sshc->homedir);
- sshc->homedir = NULL;
+ conn->data->state.most_recent_ftp_entrypath = NULL;
state(conn, SSH_SESSION_DISCONNECT);
break;
@@ -2081,7 +2296,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
if(data->set.upload) {
- if(data->set.infilesize < 0) {
+ if(data->state.infilesize < 0) {
failf(data, "SCP requires a known file size for upload");
sshc->actualcode = CURLE_UPLOAD_FAILED;
state(conn, SSH_SCP_CHANNEL_FREE);
@@ -2103,7 +2318,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
*/
sshc->ssh_channel =
SCP_SEND(sshc->ssh_session, sftp_scp->path, data->set.new_file_perms,
- data->set.infilesize);
+ data->state.infilesize);
if(!sshc->ssh_channel) {
if(libssh2_session_last_errno(sshc->ssh_session) ==
LIBSSH2_ERROR_EAGAIN) {
@@ -2135,6 +2350,15 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
sshc->actualcode = result;
}
else {
+ /* store this original bitmask setup to use later on if we can't
+ figure out a "real" bitmask */
+ sshc->orig_waitfor = data->req.keepon;
+
+ /* we want to use the _sending_ function even when the socket turns
+ out readable as the underlying libssh2 scp send function will deal
+ with both accordingly */
+ conn->cselect_bits = CURL_CSELECT_OUT;
+
state(conn, SSH_STOP);
}
break;
@@ -2181,8 +2405,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* not set by Curl_setup_transfer to preserve keepon bits */
conn->writesockfd = conn->sockfd;
- /* FIXME: here should be explained why we need it to start the
- * download */
+ /* we want to use the _receiving_ function even when the socket turns
+ out writableable as the underlying libssh2 recv function will deal
+ with both accordingly */
conn->cselect_bits = CURL_CSELECT_IN;
if(result) {
@@ -2285,7 +2510,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
Curl_safefree(sshc->homedir);
- sshc->homedir = NULL;
+ conn->data->state.most_recent_ftp_entrypath = NULL;
state(conn, SSH_SESSION_FREE);
break;
@@ -2298,6 +2523,25 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
#endif
+#ifdef HAVE_LIBSSH2_AGENT_API
+ if(sshc->ssh_agent) {
+ rc = libssh2_agent_disconnect(sshc->ssh_agent);
+ if(rc == LIBSSH2_ERROR_EAGAIN) {
+ break;
+ }
+ else if(rc < 0) {
+ infof(data, "Failed to disconnect from libssh2 agent\n");
+ }
+ libssh2_agent_free (sshc->ssh_agent);
+ sshc->ssh_agent = NULL;
+
+ /* NB: there is no need to free identities, they are part of internal
+ agent stuff */
+ sshc->sshagent_identity = NULL;
+ sshc->sshagent_prev_identity = NULL;
+ }
+#endif
+
if(sshc->ssh_session) {
rc = libssh2_session_free(sshc->ssh_session);
if(rc == LIBSSH2_ERROR_EAGAIN) {
@@ -2308,10 +2552,42 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
sshc->ssh_session = NULL;
}
- conn->bits.close = TRUE;
+
+ /* worst-case scenario cleanup */
+
+ DEBUGASSERT(sshc->ssh_session == NULL);
+ DEBUGASSERT(sshc->ssh_channel == NULL);
+ DEBUGASSERT(sshc->sftp_session == NULL);
+ DEBUGASSERT(sshc->sftp_handle == NULL);
+#ifdef HAVE_LIBSSH2_KNOWNHOST_API
+ DEBUGASSERT(sshc->kh == NULL);
+#endif
+#ifdef HAVE_LIBSSH2_AGENT_API
+ DEBUGASSERT(sshc->ssh_agent == NULL);
+#endif
+
+ Curl_safefree(sshc->rsa_pub);
+ Curl_safefree(sshc->rsa);
+
+ Curl_safefree(sshc->quote_path1);
+ Curl_safefree(sshc->quote_path2);
+
+ Curl_safefree(sshc->homedir);
+
+ Curl_safefree(sshc->readdir_filename);
+ Curl_safefree(sshc->readdir_longentry);
+ Curl_safefree(sshc->readdir_line);
+ Curl_safefree(sshc->readdir_linkPath);
+
+ /* the code we are about to return */
+ result = sshc->actualcode;
+
+ memset(sshc, 0, sizeof(struct ssh_conn));
+
+ connclose(conn, "SSH session free");
+ sshc->state = SSH_SESSION_FREE; /* current */
sshc->nextstate = SSH_NO_STATE;
state(conn, SSH_STOP);
- result = sshc->actualcode;
break;
case SSH_QUIT:
@@ -2394,9 +2670,7 @@ static void ssh_block2waitfor(struct connectdata *conn, bool block)
{
struct ssh_conn *sshc = &conn->proto.sshc;
int dir;
- if(!block)
- conn->waitfor = 0;
- else if((dir = libssh2_session_block_directions(sshc->ssh_session))) {
+ if(block && (dir = libssh2_session_block_directions(sshc->ssh_session))) {
/* translate the libssh2 define bits into our own bit defines */
conn->waitfor = ((dir&LIBSSH2_SESSION_BLOCK_INBOUND)?KEEP_RECV:0) |
((dir&LIBSSH2_SESSION_BLOCK_OUTBOUND)?KEEP_SEND:0);
@@ -2408,7 +2682,7 @@ static void ssh_block2waitfor(struct connectdata *conn, bool block)
}
#else
/* no libssh2 directional support so we simply don't know */
-#define ssh_block2waitfor(x,y)
+#define ssh_block2waitfor(x,y) Curl_nop_stmt
#endif
/* called repeatedly until done from multi.c */
@@ -2420,13 +2694,13 @@ static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done)
implementation */
result = ssh_statemach_act(conn, &block);
- *done = (bool)(sshc->state == SSH_STOP);
+ *done = (sshc->state == SSH_STOP) ? TRUE : FALSE;
ssh_block2waitfor(conn, block);
return result;
}
-static CURLcode ssh_easy_statemach(struct connectdata *conn,
+static CURLcode ssh_block_statemach(struct connectdata *conn,
bool duringconnect)
{
struct ssh_conn *sshc = &conn->proto.sshc;
@@ -2438,31 +2712,37 @@ static CURLcode ssh_easy_statemach(struct connectdata *conn,
long left;
result = ssh_statemach_act(conn, &block);
+ if(result)
+ break;
if(Curl_pgrsUpdate(conn))
return CURLE_ABORTED_BY_CALLBACK;
+ else {
+ struct timeval now = Curl_tvnow();
+ result = Curl_speedcheck(data, now);
+ if(result)
+ break;
+ }
- left = Curl_timeleft(conn, NULL, duringconnect);
+ left = Curl_timeleft(data, NULL, duringconnect);
if(left < 0) {
- failf(data, "Operation timed out\n");
+ failf(data, "Operation timed out");
return CURLE_OPERATION_TIMEDOUT;
}
#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
- if((CURLE_OK == result) && block) {
+ if(!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;
curl_socket_t fd_write = CURL_SOCKET_BAD;
- if (LIBSSH2_SESSION_BLOCK_INBOUND & dir) {
+ if(LIBSSH2_SESSION_BLOCK_INBOUND & dir)
fd_read = sock;
- }
- if (LIBSSH2_SESSION_BLOCK_OUTBOUND & dir) {
+ if(LIBSSH2_SESSION_BLOCK_OUTBOUND & dir)
fd_write = sock;
- }
/* wait for the socket to become ready */
Curl_socket_ready(fd_read, fd_write,
- (int)(left>1000?1000:left)); /* ignore result */
+ left>1000?1000:left); /* ignore result */
}
#endif
@@ -2474,25 +2754,14 @@ static CURLcode ssh_easy_statemach(struct connectdata *conn,
/*
* SSH setup and connection
*/
-static CURLcode ssh_init(struct connectdata *conn)
+static CURLcode ssh_setup_connection(struct connectdata *conn)
{
- struct SessionHandle *data = conn->data;
struct SSHPROTO *ssh;
- struct ssh_conn *sshc = &conn->proto.sshc;
- sshc->actualcode = CURLE_OK; /* reset error code */
- sshc->secondCreateDirs =0; /* reset the create dir attempt state
- variable */
-
- if(data->state.proto.ssh)
- return CURLE_OK;
-
- ssh = calloc(1, sizeof(struct SSHPROTO));
+ conn->data->req.protop = ssh = calloc(1, sizeof(struct SSHPROTO));
if(!ssh)
return CURLE_OUT_OF_MEMORY;
- data->state.proto.ssh = ssh;
-
return CURLE_OK;
}
@@ -2512,22 +2781,19 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
CURLcode result;
struct SessionHandle *data = conn->data;
+ /* initialize per-handle data if not already */
+ if(!data->req.protop)
+ ssh_setup_connection(conn);
+
/* We default to persistent connections. We set this already in this connect
function to make the re-use checks properly be able to check this bit. */
- conn->bits.close = FALSE;
-
- /* If there already is a protocol-specific struct allocated for this
- sessionhandle, deal with it */
- Curl_reset_reqproto(conn);
+ connkeep(conn, "SSH default");
- result = ssh_init(conn);
- if(result)
- return result;
-
- if(conn->protocol & PROT_SCP) {
+ if(conn->handler->protocol & CURLPROTO_SCP) {
conn->recv[FIRSTSOCKET] = scp_recv;
conn->send[FIRSTSOCKET] = scp_send;
- } else {
+ }
+ else {
conn->recv[FIRSTSOCKET] = sftp_recv;
conn->send[FIRSTSOCKET] = sftp_send;
}
@@ -2543,8 +2809,9 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
sock = conn->sock[FIRSTSOCKET];
#endif /* CURL_LIBSSH2_DEBUG */
- ssh->ssh_session = libssh2_session_init_ex(libssh2_malloc, libssh2_free,
- libssh2_realloc, conn);
+ ssh->ssh_session = libssh2_session_init_ex(my_libssh2_malloc,
+ my_libssh2_free,
+ my_libssh2_realloc, conn);
if(ssh->ssh_session == NULL) {
failf(data, "Failure initialising ssh session");
return CURLE_FAILED_INIT;
@@ -2563,10 +2830,9 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
rc = libssh2_knownhost_readfile(ssh->kh,
data->set.str[STRING_SSH_KNOWNHOSTS],
LIBSSH2_KNOWNHOST_FILE_OPENSSH);
- if(rc) {
+ if(rc < 0)
infof(data, "Failed to read known hosts from %s\n",
data->set.str[STRING_SSH_KNOWNHOSTS]);
- }
}
#endif /* HAVE_LIBSSH2_KNOWNHOST_API */
@@ -2575,15 +2841,9 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
infof(data, "SSH socket: %d\n", (int)sock);
#endif /* CURL_LIBSSH2_DEBUG */
- state(conn, SSH_S_STARTUP);
+ state(conn, SSH_INIT);
- if(data->state.used_interface == Curl_if_multi)
- result = ssh_multi_statemach(conn, done);
- else {
- result = ssh_easy_statemach(conn, TRUE);
- if(!result)
- *done = TRUE;
- }
+ result = ssh_multi_statemach(conn, done);
return result;
}
@@ -2612,14 +2872,9 @@ CURLcode scp_perform(struct connectdata *conn,
state(conn, SSH_SCP_TRANS_INIT);
/* run the state-machine */
- if(conn->data->state.used_interface == Curl_if_multi) {
- result = ssh_multi_statemach(conn, dophase_done);
- }
- else {
- result = ssh_easy_statemach(conn, FALSE);
- *dophase_done = TRUE; /* with the easy interface we are done here */
- }
- *connected = conn->bits.tcpconnect;
+ result = ssh_multi_statemach(conn, dophase_done);
+
+ *connected = conn->bits.tcpconnect[FIRSTSOCKET];
if(*dophase_done) {
DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -2648,56 +2903,49 @@ static CURLcode scp_doing(struct connectdata *conn,
static CURLcode ssh_do(struct connectdata *conn, bool *done)
{
- CURLcode res;
+ CURLcode result;
bool connected = 0;
struct SessionHandle *data = conn->data;
+ struct ssh_conn *sshc = &conn->proto.sshc;
*done = FALSE; /* default to false */
- /*
- Since connections can be re-used between SessionHandles, this might be a
- connection already existing but on a fresh SessionHandle struct so we must
- make sure we have a good 'struct SSHPROTO' to play with. For new
- connections, the struct SSHPROTO is allocated and setup in the
- ssh_connect() function.
- */
- Curl_reset_reqproto(conn);
- res = ssh_init(conn);
- if(res)
- return res;
-
data->req.size = -1; /* make sure this is unknown at this point */
+ sshc->actualcode = CURLE_OK; /* reset error code */
+ sshc->secondCreateDirs =0; /* reset the create dir attempt state
+ variable */
+
Curl_pgrsSetUploadCounter(data, 0);
Curl_pgrsSetDownloadCounter(data, 0);
- Curl_pgrsSetUploadSize(data, 0);
- Curl_pgrsSetDownloadSize(data, 0);
+ Curl_pgrsSetUploadSize(data, -1);
+ Curl_pgrsSetDownloadSize(data, -1);
- if(conn->protocol & PROT_SCP)
- res = scp_perform(conn, &connected, done);
+ if(conn->handler->protocol & CURLPROTO_SCP)
+ result = scp_perform(conn, &connected, done);
else
- res = sftp_perform(conn, &connected, done);
+ result = sftp_perform(conn, &connected, done);
- return res;
+ return result;
}
/* BLOCKING, but the function is using the state machine so the only reason
this is still blocking is that the multi interface code has no support for
disconnecting operations that takes a while */
-static CURLcode scp_disconnect(struct connectdata *conn)
+static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection)
{
CURLcode result = CURLE_OK;
struct ssh_conn *ssh = &conn->proto.sshc;
+ (void) dead_connection;
- Curl_safefree(conn->data->state.proto.ssh);
- conn->data->state.proto.ssh = NULL;
+ Curl_safefree(conn->data->req.protop);
if(ssh->ssh_session) {
/* only if there's a session still around to use! */
state(conn, SSH_SESSION_DISCONNECT);
- result = ssh_easy_statemach(conn, FALSE);
+ result = ssh_block_statemach(conn, FALSE);
}
return result;
@@ -2708,9 +2956,9 @@ static CURLcode scp_disconnect(struct connectdata *conn)
static CURLcode ssh_done(struct connectdata *conn, CURLcode status)
{
CURLcode result = CURLE_OK;
- struct SSHPROTO *sftp_scp = conn->data->state.proto.ssh;
+ struct SSHPROTO *sftp_scp = conn->data->req.protop;
- if(status == CURLE_OK) {
+ if(!status) {
/* run the state-machine
TODO: when the multi interface is used, this _really_ should be using
@@ -2718,14 +2966,15 @@ static CURLcode ssh_done(struct connectdata *conn, CURLcode status)
non-blocking DONE operations, not in the multi state machine and with
Curl_done() invokes on several places in the code!
*/
- result = ssh_easy_statemach(conn, FALSE);
+ result = ssh_block_statemach(conn, FALSE);
}
else
result = status;
- Curl_safefree(sftp_scp->path);
- sftp_scp->path = NULL;
- Curl_pgrsDone(conn);
+ if(sftp_scp)
+ Curl_safefree(sftp_scp->path);
+ if(Curl_pgrsDone(conn))
+ return CURLE_ABORTED_BY_CALLBACK;
conn->data->req.keepon = 0; /* clear all bits */
return result;
@@ -2737,7 +2986,7 @@ static CURLcode scp_done(struct connectdata *conn, CURLcode status,
{
(void)premature; /* not used */
- if(status == CURLE_OK)
+ if(!status)
state(conn, SSH_SCP_DONE);
return ssh_done(conn, status);
@@ -2761,6 +3010,10 @@ static ssize_t scp_send(struct connectdata *conn, int sockindex,
*err = CURLE_AGAIN;
nwrite = 0;
}
+ else if(nwrite < LIBSSH2_ERROR_NONE) {
+ *err = libssh2_session_error_to_CURLE((int)nwrite);
+ nwrite = -1;
+ }
return nwrite;
}
@@ -2780,7 +3033,7 @@ static ssize_t scp_recv(struct connectdata *conn, int sockindex,
libssh2_channel_read(conn->proto.sshc.ssh_channel, mem, len);
ssh_block2waitfor(conn, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
- if (nread == LIBSSH2_ERROR_EAGAIN) {
+ if(nread == LIBSSH2_ERROR_EAGAIN) {
*err = CURLE_AGAIN;
nread = -1;
}
@@ -2816,14 +3069,9 @@ CURLcode sftp_perform(struct connectdata *conn,
state(conn, SSH_SFTP_QUOTE_INIT);
/* run the state-machine */
- if(conn->data->state.used_interface == Curl_if_multi) {
- result = ssh_multi_statemach(conn, dophase_done);
- }
- else {
- result = ssh_easy_statemach(conn, FALSE);
- *dophase_done = TRUE; /* with the easy interface we are done here */
- }
- *connected = conn->bits.tcpconnect;
+ result = ssh_multi_statemach(conn, dophase_done);
+
+ *connected = conn->bits.tcpconnect[FIRSTSOCKET];
if(*dophase_done) {
DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -2836,8 +3084,7 @@ CURLcode sftp_perform(struct connectdata *conn,
static CURLcode sftp_doing(struct connectdata *conn,
bool *dophase_done)
{
- CURLcode result;
- result = ssh_multi_statemach(conn, dophase_done);
+ CURLcode result = ssh_multi_statemach(conn, dophase_done);
if(*dophase_done) {
DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -2848,19 +3095,19 @@ static CURLcode sftp_doing(struct connectdata *conn,
/* BLOCKING, but the function is using the state machine so the only reason
this is still blocking is that the multi interface code has no support for
disconnecting operations that takes a while */
-static CURLcode sftp_disconnect(struct connectdata *conn)
+static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection)
{
CURLcode result = CURLE_OK;
+ (void) dead_connection;
DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n"));
- Curl_safefree(conn->data->state.proto.ssh);
- conn->data->state.proto.ssh = NULL;
+ Curl_safefree(conn->data->req.protop);
if(conn->proto.sshc.ssh_session) {
/* only if there's a session still around to use! */
state(conn, SSH_SFTP_SHUTDOWN);
- result = ssh_easy_statemach(conn, FALSE);
+ result = ssh_block_statemach(conn, FALSE);
}
DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n"));
@@ -2874,12 +3121,13 @@ static CURLcode sftp_done(struct connectdata *conn, CURLcode status,
{
struct ssh_conn *sshc = &conn->proto.sshc;
- if(status == CURLE_OK) {
- /* Before we shut down, see if there are any post-quote commands to
- send: */
+ if(!status) {
+ /* Post quote commands are executed after the SFTP_CLOSE state to avoid
+ errors that could happen due to open file handles during POSTQUOTE
+ operation */
if(!status && !premature && conn->data->set.postquote) {
- sshc->nextstate = SSH_SFTP_CLOSE;
- state(conn, SSH_SFTP_POSTQUOTE_INIT);
+ sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
+ state(conn, SSH_SFTP_CLOSE);
}
else
state(conn, SSH_SFTP_CLOSE);
@@ -2904,12 +3152,17 @@ static ssize_t sftp_send(struct connectdata *conn, int sockindex,
*err = CURLE_AGAIN;
nwrite = 0;
}
+ else if(nwrite < LIBSSH2_ERROR_NONE) {
+ *err = libssh2_session_error_to_CURLE((int)nwrite);
+ nwrite = -1;
+ }
return nwrite;
}
/*
* Return number of received (decrypted) bytes
+ * or <0 on error
*/
static ssize_t sftp_recv(struct connectdata *conn, int sockindex,
char *mem, size_t len, CURLcode *err)
@@ -2924,6 +3177,10 @@ static ssize_t sftp_recv(struct connectdata *conn, int sockindex,
if(nread == LIBSSH2_ERROR_EAGAIN) {
*err = CURLE_AGAIN;
nread = -1;
+
+ }
+ else if(nread < 0) {
+ *err = libssh2_session_error_to_CURLE((int)nread);
}
return nread;
}
@@ -2969,7 +3226,7 @@ get_pathname(const char **cpp, char **path)
quot = *cp++;
/* Search for terminating quote, unescape some chars */
- for (i = j = 0; i <= strlen(cp); i++) {
+ for(i = j = 0; i <= strlen(cp); i++) {
if(cp[i] == quot) { /* Found quote */
i++;
(*path)[j] = '\0';
@@ -3010,13 +3267,12 @@ get_pathname(const char **cpp, char **path)
return CURLE_OK;
fail:
- Curl_safefree(*path);
- *path = NULL;
- return CURLE_QUOTE_ERROR;
+ Curl_safefree(*path);
+ return CURLE_QUOTE_ERROR;
}
-static const char *sftp_libssh2_strerror(unsigned long err)
+static const char *sftp_libssh2_strerror(int err)
{
switch (err) {
case LIBSSH2_FX_NO_SUCH_FILE:
diff --git a/lib/ssh.h b/lib/ssh.h
index 406220cc..b3cc54cc 100644
--- a/lib/ssh.h
+++ b/lib/ssh.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_LIBSSH2_H
#include <libssh2.h>
@@ -36,13 +36,17 @@ typedef enum {
SSH_NO_STATE = -1, /* Used for "nextState" so say there is none */
SSH_STOP = 0, /* do nothing state, stops the state machine */
- SSH_S_STARTUP, /* Session startup, First state in SSH-CONNECT */
+ SSH_INIT, /* First state in SSH-CONNECT */
+ SSH_S_STARTUP, /* Session startup */
SSH_HOSTKEY, /* verify hostkey */
SSH_AUTHLIST,
SSH_AUTH_PKEY_INIT,
SSH_AUTH_PKEY,
SSH_AUTH_PASS_INIT,
SSH_AUTH_PASS,
+ SSH_AUTH_AGENT_INIT, /* initialize then wait for connection to agent */
+ SSH_AUTH_AGENT_LIST, /* ask for list then wait for entire list to come */
+ SSH_AUTH_AGENT, /* attempt one key at a time */
SSH_AUTH_HOST_INIT,
SSH_AUTH_HOST,
SSH_AUTH_KEY_INIT,
@@ -114,6 +118,8 @@ struct ssh_conn {
char *quote_path1; /* two generic pointers for the QUOTE stuff */
char *quote_path2;
LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */
+ bool acceptfail; /* used by the SFTP_QUOTE (continue if
+ quote command fails) */
char *homedir; /* when doing SFTP we figure out home dir in the
connect phase */
@@ -136,6 +142,12 @@ struct ssh_conn {
LIBSSH2_SFTP_HANDLE *sftp_handle;
int orig_waitfor; /* default READ/WRITE bits wait for */
+#ifdef HAVE_LIBSSH2_AGENT_API
+ LIBSSH2_AGENT *ssh_agent; /* proxy to ssh-agent/pageant */
+ struct libssh2_agent_publickey *sshagent_identity,
+ *sshagent_prev_identity;
+#endif
+
/* note that HAVE_LIBSSH2_KNOWNHOST_API is a define set in the libssh2.h
header */
#ifdef HAVE_LIBSSH2_KNOWNHOST_API
@@ -146,22 +158,34 @@ 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 defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010000)
-# define HAVE_LIBSSH2_SFTP_SEEK64 1
-#else
-# undef HAVE_LIBSSH2_SFTP_SEEK64
+#if LIBSSH2_VERSION_NUM >= 0x010000
+#define HAVE_LIBSSH2_SFTP_SEEK64 1
+#endif
+
+#if LIBSSH2_VERSION_NUM >= 0x010100
+#define HAVE_LIBSSH2_VERSION 1
+#endif
+
+#if LIBSSH2_VERSION_NUM >= 0x010205
+#define HAVE_LIBSSH2_INIT 1
+#define HAVE_LIBSSH2_EXIT 1
#endif
-#if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010206)
-# define HAVE_LIBSSH2_SCP_SEND64 1
-#else
-# undef HAVE_LIBSSH2_SCP_SEND64
+#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/sslgen.c b/lib/sslgen.c
deleted file mode 100644
index bd8dc172..00000000
--- a/lib/sslgen.c
+++ /dev/null
@@ -1,472 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 file is for implementing all "generic" SSL functions that all libcurl
- internals should use. It is then responsible for calling the proper
- "backend" function.
-
- SSL-functions in libcurl should call functions in this source file, and not
- to any specific SSL-layer.
-
- Curl_ssl_ - prefix for generic ones
- Curl_ossl_ - prefix for OpenSSL ones
- Curl_gtls_ - prefix for GnuTLS ones
- Curl_nss_ - prefix for NSS ones
- Curl_polarssl_ - prefix for PolarSSL ones
-
- Note that this source code uses curlssl_* functions, and they are all
- defines/macros #defined by the lib-specific header files.
-
- "SSL/TLS Strong Encryption: An Introduction"
- http://httpd.apache.org/docs-2.0/ssl/ssl_intro.html
-*/
-
-#include "setup.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#include "urldata.h"
-#define SSLGEN_C
-#include "sslgen.h" /* generic SSL protos etc */
-#include "ssluse.h" /* OpenSSL versions */
-#include "gtls.h" /* GnuTLS versions */
-#include "nssg.h" /* NSS versions */
-#include "qssl.h" /* QSOSSL versions */
-#include "polarssl.h" /* PolarSSL versions */
-#include "sendf.h"
-#include "rawstr.h"
-#include "url.h"
-#include "curl_memory.h"
-#include "progress.h"
-/* The last #include file should be: */
-#include "memdebug.h"
-
-static bool safe_strequal(char* str1, char* str2)
-{
- if(str1 && str2)
- /* both pointers point to something then compare them */
- return (bool)(0 != Curl_raw_equal(str1, str2));
- else
- /* if both pointers are NULL then treat them as equal */
- return (bool)(!str1 && !str2);
-}
-
-bool
-Curl_ssl_config_matches(struct ssl_config_data* data,
- struct ssl_config_data* needle)
-{
- if((data->version == needle->version) &&
- (data->verifypeer == needle->verifypeer) &&
- (data->verifyhost == needle->verifyhost) &&
- safe_strequal(data->CApath, needle->CApath) &&
- safe_strequal(data->CAfile, needle->CAfile) &&
- safe_strequal(data->random_file, needle->random_file) &&
- safe_strequal(data->egdsocket, needle->egdsocket) &&
- safe_strequal(data->cipher_list, needle->cipher_list))
- return TRUE;
-
- return FALSE;
-}
-
-bool
-Curl_clone_ssl_config(struct ssl_config_data *source,
- struct ssl_config_data *dest)
-{
- dest->sessionid = source->sessionid;
- dest->verifyhost = source->verifyhost;
- dest->verifypeer = source->verifypeer;
- dest->version = source->version;
-
- if(source->CAfile) {
- dest->CAfile = strdup(source->CAfile);
- if(!dest->CAfile)
- return FALSE;
- }
- else
- dest->CAfile = NULL;
-
- if(source->CApath) {
- dest->CApath = strdup(source->CApath);
- if(!dest->CApath)
- return FALSE;
- }
- else
- dest->CApath = NULL;
-
- if(source->cipher_list) {
- dest->cipher_list = strdup(source->cipher_list);
- if(!dest->cipher_list)
- return FALSE;
- }
- else
- dest->cipher_list = NULL;
-
- if(source->egdsocket) {
- dest->egdsocket = strdup(source->egdsocket);
- if(!dest->egdsocket)
- return FALSE;
- }
- else
- dest->egdsocket = NULL;
-
- if(source->random_file) {
- dest->random_file = strdup(source->random_file);
- if(!dest->random_file)
- return FALSE;
- }
- else
- dest->random_file = NULL;
-
- return TRUE;
-}
-
-void Curl_free_ssl_config(struct ssl_config_data* sslc)
-{
- Curl_safefree(sslc->CAfile);
- Curl_safefree(sslc->CApath);
- Curl_safefree(sslc->cipher_list);
- Curl_safefree(sslc->egdsocket);
- Curl_safefree(sslc->random_file);
-}
-
-#ifdef USE_SSL
-
-/* "global" init done? */
-static bool init_ssl=FALSE;
-
-/**
- * Global SSL init
- *
- * @retval 0 error initializing SSL
- * @retval 1 SSL initialized successfully
- */
-int Curl_ssl_init(void)
-{
- /* make sure this is only done once */
- if(init_ssl)
- return 1;
- init_ssl = TRUE; /* never again */
-
- return curlssl_init();
-}
-
-
-/* Global cleanup */
-void Curl_ssl_cleanup(void)
-{
- if(init_ssl) {
- /* only cleanup if we did a previous init */
- curlssl_cleanup();
- init_ssl = FALSE;
- }
-}
-
-CURLcode
-Curl_ssl_connect(struct connectdata *conn, int sockindex)
-{
- CURLcode res;
- /* mark this is being ssl-enabled from here on. */
- conn->ssl[sockindex].use = TRUE;
- conn->ssl[sockindex].state = ssl_connection_negotiating;
-
- res = curlssl_connect(conn, sockindex);
-
- if(!res)
- Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
-
- return res;
-}
-
-CURLcode
-Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex,
- bool *done)
-{
-#ifdef curlssl_connect_nonblocking
- CURLcode res;
- /* mark this is being ssl requested from here on. */
- conn->ssl[sockindex].use = TRUE;
- res = curlssl_connect_nonblocking(conn, sockindex, done);
- if(!res && *done == TRUE)
- Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
- return res;
-#else
- *done = TRUE; /* fallback to BLOCKING */
- conn->ssl[sockindex].use = TRUE;
- return curlssl_connect(conn, sockindex);
-#endif /* non-blocking connect support */
-}
-
-/*
- * 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.
- */
-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;
- long i;
-
- if(!conn->ssl_config.sessionid)
- /* session ID re-use is disabled */
- return TRUE;
-
- for(i=0; i< data->set.ssl.numsessions; i++) {
- check = &data->state.session[i];
- if(!check->sessionid)
- /* not session ID means blank entry */
- continue;
- if(Curl_raw_equal(conn->host.name, check->name) &&
- (conn->remote_port == check->remote_port) &&
- Curl_ssl_config_matches(&conn->ssl_config, &check->ssl_config)) {
- /* yes, we have a session ID! */
- data->state.sessionage++; /* increase general age */
- check->age = data->state.sessionage; /* set this as used in this age */
- *ssl_sessionid = check->sessionid;
- if(idsize)
- *idsize = check->idsize;
- return FALSE;
- }
- }
- *ssl_sessionid = NULL;
- return TRUE;
-}
-
-/*
- * Kill a single session ID entry in the cache.
- */
-static int kill_session(struct curl_ssl_session *session)
-{
- if(session->sessionid) {
- /* defensive check */
-
- /* free the ID the SSL-layer specific way */
- curlssl_session_free(session->sessionid);
-
- session->sessionid=NULL;
- session->age = 0; /* fresh */
-
- Curl_free_ssl_config(&session->ssl_config);
-
- Curl_safefree(session->name);
- session->name = NULL; /* no name */
-
- return 0; /* ok */
- }
- else
- return 1;
-}
-
-/*
- * Delete the given session ID from the cache.
- */
-void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid)
-{
- int i;
- for(i=0; i< conn->data->set.ssl.numsessions; i++) {
- struct curl_ssl_session *check = &conn->data->state.session[i];
-
- if (check->sessionid == ssl_sessionid) {
- kill_session(check);
- break;
- }
- }
-}
-
-/*
- * Store session id in the session cache. The ID passed on to this function
- * must already have been extracted and allocated the proper way for the SSL
- * layer. Curl_XXXX_session_free() will be called to free/kill the session ID
- * later on.
- */
-CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
- void *ssl_sessionid,
- size_t idsize)
-{
- long i;
- struct SessionHandle *data=conn->data; /* the mother of all structs */
- struct curl_ssl_session *store = &data->state.session[0];
- long oldest_age=data->state.session[0].age; /* zero if unused */
- char *clone_host;
-
- /* Even though session ID re-use might be disabled, that only disables USING
- IT. We still store it here in case the re-using is again enabled for an
- upcoming transfer */
-
- clone_host = strdup(conn->host.name);
- if(!clone_host)
- return CURLE_OUT_OF_MEMORY; /* bail out */
-
- /* Now we should add the session ID and the host name to the cache, (remove
- the oldest if necessary) */
-
- /* find an empty slot for us, or find the oldest */
- for(i=1; (i<data->set.ssl.numsessions) &&
- data->state.session[i].sessionid; i++) {
- if(data->state.session[i].age < oldest_age) {
- oldest_age = data->state.session[i].age;
- store = &data->state.session[i];
- }
- }
- if(i == data->set.ssl.numsessions)
- /* cache is full, we must "kill" the oldest entry! */
- kill_session(store);
- else
- store = &data->state.session[i]; /* use this slot */
-
- /* now init the session struct wisely */
- store->sessionid = ssl_sessionid;
- store->idsize = idsize;
- store->age = data->state.sessionage; /* set current age */
- if (store->name)
- /* free it if there's one already present */
- free(store->name);
- store->name = clone_host; /* clone host name */
- store->remote_port = conn->remote_port; /* port number */
-
- if(!Curl_clone_ssl_config(&conn->ssl_config, &store->ssl_config))
- return CURLE_OUT_OF_MEMORY;
-
- return CURLE_OK;
-}
-
-
-void Curl_ssl_close_all(struct SessionHandle *data)
-{
- long i;
- /* kill the session ID cache */
- if(data->state.session) {
- for(i=0; i< data->set.ssl.numsessions; i++)
- /* the single-killer function handles empty table slots */
- kill_session(&data->state.session[i]);
-
- /* free the cache data */
- free(data->state.session);
- data->state.session = NULL;
- }
-
- curlssl_close_all(data);
-}
-
-void Curl_ssl_close(struct connectdata *conn, int sockindex)
-{
- DEBUGASSERT((sockindex <= 1) && (sockindex >= -1));
- curlssl_close(conn, sockindex);
-}
-
-CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex)
-{
- if(curlssl_shutdown(conn, sockindex))
- return CURLE_SSL_SHUTDOWN_FAILED;
-
- conn->ssl[sockindex].use = FALSE; /* get back to ordinary socket usage */
- conn->ssl[sockindex].state = ssl_connection_none;
-
- return CURLE_OK;
-}
-
-/* Selects an SSL crypto engine
- */
-CURLcode Curl_ssl_set_engine(struct SessionHandle *data, const char *engine)
-{
- return curlssl_set_engine(data, engine);
-}
-
-/* Selects the default SSL crypto engine
- */
-CURLcode Curl_ssl_set_engine_default(struct SessionHandle *data)
-{
- return curlssl_set_engine_default(data);
-}
-
-/* Return list of OpenSSL crypto engine names. */
-struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data)
-{
- return curlssl_engines_list(data);
-}
-
-/*
- * This sets up a session ID cache to the specified size. Make sure this code
- * is agnostic to what underlying SSL technology we use.
- */
-CURLcode Curl_ssl_initsessions(struct SessionHandle *data, long amount)
-{
- struct curl_ssl_session *session;
-
- if(data->state.session)
- /* this is just a precaution to prevent multiple inits */
- return CURLE_OK;
-
- session = calloc(amount, sizeof(struct curl_ssl_session));
- if(!session)
- return CURLE_OUT_OF_MEMORY;
-
- /* store the info in the SSL section */
- data->set.ssl.numsessions = amount;
- data->state.session = session;
- data->state.sessionage = 1; /* this is brand new */
- return CURLE_OK;
-}
-
-size_t Curl_ssl_version(char *buffer, size_t size)
-{
- return curlssl_version(buffer, size);
-}
-
-/*
- * This function tries to determine connection status.
- *
- * Return codes:
- * 1 means the connection is still in place
- * 0 means the connection has been closed
- * -1 means the connection status is unknown
- */
-int Curl_ssl_check_cxn(struct connectdata *conn)
-{
- return curlssl_check_cxn(conn);
-}
-
-bool Curl_ssl_data_pending(const struct connectdata *conn,
- int connindex)
-{
- return curlssl_data_pending(conn, connindex);
-}
-
-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; i<ci->num_of_certs; i++)
- curl_slist_free_all(ci->certinfo[i]);
- free(ci->certinfo); /* free the actual array too */
- ci->num_of_certs = 0;
- }
-}
-#endif /* USE_SSL */
diff --git a/lib/sslgen.h b/lib/sslgen.h
deleted file mode 100644
index 997e30d3..00000000
--- a/lib/sslgen.h
+++ /dev/null
@@ -1,92 +0,0 @@
-#ifndef __SSLGEN_H
-#define __SSLGEN_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2008, 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-bool Curl_ssl_config_matches(struct ssl_config_data* data,
- struct ssl_config_data* needle);
-bool Curl_clone_ssl_config(struct ssl_config_data* source,
- struct ssl_config_data* dest);
-void Curl_free_ssl_config(struct ssl_config_data* sslc);
-
-#ifdef USE_SSL
-int Curl_ssl_init(void);
-void Curl_ssl_cleanup(void);
-CURLcode Curl_ssl_connect(struct connectdata *conn, int sockindex);
-CURLcode Curl_ssl_connect_nonblocking(struct connectdata *conn,
- int sockindex,
- bool *done);
-/* tell the SSL stuff to close down all open information regarding
- connections (and thus session ID caching etc) */
-void Curl_ssl_close_all(struct SessionHandle *data);
-void Curl_ssl_close(struct connectdata *conn, int sockindex);
-CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex);
-CURLcode Curl_ssl_set_engine(struct SessionHandle *data, const char *engine);
-/* Sets engine as default for all SSL operations */
-CURLcode Curl_ssl_set_engine_default(struct SessionHandle *data);
-struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data);
-
-/* init the SSL session ID cache */
-CURLcode Curl_ssl_initsessions(struct SessionHandle *, long);
-size_t Curl_ssl_version(char *buffer, size_t size);
-bool Curl_ssl_data_pending(const struct connectdata *conn,
- int connindex);
-int Curl_ssl_check_cxn(struct connectdata *conn);
-void Curl_ssl_free_certinfo(struct SessionHandle *data);
-
-/* Functions to be used by SSL library adaptation functions */
-
-/* extract a session ID */
-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,
- size_t idsize);
-/* delete a session from the cache */
-void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid);
-
-#define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
-
-#else
-/* When SSL support is not present, just define away these function calls */
-#define Curl_ssl_init() 1
-#define Curl_ssl_cleanup() do { } while (0)
-#define Curl_ssl_connect(x,y) CURLE_FAILED_INIT
-#define Curl_ssl_close_all(x)
-#define Curl_ssl_close(x,y)
-#define Curl_ssl_shutdown(x,y) CURLE_FAILED_INIT
-#define Curl_ssl_set_engine(x,y) CURLE_FAILED_INIT
-#define Curl_ssl_set_engine_default(x) CURLE_FAILED_INIT
-#define Curl_ssl_engines_list(x) NULL
-#define Curl_ssl_send(a,b,c,d,e) -1
-#define Curl_ssl_recv(a,b,c,d,e) -1
-#define Curl_ssl_initsessions(x,y) CURLE_OK
-#define Curl_ssl_version(x,y) 0
-#define Curl_ssl_data_pending(x,y) 0
-#define Curl_ssl_check_cxn(x) 0
-#define Curl_ssl_free_certinfo(x)
-
-#endif
-
-#endif /* USE_SSL */
diff --git a/lib/ssluse.c b/lib/ssluse.c
deleted file mode 100644
index 474bc9a3..00000000
--- a/lib/ssluse.c
+++ /dev/null
@@ -1,2658 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-/*
- * Source file for all OpenSSL-specific code for the TLS/SSL layer. No code
- * but sslgen.c should ever call or use these functions.
- */
-
-/*
- * The original SSLeay-using code for curl was written by Linas Vepstas and
- * Sampo Kellomaki 1998.
- */
-
-#include "setup.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#include "urldata.h"
-#include "sendf.h"
-#include "formdata.h" /* for the boundary function */
-#include "url.h" /* for the ssl config check function */
-#include "inet_pton.h"
-#include "ssluse.h"
-#include "connect.h"
-#include "strequal.h"
-#include "select.h"
-#include "sslgen.h"
-#include "rawstr.h"
-
-#define _MPRINTF_REPLACE /* use the internal *printf() functions */
-#include <curl/mprintf.h>
-
-#ifdef USE_SSLEAY
-
-#ifdef USE_OPENSSL
-#include <openssl/rand.h>
-#include <openssl/x509v3.h>
-#include <openssl/dsa.h>
-#include <openssl/dh.h>
-#include <openssl/err.h>
-#else
-#include <rand.h>
-#include <x509v3.h>
-#endif
-
-#include "curl_memory.h"
-#include "easyif.h" /* for Curl_convert_from_utf8 prototype */
-
-/* The last #include file should be: */
-#include "memdebug.h"
-
-#if OPENSSL_VERSION_NUMBER >= 0x0090581fL
-#define HAVE_SSL_GET1_SESSION 1
-#else
-#undef HAVE_SSL_GET1_SESSION
-#endif
-
-#if OPENSSL_VERSION_NUMBER >= 0x00904100L
-#define HAVE_USERDATA_IN_PWD_CALLBACK 1
-#else
-#undef HAVE_USERDATA_IN_PWD_CALLBACK
-#endif
-
-#if OPENSSL_VERSION_NUMBER >= 0x00907001L
-/* ENGINE_load_private_key() takes four arguments */
-#define HAVE_ENGINE_LOAD_FOUR_ARGS
-#include <openssl/ui.h>
-#else
-/* ENGINE_load_private_key() takes three arguments */
-#undef HAVE_ENGINE_LOAD_FOUR_ARGS
-#endif
-
-#if (OPENSSL_VERSION_NUMBER >= 0x00903001L) && defined(HAVE_OPENSSL_PKCS12_H)
-/* OpenSSL has PKCS 12 support */
-#define HAVE_PKCS12_SUPPORT
-#else
-/* OpenSSL/SSLEay does not have PKCS12 support */
-#undef HAVE_PKCS12_SUPPORT
-#endif
-
-#if OPENSSL_VERSION_NUMBER >= 0x00906001L
-#define HAVE_ERR_ERROR_STRING_N 1
-#endif
-
-#if OPENSSL_VERSION_NUMBER >= 0x00909000L
-#define SSL_METHOD_QUAL const
-#else
-#define SSL_METHOD_QUAL
-#endif
-
-#if OPENSSL_VERSION_NUMBER >= 0x00907000L
-/* 0.9.6 didn't have X509_STORE_set_flags() */
-#define HAVE_X509_STORE_SET_FLAGS 1
-#else
-#define X509_STORE_set_flags(x,y)
-#endif
-
-/*
- * Number of bytes to read from the random number seed file. This must be
- * a finite value (because some entropy "files" like /dev/urandom have
- * an infinite length), but must be large enough to provide enough
- * entopy to properly seed OpenSSL's PRNG.
- */
-#define RAND_LOAD_LENGTH 1024
-
-#ifndef HAVE_USERDATA_IN_PWD_CALLBACK
-static char global_passwd[64];
-#endif
-
-static int passwd_callback(char *buf, int num, int verify
-#ifdef HAVE_USERDATA_IN_PWD_CALLBACK
- /* This was introduced in 0.9.4, we can set this
- using SSL_CTX_set_default_passwd_cb_userdata()
- */
- , void *global_passwd
-#endif
- )
-{
- if(verify)
- fprintf(stderr, "%s\n", buf);
- else {
- if(num > (int)strlen((char *)global_passwd)) {
- strcpy(buf, global_passwd);
- return (int)strlen(buf);
- }
- }
- return 0;
-}
-
-/*
- * rand_enough() is a function that returns TRUE if we have seeded the random
- * engine properly. We use some preprocessor magic to provide a seed_enough()
- * macro to use, just to prevent a compiler warning on this function if we
- * pass in an argument that is never used.
- */
-
-#ifdef HAVE_RAND_STATUS
-#define seed_enough(x) rand_enough()
-static bool rand_enough(void)
-{
- return (bool)(0 != RAND_status());
-}
-#else
-#define seed_enough(x) rand_enough(x)
-static bool rand_enough(int nread)
-{
- /* this is a very silly decision to make */
- return (bool)(nread > 500);
-}
-#endif
-
-static int ossl_seed(struct SessionHandle *data)
-{
- char *buf = data->state.buffer; /* point to the big buffer */
- int nread=0;
-
- /* Q: should we add support for a random file name as a libcurl option?
- A: Yes, it is here */
-
-#ifndef RANDOM_FILE
- /* if RANDOM_FILE isn't defined, we only perform this if an option tells
- us to! */
- if(data->set.ssl.random_file)
-#define RANDOM_FILE "" /* doesn't matter won't be used */
-#endif
- {
- /* let the option override the define */
- nread += RAND_load_file((data->set.str[STRING_SSL_RANDOM_FILE]?
- data->set.str[STRING_SSL_RANDOM_FILE]:
- RANDOM_FILE),
- RAND_LOAD_LENGTH);
- if(seed_enough(nread))
- return nread;
- }
-
-#if defined(HAVE_RAND_EGD)
- /* only available in OpenSSL 0.9.5 and later */
- /* EGD_SOCKET is set at configure time or not at all */
-#ifndef EGD_SOCKET
- /* If we don't have the define set, we only do this if the egd-option
- is set */
- if(data->set.str[STRING_SSL_EGDSOCKET])
-#define EGD_SOCKET "" /* doesn't matter won't be used */
-#endif
- {
- /* If there's an option and a define, the option overrides the
- define */
- int ret = RAND_egd(data->set.str[STRING_SSL_EGDSOCKET]?
- data->set.str[STRING_SSL_EGDSOCKET]:EGD_SOCKET);
- if(-1 != ret) {
- nread += ret;
- if(seed_enough(nread))
- return nread;
- }
- }
-#endif
-
- /* If we get here, it means we need to seed the PRNG using a "silly"
- approach! */
-#ifdef HAVE_RAND_SCREEN
- /* if RAND_screen() is present, it was called during global init */
- nread = 100; /* just a value */
-#else
- {
- int len;
- char *area;
-
- /* Changed call to RAND_seed to use the underlying RAND_add implementation
- * directly. Do this in a loop, with the amount of additional entropy
- * being dependent upon the algorithm used by Curl_FormBoundary(): N bytes
- * of a 7-bit ascii set. -- Richard Gorton, March 11 2003.
- */
-
- do {
- area = Curl_FormBoundary();
- if(!area)
- return 3; /* out of memory */
-
- len = (int)strlen(area);
- RAND_add(area, len, (len >> 1));
-
- free(area); /* now remove the random junk */
- } while(!RAND_status());
- }
-#endif
-
- /* generates a default path for the random seed file */
- buf[0]=0; /* blank it first */
- RAND_file_name(buf, BUFSIZE);
- if(buf[0]) {
- /* we got a file name to try */
- nread += RAND_load_file(buf, RAND_LOAD_LENGTH);
- if(seed_enough(nread))
- return nread;
- }
-
- infof(data, "libcurl is now using a weak random seed!\n");
- return nread;
-}
-
-int Curl_ossl_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;
-
- if(!ssl_seeded || data->set.str[STRING_SSL_RANDOM_FILE] ||
- data->set.str[STRING_SSL_EGDSOCKET]) {
- ossl_seed(data);
- ssl_seeded = TRUE;
- }
- return 0;
-}
-
-
-#ifndef SSL_FILETYPE_ENGINE
-#define SSL_FILETYPE_ENGINE 42
-#endif
-#ifndef SSL_FILETYPE_PKCS12
-#define SSL_FILETYPE_PKCS12 43
-#endif
-static int do_file_type(const char *type)
-{
- if(!type || !type[0])
- return SSL_FILETYPE_PEM;
- if(Curl_raw_equal(type, "PEM"))
- return SSL_FILETYPE_PEM;
- if(Curl_raw_equal(type, "DER"))
- return SSL_FILETYPE_ASN1;
- if(Curl_raw_equal(type, "ENG"))
- return SSL_FILETYPE_ENGINE;
- if(Curl_raw_equal(type, "P12"))
- return SSL_FILETYPE_PKCS12;
- return -1;
-}
-
-static
-int cert_stuff(struct connectdata *conn,
- SSL_CTX* ctx,
- char *cert_file,
- const char *cert_type,
- char *key_file,
- const char *key_type)
-{
- struct SessionHandle *data = conn->data;
-
- int file_type = do_file_type(cert_type);
-
- if(cert_file != NULL || file_type == SSL_FILETYPE_ENGINE) {
- SSL *ssl;
- X509 *x509;
- int cert_done = 0;
-
- if(data->set.str[STRING_KEY_PASSWD]) {
-#ifndef HAVE_USERDATA_IN_PWD_CALLBACK
- /*
- * If password has been given, we store that in the global
- * area (*shudder*) for a while:
- */
- size_t len = strlen(data->set.key_passwd);
- if(len < sizeof(global_passwd))
- memcpy(global_passwd, data->set.key_passwd, len+1);
-#else
- /*
- * We set the password in the callback userdata
- */
- SSL_CTX_set_default_passwd_cb_userdata(ctx,
- data->set.str[STRING_KEY_PASSWD]);
-#endif
- /* Set passwd callback: */
- SSL_CTX_set_default_passwd_cb(ctx, passwd_callback);
- }
-
-
-#define SSL_CLIENT_CERT_ERR \
- "unable to use client certificate (no key found or wrong pass phrase?)"
-
- switch(file_type) {
- case SSL_FILETYPE_PEM:
- /* SSL_CTX_use_certificate_chain_file() only works on PEM files */
- if(SSL_CTX_use_certificate_chain_file(ctx,
- cert_file) != 1) {
- failf(data, SSL_CLIENT_CERT_ERR);
- return 0;
- }
- break;
-
- case SSL_FILETYPE_ASN1:
- /* SSL_CTX_use_certificate_file() works with either PEM or ASN1, but
- we use the case above for PEM so this can only be performed with
- ASN1 files. */
- if(SSL_CTX_use_certificate_file(ctx,
- cert_file,
- file_type) != 1) {
- failf(data, SSL_CLIENT_CERT_ERR);
- return 0;
- }
- break;
- case SSL_FILETYPE_ENGINE:
-#if defined(HAVE_OPENSSL_ENGINE_H) && defined(ENGINE_CTRL_GET_CMD_FROM_NAME)
- {
- if(data->state.engine) {
- const char *cmd_name = "LOAD_CERT_CTRL";
- struct {
- const char *cert_id;
- X509 *cert;
- } params;
-
- params.cert_id = cert_file;
- params.cert = NULL;
-
- /* Does the engine supports LOAD_CERT_CTRL ? */
- if (!ENGINE_ctrl(data->state.engine, ENGINE_CTRL_GET_CMD_FROM_NAME,
- 0, (void *)cmd_name, NULL)) {
- failf(data, "ssl engine does not support loading certificates");
- return 0;
- }
-
- /* Load the certificate from the engine */
- if (!ENGINE_ctrl_cmd(data->state.engine, cmd_name,
- 0, &params, NULL, 1)) {
- failf(data, "ssl engine cannot load client cert with id"
- " '%s' [%s]", cert_file,
- ERR_error_string(ERR_get_error(), NULL));
- return 0;
- }
-
- if (!params.cert) {
- failf(data, "ssl engine didn't initialized the certificate "
- "properly.");
- return 0;
- }
-
- if(SSL_CTX_use_certificate(ctx, params.cert) != 1) {
- failf(data, "unable to set client certificate");
- X509_free(params.cert);
- return 0;
- }
- X509_free(params.cert); /* we don't need the handle any more... */
- }
- else {
- failf(data, "crypto engine not set, can't load certificate");
- return 0;
- }
- }
- break;
-#else
- failf(data, "file type ENG for certificate not implemented");
- return 0;
-#endif
-
- case SSL_FILETYPE_PKCS12:
- {
-#ifdef HAVE_PKCS12_SUPPORT
- FILE *f;
- PKCS12 *p12;
- EVP_PKEY *pri;
- STACK_OF(X509) *ca = NULL;
- int i;
-
- f = fopen(cert_file,"rb");
- if(!f) {
- failf(data, "could not open PKCS12 file '%s'", cert_file);
- return 0;
- }
- p12 = d2i_PKCS12_fp(f, NULL);
- fclose(f);
-
- if(!p12) {
- failf(data, "error reading PKCS12 file '%s'", cert_file );
- return 0;
- }
-
- PKCS12_PBE_add();
-
- if(!PKCS12_parse(p12, data->set.str[STRING_KEY_PASSWD], &pri, &x509,
- &ca)) {
- failf(data,
- "could not parse PKCS12 file, check password, OpenSSL error %s",
- ERR_error_string(ERR_get_error(), NULL) );
- PKCS12_free(p12);
- return 0;
- }
-
- PKCS12_free(p12);
-
- if(SSL_CTX_use_certificate(ctx, x509) != 1) {
- failf(data, SSL_CLIENT_CERT_ERR);
- EVP_PKEY_free(pri);
- X509_free(x509);
- return 0;
- }
-
- if(SSL_CTX_use_PrivateKey(ctx, pri) != 1) {
- failf(data, "unable to use private key from PKCS12 file '%s'",
- cert_file);
- EVP_PKEY_free(pri);
- X509_free(x509);
- return 0;
- }
-
- if (!SSL_CTX_check_private_key (ctx)) {
- failf(data, "private key from PKCS12 file '%s' "
- "does not match certificate in same file", cert_file);
- EVP_PKEY_free(pri);
- X509_free(x509);
- return 0;
- }
- /* Set Certificate Verification chain */
- if (ca && sk_X509_num(ca)) {
- for (i = 0; i < sk_X509_num(ca); i++) {
- if (!SSL_CTX_add_extra_chain_cert(ctx,sk_X509_value(ca, i))) {
- failf(data, "cannot add certificate to certificate chain");
- EVP_PKEY_free(pri);
- X509_free(x509);
- return 0;
- }
- if (!SSL_CTX_add_client_CA(ctx, sk_X509_value(ca, i))) {
- failf(data, "cannot add certificate to client CA list");
- EVP_PKEY_free(pri);
- X509_free(x509);
- return 0;
- }
- }
- }
-
- EVP_PKEY_free(pri);
- X509_free(x509);
- cert_done = 1;
- break;
-#else
- failf(data, "file type P12 for certificate not supported");
- return 0;
-#endif
- }
- default:
- failf(data, "not supported file type '%s' for certificate", cert_type);
- return 0;
- }
-
- file_type = do_file_type(key_type);
-
- switch(file_type) {
- case SSL_FILETYPE_PEM:
- if(cert_done)
- break;
- if(key_file == NULL)
- /* cert & key can only be in PEM case in the same file */
- key_file=cert_file;
- case SSL_FILETYPE_ASN1:
- if(SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type) != 1) {
- failf(data, "unable to set private key file: '%s' type %s",
- key_file, key_type?key_type:"PEM");
- return 0;
- }
- break;
- case SSL_FILETYPE_ENGINE:
-#ifdef HAVE_OPENSSL_ENGINE_H
- { /* XXXX still needs some work */
- EVP_PKEY *priv_key = NULL;
- if(data->state.engine) {
-#ifdef HAVE_ENGINE_LOAD_FOUR_ARGS
- UI_METHOD *ui_method = UI_OpenSSL();
-#endif
- /* the typecast below was added to please mingw32 */
- priv_key = (EVP_PKEY *)
- ENGINE_load_private_key(data->state.engine,key_file,
-#ifdef HAVE_ENGINE_LOAD_FOUR_ARGS
- ui_method,
-#endif
- data->set.str[STRING_KEY_PASSWD]);
- if(!priv_key) {
- failf(data, "failed to load private key from crypto engine");
- return 0;
- }
- if(SSL_CTX_use_PrivateKey(ctx, priv_key) != 1) {
- failf(data, "unable to set private key");
- EVP_PKEY_free(priv_key);
- return 0;
- }
- EVP_PKEY_free(priv_key); /* we don't need the handle any more... */
- }
- else {
- failf(data, "crypto engine not set, can't load private key");
- return 0;
- }
- }
- break;
-#else
- failf(data, "file type ENG for private key not supported");
- return 0;
-#endif
- case SSL_FILETYPE_PKCS12:
- if(!cert_done) {
- failf(data, "file type P12 for private key not supported");
- return 0;
- }
- break;
- default:
- failf(data, "not supported file type for private key");
- return 0;
- }
-
- ssl=SSL_new(ctx);
- if(NULL == ssl) {
- failf(data,"unable to create an SSL structure");
- return 0;
- }
-
- x509=SSL_get_certificate(ssl);
-
- /* This version was provided by Evan Jordan and is supposed to not
- leak memory as the previous version: */
- if(x509 != NULL) {
- EVP_PKEY *pktmp = X509_get_pubkey(x509);
- EVP_PKEY_copy_parameters(pktmp,SSL_get_privatekey(ssl));
- EVP_PKEY_free(pktmp);
- }
-
- SSL_free(ssl);
-
- /* If we are using DSA, we can copy the parameters from
- * the private key */
-
-
- /* Now we know that a key and cert have been set against
- * the SSL context */
- if(!SSL_CTX_check_private_key(ctx)) {
- failf(data, "Private key does not match the certificate public key");
- return 0;
- }
-#ifndef HAVE_USERDATA_IN_PWD_CALLBACK
- /* erase it now */
- memset(global_passwd, 0, sizeof(global_passwd));
-#endif
- }
- return 1;
-}
-
-/* returns non-zero on failure */
-static int x509_name_oneline(X509_NAME *a, char *buf, size_t size)
-{
-#if 0
- return X509_NAME_oneline(a, buf, size);
-#else
- BIO *bio_out = BIO_new(BIO_s_mem());
- BUF_MEM *biomem;
- int rc;
-
- if(!bio_out)
- return 1; /* alloc failed! */
-
- rc = X509_NAME_print_ex(bio_out, a, 0, XN_FLAG_SEP_SPLUS_SPC);
- BIO_get_mem_ptr(bio_out, &biomem);
-
- if((size_t)biomem->length < size)
- size = biomem->length;
- else
- size--; /* don't overwrite the buffer end */
-
- memcpy(buf, biomem->data, size);
- buf[size]=0;
-
- BIO_free(bio_out);
-
- return !rc;
-#endif
-}
-
-static
-int cert_verify_callback(int ok, X509_STORE_CTX *ctx)
-{
- X509 *err_cert;
- char buf[256];
-
- err_cert=X509_STORE_CTX_get_current_cert(ctx);
- (void)x509_name_oneline(X509_get_subject_name(err_cert), buf, sizeof(buf));
- return ok;
-}
-
-/* Return error string for last OpenSSL error
- */
-static char *SSL_strerror(unsigned long error, char *buf, size_t size)
-{
-#ifdef HAVE_ERR_ERROR_STRING_N
- /* OpenSSL 0.9.6 and later has a function named
- ERRO_error_string_n() that takes the size of the buffer as a
- third argument */
- ERR_error_string_n(error, buf, size);
-#else
- (void) size;
- ERR_error_string(error, buf);
-#endif
- return buf;
-}
-
-#endif /* USE_SSLEAY */
-
-#ifdef USE_SSLEAY
-/**
- * Global SSL init
- *
- * @retval 0 error initializing SSL
- * @retval 1 SSL initialized successfully
- */
-int Curl_ossl_init(void)
-{
-#ifdef HAVE_ENGINE_LOAD_BUILTIN_ENGINES
- ENGINE_load_builtin_engines();
-#endif
-
- /* Lets get nice error messages */
- SSL_load_error_strings();
-
- /* Init the global ciphers and digests */
- if(!SSLeay_add_ssl_algorithms())
- return 0;
-
- OpenSSL_add_all_algorithms();
-
-#ifdef HAVE_RAND_SCREEN
- /* This one gets a random value by reading the currently shown screen.
- RAND_screen() is not thread-safe according to OpenSSL devs - although not
- mentioned in documentation. */
- RAND_screen();
-#endif
-
- return 1;
-}
-
-#endif /* USE_SSLEAY */
-
-#ifdef USE_SSLEAY
-
-/* Global cleanup */
-void Curl_ossl_cleanup(void)
-{
- /* Free the SSL error strings */
- ERR_free_strings();
-
- /* EVP_cleanup() removes all ciphers and digests from the table. */
- EVP_cleanup();
-
-#ifdef HAVE_ENGINE_CLEANUP
- ENGINE_cleanup();
-#endif
-
-#ifdef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
- /* this function was not present in 0.9.6b, but was added sometimes
- later */
- CRYPTO_cleanup_all_ex_data();
-#endif
-}
-
-/*
- * This function uses SSL_peek to determine connection status.
- *
- * Return codes:
- * 1 means the connection is still in place
- * 0 means the connection has been closed
- * -1 means the connection status is unknown
- */
-int Curl_ossl_check_cxn(struct connectdata *conn)
-{
- int rc;
- char buf;
-
- rc = SSL_peek(conn->ssl[FIRSTSOCKET].handle, (void*)&buf, 1);
- if(rc > 0)
- return 1; /* connection still in place */
-
- if(rc == 0)
- return 0; /* connection has been closed */
-
- return -1; /* connection status unknown */
-}
-
-/* Selects an OpenSSL crypto engine
- */
-CURLcode Curl_ossl_set_engine(struct SessionHandle *data, const char *engine)
-{
-#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
- ENGINE *e;
-
-#if OPENSSL_VERSION_NUMBER >= 0x00909000L
- e = ENGINE_by_id(engine);
-#else
- /* avoid memory leak */
- for(e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) {
- const char *e_id = ENGINE_get_id(e);
- if(!strcmp(engine, e_id))
- break;
- }
-#endif
-
- if(!e) {
- failf(data, "SSL Engine '%s' not found", engine);
- return CURLE_SSL_ENGINE_NOTFOUND;
- }
-
- if(data->state.engine) {
- ENGINE_finish(data->state.engine);
- ENGINE_free(data->state.engine);
- data->state.engine = NULL;
- }
- if(!ENGINE_init(e)) {
- char buf[256];
-
- ENGINE_free(e);
- failf(data, "Failed to initialise SSL Engine '%s':\n%s",
- engine, SSL_strerror(ERR_get_error(), buf, sizeof(buf)));
- return CURLE_SSL_ENGINE_INITFAILED;
- }
- data->state.engine = e;
- return CURLE_OK;
-#else
- (void)engine;
- failf(data, "SSL Engine not supported");
- return CURLE_SSL_ENGINE_NOTFOUND;
-#endif
-}
-
-/* Sets engine as default for all SSL operations
- */
-CURLcode Curl_ossl_set_engine_default(struct SessionHandle *data)
-{
-#ifdef HAVE_OPENSSL_ENGINE_H
- if(data->state.engine) {
- if(ENGINE_set_default(data->state.engine, ENGINE_METHOD_ALL) > 0) {
- infof(data,"set default crypto engine '%s'\n", ENGINE_get_id(data->state.engine));
- }
- else {
- failf(data, "set default crypto engine '%s' failed", ENGINE_get_id(data->state.engine));
- return CURLE_SSL_ENGINE_SETFAILED;
- }
- }
-#else
- (void) data;
-#endif
- return CURLE_OK;
-}
-
-/* Return list of OpenSSL crypto engine names.
- */
-struct curl_slist *Curl_ossl_engines_list(struct SessionHandle *data)
-{
- struct curl_slist *list = NULL;
-#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
- struct curl_slist *beg = NULL;
- ENGINE *e;
-
- for (e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) {
- list = curl_slist_append(list, ENGINE_get_id(e));
- if(list == NULL) {
- curl_slist_free_all(beg);
- return NULL;
- }
- else if(beg == NULL) {
- beg = list;
- }
- }
-#endif
- (void) data;
- return list;
-}
-
-
-/*
- * This function is called when an SSL connection is closed.
- */
-void Curl_ossl_close(struct connectdata *conn, int sockindex)
-{
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-
- if(connssl->handle) {
- (void)SSL_shutdown(connssl->handle);
- SSL_set_connect_state(connssl->handle);
-
- SSL_free (connssl->handle);
- connssl->handle = NULL;
- }
- if(connssl->ctx) {
- SSL_CTX_free (connssl->ctx);
- connssl->ctx = NULL;
- }
-}
-
-/*
- * This function is called to shut down the SSL layer but keep the
- * socket open (CCC - Clear Command Channel)
- */
-int Curl_ossl_shutdown(struct connectdata *conn, int sockindex)
-{
- int retval = 0;
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
- struct SessionHandle *data = conn->data;
- char buf[120]; /* We will use this for the OpenSSL error buffer, so it has
- to be at least 120 bytes long. */
- unsigned long sslerror;
- ssize_t nread;
- int buffsize;
- int err;
- int done = 0;
-
- /* This has only been tested on the proftpd server, and the mod_tls code
- sends a close notify alert without waiting for a close notify alert in
- response. Thus we wait for a close notify alert from the server, but
- we do not send one. Let's hope other servers do the same... */
-
- if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE)
- (void)SSL_shutdown(connssl->handle);
-
- if(connssl->handle) {
- buffsize = (int)sizeof(buf);
- while(!done) {
- int what = Curl_socket_ready(conn->sock[sockindex],
- CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
- if(what > 0) {
- ERR_clear_error();
-
- /* Something to read, let's do it and hope that it is the close
- notify alert from the server */
- nread = (ssize_t)SSL_read(conn->ssl[sockindex].handle, buf,
- buffsize);
- err = SSL_get_error(conn->ssl[sockindex].handle, (int)nread);
-
- switch(err) {
- case SSL_ERROR_NONE: /* this is not an error */
- case SSL_ERROR_ZERO_RETURN: /* no more data */
- /* This is the expected response. There was no data but only
- the close notify alert */
- done = 1;
- break;
- case SSL_ERROR_WANT_READ:
- /* there's data pending, re-invoke SSL_read() */
- infof(data, "SSL_ERROR_WANT_READ\n");
- break;
- case SSL_ERROR_WANT_WRITE:
- /* SSL wants a write. Really odd. Let's bail out. */
- infof(data, "SSL_ERROR_WANT_WRITE\n");
- done = 1;
- break;
- default:
- /* openssl/ssl.h says "look at error stack/return value/errno" */
- sslerror = ERR_get_error();
- failf(conn->data, "SSL read: %s, errno %d",
- ERR_error_string(sslerror, buf),
- SOCKERRNO);
- done = 1;
- break;
- }
- }
- else if(0 == what) {
- /* timeout */
- failf(data, "SSL shutdown timeout");
- done = 1;
- }
- else {
- /* anything that gets here is fatally bad */
- failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
- retval = -1;
- done = 1;
- }
- } /* while()-loop for the select() */
-
- if(data->set.verbose) {
-#ifdef HAVE_SSL_GET_SHUTDOWN
- switch(SSL_get_shutdown(connssl->handle)) {
- case SSL_SENT_SHUTDOWN:
- infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN\n");
- break;
- case SSL_RECEIVED_SHUTDOWN:
- infof(data, "SSL_get_shutdown() returned SSL_RECEIVED_SHUTDOWN\n");
- break;
- case SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN:
- infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN|"
- "SSL_RECEIVED__SHUTDOWN\n");
- break;
- }
-#endif
- }
-
- SSL_free (connssl->handle);
- connssl->handle = NULL;
- }
- return retval;
-}
-
-void Curl_ossl_session_free(void *ptr)
-{
- /* free the ID */
- SSL_SESSION_free(ptr);
-}
-
-/*
- * This function is called when the 'data' struct is going away. Close
- * down everything and free all resources!
- */
-int Curl_ossl_close_all(struct SessionHandle *data)
-{
- /*
- ERR_remove_state() frees the error queue associated with
- thread pid. If pid == 0, the current thread will have its
- error queue removed.
-
- Since error queue data structures are allocated
- automatically for new threads, they must be freed when
- threads are terminated in oder to avoid memory leaks.
- */
- ERR_remove_state(0);
-
-#ifdef HAVE_OPENSSL_ENGINE_H
- if(data->state.engine) {
- ENGINE_finish(data->state.engine);
- ENGINE_free(data->state.engine);
- data->state.engine = NULL;
- }
-#else
- (void)data;
-#endif
- return 0;
-}
-
-static int asn1_output(const ASN1_UTCTIME *tm,
- char *buf,
- size_t sizeofbuf)
-{
- const char *asn1_string;
- int gmt=FALSE;
- int i;
- int year=0,month=0,day=0,hour=0,minute=0,second=0;
-
- i=tm->length;
- asn1_string=(const char *)tm->data;
-
- if(i < 10)
- return 1;
- if(asn1_string[i-1] == 'Z')
- gmt=TRUE;
- for (i=0; i<10; i++)
- if((asn1_string[i] > '9') || (asn1_string[i] < '0'))
- return 2;
-
- year= (asn1_string[0]-'0')*10+(asn1_string[1]-'0');
- if(year < 50)
- year+=100;
-
- month= (asn1_string[2]-'0')*10+(asn1_string[3]-'0');
- if((month > 12) || (month < 1))
- return 3;
-
- day= (asn1_string[4]-'0')*10+(asn1_string[5]-'0');
- hour= (asn1_string[6]-'0')*10+(asn1_string[7]-'0');
- minute= (asn1_string[8]-'0')*10+(asn1_string[9]-'0');
-
- if((asn1_string[10] >= '0') && (asn1_string[10] <= '9') &&
- (asn1_string[11] >= '0') && (asn1_string[11] <= '9'))
- second= (asn1_string[10]-'0')*10+(asn1_string[11]-'0');
-
- snprintf(buf, sizeofbuf,
- "%04d-%02d-%02d %02d:%02d:%02d %s",
- year+1900, month, day, hour, minute, second, (gmt?"GMT":""));
-
- return 0;
-}
-
-/* ====================================================== */
-
-/*
- * Match a hostname against a wildcard pattern.
- * E.g.
- * "foo.host.com" matches "*.host.com".
- *
- * We are a bit more liberal than RFC2818 describes in that we
- * accept multiple "*" in pattern (similar to what some other browsers do).
- * E.g.
- * "abc.def.domain.com" should strickly not match "*.domain.com", but we
- * don't consider "." to be important in CERT checking.
- */
-#define HOST_NOMATCH 0
-#define HOST_MATCH 1
-
-static int hostmatch(const char *hostname, const char *pattern)
-{
- while(1) {
- char c = *pattern++;
-
- if(c == '\0')
- return (*hostname ? HOST_NOMATCH : HOST_MATCH);
-
- if(c == '*') {
- c = *pattern;
- if(c == '\0') /* "*\0" matches anything remaining */
- return HOST_MATCH;
-
- while(*hostname) {
- /* The only recursive function in libcurl! */
- if(hostmatch(hostname++,pattern) == HOST_MATCH)
- return HOST_MATCH;
- }
- break;
- }
-
- if(Curl_raw_toupper(c) != Curl_raw_toupper(*hostname++))
- break;
- }
- return HOST_NOMATCH;
-}
-
-static int
-cert_hostcheck(const char *match_pattern, const char *hostname)
-{
- if(!match_pattern || !*match_pattern ||
- !hostname || !*hostname) /* sanity check */
- return 0;
-
- if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */
- return 1;
-
- if(hostmatch(hostname,match_pattern) == HOST_MATCH)
- return 1;
- return 0;
-}
-
-/* Quote from RFC2818 section 3.1 "Server Identity"
-
- If a subjectAltName extension of type dNSName is present, that MUST
- be used as the identity. Otherwise, the (most specific) Common Name
- field in the Subject field of the certificate MUST be used. Although
- the use of the Common Name is existing practice, it is deprecated and
- Certification Authorities are encouraged to use the dNSName instead.
-
- Matching is performed using the matching rules specified by
- [RFC2459]. If more than one identity of a given type is present in
- the certificate (e.g., more than one dNSName name, a match in any one
- of the set is considered acceptable.) Names may contain the wildcard
- character * which is considered to match any single domain name
- component or component fragment. E.g., *.a.com matches foo.a.com but
- not bar.foo.a.com. f*.com matches foo.com but not bar.com.
-
- In some cases, the URI is specified as an IP address rather than a
- hostname. In this case, the iPAddress subjectAltName must be present
- in the certificate and must exactly match the IP in the URI.
-
-*/
-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 */
- int target = GEN_DNS; /* target type, GEN_DNS or GEN_IPADD */
- size_t addrlen = 0;
- struct SessionHandle *data = conn->data;
- STACK_OF(GENERAL_NAME) *altnames;
-#ifdef ENABLE_IPV6
- struct in6_addr addr;
-#else
- struct in_addr addr;
-#endif
- CURLcode res = CURLE_OK;
-
-#ifdef ENABLE_IPV6
- if(conn->bits.ipv6_ip &&
- Curl_inet_pton(AF_INET6, conn->host.name, &addr)) {
- target = GEN_IPADD;
- addrlen = sizeof(struct in6_addr);
- }
- else
-#endif
- if(Curl_inet_pton(AF_INET, conn->host.name, &addr)) {
- target = GEN_IPADD;
- addrlen = sizeof(struct in_addr);
- }
-
- /* get a "list" of alternative names */
- altnames = X509_get_ext_d2i(server_cert, NID_subject_alt_name, NULL, NULL);
-
- if(altnames) {
- int numalts;
- int i;
-
- /* get amount of alternatives, RFC2459 claims there MUST be at least
- one, but we don't depend on it... */
- numalts = sk_GENERAL_NAME_num(altnames);
-
- /* loop through all alternatives while none has matched */
- for (i=0; (i<numalts) && (matched != 1); i++) {
- /* get a handle to alternative name number i */
- const GENERAL_NAME *check = sk_GENERAL_NAME_value(altnames, i);
-
- /* only check alternatives of the same type the target is */
- if(check->type == target) {
- /* get data and length */
- const char *altptr = (char *)ASN1_STRING_data(check->d.ia5);
- size_t altlen = (size_t) ASN1_STRING_length(check->d.ia5);
-
- switch(target) {
- case GEN_DNS: /* name/pattern comparison */
- /* The OpenSSL man page explicitly says: "In general it cannot be
- assumed that the data returned by ASN1_STRING_data() is null
- terminated or does not contain embedded nulls." But also that
- "The actual format of the data will depend on the actual string
- type itself: for example for and IA5String the data will be ASCII"
-
- Gisle researched the OpenSSL sources:
- "I checked the 0.9.6 and 0.9.8 sources before my patch and
- it always 0-terminates an IA5String."
- */
- if((altlen == strlen(altptr)) &&
- /* if this isn't true, there was an embedded zero in the name
- string and we cannot match it. */
- cert_hostcheck(altptr, conn->host.name))
- matched = 1;
- else
- matched = 0;
- break;
-
- case GEN_IPADD: /* IP address comparison */
- /* compare alternative IP address if the data chunk is the same size
- our server IP address is */
- if((altlen == addrlen) && !memcmp(altptr, &addr, altlen))
- matched = 1;
- else
- matched = 0;
- break;
- }
- }
- }
- GENERAL_NAMES_free(altnames);
- }
-
- if(matched == 1)
- /* an alternative name matched the server hostname */
- infof(data, "\t subjectAltName: %s matched\n", conn->host.dispname);
- else if(matched == 0) {
- /* an alternative name field existed, but didn't match and then
- we MUST fail */
- infof(data, "\t subjectAltName does not match %s\n", conn->host.dispname);
- res = CURLE_PEER_FAILED_VERIFICATION;
- }
- else {
- /* we have to look to the last occurence of a commonName in the
- distinguished one to get the most significant one. */
- int j,i=-1 ;
-
-/* The following is done because of a bug in 0.9.6b */
-
- unsigned char *nulstr = (unsigned char *)"";
- unsigned char *peer_CN = nulstr;
-
- X509_NAME *name = X509_get_subject_name(server_cert) ;
- if(name)
- while((j = X509_NAME_get_index_by_NID(name, NID_commonName, i))>=0)
- i=j;
-
- /* we have the name entry and we will now convert this to a string
- that we can use for comparison. Doing this we support BMPstring,
- UTF8 etc. */
-
- if(i>=0) {
- ASN1_STRING *tmp = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name,i));
-
- /* In OpenSSL 0.9.7d and earlier, ASN1_STRING_to_UTF8 fails if the input
- is already UTF-8 encoded. We check for this case and copy the raw
- string manually to avoid the problem. This code can be made
- conditional in the future when OpenSSL has been fixed. Work-around
- brought by Alexis S. L. Carvalho. */
- if(tmp) {
- if(ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) {
- j = ASN1_STRING_length(tmp);
- if(j >= 0) {
- peer_CN = OPENSSL_malloc(j+1);
- if(peer_CN) {
- memcpy(peer_CN, ASN1_STRING_data(tmp), j);
- peer_CN[j] = '\0';
- }
- }
- }
- else /* not a UTF8 name */
- j = ASN1_STRING_to_UTF8(&peer_CN, tmp);
-
- if(peer_CN && ((int)strlen((char *)peer_CN) != j)) {
- /* there was a terminating zero before the end of string, this
- cannot match and we return failure! */
- failf(data, "SSL: illegal cert name field");
- res = CURLE_PEER_FAILED_VERIFICATION;
- }
- }
- }
-
- if(peer_CN == nulstr)
- peer_CN = NULL;
-#ifdef CURL_DOES_CONVERSIONS
- else {
- /* convert peer_CN from UTF8 */
- size_t rc;
- rc = Curl_convert_from_utf8(data, peer_CN, strlen(peer_CN));
- /* Curl_convert_from_utf8 calls failf if unsuccessful */
- if(rc != CURLE_OK) {
- OPENSSL_free(peer_CN);
- return rc;
- }
- }
-#endif /* CURL_DOES_CONVERSIONS */
-
- if(res)
- /* error already detected, pass through */
- ;
- else if(!peer_CN) {
- failf(data,
- "SSL: unable to obtain common name from peer certificate");
- res = CURLE_PEER_FAILED_VERIFICATION;
- }
- else if(!cert_hostcheck((const char *)peer_CN, conn->host.name)) {
- if(data->set.ssl.verifyhost > 1) {
- failf(data, "SSL: certificate subject name '%s' does not match "
- "target host name '%s'", peer_CN, conn->host.dispname);
- res = CURLE_PEER_FAILED_VERIFICATION;
- }
- else
- infof(data, "\t common name: %s (does not match '%s')\n",
- peer_CN, conn->host.dispname);
- }
- else {
- infof(data, "\t common name: %s (matched)\n", peer_CN);
- }
- if(peer_CN)
- OPENSSL_free(peer_CN);
- }
- return res;
-}
-#endif /* USE_SSLEAY */
-
-/* The SSL_CTRL_SET_MSG_CALLBACK doesn't exist in ancient OpenSSL versions
- and thus this cannot be done there. */
-#ifdef SSL_CTRL_SET_MSG_CALLBACK
-
-static const char *ssl_msg_type(int ssl_ver, int msg)
-{
- if(ssl_ver == SSL2_VERSION_MAJOR) {
- switch (msg) {
- case SSL2_MT_ERROR:
- return "Error";
- case SSL2_MT_CLIENT_HELLO:
- return "Client hello";
- case SSL2_MT_CLIENT_MASTER_KEY:
- return "Client key";
- case SSL2_MT_CLIENT_FINISHED:
- return "Client finished";
- case SSL2_MT_SERVER_HELLO:
- return "Server hello";
- case SSL2_MT_SERVER_VERIFY:
- return "Server verify";
- case SSL2_MT_SERVER_FINISHED:
- return "Server finished";
- case SSL2_MT_REQUEST_CERTIFICATE:
- return "Request CERT";
- case SSL2_MT_CLIENT_CERTIFICATE:
- return "Client CERT";
- }
- }
- else if(ssl_ver == SSL3_VERSION_MAJOR) {
- switch (msg) {
- case SSL3_MT_HELLO_REQUEST:
- return "Hello request";
- case SSL3_MT_CLIENT_HELLO:
- return "Client hello";
- case SSL3_MT_SERVER_HELLO:
- return "Server hello";
- case SSL3_MT_CERTIFICATE:
- return "CERT";
- case SSL3_MT_SERVER_KEY_EXCHANGE:
- return "Server key exchange";
- case SSL3_MT_CLIENT_KEY_EXCHANGE:
- return "Client key exchange";
- case SSL3_MT_CERTIFICATE_REQUEST:
- return "Request CERT";
- case SSL3_MT_SERVER_DONE:
- return "Server finished";
- case SSL3_MT_CERTIFICATE_VERIFY:
- return "CERT verify";
- case SSL3_MT_FINISHED:
- return "Finished";
- }
- }
- return "Unknown";
-}
-
-static const char *tls_rt_type(int type)
-{
- return (
- type == SSL3_RT_CHANGE_CIPHER_SPEC ? "TLS change cipher, " :
- type == SSL3_RT_ALERT ? "TLS alert, " :
- type == SSL3_RT_HANDSHAKE ? "TLS handshake, " :
- type == SSL3_RT_APPLICATION_DATA ? "TLS app data, " :
- "TLS Unknown, ");
-}
-
-
-/*
- * Our callback from the SSL/TLS layers.
- */
-static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
- const void *buf, size_t len, const SSL *ssl,
- struct connectdata *conn)
-{
- struct SessionHandle *data;
- const char *msg_name, *tls_rt_name;
- char ssl_buf[1024];
- int ver, msg_type, txt_len;
-
- if(!conn || !conn->data || !conn->data->set.fdebug ||
- (direction != 0 && direction != 1))
- return;
-
- data = conn->data;
- 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
- * is at 'buf[0]'.
- */
- if(ssl_ver == SSL3_VERSION_MAJOR && content_type != 0)
- tls_rt_name = tls_rt_type(content_type);
- else
- tls_rt_name = "";
-
- msg_type = *(char*)buf;
- msg_name = ssl_msg_type(ssl_ver, 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 :
- CURLINFO_SSL_DATA_IN, (char *)buf, len, NULL);
- (void) ssl;
-}
-#endif
-
-#ifdef USE_SSLEAY
-/* ====================================================== */
-
-#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
-# define use_sni(x) sni = (x)
-#else
-# define use_sni(x) do { } while (0)
-#endif
-
-static CURLcode
-ossl_connect_step1(struct connectdata *conn,
- int sockindex)
-{
- CURLcode retcode = CURLE_OK;
-
- struct SessionHandle *data = conn->data;
- 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];
-#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
- bool sni;
-#ifdef ENABLE_IPV6
- struct in6_addr addr;
-#else
- struct in_addr addr;
-#endif
-#endif
-
- DEBUGASSERT(ssl_connect_1 == connssl->connecting_state);
-
- /* Make funny stuff to get random input */
- Curl_ossl_seed(data);
-
- /* 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();
- use_sni(TRUE);
- break;
- case CURL_SSLVERSION_TLSv1:
- req_method = TLSv1_client_method();
- use_sni(TRUE);
- break;
- case CURL_SSLVERSION_SSLv2:
- req_method = SSLv2_client_method();
- use_sni(FALSE);
- break;
- case CURL_SSLVERSION_SSLv3:
- req_method = SSLv3_client_method();
- use_sni(FALSE);
- break;
- }
-
- if(connssl->ctx)
- SSL_CTX_free(connssl->ctx);
- connssl->ctx = SSL_CTX_new(req_method);
-
- if(!connssl->ctx) {
- failf(data, "SSL: couldn't create a context!");
- return CURLE_OUT_OF_MEMORY;
- }
-
-#ifdef SSL_CTRL_SET_MSG_CALLBACK
- if(data->set.fdebug && data->set.verbose) {
- /* the SSL trace callback is only used for verbose logging so we only
- inform about failures of setting it */
- if(!SSL_CTX_callback_ctrl(connssl->ctx, SSL_CTRL_SET_MSG_CALLBACK,
- (void (*)(void))ssl_tls_trace)) {
- infof(data, "SSL: couldn't set callback!\n");
- }
- else if(!SSL_CTX_ctrl(connssl->ctx, SSL_CTRL_SET_MSG_CALLBACK_ARG, 0,
- conn)) {
- infof(data, "SSL: couldn't set callback argument!\n");
- }
- }
-#endif
-
- /* OpenSSL contains code to work-around lots of bugs and flaws in various
- SSL-implementations. SSL_CTX_set_options() is used to enabled those
- work-arounds. The man page for this option states that SSL_OP_ALL enables
- all the work-arounds and that "It is usually safe to use SSL_OP_ALL to
- enable the bug workaround options if compatibility with somewhat broken
- implementations is desired."
-
- The "-no_ticket" option was introduced in Openssl0.9.8j. It's a flag to
- disable "rfc4507bis session ticket support". rfc4507bis was later turned
- into the proper RFC5077 it seems: http://tools.ietf.org/html/rfc5077
-
- The enabled extension concerns the session management. I wonder how often
- libcurl stops a connection and then resumes a TLS session. also, sending
- the session data is some overhead. .I suggest that you just use your
- proposed patch (which explicitly disables TICKET).
-
- If someone writes an application with libcurl and openssl who wants to
- enable the feature, one can do this in the SSL callback.
-
- */
-#ifdef SSL_OP_NO_TICKET
- /* expect older openssl releases to not have this define so only use it if
- present */
-#define CURL_CTX_OPTIONS SSL_OP_ALL|SSL_OP_NO_TICKET
-#else
-#define CURL_CTX_OPTIONS SSL_OP_ALL
-#endif
-
- SSL_CTX_set_options(connssl->ctx, CURL_CTX_OPTIONS);
-
- /* disable SSLv2 in the default case (i.e. allow SSLv3 and TLSv1) */
- if(data->set.ssl.version == CURL_SSLVERSION_DEFAULT)
- SSL_CTX_set_options(connssl->ctx, SSL_OP_NO_SSLv2);
-
-#if 0
- /*
- * Not sure it's needed to tell SSL_connect() that socket is
- * non-blocking. It doesn't seem to care, but just return with
- * SSL_ERROR_WANT_x.
- */
- if(data->state.used_interface == Curl_if_multi)
- SSL_CTX_ctrl(connssl->ctx, BIO_C_SET_NBIO, 1, NULL);
-#endif
-
- if(data->set.str[STRING_CERT] || data->set.str[STRING_CERT_TYPE]) {
- if(!cert_stuff(conn,
- connssl->ctx,
- data->set.str[STRING_CERT],
- data->set.str[STRING_CERT_TYPE],
- data->set.str[STRING_KEY],
- data->set.str[STRING_KEY_TYPE])) {
- /* failf() is already done in cert_stuff() */
- return CURLE_SSL_CERTPROBLEM;
- }
- }
-
- if(data->set.str[STRING_SSL_CIPHER_LIST]) {
- if(!SSL_CTX_set_cipher_list(connssl->ctx,
- data->set.str[STRING_SSL_CIPHER_LIST])) {
- failf(data, "failed setting cipher list");
- return CURLE_SSL_CIPHER;
- }
- }
-
- if(data->set.str[STRING_SSL_CAFILE] || data->set.str[STRING_SSL_CAPATH]) {
- /* tell SSL where to find CA certificates that are used to verify
- the servers certificate. */
- if(!SSL_CTX_load_verify_locations(connssl->ctx,
- 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. */
- failf(data,"error setting certificate verify locations:\n"
- " CAfile: %s\n CApath: %s\n",
- data->set.str[STRING_SSL_CAFILE]?
- data->set.str[STRING_SSL_CAFILE]: "none",
- data->set.str[STRING_SSL_CAPATH]?
- data->set.str[STRING_SSL_CAPATH] : "none");
- return CURLE_SSL_CACERT_BADFILE;
- }
- else {
- /* Just continue with a warning if no strict certificate verification
- is required. */
- infof(data, "error setting certificate verify locations,"
- " continuing anyway:\n");
- }
- }
- else {
- /* Everything is fine. */
- infof(data, "successfully set certificate verify locations:\n");
- }
- infof(data,
- " CAfile: %s\n"
- " CApath: %s\n",
- data->set.str[STRING_SSL_CAFILE] ? data->set.str[STRING_SSL_CAFILE]:
- "none",
- data->set.str[STRING_SSL_CAPATH] ? data->set.str[STRING_SSL_CAPATH]:
- "none");
- }
-
- if (data->set.str[STRING_SSL_CRLFILE]) {
- /* tell SSL where to find CRL file that is used to check certificate
- * revocation */
- lookup=X509_STORE_add_lookup(connssl->ctx->cert_store,X509_LOOKUP_file());
- if ( !lookup ||
- (!X509_load_crl_file(lookup,data->set.str[STRING_SSL_CRLFILE],
- X509_FILETYPE_PEM)) ) {
- failf(data,"error loading CRL file: %s\n",
- data->set.str[STRING_SSL_CRLFILE]);
- return CURLE_SSL_CRL_BADFILE;
- }
- else {
- /* Everything is fine. */
- infof(data, "successfully load CRL file:\n");
- X509_STORE_set_flags(connssl->ctx->cert_store,
- X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL);
- }
- infof(data,
- " CRLfile: %s\n", data->set.str[STRING_SSL_CRLFILE] ?
- data->set.str[STRING_SSL_CRLFILE]: "none");
- }
-
- /* SSL always tries to verify the peer, this only says whether it should
- * fail to connect if the verification fails, or if it should continue
- * anyway. In the latter case the result of the verification is checked with
- * SSL_get_verify_result() below. */
- SSL_CTX_set_verify(connssl->ctx,
- data->set.ssl.verifypeer?SSL_VERIFY_PEER:SSL_VERIFY_NONE,
- cert_verify_callback);
-
- /* give application a chance to interfere with SSL set up. */
- if(data->set.ssl.fsslctx) {
- retcode = (*data->set.ssl.fsslctx)(data, connssl->ctx,
- data->set.ssl.fsslctxp);
- if(retcode) {
- failf(data,"error signaled by ssl ctx callback");
- return retcode;
- }
- }
-
- /* Lets make an SSL structure */
- if(connssl->handle)
- SSL_free(connssl->handle);
- connssl->handle = SSL_new(connssl->ctx);
- if(!connssl->handle) {
- failf(data, "SSL: couldn't create a context (handle)!");
- return CURLE_OUT_OF_MEMORY;
- }
- SSL_set_connect_state(connssl->handle);
-
- connssl->server_cert = 0x0;
-
-#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
- if ((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) &&
-#ifdef ENABLE_IPV6
- (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) &&
-#endif
- sni &&
- !SSL_set_tlsext_host_name(connssl->handle, conn->host.name))
- infof(data, "WARNING: failed to configure server name indication (SNI) "
- "TLS extension\n");
-#endif
-
- /* Check if there's a cached ID we can/should use here! */
- if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL)) {
- /* we got a session id, use it! */
- if(!SSL_set_session(connssl->handle, ssl_sessionid)) {
- failf(data, "SSL: SSL_set_session failed: %s",
- ERR_error_string(ERR_get_error(),NULL));
- return CURLE_SSL_CONNECT_ERROR;
- }
- /* Informational message */
- infof (data, "SSL re-using session ID\n");
- }
-
- /* pass the raw socket into the SSL layers */
- if(!SSL_set_fd(connssl->handle, (int)sockfd)) {
- failf(data, "SSL: SSL_set_fd failed: %s",
- ERR_error_string(ERR_get_error(),NULL));
- return CURLE_SSL_CONNECT_ERROR;
- }
-
- connssl->connecting_state = ssl_connect_2;
- return CURLE_OK;
-}
-
-static CURLcode
-ossl_connect_step2(struct connectdata *conn, int sockindex)
-{
- struct SessionHandle *data = conn->data;
- int err;
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-
- DEBUGASSERT(ssl_connect_2 == connssl->connecting_state
- || ssl_connect_2_reading == connssl->connecting_state
- || ssl_connect_2_writing == connssl->connecting_state);
-
- ERR_clear_error();
-
- err = SSL_connect(connssl->handle);
-
- /* 1 is fine
- 0 is "not successful but was shut down controlled"
- <0 is "handshake was not successful, because a fatal error occurred" */
- if(1 != err) {
- int detail = SSL_get_error(connssl->handle, err);
-
- if(SSL_ERROR_WANT_READ == detail) {
- connssl->connecting_state = ssl_connect_2_reading;
- return CURLE_OK;
- }
- else if(SSL_ERROR_WANT_WRITE == detail) {
- connssl->connecting_state = ssl_connect_2_writing;
- return CURLE_OK;
- }
- else {
- /* untreated error */
- unsigned long errdetail;
- char error_buffer[256]; /* OpenSSL documents that this must be at least
- 256 bytes long. */
- CURLcode rc;
- const char *cert_problem = NULL;
-
- connssl->connecting_state = ssl_connect_2; /* the connection failed,
- we're not waiting for
- anything else. */
-
- errdetail = ERR_get_error(); /* Gets the earliest error code from the
- thread's error queue and removes the
- entry. */
-
- switch(errdetail) {
- case 0x1407E086:
- /* 1407E086:
- SSL routines:
- SSL2_SET_CERTIFICATE:
- certificate verify failed */
- /* fall-through */
- case 0x14090086:
- /* 14090086:
- SSL routines:
- SSL3_GET_SERVER_CERTIFICATE:
- certificate verify failed */
- cert_problem = "SSL certificate problem, verify that the CA cert is"
- " OK. Details:\n";
- rc = CURLE_SSL_CACERT;
- break;
- default:
- rc = CURLE_SSL_CONNECT_ERROR;
- break;
- }
-
- /* detail is already set to the SSL error above */
-
- /* If we e.g. use SSLv2 request-method and the server doesn't like us
- * (RST connection etc.), OpenSSL gives no explanation whatsoever and
- * the SO_ERROR is also lost.
- */
- if(CURLE_SSL_CONNECT_ERROR == rc && errdetail == 0) {
- failf(data, "Unknown SSL protocol error in connection to %s:%ld ",
- conn->host.name, conn->port);
- return rc;
- }
- /* Could be a CERT problem */
-
- SSL_strerror(errdetail, error_buffer, sizeof(error_buffer));
- failf(data, "%s%s", cert_problem ? cert_problem : "", error_buffer);
- return rc;
- }
- }
- else {
- /* we have been connected fine, we're not waiting for anything else. */
- connssl->connecting_state = ssl_connect_3;
-
- /* Informational message */
- infof (data, "SSL connection using %s\n",
- SSL_get_cipher(connssl->handle));
-
- return CURLE_OK;
- }
-}
-
-static int asn1_object_dump(ASN1_OBJECT *a, char *buf, size_t len)
-{
- int i, ilen;
-
- if((ilen = (int)len) < 0)
- return 1; /* buffer too big */
-
- i = i2t_ASN1_OBJECT(buf, ilen, a);
-
- if(i >= ilen)
- return 1; /* buffer too small */
-
- return 0;
-}
-
-static CURLcode push_certinfo_len(struct SessionHandle *data,
- int certnum,
- const char *label,
- const char *value,
- size_t valuelen)
-{
- struct curl_certinfo *ci = &data->info.certs;
- char *output;
- struct curl_slist *nl;
- CURLcode res = CURLE_OK;
- size_t labellen = strlen(label);
- size_t outlen = labellen + 1 + valuelen + 1; /* label:value\0 */
-
- output = malloc(outlen);
- if(!output)
- return CURLE_OUT_OF_MEMORY;
-
- /* sprintf the label and colon */
- snprintf(output, outlen, "%s:", label);
-
- /* memcpy the value (it might not be zero terminated) */
- memcpy(&output[labellen+1], value, valuelen);
-
- /* zero terminate the output */
- output[labellen + 1 + valuelen] = 0;
-
- /* TODO: we should rather introduce an internal API that can do the
- equivalent of curl_slist_append but doesn't strdup() the given data as
- like in this place the extra malloc/free is totally pointless */
- nl = curl_slist_append(ci->certinfo[certnum], output);
- if(!nl) {
- curl_slist_free_all(ci->certinfo[certnum]);
- res = CURLE_OUT_OF_MEMORY;
- }
- else
- ci->certinfo[certnum] = nl;
-
- free(output);
-
- return res;
-}
-
-/* this is a convenience function for push_certinfo_len that takes a zero
- terminated value */
-static CURLcode push_certinfo(struct SessionHandle *data,
- int certnum,
- const char *label,
- const char *value)
-{
- size_t valuelen = strlen(value);
-
- return push_certinfo_len(data, certnum, label, value, valuelen);
-}
-
-static void pubkey_show(struct SessionHandle *data,
- int num,
- const char *type,
- const char *name,
- unsigned char *raw,
- int len)
-{
- char buffer[1024];
- size_t left = sizeof(buffer);
- int i;
- char *ptr=buffer;
- char namebuf[32];
-
- snprintf(namebuf, sizeof(namebuf), "%s(%s)", type, name);
-
- for(i=0; i< len; i++) {
- snprintf(ptr, left, "%02x:", raw[i]);
- ptr += 3;
- left -= 3;
- }
- infof(data, " %s: %s\n", namebuf, buffer);
- push_certinfo(data, num, namebuf, buffer);
-}
-
-#define print_pubkey_BN(_type, _name, _num) \
-do { \
- if (pubkey->pkey._type->_name != NULL) { \
- int len = BN_num_bytes(pubkey->pkey._type->_name); \
- if(len < (int)sizeof(buf)) { \
- BN_bn2bin(pubkey->pkey._type->_name, (unsigned char*)buf); \
- buf[len] = 0; \
- pubkey_show(data, _num, #_type, #_name, (unsigned char*)buf, len); \
- } \
- } \
-} while (0)
-
-static int X509V3_ext(struct SessionHandle *data,
- int certnum,
- STACK_OF(X509_EXTENSION) *exts)
-{
- int i;
- size_t j;
-
- if(sk_X509_EXTENSION_num(exts) <= 0)
- /* no extensions, bail out */
- return 1;
-
- for (i=0; i<sk_X509_EXTENSION_num(exts); i++) {
- ASN1_OBJECT *obj;
- X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, i);
- BUF_MEM *biomem;
- char buf[512];
- char *ptr=buf;
- char namebuf[128];
- BIO *bio_out = BIO_new(BIO_s_mem());
-
- if(!bio_out)
- return 1;
-
- obj = X509_EXTENSION_get_object(ext);
-
- asn1_object_dump(obj, namebuf, sizeof(namebuf));
-
- infof(data, "%s: %s\n", namebuf,
- X509_EXTENSION_get_critical(ext)?"(critical)":"");
-
- if(!X509V3_EXT_print(bio_out, ext, 0, 0))
- M_ASN1_OCTET_STRING_print(bio_out, ext->value);
-
- BIO_get_mem_ptr(bio_out, &biomem);
-
- /* biomem->length bytes at biomem->data, this little loop here is only
- done for the infof() call, we send the "raw" data to the certinfo
- function */
- for(j=0; j<(size_t)biomem->length; j++) {
- const char *sep="";
- if(biomem->data[j] == '\n') {
- sep=", ";
- j++; /* skip the newline */
- };
- while((biomem->data[j] == ' ') && (j<(size_t)biomem->length))
- j++;
- if(j<(size_t)biomem->length)
- ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%s%c", sep, biomem->data[j]);
- }
- infof(data, " %s\n", buf);
-
- push_certinfo(data, certnum, namebuf, buf);
-
- BIO_free(bio_out);
-
- }
- return 0; /* all is fine */
-}
-
-
-static void X509_signature(struct SessionHandle *data,
- int numcert,
- ASN1_STRING *sig)
-{
- char buf[1024];
- char *ptr = buf;
- int i;
- for (i=0; i<sig->length; i++)
- ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%02x:", sig->data[i]);
-
- infof(data, " Signature: %s\n", buf);
- push_certinfo(data, numcert, "Signature", buf);
-}
-
-static void dumpcert(struct SessionHandle *data, X509 *x, int numcert)
-{
- BIO *bio_out = BIO_new(BIO_s_mem());
- BUF_MEM *biomem;
-
- /* this outputs the cert in this 64 column wide style with newlines and
- -----BEGIN CERTIFICATE----- texts and more */
- PEM_write_bio_X509(bio_out, x);
-
- BIO_get_mem_ptr(bio_out, &biomem);
-
- infof(data, "%s\n", biomem->data);
-
- push_certinfo_len(data, numcert, "Cert", biomem->data, biomem->length);
-
- BIO_free(bio_out);
-
-}
-
-
-static int init_certinfo(struct SessionHandle *data,
- int num)
-{
- struct curl_certinfo *ci = &data->info.certs;
- struct curl_slist **table;
-
- Curl_ssl_free_certinfo(data);
-
- ci->num_of_certs = num;
- table = calloc((size_t)num, sizeof(struct curl_slist *));
- if(!table)
- return 1;
-
- ci->certinfo = table;
- return 0;
-}
-
-static CURLcode get_cert_chain(struct connectdata *conn,
- struct ssl_connect_data *connssl)
-
-{
- STACK_OF(X509) *sk;
- int i;
- char buf[512];
- struct SessionHandle *data = conn->data;
- int numcerts;
-
- sk = SSL_get_peer_cert_chain(connssl->handle);
-
- if(!sk)
- return CURLE_OUT_OF_MEMORY;
-
- numcerts = sk_X509_num(sk);
-
- if(init_certinfo(data, numcerts))
- return CURLE_OUT_OF_MEMORY;
-
- infof(data, "--- Certificate chain\n");
- for (i=0; i<numcerts; i++) {
- long value;
- ASN1_INTEGER *num;
- ASN1_TIME *certdate;
-
- /* get the certs in "importance order" */
-#if 0
- X509 *x = sk_X509_value(sk, numcerts - i - 1);
-#else
- X509 *x = sk_X509_value(sk, i);
-#endif
-
- X509_CINF *cinf;
- EVP_PKEY *pubkey=NULL;
- int j;
- char *ptr;
-
- (void)x509_name_oneline(X509_get_subject_name(x), buf, sizeof(buf));
- infof(data, "%2d Subject: %s\n",i,buf);
- push_certinfo(data, i, "Subject", buf);
-
- (void)x509_name_oneline(X509_get_issuer_name(x), buf, sizeof(buf));
- infof(data, " Issuer: %s\n",buf);
- push_certinfo(data, i, "Issuer", buf);
-
- value = X509_get_version(x);
- infof(data, " Version: %lu (0x%lx)\n", value+1, value);
- snprintf(buf, sizeof(buf), "%lx", value);
- push_certinfo(data, i, "Version", buf); /* hex */
-
- num=X509_get_serialNumber(x);
- if (num->length <= 4) {
- value = ASN1_INTEGER_get(num);
- infof(data," Serial Number: %ld (0x%lx)\n", value, value);
- snprintf(buf, sizeof(buf), "%lx", value);
- }
- else {
-
- ptr = buf;
- *ptr++ = 0;
- if(num->type == V_ASN1_NEG_INTEGER)
- *ptr++='-';
-
- for (j=0; j<num->length; j++) {
- /* TODO: length restrictions */
- snprintf(ptr, 3, "%02x%c",num->data[j],
- ((j+1 == num->length)?'\n':':'));
- ptr += 3;
- }
- if(num->length)
- infof(data," Serial Number: %s\n", buf);
- else
- buf[0]=0;
- }
- if(buf[0])
- push_certinfo(data, i, "Serial Number", buf); /* hex */
-
- cinf = x->cert_info;
-
- j = asn1_object_dump(cinf->signature->algorithm, buf, sizeof(buf));
- if(!j) {
- infof(data, " Signature Algorithm: %s\n", buf);
- push_certinfo(data, i, "Signature Algorithm", buf);
- }
-
- certdate = X509_get_notBefore(x);
- asn1_output(certdate, buf, sizeof(buf));
- infof(data, " Start date: %s\n", buf);
- push_certinfo(data, i, "Start date", buf);
-
- certdate = X509_get_notAfter(x);
- asn1_output(certdate, buf, sizeof(buf));
- infof(data, " Expire date: %s\n", buf);
- push_certinfo(data, i, "Expire date", buf);
-
- j = asn1_object_dump(cinf->key->algor->algorithm, buf, sizeof(buf));
- if(!j) {
- infof(data, " Public Key Algorithm: %s\n", buf);
- push_certinfo(data, i, "Public Key Algorithm", buf);
- }
-
- pubkey = X509_get_pubkey(x);
- if(!pubkey)
- infof(data, " Unable to load public key\n");
- else {
- switch(pubkey->type) {
- case EVP_PKEY_RSA:
- infof(data, " RSA Public Key (%d bits)\n",
- BN_num_bits(pubkey->pkey.rsa->n));
- snprintf(buf, sizeof(buf), "%d", BN_num_bits(pubkey->pkey.rsa->n));
- push_certinfo(data, i, "RSA Public Key", buf);
-
- print_pubkey_BN(rsa, n, i);
- print_pubkey_BN(rsa, e, i);
- print_pubkey_BN(rsa, d, i);
- print_pubkey_BN(rsa, p, i);
- print_pubkey_BN(rsa, q, i);
- print_pubkey_BN(rsa, dmp1, i);
- print_pubkey_BN(rsa, dmq1, i);
- print_pubkey_BN(rsa, iqmp, i);
- break;
- case EVP_PKEY_DSA:
- print_pubkey_BN(dsa, p, i);
- print_pubkey_BN(dsa, q, i);
- print_pubkey_BN(dsa, g, i);
- print_pubkey_BN(dsa, priv_key, i);
- print_pubkey_BN(dsa, pub_key, i);
- break;
- case EVP_PKEY_DH:
- print_pubkey_BN(dh, p, i);
- print_pubkey_BN(dh, g, i);
- print_pubkey_BN(dh, priv_key, i);
- print_pubkey_BN(dh, pub_key, i);
- break;
-#if 0
- case EVP_PKEY_EC: /* symbol not present in OpenSSL 0.9.6 */
- /* left TODO */
- break;
-#endif
- }
- EVP_PKEY_free(pubkey);
- }
-
- X509V3_ext(data, i, cinf->extensions);
-
- X509_signature(data, i, x->signature);
-
- dumpcert(data, x, i);
- }
-
- return CURLE_OK;
-}
-
-/*
- * 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!
- *
- * We check certificates to authenticate the server; otherwise we risk
- * man-in-the-middle attack.
- */
-static CURLcode servercert(struct connectdata *conn,
- struct ssl_connect_data *connssl,
- bool strict)
-{
- CURLcode retcode = CURLE_OK;
- int rc;
- long lerr;
- ASN1_TIME *certdate;
- struct SessionHandle *data = conn->data;
- X509 *issuer;
- FILE *fp;
- char buffer[256];
-
- if(data->set.ssl.certinfo)
- /* we've been asked to gather certificate info! */
- (void)get_cert_chain(conn, connssl);
-
- data->set.ssl.certverifyresult = !X509_V_OK;
-
- connssl->server_cert = SSL_get_peer_certificate(connssl->handle);
- if(!connssl->server_cert) {
- if(strict)
- failf(data, "SSL: couldn't get peer certificate!");
- return CURLE_PEER_FAILED_VERIFICATION;
- }
- infof (data, "Server certificate:\n");
-
- rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert),
- buffer, sizeof(buffer));
- if(rc) {
- if(strict)
- failf(data, "SSL: couldn't get X509-subject!");
- X509_free(connssl->server_cert);
- connssl->server_cert = NULL;
- return CURLE_SSL_CONNECT_ERROR;
- }
- infof(data, "\t subject: %s\n", buffer);
-
- certdate = X509_get_notBefore(connssl->server_cert);
- asn1_output(certdate, buffer, sizeof(buffer));
- infof(data, "\t start date: %s\n", buffer);
-
- certdate = X509_get_notAfter(connssl->server_cert);
- asn1_output(certdate, buffer, sizeof(buffer));
- infof(data, "\t expire date: %s\n", buffer);
-
- if(data->set.ssl.verifyhost) {
- retcode = verifyhost(conn, connssl->server_cert);
- if(retcode) {
- X509_free(connssl->server_cert);
- connssl->server_cert = NULL;
- return retcode;
- }
- }
-
- rc = x509_name_oneline(X509_get_issuer_name(connssl->server_cert),
- buffer, sizeof(buffer));
- if(rc) {
- if(strict)
- failf(data, "SSL: couldn't get X509-issuer name!");
- retcode = CURLE_SSL_CONNECT_ERROR;
- }
- else {
- infof(data, "\t issuer: %s\n", buffer);
-
- /* We could do all sorts of certificate verification stuff here before
- deallocating the certificate. */
-
- /* e.g. match issuer name with provided issuer certificate */
- if (data->set.str[STRING_SSL_ISSUERCERT]) {
- if (! (fp=fopen(data->set.str[STRING_SSL_ISSUERCERT],"r"))) {
- if (strict)
- failf(data, "SSL: Unable to open issuer cert (%s)\n",
- data->set.str[STRING_SSL_ISSUERCERT]);
- X509_free(connssl->server_cert);
- connssl->server_cert = NULL;
- return CURLE_SSL_ISSUER_ERROR;
- }
- issuer = PEM_read_X509(fp,NULL,ZERO_NULL,NULL);
- if (!issuer) {
- if (strict)
- failf(data, "SSL: Unable to read issuer cert (%s)\n",
- data->set.str[STRING_SSL_ISSUERCERT]);
- X509_free(connssl->server_cert);
- X509_free(issuer);
- 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)\n",
- data->set.str[STRING_SSL_ISSUERCERT]);
- X509_free(connssl->server_cert);
- X509_free(issuer);
- 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=
- 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
- and we return earlier if verifypeer is set? */
- if(strict)
- failf(data, "SSL certificate verify result: %s (%ld)",
- X509_verify_cert_error_string(lerr), lerr);
- retcode = CURLE_PEER_FAILED_VERIFICATION;
- }
- else
- infof(data, "\t SSL certificate verify result: %s (%ld),"
- " continuing anyway.\n",
- X509_verify_cert_error_string(lerr), lerr);
- }
- else
- infof(data, "\t SSL certificate verify ok.\n");
- }
-
- X509_free(connssl->server_cert);
- connssl->server_cert = NULL;
- connssl->connecting_state = ssl_connect_done;
-
- return retcode;
-}
-
-
-static CURLcode
-ossl_connect_step3(struct connectdata *conn,
- int sockindex)
-{
- CURLcode retcode = CURLE_OK;
- void *old_ssl_sessionid=NULL;
- struct SessionHandle *data = conn->data;
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
- int incache;
- SSL_SESSION *our_ssl_sessionid;
-
- DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
-
-#ifdef HAVE_SSL_GET1_SESSION
- our_ssl_sessionid = SSL_get1_session(connssl->handle);
-
- /* SSL_get1_session() will increment the reference
- count and the session will stay in memory until explicitly freed with
- SSL_SESSION_free(3), regardless of its state.
- This function was introduced in openssl 0.9.5a. */
-#else
- our_ssl_sessionid = SSL_get_session(connssl->handle);
-
- /* if SSL_get1_session() is unavailable, use SSL_get_session().
- This is an inferior option because the session can be flushed
- at any time by openssl. It is included only so curl compiles
- under versions of openssl < 0.9.5a.
-
- WARNING: How curl behaves if it's session is flushed is
- untested.
- */
-#endif
-
- incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL));
- if (incache) {
- if (old_ssl_sessionid != our_ssl_sessionid) {
- infof(data, "old SSL session ID is stale, removing\n");
- Curl_ssl_delsessionid(conn, old_ssl_sessionid);
- incache = FALSE;
- }
- }
- if (!incache) {
- retcode = Curl_ssl_addsessionid(conn, our_ssl_sessionid,
- 0 /* unknown size */);
- if(retcode) {
- failf(data, "failed to store ssl session");
- return retcode;
- }
- }
-#ifdef HAVE_SSL_GET1_SESSION
- else {
- /* Session was incache, so refcount already incremented earlier.
- * Avoid further increments with each SSL_get1_session() call.
- * This does not free the session as refcount remains > 0
- */
- SSL_SESSION_free(our_ssl_sessionid);
- }
-#endif
-
- /*
- * We check certificates to authenticate the server; otherwise we risk
- * man-in-the-middle attack; NEVERTHELESS, if we're told explicitly not to
- * verify the peer ignore faults and failures from the server cert
- * operations.
- */
-
- if(!data->set.ssl.verifypeer)
- (void)servercert(conn, connssl, FALSE);
- else
- retcode = servercert(conn, connssl, TRUE);
-
- if(CURLE_OK == retcode)
- connssl->connecting_state = ssl_connect_done;
- 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)
-{
- CURLcode retcode;
- struct SessionHandle *data = conn->data;
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
- curl_socket_t sockfd = conn->sock[sockindex];
- long timeout_ms;
- int what;
-
- if(ssl_connect_1==connssl->connecting_state) {
- /* Find out how much more time we're allowed */
- timeout_ms = Curl_timeleft(conn, NULL, TRUE);
-
- if(timeout_ms < 0) {
- /* no need to continue if time already is up */
- failf(data, "SSL connection timeout");
- return CURLE_OPERATION_TIMEDOUT;
- }
- retcode = ossl_connect_step1(conn, sockindex);
- if(retcode)
- return retcode;
- }
-
- while(ssl_connect_2 == connssl->connecting_state ||
- ssl_connect_2_reading == connssl->connecting_state ||
- ssl_connect_2_writing == connssl->connecting_state) {
-
- /* check allowed time left */
- timeout_ms = Curl_timeleft(conn, NULL, TRUE);
-
- if(timeout_ms < 0) {
- /* no need to continue if time already is up */
- failf(data, "SSL connection timeout");
- return CURLE_OPERATION_TIMEDOUT;
- }
-
- /* 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) {
-
- curl_socket_t writefd = ssl_connect_2_writing==
- connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
- curl_socket_t readfd = ssl_connect_2_reading==
- connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
-
- what = Curl_socket_ready(readfd, writefd,
- nonblocking?0:(int)timeout_ms);
- if(what < 0) {
- /* fatal error */
- failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
- return CURLE_SSL_CONNECT_ERROR;
- }
- else if(0 == what) {
- if(nonblocking) {
- *done = FALSE;
- return CURLE_OK;
- }
- else {
- /* timeout */
- failf(data, "SSL connection timeout");
- return CURLE_OPERATION_TIMEDOUT;
- }
- }
- /* socket is readable or writable */
- }
-
- /* Run transaction, and return to the caller if it failed or if this
- * connection is done nonblocking and this loop would execute again. This
- * permits the owner of a multi handle to abort a connection attempt
- * before step2 has completed while ensuring that a client using select()
- * or epoll() will always have a valid fdset to wait on.
- */
- 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) {
- retcode = ossl_connect_step3(conn, sockindex);
- if(retcode)
- return retcode;
- }
-
- if(ssl_connect_done==connssl->connecting_state) {
- connssl->state = ssl_connection_complete;
- conn->recv[sockindex] = ossl_recv;
- conn->send[sockindex] = ossl_send;
- *done = TRUE;
- }
- else
- *done = FALSE;
-
- /* Reset our connect state machine */
- connssl->connecting_state = ssl_connect_1;
-
- return CURLE_OK;
-}
-
-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 retcode;
- bool done = FALSE;
-
- 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)
-{
- if(conn->ssl[connindex].handle)
- /* SSL is in use */
- return (bool)(0 != SSL_pending(conn->ssl[connindex].handle));
- else
- return FALSE;
-}
-
-static ssize_t ossl_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 err;
- char error_buffer[120]; /* OpenSSL documents that this must be at least 120
- bytes long. */
- unsigned long sslerror;
- int memlen;
- int rc;
-
- ERR_clear_error();
-
- memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
- rc = SSL_write(conn->ssl[sockindex].handle, mem, memlen);
-
- if(rc < 0) {
- err = SSL_get_error(conn->ssl[sockindex].handle, rc);
-
- switch(err) {
- case SSL_ERROR_WANT_READ:
- case SSL_ERROR_WANT_WRITE:
- /* The operation did not complete; the same TLS/SSL I/O function
- should be called again later. This is basicly an EWOULDBLOCK
- equivalent. */
- *curlcode = CURLE_AGAIN;
- return -1;
- case SSL_ERROR_SYSCALL:
- failf(conn->data, "SSL_write() returned SYSCALL, errno = %d",
- SOCKERRNO);
- *curlcode = CURLE_SEND_ERROR;
- return -1;
- case SSL_ERROR_SSL:
- /* A failure in the SSL library occurred, usually a protocol error.
- The OpenSSL error queue contains more information on the error. */
- sslerror = ERR_get_error();
- failf(conn->data, "SSL_write() error: %s",
- ERR_error_string(sslerror, error_buffer));
- *curlcode = CURLE_SEND_ERROR;
- return -1;
- }
- /* a true error */
- failf(conn->data, "SSL_write() return error %d", err);
- *curlcode = CURLE_SEND_ERROR;
- return -1;
- }
- return (ssize_t)rc; /* number of bytes */
-}
-
-static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
- int num, /* socketindex */
- char *buf, /* store read data here */
- size_t buffersize, /* max amount to read */
- CURLcode *curlcode)
-{
- char error_buffer[120]; /* OpenSSL documents that this must be at
- least 120 bytes long. */
- unsigned long sslerror;
- ssize_t nread;
- int buffsize;
-
- ERR_clear_error();
-
- buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
- nread = (ssize_t)SSL_read(conn->ssl[num].handle, buf, buffsize);
- if(nread < 0) {
- /* failed SSL_read */
- int err = SSL_get_error(conn->ssl[num].handle, (int)nread);
-
- switch(err) {
- case SSL_ERROR_NONE: /* this is not an error */
- case SSL_ERROR_ZERO_RETURN: /* no more data */
- break;
- case SSL_ERROR_WANT_READ:
- case SSL_ERROR_WANT_WRITE:
- /* there's data pending, re-invoke SSL_read() */
- *curlcode = CURLE_AGAIN;
- return -1;
- default:
- /* openssl/ssl.h says "look at error stack/return value/errno" */
- sslerror = ERR_get_error();
- failf(conn->data, "SSL read: %s, errno %d",
- ERR_error_string(sslerror, error_buffer),
- SOCKERRNO);
- *curlcode = CURLE_RECV_ERROR;
- return -1;
- }
- }
- return nread;
-}
-
-size_t Curl_ossl_version(char *buffer, size_t size)
-{
-#ifdef YASSL_VERSION
- /* yassl provides an OpenSSL API compatiblity layer so it looks identical
- to OpenSSL in all other aspects */
- return snprintf(buffer, size, "yassl/%s", YASSL_VERSION);
-#else /* YASSL_VERSION */
-
-#if(SSLEAY_VERSION_NUMBER >= 0x905000)
- {
- char sub[2];
- unsigned long ssleay_value;
- sub[1]='\0';
- ssleay_value=SSLeay();
- if(ssleay_value < 0x906000) {
- ssleay_value=SSLEAY_VERSION_NUMBER;
- sub[0]='\0';
- }
- else {
- if(ssleay_value&0xff0) {
- sub[0]=(char)(((ssleay_value>>4)&0xff) + 'a' -1);
- }
- else
- sub[0]='\0';
- }
-
- return snprintf(buffer, size, "OpenSSL/%lx.%lx.%lx%s",
- (ssleay_value>>28)&0xf,
- (ssleay_value>>20)&0xff,
- (ssleay_value>>12)&0xff,
- sub);
- }
-
-#else /* SSLEAY_VERSION_NUMBER is less than 0.9.5 */
-
-#if(SSLEAY_VERSION_NUMBER >= 0x900000)
- return snprintf(buffer, size, "OpenSSL/%lx.%lx.%lx",
- (SSLEAY_VERSION_NUMBER>>28)&0xff,
- (SSLEAY_VERSION_NUMBER>>20)&0xff,
- (SSLEAY_VERSION_NUMBER>>12)&0xf);
-
-#else /* (SSLEAY_VERSION_NUMBER >= 0x900000) */
- {
- char sub[2];
- sub[1]='\0';
- if(SSLEAY_VERSION_NUMBER&0x0f) {
- sub[0]=(SSLEAY_VERSION_NUMBER&0x0f) + 'a' -1;
- }
- else
- sub[0]='\0';
-
- return snprintf(buffer, size, "SSL/%x.%x.%x%s",
- (SSLEAY_VERSION_NUMBER>>12)&0xff,
- (SSLEAY_VERSION_NUMBER>>8)&0xf,
- (SSLEAY_VERSION_NUMBER>>4)&0xf, sub);
- }
-#endif /* (SSLEAY_VERSION_NUMBER >= 0x900000) */
-#endif /* SSLEAY_VERSION_NUMBER is less than 0.9.5 */
-
-#endif /* YASSL_VERSION */
-}
-#endif /* USE_SSLEAY */
diff --git a/lib/ssluse.h b/lib/ssluse.h
deleted file mode 100644
index 2ac0ad2e..00000000
--- a/lib/ssluse.h
+++ /dev/null
@@ -1,84 +0,0 @@
-#ifndef __SSLUSE_H
-#define __SSLUSE_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-#ifdef USE_SSLEAY
-/*
- * This header should only be needed to get included by sslgen.c and ssluse.c
- */
-
-#include "urldata.h"
-CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex);
-CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn,
- int sockindex,
- bool *done);
-
-/* close a SSL connection */
-void Curl_ossl_close(struct connectdata *conn, int sockindex);
-
-/* tell OpenSSL to close down all open information regarding connections (and
- thus session ID caching etc) */
-int Curl_ossl_close_all(struct SessionHandle *data);
-
-/* Sets an OpenSSL engine */
-CURLcode Curl_ossl_set_engine(struct SessionHandle *data, const char *engine);
-
-/* function provided for the generic SSL-layer, called when a session id
- should be freed */
-void Curl_ossl_session_free(void *ptr);
-
-/* Sets engine as default for all SSL operations */
-CURLcode Curl_ossl_set_engine_default(struct SessionHandle *data);
-
-/* Build list of OpenSSL engines */
-struct curl_slist *Curl_ossl_engines_list(struct SessionHandle *data);
-
-int Curl_ossl_init(void);
-void Curl_ossl_cleanup(void);
-
-size_t Curl_ossl_version(char *buffer, size_t size);
-int Curl_ossl_check_cxn(struct connectdata *cxn);
-int Curl_ossl_seed(struct SessionHandle *data);
-
-int Curl_ossl_shutdown(struct connectdata *conn, int sockindex);
-bool Curl_ossl_data_pending(const struct connectdata *conn,
- int connindex);
-
-/* API setup for OpenSSL */
-#define curlssl_init Curl_ossl_init
-#define curlssl_cleanup Curl_ossl_cleanup
-#define curlssl_connect Curl_ossl_connect
-#define curlssl_connect_nonblocking Curl_ossl_connect_nonblocking
-#define curlssl_session_free(x) Curl_ossl_session_free(x)
-#define curlssl_close_all Curl_ossl_close_all
-#define curlssl_close Curl_ossl_close
-#define curlssl_shutdown(x,y) Curl_ossl_shutdown(x,y)
-#define curlssl_set_engine(x,y) Curl_ossl_set_engine(x,y)
-#define curlssl_set_engine_default(x) Curl_ossl_set_engine_default(x)
-#define curlssl_engines_list(x) Curl_ossl_engines_list(x)
-#define curlssl_version Curl_ossl_version
-#define curlssl_check_cxn Curl_ossl_check_cxn
-#define curlssl_data_pending(x,y) Curl_ossl_data_pending(x,y)
-
-#endif /* USE_SSLEAY */
-#endif /* __SSLUSE_H */
diff --git a/lib/strdup.c b/lib/strdup.c
index a3107cff..5685b813 100644
--- a/lib/strdup.c
+++ b/lib/strdup.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,9 +19,12 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#include "setup.h"
+#include "curl_setup.h"
#include "strdup.h"
+#include "curl_memory.h"
+
+/* The last #include file should be: */
+#include "memdebug.h"
#ifndef HAVE_STRDUP
char *curlx_strdup(const char *str)
@@ -41,9 +44,30 @@ char *curlx_strdup(const char *str)
if(!newstr)
return (char *)NULL;
- memcpy(newstr,str,(len+1)*sizeof(char));
+ memcpy(newstr, str, (len+1)*sizeof(char));
return newstr;
}
#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 4edbcd7d..23a71f86 100644
--- a/lib/strdup.h
+++ b/lib/strdup.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,10 +21,11 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#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/strequal.c b/lib/strequal.c
index f6bf5f3b..5f2f508e 100644
--- a/lib/strequal.c
+++ b/lib/strequal.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,10 +20,7 @@
*
***************************************************************************/
-#include "setup.h"
-
-#include <string.h>
-#include <ctype.h>
+#include "curl_setup.h"
#ifdef HAVE_STRINGS_H
#include <strings.h>
@@ -31,6 +28,9 @@
#include "strequal.h"
+/*
+ * @unittest: 1301
+ */
int curl_strequal(const char *first, const char *second)
{
#if defined(HAVE_STRCASECMP)
@@ -51,6 +51,9 @@ int curl_strequal(const char *first, const char *second)
#endif
}
+/*
+ * @unittest: 1301
+ */
int curl_strnequal(const char *first, const char *second, size_t max)
{
#if defined(HAVE_STRNCASECMP)
@@ -74,48 +77,3 @@ int curl_strnequal(const char *first, const char *second, size_t max)
return toupper(*first) == toupper(*second);
#endif
}
-
-#ifndef HAVE_STRLCAT
-/*
- * The strlcat() function appends the NUL-terminated string src to the end
- * of dst. It will append at most size - strlen(dst) - 1 bytes, NUL-termi-
- * nating the result.
- *
- * The strlcpy() and strlcat() functions return the total length of the
- * string they tried to create. For strlcpy() that means the length of src.
- * For strlcat() that means the initial length of dst plus the length of
- * src. While this may seem somewhat confusing it was done to make trunca-
- * tion detection simple.
- *
- *
- */
-size_t Curl_strlcat(char *dst, const char *src, size_t siz)
-{
- char *d = dst;
- const char *s = src;
- size_t n = siz;
- union {
- ssize_t sig;
- size_t uns;
- } dlen;
-
- /* Find the end of dst and adjust bytes left but don't go past end */
- while(n-- != 0 && *d != '\0')
- d++;
- dlen.sig = d - dst;
- n = siz - dlen.uns;
-
- if(n == 0)
- return(dlen.uns + strlen(s));
- while(*s != '\0') {
- if(n != 1) {
- *d++ = *s;
- n--;
- }
- s++;
- }
- *d = '\0';
-
- return(dlen.uns + (s - src)); /* count does not include NUL */
-}
-#endif
diff --git a/lib/strequal.h b/lib/strequal.h
index 202c9197..117a305b 100644
--- a/lib/strequal.h
+++ b/lib/strequal.h
@@ -1,5 +1,5 @@
-#ifndef __STREQUAL_H
-#define __STREQUAL_H
+#ifndef HEADER_CURL_STREQUAL_H
+#define HEADER_CURL_STREQUAL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,9 +27,5 @@
#define strequal(a,b) curl_strequal(a,b)
#define strnequal(a,b,c) curl_strnequal(a,b,c)
-#ifndef HAVE_STRLCAT
-#define strlcat(x,y,z) Curl_strlcat(x,y,z)
-#endif
-size_t strlcat(char *dst, const char *src, size_t siz);
+#endif /* HEADER_CURL_STREQUAL_H */
-#endif
diff --git a/lib/strerror.c b/lib/strerror.c
index e8ecea59..cbc5c473 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2004 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2004 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_STRERROR_R
# if (!defined(HAVE_POSIX_STRERROR_R) && \
@@ -29,24 +29,21 @@
(defined(HAVE_POSIX_STRERROR_R) && defined(HAVE_VXWORKS_STRERROR_R)) || \
(defined(HAVE_GLIBC_STRERROR_R) && defined(HAVE_VXWORKS_STRERROR_R)) || \
(defined(HAVE_POSIX_STRERROR_R) && defined(HAVE_GLIBC_STRERROR_R))
-# error "strerror_r MUST be either POSIX-style, glibc-style or vxworks-style"
+# error "strerror_r MUST be either POSIX, glibc or vxworks-style"
# endif
#endif
#include <curl/curl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
#ifdef USE_LIBIDN
#include <idna.h>
#endif
#include "strerror.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
const char *
curl_easy_strerror(CURLcode error)
@@ -65,6 +62,10 @@ curl_easy_strerror(CURLcode error)
case CURLE_URL_MALFORMAT:
return "URL using bad/illegal format or missing URL";
+ case CURLE_NOT_BUILT_IN:
+ return "A requested feature, protocol or option was not found built-in in"
+ " this libcurl due to a build-time decision.";
+
case CURLE_COULDNT_RESOLVE_PROXY:
return "Couldn't resolve proxy name";
@@ -80,6 +81,12 @@ curl_easy_strerror(CURLcode error)
case CURLE_REMOTE_ACCESS_DENIED:
return "Access denied to remote resource";
+ case CURLE_FTP_ACCEPT_FAILED:
+ return "FTP: The server failed to connect to data port";
+
+ case CURLE_FTP_ACCEPT_TIMEOUT:
+ return "FTP: Accepting server connect has timed out";
+
case CURLE_FTP_PRET_FAILED:
return "FTP: The server did not accept the PRET command.";
@@ -95,6 +102,9 @@ 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";
@@ -167,8 +177,8 @@ curl_easy_strerror(CURLcode error)
case CURLE_TOO_MANY_REDIRECTS :
return "Number of redirects hit maximum amount";
- case CURLE_UNKNOWN_TELNET_OPTION:
- return "User specified an unknown telnet option";
+ case CURLE_UNKNOWN_OPTION:
+ return "An unknown option was passed in to libcurl";
case CURLE_TELNET_OPTION_SYNTAX :
return "Malformed telnet option";
@@ -201,13 +211,14 @@ curl_easy_strerror(CURLcode error)
return "Couldn't use specified SSL cipher";
case CURLE_SSL_CACERT:
- return "Peer certificate cannot be authenticated with known CA certificates";
+ return "Peer certificate cannot be authenticated with given CA "
+ "certificates";
case CURLE_SSL_CACERT_BADFILE:
return "Problem with the SSL CA cert (path? access rights?)";
case CURLE_BAD_CONTENT_ENCODING:
- return "Unrecognized HTTP Content-Encoding";
+ return "Unrecognized or bad HTTP Content or Transfer-Encoding";
case CURLE_LDAP_INVALID_URL:
return "Invalid LDAP URL";
@@ -281,11 +292,16 @@ curl_easy_strerror(CURLcode error)
case CURLE_CHUNK_FAILED:
return "Chunk callback failed";
+ 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_OBSOLETE4:
- case CURLE_OBSOLETE10:
- case CURLE_OBSOLETE12:
- case CURLE_OBSOLETE16:
case CURLE_OBSOLETE20:
case CURLE_OBSOLETE24:
case CURLE_OBSOLETE29:
@@ -314,7 +330,7 @@ curl_easy_strerror(CURLcode error)
*/
return "Unknown error";
#else
- if(error == CURLE_OK)
+ if(!error)
return "No error";
else
return "Error";
@@ -350,6 +366,9 @@ curl_multi_strerror(CURLMcode error)
case CURLM_UNKNOWN_OPTION:
return "Unknown option";
+ case CURLM_ADDED_ALREADY:
+ return "The easy handle is already added to a multi handle";
+
case CURLM_LAST:
break;
}
@@ -383,6 +402,9 @@ curl_share_strerror(CURLSHcode error)
case CURLSHE_NOMEM:
return "Out of memory";
+ case CURLSHE_NOT_BUILT_IN:
+ return "Feature not enabled in this library";
+
case CURLSHE_LAST:
break;
}
@@ -575,7 +597,7 @@ get_winsock_error (int err, char *buf, size_t len)
return NULL;
}
#else
- if(err == CURLE_OK)
+ if(!err)
return NULL;
else
p = "error";
@@ -619,7 +641,7 @@ const char *Curl_strerror(struct connectdata *conn, int err)
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
LANG_NEUTRAL, wbuf, sizeof(wbuf)/sizeof(wchar_t), NULL);
- wcstombs(buf,wbuf,max);
+ wcstombs(buf, wbuf, max);
}
#else
/* 'sys_nerr' is the maximum errno number, it is not widely portable */
@@ -627,7 +649,7 @@ const char *Curl_strerror(struct connectdata *conn, int err)
strncpy(buf, strerror(err), max);
else {
if(!get_winsock_error(err, buf, max) &&
- !FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
+ !FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
LANG_NEUTRAL, buf, (DWORD)max, NULL))
snprintf(buf, max, "Unknown error %d (%#x)", err, err);
}
@@ -662,7 +684,7 @@ const char *Curl_strerror(struct connectdata *conn, int err)
#elif defined(HAVE_STRERROR_R) && defined(HAVE_VXWORKS_STRERROR_R)
/*
* The vxworks-style strerror_r() does use the buffer we pass to the function.
- * The buffer size should be at least MAXERRSTR_SIZE (150) defined in rtsold.h
+ * The buffer size should be at least NAME_MAX (256)
*/
{
char buffer[256];
@@ -686,9 +708,9 @@ const char *Curl_strerror(struct connectdata *conn, int err)
buf[max] = '\0'; /* make sure the string is zero terminated */
/* strip trailing '\r\n' or '\n'. */
- if((p = strrchr(buf,'\n')) != NULL && (p - buf) >= 2)
+ if((p = strrchr(buf, '\n')) != NULL && (p - buf) >= 2)
*p = '\0';
- if((p = strrchr(buf,'\r')) != NULL && (p - buf) >= 1)
+ if((p = strrchr(buf, '\r')) != NULL && (p - buf) >= 1)
*p = '\0';
if(old_errno != ERRNO)
@@ -773,3 +795,342 @@ const char *Curl_idn_strerror (struct connectdata *conn, int err)
#endif
}
#endif /* USE_LIBIDN */
+
+#ifdef USE_WINDOWS_SSPI
+const char *Curl_sspi_strerror (struct connectdata *conn, int err)
+{
+#ifndef CURL_DISABLE_VERBOSE_STRINGS
+ char txtbuf[80];
+ char msgbuf[sizeof(conn->syserr_buf)];
+ char *p, *str, *msg = NULL;
+ bool msg_formatted = FALSE;
+ int old_errno;
+#endif
+ const char *txt;
+ char *outbuf;
+ size_t outmax;
+
+ DEBUGASSERT(conn);
+
+ outbuf = conn->syserr_buf;
+ outmax = sizeof(conn->syserr_buf)-1;
+ *outbuf = '\0';
+
+#ifndef CURL_DISABLE_VERBOSE_STRINGS
+
+ old_errno = ERRNO;
+
+ switch (err) {
+ case SEC_E_OK:
+ txt = "No error";
+ break;
+ case SEC_E_ALGORITHM_MISMATCH:
+ txt = "SEC_E_ALGORITHM_MISMATCH";
+ break;
+ case SEC_E_BAD_BINDINGS:
+ txt = "SEC_E_BAD_BINDINGS";
+ break;
+ case SEC_E_BAD_PKGID:
+ txt = "SEC_E_BAD_PKGID";
+ break;
+ case SEC_E_BUFFER_TOO_SMALL:
+ txt = "SEC_E_BUFFER_TOO_SMALL";
+ break;
+ case SEC_E_CANNOT_INSTALL:
+ txt = "SEC_E_CANNOT_INSTALL";
+ break;
+ case SEC_E_CANNOT_PACK:
+ txt = "SEC_E_CANNOT_PACK";
+ break;
+ case SEC_E_CERT_EXPIRED:
+ txt = "SEC_E_CERT_EXPIRED";
+ break;
+ case SEC_E_CERT_UNKNOWN:
+ txt = "SEC_E_CERT_UNKNOWN";
+ break;
+ case SEC_E_CERT_WRONG_USAGE:
+ txt = "SEC_E_CERT_WRONG_USAGE";
+ break;
+ case SEC_E_CONTEXT_EXPIRED:
+ txt = "SEC_E_CONTEXT_EXPIRED";
+ break;
+ case SEC_E_CROSSREALM_DELEGATION_FAILURE:
+ txt = "SEC_E_CROSSREALM_DELEGATION_FAILURE";
+ break;
+ case SEC_E_CRYPTO_SYSTEM_INVALID:
+ txt = "SEC_E_CRYPTO_SYSTEM_INVALID";
+ break;
+ case SEC_E_DECRYPT_FAILURE:
+ txt = "SEC_E_DECRYPT_FAILURE";
+ break;
+ case SEC_E_DELEGATION_POLICY:
+ txt = "SEC_E_DELEGATION_POLICY";
+ break;
+ case SEC_E_DELEGATION_REQUIRED:
+ txt = "SEC_E_DELEGATION_REQUIRED";
+ break;
+ case SEC_E_DOWNGRADE_DETECTED:
+ txt = "SEC_E_DOWNGRADE_DETECTED";
+ break;
+ case SEC_E_ENCRYPT_FAILURE:
+ txt = "SEC_E_ENCRYPT_FAILURE";
+ break;
+ case SEC_E_ILLEGAL_MESSAGE:
+ txt = "SEC_E_ILLEGAL_MESSAGE";
+ break;
+ case SEC_E_INCOMPLETE_CREDENTIALS:
+ txt = "SEC_E_INCOMPLETE_CREDENTIALS";
+ break;
+ case SEC_E_INCOMPLETE_MESSAGE:
+ txt = "SEC_E_INCOMPLETE_MESSAGE";
+ break;
+ case SEC_E_INSUFFICIENT_MEMORY:
+ txt = "SEC_E_INSUFFICIENT_MEMORY";
+ break;
+ case SEC_E_INTERNAL_ERROR:
+ txt = "SEC_E_INTERNAL_ERROR";
+ break;
+ case SEC_E_INVALID_HANDLE:
+ txt = "SEC_E_INVALID_HANDLE";
+ break;
+ case SEC_E_INVALID_PARAMETER:
+ txt = "SEC_E_INVALID_PARAMETER";
+ break;
+ case SEC_E_INVALID_TOKEN:
+ txt = "SEC_E_INVALID_TOKEN";
+ break;
+ case SEC_E_ISSUING_CA_UNTRUSTED:
+ txt = "SEC_E_ISSUING_CA_UNTRUSTED";
+ break;
+ case SEC_E_ISSUING_CA_UNTRUSTED_KDC:
+ txt = "SEC_E_ISSUING_CA_UNTRUSTED_KDC";
+ break;
+ case SEC_E_KDC_CERT_EXPIRED:
+ txt = "SEC_E_KDC_CERT_EXPIRED";
+ break;
+ case SEC_E_KDC_CERT_REVOKED:
+ txt = "SEC_E_KDC_CERT_REVOKED";
+ break;
+ case SEC_E_KDC_INVALID_REQUEST:
+ txt = "SEC_E_KDC_INVALID_REQUEST";
+ break;
+ case SEC_E_KDC_UNABLE_TO_REFER:
+ txt = "SEC_E_KDC_UNABLE_TO_REFER";
+ break;
+ case SEC_E_KDC_UNKNOWN_ETYPE:
+ txt = "SEC_E_KDC_UNKNOWN_ETYPE";
+ break;
+ case SEC_E_LOGON_DENIED:
+ txt = "SEC_E_LOGON_DENIED";
+ break;
+ case SEC_E_MAX_REFERRALS_EXCEEDED:
+ txt = "SEC_E_MAX_REFERRALS_EXCEEDED";
+ break;
+ case SEC_E_MESSAGE_ALTERED:
+ txt = "SEC_E_MESSAGE_ALTERED";
+ break;
+ case SEC_E_MULTIPLE_ACCOUNTS:
+ txt = "SEC_E_MULTIPLE_ACCOUNTS";
+ break;
+ case SEC_E_MUST_BE_KDC:
+ txt = "SEC_E_MUST_BE_KDC";
+ break;
+ case SEC_E_NOT_OWNER:
+ txt = "SEC_E_NOT_OWNER";
+ break;
+ case SEC_E_NO_AUTHENTICATING_AUTHORITY:
+ txt = "SEC_E_NO_AUTHENTICATING_AUTHORITY";
+ break;
+ case SEC_E_NO_CREDENTIALS:
+ txt = "SEC_E_NO_CREDENTIALS";
+ break;
+ case SEC_E_NO_IMPERSONATION:
+ txt = "SEC_E_NO_IMPERSONATION";
+ break;
+ case SEC_E_NO_IP_ADDRESSES:
+ txt = "SEC_E_NO_IP_ADDRESSES";
+ break;
+ case SEC_E_NO_KERB_KEY:
+ txt = "SEC_E_NO_KERB_KEY";
+ break;
+ case SEC_E_NO_PA_DATA:
+ txt = "SEC_E_NO_PA_DATA";
+ break;
+ case SEC_E_NO_S4U_PROT_SUPPORT:
+ txt = "SEC_E_NO_S4U_PROT_SUPPORT";
+ break;
+ case SEC_E_NO_TGT_REPLY:
+ txt = "SEC_E_NO_TGT_REPLY";
+ break;
+ case SEC_E_OUT_OF_SEQUENCE:
+ txt = "SEC_E_OUT_OF_SEQUENCE";
+ break;
+ case SEC_E_PKINIT_CLIENT_FAILURE:
+ txt = "SEC_E_PKINIT_CLIENT_FAILURE";
+ break;
+ case SEC_E_PKINIT_NAME_MISMATCH:
+ txt = "SEC_E_PKINIT_NAME_MISMATCH";
+ break;
+ case SEC_E_POLICY_NLTM_ONLY:
+ txt = "SEC_E_POLICY_NLTM_ONLY";
+ break;
+ case SEC_E_QOP_NOT_SUPPORTED:
+ txt = "SEC_E_QOP_NOT_SUPPORTED";
+ break;
+ case SEC_E_REVOCATION_OFFLINE_C:
+ txt = "SEC_E_REVOCATION_OFFLINE_C";
+ break;
+ case SEC_E_REVOCATION_OFFLINE_KDC:
+ txt = "SEC_E_REVOCATION_OFFLINE_KDC";
+ break;
+ case SEC_E_SECPKG_NOT_FOUND:
+ txt = "SEC_E_SECPKG_NOT_FOUND";
+ break;
+ case SEC_E_SECURITY_QOS_FAILED:
+ txt = "SEC_E_SECURITY_QOS_FAILED";
+ break;
+ case SEC_E_SHUTDOWN_IN_PROGRESS:
+ txt = "SEC_E_SHUTDOWN_IN_PROGRESS";
+ break;
+ case SEC_E_SMARTCARD_CERT_EXPIRED:
+ txt = "SEC_E_SMARTCARD_CERT_EXPIRED";
+ break;
+ case SEC_E_SMARTCARD_CERT_REVOKED:
+ txt = "SEC_E_SMARTCARD_CERT_REVOKED";
+ break;
+ case SEC_E_SMARTCARD_LOGON_REQUIRED:
+ txt = "SEC_E_SMARTCARD_LOGON_REQUIRED";
+ break;
+ case SEC_E_STRONG_CRYPTO_NOT_SUPPORTED:
+ txt = "SEC_E_STRONG_CRYPTO_NOT_SUPPORTED";
+ break;
+ case SEC_E_TARGET_UNKNOWN:
+ txt = "SEC_E_TARGET_UNKNOWN";
+ break;
+ case SEC_E_TIME_SKEW:
+ txt = "SEC_E_TIME_SKEW";
+ break;
+ case SEC_E_TOO_MANY_PRINCIPALS:
+ txt = "SEC_E_TOO_MANY_PRINCIPALS";
+ break;
+ case SEC_E_UNFINISHED_CONTEXT_DELETED:
+ txt = "SEC_E_UNFINISHED_CONTEXT_DELETED";
+ break;
+ case SEC_E_UNKNOWN_CREDENTIALS:
+ txt = "SEC_E_UNKNOWN_CREDENTIALS";
+ break;
+ case SEC_E_UNSUPPORTED_FUNCTION:
+ txt = "SEC_E_UNSUPPORTED_FUNCTION";
+ break;
+ case SEC_E_UNSUPPORTED_PREAUTH:
+ txt = "SEC_E_UNSUPPORTED_PREAUTH";
+ break;
+ case SEC_E_UNTRUSTED_ROOT:
+ txt = "SEC_E_UNTRUSTED_ROOT";
+ break;
+ case SEC_E_WRONG_CREDENTIAL_HANDLE:
+ txt = "SEC_E_WRONG_CREDENTIAL_HANDLE";
+ break;
+ case SEC_E_WRONG_PRINCIPAL:
+ txt = "SEC_E_WRONG_PRINCIPAL";
+ break;
+ case SEC_I_COMPLETE_AND_CONTINUE:
+ txt = "SEC_I_COMPLETE_AND_CONTINUE";
+ break;
+ case SEC_I_COMPLETE_NEEDED:
+ txt = "SEC_I_COMPLETE_NEEDED";
+ break;
+ case SEC_I_CONTEXT_EXPIRED:
+ txt = "SEC_I_CONTEXT_EXPIRED";
+ break;
+ case SEC_I_CONTINUE_NEEDED:
+ txt = "SEC_I_CONTINUE_NEEDED";
+ break;
+ case SEC_I_INCOMPLETE_CREDENTIALS:
+ txt = "SEC_I_INCOMPLETE_CREDENTIALS";
+ break;
+ case SEC_I_LOCAL_LOGON:
+ txt = "SEC_I_LOCAL_LOGON";
+ break;
+ case SEC_I_NO_LSA_CONTEXT:
+ txt = "SEC_I_NO_LSA_CONTEXT";
+ break;
+ case SEC_I_RENEGOTIATE:
+ txt = "SEC_I_RENEGOTIATE";
+ break;
+ case SEC_I_SIGNATURE_NEEDED:
+ txt = "SEC_I_SIGNATURE_NEEDED";
+ break;
+ default:
+ txt = "Unknown error";
+ }
+
+ if(err == SEC_E_OK)
+ strncpy(outbuf, txt, outmax);
+ else if(err == SEC_E_ILLEGAL_MESSAGE)
+ snprintf(outbuf, outmax,
+ "SEC_E_ILLEGAL_MESSAGE (0x%04X%04X) - This error usually occurs "
+ "when a fatal SSL/TLS alert is received (e.g. handshake failed). "
+ "More detail may be available in the Windows System event log.",
+ (err >> 16) & 0xffff, err & 0xffff);
+ else {
+ str = txtbuf;
+ snprintf(txtbuf, sizeof(txtbuf), "%s (0x%04X%04X)",
+ txt, (err >> 16) & 0xffff, err & 0xffff);
+ txtbuf[sizeof(txtbuf)-1] = '\0';
+
+#ifdef _WIN32_WCE
+ {
+ wchar_t wbuf[256];
+ wbuf[0] = L'\0';
+
+ if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL, err, LANG_NEUTRAL,
+ wbuf, sizeof(wbuf)/sizeof(wchar_t), NULL)) {
+ wcstombs(msgbuf, wbuf, sizeof(msgbuf)-1);
+ msg_formatted = TRUE;
+ }
+ }
+#else
+ if(FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL, err, LANG_NEUTRAL,
+ msgbuf, sizeof(msgbuf)-1, NULL)) {
+ msg_formatted = TRUE;
+ }
+#endif
+ if(msg_formatted) {
+ msgbuf[sizeof(msgbuf)-1] = '\0';
+ /* strip trailing '\r\n' or '\n' */
+ if((p = strrchr(msgbuf, '\n')) != NULL && (p - msgbuf) >= 2)
+ *p = '\0';
+ if((p = strrchr(msgbuf, '\r')) != NULL && (p - msgbuf) >= 1)
+ *p = '\0';
+ msg = msgbuf;
+ }
+ if(msg)
+ snprintf(outbuf, outmax, "%s - %s", str, msg);
+ else
+ strncpy(outbuf, str, outmax);
+ }
+
+ if(old_errno != ERRNO)
+ SET_ERRNO(old_errno);
+
+#else
+
+ if(err == SEC_E_OK)
+ txt = "No error";
+ else
+ txt = "Error";
+
+ strncpy(outbuf, txt, outmax);
+
+#endif
+
+ outbuf[outmax] = '\0';
+
+ return outbuf;
+}
+#endif /* USE_WINDOWS_SSPI */
diff --git a/lib/strerror.h b/lib/strerror.h
index 7f2342ae..f1b22210 100644
--- a/lib/strerror.h
+++ b/lib/strerror.h
@@ -1,5 +1,5 @@
-#ifndef __CURL_STRERROR_H
-#define __CURL_STRERROR_H
+#ifndef HEADER_CURL_STRERROR_H
+#define HEADER_CURL_STRERROR_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,4 +30,8 @@ const char *Curl_strerror (struct connectdata *conn, int err);
const char *Curl_idn_strerror (struct connectdata *conn, int err);
#endif
+#ifdef USE_WINDOWS_SSPI
+const char *Curl_sspi_strerror (struct connectdata *conn, int err);
#endif
+
+#endif /* HEADER_CURL_STRERROR_H */
diff --git a/lib/strtok.c b/lib/strtok.c
index 91c25415..0d31351f 100644
--- a/lib/strtok.c
+++ b/lib/strtok.c
@@ -20,11 +20,10 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef HAVE_STRTOK_R
#include <stddef.h>
-#include <string.h>
#include "strtok.h"
diff --git a/lib/strtok.h b/lib/strtok.h
index 8baf7794..1147d70d 100644
--- a/lib/strtok.h
+++ b/lib/strtok.h
@@ -21,7 +21,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <stddef.h>
#ifndef HAVE_STRTOK_R
diff --git a/lib/strtoofft.c b/lib/strtoofft.c
index 61ff05be..03a97e8c 100644
--- a/lib/strtoofft.c
+++ b/lib/strtoofft.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,7 +20,8 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
+
#include "strtoofft.h"
/*
@@ -32,15 +33,11 @@
*/
#ifdef NEED_CURL_STRTOLL
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
/* Range tests can be used for alphanum decoding if characters are consecutive,
like in ASCII. Else an array is scanned. Determine this condition now. */
#if('9' - '0') != 9 || ('Z' - 'A') != 25 || ('z' - 'a') != 25
-#include <string.h>
#define NO_RANGE_TEST
@@ -110,9 +107,9 @@ curlx_strtoll(const char *nptr, char **endptr, int base)
/* Loop handling digits. */
value = 0;
overflow = 0;
- for (i = get_char(end[0], base);
- i != -1;
- end++, i = get_char(end[0], base)) {
+ for(i = get_char(end[0], base);
+ i != -1;
+ end++, i = get_char(end[0], base)) {
newval = base * value + i;
if(newval < value) {
/* We've overflowed. */
diff --git a/lib/strtoofft.h b/lib/strtoofft.h
index 8208e87f..75c73d48 100644
--- a/lib/strtoofft.h
+++ b/lib/strtoofft.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -22,22 +22,22 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
/*
* Determine which string to integral data type conversion function we use
* to implement string conversion to our curl_off_t integral data type.
*
* Notice that curl_off_t might be 64 or 32 bit wide, and that it might use
- * an undelying data type which might be 'long', 'int64_t', 'long long' or
+ * an underlying data type which might be 'long', 'int64_t', 'long long' or
* '__int64' and more remotely other data types.
*
* On systems where the size of curl_off_t is greater than the size of 'long'
- * the conversion funtion to use is strtoll() if it is available, otherwise,
+ * the conversion function to use is strtoll() if it is available, otherwise,
* we emulate its functionality with our own clone.
*
* On systems where the size of curl_off_t is smaller or equal than the size
- * of 'long' the conversion funtion to use is strtol().
+ * of 'long' the conversion function to use is strtol().
*/
#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
@@ -45,7 +45,14 @@
# define curlx_strtoofft strtoll
# else
# if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_INTEGRAL_MAX_BITS >= 64)
- _CRTIMP __int64 __cdecl _strtoi64(const char *, char **, int);
+# if defined(_SAL_VERSION)
+ _Check_return_ _CRTIMP __int64 __cdecl _strtoi64(
+ _In_z_ const char *_String,
+ _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix);
+# else
+ _CRTIMP __int64 __cdecl _strtoi64(const char *_String,
+ char **_EndPtr, int _Radix);
+# endif
# define curlx_strtoofft _strtoi64
# else
curl_off_t curlx_strtoll(const char *nptr, char **endptr, int base);
diff --git a/lib/telnet.c b/lib/telnet.c
index 1a5683d4..aabf99d4 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,31 +20,16 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_TELNET
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#if defined(WIN32)
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -59,8 +44,6 @@
#include <sys/param.h>
#endif
-#endif /* WIN32 */
-
#include "urldata.h"
#include <curl/curl.h>
#include "transfer.h"
@@ -68,30 +51,34 @@
#include "telnet.h"
#include "connect.h"
#include "progress.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#define TELOPTS
#define TELCMDS
#include "arpa_telnet.h"
-#include "curl_memory.h"
#include "select.h"
#include "strequal.h"
#include "rawstr.h"
+#include "warnless.h"
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
#define SUBBUFSIZE 512
-#define CURL_SB_CLEAR(x) x->subpointer = x->subbuffer;
-#define CURL_SB_TERM(x) { x->subend = x->subpointer; CURL_SB_CLEAR(x); }
-#define CURL_SB_ACCUM(x,c) \
- if(x->subpointer < (x->subbuffer+sizeof x->subbuffer)) { \
- *x->subpointer++ = (c); \
- }
+#define CURL_SB_CLEAR(x) x->subpointer = x->subbuffer
+#define CURL_SB_TERM(x) \
+ do { \
+ x->subend = x->subpointer; \
+ CURL_SB_CLEAR(x); \
+ } WHILE_FALSE
+#define CURL_SB_ACCUM(x,c) \
+ do { \
+ if(x->subpointer < (x->subbuffer+sizeof x->subbuffer)) \
+ *x->subpointer++ = (c); \
+ } WHILE_FALSE
#define CURL_SB_GET(x) ((*x->subpointer++)&0xff)
#define CURL_SB_PEEK(x) ((*x->subpointer)&0xff)
@@ -99,7 +86,7 @@
#define CURL_SB_LEN(x) (x->subend - x->subpointer)
#ifdef CURL_DISABLE_VERBOSE_STRINGS
-#define printoption(a,b,c,d) do { } while(0)
+#define printoption(a,b,c,d) Curl_nop_stmt
#endif
#ifdef USE_WINSOCK
@@ -127,10 +114,13 @@ static void printsub(struct SessionHandle *data,
int direction, unsigned char *pointer,
size_t length);
static void suboption(struct connectdata *);
+static void sendsuboption(struct connectdata *conn, int option);
static CURLcode telnet_do(struct connectdata *conn, bool *done);
static CURLcode telnet_done(struct connectdata *conn,
CURLcode, bool premature);
+static CURLcode send_telnet_data(struct connectdata *conn,
+ char *buffer, ssize_t nread);
/* For negotiation compliant to RFC 1143 */
#define CURL_NO 0
@@ -166,9 +156,12 @@ struct TELNET {
int him[256];
int himq[256];
int him_preferred[256];
+ int subnegotiation[256];
char subopt_ttype[32]; /* Set with suboption TTYPE */
- char subopt_xdisploc[128]; /* Set with suboption XDISPLOC */
- struct curl_slist *telnet_vars; /* Environment variables */
+ char subopt_xdisploc[128]; /* Set with suboption XDISPLOC */
+ unsigned short subopt_wsx; /* Set with suboption NAWS */
+ unsigned short subopt_wsy; /* Set with suboption NAWS */
+ struct curl_slist *telnet_vars; /* Environment variables */
/* suboptions */
unsigned char subbuffer[SUBBUFSIZE];
@@ -193,10 +186,13 @@ const struct Curl_handler Curl_handler_telnet = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_TELNET, /* defport */
- PROT_TELNET /* protocol */
+ CURLPROTO_TELNET, /* protocol */
+ PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */
};
@@ -230,9 +226,9 @@ check_wsock2 ( struct SessionHandle *data )
if(LOBYTE(wsaData.wVersion) != LOBYTE(wVersionRequested) ||
HIBYTE(wsaData.wVersion) != HIBYTE(wVersionRequested)) {
/* Our version isn't supported */
- failf(data,"insufficient winsock version to support "
- "telnet");
- return CURLE_FAILED_INIT;
+ failf(data, "insufficient winsock version to support "
+ "telnet");
+ return CURLE_FAILED_INIT;
}
/* Our version is supported */
@@ -249,7 +245,7 @@ CURLcode init_telnet(struct connectdata *conn)
if(!tn)
return CURLE_OUT_OF_MEMORY;
- conn->data->state.proto.telnet = (void *)tn; /* make us known */
+ conn->data->req.protop = tn; /* make us known */
tn->telrcv_state = CURL_TS_DATA;
@@ -257,21 +253,49 @@ CURLcode init_telnet(struct connectdata *conn)
CURL_SB_CLEAR(tn);
/* Set the options we want by default */
- tn->us_preferred[CURL_TELOPT_BINARY] = CURL_YES;
tn->us_preferred[CURL_TELOPT_SGA] = CURL_YES;
- tn->him_preferred[CURL_TELOPT_BINARY] = CURL_YES;
tn->him_preferred[CURL_TELOPT_SGA] = CURL_YES;
+ /* To be compliant with previous releases of libcurl
+ we enable this option by default. This behaviour
+ can be changed thanks to the "BINARY" option in
+ CURLOPT_TELNETOPTIONS
+ */
+ tn->us_preferred[CURL_TELOPT_BINARY] = CURL_YES;
+ tn->him_preferred[CURL_TELOPT_BINARY] = CURL_YES;
+
+ /* We must allow the server to echo what we sent
+ but it is not necessary to request the server
+ to do so (it might forces the server to close
+ the connection). Hence, we ignore ECHO in the
+ negotiate function
+ */
+ tn->him_preferred[CURL_TELOPT_ECHO] = CURL_YES;
+
+ /* Set the subnegotiation fields to send information
+ just after negotiation passed (do/will)
+
+ Default values are (0,0) initialized by calloc.
+ According to the RFC1013 it is valid:
+ A value equal to zero is acceptable for the width (or height),
+ and means that no character width (or height) is being sent.
+ In this case, the width (or height) that will be assumed by the
+ Telnet server is operating system specific (it will probably be
+ based upon the terminal type information that may have been sent
+ using the TERMINAL TYPE Telnet option). */
+ tn->subnegotiation[CURL_TELOPT_NAWS] = CURL_YES;
return CURLE_OK;
}
static void negotiate(struct connectdata *conn)
{
int i;
- struct TELNET *tn = (struct TELNET *) conn->data->state.proto.telnet;
+ struct TELNET *tn = (struct TELNET *) conn->data->req.protop;
+
+ for(i = 0;i < CURL_NTELOPTS;i++) {
+ if(i==CURL_TELOPT_ECHO)
+ continue;
- for(i = 0;i < CURL_NTELOPTS;i++)
- {
if(tn->us_preferred[i] == CURL_YES)
set_local_option(conn, i, CURL_YES);
@@ -287,21 +311,17 @@ static void printoption(struct SessionHandle *data,
const char *fmt;
const char *opt;
- if(data->set.verbose)
- {
- if(cmd == CURL_IAC)
- {
+ if(data->set.verbose) {
+ if(cmd == CURL_IAC) {
if(CURL_TELCMD_OK(option))
infof(data, "%s IAC %s\n", direction, CURL_TELCMD(option));
else
infof(data, "%s IAC %d\n", direction, option);
}
- else
- {
+ else {
fmt = (cmd == CURL_WILL) ? "WILL" : (cmd == CURL_WONT) ? "WONT" :
(cmd == CURL_DO) ? "DO" : (cmd == CURL_DONT) ? "DONT" : 0;
- if(fmt)
- {
+ if(fmt) {
if(CURL_TELOPT_OK(option))
opt = CURL_TELOPT(option);
else if(option == CURL_TELOPT_EXOPL)
@@ -344,81 +364,73 @@ static void send_negotiation(struct connectdata *conn, int cmd, int option)
static
void set_remote_option(struct connectdata *conn, int option, int newstate)
{
- struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
- if(newstate == CURL_YES)
- {
- switch(tn->him[option])
- {
- case CURL_NO:
- tn->him[option] = CURL_WANTYES;
- send_negotiation(conn, CURL_DO, option);
- break;
+ struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+ if(newstate == CURL_YES) {
+ switch(tn->him[option]) {
+ case CURL_NO:
+ tn->him[option] = CURL_WANTYES;
+ send_negotiation(conn, CURL_DO, option);
+ break;
- case CURL_YES:
- /* Already enabled */
- break;
+ case CURL_YES:
+ /* Already enabled */
+ break;
- case CURL_WANTNO:
- switch(tn->himq[option])
- {
- case CURL_EMPTY:
- /* Already negotiating for CURL_YES, queue the request */
- tn->himq[option] = CURL_OPPOSITE;
- break;
- case CURL_OPPOSITE:
- /* Error: already queued an enable request */
- break;
- }
+ case CURL_WANTNO:
+ switch(tn->himq[option]) {
+ case CURL_EMPTY:
+ /* Already negotiating for CURL_YES, queue the request */
+ tn->himq[option] = CURL_OPPOSITE;
+ break;
+ case CURL_OPPOSITE:
+ /* Error: already queued an enable request */
break;
+ }
+ break;
- case CURL_WANTYES:
- switch(tn->himq[option])
- {
- case CURL_EMPTY:
- /* Error: already negotiating for enable */
- break;
- case CURL_OPPOSITE:
- tn->himq[option] = CURL_EMPTY;
- break;
- }
+ case CURL_WANTYES:
+ switch(tn->himq[option]) {
+ case CURL_EMPTY:
+ /* Error: already negotiating for enable */
+ break;
+ case CURL_OPPOSITE:
+ tn->himq[option] = CURL_EMPTY;
break;
+ }
+ break;
}
}
- else /* NO */
- {
- switch(tn->him[option])
- {
- case CURL_NO:
- /* Already disabled */
- break;
+ else { /* NO */
+ switch(tn->him[option]) {
+ case CURL_NO:
+ /* Already disabled */
+ break;
- case CURL_YES:
- tn->him[option] = CURL_WANTNO;
- send_negotiation(conn, CURL_DONT, option);
- break;
+ case CURL_YES:
+ tn->him[option] = CURL_WANTNO;
+ send_negotiation(conn, CURL_DONT, option);
+ break;
- case CURL_WANTNO:
- switch(tn->himq[option])
- {
- case CURL_EMPTY:
- /* Already negotiating for NO */
- break;
- case CURL_OPPOSITE:
- tn->himq[option] = CURL_EMPTY;
- break;
- }
+ case CURL_WANTNO:
+ switch(tn->himq[option]) {
+ case CURL_EMPTY:
+ /* Already negotiating for NO */
+ break;
+ case CURL_OPPOSITE:
+ tn->himq[option] = CURL_EMPTY;
break;
+ }
+ break;
- case CURL_WANTYES:
- switch(tn->himq[option])
- {
- case CURL_EMPTY:
- tn->himq[option] = CURL_OPPOSITE;
- break;
- case CURL_OPPOSITE:
- break;
- }
+ case CURL_WANTYES:
+ switch(tn->himq[option]) {
+ case CURL_EMPTY:
+ tn->himq[option] = CURL_OPPOSITE;
+ break;
+ case CURL_OPPOSITE:
break;
+ }
+ break;
}
}
}
@@ -426,179 +438,163 @@ void set_remote_option(struct connectdata *conn, int option, int newstate)
static
void rec_will(struct connectdata *conn, int option)
{
- struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
- switch(tn->him[option])
- {
- case CURL_NO:
- if(tn->him_preferred[option] == CURL_YES)
- {
- tn->him[option] = CURL_YES;
- send_negotiation(conn, CURL_DO, option);
- }
- else
- {
- send_negotiation(conn, CURL_DONT, option);
- }
- break;
+ struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+ switch(tn->him[option]) {
+ case CURL_NO:
+ if(tn->him_preferred[option] == CURL_YES) {
+ tn->him[option] = CURL_YES;
+ send_negotiation(conn, CURL_DO, option);
+ }
+ else
+ send_negotiation(conn, CURL_DONT, option);
- case CURL_YES:
- /* Already enabled */
- break;
+ break;
- case CURL_WANTNO:
- switch(tn->himq[option])
- {
- case CURL_EMPTY:
- /* Error: DONT answered by WILL */
- tn->him[option] = CURL_NO;
- break;
- case CURL_OPPOSITE:
- /* Error: DONT answered by WILL */
- tn->him[option] = CURL_YES;
- tn->himq[option] = CURL_EMPTY;
- break;
- }
+ case CURL_YES:
+ /* Already enabled */
+ break;
+
+ case CURL_WANTNO:
+ switch(tn->himq[option]) {
+ case CURL_EMPTY:
+ /* Error: DONT answered by WILL */
+ tn->him[option] = CURL_NO;
break;
+ case CURL_OPPOSITE:
+ /* Error: DONT answered by WILL */
+ tn->him[option] = CURL_YES;
+ tn->himq[option] = CURL_EMPTY;
+ break;
+ }
+ break;
- case CURL_WANTYES:
- switch(tn->himq[option])
- {
- case CURL_EMPTY:
- tn->him[option] = CURL_YES;
- break;
- case CURL_OPPOSITE:
- tn->him[option] = CURL_WANTNO;
- tn->himq[option] = CURL_EMPTY;
- send_negotiation(conn, CURL_DONT, option);
- break;
- }
+ case CURL_WANTYES:
+ switch(tn->himq[option]) {
+ case CURL_EMPTY:
+ tn->him[option] = CURL_YES;
+ break;
+ case CURL_OPPOSITE:
+ tn->him[option] = CURL_WANTNO;
+ tn->himq[option] = CURL_EMPTY;
+ send_negotiation(conn, CURL_DONT, option);
break;
+ }
+ break;
}
}
static
void rec_wont(struct connectdata *conn, int option)
{
- struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
- switch(tn->him[option])
- {
- case CURL_NO:
- /* Already disabled */
- break;
+ struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+ switch(tn->him[option]) {
+ case CURL_NO:
+ /* Already disabled */
+ break;
- case CURL_YES:
+ case CURL_YES:
+ tn->him[option] = CURL_NO;
+ send_negotiation(conn, CURL_DONT, option);
+ break;
+
+ case CURL_WANTNO:
+ switch(tn->himq[option]) {
+ case CURL_EMPTY:
tn->him[option] = CURL_NO;
- send_negotiation(conn, CURL_DONT, option);
break;
- case CURL_WANTNO:
- switch(tn->himq[option])
- {
- case CURL_EMPTY:
- tn->him[option] = CURL_NO;
- break;
-
- case CURL_OPPOSITE:
- tn->him[option] = CURL_WANTYES;
- tn->himq[option] = CURL_EMPTY;
- send_negotiation(conn, CURL_DO, option);
- break;
- }
+ case CURL_OPPOSITE:
+ tn->him[option] = CURL_WANTYES;
+ tn->himq[option] = CURL_EMPTY;
+ send_negotiation(conn, CURL_DO, option);
break;
+ }
+ break;
- case CURL_WANTYES:
- switch(tn->himq[option])
- {
- case CURL_EMPTY:
- tn->him[option] = CURL_NO;
- break;
- case CURL_OPPOSITE:
- tn->him[option] = CURL_NO;
- tn->himq[option] = CURL_EMPTY;
- break;
- }
+ case CURL_WANTYES:
+ switch(tn->himq[option]) {
+ case CURL_EMPTY:
+ tn->him[option] = CURL_NO;
+ break;
+ case CURL_OPPOSITE:
+ tn->him[option] = CURL_NO;
+ tn->himq[option] = CURL_EMPTY;
break;
+ }
+ break;
}
}
static void
set_local_option(struct connectdata *conn, int option, int newstate)
{
- struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
- if(newstate == CURL_YES)
- {
- switch(tn->us[option])
- {
- case CURL_NO:
- tn->us[option] = CURL_WANTYES;
- send_negotiation(conn, CURL_WILL, option);
- break;
+ struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+ if(newstate == CURL_YES) {
+ switch(tn->us[option]) {
+ case CURL_NO:
+ tn->us[option] = CURL_WANTYES;
+ send_negotiation(conn, CURL_WILL, option);
+ break;
- case CURL_YES:
- /* Already enabled */
- break;
+ case CURL_YES:
+ /* Already enabled */
+ break;
- case CURL_WANTNO:
- switch(tn->usq[option])
- {
- case CURL_EMPTY:
- /* Already negotiating for CURL_YES, queue the request */
- tn->usq[option] = CURL_OPPOSITE;
- break;
- case CURL_OPPOSITE:
- /* Error: already queued an enable request */
- break;
- }
+ case CURL_WANTNO:
+ switch(tn->usq[option]) {
+ case CURL_EMPTY:
+ /* Already negotiating for CURL_YES, queue the request */
+ tn->usq[option] = CURL_OPPOSITE;
+ break;
+ case CURL_OPPOSITE:
+ /* Error: already queued an enable request */
break;
+ }
+ break;
- case CURL_WANTYES:
- switch(tn->usq[option])
- {
- case CURL_EMPTY:
- /* Error: already negotiating for enable */
- break;
- case CURL_OPPOSITE:
- tn->usq[option] = CURL_EMPTY;
- break;
- }
+ case CURL_WANTYES:
+ switch(tn->usq[option]) {
+ case CURL_EMPTY:
+ /* Error: already negotiating for enable */
+ break;
+ case CURL_OPPOSITE:
+ tn->usq[option] = CURL_EMPTY;
break;
+ }
+ break;
}
}
- else /* NO */
- {
- switch(tn->us[option])
- {
- case CURL_NO:
- /* Already disabled */
- break;
+ else { /* NO */
+ switch(tn->us[option]) {
+ case CURL_NO:
+ /* Already disabled */
+ break;
- case CURL_YES:
- tn->us[option] = CURL_WANTNO;
- send_negotiation(conn, CURL_WONT, option);
- break;
+ case CURL_YES:
+ tn->us[option] = CURL_WANTNO;
+ send_negotiation(conn, CURL_WONT, option);
+ break;
- case CURL_WANTNO:
- switch(tn->usq[option])
- {
- case CURL_EMPTY:
- /* Already negotiating for NO */
- break;
- case CURL_OPPOSITE:
- tn->usq[option] = CURL_EMPTY;
- break;
- }
+ case CURL_WANTNO:
+ switch(tn->usq[option]) {
+ case CURL_EMPTY:
+ /* Already negotiating for NO */
+ break;
+ case CURL_OPPOSITE:
+ tn->usq[option] = CURL_EMPTY;
break;
+ }
+ break;
- case CURL_WANTYES:
- switch(tn->usq[option])
- {
- case CURL_EMPTY:
- tn->usq[option] = CURL_OPPOSITE;
- break;
- case CURL_OPPOSITE:
- break;
- }
+ case CURL_WANTYES:
+ switch(tn->usq[option]) {
+ case CURL_EMPTY:
+ tn->usq[option] = CURL_OPPOSITE;
break;
+ case CURL_OPPOSITE:
+ break;
+ }
+ break;
}
}
}
@@ -606,98 +602,102 @@ set_local_option(struct connectdata *conn, int option, int newstate)
static
void rec_do(struct connectdata *conn, int option)
{
- struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
- switch(tn->us[option])
- {
- case CURL_NO:
- if(tn->us_preferred[option] == CURL_YES)
- {
- tn->us[option] = CURL_YES;
- send_negotiation(conn, CURL_WILL, option);
- }
- else
- {
- send_negotiation(conn, CURL_WONT, option);
- }
- break;
+ struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+ switch(tn->us[option]) {
+ case CURL_NO:
+ if(tn->us_preferred[option] == CURL_YES) {
+ tn->us[option] = CURL_YES;
+ send_negotiation(conn, CURL_WILL, option);
+ if(tn->subnegotiation[option] == CURL_YES)
+ /* transmission of data option */
+ sendsuboption(conn, option);
+ }
+ else if(tn->subnegotiation[option] == CURL_YES) {
+ /* send information to achieve this option*/
+ tn->us[option] = CURL_YES;
+ send_negotiation(conn, CURL_WILL, option);
+ sendsuboption(conn, option);
+ }
+ else
+ send_negotiation(conn, CURL_WONT, option);
+ break;
- case CURL_YES:
- /* Already enabled */
- break;
+ case CURL_YES:
+ /* Already enabled */
+ break;
- case CURL_WANTNO:
- switch(tn->usq[option])
- {
- case CURL_EMPTY:
- /* Error: DONT answered by WILL */
- tn->us[option] = CURL_NO;
- break;
- case CURL_OPPOSITE:
- /* Error: DONT answered by WILL */
- tn->us[option] = CURL_YES;
- tn->usq[option] = CURL_EMPTY;
- break;
- }
+ case CURL_WANTNO:
+ switch(tn->usq[option]) {
+ case CURL_EMPTY:
+ /* Error: DONT answered by WILL */
+ tn->us[option] = CURL_NO;
+ break;
+ case CURL_OPPOSITE:
+ /* Error: DONT answered by WILL */
+ tn->us[option] = CURL_YES;
+ tn->usq[option] = CURL_EMPTY;
break;
+ }
+ break;
- case CURL_WANTYES:
- switch(tn->usq[option])
- {
- case CURL_EMPTY:
- tn->us[option] = CURL_YES;
- break;
- case CURL_OPPOSITE:
- tn->us[option] = CURL_WANTNO;
- tn->himq[option] = CURL_EMPTY;
- send_negotiation(conn, CURL_WONT, option);
- break;
+ case CURL_WANTYES:
+ switch(tn->usq[option]) {
+ case CURL_EMPTY:
+ tn->us[option] = CURL_YES;
+ if(tn->subnegotiation[option] == CURL_YES) {
+ /* transmission of data option */
+ sendsuboption(conn, option);
}
break;
+ case CURL_OPPOSITE:
+ tn->us[option] = CURL_WANTNO;
+ tn->himq[option] = CURL_EMPTY;
+ send_negotiation(conn, CURL_WONT, option);
+ break;
+ }
+ break;
}
}
static
void rec_dont(struct connectdata *conn, int option)
{
- struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
- switch(tn->us[option])
- {
- case CURL_NO:
- /* Already disabled */
- break;
+ struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+ switch(tn->us[option]) {
+ case CURL_NO:
+ /* Already disabled */
+ break;
- case CURL_YES:
+ case CURL_YES:
+ tn->us[option] = CURL_NO;
+ send_negotiation(conn, CURL_WONT, option);
+ break;
+
+ case CURL_WANTNO:
+ switch(tn->usq[option]) {
+ case CURL_EMPTY:
tn->us[option] = CURL_NO;
- send_negotiation(conn, CURL_WONT, option);
break;
- case CURL_WANTNO:
- switch(tn->usq[option])
- {
- case CURL_EMPTY:
- tn->us[option] = CURL_NO;
- break;
-
- case CURL_OPPOSITE:
- tn->us[option] = CURL_WANTYES;
- tn->usq[option] = CURL_EMPTY;
- send_negotiation(conn, CURL_WILL, option);
- break;
- }
+ case CURL_OPPOSITE:
+ tn->us[option] = CURL_WANTYES;
+ tn->usq[option] = CURL_EMPTY;
+ send_negotiation(conn, CURL_WILL, option);
break;
+ }
+ break;
- case CURL_WANTYES:
- switch(tn->usq[option])
- {
- case CURL_EMPTY:
- tn->us[option] = CURL_NO;
- break;
- case CURL_OPPOSITE:
- tn->us[option] = CURL_NO;
- tn->usq[option] = CURL_EMPTY;
- break;
- }
+ case CURL_WANTYES:
+ switch(tn->usq[option]) {
+ case CURL_EMPTY:
+ tn->us[option] = CURL_NO;
break;
+ case CURL_OPPOSITE:
+ tn->us[option] = CURL_NO;
+ tn->usq[option] = CURL_EMPTY;
+ break;
+ }
+ break;
}
}
@@ -709,20 +709,16 @@ static void printsub(struct SessionHandle *data,
{
unsigned int i = 0;
- if(data->set.verbose)
- {
- if(direction)
- {
+ if(data->set.verbose) {
+ if(direction) {
infof(data, "%s IAC SB ", (direction == '<')? "RCVD":"SENT");
- if(length >= 3)
- {
+ if(length >= 3) {
int j;
i = pointer[length-2];
j = pointer[length-1];
- if(i != CURL_IAC || j != CURL_SE)
- {
+ if(i != CURL_IAC || j != CURL_SE) {
infof(data, "(terminated by ");
if(CURL_TELOPT_OK(i))
infof(data, "%s ", CURL_TELOPT(i));
@@ -741,28 +737,35 @@ static void printsub(struct SessionHandle *data,
}
length -= 2;
}
- if(length < 1)
- {
+ if(length < 1) {
infof(data, "(Empty suboption?)");
return;
}
if(CURL_TELOPT_OK(pointer[0])) {
switch(pointer[0]) {
- case CURL_TELOPT_TTYPE:
- case CURL_TELOPT_XDISPLOC:
- case CURL_TELOPT_NEW_ENVIRON:
- infof(data, "%s", CURL_TELOPT(pointer[0]));
- break;
- default:
- infof(data, "%s (unsupported)", CURL_TELOPT(pointer[0]));
- break;
+ case CURL_TELOPT_TTYPE:
+ case CURL_TELOPT_XDISPLOC:
+ case CURL_TELOPT_NEW_ENVIRON:
+ case CURL_TELOPT_NAWS:
+ infof(data, "%s", CURL_TELOPT(pointer[0]));
+ break;
+ default:
+ infof(data, "%s (unsupported)", CURL_TELOPT(pointer[0]));
+ break;
}
}
else
infof(data, "%d (unknown)", pointer[i]);
- switch(pointer[1]) {
+ 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]);
+ break;
+ default:
+ switch(pointer[1]) {
case CURL_TELQUAL_IS:
infof(data, " IS");
break;
@@ -775,9 +778,9 @@ static void printsub(struct SessionHandle *data,
case CURL_TELQUAL_NAME:
infof(data, " NAME");
break;
- }
+ }
- switch(pointer[0]) {
+ switch(pointer[0]) {
case CURL_TELOPT_TTYPE:
case CURL_TELOPT_XDISPLOC:
pointer[length] = 0;
@@ -788,48 +791,52 @@ static void printsub(struct SessionHandle *data,
infof(data, " ");
for(i = 3;i < length;i++) {
switch(pointer[i]) {
- case CURL_NEW_ENV_VAR:
- infof(data, ", ");
- break;
- case CURL_NEW_ENV_VALUE:
- infof(data, " = ");
- break;
- default:
- infof(data, "%c", pointer[i]);
- break;
+ case CURL_NEW_ENV_VAR:
+ infof(data, ", ");
+ break;
+ case CURL_NEW_ENV_VALUE:
+ infof(data, " = ");
+ break;
+ default:
+ infof(data, "%c", pointer[i]);
+ break;
}
}
}
break;
default:
- for (i = 2; i < length; i++)
+ for(i = 2; i < length; i++)
infof(data, " %.2x", pointer[i]);
break;
+ }
}
-
if(direction)
- {
infof(data, "\n");
- }
}
}
static CURLcode check_telnet_options(struct connectdata *conn)
{
struct curl_slist *head;
- char option_keyword[128];
- char option_arg[256];
- char *buf;
+ struct curl_slist *beg;
+ char option_keyword[128] = "";
+ char option_arg[256] = "";
struct SessionHandle *data = conn->data;
- struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
+ struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+ CURLcode result = CURLE_OK;
+ int binary_option;
/* Add the user name as an environment variable if it
was given on the command line */
- if(conn->bits.user_passwd)
- {
+ if(conn->bits.user_passwd) {
snprintf(option_arg, sizeof(option_arg), "USER,%s", conn->user);
- tn->telnet_vars = curl_slist_append(tn->telnet_vars, option_arg);
-
+ beg = curl_slist_append(tn->telnet_vars, option_arg);
+ if(!beg) {
+ curl_slist_free_all(tn->telnet_vars);
+ tn->telnet_vars = NULL;
+ return CURLE_OUT_OF_MEMORY;
+ }
+ tn->telnet_vars = beg;
tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES;
}
@@ -855,23 +862,56 @@ static CURLcode check_telnet_options(struct connectdata *conn)
/* Environment variable */
if(Curl_raw_equal(option_keyword, "NEW_ENV")) {
- buf = strdup(option_arg);
- if(!buf)
- return CURLE_OUT_OF_MEMORY;
- tn->telnet_vars = curl_slist_append(tn->telnet_vars, buf);
+ beg = curl_slist_append(tn->telnet_vars, option_arg);
+ if(!beg) {
+ result = CURLE_OUT_OF_MEMORY;
+ break;
+ }
+ tn->telnet_vars = beg;
tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES;
continue;
}
+ /* Window Size */
+ if(Curl_raw_equal(option_keyword, "WS")) {
+ if(sscanf(option_arg, "%hu%*[xX]%hu",
+ &tn->subopt_wsx, &tn->subopt_wsy) == 2)
+ tn->us_preferred[CURL_TELOPT_NAWS] = CURL_YES;
+ else {
+ failf(data, "Syntax error in telnet option: %s", head->data);
+ result = CURLE_TELNET_OPTION_SYNTAX;
+ break;
+ }
+ continue;
+ }
+
+ /* To take care or not of the 8th bit in data exchange */
+ if(Curl_raw_equal(option_keyword, "BINARY")) {
+ binary_option=atoi(option_arg);
+ if(binary_option!=1) {
+ tn->us_preferred[CURL_TELOPT_BINARY] = CURL_NO;
+ tn->him_preferred[CURL_TELOPT_BINARY] = CURL_NO;
+ }
+ continue;
+ }
+
failf(data, "Unknown telnet option %s", head->data);
- return CURLE_UNKNOWN_TELNET_OPTION;
- } else {
+ result = CURLE_UNKNOWN_TELNET_OPTION;
+ break;
+ }
+ else {
failf(data, "Syntax error in telnet option: %s", head->data);
- return CURLE_TELNET_OPTION_SYNTAX;
+ result = CURLE_TELNET_OPTION_SYNTAX;
+ break;
}
}
- return CURLE_OK;
+ if(result) {
+ curl_slist_free_all(tn->telnet_vars);
+ tn->telnet_vars = NULL;
+ }
+
+ return result;
}
/*
@@ -889,10 +929,10 @@ static void suboption(struct connectdata *conn)
size_t len;
size_t tmplen;
int err;
- char varname[128];
- char varval[128];
+ char varname[128] = "";
+ char varval[128] = "";
struct SessionHandle *data = conn->data;
- struct TELNET *tn = (struct TELNET *)data->state.proto.telnet;
+ struct TELNET *tn = (struct TELNET *)data->req.protop;
printsub(data, '<', (unsigned char *)tn->subbuffer, CURL_SB_LEN(tn)+2);
switch (CURL_SB_GET(tn)) {
@@ -930,11 +970,12 @@ static void suboption(struct connectdata *conn)
tmplen = (strlen(v->data) + 1);
/* Add the variable only if it fits */
if(len + tmplen < (int)sizeof(temp)-6) {
- sscanf(v->data, "%127[^,],%127s", varname, varval);
- snprintf((char *)&temp[len], sizeof(temp) - len,
- "%c%s%c%s", CURL_NEW_ENV_VAR, varname,
- CURL_NEW_ENV_VALUE, varval);
- len += tmplen;
+ if(sscanf(v->data, "%127[^,],%127s", varname, varval)) {
+ snprintf((char *)&temp[len], sizeof(temp) - len,
+ "%c%s%c%s", CURL_NEW_ENV_VAR, varname,
+ CURL_NEW_ENV_VALUE, varval);
+ len += tmplen;
+ }
}
}
snprintf((char *)&temp[len], sizeof(temp) - len,
@@ -951,6 +992,69 @@ static void suboption(struct connectdata *conn)
return;
}
+
+/*
+ * sendsuboption()
+ *
+ * Send suboption information to the server side.
+ */
+
+static void sendsuboption(struct connectdata *conn, int option)
+{
+ ssize_t bytes_written;
+ int err;
+ unsigned short x, y;
+ unsigned char*uc1, *uc2;
+
+ struct SessionHandle *data = conn->data;
+ struct TELNET *tn = (struct TELNET *)data->req.protop;
+
+ switch (option) {
+ case CURL_TELOPT_NAWS:
+ /* We prepare data to be sent */
+ CURL_SB_CLEAR(tn);
+ CURL_SB_ACCUM(tn, CURL_IAC);
+ CURL_SB_ACCUM(tn, CURL_SB);
+ CURL_SB_ACCUM(tn, CURL_TELOPT_NAWS);
+ /* We must deal either with litte or big endien processors */
+ /* Window size must be sent according to the 'network order' */
+ x=htons(tn->subopt_wsx);
+ y=htons(tn->subopt_wsy);
+ uc1 = (unsigned char*)&x;
+ uc2 = (unsigned char*)&y;
+ CURL_SB_ACCUM(tn, uc1[0]);
+ CURL_SB_ACCUM(tn, uc1[1]);
+ CURL_SB_ACCUM(tn, uc2[0]);
+ CURL_SB_ACCUM(tn, uc2[1]);
+
+ CURL_SB_ACCUM(tn, CURL_IAC);
+ CURL_SB_ACCUM(tn, CURL_SE);
+ CURL_SB_TERM(tn);
+ /* data suboption is now ready */
+
+ printsub(data, '>', (unsigned char *)tn->subbuffer+2,
+ CURL_SB_LEN(tn)-2);
+
+ /* we send the header of the suboption... */
+ bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer, 3);
+ if(bytes_written < 0) {
+ err = SOCKERRNO;
+ failf(data, "Sending data failed (%d)", err);
+ }
+ /* ... then the window size with the send_telnet_data() function
+ to deal with 0xFF cases ... */
+ send_telnet_data(conn, (char *)tn->subbuffer+3, 4);
+ /* ... and the footer */
+ bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer+7, 2);
+ if(bytes_written < 0) {
+ err = SOCKERRNO;
+ failf(data, "Sending data failed (%d)", err);
+ }
+ break;
+ }
+}
+
+
static
CURLcode telrcv(struct connectdata *conn,
const unsigned char *inbuf, /* Data received from socket */
@@ -961,7 +1065,7 @@ CURLcode telrcv(struct connectdata *conn,
int in = 0;
int startwrite=-1;
struct SessionHandle *data = conn->data;
- struct TELNET *tn = (struct TELNET *)data->state.proto.telnet;
+ struct TELNET *tn = (struct TELNET *)data->req.protop;
#define startskipping() \
if(startwrite >= 0) { \
@@ -969,7 +1073,7 @@ CURLcode telrcv(struct connectdata *conn,
CLIENTWRITE_BODY, \
(char *)&inbuf[startwrite], \
in-startwrite); \
- if(result != CURLE_OK) \
+ if(result) \
return result; \
} \
startwrite = -1
@@ -980,69 +1084,61 @@ CURLcode telrcv(struct connectdata *conn,
#define bufferflush() startskipping()
- while(count--)
- {
+ while(count--) {
c = inbuf[in];
- /*infof(data,"In rcv state %d char %d\n", tn->telrcv_state, c);*/
- switch (tn->telrcv_state)
- {
- case CURL_TS_CR:
- tn->telrcv_state = CURL_TS_DATA;
- if(c == '\0')
- {
- startskipping();
- break; /* Ignore \0 after CR */
- }
- writebyte();
- break;
+ switch (tn->telrcv_state) {
+ case CURL_TS_CR:
+ tn->telrcv_state = CURL_TS_DATA;
+ if(c == '\0') {
+ startskipping();
+ break; /* Ignore \0 after CR */
+ }
+ writebyte();
+ break;
- case CURL_TS_DATA:
- if(c == CURL_IAC)
- {
- tn->telrcv_state = CURL_TS_IAC;
- startskipping();
- break;
- }
- else if(c == '\r')
- {
- tn->telrcv_state = CURL_TS_CR;
- }
- writebyte();
+ case CURL_TS_DATA:
+ if(c == CURL_IAC) {
+ tn->telrcv_state = CURL_TS_IAC;
+ startskipping();
break;
+ }
+ else if(c == '\r')
+ tn->telrcv_state = CURL_TS_CR;
+ writebyte();
+ break;
- case CURL_TS_IAC:
- process_iac:
+ case CURL_TS_IAC:
+ process_iac:
DEBUGASSERT(startwrite < 0);
- switch (c)
- {
- case CURL_WILL:
- tn->telrcv_state = CURL_TS_WILL;
- break;
- case CURL_WONT:
- tn->telrcv_state = CURL_TS_WONT;
- break;
- case CURL_DO:
- tn->telrcv_state = CURL_TS_DO;
- break;
- case CURL_DONT:
- tn->telrcv_state = CURL_TS_DONT;
- break;
- case CURL_SB:
- CURL_SB_CLEAR(tn);
- tn->telrcv_state = CURL_TS_SB;
- break;
- case CURL_IAC:
- tn->telrcv_state = CURL_TS_DATA;
- writebyte();
- break;
- case CURL_DM:
- case CURL_NOP:
- case CURL_GA:
- default:
- tn->telrcv_state = CURL_TS_DATA;
- printoption(data, "RCVD", CURL_IAC, c);
- break;
+ switch (c) {
+ case CURL_WILL:
+ tn->telrcv_state = CURL_TS_WILL;
+ break;
+ case CURL_WONT:
+ tn->telrcv_state = CURL_TS_WONT;
+ break;
+ case CURL_DO:
+ tn->telrcv_state = CURL_TS_DO;
+ break;
+ case CURL_DONT:
+ tn->telrcv_state = CURL_TS_DONT;
+ break;
+ case CURL_SB:
+ CURL_SB_CLEAR(tn);
+ tn->telrcv_state = CURL_TS_SB;
+ break;
+ case CURL_IAC:
+ tn->telrcv_state = CURL_TS_DATA;
+ writebyte();
+ break;
+ case CURL_DM:
+ case CURL_NOP:
+ case CURL_GA:
+ default:
+ tn->telrcv_state = CURL_TS_DATA;
+ printoption(data, "RCVD", CURL_IAC, c);
+ break;
}
break;
@@ -1076,23 +1172,17 @@ CURLcode telrcv(struct connectdata *conn,
case CURL_TS_SB:
if(c == CURL_IAC)
- {
tn->telrcv_state = CURL_TS_SE;
- }
else
- {
- CURL_SB_ACCUM(tn,c);
- }
+ CURL_SB_ACCUM(tn, c);
break;
case CURL_TS_SE:
- if(c != CURL_SE)
- {
- if(c != CURL_IAC)
- {
+ if(c != CURL_SE) {
+ if(c != CURL_IAC) {
/*
* This is an error. We only expect to get "IAC IAC" or "IAC SE".
- * Several things may have happend. An IAC was not doubled, the
+ * Several things may have happened. An IAC was not doubled, the
* IAC SE was left off, or another option got inserted into the
* suboption are all possibilities. If we assume that the IAC was
* not doubled, and really the IAC SE was left off, we could get
@@ -1109,7 +1199,7 @@ CURLcode telrcv(struct connectdata *conn,
tn->telrcv_state = CURL_TS_IAC;
goto process_iac;
}
- CURL_SB_ACCUM(tn,c);
+ CURL_SB_ACCUM(tn, c);
tn->telrcv_state = CURL_TS_SB;
}
else
@@ -1137,9 +1227,9 @@ static CURLcode send_telnet_data(struct connectdata *conn,
unsigned char outbuf[2];
ssize_t bytes_written, total_written;
int out_count;
- CURLcode rc = CURLE_OK;
+ CURLcode result = CURLE_OK;
- while(rc == CURLE_OK && nread--) {
+ while(!result && nread--) {
outbuf[0] = *buffer++;
out_count = 1;
if(outbuf[0] == CURL_IAC)
@@ -1154,39 +1244,43 @@ 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) */
- rc = CURLE_SEND_ERROR;
+ result = CURLE_SEND_ERROR;
break;
default: /* write! */
bytes_written = 0;
- rc = Curl_write(conn, conn->sock[FIRSTSOCKET], outbuf+total_written,
- out_count-total_written, &bytes_written);
+ result = Curl_write(conn, conn->sock[FIRSTSOCKET],
+ outbuf+total_written, out_count-total_written,
+ &bytes_written);
total_written += bytes_written;
break;
}
- /* handle partial write */
- } while (rc == CURLE_OK && total_written < out_count);
+ /* handle partial write */
+ } while(!result && total_written < out_count);
}
- return rc;
+ return result;
}
static CURLcode telnet_done(struct connectdata *conn,
CURLcode status, bool premature)
{
- struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
+ struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
(void)status; /* unused */
(void)premature; /* not used */
+ if(!tn)
+ return CURLE_OK;
+
curl_slist_free_all(tn->telnet_vars);
+ tn->telnet_vars = NULL;
- free(conn->data->state.proto.telnet);
- conn->data->state.proto.telnet = NULL;
+ Curl_safefree(conn->data->req.protop);
return CURLE_OK;
}
static CURLcode telnet_do(struct connectdata *conn, bool *done)
{
- CURLcode code;
+ CURLcode result;
struct SessionHandle *data = conn->data;
curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
#ifdef USE_WINSOCK
@@ -1219,65 +1313,61 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
*done = TRUE; /* unconditionally */
- code = init_telnet(conn);
- if(code)
- return code;
+ result = init_telnet(conn);
+ if(result)
+ return result;
- tn = (struct TELNET *)data->state.proto.telnet;
+ tn = (struct TELNET *)data->req.protop;
- code = check_telnet_options(conn);
- if(code)
- return code;
+ result = check_telnet_options(conn);
+ if(result)
+ return result;
#ifdef USE_WINSOCK
/*
** This functionality only works with WinSock >= 2.0. So,
** make sure have it.
*/
- code = check_wsock2(data);
- if(code)
- return code;
+ result = check_wsock2(data);
+ if(result)
+ return result;
/* OK, so we have WinSock 2.0. We need to dynamically */
/* load ws2_32.dll and get the function pointers we need. */
- wsock2 = LoadLibrary("WS2_32.DLL");
+ wsock2 = LoadLibrary(TEXT("WS2_32.DLL"));
if(wsock2 == NULL) {
- failf(data,"failed to load WS2_32.DLL (%d)", ERRNO);
+ failf(data, "failed to load WS2_32.DLL (%d)", ERRNO);
return CURLE_FAILED_INIT;
}
/* Grab a pointer to WSACreateEvent */
- create_event_func = GetProcAddress(wsock2,"WSACreateEvent");
+ create_event_func = GetProcAddress(wsock2, "WSACreateEvent");
if(create_event_func == NULL) {
- failf(data,"failed to find WSACreateEvent function (%d)",
- ERRNO);
+ failf(data, "failed to find WSACreateEvent function (%d)", ERRNO);
FreeLibrary(wsock2);
return CURLE_FAILED_INIT;
}
/* And WSACloseEvent */
- close_event_func = GetProcAddress(wsock2,"WSACloseEvent");
+ close_event_func = GetProcAddress(wsock2, "WSACloseEvent");
if(close_event_func == NULL) {
- failf(data,"failed to find WSACloseEvent function (%d)",
- ERRNO);
+ failf(data, "failed to find WSACloseEvent function (%d)", ERRNO);
FreeLibrary(wsock2);
return CURLE_FAILED_INIT;
}
/* And WSAEventSelect */
- event_select_func = GetProcAddress(wsock2,"WSAEventSelect");
+ event_select_func = GetProcAddress(wsock2, "WSAEventSelect");
if(event_select_func == NULL) {
- failf(data,"failed to find WSAEventSelect function (%d)",
- ERRNO);
+ failf(data, "failed to find WSAEventSelect function (%d)", ERRNO);
FreeLibrary(wsock2);
return CURLE_FAILED_INIT;
}
/* And WSAEnumNetworkEvents */
- enum_netevents_func = GetProcAddress(wsock2,"WSAEnumNetworkEvents");
+ enum_netevents_func = GetProcAddress(wsock2, "WSAEnumNetworkEvents");
if(enum_netevents_func == NULL) {
- failf(data,"failed to find WSAEnumNetworkEvents function (%d)",
- ERRNO);
+ failf(data, "failed to find WSAEnumNetworkEvents function (%d)", ERRNO);
FreeLibrary(wsock2);
return CURLE_FAILED_INIT;
}
@@ -1290,11 +1380,19 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
/* First, create a sockets event object */
event_handle = (WSAEVENT)create_event_func();
if(event_handle == WSA_INVALID_EVENT) {
- failf(data,"WSACreateEvent failed (%d)", SOCKERRNO);
+ failf(data, "WSACreateEvent failed (%d)", SOCKERRNO);
FreeLibrary(wsock2);
return CURLE_FAILED_INIT;
}
+ /* Tell winsock what events we want to listen to */
+ if(event_select_func(sockfd, event_handle, FD_READ|FD_CLOSE) ==
+ SOCKET_ERROR) {
+ close_event_func(event_handle);
+ FreeLibrary(wsock2);
+ return CURLE_OK;
+ }
+
/* The get the Windows file handle for stdin */
stdin_handle = GetStdHandle(STD_INPUT_HANDLE);
@@ -1302,21 +1400,16 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
objs[0] = event_handle;
objs[1] = stdin_handle;
- /* Tell winsock what events we want to listen to */
- if(event_select_func(sockfd, event_handle, FD_READ|FD_CLOSE) == SOCKET_ERROR) {
- close_event_func(event_handle);
- FreeLibrary(wsock2);
- return CURLE_OK;
- }
-
/* If stdin_handle is a pipe, use PeekNamedPipe() method to check it,
else use the old WaitForMultipleObjects() way */
- if(GetFileType(stdin_handle) == FILE_TYPE_PIPE) {
+ if(GetFileType(stdin_handle) == FILE_TYPE_PIPE ||
+ data->set.is_fread_set) {
/* Don't wait for stdin_handle, just wait for event_handle */
obj_count = 1;
/* Check stdin_handle per 100 milliseconds */
wait_timeout = 100;
- } else {
+ }
+ else {
obj_count = 2;
wait_timeout = 1000;
}
@@ -1328,24 +1421,46 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
case WAIT_TIMEOUT:
{
for(;;) {
- if(!PeekNamedPipe(stdin_handle, NULL, 0, NULL, &readfile_read, NULL)) {
- keepon = FALSE;
- code = CURLE_READ_ERROR;
- break;
+ if(data->set.is_fread_set) {
+ /* read from user-supplied method */
+ result = (int)data->set.fread_func(buf, 1, BUFSIZE - 1,
+ data->set.in);
+ if(result == CURL_READFUNC_ABORT) {
+ keepon = FALSE;
+ result = CURLE_READ_ERROR;
+ break;
+ }
+
+ if(result == CURL_READFUNC_PAUSE)
+ break;
+
+ if(result == 0) /* no bytes */
+ break;
+
+ readfile_read = result; /* fall thru with number of bytes read */
}
+ else {
+ /* read from stdin */
+ if(!PeekNamedPipe(stdin_handle, NULL, 0, NULL,
+ &readfile_read, NULL)) {
+ keepon = FALSE;
+ result = CURLE_READ_ERROR;
+ break;
+ }
- if(!readfile_read)
- break;
+ if(!readfile_read)
+ break;
- if(!ReadFile(stdin_handle, buf, sizeof(data->state.buffer),
- &readfile_read, NULL)) {
- keepon = FALSE;
- code = CURLE_READ_ERROR;
- break;
+ if(!ReadFile(stdin_handle, buf, sizeof(data->state.buffer),
+ &readfile_read, NULL)) {
+ keepon = FALSE;
+ result = CURLE_READ_ERROR;
+ break;
+ }
}
- code = send_telnet_data(conn, buf, readfile_read);
- if(code) {
+ result = send_telnet_data(conn, buf, readfile_read);
+ if(result) {
keepon = FALSE;
break;
}
@@ -1358,12 +1473,12 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
if(!ReadFile(stdin_handle, buf, sizeof(data->state.buffer),
&readfile_read, NULL)) {
keepon = FALSE;
- code = CURLE_READ_ERROR;
+ result = CURLE_READ_ERROR;
break;
}
- code = send_telnet_data(conn, buf, readfile_read);
- if(code) {
+ result = send_telnet_data(conn, buf, readfile_read);
+ if(result) {
keepon = FALSE;
break;
}
@@ -1372,22 +1487,23 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
case WAIT_OBJECT_0:
+ events.lNetworkEvents = 0;
if(SOCKET_ERROR == enum_netevents_func(sockfd, event_handle, &events)) {
if((err = SOCKERRNO) != EINPROGRESS) {
- infof(data,"WSAEnumNetworkEvents failed (%d)", err);
+ infof(data, "WSAEnumNetworkEvents failed (%d)", err);
keepon = FALSE;
- code = CURLE_READ_ERROR;
+ result = CURLE_READ_ERROR;
}
break;
}
if(events.lNetworkEvents & FD_READ) {
/* read data from network */
- code = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread);
+ result = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread);
/* read would've blocked. Loop again */
- if(code == CURLE_AGAIN)
+ if(result == CURLE_AGAIN)
break;
/* returned not-zero, this an error */
- else if(code) {
+ else if(result) {
keepon = FALSE;
break;
}
@@ -1398,8 +1514,8 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
break;
}
- code = telrcv(conn, (unsigned char *)buf, nread);
- if(code) {
+ result = telrcv(conn, (unsigned char *) buf, nread);
+ if(result) {
keepon = FALSE;
break;
}
@@ -1423,15 +1539,15 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
now = Curl_tvnow();
if(Curl_tvdiff(now, conn->created) >= data->set.timeout) {
failf(data, "Time-out");
- code = CURLE_OPERATION_TIMEDOUT;
+ result = CURLE_OPERATION_TIMEDOUT;
keepon = FALSE;
}
}
}
/* We called WSACreateEvent, so call WSACloseEvent */
- if(close_event_func(event_handle) == FALSE) {
- infof(data,"WSACloseEvent failed (%d)", SOCKERRNO);
+ if(!close_event_func(event_handle)) {
+ infof(data, "WSACloseEvent failed (%d)", SOCKERRNO);
}
/* "Forget" pointers into the library we're about to free */
@@ -1442,17 +1558,18 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
/* We called LoadLibrary, so call FreeLibrary */
if(!FreeLibrary(wsock2))
- infof(data,"FreeLibrary(wsock2) failed (%d)", ERRNO);
+ infof(data, "FreeLibrary(wsock2) failed (%d)", ERRNO);
#else
pfd[0].fd = sockfd;
pfd[0].events = POLLIN;
- if (data->set.is_fread_set) {
+ if(data->set.fread_func != (curl_read_callback)fread) {
poll_cnt = 1;
interval_ms = 100; /* poll user-supplied read function */
}
else {
- pfd[1].fd = 0;
+ /* really using fread, so infile is a FILE* */
+ pfd[1].fd = fileno((FILE *)data->set.in);
pfd[1].events = POLLIN;
poll_cnt = 2;
interval_ms = 1 * 1000;
@@ -1470,12 +1587,12 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
default: /* read! */
if(pfd[0].revents & POLLIN) {
/* read data from network */
- code = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread);
+ result = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread);
/* read would've blocked. Loop again */
- if(code == CURLE_AGAIN)
+ if(result == CURLE_AGAIN)
break;
/* returned not-zero, this an error */
- else if(code) {
+ else if(result) {
keepon = FALSE;
break;
}
@@ -1488,8 +1605,8 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
total_dl += nread;
Curl_pgrsSetDownloadCounter(data, total_dl);
- code = telrcv(conn, (unsigned char *)buf, nread);
- if(code) {
+ result = telrcv(conn, (unsigned char *)buf, nread);
+ if(result) {
keepon = FALSE;
break;
}
@@ -1504,32 +1621,32 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
}
nread = 0;
- if (poll_cnt == 2) {
- if(pfd[1].revents & POLLIN) { /* read from stdin */
- nread = read(0, buf, BUFSIZE - 1);
+ if(poll_cnt == 2) {
+ if(pfd[1].revents & POLLIN) { /* read from in file */
+ nread = read(pfd[1].fd, buf, BUFSIZE - 1);
}
}
else {
/* read from user-supplied method */
- nread = (int)conn->fread_func(buf, 1, BUFSIZE - 1, conn->fread_in);
- if (nread == CURL_READFUNC_ABORT) {
+ nread = (int)data->set.fread_func(buf, 1, BUFSIZE - 1, data->set.in);
+ if(nread == CURL_READFUNC_ABORT) {
keepon = FALSE;
break;
}
- if (nread == CURL_READFUNC_PAUSE)
+ if(nread == CURL_READFUNC_PAUSE)
break;
}
- if (nread > 0) {
- code = send_telnet_data(conn, buf, nread);
- if(code) {
+ if(nread > 0) {
+ result = send_telnet_data(conn, buf, nread);
+ if(result) {
keepon = FALSE;
break;
}
total_ul += nread;
Curl_pgrsSetUploadCounter(data, total_ul);
}
- else if (nread < 0)
+ else if(nread < 0)
keepon = FALSE;
break;
@@ -1539,20 +1656,20 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
now = Curl_tvnow();
if(Curl_tvdiff(now, conn->created) >= data->set.timeout) {
failf(data, "Time-out");
- code = CURLE_OPERATION_TIMEDOUT;
+ result = CURLE_OPERATION_TIMEDOUT;
keepon = FALSE;
}
}
if(Curl_pgrsUpdate(conn)) {
- code = CURLE_ABORTED_BY_CALLBACK;
- break;
+ result = CURLE_ABORTED_BY_CALLBACK;
+ break;
}
}
#endif
/* mark this as "no further transfer wanted" */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
- return code;
+ return result;
}
#endif
diff --git a/lib/telnet.h b/lib/telnet.h
index f00f7fd8..ddb9e547 100644
--- a/lib/telnet.h
+++ b/lib/telnet.h
@@ -1,6 +1,5 @@
-#ifndef __TELNET_H
-#define __TELNET_H
-
+#ifndef HEADER_CURL_TELNET_H
+#define HEADER_CURL_TELNET_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -25,4 +24,6 @@
#ifndef CURL_DISABLE_TELNET
extern const struct Curl_handler Curl_handler_telnet;
#endif
-#endif
+
+#endif /* HEADER_CURL_TELNET_H */
+
diff --git a/lib/tftp.c b/lib/tftp.c
index 782bb736..4c5796f5 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,30 +20,16 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_TFTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#if defined(WIN32)
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -58,8 +44,6 @@
#include <sys/param.h>
#endif
-#endif /* WIN32 */
-
#include "urldata.h"
#include <curl/curl.h>
#include "transfer.h"
@@ -72,14 +56,12 @@
#include "multiif.h"
#include "url.h"
#include "rawstr.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-#include "curl_memory.h"
+#include "speedcheck.h"
+#include "curl_printf.h"
#include "select.h"
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
/* RFC2348 allows the block size to be negotiated */
@@ -163,10 +145,11 @@ typedef struct tftp_state_data {
/* Forward declarations */
-static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event) ;
-static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) ;
+static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event);
+static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event);
static CURLcode tftp_connect(struct connectdata *conn, bool *done);
-static CURLcode tftp_disconnect(struct connectdata *conn);
+static CURLcode tftp_disconnect(struct connectdata *conn,
+ bool dead_connection);
static CURLcode tftp_do(struct connectdata *conn, bool *done);
static CURLcode tftp_done(struct connectdata *conn,
CURLcode, bool premature);
@@ -193,10 +176,13 @@ const struct Curl_handler Curl_handler_tftp = {
tftp_doing, /* doing */
tftp_getsock, /* proto_getsock */
tftp_getsock, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
tftp_disconnect, /* disconnect */
+ ZERO_NULL, /* readwrite */
PORT_TFTP, /* defport */
- PROT_TFTP /* protocol */
+ CURLPROTO_TFTP, /* protocol */
+ PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */
};
/**********************************************************
@@ -213,12 +199,12 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state)
{
time_t maxtime, timeout;
long timeout_ms;
- bool start = (bool)(state->state == TFTP_STATE_START);
+ bool start = (state->state == TFTP_STATE_START) ? TRUE : FALSE;
time(&state->start_time);
/* Compute drop-dead time */
- timeout_ms = Curl_timeleft(state->conn, NULL, start);
+ timeout_ms = Curl_timeleft(state->conn->data, NULL, start);
if(timeout_ms < 0) {
/* time-out, bail out, go home */
@@ -232,7 +218,7 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state)
state->max_time = state->start_time+maxtime;
/* Set per-block timeout to total */
- timeout = maxtime ;
+ timeout = maxtime;
/* Average restart after 5 seconds */
state->retry_max = (int)timeout/5;
@@ -255,11 +241,11 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state)
state->max_time = state->start_time+maxtime;
- /* Set per-block timeout to 10% of total */
- timeout = maxtime/10 ;
+ /* Set per-block timeout to total */
+ timeout = maxtime;
- /* Average reposting an ACK after 15 seconds */
- state->retry_max = (int)timeout/15;
+ /* Average reposting an ACK after 5 seconds */
+ state->retry_max = (int)timeout/5;
}
/* But bound the total number */
if(state->retry_max<3)
@@ -329,14 +315,14 @@ static const char *tftp_option_get(const char *buf, size_t len,
loc = Curl_strnlen( buf, len );
loc++; /* NULL term */
- if (loc >= len)
+ if(loc >= len)
return NULL;
*option = buf;
loc += Curl_strnlen( buf+loc, len-loc );
loc++; /* NULL term */
- if (loc > len)
+ if(loc > len)
return NULL;
*value = &buf[strlen(*option) + 1];
@@ -352,7 +338,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
/* if OACK doesn't contain blksize option, the default (512) must be used */
state->blksize = TFTP_BLKSIZE_DEFAULT;
- while (tmp < ptr + len) {
+ while(tmp < ptr + len) {
const char *option, *value;
tmp = tftp_option_get(tmp, ptr + len - tmp, &option, &value);
@@ -382,7 +368,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
TFTP_BLKSIZE_MIN);
return CURLE_TFTP_ILLEGAL;
}
- else if (blksize > state->requested_blksize) {
+ else if(blksize > state->requested_blksize) {
/* could realloc pkt buffers here, but the spec doesn't call out
* support for the server requesting a bigger blksize than the client
* requests */
@@ -403,7 +389,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
/* tsize should be ignored on upload: Who cares about the size of the
remote file? */
- if (!data->set.upload) {
+ if(!data->set.upload) {
if(!tsize) {
failf(data, "invalid tsize -:%s:- value in OACK packet", value);
return CURLE_TFTP_ILLEGAL;
@@ -419,41 +405,41 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
static size_t tftp_option_add(tftp_state_data_t *state, size_t csize,
char *buf, const char *option)
{
- if( ( strlen(option) + csize + 1 ) > (size_t)state->blksize )
+ if(( strlen(option) + csize + 1 ) > (size_t)state->blksize)
return 0;
strcpy(buf, option);
- return( strlen(option) + 1 );
+ return strlen(option) + 1;
}
static CURLcode tftp_connect_for_tx(tftp_state_data_t *state,
tftp_event_t event)
{
- CURLcode res;
+ CURLcode result;
#ifndef CURL_DISABLE_VERBOSE_STRINGS
struct SessionHandle *data = state->conn->data;
infof(data, "%s\n", "Connected for transmit");
#endif
state->state = TFTP_STATE_TX;
- res = tftp_set_timeouts(state);
- if(res != CURLE_OK)
- return(res);
+ result = tftp_set_timeouts(state);
+ if(result)
+ return result;
return tftp_tx(state, event);
}
static CURLcode tftp_connect_for_rx(tftp_state_data_t *state,
tftp_event_t event)
{
- CURLcode res;
+ CURLcode result;
#ifndef CURL_DISABLE_VERBOSE_STRINGS
struct SessionHandle *data = state->conn->data;
infof(data, "%s\n", "Connected for receive");
#endif
state->state = TFTP_STATE_RX;
- res = tftp_set_timeouts(state);
- if(res != CURLE_OK)
- return(res);
+ result = tftp_set_timeouts(state);
+ if(result)
+ return result;
return tftp_rx(state, event);
}
@@ -465,7 +451,7 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
char *filename;
char buf[64];
struct SessionHandle *data = state->conn->data;
- CURLcode res = CURLE_OK;
+ CURLcode result = CURLE_OK;
/* Set ascii mode if -B flag was used */
if(data->set.prefer_ascii)
@@ -480,7 +466,7 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
if(state->retries>state->retry_max) {
state->error = TFTP_ERR_NORESPONSE;
state->state = TFTP_STATE_FIN;
- return res;
+ return result;
}
if(data->set.upload) {
@@ -488,8 +474,8 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
setpacketevent(&state->spacket, TFTP_EVENT_WRQ);
state->conn->data->req.upload_fromhere =
(char *)state->spacket.data+4;
- if(data->set.infilesize != -1)
- Curl_pgrsSetUploadSize(data, data->set.infilesize);
+ if(data->state.infilesize != -1)
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
}
else {
/* If we are downloading, send an RRQ */
@@ -509,8 +495,9 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
sbytes = 4 + strlen(filename) + strlen(mode);
/* add tsize option */
- if(data->set.upload && (data->set.infilesize != -1))
- snprintf( buf, sizeof(buf), "%" FORMAT_OFF_T, data->set.infilesize );
+ if(data->set.upload && (data->state.infilesize != -1))
+ snprintf(buf, sizeof(buf), "%" CURL_FORMAT_CURL_OFF_T,
+ data->state.infilesize);
else
strcpy(buf, "0"); /* the destination is large enough */
@@ -544,24 +531,24 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
if(senddata != (ssize_t)sbytes) {
failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO));
}
- Curl_safefree(filename);
+ free(filename);
break;
case TFTP_EVENT_OACK:
if(data->set.upload) {
- res = tftp_connect_for_tx(state, event);
+ result = tftp_connect_for_tx(state, event);
}
else {
- res = tftp_connect_for_rx(state, event);
+ result = tftp_connect_for_rx(state, event);
}
break;
case TFTP_EVENT_ACK: /* Connected for transmit */
- res = tftp_connect_for_tx(state, event);
+ result = tftp_connect_for_tx(state, event);
break;
case TFTP_EVENT_DATA: /* Connected for receive */
- res = tftp_connect_for_rx(state, event);
+ result = tftp_connect_for_rx(state, event);
break;
case TFTP_EVENT_ERROR:
@@ -572,7 +559,8 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
failf(state->conn->data, "tftp_send_first: internal error");
break;
}
- return res;
+
+ return result;
}
/* the next blocknum is x + 1 but it needs to wrap at an unsigned 16bit
@@ -597,21 +585,25 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event)
case TFTP_EVENT_DATA:
/* Is this the block we expect? */
rblock = getrpacketblock(&state->rpacket);
- if(NEXT_BLOCKNUM(state->block) != rblock) {
- /* No, log it, up the retry count and fail if over the limit */
+ if(NEXT_BLOCKNUM(state->block) == rblock) {
+ /* This is the expected block. Reset counters and ACK it. */
+ state->retries = 0;
+ }
+ else if(state->block == rblock) {
+ /* This is the last recently received block again. Log it and ACK it
+ again. */
+ infof(data, "Received last DATA packet block %d again.\n", rblock);
+ }
+ else {
+ /* totally unexpected, just log it */
infof(data,
- "Received unexpected DATA packet block %d\n", rblock);
- state->retries++;
- if(state->retries > state->retry_max) {
- failf(data, "tftp_rx: giving up waiting for block %d",
- NEXT_BLOCKNUM(state->block));
- return CURLE_TFTP_ILLEGAL;
- }
+ "Received unexpected DATA packet block %d, expecting block %d\n",
+ rblock, NEXT_BLOCKNUM(state->block));
break;
}
- /* This is the expected block. Reset counters and ACK it. */
+
+ /* ACK this block. */
state->block = (unsigned short)rblock;
- state->retries = 0;
setpacketevent(&state->spacket, TFTP_EVENT_ACK);
setpacketblock(&state->spacket, state->block);
sbytes = sendto(state->sockfd, (void *)state->spacket.data,
@@ -624,7 +616,7 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event)
}
/* Check if completed (That is, a less than full packet is received) */
- if(state->rbytes < (ssize_t)state->blksize+4){
+ if(state->rbytes < (ssize_t)state->blksize+4) {
state->state = TFTP_STATE_FIN;
}
else {
@@ -708,14 +700,14 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
struct SessionHandle *data = state->conn->data;
ssize_t sbytes;
int rblock;
- CURLcode res = CURLE_OK;
+ CURLcode result = CURLE_OK;
struct SingleRequest *k = &data->req;
switch(event) {
case TFTP_EVENT_ACK:
case TFTP_EVENT_OACK:
- if (event == TFTP_EVENT_ACK) {
+ if(event == TFTP_EVENT_ACK) {
/* Ack the packet */
rblock = getrpacketblock(&state->rpacket);
@@ -734,21 +726,22 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
if(state->retries>state->retry_max) {
failf(data, "tftp_tx: giving up waiting for block %d ack",
state->block);
- res = CURLE_SEND_ERROR;
+ result = CURLE_SEND_ERROR;
}
else {
/* Re-send the data packet */
- sbytes = sendto(state->sockfd, (void *)&state->spacket,
+ sbytes = sendto(state->sockfd, (void *)state->spacket.data,
4+state->sbytes, SEND_4TH_ARG,
(struct sockaddr *)&state->remote_addr,
state->remote_addrlen);
/* Check all sbytes were sent */
if(sbytes<0) {
failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO));
- res = CURLE_SEND_ERROR;
+ result = CURLE_SEND_ERROR;
}
}
- return res;
+
+ return result;
}
/* This is the expected packet. Reset the counters and send the next
block */
@@ -765,11 +758,13 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
state->state = TFTP_STATE_FIN;
return CURLE_OK;
}
- res = Curl_fillreadbuffer(state->conn, state->blksize, &state->sbytes);
- if(res)
- return res;
- sbytes = sendto(state->sockfd, (void *)state->spacket.data,
- 4+state->sbytes, SEND_4TH_ARG,
+
+ result = Curl_fillreadbuffer(state->conn, state->blksize, &state->sbytes);
+ if(result)
+ return result;
+
+ sbytes = sendto(state->sockfd, (void *) state->spacket.data,
+ 4 + state->sbytes, SEND_4TH_ARG,
(struct sockaddr *)&state->remote_addr,
state->remote_addrlen);
/* Check all sbytes were sent */
@@ -825,7 +820,7 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
break;
}
- return res;
+ return result;
}
/**********************************************************
@@ -837,48 +832,47 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
**********************************************************/
static CURLcode tftp_translate_code(tftp_error_t error)
{
- CURLcode code = CURLE_OK;
+ CURLcode result = CURLE_OK;
if(error != TFTP_ERR_NONE) {
switch(error) {
case TFTP_ERR_NOTFOUND:
- code = CURLE_TFTP_NOTFOUND;
+ result = CURLE_TFTP_NOTFOUND;
break;
case TFTP_ERR_PERM:
- code = CURLE_TFTP_PERM;
+ result = CURLE_TFTP_PERM;
break;
case TFTP_ERR_DISKFULL:
- code = CURLE_REMOTE_DISK_FULL;
+ result = CURLE_REMOTE_DISK_FULL;
break;
case TFTP_ERR_UNDEF:
case TFTP_ERR_ILLEGAL:
- code = CURLE_TFTP_ILLEGAL;
+ result = CURLE_TFTP_ILLEGAL;
break;
case TFTP_ERR_UNKNOWNID:
- code = CURLE_TFTP_UNKNOWNID;
+ result = CURLE_TFTP_UNKNOWNID;
break;
case TFTP_ERR_EXISTS:
- code = CURLE_REMOTE_FILE_EXISTS;
+ result = CURLE_REMOTE_FILE_EXISTS;
break;
case TFTP_ERR_NOSUCHUSER:
- code = CURLE_TFTP_NOSUCHUSER;
+ result = CURLE_TFTP_NOSUCHUSER;
break;
case TFTP_ERR_TIMEOUT:
- code = CURLE_OPERATION_TIMEDOUT;
+ result = CURLE_OPERATION_TIMEDOUT;
break;
case TFTP_ERR_NORESPONSE:
- code = CURLE_COULDNT_CONNECT;
+ result = CURLE_COULDNT_CONNECT;
break;
default:
- code= CURLE_ABORTED_BY_CALLBACK;
+ result = CURLE_ABORTED_BY_CALLBACK;
break;
}
}
- else {
- code = CURLE_OK;
- }
+ else
+ result = CURLE_OK;
- return(code);
+ return result;
}
/**********************************************************
@@ -891,20 +885,21 @@ static CURLcode tftp_translate_code(tftp_error_t error)
static CURLcode tftp_state_machine(tftp_state_data_t *state,
tftp_event_t event)
{
- CURLcode res = CURLE_OK;
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = state->conn->data;
+
switch(state->state) {
case TFTP_STATE_START:
DEBUGF(infof(data, "TFTP_STATE_START\n"));
- res = tftp_send_first(state, event);
+ result = tftp_send_first(state, event);
break;
case TFTP_STATE_RX:
DEBUGF(infof(data, "TFTP_STATE_RX\n"));
- res = tftp_rx(state, event);
+ result = tftp_rx(state, event);
break;
case TFTP_STATE_TX:
DEBUGF(infof(data, "TFTP_STATE_TX\n"));
- res = tftp_tx(state, event);
+ result = tftp_tx(state, event);
break;
case TFTP_STATE_FIN:
infof(data, "%s\n", "TFTP finished");
@@ -912,10 +907,11 @@ static CURLcode tftp_state_machine(tftp_state_data_t *state,
default:
DEBUGF(infof(data, "STATE: %d\n", state->state));
failf(data, "%s", "Internal state machine error");
- res = CURLE_TFTP_ILLEGAL;
+ result = CURLE_TFTP_ILLEGAL;
break;
}
- return res;
+
+ return result;
}
/**********************************************************
@@ -925,9 +921,10 @@ static CURLcode tftp_state_machine(tftp_state_data_t *state,
* The disconnect callback
*
**********************************************************/
-static CURLcode tftp_disconnect(struct connectdata *conn)
+static CURLcode tftp_disconnect(struct connectdata *conn, bool dead_connection)
{
tftp_state_data_t *state = conn->proto.tftpc;
+ (void) dead_connection;
/* done, free dynamically allocated pkt buffers */
if(state) {
@@ -948,16 +945,11 @@ static CURLcode tftp_disconnect(struct connectdata *conn)
**********************************************************/
static CURLcode tftp_connect(struct connectdata *conn, bool *done)
{
- CURLcode code;
tftp_state_data_t *state;
int blksize, rc;
blksize = TFTP_BLKSIZE_DEFAULT;
- /* If there already is a protocol-specific struct allocated for this
- sessionhandle, deal with it */
- Curl_reset_reqproto(conn);
-
state = conn->proto.tftpc = calloc(1, sizeof(tftp_state_data_t));
if(!state)
return CURLE_OUT_OF_MEMORY;
@@ -983,9 +975,9 @@ static CURLcode tftp_connect(struct connectdata *conn, bool *done)
return CURLE_OUT_OF_MEMORY;
}
- conn->bits.close = TRUE; /* we don't keep TFTP connections up bascially
- because there's none or very little gain for UDP
- */
+ /* we don't keep TFTP connections up bascially because there's none or very
+ * little gain for UDP */
+ connclose(conn, "TFTP");
state->conn = conn;
state->sockfd = state->conn->sock[FIRSTSOCKET];
@@ -1026,8 +1018,8 @@ static CURLcode tftp_connect(struct connectdata *conn, bool *done)
Curl_pgrsStartNow(conn->data);
*done = TRUE;
- code = CURLE_OK;
- return(code);
+
+ return CURLE_OK;
}
/**********************************************************
@@ -1040,18 +1032,20 @@ static CURLcode tftp_connect(struct connectdata *conn, bool *done)
static CURLcode tftp_done(struct connectdata *conn, CURLcode status,
bool premature)
{
- CURLcode code = CURLE_OK;
+ CURLcode result = CURLE_OK;
tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc;
(void)status; /* unused */
(void)premature; /* not used */
- Curl_pgrsDone(conn);
+ if(Curl_pgrsDone(conn))
+ return CURLE_ABORTED_BY_CALLBACK;
/* If we have encountered an error */
- code = tftp_translate_code(state->error);
+ if(state)
+ result = tftp_translate_code(state->error);
- return code;
+ return result;
}
/**********************************************************
@@ -1168,7 +1162,7 @@ static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event)
time_t current;
tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc;
- if (event)
+ if(event)
*event = TFTP_EVENT_NONE;
time(&current);
@@ -1179,8 +1173,8 @@ static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event)
state->state = TFTP_STATE_FIN;
return 0;
}
- else if (current > state->rx_time+state->retry_time) {
- if (event)
+ else if(current > state->rx_time+state->retry_time) {
+ if(event)
*event = TFTP_EVENT_TIMEOUT;
time(&state->rx_time); /* update even though we received nothing */
}
@@ -1191,130 +1185,6 @@ static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event)
return (long)(state->max_time - current);
}
-
-/**********************************************************
- *
- * tftp_easy_statemach
- *
- * Handle easy request until completion
- *
- **********************************************************/
-static CURLcode tftp_easy_statemach(struct connectdata *conn)
-{
- int rc;
- int check_time = 0;
- CURLcode result = CURLE_OK;
- struct SessionHandle *data = conn->data;
- tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc;
- curl_socket_t fd_read;
- long timeout_ms;
- struct SingleRequest *k = &data->req;
- struct timeval transaction_start = Curl_tvnow();
-
- k->start = transaction_start;
- k->now = transaction_start;
-
- /* Run the TFTP State Machine */
- for(; (state->state != TFTP_STATE_FIN) && (result == CURLE_OK); ) {
-
- timeout_ms = state->retry_time * 1000;
-
- if (data->set.upload) {
- if (data->set.max_send_speed &&
- (data->progress.ulspeed > data->set.max_send_speed)) {
- fd_read = CURL_SOCKET_BAD;
- timeout_ms = Curl_sleep_time(data->set.max_send_speed,
- data->progress.ulspeed, state->blksize);
- }
- else {
- fd_read = state->sockfd;
- }
- }
- else {
- if (data->set.max_recv_speed &&
- (data->progress.dlspeed > data->set.max_recv_speed)) {
- fd_read = CURL_SOCKET_BAD;
- timeout_ms = Curl_sleep_time(data->set.max_recv_speed,
- data->progress.dlspeed, state->blksize);
- }
- else {
- fd_read = state->sockfd;
- }
- }
-
- if(data->set.timeout) {
- timeout_ms = data->set.timeout - Curl_tvdiff(k->now, k->start);
- if (timeout_ms > state->retry_time * 1000)
- timeout_ms = state->retry_time * 1000;
- else if(timeout_ms < 0)
- timeout_ms = 0;
- }
-
-
- /* Wait until ready to read or timeout occurs */
- rc = Curl_socket_ready(fd_read, CURL_SOCKET_BAD, (int)(timeout_ms));
-
- k->now = Curl_tvnow();
-
- /* Force a progress callback if it's been too long */
- if (Curl_tvdiff(k->now, k->start) >= data->set.timeout) {
- if(Curl_pgrsUpdate(conn)) {
- tftp_state_machine(state, TFTP_EVENT_ERROR);
- return CURLE_ABORTED_BY_CALLBACK;
- }
- k->start = k->now;
- }
-
- if(rc == -1) {
- /* bail out */
- int error = SOCKERRNO;
- failf(data, "%s", Curl_strerror(conn, error));
- state->event = TFTP_EVENT_ERROR;
- }
- else {
-
- if(rc==0) {
- /* A timeout occured, but our timeout is variable, so maybe
- just continue? */
- long rtms = state->retry_time * 1000;
- if (Curl_tvdiff(k->now, transaction_start) > rtms) {
- state->event = TFTP_EVENT_TIMEOUT;
- /* Force a look at transfer timeouts */
- check_time = 1;
- }
- else {
- continue; /* skip state machine */
- }
- }
- else {
- result = tftp_receive_packet(conn);
- if (result == CURLE_OK)
- transaction_start = Curl_tvnow();
-
- if(k->bytecountp)
- *k->bytecountp = k->bytecount; /* read count */
- if(k->writebytecountp)
- *k->writebytecountp = k->writebytecount; /* write count */
- }
- }
-
- if(check_time) {
- tftp_state_timeout(conn, NULL);
- check_time = 0;
- }
-
- if(result)
- return(result);
-
- result = tftp_state_machine(state, state->event);
- }
-
- /* Tell curl we're done */
- Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
-
- return(result);
-}
-
/**********************************************************
*
* tftp_multi_statemach
@@ -1337,11 +1207,11 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done)
failf(data, "TFTP response timeout");
return CURLE_OPERATION_TIMEDOUT;
}
- else if (event != TFTP_EVENT_NONE) {
+ else if(event != TFTP_EVENT_NONE) {
result = tftp_state_machine(state, event);
- if(result != CURLE_OK)
- return(result);
- *done = (bool)(state->state == TFTP_STATE_FIN);
+ if(result)
+ return result;
+ *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE;
if(*done)
/* Tell curl we're done */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
@@ -1358,12 +1228,12 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done)
}
else if(rc != 0) {
result = tftp_receive_packet(conn);
- if(result != CURLE_OK)
- return(result);
+ if(result)
+ return result;
result = tftp_state_machine(state, state->event);
- if(result != CURLE_OK)
- return(result);
- *done = (bool)(state->state == TFTP_STATE_FIN);
+ if(result)
+ return result;
+ *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE;
if(*done)
/* Tell curl we're done */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
@@ -1389,6 +1259,15 @@ static CURLcode tftp_doing(struct connectdata *conn, bool *dophase_done)
if(*dophase_done) {
DEBUGF(infof(conn->data, "DO phase is complete\n"));
}
+ else if(!result) {
+ /* The multi code doesn't have this logic for the DOING state so we
+ provide it for TFTP since it may do the entire transfer in this
+ state. */
+ if(Curl_pgrsUpdate(conn))
+ result = CURLE_ABORTED_BY_CALLBACK;
+ else
+ result = Curl_speedcheck(conn->data, Curl_tvnow());
+ }
return result;
}
@@ -1408,15 +1287,10 @@ 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 != CURLE_OK)
- return(result);
+ if((state->state == TFTP_STATE_FIN) || result)
+ return result;
- if(conn->data->state.used_interface == Curl_if_multi)
- tftp_multi_statemach(conn, dophase_done);
- else {
- result = tftp_easy_statemach(conn);
- *dophase_done = TRUE; /* with the easy interface we are done here */
- }
+ tftp_multi_statemach(conn, dophase_done);
if(*dophase_done)
DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -1437,35 +1311,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 code;
+ tftp_state_data_t *state;
+ CURLcode result;
*done = FALSE;
- /*
- Since connections can be re-used between SessionHandles, this might be a
- connection already existing but on a fresh SessionHandle struct so we must
- make sure we have a good 'struct TFTP' to play with. For new connections,
- the struct TFTP is allocated and setup in the tftp_connect() function.
- */
- Curl_reset_reqproto(conn);
-
if(!conn->proto.tftpc) {
- code = tftp_connect(conn, done);
- if(code)
- return code;
+ result = tftp_connect(conn, done);
+ if(result)
+ return result;
}
+
state = (tftp_state_data_t *)conn->proto.tftpc;
+ if(!state)
+ return CURLE_BAD_CALLING_ORDER;
- code = tftp_perform(conn, done);
+ result = 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 (code == CURLE_OK)
+ if(!result)
/* If we have encountered an internal tftp error, translate it. */
- code = tftp_translate_code(state->error);
+ result = tftp_translate_code(state->error);
- return code;
+ return result;
}
static CURLcode tftp_setup_connection(struct connectdata * conn)
diff --git a/lib/tftp.h b/lib/tftp.h
index b2d67b26..117b40f6 100644
--- a/lib/tftp.h
+++ b/lib/tftp.h
@@ -1,6 +1,5 @@
-#ifndef __TFTP_H
-#define __TFTP_H
-
+#ifndef HEADER_CURL_TFTP_H
+#define HEADER_CURL_TFTP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -25,4 +24,6 @@
#ifndef CURL_DISABLE_TFTP
extern const struct Curl_handler Curl_handler_tftp;
#endif
-#endif
+
+#endif /* HEADER_CURL_TFTP_H */
+
diff --git a/lib/timeval.c b/lib/timeval.c
index cb39308e..45731ac5 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,9 +32,17 @@ 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;
}
@@ -110,7 +118,7 @@ struct timeval curlx_tvnow(void)
long curlx_tvdiff(struct timeval newer, struct timeval older)
{
return (newer.tv_sec-older.tv_sec)*1000+
- (newer.tv_usec-older.tv_usec)/1000;
+ (long)(newer.tv_usec-older.tv_usec)/1000;
}
/*
@@ -120,8 +128,11 @@ long curlx_tvdiff(struct timeval newer, struct timeval older)
*/
double curlx_tvdiff_secs(struct timeval newer, struct timeval older)
{
- return (double)(newer.tv_sec-older.tv_sec)+
- (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+ if(newer.tv_sec != older.tv_sec)
+ return (double)(newer.tv_sec-older.tv_sec)+
+ (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+ else
+ return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
}
/* return the number of seconds in the given input timeval struct */
diff --git a/lib/timeval.h b/lib/timeval.h
index bc79a45a..3f1b9ea7 100644
--- a/lib/timeval.h
+++ b/lib/timeval.h
@@ -1,5 +1,5 @@
-#ifndef __TIMEVAL_H
-#define __TIMEVAL_H
+#ifndef HEADER_CURL_TIMEVAL_H
+#define HEADER_CURL_TIMEVAL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -27,7 +27,7 @@
* as well as the library. Do not mix with library internals!
*/
-#include "setup.h"
+#include "curl_setup.h"
struct timeval curlx_tvnow(void);
@@ -54,4 +54,5 @@ long Curl_tvlong(struct timeval t1);
#define Curl_tvdiff(x,y) curlx_tvdiff(x,y)
#define Curl_tvdiff_secs(x,y) curlx_tvdiff_secs(x,y)
-#endif
+#endif /* HEADER_CURL_TIMEVAL_H */
+
diff --git a/lib/transfer.c b/lib/transfer.c
index 78bd7f19..28cc61ec 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,36 +20,15 @@
*
***************************************************************************/
-#include "setup.h"
-
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
+#include "curl_setup.h"
#include "strtoofft.h"
#include "strequal.h"
#include "rawstr.h"
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
@@ -78,8 +57,6 @@
#error "We can't compile without socket() support!"
#endif
-#endif /* WIN32 */
-
#include "urldata.h"
#include <curl/curl.h>
#include "netrc.h"
@@ -93,26 +70,21 @@
#include "http.h"
#include "url.h"
#include "getinfo.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "http_digest.h"
-#include "http_ntlm.h"
+#include "curl_ntlm.h"
#include "http_negotiate.h"
#include "share.h"
-#include "curl_memory.h"
#include "select.h"
#include "multiif.h"
-#include "easyif.h" /* for Curl_convert_to_network prototype */
-#include "rtsp.h"
#include "connect.h"
+#include "non-ascii.h"
+#include "curl_printf.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-/* The last #include file should be: */
+/* The last #include files should be: */
+#include "curl_memory.h"
#include "memdebug.h"
-#define CURL_TIMEOUT_EXPECT_100 1000 /* counting ms here */
-
/*
* This function will call the read callback to fill our buffer with data
* to upload.
@@ -125,11 +97,13 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
#ifdef CURL_DOES_CONVERSIONS
bool sending_http_headers = FALSE;
- if((conn->protocol&(PROT_HTTP|PROT_RTSP)) &&
- (data->state.proto.http->sending == HTTPSEND_REQUEST)) {
- /* We're sending the HTTP request headers, not the data.
- Remember that so we don't re-translate them into garbage. */
- sending_http_headers = TRUE;
+ if(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)) {
+ const struct HTTP *http = data->req.protop;
+
+ if(http->sending == HTTPSEND_REQUEST)
+ /* We're sending the HTTP request headers, not the data.
+ Remember that so we don't re-translate them into garbage. */
+ sending_http_headers = TRUE;
}
#endif
@@ -141,8 +115,8 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
/* this function returns a size_t, so we typecast to int to prevent warnings
with picky compilers */
- nread = (int)conn->fread_func(data->req.upload_fromhere, 1,
- buffersize, conn->fread_in);
+ nread = (int)data->set.fread_func(data->req.upload_fromhere, 1,
+ buffersize, data->set.in);
if(nread == CURL_READFUNC_ABORT) {
failf(data, "operation aborted by callback");
@@ -150,14 +124,24 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
return CURLE_ABORTED_BY_CALLBACK;
}
else if(nread == CURL_READFUNC_PAUSE) {
- struct SingleRequest *k = &data->req;
- /* CURL_READFUNC_PAUSE pauses read callbacks that feed socket writes */
- k->keepon |= KEEP_SEND_PAUSE; /* mark socket send as paused */
- if(data->req.upload_chunky) {
- /* Back out the preallocation done above */
- data->req.upload_fromhere -= (8 + 2);
+
+ 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, "Read callback asked for PAUSE when not supported!");
+ return CURLE_READ_ERROR;
+ }
+ else {
+ struct SingleRequest *k = &data->req;
+ /* CURL_READFUNC_PAUSE pauses read callbacks that feed socket writes */
+ k->keepon |= KEEP_SEND_PAUSE; /* mark socket send as paused */
+ if(data->req.upload_chunky) {
+ /* Back out the preallocation done above */
+ data->req.upload_fromhere -= (8 + 2);
+ }
+ *nreadp = 0;
}
- *nreadp = 0;
return CURLE_OK; /* nothing was read */
}
else if((size_t)nread > buffersize) {
@@ -187,11 +171,12 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
const char *endofline_native;
const char *endofline_network;
int hexlen;
+
+ if(
#ifdef CURL_DO_LINEEND_CONV
- if((data->set.crlf) || (data->set.prefer_ascii)) {
-#else
- if(data->set.crlf) {
-#endif /* CURL_DO_LINEEND_CONV */
+ (data->set.prefer_ascii) ||
+#endif
+ (data->set.crlf)) {
/* \n will become \r\n later on */
endofline_native = "\n";
endofline_network = "\x0a";
@@ -216,7 +201,7 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
strlen(endofline_network));
#ifdef CURL_DOES_CONVERSIONS
- CURLcode res;
+ CURLcode result;
int length;
if(data->set.prefer_ascii) {
/* translate the protocol and data */
@@ -226,25 +211,25 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
/* just translate the protocol portion */
length = strlen(hexbuffer);
}
- res = Curl_convert_to_network(data, data->req.upload_fromhere, length);
+ result = Curl_convert_to_network(data, data->req.upload_fromhere, length);
/* Curl_convert_to_network calls failf if unsuccessful */
- if(res)
- return(res);
+ if(result)
+ return result;
#endif /* CURL_DOES_CONVERSIONS */
if((nread - hexlen) == 0)
- /* mark this as done once this chunk is transfered */
+ /* mark this as done once this chunk is transferred */
data->req.upload_done = TRUE;
nread+=(int)strlen(endofline_native); /* for the added end of line */
}
#ifdef CURL_DOES_CONVERSIONS
else if((data->set.prefer_ascii) && (!sending_http_headers)) {
- CURLcode res;
- res = Curl_convert_to_network(data, data->req.upload_fromhere, nread);
+ CURLcode result;
+ result = Curl_convert_to_network(data, data->req.upload_fromhere, nread);
/* Curl_convert_to_network calls failf if unsuccessful */
- if(res != CURLE_OK)
- return(res);
+ if(result)
+ return result;
}
#endif /* CURL_DOES_CONVERSIONS */
@@ -303,7 +288,7 @@ CURLcode Curl_readrewind(struct connectdata *conn)
else {
/* If no CURLOPT_READFUNCTION is used, we know that we operate on a
given FILE * stream and we can actually attempt to rewind that
- ourself with fseek() */
+ ourselves with fseek() */
if(data->set.fread_func == (curl_read_callback)fread) {
if(-1 != fseek(data->set.in, 0, SEEK_SET))
/* successful rewind */
@@ -322,8 +307,20 @@ static int data_pending(const struct connectdata *conn)
{
/* in the case of libssh2, we can never be really sure that we have emptied
its internal buffers so we MUST always try until we get EAGAIN back */
- return conn->protocol&(PROT_SCP|PROT_SFTP) ||
+ return conn->handler->protocol&(CURLPROTO_SCP|CURLPROTO_SFTP) ||
+#if defined(USE_NGHTTP2)
+ Curl_ssl_data_pending(conn, FIRSTSOCKET) ||
+ /* For HTTP/2, we may read up everything including responde body
+ with header fields in Curl_http_readwrite_headers. If no
+ content-length is provided, curl waits for the connection
+ close, which we emulate it using conn->proto.httpc.closed =
+ TRUE. The thing is if we read everything, then http2_recv won't
+ be called and we cannot signal the HTTP/2 stream has closed. As
+ a workaround, we return nonzero here to call http2_recv. */
+ ((conn->handler->protocol&PROTO_FAMILY_HTTP) && conn->httpversion == 20);
+#else
Curl_ssl_data_pending(conn, FIRSTSOCKET);
+#endif
}
static void read_rewind(struct connectdata *conn,
@@ -349,12 +346,43 @@ static void read_rewind(struct connectdata *conn,
}
DEBUGF(infof(conn->data,
- "Buffer after stream rewind (read_pos = %zu): [%s]",
+ "Buffer after stream rewind (read_pos = %zu): [%s]\n",
conn->read_pos, buf));
}
#endif
}
+/*
+ * Check to see if CURLOPT_TIMECONDITION was met by comparing the time of the
+ * remote document with the time provided by CURLOPT_TIMEVAL
+ */
+bool Curl_meets_timecondition(struct SessionHandle *data, time_t timeofdoc)
+{
+ if((timeofdoc == 0) || (data->set.timevalue == 0))
+ return TRUE;
+
+ switch(data->set.timecondition) {
+ case CURL_TIMECOND_IFMODSINCE:
+ default:
+ if(timeofdoc <= data->set.timevalue) {
+ infof(data,
+ "The requested document is not new enough\n");
+ data->info.timecond = TRUE;
+ return FALSE;
+ }
+ break;
+ case CURL_TIMECOND_IFUNMODSINCE:
+ if(timeofdoc >= data->set.timevalue) {
+ infof(data,
+ "The requested document is not old enough\n");
+ data->info.timecond = TRUE;
+ return FALSE;
+ }
+ break;
+ }
+
+ return TRUE;
+}
/*
* Go ahead and do a read if we have a readable socket or if
@@ -370,9 +398,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
ssize_t nread; /* number of bytes read */
size_t excess = 0; /* excess bytes read */
bool is_empty_data = FALSE;
-#ifndef CURL_DISABLE_RTSP
bool readmore = FALSE; /* used by RTP to signal for more data */
-#endif
*done = FALSE;
@@ -406,6 +432,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
else {
/* read nothing but since we wanted nothing we consider this an OK
situation to proceed from */
+ DEBUGF(infof(data, "readwrite_data: we're done!\n"));
nread = 0;
}
@@ -418,7 +445,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
*didwhat |= KEEP_RECV;
/* indicates data of zero size, i.e. empty file */
- is_empty_data = (bool)((nread == 0) && (k->bodywrites == 0));
+ is_empty_data = ((nread == 0) && (k->bodywrites == 0)) ? TRUE : FALSE;
/* NUL terminate, allowing string ops to be used */
if(0 < nread || is_empty_data) {
@@ -436,16 +463,13 @@ static CURLcode readwrite_data(struct SessionHandle *data,
in the flow below before the actual storing is done. */
k->str = k->buf;
-#ifndef CURL_DISABLE_RTSP
- /* Check for RTP at the beginning of the data */
- if(conn->protocol & PROT_RTSP) {
- result = Curl_rtsp_rtp_readwrite(data, conn, &nread, &readmore);
+ if(conn->handler->readwrite) {
+ result = conn->handler->readwrite(data, conn, &nread, &readmore);
if(result)
return result;
if(readmore)
break;
}
-#endif
#ifndef CURL_DISABLE_HTTP
/* Since this is a two-state thing, we check if we are parsing
@@ -457,20 +481,37 @@ static CURLcode readwrite_data(struct SessionHandle *data,
if(result)
return result;
-#ifndef CURL_DISABLE_RTSP
- /* Check for RTP after the headers if there is no Content */
- if(k->maxdownload <= 0 && nread > 0 && (conn->protocol & PROT_RTSP)) {
- result = Curl_rtsp_rtp_readwrite(data, conn, &nread, &readmore);
+ if(conn->handler->readwrite &&
+ (k->maxdownload <= 0 && nread > 0)) {
+ result = conn->handler->readwrite(data, conn, &nread, &readmore);
if(result)
return result;
if(readmore)
break;
}
-#endif
- if(stop_reading)
+ if(stop_reading) {
/* We've stopped dealing with input, get out of the do-while loop */
+
+ if(nread > 0) {
+ if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) {
+ infof(data,
+ "Rewinding stream by : %zd"
+ " bytes on url %s (zero-length body)\n",
+ nread, data->state.path);
+ read_rewind(conn, (size_t)nread);
+ }
+ else {
+ infof(data,
+ "Excess found in a non pipelined read:"
+ " excess = %zd"
+ " url = %s (zero-length body)\n",
+ nread, data->state.path);
+ }
+ }
+
break;
+ }
}
#endif /* CURL_DISABLE_HTTP */
@@ -480,12 +521,11 @@ static CURLcode readwrite_data(struct SessionHandle *data,
is non-headers. */
if(k->str && !k->header && (nread > 0 || is_empty_data)) {
-
#ifndef CURL_DISABLE_HTTP
if(0 == k->bodywrites && !is_empty_data) {
/* These checks are only made the first time we are about to
write a piece of the body */
- if(conn->protocol&(PROT_HTTP|PROT_RTSP)) {
+ if(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)) {
/* HTTP-only checks */
if(data->req.newurl) {
@@ -505,6 +545,18 @@ 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) */
@@ -518,34 +570,24 @@ static CURLcode readwrite_data(struct SessionHandle *data,
requested. This seems to be what chapter 13.3.4 of
RFC 2616 defines to be the correct action for a
HTTP/1.1 client */
- if((k->timeofdoc > 0) && (data->set.timevalue > 0)) {
- switch(data->set.timecondition) {
- case CURL_TIMECOND_IFMODSINCE:
- default:
- if(k->timeofdoc < data->set.timevalue) {
- infof(data,
- "The requested document is not new enough\n");
- *done = TRUE;
- data->info.timecond = TRUE;
- return CURLE_OK;
- }
- break;
- case CURL_TIMECOND_IFUNMODSINCE:
- if(k->timeofdoc > data->set.timevalue) {
- infof(data,
- "The requested document is not old enough\n");
- *done = TRUE;
- data->info.timecond = TRUE;
- return CURLE_OK;
- }
- break;
- } /* switch */
- } /* two valid time strings */
+
+ if(!Curl_meets_timecondition(data, k->timeofdoc)) {
+ *done = TRUE;
+ /* We're simulating a http 304 from server so we return
+ what should have been returned from the server */
+ data->info.httpcode = 304;
+ infof(data, "Simulate a HTTP 304 response!\n");
+ /* we abort the transfer before it is completed == we ruin the
+ re-use ability. Close the connection */
+ connclose(conn, "Simulated 304 handling");
+ return CURLE_OK;
+ }
} /* we have a time condition */
- } /* this is HTTP */
+ } /* this is HTTP or RTSP */
} /* this is the first time we write a body part */
#endif /* CURL_DISABLE_HTTP */
+
k->bodywrites++;
/* pass data to the debug function before it gets "dechunked" */
@@ -579,7 +621,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
failf(data, "Failed writing data");
return CURLE_WRITE_ERROR;
}
- failf(data, "Received problem %d in the chunky parser", (int)res);
+ failf(data, "%s in chunked-encoding", Curl_chunked_strerror(res));
return CURLE_RECV_ERROR;
}
else if(CHUNKE_STOP == res) {
@@ -595,8 +637,9 @@ static CURLcode readwrite_data(struct SessionHandle *data,
dataleft = conn->chunk.dataleft;
if(dataleft != 0) {
- infof(conn->data, "Leftovers after chunking: %zu bytes", dataleft);
- if(conn->data->multi && Curl_multi_canPipeline(conn->data->multi)) {
+ infof(conn->data, "Leftovers after chunking: %zu bytes\n",
+ dataleft);
+ if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) {
/* only attempt the rewind if we truly are pipelining */
infof(conn->data, "Rewinding %zu bytes\n",dataleft);
read_rewind(conn, dataleft);
@@ -619,14 +662,14 @@ static CURLcode readwrite_data(struct SessionHandle *data,
excess = (size_t)(k->bytecount + nread - k->maxdownload);
if(excess > 0 && !k->ignorebody) {
- if(conn->data->multi && Curl_multi_canPipeline(conn->data->multi)) {
+ if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) {
/* The 'excess' amount below can't be more than BUFSIZE which
always will fit in a size_t */
infof(data,
"Rewinding stream by : %zu"
- " bytes on url %s (size = %" FORMAT_OFF_T
- ", maxdownload = %" FORMAT_OFF_T
- ", bytecount = %" FORMAT_OFF_T ", nread = %zd)\n",
+ " bytes on url %s (size = %" CURL_FORMAT_CURL_OFF_T
+ ", maxdownload = %" CURL_FORMAT_CURL_OFF_T
+ ", bytecount = %" CURL_FORMAT_CURL_OFF_T ", nread = %zd)\n",
excess, data->state.path,
k->size, k->maxdownload, k->bytecount, nread);
read_rewind(conn, excess);
@@ -635,9 +678,9 @@ static CURLcode readwrite_data(struct SessionHandle *data,
infof(data,
"Excess found in a non pipelined read:"
" excess = %zu"
- ", size = %" FORMAT_OFF_T
- ", maxdownload = %" FORMAT_OFF_T
- ", bytecount = %" FORMAT_OFF_T "\n",
+ ", size = %" CURL_FORMAT_CURL_OFF_T
+ ", maxdownload = %" CURL_FORMAT_CURL_OFF_T
+ ", bytecount = %" CURL_FORMAT_CURL_OFF_T "\n",
excess, k->size, k->maxdownload, k->bytecount);
}
}
@@ -663,12 +706,12 @@ static CURLcode readwrite_data(struct SessionHandle *data,
/* Don't let excess data pollute body writes */
if(k->maxdownload == -1 || (curl_off_t)k->hbuflen <= k->maxdownload)
result = Curl_client_write(conn, CLIENTWRITE_BODY,
- data->state.headerbuff,
- k->hbuflen);
+ data->state.headerbuff,
+ k->hbuflen);
else
result = Curl_client_write(conn, CLIENTWRITE_BODY,
- data->state.headerbuff,
- (size_t)k->maxdownload);
+ data->state.headerbuff,
+ (size_t)k->maxdownload);
if(result)
return result;
@@ -681,22 +724,22 @@ static CURLcode readwrite_data(struct SessionHandle *data,
encodings handled here. */
#ifdef HAVE_LIBZ
switch (conn->data->set.http_ce_skip ?
- IDENTITY : k->content_encoding) {
+ IDENTITY : k->auto_decoding) {
case IDENTITY:
#endif
/* This is the default when the server sends no
Content-Encoding header. See Curl_readwrite_init; the
- memset() call initializes k->content_encoding to zero. */
+ memset() call initializes k->auto_decoding to zero. */
if(!k->ignorebody) {
#ifndef CURL_DISABLE_POP3
- if(conn->protocol&PROT_POP3)
+ if(conn->handler->protocol&PROTO_FAMILY_POP3)
result = Curl_pop3_write(conn, k->str, nread);
else
#endif /* CURL_DISABLE_POP3 */
- result = Curl_client_write(conn, CLIENTWRITE_BODY, k->str,
- nread);
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, k->str,
+ nread);
}
#ifdef HAVE_LIBZ
break;
@@ -731,24 +774,20 @@ static CURLcode readwrite_data(struct SessionHandle *data,
} /* if(! header and data to read ) */
-#ifndef CURL_DISABLE_RTSP
- if(excess > 0 && !conn->bits.stream_was_rewound &&
- (conn->protocol & PROT_RTSP)) {
- /* Check for RTP after the content if there is unrewound excess */
-
+ if(conn->handler->readwrite &&
+ (excess > 0 && !conn->bits.stream_was_rewound)) {
/* Parse the excess data */
k->str += nread;
nread = (ssize_t)excess;
- result = Curl_rtsp_rtp_readwrite(data, conn, &nread, &readmore);
+ result = conn->handler->readwrite(data, conn, &nread, &readmore);
if(result)
return result;
if(readmore)
k->keepon |= KEEP_RECV; /* we're not done reading */
- break;
+ break;
}
-#endif
if(is_empty_data) {
/* if we received nothing, the server closed the connection and we
@@ -789,10 +828,6 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
*didwhat |= KEEP_SEND;
- /*
- * We loop here to do the READ and SEND loop until we run out of
- * data to send or until we get EWOULDBLOCK back
- */
do {
/* only read more data if there's no upload data already
@@ -805,9 +840,10 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
/* HTTP pollution, this should be written nicer to become more
protocol agnostic. */
int fillcount;
+ struct HTTP *http = data->req.protop;
if((k->exp100 == EXP100_SENDING_REQUEST) &&
- (data->state.proto.http->sending == HTTPSEND_BODY)) {
+ (http->sending == HTTPSEND_BODY)) {
/* If this call is to send body data, we must take some action:
We have sent off the full HTTP 1.1 request, and we shall now
go into the Expect: 100 state and await such a header */
@@ -817,12 +853,12 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
*didwhat &= ~KEEP_SEND; /* we didn't write anything actually */
/* set a timeout for the multi interface */
- Curl_expire(data, CURL_TIMEOUT_EXPECT_100);
+ Curl_expire(data, data->set.expect_100_timeout);
break;
}
- if(conn->protocol&(PROT_HTTP|PROT_RTSP)) {
- if(data->state.proto.http->sending == HTTPSEND_REQUEST)
+ if(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)) {
+ if(http->sending == HTTPSEND_REQUEST)
/* We're sending the HTTP request headers, not the data.
Remember that so we don't change the line endings. */
sending_http_headers = TRUE;
@@ -858,29 +894,23 @@ 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->protocol & PROT_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) &&
+ if((!sending_http_headers) && (
#ifdef CURL_DO_LINEEND_CONV
- /* always convert if we're FTPing in ASCII mode */
- ((data->set.crlf) || (data->set.prefer_ascii))) {
-#else
- (data->set.crlf)) {
+ /* always convert if we're FTPing in ASCII mode */
+ (data->set.prefer_ascii) ||
#endif
- 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;
+ (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;
+ }
}
+
/*
* ASCII/EBCDIC Note: This is presumably a text (not binary)
* transfer so the data should already be in ASCII.
@@ -894,12 +924,13 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
if(!data->set.crlf) {
/* we're here only because FTP is in ASCII mode...
bump infilesize for the LF we just added */
- data->set.infilesize++;
+ data->state.infilesize++;
}
}
else
data->state.scratch[si] = data->req.upload_fromhere[i];
}
+
if(si != nread) {
/* only perform the special operation if we really did replace
anything */
@@ -912,6 +943,14 @@ 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
@@ -933,6 +972,14 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
Curl_debug(data, CURLINFO_DATA_OUT, data->req.upload_fromhere,
(size_t)bytes_written, conn);
+ k->writebytecount += bytes_written;
+
+ if(k->writebytecount == data->state.infilesize) {
+ /* we have sent all data we were supposed to */
+ k->upload_done = TRUE;
+ infof(data, "We are completely uploaded and fine\n");
+ }
+
if(data->req.upload_present != bytes_written) {
/* we only wrote a part of the buffer (if anything), deal with it! */
@@ -954,10 +1001,9 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
}
}
- k->writebytecount += bytes_written;
Curl_pgrsSetUploadCounter(data, k->writebytecount);
- } while(0); /* just to break out from! */
+ } WHILE_FALSE; /* just to break out from! */
return CURLE_OK;
}
@@ -967,9 +1013,9 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
* be read and written to/from the connection.
*/
CURLcode Curl_readwrite(struct connectdata *conn,
+ struct SessionHandle *data,
bool *done)
{
- struct SessionHandle *data = conn->data;
struct SingleRequest *k = &data->req;
CURLcode result;
int didwhat=0;
@@ -993,11 +1039,16 @@ CURLcode Curl_readwrite(struct connectdata *conn,
else
fd_write = CURL_SOCKET_BAD;
+ if(conn->data->state.drain) {
+ select_res |= CURL_CSELECT_IN;
+ DEBUGF(infof(data, "Curl_readwrite: forcibly told to drain data\n"));
+ }
+
if(!select_res) /* Call for select()/poll() only, if read/write/error
status is not known. */
select_res = Curl_socket_ready(fd_read, fd_write, 0);
- if(select_res & CURL_CSELECT_ERR) {
+ if(select_res == CURL_CSELECT_ERR) {
failf(data, "select/poll returned error");
return CURLE_SEND_ERROR;
}
@@ -1047,7 +1098,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
*/
long ms = Curl_tvdiff(k->now, k->start100);
- if(ms > CURL_TIMEOUT_EXPECT_100) {
+ if(ms >= data->set.expect_100_timeout) {
/* we've waited long enough, continue anyway */
k->exp100 = EXP100_SEND_DATA;
k->keepon |= KEEP_SEND;
@@ -1064,16 +1115,17 @@ CURLcode Curl_readwrite(struct connectdata *conn,
return result;
if(k->keepon) {
- if(0 > Curl_timeleft(conn, &k->now, FALSE)) {
+ if(0 > Curl_timeleft(data, &k->now, FALSE)) {
if(k->size != -1) {
failf(data, "Operation timed out after %ld milliseconds with %"
- FORMAT_OFF_T " out of %" FORMAT_OFF_T " bytes received",
+ CURL_FORMAT_CURL_OFF_T " out of %"
+ CURL_FORMAT_CURL_OFF_T " bytes received",
Curl_tvdiff(k->now, data->progress.t_startsingle), k->bytecount,
k->size);
}
else {
failf(data, "Operation timed out after %ld milliseconds with %"
- FORMAT_OFF_T " bytes received",
+ CURL_FORMAT_CURL_OFF_T " bytes received",
Curl_tvdiff(k->now, data->progress.t_startsingle), k->bytecount);
}
return CURLE_OPERATION_TIMEDOUT;
@@ -1095,7 +1147,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
(k->bytecount != (k->size + data->state.crlf_conversions)) &&
#endif /* CURL_DO_LINEEND_CONV */
!data->req.newurl) {
- failf(data, "transfer closed with %" FORMAT_OFF_T
+ failf(data, "transfer closed with %" CURL_FORMAT_CURL_OFF_T
" bytes remaining to read",
k->size - k->bytecount);
return CURLE_PARTIAL_FILE;
@@ -1105,7 +1157,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
(conn->chunk.state != CHUNK_STOP)) {
/*
* In chunked mode, return an error if the connection is closed prior to
- * the empty (terminiating) chunk is read.
+ * the empty (terminating) chunk is read.
*
* The condition above used to check for
* conn->proto.http->chunk.datasize != 0 which is true after reading
@@ -1120,8 +1172,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
}
/* Now update the "done" boolean we return */
- *done = (bool)(0 == (k->keepon&(KEEP_RECV|KEEP_SEND|
- KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)));
+ *done = (0 == (k->keepon&(KEEP_RECV|KEEP_SEND|
+ KEEP_RECV_PAUSE|KEEP_SEND_PAUSE))) ? TRUE : FALSE;
return CURLE_OK;
}
@@ -1162,10 +1214,10 @@ int Curl_single_getsock(const struct connectdata *conn,
if((data->req.keepon & KEEP_SENDBITS) == KEEP_SEND) {
if((conn->sockfd != conn->writesockfd) ||
- !(data->req.keepon & KEEP_RECV)) {
- /* only if they are not the same socket or we didn't have a readable
+ bitmap == GETSOCK_BLANK) {
+ /* only if they are not the same socket and we have a readable
one, we increase index */
- if(data->req.keepon & KEEP_RECV)
+ if(bitmap != GETSOCK_BLANK)
sockindex++; /* increase index if we need two entries */
DEBUGASSERT(conn->writesockfd != CURL_SOCKET_BAD);
@@ -1182,11 +1234,11 @@ int Curl_single_getsock(const struct connectdata *conn,
/*
* Determine optimum sleep time based on configured rate, current rate,
* and packet size.
- * Returns value in mili-seconds.
+ * Returns value in milliseconds.
*
* The basic idea is to adjust the desired rate up/down in this method
* based on whether we are running too slow or too fast. Then, calculate
- * how many miliseconds to wait for the next packet to achieve this new
+ * how many milliseconds to wait for the next packet to achieve this new
* rate.
*/
long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
@@ -1195,33 +1247,33 @@ long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
curl_off_t min_sleep = 0;
curl_off_t rv = 0;
- if (rate_bps == 0)
+ if(rate_bps == 0)
return 0;
/* If running faster than about .1% of the desired speed, slow
* us down a bit. Use shift instead of division as the 0.1%
* cutoff is arbitrary anyway.
*/
- if (cur_rate_bps > (rate_bps + (rate_bps >> 10))) {
+ if(cur_rate_bps > (rate_bps + (rate_bps >> 10))) {
/* running too fast, decrease target rate by 1/64th of rate */
rate_bps -= rate_bps >> 6;
min_sleep = 1;
}
- else if (cur_rate_bps < (rate_bps - (rate_bps >> 10))) {
+ else if(cur_rate_bps < (rate_bps - (rate_bps >> 10))) {
/* running too slow, increase target rate by 1/64th of rate */
rate_bps += rate_bps >> 6;
}
- /* Determine number of miliseconds to wait until we do
+ /* Determine number of milliseconds to wait until we do
* the next packet at the adjusted rate. We should wait
* longer when using larger packets, for instance.
*/
- rv = ((curl_off_t)((pkt_size * 8) * 1000) / rate_bps);
+ rv = ((curl_off_t)(pkt_size * 1000) / rate_bps);
/* Catch rounding errors and always slow down at least 1ms if
* we are running too fast.
*/
- if (rv < min_sleep)
+ if(rv < min_sleep)
rv = min_sleep;
/* Bound value to fit in 'long' on 32-bit platform. That's
@@ -1233,161 +1285,12 @@ long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
return (long)rv;
}
-
-/*
- * Transfer()
- *
- * This function is what performs the actual transfer. It is capable of doing
- * both ways simultaneously. The transfer must already have been setup by a
- * call to Curl_setup_transfer().
- *
- * Note that headers are created in a preallocated buffer of a default size.
- * That buffer can be enlarged on demand, but it is never shrunken again.
- *
- */
-
-static CURLcode
-Transfer(struct connectdata *conn)
-{
- CURLcode result;
- struct SessionHandle *data = conn->data;
- struct SingleRequest *k = &data->req;
- bool done=FALSE;
- bool first=TRUE;
- int timeout_ms;
- int buffersize;
- int totmp;
-
- if((conn->sockfd == CURL_SOCKET_BAD) &&
- (conn->writesockfd == CURL_SOCKET_BAD))
- /* nothing to read, nothing to write, we're already OK! */
- return CURLE_OK;
-
- /* we want header and/or body, if neither then don't do this! */
- if(!k->getheader && data->set.opt_no_body)
- return CURLE_OK;
-
- while(!done) {
- curl_socket_t fd_read = conn->sockfd;
- curl_socket_t fd_write = conn->writesockfd;
- int keepon = k->keepon;
- timeout_ms = 1000;
-
- if(conn->waitfor) {
- /* if waitfor is set, get the RECV and SEND bits from that but keep the
- other bits */
- keepon &= ~ (KEEP_RECV|KEEP_SEND);
- keepon |= conn->waitfor & (KEEP_RECV|KEEP_SEND);
- }
-
- /* limit-rate logic: if speed exceeds threshold, then do not include fd in
- select set. The current speed is recalculated in each Curl_readwrite()
- call */
- if((keepon & KEEP_SEND) &&
- (!data->set.max_send_speed ||
- (data->progress.ulspeed < data->set.max_send_speed) )) {
- k->keepon &= ~KEEP_SEND_HOLD;
- }
- else {
- if (data->set.upload && data->set.max_send_speed &&
- (data->progress.ulspeed > data->set.max_send_speed) ) {
- /* calculate upload rate-limitation timeout. */
- buffersize = (int)(data->set.buffer_size ?
- data->set.buffer_size : BUFSIZE);
- totmp = (int)Curl_sleep_time(data->set.max_send_speed,
- data->progress.ulspeed, buffersize);
- if (totmp < timeout_ms)
- timeout_ms = totmp;
- }
- fd_write = CURL_SOCKET_BAD;
- if(keepon & KEEP_SEND)
- k->keepon |= KEEP_SEND_HOLD; /* hold it */
- }
-
- if((keepon & KEEP_RECV) &&
- (!data->set.max_recv_speed ||
- (data->progress.dlspeed < data->set.max_recv_speed)) ) {
- k->keepon &= ~KEEP_RECV_HOLD;
- }
- else {
- if ((!data->set.upload) && data->set.max_recv_speed &&
- (data->progress.dlspeed > data->set.max_recv_speed)) {
- /* Calculate download rate-limitation timeout. */
- buffersize = (int)(data->set.buffer_size ?
- data->set.buffer_size : BUFSIZE);
- totmp = (int)Curl_sleep_time(data->set.max_recv_speed,
- data->progress.dlspeed, buffersize);
- if (totmp < timeout_ms)
- timeout_ms = totmp;
- }
- fd_read = CURL_SOCKET_BAD;
- if(keepon & KEEP_RECV)
- k->keepon |= KEEP_RECV_HOLD; /* hold it */
- }
-
- /* pause logic. Don't check descriptors for paused connections */
- if(k->keepon & KEEP_RECV_PAUSE)
- fd_read = CURL_SOCKET_BAD;
- if(k->keepon & KEEP_SEND_PAUSE)
- fd_write = CURL_SOCKET_BAD;
-
- /* The *_HOLD and *_PAUSE logic is necessary since even though there might
- be no traffic during the select interval, we still call
- Curl_readwrite() for the timeout case and if we limit transfer speed we
- must make sure that this function doesn't transfer anything while in
- HOLD status.
-
- The no timeout for the first round is for the protocols for which data
- has already been slurped off the socket and thus waiting for action
- won't work since it'll wait even though there is already data present
- to work with. */
- if(first &&
- ((fd_read != CURL_SOCKET_BAD) || (fd_write != CURL_SOCKET_BAD)))
- /* if this is the first lap and one of the file descriptors is fine
- to work with, skip the timeout */
- timeout_ms = 0;
- else {
- totmp = Curl_timeleft(conn, &k->now, FALSE);
- if(totmp < 0)
- return CURLE_OPERATION_TIMEDOUT;
- else if(!totmp)
- totmp = 1000;
-
- if (totmp < timeout_ms)
- timeout_ms = totmp;
- }
-
- switch (Curl_socket_ready(fd_read, fd_write, timeout_ms)) {
- case -1: /* select() error, stop reading */
-#ifdef EINTR
- /* The EINTR is not serious, and it seems you might get this more
- often when using the lib in a multi-threaded environment! */
- if(SOCKERRNO == EINTR)
- continue;
-#endif
- return CURLE_RECV_ERROR; /* indicate a network problem */
- case 0: /* timeout */
- default: /* readable descriptors */
-
- result = Curl_readwrite(conn, &done);
- /* "done" signals to us if the transfer(s) are ready */
- break;
- }
- if(result)
- return result;
-
- first = FALSE; /* not the first lap anymore */
- }
-
- return CURLE_OK;
-}
-
/*
* Curl_pretransfer() is called immediately before a transfer starts.
*/
CURLcode Curl_pretransfer(struct SessionHandle *data)
{
- CURLcode res;
+ CURLcode result;
if(!data->change.url) {
/* we can't do anything without URL */
failf(data, "No URL set!");
@@ -1395,19 +1298,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 change the size of the cache) but
+ after the *_setopt() calls (that could specify the size of the cache) but
before any transfer takes place. */
- res = Curl_ssl_initsessions(data, data->set.ssl.numsessions);
- if(res)
- return res;
+ result = Curl_ssl_initsessions(data, data->set.ssl.max_ssl_sessions);
+ if(result)
+ return result;
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;
@@ -1415,33 +1316,45 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
data->info.wouldredirect = NULL;
/* If there is a list of cookie files to read, do it now! */
- if(data->change.cookielist) {
+ if(data->change.cookielist)
Curl_cookie_loadfiles(data);
- }
- /* 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! */
- data->state.allow_port = TRUE;
+ /* If there is a list of host pairs to deal with */
+ if(data->change.resolve)
+ result = Curl_loadhostpairs(data);
+
+ if(!result) {
+ /* 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! */
+ data->state.allow_port = TRUE;
#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL)
- /*************************************************************
- * Tell signal handler to ignore SIGPIPE
- *************************************************************/
- if(!data->set.no_signal)
- data->state.prev_signal = signal(SIGPIPE, SIG_IGN);
+ /*************************************************************
+ * Tell signal handler to ignore SIGPIPE
+ *************************************************************/
+ if(!data->set.no_signal)
+ data->state.prev_signal = signal(SIGPIPE, SIG_IGN);
#endif
- Curl_initinfo(data); /* reset session-specific information "variables" */
- Curl_pgrsStartNow(data);
+ Curl_initinfo(data); /* reset session-specific information "variables" */
+ Curl_pgrsResetTimesSizes(data);
+ Curl_pgrsStartNow(data);
- if(data->set.timeout)
- Curl_expire(data, data->set.timeout);
+ if(data->set.timeout)
+ Curl_expire(data, data->set.timeout);
- if(data->set.connecttimeout)
- Curl_expire(data, data->set.connecttimeout);
+ if(data->set.connecttimeout)
+ Curl_expire(data, data->set.connecttimeout);
- return CURLE_OK;
+ /* In case the handle is re-used and an authentication method was picked
+ in the session we need to make sure we only use the one(s) we now
+ consider to be fine */
+ data->state.authhost.picked &= data->state.authhost.want;
+ data->state.authproxy.picked &= data->state.authproxy.want;
+ }
+
+ return result;
}
/*
@@ -1457,11 +1370,6 @@ CURLcode Curl_posttransfer(struct SessionHandle *data)
(void)data; /* unused parameter */
#endif
- if(!(data->progress.flags & PGRS_HIDE) &&
- !data->progress.callback)
- /* only output if we don't use a progress callback and we're not hidden */
- fprintf(data->set.err, "\n");
-
return CURLE_OK;
}
@@ -1537,7 +1445,7 @@ static bool is_absolute_url(const char *url)
char prot[16]; /* URL protocol string storage */
char letter; /* used for a silly sscanf */
- return (bool)(2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter));
+ return (2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter)) ? TRUE : FALSE;
}
/*
@@ -1629,26 +1537,37 @@ static char *concat_url(const char *base, const char *relurl)
}
}
else {
- /* We got a new absolute path for this server, cut off from the
- first slash */
- pathsep = strchr(protsep, '/');
- if(pathsep) {
- /* When people use badly formatted URLs, such as
- "http://www.url.com?dir=/home/daniel" we must not use the first
- slash, if there's a ?-letter before it! */
- char *sep = strchr(protsep, '?');
- if(sep && (sep < pathsep))
- pathsep = sep;
- *pathsep=0;
+ /* We got a new absolute path for this server */
+
+ if((relurl[0] == '/') && (relurl[1] == '/')) {
+ /* the new URL starts with //, just keep the protocol part from the
+ original one */
+ *protsep=0;
+ useurl = &relurl[2]; /* we keep the slashes from the original, so we
+ skip the new ones */
}
else {
- /* There was no slash. Now, since we might be operating on a badly
- formatted URL, such as "http://www.url.com?id=2380" which doesn't
- use a slash separator as it is supposed to, we need to check for a
- ?-letter as well! */
- pathsep = strchr(protsep, '?');
- if(pathsep)
+ /* cut off the original URL from the first slash, or deal with URLs
+ without slash */
+ pathsep = strchr(protsep, '/');
+ if(pathsep) {
+ /* When people use badly formatted URLs, such as
+ "http://www.url.com?dir=/home/daniel" we must not use the first
+ slash, if there's a ?-letter before it! */
+ char *sep = strchr(protsep, '?');
+ if(sep && (sep < pathsep))
+ pathsep = sep;
*pathsep=0;
+ }
+ else {
+ /* There was no slash. Now, since we might be operating on a badly
+ formatted URL, such as "http://www.url.com?id=2380" which doesn't
+ use a slash separator as it is supposed to, we need to check for a
+ ?-letter as well! */
+ pathsep = strchr(protsep, '?');
+ if(pathsep)
+ *pathsep=0;
+ }
}
}
@@ -1661,8 +1580,8 @@ static char *concat_url(const char *base, const char *relurl)
urllen = strlen(url_clone);
- newest = malloc( urllen + 1 + /* possible slash */
- newlen + 1 /* zero byte */);
+ newest = malloc(urllen + 1 + /* possible slash */
+ newlen + 1 /* zero byte */);
if(!newest) {
free(url_clone); /* don't leak this */
@@ -1711,7 +1630,7 @@ CURLcode Curl_follow(struct SessionHandle *data,
if(type == FOLLOW_REDIR) {
if((data->set.maxredirs != -1) &&
(data->set.followlocation >= data->set.maxredirs)) {
- failf(data,"Maximum (%ld) redirects followed", data->set.maxredirs);
+ failf(data, "Maximum (%ld) redirects followed", data->set.maxredirs);
return CURLE_TOO_MANY_REDIRECTS;
}
@@ -1725,15 +1644,14 @@ CURLcode Curl_follow(struct SessionHandle *data,
when we get the next URL. We pick the ->url field, which may or may
not be 100% correct */
- if(data->change.referer_alloc)
- /* If we already have an allocated referer, free this first */
- free(data->change.referer);
+ if(data->change.referer_alloc) {
+ Curl_safefree(data->change.referer);
+ data->change.referer_alloc = FALSE;
+ }
data->change.referer = strdup(data->change.url);
- if (!data->change.referer) {
- data->change.referer_alloc = FALSE;
+ if(!data->change.referer)
return CURLE_OUT_OF_MEMORY;
- }
data->change.referer_alloc = TRUE; /* yes, free this later */
}
}
@@ -1744,7 +1662,7 @@ CURLcode Curl_follow(struct SessionHandle *data,
to be absolute and this doesn't seem to be that!
*/
char *absolute = concat_url(data->change.url, newurl);
- if (!absolute)
+ if(!absolute)
return CURLE_OUT_OF_MEMORY;
free(newurl);
newurl = absolute;
@@ -1760,7 +1678,7 @@ CURLcode Curl_follow(struct SessionHandle *data,
size_t newlen = strlen_url(newurl);
newest = malloc(newlen+1); /* get memory for this */
- if (!newest)
+ if(!newest)
return CURLE_OUT_OF_MEMORY;
strcpy_url(newest, newurl); /* create a space-free URL */
@@ -1780,12 +1698,13 @@ CURLcode Curl_follow(struct SessionHandle *data,
if(disallowport)
data->state.allow_port = FALSE;
- if(data->change.url_alloc)
- free(data->change.url);
- else
- data->change.url_alloc = TRUE; /* the URL is allocated */
+ if(data->change.url_alloc) {
+ Curl_safefree(data->change.url);
+ data->change.url_alloc = FALSE;
+ }
data->change.url = newurl;
+ data->change.url_alloc = TRUE;
newurl = NULL; /* don't free! */
infof(data, "Issue another request to this URL: '%s'\n", data->change.url);
@@ -1811,63 +1730,59 @@ CURLcode Curl_follow(struct SessionHandle *data,
*/
break;
case 301: /* Moved Permanently */
- /* (quote from RFC2616, section 10.3.2):
+ /* (quote from RFC7231, section 6.4.2)
*
- * Note: When automatically redirecting a POST request after receiving a
- * 301 status code, some existing HTTP/1.0 user agents will erroneously
- * change it into a GET request.
+ * Note: For historical reasons, a user agent MAY change the request
+ * method from POST to GET for the subsequent request. If this
+ * behavior is undesired, the 307 (Temporary Redirect) status code
+ * can be used instead.
*
* ----
*
- * Warning: Because most of importants user agents do this obvious RFC2616
- * violation, many webservers expect this misbehavior. So these servers
- * often answers to a POST request with an error page. To be sure that
- * libcurl gets the page that most user agents would get, libcurl has to
- * force GET.
+ * Many webservers expect this, so these servers often answers to a POST
+ * request with an error page. To be sure that libcurl gets the page that
+ * most user agents would get, libcurl has to force GET.
*
- * This behaviour can be overridden with CURLOPT_POSTREDIR.
+ * This behaviour is forbidden by RFC1945 and the obsolete RFC2616, and
+ * can be overridden with CURLOPT_POSTREDIR.
*/
- if( (data->set.httpreq == HTTPREQ_POST
- || data->set.httpreq == HTTPREQ_POST_FORM)
- && !data->set.post301) {
- infof(data,
- "Violate RFC 2616/10.3.2 and switch from POST to GET\n");
+ if((data->set.httpreq == HTTPREQ_POST
+ || data->set.httpreq == HTTPREQ_POST_FORM)
+ && !(data->set.keep_post & CURL_REDIR_POST_301)) {
+ infof(data, "Switch from POST to GET\n");
data->set.httpreq = HTTPREQ_GET;
}
break;
case 302: /* Found */
- /* (From 10.3.3)
-
- Note: RFC 1945 and RFC 2068 specify that the client is not allowed
- to change the method on the redirected request. However, most
- existing user agent implementations treat 302 as if it were a 303
- response, performing a GET on the Location field-value regardless
- of the original request method. The status codes 303 and 307 have
- been added for servers that wish to make unambiguously clear which
- kind of reaction is expected of the client.
-
- (From 10.3.4)
-
- Note: Many pre-HTTP/1.1 user agents do not understand the 303
- status. When interoperability with such clients is a concern, the
- 302 status code may be used instead, since most user agents react
- to a 302 response as described here for 303.
-
- This behaviour can be overriden with CURLOPT_POSTREDIR
- */
- if( (data->set.httpreq == HTTPREQ_POST
- || data->set.httpreq == HTTPREQ_POST_FORM)
- && !data->set.post302) {
- infof(data,
- "Violate RFC 2616/10.3.3 and switch from POST to GET\n");
+ /* (quote from RFC7231, section 6.4.3)
+ *
+ * Note: For historical reasons, a user agent MAY change the request
+ * method from POST to GET for the subsequent request. If this
+ * behavior is undesired, the 307 (Temporary Redirect) status code
+ * can be used instead.
+ *
+ * ----
+ *
+ * Many webservers expect this, so these servers often answers to a POST
+ * request with an error page. To be sure that libcurl gets the page that
+ * most user agents would get, libcurl has to force GET.
+ *
+ * This behaviour is forbidden by RFC1945 and the obsolete RFC2616, and
+ * can be overridden with CURLOPT_POSTREDIR.
+ */
+ if((data->set.httpreq == HTTPREQ_POST
+ || data->set.httpreq == HTTPREQ_POST_FORM)
+ && !(data->set.keep_post & CURL_REDIR_POST_302)) {
+ infof(data, "Switch from POST to GET\n");
data->set.httpreq = HTTPREQ_GET;
}
break;
case 303: /* See Other */
- /* Disable both types of POSTs, since doing a second POST when
- * following isn't what anyone would want! */
- if(data->set.httpreq != HTTPREQ_GET) {
+ /* Disable both types of POSTs, unless the user explicitely
+ asks for POST after POST */
+ if(data->set.httpreq != HTTPREQ_GET
+ && !(data->set.keep_post & CURL_REDIR_POST_303)) {
data->set.httpreq = HTTPREQ_GET; /* enforce GET request */
infof(data, "Disables POST, goes with %s\n",
data->set.opt_no_body?"HEAD":"GET");
@@ -1889,39 +1804,12 @@ CURLcode Curl_follow(struct SessionHandle *data,
break;
}
Curl_pgrsTime(data, TIMER_REDIRECT);
- Curl_pgrsResetTimes(data);
+ Curl_pgrsResetTimesSizes(data);
return CURLE_OK;
#endif /* CURL_DISABLE_HTTP */
}
-static CURLcode
-connect_host(struct SessionHandle *data,
- struct connectdata **conn)
-{
- CURLcode res = CURLE_OK;
-
- bool async;
- bool protocol_done=TRUE; /* will be TRUE always since this is only used
- within the easy interface */
- Curl_pgrsTime(data, TIMER_STARTSINGLE);
- res = Curl_connect(data, conn, &async, &protocol_done);
-
- if((CURLE_OK == res) && async) {
- /* Now, if async is TRUE here, we need to wait for the name
- to resolve */
- res = Curl_wait_for_resolv(*conn, NULL);
- if(CURLE_OK == res)
- /* Resolved, continue with the connection */
- res = Curl_async_resolved(*conn, &protocol_done);
- else
- /* if we can't resolve, we kill this "connection" now */
- (void)Curl_disconnect(*conn);
- }
-
- return res;
-}
-
CURLcode
Curl_reconnect_request(struct connectdata **connp)
{
@@ -1937,10 +1825,12 @@ Curl_reconnect_request(struct connectdata **connp)
infof(data, "Re-used connection seems dead, get a new one\n");
- conn->bits.close = TRUE; /* enforce close of this connection */
+ connclose(conn, "Reconnect dead connection"); /* enforce close */
result = Curl_done(&conn, result, FALSE); /* we are so done with this */
- /* conn may no longer be a good pointer */
+ /* conn may no longer be a good pointer, clear it to avoid mistakes by
+ parent functions */
+ *connp = NULL;
/*
* According to bug report #1330310. We need to check for CURLE_SEND_ERROR
@@ -1949,20 +1839,20 @@ 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((CURLE_OK == result) || (CURLE_SEND_ERROR == result)) {
+ if(!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(CURLE_OK == result) {
+ if(!result) {
/* We have connected or sent away a name resolve query fine */
conn = *connp; /* setup conn to again point to something nice */
if(async) {
/* Now, if async is TRUE here, we need to wait for the name
to resolve */
- result = Curl_wait_for_resolv(conn, NULL);
+ result = Curl_resolver_wait_resolv(conn, NULL);
if(result)
return result;
@@ -1989,15 +1879,14 @@ CURLcode Curl_retry_request(struct connectdata *conn,
/* if we're talking upload, we can't do the checks below, unless the protocol
is HTTP as when uploading over HTTP we will still get a response */
- if(data->set.upload && !(conn->protocol&(PROT_HTTP|PROT_RTSP)))
+ if(data->set.upload &&
+ !(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)))
return CURLE_OK;
- 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)) {
+ if((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
@@ -2007,206 +1896,21 @@ CURLcode Curl_retry_request(struct connectdata *conn,
if(!*url)
return CURLE_OUT_OF_MEMORY;
- conn->bits.close = TRUE; /* close this connection */
+ connclose(conn, "retry"); /* close this connection */
conn->bits.retry = TRUE; /* mark this as a connection we're about
to retry. Marking it this way should
prevent i.e HTTP transfers to return
error just because nothing has been
- transfered! */
- }
- return CURLE_OK;
-}
-
-static CURLcode Curl_do_perform(struct SessionHandle *data)
-{
- CURLcode res;
- CURLcode res2;
- struct connectdata *conn=NULL;
- char *newurl = NULL; /* possibly a new URL to follow to! */
- followtype follow = FOLLOW_NONE;
-
- data->state.used_interface = Curl_if_easy;
-
- res = Curl_pretransfer(data);
- if(res)
- return res;
-
- /*
- * It is important that there is NO 'return' from this function at any other
- * place than falling down to the end of the function! This is because we
- * have cleanup stuff that must be done before we get back, and that is only
- * performed after this do-while loop.
- */
-
- for(;;) {
- res = connect_host(data, &conn); /* primary connection */
-
- if(res == CURLE_OK) {
- bool do_done;
- if(data->set.connect_only) {
- /* keep connection open for application to use the socket */
- conn->bits.close = FALSE;
- res = Curl_done(&conn, CURLE_OK, FALSE);
- break;
- }
- res = Curl_do(&conn, &do_done);
-
- if(res == CURLE_OK) {
- if(conn->data->set.wildcardmatch) {
- if(conn->data->wildcard.state == CURLWC_DONE ||
- conn->data->wildcard.state == CURLWC_SKIP) {
- /* keep connection open for application to use the socket */
- conn->bits.close = FALSE;
- res = Curl_done(&conn, CURLE_OK, FALSE);
- break;
- }
- }
- res = Transfer(conn); /* now fetch that URL please */
- if((res == CURLE_OK) || (res == CURLE_RECV_ERROR)) {
- bool retry = FALSE;
- CURLcode rc = Curl_retry_request(conn, &newurl);
- if(rc)
- res = rc;
- else
- retry = (newurl?TRUE:FALSE);
-
- if(retry) {
- /* we know (newurl != NULL) at this point */
- res = CURLE_OK;
- follow = FOLLOW_RETRY;
- }
- else if (res == CURLE_OK) {
- /*
- * We must duplicate the new URL here as the connection data may
- * be free()ed in the Curl_done() function. We prefer the newurl
- * one since that's used for redirects or just further requests
- * for retries or multi-stage HTTP auth methods etc.
- */
- if(data->req.newurl) {
- follow = FOLLOW_REDIR;
- newurl = strdup(data->req.newurl);
- if (!newurl)
- res = CURLE_OUT_OF_MEMORY;
- }
- else if(data->req.location) {
- follow = FOLLOW_FAKE;
- newurl = strdup(data->req.location);
- if (!newurl)
- res = CURLE_OUT_OF_MEMORY;
- }
- }
-
- /* in the above cases where 'newurl' gets assigned, we have a fresh
- * allocated memory pointed to */
- }
- if(res != CURLE_OK) {
- /* The transfer phase returned error, we mark the connection to get
- * closed to prevent being re-used. This is because we can't
- * possibly know if the connection is in a good shape or not now. */
- conn->bits.close = TRUE;
-
- if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) {
- /* if we failed anywhere, we must clean up the secondary socket if
- it was used */
- sclose(conn->sock[SECONDARYSOCKET]);
- conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
- }
- }
-
- /* Always run Curl_done(), even if some of the previous calls
- failed, but return the previous (original) error code */
- res2 = Curl_done(&conn, res, FALSE);
-
- if(CURLE_OK == res)
- res = res2;
- }
- else if(conn)
- /* Curl_do() failed, clean up left-overs in the done-call, but note
- that at some cases the conn pointer is NULL when Curl_do() failed
- and the connection cache is very small so only call Curl_done() if
- conn is still "alive". */
- /* ignore return code since we already have an error to return */
- (void)Curl_done(&conn, res, FALSE);
+ transferred! */
- /*
- * Important: 'conn' cannot be used here, since it may have been closed
- * in 'Curl_done' or other functions.
- */
- if((res == CURLE_OK) && follow) {
- res = Curl_follow(data, newurl, follow);
- if(CURLE_OK == res) {
- /* if things went fine, Curl_follow() freed or otherwise took
- responsibility for the newurl pointer */
- newurl = NULL;
- if(follow >= FOLLOW_RETRY) {
- follow = FOLLOW_NONE;
- continue;
- }
- /* else we break out of the loop below */
- }
- }
+ if(conn->handler->protocol&PROTO_FAMILY_HTTP) {
+ struct HTTP *http = data->req.protop;
+ if(http->writebytecount)
+ return Curl_readrewind(conn);
}
- break; /* it only reaches here when this shouldn't loop */
-
- } /* loop if Location: */
-
- if(newurl)
- free(newurl);
-
- if(res && !data->state.errorbuf) {
- /*
- * As an extra precaution: if no error string has been set and there was
- * an error, use the strerror() string or if things are so bad that not
- * even that is good, set a bad string that mentions the error code.
- */
- const char *str = curl_easy_strerror(res);
- if(!str)
- failf(data, "unspecified error %d", (int)res);
- else
- failf(data, "%s", str);
- }
-
- /* run post-transfer unconditionally, but don't clobber the return code if
- we already have an error code recorder */
- res2 = Curl_posttransfer(data);
- if(!res && res2)
- res = res2;
-
- return res;
-}
-
-/*
- * Curl_perform() is the internal high-level function that gets called by the
- * external curl_easy_perform() function. It inits, performs and cleans up a
- * single file transfer.
- */
-CURLcode Curl_perform(struct SessionHandle *data)
-{
- CURLcode res;
- if(!data->set.wildcardmatch)
- return Curl_do_perform(data);
-
- /* init main wildcard structures */
- res = Curl_wildcard_init(&data->wildcard);
- if(res)
- return res;
-
- res = Curl_do_perform(data);
- if(res) {
- Curl_wildcard_dtor(&data->wildcard);
- return res;
}
-
- /* wildcard loop */
- while(!res && data->wildcard.state != CURLWC_DONE)
- res = Curl_do_perform(data);
-
- Curl_wildcard_dtor(&data->wildcard);
-
- /* wildcard download finished or failed */
- data->wildcard.state = CURLWC_INIT;
- return res;
+ return CURLE_OK;
}
/*
@@ -2262,6 +1966,7 @@ Curl_setup_transfer(
k->keepon |= KEEP_RECV;
if(conn->writesockfd != CURL_SOCKET_BAD) {
+ struct HTTP *http = data->req.protop;
/* HTTP 1.1 magic:
Even if we require a 100-return code before uploading data, we might
@@ -2272,13 +1977,15 @@ Curl_setup_transfer(
state info where we wait for the 100-return code
*/
if((data->state.expect100header) &&
- (data->state.proto.http->sending == HTTPSEND_BODY)) {
+ (conn->handler->protocol&PROTO_FAMILY_HTTP) &&
+ (http->sending == HTTPSEND_BODY)) {
/* wait with write until we either got 100-continue or a timeout */
k->exp100 = EXP100_AWAITING_CONTINUE;
- k->start100 = k->start;
+ k->start100 = Curl_tvnow();
- /* set a timeout for the multi interface */
- Curl_expire(data, CURL_TIMEOUT_EXPECT_100);
+ /* Set a timeout for the multi interface. Add the inaccuracy margin so
+ that we don't fire slightly too early and get denied to run. */
+ Curl_expire(data, data->set.expect_100_timeout);
}
else {
if(data->state.expect100header)
diff --git a/lib/transfer.h b/lib/transfer.h
index 790e1e3e..316aeaeb 100644
--- a/lib/transfer.h
+++ b/lib/transfer.h
@@ -1,5 +1,5 @@
-#ifndef __TRANSFER_H
-#define __TRANSFER_H
+#ifndef HEADER_CURL_TRANSFER_H
+#define HEADER_CURL_TRANSFER_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-CURLcode Curl_perform(struct SessionHandle *data);
+
CURLcode Curl_pretransfer(struct SessionHandle *data);
CURLcode Curl_second_connect(struct connectdata *conn);
CURLcode Curl_posttransfer(struct SessionHandle *data);
@@ -36,10 +36,12 @@ typedef enum {
FOLLOW_LAST /* never used */
} followtype;
-CURLcode Curl_follow(struct SessionHandle *data, char *newurl, followtype type);
+CURLcode Curl_follow(struct SessionHandle *data, char *newurl,
+ followtype type);
-CURLcode Curl_readwrite(struct connectdata *conn, bool *done);
+CURLcode Curl_readwrite(struct connectdata *conn,
+ struct SessionHandle *data, bool *done);
int Curl_single_getsock(const struct connectdata *conn,
curl_socket_t *socks,
int numsocks);
@@ -47,6 +49,7 @@ CURLcode Curl_readrewind(struct connectdata *conn);
CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp);
CURLcode Curl_reconnect_request(struct connectdata **connp);
CURLcode Curl_retry_request(struct connectdata *conn, char **url);
+bool Curl_meets_timecondition(struct SessionHandle *data, time_t timeofdoc);
/* This sets up a forthcoming transfer */
void
@@ -64,4 +67,5 @@ Curl_setup_transfer (struct connectdata *data,
long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
int pkt_size);
-#endif
+#endif /* HEADER_CURL_TRANSFER_H */
+
diff --git a/lib/url.c b/lib/url.c
index 1b65a923..17279bbe 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,33 +20,11 @@
*
***************************************************************************/
-/* -- WIN32 approved -- */
+#include "curl_setup.h"
-#include "setup.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
@@ -69,12 +47,14 @@
#include <inet.h>
#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+
#ifndef HAVE_SOCKET
#error "We can't compile without socket() support!"
#endif
-#endif /* WIN32 */
-
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
@@ -86,21 +66,23 @@
#ifdef HAVE_IDN_FREE_H
#include <idn-free.h>
#else
-void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
- libidn 0.4.5's make install! */
+/* prototype from idn-free.h, not provided by libidn 0.4.5's make install! */
+void idn_free (void *ptr);
#endif
#ifndef HAVE_IDN_FREE
-/* if idn_free() was not found in this version of libidn, use plain free()
- instead */
+/* if idn_free() was not found in this version of libidn use free() instead */
#define idn_free(x) (free)(x)
#endif
+#elif defined(USE_WIN32_IDN)
+/* prototype for curl_win32_idn_to_ascii() */
+int curl_win32_idn_to_ascii(const char *in, char **out);
#endif /* USE_LIBIDN */
#include "urldata.h"
#include "netrc.h"
#include "formdata.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
#include "hostip.h"
#include "transfer.h"
#include "sendf.h"
@@ -120,6 +102,8 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
#include "speedcheck.h"
#include "rawstr.h"
#include "warnless.h"
+#include "non-ascii.h"
+#include "inet_pton.h"
/* And now for the protocols */
#include "ftp.h"
@@ -134,24 +118,38 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
#include "url.h"
#include "connect.h"
#include "inet_ntop.h"
-#include "http_ntlm.h"
+#include "curl_ntlm.h"
+#include "curl_ntlm_wb.h"
#include "socks.h"
-#include "rtsp.h"
#include "curl_rtmp.h"
#include "gopher.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "http_proxy.h"
+#include "conncache.h"
+#include "multihandle.h"
+#include "pipeline.h"
+#include "dotdot.h"
+#include "strdup.h"
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
/* Local static prototypes */
-static long ConnectionKillOne(struct SessionHandle *data);
+static struct connectdata *
+find_oldest_idle_connection(struct SessionHandle *data);
+static struct connectdata *
+find_oldest_idle_connection_in_bundle(struct SessionHandle *data,
+ struct connectbundle *bundle);
static void conn_free(struct connectdata *conn);
static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke);
-
+static CURLcode do_init(struct connectdata *conn);
+static CURLcode parse_url_login(struct SessionHandle *data,
+ struct connectdata *conn,
+ char **userptr, char **passwdptr,
+ char **optionsptr);
+static CURLcode parse_login_details(const char *login, const size_t len,
+ char **userptr, char **passwdptr,
+ char **optionsptr);
/*
* Protocol table.
*/
@@ -184,8 +182,9 @@ static const struct Curl_handler * const protocols[] = {
#ifndef CURL_DISABLE_LDAP
&Curl_handler_ldap,
-#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \
- (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))
+#if !defined(CURL_DISABLE_LDAPS) && \
+ ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \
+ (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))
&Curl_handler_ldaps,
#endif
#endif
@@ -217,6 +216,15 @@ 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
@@ -259,44 +267,41 @@ static const struct Curl_handler Curl_handler_dummy = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
+ ZERO_NULL, /* domore_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
+ ZERO_NULL, /* readwrite */
0, /* defport */
- 0 /* protocol */
+ 0, /* protocol */
+ PROTOPT_NONE /* flags */
};
-void Curl_safefree(void *ptr)
-{
- if(ptr)
- free(ptr);
-}
-
-static void close_connections(struct SessionHandle *data)
-{
- /* Loop through all open connections and kill them one by one */
- long i;
- do {
- i = ConnectionKillOne(data);
- } while(i != -1L);
-}
-
-void Curl_freeset(struct SessionHandle * data)
+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);
+ data->change.referer_alloc = FALSE;
+ }
+ data->change.referer = NULL;
+ if(data->change.url_alloc) {
+ Curl_safefree(data->change.url);
+ data->change.url_alloc = FALSE;
+ }
+ data->change.url = NULL;
}
-static CURLcode setstropt(char **charp, char * s)
+static CURLcode setstropt(char **charp, char *s)
{
/* Release the previous storage at `charp' and replace by a dynamic storage
copy of `s'. Return CURLE_OK or CURLE_OUT_OF_MEMORY. */
- if(*charp) {
- free(*charp);
- *charp = (char *) NULL;
- }
+ Curl_safefree(*charp);
if(s) {
s = strdup(s);
@@ -310,51 +315,48 @@ static CURLcode setstropt(char **charp, char * s)
return CURLE_OK;
}
-static CURLcode setstropt_userpwd(char *option, char **user_storage,
- char **pwd_storage)
+static CURLcode setstropt_userpwd(char *option, char **userp, char **passwdp)
{
- char* separator;
CURLcode result = CURLE_OK;
-
- if(!option) {
- /* we treat a NULL passed in as a hint to clear existing info */
- Curl_safefree(*user_storage);
- *user_storage = (char *) NULL;
- Curl_safefree(*pwd_storage);
- *pwd_storage = (char *) NULL;
- return CURLE_OK;
+ char *user = NULL;
+ char *passwd = NULL;
+
+ /* Parse the login details if specified. It not then we treat NULL as a hint
+ to clear the existing data */
+ if(option) {
+ result = parse_login_details(option, strlen(option),
+ (userp ? &user : NULL),
+ (passwdp ? &passwd : NULL),
+ NULL);
}
- separator = strchr(option, ':');
- if (separator != NULL) {
+ if(!result) {
+ /* Store the username part of option if required */
+ if(userp) {
+ if(!user && option && option[0] == ':') {
+ /* Allocate an empty string instead of returning NULL as user name */
+ user = strdup("");
+ if(!user)
+ result = CURLE_OUT_OF_MEMORY;
+ }
- /* store username part of option */
- char * p;
- size_t username_len = (size_t)(separator-option);
- p = malloc(username_len+1);
- if(!p)
- result = CURLE_OUT_OF_MEMORY;
- else {
- memcpy(p, option, username_len);
- p[username_len] = '\0';
- Curl_safefree(*user_storage);
- *user_storage = p;
+ Curl_safefree(*userp);
+ *userp = user;
}
- /* store password part of option */
- if (result == CURLE_OK) {
- result = setstropt(pwd_storage, separator+1);
+ /* Store the password part of option if required */
+ if(passwdp) {
+ Curl_safefree(*passwdp);
+ *passwdp = passwd;
}
}
- else {
- result = setstropt(user_storage, option);
- }
+
return result;
}
-CURLcode Curl_dupset(struct SessionHandle * dst, struct SessionHandle * src)
+CURLcode Curl_dupset(struct SessionHandle *dst, struct SessionHandle *src)
{
- CURLcode r = CURLE_OK;
+ CURLcode result = CURLE_OK;
enum dupstring i;
/* Copy src->set into dst->set first, then deal with the strings
@@ -365,48 +367,26 @@ 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_LAST; i++) {
- r = setstropt(&dst->set.str[i], src->set.str[i]);
- if(r != CURLE_OK)
- break;
+ for(i=(enum dupstring)0; i< STRING_LASTZEROTERMINATED; i++) {
+ result = setstropt(&dst->set.str[i], src->set.str[i]);
+ if(result)
+ return result;
}
- /* If a failure occurred, freeing has to be performed externally. */
- return r;
-}
-
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
-static void flush_cookies(struct SessionHandle *data, int cleanup)
-{
- if(data->set.str[STRING_COOKIEJAR]) {
- if(data->change.cookielist) {
- /* If there is a list of cookie files to read, do it first so that
- we have all the told files read before we write the new jar.
- Curl_cookie_loadfiles() LOCKS and UNLOCKS the share itself! */
- Curl_cookie_loadfiles(data);
- }
-
- Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
-
- /* if we have a destination file for all the cookies to get dumped to */
- if(Curl_cookie_output(data->cookies, data->set.str[STRING_COOKIEJAR]))
- infof(data, "WARNING: failed to save cookies in %s\n",
- data->set.str[STRING_COOKIEJAR]);
- }
- else {
- if(cleanup && data->change.cookielist)
- /* since nothing is written, we can just free the list of cookie file
- names */
- curl_slist_free_all(data->change.cookielist); /* clean up list */
- Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
+ /* 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];
}
- if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
- Curl_cookie_cleanup(data->cookies);
- }
- Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
+ return CURLE_OK;
}
-#endif
/*
* This is the internal function curl_easy_cleanup() calls. This should
@@ -419,75 +399,25 @@ static void flush_cookies(struct SessionHandle *data, int cleanup)
CURLcode Curl_close(struct SessionHandle *data)
{
- struct Curl_multi *m = data->multi;
-
-#ifdef DEBUGBUILD
- /* only for debugging, scan through all connections and see if there's a
- pipe reference still identifying this handle */
-
- if(data->state.connc && data->state.connc->type == CONNCACHE_MULTI) {
- struct conncache *c = data->state.connc;
- long i;
- struct curl_llist *pipeline;
- struct curl_llist_element *curr;
- struct connectdata *connptr;
+ struct Curl_multi *m;
- for(i=0; i< c->num; i++) {
- connptr = c->connects[i];
- if(!connptr)
- continue;
-
- pipeline = connptr->send_pipe;
- if(pipeline) {
- for (curr = pipeline->head; curr; curr=curr->next) {
- if(data == (struct SessionHandle *) curr->ptr) {
- fprintf(stderr,
- "problem we %p are still in send pipe for %p done %d\n",
- data, connptr, (int)connptr->bits.done);
- }
- }
- }
- pipeline = connptr->recv_pipe;
- if(pipeline) {
- for (curr = pipeline->head; curr; curr=curr->next) {
- if(data == (struct SessionHandle *) curr->ptr) {
- fprintf(stderr,
- "problem we %p are still in recv pipe for %p done %d\n",
- data, connptr, (int)connptr->bits.done);
- }
- }
- }
- pipeline = connptr->done_pipe;
- if(pipeline) {
- for (curr = pipeline->head; curr; curr=curr->next) {
- if(data == (struct SessionHandle *) curr->ptr) {
- fprintf(stderr,
- "problem we %p are still in done pipe for %p done %d\n",
- data, connptr, (int)connptr->bits.done);
- }
- }
- }
- pipeline = connptr->pend_pipe;
- if(pipeline) {
- for (curr = pipeline->head; curr; curr=curr->next) {
- if(data == (struct SessionHandle *) curr->ptr) {
- fprintf(stderr,
- "problem we %p are still in pend pipe for %p done %d\n",
- data, connptr, (int)connptr->bits.done);
- }
- }
- }
- }
- }
-#endif
+ if(!data)
+ return CURLE_OK;
Curl_expire(data, 0); /* shut off timers */
+ m = data->multi;
+
if(m)
/* This handle is still part of a multi handle, take care of this first
and detach this handle from there. */
curl_multi_remove_handle(data->multi, data);
+ if(data->multi_easy)
+ /* when curl_easy_perform() is used, it creates its own multi handle to
+ use and this is the one */
+ curl_multi_cleanup(data->multi_easy);
+
/* Destroy the timeout list that is held in the easy handle. It is
/normally/ done by curl_multi_remove_handle() but this is "just in
case" */
@@ -500,37 +430,15 @@ CURLcode Curl_close(struct SessionHandle *data)
the multi handle, since that function uses the magic
field! */
- if(data->state.connc) {
-
- if(data->state.connc->type == CONNCACHE_PRIVATE) {
- /* close all connections still alive that are in the private connection
- cache, as we no longer have the pointer left to the shared one. */
- close_connections(data);
-
- /* free the connection cache if allocated privately */
- Curl_rm_connc(data->state.connc);
- }
- }
-
- if(data->state.shared_conn) {
- /* marked to be used by a pending connection so we can't kill this handle
- just yet */
- data->state.closed = TRUE;
- return CURLE_OK;
- }
-
- if(data->dns.hostcachetype == HCACHE_PRIVATE) {
- Curl_hash_destroy(data->dns.hostcache);
- data->dns.hostcachetype = HCACHE_NONE;
- data->dns.hostcache = NULL;
- }
-
if(data->state.rangestringalloc)
free(data->state.range);
/* Free the pathbuffer */
Curl_safefree(data->state.pathbuffer);
- Curl_safefree(data->state.proto.generic);
+ data->state.path = NULL;
+
+ /* freed here just in case DONE wasn't called */
+ Curl_free_request_state(data);
/* Close down all open SSL info and sessions */
Curl_ssl_close_all(data);
@@ -538,17 +446,25 @@ CURLcode Curl_close(struct SessionHandle *data)
Curl_safefree(data->state.scratch);
Curl_ssl_free_certinfo(data);
- if(data->change.referer_alloc)
- free(data->change.referer);
+ /* Cleanup possible redirect junk */
+ free(data->req.newurl);
+ data->req.newurl = NULL;
- if(data->change.url_alloc)
- free(data->change.url);
+ if(data->change.referer_alloc) {
+ Curl_safefree(data->change.referer);
+ data->change.referer_alloc = FALSE;
+ }
+ data->change.referer = NULL;
+
+ if(data->change.url_alloc) {
+ Curl_safefree(data->change.url);
+ data->change.url_alloc = FALSE;
+ }
+ data->change.url = NULL;
Curl_safefree(data->state.headerbuff);
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
- flush_cookies(data, 1);
-#endif
+ Curl_flush_cookies(data, 1);
Curl_digest_cleanup(data);
@@ -556,20 +472,9 @@ CURLcode Curl_close(struct SessionHandle *data)
Curl_safefree(data->info.wouldredirect);
/* this destroys the channel and we cannot use it anymore after this */
- ares_destroy(data->state.areschannel);
+ Curl_resolver_cleanup(data->state.resolver);
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
- /* close iconv conversion descriptors */
- if(data->inbound_cd != (iconv_t)-1) {
- iconv_close(data->inbound_cd);
- }
- if(data->outbound_cd != (iconv_t)-1) {
- iconv_close(data->outbound_cd);
- }
- if(data->utf8_cd != (iconv_t)-1) {
- iconv_close(data->utf8_cd);
- }
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
+ Curl_convert_close(data);
/* No longer a dirty share, if it exists */
if(data->share) {
@@ -583,123 +488,13 @@ CURLcode Curl_close(struct SessionHandle *data)
return CURLE_OK;
}
-/* create a connection cache of a private or multi type */
-struct conncache *Curl_mk_connc(int type,
- long amount) /* set -1 to use default */
-{
- /* It is subject for debate how many default connections to have for a multi
- connection cache... */
-
- struct conncache *c;
- long default_amount;
- long max_amount = (long)(((size_t)INT_MAX) / sizeof(struct connectdata *));
-
- if(type == CONNCACHE_PRIVATE) {
- default_amount = (amount < 1L) ? 5L : amount;
- }
- else {
- default_amount = (amount < 1L) ? 10L : amount;
- }
-
- if(default_amount > max_amount)
- default_amount = max_amount;
-
- c = calloc(1, sizeof(struct conncache));
- if(!c)
- return NULL;
-
- c->connects = calloc((size_t)default_amount, sizeof(struct connectdata *));
- if(!c->connects) {
- free(c);
- return NULL;
- }
-
- c->num = default_amount;
-
- return c;
-}
-
-/* Change number of entries of a connection cache */
-CURLcode Curl_ch_connc(struct SessionHandle *data,
- struct conncache *c,
- long newamount)
-{
- long i;
- struct connectdata **newptr;
- long max_amount = (long)(((size_t)INT_MAX) / sizeof(struct connectdata *));
-
- if(newamount < 1)
- newamount = 1; /* we better have at least one entry */
-
- if(!c) {
- /* we get a NULL pointer passed in as connection cache, which means that
- there is no cache created for this SessionHandle just yet, we create a
- brand new with the requested size.
- */
- data->state.connc = Curl_mk_connc(CONNCACHE_PRIVATE, newamount);
- if(!data->state.connc)
- return CURLE_OUT_OF_MEMORY;
- return CURLE_OK;
- }
-
- if(newamount < c->num) {
- /* Since this number is *decreased* from the existing number, we must
- close the possibly open connections that live on the indexes that
- are being removed!
-
- NOTE: for conncache_multi cases we must make sure that we only
- close handles not in use.
- */
- for(i=newamount; i< c->num; i++)
- Curl_disconnect(c->connects[i]);
-
- /* If the most recent connection is no longer valid, mark it
- invalid. */
- if(data->state.lastconnect <= newamount)
- data->state.lastconnect = -1;
- }
- if(newamount > 0) {
- if(newamount > max_amount)
- newamount = max_amount;
- newptr = realloc(c->connects, sizeof(struct connectdata *) * newamount);
- if(!newptr)
- /* we closed a few connections in vain, but so what? */
- return CURLE_OUT_OF_MEMORY;
-
- /* nullify the newly added pointers */
- for(i=c->num; i<newamount; i++)
- newptr[i] = NULL;
-
- c->connects = newptr;
- c->num = newamount;
- }
- /* we no longer support less than 1 as size for the connection cache, and
- I'm not sure it ever worked to set it to zero */
- return CURLE_OK;
-}
-
-/* Free a connection cache. This is called from Curl_close() and
- curl_multi_cleanup(). */
-void Curl_rm_connc(struct conncache *c)
-{
- if(c->connects) {
- long i;
- for(i = 0; i < c->num; ++i)
- conn_free(c->connects[i]);
-
- free(c->connects);
- }
-
- free(c);
-}
-
/*
* Initialize the UserDefined fields within a SessionHandle.
* This may be safely called on a new or existing SessionHandle.
*/
CURLcode Curl_init_userdefined(struct UserDefined *set)
{
- CURLcode res = CURLE_OK;
+ CURLcode result = CURLE_OK;
set->out = stdout; /* default output to stdout */
set->in = stdin; /* default input from stdin */
@@ -721,7 +516,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
set->convtonetwork = ZERO_NULL;
set->convfromutf8 = ZERO_NULL;
- set->infilesize = -1; /* we don't know any size */
+ set->filesize = -1; /* we don't know the size */
set->postfieldsize = -1; /* unknown size */
set->maxredirs = -1; /* allow any amount by default */
@@ -735,7 +530,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
set->dns_cache_timeout = 60; /* Timeout every 60 seconds by default */
/* Set the default size of the SSL session ID cache */
- set->ssl.numsessions = 5;
+ set->ssl.max_ssl_sessions = 5;
set->proxyport = CURL_DEFAULT_PROXY_PORT; /* from url.h */
set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
@@ -750,7 +545,10 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
* switched off unless wanted.
*/
set->ssl.verifypeer = TRUE;
- set->ssl.verifyhost = 2;
+ set->ssl.verifyhost = TRUE;
+#ifdef USE_TLS_SRP
+ set->ssl.authtype = CURL_TLSAUTH_NONE;
+#endif
set->ssh_auth_types = CURLSSH_AUTH_DEFAULT; /* defaults to any auth
type */
set->ssl.sessionid = TRUE; /* session ID caching enabled by default */
@@ -761,9 +559,10 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
/* for the *protocols fields we don't use the CURLPROTO_ALL convenience
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 = PROT_EXTMASK;
- set->redir_protocols =
- PROT_EXTMASK & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */
+ set->allowed_protocols = CURLPROTO_ALL;
+ set->redir_protocols = CURLPROTO_ALL & /* All except FILE, SCP and SMB */
+ ~(CURLPROTO_FILE | CURLPROTO_SCP | CURLPROTO_SMB |
+ CURLPROTO_SMBS);
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
/*
@@ -771,25 +570,54 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
* seem not to follow rfc1961 section 4.3/4.4
*/
set->socks5_gssapi_nec = FALSE;
- /* 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;
+ /* 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 negotiate proxy service name */
+ result = setstropt(&set->str[STRING_PROXY_SERVICE_NAME],
+ (char *) CURL_DEFAULT_PROXY_SERVICE_NAME);
+ if(result)
+ return result;
+
+ /* set default negotiate service name */
+ result = setstropt(&set->str[STRING_SERVICE_NAME],
+ (char *) CURL_DEFAULT_SERVICE_NAME);
+ if(result)
+ return result;
#endif
/* This is our preferred CA cert bundle/path since install time */
#if defined(CURL_CA_BUNDLE)
- res = setstropt(&set->str[STRING_SSL_CAFILE], (char *) CURL_CA_BUNDLE);
-#elif defined(CURL_CA_PATH)
- res = setstropt(&set->str[STRING_SSL_CAPATH], (char *) CURL_CA_PATH);
+ result = setstropt(&set->str[STRING_SSL_CAFILE], (char *) CURL_CA_BUNDLE);
+ if(result)
+ return result;
+#endif
+#if defined(CURL_CA_PATH)
+ result = setstropt(&set->str[STRING_SSL_CAPATH], (char *) CURL_CA_PATH);
+ if(result)
+ return result;
#endif
set->wildcardmatch = FALSE;
set->chunk_bgn = ZERO_NULL;
set->chunk_end = ZERO_NULL;
- return res;
+ /* tcp keepalives are disabled by default, but provide reasonable values for
+ * the interval and idle times.
+ */
+ set->tcp_keepalive = FALSE;
+ set->tcp_keepintvl = 60;
+ set->tcp_keepidle = 60;
+
+ set->ssl_enable_npn = TRUE;
+ 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;
}
/**
@@ -802,11 +630,8 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
CURLcode Curl_open(struct SessionHandle **curl)
{
- CURLcode res = CURLE_OK;
+ CURLcode result;
struct SessionHandle *data;
-#ifdef USE_ARES
- int status;
-#endif
/* Very simple start-up: alloc the struct, init it with zeroes and return */
data = calloc(1, sizeof(struct SessionHandle));
@@ -818,41 +643,29 @@ CURLcode Curl_open(struct SessionHandle **curl)
data->magic = CURLEASY_MAGIC_NUMBER;
-#ifdef USE_ARES
- if((status = ares_init(&data->state.areschannel)) != ARES_SUCCESS) {
- DEBUGF(fprintf(stderr, "Error: ares_init failed\n"));
+ result = Curl_resolver_init(&data->state.resolver);
+ if(result) {
+ DEBUGF(fprintf(stderr, "Error: resolver_init failed\n"));
free(data);
- if(status == ARES_ENOMEM)
- return CURLE_OUT_OF_MEMORY;
- else
- return CURLE_FAILED_INIT;
+ return result;
}
- /* make sure that all other returns from this function should destroy the
- ares channel before returning error! */
-#endif
/* We do some initial setup here, all those fields that can't be just 0 */
data->state.headerbuff = malloc(HEADERSIZE);
if(!data->state.headerbuff) {
DEBUGF(fprintf(stderr, "Error: malloc of headerbuff failed\n"));
- res = CURLE_OUT_OF_MEMORY;
+ result = CURLE_OUT_OF_MEMORY;
}
else {
- Curl_easy_initHandleData(data);
- res = Curl_init_userdefined(&data->set);
+ result = Curl_init_userdefined(&data->set);
data->state.headersize=HEADERSIZE;
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
- /* conversion descriptors for iconv calls */
- data->outbound_cd = (iconv_t)-1;
- data->inbound_cd = (iconv_t)-1;
- data->utf8_cd = (iconv_t)-1;
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
+ Curl_convert_init(data);
/* most recent connection is not yet defined */
- data->state.lastconnect = -1;
+ data->state.lastconnect = NULL;
data->progress.flags |= PGRS_HIDE;
data->state.current_speed = -1; /* init to negative == impossible */
@@ -860,15 +673,12 @@ CURLcode Curl_open(struct SessionHandle **curl)
data->wildcard.state = CURLWC_INIT;
data->wildcard.filelist = NULL;
data->set.fnmatch = ZERO_NULL;
- /* This no longer creates a connection cache here. It is instead made on
- the first call to curl_easy_perform() or when the handle is added to a
- multi stack. */
+ data->set.maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
}
- if(res) {
- ares_destroy(data->state.areschannel);
- if(data->state.headerbuff)
- free(data->state.headerbuff);
+ if(result) {
+ Curl_resolver_cleanup(data->state.resolver);
+ free(data->state.headerbuff);
Curl_freeset(data);
free(data);
data = NULL;
@@ -876,7 +686,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
else
*curl = data;
- return res;
+ return result;
}
CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
@@ -884,6 +694,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
{
char *argptr;
CURLcode result = CURLE_OK;
+ long arg;
#ifndef CURL_DISABLE_HTTP
curl_off_t bigsize;
#endif
@@ -893,12 +704,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.dns_cache_timeout = va_arg(param, long);
break;
case CURLOPT_DNS_USE_GLOBAL_CACHE:
- {
/* remember we want this enabled */
- long use_cache = va_arg(param, long);
- data->set.global_dns_cache = (bool)(0 != use_cache);
- }
- break;
+ arg = va_arg(param, long);
+ data->set.global_dns_cache = (0 != arg)?TRUE:FALSE;
+ break;
case CURLOPT_SSL_CIPHER_LIST:
/* set a list of cipher we want to use in the SSL connection */
result = setstropt(&data->set.str[STRING_SSL_CIPHER_LIST],
@@ -925,40 +734,40 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Set the absolute number of maximum simultaneous alive connection that
* libcurl is allowed to have.
*/
- result = Curl_ch_connc(data, data->state.connc, va_arg(param, long));
+ data->set.maxconnects = va_arg(param, long);
break;
case CURLOPT_FORBID_REUSE:
/*
* When this transfer is done, it must not be left to be reused by a
* subsequent transfer but shall be closed immediately.
*/
- data->set.reuse_forbid = (bool)(0 != va_arg(param, long));
+ data->set.reuse_forbid = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_FRESH_CONNECT:
/*
* This transfer shall not use a previously cached connection but
* should be made with a fresh new connect!
*/
- data->set.reuse_fresh = (bool)(0 != va_arg(param, long));
+ data->set.reuse_fresh = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_VERBOSE:
/*
* Verbose means infof() calls that give a lot of information about
* the connection and transfer procedures as well as internal choices.
*/
- data->set.verbose = (bool)(0 != va_arg(param, long));
+ data->set.verbose = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_HEADER:
/*
* Set to include the header in the general data output stream.
*/
- data->set.include_header = (bool)(0 != va_arg(param, long));
+ data->set.include_header = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_NOPROGRESS:
/*
* Shut off the internal supported progress meter
*/
- data->set.hide_progress = (bool)(0 != va_arg(param, long));
+ data->set.hide_progress = (0 != va_arg(param, long))?TRUE:FALSE;
if(data->set.hide_progress)
data->progress.flags |= PGRS_HIDE;
else
@@ -968,14 +777,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Do not include the body part in the output data stream.
*/
- data->set.opt_no_body = (bool)(0 != va_arg(param, long));
+ data->set.opt_no_body = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_FAILONERROR:
/*
- * Don't output the >=300 error code HTML-page, but instead only
+ * Don't output the >=400 error code HTML-page, but instead only
* return error.
*/
- data->set.http_fail_on_error = (bool)(0 != va_arg(param, long));
+ data->set.http_fail_on_error = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_UPLOAD:
case CURLOPT_PUT:
@@ -983,7 +792,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* We want to sent data to the remote host. If this is HTTP, that equals
* using the PUT request.
*/
- data->set.upload = (bool)(0 != va_arg(param, long));
+ data->set.upload = (0 != va_arg(param, long))?TRUE:FALSE;
if(data->set.upload) {
/* If this is HTTP, PUT is what's needed to "upload" */
data->set.httpreq = HTTPREQ_PUT;
@@ -999,14 +808,28 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Try to get the file time of the remote document. The time will
* later (possibly) become available using curl_easy_getinfo().
*/
- data->set.get_filetime = (bool)(0 != va_arg(param, long));
+ data->set.get_filetime = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_FTP_CREATE_MISSING_DIRS:
/*
* An FTP option that modifies an upload to create missing directories on
* the server.
*/
- data->set.ftp_create_missing_dirs = (int)va_arg(param, long);
+ switch(va_arg(param, long)) {
+ case 0:
+ data->set.ftp_create_missing_dirs = 0;
+ break;
+ case 1:
+ data->set.ftp_create_missing_dirs = 1;
+ break;
+ case 2:
+ data->set.ftp_create_missing_dirs = 2;
+ break;
+ default:
+ /* reserve other values for future use */
+ result = CURLE_UNKNOWN_OPTION;
+ break;
+ }
break;
case CURLOPT_SERVER_RESPONSE_TIMEOUT:
/*
@@ -1026,13 +849,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* An option that changes the command to one that asks for a list
* only, no file info details.
*/
- data->set.ftp_list_only = (bool)(0 != va_arg(param, long));
+ data->set.ftp_list_only = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_APPEND:
/*
* We want to upload and append to an existing file.
*/
- data->set.ftp_append = (bool)(0 != va_arg(param, long));
+ data->set.ftp_append = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_FTP_FILEMETHOD:
/*
@@ -1060,7 +883,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*
* Transfer using ASCII (instead of BINARY).
*/
- data->set.prefer_ascii = (bool)(0 != va_arg(param, long));
+ data->set.prefer_ascii = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_TIMECONDITION:
/*
@@ -1081,7 +904,11 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Set explicit SSL version to try to connect with, as some SSL
* implementations are lame.
*/
+#ifdef USE_SSL
data->set.ssl.version = va_arg(param, long);
+#else
+ result = CURLE_UNKNOWN_OPTION;
+#endif
break;
#ifndef CURL_DISABLE_HTTP
@@ -1089,10 +916,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Switch on automatic referer that gets set if curl follows locations.
*/
- data->set.http_auto_referer = (bool)(0 != va_arg(param, long));
+ data->set.http_auto_referer = (0 != va_arg(param, long))?TRUE:FALSE;
break;
- case CURLOPT_ENCODING:
+ case CURLOPT_ACCEPT_ENCODING:
/*
* String to use at the value of Accept-Encoding header.
*
@@ -1108,11 +935,15 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
(char *) ALL_CONTENT_ENCODINGS: argptr);
break;
+ case CURLOPT_TRANSFER_ENCODING:
+ data->set.http_transfer_encoding = (0 != va_arg(param, long))?TRUE:FALSE;
+ break;
+
case CURLOPT_FOLLOWLOCATION:
/*
* Follow Location: header hints on a HTTP-server.
*/
- data->set.http_follow_location = (bool)(0 != va_arg(param, long));
+ data->set.http_follow_location = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_UNRESTRICTED_AUTH:
@@ -1121,7 +952,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* hostname changed.
*/
data->set.http_disable_hostname_check_before_authentication =
- (bool)(0 != va_arg(param, long));
+ (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_MAXREDIRS:
@@ -1139,12 +970,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* CURL_REDIR_GET_ALL - POST is changed to GET after 301 and 302
* CURL_REDIR_POST_301 - POST is kept as POST after 301
* CURL_REDIR_POST_302 - POST is kept as POST after 302
- * CURL_REDIR_POST_ALL - POST is kept as POST after 301 and 302
+ * CURL_REDIR_POST_303 - POST is kept as POST after 303
+ * CURL_REDIR_POST_ALL - POST is kept as POST after 301, 302 and 303
* other - POST is kept as POST after 301 and 302
*/
- long postRedir = va_arg(param, long);
- data->set.post301 = (bool)((postRedir & CURL_REDIR_POST_301)?TRUE:FALSE);
- data->set.post302 = (bool)((postRedir & CURL_REDIR_POST_302)?TRUE:FALSE);
+ int postRedir = curlx_sltosi(va_arg(param, long));
+ data->set.keep_post = postRedir & CURL_REDIR_POST_ALL;
}
break;
@@ -1265,7 +1096,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* String to set in the HTTP Referer: field.
*/
if(data->change.referer_alloc) {
- free(data->change.referer);
+ Curl_safefree(data->change.referer);
data->change.referer_alloc = FALSE;
}
result = setstropt(&data->set.str[STRING_SET_REFERER],
@@ -1288,6 +1119,28 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.headers = va_arg(param, struct curl_slist *);
break;
+ case CURLOPT_PROXYHEADER:
+ /*
+ * Set a list with proxy headers to use (or replace internals with)
+ *
+ * Since CURLOPT_HTTPHEADER was the only way to set HTTP headers for a
+ * long time we remain doing it this way until CURLOPT_PROXYHEADER is
+ * used. As soon as this option has been used, if set to anything but
+ * NULL, custom headers for proxies are only picked from this list.
+ *
+ * Set this option to NULL to restore the previous behavior.
+ */
+ data->set.proxyheaders = va_arg(param, struct curl_slist *);
+ break;
+
+ case CURLOPT_HEADEROPT:
+ /*
+ * Set header option.
+ */
+ arg = va_arg(param, long);
+ data->set.sep_headers = (arg & CURLHEADER_SEPARATE)? TRUE: FALSE;
+ break;
+
case CURLOPT_HTTP200ALIASES:
/*
* Set a list of aliases for HTTP 200 in response header
@@ -1314,10 +1167,11 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/* append the cookie file name to the list of file names, and deal with
them later */
cl = curl_slist_append(data->change.cookielist, argptr);
-
- if(!cl)
+ if(!cl) {
+ curl_slist_free_all(data->change.cookielist);
+ data->change.cookielist = NULL;
return CURLE_OUT_OF_MEMORY;
-
+ }
data->change.cookielist = cl; /* store the list for later use */
}
break;
@@ -1326,6 +1180,8 @@ 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 *));
@@ -1333,8 +1189,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Activate the cookie parser. This may or may not already
* have been made.
*/
- data->cookies = Curl_cookie_init(data, NULL, data->cookies,
- data->set.cookiesession);
+ newcookies = Curl_cookie_init(data, NULL, data->cookies,
+ data->set.cookiesession);
+ if(!newcookies)
+ result = CURLE_OUT_OF_MEMORY;
+ data->cookies = newcookies;
+ }
break;
case CURLOPT_COOKIESESSION:
@@ -1353,7 +1213,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* We run mostly with the original cookie spec, as hardly anyone implements
* anything else.
*/
- data->set.cookiesession = (bool)(0 != va_arg(param, long));
+ data->set.cookiesession = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_COOKIELIST:
@@ -1364,39 +1224,51 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
if(Curl_raw_equal(argptr, "ALL")) {
/* clear all cookies */
+ Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
Curl_cookie_clearall(data->cookies);
- break;
+ Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
}
else if(Curl_raw_equal(argptr, "SESS")) {
/* clear session cookies */
+ Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
Curl_cookie_clearsess(data->cookies);
- break;
+ Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
}
else if(Curl_raw_equal(argptr, "FLUSH")) {
- /* flush cookies to file */
- flush_cookies(data, 0);
+ /* 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);
- if(!data->cookies)
- /* if cookie engine was not running, activate it */
- data->cookies = Curl_cookie_init(data, NULL, NULL, TRUE);
+ argptr = strdup(argptr);
+ if(!argptr || !data->cookies) {
+ result = CURLE_OUT_OF_MEMORY;
+ free(argptr);
+ }
+ else {
+ Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
- argptr = strdup(argptr);
- if(!argptr) {
- result = CURLE_OUT_OF_MEMORY;
- break;
- }
+ if(checkprefix("Set-Cookie:", argptr))
+ /* HTTP Header format line */
+ Curl_cookie_add(data, data->cookies, TRUE, argptr + 11, NULL, NULL);
- if(checkprefix("Set-Cookie:", argptr))
- /* HTTP Header format line */
- Curl_cookie_add(data, data->cookies, TRUE, argptr + 11, NULL, NULL);
+ else
+ /* Netscape format line */
+ Curl_cookie_add(data, data->cookies, FALSE, argptr, NULL, NULL);
- else
- /* Netscape format line */
- Curl_cookie_add(data, data->cookies, FALSE, argptr, NULL, NULL);
+ Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
+ free(argptr);
+ }
+ }
- free(argptr);
break;
#endif /* CURL_DISABLE_COOKIES */
@@ -1416,7 +1288,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* This sets a requested HTTP version to be used. The value is one of
* the listed enums in curl/curl.h.
*/
- data->set.httpversion = va_arg(param, long);
+ arg = va_arg(param, long);
+#ifndef USE_NGHTTP2
+ if(arg == CURL_HTTP_VERSION_2_0)
+ return CURLE_UNSUPPORTED_PROTOCOL;
+#endif
+ data->set.httpversion = arg;
break;
case CURLOPT_HTTPAUTH:
@@ -1424,12 +1301,18 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Set HTTP Authentication type BITMASK.
*/
{
- long auth = va_arg(param, long);
+ int bitcheck;
+ bool authbits;
+ unsigned long auth = va_arg(param, unsigned long);
+
+ if(auth == CURLAUTH_NONE) {
+ data->set.httpauth = auth;
+ break;
+ }
/* the DIGEST_IE bit is only used to set a special marker, for all the
rest we need to handle it as normal DIGEST */
- data->state.authhost.iestyle = (bool)((auth & CURLAUTH_DIGEST_IE)?
- TRUE:FALSE);
+ data->state.authhost.iestyle = (auth & CURLAUTH_DIGEST_IE)?TRUE:FALSE;
if(auth & CURLAUTH_DIGEST_IE) {
auth |= CURLAUTH_DIGEST; /* set standard digest bit */
@@ -1438,18 +1321,40 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/* switch off bits we can't support */
#ifndef USE_NTLM
- auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */
+ auth &= ~CURLAUTH_NTLM; /* no NTLM support */
+ auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
+#elif !defined(NTLM_WB_ENABLED)
+ auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
#endif
-#ifndef HAVE_GSSAPI
- auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI */
+#ifndef USE_SPNEGO
+ auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without
+ GSS-API or SSPI */
#endif
- if(!auth)
- return CURLE_FAILED_INIT; /* no supported types left! */
+
+ /* check if any auth bit lower than CURLAUTH_ONLY is still set */
+ bitcheck = 0;
+ authbits = FALSE;
+ while(bitcheck < 31) {
+ if(auth & (1UL << bitcheck++)) {
+ authbits = TRUE;
+ break;
+ }
+ }
+ if(!authbits)
+ return CURLE_NOT_BUILT_IN; /* no supported types left! */
data->set.httpauth = auth;
}
break;
+ case CURLOPT_EXPECT_100_TIMEOUT_MS:
+ /*
+ * Time to wait for a response to a HTTP request containing an
+ * Expect: 100-continue header before sending the data anyway.
+ */
+ data->set.expect_100_timeout = va_arg(param, long);
+ break;
+
#endif /* CURL_DISABLE_HTTP */
case CURLOPT_CUSTOMREQUEST:
@@ -1470,7 +1375,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Tunnel operations through the proxy instead of normal proxy use
*/
- data->set.tunnel_thru_httpproxy = (bool)(0 != va_arg(param, long));
+ data->set.tunnel_thru_httpproxy = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_PROXYPORT:
@@ -1485,12 +1390,18 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Set HTTP Authentication type BITMASK.
*/
{
- long auth = va_arg(param, long);
+ int bitcheck;
+ bool authbits;
+ unsigned long auth = va_arg(param, unsigned long);
+
+ if(auth == CURLAUTH_NONE) {
+ data->set.proxyauth = auth;
+ break;
+ }
/* the DIGEST_IE bit is only used to set a special marker, for all the
rest we need to handle it as normal DIGEST */
- data->state.authproxy.iestyle = (bool)((auth & CURLAUTH_DIGEST_IE)?
- TRUE:FALSE);
+ data->state.authproxy.iestyle = (auth & CURLAUTH_DIGEST_IE)?TRUE:FALSE;
if(auth & CURLAUTH_DIGEST_IE) {
auth |= CURLAUTH_DIGEST; /* set standard digest bit */
@@ -1498,13 +1409,27 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
}
/* switch off bits we can't support */
#ifndef USE_NTLM
- auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */
+ auth &= ~CURLAUTH_NTLM; /* no NTLM support */
+ auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
+#elif !defined(NTLM_WB_ENABLED)
+ auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
#endif
-#ifndef HAVE_GSSAPI
- auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI */
+#ifndef USE_SPNEGO
+ auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without
+ GSS-API or SSPI */
#endif
- if(!auth)
- return CURLE_FAILED_INIT; /* no supported types left! */
+
+ /* check if any auth bit lower than CURLAUTH_ONLY is still set */
+ bitcheck = 0;
+ authbits = FALSE;
+ while(bitcheck < 31) {
+ if(auth & (1UL << bitcheck++)) {
+ authbits = TRUE;
+ break;
+ }
+ }
+ if(!authbits)
+ return CURLE_NOT_BUILT_IN; /* no supported types left! */
data->set.proxyauth = auth;
}
@@ -1544,7 +1469,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
break;
default:
/* reserve other values for future use */
- result = CURLE_FAILED_INIT;
+ result = CURLE_UNKNOWN_OPTION;
break;
}
break;
@@ -1553,21 +1478,38 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
case CURLOPT_SOCKS5_GSSAPI_SERVICE:
/*
- * Set gssapi service name
+ * Set GSS-API service name
*/
result = setstropt(&data->set.str[STRING_SOCKS5_GSSAPI_SERVICE],
va_arg(param, char *));
break;
+ case CURLOPT_PROXY_SERVICE_NAME:
+ /*
+ * Set negotiate proxy service name
+ */
+ result = setstropt(&data->set.str[STRING_PROXY_SERVICE_NAME],
+ va_arg(param, char *));
+ break;
+
case CURLOPT_SOCKS5_GSSAPI_NEC:
/*
* set flag for nec socks5 support
*/
- data->set.socks5_gssapi_nec = (bool)(0 != va_arg(param, long));
+ data->set.socks5_gssapi_nec = (0 != va_arg(param, long))?TRUE:FALSE;
break;
+
+ case CURLOPT_SERVICE_NAME:
+ /*
+ * Set negotiate service identity
+ */
+ result = setstropt(&data->set.str[STRING_SERVICE_NAME],
+ va_arg(param, char *));
+ break;
+
#endif
- case CURLOPT_WRITEHEADER:
+ case CURLOPT_HEADERDATA:
/*
* Custom pointer to pass the header write callback function
*/
@@ -1580,11 +1522,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data->set.errorbuffer = va_arg(param, char *);
break;
- case CURLOPT_FILE:
+ case CURLOPT_WRITEDATA:
/*
- * FILE pointer to write to or include in the data write callback
+ * FILE pointer to write to. Or possibly
+ * used as argument to the write callback.
*/
- data->set.out = va_arg(param, FILE *);
+ data->set.out = va_arg(param, void *);
break;
case CURLOPT_FTPPORT:
/*
@@ -1592,19 +1535,20 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
result = setstropt(&data->set.str[STRING_FTPPORT],
va_arg(param, char *));
- data->set.ftp_use_port = (bool)(NULL != data->set.str[STRING_FTPPORT]);
+ data->set.ftp_use_port = (NULL != data->set.str[STRING_FTPPORT]) ?
+ TRUE:FALSE;
break;
case CURLOPT_FTP_USE_EPRT:
- data->set.ftp_use_eprt = (bool)(0 != va_arg(param, long));
+ data->set.ftp_use_eprt = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_FTP_USE_EPSV:
- data->set.ftp_use_epsv = (bool)(0 != va_arg(param, long));
+ data->set.ftp_use_epsv = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_FTP_USE_PRET:
- data->set.ftp_use_pret = (bool)(0 != va_arg(param, long));
+ data->set.ftp_use_pret = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_FTP_SSL_CCC:
@@ -1616,29 +1560,29 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Enable or disable FTP_SKIP_PASV_IP, which will disable/enable the
* bypass of the IP address in PASV responses.
*/
- data->set.ftp_skip_ip = (bool)(0 != va_arg(param, long));
+ data->set.ftp_skip_ip = (0 != va_arg(param, long))?TRUE:FALSE;
break;
- case CURLOPT_INFILE:
+ case CURLOPT_READDATA:
/*
* FILE pointer to read the file to be uploaded from. Or possibly
* used as argument to the read callback.
*/
- data->set.in = va_arg(param, FILE *);
+ data->set.in = va_arg(param, void *);
break;
case CURLOPT_INFILESIZE:
/*
* If known, this should inform curl about the file size of the
* to-be-uploaded file.
*/
- data->set.infilesize = va_arg(param, long);
+ data->set.filesize = va_arg(param, long);
break;
case CURLOPT_INFILESIZE_LARGE:
/*
* If known, this should inform curl about the file size of the
* to-be-uploaded file.
*/
- data->set.infilesize = va_arg(param, curl_off_t);
+ data->set.filesize = va_arg(param, curl_off_t);
break;
case CURLOPT_LOW_SPEED_LIMIT:
/*
@@ -1674,8 +1618,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
if(data->change.url_alloc) {
/* the already set URL is allocated, free it first! */
- free(data->change.url);
- data->change.url_alloc=FALSE;
+ Curl_safefree(data->change.url);
+ data->change.url_alloc = FALSE;
}
result = setstropt(&data->set.str[STRING_SET_URL],
va_arg(param, char *));
@@ -1710,6 +1654,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.connecttimeout = va_arg(param, long);
break;
+ case CURLOPT_ACCEPTTIMEOUT_MS:
+ /*
+ * The maximum time you allow curl to wait for server connect
+ */
+ data->set.accepttimeout = va_arg(param, long);
+ break;
+
case CURLOPT_USERPWD:
/*
* user:password to use in the operation
@@ -1718,6 +1669,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
&data->set.str[STRING_USERNAME],
&data->set.str[STRING_PASSWORD]);
break;
+
case CURLOPT_USERNAME:
/*
* authentication user name to use in the operation
@@ -1725,6 +1677,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
result = setstropt(&data->set.str[STRING_USERNAME],
va_arg(param, char *));
break;
+
case CURLOPT_PASSWORD:
/*
* authentication password to use in the operation
@@ -1732,6 +1685,23 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
result = setstropt(&data->set.str[STRING_PASSWORD],
va_arg(param, char *));
break;
+
+ case CURLOPT_LOGIN_OPTIONS:
+ /*
+ * authentication options to use in the operation
+ */
+ result = setstropt(&data->set.str[STRING_OPTIONS],
+ va_arg(param, char *));
+ break;
+
+ case CURLOPT_XOAUTH2_BEARER:
+ /*
+ * XOAUTH2 bearer token to use in the operation
+ */
+ result = setstropt(&data->set.str[STRING_BEARER],
+ va_arg(param, char *));
+ break;
+
case CURLOPT_POSTQUOTE:
/*
* List of RAW FTP commands to use after a transfer
@@ -1750,6 +1720,20 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data->set.quote = va_arg(param, struct curl_slist *);
break;
+ case CURLOPT_RESOLVE:
+ /*
+ * List of NAME:[address] names to populate the DNS cache with
+ * Prefix the NAME with dash (-) to _remove_ the name from the cache.
+ *
+ * Names added with this API will remain in the cache until explicitly
+ * removed or the handle is cleaned up.
+ *
+ * This API can remove any name from the DNS cache, but only entries
+ * that aren't actually in use right now will be pruned immediately.
+ */
+ data->set.resolve = va_arg(param, struct curl_slist *);
+ data->change.resolve = data->set.resolve;
+ break;
case CURLOPT_PROGRESSFUNCTION:
/*
* Progress callback function
@@ -1759,8 +1743,20 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->progress.callback = TRUE; /* no longer internal */
else
data->progress.callback = FALSE; /* NULL enforces internal */
+ break;
+
+ case CURLOPT_XFERINFOFUNCTION:
+ /*
+ * Transfer info callback function
+ */
+ data->set.fxferinfo = va_arg(param, curl_xferinfo_callback);
+ if(data->set.fxferinfo)
+ data->progress.callback = TRUE; /* no longer internal */
+ else
+ data->progress.callback = FALSE; /* NULL enforces internal */
break;
+
case CURLOPT_PROGRESSDATA:
/*
* Custom client data to pass to the progress callback
@@ -1972,7 +1968,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Kludgy option to enable CRLF conversions. Subject for removal.
*/
- data->set.crlf = (bool)(0 != va_arg(param, long));
+ data->set.crlf = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_INTERFACE:
@@ -1987,13 +1983,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* Set what local port to bind the socket to when performing an operation.
*/
- data->set.localport = (unsigned short) va_arg(param, long);
+ data->set.localport = curlx_sltous(va_arg(param, long));
break;
case CURLOPT_LOCALPORTRANGE:
/*
* Set number of local ports to try, starting with CURLOPT_LOCALPORT.
*/
- data->set.localportrange = (int) va_arg(param, long);
+ data->set.localportrange = curlx_sltosi(va_arg(param, long));
break;
case CURLOPT_KRBLEVEL:
/*
@@ -2001,41 +1997,95 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
result = setstropt(&data->set.str[STRING_KRB_LEVEL],
va_arg(param, char *));
- data->set.krb = (bool)(NULL != data->set.str[STRING_KRB_LEVEL]);
+ data->set.krb = (NULL != data->set.str[STRING_KRB_LEVEL])?TRUE:FALSE;
+ break;
+ case CURLOPT_GSSAPI_DELEGATION:
+ /*
+ * GSS-API credential delegation
+ */
+ data->set.gssapi_delegation = va_arg(param, long);
break;
case CURLOPT_SSL_VERIFYPEER:
/*
* Enable peer SSL verifying.
*/
- data->set.ssl.verifypeer = va_arg(param, long);
+ data->set.ssl.verifypeer = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_SSL_VERIFYHOST:
/*
- * Enable verification of the CN contained in the peer certificate
+ * Enable verification of the host name in the peer certificate
*/
- data->set.ssl.verifyhost = va_arg(param, long);
+ arg = va_arg(param, long);
+
+ /* Obviously people are not reading documentation and too many thought
+ this argument took a boolean when it wasn't and misused it. We thus ban
+ 1 as a sensible input and we warn about its use. Then we only have the
+ 2 action internally stored as TRUE. */
+
+ if(1 == arg) {
+ failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!");
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ }
+
+ data->set.ssl.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;
- case CURLOPT_CERTINFO:
- data->set.ssl.certinfo = (bool)(0 != va_arg(param, long));
+ case CURLOPT_SSL_FALSESTART:
+ /*
+ * Enable TLS false start.
+ */
+ if(!Curl_ssl_false_start()) {
+ result = CURLE_NOT_BUILT_IN;
+ break;
+ }
+
+ data->set.ssl.falsestart = (0 != va_arg(param, long))?TRUE:FALSE;
break;
+ case CURLOPT_CERTINFO:
+#ifdef have_curlssl_certinfo
+ data->set.ssl.certinfo = (0 != va_arg(param, long))?TRUE:FALSE;
+#else
+ result = CURLE_NOT_BUILT_IN;
#endif
+ break;
+ case CURLOPT_PINNEDPUBLICKEY:
+ /*
+ * 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;
case CURLOPT_CAINFO:
/*
* Set CA info for SSL connection. Specify file name of the CA certificate
@@ -2044,6 +2094,7 @@ 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.
@@ -2051,6 +2102,9 @@ 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:
/*
@@ -2093,7 +2147,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* The application asks not to set any signal() or alarm() handlers,
* even when using a timeout.
*/
- data->set.no_signal = (bool)(0 != va_arg(param, long));
+ data->set.no_signal = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_SHARE:
@@ -2110,8 +2164,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->dns.hostcachetype = HCACHE_NONE;
}
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
if(data->share->cookies == data->cookies)
data->cookies = NULL;
+#endif
+
+ if(data->share->sslsession == data->state.session)
+ data->state.session = NULL;
data->share->dirty--;
@@ -2127,23 +2186,23 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->share->dirty++;
- if(data->share->hostcache) {
- /* use shared host cache, first free the private one if any */
- if(data->dns.hostcachetype == HCACHE_PRIVATE)
- Curl_hash_destroy(data->dns.hostcache);
-
- data->dns.hostcache = data->share->hostcache;
+ if(data->share->specifier & (1<< CURL_LOCK_DATA_DNS)) {
+ /* use shared host cache */
+ data->dns.hostcache = &data->share->hostcache;
data->dns.hostcachetype = HCACHE_SHARED;
}
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
if(data->share->cookies) {
/* use shared cookie list, first free own one if any */
- if(data->cookies)
- Curl_cookie_cleanup(data->cookies);
+ Curl_cookie_cleanup(data->cookies);
/* enable cookies since we now use a share that uses cookies! */
data->cookies = data->share->cookies;
}
#endif /* CURL_DISABLE_HTTP */
+ if(data->share->sslsession) {
+ data->set.ssl.max_ssl_sessions = data->share->max_ssl_sessions;
+ data->state.session = data->share->sslsession;
+ }
Curl_share_unlock(data, CURL_LOCK_DATA_SHARE);
}
@@ -2166,13 +2225,20 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.max_filesize = va_arg(param, long);
break;
+#ifdef USE_SSL
case CURLOPT_USE_SSL:
/*
* Make transfers attempt to use SSL/TLS.
*/
- data->set.ftp_ssl = (curl_usessl)va_arg(param, long);
+ data->set.use_ssl = (curl_usessl)va_arg(param, long);
+ break;
+
+ case CURLOPT_SSL_OPTIONS:
+ arg = va_arg(param, long);
+ data->set.ssl_enable_beast = arg&CURLSSLOPT_ALLOW_BEAST?TRUE:FALSE;
break;
+#endif
case CURLOPT_FTPSSLAUTH:
/*
* Set a specific auth for FTP-SSL transfers.
@@ -2181,7 +2247,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
break;
case CURLOPT_IPRESOLVE:
- data->set.ip_version = va_arg(param, long);
+ data->set.ipver = va_arg(param, long);
break;
case CURLOPT_MAXFILESIZE_LARGE:
@@ -2196,7 +2262,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* Enable or disable TCP_NODELAY, which will disable/enable the Nagle
* algorithm
*/
- data->set.tcp_nodelay = (bool)(0 != va_arg(param, long));
+ data->set.tcp_nodelay = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_FTP_ACCOUNT:
@@ -2205,14 +2271,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
break;
case CURLOPT_IGNORE_CONTENT_LENGTH:
- data->set.ignorecl = (bool)(0 != va_arg(param, long));
+ data->set.ignorecl = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_CONNECT_ONLY:
/*
* No data transfer, set up connection and let application use the socket
*/
- data->set.connect_only = (bool)(0 != va_arg(param, long));
+ data->set.connect_only = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_FTP_ALTERNATIVE_TO_USER:
@@ -2249,8 +2315,23 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.opensocket_client = va_arg(param, void *);
break;
+ case CURLOPT_CLOSESOCKETFUNCTION:
+ /*
+ * close socket callback function: called instead of close()
+ * when shutting down a connection
+ */
+ data->set.fclosesocket = va_arg(param, curl_closesocket_callback);
+ break;
+
+ case CURLOPT_CLOSESOCKETDATA:
+ /*
+ * socket callback data pointer. Might be NULL.
+ */
+ data->set.closesocket_client = va_arg(param, void *);
+ break;
+
case CURLOPT_SSL_SESSIONID_CACHE:
- data->set.ssl.sessionid = (bool)(0 != va_arg(param, long));
+ data->set.ssl.sessionid = (0 != va_arg(param, long))?TRUE:FALSE;
break;
#ifdef USE_LIBSSH2
@@ -2311,14 +2392,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/*
* disable libcurl transfer encoding is used
*/
- data->set.http_te_skip = (bool)(0 == va_arg(param, long));
+ data->set.http_te_skip = (0 == va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_HTTP_CONTENT_DECODING:
/*
* raw data passed to the application when content encoding is used
*/
- data->set.http_ce_skip = (bool)(0 == va_arg(param, long));
+ data->set.http_ce_skip = (0 == va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_NEW_FILE_PERMS:
@@ -2341,7 +2422,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 = (unsigned int) va_arg(param, long);
+ data->set.scope_id = curlx_sltoui(va_arg(param, long));
break;
case CURLOPT_PROTOCOLS:
@@ -2349,7 +2430,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
transfer, which thus helps the app which takes URLs from users or other
external inputs and want to restrict what protocol(s) to deal
with. Defaults to CURLPROTO_ALL. */
- data->set.allowed_protocols = va_arg(param, long) & PROT_EXTMASK;
+ data->set.allowed_protocols = va_arg(param, long);
break;
case CURLOPT_REDIR_PROTOCOLS:
@@ -2357,19 +2438,31 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
to be set in both bitmasks to be allowed to get redirected to. Defaults
to all protocols except FILE and SCP. */
- data->set.redir_protocols = va_arg(param, long) & PROT_EXTMASK;
+ data->set.redir_protocols = va_arg(param, long);
break;
case CURLOPT_MAIL_FROM:
+ /* Set the SMTP mail originator */
result = setstropt(&data->set.str[STRING_MAIL_FROM],
va_arg(param, char *));
break;
+ case CURLOPT_MAIL_AUTH:
+ /* Set the SMTP auth originator */
+ result = setstropt(&data->set.str[STRING_MAIL_AUTH],
+ va_arg(param, char *));
+ break;
+
case CURLOPT_MAIL_RCPT:
- /* get a list of mail recipients */
+ /* Set the list of mail recipients */
data->set.mail_rcpt = va_arg(param, struct curl_slist *);
break;
+ case CURLOPT_SASL_IR:
+ /* Enable/disable SASL initial response */
+ data->set.sasl_ir = (0 != va_arg(param, long)) ? TRUE : FALSE;
+ break;
+
case CURLOPT_RTSP_REQUEST:
{
/*
@@ -2480,7 +2573,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
break;
case CURLOPT_WILDCARDMATCH:
- data->set.wildcardmatch = (bool)(0 != va_arg(param, long));
+ data->set.wildcardmatch = (0 != va_arg(param, long))?TRUE:FALSE;
break;
case CURLOPT_CHUNK_BGN_FUNCTION:
data->set.chunk_bgn = va_arg(param, curl_chunk_bgn_callback);
@@ -2497,9 +2590,71 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
case CURLOPT_FNMATCH_DATA:
data->set.fnmatch_data = va_arg(param, void *);
break;
+#ifdef USE_TLS_SRP
+ case CURLOPT_TLSAUTH_USERNAME:
+ result = setstropt(&data->set.str[STRING_TLSAUTH_USERNAME],
+ va_arg(param, char *));
+ if(data->set.str[STRING_TLSAUTH_USERNAME] && !data->set.ssl.authtype)
+ data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */
+ break;
+ case CURLOPT_TLSAUTH_PASSWORD:
+ result = setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD],
+ va_arg(param, char *));
+ if(data->set.str[STRING_TLSAUTH_USERNAME] && !data->set.ssl.authtype)
+ data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */
+ break;
+ case CURLOPT_TLSAUTH_TYPE:
+ if(strnequal((char *)va_arg(param, char *), "SRP", strlen("SRP")))
+ data->set.ssl.authtype = CURL_TLSAUTH_SRP;
+ else
+ data->set.ssl.authtype = CURL_TLSAUTH_NONE;
+ break;
+#endif
+ case CURLOPT_DNS_SERVERS:
+ result = Curl_set_dns_servers(data, va_arg(param, char *));
+ break;
+ case CURLOPT_DNS_INTERFACE:
+ result = Curl_set_dns_interface(data, va_arg(param, char *));
+ break;
+ case CURLOPT_DNS_LOCAL_IP4:
+ result = Curl_set_dns_local_ip4(data, va_arg(param, char *));
+ break;
+ case CURLOPT_DNS_LOCAL_IP6:
+ result = Curl_set_dns_local_ip6(data, va_arg(param, char *));
+ break;
+
+ case CURLOPT_TCP_KEEPALIVE:
+ data->set.tcp_keepalive = (0 != va_arg(param, long))?TRUE:FALSE;
+ break;
+ case CURLOPT_TCP_KEEPIDLE:
+ data->set.tcp_keepidle = va_arg(param, long);
+ break;
+ case CURLOPT_TCP_KEEPINTVL:
+ data->set.tcp_keepintvl = va_arg(param, long);
+ break;
+ case CURLOPT_SSL_ENABLE_NPN:
+ data->set.ssl_enable_npn = (0 != va_arg(param, long))?TRUE:FALSE;
+ break;
+ case CURLOPT_SSL_ENABLE_ALPN:
+ data->set.ssl_enable_alpn = (0 != va_arg(param, long))?TRUE:FALSE;
+ break;
+
+#ifdef USE_UNIX_SOCKETS
+ case CURLOPT_UNIX_SOCKET_PATH:
+ result = setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH],
+ va_arg(param, char *));
+ break;
+#endif
+
+ case CURLOPT_PATH_AS_IS:
+ data->set.path_as_is = (0 != va_arg(param, long))?TRUE:FALSE;
+ break;
+ case CURLOPT_PIPEWAIT:
+ data->set.pipewait = (0 != va_arg(param, long))?TRUE:FALSE;
+ break;
default:
/* unknown tag and its companion, just ignore: */
- result = CURLE_FAILED_INIT; /* correct this */
+ result = CURLE_UNKNOWN_OPTION;
break;
}
@@ -2511,6 +2666,9 @@ static void conn_free(struct connectdata *conn)
if(!conn)
return;
+ /* possible left-overs from the async name resolvers */
+ Curl_resolver_cancel(conn);
+
/* close the SSL stuff before we close any sockets since they will/may
write to the sockets */
Curl_ssl_close(conn, FIRSTSOCKET);
@@ -2518,18 +2676,30 @@ static void conn_free(struct connectdata *conn)
/* close possibly still open sockets */
if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET])
- sclose(conn->sock[SECONDARYSOCKET]);
+ Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET])
- sclose(conn->sock[FIRSTSOCKET]);
+ Curl_closesocket(conn, conn->sock[FIRSTSOCKET]);
+ if(CURL_SOCKET_BAD != conn->tempsock[0])
+ Curl_closesocket(conn, conn->tempsock[0]);
+ if(CURL_SOCKET_BAD != conn->tempsock[1])
+ Curl_closesocket(conn, conn->tempsock[1]);
+
+#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \
+ defined(NTLM_WB_ENABLED)
+ Curl_ntlm_wb_cleanup(conn);
+#endif
Curl_safefree(conn->user);
Curl_safefree(conn->passwd);
+ Curl_safefree(conn->xoauth2_bearer);
+ Curl_safefree(conn->options);
Curl_safefree(conn->proxyuser);
Curl_safefree(conn->proxypasswd);
Curl_safefree(conn->allocptr.proxyuserpwd);
Curl_safefree(conn->allocptr.uagent);
Curl_safefree(conn->allocptr.userpwd);
Curl_safefree(conn->allocptr.accept_encoding);
+ Curl_safefree(conn->allocptr.te);
Curl_safefree(conn->allocptr.rangeline);
Curl_safefree(conn->allocptr.ref);
Curl_safefree(conn->allocptr.host);
@@ -2542,23 +2712,27 @@ static void conn_free(struct connectdata *conn)
Curl_llist_destroy(conn->send_pipe, NULL);
Curl_llist_destroy(conn->recv_pipe, NULL);
- Curl_llist_destroy(conn->pend_pipe, NULL);
- Curl_llist_destroy(conn->done_pipe, NULL);
- /* possible left-overs from the async name resolvers */
-#if defined(CURLRES_THREADED)
- Curl_destroy_thread_data(&conn->async);
-#elif defined(CURLRES_ASYNCH)
- Curl_safefree(conn->async.hostname);
- Curl_safefree(conn->async.os_specific);
-#endif
+ conn->send_pipe = NULL;
+ conn->recv_pipe = NULL;
+ Curl_safefree(conn->localdev);
Curl_free_ssl_config(&conn->ssl_config);
free(conn); /* free all the connection oriented data */
}
-CURLcode Curl_disconnect(struct connectdata *conn)
+/*
+ * 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;
if(!conn)
@@ -2566,7 +2740,7 @@ CURLcode Curl_disconnect(struct connectdata *conn)
data = conn->data;
if(!data) {
- DEBUGF(infof(data, "DISCONNECT without easy handle, ignoring\n"));
+ DEBUGF(fprintf(stderr, "DISCONNECT without easy handle, ignoring\n"));
return CURLE_OK;
}
@@ -2575,61 +2749,22 @@ CURLcode Curl_disconnect(struct connectdata *conn)
conn->dns_entry = NULL;
}
-#if defined(DEBUGBUILD) && defined(AGGRESIVE_TEST)
- /* scan for DNS cache entries still marked as in use */
- Curl_hash_apply(data->hostcache,
- NULL, Curl_scan_cache_used);
-#endif
-
Curl_hostcache_prune(data); /* kill old DNS cache entries */
- {
- 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;
-
- Curl_ntlm_cleanup(conn);
- }
- }
-
- /* Cleanup possible redirect junk */
- if(data->req.newurl) {
- free(data->req.newurl);
- data->req.newurl = NULL;
- }
+#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM)
+ /* Cleanup NTLM connection-related data */
+ Curl_http_ntlm_cleanup(conn);
+#endif
if(conn->handler->disconnect)
/* This is set if protocol-specific cleanups should be made */
- conn->handler->disconnect(conn);
+ conn->handler->disconnect(conn, dead_connection);
- if(-1 != conn->connectindex) {
/* unlink ourselves! */
- infof(data, "Closing connection #%ld\n", conn->connectindex);
- if(data->state.connc)
- /* only clear the table entry if we still know in which cache we
- used to be in */
- data->state.connc->connects[conn->connectindex] = NULL;
- }
+ infof(data, "Closing connection %ld\n", conn->connection_id);
+ Curl_conncache_remove_conn(data->state.conn_cache, conn);
-#ifdef USE_LIBIDN
+#if defined(USE_LIBIDN)
if(conn->host.encalloc)
idn_free(conn->host.encalloc); /* encoded host name buffer, must be freed
with idn_free() since this was allocated
@@ -2638,20 +2773,24 @@ CURLcode Curl_disconnect(struct connectdata *conn)
idn_free(conn->proxy.encalloc); /* encoded proxy name buffer, must be
freed with idn_free() since this was
allocated by libidn */
+#elif defined(USE_WIN32_IDN)
+ free(conn->host.encalloc); /* encoded host name buffer, must be freed with
+ idn_free() since this was allocated by
+ curl_win32_idn_to_ascii */
+ free(conn->proxy.encalloc); /* encoded proxy name buffer, must be freed
+ with idn_free() since this was allocated by
+ curl_win32_idn_to_ascii */
#endif
Curl_ssl_close(conn, FIRSTSOCKET);
/* Indicate to all handles on the pipe that we're dead */
- if(Curl_isPipeliningEnabled(data)) {
+ if(Curl_pipeline_wanted(data->multi, CURLPIPE_ANY)) {
signalPipeClose(conn->send_pipe, TRUE);
signalPipeClose(conn->recv_pipe, TRUE);
- signalPipeClose(conn->pend_pipe, TRUE);
- signalPipeClose(conn->done_pipe, FALSE);
}
conn_free(conn);
- data->state.current_conn = NULL;
return CURLE_OK;
}
@@ -2674,75 +2813,31 @@ static bool SocketIsDead(curl_socket_t sock)
return ret_val;
}
-#ifndef CURL_DISABLE_RTSP
/*
- * The server may send us RTP data at any point, and RTSPREQ_RECEIVE does not
- * want to block the application forever while receiving a stream. Therefore,
- * we cannot assume that an RTSP socket is dead just because it is readable.
- *
- * Instead, if it is readable, run Curl_getconnectinfo() to peek at the socket
- * and distinguish between closed and data.
+ * IsPipeliningPossible() returns TRUE if the options set would allow
+ * pipelining/multiplexing and the connection is using a HTTP protocol.
*/
-static bool RTSPConnIsDead(struct connectdata *check)
+static bool IsPipeliningPossible(const struct SessionHandle *handle,
+ const struct connectdata *conn)
{
- int sval;
- bool ret_val = TRUE;
+ /* If a HTTP protocol and pipelining is enabled */
+ if(conn->handler->protocol & PROTO_FAMILY_HTTP) {
+
+ if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) &&
+ (handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
+ (handle->set.httpreq == HTTPREQ_GET ||
+ handle->set.httpreq == HTTPREQ_HEAD))
+ /* didn't ask for HTTP/1.0 and a GET or HEAD */
+ return TRUE;
- sval = Curl_socket_ready(check->sock[FIRSTSOCKET], CURL_SOCKET_BAD, 0);
- if(sval == 0) {
- /* timeout */
- ret_val = FALSE;
- }
- else if (sval & CURL_CSELECT_ERR) {
- /* socket is in an error state */
- ret_val = TRUE;
- }
- else if (sval & CURL_CSELECT_IN) {
- /* readable with no error. could be closed or could be alive */
- curl_socket_t connectinfo =
- Curl_getconnectinfo(check->data, &check);
- if(connectinfo != CURL_SOCKET_BAD)
- ret_val = FALSE;
+ if(Curl_pipeline_wanted(handle->multi, CURLPIPE_MULTIPLEX) &&
+ (handle->set.httpversion == CURL_HTTP_VERSION_2_0))
+ /* allows HTTP/2 */
+ return TRUE;
}
-
- return ret_val;
-}
-#endif /* CURL_DISABLE_RTSP */
-
-static bool IsPipeliningPossible(const struct SessionHandle *handle)
-{
- if(handle->multi && Curl_multi_canPipeline(handle->multi) &&
- (handle->set.httpreq == HTTPREQ_GET ||
- handle->set.httpreq == HTTPREQ_HEAD) &&
- handle->set.httpversion != CURL_HTTP_VERSION_1_0)
- return TRUE;
-
- return FALSE;
-}
-
-bool Curl_isPipeliningEnabled(const struct SessionHandle *handle)
-{
- if(handle->multi && Curl_multi_canPipeline(handle->multi))
- return TRUE;
-
return FALSE;
}
-CURLcode Curl_addHandleToPipeline(struct SessionHandle *data,
- struct curl_llist *pipeline)
-{
-#ifdef DEBUGBUILD
- if(!IsPipeliningPossible(data)) {
- /* when not pipelined, there MUST be no handle in the list already */
- if(pipeline->head)
- infof(data, "PIPE when no PIPE supposed!\n");
- }
-#endif
- if(!Curl_llist_insert_next(pipeline, pipeline->tail, data))
- return CURLE_OUT_OF_MEMORY;
- return CURLE_OK;
-}
-
int Curl_removeHandleFromPipeline(struct SessionHandle *handle,
struct curl_llist *pipeline)
{
@@ -2789,18 +2884,15 @@ static struct SessionHandle* gethandleathead(struct curl_llist *pipeline)
void Curl_getoff_all_pipelines(struct SessionHandle *data,
struct connectdata *conn)
{
- bool recv_head = (bool)(conn->readchannel_inuse &&
- (gethandleathead(conn->recv_pipe) == data));
-
- bool send_head = (bool)(conn->writechannel_inuse &&
- (gethandleathead(conn->send_pipe) == data));
+ bool recv_head = (conn->readchannel_inuse &&
+ Curl_recvpipe_head(data, conn));
+ bool send_head = (conn->writechannel_inuse &&
+ Curl_sendpipe_head(data, conn));
if(Curl_removeHandleFromPipeline(data, conn->recv_pipe) && recv_head)
- conn->readchannel_inuse = FALSE;
+ Curl_pipeline_leave_read(conn);
if(Curl_removeHandleFromPipeline(data, conn->send_pipe) && send_head)
- conn->writechannel_inuse = FALSE;
- Curl_removeHandleFromPipeline(data, conn->pend_pipe);
- Curl_removeHandleFromPipeline(data, conn->done_pipe);
+ Curl_pipeline_leave_write(conn);
}
static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
@@ -2822,14 +2914,176 @@ static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
}
#endif
- if (pipe_broke)
- data->state.pipe_broke = TRUE;
+ if(pipe_broke)
+ data->state.pipe_broke = TRUE;
Curl_multi_handlePipeBreak(data);
Curl_llist_remove(pipeline, curr, NULL);
curr = next;
}
}
+/*
+ * This function finds the connection in the connection
+ * cache that has been unused for the longest time.
+ *
+ * Returns the pointer to the oldest idle connection, or NULL if none was
+ * found.
+ */
+static struct connectdata *
+find_oldest_idle_connection(struct SessionHandle *data)
+{
+ struct conncache *bc = data->state.conn_cache;
+ struct curl_hash_iterator iter;
+ struct curl_llist_element *curr;
+ struct curl_hash_element *he;
+ long highscore=-1;
+ long score;
+ struct timeval now;
+ struct connectdata *conn_candidate = NULL;
+ struct connectbundle *bundle;
+
+ now = Curl_tvnow();
+
+ Curl_hash_start_iterate(&bc->hash, &iter);
+
+ he = Curl_hash_next_element(&iter);
+ while(he) {
+ struct connectdata *conn;
+
+ bundle = he->ptr;
+
+ curr = bundle->conn_list->head;
+ while(curr) {
+ conn = curr->ptr;
+
+ if(!conn->inuse) {
+ /* Set higher score for the age passed since the connection was used */
+ score = Curl_tvdiff(now, conn->now);
+
+ if(score > highscore) {
+ highscore = score;
+ conn_candidate = conn;
+ }
+ }
+ curr = curr->next;
+ }
+
+ he = Curl_hash_next_element(&iter);
+ }
+
+ return conn_candidate;
+}
+
+/*
+ * This function finds the connection in the connection
+ * bundle that has been unused for the longest time.
+ *
+ * Returns the pointer to the oldest idle connection, or NULL if none was
+ * found.
+ */
+static struct connectdata *
+find_oldest_idle_connection_in_bundle(struct SessionHandle *data,
+ struct connectbundle *bundle)
+{
+ struct curl_llist_element *curr;
+ long highscore=-1;
+ long score;
+ struct timeval now;
+ struct connectdata *conn_candidate = NULL;
+ struct connectdata *conn;
+
+ (void)data;
+
+ now = Curl_tvnow();
+
+ curr = bundle->conn_list->head;
+ while(curr) {
+ conn = curr->ptr;
+
+ if(!conn->inuse) {
+ /* Set higher score for the age passed since the connection was used */
+ score = Curl_tvdiff(now, conn->now);
+
+ if(score > highscore) {
+ highscore = score;
+ conn_candidate = conn;
+ }
+ }
+ curr = curr->next;
+ }
+
+ return conn_candidate;
+}
+
+/*
+ * 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;
+ }
+}
+
+
+static size_t max_pipeline_length(struct Curl_multi *multi)
+{
+ return multi ? multi->max_pipeline_length : 0;
+}
+
/*
* Given one filled in connection struct (named needle), this function should
@@ -2839,302 +3093,359 @@ static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
* If there is a match, this function returns TRUE - and has marked the
* connection as 'in-use'. It must later be called with ConnectionDone() to
* return back to 'idle' (unused) state.
+ *
+ * The force_reuse flag is set if the connection must be used, even if
+ * the pipelining strategy wants to open a new connection instead of reusing.
*/
static bool
ConnectionExists(struct SessionHandle *data,
struct connectdata *needle,
- struct connectdata **usethis)
+ struct connectdata **usethis,
+ bool *force_reuse,
+ bool *waitpipe)
{
- long i;
struct connectdata *check;
- bool canPipeline = IsPipeliningPossible(data);
+ struct connectdata *chosen = 0;
+ bool canPipeline = IsPipeliningPossible(data, needle);
+#ifdef USE_NTLM
+ bool wantNTLMhttp = ((data->state.authhost.want & CURLAUTH_NTLM) ||
+ (data->state.authhost.want & CURLAUTH_NTLM_WB)) &&
+ (needle->handler->protocol & PROTO_FAMILY_HTTP) ? TRUE : FALSE;
+#endif
+ struct connectbundle *bundle;
- for(i=0; i< data->state.connc->num; i++) {
- bool match = FALSE;
- size_t pipeLen = 0;
- /*
- * Note that if we use a HTTP proxy, we check connections to that
- * proxy and not to the actual remote server.
- */
- check = data->state.connc->connects[i];
- if(!check)
- /* NULL pointer means not filled-in entry */
- continue;
+ *force_reuse = FALSE;
+ *waitpipe = FALSE;
- pipeLen = check->send_pipe->size + check->recv_pipe->size;
+ /* We can't pipe if the site is blacklisted */
+ if(canPipeline && Curl_pipeline_site_blacklisted(data, needle)) {
+ canPipeline = FALSE;
+ }
- if(check->connectindex == -1) {
- check->connectindex = i; /* Set this appropriately since it might have
- been set to -1 when the easy was removed
- from the multi */
- }
+ /* Look up the bundle with all the connections to this
+ particular host */
+ bundle = Curl_conncache_find_bundle(needle, data->state.conn_cache);
+ if(bundle) {
+ /* Max pipe length is zero (unlimited) for multiplexed connections */
+ size_t max_pipe_len = (bundle->multiuse != BUNDLE_MULTIPLEX)?
+ max_pipeline_length(data->multi):0;
+ size_t best_pipe_len = max_pipe_len;
+ struct curl_llist_element *curr;
- 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;
-#ifndef CURL_DISABLE_RTSP
- if(check->protocol & PROT_RTSP)
- /* RTSP is a special case due to RTP interleaving */
- dead = RTSPConnIsDead(check);
- else
-#endif /*CURL_DISABLE_RTSP*/
- dead = SocketIsDead(check->sock[FIRSTSOCKET]);
+ infof(data, "Found bundle for host %s: %p\n",
+ needle->host.name, (void *)bundle);
- if(dead) {
- check->data = data;
- infof(data, "Connection #%ld seems to be dead!\n", i);
+ /* We can't pipe if we don't know anything about the server */
+ if(canPipeline) {
+ if(bundle->multiuse <= BUNDLE_UNKNOWN) {
+ if((bundle->multiuse == BUNDLE_UNKNOWN) && data->set.pipewait) {
+ infof(data, "Server doesn't support multi-use yet, wait\n");
+ *waitpipe = TRUE;
+ return FALSE; /* no re-use */
+ }
- Curl_disconnect(check); /* disconnect resources */
- data->state.connc->connects[i]=NULL; /* nothing here */
+ infof(data, "Server doesn't support multi-use (yet)\n");
+ canPipeline = FALSE;
+ }
+ }
+ curr = bundle->conn_list->head;
+ while(curr) {
+ bool match = FALSE;
+#if defined(USE_NTLM)
+ bool credentialsMatch = FALSE;
+#endif
+ size_t pipeLen;
+
+ /*
+ * Note that if we use a HTTP proxy, we check connections to that
+ * proxy and not to the actual remote server.
+ */
+ check = curr->ptr;
+ curr = curr->next;
+
+ if(disconnect_if_dead(check, data))
continue;
+
+ pipeLen = check->send_pipe->size + check->recv_pipe->size;
+
+ if(canPipeline) {
+
+ if(!check->bits.multiplex) {
+ /* If not multiplexing, make sure the pipe has only GET requests */
+ struct SessionHandle* sh = gethandleathead(check->send_pipe);
+ struct SessionHandle* rh = gethandleathead(check->recv_pipe);
+ if(sh) {
+ if(!IsPipeliningPossible(sh, check))
+ continue;
+ }
+ else if(rh) {
+ if(!IsPipeliningPossible(rh, check))
+ continue;
+ }
+ }
}
- }
+ else {
+ if(pipeLen > 0) {
+ /* can only happen within multi handles, and means that another easy
+ handle is using this connection */
+ continue;
+ }
- if(canPipeline) {
- /* Make sure the pipe has only GET requests */
- struct SessionHandle* sh = gethandleathead(check->send_pipe);
- struct SessionHandle* rh = gethandleathead(check->recv_pipe);
- if(sh) {
- if(!IsPipeliningPossible(sh))
+ if(Curl_resolver_asynch()) {
+ /* ip_addr_str[0] is NUL only if the resolving of the name hasn't
+ completed yet and until then we don't re-use this connection */
+ if(!check->ip_addr_str[0]) {
+ infof(data,
+ "Connection #%ld is still name resolving, can't reuse\n",
+ check->connection_id);
+ continue;
+ }
+ }
+
+ if((check->sock[FIRSTSOCKET] == CURL_SOCKET_BAD) ||
+ check->bits.close) {
+ /* Don't pick a connection that hasn't connected yet or that is going
+ to get closed. */
+ infof(data, "Connection #%ld isn't open enough, can't reuse\n",
+ check->connection_id);
+#ifdef DEBUGBUILD
+ if(check->recv_pipe->size > 0) {
+ infof(data,
+ "BAD! Unconnected #%ld has a non-empty recv pipeline!\n",
+ check->connection_id);
+ }
+#endif
continue;
+ }
}
- else if(rh) {
- if(!IsPipeliningPossible(rh))
+
+ if((needle->handler->flags&PROTOPT_SSL) !=
+ (check->handler->flags&PROTOPT_SSL))
+ /* don't do mixed SSL and non-SSL connections */
+ if(!(needle->handler->protocol & check->handler->protocol))
+ /* except protocols that have been upgraded via TLS */
continue;
- }
-#ifdef DEBUGBUILD
- if(pipeLen > MAX_PIPELINE_LENGTH) {
- infof(data, "BAD! Connection #%ld has too big pipeline!\n",
- check->connectindex);
+ if(needle->handler->flags&PROTOPT_SSL) {
+ if((data->set.ssl.verifypeer != check->verifypeer) ||
+ (data->set.ssl.verifyhost != check->verifyhost))
+ continue;
}
-#endif
- }
- else {
- if(pipeLen > 0) {
- /* can only happen within multi handles, and means that another easy
- handle is using this connection */
+
+ if(needle->bits.proxy != check->bits.proxy)
+ /* don't do mixed proxy and non-proxy connections */
continue;
- }
-#ifdef CURLRES_ASYNCH
- /* ip_addr_str[0] is NUL only if the resolving of the name hasn't
- completed yet and until then we don't re-use this connection */
- if(!check->ip_addr_str[0]) {
- infof(data,
- "Connection #%ld hasn't finished name resolve, can't reuse\n",
- check->connectindex);
+ if(!canPipeline && check->inuse)
+ /* this request can't be pipelined but the checked connection is
+ already in use so we skip it */
continue;
+
+ if(needle->localdev || needle->localport) {
+ /* If we are bound to a specific local end (IP+port), we must not
+ re-use a random other one, although if we didn't ask for a
+ particular one we can reuse one that was bound.
+
+ This comparison is a bit rough and too strict. Since the input
+ parameters can be specified in numerous ways and still end up the
+ same it would take a lot of processing to make it really accurate.
+ Instead, this matching will assume that re-uses of bound connections
+ will most likely also re-use the exact same binding parameters and
+ missing out a few edge cases shouldn't hurt anyone very much.
+ */
+ if((check->localport != needle->localport) ||
+ (check->localportrange != needle->localportrange) ||
+ !check->localdev ||
+ !needle->localdev ||
+ strcmp(check->localdev, needle->localdev))
+ continue;
}
-#endif
- if((check->sock[FIRSTSOCKET] == CURL_SOCKET_BAD) || check->bits.close) {
- /* Don't pick a connection that hasn't connected yet or that is going
- to get closed. */
- infof(data, "Connection #%ld isn't open enough, can't reuse\n",
- check->connectindex);
-#ifdef DEBUGBUILD
- if(check->recv_pipe->size > 0) {
- infof(data, "BAD! Unconnected #%ld has a non-empty recv pipeline!\n",
- check->connectindex);
+ if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST))
+#ifdef USE_NTLM
+ || (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)
+#endif
+ ) {
+ /* 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) ||
+ !strequal(needle->passwd, check->passwd)) {
+ /* one of them was different */
+ continue;
}
+#if defined(USE_NTLM)
+ credentialsMatch = TRUE;
#endif
- continue;
}
- }
- if((needle->protocol&PROT_SSL) != (check->protocol&PROT_SSL))
- /* don't do mixed SSL and non-SSL connections */
- continue;
+ if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL ||
+ (needle->bits.httpproxy && check->bits.httpproxy &&
+ needle->bits.tunnel_proxy && check->bits.tunnel_proxy &&
+ Curl_raw_equal(needle->proxy.name, check->proxy.name) &&
+ (needle->port == check->port))) {
+ /* The requested connection does not use a HTTP proxy or it uses SSL or
+ it is a non-SSL protocol tunneled over the same http proxy name and
+ port number or it is a non-SSL protocol which is allowed to be
+ upgraded via TLS */
+
+ if((Curl_raw_equal(needle->handler->scheme, check->handler->scheme) ||
+ needle->handler->protocol & check->handler->protocol) &&
+ Curl_raw_equal(needle->host.name, check->host.name) &&
+ needle->remote_port == check->remote_port) {
+ if(needle->handler->flags & PROTOPT_SSL) {
+ /* This is a SSL connection so verify that we're using the same
+ SSL options as well */
+ if(!Curl_ssl_config_matches(&needle->ssl_config,
+ &check->ssl_config)) {
+ DEBUGF(infof(data,
+ "Connection #%ld has different SSL parameters, "
+ "can't reuse\n",
+ check->connection_id));
+ continue;
+ }
+ else if(check->ssl[FIRSTSOCKET].state != ssl_connection_complete) {
+ DEBUGF(infof(data,
+ "Connection #%ld has not started SSL connect, "
+ "can't reuse\n",
+ check->connection_id));
+ continue;
+ }
+ }
+ match = TRUE;
+ }
+ }
+ else { /* The requested needle connection is using a proxy,
+ is the checked one using the same host, port and type? */
+ if(check->bits.proxy &&
+ (needle->proxytype == check->proxytype) &&
+ (needle->bits.tunnel_proxy == check->bits.tunnel_proxy) &&
+ Curl_raw_equal(needle->proxy.name, check->proxy.name) &&
+ needle->port == check->port) {
+ /* This is the same proxy connection, use it! */
+ match = TRUE;
+ }
+ }
- if(needle->protocol&PROT_SSL) {
- if((data->set.ssl.verifypeer != check->verifypeer) ||
- (data->set.ssl.verifyhost != check->verifyhost))
- continue;
- }
+ 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
+ possible. (Especially we must not reuse the same connection if
+ partway through a handshake!) */
+ if(wantNTLMhttp) {
+ if(credentialsMatch && check->ntlm.state != NTLMSTATE_NONE) {
+ chosen = check;
+
+ /* We must use this connection, no other */
+ *force_reuse = TRUE;
+ break;
+ }
+ else if(credentialsMatch)
+ /* this is a backup choice */
+ chosen = check;
+ continue;
+ }
+#endif
- if(needle->bits.proxy != check->bits.proxy)
- /* don't do mixed proxy and non-proxy connections */
- continue;
-
- if(!canPipeline && check->inuse)
- /* this request can't be pipelined but the checked connection is already
- in use so we skip it */
- continue;
-
- if(!needle->bits.httpproxy || needle->protocol&PROT_SSL ||
- (needle->bits.httpproxy && check->bits.httpproxy &&
- needle->bits.tunnel_proxy && check->bits.tunnel_proxy &&
- Curl_raw_equal(needle->proxy.name, check->proxy.name) &&
- (needle->port == check->port))) {
- /* The requested connection does not use a HTTP proxy or it uses SSL or
- it is a non-SSL protocol tunneled over the same http proxy name and
- port number */
-
- if(Curl_raw_equal(needle->handler->scheme, check->handler->scheme) &&
- Curl_raw_equal(needle->host.name, check->host.name) &&
- (needle->remote_port == check->remote_port) ) {
- if(needle->protocol & PROT_SSL) {
- /* This is SSL, verify that we're using the same
- ssl options as well */
- if(!Curl_ssl_config_matches(&needle->ssl_config,
- &check->ssl_config)) {
- DEBUGF(infof(data,
- "Connection #%ld has different SSL parameters, "
- "can't reuse\n",
- check->connectindex));
- continue;
+ if(canPipeline) {
+ /* We can pipeline if we want to. Let's continue looking for
+ the optimal connection to use, i.e the shortest pipe that is not
+ blacklisted. */
+
+ if(pipeLen == 0) {
+ /* We have the optimal connection. Let's stop looking. */
+ chosen = check;
+ break;
}
- else if(check->ssl[FIRSTSOCKET].state != ssl_connection_complete) {
- DEBUGF(infof(data,
- "Connection #%ld has not started ssl connect, "
- "can't reuse\n",
- check->connectindex));
+
+ /* We can't use the connection if the pipe is full */
+ if(max_pipe_len && (pipeLen >= max_pipe_len)) {
+ infof(data, "Pipe is full, skip (%zu)\n", pipeLen);
continue;
}
- }
- if((needle->protocol & PROT_FTP) ||
- ((needle->protocol & PROT_HTTP) &&
- (data->state.authhost.want==CURLAUTH_NTLM))) {
- /* This is FTP or HTTP+NTLM, verify that we're using the same name
- and password as well */
- if(!strequal(needle->user, check->user) ||
- !strequal(needle->passwd, check->passwd)) {
- /* one of them was different */
+#ifdef USE_NGHTTP2
+ /* If multiplexed, make sure we don't go over concurrency limit */
+ if(check->bits.multiplex) {
+ /* Multiplexed connections can only be HTTP/2 for now */
+ struct http_conn *httpc = &check->proto.httpc;
+ if(pipeLen >= httpc->settings.max_concurrent_streams) {
+ infof(data, "MAX_CONCURRENT_STREAMS reached, skip (%zu)\n",
+ pipeLen);
+ continue;
+ }
+ }
+#endif
+ /* We can't use the connection if the pipe is penalized */
+ if(Curl_pipeline_penalized(data, check)) {
+ infof(data, "Penalized, skip\n");
continue;
}
+
+ if(max_pipe_len) {
+ if(pipeLen < best_pipe_len) {
+ /* This connection has a shorter pipe so far. We'll pick this
+ and continue searching */
+ chosen = check;
+ best_pipe_len = pipeLen;
+ continue;
+ }
+ }
+ else {
+ /* When not pipelining (== multiplexed), we have a match here! */
+ chosen = check;
+ infof(data, "Multiplexed connection found!\n");
+ break;
+ }
+ }
+ else {
+ /* We have found a connection. Let's stop searching. */
+ chosen = check;
+ break;
}
- match = TRUE;
- }
- }
- else { /* The requested needle connection is using a proxy,
- is the checked one using the same host, port and type? */
- if(check->bits.proxy &&
- (needle->proxytype == check->proxytype) &&
- (needle->bits.tunnel_proxy == check->bits.tunnel_proxy) &&
- Curl_raw_equal(needle->proxy.name, check->proxy.name) &&
- needle->port == check->port) {
- /* This is the same proxy connection, use it! */
- match = TRUE;
}
}
+ }
- if(match) {
- check->inuse = TRUE; /* mark this as being in use so that no other
- handle in a multi stack may nick it */
-
- *usethis = check;
- return TRUE; /* yes, we found one to use! */
- }
+ if(chosen) {
+ *usethis = chosen;
+ return TRUE; /* yes, we found one to use! */
}
return FALSE; /* no matching connecting exists */
}
-
-
-/*
- * This function frees/closes a connection in the connection cache. This
- * should take the previously set policy into account when deciding which
- * of the connections to kill.
- */
-static long
-ConnectionKillOne(struct SessionHandle *data)
+/* Mark the connection as 'idle', or close it if the cache is full.
+ Returns TRUE if the connection is kept, or FALSE if it was closed. */
+static bool
+ConnectionDone(struct SessionHandle *data, struct connectdata *conn)
{
- long i;
- struct connectdata *conn;
- long highscore=-1;
- long connindex=-1;
- long score;
- struct timeval now;
+ /* data->multi->maxconnects can be negative, deal with it. */
+ size_t maxconnects =
+ (data->multi->maxconnects < 0) ? data->multi->num_easy * 4:
+ data->multi->maxconnects;
+ struct connectdata *conn_candidate = NULL;
- now = Curl_tvnow();
+ /* Mark the current connection as 'unused' */
+ conn->inuse = FALSE;
- for(i=0; data->state.connc && (i< data->state.connc->num); i++) {
- conn = data->state.connc->connects[i];
+ if(maxconnects > 0 &&
+ data->state.conn_cache->num_connections > maxconnects) {
+ infof(data, "Connection cache is full, closing the oldest one.\n");
- if(!conn || conn->inuse)
- continue;
+ conn_candidate = find_oldest_idle_connection(data);
- /* Set higher score for the age passed since the connection was used */
- score = Curl_tvdiff(now, conn->now);
+ if(conn_candidate) {
+ /* Set the connection's owner correctly */
+ conn_candidate->data = data;
- if(score > highscore) {
- highscore = score;
- connindex = i;
+ /* the winner gets the honour of being disconnected */
+ (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE);
}
}
- if(connindex >= 0) {
- /* Set the connection's owner correctly */
- conn = data->state.connc->connects[connindex];
- conn->data = data;
-
- /* the winner gets the honour of being disconnected */
- (void)Curl_disconnect(conn);
-
- /* clean the array entry */
- data->state.connc->connects[connindex] = NULL;
- }
-
- return connindex; /* return the available index or -1 */
-}
-
-/* this connection can now be marked 'idle' */
-static void
-ConnectionDone(struct connectdata *conn)
-{
- conn->inuse = FALSE;
-}
-
-/*
- * The given input connection struct pointer is to be stored. If the "cache"
- * is already full, we must clean out the most suitable using the previously
- * set policy.
- *
- * The given connection should be unique. That must've been checked prior to
- * this call.
- */
-static long
-ConnectionStore(struct SessionHandle *data,
- struct connectdata *conn)
-{
- long i;
- for(i=0; i< data->state.connc->num; i++) {
- if(!data->state.connc->connects[i])
- break;
- }
- if(i == data->state.connc->num) {
- /* there was no room available, kill one */
- i = ConnectionKillOne(data);
- if(-1 != i)
- infof(data, "Connection (#%ld) was killed to make room (holds %ld)\n",
- i, data->state.connc->num);
- else
- infof(data, "This connection did not fit in the connection cache\n");
- }
-
- conn->connectindex = i; /* Make the child know where the pointer to this
- particular data is stored. But note that this -1
- if this is not within the cache and this is
- probably not checked for everywhere (yet). */
- conn->inuse = TRUE;
- if(-1 != i) {
- /* Only do this if a true index was returned, if -1 was returned there
- is no room in the cache for an unknown reason and we cannot store
- this there.
-
- TODO: make sure we really can work with more handles than positions in
- the cache, or possibly we should (allow to automatically) resize the
- connection cache when we add more easy handles to a multi handle!
- */
- data->state.connc->connects[i] = conn; /* fill in this */
- conn->data = data;
- }
- return i;
+ return (conn_candidate == conn) ? FALSE : TRUE;
}
/* after a TCP connection to the proxy has been verified, this function does
@@ -3143,27 +3454,30 @@ ConnectionStore(struct SessionHandle *data,
Note: this function's sub-functions call failf()
*/
-CURLcode Curl_connected_proxy(struct connectdata *conn)
+CURLcode Curl_connected_proxy(struct connectdata *conn,
+ int sockindex)
{
- CURLcode result = CURLE_OK;
- struct SessionHandle *data = conn->data;
+ if(!conn->bits.proxy || sockindex)
+ /* this magic only works for the primary socket as the secondary is used
+ for FTP only and it has FTP specific magic in ftp.c */
+ return CURLE_OK;
- switch(data->set.proxytype) {
+ switch(conn->proxytype) {
#ifndef CURL_DISABLE_PROXY
case CURLPROXY_SOCKS5:
case CURLPROXY_SOCKS5_HOSTNAME:
- result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd,
- conn->host.name, conn->remote_port,
- FIRSTSOCKET, conn);
- break;
+ return Curl_SOCKS5(conn->proxyuser, conn->proxypasswd,
+ conn->host.name, conn->remote_port,
+ FIRSTSOCKET, conn);
+
case CURLPROXY_SOCKS4:
- result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
- conn->remote_port, FIRSTSOCKET, conn, FALSE);
- break;
+ return Curl_SOCKS4(conn->proxyuser, conn->host.name,
+ conn->remote_port, FIRSTSOCKET, conn, FALSE);
+
case CURLPROXY_SOCKS4A:
- result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
- conn->remote_port, FIRSTSOCKET, conn, TRUE);
- break;
+ return Curl_SOCKS4(conn->proxyuser, conn->host.name,
+ conn->remote_port, FIRSTSOCKET, conn, TRUE);
+
#endif /* CURL_DISABLE_PROXY */
case CURLPROXY_HTTP:
case CURLPROXY_HTTP_1_0:
@@ -3173,45 +3487,7 @@ CURLcode Curl_connected_proxy(struct connectdata *conn)
break;
} /* switch proxytype */
- return result;
-}
-
-static CURLcode ConnectPlease(struct SessionHandle *data,
- struct connectdata *conn,
- bool *connected)
-{
- CURLcode result;
- Curl_addrinfo *addr;
-#ifndef CURL_DISABLE_VERBOSE_STRINGS
- char *hostname = conn->bits.proxy?conn->proxy.name:conn->host.name;
-
- infof(data, "About to connect() to %s%s port %ld (#%ld)\n",
- conn->bits.proxy?"proxy ":"",
- hostname, conn->port, conn->connectindex);
-#else
- (void)data;
-#endif
-
- /*************************************************************
- * Connect to server/proxy
- *************************************************************/
- result= Curl_connecthost(conn,
- conn->dns_entry,
- &conn->sock[FIRSTSOCKET],
- &addr,
- connected);
- if(CURLE_OK == result) {
- /* All is cool, we store the current information */
- conn->ip_addr = addr;
-
- if(*connected)
- result = Curl_connected_proxy(conn);
- }
-
- if(result)
- *connected = FALSE; /* mark it as not connected */
-
- return result;
+ return CURLE_OK;
}
/*
@@ -3223,7 +3499,7 @@ void Curl_verboseconnect(struct connectdata *conn)
if(conn->data->set.verbose)
infof(conn->data, "Connected to %s (%s) port %ld (#%ld)\n",
conn->bits.proxy ? conn->proxy.dispname : conn->host.dispname,
- conn->ip_addr_str, conn->port, conn->connectindex);
+ conn->ip_addr_str, conn->port, conn->connection_id);
}
#endif
@@ -3294,11 +3570,10 @@ CURLcode Curl_protocol_connect(struct connectdata *conn,
bool *protocol_done)
{
CURLcode result=CURLE_OK;
- struct SessionHandle *data = conn->data;
*protocol_done = FALSE;
- if(conn->bits.tcpconnect && conn->bits.protoconnstart) {
+ if(conn->bits.tcpconnect[FIRSTSOCKET] && conn->bits.protoconnstart) {
/* We already are connected, get back. This may happen when the connect
worked fine in the first call, like when we connect to a local server
or proxy. Note that we don't know if the protocol is actually done.
@@ -3311,20 +3586,21 @@ CURLcode Curl_protocol_connect(struct connectdata *conn,
return CURLE_OK;
}
- if(!conn->bits.tcpconnect) {
+ if(!conn->bits.protoconnstart) {
- Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */
- Curl_verboseconnect(conn);
- }
+ result = Curl_proxy_connect(conn);
+ if(result)
+ return result;
+
+ if(conn->bits.tunnel_proxy && conn->bits.httpproxy &&
+ (conn->tunnel_state[FIRSTSOCKET] != TUNNEL_COMPLETE))
+ /* when using an HTTP tunnel proxy, await complete tunnel establishment
+ before proceeding further. Return CURLE_OK so we'll be called again */
+ return CURLE_OK;
- if(!conn->bits.protoconnstart) {
if(conn->handler->connect_it) {
/* is there a protocol-specific connect() procedure? */
- /* Set start time here for timeout purposes in the connect procedure, it
- is later set again for the progress meter purpose */
- conn->now = Curl_tvnow();
-
/* Call the protocol-specific connect function */
result = conn->handler->connect_it(conn, protocol_done);
}
@@ -3343,7 +3619,6 @@ CURLcode Curl_protocol_connect(struct connectdata *conn,
/*
* Helpers for IDNA convertions.
*/
-#ifdef USE_LIBIDN
static bool is_ASCII_name(const char *hostname)
{
const unsigned char *ch = (const unsigned char*)hostname;
@@ -3355,6 +3630,7 @@ static bool is_ASCII_name(const char *hostname)
return TRUE;
}
+#ifdef USE_LIBIDN
/*
* Check if characters in hostname is allowed in Top Level Domain.
*/
@@ -3404,6 +3680,8 @@ static bool tld_check_name(struct SessionHandle *data,
static void fix_hostname(struct SessionHandle *data,
struct connectdata *conn, struct hostname *host)
{
+ size_t len;
+
#ifndef USE_LIBIDN
(void)data;
(void)conn;
@@ -3414,19 +3692,25 @@ static void fix_hostname(struct SessionHandle *data,
/* set the name we use to display the host name */
host->dispname = host->name;
+ len = strlen(host->name);
+ if(len && (host->name[len-1] == '.'))
+ /* strip off a single trailing dot if present, primarily for SNI but
+ there's no use for it */
+ host->name[len-1]=0;
+
+ if(!is_ASCII_name(host->name)) {
#ifdef USE_LIBIDN
/*************************************************************
* Check name for non-ASCII and convert hostname to ACE form.
*************************************************************/
- if(!is_ASCII_name(host->name) &&
- stringprep_check_version(LIBIDN_REQUIRED_VERSION)) {
+ if(stringprep_check_version(LIBIDN_REQUIRED_VERSION)) {
char *ace_hostname = NULL;
int rc = idna_to_ascii_lz(host->name, &ace_hostname, 0);
infof (data, "Input domain encoded as `%s'\n",
stringprep_locale_charset ());
if(rc != IDNA_SUCCESS)
infof(data, "Failed to convert %s to ACE; %s\n",
- host->name, Curl_idn_strerror(conn,rc));
+ host->name, Curl_idn_strerror(conn, rc));
else {
/* tld_check_name() displays a warning if the host name contains
"illegal" characters for this TLD */
@@ -3437,17 +3721,39 @@ static void fix_hostname(struct SessionHandle *data,
host->name = host->encalloc;
}
}
+#elif defined(USE_WIN32_IDN)
+ /*************************************************************
+ * Check name for non-ASCII and convert hostname to ACE form.
+ *************************************************************/
+ char *ace_hostname = NULL;
+ int rc = curl_win32_idn_to_ascii(host->name, &ace_hostname);
+ if(rc == 0)
+ infof(data, "Failed to convert %s to ACE;\n",
+ host->name);
+ else {
+ host->encalloc = ace_hostname;
+ /* change the name pointer to point to the encoded hostname */
+ host->name = host->encalloc;
+ }
+#else
+ infof(data, "IDN support not present, can't parse Unicode domains\n");
#endif
+ }
+}
+
+static void llist_dtor(void *user, void *element)
+{
+ (void)user;
+ (void)element;
+ /* Do nothing */
}
/*
* Allocate and initialize a new connectdata object.
*/
-static struct connectdata *allocate_conn(void)
+static struct connectdata *allocate_conn(struct SessionHandle *data)
{
- struct connectdata *conn;
-
- conn = calloc(1, sizeof(struct connectdata));
+ struct connectdata *conn = calloc(1, sizeof(struct connectdata));
if(!conn)
return NULL;
@@ -3459,18 +3765,109 @@ static struct connectdata *allocate_conn(void)
conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
- conn->connectindex = -1; /* no index */
+ conn->tempsock[0] = CURL_SOCKET_BAD; /* no file descriptor */
+ conn->tempsock[1] = CURL_SOCKET_BAD; /* no file descriptor */
+ conn->connection_id = -1; /* no ID */
conn->port = -1; /* unknown at this point */
+ conn->remote_port = -1; /* unknown */
/* Default protocol-independent behavior doesn't support persistent
connections, so we set this to force-close. Protocols that support
this need to set this to FALSE in their "curl_do" functions. */
- conn->bits.close = TRUE;
+ connclose(conn, "Default to force-close");
/* Store creation time to help future close decision making */
conn->created = Curl_tvnow();
+ conn->data = data; /* Setup the association between this connection
+ and the SessionHandle */
+
+ conn->proxytype = data->set.proxytype; /* type */
+
+#ifdef CURL_DISABLE_PROXY
+
+ conn->bits.proxy = FALSE;
+ conn->bits.httpproxy = FALSE;
+ conn->bits.proxy_user_passwd = FALSE;
+ conn->bits.tunnel_proxy = FALSE;
+
+#else /* CURL_DISABLE_PROXY */
+
+ /* note that these two proxy bits are now just on what looks to be
+ requested, they may be altered down the road */
+ conn->bits.proxy = (data->set.str[STRING_PROXY] &&
+ *data->set.str[STRING_PROXY])?TRUE:FALSE;
+ conn->bits.httpproxy = (conn->bits.proxy &&
+ (conn->proxytype == CURLPROXY_HTTP ||
+ conn->proxytype == CURLPROXY_HTTP_1_0))?TRUE:FALSE;
+ conn->bits.proxy_user_passwd =
+ (NULL != data->set.str[STRING_PROXYUSERNAME])?TRUE:FALSE;
+ conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy;
+
+#endif /* CURL_DISABLE_PROXY */
+
+ conn->bits.user_passwd = (NULL != data->set.str[STRING_USERNAME])?TRUE:FALSE;
+ conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
+ conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
+
+ conn->verifypeer = data->set.ssl.verifypeer;
+ conn->verifyhost = data->set.ssl.verifyhost;
+
+ conn->ip_version = data->set.ipver;
+
+#if !defined(CURL_DISABLE_HTTP) && 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;
+ conn->response_header = NULL;
+#endif
+
+ if(Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1) &&
+ !conn->master_buffer) {
+ /* Allocate master_buffer to be used for HTTP/1 pipelining */
+ conn->master_buffer = calloc(BUFSIZE, sizeof (char));
+ if(!conn->master_buffer)
+ goto error;
+ }
+
+ /* Initialize the pipeline lists */
+ conn->send_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
+ conn->recv_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
+ if(!conn->send_pipe || !conn->recv_pipe)
+ goto error;
+
+#ifdef HAVE_GSSAPI
+ conn->data_prot = PROT_CLEAR;
+#endif
+
+ /* Store the local bind parameters that will be used for this connection */
+ if(data->set.str[STRING_DEVICE]) {
+ conn->localdev = strdup(data->set.str[STRING_DEVICE]);
+ if(!conn->localdev)
+ goto error;
+ }
+ conn->localportrange = data->set.localportrange;
+ conn->localport = data->set.localport;
+
+ /* the close socket stuff needs to be copied to the connection struct as
+ it may live on without (this specific) SessionHandle */
+ conn->fclosesocket = data->set.fclosesocket;
+ conn->closesocket_client = data->set.closesocket_client;
+
return conn;
+ error:
+
+ Curl_llist_destroy(conn->send_pipe, NULL);
+ Curl_llist_destroy(conn->recv_pipe, NULL);
+
+ conn->send_pipe = NULL;
+ conn->recv_pipe = NULL;
+
+ free(conn->master_buffer);
+ free(conn->localdev);
+ free(conn);
+ return NULL;
}
static CURLcode findprotocol(struct SessionHandle *data,
@@ -3483,7 +3880,7 @@ static CURLcode findprotocol(struct SessionHandle *data,
/* Scan protocol handler table and match against 'protostr' to set a few
variables based on the URL. Now that the handler may be changed later
when the protocol specific setup function is called. */
- for (pp = protocols; (p = *pp) != NULL; pp++) {
+ for(pp = protocols; (p = *pp) != NULL; pp++) {
if(Curl_raw_equal(p->scheme, protostr)) {
/* Protocol found in table. Check if allowed */
if(!(data->set.allowed_protocols & p->protocol))
@@ -3498,8 +3895,7 @@ static CURLcode findprotocol(struct SessionHandle *data,
break;
/* Perform setup complement if some. */
- conn->handler = p;
- conn->protocol |= p->protocol;
+ conn->handler = conn->given = p;
/* 'port' and 'remote_port' are set in setup_connection_internals() */
return CURLE_OK;
@@ -3510,7 +3906,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;
@@ -3521,18 +3917,29 @@ static CURLcode findprotocol(struct SessionHandle *data,
*/
static CURLcode parseurlandfillconn(struct SessionHandle *data,
struct connectdata *conn,
- bool *prot_missing)
+ bool *prot_missing,
+ char **userp, char **passwdp,
+ char **optionsp)
{
char *at;
char *fragment;
char *path = data->state.path;
char *query;
int rc;
- char protobuf[16];
- const char *protop;
+ char protobuf[16] = "";
+ const char *protop = "";
+ CURLcode result;
+ bool rebuild_url = FALSE;
*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.
*
@@ -3596,7 +4003,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
path[0]=0;
if(2 > sscanf(data->change.url,
- "%15[^\n:]://%[^\n/]%[^\n]",
+ "%15[^\n:]://%[^\n/?]%[^\n]",
protobuf,
conn->host.name, path)) {
@@ -3604,7 +4011,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
* The URL was badly formatted, let's try the browser-style _without_
* protocol specified like 'http://'.
*/
- rc = sscanf(data->change.url, "%[^\n/]%[^\n]", conn->host.name, path);
+ rc = sscanf(data->change.url, "%[^\n/?]%[^\n]", conn->host.name, path);
if(1 > rc) {
/*
* We couldn't even get this format.
@@ -3612,7 +4019,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
* assigned, but the return value is EOF!
*/
#if defined(__DJGPP__) && (DJGPP_MINOR == 4)
- if (!(rc == -1 && *conn->host.name))
+ if(!(rc == -1 && *conn->host.name))
#endif
{
failf(data, "<url> malformed");
@@ -3636,6 +4043,10 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
protop = "LDAP";
else if(checkprefix("IMAP.", conn->host.name))
protop = "IMAP";
+ else if(checkprefix("SMTP.", conn->host.name))
+ protop = "smtp";
+ else if(checkprefix("POP3.", conn->host.name))
+ protop = "pop3";
else {
protop = "http";
}
@@ -3676,12 +4087,14 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
memcpy(path+1, query, hostlen);
path[0]='/'; /* prepend the missing slash */
+ rebuild_url = TRUE;
*query=0; /* now cut off the hostname at the ? */
}
else if(!path[0]) {
/* if there's no path set, use a single slash */
strcpy(path, "/");
+ rebuild_url = TRUE;
}
/* If the URL is malformatted (missing a '/' after hostname before path) we
@@ -3694,38 +4107,145 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
is bigger than the path. Use +1 to move the zero byte too. */
memmove(&path[1], path, strlen(path)+1);
path[0] = '/';
+ rebuild_url = TRUE;
}
+ else if(!data->set.path_as_is) {
+ /* sanitise paths and remove ../ and ./ sequences according to RFC3986 */
+ char *newp = Curl_dedotdotify(path);
+ if(!newp)
+ return CURLE_OUT_OF_MEMORY;
+
+ if(strcmp(newp, path)) {
+ rebuild_url = TRUE;
+ free(data->state.pathbuffer);
+ data->state.pathbuffer = newp;
+ data->state.path = newp;
+ path = newp;
+ }
+ else
+ free(newp);
+ }
+
+ /*
+ * "rebuild_url" means that one or more URL components have been modified so
+ * we need to generate an updated full version. We need the corrected URL
+ * when communicating over HTTP proxy and we don't know at this point if
+ * we're using a proxy or not.
+ */
+ if(rebuild_url) {
+ char *reurl;
+
+ size_t plen = strlen(path); /* new path, should be 1 byte longer than
+ the original */
+ size_t urllen = strlen(data->change.url); /* original URL length */
+
+ size_t prefixlen = strlen(conn->host.name);
+
+ if(!*prot_missing)
+ prefixlen += strlen(protop) + strlen("://");
- if (conn->host.name[0] == '[') {
+ reurl = malloc(urllen + 2); /* 2 for zerobyte + slash */
+ if(!reurl)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* copy the prefix */
+ memcpy(reurl, data->change.url, prefixlen);
+
+ /* append the trailing piece + zerobyte */
+ memcpy(&reurl[prefixlen], path, plen + 1);
+
+ /* possible free the old one */
+ if(data->change.url_alloc) {
+ Curl_safefree(data->change.url);
+ data->change.url_alloc = FALSE;
+ }
+
+ infof(data, "Rebuilt URL to: %s\n", reurl);
+
+ data->change.url = reurl;
+ data->change.url_alloc = TRUE; /* free this later */
+ }
+
+ /*
+ * Parse the login details from the URL and strip them out of
+ * the host name
+ */
+ result = parse_url_login(data, conn, userp, passwdp, optionsp);
+ if(result)
+ return result;
+
+ if(conn->host.name[0] == '[') {
/* This looks like an IPv6 address literal. See if there is an address
- scope. */
- char *percent = strstr (conn->host.name, "%25");
- if (percent) {
+ scope if there is no location header */
+ char *percent = strchr(conn->host.name, '%');
+ if(percent) {
+ unsigned int identifier_offset = 3;
char *endp;
- unsigned long scope = strtoul (percent + 3, &endp, 10);
- if (*endp == ']') {
+ unsigned long scope;
+ if(strncmp("%25", percent, 3) != 0) {
+ infof(data,
+ "Please URL encode %% as %%25, see RFC 6874.\n");
+ identifier_offset = 1;
+ }
+ scope = strtoul(percent + identifier_offset, &endp, 10);
+ if(*endp == ']') {
/* The address scope was well formed. Knock it out of the
hostname. */
memmove(percent, endp, strlen(endp)+1);
- if (!data->state.this_is_a_follow)
- /* Don't honour a scope given in a Location: header */
- conn->scope = (unsigned int)scope;
- } else
- infof(data, "Invalid IPv6 address format\n");
+ conn->scope_id = (unsigned int)scope;
+ }
+ else {
+ /* Zone identifier is not numeric */
+#if defined(HAVE_NET_IF_H) && defined(IFNAMSIZ) && defined(HAVE_IF_NAMETOINDEX)
+ char ifname[IFNAMSIZ + 2];
+ char *square_bracket;
+ unsigned int scopeidx = 0;
+ strncpy(ifname, percent + identifier_offset, IFNAMSIZ + 2);
+ /* Ensure nullbyte termination */
+ ifname[IFNAMSIZ + 1] = '\0';
+ square_bracket = strchr(ifname, ']');
+ if(square_bracket) {
+ /* Remove ']' */
+ *square_bracket = '\0';
+ scopeidx = if_nametoindex(ifname);
+ if(scopeidx == 0) {
+ infof(data, "Invalid network interface: %s; %s\n", ifname,
+ strerror(errno));
+ }
+ }
+ 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;
+ }
+ else
+#endif /* HAVE_NET_IF_H && IFNAMSIZ */
+ infof(data, "Invalid IPv6 address format\n");
+ }
}
}
- if(data->set.scope)
+ if(data->set.scope_id)
/* Override any scope that was set above. */
- conn->scope = data->set.scope;
+ conn->scope_id = data->set.scope_id;
/* 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
gracefully with non conformant URI such as http://example.com#foo#bar. */
fragment = strchr(path, '#');
- if(fragment)
+ if(fragment) {
*fragment = 0;
+ /* we know the path part ended with a fragment, so we know the full URL
+ string does too and we need to cut it off from there so it isn't used
+ over proxy */
+ fragment = strchr(data->change.url, '#');
+ if(fragment)
+ *fragment = 0;
+ }
+
/*
* So if the URL was A://B/C#D,
* protop is A
@@ -3736,13 +4256,6 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
return findprotocol(data, conn, protop);
}
-static void llist_dtor(void *user, void *element)
-{
- (void)user;
- (void)element;
- /* Do nothing */
-}
-
/*
* If we're doing a resumed transfer, we need to setup our stuff
* properly.
@@ -3756,11 +4269,11 @@ static CURLcode setup_range(struct SessionHandle *data)
free(s->range);
if(s->resume_from)
- s->range = aprintf("%" FORMAT_OFF_TU "-", s->resume_from);
+ s->range = aprintf("%" CURL_FORMAT_CURL_OFF_TU "-", s->resume_from);
else
s->range = strdup(data->set.str[STRING_SET_RANGE]);
- s->rangestringalloc = (bool)(s->range?TRUE:FALSE);
+ s->rangestringalloc = (s->range)?TRUE:FALSE;
if(!s->range)
return CURLE_OUT_OF_MEMORY;
@@ -3775,18 +4288,32 @@ static CURLcode setup_range(struct SessionHandle *data)
}
-/***************************************************************
-* Setup connection internals specific to the requested protocol.
-* This MUST get called after proxy magic has been figured out.
-***************************************************************/
+/*
+ * setup_connection_internals() -
+ *
+ * Setup connection internals specific to the requested protocol in the
+ * SessionHandle. This is inited and setup before the connection is made but
+ * is about the particular protocol that is to be used.
+ *
+ * This MUST get called after proxy magic has been figured out.
+ */
static CURLcode setup_connection_internals(struct connectdata *conn)
{
const struct Curl_handler * p;
CURLcode result;
+ struct SessionHandle *data = conn->data;
- conn->socktype = SOCK_STREAM; /* most of them are TCP streams */
+ /* in some case in the multi state-machine, we go back to the CONNECT state
+ and then a second (or third or...) call to this function will be made
+ without doing a DISCONNECT or DONE in between (since the connection is
+ yet in place) and therefore this function needs to first make sure
+ there's no lingering previous data allocated. */
+ Curl_free_request_state(data);
- /* Scan protocol handler table. */
+ memset(&data->req, 0, sizeof(struct SingleRequest));
+ data->req.maxdownload = -1;
+
+ conn->socktype = SOCK_STREAM; /* most of them are TCP streams */
/* Perform setup complement if some. */
p = conn->handler;
@@ -3794,7 +4321,7 @@ static CURLcode setup_connection_internals(struct connectdata *conn)
if(p->setup_connection) {
result = (*p->setup_connection)(conn);
- if(result != CURLE_OK)
+ if(result)
return result;
p = conn->handler; /* May have changed. */
@@ -3804,12 +4331,27 @@ static CURLcode setup_connection_internals(struct connectdata *conn)
/* we check for -1 here since if proxy was detected already, this
was very likely already set to the proxy port */
conn->port = p->defport;
- conn->remote_port = (unsigned short)p->defport;
- conn->protocol |= p->protocol;
+
+ /* only if remote_port was not already parsed off the URL we use the
+ default port number */
+ if(conn->remote_port < 0)
+ conn->remote_port = (unsigned short)conn->given->defport;
return CURLE_OK;
}
+/*
+ * Curl_free_request_state() should free temp data that was allocated in the
+ * SessionHandle for this single request.
+ */
+
+void Curl_free_request_state(struct SessionHandle *data)
+{
+ Curl_safefree(data->req.protop);
+ Curl_safefree(data->req.newurl);
+}
+
+
#ifndef CURL_DISABLE_PROXY
/****************************************************************
* Checks if the host is in the noproxy list. returns true if it matches
@@ -3843,9 +4385,9 @@ static bool check_noproxy(const char* name, const char* no_proxy)
else
namelen = strlen(name);
- for (tok_start = 0; tok_start < no_proxy_len; tok_start = tok_end + 1) {
- while (tok_start < no_proxy_len &&
- strchr(separator, no_proxy[tok_start]) != NULL) {
+ for(tok_start = 0; tok_start < no_proxy_len; tok_start = tok_end + 1) {
+ while(tok_start < no_proxy_len &&
+ strchr(separator, no_proxy[tok_start]) != NULL) {
/* Look for the beginning of the token. */
++tok_start;
}
@@ -3853,10 +4395,10 @@ static bool check_noproxy(const char* name, const char* no_proxy)
if(tok_start == no_proxy_len)
break; /* It was all trailing separator chars, no more tokens. */
- for (tok_end = tok_start; tok_end < no_proxy_len &&
- strchr(separator, no_proxy[tok_end]) == NULL; ++tok_end) {
+ for(tok_end = tok_start; tok_end < no_proxy_len &&
+ strchr(separator, no_proxy[tok_end]) == NULL; ++tok_end)
/* Look for the end of the token. */
- }
+ ;
/* To match previous behaviour, where it was necessary to specify
* ".local.com" to prevent matching "notlocal.com", we will leave
@@ -3878,7 +4420,7 @@ static bool check_noproxy(const char* name, const char* no_proxy)
}
}
} /* if((tok_end - tok_start) <= namelen) */
- } /* for (tok_start = 0; tok_start < no_proxy_len;
+ } /* for(tok_start = 0; tok_start < no_proxy_len;
tok_start = tok_end + 1) */
} /* NO_PROXY was specified and it wasn't just an asterisk */
@@ -3953,9 +4495,8 @@ static char *detect_proxy(struct connectdata *conn)
prox=curl_getenv(proxy_env);
}
- if(prox && *prox) { /* don't count "" strings */
+ if(prox)
proxy = prox; /* use this */
- }
else {
proxy = curl_getenv("all_proxy"); /* default proxy to use */
if(!proxy)
@@ -3963,8 +4504,7 @@ static char *detect_proxy(struct connectdata *conn)
}
} /* if(!check_noproxy(conn->host.name, no_proxy)) - it wasn't specified
non-proxy */
- if(no_proxy)
- free(no_proxy);
+ free(no_proxy);
#else /* !CURL_DISABLE_HTTP */
@@ -3978,7 +4518,6 @@ static char *detect_proxy(struct connectdata *conn)
* If this is supposed to use a proxy, we need to figure out the proxy
* host name, so that we can re-use an existing connection
* that may exist registered to the same proxy host.
- * proxy will be freed before this function returns.
*/
static CURLcode parse_proxy(struct SessionHandle *data,
struct connectdata *conn, char *proxy)
@@ -3992,79 +4531,95 @@ static CURLcode parse_proxy(struct SessionHandle *data,
char *atsign;
/* We do the proxy host string parsing here. We want the host name and the
- * port name. Accept a protocol:// prefix, even though it should just be
- * ignored.
+ * port name. Accept a protocol:// prefix
*/
- /* Skip the protocol part if present */
+ /* Parse the protocol part if present */
endofprot = strstr(proxy, "://");
- if(endofprot)
+ if(endofprot) {
proxyptr = endofprot+3;
+ if(checkprefix("socks5h", proxy))
+ conn->proxytype = CURLPROXY_SOCKS5_HOSTNAME;
+ else if(checkprefix("socks5", proxy))
+ conn->proxytype = CURLPROXY_SOCKS5;
+ else if(checkprefix("socks4a", proxy))
+ conn->proxytype = CURLPROXY_SOCKS4A;
+ else if(checkprefix("socks4", proxy) || checkprefix("socks", proxy))
+ conn->proxytype = CURLPROXY_SOCKS4;
+ /* Any other xxx:// : change to http proxy */
+ }
else
- proxyptr = proxy;
+ proxyptr = proxy; /* No xxx:// head: It's a HTTP proxy */
/* Is there a username and password given in this proxy url? */
atsign = strchr(proxyptr, '@');
if(atsign) {
- char proxyuser[MAX_CURL_USER_LENGTH];
- char proxypasswd[MAX_CURL_PASSWORD_LENGTH];
- proxypasswd[0] = 0;
-
- if(1 <= sscanf(proxyptr,
- "%" MAX_CURL_USER_LENGTH_TXT"[^:@]:"
- "%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]",
- proxyuser, proxypasswd)) {
- CURLcode res = CURLE_OK;
-
+ char *proxyuser = NULL;
+ char *proxypasswd = NULL;
+ CURLcode result =
+ parse_login_details(proxyptr, atsign - proxyptr,
+ &proxyuser, &proxypasswd, NULL);
+ if(!result) {
/* 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
them. */
Curl_safefree(conn->proxyuser);
- conn->proxyuser = curl_easy_unescape(data, proxyuser, 0, NULL);
+ if(proxyuser && strlen(proxyuser) < MAX_CURL_USER_LENGTH)
+ conn->proxyuser = curl_easy_unescape(data, proxyuser, 0, NULL);
+ else
+ conn->proxyuser = strdup("");
if(!conn->proxyuser)
- res = CURLE_OUT_OF_MEMORY;
+ result = CURLE_OUT_OF_MEMORY;
else {
Curl_safefree(conn->proxypasswd);
- conn->proxypasswd = curl_easy_unescape(data, proxypasswd, 0, NULL);
+ if(proxypasswd && strlen(proxypasswd) < MAX_CURL_PASSWORD_LENGTH)
+ conn->proxypasswd = curl_easy_unescape(data, proxypasswd, 0, NULL);
+ else
+ conn->proxypasswd = strdup("");
if(!conn->proxypasswd)
- res = CURLE_OUT_OF_MEMORY;
+ result = CURLE_OUT_OF_MEMORY;
}
- if(CURLE_OK == res) {
+ if(!result) {
conn->bits.proxy_user_passwd = TRUE; /* enable it */
- atsign = strdup(atsign+1); /* the right side of the @-letter */
+ atsign++; /* the right side of the @-letter */
- if(atsign) {
- free(proxy); /* free the former proxy string */
- proxy = proxyptr = atsign; /* now use this instead */
- }
- else
- res = CURLE_OUT_OF_MEMORY;
- }
-
- if(res) {
- free(proxy); /* free the allocated proxy string */
- return res;
+ proxyptr = atsign; /* now use this instead */
}
}
+
+ free(proxyuser);
+ free(proxypasswd);
+
+ if(result)
+ return result;
}
/* start scanning for port number at this point */
portptr = proxyptr;
- /* detect and extract RFC2732-style IPv6-addresses */
+ /* detect and extract RFC6874-style IPv6-addresses */
if(*proxyptr == '[') {
char *ptr = ++proxyptr; /* advance beyond the initial bracket */
- while(*ptr && (ISXDIGIT(*ptr) || (*ptr == ':') || (*ptr == '%') ||
- (*ptr == '.')))
+ while(*ptr && (ISXDIGIT(*ptr) || (*ptr == ':') || (*ptr == '.')))
+ ptr++;
+ if(*ptr == '%') {
+ /* There might be a zone identifier */
+ if(strncmp("%25", ptr, 3))
+ infof(data, "Please URL encode %% as %%25, see RFC 6874.\n");
ptr++;
- if(*ptr == ']') {
+ /* Allow unresered characters as defined in RFC 3986 */
+ while(*ptr && (ISALPHA(*ptr) || ISXDIGIT(*ptr) || (*ptr == '-') ||
+ (*ptr == '.') || (*ptr == '_') || (*ptr == '~')))
+ ptr++;
+ }
+ if(*ptr == ']')
/* yeps, it ended nicely with a bracket as well */
*ptr++ = 0;
- } else
+ else
infof(data, "Invalid IPv6 address format\n");
portptr = ptr;
/* Note that if this didn't end with a bracket, we still advanced the
@@ -4079,9 +4634,15 @@ static CURLcode parse_proxy(struct SessionHandle *data,
*prox_portno = 0x0; /* cut off number from host name */
prox_portno ++;
/* now set the local port number */
- conn->port = atoi(prox_portno);
+ conn->port = strtol(prox_portno, NULL, 10);
}
else {
+ if(proxyptr[0]=='/')
+ /* If the first character in the proxy string is a slash, fail
+ immediately. The following code will otherwise clear the string which
+ will lead to code running as if no proxy was set! */
+ return CURLE_COULDNT_RESOLVE_PROXY;
+
/* without a port number after the host name, some people seem to use
a slash so we strip everything from the first slash */
atsign = strchr(proxyptr, '/');
@@ -4098,7 +4659,6 @@ static CURLcode parse_proxy(struct SessionHandle *data,
conn->proxy.rawalloc = strdup(proxyptr);
conn->proxy.name = conn->proxy.rawalloc;
- free(proxy);
if(!conn->proxy.rawalloc)
return CURLE_OUT_OF_MEMORY;
@@ -4138,8 +4698,10 @@ static CURLcode parse_proxy_auth(struct SessionHandle *data,
#endif /* CURL_DISABLE_PROXY */
/*
+ * parse_url_login()
*
- * Parse a user name and password in the URL and strip it out of the host name
+ * Parse the login details (user name, password and options) from the URL and
+ * strip them out of the host name
*
* Inputs: data->set.use_netrc (CURLOPT_NETRC)
* conn->host.name
@@ -4147,80 +4709,233 @@ static CURLcode parse_proxy_auth(struct SessionHandle *data,
* Outputs: (almost :- all currently undefined)
* conn->bits.user_passwd - non-zero if non-default passwords exist
* user - non-zero length if defined
- * passwd - ditto
+ * passwd - non-zero length if defined
+ * options - non-zero length if defined
* conn->host.name - remove user name and password
*/
-static CURLcode parse_url_userpass(struct SessionHandle *data,
- struct connectdata *conn,
- char *user, char *passwd)
+static CURLcode parse_url_login(struct SessionHandle *data,
+ struct connectdata *conn,
+ char **user, char **passwd, char **options)
{
+ CURLcode result = CURLE_OK;
+ char *userp = NULL;
+ char *passwdp = NULL;
+ char *optionsp = NULL;
+
/* At this point, we're hoping all the other special cases have
* been taken care of, so conn->host.name is at most
- * [user[:password]]@]hostname
+ * [user[:password][;options]]@]hostname
*
* We need somewhere to put the embedded details, so do that first.
*/
- char *ptr=strchr(conn->host.name, '@');
- char *userpass = conn->host.name;
+ char *ptr = strchr(conn->host.name, '@');
+ char *login = conn->host.name;
- user[0] =0; /* to make everything well-defined */
- passwd[0]=0;
+ DEBUGASSERT(!**user);
+ DEBUGASSERT(!**passwd);
+ DEBUGASSERT(!**options);
+
+ if(!ptr)
+ goto out;
/* We will now try to extract the
- * possible user+password pair in a string like:
+ * possible login information in a string like:
* ftp://user:password@ftp.my.site:8021/README */
- if(ptr != NULL) {
- /* there's a user+password given here, to the left of the @ */
+ conn->host.name = ++ptr;
- conn->host.name = ++ptr;
+ /* So the hostname is sane. Only bother interpreting the
+ * results if we could care. It could still be wasted
+ * work because it might be overtaken by the programmatically
+ * set user/passwd, but doing that first adds more cases here :-(
+ */
- /* So the hostname is sane. Only bother interpreting the
- * results if we could care. It could still be wasted
- * work because it might be overtaken by the programmatically
- * set user/passwd, but doing that first adds more cases here :-(
- */
+ if(data->set.use_netrc == CURL_NETRC_REQUIRED)
+ goto out;
+
+ /* 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)
+ goto out;
+ if(userp) {
+ char *newname;
+
+ /* We have a user in the URL */
conn->bits.userpwd_in_url = TRUE;
- if(data->set.use_netrc != CURL_NETRC_REQUIRED) {
- /* We could use the one in the URL */
+ conn->bits.user_passwd = TRUE; /* enable user+password */
- conn->bits.user_passwd = TRUE; /* enable user+password */
+ /* Decode the user */
+ newname = curl_easy_unescape(data, userp, 0, NULL);
+ if(!newname) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
+ }
- if(*userpass != ':') {
- /* the name is given, get user+password */
- sscanf(userpass, "%" MAX_CURL_USER_LENGTH_TXT "[^:@]:"
- "%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]",
- user, passwd);
- }
- else
- /* no name given, get the password only */
- sscanf(userpass, ":%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]", passwd);
-
- if(user[0]) {
- char *newname=curl_easy_unescape(data, user, 0, NULL);
- if(!newname)
- return CURLE_OUT_OF_MEMORY;
- if(strlen(newname) < MAX_CURL_USER_LENGTH)
- strcpy(user, newname);
-
- /* if the new name is longer than accepted, then just use
- the unconverted name, it'll be wrong but what the heck */
- free(newname);
- }
- if(passwd[0]) {
- /* we have a password found in the URL, decode it! */
- char *newpasswd=curl_easy_unescape(data, passwd, 0, NULL);
- if(!newpasswd)
- return CURLE_OUT_OF_MEMORY;
- if(strlen(newpasswd) < MAX_CURL_PASSWORD_LENGTH)
- strcpy(passwd, newpasswd);
-
- free(newpasswd);
- }
+ free(*user);
+ *user = newname;
+ }
+
+ if(passwdp) {
+ /* We have a password in the URL so decode it */
+ char *newpasswd = curl_easy_unescape(data, passwdp, 0, NULL);
+ if(!newpasswd) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
}
+
+ free(*passwd);
+ *passwd = newpasswd;
}
- return CURLE_OK;
+
+ if(optionsp) {
+ /* We have an options list in the URL so decode it */
+ char *newoptions = curl_easy_unescape(data, optionsp, 0, NULL);
+ if(!newoptions) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
+ }
+
+ free(*options);
+ *options = newoptions;
+ }
+
+
+ out:
+
+ free(userp);
+ free(passwdp);
+ free(optionsp);
+
+ return result;
+}
+
+/*
+ * parse_login_details()
+ *
+ * This is used to parse a login string for user name, password and options in
+ * the following formats:
+ *
+ * user
+ * user:password
+ * user:password;options
+ * user;options
+ * user;options:password
+ * :password
+ * :password;options
+ * ;options
+ * ;options:password
+ *
+ * Parameters:
+ *
+ * login [in] - The login string.
+ * len [in] - The length of the login string.
+ * userp [in/out] - The address where a pointer to newly allocated memory
+ * holding the user will be stored upon completion.
+ * passdwp [in/out] - The address where a pointer to newly allocated memory
+ * holding the password will be stored upon completion.
+ * optionsp [in/out] - The address where a pointer to newly allocated memory
+ * holding the options will be stored upon completion.
+ *
+ * Returns CURLE_OK on success.
+ */
+static CURLcode parse_login_details(const char *login, const size_t len,
+ char **userp, char **passwdp,
+ char **optionsp)
+{
+ CURLcode result = CURLE_OK;
+ char *ubuf = NULL;
+ char *pbuf = NULL;
+ char *obuf = NULL;
+ const char *psep = NULL;
+ const char *osep = NULL;
+ size_t ulen;
+ size_t plen;
+ size_t olen;
+
+ /* Attempt to find the password separator */
+ if(passwdp) {
+ psep = strchr(login, ':');
+
+ /* Within the constraint of the login string */
+ if(psep >= login + len)
+ psep = NULL;
+ }
+
+ /* Attempt to find the options separator */
+ if(optionsp) {
+ osep = strchr(login, ';');
+
+ /* Within the constraint of the login string */
+ if(osep >= login + len)
+ osep = NULL;
+ }
+
+ /* Calculate the portion lengths */
+ ulen = (psep ?
+ (size_t)(osep && psep > osep ? osep - login : psep - login) :
+ (osep ? (size_t)(osep - login) : len));
+ plen = (psep ?
+ (osep && osep > psep ? (size_t)(osep - psep) :
+ (size_t)(login + len - psep)) - 1 : 0);
+ olen = (osep ?
+ (psep && psep > osep ? (size_t)(psep - osep) :
+ (size_t)(login + len - osep)) - 1 : 0);
+
+ /* Allocate the user portion buffer */
+ if(userp && ulen) {
+ ubuf = malloc(ulen + 1);
+ if(!ubuf)
+ result = CURLE_OUT_OF_MEMORY;
+ }
+
+ /* Allocate the password portion buffer */
+ if(!result && passwdp && plen) {
+ pbuf = malloc(plen + 1);
+ if(!pbuf) {
+ free(ubuf);
+ result = CURLE_OUT_OF_MEMORY;
+ }
+ }
+
+ /* Allocate the options portion buffer */
+ if(!result && optionsp && olen) {
+ obuf = malloc(olen + 1);
+ if(!obuf) {
+ free(pbuf);
+ free(ubuf);
+ result = CURLE_OUT_OF_MEMORY;
+ }
+ }
+
+ if(!result) {
+ /* Store the user portion if necessary */
+ if(ubuf) {
+ memcpy(ubuf, login, ulen);
+ ubuf[ulen] = '\0';
+ Curl_safefree(*userp);
+ *userp = ubuf;
+ }
+
+ /* Store the password portion if necessary */
+ if(pbuf) {
+ memcpy(pbuf, psep + 1, plen);
+ pbuf[plen] = '\0';
+ Curl_safefree(*passwdp);
+ *passwdp = pbuf;
+ }
+
+ /* Store the options portion if necessary */
+ if(obuf) {
+ memcpy(obuf, osep + 1, olen);
+ obuf[olen] = '\0';
+ Curl_safefree(*optionsp);
+ *optionsp = obuf;
+ }
+ }
+
+ return result;
}
/*************************************************************
@@ -4260,8 +4975,19 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
portptr = NULL; /* no port number available */
}
}
- else
+ else {
+#ifdef ENABLE_IPV6
+ struct in6_addr in6;
+ if(Curl_inet_pton(AF_INET6, conn->host.name, &in6) > 0) {
+ /* This is a numerical IPv6 address, meaning this is a wrongly formatted
+ URL */
+ failf(data, "IPv6 numerical address used in URL without brackets");
+ return CURLE_URL_MALFORMAT;
+ }
+#endif
+
portptr = strrchr(conn->host.name, ':');
+ }
if(data->set.use_port && data->state.allow_port) {
/* if set, we use this and ignore the port possibly given in the URL */
@@ -4284,7 +5010,7 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
* stripped off. It would be better to work directly from the original
* URL and simply replace the port part of it.
*/
- url = aprintf("%s://%s%s%s:%hu%s%s%s", conn->handler->scheme,
+ url = aprintf("%s://%s%s%s:%hu%s%s%s", conn->given->scheme,
conn->bits.ipv6_ip?"[":"", conn->host.name,
conn->bits.ipv6_ip?"]":"", conn->remote_port,
data->state.slash_removed?"/":"", data->state.path,
@@ -4292,8 +5018,10 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
if(!url)
return CURLE_OUT_OF_MEMORY;
- if(data->change.url_alloc)
- free(data->change.url);
+ if(data->change.url_alloc) {
+ Curl_safefree(data->change.url);
+ data->change.url_alloc = FALSE;
+ }
data->change.url = url;
data->change.url_alloc = TRUE;
@@ -4303,24 +5031,21 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
/* no CURLOPT_PORT given, extract the one from the URL */
char *rest;
- unsigned long port;
-
- port=strtoul(portptr+1, &rest, 10); /* Port number must be decimal */
+ long port;
- if(rest != (portptr+1) && *rest == '\0') {
- /* The colon really did have only digits after it,
- * so it is either a port number or a mistake */
+ port=strtol(portptr+1, &rest, 10); /* Port number must be decimal */
- if(port > 0xffff) { /* Single unix standard says port numbers are
- * 16 bits long */
- failf(data, "Port number too large: %lu", port);
- return CURLE_URL_MALFORMAT;
- }
+ if((port < 0) || (port > 0xffff)) {
+ /* Single unix standard says port numbers are 16 bits long */
+ failf(data, "Port number out of range");
+ return CURLE_URL_MALFORMAT;
+ }
+ else if(rest != &portptr[1]) {
*portptr = '\0'; /* cut off the name there */
conn->remote_port = curlx_ultous(port);
}
- else if(!port)
+ else
/* Browser behavior adaptation. If there's a colon with no digits after,
just cut off the name there which makes us ignore the colon and just
use the default port. Firefox and Chrome both do that. */
@@ -4330,31 +5055,47 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
}
/*
- * Override a user name and password from the URL with that in the
- * CURLOPT_USERPWD option or a .netrc file, if applicable.
+ * Override the login details from the URL with that in the CURLOPT_USERPWD
+ * option or a .netrc file, if applicable.
*/
-static void override_userpass(struct SessionHandle *data,
- struct connectdata *conn,
- char *user, char *passwd)
+static CURLcode override_login(struct SessionHandle *data,
+ struct connectdata *conn,
+ char **userp, char **passwdp, char **optionsp)
{
- if(data->set.str[STRING_USERNAME] != NULL) {
- strncpy(user, data->set.str[STRING_USERNAME], MAX_CURL_USER_LENGTH);
- user[MAX_CURL_USER_LENGTH-1] = '\0'; /*To be on safe side*/
+ if(data->set.str[STRING_USERNAME]) {
+ free(*userp);
+ *userp = strdup(data->set.str[STRING_USERNAME]);
+ if(!*userp)
+ return CURLE_OUT_OF_MEMORY;
}
- if(data->set.str[STRING_PASSWORD] != NULL) {
- strncpy(passwd, data->set.str[STRING_PASSWORD], MAX_CURL_PASSWORD_LENGTH);
- passwd[MAX_CURL_PASSWORD_LENGTH-1] = '\0'; /*To be on safe side*/
+
+ if(data->set.str[STRING_PASSWORD]) {
+ free(*passwdp);
+ *passwdp = strdup(data->set.str[STRING_PASSWORD]);
+ if(!*passwdp)
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ if(data->set.str[STRING_OPTIONS]) {
+ free(*optionsp);
+ *optionsp = strdup(data->set.str[STRING_OPTIONS]);
+ if(!*optionsp)
+ return CURLE_OUT_OF_MEMORY;
}
conn->bits.netrc = FALSE;
if(data->set.use_netrc != CURL_NETRC_IGNORED) {
- if(Curl_parsenetrc(conn->host.name,
- user, passwd,
- data->set.str[STRING_NETRC_FILE])) {
+ int ret = Curl_parsenetrc(conn->host.name,
+ userp, passwdp,
+ data->set.str[STRING_NETRC_FILE]);
+ if(ret > 0) {
infof(data, "Couldn't find host %s in the "
DOT_CHAR "netrc file; using defaults\n",
conn->host.name);
}
+ else if(ret < 0 ) {
+ return CURLE_OUT_OF_MEMORY;
+ }
else {
/* set bits.netrc TRUE to remember that we got the name from a .netrc
file, so that it is safe to use even if we followed a Location: to a
@@ -4364,37 +5105,55 @@ static void override_userpass(struct SessionHandle *data,
conn->bits.user_passwd = TRUE; /* enable user+password */
}
}
+
+ return CURLE_OK;
}
/*
- * Set password so it's available in the connection.
+ * Set the login details so they're available in the connection
*/
-static CURLcode set_userpass(struct connectdata *conn,
- const char *user, const char *passwd)
+static CURLcode set_login(struct connectdata *conn,
+ const char *user, const char *passwd,
+ const char *options)
{
- /* If our protocol needs a password and we have none, use the defaults */
- if( (conn->protocol & (PROT_FTP|PROT_IMAP)) &&
- !conn->bits.user_passwd) {
+ CURLcode result = CURLE_OK;
+ /* If our protocol needs a password and we have none, use the defaults */
+ if((conn->handler->flags & PROTOPT_NEEDSPWD) && !conn->bits.user_passwd) {
+ /* Store the default user */
conn->user = strdup(CURL_DEFAULT_USER);
+
+ /* Store the default password */
if(conn->user)
conn->passwd = strdup(CURL_DEFAULT_PASSWORD);
else
conn->passwd = NULL;
+
/* This is the default password, so DON'T set conn->bits.user_passwd */
}
else {
- /* store user + password, zero-length if not set */
+ /* Store the user, zero-length if not set */
conn->user = strdup(user);
+
+ /* Store the password (only if user is present), zero-length if not set */
if(conn->user)
conn->passwd = strdup(passwd);
else
conn->passwd = NULL;
}
+
if(!conn->user || !conn->passwd)
- return CURLE_OUT_OF_MEMORY;
+ result = CURLE_OUT_OF_MEMORY;
- return CURLE_OK;
+ /* Store the options, null if not set */
+ if(!result && options[0]) {
+ conn->options = strdup(options);
+
+ if(!conn->options)
+ result = CURLE_OUT_OF_MEMORY;
+ }
+
+ return result;
}
/*************************************************************
@@ -4405,18 +5164,17 @@ static CURLcode resolve_server(struct SessionHandle *data,
bool *async)
{
CURLcode result=CURLE_OK;
- long timeout_ms = Curl_timeleft(conn, NULL, TRUE);
+ long timeout_ms = Curl_timeleft(data, NULL, TRUE);
/*************************************************************
* Resolve the name of the server or proxy
*************************************************************/
- if(conn->bits.reuse) {
- /* We're reusing the connection - no need to resolve anything */
+ if(conn->bits.reuse)
+ /* We're reusing the connection - no need to resolve anything, and
+ fix_hostname() was called already in create_conn() for the re-use
+ case. */
*async = FALSE;
- if(conn->bits.proxy)
- fix_hostname(data, conn, &conn->host);
- }
else {
/* this is a fresh connect */
int rc;
@@ -4425,6 +5183,32 @@ 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. */
@@ -4436,7 +5220,7 @@ static CURLcode resolve_server(struct SessionHandle *data,
if(rc == CURLRESOLV_PENDING)
*async = TRUE;
- else if (rc == CURLRESOLV_TIMEDOUT)
+ else if(rc == CURLRESOLV_TIMEDOUT)
result = CURLE_OPERATION_TIMEDOUT;
else if(!hostaddr) {
@@ -4458,7 +5242,7 @@ static CURLcode resolve_server(struct SessionHandle *data,
if(rc == CURLRESOLV_PENDING)
*async = TRUE;
- else if (rc == CURLRESOLV_TIMEDOUT)
+ else if(rc == CURLRESOLV_TIMEDOUT)
result = CURLE_OPERATION_TIMEDOUT;
else if(!hostaddr) {
@@ -4482,8 +5266,7 @@ static CURLcode resolve_server(struct SessionHandle *data,
static void reuse_conn(struct connectdata *old_conn,
struct connectdata *conn)
{
- if(old_conn->proxy.rawalloc)
- free(old_conn->proxy.rawalloc);
+ free(old_conn->proxy.rawalloc);
/* free the SSL config struct from this connection struct as this was
allocated in vain and is targeted for destruction */
@@ -4515,13 +5298,13 @@ static void reuse_conn(struct connectdata *old_conn,
old_conn->proxypasswd = NULL;
}
- /* host can change, when doing keepalive with a proxy ! */
- if(conn->bits.proxy) {
- free(conn->host.rawalloc);
- conn->host=old_conn->host;
- }
- else
- free(old_conn->host.rawalloc); /* free the newly allocated name buffer */
+ /* host can change, when doing keepalive with a proxy or if the case is
+ different this time etc */
+ Curl_safefree(conn->host.rawalloc);
+ conn->host=old_conn->host;
+
+ /* persist connection info in session handle */
+ Curl_persistconninfo(conn);
/* re-use init */
conn->bits.reuse = TRUE; /* yes, we're re-using here */
@@ -4530,10 +5313,14 @@ static void reuse_conn(struct connectdata *old_conn,
Curl_safefree(old_conn->passwd);
Curl_safefree(old_conn->proxyuser);
Curl_safefree(old_conn->proxypasswd);
+ Curl_safefree(old_conn->localdev);
+
Curl_llist_destroy(old_conn->send_pipe, NULL);
Curl_llist_destroy(old_conn->recv_pipe, NULL);
- Curl_llist_destroy(old_conn->pend_pipe, NULL);
- Curl_llist_destroy(old_conn->done_pipe, NULL);
+
+ old_conn->send_pipe = NULL;
+ old_conn->recv_pipe = NULL;
+
Curl_safefree(old_conn->master_buffer);
}
@@ -4548,7 +5335,7 @@ static void reuse_conn(struct connectdata *old_conn,
* @param data The sessionhandle pointer
* @param in_connect is set to the next connection data pointer
* @param async is set TRUE when an async DNS resolution is pending
- * @see setup_conn()
+ * @see Curl_setup_conn()
*
* *NOTE* this function assigns the conn->data pointer!
*/
@@ -4557,15 +5344,21 @@ static CURLcode create_conn(struct SessionHandle *data,
struct connectdata **in_connect,
bool *async)
{
- CURLcode result=CURLE_OK;
+ CURLcode result = CURLE_OK;
struct connectdata *conn;
struct connectdata *conn_temp = NULL;
size_t urllen;
- char user[MAX_CURL_USER_LENGTH];
- char passwd[MAX_CURL_PASSWORD_LENGTH];
+ char *user = NULL;
+ char *passwd = NULL;
+ char *options = NULL;
bool reuse;
char *proxy = NULL;
bool prot_missing = FALSE;
+ bool connections_available = TRUE;
+ bool force_reuse = FALSE;
+ bool waitpipe = FALSE;
+ size_t max_host_connections = Curl_multi_max_host_connections(data->multi);
+ size_t max_total_connections = Curl_multi_max_total_connections(data->multi);
*async = FALSE;
@@ -4573,73 +5366,27 @@ static CURLcode create_conn(struct SessionHandle *data,
* Check input data
*************************************************************/
- if(!data->change.url)
- return CURLE_URL_MALFORMAT;
+ if(!data->change.url) {
+ result = CURLE_URL_MALFORMAT;
+ goto out;
+ }
/* First, split up the current URL in parts so that we can use the
parts for checking against the already present connections. In order
to not have to modify everything at once, we allocate a temporary
connection data struct and fill in for comparison purposes. */
+ conn = allocate_conn(data);
- conn = allocate_conn();
+ if(!conn) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
+ }
/* We must set the return variable as soon as possible, so that our
parent can cleanup any possible allocs we may have done before
any failure */
*in_connect = conn;
- if(!conn)
- return CURLE_OUT_OF_MEMORY;
-
- conn->data = data; /* Setup the association between this connection
- and the SessionHandle */
-
- conn->proxytype = data->set.proxytype; /* type */
-
-#ifdef CURL_DISABLE_PROXY
-
- conn->bits.proxy = FALSE;
- conn->bits.httpproxy = FALSE;
- conn->bits.proxy_user_passwd = FALSE;
- conn->bits.tunnel_proxy = FALSE;
-
-#else /* CURL_DISABLE_PROXY */
-
- conn->bits.proxy = (bool)(data->set.str[STRING_PROXY] &&
- *data->set.str[STRING_PROXY]);
- conn->bits.httpproxy = (bool)(conn->bits.proxy &&
- (conn->proxytype == CURLPROXY_HTTP ||
- conn->proxytype == CURLPROXY_HTTP_1_0));
- conn->bits.proxy_user_passwd =
- (bool)(NULL != data->set.str[STRING_PROXYUSERNAME]);
- conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy;
-
-#endif /* CURL_DISABLE_PROXY */
-
- conn->bits.user_passwd = (bool)(NULL != data->set.str[STRING_USERNAME]);
- conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
- conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
-
- conn->verifypeer = data->set.ssl.verifypeer;
- conn->verifyhost = data->set.ssl.verifyhost;
-
- if(data->multi && Curl_multi_canPipeline(data->multi) &&
- !conn->master_buffer) {
- /* Allocate master_buffer to be used for pipelining */
- conn->master_buffer = calloc(BUFSIZE, sizeof (char));
- if(!conn->master_buffer)
- return CURLE_OUT_OF_MEMORY;
- }
-
- /* Initialize the pipeline lists */
- conn->send_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
- conn->recv_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
- conn->pend_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
- conn->done_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
- if(!conn->send_pipe || !conn->recv_pipe || !conn->pend_pipe ||
- !conn->done_pipe)
- return CURLE_OUT_OF_MEMORY;
-
/* This initing continues below, see the comment "Continue connectdata
* initialization here" */
@@ -4654,29 +5401,45 @@ static CURLcode create_conn(struct SessionHandle *data,
urllen=LEAST_PATH_ALLOC;
/*
- * We malloc() the buffers below urllen+2 to make room for to possibilities:
+ * We malloc() the buffers below urllen+2 to make room for 2 possibilities:
* 1 - an extra terminating zero
* 2 - an extra slash (in case a syntax like "www.host.com?moo" is used)
*/
Curl_safefree(data->state.pathbuffer);
+ data->state.path = NULL;
+
data->state.pathbuffer = malloc(urllen+2);
- if(NULL == data->state.pathbuffer)
- return CURLE_OUT_OF_MEMORY; /* really bad error */
+ if(NULL == data->state.pathbuffer) {
+ result = CURLE_OUT_OF_MEMORY; /* really bad error */
+ goto out;
+ }
data->state.path = data->state.pathbuffer;
conn->host.rawalloc = malloc(urllen+2);
- if(NULL == conn->host.rawalloc)
- return CURLE_OUT_OF_MEMORY;
+ if(NULL == conn->host.rawalloc) {
+ Curl_safefree(data->state.pathbuffer);
+ data->state.path = NULL;
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
+ }
conn->host.name = conn->host.rawalloc;
conn->host.name[0] = 0;
- result = parseurlandfillconn(data, conn, &prot_missing);
- if(result != CURLE_OK) {
- return result;
+ user = strdup("");
+ passwd = strdup("");
+ options = strdup("");
+ if(!user || !passwd || !options) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
}
+ result = parseurlandfillconn(data, conn, &prot_missing, &user, &passwd,
+ &options);
+ if(result)
+ goto out;
+
/*************************************************************
* No protocol part in URL was used, add it!
*************************************************************/
@@ -4689,8 +5452,13 @@ static CURLcode create_conn(struct SessionHandle *data,
reurl = aprintf("%s://%s", conn->handler->scheme, data->change.url);
if(!reurl) {
- Curl_safefree(proxy);
- return CURLE_OUT_OF_MEMORY;
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
+ }
+
+ if(data->change.url_alloc) {
+ Curl_safefree(data->change.url);
+ data->change.url_alloc = FALSE;
}
data->change.url = reurl;
@@ -4698,12 +5466,30 @@ static CURLcode create_conn(struct SessionHandle *data,
}
/*************************************************************
- * Parse a user name and password in the URL and strip it out
- * of the host name
+ * If the protocol can't handle url query strings, then cut
+ * off the unhandable part
*************************************************************/
- result = parse_url_userpass(data, conn, user, passwd);
- if(result != CURLE_OK)
- return result;
+ if((conn->given->flags&PROTOPT_NOURLQUERY)) {
+ char *path_q_sep = strchr(conn->data->state.path, '?');
+ if(path_q_sep) {
+ /* according to rfc3986, allow the query (?foo=bar)
+ also on protocols that can't handle it.
+
+ cut the string-part after '?'
+ */
+
+ /* terminate the string */
+ path_q_sep[0] = 0;
+ }
+ }
+
+ if(data->set.str[STRING_BEARER]) {
+ conn->xoauth2_bearer = strdup(data->set.str[STRING_BEARER]);
+ if(!conn->xoauth2_bearer) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
+ }
+ }
#ifndef CURL_DISABLE_PROXY
/*************************************************************
@@ -4711,8 +5497,8 @@ static CURLcode create_conn(struct SessionHandle *data,
*************************************************************/
if(conn->bits.proxy_user_passwd) {
result = parse_proxy_auth(data, conn);
- if(result != CURLE_OK)
- return result;
+ if(result)
+ goto out;
}
/*************************************************************
@@ -4723,33 +5509,65 @@ static CURLcode create_conn(struct SessionHandle *data,
/* if global proxy is set, this is it */
if(NULL == proxy) {
failf(data, "memory shortage");
- return CURLE_OUT_OF_MEMORY;
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
}
}
if(data->set.str[STRING_NOPROXY] &&
check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY])) {
- if(proxy) {
- free(proxy); /* proxy is in exception list */
- proxy = NULL;
- }
+ free(proxy); /* proxy is in exception list */
+ proxy = NULL;
}
else if(!proxy)
proxy = detect_proxy(conn);
- if(proxy && !*proxy) {
- free(proxy); /* Don't bother with an empty proxy string */
+#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 */
proxy = NULL;
}
- /* proxy must be freed later unless NULL */
+
+ /***********************************************************************
+ * If this is supposed to use a proxy, we need to figure out the proxy host
+ * name, proxy type and port number, so that we can re-use an existing
+ * connection that may exist registered to the same proxy host.
+ ***********************************************************************/
if(proxy) {
- long bits = conn->protocol & (PROT_HTTPS|PROT_SSL);
+ result = parse_proxy(data, conn, proxy);
+
+ free(proxy); /* parse_proxy copies the proxy string */
+ proxy = NULL;
+
+ if(result)
+ goto out;
if((conn->proxytype == CURLPROXY_HTTP) ||
(conn->proxytype == CURLPROXY_HTTP_1_0)) {
- /* force this connection's protocol to become HTTP */
- conn->protocol = PROT_HTTP | bits;
+#ifdef CURL_DISABLE_HTTP
+ /* asking for a HTTP proxy is a bit funny when HTTP is disabled... */
+ result = CURLE_UNSUPPORTED_PROTOCOL;
+ goto out;
+#else
+ /* force this connection's protocol to become HTTP if not already
+ compatible - if it isn't tunneling through */
+ if(!(conn->handler->protocol & PROTO_FAMILY_HTTP) &&
+ !conn->bits.tunnel_proxy)
+ conn->handler = &Curl_handler_http;
+
conn->bits.httpproxy = TRUE;
+#endif
+ }
+ else {
+ conn->bits.httpproxy = FALSE; /* not a HTTP proxy */
+ conn->bits.tunnel_proxy = FALSE; /* no tunneling if not HTTP */
}
conn->bits.proxy = TRUE;
}
@@ -4761,29 +5579,38 @@ static CURLcode create_conn(struct SessionHandle *data,
conn->bits.tunnel_proxy = FALSE;
}
- /***********************************************************************
- * If this is supposed to use a proxy, we need to figure out the proxy
- * host name, so that we can re-use an existing connection
- * that may exist registered to the same proxy host.
- ***********************************************************************/
- if(proxy) {
- result = parse_proxy(data, conn, proxy);
- /* parse_proxy has freed the proxy string, so don't try to use it again */
- proxy = NULL;
- if(result != CURLE_OK)
- return result;
- }
#endif /* CURL_DISABLE_PROXY */
/*************************************************************
+ * If the protocol is using SSL and HTTP proxy is used, we set
+ * the tunnel_proxy bit.
+ *************************************************************/
+ if((conn->given->flags&PROTOPT_SSL) && conn->bits.httpproxy)
+ conn->bits.tunnel_proxy = TRUE;
+
+ /*************************************************************
+ * Figure out the remote port number and fix it in the URL
+ *************************************************************/
+ result = parse_remote_port(data, conn);
+ if(result)
+ 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)
+ goto out;
+ result = set_login(conn, user, passwd, options);
+ if(result)
+ goto out;
+
+ /*************************************************************
* Setup internals depending on protocol. Needs to be done after
* we figured out what/if proxy to use.
*************************************************************/
result = setup_connection_internals(conn);
- if(result != CURLE_OK) {
- Curl_safefree(proxy);
- return result;
- }
+ if(result)
+ goto out;
conn->recv[FIRSTSOCKET] = Curl_recv_plain;
conn->send[FIRSTSOCKET] = Curl_send_plain;
@@ -4794,7 +5621,7 @@ static CURLcode create_conn(struct SessionHandle *data,
* file: is a special case in that it doesn't need a network connection
***********************************************************************/
#ifndef CURL_DISABLE_FILE
- if(conn->protocol & PROT_FILE) {
+ if(conn->handler->flags & PROTOPT_NONETWORK) {
bool done;
/* this is supposed to be the connect function so we better at least check
that the file is present here! */
@@ -4802,11 +5629,11 @@ static CURLcode create_conn(struct SessionHandle *data,
result = conn->handler->connect_it(conn, &done);
/* Setup a "faked" transfer that'll do nothing */
- if(CURLE_OK == result) {
+ if(!result) {
conn->data = data;
- conn->bits.tcpconnect = TRUE; /* we are "connected */
+ conn->bits.tcpconnect[FIRSTSOCKET] = TRUE; /* we are "connected */
- ConnectionStore(data, conn);
+ Curl_conncache_add_conn(data->state.conn_cache, conn);
/*
* Setup whatever necessary for a resumed transfer
@@ -4816,40 +5643,20 @@ static CURLcode create_conn(struct SessionHandle *data,
DEBUGASSERT(conn->handler->done);
/* we ignore the return code for the protocol-specific DONE */
(void)conn->handler->done(conn, result, FALSE);
- return result;
+ goto out;
}
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
-1, NULL); /* no upload */
}
- return result;
+ /* since we skip do_init() */
+ do_init(conn);
+
+ goto out;
}
#endif
- /*************************************************************
- * If the protocol is using SSL and HTTP proxy is used, we set
- * the tunnel_proxy bit.
- *************************************************************/
- if((conn->protocol&PROT_SSL) && conn->bits.httpproxy)
- conn->bits.tunnel_proxy = TRUE;
-
- /*************************************************************
- * Figure out the remote port number and fix it in the URL
- *************************************************************/
- result = parse_remote_port(data, conn);
- if(result != CURLE_OK)
- return result;
-
- /*************************************************************
- * Check for an overridden user name and password, then set it
- * for use
- *************************************************************/
- override_userpass(data, conn, user, passwd);
- result = set_userpass(conn, user, passwd);
- if(result != CURLE_OK)
- return result;
-
/* Get a cloned copy of the SSL config situation stored in the
connection struct. But to get this going nicely, we must first make
sure that the strings in the master copy are pointing to the correct
@@ -4866,9 +5673,17 @@ static CURLcode create_conn(struct SessionHandle *data,
data->set.ssl.random_file = data->set.str[STRING_SSL_RANDOM_FILE];
data->set.ssl.egdsocket = data->set.str[STRING_SSL_EGDSOCKET];
data->set.ssl.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST];
+#ifdef USE_TLS_SRP
+ data->set.ssl.username = data->set.str[STRING_TLSAUTH_USERNAME];
+ data->set.ssl.password = data->set.str[STRING_TLSAUTH_PASSWORD];
+#endif
- if(!Curl_clone_ssl_config(&data->set.ssl, &conn->ssl_config))
- return CURLE_OUT_OF_MEMORY;
+ if(!Curl_clone_ssl_config(&data->set.ssl, &conn->ssl_config)) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto out;
+ }
+
+ prune_dead_connections(data);
/*************************************************************
* Check the current list of connections to see if we can
@@ -4883,7 +5698,25 @@ static CURLcode create_conn(struct SessionHandle *data,
if(data->set.reuse_fresh && !data->state.this_is_a_follow)
reuse = FALSE;
else
- reuse = ConnectionExists(data, conn, &conn_temp);
+ reuse = ConnectionExists(data, conn, &conn_temp, &force_reuse, &waitpipe);
+
+ /* If we found a reusable connection, we may still want to
+ open a new connection if we are pipelining. */
+ if(reuse && !force_reuse && IsPipeliningPossible(data, conn_temp)) {
+ size_t pipelen = conn_temp->send_pipe->size + conn_temp->recv_pipe->size;
+ if(pipelen > 0) {
+ infof(data, "Found connection %ld, with requests in the pipe (%zu)\n",
+ conn_temp->connection_id, pipelen);
+
+ if(conn_temp->bundle->num_connections < max_host_connections &&
+ data->state.conn_cache->num_connections < max_total_connections) {
+ /* We want a new connection anyway */
+ reuse = FALSE;
+
+ infof(data, "We can reuse, but we want a new connection anyway\n");
+ }
+ }
+ }
if(reuse) {
/*
@@ -4892,34 +5725,119 @@ static CURLcode create_conn(struct SessionHandle *data,
* just allocated before we can move along and use the previously
* existing one.
*/
+ conn_temp->inuse = TRUE; /* mark this as being in use so that no other
+ handle in a multi stack may nick it */
reuse_conn(conn, conn_temp);
free(conn); /* we don't need this anymore */
conn = conn_temp;
*in_connect = conn;
- infof(data, "Re-using existing connection! (#%ld) with host %s\n",
- conn->connectindex,
- conn->proxy.name?conn->proxy.dispname:conn->host.dispname);
- /* copy this IP address to the common buffer for the easy handle so that
- the address can actually survice the removal of this connection. strcpy
- is safe since the target buffer is big enough to hold the largest
- possible IP address */
- strcpy(data->info.ip, conn->ip_addr_str);
+ /* set a pointer to the hostname we display */
+ fix_hostname(data, conn, &conn->host);
+
+ infof(data, "Re-using existing connection! (#%ld) with %s %s\n",
+ conn->connection_id,
+ conn->bits.proxy?"proxy":"host",
+ conn->proxy.name?conn->proxy.dispname:conn->host.dispname);
}
else {
- /*
- * This is a brand new connection, so let's store it in the connection
- * cache of ours!
- */
- ConnectionStore(data, conn);
+ /* We have decided that we want a new connection. However, we may not
+ be able to do that if we have reached the limit of how many
+ connections we are allowed to open. */
+ struct connectbundle *bundle = NULL;
+
+ if(waitpipe)
+ /* There is a connection that *might* become usable for pipelining
+ "soon", and we wait for that */
+ connections_available = FALSE;
+ else
+ bundle = Curl_conncache_find_bundle(conn, data->state.conn_cache);
+
+ if(max_host_connections > 0 && bundle &&
+ (bundle->num_connections >= max_host_connections)) {
+ struct connectdata *conn_candidate;
+
+ /* The bundle is full. Let's see if we can kill a connection. */
+ conn_candidate = find_oldest_idle_connection_in_bundle(data, bundle);
+
+ if(conn_candidate) {
+ /* Set the connection's owner correctly, then kill it */
+ conn_candidate->data = data;
+ (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE);
+ }
+ else {
+ infof(data, "No more connections allowed to host: %d\n",
+ max_host_connections);
+ connections_available = FALSE;
+ }
+ }
+
+ if(connections_available &&
+ (max_total_connections > 0) &&
+ (data->state.conn_cache->num_connections >= max_total_connections)) {
+ struct connectdata *conn_candidate;
+
+ /* The cache is full. Let's see if we can kill a connection. */
+ conn_candidate = find_oldest_idle_connection(data);
+
+ if(conn_candidate) {
+ /* Set the connection's owner correctly, then kill it */
+ conn_candidate->data = data;
+ (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE);
+ }
+ else {
+ infof(data, "No connections available in cache\n");
+ connections_available = FALSE;
+ }
+ }
+
+ if(!connections_available) {
+ infof(data, "No connections available.\n");
+
+ conn_free(conn);
+ *in_connect = NULL;
+
+ result = CURLE_NO_CONNECTION_AVAILABLE;
+ goto out;
+ }
+ else {
+ /*
+ * This is a brand new connection, so let's store it in the connection
+ * cache of ours!
+ */
+ Curl_conncache_add_conn(data->state.conn_cache, 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 */
+ conn->inuse = TRUE;
+
+ /* Setup and init stuff before DO starts, in preparing for the transfer. */
+ do_init(conn);
+
/*
* Setup whatever necessary for a resumed transfer
*/
result = setup_range(data);
if(result)
- return result;
+ goto out;
/* Continue connectdata initialization here. */
@@ -4927,8 +5845,6 @@ static CURLcode create_conn(struct SessionHandle *data,
* Inherit the proper values from the urldata struct AFTER we have arranged
* the persistent connection stuff
*/
- conn->fread_func = data->set.fread_func;
- conn->fread_in = data->set.in;
conn->seek_func = data->set.seek_func;
conn->seek_client = data->set.seek_client;
@@ -4937,28 +5853,33 @@ static CURLcode create_conn(struct SessionHandle *data,
*************************************************************/
result = resolve_server(data, conn, async);
+ out:
+
+ free(options);
+ free(passwd);
+ free(user);
+ free(proxy);
return result;
}
-/* setup_conn() is called after the name resolve initiated in
+/* Curl_setup_conn() is called after the name resolve initiated in
* create_conn() is all done.
*
- * setup_conn() also handles reused connections
+ * Curl_setup_conn() also handles reused connections
*
* conn->data MUST already have been setup fine (in create_conn)
*/
-static CURLcode setup_conn(struct connectdata *conn,
- bool *protocol_done)
+CURLcode Curl_setup_conn(struct connectdata *conn,
+ bool *protocol_done)
{
- CURLcode result=CURLE_OK;
+ CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
Curl_pgrsTime(data, TIMER_NAMELOOKUP);
- if(conn->protocol & PROT_FILE) {
- /* There's nothing in this function to setup if we're only doing
- a file:// transfer */
+ if(conn->handler->flags & PROTOPT_NONETWORK) {
+ /* nothing to setup when not using a network */
*protocol_done = TRUE;
return result;
}
@@ -4989,47 +5910,23 @@ static CURLcode setup_conn(struct connectdata *conn,
data->state.crlf_conversions = 0; /* reset CRLF conversion counter */
#endif /* CURL_DO_LINEEND_CONV */
- for(;;) {
- /* loop for CURL_SERVER_CLOSED_CONNECTION */
+ /* set start time here for timeout purposes in the connect procedure, it
+ is later set again for the progress meter purpose */
+ conn->now = Curl_tvnow();
- if(CURL_SOCKET_BAD == conn->sock[FIRSTSOCKET]) {
- /* Try to connect only if not already connected */
- bool connected = FALSE;
-
- result = ConnectPlease(data, conn, &connected);
-
- if(connected) {
- result = Curl_protocol_connect(conn, protocol_done);
- if(CURLE_OK == result)
- conn->bits.tcpconnect = TRUE;
- }
- else
- conn->bits.tcpconnect = FALSE;
-
- /* if the connection was closed by the server while exchanging
- authentication informations, retry with the new set
- authentication information */
- if(conn->bits.proxy_connect_closed) {
- /* reset the error buffer */
- if(data->set.errorbuffer)
- data->set.errorbuffer[0] = '\0';
- data->state.errorbuf = FALSE;
- continue;
- }
-
- if(CURLE_OK != result)
- return result;
- }
- else {
- Curl_pgrsTime(data, TIMER_CONNECT); /* we're connected already */
- Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
- conn->bits.tcpconnect = TRUE;
- *protocol_done = TRUE;
- Curl_verboseconnect(conn);
- Curl_updateconninfo(conn, conn->sock[FIRSTSOCKET]);
- }
- /* Stop the loop now */
- break;
+ if(CURL_SOCKET_BAD == conn->sock[FIRSTSOCKET]) {
+ conn->bits.tcpconnect[FIRSTSOCKET] = FALSE;
+ result = Curl_connecthost(conn, conn->dns_entry);
+ if(result)
+ return result;
+ }
+ else {
+ Curl_pgrsTime(data, TIMER_CONNECT); /* we're connected already */
+ Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
+ conn->bits.tcpconnect[FIRSTSOCKET] = TRUE;
+ *protocol_done = TRUE;
+ Curl_updateconninfo(conn, conn->sock[FIRSTSOCKET]);
+ Curl_verboseconnect(conn);
}
conn->now = Curl_tvnow(); /* time this *after* the connect is done, we
@@ -5056,68 +5953,41 @@ CURLcode Curl_connect(struct SessionHandle *data,
bool *asyncp,
bool *protocol_done)
{
- CURLcode code;
+ CURLcode result;
*asyncp = FALSE; /* assume synchronous resolves by default */
/* call the stuff that needs to be called */
- code = create_conn(data, in_connect, asyncp);
+ result = create_conn(data, in_connect, asyncp);
- if(CURLE_OK == code) {
+ if(!result) {
/* no error */
if((*in_connect)->send_pipe->size || (*in_connect)->recv_pipe->size)
/* pipelining */
*protocol_done = TRUE;
- else if (!*asyncp) {
+ else if(!*asyncp) {
/* 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) */
- code = setup_conn(*in_connect, protocol_done);
+ result = Curl_setup_conn(*in_connect, protocol_done);
}
}
- 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); /* close the connection */
- *in_connect = NULL; /* return a NULL */
- }
-
- return code;
-}
-
-/* Call this function after Curl_connect() has returned async=TRUE and
- then a successful name resolve has been received.
-
- Note: this function disconnects and frees the conn data in case of
- resolve failure */
-CURLcode Curl_async_resolved(struct connectdata *conn,
- bool *protocol_done)
-{
-#ifdef CURLRES_ASYNCH
- CURLcode code;
-
- if(conn->async.dns) {
- conn->dns_entry = conn->async.dns;
- conn->async.dns = NULL;
+ if(result == CURLE_NO_CONNECTION_AVAILABLE) {
+ *in_connect = NULL;
+ return result;
}
- code = setup_conn(conn, protocol_done);
-
- if(code)
+ if(result && *in_connect) {
/* We're not allowed to return failure with memory left allocated
in the connectdata struct, free those here */
- Curl_disconnect(conn); /* close the connection */
+ Curl_disconnect(*in_connect, FALSE); /* close the connection */
+ *in_connect = NULL; /* return a NULL */
+ }
- return code;
-#else
- (void)conn;
- (void)protocol_done;
- return CURLE_OK;
-#endif
+ return result;
}
-
CURLcode Curl_done(struct connectdata **connp,
CURLcode status, /* an error if this is called after an
error was detected */
@@ -5132,57 +6002,67 @@ CURLcode Curl_done(struct connectdata **connp,
conn = *connp;
data = conn->data;
- if(conn->bits.done)
+ DEBUGF(infof(data, "Curl_done\n"));
+
+ if(data->state.done)
/* Stop if Curl_done() has already been called */
return CURLE_OK;
Curl_getoff_all_pipelines(data, conn);
+ /* Cleanup possible redirect junk */
+ free(data->req.newurl);
+ data->req.newurl = NULL;
+ free(data->req.location);
+ data->req.location = NULL;
+
+ switch(status) {
+ case CURLE_ABORTED_BY_CALLBACK:
+ case CURLE_READ_ERROR:
+ case CURLE_WRITE_ERROR:
+ /* When we're aborted due to a callback return code it basically have to
+ be counted as premature as there is trouble ahead if we don't. We have
+ many callbacks and protocols work differently, we could potentially do
+ this more fine-grained in the future. */
+ premature = TRUE;
+ default:
+ break;
+ }
+
+ /* this calls the protocol-specific function pointer previously set */
+ if(conn->handler->done)
+ result = conn->handler->done(conn, status, premature);
+ else
+ result = status;
+
+ if(!result && Curl_pgrsDone(conn))
+ result = CURLE_ABORTED_BY_CALLBACK;
+
if((conn->send_pipe->size + conn->recv_pipe->size != 0 &&
!data->set.reuse_forbid &&
- !conn->bits.close))
+ !conn->bits.close)) {
/* Stop if pipeline is not empty and we do not have to close
connection. */
+ DEBUGF(infof(data, "Connection still in use, no more Curl_done now!\n"));
return CURLE_OK;
-
- conn->bits.done = TRUE; /* called just now! */
-
- /* Cleanup possible redirect junk */
- if(data->req.newurl) {
- free(data->req.newurl);
- data->req.newurl = NULL;
- }
- if(data->req.location) {
- free(data->req.location);
- data->req.location = NULL;
}
+ data->state.done = TRUE; /* called just now! */
+ Curl_resolver_cancel(conn);
+
if(conn->dns_entry) {
Curl_resolv_unlock(data, conn->dns_entry); /* done with this */
conn->dns_entry = NULL;
}
- /* this calls the protocol-specific function pointer previously set */
- if(conn->handler->done)
- result = conn->handler->done(conn, status, premature);
- else
- result = CURLE_OK;
-
- Curl_pgrsDone(conn); /* done with the operation */
-
/* if the transfer was completed in a paused state there can be buffered
data left to write and then kill */
- if(data->state.tempwrite) {
- free(data->state.tempwrite);
- data->state.tempwrite = NULL;
- }
-
- /* for ares-using, make sure all possible outstanding requests are properly
- cancelled before we proceed */
- ares_cancel(data->state.areschannel);
+ free(data->state.tempwrite);
+ data->state.tempwrite = NULL;
/* if data->set.reuse_forbid is TRUE, it means the libcurl client has
- forced us to close this no matter what we think.
+ forced us to close this connection. This is ignored for requests taking
+ place in a NTLM authentication handshake
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
@@ -5193,13 +6073,15 @@ CURLcode Curl_done(struct connectdata **connp,
state it is for re-using, so we're forced to close it. In a perfect world
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.
-
- connectindex == -1 here means that the connection has no spot in the
- connection cache and thus we must disconnect it here.
*/
- if(data->set.reuse_forbid || conn->bits.close || premature ||
- (-1 == conn->connectindex)) {
- CURLcode res2 = Curl_disconnect(conn); /* close the connection */
+
+ if((data->set.reuse_forbid
+#if defined(USE_NTLM)
+ && !(conn->ntlm.state == NTLMSTATE_TYPE2 ||
+ conn->proxyntlm.state == NTLMSTATE_TYPE2)
+#endif
+ ) || 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
if we got a new error, return that. */
@@ -5207,20 +6089,24 @@ CURLcode Curl_done(struct connectdata **connp,
result = res2;
}
else {
- ConnectionDone(conn); /* the connection is no longer in use */
-
- /* remember the most recently used connection */
- data->state.lastconnect = conn->connectindex;
-
- infof(data, "Connection #%ld to host %s left intact\n",
- conn->connectindex,
- conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname);
+ /* the connection is no longer in use */
+ if(ConnectionDone(data, conn)) {
+ /* remember the most recently used connection */
+ data->state.lastconnect = conn;
+
+ infof(data, "Connection #%ld to host %s left intact\n",
+ conn->connection_id,
+ conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname);
+ }
+ else
+ data->state.lastconnect = NULL;
}
*connp = NULL; /* to make the caller of this function better detect that
this was either closed or handed over to the connection
cache here, and therefore cannot be used from this point on
*/
+ Curl_free_request_state(data);
return result;
}
@@ -5238,7 +6124,7 @@ static CURLcode do_init(struct connectdata *conn)
struct SessionHandle *data = conn->data;
struct SingleRequest *k = &data->req;
- conn->bits.done = FALSE; /* Curl_done() is not called yet */
+ data->state.done = FALSE; /* Curl_done() is not called yet */
conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to use */
data->state.expect100header = FALSE;
@@ -5253,9 +6139,6 @@ static CURLcode do_init(struct connectdata *conn)
HTTP. */
data->set.httpreq = HTTPREQ_GET;
- /* NB: the content encoding software depends on this initialization */
- Curl_easy_initHandleData(data);
-
k->start = Curl_tvnow(); /* start time */
k->now = k->start; /* current time is now */
k->header = TRUE; /* assume header */
@@ -5267,7 +6150,6 @@ static CURLcode do_init(struct connectdata *conn)
k->hbufp = data->state.headerbuff;
k->ignorebody=FALSE;
- Curl_pgrsTime(data, TIMER_PRETRANSFER);
Curl_speedinit(data);
Curl_pgrsSetUploadCounter(data, 0);
@@ -5287,6 +6169,7 @@ static void do_complete(struct connectdata *conn)
conn->data->req.chunk=FALSE;
conn->data->req.maxfd = (conn->sockfd>conn->writesockfd?
conn->sockfd:conn->writesockfd)+1;
+ Curl_pgrsTime(conn->data, TIMER_PRETRANSFER);
}
CURLcode Curl_do(struct connectdata **connp, bool *done)
@@ -5295,63 +6178,61 @@ CURLcode Curl_do(struct connectdata **connp, bool *done)
struct connectdata *conn = *connp;
struct SessionHandle *data = conn->data;
- /* setup and init stuff before DO starts, in preparing for the transfer */
- do_init(conn);
-
if(conn->handler->do_it) {
/* generic protocol-specific function pointer set in curl_connect() */
result = conn->handler->do_it(conn, done);
/* This was formerly done in transfer.c, but we better do it here */
if((CURLE_SEND_ERROR == result) && conn->bits.reuse) {
- /*
- * If the connection is using an easy handle, call reconnect
- * to re-establish the connection. Otherwise, let the multi logic
- * figure out how to re-establish the connection.
- */
- if(!data->multi) {
- result = Curl_reconnect_request(connp);
-
- if(result == CURLE_OK) {
- /* ... finally back to actually retry the DO phase */
- result = conn->handler->do_it(conn, done);
- }
- }
- else {
- return result;
+ /*
+ * If the connection is using an easy handle, call reconnect
+ * to re-establish the connection. Otherwise, let the multi logic
+ * figure out how to re-establish the connection.
+ */
+ if(!data->multi) {
+ result = Curl_reconnect_request(connp);
+
+ if(!result) {
+ /* ... finally back to actually retry the DO phase */
+ conn = *connp; /* re-assign conn since Curl_reconnect_request
+ creates a new connection */
+ result = conn->handler->do_it(conn, done);
}
+ }
+ else
+ return result;
}
- if((result == CURLE_OK) && *done)
+ if(!result && *done)
/* do_complete must be called after the protocol-specific DO function */
do_complete(conn);
}
return result;
}
-CURLcode Curl_do_more(struct connectdata *conn)
+/*
+ * Curl_do_more() is called during the DO_MORE multi state. It is basically a
+ * second stage DO state which (wrongly) was introduced to support FTP's
+ * second connection.
+ *
+ * TODO: A future libcurl should be able to work away this state.
+ *
+ * 'complete' can return 0 for incomplete, 1 for done and -1 for go back to
+ * DOING state there's more work to do!
+ */
+
+CURLcode Curl_do_more(struct connectdata *conn, int *complete)
{
CURLcode result=CURLE_OK;
+ *complete = 0;
+
if(conn->handler->do_more)
- result = conn->handler->do_more(conn);
+ result = conn->handler->do_more(conn, complete);
- if(result == CURLE_OK)
+ if(!result && (*complete == 1))
/* do_complete must be called after the protocol-specific DO function */
do_complete(conn);
return result;
}
-
-/* Called on connect, and if there's already a protocol-specific struct
- allocated for a different connection, this frees it that it can be setup
- properly later on. */
-void Curl_reset_reqproto(struct connectdata *conn)
-{
- struct SessionHandle *data = conn->data;
- if(data->state.proto.generic && data->state.current_conn != conn) {
- free(data->state.proto.generic);
- data->state.proto.generic = NULL;
- }
- data->state.current_conn = conn;
-}
diff --git a/lib/url.h b/lib/url.h
index 63d7f2c4..e49b7724 100644
--- a/lib/url.h
+++ b/lib/url.h
@@ -1,5 +1,5 @@
-#ifndef __URL_H
-#define __URL_H
+#ifndef HEADER_CURL_URL_H
+#define HEADER_CURL_URL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,8 +21,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#include <stdarg.h> /* to make sure we have ap_list */
+#include "curl_setup.h"
/*
* Prototypes for library-wide functions provided by url.c
@@ -37,25 +36,16 @@ void Curl_freeset(struct SessionHandle * data);
CURLcode Curl_close(struct SessionHandle *data); /* opposite of curl_open() */
CURLcode Curl_connect(struct SessionHandle *, struct connectdata **,
bool *async, bool *protocol_connect);
-CURLcode Curl_async_resolved(struct connectdata *conn,
- bool *protocol_connect);
CURLcode Curl_do(struct connectdata **, bool *done);
-CURLcode Curl_do_more(struct connectdata *);
+CURLcode Curl_do_more(struct connectdata *, int *completed);
CURLcode Curl_done(struct connectdata **, CURLcode, bool premature);
-CURLcode Curl_disconnect(struct connectdata *);
+CURLcode Curl_disconnect(struct connectdata *, bool dead_connection);
CURLcode Curl_protocol_connect(struct connectdata *conn, bool *done);
CURLcode Curl_protocol_connecting(struct connectdata *conn, bool *done);
CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done);
-void Curl_safefree(void *ptr);
-
-/* create a connection cache */
-struct conncache *Curl_mk_connc(int type, long amount);
-/* free a connection cache */
-void Curl_rm_connc(struct conncache *c);
-/* Change number of entries of a connection cache */
-CURLcode Curl_ch_connc(struct SessionHandle *data,
- struct conncache *c,
- long newamount);
+CURLcode Curl_setup_conn(struct connectdata *conn,
+ bool *protocol_done);
+void Curl_free_request_state(struct SessionHandle *data);
int Curl_protocol_getsock(struct connectdata *conn,
curl_socket_t *socks,
@@ -76,21 +66,20 @@ void Curl_getoff_all_pipelines(struct SessionHandle *data,
void Curl_close_connections(struct SessionHandle *data);
-/* Called on connect, and if there's already a protocol-specific struct
- allocated for a different connection, this frees it that it can be setup
- properly later on. */
-void Curl_reset_reqproto(struct connectdata *conn);
-
#define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */
-#define CURL_DEFAULT_SOCKS5_GSSAPI_SERVICE "rcmd" /* default socks5 gssapi service */
+#define CURL_DEFAULT_SOCKS5_GSSAPI_SERVICE "rcmd" /* default socks5 gssapi
+ service */
+#define CURL_DEFAULT_PROXY_SERVICE_NAME "HTTP" /* default negotiate proxy
+ service */
+#define CURL_DEFAULT_SERVICE_NAME "HTTP" /* default negotiate service */
-CURLcode Curl_connected_proxy(struct connectdata *conn);
+CURLcode Curl_connected_proxy(struct connectdata *conn, int sockindex);
#ifdef CURL_DISABLE_VERBOSE_STRINGS
-#define Curl_verboseconnect(x) do { } while (0)
+#define Curl_verboseconnect(x) Curl_nop_stmt
#else
void Curl_verboseconnect(struct connectdata *conn);
#endif
-#endif
+#endif /* HEADER_CURL_URL_H */
diff --git a/lib/urldata.h b/lib/urldata.h
index 4d605915..05bda794 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1,5 +1,5 @@
-#ifndef __URLDATA_H
-#define __URLDATA_H
+#ifndef HEADER_CURL_URLDATA_H
+#define HEADER_CURL_URLDATA_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 @@
/* This file is for lib internal stuff */
-#include "setup.h"
+#include "curl_setup.h"
#define PORT_FTP 21
#define PORT_FTPS 990
@@ -40,6 +40,8 @@
#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
@@ -58,6 +60,17 @@
#define CURL_DEFAULT_USER "anonymous"
#define CURL_DEFAULT_PASSWORD "ftp@example.com"
+/* Convenience defines for checking protocols or their SSL based version. Each
+ protocol handler should only ever have a single CURLPROTO_ in its protocol
+ field. */
+#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
+
/* length of longest IPv6 address string including the trailing null */
#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
@@ -69,46 +82,32 @@
#include "cookie.h"
#include "formdata.h"
-#ifdef USE_SSLEAY
#ifdef USE_OPENSSL
-#include "openssl/rsa.h"
-#include "openssl/crypto.h"
-#include "openssl/x509.h"
-#include "openssl/pem.h"
-#include "openssl/ssl.h"
-#include "openssl/err.h"
+#include <openssl/ssl.h>
#ifdef HAVE_OPENSSL_ENGINE_H
#include <openssl/engine.h>
#endif
-#ifdef HAVE_OPENSSL_PKCS12_H
-#include <openssl/pkcs12.h>
-#endif
-#else /* SSLeay-style includes */
-#include "rsa.h"
-#include "crypto.h"
-#include "x509.h"
-#include "pem.h"
-#include "ssl.h"
-#include "err.h"
-#ifdef HAVE_OPENSSL_ENGINE_H
-#include <engine.h>
-#endif
-#ifdef HAVE_OPENSSL_PKCS12_H
-#include <pkcs12.h>
-#endif
#endif /* USE_OPENSSL */
-#ifdef USE_GNUTLS
-#error Configuration error; cannot use GnuTLS *and* OpenSSL.
-#endif
-#endif /* USE_SSLEAY */
#ifdef USE_GNUTLS
#include <gnutls/gnutls.h>
#endif
#ifdef USE_POLARSSL
-#include <polarssl/havege.h>
#include <polarssl/ssl.h>
+#include <polarssl/version.h>
+#if POLARSSL_VERSION_NUMBER<0x01010000
+#include <polarssl/havege.h>
+#else
+#include <polarssl/entropy.h>
+#include <polarssl/ctr_drbg.h>
+#endif /* POLARSSL_VERSION_NUMBER<0x01010000 */
+#endif /* USE_POLARSSL */
+
+#ifdef USE_CYASSL
+#undef OCSP_REQUEST /* avoid cyassl/openssl/ssl.h clash with wincrypt.h */
+#undef OCSP_RESPONSE /* avoid cyassl/openssl/ssl.h clash with wincrypt.h */
+#include <cyassl/openssl/ssl.h>
#endif
#ifdef USE_NSS
@@ -116,8 +115,29 @@
#include <pk11pub.h>
#endif
-#ifdef USE_QSOSSL
-#include <qsossl.h>
+#ifdef USE_GSKIT
+#include <gskssl.h>
+#endif
+
+#ifdef USE_AXTLS
+#include <axTLS/config.h>
+#include <axTLS/ssl.h>
+#undef malloc
+#undef calloc
+#undef realloc
+#endif /* USE_AXTLS */
+
+#ifdef USE_SCHANNEL
+#include "curl_sspi.h"
+#include <schnlsp.h>
+#include <schannel.h>
+#endif
+
+#ifdef USE_DARWINSSL
+#include <Security/Security.h>
+/* For some reason, when building for iOS, the omnibus header above does
+ * not include SecureTransport.h as of iOS SDK 5.1. */
+#include <Security/SecureTransport.h>
#endif
#ifdef HAVE_NETINET_IN_H
@@ -134,14 +154,6 @@
#endif
#endif
-#ifdef USE_ARES
-# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
- (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
-# define CARES_STATICLIB
-# endif
-# include <ares.h>
-#endif
-
#include <curl/curl.h>
#include "http_chunks.h" /* for the structs and enum stuff */
@@ -157,7 +169,9 @@
#include "ssh.h"
#include "http.h"
#include "rtsp.h"
+#include "smb.h"
#include "wildcard.h"
+#include "multihandle.h"
#ifdef HAVE_GSSAPI
# ifdef HAVE_GSSGNU
@@ -191,20 +205,38 @@
#define CURLMIN(x,y) ((x)<(y)?(x):(y))
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
-/* Types needed for krb4/5-ftp connections */
-struct krb4buffer {
+#ifdef HAVE_GSSAPI
+/* Types needed for krb5-ftp connections */
+struct krb5buffer {
void *data;
size_t size;
size_t index;
int eof_flag;
};
+
enum protection_level {
- prot_clear,
- prot_safe,
- prot_confidential,
- prot_private,
- prot_cmd
+ PROT_NONE, /* first in list */
+ PROT_CLEAR,
+ PROT_SAFE,
+ PROT_CONFIDENTIAL,
+ PROT_PRIVATE,
+ PROT_CMD,
+ PROT_LAST /* last in list */
+};
+#endif
+
+#ifdef USE_SCHANNEL
+/* Structs to store Schannel handles */
+struct curl_schannel_cred {
+ CredHandle cred_handle;
+ TimeStamp time_stamp;
+ int refcount;
+ bool cached;
+};
+
+struct curl_schannel_ctxt {
+ CtxtHandle ctxt_handle;
+ TimeStamp time_stamp;
};
#endif
@@ -231,49 +263,85 @@ struct ssl_connect_data {
current state of the connection. */
bool use;
ssl_connection_state state;
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
/* these ones requires specific SSL-types */
SSL_CTX* ctx;
SSL* handle;
X509* server_cert;
ssl_connect_state connecting_state;
-#endif /* USE_SSLEAY */
+#endif /* USE_OPENSSL */
#ifdef USE_GNUTLS
- gnutls_session session;
- gnutls_certificate_credentials cred;
+ gnutls_session_t session;
+ gnutls_certificate_credentials_t cred;
+#ifdef USE_TLS_SRP
+ gnutls_srp_client_credentials_t srp_client_cred;
+#endif
ssl_connect_state connecting_state;
#endif /* USE_GNUTLS */
#ifdef USE_POLARSSL
- havege_state hs;
+ ctr_drbg_context ctr_drbg;
+ entropy_context entropy;
ssl_context ssl;
ssl_session ssn;
int server_fd;
- x509_cert cacert;
- x509_cert clicert;
+ x509_crt cacert;
+ x509_crt clicert;
x509_crl crl;
rsa_context rsa;
+ ssl_connect_state connecting_state;
#endif /* USE_POLARSSL */
+#ifdef USE_CYASSL
+ SSL_CTX* ctx;
+ SSL* handle;
+ ssl_connect_state connecting_state;
+#endif /* USE_CYASSL */
#ifdef USE_NSS
PRFileDesc *handle;
char *client_nickname;
struct SessionHandle *data;
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
- PK11GenericObject *key;
- PK11GenericObject *cacert[2];
-#endif
+ struct curl_llist *obj_list;
+ 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;
+ ssl_connect_state connecting_state;
+#endif
+#ifdef USE_AXTLS
+ SSL_CTX* ssl_ctx;
+ SSL* ssl;
+ ssl_connect_state connecting_state;
+#endif /* USE_AXTLS */
+#ifdef USE_SCHANNEL
+ struct curl_schannel_cred *cred;
+ struct curl_schannel_ctxt *ctxt;
+ SecPkgContext_StreamSizes stream_sizes;
+ ssl_connect_state connecting_state;
+ size_t encdata_length, decdata_length;
+ size_t encdata_offset, decdata_offset;
+ unsigned char *encdata_buffer, *decdata_buffer;
+ unsigned long req_flags, ret_flags;
+ CURLcode recv_unrecoverable_err; /* schannel_recv had an unrecoverable err */
+ bool recv_sspi_close_notify; /* true if connection closed by close_notify */
+ bool recv_connection_closed; /* true if connection closed, regardless how */
+#endif /* USE_SCHANNEL */
+#ifdef USE_DARWINSSL
+ SSLContextRef ssl_ctx;
+ curl_socket_t ssl_sockfd;
+ ssl_connect_state connecting_state;
+ bool ssl_direction; /* true if writing, false if reading */
+ size_t ssl_write_buffered_length;
+#endif /* USE_DARWINSSL */
};
struct ssl_config_data {
long version; /* what version the client wants to use */
long certverifyresult; /* result from the certificate verification */
- long verifypeer; /* set TRUE if this is desired */
- long verifyhost; /* 0: no verify
- 1: check that CN exists
- 2: CN must match hostname */
+
+ 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 */
@@ -281,11 +349,18 @@ struct ssl_config_data {
char *random_file; /* path to file containing "random" data */
char *egdsocket; /* path to file containing the EGD daemon socket */
char *cipher_list; /* list of ciphers to use */
- long numsessions; /* SSL session id cache size */
+ size_t max_ssl_sessions; /* SSL session id cache size */
curl_ssl_ctx_callback fsslctx; /* function to initialize ssl ctx */
void *fsslctxp; /* parameter for call back */
bool sessionid; /* cache session IDs or not */
bool certinfo; /* gather lots of certificate info */
+ bool falsestart;
+
+#ifdef USE_TLS_SRP
+ char *username; /* TLS username (for, e.g., SRP) */
+ char *password; /* TLS password (for, e.g., SRP) */
+ enum CURL_TLSAUTH authtype; /* TLS authentication type (default SRP) */
+#endif
};
/* information stored about one single SSL session */
@@ -294,12 +369,16 @@ struct curl_ssl_session {
void *sessionid; /* as returned from the SSL layer */
size_t idsize; /* if known, otherwise 0 */
long age; /* just a number, the higher the more recent */
- unsigned short remote_port; /* remote port to connect to */
+ int remote_port; /* remote port to connect to */
struct ssl_config_data ssl_config; /* setup for this 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;
@@ -309,6 +388,7 @@ struct digestdata {
char *qop;
char *algorithm;
int nc; /* nounce count */
+#endif
};
typedef enum {
@@ -327,34 +407,69 @@ typedef enum {
#include <iconv.h>
#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 handle;
- CtxtHandle c_handle;
+ CredHandle *credentials;
+ CtxtHandle *context;
SEC_WINNT_AUTH_IDENTITY identity;
SEC_WINNT_AUTH_IDENTITY *p_identity;
- int has_handles;
- void *type_2;
- int n_type_2;
+ size_t token_max;
+ BYTE *output_token;
+ BYTE *input_token;
+ size_t input_token_len;
#else
unsigned int flags;
unsigned char nonce[8];
+ void* target_info; /* TargetInfo received in the ntlm type-2 message */
+ unsigned int target_info_len;
#endif
};
+#endif
-#ifdef HAVE_GSSAPI
+#ifdef USE_SPNEGO
struct negotiatedata {
- /* when doing Negotiate we first need to receive an auth token and then we
- need to send our header */
+ /* When doing Negotiate (SPNEGO) auth, we first need to send a token
+ and then validate the received one. */
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;
gss_name_t server_name;
gss_buffer_desc output_token;
+#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;
+ BYTE *output_token;
+ size_t output_token_length;
+#endif
+#endif
};
#endif
@@ -363,6 +478,7 @@ struct negotiatedata {
* Boolean values that concerns this connection.
*/
struct ConnectBits {
+ /* always modify bits.close with the connclose() and connkeep() macros! */
bool close; /* if set, we close the connection after this request */
bool reuse; /* if set, this is a re-used connection */
bool proxy; /* if set, this transfer is done through a proxy - any type */
@@ -375,8 +491,7 @@ struct ConnectBits {
bool do_more; /* this is set TRUE if the ->curl_do_more() function is
supposed to be called, after ->curl_do() */
-
- bool tcpconnect; /* the TCP layer (or similar) is connected, this is set
+ bool tcpconnect[2]; /* the TCP layer (or similar) is connected, this is set
the first time on the first connect function call */
bool protoconnstart;/* the protocol layer has STARTED its operation after
the TCP layer connect */
@@ -387,8 +502,6 @@ struct ConnectBits {
This is implicit when SSL-protocols are used through
proxies, but can also be enabled explicitly by
apps */
- bool tunnel_connecting; /* TRUE while we're still waiting for a proxy CONNECT
- */
bool authneg; /* TRUE when the auth phase has started, which means
that we are creating a request with an auth header,
but it is not the final request in the auth
@@ -406,11 +519,6 @@ struct ConnectBits {
requests */
bool netrc; /* name+password provided by netrc */
bool userpwd_in_url; /* name+password found in url */
-
- bool done; /* set to FALSE when Curl_do() is called and set to TRUE
- when Curl_done() is called, to prevent Curl_done() to
- get invoked twice when the multi interface is
- used. */
bool stream_was_rewound; /* Indicates that the stream was rewound after a
request read past the end of its response byte
boundary */
@@ -420,6 +528,7 @@ struct ConnectBits {
bool bound; /* set true if bind() has already been done on this socket/
connection */
bool type_set; /* type= was used in the URL */
+ bool multiplex; /* connection is multiplexed */
};
struct hostname {
@@ -474,10 +583,9 @@ struct Curl_async {
/* These function pointer types are here only to allow easier typecasting
within the source when we need to cast between data pointers (such as NULL)
and function pointers. */
-typedef CURLcode (*Curl_do_more_func)(struct connectdata *);
+typedef CURLcode (*Curl_do_more_func)(struct connectdata *, int *);
typedef CURLcode (*Curl_done_func)(struct connectdata *, CURLcode, bool);
-
enum expect100 {
EXP100_SEND_DATA, /* enough waiting, just send the body now */
EXP100_AWAITING_CONTINUE, /* waiting for the 100 Continue header */
@@ -486,6 +594,13 @@ enum expect100 {
EXP100_FAILED /* used on 417 Expectation Failed */
};
+enum upgrade101 {
+ UPGR101_INIT, /* default state */
+ UPGR101_REQUESTED, /* upgrade requested */
+ UPGR101_RECEIVED, /* response received */
+ UPGR101_WORKING /* talking upgraded protocol */
+};
+
/*
* Request specific data in the easy handle (SessionHandle). Previously,
* these members were on the connectdata struct but since a conn struct may
@@ -506,7 +621,7 @@ struct SingleRequest {
long headerbytecount; /* only count received headers */
long deductheadercount; /* this amount of bytes doesn't count when we check
- if anything has been transfered at the end of a
+ if anything has been transferred at the end of a
connection. We use this counter to make only a
100 reply (without a following second response
code) result in a CURLE_GOT_NOTHING error code */
@@ -536,8 +651,9 @@ struct SingleRequest {
'RTSP/1.? XXX' line */
struct timeval start100; /* time stamp to wait for the 100 code from */
enum expect100 exp100; /* expect 100 continue state */
+ enum upgrade101 upgr101; /* 101 upgrade state */
- int content_encoding; /* What content encoding. sec 3.5, RFC2616. */
+ int auto_decoding; /* What content encoding. sec 3.5, RFC2616. */
#define IDENTITY 0 /* No encoding */
#define DEFLATE 1 /* zlib deflate [RFC 1950 & 1951] */
@@ -589,6 +705,9 @@ struct SingleRequest {
bool forbidchunk; /* used only to explicitly forbid chunk-upload for
specific upload buffers. See readmoredata() in
http.c for details. */
+
+ void *protop; /* Allocated protocol-specific data. Each protocol
+ handler makes sure this points to data it needs. */
};
/*
@@ -635,6 +754,12 @@ struct Curl_handler {
curl_socket_t *socks,
int numsocks);
+ /* Called from the multi interface during the DO_MORE phase, and it should
+ then return a proper fd set */
+ int (*domore_getsock)(struct connectdata *conn,
+ curl_socket_t *socks,
+ int numsocks);
+
/* Called from the multi interface during the DO_DONE, PERFORM and
WAITPERFORM phases, and it should then return a proper fd set. Not setting
this will make libcurl use the generic default one. */
@@ -643,14 +768,41 @@ struct Curl_handler {
int numsocks);
/* This function *MAY* be set to a protocol-dependent function that is run
- * by the curl_disconnect(), as a step in the disconnection.
+ * by the curl_disconnect(), as a step in the disconnection. If the handler
+ * is called because the connection has been considered dead, dead_connection
+ * is set to TRUE.
*/
- CURLcode (*disconnect)(struct connectdata *);
+ CURLcode (*disconnect)(struct connectdata *, bool dead_connection);
- long defport; /* Default port. */
- long protocol; /* PROT_* flags concerning the protocol set */
+ /* If used, this function gets called from transfer.c:readwrite_data() to
+ allow the protocol to do extra reads/writes */
+ CURLcode (*readwrite)(struct SessionHandle *data, struct connectdata *conn,
+ ssize_t *nread, bool *readmore);
+
+ long defport; /* Default port. */
+ unsigned int protocol; /* See CURLPROTO_* - this needs to be the single
+ specific protocol bit */
+ unsigned int flags; /* Extra particular characteristics, see PROTOPT_* */
};
+#define PROTOPT_NONE 0 /* nothing extra */
+#define PROTOPT_SSL (1<<0) /* uses SSL */
+#define PROTOPT_DUAL (1<<1) /* this protocol uses two connections */
+#define PROTOPT_CLOSEACTION (1<<2) /* need action before socket close */
+/* some protocols will have to call the underlying functions without regard to
+ what exact state the socket signals. IE even if the socket says "readable",
+ the send function might need to be called while uploading, or vice versa.
+*/
+#define PROTOPT_DIRLOCK (1<<3)
+#define PROTOPT_NONETWORK (1<<4) /* protocol doesn't use the network! */
+#define PROTOPT_NEEDSPWD (1<<5) /* needs a password, and if none is set it
+ gets a default */
+#define PROTOPT_NOURLQUERY (1<<6) /* protocol can't handle
+ url query strings (?foo=bar) ! */
+#define PROTOPT_CREDSPERREQUEST (1<<7) /* requires login credentials per
+ request instead of per connection */
+
+
/* return the count of bytes sent, or -1 on error */
typedef ssize_t (Curl_send)(struct connectdata *conn, /* connection data */
int sockindex, /* socketindex */
@@ -680,52 +832,17 @@ struct connectdata {
and a HTTP proxy may in fact respond using chunked encoding */
struct Curl_chunker chunk;
+ curl_closesocket_callback fclosesocket; /* function closing the socket(s) */
+ void *closesocket_client;
+
bool inuse; /* This is a marker for the connection cache logic. If this is
TRUE this handle is being used by an easy handle and cannot
be used by any other easy handle without careful
consideration (== only for pipelining). */
/**** Fields set when inited and not modified again */
- long connectindex; /* what index in the connection cache connects index this
- particular struct has */
- long protocol; /* PROT_* flags concerning the protocol set */
-#define PROT_HTTP CURLPROTO_HTTP
-#define PROT_HTTPS CURLPROTO_HTTPS
-#define PROT_FTP CURLPROTO_FTP
-#define PROT_TELNET CURLPROTO_TELNET
-#define PROT_DICT CURLPROTO_DICT
-#define PROT_LDAP CURLPROTO_LDAP
-#define PROT_FILE CURLPROTO_FILE
-#define PROT_FTPS CURLPROTO_FTPS
-#define PROT_TFTP CURLPROTO_TFTP
-#define PROT_SCP CURLPROTO_SCP
-#define PROT_SFTP CURLPROTO_SFTP
-#define PROT_IMAP CURLPROTO_IMAP
-#define PROT_IMAPS CURLPROTO_IMAPS
-#define PROT_POP3 CURLPROTO_POP3
-#define PROT_POP3S CURLPROTO_POP3S
-#define PROT_SMTP CURLPROTO_SMTP
-#define PROT_SMTPS CURLPROTO_SMTPS
-#define PROT_RTSP CURLPROTO_RTSP
-#define PROT_RTMP CURLPROTO_RTMP
-#define PROT_RTMPT CURLPROTO_RTMPT
-#define PROT_RTMPE CURLPROTO_RTMPE
-#define PROT_RTMPTE CURLPROTO_RTMPTE
-#define PROT_RTMPS CURLPROTO_RTMPS
-#define PROT_RTMPTS CURLPROTO_RTMPTS
-#define PROT_GOPHER CURLPROTO_GOPHER
-
-/* (1<<25) is currently the highest used bit in the public bitmask. We make
- sure we use "private bits" above the public ones to make things easier;
- Gopher will not conflict with the current bit 25. */
-
-#define PROT_EXTMASK 0x03ffffff
-
-#define PROT_SSL (1<<29) /* protocol requires SSL */
-
-/* these ones need action before socket close */
-#define PROT_CLOSEACTION (PROT_FTP | PROT_IMAP | PROT_POP3)
-#define PROT_DUALCHANNEL PROT_FTP /* these protocols use two connections */
+ long connection_id; /* Contains a unique number to make it easier to
+ track the connections in the log output */
/* 'dns_entry' is the particular host we use. This points to an entry in the
DNS cache and it will not get pruned while locked. It gets unlocked in
@@ -737,13 +854,14 @@ struct connectdata {
within the DNS cache, so this pointer is only valid as long as the DNS
cache entry remains locked. It gets unlocked in Curl_done() */
Curl_addrinfo *ip_addr;
+ Curl_addrinfo *tempaddr[2]; /* for happy eyeballs */
/* 'ip_addr_str' is the ip_addr data as a human readable string.
It remains available as long as the connection does, which is longer than
the ip_addr itself. */
char ip_addr_str[MAX_IPADR_LEN];
- unsigned int scope; /* address scope for IPv6 */
+ unsigned int scope_id; /* Scope id for IPv6 */
int socktype; /* SOCK_STREAM or SOCK_DGRAM */
@@ -751,11 +869,30 @@ struct connectdata {
struct hostname proxy;
long port; /* which port to use locally */
- unsigned short remote_port; /* what remote port to connect to,
- not the proxy port! */
+ int remote_port; /* what remote port to connect to, not the proxy port! */
+
+ /* 'primary_ip' and 'primary_port' get filled with peer's numerical
+ ip address and port number whenever an outgoing connection is
+ *attempted* from the primary socket to a remote address. When more
+ than one address is tried for a connection these will hold data
+ for the last attempt. When the connection is actually established
+ these are updated with data which comes directly from the socket. */
+
+ char primary_ip[MAX_IPADR_LEN];
+ long primary_port;
+
+ /* 'local_ip' and 'local_port' get filled with local's numerical
+ ip address and port number whenever an outgoing connection is
+ **established** from the primary socket to a remote address. */
+
+ char local_ip[MAX_IPADR_LEN];
+ long local_port;
char *user; /* user name string, allocated */
char *passwd; /* password string, allocated */
+ char *options; /* options string, allocated */
+
+ char *xoauth2_bearer; /* bearer token for xoauth2, allocated */
char *proxyuser; /* proxy user name string, allocated */
char *proxypasswd; /* proxy password string, allocated */
@@ -768,7 +905,9 @@ struct connectdata {
struct timeval created; /* creation time */
curl_socket_t sock[2]; /* two sockets, the second is used for the data
transfer when doing FTP */
-
+ curl_socket_t tempsock[2]; /* temporary sockets for happy eyeballs */
+ bool sock_accepted[2]; /* TRUE if the socket on this index was created with
+ accept() */
Curl_recv *recv[2];
Curl_send *send[2];
@@ -777,7 +916,19 @@ struct connectdata {
struct ConnectBits bits; /* various state-flags for this connection */
- const struct Curl_handler * handler; /* Connection's protocol handler. */
+ /* connecttime: when connect() is called on the current IP address. Used to
+ be able to track when to move on to try next IP - but only when the multi
+ interface is used. */
+ struct timeval connecttime;
+ /* The two fields below get set in Curl_connecthost */
+ int num_addr; /* number of addresses to try to connect to */
+ long timeoutms_per_addr; /* how long time in milliseconds to spend on
+ trying to connect to each IP address */
+
+ const struct Curl_handler *handler; /* Connection's protocol handler */
+ const struct Curl_handler *given; /* The protocol first given */
+
+ long ip_version; /* copied from the SessionHandle at creation time */
/**** curl_get() phase fields */
@@ -786,32 +937,37 @@ struct connectdata {
well be the same we read from.
CURL_SOCKET_BAD disables */
- /** Dynamicly allocated strings, may need to be freed before this **/
- /** struct is killed. **/
+ /** Dynamicly allocated strings, MUST be freed before this **/
+ /** struct is killed. **/
struct dynamically_allocated_data {
- char *proxyuserpwd; /* free later if not NULL! */
- char *uagent; /* free later if not NULL! */
- char *accept_encoding; /* free later if not NULL! */
- char *userpwd; /* free later if not NULL! */
- char *rangeline; /* free later if not NULL! */
- char *ref; /* free later if not NULL! */
- char *host; /* free later if not NULL */
- char *cookiehost; /* free later if not NULL */
- char *rtsp_transport; /* free later if not NULL */
+ char *proxyuserpwd;
+ char *uagent;
+ char *accept_encoding;
+ char *userpwd;
+ char *rangeline;
+ char *ref;
+ char *host;
+ char *cookiehost;
+ char *rtsp_transport;
+ char *te; /* TE: request header */
} allocptr;
- int sec_complete; /* if kerberos is enabled for this connection */
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
+#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;
size_t buffer_size;
- struct krb4buffer in_buffer;
+ struct krb5buffer in_buffer;
void *app_data;
const struct Curl_sec_client_mech *mech;
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. */
@@ -820,19 +976,10 @@ struct connectdata {
handle */
bool writechannel_inuse; /* whether the write channel is in use by an easy
handle */
- bool server_supports_pipelining; /* TRUE if server supports pipelining,
- set after first response */
-
struct curl_llist *send_pipe; /* List of handles waiting to
send on this pipeline */
struct curl_llist *recv_pipe; /* List of handles waiting to read
their responses on this pipeline */
- struct curl_llist *pend_pipe; /* List of pending handles on
- this pipeline */
- struct curl_llist *done_pipe; /* Handles that are finished, but
- still reference this connectdata */
-#define MAX_PIPELINE_LENGTH 5
-
char* master_buffer; /* The master buffer allocated on-demand;
used for pipelining. */
size_t read_pos; /* Current read position in the master buffer */
@@ -844,15 +991,21 @@ struct connectdata {
/*************** Request - specific items ************/
- /* previously this was in the urldata struct */
- 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)
+ /* 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() */
#ifdef CURLRES_ASYNCH
@@ -867,13 +1020,15 @@ struct connectdata {
union {
struct ftp_conn ftpc;
+ struct http_conn httpc;
struct ssh_conn sshc;
struct tftp_state_data *tftpc;
struct imap_conn imapc;
struct pop3_conn pop3c;
struct smtp_conn smtpc;
struct rtsp_conn rtspc;
- void *generic;
+ struct smb_conn smbc;
+ void *generic; /* RTMP and LDAP use this */
} proto;
int cselect_bits; /* bitmask of socket events */
@@ -883,8 +1038,27 @@ struct connectdata {
int socks5_gssapi_enctype;
#endif
- long verifypeer;
- long verifyhost;
+ bool verifypeer;
+ bool verifyhost;
+
+ /* When this connection is created, store the conditions for the local end
+ bind. This is stored before the actual bind and before any connection is
+ made and will serve the purpose of being used for comparison reasons so
+ that subsequent bound-requested connections aren't accidentally re-using
+ wrong connections. */
+ char *localdev;
+ unsigned short localport;
+ int localportrange;
+
+ /* tunnel as in tunnel through a HTTP proxy with CONNECT */
+ enum {
+ TUNNEL_INIT, /* init/default/no tunnel state */
+ TUNNEL_CONNECT, /* CONNECT has been sent off */
+ TUNNEL_COMPLETE /* CONNECT response received completely */
+ } tunnel_state[2]; /* two separate ones to allow FTP */
+ struct connectbundle *bundle; /* The bundle we are member of */
+
+ int negnpn; /* APLN or NPN TLS negotiated protocol, CURL_HTTP_VERSION* */
};
/* The end of connectdata. */
@@ -904,20 +1078,26 @@ struct PureInfo {
thus made the document NOT get fetched */
long header_size; /* size of read header(s) in bytes */
long request_size; /* the amount of bytes sent in the request(s) */
- long proxyauthavail; /* what proxy auth types were announced */
- long httpauthavail; /* what host auth types were announced */
+ unsigned long proxyauthavail; /* what proxy auth types were announced */
+ unsigned long httpauthavail; /* what host auth types were announced */
long numconnects; /* how many new connection did libcurl created */
char *contenttype; /* the content type of the object */
char *wouldredirect; /* URL this would've been redirected to if asked to */
- char ip[MAX_IPADR_LEN]; /* this buffer gets the numerical ip version stored
- at the connect *attempt* so it will get the last
- tried connect IP even on failures */
- long port; /* the remote port the last connection was established to */
- char localip[MAX_IPADR_LEN]; /* this buffer gets the numerical (local) ip
- stored from where the last connection was
- established */
- long localport; /* the local (src) port the last connection
- originated from */
+
+ /* PureInfo members 'conn_primary_ip', 'conn_primary_port', 'conn_local_ip'
+ and, 'conn_local_port' are copied over from the connectdata struct in
+ order to allow curl_easy_getinfo() to return this information even when
+ the session handle is no longer associated with a connection, and also
+ allow curl_easy_reset() to clear this information from the session handle
+ without disturbing information which is still alive, and that might be
+ reused, in the connection cache. */
+
+ char conn_primary_ip[MAX_IPADR_LEN];
+ long conn_primary_port;
+
+ char conn_local_ip[MAX_IPADR_LEN];
+ long conn_local_port;
+
struct curl_certinfo certs; /* info about the certs, only populated in
OpenSSL builds. Asked for with
CURLOPT_CERTINFO / CURLINFO_CERTINFO */
@@ -929,8 +1109,8 @@ struct Progress {
force redraw at next call */
curl_off_t size_dl; /* total expected size */
curl_off_t size_ul; /* total expected size */
- curl_off_t downloaded; /* transfered so far */
- curl_off_t uploaded; /* transfered so far */
+ curl_off_t downloaded; /* transferred so far */
+ curl_off_t uploaded; /* transferred so far */
curl_off_t current_speed; /* uses the currently fastest transfer */
@@ -952,6 +1132,8 @@ struct Progress {
struct timeval start;
struct timeval t_startsingle;
+ struct timeval t_startop;
+ struct timeval t_acceptdata;
#define CURR_TIME (5+1) /* 6 entries for 5 seconds */
curl_off_t speeder[ CURR_TIME ];
@@ -996,15 +1178,13 @@ typedef enum {
* Session-data MUST be put in the connectdata struct and here. */
#define MAX_CURL_USER_LENGTH 256
#define MAX_CURL_PASSWORD_LENGTH 256
-#define MAX_CURL_USER_LENGTH_TXT "255"
-#define MAX_CURL_PASSWORD_LENGTH_TXT "255"
struct auth {
- long want; /* Bitmask set to the authentication methods wanted by the app
- (with CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH). */
- long picked;
- long avail; /* bitmask for what the server reports to support for this
- resource */
+ unsigned long want; /* Bitmask set to the authentication methods wanted by
+ app (with CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH). */
+ unsigned long picked;
+ unsigned long avail; /* Bitmask for what the server reports to support for
+ this resource */
bool done; /* TRUE when the auth phase is done and ready to do the *actual*
request */
bool multi; /* TRUE if this is not yet authenticated but within the auth
@@ -1013,32 +1193,20 @@ struct auth {
be RFC compliant */
};
-struct conncache {
- /* 'connects' will be an allocated array with pointers. If the pointer is
- set, it holds an allocated connection. */
- struct connectdata **connects;
- long num; /* number of entries of the 'connects' array */
- enum {
- CONNCACHE_PRIVATE, /* used for an easy handle alone */
- CONNCACHE_MULTI /* shared within a multi handle */
- } type;
-};
-
-
struct UrlState {
- enum {
- Curl_if_none,
- Curl_if_easy,
- Curl_if_multi
- } used_interface;
- struct conncache *connc; /* points to the connection cache this handle
- uses */
+ /* Points to the connection cache */
+ struct conncache *conn_cache;
+
+ /* when curl_easy_perform() is called, the multi handle is "owned" by
+ the easy handle so curl_easy_cleanup() on such an easy handle will
+ also close the multi handle! */
+ bool multi_owned_by_easy;
/* buffers to store authentication data in, as parsed from input options */
struct timeval keeps_speed; /* for the progress meter really */
- long lastconnect; /* index of most recent connect or -1 if undefined */
+ struct connectdata *lastconnect; /* The last connection, NULL if undefined */
char *headerbuff; /* allocated buffer to store headers in */
size_t headersize; /* size of the allocation */
@@ -1054,7 +1222,7 @@ struct UrlState {
following not keep sending user+password... This is
strdup() data.
*/
- struct curl_ssl_session *session; /* array of 'numsessions' size */
+ struct curl_ssl_session *session; /* array of 'max_ssl_sessions' size */
long sessionage; /* number of the most recent session */
char *tempwrite; /* allocated buffer to keep data in when a write
callback returns to make the connection paused */
@@ -1075,7 +1243,7 @@ struct UrlState {
struct digestdata digest; /* state data for host Digest auth */
struct digestdata proxydigest; /* state data for proxy Digest auth */
-#ifdef HAVE_GSSAPI
+#ifdef USE_SPNEGO
struct negotiatedata negotiate; /* state data for host Negotiate auth */
struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */
#endif
@@ -1085,13 +1253,12 @@ struct UrlState {
bool authproblem; /* TRUE if there's some problem authenticating */
-#ifdef USE_ARES
- ares_channel areschannel; /* for name resolves */
-#endif
+ void *resolver; /* resolver state, if it is used in the URL state -
+ ares_channel f.e. */
-#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
+#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H)
ENGINE *engine;
-#endif /* USE_SSLEAY */
+#endif /* USE_OPENSSL */
struct timeval expiretime; /* set this with Curl_expire() only */
struct Curl_tree timenode; /* for the splay stuff */
struct curl_llist *timeoutlist; /* list of pending timeouts */
@@ -1118,14 +1285,6 @@ struct UrlState {
/* for FTP downloads: how many CRLFs did we converted to LFs? */
curl_off_t crlf_conversions;
#endif
- /* If set to non-NULL, there's a connection in a shared connection cache
- that uses this handle so we can't kill this SessionHandle just yet but
- must keep it around and add it to the list of handles to kill once all
- its connections are gone */
- void *shared_conn;
- bool closed; /* set to TRUE when curl_easy_cleanup() has been called on this
- handle, but it is kept around as mentioned for
- shared_conn */
char *pathbuffer;/* allocated buffer to store the URL's path part in */
char *path; /* path to use, points to somewhere within the pathbuffer
area */
@@ -1143,32 +1302,15 @@ struct UrlState {
long rtsp_next_server_CSeq; /* the session's next server CSeq */
long rtsp_CSeq_recv; /* most recent CSeq received */
- /* Protocol specific data.
- *
- *************************************************************************
- * Note that this data will be REMOVED after each request, so anything that
- * should be kept/stored on a per-connection basis and thus live for the
- * next request on the same connection MUST be put in the connectdata struct!
- *************************************************************************/
- union {
- struct HTTP *http;
- struct HTTP *https; /* alias, just for the sake of being more readable */
- struct RTSP *rtsp;
- struct FTP *ftp;
- /* void *tftp; not used */
- struct FILEPROTO *file;
- void *telnet; /* private for telnet.c-eyes only */
- void *generic;
- struct SSHPROTO *ssh;
- struct FTP *imap;
- struct FTP *pop3;
- struct FTP *smtp;
- } proto;
- /* current user of this SessionHandle instance, or NULL */
- struct connectdata *current_conn;
+ curl_off_t infilesize; /* size of file to upload, -1 means unknown.
+ Copied from set.filesize at start of operation */
- /* if true, force SSL connection retry (workaround for certain servers) */
- bool ssl_connect_retry;
+ int drain; /* Increased when this stream has data to read, even if its
+ socket not necessarily is readable. Decreased when
+ checked. */
+ bool done; /* set to FALSE when Curl_do() is called and set to TRUE when
+ Curl_done() is called, to prevent Curl_done() to get invoked
+ twice when the multi interface is used. */
};
@@ -1186,6 +1328,8 @@ struct DynamicStatic {
bool referer_alloc; /* referer sting is malloc()ed */
struct curl_slist *cookielist; /* list of cookie files set by
curl_easy_setopt(COOKIEFILE) calls */
+ struct curl_slist *resolve; /* set to point to the set.resolve list when
+ this should be dealt with in pretransfer */
};
/*
@@ -1196,7 +1340,7 @@ struct DynamicStatic {
* the 'DynamicStatic' struct.
* Character pointer fields point to dynamic storage, unless otherwise stated.
*/
-struct Curl_one_easy; /* declared and used only in multi.c */
+
struct Curl_multi; /* declared and used only in multi.c */
enum dupstring {
@@ -1216,13 +1360,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 */
@@ -1231,6 +1375,7 @@ enum dupstring {
STRING_SSL_ISSUERCERT, /* issuer cert file to check certificate */
STRING_USERNAME, /* <username>, if used */
STRING_PASSWORD, /* <password>, if used */
+ STRING_OPTIONS, /* <options>, if used */
STRING_PROXYUSERNAME, /* Proxy <username>, if used */
STRING_PROXYPASSWORD, /* Proxy <password>, if used */
STRING_NOPROXY, /* List of hosts which should not use the proxy, if
@@ -1245,11 +1390,31 @@ 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 */
+ STRING_PROXY_SERVICE_NAME, /* Proxy service name */
+ STRING_SERVICE_NAME, /* Service name */
#endif
STRING_MAIL_FROM,
+ STRING_MAIL_AUTH,
+
+#ifdef USE_TLS_SRP
+ STRING_TLSAUTH_USERNAME, /* TLS auth <username> */
+ STRING_TLSAUTH_PASSWORD, /* TLS auth <password> */
+#endif
+ STRING_BEARER, /* <bearer>, if used */
+#ifdef USE_UNIX_SOCKETS
+ STRING_UNIX_SOCKET_PATH, /* path to Unix socket, if used */
+#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 */
- /* -- end of strings -- */
STRING_LAST /* not used, just an end-of-list marker */
};
@@ -1260,19 +1425,19 @@ struct UserDefined {
long proxyport; /* If non-zero, use this port number by default. If the
proxy string features a ":[port]" that one will override
this. */
- void *out; /* the fetched file goes here */
- void *in; /* the uploaded file is read from here */
+ void *out; /* CURLOPT_WRITEDATA */
+ void *in; /* CURLOPT_READDATA */
void *writeheader; /* write the header to this if non-NULL */
void *rtp_out; /* write RTP to this if non-NULL */
long use_port; /* which port to use (when not using default) */
- long httpauth; /* what kind of HTTP authentication to use (bitmask) */
- long proxyauth; /* what kind of proxy authentication to use (bitmask) */
+ unsigned long httpauth; /* kind of HTTP authentication to use (bitmask) */
+ unsigned long proxyauth; /* kind of proxy authentication to use (bitmask) */
long followlocation; /* as in HTTP Location: */
long maxredirs; /* maximum no. of http(s) redirects to follow, set to -1
for infinity */
- bool post301; /* Obey RFC 2616/10.3.2 and keep POSTs as POSTs after a
- 301 */
- bool post302; /* keep POSTs as POSTs after a 302 */
+
+ int keep_post; /* keep POSTs as POSTs after a 30x request; each
+ bit represents a request, from 301 to 303 */
bool free_referer; /* set TRUE if 'referer' points to a string we
allocated */
void *postfields; /* if POST, set the fields' values here */
@@ -1289,14 +1454,19 @@ struct UserDefined {
curl_read_callback fread_func; /* function that reads the input */
int is_fread_set; /* boolean, has read callback been set to non-NULL? */
int is_fwrite_set; /* boolean, has write callback been set to non-NULL? */
- curl_progress_callback fprogress; /* function for progress information */
+ curl_progress_callback fprogress; /* OLD and deprecated progress callback */
+ curl_xferinfo_callback fxferinfo; /* progress callback */
curl_debug_callback fdebug; /* function that write informational data */
curl_ioctl_callback ioctl_func; /* function for I/O control */
curl_sockopt_callback fsockopt; /* function for setting socket options */
void *sockopt_client; /* pointer to pass to the socket options callback */
curl_opensocket_callback fopensocket; /* function for checking/translating
- the address and opening the socket */
+ the address and opening the
+ socket */
void* opensocket_client;
+ curl_closesocket_callback fclosesocket; /* function for closing the
+ socket */
+ void* closesocket_client;
void *seek_client; /* pointer to pass to the seek callback */
/* the 3 curl_conv_callback functions below are used on non-ASCII hosts */
@@ -1311,16 +1481,20 @@ struct UserDefined {
void *ioctl_client; /* pointer to pass to the ioctl callback */
long timeout; /* in milliseconds, 0 means no timeout */
long connecttimeout; /* in milliseconds, 0 means no timeout */
+ long accepttimeout; /* in milliseconds, 0 means no timeout */
long server_response_timeout; /* in milliseconds, 0 means no timeout */
long tftp_blksize ; /* in bytes, 0 means use default */
- curl_off_t infilesize; /* size of file to upload, -1 means unknown */
+ curl_off_t filesize; /* size of file to upload, -1 means unknown */
long low_speed_limit; /* bytes/second */
long low_speed_time; /* number of seconds */
curl_off_t max_send_speed; /* high speed limit in bytes/second for upload */
- curl_off_t max_recv_speed; /* high speed limit in bytes/second for download */
+ curl_off_t max_recv_speed; /* high speed limit in bytes/second for
+ download */
curl_off_t set_resume_from; /* continue [ftp] transfer from here */
struct curl_slist *headers; /* linked list of extra headers */
+ struct curl_slist *proxyheaders; /* linked list of extra CONNECT headers */
struct curl_httppost *httppost; /* linked list of POST data */
+ bool sep_headers; /* handle host and proxy headers separately */
bool cookiesession; /* new cookie session? */
bool crlf; /* convert crlf on ftp upload(?) */
struct curl_slist *quote; /* after connection is established */
@@ -1332,6 +1506,8 @@ struct UserDefined {
struct curl_slist *source_postquote; /* in 3rd party transfer mode - after
the transfer on source host */
struct curl_slist *telnet_options; /* linked list of telnet options */
+ struct curl_slist *resolve; /* list of names to add/remove from
+ DNS cache */
curl_TimeCond timecondition; /* kind of time/date comparison */
time_t timevalue; /* what time to compare with */
Curl_HttpReq httpreq; /* what kind of HTTP request (if any) is this */
@@ -1343,16 +1519,10 @@ struct UserDefined {
long buffer_size; /* size of receive buffer to use */
void *private_data; /* application-private data */
- struct Curl_one_easy *one_easy; /* When adding an easy handle to a multi
- handle, an internal 'Curl_one_easy'
- struct is created and this is a pointer
- to the particular struct associated with
- this SessionHandle */
-
struct curl_slist *http200aliases; /* linked list of aliases for http200 */
- long ip_version; /* the CURL_IPRESOLVE_* defines in the public header file
- 0 - whatever, 1 - v2, 2 - v6 */
+ long ipver; /* the CURL_IPRESOLVE_* defines in the public header file
+ 0 - whatever, 1 - v2, 2 - v6 */
curl_off_t max_filesize; /* Maximum file size to download */
@@ -1377,26 +1547,27 @@ 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 >= 300 */
+ bool http_fail_on_error; /* fail on HTTP error codes >= 400 */
bool http_follow_location; /* follow HTTP redirects */
+ bool http_transfer_encoding; /* request compressed HTTP transfer-encoding */
bool http_disable_hostname_check_before_authentication;
bool include_header; /* include received protocol headers in data output */
bool http_set_referer; /* is a custom referer used */
bool http_auto_referer; /* set "correct" referer when following location: */
- bool opt_no_body; /* as set with CURLOPT_NO_BODY */
+ bool opt_no_body; /* as set with CURLOPT_NOBODY */
bool set_port; /* custom port number used */
bool upload; /* upload request */
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 */
bool ftp_use_eprt; /* if EPRT is to be attempted or not */
bool ftp_use_pret; /* if PRET is to be used before PASV or not */
- curl_usessl ftp_ssl; /* if AUTH TLS is to be attempted etc, for FTP or
+ curl_usessl use_ssl; /* if AUTH TLS is to be attempted etc, for FTP or
IMAP or POP3 or others! */
curl_ftpauth ftpsslauth; /* what AUTH XXX to be attempted */
curl_ftpccc ftp_ccc; /* FTP CCC options */
@@ -1407,6 +1578,8 @@ struct UserDefined {
bool ftp_skip_ip; /* skip the IP address the FTP server passes on to
us */
bool connect_only; /* make connection, let application use the socket */
+ bool ssl_enable_beast; /* especially allow this flaw for interoperability's
+ sake*/
long ssh_auth_types; /* allowed SSH auth types */
bool http_te_skip; /* pass the raw body data to the user, even when
transfer-encoded (chunked, compressed) */
@@ -1417,30 +1590,47 @@ struct UserDefined {
bool proxy_transfer_mode; /* set transfer mode (;type=<a|i>) when doing FTP
via an HTTP proxy */
char *str[STRING_LAST]; /* array of strings, pointing to allocated memory */
- unsigned int scope; /* address scope for IPv6 */
+ unsigned int scope_id; /* Scope id for IPv6 */
long allowed_protocols;
long redir_protocols;
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
long socks5_gssapi_nec; /* flag to support nec socks5 server */
#endif
struct curl_slist *mail_rcpt; /* linked list of mail recipients */
+ bool sasl_ir; /* Enable/disable SASL initial response */
/* Common RTSP header options */
Curl_RtspReq rtspreq; /* RTSP request type */
long rtspversion; /* like httpversion, for RTSP */
bool wildcardmatch; /* enable wildcard matching */
- curl_chunk_bgn_callback chunk_bgn; /* called before part of transfer starts */
+ curl_chunk_bgn_callback chunk_bgn; /* called before part of transfer
+ starts */
curl_chunk_end_callback chunk_end; /* called after part transferring
stopped */
curl_fnmatch_callback fnmatch; /* callback to decide which file corresponds
to pattern (e.g. if WILDCARDMATCH is on) */
void *fnmatch_data;
+
+ long gssapi_delegation; /* GSS-API credential delegation, see the
+ documentation of CURLOPT_GSSAPI_DELEGATION */
+
+ bool tcp_keepalive; /* use TCP keepalives */
+ long tcp_keepidle; /* seconds in idle before sending keepalive probe */
+ long tcp_keepintvl; /* seconds between TCP keepalive probes */
+
+ size_t maxconnects; /* Max idle connections in the connection cache */
+
+ bool ssl_enable_npn; /* TLS NPN extension? */
+ bool ssl_enable_alpn; /* TLS ALPN extension? */
+ bool path_as_is; /* allow dotdots? */
+ bool pipewait; /* wait for pipe/multiplex status before starting a
+ new connection */
+ long expect_100_timeout; /* in milliseconds */
};
struct Names {
struct curl_hash *hostcache;
enum {
HCACHE_NONE, /* not pointing to anything */
- HCACHE_PRIVATE, /* points to our own */
HCACHE_GLOBAL, /* points to the (shrug) global one */
HCACHE_MULTI, /* points to a shared one in the multi handle */
HCACHE_SHARED /* points to a shared one in a shared object */
@@ -1458,12 +1648,31 @@ struct Names {
*/
struct SessionHandle {
+ /* first, two fields for the linked list of these */
+ struct SessionHandle *next;
+ struct SessionHandle *prev;
+
+ struct connectdata *easy_conn; /* the "unit's" connection */
+
+ CURLMstate mstate; /* the handle's state */
+ CURLcode result; /* previous result */
+
+ struct Curl_message msg; /* A single posted message. */
+
+ /* Array with the plain socket numbers this handle takes care of, in no
+ particular order. Note that all sockets are added to the sockhash, where
+ the state etc are also kept. This array is mostly used to detect when a
+ socket is to be removed from the hash. See singlesocket(). */
+ curl_socket_t sockets[MAX_SOCKSPEREASYHANDLE];
+ int numsocks;
+
struct Names dns;
struct Curl_multi *multi; /* if non-NULL, points to the multi handle
- struct to which this "belongs" */
- struct Curl_one_easy *multi_pos; /* if non-NULL, points to its position
- in multi controlling structure to assist
- in removal. */
+ struct to which this "belongs" when used by
+ the multi interface */
+ struct Curl_multi *multi_easy; /* if non-NULL, points to the multi handle
+ struct to which this "belongs" when used
+ by the easy interface */
struct Curl_share *share; /* Share, handles global variable mutexing */
struct SingleRequest req; /* Request-specific data */
struct UserDefined set; /* values set by the libcurl user */
@@ -1477,6 +1686,8 @@ struct SessionHandle {
other dynamic purposes */
struct WildcardData wildcard; /* wildcard download state info */
struct PureInfo info; /* stats, reports and info data */
+ struct curl_tlssessioninfo tsi; /* Information about the TLS session, only
+ valid after a client has asked for it */
#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
iconv_t outbound_cd; /* for translating to the network encoding */
iconv_t inbound_cd; /* for translating from the network encoding */
@@ -1487,4 +1698,4 @@ struct SessionHandle {
#define LIBCURL_NAME "libcurl"
-#endif
+#endif /* HEADER_CURL_URLDATA_H */
diff --git a/lib/vc6libcurl.dsp b/lib/vc6libcurl.dsp
deleted file mode 100644
index ee8f6f14..00000000
--- a/lib/vc6libcurl.dsp
+++ /dev/null
@@ -1,862 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libcurl" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=libcurl - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "libcurl.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "libcurl.mak" CFG="libcurl - Win32 LIB Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "libcurl - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libcurl - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libcurl - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "libcurl - Win32 LIB Release" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "libcurl - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "DLL-Debug"
-# PROP BASE Intermediate_Dir "DLL-Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "DLL-Debug"
-# PROP Intermediate_Dir "DLL-Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /GZ /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /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 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"DLL-Debug/libcurld.dll" /implib:"DLL-Debug/libcurld_imp.lib" /pdbtype:sept
-# ADD LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"DLL-Debug/libcurld.dll" /implib:"DLL-Debug/libcurld_imp.lib" /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "DLL-Release"
-# PROP BASE Intermediate_Dir "DLL-Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "DLL-Release"
-# PROP Intermediate_Dir "DLL-Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /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 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /pdb:none /machine:I386 /out:"DLL-Release/libcurl.dll" /implib:"DLL-Release/libcurl_imp.lib"
-# ADD LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /pdb:none /machine:I386 /out:"DLL-Release/libcurl.dll" /implib:"DLL-Release/libcurl_imp.lib"
-
-!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "LIB-Debug"
-# PROP BASE Intermediate_Dir "LIB-Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "LIB-Debug"
-# PROP Intermediate_Dir "LIB-Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /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:"LIB-Debug/libcurld.lib" /machine:I386
-# ADD LIB32 /nologo /out:"LIB-Debug/libcurld.lib" /machine:I386
-
-!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "LIB-Release"
-# PROP BASE Intermediate_Dir "LIB-Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "LIB-Release"
-# PROP Intermediate_Dir "LIB-Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /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 /out:"LIB-Release/libcurl.lib" /machine:I386
-# ADD LIB32 /nologo /out:"LIB-Release/libcurl.lib" /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "libcurl - Win32 DLL Debug"
-# Name "libcurl - Win32 DLL Release"
-# Name "libcurl - Win32 LIB Debug"
-# Name "libcurl - Win32 LIB Release"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\base64.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\connect.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\content_encoding.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\cookie.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_addrinfo.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_fnmatch.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_gethostname.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_memrchr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_rand.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_rtmp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_sspi.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_threads.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\dict.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\easy.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\escape.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\file.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\fileinfo.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\formdata.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ftp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ftplistparser.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\getenv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\getinfo.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\gopher.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\gtls.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hash.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hmac.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hostares.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hostasyn.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hostip4.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hostip6.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hostip.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hostsyn.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hostthre.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\http.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\http_chunks.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\http_digest.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\http_negotiate.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\http_ntlm.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\if2ip.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\imap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\inet_ntop.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\inet_pton.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\krb4.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\krb5.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ldap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\llist.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\md4.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\md5.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\memdebug.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mprintf.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\multi.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\netrc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nonblock.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nss.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\openldap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\parsedate.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\pingpong.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\polarssl.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\pop3.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\progress.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\qssl.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rawstr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rtsp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\security.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\select.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\sendf.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\share.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\slist.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\smtp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\socks.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\socks_gssapi.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\socks_sspi.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\speedcheck.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\splay.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ssh.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\sslgen.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ssluse.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strdup.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strequal.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strerror.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strtok.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strtoofft.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\telnet.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\tftp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\timeval.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\transfer.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\url.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\version.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\warnless.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wildcard.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\arpa_telnet.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\config-win32.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\connect.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\content_encoding.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cookie.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_addrinfo.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_base64.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_fnmatch.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_gethostname.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_hmac.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_ldap.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_md4.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_md5.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_memory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_memrchr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_rand.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_rtmp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_sspi.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curl_threads.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\curlx.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\dict.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\easyif.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\escape.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\file.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\fileinfo.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\formdata.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ftp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ftplistparser.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\getinfo.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\gopher.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\gtls.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\hash.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\hostip.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\http_chunks.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\http_digest.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\http.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\http_negotiate.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\http_ntlm.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\if2ip.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\imap.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\inet_ntop.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\inet_pton.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\krb4.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\llist.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\memdebug.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\multiif.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\netrc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nonblock.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nssg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\parsedate.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\pingpong.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\polarssl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\pop3.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\progress.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qssl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\rawstr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\rtsp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\select.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\sendf.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\setup.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\setup_once.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\share.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\slist.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\smtp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\sockaddr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\socks.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\speedcheck.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\splay.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ssh.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\sslgen.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ssluse.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\strdup.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\strequal.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\strerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\strtok.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\strtoofft.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\telnet.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\tftp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\timeval.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\transfer.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\urldata.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\url.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\warnless.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\wildcard.h
-# End Source File
-# End Group
-
-# Begin Group "Resource Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\libcurl.rc
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/lib/vc6libcurl.dsw b/lib/vc6libcurl.dsw
deleted file mode 100644
index 1fa8814a..00000000
--- a/lib/vc6libcurl.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "libcurl"=".\vc6libcurl.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/lib/version.c b/lib/version.c
index 9ba2e33c..1727c5a7 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,20 +20,20 @@
*
***************************************************************************/
-#include "setup.h"
-
-#include <string.h>
-#include <stdio.h>
+#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
-#include "sslgen.h"
-
-#define _MPRINTF_REPLACE /* use the internal *printf() functions */
-#include <curl/mprintf.h>
+#include "vtls/vtls.h"
+#include "http2.h"
+#include "curl_printf.h"
#ifdef USE_ARES
-#include <ares_version.h>
+# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
+ (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
+# define CARES_STATICLIB
+# endif
+# include <ares.h>
#endif
#ifdef USE_LIBIDN
@@ -63,10 +63,11 @@
char *curl_version(void)
{
static char version[200];
- char *ptr=version;
+ char *ptr = version;
size_t len;
size_t left = sizeof(version);
- strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION );
+
+ strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION);
len = strlen(ptr);
left -= len;
ptr += len;
@@ -99,6 +100,11 @@ char *curl_version(void)
ptr += len;
}
#endif
+#ifdef USE_WIN32_IDN
+ len = snprintf(ptr, left, " WinIDN");
+ left -= len;
+ ptr += len;
+#endif
#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)
#ifdef _LIBICONV_VERSION
len = snprintf(ptr, left, " iconv/%d.%d",
@@ -115,21 +121,30 @@ char *curl_version(void)
left -= len;
ptr += len;
#endif
+#ifdef USE_NGHTTP2
+ len = Curl_http2_ver(ptr, left);
+ left -= len;
+ ptr += len;
+#endif
#ifdef USE_LIBRTMP
{
char suff[2];
- if (RTMP_LIB_VERSION & 0xff) {
+ if(RTMP_LIB_VERSION & 0xff) {
suff[0] = (RTMP_LIB_VERSION & 0xff) + 'a' - 1;
suff[1] = '\0';
- } else {
- suff[0] = '\0';
}
- len = snprintf(ptr, left, " librtmp/%d.%d%s",
- RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff, suff);
+ else
+ suff[0] = '\0';
+
+ snprintf(ptr, left, " librtmp/%d.%d%s",
+ RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff,
+ suff);
/*
If another lib version is added below this one, this code would
also have to do:
+ len = what snprintf() returned
+
left -= len;
ptr += len;
*/
@@ -175,8 +190,9 @@ static const char * const protocols[] = {
#endif
#ifndef CURL_DISABLE_LDAP
"ldap",
-#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \
- (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))
+#if !defined(CURL_DISABLE_LDAPS) && \
+ ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \
+ (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))
"ldaps",
#endif
#endif
@@ -198,6 +214,14 @@ 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
@@ -223,24 +247,31 @@ static curl_version_info_data version_info = {
#ifdef ENABLE_IPV6
| CURL_VERSION_IPV6
#endif
-#ifdef HAVE_KRB4
- | CURL_VERSION_KERBEROS4
-#endif
#ifdef USE_SSL
| CURL_VERSION_SSL
#endif
#ifdef USE_NTLM
| CURL_VERSION_NTLM
#endif
+#if !defined(CURL_DISABLE_HTTP) && 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 HAVE_GSSAPI
- | CURL_VERSION_GSSNEGOTIATE
-#endif
#ifdef DEBUGBUILD
| CURL_VERSION_DEBUG
#endif
@@ -250,9 +281,6 @@ 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
@@ -260,6 +288,15 @@ static curl_version_info_data version_info = {
#if defined(CURL_DOES_CONVERSIONS)
| CURL_VERSION_CONV
#endif
+#if defined(USE_TLS_SRP)
+ | CURL_VERSION_TLSAUTH_SRP
+#endif
+#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 */
@@ -301,6 +338,8 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
version_info.libidn = stringprep_check_version(LIBIDN_REQUIRED_VERSION);
if(version_info.libidn)
version_info.features |= CURL_VERSION_IDN;
+#elif defined(USE_WIN32_IDN)
+ version_info.features |= CURL_VERSION_IDN;
#endif
#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)
diff --git a/lib/vtls/axtls.c b/lib/vtls/axtls.c
new file mode 100644
index 00000000..1038432b
--- /dev/null
+++ b/lib/vtls/axtls.c
@@ -0,0 +1,690 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, DirecTV, Contact: Eric Hu, <ehu@directv.com>.
+ * Copyright (C) 2010 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all axTLS-specific code for the TLS/SSL layer. No code
+ * but vtls.c should ever call or use these functions.
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_AXTLS
+#include <axTLS/config.h>
+#include <axTLS/ssl.h>
+#include "axtls.h"
+
+#include "sendf.h"
+#include "inet_pton.h"
+#include "vtls.h"
+#include "parsedate.h"
+#include "connect.h" /* for the connect timeout */
+#include "select.h"
+#include "curl_printf.h"
+#include "hostcheck.h"
+#include <unistd.h>
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+
+/* Global axTLS init, called from Curl_ssl_init() */
+int Curl_axtls_init(void)
+{
+/* axTLS has no global init. Everything is done through SSL and SSL_CTX
+ * structs stored in connectdata structure. Perhaps can move to axtls.h.
+ */
+ return 1;
+}
+
+int Curl_axtls_cleanup(void)
+{
+ /* axTLS has no global cleanup. Perhaps can move this to axtls.h. */
+ return 1;
+}
+
+static CURLcode map_error_to_curl(int axtls_err)
+{
+ switch (axtls_err) {
+ case SSL_ERROR_NOT_SUPPORTED:
+ case SSL_ERROR_INVALID_VERSION:
+ case -70: /* protocol version alert from server */
+ return CURLE_UNSUPPORTED_PROTOCOL;
+ break;
+ case SSL_ERROR_NO_CIPHER:
+ return CURLE_SSL_CIPHER;
+ break;
+ case SSL_ERROR_BAD_CERTIFICATE: /* this may be bad server cert too */
+ case SSL_ERROR_NO_CERT_DEFINED:
+ case -42: /* bad certificate alert from server */
+ case -43: /* unsupported cert alert from server */
+ case -44: /* cert revoked alert from server */
+ case -45: /* cert expired alert from server */
+ case -46: /* cert unknown alert from server */
+ return CURLE_SSL_CERTPROBLEM;
+ break;
+ case SSL_X509_ERROR(X509_NOT_OK):
+ case SSL_X509_ERROR(X509_VFY_ERROR_NO_TRUSTED_CERT):
+ case SSL_X509_ERROR(X509_VFY_ERROR_BAD_SIGNATURE):
+ case SSL_X509_ERROR(X509_VFY_ERROR_NOT_YET_VALID):
+ case SSL_X509_ERROR(X509_VFY_ERROR_EXPIRED):
+ case SSL_X509_ERROR(X509_VFY_ERROR_SELF_SIGNED):
+ case SSL_X509_ERROR(X509_VFY_ERROR_INVALID_CHAIN):
+ case SSL_X509_ERROR(X509_VFY_ERROR_UNSUPPORTED_DIGEST):
+ case SSL_X509_ERROR(X509_INVALID_PRIV_KEY):
+ return CURLE_PEER_FAILED_VERIFICATION;
+ break;
+ case -48: /* unknown ca alert from server */
+ return CURLE_SSL_CACERT;
+ break;
+ case -49: /* access denied alert from server */
+ return CURLE_REMOTE_ACCESS_DENIED;
+ break;
+ case SSL_ERROR_CONN_LOST:
+ case SSL_ERROR_SOCK_SETUP_FAILURE:
+ case SSL_ERROR_INVALID_HANDSHAKE:
+ case SSL_ERROR_INVALID_PROT_MSG:
+ case SSL_ERROR_INVALID_HMAC:
+ case SSL_ERROR_INVALID_SESSION:
+ case SSL_ERROR_INVALID_KEY: /* it's too bad this doesn't map better */
+ case SSL_ERROR_FINISHED_INVALID:
+ case SSL_ERROR_NO_CLIENT_RENOG:
+ default:
+ return CURLE_SSL_CONNECT_ERROR;
+ break;
+ }
+}
+
+static Curl_recv axtls_recv;
+static Curl_send axtls_send;
+
+static void free_ssl_structs(struct ssl_connect_data *connssl)
+{
+ if(connssl->ssl) {
+ ssl_free (connssl->ssl);
+ connssl->ssl = NULL;
+ }
+ if(connssl->ssl_ctx) {
+ ssl_ctx_free(connssl->ssl_ctx);
+ connssl->ssl_ctx = NULL;
+ }
+}
+
+/*
+ * For both blocking and non-blocking connects, this function sets up the
+ * ssl context and state. This function is called after the TCP connect
+ * has completed.
+ */
+static CURLcode connect_prep(struct connectdata *conn, int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ SSL_CTX *ssl_ctx;
+ SSL *ssl = NULL;
+ int cert_types[] = {SSL_OBJ_X509_CERT, SSL_OBJ_PKCS12, 0};
+ int key_types[] = {SSL_OBJ_RSA_KEY, SSL_OBJ_PKCS8, SSL_OBJ_PKCS12, 0};
+ int i, ssl_fcn_return;
+ const uint8_t *ssl_sessionid;
+ size_t ssl_idsize;
+
+ /* Assuming users will not compile in custom key/cert to axTLS.
+ * Also, even for blocking connects, use axTLS non-blocking feature.
+ */
+ uint32_t client_option = SSL_NO_DEFAULT_KEY |
+ SSL_SERVER_VERIFY_LATER |
+ SSL_CONNECT_IN_PARTS;
+
+ if(conn->ssl[sockindex].state == ssl_connection_complete)
+ /* to make us tolerant against being called more than once for the
+ same connection */
+ return CURLE_OK;
+
+ /* axTLS only supports TLSv1 */
+ /* check to see if we've been told to use an explicit SSL/TLS version */
+ switch(data->set.ssl.version) {
+ case CURL_SSLVERSION_DEFAULT:
+ case CURL_SSLVERSION_TLSv1:
+ break;
+ default:
+ failf(data, "axTLS only supports TLS 1.0 and 1.1, "
+ "and it cannot be specified which one to use");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+#ifdef AXTLSDEBUG
+ client_option |= SSL_DISPLAY_STATES | SSL_DISPLAY_RSA | SSL_DISPLAY_CERTS;
+#endif /* AXTLSDEBUG */
+
+ /* Allocate an SSL_CTX struct */
+ ssl_ctx = ssl_ctx_new(client_option, SSL_DEFAULT_CLNT_SESS);
+ if(ssl_ctx == NULL) {
+ failf(data, "unable to create client SSL context");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ conn->ssl[sockindex].ssl_ctx = ssl_ctx;
+ conn->ssl[sockindex].ssl = NULL;
+
+ /* Load the trusted CA cert bundle file */
+ if(data->set.ssl.CAfile) {
+ if(ssl_obj_load(ssl_ctx, SSL_OBJ_X509_CACERT, data->set.ssl.CAfile, NULL)
+ != SSL_OK) {
+ infof(data, "error reading ca cert file %s \n",
+ data->set.ssl.CAfile);
+ if(data->set.ssl.verifypeer) {
+ return CURLE_SSL_CACERT_BADFILE;
+ }
+ }
+ else
+ infof(data, "found certificates in %s\n", data->set.ssl.CAfile);
+ }
+
+ /* gtls.c tasks we're skipping for now:
+ * 1) certificate revocation list checking
+ * 2) dns name assignment to host
+ * 3) set protocol priority. axTLS is TLSv1 only, so can probably ignore
+ * 4) set certificate priority. axTLS ignores type and sends certs in
+ * order added. can probably ignore this.
+ */
+
+ /* Load client certificate */
+ if(data->set.str[STRING_CERT]) {
+ i=0;
+ /* Instead of trying to analyze cert type here, let axTLS try them all. */
+ while(cert_types[i] != 0) {
+ ssl_fcn_return = ssl_obj_load(ssl_ctx, cert_types[i],
+ data->set.str[STRING_CERT], NULL);
+ if(ssl_fcn_return == SSL_OK) {
+ infof(data, "successfully read cert file %s \n",
+ data->set.str[STRING_CERT]);
+ break;
+ }
+ i++;
+ }
+ /* Tried all cert types, none worked. */
+ if(cert_types[i] == 0) {
+ failf(data, "%s is not x509 or pkcs12 format",
+ data->set.str[STRING_CERT]);
+ return CURLE_SSL_CERTPROBLEM;
+ }
+ }
+
+ /* Load client key.
+ If a pkcs12 file successfully loaded a cert, then there's nothing to do
+ because the key has already been loaded. */
+ if(data->set.str[STRING_KEY] && cert_types[i] != SSL_OBJ_PKCS12) {
+ i=0;
+ /* Instead of trying to analyze key type here, let axTLS try them all. */
+ while(key_types[i] != 0) {
+ ssl_fcn_return = ssl_obj_load(ssl_ctx, key_types[i],
+ data->set.str[STRING_KEY], NULL);
+ if(ssl_fcn_return == SSL_OK) {
+ infof(data, "successfully read key file %s \n",
+ data->set.str[STRING_KEY]);
+ break;
+ }
+ i++;
+ }
+ /* Tried all key types, none worked. */
+ if(key_types[i] == 0) {
+ failf(data, "Failure: %s is not a supported key file",
+ data->set.str[STRING_KEY]);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+
+ /* gtls.c does more here that is being left out for now
+ * 1) set session credentials. can probably ignore since axtls puts this
+ * info in the ssl_ctx struct
+ * 2) setting up callbacks. these seem gnutls specific
+ */
+
+ /* In axTLS, handshaking happens inside ssl_client_new. */
+ if(!Curl_ssl_getsessionid(conn, (void **) &ssl_sessionid, &ssl_idsize)) {
+ /* we got a session id, use it! */
+ infof (data, "SSL re-using session ID\n");
+ ssl = ssl_client_new(ssl_ctx, conn->sock[sockindex],
+ ssl_sessionid, (uint8_t)ssl_idsize);
+ }
+ else
+ ssl = ssl_client_new(ssl_ctx, conn->sock[sockindex], NULL, 0);
+
+ conn->ssl[sockindex].ssl = ssl;
+ return CURLE_OK;
+}
+
+/*
+ * For both blocking and non-blocking connects, this function finalizes the
+ * SSL connection.
+ */
+static CURLcode connect_finish(struct connectdata *conn, int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ SSL *ssl = conn->ssl[sockindex].ssl;
+ const uint8_t *ssl_sessionid;
+ size_t ssl_idsize;
+ const char *peer_CN;
+ uint32_t dns_altname_index;
+ const char *dns_altname;
+ int8_t found_subject_alt_names = 0;
+ int8_t found_subject_alt_name_matching_conn = 0;
+
+ /* Here, gtls.c gets the peer certificates and fails out depending on
+ * settings in "data." axTLS api doesn't have get cert chain fcn, so omit?
+ */
+
+ /* Verify server's certificate */
+ if(data->set.ssl.verifypeer) {
+ if(ssl_verify_cert(ssl) != SSL_OK) {
+ Curl_axtls_close(conn, sockindex);
+ failf(data, "server cert verify failed");
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+ }
+ else
+ infof(data, "\t server certificate verification SKIPPED\n");
+
+ /* Here, gtls.c does issuer verification. axTLS has no straightforward
+ * equivalent, so omitting for now.*/
+
+ /* Here, gtls.c does the following
+ * 1) x509 hostname checking per RFC2818. axTLS doesn't support this, but
+ * it seems useful. This is now implemented, by Oscar Koeroo
+ * 2) checks cert validity based on time. axTLS does this in ssl_verify_cert
+ * 3) displays a bunch of cert information. axTLS doesn't support most of
+ * this, but a couple fields are available.
+ */
+
+ /* There is no (DNS) Altnames count in the version 1.4.8 API. There is a
+ risk of an inifite loop */
+ for(dns_altname_index = 0; ; dns_altname_index++) {
+ dns_altname = ssl_get_cert_subject_alt_dnsname(ssl, dns_altname_index);
+ if(dns_altname == NULL) {
+ break;
+ }
+ found_subject_alt_names = 1;
+
+ infof(data, "\tComparing subject alt name DNS with hostname: %s <-> %s\n",
+ dns_altname, conn->host.name);
+ if(Curl_cert_hostcheck(dns_altname, conn->host.name)) {
+ found_subject_alt_name_matching_conn = 1;
+ break;
+ }
+ }
+
+ /* RFC2818 checks */
+ if(found_subject_alt_names && !found_subject_alt_name_matching_conn) {
+ if(data->set.ssl.verifyhost) {
+ /* Break connection ! */
+ Curl_axtls_close(conn, sockindex);
+ failf(data, "\tsubjectAltName(s) do not match %s\n",
+ conn->host.dispname);
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+ else
+ infof(data, "\tsubjectAltName(s) do not match %s\n",
+ conn->host.dispname);
+ }
+ else if(found_subject_alt_names == 0) {
+ /* Per RFC2818, when no Subject Alt Names were available, examine the peer
+ CN as a legacy fallback */
+ peer_CN = ssl_get_cert_dn(ssl, SSL_X509_CERT_COMMON_NAME);
+ if(peer_CN == NULL) {
+ if(data->set.ssl.verifyhost) {
+ Curl_axtls_close(conn, sockindex);
+ failf(data, "unable to obtain common name from peer certificate");
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+ else
+ infof(data, "unable to obtain common name from peer certificate");
+ }
+ else {
+ if(!Curl_cert_hostcheck((const char *)peer_CN, conn->host.name)) {
+ if(data->set.ssl.verifyhost) {
+ /* Break connection ! */
+ Curl_axtls_close(conn, sockindex);
+ failf(data, "\tcommon name \"%s\" does not match \"%s\"\n",
+ peer_CN, conn->host.dispname);
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+ else
+ infof(data, "\tcommon name \"%s\" does not match \"%s\"\n",
+ peer_CN, conn->host.dispname);
+ }
+ }
+ }
+
+ /* General housekeeping */
+ conn->ssl[sockindex].state = ssl_connection_complete;
+ conn->recv[sockindex] = axtls_recv;
+ conn->send[sockindex] = axtls_send;
+
+ /* Put our freshly minted SSL session in cache */
+ ssl_idsize = ssl_get_session_id_size(ssl);
+ ssl_sessionid = ssl_get_session_id(ssl);
+ if(Curl_ssl_addsessionid(conn, (void *) ssl_sessionid, ssl_idsize)
+ != CURLE_OK)
+ infof (data, "failed to add session to cache\n");
+
+ return CURLE_OK;
+}
+
+/*
+ * Use axTLS's non-blocking connection feature to open an SSL connection.
+ * This is called after a TCP connection is already established.
+ */
+CURLcode Curl_axtls_connect_nonblocking(
+ struct connectdata *conn,
+ int sockindex,
+ bool *done)
+{
+ CURLcode conn_step;
+ int ssl_fcn_return;
+ int i;
+
+ *done = FALSE;
+ /* connectdata is calloc'd and connecting_state is only changed in this
+ function, so this is safe, as the state is effectively initialized. */
+ if(conn->ssl[sockindex].connecting_state == ssl_connect_1) {
+ conn_step = connect_prep(conn, sockindex);
+ if(conn_step != CURLE_OK) {
+ Curl_axtls_close(conn, sockindex);
+ return conn_step;
+ }
+ conn->ssl[sockindex].connecting_state = ssl_connect_2;
+ }
+
+ if(conn->ssl[sockindex].connecting_state == ssl_connect_2) {
+ /* Check to make sure handshake was ok. */
+ if(ssl_handshake_status(conn->ssl[sockindex].ssl) != SSL_OK) {
+ /* Loop to perform more work in between sleeps. This is work around the
+ fact that axtls does not expose any knowledge about when work needs
+ to be performed. This can save ~25% of time on SSL handshakes. */
+ for(i=0; i<5; i++) {
+ ssl_fcn_return = ssl_read(conn->ssl[sockindex].ssl, NULL);
+ if(ssl_fcn_return < 0) {
+ Curl_axtls_close(conn, sockindex);
+ ssl_display_error(ssl_fcn_return); /* goes to stdout. */
+ return map_error_to_curl(ssl_fcn_return);
+ }
+ return CURLE_OK;
+ }
+ }
+ infof (conn->data, "handshake completed successfully\n");
+ conn->ssl[sockindex].connecting_state = ssl_connect_3;
+ }
+
+ if(conn->ssl[sockindex].connecting_state == ssl_connect_3) {
+ conn_step = connect_finish(conn, sockindex);
+ if(conn_step != CURLE_OK) {
+ Curl_axtls_close(conn, sockindex);
+ return conn_step;
+ }
+
+ /* Reset connect state */
+ conn->ssl[sockindex].connecting_state = ssl_connect_1;
+
+ *done = TRUE;
+ return CURLE_OK;
+ }
+
+ /* Unrecognized state. Things are very bad. */
+ conn->ssl[sockindex].state = ssl_connection_none;
+ conn->ssl[sockindex].connecting_state = ssl_connect_1;
+ /* Return value perhaps not strictly correct, but distinguishes the issue.*/
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+}
+
+
+/*
+ * This function is called after the TCP connect has completed. Setup the TLS
+ * layer and do all necessary magic for a blocking connect.
+ */
+CURLcode
+Curl_axtls_connect(struct connectdata *conn,
+ int sockindex)
+
+{
+ struct SessionHandle *data = conn->data;
+ CURLcode conn_step = connect_prep(conn, sockindex);
+ int ssl_fcn_return;
+ SSL *ssl = conn->ssl[sockindex].ssl;
+ long timeout_ms;
+
+ if(conn_step != CURLE_OK) {
+ Curl_axtls_close(conn, sockindex);
+ return conn_step;
+ }
+
+ /* Check to make sure handshake was ok. */
+ while(ssl_handshake_status(ssl) != SSL_OK) {
+ /* 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");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ ssl_fcn_return = ssl_read(ssl, NULL);
+ if(ssl_fcn_return < 0) {
+ Curl_axtls_close(conn, sockindex);
+ ssl_display_error(ssl_fcn_return); /* goes to stdout. */
+ return map_error_to_curl(ssl_fcn_return);
+ }
+ /* TODO: avoid polling */
+ usleep(10000);
+ }
+ infof (conn->data, "handshake completed successfully\n");
+
+ conn_step = connect_finish(conn, sockindex);
+ if(conn_step != CURLE_OK) {
+ Curl_axtls_close(conn, sockindex);
+ return conn_step;
+ }
+
+ return CURLE_OK;
+}
+
+/* return number of sent (non-SSL) bytes */
+static ssize_t axtls_send(struct connectdata *conn,
+ int sockindex,
+ const void *mem,
+ size_t len,
+ CURLcode *err)
+{
+ /* ssl_write() returns 'int' while write() and send() returns 'size_t' */
+ int rc = ssl_write(conn->ssl[sockindex].ssl, mem, (int)len);
+
+ infof(conn->data, " axtls_send\n");
+
+ if(rc < 0 ) {
+ *err = map_error_to_curl(rc);
+ rc = -1; /* generic error code for send failure */
+ }
+
+ *err = CURLE_OK;
+ return rc;
+}
+
+void Curl_axtls_close(struct connectdata *conn, int sockindex)
+{
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ infof(conn->data, " Curl_axtls_close\n");
+
+ /* line from openssl.c: (void)SSL_shutdown(connssl->ssl);
+ axTLS compat layer does nothing for SSL_shutdown */
+
+ /* The following line is from openssl.c. There seems to be no axTLS
+ equivalent. ssl_free and ssl_ctx_free close things.
+ SSL_set_connect_state(connssl->handle); */
+
+ free_ssl_structs(connssl);
+}
+
+/*
+ * This function is called to shut down the SSL layer but keep the
+ * socket open (CCC - Clear Command Channel)
+ */
+int Curl_axtls_shutdown(struct connectdata *conn, int sockindex)
+{
+ /* Outline taken from openssl.c since functions are in axTLS compat layer.
+ axTLS's error set is much smaller, so a lot of error-handling was removed.
+ */
+ int retval = 0;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ struct SessionHandle *data = conn->data;
+ uint8_t *buf;
+ ssize_t nread;
+
+ infof(conn->data, " Curl_axtls_shutdown\n");
+
+ /* This has only been tested on the proftpd server, and the mod_tls code
+ sends a close notify alert without waiting for a close notify alert in
+ response. Thus we wait for a close notify alert from the server, but
+ we do not send one. Let's hope other servers do the same... */
+
+ /* axTLS compat layer does nothing for SSL_shutdown, so we do nothing too
+ if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE)
+ (void)SSL_shutdown(connssl->ssl);
+ */
+
+ if(connssl->ssl) {
+ int what = Curl_socket_ready(conn->sock[sockindex],
+ CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
+ if(what > 0) {
+ /* Something to read, let's do it and hope that it is the close
+ notify alert from the server. buf is managed internally by
+ axTLS and will be released upon calling ssl_free via
+ free_ssl_structs. */
+ nread = (ssize_t)ssl_read(connssl->ssl, &buf);
+
+ if(nread < SSL_OK) {
+ failf(data, "close notify alert not received during shutdown");
+ retval = -1;
+ }
+ }
+ else if(0 == what) {
+ /* timeout */
+ failf(data, "SSL shutdown timeout");
+ }
+ else {
+ /* anything that gets here is fatally bad */
+ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+ retval = -1;
+ }
+
+ free_ssl_structs(connssl);
+ }
+ return retval;
+}
+
+static ssize_t axtls_recv(struct connectdata *conn, /* connection data */
+ int num, /* socketindex */
+ char *buf, /* store read data here */
+ size_t buffersize, /* max amount to read */
+ CURLcode *err)
+{
+ struct ssl_connect_data *connssl = &conn->ssl[num];
+ ssize_t ret = 0;
+ uint8_t *read_buf;
+
+ infof(conn->data, " axtls_recv\n");
+
+ *err = CURLE_OK;
+ if(connssl) {
+ ret = ssl_read(connssl->ssl, &read_buf);
+ if(ret > SSL_OK) {
+ /* ssl_read returns SSL_OK if there is more data to read, so if it is
+ larger, then all data has been read already. */
+ memcpy(buf, read_buf,
+ (size_t)ret > buffersize ? buffersize : (size_t)ret);
+ }
+ else if(ret == SSL_OK) {
+ /* more data to be read, signal caller to call again */
+ *err = CURLE_AGAIN;
+ ret = -1;
+ }
+ else if(ret == -3) {
+ /* With patched axTLS, SSL_CLOSE_NOTIFY=-3. Hard-coding until axTLS
+ team approves proposed fix. */
+ Curl_axtls_close(conn, num);
+ }
+ else {
+ failf(conn->data, "axTLS recv error (%d)", ret);
+ *err = map_error_to_curl((int) ret);
+ ret = -1;
+ }
+ }
+
+ return ret;
+}
+
+/*
+ * Return codes:
+ * 1 means the connection is still in place
+ * 0 means the connection has been closed
+ * -1 means the connection status is unknown
+ */
+int Curl_axtls_check_cxn(struct connectdata *conn)
+{
+ /* openssl.c line: rc = SSL_peek(conn->ssl[FIRSTSOCKET].ssl, (void*)&buf, 1);
+ axTLS compat layer always returns the last argument, so connection is
+ always alive? */
+
+ infof(conn->data, " Curl_axtls_check_cxn\n");
+ return 1; /* connection still in place */
+}
+
+void Curl_axtls_session_free(void *ptr)
+{
+ (void)ptr;
+ /* free the ID */
+ /* both openssl.c and gtls.c do something here, but axTLS's OpenSSL
+ compatibility layer does nothing, so we do nothing too. */
+}
+
+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((int)length, entropy);
+ return 0;
+}
+
+#endif /* USE_AXTLS */
diff --git a/lib/vtls/axtls.h b/lib/vtls/axtls.h
new file mode 100644
index 00000000..223ecb8c
--- /dev/null
+++ b/lib/vtls/axtls.h
@@ -0,0 +1,71 @@
+#ifndef HEADER_CURL_AXTLS_H
+#define HEADER_CURL_AXTLS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, DirecTV, Contact: Eric Hu <ehu@directv.com>
+ * Copyright (C) 2010 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+#ifdef USE_AXTLS
+#include "curl/curl.h"
+#include "urldata.h"
+
+int Curl_axtls_init(void);
+int Curl_axtls_cleanup(void);
+CURLcode Curl_axtls_connect(struct connectdata *conn, int sockindex);
+CURLcode Curl_axtls_connect_nonblocking(
+ struct connectdata *conn,
+ int sockindex,
+ bool *done);
+
+ /* close a SSL connection */
+void Curl_axtls_close(struct connectdata *conn, int sockindex);
+
+void Curl_axtls_session_free(void *ptr);
+size_t Curl_axtls_version(char *buffer, size_t size);
+int Curl_axtls_shutdown(struct connectdata *conn, int sockindex);
+int Curl_axtls_check_cxn(struct connectdata *conn);
+int Curl_axtls_random(struct SessionHandle *data,
+ unsigned char *entropy,
+ size_t length);
+
+/* Set the API backend definition to axTLS */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_AXTLS
+
+/* API setup for axTLS */
+#define curlssl_init Curl_axtls_init
+#define curlssl_cleanup Curl_axtls_cleanup
+#define curlssl_connect Curl_axtls_connect
+#define curlssl_connect_nonblocking Curl_axtls_connect_nonblocking
+#define curlssl_session_free(x) Curl_axtls_session_free(x)
+#define curlssl_close_all(x) ((void)x)
+#define curlssl_close Curl_axtls_close
+#define curlssl_shutdown(x,y) Curl_axtls_shutdown(x,y)
+#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_axtls_version
+#define curlssl_check_cxn(x) Curl_axtls_check_cxn(x)
+#define curlssl_data_pending(x,y) ((void)x, (void)y, 0)
+#define curlssl_random(x,y,z) Curl_axtls_random(x,y,z)
+
+#endif /* USE_AXTLS */
+#endif /* HEADER_CURL_AXTLS_H */
+
diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c
new file mode 100644
index 00000000..40dbbe13
--- /dev/null
+++ b/lib/vtls/cyassl.c
@@ -0,0 +1,773 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all CyaSSL-specific code for the TLS/SSL layer. No code
+ * but vtls.c should ever call or use these functions.
+ *
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_CYASSL
+
+#define WOLFSSL_OPTIONS_IGNORE_SYS
+/* CyaSSL's version.h, which should contain only the version, should come
+before all other CyaSSL includes and be immediately followed by build config
+aka options.h. http://curl.haxx.se/mail/lib-2015-04/0069.html */
+#include <cyassl/version.h>
+#if defined(HAVE_CYASSL_OPTIONS_H) && (LIBCYASSL_VERSION_HEX > 0x03004008)
+#if defined(CYASSL_API) || defined(WOLFSSL_API)
+/* Safety measure. If either is defined some API include was already included
+and that's a problem since options.h hasn't been included yet. */
+#error "CyaSSL API was included before the CyaSSL build options."
+#endif
+#include <cyassl/options.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "urldata.h"
+#include "sendf.h"
+#include "inet_pton.h"
+#include "cyassl.h"
+#include "vtls.h"
+#include "parsedate.h"
+#include "connect.h" /* for the connect timeout */
+#include "select.h"
+#include "rawstr.h"
+#include "x509asn1.h"
+#include "curl_printf.h"
+
+#include <cyassl/ssl.h>
+#ifdef HAVE_CYASSL_ERROR_SSL_H
+#include <cyassl/error-ssl.h>
+#else
+#include <cyassl/error.h>
+#endif
+#include <cyassl/ctaocrypt/random.h>
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#if LIBCYASSL_VERSION_HEX < 0x02007002 /* < 2.7.2 */
+#define CYASSL_MAX_ERROR_SZ 80
+#endif
+
+static Curl_recv cyassl_recv;
+static Curl_send cyassl_send;
+
+
+static int do_file_type(const char *type)
+{
+ if(!type || !type[0])
+ return SSL_FILETYPE_PEM;
+ if(Curl_raw_equal(type, "PEM"))
+ return SSL_FILETYPE_PEM;
+ if(Curl_raw_equal(type, "DER"))
+ return SSL_FILETYPE_ASN1;
+ return -1;
+}
+
+/*
+ * This function loads all the client/CA certificates and CRLs. Setup the TLS
+ * layer and do all necessary magic.
+ */
+static CURLcode
+cyassl_connect_step1(struct connectdata *conn,
+ int sockindex)
+{
+ char error_buffer[CYASSL_MAX_ERROR_SZ];
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data* conssl = &conn->ssl[sockindex];
+ SSL_METHOD* req_method = NULL;
+ void* ssl_sessionid = NULL;
+ curl_socket_t sockfd = conn->sock[sockindex];
+#ifdef HAVE_SNI
+ bool sni = FALSE;
+#define use_sni(x) sni = (x)
+#else
+#define use_sni(x) Curl_nop_stmt
+#endif
+
+ if(conssl->state == ssl_connection_complete)
+ return CURLE_OK;
+
+ /* check to see if we've been told to use an explicit SSL/TLS version */
+ switch(data->set.ssl.version) {
+ case CURL_SSLVERSION_DEFAULT:
+ case CURL_SSLVERSION_TLSv1:
+#if LIBCYASSL_VERSION_HEX >= 0x03003000 /* >= 3.3.0 */
+ /* minimum protocol version is set later after the CTX object is created */
+ req_method = SSLv23_client_method();
+#else
+ infof(data, "CyaSSL <3.3.0 cannot be configured to use TLS 1.0-1.2, "
+ "TLS 1.0 is used exclusively\n");
+ req_method = TLSv1_client_method();
+#endif
+ use_sni(TRUE);
+ break;
+ case CURL_SSLVERSION_TLSv1_0:
+ req_method = TLSv1_client_method();
+ use_sni(TRUE);
+ break;
+ case CURL_SSLVERSION_TLSv1_1:
+ req_method = TLSv1_1_client_method();
+ use_sni(TRUE);
+ break;
+ case CURL_SSLVERSION_TLSv1_2:
+ req_method = TLSv1_2_client_method();
+ use_sni(TRUE);
+ break;
+ case CURL_SSLVERSION_SSLv3:
+ req_method = SSLv3_client_method();
+ use_sni(FALSE);
+ break;
+ case CURL_SSLVERSION_SSLv2:
+ failf(data, "CyaSSL does not support SSLv2");
+ return CURLE_SSL_CONNECT_ERROR;
+ default:
+ failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ if(!req_method) {
+ failf(data, "SSL: couldn't create a method!");
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ if(conssl->ctx)
+ SSL_CTX_free(conssl->ctx);
+ conssl->ctx = SSL_CTX_new(req_method);
+
+ if(!conssl->ctx) {
+ failf(data, "SSL: couldn't create a context!");
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ switch(data->set.ssl.version) {
+ case CURL_SSLVERSION_DEFAULT:
+ case CURL_SSLVERSION_TLSv1:
+#if LIBCYASSL_VERSION_HEX > 0x03004006 /* > 3.4.6 */
+ /* Versions 3.3.0 to 3.4.6 we know the minimum protocol version is whatever
+ minimum version of TLS was built in and at least TLS 1.0. For later library
+ versions that could change (eg TLS 1.0 built in but defaults to TLS 1.1) so
+ we have this short circuit evaluation to find the minimum supported TLS
+ version. We use wolfSSL_CTX_SetMinVersion and not CyaSSL_SetMinVersion
+ because only the former will work before the user's CTX callback is called.
+ */
+ if((wolfSSL_CTX_SetMinVersion(conssl->ctx, WOLFSSL_TLSV1) != 1) &&
+ (wolfSSL_CTX_SetMinVersion(conssl->ctx, WOLFSSL_TLSV1_1) != 1) &&
+ (wolfSSL_CTX_SetMinVersion(conssl->ctx, WOLFSSL_TLSV1_2) != 1)) {
+ failf(data, "SSL: couldn't set the minimum protocol version");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+#endif
+ break;
+ }
+
+#ifndef NO_FILESYSTEM
+ /* load trusted cacert */
+ if(data->set.str[STRING_SSL_CAFILE]) {
+ if(1 != SSL_CTX_load_verify_locations(conssl->ctx,
+ 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. */
+ failf(data, "error setting certificate verify locations:\n"
+ " CAfile: %s\n CApath: %s",
+ data->set.str[STRING_SSL_CAFILE]?
+ data->set.str[STRING_SSL_CAFILE]: "none",
+ data->set.str[STRING_SSL_CAPATH]?
+ data->set.str[STRING_SSL_CAPATH] : "none");
+ return CURLE_SSL_CACERT_BADFILE;
+ }
+ else {
+ /* Just continue with a warning if no strict certificate
+ verification is required. */
+ infof(data, "error setting certificate verify locations,"
+ " continuing anyway:\n");
+ }
+ }
+ else {
+ /* Everything is fine. */
+ infof(data, "successfully set certificate verify locations:\n");
+ }
+ infof(data,
+ " CAfile: %s\n"
+ " CApath: %s\n",
+ data->set.str[STRING_SSL_CAFILE] ? data->set.str[STRING_SSL_CAFILE]:
+ "none",
+ data->set.str[STRING_SSL_CAPATH] ? data->set.str[STRING_SSL_CAPATH]:
+ "none");
+ }
+
+ /* Load the client certificate, and private key */
+ if(data->set.str[STRING_CERT] && data->set.str[STRING_KEY]) {
+ int file_type = do_file_type(data->set.str[STRING_CERT_TYPE]);
+
+ if(SSL_CTX_use_certificate_file(conssl->ctx, data->set.str[STRING_CERT],
+ file_type) != 1) {
+ failf(data, "unable to use client certificate (no key or wrong pass"
+ " phrase?)");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ file_type = do_file_type(data->set.str[STRING_KEY_TYPE]);
+ if(SSL_CTX_use_PrivateKey_file(conssl->ctx, data->set.str[STRING_KEY],
+ file_type) != 1) {
+ failf(data, "unable to set private key");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+#endif /* !NO_FILESYSTEM */
+
+ /* SSL always tries to verify the peer, this only says whether it should
+ * fail to connect if the verification fails, or if it should continue
+ * anyway. In the latter case the result of the verification is checked with
+ * SSL_get_verify_result() below. */
+ SSL_CTX_set_verify(conssl->ctx,
+ data->set.ssl.verifypeer?SSL_VERIFY_PEER:SSL_VERIFY_NONE,
+ NULL);
+
+#ifdef HAVE_SNI
+ if(sni) {
+ struct in_addr addr4;
+#ifdef ENABLE_IPV6
+ struct in6_addr addr6;
+#endif
+ size_t hostname_len = strlen(conn->host.name);
+ if((hostname_len < USHRT_MAX) &&
+ (0 == Curl_inet_pton(AF_INET, conn->host.name, &addr4)) &&
+#ifdef ENABLE_IPV6
+ (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr6)) &&
+#endif
+ (CyaSSL_CTX_UseSNI(conssl->ctx, CYASSL_SNI_HOST_NAME, conn->host.name,
+ (unsigned short)hostname_len) != 1)) {
+ infof(data, "WARNING: failed to configure server name indication (SNI) "
+ "TLS extension\n");
+ }
+ }
+#endif
+
+ /* give application a chance to interfere with SSL set up. */
+ if(data->set.ssl.fsslctx) {
+ CURLcode result = CURLE_OK;
+ result = (*data->set.ssl.fsslctx)(data, conssl->ctx,
+ data->set.ssl.fsslctxp);
+ if(result) {
+ failf(data, "error signaled by ssl ctx callback");
+ return result;
+ }
+ }
+#ifdef NO_FILESYSTEM
+ else if(data->set.ssl.verifypeer) {
+ failf(data, "SSL: Certificates couldn't be loaded because CyaSSL was built"
+ " with \"no filesystem\". Either disable peer verification"
+ " (insecure) or if you are building an application with libcurl you"
+ " can load certificates via CURLOPT_SSL_CTX_FUNCTION.");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+#endif
+
+ /* Let's make an SSL structure */
+ if(conssl->handle)
+ SSL_free(conssl->handle);
+ conssl->handle = SSL_new(conssl->ctx);
+ if(!conssl->handle) {
+ failf(data, "SSL: couldn't create a context (handle)!");
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ /* Check if there's a cached ID we can/should use here! */
+ if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL)) {
+ /* we got a session id, use it! */
+ if(!SSL_set_session(conssl->handle, ssl_sessionid)) {
+ failf(data, "SSL: SSL_set_session failed: %s",
+ ERR_error_string(SSL_get_error(conssl->handle, 0), error_buffer));
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ /* Informational message */
+ infof (data, "SSL re-using session ID\n");
+ }
+
+ /* pass the raw socket into the SSL layer */
+ if(!SSL_set_fd(conssl->handle, (int)sockfd)) {
+ failf(data, "SSL: SSL_set_fd failed");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ conssl->connecting_state = ssl_connect_2;
+ return CURLE_OK;
+}
+
+
+static CURLcode
+cyassl_connect_step2(struct connectdata *conn,
+ int sockindex)
+{
+ int ret = -1;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data* conssl = &conn->ssl[sockindex];
+
+ conn->recv[sockindex] = cyassl_recv;
+ conn->send[sockindex] = cyassl_send;
+
+ /* Enable RFC2818 checks */
+ if(data->set.ssl.verifyhost) {
+ ret = CyaSSL_check_domain_name(conssl->handle, conn->host.name);
+ if(ret == SSL_FAILURE)
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ ret = SSL_connect(conssl->handle);
+ if(ret != 1) {
+ char error_buffer[CYASSL_MAX_ERROR_SZ];
+ int detail = SSL_get_error(conssl->handle, ret);
+
+ if(SSL_ERROR_WANT_READ == detail) {
+ conssl->connecting_state = ssl_connect_2_reading;
+ return CURLE_OK;
+ }
+ else if(SSL_ERROR_WANT_WRITE == detail) {
+ conssl->connecting_state = ssl_connect_2_writing;
+ return CURLE_OK;
+ }
+ /* There is no easy way to override only the CN matching.
+ * This will enable the override of both mismatching SubjectAltNames
+ * as also mismatching CN fields */
+ else if(DOMAIN_NAME_MISMATCH == detail) {
+#if 1
+ failf(data, "\tsubject alt name(s) or common name do not match \"%s\"\n",
+ conn->host.dispname);
+ return CURLE_PEER_FAILED_VERIFICATION;
+#else
+ /* When the CyaSSL_check_domain_name() is used and you desire to continue
+ * on a DOMAIN_NAME_MISMATCH, i.e. 'data->set.ssl.verifyhost == 0',
+ * CyaSSL version 2.4.0 will fail with an INCOMPLETE_DATA error. The only
+ * way to do this is currently to switch the CyaSSL_check_domain_name()
+ * in and out based on the 'data->set.ssl.verifyhost' value. */
+ if(data->set.ssl.verifyhost) {
+ failf(data,
+ "\tsubject alt name(s) or common name do not match \"%s\"\n",
+ conn->host.dispname);
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+ else {
+ infof(data,
+ "\tsubject alt name(s) and/or common name do not match \"%s\"\n",
+ conn->host.dispname);
+ return CURLE_OK;
+ }
+#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));
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+
+ if(data->set.str[STRING_SSL_PINNEDPUBLICKEY]) {
+ X509 *x509;
+ const char *x509_der;
+ int x509_der_len;
+ curl_X509certificate x509_parsed;
+ curl_asn1Element *pubkey;
+ CURLcode result;
+
+ x509 = SSL_get_peer_certificate(conssl->handle);
+ if(!x509) {
+ failf(data, "SSL: failed retrieving server certificate");
+ return CURLE_SSL_PINNEDPUBKEYNOTMATCH;
+ }
+
+ x509_der = (const char *)CyaSSL_X509_get_der(x509, &x509_der_len);
+ if(!x509_der) {
+ failf(data, "SSL: failed retrieving ASN.1 server certificate");
+ return CURLE_SSL_PINNEDPUBKEYNOTMATCH;
+ }
+
+ memset(&x509_parsed, 0, sizeof x509_parsed);
+ Curl_parseX509(&x509_parsed, x509_der, x509_der + x509_der_len);
+
+ pubkey = &x509_parsed.subjectPublicKeyInfo;
+ if(!pubkey->header || pubkey->end <= pubkey->header) {
+ failf(data, "SSL: failed retrieving public key from server certificate");
+ return CURLE_SSL_PINNEDPUBKEYNOTMATCH;
+ }
+
+ result = Curl_pin_peer_pubkey(data->set.str[STRING_SSL_PINNEDPUBLICKEY],
+ (const unsigned char *)pubkey->header,
+ (size_t)(pubkey->end - pubkey->header));
+ if(result) {
+ failf(data, "SSL: public key does not match pinned public key!");
+ return result;
+ }
+ }
+
+ conssl->connecting_state = ssl_connect_3;
+ infof(data, "SSL connected\n");
+
+ return CURLE_OK;
+}
+
+
+static CURLcode
+cyassl_connect_step3(struct connectdata *conn,
+ int sockindex)
+{
+ CURLcode result = CURLE_OK;
+ void *old_ssl_sessionid=NULL;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ bool incache;
+ SSL_SESSION *our_ssl_sessionid;
+
+ DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
+
+ our_ssl_sessionid = SSL_get_session(connssl->handle);
+
+ incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL));
+ if(incache) {
+ if(old_ssl_sessionid != our_ssl_sessionid) {
+ infof(data, "old SSL session ID is stale, removing\n");
+ Curl_ssl_delsessionid(conn, old_ssl_sessionid);
+ incache = FALSE;
+ }
+ }
+
+ if(!incache) {
+ result = Curl_ssl_addsessionid(conn, our_ssl_sessionid,
+ 0 /* unknown size */);
+ if(result) {
+ failf(data, "failed to store ssl session");
+ return result;
+ }
+ }
+
+ connssl->connecting_state = ssl_connect_done;
+
+ return result;
+}
+
+
+static ssize_t cyassl_send(struct connectdata *conn,
+ int sockindex,
+ const void *mem,
+ size_t len,
+ CURLcode *curlcode)
+{
+ char error_buffer[CYASSL_MAX_ERROR_SZ];
+ int memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
+ int rc = SSL_write(conn->ssl[sockindex].handle, mem, memlen);
+
+ if(rc < 0) {
+ int err = SSL_get_error(conn->ssl[sockindex].handle, rc);
+
+ switch(err) {
+ case SSL_ERROR_WANT_READ:
+ case SSL_ERROR_WANT_WRITE:
+ /* there's data pending, re-invoke SSL_write() */
+ *curlcode = CURLE_AGAIN;
+ return -1;
+ default:
+ failf(conn->data, "SSL write: %s, errno %d",
+ ERR_error_string(err, error_buffer),
+ SOCKERRNO);
+ *curlcode = CURLE_SEND_ERROR;
+ return -1;
+ }
+ }
+ return rc;
+}
+
+void Curl_cyassl_close(struct connectdata *conn, int sockindex)
+{
+ struct ssl_connect_data *conssl = &conn->ssl[sockindex];
+
+ if(conssl->handle) {
+ (void)SSL_shutdown(conssl->handle);
+ SSL_free (conssl->handle);
+ conssl->handle = NULL;
+ }
+ if(conssl->ctx) {
+ SSL_CTX_free (conssl->ctx);
+ conssl->ctx = NULL;
+ }
+}
+
+static ssize_t cyassl_recv(struct connectdata *conn,
+ int num,
+ char *buf,
+ size_t buffersize,
+ CURLcode *curlcode)
+{
+ char error_buffer[CYASSL_MAX_ERROR_SZ];
+ int buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
+ int nread = SSL_read(conn->ssl[num].handle, buf, buffsize);
+
+ if(nread < 0) {
+ int err = SSL_get_error(conn->ssl[num].handle, nread);
+
+ switch(err) {
+ case SSL_ERROR_ZERO_RETURN: /* no more data */
+ break;
+ case SSL_ERROR_WANT_READ:
+ case SSL_ERROR_WANT_WRITE:
+ /* there's data pending, re-invoke SSL_read() */
+ *curlcode = CURLE_AGAIN;
+ return -1;
+ default:
+ failf(conn->data, "SSL read: %s, errno %d",
+ ERR_error_string(err, error_buffer),
+ SOCKERRNO);
+ *curlcode = CURLE_RECV_ERROR;
+ return -1;
+ }
+ }
+ return nread;
+}
+
+
+void Curl_cyassl_session_free(void *ptr)
+{
+ (void)ptr;
+ /* CyaSSL reuses sessions on own, no free */
+}
+
+
+size_t Curl_cyassl_version(char *buffer, size_t size)
+{
+#ifdef WOLFSSL_VERSION
+ return snprintf(buffer, size, "wolfSSL/%s", WOLFSSL_VERSION);
+#elif defined(CYASSL_VERSION)
+ return snprintf(buffer, size, "CyaSSL/%s", CYASSL_VERSION);
+#else
+ return snprintf(buffer, size, "CyaSSL/%s", "<1.8.8");
+#endif
+}
+
+
+int Curl_cyassl_init(void)
+{
+ return (CyaSSL_Init() == SSL_SUCCESS);
+}
+
+
+bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex)
+{
+ if(conn->ssl[connindex].handle) /* SSL is in use */
+ return (0 != SSL_pending(conn->ssl[connindex].handle)) ? TRUE : FALSE;
+ else
+ return FALSE;
+}
+
+
+/*
+ * This function is called to shut down the SSL layer but keep the
+ * socket open (CCC - Clear Command Channel)
+ */
+int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex)
+{
+ int retval = 0;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ if(connssl->handle) {
+ SSL_free (connssl->handle);
+ connssl->handle = NULL;
+ }
+ return retval;
+}
+
+
+static CURLcode
+cyassl_connect_common(struct connectdata *conn,
+ int sockindex,
+ bool nonblocking,
+ bool *done)
+{
+ CURLcode result;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ curl_socket_t sockfd = conn->sock[sockindex];
+ long timeout_ms;
+ int what;
+
+ /* check if the connection has already been established */
+ if(ssl_connection_complete == connssl->state) {
+ *done = TRUE;
+ return CURLE_OK;
+ }
+
+ if(ssl_connect_1==connssl->connecting_state) {
+ /* Find out how much more time we're allowed */
+ 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");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ result = cyassl_connect_step1(conn, sockindex);
+ if(result)
+ return result;
+ }
+
+ while(ssl_connect_2 == connssl->connecting_state ||
+ ssl_connect_2_reading == connssl->connecting_state ||
+ ssl_connect_2_writing == connssl->connecting_state) {
+
+ /* 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");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ /* 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) {
+
+ curl_socket_t writefd = ssl_connect_2_writing==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+ curl_socket_t readfd = ssl_connect_2_reading==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+
+ what = Curl_socket_ready(readfd, writefd, nonblocking?0:timeout_ms);
+ if(what < 0) {
+ /* fatal error */
+ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ else if(0 == what) {
+ if(nonblocking) {
+ *done = FALSE;
+ return CURLE_OK;
+ }
+ else {
+ /* timeout */
+ failf(data, "SSL connection timeout");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+ }
+ /* socket is readable or writable */
+ }
+
+ /* Run transaction, and return to the caller if it failed or if
+ * this connection is part of a multi handle and this loop would
+ * execute again. This permits the owner of a multi handle to
+ * abort a connection attempt before step2 has completed while
+ * 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;
+ } /* 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_done == connssl->connecting_state) {
+ connssl->state = ssl_connection_complete;
+ conn->recv[sockindex] = cyassl_recv;
+ conn->send[sockindex] = cyassl_send;
+ *done = TRUE;
+ }
+ else
+ *done = FALSE;
+
+ /* Reset our connect state machine */
+ connssl->connecting_state = ssl_connect_1;
+
+ return CURLE_OK;
+}
+
+
+CURLcode
+Curl_cyassl_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done)
+{
+ return cyassl_connect_common(conn, sockindex, TRUE, done);
+}
+
+
+CURLcode
+Curl_cyassl_connect(struct connectdata *conn,
+ int sockindex)
+{
+ CURLcode result;
+ bool done = FALSE;
+
+ result = cyassl_connect_common(conn, sockindex, FALSE, &done);
+ if(result)
+ return result;
+
+ 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(length > UINT_MAX)
+ return 1;
+ if(RNG_GenerateBlock(&rng, entropy, (unsigned)length))
+ return 1;
+ return 0;
+}
+
+#endif
diff --git a/lib/vtls/cyassl.h b/lib/vtls/cyassl.h
new file mode 100644
index 00000000..12638a76
--- /dev/null
+++ b/lib/vtls/cyassl.h
@@ -0,0 +1,70 @@
+#ifndef HEADER_CURL_CYASSL_H
+#define HEADER_CURL_CYASSL_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_CYASSL
+
+CURLcode Curl_cyassl_connect(struct connectdata *conn, int sockindex);
+bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex);
+int Curl_cyassl_shutdown(struct connectdata* conn, int sockindex);
+
+ /* close a SSL connection */
+void Curl_cyassl_close(struct connectdata *conn, int sockindex);
+
+void Curl_cyassl_session_free(void *ptr);
+size_t Curl_cyassl_version(char *buffer, size_t size);
+int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex);
+int Curl_cyassl_init(void);
+CURLcode Curl_cyassl_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done);
+int Curl_cyassl_random(struct SessionHandle *data,
+ unsigned char *entropy,
+ size_t length);
+
+/* Set the API backend definition to Schannel */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL
+
+/* this backend supports CURLOPT_SSL_CTX_* */
+#define have_curlssl_ssl_ctx 1
+
+/* API setup for CyaSSL */
+#define curlssl_init Curl_cyassl_init
+#define curlssl_cleanup() Curl_nop_stmt
+#define curlssl_connect Curl_cyassl_connect
+#define curlssl_connect_nonblocking Curl_cyassl_connect_nonblocking
+#define curlssl_session_free(x) Curl_cyassl_session_free(x)
+#define curlssl_close_all(x) ((void)x)
+#define curlssl_close Curl_cyassl_close
+#define curlssl_shutdown(x,y) Curl_cyassl_shutdown(x,y)
+#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_cyassl_version
+#define curlssl_check_cxn(x) ((void)x, -1)
+#define curlssl_data_pending(x,y) Curl_cyassl_data_pending(x,y)
+#define curlssl_random(x,y,z) Curl_cyassl_random(x,y,z)
+
+#endif /* USE_CYASSL */
+#endif /* HEADER_CURL_CYASSL_H */
diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c
new file mode 100644
index 00000000..03adcef2
--- /dev/null
+++ b/lib/vtls/darwinssl.c
@@ -0,0 +1,2484 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2014, Nick Zitzmann, <nickzman@gmail.com>.
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all iOS and Mac OS X SecureTransport-specific code for the
+ * TLS/SSL layer. No code but vtls.c should ever call or use these functions.
+ */
+
+#include "curl_setup.h"
+
+#include "urldata.h" /* for the SessionHandle definition */
+#include "curl_base64.h"
+#include "strtok.h"
+
+#ifdef USE_DARWINSSL
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include <Security/Security.h>
+#include <Security/SecureTransport.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <CommonCrypto/CommonDigest.h>
+
+/* The Security framework has changed greatly between iOS and different OS X
+ versions, and we will try to support as many of them as we can (back to
+ Leopard and iOS 5) by using macros and weak-linking.
+
+ IMPORTANT: If TLS 1.1 and 1.2 support are important for you on OS X, then
+ you must build this project against the 10.8 SDK or later. */
+#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE))
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
+#error "The darwinssl back-end requires Leopard or later."
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1050 */
+
+#define CURL_BUILD_IOS 0
+#define CURL_BUILD_IOS_7 0
+#define CURL_BUILD_MAC 1
+/* This is the maximum API level we are allowed to use when building: */
+#define CURL_BUILD_MAC_10_5 MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
+#define CURL_BUILD_MAC_10_6 MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+#define CURL_BUILD_MAC_10_7 MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+#define CURL_BUILD_MAC_10_8 MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
+#define CURL_BUILD_MAC_10_9 MAC_OS_X_VERSION_MAX_ALLOWED >= 1090
+/* These macros mean "the following code is present to allow runtime backward
+ compatibility with at least this cat or earlier":
+ (You set this at build-time by setting the MACOSX_DEPLOYMENT_TARGET
+ environmental variable.) */
+#define CURL_SUPPORT_MAC_10_5 MAC_OS_X_VERSION_MIN_REQUIRED <= 1050
+#define CURL_SUPPORT_MAC_10_6 MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
+#define CURL_SUPPORT_MAC_10_7 MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
+#define CURL_SUPPORT_MAC_10_8 MAC_OS_X_VERSION_MIN_REQUIRED <= 1080
+#define CURL_SUPPORT_MAC_10_9 MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
+
+#elif TARGET_OS_EMBEDDED || TARGET_OS_IPHONE
+#define CURL_BUILD_IOS 1
+#define CURL_BUILD_IOS_7 __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
+#define CURL_BUILD_MAC 0
+#define CURL_BUILD_MAC_10_5 0
+#define CURL_BUILD_MAC_10_6 0
+#define CURL_BUILD_MAC_10_7 0
+#define CURL_BUILD_MAC_10_8 0
+#define CURL_SUPPORT_MAC_10_5 0
+#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."
+#endif /* (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) */
+
+#if CURL_BUILD_MAC
+#include <sys/sysctl.h>
+#endif /* CURL_BUILD_MAC */
+
+#include "urldata.h"
+#include "sendf.h"
+#include "inet_pton.h"
+#include "connect.h"
+#include "select.h"
+#include "vtls.h"
+#include "darwinssl.h"
+#include "curl_printf.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/* From MacTypes.h (which we can't include because it isn't present in iOS: */
+#define ioErr -36
+#define paramErr -50
+
+/* The following two functions were ripped from Apple sample code,
+ * with some modifications: */
+static OSStatus SocketRead(SSLConnectionRef connection,
+ void *data, /* owned by
+ * caller, data
+ * RETURNED */
+ size_t *dataLength) /* IN/OUT */
+{
+ size_t bytesToGo = *dataLength;
+ size_t initLen = bytesToGo;
+ UInt8 *currData = (UInt8 *)data;
+ /*int sock = *(int *)connection;*/
+ struct ssl_connect_data *connssl = (struct ssl_connect_data *)connection;
+ int sock = connssl->ssl_sockfd;
+ OSStatus rtn = noErr;
+ size_t bytesRead;
+ ssize_t rrtn;
+ int theErr;
+
+ *dataLength = 0;
+
+ for(;;) {
+ bytesRead = 0;
+ rrtn = read(sock, currData, bytesToGo);
+ if(rrtn <= 0) {
+ /* this is guesswork... */
+ theErr = errno;
+ if(rrtn == 0) { /* EOF = server hung up */
+ /* the framework will turn this into errSSLClosedNoNotify */
+ rtn = errSSLClosedGraceful;
+ }
+ else /* do the switch */
+ switch(theErr) {
+ case ENOENT:
+ /* connection closed */
+ rtn = errSSLClosedGraceful;
+ break;
+ case ECONNRESET:
+ rtn = errSSLClosedAbort;
+ break;
+ case EAGAIN:
+ rtn = errSSLWouldBlock;
+ connssl->ssl_direction = false;
+ break;
+ default:
+ rtn = ioErr;
+ break;
+ }
+ break;
+ }
+ else {
+ bytesRead = rrtn;
+ }
+ bytesToGo -= bytesRead;
+ currData += bytesRead;
+
+ if(bytesToGo == 0) {
+ /* filled buffer with incoming data, done */
+ break;
+ }
+ }
+ *dataLength = initLen - bytesToGo;
+
+ return rtn;
+}
+
+static OSStatus SocketWrite(SSLConnectionRef connection,
+ const void *data,
+ size_t *dataLength) /* IN/OUT */
+{
+ size_t bytesSent = 0;
+ /*int sock = *(int *)connection;*/
+ struct ssl_connect_data *connssl = (struct ssl_connect_data *)connection;
+ int sock = connssl->ssl_sockfd;
+ ssize_t length;
+ size_t dataLen = *dataLength;
+ const UInt8 *dataPtr = (UInt8 *)data;
+ OSStatus ortn;
+ int theErr;
+
+ *dataLength = 0;
+
+ do {
+ length = write(sock,
+ (char*)dataPtr + bytesSent,
+ dataLen - bytesSent);
+ } while((length > 0) &&
+ ( (bytesSent += length) < dataLen) );
+
+ if(length <= 0) {
+ theErr = errno;
+ if(theErr == EAGAIN) {
+ ortn = errSSLWouldBlock;
+ connssl->ssl_direction = true;
+ }
+ else {
+ ortn = ioErr;
+ }
+ }
+ else {
+ ortn = noErr;
+ }
+ *dataLength = bytesSent;
+ return ortn;
+}
+
+CF_INLINE const char *SSLCipherNameForNumber(SSLCipherSuite cipher) {
+ switch (cipher) {
+ /* SSL version 3.0 */
+ case SSL_RSA_WITH_NULL_MD5:
+ return "SSL_RSA_WITH_NULL_MD5";
+ break;
+ case SSL_RSA_WITH_NULL_SHA:
+ return "SSL_RSA_WITH_NULL_SHA";
+ break;
+ case SSL_RSA_EXPORT_WITH_RC4_40_MD5:
+ return "SSL_RSA_EXPORT_WITH_RC4_40_MD5";
+ break;
+ case SSL_RSA_WITH_RC4_128_MD5:
+ return "SSL_RSA_WITH_RC4_128_MD5";
+ break;
+ case SSL_RSA_WITH_RC4_128_SHA:
+ return "SSL_RSA_WITH_RC4_128_SHA";
+ break;
+ case SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5:
+ return "SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5";
+ break;
+ case SSL_RSA_WITH_IDEA_CBC_SHA:
+ return "SSL_RSA_WITH_IDEA_CBC_SHA";
+ break;
+ case SSL_RSA_EXPORT_WITH_DES40_CBC_SHA:
+ return "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA";
+ break;
+ case SSL_RSA_WITH_DES_CBC_SHA:
+ return "SSL_RSA_WITH_DES_CBC_SHA";
+ break;
+ case SSL_RSA_WITH_3DES_EDE_CBC_SHA:
+ return "SSL_RSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA:
+ return "SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA";
+ break;
+ case SSL_DH_DSS_WITH_DES_CBC_SHA:
+ return "SSL_DH_DSS_WITH_DES_CBC_SHA";
+ break;
+ case SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA:
+ return "SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA:
+ return "SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA";
+ break;
+ case SSL_DH_RSA_WITH_DES_CBC_SHA:
+ return "SSL_DH_RSA_WITH_DES_CBC_SHA";
+ break;
+ case SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA:
+ return "SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA:
+ return "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA";
+ break;
+ case SSL_DHE_DSS_WITH_DES_CBC_SHA:
+ return "SSL_DHE_DSS_WITH_DES_CBC_SHA";
+ break;
+ case SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA:
+ return "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA:
+ return "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA";
+ break;
+ case SSL_DHE_RSA_WITH_DES_CBC_SHA:
+ return "SSL_DHE_RSA_WITH_DES_CBC_SHA";
+ break;
+ case SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
+ return "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case SSL_DH_anon_EXPORT_WITH_RC4_40_MD5:
+ return "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5";
+ break;
+ case SSL_DH_anon_WITH_RC4_128_MD5:
+ return "SSL_DH_anon_WITH_RC4_128_MD5";
+ break;
+ case SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA:
+ return "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA";
+ break;
+ case SSL_DH_anon_WITH_DES_CBC_SHA:
+ return "SSL_DH_anon_WITH_DES_CBC_SHA";
+ break;
+ case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA:
+ return "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case SSL_FORTEZZA_DMS_WITH_NULL_SHA:
+ return "SSL_FORTEZZA_DMS_WITH_NULL_SHA";
+ break;
+ case SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA:
+ return "SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA";
+ break;
+ /* TLS 1.0 with AES (RFC 3268)
+ (Apparently these are used in SSLv3 implementations as well.) */
+ case TLS_RSA_WITH_AES_128_CBC_SHA:
+ return "TLS_RSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DH_DSS_WITH_AES_128_CBC_SHA:
+ return "TLS_DH_DSS_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DH_RSA_WITH_AES_128_CBC_SHA:
+ return "TLS_DH_RSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DHE_DSS_WITH_AES_128_CBC_SHA:
+ return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
+ return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DH_anon_WITH_AES_128_CBC_SHA:
+ return "TLS_DH_anon_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_RSA_WITH_AES_256_CBC_SHA:
+ return "TLS_RSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DH_DSS_WITH_AES_256_CBC_SHA:
+ return "TLS_DH_DSS_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DH_RSA_WITH_AES_256_CBC_SHA:
+ return "TLS_DH_RSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DHE_DSS_WITH_AES_256_CBC_SHA:
+ return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
+ return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DH_anon_WITH_AES_256_CBC_SHA:
+ return "TLS_DH_anon_WITH_AES_256_CBC_SHA";
+ break;
+ /* SSL version 2.0 */
+ case SSL_RSA_WITH_RC2_CBC_MD5:
+ return "SSL_RSA_WITH_RC2_CBC_MD5";
+ break;
+ case SSL_RSA_WITH_IDEA_CBC_MD5:
+ return "SSL_RSA_WITH_IDEA_CBC_MD5";
+ break;
+ case SSL_RSA_WITH_DES_CBC_MD5:
+ return "SSL_RSA_WITH_DES_CBC_MD5";
+ break;
+ case SSL_RSA_WITH_3DES_EDE_CBC_MD5:
+ return "SSL_RSA_WITH_3DES_EDE_CBC_MD5";
+ break;
+ }
+ return "SSL_NULL_WITH_NULL_NULL";
+}
+
+CF_INLINE const char *TLSCipherNameForNumber(SSLCipherSuite cipher) {
+ switch(cipher) {
+ /* TLS 1.0 with AES (RFC 3268) */
+ case TLS_RSA_WITH_AES_128_CBC_SHA:
+ return "TLS_RSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DH_DSS_WITH_AES_128_CBC_SHA:
+ return "TLS_DH_DSS_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DH_RSA_WITH_AES_128_CBC_SHA:
+ return "TLS_DH_RSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DHE_DSS_WITH_AES_128_CBC_SHA:
+ return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
+ return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DH_anon_WITH_AES_128_CBC_SHA:
+ return "TLS_DH_anon_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_RSA_WITH_AES_256_CBC_SHA:
+ return "TLS_RSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DH_DSS_WITH_AES_256_CBC_SHA:
+ return "TLS_DH_DSS_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DH_RSA_WITH_AES_256_CBC_SHA:
+ return "TLS_DH_RSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DHE_DSS_WITH_AES_256_CBC_SHA:
+ return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
+ return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DH_anon_WITH_AES_256_CBC_SHA:
+ return "TLS_DH_anon_WITH_AES_256_CBC_SHA";
+ break;
+#if CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS
+ /* TLS 1.0 with ECDSA (RFC 4492) */
+ case TLS_ECDH_ECDSA_WITH_NULL_SHA:
+ return "TLS_ECDH_ECDSA_WITH_NULL_SHA";
+ break;
+ case TLS_ECDH_ECDSA_WITH_RC4_128_SHA:
+ return "TLS_ECDH_ECDSA_WITH_RC4_128_SHA";
+ break;
+ case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA:
+ return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA:
+ return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_ECDHE_ECDSA_WITH_NULL_SHA:
+ return "TLS_ECDHE_ECDSA_WITH_NULL_SHA";
+ break;
+ case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA:
+ return "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA";
+ break;
+ case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:
+ return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:
+ return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_ECDH_RSA_WITH_NULL_SHA:
+ return "TLS_ECDH_RSA_WITH_NULL_SHA";
+ break;
+ case TLS_ECDH_RSA_WITH_RC4_128_SHA:
+ return "TLS_ECDH_RSA_WITH_RC4_128_SHA";
+ break;
+ case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA:
+ return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA:
+ return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_ECDHE_RSA_WITH_NULL_SHA:
+ return "TLS_ECDHE_RSA_WITH_NULL_SHA";
+ break;
+ case TLS_ECDHE_RSA_WITH_RC4_128_SHA:
+ return "TLS_ECDHE_RSA_WITH_RC4_128_SHA";
+ break;
+ case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:
+ return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:
+ return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_ECDH_anon_WITH_NULL_SHA:
+ return "TLS_ECDH_anon_WITH_NULL_SHA";
+ break;
+ case TLS_ECDH_anon_WITH_RC4_128_SHA:
+ return "TLS_ECDH_anon_WITH_RC4_128_SHA";
+ break;
+ case TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_ECDH_anon_WITH_AES_128_CBC_SHA:
+ return "TLS_ECDH_anon_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_ECDH_anon_WITH_AES_256_CBC_SHA:
+ return "TLS_ECDH_anon_WITH_AES_256_CBC_SHA";
+ break;
+#endif /* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+ /* TLS 1.2 (RFC 5246) */
+ case TLS_RSA_WITH_NULL_MD5:
+ return "TLS_RSA_WITH_NULL_MD5";
+ break;
+ case TLS_RSA_WITH_NULL_SHA:
+ return "TLS_RSA_WITH_NULL_SHA";
+ break;
+ case TLS_RSA_WITH_RC4_128_MD5:
+ return "TLS_RSA_WITH_RC4_128_MD5";
+ break;
+ case TLS_RSA_WITH_RC4_128_SHA:
+ return "TLS_RSA_WITH_RC4_128_SHA";
+ break;
+ case TLS_RSA_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_RSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_RSA_WITH_NULL_SHA256:
+ return "TLS_RSA_WITH_NULL_SHA256";
+ break;
+ case TLS_RSA_WITH_AES_128_CBC_SHA256:
+ return "TLS_RSA_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_RSA_WITH_AES_256_CBC_SHA256:
+ return "TLS_RSA_WITH_AES_256_CBC_SHA256";
+ break;
+ case TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_DH_DSS_WITH_AES_128_CBC_SHA256:
+ return "TLS_DH_DSS_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_DH_RSA_WITH_AES_128_CBC_SHA256:
+ return "TLS_DH_RSA_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256:
+ return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256:
+ return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_DH_DSS_WITH_AES_256_CBC_SHA256:
+ return "TLS_DH_DSS_WITH_AES_256_CBC_SHA256";
+ break;
+ case TLS_DH_RSA_WITH_AES_256_CBC_SHA256:
+ return "TLS_DH_RSA_WITH_AES_256_CBC_SHA256";
+ break;
+ case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256:
+ return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256";
+ break;
+ case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256:
+ return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256";
+ break;
+ case TLS_DH_anon_WITH_RC4_128_MD5:
+ return "TLS_DH_anon_WITH_RC4_128_MD5";
+ break;
+ case TLS_DH_anon_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_DH_anon_WITH_AES_128_CBC_SHA256:
+ return "TLS_DH_anon_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_DH_anon_WITH_AES_256_CBC_SHA256:
+ return "TLS_DH_anon_WITH_AES_256_CBC_SHA256";
+ break;
+ /* TLS 1.2 with AES GCM (RFC 5288) */
+ case TLS_RSA_WITH_AES_128_GCM_SHA256:
+ return "TLS_RSA_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_RSA_WITH_AES_256_GCM_SHA384:
+ return "TLS_RSA_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256:
+ return "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384:
+ return "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_DH_RSA_WITH_AES_128_GCM_SHA256:
+ return "TLS_DH_RSA_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_DH_RSA_WITH_AES_256_GCM_SHA384:
+ return "TLS_DH_RSA_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_DHE_DSS_WITH_AES_128_GCM_SHA256:
+ return "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_DHE_DSS_WITH_AES_256_GCM_SHA384:
+ return "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_DH_DSS_WITH_AES_128_GCM_SHA256:
+ return "TLS_DH_DSS_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_DH_DSS_WITH_AES_256_GCM_SHA384:
+ return "TLS_DH_DSS_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_DH_anon_WITH_AES_128_GCM_SHA256:
+ return "TLS_DH_anon_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_DH_anon_WITH_AES_256_GCM_SHA384:
+ return "TLS_DH_anon_WITH_AES_256_GCM_SHA384";
+ break;
+ /* TLS 1.2 with elliptic curve ciphers (RFC 5289) */
+ case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:
+ return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384:
+ return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384";
+ break;
+ case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256:
+ return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384:
+ return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384";
+ break;
+ case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256:
+ return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384:
+ return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384";
+ break;
+ case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256:
+ return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384:
+ return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384";
+ break;
+ case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:
+ return "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:
+ return "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256:
+ return "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384:
+ return "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:
+ return "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:
+ return "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256:
+ return "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384:
+ return "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_EMPTY_RENEGOTIATION_INFO_SCSV:
+ return "TLS_EMPTY_RENEGOTIATION_INFO_SCSV";
+ break;
+#else
+ case SSL_RSA_WITH_NULL_MD5:
+ return "TLS_RSA_WITH_NULL_MD5";
+ break;
+ case SSL_RSA_WITH_NULL_SHA:
+ return "TLS_RSA_WITH_NULL_SHA";
+ break;
+ case SSL_RSA_WITH_RC4_128_MD5:
+ return "TLS_RSA_WITH_RC4_128_MD5";
+ break;
+ case SSL_RSA_WITH_RC4_128_SHA:
+ return "TLS_RSA_WITH_RC4_128_SHA";
+ break;
+ case SSL_RSA_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_RSA_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case SSL_DH_anon_WITH_RC4_128_MD5:
+ return "TLS_DH_anon_WITH_RC4_128_MD5";
+ break;
+ case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA";
+ break;
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
+ /* TLS PSK (RFC 4279): */
+ case TLS_PSK_WITH_RC4_128_SHA:
+ return "TLS_PSK_WITH_RC4_128_SHA";
+ break;
+ case TLS_PSK_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_PSK_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_PSK_WITH_AES_128_CBC_SHA:
+ return "TLS_PSK_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_PSK_WITH_AES_256_CBC_SHA:
+ return "TLS_PSK_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_DHE_PSK_WITH_RC4_128_SHA:
+ return "TLS_DHE_PSK_WITH_RC4_128_SHA";
+ break;
+ case TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_DHE_PSK_WITH_AES_128_CBC_SHA:
+ return "TLS_DHE_PSK_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_DHE_PSK_WITH_AES_256_CBC_SHA:
+ return "TLS_DHE_PSK_WITH_AES_256_CBC_SHA";
+ break;
+ case TLS_RSA_PSK_WITH_RC4_128_SHA:
+ return "TLS_RSA_PSK_WITH_RC4_128_SHA";
+ break;
+ case TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA:
+ return "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA";
+ break;
+ case TLS_RSA_PSK_WITH_AES_128_CBC_SHA:
+ return "TLS_RSA_PSK_WITH_AES_128_CBC_SHA";
+ break;
+ case TLS_RSA_PSK_WITH_AES_256_CBC_SHA:
+ return "TLS_RSA_PSK_WITH_AES_256_CBC_SHA";
+ break;
+ /* More TLS PSK (RFC 4785): */
+ case TLS_PSK_WITH_NULL_SHA:
+ return "TLS_PSK_WITH_NULL_SHA";
+ break;
+ case TLS_DHE_PSK_WITH_NULL_SHA:
+ return "TLS_DHE_PSK_WITH_NULL_SHA";
+ break;
+ case TLS_RSA_PSK_WITH_NULL_SHA:
+ return "TLS_RSA_PSK_WITH_NULL_SHA";
+ break;
+ /* Even more TLS PSK (RFC 5487): */
+ case TLS_PSK_WITH_AES_128_GCM_SHA256:
+ return "TLS_PSK_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_PSK_WITH_AES_256_GCM_SHA384:
+ return "TLS_PSK_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_DHE_PSK_WITH_AES_128_GCM_SHA256:
+ return "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_DHE_PSK_WITH_AES_256_GCM_SHA384:
+ return "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_RSA_PSK_WITH_AES_128_GCM_SHA256:
+ return "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256";
+ break;
+ case TLS_RSA_PSK_WITH_AES_256_GCM_SHA384:
+ return "TLS_PSK_WITH_AES_256_GCM_SHA384";
+ break;
+ case TLS_PSK_WITH_AES_128_CBC_SHA256:
+ return "TLS_PSK_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_PSK_WITH_AES_256_CBC_SHA384:
+ return "TLS_PSK_WITH_AES_256_CBC_SHA384";
+ break;
+ case TLS_PSK_WITH_NULL_SHA256:
+ return "TLS_PSK_WITH_NULL_SHA256";
+ break;
+ case TLS_PSK_WITH_NULL_SHA384:
+ return "TLS_PSK_WITH_NULL_SHA384";
+ break;
+ case TLS_DHE_PSK_WITH_AES_128_CBC_SHA256:
+ return "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_DHE_PSK_WITH_AES_256_CBC_SHA384:
+ return "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384";
+ break;
+ case TLS_DHE_PSK_WITH_NULL_SHA256:
+ return "TLS_DHE_PSK_WITH_NULL_SHA256";
+ break;
+ case TLS_DHE_PSK_WITH_NULL_SHA384:
+ return "TLS_RSA_PSK_WITH_NULL_SHA384";
+ break;
+ case TLS_RSA_PSK_WITH_AES_128_CBC_SHA256:
+ return "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256";
+ break;
+ case TLS_RSA_PSK_WITH_AES_256_CBC_SHA384:
+ return "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384";
+ break;
+ case TLS_RSA_PSK_WITH_NULL_SHA256:
+ return "TLS_RSA_PSK_WITH_NULL_SHA256";
+ break;
+ case TLS_RSA_PSK_WITH_NULL_SHA384:
+ return "TLS_RSA_PSK_WITH_NULL_SHA384";
+ break;
+#endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */
+ }
+ return "TLS_NULL_WITH_NULL_NULL";
+}
+
+#if CURL_BUILD_MAC
+CF_INLINE void GetDarwinVersionNumber(int *major, int *minor)
+{
+ int mib[2];
+ 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;
+ mib[1] = KERN_OSRELEASE;
+ if(sysctl(mib, 2, NULL, &os_version_len, NULL, 0) == -1)
+ return;
+ os_version = malloc(os_version_len*sizeof(char));
+ if(!os_version)
+ return;
+ if(sysctl(mib, 2, os_version, &os_version_len, NULL, 0) == -1) {
+ free(os_version);
+ return;
+ }
+
+ /* 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);*/
+ *major = atoi(os_version_major);
+ *minor = atoi(os_version_minor);
+ free(os_version);
+}
+#endif /* CURL_BUILD_MAC */
+
+/* Apple provides a myriad of ways of getting information about a certificate
+ into a string. Some aren't available under iOS or newer cats. So here's
+ a unified function for getting a string describing the certificate that
+ ought to work in all cats starting with Leopard. */
+CF_INLINE CFStringRef CopyCertSubject(SecCertificateRef cert)
+{
+ CFStringRef server_cert_summary = CFSTR("(null)");
+
+#if CURL_BUILD_IOS
+ /* iOS: There's only one way to do this. */
+ server_cert_summary = SecCertificateCopySubjectSummary(cert);
+#else
+#if CURL_BUILD_MAC_10_7
+ /* Lion & later: Get the long description if we can. */
+ if(SecCertificateCopyLongDescription != NULL)
+ server_cert_summary =
+ SecCertificateCopyLongDescription(NULL, cert, NULL);
+ else
+#endif /* CURL_BUILD_MAC_10_7 */
+#if CURL_BUILD_MAC_10_6
+ /* Snow Leopard: Get the certificate summary. */
+ if(SecCertificateCopySubjectSummary != NULL)
+ server_cert_summary = SecCertificateCopySubjectSummary(cert);
+ else
+#endif /* CURL_BUILD_MAC_10_6 */
+ /* Leopard is as far back as we go... */
+ (void)SecCertificateCopyCommonName(cert, &server_cert_summary);
+#endif /* CURL_BUILD_IOS */
+ return server_cert_summary;
+}
+
+#if CURL_SUPPORT_MAC_10_6
+/* The SecKeychainSearch API was deprecated in Lion, and using it will raise
+ deprecation warnings, so let's not compile this unless it's necessary: */
+static OSStatus CopyIdentityWithLabelOldSchool(char *label,
+ SecIdentityRef *out_c_a_k)
+{
+ OSStatus status = errSecItemNotFound;
+ SecKeychainAttributeList attr_list;
+ SecKeychainAttribute attr;
+ SecKeychainSearchRef search = NULL;
+ SecCertificateRef cert = NULL;
+
+ /* Set up the attribute list: */
+ attr_list.count = 1L;
+ attr_list.attr = &attr;
+
+ /* Set up our lone search criterion: */
+ attr.tag = kSecLabelItemAttr;
+ attr.data = label;
+ attr.length = (UInt32)strlen(label);
+
+ /* Start searching: */
+ status = SecKeychainSearchCreateFromAttributes(NULL,
+ kSecCertificateItemClass,
+ &attr_list,
+ &search);
+ if(status == noErr) {
+ status = SecKeychainSearchCopyNext(search,
+ (SecKeychainItemRef *)&cert);
+ if(status == noErr && cert) {
+ /* If we found a certificate, does it have a private key? */
+ status = SecIdentityCreateWithCertificate(NULL, cert, out_c_a_k);
+ CFRelease(cert);
+ }
+ }
+
+ if(search)
+ CFRelease(search);
+ return status;
+}
+#endif /* CURL_SUPPORT_MAC_10_6 */
+
+static OSStatus CopyIdentityWithLabel(char *label,
+ SecIdentityRef *out_cert_and_key)
+{
+ OSStatus status = errSecItemNotFound;
+
+#if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS
+ /* SecItemCopyMatching() was introduced in iOS and Snow Leopard.
+ kSecClassIdentity was introduced in Lion. If both exist, let's use them
+ to find the certificate. */
+ if(SecItemCopyMatching != NULL && kSecClassIdentity != NULL) {
+ CFTypeRef keys[4];
+ CFTypeRef values[4];
+ CFDictionaryRef query_dict;
+ CFStringRef label_cf = CFStringCreateWithCString(NULL, label,
+ kCFStringEncodingUTF8);
+
+ /* Set up our search criteria and expected results: */
+ values[0] = kSecClassIdentity; /* we want a certificate and a key */
+ keys[0] = kSecClass;
+ values[1] = kCFBooleanTrue; /* we want a reference */
+ keys[1] = kSecReturnRef;
+ values[2] = kSecMatchLimitOne; /* one is enough, thanks */
+ keys[2] = kSecMatchLimit;
+ /* identity searches need a SecPolicyRef in order to work */
+ values[3] = SecPolicyCreateSSL(false, label_cf);
+ keys[3] = kSecMatchPolicy;
+ query_dict = CFDictionaryCreate(NULL, (const void **)keys,
+ (const void **)values, 4L,
+ &kCFCopyStringDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ CFRelease(values[3]);
+ CFRelease(label_cf);
+
+ /* Do we have a match? */
+ status = SecItemCopyMatching(query_dict, (CFTypeRef *)out_cert_and_key);
+ CFRelease(query_dict);
+ }
+ else {
+#if CURL_SUPPORT_MAC_10_6
+ /* On Leopard and Snow Leopard, fall back to SecKeychainSearch. */
+ status = CopyIdentityWithLabelOldSchool(label, out_cert_and_key);
+#endif /* CURL_SUPPORT_MAC_10_7 */
+ }
+#elif CURL_SUPPORT_MAC_10_6
+ /* For developers building on older cats, we have no choice but to fall back
+ to SecKeychainSearch. */
+ status = CopyIdentityWithLabelOldSchool(label, out_cert_and_key);
+#endif /* CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS */
+ return status;
+}
+
+static OSStatus CopyIdentityFromPKCS12File(const char *cPath,
+ const char *cPassword,
+ SecIdentityRef *out_cert_and_key)
+{
+ OSStatus status = errSecItemNotFound;
+ CFURLRef pkcs_url = CFURLCreateFromFileSystemRepresentation(NULL,
+ (const UInt8 *)cPath, strlen(cPath), false);
+ CFStringRef password = cPassword ? CFStringCreateWithCString(NULL,
+ cPassword, kCFStringEncodingUTF8) : NULL;
+ CFDataRef pkcs_data = NULL;
+
+ /* We can import P12 files on iOS or OS X 10.7 or later: */
+ /* These constants are documented as having first appeared in 10.6 but they
+ raise linker errors when used on that cat for some reason. */
+#if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS
+ if(CFURLCreateDataAndPropertiesFromResource(NULL, pkcs_url, &pkcs_data,
+ NULL, NULL, &status)) {
+ const void *cKeys[] = {kSecImportExportPassphrase};
+ const void *cValues[] = {password};
+ CFDictionaryRef options = CFDictionaryCreate(NULL, cKeys, cValues,
+ password ? 1L : 0L, NULL, NULL);
+ CFArrayRef items = NULL;
+
+ /* Here we go: */
+ status = SecPKCS12Import(pkcs_data, options, &items);
+ if(status == noErr && items && CFArrayGetCount(items)) {
+ CFDictionaryRef identity_and_trust = CFArrayGetValueAtIndex(items, 0L);
+ const void *temp_identity = CFDictionaryGetValue(identity_and_trust,
+ kSecImportItemIdentity);
+
+ /* Retain the identity; we don't care about any other data... */
+ CFRetain(temp_identity);
+ *out_cert_and_key = (SecIdentityRef)temp_identity;
+ }
+
+ if(items)
+ CFRelease(items);
+ CFRelease(options);
+ CFRelease(pkcs_data);
+ }
+#endif /* CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS */
+ if(password)
+ CFRelease(password);
+ CFRelease(pkcs_url);
+ return status;
+}
+
+/* This code was borrowed from nss.c, with some modifications:
+ * Determine whether the nickname passed in is a filename that needs to
+ * be loaded as a PEM or a regular NSS nickname.
+ *
+ * returns 1 for a file
+ * returns 0 for not a file
+ */
+CF_INLINE bool is_file(const char *filename)
+{
+ struct_stat st;
+
+ if(filename == NULL)
+ return false;
+
+ if(stat(filename, &st) == 0)
+ return S_ISREG(st.st_mode);
+ return false;
+}
+
+static CURLcode darwinssl_connect_step1(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];
+#ifdef ENABLE_IPV6
+ struct in6_addr addr;
+#else
+ struct in_addr addr;
+#endif /* ENABLE_IPV6 */
+ size_t all_ciphers_count = 0UL, allowed_ciphers_count = 0UL, i;
+ SSLCipherSuite *all_ciphers = NULL, *allowed_ciphers = NULL;
+ char *ssl_sessionid;
+ size_t ssl_sessionid_len;
+ OSStatus err = noErr;
+#if CURL_BUILD_MAC
+ int darwinver_maj = 0, darwinver_min = 0;
+
+ GetDarwinVersionNumber(&darwinver_maj, &darwinver_min);
+#endif /* CURL_BUILD_MAC */
+
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+ if(SSLCreateContext != NULL) { /* use the newer API if avaialble */
+ if(connssl->ssl_ctx)
+ CFRelease(connssl->ssl_ctx);
+ connssl->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType);
+ if(!connssl->ssl_ctx) {
+ failf(data, "SSL: couldn't create a context!");
+ return CURLE_OUT_OF_MEMORY;
+ }
+ }
+ else {
+ /* The old ST API does not exist under iOS, so don't compile it: */
+#if CURL_SUPPORT_MAC_10_8
+ if(connssl->ssl_ctx)
+ (void)SSLDisposeContext(connssl->ssl_ctx);
+ err = SSLNewContext(false, &(connssl->ssl_ctx));
+ if(err != noErr) {
+ failf(data, "SSL: couldn't create a context: OSStatus %d", err);
+ return CURLE_OUT_OF_MEMORY;
+ }
+#endif /* CURL_SUPPORT_MAC_10_8 */
+ }
+#else
+ if(connssl->ssl_ctx)
+ (void)SSLDisposeContext(connssl->ssl_ctx);
+ err = SSLNewContext(false, &(connssl->ssl_ctx));
+ if(err != noErr) {
+ failf(data, "SSL: couldn't create a context: OSStatus %d", err);
+ return CURLE_OUT_OF_MEMORY;
+ }
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+ connssl->ssl_write_buffered_length = 0UL; /* reset buffered write length */
+
+ /* check to see if we've been told to use an explicit SSL/TLS version */
+#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_TLSv1:
+ (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol1);
+ (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12);
+ break;
+ case CURL_SSLVERSION_TLSv1_0:
+ (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol1);
+ (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol1);
+ break;
+ case CURL_SSLVERSION_TLSv1_1:
+ (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol11);
+ (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol11);
+ break;
+ case CURL_SSLVERSION_TLSv1_2:
+ (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol12);
+ (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12);
+ break;
+ case CURL_SSLVERSION_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)SSLSetProtocolVersionMax(connssl->ssl_ctx, kSSLProtocol3);
+ break;
+ case CURL_SSLVERSION_SSLv2:
+ err = SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol2);
+ if(err != noErr) {
+ failf(data, "Your version of the OS does not support SSLv2");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kSSLProtocol2);
+ }
+ }
+ else {
+#if CURL_SUPPORT_MAC_10_8
+ (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+ kSSLProtocolAll,
+ false);
+ switch (data->set.ssl.version) {
+ default:
+ case CURL_SSLVERSION_DEFAULT:
+ case CURL_SSLVERSION_TLSv1:
+ (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_0:
+ (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+ kTLSProtocol1,
+ true);
+ break;
+ case CURL_SSLVERSION_TLSv1_1:
+ (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+ kTLSProtocol11,
+ true);
+ break;
+ case CURL_SSLVERSION_TLSv1_2:
+ (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+ kTLSProtocol12,
+ true);
+ break;
+ case CURL_SSLVERSION_SSLv3:
+ err = 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,
+ kSSLProtocol2,
+ true);
+ if(err != noErr) {
+ failf(data, "Your version of the OS does not support SSLv2");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ break;
+ }
+#endif /* CURL_SUPPORT_MAC_10_8 */
+ }
+#else
+ (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, kSSLProtocolAll, false);
+ switch(data->set.ssl.version) {
+ default:
+ case CURL_SSLVERSION_DEFAULT:
+ case CURL_SSLVERSION_TLSv1:
+ case CURL_SSLVERSION_TLSv1_0:
+ (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+ kTLSProtocol1,
+ true);
+ break;
+ case CURL_SSLVERSION_TLSv1_1:
+ failf(data, "Your version of the OS does not support TLSv1.1");
+ return CURLE_SSL_CONNECT_ERROR;
+ case CURL_SSLVERSION_TLSv1_2:
+ failf(data, "Your version of the OS does not support TLSv1.2");
+ return CURLE_SSL_CONNECT_ERROR;
+ case CURL_SSLVERSION_SSLv2:
+ err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+ kSSLProtocol2,
+ true);
+ if(err != noErr) {
+ failf(data, "Your version of the OS does not support SSLv2");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ break;
+ case CURL_SSLVERSION_SSLv3:
+ err = 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 */
+
+ if(data->set.str[STRING_KEY]) {
+ infof(data, "WARNING: SSL: CURLOPT_SSLKEY is ignored by Secure "
+ "Transport. The private key must be in the Keychain.\n");
+ }
+
+ if(data->set.str[STRING_CERT]) {
+ SecIdentityRef cert_and_key = NULL;
+ bool is_cert_file = is_file(data->set.str[STRING_CERT]);
+
+ /* User wants to authenticate with a client cert. Look for it:
+ If we detect that this is a file on disk, then let's load it.
+ Otherwise, assume that the user wants to use an identity loaded
+ from the Keychain. */
+ if(is_cert_file) {
+ if(!data->set.str[STRING_CERT_TYPE])
+ infof(data, "WARNING: SSL: Certificate type not set, assuming "
+ "PKCS#12 format.\n");
+ else if(strncmp(data->set.str[STRING_CERT_TYPE], "P12",
+ strlen(data->set.str[STRING_CERT_TYPE])) != 0)
+ infof(data, "WARNING: SSL: The Security framework only supports "
+ "loading identities that are in PKCS#12 format.\n");
+
+ err = CopyIdentityFromPKCS12File(data->set.str[STRING_CERT],
+ data->set.str[STRING_KEY_PASSWD], &cert_and_key);
+ }
+ else
+ err = CopyIdentityWithLabel(data->set.str[STRING_CERT], &cert_and_key);
+
+ if(err == noErr) {
+ SecCertificateRef cert = NULL;
+ CFTypeRef certs_c[1];
+ CFArrayRef certs;
+
+ /* If we found one, print it out: */
+ err = SecIdentityCopyCertificate(cert_and_key, &cert);
+ if(err == noErr) {
+ CFStringRef cert_summary = CopyCertSubject(cert);
+ char cert_summary_c[128];
+
+ if(cert_summary) {
+ memset(cert_summary_c, 0, 128);
+ if(CFStringGetCString(cert_summary,
+ cert_summary_c,
+ 128,
+ kCFStringEncodingUTF8)) {
+ infof(data, "Client certificate: %s\n", cert_summary_c);
+ }
+ CFRelease(cert_summary);
+ CFRelease(cert);
+ }
+ }
+ certs_c[0] = cert_and_key;
+ certs = CFArrayCreate(NULL, (const void **)certs_c, 1L,
+ &kCFTypeArrayCallBacks);
+ err = SSLSetCertificate(connssl->ssl_ctx, certs);
+ if(certs)
+ CFRelease(certs);
+ if(err != noErr) {
+ failf(data, "SSL: SSLSetCertificate() failed: OSStatus %d", err);
+ return CURLE_SSL_CERTPROBLEM;
+ }
+ CFRelease(cert_and_key);
+ }
+ else {
+ switch(err) {
+ case errSecAuthFailed: case -25264: /* errSecPkcs12VerifyFailure */
+ failf(data, "SSL: Incorrect password for the certificate \"%s\" "
+ "and its private key.", data->set.str[STRING_CERT]);
+ break;
+ case -26275: /* errSecDecode */ case -25257: /* errSecUnknownFormat */
+ failf(data, "SSL: Couldn't make sense of the data in the "
+ "certificate \"%s\" and its private key.",
+ data->set.str[STRING_CERT]);
+ break;
+ case -25260: /* errSecPassphraseRequired */
+ failf(data, "SSL The certificate \"%s\" requires a password.",
+ data->set.str[STRING_CERT]);
+ break;
+ case errSecItemNotFound:
+ failf(data, "SSL: Can't find the certificate \"%s\" and its private "
+ "key in the Keychain.", data->set.str[STRING_CERT]);
+ break;
+ default:
+ failf(data, "SSL: Can't load the certificate \"%s\" and its private "
+ "key: OSStatus %d", data->set.str[STRING_CERT], err);
+ break;
+ }
+ return CURLE_SSL_CERTPROBLEM;
+ }
+ }
+
+ /* SSL always tries to verify the peer, this only says whether it should
+ * fail to connect if the verification fails, or if it should continue
+ * anyway. In the latter case the result of the verification is checked with
+ * SSL_get_verify_result() below. */
+#if CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS
+ /* Snow Leopard introduced the SSLSetSessionOption() function, but due to
+ a library bug with the way the kSSLSessionOptionBreakOnServerAuth flag
+ works, it doesn't work as expected under Snow Leopard or Lion.
+ So we need to call SSLSetEnableCertVerify() on those older cats in order
+ to disable certificate validation if the user turned that off.
+ (SecureTransport will always validate the certificate chain by
+ default.) */
+ /* (Note: Darwin 12.x.x is Mountain Lion.) */
+#if CURL_BUILD_MAC
+ if(SSLSetSessionOption != NULL && darwinver_maj >= 12) {
+#else
+ if(SSLSetSessionOption != NULL) {
+#endif /* CURL_BUILD_MAC */
+ bool break_on_auth = !data->set.ssl.verifypeer ||
+ data->set.str[STRING_SSL_CAFILE];
+ err = SSLSetSessionOption(connssl->ssl_ctx,
+ kSSLSessionOptionBreakOnServerAuth,
+ break_on_auth);
+ if(err != noErr) {
+ failf(data, "SSL: SSLSetSessionOption() failed: OSStatus %d", err);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+ else {
+#if CURL_SUPPORT_MAC_10_8
+ err = SSLSetEnableCertVerify(connssl->ssl_ctx,
+ data->set.ssl.verifypeer?true:false);
+ if(err != noErr) {
+ failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+#endif /* CURL_SUPPORT_MAC_10_8 */
+ }
+#else
+ err = SSLSetEnableCertVerify(connssl->ssl_ctx,
+ data->set.ssl.verifypeer?true:false);
+ if(err != noErr) {
+ failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+#endif /* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */
+
+ if(data->set.str[STRING_SSL_CAFILE]) {
+ bool is_cert_file = is_file(data->set.str[STRING_SSL_CAFILE]);
+
+ if(!is_cert_file) {
+ failf(data, "SSL: can't load CA certificate file %s",
+ data->set.str[STRING_SSL_CAFILE]);
+ return CURLE_SSL_CACERT_BADFILE;
+ }
+ if(!data->set.ssl.verifypeer) {
+ failf(data, "SSL: CA certificate set, but certificate verification "
+ "is disabled");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+
+ /* Configure hostname check. SNI is used if available.
+ * Both hostname check and SNI require SSLSetPeerDomainName().
+ * Also: the verifyhost setting influences SNI usage */
+ if(data->set.ssl.verifyhost) {
+ err = SSLSetPeerDomainName(connssl->ssl_ctx, conn->host.name,
+ strlen(conn->host.name));
+
+ if(err != noErr) {
+ infof(data, "WARNING: SSL: SSLSetPeerDomainName() failed: OSStatus %d\n",
+ err);
+ }
+
+ if((Curl_inet_pton(AF_INET, conn->host.name, &addr))
+ #ifdef ENABLE_IPV6
+ || (Curl_inet_pton(AF_INET6, conn->host.name, &addr))
+ #endif
+ ) {
+ infof(data, "WARNING: using IP address, SNI is being disabled by "
+ "the OS.\n");
+ }
+ }
+
+ /* Disable cipher suites that ST supports but are not safe. These ciphers
+ are unlikely to be used in any case since ST gives other ciphers a much
+ higher priority, but it's probably better that we not connect at all than
+ to give the user a false sense of security if the server only supports
+ insecure ciphers. (Note: We don't care about SSLv2-only ciphers.) */
+ (void)SSLGetNumberSupportedCiphers(connssl->ssl_ctx, &all_ciphers_count);
+ all_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite));
+ allowed_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite));
+ if(all_ciphers && allowed_ciphers &&
+ SSLGetSupportedCiphers(connssl->ssl_ctx, all_ciphers,
+ &all_ciphers_count) == noErr) {
+ for(i = 0UL ; i < all_ciphers_count ; i++) {
+#if CURL_BUILD_MAC
+ /* There's a known bug in early versions of Mountain Lion where ST's ECC
+ ciphers (cipher suite 0xC001 through 0xC032) simply do not work.
+ Work around the problem here by disabling those ciphers if we are
+ running in an affected version of OS X. */
+ if(darwinver_maj == 12 && darwinver_min <= 3 &&
+ all_ciphers[i] >= 0xC001 && all_ciphers[i] <= 0xC032) {
+ continue;
+ }
+#endif /* CURL_BUILD_MAC */
+ switch(all_ciphers[i]) {
+ /* Disable NULL ciphersuites: */
+ case SSL_NULL_WITH_NULL_NULL:
+ case SSL_RSA_WITH_NULL_MD5:
+ case SSL_RSA_WITH_NULL_SHA:
+ case 0x003B: /* TLS_RSA_WITH_NULL_SHA256 */
+ case SSL_FORTEZZA_DMS_WITH_NULL_SHA:
+ case 0xC001: /* TLS_ECDH_ECDSA_WITH_NULL_SHA */
+ case 0xC006: /* TLS_ECDHE_ECDSA_WITH_NULL_SHA */
+ case 0xC00B: /* TLS_ECDH_RSA_WITH_NULL_SHA */
+ case 0xC010: /* TLS_ECDHE_RSA_WITH_NULL_SHA */
+ case 0x002C: /* TLS_PSK_WITH_NULL_SHA */
+ case 0x002D: /* TLS_DHE_PSK_WITH_NULL_SHA */
+ case 0x002E: /* TLS_RSA_PSK_WITH_NULL_SHA */
+ case 0x00B0: /* TLS_PSK_WITH_NULL_SHA256 */
+ case 0x00B1: /* TLS_PSK_WITH_NULL_SHA384 */
+ case 0x00B4: /* TLS_DHE_PSK_WITH_NULL_SHA256 */
+ case 0x00B5: /* TLS_DHE_PSK_WITH_NULL_SHA384 */
+ case 0x00B8: /* TLS_RSA_PSK_WITH_NULL_SHA256 */
+ case 0x00B9: /* TLS_RSA_PSK_WITH_NULL_SHA384 */
+ /* Disable anonymous ciphersuites: */
+ case SSL_DH_anon_EXPORT_WITH_RC4_40_MD5:
+ case SSL_DH_anon_WITH_RC4_128_MD5:
+ case SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA:
+ case SSL_DH_anon_WITH_DES_CBC_SHA:
+ case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA:
+ case TLS_DH_anon_WITH_AES_128_CBC_SHA:
+ case TLS_DH_anon_WITH_AES_256_CBC_SHA:
+ case 0xC015: /* TLS_ECDH_anon_WITH_NULL_SHA */
+ case 0xC016: /* TLS_ECDH_anon_WITH_RC4_128_SHA */
+ case 0xC017: /* TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA */
+ case 0xC018: /* TLS_ECDH_anon_WITH_AES_128_CBC_SHA */
+ case 0xC019: /* TLS_ECDH_anon_WITH_AES_256_CBC_SHA */
+ case 0x006C: /* TLS_DH_anon_WITH_AES_128_CBC_SHA256 */
+ case 0x006D: /* TLS_DH_anon_WITH_AES_256_CBC_SHA256 */
+ case 0x00A6: /* TLS_DH_anon_WITH_AES_128_GCM_SHA256 */
+ case 0x00A7: /* TLS_DH_anon_WITH_AES_256_GCM_SHA384 */
+ /* Disable weak key ciphersuites: */
+ case SSL_RSA_EXPORT_WITH_RC4_40_MD5:
+ case SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5:
+ case SSL_RSA_EXPORT_WITH_DES40_CBC_SHA:
+ case SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA:
+ case SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA:
+ case SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA:
+ case SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA:
+ case SSL_RSA_WITH_DES_CBC_SHA:
+ case SSL_DH_DSS_WITH_DES_CBC_SHA:
+ case SSL_DH_RSA_WITH_DES_CBC_SHA:
+ case SSL_DHE_DSS_WITH_DES_CBC_SHA:
+ case SSL_DHE_RSA_WITH_DES_CBC_SHA:
+ /* Disable IDEA: */
+ case SSL_RSA_WITH_IDEA_CBC_SHA:
+ case SSL_RSA_WITH_IDEA_CBC_MD5:
+ break;
+ default: /* enable everything else */
+ allowed_ciphers[allowed_ciphers_count++] = all_ciphers[i];
+ break;
+ }
+ }
+ err = SSLSetEnabledCiphers(connssl->ssl_ctx, allowed_ciphers,
+ allowed_ciphers_count);
+ if(err != noErr) {
+ failf(data, "SSL: SSLSetEnabledCiphers() failed: OSStatus %d", err);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+ else {
+ Curl_safefree(all_ciphers);
+ Curl_safefree(allowed_ciphers);
+ failf(data, "SSL: Failed to allocate memory for allowed ciphers");
+ return CURLE_OUT_OF_MEMORY;
+ }
+ Curl_safefree(all_ciphers);
+ Curl_safefree(allowed_ciphers);
+
+#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
+ /* We want to enable 1/n-1 when using a CBC cipher unless the user
+ specifically doesn't want us doing that: */
+ if(SSLSetSessionOption != NULL) {
+ SSLSetSessionOption(connssl->ssl_ctx, kSSLSessionOptionSendOneByteRecord,
+ !data->set.ssl_enable_beast);
+ SSLSetSessionOption(connssl->ssl_ctx, kSSLSessionOptionFalseStart,
+ data->set.ssl.falsestart); /* false start support */
+ }
+#endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */
+
+ /* Check if there's a cached ID we can/should use here! */
+ if(!Curl_ssl_getsessionid(conn, (void **)&ssl_sessionid,
+ &ssl_sessionid_len)) {
+ /* we got a session id, use it! */
+ 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;
+ }
+ /* Informational message */
+ infof(data, "SSL re-using session ID\n");
+ }
+ /* 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);
+
+ 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) {
+ failf(data, "failed to store ssl session");
+ return result;
+ }
+ }
+
+ err = SSLSetIOFuncs(connssl->ssl_ctx, SocketRead, SocketWrite);
+ if(err != noErr) {
+ failf(data, "SSL: SSLSetIOFuncs() failed: OSStatus %d", err);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ /* pass the raw socket into the SSL layers */
+ /* We need to store the FD in a constant memory address, because
+ * SSLSetConnection() will not copy that address. I've found that
+ * conn->sock[sockindex] may change on its own. */
+ connssl->ssl_sockfd = sockfd;
+ err = SSLSetConnection(connssl->ssl_ctx, connssl);
+ if(err != noErr) {
+ failf(data, "SSL: SSLSetConnection() failed: %d", err);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ connssl->connecting_state = ssl_connect_2;
+ return CURLE_OK;
+}
+
+static long pem_to_der(const char *in, unsigned char **out, size_t *outlen)
+{
+ char *sep_start, *sep_end, *cert_start, *cert_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)
+ return -1;
+
+ cert_start += 5;
+
+ /* Find separator after the end of the certificate. */
+ cert_end = strstr(cert_start, "-----");
+ if(cert_end == NULL)
+ return -1;
+
+ sep_end = strstr(cert_end + 1, "-----");
+ if(sep_end == NULL)
+ return -1;
+ sep_end += 5;
+
+ len = cert_end - cert_start;
+ b64 = malloc(len + 1);
+ if(!b64)
+ 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];
+ }
+ b64[j] = '\0';
+
+ err = Curl_base64_decode((const char *)b64, out, outlen);
+ free(b64);
+ if(err) {
+ free(*out);
+ return -1;
+ }
+
+ return sep_end - in;
+}
+
+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;
+
+ fd = open(file, 0);
+ if(fd < 0)
+ return -1;
+
+ data = malloc(cap);
+ if(!data) {
+ close(fd);
+ return -1;
+ }
+
+ for(;;) {
+ n = read(fd, buf, sizeof(buf));
+ if(n < 0) {
+ close(fd);
+ free(data);
+ return -1;
+ }
+ else if(n == 0) {
+ close(fd);
+ break;
+ }
+
+ if(len + n >= cap) {
+ cap *= 2;
+ data = realloc(data, cap);
+ if(!data) {
+ close(fd);
+ return -1;
+ }
+ }
+
+ memcpy(data + len, buf, n);
+ len += n;
+ }
+ data[len] = '\0';
+
+ *out = data;
+ *outlen = len;
+
+ return 0;
+}
+
+static int sslerr_to_curlerr(struct SessionHandle *data, int err)
+{
+ switch(err) {
+ case errSSLXCertChainInvalid:
+ failf(data, "SSL certificate problem: Invalid certificate chain");
+ return CURLE_SSL_CACERT;
+ case errSSLUnknownRootCert:
+ failf(data, "SSL certificate problem: Untrusted root certificate");
+ return CURLE_SSL_CACERT;
+ case errSSLNoRootCert:
+ failf(data, "SSL certificate problem: No root certificate");
+ return CURLE_SSL_CACERT;
+ case errSSLCertExpired:
+ failf(data, "SSL certificate problem: Certificate chain had an "
+ "expired certificate");
+ return CURLE_SSL_CACERT;
+ case errSSLBadCert:
+ failf(data, "SSL certificate problem: Couldn't understand the server "
+ "certificate format");
+ return CURLE_SSL_CONNECT_ERROR;
+ case errSSLHostNameMismatch:
+ failf(data, "SSL certificate peer hostname mismatch");
+ return CURLE_PEER_FAILED_VERIFICATION;
+ default:
+ failf(data, "SSL unexpected certificate error %d", err);
+ return CURLE_SSL_CACERT;
+ }
+}
+
+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;
+
+ 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");
+ 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;
+ }
+ }
+
+ 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);
+ }
+
+ 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);
+ CFRelease(array);
+ CFRelease(trust);
+ if(ret != noErr) {
+ return sslerr_to_curlerr(data, ret);
+ }
+
+ switch (trust_eval) {
+ case kSecTrustResultUnspecified:
+ case kSecTrustResultProceed:
+ return CURLE_OK;
+
+ case kSecTrustResultRecoverableTrustFailure:
+ case kSecTrustResultDeny:
+ default:
+ failf(data, "SSL: certificate verification failed (result: %d)",
+ trust_eval);
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+}
+
+static CURLcode
+darwinssl_connect_step2(struct connectdata *conn, int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ OSStatus err;
+ SSLCipherSuite cipher;
+ SSLProtocol protocol = 0;
+
+ DEBUGASSERT(ssl_connect_2 == connssl->connecting_state
+ || ssl_connect_2_reading == connssl->connecting_state
+ || ssl_connect_2_writing == connssl->connecting_state);
+
+ /* Here goes nothing: */
+ err = SSLHandshake(connssl->ssl_ctx);
+
+ if(err != noErr) {
+ switch (err) {
+ case errSSLWouldBlock: /* they're not done with us yet */
+ connssl->connecting_state = connssl->ssl_direction ?
+ ssl_connect_2_writing : ssl_connect_2_reading;
+ return CURLE_OK;
+
+ /* The below is errSSLServerAuthCompleted; it's not defined in
+ Leopard's headers */
+ case -9841:
+ if(data->set.str[STRING_SSL_CAFILE]) {
+ int res = verify_cert(data->set.str[STRING_SSL_CAFILE], data,
+ connssl->ssl_ctx);
+ if(res != CURLE_OK)
+ return res;
+ }
+ /* the documentation says we need to call SSLHandshake() again */
+ return darwinssl_connect_step2(conn, sockindex);
+
+ /* These are all certificate problems with the server: */
+ case errSSLXCertChainInvalid:
+ failf(data, "SSL certificate problem: Invalid certificate chain");
+ return CURLE_SSL_CACERT;
+ case errSSLUnknownRootCert:
+ failf(data, "SSL certificate problem: Untrusted root certificate");
+ return CURLE_SSL_CACERT;
+ case errSSLNoRootCert:
+ failf(data, "SSL certificate problem: No root certificate");
+ return CURLE_SSL_CACERT;
+ case errSSLCertExpired:
+ failf(data, "SSL certificate problem: Certificate chain had an "
+ "expired certificate");
+ return CURLE_SSL_CACERT;
+ case errSSLBadCert:
+ failf(data, "SSL certificate problem: Couldn't understand the server "
+ "certificate format");
+ return CURLE_SSL_CONNECT_ERROR;
+
+ /* These are all certificate problems with the client: */
+ case errSecAuthFailed:
+ failf(data, "SSL authentication failed");
+ return CURLE_SSL_CONNECT_ERROR;
+ case errSSLPeerHandshakeFail:
+ failf(data, "SSL peer handshake failed, the server most likely "
+ "requires a client certificate to connect");
+ return CURLE_SSL_CONNECT_ERROR;
+ case errSSLPeerUnknownCA:
+ failf(data, "SSL server rejected the client certificate due to "
+ "the certificate being signed by an unknown certificate "
+ "authority");
+ return CURLE_SSL_CONNECT_ERROR;
+
+ /* This error is raised if the server's cert didn't match the server's
+ host name: */
+ case errSSLHostNameMismatch:
+ failf(data, "SSL certificate peer verification failed, the "
+ "certificate did not match \"%s\"\n", conn->host.dispname);
+ return CURLE_PEER_FAILED_VERIFICATION;
+
+ /* Generic handshake errors: */
+ case errSSLConnectionRefused:
+ failf(data, "Server dropped the connection during the SSL handshake");
+ return CURLE_SSL_CONNECT_ERROR;
+ case errSSLClosedAbort:
+ failf(data, "Server aborted the SSL handshake");
+ return CURLE_SSL_CONNECT_ERROR;
+ case errSSLNegotiation:
+ failf(data, "Could not negotiate an SSL cipher suite with the server");
+ return CURLE_SSL_CONNECT_ERROR;
+ /* Sometimes paramErr happens with buggy ciphers: */
+ case paramErr: case errSSLInternal:
+ failf(data, "Internal SSL engine error encountered during the "
+ "SSL handshake");
+ return CURLE_SSL_CONNECT_ERROR;
+ case errSSLFatalAlert:
+ failf(data, "Fatal SSL engine error encountered during the SSL "
+ "handshake");
+ return CURLE_SSL_CONNECT_ERROR;
+ default:
+ failf(data, "Unknown SSL protocol error in connection to %s:%d",
+ conn->host.name, err);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+ else {
+ /* we have been connected fine, we're not waiting for anything else. */
+ connssl->connecting_state = ssl_connect_3;
+
+ /* Informational message */
+ (void)SSLGetNegotiatedCipher(connssl->ssl_ctx, &cipher);
+ (void)SSLGetNegotiatedProtocolVersion(connssl->ssl_ctx, &protocol);
+ switch (protocol) {
+ case kSSLProtocol2:
+ infof(data, "SSL 2.0 connection using %s\n",
+ SSLCipherNameForNumber(cipher));
+ break;
+ case kSSLProtocol3:
+ infof(data, "SSL 3.0 connection using %s\n",
+ SSLCipherNameForNumber(cipher));
+ break;
+ case kTLSProtocol1:
+ infof(data, "TLS 1.0 connection using %s\n",
+ TLSCipherNameForNumber(cipher));
+ break;
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+ case kTLSProtocol11:
+ infof(data, "TLS 1.1 connection using %s\n",
+ TLSCipherNameForNumber(cipher));
+ break;
+ case kTLSProtocol12:
+ infof(data, "TLS 1.2 connection using %s\n",
+ TLSCipherNameForNumber(cipher));
+ break;
+#endif
+ default:
+ infof(data, "Unknown protocol connection\n");
+ break;
+ }
+
+ return CURLE_OK;
+ }
+}
+
+static CURLcode
+darwinssl_connect_step3(struct connectdata *conn,
+ int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ CFStringRef server_cert_summary;
+ char server_cert_summary_c[128];
+ CFArrayRef server_certs = NULL;
+ SecCertificateRef server_cert;
+ OSStatus err;
+ CFIndex i, count;
+ SecTrustRef trust = NULL;
+
+ /* There is no step 3!
+ * Well, okay, if verbose mode is on, let's print the details of the
+ * server certificates. */
+#if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS
+#if CURL_BUILD_IOS
+#pragma unused(server_certs)
+ err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust);
+ /* For some reason, SSLCopyPeerTrust() can return noErr and yet return
+ a null trust, so be on guard for that: */
+ if(err == noErr && trust) {
+ count = SecTrustGetCertificateCount(trust);
+ for(i = 0L ; i < count ; i++) {
+ server_cert = SecTrustGetCertificateAtIndex(trust, i);
+ server_cert_summary = CopyCertSubject(server_cert);
+ memset(server_cert_summary_c, 0, 128);
+ if(CFStringGetCString(server_cert_summary,
+ server_cert_summary_c,
+ 128,
+ kCFStringEncodingUTF8)) {
+ infof(data, "Server certificate: %s\n", server_cert_summary_c);
+ }
+ CFRelease(server_cert_summary);
+ }
+ CFRelease(trust);
+ }
+#else
+ /* SSLCopyPeerCertificates() is deprecated as of Mountain Lion.
+ The function SecTrustGetCertificateAtIndex() is officially present
+ in Lion, but it is unfortunately also present in Snow Leopard as
+ private API and doesn't work as expected. So we have to look for
+ a different symbol to make sure this code is only executed under
+ Lion or later. */
+ if(SecTrustEvaluateAsync != NULL) {
+#pragma unused(server_certs)
+ err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust);
+ /* For some reason, SSLCopyPeerTrust() can return noErr and yet return
+ a null trust, so be on guard for that: */
+ if(err == noErr && trust) {
+ count = SecTrustGetCertificateCount(trust);
+ for(i = 0L ; i < count ; i++) {
+ server_cert = SecTrustGetCertificateAtIndex(trust, i);
+ server_cert_summary = CopyCertSubject(server_cert);
+ memset(server_cert_summary_c, 0, 128);
+ if(CFStringGetCString(server_cert_summary,
+ server_cert_summary_c,
+ 128,
+ kCFStringEncodingUTF8)) {
+ infof(data, "Server certificate: %s\n", server_cert_summary_c);
+ }
+ CFRelease(server_cert_summary);
+ }
+ CFRelease(trust);
+ }
+ }
+ else {
+#if CURL_SUPPORT_MAC_10_8
+ err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs);
+ /* Just in case SSLCopyPeerCertificates() returns null too... */
+ if(err == noErr && server_certs) {
+ count = CFArrayGetCount(server_certs);
+ for(i = 0L ; i < count ; i++) {
+ server_cert = (SecCertificateRef)CFArrayGetValueAtIndex(server_certs,
+ i);
+
+ server_cert_summary = CopyCertSubject(server_cert);
+ memset(server_cert_summary_c, 0, 128);
+ if(CFStringGetCString(server_cert_summary,
+ server_cert_summary_c,
+ 128,
+ kCFStringEncodingUTF8)) {
+ infof(data, "Server certificate: %s\n", server_cert_summary_c);
+ }
+ CFRelease(server_cert_summary);
+ }
+ CFRelease(server_certs);
+ }
+#endif /* CURL_SUPPORT_MAC_10_8 */
+ }
+#endif /* CURL_BUILD_IOS */
+#else
+#pragma unused(trust)
+ err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs);
+ if(err == noErr) {
+ count = CFArrayGetCount(server_certs);
+ for(i = 0L ; i < count ; i++) {
+ server_cert = (SecCertificateRef)CFArrayGetValueAtIndex(server_certs, i);
+ server_cert_summary = CopyCertSubject(server_cert);
+ memset(server_cert_summary_c, 0, 128);
+ if(CFStringGetCString(server_cert_summary,
+ server_cert_summary_c,
+ 128,
+ kCFStringEncodingUTF8)) {
+ infof(data, "Server certificate: %s\n", server_cert_summary_c);
+ }
+ CFRelease(server_cert_summary);
+ }
+ CFRelease(server_certs);
+ }
+#endif /* CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS */
+
+ connssl->connecting_state = ssl_connect_done;
+ return CURLE_OK;
+}
+
+static Curl_recv darwinssl_recv;
+static Curl_send darwinssl_send;
+
+static CURLcode
+darwinssl_connect_common(struct connectdata *conn,
+ int sockindex,
+ bool nonblocking,
+ bool *done)
+{
+ CURLcode result;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ curl_socket_t sockfd = conn->sock[sockindex];
+ long timeout_ms;
+ int what;
+
+ /* check if the connection has already been established */
+ if(ssl_connection_complete == connssl->state) {
+ *done = TRUE;
+ return CURLE_OK;
+ }
+
+ if(ssl_connect_1==connssl->connecting_state) {
+ /* Find out how much more time we're allowed */
+ 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");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ result = darwinssl_connect_step1(conn, sockindex);
+ if(result)
+ return result;
+ }
+
+ while(ssl_connect_2 == connssl->connecting_state ||
+ ssl_connect_2_reading == connssl->connecting_state ||
+ ssl_connect_2_writing == connssl->connecting_state) {
+
+ /* 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");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ /* 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) {
+
+ curl_socket_t writefd = ssl_connect_2_writing ==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+ curl_socket_t readfd = ssl_connect_2_reading ==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+
+ what = Curl_socket_ready(readfd, writefd, nonblocking?0:timeout_ms);
+ if(what < 0) {
+ /* fatal error */
+ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ else if(0 == what) {
+ if(nonblocking) {
+ *done = FALSE;
+ return CURLE_OK;
+ }
+ else {
+ /* timeout */
+ failf(data, "SSL connection timeout");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+ }
+ /* socket is readable or writable */
+ }
+
+ /* Run transaction, and return to the caller if it failed or if this
+ * connection is done nonblocking and this loop would execute again. This
+ * permits the owner of a multi handle to abort a connection attempt
+ * 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;
+
+ } /* 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_done == connssl->connecting_state) {
+ connssl->state = ssl_connection_complete;
+ conn->recv[sockindex] = darwinssl_recv;
+ conn->send[sockindex] = darwinssl_send;
+ *done = TRUE;
+ }
+ else
+ *done = FALSE;
+
+ /* Reset our connect state machine */
+ connssl->connecting_state = ssl_connect_1;
+
+ return CURLE_OK;
+}
+
+CURLcode
+Curl_darwinssl_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done)
+{
+ return darwinssl_connect_common(conn, sockindex, TRUE, done);
+}
+
+CURLcode
+Curl_darwinssl_connect(struct connectdata *conn,
+ int sockindex)
+{
+ CURLcode result;
+ bool done = FALSE;
+
+ result = darwinssl_connect_common(conn, sockindex, FALSE, &done);
+
+ if(result)
+ return result;
+
+ DEBUGASSERT(done);
+
+ return CURLE_OK;
+}
+
+void Curl_darwinssl_close(struct connectdata *conn, int sockindex)
+{
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ if(connssl->ssl_ctx) {
+ (void)SSLClose(connssl->ssl_ctx);
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+ if(SSLCreateContext != NULL)
+ CFRelease(connssl->ssl_ctx);
+#if CURL_SUPPORT_MAC_10_8
+ else
+ (void)SSLDisposeContext(connssl->ssl_ctx);
+#endif /* CURL_SUPPORT_MAC_10_8 */
+#else
+ (void)SSLDisposeContext(connssl->ssl_ctx);
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+ connssl->ssl_ctx = NULL;
+ }
+ connssl->ssl_sockfd = 0;
+}
+
+int Curl_darwinssl_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->ssl_ctx)
+ return 0;
+
+ if(data->set.ftp_ccc != CURLFTPSSL_CCC_ACTIVE)
+ return 0;
+
+ Curl_darwinssl_close(conn, sockindex);
+
+ 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;
+}
+
+void Curl_darwinssl_session_free(void *ptr)
+{
+ /* ST, as of iOS 5 and Mountain Lion, has no public method of deleting a
+ cached session ID inside the Security framework. There is a private
+ function that does this, but I don't want to have to explain to you why I
+ got your application rejected from the App Store due to the use of a
+ private API, so the best we can do is free up our own char array that we
+ created way back in darwinssl_connect_step1... */
+ Curl_safefree(ptr);
+}
+
+size_t Curl_darwinssl_version(char *buffer, size_t size)
+{
+ return snprintf(buffer, size, "SecureTransport");
+}
+
+/*
+ * This function uses SSLGetSessionState to determine connection status.
+ *
+ * Return codes:
+ * 1 means the connection is still in place
+ * 0 means the connection has been closed
+ * -1 means the connection status is unknown
+ */
+int Curl_darwinssl_check_cxn(struct connectdata *conn)
+{
+ struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
+ OSStatus err;
+ SSLSessionState state;
+
+ if(connssl->ssl_ctx) {
+ err = SSLGetSessionState(connssl->ssl_ctx, &state);
+ if(err == noErr)
+ return state == kSSLConnected || state == kSSLHandshake;
+ return -1;
+ }
+ return 0;
+}
+
+bool Curl_darwinssl_data_pending(const struct connectdata *conn,
+ int connindex)
+{
+ const struct ssl_connect_data *connssl = &conn->ssl[connindex];
+ OSStatus err;
+ size_t buffer;
+
+ if(connssl->ssl_ctx) { /* SSL is in use */
+ err = SSLGetBufferedReadSize(connssl->ssl_ctx, &buffer);
+ if(err == noErr)
+ return buffer > 0UL;
+ return false;
+ }
+ else
+ return false;
+}
+
+int Curl_darwinssl_random(unsigned char *entropy,
+ size_t length)
+{
+ /* arc4random_buf() isn't available on cats older than Lion, so let's
+ do this manually for the benefit of the older cats. */
+ size_t i;
+ u_int32_t random_number = 0;
+
+ for(i = 0 ; i < length ; i++) {
+ if(i % sizeof(u_int32_t) == 0)
+ random_number = arc4random();
+ entropy[i] = random_number & 0xFF;
+ random_number >>= 8;
+ }
+ i = random_number = 0;
+ return 0;
+}
+
+void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
+ size_t tmplen,
+ unsigned char *md5sum, /* output */
+ size_t md5len)
+{
+ (void)md5len;
+ (void)CC_MD5(tmp, (CC_LONG)tmplen, md5sum);
+}
+
+bool Curl_darwinssl_false_start(void) {
+#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
+ if(SSLSetSessionOption != NULL)
+ return TRUE;
+#endif
+ return FALSE;
+}
+
+static ssize_t darwinssl_send(struct connectdata *conn,
+ int sockindex,
+ const void *mem,
+ size_t len,
+ CURLcode *curlcode)
+{
+ /*struct SessionHandle *data = conn->data;*/
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ size_t processed = 0UL;
+ OSStatus err;
+
+ /* The SSLWrite() function works a little differently than expected. The
+ fourth argument (processed) is currently documented in Apple's
+ documentation as: "On return, the length, in bytes, of the data actually
+ written."
+
+ Now, one could interpret that as "written to the socket," but actually,
+ it returns the amount of data that was written to a buffer internal to
+ the SSLContextRef instead. So it's possible for SSLWrite() to return
+ errSSLWouldBlock and a number of bytes "written" because those bytes were
+ encrypted and written to a buffer, not to the socket.
+
+ So if this happens, then we need to keep calling SSLWrite() over and
+ over again with no new data until it quits returning errSSLWouldBlock. */
+
+ /* Do we have buffered data to write from the last time we were called? */
+ if(connssl->ssl_write_buffered_length) {
+ /* Write the buffered data: */
+ err = SSLWrite(connssl->ssl_ctx, NULL, 0UL, &processed);
+ switch (err) {
+ case noErr:
+ /* processed is always going to be 0 because we didn't write to
+ the buffer, so return how much was written to the socket */
+ processed = connssl->ssl_write_buffered_length;
+ connssl->ssl_write_buffered_length = 0UL;
+ break;
+ case errSSLWouldBlock: /* argh, try again */
+ *curlcode = CURLE_AGAIN;
+ return -1L;
+ default:
+ failf(conn->data, "SSLWrite() returned error %d", err);
+ *curlcode = CURLE_SEND_ERROR;
+ return -1L;
+ }
+ }
+ else {
+ /* We've got new data to write: */
+ err = SSLWrite(connssl->ssl_ctx, mem, len, &processed);
+ if(err != noErr) {
+ switch (err) {
+ case errSSLWouldBlock:
+ /* Data was buffered but not sent, we have to tell the caller
+ to try sending again, and remember how much was buffered */
+ connssl->ssl_write_buffered_length = len;
+ *curlcode = CURLE_AGAIN;
+ return -1L;
+ default:
+ failf(conn->data, "SSLWrite() returned error %d", err);
+ *curlcode = CURLE_SEND_ERROR;
+ return -1L;
+ }
+ }
+ }
+ return (ssize_t)processed;
+}
+
+static ssize_t darwinssl_recv(struct connectdata *conn,
+ int num,
+ char *buf,
+ size_t buffersize,
+ CURLcode *curlcode)
+{
+ /*struct SessionHandle *data = conn->data;*/
+ struct ssl_connect_data *connssl = &conn->ssl[num];
+ size_t processed = 0UL;
+ OSStatus err = SSLRead(connssl->ssl_ctx, buf, buffersize, &processed);
+
+ if(err != noErr) {
+ switch (err) {
+ case errSSLWouldBlock: /* return how much we read (if anything) */
+ if(processed)
+ return (ssize_t)processed;
+ *curlcode = CURLE_AGAIN;
+ return -1L;
+ break;
+
+ /* errSSLClosedGraceful - server gracefully shut down the SSL session
+ errSSLClosedNoNotify - server hung up on us instead of sending a
+ closure alert notice, read() is returning 0
+ Either way, inform the caller that the server disconnected. */
+ case errSSLClosedGraceful:
+ case errSSLClosedNoNotify:
+ *curlcode = CURLE_OK;
+ return -1L;
+ break;
+
+ default:
+ failf(conn->data, "SSLRead() return error %d", err);
+ *curlcode = CURLE_RECV_ERROR;
+ return -1L;
+ break;
+ }
+ }
+ return (ssize_t)processed;
+}
+
+#endif /* USE_DARWINSSL */
diff --git a/lib/vtls/darwinssl.h b/lib/vtls/darwinssl.h
new file mode 100644
index 00000000..3bb69c01
--- /dev/null
+++ b/lib/vtls/darwinssl.h
@@ -0,0 +1,76 @@
+#ifndef HEADER_CURL_DARWINSSL_H
+#define HEADER_CURL_DARWINSSL_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2014, Nick Zitzmann, <nickzman@gmail.com>.
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_DARWINSSL
+
+CURLcode Curl_darwinssl_connect(struct connectdata *conn, int sockindex);
+
+CURLcode Curl_darwinssl_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done);
+
+/* close a SSL connection */
+void Curl_darwinssl_close(struct connectdata *conn, int sockindex);
+
+void Curl_darwinssl_session_free(void *ptr);
+size_t Curl_darwinssl_version(char *buffer, size_t size);
+int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex);
+int Curl_darwinssl_check_cxn(struct connectdata *conn);
+bool Curl_darwinssl_data_pending(const struct connectdata *conn,
+ int connindex);
+
+int Curl_darwinssl_random(unsigned char *entropy,
+ size_t length);
+void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
+ size_t tmplen,
+ unsigned char *md5sum, /* output */
+ size_t md5len);
+bool Curl_darwinssl_false_start(void);
+
+/* Set the API backend definition to SecureTransport */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL
+
+/* API setup for SecureTransport */
+#define curlssl_init() (1)
+#define curlssl_cleanup() Curl_nop_stmt
+#define curlssl_connect Curl_darwinssl_connect
+#define curlssl_connect_nonblocking Curl_darwinssl_connect_nonblocking
+#define curlssl_session_free(x) Curl_darwinssl_session_free(x)
+#define curlssl_close_all(x) ((void)x)
+#define curlssl_close Curl_darwinssl_close
+#define curlssl_shutdown(x,y) 0
+#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_darwinssl_version
+#define curlssl_check_cxn Curl_darwinssl_check_cxn
+#define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y)
+#define curlssl_random(x,y,z) ((void)x, Curl_darwinssl_random(y,z))
+#define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d)
+#define curlssl_false_start() Curl_darwinssl_false_start()
+
+#endif /* USE_DARWINSSL */
+#endif /* HEADER_CURL_DARWINSSL_H */
diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c
new file mode 100644
index 00000000..d884bd4c
--- /dev/null
+++ b/lib/vtls/gskit.c
@@ -0,0 +1,1069 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_GSKIT
+
+#include <gskssl.h>
+#include <qsoasync.h>
+
+/* Some symbols are undefined/unsupported on OS400 versions < V7R1. */
+#ifndef GSK_SSL_EXTN_SERVERNAME_REQUEST
+#define GSK_SSL_EXTN_SERVERNAME_REQUEST 230
+#endif
+
+#ifndef GSK_TLSV10_CIPHER_SPECS
+#define GSK_TLSV10_CIPHER_SPECS 236
+#endif
+
+#ifndef GSK_TLSV11_CIPHER_SPECS
+#define GSK_TLSV11_CIPHER_SPECS 237
+#endif
+
+#ifndef GSK_TLSV12_CIPHER_SPECS
+#define GSK_TLSV12_CIPHER_SPECS 238
+#endif
+
+#ifndef GSK_PROTOCOL_TLSV11
+#define GSK_PROTOCOL_TLSV11 437
+#endif
+
+#ifndef GSK_PROTOCOL_TLSV12
+#define GSK_PROTOCOL_TLSV12 438
+#endif
+
+#ifndef GSK_FALSE
+#define GSK_FALSE 0
+#endif
+
+#ifndef GSK_TRUE
+#define GSK_TRUE 1
+#endif
+
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#include <curl/curl.h>
+#include "urldata.h"
+#include "sendf.h"
+#include "gskit.h"
+#include "vtls.h"
+#include "connect.h" /* for the connect timeout */
+#include "select.h"
+#include "strequal.h"
+#include "x509asn1.h"
+#include "curl_printf.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+
+/* SSL version flags. */
+#define CURL_GSKPROTO_SSLV2 0
+#define CURL_GSKPROTO_SSLV2_MASK (1 << CURL_GSKPROTO_SSLV2)
+#define CURL_GSKPROTO_SSLV3 1
+#define CURL_GSKPROTO_SSLV3_MASK (1 << CURL_GSKPROTO_SSLV3)
+#define CURL_GSKPROTO_TLSV10 2
+#define CURL_GSKPROTO_TLSV10_MASK (1 << CURL_GSKPROTO_TLSV10)
+#define CURL_GSKPROTO_TLSV11 3
+#define CURL_GSKPROTO_TLSV11_MASK (1 << CURL_GSKPROTO_TLSV11)
+#define CURL_GSKPROTO_TLSV12 4
+#define CURL_GSKPROTO_TLSV12_MASK (1 << CURL_GSKPROTO_TLSV12)
+#define CURL_GSKPROTO_LAST 5
+
+
+/* Supported ciphers. */
+typedef struct {
+ const char *name; /* Cipher name. */
+ const char *gsktoken; /* Corresponding token for GSKit String. */
+ unsigned int versions; /* SSL version flags. */
+} gskit_cipher;
+
+static const gskit_cipher ciphertable[] = {
+ { "null-md5", "01",
+ CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK |
+ CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK },
+ { "null-sha", "02",
+ CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK |
+ CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK },
+ { "exp-rc4-md5", "03",
+ CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK },
+ { "rc4-md5", "04",
+ CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK |
+ CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK },
+ { "rc4-sha", "05",
+ CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK |
+ CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK },
+ { "exp-rc2-cbc-md5", "06",
+ CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK },
+ { "exp-des-cbc-sha", "09",
+ CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK |
+ CURL_GSKPROTO_TLSV11_MASK },
+ { "des-cbc3-sha", "0A",
+ CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK |
+ CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK },
+ { "aes128-sha", "2F",
+ CURL_GSKPROTO_TLSV10_MASK | CURL_GSKPROTO_TLSV11_MASK |
+ CURL_GSKPROTO_TLSV12_MASK },
+ { "aes256-sha", "35",
+ 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 },
+ { "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 },
+ { "exp-rc2-md5", "4", CURL_GSKPROTO_SSLV2_MASK },
+ { "des-cbc-md5", "6", CURL_GSKPROTO_SSLV2_MASK },
+ { "des-cbc3-md5", "7", CURL_GSKPROTO_SSLV2_MASK },
+ { (const char *) NULL, (const char *) NULL, 0 }
+};
+
+
+static bool is_separator(char c)
+{
+ /* Return whether character is a cipher list separator. */
+ switch (c) {
+ case ' ':
+ case '\t':
+ case ':':
+ case ',':
+ case ';':
+ return true;
+ }
+ return false;
+}
+
+
+static CURLcode gskit_status(struct SessionHandle *data, int rc,
+ const char *procname, CURLcode defcode)
+{
+ /* Process GSKit status and map it to a CURLcode. */
+ switch (rc) {
+ case GSK_OK:
+ case GSK_OS400_ASYNCHRONOUS_SOC_INIT:
+ return CURLE_OK;
+ case GSK_KEYRING_OPEN_ERROR:
+ case GSK_OS400_ERROR_NO_ACCESS:
+ return CURLE_SSL_CACERT_BADFILE;
+ case GSK_INSUFFICIENT_STORAGE:
+ return CURLE_OUT_OF_MEMORY;
+ case GSK_ERROR_BAD_V2_CIPHER:
+ case GSK_ERROR_BAD_V3_CIPHER:
+ case GSK_ERROR_NO_CIPHERS:
+ return CURLE_SSL_CIPHER;
+ case GSK_OS400_ERROR_NOT_TRUSTED_ROOT:
+ case GSK_ERROR_CERT_VALIDATION:
+ return CURLE_PEER_FAILED_VERIFICATION;
+ case GSK_OS400_ERROR_TIMED_OUT:
+ return CURLE_OPERATION_TIMEDOUT;
+ case GSK_WOULD_BLOCK:
+ return CURLE_AGAIN;
+ case GSK_OS400_ERROR_NOT_REGISTERED:
+ break;
+ case GSK_ERROR_IO:
+ switch (errno) {
+ case ENOMEM:
+ return CURLE_OUT_OF_MEMORY;
+ default:
+ failf(data, "%s I/O error: %s", procname, strerror(errno));
+ break;
+ }
+ break;
+ default:
+ failf(data, "%s: %s", procname, gsk_strerror(rc));
+ break;
+ }
+ return defcode;
+}
+
+
+static CURLcode set_enum(struct SessionHandle *data, gsk_handle h,
+ GSK_ENUM_ID id, GSK_ENUM_VALUE value, bool unsupported_ok)
+{
+ int rc = gsk_attribute_set_enum(h, id, value);
+
+ switch (rc) {
+ case GSK_OK:
+ return CURLE_OK;
+ case GSK_ERROR_IO:
+ failf(data, "gsk_attribute_set_enum() I/O error: %s", strerror(errno));
+ break;
+ case GSK_ATTRIBUTE_INVALID_ID:
+ if(unsupported_ok)
+ return CURLE_UNSUPPORTED_PROTOCOL;
+ default:
+ failf(data, "gsk_attribute_set_enum(): %s", gsk_strerror(rc));
+ break;
+ }
+ return CURLE_SSL_CONNECT_ERROR;
+}
+
+
+static CURLcode set_buffer(struct SessionHandle *data, gsk_handle h,
+ GSK_BUF_ID id, const char *buffer, bool unsupported_ok)
+{
+ int rc = gsk_attribute_set_buffer(h, id, buffer, 0);
+
+ switch (rc) {
+ case GSK_OK:
+ return CURLE_OK;
+ case GSK_ERROR_IO:
+ failf(data, "gsk_attribute_set_buffer() I/O error: %s", strerror(errno));
+ break;
+ case GSK_ATTRIBUTE_INVALID_ID:
+ if(unsupported_ok)
+ return CURLE_UNSUPPORTED_PROTOCOL;
+ default:
+ failf(data, "gsk_attribute_set_buffer(): %s", gsk_strerror(rc));
+ break;
+ }
+ return CURLE_SSL_CONNECT_ERROR;
+}
+
+
+static CURLcode set_numeric(struct SessionHandle *data,
+ gsk_handle h, GSK_NUM_ID id, int value)
+{
+ int rc = gsk_attribute_set_numeric_value(h, id, value);
+
+ switch (rc) {
+ case GSK_OK:
+ return CURLE_OK;
+ case GSK_ERROR_IO:
+ failf(data, "gsk_attribute_set_numeric_value() I/O error: %s",
+ strerror(errno));
+ break;
+ default:
+ failf(data, "gsk_attribute_set_numeric_value(): %s", gsk_strerror(rc));
+ break;
+ }
+ return CURLE_SSL_CONNECT_ERROR;
+}
+
+
+static CURLcode set_callback(struct SessionHandle *data,
+ gsk_handle h, GSK_CALLBACK_ID id, void *info)
+{
+ int rc = gsk_attribute_set_callback(h, id, info);
+
+ switch (rc) {
+ case GSK_OK:
+ return CURLE_OK;
+ case GSK_ERROR_IO:
+ failf(data, "gsk_attribute_set_callback() I/O error: %s", strerror(errno));
+ break;
+ default:
+ failf(data, "gsk_attribute_set_callback(): %s", gsk_strerror(rc));
+ break;
+ }
+ return CURLE_SSL_CONNECT_ERROR;
+}
+
+
+static CURLcode set_ciphers(struct SessionHandle *data,
+ gsk_handle h, unsigned int *protoflags)
+{
+ const char *cipherlist = data->set.str[STRING_SSL_CIPHER_LIST];
+ const char *clp;
+ const gskit_cipher *ctp;
+ int i;
+ int l;
+ bool unsupported;
+ CURLcode result;
+ struct {
+ char *buf;
+ char *ptr;
+ } ciphers[CURL_GSKPROTO_LAST];
+
+ /* Compile cipher list into GSKit-compatible cipher lists. */
+
+ if(!cipherlist)
+ return CURLE_OK;
+ while(is_separator(*cipherlist)) /* Skip initial separators. */
+ cipherlist++;
+ if(!*cipherlist)
+ return CURLE_OK;
+
+ /* We allocate GSKit buffers of the same size as the input string: since
+ GSKit tokens are always shorter than their cipher names, allocated buffers
+ will always be large enough to accomodate the result. */
+ l = strlen(cipherlist) + 1;
+ memset((char *) ciphers, 0, sizeof ciphers);
+ for(i = 0; i < CURL_GSKPROTO_LAST; i++) {
+ ciphers[i].buf = malloc(l);
+ if(!ciphers[i].buf) {
+ while(i--)
+ free(ciphers[i].buf);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ ciphers[i].ptr = ciphers[i].buf;
+ *ciphers[i].ptr = '\0';
+ }
+
+ /* Process each cipher in input string. */
+ unsupported = FALSE;
+ result = CURLE_OK;
+ for(;;) {
+ for(clp = cipherlist; *cipherlist && !is_separator(*cipherlist);)
+ cipherlist++;
+ l = cipherlist - clp;
+ if(!l)
+ break;
+ /* Search the cipher in our table. */
+ for(ctp = ciphertable; ctp->name; ctp++)
+ if(strnequal(ctp->name, clp, l) && !ctp->name[l])
+ break;
+ if(!ctp->name) {
+ failf(data, "Unknown cipher %.*s", l, clp);
+ result = CURLE_SSL_CIPHER;
+ }
+ else {
+ unsupported |= !(ctp->versions & (CURL_GSKPROTO_SSLV2_MASK |
+ CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK));
+ for(i = 0; i < CURL_GSKPROTO_LAST; i++) {
+ if(ctp->versions & (1 << i)) {
+ strcpy(ciphers[i].ptr, ctp->gsktoken);
+ ciphers[i].ptr += strlen(ctp->gsktoken);
+ }
+ }
+ }
+
+ /* Advance to next cipher name or end of string. */
+ while(is_separator(*cipherlist))
+ cipherlist++;
+ }
+
+ /* Disable protocols with empty cipher lists. */
+ for(i = 0; i < CURL_GSKPROTO_LAST; i++) {
+ if(!(*protoflags & (1 << i)) || !ciphers[i].buf[0]) {
+ *protoflags &= ~(1 << i);
+ ciphers[i].buf[0] = '\0';
+ }
+ }
+
+ /* 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;
+ if(unsupported) {
+ failf(data, "TLSv1.1-only ciphers are not yet supported");
+ result = 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(unsupported) {
+ failf(data, "TLSv1.2-only ciphers are not yet supported");
+ result = 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;
+ 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);
+
+ /* Clean-up. */
+ for(i = 0; i < CURL_GSKPROTO_LAST; i++)
+ free(ciphers[i].buf);
+
+ return result;
+}
+
+
+int Curl_gskit_init(void)
+{
+ /* No initialisation needed. */
+
+ return 1;
+}
+
+
+void Curl_gskit_cleanup(void)
+{
+ /* Nothing to do. */
+}
+
+
+static CURLcode init_environment(struct SessionHandle *data,
+ gsk_handle *envir, const char *appid,
+ const char *file, const char *label,
+ const char *password)
+{
+ int rc;
+ CURLcode result;
+ gsk_handle h;
+
+ /* Creates the GSKit environment. */
+
+ rc = gsk_environment_open(&h);
+ switch (rc) {
+ case GSK_OK:
+ break;
+ case GSK_INSUFFICIENT_STORAGE:
+ return CURLE_OUT_OF_MEMORY;
+ default:
+ failf(data, "gsk_environment_open(): %s", gsk_strerror(rc));
+ 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) {
+ /* 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) {
+ *envir = h;
+ return result;
+ }
+ }
+ /* Error: rollback. */
+ gsk_environment_close(&h);
+ return result;
+}
+
+
+static void cancel_async_handshake(struct connectdata *conn, int sockindex)
+{
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ Qso_OverlappedIO_t cstat;
+
+ if(QsoCancelOperation(conn->sock[sockindex], 0) > 0)
+ QsoWaitForIOCompletion(connssl->iocport, &cstat, (struct timeval *) NULL);
+}
+
+
+static void close_async_handshake(struct ssl_connect_data *connssl)
+{
+ QsoDestroyIOCompletionPort(connssl->iocport);
+ connssl->iocport = -1;
+}
+
+
+static void close_one(struct ssl_connect_data *conn,
+ struct SessionHandle *data)
+{
+ if(conn->handle) {
+ gskit_status(data, gsk_secure_soc_close(&conn->handle),
+ "gsk_secure_soc_close()", 0);
+ conn->handle = (gsk_handle) NULL;
+ }
+ if(conn->iocport >= 0)
+ close_async_handshake(conn);
+}
+
+
+static ssize_t gskit_send(struct connectdata *conn, int sockindex,
+ const void *mem, size_t len, CURLcode *curlcode)
+{
+ struct SessionHandle *data = conn->data;
+ CURLcode cc;
+ int written;
+
+ cc = gskit_status(data,
+ gsk_secure_soc_write(conn->ssl[sockindex].handle,
+ (char *) mem, (int) len, &written),
+ "gsk_secure_soc_write()", CURLE_SEND_ERROR);
+ if(cc != CURLE_OK) {
+ *curlcode = cc;
+ written = -1;
+ }
+ return (ssize_t) written; /* number of bytes */
+}
+
+
+static ssize_t gskit_recv(struct connectdata *conn, int num, char *buf,
+ size_t buffersize, CURLcode *curlcode)
+{
+ struct SessionHandle *data = conn->data;
+ int buffsize;
+ int nread;
+ CURLcode cc;
+
+ buffsize = buffersize > (size_t) INT_MAX? INT_MAX: (int) buffersize;
+ cc = gskit_status(data, gsk_secure_soc_read(conn->ssl[num].handle,
+ buf, buffsize, &nread),
+ "gsk_secure_soc_read()", CURLE_RECV_ERROR);
+ if(cc != CURLE_OK) {
+ *curlcode = cc;
+ nread = -1;
+ }
+ return (ssize_t) nread;
+}
+
+
+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;
+ int rc;
+ char *keyringfile;
+ char *keyringpwd;
+ char *keyringlabel;
+ char *sni;
+ unsigned int protoflags;
+ long timeout;
+ Qso_OverlappedIO_t commarea;
+
+ /* Create SSL environment, start (preferably asynchronous) handshake. */
+
+ connssl->handle = (gsk_handle) NULL;
+ connssl->iocport = -1;
+
+ /* GSKit supports two ways of specifying an SSL context: either by
+ * application identifier (that should have been defined at the system
+ * level) or by keyring file, password and certificate label.
+ * Local certificate name (CURLOPT_SSLCERT) is used to hold either the
+ * application identifier of the certificate label.
+ * Key password (CURLOPT_KEYPASSWD) holds the keyring password.
+ * It is not possible to have different keyrings for the CAs and the
+ * local certificate. We thus use the CA file (CURLOPT_CAINFO) to identify
+ * the keyring file.
+ * If no key password is given and the keyring is the system keyring,
+ * application identifier mode is tried first, as recommended in IBM doc.
+ */
+
+ keyringfile = data->set.str[STRING_SSL_CAFILE];
+ keyringpwd = data->set.str[STRING_KEY_PASSWD];
+ keyringlabel = data->set.str[STRING_CERT];
+ envir = (gsk_handle) NULL;
+
+ if(keyringlabel && *keyringlabel && !keyringpwd &&
+ !strcmp(keyringfile, CURL_CA_BUNDLE)) {
+ /* Try application identifier mode. */
+ init_environment(data, &envir, keyringlabel, (const char *) NULL,
+ (const char *) NULL, (const char *) NULL);
+ }
+
+ if(!envir) {
+ /* Use keyring mode. */
+ result = init_environment(data, &envir, (const char *) NULL,
+ keyringfile, keyringlabel, keyringpwd);
+ if(result)
+ return result;
+ }
+
+ /* Create secure session. */
+ result = 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;
+
+ /* Determine which SSL/TLS version should be enabled. */
+ protoflags = 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:
+ protoflags = CURL_GSKPROTO_SSLV2_MASK;
+ sni = (char *) NULL;
+ break;
+ case CURL_SSLVERSION_SSLv3:
+ protoflags = CURL_GSKPROTO_SSLV3_MASK;
+ sni = (char *) NULL;
+ break;
+ case CURL_SSLVERSION_TLSv1:
+ protoflags = CURL_GSKPROTO_TLSV10_MASK |
+ CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK;
+ break;
+ case CURL_SSLVERSION_TLSv1_0:
+ protoflags = CURL_GSKPROTO_TLSV10_MASK;
+ break;
+ case CURL_SSLVERSION_TLSv1_1:
+ protoflags = CURL_GSKPROTO_TLSV11_MASK;
+ break;
+ case CURL_SSLVERSION_TLSv1_2:
+ protoflags = CURL_GSKPROTO_TLSV12_MASK;
+ break;
+ }
+
+ /* 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;
+ }
+
+ /* Set session parameters. */
+ if(!result) {
+ /* 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;
+ else
+ result = 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(!protoflags) {
+ failf(data, "No SSL protocol/cipher combination enabled");
+ result = 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(protoflags == CURL_GSKPROTO_TLSV11_MASK) {
+ failf(data, "TLS 1.1 not yet supported");
+ result = 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(protoflags == CURL_GSKPROTO_TLSV12_MASK) {
+ failf(data, "TLS 1.2 not yet supported");
+ result = 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(!result) {
+ /* 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) {
+ connssl->connecting_state = ssl_connect_2;
+ return CURLE_OK;
+ }
+ else
+ close_async_handshake(connssl);
+ }
+ else if(errno != ENOBUFS)
+ result = 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) {
+ connssl->connecting_state = ssl_connect_3;
+ return CURLE_OK;
+ }
+ }
+ }
+
+ /* Error: rollback. */
+ close_one(connssl, data);
+ return result;
+}
+
+
+static CURLcode gskit_connect_step2(struct connectdata *conn, int sockindex,
+ bool nonblocking)
+{
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ Qso_OverlappedIO_t cstat;
+ long timeout_ms;
+ struct timeval stmv;
+ CURLcode result;
+
+ /* Poll or wait for end of SSL asynchronous handshake. */
+
+ for(;;) {
+ timeout_ms = nonblocking? 0: Curl_timeleft(data, NULL, TRUE);
+ if(timeout_ms < 0)
+ timeout_ms = 0;
+ stmv.tv_sec = timeout_ms / 1000;
+ stmv.tv_usec = (timeout_ms - stmv.tv_sec * 1000) * 1000;
+ switch (QsoWaitForIOCompletion(connssl->iocport, &cstat, &stmv)) {
+ case 1: /* Operation complete. */
+ break;
+ case -1: /* An error occurred: handshake still in progress. */
+ if(errno == EINTR) {
+ if(nonblocking)
+ return CURLE_OK;
+ continue; /* Retry. */
+ }
+ if(errno != ETIME) {
+ failf(data, "QsoWaitForIOCompletion() I/O error: %s", strerror(errno));
+ cancel_async_handshake(conn, sockindex);
+ close_async_handshake(connssl);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ /* FALL INTO... */
+ case 0: /* Handshake in progress, timeout occurred. */
+ if(nonblocking)
+ return CURLE_OK;
+ cancel_async_handshake(conn, sockindex);
+ close_async_handshake(connssl);
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+ break;
+ }
+ result = gskit_status(data, cstat.returnValue, "SSL handshake",
+ CURLE_SSL_CONNECT_ERROR);
+ if(!result)
+ connssl->connecting_state = ssl_connect_3;
+ close_async_handshake(connssl);
+ return result;
+}
+
+
+static CURLcode gskit_connect_step3(struct connectdata *conn, int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ const gsk_cert_data_elem *cdev;
+ int cdec;
+ const gsk_cert_data_elem *p;
+ const char *cert = (const char *) NULL;
+ const char *certend;
+ const char *ptr;
+ int i;
+ CURLcode result;
+
+ /* SSL handshake done: gather certificate info and verify host. */
+
+ if(gskit_status(data, gsk_attribute_get_cert_info(connssl->handle,
+ GSK_PARTNER_CERT_INFO,
+ &cdev, &cdec),
+ "gsk_attribute_get_cert_info()", CURLE_SSL_CONNECT_ERROR) ==
+ CURLE_OK) {
+ infof(data, "Server certificate:\n");
+ p = cdev;
+ for(i = 0; i++ < cdec; p++)
+ switch (p->cert_data_id) {
+ case CERT_BODY_DER:
+ cert = p->cert_data_p;
+ certend = cert + cdev->cert_data_l;
+ break;
+ case CERT_DN_PRINTABLE:
+ infof(data, "\t subject: %.*s\n", p->cert_data_l, p->cert_data_p);
+ break;
+ case CERT_ISSUER_DN_PRINTABLE:
+ infof(data, "\t issuer: %.*s\n", p->cert_data_l, p->cert_data_p);
+ break;
+ case CERT_VALID_FROM:
+ infof(data, "\t start date: %.*s\n", p->cert_data_l, p->cert_data_p);
+ break;
+ case CERT_VALID_TO:
+ infof(data, "\t expire date: %.*s\n", p->cert_data_l, p->cert_data_p);
+ break;
+ }
+ }
+
+ /* Verify host. */
+ result = Curl_verifyhost(conn, cert, certend);
+ if(result)
+ return result;
+
+ /* 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
+ possible to copy this chain into our structures for CAINFO.
+ 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(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;
+ }
+ }
+
+ connssl->connecting_state = ssl_connect_done;
+ return CURLE_OK;
+}
+
+
+static CURLcode gskit_connect_common(struct connectdata *conn, int sockindex,
+ bool nonblocking, bool *done)
+{
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ long timeout_ms;
+ Qso_OverlappedIO_t cstat;
+ CURLcode result = CURLE_OK;
+
+ *done = connssl->state == ssl_connection_complete;
+ if(*done)
+ return CURLE_OK;
+
+ /* Step 1: create session, start handshake. */
+ if(connssl->connecting_state == ssl_connect_1) {
+ /* 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;
+ }
+ else
+ result = gskit_connect_step1(conn, sockindex);
+ }
+
+ /* Step 2: check if handshake is over. */
+ if(!result && 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;
+ }
+ else
+ result = 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(result)
+ close_one(connssl, data);
+ else if(connssl->connecting_state == ssl_connect_done) {
+ connssl->state = ssl_connection_complete;
+ connssl->connecting_state = ssl_connect_1;
+ conn->recv[sockindex] = gskit_recv;
+ conn->send[sockindex] = gskit_send;
+ *done = TRUE;
+ }
+
+ return result;
+}
+
+
+CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done)
+{
+ CURLcode result;
+
+ result = gskit_connect_common(conn, sockindex, TRUE, done);
+ if(*done || result)
+ conn->ssl[sockindex].connecting_state = ssl_connect_1;
+ return result;
+}
+
+
+CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex)
+{
+ CURLcode result;
+ bool done;
+
+ conn->ssl[sockindex].connecting_state = ssl_connect_1;
+ result = gskit_connect_common(conn, sockindex, FALSE, &done);
+ if(result)
+ return result;
+
+ DEBUGASSERT(done);
+
+ return CURLE_OK;
+}
+
+
+void Curl_gskit_close(struct connectdata *conn, int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ if(connssl->use)
+ close_one(connssl, data);
+}
+
+
+int Curl_gskit_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;
+
+ close_one(connssl, data);
+ 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 gsk_secure_soc_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;
+}
+
+
+size_t Curl_gskit_version(char *buffer, size_t size)
+{
+ strncpy(buffer, "GSKit", size);
+ return strlen(buffer);
+}
+
+
+int Curl_gskit_check_cxn(struct connectdata *cxn)
+{
+ 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_GSKIT */
diff --git a/lib/vtls/gskit.h b/lib/vtls/gskit.h
new file mode 100644
index 00000000..af31fafa
--- /dev/null
+++ b/lib/vtls/gskit.h
@@ -0,0 +1,71 @@
+#ifndef HEADER_CURL_GSKIT_H
+#define HEADER_CURL_GSKIT_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 gskit.c
+ */
+
+#include "urldata.h"
+
+#ifdef USE_GSKIT
+int Curl_gskit_init(void);
+void Curl_gskit_cleanup(void);
+CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex);
+CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn,
+ int sockindex, bool *done);
+void Curl_gskit_close(struct connectdata *conn, int sockindex);
+int Curl_gskit_shutdown(struct connectdata *conn, int sockindex);
+
+size_t Curl_gskit_version(char *buffer, size_t size);
+int Curl_gskit_check_cxn(struct connectdata *cxn);
+
+/* Set the API backend definition to GSKit */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_GSKIT
+
+/* this backend supports CURLOPT_CERTINFO */
+#define have_curlssl_certinfo 1
+
+/* API setup for GSKit */
+#define curlssl_init Curl_gskit_init
+#define curlssl_cleanup Curl_gskit_cleanup
+#define curlssl_connect Curl_gskit_connect
+#define curlssl_connect_nonblocking Curl_gskit_connect_nonblocking
+
+/* No session handling for GSKit */
+#define curlssl_session_free(x) Curl_nop_stmt
+#define curlssl_close_all(x) ((void)x)
+#define curlssl_close Curl_gskit_close
+#define curlssl_shutdown(x,y) Curl_gskit_shutdown(x,y)
+#define curlssl_set_engine(x,y) CURLE_NOT_BUILT_IN
+#define curlssl_set_engine_default(x) CURLE_NOT_BUILT_IN
+#define curlssl_engines_list(x) NULL
+#define curlssl_version Curl_gskit_version
+#define curlssl_check_cxn(x) Curl_gskit_check_cxn(x)
+#define curlssl_data_pending(x,y) 0
+#define curlssl_random(x,y,z) -1
+
+#endif /* USE_GSKIT */
+
+#endif /* HEADER_CURL_GSKIT_H */
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
new file mode 100644
index 00000000..1db31e40
--- /dev/null
+++ b/lib/vtls/gtls.c
@@ -0,0 +1,1569 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all GnuTLS-specific code for the TLS/SSL layer. No code
+ * but vtls.c should ever call or use these functions.
+ *
+ * Note: don't use the GnuTLS' *_t variable type names in this source code,
+ * since they were not present in 1.0.X.
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_GNUTLS
+
+#include <gnutls/abstract.h>
+#include <gnutls/gnutls.h>
+#include <gnutls/x509.h>
+
+#ifdef USE_GNUTLS_NETTLE
+#include <gnutls/crypto.h>
+#include <nettle/md5.h>
+#else
+#include <gcrypt.h>
+#endif
+
+#include "urldata.h"
+#include "sendf.h"
+#include "inet_pton.h"
+#include "gtls.h"
+#include "vtls.h"
+#include "parsedate.h"
+#include "connect.h" /* for the connect timeout */
+#include "select.h"
+#include "rawstr.h"
+#include "warnless.h"
+#include "x509asn1.h"
+#include "curl_printf.h"
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/*
+ Some hackish cast macros based on:
+ http://library.gnome.org/devel/glib/unstable/glib-Type-Conversion-Macros.html
+*/
+#ifndef GNUTLS_POINTER_TO_INT_CAST
+#define GNUTLS_POINTER_TO_INT_CAST(p) ((int) (long) (p))
+#endif
+#ifndef GNUTLS_INT_TO_POINTER_CAST
+#define GNUTLS_INT_TO_POINTER_CAST(i) ((void*) (long) (i))
+#endif
+
+/* Enable GnuTLS debugging by defining GTLSDEBUG */
+/*#define GTLSDEBUG */
+
+#ifdef GTLSDEBUG
+static void tls_log_func(int level, const char *str)
+{
+ fprintf(stderr, "|<%d>| %s", level, str);
+}
+#endif
+static bool gtls_inited = FALSE;
+
+#if defined(GNUTLS_VERSION_NUMBER)
+# if (GNUTLS_VERSION_NUMBER >= 0x020c00)
+# undef gnutls_transport_set_lowat
+# define gnutls_transport_set_lowat(A,B) Curl_nop_stmt
+# define USE_GNUTLS_PRIORITY_SET_DIRECT 1
+# endif
+# if (GNUTLS_VERSION_NUMBER >= 0x020c03)
+# define GNUTLS_MAPS_WINSOCK_ERRORS 1
+# endif
+
+# if (GNUTLS_VERSION_NUMBER >= 0x030200)
+# define HAS_ALPN
+# endif
+
+# if (GNUTLS_VERSION_NUMBER >= 0x03020d)
+# define HAS_OCSP
+# endif
+
+# if (GNUTLS_VERSION_NUMBER >= 0x030306)
+# define HAS_CAPATH
+# endif
+#endif
+
+#ifdef HAS_OCSP
+# include <gnutls/ocsp.h>
+#endif
+
+/*
+ * Custom push and pull callback functions used by GNU TLS to read and write
+ * to the socket. These functions are simple wrappers to send() and recv()
+ * (although here using the sread/swrite macros as defined by
+ * curl_setup_once.h).
+ * We use custom functions rather than the GNU TLS defaults because it allows
+ * us to get specific about the fourth "flags" argument, and to use arbitrary
+ * private data with gnutls_transport_set_ptr if we wish.
+ *
+ * When these custom push and pull callbacks fail, GNU TLS checks its own
+ * session-specific error variable, and when not set also its own global
+ * errno variable, in order to take appropriate action. GNU TLS does not
+ * require that the transport is actually a socket. This implies that for
+ * Windows builds these callbacks should ideally set the session-specific
+ * error variable using function gnutls_transport_set_errno or as a last
+ * resort global errno variable using gnutls_transport_set_global_errno,
+ * with a transport agnostic error value. This implies that some winsock
+ * error translation must take place in these callbacks.
+ *
+ * Paragraph above applies to GNU TLS versions older than 2.12.3, since
+ * this version GNU TLS does its own internal winsock error translation
+ * using system_errno() function.
+ */
+
+#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
+# define gtls_EINTR 4
+# define gtls_EIO 5
+# define gtls_EAGAIN 11
+static int gtls_mapped_sockerrno(void)
+{
+ switch(SOCKERRNO) {
+ case WSAEWOULDBLOCK:
+ return gtls_EAGAIN;
+ case WSAEINTR:
+ return gtls_EINTR;
+ default:
+ break;
+ }
+ return gtls_EIO;
+}
+#endif
+
+static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len)
+{
+ ssize_t ret = swrite(GNUTLS_POINTER_TO_INT_CAST(s), buf, len);
+#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
+ if(ret < 0)
+ gnutls_transport_set_global_errno(gtls_mapped_sockerrno());
+#endif
+ return ret;
+}
+
+static ssize_t Curl_gtls_pull(void *s, void *buf, size_t len)
+{
+ ssize_t ret = sread(GNUTLS_POINTER_TO_INT_CAST(s), buf, len);
+#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
+ if(ret < 0)
+ gnutls_transport_set_global_errno(gtls_mapped_sockerrno());
+#endif
+ return ret;
+}
+
+/* Curl_gtls_init()
+ *
+ * Global GnuTLS init, called from Curl_ssl_init(). This calls functions that
+ * are not thread-safe and thus this function itself is not thread-safe and
+ * must only be called from within curl_global_init() to keep the thread
+ * situation under control!
+ */
+int Curl_gtls_init(void)
+{
+ int ret = 1;
+ if(!gtls_inited) {
+ ret = gnutls_global_init()?0:1;
+#ifdef GTLSDEBUG
+ gnutls_global_set_log_function(tls_log_func);
+ gnutls_global_set_log_level(2);
+#endif
+ gtls_inited = TRUE;
+ }
+ return ret;
+}
+
+int Curl_gtls_cleanup(void)
+{
+ if(gtls_inited) {
+ gnutls_global_deinit();
+ gtls_inited = FALSE;
+ }
+ return 1;
+}
+
+static void showtime(struct SessionHandle *data,
+ const char *text,
+ time_t stamp)
+{
+ struct tm buffer;
+ const struct tm *tm = &buffer;
+ CURLcode result = Curl_gmtime(stamp, &buffer);
+ if(result)
+ return;
+
+ snprintf(data->state.buffer,
+ BUFSIZE,
+ "\t %s: %s, %02d %s %4d %02d:%02d:%02d GMT",
+ text,
+ Curl_wkday[tm->tm_wday?tm->tm_wday-1:6],
+ tm->tm_mday,
+ Curl_month[tm->tm_mon],
+ tm->tm_year + 1900,
+ tm->tm_hour,
+ tm->tm_min,
+ tm->tm_sec);
+ infof(data, "%s\n", data->state.buffer);
+}
+
+static gnutls_datum_t load_file (const char *file)
+{
+ FILE *f;
+ gnutls_datum_t loaded_file = { NULL, 0 };
+ long filelen;
+ void *ptr;
+
+ if(!(f = fopen(file, "rb")))
+ return loaded_file;
+ if(fseek(f, 0, SEEK_END) != 0
+ || (filelen = ftell(f)) < 0
+ || fseek(f, 0, SEEK_SET) != 0
+ || !(ptr = malloc((size_t)filelen)))
+ goto out;
+ if(fread(ptr, 1, (size_t)filelen, f) < (size_t)filelen) {
+ free(ptr);
+ goto out;
+ }
+
+ loaded_file.data = ptr;
+ loaded_file.size = (unsigned int)filelen;
+out:
+ fclose(f);
+ return loaded_file;
+}
+
+static void unload_file(gnutls_datum_t data) {
+ free(data.data);
+}
+
+
+/* this function does a SSL/TLS (re-)handshake */
+static CURLcode handshake(struct connectdata *conn,
+ int sockindex,
+ bool duringconnect,
+ bool nonblocking)
+{
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ gnutls_session_t session = conn->ssl[sockindex].session;
+ curl_socket_t sockfd = conn->sock[sockindex];
+ long timeout_ms;
+ int rc;
+ int what;
+
+ for(;;) {
+ /* check allowed time left */
+ timeout_ms = Curl_timeleft(data, NULL, duringconnect);
+
+ if(timeout_ms < 0) {
+ /* no need to continue if time already is up */
+ failf(data, "SSL connection timeout");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ /* 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) {
+
+ curl_socket_t writefd = ssl_connect_2_writing==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+ curl_socket_t readfd = ssl_connect_2_reading==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+
+ what = Curl_socket_ready(readfd, writefd,
+ nonblocking?0:
+ timeout_ms?timeout_ms:1000);
+ if(what < 0) {
+ /* fatal error */
+ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ else if(0 == what) {
+ if(nonblocking)
+ return CURLE_OK;
+ else if(timeout_ms) {
+ /* timeout */
+ failf(data, "SSL connection timeout at %ld", timeout_ms);
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+ }
+ /* socket is readable or writable */
+ }
+
+ rc = gnutls_handshake(session);
+
+ if((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED)) {
+ connssl->connecting_state =
+ gnutls_record_get_direction(session)?
+ ssl_connect_2_writing:ssl_connect_2_reading;
+ continue;
+ }
+ else if((rc < 0) && !gnutls_error_is_fatal(rc)) {
+ const char *strerr = NULL;
+
+ if(rc == GNUTLS_E_WARNING_ALERT_RECEIVED) {
+ int alert = gnutls_alert_get(session);
+ strerr = gnutls_alert_get_name(alert);
+ }
+
+ if(strerr == NULL)
+ strerr = gnutls_strerror(rc);
+
+ infof(data, "gnutls_handshake() warning: %s\n", strerr);
+ continue;
+ }
+ else if(rc < 0) {
+ const char *strerr = NULL;
+
+ if(rc == GNUTLS_E_FATAL_ALERT_RECEIVED) {
+ int alert = gnutls_alert_get(session);
+ strerr = gnutls_alert_get_name(alert);
+ }
+
+ if(strerr == NULL)
+ strerr = gnutls_strerror(rc);
+
+ failf(data, "gnutls_handshake() failed: %s", strerr);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ /* Reset our connect state machine */
+ connssl->connecting_state = ssl_connect_1;
+ return CURLE_OK;
+ }
+}
+
+static gnutls_x509_crt_fmt_t do_file_type(const char *type)
+{
+ if(!type || !type[0])
+ return GNUTLS_X509_FMT_PEM;
+ if(Curl_raw_equal(type, "PEM"))
+ return GNUTLS_X509_FMT_PEM;
+ if(Curl_raw_equal(type, "DER"))
+ return GNUTLS_X509_FMT_DER;
+ return -1;
+}
+
+static CURLcode
+gtls_connect_step1(struct connectdata *conn,
+ int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ gnutls_session_t session;
+ int rc;
+ void *ssl_sessionid;
+ size_t ssl_idsize;
+ bool sni = TRUE; /* default is SNI enabled */
+#ifdef ENABLE_IPV6
+ struct in6_addr addr;
+#else
+ struct in_addr addr;
+#endif
+#ifndef USE_GNUTLS_PRIORITY_SET_DIRECT
+ static const int cipher_priority[] = {
+ /* These two ciphers were added to GnuTLS as late as ver. 3.0.1,
+ but this code path is only ever used for ver. < 2.12.0.
+ GNUTLS_CIPHER_AES_128_GCM,
+ GNUTLS_CIPHER_AES_256_GCM,
+ */
+ GNUTLS_CIPHER_AES_128_CBC,
+ GNUTLS_CIPHER_AES_256_CBC,
+ GNUTLS_CIPHER_CAMELLIA_128_CBC,
+ GNUTLS_CIPHER_CAMELLIA_256_CBC,
+ GNUTLS_CIPHER_3DES_CBC,
+ };
+ static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 };
+ static int protocol_priority[] = { 0, 0, 0, 0 };
+#else
+#define GNUTLS_CIPHERS "NORMAL:-ARCFOUR-128:-CTYPE-ALL:+CTYPE-X509"
+/* If GnuTLS was compiled without support for SRP it will error out if SRP is
+ requested in the priority string, so treat it specially
+ */
+#define GNUTLS_SRP "+SRP"
+ const char* prioritylist;
+ const char *err = NULL;
+#endif
+
+ if(conn->ssl[sockindex].state == ssl_connection_complete)
+ /* to make us tolerant against being called more than once for the
+ same connection */
+ return CURLE_OK;
+
+ if(!gtls_inited)
+ Curl_gtls_init();
+
+ /* GnuTLS only supports SSLv3 and TLSv1 */
+ if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) {
+ failf(data, "GnuTLS does not support SSLv2");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ else if(data->set.ssl.version == CURL_SSLVERSION_SSLv3)
+ sni = FALSE; /* SSLv3 has no SNI */
+
+ /* allocate a cred struct */
+ rc = gnutls_certificate_allocate_credentials(&conn->ssl[sockindex].cred);
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "gnutls_cert_all_cred() failed: %s", gnutls_strerror(rc));
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+#ifdef USE_TLS_SRP
+ if(data->set.ssl.authtype == CURL_TLSAUTH_SRP) {
+ infof(data, "Using TLS-SRP username: %s\n", data->set.ssl.username);
+
+ rc = gnutls_srp_allocate_client_credentials(
+ &conn->ssl[sockindex].srp_client_cred);
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "gnutls_srp_allocate_client_cred() failed: %s",
+ gnutls_strerror(rc));
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ rc = gnutls_srp_set_client_credentials(conn->ssl[sockindex].
+ srp_client_cred,
+ data->set.ssl.username,
+ data->set.ssl.password);
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "gnutls_srp_set_client_cred() failed: %s",
+ gnutls_strerror(rc));
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ }
+ }
+#endif
+
+ if(data->set.ssl.CAfile) {
+ /* set the trusted CA cert bundle file */
+ gnutls_certificate_set_verify_flags(conn->ssl[sockindex].cred,
+ GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
+
+ rc = gnutls_certificate_set_x509_trust_file(conn->ssl[sockindex].cred,
+ data->set.ssl.CAfile,
+ GNUTLS_X509_FMT_PEM);
+ if(rc < 0) {
+ infof(data, "error reading ca cert file %s (%s)\n",
+ data->set.ssl.CAfile, gnutls_strerror(rc));
+ if(data->set.ssl.verifypeer)
+ return CURLE_SSL_CACERT_BADFILE;
+ }
+ else
+ infof(data, "found %d certificates in %s\n",
+ rc, data->set.ssl.CAfile);
+ }
+
+#ifdef HAS_CAPATH
+ if(data->set.ssl.CApath) {
+ /* set the trusted CA cert directory */
+ rc = gnutls_certificate_set_x509_trust_dir(conn->ssl[sockindex].cred,
+ data->set.ssl.CApath,
+ GNUTLS_X509_FMT_PEM);
+ if(rc < 0) {
+ infof(data, "error reading ca cert file %s (%s)\n",
+ data->set.ssl.CAfile, gnutls_strerror(rc));
+ if(data->set.ssl.verifypeer)
+ return CURLE_SSL_CACERT_BADFILE;
+ }
+ else
+ infof(data, "found %d certificates in %s\n",
+ rc, data->set.ssl.CApath);
+ }
+#endif
+
+ if(data->set.ssl.CRLfile) {
+ /* set the CRL list file */
+ rc = gnutls_certificate_set_x509_crl_file(conn->ssl[sockindex].cred,
+ data->set.ssl.CRLfile,
+ GNUTLS_X509_FMT_PEM);
+ if(rc < 0) {
+ failf(data, "error reading crl file %s (%s)",
+ data->set.ssl.CRLfile, gnutls_strerror(rc));
+ return CURLE_SSL_CRL_BADFILE;
+ }
+ else
+ infof(data, "found %d CRL in %s\n",
+ rc, data->set.ssl.CRLfile);
+ }
+
+ /* Initialize TLS session as a client */
+ rc = gnutls_init(&conn->ssl[sockindex].session, GNUTLS_CLIENT);
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "gnutls_init() failed: %d", rc);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ /* convenient assign */
+ session = conn->ssl[sockindex].session;
+
+ if((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) &&
+#ifdef ENABLE_IPV6
+ (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) &&
+#endif
+ sni &&
+ (gnutls_server_name_set(session, GNUTLS_NAME_DNS, conn->host.name,
+ strlen(conn->host.name)) < 0))
+ infof(data, "WARNING: failed to configure server name indication (SNI) "
+ "TLS extension\n");
+
+ /* Use default priorities */
+ rc = gnutls_set_default_priority(session);
+ if(rc != GNUTLS_E_SUCCESS)
+ return CURLE_SSL_CONNECT_ERROR;
+
+#ifndef USE_GNUTLS_PRIORITY_SET_DIRECT
+ rc = gnutls_cipher_set_priority(session, cipher_priority);
+ if(rc != GNUTLS_E_SUCCESS)
+ return CURLE_SSL_CONNECT_ERROR;
+
+ /* Sets the priority on the certificate types supported by gnutls. Priority
+ is higher for types specified before others. After specifying the types
+ you want, you must append a 0. */
+ rc = gnutls_certificate_type_set_priority(session, cert_type_priority);
+ if(rc != GNUTLS_E_SUCCESS)
+ return CURLE_SSL_CONNECT_ERROR;
+
+ if(data->set.ssl.cipher_list != NULL) {
+ failf(data, "can't pass a custom cipher list to older GnuTLS"
+ " versions");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ switch (data->set.ssl.version) {
+ case CURL_SSLVERSION_SSLv3:
+ protocol_priority[0] = GNUTLS_SSL3;
+ break;
+ case CURL_SSLVERSION_DEFAULT:
+ case CURL_SSLVERSION_TLSv1:
+ protocol_priority[0] = GNUTLS_TLS1_0;
+ protocol_priority[1] = GNUTLS_TLS1_1;
+ protocol_priority[2] = GNUTLS_TLS1_2;
+ break;
+ case CURL_SSLVERSION_TLSv1_0:
+ protocol_priority[0] = GNUTLS_TLS1_0;
+ break;
+ case CURL_SSLVERSION_TLSv1_1:
+ protocol_priority[0] = GNUTLS_TLS1_1;
+ break;
+ case CURL_SSLVERSION_TLSv1_2:
+ protocol_priority[0] = GNUTLS_TLS1_2;
+ break;
+ case CURL_SSLVERSION_SSLv2:
+ default:
+ failf(data, "GnuTLS does not support SSLv2");
+ return CURLE_SSL_CONNECT_ERROR;
+ break;
+ }
+ rc = gnutls_protocol_set_priority(session, protocol_priority);
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "Did you pass a valid GnuTLS cipher list?");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+#else
+ /* Ensure +SRP comes at the *end* of all relevant strings so that it can be
+ * removed if a run-time error indicates that SRP is not supported by this
+ * GnuTLS version */
+ switch (data->set.ssl.version) {
+ case CURL_SSLVERSION_SSLv3:
+ prioritylist = GNUTLS_CIPHERS ":-VERS-TLS-ALL:+VERS-SSL3.0";
+ sni = false;
+ break;
+ case CURL_SSLVERSION_DEFAULT:
+ case CURL_SSLVERSION_TLSv1:
+ prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:" GNUTLS_SRP;
+ break;
+ case CURL_SSLVERSION_TLSv1_0:
+ prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
+ "+VERS-TLS1.0:" GNUTLS_SRP;
+ break;
+ case CURL_SSLVERSION_TLSv1_1:
+ prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
+ "+VERS-TLS1.1:" GNUTLS_SRP;
+ break;
+ case CURL_SSLVERSION_TLSv1_2:
+ prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
+ "+VERS-TLS1.2:" GNUTLS_SRP;
+ break;
+ case CURL_SSLVERSION_SSLv2:
+ default:
+ failf(data, "GnuTLS does not support SSLv2");
+ return CURLE_SSL_CONNECT_ERROR;
+ break;
+ }
+ rc = gnutls_priority_set_direct(session, prioritylist, &err);
+ if((rc == GNUTLS_E_INVALID_REQUEST) && err) {
+ if(!strcmp(err, GNUTLS_SRP)) {
+ /* This GnuTLS was probably compiled without support for SRP.
+ * Note that fact and try again without it. */
+ int validprioritylen = curlx_uztosi(err - prioritylist);
+ char *prioritycopy = strdup(prioritylist);
+ if(!prioritycopy)
+ return CURLE_OUT_OF_MEMORY;
+
+ infof(data, "This GnuTLS does not support SRP\n");
+ if(validprioritylen)
+ /* Remove the :+SRP */
+ prioritycopy[validprioritylen - 1] = 0;
+ rc = gnutls_priority_set_direct(session, prioritycopy, &err);
+ free(prioritycopy);
+ }
+ }
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "Error %d setting GnuTLS cipher list starting with %s",
+ rc, err);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+#endif
+
+#ifdef HAS_ALPN
+ if(data->set.ssl_enable_alpn) {
+ int cur = 0;
+ gnutls_datum_t protocols[2];
+
+#ifdef USE_NGHTTP2
+ if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ protocols[cur].data = (unsigned char *)NGHTTP2_PROTO_VERSION_ID;
+ protocols[cur].size = NGHTTP2_PROTO_VERSION_ID_LEN;
+ cur++;
+ infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
+ }
+#endif
+
+ protocols[cur].data = (unsigned char *)ALPN_HTTP_1_1;
+ protocols[cur].size = ALPN_HTTP_1_1_LENGTH;
+ cur++;
+ infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1);
+
+ gnutls_alpn_set_protocols(session, protocols, cur, 0);
+ }
+#endif
+
+ if(data->set.str[STRING_CERT]) {
+ if(gnutls_certificate_set_x509_key_file(
+ conn->ssl[sockindex].cred,
+ data->set.str[STRING_CERT],
+ data->set.str[STRING_KEY] ?
+ data->set.str[STRING_KEY] : data->set.str[STRING_CERT],
+ do_file_type(data->set.str[STRING_CERT_TYPE]) ) !=
+ GNUTLS_E_SUCCESS) {
+ failf(data, "error reading X.509 key or certificate file");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+
+#ifdef USE_TLS_SRP
+ /* put the credentials to the current session */
+ if(data->set.ssl.authtype == CURL_TLSAUTH_SRP) {
+ rc = gnutls_credentials_set(session, GNUTLS_CRD_SRP,
+ conn->ssl[sockindex].srp_client_cred);
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "gnutls_credentials_set() failed: %s", gnutls_strerror(rc));
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+ else
+#endif
+ {
+ rc = gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE,
+ conn->ssl[sockindex].cred);
+ if(rc != GNUTLS_E_SUCCESS) {
+ failf(data, "gnutls_credentials_set() failed: %s", gnutls_strerror(rc));
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+
+ /* set the connection handle (file descriptor for the socket) */
+ gnutls_transport_set_ptr(session,
+ GNUTLS_INT_TO_POINTER_CAST(conn->sock[sockindex]));
+
+ /* register callback functions to send and receive data. */
+ gnutls_transport_set_push_function(session, Curl_gtls_push);
+ gnutls_transport_set_pull_function(session, Curl_gtls_pull);
+
+ /* 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 */
+
+ if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, &ssl_idsize)) {
+ /* we got a session id, use it! */
+ gnutls_session_set_data(session, ssl_sessionid, ssl_idsize);
+
+ /* Informational message */
+ infof (data, "SSL re-using session ID\n");
+ }
+
+ 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;
+
+static CURLcode
+gtls_connect_step3(struct connectdata *conn,
+ int sockindex)
+{
+ unsigned int cert_list_size;
+ const gnutls_datum_t *chainp;
+ unsigned int verify_status = 0;
+ gnutls_x509_crt_t x509_cert, x509_issuer;
+ gnutls_datum_t issuerp;
+ char certbuf[256] = ""; /* big enough? */
+ size_t size;
+ unsigned int algo;
+ unsigned int bits;
+ time_t certclock;
+ const char *ptr;
+ struct SessionHandle *data = conn->data;
+ gnutls_session_t session = conn->ssl[sockindex].session;
+ int rc;
+ bool incache;
+ void *ssl_sessionid;
+#ifdef HAS_ALPN
+ gnutls_datum_t proto;
+#endif
+ CURLcode result = CURLE_OK;
+
+ gnutls_protocol_t version = gnutls_protocol_get_version(session);
+
+ /* the name of the cipher suite used, e.g. ECDHE_RSA_AES_256_GCM_SHA384. */
+ ptr = gnutls_cipher_suite_get_name(gnutls_kx_get(session),
+ gnutls_cipher_get(session),
+ gnutls_mac_get(session));
+
+ infof(data, "SSL connection using %s / %s\n",
+ gnutls_protocol_get_name(version), ptr);
+
+ /* This function will return the peer's raw certificate (chain) as sent by
+ the peer. These certificates are in raw format (DER encoded for
+ X.509). In case of a X.509 then a certificate list may be present. The
+ first certificate in the list is the peer's certificate, following the
+ issuer's certificate, then the issuer's issuer etc. */
+
+ chainp = gnutls_certificate_get_peers(session, &cert_list_size);
+ if(!chainp) {
+ if(data->set.ssl.verifypeer ||
+ data->set.ssl.verifyhost ||
+ data->set.ssl.issuercert) {
+#ifdef USE_TLS_SRP
+ if(data->set.ssl.authtype == CURL_TLSAUTH_SRP
+ && data->set.ssl.username != NULL
+ && !data->set.ssl.verifypeer
+ && gnutls_cipher_get(session)) {
+ /* no peer cert, but auth is ok if we have SRP user and cipher and no
+ peer verify */
+ }
+ else {
+#endif
+ failf(data, "failed to get server cert");
+ return CURLE_PEER_FAILED_VERIFICATION;
+#ifdef USE_TLS_SRP
+ }
+#endif
+ }
+ infof(data, "\t common name: WARNING couldn't obtain\n");
+ }
+
+ if(data->set.ssl.certinfo && chainp) {
+ unsigned int i;
+
+ result = Curl_ssl_init_certinfo(data, cert_list_size);
+ if(result)
+ return result;
+
+ for(i = 0; i < cert_list_size; i++) {
+ const char *beg = (const char *) chainp[i].data;
+ const char *end = beg + chainp[i].size;
+
+ result = Curl_extract_certinfo(conn, i, beg, end);
+ if(result)
+ return result;
+ }
+ }
+
+ if(data->set.ssl.verifypeer) {
+ /* This function will try to verify the peer's certificate and return its
+ status (trusted, invalid etc.). The value of status should be one or
+ more of the gnutls_certificate_status_t enumerated elements bitwise
+ or'd. To avoid denial of service attacks some default upper limits
+ regarding the certificate key size and chain size are set. To override
+ them use gnutls_certificate_set_verify_limits(). */
+
+ rc = gnutls_certificate_verify_peers2(session, &verify_status);
+ if(rc < 0) {
+ failf(data, "server cert verify failed: %d", rc);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ /* verify_status is a bitmask of gnutls_certificate_status bits */
+ if(verify_status & GNUTLS_CERT_INVALID) {
+ if(data->set.ssl.verifypeer) {
+ failf(data, "server certificate verification failed. CAfile: %s "
+ "CRLfile: %s", data->set.ssl.CAfile?data->set.ssl.CAfile:"none",
+ data->set.ssl.CRLfile?data->set.ssl.CRLfile:"none");
+ return CURLE_SSL_CACERT;
+ }
+ else
+ infof(data, "\t server certificate verification FAILED\n");
+ }
+ else
+ infof(data, "\t server certificate verification OK\n");
+ }
+ 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) {
+ gnutls_datum_t status_request;
+ gnutls_ocsp_resp_t ocsp_resp;
+
+ gnutls_ocsp_cert_status_t status;
+ gnutls_x509_crl_reason_t reason;
+
+ rc = gnutls_ocsp_status_request_get(session, &status_request);
+
+ infof(data, "\t server certificate status verification FAILED\n");
+
+ if(rc == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
+ failf(data, "No OCSP response received");
+ return CURLE_SSL_INVALIDCERTSTATUS;
+ }
+
+ if(rc < 0) {
+ failf(data, "Invalid OCSP response received");
+ return CURLE_SSL_INVALIDCERTSTATUS;
+ }
+
+ gnutls_ocsp_resp_init(&ocsp_resp);
+
+ rc = gnutls_ocsp_resp_import(ocsp_resp, &status_request);
+ if(rc < 0) {
+ failf(data, "Invalid OCSP response received");
+ return CURLE_SSL_INVALIDCERTSTATUS;
+ }
+
+ rc = gnutls_ocsp_resp_get_single(ocsp_resp, 0, NULL, NULL, NULL, NULL,
+ &status, NULL, NULL, NULL, &reason);
+
+ switch(status) {
+ case GNUTLS_OCSP_CERT_GOOD:
+ break;
+
+ case GNUTLS_OCSP_CERT_REVOKED: {
+ const char *crl_reason;
+
+ switch(reason) {
+ default:
+ case GNUTLS_X509_CRLREASON_UNSPECIFIED:
+ crl_reason = "unspecified reason";
+ break;
+
+ case GNUTLS_X509_CRLREASON_KEYCOMPROMISE:
+ crl_reason = "private key compromised";
+ break;
+
+ case GNUTLS_X509_CRLREASON_CACOMPROMISE:
+ crl_reason = "CA compromised";
+ break;
+
+ case GNUTLS_X509_CRLREASON_AFFILIATIONCHANGED:
+ crl_reason = "affiliation has changed";
+ break;
+
+ case GNUTLS_X509_CRLREASON_SUPERSEDED:
+ crl_reason = "certificate superseded";
+ break;
+
+ case GNUTLS_X509_CRLREASON_CESSATIONOFOPERATION:
+ crl_reason = "operation has ceased";
+ break;
+
+ case GNUTLS_X509_CRLREASON_CERTIFICATEHOLD:
+ crl_reason = "certificate is on hold";
+ break;
+
+ case GNUTLS_X509_CRLREASON_REMOVEFROMCRL:
+ crl_reason = "will be removed from delta CRL";
+ break;
+
+ case GNUTLS_X509_CRLREASON_PRIVILEGEWITHDRAWN:
+ crl_reason = "privilege withdrawn";
+ break;
+
+ case GNUTLS_X509_CRLREASON_AACOMPROMISE:
+ crl_reason = "AA compromised";
+ break;
+ }
+
+ failf(data, "Server certificate was revoked: %s", crl_reason);
+ break;
+ }
+
+ default:
+ case GNUTLS_OCSP_CERT_UNKNOWN:
+ failf(data, "Server certificate status is unknown");
+ break;
+ }
+
+ gnutls_ocsp_resp_deinit(ocsp_resp);
+
+ return CURLE_SSL_INVALIDCERTSTATUS;
+ }
+ else
+ infof(data, "\t server certificate status verification OK\n");
+ }
+ else
+ infof(data, "\t server certificate status verification SKIPPED\n");
+#endif
+
+ /* initialize an X.509 certificate structure. */
+ gnutls_x509_crt_init(&x509_cert);
+
+ if(chainp)
+ /* convert the given DER or PEM encoded Certificate to the native
+ gnutls_x509_crt_t format */
+ gnutls_x509_crt_import(x509_cert, chainp, GNUTLS_X509_FMT_DER);
+
+ if(data->set.ssl.issuercert) {
+ gnutls_x509_crt_init(&x509_issuer);
+ 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",
+ data->set.ssl.issuercert?data->set.ssl.issuercert:"none");
+ }
+
+ size=sizeof(certbuf);
+ rc = gnutls_x509_crt_get_dn_by_oid(x509_cert, GNUTLS_OID_X520_COMMON_NAME,
+ 0, /* the first and only one */
+ FALSE,
+ certbuf,
+ &size);
+ if(rc) {
+ infof(data, "error fetching CN from cert:%s\n",
+ gnutls_strerror(rc));
+ }
+
+ /* This function will check if the given certificate's subject matches the
+ given hostname. This is a basic implementation of the matching described
+ in RFC2818 (HTTPS), which takes into account wildcards, and the subject
+ alternative name PKIX extension. Returns non zero on success, and zero on
+ failure. */
+ rc = gnutls_x509_crt_check_hostname(x509_cert, conn->host.name);
+#if GNUTLS_VERSION_NUMBER < 0x030306
+ /* Before 3.3.6, gnutls_x509_crt_check_hostname() didn't check IP
+ addresses. */
+ if(!rc) {
+#ifdef ENABLE_IPV6
+ #define use_addr in6_addr
+#else
+ #define use_addr in_addr
+#endif
+ unsigned char addrbuf[sizeof(struct use_addr)];
+ unsigned char certaddr[sizeof(struct use_addr)];
+ size_t addrlen = 0, certaddrlen;
+ int i;
+ int ret = 0;
+
+ if(Curl_inet_pton(AF_INET, conn->host.name, addrbuf) > 0)
+ addrlen = 4;
+#ifdef ENABLE_IPV6
+ else if(Curl_inet_pton(AF_INET6, conn->host.name, addrbuf) > 0)
+ addrlen = 16;
+#endif
+
+ if(addrlen) {
+ for(i=0; ; i++) {
+ certaddrlen = sizeof(certaddr);
+ ret = gnutls_x509_crt_get_subject_alt_name(x509_cert, i, certaddr,
+ &certaddrlen, NULL);
+ /* If this happens, it wasn't an IP address. */
+ if(ret == GNUTLS_E_SHORT_MEMORY_BUFFER)
+ continue;
+ if(ret < 0)
+ break;
+ if(ret != GNUTLS_SAN_IPADDRESS)
+ continue;
+ if(certaddrlen == addrlen && !memcmp(addrbuf, certaddr, addrlen)) {
+ rc = 1;
+ break;
+ }
+ }
+ }
+ }
+#endif
+ if(!rc) {
+ if(data->set.ssl.verifyhost) {
+ failf(data, "SSL: certificate subject name (%s) does not match "
+ "target host name '%s'", certbuf, conn->host.dispname);
+ gnutls_x509_crt_deinit(x509_cert);
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+ else
+ infof(data, "\t common name: %s (does not match '%s')\n",
+ certbuf, conn->host.dispname);
+ }
+ else
+ infof(data, "\t common name: %s (matched)\n", certbuf);
+
+ /* Check for time-based validity */
+ certclock = gnutls_x509_crt_get_expiration_time(x509_cert);
+
+ 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
+ infof(data, "\t server certificate expiration date verify FAILED\n");
+ }
+ else {
+ 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
+ infof(data, "\t server certificate expiration date FAILED\n");
+ }
+ else
+ infof(data, "\t server certificate expiration date OK\n");
+ }
+
+ certclock = gnutls_x509_crt_get_activation_time(x509_cert);
+
+ 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
+ infof(data, "\t server certificate activation date verify FAILED\n");
+ }
+ else {
+ 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
+ infof(data, "\t server certificate activation date FAILED\n");
+ }
+ else
+ 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:
+
+ - subject
+ - start date
+ - expire date
+ - common name
+ - issuer
+
+ */
+
+ /* public key algorithm's parameters */
+ algo = gnutls_x509_crt_get_pk_algorithm(x509_cert, &bits);
+ infof(data, "\t certificate public key: %s\n",
+ gnutls_pk_algorithm_get_name(algo));
+
+ /* version of the X.509 certificate. */
+ infof(data, "\t certificate version: #%d\n",
+ gnutls_x509_crt_get_version(x509_cert));
+
+
+ size = sizeof(certbuf);
+ gnutls_x509_crt_get_dn(x509_cert, certbuf, &size);
+ infof(data, "\t subject: %s\n", certbuf);
+
+ certclock = gnutls_x509_crt_get_activation_time(x509_cert);
+ showtime(data, "start date", certclock);
+
+ certclock = gnutls_x509_crt_get_expiration_time(x509_cert);
+ showtime(data, "expire date", certclock);
+
+ size = sizeof(certbuf);
+ gnutls_x509_crt_get_issuer_dn(x509_cert, certbuf, &size);
+ infof(data, "\t issuer: %s\n", certbuf);
+
+ gnutls_x509_crt_deinit(x509_cert);
+
+ /* compression algorithm (if any) */
+ ptr = gnutls_compression_get_name(gnutls_compression_get(session));
+ /* the *_get_name() says "NULL" if GNUTLS_COMP_NULL is returned */
+ infof(data, "\t compression: %s\n", ptr);
+
+#ifdef HAS_ALPN
+ if(data->set.ssl_enable_alpn) {
+ rc = gnutls_alpn_get_selected_protocol(session, &proto);
+ if(rc == 0) {
+ infof(data, "ALPN, server accepted to use %.*s\n", proto.size,
+ proto.data);
+
+#ifdef USE_NGHTTP2
+ if(proto.size == NGHTTP2_PROTO_VERSION_ID_LEN &&
+ !memcmp(NGHTTP2_PROTO_VERSION_ID, proto.data,
+ NGHTTP2_PROTO_VERSION_ID_LEN)) {
+ conn->negnpn = CURL_HTTP_VERSION_2_0;
+ }
+ else
+#endif
+ if(proto.size == ALPN_HTTP_1_1_LENGTH &&
+ !memcmp(ALPN_HTTP_1_1, proto.data, ALPN_HTTP_1_1_LENGTH)) {
+ conn->negnpn = CURL_HTTP_VERSION_1_1;
+ }
+ }
+ else
+ infof(data, "ALPN, server did not agree to a protocol\n");
+ }
+#endif
+
+ conn->ssl[sockindex].state = ssl_connection_complete;
+ conn->recv[sockindex] = gtls_recv;
+ conn->send[sockindex] = gtls_send;
+
+ {
+ /* we always unconditionally get the session id here, as even if we
+ already got it from the cache and asked to use it in the connection, it
+ might've been rejected and then a new one is in use now and we need to
+ detect that. */
+ void *connect_sessionid;
+ size_t connect_idsize = 0;
+
+ /* get the session ID data size */
+ gnutls_session_get_data(session, NULL, &connect_idsize);
+ connect_sessionid = malloc(connect_idsize); /* get a buffer for it */
+
+ if(connect_sessionid) {
+ /* extract session ID to the allocated buffer */
+ gnutls_session_get_data(session, connect_sessionid, &connect_idsize);
+
+ incache = !(Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL));
+ if(incache) {
+ /* there was one before in the cache, so instead of risking that the
+ previous one was rejected, we just kill that and store the new */
+ Curl_ssl_delsessionid(conn, ssl_sessionid);
+ }
+
+ /* store this session id */
+ result = Curl_ssl_addsessionid(conn, connect_sessionid, connect_idsize);
+ if(result) {
+ free(connect_sessionid);
+ result = CURLE_OUT_OF_MEMORY;
+ }
+ }
+ else
+ result = CURLE_OUT_OF_MEMORY;
+ }
+
+ return result;
+}
+
+
+/*
+ * This function is called after the TCP connect has completed. Setup the TLS
+ * layer and do all necessary magic.
+ */
+/* We use connssl->connecting_state to keep track of the connection status;
+ there are three states: 'ssl_connect_1' (not started yet or complete),
+ 'ssl_connect_2_reading' (waiting for data from server), and
+ 'ssl_connect_2_writing' (waiting to be able to write).
+ */
+static CURLcode
+gtls_connect_common(struct connectdata *conn,
+ int sockindex,
+ bool nonblocking,
+ bool *done)
+{
+ int rc;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ /* Initiate the connection, if not already done */
+ if(ssl_connect_1==connssl->connecting_state) {
+ rc = gtls_connect_step1 (conn, sockindex);
+ if(rc)
+ return rc;
+ }
+
+ rc = handshake(conn, sockindex, TRUE, nonblocking);
+ if(rc)
+ /* handshake() sets its own error message with failf() */
+ return rc;
+
+ /* Finish connecting once the handshake is done */
+ if(ssl_connect_1==connssl->connecting_state) {
+ rc = gtls_connect_step3(conn, sockindex);
+ if(rc)
+ return rc;
+ }
+
+ *done = ssl_connect_1==connssl->connecting_state;
+
+ return CURLE_OK;
+}
+
+CURLcode
+Curl_gtls_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done)
+{
+ return gtls_connect_common(conn, sockindex, TRUE, done);
+}
+
+CURLcode
+Curl_gtls_connect(struct connectdata *conn,
+ int sockindex)
+
+{
+ CURLcode result;
+ bool done = FALSE;
+
+ result = gtls_connect_common(conn, sockindex, FALSE, &done);
+ if(result)
+ return result;
+
+ DEBUGASSERT(done);
+
+ return CURLE_OK;
+}
+
+static ssize_t gtls_send(struct connectdata *conn,
+ int sockindex,
+ const void *mem,
+ size_t len,
+ CURLcode *curlcode)
+{
+ ssize_t rc = gnutls_record_send(conn->ssl[sockindex].session, mem, len);
+
+ if(rc < 0 ) {
+ *curlcode = (rc == GNUTLS_E_AGAIN)
+ ? CURLE_AGAIN
+ : CURLE_SEND_ERROR;
+
+ rc = -1;
+ }
+
+ return rc;
+}
+
+static void close_one(struct connectdata *conn,
+ int idx)
+{
+ if(conn->ssl[idx].session) {
+ gnutls_bye(conn->ssl[idx].session, GNUTLS_SHUT_RDWR);
+ gnutls_deinit(conn->ssl[idx].session);
+ conn->ssl[idx].session = NULL;
+ }
+ if(conn->ssl[idx].cred) {
+ gnutls_certificate_free_credentials(conn->ssl[idx].cred);
+ conn->ssl[idx].cred = NULL;
+ }
+#ifdef USE_TLS_SRP
+ if(conn->ssl[idx].srp_client_cred) {
+ gnutls_srp_free_client_credentials(conn->ssl[idx].srp_client_cred);
+ conn->ssl[idx].srp_client_cred = NULL;
+ }
+#endif
+}
+
+void Curl_gtls_close(struct connectdata *conn, int sockindex)
+{
+ close_one(conn, sockindex);
+}
+
+/*
+ * This function is called to shut down the SSL layer but keep the
+ * socket open (CCC - Clear Command Channel)
+ */
+int Curl_gtls_shutdown(struct connectdata *conn, int sockindex)
+{
+ ssize_t result;
+ int retval = 0;
+ struct SessionHandle *data = conn->data;
+ int done = 0;
+ char buf[120];
+
+ /* This has only been tested on the proftpd server, and the mod_tls code
+ sends a close notify alert without waiting for a close notify alert in
+ response. Thus we wait for a close notify alert from the server, but
+ we do not send one. Let's hope other servers do the same... */
+
+ if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE)
+ gnutls_bye(conn->ssl[sockindex].session, GNUTLS_SHUT_WR);
+
+ if(conn->ssl[sockindex].session) {
+ while(!done) {
+ int what = Curl_socket_ready(conn->sock[sockindex],
+ CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
+ if(what > 0) {
+ /* Something to read, let's do it and hope that it is the close
+ notify alert from the server */
+ result = gnutls_record_recv(conn->ssl[sockindex].session,
+ buf, sizeof(buf));
+ switch(result) {
+ case 0:
+ /* This is the expected response. There was no data but only
+ the close notify alert */
+ done = 1;
+ break;
+ case GNUTLS_E_AGAIN:
+ case GNUTLS_E_INTERRUPTED:
+ infof(data, "GNUTLS_E_AGAIN || GNUTLS_E_INTERRUPTED\n");
+ break;
+ default:
+ retval = -1;
+ done = 1;
+ break;
+ }
+ }
+ else if(0 == what) {
+ /* timeout */
+ failf(data, "SSL shutdown timeout");
+ done = 1;
+ break;
+ }
+ else {
+ /* anything that gets here is fatally bad */
+ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+ retval = -1;
+ done = 1;
+ }
+ }
+ gnutls_deinit(conn->ssl[sockindex].session);
+ }
+ gnutls_certificate_free_credentials(conn->ssl[sockindex].cred);
+
+#ifdef USE_TLS_SRP
+ if(data->set.ssl.authtype == CURL_TLSAUTH_SRP
+ && data->set.ssl.username != NULL)
+ gnutls_srp_free_client_credentials(conn->ssl[sockindex].srp_client_cred);
+#endif
+
+ conn->ssl[sockindex].cred = NULL;
+ conn->ssl[sockindex].session = NULL;
+
+ return retval;
+}
+
+static ssize_t gtls_recv(struct connectdata *conn, /* connection data */
+ int num, /* socketindex */
+ char *buf, /* store read data here */
+ size_t buffersize, /* max amount to read */
+ CURLcode *curlcode)
+{
+ ssize_t ret;
+
+ ret = gnutls_record_recv(conn->ssl[num].session, buf, buffersize);
+ if((ret == GNUTLS_E_AGAIN) || (ret == GNUTLS_E_INTERRUPTED)) {
+ *curlcode = CURLE_AGAIN;
+ return -1;
+ }
+
+ 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)
+ /* handshake() writes error message on its own */
+ *curlcode = result;
+ else
+ *curlcode = CURLE_AGAIN; /* then return as if this was a wouldblock */
+ return -1;
+ }
+
+ if(ret < 0) {
+ failf(conn->data, "GnuTLS recv error (%d): %s",
+ (int)ret, gnutls_strerror((int)ret));
+ *curlcode = CURLE_RECV_ERROR;
+ return -1;
+ }
+
+ return ret;
+}
+
+void Curl_gtls_session_free(void *ptr)
+{
+ free(ptr);
+}
+
+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)
+{
+ /* 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 */
+ gcry_fast_random_poll();
+
+ if(!ssl_seeded || data->set.str[STRING_SSL_RANDOM_FILE] ||
+ data->set.str[STRING_SSL_EGDSOCKET]) {
+
+ /* TODO: to a good job seeding the RNG
+ This may involve the gcry_control function and these options:
+ GCRYCTL_SET_RANDOM_SEED_FILE
+ GCRYCTL_SET_RNDEGD_SOCKET
+ */
+ ssl_seeded = TRUE;
+ }
+ return 0;
+}
+#endif
+
+/* data might be NULL! */
+int 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 */
+ gcry_randomize(entropy, length, GCRY_STRONG_RANDOM);
+#endif
+ return 0;
+}
+
+void Curl_gtls_md5sum(unsigned char *tmp, /* input */
+ size_t tmplen,
+ unsigned char *md5sum, /* output */
+ size_t md5len)
+{
+#if defined(USE_GNUTLS_NETTLE)
+ struct md5_ctx MD5pw;
+ md5_init(&MD5pw);
+ md5_update(&MD5pw, (unsigned int)tmplen, tmp);
+ md5_digest(&MD5pw, (unsigned int)md5len, md5sum);
+#elif defined(USE_GNUTLS)
+ gcry_md_hd_t MD5pw;
+ gcry_md_open(&MD5pw, GCRY_MD_MD5, 0);
+ gcry_md_write(MD5pw, tmp, tmplen);
+ memcpy(md5sum, gcry_md_read (MD5pw, 0), md5len);
+ gcry_md_close(MD5pw);
+#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
new file mode 100644
index 00000000..dcae4422
--- /dev/null
+++ b/lib/vtls/gtls.h
@@ -0,0 +1,83 @@
+#ifndef HEADER_CURL_GTLS_H
+#define HEADER_CURL_GTLS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_GNUTLS
+
+#include "urldata.h"
+
+int Curl_gtls_init(void);
+int Curl_gtls_cleanup(void);
+CURLcode Curl_gtls_connect(struct connectdata *conn, int sockindex);
+CURLcode Curl_gtls_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done);
+
+ /* close a SSL connection */
+void Curl_gtls_close(struct connectdata *conn, int sockindex);
+
+void Curl_gtls_session_free(void *ptr);
+size_t Curl_gtls_version(char *buffer, size_t size);
+int Curl_gtls_shutdown(struct connectdata *conn, int sockindex);
+int 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);
+
+/* Set the API backend definition to GnuTLS */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_GNUTLS
+
+/* this backend supports the CAPATH option */
+#define have_curlssl_ca_path 1
+
+/* this backend supports CURLOPT_CERTINFO */
+#define have_curlssl_certinfo 1
+
+/* API setup for GnuTLS */
+#define curlssl_init Curl_gtls_init
+#define curlssl_cleanup Curl_gtls_cleanup
+#define curlssl_connect Curl_gtls_connect
+#define curlssl_connect_nonblocking Curl_gtls_connect_nonblocking
+#define curlssl_session_free(x) Curl_gtls_session_free(x)
+#define curlssl_close_all(x) ((void)x)
+#define curlssl_close Curl_gtls_close
+#define curlssl_shutdown(x,y) Curl_gtls_shutdown(x,y)
+#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_gtls_version
+#define curlssl_check_cxn(x) ((void)x, -1)
+#define curlssl_data_pending(x,y) ((void)x, (void)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()
+
+#endif /* USE_GNUTLS */
+#endif /* HEADER_CURL_GTLS_H */
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
new file mode 100644
index 00000000..5434ce38
--- /dev/null
+++ b/lib/vtls/nss.c
@@ -0,0 +1,2061 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all NSS-specific code for the TLS/SSL layer. No code
+ * but vtls.c should ever call or use these functions.
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_NSS
+
+#include "urldata.h"
+#include "sendf.h"
+#include "formdata.h" /* for the boundary function */
+#include "url.h" /* for the ssl config check function */
+#include "connect.h"
+#include "strequal.h"
+#include "select.h"
+#include "vtls.h"
+#include "llist.h"
+#include "curl_printf.h"
+#include "nssg.h"
+#include <nspr.h>
+#include <nss.h>
+#include <ssl.h>
+#include <sslerr.h>
+#include <secerr.h>
+#include <secmod.h>
+#include <sslproto.h>
+#include <prtypes.h>
+#include <pk11pub.h>
+#include <prio.h>
+#include <secitem.h>
+#include <secport.h>
+#include <certdb.h>
+#include <base64.h>
+#include <cert.h>
+#include <prerror.h>
+#include <keyhi.h> /* for SECKEY_DestroyPublicKey() */
+
+#define NSSVERNUM ((NSS_VMAJOR<<16)|(NSS_VMINOR<<8)|NSS_VPATCH)
+
+#if NSSVERNUM >= 0x030f00 /* 3.15.0 */
+#include <ocsp.h>
+#endif
+
+#include "rawstr.h"
+#include "warnless.h"
+#include "x509asn1.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#define SSL_DIR "/etc/pki/nssdb"
+
+/* enough to fit the string "PEM Token #[0|1]" */
+#define SLOTSIZE 13
+
+PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd);
+
+PRLock * nss_initlock = NULL;
+PRLock * nss_crllock = NULL;
+struct curl_llist *nss_crl_list = NULL;
+NSSInitContext * nss_context = NULL;
+
+volatile int initialized = 0;
+
+typedef struct {
+ const char *name;
+ int num;
+} cipher_s;
+
+#define PK11_SETATTRS(_attr, _idx, _type, _val, _len) do { \
+ CK_ATTRIBUTE *ptr = (_attr) + ((_idx)++); \
+ ptr->type = (_type); \
+ ptr->pValue = (_val); \
+ ptr->ulValueLen = (_len); \
+} WHILE_FALSE
+
+#define CERT_NewTempCertificate __CERT_NewTempCertificate
+
+#define NUM_OF_CIPHERS sizeof(cipherlist)/sizeof(cipherlist[0])
+static const cipher_s cipherlist[] = {
+ /* SSL2 cipher suites */
+ {"rc4", SSL_EN_RC4_128_WITH_MD5},
+ {"rc4-md5", SSL_EN_RC4_128_WITH_MD5},
+ {"rc4export", SSL_EN_RC4_128_EXPORT40_WITH_MD5},
+ {"rc2", SSL_EN_RC2_128_CBC_WITH_MD5},
+ {"rc2export", SSL_EN_RC2_128_CBC_EXPORT40_WITH_MD5},
+ {"des", SSL_EN_DES_64_CBC_WITH_MD5},
+ {"desede3", SSL_EN_DES_192_EDE3_CBC_WITH_MD5},
+ /* SSL3/TLS cipher suites */
+ {"rsa_rc4_128_md5", SSL_RSA_WITH_RC4_128_MD5},
+ {"rsa_rc4_128_sha", SSL_RSA_WITH_RC4_128_SHA},
+ {"rsa_3des_sha", SSL_RSA_WITH_3DES_EDE_CBC_SHA},
+ {"rsa_des_sha", SSL_RSA_WITH_DES_CBC_SHA},
+ {"rsa_rc4_40_md5", SSL_RSA_EXPORT_WITH_RC4_40_MD5},
+ {"rsa_rc2_40_md5", SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5},
+ {"rsa_null_md5", SSL_RSA_WITH_NULL_MD5},
+ {"rsa_null_sha", SSL_RSA_WITH_NULL_SHA},
+ {"fips_3des_sha", SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA},
+ {"fips_des_sha", SSL_RSA_FIPS_WITH_DES_CBC_SHA},
+ {"fortezza", SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA},
+ {"fortezza_rc4_128_sha", SSL_FORTEZZA_DMS_WITH_RC4_128_SHA},
+ {"fortezza_null", SSL_FORTEZZA_DMS_WITH_NULL_SHA},
+ /* TLS 1.0: Exportable 56-bit Cipher Suites. */
+ {"rsa_des_56_sha", TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA},
+ {"rsa_rc4_56_sha", TLS_RSA_EXPORT1024_WITH_RC4_56_SHA},
+ /* AES ciphers. */
+ {"dhe_dss_aes_128_cbc_sha", TLS_DHE_DSS_WITH_AES_128_CBC_SHA},
+ {"dhe_dss_aes_256_cbc_sha", TLS_DHE_DSS_WITH_AES_256_CBC_SHA},
+ {"dhe_rsa_aes_128_cbc_sha", TLS_DHE_RSA_WITH_AES_128_CBC_SHA},
+ {"dhe_rsa_aes_256_cbc_sha", TLS_DHE_RSA_WITH_AES_256_CBC_SHA},
+ {"rsa_aes_128_sha", TLS_RSA_WITH_AES_128_CBC_SHA},
+ {"rsa_aes_256_sha", TLS_RSA_WITH_AES_256_CBC_SHA},
+ /* ECC ciphers. */
+ {"ecdh_ecdsa_null_sha", TLS_ECDH_ECDSA_WITH_NULL_SHA},
+ {"ecdh_ecdsa_rc4_128_sha", TLS_ECDH_ECDSA_WITH_RC4_128_SHA},
+ {"ecdh_ecdsa_3des_sha", TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA},
+ {"ecdh_ecdsa_aes_128_sha", TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA},
+ {"ecdh_ecdsa_aes_256_sha", TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA},
+ {"ecdhe_ecdsa_null_sha", TLS_ECDHE_ECDSA_WITH_NULL_SHA},
+ {"ecdhe_ecdsa_rc4_128_sha", TLS_ECDHE_ECDSA_WITH_RC4_128_SHA},
+ {"ecdhe_ecdsa_3des_sha", TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA},
+ {"ecdhe_ecdsa_aes_128_sha", TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA},
+ {"ecdhe_ecdsa_aes_256_sha", TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA},
+ {"ecdh_rsa_null_sha", TLS_ECDH_RSA_WITH_NULL_SHA},
+ {"ecdh_rsa_128_sha", TLS_ECDH_RSA_WITH_RC4_128_SHA},
+ {"ecdh_rsa_3des_sha", TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA},
+ {"ecdh_rsa_aes_128_sha", TLS_ECDH_RSA_WITH_AES_128_CBC_SHA},
+ {"ecdh_rsa_aes_256_sha", TLS_ECDH_RSA_WITH_AES_256_CBC_SHA},
+ {"echde_rsa_null", TLS_ECDHE_RSA_WITH_NULL_SHA},
+ {"ecdhe_rsa_rc4_128_sha", TLS_ECDHE_RSA_WITH_RC4_128_SHA},
+ {"ecdhe_rsa_3des_sha", TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA},
+ {"ecdhe_rsa_aes_128_sha", TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA},
+ {"ecdhe_rsa_aes_256_sha", TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA},
+ {"ecdh_anon_null_sha", TLS_ECDH_anon_WITH_NULL_SHA},
+ {"ecdh_anon_rc4_128sha", TLS_ECDH_anon_WITH_RC4_128_SHA},
+ {"ecdh_anon_3des_sha", TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA},
+ {"ecdh_anon_aes_128_sha", TLS_ECDH_anon_WITH_AES_128_CBC_SHA},
+ {"ecdh_anon_aes_256_sha", TLS_ECDH_anon_WITH_AES_256_CBC_SHA},
+#ifdef TLS_RSA_WITH_NULL_SHA256
+ /* new HMAC-SHA256 cipher suites specified in RFC */
+ {"rsa_null_sha_256", TLS_RSA_WITH_NULL_SHA256},
+ {"rsa_aes_128_cbc_sha_256", TLS_RSA_WITH_AES_128_CBC_SHA256},
+ {"rsa_aes_256_cbc_sha_256", TLS_RSA_WITH_AES_256_CBC_SHA256},
+ {"dhe_rsa_aes_128_cbc_sha_256", TLS_DHE_RSA_WITH_AES_128_CBC_SHA256},
+ {"dhe_rsa_aes_256_cbc_sha_256", TLS_DHE_RSA_WITH_AES_256_CBC_SHA256},
+ {"ecdhe_ecdsa_aes_128_cbc_sha_256", TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256},
+ {"ecdhe_rsa_aes_128_cbc_sha_256", TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256},
+#endif
+#ifdef TLS_RSA_WITH_AES_128_GCM_SHA256
+ /* AES GCM cipher suites in RFC 5288 and RFC 5289 */
+ {"rsa_aes_128_gcm_sha_256", TLS_RSA_WITH_AES_128_GCM_SHA256},
+ {"dhe_rsa_aes_128_gcm_sha_256", TLS_DHE_RSA_WITH_AES_128_GCM_SHA256},
+ {"dhe_dss_aes_128_gcm_sha_256", TLS_DHE_DSS_WITH_AES_128_GCM_SHA256},
+ {"ecdhe_ecdsa_aes_128_gcm_sha_256", TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256},
+ {"ecdh_ecdsa_aes_128_gcm_sha_256", TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256},
+ {"ecdhe_rsa_aes_128_gcm_sha_256", TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
+ {"ecdh_rsa_aes_128_gcm_sha_256", TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256},
+#endif
+};
+
+static const char* pem_library = "libnsspem.so";
+SECMODModule* mod = NULL;
+
+/* NSPR I/O layer we use to detect blocking direction during SSL handshake */
+static PRDescIdentity nspr_io_identity = PR_INVALID_IO_LAYER;
+static PRIOMethods nspr_io_methods;
+
+static const char* nss_error_to_name(PRErrorCode code)
+{
+ const char *name = PR_ErrorToName(code);
+ if(name)
+ return name;
+
+ return "unknown error";
+}
+
+static void nss_print_error_message(struct SessionHandle *data, PRUint32 err)
+{
+ failf(data, "%s", PR_ErrorToString(err, PR_LANGUAGE_I_DEFAULT));
+}
+
+static SECStatus set_ciphers(struct SessionHandle *data, PRFileDesc * model,
+ char *cipher_list)
+{
+ unsigned int i;
+ PRBool cipher_state[NUM_OF_CIPHERS];
+ PRBool found;
+ char *cipher;
+
+ /* First disable all ciphers. This uses a different max value in case
+ * NSS adds more ciphers later we don't want them available by
+ * accident
+ */
+ for(i=0; i<SSL_NumImplementedCiphers; i++) {
+ SSL_CipherPrefSet(model, SSL_ImplementedCiphers[i], PR_FALSE);
+ }
+
+ /* Set every entry in our list to false */
+ for(i=0; i<NUM_OF_CIPHERS; i++) {
+ cipher_state[i] = PR_FALSE;
+ }
+
+ cipher = cipher_list;
+
+ while(cipher_list && (cipher_list[0])) {
+ while((*cipher) && (ISSPACE(*cipher)))
+ ++cipher;
+
+ if((cipher_list = strchr(cipher, ','))) {
+ *cipher_list++ = '\0';
+ }
+
+ found = PR_FALSE;
+
+ for(i=0; i<NUM_OF_CIPHERS; i++) {
+ if(Curl_raw_equal(cipher, cipherlist[i].name)) {
+ cipher_state[i] = PR_TRUE;
+ found = PR_TRUE;
+ break;
+ }
+ }
+
+ if(found == PR_FALSE) {
+ failf(data, "Unknown cipher in list: %s", cipher);
+ return SECFailure;
+ }
+
+ if(cipher_list) {
+ cipher = cipher_list;
+ }
+ }
+
+ /* Finally actually enable the selected ciphers */
+ for(i=0; i<NUM_OF_CIPHERS; i++) {
+ if(!cipher_state[i])
+ continue;
+
+ if(SSL_CipherPrefSet(model, cipherlist[i].num, PR_TRUE) != SECSuccess) {
+ failf(data, "cipher-suite not supported by NSS: %s", cipherlist[i].name);
+ return SECFailure;
+ }
+ }
+
+ return SECSuccess;
+}
+
+/*
+ * Get the number of ciphers that are enabled. We use this to determine
+ * if we need to call NSS_SetDomesticPolicy() to enable the default ciphers.
+ */
+static int num_enabled_ciphers(void)
+{
+ PRInt32 policy = 0;
+ int count = 0;
+ unsigned int i;
+
+ for(i=0; i<NUM_OF_CIPHERS; i++) {
+ SSL_CipherPolicyGet(cipherlist[i].num, &policy);
+ if(policy)
+ count++;
+ }
+ return count;
+}
+
+/*
+ * Determine whether the nickname passed in is a filename that needs to
+ * be loaded as a PEM or a regular NSS nickname.
+ *
+ * returns 1 for a file
+ * returns 0 for not a file (NSS nickname)
+ */
+static int is_file(const char *filename)
+{
+ struct_stat st;
+
+ if(filename == NULL)
+ return 0;
+
+ if(stat(filename, &st) == 0)
+ if(S_ISREG(st.st_mode))
+ return 1;
+
+ return 0;
+}
+
+/* Check if the given string is filename or nickname of a certificate. If the
+ * given string is recognized as filename, return NULL. If the given string is
+ * recognized as nickname, return a duplicated string. The returned string
+ * should be later deallocated using free(). If the OOM failure occurs, we
+ * return NULL, too.
+ */
+static char* dup_nickname(struct SessionHandle *data, enum dupstring cert_kind)
+{
+ const char *str = data->set.str[cert_kind];
+ const char *n;
+
+ if(!is_file(str))
+ /* no such file exists, use the string as nickname */
+ return strdup(str);
+
+ /* search the last slash; we require at least one slash in a file name */
+ n = strrchr(str, '/');
+ if(!n) {
+ infof(data, "warning: certificate file name \"%s\" handled as nickname; "
+ "please use \"./%s\" to force file name\n", str, str);
+ return strdup(str);
+ }
+
+ /* we'll use the PEM reader to read the certificate from file */
+ return NULL;
+}
+
+/* Call PK11_CreateGenericObject() with the given obj_class and filename. If
+ * the call succeeds, append the object handle to the list of objects so that
+ * the object can be destroyed in Curl_nss_close(). */
+static CURLcode nss_create_object(struct ssl_connect_data *ssl,
+ CK_OBJECT_CLASS obj_class,
+ const char *filename, bool cacert)
+{
+ PK11SlotInfo *slot;
+ PK11GenericObject *obj;
+ CK_BBOOL cktrue = CK_TRUE;
+ CK_BBOOL ckfalse = CK_FALSE;
+ CK_ATTRIBUTE attrs[/* max count of attributes */ 4];
+ int attr_cnt = 0;
+ CURLcode result = (cacert)
+ ? CURLE_SSL_CACERT_BADFILE
+ : CURLE_SSL_CERTPROBLEM;
+
+ const int slot_id = (cacert) ? 0 : 1;
+ char *slot_name = aprintf("PEM Token #%d", slot_id);
+ if(!slot_name)
+ return CURLE_OUT_OF_MEMORY;
+
+ slot = PK11_FindSlotByName(slot_name);
+ free(slot_name);
+ if(!slot)
+ return result;
+
+ PK11_SETATTRS(attrs, attr_cnt, CKA_CLASS, &obj_class, sizeof(obj_class));
+ PK11_SETATTRS(attrs, attr_cnt, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL));
+ PK11_SETATTRS(attrs, attr_cnt, CKA_LABEL, (unsigned char *)filename,
+ strlen(filename) + 1);
+
+ if(CKO_CERTIFICATE == obj_class) {
+ CK_BBOOL *pval = (cacert) ? (&cktrue) : (&ckfalse);
+ PK11_SETATTRS(attrs, attr_cnt, CKA_TRUST, pval, sizeof(*pval));
+ }
+
+ obj = PK11_CreateGenericObject(slot, attrs, attr_cnt, PR_FALSE);
+ PK11_FreeSlot(slot);
+ if(!obj)
+ return result;
+
+ if(!Curl_llist_insert_next(ssl->obj_list, ssl->obj_list->tail, obj)) {
+ PK11_DestroyGenericObject(obj);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ if(!cacert && CKO_CERTIFICATE == obj_class)
+ /* store reference to a client certificate */
+ ssl->obj_clicert = obj;
+
+ return CURLE_OK;
+}
+
+/* Destroy the NSS object whose handle is given by ptr. This function is
+ * a callback of Curl_llist_alloc() used by Curl_llist_destroy() to destroy
+ * NSS objects in Curl_nss_close() */
+static void nss_destroy_object(void *user, void *ptr)
+{
+ PK11GenericObject *obj = (PK11GenericObject *)ptr;
+ (void) user;
+ PK11_DestroyGenericObject(obj);
+}
+
+/* same as nss_destroy_object() but for CRL items */
+static void nss_destroy_crl_item(void *user, void *ptr)
+{
+ SECItem *crl_der = (SECItem *)ptr;
+ (void) user;
+ SECITEM_FreeItem(crl_der, PR_TRUE);
+}
+
+static CURLcode nss_load_cert(struct ssl_connect_data *ssl,
+ const char *filename, PRBool cacert)
+{
+ CURLcode result = (cacert)
+ ? CURLE_SSL_CACERT_BADFILE
+ : CURLE_SSL_CERTPROBLEM;
+
+ /* libnsspem.so leaks memory if the requested file does not exist. For more
+ * details, go to <https://bugzilla.redhat.com/734760>. */
+ if(is_file(filename))
+ result = nss_create_object(ssl, CKO_CERTIFICATE, filename, cacert);
+
+ if(!result && !cacert) {
+ /* we have successfully loaded a client certificate */
+ CERTCertificate *cert;
+ char *nickname = NULL;
+ char *n = strrchr(filename, '/');
+ if(n)
+ n++;
+
+ /* The following undocumented magic helps to avoid a SIGSEGV on call
+ * of PK11_ReadRawAttribute() from SelectClientCert() when using an
+ * immature version of libnsspem.so. For more details, go to
+ * <https://bugzilla.redhat.com/733685>. */
+ nickname = aprintf("PEM Token #1:%s", n);
+ if(nickname) {
+ cert = PK11_FindCertFromNickname(nickname, NULL);
+ if(cert)
+ CERT_DestroyCertificate(cert);
+
+ free(nickname);
+ }
+ }
+
+ return result;
+}
+
+/* add given CRL to cache if it is not already there */
+static CURLcode nss_cache_crl(SECItem *crl_der)
+{
+ CERTCertDBHandle *db = CERT_GetDefaultCertDB();
+ CERTSignedCrl *crl = SEC_FindCrlByDERCert(db, crl_der, 0);
+ if(crl) {
+ /* CRL already cached */
+ SEC_DestroyCrl(crl);
+ SECITEM_FreeItem(crl_der, PR_TRUE);
+ return CURLE_OK;
+ }
+
+ /* acquire lock before call of CERT_CacheCRL() and accessing nss_crl_list */
+ PR_Lock(nss_crllock);
+
+ /* store the CRL item so that we can free it in Curl_nss_cleanup() */
+ if(!Curl_llist_insert_next(nss_crl_list, nss_crl_list->tail, crl_der)) {
+ SECITEM_FreeItem(crl_der, PR_TRUE);
+ PR_Unlock(nss_crllock);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ if(SECSuccess != CERT_CacheCRL(db, crl_der)) {
+ /* unable to cache CRL */
+ PR_Unlock(nss_crllock);
+ return CURLE_SSL_CRL_BADFILE;
+ }
+
+ /* we need to clear session cache, so that the CRL could take effect */
+ SSL_ClearSessionCache();
+ PR_Unlock(nss_crllock);
+ return CURLE_OK;
+}
+
+static CURLcode nss_load_crl(const char* crlfilename)
+{
+ PRFileDesc *infile;
+ PRFileInfo info;
+ SECItem filedata = { 0, NULL, 0 };
+ SECItem *crl_der = NULL;
+ char *body;
+
+ infile = PR_Open(crlfilename, PR_RDONLY, 0);
+ if(!infile)
+ return CURLE_SSL_CRL_BADFILE;
+
+ if(PR_SUCCESS != PR_GetOpenFileInfo(infile, &info))
+ goto fail;
+
+ if(!SECITEM_AllocItem(NULL, &filedata, info.size + /* zero ended */ 1))
+ goto fail;
+
+ if(info.size != PR_Read(infile, filedata.data, info.size))
+ goto fail;
+
+ crl_der = SECITEM_AllocItem(NULL, NULL, 0U);
+ if(!crl_der)
+ goto fail;
+
+ /* place a trailing zero right after the visible data */
+ body = (char*)filedata.data;
+ body[--filedata.len] = '\0';
+
+ body = strstr(body, "-----BEGIN");
+ if(body) {
+ /* assume ASCII */
+ char *trailer;
+ char *begin = PORT_Strchr(body, '\n');
+ if(!begin)
+ begin = PORT_Strchr(body, '\r');
+ if(!begin)
+ goto fail;
+
+ trailer = strstr(++begin, "-----END");
+ if(!trailer)
+ goto fail;
+
+ /* retrieve DER from ASCII */
+ *trailer = '\0';
+ if(ATOB_ConvertAsciiToItem(crl_der, begin))
+ goto fail;
+
+ SECITEM_FreeItem(&filedata, PR_FALSE);
+ }
+ else
+ /* assume DER */
+ *crl_der = filedata;
+
+ PR_Close(infile);
+ return nss_cache_crl(crl_der);
+
+fail:
+ PR_Close(infile);
+ SECITEM_FreeItem(crl_der, PR_TRUE);
+ SECITEM_FreeItem(&filedata, PR_FALSE);
+ return CURLE_SSL_CRL_BADFILE;
+}
+
+static CURLcode nss_load_key(struct connectdata *conn, int sockindex,
+ char *key_file)
+{
+ PK11SlotInfo *slot;
+ SECStatus status;
+ CURLcode result;
+ struct ssl_connect_data *ssl = conn->ssl;
+
+ (void)sockindex; /* unused */
+
+ result = nss_create_object(ssl, CKO_PRIVATE_KEY, key_file, FALSE);
+ if(result) {
+ PR_SetError(SEC_ERROR_BAD_KEY, 0);
+ return result;
+ }
+
+ slot = PK11_FindSlotByName("PEM Token #1");
+ if(!slot)
+ return CURLE_SSL_CERTPROBLEM;
+
+ /* This will force the token to be seen as re-inserted */
+ SECMOD_WaitForAnyTokenEvent(mod, 0, 0);
+ PK11_IsPresent(slot);
+
+ status = PK11_Authenticate(slot, PR_TRUE,
+ conn->data->set.str[STRING_KEY_PASSWD]);
+ PK11_FreeSlot(slot);
+
+ return (SECSuccess == status) ? CURLE_OK : CURLE_SSL_CERTPROBLEM;
+}
+
+static int display_error(struct connectdata *conn, PRInt32 err,
+ const char *filename)
+{
+ switch(err) {
+ case SEC_ERROR_BAD_PASSWORD:
+ failf(conn->data, "Unable to load client key: Incorrect password");
+ return 1;
+ case SEC_ERROR_UNKNOWN_CERT:
+ failf(conn->data, "Unable to load certificate %s", filename);
+ return 1;
+ default:
+ break;
+ }
+ return 0; /* The caller will print a generic error */
+}
+
+static CURLcode cert_stuff(struct connectdata *conn, int sockindex,
+ char *cert_file, char *key_file)
+{
+ struct SessionHandle *data = conn->data;
+ CURLcode result;
+
+ if(cert_file) {
+ result = nss_load_cert(&conn->ssl[sockindex], cert_file, PR_FALSE);
+ if(result) {
+ 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;
+ }
+ }
+
+ if(key_file || (is_file(cert_file))) {
+ if(key_file)
+ result = 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) {
+ 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 CURLE_OK;
+}
+
+static char * nss_get_password(PK11SlotInfo * slot, PRBool retry, void *arg)
+{
+ (void)slot; /* unused */
+
+ if(retry || NULL == arg)
+ return NULL;
+ else
+ return (char *)PORT_Strdup((char *)arg);
+}
+
+/* bypass the default SSL_AuthCertificate() hook in case we do not want to
+ * verify peer */
+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;
+ }
+
+ return SSL_AuthCertificate(CERT_GetDefaultCertDB(), fd, checksig, isServer);
+}
+
+/**
+ * Inform the application that the handshake is complete.
+ */
+static void HandshakeCallback(PRFileDesc *sock, void *arg)
+{
+ struct connectdata *conn = (struct connectdata*) arg;
+ unsigned int buflenmax = 50;
+ unsigned char buf[50];
+ unsigned int buflen;
+ SSLNextProtoState state;
+
+ if(!conn->data->set.ssl_enable_npn && !conn->data->set.ssl_enable_alpn) {
+ return;
+ }
+
+ if(SSL_GetNextProto(sock, &state, buf, &buflen, buflenmax) == SECSuccess) {
+
+ switch(state) {
+ case SSL_NEXT_PROTO_NO_SUPPORT:
+ case SSL_NEXT_PROTO_NO_OVERLAP:
+ infof(conn->data, "ALPN/NPN, server did not agree to a protocol\n");
+ return;
+#ifdef SSL_ENABLE_ALPN
+ 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;
+ }
+
+#ifdef USE_NGHTTP2
+ if(buflen == NGHTTP2_PROTO_VERSION_ID_LEN &&
+ !memcmp(NGHTTP2_PROTO_VERSION_ID, buf, NGHTTP2_PROTO_VERSION_ID_LEN)) {
+ conn->negnpn = CURL_HTTP_VERSION_2_0;
+ }
+ else
+#endif
+ if(buflen == ALPN_HTTP_1_1_LENGTH &&
+ !memcmp(ALPN_HTTP_1_1, buf, ALPN_HTTP_1_1_LENGTH)) {
+ conn->negnpn = CURL_HTTP_VERSION_1_1;
+ }
+ }
+}
+
+#if NSSVERNUM >= 0x030f04 /* 3.15.4 */
+static SECStatus CanFalseStartCallback(PRFileDesc *sock, void *client_data,
+ PRBool *canFalseStart)
+{
+ struct connectdata *conn = client_data;
+ struct SessionHandle *data = conn->data;
+
+ SSLChannelInfo channelInfo;
+ SSLCipherSuiteInfo cipherInfo;
+
+ SECStatus rv;
+ PRBool negotiatedExtension;
+
+ *canFalseStart = PR_FALSE;
+
+ if(SSL_GetChannelInfo(sock, &channelInfo, sizeof(channelInfo)) != SECSuccess)
+ return SECFailure;
+
+ if(SSL_GetCipherSuiteInfo(channelInfo.cipherSuite, &cipherInfo,
+ sizeof(cipherInfo)) != SECSuccess)
+ return SECFailure;
+
+ /* Prevent version downgrade attacks from TLS 1.2, and avoid False Start for
+ * TLS 1.3 and later. See https://bugzilla.mozilla.org/show_bug.cgi?id=861310
+ */
+ if(channelInfo.protocolVersion != SSL_LIBRARY_VERSION_TLS_1_2)
+ goto end;
+
+ /* Only allow ECDHE key exchange algorithm.
+ * See https://bugzilla.mozilla.org/show_bug.cgi?id=952863 */
+ if(cipherInfo.keaType != ssl_kea_ecdh)
+ goto end;
+
+ /* Prevent downgrade attacks on the symmetric cipher. We do not allow CBC
+ * mode due to BEAST, POODLE, and other attacks on the MAC-then-Encrypt
+ * design. See https://bugzilla.mozilla.org/show_bug.cgi?id=1109766 */
+ if(cipherInfo.symCipher != ssl_calg_aes_gcm)
+ goto end;
+
+ /* Enforce ALPN or NPN to do False Start, as an indicator of server
+ * compatibility. */
+ rv = SSL_HandshakeNegotiatedExtension(sock, ssl_app_layer_protocol_xtn,
+ &negotiatedExtension);
+ if(rv != SECSuccess || !negotiatedExtension) {
+ rv = SSL_HandshakeNegotiatedExtension(sock, ssl_next_proto_nego_xtn,
+ &negotiatedExtension);
+ }
+
+ if(rv != SECSuccess || !negotiatedExtension)
+ goto end;
+
+ *canFalseStart = PR_TRUE;
+
+ infof(data, "Trying TLS False Start\n");
+
+end:
+ return SECSuccess;
+}
+#endif
+
+static void display_cert_info(struct SessionHandle *data,
+ CERTCertificate *cert)
+{
+ char *subject, *issuer, *common_name;
+ PRExplodedTime printableTime;
+ char timeString[256];
+ PRTime notBefore, notAfter;
+
+ subject = CERT_NameToAscii(&cert->subject);
+ issuer = CERT_NameToAscii(&cert->issuer);
+ common_name = CERT_GetCommonName(&cert->subject);
+ infof(data, "\tsubject: %s\n", subject);
+
+ CERT_GetCertTimes(cert, &notBefore, &notAfter);
+ PR_ExplodeTime(notBefore, PR_GMTParameters, &printableTime);
+ PR_FormatTime(timeString, 256, "%b %d %H:%M:%S %Y GMT", &printableTime);
+ infof(data, "\tstart date: %s\n", timeString);
+ PR_ExplodeTime(notAfter, PR_GMTParameters, &printableTime);
+ PR_FormatTime(timeString, 256, "%b %d %H:%M:%S %Y GMT", &printableTime);
+ infof(data, "\texpire date: %s\n", timeString);
+ infof(data, "\tcommon name: %s\n", common_name);
+ infof(data, "\tissuer: %s\n", issuer);
+
+ PR_Free(subject);
+ PR_Free(issuer);
+ PR_Free(common_name);
+}
+
+static CURLcode display_conn_info(struct connectdata *conn, PRFileDesc *sock)
+{
+ CURLcode result = CURLE_OK;
+ SSLChannelInfo channel;
+ SSLCipherSuiteInfo suite;
+ CERTCertificate *cert;
+ CERTCertificate *cert2;
+ CERTCertificate *cert3;
+ PRTime now;
+ int i;
+
+ if(SSL_GetChannelInfo(sock, &channel, sizeof channel) ==
+ SECSuccess && channel.length == sizeof channel &&
+ channel.cipherSuite) {
+ if(SSL_GetCipherSuiteInfo(channel.cipherSuite,
+ &suite, sizeof suite) == SECSuccess) {
+ infof(conn->data, "SSL connection using %s\n", suite.cipherSuiteName);
+ }
+ }
+
+ cert = SSL_PeerCertificate(sock);
+ if(cert) {
+ infof(conn->data, "Server certificate:\n");
+
+ if(!conn->data->set.ssl.certinfo) {
+ display_cert_info(conn->data, cert);
+ CERT_DestroyCertificate(cert);
+ }
+ else {
+ /* Count certificates in chain. */
+ now = PR_Now();
+ i = 1;
+ if(!cert->isRoot) {
+ cert2 = CERT_FindCertIssuer(cert, now, certUsageSSLCA);
+ while(cert2) {
+ i++;
+ if(cert2->isRoot) {
+ CERT_DestroyCertificate(cert2);
+ break;
+ }
+ cert3 = CERT_FindCertIssuer(cert2, now, certUsageSSLCA);
+ CERT_DestroyCertificate(cert2);
+ 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);
+ CERT_DestroyCertificate(cert);
+ }
+ }
+ }
+ }
+
+ return result;
+}
+
+static SECStatus BadCertHandler(void *arg, PRFileDesc *sock)
+{
+ struct connectdata *conn = (struct connectdata *)arg;
+ struct SessionHandle *data = conn->data;
+ PRErrorCode err = PR_GetError();
+ CERTCertificate *cert;
+
+ /* remember the cert verification result */
+ data->set.ssl.certverifyresult = err;
+
+ if(err == SSL_ERROR_BAD_CERT_DOMAIN && !data->set.ssl.verifyhost)
+ /* we are asked not to verify the host name */
+ return SECSuccess;
+
+ /* print only info about the cert, the error is printed off the callback */
+ cert = SSL_PeerCertificate(sock);
+ if(cert) {
+ infof(data, "Server certificate:\n");
+ display_cert_info(data, cert);
+ CERT_DestroyCertificate(cert);
+ }
+
+ return SECFailure;
+}
+
+/**
+ *
+ * Check that the Peer certificate's issuer certificate matches the one found
+ * by issuer_nickname. This is not exactly the way OpenSSL and GNU TLS do the
+ * issuer check, so we provide comments that mimic the OpenSSL
+ * X509_check_issued function (in x509v3/v3_purp.c)
+ */
+static SECStatus check_issuer_cert(PRFileDesc *sock,
+ char *issuer_nickname)
+{
+ CERTCertificate *cert, *cert_issuer, *issuer;
+ SECStatus res=SECSuccess;
+ void *proto_win = NULL;
+
+ /*
+ PRArenaPool *tmpArena = NULL;
+ CERTAuthKeyID *authorityKeyID = NULL;
+ SECITEM *caname = NULL;
+ */
+
+ cert = SSL_PeerCertificate(sock);
+ cert_issuer = CERT_FindCertIssuer(cert, PR_Now(), certUsageObjectSigner);
+
+ proto_win = SSL_RevealPinArg(sock);
+ issuer = PK11_FindCertFromNickname(issuer_nickname, proto_win);
+
+ if((!cert_issuer) || (!issuer))
+ res = SECFailure;
+ else if(SECITEM_CompareItem(&cert_issuer->derCert,
+ &issuer->derCert)!=SECEqual)
+ res = SECFailure;
+
+ CERT_DestroyCertificate(cert);
+ CERT_DestroyCertificate(issuer);
+ CERT_DestroyCertificate(cert_issuer);
+ return res;
+}
+
+static CURLcode cmp_peer_pubkey(struct ssl_connect_data *connssl,
+ const char *pinnedpubkey)
+{
+ CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH;
+ struct SessionHandle *data = connssl->data;
+ CERTCertificate *cert;
+
+ if(!pinnedpubkey)
+ /* no pinned public key specified */
+ return CURLE_OK;
+
+ /* get peer certificate */
+ cert = SSL_PeerCertificate(connssl->handle);
+ if(cert) {
+ /* extract public key from peer certificate */
+ SECKEYPublicKey *pubkey = CERT_ExtractPublicKey(cert);
+ if(pubkey) {
+ /* encode the public key as DER */
+ SECItem *cert_der = PK11_DEREncodePublicKey(pubkey);
+ if(cert_der) {
+ /* compare the public key with the pinned public key */
+ result = Curl_pin_peer_pubkey(pinnedpubkey,
+ cert_der->data,
+ cert_der->len);
+ SECITEM_FreeItem(cert_der, PR_TRUE);
+ }
+ SECKEY_DestroyPublicKey(pubkey);
+ }
+ CERT_DestroyCertificate(cert);
+ }
+
+ /* report the resulting status */
+ switch(result) {
+ case CURLE_OK:
+ infof(data, "pinned public key verified successfully!\n");
+ break;
+ case CURLE_SSL_PINNEDPUBKEYNOTMATCH:
+ failf(data, "failed to verify pinned public key");
+ break;
+ default:
+ /* OOM, etc. */
+ break;
+ }
+
+ return result;
+}
+
+/**
+ *
+ * Callback to pick the SSL client certificate.
+ */
+static SECStatus SelectClientCert(void *arg, PRFileDesc *sock,
+ struct CERTDistNamesStr *caNames,
+ struct CERTCertificateStr **pRetCert,
+ struct SECKEYPrivateKeyStr **pRetKey)
+{
+ struct ssl_connect_data *connssl = (struct ssl_connect_data *)arg;
+ struct SessionHandle *data = connssl->data;
+ const char *nickname = connssl->client_nickname;
+
+ if(connssl->obj_clicert) {
+ /* use the cert/key provided by PEM reader */
+ static const char pem_slotname[] = "PEM Token #1";
+ SECItem cert_der = { 0, NULL, 0 };
+ void *proto_win = SSL_RevealPinArg(sock);
+ struct CERTCertificateStr *cert;
+ struct SECKEYPrivateKeyStr *key;
+
+ PK11SlotInfo *slot = PK11_FindSlotByName(pem_slotname);
+ if(NULL == slot) {
+ failf(data, "NSS: PK11 slot not found: %s", pem_slotname);
+ return SECFailure;
+ }
+
+ if(PK11_ReadRawAttribute(PK11_TypeGeneric, connssl->obj_clicert, CKA_VALUE,
+ &cert_der) != SECSuccess) {
+ failf(data, "NSS: CKA_VALUE not found in PK11 generic object");
+ PK11_FreeSlot(slot);
+ return SECFailure;
+ }
+
+ cert = PK11_FindCertFromDERCertItem(slot, &cert_der, proto_win);
+ SECITEM_FreeItem(&cert_der, PR_FALSE);
+ if(NULL == cert) {
+ failf(data, "NSS: client certificate from file not found");
+ PK11_FreeSlot(slot);
+ return SECFailure;
+ }
+
+ key = PK11_FindPrivateKeyFromCert(slot, cert, NULL);
+ PK11_FreeSlot(slot);
+ if(NULL == key) {
+ failf(data, "NSS: private key from file not found");
+ CERT_DestroyCertificate(cert);
+ return SECFailure;
+ }
+
+ infof(data, "NSS: client certificate from file\n");
+ display_cert_info(data, cert);
+
+ *pRetCert = cert;
+ *pRetKey = key;
+ return SECSuccess;
+ }
+
+ /* use the default NSS hook */
+ if(SECSuccess != NSS_GetClientAuthData((void *)nickname, sock, caNames,
+ pRetCert, pRetKey)
+ || NULL == *pRetCert) {
+
+ if(NULL == nickname)
+ failf(data, "NSS: client certificate not found (nickname not "
+ "specified)");
+ else
+ failf(data, "NSS: client certificate not found: %s", nickname);
+
+ return SECFailure;
+ }
+
+ /* get certificate nickname if any */
+ nickname = (*pRetCert)->nickname;
+ if(NULL == nickname)
+ nickname = "[unknown]";
+
+ if(NULL == *pRetKey) {
+ failf(data, "NSS: private key not found for certificate: %s", nickname);
+ return SECFailure;
+ }
+
+ infof(data, "NSS: using client certificate: %s\n", nickname);
+ display_cert_info(data, *pRetCert);
+ return SECSuccess;
+}
+
+/* update blocking direction in case of PR_WOULD_BLOCK_ERROR */
+static void nss_update_connecting_state(ssl_connect_state state, void *secret)
+{
+ struct ssl_connect_data *connssl = (struct ssl_connect_data *)secret;
+ if(PR_GetError() != PR_WOULD_BLOCK_ERROR)
+ /* an unrelated error is passing by */
+ return;
+
+ switch(connssl->connecting_state) {
+ case ssl_connect_2:
+ case ssl_connect_2_reading:
+ case ssl_connect_2_writing:
+ break;
+ default:
+ /* we are not called from an SSL handshake */
+ return;
+ }
+
+ /* update the state accordingly */
+ connssl->connecting_state = state;
+}
+
+/* recv() wrapper we use to detect blocking direction during SSL handshake */
+static PRInt32 nspr_io_recv(PRFileDesc *fd, void *buf, PRInt32 amount,
+ PRIntn flags, PRIntervalTime timeout)
+{
+ const PRRecvFN recv_fn = fd->lower->methods->recv;
+ const PRInt32 rv = recv_fn(fd->lower, buf, amount, flags, timeout);
+ if(rv < 0)
+ /* check for PR_WOULD_BLOCK_ERROR and update blocking direction */
+ nss_update_connecting_state(ssl_connect_2_reading, fd->secret);
+ return rv;
+}
+
+/* send() wrapper we use to detect blocking direction during SSL handshake */
+static PRInt32 nspr_io_send(PRFileDesc *fd, const void *buf, PRInt32 amount,
+ PRIntn flags, PRIntervalTime timeout)
+{
+ const PRSendFN send_fn = fd->lower->methods->send;
+ const PRInt32 rv = send_fn(fd->lower, buf, amount, flags, timeout);
+ if(rv < 0)
+ /* check for PR_WOULD_BLOCK_ERROR and update blocking direction */
+ nss_update_connecting_state(ssl_connect_2_writing, fd->secret);
+ return rv;
+}
+
+/* close() wrapper to avoid assertion failure due to fd->secret != NULL */
+static PRStatus nspr_io_close(PRFileDesc *fd)
+{
+ const PRCloseFN close_fn = PR_GetDefaultIOMethods()->close;
+ fd->secret = NULL;
+ return close_fn(fd);
+}
+
+/* data might be NULL */
+static CURLcode nss_init_core(struct SessionHandle *data, const char *cert_dir)
+{
+ NSSInitParameters initparams;
+
+ if(nss_context != NULL)
+ return CURLE_OK;
+
+ memset((void *) &initparams, '\0', sizeof(initparams));
+ initparams.length = sizeof(initparams);
+
+ if(cert_dir) {
+ char *certpath = aprintf("sql:%s", cert_dir);
+ if(!certpath)
+ return CURLE_OUT_OF_MEMORY;
+
+ infof(data, "Initializing NSS with certpath: %s\n", certpath);
+ nss_context = NSS_InitContext(certpath, "", "", "", &initparams,
+ NSS_INIT_READONLY | NSS_INIT_PK11RELOAD);
+ free(certpath);
+
+ if(nss_context != NULL)
+ return CURLE_OK;
+
+ infof(data, "Unable to initialize NSS database\n");
+ }
+
+ infof(data, "Initializing NSS with certpath: none\n");
+ nss_context = NSS_InitContext("", "", "", "", &initparams, NSS_INIT_READONLY
+ | NSS_INIT_NOCERTDB | NSS_INIT_NOMODDB | NSS_INIT_FORCEOPEN
+ | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD);
+ if(nss_context != NULL)
+ return CURLE_OK;
+
+ infof(data, "Unable to initialize NSS\n");
+ return CURLE_SSL_CACERT_BADFILE;
+}
+
+/* data might be NULL */
+static CURLcode nss_init(struct SessionHandle *data)
+{
+ char *cert_dir;
+ struct_stat st;
+ CURLcode result;
+
+ if(initialized)
+ return CURLE_OK;
+
+ /* list of all CRL items we need to destroy in Curl_nss_cleanup() */
+ nss_crl_list = Curl_llist_alloc(nss_destroy_crl_item);
+ if(!nss_crl_list)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* First we check if $SSL_DIR points to a valid dir */
+ cert_dir = getenv("SSL_DIR");
+ if(cert_dir) {
+ if((stat(cert_dir, &st) != 0) ||
+ (!S_ISDIR(st.st_mode))) {
+ cert_dir = NULL;
+ }
+ }
+
+ /* Now we check if the default location is a valid dir */
+ if(!cert_dir) {
+ if((stat(SSL_DIR, &st) == 0) &&
+ (S_ISDIR(st.st_mode))) {
+ cert_dir = (char *)SSL_DIR;
+ }
+ }
+
+ if(nspr_io_identity == PR_INVALID_IO_LAYER) {
+ /* allocate an identity for our own NSPR I/O layer */
+ nspr_io_identity = PR_GetUniqueIdentity("libcurl");
+ if(nspr_io_identity == PR_INVALID_IO_LAYER)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* the default methods just call down to the lower I/O layer */
+ memcpy(&nspr_io_methods, PR_GetDefaultIOMethods(), sizeof nspr_io_methods);
+
+ /* override certain methods in the table by our wrappers */
+ nspr_io_methods.recv = nspr_io_recv;
+ nspr_io_methods.send = nspr_io_send;
+ nspr_io_methods.close = nspr_io_close;
+ }
+
+ result = nss_init_core(data, cert_dir);
+ if(result)
+ return result;
+
+ if(num_enabled_ciphers() == 0)
+ NSS_SetDomesticPolicy();
+
+ initialized = 1;
+
+ return CURLE_OK;
+}
+
+/**
+ * Global SSL init
+ *
+ * @retval 0 error initializing SSL
+ * @retval 1 SSL initialized successfully
+ */
+int Curl_nss_init(void)
+{
+ /* curl_global_init() is not thread-safe so this test is ok */
+ if(nss_initlock == NULL) {
+ PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256);
+ nss_initlock = PR_NewLock();
+ nss_crllock = PR_NewLock();
+ }
+
+ /* We will actually initialize NSS later */
+
+ return 1;
+}
+
+/* data might be NULL */
+CURLcode Curl_nss_force_init(struct SessionHandle *data)
+{
+ CURLcode result;
+ if(!nss_initlock) {
+ if(data)
+ 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);
+ PR_Unlock(nss_initlock);
+
+ return result;
+}
+
+/* Global cleanup */
+void Curl_nss_cleanup(void)
+{
+ /* This function isn't required to be threadsafe and this is only done
+ * as a safety feature.
+ */
+ PR_Lock(nss_initlock);
+ if(initialized) {
+ /* Free references to client certificates held in the SSL session cache.
+ * Omitting this hampers destruction of the security module owning
+ * the certificates. */
+ SSL_ClearSessionCache();
+
+ if(mod && SECSuccess == SECMOD_UnloadUserModule(mod)) {
+ SECMOD_DestroyModule(mod);
+ mod = NULL;
+ }
+ NSS_ShutdownContext(nss_context);
+ nss_context = NULL;
+ }
+
+ /* destroy all CRL items */
+ Curl_llist_destroy(nss_crl_list, NULL);
+ nss_crl_list = NULL;
+
+ PR_Unlock(nss_initlock);
+
+ PR_DestroyLock(nss_initlock);
+ PR_DestroyLock(nss_crllock);
+ nss_initlock = NULL;
+
+ initialized = 0;
+}
+
+/*
+ * This function uses SSL_peek to determine connection status.
+ *
+ * Return codes:
+ * 1 means the connection is still in place
+ * 0 means the connection has been closed
+ * -1 means the connection status is unknown
+ */
+int
+Curl_nss_check_cxn(struct connectdata *conn)
+{
+ int rc;
+ char buf;
+
+ rc =
+ PR_Recv(conn->ssl[FIRSTSOCKET].handle, (void *)&buf, 1, PR_MSG_PEEK,
+ PR_SecondsToInterval(1));
+ if(rc > 0)
+ return 1; /* connection still in place */
+
+ if(rc == 0)
+ return 0; /* connection has been closed */
+
+ return -1; /* connection status unknown */
+}
+
+/*
+ * This function is called when an SSL connection is closed.
+ */
+void Curl_nss_close(struct connectdata *conn, int sockindex)
+{
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ if(connssl->handle) {
+ /* NSS closes the socket we previously handed to it, so we must mark it
+ as closed to avoid double close */
+ fake_sclose(conn->sock[sockindex]);
+ conn->sock[sockindex] = CURL_SOCKET_BAD;
+
+ if((connssl->client_nickname != NULL) || (connssl->obj_clicert != NULL))
+ /* A server might require different authentication based on the
+ * particular path being requested by the client. To support this
+ * scenario, we must ensure that a connection will never reuse the
+ * authentication data from a previous connection. */
+ SSL_InvalidateSession(connssl->handle);
+
+ free(connssl->client_nickname);
+ connssl->client_nickname = NULL;
+ /* destroy all NSS objects in order to avoid failure of NSS shutdown */
+ Curl_llist_destroy(connssl->obj_list, NULL);
+ connssl->obj_list = NULL;
+ connssl->obj_clicert = NULL;
+
+ PR_Close(connssl->handle);
+ connssl->handle = NULL;
+ }
+}
+
+/* return true if NSS can provide error code (and possibly msg) for the
+ error */
+static bool is_nss_error(CURLcode err)
+{
+ switch(err) {
+ case CURLE_PEER_FAILED_VERIFICATION:
+ case CURLE_SSL_CACERT:
+ case CURLE_SSL_CERTPROBLEM:
+ case CURLE_SSL_CONNECT_ERROR:
+ case CURLE_SSL_ISSUER_ERROR:
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+/* return true if the given error code is related to a client certificate */
+static bool is_cc_error(PRInt32 err)
+{
+ switch(err) {
+ case SSL_ERROR_BAD_CERT_ALERT:
+ case SSL_ERROR_EXPIRED_CERT_ALERT:
+ case SSL_ERROR_REVOKED_CERT_ALERT:
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+static Curl_recv nss_recv;
+static Curl_send nss_send;
+
+static CURLcode nss_load_ca_certificates(struct connectdata *conn,
+ int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ const char *cafile = data->set.ssl.CAfile;
+ const char *capath = data->set.ssl.CApath;
+
+ if(cafile) {
+ CURLcode result = nss_load_cert(&conn->ssl[sockindex], cafile, PR_TRUE);
+ if(result)
+ return result;
+ }
+
+ if(capath) {
+ struct_stat st;
+ if(stat(capath, &st) == -1)
+ return CURLE_SSL_CACERT_BADFILE;
+
+ if(S_ISDIR(st.st_mode)) {
+ PRDirEntry *entry;
+ PRDir *dir = PR_OpenDir(capath);
+ if(!dir)
+ return CURLE_SSL_CACERT_BADFILE;
+
+ while((entry = PR_ReadDir(dir, PR_SKIP_BOTH | PR_SKIP_HIDDEN))) {
+ char *fullpath = aprintf("%s/%s", capath, entry->name);
+ if(!fullpath) {
+ PR_CloseDir(dir);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ if(CURLE_OK != nss_load_cert(&conn->ssl[sockindex], fullpath, PR_TRUE))
+ /* This is purposefully tolerant of errors so non-PEM files can
+ * be in the same directory */
+ infof(data, "failed to load '%s' from CURLOPT_CAPATH\n", fullpath);
+
+ free(fullpath);
+ }
+
+ PR_CloseDir(dir);
+ }
+ else
+ infof(data, "warning: CURLOPT_CAPATH not a directory (%s)\n", capath);
+ }
+
+ infof(data, " CAfile: %s\n CApath: %s\n",
+ cafile ? cafile : "none",
+ capath ? capath : "none");
+
+ return CURLE_OK;
+}
+
+static CURLcode nss_init_sslver(SSLVersionRange *sslver,
+ struct SessionHandle *data)
+{
+ switch(data->set.ssl.version) {
+ default:
+ case CURL_SSLVERSION_DEFAULT:
+ 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
+ sslver->max = SSL_LIBRARY_VERSION_TLS_1_1;
+#else
+ sslver->max = SSL_LIBRARY_VERSION_TLS_1_0;
+#endif
+ return CURLE_OK;
+
+ case CURL_SSLVERSION_SSLv2:
+ sslver->min = SSL_LIBRARY_VERSION_2;
+ sslver->max = SSL_LIBRARY_VERSION_2;
+ return CURLE_OK;
+
+ case CURL_SSLVERSION_SSLv3:
+ sslver->min = SSL_LIBRARY_VERSION_3_0;
+ sslver->max = SSL_LIBRARY_VERSION_3_0;
+ return CURLE_OK;
+
+ case CURL_SSLVERSION_TLSv1_0:
+ sslver->min = SSL_LIBRARY_VERSION_TLS_1_0;
+ sslver->max = SSL_LIBRARY_VERSION_TLS_1_0;
+ return CURLE_OK;
+
+ case CURL_SSLVERSION_TLSv1_1:
+#ifdef SSL_LIBRARY_VERSION_TLS_1_1
+ sslver->min = SSL_LIBRARY_VERSION_TLS_1_1;
+ sslver->max = SSL_LIBRARY_VERSION_TLS_1_1;
+ return CURLE_OK;
+#endif
+ break;
+
+ case CURL_SSLVERSION_TLSv1_2:
+#ifdef SSL_LIBRARY_VERSION_TLS_1_2
+ sslver->min = SSL_LIBRARY_VERSION_TLS_1_2;
+ sslver->max = SSL_LIBRARY_VERSION_TLS_1_2;
+ return CURLE_OK;
+#endif
+ break;
+ }
+
+ failf(data, "TLS minor version cannot be set");
+ return CURLE_SSL_CONNECT_ERROR;
+}
+
+static CURLcode nss_fail_connect(struct ssl_connect_data *connssl,
+ struct SessionHandle *data,
+ CURLcode curlerr)
+{
+ PRErrorCode err = 0;
+
+ if(is_nss_error(curlerr)) {
+ /* read NSPR error code */
+ err = PR_GetError();
+ if(is_cc_error(err))
+ curlerr = CURLE_SSL_CERTPROBLEM;
+
+ /* print the error number and error string */
+ infof(data, "NSS error %d (%s)\n", err, nss_error_to_name(err));
+
+ /* print a human-readable message describing the error if available */
+ nss_print_error_message(data, err);
+ }
+
+ /* cleanup on connection failure */
+ Curl_llist_destroy(connssl->obj_list, NULL);
+ connssl->obj_list = NULL;
+
+ return curlerr;
+}
+
+/* Switch the SSL socket into non-blocking mode. */
+static CURLcode nss_set_nonblock(struct ssl_connect_data *connssl,
+ struct SessionHandle *data)
+{
+ static PRSocketOptionData sock_opt;
+ sock_opt.option = PR_SockOpt_Nonblocking;
+ sock_opt.value.non_blocking = PR_TRUE;
+
+ if(PR_SetSocketOption(connssl->handle, &sock_opt) != PR_SUCCESS)
+ return nss_fail_connect(connssl, data, CURLE_SSL_CONNECT_ERROR);
+
+ return CURLE_OK;
+}
+
+static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex)
+{
+ PRFileDesc *model = NULL;
+ PRFileDesc *nspr_io = NULL;
+ PRFileDesc *nspr_io_stub = NULL;
+ PRBool ssl_no_cache;
+ PRBool ssl_cbc_random_iv;
+ struct SessionHandle *data = conn->data;
+ curl_socket_t sockfd = conn->sock[sockindex];
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ CURLcode result;
+
+ SSLVersionRange sslver = {
+ SSL_LIBRARY_VERSION_TLS_1_0, /* min */
+ SSL_LIBRARY_VERSION_TLS_1_0 /* max */
+ };
+
+ connssl->data = data;
+
+ /* list of all NSS objects we need to destroy in Curl_nss_close() */
+ connssl->obj_list = Curl_llist_alloc(nss_destroy_object);
+ if(!connssl->obj_list)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* FIXME. NSS doesn't support multiple databases open at the same time. */
+ PR_Lock(nss_initlock);
+ result = nss_init(conn->data);
+ if(result) {
+ PR_Unlock(nss_initlock);
+ goto error;
+ }
+
+ result = CURLE_SSL_CONNECT_ERROR;
+
+ if(!mod) {
+ char *configstring = aprintf("library=%s name=PEM", pem_library);
+ if(!configstring) {
+ PR_Unlock(nss_initlock);
+ goto error;
+ }
+ mod = SECMOD_LoadUserModule(configstring, NULL, PR_FALSE);
+ free(configstring);
+
+ if(!mod || !mod->loaded) {
+ if(mod) {
+ SECMOD_DestroyModule(mod);
+ mod = NULL;
+ }
+ infof(data, "WARNING: failed to load NSS PEM library %s. Using "
+ "OpenSSL PEM certificates will not work.\n", pem_library);
+ }
+ }
+
+ PK11_SetPasswordFunc(nss_get_password);
+ PR_Unlock(nss_initlock);
+
+ model = PR_NewTCPSocket();
+ if(!model)
+ goto error;
+ model = SSL_ImportFD(NULL, model);
+
+ if(SSL_OptionSet(model, SSL_SECURITY, PR_TRUE) != SECSuccess)
+ goto error;
+ if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_SERVER, PR_FALSE) != SECSuccess)
+ goto error;
+ if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE) != SECSuccess)
+ goto error;
+
+ /* do not use SSL cache if disabled or we are not going to verify peer */
+ ssl_no_cache = (conn->ssl_config.sessionid && data->set.ssl.verifypeer) ?
+ PR_FALSE : PR_TRUE;
+ if(SSL_OptionSet(model, SSL_NO_CACHE, ssl_no_cache) != SECSuccess)
+ goto error;
+
+ /* enable/disable the requested SSL version(s) */
+ if(nss_init_sslver(&sslver, data) != CURLE_OK)
+ goto error;
+ if(SSL_VersionRangeSet(model, &sslver) != SECSuccess)
+ goto error;
+
+ ssl_cbc_random_iv = !data->set.ssl_enable_beast;
+#ifdef SSL_CBC_RANDOM_IV
+ /* unless the user explicitly asks to allow the protocol vulnerability, we
+ use the work-around */
+ if(SSL_OptionSet(model, SSL_CBC_RANDOM_IV, ssl_cbc_random_iv) != SECSuccess)
+ infof(data, "warning: failed to set SSL_CBC_RANDOM_IV = %d\n",
+ ssl_cbc_random_iv);
+#else
+ if(ssl_cbc_random_iv)
+ infof(data, "warning: support for SSL_CBC_RANDOM_IV not compiled in\n");
+#endif
+
+ if(data->set.ssl.cipher_list) {
+ if(set_ciphers(data, model, data->set.ssl.cipher_list) != SECSuccess) {
+ result = CURLE_SSL_CIPHER;
+ goto error;
+ }
+ }
+
+ if(!data->set.ssl.verifypeer && data->set.ssl.verifyhost)
+ infof(data, "warning: ignoring value of ssl.verifyhost\n");
+
+ /* bypass the default SSL_AuthCertificate() hook in case we do not want to
+ * verify peer */
+ if(SSL_AuthCertificateHook(model, nss_auth_cert_hook, conn) != SECSuccess)
+ goto error;
+
+ data->set.ssl.certverifyresult=0; /* not checked yet */
+ if(SSL_BadCertHook(model, BadCertHandler, conn) != SECSuccess)
+ goto error;
+
+ if(SSL_HandshakeCallback(model, HandshakeCallback, conn) != SECSuccess)
+ goto error;
+
+ if(data->set.ssl.verifypeer) {
+ const CURLcode rv = nss_load_ca_certificates(conn, sockindex);
+ if(rv) {
+ result = rv;
+ goto error;
+ }
+ }
+
+ if(data->set.ssl.CRLfile) {
+ const CURLcode rv = nss_load_crl(data->set.ssl.CRLfile);
+ if(rv) {
+ result = rv;
+ goto error;
+ }
+ infof(data, " CRLfile: %s\n", data->set.ssl.CRLfile);
+ }
+
+ if(data->set.str[STRING_CERT]) {
+ char *nickname = dup_nickname(data, STRING_CERT);
+ if(nickname) {
+ /* we are not going to use libnsspem.so to read the client cert */
+ connssl->obj_clicert = NULL;
+ }
+ else {
+ CURLcode rv = cert_stuff(conn, sockindex, data->set.str[STRING_CERT],
+ data->set.str[STRING_KEY]);
+ if(rv) {
+ /* failf() is already done in cert_stuff() */
+ result = rv;
+ goto error;
+ }
+ }
+
+ /* store the nickname for SelectClientCert() called during handshake */
+ connssl->client_nickname = nickname;
+ }
+ else
+ connssl->client_nickname = NULL;
+
+ if(SSL_GetClientAuthDataHook(model, SelectClientCert,
+ (void *)connssl) != SECSuccess) {
+ result = CURLE_SSL_CERTPROBLEM;
+ goto error;
+ }
+
+ /* wrap OS file descriptor by NSPR's file descriptor abstraction */
+ nspr_io = PR_ImportTCPSocket(sockfd);
+ if(!nspr_io)
+ goto error;
+
+ /* create our own NSPR I/O layer */
+ nspr_io_stub = PR_CreateIOLayerStub(nspr_io_identity, &nspr_io_methods);
+ if(!nspr_io_stub) {
+ PR_Close(nspr_io);
+ goto error;
+ }
+
+ /* make the per-connection data accessible from NSPR I/O callbacks */
+ nspr_io_stub->secret = (void *)connssl;
+
+ /* push our new layer to the NSPR I/O stack */
+ if(PR_PushIOLayer(nspr_io, PR_TOP_IO_LAYER, nspr_io_stub) != PR_SUCCESS) {
+ PR_Close(nspr_io);
+ PR_Close(nspr_io_stub);
+ goto error;
+ }
+
+ /* import our model socket onto the current I/O stack */
+ connssl->handle = SSL_ImportFD(model, nspr_io);
+ if(!connssl->handle) {
+ PR_Close(nspr_io);
+ goto error;
+ }
+
+ PR_Close(model); /* We don't need this any more */
+ model = NULL;
+
+ /* This is the password associated with the cert that we're using */
+ if(data->set.str[STRING_KEY_PASSWD]) {
+ 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 SSL_ENABLE_NPN
+ if(SSL_OptionSet(connssl->handle, SSL_ENABLE_NPN, data->set.ssl_enable_npn
+ ? PR_TRUE : PR_FALSE) != SECSuccess)
+ goto error;
+#endif
+
+#ifdef SSL_ENABLE_ALPN
+ if(SSL_OptionSet(connssl->handle, SSL_ENABLE_ALPN, data->set.ssl_enable_alpn
+ ? PR_TRUE : PR_FALSE) != SECSuccess)
+ goto error;
+#endif
+
+#if NSSVERNUM >= 0x030f04 /* 3.15.4 */
+ if(data->set.ssl.falsestart) {
+ if(SSL_OptionSet(connssl->handle, SSL_ENABLE_FALSE_START, PR_TRUE)
+ != SECSuccess)
+ goto error;
+
+ if(SSL_SetCanFalseStartCallback(connssl->handle, CanFalseStartCallback,
+ conn) != SECSuccess)
+ goto error;
+ }
+#endif
+
+#if defined(SSL_ENABLE_NPN) || defined(SSL_ENABLE_ALPN)
+ if(data->set.ssl_enable_npn || data->set.ssl_enable_alpn) {
+ int cur = 0;
+ unsigned char protocols[128];
+
+#ifdef USE_NGHTTP2
+ if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN;
+ memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID,
+ NGHTTP2_PROTO_VERSION_ID_LEN);
+ cur += NGHTTP2_PROTO_VERSION_ID_LEN;
+ }
+#endif
+ protocols[cur++] = ALPN_HTTP_1_1_LENGTH;
+ memcpy(&protocols[cur], ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH);
+ cur += ALPN_HTTP_1_1_LENGTH;
+
+ if(SSL_SetNextProtoNego(connssl->handle, protocols, cur) != SECSuccess)
+ goto error;
+ }
+#endif
+
+
+ /* Force handshake on next I/O */
+ SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE);
+
+ SSL_SetURL(connssl->handle, conn->host.name);
+
+ return CURLE_OK;
+
+error:
+ if(model)
+ PR_Close(model);
+
+ return nss_fail_connect(connssl, data, result);
+}
+
+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;
+ 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;
+ goto error;
+ }
+
+ /* Force the handshake now */
+ timeout = PR_MillisecondsToInterval((PRUint32) time_left);
+ if(SSL_ForceHandshakeWithTimeout(connssl->handle, timeout) != SECSuccess) {
+ if(PR_GetError() == PR_WOULD_BLOCK_ERROR)
+ /* 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;
+ else if(conn->data->set.ssl.certverifyresult!=0)
+ result = CURLE_SSL_CACERT;
+ goto error;
+ }
+
+ result = display_conn_info(conn, connssl->handle);
+ if(result)
+ goto error;
+
+ if(data->set.str[STRING_SSL_ISSUERCERT]) {
+ SECStatus ret = SECFailure;
+ char *nickname = dup_nickname(data, STRING_SSL_ISSUERCERT);
+ if(nickname) {
+ /* we support only nicknames in case of STRING_SSL_ISSUERCERT for now */
+ ret = check_issuer_cert(connssl->handle, nickname);
+ free(nickname);
+ }
+
+ if(SECFailure == ret) {
+ infof(data, "SSL certificate issuer check failed\n");
+ result = CURLE_SSL_ISSUER_ERROR;
+ goto error;
+ }
+ else {
+ infof(data, "SSL certificate issuer check ok\n");
+ }
+ }
+
+ result = cmp_peer_pubkey(connssl, data->set.str[STRING_SSL_PINNEDPUBLICKEY]);
+ if(result)
+ /* status already printed */
+ goto error;
+
+ return CURLE_OK;
+
+error:
+ return nss_fail_connect(connssl, data, result);
+}
+
+static CURLcode nss_connect_common(struct connectdata *conn, int sockindex,
+ bool *done)
+{
+ 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;
+
+ if(connssl->connecting_state == ssl_connect_1) {
+ result = nss_setup_connect(conn, sockindex);
+ if(result)
+ /* we do not expect CURLE_AGAIN from nss_setup_connect() */
+ return result;
+
+ if(!blocking) {
+ /* in non-blocking mode, set NSS non-blocking mode before handshake */
+ result = nss_set_nonblock(connssl, data);
+ if(result)
+ return result;
+ }
+
+ connssl->connecting_state = ssl_connect_2;
+ }
+
+ result = nss_do_connect(conn, sockindex);
+ switch(result) {
+ case CURLE_OK:
+ break;
+ case CURLE_AGAIN:
+ if(!blocking)
+ /* CURLE_AGAIN in non-blocking mode is not an error */
+ return CURLE_OK;
+ /* fall through */
+ default:
+ return result;
+ }
+
+ if(blocking) {
+ /* in blocking mode, set NSS non-blocking mode _after_ SSL handshake */
+ result = nss_set_nonblock(connssl, data);
+ if(result)
+ return result;
+ }
+ 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;
+
+ return CURLE_OK;
+}
+
+CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
+{
+ return nss_connect_common(conn, sockindex, /* blocking */ NULL);
+}
+
+CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn,
+ int sockindex, bool *done)
+{
+ return nss_connect_common(conn, sockindex, done);
+}
+
+static ssize_t nss_send(struct connectdata *conn, /* connection data */
+ int sockindex, /* socketindex */
+ const void *mem, /* send this data */
+ size_t len, /* amount to write */
+ CURLcode *curlcode)
+{
+ ssize_t rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0,
+ PR_INTERVAL_NO_WAIT);
+ if(rc < 0) {
+ PRInt32 err = PR_GetError();
+ if(err == PR_WOULD_BLOCK_ERROR)
+ *curlcode = CURLE_AGAIN;
+ else {
+ /* print the error number and error string */
+ const char *err_name = nss_error_to_name(err);
+ infof(conn->data, "SSL write: error %d (%s)\n", err, err_name);
+
+ /* print a human-readable message describing the error if available */
+ nss_print_error_message(conn->data, err);
+
+ *curlcode = (is_cc_error(err))
+ ? CURLE_SSL_CERTPROBLEM
+ : CURLE_SEND_ERROR;
+ }
+
+ return -1;
+ }
+
+ return rc; /* number of bytes */
+}
+
+static ssize_t nss_recv(struct connectdata * conn, /* connection data */
+ int num, /* socketindex */
+ char *buf, /* store read data here */
+ size_t buffersize, /* max amount to read */
+ CURLcode *curlcode)
+{
+ ssize_t nread = PR_Recv(conn->ssl[num].handle, buf, (int)buffersize, 0,
+ PR_INTERVAL_NO_WAIT);
+ if(nread < 0) {
+ /* failed SSL read */
+ PRInt32 err = PR_GetError();
+
+ if(err == PR_WOULD_BLOCK_ERROR)
+ *curlcode = CURLE_AGAIN;
+ else {
+ /* print the error number and error string */
+ const char *err_name = nss_error_to_name(err);
+ infof(conn->data, "SSL read: errno %d (%s)\n", err, err_name);
+
+ /* print a human-readable message describing the error if available */
+ nss_print_error_message(conn->data, err);
+
+ *curlcode = (is_cc_error(err))
+ ? CURLE_SSL_CERTPROBLEM
+ : CURLE_RECV_ERROR;
+ }
+
+ return -1;
+ }
+
+ return nread;
+}
+
+size_t Curl_nss_version(char *buffer, size_t size)
+{
+ return snprintf(buffer, size, "NSS/%s", NSS_VERSION);
+}
+
+/* data might be NULL */
+int Curl_nss_seed(struct SessionHandle *data)
+{
+ /* make sure that NSS is initialized */
+ return !!Curl_nss_force_init(data);
+}
+
+/* data might be NULL */
+int Curl_nss_random(struct SessionHandle *data,
+ unsigned char *entropy,
+ size_t length)
+{
+ Curl_nss_seed(data); /* Initiate the seed if not already done */
+
+ if(SECSuccess != PK11_GenerateRandom(entropy, curlx_uztosi(length)))
+ /* signal a failure */
+ return -1;
+
+ return 0;
+}
+
+void Curl_nss_md5sum(unsigned char *tmp, /* input */
+ size_t tmplen,
+ unsigned char *md5sum, /* output */
+ size_t md5len)
+{
+ PK11Context *MD5pw = PK11_CreateDigestContext(SEC_OID_MD5);
+ unsigned int MD5out;
+
+ 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
+}
+
+bool Curl_nss_false_start(void) {
+#if NSSVERNUM >= 0x030f04 /* 3.15.4 */
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+
+#endif /* USE_NSS */
diff --git a/lib/vtls/nssg.h b/lib/vtls/nssg.h
new file mode 100644
index 00000000..d0e74124
--- /dev/null
+++ b/lib/vtls/nssg.h
@@ -0,0 +1,96 @@
+#ifndef HEADER_CURL_NSSG_H
+#define HEADER_CURL_NSSG_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_NSS
+/*
+ * This header should only be needed to get included by vtls.c and nss.c
+ */
+
+#include "urldata.h"
+
+CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex);
+CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done);
+/* close a SSL connection */
+void Curl_nss_close(struct connectdata *conn, int sockindex);
+
+int Curl_nss_init(void);
+void Curl_nss_cleanup(void);
+
+size_t Curl_nss_version(char *buffer, size_t size);
+int Curl_nss_check_cxn(struct connectdata *cxn);
+int Curl_nss_seed(struct 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_md5sum(unsigned char *tmp, /* input */
+ size_t tmplen,
+ unsigned char *md5sum, /* output */
+ size_t md5len);
+
+bool Curl_nss_cert_status_request(void);
+
+bool Curl_nss_false_start(void);
+
+/* Set the API backend definition to NSS */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_NSS
+
+/* this backend supports the CAPATH option */
+#define have_curlssl_ca_path 1
+
+/* this backend supports CURLOPT_CERTINFO */
+#define have_curlssl_certinfo 1
+
+/* API setup for NSS */
+#define curlssl_init Curl_nss_init
+#define curlssl_cleanup Curl_nss_cleanup
+#define curlssl_connect Curl_nss_connect
+#define curlssl_connect_nonblocking Curl_nss_connect_nonblocking
+
+/* NSS has its own session ID cache */
+#define curlssl_session_free(x) Curl_nop_stmt
+#define curlssl_close_all(x) ((void)x)
+#define curlssl_close Curl_nss_close
+/* NSS has no shutdown function provided and thus always fail */
+#define curlssl_shutdown(x,y) ((void)x, (void)y, 1)
+#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_nss_version
+#define curlssl_check_cxn(x) Curl_nss_check_cxn(x)
+#define curlssl_data_pending(x,y) ((void)x, (void)y, 0)
+#define curlssl_random(x,y,z) Curl_nss_random(x,y,z)
+#define curlssl_md5sum(a,b,c,d) Curl_nss_md5sum(a,b,c,d)
+#define curlssl_cert_status_request() Curl_nss_cert_status_request()
+#define curlssl_false_start() Curl_nss_false_start()
+
+#endif /* USE_NSS */
+#endif /* HEADER_CURL_NSSG_H */
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
new file mode 100644
index 00000000..d1ea5fbf
--- /dev/null
+++ b/lib/vtls/openssl.c
@@ -0,0 +1,3188 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all OpenSSL-specific code for the TLS/SSL layer. No code
+ * but vtls.c should ever call or use these functions.
+ */
+
+/*
+ * The original SSLeay-using code for curl was written by Linas Vepstas and
+ * Sampo Kellomaki 1998.
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_OPENSSL
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "urldata.h"
+#include "sendf.h"
+#include "formdata.h" /* for the boundary function */
+#include "url.h" /* for the ssl config check function */
+#include "inet_pton.h"
+#include "openssl.h"
+#include "connect.h"
+#include "slist.h"
+#include "strequal.h"
+#include "select.h"
+#include "vtls.h"
+#include "rawstr.h"
+#include "hostcheck.h"
+#include "curl_printf.h"
+
+#include <openssl/ssl.h>
+#include <openssl/rand.h>
+#include <openssl/x509v3.h>
+#include <openssl/dsa.h>
+#include <openssl/dh.h>
+#include <openssl/err.h>
+#include <openssl/md5.h>
+#include <openssl/conf.h>
+#include <openssl/bn.h>
+#include <openssl/rsa.h>
+
+#ifdef HAVE_OPENSSL_PKCS12_H
+#include <openssl/pkcs12.h>
+#endif
+
+#ifndef HAVE_BORINGSSL
+#include <openssl/ocsp.h>
+#endif
+
+#include "warnless.h"
+#include "non-ascii.h" /* for Curl_convert_from_utf8 prototype */
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#ifndef OPENSSL_VERSION_NUMBER
+#error "OPENSSL_VERSION_NUMBER not defined"
+#endif
+
+#if OPENSSL_VERSION_NUMBER >= 0x00907001L && !defined(OPENSSL_IS_BORINGSSL)
+/* ENGINE_load_private_key() takes four arguments */
+#define HAVE_ENGINE_LOAD_FOUR_ARGS
+#include <openssl/ui.h>
+#else
+/* ENGINE_load_private_key() takes three arguments */
+#undef HAVE_ENGINE_LOAD_FOUR_ARGS
+#endif
+
+#if (OPENSSL_VERSION_NUMBER >= 0x00903001L) && \
+ defined(HAVE_OPENSSL_PKCS12_H) && \
+ !defined(OPENSSL_IS_BORINGSSL)
+/* OpenSSL has PKCS 12 support, BoringSSL does not */
+#define HAVE_PKCS12_SUPPORT
+#else
+/* OpenSSL does not have PKCS12 support */
+#undef HAVE_PKCS12_SUPPORT
+#endif
+
+#if OPENSSL_VERSION_NUMBER >= 0x00909000L
+#define SSL_METHOD_QUAL const
+#else
+#define SSL_METHOD_QUAL
+#endif
+
+#if OPENSSL_VERSION_NUMBER >= 0x00907000L
+/* 0.9.6 didn't have X509_STORE_set_flags() */
+#define HAVE_X509_STORE_SET_FLAGS 1
+#else
+#define X509_STORE_set_flags(x,y) Curl_nop_stmt
+#endif
+
+#ifdef OPENSSL_IS_BORINGSSL
+/* BoringSSL has no ERR_remove_state() */
+#define ERR_remove_state(x)
+#elif (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+#define HAVE_ERR_REMOVE_THREAD_STATE 1
+#endif
+
+#if !defined(HAVE_SSLV2_CLIENT_METHOD) || \
+ OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0+ has no SSLv2 */
+#undef OPENSSL_NO_SSL2 /* undef first to avoid compiler warnings */
+#define OPENSSL_NO_SSL2
+#endif
+
+#if defined(OPENSSL_IS_BORINGSSL)
+#define NO_RAND_SEED 1
+/* In BoringSSL OpenSSL_add_all_algorithms does nothing */
+#define OpenSSL_add_all_algorithms()
+/* BoringSSL does not have CONF_modules_load_file */
+#define CONF_modules_load_file(a,b,c)
+#endif
+
+/*
+ * Number of bytes to read from the random number seed file. This must be
+ * a finite value (because some entropy "files" like /dev/urandom have
+ * an infinite length), but must be large enough to provide enough
+ * entopy to properly seed OpenSSL's PRNG.
+ */
+#define RAND_LOAD_LENGTH 1024
+
+static int passwd_callback(char *buf, int num, int encrypting,
+ void *global_passwd)
+{
+ DEBUGASSERT(0 == encrypting);
+
+ if(!encrypting) {
+ int klen = curlx_uztosi(strlen((char *)global_passwd));
+ if(num > klen) {
+ memcpy(buf, global_passwd, klen+1);
+ return klen;
+ }
+ }
+ return 0;
+}
+
+/*
+ * rand_enough() is a function that returns TRUE if we have seeded the random
+ * engine properly. We use some preprocessor magic to provide a seed_enough()
+ * macro to use, just to prevent a compiler warning on this function if we
+ * pass in an argument that is never used.
+ */
+
+#ifndef NO_RAND_SEED
+#ifdef HAVE_RAND_STATUS
+#define seed_enough(x) rand_enough()
+static bool rand_enough(void)
+{
+ return (0 != RAND_status()) ? TRUE : FALSE;
+}
+#else
+#define seed_enough(x) rand_enough(x)
+static bool rand_enough(int nread)
+{
+ /* this is a very silly decision to make */
+ return (nread > 500) ? TRUE : FALSE;
+}
+#endif
+
+static int ossl_seed(struct SessionHandle *data)
+{
+ char *buf = data->state.buffer; /* point to the big buffer */
+ int nread=0;
+
+ /* Q: should we add support for a random file name as a libcurl option?
+ A: Yes, it is here */
+
+#ifndef RANDOM_FILE
+ /* if RANDOM_FILE isn't defined, we only perform this if an option tells
+ us to! */
+ if(data->set.ssl.random_file)
+#define RANDOM_FILE "" /* doesn't matter won't be used */
+#endif
+ {
+ /* let the option override the define */
+ nread += RAND_load_file((data->set.str[STRING_SSL_RANDOM_FILE]?
+ data->set.str[STRING_SSL_RANDOM_FILE]:
+ RANDOM_FILE),
+ RAND_LOAD_LENGTH);
+ if(seed_enough(nread))
+ return nread;
+ }
+
+#if defined(HAVE_RAND_EGD)
+ /* only available in OpenSSL 0.9.5 and later */
+ /* EGD_SOCKET is set at configure time or not at all */
+#ifndef EGD_SOCKET
+ /* If we don't have the define set, we only do this if the egd-option
+ is set */
+ if(data->set.str[STRING_SSL_EGDSOCKET])
+#define EGD_SOCKET "" /* doesn't matter won't be used */
+#endif
+ {
+ /* If there's an option and a define, the option overrides the
+ define */
+ int ret = RAND_egd(data->set.str[STRING_SSL_EGDSOCKET]?
+ data->set.str[STRING_SSL_EGDSOCKET]:EGD_SOCKET);
+ if(-1 != ret) {
+ nread += ret;
+ if(seed_enough(nread))
+ return nread;
+ }
+ }
+#endif
+
+ /* If we get here, it means we need to seed the PRNG using a "silly"
+ approach! */
+ do {
+ unsigned char randb[64];
+ int len = sizeof(randb);
+ RAND_bytes(randb, len);
+ RAND_add(randb, len, (len >> 1));
+ } while(!RAND_status());
+
+ /* generates a default path for the random seed file */
+ buf[0]=0; /* blank it first */
+ RAND_file_name(buf, BUFSIZE);
+ if(buf[0]) {
+ /* we got a file name to try */
+ nread += RAND_load_file(buf, RAND_LOAD_LENGTH);
+ if(seed_enough(nread))
+ return nread;
+ }
+
+ infof(data, "libcurl is now using a weak random seed!\n");
+ return nread;
+}
+
+static void Curl_ossl_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;
+
+ if(!ssl_seeded || data->set.str[STRING_SSL_RANDOM_FILE] ||
+ data->set.str[STRING_SSL_EGDSOCKET]) {
+ ossl_seed(data);
+ ssl_seeded = TRUE;
+ }
+}
+#else
+/* BoringSSL needs no seeding */
+#define Curl_ossl_seed(x)
+#endif
+
+
+#ifndef SSL_FILETYPE_ENGINE
+#define SSL_FILETYPE_ENGINE 42
+#endif
+#ifndef SSL_FILETYPE_PKCS12
+#define SSL_FILETYPE_PKCS12 43
+#endif
+static int do_file_type(const char *type)
+{
+ if(!type || !type[0])
+ return SSL_FILETYPE_PEM;
+ if(Curl_raw_equal(type, "PEM"))
+ return SSL_FILETYPE_PEM;
+ if(Curl_raw_equal(type, "DER"))
+ return SSL_FILETYPE_ASN1;
+ if(Curl_raw_equal(type, "ENG"))
+ return SSL_FILETYPE_ENGINE;
+ if(Curl_raw_equal(type, "P12"))
+ return SSL_FILETYPE_PKCS12;
+ return -1;
+}
+
+#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_LOAD_FOUR_ARGS)
+/*
+ * Supply default password to the engine user interface conversation.
+ * The password is passed by OpenSSL engine from ENGINE_load_private_key()
+ * last argument to the ui and can be obtained by UI_get0_user_data(ui) here.
+ */
+static int ssl_ui_reader(UI *ui, UI_STRING *uis)
+{
+ const char *password;
+ switch(UI_get_string_type(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)) {
+ UI_set_result(ui, uis, password);
+ return 1;
+ }
+ default:
+ break;
+ }
+ return (UI_method_get_reader(UI_OpenSSL()))(ui, uis);
+}
+
+/*
+ * Suppress interactive request for a default password if available.
+ */
+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)) {
+ return 1;
+ }
+ default:
+ break;
+ }
+ return (UI_method_get_writer(UI_OpenSSL()))(ui, uis);
+}
+#endif
+
+static
+int cert_stuff(struct connectdata *conn,
+ SSL_CTX* ctx,
+ char *cert_file,
+ const char *cert_type,
+ char *key_file,
+ const char *key_type)
+{
+ struct SessionHandle *data = conn->data;
+
+ int file_type = do_file_type(cert_type);
+
+ if(cert_file || (file_type == SSL_FILETYPE_ENGINE)) {
+ SSL *ssl;
+ X509 *x509;
+ int cert_done = 0;
+
+ if(data->set.str[STRING_KEY_PASSWD]) {
+ /* set the password in the callback userdata */
+ SSL_CTX_set_default_passwd_cb_userdata(ctx,
+ data->set.str[STRING_KEY_PASSWD]);
+ /* Set passwd callback: */
+ SSL_CTX_set_default_passwd_cb(ctx, passwd_callback);
+ }
+
+
+ switch(file_type) {
+ case SSL_FILETYPE_PEM:
+ /* SSL_CTX_use_certificate_chain_file() only works on PEM files */
+ if(SSL_CTX_use_certificate_chain_file(ctx,
+ cert_file) != 1) {
+ failf(data,
+ "could not load PEM client certificate, OpenSSL error %s, "
+ "(no key found, wrong pass phrase, or wrong file format?)",
+ ERR_error_string(ERR_get_error(), NULL) );
+ return 0;
+ }
+ break;
+
+ case SSL_FILETYPE_ASN1:
+ /* SSL_CTX_use_certificate_file() works with either PEM or ASN1, but
+ we use the case above for PEM so this can only be performed with
+ ASN1 files. */
+ if(SSL_CTX_use_certificate_file(ctx,
+ cert_file,
+ file_type) != 1) {
+ failf(data,
+ "could not load ASN1 client certificate, OpenSSL error %s, "
+ "(no key found, wrong pass phrase, or wrong file format?)",
+ ERR_error_string(ERR_get_error(), NULL) );
+ return 0;
+ }
+ break;
+ case SSL_FILETYPE_ENGINE:
+#if defined(HAVE_OPENSSL_ENGINE_H) && defined(ENGINE_CTRL_GET_CMD_FROM_NAME)
+ {
+ if(data->state.engine) {
+ const char *cmd_name = "LOAD_CERT_CTRL";
+ struct {
+ const char *cert_id;
+ X509 *cert;
+ } params;
+
+ params.cert_id = cert_file;
+ params.cert = NULL;
+
+ /* Does the engine supports LOAD_CERT_CTRL ? */
+ if(!ENGINE_ctrl(data->state.engine, ENGINE_CTRL_GET_CMD_FROM_NAME,
+ 0, (void *)cmd_name, NULL)) {
+ failf(data, "ssl engine does not support loading certificates");
+ return 0;
+ }
+
+ /* Load the certificate from the engine */
+ if(!ENGINE_ctrl_cmd(data->state.engine, cmd_name,
+ 0, &params, NULL, 1)) {
+ failf(data, "ssl engine cannot load client cert with id"
+ " '%s' [%s]", cert_file,
+ ERR_error_string(ERR_get_error(), NULL));
+ return 0;
+ }
+
+ if(!params.cert) {
+ failf(data, "ssl engine didn't initialized the certificate "
+ "properly.");
+ return 0;
+ }
+
+ if(SSL_CTX_use_certificate(ctx, params.cert) != 1) {
+ failf(data, "unable to set client certificate");
+ X509_free(params.cert);
+ return 0;
+ }
+ X509_free(params.cert); /* we don't need the handle any more... */
+ }
+ else {
+ failf(data, "crypto engine not set, can't load certificate");
+ return 0;
+ }
+ }
+ break;
+#else
+ failf(data, "file type ENG for certificate not implemented");
+ return 0;
+#endif
+
+ case SSL_FILETYPE_PKCS12:
+ {
+#ifdef HAVE_PKCS12_SUPPORT
+ FILE *f;
+ PKCS12 *p12;
+ EVP_PKEY *pri;
+ STACK_OF(X509) *ca = NULL;
+ int i;
+
+ f = fopen(cert_file, "rb");
+ if(!f) {
+ failf(data, "could not open PKCS12 file '%s'", cert_file);
+ return 0;
+ }
+ p12 = d2i_PKCS12_fp(f, NULL);
+ fclose(f);
+
+ if(!p12) {
+ failf(data, "error reading PKCS12 file '%s'", cert_file);
+ return 0;
+ }
+
+ PKCS12_PBE_add();
+
+ if(!PKCS12_parse(p12, data->set.str[STRING_KEY_PASSWD], &pri, &x509,
+ &ca)) {
+ failf(data,
+ "could not parse PKCS12 file, check password, OpenSSL error %s",
+ ERR_error_string(ERR_get_error(), NULL) );
+ PKCS12_free(p12);
+ return 0;
+ }
+
+ PKCS12_free(p12);
+
+ if(SSL_CTX_use_certificate(ctx, x509) != 1) {
+ failf(data,
+ "could not load PKCS12 client certificate, OpenSSL error %s",
+ ERR_error_string(ERR_get_error(), NULL) );
+ goto fail;
+ }
+
+ if(SSL_CTX_use_PrivateKey(ctx, pri) != 1) {
+ failf(data, "unable to use private key from PKCS12 file '%s'",
+ cert_file);
+ goto fail;
+ }
+
+ if(!SSL_CTX_check_private_key (ctx)) {
+ failf(data, "private key from PKCS12 file '%s' "
+ "does not match certificate in same file", cert_file);
+ goto fail;
+ }
+ /* Set Certificate Verification chain */
+ if(ca && sk_X509_num(ca)) {
+ for(i = 0; i < sk_X509_num(ca); i++) {
+ /*
+ * Note that sk_X509_pop() is used below to make sure the cert is
+ * removed from the stack properly before getting passed to
+ * SSL_CTX_add_extra_chain_cert(). Previously we used
+ * sk_X509_value() instead, but then we'd clean it in the subsequent
+ * sk_X509_pop_free() call.
+ */
+ X509 *x = sk_X509_pop(ca);
+ if(!SSL_CTX_add_extra_chain_cert(ctx, x)) {
+ failf(data, "cannot add certificate to certificate chain");
+ goto fail;
+ }
+ /* SSL_CTX_add_client_CA() seems to work with either sk_* function,
+ * presumably because it duplicates what we pass to it.
+ */
+ if(!SSL_CTX_add_client_CA(ctx, x)) {
+ failf(data, "cannot add certificate to client CA list");
+ goto fail;
+ }
+ }
+ }
+
+ cert_done = 1;
+ fail:
+ EVP_PKEY_free(pri);
+ X509_free(x509);
+ sk_X509_pop_free(ca, X509_free);
+
+ if(!cert_done)
+ return 0; /* failure! */
+ break;
+#else
+ failf(data, "file type P12 for certificate not supported");
+ return 0;
+#endif
+ }
+ default:
+ failf(data, "not supported file type '%s' for certificate", cert_type);
+ return 0;
+ }
+
+ file_type = do_file_type(key_type);
+
+ switch(file_type) {
+ case SSL_FILETYPE_PEM:
+ if(cert_done)
+ break;
+ if(!key_file)
+ /* cert & key can only be in PEM case in the same file */
+ key_file=cert_file;
+ case SSL_FILETYPE_ASN1:
+ if(SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type) != 1) {
+ failf(data, "unable to set private key file: '%s' type %s",
+ key_file, key_type?key_type:"PEM");
+ return 0;
+ }
+ break;
+ case SSL_FILETYPE_ENGINE:
+#ifdef HAVE_OPENSSL_ENGINE_H
+ { /* XXXX still needs some work */
+ EVP_PKEY *priv_key = NULL;
+ if(data->state.engine) {
+#ifdef HAVE_ENGINE_LOAD_FOUR_ARGS
+ UI_METHOD *ui_method =
+ UI_create_method((char *)"cURL user interface");
+ if(!ui_method) {
+ failf(data, "unable do create OpenSSL user-interface method");
+ return 0;
+ }
+ UI_method_set_opener(ui_method, UI_method_get_opener(UI_OpenSSL()));
+ UI_method_set_closer(ui_method, UI_method_get_closer(UI_OpenSSL()));
+ UI_method_set_reader(ui_method, ssl_ui_reader);
+ UI_method_set_writer(ui_method, ssl_ui_writer);
+#endif
+ /* the typecast below was added to please mingw32 */
+ priv_key = (EVP_PKEY *)
+ ENGINE_load_private_key(data->state.engine, key_file,
+#ifdef HAVE_ENGINE_LOAD_FOUR_ARGS
+ ui_method,
+#endif
+ data->set.str[STRING_KEY_PASSWD]);
+#ifdef HAVE_ENGINE_LOAD_FOUR_ARGS
+ UI_destroy_method(ui_method);
+#endif
+ if(!priv_key) {
+ failf(data, "failed to load private key from crypto engine");
+ return 0;
+ }
+ if(SSL_CTX_use_PrivateKey(ctx, priv_key) != 1) {
+ failf(data, "unable to set private key");
+ EVP_PKEY_free(priv_key);
+ return 0;
+ }
+ EVP_PKEY_free(priv_key); /* we don't need the handle any more... */
+ }
+ else {
+ failf(data, "crypto engine not set, can't load private key");
+ return 0;
+ }
+ }
+ break;
+#else
+ failf(data, "file type ENG for private key not supported");
+ return 0;
+#endif
+ case SSL_FILETYPE_PKCS12:
+ if(!cert_done) {
+ failf(data, "file type P12 for private key not supported");
+ return 0;
+ }
+ break;
+ default:
+ failf(data, "not supported file type for private key");
+ return 0;
+ }
+
+ ssl=SSL_new(ctx);
+ if(!ssl) {
+ failf(data, "unable to create an SSL structure");
+ return 0;
+ }
+
+ x509=SSL_get_certificate(ssl);
+
+ /* This version was provided by Evan Jordan and is supposed to not
+ leak memory as the previous version: */
+ if(x509) {
+ EVP_PKEY *pktmp = X509_get_pubkey(x509);
+ EVP_PKEY_copy_parameters(pktmp, SSL_get_privatekey(ssl));
+ EVP_PKEY_free(pktmp);
+ }
+
+ SSL_free(ssl);
+
+ /* If we are using DSA, we can copy the parameters from
+ * the private key */
+
+
+ /* Now we know that a key and cert have been set against
+ * the SSL context */
+ if(!SSL_CTX_check_private_key(ctx)) {
+ failf(data, "Private key does not match the certificate public key");
+ return 0;
+ }
+ }
+ return 1;
+}
+
+/* returns non-zero on failure */
+static int x509_name_oneline(X509_NAME *a, char *buf, size_t size)
+{
+#if 0
+ return X509_NAME_oneline(a, buf, size);
+#else
+ BIO *bio_out = BIO_new(BIO_s_mem());
+ BUF_MEM *biomem;
+ int rc;
+
+ if(!bio_out)
+ return 1; /* alloc failed! */
+
+ rc = X509_NAME_print_ex(bio_out, a, 0, XN_FLAG_SEP_SPLUS_SPC);
+ BIO_get_mem_ptr(bio_out, &biomem);
+
+ if((size_t)biomem->length < size)
+ size = biomem->length;
+ else
+ size--; /* don't overwrite the buffer end */
+
+ memcpy(buf, biomem->data, size);
+ buf[size]=0;
+
+ BIO_free(bio_out);
+
+ return !rc;
+#endif
+}
+
+/* Return error string for last OpenSSL error
+ */
+static char *SSL_strerror(unsigned long error, char *buf, size_t size)
+{
+ /* OpenSSL 0.9.6 and later has a function named
+ ERR_error_string_n() that takes the size of the buffer as a
+ third argument */
+ ERR_error_string_n(error, buf, size);
+ return buf;
+}
+
+/**
+ * Global SSL init
+ *
+ * @retval 0 error initializing SSL
+ * @retval 1 SSL initialized successfully
+ */
+int Curl_ossl_init(void)
+{
+ OPENSSL_load_builtin_modules();
+
+#ifdef HAVE_ENGINE_LOAD_BUILTIN_ENGINES
+ ENGINE_load_builtin_engines();
+#endif
+
+ /* Lets get nice error messages */
+ SSL_load_error_strings();
+
+ /* Init the global ciphers and digests */
+ if(!SSLeay_add_ssl_algorithms())
+ 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
+
+ CONF_modules_load_file(NULL, NULL,
+ CONF_MFLAGS_DEFAULT_SECTION|
+ CONF_MFLAGS_IGNORE_MISSING_FILE);
+
+ return 1;
+}
+
+/* Global cleanup */
+void Curl_ossl_cleanup(void)
+{
+ /* Free ciphers and digests lists */
+ EVP_cleanup();
+
+#ifdef HAVE_ENGINE_CLEANUP
+ /* Free engine list */
+ ENGINE_cleanup();
+#endif
+
+#ifdef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
+ /* Free OpenSSL ex_data table */
+ CRYPTO_cleanup_all_ex_data();
+#endif
+
+ /* Free OpenSSL error strings */
+ ERR_free_strings();
+
+ /* Free thread local error state, destroying hash upon zero refcount */
+#ifdef HAVE_ERR_REMOVE_THREAD_STATE
+ ERR_remove_thread_state(NULL);
+#else
+ ERR_remove_state(0);
+#endif
+}
+
+/*
+ * This function uses SSL_peek to determine connection status.
+ *
+ * Return codes:
+ * 1 means the connection is still in place
+ * 0 means the connection has been closed
+ * -1 means the connection status is unknown
+ */
+int Curl_ossl_check_cxn(struct connectdata *conn)
+{
+ int rc;
+ char buf;
+
+ rc = SSL_peek(conn->ssl[FIRSTSOCKET].handle, (void*)&buf, 1);
+ if(rc > 0)
+ return 1; /* connection still in place */
+
+ if(rc == 0)
+ return 0; /* connection has been closed */
+
+ return -1; /* connection status unknown */
+}
+
+/* Selects an OpenSSL crypto engine
+ */
+CURLcode Curl_ossl_set_engine(struct SessionHandle *data, const char *engine)
+{
+#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H)
+ ENGINE *e;
+
+#if OPENSSL_VERSION_NUMBER >= 0x00909000L
+ e = ENGINE_by_id(engine);
+#else
+ /* avoid memory leak */
+ for(e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) {
+ const char *e_id = ENGINE_get_id(e);
+ if(!strcmp(engine, e_id))
+ break;
+ }
+#endif
+
+ if(!e) {
+ failf(data, "SSL Engine '%s' not found", engine);
+ return CURLE_SSL_ENGINE_NOTFOUND;
+ }
+
+ if(data->state.engine) {
+ ENGINE_finish(data->state.engine);
+ ENGINE_free(data->state.engine);
+ data->state.engine = NULL;
+ }
+ if(!ENGINE_init(e)) {
+ char buf[256];
+
+ ENGINE_free(e);
+ failf(data, "Failed to initialise SSL Engine '%s':\n%s",
+ engine, SSL_strerror(ERR_get_error(), buf, sizeof(buf)));
+ return CURLE_SSL_ENGINE_INITFAILED;
+ }
+ data->state.engine = e;
+ return CURLE_OK;
+#else
+ (void)engine;
+ failf(data, "SSL Engine not supported");
+ return CURLE_SSL_ENGINE_NOTFOUND;
+#endif
+}
+
+/* Sets engine as default for all SSL operations
+ */
+CURLcode Curl_ossl_set_engine_default(struct SessionHandle *data)
+{
+#ifdef HAVE_OPENSSL_ENGINE_H
+ if(data->state.engine) {
+ if(ENGINE_set_default(data->state.engine, ENGINE_METHOD_ALL) > 0) {
+ infof(data, "set default crypto engine '%s'\n",
+ ENGINE_get_id(data->state.engine));
+ }
+ else {
+ failf(data, "set default crypto engine '%s' failed",
+ ENGINE_get_id(data->state.engine));
+ return CURLE_SSL_ENGINE_SETFAILED;
+ }
+ }
+#else
+ (void) data;
+#endif
+ return CURLE_OK;
+}
+
+/* Return list of OpenSSL crypto engine names.
+ */
+struct curl_slist *Curl_ossl_engines_list(struct SessionHandle *data)
+{
+ struct curl_slist *list = NULL;
+#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H)
+ struct curl_slist *beg;
+ ENGINE *e;
+
+ for(e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) {
+ beg = curl_slist_append(list, ENGINE_get_id(e));
+ if(!beg) {
+ curl_slist_free_all(list);
+ return NULL;
+ }
+ list = beg;
+ }
+#endif
+ (void) data;
+ return list;
+}
+
+
+/*
+ * This function is called when an SSL connection is closed.
+ */
+void Curl_ossl_close(struct connectdata *conn, int sockindex)
+{
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ if(connssl->handle) {
+ (void)SSL_shutdown(connssl->handle);
+ SSL_set_connect_state(connssl->handle);
+
+ SSL_free (connssl->handle);
+ connssl->handle = NULL;
+ }
+ if(connssl->ctx) {
+ SSL_CTX_free (connssl->ctx);
+ connssl->ctx = NULL;
+ }
+}
+
+/*
+ * This function is called to shut down the SSL layer but keep the
+ * socket open (CCC - Clear Command Channel)
+ */
+int Curl_ossl_shutdown(struct connectdata *conn, int sockindex)
+{
+ int retval = 0;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ struct SessionHandle *data = conn->data;
+ char buf[120]; /* We will use this for the OpenSSL error buffer, so it has
+ to be at least 120 bytes long. */
+ unsigned long sslerror;
+ ssize_t nread;
+ int buffsize;
+ int err;
+ int done = 0;
+
+ /* This has only been tested on the proftpd server, and the mod_tls code
+ sends a close notify alert without waiting for a close notify alert in
+ response. Thus we wait for a close notify alert from the server, but
+ we do not send one. Let's hope other servers do the same... */
+
+ if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE)
+ (void)SSL_shutdown(connssl->handle);
+
+ if(connssl->handle) {
+ buffsize = (int)sizeof(buf);
+ while(!done) {
+ int what = Curl_socket_ready(conn->sock[sockindex],
+ CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
+ if(what > 0) {
+ ERR_clear_error();
+
+ /* Something to read, let's do it and hope that it is the close
+ notify alert from the server */
+ nread = (ssize_t)SSL_read(conn->ssl[sockindex].handle, buf,
+ buffsize);
+ err = SSL_get_error(conn->ssl[sockindex].handle, (int)nread);
+
+ switch(err) {
+ case SSL_ERROR_NONE: /* this is not an error */
+ case SSL_ERROR_ZERO_RETURN: /* no more data */
+ /* This is the expected response. There was no data but only
+ the close notify alert */
+ done = 1;
+ break;
+ case SSL_ERROR_WANT_READ:
+ /* there's data pending, re-invoke SSL_read() */
+ infof(data, "SSL_ERROR_WANT_READ\n");
+ break;
+ case SSL_ERROR_WANT_WRITE:
+ /* SSL wants a write. Really odd. Let's bail out. */
+ infof(data, "SSL_ERROR_WANT_WRITE\n");
+ done = 1;
+ break;
+ default:
+ /* openssl/ssl.h says "look at error stack/return value/errno" */
+ sslerror = ERR_get_error();
+ failf(conn->data, "SSL read: %s, errno %d",
+ ERR_error_string(sslerror, buf),
+ SOCKERRNO);
+ done = 1;
+ break;
+ }
+ }
+ else if(0 == what) {
+ /* timeout */
+ failf(data, "SSL shutdown timeout");
+ done = 1;
+ }
+ else {
+ /* anything that gets here is fatally bad */
+ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+ retval = -1;
+ done = 1;
+ }
+ } /* while()-loop for the select() */
+
+ if(data->set.verbose) {
+#ifdef HAVE_SSL_GET_SHUTDOWN
+ switch(SSL_get_shutdown(connssl->handle)) {
+ case SSL_SENT_SHUTDOWN:
+ infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN\n");
+ break;
+ case SSL_RECEIVED_SHUTDOWN:
+ infof(data, "SSL_get_shutdown() returned SSL_RECEIVED_SHUTDOWN\n");
+ break;
+ case SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN:
+ infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN|"
+ "SSL_RECEIVED__SHUTDOWN\n");
+ break;
+ }
+#endif
+ }
+
+ SSL_free (connssl->handle);
+ connssl->handle = NULL;
+ }
+ return retval;
+}
+
+void Curl_ossl_session_free(void *ptr)
+{
+ /* free the ID */
+ SSL_SESSION_free(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)
+{
+#ifdef HAVE_OPENSSL_ENGINE_H
+ if(data->state.engine) {
+ ENGINE_finish(data->state.engine);
+ ENGINE_free(data->state.engine);
+ data->state.engine = NULL;
+ }
+#else
+ (void)data;
+#endif
+}
+
+static int asn1_output(const ASN1_UTCTIME *tm,
+ char *buf,
+ size_t sizeofbuf)
+{
+ const char *asn1_string;
+ int gmt=FALSE;
+ int i;
+ int year=0, month=0, day=0, hour=0, minute=0, second=0;
+
+ i=tm->length;
+ asn1_string=(const char *)tm->data;
+
+ if(i < 10)
+ return 1;
+ if(asn1_string[i-1] == 'Z')
+ gmt=TRUE;
+ for(i=0; i<10; i++)
+ if((asn1_string[i] > '9') || (asn1_string[i] < '0'))
+ return 2;
+
+ year= (asn1_string[0]-'0')*10+(asn1_string[1]-'0');
+ if(year < 50)
+ year+=100;
+
+ month= (asn1_string[2]-'0')*10+(asn1_string[3]-'0');
+ if((month > 12) || (month < 1))
+ return 3;
+
+ day= (asn1_string[4]-'0')*10+(asn1_string[5]-'0');
+ hour= (asn1_string[6]-'0')*10+(asn1_string[7]-'0');
+ minute= (asn1_string[8]-'0')*10+(asn1_string[9]-'0');
+
+ if((asn1_string[10] >= '0') && (asn1_string[10] <= '9') &&
+ (asn1_string[11] >= '0') && (asn1_string[11] <= '9'))
+ second= (asn1_string[10]-'0')*10+(asn1_string[11]-'0');
+
+ snprintf(buf, sizeofbuf,
+ "%04d-%02d-%02d %02d:%02d:%02d %s",
+ year+1900, month, day, hour, minute, second, (gmt?"GMT":""));
+
+ return 0;
+}
+
+/* ====================================================== */
+
+
+/* Quote from RFC2818 section 3.1 "Server Identity"
+
+ If a subjectAltName extension of type dNSName is present, that MUST
+ be used as the identity. Otherwise, the (most specific) Common Name
+ field in the Subject field of the certificate MUST be used. Although
+ the use of the Common Name is existing practice, it is deprecated and
+ Certification Authorities are encouraged to use the dNSName instead.
+
+ Matching is performed using the matching rules specified by
+ [RFC2459]. If more than one identity of a given type is present in
+ the certificate (e.g., more than one dNSName name, a match in any one
+ of the set is considered acceptable.) Names may contain the wildcard
+ character * which is considered to match any single domain name
+ component or component fragment. E.g., *.a.com matches foo.a.com but
+ not bar.foo.a.com. f*.com matches foo.com but not bar.com.
+
+ In some cases, the URI is specified as an IP address rather than a
+ hostname. In this case, the iPAddress subjectAltName must be present
+ in the certificate and must exactly match the IP in the URI.
+
+*/
+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 */
+ int target = GEN_DNS; /* target type, GEN_DNS or GEN_IPADD */
+ size_t addrlen = 0;
+ struct SessionHandle *data = conn->data;
+ STACK_OF(GENERAL_NAME) *altnames;
+#ifdef ENABLE_IPV6
+ struct in6_addr addr;
+#else
+ struct in_addr addr;
+#endif
+ CURLcode result = CURLE_OK;
+
+#ifdef ENABLE_IPV6
+ if(conn->bits.ipv6_ip &&
+ Curl_inet_pton(AF_INET6, conn->host.name, &addr)) {
+ target = GEN_IPADD;
+ addrlen = sizeof(struct in6_addr);
+ }
+ else
+#endif
+ if(Curl_inet_pton(AF_INET, conn->host.name, &addr)) {
+ target = GEN_IPADD;
+ addrlen = sizeof(struct in_addr);
+ }
+
+ /* get a "list" of alternative names */
+ altnames = X509_get_ext_d2i(server_cert, NID_subject_alt_name, NULL, NULL);
+
+ if(altnames) {
+ int numalts;
+ int i;
+
+ /* get amount of alternatives, RFC2459 claims there MUST be at least
+ one, but we don't depend on it... */
+ numalts = sk_GENERAL_NAME_num(altnames);
+
+ /* loop through all alternatives while none has matched */
+ for(i=0; (i<numalts) && (matched != 1); i++) {
+ /* get a handle to alternative name number i */
+ const GENERAL_NAME *check = sk_GENERAL_NAME_value(altnames, i);
+
+ /* only check alternatives of the same type the target is */
+ if(check->type == target) {
+ /* get data and length */
+ const char *altptr = (char *)ASN1_STRING_data(check->d.ia5);
+ size_t altlen = (size_t) ASN1_STRING_length(check->d.ia5);
+
+ switch(target) {
+ case GEN_DNS: /* name/pattern comparison */
+ /* The OpenSSL man page explicitly says: "In general it cannot be
+ assumed that the data returned by ASN1_STRING_data() is null
+ terminated or does not contain embedded nulls." But also that
+ "The actual format of the data will depend on the actual string
+ type itself: for example for and IA5String the data will be ASCII"
+
+ Gisle researched the OpenSSL sources:
+ "I checked the 0.9.6 and 0.9.8 sources before my patch and
+ it always 0-terminates an IA5String."
+ */
+ if((altlen == strlen(altptr)) &&
+ /* if this isn't true, there was an embedded zero in the name
+ string and we cannot match it. */
+ Curl_cert_hostcheck(altptr, conn->host.name))
+ matched = 1;
+ else
+ matched = 0;
+ break;
+
+ case GEN_IPADD: /* IP address comparison */
+ /* compare alternative IP address if the data chunk is the same size
+ our server IP address is */
+ if((altlen == addrlen) && !memcmp(altptr, &addr, altlen))
+ matched = 1;
+ else
+ matched = 0;
+ break;
+ }
+ }
+ }
+ GENERAL_NAMES_free(altnames);
+ }
+
+ if(matched == 1)
+ /* an alternative name matched the server hostname */
+ infof(data, "\t subjectAltName: %s matched\n", conn->host.dispname);
+ else if(matched == 0) {
+ /* an alternative name field existed, but didn't match and then
+ we MUST fail */
+ 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;
+ }
+ else {
+ /* we have to look to the last occurrence of a commonName in the
+ distinguished one to get the most significant one. */
+ int j, i=-1;
+
+/* The following is done because of a bug in 0.9.6b */
+
+ unsigned char *nulstr = (unsigned char *)"";
+ unsigned char *peer_CN = nulstr;
+
+ X509_NAME *name = X509_get_subject_name(server_cert);
+ if(name)
+ while((j = X509_NAME_get_index_by_NID(name, NID_commonName, i))>=0)
+ i=j;
+
+ /* we have the name entry and we will now convert this to a string
+ that we can use for comparison. Doing this we support BMPstring,
+ UTF8 etc. */
+
+ if(i>=0) {
+ ASN1_STRING *tmp =
+ X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, i));
+
+ /* In OpenSSL 0.9.7d and earlier, ASN1_STRING_to_UTF8 fails if the input
+ is already UTF-8 encoded. We check for this case and copy the raw
+ string manually to avoid the problem. This code can be made
+ conditional in the future when OpenSSL has been fixed. Work-around
+ brought by Alexis S. L. Carvalho. */
+ if(tmp) {
+ if(ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) {
+ j = ASN1_STRING_length(tmp);
+ if(j >= 0) {
+ peer_CN = OPENSSL_malloc(j+1);
+ if(peer_CN) {
+ memcpy(peer_CN, ASN1_STRING_data(tmp), j);
+ peer_CN[j] = '\0';
+ }
+ }
+ }
+ else /* not a UTF8 name */
+ j = ASN1_STRING_to_UTF8(&peer_CN, tmp);
+
+ if(peer_CN && (curlx_uztosi(strlen((char *)peer_CN)) != j)) {
+ /* 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;
+ }
+ }
+ }
+
+ if(peer_CN == nulstr)
+ peer_CN = NULL;
+ else {
+ /* convert peer_CN from UTF8 */
+ CURLcode rc = Curl_convert_from_utf8(data, peer_CN, strlen(peer_CN));
+ /* Curl_convert_from_utf8 calls failf if unsuccessful */
+ if(rc) {
+ OPENSSL_free(peer_CN);
+ return rc;
+ }
+ }
+
+ if(result)
+ /* 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;
+ }
+ 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;
+ }
+ else {
+ infof(data, "\t common name: %s (matched)\n", peer_CN);
+ }
+ if(peer_CN)
+ OPENSSL_free(peer_CN);
+ }
+
+ return result;
+}
+
+#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
+ !defined(OPENSSL_IS_BORINGSSL)
+static CURLcode verifystatus(struct connectdata *conn,
+ struct ssl_connect_data *connssl)
+{
+ int i, ocsp_status;
+ const unsigned char *p;
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+
+ OCSP_RESPONSE *rsp = NULL;
+ OCSP_BASICRESP *br = NULL;
+ X509_STORE *st = NULL;
+ STACK_OF(X509) *ch = NULL;
+
+ long len = SSL_get_tlsext_status_ocsp_resp(connssl->handle, &p);
+
+ if(!p) {
+ failf(data, "No OCSP response received");
+ result = CURLE_SSL_INVALIDCERTSTATUS;
+ goto end;
+ }
+
+ rsp = d2i_OCSP_RESPONSE(NULL, &p, len);
+ if(!rsp) {
+ failf(data, "Invalid OCSP response");
+ result = CURLE_SSL_INVALIDCERTSTATUS;
+ goto end;
+ }
+
+ ocsp_status = OCSP_response_status(rsp);
+ if(ocsp_status != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
+ failf(data, "Invalid OCSP response status: %s (%d)",
+ OCSP_response_status_str(ocsp_status), ocsp_status);
+ result = CURLE_SSL_INVALIDCERTSTATUS;
+ goto end;
+ }
+
+ br = OCSP_response_get1_basic(rsp);
+ if(!br) {
+ failf(data, "Invalid OCSP response");
+ result = CURLE_SSL_INVALIDCERTSTATUS;
+ goto end;
+ }
+
+ ch = SSL_get_peer_cert_chain(connssl->handle);
+ st = SSL_CTX_get_cert_store(connssl->ctx);
+
+#if ((OPENSSL_VERSION_NUMBER <= 0x1000201fL) /* Fixed after 1.0.2a */ || \
+ defined(LIBRESSL_VERSION_NUMBER))
+ /* The authorized responder cert in the OCSP response MUST be signed by the
+ peer cert's issuer (see RFC6960 section 4.2.2.2). If that's a root cert,
+ no problem, but if it's an intermediate cert OpenSSL has a bug where it
+ expects this issuer to be present in the chain embedded in the OCSP
+ response. So we add it if necessary. */
+
+ /* First make sure the peer cert chain includes both a peer and an issuer,
+ and the OCSP response contains a responder cert. */
+ if(sk_X509_num(ch) >= 2 && sk_X509_num(br->certs) >= 1) {
+ X509 *responder = sk_X509_value(br->certs, sk_X509_num(br->certs) - 1);
+
+ /* Find issuer of responder cert and add it to the OCSP response chain */
+ for(i = 0; i < sk_X509_num(ch); i++) {
+ X509 *issuer = sk_X509_value(ch, i);
+ if(X509_check_issued(issuer, responder) == X509_V_OK) {
+ if(!OCSP_basic_add1_cert(br, issuer)) {
+ failf(data, "Could not add issuer cert to OCSP response");
+ result = CURLE_SSL_INVALIDCERTSTATUS;
+ goto end;
+ }
+ }
+ }
+ }
+#endif
+
+ if(OCSP_basic_verify(br, ch, st, 0) <= 0) {
+ failf(data, "OCSP response verification failed");
+ result = CURLE_SSL_INVALIDCERTSTATUS;
+ goto end;
+ }
+
+ for(i = 0; i < OCSP_resp_count(br); i++) {
+ int cert_status, crl_reason;
+ OCSP_SINGLERESP *single = NULL;
+
+ ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
+
+ if(!(single = OCSP_resp_get0(br, i)))
+ continue;
+
+ cert_status = OCSP_single_get0_status(single, &crl_reason, &rev,
+ &thisupd, &nextupd);
+
+ if(!OCSP_check_validity(thisupd, nextupd, 300L, -1L)) {
+ failf(data, "OCSP response has expired");
+ result = CURLE_SSL_INVALIDCERTSTATUS;
+ goto end;
+ }
+
+ infof(data, "SSL certificate status: %s (%d)\n",
+ OCSP_cert_status_str(cert_status), cert_status);
+
+ switch(cert_status) {
+ case V_OCSP_CERTSTATUS_GOOD:
+ break;
+
+ case V_OCSP_CERTSTATUS_REVOKED:
+ result = CURLE_SSL_INVALIDCERTSTATUS;
+
+ failf(data, "SSL certificate revocation reason: %s (%d)",
+ OCSP_crl_reason_str(crl_reason), crl_reason);
+ goto end;
+
+ case V_OCSP_CERTSTATUS_UNKNOWN:
+ result = CURLE_SSL_INVALIDCERTSTATUS;
+ goto end;
+ }
+ }
+
+end:
+ if(br) OCSP_BASICRESP_free(br);
+ OCSP_RESPONSE_free(rsp);
+
+ return result;
+}
+#endif
+
+#endif /* USE_OPENSSL */
+
+/* The SSL_CTRL_SET_MSG_CALLBACK doesn't exist in ancient OpenSSL versions
+ and thus this cannot be done there. */
+#ifdef SSL_CTRL_SET_MSG_CALLBACK
+
+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:
+ return "Error";
+ case SSL2_MT_CLIENT_HELLO:
+ return "Client hello";
+ case SSL2_MT_CLIENT_MASTER_KEY:
+ return "Client key";
+ case SSL2_MT_CLIENT_FINISHED:
+ return "Client finished";
+ case SSL2_MT_SERVER_HELLO:
+ return "Server hello";
+ case SSL2_MT_SERVER_VERIFY:
+ return "Server verify";
+ case SSL2_MT_SERVER_FINISHED:
+ return "Server finished";
+ case SSL2_MT_REQUEST_CERTIFICATE:
+ return "Request CERT";
+ case SSL2_MT_CLIENT_CERTIFICATE:
+ return "Client CERT";
+ }
+ }
+ else
+#endif
+ if(ssl_ver == SSL3_VERSION_MAJOR) {
+ switch (msg) {
+ case SSL3_MT_HELLO_REQUEST:
+ return "Hello request";
+ case SSL3_MT_CLIENT_HELLO:
+ return "Client hello";
+ case SSL3_MT_SERVER_HELLO:
+ return "Server hello";
+ case SSL3_MT_NEWSESSION_TICKET:
+ return "Newsession Ticket";
+ case SSL3_MT_CERTIFICATE:
+ return "Certificate";
+ case SSL3_MT_SERVER_KEY_EXCHANGE:
+ return "Server key exchange";
+ case SSL3_MT_CLIENT_KEY_EXCHANGE:
+ return "Client key exchange";
+ case SSL3_MT_CERTIFICATE_REQUEST:
+ return "Request CERT";
+ case SSL3_MT_SERVER_DONE:
+ return "Server finished";
+ case SSL3_MT_CERTIFICATE_VERIFY:
+ return "CERT verify";
+ case SSL3_MT_FINISHED:
+ return "Finished";
+#ifdef SSL3_MT_CERTIFICATE_STATUS
+ case SSL3_MT_CERTIFICATE_STATUS:
+ return "Certificate Status";
+#endif
+ }
+ }
+ return "Unknown";
+}
+
+static const char *tls_rt_type(int type)
+{
+ switch(type) {
+#ifdef SSL3_RT_HEADER
+ case SSL3_RT_HEADER:
+ return "TLS header";
+#endif
+ case SSL3_RT_CHANGE_CIPHER_SPEC:
+ return "TLS change cipher";
+ case SSL3_RT_ALERT:
+ return "TLS alert";
+ case SSL3_RT_HANDSHAKE:
+ return "TLS handshake";
+ case SSL3_RT_APPLICATION_DATA:
+ return "TLS app data";
+ default:
+ return "TLS Unknown";
+ }
+}
+
+
+/*
+ * Our callback from the SSL/TLS layers.
+ */
+static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
+ const void *buf, size_t len, SSL *ssl,
+ void *userp)
+{
+ 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;
+ struct connectdata *conn = userp;
+
+ if(!conn || !conn->data || !conn->data->set.fdebug ||
+ (direction != 0 && direction != 1))
+ return;
+
+ data = conn->data;
+
+ switch(ssl_ver) {
+#ifdef SSL2_VERSION /* removed in recent versions */
+ case SSL2_VERSION:
+ 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
+ case 0:
+ break;
+ default:
+ snprintf(unknown, sizeof(unknown), "(%x)", ssl_ver);
+ verstr = unknown;
+ break;
+ }
+
+ if(ssl_ver) {
+ /* the info given when the version is zero is not that useful for us */
+
+ ssl_ver >>= 8; /* check the upper 8 bits only below */
+
+ /* SSLv2 doesn't seem to have TLS record-type headers, so OpenSSL
+ * always pass-up content-type as 0. But the interesting message-type
+ * is at 'buf[0]'.
+ */
+ if(ssl_ver == SSL3_VERSION_MAJOR && content_type)
+ tls_rt_name = tls_rt_type(content_type);
+ else
+ tls_rt_name = "";
+
+ msg_type = *(char*)buf;
+ msg_name = ssl_msg_type(ssl_ver, msg_type);
+
+ txt_len = snprintf(ssl_buf, sizeof(ssl_buf), "%s (%s), %s, %s (%d):\n",
+ verstr, direction?"OUT":"IN",
+ 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 :
+ CURLINFO_SSL_DATA_IN, (char *)buf, len, NULL);
+ (void) ssl;
+}
+#endif
+
+#ifdef USE_OPENSSL
+/* ====================================================== */
+
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+# define use_sni(x) sni = (x)
+#else
+# define use_sni(x) Curl_nop_stmt
+#endif
+
+/* Check for OpenSSL 1.0.2 which has ALPN support. */
+#undef HAS_ALPN
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L \
+ && !defined(OPENSSL_NO_TLSEXT)
+# 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
+#endif
+
+#ifdef HAS_NPN
+
+/*
+ * in is a list of lenght prefixed strings. this function has to select
+ * the protocol we want to use from the list and write its string into out.
+ */
+
+static int
+select_next_protocol(unsigned char **out, unsigned char *outlen,
+ const unsigned char *in, unsigned int inlen,
+ const char *key, unsigned int keylen)
+{
+ unsigned int i;
+ for(i = 0; i + keylen <= inlen; i += in[i] + 1) {
+ if(memcmp(&in[i + 1], key, keylen) == 0) {
+ *out = (unsigned char *) &in[i + 1];
+ *outlen = in[i];
+ return 0;
+ }
+ }
+ return -1;
+}
+
+static int
+select_next_proto_cb(SSL *ssl,
+ unsigned char **out, unsigned char *outlen,
+ const unsigned char *in, unsigned int inlen,
+ void *arg)
+{
+ struct connectdata *conn = (struct connectdata*) arg;
+
+ (void)ssl;
+
+#ifdef USE_NGHTTP2
+ if(conn->data->set.httpversion == CURL_HTTP_VERSION_2_0 &&
+ !select_next_protocol(out, outlen, in, inlen, NGHTTP2_PROTO_VERSION_ID,
+ NGHTTP2_PROTO_VERSION_ID_LEN)) {
+ infof(conn->data, "NPN, negotiated HTTP2 (%s)\n",
+ NGHTTP2_PROTO_VERSION_ID);
+ conn->negnpn = CURL_HTTP_VERSION_2_0;
+ return SSL_TLSEXT_ERR_OK;
+ }
+#endif
+
+ if(!select_next_protocol(out, outlen, in, inlen, ALPN_HTTP_1_1,
+ ALPN_HTTP_1_1_LENGTH)) {
+ infof(conn->data, "NPN, negotiated HTTP1.1\n");
+ conn->negnpn = CURL_HTTP_VERSION_1_1;
+ return SSL_TLSEXT_ERR_OK;
+ }
+
+ infof(conn->data, "NPN, no overlap, use HTTP1.1\n");
+ *out = (unsigned char *)ALPN_HTTP_1_1;
+ *outlen = ALPN_HTTP_1_1_LENGTH;
+ conn->negnpn = CURL_HTTP_VERSION_1_1;
+
+ return SSL_TLSEXT_ERR_OK;
+}
+#endif /* HAS_NPN */
+
+static const char *
+get_ssl_version_txt(SSL *ssl)
+{
+ if(!ssl)
+ return "";
+
+ switch(SSL_version(ssl)) {
+#if OPENSSL_VERSION_NUMBER >= 0x1000100FL
+ case TLS1_2_VERSION:
+ return "TLSv1.2";
+ case TLS1_1_VERSION:
+ return "TLSv1.1";
+#endif
+ case TLS1_VERSION:
+ return "TLSv1.0";
+ case SSL3_VERSION:
+ return "SSLv3";
+ case SSL2_VERSION:
+ return "SSLv2";
+ }
+ return "unknown";
+}
+
+static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
+{
+ CURLcode result = 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;
+ curl_socket_t sockfd = conn->sock[sockindex];
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ long ctx_options;
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+ bool sni;
+#ifdef ENABLE_IPV6
+ struct in6_addr addr;
+#else
+ struct in_addr addr;
+#endif
+#endif
+
+ DEBUGASSERT(ssl_connect_1 == connssl->connecting_state);
+
+ /* Make funny stuff to get random input */
+ Curl_ossl_seed(data);
+
+ data->set.ssl.certverifyresult = !X509_V_OK;
+
+ /* 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:
+ case CURL_SSLVERSION_TLSv1:
+ case CURL_SSLVERSION_TLSv1_0:
+ case CURL_SSLVERSION_TLSv1_1:
+ case CURL_SSLVERSION_TLSv1_2:
+ /* it will be handled later with the context options */
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
+ !defined(LIBRESSL_VERSION_NUMBER) && !defined(OPENSSL_IS_BORINGSSL)
+ req_method = TLS_client_method();
+#else
+ req_method = SSLv23_client_method();
+#endif
+ use_sni(TRUE);
+ break;
+ case CURL_SSLVERSION_SSLv2:
+#ifdef OPENSSL_NO_SSL2
+ failf(data, "OpenSSL was built without SSLv2 support");
+ return CURLE_NOT_BUILT_IN;
+#else
+#ifdef USE_TLS_SRP
+ if(data->set.ssl.authtype == CURL_TLSAUTH_SRP)
+ return CURLE_SSL_CONNECT_ERROR;
+#endif
+ req_method = SSLv2_client_method();
+ use_sni(FALSE);
+ break;
+#endif
+ case CURL_SSLVERSION_SSLv3:
+#ifdef OPENSSL_NO_SSL3_METHOD
+ failf(data, "OpenSSL was built without SSLv3 support");
+ return CURLE_NOT_BUILT_IN;
+#else
+#ifdef USE_TLS_SRP
+ if(data->set.ssl.authtype == CURL_TLSAUTH_SRP)
+ return CURLE_SSL_CONNECT_ERROR;
+#endif
+ req_method = SSLv3_client_method();
+ use_sni(FALSE);
+ break;
+#endif
+ }
+
+ if(connssl->ctx)
+ SSL_CTX_free(connssl->ctx);
+ connssl->ctx = SSL_CTX_new(req_method);
+
+ if(!connssl->ctx) {
+ failf(data, "SSL: couldn't create a context: %s",
+ ERR_error_string(ERR_peek_error(), NULL));
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+#ifdef SSL_MODE_RELEASE_BUFFERS
+ SSL_CTX_set_mode(connssl->ctx, SSL_MODE_RELEASE_BUFFERS);
+#endif
+
+#ifdef SSL_CTRL_SET_MSG_CALLBACK
+ if(data->set.fdebug && data->set.verbose) {
+ /* the SSL trace callback is only used for verbose logging */
+ SSL_CTX_set_msg_callback(connssl->ctx, ssl_tls_trace);
+ SSL_CTX_set_msg_callback_arg(connssl->ctx, conn);
+ }
+#endif
+
+ /* OpenSSL contains code to work-around lots of bugs and flaws in various
+ SSL-implementations. SSL_CTX_set_options() is used to enabled those
+ work-arounds. The man page for this option states that SSL_OP_ALL enables
+ all the work-arounds and that "It is usually safe to use SSL_OP_ALL to
+ enable the bug workaround options if compatibility with somewhat broken
+ implementations is desired."
+
+ The "-no_ticket" option was introduced in Openssl0.9.8j. It's a flag to
+ disable "rfc4507bis session ticket support". rfc4507bis was later turned
+ into the proper RFC5077 it seems: https://tools.ietf.org/html/rfc5077
+
+ The enabled extension concerns the session management. I wonder how often
+ libcurl stops a connection and then resumes a TLS session. also, sending
+ the session data is some overhead. .I suggest that you just use your
+ proposed patch (which explicitly disables TICKET).
+
+ If someone writes an application with libcurl and openssl who wants to
+ enable the feature, one can do this in the SSL callback.
+
+ SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option enabling allowed proper
+ interoperability with web server Netscape Enterprise Server 2.0.1 which
+ was released back in 1996.
+
+ Due to CVE-2010-4180, option SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG has
+ become ineffective as of OpenSSL 0.9.8q and 1.0.0c. In order to mitigate
+ CVE-2010-4180 when using previous OpenSSL versions we no longer enable
+ this option regardless of OpenSSL version and SSL_OP_ALL definition.
+
+ OpenSSL added a work-around for a SSL 3.0/TLS 1.0 CBC vulnerability
+ (https://www.openssl.org/~bodo/tls-cbc.txt). In 0.9.6e they added a bit to
+ SSL_OP_ALL that _disables_ that work-around despite the fact that
+ SSL_OP_ALL is documented to do "rather harmless" workarounds. In order to
+ keep the secure work-around, the SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit
+ must not be set.
+ */
+
+ ctx_options = SSL_OP_ALL;
+
+#ifdef SSL_OP_NO_TICKET
+ ctx_options |= SSL_OP_NO_TICKET;
+#endif
+
+#ifdef SSL_OP_NO_COMPRESSION
+ ctx_options |= SSL_OP_NO_COMPRESSION;
+#endif
+
+#ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
+ /* mitigate CVE-2010-4180 */
+ ctx_options &= ~SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG;
+#endif
+
+#ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
+ /* unless the user explicitly ask to allow the protocol vulnerability we
+ use the work-around */
+ if(!conn->data->set.ssl_enable_beast)
+ ctx_options &= ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
+#endif
+
+ switch(data->set.ssl.version) {
+ case CURL_SSLVERSION_SSLv3:
+#ifdef USE_TLS_SRP
+ if(data->set.ssl.authtype == CURL_TLSAUTH_SRP) {
+ infof(data, "Set version TLSv1.x for SRP authorisation\n");
+ }
+#endif
+ ctx_options |= SSL_OP_NO_SSLv2;
+ ctx_options |= SSL_OP_NO_TLSv1;
+#if OPENSSL_VERSION_NUMBER >= 0x1000100FL
+ ctx_options |= SSL_OP_NO_TLSv1_1;
+ ctx_options |= SSL_OP_NO_TLSv1_2;
+#endif
+ break;
+
+ case CURL_SSLVERSION_DEFAULT:
+ case CURL_SSLVERSION_TLSv1:
+ ctx_options |= SSL_OP_NO_SSLv2;
+ ctx_options |= SSL_OP_NO_SSLv3;
+ break;
+
+ case CURL_SSLVERSION_TLSv1_0:
+ ctx_options |= SSL_OP_NO_SSLv2;
+ ctx_options |= SSL_OP_NO_SSLv3;
+#if OPENSSL_VERSION_NUMBER >= 0x1000100FL
+ ctx_options |= SSL_OP_NO_TLSv1_1;
+ ctx_options |= SSL_OP_NO_TLSv1_2;
+#endif
+ break;
+
+#if OPENSSL_VERSION_NUMBER >= 0x1000100FL
+ case CURL_SSLVERSION_TLSv1_1:
+ ctx_options |= SSL_OP_NO_SSLv2;
+ ctx_options |= SSL_OP_NO_SSLv3;
+ ctx_options |= SSL_OP_NO_TLSv1;
+ ctx_options |= SSL_OP_NO_TLSv1_2;
+ break;
+
+ case CURL_SSLVERSION_TLSv1_2:
+ ctx_options |= SSL_OP_NO_SSLv2;
+ ctx_options |= SSL_OP_NO_SSLv3;
+ ctx_options |= SSL_OP_NO_TLSv1;
+ ctx_options |= SSL_OP_NO_TLSv1_1;
+ break;
+#endif
+
+#ifndef OPENSSL_NO_SSL2
+ case CURL_SSLVERSION_SSLv2:
+ ctx_options |= SSL_OP_NO_SSLv3;
+ ctx_options |= SSL_OP_NO_TLSv1;
+#if OPENSSL_VERSION_NUMBER >= 0x1000100FL
+ ctx_options |= SSL_OP_NO_TLSv1_1;
+ ctx_options |= SSL_OP_NO_TLSv1_2;
+#endif
+ break;
+#endif
+
+ default:
+ failf(data, "Unsupported SSL protocol version");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ SSL_CTX_set_options(connssl->ctx, ctx_options);
+
+#ifdef HAS_NPN
+ if(data->set.ssl_enable_npn)
+ SSL_CTX_set_next_proto_select_cb(connssl->ctx, select_next_proto_cb, conn);
+#endif
+
+#ifdef HAS_ALPN
+ if(data->set.ssl_enable_alpn) {
+ int cur = 0;
+ unsigned char protocols[128];
+
+#ifdef USE_NGHTTP2
+ if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN;
+
+ memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID,
+ NGHTTP2_PROTO_VERSION_ID_LEN);
+ cur += NGHTTP2_PROTO_VERSION_ID_LEN;
+ infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
+ }
+#endif
+
+ protocols[cur++] = ALPN_HTTP_1_1_LENGTH;
+ memcpy(&protocols[cur], ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH);
+ cur += ALPN_HTTP_1_1_LENGTH;
+ infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1);
+
+ /* expects length prefixed preference ordered list of protocols in wire
+ * format
+ */
+ SSL_CTX_set_alpn_protos(connssl->ctx, protocols, cur);
+ }
+#endif
+
+ if(data->set.str[STRING_CERT] || data->set.str[STRING_CERT_TYPE]) {
+ if(!cert_stuff(conn,
+ connssl->ctx,
+ data->set.str[STRING_CERT],
+ data->set.str[STRING_CERT_TYPE],
+ data->set.str[STRING_KEY],
+ data->set.str[STRING_KEY_TYPE])) {
+ /* failf() is already done in cert_stuff() */
+ return CURLE_SSL_CERTPROBLEM;
+ }
+ }
+
+ ciphers = data->set.str[STRING_SSL_CIPHER_LIST];
+ if(!ciphers)
+ ciphers = (char *)DEFAULT_CIPHER_SELECTION;
+ if(!SSL_CTX_set_cipher_list(connssl->ctx, ciphers)) {
+ failf(data, "failed setting cipher list: %s", ciphers);
+ return CURLE_SSL_CIPHER;
+ }
+ infof(data, "Cipher selection: %s\n", ciphers);
+
+#ifdef USE_TLS_SRP
+ if(data->set.ssl.authtype == CURL_TLSAUTH_SRP) {
+ infof(data, "Using TLS-SRP username: %s\n", data->set.ssl.username);
+
+ if(!SSL_CTX_set_srp_username(connssl->ctx, data->set.ssl.username)) {
+ failf(data, "Unable to set SRP user name");
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ }
+ if(!SSL_CTX_set_srp_password(connssl->ctx, data->set.ssl.password)) {
+ failf(data, "failed setting SRP password");
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ }
+ if(!data->set.str[STRING_SSL_CIPHER_LIST]) {
+ infof(data, "Setting cipher list SRP\n");
+
+ if(!SSL_CTX_set_cipher_list(connssl->ctx, "SRP")) {
+ failf(data, "failed setting SRP cipher list");
+ return CURLE_SSL_CIPHER;
+ }
+ }
+ }
+#endif
+ if(data->set.str[STRING_SSL_CAFILE] || data->set.str[STRING_SSL_CAPATH]) {
+ /* tell SSL where to find CA certificates that are used to verify
+ the servers certificate. */
+ if(!SSL_CTX_load_verify_locations(connssl->ctx,
+ 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. */
+ failf(data, "error setting certificate verify locations:\n"
+ " CAfile: %s\n CApath: %s",
+ data->set.str[STRING_SSL_CAFILE]?
+ data->set.str[STRING_SSL_CAFILE]: "none",
+ data->set.str[STRING_SSL_CAPATH]?
+ data->set.str[STRING_SSL_CAPATH] : "none");
+ return CURLE_SSL_CACERT_BADFILE;
+ }
+ else {
+ /* Just continue with a warning if no strict certificate verification
+ is required. */
+ infof(data, "error setting certificate verify locations,"
+ " continuing anyway:\n");
+ }
+ }
+ else {
+ /* Everything is fine. */
+ infof(data, "successfully set certificate verify locations:\n");
+ }
+ infof(data,
+ " CAfile: %s\n"
+ " CApath: %s\n",
+ data->set.str[STRING_SSL_CAFILE] ? data->set.str[STRING_SSL_CAFILE]:
+ "none",
+ data->set.str[STRING_SSL_CAPATH] ? data->set.str[STRING_SSL_CAPATH]:
+ "none");
+ }
+
+ if(data->set.str[STRING_SSL_CRLFILE]) {
+ /* tell SSL where to find CRL file that is used to check certificate
+ * revocation */
+ lookup=X509_STORE_add_lookup(SSL_CTX_get_cert_store(connssl->ctx),
+ X509_LOOKUP_file());
+ if(!lookup ||
+ (!X509_load_crl_file(lookup, data->set.str[STRING_SSL_CRLFILE],
+ X509_FILETYPE_PEM)) ) {
+ failf(data, "error loading CRL file: %s",
+ data->set.str[STRING_SSL_CRLFILE]);
+ return CURLE_SSL_CRL_BADFILE;
+ }
+ else {
+ /* Everything is fine. */
+ infof(data, "successfully load CRL file:\n");
+ X509_STORE_set_flags(SSL_CTX_get_cert_store(connssl->ctx),
+ X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL);
+ }
+ infof(data,
+ " CRLfile: %s\n", data->set.str[STRING_SSL_CRLFILE] ?
+ data->set.str[STRING_SSL_CRLFILE]: "none");
+ }
+
+ /* Try building a chain using issuers in the trusted store first to avoid
+ problems with server-sent legacy intermediates.
+ Newer versions of OpenSSL do alternate chain checking by default which
+ gives us the same fix without as much of a performance hit (slight), so we
+ prefer that if available.
+ https://rt.openssl.org/Ticket/Display.html?id=3621&user=guest&pass=guest
+ */
+#if defined(X509_V_FLAG_TRUSTED_FIRST) && !defined(X509_V_FLAG_NO_ALT_CHAINS)
+ if(data->set.ssl.verifypeer) {
+ X509_STORE_set_flags(SSL_CTX_get_cert_store(connssl->ctx),
+ X509_V_FLAG_TRUSTED_FIRST);
+ }
+#endif
+
+ /* SSL always tries to verify the peer, this only says whether it should
+ * fail to connect if the verification fails, or if it should continue
+ * anyway. In the latter case the result of the verification is checked with
+ * SSL_get_verify_result() below. */
+ SSL_CTX_set_verify(connssl->ctx,
+ data->set.ssl.verifypeer?SSL_VERIFY_PEER:SSL_VERIFY_NONE,
+ NULL);
+
+ /* 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) {
+ failf(data, "error signaled by ssl ctx callback");
+ return result;
+ }
+ }
+
+ /* Lets make an SSL structure */
+ if(connssl->handle)
+ SSL_free(connssl->handle);
+ connssl->handle = SSL_new(connssl->ctx);
+ if(!connssl->handle) {
+ failf(data, "SSL: couldn't create a context (handle)!");
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
+ !defined(OPENSSL_IS_BORINGSSL)
+ if(data->set.ssl.verifystatus)
+ SSL_set_tlsext_status_type(connssl->handle, TLSEXT_STATUSTYPE_ocsp);
+#endif
+
+ SSL_set_connect_state(connssl->handle);
+
+ connssl->server_cert = 0x0;
+
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+ if((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) &&
+#ifdef ENABLE_IPV6
+ (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) &&
+#endif
+ sni &&
+ !SSL_set_tlsext_host_name(connssl->handle, conn->host.name))
+ infof(data, "WARNING: failed to configure server name indication (SNI) "
+ "TLS extension\n");
+#endif
+
+ /* Check if there's a cached ID we can/should use here! */
+ if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL)) {
+ /* we got a session id, use it! */
+ if(!SSL_set_session(connssl->handle, ssl_sessionid)) {
+ failf(data, "SSL: SSL_set_session failed: %s",
+ ERR_error_string(ERR_get_error(), NULL));
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ /* Informational message */
+ infof (data, "SSL re-using session ID\n");
+ }
+
+ /* pass the raw socket into the SSL layers */
+ if(!SSL_set_fd(connssl->handle, (int)sockfd)) {
+ failf(data, "SSL: SSL_set_fd failed: %s",
+ ERR_error_string(ERR_get_error(), NULL));
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ connssl->connecting_state = ssl_connect_2;
+
+ return CURLE_OK;
+}
+
+static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ int err;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ DEBUGASSERT(ssl_connect_2 == connssl->connecting_state
+ || ssl_connect_2_reading == connssl->connecting_state
+ || ssl_connect_2_writing == connssl->connecting_state);
+
+ ERR_clear_error();
+
+ err = SSL_connect(connssl->handle);
+
+ /* 1 is fine
+ 0 is "not successful but was shut down controlled"
+ <0 is "handshake was not successful, because a fatal error occurred" */
+ if(1 != err) {
+ int detail = SSL_get_error(connssl->handle, err);
+
+ if(SSL_ERROR_WANT_READ == detail) {
+ connssl->connecting_state = ssl_connect_2_reading;
+ return CURLE_OK;
+ }
+ else if(SSL_ERROR_WANT_WRITE == detail) {
+ connssl->connecting_state = ssl_connect_2_writing;
+ return CURLE_OK;
+ }
+ else {
+ /* untreated error */
+ unsigned long errdetail;
+ char error_buffer[256]; /* OpenSSL documents that this must be at least
+ 256 bytes long. */
+ CURLcode result;
+ const char *cert_problem = NULL;
+ long lerr;
+
+ connssl->connecting_state = ssl_connect_2; /* the connection failed,
+ we're not waiting for
+ anything else. */
+
+ errdetail = ERR_get_error(); /* Gets the earliest error code from the
+ thread's error queue and removes the
+ entry. */
+
+ switch(errdetail) {
+ case 0x1407E086:
+ /* 1407E086:
+ SSL routines:
+ SSL2_SET_CERTIFICATE:
+ certificate verify failed */
+ /* fall-through */
+ case 0x14090086:
+ /* 14090086:
+ SSL routines:
+ SSL3_GET_SERVER_CERTIFICATE:
+ certificate verify failed */
+ result = CURLE_SSL_CACERT;
+
+ lerr = SSL_get_verify_result(connssl->handle);
+ if(lerr != X509_V_OK) {
+ snprintf(error_buffer, sizeof(error_buffer),
+ "SSL certificate problem: %s",
+ X509_verify_cert_error_string(lerr));
+ }
+ else
+ cert_problem = "SSL certificate problem, verify that the CA cert is"
+ " OK.";
+
+ break;
+ default:
+ result = CURLE_SSL_CONNECT_ERROR;
+ SSL_strerror(errdetail, error_buffer, sizeof(error_buffer));
+ break;
+ }
+
+ /* detail is already set to the SSL error above */
+
+ /* If we e.g. use SSLv2 request-method and the server doesn't like us
+ * (RST connection etc.), OpenSSL gives no explanation whatsoever and
+ * the SO_ERROR is also lost.
+ */
+ if(CURLE_SSL_CONNECT_ERROR == result && errdetail == 0) {
+ failf(data, "Unknown SSL protocol error in connection to %s:%ld ",
+ conn->host.name, conn->remote_port);
+ return result;
+ }
+
+ /* Could be a CERT problem */
+ failf(data, "%s%s", cert_problem ? cert_problem : "", error_buffer);
+
+ return result;
+ }
+ }
+ else {
+ /* we have been connected fine, we're not waiting for anything else. */
+ connssl->connecting_state = ssl_connect_3;
+
+ /* Informational message */
+ infof(data, "SSL connection using %s / %s\n",
+ get_ssl_version_txt(connssl->handle),
+ SSL_get_cipher(connssl->handle));
+
+#ifdef HAS_ALPN
+ /* Sets data and len to negotiated protocol, len is 0 if no protocol was
+ * negotiated
+ */
+ if(data->set.ssl_enable_alpn) {
+ const unsigned char* neg_protocol;
+ unsigned int len;
+ SSL_get0_alpn_selected(connssl->handle, &neg_protocol, &len);
+ if(len != 0) {
+ infof(data, "ALPN, server accepted to use %.*s\n", len, neg_protocol);
+
+#ifdef USE_NGHTTP2
+ if(len == NGHTTP2_PROTO_VERSION_ID_LEN &&
+ !memcmp(NGHTTP2_PROTO_VERSION_ID, neg_protocol, len)) {
+ conn->negnpn = CURL_HTTP_VERSION_2_0;
+ }
+ else
+#endif
+ if(len == ALPN_HTTP_1_1_LENGTH &&
+ !memcmp(ALPN_HTTP_1_1, neg_protocol, ALPN_HTTP_1_1_LENGTH)) {
+ conn->negnpn = CURL_HTTP_VERSION_1_1;
+ }
+ }
+ else
+ infof(data, "ALPN, server did not agree to a protocol\n");
+ }
+#endif
+
+ return CURLE_OK;
+ }
+}
+
+static int asn1_object_dump(ASN1_OBJECT *a, char *buf, size_t len)
+{
+ int i, ilen;
+
+ if((ilen = (int)len) < 0)
+ return 1; /* buffer too big */
+
+ i = i2t_ASN1_OBJECT(buf, ilen, a);
+
+ if(i >= ilen)
+ return 1; /* buffer too small */
+
+ return 0;
+}
+
+static void pubkey_show(struct SessionHandle *data,
+ int num,
+ const char *type,
+ const char *name,
+ unsigned char *raw,
+ int len)
+{
+ size_t left;
+ int i;
+ char namebuf[32];
+ char *buffer;
+
+ left = len*3 + 1;
+ buffer = malloc(left);
+ if(buffer) {
+ char *ptr=buffer;
+ snprintf(namebuf, sizeof(namebuf), "%s(%s)", type, name);
+ for(i=0; i< len; i++) {
+ snprintf(ptr, left, "%02x:", raw[i]);
+ ptr += 3;
+ left -= 3;
+ }
+ infof(data, " %s: %s\n", namebuf, buffer);
+ Curl_ssl_push_certinfo(data, num, namebuf, buffer);
+ free(buffer);
+ }
+}
+
+#define print_pubkey_BN(_type, _name, _num) \
+do { \
+ if(pubkey->pkey._type->_name) { \
+ int len = BN_num_bytes(pubkey->pkey._type->_name); \
+ if(len < CERTBUFFERSIZE) { \
+ BN_bn2bin(pubkey->pkey._type->_name, (unsigned char*)bufp); \
+ bufp[len] = 0; \
+ pubkey_show(data, _num, #_type, #_name, (unsigned char*)bufp, len); \
+ } \
+ } \
+} WHILE_FALSE
+
+static int X509V3_ext(struct SessionHandle *data,
+ int certnum,
+ STACK_OF(X509_EXTENSION) *exts)
+{
+ int i;
+ size_t j;
+
+ if(sk_X509_EXTENSION_num(exts) <= 0)
+ /* no extensions, bail out */
+ return 1;
+
+ for(i=0; i<sk_X509_EXTENSION_num(exts); i++) {
+ ASN1_OBJECT *obj;
+ X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, i);
+ BUF_MEM *biomem;
+ char buf[512];
+ char *ptr=buf;
+ char namebuf[128];
+ BIO *bio_out = BIO_new(BIO_s_mem());
+
+ if(!bio_out)
+ return 1;
+
+ obj = X509_EXTENSION_get_object(ext);
+
+ asn1_object_dump(obj, namebuf, sizeof(namebuf));
+
+ infof(data, "%s: %s\n", namebuf,
+ X509_EXTENSION_get_critical(ext)?"(critical)":"");
+
+ if(!X509V3_EXT_print(bio_out, ext, 0, 0))
+ ASN1_STRING_print(bio_out, (ASN1_STRING *)X509_EXTENSION_get_data(ext));
+
+ BIO_get_mem_ptr(bio_out, &biomem);
+
+ /* biomem->length bytes at biomem->data, this little loop here is only
+ done for the infof() call, we send the "raw" data to the certinfo
+ function */
+ for(j=0; j<(size_t)biomem->length; j++) {
+ const char *sep="";
+ if(biomem->data[j] == '\n') {
+ sep=", ";
+ j++; /* skip the newline */
+ };
+ while((j<(size_t)biomem->length) && (biomem->data[j] == ' '))
+ j++;
+ if(j<(size_t)biomem->length)
+ ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%s%c", sep,
+ biomem->data[j]);
+ }
+ infof(data, " %s\n", buf);
+
+ Curl_ssl_push_certinfo(data, certnum, namebuf, buf);
+
+ BIO_free(bio_out);
+
+ }
+ return 0; /* all is fine */
+}
+
+
+static void X509_signature(struct SessionHandle *data,
+ int numcert,
+ ASN1_STRING *sig)
+{
+ char buf[1024];
+ char *ptr = buf;
+ int i;
+
+ for(i=0; i<sig->length; i++)
+ ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%02x:", sig->data[i]);
+
+ infof(data, " Signature: %s\n", buf);
+ Curl_ssl_push_certinfo(data, numcert, "Signature", buf);
+}
+
+static void dumpcert(struct SessionHandle *data, X509 *x, int numcert)
+{
+ BIO *bio_out = BIO_new(BIO_s_mem());
+ BUF_MEM *biomem;
+
+ /* this outputs the cert in this 64 column wide style with newlines and
+ -----BEGIN CERTIFICATE----- texts and more */
+ PEM_write_bio_X509(bio_out, x);
+
+ BIO_get_mem_ptr(bio_out, &biomem);
+
+ Curl_ssl_push_certinfo_len(data, numcert,
+ "Cert", biomem->data, biomem->length);
+
+ BIO_free(bio_out);
+}
+
+/*
+ * This size was previously 512 which has been reported "too small" without
+ * any specifics, so it was enlarged to allow more data to get shown uncut.
+ * The "perfect" size is yet to figure out.
+ */
+#define CERTBUFFERSIZE 8192
+
+static CURLcode get_cert_chain(struct connectdata *conn,
+ struct ssl_connect_data *connssl)
+
+{
+ CURLcode result;
+ STACK_OF(X509) *sk;
+ int i;
+ char *bufp;
+ struct SessionHandle *data = conn->data;
+ int numcerts;
+
+ bufp = malloc(CERTBUFFERSIZE);
+ if(!bufp)
+ return CURLE_OUT_OF_MEMORY;
+
+ sk = SSL_get_peer_cert_chain(connssl->handle);
+ if(!sk) {
+ free(bufp);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ numcerts = sk_X509_num(sk);
+
+ result = Curl_ssl_init_certinfo(data, numcerts);
+ if(result) {
+ free(bufp);
+ return result;
+ }
+
+ infof(data, "--- Certificate chain\n");
+ for(i=0; i<numcerts; i++) {
+ long value;
+ ASN1_INTEGER *num;
+ ASN1_TIME *certdate;
+
+ /* get the certs in "importance order" */
+#if 0
+ X509 *x = sk_X509_value(sk, numcerts - i - 1);
+#else
+ X509 *x = sk_X509_value(sk, i);
+#endif
+
+ X509_CINF *cinf;
+ EVP_PKEY *pubkey=NULL;
+ int j;
+ char *ptr;
+
+ (void)x509_name_oneline(X509_get_subject_name(x), bufp, CERTBUFFERSIZE);
+ infof(data, "%2d Subject: %s\n", i, bufp);
+ Curl_ssl_push_certinfo(data, i, "Subject", bufp);
+
+ (void)x509_name_oneline(X509_get_issuer_name(x), bufp, CERTBUFFERSIZE);
+ infof(data, " Issuer: %s\n", bufp);
+ Curl_ssl_push_certinfo(data, i, "Issuer", bufp);
+
+ value = X509_get_version(x);
+ infof(data, " Version: %lu (0x%lx)\n", value+1, value);
+ snprintf(bufp, CERTBUFFERSIZE, "%lx", value);
+ Curl_ssl_push_certinfo(data, i, "Version", bufp); /* hex */
+
+ num=X509_get_serialNumber(x);
+ {
+ int left = CERTBUFFERSIZE;
+
+ ptr = bufp;
+ if(num->type == V_ASN1_NEG_INTEGER) {
+ *ptr++='-';
+ left--;
+ }
+
+ for(j=0; (j<num->length) && (left>=3); j++) {
+ snprintf(ptr, left, "%02x", num->data[j]);
+ ptr += 2;
+ left -= 2;
+ }
+ if(num->length)
+ infof(data, " Serial Number: %s\n", bufp);
+ else
+ bufp[0]=0;
+ }
+ if(bufp[0])
+ Curl_ssl_push_certinfo(data, i, "Serial Number", bufp); /* hex */
+
+ cinf = x->cert_info;
+
+ j = asn1_object_dump(cinf->signature->algorithm, bufp, CERTBUFFERSIZE);
+ if(!j) {
+ infof(data, " Signature Algorithm: %s\n", bufp);
+ Curl_ssl_push_certinfo(data, i, "Signature Algorithm", bufp);
+ }
+
+ certdate = X509_get_notBefore(x);
+ asn1_output(certdate, bufp, CERTBUFFERSIZE);
+ infof(data, " Start date: %s\n", bufp);
+ Curl_ssl_push_certinfo(data, i, "Start date", bufp);
+
+ certdate = X509_get_notAfter(x);
+ asn1_output(certdate, bufp, CERTBUFFERSIZE);
+ infof(data, " Expire date: %s\n", bufp);
+ Curl_ssl_push_certinfo(data, i, "Expire date", bufp);
+
+ j = asn1_object_dump(cinf->key->algor->algorithm, bufp, CERTBUFFERSIZE);
+ if(!j) {
+ infof(data, " Public Key Algorithm: %s\n", bufp);
+ Curl_ssl_push_certinfo(data, i, "Public Key Algorithm", bufp);
+ }
+
+ pubkey = X509_get_pubkey(x);
+ if(!pubkey)
+ infof(data, " Unable to load public key\n");
+ else {
+ switch(pubkey->type) {
+ case EVP_PKEY_RSA:
+ infof(data, " RSA Public Key (%d bits)\n",
+ BN_num_bits(pubkey->pkey.rsa->n));
+ snprintf(bufp, CERTBUFFERSIZE, "%d", BN_num_bits(pubkey->pkey.rsa->n));
+ Curl_ssl_push_certinfo(data, i, "RSA Public Key", bufp);
+
+ print_pubkey_BN(rsa, n, i);
+ print_pubkey_BN(rsa, e, i);
+ print_pubkey_BN(rsa, d, i);
+ print_pubkey_BN(rsa, p, i);
+ print_pubkey_BN(rsa, q, i);
+ print_pubkey_BN(rsa, dmp1, i);
+ print_pubkey_BN(rsa, dmq1, i);
+ print_pubkey_BN(rsa, iqmp, i);
+ break;
+ case EVP_PKEY_DSA:
+ print_pubkey_BN(dsa, p, i);
+ print_pubkey_BN(dsa, q, i);
+ print_pubkey_BN(dsa, g, i);
+ print_pubkey_BN(dsa, priv_key, i);
+ print_pubkey_BN(dsa, pub_key, i);
+ break;
+ case EVP_PKEY_DH:
+ print_pubkey_BN(dh, p, i);
+ print_pubkey_BN(dh, g, i);
+ print_pubkey_BN(dh, priv_key, i);
+ print_pubkey_BN(dh, pub_key, i);
+ break;
+#if 0
+ case EVP_PKEY_EC: /* symbol not present in OpenSSL 0.9.6 */
+ /* left TODO */
+ break;
+#endif
+ }
+ EVP_PKEY_free(pubkey);
+ }
+
+ X509V3_ext(data, i, cinf->extensions);
+
+ X509_signature(data, i, x->signature);
+
+ dumpcert(data, x, i);
+ }
+
+ free(bufp);
+
+ return CURLE_OK;
+}
+
+/*
+ * 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 */
+
+ /* https://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 */
+
+ /* https://www.openssl.org/docs/crypto/buffer.html */
+ buff1 = temp = OPENSSL_malloc(len1);
+ if(!buff1)
+ break; /* failed */
+
+ /* https://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. It's 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);
+
+ /* https://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!
+ *
+ * We check certificates to authenticate the server; otherwise we risk
+ * man-in-the-middle attack.
+ */
+static CURLcode servercert(struct connectdata *conn,
+ struct ssl_connect_data *connssl,
+ bool strict)
+{
+ CURLcode result = CURLE_OK;
+ int rc;
+ long lerr;
+ ASN1_TIME *certdate;
+ struct SessionHandle *data = conn->data;
+ 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! */
+ (void)get_cert_chain(conn, connssl);
+
+ connssl->server_cert = SSL_get_peer_certificate(connssl->handle);
+ if(!connssl->server_cert) {
+ if(strict)
+ failf(data, "SSL: couldn't get peer certificate!");
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+
+ infof(data, "Server certificate:\n");
+
+ rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert),
+ buffer, BUFSIZE);
+ infof(data, "\t subject: %s\n", rc?"[NONE]":buffer);
+
+ certdate = X509_get_notBefore(connssl->server_cert);
+ asn1_output(certdate, buffer, BUFSIZE);
+ infof(data, "\t start date: %s\n", buffer);
+
+ certdate = X509_get_notAfter(connssl->server_cert);
+ asn1_output(certdate, buffer, BUFSIZE);
+ infof(data, "\t expire date: %s\n", buffer);
+
+ if(data->set.ssl.verifyhost) {
+ result = verifyhost(conn, connssl->server_cert);
+ if(result) {
+ X509_free(connssl->server_cert);
+ connssl->server_cert = NULL;
+ return result;
+ }
+ }
+
+ rc = x509_name_oneline(X509_get_issuer_name(connssl->server_cert),
+ buffer, BUFSIZE);
+ if(rc) {
+ if(strict)
+ failf(data, "SSL: couldn't get X509-issuer name!");
+ result = CURLE_SSL_CONNECT_ERROR;
+ }
+ else {
+ infof(data, "\t issuer: %s\n", buffer);
+
+ /* We could do all sorts of certificate verification stuff here before
+ deallocating the certificate. */
+
+ /* e.g. match issuer name with provided issuer certificate */
+ if(data->set.str[STRING_SSL_ISSUERCERT]) {
+ fp = fopen(data->set.str[STRING_SSL_ISSUERCERT], FOPEN_READTEXT);
+ if(!fp) {
+ if(strict)
+ failf(data, "SSL: Unable to open issuer cert (%s)",
+ data->set.str[STRING_SSL_ISSUERCERT]);
+ X509_free(connssl->server_cert);
+ connssl->server_cert = NULL;
+ return CURLE_SSL_ISSUER_ERROR;
+ }
+
+ issuer = PEM_read_X509(fp, NULL, ZERO_NULL, NULL);
+ if(!issuer) {
+ if(strict)
+ failf(data, "SSL: Unable to read issuer cert (%s)",
+ data->set.str[STRING_SSL_ISSUERCERT]);
+ X509_free(connssl->server_cert);
+ X509_free(issuer);
+ 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)",
+ data->set.str[STRING_SSL_ISSUERCERT]);
+ X509_free(connssl->server_cert);
+ X509_free(issuer);
+ 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 =
+ 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
+ and we return earlier if verifypeer is set? */
+ if(strict)
+ failf(data, "SSL certificate verify result: %s (%ld)",
+ X509_verify_cert_error_string(lerr), lerr);
+ result = CURLE_PEER_FAILED_VERIFICATION;
+ }
+ else
+ infof(data, "\t SSL certificate verify result: %s (%ld),"
+ " continuing anyway.\n",
+ X509_verify_cert_error_string(lerr), lerr);
+ }
+ else
+ infof(data, "\t SSL certificate verify ok.\n");
+ }
+
+#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
+ !defined(OPENSSL_IS_BORINGSSL)
+ if(data->set.ssl.verifystatus) {
+ result = verifystatus(conn, connssl);
+ if(result) {
+ X509_free(connssl->server_cert);
+ connssl->server_cert = NULL;
+ return result;
+ }
+ }
+#endif
+
+ if(!strict)
+ /* when not strict, we don't bother about the verify cert problems */
+ result = CURLE_OK;
+
+ 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;
+}
+
+static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex)
+{
+ CURLcode result = CURLE_OK;
+ void *old_ssl_sessionid = NULL;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ bool incache;
+ SSL_SESSION *our_ssl_sessionid;
+
+ DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
+
+ our_ssl_sessionid = SSL_get1_session(connssl->handle);
+
+ /* SSL_get1_session() will increment the reference count and the session
+ will stay in memory until explicitly freed with SSL_SESSION_free(3),
+ regardless of its state. */
+
+ incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL));
+ if(incache) {
+ if(old_ssl_sessionid != our_ssl_sessionid) {
+ infof(data, "old SSL session ID is stale, removing\n");
+ Curl_ssl_delsessionid(conn, old_ssl_sessionid);
+ incache = FALSE;
+ }
+ }
+
+ if(!incache) {
+ result = Curl_ssl_addsessionid(conn, our_ssl_sessionid,
+ 0 /* unknown size */);
+ if(result) {
+ failf(data, "failed to store ssl session");
+ return result;
+ }
+ }
+ else {
+ /* Session was incache, so refcount already incremented earlier.
+ * Avoid further increments with each SSL_get1_session() call.
+ * This does not free the session as refcount remains > 0
+ */
+ SSL_SESSION_free(our_ssl_sessionid);
+ }
+
+ /*
+ * We check certificates to authenticate the server; otherwise we risk
+ * man-in-the-middle attack; NEVERTHELESS, if we're told explicitly not to
+ * verify the peer ignore faults and failures from the server cert
+ * operations.
+ */
+
+ result = servercert(conn, connssl,
+ (data->set.ssl.verifypeer || data->set.ssl.verifyhost));
+
+ if(!result)
+ connssl->connecting_state = ssl_connect_done;
+
+ return result;
+}
+
+static Curl_recv ossl_recv;
+static Curl_send ossl_send;
+
+static CURLcode ossl_connect_common(struct connectdata *conn,
+ int sockindex,
+ bool nonblocking,
+ bool *done)
+{
+ CURLcode result;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ curl_socket_t sockfd = conn->sock[sockindex];
+ long timeout_ms;
+ int what;
+
+ /* check if the connection has already been established */
+ if(ssl_connection_complete == connssl->state) {
+ *done = TRUE;
+ return CURLE_OK;
+ }
+
+ if(ssl_connect_1 == connssl->connecting_state) {
+ /* Find out how much more time we're allowed */
+ 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");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ result = ossl_connect_step1(conn, sockindex);
+ if(result)
+ return result;
+ }
+
+ while(ssl_connect_2 == connssl->connecting_state ||
+ ssl_connect_2_reading == connssl->connecting_state ||
+ ssl_connect_2_writing == connssl->connecting_state) {
+
+ /* 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");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ /* 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) {
+
+ curl_socket_t writefd = ssl_connect_2_writing==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+ curl_socket_t readfd = ssl_connect_2_reading==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+
+ what = Curl_socket_ready(readfd, writefd, nonblocking?0:timeout_ms);
+ if(what < 0) {
+ /* fatal error */
+ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ else if(0 == what) {
+ if(nonblocking) {
+ *done = FALSE;
+ return CURLE_OK;
+ }
+ else {
+ /* timeout */
+ failf(data, "SSL connection timeout");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+ }
+ /* socket is readable or writable */
+ }
+
+ /* Run transaction, and return to the caller if it failed or if this
+ * connection is done nonblocking and this loop would execute again. This
+ * permits the owner of a multi handle to abort a connection attempt
+ * 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;
+
+ } /* 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_done == connssl->connecting_state) {
+ connssl->state = ssl_connection_complete;
+ conn->recv[sockindex] = ossl_recv;
+ conn->send[sockindex] = ossl_send;
+ *done = TRUE;
+ }
+ else
+ *done = FALSE;
+
+ /* Reset our connect state machine */
+ connssl->connecting_state = ssl_connect_1;
+
+ return CURLE_OK;
+}
+
+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 result;
+ bool done = FALSE;
+
+ result = ossl_connect_common(conn, sockindex, FALSE, &done);
+ if(result)
+ return result;
+
+ DEBUGASSERT(done);
+
+ return CURLE_OK;
+}
+
+bool Curl_ossl_data_pending(const struct connectdata *conn, int connindex)
+{
+ if(conn->ssl[connindex].handle)
+ /* SSL is in use */
+ return (0 != SSL_pending(conn->ssl[connindex].handle)) ? TRUE : FALSE;
+ else
+ return FALSE;
+}
+
+static ssize_t ossl_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 err;
+ char error_buffer[120]; /* OpenSSL documents that this must be at least 120
+ bytes long. */
+ unsigned long sslerror;
+ int memlen;
+ int rc;
+
+ ERR_clear_error();
+
+ memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
+ rc = SSL_write(conn->ssl[sockindex].handle, mem, memlen);
+
+ if(rc <= 0) {
+ err = SSL_get_error(conn->ssl[sockindex].handle, rc);
+
+ switch(err) {
+ case SSL_ERROR_WANT_READ:
+ case SSL_ERROR_WANT_WRITE:
+ /* The operation did not complete; the same TLS/SSL I/O function
+ should be called again later. This is basically an EWOULDBLOCK
+ equivalent. */
+ *curlcode = CURLE_AGAIN;
+ return -1;
+ case SSL_ERROR_SYSCALL:
+ failf(conn->data, "SSL_write() returned SYSCALL, errno = %d",
+ SOCKERRNO);
+ *curlcode = CURLE_SEND_ERROR;
+ return -1;
+ case SSL_ERROR_SSL:
+ /* A failure in the SSL library occurred, usually a protocol error.
+ The OpenSSL error queue contains more information on the error. */
+ sslerror = ERR_get_error();
+ failf(conn->data, "SSL_write() error: %s",
+ ERR_error_string(sslerror, error_buffer));
+ *curlcode = CURLE_SEND_ERROR;
+ return -1;
+ }
+ /* a true error */
+ failf(conn->data, "SSL_write() return error %d", err);
+ *curlcode = CURLE_SEND_ERROR;
+ return -1;
+ }
+ *curlcode = CURLE_OK;
+ return (ssize_t)rc; /* number of bytes */
+}
+
+static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
+ int num, /* socketindex */
+ char *buf, /* store read data here */
+ size_t buffersize, /* max amount to read */
+ CURLcode *curlcode)
+{
+ char error_buffer[120]; /* OpenSSL documents that this must be at
+ least 120 bytes long. */
+ unsigned long sslerror;
+ ssize_t nread;
+ int buffsize;
+
+ ERR_clear_error();
+
+ buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
+ nread = (ssize_t)SSL_read(conn->ssl[num].handle, buf, buffsize);
+ if(nread <= 0) {
+ /* failed SSL_read */
+ int err = SSL_get_error(conn->ssl[num].handle, (int)nread);
+
+ switch(err) {
+ case SSL_ERROR_NONE: /* this is not an error */
+ case SSL_ERROR_ZERO_RETURN: /* no more data */
+ break;
+ case SSL_ERROR_WANT_READ:
+ case SSL_ERROR_WANT_WRITE:
+ /* there's data pending, re-invoke SSL_read() */
+ *curlcode = CURLE_AGAIN;
+ return -1;
+ default:
+ /* openssl/ssl.h for SSL_ERROR_SYSCALL says "look at error stack/return
+ value/errno" */
+ /* https://www.openssl.org/docs/crypto/ERR_get_error.html */
+ sslerror = ERR_get_error();
+ if((nread < 0) || sslerror) {
+ /* If the return code was negative or there actually is an error in the
+ queue */
+ failf(conn->data, "SSL read: %s, errno %d",
+ ERR_error_string(sslerror, error_buffer),
+ SOCKERRNO);
+ *curlcode = CURLE_RECV_ERROR;
+ return -1;
+ }
+ }
+ }
+ return nread;
+}
+
+size_t Curl_ossl_version(char *buffer, size_t size)
+{
+#ifdef YASSL_VERSION
+ /* yassl provides an OpenSSL API compatibility layer so it looks identical
+ to OpenSSL in all other aspects */
+ return snprintf(buffer, size, "yassl/%s", YASSL_VERSION);
+#else /* YASSL_VERSION */
+#ifdef OPENSSL_IS_BORINGSSL
+ return snprintf(buffer, size, "BoringSSL");
+#else /* OPENSSL_IS_BORINGSSL */
+
+#if(OPENSSL_VERSION_NUMBER >= 0x905000)
+ {
+ char sub[3];
+ unsigned long ssleay_value;
+ sub[2]='\0';
+ sub[1]='\0';
+ ssleay_value=SSLeay();
+ if(ssleay_value < 0x906000) {
+ ssleay_value=SSLEAY_VERSION_NUMBER;
+ sub[0]='\0';
+ }
+ 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);
+ }
+ }
+ else
+ sub[0]='\0';
+ }
+
+ return snprintf(buffer, size, "%s/%lx.%lx.%lx%s",
+#ifdef LIBRESSL_VERSION_NUMBER
+ "LibreSSL"
+#else
+ "OpenSSL"
+#endif
+ , (ssleay_value>>28)&0xf,
+ (ssleay_value>>20)&0xff,
+ (ssleay_value>>12)&0xff,
+ sub);
+ }
+
+#else /* OPENSSL_VERSION_NUMBER is less than 0.9.5 */
+
+#if(OPENSSL_VERSION_NUMBER >= 0x900000)
+ return snprintf(buffer, size, "OpenSSL/%lx.%lx.%lx",
+ (OPENSSL_VERSION_NUMBER>>28)&0xff,
+ (OPENSSL_VERSION_NUMBER>>20)&0xff,
+ (OPENSSL_VERSION_NUMBER>>12)&0xf);
+
+#else /* (OPENSSL_VERSION_NUMBER >= 0x900000) */
+ {
+ char sub[2];
+ sub[1]='\0';
+ if(OPENSSL_VERSION_NUMBER&0x0f) {
+ sub[0]=(OPENSSL_VERSION_NUMBER&0x0f) + 'a' -1;
+ }
+ else
+ sub[0]='\0';
+
+ return snprintf(buffer, size, "SSL/%x.%x.%x%s",
+ (OPENSSL_VERSION_NUMBER>>12)&0xff,
+ (OPENSSL_VERSION_NUMBER>>8)&0xf,
+ (OPENSSL_VERSION_NUMBER>>4)&0xf, sub);
+ }
+#endif /* (OPENSSL_VERSION_NUMBER >= 0x900000) */
+#endif /* OPENSSL_VERSION_NUMBER is less than 0.9.5 */
+
+#endif /* OPENSSL_IS_BORINGSSL */
+#endif /* YASSL_VERSION */
+}
+
+/* can be called with data == NULL */
+int 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 */
+ }
+ RAND_bytes(entropy, curlx_uztosi(length));
+ return 0; /* 0 as in no problem */
+}
+
+void Curl_ossl_md5sum(unsigned char *tmp, /* input */
+ size_t tmplen,
+ unsigned char *md5sum /* output */,
+ size_t unused)
+{
+ MD5_CTX MD5pw;
+ (void)unused;
+ MD5_Init(&MD5pw);
+ MD5_Update(&MD5pw, tmp, tmplen);
+ MD5_Final(md5sum, &MD5pw);
+}
+
+bool Curl_ossl_cert_status_request(void)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
+ !defined(OPENSSL_IS_BORINGSSL)
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+#endif /* USE_OPENSSL */
diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h
new file mode 100644
index 00000000..499b4fe2
--- /dev/null
+++ b/lib/vtls/openssl.h
@@ -0,0 +1,113 @@
+#ifndef HEADER_CURL_SSLUSE_H
+#define HEADER_CURL_SSLUSE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_OPENSSL
+/*
+ * This header should only be needed to get included by vtls.c and openssl.c
+ */
+
+#include "urldata.h"
+
+CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex);
+CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done);
+
+/* close a SSL connection */
+void Curl_ossl_close(struct connectdata *conn, int sockindex);
+
+/* tell OpenSSL to close down all open information regarding connections (and
+ thus session ID caching etc) */
+void Curl_ossl_close_all(struct SessionHandle *data);
+
+/* Sets an OpenSSL engine */
+CURLcode Curl_ossl_set_engine(struct SessionHandle *data, const char *engine);
+
+/* function provided for the generic SSL-layer, called when a session id
+ should be freed */
+void Curl_ossl_session_free(void *ptr);
+
+/* Sets engine as default for all SSL operations */
+CURLcode Curl_ossl_set_engine_default(struct SessionHandle *data);
+
+/* Build list of OpenSSL engines */
+struct curl_slist *Curl_ossl_engines_list(struct SessionHandle *data);
+
+int Curl_ossl_init(void);
+void Curl_ossl_cleanup(void);
+
+size_t Curl_ossl_version(char *buffer, size_t size);
+int Curl_ossl_check_cxn(struct connectdata *cxn);
+int Curl_ossl_shutdown(struct connectdata *conn, int sockindex);
+bool Curl_ossl_data_pending(const struct connectdata *conn,
+ int connindex);
+
+/* return 0 if a find random is filled in */
+int 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);
+
+bool Curl_ossl_cert_status_request(void);
+
+/* Set the API backend definition to OpenSSL */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_OPENSSL
+
+/* this backend supports the CAPATH option */
+#define have_curlssl_ca_path 1
+
+/* this backend supports CURLOPT_CERTINFO */
+#define have_curlssl_certinfo 1
+
+/* this backend suppots CURLOPT_SSL_CTX_* */
+#define have_curlssl_ssl_ctx 1
+
+/* API setup for OpenSSL */
+#define curlssl_init Curl_ossl_init
+#define curlssl_cleanup Curl_ossl_cleanup
+#define curlssl_connect Curl_ossl_connect
+#define curlssl_connect_nonblocking Curl_ossl_connect_nonblocking
+#define curlssl_session_free(x) Curl_ossl_session_free(x)
+#define curlssl_close_all Curl_ossl_close_all
+#define curlssl_close Curl_ossl_close
+#define curlssl_shutdown(x,y) Curl_ossl_shutdown(x,y)
+#define curlssl_set_engine(x,y) Curl_ossl_set_engine(x,y)
+#define curlssl_set_engine_default(x) Curl_ossl_set_engine_default(x)
+#define curlssl_engines_list(x) Curl_ossl_engines_list(x)
+#define curlssl_version Curl_ossl_version
+#define curlssl_check_cxn Curl_ossl_check_cxn
+#define curlssl_data_pending(x,y) Curl_ossl_data_pending(x,y)
+#define curlssl_random(x,y,z) Curl_ossl_random(x,y,z)
+#define curlssl_md5sum(a,b,c,d) Curl_ossl_md5sum(a,b,c,d)
+#define curlssl_cert_status_request() Curl_ossl_cert_status_request()
+
+#define DEFAULT_CIPHER_SELECTION \
+ "ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH"
+
+#endif /* USE_OPENSSL */
+#endif /* HEADER_CURL_SSLUSE_H */
diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c
new file mode 100644
index 00000000..066c055e
--- /dev/null
+++ b/lib/vtls/polarssl.c
@@ -0,0 +1,753 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all PolarSSL-specific code for the TLS/SSL layer. No code
+ * but vtls.c should ever call or use these functions.
+ *
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_POLARSSL
+
+#include <polarssl/net.h>
+#include <polarssl/ssl.h>
+#include <polarssl/certs.h>
+#include <polarssl/x509.h>
+#include <polarssl/version.h>
+
+#if POLARSSL_VERSION_NUMBER < 0x01030000
+#error too old PolarSSL
+#endif
+
+#include <polarssl/error.h>
+#include <polarssl/entropy.h>
+#include <polarssl/ctr_drbg.h>
+
+#include "urldata.h"
+#include "sendf.h"
+#include "inet_pton.h"
+#include "polarssl.h"
+#include "vtls.h"
+#include "parsedate.h"
+#include "connect.h" /* for the connect timeout */
+#include "select.h"
+#include "rawstr.h"
+#include "polarssl_threadlock.h"
+#include "curl_printf.h"
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/* apply threading? */
+#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
+#define THREADING_SUPPORT
+#endif
+
+#if defined(THREADING_SUPPORT)
+static entropy_context entropy;
+
+static int entropy_init_initialized = 0;
+
+/* start of entropy_init_mutex() */
+static void entropy_init_mutex(entropy_context *ctx)
+{
+ /* lock 0 = entropy_init_mutex() */
+ polarsslthreadlock_lock_function(0);
+ if(entropy_init_initialized == 0) {
+ entropy_init(ctx);
+ entropy_init_initialized = 1;
+ }
+ polarsslthreadlock_unlock_function(0);
+}
+/* end of entropy_init_mutex() */
+
+/* start of entropy_func_mutex() */
+static int entropy_func_mutex(void *data, unsigned char *output, size_t len)
+{
+ int ret;
+ /* lock 1 = entropy_func_mutex() */
+ polarsslthreadlock_lock_function(1);
+ ret = entropy_func(data, output, len);
+ polarsslthreadlock_unlock_function(1);
+
+ return ret;
+}
+/* end of entropy_func_mutex() */
+
+#endif /* THREADING_SUPPORT */
+
+/* Define this to enable lots of debugging for PolarSSL */
+#undef POLARSSL_DEBUG
+
+#ifdef POLARSSL_DEBUG
+static void polarssl_debug(void *context, int level, const char *line)
+{
+ struct SessionHandle *data = NULL;
+
+ if(!context)
+ return;
+
+ data = (struct SessionHandle *)context;
+
+ infof(data, "%s", line);
+ (void) level;
+}
+#else
+#endif
+
+/* ALPN for http2? */
+#ifdef POLARSSL_SSL_ALPN
+# define HAS_ALPN
+#endif
+
+static Curl_recv polarssl_recv;
+static Curl_send polarssl_send;
+
+
+static CURLcode
+polarssl_connect_step1(struct connectdata *conn,
+ int sockindex)
+{
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data* connssl = &conn->ssl[sockindex];
+
+ bool sni = TRUE; /* default is SNI enabled */
+ int ret = -1;
+#ifdef ENABLE_IPV6
+ struct in6_addr addr;
+#else
+ struct in_addr addr;
+#endif
+ void *old_session = NULL;
+ size_t old_session_size = 0;
+ char errorbuf[128];
+ errorbuf[0]=0;
+
+ /* PolarSSL only supports SSLv3 and TLSv1 */
+ if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) {
+ failf(data, "PolarSSL does not support SSLv2");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ else if(data->set.ssl.version == CURL_SSLVERSION_SSLv3)
+ sni = FALSE; /* SSLv3 has no SNI */
+
+#ifdef THREADING_SUPPORT
+ entropy_init_mutex(&entropy);
+
+ if((ret = ctr_drbg_init(&connssl->ctr_drbg, entropy_func_mutex, &entropy,
+ connssl->ssn.id, connssl->ssn.length)) != 0) {
+#ifdef POLARSSL_ERROR_C
+ error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+ failf(data, "Failed - PolarSSL: ctr_drbg_init returned (-0x%04X) %s\n",
+ -ret, errorbuf);
+ }
+#else
+ entropy_init(&connssl->entropy);
+
+ if((ret = ctr_drbg_init(&connssl->ctr_drbg, entropy_func, &connssl->entropy,
+ connssl->ssn.id, connssl->ssn.length)) != 0) {
+#ifdef POLARSSL_ERROR_C
+ error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+ failf(data, "Failed - PolarSSL: ctr_drbg_init returned (-0x%04X) %s\n",
+ -ret, errorbuf);
+ }
+#endif /* THREADING_SUPPORT */
+
+ /* Load the trusted CA */
+ memset(&connssl->cacert, 0, sizeof(x509_crt));
+
+ if(data->set.str[STRING_SSL_CAFILE]) {
+ ret = x509_crt_parse_file(&connssl->cacert,
+ data->set.str[STRING_SSL_CAFILE]);
+
+ if(ret<0) {
+#ifdef POLARSSL_ERROR_C
+ error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+ failf(data, "Error reading ca cert file %s - PolarSSL: (-0x%04X) %s",
+ data->set.str[STRING_SSL_CAFILE], -ret, errorbuf);
+
+ if(data->set.ssl.verifypeer)
+ return CURLE_SSL_CACERT_BADFILE;
+ }
+ }
+
+ 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));
+
+ if(data->set.str[STRING_CERT]) {
+ ret = x509_crt_parse_file(&connssl->clicert,
+ data->set.str[STRING_CERT]);
+
+ if(ret) {
+#ifdef POLARSSL_ERROR_C
+ error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+ failf(data, "Error reading client cert file %s - PolarSSL: (-0x%04X) %s",
+ data->set.str[STRING_CERT], -ret, errorbuf);
+
+ return CURLE_SSL_CERTPROBLEM;
+ }
+ }
+
+ /* Load the client private key */
+ if(data->set.str[STRING_KEY]) {
+ pk_context pk;
+ pk_init(&pk);
+ ret = pk_parse_keyfile(&pk, data->set.str[STRING_KEY],
+ data->set.str[STRING_KEY_PASSWD]);
+ if(ret == 0 && !pk_can_do(&pk, POLARSSL_PK_RSA))
+ ret = POLARSSL_ERR_PK_TYPE_MISMATCH;
+ if(ret == 0)
+ rsa_copy(&connssl->rsa, pk_rsa(pk));
+ else
+ rsa_free(&connssl->rsa);
+ pk_free(&pk);
+
+ if(ret) {
+#ifdef POLARSSL_ERROR_C
+ error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+ failf(data, "Error reading private key %s - PolarSSL: (-0x%04X) %s",
+ data->set.str[STRING_KEY], -ret, errorbuf);
+
+ return CURLE_SSL_CERTPROBLEM;
+ }
+ }
+
+ /* Load the CRL */
+ memset(&connssl->crl, 0, sizeof(x509_crl));
+
+ if(data->set.str[STRING_SSL_CRLFILE]) {
+ ret = x509_crl_parse_file(&connssl->crl,
+ data->set.str[STRING_SSL_CRLFILE]);
+
+ if(ret) {
+#ifdef POLARSSL_ERROR_C
+ error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+ failf(data, "Error reading CRL file %s - PolarSSL: (-0x%04X) %s",
+ data->set.str[STRING_SSL_CRLFILE], -ret, errorbuf);
+
+ return CURLE_SSL_CRL_BADFILE;
+ }
+ }
+
+ infof(data, "PolarSSL: Connecting to %s:%d\n",
+ conn->host.name, conn->remote_port);
+
+ if(ssl_init(&connssl->ssl)) {
+ failf(data, "PolarSSL: ssl_init failed");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ switch(data->set.ssl.version) {
+ default:
+ case CURL_SSLVERSION_DEFAULT:
+ case CURL_SSLVERSION_TLSv1:
+ 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);
+ ssl_set_max_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);
+ ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3,
+ SSL_MINOR_VERSION_1);
+ infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.0\n");
+ break;
+ case CURL_SSLVERSION_TLSv1_1:
+ ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3,
+ SSL_MINOR_VERSION_2);
+ ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3,
+ SSL_MINOR_VERSION_2);
+ infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.1\n");
+ break;
+ case CURL_SSLVERSION_TLSv1_2:
+ ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3,
+ SSL_MINOR_VERSION_3);
+ ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3,
+ SSL_MINOR_VERSION_3);
+ infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.2\n");
+ break;
+ }
+
+ ssl_set_endpoint(&connssl->ssl, SSL_IS_CLIENT);
+ ssl_set_authmode(&connssl->ssl, SSL_VERIFY_OPTIONAL);
+
+ ssl_set_rng(&connssl->ssl, ctr_drbg_random,
+ &connssl->ctr_drbg);
+ ssl_set_bio(&connssl->ssl,
+ net_recv, &conn->sock[sockindex],
+ net_send, &conn->sock[sockindex]);
+
+ ssl_set_ciphersuites(&connssl->ssl, ssl_list_ciphersuites());
+ if(!Curl_ssl_getsessionid(conn, &old_session, &old_session_size)) {
+ memcpy(&connssl->ssn, old_session, old_session_size);
+ infof(data, "PolarSSL re-using session\n");
+ }
+
+ ssl_set_session(&connssl->ssl,
+ &connssl->ssn);
+
+ ssl_set_ca_chain(&connssl->ssl,
+ &connssl->cacert,
+ &connssl->crl,
+ conn->host.name);
+
+ ssl_set_own_cert_rsa(&connssl->ssl,
+ &connssl->clicert, &connssl->rsa);
+
+ if(!Curl_inet_pton(AF_INET, conn->host.name, &addr) &&
+#ifdef ENABLE_IPV6
+ !Curl_inet_pton(AF_INET6, conn->host.name, &addr) &&
+#endif
+ sni && ssl_set_hostname(&connssl->ssl, conn->host.name)) {
+ infof(data, "WARNING: failed to configure "
+ "server name indication (SNI) TLS extension\n");
+ }
+
+#ifdef HAS_ALPN
+ if(data->set.ssl_enable_alpn) {
+ static const char* protocols[3];
+ int cur = 0;
+
+#ifdef USE_NGHTTP2
+ if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ protocols[cur++] = NGHTTP2_PROTO_VERSION_ID;
+ infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
+ }
+#endif
+
+ protocols[cur++] = ALPN_HTTP_1_1;
+ infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1);
+
+ protocols[cur] = NULL;
+
+ ssl_set_alpn_protocols(&connssl->ssl, protocols);
+ }
+#endif
+
+#ifdef POLARSSL_DEBUG
+ ssl_set_dbg(&connssl->ssl, polarssl_debug, data);
+#endif
+
+ connssl->connecting_state = ssl_connect_2;
+
+ return CURLE_OK;
+}
+
+static CURLcode
+polarssl_connect_step2(struct connectdata *conn,
+ int sockindex)
+{
+ int ret;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data* connssl = &conn->ssl[sockindex];
+ char buffer[1024];
+
+ char errorbuf[128];
+ errorbuf[0] = 0;
+
+ conn->recv[sockindex] = polarssl_recv;
+ conn->send[sockindex] = polarssl_send;
+
+ ret = ssl_handshake(&connssl->ssl);
+
+ switch(ret) {
+ case 0:
+ break;
+
+ case POLARSSL_ERR_NET_WANT_READ:
+ connssl->connecting_state = ssl_connect_2_reading;
+ return CURLE_OK;
+
+ case POLARSSL_ERR_NET_WANT_WRITE:
+ connssl->connecting_state = ssl_connect_2_writing;
+ return CURLE_OK;
+
+ default:
+#ifdef POLARSSL_ERROR_C
+ error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+ failf(data, "ssl_handshake returned - PolarSSL: (-0x%04X) %s",
+ -ret, errorbuf);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ infof(data, "PolarSSL: Handshake complete, cipher is %s\n",
+ ssl_get_ciphersuite(&conn->ssl[sockindex].ssl) );
+
+ ret = ssl_get_verify_result(&conn->ssl[sockindex].ssl);
+
+ if(ret && data->set.ssl.verifypeer) {
+ if(ret & BADCERT_EXPIRED)
+ failf(data, "Cert verify failed: BADCERT_EXPIRED");
+
+ if(ret & BADCERT_REVOKED) {
+ failf(data, "Cert verify failed: BADCERT_REVOKED");
+ return CURLE_SSL_CACERT;
+ }
+
+ if(ret & BADCERT_CN_MISMATCH)
+ failf(data, "Cert verify failed: BADCERT_CN_MISMATCH");
+
+ if(ret & BADCERT_NOT_TRUSTED)
+ failf(data, "Cert verify failed: BADCERT_NOT_TRUSTED");
+
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+
+ if(ssl_get_peer_cert(&(connssl->ssl))) {
+ /* If the session was resumed, there will be no peer certs */
+ memset(buffer, 0, sizeof(buffer));
+
+ if(x509_crt_info(buffer, sizeof(buffer), (char *)"* ",
+ ssl_get_peer_cert(&(connssl->ssl))) != -1)
+ infof(data, "Dumping cert info:\n%s\n", buffer);
+ }
+
+#ifdef HAS_ALPN
+ if(data->set.ssl_enable_alpn) {
+ const char *next_protocol = ssl_get_alpn_protocol(&connssl->ssl);
+
+ if(next_protocol != NULL) {
+ infof(data, "ALPN, server accepted to use %s\n", next_protocol);
+
+#ifdef USE_NGHTTP2
+ if(!strncmp(next_protocol, NGHTTP2_PROTO_VERSION_ID,
+ NGHTTP2_PROTO_VERSION_ID_LEN)) {
+ conn->negnpn = CURL_HTTP_VERSION_2_0;
+ }
+ else
+#endif
+ if(!strncmp(next_protocol, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH)) {
+ conn->negnpn = CURL_HTTP_VERSION_1_1;
+ }
+ }
+ else
+ infof(data, "ALPN, server did not agree to a protocol\n");
+ }
+#endif
+
+ connssl->connecting_state = ssl_connect_3;
+ infof(data, "SSL connected\n");
+
+ return CURLE_OK;
+}
+
+static CURLcode
+polarssl_connect_step3(struct connectdata *conn,
+ int sockindex)
+{
+ CURLcode result = 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;
+
+ DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
+
+ /* Save the current session data for possible re-use */
+ incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL));
+ if(incache) {
+ if(old_ssl_sessionid != our_ssl_sessionid) {
+ infof(data, "old SSL session ID is stale, removing\n");
+ Curl_ssl_delsessionid(conn, old_ssl_sessionid);
+ incache = FALSE;
+ }
+ }
+
+ if(!incache) {
+ void *new_session = malloc(sizeof(ssl_session));
+
+ if(new_session) {
+ memcpy(new_session, our_ssl_sessionid, sizeof(ssl_session));
+
+ result = Curl_ssl_addsessionid(conn, new_session, sizeof(ssl_session));
+ }
+ else
+ result = CURLE_OUT_OF_MEMORY;
+
+ if(result) {
+ failf(data, "failed to store ssl session");
+ return result;
+ }
+ }
+
+ connssl->connecting_state = ssl_connect_done;
+
+ return CURLE_OK;
+}
+
+static ssize_t polarssl_send(struct connectdata *conn,
+ int sockindex,
+ const void *mem,
+ size_t len,
+ CURLcode *curlcode)
+{
+ int ret = -1;
+
+ ret = ssl_write(&conn->ssl[sockindex].ssl,
+ (unsigned char *)mem, len);
+
+ if(ret < 0) {
+ *curlcode = (ret == POLARSSL_ERR_NET_WANT_WRITE) ?
+ CURLE_AGAIN : CURLE_SEND_ERROR;
+ ret = -1;
+ }
+
+ return ret;
+}
+
+void Curl_polarssl_close(struct connectdata *conn, int sockindex)
+{
+ rsa_free(&conn->ssl[sockindex].rsa);
+ x509_crt_free(&conn->ssl[sockindex].clicert);
+ x509_crt_free(&conn->ssl[sockindex].cacert);
+ x509_crl_free(&conn->ssl[sockindex].crl);
+ ssl_free(&conn->ssl[sockindex].ssl);
+}
+
+static ssize_t polarssl_recv(struct connectdata *conn,
+ int num,
+ char *buf,
+ size_t buffersize,
+ CURLcode *curlcode)
+{
+ int ret = -1;
+ ssize_t len = -1;
+
+ memset(buf, 0, buffersize);
+ ret = ssl_read(&conn->ssl[num].ssl, (unsigned char *)buf, buffersize);
+
+ if(ret <= 0) {
+ if(ret == POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY)
+ return 0;
+
+ *curlcode = (ret == POLARSSL_ERR_NET_WANT_READ) ?
+ CURLE_AGAIN : CURLE_RECV_ERROR;
+ return -1;
+ }
+
+ len = ret;
+
+ return len;
+}
+
+void Curl_polarssl_session_free(void *ptr)
+{
+ free(ptr);
+}
+
+/* 1.3.10 was the first rebranded version. All new releases (in 1.3 branch and
+ higher) will be mbed TLS branded.. */
+
+size_t Curl_polarssl_version(char *buffer, size_t size)
+{
+ unsigned int version = version_get_number();
+ return snprintf(buffer, size, "%s/%d.%d.%d",
+ version >= 0x01030A00?"mbedTLS":"PolarSSL",
+ version>>24, (version>>16)&0xff, (version>>8)&0xff);
+}
+
+static CURLcode
+polarssl_connect_common(struct connectdata *conn,
+ int sockindex,
+ bool nonblocking,
+ bool *done)
+{
+ CURLcode result;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ curl_socket_t sockfd = conn->sock[sockindex];
+ long timeout_ms;
+ int what;
+
+ /* check if the connection has already been established */
+ if(ssl_connection_complete == connssl->state) {
+ *done = TRUE;
+ return CURLE_OK;
+ }
+
+ if(ssl_connect_1 == connssl->connecting_state) {
+ /* Find out how much more time we're allowed */
+ 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");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ result = polarssl_connect_step1(conn, sockindex);
+ if(result)
+ return result;
+ }
+
+ while(ssl_connect_2 == connssl->connecting_state ||
+ ssl_connect_2_reading == connssl->connecting_state ||
+ ssl_connect_2_writing == connssl->connecting_state) {
+
+ /* 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");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ /* 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) {
+
+ curl_socket_t writefd = ssl_connect_2_writing==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+ curl_socket_t readfd = ssl_connect_2_reading==
+ connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+
+ what = Curl_socket_ready(readfd, writefd, nonblocking?0:timeout_ms);
+ if(what < 0) {
+ /* fatal error */
+ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ else if(0 == what) {
+ if(nonblocking) {
+ *done = FALSE;
+ return CURLE_OK;
+ }
+ else {
+ /* timeout */
+ failf(data, "SSL connection timeout");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+ }
+ /* socket is readable or writable */
+ }
+
+ /* Run transaction, and return to the caller if it failed or if
+ * this connection is part of a multi handle and this loop would
+ * execute again. This permits the owner of a multi handle to
+ * abort a connection attempt before step2 has completed while
+ * 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;
+
+ } /* 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_done == connssl->connecting_state) {
+ connssl->state = ssl_connection_complete;
+ conn->recv[sockindex] = polarssl_recv;
+ conn->send[sockindex] = polarssl_send;
+ *done = TRUE;
+ }
+ else
+ *done = FALSE;
+
+ /* Reset our connect state machine */
+ connssl->connecting_state = ssl_connect_1;
+
+ return CURLE_OK;
+}
+
+CURLcode
+Curl_polarssl_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done)
+{
+ return polarssl_connect_common(conn, sockindex, TRUE, done);
+}
+
+
+CURLcode
+Curl_polarssl_connect(struct connectdata *conn,
+ int sockindex)
+{
+ CURLcode result;
+ bool done = FALSE;
+
+ result = polarssl_connect_common(conn, sockindex, FALSE, &done);
+ if(result)
+ return result;
+
+ DEBUGASSERT(done);
+
+ return CURLE_OK;
+}
+
+/*
+ * return 0 error initializing SSL
+ * return 1 SSL initialized successfully
+ */
+int polarssl_init(void)
+{
+ return polarsslthreadlock_thread_setup();
+}
+
+void polarssl_cleanup(void)
+{
+ (void)polarsslthreadlock_thread_cleanup();
+}
+
+#endif /* USE_POLARSSL */
diff --git a/lib/vtls/polarssl.h b/lib/vtls/polarssl.h
new file mode 100644
index 00000000..f980dbb2
--- /dev/null
+++ b/lib/vtls/polarssl.h
@@ -0,0 +1,75 @@
+#ifndef HEADER_CURL_POLARSSL_H
+#define HEADER_CURL_POLARSSL_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_POLARSSL
+
+/* Called on first use PolarSSL, setup threading if supported */
+int polarssl_init(void);
+void polarssl_cleanup(void);
+
+
+CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex);
+
+CURLcode Curl_polarssl_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done);
+
+ /* close a SSL connection */
+void Curl_polarssl_close(struct connectdata *conn, int sockindex);
+
+void Curl_polarssl_session_free(void *ptr);
+size_t Curl_polarssl_version(char *buffer, size_t size);
+int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex);
+
+/* Set the API backend definition to PolarSSL */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_POLARSSL
+
+/* this backend supports the CAPATH option */
+#define have_curlssl_ca_path 1
+
+/* API setup for PolarSSL */
+#define curlssl_init() polarssl_init()
+#define curlssl_cleanup() polarssl_cleanup()
+#define curlssl_connect Curl_polarssl_connect
+#define curlssl_connect_nonblocking Curl_polarssl_connect_nonblocking
+#define curlssl_session_free(x) Curl_polarssl_session_free(x)
+#define curlssl_close_all(x) ((void)x)
+#define curlssl_close Curl_polarssl_close
+#define curlssl_shutdown(x,y) 0
+#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_polarssl_version
+#define curlssl_check_cxn(x) ((void)x, -1)
+#define curlssl_data_pending(x,y) ((void)x, (void)y, 0)
+
+/* This might cause libcurl to use a weeker random!
+ TODO: implement proper use of Polarssl's CTR-DRBG or HMAC-DRBG and use that
+*/
+#define curlssl_random(x,y,z) ((void)x, (void)y, (void)z, CURLE_NOT_BUILT_IN)
+
+#endif /* USE_POLARSSL */
+#endif /* HEADER_CURL_POLARSSL_H */
diff --git a/lib/vtls/polarssl_threadlock.c b/lib/vtls/polarssl_threadlock.c
new file mode 100644
index 00000000..62abf43b
--- /dev/null
+++ b/lib/vtls/polarssl_threadlock.c
@@ -0,0 +1,153 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ * Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, 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(USE_POLARSSL) && \
+ (defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32))
+
+#if defined(USE_THREADS_POSIX)
+# ifdef HAVE_PTHREAD_H
+# include <pthread.h>
+# endif
+#elif defined(USE_THREADS_WIN32)
+# ifdef HAVE_PROCESS_H
+# include <process.h>
+# endif
+#endif
+
+#include "polarssl_threadlock.h"
+#include "curl_printf.h"
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/* number of thread locks */
+#define NUMT 2
+
+/* This array will store all of the mutexes available to PolarSSL. */
+static POLARSSL_MUTEX_T *mutex_buf = NULL;
+
+int polarsslthreadlock_thread_setup(void)
+{
+ int i;
+ int ret;
+
+ mutex_buf = malloc(NUMT * sizeof(POLARSSL_MUTEX_T));
+ if(!mutex_buf)
+ return 0; /* error, no number of threads defined */
+
+#ifdef HAVE_PTHREAD_H
+ for(i = 0; i < NUMT; i++) {
+ ret = pthread_mutex_init(&mutex_buf[i], NULL);
+ if(ret)
+ return 0; /* pthread_mutex_init failed */
+ }
+#elif defined(HAVE_PROCESS_H)
+ for(i = 0; i < NUMT; i++) {
+ mutex_buf[i] = CreateMutex(0, FALSE, 0);
+ if(mutex_buf[i] == 0)
+ return 0; /* CreateMutex failed */
+ }
+#endif /* HAVE_PTHREAD_H */
+
+ return 1; /* OK */
+}
+
+int polarsslthreadlock_thread_cleanup(void)
+{
+ int i;
+ int ret;
+
+ if(!mutex_buf)
+ return 0; /* error, no threads locks defined */
+
+#ifdef HAVE_PTHREAD_H
+ for(i = 0; i < NUMT; i++) {
+ ret = pthread_mutex_destroy(&mutex_buf[i]);
+ if(ret)
+ return 0; /* pthread_mutex_destroy failed */
+ }
+#elif defined(HAVE_PROCESS_H)
+ for(i = 0; i < NUMT; i++) {
+ ret = CloseHandle(mutex_buf[i]);
+ if(!ret)
+ return 0; /* CloseHandle failed */
+ }
+#endif /* HAVE_PTHREAD_H */
+ free(mutex_buf);
+ mutex_buf = NULL;
+
+ return 1; /* OK */
+}
+
+int polarsslthreadlock_lock_function(int n)
+{
+ int ret;
+#ifdef HAVE_PTHREAD_H
+ if(n < NUMT) {
+ ret = pthread_mutex_lock(&mutex_buf[n]);
+ if(ret) {
+ DEBUGF(fprintf(stderr,
+ "Error: polarsslthreadlock_lock_function failed\n"));
+ return 0; /* pthread_mutex_lock failed */
+ }
+ }
+#elif defined(HAVE_PROCESS_H)
+ if(n < NUMT) {
+ ret = (WaitForSingleObject(mutex_buf[n], INFINITE)==WAIT_FAILED?1:0);
+ if(ret) {
+ DEBUGF(fprintf(stderr,
+ "Error: polarsslthreadlock_lock_function failed\n"));
+ return 0; /* pthread_mutex_lock failed */
+ }
+ }
+#endif /* HAVE_PTHREAD_H */
+ return 1; /* OK */
+}
+
+int polarsslthreadlock_unlock_function(int n)
+{
+ int ret;
+#ifdef HAVE_PTHREAD_H
+ if(n < NUMT) {
+ ret = pthread_mutex_unlock(&mutex_buf[n]);
+ if(ret) {
+ DEBUGF(fprintf(stderr,
+ "Error: polarsslthreadlock_unlock_function failed\n"));
+ return 0; /* pthread_mutex_unlock failed */
+ }
+ }
+#elif defined(HAVE_PROCESS_H)
+ if(n < NUMT) {
+ ret = ReleaseMutex(mutex_buf[n]);
+ if(!ret) {
+ DEBUGF(fprintf(stderr,
+ "Error: polarsslthreadlock_unlock_function failed\n"));
+ return 0; /* pthread_mutex_lock failed */
+ }
+ }
+#endif /* HAVE_PTHREAD_H */
+ return 1; /* OK */
+}
+
+#endif /* USE_POLARSSL */
diff --git a/lib/vtls/polarssl_threadlock.h b/lib/vtls/polarssl_threadlock.h
new file mode 100644
index 00000000..b67b3f9a
--- /dev/null
+++ b/lib/vtls/polarssl_threadlock.h
@@ -0,0 +1,53 @@
+#ifndef HEADER_CURL_POLARSSL_THREADLOCK_H
+#define HEADER_CURL_POLARSSL_THREADLOCK_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ * Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, 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_POLARSSL
+
+#if defined(USE_THREADS_POSIX)
+# define POLARSSL_MUTEX_T pthread_mutex_t
+#elif defined(USE_THREADS_WIN32)
+# define POLARSSL_MUTEX_T HANDLE
+#endif
+
+#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
+
+int polarsslthreadlock_thread_setup(void);
+int polarsslthreadlock_thread_cleanup(void);
+int polarsslthreadlock_lock_function(int n);
+int polarsslthreadlock_unlock_function(int n);
+
+#else
+
+#define polarsslthreadlock_thread_setup() 1
+#define polarsslthreadlock_thread_cleanup() 1
+#define polarsslthreadlock_lock_function(x) 1
+#define polarsslthreadlock_unlock_function(x) 1
+
+#endif /* USE_THREADS_POSIX || USE_THREADS_WIN32 */
+
+#endif /* USE_POLARSSL */
+
+#endif /* HEADER_CURL_POLARSSL_THREADLOCK_H */
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
new file mode 100644
index 00000000..19aff8f0
--- /dev/null
+++ b/lib/vtls/schannel.c
@@ -0,0 +1,1468 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2015, Marc Hoersken, <info@marc-hoersken.de>
+ * Copyright (C) 2012, Mark Salisbury, <mark.salisbury@hp.com>
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all SChannel-specific code for the TLS/SSL layer. No code
+ * but vtls.c should ever call or use these functions.
+ *
+ */
+
+/*
+ * Based upon the PolarSSL implementation in polarssl.c and polarssl.h:
+ * Copyright (C) 2010, 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ *
+ * Based upon the CyaSSL implementation in cyassl.c and cyassl.h:
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * Thanks for code and inspiration!
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_SCHANNEL
+
+#ifndef USE_WINDOWS_SSPI
+# error "Can't compile SCHANNEL support without SSPI."
+#endif
+
+#include "curl_sspi.h"
+#include "schannel.h"
+#include "vtls.h"
+#include "sendf.h"
+#include "connect.h" /* for the connect timeout */
+#include "strerror.h"
+#include "select.h" /* for the socket readyness */
+#include "inet_pton.h" /* for IP addr SNI check */
+#include "curl_multibyte.h"
+#include "warnless.h"
+#include "curl_printf.h"
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/* Uncomment to force verbose output
+ * #define infof(x, y, ...) printf(y, __VA_ARGS__)
+ * #define failf(x, y, ...) printf(y, __VA_ARGS__)
+ */
+
+static Curl_recv schannel_recv;
+static Curl_send schannel_send;
+
+#ifdef _WIN32_WCE
+static CURLcode verify_certificate(struct connectdata *conn, int sockindex);
+#endif
+
+static void InitSecBuffer(SecBuffer *buffer, unsigned long BufType,
+ void *BufDataPtr, unsigned long BufByteSize)
+{
+ buffer->cbBuffer = BufByteSize;
+ buffer->BufferType = BufType;
+ buffer->pvBuffer = BufDataPtr;
+}
+
+static void InitSecBufferDesc(SecBufferDesc *desc, SecBuffer *BufArr,
+ unsigned long NumArrElem)
+{
+ desc->ulVersion = SECBUFFER_VERSION;
+ desc->pBuffers = BufArr;
+ desc->cBuffers = NumArrElem;
+}
+
+static CURLcode
+schannel_connect_step1(struct connectdata *conn, int sockindex)
+{
+ ssize_t written = -1;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ SecBuffer outbuf;
+ SecBufferDesc outbuf_desc;
+ SCHANNEL_CRED schannel_cred;
+ SECURITY_STATUS sspi_status = SEC_E_OK;
+ struct curl_schannel_cred *old_cred = NULL;
+ struct in_addr addr;
+#ifdef ENABLE_IPV6
+ struct in6_addr addr6;
+#endif
+ TCHAR *host_name;
+ CURLcode result;
+
+ infof(data, "schannel: SSL/TLS connection with %s port %hu (step 1/3)\n",
+ conn->host.name, conn->remote_port);
+
+ /* check for an existing re-usable credential handle */
+ if(!Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL)) {
+ connssl->cred = old_cred;
+ infof(data, "schannel: re-using existing credential handle\n");
+ }
+ else {
+ /* setup Schannel API options */
+ memset(&schannel_cred, 0, sizeof(schannel_cred));
+ schannel_cred.dwVersion = SCHANNEL_CRED_VERSION;
+
+ if(data->set.ssl.verifypeer) {
+#ifdef _WIN32_WCE
+ /* certificate validation on CE doesn't seem to work right; we'll
+ do it following a more manual process. */
+ schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION |
+ SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
+ SCH_CRED_IGNORE_REVOCATION_OFFLINE;
+#else
+ schannel_cred.dwFlags = SCH_CRED_AUTO_CRED_VALIDATION |
+ SCH_CRED_REVOCATION_CHECK_CHAIN;
+#endif
+ infof(data, "schannel: checking server certificate revocation\n");
+ }
+ else {
+ schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION |
+ SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
+ SCH_CRED_IGNORE_REVOCATION_OFFLINE;
+ infof(data, "schannel: disable server certificate revocation checks\n");
+ }
+
+ if(!data->set.ssl.verifyhost) {
+ schannel_cred.dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK;
+ infof(data, "schannel: verifyhost setting prevents Schannel from "
+ "comparing the supplied target name with the subject "
+ "names in server certificates. Also disables SNI.\n");
+ }
+
+ 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 |
+ SP_PROT_TLS1_2_CLIENT;
+ break;
+ case CURL_SSLVERSION_TLSv1_0:
+ schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_0_CLIENT;
+ break;
+ case CURL_SSLVERSION_TLSv1_1:
+ schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_1_CLIENT;
+ break;
+ case CURL_SSLVERSION_TLSv1_2:
+ schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT;
+ break;
+ case CURL_SSLVERSION_SSLv3:
+ schannel_cred.grbitEnabledProtocols = SP_PROT_SSL3_CLIENT;
+ break;
+ case CURL_SSLVERSION_SSLv2:
+ schannel_cred.grbitEnabledProtocols = SP_PROT_SSL2_CLIENT;
+ break;
+ }
+
+ /* allocate memory for the re-usable credential handle */
+ connssl->cred = (struct curl_schannel_cred *)
+ malloc(sizeof(struct curl_schannel_cred));
+ if(!connssl->cred) {
+ failf(data, "schannel: unable to allocate memory");
+ return CURLE_OUT_OF_MEMORY;
+ }
+ memset(connssl->cred, 0, sizeof(struct curl_schannel_cred));
+
+ /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx */
+ sspi_status =
+ s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME,
+ SECPKG_CRED_OUTBOUND, NULL,
+ &schannel_cred, NULL, NULL,
+ &connssl->cred->cred_handle,
+ &connssl->cred->time_stamp);
+
+ if(sspi_status != SEC_E_OK) {
+ if(sspi_status == SEC_E_WRONG_PRINCIPAL)
+ failf(data, "schannel: SNI or certificate check failed: %s",
+ Curl_sspi_strerror(conn, sspi_status));
+ else
+ failf(data, "schannel: AcquireCredentialsHandle failed: %s",
+ Curl_sspi_strerror(conn, sspi_status));
+ Curl_safefree(connssl->cred);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+
+ /* Warn if SNI is disabled due to use of an IP address */
+ if(Curl_inet_pton(AF_INET, conn->host.name, &addr)
+#ifdef ENABLE_IPV6
+ || Curl_inet_pton(AF_INET6, conn->host.name, &addr6)
+#endif
+ ) {
+ infof(data, "schannel: using IP address, SNI is not supported by OS.\n");
+ }
+
+ /* setup output buffer */
+ InitSecBuffer(&outbuf, SECBUFFER_EMPTY, NULL, 0);
+ InitSecBufferDesc(&outbuf_desc, &outbuf, 1);
+
+ /* setup request flags */
+ connssl->req_flags = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT |
+ ISC_REQ_CONFIDENTIALITY | ISC_REQ_ALLOCATE_MEMORY |
+ ISC_REQ_STREAM;
+
+ /* allocate memory for the security context handle */
+ connssl->ctxt = (struct curl_schannel_ctxt *)
+ malloc(sizeof(struct curl_schannel_ctxt));
+ if(!connssl->ctxt) {
+ failf(data, "schannel: unable to allocate memory");
+ return CURLE_OUT_OF_MEMORY;
+ }
+ memset(connssl->ctxt, 0, sizeof(struct curl_schannel_ctxt));
+
+ host_name = Curl_convert_UTF8_to_tchar(conn->host.name);
+ if(!host_name)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx */
+
+ sspi_status = s_pSecFn->InitializeSecurityContext(
+ &connssl->cred->cred_handle, NULL, host_name,
+ connssl->req_flags, 0, 0, NULL, 0, &connssl->ctxt->ctxt_handle,
+ &outbuf_desc, &connssl->ret_flags, &connssl->ctxt->time_stamp);
+
+ Curl_unicodefree(host_name);
+
+ if(sspi_status != SEC_I_CONTINUE_NEEDED) {
+ if(sspi_status == SEC_E_WRONG_PRINCIPAL)
+ failf(data, "schannel: SNI or certificate check failed: %s",
+ Curl_sspi_strerror(conn, sspi_status));
+ else
+ failf(data, "schannel: initial InitializeSecurityContext failed: %s",
+ Curl_sspi_strerror(conn, sspi_status));
+ Curl_safefree(connssl->ctxt);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ infof(data, "schannel: sending initial handshake data: "
+ "sending %lu bytes...\n", outbuf.cbBuffer);
+
+ /* send initial handshake data which is now stored in output buffer */
+ result = Curl_write_plain(conn, conn->sock[sockindex], outbuf.pvBuffer,
+ outbuf.cbBuffer, &written);
+ s_pSecFn->FreeContextBuffer(outbuf.pvBuffer);
+ if((result != CURLE_OK) || (outbuf.cbBuffer != (size_t) written)) {
+ failf(data, "schannel: failed to send initial handshake data: "
+ "sent %zd of %lu bytes", written, outbuf.cbBuffer);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ infof(data, "schannel: sent initial handshake data: "
+ "sent %zd bytes\n", written);
+
+ connssl->recv_unrecoverable_err = CURLE_OK;
+ connssl->recv_sspi_close_notify = false;
+ connssl->recv_connection_closed = false;
+
+ /* continue to second handshake step */
+ connssl->connecting_state = ssl_connect_2;
+
+ return CURLE_OK;
+}
+
+static CURLcode
+schannel_connect_step2(struct connectdata *conn, int sockindex)
+{
+ int i;
+ 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[3];
+ SecBufferDesc outbuf_desc;
+ SecBuffer inbuf[2];
+ SecBufferDesc inbuf_desc;
+ SECURITY_STATUS sspi_status = SEC_E_OK;
+ TCHAR *host_name;
+ CURLcode result;
+ bool doread;
+
+ doread = (connssl->connecting_state != ssl_connect_2_writing) ? TRUE : FALSE;
+
+ infof(data, "schannel: SSL/TLS connection with %s port %hu (step 2/3)\n",
+ conn->host.name, conn->remote_port);
+
+ if(!connssl->cred || !connssl->ctxt)
+ return CURLE_SSL_CONNECT_ERROR;
+
+ /* buffer to store previously received and decrypted data */
+ if(connssl->decdata_buffer == NULL) {
+ connssl->decdata_offset = 0;
+ connssl->decdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE;
+ connssl->decdata_buffer = malloc(connssl->decdata_length);
+ if(connssl->decdata_buffer == NULL) {
+ failf(data, "schannel: unable to allocate memory");
+ return CURLE_OUT_OF_MEMORY;
+ }
+ }
+
+ /* buffer to store previously received and encrypted data */
+ if(connssl->encdata_buffer == NULL) {
+ connssl->encdata_offset = 0;
+ connssl->encdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE;
+ connssl->encdata_buffer = malloc(connssl->encdata_length);
+ if(connssl->encdata_buffer == NULL) {
+ failf(data, "schannel: unable to allocate memory");
+ return CURLE_OUT_OF_MEMORY;
+ }
+ }
+
+ /* if we need a bigger buffer to read a full message, increase buffer now */
+ if(connssl->encdata_length - connssl->encdata_offset <
+ 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);
+
+ if(reallocated_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(;;) {
+ if(doread) {
+ /* read encrypted handshake data from socket */
+ result = Curl_read_plain(conn->sock[sockindex],
+ (char *) (connssl->encdata_buffer +
+ connssl->encdata_offset),
+ connssl->encdata_length -
+ connssl->encdata_offset,
+ &nread);
+ if(result == CURLE_AGAIN) {
+ if(connssl->connecting_state != ssl_connect_2_writing)
+ connssl->connecting_state = ssl_connect_2_reading;
+ infof(data, "schannel: failed to receive handshake, "
+ "need more data\n");
+ return CURLE_OK;
+ }
+ else if((result != CURLE_OK) || (nread == 0)) {
+ failf(data, "schannel: failed to receive handshake, "
+ "SSL/TLS connection failed");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ /* increase encrypted data buffer offset */
+ connssl->encdata_offset += nread;
+ }
+
+ infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n",
+ connssl->encdata_offset, connssl->encdata_length);
+
+ /* setup input buffers */
+ InitSecBuffer(&inbuf[0], SECBUFFER_TOKEN, malloc(connssl->encdata_offset),
+ curlx_uztoul(connssl->encdata_offset));
+ InitSecBuffer(&inbuf[1], SECBUFFER_EMPTY, NULL, 0);
+ InitSecBufferDesc(&inbuf_desc, inbuf, 2);
+
+ /* setup output buffers */
+ InitSecBuffer(&outbuf[0], SECBUFFER_TOKEN, NULL, 0);
+ InitSecBuffer(&outbuf[1], SECBUFFER_ALERT, NULL, 0);
+ InitSecBuffer(&outbuf[2], SECBUFFER_EMPTY, NULL, 0);
+ InitSecBufferDesc(&outbuf_desc, outbuf, 3);
+
+ if(inbuf[0].pvBuffer == NULL) {
+ failf(data, "schannel: unable to allocate memory");
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ /* copy received handshake data into input buffer */
+ memcpy(inbuf[0].pvBuffer, connssl->encdata_buffer,
+ connssl->encdata_offset);
+
+ host_name = Curl_convert_UTF8_to_tchar(conn->host.name);
+ if(!host_name)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx */
+
+ sspi_status = s_pSecFn->InitializeSecurityContext(
+ &connssl->cred->cred_handle, &connssl->ctxt->ctxt_handle,
+ host_name, connssl->req_flags, 0, 0, &inbuf_desc, 0, NULL,
+ &outbuf_desc, &connssl->ret_flags, &connssl->ctxt->time_stamp);
+
+ Curl_unicodefree(host_name);
+
+ /* free buffer for received handshake data */
+ Curl_safefree(inbuf[0].pvBuffer);
+
+ /* check if the handshake was incomplete */
+ if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) {
+ connssl->connecting_state = ssl_connect_2_reading;
+ infof(data, "schannel: received incomplete message, need more data\n");
+ return CURLE_OK;
+ }
+
+ /* If the server has requested a client certificate, attempt to continue
+ the handshake without one. This will allow connections to servers which
+ request a client certificate but do not require it. */
+ if(sspi_status == SEC_I_INCOMPLETE_CREDENTIALS &&
+ !(connssl->req_flags & ISC_REQ_USE_SUPPLIED_CREDS)) {
+ connssl->req_flags |= ISC_REQ_USE_SUPPLIED_CREDS;
+ connssl->connecting_state = ssl_connect_2_writing;
+ infof(data, "schannel: a client certificate has been requested\n");
+ return CURLE_OK;
+ }
+
+ /* check if the handshake needs to be continued */
+ if(sspi_status == SEC_I_CONTINUE_NEEDED || sspi_status == SEC_E_OK) {
+ for(i = 0; i < 3; i++) {
+ /* search for handshake tokens that need to be send */
+ if(outbuf[i].BufferType == SECBUFFER_TOKEN && outbuf[i].cbBuffer > 0) {
+ infof(data, "schannel: sending next handshake data: "
+ "sending %lu bytes...\n", outbuf[i].cbBuffer);
+
+ /* send handshake token to server */
+ result = Curl_write_plain(conn, conn->sock[sockindex],
+ outbuf[i].pvBuffer, outbuf[i].cbBuffer,
+ &written);
+ if((result != CURLE_OK) ||
+ (outbuf[i].cbBuffer != (size_t) written)) {
+ failf(data, "schannel: failed to send next handshake data: "
+ "sent %zd of %lu bytes", written, outbuf[i].cbBuffer);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ }
+
+ /* free obsolete buffer */
+ if(outbuf[i].pvBuffer != NULL) {
+ s_pSecFn->FreeContextBuffer(outbuf[i].pvBuffer);
+ }
+ }
+ }
+ else {
+ if(sspi_status == SEC_E_WRONG_PRINCIPAL)
+ failf(data, "schannel: SNI or certificate check failed: %s",
+ Curl_sspi_strerror(conn, sspi_status));
+ else
+ failf(data, "schannel: next InitializeSecurityContext failed: %s",
+ Curl_sspi_strerror(conn, sspi_status));
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ /* check if there was additional remaining encrypted data */
+ if(inbuf[1].BufferType == SECBUFFER_EXTRA && inbuf[1].cbBuffer > 0) {
+ infof(data, "schannel: encrypted data length: %lu\n", inbuf[1].cbBuffer);
+ /*
+ There are two cases where we could be getting extra data here:
+ 1) If we're renegotiating a connection and the handshake is already
+ complete (from the server perspective), it can encrypted app data
+ (not handshake data) in an extra buffer at this point.
+ 2) (sspi_status == SEC_I_CONTINUE_NEEDED) We are negotiating a
+ connection and this extra data is part of the handshake.
+ We should process the data immediately; waiting for the socket to
+ be ready may fail since the server is done sending handshake data.
+ */
+ /* check if the remaining data is less than the total amount
+ and therefore begins after the already processed data */
+ if(connssl->encdata_offset > inbuf[1].cbBuffer) {
+ memmove(connssl->encdata_buffer,
+ (connssl->encdata_buffer + connssl->encdata_offset) -
+ inbuf[1].cbBuffer, inbuf[1].cbBuffer);
+ connssl->encdata_offset = inbuf[1].cbBuffer;
+ if(sspi_status == SEC_I_CONTINUE_NEEDED) {
+ doread = FALSE;
+ continue;
+ }
+ }
+ }
+ else {
+ connssl->encdata_offset = 0;
+ }
+ break;
+ }
+
+ /* check if the handshake needs to be continued */
+ if(sspi_status == SEC_I_CONTINUE_NEEDED) {
+ connssl->connecting_state = ssl_connect_2_reading;
+ return CURLE_OK;
+ }
+
+ /* check if the handshake is complete */
+ if(sspi_status == SEC_E_OK) {
+ connssl->connecting_state = ssl_connect_3;
+ infof(data, "schannel: SSL/TLS handshake complete\n");
+ }
+
+#ifdef _WIN32_WCE
+ /* Windows CE doesn't do any server certificate validation.
+ We have to do it manually. */
+ if(data->set.ssl.verifypeer)
+ return verify_certificate(conn, sockindex);
+#endif
+
+ return CURLE_OK;
+}
+
+static CURLcode
+schannel_connect_step3(struct connectdata *conn, int sockindex)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ struct curl_schannel_cred *old_cred = NULL;
+ bool incache;
+
+ DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
+
+ infof(data, "schannel: SSL/TLS connection with %s port %hu (step 3/3)\n",
+ conn->host.name, conn->remote_port);
+
+ if(!connssl->cred)
+ return CURLE_SSL_CONNECT_ERROR;
+
+ /* check if the required context attributes are met */
+ if(connssl->ret_flags != connssl->req_flags) {
+ if(!(connssl->ret_flags & ISC_RET_SEQUENCE_DETECT))
+ failf(data, "schannel: failed to setup sequence detection");
+ if(!(connssl->ret_flags & ISC_RET_REPLAY_DETECT))
+ failf(data, "schannel: failed to setup replay detection");
+ if(!(connssl->ret_flags & ISC_RET_CONFIDENTIALITY))
+ failf(data, "schannel: failed to setup confidentiality");
+ if(!(connssl->ret_flags & ISC_RET_ALLOCATED_MEMORY))
+ failf(data, "schannel: failed to setup memory allocation");
+ if(!(connssl->ret_flags & ISC_RET_STREAM))
+ failf(data, "schannel: failed to setup stream orientation");
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+
+ /* increment the reference counter of the credential/session handle */
+ if(connssl->cred && connssl->ctxt) {
+ connssl->cred->refcount++;
+ infof(data, "schannel: incremented credential handle refcount = %d\n",
+ connssl->cred->refcount);
+ }
+
+ /* save the current session data for possible re-use */
+ 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);
+ incache = FALSE;
+ }
+ }
+
+ if(!incache) {
+ result = Curl_ssl_addsessionid(conn, (void *)connssl->cred,
+ sizeof(struct curl_schannel_cred));
+ if(result) {
+ failf(data, "schannel: failed to store credential handle");
+ return result;
+ }
+ else {
+ connssl->cred->cached = TRUE;
+ infof(data, "schannel: stored credential handle in session cache\n");
+ }
+ }
+
+ connssl->connecting_state = ssl_connect_done;
+
+ return CURLE_OK;
+}
+
+static CURLcode
+schannel_connect_common(struct connectdata *conn, int sockindex,
+ bool nonblocking, bool *done)
+{
+ CURLcode result;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ curl_socket_t sockfd = conn->sock[sockindex];
+ long timeout_ms;
+ int what;
+
+ /* check if the connection has already been established */
+ if(ssl_connection_complete == connssl->state) {
+ *done = TRUE;
+ return CURLE_OK;
+ }
+
+ if(ssl_connect_1 == connssl->connecting_state) {
+ /* check out how much more time we're allowed */
+ timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+ if(timeout_ms < 0) {
+ /* no need to continue if time already is up */
+ failf(data, "SSL/TLS connection timeout");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ result = schannel_connect_step1(conn, sockindex);
+ if(result)
+ return result;
+ }
+
+ while(ssl_connect_2 == connssl->connecting_state ||
+ ssl_connect_2_reading == connssl->connecting_state ||
+ ssl_connect_2_writing == connssl->connecting_state) {
+
+ /* check out how much more time we're allowed */
+ timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+ if(timeout_ms < 0) {
+ /* no need to continue if time already is up */
+ failf(data, "SSL/TLS connection timeout");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+
+ /* 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) {
+
+ curl_socket_t writefd = ssl_connect_2_writing ==
+ connssl->connecting_state ? sockfd : CURL_SOCKET_BAD;
+ curl_socket_t readfd = ssl_connect_2_reading ==
+ connssl->connecting_state ? sockfd : CURL_SOCKET_BAD;
+
+ what = Curl_socket_ready(readfd, writefd, nonblocking ? 0 : timeout_ms);
+ if(what < 0) {
+ /* fatal error */
+ failf(data, "select/poll on SSL/TLS socket, errno: %d", SOCKERRNO);
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+ else if(0 == what) {
+ if(nonblocking) {
+ *done = FALSE;
+ return CURLE_OK;
+ }
+ else {
+ /* timeout */
+ failf(data, "SSL/TLS connection timeout");
+ return CURLE_OPERATION_TIMEDOUT;
+ }
+ }
+ /* socket is readable or writable */
+ }
+
+ /* Run transaction, and return to the caller if it failed or if
+ * this connection is part of a multi handle and this loop would
+ * execute again. This permits the owner of a multi handle to
+ * abort a connection attempt before step2 has completed while
+ * 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;
+
+ } /* repeat step2 until all transactions are done. */
+
+ if(ssl_connect_3 == connssl->connecting_state) {
+ result = schannel_connect_step3(conn, sockindex);
+ if(result)
+ return result;
+ }
+
+ if(ssl_connect_done == connssl->connecting_state) {
+ connssl->state = ssl_connection_complete;
+ conn->recv[sockindex] = schannel_recv;
+ conn->send[sockindex] = schannel_send;
+ *done = TRUE;
+ }
+ else
+ *done = FALSE;
+
+ /* reset our connection state machine */
+ connssl->connecting_state = ssl_connect_1;
+
+ return CURLE_OK;
+}
+
+static ssize_t
+schannel_send(struct connectdata *conn, int sockindex,
+ const void *buf, size_t len, CURLcode *err)
+{
+ ssize_t written = -1;
+ size_t data_len = 0;
+ unsigned char *data = NULL;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ SecBuffer outbuf[4];
+ SecBufferDesc outbuf_desc;
+ SECURITY_STATUS sspi_status = SEC_E_OK;
+ CURLcode result;
+
+ /* check if the maximum stream sizes were queried */
+ if(connssl->stream_sizes.cbMaximumMessage == 0) {
+ sspi_status = s_pSecFn->QueryContextAttributes(
+ &connssl->ctxt->ctxt_handle,
+ SECPKG_ATTR_STREAM_SIZES,
+ &connssl->stream_sizes);
+ if(sspi_status != SEC_E_OK) {
+ *err = CURLE_SEND_ERROR;
+ return -1;
+ }
+ }
+
+ /* check if the buffer is longer than the maximum message length */
+ if(len > connssl->stream_sizes.cbMaximumMessage) {
+ *err = CURLE_SEND_ERROR;
+ return -1;
+ }
+
+ /* 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);
+ if(data == NULL) {
+ *err = CURLE_OUT_OF_MEMORY;
+ return -1;
+ }
+
+ /* setup output buffers (header, data, trailer, empty) */
+ InitSecBuffer(&outbuf[0], SECBUFFER_STREAM_HEADER,
+ data, connssl->stream_sizes.cbHeader);
+ InitSecBuffer(&outbuf[1], SECBUFFER_DATA,
+ data + connssl->stream_sizes.cbHeader, curlx_uztoul(len));
+ InitSecBuffer(&outbuf[2], SECBUFFER_STREAM_TRAILER,
+ data + connssl->stream_sizes.cbHeader + len,
+ connssl->stream_sizes.cbTrailer);
+ InitSecBuffer(&outbuf[3], SECBUFFER_EMPTY, NULL, 0);
+ InitSecBufferDesc(&outbuf_desc, outbuf, 4);
+
+ /* copy data into output buffer */
+ memcpy(outbuf[1].pvBuffer, buf, len);
+
+ /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa375390.aspx */
+ sspi_status = s_pSecFn->EncryptMessage(&connssl->ctxt->ctxt_handle, 0,
+ &outbuf_desc, 0);
+
+ /* check if the message was encrypted */
+ if(sspi_status == SEC_E_OK) {
+ written = 0;
+
+ /* send the encrypted message including header, data and trailer */
+ len = outbuf[0].cbBuffer + outbuf[1].cbBuffer + outbuf[2].cbBuffer;
+
+ /*
+ It's important to send the full message which includes the header,
+ encrypted payload, and trailer. Until the client receives all the
+ data a coherent message has not been delivered and the client
+ can't read any of it.
+
+ If we wanted to buffer the unwritten encrypted bytes, we would
+ tell the client that all data it has requested to be sent has been
+ sent. The unwritten encrypted bytes would be the first bytes to
+ send on the next invocation.
+ Here's the catch with this - if we tell the client that all the
+ bytes have been sent, will the client call this method again to
+ send the buffered data? Looking at who calls this function, it
+ seems the answer is NO.
+ */
+
+ /* send entire message or fail */
+ while(len > (size_t)written) {
+ ssize_t this_write;
+ long timeleft;
+ int what;
+
+ this_write = 0;
+
+ timeleft = Curl_timeleft(conn->data, NULL, FALSE);
+ if(timeleft < 0) {
+ /* we already got the timeout */
+ failf(conn->data, "schannel: timed out sending data "
+ "(bytes sent: %zd)", written);
+ *err = CURLE_OPERATION_TIMEDOUT;
+ written = -1;
+ break;
+ }
+
+ what = Curl_socket_ready(CURL_SOCKET_BAD, conn->sock[sockindex],
+ timeleft);
+ if(what < 0) {
+ /* fatal error */
+ failf(conn->data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+ *err = CURLE_SEND_ERROR;
+ written = -1;
+ break;
+ }
+ else if(0 == what) {
+ failf(conn->data, "schannel: timed out sending data "
+ "(bytes sent: %zd)", written);
+ *err = CURLE_OPERATION_TIMEDOUT;
+ written = -1;
+ break;
+ }
+ /* socket is writable */
+
+ result = Curl_write_plain(conn, conn->sock[sockindex], data + written,
+ len - written, &this_write);
+ if(result == CURLE_AGAIN)
+ continue;
+ else if(result != CURLE_OK) {
+ *err = result;
+ written = -1;
+ break;
+ }
+
+ written += this_write;
+ }
+ }
+ else if(sspi_status == SEC_E_INSUFFICIENT_MEMORY) {
+ *err = CURLE_OUT_OF_MEMORY;
+ }
+ else{
+ *err = CURLE_SEND_ERROR;
+ }
+
+ Curl_safefree(data);
+
+ if(len == (size_t)written)
+ /* Encrypted message including header, data and trailer entirely sent.
+ The return value is the number of unencrypted bytes that were sent. */
+ written = outbuf[1].cbBuffer;
+
+ return written;
+}
+
+static ssize_t
+schannel_recv(struct connectdata *conn, int sockindex,
+ char *buf, size_t len, CURLcode *err)
+{
+ size_t size = 0;
+ ssize_t nread = -1;
+ 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;
+ SECURITY_STATUS sspi_status = SEC_E_OK;
+ /* we want the length of the encrypted buffer to be at least large enough
+ that it can hold all the bytes requested and some TLS record overhead. */
+ size_t min_encdata_length = len + CURL_SCHANNEL_BUFFER_FREE_SIZE;
+
+ /****************************************************************************
+ * Don't return or set connssl->recv_unrecoverable_err unless in the cleanup.
+ * The pattern for return error is set *err, optional infof, goto cleanup.
+ *
+ * Our priority is to always return as much decrypted data to the caller as
+ * possible, even if an error occurs. The state of the decrypted buffer must
+ * always be valid. Transfer of decrypted data to the caller's buffer is
+ * handled in the cleanup.
+ */
+
+ infof(data, "schannel: client wants to read %zu bytes\n", len);
+ *err = CURLE_OK;
+
+ if(len && len <= connssl->decdata_offset) {
+ infof(data, "schannel: enough decrypted data is already available\n");
+ goto cleanup;
+ }
+ else if(connssl->recv_unrecoverable_err) {
+ *err = connssl->recv_unrecoverable_err;
+ infof(data, "schannel: an unrecoverable error occurred in a prior call\n");
+ goto cleanup;
+ }
+ else if(connssl->recv_sspi_close_notify) {
+ /* once a server has indicated shutdown there is no more encrypted data */
+ infof(data, "schannel: server indicated shutdown in a prior call\n");
+ goto cleanup;
+ }
+ else if(!len) {
+ /* It's debatable what to return when !len. Regardless we can't return
+ immediately because there may be data to decrypt (in the case we want to
+ decrypt all encrypted cached data) so handle !len later in cleanup.
+ */
+ ; /* do nothing */
+ }
+ else if(!connssl->recv_connection_closed) {
+ /* increase enc buffer in order to fit the requested amount of data */
+ size = connssl->encdata_length - connssl->encdata_offset;
+ if(size < CURL_SCHANNEL_BUFFER_FREE_SIZE ||
+ connssl->encdata_length < min_encdata_length) {
+ reallocated_length = connssl->encdata_offset +
+ CURL_SCHANNEL_BUFFER_FREE_SIZE;
+ if(reallocated_length < min_encdata_length) {
+ reallocated_length = min_encdata_length;
+ }
+ reallocated_buffer = realloc(connssl->encdata_buffer,
+ reallocated_length);
+ if(reallocated_buffer == NULL) {
+ *err = CURLE_OUT_OF_MEMORY;
+ failf(data, "schannel: unable to re-allocate memory");
+ goto cleanup;
+ }
+
+ connssl->encdata_buffer = reallocated_buffer;
+ connssl->encdata_length = reallocated_length;
+ size = connssl->encdata_length - connssl->encdata_offset;
+ infof(data, "schannel: encdata_buffer resized %zu\n",
+ connssl->encdata_length);
+ }
+
+ infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n",
+ connssl->encdata_offset, connssl->encdata_length);
+
+ /* read encrypted data from socket */
+ *err = Curl_read_plain(conn->sock[sockindex],
+ (char *)(connssl->encdata_buffer +
+ connssl->encdata_offset),
+ size, &nread);
+ if(*err) {
+ nread = -1;
+ if(*err == CURLE_AGAIN)
+ infof(data, "schannel: Curl_read_plain returned CURLE_AGAIN\n");
+ else if(*err == CURLE_RECV_ERROR)
+ infof(data, "schannel: Curl_read_plain returned CURLE_RECV_ERROR\n");
+ else
+ infof(data, "schannel: Curl_read_plain returned error %d\n", *err);
+ }
+ else if(nread == 0) {
+ connssl->recv_connection_closed = true;
+ infof(data, "schannel: server closed the connection\n");
+ }
+ else if(nread > 0) {
+ connssl->encdata_offset += (size_t)nread;
+ infof(data, "schannel: encrypted data got %zd\n", nread);
+ }
+ }
+
+ infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n",
+ connssl->encdata_offset, connssl->encdata_length);
+
+ /* decrypt loop */
+ while(connssl->encdata_offset > 0 && sspi_status == SEC_E_OK &&
+ (!len || connssl->decdata_offset < len ||
+ connssl->recv_connection_closed)) {
+ /* prepare data buffer for DecryptMessage call */
+ InitSecBuffer(&inbuf[0], SECBUFFER_DATA, connssl->encdata_buffer,
+ curlx_uztoul(connssl->encdata_offset));
+
+ /* we need 3 more empty input buffers for possible output */
+ InitSecBuffer(&inbuf[1], SECBUFFER_EMPTY, NULL, 0);
+ InitSecBuffer(&inbuf[2], SECBUFFER_EMPTY, NULL, 0);
+ InitSecBuffer(&inbuf[3], SECBUFFER_EMPTY, NULL, 0);
+ InitSecBufferDesc(&inbuf_desc, inbuf, 4);
+
+ /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa375348.aspx */
+ sspi_status = s_pSecFn->DecryptMessage(&connssl->ctxt->ctxt_handle,
+ &inbuf_desc, 0, NULL);
+
+ /* check if everything went fine (server may want to renegotiate
+ or shutdown the connection 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 */
+ if(inbuf[1].BufferType == SECBUFFER_DATA) {
+ infof(data, "schannel: decrypted data length: %lu\n",
+ inbuf[1].cbBuffer);
+
+ /* 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) {
+ /* 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);
+ if(reallocated_buffer == NULL) {
+ *err = CURLE_OUT_OF_MEMORY;
+ failf(data, "schannel: unable to re-allocate memory");
+ goto cleanup;
+ }
+ connssl->decdata_buffer = reallocated_buffer;
+ connssl->decdata_length = reallocated_length;
+ }
+
+ /* copy decrypted data to internal buffer */
+ size = inbuf[1].cbBuffer;
+ if(size) {
+ memcpy(connssl->decdata_buffer + connssl->decdata_offset,
+ inbuf[1].pvBuffer, size);
+ connssl->decdata_offset += size;
+ }
+
+ infof(data, "schannel: decrypted data added: %zu\n", size);
+ infof(data, "schannel: decrypted data cached: offset %zu length %zu\n",
+ connssl->decdata_offset, connssl->decdata_length);
+ }
+
+ /* check for remaining encrypted data */
+ if(inbuf[3].BufferType == SECBUFFER_EXTRA && inbuf[3].cbBuffer > 0) {
+ infof(data, "schannel: encrypted data length: %lu\n",
+ inbuf[3].cbBuffer);
+
+ /* check if the remaining data is less than the total amount
+ * and therefore begins after the already processed data
+ */
+ if(connssl->encdata_offset > inbuf[3].cbBuffer) {
+ /* move remaining encrypted data forward to the beginning of
+ buffer */
+ memmove(connssl->encdata_buffer,
+ (connssl->encdata_buffer + connssl->encdata_offset) -
+ inbuf[3].cbBuffer, inbuf[3].cbBuffer);
+ connssl->encdata_offset = inbuf[3].cbBuffer;
+ }
+
+ infof(data, "schannel: encrypted data cached: offset %zu length %zu\n",
+ connssl->encdata_offset, connssl->encdata_length);
+ }
+ else {
+ /* reset encrypted buffer offset, because there is no data remaining */
+ connssl->encdata_offset = 0;
+ }
+
+ /* check if server wants to renegotiate the connection context */
+ if(sspi_status == SEC_I_RENEGOTIATE) {
+ infof(data, "schannel: remote party requests renegotiation\n");
+ if(*err && *err != CURLE_AGAIN) {
+ infof(data, "schannel: can't renogotiate, an error is pending\n");
+ goto cleanup;
+ }
+ if(connssl->encdata_offset) {
+ *err = CURLE_RECV_ERROR;
+ infof(data, "schannel: can't renogotiate, "
+ "encrypted data available\n");
+ goto cleanup;
+ }
+ /* begin renegotiation */
+ infof(data, "schannel: renegotiating SSL/TLS connection\n");
+ connssl->state = ssl_connection_negotiating;
+ connssl->connecting_state = ssl_connect_2_writing;
+ *err = schannel_connect_common(conn, sockindex, FALSE, &done);
+ if(*err) {
+ infof(data, "schannel: renegotiation failed\n");
+ goto cleanup;
+ }
+ /* now retry receiving data */
+ sspi_status = SEC_E_OK;
+ infof(data, "schannel: SSL/TLS connection renegotiated\n");
+ continue;
+ }
+ /* check if the server closed the connection */
+ else if(sspi_status == SEC_I_CONTEXT_EXPIRED) {
+ /* In Windows 2000 SEC_I_CONTEXT_EXPIRED (close_notify) is not
+ returned so we have to work around that in cleanup. */
+ connssl->recv_sspi_close_notify = true;
+ if(!connssl->recv_connection_closed) {
+ connssl->recv_connection_closed = true;
+ infof(data, "schannel: server closed the connection\n");
+ }
+ goto cleanup;
+ }
+ }
+ else if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) {
+ if(!*err)
+ *err = CURLE_AGAIN;
+ infof(data, "schannel: failed to decrypt data, need more data\n");
+ goto cleanup;
+ }
+ else {
+ *err = CURLE_RECV_ERROR;
+ infof(data, "schannel: failed to read data from server: %s\n",
+ Curl_sspi_strerror(conn, sspi_status));
+ goto cleanup;
+ }
+ }
+
+ infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n",
+ connssl->encdata_offset, connssl->encdata_length);
+
+ infof(data, "schannel: decrypted data buffer: offset %zu length %zu\n",
+ connssl->decdata_offset, connssl->decdata_length);
+
+cleanup:
+ /* Warning- there is no guarantee the encdata state is valid at this point */
+ infof(data, "schannel: schannel_recv cleanup\n");
+
+ /* Error if the connection has closed without a close_notify.
+ Behavior here is a matter of debate. We don't want to be vulnerable to a
+ truncation attack however there's some browser precedent for ignoring the
+ close_notify for compatibility reasons.
+ Additionally, Windows 2000 (v5.0) is a special case since it seems it doesn't
+ return close_notify. In that case if the connection was closed we assume it
+ was graceful (close_notify) since there doesn't seem to be a way to tell.
+ */
+ if(len && !connssl->decdata_offset && connssl->recv_connection_closed &&
+ !connssl->recv_sspi_close_notify) {
+ DWORD winver_full, winver_major, winver_minor;
+ winver_full = GetVersion();
+ winver_major = (DWORD)(LOBYTE(LOWORD(winver_full)));
+ winver_minor = (DWORD)(HIBYTE(LOWORD(winver_full)));
+
+ if(winver_major == 5 && winver_minor == 0 && sspi_status == SEC_E_OK)
+ connssl->recv_sspi_close_notify = true;
+ else {
+ *err = CURLE_RECV_ERROR;
+ infof(data, "schannel: server closed abruptly (missing close_notify)\n");
+ }
+ }
+
+ /* Any error other than CURLE_AGAIN is an unrecoverable error. */
+ if(*err && *err != CURLE_AGAIN)
+ connssl->recv_unrecoverable_err = *err;
+
+ size = len < connssl->decdata_offset ? len : connssl->decdata_offset;
+ if(size) {
+ memcpy(buf, connssl->decdata_buffer, size);
+ memmove(connssl->decdata_buffer, connssl->decdata_buffer + size,
+ connssl->decdata_offset - size);
+ connssl->decdata_offset -= size;
+
+ infof(data, "schannel: decrypted data returned %zu\n", size);
+ infof(data, "schannel: decrypted data buffer: offset %zu length %zu\n",
+ connssl->decdata_offset, connssl->decdata_length);
+ *err = CURLE_OK;
+ return (ssize_t)size;
+ }
+
+ if(!*err && !connssl->recv_connection_closed)
+ *err = CURLE_AGAIN;
+
+ /* It's debatable what to return when !len. We could return whatever error we
+ got from decryption but instead we override here so the return is consistent.
+ */
+ if(!len)
+ *err = CURLE_OK;
+
+ return *err ? -1 : 0;
+}
+
+CURLcode
+Curl_schannel_connect_nonblocking(struct connectdata *conn, int sockindex,
+ bool *done)
+{
+ return schannel_connect_common(conn, sockindex, TRUE, done);
+}
+
+CURLcode
+Curl_schannel_connect(struct connectdata *conn, int sockindex)
+{
+ CURLcode result;
+ bool done = FALSE;
+
+ result = schannel_connect_common(conn, sockindex, FALSE, &done);
+ if(result)
+ return result;
+
+ DEBUGASSERT(done);
+
+ return CURLE_OK;
+}
+
+bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex)
+{
+ const struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ if(connssl->use) /* SSL/TLS is in use */
+ return (connssl->encdata_offset > 0 ||
+ connssl->decdata_offset > 0 ) ? TRUE : FALSE;
+ else
+ return FALSE;
+}
+
+void Curl_schannel_close(struct connectdata *conn, int sockindex)
+{
+ if(conn->ssl[sockindex].use)
+ /* if the SSL/TLS channel hasn't been shut down yet, do that now. */
+ Curl_ssl_shutdown(conn, sockindex);
+}
+
+int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
+{
+ /* See http://msdn.microsoft.com/en-us/library/windows/desktop/aa380138.aspx
+ * Shutting Down an Schannel Connection
+ */
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ infof(data, "schannel: shutting down SSL/TLS connection with %s port %hu\n",
+ conn->host.name, conn->remote_port);
+
+ if(connssl->cred && connssl->ctxt) {
+ SecBufferDesc BuffDesc;
+ SecBuffer Buffer;
+ SECURITY_STATUS sspi_status;
+ SecBuffer outbuf;
+ SecBufferDesc outbuf_desc;
+ CURLcode result;
+ TCHAR *host_name;
+ DWORD dwshut = SCHANNEL_SHUTDOWN;
+
+ InitSecBuffer(&Buffer, SECBUFFER_TOKEN, &dwshut, sizeof(dwshut));
+ InitSecBufferDesc(&BuffDesc, &Buffer, 1);
+
+ sspi_status = s_pSecFn->ApplyControlToken(&connssl->ctxt->ctxt_handle,
+ &BuffDesc);
+
+ if(sspi_status != SEC_E_OK)
+ failf(data, "schannel: ApplyControlToken failure: %s",
+ Curl_sspi_strerror(conn, sspi_status));
+
+ host_name = Curl_convert_UTF8_to_tchar(conn->host.name);
+ if(!host_name)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* setup output buffer */
+ InitSecBuffer(&outbuf, SECBUFFER_EMPTY, NULL, 0);
+ InitSecBufferDesc(&outbuf_desc, &outbuf, 1);
+
+ sspi_status = s_pSecFn->InitializeSecurityContext(
+ &connssl->cred->cred_handle,
+ &connssl->ctxt->ctxt_handle,
+ host_name,
+ connssl->req_flags,
+ 0,
+ 0,
+ NULL,
+ 0,
+ &connssl->ctxt->ctxt_handle,
+ &outbuf_desc,
+ &connssl->ret_flags,
+ &connssl->ctxt->time_stamp);
+
+ Curl_unicodefree(host_name);
+
+ if((sspi_status == SEC_E_OK) || (sspi_status == SEC_I_CONTEXT_EXPIRED)) {
+ /* send close message which is in output buffer */
+ ssize_t written;
+ result = Curl_write_plain(conn, conn->sock[sockindex], outbuf.pvBuffer,
+ outbuf.cbBuffer, &written);
+
+ s_pSecFn->FreeContextBuffer(outbuf.pvBuffer);
+ if((result != CURLE_OK) || (outbuf.cbBuffer != (size_t) written)) {
+ infof(data, "schannel: failed to send close msg: %s"
+ " (bytes written: %zd)\n", curl_easy_strerror(result), 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);
+ }
+
+ /* 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 internal buffer for received encrypted data */
+ if(connssl->encdata_buffer != NULL) {
+ Curl_safefree(connssl->encdata_buffer);
+ connssl->encdata_length = 0;
+ connssl->encdata_offset = 0;
+ }
+
+ /* free internal buffer for received decrypted data */
+ if(connssl->decdata_buffer != NULL) {
+ Curl_safefree(connssl->decdata_buffer);
+ connssl->decdata_length = 0;
+ connssl->decdata_offset = 0;
+ }
+
+ return CURLE_OK;
+}
+
+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;
+ }
+ }
+}
+
+int Curl_schannel_init(void)
+{
+ return (Curl_sspi_global_init() == CURLE_OK ? 1 : 0);
+}
+
+void Curl_schannel_cleanup(void)
+{
+ Curl_sspi_global_cleanup();
+}
+
+size_t Curl_schannel_version(char *buffer, size_t size)
+{
+ size = snprintf(buffer, size, "WinSSL");
+
+ 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)
+{
+ SECURITY_STATUS status;
+ struct SessionHandle *data = conn->data;
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+ CURLcode result = CURLE_OK;
+ CERT_CONTEXT *pCertContextServer = NULL;
+ const CERT_CHAIN_CONTEXT *pChainContext = NULL;
+
+ status = s_pSecFn->QueryContextAttributes(&connssl->ctxt->ctxt_handle,
+ SECPKG_ATTR_REMOTE_CERT_CONTEXT,
+ &pCertContextServer);
+
+ if((status != SEC_E_OK) || (pCertContextServer == NULL)) {
+ failf(data, "schannel: Failed to read remote certificate context: %s",
+ Curl_sspi_strerror(conn, status));
+ result = CURLE_PEER_FAILED_VERIFICATION;
+ }
+
+ if(result == CURLE_OK) {
+ CERT_CHAIN_PARA ChainPara;
+ memset(&ChainPara, 0, sizeof(ChainPara));
+ ChainPara.cbSize = sizeof(ChainPara);
+
+ if(!CertGetCertificateChain(NULL,
+ pCertContextServer,
+ NULL,
+ pCertContextServer->hCertStore,
+ &ChainPara,
+ 0,
+ NULL,
+ &pChainContext)) {
+ failf(data, "schannel: CertGetCertificateChain failed: %s",
+ Curl_sspi_strerror(conn, GetLastError()));
+ pChainContext = NULL;
+ result = CURLE_PEER_FAILED_VERIFICATION;
+ }
+
+ if(result == CURLE_OK) {
+ CERT_SIMPLE_CHAIN *pSimpleChain = pChainContext->rgpChain[0];
+ DWORD dwTrustErrorMask = ~(DWORD)(CERT_TRUST_IS_NOT_TIME_NESTED|
+ CERT_TRUST_REVOCATION_STATUS_UNKNOWN);
+ dwTrustErrorMask &= pSimpleChain->TrustStatus.dwErrorStatus;
+ if(dwTrustErrorMask) {
+ if(dwTrustErrorMask & CERT_TRUST_IS_PARTIAL_CHAIN)
+ failf(data, "schannel: CertGetCertificateChain trust error"
+ " CERT_TRUST_IS_PARTIAL_CHAIN");
+ if(dwTrustErrorMask & CERT_TRUST_IS_UNTRUSTED_ROOT)
+ failf(data, "schannel: CertGetCertificateChain trust error"
+ " CERT_TRUST_IS_UNTRUSTED_ROOT");
+ if(dwTrustErrorMask & CERT_TRUST_IS_NOT_TIME_VALID)
+ failf(data, "schannel: CertGetCertificateChain trust error"
+ " CERT_TRUST_IS_NOT_TIME_VALID");
+ failf(data, "schannel: CertGetCertificateChain error mask: 0x%08x",
+ dwTrustErrorMask);
+ result = CURLE_PEER_FAILED_VERIFICATION;
+ }
+ }
+ }
+
+ if(result == CURLE_OK) {
+ if(data->set.ssl.verifyhost) {
+ TCHAR cert_hostname_buff[128];
+ xcharp_u hostname;
+ xcharp_u cert_hostname;
+ DWORD len;
+
+ cert_hostname.const_tchar_ptr = cert_hostname_buff;
+ hostname.tchar_ptr = Curl_convert_UTF8_to_tchar(conn->host.name);
+
+ len = CertGetNameString(pCertContextServer,
+ CERT_NAME_DNS_TYPE,
+ 0,
+ NULL,
+ cert_hostname.tchar_ptr,
+ 128);
+ if(len > 0 && *cert_hostname.tchar_ptr == '*') {
+ /* this is a wildcard cert. try matching the last len - 1 chars */
+ int hostname_len = strlen(conn->host.name);
+ cert_hostname.tchar_ptr++;
+ if(_tcsicmp(cert_hostname.const_tchar_ptr,
+ hostname.const_tchar_ptr + hostname_len - len + 2) != 0)
+ result = CURLE_PEER_FAILED_VERIFICATION;
+ }
+ else if(len == 0 || _tcsicmp(hostname.const_tchar_ptr,
+ cert_hostname.const_tchar_ptr) != 0) {
+ result = CURLE_PEER_FAILED_VERIFICATION;
+ }
+ if(result == CURLE_PEER_FAILED_VERIFICATION) {
+ char *_cert_hostname;
+ _cert_hostname = Curl_convert_tchar_to_UTF8(cert_hostname.tchar_ptr);
+ failf(data, "schannel: CertGetNameString() certificate hostname "
+ "(%s) did not match connection (%s)",
+ _cert_hostname, conn->host.name);
+ Curl_unicodefree(_cert_hostname);
+ }
+ Curl_unicodefree(hostname.tchar_ptr);
+ }
+ }
+
+ if(pChainContext)
+ CertFreeCertificateChain(pChainContext);
+
+ if(pCertContextServer)
+ CertFreeCertificateContext(pCertContextServer);
+
+ return result;
+}
+#endif /* _WIN32_WCE */
+
+#endif /* USE_SCHANNEL */
diff --git a/lib/vtls/schannel.h b/lib/vtls/schannel.h
new file mode 100644
index 00000000..53295848
--- /dev/null
+++ b/lib/vtls/schannel.h
@@ -0,0 +1,118 @@
+#ifndef HEADER_CURL_SCHANNEL_H
+#define HEADER_CURL_SCHANNEL_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, Marc Hoersken, <info@marc-hoersken.de>, et al.
+ * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_SCHANNEL
+
+#include "urldata.h"
+
+#ifndef UNISP_NAME_A
+#define UNISP_NAME_A "Microsoft Unified Security Protocol Provider"
+#endif
+
+#ifndef UNISP_NAME_W
+#define UNISP_NAME_W L"Microsoft Unified Security Protocol Provider"
+#endif
+
+#ifndef UNISP_NAME
+#ifdef UNICODE
+#define UNISP_NAME UNISP_NAME_W
+#else
+#define UNISP_NAME UNISP_NAME_A
+#endif
+#endif
+
+#ifndef SP_PROT_SSL2_CLIENT
+#define SP_PROT_SSL2_CLIENT 0x00000008
+#endif
+
+#ifndef SP_PROT_SSL3_CLIENT
+#define SP_PROT_SSL3_CLIENT 0x00000008
+#endif
+
+#ifndef SP_PROT_TLS1_CLIENT
+#define SP_PROT_TLS1_CLIENT 0x00000080
+#endif
+
+#ifndef SP_PROT_TLS1_0_CLIENT
+#define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT
+#endif
+
+#ifndef SP_PROT_TLS1_1_CLIENT
+#define SP_PROT_TLS1_1_CLIENT 0x00000200
+#endif
+
+#ifndef SP_PROT_TLS1_2_CLIENT
+#define SP_PROT_TLS1_2_CLIENT 0x00000800
+#endif
+
+#ifndef SECBUFFER_ALERT
+#define SECBUFFER_ALERT 17
+#endif
+
+/* Both schannel buffer sizes must be > 0 */
+#define CURL_SCHANNEL_BUFFER_INIT_SIZE 4096
+#define CURL_SCHANNEL_BUFFER_FREE_SIZE 1024
+
+
+CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex);
+
+CURLcode Curl_schannel_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done);
+
+bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex);
+void Curl_schannel_close(struct connectdata *conn, int sockindex);
+int Curl_schannel_shutdown(struct connectdata *conn, int sockindex);
+void Curl_schannel_session_free(void *ptr);
+
+int Curl_schannel_init(void);
+void Curl_schannel_cleanup(void);
+size_t Curl_schannel_version(char *buffer, size_t size);
+
+int Curl_schannel_random(unsigned char *entropy, size_t length);
+
+/* Set the API backend definition to Schannel */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL
+
+/* API setup for Schannel */
+#define curlssl_init Curl_schannel_init
+#define curlssl_cleanup Curl_schannel_cleanup
+#define curlssl_connect Curl_schannel_connect
+#define curlssl_connect_nonblocking Curl_schannel_connect_nonblocking
+#define curlssl_session_free Curl_schannel_session_free
+#define curlssl_close_all(x) ((void)x)
+#define curlssl_close Curl_schannel_close
+#define curlssl_shutdown Curl_schannel_shutdown
+#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_schannel_version
+#define curlssl_check_cxn(x) ((void)x, -1)
+#define curlssl_data_pending Curl_schannel_data_pending
+#define curlssl_random(x,y,z) ((void)x, Curl_schannel_random(y,z))
+
+#endif /* USE_SCHANNEL */
+#endif /* HEADER_CURL_SCHANNEL_H */
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
new file mode 100644
index 00000000..42a2b58a
--- /dev/null
+++ b/lib/vtls/vtls.c
@@ -0,0 +1,896 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 file is for implementing all "generic" SSL functions that all libcurl
+ internals should use. It is then responsible for calling the proper
+ "backend" function.
+
+ SSL-functions in libcurl should call functions in this source file, and not
+ to any specific SSL-layer.
+
+ Curl_ssl_ - prefix for generic ones
+ Curl_ossl_ - prefix for OpenSSL ones
+ Curl_gtls_ - prefix for GnuTLS ones
+ Curl_nss_ - prefix for NSS ones
+ Curl_gskit_ - prefix for GSKit ones
+ Curl_polarssl_ - prefix for PolarSSL ones
+ Curl_cyassl_ - prefix for CyaSSL ones
+ Curl_schannel_ - prefix for Schannel SSPI ones
+ Curl_darwinssl_ - prefix for SecureTransport (Darwin) ones
+
+ Note that this source code uses curlssl_* functions, and they are all
+ defines/macros #defined by the lib-specific header files.
+
+ "SSL/TLS Strong Encryption: An Introduction"
+ http://httpd.apache.org/docs-2.0/ssl/ssl_intro.html
+*/
+
+#include "curl_setup.h"
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#include "urldata.h"
+
+#include "vtls.h" /* generic SSL protos etc */
+#include "slist.h"
+#include "sendf.h"
+#include "rawstr.h"
+#include "url.h"
+#include "progress.h"
+#include "share.h"
+#include "timeval.h"
+#include "curl_md5.h"
+#include "warnless.h"
+#include "curl_base64.h"
+#include "curl_printf.h"
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+/* convenience macro to check if this handle is using a shared SSL session */
+#define SSLSESSION_SHARED(data) (data->share && \
+ (data->share->specifier & \
+ (1<<CURL_LOCK_DATA_SSL_SESSION)))
+
+static bool safe_strequal(char* str1, char* str2)
+{
+ if(str1 && str2)
+ /* both pointers point to something then compare them */
+ return (0 != Curl_raw_equal(str1, str2)) ? TRUE : FALSE;
+ else
+ /* if both pointers are NULL then treat them as equal */
+ return (!str1 && !str2) ? TRUE : FALSE;
+}
+
+bool
+Curl_ssl_config_matches(struct ssl_config_data* data,
+ struct ssl_config_data* needle)
+{
+ if((data->version == needle->version) &&
+ (data->verifypeer == needle->verifypeer) &&
+ (data->verifyhost == needle->verifyhost) &&
+ safe_strequal(data->CApath, needle->CApath) &&
+ safe_strequal(data->CAfile, needle->CAfile) &&
+ safe_strequal(data->random_file, needle->random_file) &&
+ safe_strequal(data->egdsocket, needle->egdsocket) &&
+ safe_strequal(data->cipher_list, needle->cipher_list))
+ return TRUE;
+
+ return FALSE;
+}
+
+bool
+Curl_clone_ssl_config(struct ssl_config_data *source,
+ struct ssl_config_data *dest)
+{
+ dest->sessionid = source->sessionid;
+ dest->verifyhost = source->verifyhost;
+ dest->verifypeer = source->verifypeer;
+ dest->version = source->version;
+
+ if(source->CAfile) {
+ dest->CAfile = strdup(source->CAfile);
+ if(!dest->CAfile)
+ return FALSE;
+ }
+ else
+ dest->CAfile = NULL;
+
+ if(source->CApath) {
+ dest->CApath = strdup(source->CApath);
+ if(!dest->CApath)
+ return FALSE;
+ }
+ else
+ dest->CApath = NULL;
+
+ if(source->cipher_list) {
+ dest->cipher_list = strdup(source->cipher_list);
+ if(!dest->cipher_list)
+ return FALSE;
+ }
+ else
+ dest->cipher_list = NULL;
+
+ if(source->egdsocket) {
+ dest->egdsocket = strdup(source->egdsocket);
+ if(!dest->egdsocket)
+ return FALSE;
+ }
+ else
+ dest->egdsocket = NULL;
+
+ if(source->random_file) {
+ dest->random_file = strdup(source->random_file);
+ if(!dest->random_file)
+ return FALSE;
+ }
+ else
+ dest->random_file = NULL;
+
+ return TRUE;
+}
+
+void Curl_free_ssl_config(struct ssl_config_data* sslc)
+{
+ Curl_safefree(sslc->CAfile);
+ Curl_safefree(sslc->CApath);
+ Curl_safefree(sslc->cipher_list);
+ Curl_safefree(sslc->egdsocket);
+ Curl_safefree(sslc->random_file);
+}
+
+
+/*
+ * Curl_rand() returns a random unsigned integer, 32bit.
+ *
+ * This non-SSL function is put here only because this file is the only one
+ * with knowledge of what the underlying SSL libraries provide in terms of
+ * randomizers.
+ *
+ * NOTE: 'data' may be passed in as NULL when coming from external API without
+ * easy handle!
+ *
+ */
+
+unsigned int Curl_rand(struct SessionHandle *data)
+{
+ unsigned int r = 0;
+ static unsigned int randseed;
+ static bool seeded = FALSE;
+
+#ifdef CURLDEBUG
+ char *force_entropy = getenv("CURL_ENTROPY");
+ if(force_entropy) {
+ if(!seeded) {
+ size_t elen = strlen(force_entropy);
+ size_t clen = sizeof(randseed);
+ size_t min = elen < clen ? elen : clen;
+ memcpy((char *)&randseed, force_entropy, min);
+ seeded = TRUE;
+ }
+ else
+ randseed++;
+ return randseed;
+ }
+#endif
+
+ /* data may be NULL! */
+ if(!Curl_ssl_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" */
+
+#ifdef RANDOM_FILE
+ if(!seeded) {
+ /* if there's a random file to read a seed from, use it */
+ int fd = open(RANDOM_FILE, O_RDONLY);
+ if(fd > -1) {
+ /* read random data into the randseed variable */
+ ssize_t nread = read(fd, &randseed, sizeof(randseed));
+ if(nread == sizeof(randseed))
+ seeded = TRUE;
+ close(fd);
+ }
+ }
+#endif
+
+ 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;
+ randseed = randseed * 1103515245 + 12345;
+ seeded = TRUE;
+ }
+
+ /* Return an unsigned 32-bit pseudo-random number. */
+ r = randseed = randseed * 1103515245 + 12345;
+ return (r << 16) | ((r >> 16) & 0xFFFF);
+}
+
+int Curl_ssl_backend(void)
+{
+ return (int)CURL_SSL_BACKEND;
+}
+
+#ifdef USE_SSL
+
+/* "global" init done? */
+static bool init_ssl=FALSE;
+
+/**
+ * Global SSL init
+ *
+ * @retval 0 error initializing SSL
+ * @retval 1 SSL initialized successfully
+ */
+int Curl_ssl_init(void)
+{
+ /* make sure this is only done once */
+ if(init_ssl)
+ return 1;
+ init_ssl = TRUE; /* never again */
+
+ return curlssl_init();
+}
+
+
+/* Global cleanup */
+void Curl_ssl_cleanup(void)
+{
+ if(init_ssl) {
+ /* only cleanup if we did a previous init */
+ curlssl_cleanup();
+ init_ssl = FALSE;
+ }
+}
+
+static bool ssl_prefs_check(struct SessionHandle *data)
+{
+ /* check for CURLOPT_SSLVERSION invalid parameter value */
+ if((data->set.ssl.version < 0)
+ || (data->set.ssl.version >= CURL_SSLVERSION_LAST)) {
+ failf(data, "Unrecognized parameter value passed via CURLOPT_SSLVERSION");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+CURLcode
+Curl_ssl_connect(struct connectdata *conn, int sockindex)
+{
+ CURLcode result;
+
+ if(!ssl_prefs_check(conn->data))
+ return CURLE_SSL_CONNECT_ERROR;
+
+ /* 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);
+
+ if(!result)
+ Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
+
+ return result;
+}
+
+CURLcode
+Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex,
+ bool *done)
+{
+ CURLcode result;
+
+ if(!ssl_prefs_check(conn->data))
+ return CURLE_SSL_CONNECT_ERROR;
+
+ /* mark this is being ssl requested from here on. */
+ conn->ssl[sockindex].use = TRUE;
+#ifdef curlssl_connect_nonblocking
+ result = curlssl_connect_nonblocking(conn, sockindex, done);
+#else
+ *done = TRUE; /* fallback to BLOCKING */
+ result = curlssl_connect(conn, sockindex);
+#endif /* non-blocking connect support */
+ if(!result && *done)
+ Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
+ return result;
+}
+
+/*
+ * 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 */
+{
+ struct curl_ssl_session *check;
+ struct SessionHandle *data = conn->data;
+ size_t i;
+ long *general_age;
+ bool no_match = TRUE;
+
+ *ssl_sessionid = NULL;
+
+ if(!conn->ssl_config.sessionid)
+ /* session ID re-use is disabled */
+ return TRUE;
+
+ /* Lock if shared */
+ if(SSLSESSION_SHARED(data)) {
+ Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE);
+ general_age = &data->share->sessionage;
+ }
+ else
+ general_age = &data->state.sessionage;
+
+ for(i = 0; i < data->set.ssl.max_ssl_sessions; i++) {
+ check = &data->state.session[i];
+ if(!check->sessionid)
+ /* not session ID means blank entry */
+ continue;
+ if(Curl_raw_equal(conn->host.name, check->name) &&
+ (conn->remote_port == check->remote_port) &&
+ Curl_ssl_config_matches(&conn->ssl_config, &check->ssl_config)) {
+ /* yes, we have a session ID! */
+ (*general_age)++; /* increase general age */
+ check->age = *general_age; /* set this as used in this age */
+ *ssl_sessionid = check->sessionid;
+ if(idsize)
+ *idsize = check->idsize;
+ no_match = FALSE;
+ break;
+ }
+ }
+
+ /* Unlock */
+ if(SSLSESSION_SHARED(data))
+ Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
+
+ return no_match;
+}
+
+/*
+ * Kill a single session ID entry in the cache.
+ */
+void Curl_ssl_kill_session(struct curl_ssl_session *session)
+{
+ if(session->sessionid) {
+ /* defensive check */
+
+ /* free the ID the SSL-layer specific way */
+ curlssl_session_free(session->sessionid);
+
+ session->sessionid = NULL;
+ session->age = 0; /* fresh */
+
+ Curl_free_ssl_config(&session->ssl_config);
+
+ Curl_safefree(session->name);
+ }
+}
+
+/*
+ * Delete the given session ID from the cache.
+ */
+void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid)
+{
+ size_t i;
+ struct SessionHandle *data=conn->data;
+
+ if(SSLSESSION_SHARED(data))
+ Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE);
+
+ for(i = 0; i < data->set.ssl.max_ssl_sessions; i++) {
+ struct curl_ssl_session *check = &data->state.session[i];
+
+ if(check->sessionid == ssl_sessionid) {
+ Curl_ssl_kill_session(check);
+ break;
+ }
+ }
+
+ if(SSLSESSION_SHARED(data))
+ Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
+}
+
+/*
+ * Store session id in the session cache. The ID passed on to this function
+ * must already have been extracted and allocated the proper way for the SSL
+ * layer. Curl_XXXX_session_free() will be called to free/kill the session ID
+ * later on.
+ */
+CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
+ void *ssl_sessionid,
+ size_t idsize)
+{
+ size_t i;
+ struct SessionHandle *data=conn->data; /* the mother of all structs */
+ struct curl_ssl_session *store = &data->state.session[0];
+ long oldest_age=data->state.session[0].age; /* zero if unused */
+ char *clone_host;
+ long *general_age;
+
+ /* Even though session ID re-use might be disabled, that only disables USING
+ IT. We still store it here in case the re-using is again enabled for an
+ upcoming transfer */
+
+ clone_host = strdup(conn->host.name);
+ if(!clone_host)
+ return CURLE_OUT_OF_MEMORY; /* bail out */
+
+ /* Now we should add the session ID and the host name to the cache, (remove
+ the oldest if necessary) */
+
+ /* If using shared SSL session, lock! */
+ if(SSLSESSION_SHARED(data)) {
+ Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE);
+ general_age = &data->share->sessionage;
+ }
+ else {
+ general_age = &data->state.sessionage;
+ }
+
+ /* find an empty slot for us, or find the oldest */
+ for(i = 1; (i < data->set.ssl.max_ssl_sessions) &&
+ data->state.session[i].sessionid; i++) {
+ if(data->state.session[i].age < oldest_age) {
+ oldest_age = data->state.session[i].age;
+ store = &data->state.session[i];
+ }
+ }
+ if(i == data->set.ssl.max_ssl_sessions)
+ /* cache is full, we must "kill" the oldest entry! */
+ Curl_ssl_kill_session(store);
+ else
+ store = &data->state.session[i]; /* use this slot */
+
+ /* now init the session struct wisely */
+ store->sessionid = ssl_sessionid;
+ store->idsize = idsize;
+ store->age = *general_age; /* set current age */
+ /* free it if there's one already present */
+ free(store->name);
+ store->name = clone_host; /* clone host name */
+ store->remote_port = conn->remote_port; /* port number */
+
+
+ /* Unlock */
+ if(SSLSESSION_SHARED(data))
+ Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
+
+ if(!Curl_clone_ssl_config(&conn->ssl_config, &store->ssl_config)) {
+ store->sessionid = NULL; /* let caller free sessionid */
+ free(clone_host);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ return CURLE_OK;
+}
+
+
+void Curl_ssl_close_all(struct SessionHandle *data)
+{
+ size_t i;
+ /* kill the session ID cache if not shared */
+ if(data->state.session && !SSLSESSION_SHARED(data)) {
+ for(i = 0; i < data->set.ssl.max_ssl_sessions; i++)
+ /* the single-killer function handles empty table slots */
+ Curl_ssl_kill_session(&data->state.session[i]);
+
+ /* free the cache data */
+ Curl_safefree(data->state.session);
+ }
+
+ curlssl_close_all(data);
+}
+
+void Curl_ssl_close(struct connectdata *conn, int sockindex)
+{
+ DEBUGASSERT((sockindex <= 1) && (sockindex >= -1));
+ curlssl_close(conn, sockindex);
+}
+
+CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex)
+{
+ if(curlssl_shutdown(conn, sockindex))
+ return CURLE_SSL_SHUTDOWN_FAILED;
+
+ conn->ssl[sockindex].use = FALSE; /* get back to ordinary socket usage */
+ conn->ssl[sockindex].state = ssl_connection_none;
+
+ conn->recv[sockindex] = Curl_recv_plain;
+ conn->send[sockindex] = Curl_send_plain;
+
+ return CURLE_OK;
+}
+
+/* Selects an SSL crypto engine
+ */
+CURLcode Curl_ssl_set_engine(struct SessionHandle *data, const char *engine)
+{
+ return curlssl_set_engine(data, engine);
+}
+
+/* Selects the default SSL crypto engine
+ */
+CURLcode Curl_ssl_set_engine_default(struct SessionHandle *data)
+{
+ return curlssl_set_engine_default(data);
+}
+
+/* Return list of OpenSSL crypto engine names. */
+struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data)
+{
+ return curlssl_engines_list(data);
+}
+
+/*
+ * This sets up a session ID cache to the specified size. Make sure this code
+ * is agnostic to what underlying SSL technology we use.
+ */
+CURLcode Curl_ssl_initsessions(struct SessionHandle *data, size_t amount)
+{
+ struct curl_ssl_session *session;
+
+ if(data->state.session)
+ /* this is just a precaution to prevent multiple inits */
+ return CURLE_OK;
+
+ session = calloc(amount, sizeof(struct curl_ssl_session));
+ if(!session)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* store the info in the SSL section */
+ data->set.ssl.max_ssl_sessions = amount;
+ data->state.session = session;
+ data->state.sessionage = 1; /* this is brand new */
+ return CURLE_OK;
+}
+
+size_t Curl_ssl_version(char *buffer, size_t size)
+{
+ return curlssl_version(buffer, size);
+}
+
+/*
+ * This function tries to determine connection status.
+ *
+ * Return codes:
+ * 1 means the connection is still in place
+ * 0 means the connection has been closed
+ * -1 means the connection status is unknown
+ */
+int Curl_ssl_check_cxn(struct connectdata *conn)
+{
+ return curlssl_check_cxn(conn);
+}
+
+bool Curl_ssl_data_pending(const struct connectdata *conn,
+ int connindex)
+{
+ return curlssl_data_pending(conn, connindex);
+}
+
+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; i<ci->num_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)
+{
+ struct curl_certinfo *ci = &data->info.certs;
+ struct curl_slist **table;
+
+ /* Free any previous certificate information structures */
+ Curl_ssl_free_certinfo(data);
+
+ /* Allocate the required certificate information structures */
+ table = calloc((size_t) num, sizeof(struct curl_slist *));
+ if(!table)
+ return CURLE_OUT_OF_MEMORY;
+
+ ci->num_of_certs = num;
+ ci->certinfo = table;
+
+ return CURLE_OK;
+}
+
+/*
+ * 'value' is NOT a zero terminated string
+ */
+CURLcode Curl_ssl_push_certinfo_len(struct SessionHandle *data,
+ int certnum,
+ const char *label,
+ const char *value,
+ size_t valuelen)
+{
+ struct curl_certinfo * ci = &data->info.certs;
+ char * output;
+ struct curl_slist * nl;
+ CURLcode result = CURLE_OK;
+ size_t labellen = strlen(label);
+ size_t outlen = labellen + 1 + valuelen + 1; /* label:value\0 */
+
+ output = malloc(outlen);
+ if(!output)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* sprintf the label and colon */
+ snprintf(output, outlen, "%s:", label);
+
+ /* memcpy the value (it might not be zero terminated) */
+ memcpy(&output[labellen+1], value, valuelen);
+
+ /* zero terminate the output */
+ output[labellen + 1 + valuelen] = 0;
+
+ nl = Curl_slist_append_nodup(ci->certinfo[certnum], output);
+ if(!nl) {
+ free(output);
+ curl_slist_free_all(ci->certinfo[certnum]);
+ result = CURLE_OUT_OF_MEMORY;
+ }
+
+ ci->certinfo[certnum] = nl;
+ return result;
+}
+
+/*
+ * This is a convenience function for push_certinfo_len that takes a zero
+ * terminated value.
+ */
+CURLcode Curl_ssl_push_certinfo(struct SessionHandle *data,
+ int certnum,
+ const char *label,
+ const char *value)
+{
+ size_t valuelen = strlen(value);
+
+ 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;
+}
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+CURLcode 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);
+ if(!MD5pw)
+ return CURLE_OUT_OF_MEMORY;
+ Curl_MD5_update(MD5pw, tmp, curlx_uztoui(tmplen));
+ Curl_MD5_final(MD5pw, md5sum);
+#endif
+ return CURLE_OK;
+}
+#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
+}
+
+/*
+ * Check whether the SSL backend supports false start.
+ */
+bool Curl_ssl_false_start(void)
+{
+#ifdef curlssl_false_start
+ return curlssl_false_start();
+#else
+ return FALSE;
+#endif
+}
+
+#endif /* USE_SSL */
diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h
new file mode 100644
index 00000000..b9741d7a
--- /dev/null
+++ b/lib/vtls/vtls.h
@@ -0,0 +1,153 @@
+#ifndef HEADER_CURL_VTLS_H
+#define HEADER_CURL_VTLS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "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 "schannel.h" /* Schannel SSPI version */
+#include "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
+
+/* see http://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04 */
+#define ALPN_HTTP_1_1_LENGTH 8
+#define ALPN_HTTP_1_1 "http/1.1"
+
+bool Curl_ssl_config_matches(struct ssl_config_data* data,
+ struct ssl_config_data* needle);
+bool Curl_clone_ssl_config(struct ssl_config_data* source,
+ struct ssl_config_data* dest);
+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);
+CURLcode Curl_ssl_connect(struct connectdata *conn, int sockindex);
+CURLcode Curl_ssl_connect_nonblocking(struct connectdata *conn,
+ int sockindex,
+ bool *done);
+/* tell the SSL stuff to close down all open information regarding
+ connections (and thus session ID caching etc) */
+void Curl_ssl_close_all(struct SessionHandle *data);
+void Curl_ssl_close(struct connectdata *conn, int sockindex);
+CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex);
+CURLcode Curl_ssl_set_engine(struct SessionHandle *data, const char *engine);
+/* Sets engine as default for all SSL operations */
+CURLcode Curl_ssl_set_engine_default(struct SessionHandle *data);
+struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data);
+
+/* init the SSL session ID cache */
+CURLcode Curl_ssl_initsessions(struct SessionHandle *, size_t);
+size_t Curl_ssl_version(char *buffer, size_t size);
+bool Curl_ssl_data_pending(const struct connectdata *conn,
+ int connindex);
+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);
+CURLcode Curl_ssl_push_certinfo_len(struct SessionHandle * data, int certnum,
+ const char * label, const char * value,
+ size_t valuelen);
+CURLcode Curl_ssl_push_certinfo(struct SessionHandle * data, int certnum,
+ const char * label, const char * value);
+
+/* 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 */;
+/* add a new session ID */
+CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
+ void *ssl_sessionid,
+ size_t idsize);
+/* Kill a single session ID entry in the cache */
+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);
+CURLcode 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);
+
+bool Curl_ssl_false_start(void);
+
+#define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
+
+#else
+/* Set the API backend definition to none */
+#define CURL_SSL_BACKEND CURLSSLBACKEND_NONE
+
+/* When SSL support is not present, just define away these function calls */
+#define Curl_ssl_init() 1
+#define Curl_ssl_cleanup() Curl_nop_stmt
+#define Curl_ssl_connect(x,y) CURLE_NOT_BUILT_IN
+#define Curl_ssl_close_all(x) Curl_nop_stmt
+#define Curl_ssl_close(x,y) Curl_nop_stmt
+#define Curl_ssl_shutdown(x,y) CURLE_NOT_BUILT_IN
+#define Curl_ssl_set_engine(x,y) CURLE_NOT_BUILT_IN
+#define Curl_ssl_set_engine_default(x) CURLE_NOT_BUILT_IN
+#define Curl_ssl_engines_list(x) NULL
+#define Curl_ssl_send(a,b,c,d,e) -1
+#define Curl_ssl_recv(a,b,c,d,e) -1
+#define Curl_ssl_initsessions(x,y) CURLE_OK
+#define Curl_ssl_version(x,y) 0
+#define Curl_ssl_data_pending(x,y) 0
+#define Curl_ssl_check_cxn(x) 0
+#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_cert_status_request() FALSE
+#define Curl_ssl_false_start() FALSE
+#endif
+
+#endif /* HEADER_CURL_VTLS_H */
diff --git a/lib/warnless.c b/lib/warnless.c
index 4f42dd07..8c130d34 100644
--- a/lib/warnless.c
+++ b/lib/warnless.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,20 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
+
+#if defined(__INTEL_COMPILER) && defined(__unix__)
+
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+
+#endif /* __INTEL_COMPILER && __unix__ */
+
+#define BUILDING_WARNLESS_C 1
#include "warnless.h"
@@ -37,7 +50,7 @@
# define CURL_MASK_SSHORT 0x7FFFFFFFFFFFFFFF
# define CURL_MASK_USHORT 0xFFFFFFFFFFFFFFFF
#else
-# error "SIZEOF_SHORT not defined"
+# error "SIZEOF_SHORT not defined"
#endif
#if (SIZEOF_INT == 2)
@@ -53,7 +66,7 @@
# define CURL_MASK_SINT 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
# define CURL_MASK_UINT 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
#else
-# error "SIZEOF_INT not defined"
+# error "SIZEOF_INT not defined"
#endif
#if (CURL_SIZEOF_LONG == 2)
@@ -69,7 +82,39 @@
# define CURL_MASK_SLONG 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFL
# define CURL_MASK_ULONG 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUL
#else
-# error "SIZEOF_LONG not defined"
+# error "CURL_SIZEOF_LONG not defined"
+#endif
+
+#if (CURL_SIZEOF_CURL_OFF_T == 2)
+# define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFF)
+# define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFF)
+#elif (CURL_SIZEOF_CURL_OFF_T == 4)
+# define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFF)
+# define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFF)
+#elif (CURL_SIZEOF_CURL_OFF_T == 8)
+# define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF)
+# define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFF)
+#elif (CURL_SIZEOF_CURL_OFF_T == 16)
+# define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
+# define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
+#else
+# error "CURL_SIZEOF_CURL_OFF_T not defined"
+#endif
+
+#if (SIZEOF_SIZE_T == SIZEOF_SHORT)
+# define CURL_MASK_SSIZE_T CURL_MASK_SSHORT
+# define CURL_MASK_USIZE_T CURL_MASK_USHORT
+#elif (SIZEOF_SIZE_T == SIZEOF_INT)
+# define CURL_MASK_SSIZE_T CURL_MASK_SINT
+# define CURL_MASK_USIZE_T CURL_MASK_UINT
+#elif (SIZEOF_SIZE_T == CURL_SIZEOF_LONG)
+# define CURL_MASK_SSIZE_T CURL_MASK_SLONG
+# define CURL_MASK_USIZE_T CURL_MASK_ULONG
+#elif (SIZEOF_SIZE_T == CURL_SIZEOF_CURL_OFF_T)
+# define CURL_MASK_SSIZE_T CURL_MASK_SCOFFT
+# define CURL_MASK_USIZE_T CURL_MASK_UCOFFT
+#else
+# error "SIZEOF_SIZE_T not defined"
#endif
/*
@@ -83,6 +128,7 @@ unsigned short curlx_ultous(unsigned long ulnum)
# pragma warning(disable:810) /* conversion may lose significant bits */
#endif
+ DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_USHORT);
return (unsigned short)(ulnum & (unsigned long) CURL_MASK_USHORT);
#ifdef __INTEL_COMPILER
@@ -101,6 +147,7 @@ unsigned char curlx_ultouc(unsigned long ulnum)
# pragma warning(disable:810) /* conversion may lose significant bits */
#endif
+ DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_UCHAR);
return (unsigned char)(ulnum & (unsigned long) CURL_MASK_UCHAR);
#ifdef __INTEL_COMPILER
@@ -109,7 +156,45 @@ unsigned char curlx_ultouc(unsigned long ulnum)
}
/*
-** size_t to signed int
+** unsigned long to signed int
+*/
+
+int curlx_ultosi(unsigned long ulnum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_SINT);
+ return (int)(ulnum & (unsigned long) CURL_MASK_SINT);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** unsigned size_t to signed curl_off_t
+*/
+
+curl_off_t curlx_uztoso(size_t uznum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ DEBUGASSERT(uznum <= (size_t) CURL_MASK_SCOFFT);
+ return (curl_off_t)(uznum & (size_t) CURL_MASK_SCOFFT);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** unsigned size_t to signed int
*/
int curlx_uztosi(size_t uznum)
@@ -119,9 +204,283 @@ int curlx_uztosi(size_t uznum)
# pragma warning(disable:810) /* conversion may lose significant bits */
#endif
+ DEBUGASSERT(uznum <= (size_t) CURL_MASK_SINT);
return (int)(uznum & (size_t) CURL_MASK_SINT);
#ifdef __INTEL_COMPILER
# pragma warning(pop)
#endif
}
+
+/*
+** unsigned size_t to unsigned long
+*/
+
+unsigned long curlx_uztoul(size_t uznum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+#if (CURL_SIZEOF_LONG < SIZEOF_SIZE_T)
+ DEBUGASSERT(uznum <= (size_t) CURL_MASK_ULONG);
+#endif
+ return (unsigned long)(uznum & (size_t) CURL_MASK_ULONG);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** unsigned size_t to unsigned int
+*/
+
+unsigned int curlx_uztoui(size_t uznum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+#if (SIZEOF_INT < SIZEOF_SIZE_T)
+ DEBUGASSERT(uznum <= (size_t) CURL_MASK_UINT);
+#endif
+ return (unsigned int)(uznum & (size_t) CURL_MASK_UINT);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** signed long to signed int
+*/
+
+int curlx_sltosi(long slnum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ DEBUGASSERT(slnum >= 0);
+#if (SIZEOF_INT < CURL_SIZEOF_LONG)
+ DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_SINT);
+#endif
+ return (int)(slnum & (long) CURL_MASK_SINT);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** signed long to unsigned int
+*/
+
+unsigned int curlx_sltoui(long slnum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ DEBUGASSERT(slnum >= 0);
+#if (SIZEOF_INT < CURL_SIZEOF_LONG)
+ DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_UINT);
+#endif
+ return (unsigned int)(slnum & (long) CURL_MASK_UINT);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** signed long to unsigned short
+*/
+
+unsigned short curlx_sltous(long slnum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ DEBUGASSERT(slnum >= 0);
+ DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_USHORT);
+ return (unsigned short)(slnum & (long) CURL_MASK_USHORT);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** unsigned size_t to signed ssize_t
+*/
+
+ssize_t curlx_uztosz(size_t uznum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ DEBUGASSERT(uznum <= (size_t) CURL_MASK_SSIZE_T);
+ return (ssize_t)(uznum & (size_t) CURL_MASK_SSIZE_T);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** signed curl_off_t to unsigned size_t
+*/
+
+size_t curlx_sotouz(curl_off_t sonum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ DEBUGASSERT(sonum >= 0);
+ return (size_t)(sonum & (curl_off_t) CURL_MASK_USIZE_T);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** signed ssize_t to signed int
+*/
+
+int curlx_sztosi(ssize_t sznum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ DEBUGASSERT(sznum >= 0);
+#if (SIZEOF_INT < SIZEOF_SIZE_T)
+ DEBUGASSERT((size_t) sznum <= (size_t) CURL_MASK_SINT);
+#endif
+ return (int)(sznum & (ssize_t) CURL_MASK_SINT);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** signed int to unsigned size_t
+*/
+
+size_t curlx_sitouz(int sinum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ DEBUGASSERT(sinum >= 0);
+ return (size_t) sinum;
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+#ifdef USE_WINSOCK
+
+/*
+** curl_socket_t to signed int
+*/
+
+int curlx_sktosi(curl_socket_t s)
+{
+ return (int)((ssize_t) s);
+}
+
+/*
+** signed int to curl_socket_t
+*/
+
+curl_socket_t curlx_sitosk(int i)
+{
+ return (curl_socket_t)((ssize_t) i);
+}
+
+#endif /* USE_WINSOCK */
+
+#if defined(WIN32) || defined(_WIN32)
+
+ssize_t curlx_read(int fd, void *buf, size_t count)
+{
+ return (ssize_t)read(fd, buf, curlx_uztoui(count));
+}
+
+ssize_t curlx_write(int fd, const void *buf, size_t count)
+{
+ return (ssize_t)write(fd, buf, curlx_uztoui(count));
+}
+
+#endif /* WIN32 || _WIN32 */
+
+#if defined(__INTEL_COMPILER) && defined(__unix__)
+
+int curlx_FD_ISSET(int fd, fd_set *fdset)
+{
+ #pragma warning(push)
+ #pragma warning(disable:1469) /* clobber ignored */
+ return FD_ISSET(fd, fdset);
+ #pragma warning(pop)
+}
+
+void curlx_FD_SET(int fd, fd_set *fdset)
+{
+ #pragma warning(push)
+ #pragma warning(disable:1469) /* clobber ignored */
+ FD_SET(fd, fdset);
+ #pragma warning(pop)
+}
+
+void curlx_FD_ZERO(fd_set *fdset)
+{
+ #pragma warning(push)
+ #pragma warning(disable:593) /* variable was set but never used */
+ FD_ZERO(fdset);
+ #pragma warning(pop)
+}
+
+unsigned short curlx_htons(unsigned short usnum)
+{
+#if (__INTEL_COMPILER == 910) && defined(__i386__)
+ return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
+#else
+ #pragma warning(push)
+ #pragma warning(disable:810) /* conversion may lose significant bits */
+ return htons(usnum);
+ #pragma warning(pop)
+#endif
+}
+
+unsigned short curlx_ntohs(unsigned short usnum)
+{
+#if (__INTEL_COMPILER == 910) && defined(__i386__)
+ return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
+#else
+ #pragma warning(push)
+ #pragma warning(disable:810) /* conversion may lose significant bits */
+ return ntohs(usnum);
+ #pragma warning(pop)
+#endif
+}
+
+#endif /* __INTEL_COMPILER && __unix__ */
diff --git a/lib/warnless.h b/lib/warnless.h
index ac654fbc..ad77d3c2 100644
--- a/lib/warnless.h
+++ b/lib/warnless.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,10 +22,86 @@
*
***************************************************************************/
+#ifdef USE_WINSOCK
+#include <curl/curl.h> /* for curl_socket_t */
+#endif
+
unsigned short curlx_ultous(unsigned long ulnum);
unsigned char curlx_ultouc(unsigned long ulnum);
+int curlx_ultosi(unsigned long ulnum);
+
int curlx_uztosi(size_t uznum);
+curl_off_t curlx_uztoso(size_t uznum);
+
+unsigned long curlx_uztoul(size_t uznum);
+
+unsigned int curlx_uztoui(size_t uznum);
+
+int curlx_sltosi(long slnum);
+
+unsigned int curlx_sltoui(long slnum);
+
+unsigned short curlx_sltous(long slnum);
+
+ssize_t curlx_uztosz(size_t uznum);
+
+size_t curlx_sotouz(curl_off_t sonum);
+
+int curlx_sztosi(ssize_t sznum);
+
+size_t curlx_sitouz(int sinum);
+
+#ifdef USE_WINSOCK
+
+int curlx_sktosi(curl_socket_t s);
+
+curl_socket_t curlx_sitosk(int i);
+
+#endif /* USE_WINSOCK */
+
+#if defined(WIN32) || defined(_WIN32)
+
+ssize_t curlx_read(int fd, void *buf, size_t count);
+
+ssize_t curlx_write(int fd, const void *buf, size_t count);
+
+#ifndef BUILDING_WARNLESS_C
+# undef read
+# define read(fd, buf, count) curlx_read(fd, buf, count)
+# undef write
+# define write(fd, buf, count) curlx_write(fd, buf, count)
+#endif
+
+#endif /* WIN32 || _WIN32 */
+
+#if defined(__INTEL_COMPILER) && defined(__unix__)
+
+int curlx_FD_ISSET(int fd, fd_set *fdset);
+
+void curlx_FD_SET(int fd, fd_set *fdset);
+
+void curlx_FD_ZERO(fd_set *fdset);
+
+unsigned short curlx_htons(unsigned short usnum);
+
+unsigned short curlx_ntohs(unsigned short usnum);
+
+#ifndef BUILDING_WARNLESS_C
+# undef FD_ISSET
+# define FD_ISSET(a,b) curlx_FD_ISSET((a),(b))
+# undef FD_SET
+# define FD_SET(a,b) curlx_FD_SET((a),(b))
+# undef FD_ZERO
+# define FD_ZERO(a) curlx_FD_ZERO((a))
+# undef htons
+# define htons(a) curlx_htons((a))
+# undef ntohs
+# define ntohs(a) curlx_ntohs((a))
+#endif
+
+#endif /* __INTEL_COMPILER && __unix__ */
+
#endif /* HEADER_CURL_WARNLESS_H */
diff --git a/lib/wildcard.c b/lib/wildcard.c
index 9fe5d513..6f55839d 100644
--- a/lib/wildcard.c
+++ b/lib/wildcard.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,14 +20,12 @@
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
+
#include "wildcard.h"
#include "llist.h"
#include "fileinfo.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -61,15 +59,10 @@ void Curl_wildcard_dtor(struct WildcardData *wc)
wc->filelist = NULL;
}
- if(wc->path) {
- free(wc->path);
- wc->path = NULL;
- }
-
- if(wc->pattern) {
- free(wc->pattern);
- wc->pattern = NULL;
- }
+ free(wc->path);
+ wc->path = NULL;
+ free(wc->pattern);
+ wc->pattern = NULL;
wc->customptr = NULL;
wc->state = CURLWC_INIT;
diff --git a/lib/wildcard.h b/lib/wildcard.h
index 8f732d10..16c80ecb 100644
--- a/lib/wildcard.h
+++ b/lib/wildcard.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2010 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -33,8 +33,8 @@ typedef enum {
CURLWC_CLEAN, /* deallocate resources and reset settings */
CURLWC_SKIP, /* skip over concrete file */
CURLWC_ERROR, /* error cases */
- CURLWC_DONE /* if is wildcard->state == CURLWC_DONE wildcard loop in
- Curl_perform() will end */
+ CURLWC_DONE /* if is wildcard->state == CURLWC_DONE wildcard loop
+ will end */
} curl_wildcard_states;
typedef void (*curl_wildcard_tmp_dtor)(void *ptr);
diff --git a/lib/x509asn1.c b/lib/x509asn1.c
new file mode 100644
index 00000000..a3dfd646
--- /dev/null
+++ b/lib/x509asn1.c
@@ -0,0 +1,1188 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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(USE_GSKIT) || defined(USE_NSS) || defined(USE_GNUTLS) || \
+ defined(USE_CYASSL)
+
+#include <curl/curl.h>
+#include "urldata.h"
+#include "strequal.h"
+#include "hostcheck.h"
+#include "vtls/vtls.h"
+#include "sendf.h"
+#include "inet_pton.h"
+#include "curl_base64.h"
+#include "x509asn1.h"
+#include "curl_printf.h"
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+
+/* ASN.1 OIDs. */
+static const char cnOID[] = "2.5.4.3"; /* Common name. */
+static const char sanOID[] = "2.5.29.17"; /* Subject alternative name. */
+
+static const curl_OID OIDtable[] = {
+ { "1.2.840.10040.4.1", "dsa" },
+ { "1.2.840.10040.4.3", "dsa-with-sha1" },
+ { "1.2.840.10045.2.1", "ecPublicKey" },
+ { "1.2.840.10045.3.0.1", "c2pnb163v1" },
+ { "1.2.840.10045.4.1", "ecdsa-with-SHA1" },
+ { "1.2.840.10046.2.1", "dhpublicnumber" },
+ { "1.2.840.113549.1.1.1", "rsaEncryption" },
+ { "1.2.840.113549.1.1.2", "md2WithRSAEncryption" },
+ { "1.2.840.113549.1.1.4", "md5WithRSAEncryption" },
+ { "1.2.840.113549.1.1.5", "sha1WithRSAEncryption" },
+ { "1.2.840.113549.1.1.10", "RSASSA-PSS" },
+ { "1.2.840.113549.1.1.14", "sha224WithRSAEncryption" },
+ { "1.2.840.113549.1.1.11", "sha256WithRSAEncryption" },
+ { "1.2.840.113549.1.1.12", "sha384WithRSAEncryption" },
+ { "1.2.840.113549.1.1.13", "sha512WithRSAEncryption" },
+ { "1.2.840.113549.2.2", "md2" },
+ { "1.2.840.113549.2.5", "md5" },
+ { "1.3.14.3.2.26", "sha1" },
+ { cnOID, "CN" },
+ { "2.5.4.4", "SN" },
+ { "2.5.4.5", "serialNumber" },
+ { "2.5.4.6", "C" },
+ { "2.5.4.7", "L" },
+ { "2.5.4.8", "ST" },
+ { "2.5.4.9", "streetAddress" },
+ { "2.5.4.10", "O" },
+ { "2.5.4.11", "OU" },
+ { "2.5.4.12", "title" },
+ { "2.5.4.13", "description" },
+ { "2.5.4.17", "postalCode" },
+ { "2.5.4.41", "name" },
+ { "2.5.4.42", "givenName" },
+ { "2.5.4.43", "initials" },
+ { "2.5.4.44", "generationQualifier" },
+ { "2.5.4.45", "X500UniqueIdentifier" },
+ { "2.5.4.46", "dnQualifier" },
+ { "2.5.4.65", "pseudonym" },
+ { "1.2.840.113549.1.9.1", "emailAddress" },
+ { "2.5.4.72", "role" },
+ { sanOID, "subjectAltName" },
+ { "2.5.29.18", "issuerAltName" },
+ { "2.5.29.19", "basicConstraints" },
+ { "2.16.840.1.101.3.4.2.4", "sha224" },
+ { "2.16.840.1.101.3.4.2.1", "sha256" },
+ { "2.16.840.1.101.3.4.2.2", "sha384" },
+ { "2.16.840.1.101.3.4.2.3", "sha512" },
+ { (const char *) NULL, (const char *) NULL }
+};
+
+/*
+ * Lightweight ASN.1 parser.
+ * In particular, it does not check for syntactic/lexical errors.
+ * It is intended to support certificate information gathering for SSL backends
+ * that offer a mean to get certificates as a whole, but do not supply
+ * entry points to get particular certificate sub-fields.
+ * Please note there is no pretention here to rewrite a full SSL library.
+ */
+
+
+const char * Curl_getASN1Element(curl_asn1Element * elem,
+ const char * beg, const char * end)
+{
+ unsigned char b;
+ unsigned long len;
+ curl_asn1Element lelem;
+
+ /* Get a single ASN.1 element into `elem', parse ASN.1 string at `beg'
+ ending at `end'.
+ Returns a pointer in source string after the parsed element, or NULL
+ if an error occurs. */
+
+ if(beg >= end || !*beg)
+ return (const char *) NULL;
+
+ /* Process header byte. */
+ elem->header = beg;
+ b = (unsigned char) *beg++;
+ elem->constructed = (b & 0x20) != 0;
+ elem->class = (b >> 6) & 3;
+ b &= 0x1F;
+ if(b == 0x1F)
+ return (const char *) NULL; /* Long tag values not supported here. */
+ elem->tag = b;
+
+ /* Process length. */
+ if(beg >= end)
+ return (const char *) NULL;
+ b = (unsigned char) *beg++;
+ if(!(b & 0x80))
+ len = b;
+ else if(!(b &= 0x7F)) {
+ /* Unspecified length. Since we have all the data, we can determine the
+ effective length by skipping element until an end element is found. */
+ if(!elem->constructed)
+ return (const char *) NULL;
+ elem->beg = beg;
+ while(beg < end && *beg) {
+ beg = Curl_getASN1Element(&lelem, beg, end);
+ if(!beg)
+ return (const char *) NULL;
+ }
+ if(beg >= end)
+ return (const char *) NULL;
+ elem->end = beg;
+ return beg + 1;
+ }
+ else if(beg + b > end)
+ return (const char *) NULL; /* Does not fit in source. */
+ else {
+ /* Get long length. */
+ len = 0;
+ do {
+ if(len & 0xFF000000L)
+ return (const char *) NULL; /* Lengths > 32 bits are not supported. */
+ len = (len << 8) | (unsigned char) *beg++;
+ } while(--b);
+ }
+ if((unsigned long) (end - beg) < len)
+ return (const char *) NULL; /* Element data does not fit in source. */
+ elem->beg = beg;
+ elem->end = beg + len;
+ return elem->end;
+}
+
+static const curl_OID * searchOID(const char * oid)
+{
+ const curl_OID * op;
+
+ /* Search the null terminated OID or OID identifier in local table.
+ Return the table entry pointer or NULL if not found. */
+
+ for(op = OIDtable; op->numoid; op++)
+ if(!strcmp(op->numoid, oid) || curl_strequal(op->textoid, oid))
+ return op;
+
+ return (const curl_OID *) NULL;
+}
+
+static const char * bool2str(const char * beg, const char * end)
+{
+ /* Convert an ASN.1 Boolean value into its string representation.
+ Return the dynamically allocated string, or NULL if source is not an
+ ASN.1 Boolean value. */
+
+ if(end - beg != 1)
+ return (const char *) NULL;
+ return strdup(*beg? "TRUE": "FALSE");
+}
+
+static const char * octet2str(const char * beg, const char * end)
+{
+ size_t n = end - beg;
+ char * buf;
+
+ /* Convert an ASN.1 octet string to a printable string.
+ Return the dynamically allocated string, or NULL if an error occurs. */
+
+ buf = malloc(3 * n + 1);
+ if(buf)
+ for(n = 0; beg < end; n += 3)
+ snprintf(buf + n, 4, "%02x:", *(const unsigned char *) beg++);
+ return buf;
+}
+
+static const char * bit2str(const char * beg, const char * end)
+{
+ /* Convert an ASN.1 bit string to a printable string.
+ Return the dynamically allocated string, or NULL if an error occurs. */
+
+ if(++beg > end)
+ return (const char *) NULL;
+ return octet2str(beg, end);
+}
+
+static const char * int2str(const char * beg, const char * end)
+{
+ long val = 0;
+ size_t n = end - beg;
+
+ /* Convert an ASN.1 integer value into its string representation.
+ Return the dynamically allocated string, or NULL if source is not an
+ ASN.1 integer value. */
+
+ if(!n)
+ return (const char *) NULL;
+
+ if(n > 4)
+ return octet2str(beg, end);
+
+ /* Represent integers <= 32-bit as a single value. */
+ if(*beg & 0x80)
+ val = ~val;
+
+ do
+ val = (val << 8) | *(const unsigned char *) beg++;
+ while(beg < end);
+ return curl_maprintf("%s%lx", (val < 0 || val >= 10)? "0x": "", val);
+}
+
+static ssize_t
+utf8asn1str(char * * to, int type, const char * from, const char * end)
+{
+ size_t inlength = end - from;
+ int size = 1;
+ size_t outlength;
+ int charsize;
+ unsigned int wc;
+ char * buf;
+
+ /* Perform a lazy conversion from an ASN.1 typed string to UTF8. Allocate the
+ destination buffer dynamically. The allocation size will normally be too
+ large: this is to avoid buffer overflows.
+ Terminate the string with a nul byte and return the converted
+ string length. */
+
+ *to = (char *) NULL;
+ switch (type) {
+ case CURL_ASN1_BMP_STRING:
+ size = 2;
+ break;
+ case CURL_ASN1_UNIVERSAL_STRING:
+ size = 4;
+ break;
+ case CURL_ASN1_NUMERIC_STRING:
+ case CURL_ASN1_PRINTABLE_STRING:
+ case CURL_ASN1_TELETEX_STRING:
+ case CURL_ASN1_IA5_STRING:
+ case CURL_ASN1_VISIBLE_STRING:
+ case CURL_ASN1_UTF8_STRING:
+ break;
+ default:
+ return -1; /* Conversion not supported. */
+ }
+
+ if(inlength % size)
+ return -1; /* Length inconsistent with character size. */
+ buf = malloc(4 * (inlength / size) + 1);
+ if(!buf)
+ return -1; /* Not enough memory. */
+
+ if(type == CURL_ASN1_UTF8_STRING) {
+ /* Just copy. */
+ outlength = inlength;
+ if(outlength)
+ memcpy(buf, from, outlength);
+ }
+ else {
+ for(outlength = 0; from < end;) {
+ wc = 0;
+ switch (size) {
+ case 4:
+ wc = (wc << 8) | *(const unsigned char *) from++;
+ wc = (wc << 8) | *(const unsigned char *) from++;
+ /* fallthrough */
+ case 2:
+ wc = (wc << 8) | *(const unsigned char *) from++;
+ /* fallthrough */
+ default: /* case 1: */
+ wc = (wc << 8) | *(const unsigned char *) from++;
+ }
+ charsize = 1;
+ if(wc >= 0x00000080) {
+ if(wc >= 0x00000800) {
+ if(wc >= 0x00010000) {
+ if(wc >= 0x00200000) {
+ free(buf);
+ return -1; /* Invalid char. size for target encoding. */
+ }
+ buf[outlength + 3] = (char) (0x80 | (wc & 0x3F));
+ wc = (wc >> 6) | 0x00010000;
+ charsize++;
+ }
+ buf[outlength + 2] = (char) (0x80 | (wc & 0x3F));
+ wc = (wc >> 6) | 0x00000800;
+ charsize++;
+ }
+ buf[outlength + 1] = (char) (0x80 | (wc & 0x3F));
+ wc = (wc >> 6) | 0x000000C0;
+ charsize++;
+ }
+ buf[outlength] = (char) wc;
+ outlength += charsize;
+ }
+ }
+ buf[outlength] = '\0';
+ *to = buf;
+ return outlength;
+}
+
+static const char * string2str(int type, const char * beg, const char * end)
+{
+ char * buf;
+
+ /* Convert an ASN.1 String into its UTF-8 string representation.
+ Return the dynamically allocated string, or NULL if an error occurs. */
+
+ if(utf8asn1str(&buf, type, beg, end) < 0)
+ return (const char *) NULL;
+ return buf;
+}
+
+static int encodeUint(char * buf, int n, unsigned int x)
+{
+ int i = 0;
+ unsigned int y = x / 10;
+
+ /* Decimal ASCII encode unsigned integer `x' in the `n'-byte buffer at `buf'.
+ Return the total number of encoded digits, even if larger than `n'. */
+
+ if(y) {
+ i += encodeUint(buf, n, y);
+ x -= y * 10;
+ }
+ if(i < n)
+ buf[i] = (char) ('0' + x);
+ i++;
+ if(i < n)
+ buf[i] = '\0'; /* Store a terminator if possible. */
+ return i;
+}
+
+static int encodeOID(char * buf, int n, const char * beg, const char * end)
+{
+ int i = 0;
+ unsigned int x;
+ unsigned int y;
+
+ /* Convert an ASN.1 OID into its dotted string representation.
+ Store the result in th `n'-byte buffer at `buf'.
+ Return the converted string length, or -1 if an error occurs. */
+
+ /* Process the first two numbers. */
+ y = *(const unsigned char *) beg++;
+ x = y / 40;
+ y -= x * 40;
+ i += encodeUint(buf + i, n - i, x);
+ if(i < n)
+ buf[i] = '.';
+ i++;
+ i += encodeUint(buf + i, n - i, y);
+
+ /* Process the trailing numbers. */
+ while(beg < end) {
+ if(i < n)
+ buf[i] = '.';
+ i++;
+ x = 0;
+ do {
+ if(x & 0xFF000000)
+ return -1;
+ y = *(const unsigned char *) beg++;
+ x = (x << 7) | (y & 0x7F);
+ } while(y & 0x80);
+ i += encodeUint(buf + i, n - i, x);
+ }
+ if(i < n)
+ buf[i] = '\0';
+ return i;
+}
+
+static const char * OID2str(const char * beg, const char * end, bool symbolic)
+{
+ char * buf = (char *) NULL;
+ const curl_OID * op;
+ int n;
+
+ /* Convert an ASN.1 OID into its dotted or symbolic string representation.
+ Return the dynamically allocated string, or NULL if an error occurs. */
+
+ if(beg < end) {
+ n = encodeOID((char *) NULL, -1, beg, end);
+ if(n >= 0) {
+ buf = malloc(n + 1);
+ if(buf) {
+ encodeOID(buf, n, beg, end);
+ buf[n] = '\0';
+
+ if(symbolic) {
+ op = searchOID(buf);
+ if(op) {
+ free(buf);
+ buf = strdup(op->textoid);
+ }
+ }
+ }
+ }
+ }
+ return buf;
+}
+
+static const char * GTime2str(const char * beg, const char * end)
+{
+ const char * tzp;
+ const char * fracp;
+ char sec1, sec2;
+ size_t fracl;
+ size_t tzl;
+ const char * sep = "";
+
+ /* Convert an ASN.1 Generalized time to a printable string.
+ Return the dynamically allocated string, or NULL if an error occurs. */
+
+ for(fracp = beg; fracp < end && *fracp >= '0' && *fracp <= '9'; fracp++)
+ ;
+
+ /* Get seconds digits. */
+ sec1 = '0';
+ switch (fracp - beg - 12) {
+ case 0:
+ sec2 = '0';
+ break;
+ case 2:
+ sec1 = fracp[-2];
+ case 1:
+ sec2 = fracp[-1];
+ break;
+ default:
+ return (const char *) NULL;
+ }
+
+ /* Scan for timezone, measure fractional seconds. */
+ tzp = fracp;
+ fracl = 0;
+ if(fracp < end && (*fracp == '.' || *fracp == ',')) {
+ fracp++;
+ do
+ tzp++;
+ while(tzp < end && *tzp >= '0' && *tzp <= '9');
+ /* Strip leading zeroes in fractional seconds. */
+ for(fracl = tzp - fracp - 1; fracl && fracp[fracl - 1] == '0'; fracl--)
+ ;
+ }
+
+ /* Process timezone. */
+ if(tzp >= end)
+ ; /* Nothing to do. */
+ else if(*tzp == 'Z') {
+ tzp = " GMT";
+ end = tzp + 4;
+ }
+ else {
+ sep = " ";
+ tzp++;
+ }
+
+ tzl = end - tzp;
+ return curl_maprintf("%.4s-%.2s-%.2s %.2s:%.2s:%c%c%s%.*s%s%.*s",
+ beg, beg + 4, beg + 6,
+ beg + 8, beg + 10, sec1, sec2,
+ fracl? ".": "", fracl, fracp,
+ sep, tzl, tzp);
+}
+
+static const char * UTime2str(const char * beg, const char * end)
+{
+ const char * tzp;
+ size_t tzl;
+ const char * sec;
+
+ /* Convert an ASN.1 UTC time to a printable string.
+ Return the dynamically allocated string, or NULL if an error occurs. */
+
+ for(tzp = beg; tzp < end && *tzp >= '0' && *tzp <= '9'; tzp++)
+ ;
+ /* Get the seconds. */
+ sec = beg + 10;
+ switch (tzp - sec) {
+ case 0:
+ sec = "00";
+ case 2:
+ break;
+ default:
+ return (const char *) NULL;
+ }
+
+ /* Process timezone. */
+ if(tzp >= end)
+ return (const char *) NULL;
+ if(*tzp == 'Z') {
+ tzp = "GMT";
+ end = tzp + 3;
+ }
+ else
+ tzp++;
+
+ tzl = end - tzp;
+ return curl_maprintf("%u%.2s-%.2s-%.2s %.2s:%.2s:%.2s %.*s",
+ 20 - (*beg >= '5'), beg, beg + 2, beg + 4,
+ beg + 6, beg + 8, sec,
+ tzl, tzp);
+}
+
+const char * Curl_ASN1tostr(curl_asn1Element * elem, int type)
+{
+ /* Convert an ASN.1 element to a printable string.
+ Return the dynamically allocated string, or NULL if an error occurs. */
+
+ if(elem->constructed)
+ return (const char *) NULL; /* No conversion of structured elements. */
+
+ if(!type)
+ type = elem->tag; /* Type not forced: use element tag as type. */
+
+ switch (type) {
+ case CURL_ASN1_BOOLEAN:
+ return bool2str(elem->beg, elem->end);
+ case CURL_ASN1_INTEGER:
+ case CURL_ASN1_ENUMERATED:
+ return int2str(elem->beg, elem->end);
+ case CURL_ASN1_BIT_STRING:
+ return bit2str(elem->beg, elem->end);
+ case CURL_ASN1_OCTET_STRING:
+ return octet2str(elem->beg, elem->end);
+ case CURL_ASN1_NULL:
+ return strdup("");
+ case CURL_ASN1_OBJECT_IDENTIFIER:
+ return OID2str(elem->beg, elem->end, TRUE);
+ case CURL_ASN1_UTC_TIME:
+ return UTime2str(elem->beg, elem->end);
+ case CURL_ASN1_GENERALIZED_TIME:
+ return GTime2str(elem->beg, elem->end);
+ case CURL_ASN1_UTF8_STRING:
+ case CURL_ASN1_NUMERIC_STRING:
+ case CURL_ASN1_PRINTABLE_STRING:
+ case CURL_ASN1_TELETEX_STRING:
+ case CURL_ASN1_IA5_STRING:
+ case CURL_ASN1_VISIBLE_STRING:
+ case CURL_ASN1_UNIVERSAL_STRING:
+ case CURL_ASN1_BMP_STRING:
+ return string2str(type, elem->beg, elem->end);
+ }
+
+ return (const char *) NULL; /* Unsupported. */
+}
+
+static ssize_t encodeDN(char * buf, size_t n, curl_asn1Element * dn)
+{
+ curl_asn1Element rdn;
+ curl_asn1Element atv;
+ curl_asn1Element oid;
+ curl_asn1Element value;
+ size_t l = 0;
+ const char * p1;
+ const char * p2;
+ const char * p3;
+ const char * str;
+
+ /* ASCII encode distinguished name at `dn' into the `n'-byte buffer at `buf'.
+ Return the total string length, even if larger than `n'. */
+
+ for(p1 = dn->beg; p1 < dn->end;) {
+ p1 = Curl_getASN1Element(&rdn, p1, dn->end);
+ for(p2 = rdn.beg; p2 < rdn.end;) {
+ p2 = Curl_getASN1Element(&atv, p2, rdn.end);
+ p3 = Curl_getASN1Element(&oid, atv.beg, atv.end);
+ Curl_getASN1Element(&value, p3, atv.end);
+ str = Curl_ASN1tostr(&oid, 0);
+ if(!str)
+ return -1;
+
+ /* Encode delimiter.
+ If attribute has a short uppercase name, delimiter is ", ". */
+ if(l) {
+ for(p3 = str; isupper(*p3); p3++)
+ ;
+ for(p3 = (*p3 || p3 - str > 2)? "/": ", "; *p3; p3++) {
+ if(l < n)
+ buf[l] = *p3;
+ l++;
+ }
+ }
+
+ /* Encode attribute name. */
+ for(p3 = str; *p3; p3++) {
+ if(l < n)
+ buf[l] = *p3;
+ l++;
+ }
+ free((char *) str);
+
+ /* Generate equal sign. */
+ if(l < n)
+ buf[l] = '=';
+ l++;
+
+ /* Generate value. */
+ str = Curl_ASN1tostr(&value, 0);
+ if(!str)
+ return -1;
+ for(p3 = str; *p3; p3++) {
+ if(l < n)
+ buf[l] = *p3;
+ l++;
+ }
+ free((char *) str);
+ }
+ }
+
+ return l;
+}
+
+const char * Curl_DNtostr(curl_asn1Element * dn)
+{
+ char * buf = (char *) NULL;
+ ssize_t n = encodeDN(buf, 0, dn);
+
+ /* Convert an ASN.1 distinguished name into a printable string.
+ Return the dynamically allocated string, or NULL if an error occurs. */
+
+ if(n >= 0) {
+ buf = malloc(n + 1);
+ if(buf) {
+ encodeDN(buf, n + 1, dn);
+ buf[n] = '\0';
+ }
+ }
+ return (const char *) buf;
+}
+
+/*
+ * X509 parser.
+ */
+
+void Curl_parseX509(curl_X509certificate * cert,
+ const char * beg, const char * end)
+{
+ curl_asn1Element elem;
+ curl_asn1Element tbsCertificate;
+ const char * ccp;
+ static const char defaultVersion = 0; /* v1. */
+
+ /* ASN.1 parse an X509 certificate into structure subfields.
+ 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;
+
+ /* Get the sequence content. */
+ Curl_getASN1Element(&elem, beg, end);
+ beg = elem.beg;
+ end = elem.end;
+
+ /* Get tbsCertificate. */
+ beg = Curl_getASN1Element(&tbsCertificate, beg, end);
+ /* Skip the signatureAlgorithm. */
+ beg = Curl_getASN1Element(&cert->signatureAlgorithm, beg, end);
+ /* Get the signatureValue. */
+ Curl_getASN1Element(&cert->signature, beg, end);
+
+ /* Parse TBSCertificate. */
+ 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);
+ if(elem.tag == 0) {
+ Curl_getASN1Element(&cert->version, elem.beg, elem.end);
+ beg = Curl_getASN1Element(&elem, beg, end);
+ }
+ cert->serialNumber = elem;
+ /* Get signature algorithm. */
+ beg = Curl_getASN1Element(&cert->signatureAlgorithm, beg, end);
+ /* Get issuer. */
+ beg = Curl_getASN1Element(&cert->issuer, beg, end);
+ /* Get notBefore and notAfter. */
+ beg = Curl_getASN1Element(&elem, beg, end);
+ ccp = Curl_getASN1Element(&cert->notBefore, elem.beg, elem.end);
+ Curl_getASN1Element(&cert->notAfter, ccp, elem.end);
+ /* Get subject. */
+ beg = Curl_getASN1Element(&cert->subject, beg, end);
+ /* Get subjectPublicKeyAlgorithm and subjectPublicKey. */
+ beg = Curl_getASN1Element(&cert->subjectPublicKeyInfo, beg, end);
+ ccp = Curl_getASN1Element(&cert->subjectPublicKeyAlgorithm,
+ cert->subjectPublicKeyInfo.beg,
+ cert->subjectPublicKeyInfo.end);
+ Curl_getASN1Element(&cert->subjectPublicKey, ccp,
+ cert->subjectPublicKeyInfo.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);
+ if(elem.tag == 1) {
+ cert->issuerUniqueID = elem;
+ if(beg < end)
+ beg = Curl_getASN1Element(&elem, beg, end);
+ }
+ if(elem.tag == 2) {
+ cert->subjectUniqueID = elem;
+ if(beg < end)
+ beg = Curl_getASN1Element(&elem, beg, end);
+ }
+ if(elem.tag == 3)
+ Curl_getASN1Element(&cert->extensions, elem.beg, elem.end);
+}
+
+static size_t copySubstring(char * to, const char * from)
+{
+ size_t i;
+
+ /* Copy at most 64-characters, terminate with a newline and returns the
+ effective number of stored characters. */
+
+ for(i = 0; i < 64; i++) {
+ to[i] = *from;
+ if(!*from++)
+ break;
+ }
+
+ to[i++] = '\n';
+ return i;
+}
+
+static const char * dumpAlgo(curl_asn1Element * param,
+ const char * beg, const char * end)
+{
+ curl_asn1Element oid;
+
+ /* 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)
+ Curl_getASN1Element(param, beg, end);
+ return OID2str(oid.beg, oid.end, TRUE);
+}
+
+static void do_pubkey_field(struct SessionHandle * data, int certnum,
+ const char * label, curl_asn1Element * elem)
+{
+ const char * output;
+
+ /* Generate a certificate information record for the public key. */
+
+ output = Curl_ASN1tostr(elem, 0);
+ if(output) {
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, label, output);
+ if(!certnum)
+ infof(data, " %s: %s\n", label, output);
+ free((char *) output);
+ }
+}
+
+static void do_pubkey(struct SessionHandle * data, int certnum,
+ const char * algo, curl_asn1Element * param,
+ curl_asn1Element * pubkey)
+{
+ curl_asn1Element elem;
+ curl_asn1Element pk;
+ const char * p;
+ const char * q;
+ unsigned long len;
+ unsigned int i;
+
+ /* Generate all information records for the public key. */
+
+ /* Get the public key (single element). */
+ Curl_getASN1Element(&pk, pubkey->beg + 1, pubkey->end);
+
+ if(curl_strequal(algo, "rsaEncryption")) {
+ p = Curl_getASN1Element(&elem, pk.beg, pk.end);
+ /* Compute key length. */
+ for(q = elem.beg; !*q && q < elem.end; q++)
+ ;
+ len = (unsigned long)((elem.end - q) * 8);
+ if(len)
+ for(i = *(unsigned char *) q; !(i & 0x80); i <<= 1)
+ len--;
+ if(len > 32)
+ elem.beg = q; /* Strip leading zero bytes. */
+ if(!certnum)
+ infof(data, " RSA Public Key (%lu bits)\n", len);
+ if(data->set.ssl.certinfo) {
+ q = curl_maprintf("%lu", len);
+ if(q) {
+ Curl_ssl_push_certinfo(data, certnum, "RSA Public Key", q);
+ free((char *) q);
+ }
+ }
+ /* Generate coefficients. */
+ do_pubkey_field(data, certnum, "rsa(n)", &elem);
+ Curl_getASN1Element(&elem, p, pk.end);
+ do_pubkey_field(data, certnum, "rsa(e)", &elem);
+ }
+ else if(curl_strequal(algo, "dsa")) {
+ p = Curl_getASN1Element(&elem, param->beg, param->end);
+ do_pubkey_field(data, certnum, "dsa(p)", &elem);
+ p = Curl_getASN1Element(&elem, p, param->end);
+ do_pubkey_field(data, certnum, "dsa(q)", &elem);
+ Curl_getASN1Element(&elem, p, param->end);
+ do_pubkey_field(data, certnum, "dsa(g)", &elem);
+ do_pubkey_field(data, certnum, "dsa(pub_key)", &pk);
+ }
+ else if(curl_strequal(algo, "dhpublicnumber")) {
+ p = Curl_getASN1Element(&elem, param->beg, param->end);
+ do_pubkey_field(data, certnum, "dh(p)", &elem);
+ Curl_getASN1Element(&elem, param->beg, param->end);
+ do_pubkey_field(data, certnum, "dh(g)", &elem);
+ do_pubkey_field(data, certnum, "dh(pub_key)", &pk);
+ }
+#if 0 /* Patent-encumbered. */
+ else if(curl_strequal(algo, "ecPublicKey")) {
+ /* Left TODO. */
+ }
+#endif
+}
+
+CURLcode Curl_extract_certinfo(struct connectdata * conn,
+ int certnum,
+ const char * beg,
+ const char * end)
+{
+ curl_X509certificate cert;
+ struct SessionHandle * data = conn->data;
+ curl_asn1Element param;
+ const char * ccp;
+ char * cp1;
+ size_t cl1;
+ char * cp2;
+ CURLcode result;
+ unsigned long version;
+ size_t i;
+ size_t j;
+
+ if(!data->set.ssl.certinfo)
+ if(certnum)
+ return CURLE_OK;
+
+ /* Prepare the certificate information for curl_easy_getinfo(). */
+
+ /* Extract the certificate ASN.1 elements. */
+ Curl_parseX509(&cert, beg, end);
+
+ /* Subject. */
+ ccp = Curl_DNtostr(&cert.subject);
+ if(!ccp)
+ return CURLE_OUT_OF_MEMORY;
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, "Subject", ccp);
+ if(!certnum)
+ infof(data, "%2d Subject: %s\n", certnum, ccp);
+ free((char *) ccp);
+
+ /* Issuer. */
+ ccp = Curl_DNtostr(&cert.issuer);
+ if(!ccp)
+ return CURLE_OUT_OF_MEMORY;
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, "Issuer", ccp);
+ if(!certnum)
+ infof(data, " Issuer: %s\n", ccp);
+ free((char *) ccp);
+
+ /* Version (always fits in less than 32 bits). */
+ version = 0;
+ for(ccp = cert.version.beg; ccp < cert.version.end; ccp++)
+ version = (version << 8) | *(const unsigned char *) ccp;
+ if(data->set.ssl.certinfo) {
+ ccp = curl_maprintf("%lx", version);
+ if(!ccp)
+ return CURLE_OUT_OF_MEMORY;
+ Curl_ssl_push_certinfo(data, certnum, "Version", ccp);
+ free((char *) ccp);
+ }
+ if(!certnum)
+ infof(data, " Version: %lu (0x%lx)\n", version + 1, version);
+
+ /* Serial number. */
+ ccp = Curl_ASN1tostr(&cert.serialNumber, 0);
+ if(!ccp)
+ return CURLE_OUT_OF_MEMORY;
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, "Serial Number", ccp);
+ if(!certnum)
+ infof(data, " Serial Number: %s\n", ccp);
+ free((char *) ccp);
+
+ /* Signature algorithm .*/
+ ccp = dumpAlgo(&param, cert.signatureAlgorithm.beg,
+ cert.signatureAlgorithm.end);
+ if(!ccp)
+ return CURLE_OUT_OF_MEMORY;
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, "Signature Algorithm", ccp);
+ if(!certnum)
+ infof(data, " Signature Algorithm: %s\n", ccp);
+ free((char *) ccp);
+
+ /* Start Date. */
+ ccp = Curl_ASN1tostr(&cert.notBefore, 0);
+ if(!ccp)
+ return CURLE_OUT_OF_MEMORY;
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, "Start Date", ccp);
+ if(!certnum)
+ infof(data, " Start Date: %s\n", ccp);
+ free((char *) ccp);
+
+ /* Expire Date. */
+ ccp = Curl_ASN1tostr(&cert.notAfter, 0);
+ if(!ccp)
+ return CURLE_OUT_OF_MEMORY;
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, "Expire Date", ccp);
+ if(!certnum)
+ infof(data, " Expire Date: %s\n", ccp);
+ free((char *) ccp);
+
+ /* Public Key Algorithm. */
+ ccp = dumpAlgo(&param, cert.subjectPublicKeyAlgorithm.beg,
+ cert.subjectPublicKeyAlgorithm.end);
+ if(!ccp)
+ return CURLE_OUT_OF_MEMORY;
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, "Public Key Algorithm", ccp);
+ if(!certnum)
+ infof(data, " Public Key Algorithm: %s\n", ccp);
+ do_pubkey(data, certnum, ccp, &param, &cert.subjectPublicKey);
+ free((char *) ccp);
+
+/* TODO: extensions. */
+
+ /* Signature. */
+ ccp = Curl_ASN1tostr(&cert.signature, 0);
+ if(!ccp)
+ return CURLE_OUT_OF_MEMORY;
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, "Signature", ccp);
+ if(!certnum)
+ infof(data, " Signature: %s\n", ccp);
+ 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;
+ /* Compute the number of characters in final certificate string. Format is:
+ -----BEGIN CERTIFICATE-----\n
+ <max 64 base64 characters>\n
+ .
+ .
+ .
+ -----END CERTIFICATE-----\n
+ */
+ i = 28 + cl1 + (cl1 + 64 - 1) / 64 + 26;
+ cp2 = malloc(i + 1);
+ if(!cp2) {
+ free(cp1);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ /* Build the certificate string. */
+ i = copySubstring(cp2, "-----BEGIN CERTIFICATE-----");
+ for(j = 0; j < cl1; j += 64)
+ i += copySubstring(cp2 + i, cp1 + j);
+ i += copySubstring(cp2 + i, "-----END CERTIFICATE-----");
+ cp2[i] = '\0';
+ free(cp1);
+ if(data->set.ssl.certinfo)
+ Curl_ssl_push_certinfo(data, certnum, "Cert", cp2);
+ if(!certnum)
+ infof(data, "%s\n", cp2);
+ free(cp2);
+ return CURLE_OK;
+}
+
+#endif /* USE_GSKIT or USE_NSS or USE_GNUTLS or USE_CYASSL */
+
+#if defined(USE_GSKIT)
+
+static const char * checkOID(const char * beg, const char * end,
+ const char * oid)
+{
+ curl_asn1Element e;
+ const char * ccp;
+ const char * p;
+ bool matched;
+
+ /* Check if first ASN.1 element at `beg' is the given OID.
+ Return a pointer in the source after the OID if found, else NULL. */
+
+ ccp = Curl_getASN1Element(&e, beg, end);
+ if(!ccp || e.tag != CURL_ASN1_OBJECT_IDENTIFIER)
+ return (const char *) NULL;
+
+ p = OID2str(e.beg, e.end, FALSE);
+ if(!p)
+ return (const char *) NULL;
+
+ matched = !strcmp(p, oid);
+ free((char *) p);
+ return matched? ccp: (const char *) NULL;
+}
+
+CURLcode Curl_verifyhost(struct connectdata * conn,
+ const char * beg, const char * end)
+{
+ struct SessionHandle * data = conn->data;
+ curl_X509certificate cert;
+ curl_asn1Element dn;
+ curl_asn1Element elem;
+ curl_asn1Element ext;
+ curl_asn1Element name;
+ int i;
+ const char * p;
+ const char * q;
+ char * dnsname;
+ int matched = -1;
+ size_t addrlen = (size_t) -1;
+ ssize_t len;
+#ifdef ENABLE_IPV6
+ struct in6_addr addr;
+#else
+ struct in_addr addr;
+#endif
+
+ /* Verify that connection server matches info in X509 certificate at
+ `beg'..`end'. */
+
+ if(!data->set.ssl.verifyhost)
+ return CURLE_OK;
+
+ if(!beg)
+ return CURLE_PEER_FAILED_VERIFICATION;
+ Curl_parseX509(&cert, beg, end);
+
+ /* Get the server IP address. */
+#ifdef ENABLE_IPV6
+ if(conn->bits.ipv6_ip && Curl_inet_pton(AF_INET6, conn->host.name, &addr))
+ addrlen = sizeof(struct in6_addr);
+ else
+#endif
+ if(Curl_inet_pton(AF_INET, conn->host.name, &addr))
+ addrlen = sizeof(struct in_addr);
+
+ /* Process extensions. */
+ for(p = cert.extensions.beg; p < cert.extensions.end && matched != 1;) {
+ p = Curl_getASN1Element(&ext, p, cert.extensions.end);
+ /* Check if extension is a subjectAlternativeName. */
+ ext.beg = checkOID(ext.beg, ext.end, sanOID);
+ if(ext.beg) {
+ ext.beg = Curl_getASN1Element(&elem, ext.beg, ext.end);
+ /* Skip critical if present. */
+ if(elem.tag == CURL_ASN1_BOOLEAN)
+ ext.beg = Curl_getASN1Element(&elem, ext.beg, ext.end);
+ /* Parse the octet string contents: is a single sequence. */
+ Curl_getASN1Element(&elem, elem.beg, elem.end);
+ /* Check all GeneralNames. */
+ for(q = elem.beg; matched != 1 && q < elem.end;) {
+ q = Curl_getASN1Element(&name, q, elem.end);
+ switch (name.tag) {
+ case 2: /* DNS name. */
+ i = 0;
+ len = utf8asn1str(&dnsname, CURL_ASN1_IA5_STRING,
+ name.beg, name.end);
+ if(len > 0)
+ if(strlen(dnsname) == (size_t) len)
+ i = Curl_cert_hostcheck((const char *) dnsname, conn->host.name);
+ free(dnsname);
+ if(!i)
+ return CURLE_PEER_FAILED_VERIFICATION;
+ matched = i;
+ break;
+
+ case 7: /* IP address. */
+ matched = (size_t) (name.end - q) == addrlen &&
+ !memcmp(&addr, q, addrlen);
+ break;
+ }
+ }
+ }
+ }
+
+ switch (matched) {
+ case 1:
+ /* an alternative name matched the server hostname */
+ infof(data, "\t subjectAltName: %s matched\n", conn->host.dispname);
+ return CURLE_OK;
+ case 0:
+ /* an alternative name field existed, but didn't match and then
+ we MUST fail */
+ infof(data, "\t subjectAltName does not match %s\n", conn->host.dispname);
+ return CURLE_PEER_FAILED_VERIFICATION;
+ }
+
+ /* 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
+ distinguished one to get the most significant one. */
+ while(q < cert.subject.end) {
+ q = Curl_getASN1Element(&dn, q, cert.subject.end);
+ for(p = dn.beg; p < dn.end;) {
+ p = Curl_getASN1Element(&elem, p, dn.end);
+ /* We have a DN's AttributeTypeAndValue: check it in case it's a CN. */
+ elem.beg = checkOID(elem.beg, elem.end, cnOID);
+ if(elem.beg)
+ name = elem; /* Latch CN. */
+ }
+ }
+
+ /* Check the CN if found. */
+ if(!Curl_getASN1Element(&elem, name.beg, name.end))
+ failf(data, "SSL: unable to obtain common name from peer certificate");
+ else {
+ len = utf8asn1str(&dnsname, elem.tag, elem.beg, elem.end);
+ if(len < 0) {
+ free(dnsname);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ if(strlen(dnsname) != (size_t) len) /* Nul byte in string ? */
+ failf(data, "SSL: illegal cert name field");
+ else if(Curl_cert_hostcheck((const char *) dnsname, conn->host.name)) {
+ infof(data, "\t common name: %s (matched)\n", dnsname);
+ free(dnsname);
+ return CURLE_OK;
+ }
+ else
+ failf(data, "SSL: certificate subject name '%s' does not match "
+ "target host name '%s'", dnsname, conn->host.dispname);
+ free(dnsname);
+ }
+
+ return CURLE_PEER_FAILED_VERIFICATION;
+}
+
+#endif /* USE_GSKIT */
diff --git a/lib/x509asn1.h b/lib/x509asn1.h
new file mode 100644
index 00000000..eb23e506
--- /dev/null
+++ b/lib/x509asn1.h
@@ -0,0 +1,132 @@
+#ifndef HEADER_CURL_X509ASN1_H
+#define HEADER_CURL_X509ASN1_H
+
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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(USE_GSKIT) || defined(USE_NSS) || defined(USE_GNUTLS) || \
+ defined(USE_CYASSL)
+
+#include "urldata.h"
+
+/*
+ * Constants.
+ */
+
+/* ASN.1 classes. */
+#define CURL_ASN1_UNIVERSAL 0
+#define CURL_ASN1_APPLICATION 1
+#define CURL_ASN1_CONTEXT_SPECIFIC 2
+#define CURL_ASN1_PRIVATE 3
+
+/* ASN.1 types. */
+#define CURL_ASN1_BOOLEAN 1
+#define CURL_ASN1_INTEGER 2
+#define CURL_ASN1_BIT_STRING 3
+#define CURL_ASN1_OCTET_STRING 4
+#define CURL_ASN1_NULL 5
+#define CURL_ASN1_OBJECT_IDENTIFIER 6
+#define CURL_ASN1_OBJECT_DESCRIPTOR 7
+#define CURL_ASN1_INSTANCE_OF 8
+#define CURL_ASN1_REAL 9
+#define CURL_ASN1_ENUMERATED 10
+#define CURL_ASN1_EMBEDDED 11
+#define CURL_ASN1_UTF8_STRING 12
+#define CURL_ASN1_RELATIVE_OID 13
+#define CURL_ASN1_SEQUENCE 16
+#define CURL_ASN1_SET 17
+#define CURL_ASN1_NUMERIC_STRING 18
+#define CURL_ASN1_PRINTABLE_STRING 19
+#define CURL_ASN1_TELETEX_STRING 20
+#define CURL_ASN1_VIDEOTEX_STRING 21
+#define CURL_ASN1_IA5_STRING 22
+#define CURL_ASN1_UTC_TIME 23
+#define CURL_ASN1_GENERALIZED_TIME 24
+#define CURL_ASN1_GRAPHIC_STRING 25
+#define CURL_ASN1_VISIBLE_STRING 26
+#define CURL_ASN1_GENERAL_STRING 27
+#define CURL_ASN1_UNIVERSAL_STRING 28
+#define CURL_ASN1_CHARACTER_STRING 29
+#define CURL_ASN1_BMP_STRING 30
+
+
+/*
+ * Types.
+ */
+
+/* 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. */
+ unsigned char class; /* ASN.1 element class. */
+ unsigned char tag; /* ASN.1 element tag. */
+ bool constructed; /* Element is constructed. */
+} curl_asn1Element;
+
+
+/* ASN.1 OID table entry. */
+typedef struct {
+ const char * numoid; /* Dotted-numeric OID. */
+ const char * textoid; /* OID name. */
+} curl_OID;
+
+
+/* X509 certificate: RFC 5280. */
+typedef struct {
+ curl_asn1Element certificate;
+ curl_asn1Element version;
+ curl_asn1Element serialNumber;
+ curl_asn1Element signatureAlgorithm;
+ curl_asn1Element signature;
+ curl_asn1Element issuer;
+ curl_asn1Element notBefore;
+ curl_asn1Element notAfter;
+ curl_asn1Element subject;
+ curl_asn1Element subjectPublicKeyInfo;
+ curl_asn1Element subjectPublicKeyAlgorithm;
+ curl_asn1Element subjectPublicKey;
+ curl_asn1Element issuerUniqueID;
+ curl_asn1Element subjectUniqueID;
+ curl_asn1Element extensions;
+} curl_X509certificate;
+
+
+/*
+ * Prototypes.
+ */
+
+const char * Curl_getASN1Element(curl_asn1Element * elem,
+ const char * beg, const char * end);
+const char * Curl_ASN1tostr(curl_asn1Element * elem, int type);
+const char * Curl_DNtostr(curl_asn1Element * dn);
+void Curl_parseX509(curl_X509certificate * cert,
+ const char * beg, const char * end);
+CURLcode Curl_extract_certinfo(struct connectdata * conn, int certnum,
+ const char * beg, const char * end);
+CURLcode Curl_verifyhost(struct connectdata * conn,
+ const char * beg, const char * end);
+
+#endif /* USE_GSKIT or USE_NSS or USE_GNUTLS or USE_CYASSL */
+#endif /* HEADER_CURL_X509ASN1_H */
diff --git a/libcurl.pc.in b/libcurl.pc.in
index 6eea31fb..fdfaec91 100644
--- a/libcurl.pc.in
+++ b/libcurl.pc.in
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 2004 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,7 +33,7 @@ supported_features="@SUPPORT_FEATURES@"
Name: libcurl
URL: http://curl.haxx.se/
Description: Library to transfer files with ftp, http, etc.
-Version: @VERSION@
-Libs: -L${libdir} -lcurl @LIBS@
-Libs.private: @LIBCURL_LIBS@ @LIBS@
-Cflags: -I${includedir}
+Version: @CURLVERSION@
+Libs: -L${libdir} -lcurl
+Libs.private: @LIBCURL_LIBS@
+Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@
diff --git a/ltmain.sh b/ltmain.sh
deleted file mode 100755
index d88da2c2..00000000
--- a/ltmain.sh
+++ /dev/null
@@ -1,8413 +0,0 @@
-# Generated from ltmain.m4sh.
-
-# ltmain.sh (GNU libtool) 2.2.6b
-# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-# --config show all configuration variables
-# --debug enable verbose shell tracing
-# -n, --dry-run display commands without modifying any files
-# --features display basic configuration information and exit
-# --mode=MODE use operation mode MODE
-# --preserve-dup-deps don't remove duplicate dependency libraries
-# --quiet, --silent don't print informational messages
-# --tag=TAG use configuration variables from tag TAG
-# -v, --verbose print informational messages (default)
-# --version print version information
-# -h, --help print short or long help message
-#
-# MODE must be one of the following:
-#
-# clean remove files from the build directory
-# compile compile a source file into a libtool object
-# execute automatically set library path, then run a program
-# finish complete the installation of libtool libraries
-# install install libraries or executables
-# link create a library or an executable
-# uninstall remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-# host-triplet: $host
-# shell: $SHELL
-# compiler: $LTCC
-# compiler flags: $LTCFLAGS
-# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2
-# automake: $automake_version
-# autoconf: $autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION="2.2.6b Debian-2.2.6b-2"
-TIMESTAMP=""
-package_revision=1.3017
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# NLS nuisances: We save the old values to restore during execute mode.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
- eval "if test \"\${$lt_var+set}\" = set; then
- save_$lt_var=\$$lt_var
- $lt_var=C
- export $lt_var
- lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
- lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
- fi"
-done
-
-$lt_unset CDPATH
-
-
-
-
-
-: ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SED="/bin/sed"}
-: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" $lt_nl"
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-# Generated shell functions inserted here.
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
-case $progname in
- -*) progname=./$progname ;;
-esac
-
-# Make sure we have an absolute path for reexecution:
-case $progpath in
- [\\/]*|[A-Za-z]:\\*) ;;
- *[\\/]*)
- progdir=$func_dirname_result
- progdir=`cd "$progdir" && pwd`
- progpath="$progdir/$progname"
- ;;
- *)
- save_IFS="$IFS"
- IFS=:
- for progdir in $PATH; do
- IFS="$save_IFS"
- test -x "$progdir/$progname" && break
- done
- IFS="$save_IFS"
- test -n "$progdir" || progdir=`pwd`
- progpath="$progdir/$progname"
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
- s/$bs4/&\\
-/g
- s/^$bs2$dollar/$bs&/
- s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
- s/\n//g"
-
-# Standard options:
-opt_dry_run=false
-opt_help=false
-opt_quiet=false
-opt_verbose=false
-opt_warning=:
-
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
-{
- $ECHO "$progname${mode+: }$mode: $*"
-}
-
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
- $opt_verbose && func_echo ${1+"$@"}
-
- # A bug in bash halts the script if the last line of a function
- # fails when set -e is in force, so we need another command to
- # work around that:
- :
-}
-
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
-}
-
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
-
- # bash bug again:
- :
-}
-
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
- func_error ${1+"$@"}
- exit $EXIT_FAILURE
-}
-
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
- func_error ${1+"$@"}
- func_fatal_error "$help"
-}
-help="Try \`$progname --help' for more information." ## default
-
-
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
-{
- $GREP "$1" "$2" >/dev/null 2>&1
-}
-
-
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
-{
- my_directory_path="$1"
- my_dir_list=
-
- if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
- # Protect directory names starting with `-'
- case $my_directory_path in
- -*) my_directory_path="./$my_directory_path" ;;
- esac
-
- # While some portion of DIR does not yet exist...
- while test ! -d "$my_directory_path"; do
- # ...make a list in topmost first order. Use a colon delimited
- # list incase some portion of path contains whitespace.
- my_dir_list="$my_directory_path:$my_dir_list"
-
- # If the last portion added has no slash in it, the list is done
- case $my_directory_path in */*) ;; *) break ;; esac
-
- # ...otherwise throw away the child directory and loop
- my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
- done
- my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
-
- save_mkdir_p_IFS="$IFS"; IFS=':'
- for my_dir in $my_dir_list; do
- IFS="$save_mkdir_p_IFS"
- # mkdir can fail with a `File exist' error if two processes
- # try to create one of the directories concurrently. Don't
- # stop in that case!
- $MKDIR "$my_dir" 2>/dev/null || :
- done
- IFS="$save_mkdir_p_IFS"
-
- # Bail out if we (or some other process) failed to create a directory.
- test -d "$my_directory_path" || \
- func_fatal_error "Failed to create \`$1'"
- fi
-}
-
-
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible. If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
- my_template="${TMPDIR-/tmp}/${1-$progname}"
-
- if test "$opt_dry_run" = ":"; then
- # Return a directory name, but don't create it in dry-run mode
- my_tmpdir="${my_template}-$$"
- else
-
- # If mktemp works, use that first and foremost
- my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
- if test ! -d "$my_tmpdir"; then
- # Failing that, at least try and use $RANDOM to avoid a race
- my_tmpdir="${my_template}-${RANDOM-0}$$"
-
- save_mktempdir_umask=`umask`
- umask 0077
- $MKDIR "$my_tmpdir"
- umask $save_mktempdir_umask
- fi
-
- # If we're not in dry-run mode, bomb out on failure
- test -d "$my_tmpdir" || \
- func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
- fi
-
- $ECHO "X$my_tmpdir" | $Xsed
-}
-
-
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
-{
- case $1 in
- *[\\\`\"\$]*)
- func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
- *)
- func_quote_for_eval_unquoted_result="$1" ;;
- esac
-
- case $func_quote_for_eval_unquoted_result in
- # Double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and and variable
- # expansion for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
- ;;
- *)
- func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
- esac
-}
-
-
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
- case $1 in
- *[\\\`\"]*)
- my_arg=`$ECHO "X$1" | $Xsed \
- -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
- *)
- my_arg="$1" ;;
- esac
-
- case $my_arg in
- # Double-quote args containing shell metacharacters to delay
- # word splitting and command substitution for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- my_arg="\"$my_arg\""
- ;;
- esac
-
- func_quote_for_expand_result="$my_arg"
-}
-
-
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
-{
- my_cmd="$1"
- my_fail_exp="${2-:}"
-
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
-
- if ${opt_dry_run-false}; then :; else
- eval "$my_cmd"
- my_status=$?
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
- fi
- fi
-}
-
-
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it. Use the saved locale for evaluation.
-func_show_eval_locale ()
-{
- my_cmd="$1"
- my_fail_exp="${2-:}"
-
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
-
- if ${opt_dry_run-false}; then :; else
- eval "$lt_user_locale
- $my_cmd"
- my_status=$?
- eval "$lt_safe_locale"
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
- fi
- fi
-}
-
-
-
-
-
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
- $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
- s/^# //
- s/^# *$//
- s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
-{
- $SED -n '/^# Usage:/,/# -h/ {
- s/^# //
- s/^# *$//
- s/\$progname/'$progname'/
- p
- }' < "$progpath"
- $ECHO
- $ECHO "run \`$progname --help | more' for full usage"
- exit $?
-}
-
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
-{
- $SED -n '/^# Usage:/,/# Report bugs to/ {
- s/^# //
- s/^# *$//
- s*\$progname*'$progname'*
- s*\$host*'"$host"'*
- s*\$SHELL*'"$SHELL"'*
- s*\$LTCC*'"$LTCC"'*
- s*\$LTCFLAGS*'"$LTCFLAGS"'*
- s*\$LD*'"$LD"'*
- s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
- func_error "missing argument for $1"
- exit_cmd=exit
-}
-
-exit_cmd=:
-
-
-
-
-
-# Check that we have a working $ECHO.
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell, and then maybe $ECHO will work.
- exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit $EXIT_SUCCESS
-fi
-
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
-
-# Global variables.
-# $mode is unset
-nonopt=
-execute_dlfiles=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
-
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-# func_fatal_configuration arg...
-# Echo program name prefixed message to standard error, followed by
-# a configuration failure hint, and exit.
-func_fatal_configuration ()
-{
- func_error ${1+"$@"}
- func_error "See the $PACKAGE documentation for more information."
- func_fatal_error "Fatal configuration error."
-}
-
-
-# func_config
-# Display the configuration for all the tags in this script.
-func_config ()
-{
- re_begincf='^# ### BEGIN LIBTOOL'
- re_endcf='^# ### END LIBTOOL'
-
- # Default configuration.
- $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
-
- # Now print the configurations for the tags.
- for tagname in $taglist; do
- $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
- done
-
- exit $?
-}
-
-# func_features
-# Display the features supported by this script.
-func_features ()
-{
- $ECHO "host: $host"
- if test "$build_libtool_libs" = yes; then
- $ECHO "enable shared libraries"
- else
- $ECHO "disable shared libraries"
- fi
- if test "$build_old_libs" = yes; then
- $ECHO "enable static libraries"
- else
- $ECHO "disable static libraries"
- fi
-
- exit $?
-}
-
-# func_enable_tag tagname
-# Verify that TAGNAME is valid, and either flag an error and exit, or
-# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
-# variable here.
-func_enable_tag ()
-{
- # Global variable:
- tagname="$1"
-
- re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
- re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
- sed_extractcf="/$re_begincf/,/$re_endcf/p"
-
- # Validate tagname.
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- func_fatal_error "invalid tag name: $tagname"
- ;;
- esac
-
- # Don't test for the "default" C tag, as we know it's
- # there but not specially marked.
- case $tagname in
- CC) ;;
- *)
- if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
- taglist="$taglist $tagname"
-
- # Evaluate the configuration. Be careful to quote the path
- # and the sed script, to avoid splitting on whitespace, but
- # also don't use non-portable quotes within backquotes within
- # quotes we have to do it in 2 steps:
- extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
- eval "$extractedcf"
- else
- func_error "ignoring unknown tag $tagname"
- fi
- ;;
- esac
-}
-
-# Parse options once, thoroughly. This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
-{
-
- # Shorthand for --mode=foo, only valid as the first argument
- case $1 in
- clean|clea|cle|cl)
- shift; set dummy --mode clean ${1+"$@"}; shift
- ;;
- compile|compil|compi|comp|com|co|c)
- shift; set dummy --mode compile ${1+"$@"}; shift
- ;;
- execute|execut|execu|exec|exe|ex|e)
- shift; set dummy --mode execute ${1+"$@"}; shift
- ;;
- finish|finis|fini|fin|fi|f)
- shift; set dummy --mode finish ${1+"$@"}; shift
- ;;
- install|instal|insta|inst|ins|in|i)
- shift; set dummy --mode install ${1+"$@"}; shift
- ;;
- link|lin|li|l)
- shift; set dummy --mode link ${1+"$@"}; shift
- ;;
- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
- shift; set dummy --mode uninstall ${1+"$@"}; shift
- ;;
- esac
-
- # Parse non-mode specific arguments:
- while test "$#" -gt 0; do
- opt="$1"
- shift
-
- case $opt in
- --config) func_config ;;
-
- --debug) preserve_args="$preserve_args $opt"
- func_echo "enabling shell trace mode"
- opt_debug='set -x'
- $opt_debug
- ;;
-
- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
- execute_dlfiles="$execute_dlfiles $1"
- shift
- ;;
-
- --dry-run | -n) opt_dry_run=: ;;
- --features) func_features ;;
- --finish) mode="finish" ;;
-
- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
- case $1 in
- # Valid mode arguments:
- clean) ;;
- compile) ;;
- execute) ;;
- finish) ;;
- install) ;;
- link) ;;
- relink) ;;
- uninstall) ;;
-
- # Catch anything else as an error
- *) func_error "invalid argument for $opt"
- exit_cmd=exit
- break
- ;;
- esac
-
- mode="$1"
- shift
- ;;
-
- --preserve-dup-deps)
- opt_duplicate_deps=: ;;
-
- --quiet|--silent) preserve_args="$preserve_args $opt"
- opt_silent=:
- ;;
-
- --verbose| -v) preserve_args="$preserve_args $opt"
- opt_silent=false
- ;;
-
- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
- preserve_args="$preserve_args $opt $1"
- func_enable_tag "$1" # tagname is set here
- shift
- ;;
-
- # Separate optargs to long options:
- -dlopen=*|--mode=*|--tag=*)
- func_opt_split "$opt"
- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
- shift
- ;;
-
- -\?|-h) func_usage ;;
- --help) opt_help=: ;;
- --version) func_version ;;
-
- -*) func_fatal_help "unrecognized option \`$opt'" ;;
-
- *) nonopt="$opt"
- break
- ;;
- esac
- done
-
-
- case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
- # don't eliminate duplications in $postdeps and $predeps
- opt_duplicate_compiler_generated_deps=:
- ;;
- *)
- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
- ;;
- esac
-
- # Having warned about all mis-specified options, bail out if
- # anything was wrong.
- $exit_cmd $EXIT_FAILURE
-}
-
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
- if test "$package_revision" != "$macro_revision"; then
- if test "$VERSION" != "$macro_version"; then
- if test -z "$macro_version"; then
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- fi
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
- fi
-
- exit $EXIT_MISMATCH
- fi
-}
-
-
-## ----------- ##
-## Main. ##
-## ----------- ##
-
-$opt_help || {
- # Sanity checks first:
- func_check_version_match
-
- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- func_fatal_configuration "not configured to build any kind of library"
- fi
-
- test -z "$mode" && func_fatal_error "error: you must specify a MODE."
-
-
- # Darwin sucks
- eval std_shrext=\"$shrext_cmds\"
-
-
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
- func_error "unrecognized option \`-dlopen'"
- $ECHO "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$progname --help --mode=$mode' for more information."
-}
-
-
-# func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_lalib_p ()
-{
- test -f "$1" &&
- $SED -e 4q "$1" 2>/dev/null \
- | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
-}
-
-# func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function implements the same check as func_lalib_p without
-# resorting to external programs. To this end, it redirects stdin and
-# closes it afterwards, without saving the original file descriptor.
-# As a safety measure, use it only where a negative result would be
-# fatal anyway. Works if `file' does not exist.
-func_lalib_unsafe_p ()
-{
- lalib_p=no
- if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
- for lalib_p_l in 1 2 3 4
- do
- read lalib_p_line
- case "$lalib_p_line" in
- \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
- esac
- done
- exec 0<&5 5<&-
- fi
- test "$lalib_p" = yes
-}
-
-# func_ltwrapper_script_p file
-# True iff FILE is a libtool wrapper script
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_script_p ()
-{
- func_lalib_p "$1"
-}
-
-# func_ltwrapper_executable_p file
-# True iff FILE is a libtool wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_executable_p ()
-{
- func_ltwrapper_exec_suffix=
- case $1 in
- *.exe) ;;
- *) func_ltwrapper_exec_suffix=.exe ;;
- esac
- $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
-}
-
-# func_ltwrapper_scriptname file
-# Assumes file is an ltwrapper_executable
-# uses $file to determine the appropriate filename for a
-# temporary ltwrapper_script.
-func_ltwrapper_scriptname ()
-{
- func_ltwrapper_scriptname_result=""
- if func_ltwrapper_executable_p "$1"; then
- func_dirname_and_basename "$1" "" "."
- func_stripname '' '.exe' "$func_basename_result"
- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
- fi
-}
-
-# func_ltwrapper_p file
-# True iff FILE is a libtool wrapper script or wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_p ()
-{
- func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
-}
-
-
-# func_execute_cmds commands fail_cmd
-# Execute tilde-delimited COMMANDS.
-# If FAIL_CMD is given, eval that upon failure.
-# FAIL_CMD may read-access the current command in variable CMD!
-func_execute_cmds ()
-{
- $opt_debug
- save_ifs=$IFS; IFS='~'
- for cmd in $1; do
- IFS=$save_ifs
- eval cmd=\"$cmd\"
- func_show_eval "$cmd" "${2-:}"
- done
- IFS=$save_ifs
-}
-
-
-# func_source file
-# Source FILE, adding directory component if necessary.
-# Note that it is not necessary on cygwin/mingw to append a dot to
-# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
-# behavior happens only for exec(3), not for open(2)! Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
-func_source ()
-{
- $opt_debug
- case $1 in
- */* | *\\*) . "$1" ;;
- *) . "./$1" ;;
- esac
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
- $opt_debug
- if test -n "$available_tags" && test -z "$tagname"; then
- CC_quoted=
- for arg in $CC; do
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case $@ in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
- CC_quoted=
- for arg in $CC; do
- # Double-quote args containing other shell metacharacters.
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case "$@ " in
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
- # The compiler in the base compile command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- func_echo "unable to infer tagged configuration"
- func_fatal_error "specify a tag with \`--tag'"
-# else
-# func_verbose "using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-}
-
-
-
-# func_write_libtool_object output_name pic_name nonpic_name
-# Create a libtool object file (analogous to a ".la" file),
-# but don't create it if we're doing a dry run.
-func_write_libtool_object ()
-{
- write_libobj=${1}
- if test "$build_libtool_libs" = yes; then
- write_lobj=\'${2}\'
- else
- write_lobj=none
- fi
-
- if test "$build_old_libs" = yes; then
- write_oldobj=\'${3}\'
- else
- write_oldobj=none
- fi
-
- $opt_dry_run || {
- cat >${write_libobj}T <<EOF
-# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object=$write_lobj
-
-# Name of the non-PIC object
-non_pic_object=$write_oldobj
-
-EOF
- $MV "${write_libobj}T" "${write_libobj}"
- }
-}
-
-# func_mode_compile arg...
-func_mode_compile ()
-{
- $opt_debug
- # Get the compilation command and the source file.
- base_compile=
- srcfile="$nonopt" # always keep a non-empty value in "srcfile"
- suppress_opt=yes
- suppress_output=
- arg_mode=normal
- libobj=
- later=
- pie_flag=
-
- for arg
- do
- case $arg_mode in
- arg )
- # do not "continue". Instead, add this to base_compile
- lastarg="$arg"
- arg_mode=normal
- ;;
-
- target )
- libobj="$arg"
- arg_mode=normal
- continue
- ;;
-
- normal )
- # Accept any command-line options.
- case $arg in
- -o)
- test -n "$libobj" && \
- func_fatal_error "you cannot specify \`-o' more than once"
- arg_mode=target
- continue
- ;;
-
- -pie | -fpie | -fPIE)
- pie_flag="$pie_flag $arg"
- continue
- ;;
-
- -shared | -static | -prefer-pic | -prefer-non-pic)
- later="$later $arg"
- continue
- ;;
-
- -no-suppress)
- suppress_opt=no
- continue
- ;;
-
- -Xcompiler)
- arg_mode=arg # the next one goes into the "base_compile" arg list
- continue # The current "srcfile" will either be retained or
- ;; # replaced later. I would guess that would be a bug.
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$arg"
- lastarg="$lastarg $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$lastarg"
- lastarg=$func_stripname_result
-
- # Add the arguments to base_compile.
- base_compile="$base_compile $lastarg"
- continue
- ;;
-
- *)
- # Accept the current argument as the source file.
- # The previous "srcfile" becomes the current argument.
- #
- lastarg="$srcfile"
- srcfile="$arg"
- ;;
- esac # case $arg
- ;;
- esac # case $arg_mode
-
- # Aesthetically quote the previous argument.
- func_quote_for_eval "$lastarg"
- base_compile="$base_compile $func_quote_for_eval_result"
- done # for arg
-
- case $arg_mode in
- arg)
- func_fatal_error "you must specify an argument for -Xcompile"
- ;;
- target)
- func_fatal_error "you must specify a target with \`-o'"
- ;;
- *)
- # Get the name of the library object.
- test -z "$libobj" && {
- func_basename "$srcfile"
- libobj="$func_basename_result"
- }
- ;;
- esac
-
- # Recognize several different file suffixes.
- # If the user specifies -o file.o, it is replaced with file.lo
- case $libobj in
- *.[cCFSifmso] | \
- *.ada | *.adb | *.ads | *.asm | \
- *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
- *.[fF][09]? | *.for | *.java | *.obj | *.sx)
- func_xform "$libobj"
- libobj=$func_xform_result
- ;;
- esac
-
- case $libobj in
- *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
- *)
- func_fatal_error "cannot determine name of library object from \`$libobj'"
- ;;
- esac
-
- func_infer_tag $base_compile
-
- for arg in $later; do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- continue
- ;;
-
- -static)
- build_libtool_libs=no
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
-
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
- esac
- done
-
- func_quote_for_eval "$libobj"
- test "X$libobj" != "X$func_quote_for_eval_result" \
- && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && func_warning "libobj name \`$libobj' may not contain shell special characters."
- func_dirname_and_basename "$obj" "/" ""
- objname="$func_basename_result"
- xdir="$func_dirname_result"
- lobj=${xdir}$objdir/$objname
-
- test -z "$base_compile" && \
- func_fatal_help "you must specify a compilation command"
-
- # Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
- removelist="$obj $lobj $libobj ${libobj}T"
- else
- removelist="$lobj $libobj ${libobj}T"
- fi
-
- # On Cygwin there's no "real" PIC flag so we must build both object types
- case $host_os in
- cygwin* | mingw* | pw32* | os2* | cegcc*)
- pic_mode=default
- ;;
- esac
- if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
- # non-PIC code in shared libraries is not supported
- pic_mode=default
- fi
-
- # Calculate the filename of the output object if compiler does
- # not support -o with -c
- if test "$compiler_c_o" = no; then
- output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
- lockfile="$output_obj.lock"
- else
- output_obj=
- need_locks=no
- lockfile=
- fi
-
- # Lock this critical section if it is needed
- # We use this script file to make the link, it avoids creating a new file
- if test "$need_locks" = yes; then
- until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
- func_echo "Waiting for $lockfile to be removed"
- sleep 2
- done
- elif test "$need_locks" = warn; then
- if test -f "$lockfile"; then
- $ECHO "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
- removelist="$removelist $output_obj"
- $ECHO "$srcfile" > "$lockfile"
- fi
-
- $opt_dry_run || $RM $removelist
- removelist="$removelist $lockfile"
- trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
-
- if test -n "$fix_srcfile_path"; then
- eval srcfile=\"$fix_srcfile_path\"
- fi
- func_quote_for_eval "$srcfile"
- qsrcfile=$func_quote_for_eval_result
-
- # Only build a PIC object if we are building libtool libraries.
- if test "$build_libtool_libs" = yes; then
- # Without this assignment, base_compile gets emptied.
- fbsd_hideous_sh_bug=$base_compile
-
- if test "$pic_mode" != no; then
- command="$base_compile $qsrcfile $pic_flag"
- else
- # Don't build PIC code
- command="$base_compile $qsrcfile"
- fi
-
- func_mkdir_p "$xdir$objdir"
-
- if test -z "$output_obj"; then
- # Place PIC objects in $objdir
- command="$command -o $lobj"
- fi
-
- func_show_eval_locale "$command" \
- 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed, then go on to compile the next one
- if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
- func_show_eval '$MV "$output_obj" "$lobj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
-
- # Allow error messages only from the first compilation.
- if test "$suppress_opt" = yes; then
- suppress_output=' >/dev/null 2>&1'
- fi
- fi
-
- # Only build a position-dependent object if we build old libraries.
- if test "$build_old_libs" = yes; then
- if test "$pic_mode" != yes; then
- # Don't build PIC code
- command="$base_compile $qsrcfile$pie_flag"
- else
- command="$base_compile $qsrcfile $pic_flag"
- fi
- if test "$compiler_c_o" = yes; then
- command="$command -o $obj"
- fi
-
- # Suppress compiler output if we already did a PIC compilation.
- command="$command$suppress_output"
- func_show_eval_locale "$command" \
- '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed
- if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
- func_show_eval '$MV "$output_obj" "$obj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
- fi
-
- $opt_dry_run || {
- func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
-
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- removelist=$lockfile
- $RM "$lockfile"
- fi
- }
-
- exit $EXIT_SUCCESS
-}
-
-$opt_help || {
-test "$mode" = compile && func_mode_compile ${1+"$@"}
-}
-
-func_mode_help ()
-{
- # We need to display help for each of the modes.
- case $mode in
- "")
- # Generic help is extracted from the usage comments
- # at the start of this file.
- func_help
- ;;
-
- clean)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
- ;;
-
- compile)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
- -o OUTPUT-FILE set the output file name to OUTPUT-FILE
- -no-suppress do not suppress compiler output for multiple passes
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -shared do not build a \`.o' file suitable for static linking
- -static only build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
- ;;
-
- execute)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
- -dlopen FILE add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
- ;;
-
- finish)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges. Use
-the \`--dry-run' option if you just want to see what would be executed."
- ;;
-
- install)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command. The first component should be
-either the \`install' or \`cp' program.
-
-The following components of INSTALL-COMMAND are treated specially:
-
- -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
- link)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
- -all-static do not do any dynamic linking at all
- -avoid-version do not add a version suffix if possible
- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
- -export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
- -export-symbols-regex REGEX
- try to export only the symbols matching REGEX
- -LLIBDIR search LIBDIR for required installed libraries
- -lNAME OUTPUT-FILE requires the installed library libNAME
- -module build a library that can dlopened
- -no-fast-install disable the fast-install mode
- -no-install link a not-installable executable
- -no-undefined declare that a library does not refer to external symbols
- -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE Use a list of object files found in FILE to specify objects
- -precious-files-regex REGEX
- don't remove output files matching REGEX
- -release RELEASE specify package release information
- -rpath LIBDIR the created library will eventually be installed in LIBDIR
- -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -shared only do dynamic linking of libtool libraries
- -shrext SUFFIX override the standard shared library file extension
- -static do not do any dynamic linking of uninstalled libtool libraries
- -static-libtool-libs
- do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
- -weak LIBNAME declare that the target provides the LIBNAME interface
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename. Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
- ;;
-
- uninstall)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
- ;;
-
- *)
- func_fatal_help "invalid operation mode \`$mode'"
- ;;
- esac
-
- $ECHO
- $ECHO "Try \`$progname --help' for more information about other modes."
-
- exit $?
-}
-
- # Now that we've collected a possible --mode arg, show help if necessary
- $opt_help && func_mode_help
-
-
-# func_mode_execute arg...
-func_mode_execute ()
-{
- $opt_debug
- # The first argument is the command name.
- cmd="$nonopt"
- test -z "$cmd" && \
- func_fatal_help "you must specify a COMMAND"
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- test -f "$file" \
- || func_fatal_help "\`$file' is not a file"
-
- dir=
- case $file in
- *.la)
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$lib' is not a valid libtool archive"
-
- # Read the libtool library.
- dlname=
- library_names=
- func_source "$file"
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && \
- func_warning "\`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- if test ! -f "$dir/$dlname"; then
- func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
- fi
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- ;;
-
- *)
- func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
- continue
- ;;
- esac
-
- # Get the absolute pathname.
- absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir="$absdir"
-
- # Now add the directory to shlibpath_var.
- if eval "test -z \"\$$shlibpath_var\""; then
- eval "$shlibpath_var=\"\$dir\""
- else
- eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
- fi
- done
-
- # This variable tells wrapper scripts just to set shlibpath_var
- # rather than running their programs.
- libtool_execute_magic="$magic"
-
- # Check if any of the arguments is a wrapper script.
- args=
- for file
- do
- case $file in
- -*) ;;
- *)
- # Do a test to see if this is really a libtool program.
- if func_ltwrapper_script_p "$file"; then
- func_source "$file"
- # Transform arg to wrapped name.
- file="$progdir/$program"
- elif func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- func_source "$func_ltwrapper_scriptname_result"
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- func_quote_for_eval "$file"
- args="$args $func_quote_for_eval_result"
- done
-
- if test "X$opt_dry_run" = Xfalse; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
-
- # Restore saved environment variables
- for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
- do
- eval "if test \"\${save_$lt_var+set}\" = set; then
- $lt_var=\$save_$lt_var; export $lt_var
- else
- $lt_unset $lt_var
- fi"
- done
-
- # Now prepare to actually exec the command.
- exec_cmd="\$cmd$args"
- else
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
- $ECHO "export $shlibpath_var"
- fi
- $ECHO "$cmd$args"
- exit $EXIT_SUCCESS
- fi
-}
-
-test "$mode" = execute && func_mode_execute ${1+"$@"}
-
-
-# func_mode_finish arg...
-func_mode_finish ()
-{
- $opt_debug
- libdirs="$nonopt"
- admincmds=
-
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
- for dir
- do
- libdirs="$libdirs $dir"
- done
-
- for libdir in $libdirs; do
- if test -n "$finish_cmds"; then
- # Do each command in the finish commands.
- func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
-'"$cmd"'"'
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $opt_dry_run || eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- $opt_silent && exit $EXIT_SUCCESS
-
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- $ECHO "Libraries have been installed in:"
- for libdir in $libdirs; do
- $ECHO " $libdir"
- done
- $ECHO
- $ECHO "If you ever happen to want to link against installed libraries"
- $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
- $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
- $ECHO "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
- $ECHO " during execution"
- fi
- if test -n "$runpath_var"; then
- $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
- $ECHO " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- $ECHO " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- $ECHO " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- $ECHO
-
- $ECHO "See any operating system documentation about shared libraries for"
- case $host in
- solaris2.[6789]|solaris2.1[0-9])
- $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
- $ECHO "pages."
- ;;
- *)
- $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
- ;;
- esac
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- exit $EXIT_SUCCESS
-}
-
-test "$mode" = finish && func_mode_finish ${1+"$@"}
-
-
-# func_mode_install arg...
-func_mode_install ()
-{
- $opt_debug
- # There may be an optional sh(1) argument at the beginning of
- # install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
- # Allow the use of GNU shtool's install command.
- $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
- # Aesthetically quote it.
- func_quote_for_eval "$nonopt"
- install_prog="$func_quote_for_eval_result "
- arg=$1
- shift
- else
- install_prog=
- arg=$nonopt
- fi
-
- # The real first argument should be the name of the installation program.
- # Aesthetically quote it.
- func_quote_for_eval "$arg"
- install_prog="$install_prog$func_quote_for_eval_result"
-
- # We need to accept at least all the BSD install flags.
- dest=
- files=
- opts=
- prev=
- install_type=
- isdir=no
- stripme=
- for arg
- do
- if test -n "$dest"; then
- files="$files $dest"
- dest=$arg
- continue
- fi
-
- case $arg in
- -d) isdir=yes ;;
- -f)
- case " $install_prog " in
- *[\\\ /]cp\ *) ;;
- *) prev=$arg ;;
- esac
- ;;
- -g | -m | -o)
- prev=$arg
- ;;
- -s)
- stripme=" -s"
- continue
- ;;
- -*)
- ;;
- *)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest=$arg
- continue
- fi
- ;;
- esac
-
- # Aesthetically quote the argument.
- func_quote_for_eval "$arg"
- install_prog="$install_prog $func_quote_for_eval_result"
- done
-
- test -z "$install_prog" && \
- func_fatal_help "you must specify an install program"
-
- test -n "$prev" && \
- func_fatal_help "the \`$prev' option requires an argument"
-
- if test -z "$files"; then
- if test -z "$dest"; then
- func_fatal_help "no file or destination specified"
- else
- func_fatal_help "you must specify a destination"
- fi
- fi
-
- # Strip any trailing slash from the destination.
- func_stripname '' '/' "$dest"
- dest=$func_stripname_result
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- func_dirname_and_basename "$dest" "" "."
- destdir="$func_dirname_result"
- destname="$func_basename_result"
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files; shift
- test "$#" -gt 1 && \
- func_fatal_help "\`$dest' is not a directory"
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- func_fatal_help "\`$destdir' must be an absolute directory name"
- ;;
- esac
- done
- ;;
- esac
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- staticlibs=
- future_libdirs=
- current_libdirs=
- for file in $files; do
-
- # Do each installation.
- case $file in
- *.$libext)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
-
- *.la)
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$file' is not a valid libtool archive"
-
- library_names=
- old_library=
- relink_command=
- func_source "$file"
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- func_dirname "$file" "/" ""
- dir="$func_dirname_result"
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- # Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
-
- # Don't allow the user to place us outside of our expected
- # location b/c this prevents finding dependent libraries that
- # are installed to the same prefix.
- # At present, this check doesn't affect windows .dll's that
- # are installed into $libdir/../bin (currently, that works fine)
- # but it's something to keep an eye on.
- test "$inst_prefix_dir" = "$destdir" && \
- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
-
- if test -n "$inst_prefix_dir"; then
- # Stick the inst_prefix_dir data into the link command.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
- else
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
- fi
-
- func_warning "relinking \`$file'"
- func_show_eval "$relink_command" \
- 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
- fi
-
- # See the names of the shared library.
- set dummy $library_names; shift
- if test -n "$1"; then
- realname="$1"
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
- 'exit $?'
- tstripme="$stripme"
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- case $realname in
- *.dll.a)
- tstripme=""
- ;;
- esac
- ;;
- esac
- if test -n "$tstripme" && test -n "$striplib"; then
- func_show_eval "$striplib $destdir/$realname" 'exit $?'
- fi
-
- if test "$#" -gt 0; then
- # Delete the old symlinks, and create new ones.
- # Try `ln -sf' first, because the `ln' binary might depend on
- # the symlink we replace! Solaris /bin/ln does not understand -f,
- # so we also need to try rm && ln -s.
- for linkname
- do
- test "$linkname" != "$realname" \
- && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- func_execute_cmds "$postinstall_cmds" 'exit $?'
- fi
-
- # Install the pseudo-library for information purposes.
- func_basename "$file"
- name="$func_basename_result"
- instname="$dir/$name"i
- func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
-
- *.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- func_lo2o "$destfile"
- staticdest=$func_lo2o_result
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- func_fatal_help "cannot copy a libtool object to \`$destfile'"
- ;;
- esac
-
- # Install the libtool object if requested.
- test -n "$destfile" && \
- func_show_eval "$install_prog $file $destfile" 'exit $?'
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- func_lo2o "$file"
- staticobj=$func_lo2o_result
- func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
- fi
- exit $EXIT_SUCCESS
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # If the file is missing, and there is a .exe on the end, strip it
- # because it is most likely a libtool script we actually want to
- # install
- stripped_ext=""
- case $file in
- *.exe)
- if test ! -f "$file"; then
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- stripped_ext=".exe"
- fi
- ;;
- esac
-
- # Do a test to see if this is really a libtool program.
- case $host in
- *cygwin* | *mingw*)
- if func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- wrapper=$func_ltwrapper_scriptname_result
- else
- func_stripname '' '.exe' "$file"
- wrapper=$func_stripname_result
- fi
- ;;
- *)
- wrapper=$file
- ;;
- esac
- if func_ltwrapper_script_p "$wrapper"; then
- notinst_deplibs=
- relink_command=
-
- func_source "$wrapper"
-
- # Check the variables that should have been set.
- test -z "$generated_by_libtool_version" && \
- func_fatal_error "invalid libtool wrapper script \`$wrapper'"
-
- finalize=yes
- for lib in $notinst_deplibs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- func_source "$lib"
- fi
- libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- func_warning "\`$lib' has not been installed in \`$libdir'"
- finalize=no
- fi
- done
-
- relink_command=
- func_source "$wrapper"
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- $opt_dry_run || {
- if test "$finalize" = yes; then
- tmpdir=`func_mktempdir`
- func_basename "$file$stripped_ext"
- file="$func_basename_result"
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
- $opt_silent || {
- func_quote_for_expand "$relink_command"
- eval "func_echo $func_quote_for_expand_result"
- }
- if eval "$relink_command"; then :
- else
- func_error "error: relink \`$file' with the above command before installing it"
- $opt_dry_run || ${RM}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- func_warning "cannot relink \`$file'"
- fi
- }
- else
- # Install the binary that we compiled earlier.
- file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
- # remove .exe since cygwin /usr/bin/install will append another
- # one anyway
- case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
- case $file:$destfile in
- *.exe:*.exe)
- # this is ok
- ;;
- *.exe:*)
- destfile=$destfile.exe
- ;;
- *:*.exe)
- func_stripname '' '.exe' "$destfile"
- destfile=$func_stripname_result
- ;;
- esac
- ;;
- esac
- func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
- $opt_dry_run || if test -n "$outputname"; then
- ${RM}r "$tmpdir"
- fi
- ;;
- esac
- done
-
- for file in $staticlibs; do
- func_basename "$file"
- name="$func_basename_result"
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
-
- if test -n "$stripme" && test -n "$old_striplib"; then
- func_show_eval "$old_striplib $oldlib" 'exit $?'
- fi
-
- # Do each command in the postinstall commands.
- func_execute_cmds "$old_postinstall_cmds" 'exit $?'
- done
-
- test -n "$future_libdirs" && \
- func_warning "remember to run \`$progname --finish$future_libdirs'"
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- $opt_dry_run && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
- else
- exit $EXIT_SUCCESS
- fi
-}
-
-test "$mode" = install && func_mode_install ${1+"$@"}
-
-
-# func_generate_dlsyms outputname originator pic_p
-# Extract symbols from dlprefiles and create ${outputname}S.o with
-# a dlpreopen symbol table.
-func_generate_dlsyms ()
-{
- $opt_debug
- my_outputname="$1"
- my_originator="$2"
- my_pic_p="${3-no}"
- my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
- my_dlsyms=
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- my_dlsyms="${my_outputname}S.c"
- else
- func_error "not configured to extract global symbols from dlpreopened files"
- fi
- fi
-
- if test -n "$my_dlsyms"; then
- case $my_dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${my_outputname}.nm"
-
- func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
-
- # Parse the name list into a source file.
- func_verbose "creating $output_objdir/$my_dlsyms"
-
- $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- func_verbose "generating symbol list for \`$output'"
-
- $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
-
- # Add our own program objects to the symbol list.
- progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- for progfile in $progfiles; do
- func_verbose "extracting global C symbols from \`$progfile'"
- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $opt_dry_run || {
- eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- if test -n "$export_symbols_regex"; then
- $opt_dry_run || {
- eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$outputname.exp"
- $opt_dry_run || {
- $RM $export_symbols
- eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- else
- $opt_dry_run || {
- eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
- eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- case $host in
- *cygwin | *mingw* | *cegcc* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- fi
- fi
-
- for dlprefile in $dlprefiles; do
- func_verbose "extracting global C symbols from \`$dlprefile'"
- func_basename "$dlprefile"
- name="$func_basename_result"
- $opt_dry_run || {
- eval '$ECHO ": $name " >> "$nlist"'
- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
- }
- done
-
- $opt_dry_run || {
- # Make sure we have at least an empty file.
- test -f "$nlist" || : > "$nlist"
-
- if test -n "$exclude_expsyms"; then
- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
- $MV "$nlist"T "$nlist"
- fi
-
- # Try sorting and uniquifying the output.
- if $GREP -v "^: " < "$nlist" |
- if sort -k 3 </dev/null >/dev/null 2>&1; then
- sort -k 3
- else
- sort +2
- fi |
- uniq > "$nlist"S; then
- :
- else
- $GREP -v "^: " < "$nlist" > "$nlist"S
- fi
-
- if test -f "$nlist"S; then
- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
- else
- $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
- fi
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-
-/* The mapping between symbol names and symbols. */
-typedef struct {
- const char *name;
- void *address;
-} lt_dlsymlist;
-"
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
- runtime relocations are performed -- see ld's documentation
- on pseudo-relocs. */"
- lt_dlsym_const= ;;
- *osf5*)
- echo >> "$output_objdir/$my_dlsyms" "\
-/* This system does not cope well with relocations in const data */"
- lt_dlsym_const= ;;
- *)
- lt_dlsym_const=const ;;
- esac
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-extern $lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
-$lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
- { \"$my_originator\", (void *) 0 },"
-
- case $need_lib_prefix in
- no)
- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
- ;;
- *)
- eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
- ;;
- esac
- $ECHO >> "$output_objdir/$my_dlsyms" "\
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_${my_prefix}_LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- } # !$opt_dry_run
-
- pic_flag_for_symtable=
- case "$compile_command " in
- *" -static "*) ;;
- *)
- case $host in
- # compiling the symbol table file with pic_flag works around
- # a FreeBSD bug that causes programs to crash when -lm is
- # linked before any other PIC object. But we must not use
- # pic_flag when linking with -static. The problem exists in
- # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
- pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
- *-*-hpux*)
- pic_flag_for_symtable=" $pic_flag" ;;
- *)
- if test "X$my_pic_p" != Xno; then
- pic_flag_for_symtable=" $pic_flag"
- fi
- ;;
- esac
- ;;
- esac
- symtab_cflags=
- for arg in $LTCFLAGS; do
- case $arg in
- -pie | -fpie | -fPIE) ;;
- *) symtab_cflags="$symtab_cflags $arg" ;;
- esac
- done
-
- # Now compile the dynamic symbol file.
- func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
-
- # Clean up the generated files.
- func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
-
- # Transform the symbol file into the correct name.
- symfileobj="$output_objdir/${my_outputname}S.$objext"
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- if test -f "$output_objdir/$my_outputname.def"; then
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- else
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- fi
- ;;
- *)
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- ;;
- esac
- ;;
- *)
- func_fatal_error "unknown suffix for \`$my_dlsyms'"
- ;;
- esac
- else
- # We keep going just in case the user didn't refer to
- # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
-
- # Nullify the symbol file.
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
- fi
-}
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
-{
- $opt_debug
- win32_libid_type="unknown"
- win32_fileres=`file -L $1 2>/dev/null`
- case $win32_fileres in
- *ar\ archive\ import\ library*) # definitely import
- win32_libid_type="x86 archive import"
- ;;
- *ar\ archive*) # could be an import, or static
- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
- $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
- win32_nmres=`eval $NM -f posix -A $1 |
- $SED -n -e '
- 1,100{
- / I /{
- s,.*,import,
- p
- q
- }
- }'`
- case $win32_nmres in
- import*) win32_libid_type="x86 archive import";;
- *) win32_libid_type="x86 archive static";;
- esac
- fi
- ;;
- *DLL*)
- win32_libid_type="x86 DLL"
- ;;
- *executable*) # but shell scripts are "executable" too...
- case $win32_fileres in
- *MS\ Windows\ PE\ Intel*)
- win32_libid_type="x86 DLL"
- ;;
- esac
- ;;
- esac
- $ECHO "$win32_libid_type"
-}
-
-
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
- $opt_debug
- f_ex_an_ar_dir="$1"; shift
- f_ex_an_ar_oldlib="$1"
- func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
- if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
- fi
-}
-
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
- $opt_debug
- my_gentop="$1"; shift
- my_oldlibs=${1+"$@"}
- my_oldobjs=""
- my_xlib=""
- my_xabs=""
- my_xdir=""
-
- for my_xlib in $my_oldlibs; do
- # Extract the objects.
- case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
- *) my_xabs=`pwd`"/$my_xlib" ;;
- esac
- func_basename "$my_xlib"
- my_xlib="$func_basename_result"
- my_xlib_u=$my_xlib
- while :; do
- case " $extracted_archives " in
- *" $my_xlib_u "*)
- func_arith $extracted_serial + 1
- extracted_serial=$func_arith_result
- my_xlib_u=lt$extracted_serial-$my_xlib ;;
- *) break ;;
- esac
- done
- extracted_archives="$extracted_archives $my_xlib_u"
- my_xdir="$my_gentop/$my_xlib_u"
-
- func_mkdir_p "$my_xdir"
-
- case $host in
- *-darwin*)
- func_verbose "Extracting $my_xabs"
- # Do not bother doing anything if just a dry run
- $opt_dry_run || {
- darwin_orig_dir=`pwd`
- cd $my_xdir || exit $?
- darwin_archive=$my_xabs
- darwin_curdir=`pwd`
- darwin_base_archive=`basename "$darwin_archive"`
- darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
- if test -n "$darwin_arches"; then
- darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
- darwin_arch=
- func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches ; do
- func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
- cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- func_extract_an_archive "`pwd`" "${darwin_base_archive}"
- cd "$darwin_curdir"
- $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
- done # $darwin_arches
- ## Okay now we've a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
- darwin_file=
- darwin_files=
- for darwin_file in $darwin_filelist; do
- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
- $LIPO -create -output "$darwin_file" $darwin_files
- done # $darwin_filelist
- $RM -rf unfat-$$
- cd "$darwin_orig_dir"
- else
- cd $darwin_orig_dir
- func_extract_an_archive "$my_xdir" "$my_xabs"
- fi # $darwin_arches
- } # !$opt_dry_run
- ;;
- *)
- func_extract_an_archive "$my_xdir" "$my_xabs"
- ;;
- esac
- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
-
- func_extract_archives_result="$my_oldobjs"
-}
-
-
-
-# func_emit_wrapper_part1 [arg=no]
-#
-# Emit the first part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part1 ()
-{
- func_emit_wrapper_part1_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_part1_arg1=$1
- fi
-
- $ECHO "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# Be Bourne compatible
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variables:
- generated_by_libtool_version='$macro_version'
- notinst_deplibs='$notinst_deplibs'
-else
- # When we are sourced in execute mode, \$file and \$ECHO are already set.
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- ECHO=\"$qecho\"
- file=\"\$0\"
- # Make sure echo works.
- if test \"X\$1\" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
- elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
- # Yippee, \$ECHO works!
- :
- else
- # Restart under the correct shell, and then maybe \$ECHO will work.
- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
- fi
- fi\
-"
- $ECHO "\
-
- # Find the directory that this script lives in.
- thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
- test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
- # Follow symbolic links until we get to the real thisdir.
- file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
- while test -n \"\$file\"; do
- destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
- # If there was a directory component, then change thisdir.
- if test \"x\$destdir\" != \"x\$file\"; then
- case \"\$destdir\" in
- [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
- *) thisdir=\"\$thisdir/\$destdir\" ;;
- esac
- fi
-
- file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
- file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
- done
-"
-}
-# end: func_emit_wrapper_part1
-
-# func_emit_wrapper_part2 [arg=no]
-#
-# Emit the second part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part2 ()
-{
- func_emit_wrapper_part2_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_part2_arg1=$1
- fi
-
- $ECHO "\
-
- # Usually 'no', except on cygwin/mingw when embedded into
- # the cwrapper.
- WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
- if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
- # special case for '.'
- if test \"\$thisdir\" = \".\"; then
- thisdir=\`pwd\`
- fi
- # remove .libs from thisdir
- case \"\$thisdir\" in
- *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
- $objdir ) thisdir=. ;;
- esac
- fi
-
- # Try to get the absolute directory name.
- absdir=\`cd \"\$thisdir\" && pwd\`
- test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
- if test "$fast_install" = yes; then
- $ECHO "\
- program=lt-'$outputname'$exeext
- progdir=\"\$thisdir/$objdir\"
-
- if test ! -f \"\$progdir/\$program\" ||
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
- test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
- file=\"\$\$-\$program\"
-
- if test ! -d \"\$progdir\"; then
- $MKDIR \"\$progdir\"
- else
- $RM \"\$progdir/\$file\"
- fi"
-
- $ECHO "\
-
- # relink executable if necessary
- if test -n \"\$relink_command\"; then
- if relink_command_output=\`eval \$relink_command 2>&1\`; then :
- else
- $ECHO \"\$relink_command_output\" >&2
- $RM \"\$progdir/\$file\"
- exit 1
- fi
- fi
-
- $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
- { $RM \"\$progdir/\$program\";
- $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
- $RM \"\$progdir/\$file\"
- fi"
- else
- $ECHO "\
- program='$outputname'
- progdir=\"\$thisdir/$objdir\"
-"
- fi
-
- $ECHO "\
-
- if test -f \"\$progdir/\$program\"; then"
-
- # Export our shlibpath_var if we have one.
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $ECHO "\
- # Add our own library path to $shlibpath_var
- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
- # Some systems cannot cope with colon-terminated $shlibpath_var
- # The second colon is a workaround for a bug in BeOS R4 sed
- $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
- export $shlibpath_var
-"
- fi
-
- # fixup the dll searchpath if we need to.
- if test -n "$dllsearchpath"; then
- $ECHO "\
- # Add the dll search path components to the executable PATH
- PATH=$dllsearchpath:\$PATH
-"
- fi
-
- $ECHO "\
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- # Run the actual program with our arguments.
-"
- case $host in
- # Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2* | *-cegcc*)
- $ECHO "\
- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
- ;;
-
- *)
- $ECHO "\
- exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
- ;;
- esac
- $ECHO "\
- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
- exit 1
- fi
- else
- # The program doesn't exist.
- \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
- \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
- $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
- exit 1
- fi
-fi\
-"
-}
-# end: func_emit_wrapper_part2
-
-
-# func_emit_wrapper [arg=no]
-#
-# Emit a libtool wrapper script on stdout.
-# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable. Must ONLY be called from within
-# func_mode_link because it depends on a number of variables
-# set therein.
-#
-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take. If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the $objdir directory. This is a cygwin/mingw-specific
-# behavior.
-func_emit_wrapper ()
-{
- func_emit_wrapper_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_arg1=$1
- fi
-
- # split this up so that func_emit_cwrapperexe_src
- # can call each part independently.
- func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
- func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
-}
-
-
-# func_to_host_path arg
-#
-# Convert paths to host format when used with build tools.
-# Intended for use with "native" mingw (where libtool itself
-# is running under the msys shell), or in the following cross-
-# build environments:
-# $build $host
-# mingw (msys) mingw [e.g. native]
-# cygwin mingw
-# *nix + wine mingw
-# where wine is equipped with the `winepath' executable.
-# In the native mingw case, the (msys) shell automatically
-# converts paths for any non-msys applications it launches,
-# but that facility isn't available from inside the cwrapper.
-# Similar accommodations are necessary for $host mingw and
-# $build cygwin. Calling this function does no harm for other
-# $host/$build combinations not listed above.
-#
-# ARG is the path (on $build) that should be converted to
-# the proper representation for $host. The result is stored
-# in $func_to_host_path_result.
-func_to_host_path ()
-{
- func_to_host_path_result="$1"
- if test -n "$1" ; then
- case $host in
- *mingw* )
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
- case $build in
- *mingw* ) # actually, msys
- # awkward: cmd appends spaces to result
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
- func_to_host_path_tmp1=`( cmd //c echo "$1" |\
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- *cygwin* )
- func_to_host_path_tmp1=`cygpath -w "$1"`
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- * )
- # Unfortunately, winepath does not exit with a non-zero
- # error code, so we are forced to check the contents of
- # stdout. On the other hand, if the command is not
- # found, the shell will set an exit code of 127 and print
- # *an error message* to stdout. So we must check for both
- # error code of zero AND non-empty stdout, which explains
- # the odd construction:
- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- else
- # Allow warning below.
- func_to_host_path_result=""
- fi
- ;;
- esac
- if test -z "$func_to_host_path_result" ; then
- func_error "Could not determine host path corresponding to"
- func_error " '$1'"
- func_error "Continuing, but uninstalled executables may not work."
- # Fallback:
- func_to_host_path_result="$1"
- fi
- ;;
- esac
- fi
-}
-# end: func_to_host_path
-
-# func_to_host_pathlist arg
-#
-# Convert pathlists to host format when used with build tools.
-# See func_to_host_path(), above. This function supports the
-# following $build/$host combinations (but does no harm for
-# combinations not listed here):
-# $build $host
-# mingw (msys) mingw [e.g. native]
-# cygwin mingw
-# *nix + wine mingw
-#
-# Path separators are also converted from $build format to
-# $host format. If ARG begins or ends with a path separator
-# character, it is preserved (but converted to $host format)
-# on output.
-#
-# ARG is a pathlist (on $build) that should be converted to
-# the proper representation on $host. The result is stored
-# in $func_to_host_pathlist_result.
-func_to_host_pathlist ()
-{
- func_to_host_pathlist_result="$1"
- if test -n "$1" ; then
- case $host in
- *mingw* )
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
- # Remove leading and trailing path separator characters from
- # ARG. msys behavior is inconsistent here, cygpath turns them
- # into '.;' and ';.', and winepath ignores them completely.
- func_to_host_pathlist_tmp2="$1"
- # Once set for this call, this variable should not be
- # reassigned. It is used in tha fallback case.
- func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e 's|^:*||' -e 's|:*$||'`
- case $build in
- *mingw* ) # Actually, msys.
- # Awkward: cmd appends spaces to result.
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
- func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- *cygwin* )
- func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- * )
- # unfortunately, winepath doesn't convert pathlists
- func_to_host_pathlist_result=""
- func_to_host_pathlist_oldIFS=$IFS
- IFS=:
- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
- IFS=$func_to_host_pathlist_oldIFS
- if test -n "$func_to_host_pathlist_f" ; then
- func_to_host_path "$func_to_host_pathlist_f"
- if test -n "$func_to_host_path_result" ; then
- if test -z "$func_to_host_pathlist_result" ; then
- func_to_host_pathlist_result="$func_to_host_path_result"
- else
- func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
- fi
- fi
- fi
- IFS=:
- done
- IFS=$func_to_host_pathlist_oldIFS
- ;;
- esac
- if test -z "$func_to_host_pathlist_result" ; then
- func_error "Could not determine the host path(s) corresponding to"
- func_error " '$1'"
- func_error "Continuing, but uninstalled executables may not work."
- # Fallback. This may break if $1 contains DOS-style drive
- # specifications. The fix is not to complicate the expression
- # below, but for the user to provide a working wine installation
- # with winepath so that path translation in the cross-to-mingw
- # case works properly.
- lt_replace_pathsep_nix_to_dos="s|:|;|g"
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
- $SED -e "$lt_replace_pathsep_nix_to_dos"`
- fi
- # Now, add the leading and trailing path separators back
- case "$1" in
- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
- ;;
- esac
- case "$1" in
- *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
- ;;
- esac
- ;;
- esac
- fi
-}
-# end: func_to_host_pathlist
-
-# func_emit_cwrapperexe_src
-# emit the source code for a wrapper executable on stdout
-# Must ONLY be called from within func_mode_link because
-# it depends on a number of variable set therein.
-func_emit_cwrapperexe_src ()
-{
- cat <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-
- The $output program cannot be directly executed until all the libtool
- libraries that it depends on are installed.
-
- This wrapper executable should never be moved out of the build directory.
- If it is, it will not operate correctly.
-
- Currently, it simply execs the wrapper *script* "$SHELL $output",
- but could eventually absorb all of the scripts functionality and
- exec $objdir/$outputname directly.
-*/
-EOF
- cat <<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef _MSC_VER
-# include <direct.h>
-# include <process.h>
-# include <io.h>
-# define setmode _setmode
-#else
-# include <unistd.h>
-# include <stdint.h>
-# ifdef __CYGWIN__
-# include <io.h>
-# define HAVE_SETENV
-# ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-# endif
-# endif
-#endif
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef S_IXOTH
-# define S_IXOTH 0
-#endif
-#ifndef S_IXGRP
-# define S_IXGRP 0
-#endif
-
-#ifdef _MSC_VER
-# define S_IXUSR _S_IEXEC
-# define stat _stat
-# ifndef _INTPTR_T_DEFINED
-# define intptr_t int
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# define FOPEN_WB "wb"
-# ifndef DIR_SEPARATOR_2
-# define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-# define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
- (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
-#ifdef __CYGWIN__
-# define FOPEN_WB "wb"
-#endif
-
-#ifndef FOPEN_WB
-# define FOPEN_WB "w"
-#endif
-#ifndef _O_BINARY
-# define _O_BINARY 0
-#endif
-
-#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
- if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-#undef LTWRAPPER_DEBUGPRINTF
-#if defined DEBUGWRAPPER
-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
-static void
-ltwrapper_debugprintf (const char *fmt, ...)
-{
- va_list args;
- va_start (args, fmt);
- (void) vfprintf (stderr, fmt, args);
- va_end (args);
-}
-#else
-# define LTWRAPPER_DEBUGPRINTF(args)
-#endif
-
-const char *program_name = NULL;
-
-void *xmalloc (size_t num);
-char *xstrdup (const char *string);
-const char *base_name (const char *name);
-char *find_executable (const char *wrapper);
-char *chase_symlinks (const char *pathspec);
-int make_executable (const char *path);
-int check_executable (const char *path);
-char *strendzap (char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-void lt_setenv (const char *name, const char *value);
-char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
-void lt_update_exe_path (const char *name, const char *value);
-void lt_update_lib_path (const char *name, const char *value);
-
-static const char *script_text_part1 =
-EOF
-
- func_emit_wrapper_part1 yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ "/' -e 's/$/\\n"/'
- echo ";"
- cat <<EOF
-
-static const char *script_text_part2 =
-EOF
- func_emit_wrapper_part2 yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ "/' -e 's/$/\\n"/'
- echo ";"
-
- cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
-const char * LIB_PATH_VARNAME = "$shlibpath_var";
-EOF
-
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- func_to_host_pathlist "$temp_rpath"
- cat <<EOF
-const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
-EOF
- else
- cat <<"EOF"
-const char * LIB_PATH_VALUE = "";
-EOF
- fi
-
- if test -n "$dllsearchpath"; then
- func_to_host_pathlist "$dllsearchpath:"
- cat <<EOF
-const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
-EOF
- else
- cat <<"EOF"
-const char * EXE_PATH_VARNAME = "";
-const char * EXE_PATH_VALUE = "";
-EOF
- fi
-
- if test "$fast_install" = yes; then
- cat <<EOF
-const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
-EOF
- else
- cat <<EOF
-const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
-EOF
- fi
-
-
- cat <<"EOF"
-
-#define LTWRAPPER_OPTION_PREFIX "--lt-"
-#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
-
-static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
-static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-
-static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
-
-static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
- /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
- /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
- /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
-
-int
-main (int argc, char *argv[])
-{
- char **newargz;
- int newargc;
- char *tmp_pathspec;
- char *actual_cwrapper_path;
- char *actual_cwrapper_name;
- char *target_name;
- char *lt_argv_zero;
- intptr_t rval = 127;
-
- int i;
-
- program_name = (char *) xstrdup (base_name (argv[0]));
- LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
- LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
-
- /* very simple arg parsing; don't want to rely on getopt */
- for (i = 1; i < argc; i++)
- {
- if (strcmp (argv[i], dumpscript_opt) == 0)
- {
-EOF
- case "$host" in
- *mingw* | *cygwin* )
- # make stdout use "unix" line endings
- echo " setmode(1,_O_BINARY);"
- ;;
- esac
-
- cat <<"EOF"
- printf ("%s", script_text_part1);
- printf ("%s", script_text_part2);
- return 0;
- }
- }
-
- newargz = XMALLOC (char *, argc + 1);
- tmp_pathspec = find_executable (argv[0]);
- if (tmp_pathspec == NULL)
- lt_fatal ("Couldn't find %s", argv[0]);
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
- tmp_pathspec));
-
- actual_cwrapper_path = chase_symlinks (tmp_pathspec);
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
- actual_cwrapper_path));
- XFREE (tmp_pathspec);
-
- actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
- strendzap (actual_cwrapper_path, actual_cwrapper_name);
-
- /* wrapper name transforms */
- strendzap (actual_cwrapper_name, ".exe");
- tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
- XFREE (actual_cwrapper_name);
- actual_cwrapper_name = tmp_pathspec;
- tmp_pathspec = 0;
-
- /* target_name transforms -- use actual target program name; might have lt- prefix */
- target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
- strendzap (target_name, ".exe");
- tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
- XFREE (target_name);
- target_name = tmp_pathspec;
- tmp_pathspec = 0;
-
- LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
- target_name));
-EOF
-
- cat <<EOF
- newargz[0] =
- XMALLOC (char, (strlen (actual_cwrapper_path) +
- strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
- strcpy (newargz[0], actual_cwrapper_path);
- strcat (newargz[0], "$objdir");
- strcat (newargz[0], "/");
-EOF
-
- cat <<"EOF"
- /* stop here, and copy so we don't have to do this twice */
- tmp_pathspec = xstrdup (newargz[0]);
-
- /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
- strcat (newargz[0], actual_cwrapper_name);
-
- /* DO want the lt- prefix here if it exists, so use target_name */
- lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
- XFREE (tmp_pathspec);
- tmp_pathspec = NULL;
-EOF
-
- case $host_os in
- mingw*)
- cat <<"EOF"
- {
- char* p;
- while ((p = strchr (newargz[0], '\\')) != NULL)
- {
- *p = '/';
- }
- while ((p = strchr (lt_argv_zero, '\\')) != NULL)
- {
- *p = '/';
- }
- }
-EOF
- ;;
- esac
-
- cat <<"EOF"
- XFREE (target_name);
- XFREE (actual_cwrapper_path);
- XFREE (actual_cwrapper_name);
-
- lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
- lt_setenv ("DUALCASE", "1"); /* for MSK sh */
- lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
- lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
-
- newargc=0;
- for (i = 1; i < argc; i++)
- {
- if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
- {
- if (argv[i][env_set_opt_len] == '=')
- {
- const char *p = argv[i] + env_set_opt_len + 1;
- lt_opt_process_env_set (p);
- }
- else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_set (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_set_opt);
- continue;
- }
- if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
- {
- if (argv[i][env_prepend_opt_len] == '=')
- {
- const char *p = argv[i] + env_prepend_opt_len + 1;
- lt_opt_process_env_prepend (p);
- }
- else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_prepend (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_prepend_opt);
- continue;
- }
- if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
- {
- if (argv[i][env_append_opt_len] == '=')
- {
- const char *p = argv[i] + env_append_opt_len + 1;
- lt_opt_process_env_append (p);
- }
- else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_append (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_append_opt);
- continue;
- }
- if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
- {
- /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
- namespace, but it is not one of the ones we know about and
- have already dealt with, above (inluding dump-script), then
- report an error. Otherwise, targets might begin to believe
- they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
- namespace. The first time any user complains about this, we'll
- need to make LTWRAPPER_OPTION_PREFIX a configure-time option
- or a configure.ac-settable value.
- */
- lt_fatal ("Unrecognized option in %s namespace: '%s'",
- ltwrapper_option_prefix, argv[i]);
- }
- /* otherwise ... */
- newargz[++newargc] = xstrdup (argv[i]);
- }
- newargz[++newargc] = NULL;
-
- LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
- for (i = 0; i < newargc; i++)
- {
- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
- }
-
-EOF
-
- case $host_os in
- mingw*)
- cat <<"EOF"
- /* execv doesn't actually work on mingw as expected on unix */
- rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
- if (rval == -1)
- {
- /* failed to start process */
- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
- return 127;
- }
- return rval;
-EOF
- ;;
- *)
- cat <<"EOF"
- execv (lt_argv_zero, newargz);
- return rval; /* =127, but avoids unused variable warning */
-EOF
- ;;
- esac
-
- cat <<"EOF"
-}
-
-void *
-xmalloc (size_t num)
-{
- void *p = (void *) malloc (num);
- if (!p)
- lt_fatal ("Memory exhausted");
-
- return p;
-}
-
-char *
-xstrdup (const char *string)
-{
- return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
- string) : NULL;
-}
-
-const char *
-base_name (const char *name)
-{
- const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- /* Skip over the disk name in MSDOS pathnames. */
- if (isalpha ((unsigned char) name[0]) && name[1] == ':')
- name += 2;
-#endif
-
- for (base = name; *name; name++)
- if (IS_DIR_SEPARATOR (*name))
- base = name + 1;
- return base;
-}
-
-int
-check_executable (const char *path)
-{
- struct stat st;
-
- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
- path ? (*path ? path : "EMPTY!") : "NULL!"));
- if ((!path) || (!*path))
- return 0;
-
- if ((stat (path, &st) >= 0)
- && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
- return 1;
- else
- return 0;
-}
-
-int
-make_executable (const char *path)
-{
- int rval = 0;
- struct stat st;
-
- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
- path ? (*path ? path : "EMPTY!") : "NULL!"));
- if ((!path) || (!*path))
- return 0;
-
- if (stat (path, &st) >= 0)
- {
- rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
- }
- return rval;
-}
-
-/* Searches for the full path of the wrapper. Returns
- newly allocated full path name if found, NULL otherwise
- Does not chase symlinks, even on platforms that support them.
-*/
-char *
-find_executable (const char *wrapper)
-{
- int has_slash = 0;
- const char *p;
- const char *p_next;
- /* static buffer for getcwd */
- char tmp[LT_PATHMAX + 1];
- int tmp_len;
- char *concat_name;
-
- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
-
- if ((wrapper == NULL) || (*wrapper == '\0'))
- return NULL;
-
- /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
- {
- concat_name = xstrdup (wrapper);
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
- else
- {
-#endif
- if (IS_DIR_SEPARATOR (wrapper[0]))
- {
- concat_name = xstrdup (wrapper);
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- }
-#endif
-
- for (p = wrapper; *p; p++)
- if (*p == '/')
- {
- has_slash = 1;
- break;
- }
- if (!has_slash)
- {
- /* no slashes; search PATH */
- const char *path = getenv ("PATH");
- if (path != NULL)
- {
- for (p = path; *p; p = p_next)
- {
- const char *q;
- size_t p_len;
- for (q = p; *q; q++)
- if (IS_PATH_SEPARATOR (*q))
- break;
- p_len = q - p;
- p_next = (*q == '\0' ? q : q + 1);
- if (p_len == 0)
- {
- /* empty path: current directory */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen (tmp);
- concat_name =
- XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
- }
- else
- {
- concat_name =
- XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, p, p_len);
- concat_name[p_len] = '/';
- strcpy (concat_name + p_len + 1, wrapper);
- }
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
- }
- /* not found in PATH; assume curdir */
- }
- /* Relative path | not found in path: prepend cwd */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen (tmp);
- concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
-
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- return NULL;
-}
-
-char *
-chase_symlinks (const char *pathspec)
-{
-#ifndef S_ISLNK
- return xstrdup (pathspec);
-#else
- char buf[LT_PATHMAX];
- struct stat s;
- char *tmp_pathspec = xstrdup (pathspec);
- char *p;
- int has_symlinks = 0;
- while (strlen (tmp_pathspec) && !has_symlinks)
- {
- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
- tmp_pathspec));
- if (lstat (tmp_pathspec, &s) == 0)
- {
- if (S_ISLNK (s.st_mode) != 0)
- {
- has_symlinks = 1;
- break;
- }
-
- /* search backwards for last DIR_SEPARATOR */
- p = tmp_pathspec + strlen (tmp_pathspec) - 1;
- while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
- p--;
- if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
- {
- /* no more DIR_SEPARATORS left */
- break;
- }
- *p = '\0';
- }
- else
- {
- char *errstr = strerror (errno);
- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
- }
- }
- XFREE (tmp_pathspec);
-
- if (!has_symlinks)
- {
- return xstrdup (pathspec);
- }
-
- tmp_pathspec = realpath (pathspec, buf);
- if (tmp_pathspec == 0)
- {
- lt_fatal ("Could not follow symlinks for %s", pathspec);
- }
- return xstrdup (tmp_pathspec);
-#endif
-}
-
-char *
-strendzap (char *str, const char *pat)
-{
- size_t len, patlen;
-
- assert (str != NULL);
- assert (pat != NULL);
-
- len = strlen (str);
- patlen = strlen (pat);
-
- if (patlen <= len)
- {
- str += len - patlen;
- if (strcmp (str, pat) == 0)
- *str = '\0';
- }
- return str;
-}
-
-static void
-lt_error_core (int exit_status, const char *mode,
- const char *message, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", program_name, mode);
- vfprintf (stderr, message, ap);
- fprintf (stderr, ".\n");
-
- if (exit_status >= 0)
- exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
- va_end (ap);
-}
-
-void
-lt_setenv (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
- {
-#ifdef HAVE_SETENV
- /* always make a copy, for consistency with !HAVE_SETENV */
- char *str = xstrdup (value);
- setenv (name, str, 1);
-#else
- int len = strlen (name) + 1 + strlen (value) + 1;
- char *str = XMALLOC (char, len);
- sprintf (str, "%s=%s", name, value);
- if (putenv (str) != EXIT_SUCCESS)
- {
- XFREE (str);
- }
-#endif
- }
-}
-
-char *
-lt_extend_str (const char *orig_value, const char *add, int to_end)
-{
- char *new_value;
- if (orig_value && *orig_value)
- {
- int orig_value_len = strlen (orig_value);
- int add_len = strlen (add);
- new_value = XMALLOC (char, add_len + orig_value_len + 1);
- if (to_end)
- {
- strcpy (new_value, orig_value);
- strcpy (new_value + orig_value_len, add);
- }
- else
- {
- strcpy (new_value, add);
- strcpy (new_value + add_len, orig_value);
- }
- }
- else
- {
- new_value = xstrdup (add);
- }
- return new_value;
-}
-
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
- const char *p;
- int len;
- if (!arg || !*arg)
- return 1;
-
- p = strchr (arg, (int)'=');
-
- if (!p)
- return 1;
-
- *value = xstrdup (++p);
-
- len = strlen (arg) - strlen (*value);
- *name = XMALLOC (char, len);
- strncpy (*name, arg, len-1);
- (*name)[len - 1] = '\0';
-
- return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
- }
-
- lt_setenv (name, value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
- char *new_value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
- }
-
- new_value = lt_extend_str (getenv (name), value, 0);
- lt_setenv (name, new_value);
- XFREE (new_value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
- char *new_value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
- }
-
- new_value = lt_extend_str (getenv (name), value, 1);
- lt_setenv (name, new_value);
- XFREE (new_value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_update_exe_path (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
-
- if (name && *name && value && *value)
- {
- char *new_value = lt_extend_str (getenv (name), value, 0);
- /* some systems can't cope with a ':'-terminated path #' */
- int len = strlen (new_value);
- while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
- {
- new_value[len-1] = '\0';
- }
- lt_setenv (name, new_value);
- XFREE (new_value);
- }
-}
-
-void
-lt_update_lib_path (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
-
- if (name && *name && value && *value)
- {
- char *new_value = lt_extend_str (getenv (name), value, 0);
- lt_setenv (name, new_value);
- XFREE (new_value);
- }
-}
-
-
-EOF
-}
-# end: func_emit_cwrapperexe_src
-
-# func_mode_link arg...
-func_mode_link ()
-{
- $opt_debug
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- # It is impossible to link a dll without this setting, and
- # we shouldn't force the makefile maintainer to figure out
- # which system we are compiling for in order to pass an extra
- # flag for every libtool invocation.
- # allow_undefined=no
-
- # FIXME: Unfortunately, there are problems with the above when trying
- # to make a dll which has undefined symbols, in which case not
- # even a static library is built. For now, we need to specify
- # -no-undefined on the libtool link line when we can be certain
- # that all symbols are satisfied, otherwise we get a static library.
- allow_undefined=yes
- ;;
- *)
- allow_undefined=yes
- ;;
- esac
- libtool_args=$nonopt
- base_compile="$nonopt $@"
- compile_command=$nonopt
- finalize_command=$nonopt
-
- compile_rpath=
- finalize_rpath=
- compile_shlibpath=
- finalize_shlibpath=
- convenience=
- old_convenience=
- deplibs=
- old_deplibs=
- compiler_flags=
- linker_flags=
- dllsearchpath=
- lib_search_path=`pwd`
- inst_prefix_dir=
- new_inherited_linker_flags=
-
- avoid_version=no
- dlfiles=
- dlprefiles=
- dlself=no
- export_dynamic=no
- export_symbols=
- export_symbols_regex=
- generated=
- libobjs=
- ltlibs=
- module=no
- no_install=no
- objs=
- non_pic_objects=
- precious_files_regex=
- prefer_static_libs=no
- preload=no
- prev=
- prevarg=
- release=
- rpath=
- xrpath=
- perm_rpath=
- temp_rpath=
- thread_safe=no
- vinfo=
- vinfo_number=no
- weak_libs=
- single_module="${wl}-single_module"
- func_infer_tag $base_compile
-
- # We need to know -static, to get the right output filenames.
- for arg
- do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- break
- ;;
- -all-static | -static | -static-libtool-libs)
- case $arg in
- -all-static)
- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- func_warning "complete static linking is impossible in this configuration"
- fi
- if test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- -static)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=built
- ;;
- -static-libtool-libs)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- esac
- build_libtool_libs=no
- build_old_libs=yes
- break
- ;;
- esac
- done
-
- # See if our shared archives depend on static archives.
- test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
- # Go through the arguments, transforming them on the way.
- while test "$#" -gt 0; do
- arg="$1"
- shift
- func_quote_for_eval "$arg"
- qarg=$func_quote_for_eval_unquoted_result
- func_append libtool_args " $func_quote_for_eval_result"
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- output)
- func_append compile_command " @OUTPUT@"
- func_append finalize_command " @OUTPUT@"
- ;;
- esac
-
- case $prev in
- dlfiles|dlprefiles)
- if test "$preload" = no; then
- # Add the symbol object into the linking commands.
- func_append compile_command " @SYMFILE@"
- func_append finalize_command " @SYMFILE@"
- preload=yes
- fi
- case $arg in
- *.la | *.lo) ;; # We handle these cases below.
- force)
- if test "$dlself" = no; then
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- self)
- if test "$prev" = dlprefiles; then
- dlself=yes
- elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
- dlself=yes
- else
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- *)
- if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
- else
- dlprefiles="$dlprefiles $arg"
- fi
- prev=
- continue
- ;;
- esac
- ;;
- expsyms)
- export_symbols="$arg"
- test -f "$arg" \
- || func_fatal_error "symbol file \`$arg' does not exist"
- prev=
- continue
- ;;
- expsyms_regex)
- export_symbols_regex="$arg"
- prev=
- continue
- ;;
- framework)
- case $host in
- *-*-darwin*)
- case "$deplibs " in
- *" $qarg.ltframework "*) ;;
- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
- ;;
- esac
- ;;
- esac
- prev=
- continue
- ;;
- inst_prefix)
- inst_prefix_dir="$arg"
- prev=
- continue
- ;;
- objectlist)
- if test -f "$arg"; then
- save_arg=$arg
- moreargs=
- for fil in `cat "$save_arg"`
- do
-# moreargs="$moreargs $fil"
- arg=$fil
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- func_append libobjs " $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- func_append non_pic_objects " $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- func_lo2o "$arg"
- pic_object=$xdir$objdir/$func_lo2o_result
- non_pic_object=$xdir$func_lo2o_result
- func_append libobjs " $pic_object"
- func_append non_pic_objects " $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- fi
- done
- else
- func_fatal_error "link input file \`$arg' does not exist"
- fi
- arg=$save_arg
- prev=
- continue
- ;;
- precious_regex)
- precious_files_regex="$arg"
- prev=
- continue
- ;;
- release)
- release="-$arg"
- prev=
- continue
- ;;
- rpath | xrpath)
- # We need an absolute path.
- case $arg in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- esac
- if test "$prev" = rpath; then
- case "$rpath " in
- *" $arg "*) ;;
- *) rpath="$rpath $arg" ;;
- esac
- else
- case "$xrpath " in
- *" $arg "*) ;;
- *) xrpath="$xrpath $arg" ;;
- esac
- fi
- prev=
- continue
- ;;
- shrext)
- shrext_cmds="$arg"
- prev=
- continue
- ;;
- weak)
- weak_libs="$weak_libs $arg"
- prev=
- continue
- ;;
- xcclinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $qarg"
- prev=
- func_append compile_command " $qarg"
- func_append finalize_command " $qarg"
- continue
- ;;
- xcompiler)
- compiler_flags="$compiler_flags $qarg"
- prev=
- func_append compile_command " $qarg"
- func_append finalize_command " $qarg"
- continue
- ;;
- xlinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $wl$qarg"
- prev=
- func_append compile_command " $wl$qarg"
- func_append finalize_command " $wl$qarg"
- continue
- ;;
- *)
- eval "$prev=\"\$arg\""
- prev=
- continue
- ;;
- esac
- fi # test -n "$prev"
-
- prevarg="$arg"
-
- case $arg in
- -all-static)
- if test -n "$link_static_flag"; then
- # See comment for -static flag below, for more details.
- func_append compile_command " $link_static_flag"
- func_append finalize_command " $link_static_flag"
- fi
- continue
- ;;
-
- -allow-undefined)
- # FIXME: remove this flag sometime in the future.
- func_fatal_error "\`-allow-undefined' must not be used because it is the default"
- ;;
-
- -avoid-version)
- avoid_version=yes
- continue
- ;;
-
- -dlopen)
- prev=dlfiles
- continue
- ;;
-
- -dlpreopen)
- prev=dlprefiles
- continue
- ;;
-
- -export-dynamic)
- export_dynamic=yes
- continue
- ;;
-
- -export-symbols | -export-symbols-regex)
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- func_fatal_error "more than one -exported-symbols argument is not allowed"
- fi
- if test "X$arg" = "X-export-symbols"; then
- prev=expsyms
- else
- prev=expsyms_regex
- fi
- continue
- ;;
-
- -framework)
- prev=framework
- continue
- ;;
-
- -inst-prefix-dir)
- prev=inst_prefix
- continue
- ;;
-
- # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
- # so, if we see these flags be careful not to treat them like -L
- -L[A-Z][A-Z]*:*)
- case $with_gcc/$host in
- no/*-*-irix* | /*-*-irix*)
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- ;;
- esac
- continue
- ;;
-
- -L*)
- func_stripname '-L' '' "$arg"
- dir=$func_stripname_result
- if test -z "$dir"; then
- if test "$#" -gt 0; then
- func_fatal_error "require no space between \`-L' and \`$1'"
- else
- func_fatal_error "need path for \`-L' option"
- fi
- fi
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- test -z "$absdir" && \
- func_fatal_error "cannot determine absolute directory name of \`$dir'"
- dir="$absdir"
- ;;
- esac
- case "$deplibs " in
- *" -L$dir "*) ;;
- *)
- deplibs="$deplibs -L$dir"
- lib_search_path="$lib_search_path $dir"
- ;;
- esac
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$dir:"*) ;;
- ::) dllsearchpath=$dir;;
- *) dllsearchpath="$dllsearchpath:$dir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- ::) dllsearchpath=$testbindir;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
- ;;
- esac
- continue
- ;;
-
- -l*)
- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
- # These systems don't actually have a C or math library (as such)
- continue
- ;;
- *-*-os2*)
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C and math libraries are in the System framework
- deplibs="$deplibs System.ltframework"
- continue
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- test "X$arg" = "X-lc" && continue
- ;;
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- esac
- fi
- deplibs="$deplibs $arg"
- continue
- ;;
-
- -module)
- module=yes
- continue
- ;;
-
- # Tru64 UNIX uses -model [arg] to determine the layout of C++
- # classes, name mangling, and exception handling.
- # Darwin uses the -arch flag to determine output architecture.
- -model|-arch|-isysroot)
- compiler_flags="$compiler_flags $arg"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- prev=xcompiler
- continue
- ;;
-
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
- compiler_flags="$compiler_flags $arg"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- case "$new_inherited_linker_flags " in
- *" $arg "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
- esac
- continue
- ;;
-
- -multi_module)
- single_module="${wl}-multi_module"
- continue
- ;;
-
- -no-fast-install)
- fast_install=no
- continue
- ;;
-
- -no-install)
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
- # The PATH hackery in wrapper scripts is required on Windows
- # and Darwin in order for the loader to find any dlls it needs.
- func_warning "\`-no-install' is ignored for $host"
- func_warning "assuming \`-no-fast-install' instead"
- fast_install=no
- ;;
- *) no_install=yes ;;
- esac
- continue
- ;;
-
- -no-undefined)
- allow_undefined=no
- continue
- ;;
-
- -objectlist)
- prev=objectlist
- continue
- ;;
-
- -o) prev=output ;;
-
- -precious-files-regex)
- prev=precious_regex
- continue
- ;;
-
- -release)
- prev=release
- continue
- ;;
-
- -rpath)
- prev=rpath
- continue
- ;;
-
- -R)
- prev=xrpath
- continue
- ;;
-
- -R*)
- func_stripname '-R' '' "$arg"
- dir=$func_stripname_result
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- esac
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- continue
- ;;
-
- -shared)
- # The effects of -shared are defined in a previous loop.
- continue
- ;;
-
- -shrext)
- prev=shrext
- continue
- ;;
-
- -static | -static-libtool-libs)
- # The effects of -static are defined in a previous loop.
- # We used to do the same as -all-static on platforms that
- # didn't have a PIC flag, but the assumption that the effects
- # would be equivalent was wrong. It would break on at least
- # Digital Unix and AIX.
- continue
- ;;
-
- -thread-safe)
- thread_safe=yes
- continue
- ;;
-
- -version-info)
- prev=vinfo
- continue
- ;;
-
- -version-number)
- prev=vinfo
- vinfo_number=yes
- continue
- ;;
-
- -weak)
- prev=weak
- continue
- ;;
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Wl,*)
- func_stripname '-Wl,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
- linker_flags="$linker_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
-
- -Xlinker)
- prev=xlinker
- continue
- ;;
-
- -XCClinker)
- prev=xcclinker
- continue
- ;;
-
- # -msg_* for osf cc
- -msg_*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
-
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m*, -t[45]*, -txscale* pass through architecture-specific
- # compiler args for GCC
- # -F/path gives path to uninstalled frameworks, gcc on darwin
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- compiler_flags="$compiler_flags $arg"
- continue
- ;;
-
- # Some other compiler flag.
- -* | +*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
-
- *.$objext)
- # A standard object.
- objs="$objs $arg"
- ;;
-
- *.lo)
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- func_append libobjs " $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- func_append non_pic_objects " $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- func_lo2o "$arg"
- pic_object=$xdir$objdir/$func_lo2o_result
- non_pic_object=$xdir$func_lo2o_result
- func_append libobjs " $pic_object"
- func_append non_pic_objects " $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- fi
- ;;
-
- *.$libext)
- # An archive.
- deplibs="$deplibs $arg"
- old_deplibs="$old_deplibs $arg"
- continue
- ;;
-
- *.la)
- # A libtool-controlled library.
-
- if test "$prev" = dlfiles; then
- # This library was specified with -dlopen.
- dlfiles="$dlfiles $arg"
- prev=
- elif test "$prev" = dlprefiles; then
- # The library was specified with -dlpreopen.
- dlprefiles="$dlprefiles $arg"
- prev=
- else
- deplibs="$deplibs $arg"
- fi
- continue
- ;;
-
- # Some other compiler argument.
- *)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
- esac # arg
-
- # Now actually substitute the argument into the commands.
- if test -n "$arg"; then
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- fi
- done # argument parsing loop
-
- test -n "$prev" && \
- func_fatal_help "the \`$prevarg' option requires an argument"
-
- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
- eval arg=\"$export_dynamic_flag_spec\"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- fi
-
- oldlibs=
- # calculate the name of the file, without its directory
- func_basename "$output"
- outputname="$func_basename_result"
- libobjs_save="$libobjs"
-
- if test -n "$shlibpath_var"; then
- # get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
- else
- shlib_search_path=
- fi
- eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
- eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
- func_dirname "$output" "/" ""
- output_objdir="$func_dirname_result$objdir"
- # Create the object directory.
- func_mkdir_p "$output_objdir"
-
- # Determine the type of output
- case $output in
- "")
- func_fatal_help "you must specify an output file"
- ;;
- *.$libext) linkmode=oldlib ;;
- *.lo | *.$objext) linkmode=obj ;;
- *.la) linkmode=lib ;;
- *) linkmode=prog ;; # Anything else should be a program.
- esac
-
- specialdeplibs=
-
- libs=
- # Find all interdependent deplibs by searching for libraries
- # that are linked more than once (e.g. -la -lb -la)
- for deplib in $deplibs; do
- if $opt_duplicate_deps ; then
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- libs="$libs $deplib"
- done
-
- if test "$linkmode" = lib; then
- libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
- # Compute libraries that are listed more than once in $predeps
- # $postdeps and mark them as special (i.e., whose duplicates are
- # not to be eliminated).
- pre_post_deps=
- if $opt_duplicate_compiler_generated_deps; then
- for pre_post_dep in $predeps $postdeps; do
- case "$pre_post_deps " in
- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
- esac
- pre_post_deps="$pre_post_deps $pre_post_dep"
- done
- fi
- pre_post_deps=
- fi
-
- deplibs=
- newdependency_libs=
- newlib_search_path=
- need_relink=no # whether we're linking any uninstalled libtool libraries
- notinst_deplibs= # not-installed libtool libraries
- notinst_path= # paths that contain not-installed libtool libraries
-
- case $linkmode in
- lib)
- passes="conv dlpreopen link"
- for file in $dlfiles $dlprefiles; do
- case $file in
- *.la) ;;
- *)
- func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
- ;;
- esac
- done
- ;;
- prog)
- compile_deplibs=
- finalize_deplibs=
- alldeplibs=no
- newdlfiles=
- newdlprefiles=
- passes="conv scan dlopen dlpreopen link"
- ;;
- *) passes="conv"
- ;;
- esac
-
- for pass in $passes; do
- # The preopen pass in lib mode reverses $deplibs; put it back here
- # so that -L comes before libs that need it for instance...
- if test "$linkmode,$pass" = "lib,link"; then
- ## FIXME: Find the place where the list is rebuilt in the wrong
- ## order, and fix it there properly
- tmp_deplibs=
- for deplib in $deplibs; do
- tmp_deplibs="$deplib $tmp_deplibs"
- done
- deplibs="$tmp_deplibs"
- fi
-
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan"; then
- libs="$deplibs"
- deplibs=
- fi
- if test "$linkmode" = prog; then
- case $pass in
- dlopen) libs="$dlfiles" ;;
- dlpreopen) libs="$dlprefiles" ;;
- link)
- libs="$deplibs %DEPLIBS%"
- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
- ;;
- esac
- fi
- if test "$linkmode,$pass" = "lib,dlpreopen"; then
- # Collect and forward deplibs of preopened libtool libs
- for lib in $dlprefiles; do
- # Ignore non-libtool-libs
- dependency_libs=
- case $lib in
- *.la) func_source "$lib" ;;
- esac
-
- # Collect preopened libtool deplibs, except any this library
- # has declared as weak libs
- for deplib in $dependency_libs; do
- deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
- case " $weak_libs " in
- *" $deplib_base "*) ;;
- *) deplibs="$deplibs $deplib" ;;
- esac
- done
- done
- libs="$dlprefiles"
- fi
- if test "$pass" = dlopen; then
- # Collect dlpreopened libraries
- save_deplibs="$deplibs"
- deplibs=
- fi
-
- for deplib in $libs; do
- lib=
- found=no
- case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- compiler_flags="$compiler_flags $deplib"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -l*)
- if test "$linkmode" != lib && test "$linkmode" != prog; then
- func_warning "\`-l' is ignored for archives/objects"
- continue
- fi
- func_stripname '-l' '' "$deplib"
- name=$func_stripname_result
- if test "$linkmode" = lib; then
- searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
- else
- searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
- fi
- for searchdir in $searchdirs; do
- for search_ext in .la $std_shrext .so .a; do
- # Search the libtool library
- lib="$searchdir/lib${name}${search_ext}"
- if test -f "$lib"; then
- if test "$search_ext" = ".la"; then
- found=yes
- else
- found=no
- fi
- break 2
- fi
- done
- done
- if test "$found" != yes; then
- # deplib doesn't seem to be a libtool library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- else # deplib is a libtool library
- # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
- # We need to do some special things here, and not later.
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $deplib "*)
- if func_lalib_p "$lib"; then
- library_names=
- old_library=
- func_source "$lib"
- for l in $old_library $library_names; do
- ll="$l"
- done
- if test "X$ll" = "X$old_library" ; then # only static version available
- found=no
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
- lib=$ladir/$old_library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- fi
- fi
- ;;
- *) ;;
- esac
- fi
- fi
- ;; # -l
- *.ltframework)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -L*)
- case $linkmode in
- lib)
- deplibs="$deplib $deplibs"
- test "$pass" = conv && continue
- newdependency_libs="$deplib $newdependency_libs"
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- prog)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- if test "$pass" = scan; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- *)
- func_warning "\`-L' is ignored for archives/objects"
- ;;
- esac # linkmode
- continue
- ;; # -L
- -R*)
- if test "$pass" = link; then
- func_stripname '-R' '' "$deplib"
- dir=$func_stripname_result
- # Make sure the xrpath contains only unique directories.
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- fi
- deplibs="$deplib $deplibs"
- continue
- ;;
- *.la) lib="$deplib" ;;
- *.$libext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- case $linkmode in
- lib)
- # Linking convenience modules into shared libraries is allowed,
- # but linking other static libraries is non-portable.
- case " $dlpreconveniencelibs " in
- *" $deplib "*) ;;
- *)
- valid_a_lib=no
- case $deplibs_check_method in
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=yes
- fi
- ;;
- pass_all)
- valid_a_lib=yes
- ;;
- esac
- if test "$valid_a_lib" != yes; then
- $ECHO
- $ECHO "*** Warning: Trying to link with static lib archive $deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because the file extensions .$libext of this argument makes me believe"
- $ECHO "*** that it is just a static archive that I should not use here."
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the"
- $ECHO "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
- ;;
- esac
- continue
- ;;
- prog)
- if test "$pass" != link; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- continue
- ;;
- esac # linkmode
- ;; # *.$libext
- *.lo | *.$objext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- elif test "$linkmode" = prog; then
- if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlopen support or we're linking statically,
- # we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- newdlfiles="$newdlfiles $deplib"
- fi
- fi
- continue
- ;;
- %DEPLIBS%)
- alldeplibs=yes
- continue
- ;;
- esac # case $deplib
-
- if test "$found" = yes || test -f "$lib"; then :
- else
- func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
- fi
-
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$lib" \
- || func_fatal_error "\`$lib' is not a valid libtool archive"
-
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
-
- dlname=
- dlopen=
- dlpreopen=
- libdir=
- library_names=
- old_library=
- inherited_linker_flags=
- # If the library was installed with an old release of libtool,
- # it will not redefine variables installed, or shouldnotlink
- installed=yes
- shouldnotlink=no
- avoidtemprpath=
-
-
- # Read the .la file
- func_source "$lib"
-
- # Convert "-framework foo" to "foo.ltframework"
- if test -n "$inherited_linker_flags"; then
- tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
- for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
- case " $new_inherited_linker_flags " in
- *" $tmp_inherited_linker_flag "*) ;;
- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
- esac
- done
- fi
- dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan" ||
- { test "$linkmode" != prog && test "$linkmode" != lib; }; then
- test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
- fi
-
- if test "$pass" = conv; then
- # Only check for convenience libraries
- deplibs="$lib $deplibs"
- if test -z "$libdir"; then
- if test -z "$old_library"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
- fi
- # It is a libtool convenience library, so add in its objects.
- convenience="$convenience $ladir/$objdir/$old_library"
- old_convenience="$old_convenience $ladir/$objdir/$old_library"
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
- elif test "$linkmode" != prog && test "$linkmode" != lib; then
- func_fatal_error "\`$lib' is not a convenience library"
- fi
- continue
- fi # $pass = conv
-
-
- # Get the name of the library we link against.
- linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
- if test -z "$linklib"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
- fi
-
- # This library was specified with -dlopen.
- if test "$pass" = dlopen; then
- if test -z "$libdir"; then
- func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
- fi
- if test -z "$dlname" ||
- test "$dlopen_support" != yes ||
- test "$build_libtool_libs" = no; then
- # If there is no dlname, no dlopen support or we're linking
- # statically, we need to preload. We also need to preload any
- # dependent libraries so libltdl's deplib preloader doesn't
- # bomb out in the load deplibs phase.
- dlprefiles="$dlprefiles $lib $dependency_libs"
- else
- newdlfiles="$newdlfiles $lib"
- fi
- continue
- fi # $pass = dlopen
-
- # We need an absolute path.
- case $ladir in
- [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
- *)
- abs_ladir=`cd "$ladir" && pwd`
- if test -z "$abs_ladir"; then
- func_warning "cannot determine absolute directory name of \`$ladir'"
- func_warning "passing it literally to the linker, although it might fail"
- abs_ladir="$ladir"
- fi
- ;;
- esac
- func_basename "$lib"
- laname="$func_basename_result"
-
- # Find the relevant object directory and library name.
- if test "X$installed" = Xyes; then
- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- func_warning "library \`$lib' was moved."
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
- dir="$libdir"
- absdir="$libdir"
- fi
- test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
- else
- if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- dir="$ladir"
- absdir="$abs_ladir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- fi
- fi # $installed = yes
- func_stripname 'lib' '.la' "$laname"
- name=$func_stripname_result
-
- # This library was specified with -dlpreopen.
- if test "$pass" = dlpreopen; then
- if test -z "$libdir" && test "$linkmode" = prog; then
- func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
- fi
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- newdlprefiles="$newdlprefiles $dir/$old_library"
- # Keep a list of preopened convenience libraries to check
- # that they are being used correctly in the link pass.
- test -z "$libdir" && \
- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
- # Otherwise, use the dlname, so that lt_dlopen finds it.
- elif test -n "$dlname"; then
- newdlprefiles="$newdlprefiles $dir/$dlname"
- else
- newdlprefiles="$newdlprefiles $dir/$linklib"
- fi
- fi # $pass = dlpreopen
-
- if test -z "$libdir"; then
- # Link the convenience library
- if test "$linkmode" = lib; then
- deplibs="$dir/$old_library $deplibs"
- elif test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$dir/$old_library $compile_deplibs"
- finalize_deplibs="$dir/$old_library $finalize_deplibs"
- else
- deplibs="$lib $deplibs" # used for prog,scan pass
- fi
- continue
- fi
-
-
- if test "$linkmode" = prog && test "$pass" != link; then
- newlib_search_path="$newlib_search_path $ladir"
- deplibs="$lib $deplibs"
-
- linkalldeplibs=no
- if test "$link_all_deplibs" != no || test -z "$library_names" ||
- test "$build_libtool_libs" = no; then
- linkalldeplibs=yes
- fi
-
- tmp_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- -L*) func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- esac
- # Need to link against all dependency_libs?
- if test "$linkalldeplibs" = yes; then
- deplibs="$deplib $deplibs"
- else
- # Need to hardcode shared library paths
- # or/and link against static libraries
- newdependency_libs="$deplib $newdependency_libs"
- fi
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done # for deplib
- continue
- fi # $linkmode = prog...
-
- if test "$linkmode,$pass" = "prog,link"; then
- if test -n "$library_names" &&
- { { test "$prefer_static_libs" = no ||
- test "$prefer_static_libs,$installed" = "built,yes"; } ||
- test -z "$old_library"; }; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath:" in
- *"$absdir:"*) ;;
- *) temp_rpath="$temp_rpath$absdir:" ;;
- esac
- fi
-
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi # $linkmode,$pass = prog,link...
-
- if test "$alldeplibs" = yes &&
- { test "$deplibs_check_method" = pass_all ||
- { test "$build_libtool_libs" = yes &&
- test -n "$library_names"; }; }; then
- # We only need to search for static libraries
- continue
- fi
- fi
-
- link_static=no # Whether the deplib will be linked statically
- use_static_libs=$prefer_static_libs
- if test "$use_static_libs" = built && test "$installed" = yes; then
- use_static_libs=no
- fi
- if test -n "$library_names" &&
- { test "$use_static_libs" = no || test -z "$old_library"; }; then
- case $host in
- *cygwin* | *mingw* | *cegcc*)
- # No point in relinking DLLs because paths are not encoded
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=no
- ;;
- *)
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
- fi
- ;;
- esac
- # This is a shared library
-
- # Warn about portability, can't link against -module's on some
- # systems (darwin). Don't bleat about dlopened modules though!
- dlopenmodule=""
- for dlpremoduletest in $dlprefiles; do
- if test "X$dlpremoduletest" = "X$lib"; then
- dlopenmodule="$dlpremoduletest"
- break
- fi
- done
- if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
- $ECHO
- if test "$linkmode" = prog; then
- $ECHO "*** Warning: Linking the executable $output against the loadable module"
- else
- $ECHO "*** Warning: Linking the shared library $output against the loadable module"
- fi
- $ECHO "*** $linklib is not portable!"
- fi
- if test "$linkmode" = lib &&
- test "$hardcode_into_libs" = yes; then
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi
-
- if test -n "$old_archive_from_expsyms_cmds"; then
- # figure out the soname
- set dummy $library_names
- shift
- realname="$1"
- shift
- libname=`eval "\\$ECHO \"$libname_spec\""`
- # use dlname if we got it. it's perfectly good, no?
- if test -n "$dlname"; then
- soname="$dlname"
- elif test -n "$soname_spec"; then
- # bleh windows
- case $host in
- *cygwin* | mingw* | *cegcc*)
- func_arith $current - $age
- major=$func_arith_result
- versuffix="-$major"
- ;;
- esac
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
-
- # Make a new name for the extract_expsyms_cmds to use
- soroot="$soname"
- func_basename "$soroot"
- soname="$func_basename_result"
- func_stripname 'lib' '.dll' "$soname"
- newlib=libimp-$func_stripname_result.a
-
- # If the library has no export list, then create one now
- if test -f "$output_objdir/$soname-def"; then :
- else
- func_verbose "extracting exported symbol list from \`$soname'"
- func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
- fi
-
- # Create $newlib
- if test -f "$output_objdir/$newlib"; then :; else
- func_verbose "generating import library for \`$soname'"
- func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
- fi
- # make sure the library variables are pointing to the new library
- dir=$output_objdir
- linklib=$newlib
- fi # test -n "$old_archive_from_expsyms_cmds"
-
- if test "$linkmode" = prog || test "$mode" != relink; then
- add_shlibpath=
- add_dir=
- add=
- lib_linked=yes
- case $hardcode_action in
- immediate | unsupported)
- if test "$hardcode_direct" = no; then
- add="$dir/$linklib"
- case $host in
- *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
- *-*-sysv4*uw2*) add_dir="-L$dir" ;;
- *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
- *-*-unixware7*) add_dir="-L$dir" ;;
- *-*-darwin* )
- # if the lib is a (non-dlopened) module then we can not
- # link against it, someone is ignoring the earlier warnings
- if /usr/bin/file -L $add 2> /dev/null |
- $GREP ": [^:]* bundle" >/dev/null ; then
- if test "X$dlopenmodule" != "X$lib"; then
- $ECHO "*** Warning: lib $linklib is a module, not a shared library"
- if test -z "$old_library" ; then
- $ECHO
- $ECHO "*** And there doesn't seem to be a static archive available"
- $ECHO "*** The link will probably fail, sorry"
- else
- add="$dir/$old_library"
- fi
- elif test -n "$old_library"; then
- add="$dir/$old_library"
- fi
- fi
- esac
- elif test "$hardcode_minus_L" = no; then
- case $host in
- *-*-sunos*) add_shlibpath="$dir" ;;
- esac
- add_dir="-L$dir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- relink)
- if test "$hardcode_direct" = yes &&
- test "$hardcode_direct_absolute" = no; then
- add="$dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- *) lib_linked=no ;;
- esac
-
- if test "$lib_linked" != yes; then
- func_fatal_configuration "unsupported hardcode properties"
- fi
-
- if test -n "$add_shlibpath"; then
- case :$compile_shlibpath: in
- *":$add_shlibpath:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
- esac
- fi
- if test "$linkmode" = prog; then
- test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
- test -n "$add" && compile_deplibs="$add $compile_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- if test "$hardcode_direct" != yes &&
- test "$hardcode_minus_L" != yes &&
- test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- fi
- fi
- fi
-
- if test "$linkmode" = prog || test "$mode" = relink; then
- add_shlibpath=
- add_dir=
- add=
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes &&
- test "$hardcode_direct_absolute" = no; then
- add="$libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$libdir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- add="-l$name"
- elif test "$hardcode_automatic" = yes; then
- if test -n "$inst_prefix_dir" &&
- test -f "$inst_prefix_dir$libdir/$linklib" ; then
- add="$inst_prefix_dir$libdir/$linklib"
- else
- add="$libdir/$linklib"
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- fi
-
- if test "$linkmode" = prog; then
- test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
- test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- fi
- fi
- elif test "$linkmode" = prog; then
- # Here we assume that one of hardcode_direct or hardcode_minus_L
- # is not unsupported. This is valid on all known static and
- # shared platforms.
- if test "$hardcode_direct" != unsupported; then
- test -n "$old_library" && linklib="$old_library"
- compile_deplibs="$dir/$linklib $compile_deplibs"
- finalize_deplibs="$dir/$linklib $finalize_deplibs"
- else
- compile_deplibs="-l$name -L$dir $compile_deplibs"
- finalize_deplibs="-l$name -L$dir $finalize_deplibs"
- fi
- elif test "$build_libtool_libs" = yes; then
- # Not a shared library
- if test "$deplibs_check_method" != pass_all; then
- # We're trying link a shared library against a static one
- # but the system doesn't support it.
-
- # Just print a warning and add the library to dependency_libs so
- # that the program can be linked against the static library.
- $ECHO
- $ECHO "*** Warning: This system can not link to static lib archive $lib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have."
- if test "$module" = yes; then
- $ECHO "*** But as you try to build a module library, libtool will still create "
- $ECHO "*** a static module, that should work as long as the dlopening application"
- $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
- if test -z "$global_symbol_pipe"; then
- $ECHO
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $ECHO "*** not find such a program. So, this module is probably useless."
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- else
- deplibs="$dir/$old_library $deplibs"
- link_static=yes
- fi
- fi # link shared/static library?
-
- if test "$linkmode" = lib; then
- if test -n "$dependency_libs" &&
- { test "$hardcode_into_libs" != yes ||
- test "$build_old_libs" = yes ||
- test "$link_static" = yes; }; then
- # Extract -R from dependency_libs
- temp_deplibs=
- for libdir in $dependency_libs; do
- case $libdir in
- -R*) func_stripname '-R' '' "$libdir"
- temp_xrpath=$func_stripname_result
- case " $xrpath " in
- *" $temp_xrpath "*) ;;
- *) xrpath="$xrpath $temp_xrpath";;
- esac;;
- *) temp_deplibs="$temp_deplibs $libdir";;
- esac
- done
- dependency_libs="$temp_deplibs"
- fi
-
- newlib_search_path="$newlib_search_path $absdir"
- # Link against this library
- test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
- # ... and its dependency_libs
- tmp_libs=
- for deplib in $dependency_libs; do
- newdependency_libs="$deplib $newdependency_libs"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
-
- if test "$link_all_deplibs" != no; then
- # Add the search paths of all dependency libraries
- for deplib in $dependency_libs; do
- path=
- case $deplib in
- -L*) path="$deplib" ;;
- *.la)
- func_dirname "$deplib" "" "."
- dir="$func_dirname_result"
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- func_warning "cannot determine absolute directory name of \`$dir'"
- absdir="$dir"
- fi
- ;;
- esac
- if $GREP "^installed=no" $deplib > /dev/null; then
- case $host in
- *-*-darwin*)
- depdepl=
- eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
- if test -n "$deplibrary_names" ; then
- for tmp in $deplibrary_names ; do
- depdepl=$tmp
- done
- if test -f "$absdir/$objdir/$depdepl" ; then
- depdepl="$absdir/$objdir/$depdepl"
- darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
- if test -z "$darwin_install_name"; then
- darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
- fi
- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
- path=
- fi
- fi
- ;;
- *)
- path="-L$absdir/$objdir"
- ;;
- esac
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- test "$absdir" != "$libdir" && \
- func_warning "\`$deplib' seems to be moved"
-
- path="-L$absdir"
- fi
- ;;
- esac
- case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$path $deplibs" ;;
- esac
- done
- fi # link_all_deplibs != no
- fi # linkmode = lib
- done # for deplib in $libs
- if test "$pass" = link; then
- if test "$linkmode" = "prog"; then
- compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
- finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
- else
- compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- fi
- fi
- dependency_libs="$newdependency_libs"
- if test "$pass" = dlpreopen; then
- # Link the dlpreopened libraries before other libraries
- for deplib in $save_deplibs; do
- deplibs="$deplib $deplibs"
- done
- fi
- if test "$pass" != dlopen; then
- if test "$pass" != conv; then
- # Make sure lib_search_path contains only unique directories.
- lib_search_path=
- for dir in $newlib_search_path; do
- case "$lib_search_path " in
- *" $dir "*) ;;
- *) lib_search_path="$lib_search_path $dir" ;;
- esac
- done
- newlib_search_path=
- fi
-
- if test "$linkmode,$pass" != "prog,link"; then
- vars="deplibs"
- else
- vars="compile_deplibs finalize_deplibs"
- fi
- for var in $vars dependency_libs; do
- # Add libraries to $var in reverse order
- eval tmp_libs=\"\$$var\"
- new_libs=
- for deplib in $tmp_libs; do
- # FIXME: Pedantically, this is the right thing to do, so
- # that some nasty dependency loop isn't accidentally
- # broken:
- #new_libs="$deplib $new_libs"
- # Pragmatically, this seems to cause very few problems in
- # practice:
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- case " $specialdeplibs " in
- *" $deplib "*) new_libs="$deplib $new_libs" ;;
- *)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$deplib $new_libs" ;;
- esac
- ;;
- esac
- ;;
- esac
- done
- tmp_libs=
- for deplib in $new_libs; do
- case $deplib in
- -L*)
- case " $tmp_libs " in
- *" $deplib "*) ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- done
- eval $var=\"$tmp_libs\"
- done # for var
- fi
- # Last step: remove runtime libs from dependency_libs
- # (they stay in deplibs)
- tmp_libs=
- for i in $dependency_libs ; do
- case " $predeps $postdeps $compiler_lib_search_path " in
- *" $i "*)
- i=""
- ;;
- esac
- if test -n "$i" ; then
- tmp_libs="$tmp_libs $i"
- fi
- done
- dependency_libs=$tmp_libs
- done # for pass
- if test "$linkmode" = prog; then
- dlfiles="$newdlfiles"
- fi
- if test "$linkmode" = prog || test "$linkmode" = lib; then
- dlprefiles="$newdlprefiles"
- fi
-
- case $linkmode in
- oldlib)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for archives"
- fi
-
- case " $deplibs" in
- *\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for archives" ;;
- esac
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for archives"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for archives"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for archives"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for archives"
-
- test -n "$export_symbols$export_symbols_regex" && \
- func_warning "\`-export-symbols' is ignored for archives"
-
- # Now set the variables for building old libraries.
- build_libtool_libs=no
- oldlibs="$output"
- objs="$objs$old_deplibs"
- ;;
-
- lib)
- # Make sure we only generate libraries of the form `libNAME.la'.
- case $outputname in
- lib*)
- func_stripname 'lib' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- ;;
- *)
- test "$module" = no && \
- func_fatal_help "libtool library \`$output' must begin with \`lib'"
-
- if test "$need_lib_prefix" != no; then
- # Add the "lib" prefix for modules if required
- func_stripname '' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- else
- func_stripname '' '.la' "$outputname"
- libname=$func_stripname_result
- fi
- ;;
- esac
-
- if test -n "$objs"; then
- if test "$deplibs_check_method" != pass_all; then
- func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
- $ECHO "*** objects $objs is not portable!"
- libobjs="$libobjs $objs"
- fi
- fi
-
- test "$dlself" != no && \
- func_warning "\`-dlopen self' is ignored for libtool libraries"
-
- set dummy $rpath
- shift
- test "$#" -gt 1 && \
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-
- oldlibs=
- if test -z "$rpath"; then
- if test "$build_libtool_libs" = yes; then
- # Building a libtool convenience library.
- # Some compilers have problems with a `.al' extension so
- # convenience libraries should have the same extension an
- # archive normally would.
- oldlibs="$output_objdir/$libname.$libext $oldlibs"
- build_libtool_libs=convenience
- build_old_libs=yes
- fi
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for convenience libraries"
- else
-
- # Parse the version information argument.
- save_ifs="$IFS"; IFS=':'
- set dummy $vinfo 0 0 0
- shift
- IFS="$save_ifs"
-
- test -n "$7" && \
- func_fatal_help "too many parameters to \`-version-info'"
-
- # convert absolute version numbers to libtool ages
- # this retains compatibility with .la files and attempts
- # to make the code below a bit more comprehensible
-
- case $vinfo_number in
- yes)
- number_major="$1"
- number_minor="$2"
- number_revision="$3"
- #
- # There are really only two kinds -- those that
- # use the current revision as the major version
- # and those that subtract age and use age as
- # a minor version. But, then there is irix
- # which has an extra 1 added just for fun
- #
- case $version_type in
- darwin|linux|osf|windows|none)
- func_arith $number_major + $number_minor
- current=$func_arith_result
- age="$number_minor"
- revision="$number_revision"
- ;;
- freebsd-aout|freebsd-elf|sunos)
- current="$number_major"
- revision="$number_minor"
- age="0"
- ;;
- irix|nonstopux)
- func_arith $number_major + $number_minor
- current=$func_arith_result
- age="$number_minor"
- revision="$number_minor"
- lt_irix_increment=no
- ;;
- *)
- func_fatal_configuration "$modename: unknown library version type \`$version_type'"
- ;;
- esac
- ;;
- no)
- current="$1"
- revision="$2"
- age="$3"
- ;;
- esac
-
- # Check that each of the things are valid numbers.
- case $current in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "CURRENT \`$current' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $revision in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "REVISION \`$revision' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $age in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "AGE \`$age' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- if test "$age" -gt "$current"; then
- func_error "AGE \`$age' is greater than the current interface number \`$current'"
- func_fatal_error "\`$vinfo' is not valid version information"
- fi
-
- # Calculate the version variables.
- major=
- versuffix=
- verstring=
- case $version_type in
- none) ;;
-
- darwin)
- # Like Linux, but with the current version available in
- # verstring for coding it into the library header
- func_arith $current - $age
- major=.$func_arith_result
- versuffix="$major.$age.$revision"
- # Darwin ld doesn't like 0 for these options...
- func_arith $current + 1
- minor_current=$func_arith_result
- xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
- ;;
-
- freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
- ;;
-
- freebsd-elf)
- major=".$current"
- versuffix=".$current"
- ;;
-
- irix | nonstopux)
- if test "X$lt_irix_increment" = "Xno"; then
- func_arith $current - $age
- else
- func_arith $current - $age + 1
- fi
- major=$func_arith_result
-
- case $version_type in
- nonstopux) verstring_prefix=nonstopux ;;
- *) verstring_prefix=sgi ;;
- esac
- verstring="$verstring_prefix$major.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$revision
- while test "$loop" -ne 0; do
- func_arith $revision - $loop
- iface=$func_arith_result
- func_arith $loop - 1
- loop=$func_arith_result
- verstring="$verstring_prefix$major.$iface:$verstring"
- done
-
- # Before this point, $major must not contain `.'.
- major=.$major
- versuffix="$major.$revision"
- ;;
-
- linux)
- func_arith $current - $age
- major=.$func_arith_result
- versuffix="$major.$age.$revision"
- ;;
-
- osf)
- func_arith $current - $age
- major=.$func_arith_result
- versuffix=".$current.$age.$revision"
- verstring="$current.$age.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test "$loop" -ne 0; do
- func_arith $current - $loop
- iface=$func_arith_result
- func_arith $loop - 1
- loop=$func_arith_result
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
-
- qnx)
- major=".$current"
- versuffix=".$current"
- ;;
-
- sunos)
- major=".$current"
- versuffix=".$current.$revision"
- ;;
-
- windows)
- # Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 filesystems.
- func_arith $current - $age
- major=$func_arith_result
- versuffix="-$major"
- ;;
-
- *)
- func_fatal_configuration "unknown library version type \`$version_type'"
- ;;
- esac
-
- # Clear the version info if we defaulted, and they specified a release.
- if test -z "$vinfo" && test -n "$release"; then
- major=
- case $version_type in
- darwin)
- # we can't check for "0.0" in archive_cmds due to quoting
- # problems, so we reset it completely
- verstring=
- ;;
- *)
- verstring="0.0"
- ;;
- esac
- if test "$need_version" = no; then
- versuffix=
- else
- versuffix=".0.0"
- fi
- fi
-
- # Remove version info from name if versioning should be avoided
- if test "$avoid_version" = yes && test "$need_version" = no; then
- major=
- versuffix=
- verstring=""
- fi
-
- # Check to see if the archive will have undefined symbols.
- if test "$allow_undefined" = yes; then
- if test "$allow_undefined_flag" = unsupported; then
- func_warning "undefined symbols not allowed in $host shared libraries"
- build_libtool_libs=no
- build_old_libs=yes
- fi
- else
- # Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
- fi
-
- fi
-
- func_generate_dlsyms "$libname" "$libname" "yes"
- libobjs="$libobjs $symfileobj"
- test "X$libobjs" = "X " && libobjs=
-
- if test "$mode" != relink; then
- # Remove our outputs, but don't remove object files since they
- # may have been created when compiling PIC objects.
- removelist=
- tempremovelist=`$ECHO "$output_objdir/*"`
- for p in $tempremovelist; do
- case $p in
- *.$objext | *.gcno)
- ;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
- if test "X$precious_files_regex" != "X"; then
- if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
- then
- continue
- fi
- fi
- removelist="$removelist $p"
- ;;
- *) ;;
- esac
- done
- test -n "$removelist" && \
- func_show_eval "${RM}r \$removelist"
- fi
-
- # Now set the variables for building old libraries.
- if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
- oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
- # Transform .lo files to .o files.
- oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
- fi
-
- # Eliminate all temporary directories.
- #for path in $notinst_path; do
- # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
- # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
- # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
- #done
-
- if test -n "$xrpath"; then
- # If the user specified any rpath flags, then add them.
- temp_xrpath=
- for libdir in $xrpath; do
- temp_xrpath="$temp_xrpath -R$libdir"
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
- dependency_libs="$temp_xrpath $dependency_libs"
- fi
- fi
-
- # Make sure dlfiles contains only unique files that won't be dlpreopened
- old_dlfiles="$dlfiles"
- dlfiles=
- for lib in $old_dlfiles; do
- case " $dlprefiles $dlfiles " in
- *" $lib "*) ;;
- *) dlfiles="$dlfiles $lib" ;;
- esac
- done
-
- # Make sure dlprefiles contains only unique files
- old_dlprefiles="$dlprefiles"
- dlprefiles=
- for lib in $old_dlprefiles; do
- case "$dlprefiles " in
- *" $lib "*) ;;
- *) dlprefiles="$dlprefiles $lib" ;;
- esac
- done
-
- if test "$build_libtool_libs" = yes; then
- if test -n "$rpath"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
- # these systems don't actually have a c library (as such)!
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C library is in the System framework
- deplibs="$deplibs System.ltframework"
- ;;
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- ;;
- *)
- # Add libc to deplibs on all other systems if necessary.
- if test "$build_libtool_need_lc" = "yes"; then
- deplibs="$deplibs -lc"
- fi
- ;;
- esac
- fi
-
- # Transform deplibs into only deplibs that can be linked in shared.
- name_save=$name
- libname_save=$libname
- release_save=$release
- versuffix_save=$versuffix
- major_save=$major
- # I'm not sure if I'm treating the release correctly. I think
- # release should show up in the -l (ie -lgmp5) so we don't want to
- # add it in twice. Is that correct?
- release=""
- versuffix=""
- major=""
- newdeplibs=
- droppeddeps=no
- case $deplibs_check_method in
- pass_all)
- # Don't check for shared/static. Everything works.
- # This might be a little naive. We might want to check
- # whether the library exists or not. But this is on
- # osf3 & osf4 and I'm not really sure... Just
- # implementing what was already the behavior.
- newdeplibs=$deplibs
- ;;
- test_compile)
- # This code stresses the "libraries are programs" paradigm to its
- # limits. Maybe even breaks it. We compile a program, linking it
- # against the deplibs as a proxy for the library. Then we can check
- # whether they linked in statically or dynamically with ldd.
- $opt_dry_run || $RM conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which I believe you do not have"
- $ECHO "*** because a test_compile did reveal that the linker did not use it for"
- $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- fi
- ;;
- *)
- newdeplibs="$newdeplibs $i"
- ;;
- esac
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
- ldd_output=`ldd conftest`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because a test_compile did reveal that the linker did not use this one"
- $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- fi
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
- $ECHO "*** make it link in! You will probably need to install it or some"
- $ECHO "*** library that it depends on before this library will be fully"
- $ECHO "*** functional. Installing it before continuing would be even better."
- fi
- ;;
- *)
- newdeplibs="$newdeplibs $i"
- ;;
- esac
- done
- fi
- ;;
- file_magic*)
- set dummy $deplibs_check_method; shift
- file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- case $a_deplib in
- -l*)
- func_stripname -l '' "$a_deplib"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- # Follow soft links.
- if ls -lLd "$potent_lib" 2>/dev/null |
- $GREP " -> " >/dev/null; then
- continue
- fi
- # The statement above tries to avoid entering an
- # endless loop below, in case of cyclic links.
- # We might still enter an endless loop, since a link
- # loop can be closed while we follow links,
- # but so what?
- potlib="$potent_lib"
- while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
- case $potliblink in
- [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
- *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
- esac
- done
- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
- $SED -e 10q |
- $EGREP "$file_magic_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a file magic. Last file checked: $potlib"
- fi
- fi
- ;;
- *)
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- ;;
- esac
- done # Gone through all deplibs.
- ;;
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- case $a_deplib in
- -l*)
- func_stripname -l '' "$a_deplib"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- potlib="$potent_lib" # see symlink-check above in file_magic test
- if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
- $EGREP "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a regex pattern. Last file checked: $potlib"
- fi
- fi
- ;;
- *)
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- ;;
- esac
- done # Gone through all deplibs.
- ;;
- none | unknown | *)
- newdeplibs=""
- tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
- -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- for i in $predeps $postdeps ; do
- # can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
- done
- fi
- if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
- $GREP . >/dev/null; then
- $ECHO
- if test "X$deplibs_check_method" = "Xnone"; then
- $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
- else
- $ECHO "*** Warning: inter-library dependencies are not known to be supported."
- fi
- $ECHO "*** All declared inter-library dependencies are being dropped."
- droppeddeps=yes
- fi
- ;;
- esac
- versuffix=$versuffix_save
- major=$major_save
- release=$release_save
- libname=$libname_save
- name=$name_save
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library with the System framework
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- esac
-
- if test "$droppeddeps" = yes; then
- if test "$module" = yes; then
- $ECHO
- $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
- $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
- $ECHO "*** a static module, that should work as long as the dlopening"
- $ECHO "*** application is linked with the -dlopen flag."
- if test -z "$global_symbol_pipe"; then
- $ECHO
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $ECHO "*** not find such a program. So, this module is probably useless."
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- else
- $ECHO "*** The inter-library dependencies that have been dropped here will be"
- $ECHO "*** automatically added whenever a program is linked with this library"
- $ECHO "*** or is declared to -dlopen it."
-
- if test "$allow_undefined" = no; then
- $ECHO
- $ECHO "*** Since this library must not contain undefined symbols,"
- $ECHO "*** because either the platform does not support them or"
- $ECHO "*** it was explicitly requested with -no-undefined,"
- $ECHO "*** libtool will only create a static version of it."
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- fi
- fi
- # Done checking deplibs!
- deplibs=$newdeplibs
- fi
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- case $host in
- *-*-darwin*)
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- deplibs="$new_libs"
-
- # All the library-specific variables (install_libdir is set above).
- library_names=
- old_library=
- dlname=
-
- # Test again, we may have decided not to build it any more
- if test "$build_libtool_libs" = yes; then
- if test "$hardcode_into_libs" = yes; then
- # Hardcode the library paths
- hardcode_libdirs=
- dep_rpath=
- rpath="$finalize_rpath"
- test "$mode" != relink && rpath="$compile_rpath$rpath"
- for libdir in $rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- dep_rpath="$dep_rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
- else
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
- fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
- fi
- test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
- fi
-
- shlibpath="$finalize_shlibpath"
- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
- if test -n "$shlibpath"; then
- eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
- fi
-
- # Get the real and link names of the library.
- eval shared_ext=\"$shrext_cmds\"
- eval library_names=\"$library_names_spec\"
- set dummy $library_names
- shift
- realname="$1"
- shift
-
- if test -n "$soname_spec"; then
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
- if test -z "$dlname"; then
- dlname=$soname
- fi
-
- lib="$output_objdir/$realname"
- linknames=
- for link
- do
- linknames="$linknames $link"
- done
-
- # Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- test "X$libobjs" = "X " && libobjs=
-
- delfiles=
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
- export_symbols="$output_objdir/$libname.uexp"
- delfiles="$delfiles $export_symbols"
- fi
-
- orig_export_symbols=
- case $host_os in
- cygwin* | mingw* | cegcc*)
- if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
- # exporting using user supplied symfile
- if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
- # and it's NOT already a .def file. Must figure out
- # which of the given symbols are data symbols and tag
- # them as such. So, trigger use of export_symbols_cmds.
- # export_symbols gets reassigned inside the "prepare
- # the list of exported symbols" if statement, so the
- # include_expsyms logic still works.
- orig_export_symbols="$export_symbols"
- export_symbols=
- always_export_symbols=yes
- fi
- fi
- ;;
- esac
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- cmds=$export_symbols_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- func_len " $cmd"
- len=$func_len_result
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- func_show_eval "$cmd" 'exit $?'
- skipped_export=false
- else
- # The command line is too long to execute in one step.
- func_verbose "using reloadable object file for export list..."
- skipped_export=:
- # Break out early, otherwise skipped_export may be
- # set to false by a later but shorter cmd.
- break
- fi
- done
- IFS="$save_ifs"
- if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
- func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
- fi
- fi
- fi
-
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
- fi
-
- if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
- # The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
- # FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
- # though. Also, the filter scales superlinearly with the number of
- # global variables. join(1) would be nice here, but unfortunately
- # isn't a blessed tool.
- $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
- export_symbols=$output_objdir/$libname.def
- $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
- fi
-
- tmp_deplibs=
- for test_deplib in $deplibs; do
- case " $convenience " in
- *" $test_deplib "*) ;;
- *)
- tmp_deplibs="$tmp_deplibs $test_deplib"
- ;;
- esac
- done
- deplibs="$tmp_deplibs"
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec" &&
- test "$compiler_needs_object" = yes &&
- test -z "$libobjs"; then
- # extract the archives, so we have objects to list.
- # TODO: could optimize this to just extract one archive.
- whole_archive_flag_spec=
- fi
- if test -n "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- test "X$libobjs" = "X " && libobjs=
- else
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- libobjs="$libobjs $func_extract_archives_result"
- test "X$libobjs" = "X " && libobjs=
- fi
- fi
-
- if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
- eval flag=\"$thread_safe_flag_spec\"
- linker_flags="$linker_flags $flag"
- fi
-
- # Make a backup of the uninstalled library when relinking
- if test "$mode" = relink; then
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
- fi
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- eval test_cmds=\"$module_expsym_cmds\"
- cmds=$module_expsym_cmds
- else
- eval test_cmds=\"$module_cmds\"
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval test_cmds=\"$archive_expsym_cmds\"
- cmds=$archive_expsym_cmds
- else
- eval test_cmds=\"$archive_cmds\"
- cmds=$archive_cmds
- fi
- fi
-
- if test "X$skipped_export" != "X:" &&
- func_len " $test_cmds" &&
- len=$func_len_result &&
- test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- :
- else
- # The command line is too long to link in one step, link piecewise
- # or, if using GNU ld and skipped_export is not :, use a linker
- # script.
-
- # Save the value of $output and $libobjs because we want to
- # use them later. If we have whole_archive_flag_spec, we
- # want to use save_libobjs as it was before
- # whole_archive_flag_spec was expanded, because we can't
- # assume the linker understands whole_archive_flag_spec.
- # This may have to be revisited, in case too many
- # convenience libraries get linked in and end up exceeding
- # the spec.
- if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- fi
- save_output=$output
- output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
-
- # Clear the reloadable object creation command queue and
- # initialize k to one.
- test_cmds=
- concat_cmds=
- objlist=
- last_robj=
- k=1
-
- if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
- output=${output_objdir}/${output_la}.lnkscript
- func_verbose "creating GNU ld script: $output"
- $ECHO 'INPUT (' > $output
- for obj in $save_libobjs
- do
- $ECHO "$obj" >> $output
- done
- $ECHO ')' >> $output
- delfiles="$delfiles $output"
- elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
- output=${output_objdir}/${output_la}.lnk
- func_verbose "creating linker input file list: $output"
- : > $output
- set x $save_libobjs
- shift
- firstobj=
- if test "$compiler_needs_object" = yes; then
- firstobj="$1 "
- shift
- fi
- for obj
- do
- $ECHO "$obj" >> $output
- done
- delfiles="$delfiles $output"
- output=$firstobj\"$file_list_spec$output\"
- else
- if test -n "$save_libobjs"; then
- func_verbose "creating reloadable object files..."
- output=$output_objdir/$output_la-${k}.$objext
- eval test_cmds=\"$reload_cmds\"
- func_len " $test_cmds"
- len0=$func_len_result
- len=$len0
-
- # Loop over the list of objects to be linked.
- for obj in $save_libobjs
- do
- func_len " $obj"
- func_arith $len + $func_len_result
- len=$func_arith_result
- if test "X$objlist" = X ||
- test "$len" -lt "$max_cmd_len"; then
- func_append objlist " $obj"
- else
- # The command $test_cmds is almost too long, add a
- # command to the queue.
- if test "$k" -eq 1 ; then
- # The first file doesn't have a previous command to add.
- eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
- else
- # All subsequent reloadable object files will link in
- # the last one created.
- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
- fi
- last_robj=$output_objdir/$output_la-${k}.$objext
- func_arith $k + 1
- k=$func_arith_result
- output=$output_objdir/$output_la-${k}.$objext
- objlist=$obj
- func_len " $last_robj"
- func_arith $len0 + $func_len_result
- len=$func_arith_result
- fi
- done
- # Handle the remaining objects by creating one last
- # reloadable object file. All subsequent reloadable object
- # files will link in the last one created.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
- if test -n "$last_robj"; then
- eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
- fi
- delfiles="$delfiles $output"
-
- else
- output=
- fi
-
- if ${skipped_export-false}; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- libobjs=$output
- # Append the command to create the export file.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
- if test -n "$last_robj"; then
- eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
- fi
- fi
-
- test -n "$save_libobjs" &&
- func_verbose "creating a temporary reloadable object file: $output"
-
- # Loop through the commands generated above and execute them.
- save_ifs="$IFS"; IFS='~'
- for cmd in $concat_cmds; do
- IFS="$save_ifs"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- if test -n "$export_symbols_regex" && ${skipped_export-false}; then
- func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
- fi
- fi
-
- if ${skipped_export-false}; then
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
- fi
-
- if test -n "$orig_export_symbols"; then
- # The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
- # FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
- # though. Also, the filter scales superlinearly with the number of
- # global variables. join(1) would be nice here, but unfortunately
- # isn't a blessed tool.
- $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
- export_symbols=$output_objdir/$libname.def
- $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
- fi
- fi
-
- libobjs=$output
- # Restore the value of output.
- output=$save_output
-
- if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- test "X$libobjs" = "X " && libobjs=
- fi
- # Expand the library linking commands again to reset the
- # value of $libobjs for piecewise linking.
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- cmds=$module_expsym_cmds
- else
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- cmds=$archive_expsym_cmds
- else
- cmds=$archive_cmds
- fi
- fi
- fi
-
- if test -n "$delfiles"; then
- # Append the command to remove temporary files to $cmds.
- eval cmds=\"\$cmds~\$RM $delfiles\"
- fi
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- libobjs="$libobjs $func_extract_archives_result"
- test "X$libobjs" = "X " && libobjs=
- fi
-
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
-
- if test -n "$convenience"; then
- if test -z "$whole_archive_flag_spec"; then
- func_show_eval '${RM}r "$gentop"'
- fi
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- # Create links to the real library.
- for linkname in $linknames; do
- if test "$realname" != "$linkname"; then
- func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
- fi
- done
-
- # If -module or -export-dynamic was specified, set the dlname.
- if test "$module" = yes || test "$export_dynamic" = yes; then
- # On all known operating systems, these are identical.
- dlname="$soname"
- fi
- fi
- ;;
-
- obj)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for objects"
- fi
-
- case " $deplibs" in
- *\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for objects" ;;
- esac
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for objects"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for objects"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for objects"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for objects"
-
- case $output in
- *.lo)
- test -n "$objs$old_deplibs" && \
- func_fatal_error "cannot build library object \`$output' from non-libtool objects"
-
- libobj=$output
- func_lo2o "$libobj"
- obj=$func_lo2o_result
- ;;
- *)
- libobj=
- obj="$output"
- ;;
- esac
-
- # Delete the old objects.
- $opt_dry_run || $RM $obj $libobj
-
- # Objects from convenience libraries. This assumes
- # single-version convenience libraries. Whenever we create
- # different ones for PIC/non-PIC, this we'll have to duplicate
- # the extraction.
- reload_conv_objs=
- gentop=
- # reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec and hope we can get by with
- # turning comma into space..
- wl=
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
- reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
- else
- gentop="$output_objdir/${obj}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- reload_conv_objs="$reload_objs $func_extract_archives_result"
- fi
- fi
-
- # Create the old-style object.
- reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
- output="$obj"
- func_execute_cmds "$reload_cmds" 'exit $?'
-
- # Exit if we aren't doing a library object file.
- if test -z "$libobj"; then
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- if test "$build_libtool_libs" != yes; then
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- # Create an invalid libtool object if no PIC, so that we don't
- # accidentally link it into a program.
- # $show "echo timestamp > $libobj"
- # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
- exit $EXIT_SUCCESS
- fi
-
- if test -n "$pic_flag" || test "$pic_mode" != default; then
- # Only do commands if we really have different PIC objects.
- reload_objs="$libobjs $reload_conv_objs"
- output="$libobj"
- func_execute_cmds "$reload_cmds" 'exit $?'
- fi
-
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- ;;
-
- prog)
- case $host in
- *cygwin*) func_stripname '' '.exe' "$output"
- output=$func_stripname_result.exe;;
- esac
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for programs"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for programs"
-
- test "$preload" = yes \
- && test "$dlopen_support" = unknown \
- && test "$dlopen_self" = unknown \
- && test "$dlopen_self_static" = unknown && \
- func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library is the System framework
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- esac
-
- case $host in
- *-*-darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- # But is supposedly fixed on 10.4 or later (yay!).
- if test "$tagname" = CXX ; then
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[0123])
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- ;;
- esac
- fi
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $compile_deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $compile_deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- compile_deplibs="$new_libs"
-
-
- compile_command="$compile_command $compile_deplibs"
- finalize_command="$finalize_command $finalize_deplibs"
-
- if test -n "$rpath$xrpath"; then
- # If the user specified any rpath flags, then add them.
- for libdir in $rpath $xrpath; do
- # This is the magic to use -rpath.
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- fi
-
- # Now hardcode the library paths
- rpath=
- hardcode_libdirs=
- for libdir in $compile_rpath $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$libdir:"*) ;;
- ::) dllsearchpath=$libdir;;
- *) dllsearchpath="$dllsearchpath:$libdir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- ::) dllsearchpath=$testbindir;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
- ;;
- esac
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- compile_rpath="$rpath"
-
- rpath=
- hardcode_libdirs=
- for libdir in $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$finalize_perm_rpath " in
- *" $libdir "*) ;;
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- finalize_rpath="$rpath"
-
- if test -n "$libobjs" && test "$build_old_libs" = yes; then
- # Transform all the library objects into standard objects.
- compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- fi
-
- func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
-
- # template prelinking step
- if test -n "$prelink_cmds"; then
- func_execute_cmds "$prelink_cmds" 'exit $?'
- fi
-
- wrappers_required=yes
- case $host in
- *cygwin* | *mingw* )
- if test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- *cegcc)
- # Disable wrappers for cegcc, we are cross compiling anyway.
- wrappers_required=no
- ;;
- *)
- if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- esac
- if test "$wrappers_required" = no; then
- # Replace the output file specification.
- compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- link_command="$compile_command$compile_rpath"
-
- # We have no uninstalled library dependencies, so finalize right now.
- exit_status=0
- func_show_eval "$link_command" 'exit_status=$?'
-
- # Delete the generated files.
- if test -f "$output_objdir/${outputname}S.${objext}"; then
- func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
- fi
-
- exit $exit_status
- fi
-
- if test -n "$compile_shlibpath$finalize_shlibpath"; then
- compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
- fi
- if test -n "$finalize_shlibpath"; then
- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
- fi
-
- compile_var=
- finalize_var=
- if test -n "$runpath_var"; then
- if test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- if test -n "$finalize_perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $finalize_perm_rpath; do
- rpath="$rpath$dir:"
- done
- finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- fi
-
- if test "$no_install" = yes; then
- # We don't need to create a wrapper script.
- link_command="$compile_var$compile_command$compile_rpath"
- # Replace the output file specification.
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- # Delete the old output file.
- $opt_dry_run || $RM $output
- # Link the executable and exit
- func_show_eval "$link_command" 'exit $?'
- exit $EXIT_SUCCESS
- fi
-
- if test "$hardcode_action" = relink; then
- # Fast installation is not supported
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
-
- func_warning "this platform does not like uninstalled shared libraries"
- func_warning "\`$output' will be relinked during installation"
- else
- if test "$fast_install" != no; then
- link_command="$finalize_var$compile_command$finalize_rpath"
- if test "$fast_install" = yes; then
- relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
- else
- # fast_install is set to needless
- relink_command=
- fi
- else
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
- fi
- fi
-
- # Replace the output file specification.
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
- # Delete the old output files.
- $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
- func_show_eval "$link_command" 'exit $?'
-
- # Now create the wrapper script.
- func_verbose "creating $output"
-
- # Quote the relink command for shipping.
- if test -n "$relink_command"; then
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
- relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Quote $ECHO for shipping.
- if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
- case $progpath in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
- *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
- esac
- qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
- else
- qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Only actually do things if not in dry run mode.
- $opt_dry_run || {
- # win32 will think the script is a binary if it has
- # a .exe suffix, so we strip it off here.
- case $output in
- *.exe) func_stripname '' '.exe' "$output"
- output=$func_stripname_result ;;
- esac
- # test for cygwin because mv fails w/o .exe extensions
- case $host in
- *cygwin*)
- exeext=.exe
- func_stripname '' '.exe' "$outputname"
- outputname=$func_stripname_result ;;
- *) exeext= ;;
- esac
- case $host in
- *cygwin* | *mingw* )
- func_dirname_and_basename "$output" "" "."
- output_name=$func_basename_result
- output_path=$func_dirname_result
- cwrappersource="$output_path/$objdir/lt-$output_name.c"
- cwrapper="$output_path/$output_name.exe"
- $RM $cwrappersource $cwrapper
- trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
- func_emit_cwrapperexe_src > $cwrappersource
-
- # The wrapper executable is built using the $host compiler,
- # because it contains $host paths and files. If cross-
- # compiling, it, like the target executable, must be
- # executed on the $host or under an emulation environment.
- $opt_dry_run || {
- $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
- $STRIP $cwrapper
- }
-
- # Now, create the wrapper script for func_source use:
- func_ltwrapper_scriptname $cwrapper
- $RM $func_ltwrapper_scriptname_result
- trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
- $opt_dry_run || {
- # note: this script will not be executed, so do not chmod.
- if test "x$build" = "x$host" ; then
- $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
- else
- func_emit_wrapper no > $func_ltwrapper_scriptname_result
- fi
- }
- ;;
- * )
- $RM $output
- trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
-
- func_emit_wrapper no > $output
- chmod +x $output
- ;;
- esac
- }
- exit $EXIT_SUCCESS
- ;;
- esac
-
- # See if we need to build an old-fashioned archive.
- for oldlib in $oldlibs; do
-
- if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs_save $symfileobj"
- addlibs="$convenience"
- build_libtool_libs=no
- else
- if test "$build_libtool_libs" = module; then
- oldobjs="$libobjs_save"
- build_libtool_libs=no
- else
- oldobjs="$old_deplibs $non_pic_objects"
- if test "$preload" = yes && test -f "$symfileobj"; then
- oldobjs="$oldobjs $symfileobj"
- fi
- fi
- addlibs="$old_convenience"
- fi
-
- if test -n "$addlibs"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $addlibs
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=$old_archive_from_new_cmds
- else
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # POSIX demands no paths to be encoded in archives. We have
- # to avoid creating archives with duplicate basenames if we
- # might have to extract them afterwards, e.g., when creating a
- # static archive out of a convenience library, or when linking
- # the entirety of a libtool archive into another (currently
- # not supported by libtool).
- if (for obj in $oldobjs
- do
- func_basename "$obj"
- $ECHO "$func_basename_result"
- done | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $ECHO "copying selected object files to avoid basename conflicts..."
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
- func_mkdir_p "$gentop"
- save_oldobjs=$oldobjs
- oldobjs=
- counter=1
- for obj in $save_oldobjs
- do
- func_basename "$obj"
- objbase="$func_basename_result"
- case " $oldobjs " in
- " ") oldobjs=$obj ;;
- *[\ /]"$objbase "*)
- while :; do
- # Make sure we don't pick an alternate name that also
- # overlaps.
- newobj=lt$counter-$objbase
- func_arith $counter + 1
- counter=$func_arith_result
- case " $oldobjs " in
- *[\ /]"$newobj "*) ;;
- *) if test ! -f "$gentop/$newobj"; then break; fi ;;
- esac
- done
- func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
- oldobjs="$oldobjs $gentop/$newobj"
- ;;
- *) oldobjs="$oldobjs $obj" ;;
- esac
- done
- fi
- eval cmds=\"$old_archive_cmds\"
-
- func_len " $cmds"
- len=$func_len_result
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- cmds=$old_archive_cmds
- else
- # the command line is too long to link in one step, link in parts
- func_verbose "using piecewise archive linking..."
- save_RANLIB=$RANLIB
- RANLIB=:
- objlist=
- concat_cmds=
- save_oldobjs=$oldobjs
- oldobjs=
- # Is there a better way of finding the last object in the list?
- for obj in $save_oldobjs
- do
- last_oldobj=$obj
- done
- eval test_cmds=\"$old_archive_cmds\"
- func_len " $test_cmds"
- len0=$func_len_result
- len=$len0
- for obj in $save_oldobjs
- do
- func_len " $obj"
- func_arith $len + $func_len_result
- len=$func_arith_result
- func_append objlist " $obj"
- if test "$len" -lt "$max_cmd_len"; then
- :
- else
- # the above command should be used before it gets too long
- oldobjs=$objlist
- if test "$obj" = "$last_oldobj" ; then
- RANLIB=$save_RANLIB
- fi
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
- objlist=
- len=$len0
- fi
- done
- RANLIB=$save_RANLIB
- oldobjs=$objlist
- if test "X$oldobjs" = "X" ; then
- eval cmds=\"\$concat_cmds\"
- else
- eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
- fi
- fi
- fi
- func_execute_cmds "$cmds" 'exit $?'
- done
-
- test -n "$generated" && \
- func_show_eval "${RM}r$generated"
-
- # Now create the libtool archive.
- case $output in
- *.la)
- old_library=
- test "$build_old_libs" = yes && old_library="$libname.$libext"
- func_verbose "creating $output"
-
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- if test "$hardcode_automatic" = yes ; then
- relink_command=
- fi
-
- # Only create the output if not a dry run.
- $opt_dry_run || {
- for installed in no yes; do
- if test "$installed" = yes; then
- if test -z "$install_libdir"; then
- break
- fi
- output="$output_objdir/$outputname"i
- # Replace all uninstalled libtool libraries with the installed ones
- newdependency_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- *.la)
- func_basename "$deplib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- newdependency_libs="$newdependency_libs $libdir/$name"
- ;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
- esac
- done
- dependency_libs="$newdependency_libs"
- newdlfiles=
-
- for lib in $dlfiles; do
- case $lib in
- *.la)
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlfiles="$newdlfiles $libdir/$name"
- ;;
- *) newdlfiles="$newdlfiles $lib" ;;
- esac
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- *.la)
- # Only pass preopened files to the pseudo-archive (for
- # eventual linking with the app. that links it) if we
- # didn't already link the preopened objects directly into
- # the library:
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlprefiles="$newdlprefiles $libdir/$name"
- ;;
- esac
- done
- dlprefiles="$newdlprefiles"
- else
- newdlfiles=
- for lib in $dlfiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlfiles="$newdlfiles $abs"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlprefiles="$newdlprefiles $abs"
- done
- dlprefiles="$newdlprefiles"
- fi
- $RM $output
- # place dlname in correct position for cygwin
- tdlname=$dlname
- case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
- esac
- $ECHO > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags='$new_inherited_linker_flags'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Names of additional weak libraries provided by this library
-weak_library_names='$weak_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
- if test "$installed" = no && test "$need_relink" = yes; then
- $ECHO >> $output "\
-relink_command=\"$relink_command\""
- fi
- done
- }
-
- # Do a symbolic link so that the libtool archive can be found in
- # LD_LIBRARY_PATH before the program is installed.
- func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
- ;;
- esac
- exit $EXIT_SUCCESS
-}
-
-{ test "$mode" = link || test "$mode" = relink; } &&
- func_mode_link ${1+"$@"}
-
-
-# func_mode_uninstall arg...
-func_mode_uninstall ()
-{
- $opt_debug
- RM="$nonopt"
- files=
- rmforce=
- exit_status=0
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- for arg
- do
- case $arg in
- -f) RM="$RM $arg"; rmforce=yes ;;
- -*) RM="$RM $arg" ;;
- *) files="$files $arg" ;;
- esac
- done
-
- test -z "$RM" && \
- func_fatal_help "you must specify an RM program"
-
- rmdirs=
-
- origobjdir="$objdir"
- for file in $files; do
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- if test "X$dir" = X.; then
- objdir="$origobjdir"
- else
- objdir="$dir/$origobjdir"
- fi
- func_basename "$file"
- name="$func_basename_result"
- test "$mode" = uninstall && objdir="$dir"
-
- # Remember objdir for removal later, being careful to avoid duplicates
- if test "$mode" = clean; then
- case " $rmdirs " in
- *" $objdir "*) ;;
- *) rmdirs="$rmdirs $objdir" ;;
- esac
- fi
-
- # Don't error if the file doesn't exist and rm -f was used.
- if { test -L "$file"; } >/dev/null 2>&1 ||
- { test -h "$file"; } >/dev/null 2>&1 ||
- test -f "$file"; then
- :
- elif test -d "$file"; then
- exit_status=1
- continue
- elif test "$rmforce" = yes; then
- continue
- fi
-
- rmfiles="$file"
-
- case $name in
- *.la)
- # Possibly a libtool archive, so verify it.
- if func_lalib_p "$file"; then
- func_source $dir/$name
-
- # Delete the libtool libraries and symlinks.
- for n in $library_names; do
- rmfiles="$rmfiles $objdir/$n"
- done
- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-
- case "$mode" in
- clean)
- case " $library_names " in
- # " " in the beginning catches empty $dlname
- *" $dlname "*) ;;
- *) rmfiles="$rmfiles $objdir/$dlname" ;;
- esac
- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- ;;
- uninstall)
- if test -n "$library_names"; then
- # Do each command in the postuninstall commands.
- func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
-
- if test -n "$old_library"; then
- # Do each command in the old_postuninstall commands.
- func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
- # FIXME: should reinstall the best remaining shared library.
- ;;
- esac
- fi
- ;;
-
- *.lo)
- # Possibly a libtool object, so verify it.
- if func_lalib_p "$file"; then
-
- # Read the .lo file
- func_source $dir/$name
-
- # Add PIC object to the list of files to remove.
- if test -n "$pic_object" &&
- test "$pic_object" != none; then
- rmfiles="$rmfiles $dir/$pic_object"
- fi
-
- # Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" &&
- test "$non_pic_object" != none; then
- rmfiles="$rmfiles $dir/$non_pic_object"
- fi
- fi
- ;;
-
- *)
- if test "$mode" = clean ; then
- noexename=$name
- case $file in
- *.exe)
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- func_stripname '' '.exe' "$name"
- noexename=$func_stripname_result
- # $file with .exe has already been added to rmfiles,
- # add $file without .exe
- rmfiles="$rmfiles $file"
- ;;
- esac
- # Do a test to see if this is a libtool program.
- if func_ltwrapper_p "$file"; then
- if func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- relink_command=
- func_source $func_ltwrapper_scriptname_result
- rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
- else
- relink_command=
- func_source $dir/$noexename
- fi
-
- # note $name still contains .exe if it was in $file originally
- # as does the version of $file that was added into $rmfiles
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
- fi
- if test "X$noexename" != "X$name" ; then
- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
- fi
- fi
- fi
- ;;
- esac
- func_show_eval "$RM $rmfiles" 'exit_status=1'
- done
- objdir="$origobjdir"
-
- # Try to remove the ${objdir}s in the directories where we deleted files
- for dir in $rmdirs; do
- if test -d "$dir"; then
- func_show_eval "rmdir $dir >/dev/null 2>&1"
- fi
- done
-
- exit $exit_status
-}
-
-{ test "$mode" = uninstall || test "$mode" = clean; } &&
- func_mode_uninstall ${1+"$@"}
-
-test -z "$mode" && {
- help="$generic_help"
- func_fatal_help "you must specify a MODE"
-}
-
-test -z "$exec_cmd" && \
- func_fatal_help "invalid operation mode \`$mode'"
-
-if test -n "$exec_cmd"; then
- eval exec "$exec_cmd"
- exit $EXIT_FAILURE
-fi
-
-exit $exit_status
-
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries. Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them. This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration. But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
-# vi:sw=2
-
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 00000000..f0f1d4db
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,6 @@
+libtool.m4
+libtool.m4.tmp
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+lt~obsolete.m4
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 1ea4d17e..f1a634bf 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 55
+# serial 66
dnl CURL_CHECK_COMPILER
@@ -40,6 +40,8 @@ AC_DEFUN([CURL_CHECK_COMPILER], [
flags_opt_yes="unknown"
flags_opt_off="unknown"
#
+ flags_prefer_cppflags="no"
+ #
CURL_CHECK_COMPILER_DEC_C
CURL_CHECK_COMPILER_HPUX_C
CURL_CHECK_COMPILER_IBM_C
@@ -95,7 +97,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
flags_dbg_all="$flags_dbg_all -gdwarf-2"
flags_dbg_all="$flags_dbg_all -gvms"
flags_dbg_yes="-g"
- flags_dbg_off="-g0"
+ flags_dbg_off=""
flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
flags_opt_yes="-Os"
flags_opt_off="-O0"
@@ -119,7 +121,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_DEC_C], [
compiler_id="DEC_C"
flags_dbg_all="-g -g0 -g1 -g2 -g3"
flags_dbg_yes="-g2"
- flags_dbg_off="-g0"
+ flags_dbg_off=""
flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
flags_opt_yes="-O1"
flags_opt_off="-O0"
@@ -155,10 +157,11 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
flags_dbg_all="$flags_dbg_all -gdwarf-2"
flags_dbg_all="$flags_dbg_all -gvms"
flags_dbg_yes="-g"
- flags_dbg_off="-g0"
+ flags_dbg_off=""
flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
flags_opt_yes="-O2"
flags_opt_off="-O0"
+ CURL_CHECK_DEF([_WIN32], [], [silent])
else
AC_MSG_RESULT([no])
fi
@@ -210,6 +213,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_IBM_C], [
flags_opt_all="$flags_opt_all -qoptimize=5"
flags_opt_yes="-O2"
flags_opt_off="-qnooptimize"
+ flags_prefer_cppflags="yes"
else
AC_MSG_RESULT([no])
fi
@@ -232,7 +236,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_INTEL_C], [
compiler_id="INTEL_UNIX_C"
flags_dbg_all="-g -g0"
flags_dbg_yes="-g"
- flags_dbg_off="-g0"
+ flags_dbg_off=""
flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
flags_opt_yes="-O2"
flags_opt_off="-O0"
@@ -296,7 +300,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPS_C], [
compiler_id="SGI_MIPS_C"
flags_dbg_all="-g -g0 -g1 -g2 -g3"
flags_dbg_yes="-g"
- flags_dbg_off="-g0"
+ flags_dbg_off=""
flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
flags_opt_yes="-O2"
flags_opt_off="-O0"
@@ -323,7 +327,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPSPRO_C], [
compiler_id="SGI_MIPSPRO_C"
flags_dbg_all="-g -g0 -g1 -g2 -g3"
flags_dbg_yes="-g"
- flags_dbg_off="-g0"
+ flags_dbg_off=""
flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
flags_opt_yes="-O2"
flags_opt_off="-O0"
@@ -420,35 +424,39 @@ dnl GNUC versions these warnings are not silenced.
AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
- tmp_has_include="no"
- tmp_chg_FLAGS="$CFLAGS"
- for word1 in $tmp_chg_FLAGS; do
- case "$word1" in
- -I*)
- tmp_has_include="yes"
- ;;
- esac
- done
- if test "$tmp_has_include" = "yes"; then
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
- CFLAGS="$tmp_chg_FLAGS"
- squeeze CFLAGS
- fi
- tmp_has_include="no"
- tmp_chg_FLAGS="$CPPFLAGS"
- for word1 in $tmp_chg_FLAGS; do
- case "$word1" in
- -I*)
- tmp_has_include="yes"
- ;;
- esac
- done
- if test "$tmp_has_include" = "yes"; then
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
- CPPFLAGS="$tmp_chg_FLAGS"
- squeeze CPPFLAGS
+ AC_REQUIRE([CURL_CHECK_COMPILER])dnl
+ if test "$compiler_id" = "GNU_C" ||
+ test "$compiler_id" = "CLANG"; then
+ tmp_has_include="no"
+ tmp_chg_FLAGS="$CFLAGS"
+ for word1 in $tmp_chg_FLAGS; do
+ case "$word1" in
+ -I*)
+ tmp_has_include="yes"
+ ;;
+ esac
+ done
+ if test "$tmp_has_include" = "yes"; then
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
+ CFLAGS="$tmp_chg_FLAGS"
+ squeeze CFLAGS
+ fi
+ tmp_has_include="no"
+ tmp_chg_FLAGS="$CPPFLAGS"
+ for word1 in $tmp_chg_FLAGS; do
+ case "$word1" in
+ -I*)
+ tmp_has_include="yes"
+ ;;
+ esac
+ done
+ if test "$tmp_has_include" = "yes"; then
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
+ CPPFLAGS="$tmp_chg_FLAGS"
+ squeeze CPPFLAGS
+ fi
fi
])
@@ -586,15 +594,15 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
IBM_C)
#
dnl Ensure that compiler optimizations are always thread-safe.
- tmp_CFLAGS="$tmp_CFLAGS -qthreaded"
+ tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded"
dnl Disable type based strict aliasing optimizations, using worst
dnl case aliasing assumptions when compiling. Type based aliasing
dnl would restrict the lvalues that could be safely used to access
dnl a data object.
- tmp_CFLAGS="$tmp_CFLAGS -qnoansialias"
+ tmp_CPPFLAGS="$tmp_CPPFLAGS -qnoansialias"
dnl Force compiler to stop after the compilation phase, without
dnl generating an object code file when compilation has errors.
- tmp_CFLAGS="$tmp_CFLAGS -qhalt=e"
+ tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e"
;;
#
INTEL_UNIX_C)
@@ -607,12 +615,12 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
dnl #147: declaration is incompatible with 'previous one'
dnl #165: too few arguments in function call
dnl #266: function declared implicitly
- tmp_CPPFLAGS="$tmp_CPPFLAGS -we 140,147,165,266"
+ tmp_CPPFLAGS="$tmp_CPPFLAGS -we140,147,165,266"
dnl Disable some remarks
dnl #279: controlling expression is constant
dnl #981: operands are evaluated in unspecified order
dnl #1469: "cc" clobber ignored
- tmp_CPPFLAGS="$tmp_CPPFLAGS -wd 279,981,1469"
+ tmp_CPPFLAGS="$tmp_CPPFLAGS -wd279,981,1469"
;;
#
INTEL_WINDOWS_C)
@@ -720,8 +728,13 @@ AC_DEFUN([CURL_SET_COMPILER_DEBUG_OPTS], [
tmp_options="$flags_dbg_off"
fi
#
- CPPFLAGS="$tmp_CPPFLAGS"
- CFLAGS="$tmp_CFLAGS $tmp_options"
+ if test "$flags_prefer_cppflags" = "yes"; then
+ CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
+ CFLAGS="$tmp_CFLAGS"
+ else
+ CPPFLAGS="$tmp_CPPFLAGS"
+ CFLAGS="$tmp_CFLAGS $tmp_options"
+ fi
squeeze CPPFLAGS
squeeze CFLAGS
CURL_COMPILER_WORKS_IFELSE([
@@ -796,8 +809,13 @@ AC_DEFUN([CURL_SET_COMPILER_OPTIMIZE_OPTS], [
AC_MSG_CHECKING([if compiler accepts optimizer disabling options])
tmp_options="$flags_opt_off"
fi
- CPPFLAGS="$tmp_CPPFLAGS"
- CFLAGS="$tmp_CFLAGS $tmp_options"
+ if test "$flags_prefer_cppflags" = "yes"; then
+ CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
+ CFLAGS="$tmp_CFLAGS"
+ else
+ CPPFLAGS="$tmp_CPPFLAGS"
+ CFLAGS="$tmp_CFLAGS $tmp_options"
+ fi
squeeze CPPFLAGS
squeeze CFLAGS
CURL_COMPILER_WORKS_IFELSE([
@@ -838,8 +856,6 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
CLANG)
#
if test "$want_warnings" = "yes"; then
- dnl All versions of clang support the same warnings as at least
- dnl gcc 4.2.1 except -Wunused.
tmp_CFLAGS="$tmp_CFLAGS -pedantic"
tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings"
@@ -947,10 +963,16 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
fi
#
+ dnl Only gcc 4.0 or later
+ if test "$compiler_num" -ge "400"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
+ fi
+ #
dnl Only gcc 4.2 or later
if test "$compiler_num" -ge "402"; then
tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
fi
+ #
dnl Only gcc 4.3 or later
if test "$compiler_num" -ge "403"; then
tmp_CFLAGS="$tmp_CFLAGS -Wtype-limits -Wold-style-declaration"
@@ -959,6 +981,14 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla"
fi
#
+ dnl Only gcc 4.5 or later
+ if test "$compiler_num" -ge "405"; then
+ dnl Only windows targets
+ if test "$curl_cv_have_def__WIN32" = "yes"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
+ fi
+ fi
+ #
fi
#
dnl Do not issue warnings for code in system include paths.
@@ -1165,6 +1195,7 @@ dnl library or as a shared one on those systems on which
dnl shared libraries support undefined symbols.
AC_DEFUN([CURL_CHECK_CURLDEBUG], [
+ AC_REQUIRE([XC_LIBTOOL])dnl
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
supports_curldebug="unknown"
if test "$want_curldebug" = "yes"; then
@@ -1180,7 +1211,7 @@ AC_DEFUN([CURL_CHECK_CURLDEBUG], [
fi
if test "$supports_curldebug" != "no"; then
if test "$enable_shared" = "yes" &&
- test "$need_no_undefined" = "yes"; then
+ test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then
supports_curldebug="no"
AC_MSG_WARN([shared library does not support undefined symbols.])
fi
@@ -1198,55 +1229,16 @@ AC_DEFUN([CURL_CHECK_CURLDEBUG], [
fi
#
if test "$want_curldebug" = "yes"; then
- CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
+ CPPFLAGS="-DCURLDEBUG $CPPFLAGS"
squeeze CPPFLAGS
fi
if test "$want_debug" = "yes"; then
- CPPFLAGS="$CPPFLAGS -DDEBUGBUILD"
+ CPPFLAGS="-DDEBUGBUILD $CPPFLAGS"
squeeze CPPFLAGS
fi
])
-dnl CURL_CHECK_NO_UNDEFINED
-dnl -------------------------------------------------
-dnl Checks if the -no-undefined flag must be used when
-dnl building shared libraries. This is required on all
-dnl systems on which shared libraries should not have
-dnl references to undefined symbols. This check should
-dnl not be done before AC-PROG-LIBTOOL.
-
-AC_DEFUN([CURL_CHECK_NO_UNDEFINED], [
- AC_BEFORE([$0],[CURL_CHECK_CURLDEBUG])dnl
- AC_MSG_CHECKING([if shared libraries need -no-undefined])
- need_no_undefined="no"
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*)
- need_no_undefined="yes"
- ;;
- esac
- if test "x$allow_undefined" = "xno"; then
- need_no_undefined="yes"
- elif test "x$allow_undefined_flag" = "xunsupported"; then
- need_no_undefined="yes"
- fi
- AC_MSG_RESULT($need_no_undefined)
-])
-
-
-dnl CURL_CHECK_PROG_CC
-dnl -------------------------------------------------
-dnl Check for compiler program, preventing CFLAGS and
-dnl CPPFLAGS from being unexpectedly changed.
-
-AC_DEFUN([CURL_CHECK_PROG_CC], [
- ac_save_CFLAGS="$CFLAGS"
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_PROG_CC
- CFLAGS="$ac_save_CFLAGS"
- CPPFLAGS="$ac_save_CPPFLAGS"
-])
-
dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
dnl -------------------------------------------------
@@ -1357,6 +1349,150 @@ AC_DEFUN([CURL_CHECK_COMPILER_STRUCT_MEMBER_SIZE], [
])
+dnl CURL_CHECK_COMPILER_SYMBOL_HIDING
+dnl -------------------------------------------------
+dnl Verify if compiler supports hiding library internal symbols, setting
+dnl shell variable supports_symbol_hiding value as appropriate, as well as
+dnl variables symbol_hiding_CFLAGS and symbol_hiding_EXTERN when supported.
+
+AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
+ AC_REQUIRE([CURL_CHECK_COMPILER])dnl
+ AC_BEFORE([$0],[CURL_CONFIGURE_SYMBOL_HIDING])dnl
+ AC_MSG_CHECKING([if compiler supports hiding library internal symbols])
+ supports_symbol_hiding="no"
+ symbol_hiding_CFLAGS=""
+ symbol_hiding_EXTERN=""
+ tmp_CFLAGS=""
+ tmp_EXTERN=""
+ case "$compiler_id" in
+ CLANG)
+ dnl All versions of clang support -fvisibility=
+ tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
+ tmp_CFLAGS="-fvisibility=hidden"
+ supports_symbol_hiding="yes"
+ ;;
+ GNU_C)
+ dnl Only gcc 3.4 or later
+ if test "$compiler_num" -ge "304"; then
+ if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
+ tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
+ tmp_CFLAGS="-fvisibility=hidden"
+ supports_symbol_hiding="yes"
+ fi
+ fi
+ ;;
+ INTEL_UNIX_C)
+ dnl Only icc 9.0 or later
+ if test "$compiler_num" -ge "900"; then
+ if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
+ tmp_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+# include <stdio.h>
+ ]],[[
+ printf("icc fvisibility bug test");
+ ]])
+ ],[
+ tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
+ tmp_CFLAGS="-fvisibility=hidden"
+ supports_symbol_hiding="yes"
+ ])
+ CFLAGS="$tmp_save_CFLAGS"
+ fi
+ fi
+ ;;
+ SUNPRO_C)
+ if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
+ tmp_EXTERN="__global"
+ tmp_CFLAGS="-xldscope=hidden"
+ supports_symbol_hiding="yes"
+ fi
+ ;;
+ esac
+ if test "$supports_symbol_hiding" = "yes"; then
+ tmp_save_CFLAGS="$CFLAGS"
+ CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
+ squeeze CFLAGS
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $tmp_EXTERN char *dummy(char *buff);
+ char *dummy(char *buff)
+ {
+ if(buff)
+ return ++buff;
+ else
+ return buff;
+ }
+ ]],[[
+ char b[16];
+ char *r = dummy(&b[0]);
+ if(r)
+ return (int)*r;
+ ]])
+ ],[
+ supports_symbol_hiding="yes"
+ if test -f conftest.err; then
+ grep 'visibility' conftest.err >/dev/null
+ if test "$?" -eq "0"; then
+ supports_symbol_hiding="no"
+ fi
+ fi
+ ],[
+ supports_symbol_hiding="no"
+ echo " " >&6
+ sed 's/^/cc-src: /' conftest.$ac_ext >&6
+ sed 's/^/cc-err: /' conftest.err >&6
+ echo " " >&6
+ ])
+ CFLAGS="$tmp_save_CFLAGS"
+ fi
+ if test "$supports_symbol_hiding" = "yes"; then
+ AC_MSG_RESULT([yes])
+ symbol_hiding_CFLAGS="$tmp_CFLAGS"
+ symbol_hiding_EXTERN="$tmp_EXTERN"
+ else
+ AC_MSG_RESULT([no])
+ fi
+])
+
+
+dnl CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
+dnl -------------------------------------------------
+dnl Verifies if the compiler actually halts after the
+dnl compilation phase without generating any object
+dnl code file, when the source code tries to redefine
+dnl a prototype which does not match previous one.
+
+AC_DEFUN([CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH], [
+ AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
+ AC_MSG_CHECKING([if compiler halts on function prototype mismatch])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+# include <stdlib.h>
+ int rand(int n);
+ int rand(int n)
+ {
+ if(n)
+ return ++n;
+ else
+ return n;
+ }
+ ]],[[
+ int i[2]={0,0};
+ int j = rand(i[0]);
+ if(j)
+ return j;
+ ]])
+ ],[
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([compiler does not halt on function prototype mismatch.])
+ ],[
+ AC_MSG_RESULT([yes])
+ ])
+])
+
+
dnl CURL_VAR_MATCH (VARNAME, VALUE)
dnl -------------------------------------------------
dnl Verifies if shell variable VARNAME contains VALUE.
diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4
index bb25bb92..44b018e4 100644
--- a/m4/curl-confopts.m4
+++ b/m4/curl-confopts.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 13
+# serial 19
dnl CURL_CHECK_OPTION_THREADED_RESOLVER
dnl -------------------------------------------------
@@ -145,7 +145,7 @@ dnl variable want_debug value as appropriate.
AC_DEFUN([CURL_CHECK_OPTION_DEBUG], [
AC_BEFORE([$0],[CURL_CHECK_OPTION_WARNINGS])dnl
AC_BEFORE([$0],[CURL_CHECK_OPTION_CURLDEBUG])dnl
- AC_BEFORE([$0],[CURL_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable debug build options])
OPT_DEBUG_BUILD="default"
AC_ARG_ENABLE(debug,
@@ -169,39 +169,6 @@ AC_HELP_STRING([--disable-debug],[Disable debug build options]),
AC_MSG_RESULT([$want_debug])
])
-
-dnl CURL_CHECK_OPTION_NONBLOCKING
-dnl -------------------------------------------------
-dnl Verify if configure has been invoked with option
-dnl --enable-nonblocking or --disable-nonblocking, and
-dnl set shell variable want_nonblocking as appropriate.
-
-AC_DEFUN([CURL_CHECK_OPTION_NONBLOCKING], [
- AC_BEFORE([$0],[CURL_CHECK_NONBLOCKING_SOCKET])dnl
- AC_MSG_CHECKING([whether to enable non-blocking communications])
- OPT_NONBLOCKING="default"
- AC_ARG_ENABLE(nonblocking,
-AC_HELP_STRING([--enable-nonblocking],[Enable non-blocking communications])
-AC_HELP_STRING([--disable-nonblocking],[Disable non-blocking communications]),
- OPT_NONBLOCKING=$enableval)
- case "$OPT_NONBLOCKING" in
- no)
- dnl --disable-nonblocking option used
- want_nonblocking="no"
- ;;
- default)
- dnl configure option not specified
- want_nonblocking="yes"
- ;;
- *)
- dnl --enable-nonblocking option used
- want_nonblocking="yes"
- ;;
- esac
- AC_MSG_RESULT([$want_nonblocking])
-])
-
-
dnl CURL_CHECK_OPTION_OPTIMIZE
dnl -------------------------------------------------
dnl Verify if configure has been invoked with option
@@ -210,7 +177,7 @@ dnl shell variable want_optimize value as appropriate.
AC_DEFUN([CURL_CHECK_OPTION_OPTIMIZE], [
AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
- AC_BEFORE([$0],[CURL_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable compiler optimizer])
OPT_COMPILER_OPTIMIZE="default"
AC_ARG_ENABLE(optimize,
@@ -258,6 +225,50 @@ AC_HELP_STRING([--disable-optimize],[Disable compiler optimizations]),
])
+dnl CURL_CHECK_OPTION_SYMBOL_HIDING
+dnl -------------------------------------------------
+dnl Verify if configure has been invoked with option
+dnl --enable-symbol-hiding or --disable-symbol-hiding,
+dnl setting shell variable want_symbol_hiding value.
+
+AC_DEFUN([CURL_CHECK_OPTION_SYMBOL_HIDING], [
+ AC_BEFORE([$0],[CURL_CHECK_COMPILER_SYMBOL_HIDING])dnl
+ AC_MSG_CHECKING([whether to enable hiding of library internal symbols])
+ OPT_SYMBOL_HIDING="default"
+ AC_ARG_ENABLE(symbol-hiding,
+AC_HELP_STRING([--enable-symbol-hiding],[Enable hiding of library internal symbols])
+AC_HELP_STRING([--disable-symbol-hiding],[Disable hiding of library internal symbols]),
+ OPT_SYMBOL_HIDING=$enableval)
+ AC_ARG_ENABLE(hidden-symbols,
+AC_HELP_STRING([--enable-hidden-symbols],[To be deprecated, use --enable-symbol-hiding])
+AC_HELP_STRING([--disable-hidden-symbols],[To be deprecated, use --disable-symbol-hiding]),
+ OPT_SYMBOL_HIDING=$enableval)
+ case "$OPT_SYMBOL_HIDING" in
+ no)
+ dnl --disable-symbol-hiding option used.
+ dnl This is an indication to not attempt hiding of library internal
+ dnl symbols. Default symbol visibility will be used, which normally
+ dnl exposes all library internal symbols.
+ want_symbol_hiding="no"
+ AC_MSG_RESULT([no])
+ ;;
+ default)
+ dnl configure's symbol-hiding option not specified.
+ dnl Handle this as if --enable-symbol-hiding option was given.
+ want_symbol_hiding="yes"
+ AC_MSG_RESULT([yes])
+ ;;
+ *)
+ dnl --enable-symbol-hiding option used.
+ dnl This is an indication to attempt hiding of library internal
+ dnl symbols. This is only supported on some compilers/linkers.
+ want_symbol_hiding="yes"
+ AC_MSG_RESULT([yes])
+ ;;
+ esac
+])
+
+
dnl CURL_CHECK_OPTION_THREADS
dnl -------------------------------------------------
dnl Verify if configure has been invoked with option
@@ -315,7 +326,7 @@ dnl shell variable want_warnings as appropriate.
AC_DEFUN([CURL_CHECK_OPTION_WARNINGS], [
AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
AC_BEFORE([$0],[CURL_CHECK_OPTION_WERROR])dnl
- AC_BEFORE([$0],[CURL_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable strict compiler warnings])
OPT_COMPILER_WARNINGS="default"
AC_ARG_ENABLE(warnings,
@@ -377,7 +388,6 @@ dnl -------------------------------------------------
dnl Check for how to set a socket into non-blocking state.
AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], [
- AC_REQUIRE([CURL_CHECK_OPTION_NONBLOCKING])dnl
AC_REQUIRE([CURL_CHECK_FUNC_FCNTL])dnl
AC_REQUIRE([CURL_CHECK_FUNC_IOCTL])dnl
AC_REQUIRE([CURL_CHECK_FUNC_IOCTLSOCKET])dnl
@@ -385,29 +395,52 @@ AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], [
AC_REQUIRE([CURL_CHECK_FUNC_SETSOCKOPT])dnl
#
tst_method="unknown"
- if test "$want_nonblocking" = "yes"; then
- AC_MSG_CHECKING([how to set a socket into non-blocking mode])
- if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
- tst_method="fcntl O_NONBLOCK"
- elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
- tst_method="ioctl FIONBIO"
- elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
- tst_method="ioctlsocket FIONBIO"
- elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
- tst_method="IoctlSocket FIONBIO"
- elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
- tst_method="setsockopt SO_NONBLOCK"
- fi
- AC_MSG_RESULT([$tst_method])
- if test "$tst_method" = "unknown"; then
- AC_MSG_WARN([cannot determine non-blocking socket method.])
- fi
+
+ AC_MSG_CHECKING([how to set a socket into non-blocking mode])
+ if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
+ tst_method="fcntl O_NONBLOCK"
+ elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
+ tst_method="ioctl FIONBIO"
+ elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
+ tst_method="ioctlsocket FIONBIO"
+ elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
+ tst_method="IoctlSocket FIONBIO"
+ elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
+ tst_method="setsockopt SO_NONBLOCK"
fi
+ AC_MSG_RESULT([$tst_method])
if test "$tst_method" = "unknown"; then
- AC_DEFINE_UNQUOTED(USE_BLOCKING_SOCKETS, 1,
- [Define to disable non-blocking sockets.])
- AC_MSG_WARN([non-blocking sockets disabled.])
+ AC_MSG_WARN([cannot determine non-blocking socket method.])
+ fi
+])
+
+
+dnl CURL_CONFIGURE_SYMBOL_HIDING
+dnl -------------------------------------------------
+dnl Depending on --enable-symbol-hiding or --disable-symbol-hiding
+dnl configure option, and compiler capability to actually honor such
+dnl option, this will modify compiler flags as appropriate and also
+dnl provide needed definitions for configuration and Makefile.am files.
+dnl This macro should not be used until all compilation tests have
+dnl been done to prevent interferences on other tests.
+
+AC_DEFUN([CURL_CONFIGURE_SYMBOL_HIDING], [
+ AC_MSG_CHECKING([whether hiding of library internal symbols will actually happen])
+ CFLAG_CURL_SYMBOL_HIDING=""
+ doing_symbol_hiding="no"
+ if test x"$ac_cv_native_windows" != "xyes" &&
+ test "$want_symbol_hiding" = "yes" &&
+ test "$supports_symbol_hiding" = "yes"; then
+ doing_symbol_hiding="yes"
+ CFLAG_CURL_SYMBOL_HIDING="$symbol_hiding_CFLAGS"
+ AC_DEFINE_UNQUOTED(CURL_EXTERN_SYMBOL, $symbol_hiding_EXTERN,
+ [Definition to make a library symbol externally visible.])
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
fi
+ AM_CONDITIONAL(DOING_CURL_SYMBOL_HIDING, test x$doing_symbol_hiding = xyes)
+ AC_SUBST(CFLAG_CURL_SYMBOL_HIDING)
])
@@ -496,3 +529,64 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
fi
])
+
+dnl CURL_CHECK_OPTION_NTLM_WB
+dnl -------------------------------------------------
+dnl Verify if configure has been invoked with option
+dnl --enable-ntlm-wb or --disable-ntlm-wb, and set
+dnl shell variable want_ntlm_wb and want_ntlm_wb_file
+dnl as appropriate.
+
+AC_DEFUN([CURL_CHECK_OPTION_NTLM_WB], [
+ AC_BEFORE([$0],[CURL_CHECK_NTLM_WB])dnl
+ OPT_NTLM_WB="default"
+ AC_ARG_ENABLE(ntlm-wb,
+AC_HELP_STRING([--enable-ntlm-wb@<:@=FILE@:>@],[Enable NTLM delegation to winbind's ntlm_auth helper, where FILE is ntlm_auth's absolute filename (default: /usr/bin/ntlm_auth)])
+AC_HELP_STRING([--disable-ntlm-wb],[Disable NTLM delegation to winbind's ntlm_auth helper]),
+ OPT_NTLM_WB=$enableval)
+ want_ntlm_wb_file="/usr/bin/ntlm_auth"
+ case "$OPT_NTLM_WB" in
+ no)
+ dnl --disable-ntlm-wb option used
+ want_ntlm_wb="no"
+ ;;
+ default)
+ dnl configure option not specified
+ want_ntlm_wb="yes"
+ ;;
+ *)
+ dnl --enable-ntlm-wb option used
+ want_ntlm_wb="yes"
+ if test -n "$enableval" && test "$enableval" != "yes"; then
+ want_ntlm_wb_file="$enableval"
+ fi
+ ;;
+ esac
+])
+
+
+dnl CURL_CHECK_NTLM_WB
+dnl -------------------------------------------------
+dnl Check if support for NTLM delegation to winbind's
+dnl ntlm_auth helper will finally be enabled depending
+dnl on given configure options and target platform.
+
+AC_DEFUN([CURL_CHECK_NTLM_WB], [
+ AC_REQUIRE([CURL_CHECK_OPTION_NTLM_WB])dnl
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
+ AC_MSG_CHECKING([whether to enable NTLM delegation to winbind's helper])
+ if test "$ac_cv_native_windows" = "yes" ||
+ test "x$SSL_ENABLED" = "x"; then
+ want_ntlm_wb_file=""
+ want_ntlm_wb="no"
+ fi
+ AC_MSG_RESULT([$want_ntlm_wb])
+ if test "$want_ntlm_wb" = "yes"; then
+ AC_DEFINE(NTLM_WB_ENABLED, 1,
+ [Define to enable NTLM delegation to winbind's ntlm_auth helper.])
+ AC_DEFINE_UNQUOTED(NTLM_WB_FILE, "$want_ntlm_wb_file",
+ [Define absolute filename for winbind's ntlm_auth helper.])
+ NTLM_WB_ENABLED=1
+ fi
+])
+
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index 36bd31c4..0d654212 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 64
+# serial 73
dnl CURL_INCLUDES_ARPA_INET
@@ -416,6 +416,26 @@ curl_includes_sys_uio="\
])
+dnl CURL_INCLUDES_SYS_XATTR
+dnl -------------------------------------------------
+dnl Set up variable with list of headers that must be
+dnl included when sys/xattr.h is to be included.
+
+AC_DEFUN([CURL_INCLUDES_SYS_XATTR], [
+curl_includes_sys_xattr="\
+/* includes start */
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_XATTR_H
+# include <sys/xattr.h>
+#endif
+/* includes end */"
+ AC_CHECK_HEADERS(
+ sys/types.h sys/xattr.h,
+ [], [], [$curl_includes_sys_xattr])
+])
+
dnl CURL_INCLUDES_TIME
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
@@ -1230,6 +1250,250 @@ AC_DEFUN([CURL_CHECK_FUNC_FDOPEN], [
])
+dnl CURL_CHECK_FUNC_FGETXATTR
+dnl -------------------------------------------------
+dnl Verify if fgetxattr is available, prototyped, and
+dnl can be compiled. If all of these are true, and
+dnl usage has not been previously disallowed with
+dnl shell variable curl_disallow_fgetxattr, then
+dnl HAVE_FGETXATTR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_FGETXATTR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])dnl
+ #
+ tst_links_fgetxattr="unknown"
+ tst_proto_fgetxattr="unknown"
+ tst_compi_fgetxattr="unknown"
+ tst_allow_fgetxattr="unknown"
+ tst_nargs_fgetxattr="unknown"
+ #
+ AC_MSG_CHECKING([if fgetxattr can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([fgetxattr])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_fgetxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_fgetxattr="no"
+ ])
+ #
+ if test "$tst_links_fgetxattr" = "yes"; then
+ AC_MSG_CHECKING([if fgetxattr is prototyped])
+ AC_EGREP_CPP([fgetxattr],[
+ $curl_includes_sys_xattr
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_fgetxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_fgetxattr="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_fgetxattr" = "yes"; then
+ if test "$tst_nargs_fgetxattr" = "unknown"; then
+ AC_MSG_CHECKING([if fgetxattr takes 4 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != fgetxattr(0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_fgetxattr="yes"
+ tst_nargs_fgetxattr="4"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_fgetxattr="no"
+ ])
+ fi
+ if test "$tst_nargs_fgetxattr" = "unknown"; then
+ AC_MSG_CHECKING([if fgetxattr takes 6 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != fgetxattr(0, 0, 0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_fgetxattr="yes"
+ tst_nargs_fgetxattr="6"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_fgetxattr="no"
+ ])
+ fi
+ AC_MSG_CHECKING([if fgetxattr is compilable])
+ if test "$tst_compi_fgetxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ #
+ if test "$tst_compi_fgetxattr" = "yes"; then
+ AC_MSG_CHECKING([if fgetxattr usage allowed])
+ if test "x$curl_disallow_fgetxattr" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_fgetxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_fgetxattr="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if fgetxattr might be used])
+ if test "$tst_links_fgetxattr" = "yes" &&
+ test "$tst_proto_fgetxattr" = "yes" &&
+ test "$tst_compi_fgetxattr" = "yes" &&
+ test "$tst_allow_fgetxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_FGETXATTR, 1,
+ [Define to 1 if you have the fgetxattr function.])
+ dnl AC_DEFINE_UNQUOTED(FGETXATTR_ARGS, $tst_nargs_fgetxattr,
+ dnl [Specifies the number of arguments to fgetxattr])
+ #
+ if test "$tst_nargs_fgetxattr" -eq "4"; then
+ AC_DEFINE(HAVE_FGETXATTR_4, 1, [fgetxattr() takes 4 args])
+ elif test "$tst_nargs_fgetxattr" -eq "6"; then
+ AC_DEFINE(HAVE_FGETXATTR_6, 1, [fgetxattr() takes 6 args])
+ fi
+ #
+ ac_cv_func_fgetxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_fgetxattr="no"
+ fi
+])
+
+
+dnl CURL_CHECK_FUNC_FLISTXATTR
+dnl -------------------------------------------------
+dnl Verify if flistxattr is available, prototyped, and
+dnl can be compiled. If all of these are true, and
+dnl usage has not been previously disallowed with
+dnl shell variable curl_disallow_flistxattr, then
+dnl HAVE_FLISTXATTR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_FLISTXATTR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])dnl
+ #
+ tst_links_flistxattr="unknown"
+ tst_proto_flistxattr="unknown"
+ tst_compi_flistxattr="unknown"
+ tst_allow_flistxattr="unknown"
+ tst_nargs_flistxattr="unknown"
+ #
+ AC_MSG_CHECKING([if flistxattr can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([flistxattr])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_flistxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_flistxattr="no"
+ ])
+ #
+ if test "$tst_links_flistxattr" = "yes"; then
+ AC_MSG_CHECKING([if flistxattr is prototyped])
+ AC_EGREP_CPP([flistxattr],[
+ $curl_includes_sys_xattr
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_flistxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_flistxattr="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_flistxattr" = "yes"; then
+ if test "$tst_nargs_flistxattr" = "unknown"; then
+ AC_MSG_CHECKING([if flistxattr takes 3 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != flistxattr(0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_flistxattr="yes"
+ tst_nargs_flistxattr="3"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_flistxattr="no"
+ ])
+ fi
+ if test "$tst_nargs_flistxattr" = "unknown"; then
+ AC_MSG_CHECKING([if flistxattr takes 4 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != flistxattr(0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_flistxattr="yes"
+ tst_nargs_flistxattr="4"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_flistxattr="no"
+ ])
+ fi
+ AC_MSG_CHECKING([if flistxattr is compilable])
+ if test "$tst_compi_flistxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ #
+ if test "$tst_compi_flistxattr" = "yes"; then
+ AC_MSG_CHECKING([if flistxattr usage allowed])
+ if test "x$curl_disallow_flistxattr" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_flistxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_flistxattr="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if flistxattr might be used])
+ if test "$tst_links_flistxattr" = "yes" &&
+ test "$tst_proto_flistxattr" = "yes" &&
+ test "$tst_compi_flistxattr" = "yes" &&
+ test "$tst_allow_flistxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_FLISTXATTR, 1,
+ [Define to 1 if you have the flistxattr function.])
+ dnl AC_DEFINE_UNQUOTED(FLISTXATTR_ARGS, $tst_nargs_flistxattr,
+ dnl [Specifies the number of arguments to flistxattr])
+ #
+ if test "$tst_nargs_flistxattr" -eq "3"; then
+ AC_DEFINE(HAVE_FLISTXATTR_3, 1, [flistxattr() takes 3 args])
+ elif test "$tst_nargs_flistxattr" -eq "4"; then
+ AC_DEFINE(HAVE_FLISTXATTR_4, 1, [flistxattr() takes 4 args])
+ fi
+ #
+ ac_cv_func_flistxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_flistxattr="no"
+ fi
+])
+
+
dnl CURL_CHECK_FUNC_FREEADDRINFO
dnl -------------------------------------------------
dnl Verify if freeaddrinfo is available, prototyped,
@@ -1410,6 +1674,250 @@ AC_DEFUN([CURL_CHECK_FUNC_FREEIFADDRS], [
])
+dnl CURL_CHECK_FUNC_FREMOVEXATTR
+dnl -------------------------------------------------
+dnl Verify if fremovexattr is available, prototyped, and
+dnl can be compiled. If all of these are true, and
+dnl usage has not been previously disallowed with
+dnl shell variable curl_disallow_fremovexattr, then
+dnl HAVE_FREMOVEXATTR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_FREMOVEXATTR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])dnl
+ #
+ tst_links_fremovexattr="unknown"
+ tst_proto_fremovexattr="unknown"
+ tst_compi_fremovexattr="unknown"
+ tst_allow_fremovexattr="unknown"
+ tst_nargs_fremovexattr="unknown"
+ #
+ AC_MSG_CHECKING([if fremovexattr can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([fremovexattr])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_fremovexattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_fremovexattr="no"
+ ])
+ #
+ if test "$tst_links_fremovexattr" = "yes"; then
+ AC_MSG_CHECKING([if fremovexattr is prototyped])
+ AC_EGREP_CPP([fremovexattr],[
+ $curl_includes_sys_xattr
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_fremovexattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_fremovexattr="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_fremovexattr" = "yes"; then
+ if test "$tst_nargs_fremovexattr" = "unknown"; then
+ AC_MSG_CHECKING([if fremovexattr takes 2 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != fremovexattr(0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_fremovexattr="yes"
+ tst_nargs_fremovexattr="2"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_fremovexattr="no"
+ ])
+ fi
+ if test "$tst_nargs_fremovexattr" = "unknown"; then
+ AC_MSG_CHECKING([if fremovexattr takes 3 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != fremovexattr(0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_fremovexattr="yes"
+ tst_nargs_fremovexattr="3"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_fremovexattr="no"
+ ])
+ fi
+ AC_MSG_CHECKING([if fremovexattr is compilable])
+ if test "$tst_compi_fremovexattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ #
+ if test "$tst_compi_fremovexattr" = "yes"; then
+ AC_MSG_CHECKING([if fremovexattr usage allowed])
+ if test "x$curl_disallow_fremovexattr" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_fremovexattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_fremovexattr="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if fremovexattr might be used])
+ if test "$tst_links_fremovexattr" = "yes" &&
+ test "$tst_proto_fremovexattr" = "yes" &&
+ test "$tst_compi_fremovexattr" = "yes" &&
+ test "$tst_allow_fremovexattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_FREMOVEXATTR, 1,
+ [Define to 1 if you have the fremovexattr function.])
+ dnl AC_DEFINE_UNQUOTED(FREMOVEXATTR_ARGS, $tst_nargs_fremovexattr,
+ dnl [Specifies the number of arguments to fremovexattr])
+ #
+ if test "$tst_nargs_fremovexattr" -eq "2"; then
+ AC_DEFINE(HAVE_FREMOVEXATTR_2, 1, [fremovexattr() takes 2 args])
+ elif test "$tst_nargs_fremovexattr" -eq "3"; then
+ AC_DEFINE(HAVE_FREMOVEXATTR_3, 1, [fremovexattr() takes 3 args])
+ fi
+ #
+ ac_cv_func_fremovexattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_fremovexattr="no"
+ fi
+])
+
+
+dnl CURL_CHECK_FUNC_FSETXATTR
+dnl -------------------------------------------------
+dnl Verify if fsetxattr is available, prototyped, and
+dnl can be compiled. If all of these are true, and
+dnl usage has not been previously disallowed with
+dnl shell variable curl_disallow_fsetxattr, then
+dnl HAVE_FSETXATTR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_FSETXATTR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])dnl
+ #
+ tst_links_fsetxattr="unknown"
+ tst_proto_fsetxattr="unknown"
+ tst_compi_fsetxattr="unknown"
+ tst_allow_fsetxattr="unknown"
+ tst_nargs_fsetxattr="unknown"
+ #
+ AC_MSG_CHECKING([if fsetxattr can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([fsetxattr])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_fsetxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_fsetxattr="no"
+ ])
+ #
+ if test "$tst_links_fsetxattr" = "yes"; then
+ AC_MSG_CHECKING([if fsetxattr is prototyped])
+ AC_EGREP_CPP([fsetxattr],[
+ $curl_includes_sys_xattr
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_fsetxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_fsetxattr="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_fsetxattr" = "yes"; then
+ if test "$tst_nargs_fsetxattr" = "unknown"; then
+ AC_MSG_CHECKING([if fsetxattr takes 5 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != fsetxattr(0, 0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_fsetxattr="yes"
+ tst_nargs_fsetxattr="5"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_fsetxattr="no"
+ ])
+ fi
+ if test "$tst_nargs_fsetxattr" = "unknown"; then
+ AC_MSG_CHECKING([if fsetxattr takes 6 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != fsetxattr(0, 0, 0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_fsetxattr="yes"
+ tst_nargs_fsetxattr="6"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_fsetxattr="no"
+ ])
+ fi
+ AC_MSG_CHECKING([if fsetxattr is compilable])
+ if test "$tst_compi_fsetxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ #
+ if test "$tst_compi_fsetxattr" = "yes"; then
+ AC_MSG_CHECKING([if fsetxattr usage allowed])
+ if test "x$curl_disallow_fsetxattr" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_fsetxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_fsetxattr="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if fsetxattr might be used])
+ if test "$tst_links_fsetxattr" = "yes" &&
+ test "$tst_proto_fsetxattr" = "yes" &&
+ test "$tst_compi_fsetxattr" = "yes" &&
+ test "$tst_allow_fsetxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_FSETXATTR, 1,
+ [Define to 1 if you have the fsetxattr function.])
+ dnl AC_DEFINE_UNQUOTED(FSETXATTR_ARGS, $tst_nargs_fsetxattr,
+ dnl [Specifies the number of arguments to fsetxattr])
+ #
+ if test "$tst_nargs_fsetxattr" -eq "5"; then
+ AC_DEFINE(HAVE_FSETXATTR_5, 1, [fsetxattr() takes 5 args])
+ elif test "$tst_nargs_fsetxattr" -eq "6"; then
+ AC_DEFINE(HAVE_FSETXATTR_6, 1, [fsetxattr() takes 6 args])
+ fi
+ #
+ ac_cv_func_fsetxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_fsetxattr="no"
+ fi
+])
+
+
dnl CURL_CHECK_FUNC_FTRUNCATE
dnl -------------------------------------------------
dnl Verify if ftruncate is available, prototyped, and
@@ -1512,6 +2020,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
AC_REQUIRE([CURL_INCLUDES_STRING])dnl
AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
#
tst_links_getaddrinfo="unknown"
tst_proto_getaddrinfo="unknown"
@@ -1688,19 +2197,58 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
tst_tsafe_getaddrinfo="yes"
;;
esac
+ if test "$tst_tsafe_getaddrinfo" = "unknown" &&
+ test "$ac_cv_native_windows" = "yes"; then
+ tst_tsafe_getaddrinfo="yes"
+ fi
if test "$tst_tsafe_getaddrinfo" = "unknown"; then
CURL_CHECK_DEF_CC([h_errno], [
- $curl_includes_ws2tcpip
$curl_includes_sys_socket
$curl_includes_netdb
], [silent])
- if test "$curl_cv_have_def_h_errno" = "no"; then
+ if test "$curl_cv_have_def_h_errno" = "yes"; then
+ tst_h_errno_macro="yes"
+ else
+ tst_h_errno_macro="no"
+ fi
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_socket
+ $curl_includes_netdb
+ ]],[[
+ h_errno = 2;
+ if(0 != h_errno)
+ return 1;
+ ]])
+ ],[
+ tst_h_errno_modifiable_lvalue="yes"
+ ],[
+ tst_h_errno_modifiable_lvalue="no"
+ ])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ ]],[[
+#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
+ return 0;
+#elif defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 700)
+ return 0;
+#else
+ force compilation error
+#endif
+ ]])
+ ],[
+ tst_h_errno_sbs_issue_7="yes"
+ ],[
+ tst_h_errno_sbs_issue_7="no"
+ ])
+ if test "$tst_h_errno_macro" = "no" &&
+ test "$tst_h_errno_modifiable_lvalue" = "no" &&
+ test "$tst_h_errno_sbs_issue_7" = "no"; then
tst_tsafe_getaddrinfo="no"
+ else
+ tst_tsafe_getaddrinfo="yes"
fi
fi
- if test "$tst_tsafe_getaddrinfo" = "unknown"; then
- tst_tsafe_getaddrinfo="yes"
- fi
AC_MSG_RESULT([$tst_tsafe_getaddrinfo])
if test "$tst_tsafe_getaddrinfo" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1,
@@ -1806,6 +2354,99 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYADDR], [
fi
])
+dnl CURL_CHECK_FUNC_GAI_STRERROR
+dnl -------------------------------------------------
+dnl Verify if gai_strerror is available, prototyped,
+dnl and can be compiled. If all of these are true,
+dnl and usage has not been previously disallowed with
+dnl shell variable curl_disallow_gai_strerror, then
+dnl HAVE_GAI_STRERROR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_GAI_STRERROR], [
+ AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
+ AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
+ #
+ tst_links_gai_strerror="unknown"
+ tst_proto_gai_strerror="unknown"
+ tst_compi_gai_strerror="unknown"
+ tst_allow_gai_strerror="unknown"
+ #
+ AC_MSG_CHECKING([if gai_strerror can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_winsock2
+ $curl_includes_netdb
+ ]],[[
+ if(0 != gai_strerror(0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_gai_strerror="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_gai_strerror="no"
+ ])
+ #
+ if test "$tst_links_gai_strerror" = "yes"; then
+ AC_MSG_CHECKING([if gai_strerror is prototyped])
+ AC_EGREP_CPP([gai_strerror],[
+ $curl_includes_winsock2
+ $curl_includes_netdb
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_gai_strerror="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_gai_strerror="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_gai_strerror" = "yes"; then
+ AC_MSG_CHECKING([if gai_strerror is compilable])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_winsock2
+ $curl_includes_netdb
+ ]],[[
+ if(0 != gai_strerror(0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_gai_strerror="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_gai_strerror="no"
+ ])
+ fi
+ #
+ if test "$tst_compi_gai_strerror" = "yes"; then
+ AC_MSG_CHECKING([if gai_strerror usage allowed])
+ if test "x$curl_disallow_gai_strerror" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_gai_strerror="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_gai_strerror="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if gai_strerror might be used])
+ if test "$tst_links_gai_strerror" = "yes" &&
+ test "$tst_proto_gai_strerror" = "yes" &&
+ test "$tst_compi_gai_strerror" = "yes" &&
+ test "$tst_allow_gai_strerror" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_GAI_STRERROR, 1,
+ [Define to 1 if you have the gai_strerror function.])
+ ac_cv_func_gai_strerror="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_gai_strerror="no"
+ fi
+])
+
dnl CURL_CHECK_FUNC_GETHOSTBYADDR_R
dnl -------------------------------------------------
@@ -2196,6 +2837,7 @@ dnl HAVE_GETHOSTNAME will be defined.
AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
AC_REQUIRE([CURL_INCLUDES_UNISTD])dnl
+ AC_REQUIRE([CURL_PREPROCESS_CALLCONV])dnl
#
tst_links_gethostname="unknown"
tst_proto_gethostname="unknown"
@@ -2253,6 +2895,35 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
fi
#
if test "$tst_compi_gethostname" = "yes"; then
+ AC_MSG_CHECKING([for gethostname arg 2 data type])
+ tst_gethostname_type_arg2="unknown"
+ for tst_arg1 in 'char *' 'unsigned char *' 'void *'; do
+ for tst_arg2 in 'int' 'unsigned int' 'size_t'; do
+ if test "$tst_gethostname_type_arg2" = "unknown"; then
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_winsock2
+ $curl_includes_unistd
+ $curl_preprocess_callconv
+ extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2);
+ ]],[[
+ if(0 != gethostname(0, 0))
+ return 1;
+ ]])
+ ],[
+ tst_gethostname_type_arg2="$tst_arg2"
+ ])
+ fi
+ done
+ done
+ AC_MSG_RESULT([$tst_gethostname_type_arg2])
+ if test "$tst_gethostname_type_arg2" != "unknown"; then
+ AC_DEFINE_UNQUOTED(GETHOSTNAME_TYPE_ARG2, $tst_gethostname_type_arg2,
+ [Define to the type of arg 2 for gethostname.])
+ fi
+ fi
+ #
+ if test "$tst_compi_gethostname" = "yes"; then
AC_MSG_CHECKING([if gethostname usage allowed])
if test "x$curl_disallow_gethostname" != "xyes"; then
AC_MSG_RESULT([yes])
@@ -2535,6 +3206,128 @@ AC_DEFUN([CURL_CHECK_FUNC_GETSERVBYPORT_R], [
])
+dnl CURL_CHECK_FUNC_GETXATTR
+dnl -------------------------------------------------
+dnl Verify if getxattr is available, prototyped, and
+dnl can be compiled. If all of these are true, and
+dnl usage has not been previously disallowed with
+dnl shell variable curl_disallow_getxattr, then
+dnl HAVE_GETXATTR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_GETXATTR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])dnl
+ #
+ tst_links_getxattr="unknown"
+ tst_proto_getxattr="unknown"
+ tst_compi_getxattr="unknown"
+ tst_allow_getxattr="unknown"
+ tst_nargs_getxattr="unknown"
+ #
+ AC_MSG_CHECKING([if getxattr can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([getxattr])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_getxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_getxattr="no"
+ ])
+ #
+ if test "$tst_links_getxattr" = "yes"; then
+ AC_MSG_CHECKING([if getxattr is prototyped])
+ AC_EGREP_CPP([getxattr],[
+ $curl_includes_sys_xattr
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_getxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_getxattr="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_getxattr" = "yes"; then
+ if test "$tst_nargs_getxattr" = "unknown"; then
+ AC_MSG_CHECKING([if getxattr takes 4 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != getxattr(0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_getxattr="yes"
+ tst_nargs_getxattr="4"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_getxattr="no"
+ ])
+ fi
+ if test "$tst_nargs_getxattr" = "unknown"; then
+ AC_MSG_CHECKING([if getxattr takes 6 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != getxattr(0, 0, 0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_getxattr="yes"
+ tst_nargs_getxattr="6"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_getxattr="no"
+ ])
+ fi
+ AC_MSG_CHECKING([if getxattr is compilable])
+ if test "$tst_compi_getxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ #
+ if test "$tst_compi_getxattr" = "yes"; then
+ AC_MSG_CHECKING([if getxattr usage allowed])
+ if test "x$curl_disallow_getxattr" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_getxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_getxattr="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if getxattr might be used])
+ if test "$tst_links_getxattr" = "yes" &&
+ test "$tst_proto_getxattr" = "yes" &&
+ test "$tst_compi_getxattr" = "yes" &&
+ test "$tst_allow_getxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_GETXATTR, 1,
+ [Define to 1 if you have the getxattr function.])
+ dnl AC_DEFINE_UNQUOTED(GETXATTR_ARGS, $tst_nargs_getxattr,
+ dnl [Specifies the number of arguments to getxattr])
+ #
+ if test "$tst_nargs_getxattr" -eq "4"; then
+ AC_DEFINE(HAVE_GETXATTR_4, 1, [getxattr() takes 4 args])
+ elif test "$tst_nargs_getxattr" -eq "6"; then
+ AC_DEFINE(HAVE_GETXATTR_6, 1, [getxattr() takes 6 args])
+ fi
+ #
+ ac_cv_func_getxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_getxattr="no"
+ fi
+])
+
+
dnl CURL_CHECK_FUNC_GMTIME_R
dnl -------------------------------------------------
dnl Verify if gmtime_r is available, prototyped, can
@@ -3574,6 +4367,128 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL_FIONBIO], [
])
+dnl CURL_CHECK_FUNC_LISTXATTR
+dnl -------------------------------------------------
+dnl Verify if listxattr is available, prototyped, and
+dnl can be compiled. If all of these are true, and
+dnl usage has not been previously disallowed with
+dnl shell variable curl_disallow_listxattr, then
+dnl HAVE_LISTXATTR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_LISTXATTR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])dnl
+ #
+ tst_links_listxattr="unknown"
+ tst_proto_listxattr="unknown"
+ tst_compi_listxattr="unknown"
+ tst_allow_listxattr="unknown"
+ tst_nargs_listxattr="unknown"
+ #
+ AC_MSG_CHECKING([if listxattr can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([listxattr])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_listxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_listxattr="no"
+ ])
+ #
+ if test "$tst_links_listxattr" = "yes"; then
+ AC_MSG_CHECKING([if listxattr is prototyped])
+ AC_EGREP_CPP([listxattr],[
+ $curl_includes_sys_xattr
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_listxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_listxattr="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_listxattr" = "yes"; then
+ if test "$tst_nargs_listxattr" = "unknown"; then
+ AC_MSG_CHECKING([if listxattr takes 3 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != listxattr(0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_listxattr="yes"
+ tst_nargs_listxattr="3"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_listxattr="no"
+ ])
+ fi
+ if test "$tst_nargs_listxattr" = "unknown"; then
+ AC_MSG_CHECKING([if listxattr takes 4 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != listxattr(0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_listxattr="yes"
+ tst_nargs_listxattr="4"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_listxattr="no"
+ ])
+ fi
+ AC_MSG_CHECKING([if listxattr is compilable])
+ if test "$tst_compi_listxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ #
+ if test "$tst_compi_listxattr" = "yes"; then
+ AC_MSG_CHECKING([if listxattr usage allowed])
+ if test "x$curl_disallow_listxattr" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_listxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_listxattr="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if listxattr might be used])
+ if test "$tst_links_listxattr" = "yes" &&
+ test "$tst_proto_listxattr" = "yes" &&
+ test "$tst_compi_listxattr" = "yes" &&
+ test "$tst_allow_listxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_LISTXATTR, 1,
+ [Define to 1 if you have the listxattr function.])
+ dnl AC_DEFINE_UNQUOTED(LISTXATTR_ARGS, $tst_nargs_listxattr,
+ dnl [Specifies the number of arguments to listxattr])
+ #
+ if test "$tst_nargs_listxattr" -eq "3"; then
+ AC_DEFINE(HAVE_LISTXATTR_3, 1, [listxattr() takes 3 args])
+ elif test "$tst_nargs_listxattr" -eq "4"; then
+ AC_DEFINE(HAVE_LISTXATTR_4, 1, [listxattr() takes 4 args])
+ fi
+ #
+ ac_cv_func_listxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_listxattr="no"
+ fi
+])
+
+
dnl CURL_CHECK_FUNC_LOCALTIME_R
dnl -------------------------------------------------
dnl Verify if localtime_r is available, prototyped, can
@@ -3814,7 +4729,7 @@ AC_DEFUN([CURL_CHECK_FUNC_POLL], [
tst_allow_poll="unknown"
#
case $host_os in
- darwin*|interix*)
+ darwin[[123456789]].*|darwin10.*|darwin11.*|darwin12.*|interix*)
dnl poll() does not work on these platforms
dnl Interix: "does provide poll(), but the implementing developer must
dnl have been in a bad mood, because poll() only works on the /proc
@@ -3924,6 +4839,128 @@ AC_DEFUN([CURL_CHECK_FUNC_POLL], [
])
+dnl CURL_CHECK_FUNC_REMOVEXATTR
+dnl -------------------------------------------------
+dnl Verify if removexattr is available, prototyped, and
+dnl can be compiled. If all of these are true, and
+dnl usage has not been previously disallowed with
+dnl shell variable curl_disallow_removexattr, then
+dnl HAVE_REMOVEXATTR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_REMOVEXATTR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])dnl
+ #
+ tst_links_removexattr="unknown"
+ tst_proto_removexattr="unknown"
+ tst_compi_removexattr="unknown"
+ tst_allow_removexattr="unknown"
+ tst_nargs_removexattr="unknown"
+ #
+ AC_MSG_CHECKING([if removexattr can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([removexattr])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_removexattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_removexattr="no"
+ ])
+ #
+ if test "$tst_links_removexattr" = "yes"; then
+ AC_MSG_CHECKING([if removexattr is prototyped])
+ AC_EGREP_CPP([removexattr],[
+ $curl_includes_sys_xattr
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_removexattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_removexattr="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_removexattr" = "yes"; then
+ if test "$tst_nargs_removexattr" = "unknown"; then
+ AC_MSG_CHECKING([if removexattr takes 2 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != removexattr(0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_removexattr="yes"
+ tst_nargs_removexattr="2"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_removexattr="no"
+ ])
+ fi
+ if test "$tst_nargs_removexattr" = "unknown"; then
+ AC_MSG_CHECKING([if removexattr takes 3 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != removexattr(0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_removexattr="yes"
+ tst_nargs_removexattr="3"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_removexattr="no"
+ ])
+ fi
+ AC_MSG_CHECKING([if removexattr is compilable])
+ if test "$tst_compi_removexattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ #
+ if test "$tst_compi_removexattr" = "yes"; then
+ AC_MSG_CHECKING([if removexattr usage allowed])
+ if test "x$curl_disallow_removexattr" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_removexattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_removexattr="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if removexattr might be used])
+ if test "$tst_links_removexattr" = "yes" &&
+ test "$tst_proto_removexattr" = "yes" &&
+ test "$tst_compi_removexattr" = "yes" &&
+ test "$tst_allow_removexattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_REMOVEXATTR, 1,
+ [Define to 1 if you have the removexattr function.])
+ dnl AC_DEFINE_UNQUOTED(REMOVEXATTR_ARGS, $tst_nargs_removexattr,
+ dnl [Specifies the number of arguments to removexattr])
+ #
+ if test "$tst_nargs_removexattr" -eq "2"; then
+ AC_DEFINE(HAVE_REMOVEXATTR_2, 1, [removexattr() takes 2 args])
+ elif test "$tst_nargs_removexattr" -eq "3"; then
+ AC_DEFINE(HAVE_REMOVEXATTR_3, 1, [removexattr() takes 3 args])
+ fi
+ #
+ ac_cv_func_removexattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_removexattr="no"
+ fi
+])
+
+
dnl CURL_CHECK_FUNC_SETSOCKOPT
dnl -------------------------------------------------
dnl Verify if setsockopt is available, prototyped, and
@@ -4075,6 +5112,128 @@ AC_DEFUN([CURL_CHECK_FUNC_SETSOCKOPT_SO_NONBLOCK], [
])
+dnl CURL_CHECK_FUNC_SETXATTR
+dnl -------------------------------------------------
+dnl Verify if setxattr is available, prototyped, and
+dnl can be compiled. If all of these are true, and
+dnl usage has not been previously disallowed with
+dnl shell variable curl_disallow_setxattr, then
+dnl HAVE_SETXATTR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_SETXATTR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_XATTR])dnl
+ #
+ tst_links_setxattr="unknown"
+ tst_proto_setxattr="unknown"
+ tst_compi_setxattr="unknown"
+ tst_allow_setxattr="unknown"
+ tst_nargs_setxattr="unknown"
+ #
+ AC_MSG_CHECKING([if setxattr can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([setxattr])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_setxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_setxattr="no"
+ ])
+ #
+ if test "$tst_links_setxattr" = "yes"; then
+ AC_MSG_CHECKING([if setxattr is prototyped])
+ AC_EGREP_CPP([setxattr],[
+ $curl_includes_sys_xattr
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_setxattr="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_setxattr="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_setxattr" = "yes"; then
+ if test "$tst_nargs_setxattr" = "unknown"; then
+ AC_MSG_CHECKING([if setxattr takes 5 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != setxattr(0, 0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_setxattr="yes"
+ tst_nargs_setxattr="5"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_setxattr="no"
+ ])
+ fi
+ if test "$tst_nargs_setxattr" = "unknown"; then
+ AC_MSG_CHECKING([if setxattr takes 6 args.])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_xattr
+ ]],[[
+ if(0 != setxattr(0, 0, 0, 0, 0, 0))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_setxattr="yes"
+ tst_nargs_setxattr="6"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_setxattr="no"
+ ])
+ fi
+ AC_MSG_CHECKING([if setxattr is compilable])
+ if test "$tst_compi_setxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ #
+ if test "$tst_compi_setxattr" = "yes"; then
+ AC_MSG_CHECKING([if setxattr usage allowed])
+ if test "x$curl_disallow_setxattr" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_setxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_setxattr="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if setxattr might be used])
+ if test "$tst_links_setxattr" = "yes" &&
+ test "$tst_proto_setxattr" = "yes" &&
+ test "$tst_compi_setxattr" = "yes" &&
+ test "$tst_allow_setxattr" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_SETXATTR, 1,
+ [Define to 1 if you have the setxattr function.])
+ dnl AC_DEFINE_UNQUOTED(SETXATTR_ARGS, $tst_nargs_setxattr,
+ dnl [Specifies the number of arguments to setxattr])
+ #
+ if test "$tst_nargs_setxattr" -eq "5"; then
+ AC_DEFINE(HAVE_SETXATTR_5, 1, [setxattr() takes 5 args])
+ elif test "$tst_nargs_setxattr" -eq "6"; then
+ AC_DEFINE(HAVE_SETXATTR_6, 1, [setxattr() takes 6 args])
+ fi
+ #
+ ac_cv_func_setxattr="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_setxattr="no"
+ fi
+])
+
+
dnl CURL_CHECK_FUNC_SIGACTION
dnl -------------------------------------------------
dnl Verify if sigaction is available, prototyped, and
@@ -4535,176 +5694,179 @@ AC_DEFUN([CURL_CHECK_FUNC_SOCKET], [
])
-dnl CURL_CHECK_FUNC_STRCASECMP
+dnl CURL_CHECK_FUNC_SOCKETPAIR
dnl -------------------------------------------------
-dnl Verify if strcasecmp is available, prototyped, and
+dnl Verify if socketpair is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_strcasecmp, then
-dnl HAVE_STRCASECMP will be defined.
+dnl shell variable curl_disallow_socketpair, then
+dnl HAVE_SOCKETPAIR will be defined.
-AC_DEFUN([CURL_CHECK_FUNC_STRCASECMP], [
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
+AC_DEFUN([CURL_CHECK_FUNC_SOCKETPAIR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
+ AC_REQUIRE([CURL_INCLUDES_SOCKET])dnl
#
- tst_links_strcasecmp="unknown"
- tst_proto_strcasecmp="unknown"
- tst_compi_strcasecmp="unknown"
- tst_allow_strcasecmp="unknown"
+ tst_links_socketpair="unknown"
+ tst_proto_socketpair="unknown"
+ tst_compi_socketpair="unknown"
+ tst_allow_socketpair="unknown"
#
- AC_MSG_CHECKING([if strcasecmp can be linked])
+ AC_MSG_CHECKING([if socketpair can be linked])
AC_LINK_IFELSE([
- AC_LANG_FUNC_LINK_TRY([strcasecmp])
+ AC_LANG_FUNC_LINK_TRY([socketpair])
],[
AC_MSG_RESULT([yes])
- tst_links_strcasecmp="yes"
+ tst_links_socketpair="yes"
],[
AC_MSG_RESULT([no])
- tst_links_strcasecmp="no"
+ tst_links_socketpair="no"
])
#
- if test "$tst_links_strcasecmp" = "yes"; then
- AC_MSG_CHECKING([if strcasecmp is prototyped])
- AC_EGREP_CPP([strcasecmp],[
- $curl_includes_string
+ if test "$tst_links_socketpair" = "yes"; then
+ AC_MSG_CHECKING([if socketpair is prototyped])
+ AC_EGREP_CPP([socketpair],[
+ $curl_includes_sys_socket
+ $curl_includes_socket
],[
AC_MSG_RESULT([yes])
- tst_proto_strcasecmp="yes"
+ tst_proto_socketpair="yes"
],[
AC_MSG_RESULT([no])
- tst_proto_strcasecmp="no"
+ tst_proto_socketpair="no"
])
fi
#
- if test "$tst_proto_strcasecmp" = "yes"; then
- AC_MSG_CHECKING([if strcasecmp is compilable])
+ if test "$tst_proto_socketpair" = "yes"; then
+ AC_MSG_CHECKING([if socketpair is compilable])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
- $curl_includes_string
+ $curl_includes_sys_socket
+ $curl_includes_socket
]],[[
- if(0 != strcasecmp(0, 0))
+ int sv[2];
+ if(0 != socketpair(0, 0, 0, sv))
return 1;
]])
],[
AC_MSG_RESULT([yes])
- tst_compi_strcasecmp="yes"
+ tst_compi_socketpair="yes"
],[
AC_MSG_RESULT([no])
- tst_compi_strcasecmp="no"
+ tst_compi_socketpair="no"
])
fi
#
- if test "$tst_compi_strcasecmp" = "yes"; then
- AC_MSG_CHECKING([if strcasecmp usage allowed])
- if test "x$curl_disallow_strcasecmp" != "xyes"; then
+ if test "$tst_compi_socketpair" = "yes"; then
+ AC_MSG_CHECKING([if socketpair usage allowed])
+ if test "x$curl_disallow_socketpair" != "xyes"; then
AC_MSG_RESULT([yes])
- tst_allow_strcasecmp="yes"
+ tst_allow_socketpair="yes"
else
AC_MSG_RESULT([no])
- tst_allow_strcasecmp="no"
+ tst_allow_socketpair="no"
fi
fi
#
- AC_MSG_CHECKING([if strcasecmp might be used])
- if test "$tst_links_strcasecmp" = "yes" &&
- test "$tst_proto_strcasecmp" = "yes" &&
- test "$tst_compi_strcasecmp" = "yes" &&
- test "$tst_allow_strcasecmp" = "yes"; then
+ AC_MSG_CHECKING([if socketpair might be used])
+ if test "$tst_links_socketpair" = "yes" &&
+ test "$tst_proto_socketpair" = "yes" &&
+ test "$tst_compi_socketpair" = "yes" &&
+ test "$tst_allow_socketpair" = "yes"; then
AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_STRCASECMP, 1,
- [Define to 1 if you have the strcasecmp function.])
- ac_cv_func_strcasecmp="yes"
+ AC_DEFINE_UNQUOTED(HAVE_SOCKETPAIR, 1,
+ [Define to 1 if you have the socketpair function.])
+ ac_cv_func_socketpair="yes"
else
AC_MSG_RESULT([no])
- ac_cv_func_strcasecmp="no"
+ ac_cv_func_socketpair="no"
fi
])
-dnl CURL_CHECK_FUNC_STRCASESTR
+dnl CURL_CHECK_FUNC_STRCASECMP
dnl -------------------------------------------------
-dnl Verify if strcasestr is available, prototyped, and
+dnl Verify if strcasecmp is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_strcasestr, then
-dnl HAVE_STRCASESTR will be defined.
+dnl shell variable curl_disallow_strcasecmp, then
+dnl HAVE_STRCASECMP will be defined.
-AC_DEFUN([CURL_CHECK_FUNC_STRCASESTR], [
+AC_DEFUN([CURL_CHECK_FUNC_STRCASECMP], [
AC_REQUIRE([CURL_INCLUDES_STRING])dnl
#
- tst_links_strcasestr="unknown"
- tst_proto_strcasestr="unknown"
- tst_compi_strcasestr="unknown"
- tst_allow_strcasestr="unknown"
+ tst_links_strcasecmp="unknown"
+ tst_proto_strcasecmp="unknown"
+ tst_compi_strcasecmp="unknown"
+ tst_allow_strcasecmp="unknown"
#
- AC_MSG_CHECKING([if strcasestr can be linked])
+ AC_MSG_CHECKING([if strcasecmp can be linked])
AC_LINK_IFELSE([
- AC_LANG_FUNC_LINK_TRY([strcasestr])
+ AC_LANG_FUNC_LINK_TRY([strcasecmp])
],[
AC_MSG_RESULT([yes])
- tst_links_strcasestr="yes"
+ tst_links_strcasecmp="yes"
],[
AC_MSG_RESULT([no])
- tst_links_strcasestr="no"
+ tst_links_strcasecmp="no"
])
#
- if test "$tst_links_strcasestr" = "yes"; then
- AC_MSG_CHECKING([if strcasestr is prototyped])
- AC_EGREP_CPP([strcasestr],[
+ if test "$tst_links_strcasecmp" = "yes"; then
+ AC_MSG_CHECKING([if strcasecmp is prototyped])
+ AC_EGREP_CPP([strcasecmp],[
$curl_includes_string
],[
AC_MSG_RESULT([yes])
- tst_proto_strcasestr="yes"
+ tst_proto_strcasecmp="yes"
],[
AC_MSG_RESULT([no])
- tst_proto_strcasestr="no"
+ tst_proto_strcasecmp="no"
])
fi
#
- if test "$tst_proto_strcasestr" = "yes"; then
- AC_MSG_CHECKING([if strcasestr is compilable])
+ if test "$tst_proto_strcasecmp" = "yes"; then
+ AC_MSG_CHECKING([if strcasecmp is compilable])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_string
]],[[
- if(0 != strcasestr(0, 0))
+ if(0 != strcasecmp(0, 0))
return 1;
]])
],[
AC_MSG_RESULT([yes])
- tst_compi_strcasestr="yes"
+ tst_compi_strcasecmp="yes"
],[
AC_MSG_RESULT([no])
- tst_compi_strcasestr="no"
+ tst_compi_strcasecmp="no"
])
fi
#
- if test "$tst_compi_strcasestr" = "yes"; then
- AC_MSG_CHECKING([if strcasestr usage allowed])
- if test "x$curl_disallow_strcasestr" != "xyes"; then
+ if test "$tst_compi_strcasecmp" = "yes"; then
+ AC_MSG_CHECKING([if strcasecmp usage allowed])
+ if test "x$curl_disallow_strcasecmp" != "xyes"; then
AC_MSG_RESULT([yes])
- tst_allow_strcasestr="yes"
+ tst_allow_strcasecmp="yes"
else
AC_MSG_RESULT([no])
- tst_allow_strcasestr="no"
+ tst_allow_strcasecmp="no"
fi
fi
#
- AC_MSG_CHECKING([if strcasestr might be used])
- if test "$tst_links_strcasestr" = "yes" &&
- test "$tst_proto_strcasestr" = "yes" &&
- test "$tst_compi_strcasestr" = "yes" &&
- test "$tst_allow_strcasestr" = "yes"; then
+ AC_MSG_CHECKING([if strcasecmp might be used])
+ if test "$tst_links_strcasecmp" = "yes" &&
+ test "$tst_proto_strcasecmp" = "yes" &&
+ test "$tst_compi_strcasecmp" = "yes" &&
+ test "$tst_allow_strcasecmp" = "yes"; then
AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_STRCASESTR, 1,
- [Define to 1 if you have the strcasestr function.])
- ac_cv_func_strcasestr="yes"
+ AC_DEFINE_UNQUOTED(HAVE_STRCASECMP, 1,
+ [Define to 1 if you have the strcasecmp function.])
+ ac_cv_func_strcasecmp="yes"
else
AC_MSG_RESULT([no])
- ac_cv_func_strcasestr="no"
+ ac_cv_func_strcasecmp="no"
fi
])
-
dnl CURL_CHECK_FUNC_STRCMPI
dnl -------------------------------------------------
dnl Verify if strcmpi is available, prototyped, and
@@ -4964,8 +6126,8 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_string
- ]],[[
char *strerror_r(int errnum, char *workbuf, $arg3 bufsize);
+ ]],[[
if(0 != strerror_r(0, 0, 0))
return 1;
]])
@@ -5025,8 +6187,8 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_string
- ]],[[
int strerror_r(int errnum, char *resultbuf, $arg3 bufsize);
+ ]],[[
if(0 != strerror_r(0, 0, 0))
return 1;
]])
@@ -5224,92 +6386,6 @@ AC_DEFUN([CURL_CHECK_FUNC_STRICMP], [
fi
])
-
-dnl CURL_CHECK_FUNC_STRLCAT
-dnl -------------------------------------------------
-dnl Verify if strlcat is available, prototyped, and
-dnl can be compiled. If all of these are true, and
-dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_strlcat, then
-dnl HAVE_STRLCAT will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_STRLCAT], [
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- #
- tst_links_strlcat="unknown"
- tst_proto_strlcat="unknown"
- tst_compi_strlcat="unknown"
- tst_allow_strlcat="unknown"
- #
- AC_MSG_CHECKING([if strlcat can be linked])
- AC_LINK_IFELSE([
- AC_LANG_FUNC_LINK_TRY([strlcat])
- ],[
- AC_MSG_RESULT([yes])
- tst_links_strlcat="yes"
- ],[
- AC_MSG_RESULT([no])
- tst_links_strlcat="no"
- ])
- #
- if test "$tst_links_strlcat" = "yes"; then
- AC_MSG_CHECKING([if strlcat is prototyped])
- AC_EGREP_CPP([strlcat],[
- $curl_includes_string
- ],[
- AC_MSG_RESULT([yes])
- tst_proto_strlcat="yes"
- ],[
- AC_MSG_RESULT([no])
- tst_proto_strlcat="no"
- ])
- fi
- #
- if test "$tst_proto_strlcat" = "yes"; then
- AC_MSG_CHECKING([if strlcat is compilable])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- $curl_includes_string
- ]],[[
- if(0 != strlcat(0, 0, 0))
- return 1;
- ]])
- ],[
- AC_MSG_RESULT([yes])
- tst_compi_strlcat="yes"
- ],[
- AC_MSG_RESULT([no])
- tst_compi_strlcat="no"
- ])
- fi
- #
- if test "$tst_compi_strlcat" = "yes"; then
- AC_MSG_CHECKING([if strlcat usage allowed])
- if test "x$curl_disallow_strlcat" != "xyes"; then
- AC_MSG_RESULT([yes])
- tst_allow_strlcat="yes"
- else
- AC_MSG_RESULT([no])
- tst_allow_strlcat="no"
- fi
- fi
- #
- AC_MSG_CHECKING([if strlcat might be used])
- if test "$tst_links_strlcat" = "yes" &&
- test "$tst_proto_strlcat" = "yes" &&
- test "$tst_compi_strlcat" = "yes" &&
- test "$tst_allow_strlcat" = "yes"; then
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_STRLCAT, 1,
- [Define to 1 if you have the strlcat function.])
- ac_cv_func_strlcat="yes"
- else
- AC_MSG_RESULT([no])
- ac_cv_func_strlcat="no"
- fi
-])
-
-
dnl CURL_CHECK_FUNC_STRNCASECMP
dnl -------------------------------------------------
dnl Verify if strncasecmp is available, prototyped, and
diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4
new file mode 100644
index 00000000..5f5f87ae
--- /dev/null
+++ b/m4/curl-openssl.m4
@@ -0,0 +1,269 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+#***************************************************************************
+
+# File version for 'aclocal' use. Keep it a single number.
+# serial 5
+
+
+dnl CURL_CHECK_OPENSSL_API_HEADERS
+dnl -------------------------------------------------
+dnl Find out OpenSSL headers API version, as reported
+dnl by OPENSSL_VERSION_NUMBER. No runtime checks
+dnl allowed here for cross-compilation support.
+dnl HAVE_OPENSSL_API_HEADERS is defined as apprpriate
+dnl only for systems which actually run the configure
+dnl script. Config files generated manually or in any
+dnl other way shall not define this.
+
+AC_DEFUN([CURL_CHECK_OPENSSL_API_HEADERS], [
+ #
+ tst_api="unknown"
+ #
+ AC_MSG_CHECKING([for OpenSSL headers version])
+ CURL_CHECK_DEF([OPENSSL_VERSION_NUMBER], [
+# ifdef USE_OPENSSL
+# include <openssl/crypto.h>
+# else
+# include <crypto.h>
+# endif
+ ], [silent])
+ if test "$curl_cv_have_def_OPENSSL_VERSION_NUMBER" = "yes"; then
+ tst_verlen=`expr "$curl_cv_def_OPENSSL_VERSION_NUMBER" : '.*'`
+ case "x$tst_verlen" in
+ x6)
+ tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
+ tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 4`
+ tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
+ tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
+ ;;
+ x11|x10)
+ tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
+ tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
+ tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 7`
+ tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
+ ;;
+ *)
+ tst_api="unknown"
+ ;;
+ esac
+ case $tst_api in
+ 0x110) tst_show="1.1.0" ;;
+ 0x102) tst_show="1.0.2" ;;
+ 0x101) tst_show="1.0.1" ;;
+ 0x100) tst_show="1.0.0" ;;
+ 0x099) tst_show="0.9.9" ;;
+ 0x098) tst_show="0.9.8" ;;
+ 0x097) tst_show="0.9.7" ;;
+ 0x096) tst_show="0.9.6" ;;
+ 0x095) tst_show="0.9.5" ;;
+ 0x094) tst_show="0.9.4" ;;
+ 0x093) tst_show="0.9.3" ;;
+ 0x092) tst_show="0.9.2" ;;
+ 0x091) tst_show="0.9.1" ;;
+ *) tst_show="unknown" ;;
+ esac
+ tst_show="$tst_show - $curl_cv_def_OPENSSL_VERSION_NUMBER"
+ else
+ tst_show="unknown"
+ fi
+ AC_MSG_RESULT([$tst_show])
+ #
+dnl if test "$tst_api" != "unknown"; then
+dnl AC_DEFINE_UNQUOTED(HAVE_OPENSSL_API_HEADERS, $tst_api,
+dnl [OpenSSL headers configure time API. Defined only by configure script.
+dnl No matter what, do not ever define this manually or by any other means.])
+dnl fi
+ curl_openssl_api_headers=$tst_api
+])
+
+
+dnl CURL_CHECK_OPENSSL_API_LIBRARY
+dnl -------------------------------------------------
+dnl Find out OpenSSL library API version, performing
+dnl only link tests in order to avoid getting fooled
+dnl by mismatched OpenSSL headers. No runtime checks
+dnl allowed here for cross-compilation support.
+dnl HAVE_OPENSSL_API_LIBRARY is defined as apprpriate
+dnl only for systems which actually run the configure
+dnl script. Config files generated manually or in any
+dnl other way shall not define this.
+dnl
+dnl Most probably we should not bother attempting to
+dnl detect OpenSSL library development API versions
+dnl 0.9.9 and 1.1.0. For our intended use, detecting
+dnl released versions should be good enough.
+dnl
+dnl Given that currently we are not using the result
+dnl of this check, except for informative purposes,
+dnl lets try to figure out everything.
+
+AC_DEFUN([CURL_CHECK_OPENSSL_API_LIBRARY], [
+ #
+ tst_api="unknown"
+ #
+ AC_MSG_CHECKING([for OpenSSL library version])
+ if test "$tst_api" = "unknown"; then
+ case $host in
+ *-*-vms*)
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([SSL_CTX_set_not_resumbl_sess_cb])
+ ],[
+ tst_api="0x110"
+ ])
+ ;;
+ *)
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([SSL_CTX_set_not_resumable_session_callback])
+ ],[
+ tst_api="0x110"
+ ])
+ ;;
+ esac
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([SSL_CONF_CTX_new])
+ ],[
+ tst_api="0x102"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([SSL_renegotiate_abbreviated])
+ ],[
+ tst_api="0x101"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([OBJ_add_sigid])
+ ],[
+ tst_api="0x100"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([ERR_set_mark])
+ ],[
+ tst_api="0x098"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([ERR_peek_last_error])
+ ],[
+ tst_api="0x097"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([c2i_ASN1_OBJECT])
+ ],[
+ tst_api="0x096"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([SSL_CTX_set_purpose])
+ ],[
+ tst_api="0x095"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([OBJ_obj2txt])
+ ],[
+ tst_api="0x094"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([SSL_get_verify_depth])
+ ],[
+ tst_api="0x093"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([SSL_library_init])
+ ],[
+ tst_api="0x092"
+ ])
+ fi
+ if test "$tst_api" = "unknown"; then
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([SSL_CTX_set_cipher_list])
+ ],[
+ tst_api="0x091"
+ ])
+ fi
+ case $tst_api in
+ 0x110) tst_show="1.1.0" ;;
+ 0x102) tst_show="1.0.2" ;;
+ 0x101) tst_show="1.0.1" ;;
+ 0x100) tst_show="1.0.0" ;;
+ 0x099) tst_show="0.9.9" ;;
+ 0x098) tst_show="0.9.8" ;;
+ 0x097) tst_show="0.9.7" ;;
+ 0x096) tst_show="0.9.6" ;;
+ 0x095) tst_show="0.9.5" ;;
+ 0x094) tst_show="0.9.4" ;;
+ 0x093) tst_show="0.9.3" ;;
+ 0x092) tst_show="0.9.2" ;;
+ 0x091) tst_show="0.9.1" ;;
+ *) tst_show="unknown" ;;
+ esac
+ AC_MSG_RESULT([$tst_show])
+ #
+dnl if test "$tst_api" != "unknown"; then
+dnl AC_DEFINE_UNQUOTED(HAVE_OPENSSL_API_LIBRARY, $tst_api,
+dnl [OpenSSL library link time API. Defined only by configure script.
+dnl No matter what, do not ever define this manually or by any other means.])
+dnl fi
+ curl_openssl_api_library=$tst_api
+])
+
+
+dnl CURL_CHECK_OPENSSL_API
+dnl -------------------------------------------------
+
+AC_DEFUN([CURL_CHECK_OPENSSL_API], [
+ #
+ CURL_CHECK_OPENSSL_API_HEADERS
+ CURL_CHECK_OPENSSL_API_LIBRARY
+ #
+ tst_match="yes"
+ #
+ AC_MSG_CHECKING([for OpenSSL headers and library versions matching])
+ if test "$curl_openssl_api_headers" = "unknown" ||
+ test "$curl_openssl_api_library" = "unknown"; then
+ tst_match="fail"
+ tst_warns="Can not compare OpenSSL headers and library versions."
+ elif test "$curl_openssl_api_headers" != "$curl_openssl_api_library"; then
+ tst_match="no"
+ tst_warns="OpenSSL headers and library versions do not match."
+ fi
+ AC_MSG_RESULT([$tst_match])
+ if test "$tst_match" != "yes"; then
+ AC_MSG_WARN([$tst_warns])
+ fi
+])
diff --git a/m4/curl-override.m4 b/m4/curl-override.m4
index 326c59ce..a35d3b2f 100644
--- a/m4/curl-override.m4
+++ b/m4/curl-override.m4
@@ -2,7 +2,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 3
+# serial 7
dnl CURL_OVERRIDE_AUTOCONF
dnl -------------------------------------------------
@@ -16,16 +16,6 @@ AC_BEFORE([$0],[AC_PROG_LIBTOOL])
# using curl-override.m4
])
-dnl Override some Libtool tests
-dnl -------------------------------------------------
-dnl This is done to prevent Libtool 1.5.X from doing
-dnl unnecesary C++, Fortran and Java tests and reduce
-dnl resulting configure script by nearly 300 Kb.
-
-m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
-m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
-m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
-
dnl Override Autoconf's AC_LANG_PROGRAM (C)
dnl -------------------------------------------------
dnl This is done to prevent compiler warning
@@ -84,18 +74,3 @@ choke me
#endif
], [return $1 ();])])
-dnl Override Autoconf's PATH_SEPARATOR check
-dnl -------------------------------------------------
-dnl This is done to ensure that the same check is
-dnl used across different Autoconf versions and to
-dnl allow us to use this macro early enough in the
-dnl configure script.
-
-m4_defun([_AS_PATH_SEPARATOR_PREPARE],
-[CURL_CHECK_PATH_SEPARATOR
-m4_define([$0],[])])
-
-m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[CURL_CHECK_PATH_SEPARATOR
-m4_define([$0],[])])
-
diff --git a/m4/curl-reentrant.m4 b/m4/curl-reentrant.m4
index 2e2d868d..842cc405 100644
--- a/m4/curl-reentrant.m4
+++ b/m4/curl-reentrant.m4
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 8
+# serial 10
dnl Note 1
dnl ------
@@ -467,7 +467,7 @@ dnl This macro ensures that configuration tests done
dnl after this will execute with preprocessor symbol
dnl _REENTRANT defined. This macro also ensures that
dnl the generated config file defines NEED_REENTRANT
-dnl and that in turn setup.h will define _REENTRANT.
+dnl and that in turn curl_setup.h will define _REENTRANT.
dnl Internal macro for CURL_CONFIGURE_REENTRANT.
AC_DEFUN([CURL_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT], [
@@ -487,7 +487,7 @@ dnl This macro ensures that configuration tests done
dnl after this will execute with preprocessor symbol
dnl _THREAD_SAFE defined. This macro also ensures that
dnl the generated config file defines NEED_THREAD_SAFE
-dnl and that in turn setup.h will define _THREAD_SAFE.
+dnl and that in turn curl_setup.h will define _THREAD_SAFE.
dnl Internal macro for CURL_CONFIGURE_THREAD_SAFE.
AC_DEFUN([CURL_CONFIGURE_FROM_NOW_ON_WITH_THREAD_SAFE], [
diff --git a/m4/curl-system.m4 b/m4/curl-system.m4
deleted file mode 100644
index 6e3e9f97..00000000
--- a/m4/curl-system.m4
+++ /dev/null
@@ -1,88 +0,0 @@
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-#***************************************************************************
-
-# File version for 'aclocal' use. Keep it a single number.
-# serial 3
-
-
-dnl CURL_CHECK_PATH_SEPARATOR
-dnl -------------------------------------------------
-dnl Check and compute the path separator for us. This
-dnl path separator is the symbol used to diferentiate
-dnl or separate paths inside the PATH environment var.
-
-AC_DEFUN([CURL_CHECK_PATH_SEPARATOR], [
- if test -z "$curl_cv_PATH_SEPARATOR"; then
- if test -z "$PATH"; then
- AC_MSG_ERROR([PATH not set. Cannot continue without PATH being set.])
- fi
- dnl Directory count in PATH when using a colon separator.
- tst_dirs_col=0
- tst_save_IFS=$IFS; IFS=':'
- for tst_dir in $PATH; do
- IFS=$tst_save_IFS
- test -d "$tst_dir" && tst_dirs_col=`expr $tst_dirs_col + 1`
- done
- IFS=$tst_save_IFS
- dnl Directory count in PATH when using a semicolon separator.
- tst_dirs_sem=0
- tst_save_IFS=$IFS; IFS=';'
- for tst_dir in $PATH; do
- IFS=$tst_save_IFS
- test -d "$tst_dir" && tst_dirs_sem=`expr $tst_dirs_sem + 1`
- done
- IFS=$tst_save_IFS
- if test $tst_dirs_sem -eq $tst_dirs_col; then
- dnl When both counting methods give the same result we do not want to
- dnl chose one over the other, and consider auto-detection not possible.
- if test -z "$PATH_SEPARATOR"; then
- dnl Stop dead until user provides PATH_SEPARATOR definition.
- AC_MSG_ERROR([PATH_SEPARATOR not set. Cannot continue without it.])
- fi
- else
- dnl Separator with the greater directory count is the auto-detected one.
- if test $tst_dirs_sem -gt $tst_dirs_col; then
- tst_auto_separator=';'
- else
- tst_auto_separator=':'
- fi
- if test -z "$PATH_SEPARATOR"; then
- dnl Simply use the auto-detected one when not already set.
- PATH_SEPARATOR="$tst_auto_separator"
- fi
- fi
- curl_cv_PATH_SEPARATOR="$PATH_SEPARATOR"
- fi
- AC_SUBST([PATH_SEPARATOR])
- AC_SUBST([PATH])
-])
-
-
-dnl CURL_CHECK_PATH_SEPARATOR_REQUIRED
-dnl -------------------------------------------------
-dnl Use this to ensure that the path separator check
-dnl macro is only expanded and included once.
-
-AC_DEFUN([CURL_CHECK_PATH_SEPARATOR_REQUIRED], [
- AC_REQUIRE([CURL_CHECK_PATH_SEPARATOR])dnl
-])
-
diff --git a/m4/libtool.m4 b/m4/libtool.m4
deleted file mode 100644
index a3fee536..00000000
--- a/m4/libtool.m4
+++ /dev/null
@@ -1,7377 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 56 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
- [m4_default([$3],
- [m4_fatal([Libtool version $1 or higher is required],
- 63)])],
- [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
- *\ * | *\ *)
- AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- _LT_PATH_MAGIC
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-## ------------------------------------- ##
-## Accumulate code for creating libtool. ##
-## ------------------------------------- ##
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
- [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-## ------------------------ ##
-## FIXME: Eliminate VARNAME ##
-## ------------------------ ##
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME. Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
- [m4_ifval([$1], [$1], [$2])])
- lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
- m4_ifval([$4],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
- lt_dict_add_subkey([lt_decl_dict], [$2],
- [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
- [0], [m4_fatal([$0: too few arguments: $#])],
- [1], [m4_fatal([$0: too few arguments: $#: $1])],
- [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
- [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
- [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
- m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_if([$2], [],
- m4_quote(lt_decl_varnames),
- m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
- lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly. In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
- [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-# # Some comment about what VAR is for.
-# visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
- [description])))[]dnl
-m4_pushdef([_libtool_name],
- m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
- [0], [_libtool_name=[$]$1],
- [1], [_libtool_name=$lt_[]$1],
- [2], [_libtool_name=$lt_[]$1],
- [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
- m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
- dnl If the libtool generation code has been placed in $CONFIG_LT,
- dnl instead of duplicating it all over again into config.status,
- dnl then we will have config.status run $CONFIG_LT later, so it
- dnl needs to know what name is stored there:
- [AC_CONFIG_COMMANDS([libtool],
- [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
- dnl If the libtool generation code is destined for config.status,
- dnl expand the accumulated commands and init code now:
- [AC_CONFIG_COMMANDS([libtool],
- [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
- lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
- ;;
-esac
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
-exec AS_MESSAGE_LOG_FD>>config.log
-{
- echo
- AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
- case $[1] in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
-
- -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
- *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
- esac
- shift
-done
-
-if $lt_cl_silent; then
- exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
- lt_cl_success=:
- test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
- exec AS_MESSAGE_LOG_FD>/dev/null
- $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
- exec AS_MESSAGE_LOG_FD>>config.log
- $lt_cl_success || AS_EXIT(1)
-fi
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars. Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
- m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
- m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
- _LT_PROG_LTMAIN
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- _LT_PROG_XSI_SHELLFNS
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-# autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
- [C], [_LT_LANG(C)],
- [C++], [_LT_LANG(CXX)],
- [Java], [_LT_LANG(GCJ)],
- [Fortran 77], [_LT_LANG(F77)],
- [Fortran], [_LT_LANG(FC)],
- [Windows Resource], [_LT_LANG(RC)],
- [m4_ifdef([_LT_LANG_]$1[_CONFIG],
- [_LT_LANG($1)],
- [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
- [LT_SUPPORTED_TAG([$1])dnl
- m4_append([_LT_TAGS], [$1 ])dnl
- m4_define([_LT_LANG_]$1[_enabled], [])dnl
- _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [LT_LANG(CXX)],
- [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
- [LT_LANG(F77)],
- [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
- [LT_LANG(FC)],
- [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
- [LT_LANG(GCJ)],
- [m4_ifdef([AC_PROG_GCJ],
- [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([A][M_PROG_GCJ],
- [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([LT_PROG_GCJ],
- [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
- [LT_LANG(RC)],
- [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
- case $host_os in
- rhapsody* | darwin*)
- AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
- AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
- AC_CHECK_TOOL([LIPO], [lipo], [:])
- AC_CHECK_TOOL([OTOOL], [otool], [:])
- AC_CHECK_TOOL([OTOOL64], [otool64], [:])
- _LT_DECL([], [DSYMUTIL], [1],
- [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
- _LT_DECL([], [NMEDIT], [1],
- [Tool to change global to local symbols on Mac OS X])
- _LT_DECL([], [LIPO], [1],
- [Tool to manipulate fat objects and archives on Mac OS X])
- _LT_DECL([], [OTOOL], [1],
- [ldd/readelf like tool for Mach-O binaries on Mac OS X])
- _LT_DECL([], [OTOOL64], [1],
- [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
- AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
- [lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi])
- AC_CACHE_CHECK([for -exported_symbols_list linker flag],
- [lt_cv_ld_exported_symbols_list],
- [lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [lt_cv_ld_exported_symbols_list=yes],
- [lt_cv_ld_exported_symbols_list=no])
- LDFLAGS="$save_LDFLAGS"
- ])
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
- m4_require([_LT_REQUIRED_DARWIN_CHECKS])
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_automatic, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- m4_if([$1], [CXX],
-[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
- fi
-],[])
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X[$]1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-[$]*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "[$]0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(lt_ECHO)
-])
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
- [An echo program that does not interpret backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
- [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
- [Commands used to build an old-style archive])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$5], , :, [$5])
-else
- m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$4], , :, [$4])
-else
- m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
- [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}]
-_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_dlunknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
- [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
- [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
- [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
- [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
- [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
- test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
- [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
- [], [
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[[lt_foo]]++; }
- if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[[4-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[[123]]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[[3-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
- LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
- [shlibpath_overrides_runpath=yes])])
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
- [Variables whose values should be saved in libtool wrapper scripts and
- restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
- [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
- [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
- [[List of archive names. First name is the real one, the rest are links.
- The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
- [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [postinstall_cmds], [2],
- [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
- [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
- [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
- [[As "finish_cmds", except a single script fragment to be evaled but
- not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
- [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
- [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
- [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="m4_if([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
- [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
- lt_cv_ld_reload_flag,
- [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[[45]]*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[[3-9]]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
- [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
- [Command to use when deplibs_check_method == "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
- AC_SUBST([DUMPBIN])
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
- [lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
- cat conftest.out >&AS_MESSAGE_LOG_FD
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
- lt_cv_prog_compiler_rtti_exceptions,
- [-fno-rtti -fno-exceptions], [],
- [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
- [Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDEGRST]]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris*)
- symcode='[[BDRT]]'
- ;;
-sco3.2v5*)
- symcode='[[DT]]'
- ;;
-sysv4.2uw2*)
- symcode='[[DT]]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[[ABDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK ['"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx]"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
- [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
- [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
- [lt_cv_sys_global_symbol_to_c_name_address], [1],
- [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
- [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
- [Transform the output of nm in a C name address pair when lib prefix is needed])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-m4_if([$1], [CXX], [
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix[[4-9]]*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- fi
- ;;
- aCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- icpc* )
- # Intel C++, used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xlc* | xlC*)
- # IBM XL 8.0 on PPC
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd* | netbsdelf*-gnu)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- lcc*)
- # Lucid
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-],
-[
- if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- hpux9* | hpux10* | hpux11*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC (with -KPIC) is the default.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- ccc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All Alpha code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xl*)
- # IBM XL C 8.0/Fortran 10.1 on PPC
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All OSF/1 code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- rdos*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- solaris*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
- *)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- unicos*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
-
- uts4*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-])
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
- ;;
-esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
- [How to pass a linker flag through the compiler])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
- [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
- [Additional compiler flags for building library objects])
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
- $lt_tmp_static_flag,
- [],
- [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
- [Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix[[4-9]]*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw* | cegcc*)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- linux* | k*bsd*-gnu)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
- *)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-], [
- runpath_var=
- _LT_TAGVAR(allow_undefined_flag, $1)=
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(archive_cmds, $1)=
- _LT_TAGVAR(archive_expsym_cmds, $1)=
- _LT_TAGVAR(compiler_needs_object, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(hardcode_automatic, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_TAGVAR(hardcode_minus_L, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(inherit_rpath, $1)=no
- _LT_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_TAGVAR(module_cmds, $1)=
- _LT_TAGVAR(module_expsym_cmds, $1)=
- _LT_TAGVAR(old_archive_from_new_cmds, $1)=
- _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- _LT_TAGVAR(include_expsyms, $1)=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- linux* | k*bsd*-gnu)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
- esac
-
- _LT_TAGVAR(ld_shlibs, $1)=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *GNU\ gold*) supports_anon_versioning=yes ;;
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[[3-9]]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- tmp_sharedflag='--shared' ;;
- xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
-
- if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
- runpath_var=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=no
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- bsdi[[45]]*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- freebsd1*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- AC_LINK_IFELSE(int foo(void) {},
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
- )
- LDFLAGS="$save_LDFLAGS"
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- newsos6)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- solaris*)
- _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_TAGVAR(hardcode_direct, $1)=no
- ;;
- motorola)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4.3*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- _LT_TAGVAR(ld_shlibs, $1)=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
- [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
- # Assume -lc should be added
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_TAGVAR(archive_cmds, $1) in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
- _LT_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
- then
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
- ;;
- esac
- fi
- ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
- [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
- [enable_shared_with_static_runtimes], [0],
- [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
- [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
- [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
- [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
- [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
- [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
- [Commands used to build a loadable module if different from building
- a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
- [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
- [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
- [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
- [Flag to hardcode $libdir into a binary during linking.
- This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
- [[If ld is used when linking, flag to hardcode $libdir into a binary
- during linking. This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
- [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting ${shlibpath_var} if the
- library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
- [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
- [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
- [Set to "yes" if building a shared library automatically hardcodes DIR
- into the library and all subsequent libraries and executables linked
- against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
- [Set to yes if linker adds runtime paths of dependent libraries
- to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
- [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
- [Fix the shell variable $srcfile for the compiler])
-_LT_TAGDECL([], [always_export_symbols], [0],
- [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
- [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
- [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
- [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
- [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [file_list_spec], [1],
- [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
- LT_SYS_DLOPEN_SELF
- _LT_CMD_STRIPLIB
-
- # Report which library types will actually be built
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_PROG_CXXCPP
-else
- _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
- else
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- LT_PATH_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
- _LT_TAGVAR(ld_shlibs, $1)=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- freebsd-elf*)
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
-
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- gnu*)
- ;;
-
- hpux9*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
- fi
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
- _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
- $RANLIB $oldlib'
- _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 will use weak symbols
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- xl*)
- # IBM XL 8.0 on PPC, with GNU ld
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=echo
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- case $host in
- osf3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- ;;
- *)
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- case $host in
- osf3*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- fi
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
- _LT_TAGVAR(GCC, $1)="$GXX"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer a
- a=0
- return
- end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-_LT_EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- for p in `eval "$output_verbose_link_cmd"`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_TAGVAR(postdeps, $1)"; then
- _LT_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
- _LT_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
- _LT_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- _LT_TAGVAR(predep_objects,$1)=
- _LT_TAGVAR(postdep_objects,$1)=
- _LT_TAGVAR(postdeps,$1)=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
- [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
- [Dependencies to place before and after the objects being linked to
- create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
- [The library search path used internally by the compiler when linking
- a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
- _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- CC=${F77-"f77"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
- GCC=$G77
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$G77"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
- _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- CC=${FC-"f95"}
- compiler=$CC
- GCC=$ac_cv_fc_compiler_gnu
-
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC="$lt_save_CC"
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
- :
- _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
- [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
- [AC_CHECK_TOOL(GCJ, gcj,)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
- [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-############################################################
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=${1%%=*}
- func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=${#1}
-}
-
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=`expr "$[@]"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$[1]+=\$[2]"
-}
-_LT_EOF
- ;;
- *)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
- ;;
- esac
-])
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
deleted file mode 100644
index 34151a3b..00000000
--- a/m4/ltoptions.m4
+++ /dev/null
@@ -1,368 +0,0 @@
-# Helper functions for option handling. -*- Autoconf -*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it. Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
- _LT_MANGLE_DEFUN([$1], [$2]),
- [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
- [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME. If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
- dnl
- dnl Simply set some default values (i.e off) if boolean options were not
- dnl specified:
- _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
- ])
- _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
- ])
- dnl
- dnl If no reference was made to various pairs of opposing options, then
- dnl we run the default mode handler for the pair. For example, if neither
- dnl `shared' nor `disable-shared' was passed, we enable building of shared
- dnl archives by default:
- _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
- _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
- [_LT_ENABLE_FAST_INSTALL])
- ])
-])# _LT_SET_OPTIONS
-
-
-## --------------------------------- ##
-## Macros to handle LT_INIT options. ##
-## --------------------------------- ##
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS], [0], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
- [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
- _LT_DECL([build_libtool_libs], [enable_shared], [0],
- [Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
- [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
- _LT_DECL([build_old_libs], [enable_static], [0],
- [Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
- [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
- [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-## ----------------- ##
-## LTDL_INIT Options ##
-## ----------------- ##
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
- [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
- [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
- [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
- [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
- [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
deleted file mode 100644
index 9000a057..00000000
--- a/m4/ltsugar.m4
+++ /dev/null
@@ -1,123 +0,0 @@
-# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
- [$#], [2], [[$2]],
- [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
- [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
- [$#], 1, [],
- [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
- m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
- [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
- [m4_foreach([_Lt_suffix],
- ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
- [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
- [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
- [lt_append([$1], [$2], [$3])$4],
- [$5])],
- [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
- m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
- m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
- [$5],
- [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
- [lt_join(m4_quote(m4_default([$4], [[, ]])),
- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
- [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
deleted file mode 100644
index f3c53098..00000000
--- a/m4/ltversion.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-# ltversion.m4 -- version numbers -*- Autoconf -*-
-#
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# Generated from ltversion.in.
-
-# serial 3017 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.2.6b])
-m4_define([LT_PACKAGE_REVISION], [1.3017])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6b'
-macro_revision='1.3017'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
deleted file mode 100644
index 637bb206..00000000
--- a/m4/lt~obsolete.m4
+++ /dev/null
@@ -1,92 +0,0 @@
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 4 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else. This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
-
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/m4/xc-am-iface.m4 b/m4/xc-am-iface.m4
new file mode 100644
index 00000000..1571c211
--- /dev/null
+++ b/m4/xc-am-iface.m4
@@ -0,0 +1,253 @@
+#---------------------------------------------------------------------------
+#
+# xc-am-iface.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_AUTOMAKE_BODY
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl This macro performs embedding of automake initialization
+dnl code into configure script. When automake version 1.14 or
+dnl newer is used at configure script generation time, this
+dnl results in 'subdir-objects' automake option being used.
+dnl When using automake versions older than 1.14 this option
+dnl is not used when generating configure script.
+dnl
+dnl Existence of automake _AM_PROG_CC_C_O m4 private macro
+dnl is used to differentiate automake version 1.14 from older
+dnl ones which lack this macro.
+
+m4_define([_XC_AUTOMAKE_BODY],
+[dnl
+## --------------------------------------- ##
+## Start of automake initialization code ##
+## --------------------------------------- ##
+m4_ifdef([_AM_PROG_CC_C_O],
+[
+AM_INIT_AUTOMAKE([subdir-objects])
+],[
+AM_INIT_AUTOMAKE
+])dnl
+## ------------------------------------- ##
+## End of automake initialization code ##
+## ------------------------------------- ##
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl XC_AUTOMAKE
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro embeds automake machinery into configure
+dnl script regardless of automake version used in order
+dnl to generate configure script.
+dnl
+dnl When using automake version 1.14 or newer, automake
+dnl initialization option 'subdir-objects' is used to
+dnl generate the configure script, otherwise this option
+dnl is not used.
+
+AC_DEFUN([XC_AUTOMAKE],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+dnl
+_XC_AUTOMAKE_BODY
+dnl
+m4_ifdef([AM_INIT_AUTOMAKE],
+ [m4_undefine([AM_INIT_AUTOMAKE])])dnl
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_AMEND_DISTCLEAN_BODY ([LIST-OF-SUBDIRS])
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl This macro performs shell code embedding into
+dnl configure script in order to modify distclean
+dnl and maintainer-clean targets of makefiles which
+dnl are located in given list of subdirs.
+dnl
+dnl See XC_AMEND_DISTCLEAN comments for details.
+
+m4_define([_XC_AMEND_DISTCLEAN_BODY],
+[dnl
+## ---------------------------------- ##
+## Start of distclean amending code ##
+## ---------------------------------- ##
+
+for xc_subdir in [$1]
+do
+
+if test ! -f "$xc_subdir/Makefile"; then
+ echo "$xc_msg_err $xc_subdir/Makefile file not found. $xc_msg_abrt" >&2
+ exit 1
+fi
+
+# Fetch dependency tracking file list from Makefile include lines.
+
+xc_inc_lines=`grep '^include .*(DEPDIR)' "$xc_subdir/Makefile" 2>/dev/null`
+xc_cnt_words=`echo "$xc_inc_lines" | wc -w | tr -d "$xc_space$xc_tab"`
+
+# --disable-dependency-tracking might have been used, consequently
+# there is nothing to amend without a dependency tracking file list.
+
+if test $xc_cnt_words -gt 0; then
+
+AC_MSG_NOTICE([amending $xc_subdir/Makefile])
+
+# Build Makefile specific patch hunk.
+
+xc_p="$xc_subdir/xc_patch.tmp"
+
+xc_rm_depfiles=`echo "$xc_inc_lines" \
+ | $SED 's%include% -rm -f%' 2>/dev/null`
+
+xc_dep_subdirs=`echo "$xc_inc_lines" \
+ | $SED 's%include[[ ]][[ ]]*%%' 2>/dev/null \
+ | $SED 's%(DEPDIR)/.*%(DEPDIR)%' 2>/dev/null \
+ | sort | uniq`
+
+echo "$xc_rm_depfiles" >$xc_p
+
+for xc_dep_dir in $xc_dep_subdirs; do
+ echo "${xc_tab}@xm_dep_cnt=\`ls $xc_dep_dir | wc -l 2>/dev/null\`; \\" >>$xc_p
+ echo "${xc_tab}if test \$\$xm_dep_cnt -eq 0 && test -d $xc_dep_dir; then \\" >>$xc_p
+ echo "${xc_tab} rm -rf $xc_dep_dir; \\" >>$xc_p
+ echo "${xc_tab}fi" >>$xc_p
+done
+
+# Build Makefile patching sed scripts.
+
+xc_s1="$xc_subdir/xc_script_1.tmp"
+xc_s2="$xc_subdir/xc_script_2.tmp"
+xc_s3="$xc_subdir/xc_script_3.tmp"
+
+cat >$xc_s1 <<\_EOT
+/^distclean[[ ]]*:/,/^[[^ ]][[^ ]]*:/{
+ s/^.*(DEPDIR)/___xc_depdir_line___/
+}
+/^maintainer-clean[[ ]]*:/,/^[[^ ]][[^ ]]*:/{
+ s/^.*(DEPDIR)/___xc_depdir_line___/
+}
+_EOT
+
+cat >$xc_s2 <<\_EOT
+/___xc_depdir_line___$/{
+ N
+ /___xc_depdir_line___$/D
+}
+_EOT
+
+cat >$xc_s3 <<_EOT
+/^___xc_depdir_line___/{
+ r $xc_p
+ d
+}
+_EOT
+
+# Apply patch to Makefile and cleanup.
+
+$SED -f "$xc_s1" "$xc_subdir/Makefile" >"$xc_subdir/Makefile.tmp1"
+$SED -f "$xc_s2" "$xc_subdir/Makefile.tmp1" >"$xc_subdir/Makefile.tmp2"
+$SED -f "$xc_s3" "$xc_subdir/Makefile.tmp2" >"$xc_subdir/Makefile.tmp3"
+
+if test -f "$xc_subdir/Makefile.tmp3"; then
+ mv -f "$xc_subdir/Makefile.tmp3" "$xc_subdir/Makefile"
+fi
+
+test -f "$xc_subdir/Makefile.tmp1" && rm -f "$xc_subdir/Makefile.tmp1"
+test -f "$xc_subdir/Makefile.tmp2" && rm -f "$xc_subdir/Makefile.tmp2"
+test -f "$xc_subdir/Makefile.tmp3" && rm -f "$xc_subdir/Makefile.tmp3"
+
+test -f "$xc_p" && rm -f "$xc_p"
+test -f "$xc_s1" && rm -f "$xc_s1"
+test -f "$xc_s2" && rm -f "$xc_s2"
+test -f "$xc_s3" && rm -f "$xc_s3"
+
+fi
+
+done
+
+## -------------------------------- ##
+## End of distclean amending code ##
+## -------------------------------- ##
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl XC_AMEND_DISTCLEAN ([LIST-OF-SUBDIRS])
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro embeds shell code into configure script
+dnl that amends, at configure runtime, the distclean
+dnl and maintainer-clean targets of Makefiles located
+dnl in all subdirs given in the mandatory white-space
+dnl separated list argument.
+dnl
+dnl Embedding only takes place when using automake 1.14
+dnl or newer, otherwise amending code is not included
+dnl in generated configure script.
+dnl
+dnl distclean and maintainer-clean targets are modified
+dnl to avoid unconditional removal of dependency subdirs
+dnl which triggers distclean and maintainer-clean errors
+dnl when using automake 'subdir-objects' option along
+dnl with per-target objects and source files existing in
+dnl multiple subdirs used for different build targets.
+dnl
+dnl New behavior first removes each dependency tracking
+dnl file independently, and only removes each dependency
+dnl subdir when it finds out that it no longer holds any
+dnl dependency tracking file.
+dnl
+dnl When configure option --disable-dependency-tracking
+dnl is used no amending takes place given that there are
+dnl no dependency tracking files.
+
+AC_DEFUN([XC_AMEND_DISTCLEAN],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+m4_ifdef([_AC_OUTPUT_MAIN_LOOP],
+ [m4_provide_if([_AC_OUTPUT_MAIN_LOOP], [],
+ [m4_fatal([call to AC_OUTPUT needed before $0])])])dnl
+dnl
+m4_if([$#], [1], [], [m4_fatal([$0: wrong number of arguments])])dnl
+m4_if([$1], [], [m4_fatal([$0: missing argument])])dnl
+dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+dnl
+m4_ifdef([_AM_PROG_CC_C_O],
+[
+_XC_AMEND_DISTCLEAN_BODY([$1])
+])dnl
+m4_define([$0], [])[]dnl
+])
+
diff --git a/m4/xc-cc-check.m4 b/m4/xc-cc-check.m4
new file mode 100644
index 00000000..777decf2
--- /dev/null
+++ b/m4/xc-cc-check.m4
@@ -0,0 +1,96 @@
+#---------------------------------------------------------------------------
+#
+# xc-cc-check.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_PROG_CC_PREAMBLE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_PROG_CC_PREAMBLE], [
+ xc_prog_cc_prev_IFS=$IFS
+ xc_prog_cc_prev_LIBS=$LIBS
+ xc_prog_cc_prev_CFLAGS=$CFLAGS
+ xc_prog_cc_prev_LDFLAGS=$LDFLAGS
+ xc_prog_cc_prev_CPPFLAGS=$CPPFLAGS
+])
+
+
+dnl _XC_PROG_CC_POSTLUDE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_PROG_CC_POSTLUDE], [
+ IFS=$xc_prog_cc_prev_IFS
+ LIBS=$xc_prog_cc_prev_LIBS
+ CFLAGS=$xc_prog_cc_prev_CFLAGS
+ LDFLAGS=$xc_prog_cc_prev_LDFLAGS
+ CPPFLAGS=$xc_prog_cc_prev_CPPFLAGS
+ AC_SUBST([CC])dnl
+ AC_SUBST([CPP])dnl
+ AC_SUBST([LIBS])dnl
+ AC_SUBST([CFLAGS])dnl
+ AC_SUBST([LDFLAGS])dnl
+ AC_SUBST([CPPFLAGS])dnl
+])
+
+
+dnl _XC_PROG_CC
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_PROG_CC], [
+ AC_REQUIRE([_XC_PROG_CC_PREAMBLE])dnl
+ AC_REQUIRE([XC_CHECK_BUILD_FLAGS])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AM_PROG_CC_C_O])dnl
+ AC_REQUIRE([AC_PROG_CPP])dnl
+ AC_REQUIRE([_XC_PROG_CC_POSTLUDE])dnl
+])
+
+
+dnl XC_CHECK_PROG_CC
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Checks for C compiler and C preprocessor programs,
+dnl while doing some previous sanity validation on user
+dnl provided LIBS, LDFLAGS, CPPFLAGS and CFLAGS values
+dnl that must succeed in order to continue execution.
+dnl
+dnl This sets variables CC and CPP, while preventing
+dnl LIBS, LDFLAGS, CFLAGS, CPPFLAGS and IFS from being
+dnl unexpectedly changed by underlying macros.
+
+AC_DEFUN([XC_CHECK_PROG_CC], [
+ AC_PREREQ([2.50])dnl
+ AC_BEFORE([$0],[_XC_PROG_CC_PREAMBLE])dnl
+ AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
+ AC_BEFORE([$0],[AC_PROG_CC])dnl
+ AC_BEFORE([$0],[AM_PROG_CC_C_O])dnl
+ AC_BEFORE([$0],[AC_PROG_CPP])dnl
+ AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+ AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+ AC_BEFORE([$0],[_XC_PROG_CC_POSTLUDE])dnl
+ AC_REQUIRE([_XC_PROG_CC])dnl
+])
+
diff --git a/m4/xc-lt-iface.m4 b/m4/xc-lt-iface.m4
new file mode 100644
index 00000000..0b90d5f2
--- /dev/null
+++ b/m4/xc-lt-iface.m4
@@ -0,0 +1,465 @@
+#---------------------------------------------------------------------------
+#
+# xc-lt-iface.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_LIBTOOL_PREAMBLE
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks some configure script options related with
+dnl libtool and customizes its default behavior before
+dnl libtool code is actually used in script.
+
+m4_define([_XC_LIBTOOL_PREAMBLE],
+[dnl
+# ------------------------------------ #
+# Determine libtool default behavior #
+# ------------------------------------ #
+
+#
+# Default behavior is to enable shared and static libraries on systems
+# where libtool knows how to build both library versions, and does not
+# require separate configuration and build runs for each flavor.
+#
+
+xc_lt_want_enable_shared='yes'
+xc_lt_want_enable_static='yes'
+
+#
+# User may have disabled shared or static libraries.
+#
+case "x$enable_shared" in @%:@ (
+ xno)
+ xc_lt_want_enable_shared='no'
+ ;;
+esac
+case "x$enable_static" in @%:@ (
+ xno)
+ xc_lt_want_enable_static='no'
+ ;;
+esac
+if test "x$xc_lt_want_enable_shared" = 'xno' &&
+ test "x$xc_lt_want_enable_static" = 'xno'; then
+ AC_MSG_ERROR([can not disable shared and static libraries simultaneously])
+fi
+
+#
+# Default behavior on systems that require independent configuration
+# and build runs for shared and static is to enable shared libraries
+# and disable static ones. On these systems option '--disable-shared'
+# must be used in order to build a proper static library.
+#
+
+if test "x$xc_lt_want_enable_shared" = 'xyes' &&
+ test "x$xc_lt_want_enable_static" = 'xyes'; then
+ case $host_os in @%:@ (
+ mingw* | pw32* | cegcc* | os2* | aix*)
+ xc_lt_want_enable_static='no'
+ ;;
+ esac
+fi
+
+#
+# Make libtool aware of current shared and static library preferences
+# taking in account that, depending on host characteristics, libtool
+# may modify these option preferences later in this configure script.
+#
+
+enable_shared=$xc_lt_want_enable_shared
+enable_static=$xc_lt_want_enable_static
+
+#
+# Default behavior is to build PIC objects for shared libraries and
+# non-PIC objects for static libraries.
+#
+
+xc_lt_want_with_pic='default'
+
+#
+# User may have specified PIC preference.
+#
+
+case "x$with_pic" in @%:@ ((
+ xno)
+ xc_lt_want_with_pic='no'
+ ;;
+ xyes)
+ xc_lt_want_with_pic='yes'
+ ;;
+esac
+
+#
+# Default behavior on some systems where building a shared library out
+# of non-PIC compiled objects will fail with following linker error
+# "relocation R_X86_64_32 can not be used when making a shared object"
+# is to build PIC objects even for static libraries. This behavior may
+# be overriden using 'configure --disable-shared --without-pic'.
+#
+
+if test "x$xc_lt_want_with_pic" = 'xdefault'; then
+ case $host_cpu in @%:@ (
+ x86_64 | amd64 | ia64)
+ case $host_os in @%:@ (
+ linux* | freebsd*)
+ xc_lt_want_with_pic='yes'
+ ;;
+ esac
+ ;;
+ esac
+fi
+
+#
+# Make libtool aware of current PIC preference taking in account that,
+# depending on host characteristics, libtool may modify PIC default
+# behavior to fit host system idiosyncrasies later in this script.
+#
+
+with_pic=$xc_lt_want_with_pic
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_LIBTOOL_BODY
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl This macro performs embedding of libtool code into
+dnl configure script, regardless of libtool version in
+dnl use when generating configure script.
+
+m4_define([_XC_LIBTOOL_BODY],
+[dnl
+## ----------------------- ##
+## Start of libtool code ##
+## ----------------------- ##
+m4_ifdef([LT_INIT],
+[dnl
+LT_INIT([win32-dll])
+],[dnl
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+])dnl
+## --------------------- ##
+## End of libtool code ##
+## --------------------- ##
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_BUILD_LIBRARIES
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks wether libtool shared and static libraries
+dnl are finally built depending on user input, default
+dnl behavior and knowledge that libtool has about host
+dnl characteristics.
+dnl Results stored in following shell variables:
+dnl xc_lt_build_shared
+dnl xc_lt_build_static
+
+m4_define([_XC_CHECK_LT_BUILD_LIBRARIES],
+[dnl
+#
+# Verify if finally libtool shared libraries will be built
+#
+
+case "x$enable_shared" in @%:@ ((
+ xyes | xno)
+ xc_lt_build_shared=$enable_shared
+ ;;
+ *)
+ AC_MSG_ERROR([unexpected libtool enable_shared value: $enable_shared])
+ ;;
+esac
+
+#
+# Verify if finally libtool static libraries will be built
+#
+
+case "x$enable_static" in @%:@ ((
+ xyes | xno)
+ xc_lt_build_static=$enable_static
+ ;;
+ *)
+ AC_MSG_ERROR([unexpected libtool enable_static value: $enable_static])
+ ;;
+esac
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_CHECK_LT_SHLIB_USE_VERSION_INFO
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks if the -version-info linker flag must be
+dnl provided when building libtool shared libraries.
+dnl Result stored in xc_lt_shlib_use_version_info.
+
+m4_define([_XC_CHECK_LT_SHLIB_USE_VERSION_INFO],
+[dnl
+#
+# Verify if libtool shared libraries should be linked using flag -version-info
+#
+
+AC_MSG_CHECKING([whether to build shared libraries with -version-info])
+xc_lt_shlib_use_version_info='yes'
+if test "x$version_type" = 'xnone'; then
+ xc_lt_shlib_use_version_info='no'
+fi
+case $host_os in @%:@ (
+ amigaos*)
+ xc_lt_shlib_use_version_info='yes'
+ ;;
+esac
+AC_MSG_RESULT([$xc_lt_shlib_use_version_info])
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks if the -no-undefined linker flag must be
+dnl provided when building libtool shared libraries.
+dnl Result stored in xc_lt_shlib_use_no_undefined.
+
+m4_define([_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED],
+[dnl
+#
+# Verify if libtool shared libraries should be linked using flag -no-undefined
+#
+
+AC_MSG_CHECKING([whether to build shared libraries with -no-undefined])
+xc_lt_shlib_use_no_undefined='no'
+if test "x$allow_undefined" = 'xno'; then
+ xc_lt_shlib_use_no_undefined='yes'
+elif test "x$allow_undefined_flag" = 'xunsupported'; then
+ xc_lt_shlib_use_no_undefined='yes'
+fi
+case $host_os in @%:@ (
+ cygwin* | mingw* | pw32* | cegcc* | os2* | aix*)
+ xc_lt_shlib_use_no_undefined='yes'
+ ;;
+esac
+AC_MSG_RESULT([$xc_lt_shlib_use_no_undefined])
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks if the -mimpure-text linker flag must be
+dnl provided when building libtool shared libraries.
+dnl Result stored in xc_lt_shlib_use_mimpure_text.
+
+m4_define([_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT],
+[dnl
+#
+# Verify if libtool shared libraries should be linked using flag -mimpure-text
+#
+
+AC_MSG_CHECKING([whether to build shared libraries with -mimpure-text])
+xc_lt_shlib_use_mimpure_text='no'
+case $host_os in @%:@ (
+ solaris2*)
+ if test "x$GCC" = 'xyes'; then
+ xc_lt_shlib_use_mimpure_text='yes'
+ fi
+ ;;
+esac
+AC_MSG_RESULT([$xc_lt_shlib_use_mimpure_text])
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_BUILD_WITH_PIC
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks wether libtool shared and static libraries
+dnl would be built with PIC depending on user input,
+dnl default behavior and knowledge that libtool has
+dnl about host characteristics.
+dnl Results stored in following shell variables:
+dnl xc_lt_build_shared_with_pic
+dnl xc_lt_build_static_with_pic
+
+m4_define([_XC_CHECK_LT_BUILD_WITH_PIC],
+[dnl
+#
+# Find out wether libtool libraries would be built wit PIC
+#
+
+case "x$pic_mode" in @%:@ ((((
+ xdefault)
+ xc_lt_build_shared_with_pic='yes'
+ xc_lt_build_static_with_pic='no'
+ ;;
+ xyes)
+ xc_lt_build_shared_with_pic='yes'
+ xc_lt_build_static_with_pic='yes'
+ ;;
+ xno)
+ xc_lt_build_shared_with_pic='no'
+ xc_lt_build_static_with_pic='no'
+ ;;
+ *)
+ xc_lt_build_shared_with_pic='unknown'
+ xc_lt_build_static_with_pic='unknown'
+ AC_MSG_WARN([unexpected libtool pic_mode value: $pic_mode])
+ ;;
+esac
+AC_MSG_CHECKING([whether to build shared libraries with PIC])
+AC_MSG_RESULT([$xc_lt_build_shared_with_pic])
+AC_MSG_CHECKING([whether to build static libraries with PIC])
+AC_MSG_RESULT([$xc_lt_build_static_with_pic])
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_CHECK_LT_BUILD_SINGLE_VERSION
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks wether a libtool shared or static library
+dnl is finally built exclusively without the other.
+dnl Results stored in following shell variables:
+dnl xc_lt_build_shared_only
+dnl xc_lt_build_static_only
+
+m4_define([_XC_CHECK_LT_BUILD_SINGLE_VERSION],
+[dnl
+#
+# Verify if libtool shared libraries will be built while static not built
+#
+
+AC_MSG_CHECKING([whether to build shared libraries only])
+if test "$xc_lt_build_shared" = 'yes' &&
+ test "$xc_lt_build_static" = 'no'; then
+ xc_lt_build_shared_only='yes'
+else
+ xc_lt_build_shared_only='no'
+fi
+AC_MSG_RESULT([$xc_lt_build_shared_only])
+
+#
+# Verify if libtool static libraries will be built while shared not built
+#
+
+AC_MSG_CHECKING([whether to build static libraries only])
+if test "$xc_lt_build_static" = 'yes' &&
+ test "$xc_lt_build_shared" = 'no'; then
+ xc_lt_build_static_only='yes'
+else
+ xc_lt_build_static_only='no'
+fi
+AC_MSG_RESULT([$xc_lt_build_static_only])
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_LIBTOOL_POSTLUDE
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Performs several checks related with libtool that
+dnl can not be done unless libtool code has already
+dnl been executed. See individual check descriptions
+dnl for further info.
+
+m4_define([_XC_LIBTOOL_POSTLUDE],
+[dnl
+_XC_CHECK_LT_BUILD_LIBRARIES
+_XC_CHECK_LT_SHLIB_USE_VERSION_INFO
+_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED
+_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT
+_XC_CHECK_LT_BUILD_WITH_PIC
+_XC_CHECK_LT_BUILD_SINGLE_VERSION
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl XC_LIBTOOL
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro embeds libtool machinery into configure
+dnl script, regardless of libtool version, and performs
+dnl several additional checks whose results can be used
+dnl later on.
+dnl
+dnl Usage of this macro ensures that generated configure
+dnl script uses equivalent logic irrespective of autoconf
+dnl or libtool version being used to generate configure
+dnl script.
+dnl
+dnl Results stored in following shell variables:
+dnl xc_lt_build_shared
+dnl xc_lt_build_static
+dnl xc_lt_shlib_use_version_info
+dnl xc_lt_shlib_use_no_undefined
+dnl xc_lt_shlib_use_mimpure_text
+dnl xc_lt_build_shared_with_pic
+dnl xc_lt_build_static_with_pic
+dnl xc_lt_build_shared_only
+dnl xc_lt_build_static_only
+
+AC_DEFUN([XC_LIBTOOL],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+dnl
+AC_REQUIRE([XC_CHECK_PATH_SEPARATOR])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+dnl
+_XC_LIBTOOL_PREAMBLE
+_XC_LIBTOOL_BODY
+_XC_LIBTOOL_POSTLUDE
+dnl
+m4_ifdef([AC_LIBTOOL_WIN32_DLL],
+ [m4_undefine([AC_LIBTOOL_WIN32_DLL])])dnl
+m4_ifdef([AC_PROG_LIBTOOL],
+ [m4_undefine([AC_PROG_LIBTOOL])])dnl
+m4_ifdef([LT_INIT],
+ [m4_undefine([LT_INIT])])dnl
+dnl
+m4_define([$0],[])dnl
+])
+
diff --git a/m4/xc-translit.m4 b/m4/xc-translit.m4
new file mode 100644
index 00000000..1918f168
--- /dev/null
+++ b/m4/xc-translit.m4
@@ -0,0 +1,164 @@
+#---------------------------------------------------------------------------
+#
+# xc-translit.m4
+#
+# Copyright (c) 2011 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# File version for 'aclocal' use. Keep it a single number.
+# serial 2
+
+
+dnl XC_SH_TR_SH (expression)
+dnl -------------------------------------------------
+dnl Shell execution time transliteration of 'expression'
+dnl argument, where all non-alfanumeric characters are
+dnl converted to the underscore '_' character.
+dnl Normal shell expansion and substitution takes place
+dnl for given 'expression' at shell execution time before
+dnl transliteration is applied to it.
+
+AC_DEFUN([XC_SH_TR_SH],
+[`echo "$1" | sed 's/[[^a-zA-Z0-9_]]/_/g'`])
+
+
+dnl XC_SH_TR_SH_EX (expression, [extra])
+dnl -------------------------------------------------
+dnl Like XC_SH_TR_SH but transliterating characters
+dnl given in 'extra' argument to lowercase 'p'. For
+dnl example [*+], [*], and [+] are valid 'extra' args.
+
+AC_DEFUN([XC_SH_TR_SH_EX],
+[ifelse([$2], [],
+ [XC_SH_TR_SH([$1])],
+ [`echo "$1" | sed 's/[[$2]]/p/g' | sed 's/[[^a-zA-Z0-9_]]/_/g'`])])
+
+
+dnl XC_M4_TR_SH (expression)
+dnl -------------------------------------------------
+dnl m4 execution time transliteration of 'expression'
+dnl argument, where all non-alfanumeric characters are
+dnl converted to the underscore '_' character.
+
+AC_DEFUN([XC_M4_TR_SH],
+[patsubst(XC_QPATSUBST(XC_QUOTE($1),
+ [[^a-zA-Z0-9_]], [_]),
+ [\(_\(.*\)_\)], [\2])])
+
+
+dnl XC_M4_TR_SH_EX (expression, [extra])
+dnl -------------------------------------------------
+dnl Like XC_M4_TR_SH but transliterating characters
+dnl given in 'extra' argument to lowercase 'p'. For
+dnl example [*+], [*], and [+] are valid 'extra' args.
+
+AC_DEFUN([XC_M4_TR_SH_EX],
+[ifelse([$2], [],
+ [XC_M4_TR_SH([$1])],
+ [patsubst(XC_QPATSUBST(XC_QPATSUBST(XC_QUOTE($1),
+ [[$2]],
+ [p]),
+ [[^a-zA-Z0-9_]], [_]),
+ [\(_\(.*\)_\)], [\2])])])
+
+
+dnl XC_SH_TR_CPP (expression)
+dnl -------------------------------------------------
+dnl Shell execution time transliteration of 'expression'
+dnl argument, where all non-alfanumeric characters are
+dnl converted to the underscore '_' character and alnum
+dnl characters are converted to uppercase.
+dnl Normal shell expansion and substitution takes place
+dnl for given 'expression' at shell execution time before
+dnl transliteration is applied to it.
+
+AC_DEFUN([XC_SH_TR_CPP],
+[`echo "$1" | dnl
+sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' | dnl
+sed 's/[[^A-Z0-9_]]/_/g'`])
+
+
+dnl XC_SH_TR_CPP_EX (expression, [extra])
+dnl -------------------------------------------------
+dnl Like XC_SH_TR_CPP but transliterating characters
+dnl given in 'extra' argument to uppercase 'P'. For
+dnl example [*+], [*], and [+] are valid 'extra' args.
+
+AC_DEFUN([XC_SH_TR_CPP_EX],
+[ifelse([$2], [],
+ [XC_SH_TR_CPP([$1])],
+ [`echo "$1" | dnl
+sed 's/[[$2]]/P/g' | dnl
+sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' | dnl
+sed 's/[[^A-Z0-9_]]/_/g'`])])
+
+
+dnl XC_M4_TR_CPP (expression)
+dnl -------------------------------------------------
+dnl m4 execution time transliteration of 'expression'
+dnl argument, where all non-alfanumeric characters are
+dnl converted to the underscore '_' character and alnum
+dnl characters are converted to uppercase.
+
+AC_DEFUN([XC_M4_TR_CPP],
+[patsubst(XC_QPATSUBST(XC_QTRANSLIT(XC_QUOTE($1),
+ [abcdefghijklmnopqrstuvwxyz],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ]),
+ [[^A-Z0-9_]], [_]),
+ [\(_\(.*\)_\)], [\2])])
+
+
+dnl XC_M4_TR_CPP_EX (expression, [extra])
+dnl -------------------------------------------------
+dnl Like XC_M4_TR_CPP but transliterating characters
+dnl given in 'extra' argument to uppercase 'P'. For
+dnl example [*+], [*], and [+] are valid 'extra' args.
+
+AC_DEFUN([XC_M4_TR_CPP_EX],
+[ifelse([$2], [],
+ [XC_M4_TR_CPP([$1])],
+ [patsubst(XC_QPATSUBST(XC_QTRANSLIT(XC_QPATSUBST(XC_QUOTE($1),
+ [[$2]],
+ [P]),
+ [abcdefghijklmnopqrstuvwxyz],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ]),
+ [[^A-Z0-9_]], [_]),
+ [\(_\(.*\)_\)], [\2])])])
+
+
+dnl XC_QUOTE (expression)
+dnl -------------------------------------------------
+dnl Expands to quoted result of 'expression' expansion.
+
+AC_DEFUN([XC_QUOTE],
+[[$@]])
+
+
+dnl XC_QPATSUBST (string, regexp[, repl])
+dnl -------------------------------------------------
+dnl Expands to quoted result of 'patsubst' expansion.
+
+AC_DEFUN([XC_QPATSUBST],
+[XC_QUOTE(patsubst([$1], [$2], [$3]))])
+
+
+dnl XC_QTRANSLIT (string, chars, repl)
+dnl -------------------------------------------------
+dnl Expands to quoted result of 'translit' expansion.
+
+AC_DEFUN([XC_QTRANSLIT],
+[XC_QUOTE(translit([$1], [$2], [$3]))])
+
diff --git a/m4/xc-val-flgs.m4 b/m4/xc-val-flgs.m4
new file mode 100644
index 00000000..36b432c9
--- /dev/null
+++ b/m4/xc-val-flgs.m4
@@ -0,0 +1,243 @@
+#---------------------------------------------------------------------------
+#
+# xc-val-flgs.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_CHECK_VAR_LIBS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_LIBS], [
+ xc_bad_var_libs=no
+ for xc_word in $LIBS; do
+ case "$xc_word" in
+ -l* | --library=*)
+ :
+ ;;
+ *)
+ xc_bad_var_libs=yes
+ ;;
+ esac
+ done
+ if test $xc_bad_var_libs = yes; then
+ AC_MSG_NOTICE([using LIBS: $LIBS])
+ AC_MSG_NOTICE([LIBS note: LIBS should only be used to specify libraries (-lname).])
+ fi
+])
+
+
+dnl _XC_CHECK_VAR_LDFLAGS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_LDFLAGS], [
+ xc_bad_var_ldflags=no
+ for xc_word in $LDFLAGS; do
+ case "$xc_word" in
+ -D*)
+ xc_bad_var_ldflags=yes
+ ;;
+ -U*)
+ xc_bad_var_ldflags=yes
+ ;;
+ -I*)
+ xc_bad_var_ldflags=yes
+ ;;
+ -l* | --library=*)
+ xc_bad_var_ldflags=yes
+ ;;
+ esac
+ done
+ if test $xc_bad_var_ldflags = yes; then
+ AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS])
+ xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not"
+ for xc_word in $LDFLAGS; do
+ case "$xc_word" in
+ -D*)
+ AC_MSG_NOTICE([$xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word])
+ ;;
+ -U*)
+ AC_MSG_NOTICE([$xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word])
+ ;;
+ -I*)
+ AC_MSG_NOTICE([$xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word])
+ ;;
+ -l* | --library=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word])
+ ;;
+ esac
+ done
+ fi
+])
+
+
+dnl _XC_CHECK_VAR_CPPFLAGS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_CPPFLAGS], [
+ xc_bad_var_cppflags=no
+ for xc_word in $CPPFLAGS; do
+ case "$xc_word" in
+ -rpath*)
+ xc_bad_var_cppflags=yes
+ ;;
+ -L* | --library-path=*)
+ xc_bad_var_cppflags=yes
+ ;;
+ -l* | --library=*)
+ xc_bad_var_cppflags=yes
+ ;;
+ esac
+ done
+ if test $xc_bad_var_cppflags = yes; then
+ AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS])
+ xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not"
+ for xc_word in $CPPFLAGS; do
+ case "$xc_word" in
+ -rpath*)
+ AC_MSG_NOTICE([$xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word])
+ ;;
+ -L* | --library-path=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word])
+ ;;
+ -l* | --library=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word])
+ ;;
+ esac
+ done
+ fi
+])
+
+
+dnl _XC_CHECK_VAR_CFLAGS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_CFLAGS], [
+ xc_bad_var_cflags=no
+ for xc_word in $CFLAGS; do
+ case "$xc_word" in
+ -D*)
+ xc_bad_var_cflags=yes
+ ;;
+ -U*)
+ xc_bad_var_cflags=yes
+ ;;
+ -I*)
+ xc_bad_var_cflags=yes
+ ;;
+ -rpath*)
+ xc_bad_var_cflags=yes
+ ;;
+ -L* | --library-path=*)
+ xc_bad_var_cflags=yes
+ ;;
+ -l* | --library=*)
+ xc_bad_var_cflags=yes
+ ;;
+ esac
+ done
+ if test $xc_bad_var_cflags = yes; then
+ AC_MSG_NOTICE([using CFLAGS: $CFLAGS])
+ xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not"
+ for xc_word in $CFLAGS; do
+ case "$xc_word" in
+ -D*)
+ AC_MSG_NOTICE([$xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word])
+ ;;
+ -U*)
+ AC_MSG_NOTICE([$xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word])
+ ;;
+ -I*)
+ AC_MSG_NOTICE([$xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word])
+ ;;
+ -rpath*)
+ AC_MSG_NOTICE([$xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word])
+ ;;
+ -L* | --library-path=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word])
+ ;;
+ -l* | --library=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word])
+ ;;
+ esac
+ done
+ fi
+])
+
+
+dnl XC_CHECK_USER_FLAGS
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Performs some sanity checks for LIBS, LDFLAGS,
+dnl CPPFLAGS and CFLAGS values that the user might
+dnl have set. When checks fails, user is noticed
+dnl about errors detected in all of them and script
+dnl execution is halted.
+dnl
+dnl Intended to be used early in configure script.
+
+AC_DEFUN([XC_CHECK_USER_FLAGS], [
+ AC_PREREQ([2.50])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
+ dnl check order below matters
+ _XC_CHECK_VAR_LIBS
+ _XC_CHECK_VAR_LDFLAGS
+ _XC_CHECK_VAR_CPPFLAGS
+ _XC_CHECK_VAR_CFLAGS
+ if test $xc_bad_var_libs = yes ||
+ test $xc_bad_var_cflags = yes ||
+ test $xc_bad_var_ldflags = yes ||
+ test $xc_bad_var_cppflags = yes; then
+ AC_MSG_ERROR([Can not continue. Fix errors mentioned immediately above this line.])
+ fi
+])
+
+
+dnl XC_CHECK_BUILD_FLAGS
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Performs some sanity checks for LIBS, LDFLAGS,
+dnl CPPFLAGS and CFLAGS values that the configure
+dnl script might have set. When checks fails, user
+dnl is noticed about errors detected in all of them
+dnl but script continues execution.
+dnl
+dnl Intended to be used very late in configure script.
+
+AC_DEFUN([XC_CHECK_BUILD_FLAGS], [
+ AC_PREREQ([2.50])dnl
+ dnl check order below matters
+ _XC_CHECK_VAR_LIBS
+ _XC_CHECK_VAR_LDFLAGS
+ _XC_CHECK_VAR_CPPFLAGS
+ _XC_CHECK_VAR_CFLAGS
+ if test $xc_bad_var_libs = yes ||
+ test $xc_bad_var_cflags = yes ||
+ test $xc_bad_var_ldflags = yes ||
+ test $xc_bad_var_cppflags = yes; then
+ AC_MSG_WARN([Continuing even with errors mentioned immediately above this line.])
+ fi
+])
+
diff --git a/m4/zz40-xc-ovr.m4 b/m4/zz40-xc-ovr.m4
new file mode 100644
index 00000000..0e3b1cba
--- /dev/null
+++ b/m4/zz40-xc-ovr.m4
@@ -0,0 +1,668 @@
+#---------------------------------------------------------------------------
+#
+# zz40-xc-ovr.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl The funny name of this file is intentional in order to make it
+dnl sort alphabetically after any libtool, autoconf or automake
+dnl provided .m4 macro file that might get copied into this same
+dnl subdirectory. This allows that macro (re)definitions from this
+dnl file may override those provided in other files.
+
+
+dnl Version macros
+dnl -------------------------------------------------
+dnl Public macros.
+
+m4_define([XC_CONFIGURE_PREAMBLE_VER_MAJOR],[1])dnl
+m4_define([XC_CONFIGURE_PREAMBLE_VER_MINOR],[0])dnl
+
+
+dnl _XC_CFG_PRE_PREAMBLE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CFG_PRE_PREAMBLE],
+[
+## -------------------------------- ##
+@%:@@%:@ [XC_CONFIGURE_PREAMBLE] ver: []dnl
+XC_CONFIGURE_PREAMBLE_VER_MAJOR.[]dnl
+XC_CONFIGURE_PREAMBLE_VER_MINOR ##
+## -------------------------------- ##
+
+xc_configure_preamble_ver_major='XC_CONFIGURE_PREAMBLE_VER_MAJOR'
+xc_configure_preamble_ver_minor='XC_CONFIGURE_PREAMBLE_VER_MINOR'
+
+#
+# Set IFS to space, tab and newline.
+#
+
+xc_space=' '
+xc_tab=' '
+xc_newline='
+'
+IFS="$xc_space$xc_tab$xc_newline"
+
+#
+# Set internationalization behavior variables.
+#
+
+LANG='C'
+LC_ALL='C'
+LANGUAGE='C'
+export LANG
+export LC_ALL
+export LANGUAGE
+
+#
+# Some useful variables.
+#
+
+xc_msg_warn='configure: WARNING:'
+xc_msg_abrt='Can not continue.'
+xc_msg_err='configure: error:'
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_CMD_ECHO
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'echo' command
+dnl is available, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
+#
+# Verify that 'echo' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ # Try built-in echo, and fail.
+ echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_CMD_TEST
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'test' command
+dnl is available, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_TEST],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+#
+# Verify that 'test' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'test' command not found. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_VAR_PATH
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'PATH' variable
+dnl is set, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_VAR_PATH],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+#
+# Verify that 'PATH' variable is set, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'PATH' variable not set. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_CMD_EXPR
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'expr' command
+dnl is available, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'expr' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+ x7)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'expr' command not found. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_SED
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'sed' utility
+dnl is found within 'PATH', otherwise aborts execution.
+dnl
+dnl This 'sed' is required in order to allow configure
+dnl script bootstrapping itself. No fancy testing for a
+dnl proper 'sed' this early, that should be done later.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_SED],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'sed' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+ | sed -e 's:unknown:success:' 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'sed' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_GREP
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'grep' utility
+dnl is found within 'PATH', otherwise aborts execution.
+dnl
+dnl This 'grep' is required in order to allow configure
+dnl script bootstrapping itself. No fancy testing for a
+dnl proper 'grep' this early, that should be done later.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'grep' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`echo "$xc_tst_str" 2>/dev/null \
+ | grep 'unknown' >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'grep' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_TR
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'tr' utility
+dnl is found within 'PATH', otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_TR],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'tr' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10"
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+ | tr -d "0123456789$xc_tab" 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'tr' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_WC
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'wc' utility
+dnl is found within 'PATH', otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_WC],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+#
+# Verify that 'wc' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown unknown unknown unknown'
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+ | wc -w 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+ x4)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'wc' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_CAT
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'cat' utility
+dnl is found within 'PATH', otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+#
+# Verify that 'cat' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`cat <<_EOT 2>/dev/null \
+ | wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null
+unknown
+unknown
+unknown
+_EOT`
+case "x$xc_tst_str" in @%:@ ((
+ x3)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'cat' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_CHECK_PATH_SEPARATOR
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that computes the path separator
+dnl and stores the result in 'PATH_SEPARATOR', unless
+dnl the user has already set it with a non-empty value.
+dnl
+dnl This path separator is the symbol used to separate
+dnl or diferentiate paths inside the 'PATH' environment
+dnl variable.
+dnl
+dnl Non-empty user provided 'PATH_SEPARATOR' always
+dnl overrides the auto-detected one.
+
+AC_DEFUN([_XC_CFG_PRE_CHECK_PATH_SEPARATOR],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+#
+# Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set.
+#
+
+# Directory count in 'PATH' when using a colon separator.
+xc_tst_dirs_col='x'
+xc_tst_prev_IFS=$IFS; IFS=':'
+for xc_tst_dir in $PATH; do
+ IFS=$xc_tst_prev_IFS
+ xc_tst_dirs_col="x$xc_tst_dirs_col"
+done
+IFS=$xc_tst_prev_IFS
+xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'`
+
+# Directory count in 'PATH' when using a semicolon separator.
+xc_tst_dirs_sem='x'
+xc_tst_prev_IFS=$IFS; IFS=';'
+for xc_tst_dir in $PATH; do
+ IFS=$xc_tst_prev_IFS
+ xc_tst_dirs_sem="x$xc_tst_dirs_sem"
+done
+IFS=$xc_tst_prev_IFS
+xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'`
+
+if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then
+ # When both counting methods give the same result we do not want to
+ # chose one over the other, and consider auto-detection not possible.
+ if test -z "$PATH_SEPARATOR"; then
+ # Stop dead until user provides 'PATH_SEPARATOR' definition.
+ echo "$xc_msg_err 'PATH_SEPARATOR' variable not set. $xc_msg_abrt" >&2
+ exit 1
+ fi
+else
+ # Separator with the greater directory count is the auto-detected one.
+ if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then
+ xc_tst_auto_separator=';'
+ else
+ xc_tst_auto_separator=':'
+ fi
+ if test -z "$PATH_SEPARATOR"; then
+ # Simply use the auto-detected one when not already set.
+ PATH_SEPARATOR=$xc_tst_auto_separator
+ elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then
+ echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2
+ fi
+fi
+xc_PATH_SEPARATOR=$PATH_SEPARATOR
+AC_SUBST([PATH_SEPARATOR])dnl
+])
+
+
+dnl _XC_CFG_PRE_POSTLUDE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CFG_PRE_POSTLUDE],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
+AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
+dnl
+xc_configure_preamble_result='yes'
+])
+
+
+dnl XC_CONFIGURE_PREAMBLE
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro emits shell code which does some
+dnl very basic checks related with the availability
+dnl of some commands and utilities needed to allow
+dnl configure script bootstrapping itself when using
+dnl these to figure out other settings. Also emits
+dnl code that performs PATH_SEPARATOR auto-detection
+dnl and sets its value unless it is already set with
+dnl a non-empty value.
+dnl
+dnl These basic checks are intended to be placed and
+dnl executed as early as possible in the resulting
+dnl configure script, and as such these must be pure
+dnl and portable shell code.
+dnl
+dnl This macro may be used directly, or indirectly
+dnl when using other macros that AC_REQUIRE it such
+dnl as XC_CHECK_PATH_SEPARATOR.
+dnl
+dnl Currently the mechanism used to ensure that this
+dnl macro expands early enough in generated configure
+dnl script is making it override autoconf and libtool
+dnl PATH_SEPARATOR check.
+
+AC_DEFUN([XC_CONFIGURE_PREAMBLE],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_PREAMBLE])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_POSTLUDE])dnl
+dnl
+AC_BEFORE([$0],[AC_CHECK_TOOL])dnl
+AC_BEFORE([$0],[AC_CHECK_PROG])dnl
+AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl
+AC_BEFORE([$0],[AC_CHECK_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PATH_TOOL])dnl
+AC_BEFORE([$0],[AC_PATH_PROG])dnl
+AC_BEFORE([$0],[AC_PATH_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PROG_SED])dnl
+AC_BEFORE([$0],[AC_PROG_GREP])dnl
+AC_BEFORE([$0],[AC_PROG_LN_S])dnl
+AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl
+AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
+AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+dnl
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
+AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
+AC_REQUIRE([_XC_CFG_PRE_POSTLUDE])dnl
+dnl
+m4_pattern_forbid([^_*XC])dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl Override autoconf and libtool PATH_SEPARATOR check
+dnl -------------------------------------------------
+dnl Macros overriding.
+dnl
+dnl This is done to ensure that the same check is
+dnl used across different autoconf versions and to
+dnl allow expansion of XC_CONFIGURE_PREAMBLE macro
+dnl early enough in the generated configure script.
+
+dnl
+dnl Override when using autoconf 2.53 and newer.
+dnl
+
+m4_ifdef([_AS_PATH_SEPARATOR_PREPARE],
+[dnl
+m4_undefine([_AS_PATH_SEPARATOR_PREPARE])dnl
+m4_defun([_AS_PATH_SEPARATOR_PREPARE],
+[dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+m4_define([$0],[])dnl
+])dnl
+])
+
+dnl
+dnl Override when using autoconf 2.50 to 2.52
+dnl
+
+m4_ifdef([_AC_INIT_PREPARE_FS_SEPARATORS],
+[dnl
+m4_undefine([_AC_INIT_PREPARE_FS_SEPARATORS])dnl
+m4_defun([_AC_INIT_PREPARE_FS_SEPARATORS],
+[dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+ac_path_separator=$PATH_SEPARATOR
+m4_define([$0],[])dnl
+])dnl
+])
+
+dnl
+dnl Override when using libtool 1.4.2
+dnl
+
+m4_ifdef([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
+[dnl
+m4_undefine([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
+m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
+[dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+lt_cv_sys_path_separator=$PATH_SEPARATOR
+m4_define([$0],[])dnl
+])dnl
+])
+
+
+dnl XC_CHECK_PATH_SEPARATOR
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Usage of this macro ensures that generated configure
+dnl script uses the same PATH_SEPARATOR check irrespective
+dnl of autoconf or libtool version being used to generate
+dnl configure script.
+dnl
+dnl Emits shell code that computes the path separator
+dnl and stores the result in 'PATH_SEPARATOR', unless
+dnl the user has already set it with a non-empty value.
+dnl
+dnl This path separator is the symbol used to separate
+dnl or diferentiate paths inside the 'PATH' environment
+dnl variable.
+dnl
+dnl Non-empty user provided 'PATH_SEPARATOR' always
+dnl overrides the auto-detected one.
+dnl
+dnl Strictly speaking the check is done in two steps. The
+dnl first, which does the actual check, takes place in
+dnl XC_CONFIGURE_PREAMBLE macro and happens very early in
+dnl generated configure script. The second one shows and
+dnl logs the result of the check into config.log at a later
+dnl configure stage. Placement of this second stage in
+dnl generated configure script will be done where first
+dnl direct or indirect usage of this macro happens.
+
+AC_DEFUN([XC_CHECK_PATH_SEPARATOR],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[AC_CHECK_TOOL])dnl
+AC_BEFORE([$0],[AC_CHECK_PROG])dnl
+AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl
+AC_BEFORE([$0],[AC_CHECK_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PATH_TOOL])dnl
+AC_BEFORE([$0],[AC_PATH_PROG])dnl
+AC_BEFORE([$0],[AC_PATH_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PROG_SED])dnl
+AC_BEFORE([$0],[AC_PROG_GREP])dnl
+AC_BEFORE([$0],[AC_PROG_LN_S])dnl
+AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl
+AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
+AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+dnl
+#
+# Check that 'XC_CONFIGURE_PREAMBLE' has already run.
+#
+
+if test -z "$xc_configure_preamble_result"; then
+ AC_MSG_ERROR([xc_configure_preamble_result not set (internal problem)])
+fi
+
+#
+# Check that 'PATH_SEPARATOR' has already been set.
+#
+
+if test -z "$xc_PATH_SEPARATOR"; then
+ AC_MSG_ERROR([xc_PATH_SEPARATOR not set (internal problem)])
+fi
+if test -z "$PATH_SEPARATOR"; then
+ AC_MSG_ERROR([PATH_SEPARATOR not set (internal or config.site problem)])
+fi
+AC_MSG_CHECKING([for path separator])
+AC_MSG_RESULT([$PATH_SEPARATOR])
+if test "x$PATH_SEPARATOR" != "x$xc_PATH_SEPARATOR"; then
+ AC_MSG_CHECKING([for initial path separator])
+ AC_MSG_RESULT([$xc_PATH_SEPARATOR])
+ AC_MSG_ERROR([path separator mismatch (internal or config.site problem)])
+fi
+dnl
+m4_pattern_forbid([^_*XC])dnl
+m4_define([$0],[])dnl
+])
+
diff --git a/m4/zz50-xc-ovr.m4 b/m4/zz50-xc-ovr.m4
new file mode 100644
index 00000000..7e9ae592
--- /dev/null
+++ b/m4/zz50-xc-ovr.m4
@@ -0,0 +1,60 @@
+#---------------------------------------------------------------------------
+#
+# zz50-xc-ovr.m4
+#
+# Copyright (c) 2011 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl The funny name of this file is intentional in order to make it
+dnl sort alphabetically after any libtool, autoconf or automake
+dnl provided .m4 macro file that might get copied into this same
+dnl subdirectory. This allows that macro (re)definitions from this
+dnl file may override those provided in other files.
+
+
+dnl Override some language related macros
+dnl -------------------------------------------------
+dnl This is done to prevent Libtool 1.5.X from doing
+dnl unnecesary C++, Fortran and Java tests when only
+dnl using C language and reduce resulting configure
+dnl script by nearly 300 Kb.
+
+m4_ifdef([AC_LIBTOOL_LANG_CXX_CONFIG],
+ [m4_undefine([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
+
+m4_ifdef([AC_LIBTOOL_LANG_F77_CONFIG],
+ [m4_undefine([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
+
+m4_ifdef([AC_LIBTOOL_LANG_GCJ_CONFIG],
+ [m4_undefine([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
+
+
+dnl XC_OVR_ZZ50
+dnl -------------------------------------------------
+dnl Placing a call to this macro in configure.ac will
+dnl make macros in this file visible to other macros
+dnl used for same configure script, overriding those
+dnl provided elsewhere.
+
+AC_DEFUN([XC_OVR_ZZ50],
+ [AC_BEFORE([$0],[AC_PROG_LIBTOOL])])
+
diff --git a/m4/zz60-xc-ovr.m4 b/m4/zz60-xc-ovr.m4
new file mode 100644
index 00000000..959f1188
--- /dev/null
+++ b/m4/zz60-xc-ovr.m4
@@ -0,0 +1,64 @@
+#---------------------------------------------------------------------------
+#
+# zz60-xc-ovr.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl The funny name of this file is intentional in order to make it
+dnl sort alphabetically after any libtool, autoconf or automake
+dnl provided .m4 macro file that might get copied into this same
+dnl subdirectory. This allows that macro (re)definitions from this
+dnl file may override those provided in other files.
+
+
+dnl Override an autoconf provided macro
+dnl -------------------------------------------------
+dnl This macro overrides the one provided by autoconf
+dnl 2.58 or newer, and provides macro definition for
+dnl autoconf 2.57 or older which lack it. This allows
+dnl using libtool 2.2 or newer, which requires that
+dnl this macro is used in configure.ac, with autoconf
+dnl 2.57 or older.
+
+m4_ifdef([AC_CONFIG_MACRO_DIR],
+[dnl
+m4_undefine([AC_CONFIG_MACRO_DIR])dnl
+])
+m4_define([AC_CONFIG_MACRO_DIR],[])
+
+
+dnl XC_OVR_ZZ60
+dnl -------------------------------------------------
+dnl Placing a call to this macro in configure.ac will
+dnl make macros in this file visible to other macros
+dnl used for same configure script, overriding those
+dnl provided elsewhere.
+
+AC_DEFUN([XC_OVR_ZZ60],
+[dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+dnl
+AC_BEFORE([$0],[AC_CONFIG_MACRO_DIR])dnl
+AC_BEFORE([$0],[AC_CONFIG_MACRO_DIRS])dnl
+])
+
diff --git a/maketgz b/maketgz
index b2a09be4..250b11f3 100755
--- a/maketgz
+++ b/maketgz
@@ -9,7 +9,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -43,7 +43,7 @@ patch=`echo $libversion |cut -d. -f3 | cut -d- -f1 | sed -e "s/[^0-9]//g"`
numeric=`perl -e 'printf("%02x%02x%02x\n", '"$major, $minor, $patch);"`
HEADER=include/curl/curlver.h
-CHEADER=src/version.h
+CHEADER=src/tool_version.h
# requires a date command that knows -u for UTC time zone
datestamp=`date -u`
@@ -91,9 +91,6 @@ findprog()
return 0
}
-echo "maketgz: cp lib/curl_config.h.in src/curl_config.h.in"
-cp lib/curl_config.h.in src/curl_config.h.in
-
############################################################################
#
# Enforce a rerun of configure (updates the VERSION)
@@ -126,8 +123,12 @@ make -s html
echo "make pdf"
make -s pdf
+# And the IDE files
+echo "make vc-ide"
+make -s vc-ide
+
echo "produce CHANGES"
-git log --pretty=fuller --no-color --date=short --decorate=full -1000 | ./log2changes.pl > CHANGES.dist
+git log --pretty=fuller --no-color --date=short --decorate=full -1000 | ./scripts/log2changes.pl > CHANGES.dist
############################################################################
#
@@ -145,7 +146,7 @@ make -s dist VERSION=$version
bzip2="curl-$version.tar.bz2"
echo "Generating $bzip2"
-gzip -dc $targz | bzip2 --best - > $bzip2
+gzip -dc $targz | bzip2 --best > $bzip2
############################################################################
#
diff --git a/missing b/missing
deleted file mode 100755
index a9f9d941..00000000
--- a/missing
+++ /dev/null
@@ -1,283 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
-
-case "$1" in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-
- -h|--h|--he|--hel|--help)
- echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
- -h, --help display this help and exit
- -v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`curl_config.h.in'
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
- ;;
-
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing 0.3 - GNU automake"
- ;;
-
- -*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
- ;;
-
- aclocal)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="curl_config.h"
- touch_files=
- for f in $files; do
- case "$f" in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- bison|yacc)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if [ ! -f y.tab.h ]; then
- echo >y.tab.h
- fi
- if [ ! -f y.tab.c ]; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex|flex)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if [ ! -f lex.yy.c ]; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit 1
- fi
- ;;
-
- makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
- fi
- touch $file
- ;;
-
- tar)
- shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar ${1+"$@"} && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar ${1+"$@"} && exit 0
- fi
- firstarg="$1"
- if shift; then
- case "$firstarg" in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" ${1+"$@"} && exit 0
- ;;
- esac
- case "$firstarg" in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" ${1+"$@"} && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/mkinstalldirs b/mkinstalldirs
deleted file mode 100644
index 115df4e3..00000000
--- a/mkinstalldirs
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-
-errstatus=0
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case "$pathcomp" in
- -* ) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir -m0755 $pathcomp" 1>&2
-
- mkdir -m0755 "$pathcomp" || lasterr=$?
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/packages/AIX/Makefile.in b/packages/AIX/Makefile.in
deleted file mode 100644
index fe45453f..00000000
--- a/packages/AIX/Makefile.in
+++ /dev/null
@@ -1,563 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/AIX
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-SUBDIRS = RPM
-EXTRA_DIST = Makefile.am
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/AIX/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/AIX/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/AIX/RPM/.gitignore b/packages/AIX/RPM/.gitignore
new file mode 100644
index 00000000..cf17733e
--- /dev/null
+++ b/packages/AIX/RPM/.gitignore
@@ -0,0 +1 @@
+curl.spec
diff --git a/packages/AIX/RPM/Makefile.in b/packages/AIX/RPM/Makefile.in
deleted file mode 100644
index 42f73d77..00000000
--- a/packages/AIX/RPM/Makefile.in
+++ /dev/null
@@ -1,408 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/AIX/RPM
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/curl.spec.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES = curl.spec
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-EXTRA_DIST = README curl.spec.in
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/AIX/RPM/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/AIX/RPM/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-curl.spec: $(top_builddir)/config.status $(srcdir)/curl.spec.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/AIX/RPM/curl.spec.in b/packages/AIX/RPM/curl.spec.in
index a37e0d7c..366cfa07 100644
--- a/packages/AIX/RPM/curl.spec.in
+++ b/packages/AIX/RPM/curl.spec.in
@@ -105,6 +105,7 @@ make DESTDIR=%{buildroot} install-strip
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/curl
%attr(0644,root,root) %{_mandir}/man1/curl.1*
+%attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
%{_libdir}/libcurl.a
%if %{SSL} == 1
%{_datadir}/curl/curl-ca-bundle.crt
@@ -124,6 +125,7 @@ make DESTDIR=%{buildroot} install-strip
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/curl-config
%attr(0644,root,root) %{_mandir}/man1/curl-config.1*
+%attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
%attr(0644,root,root) %{_mandir}/man3/*
%attr(0644,root,root) %{_includedir}/curl/*
%{_libdir}/libcurl.la
diff --git a/packages/DOS/common.dj b/packages/DOS/common.dj
index a32f10c5..85b611c4 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)
@@ -92,7 +92,7 @@ ARES_ROOT = $(TOPDIR)/ares
CC = gcc
YACC = bison -y
-CFLAGS = -g -gcoff -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \
+CFLAGS = -g -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \
-I$(WATT32_ROOT)/inc -Wall -DHAVE_CONFIG_H
ifeq ($(USE_SSL),1)
diff --git a/packages/EPM/.gitignore b/packages/EPM/.gitignore
new file mode 100644
index 00000000..505a4fdf
--- /dev/null
+++ b/packages/EPM/.gitignore
@@ -0,0 +1 @@
+curl.list
diff --git a/packages/EPM/Makefile.in b/packages/EPM/Makefile.in
deleted file mode 100644
index 122015ee..00000000
--- a/packages/EPM/Makefile.in
+++ /dev/null
@@ -1,409 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/EPM
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/curl.list.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES = curl.list
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = foreign
-EXTRA_DIST = README curl.list.in
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/EPM/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/EPM/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-curl.list: $(top_builddir)/config.status $(srcdir)/curl.list.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/EPM/README b/packages/EPM/README
index 3529dbf5..0b031e84 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/EPM/curl.list.in b/packages/EPM/curl.list.in
index 39060dde..00f05fb1 100644
--- a/packages/EPM/curl.list.in
+++ b/packages/EPM/curl.list.in
@@ -23,6 +23,7 @@ $datarootdir=@datarootdir@
f 0644 cowo pppusers ${mandir}/man1/curl.1 ./docs/curl.1
f 0644 cowo pppusers ${mandir}/man1/curl-config.1 ./docs/curl-config.1
+f 0644 cowo pppusers ${mandir}/man1/mk-ca-bundle.1 ./docs/mk-ca-bundle.1
f 0644 cowo pppusers ${mandir}/man3/curl_easy_cleanup.3 ./docs/curl_easy_cleanup.3
f 0644 cowo pppusers ${mandir}/man3/curl_easy_getinfo.3 ./docs/curl_easy_getinfo.3
f 0644 cowo pppusers ${mandir}/man3/curl_easy_init.3 ./docs/curl_easy_init.3
diff --git a/packages/Linux/Makefile.in b/packages/Linux/Makefile.in
deleted file mode 100644
index af05429d..00000000
--- a/packages/Linux/Makefile.in
+++ /dev/null
@@ -1,562 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/Linux
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-SUBDIRS = RPM
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Linux/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/Linux/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/Linux/RPM/.gitignore b/packages/Linux/RPM/.gitignore
new file mode 100644
index 00000000..0b359fe7
--- /dev/null
+++ b/packages/Linux/RPM/.gitignore
@@ -0,0 +1,2 @@
+curl-ssl.spec
+curl.spec
diff --git a/packages/Linux/RPM/Makefile.in b/packages/Linux/RPM/Makefile.in
deleted file mode 100644
index 22989473..00000000
--- a/packages/Linux/RPM/Makefile.in
+++ /dev/null
@@ -1,410 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/Linux/RPM
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/curl-ssl.spec.in $(srcdir)/curl.spec.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES = curl.spec curl-ssl.spec
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-EXTRA_DIST = README curl-ssl.spec.in curl.spec.in make_curl_rpm
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Linux/RPM/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/Linux/RPM/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-curl.spec: $(top_builddir)/config.status $(srcdir)/curl.spec.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-curl-ssl.spec: $(top_builddir)/config.status $(srcdir)/curl-ssl.spec.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/Linux/RPM/curl-ssl.spec.in b/packages/Linux/RPM/curl-ssl.spec.in
index 7f290ba2..287a3a5c 100644
--- a/packages/Linux/RPM/curl-ssl.spec.in
+++ b/packages/Linux/RPM/curl-ssl.spec.in
@@ -66,6 +66,7 @@ make DESTDIR=%{buildroot} install-strip
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/curl
%attr(0644,root,root) %{_mandir}/man1/curl.1*
+%attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
%{_libdir}/libcurl.so*
%{_datadir}/curl/curl-ca-bundle.crt
%doc CHANGES COPYING README testcurl.sh docs/BUGS docs/SSLCERTS
diff --git a/packages/Makefile.am b/packages/Makefile.am
index e211c0a3..bef04f3c 100644
--- a/packages/Makefile.am
+++ b/packages/Makefile.am
@@ -4,6 +4,7 @@ EXTRA_DIST = README \
DOS/README \
DOS/common.dj \
NetWare/get_ver.awk \
+ NetWare/get_exp.awk \
OS400/README.OS400 \
OS400/ccsidcurl.c \
OS400/ccsidcurl.h \
@@ -28,5 +29,5 @@ EXTRA_DIST = README \
Symbian/readme.txt \
TPF/curl.mak \
TPF/maketpf.env_curl \
- TPF/maketpf.env_curllib
-
+ TPF/maketpf.env_curllib \
+ Android/Android.mk
diff --git a/packages/Makefile.in b/packages/Makefile.in
deleted file mode 100644
index 9114470c..00000000
--- a/packages/Makefile.in
+++ /dev/null
@@ -1,593 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-SUBDIRS = Win32 Linux Solaris EPM AIX vms
-EXTRA_DIST = README \
- DOS/README \
- DOS/common.dj \
- NetWare/get_ver.awk \
- OS400/README.OS400 \
- OS400/ccsidcurl.c \
- OS400/ccsidcurl.h \
- OS400/curl.inc.in \
- OS400/initscript.sh \
- OS400/make-include.sh \
- OS400/make-lib.sh \
- OS400/make-src.sh \
- OS400/make-tests.sh \
- OS400/makefile.sh \
- OS400/os400sys.c \
- OS400/os400sys.h \
- Symbian/bwins/libcurlu.def \
- Symbian/eabi/libcurlu.def \
- Symbian/group/bld.inf \
- Symbian/group/curl.iby \
- Symbian/group/curl.mmp \
- Symbian/group/curl.pkg \
- Symbian/group/libcurl.iby \
- Symbian/group/libcurl.mmp \
- Symbian/group/libcurl.pkg \
- Symbian/readme.txt \
- TPF/curl.mak \
- TPF/maketpf.env_curl \
- TPF/maketpf.env_curllib
-
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/DOS $(distdir)/NetWare $(distdir)/OS400 $(distdir)/Symbian $(distdir)/Symbian/bwins $(distdir)/Symbian/eabi $(distdir)/Symbian/group $(distdir)/TPF
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/NetWare/get_exp.awk b/packages/NetWare/get_exp.awk
new file mode 100644
index 00000000..5bd8a0cd
--- /dev/null
+++ b/packages/NetWare/get_exp.awk
@@ -0,0 +1,72 @@
+# ***************************************************************************
+# * _ _ ____ _
+# * Project ___| | | | _ \| |
+# * / __| | | | |_) | |
+# * | (__| |_| | _ <| |___
+# * \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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.
+# *
+# ***************************************************************************
+# awk script which fetches curl function symbols from public header input
+# files and write them to STDOUT. Here you can get an awk version for Win32:
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
+#
+BEGIN {
+ add_symbol("curl_strequal")
+ add_symbol("curl_strnequal")
+}
+
+function add_symbol(sym_name) {
+ sub(" ", "", sym_name)
+ exports[++idx] = sym_name
+}
+
+
+/^CURL_EXTERN .* [*]?curl_.*[(]/ {
+ sub("[(].*", "")
+ sub("^.* ", "")
+ sub("^[*]", "")
+ add_symbol($0)
+}
+
+END {
+ printf("Added %d symbols to export list.\n", idx) > "/dev/stderr"
+ # sort symbols with shell sort
+ increment = int(idx / 2)
+ while (increment > 0) {
+ for (i = increment+1; i <= idx; i++) {
+ j = i
+ temp = exports[i]
+ while ((j >= increment+1) && (exports[j-increment] > temp)) {
+ exports[j] = exports[j-increment]
+ j -= increment
+ }
+ exports[j] = temp
+ }
+ if (increment == 2)
+ increment = 1
+ else
+ increment = int(increment*5/11)
+ }
+ # print the array
+ if (EXPPREFIX) {
+ printf(" (%s)\n", EXPPREFIX)
+ }
+ while (x < idx - 1) {
+ printf(" %s,\n", exports[++x])
+ }
+ printf(" %s\n", exports[++x])
+}
+
diff --git a/packages/NetWare/get_ver.awk b/packages/NetWare/get_ver.awk
index 2f3b3081..91affbb4 100644
--- a/packages/NetWare/get_ver.awk
+++ b/packages/NetWare/get_ver.awk
@@ -5,7 +5,7 @@
# * | (__| |_| | _ <| |___
# * \___|\___/|_| \_\_____|
# *
-# * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+# * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,57 +19,26 @@
# * KIND, either express or implied.
# *
# ***************************************************************************
-# awk script which fetches curl / ares version number and string from input
+# awk script which fetches curl version number and copyright string from input
# file and writes them to STDOUT. Here you can get an awk version for Win32:
-# http://www.gknw.net/development/prgtools/awk-20070501.zip
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
#
BEGIN {
- if (match (ARGV[1], /curlver.h/)) {
- while ((getline < ARGV[1]) > 0) {
- if (match ($0, /^#define LIBCURL_COPYRIGHT "[^"]+"$/)) {
- libcurl_copyright_str = substr($0, 28, length($0)-28);
- }
- else if (match ($0, /^#define LIBCURL_VERSION "[^"]+"$/)) {
- libcurl_ver_str = substr($3, 2, length($3)-2);
- }
- else if (match ($0, /^#define LIBCURL_VERSION_MAJOR [0-9]+$/)) {
- libcurl_ver_major = substr($3, 1, length($3));
- }
- else if (match ($0, /^#define LIBCURL_VERSION_MINOR [0-9]+$/)) {
- libcurl_ver_minor = substr($3, 1, length($3));
- }
- else if (match ($0, /^#define LIBCURL_VERSION_PATCH [0-9]+$/)) {
- libcurl_ver_patch = substr($3, 1, length($3));
- }
- }
- libcurl_ver = libcurl_ver_major "," libcurl_ver_minor "," libcurl_ver_patch;
- print "LIBCURL_VERSION = " libcurl_ver "";
- print "LIBCURL_VERSION_STR = " libcurl_ver_str "";
- print "LIBCURL_COPYRIGHT_STR = " libcurl_copyright_str "";
- }
- if (match (ARGV[1], /ares_version.h/)) {
- while ((getline < ARGV[1]) > 0) {
- if (match ($0, /^#define ARES_COPYRIGHT "[^"]+"$/)) {
- libcares_copyright_str = substr($0, 25, length($0)-25);
- }
- else if (match ($0, /^#define ARES_VERSION_STR "[^"]+"$/)) {
- libcares_ver_str = substr($3, 2, length($3)-2);
- }
- else if (match ($0, /^#define ARES_VERSION_MAJOR [0-9]+$/)) {
- libcares_ver_major = substr($3, 1, length($3));
- }
- else if (match ($0, /^#define ARES_VERSION_MINOR [0-9]+$/)) {
- libcares_ver_minor = substr($3, 1, length($3));
- }
- else if (match ($0, /^#define ARES_VERSION_PATCH [0-9]+$/)) {
- libcares_ver_patch = substr($3, 1, length($3));
- }
- }
- libcares_ver = libcares_ver_major "," libcares_ver_minor "," libcares_ver_patch;
- print "LIBCARES_VERSION = " libcares_ver "";
- print "LIBCARES_VERSION_STR = " libcares_ver_str "";
- print "LIBCARES_COPYRIGHT_STR = " libcares_copyright_str "";
+ while ((getline < ARGV[1]) > 0) {
+ sub("\r", "") # make MSYS gawk work with CRLF header input.
+ if (match ($0, /^#define LIBCURL_COPYRIGHT "([^"]+)"$/))
+ copyright_string = substr($0, 28, length($0)-28)
+ else if (match ($0, /^#define LIBCURL_VERSION "[^"]+"$/))
+ version_string = substr($3, 2, length($3)-2)
+ else if (match ($0, /^#define LIBCURL_VERSION_MAJOR [0-9]+$/))
+ version_major = $3
+ else if (match ($0, /^#define LIBCURL_VERSION_MINOR [0-9]+$/))
+ version_minor = $3
+ else if (match ($0, /^#define LIBCURL_VERSION_PATCH [0-9]+$/))
+ version_patch = $3
}
+ print "LIBCURL_VERSION = " version_major "," version_minor "," version_patch
+ print "LIBCURL_VERSION_STR = " version_string
+ print "LIBCURL_COPYRIGHT_STR = " copyright_string
}
-
diff --git a/packages/OS400/README.OS400 b/packages/OS400/README.OS400
index 746bba8a..0cb1cf29 100644
--- a/packages/OS400/README.OS400
+++ b/packages/OS400/README.OS400
@@ -39,22 +39,21 @@ 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).
- Three SSL implementations were present in libcurl. Nevertheless, none of them
-is available on OS/400. To support SSL on OS/400, a fourth implementation has
-been added (qssl.[ch]). There is no way to have different certificate stores
-for CAs and for personal/application certificates/key. More, the SSL context
-may be defined as an application identifier in the main certificate store,
-or as a keyring file. As a consequence, the meaning of some fields have been
-slightly altered:
-_ The "certificate identifier" is taken from CURLOPT_SSLCERT if defined, else
-from CURLOPT_CAINFO.
-_ The certificate identifier is then used as an application identifier in the
-main certificate store. If successful, this context is used.
-_ If the previous step failed, the certificate identifier is used as the file
-name of a keyring. CURLOPT_KEYPASSWD is used here as the keyring password.
-_ The default ca-bundle (CURLOPT_CAINFO) is set to the main certificate store's
-keyring file name: this allows to use the system global CAs by default. (In that
-case, the keyring password is safely recovered from the system... IBM dixit!)
+ 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
+"certificate labels" are managed by external IBM-defined applications.
+ There are two ways to specify an SSL context:
+- By an application identifier.
+- By a keyring file pathname and (optionally) certificate label.
+ To identify an SSL context by application identifier, use option
+SETOPT_SSLCERT to specify the application identifier.
+ To address an SSL context by keyring and certificate label, use CURLOPT_CAINFO
+to set-up the keyring pathname, CURLOPT_SSLCERT to define the certificate label
+(omitting it will cause the default certificate in keyring to be used) and
+CURLOPT_KEYPASSWD to give the keyring password. If SSL is used without
+defining any of these options, the default (i.e.: system) keyring is used for
+server certificate validation.
Non-standard EBCDIC wrapper prototypes are defined in an additional header
file: ccsidcurl.h. These should be self-explanatory to an OS/400-aware
@@ -70,46 +69,58 @@ options:
CURLOPT_COOKIEFILE
CURLOPT_COOKIEJAR
CURLOPT_COOKIELIST
+ CURLOPT_COPYPOSTFIELDS
+ CURLOPT_CRLFILE
CURLOPT_CUSTOMREQUEST
+ CURLOPT_DNS_SERVERS
CURLOPT_EGDSOCKET
CURLOPT_ENCODING
- CURLOPT_FTPPORT
CURLOPT_FTP_ACCOUNT
CURLOPT_FTP_ALTERNATIVE_TO_USER
+ CURLOPT_FTPPORT
CURLOPT_INTERFACE
+ CURLOPT_ISSUERCERT
CURLOPT_KEYPASSWD
CURLOPT_KRBLEVEL
+ CURLOPT_LOGIN_OPTIONS
+ CURLOPT_MAIL_FROM
+ CURLOPT_MAIL_AUTH
CURLOPT_NETRC_FILE
- CURLOPT_COPYPOSTFIELDS
+ CURLOPT_NOPROXY
+ CURLOPT_PASSWORD
+ CURLOPT_PINNEDPUBLICKEY
CURLOPT_PROXY
+ CURLOPT_PROXYPASSWORD
+ CURLOPT_PROXYUSERNAME
CURLOPT_PROXYUSERPWD
+ CURLOPT_PROXY_SERVICE_NAME
CURLOPT_RANDOM_FILE
CURLOPT_RANGE
CURLOPT_REFERER
- CURLOPT_SSH_PRIVATE_KEYFILE
- CURLOPT_SSH_PUBLIC_KEYFILE
+ CURLOPT_RTSP_SESSION_UID
+ CURLOPT_RTSP_STREAM_URI
+ CURLOPT_RTSP_TRANSPORT
+ CURLOPT_SERVICE_NAME
+ CURLOPT_SOCKS5_GSSAPI_SERVICE
+ CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 Note: SSH not available on OS400.
+ CURLOPT_SSH_KNOWNHOSTS Note: SSH not available on OS400.
+ CURLOPT_SSH_PRIVATE_KEYFILE Note: SSH not available on OS400.
+ CURLOPT_SSH_PUBLIC_KEYFILE Note: SSH not available on OS400.
CURLOPT_SSLCERT
CURLOPT_SSLCERTTYPE
+ CURLOPT_SSL_CIPHER_LIST
CURLOPT_SSLENGINE
CURLOPT_SSLKEY
CURLOPT_SSLKEYTYPE
- CURLOPT_SSL_CIPHER_LIST
+ CURLOPT_TLSAUTH_PASSWORD
+ CURLOPT_TLSAUTH_TYPE
+ CURLOPT_TLSAUTH_USERNAME
+ CURLOPT_UNIX_SOCKET_PATH
CURLOPT_URL
CURLOPT_USERAGENT
- CURLOPT_USERPWD
- CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
- CURLOPT_CRLFILE
- CURLOPT_ISSUERCERT
CURLOPT_USERNAME
- CURLOPT_PASSWORD
- CURLOPT_PROXYUSERNAME
- CURLOPT_PROXYPASSWORD
- CURLOPT_NOPROXY
- CURLOPT_RTSP_SESSION_UID
- CURLOPT_RTSP_STREAM_URI
- CURLOPT_RTSP_TRANSPORT
- CURLOPT_SOCKS5_GSSAPI_SERVICE
- CURLOPT_MAIL_FROM
+ CURLOPT_USERPWD
+ CURLOPT_XOAUTH2_BEARER
Else it is the same as for curl_easy_setopt().
Note that CURLOPT_ERRORBUFFER is not in the list above, since it gives the
address of an (empty) character buffer, not the address of a string.
@@ -144,6 +155,18 @@ use:
CURLINFO_EFFECTIVE_URL
CURLINFO_CONTENT_TYPE
CURLINFO_FTP_ENTRY_PATH
+ CURLINFO_REDIRECT_URL
+ CURLINFO_PRIMARY_IP
+ CURLINFO_RTSP_SESSION_ID
+ CURLINFO_LOCAL_IP
+ Likewise, the following options are followed by a struct curl_slist * * and a
+CCSID.
+ CURLINFO_SSL_ENGINES
+ CURLINFO_COOKIELIST
+Lists returned should be released with curl_slist_free_all() after use.
+ Option CURLINFO_CERTINFO is followed by a struct curl_certinfo * * and a
+CCSID. Returned structures sould be free'ed using curl_certinfo_free_all() after
+use.
Other options are processed like in curl_easy_getinfo().
Standard compilation environment does support neither autotools nor make;
@@ -156,14 +179,27 @@ OS/400.
Protocols currently implemented on OS/400:
-_ HTTP
-_ HTTPS
+_ DICT
+_ FILE
_ FTP
_ FTPS
-_ FTP with secure transmission.
+_ FTP with secure transmission
+_ GOPHER
+_ HTTP
+_ HTTPS
+_ IMAP
+_ IMAPS
+_ IMAP with secure transmission
_ LDAP
-_ DICT
+_ POP3
+_ POP3S
+_ POP3 with secure transmission
+_ RTSP
+_ SMTP
+_ SMTPS
+_ SMTP with secure transmission
_ TELNET
+_ TFTP
diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c
index ad67e1c8..a903fe34 100644
--- a/packages/OS400/ccsidcurl.c
+++ b/packages/OS400/ccsidcurl.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -33,6 +33,7 @@
#include "curl.h"
#include "mprintf.h"
+#include "slist.h"
#include "urldata.h"
#include "url.h"
#include "getinfo.h"
@@ -67,7 +68,7 @@ makeOS400IconvCode(char buf[ICONV_ID_SIZE], unsigned int ccsid)
ccsid &= 0xFFFF;
- if (ccsid == NOCONV_CCSID)
+ if(ccsid == NOCONV_CCSID)
ccsid = ASCII_CCSID;
memset(buf, 0, ICONV_ID_SIZE);
@@ -76,7 +77,8 @@ makeOS400IconvCode(char buf[ICONV_ID_SIZE], unsigned int ccsid)
static iconv_t
-iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, unsigned int cstr)
+iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin,
+ unsigned int cstr)
{
char fromcode[ICONV_ID_SIZE];
@@ -93,7 +95,7 @@ iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, unsigned int cstr)
makeOS400IconvCode(tocode, ccsidout);
memset(tocode + 13, 0, sizeof tocode - 13); /* Dest. code id format. */
- if (cstr)
+ if(cstr)
fromcode[18] = '1'; /* Set null-terminator flag. */
return iconv_open(tocode, fromcode);
@@ -117,23 +119,23 @@ convert(char * d, size_t dlen, int dccsid,
*** Return the converted destination byte count, or -1 if error.
**/
- if (sccsid == 65535)
+ if(sccsid == 65535)
sccsid = ASCII_CCSID;
- if (dccsid == 65535)
+ if(dccsid == 65535)
dccsid = ASCII_CCSID;
- if (sccsid == dccsid) {
+ if(sccsid == dccsid) {
lslen = slen >= 0? slen: strlen(s) + 1;
i = lslen < dlen? lslen: dlen;
- if (s != d && i > 0)
+ if(s != d && i > 0)
memcpy(d, s, i);
return i;
}
- if (slen < 0) {
+ if(slen < 0) {
lslen = 0;
cd = iconv_open_CCSID(dccsid, sccsid, 1);
}
@@ -142,12 +144,12 @@ convert(char * d, size_t dlen, int dccsid,
cd = iconv_open_CCSID(dccsid, sccsid, 0);
}
- if (ICONV_OPEN_ERROR(cd))
+ if(ICONV_OPEN_ERROR(cd))
return -1;
i = dlen;
- if ((int) iconv(cd, (char * *) &s, &lslen, &d, &dlen) < 0)
+ if((int) iconv(cd, (char * *) &s, &lslen, &d, &dlen) < 0)
i = -1;
else
i -= dlen;
@@ -165,7 +167,6 @@ 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. */
@@ -174,24 +175,24 @@ dynconvert(int dccsid, const char * s, int slen, int sccsid)
dlen *= MAX_CONV_EXPANSION; /* Allow some expansion. */
d = malloc(dlen);
- if (!d)
+ if(!d)
return (char *) NULL;
l = convert(d, dlen, dccsid, s, slen, sccsid);
- if (l < 0) {
+ if(l < 0) {
free(d);
return (char *) NULL;
}
- if (slen < 0) {
+ if(slen < 0) {
/* Need to null-terminate even when source length is given.
Since destination code size is unknown, use a conversion to generate
terminator. */
- l2 = convert(d + l, dlen - l, dccsid, &nullbyte, -1, ASCII_CCSID);
+ int l2 = convert(d + l, dlen - l, dccsid, &nullbyte, -1, ASCII_CCSID);
- if (l2 < 0) {
+ if(l2 < 0) {
free(d);
return (char *) NULL;
}
@@ -199,10 +200,10 @@ dynconvert(int dccsid, const char * s, int slen, int sccsid)
l += l2;
}
- if ((size_t) l < dlen) {
+ if((size_t) l < dlen) {
cp = realloc(d, l); /* Shorten to minimum needed. */
- if (cp)
+ if(cp)
d = cp;
}
@@ -210,6 +211,25 @@ dynconvert(int dccsid, const char * s, int slen, int sccsid)
}
+static struct curl_slist *
+slist_convert(int dccsid, struct curl_slist * from, int sccsid)
+
+{
+ struct curl_slist * to = (struct curl_slist *) NULL;
+
+ for(; from; from = from->next) {
+ char * cp = dynconvert(dccsid, from->data, -1, sccsid);
+
+ if(!cp) {
+ curl_slist_free_all(to);
+ return (struct curl_slist *) NULL;
+ }
+ to = Curl_slist_append_nodup(to, cp);
+ }
+ return to;
+}
+
+
char *
curl_version_ccsid(unsigned int ccsid)
@@ -220,16 +240,16 @@ curl_version_ccsid(unsigned int ccsid)
aversion = curl_version();
- if (!aversion)
+ if(!aversion)
return aversion;
i = strlen(aversion) + 1;
i *= MAX_CONV_EXPANSION;
- if (!(eversion = Curl_thread_buffer(LK_CURL_VERSION, i)))
+ if(!(eversion = Curl_thread_buffer(LK_CURL_VERSION, i)))
return (char *) NULL;
- if (convert(eversion, i, ccsid, aversion, -1, ASCII_CCSID) < 0)
+ if(convert(eversion, i, ccsid, aversion, -1, ASCII_CCSID) < 0)
return (char *) NULL;
return eversion;
@@ -244,20 +264,20 @@ curl_easy_escape_ccsid(CURL * handle, const char * string, int length,
char * s;
char * d;
- if (!string) {
+ if(!string) {
errno = EINVAL;
return (char *) NULL;
}
- s = dynconvert(ASCII_CCSID, s, length? length: -1, sccsid);
+ s = dynconvert(ASCII_CCSID, string, length? length: -1, sccsid);
- if (!s)
+ if(!s)
return (char *) NULL;
d = curl_easy_escape(handle, s, 0);
free(s);
- if (!d)
+ if(!d)
return (char *) NULL;
s = dynconvert(dccsid, d, -1, ASCII_CCSID);
@@ -275,26 +295,26 @@ curl_easy_unescape_ccsid(CURL * handle, const char * string, int length,
char * s;
char * d;
- if (!string) {
+ if(!string) {
errno = EINVAL;
return (char *) NULL;
}
- s = dynconvert(ASCII_CCSID, s, length? length: -1, sccsid);
+ s = dynconvert(ASCII_CCSID, string, length? length: -1, sccsid);
- if (!s)
+ if(!s)
return (char *) NULL;
d = curl_easy_unescape(handle, s, 0, outlength);
free(s);
- if (!d)
+ if(!d)
return (char *) NULL;
s = dynconvert(dccsid, d, -1, ASCII_CCSID);
free(d);
- if (s && outlength)
+ if(s && outlength)
*outlength = strlen(s);
return s;
@@ -310,12 +330,12 @@ curl_slist_append_ccsid(struct curl_slist * list,
s = (char *) NULL;
- if (!data)
+ if(!data)
return curl_slist_append(list, data);
s = dynconvert(ASCII_CCSID, data, -1, ccsid);
- if (!s)
+ if(!s)
return (struct curl_slist *) NULL;
list = curl_slist_append(list, s);
@@ -331,12 +351,12 @@ curl_getdate_ccsid(const char * p, const time_t * unused, unsigned int ccsid)
char * s;
time_t t;
- if (!p)
+ if(!p)
return curl_getdate(p, unused);
s = dynconvert(ASCII_CCSID, p, -1, ccsid);
- if (!s)
+ if(!s)
return (time_t) -1;
t = curl_getdate(s, unused);
@@ -350,17 +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) {
- l = convert(*bufp, *left, ccsid, *stringp, -1, ASCII_CCSID);
+ if(*stringp) {
+ int l = convert(*bufp, *left, ccsid, *stringp, -1, ASCII_CCSID);
- if (l <= 0)
+ if(l <= 0)
return -1;
*stringp = *bufp;
@@ -380,7 +398,6 @@ 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
@@ -388,17 +405,17 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid)
compiler seems to compare string values after substitution. */
#if CURLVERSION_NOW != CURLVERSION_FOURTH
-#error curl_version_info_data structure has changed: upgrade this procedure too.
+#error curl_version_info_data structure has changed: upgrade this procedure.
#endif
/* If caller has been compiled with a new version, error. */
- if (stamp > CURLVERSION_NOW)
+ if(stamp > CURLVERSION_NOW)
return (curl_version_info_data *) NULL;
p = curl_version_info(stamp);
- if (!p)
+ if(!p)
return p;
/* Measure thread space needed. */
@@ -406,84 +423,85 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid)
n = 0;
nproto = 0;
- if (p->protocols) {
- while (p->protocols[nproto])
+ if(p->protocols) {
+ while(p->protocols[nproto])
n += strlen(p->protocols[nproto++]);
n += nproto++;
}
- if (p->version)
+ if(p->version)
n += strlen(p->version) + 1;
- if (p->host)
+ if(p->host)
n += strlen(p->host) + 1;
- if (p->ssl_version)
+ if(p->ssl_version)
n += strlen(p->ssl_version) + 1;
- if (p->libz_version)
+ if(p->libz_version)
n += strlen(p->libz_version) + 1;
- if (p->ares)
+ if(p->ares)
n += strlen(p->ares) + 1;
- if (p->libidn)
+ if(p->libidn)
n += strlen(p->libidn) + 1;
- if (p->libssh_version)
+ if(p->libssh_version)
n += strlen(p->libssh_version) + 1;
/* Allocate thread space. */
n *= MAX_CONV_EXPANSION;
- if (nproto)
+ if(nproto)
n += nproto * sizeof(const char *);
cp = Curl_thread_buffer(LK_VERSION_INFO_DATA, n);
id = (curl_version_info_data *) Curl_thread_buffer(LK_VERSION_INFO,
sizeof *id);
- if (!id || !cp)
+ if(!id || !cp)
return (curl_version_info_data *) NULL;
/* Copy data and convert strings. */
memcpy((char *) id, (char *) p, sizeof *p);
- if (id->protocols) {
+ 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;
- for (i = 0; id->protocols[i]; i++)
- if (convert_version_info_string(((const char * *) id->protocols) + i,
+ for(i = 0; id->protocols[i]; i++)
+ if(convert_version_info_string(((const char * *) id->protocols) + i,
&cp, &n, ccsid))
return (curl_version_info_data *) NULL;
}
- if (convert_version_info_string(&id->version, &cp, &n, ccsid))
+ if(convert_version_info_string(&id->version, &cp, &n, ccsid))
return (curl_version_info_data *) NULL;
- if (convert_version_info_string(&id->host, &cp, &n, ccsid))
+ if(convert_version_info_string(&id->host, &cp, &n, ccsid))
return (curl_version_info_data *) NULL;
- if (convert_version_info_string(&id->ssl_version, &cp, &n, ccsid))
+ if(convert_version_info_string(&id->ssl_version, &cp, &n, ccsid))
return (curl_version_info_data *) NULL;
- if (convert_version_info_string(&id->libz_version, &cp, &n, ccsid))
+ if(convert_version_info_string(&id->libz_version, &cp, &n, ccsid))
return (curl_version_info_data *) NULL;
- if (convert_version_info_string(&id->ares, &cp, &n, ccsid))
+ if(convert_version_info_string(&id->ares, &cp, &n, ccsid))
return (curl_version_info_data *) NULL;
- if (convert_version_info_string(&id->libidn, &cp, &n, ccsid))
+ if(convert_version_info_string(&id->libidn, &cp, &n, ccsid))
return (curl_version_info_data *) NULL;
- if (convert_version_info_string(&id->libssh_version, &cp, &n, ccsid))
+ if(convert_version_info_string(&id->libssh_version, &cp, &n, ccsid))
return (curl_version_info_data *) NULL;
return id;
@@ -500,15 +518,15 @@ curl_easy_strerror_ccsid(CURLcode error, unsigned int ccsid)
s = curl_easy_strerror(error);
- if (!s)
+ if(!s)
return s;
i = MAX_CONV_EXPANSION * (strlen(s) + 1);
- if (!(buf = Curl_thread_buffer(LK_EASY_STRERROR, i)))
+ if(!(buf = Curl_thread_buffer(LK_EASY_STRERROR, i)))
return (const char *) NULL;
- if (convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
+ if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
return (const char *) NULL;
return (const char *) buf;
@@ -525,15 +543,15 @@ curl_share_strerror_ccsid(CURLSHcode error, unsigned int ccsid)
s = curl_share_strerror(error);
- if (!s)
+ if(!s)
return s;
i = MAX_CONV_EXPANSION * (strlen(s) + 1);
- if (!(buf = Curl_thread_buffer(LK_SHARE_STRERROR, i)))
+ if(!(buf = Curl_thread_buffer(LK_SHARE_STRERROR, i)))
return (const char *) NULL;
- if (convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
+ if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
return (const char *) NULL;
return (const char *) buf;
@@ -550,21 +568,39 @@ curl_multi_strerror_ccsid(CURLMcode error, unsigned int ccsid)
s = curl_multi_strerror(error);
- if (!s)
+ if(!s)
return s;
i = MAX_CONV_EXPANSION * (strlen(s) + 1);
- if (!(buf = Curl_thread_buffer(LK_MULTI_STRERROR, i)))
+ if(!(buf = Curl_thread_buffer(LK_MULTI_STRERROR, i)))
return (const char *) NULL;
- if (convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
+ if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
return (const char *) NULL;
return (const char *) buf;
}
+void
+curl_certinfo_free_all(struct curl_certinfo *info)
+
+{
+ /* 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);
+ }
+ free((char *) info);
+ }
+}
+
+
CURLcode
curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...)
@@ -574,9 +610,10 @@ 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;
/* WARNING: unlike curl_easy_get_info(), the strings returned by this
procedure have to be free'ed. */
@@ -586,25 +623,74 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...)
paramp = va_arg(arg, void *);
ret = Curl_getinfo(data, info, paramp);
- if (ret != CURLE_OK || ((int) info & CURLINFO_TYPEMASK) != CURLINFO_STRING) {
- va_end(arg);
- return ret;
- }
+ if(ret == CURLE_OK)
+ switch ((int) info & CURLINFO_TYPEMASK) {
- ccsid = va_arg(arg, unsigned int);
- va_end(arg);
- cpp = (char * *) paramp;
- s = *cpp;
+ case CURLINFO_STRING:
+ ccsid = va_arg(arg, unsigned int);
+ cpp = (char * *) paramp;
+
+ if(*cpp) {
+ *cpp = dynconvert(ccsid, *cpp, -1, ASCII_CCSID);
+
+ if(!*cpp)
+ ret = CURLE_OUT_OF_MEMORY;
+ }
+
+ break;
- if (!s)
- return ret;
+ case CURLINFO_SLIST:
+ ccsid = va_arg(arg, unsigned int);
+ switch (info) {
+ case CURLINFO_CERTINFO:
+ cipf = *(struct curl_certinfo * *) paramp;
+ if(cipf) {
+ if(!(cipt = (struct curl_certinfo *) malloc(sizeof *cipt)))
+ ret = CURLE_OUT_OF_MEMORY;
+ else {
+ cipt->certinfo = (struct curl_slist * *)
+ calloc(cipf->num_of_certs +
+ 1, sizeof(struct curl_slist *));
+ 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])
+ if(!(cipt->certinfo[i] = slist_convert(ccsid,
+ cipf->certinfo[i],
+ ASCII_CCSID))) {
+ ret = CURLE_OUT_OF_MEMORY;
+ break;
+ }
+ }
+ }
+
+ if(ret != CURLE_OK) {
+ curl_certinfo_free_all(cipt);
+ cipt = (struct curl_certinfo *) NULL;
+ }
+
+ *(struct curl_certinfo * *) paramp = cipt;
+ }
- d = dynconvert(ccsid, s, -1, ASCII_CCSID);
- *cpp = d;
+ break;
- if (!d)
- return CURLE_OUT_OF_MEMORY;
+ case CURLINFO_TLS_SESSION:
+ break;
+ default:
+ slp = (struct curl_slist * *) paramp;
+ if(*slp)
+ if(!(*slp = slist_convert(ccsid, *slp, ASCII_CCSID)))
+ ret = CURLE_OUT_OF_MEMORY;
+ break;
+ }
+ }
+
+ va_end(arg);
return ret;
}
@@ -615,15 +701,15 @@ Curl_is_formadd_string(CURLformoption option)
{
switch (option) {
- case CURLFORM_FILENAME:
- case CURLFORM_CONTENTTYPE:
- case CURLFORM_BUFFER:
- case CURLFORM_FILE:
- case CURLFORM_FILECONTENT:
- case CURLFORM_COPYCONTENTS:
- case CURLFORM_COPYNAME:
- return 1;
- }
+ case CURLFORM_FILENAME:
+ case CURLFORM_CONTENTTYPE:
+ case CURLFORM_BUFFER:
+ case CURLFORM_FILE:
+ case CURLFORM_FILECONTENT:
+ case CURLFORM_COPYCONTENTS:
+ case CURLFORM_COPYNAME:
+ return 1;
+ }
return 0;
}
@@ -633,10 +719,10 @@ static void
Curl_formadd_release_local(struct curl_forms * forms, int nargs, int skip)
{
- while (nargs--)
- if (nargs != skip)
- if (Curl_is_formadd_string(forms[nargs].option))
- if (forms[nargs].value)
+ while(nargs--)
+ if(nargs != skip)
+ if(Curl_is_formadd_string(forms[nargs].option))
+ if(forms[nargs].value)
free((char *) forms[nargs].value);
free((char *) forms);
@@ -652,36 +738,36 @@ Curl_formadd_convert(struct curl_forms * forms,
char * cp;
char * cp2;
- if (formx < 0 || !forms[formx].value)
+ if(formx < 0 || !forms[formx].value)
return 0;
- if (lengthx >= 0)
+ if(lengthx >= 0)
l = (int) forms[lengthx].value;
else
l = strlen(forms[formx].value) + 1;
cp = malloc(MAX_CONV_EXPANSION * l);
- if (!cp)
+ if(!cp)
return -1;
l = convert(cp, MAX_CONV_EXPANSION * l, ASCII_CCSID,
forms[formx].value, l, ccsid);
- if (l < 0) {
+ if(l < 0) {
free(cp);
return -1;
}
- cp2 = realloc(cp, l); /* Shorten buffer to the string size. */
+ cp2 = realloc(cp, l); /* Shorten buffer to the string size. */
- if (cp2)
+ if(cp2)
cp = cp2;
forms[formx].value = cp;
- if (lengthx >= 0)
- forms[lengthx].value = (char *) l; /* Update to length after conversion. */
+ if(lengthx >= 0)
+ forms[lengthx].value = (char *) l; /* Update length after conversion. */
return l;
}
@@ -729,7 +815,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
lformlen = ALLOC_GRANULE;
lforms = malloc(lformlen * sizeof *lforms);
- if (!lforms)
+ if(!lforms)
return CURL_FORMADD_MEMORY;
/* Process the arguments, copying them into local array, latching conversion
@@ -744,14 +830,14 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
forms = (struct curl_forms *) NULL;
va_start(arg, last_post);
- for (;;) {
+ for(;;) {
/* Make sure there is still room for an item in local array. */
- if (nargs >= lformlen) {
+ if(nargs >= lformlen) {
lformlen += ALLOC_GRANULE;
tforms = realloc(lforms, lformlen * sizeof *lforms);
- if (!tforms) {
+ if(!tforms) {
result = CURL_FORMADD_MEMORY;
break;
}
@@ -761,7 +847,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
/* Get next option. */
- if (forms) {
+ if(forms) {
/* Get option from array. */
option = forms->option;
@@ -773,7 +859,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
option = va_arg(arg, CURLformoption);
- if (option == CURLFORM_END)
+ if(option == CURLFORM_END)
break;
}
@@ -786,7 +872,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
continue;
case CURLFORM_ARRAY:
- if (!forms) {
+ if(!forms) {
forms = va_arg(arg, struct curl_forms *);
continue;
}
@@ -798,12 +884,12 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
option = CURLFORM_PTRNAME; /* Static for now. */
case CURLFORM_PTRNAME:
- if (namex >= 0)
+ if(namex >= 0)
result = CURL_FORMADD_OPTION_TWICE;
namex = nargs;
- if (!forms) {
+ if(!forms) {
value = va_arg(arg, char *);
nameccsid = (unsigned int) va_arg(arg, long);
}
@@ -815,12 +901,12 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
break;
case CURLFORM_COPYCONTENTS:
- if (contentx >= 0)
+ if(contentx >= 0)
result = CURL_FORMADD_OPTION_TWICE;
contentx = nargs;
- if (!forms) {
+ if(!forms) {
value = va_arg(arg, char *);
contentccsid = (unsigned int) va_arg(arg, long);
}
@@ -833,7 +919,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
case CURLFORM_PTRCONTENTS:
case CURLFORM_BUFFERPTR:
- if (!forms)
+ if(!forms)
value = va_arg(arg, char *); /* No conversion. */
break;
@@ -841,7 +927,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
case CURLFORM_CONTENTSLENGTH:
lengthx = nargs;
- if (!forms)
+ if(!forms)
value = (char *) va_arg(arg, long);
break;
@@ -849,25 +935,25 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
case CURLFORM_NAMELENGTH:
namelengthx = nargs;
- if (!forms)
+ if(!forms)
value = (char *) va_arg(arg, long);
break;
case CURLFORM_BUFFERLENGTH:
- if (!forms)
+ if(!forms)
value = (char *) va_arg(arg, long);
break;
case CURLFORM_CONTENTHEADER:
- if (!forms)
+ if(!forms)
value = (char *) va_arg(arg, struct curl_slist *);
break;
case CURLFORM_STREAM:
- if (!forms)
+ if(!forms)
value = (char *) va_arg(arg, void *);
break;
@@ -875,7 +961,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
case CURLFORM_CONTENTTYPE:
/* If a previous content has been encountered, convert it now. */
- if (Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0) {
+ if(Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0) {
result = CURL_FORMADD_MEMORY;
break;
}
@@ -887,12 +973,12 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
default:
/* Must be a convertible string. */
- if (!Curl_is_formadd_string(option)) {
+ if(!Curl_is_formadd_string(option)) {
result = CURL_FORMADD_UNKNOWN_OPTION;
break;
}
- if (!forms) {
+ if(!forms) {
value = va_arg(arg, char *);
ccsid = (unsigned int) va_arg(arg, long);
}
@@ -905,7 +991,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
lforms[nargs].value = value;
- if (Curl_formadd_convert(lforms, nargs, -1, ccsid) < 0) {
+ if(Curl_formadd_convert(lforms, nargs, -1, ccsid) < 0) {
result = CURL_FORMADD_MEMORY;
break;
}
@@ -913,7 +999,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
value = lforms[nargs].value;
}
- if (result != CURL_FORMADD_OK)
+ if(result != CURL_FORMADD_OK)
break;
lforms[nargs].value = value;
@@ -924,15 +1010,15 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
/* Convert the name and the last content, now that we know their lengths. */
- if (result == CURL_FORMADD_OK && namex >= 0) {
- if (Curl_formadd_convert(lforms, namex, namelengthx, nameccsid) < 0)
+ if(result == CURL_FORMADD_OK && namex >= 0) {
+ if(Curl_formadd_convert(lforms, namex, namelengthx, nameccsid) < 0)
result = CURL_FORMADD_MEMORY;
else
lforms[namex].option = CURLFORM_COPYNAME; /* Force copy. */
}
- if (result == CURL_FORMADD_OK) {
- if (Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0)
+ if(result == CURL_FORMADD_OK) {
+ if(Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0)
result = CURL_FORMADD_MEMORY;
else
contentx = -1;
@@ -940,7 +1026,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
/* Do the formadd with our converted parameters. */
- if (result == CURL_FORMADD_OK) {
+ if(result == CURL_FORMADD_OK) {
lforms[nargs].option = CURLFORM_END;
result = curl_formadd(httppost, last_post,
CURLFORM_ARRAY, lforms, CURLFORM_END);
@@ -971,17 +1057,17 @@ Curl_formget_callback_ccsid(void * arg, const char * buf, size_t len)
p = (cfcdata *) arg;
- if ((long) len <= 0)
+ if((long) len <= 0)
return (*p->append)(p->arg, buf, len);
b = malloc(MAX_CONV_EXPANSION * len);
- if (!b)
+ if(!b)
return (size_t) -1;
l = convert(b, MAX_CONV_EXPANSION * len, p->ccsid, buf, len, ASCII_CCSID);
- if (l < 0) {
+ if(l < 0) {
free(b);
return (size_t) -1;
}
@@ -1016,7 +1102,6 @@ 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;
@@ -1026,10 +1111,11 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
the same message; but since threadsafeness is not handled here,
this may occur (and we don't care!). */
- if (testwarn) {
+ if(testwarn) {
testwarn = 0;
- if ((int) STRING_LAST != (int) STRING_MAIL_FROM + 1)
+ if((int) STRING_LASTZEROTERMINATED != (int) STRING_UNIX_SOCKET_PATH + 1 ||
+ (int) STRING_LAST != (int) STRING_COPYPOSTFIELDS + 1)
curl_mfprintf(stderr,
"*** WARNING: curl_easy_setopt_ccsid() should be reworked ***\n");
}
@@ -1045,64 +1131,71 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
case CURLOPT_COOKIEFILE:
case CURLOPT_COOKIEJAR:
case CURLOPT_COOKIELIST:
+ case CURLOPT_CRLFILE:
case CURLOPT_CUSTOMREQUEST:
+ case CURLOPT_DNS_SERVERS:
case CURLOPT_EGDSOCKET:
case CURLOPT_ENCODING:
- case CURLOPT_FTPPORT:
case CURLOPT_FTP_ACCOUNT:
case CURLOPT_FTP_ALTERNATIVE_TO_USER:
+ case CURLOPT_FTPPORT:
case CURLOPT_INTERFACE:
+ case CURLOPT_ISSUERCERT:
case CURLOPT_KEYPASSWD:
case CURLOPT_KRBLEVEL:
+ case CURLOPT_LOGIN_OPTIONS:
+ case CURLOPT_MAIL_FROM:
+ case CURLOPT_MAIL_AUTH:
case CURLOPT_NETRC_FILE:
+ case CURLOPT_NOPROXY:
+ case CURLOPT_PASSWORD:
+ case CURLOPT_PINNEDPUBLICKEY:
case CURLOPT_PROXY:
+ case CURLOPT_PROXYPASSWORD:
+ case CURLOPT_PROXYUSERNAME:
case CURLOPT_PROXYUSERPWD:
+ case CURLOPT_PROXY_SERVICE_NAME:
case CURLOPT_RANDOM_FILE:
case CURLOPT_RANGE:
case CURLOPT_REFERER:
+ case CURLOPT_RTSP_SESSION_ID:
+ case CURLOPT_RTSP_STREAM_URI:
+ case CURLOPT_RTSP_TRANSPORT:
+ case CURLOPT_SERVICE_NAME:
+ case CURLOPT_SOCKS5_GSSAPI_SERVICE:
+ case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
+ case CURLOPT_SSH_KNOWNHOSTS:
case CURLOPT_SSH_PRIVATE_KEYFILE:
case CURLOPT_SSH_PUBLIC_KEYFILE:
case CURLOPT_SSLCERT:
case CURLOPT_SSLCERTTYPE:
+ case CURLOPT_SSL_CIPHER_LIST:
case CURLOPT_SSLENGINE:
case CURLOPT_SSLKEY:
case CURLOPT_SSLKEYTYPE:
- case CURLOPT_SSL_CIPHER_LIST:
+ 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_USERPWD:
- case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
- case CURLOPT_CRLFILE:
- case CURLOPT_ISSUERCERT:
case CURLOPT_USERNAME:
- case CURLOPT_PASSWORD:
- case CURLOPT_PROXYUSERNAME:
- case CURLOPT_PROXYPASSWORD:
- case CURLOPT_NOPROXY:
- case CURLOPT_RTSP_SESSION_ID:
- case CURLOPT_RTSP_STREAM_URI:
- case CURLOPT_RTSP_TRANSPORT:
- /* SSH2 not (yet) implemented on OS400. */
- /* case CURLOPT_SSH_KNOWNHOSTS: */
- case CURLOPT_SOCKS5_GSSAPI_SERVICE:
- case CURLOPT_MAIL_FROM:
+ case CURLOPT_USERPWD:
+ case CURLOPT_XOAUTH2_BEARER:
s = va_arg(arg, char *);
ccsid = va_arg(arg, unsigned int);
- if (s) {
+ if(s) {
s = dynconvert(ASCII_CCSID, s, -1, ccsid);
- if (!s) {
+ if(!s) {
result = CURLE_OUT_OF_MEMORY;
break;
}
}
result = curl_easy_setopt(curl, tag, s);
-
- if (s)
- free(s);
-
+ free(s);
break;
case CURLOPT_COPYPOSTFIELDS:
@@ -1114,24 +1207,25 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
pfsize = data->set.postfieldsize;
- if (!s || !pfsize || ccsid == NOCONV_CCSID || ccsid == ASCII_CCSID) {
+ if(!s || !pfsize || ccsid == NOCONV_CCSID || ccsid == ASCII_CCSID) {
result = curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, s);
break;
}
- if (pfsize == -1) {
+ if(pfsize == -1) {
/* Data is null-terminated. */
s = dynconvert(ASCII_CCSID, s, -1, ccsid);
- if (!s) {
+ if(!s) {
result = CURLE_OUT_OF_MEMORY;
break;
}
}
else {
/* Data length specified. */
+ size_t len;
- if (pfsize < 0 || pfsize > SIZE_MAX) {
+ if(pfsize < 0 || pfsize > SIZE_MAX) {
result = CURLE_OUT_OF_MEMORY;
break;
}
@@ -1139,19 +1233,19 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
len = pfsize;
pfsize = len * MAX_CONV_EXPANSION;
- if (pfsize > SIZE_MAX)
+ if(pfsize > SIZE_MAX)
pfsize = SIZE_MAX;
cp = malloc(pfsize);
- if (!cp) {
+ if(!cp) {
result = CURLE_OUT_OF_MEMORY;
break;
}
pfsize = convert(cp, pfsize, ASCII_CCSID, s, len, ccsid);
- if (pfsize < 0) {
+ if(pfsize < 0) {
free(cp);
result = CURLE_OUT_OF_MEMORY;
break;
diff --git a/packages/OS400/ccsidcurl.h b/packages/OS400/ccsidcurl.h
index 96340c92..3d1fe794 100644
--- a/packages/OS400/ccsidcurl.h
+++ b/packages/OS400/ccsidcurl.h
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,13 +38,13 @@ CURL_EXTERN char * curl_easy_unescape_ccsid(CURL * handle, const char * string,
int length, int * outlength,
unsigned int sccsid,
unsigned int dccsid);
-CURL_EXTERN struct curl_slist * curl_slist_append_ccsid(struct curl_slist * lst,
+CURL_EXTERN struct curl_slist * curl_slist_append_ccsid(struct curl_slist * l,
const char * data,
unsigned int ccsid);
CURL_EXTERN time_t curl_getdate_ccsid(const char * p, const time_t * unused,
unsigned int ccsid);
CURL_EXTERN curl_version_info_data * curl_version_info_ccsid(CURLversion stamp,
- unsigned int csid);
+ unsigned int cid);
CURL_EXTERN const char * curl_easy_strerror_ccsid(CURLcode error,
unsigned int ccsid);
CURL_EXTERN const char * curl_share_strerror_ccsid(CURLSHcode error,
@@ -60,5 +60,6 @@ CURL_EXTERN int curl_formget_ccsid(struct curl_httppost * form, void * arg,
curl_formget_callback append,
unsigned int ccsid);
CURL_EXTERN CURLcode curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...);
+CURL_EXTERN void curl_certinfo_free_all(struct curl_certinfo *info);
#endif
diff --git a/packages/OS400/curl.inc.in b/packages/OS400/curl.inc.in
index b5e46bb1..2bbf6b0f 100644
--- a/packages/OS400/curl.inc.in
+++ b/packages/OS400/curl.inc.in
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -80,6 +80,8 @@
d c X'00000000'
d CURL_GLOBAL_DEFAULT...
d c X'00000003'
+ d CURL_GLOBAL_ACK_EINTR...
+ d c X'00000004'
*
d CURL_VERSION_IPV6...
d c X'00000001'
@@ -92,7 +94,7 @@
d CURL_VERSION_NTLM...
d c X'00000010'
d CURL_VERSION_GSSNEGOTIATE...
- d c X'00000020'
+ d c X'00000020' Deprecated
d CURL_VERSION_DEBUG...
d c X'00000040'
d CURL_VERSION_ASYNCHDNS...
@@ -109,6 +111,18 @@
d c X'00001000'
d CURL_VERSION_CURLDEBUG...
d c X'00002000'
+ d CURL_VERSION_TLSAUTH_SRP...
+ d c X'00004000'
+ d CURL_VERSION_NTLM_WB...
+ 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'
@@ -144,11 +158,15 @@
d CURLAUTH_BASIC c X'00000001'
d CURLAUTH_DIGEST...
d c X'00000002'
- d CURLAUTH_GSSNEGOTIATE...
+ d CURLAUTH_NEGOTIATE...
d c X'00000004'
d CURLAUTH_NTLM c X'00000008'
d CURLAUTH_DIGEST_IE...
d c X'00000010'
+ d CURLAUTH_NTLM_WB...
+ d c X'00000020'
+ d CURLAUTH_ONLY...
+ d c X'80000000'
d CURLAUTH_ANY c X'7FFFFFEF'
d CURLAUTH_ANYSAFE...
d c X'7FFFFFEE'
@@ -165,9 +183,18 @@
d c X'00000004'
d CURLSSH_AUTH_KEYBOARD...
d c X'00000008'
+ d CURLSSH_AUTH_AGENT...
+ d c X'00000010'
d CURLSSH_AUTH_DEFAULT...
d c X'7FFFFFFF' CURLSSH_AUTH_ANY
*
+ d CURLGSSAPI_DELEGATION_NONE...
+ d c 0
+ d CURLGSSAPI_DELEGATION_POLICY_FLAG...
+ d c X'00000001'
+ d CURLGSSAPI_DELEGATION_FLAG...
+ d c X'00000002'
+ *
d CURL_ERROR_SIZE...
d c 256
*
@@ -193,6 +220,8 @@
d c 1
d CURL_HTTP_VERSION_1_1...
d c 2
+ d CURL_HTTP_VERSION_2_0...
+ d c 3
*
d CURL_NETRC_IGNORED...
d c 0
@@ -209,6 +238,17 @@
d c 2
d CURL_SSLVERSION_SSLv3...
d c 3
+ d CURL_SSLVERSION_TLSv1_0...
+ d c 4
+ d CURL_SSLVERSION_TLSv1_1...
+ d c 5
+ d CURL_SSLVERSION_TLSv1_2...
+ d c 6
+ *
+ d CURL_TLSAUTH_NONE...
+ d c 0
+ d CURL_TLSAUTH_SRP...
+ d c 1
*
d CURL_REDIR_GET_ALL...
d c 0
@@ -216,8 +256,10 @@
d c 1
d CURL_REDIR_POST_302...
d c 2
+ d CURL_REDIR_POST_303...
+ d c 4
d CURL_REDIR_POST_ALL...
- d c 3
+ d c 7
*
d CURL_POLL_NONE c 0
d CURL_POLL_IN c 1
@@ -279,6 +321,13 @@
d CURL_FNMATCHFUNC_FAIL...
d c 2
*
+ d CURL_WAIT_POLLIN...
+ d c X'0001'
+ d CURL_WAIT_POLLPRI...
+ d c X'0002'
+ d CURL_WAIT_POLLOUT...
+ d c X'0004'
+ *
**************************************************************************
* Types
**************************************************************************
@@ -295,7 +344,7 @@
d c 2
d CURLE_URL_MALFORMAT...
d c 3
- d CURLE_OBSOLETE4...
+ d CURLE_NOT_BUILT_IN...
d c 4
d CURLE_COULDNT_RESOLVE_PROXY...
d c 5
@@ -307,11 +356,11 @@
d c 8
d CURLE_REMOTE_ACCESS_DENIED...
d c 9
- d CURLE_OBSOLETE10...
+ d CURLE_FTP_ACCEPT_FAILED...
d c 10
d CURLE_FTP_WEIRD_PASS_REPLY...
d c 11
- d CURLE_OBSOLETE12...
+ d CURLE_FTP_ACCEPT_TIMEOUT...
d c 12
d CURLE_FTP_WEIRD_PASV_REPLY...
d c 13
@@ -319,8 +368,7 @@
d c 14
d CURLE_FTP_CANT_GET_HOST...
d c 15
- d CURLE_OBSOLETE16...
- d c 16
+ d CURLE_HTTP2 c 16
d CURLE_FTP_COULDNT_SET_TYPE...
d c 17
d CURLE_PARTIAL_FILE...
@@ -383,7 +431,7 @@
d c 46
d CURLE_TOO_MANY_REDIRECTS...
d c 47
- d CURLE_UNKNOWN_TELNET_OPTION...
+ d CURLE_UNKNOWN_OPTION...
d c 48
d CURLE_TELNET_OPTION_SYNTAX...
d c 49
@@ -465,6 +513,73 @@
d c 87
d CURLE_CHUNK_FAILED...
d c 88
+ d CURLE_NO_CONNECTION_AVAILABLE...
+ d c 89
+ d CURLE_SSL_PINNEDPUBKEYNOTMATCH...
+ d c 90
+ d CURLE_SSL_INVALIDCERTSTATUS...
+ d c 91
+ *
+ /if not defined(CURL_NO_OLDIES)
+ d CURLE_URL_MALFORMAT_USER...
+ d c 4
+ d CURLE_FTP_ACCESS_DENIED...
+ d c 9
+ d CURLE_FTP_USER_PASSWORD_INCORRECT...
+ d c 10
+ d CURLE_FTP_WEIRD_USER_REPLY...
+ d c 12
+ d CURLE_FTP_CANT_RECONNECT...
+ d c 16
+ d CURLE_FTP_COULDNT_SET_BINARY...
+ d c 17
+ d CURLE_FTP_PARTIAL_FILE...
+ d c 18
+ d CURLE_FTP_WRITE_ERROR...
+ d c 20
+ d CURLE_FTP_QUOTE_ERROR...
+ d c 21
+ d CURLE_HTTP_NOT_FOUND...
+ d c 22
+ d CURLE_MALFORMAT_USER...
+ d c 24
+ d CURLE_FTP_COULDNT_STOR_FILE...
+ d c 25
+ d CURLE_OPERATION_TIMEOUTED...
+ d c 28
+ d CURLE_FTP_COULDNT_SET_ASCII...
+ d c 29
+ d CURLE_FTP_COULDNT_GET_SIZE...
+ d c 32
+ d CURLE_HTTP_RANGE_ERROR...
+ d c 33
+ d CURLE_FTP_BAD_DOWNLOAD_RESUME...
+ d c 36
+ d CURLE_LIBRARY_NOT_FOUND...
+ d c 40
+ d CURLE_BAD_CALLING_ORDER...
+ d c 44
+ d CURLE_HTTP_PORT_FAILED...
+ d c 45
+ d CURLE_BAD_PASSWORD_ENTERED...
+ d c 46
+ d CURLE_UNKNOWN_TELNET_OPTION...
+ d c 48
+ d CURLE_OBSOLETE...
+ d c 50
+ d CURLE_SSL_PEER_CERTIFICATE...
+ d c 51
+ d CURLE_SHARE_IN_USE...
+ d c 57
+ d CURLE_FTP_SSL_FAILED...
+ d c 64
+ d CURLE_TFTP_DISKFULL...
+ d c 70
+ d CURLE_TFTP_EXISTS...
+ d c 73
+ d CURLE_ALREADY_COMPLETE...
+ d c 99999
+ /endif
*
d curlioerr s 10i 0 based(######ptr######) Enum
d CURLIOE_OK c 0
@@ -560,6 +675,22 @@
d CURLUSESSL_ALL...
d c 3
*
+ d CURLSSLOPT_ALLOW_BEAST...
+ d c 1
+ *
+ /if not defined(CURL_NO_OLDIES)
+ d curl_ftpssl s like(curl_usessl)
+ d based(######ptr######)
+ d CURLFTPSSL_NONE...
+ d c 0
+ d CURLFTPSSL_TRY...
+ d c 1
+ d CURLFTPSSL_CONTROL...
+ d c 2
+ d CURLFTPSSL_ALL...
+ d c 3
+ /endif
+ *
d curl_ftpccc s 10i 0 based(######ptr######) Enum
d CURLFTPSSL_CCC_NONE...
d c 0
@@ -595,6 +726,11 @@
d CURLFTPMETHOD_SINGLECWD...
d c 3
*
+ d CURLHEADER_UNIFIED...
+ d c X'00000000'
+ d CURLHEADER_SEPARATE...
+ d c X'00000001'
+ *
d CURLPROTO_HTTP...
d c X'00000001'
d CURLPROTO_HTTPS...
@@ -647,9 +783,12 @@
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_FILE c 10001
d CURLOPT_WRITEDATA...
d c 10001
d CURLOPT_URL c 10002
@@ -660,8 +799,6 @@
d CURLOPT_PROXYUSERPWD...
d c 10006
d CURLOPT_RANGE c 10007
- d CURLOPT_INFILE...
- d c 10009
d CURLOPT_READDATA...
d c 10009
d CURLOPT_ERRORBUFFER...
@@ -698,14 +835,10 @@
d c 10024
d CURLOPT_SSLCERT...
d c 10025
- d CURLOPT_SSLCERTPASSWD...
- d c 10026
d CURLOPT_KEYPASSWD...
d c 10026
d CURLOPT_CRLF c 00027
d CURLOPT_QUOTE c 10028
- d CURLOPT_WRITEHEADER...
- d c 10029
d CURLOPT_HEADERDATA...
d c 10029
d CURLOPT_COOKIEFILE...
@@ -722,8 +855,6 @@
d c 10037
d CURLOPT_POSTQUOTE...
d c 10039
- d CURLOPT_WRITEINFO...
- d c 10040
d CURLOPT_VERBOSE...
d c 00041
d CURLOPT_HEADER...
@@ -751,6 +882,8 @@
d c 20056
d CURLOPT_PROGRESSDATA...
d c 10057
+ d CURLOPT_XFERINFODATA...
+ d c 10057 PROGRESSDATA alias
d CURLOPT_AUTOREFERER...
d c 00058
d CURLOPT_PROXYPORT...
@@ -775,8 +908,6 @@
d c 10070
d CURLOPT_MAXCONNECTS...
d c 00071
- d CURLOPT_CLOSEPOLICY...
- d c 00072
d CURLOPT_FRESH_CONNECT...
d c 00074
d CURLOPT_FORBID_REUSE...
@@ -832,7 +963,7 @@
d CURLOPT_SHARE c 10100
d CURLOPT_PROXYTYPE...
d c 00101
- d CURLOPT_ENCODING...
+ d CURLOPT_ACCEPT_ENCODING...
d c 10102
d CURLOPT_PRIVATE...
d c 10103
@@ -1016,11 +1147,104 @@
d c 10201
d CURLOPT_FNMATCH_DATA...
d c 10202
- *
+ d CURLOPT_RESOLVE...
+ d c 10203
+ d CURLOPT_TLSAUTH_USERNAME...
+ d c 10204
+ d CURLOPT_TLSAUTH_PASSWORD...
+ d c 10205
+ d CURLOPT_TLSAUTH_TYPE...
+ d c 10206
+ d CURLOPT_TRANSFER_ENCODING...
+ d c 00207
+ d CURLOPT_CLOSESOCKETFUNCTION...
+ d c 20208
+ d CURLOPT_CLOSESOCKETDATA...
+ d c 10209
+ d CURLOPT_GSSAPI_DELEGATION...
+ d c 00210
+ d CURLOPT_DNS_SERVERS...
+ d c 10211
+ d CURLOPT_ACCEPTTIMEOUT_MS...
+ d c 00212
+ d CURLOPT_TCP_KEEPALIVE...
+ d c 00213
+ d CURLOPT_TCP_KEEPIDLE...
+ d c 00214
+ d CURLOPT_TCP_KEEPINTVL...
+ d c 00215
+ d CURLOPT_SSL_OPTIONS...
+ d c 00216
+ d CURLOPT_MAIL_AUTH...
+ d c 10217
+ d CURLOPT_SASL_IR...
+ d c 00218
+ d CURLOPT_XFERINFOFUNCTION...
+ d c 20219
+ d CURLOPT_XOAUTH2_BEARER...
+ d c 10220
+ d CURLOPT_DNS_INTERFACE...
+ d c 10221
+ d CURLOPT_DNS_LOCAL_IP4...
+ d c 10222
+ d CURLOPT_DNS_LOCAL_IP6...
+ d c 10223
+ d CURLOPT_LOGIN_OPTIONS...
+ d c 10224
+ d CURLOPT_SSL_ENABLE_NPN...
+ d c 00225
+ d CURLOPT_SSL_ENABLE_ALPN...
+ d c 00226
+ d CURLOPT_EXPECT_100_TIMEOUT_MS...
+ d c 00227
+ d CURLOPT_PROXYHEADER...
+ d c 10228
+ d CURLOPT_HEADEROPT...
+ d c 00229
+ d CURLOPT_PINNEDPUBLICKEY...
+ d c 10230
+ d CURLOPT_UNIX_SOCKET_PATH...
+ d c 10231
+ d CURLOPT_SSL_VERIFYSTATUS...
+ d c 00232
+ d CURLOPT_SSL_FALSESTART...
+ d c 00233
+ d CURLOPT_PATH_AS_IS...
+ d c 00234
+ d CURLOPT_PROXY_SERVICE_NAME...
+ d c 10235
+ d CURLOPT_SERVICE_NAME...
+ d c 10236
+ *
+ /if not defined(CURL_NO_OLDIES)
+ d CURLOPT_FILE c 10001
+ d CURLOPT_INFILE...
+ d c 10009
+ d CURLOPT_SSLKEYPASSWD...
+ d c 10026
+ d CURLOPT_SSLCERTPASSWD...
+ d c 10026
+ d CURLOPT_WRITEHEADER...
+ d c 10029
+ d CURLOPT_WRITEINFO...
+ d c 10040
+ d CURLOPT_FTPLISTONLY...
+ d c 00048
+ d CURLOPT_FTPAPPEND...
+ d c 00050
+ d CURLOPT_CLOSEPOLICY...
+ d c 00072
+ d CURLOPT_KRB4LEVEL...
+ d c 10063
+ d CURLOPT_ENCODING...
+ d c 10102
d CURLOPT_SERVER_RESPONSE_TIMEOUT...
d c 00112
+ d CURLOPT_FTP_SSL...
+ d c 00119
d CURLOPT_POST301...
- d c 00161 Obsolescent
+ d c 00161
+ /endif
*
d CURLFORMcode s 10i 0 based(######ptr######) Enum
d CURL_FORMADD_OK...
@@ -1167,10 +1391,35 @@
d c X'00100029'
d CURLINFO_LOCAL_PORT... CURLINFO_LONG + 42
d c X'0020002A'
+ d CURLINFO_TLS_SESSION... CURLINFO_SLIST + 43
+ d c X'0040002B'
*
d CURLINFO_HTTP_CODE... Old ...RESPONSE_CODE
d c X'00200002'
*
+ d curl_sslbackend...
+ d s 10i 0 based(######ptr######) Enum
+ d CURLSSLBACKEND_NONE...
+ d c 0
+ d CURLSSLBACKEND_OPENSSL...
+ d c 1
+ d CURLSSLBACKEND_GNUTLS...
+ d c 2
+ d CURLSSLBACKEND_NSS...
+ d c 3
+ d CURLSSLBACKEND_OBSOLETE4...
+ d c 4
+ d CURLSSLBACKEND_GSKIT...
+ d c 5
+ d CURLSSLBACKEND_POLARSSL...
+ d c 6
+ d CURLSSLBACKEND_CYASSL...
+ d c 7
+ d CURLSSLBACKEND_SCHANNEL...
+ d c 8
+ d CURLSSLBACKEND_DARWINSSL...
+ d c 9
+ *
d curl_closepolicy...
d s 10i 0 based(######ptr######) Enum
d CURLCLOSEPOLICY_OLDEST...
@@ -1230,6 +1479,8 @@
d c 3
d CURLSHE_NOMEM...
d c 4
+ d CURLSHE_NOT_BUILT_IN...
+ d c 5
*
d CURLSHoption...
d s 10i 0 based(######ptr######) Enum
@@ -1259,6 +1510,15 @@
d curlsocktype s 10i 0 based(######ptr######) Enum
d CURLSOCKTYPE_IPCXN...
d c 0
+ d CURLSOCKTYPE_ACCEPT...
+ d c 1
+ *
+ d CURL_SOCKOPT_OK...
+ d c 0
+ d CURL_SOCKOPT_ERROR...
+ d c 1
+ d CURL_SOCKOPT_ALREADY_CONNECTED...
+ d c 2
*
d CURLMcode s 10i 0 based(######ptr######) Enum
d CURLM_CALL_MULTI_PERFORM...
@@ -1278,7 +1538,9 @@
d c 5
d CURLM_UNKNOWN_OPTION...
d c 6
- d CURLM_LAST c 7
+ d CURLM_ADDED_ALREADY...
+ d c 7
+ d CURLM_LAST c 8
*
d CURLMSG s 10i 0 based(######ptr######) Enum
d CURLMSG_NONE c 0
@@ -1297,6 +1559,20 @@
d c 10005
d CURLMOPT_MAXCONNECTS...
d c 00006
+ d CURLMOPT_MAX_HOST_CONNECTIONS...
+ d c 00007
+ d CURLMOPT_MAX_PIPELINE_LENGTH...
+ d c 00008
+ d CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE...
+ d c 30009
+ d CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE...
+ d c 30010
+ d CURLMOPT_PIPELINING_SITE_BL...
+ d c 10011
+ d CURLMOPT_PIPELINING_SERVER_BL...
+ d c 10012
+ d CURLMOPT_MAX_TOTAL_CONNECTIONS...
+ d c 00013
*
* Public API enums for RTSP requests.
*
@@ -1338,6 +1614,13 @@
d whatever * overlay(data) void *
d result overlay(data) like(CURLcode)
*
+ d curl_waitfd...
+ d ds based(######ptr######)
+ d qualified
+ d fd like(curl_socket_t)
+ d events 5i 0
+ d revents 5i 0
+ *
d curl_http_post...
d ds based(######ptr######)
d qualified
@@ -1366,12 +1649,7 @@
d addrlen 10u 0
d addr 16 struct sockaddr
*
- d curl_khkey ds based(######ptr######)
- d qualified
- d key * const char *
- d len 10u 0
- d keytype 10i 0
- *
+ d curl_khtype s 10i 0 based(######ptr######) enum
d CURLKHTYPE_UNKNOWN...
d c 0
d CURLKHTYPE_RSA1...
@@ -1381,6 +1659,12 @@
d CURLKHTYPE_DSS...
d c 3
*
+ d curl_khkey ds based(######ptr######)
+ d qualified
+ d key * const char *
+ d len 10u 0
+ d keytype like(curl_khtype)
+ *
d curl_forms ds based(######ptr######)
d qualified
d option like(CURLformoption)
@@ -1428,6 +1712,12 @@
d group * char *
d target * char *
*
+ d curl_tlssessioninfo...
+ d ds based(######ptr######)
+ d qualified
+ d backend like(curl_sslbackend)
+ d internals * void *
+ *
d curl_fileinfo ds based(######ptr######)
d qualified
d filename * char *
@@ -1471,6 +1761,9 @@
d curl_progress_callback...
d s * based(######ptr######) procptr
*
+ d curl_xferinfo_callback...
+ d s * based(######ptr######) procptr
+ *
d curl_read_callback...
d s * based(######ptr######) procptr
*
@@ -1513,6 +1806,9 @@
d curl_fnmatch_callback...
d s * based(######ptr######) procptr
*
+ d curl_closesocket_callback...
+ d s * based(######ptr######) procptr
+ *
**************************************************************************
* Prototypes
**************************************************************************
@@ -1780,6 +2076,15 @@
d exc_fd_set 65535 options(*varsize) fd_set
d max_fd 10i 0
*
+ d curl_multi_wait...
+ d pr extproc('curl_multi_wait')
+ d like(CURLMcode)
+ d multi_handle * value CURLM *
+ d extra_fds * value curl_waitfd *
+ d extra_nfds 10u 0 value
+ d timeout_ms 10i 0 value
+ d ret 10i 0 options(*omit)
+ *
d curl_multi_perform...
d pr extproc('curl_multi_perform')
d like(CURLMcode)
@@ -1925,14 +2230,19 @@
d code value like(CURLMcode)
d ccsid 10u 0 value
*
+ * May be used for strings and structures.
d curl_easy_getinfo_ccsid...
d pr extproc('curl_easy_getinfo_ccsid')
d like(CURLcode)
d curl * value CURL *
d info value like(CURLINFO)
- d stringarg * options(*nopass) char *
+ d ptrarg * options(*nopass) char *
d ccsid 10u 0 value options(*nopass)
*
+ d curl_certinfo_free_all...
+ d pr extproc('curl_certinfo_free_all')
+ d info * value
+ *
d curl_formadd_ccsid...
d pr extproc('curl_formadd_ccsid')
d like(CURLFORMcode)
diff --git a/packages/OS400/initscript.sh b/packages/OS400/initscript.sh
index 9bf93a8e..0105f5a9 100644
--- a/packages/OS400/initscript.sh
+++ b/packages/OS400/initscript.sh
@@ -1,6 +1,16 @@
#!/bin/sh
+setenv()
+
+{
+ # Define and export.
+
+ eval ${1}="${2}"
+ export ${1}
+}
+
+
case "${SCRIPTDIR}" in
/*) ;;
*) SCRIPTDIR="`pwd`/${SCRIPTDIR}"
@@ -32,18 +42,23 @@ export SONAME
#
################################################################################
-TARGETLIB='CURL' # Target OS/400 program library
-STATBNDDIR='CURL_A' # Static binding directory.
-DYNBNDDIR='CURL' # Dynamic binding directory.
-SRVPGM="CURL.${SONAME}" # Service program.
-TGTCCSID='500' # Target CCSID of objects
-DEBUG='*ALL' # Debug level
-OPTIMIZE='10' # Optimisation level
-OUTPUT='*NONE' # Compilation output option.
-TGTRLS='V5R3M0' # Target OS release
+setenv TARGETLIB 'CURL' # Target OS/400 program library.
+setenv STATBNDDIR 'CURL_A' # Static binding directory.
+setenv DYNBNDDIR 'CURL' # Dynamic binding directory.
+setenv SRVPGM "CURL.${SONAME}" # Service program.
+setenv TGTCCSID '500' # Target CCSID of objects.
+setenv DEBUG '*ALL' # Debug level.
+setenv OPTIMIZE '10' # Optimisation level
+setenv OUTPUT '*NONE' # Compilation output option.
+setenv TGTRLS 'V5R3M0' # Target OS release.
+setenv IFSDIR '/curl' # Installation IFS directory.
-export TARGETLIB STATBNDDIR DYNBNDDIR SRVPGM TGTCCSID DEBUG OPTIMIZE OUTPUT
-export TGTRLS
+# Define ZLIB availability and locations.
+
+setenv WITH_ZLIB 0 # Define to 1 to enable.
+setenv ZLIB_INCLUDE '/zlib/include' # ZLIB include IFS directory.
+setenv ZLIB_LIB 'ZLIB' # ZLIB library.
+setenv ZLIB_BNDDIR 'ZLIB_A' # ZLIB binding directory.
################################################################################
@@ -104,6 +119,41 @@ action_needed()
}
+# canonicalize_path path
+#
+# Return canonicalized path as:
+# - Absolute
+# - No . or .. component.
+
+canonicalize_path()
+
+{
+ if expr "${1}" : '^/' > /dev/null
+ then P="${1}"
+ else P="`pwd`/${1}"
+ fi
+
+ R=
+ IFSSAVE="${IFS}"
+ IFS="/"
+
+ for C in ${P}
+ do IFS="${IFSSAVE}"
+ case "${C}" in
+ .) ;;
+ ..) R=`expr "${R}" : '^\(.*/\)..*'`
+ ;;
+ ?*) R="${R}${C}/"
+ ;;
+ *) ;;
+ esac
+ done
+
+ IFS="${IFSSAVE}"
+ echo "/`expr "${R}" : '^\(.*\)/'`"
+}
+
+
# make_module module_name source_name [additional_definitions]
#
# Compile source name into ASCII module if needed.
@@ -116,6 +166,7 @@ make_module()
MODULES="${MODULES} ${1}"
MODIFSNAME="${LIBIFSNAME}/${1}.MODULE"
action_needed "${MODIFSNAME}" "${2}" || return 0;
+ SRCDIR=`dirname \`canonicalize_path "${2}"\``
# #pragma convert has to be in the source file itself, i.e.
# putting it in an include file makes it only active
@@ -132,15 +183,27 @@ make_module()
CMD="${CMD} SYSIFCOPT(*IFS64IO) OPTION(*INCDIRFIRST)"
CMD="${CMD} LOCALETYPE(*LOCALE)"
CMD="${CMD} INCDIR('/qibm/proddata/qadrt/include'"
- CMD="${CMD} '${TOPDIR}/include/curl' '${TOPDIR}/include'"
- CMD="${CMD} '${TOPDIR}/packages/OS400' ${INCLUDES})"
+ CMD="${CMD} '${TOPDIR}/include/curl' '${TOPDIR}/include' '${SRCDIR}'"
+ CMD="${CMD} '${TOPDIR}/packages/OS400'"
+
+ if [ "${WITH_ZLIB}" != "0" ]
+ then CMD="${CMD} '${ZLIB_INCLUDE}'"
+ fi
+
+ CMD="${CMD} ${INCLUDES})"
CMD="${CMD} TGTCCSID(${TGTCCSID}) TGTRLS(${TGTRLS})"
CMD="${CMD} OUTPUT(${OUTPUT})"
CMD="${CMD} OPTIMIZE(${OPTIMIZE})"
CMD="${CMD} DBGVIEW(${DEBUG})"
- if [ "${3}" ]
- then CMD="${CMD} DEFINE(${3})"
+ DEFINES="${3}"
+
+ if [ "${WITH_ZLIB}" != "0" ]
+ then DEFINES="${DEFINES} HAVE_LIBZ HAVE_ZLIB_H"
+ fi
+
+ if [ "${DEFINES}" ]
+ then CMD="${CMD} DEFINE(${DEFINES})"
fi
system "${CMD}"
@@ -154,10 +217,17 @@ make_module()
db2_name()
{
- basename "${1}" |
- tr '[a-z-]' '[A-Z_]' |
- sed -e 's/\..*//' \
- -e 's/^\(..........\).*/\1/'
+ if [ "${2}" = 'nomangle' ]
+ then basename "${1}" |
+ tr 'a-z-' 'A-Z_' |
+ sed -e 's/\..*//' \
+ -e 's/^\(.\).*\(.........\)$/\1\2/'
+ else basename "${1}" |
+ tr 'a-z-' 'A-Z_' |
+ sed -e 's/\..*//' \
+ -e 's/^CURL_*/C/' \
+ -e 's/^\(.\).*\(.........\)$/\1\2/'
+ fi
}
diff --git a/packages/OS400/make-include.sh b/packages/OS400/make-include.sh
index 834ee2fc..ad72cf4a 100644
--- a/packages/OS400/make-include.sh
+++ b/packages/OS400/make-include.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Installation of the include files in the OS/400 library.
+# Installation of the header files in the OS/400 library.
#
SCRIPTDIR=`dirname "${0}"`
@@ -8,16 +8,16 @@ SCRIPTDIR=`dirname "${0}"`
cd "${TOPDIR}/include"
-# Produce the curlbuild.h include file if not yet in distribution (CVS).
+# Produce the curlbuild.h header file if not yet in distribution (CVS).
if action_needed curl/curlbuild.h
-then if action_needed curl/curlbuild.h curl/curlbuild.h.dist
- then cp -p curl/curlbuild.h.dist curl/curlbuild.h
- fi
+then if action_needed curl/curlbuild.h curl/curlbuild.h.dist
+ then cp -p curl/curlbuild.h.dist curl/curlbuild.h
+ fi
fi
-# Create the OS/400 source program file for the include files.
+# Create the OS/400 source program file for the header files.
SRCPF="${LIBIFSNAME}/H.FILE"
@@ -28,16 +28,25 @@ then CMD="CRTSRCPF FILE(${TARGETLIB}/H) RCDLEN(112)"
fi
+# Create the IFS directory for the header files.
+
+IFSINCLUDE="${IFSDIR}/include/curl"
+
+if action_needed "${IFSINCLUDE}"
+then mkdir -p "${IFSINCLUDE}"
+fi
+
+
# Enumeration values are used as va_arg tagfields, so they MUST be
# integers.
copy_hfile()
{
- destfile="${1}"
- srcfile="${2}"
- shift
- shift
+ destfile="${1}"
+ srcfile="${2}"
+ shift
+ shift
sed -e '1i\
#pragma enum(int)\
' "${@}" -e '$a\
@@ -48,23 +57,34 @@ copy_hfile()
# Copy the header files.
for HFILE in curl/*.h ${SCRIPTDIR}/ccsidcurl.h
-do DEST="${SRCPF}/`db2_name \"${HFILE}\"`.MBR"
+do case "`basename \"${HFILE}\" .h`" in
+ stdcheaders|typecheck-gcc)
+ continue;;
+ esac
+
+ DEST="${SRCPF}/`db2_name \"${HFILE}\" nomangle`.MBR"
+
if action_needed "${DEST}" "${HFILE}"
then copy_hfile "${DEST}" "${HFILE}"
+ IFSDEST="${IFSINCLUDE}/`basename \"${HFILE}\"`"
+ rm -f "${IFSDEST}"
+ ln -s "${DEST}" "${IFSDEST}"
fi
done
-# Copy the ILE/RPG include file, setting-up version number.
+# Copy the ILE/RPG header file, setting-up version number.
- versioned_copy "${SCRIPTDIR}/curl.inc.in" "${SRCPF}/CURL.INC.MBR"
+versioned_copy "${SCRIPTDIR}/curl.inc.in" "${SRCPF}/CURL.INC.MBR"
+rm -f "${IFSINCLUDE}/curl.inc.rpgle"
+ln -s "${SRCPF}/CURL.INC.MBR" "${IFSINCLUDE}/curl.inc.rpgle"
-# Duplicate file H as CURL to support more include path forms.
+# Duplicate file H as CURL to support more include path forms.
if action_needed "${LIBIFSNAME}/CURL.FILE"
-then :
-else system "DLTF FILE(${TARGETLIB}/CURL)"
+then :
+else system "DLTF FILE(${TARGETLIB}/CURL)"
fi
CMD="CRTDUPOBJ OBJ(H) FROMLIB(${TARGETLIB}) OBJTYPE(*FILE) TOLIB(*FROMLIB)"
diff --git a/packages/OS400/make-lib.sh b/packages/OS400/make-lib.sh
index b7f951b5..a4e50593 100644
--- a/packages/OS400/make-lib.sh
+++ b/packages/OS400/make-lib.sh
@@ -7,12 +7,20 @@ 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(date)' >> os400.c
-echo '#pragma comment(copyright, "Copyright (C) 1998-2010 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> 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
make_module OS400 os400.c
LINK= # No need to rebuild service program yet.
MODULES=
@@ -20,21 +28,18 @@ MODULES=
# Get source list.
-CSOURCES()
-
-{
- shift # Drop the equal sign.
- CSOURCES="$*" # Get the file names.
-}
-
-HHEADERS()
-
-{
- shift # Drop the equal sign.
- HHEADERS="$*" # Get the file names.
-}
-
-. Makefile.inc
+sed -e ':begin' \
+ -e '/\\$/{' \
+ -e 's/\\$/ /' \
+ -e 'N' \
+ -e 'bbegin' \
+ -e '}' \
+ -e 's/\n//g' \
+ -e 's/[[:space:]]*$//' \
+ -e 's/^\([A-Za-z][A-Za-z0-9_]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1="\2"/' \
+ -e 's/\$(\([A-Za-z][A-Za-z0-9_]*\))/${\1}/g' \
+ < Makefile.inc > tmpscript.sh
+. ./tmpscript.sh
# Compile the sources into modules.
@@ -45,9 +50,7 @@ make_module OS400SYS "${SCRIPTDIR}/os400sys.c"
make_module CCSIDCURL "${SCRIPTDIR}/ccsidcurl.c"
for SRC in ${CSOURCES}
-do MODULE=`basename "${SRC}" .c |
- tr '[a-z]' '[A-Z]' |
- sed -e 's/^\(..........\).*/\1/'`
+do MODULE=`db2_name "${SRC}"`
make_module "${MODULE}" "${SRC}"
done
@@ -84,12 +87,12 @@ fi
# Gather the list of symbols to export.
-EXPORTS=`grep '^CURL_EXTERN[ ]' \
+EXPORTS=`grep '^CURL_EXTERN[[:space:]]' \
"${TOPDIR}"/include/curl/*.h \
"${SCRIPTDIR}/ccsidcurl.h" |
- sed -e 's/^.*CURL_EXTERN[ ]\(.*\)(.*$/\1/' \
- -e 's/[ ]*$//' \
- -e 's/^.*[ ][ ]*//' \
+ sed -e 's/^.*CURL_EXTERN[[:space:]]\(.*\)(.*$/\1/' \
+ -e 's/[[:space:]]*$//' \
+ -e 's/^.*[[:space:]][[:space:]]*//' \
-e 's/^\*//' \
-e 's/(\(.*\))/\1/'`
@@ -122,7 +125,11 @@ if [ "${LINK}" ]
then CMD="CRTSRVPGM SRVPGM(${TARGETLIB}/${SRVPGM})"
CMD="${CMD} SRCFILE(${TARGETLIB}/TOOLS) SRCMBR(BNDSRC)"
CMD="${CMD} MODULE(${TARGETLIB}/OS400)"
- CMD="${CMD} BNDDIR(${TARGETLIB}/${STATBNDDIR})"
+ CMD="${CMD} BNDDIR(${TARGETLIB}/${STATBNDDIR}"
+ if [ "${WITH_ZLIB}" != 0 ]
+ then CMD="${CMD} ${ZLIB_LIB}/${ZLIB_BNDDIR}"
+ fi
+ CMD="${CMD})"
CMD="${CMD} BNDSRVPGM(QADRTTS QGLDCLNT QGLDBRDR)"
CMD="${CMD} TEXT('curl API library')"
CMD="${CMD} TGTRLS(${TGTRLS})"
@@ -161,7 +168,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 QSSL HOSTIP HOSTIP4 HOSTIP6"
+ MODULES="${MODULES} EASY STRDUP SSLGEN GSKIT 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/make-tests.sh b/packages/OS400/make-tests.sh
index cee3ed95..9240b7ff 100644
--- a/packages/OS400/make-tests.sh
+++ b/packages/OS400/make-tests.sh
@@ -28,11 +28,11 @@ eval "`sed -e ': begin' \
-e 's/\\\\\\n/ /' \
-e 'b begin' \
-e '}' \
- -e '/^[A-Za-z_][A-Za-z0-9_]*[ ]*[=]/b keep' \
+ -e '/^[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[=]/b keep' \
-e 'd' \
-e ': keep' \
- -e 's/[ ]*=[ ]*/=/' \
- -e 's/=\\(.*[^ ]\\)[ ]*$/=\\"\\1\\"/' \
+ -e 's/[[:space:]]*=[[:space:]]*/=/' \
+ -e 's/=\\(.*[^[:space:]]\\)[[:space:]]*$/=\\"\\1\\"/' \
-e 's/\\$(\\([^)]*\\))/${\\1}/g' \
< Makefile.inc`"
diff --git a/packages/OS400/makefile.sh b/packages/OS400/makefile.sh
index 1e67290d..d2b6bc98 100644
--- a/packages/OS400/makefile.sh
+++ b/packages/OS400/makefile.sh
@@ -47,6 +47,7 @@ done
# Build in each directory.
-for SUBDIR in include lib src tests
+# for SUBDIR in include lib src tests
+for SUBDIR in include lib src
do "${SCRIPTDIR}/make-${SUBDIR}.sh"
done
diff --git a/packages/OS400/os400sys.c b/packages/OS400/os400sys.c
index 071fa482..4be1deaa 100644
--- a/packages/OS400/os400sys.c
+++ b/packages/OS400/os400sys.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 @@
/* OS/400 additional support. */
#include "curlbuild.h"
-#include "config-os400.h" /* Not setup.h: we only need some defines. */
+#include "config-os400.h" /* Not curl_setup.h: we only need some defines. */
#include <sys/types.h>
#include <sys/socket.h>
@@ -38,8 +38,13 @@
#include <qadrt.h>
#include <errno.h>
-#ifdef USE_QSOSSL
-#include <qsossl.h>
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+#ifdef USE_GSKIT
+#include <gskssl.h>
+#include <qsoasync.h>
#endif
#ifdef HAVE_GSSAPI
@@ -89,16 +94,12 @@ static void
thdbufdestroy(void * private)
{
- localkey_t i;
- buffer_t * p;
-
- if (private) {
- p = (buffer_t *) private;
-
- for (i = (localkey_t) 0; i < LK_LAST; i++) {
- if (p->buf)
- free(p->buf);
+ if(private) {
+ buffer_t * p = (buffer_t *) private;
+ localkey_t i;
+ for(i = (localkey_t) 0; i < LK_LAST; i++) {
+ free(p->buf);
p++;
}
@@ -111,13 +112,13 @@ static void
terminate(void)
{
- if (Curl_thread_buffer == buffer_threaded) {
+ if(Curl_thread_buffer == buffer_threaded) {
locbufs = pthread_getspecific(thdkey);
pthread_setspecific(thdkey, (void *) NULL);
pthread_key_delete(thdkey);
}
- if (Curl_thread_buffer != buffer_undef) {
+ if(Curl_thread_buffer != buffer_undef) {
thdbufdestroy((void *) locbufs);
locbufs = (buffer_t *) NULL;
}
@@ -135,31 +136,31 @@ get_buffer(buffer_t * buf, long size)
/* If `size' >= 0, make sure buffer at `buf' is at least `size'-byte long.
Return the buffer address. */
- if (size < 0)
+ if(size < 0)
return buf->buf;
- if (!buf->buf) {
- if ((buf->buf = malloc(size)))
+ if(!buf->buf) {
+ if((buf->buf = malloc(size)))
buf->size = size;
return buf->buf;
}
- if ((unsigned long) size <= buf->size) {
+ if((unsigned long) size <= buf->size) {
/* Shorten the buffer only if it frees a significant byte count. This
avoids some realloc() overhead. */
- if (buf->size - size < MIN_BYTE_GAIN)
+ if(buf->size - size < MIN_BYTE_GAIN)
return buf->buf;
}
/* Resize the buffer. */
- if ((cp = realloc(buf->buf, size))) {
+ if((cp = realloc(buf->buf, size))) {
buf->buf = cp;
buf->size = size;
}
- else if (size <= buf->size)
+ else if(size <= buf->size)
cp = buf->buf;
return cp;
@@ -186,16 +187,16 @@ buffer_threaded(localkey_t key, long size)
bufs = (buffer_t *) pthread_getspecific(thdkey);
- if (!bufs) {
- if (size < 0)
+ if(!bufs) {
+ if(size < 0)
return (char *) NULL; /* No buffer yet. */
/* Allocate buffer descriptors for the current thread. */
- if (!(bufs = calloc((size_t) LK_LAST, sizeof *bufs)))
+ if(!(bufs = calloc((size_t) LK_LAST, sizeof *bufs)))
return (char *) NULL;
- if (pthread_setspecific(thdkey, (void *) bufs)) {
+ if(pthread_setspecific(thdkey, (void *) bufs)) {
free(bufs);
return (char *) NULL;
}
@@ -217,11 +218,10 @@ buffer_undef(localkey_t key, long size)
/* Determine if we can use pthread-specific data. */
- if (Curl_thread_buffer == buffer_undef) { /* If unchanged during lock. */
- if (!pthread_key_create(&thdkey, thdbufdestroy))
+ if(Curl_thread_buffer == buffer_undef) { /* If unchanged during lock. */
+ if(!pthread_key_create(&thdkey, thdbufdestroy))
Curl_thread_buffer = buffer_threaded;
- else if (!(locbufs = calloc((size_t) LK_LAST,
- sizeof *locbufs))) {
+ else if(!(locbufs = calloc((size_t) LK_LAST, sizeof *locbufs))) {
pthread_mutex_unlock(&mutex);
return (char *) NULL;
}
@@ -236,6 +236,28 @@ buffer_undef(localkey_t key, long size)
}
+static char *
+set_thread_string(localkey_t key, const char * s)
+
+{
+ int i;
+ char * cp;
+
+ if(!s)
+ return (char *) NULL;
+
+ i = strlen(s) + 1;
+ cp = Curl_thread_buffer(key, MAX_CONV_EXPANSION * i + 1);
+
+ if(cp) {
+ i = QadrtConvertE2A(cp, s, MAX_CONV_EXPANSION * i, i);
+ cp[i] = '\0';
+ }
+
+ return cp;
+}
+
+
int
Curl_getnameinfo_a(const struct sockaddr * sa, curl_socklen_t salen,
char * nodename, curl_socklen_t nodenamelen,
@@ -251,41 +273,35 @@ Curl_getnameinfo_a(const struct sockaddr * sa, curl_socklen_t salen,
enodename = (char *) NULL;
eservname = (char *) NULL;
- if (nodename && nodenamelen)
- if (!(enodename = malloc(nodenamelen)))
+ if(nodename && nodenamelen)
+ if(!(enodename = malloc(nodenamelen)))
return EAI_MEMORY;
- if (servname && servnamelen)
- if (!(eservname = malloc(servnamelen))) {
- if (enodename)
- free(enodename);
-
+ if(servname && servnamelen)
+ if(!(eservname = malloc(servnamelen))) {
+ free(enodename);
return EAI_MEMORY;
}
status = getnameinfo(sa, salen, enodename, nodenamelen,
eservname, servnamelen, flags);
- if (!status) {
- if (enodename) {
+ if(!status) {
+ if(enodename) {
i = QadrtConvertE2A(nodename, enodename,
nodenamelen - 1, strlen(enodename));
nodename[i] = '\0';
}
- if (eservname) {
+ if(eservname) {
i = QadrtConvertE2A(servname, eservname,
servnamelen - 1, strlen(eservname));
servname[i] = '\0';
}
}
- if (enodename)
- free(enodename);
-
- if (eservname)
- free(eservname);
-
+ free(enodename);
+ free(eservname);
return status;
}
@@ -304,23 +320,21 @@ Curl_getaddrinfo_a(const char * nodename, const char * servname,
enodename = (char *) NULL;
eservname = (char *) NULL;
- if (nodename) {
+ if(nodename) {
i = strlen(nodename);
- if (!(enodename = malloc(i + 1)))
+ if(!(enodename = malloc(i + 1)))
return EAI_MEMORY;
i = QadrtConvertA2E(enodename, nodename, i, i);
enodename[i] = '\0';
}
- if (servname) {
+ if(servname) {
i = strlen(servname);
- if (!(eservname = malloc(i + 1))) {
- if (enodename)
- free(enodename);
-
+ if(!(eservname = malloc(i + 1))) {
+ free(enodename);
return EAI_MEMORY;
}
@@ -329,126 +343,400 @@ Curl_getaddrinfo_a(const char * nodename, const char * servname,
}
status = getaddrinfo(enodename, eservname, hints, res);
+ free(enodename);
+ free(eservname);
+ return status;
+}
- if (enodename)
- free(enodename);
- if (eservname)
- free(eservname);
+#ifdef USE_GSKIT
- return status;
+/* ASCII wrappers for the GSKit procedures. */
+
+/*
+ * EBCDIC --> ASCII string mapping table.
+ * Some strings returned by GSKit are dynamically allocated and automatically
+ * released when closing the handle.
+ * To provide the same functionality, we use a "private" handle that
+ * holds the GSKit handle and a list of string mappings. This will allow
+ * avoid conversion of already converted strings and releasing them upon
+ * close time.
+ */
+
+struct gskstrlist {
+ struct gskstrlist * next;
+ const char * ebcdicstr;
+ const char * asciistr;
+};
+
+struct Curl_gsk_descriptor {
+ gsk_handle h;
+ struct gskstrlist * strlist;
+};
+
+
+int
+Curl_gsk_environment_open(gsk_handle * my_env_handle)
+
+{
+ struct Curl_gsk_descriptor * p;
+ gsk_handle h;
+ int rc;
+
+ if(!my_env_handle)
+ return GSK_OS400_ERROR_INVALID_POINTER;
+ if(!(p = (struct Curl_gsk_descriptor *) malloc(sizeof *p)))
+ return GSK_INSUFFICIENT_STORAGE;
+ p->strlist = (struct gskstrlist *) NULL;
+ if((rc = gsk_environment_open(&p->h)) != GSK_OK)
+ free(p);
+ else
+ *my_env_handle = (gsk_handle) p;
+ return rc;
+}
+
+
+int
+Curl_gsk_secure_soc_open(gsk_handle my_env_handle,
+ gsk_handle * my_session_handle)
+
+{
+ struct Curl_gsk_descriptor * p;
+ gsk_handle h;
+ int rc;
+
+ if(!my_env_handle)
+ return GSK_INVALID_HANDLE;
+ if(!my_session_handle)
+ return GSK_OS400_ERROR_INVALID_POINTER;
+ h = ((struct Curl_gsk_descriptor *) my_env_handle)->h;
+ if(!(p = (struct Curl_gsk_descriptor *) malloc(sizeof *p)))
+ return GSK_INSUFFICIENT_STORAGE;
+ p->strlist = (struct gskstrlist *) NULL;
+ if((rc = gsk_secure_soc_open(h, &p->h)) != GSK_OK)
+ free(p);
+ else
+ *my_session_handle = (gsk_handle) p;
+ return rc;
}
-#ifdef USE_QSOSSL
+static void
+gsk_free_handle(struct Curl_gsk_descriptor * p)
+
+{
+ struct gskstrlist * q;
+
+ while((q = p->strlist)) {
+ p->strlist = q;
+ free((void *) q->asciistr);
+ free(q);
+ }
+ free(p);
+}
-/* ASCII wrappers for the SSL procedures. */
int
-Curl_SSL_Init_Application_a(SSLInitApp * init_app)
+Curl_gsk_environment_close(gsk_handle * my_env_handle)
{
+ struct Curl_gsk_descriptor * p;
int rc;
- unsigned int i;
- SSLInitApp ia;
- if (!init_app || !init_app->applicationID || !init_app->applicationIDLen)
- return SSL_Init_Application(init_app);
+ if(!my_env_handle)
+ return GSK_OS400_ERROR_INVALID_POINTER;
+ if(!*my_env_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) *my_env_handle;
+ if((rc = gsk_environment_close(&p->h)) == GSK_OK) {
+ gsk_free_handle(p);
+ *my_env_handle = (gsk_handle) NULL;
+ }
+ return rc;
+}
- memcpy((char *) &ia, (char *) init_app, sizeof ia);
- i = ia.applicationIDLen;
- if (!(ia.applicationID = malloc(i + 1))) {
- errno = ENOMEM;
- return SSL_ERROR_IO;
- }
+int
+Curl_gsk_secure_soc_close(gsk_handle * my_session_handle)
- 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;
+{
+ struct Curl_gsk_descriptor * p;
+ int rc;
+
+ if(!my_session_handle)
+ return GSK_OS400_ERROR_INVALID_POINTER;
+ if(!*my_session_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) *my_session_handle;
+ if((rc = gsk_secure_soc_close(&p->h)) == GSK_OK) {
+ gsk_free_handle(p);
+ *my_session_handle = (gsk_handle) NULL;
+ }
return rc;
}
int
-Curl_SSL_Init_a(SSLInit * init)
+Curl_gsk_environment_init(gsk_handle my_env_handle)
+
+{
+ struct Curl_gsk_descriptor * p;
+
+ if(!my_env_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_env_handle;
+ return gsk_environment_init(p->h);
+}
+
+
+int
+Curl_gsk_secure_soc_init(gsk_handle my_session_handle)
+
+{
+ struct Curl_gsk_descriptor * p;
+
+ if(!my_session_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_session_handle;
+ return gsk_secure_soc_init(p->h);
+}
+
+
+int
+Curl_gsk_attribute_set_buffer_a(gsk_handle my_gsk_handle, GSK_BUF_ID bufID,
+ const char * buffer, int bufSize)
{
+ struct Curl_gsk_descriptor * p;
+ char * ebcdicbuf;
int rc;
- unsigned int i;
- SSLInit ia;
- if (!init || (!init->keyringFileName && !init->keyringPassword))
- return SSL_Init(init);
+ if(!my_gsk_handle)
+ return GSK_INVALID_HANDLE;
+ if(!buffer)
+ return GSK_OS400_ERROR_INVALID_POINTER;
+ if(bufSize < 0)
+ return GSK_ATTRIBUTE_INVALID_LENGTH;
+ p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+ if(!bufSize)
+ bufSize = strlen(buffer);
+ if(!(ebcdicbuf = malloc(bufSize + 1)))
+ return GSK_INSUFFICIENT_STORAGE;
+ QadrtConvertA2E(ebcdicbuf, buffer, bufSize, bufSize);
+ ebcdicbuf[bufSize] = '\0';
+ rc = gsk_attribute_set_buffer(p->h, bufID, ebcdicbuf, bufSize);
+ free(ebcdicbuf);
+ return rc;
+}
- memcpy((char *) &ia, (char *) init, sizeof ia);
- if (ia.keyringFileName) {
- i = strlen(ia.keyringFileName);
+int
+Curl_gsk_attribute_set_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,
+ GSK_ENUM_VALUE enumValue)
- if (!(ia.keyringFileName = malloc(i + 1))) {
- errno = ENOMEM;
- return SSL_ERROR_IO;
- }
+{
+ struct Curl_gsk_descriptor * p;
- QadrtConvertA2E(ia.keyringFileName, init->keyringFileName, i, i);
- ia.keyringFileName[i] = '\0';
- }
+ if(!my_gsk_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+ return gsk_attribute_set_enum(p->h, enumID, enumValue);
+}
- if (ia.keyringPassword) {
- i = strlen(ia.keyringPassword);
- if (!(ia.keyringPassword = malloc(i + 1))) {
- if (ia.keyringFileName)
- free(ia.keyringFileName);
+int
+Curl_gsk_attribute_set_numeric_value(gsk_handle my_gsk_handle,
+ GSK_NUM_ID numID, int numValue)
- errno = ENOMEM;
- return SSL_ERROR_IO;
- }
+{
+ struct Curl_gsk_descriptor * p;
- QadrtConvertA2E(ia.keyringPassword, init->keyringPassword, i, i);
- ia.keyringPassword[i] = '\0';
- }
+ if(!my_gsk_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+ return gsk_attribute_set_numeric_value(p->h, numID, numValue);
+}
- rc = SSL_Init(&ia);
- if (ia.keyringFileName)
- free(ia.keyringFileName);
+int
+Curl_gsk_attribute_set_callback(gsk_handle my_gsk_handle,
+ GSK_CALLBACK_ID callBackID,
+ void * callBackAreaPtr)
+
+{
+ struct Curl_gsk_descriptor * p;
+
+ if(!my_gsk_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+ return gsk_attribute_set_callback(p->h, callBackID, callBackAreaPtr);
+}
+
+
+static int
+cachestring(struct Curl_gsk_descriptor * p,
+ const char * ebcdicbuf, int bufsize, const char * * buffer)
+
+{
+ int rc;
+ char * asciibuf;
+ struct gskstrlist * sp;
+
+ for(sp = p->strlist; sp; sp = sp->next)
+ if(sp->ebcdicstr == ebcdicbuf)
+ break;
+ if(!sp) {
+ if(!(sp = (struct gskstrlist *) malloc(sizeof *sp)))
+ return GSK_INSUFFICIENT_STORAGE;
+ if(!(asciibuf = malloc(bufsize + 1))) {
+ free(sp);
+ return GSK_INSUFFICIENT_STORAGE;
+ }
+ QadrtConvertE2A(asciibuf, ebcdicbuf, bufsize, bufsize);
+ asciibuf[bufsize] = '\0';
+ sp->ebcdicstr = ebcdicbuf;
+ sp->asciistr = asciibuf;
+ sp->next = p->strlist;
+ p->strlist = sp;
+ }
+ *buffer = sp->asciistr;
+ return GSK_OK;
+}
- if (ia.keyringPassword)
- free(ia.keyringPassword);
+int
+Curl_gsk_attribute_get_buffer_a(gsk_handle my_gsk_handle, GSK_BUF_ID bufID,
+ const char * * buffer, int * bufSize)
+
+{
+ struct Curl_gsk_descriptor * p;
+ int rc;
+ const char * mybuf;
+ int mylen;
+
+ if(!my_gsk_handle)
+ return GSK_INVALID_HANDLE;
+ if(!buffer || !bufSize)
+ return GSK_OS400_ERROR_INVALID_POINTER;
+ p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+ if((rc = gsk_attribute_get_buffer(p->h, bufID, &mybuf, &mylen)) != GSK_OK)
+ return rc;
+ if((rc = cachestring(p, mybuf, mylen, buffer)) == GSK_OK)
+ *bufSize = mylen;
return rc;
}
-char *
-Curl_SSL_Strerror_a(int sslreturnvalue, SSLErrorMsg * serrmsgp)
+int
+Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,
+ GSK_ENUM_VALUE * enumValue)
{
- int i;
- char * cp;
- char * cp2;
+ struct Curl_gsk_descriptor * p;
- cp = SSL_Strerror(sslreturnvalue, serrmsgp);
+ if(!my_gsk_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+ return gsk_attribute_get_enum(p->h, enumID, enumValue);
+}
- if (!cp)
- return cp;
- i = strlen(cp);
+int
+Curl_gsk_attribute_get_numeric_value(gsk_handle my_gsk_handle,
+ GSK_NUM_ID numID, int * numValue)
- if (!(cp2 = Curl_thread_buffer(LK_SSL_ERROR, MAX_CONV_EXPANSION * i + 1)))
- return cp2;
+{
+ struct Curl_gsk_descriptor * p;
- i = QadrtConvertE2A(cp2, cp, MAX_CONV_EXPANSION * i, i);
- cp2[i] = '\0';
- return cp2;
+ if(!my_gsk_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+ return gsk_attribute_get_numeric_value(p->h, numID, numValue);
+}
+
+
+int
+Curl_gsk_attribute_get_cert_info(gsk_handle my_gsk_handle,
+ GSK_CERT_ID certID,
+ const gsk_cert_data_elem * * certDataElem,
+ int * certDataElementCount)
+
+{
+ struct Curl_gsk_descriptor * p;
+
+ if(!my_gsk_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+ /* No need to convert code: text results are already in ASCII. */
+ return gsk_attribute_get_cert_info(p->h, certID,
+ certDataElem, certDataElementCount);
+}
+
+
+int
+Curl_gsk_secure_soc_misc(gsk_handle my_session_handle, GSK_MISC_ID miscID)
+
+{
+ struct Curl_gsk_descriptor * p;
+
+ if(!my_session_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_session_handle;
+ return gsk_secure_soc_misc(p->h, miscID);
+}
+
+
+int
+Curl_gsk_secure_soc_read(gsk_handle my_session_handle, char * readBuffer,
+ int readBufSize, int * amtRead)
+
+{
+ struct Curl_gsk_descriptor * p;
+
+ if(!my_session_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_session_handle;
+ return gsk_secure_soc_read(p->h, readBuffer, readBufSize, amtRead);
}
-#endif /* USE_QSOSSL */
+
+int
+Curl_gsk_secure_soc_write(gsk_handle my_session_handle, char * writeBuffer,
+ int writeBufSize, int * amtWritten)
+
+{
+ struct Curl_gsk_descriptor * p;
+
+ if(!my_session_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_session_handle;
+ return gsk_secure_soc_write(p->h, writeBuffer, writeBufSize, amtWritten);
+}
+
+
+const char *
+Curl_gsk_strerror_a(int gsk_return_value)
+
+{
+ return set_thread_string(LK_GSK_ERROR, gsk_strerror(gsk_return_value));
+}
+
+int
+Curl_gsk_secure_soc_startInit(gsk_handle my_session_handle,
+ int IOCompletionPort,
+ Qso_OverlappedIO_t * communicationsArea)
+
+{
+ struct Curl_gsk_descriptor * p;
+
+ if(!my_session_handle)
+ return GSK_INVALID_HANDLE;
+ p = (struct Curl_gsk_descriptor *) my_session_handle;
+ return gsk_secure_soc_startInit(p->h, IOCompletionPort, communicationsArea);
+}
+
+#endif /* USE_GSKIT */
+
#ifdef HAVE_GSSAPI
@@ -467,11 +755,11 @@ Curl_gss_convert_in_place(OM_uint32 * minor_status, gss_buffer_t buf)
i = buf->length;
- if (i) {
- if (!(t = malloc(i))) {
+ if(i) {
+ if(!(t = malloc(i))) {
gss_release_buffer(minor_status, buf);
- if (minor_status)
+ if(minor_status)
*minor_status = ENOMEM;
return -1;
@@ -495,14 +783,14 @@ Curl_gss_import_name_a(OM_uint32 * minor_status, gss_buffer_t in_name,
unsigned int i;
gss_buffer_desc in;
- if (!in_name || !in_name->value || !in_name->length)
+ if(!in_name || !in_name->value || !in_name->length)
return gss_import_name(minor_status, in_name, in_name_type, out_name);
memcpy((char *) &in, (char *) in_name, sizeof in);
i = in.length;
- if (!(in.value = malloc(i + 1))) {
- if (minor_status)
+ if(!(in.value = malloc(i + 1))) {
+ if(minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
@@ -527,15 +815,15 @@ Curl_gss_display_status_a(OM_uint32 * minor_status, OM_uint32 status_value,
rc = gss_display_status(minor_status, status_value, status_type,
mech_type, message_context, status_string);
- if (rc != GSS_S_COMPLETE || !status_string ||
- !status_string->length || !status_string->value)
+ if(rc != GSS_S_COMPLETE || !status_string ||
+ !status_string->length || !status_string->value)
return rc;
/* No way to allocate a buffer here, because it will be released by
gss_release_buffer(). The solution is to overwrite the EBCDIC buffer
with ASCII to return it. */
- if (Curl_gss_convert_in_place(minor_status, status_string))
+ if(Curl_gss_convert_in_place(minor_status, status_string))
return GSS_S_FAILURE;
return rc;
@@ -543,7 +831,8 @@ Curl_gss_display_status_a(OM_uint32 * minor_status, OM_uint32 status_value,
OM_uint32
-Curl_gss_init_sec_context_a(OM_uint32 * minor_status, gss_cred_id_t cred_handle,
+Curl_gss_init_sec_context_a(OM_uint32 * minor_status,
+ gss_cred_id_t cred_handle,
gss_ctx_id_t * context_handle,
gss_name_t target_name, gss_OID mech_type,
gss_flags_t req_flags, OM_uint32 time_req,
@@ -561,12 +850,12 @@ Curl_gss_init_sec_context_a(OM_uint32 * minor_status, gss_cred_id_t cred_handle,
in.value = NULL;
- if ((inp = input_token))
- if (inp->length && inp->value) {
+ if((inp = input_token))
+ if(inp->length && inp->value) {
i = inp->length;
- if (!(in.value = malloc(i + 1))) {
- if (minor_status)
+ if(!(in.value = malloc(i + 1))) {
+ if(minor_status)
*minor_status = ENOMEM;
return GSS_S_FAILURE;
@@ -582,11 +871,9 @@ Curl_gss_init_sec_context_a(OM_uint32 * minor_status, gss_cred_id_t cred_handle,
target_name, mech_type, req_flags, time_req,
input_chan_bindings, inp, actual_mech_type,
output_token, ret_flags, time_rec);
+ free(in.value);
- if (in.value)
- free(in.value);
-
- if (rc != GSS_S_COMPLETE || !output_token ||
+ if(rc != GSS_S_COMPLETE || !output_token ||
!output_token->length || !output_token->value)
return rc;
@@ -594,7 +881,7 @@ Curl_gss_init_sec_context_a(OM_uint32 * minor_status, gss_cred_id_t cred_handle,
gss_release_buffer(). The solution is to overwrite the EBCDIC buffer
with ASCII to return it. */
- if (Curl_gss_convert_in_place(minor_status, output_token))
+ if(Curl_gss_convert_in_place(minor_status, output_token))
return GSS_S_FAILURE;
return rc;
@@ -611,7 +898,7 @@ Curl_gss_delete_sec_context_a(OM_uint32 * minor_status,
rc = gss_delete_sec_context(minor_status, context_handle, output_token);
- if (rc != GSS_S_COMPLETE || !output_token ||
+ if(rc != GSS_S_COMPLETE || !output_token ||
!output_token->length || !output_token->value)
return rc;
@@ -619,7 +906,7 @@ Curl_gss_delete_sec_context_a(OM_uint32 * minor_status,
gss_release_buffer(). The solution is to overwrite the EBCDIC buffer
with ASCII to return it. */
- if (Curl_gss_convert_in_place(minor_status, output_token))
+ if(Curl_gss_convert_in_place(minor_status, output_token))
return GSS_S_FAILURE;
return rc;
@@ -640,12 +927,12 @@ Curl_ldap_init_a(char * host, int port)
char * ehost;
void * result;
- if (!host)
+ if(!host)
return (void *) ldap_init(host, port);
i = strlen(host);
- if (!(ehost = malloc(i + 1)))
+ if(!(ehost = malloc(i + 1)))
return (void *) NULL;
QadrtConvertA2E(ehost, host, i, i);
@@ -667,23 +954,21 @@ Curl_ldap_simple_bind_s_a(void * ld, char * dn, char * passwd)
edn = (char *) NULL;
epasswd = (char *) NULL;
- if (dn) {
+ if(dn) {
i = strlen(dn);
- if (!(edn = malloc(i + 1)))
+ if(!(edn = malloc(i + 1)))
return LDAP_NO_MEMORY;
QadrtConvertA2E(edn, dn, i, i);
edn[i] = '\0';
}
- if (passwd) {
+ if(passwd) {
i = strlen(passwd);
- if (!(epasswd = malloc(i + 1))) {
- if (edn)
- free(edn);
-
+ if(!(epasswd = malloc(i + 1))) {
+ free(edn);
return LDAP_NO_MEMORY;
}
@@ -692,13 +977,8 @@ Curl_ldap_simple_bind_s_a(void * ld, char * dn, char * passwd)
}
i = ldap_simple_bind_s(ld, edn, epasswd);
-
- if (epasswd)
- free(epasswd);
-
- if (edn)
- free(edn);
-
+ free(epasswd);
+ free(edn);
return i;
}
@@ -720,10 +1000,10 @@ Curl_ldap_search_s_a(void * ld, char * base, int scope, char * filter,
eattrs = (char * *) NULL;
status = LDAP_SUCCESS;
- if (base) {
+ if(base) {
i = strlen(base);
- if (!(ebase = malloc(i + 1)))
+ if(!(ebase = malloc(i + 1)))
status = LDAP_NO_MEMORY;
else {
QadrtConvertA2E(ebase, base, i, i);
@@ -731,10 +1011,10 @@ Curl_ldap_search_s_a(void * ld, char * base, int scope, char * filter,
}
}
- if (filter && status == LDAP_SUCCESS) {
+ if(filter && status == LDAP_SUCCESS) {
i = strlen(filter);
- if (!(efilter = malloc(i + 1)))
+ if(!(efilter = malloc(i + 1)))
status = LDAP_NO_MEMORY;
else {
QadrtConvertA2E(efilter, filter, i, i);
@@ -742,17 +1022,17 @@ Curl_ldap_search_s_a(void * ld, char * base, int scope, char * filter,
}
}
- if (attrs && status == LDAP_SUCCESS) {
- for (i = 0; attrs[i++];)
+ if(attrs && status == LDAP_SUCCESS) {
+ for(i = 0; attrs[i++];)
;
- if (!(eattrs = calloc(i, sizeof *eattrs)))
+ if(!(eattrs = calloc(i, sizeof *eattrs)))
status = LDAP_NO_MEMORY;
else {
- for (j = 0; attrs[j]; j++) {
+ for(j = 0; attrs[j]; j++) {
i = strlen(attrs[j]);
- if (!(eattrs[j] = malloc(i + 1))) {
+ if(!(eattrs[j] = malloc(i + 1))) {
status = LDAP_NO_MEMORY;
break;
}
@@ -763,24 +1043,20 @@ Curl_ldap_search_s_a(void * ld, char * base, int scope, char * filter,
}
}
- if (status == LDAP_SUCCESS)
+ if(status == LDAP_SUCCESS)
status = ldap_search_s(ld, ebase? ebase: "", scope,
efilter? efilter: "(objectclass=*)",
eattrs, attrsonly, res);
- if (eattrs) {
- for (j = 0; eattrs[j]; j++)
+ if(eattrs) {
+ for(j = 0; eattrs[j]; j++)
free(eattrs[j]);
free(eattrs);
}
- if (efilter)
- free(efilter);
-
- if (ebase)
- free(ebase);
-
+ free(efilter);
+ free(ebase);
return status;
}
@@ -789,16 +1065,15 @@ 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) {
- i = strlen(attr);
+ if(attr) {
+ int i = strlen(attr);
- if (!(cp = malloc(i + 1))) {
+ if(!(cp = malloc(i + 1))) {
ldap_set_lderrno(ld, LDAP_NO_MEMORY, NULL,
ldap_err2string(LDAP_NO_MEMORY));
return (struct berval * *) NULL;
@@ -809,12 +1084,10 @@ Curl_ldap_get_values_len_a(void * ld, LDAPMessage * entry, const char * attr)
}
result = ldap_get_values_len(ld, entry, cp);
+ free(cp);
- if (cp)
- free(cp);
-
- /* Result data are binary in nature, so they haven't been converted to EBCDIC.
- Therefore do not convert. */
+ /* Result data are binary in nature, so they haven't been
+ converted to EBCDIC. Therefore do not convert. */
return result;
}
@@ -824,23 +1097,7 @@ char *
Curl_ldap_err2string_a(int error)
{
- int i;
- char * cp;
- char * cp2;
-
- cp = ldap_err2string(error);
-
- if (!cp)
- return cp;
-
- i = strlen(cp);
-
- if (!(cp2 = Curl_thread_buffer(LK_LDAP_ERROR, MAX_CONV_EXPANSION * i + 1)))
- return cp2;
-
- i = QadrtConvertE2A(cp2, cp, MAX_CONV_EXPANSION * i, i);
- cp2[i] = '\0';
- return cp2;
+ return set_thread_string(LK_LDAP_ERROR, ldap_err2string(error));
}
@@ -854,15 +1111,16 @@ Curl_ldap_get_dn_a(void * ld, LDAPMessage * entry)
cp = ldap_get_dn(ld, entry);
- if (!cp)
+ if(!cp)
return cp;
i = strlen(cp);
- if (!(cp2 = malloc(i + 1)))
+ if(!(cp2 = malloc(i + 1)))
return cp2;
QadrtConvertE2A(cp2, cp, i, i);
+ cp2[i] = '\0';
/* No way to allocate a buffer here, because it will be released by
ldap_memfree() and ldap_memalloc() does not exist. The solution is to
@@ -885,15 +1143,16 @@ Curl_ldap_first_attribute_a(void * ld,
cp = ldap_first_attribute(ld, entry, berptr);
- if (!cp)
+ if(!cp)
return cp;
i = strlen(cp);
- if (!(cp2 = malloc(i + 1)))
+ if(!(cp2 = malloc(i + 1)))
return cp2;
QadrtConvertE2A(cp2, cp, i, i);
+ cp2[i] = '\0';
/* No way to allocate a buffer here, because it will be released by
ldap_memfree() and ldap_memalloc() does not exist. The solution is to
@@ -916,15 +1175,16 @@ Curl_ldap_next_attribute_a(void * ld,
cp = ldap_next_attribute(ld, entry, berptr);
- if (!cp)
+ if(!cp)
return cp;
i = strlen(cp);
- if (!(cp2 = malloc(i + 1)))
+ if(!(cp2 = malloc(i + 1)))
return cp2;
QadrtConvertE2A(cp2, cp, i, i);
+ cp2[i] = '\0';
/* No way to allocate a buffer here, because it will be released by
ldap_memfree() and ldap_memalloc() does not exist. The solution is to
@@ -950,8 +1210,8 @@ convert_sockaddr(struct sockaddr_storage * dstaddr,
/* Convert a socket address into job CCSID, if needed. */
- if (!srcaddr || srclen < offsetof(struct sockaddr, sa_family) +
- sizeof srcaddr->sa_family || srclen > sizeof *dstaddr) {
+ if(!srcaddr || srclen < offsetof(struct sockaddr, sa_family) +
+ sizeof srcaddr->sa_family || srclen > sizeof *dstaddr) {
errno = EINVAL;
return -1;
}
@@ -984,7 +1244,7 @@ Curl_os400_connect(int sd, struct sockaddr * destaddr, int addrlen)
i = convert_sockaddr(&laddr, destaddr, addrlen);
- if (i < 0)
+ if(i < 0)
return -1;
return connect(sd, (struct sockaddr *) &laddr, i);
@@ -1000,7 +1260,7 @@ Curl_os400_bind(int sd, struct sockaddr * localaddr, int addrlen)
i = convert_sockaddr(&laddr, localaddr, addrlen);
- if (i < 0)
+ if(i < 0)
return -1;
return bind(sd, (struct sockaddr *) &laddr, i);
@@ -1017,7 +1277,7 @@ Curl_os400_sendto(int sd, char * buffer, int buflen, int flags,
i = convert_sockaddr(&laddr, dstaddr, addrlen);
- if (i < 0)
+ if(i < 0)
return -1;
return sendto(sd, buffer, buflen, flags, (struct sockaddr *) &laddr, i);
@@ -1036,7 +1296,7 @@ Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags,
struct sockaddr_un * dstu;
struct sockaddr_storage laddr;
- if (!fromaddr || !addrlen || *addrlen <= 0)
+ if(!fromaddr || !addrlen || *addrlen <= 0)
return recvfrom(sd, buffer, buflen, flags, fromaddr, addrlen);
laddrlen = sizeof laddr;
@@ -1044,7 +1304,7 @@ Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags,
rcvlen = recvfrom(sd, buffer, buflen, flags,
(struct sockaddr *) &laddr, &laddrlen);
- if (rcvlen < 0)
+ if(rcvlen < 0)
return rcvlen;
switch (laddr.ss_family) {
@@ -1057,7 +1317,7 @@ Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags,
i = QadrtConvertE2A(dstu->sun_path, srcu->sun_path, i, laddrlen);
laddrlen = i + offsetof(struct sockaddr_un, sun_path);
- if (laddrlen < *addrlen)
+ if(laddrlen < *addrlen)
dstu->sun_path[i] = '\0';
break;
@@ -1066,10 +1326,10 @@ Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags,
break;
default:
- if (laddrlen > *addrlen)
+ if(laddrlen > *addrlen)
laddrlen = *addrlen;
- if (laddrlen)
+ if(laddrlen)
memcpy((char *) fromaddr, (char *) &laddr, laddrlen);
break;
@@ -1078,3 +1338,79 @@ Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags,
*addrlen = laddrlen;
return rcvlen;
}
+
+
+#ifdef HAVE_LIBZ
+const char *
+Curl_os400_zlibVersion(void)
+
+{
+ return set_thread_string(LK_ZLIB_VERSION, zlibVersion());
+}
+
+
+int
+Curl_os400_inflateInit_(z_streamp strm, const char * version, int stream_size)
+
+{
+ z_const char * msgb4 = strm->msg;
+ int ret;
+
+ ret = inflateInit(strm);
+
+ if(strm->msg != msgb4)
+ strm->msg = set_thread_string(LK_ZLIB_MSG, strm->msg);
+
+ return ret;
+}
+
+
+int
+Curl_os400_inflateInit2_(z_streamp strm, int windowBits,
+ const char * version, int stream_size)
+
+{
+ z_const char * msgb4 = strm->msg;
+ int ret;
+
+ ret = inflateInit2(strm, windowBits);
+
+ if(strm->msg != msgb4)
+ strm->msg = set_thread_string(LK_ZLIB_MSG, strm->msg);
+
+ return ret;
+}
+
+
+int
+Curl_os400_inflate(z_streamp strm, int flush)
+
+{
+ z_const char * msgb4 = strm->msg;
+ int ret;
+
+ ret = inflate(strm, flush);
+
+ if(strm->msg != msgb4)
+ strm->msg = set_thread_string(LK_ZLIB_MSG, strm->msg);
+
+ return ret;
+}
+
+
+int
+Curl_os400_inflateEnd(z_streamp strm)
+
+{
+ z_const char * msgb4 = strm->msg;
+ int ret;
+
+ ret = inflateEnd(strm);
+
+ if(strm->msg != msgb4)
+ strm->msg = set_thread_string(LK_ZLIB_MSG, strm->msg);
+
+ return ret;
+}
+
+#endif
diff --git a/packages/OS400/os400sys.h b/packages/OS400/os400sys.h
index e708365e..11446922 100644
--- a/packages/OS400/os400sys.h
+++ b/packages/OS400/os400sys.h
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -31,6 +31,7 @@
typedef enum {
LK_SSL_ERROR,
+ LK_GSK_ERROR,
LK_LDAP_ERROR,
LK_CURL_VERSION,
LK_VERSION_INFO,
@@ -38,6 +39,8 @@ typedef enum {
LK_EASY_STRERROR,
LK_SHARE_STRERROR,
LK_MULTI_STRERROR,
+ LK_ZLIB_VERSION,
+ LK_ZLIB_MSG,
LK_LAST
} localkey_t;
diff --git a/packages/Solaris/Makefile.in b/packages/Solaris/Makefile.in
deleted file mode 100644
index 56809cad..00000000
--- a/packages/Solaris/Makefile.in
+++ /dev/null
@@ -1,438 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-#
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/Solaris
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = "@PACKAGE@-@VERSION@ - @PKGADD_NAME@"
-PKGADD_PKG = "@PKGADD_PKG@"
-PKGADD_VENDOR = "@PKGADD_VENDOR@"
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-PKGADD_ARCH = "@host_cpu@"
-PKGADD_DESC = "@PACKAGE@-@VERSION@ - @PKGADD_NAME@"
-PKGADD_CLASSES = none
-PKGADD_BASEDIR = /
-PKGADD_FILE = ${PKGADD_PKG}-@PACKAGE@-@VERSION@-@host@.pkg
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Solaris/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/Solaris/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-info-am
-
-
-package:
- if [ ! -f release ]; then echo 0 > release; fi
- if [ `find root -newer release -print|wc -l` -gt 0 ]; then expr `cat release` + 1 > release; fi
- echo PKG=${PKGADD_PKG} > pkginfo
- echo NAME=${PKGADD_NAME} >> pkginfo
- echo VENDOR=${PKGADD_VENDOR} >> pkginfo
- echo ARCH=${PKGADD_ARCH} >> pkginfo
- echo DESC=${PKGADD_DESC} >> pkginfo
- echo CLASSES=${PKGADD_CLASSES} >> pkginfo
- echo BASEDIR=${PKGADD_BASEDIR} >> pkginfo
- echo CATEGORY=application >> pkginfo
- echo VERSION=`cat ./release` >> pkginfo
- echo > prototype
- for subdir in opt var etc usr; \
- do if [ -d root/$$subdir ]; then \
- pkgproto root/$$subdir=$$subdir >> prototype;\
- fi; done
- for file in pkginfo preinstall postinstall copyright; \
- do if [ -f $$file ]; then \
- echo "i $$file=$$file" >> prototype; \
- fi; done
- rm -rf ./tmp
- mkdir ./tmp
- pkgmk -o -d ./tmp
- pkgtrans -so ./tmp ${top_srcdir}/../${PKGADD_FILE} ${PKGADD_PKG}
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/Symbian/bwins/libcurlu.def b/packages/Symbian/bwins/libcurlu.def
index 4d693a9b..035df135 100644
--- a/packages/Symbian/bwins/libcurlu.def
+++ b/packages/Symbian/bwins/libcurlu.def
@@ -57,4 +57,5 @@ EXPORTS
curl_version_info @ 56 NONAME
curl_easy_recv @ 57 NONAME
curl_easy_send @ 58 NONAME
+ curl_multi_wait @ 59 NONAME
diff --git a/packages/Symbian/eabi/libcurlu.def b/packages/Symbian/eabi/libcurlu.def
index 4d693a9b..035df135 100644
--- a/packages/Symbian/eabi/libcurlu.def
+++ b/packages/Symbian/eabi/libcurlu.def
@@ -57,4 +57,5 @@ EXPORTS
curl_version_info @ 56 NONAME
curl_easy_recv @ 57 NONAME
curl_easy_send @ 58 NONAME
+ curl_multi_wait @ 59 NONAME
diff --git a/packages/Symbian/group/curl.mmp b/packages/Symbian/group/curl.mmp
index b25013c3..28498ce7 100644
--- a/packages/Symbian/group/curl.mmp
+++ b/packages/Symbian/group/curl.mmp
@@ -8,8 +8,44 @@ UID 0x00000000 0xF0206442
SOURCEPATH ../../../src
SOURCE \
- main.c hugehelp.c urlglob.c writeout.c writeenv.c \
- getpass.c homedir.c curlutil.c
+ tool_binmode.c \
+ tool_bname.c \
+ tool_cb_dbg.c \
+ tool_cb_hdr.c \
+ tool_cb_prg.c \
+ tool_cb_rea.c \
+ tool_cb_see.c \
+ tool_cb_wrt.c \
+ tool_cfgable.c \
+ tool_convert.c \
+ tool_dirhie.c \
+ tool_doswin.c \
+ tool_easysrc.c \
+ tool_formparse.c \
+ tool_getparam.c \
+ tool_getpass.c \
+ tool_help.c \
+ tool_helpers.c \
+ tool_homedir.c \
+ tool_hugehelp.c \
+ tool_libinfo.c \
+ tool_main.c \
+ tool_metalink.c \
+ tool_mfiles.c \
+ tool_msgs.c \
+ tool_operate.c \
+ tool_operhlp.c \
+ tool_panykey.c \
+ tool_paramhlp.c \
+ tool_parsecfg.c \
+ tool_setopt.c \
+ tool_sleep.c \
+ tool_urlglob.c \
+ tool_util.c \
+ tool_vms.c \
+ tool_writeenv.c \
+ tool_writeout.c \
+ tool_xattr.c
SOURCEPATH ../../../lib
SOURCE \
diff --git a/packages/Symbian/group/curl.pkg b/packages/Symbian/group/curl.pkg
index dfc994f5..17c64f1e 100644
--- a/packages/Symbian/group/curl.pkg
+++ b/packages/Symbian/group/curl.pkg
@@ -1,4 +1,4 @@
-; curl package defintion file
+; curl package definition file
; Use with makesis to create a Symbian .sis package
;Language - standard language definitions
diff --git a/packages/Symbian/group/libcurl.mmp b/packages/Symbian/group/libcurl.mmp
index c060024f..545cdee9 100644
--- a/packages/Symbian/group/libcurl.mmp
+++ b/packages/Symbian/group/libcurl.mmp
@@ -16,26 +16,31 @@ MACRO BUILDING_LIBCURL
MACRO HAVE_LIBZ
#endif
#ifdef ENABLE_SSL
-MACRO USE_SSLEAY
+MACRO USE_OPENSSL
#endif
SOURCEPATH ../../../lib
SOURCE \
- 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 ssluse.c version.c getenv.c escape.c mprintf.c telnet.c \
- netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.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 curl_rand.c \
- http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c \
- hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
- inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c \
- strdup.c socks.c ssh.c nss.c 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 polarssl.c curl_rtmp.c openldap.c curl_gethostname.c\
- gopher.c
+ 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 vtls/openssl.c version.c getenv.c escape.c mprintf.c telnet.c \
+ netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.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 curl_rand.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 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 \
+ 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 \
+ vtls/axtls.c idn_win32.c http_negotiate_sspi.c vtls/cyassl.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 vtls/schannel.c curl_multibyte.c vtls/darwinssl.c \
+ conncache.c curl_sasl_sspi.c smb.c curl_sasl_gssapi.c \
+ curl_endian.c curl_des.c
USERINCLUDE ../../../lib ../../../include/curl
#ifdef ENABLE_SSL
diff --git a/packages/Symbian/group/libcurl.pkg b/packages/Symbian/group/libcurl.pkg
index 1460a593..6b047975 100644
--- a/packages/Symbian/group/libcurl.pkg
+++ b/packages/Symbian/group/libcurl.pkg
@@ -1,4 +1,4 @@
-; libcurl package defintion file
+; libcurl package definition file
; Use with makesis to create a Symbian .sis package
;Language - standard language definitions
diff --git a/packages/TPF/curl.mak b/packages/TPF/curl.mak
index 6e934046..5ef2ae16 100644
--- a/packages/TPF/curl.mak
+++ b/packages/TPF/curl.mak
@@ -43,7 +43,6 @@ CFLAGS_CURL += -w
# use SSL
# (overrides Curl's lib/config-tpf.h file)
CFLAGS_CURL += -DUSE_OPENSSL
-CFLAGS_CURL += -DUSE_SSLEAY
# disable all protocols except FTP and HTTP
# (overrides Curl's lib/config-tpf.h file)
diff --git a/packages/Win32/Makefile.in b/packages/Win32/Makefile.in
deleted file mode 100644
index eab258a4..00000000
--- a/packages/Win32/Makefile.in
+++ /dev/null
@@ -1,563 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/Win32
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-SUBDIRS = cygwin
-EXTRA_DIST = README
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Win32/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/Win32/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/Win32/cygwin/Makefile.in b/packages/Win32/cygwin/Makefile.in
deleted file mode 100644
index 6a9f1665..00000000
--- a/packages/Win32/cygwin/Makefile.in
+++ /dev/null
@@ -1,466 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/Win32/cygwin
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-EXTRA_DIST = README
-
-#
-# Build a Cygwin binary tar ball
-#
-# Read the README file for details on using this Makefile
-#
-# NOTE: As I'm not particularly familiar with Makefiles, this was the
-# best I could come up with. It should probably be enhanced someday
-# to actually use the correct target and pre-requisite names, etc...
-# If anyone else wants to volunteer, feel free ;-)
-#
-
-# Cygwin build number (default to "1")
-CYGBUILD = 1
-
-# Cygwin tarball build dir (fully-qualified name, gets deleted when done)
-cygwintmp = $(CURDIR)/tmp_binbuild
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Win32/cygwin/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/Win32/cygwin/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-info-am
-
-
-cygwinbin:
- rm -rf $(cygwintmp)
- rm -rf $(cygwintmp)-dev
- $(MAKE) -C $(top_builddir) DESTDIR=$(cygwintmp) install-strip
-# $(STRIP) $(cygwintmp)/usr/bin/cygcurl-?.dll
- $(mkinstalldirs) \
- $(cygwintmp)$(datadir)/doc/Cygwin \
- $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION) \
- $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/libcurl \
- $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples \
- $(cygwintmp)-dev$(mandir)
-#
-# copy some files into the binary install dir
- cp $(srcdir)/README \
- $(cygwintmp)$(datadir)/doc/Cygwin/$(PACKAGE)-$(VERSION)-$(CYGBUILD).README
- cd $(top_srcdir) ; cp CHANGES COPYING README RELEASE-NOTES docs/* \
- $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION) ; pwd
- cd $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION) ; rm *.1 Makefile*
-#
-# copy some files into the -dev install dir, remove some from binary
- cp $(top_srcdir)/docs/libcurl/*.html \
- $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/libcurl
- cp $(top_srcdir)/docs/examples/* \
- $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples
- rm $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples/Makefile*
- cp $(top_srcdir)/docs/examples/Makefile.example \
- $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples
- mv $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION)/BINDINGS \
- $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)
- mv $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION)/INTERNALS \
- $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)
- mv $(cygwintmp)/usr/include $(cygwintmp)-dev/usr
- mv $(cygwintmp)/usr/lib $(cygwintmp)-dev/usr
- mv $(cygwintmp)$(mandir)/man3 $(cygwintmp)-dev$(mandir)
-#
-# create both tar files, and delete tmp folders
- cd $(cygwintmp) ; tar cjf \
- $(PACKAGE)-$(VERSION)-$(CYGBUILD).tar.bz2 usr
- mv $(cygwintmp)/*.tar.bz2 . && rm -rf $(cygwintmp)
-#
- cd $(cygwintmp)-dev ; tar cjf \
- $(PACKAGE)-devel-$(VERSION)-$(CYGBUILD).tar.bz2 usr
- mv $(cygwintmp)-dev/*.tar.bz2 . && rm -rf $(cygwintmp)-dev
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/vms/Makefile.am b/packages/vms/Makefile.am
index b6f09398..38f65859 100644
--- a/packages/vms/Makefile.am
+++ b/packages/vms/Makefile.am
@@ -1,17 +1,36 @@
-EXTRA_DIST = build_vms.com \
- config-vms.h \
+EXTRA_DIST = \
+ backup_gnv_curl_src.com \
+ build_curl-config_script.com \
+ build_gnv_curl.com \
+ build_gnv_curl_pcsi_desc.com \
+ build_gnv_curl_pcsi_text.com \
+ build_gnv_curl_release_notes.com \
+ build_libcurl_pc.com \
+ build_vms.com \
+ clean_gnv_curl.com \
+ compare_curl_source.com \
+ config_h.com \
+ curl_crtl_init.c \
+ curl_gnv_build_steps.txt \
+ curl_release_note_start.txt \
+ curl_startup.com \
curlmsg.h \
curlmsg.msg \
curlmsg.sdl \
curlmsg_vms.h \
- hpssl_alpha.opt \
- hpssl_ia64.opt \
- hpssl_vax.opt \
- ldap.opt \
- openssl_alpha.opt \
- openssl_ia64.opt \
- openssl_vax.opt \
- openssl_ssl_alpha.opt \
- openssl_ssl_ia64.opt \
- openssl_ssl_vax.opt \
- readme
+ generate_config_vms_h_curl.com \
+ generate_vax_transfer.com \
+ gnv_conftest.c_first \
+ gnv_curl_configure.sh \
+ gnv_libcurl_symbols.opt \
+ gnv_link_curl.com \
+ macro32_exactcase.patch \
+ make_gnv_curl_install.sh \
+ make_pcsi_curl_kit_name.com \
+ pcsi_gnv_curl_file_list.txt \
+ pcsi_product_gnv_curl.com \
+ readme \
+ report_openssl_version.c \
+ setup_gnv_curl_build.com \
+ stage_curl_install.com \
+ vms_eco_level.h
diff --git a/packages/vms/Makefile.in b/packages/vms/Makefile.in
deleted file mode 100644
index 3e83ae5d..00000000
--- a/packages/vms/Makefile.in
+++ /dev/null
@@ -1,422 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/vms
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-EXTRA_DIST = build_vms.com \
- config-vms.h \
- curlmsg.h \
- curlmsg.msg \
- curlmsg.sdl \
- curlmsg_vms.h \
- hpssl_alpha.opt \
- hpssl_ia64.opt \
- hpssl_vax.opt \
- ldap.opt \
- openssl_alpha.opt \
- openssl_ia64.opt \
- openssl_vax.opt \
- openssl_ssl_alpha.opt \
- openssl_ssl_ia64.opt \
- openssl_ssl_vax.opt \
- readme
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/vms/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/vms/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/vms/backup_gnv_curl_src.com b/packages/vms/backup_gnv_curl_src.com
new file mode 100644
index 00000000..38575710
--- /dev/null
+++ b/packages/vms/backup_gnv_curl_src.com
@@ -0,0 +1,132 @@
+$! File: Backup_gnv_curl_src.com
+$!
+$! $Id$
+$!
+$! Procedure to create backup save sets for installing in a PCSI kit.
+$!
+$! To comply with most Open Source licenses, the source used for building
+$! a kit will be packaged with the distribution kit for the binary.
+$!
+$! Backup save sets are the only storage format that I can expect a
+$! VMS system to be able to extract ODS-5 filenames and directories.
+$!
+$! The make_pcsi_kit_name.com needs to be run before this procedure to
+$! properly name the files that will be created.
+$!
+$! This file is created from a template file for the purpose of making it
+$! easier to port Unix code, particularly open source code to VMS.
+$! Therefore permission is freely granted for any use.
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 13-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$!
+$ if arch_code .nes. "V"
+$ then
+$ set proc/parse=extended
+$ endif
+$!
+$ ss_abort = 44
+$ status = ss_abort
+$!
+$ 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
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_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."
+$ goto all_exit
+$ endif
+$!
+$ node_swvers = f$getsyi("NODE_SWVERS")
+$ node_swvers_type = f$extract(0, 1, node_swvers)
+$ node_swvers_vers = f$extract(1, f$length(node_swvers), node_swvers)
+$ swvers_maj = f$element(0, ".", node_swvers_vers)
+$ node_swvers_min_update = f$element(1, ".", node_swvers_vers)
+$ swvers_min = f$element(0, "-", node_swvers_min_update)
+$ swvers_update = f$element(1, "-", node_swvers_min_update)
+$!
+$ if swvers_update .eqs. "-" then swvers_update = ""
+$!
+$ vms_vers = f$fao("!2ZB!2ZB!AS", 'swvers_maj', 'swvers_min', swvers_update)
+$!
+$!
+$!
+$! If available make an interchange save set
+$!-------------------------------------------
+$ interchange = ""
+$ if arch_code .eqs. "V"
+$ then
+$ interchange = "/interchange"
+$ endif
+$ if (swvers_maj .ges. "8") .and. (swvers_min .ges. 4)
+$ then
+$ interchange = "/interchange/noconvert"
+$ endif
+$!
+$!
+$! Move to the base directories
+$ set def [--]
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$ current_default = f$environment("DEFAULT")
+$ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
+$!
+$ src_root = "src_root:"
+$ if f$trnlnm("src_root1") .nes. "" then src_root = "src_root1:"
+$ backup'interchange' 'src_root'[curl...]*.*;0 -
+ 'filename_base'_original_src.bck/sav
+$ status = $status
+$!
+$! There may be a VMS specific source kit
+$!-----------------------------------------
+$ vms_root = "vms_root:"
+$ if f$trnlnm("vms_root1") .nes. "" then vms_root = "vms_root1:"
+$ files_found = 0
+$ define/user sys$error nl:
+$ define/user sys$output nl:
+$ directory 'vms_root'[...]*.*;*/exc=*.dir
+$ if '$severity' .eq. 1 then files_found = 1
+$!
+$ if files_found .eq. 1
+$ then
+$ backup'interchange' 'vms_root'[curl...]*.*;0 -
+ 'filename_base'_vms_src.bck/sav
+$ status = $status
+$ endif
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit
diff --git a/packages/vms/build_curl-config_script.com b/packages/vms/build_curl-config_script.com
new file mode 100644
index 00000000..ea1881d2
--- /dev/null
+++ b/packages/vms/build_curl-config_script.com
@@ -0,0 +1,154 @@
+$! build_curl-config_script.com
+$!
+$! This generates the curl-config. script from the curl-config.in file.
+$!
+$! Copyright 2014, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 16-Dec-2014 J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Skip this if the curl-config. already exists.
+$ if f$search("[--]curl-config.") .nes. "" then goto all_exit
+$!
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$ arch_name = "VAX"
+$ else
+$ arch_name = ""
+$ 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
+$ if line_in .eqs. "" then goto version_loop
+$ if f$locate("#define LIBCURL_VERSION ", line_in) .eq. 0
+$ then
+$ x_curlversion = f$element(2," ", line_in) - """" - """"
+$ i = i + 1
+$ endif
+$ if f$locate("#define LIBCURL_VERSION_NUM ", line_in) .eq. 0
+$ then
+$ x_versionnum = f$element(2," ", line_in) - """" - """"
+$ i = i + 1
+$ endif
+$ if i .lt 2 then goto version_loop
+$ version_loop_end:
+$ close vhf
+$!
+$ kit_type = "V"
+$ if f$locate("-", x_curlversion) .lt. f$length(x_curlversion)
+$ then
+$ kit_type = "D"
+$ x_prefix = "/beta"
+$ x_exec_prefix = "/beta"
+$ endif
+$!
+$ 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
+$!
+$!
+$ 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
diff --git a/packages/vms/build_gnv_curl.com b/packages/vms/build_gnv_curl.com
new file mode 100644
index 00000000..1eaa7d5f
--- /dev/null
+++ b/packages/vms/build_gnv_curl.com
@@ -0,0 +1,38 @@
+$! File: build_gnv_curl.com
+$!
+$! $Id$
+$!
+$! All in one build procedure
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 11-Jun-2009 J. Malmberg
+$!-----------------------------------------------------------------------
+$!
+$ @setup_gnv_curl_build.com
+$!
+$ bash gnv_curl_configure.sh
+$!
+$ @clean_gnv_curl.com
+$!
+$ bash make_gnv_curl_install.sh
+$!
+$ @gnv_link_curl.com
+$!
+$ purge new_gnu:[*...]/log
+$!
+$!
+$exit
diff --git a/packages/vms/build_gnv_curl_pcsi_desc.com b/packages/vms/build_gnv_curl_pcsi_desc.com
new file mode 100644
index 00000000..572b9b8b
--- /dev/null
+++ b/packages/vms/build_gnv_curl_pcsi_desc.com
@@ -0,0 +1,488 @@
+$! File: Build_GNV_CURL_PCSI_DESC.COM
+$!
+$! $Id$
+$!
+$! Build the *.pcsi$text file in the following sections:
+$! Required software dependencies.
+$! install/upgrade/postinstall steps.
+$! 1. Duplicate filenames need an alias procedure. (N/A for curl)
+$! 2. ODS-5 filenames need an alias procedure. (N/A for curl)
+$! 3. Special alias links for executables (curl. -> curl.exe)
+$! if a lot, then an alias procedure is needed.
+$! 4. Rename the files to lowercase.
+$! Move Release Notes to destination
+$! Source kit option
+$! Create directory lines
+$! Add file lines for curl.
+$! Add Link alias procedure file (N/A for curl)
+$! Add [.SYS$STARTUP]curl_startup file
+$! Add Release notes file.
+$!
+$! The file PCSI_GNV_CURL_FILE_LIST.TXT is read in to get the files other
+$! than the release notes file and the source backup file.
+$!
+$! The PCSI system can really only handle ODS-2 format filenames and
+$! assumes that there is only one source directory. It also assumes that
+$! all destination files with the same name come from the same source file.
+$! Fortunately CURL does not trip most of these issues, so those steps
+$! above are marked N/A.
+$!
+$! A rename action section is needed to make sure that the files are
+$! created in the GNV$GNU: in the correct case, and to create the alias
+$! link [usr.bin]curl. for [usr.bin]curl.exe.
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$ 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
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_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."
+$ 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")
+$!
+$!
+$ product_line = "product ''producer' ''base' ''product'"
+$ if updatepatch .eqs. ""
+$ then
+$ product_name = " ''majorver'.''minorver'"
+$ else
+$ product_name = " ''majorver'.''minorver'-''updatepatch'"
+$ endif
+$ product_line = product_line + " ''product_name' full;"
+$!write sys$output product_line
+$!
+$!
+$!
+$! Create the file as a VMS text file.
+$!----------------------------------------
+$ base_file = kit_name
+$ create 'base_file'.pcsi$desc
+$!
+$!
+$! Start building file.
+$!----------------------
+$ open/append pdsc 'base_file'.pcsi$desc
+$!
+$ write pdsc product_line
+$!
+$! Required product dependencies.
+$!----------------------------------
+$ vmsprd = "DEC"
+$ if base .eqs. "I64VMS" then vmsprd = "HP"
+$!
+$ write pdsc " software ''vmsprd' ''base' VMS ;"
+$ arch_type = f$getsyi("ARCH_NAME")
+$ node_swvers = f$getsyi("node_swvers")
+$ vernum = f$extract(1, f$length(node_swvers), node_swvers)
+$ majver = f$element(0, ".", vernum)
+$ minverdash = f$element(1, ".", vernum)
+$ minver = f$element(0, "-", minverdash)
+$ dashver = f$element(1, "-", minverdash)
+$ if dashver .eqs. "-" then dashver = ""
+$ vmstag = majver + minver + dashver
+$ code = f$extract(0, 1, arch_type)
+$ arch_code = f$extract(0, 1, arch_type)
+$ write pdsc -
+ " if (not <software ''vmsprd' ''base' VMS version minimum ''node_swvers'>) ;"
+$ write pdsc " error NEED_VMS''vmstag';"
+$ write pdsc " end if;"
+$!
+$write pdsc " software VMSPORTS ''base' ZLIB ;"
+$write pdsc -
+ " if (not <software VMSPORTS ''base' ZLIB version minimum V1.2-8>) ;"
+$write pdsc " error NEED_ZLIB;"
+$write pdsc " end if;"
+$!
+$!
+$!
+$! install/upgrade/postinstall steps.
+$!-----------------------------------
+$! 1. Duplicate filenames need an alias procedure. (N/A for curl)
+$! 2. ODS-5 filenames need an alias procedure. (N/A for curl)
+$! 3. Special alias links for executables (curl. -> curl.exe)
+$! if a lot, then an alias procedure is needed.
+$! 4. Rename the files to lowercase.
+$!
+$!
+$! Alias links needed.
+$!-------------------------
+$ add_alias_lines = ""
+$ rem_alias_lines = ""
+$ line_out = ""
+$!
+$! Read through the file list to set up aliases and rename commands.
+$!---------------------------------------------------------------------
+$ open/read flst pcsi_gnv_curl_file_list.txt
+$!
+$inst_alias_loop:
+$ read/end=inst_alias_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto inst_alias_loop
+$ pathname = f$element(0, " ", line_in)
+$ linkflag = f$element(1, " ", line_in)
+
+$ if linkflag .nes. "->" then goto inst_alias_write
+$!
+$ linktarget = f$element(2, " ", line_in)
+$ if kit_type .eqs. "D"
+$ then
+$ old_start = f$locate("[gnv.usr", pathname)
+$ if old_start .lt. f$length(pathname)
+$ then
+$ pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$ linktarget = "[gnv.beta" + linktarget - "[gnv.usr"
+$ endif
+$ endif
+$ nlink = "pcsi$destination:" + pathname
+$ ntarg = "pcsi$destination:" + linktarget
+$ new_add_alias_line = -
+ """if f$search(""""''nlink'"""") .eqs. """""""" then" + -
+ " set file/enter=''nlink' ''ntarg'"""
+$ if add_alias_lines .nes. ""
+$ then
+$ add_alias_lines = add_alias_lines + "," + new_add_alias_line
+$ else
+$ add_alias_lines = new_add_alias_line
+$ endif
+$!
+$ new_rem_alias_line = -
+ """if f$search(""""''nlink'"""") .nes. """""""" then" + -
+ " set file/remove ''nlink';"""
+$ if rem_alias_lines .nes. ""
+$ then
+$ rem_alias_lines = rem_alias_lines + "," + new_rem_alias_line
+$ else
+$ rem_alias_lines = new_rem_alias_line
+$ endif
+$!
+$ goto inst_alias_loop
+$!
+$inst_alias_write:
+$!
+$! execute install / remove
+$ write pdsc " execute install ("
+$! add aliases
+$ i = 0
+$ex_ins_loop:
+$ line = f$element(i, ",", add_alias_lines)
+$ i = i + 1
+$ if line .eqs. "" then goto ex_ins_loop
+$ if line .eqs. "," then goto ex_ins_loop_end
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = line
+$ goto ex_ins_loop
+$ex_ins_loop_end:
+$ write pdsc line_out
+$ line_out = ""
+$ write pdsc " )"
+$ write pdsc " remove ("
+$! remove aliases
+$ i = 0
+$ex_rem_loop:
+$ line = f$element(i, ",", rem_alias_lines)
+$ i = i + 1
+$ if line .eqs. "" then goto ex_rem_loop
+$ if line .eqs. "," then goto ex_rem_loop_end
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = line
+$ goto ex_rem_loop
+$ex_rem_loop_end:
+$ write pdsc line_out
+$ line_out = ""
+$ write pdsc " ) ;"
+$!
+$! execute upgrade
+$ write pdsc " execute upgrade ("
+$ i = 0
+$ex_upg_loop:
+$ line = f$element(i, ",", rem_alias_lines)
+$ i = i + 1
+$ if line .eqs. "" then goto ex_upg_loop
+$ if line .eqs. "," then goto ex_upg_loop_end
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = line
+$ goto ex_upg_loop
+$ex_upg_loop_end:
+$ write pdsc line_out
+$ line_out = ""
+$! remove aliases
+$ write pdsc " ) ;"
+$!
+$! execute postinstall
+$ write pdsc " execute postinstall ("
+$ if arch_code .nes. "V"
+$ then
+$ line_out = " ""set process/parse=extended"""
+$ endif
+$ i = 0
+$ex_pins_loop:
+$ line = f$element(i, ",", add_alias_lines)
+$ i = i + 1
+$ if line .eqs. "" then goto ex_pins_loop
+$ if line .eqs. "," then goto ex_pins_loop_end
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = line
+$ goto ex_pins_loop
+$ex_pins_loop_end:
+$ if line_out .eqs. "" then line_out = " ""continue"""
+$! write pdsc line_out
+$! line_out = ""
+$! add aliases and follow with renames.
+$!
+$goto inst_dir
+$!
+$inst_dir_loop:
+$ read/end=inst_alias_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto inst_dir_loop
+$inst_dir:
+$ pathname = f$element(0, " ", line_in)
+$ if kit_type .eqs. "D"
+$ then
+$ if pathname .eqs. "[gnv]usr.dir"
+$ then
+$ pathname = "[gnv]beta.dir"
+$ else
+$ old_start = f$locate("[gnv.usr", pathname)
+$ if old_start .lt. f$length(pathname)
+$ then
+$ pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$ endif
+$ endif
+$ endif
+$!
+$! Ignore the directory entries for now.
+$!-----------------------------------------
+$ filedir = f$parse(pathname,,,"DIRECTORY")
+$ if pathname .eqs. filedir then goto inst_dir_loop
+$!
+$! process .dir extensions for rename
+$! If this is not a directory then start processing files.
+$!-------------------------
+$ filetype = f$parse(pathname,,,"TYPE")
+$ filetype_u = f$edit(filetype, "upcase")
+$ filename = f$parse(pathname,,,"NAME")
+$ if filetype_u .nes. ".DIR" then goto inst_file
+$!
+$! process directory lines for rename.
+$!--------------------------------------
+$ if line_out .nes. ""
+$ then
+$ write pdsc line_out,","
+$ line_out = ""
+$ endif
+$ if arch_code .nes. "V"
+$ then
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = " ""rename pcsi$destination:''pathname' ''filename'.DIR"""
+$ else
+$ if line_out .nes. "" then write pdsc line_out
+$ line_out = ""
+$ endif
+$ goto inst_dir_loop
+$!
+$!
+$! process file lines for rename
+$!---------------------------------
+$inst_file_loop:
+$ read/end=inst_alias_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto inst_dir_loop
+$ pathname = f$element(0, " ", line_in)
+$ if kit_type .eqs. "D"
+$ then
+$ if pathname .eqs. "[gnv]usr.dir"
+$ then
+$ pathname = "[gnv]beta.dir"
+$ else
+$ old_start = f$locate("[gnv.usr", pathname)
+$ if old_start .lt. f$length(pathname)
+$ then
+$ pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$ endif
+$ endif
+$ endif
+$!
+$! Filenames with $ in them are VMS special and do not need to be lowercased.
+$! --------------------------------------------------------------------------
+$ if f$locate("$", pathname) .lt. f$length(pathname) then goto inst_file_loop
+$!
+$ filetype = f$parse(pathname,,,"TYPE")
+$ filename = f$parse(pathname,,,"NAME") + filetype
+$inst_file:
+$ if arch_code .nes. "V"
+$ then
+$ if line_out .nes. "" then write pdsc line_out,","
+$ filetype = f$parse(pathname,,,"TYPE")
+$ filename = f$parse(pathname,,,"NAME") + filetype
+$ line_out = " ""rename pcsi$destination:''pathname' ''filename'"""
+$ else
+$ if line_out .nes. "" then write pdsc line_out
+$ line_out = ""
+$ endif
+$ goto inst_file_loop
+$!
+$inst_alias_loop_end:
+$!
+$write pdsc line_out
+$write pdsc " ) ;"
+$close flst
+$!
+$! Move Release Notes to destination
+$!-------------------------------------
+$write pdsc " information RELEASE_NOTES phase after ;"
+$!
+$! Source kit option
+$!---------------------
+$write pdsc " option SOURCE default 0;"
+$write pdsc " directory ""[gnv.common_src]"" PROTECTION PUBLIC ;"
+$write pdsc -
+ " file ""[gnv.common_src]''filename_base'_original_src.bck"""
+$write pdsc -
+ " source [common_src]''filename_base'_original_src.bck ;"
+$if f$search("gnv$gnu:[vms_src]''filename_base'_vms_src.bck") .nes. ""
+$then
+$ write pdsc " directory ""[gnv.vms_src]"" PROTECTION PUBLIC ;"
+$ write pdsc " file ""[gnv.vms_src]''filename_base'_vms_src.bck"""
+$ write pdsc " source [vms_src]''filename_base'_vms_src.bck ;"
+$endif
+$write pdsc " end option;"
+$!
+$!
+$! Read through the file list again.
+$!----------------------------------
+$open/read flst pcsi_gnv_curl_file_list.txt
+$!
+$!
+$! Create directory lines
+$!-------------------------
+$flst_dir_loop:
+$ read/end=flst_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto flst_dir_loop
+$!
+$ filename = f$element(0, " ", line_in)
+$ linkflag = f$element(1, " ", line_in)
+$ if linkflag .eqs. "->" then goto flst_dir_loop
+$!
+$! Ignore .dir extensions
+$!-------------------------
+$ filetype = f$edit(f$parse(filename,,,"TYPE"), "upcase")
+$ if filetype .eqs. ".DIR" then goto flst_dir_loop
+$!
+$ destname = filename
+$ if kit_type .eqs. "D"
+$ then
+$ old_start = f$locate("[gnv.usr", destname)
+$ if old_start .lt. f$length(destname)
+$ then
+$ destname = "[gnv.beta" + destname - "[gnv.usr"
+$ endif
+$ endif
+$!
+$! It should be just a directory then.
+$!-------------------------------------
+$ filedir = f$edit(f$parse(filename,,,"DIRECTORY"), "lowercase")
+$! If this is not a directory then start processing files.
+$!---------------------------------------------------------
+$ if filename .nes. filedir then goto flst_file
+$!
+$ write pdsc " directory ""''destname'"" PROTECTION PUBLIC ;"
+$ goto flst_dir_loop
+$!
+$!
+$! Add file lines for curl.
+$!---------------------------
+$flst_file_loop:
+$ read/end=flst_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto inst_file_loop
+$ filename = f$element(0, " ", line_in)
+$ destname = filename
+$ if kit_type .eqs. "D"
+$ then
+$ old_start = f$locate("[gnv.usr", destname)
+$ if old_start .lt. f$length(destname)
+$ then
+$ destname = "[gnv.beta" + destname - "[gnv.usr"
+$ endif
+$ endif
+$flst_file:
+$ srcfile = filename - "gnv."
+$ write pdsc " file ""''destname'"" "
+$ write pdsc " source ""''srcfile'"" ;"
+$ goto flst_file_loop
+$!
+$flst_loop_end:
+$ close flst
+$!
+$! Add Link alias procedure file (N/A for curl)
+$!------------------------------------------------
+$!
+$! Add [.SYS$STARTUP]curl_startup file
+$!---------------------------------------
+$ if kit_type .eqs. "D"
+$ then
+$ write pdsc " file ""[sys$startup]curl_daily_startup.com"""
+$ else
+$ write pdsc " file ""[sys$startup]curl_startup.com"""
+$ endif
+$ write pdsc " source [usr.lib]curl_startup.com ;"
+$!
+$! Add Release notes file.
+$!------------------------------
+$ write pdsc -
+ " file ""[SYSHLP]''filename_base'.release_notes"" release notes ;"
+$!
+$! Close the product file
+$!------------------------
+$ write pdsc "end product;"
+$!
+$close pdsc
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl_pcsi_text.com b/packages/vms/build_gnv_curl_pcsi_text.com
new file mode 100644
index 00000000..df98f630
--- /dev/null
+++ b/packages/vms/build_gnv_curl_pcsi_text.com
@@ -0,0 +1,198 @@
+$! File: Build_GNV_curl_pcsi_text.com
+$!
+$! $Id$
+$!
+$! Build the *.pcsi$text file from the four components:
+$! 1. Generated =product header section
+$! 2. [--]readme. file from the Curl distribution, modified to fit
+$! a pcsi$text file format.
+$! 3. [--]copying file from the Curl distribution, modified to fit
+$! a pcsi$text file format.
+$! 4. Generated Producer section.
+$!
+$! Set the name of the release notes from the GNV_PCSI_FILENAME_BASE
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$ 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
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_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 = ""
+$!
+$!
+$ product_line = "=product ''producer' ''base' ''product'"
+$ if updatepatch .eqs. ""
+$ then
+$ product_name = " ''majorver'.''minorver'"
+$ else
+$ product_name = " ''majorver'.''minorver'-''updatepatch'"
+$ endif
+$ product_line = product_line + " ''product_name' full"
+$!
+$!
+$! If this is VAX and the file is on NFS, the names may be mangled.
+$!-----------------------------------------------------------------
+$ readme_file = ""
+$ if f$search("[--]readme.") .nes. ""
+$ then
+$ readme_file = "[--]readme."
+$ else
+$ if f$search("[--]$README.") .nes. ""
+$ then
+$ readme_file = "[--]$README."
+$ else
+$ write sys$output "Can not find readme file."
+$ goto all_exit
+$ endif
+$ endif
+$ copying_file = ""
+$ if f$search("[--]copying.") .nes. ""
+$ then
+$ copying_file = "[--]copying."
+$ else
+$ if f$search("[--]$COPYING.") .nes. ""
+$ then
+$ copying_file = "[--]$COPYING."
+$ else
+$ write sys$output "Can not find copying file."
+$ goto all_exit
+$ endif
+$ endif
+$!
+$! Create the file as a VMS text file.
+$!----------------------------------------
+$ base_file = kit_name
+$ create 'base_file'.pcsi$text
+$!
+$!
+$! Start building file.
+$!----------------------
+$ open/append ptxt 'base_file'.pcsi$text
+$ write ptxt product_line
+$!
+$!
+$! First insert the Readme file.
+$!
+$ open/read rf 'readme_file'
+$!
+$ write ptxt "1 'PRODUCT"
+$ write ptxt "=prompt ''producter' ''product' for OpenVMS"
+$!
+$rf_loop:
+$ read/end=rf_loop_end rf line_in
+$ if line_in .nes. ""
+$ then
+$! PCSI files use the first character in for their purposes.
+$!--------------------------------------------------------------
+$ first_char = f$extract(0, 1, line_in)
+$ if first_char .nes. " " then line_in = " " + line_in
+$ endif
+$ write ptxt line_in
+$ goto rf_loop
+$rf_loop_end:
+$ close rf
+$!
+$!
+$! Now add in the copying file
+$!--------------------------------
+$ write ptxt ""
+$ write ptxt "1 'NOTICE"
+$ write ptxt ""
+$!
+$ open/read cf 'copying_file'
+$!
+$cf_loop:
+$ read/end=cf_loop_end cf line_in
+$ if line_in .nes. ""
+$ then
+$! PCSI files use the first character in for their purposes.
+$!--------------------------------------------------------------
+$ first_char = f$extract(0, 1, line_in)
+$ if first_char .nes. " " then line_in = " " + line_in
+$ endif
+$ write ptxt line_in
+$ goto cf_loop
+$cf_loop_end:
+$ close cf
+$!
+$! Now we need the rest of the boiler plate.
+$!--------------------------------------------
+$ write ptxt ""
+$ write ptxt "1 'PRODUCER"
+$ write ptxt "=prompt ''producer_full_name'"
+$ write ptxt -
+ "This software product is provided by ''producer_full_name' with no warranty."
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ node_swvers = f$getsyi("node_swvers")
+$ vernum = f$extract(1, f$length(node_swvers), node_swvers)
+$ majver = f$element(0, ".", vernum)
+$ minverdash = f$element(1, ".", vernum)
+$ minver = f$element(0, "-", minverdash)
+$ dashver = f$element(1, "-", minverdash)
+$ if dashver .eqs. "-" then dashver = ""
+$ vmstag = majver + minver + dashver
+$ code = f$extract(0, 1, arch_type)
+$!
+$ write ptxt "1 NEED_VMS''vmstag'"
+$ write ptxt -
+ "=prompt OpenVMS ''vernum' or later is not installed on your system."
+$ write ptxt "This product requires OpenVMS ''vernum' or later to function."
+$ write ptxt "1 NEED_ZLIB"
+$ write ptxt "=prompt ZLIB 1.2-8 or later is not installed on your system."
+$ write ptxt "This product requires ZLIB 1.2-8 or later to function."
+$ write ptxt "1 SOURCE"
+$ write ptxt "=prompt Source modules for ''product'"
+$ write ptxt "The Source modules for ''product' will be installed."
+$ write ptxt "1 RELEASE_NOTES"
+$ write ptxt "=prompt Release notes are available in the [SYSHLP] directory."
+$!
+$ close ptxt
+$!
+$!
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl_release_notes.com b/packages/vms/build_gnv_curl_release_notes.com
new file mode 100644
index 00000000..da0276f5
--- /dev/null
+++ b/packages/vms/build_gnv_curl_release_notes.com
@@ -0,0 +1,102 @@
+$! File: Build_GNV_curl_release_notes.com
+$!
+$! $Id$
+$!
+$! Build the release note file from the four components:
+$! 1. The curl_release_note_start.txt
+$! 2. The hp_ssl_release_info.txt
+$! 3. [--]readme. file from the Curl distribution.
+$! 4. The Curl_gnv-build_steps.txt.
+$!
+$! Set the name of the release notes from the GNV_PCSI_FILENAME_BASE
+$! logical name.
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 14-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$ base_file = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if base_file .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$!
+$!
+$ curl_readme = f$search("sys$disk:[--]readme.")
+$ if curl_readme .eqs. ""
+$ then
+$ curl_readme = f$search("sys$disk:[--]$README.")
+$ endif
+$ if curl_readme .eqs. ""
+$ then
+$ write sys$output "Can not find Curl readme file."
+$ goto all_exit
+$ endif
+$!
+$ curl_copying = f$search("sys$disk:[--]copying.")
+$ if curl_copying .eqs. ""
+$ then
+$ curl_copying = f$search("sys$disk:[--]$COPYING.")
+$ endif
+$ if curl_copying .eqs. ""
+$ then
+$ write sys$output "Can not find Curl copying file."
+$ goto all_exit
+$ endif
+$!
+$ vms_readme = f$search("sys$disk:[]readme.")
+$ if vms_readme .eqs. ""
+$ then
+$ vms_readme = f$search("sys$disk:[]$README.")
+$ endif
+$ if vms_readme .eqs. ""
+$ then
+$ write sys$output "Can not find VMS specific Curl readme file."
+$ goto all_exit
+$ endif
+$!
+$ curl_release_notes = f$search("sys$disk:[--]release-notes.")
+$ if curl_release_notes .eqs. ""
+$ then
+$ curl_release_notes = f$search("sys$disk:[--]$RELEASE-NOTES.")
+$ endif
+$ if curl_release_notes .eqs. ""
+$ then
+$ write sys$output "Can not find Curl release-notes file."
+$ goto all_exit
+$ endif
+$!
+$ if f$search("sys$disk:[]hp_ssl_release_info.txt") .eqs. ""
+$ then
+$ write sys$output "GNV_LINK_CURL.COM has not been run!"
+$ goto all_exit
+$ endif
+$!
+$ type/noheader 'curl_readme', 'vms_readme', -
+ 'curl_release_notes', -
+ sys$disk:[]curl_release_note_start.txt, -
+ sys$disk:[]hp_ssl_release_info.txt, -
+ 'curl_copying', -
+ sys$disk:[]curl_gnv_build_steps.txt -
+ /out='base_file'.release_notes
+$!
+$ purge 'base_file'.release_notes
+$ rename 'base_file.release_notes ;1
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_libcurl_pc.com b/packages/vms/build_libcurl_pc.com
new file mode 100644
index 00000000..97e6ae64
--- /dev/null
+++ b/packages/vms/build_libcurl_pc.com
@@ -0,0 +1,205 @@
+$! File: build_libcurl_pc.com
+$!
+$! $Id:$
+$!
+$! Build the libcurl.pc file from the libcurl.pc.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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2013 J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Skip this if the libcurl.pc already exists.
+$ if f$search("[--]libcurl.pc") .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")
+$!
+$ pc_file_in = "[--]libcurl^.pc.in"
+$!
+$ if f$search(pc_file_in) .eqs. ""
+$ then
+$ pc_file_in = "[--]libcurl.pc$5nin"
+$ if f$search(pc_file_in) .eqs. ""
+$ then
+$ pc_file_in = "[--]libcurl.pc_in"
+$ if f$search(pc_file_in) .eqs. ""
+$ then
+$ write sys$output "Can not find libcurl.pc.in."
+$ goto all_exit
+$ endif
+$ endif
+$ endif
+$!
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$ arch_name = "VAX"
+$ else
+$ arch_name = ""
+$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$ if (arch_name .eqs. "") then arch_name = "UNK"
+$ endif
+$!
+$!
+$ curl_version = "0.0.0"
+$ open/read vf [--.src]tool_version.h
+$version_loop:
+$ read vf/end=version_loop_end line_in
+$ if line_in .eqs. "" then goto version_loop
+$ key = f$element(0, " ", line_in)
+$ if key .nes. "#define" then goto version_loop
+$ name = f$element(1, " ", line_in)
+$ if name .eqs. "VERSION"
+$ then
+$ curl_version = f$element(2, " ", line_in) - """" - """"
+$ else
+$ goto version_loop
+$ endif
+$version_loop_end:
+$ close vf
+$!
+$!
+$ create [--]libcurl.pc
+$ open/append pco [--]libcurl.pc
+$ open/read pci 'pc_file_in'
+$pc_file_loop:
+$ read pci/end=pc_file_loop_end line_in
+$!
+$! blank lines
+$ if line_in .eqs. ""
+$ then
+$ write pco ""
+$ goto pc_file_loop
+$ endif
+$!
+$! comment lines
+$ key = f$extract(0, 1, line_in)
+$ if key .eqs. "#"
+$ then
+$ write pco line_in
+$ goto pc_file_loop
+$ endif
+$!
+$! Special handling for libs.
+$ if f$locate("Libs:", line_in) .eq. 0
+$ then
+$ write pco "#",line_in
+$ goto pc_file_loop
+$ endif
+$! No substitution line
+$ line_in_len = f$length(line_in)
+$ if f$locate("@", line_in) .ge. line_in_len
+$ then
+$ write pco line_in
+$ goto pc_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 pc_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 pc_file_loop
+$ endif
+$ if f$locate("@libdir@", line_in) .lt line_in_len
+$ then
+$ write pco "libdir=$(exec_prefix}/lib"
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@includedir@", line_in) .lt line_in_len
+$ then
+$ write pco "includedir=$(prefix}/include"
+$ goto pc_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 "supported_protocols=""" + proto + """"
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@SUPPORT_FEATURES@", line_in) .lt line_in_len
+$ then
+$ if arch_name .eqs. "VAX"
+$ then
+$ write pco "supported_features=""SSL libz NTLM"""
+$ else
+$ write pco "supported_features=""SSL IPv6 libz NTLM"""
+$ endif
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@CURLVERSION@", line_in) .lt line_in_len
+$ then
+$ write pco "Version: ''curl_version'"
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
+$ then
+$ if arch_name .eqs. "VAX"
+$ then
+$ write pco "Libs.private: -lssl -lcrypto -lz"
+$ else
+$ write pco "Libs.private: -lssl -lcrypto -lgssapi -lz"
+$ endif
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@CPPFLAG_CURL_STATICLIB@", line_in) .lt line_in_len
+$ then
+$ write pco "Cflags: -I${includedir} -DCURL_STATICLIB"
+$ goto pc_file_loop
+$ endif
+$!
+$pc_file_loop_end:
+$ close pco
+$ close pci
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_vms.com b/packages/vms/build_vms.com
index 68d9f002..e21e57c4 100644
--- a/packages/vms/build_vms.com
+++ b/packages/vms/build_vms.com
@@ -18,16 +18,43 @@ $! CLEAN_ALL Delete product files for all host architectures. (No
$! build done.)
$!
$! 64 Compile with 64-bit pointers.
+$! Note, you must match the pointer size that the OpenSSL
+$! shared image expects.
+$! Currently curl is not building properly with 64 bit pointers
+$! on VMS because it is trying to cast pointers to 32 bit
+$! integers and some OpenVMS library routines called by curl
+$! do not yet support 64 bit pointers.
$! CCQUAL=x Add "x" to the C compiler qualifiers.
-$! DEBUG Compile and link with debug.
-$! IEEE Use IEEE floating point. (Alpha.)
-$! LARGE Enable large-file support. (Non-VAX, VMS >= V7.2.)
-$! LDAP Enable LDAP support.
+$! Default qualifiers are:
+$! /standard=relaxed
+$! /names=(as_is, shortened)
+$! /repository=[.'arch']
+$! /nested_include_directory=none
+$! /define=(_LARGEFILE=1,_USE_STD_STAT=1) (non-vax)
+$! /float=ieee/ieee_mode=denorm_results (non-vax)
+$! DEBUG Compile debug and nooptimize
+$! Alpha/IA64 always compiles /debug.
+$! Always link a debug image.
+$! NOIEEE Do not use IEEE floating point. (Alpha/I64)
+$! VAX must always use DFLOAT
+$! NOLARGE Disable large-file support if large file support available.
+$! (Non-VAX, VMS >= V7.2.)
+$! NOLDAP Disable LDAP support if LDAP is available.
+$! NOKERBEROS Disable Kerberos support if Kerberos is available.
$! LIST Create C compiler listings and linker maps.
+$! /list/show=(expan,includ)/machine
+$! FULLLIST Full detailed listing.
+$! /list/show=(all, nomessages)/machine
$! NOHPSSL Don't use HP SSL, even if available.
+$! Note, you must match the pointer size that the OpenSSL
+$! shared image expects. This procedure will select the
+$! correct HP OpenSSL image.
$! NOSSL Don't use any SSL, even if available.
$! OSSLOLB Use OpenSSL object libraries (.OLB), even if shared
$! images (.EXE) are available.
+$! NOZLIB Don't use GNV$ZLIB shared image even if available.
+$! REALCLEAN Delete product files for all host architectures. (No
+$! build done.) Alias for CLEAN_ALL
$!
$! DCL Symbols:
$!
@@ -73,7 +100,7 @@ $! Changed to avoid case confusion on ODS5 disks.
$! Added more default dev:[dir] save+restore.
$! Moved remaining "defines.com" code (back) into
$! here, eliminating the hard-coded OpenSSL nonsense.
-$! Changed to use F$GETSYI( "ARCH_NAME") (or
+$! Changed to use F$GETSYI("ARCH_NAME") (or
$! equivalent) to name architecture-specific product
$! file destination directory, and to create the
$! directory if needed (obviating inclusion of these
@@ -84,260 +111,576 @@ $! command across multiple lines to avoid DCL
$! line-too-long problems.
$! Changed "vo_c" messages to show the CC qualifiers
$! once, not with every compile command.
+$! 01-Jan-2013 J. Malmberg
+$! VMS build procedures need to be able to work with
+$! the default set to a search list, with created or
+$! modified files only in the first member of the search
+$! list.
+$! Whitespace change to be more compatible with current
+$! practices.
+$! One pass option parsing instead of loop.
+$! GNV ZLIB shared image support.
+$! KERBEROS support where available.
+$! LDAP default to on where available
+$! LARGEFILE default to on where available
+$! IEEE float default to on where available.
+$! Generate the curl_config.h file from system inspection.
+$! Linker finds ldap with out option file.
+$! 13-Mar-2013, Tom Grace
+$! Added missing slash in cc_full_list.
+$! Removed unwanted extra quotes inside symbol tool_main
+$! for non-VAX architectures that triggered link failure.
+$! Replaced curl_sys_inc with sys_inc.
+$! 19-Mar-2013, John Malmberg
+$! symbol tool_main needs to be quoted when parse style is
+$! set to exended in versions of VMS greater than 7.3-1.
+$! Remove curlbuild.h generation as it should be pre-built
+$! in the curl release or daily tarball.
+$! 12-Jul-2013, John Malmberg
+$! Adjust to find and use ZLIB from the Jean-Francois
+$! Pieronne shared image and newer GNV ZLIB kit that
+$! is upward compatible with Jean-Francois's kit.
+$! Remove tabs from file.
+$! Fixed DCL formatting as follows:
+$! * Labels have no space after leading $.
+$! * 1 space after $ for first level.
+$! * 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.
+$!
+$!===========================================================================
$!
$!
$! Save the original default dev:[dir], and arrange for its restoration
$! at exit.
-$!
+$!------------------------------------------------------------------------
$ curl = ""
-$ orig_def = f$environment( "DEFAULT")
+$ orig_def = f$environment("DEFAULT")
$ on error then goto Common_Exit
$ on control_y then goto Common_Exit
$!
$ ctrl_y = 1556
-$ proc = f$environment( "PROCEDURE")
-$ proc_dev_dir = -
- f$parse( proc, , , "DEVICE")+ f$parse( proc, , , "DIRECTORY")
+$ proc = f$environment("PROCEDURE")
+$ proc_fid = f$file_attributes(proc, "FID")
+$ proc_dev = f$parse(proc, , , "DEVICE")
+$ proc_dir = f$parse(proc, , , "DIRECTORY")
+$ proc_name = f$parse(proc, , , "NAME")
+$ proc_type = f$parse(proc, , , "TYPE")
+$ proc_dev_dir = proc_dev + proc_dir
+$!
+$! Have to manually parse the device for a search list.
+$! Can not use the f$parse() as it will return the first name
+$! in the search list.
+$!
+$ orig_def_dev = f$element(0, ":", orig_def) + ":"
+$ if orig_def_dev .eqs. "::" then orig_def_dev = "sys$disk:"
+$ test_proc = orig_def_dev + proc_dir + proc_name + proc_type
+$!
+$! If we can find this file using the default directory
+$! then we know that we should use the original device from the
+$! default directory which could be a search list.
+$!
+$ test_proc_fid = f$file_attributes(test_proc, "FID")
+$!
+$ if (test_proc_fid .eq. proc_fid)
+$ then
+$ proc_dev_dir = orig_def_dev + proc_dir
+$ endif
+$!
$!
$! Verbose output message stuff. Define symbol to "write sys$output" or "!".
$! vo_c - verbose output for compile
$! vo_l - link
$! vo_o - object check
$!
-$ vo_c = "write sys$output"
-$ vo_l = "write sys$output"
-$ vo_o = "!"
+$ vo_c := "write sys$output"
+$ vo_l := "write sys$output"
+$ vo_o := "!"
$!
$! Determine the main distribution directory ("[--]") in an
$! ODS5-tolerant (case-insensitive) way. (We do assume that the only
-$! "]" is the one at the end.)
+$! "]" or ">" is the one at the end.)
+$!
+$! Some non-US VMS installations report ">" for the directory delimiter
+$! so do not assume that it is "]".
+$!
+$ orig_def_len = f$length(orig_def)
+$ delim = f$extract(orig_def_len - 1, 1, orig_def)
$!
$ set default 'proc_dev_dir'
$ set default [--]
-$ top_dev_dir = f$environment( "DEFAULT")- "]"
+$ base_dev_dir = f$environment("default")
+$ top_dev_dir = base_dev_dir - delim
+$!
+$!
$!
$! Define the architecture-specific product file destination directory
$! name(s).
$!
-$ if (f$getsyi( "HW_MODEL") .lt. 1024)
+$ parse_style = "TRADITIONAL"
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
$ then
$ arch_name = "VAX"
$ else
$ arch_name = ""
-$ arch_name = arch_name+ f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
$ if (arch_name .eqs. "") then arch_name = "UNK"
+$!
+$! Extended parsing option starts with VMS 7.3-1.
+$! There is no 7.4, so that simplifies the parse a bit.
+$!
+$ node_swvers = f$getsyi("node_swvers")
+$ version_patch = f$extract(1, f$length(node_swvers), node_swvers)
+$ maj_ver = f$element(0, ".", version_patch)
+$ min_ver_patch = f$element(1, ".", version_patch)
+$ min_ver = f$element(0, "-", min_ver_patch)
+$ patch = f$element(1, "-", min_ver_patch)
+$ if patch .eqs. "-" then patch = ""
+$ parse_x = 0
+$ if maj_ver .ges. "8"
+$ then
+$ parse_x = 1
+$ else
+$ if maj_ver .eqs. "7" .and. min_ver .ges. "3" .and. patch .nes. ""
+$ then
+$ parse_x = 1
+$ endif
+$ endif
+$ if parse_x
+$ then
+$ parse_style = f$getjpi("", "parse_style_perm")
+$ endif
$ endif
$!
-$ exedir = proc_dev_dir- "]"+ ".''arch_name']"
+$ exedir = proc_dev_dir - delim + ".''arch_name'" + delim
$ lisdir = exedir
$ objdir = exedir
$!
+$! When building on a search list, need to do a create to make sure that
+$! the output directory exists, since the clean procedure tries to delete
+$! it.
+$ create/dir 'exedir'/prot=o:rwed
+$!
$! Interpret command-line options.
$!
$ hpssl = 0
-$ ldap = 0
+$ ldap = 1
$ list = 0
+$ full_list = 0
$ nohpssl = 0
$ nossl = 0
$ openssl = 0
$ osslolb = 0
+$ nozlib = 0
+$ nokerberos = 0
+$ cc_names = "/names=(shortened, as_is)/repository='exedir'
+$ cc_defs = "HAVE_CONFIG_H=1"
+$ cc_list = "/list='objdir'/show=(expan, includ)/machine
+$ cc_full_list = "/list='objdir'/show=(all, nomessages)/machine
+$ link_qual = ""
+$ if arch_name .eqs. "VAX"
+$ then
+$ cc_debug = "/nodebug/optimize"
+$ !cc_defs = cc_defs + ""
+$ cc_float = ""
+$ cc_large = ""
+$ else
+$ cc_debug = "/debug/optimize"
+$ cc_defs = cc_defs + ",_USE_STD_STAT"
+$ cc_float = "/float=ieee/ieee_mode=denorm_results"
+$ cc_large = ",_LARGEFILE"
+$ endif
$ cc_qual1 = ""
$ cc_qual2 = ""
-$ cc_defs = "HAVE_CONFIG_H=1"
-$ if (f$type( CURL_CCDEFS) .nes. "")
+$ if (f$type(CURL_CCDEFS) .nes. "")
$ then
-$ CURL_CCDEFS = f$edit( CURL_CCDEFS, "TRIM")
-$ cc_defs = cc_defs+ ", "+ CURL_CCDEFS
+$ CURL_CCDEFS = f$edit(CURL_CCDEFS, "TRIM")
+$ cc_defs = cc_defs + ", " + CURL_CCDEFS
$ endif
-$ link_qual = ""
$ msg_qual = "/object = ''objdir'"
$ ssl_opt = ""
$!
-$ arg = 1
-$arg_loop:
-$ p = "p''arg'"
-$ arg_val = 'p'
-$ if (arg_val .eqs. "") then goto arg_loop_out
-$ arg_val = f$edit( arg_val, "upcase")
+$! Allow arguments to be grouped together with comma or separated by spaces
+$! Do no know if we will need more than 8.
+$ args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
+$ args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
$!
-$ if (arg_val .eqs. "CLEAN")
-$ then
-$ prods = "''exedir'*.*;*"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir+ arch_name+ ".DIR;1"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ goto Common_Exit
-$ endif
+$! Provide lower case version to simplify parsing.
+$ args_lower = f$edit(args, "LOWERCASE,COLLAPSE")
$!
-$ if (arg_val .eqs. "CLEAN_ALL")
-$ then
-$ prods = proc_dev_dir- "]"+ ".ALPHA]*.*;*"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir+ "ALPHA"+ ".DIR;1"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir- "]"+ ".IA64]*.*;*"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir+ "IA64"+ ".DIR;1"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir- "]"+ ".VAX]*.*;*"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir+ "VAX"+ ".DIR;1"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ goto Common_Exit
-$ endif
+$ args_len = f$length(args)
+$ args_lower_len = f$length(args_lower)
$!
-$ if (arg_val .eqs. "64")
-$ then
-$ cc_qual1 = cc_qual1+ " /POINTER = 64"
-$ goto arg_loop_end
-$ endif
+$ clean = 0
+$ if f$locate(",clean,", args_lower) .lt. args_lower_len
+$ then
+$ clean = 1
+$ endif
+$ clean_all = 0
+$ if f$locate(",clean_all,", args_lower) .lt. args_lower_len
+$ then
+$ clean = 1
+$ clean_all = 1
+$ endif
+$ if f$locate(",realclean,", args_lower) .lt. args_lower_len
+$ then
+$ clean = 1
+$ clean_all = 1
+$ endif
$!
-$ if (f$extract( 0, 6, arg_val) .eqs. "CCQUAL")
-$ then
-$ opts = f$edit( arg_val, "COLLAPSE")
-$ eq = f$locate( "=", opts)
-$ cc_qual2 = f$extract( (eq+ 1), 1000, opts)
-$ goto arg_loop_end
-$ endif
+$ if clean .ne. 0
+$ then
+$ prods = "''exedir'*.*;*"
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir + arch_name + ".DIR;1"
+$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ file = "[]config_vms.h"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[]config.h"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[]curl-config."
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[]libcurl.pc"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[.lib.cxx_repository]cxx$demangler_db."
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[.src.cxx_repository]cxx$demangler_db."
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[.lib]config_vms.h"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl_crtl_init"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ file = "[...]gnv$curlmsg"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ file = "[...]curlmsg"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ file = "[...]report_openssl_version"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ file = "[...]hp_ssl_release_info.txt"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]gnv_libcurl_xfer.mar_exact"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]gnv_libcurl_xfer"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ if f$search("''file'.opt") .nes. "" then delete/log 'file'.opt;*
+$ file = "[...]curl-*_original_src.bck"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl_d-*_original_src.bck"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl-*_vms_src.bck"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl_d-*_vms_src.bck"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl-*.release_notes"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl_d-*.release_notes"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]*curl*.pcsi$desc"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]*curl_d*.pcsi$desc"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]*curl*.pcsi$text"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]*curl_d*.pcsi$text"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$!
+$ if clean_all .eq. 0 then goto Common_Exit
+$ endif
$!
-$ if (arg_val .eqs. "DEBUG")
-$ then
-$ cc_qual1 = cc_qual1+ " /debug /nooptimize"
-$ link_qual = link_qual+ " /debug"
-$ goto arg_loop_end
-$ endif
$!
-$ if (arg_val .eqs. "IEEE")
-$ then
-$ cc_qual1 = cc_qual1+ " /FLOAT = IEEE_FLOAT"
-$ goto arg_loop_end
-$ endif
+$ if clean_all .ne. 0
+$ then
+$ file = "[...]gnv$libcurl"
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ if f$search("''file'.map") .nes. "" then delete/log 'file'.map;*
+$ if f$search("''file'.dsf") .nes. "" then delete/log 'file'.dsf;*
+$ file = "[.src]curl"
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ if f$search("''file'.map") .nes. "" then delete/log 'file'.map;*
+$ if f$search("''file'.dsf") .nes. "" then delete/log 'file'.dsf;*
+$ prods = proc_dev_dir - delim + ".ALPHA" + delim + "*.*;*"
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir + "ALPHA" + ".DIR;1"
+$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir - delim + ".IA64" + delim + "*.*;*"
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir + "IA64" + ".DIR;1"
+$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir - delim + ".VAX" + delim + "*.*;*"
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir + "VAX"+ ".DIR;1"
+$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ file = "[...]macro32_exactcase"
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ if f$search("''file'.jnl") .nes. "" then delete/log 'file'.jnl;*
+$ goto Common_Exit
+$ endif
$!
-$ if (arg_val .eqs. "LARGE")
-$ then
-$ if (arch_name .eqs. "VAX")
-$ then
-$ write sys$output """LARGE"" is ignored on VAX."
-$ else
-$ cc_defs = cc_defs+ ", _LARGEFILE=1"
-$ endif
-$ goto arg_loop_end
-$ endif
+$ build_64 = 0
+$ if f$locate(",64,", args_lower) .lt. args_lower_len
+$ then
+$ cc_qual1 = cc_qual1 + " /POINTER = 64"
+$ build_64 = 1
+$ endif
$!
-$ if (arg_val .eqs. "LDAP")
-$ then
-$ ldap = 1
-$ goto arg_loop_end
-$ endif
+$ args_loc = f$locate(",ccqual=", args_lower)
+$ if args_loc .lt. args_lower_len
+$ then
+$ arg = f$extract(args_loc + 1, args_lower_len, args_lower)
+$ arg_val = f$element(0, ",", arg)
+$ cc_qual2 = f$element(1, "=", arg_val);
+$ endif
$!
-$ if (f$extract( 0, 4, arg_val) .eqs. "LIST")
-$ then
-$ list = 1
-$ cc_qual1 = cc_qual1+ " /list = ''lisdir' /show = (all, nomessages)"
-$ link_qual = link_qual+ " /map = ''lisdir'"
-$ msg_qual = msg_qual+ " /list = ''lisdir'"
-$ goto arg_loop_end
-$ endif
+$! On Alpha/IA64 no size penalty for compiling /debug/optimize
+$! by default.
+$ if f$locate(",debug,", args_lower) .lt. args_lower_len
+$ then
+$ cc_debug = "/debug/nooptimize"
+$ endif
$!
-$ if (arg_val .eqs. "NOHPSSL")
-$ then
-$ nohpssl = 1
-$ goto arg_loop_end
-$ endif
+$! We normally want IEEE float if it is available. Programs that are
+$! calling libcurl will typically prefer IEEE behavior, unless on the
+$! VAX where we have no choice.
$!
-$ if (arg_val .eqs. "NOSSL")
-$ then
-$ nossl = 1
-$ goto arg_loop_end
-$ endif
+$ if f$locate(",noieee,", args_lower) .lt. args_lower_len
+$ then
+$ cc_float = ""
+$ endif
$!
-$ if (arg_val .eqs. "OSSLOLB")
-$ then
-$ osslolb = 1
-$ goto arg_loop_end
-$ endif
+$! Normally we want large file if it is available.
+$ if f$locate(",nolarge,", args_lower) .lt. args_lower_len
+$ then
+$ write sys$output "Handling of large files disabled."
+$ cc_large = ""
+$ endif
+$ if cc_large .nes. ""
+$ then
+$ cc_defs = cc_defs + cc_large
+$ endif
$!
-$ write sys$output "Unrecognized command-line option: ''arg_val'"
-$ goto Common_Exit
+$ if f$locate(",noldap,", args_lower) .lt. args_lower_len
+$ then
+$ ldap = 0
+$ endif
+$!
+$ if f$locate(",list,", args_lower) .lt. args_lower_len
+$ then
+$ list = 1
+$ endif
+$ if f$locate(",fulllist,", args_lower) .lt. args_lower_len
+$ then
+$ list = 1
+$ full_list = 1
+$ endif
+$!
+$ if f$locate(",nohpssl,", args_lower) .lt. args_lower_len
+$ then
+$ nohpssl = 1
+$ endif
+$!
+$ if f$locate(",nossl,", args_lower) .lt. args_lower_len
+$ then
+$ nossl = 1
+$ endif
+$!
+$ if f$locate(",osslolb,", args_lower) .lt. args_lower_len
+$ then
+$ osslolb = 1
+$ endif
+$!
+$ if f$locate(",nozlib,", args_lower) .lt. args_lower_len
+$ then
+$ nozlib = 1
+$ endif
+$!
+$ if f$locate(",nokerberos,", args_lower) .lt. args_lower_len
+$ then
+$ nokerberos = 1
+$ endif
$!
-$arg_loop_end:
-$ arg = arg+ 1
-$ goto arg_loop
-$arg_loop_out:
$!
$! CC /LIST, LINK /MAP, and MESSAGE /LIST are defaults in batch mode,
$! so be explicit when they're not desired.
$!
-$ if (list .eq. 0)
+$
+$ if list .eq. 0
$ then
-$ cc_qual1 = cc_qual1+ " /nolist"
-$ link_qual = link_qual+ " /nomap"
-$ msg_qual = msg_qual+ " /nolist"
+$ cc_qual1 = cc_qual1 + "/nolist"
+$ msg_qual = msg_qual + "/nolist"
+$ else
+$ msg_qual = msg_qual + "/list='objdir'"
+$ if (full_list .ne. 0)
+$ then
+$ cc_qual1 = cc_qual1 + cc_full_list
+$ else
+$ cc_qual1 = cc_qual1 + cc_list
+$ endif
$ endif
+$ cc_qual1 = cc_qual1 + cc_names + cc_float + cc_debug
$!
$! Create product directory, if needed.
$!
-$ if (f$search( proc_dev_dir+ arch_name+ ".DIR;1") .eqs. "")
+$ if (f$search(proc_dev_dir + arch_name + ".DIR;1") .eqs. "")
$ then
$ create /directory 'exedir'
$ endif
$!
$! Detect available (but not prohibited) SSL software.
$!
+$ libsslshr_line = ""
+$ libcryptoshr_line = ""
$ if (.not. nossl)
$ then
-$ if (f$trnlnm( "OPENSSL") .nes. "")
-$ then
-$ cc_defs = cc_defs+ ", USE_SSLEAY=1"
-$ if ((f$trnlnm( "SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
-$ then
-$! Use HP SSL.
-$ hpssl = 1
-$ ssl_opt = ", ''proc_dev_dir'hpssl_"+ -
- f$getsyi("ARCH_NAME")+ ".opt /options"
+$ if (f$trnlnm("OPENSSL") .nes. "")
+$ then
+$! cc_defs = cc_defs + ", USE_OPENSSL=1"
+$ if ((f$trnlnm("SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
+$ then
+$! Use HP SSL.
+$ hpssl = 1
+$!
+$! Older SSL only has lib*_shr32 images
+$!-----------------------------------------------
+$ libsslshr = "sys$share:ssl$libssl_shr"
+$ if (f$search("''libsslshr'.exe") .eqs. "") .or. (.not. build_64)
+$ then
+$ libsslshr = libsslshr + "32"
+$ endif
+$ libcryptoshr = "sys$share:ssl$libcrypto_shr"
+$ if (f$search("''libcryptoshr'.exe") .eqs. "") .or. (.not. build_64)
+$ then
+$ libcryptoshr = libcryptoshr + "32"
+$ endif
+$ libsslshr_line = "''libsslshr'.exe/share"
+$ libcryptoshr_line = "''libcryptoshr'.exe/share"
$ else
-$! Use OpenSSL. Assume object libraries, unless shared images
-$! are found (and not prohibited).
-$ openssl = 1
-$ ssl_opt = ", ssllib:libssl.olb /library"+ -
- ", ssllib:libcrypto.olb /library"
-$ if (osslolb .eq. 0)
-$ then
- if ((f$search( "ssllib:ssl_libcrypto.exe") .nes. "") .and. -
- (f$search( "ssllib:ssl_libssl.exe") .nes. ""))
-$ then
-$! OpenSSL shared images with "SSL_xxx.EXE names.
-$ openssl = 2
-$ ssl_opt = ", ''proc_dev_dir'openssl_ssl_"+ -
- f$getsyi("ARCH_NAME")+ ".opt /options"
-$ else
-$ if ((f$search( "ssllib:libcrypto.exe") .nes. "") .and. -
- (f$search( "ssllib:libssl.exe") .nes. ""))
+$! Use OpenSSL. Assume object libraries, unless shared images
+$! are found (and not prohibited).
+$! TODO: We do not know how to automatically choose based on the
+$! pointer size.
+$!
+$ openssl = 1
+$ libsslshr_line = "ssllib:libssl.olb/lib"
+$ libcryptoshr_line = "ssllib:libcrypto.olb/lib"
+$ ssl_opt = ", ssllib:libssl.olb /library" + -
+ ", ssllib:libcrypto.olb /library"
+$ if (osslolb .eq. 0)
+$ then
+ if ((f$search("ssllib:ssl_libcrypto.exe") .nes. "") .and. -
+ (f$search("ssllib:ssl_libssl.exe") .nes. ""))
$ then
-$! OpenSSL shared images with "xxx.EXE names.
-$ openssl = 3
-$ ssl_opt = ", ''proc_dev_dir'openssl_"+ -
- f$getsyi("ARCH_NAME")+ ".opt /options"
+$! OpenSSL shared images with "SSL_xxx.EXE names.
+$ openssl = 2
+$ libsslshr_line = "ssllib:ssl_libssl_shr.exe/share"
+$ libcryptoshr_line = "ssllib:ssl_libcrypto_shr.exe/share"
+$ else
+$ if ((f$search("ssllib:libcrypto.exe") .nes. "") .and. -
+ (f$search("ssllib:libssl.exe") .nes. ""))
+$ then
+$! OpenSSL shared images with "xxx.EXE names.
+$ openssl = 3
+$ libsslshr_line = "ssllib:libssl_shr.exe/share"
+$ libcryptoshr_line = "ssllib:libcrypto_shr.exe/share"
+$ endif
$ endif
-$ endif
-$ endif
+$ endif
$ endif
-$ endif
+$ endif
$ endif
$!
$! LDAP.
$!
+$ if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
+$ then
+$ ldap = 0
+$ endif
$ if (ldap .eq. 0)
$ then
-$ cc_defs = cc_defs+ ", CURL_DISABLE_LDAP=1"
+$! cc_defs = cc_defs + ", CURL_DISABLE_LDAP=1"
+$ else
+$ 'vo_c' "%CURL-I-BLDHPLDAP, building with HP LDAP support"
+$ endif
+$!
+$! KERBEROS
+$ gssrtlshr_line = ""
+$ try_shr = "sys$share:gss$rtl"
+$ if f$search("''try_shr'.exe") .eqs. ""
+$ then
+$ nokerberos = 1
+$ endif
+$ curl_sys_krbinc = ""
+$ if nokerberos .eq. 0
+$ then
+$ 'vo_c' "%CURL-I-BLDHPKERBEROS, building with HP KERBEROS support"
+$ curl_sys_krbinc = "sys$sysroot:[kerberos.include]"
+$ gssrtlshr_line = "''try_shr'/share"
+$ endif
+$!
+$!
+$! LIBZ
+$ libzshr_line = ""
+$ try_shr = "gnv$libzshr"
+$ if build_64
+$ then
+$! First look for 64 bit
+$ if f$search("''try_shr'64") .eqs. ""
+$ then
+$! Second look for the J.F. Pieronne 64 bit shared image
+$ try_shr = "LIBZ_SHR64"
+$ if f$search(try_shr) .eqs. "" then nozlib = 1
+$ endif
+$ else
+$! First look for 32 bit
+$ if f$search("''try_shr'32") .eqs. ""
+$ then
+$! Second look for old 32 bit image
+$ if f$search(try_shr) .eqs. ""
+$ then
+$! Third look for the J.F. Pieronne 32 bit shared image
+$ try_shr = "LIBZ_SHR32"
+$ if f$search(try_shr) .eqs. "" then nozlib = 1
+$ endif
+$ endif
+$ endif
+$ if f$search(try_shr) .eqs. ""
+$ then
+$ nozlib = 1
+$ endif
+$ curl_sys_zlibinc = ""
+$ if nozlib .eq. 0
+$ then
+$ libzshr_line = "''try_shr'/share"
+$ if f$locate("LIBZ", try_shr) .eq. 0
+$ then
+$ 'vo_c' "%CURL-I-BLDJFPLIBZ, building with JFP LIBZ support"
+$ curl_sys_zlibinc = "LIBZ:"
+$ else
+$ 'vo_c' "%CURL-I-BLDGNVLIBZ, building with GNV LIBZ support"
+$ curl_sys_zlibinc = "GNV$ZLIB_INCLUDE:"
+$ endif
$ endif
$!
$! Form CC qualifiers.
$!
$ cc_defs = "/define = (''cc_defs')"
-$ cc_qual2 = cc_qual2+ " /object = ''objdir'"+ -
- " /include = ([-.lib], [-.src],"+ -
- " [-.packages.vms], [-.packages.vms.''arch_name'])"
+$ cc_qual2 = cc_qual2 + " /object = ''objdir'"
+$ cc_qual2 = cc_qual2 + "/nested_include_directory=none"
$!
$ 'vo_c' "CC opts:", -
" ''cc_defs'", -
@@ -372,97 +715,209 @@ $ 'vo_c' " EXEDIR = ''exedir'"
$!
$ if (openssl .ne. 0)
$ then
-$ ssllib = f$trnlnm( "ssllib")
-$ if (ssllib .eqs. "")
-$ then
-$ ssllib = "(undefined)"
-$ endif
-$ 'vo_c' " SSLLIB = ''ssllib'"
-$!
-$ if (openssl .eq. 1)
-$ then
-$ ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.OLB"
-$ ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.OLB"
+$ ssllib = f$trnlnm("ssllib")
+$ if (ssllib .eqs. "")
+$ then
+$ ssllib = "(undefined)"
+$ endif
+$ 'vo_c' " SSLLIB = ''ssllib'"
+$!
+$! TODO: Why are we translating the logical name?
+$! The logical aname used to find the shared image should just be used
+$! as translating it could result in the wrong location at run time.
+$ if (openssl .eq. 1)
+$ then
+$ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.OLB"
+$ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.OLB"
$ msg = "object libraries"
-$ else
+$ else
$ if (openssl .eq. 2)
$ then
-$ ossl_lib1 = f$trnlnm( "ssllib")+ "SSL_LIBSSL.EXE"
-$ ossl_lib2 = f$trnlnm( "ssllib")+ "SSL_LIBCRYPTO.EXE"
+$ ossl_lib1 = f$trnlnm("ssllib")+ "SSL_LIBSSL.EXE"
+$ ossl_lib2 = f$trnlnm("ssllib")+ "SSL_LIBCRYPTO.EXE"
$ else
-$ ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.EXE"
-$ ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.EXE"
+$ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.EXE"
+$ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.EXE"
$ endif
$ msg = "shared images"
-$ endif
-$ if ((f$search( ossl_lib1) .eqs. "") .or. -
- (f$search( ossl_lib2) .eqs. ""))
-$ then
+$ endif
+$ if ((f$search(ossl_lib1) .eqs. "") .or. -
+ (f$search(ossl_lib2) .eqs. ""))
+$ then
$ write sys$output "Can't find OpenSSL ''msg':"
$ write sys$output " ''ossl_lib1'"
$ write sys$output " ''ossl_lib2'"
$ goto Common_Exit
-$ endif
+$ endif
$ endif
$!
$! Define the "curl" (process) logical name for "#include <curl/xxx.h>".
$!
-$ curl = f$trnlnm( "curl", "LNM$PROCESS")
+$ curl = f$trnlnm("curl", "LNM$PROCESS")
$ if (curl .nes. "")
$ then
-$ write sys$output ""
-$ write sys$output -
+$ write sys$output ""
+$ write sys$output -
"Process logical name ""curl"" is already defined, but this procedure"
-$ write sys$output -
+$ write sys$output -
"would override that definition. Use a command like"
-$ write sys$output -
+$ write sys$output -
" deassign /process curl"
-$ write sys$output -
+$ write sys$output -
"to cancel that logical name definition, and then and re-run this procedure."
-$ write sys$output ""
-$ goto Common_Exit
+$ write sys$output ""
+$ goto Common_Exit
$ endif
-$ define curl 'top_dev_dir'.include.curl]
+$ curl_logical = top_dev_dir + ".include.curl" + delim
+$ curl_sys_inc2 = curl_logical
+$ curl_sys_inc1 = top_dev_dir + ".include" + delim
+$! define curl 'top_dev_dir'.include.curl'delim'
+$!
+$! Generate config file into the product directory.
+$!
+$! call MoveIfDiff [.lib]config-vms.h 'objdir'curl_config.h
$!
-$! Copy the VMS-specific config file into the product directory.
+$ conf_params = ""
+$ if nossl .ne. 0 then conf_params = conf_params + ",nossl"
+$ if nohpssl .ne. 0 then conf_params = conf_params + ",nohpssl,"
+$ if ldap .eq. 0 then conf_params = conf_params + ",noldap,"
+$ if nozlib .ne. 0 then conf_params = conf_params + ",nozlib,"
+$ if nokerberos .ne. 0 then conf_params = conf_params + ",nokerberos"
+$ conf_params = conf_params - ","
+$!
+$!
+$ new_conf = f$search("''objdir'curl_config.h")
+$ if new_conf .eqs. ""
+$ then
+$! set ver
+$ write sys$output "Generating curl custom config_vms.h"
+$ @'proc_dev_dir'generate_config_vms_h_curl.com ''conf_params'
+$!
+$ write sys$output "Generating curl_config.h"
+$ conf_in = f$search("[.lib]curl_config*.*in")
+$ if conf_in .eqs. ""
+$ then
+$ write sys$output "Can not find [.lib]curl_config*.*in file!"
+$ goto common_exit
+$ endif
+$ @'proc_dev_dir'config_h.com 'conf_in'
+$ copy config.h 'objdir'curl_config.h
+$ delete config.h;
+$! set nover
+$ endif
$!
-$ call MoveIfDiff 'proc_dev_dir'config-vms.h 'objdir'curl_config.h
$!
$ on control_y then goto Common_Exit
$!
$ set default 'proc_dev_dir'
+$ sys_inc = "''curl_sys_inc1', ''curl_sys_inc2', ''curl_logical'"
+$ if curl_sys_krbinc .nes. ""
+$ then
+$ sys_inc = sys_inc + ",''curl_sys_krbinc'"
+$ endif
+$ 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
$!
-$ ldap_opt = ""
-$ if (ldap .ne. 0) then ldap_opt = ", ''proc_dev_dir'ldap.opt /options"
$!
$ if (openssl .ne. 0)
$ then
-$ if (openssl .eq. 1)
-$ then
+$ if (openssl .eq. 1)
+$ then
$ 'vo_l' "%CURL-I-LINK_OSSL, linking with OpenSSL (object library)"
-$ else
+$ else
$ 'vo_l' "%CURL-I-LINK_HPSSL, linking with OpenSSL (shared image)"
-$ endif
+$ endif
$ else
-$ if (hpssl)
-$ then
+$ if (hpssl)
+$ then
$ 'vo_l' "%CURL-I-LINK_HPSSL, linking with HP SSL"
-$ else
+$ else
$ 'vo_l' "%CURL-I-LINK_NOSSL, linking with NO SSL support"
-$ endif
+$ endif
$ endif
$!
-$ link 'link_qual' /executable = 'exedir'CURL.EXE -
- 'objdir'curlsrc.olb /library /include = (main, curlmsg), -
- 'objdir'curllib.olb /library -
- 'ssl_opt' -
- 'ldap_opt'
+$!
+$! GNV helper files for building the test curl binary.
+$!-----------------------------------------------
+$ create 'exedir'gnv$curl.opt
+$ open/append opt 'exedir'gnv$curl.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$!
+$! Create the libcurl
+$!------------------------------------------------------
+$ create 'exedir'gnv_libcurl_linker.opt
+$ open/append opt 'exedir'gnv_libcurl_linker.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$!
+$! If we are not on VAX, then we want the debug symbol table in
+$! a separate file.
+$! VAX needs the tool_main unquoted in uppercase,
+$! Alpha and IA64 need tool_main quoted in exact case when parse style is
+$! extended.
+$ link_dsf1 = ""
+$ link_dsf2 = ""
+$ tool_main = "tool_main"
+$ if arch_name .nes. "VAX"
+$ then
+$ if parse_style .eqs. "EXTENDED"
+$ then
+$ tool_main = """tool_main"""
+$ endif
+$ link_dsf1 = "/dsf=" + exedir + "CURL.DSF"
+$ link_dsf2 = "/dsf=" + exedir + "CURL_DEBUG.DSF"
+$ endif
+$ if (list .eq. 0)
+$ then
+$ link_map1 = "/nomap"
+$ link_map2 = "/nomap"
+$ else
+$ link_map1 = "/map=" + exedir + "CURL.MAP"
+$ link_map2 = "/map=" + exedir + "CURL_DEBUG.MAP"
+$ endif
+$!
+$!
+$! Make a normal image.
+$ set ver
+$ link 'link_map1' 'link_dsf1' /executable = 'exedir'CURL.EXE -
+ 'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
+ 'objdir'curllib.olb /library, -
+ 'exedir'gnv$curl.opt/opt
+$!
+$! Also make a debug copy.
+$ link/debug 'link_map2' 'link_dsf2' /executable = 'exedir'CURL_DEBUG.EXE -
+ 'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
+ 'objdir'curllib.olb /library, -
+ 'exedir'gnv$curl.opt/opt
+$ set nover
$!
$ goto Common_Exit
$!
@@ -471,89 +926,93 @@ $! the directory passed in via P1 and put it in the object library named
$! via P3. Exclude items in P4.
$!
$build: subroutine
-$ build_def = f$environment( "default")
-$ on control_y then goto EndLoop ! SS$_CONTROLY
-$ sts = 1 ! SS$_NORMAL.
-$! set noon
-$ set default 'p1'
-$ search = p2
-$ reset = f$search("reset")
-$ if f$search( p3) .eqs. ""
-$ then
+$ build_def = f$environment("default")
+$ on control_y then goto EndLoop ! SS$_CONTROLY
+$ sts = 1 ! SS$_NORMAL.
+$! set noon
+$ set default 'p1'
+$ search = "sys$disk:" + p2
+$ reset = f$search("reset")
+$ if f$search( p3) .eqs. ""
+$ then
$ librarian /create /object 'p3'
-$ endif
-$ reject_list__ = ","+ f$edit( p4, "COLLAPSE, UPCASE")+ ","
-$ reject_list___len = f$length( reject_list__)
-$ reset = f$search( "reset", 1)
+$ endif
+$ reject_list__ = "," + f$edit(p4, "COLLAPSE, UPCASE") + ","
+$ reject_list___len = f$length(reject_list__)
+$ reset = f$search( "reset", 1)
$Loop:
-$ file = f$search( search, 1)
-$ if file .eqs. "" then goto EndLoop
-$! Skip a name if it's in the P4 exclusion list.
-$ if (p4 .nes. "")
-$ then
-$ name__ = ","+ -
- f$edit( f$parse( file, , , "NAME", "SYNTAX_ONLY"), "UPCASE")+ -
+$ file = f$search( search, 1)
+$ if file .eqs. "" then goto EndLoop
+$! Skip a name if it's in the P4 exclusion list.
+$ if (p4 .nes. "")
+$ then
+$ name__ = "," + -
+ f$edit(f$parse(file, , , "NAME", "SYNTAX_ONLY"), "UPCASE") + -
","
-$ if (f$locate( name__, reject_list__) .lt. reject_list___len)
-$ then
-$ goto Loop
-$ endif
+$ if (f$locate(name__, reject_list__) .lt. reject_list___len)
+$ then
+$ goto Loop
$ endif
-$ objfile = f$parse( "''objdir'.OBJ;", file)
-$ obj = f$search( objfile, 2)
-$ if (obj .nes. "")
+$ endif
+$ objfile = f$parse("''objdir'.OBJ;", file)
+$ obj = f$search(objfile, 2)
+$ if (obj .nes. "")
+$ then
+$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
$ then
-$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
-$ then
-$ call compile 'file'
-$ sts = $status
-$ if .not. sts
-$ then
-$ goto EndLoop
-$ endif
-$ librarian /object 'p3' 'objfile'
-$ else
-$ 'vo_o' "%CURL-I-OBJUTD, ", objfile, " is up to date"
-$ endif
+$ call compile 'file'
+$ sts = $status
+$ if .not. sts
+$ then
+$ goto EndLoop
+$ endif
+$ librarian /object 'p3' 'objfile'
$ else
-$ 'vo_o' "%CURL-I-OBJDNE, ", file, " does not exist"
-$ call compile 'file'
-$ sts = $status
-$ if .not. sts
-$ then
-$ goto EndLoop
-$ endif
-$ librarian /object 'p3' 'objfile'
+$ 'vo_o' "%CURL-I-OBJUTD, ", objfile, " is up to date"
+$ endif
+$ else
+$ 'vo_o' "%CURL-I-OBJDNE, ", file, " does not exist"
+$ call compile 'file'
+$ sts = $status
+$ if .not. sts
+$ then
+$ goto EndLoop
$ endif
-$ goto Loop
+$ librarian /object 'p3' 'objfile'
+$ endif
+$ goto Loop
$EndLoop:
$!!! purge
-$ set default 'build_def'
-$ exit 'sts'
+$ set default 'build_def'
+$ exit 'sts'
$ endsubroutine ! Build
$!
$! Based on the file TYPE, do the right compile command.
$! Only C and MSG supported.
$!
$compile: subroutine
-$ on control_y then return ctrl_y ! SS$_CONTROLY
-$! set noon
-$ file = p1
-$ qual = p2+ p3+ p4+ p5+ p6+ p7+ p8
-$ typ = f$edit( f$parse( file, , , "TYPE"), "UPCASE") - "."
-$ if (typ .eqs. "C")
-$ then
+$ on control_y then return ctrl_y ! SS$_CONTROLY
+$! set noon
+$ file = p1
+$ qual = p2+ p3+ p4+ p5+ p6+ p7+ p8
+$ typ = f$edit(f$parse(file, , , "TYPE"), "UPCASE") - "."
+$ if (typ .eqs. "C")
+$ then
$ 'vo_c' "CC (opts) ", file
+$ define/user curl 'curl_logical'
+$ if curl_sys_krbinc .nes. "" then define/user gssapi 'curl_sys_krbinc'
+$ define/user decc$system_include 'sys_inc'
$ CC 'cc_defs' -
'cc_qual1' -
'cc_qual2' -
+ 'cc_include' -
'file'
-$ else
-$ cmd_msg = "MESSAGE "+ msg_qual
+$ else
+$ cmd_msg = "MESSAGE " + msg_qual
$ x = cmd_'typ'
-$ 'vo_c' x," ",file
+$ 'vo_c' x, " ", file
$ 'x' 'file'
-$ endif
+$ endif
$ ENDSUBROUTINE ! Compile
$!
$! Do a diff of the file specified in P1 with that in P2. If different
@@ -561,23 +1020,19 @@ $! copy P1 to P2. This also covers if P2 doesn't exist, but not if P2
$! is an invalid filespec.
$!
$MoveIfDiff: subroutine
-$ set NoOn
-$ define /user_mode sys$error nl:
-$ define /user_mode sys$output nl:
-$ differences 'p1' 'p2'
-$ status = $status
-$ if ( status .ne. %X006C8009) ! if status is not "no diff"
-$ then
+$ set NoOn
+$ define /user_mode sys$error nl:
+$ define /user_mode sys$output nl:
+$ differences 'p1' 'p2'
+$ status = $status
+$ if (status .ne. %X006C8009) ! if status is not "no diff"
+$ then
$ copy 'p1' 'p2'
$ purge /nolog 'p2'
-$ endif
-$ on control_y then return ctrl_y ! SS$_CONTROLY
+$ endif
+$ on control_y then return ctrl_y ! SS$_CONTROLY
$ ENDSUBROUTINE ! MoveIfDiff
$!
$Common_Exit:
$ set default 'orig_def'
-$ if ((curl .eqs. "") .and. (f$trnlnm( "curl", "LNM$PROCESS") .nes. ""))
-$ then
-$ deassign curl
-$ endif
$ exit
diff --git a/packages/vms/clean_gnv_curl.com b/packages/vms/clean_gnv_curl.com
new file mode 100644
index 00000000..24ecb11e
--- /dev/null
+++ b/packages/vms/clean_gnv_curl.com
@@ -0,0 +1,250 @@
+$! File: clean_gnv_curl.COM
+$!
+$! $Id$
+$!
+$! The GNV environment leaves behind some during the configure and build
+$! procedure that need to be cleaned up.
+$!
+$! The default is to remove all the left over stuff from running the
+$! configure script and to remove all intermediate binary files.
+$!
+$! This should be run with no parameters after the gnv_curl_configure.sh
+$! script is run.
+$!
+$! Paramter P1: REALCLEAN
+$! This removes all build products and brings the environment back to
+$! the point where the gnv_curl_configure.sh procedure needs to be run again.
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 07-Jul-2009 J. Malmberg
+$!============================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$!
+$!
+$! Move to where the base directory is.
+$ set def [--]
+$!
+$!
+$ file = "sys$login:sh*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "sys$login:make*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]confdefs.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.dsf"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.sym"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!
+$ file = "lcl_root:[.conf*...]*.*"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "lcl_root:[]conf*.dir
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!
+$ file = "lcl_root:[.lib]*.out"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "lcl_root:[.lib]*.o"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!
+$ file = "lcl_root:[.lib]*.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]*.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]cc_temp*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]*.dsf"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]*.o"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]ar*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]cc_temp*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.lo"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.a"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.la"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.lai"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.include.curl]curlbuild.h_old"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl-*_original_src.bck"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl_d-*_original_src.bck"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl-*_vms_src.bck"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl_d-*_vms_src.bck"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl-*.release_notes"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl_d-*.release_notes"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl-*.pcsi$desc"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl_d-*.pcsi$desc"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl-*.pcsi$text"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl_d-*.pcsi$text"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!======================================================================
+$!
+$ if p1 .nes. "REALCLEAN" then goto all_exit
+$!
+$ file = "lcl_root:[...]*.obj"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]Makefile."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]libtool."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]POTFILES."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]libcurl.pc"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]curl-config."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.include.curl]curlbuild.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]curl."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.tests]configurehelp.pm"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]curl_config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]libcurl.vers"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]ca-bundle.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]config.log"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]config.status"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.dangle"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]CXX$DEMANGLER_DB."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]stamp-h1."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]stamp-h1."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]stamp-h2."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]stamp-h3."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]*.a"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.spec"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]gnv$*.*"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]gnv*.opt"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.EPM]curl.list"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]macro32_exactcase.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]report_openssl_version.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]hp_ssl_release_info.txt"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]curl.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$all_exit:
+$!
+$! Put the default back.
+$!-----------------------
+$ set def 'default_dir'
+$!
+$ exit
diff --git a/packages/vms/compare_curl_source.com b/packages/vms/compare_curl_source.com
new file mode 100644
index 00000000..eeaec31d
--- /dev/null
+++ b/packages/vms/compare_curl_source.com
@@ -0,0 +1,371 @@
+$! Compare_curl_source.com
+$!
+$! $Id$
+$!
+$! This procedure compares the files in two directories and reports the
+$! differences. It is customized for the vmsports repository layout.
+$!
+$! It needs to be customized to the local site directories.
+$!
+$! This is used by me for these purposes:
+$! 1. Compare the original source of a project with an existing
+$! VMS port.
+$! 2. Compare the checked out repository of a project with the
+$! the local working copy to make sure they are in sync.
+$! 3. Keep a copy directory up to date. The third is needed by
+$! me because VMS Backup can create a saveset of files from a
+$! NFS mounted volume.
+$!
+$! First the files in the original source directory which is assumed to be
+$! under source codde control are compared with the copy directory.
+$!
+$! Then the files are are only in the copy directory are listed.
+$!
+$! The result will five diagnostics about of files:
+$! 1. Files that are not generation 1.
+$! 2. Files missing in the copy directory.
+$! 3. Files in the copy directory not in the source directory.
+$! 4. Files different from the source directory.
+$! 5. Files that VMS DIFF can not process.
+$!
+$! This needs to be run on an ODS-5 volume.
+$!
+$! If UPDATE is given as a second parameter, files missing or different in the
+$! copy directory will be updated.
+$!
+$! By default:
+$! The directory src_root:[project_name] will be translated to something like
+$! DISK:[dir.dir.reference.project_name] and this will be used
+$! to calculate DISK:[dir.dir.vms_source.project_name] for the VMS specific
+$! source directory.
+$!
+$! The copy directory is vms_root:[project_name]
+$! The UPDATE parameter is ignored.
+$!
+$! This setting is used to make sure that the working vms directory
+$! and the repository checkout directory have the same contents.
+$!
+$! If P1 is "SRCBCK" then this
+$! The source directory tree is: src_root:[project_name]
+$! The copy directory is src_root1:[project_name]
+$!
+$! src_root1:[project_name] is used by me to work around that VMS backup will
+$! not use NFS as a source directory so I need to make a copy.
+$!
+$! This is to make sure that the backup save set for the unmodified
+$! source is up to date.
+$!
+$! If your repository checkout is not on an NFS mounted volume, you do not
+$! need to use this option or have the logical name src_root1 defined.
+$!
+$! If P1 is "VMSBCK" then this changes the two directories:
+$! The source directory is vms_root:[project_name]
+$! The copy directory is vms_root1:[project_name]
+$!
+$! vms_root:[project_name] is where I do the VMS specific edits.
+$! vms_root1:[project_name] is used by me to work around that VMS backup will
+$! not use NFS as a source directory so I need to make a copy.
+$!
+$! This is to make sure that the backup save set for the unmodified
+$! source is up to date.
+$!
+$! Copyright 2011, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 18-Aug-2011 J. Malmberg
+$!==========================================================================
+$!
+$! Update missing/changed files.
+$ update_file = 0
+$ if (p2 .eqs. "UPDATE")
+$ then
+$ update_file = 1
+$ endif
+$!
+$ myproc = f$environment("PROCEDURE")
+$ myprocdir = f$parse(myproc,,,"DIRECTORY") - "[" - "]" - "<" - ">"
+$ myprocdir = f$edit(myprocdir, "LOWERCASE")
+$ mydefault = f$environment("DEFAULT")
+$ mydir = f$parse(mydefault,,,"DIRECTORY")
+$ mydir = f$edit(mydir, "LOWERCASE")
+$ odelim = f$extract(0, 1, mydir)
+$ mydir = mydir - "[" - "]" - "<" - ">"
+$ mydev = f$parse(mydefault,,,"DEVICE")
+$!
+$ ref = ""
+$ if P1 .eqs. ""
+$ then
+$ ref_base_dir = myprocdir
+$ wrk_base_dir = mydir
+$ update_file = 0
+$ resultd = f$parse("src_root:",,,,"NO_CONCEAL")
+$ resultd = f$edit(resultd, "LOWERCASE")
+$ resultd = resultd - "][" - "><" - ".;" - ".."
+$ resultd_len = f$length(resultd) - 1
+$ delim = f$extract(resultd_len, 1, resultd)
+$ ref_root_base = mydir + delim
+$ resultd = resultd - ref_root_base - "reference." + "vms_source."
+$ ref = resultd + ref_base_dir
+$ wrk = "VMS_ROOT:" + odelim + wrk_base_dir
+$ resultd_len = f$length(resultd) - 1
+$ resultd = f$extract(0, resultd_len, resultd) + delim
+$ ref_root_dir = f$parse(resultd,,,"DIRECTORY")
+$ ref_root_dir = f$edit(ref_root_dir, "LOWERCASE")
+$ ref_root_dir = ref_root_dir - "[" - "]"
+$ ref_base_dir = ref_root_dir + "." + ref_base_dir
+$ endif
+$!
+$ if p1 .eqs. "SRCBCK"
+$ then
+$ ref_base_dir = "curl"
+$ wrk_base_dir = "curl"
+$ ref = "src_root:[" + ref_base_dir
+$ wrk = "src_root1:[" + wrk_base_dir
+$ if update_file
+$ then
+$ if f$search("src_root1:[000000]curl.dir") .eqs. ""
+$ then
+$ create/dir/prot=o:rwed src_root1:[curl]
+$ endif
+$ endif
+$ endif
+$!
+$!
+$ if p1 .eqs. "VMSBCK"
+$ then
+$ ref_base_dir = "curl"
+$ wrk_base_dir = "curl"
+$ ref = "vms_root:[" + ref_base_dir
+$ wrk = "vms_root1:[" + wrk_base_dir
+$ if update_file
+$ then
+$ if f$search("vms_root1:[000000]curl.dir") .eqs. ""
+$ then
+$ create/dir/prot=o:rwed vms_root1:[curl]
+$ endif
+$ endif
+$ endif
+$!
+$!
+$ if ref .eqs. ""
+$ then
+$ write sys$output "Unknown compare type specified!"
+$ exit 44
+$ endif
+$!
+$!
+$! Future - check the device types involved for the
+$! the syntax to check.
+$ ODS2_SYNTAX = 0
+$ NFS_MANGLE = 0
+$ PWRK_MANGLE = 0
+$!
+$ vax = f$getsyi("HW_MODEL") .lt. 1024
+$ if vax
+$ then
+$ ODS2_SYNTAX = 1
+$ endif
+$!
+$ report_missing = 1
+$!
+$ if .not. ODS2_SYNTAX
+$ then
+$ set proc/parse=extended
+$ endif
+$!
+$loop:
+$ ref_spec = f$search("''ref'...]*.*;",1)
+$ if ref_spec .eqs. "" then goto loop_end
+$!
+$ ref_dev = f$parse(ref_spec,,,"DEVICE")
+$ ref_dir = f$parse(ref_spec,,,"DIRECTORY")
+$ ref_dir = f$edit(ref_dir, "LOWERCASE")
+$ ref_name = f$parse(ref_spec,,,"NAME")
+$ ref_type = f$parse(ref_spec,,,"TYPE")
+$!
+$!
+$ rel_path = ref_dir - "[" - ref_base_dir
+$! rel_path_len = f$length(rel_path) - 1
+$! delim = f$extract(rel_path_len, 1, rel_path)
+$! rel_path = rel_path - ".]" - ".>" - "]" - ">"
+$! rel_path = rel_path + delim
+$!
+$ if ODS2_SYNTAX
+$ then
+$! if rel_path .eqs. ".examples.scripts^.noah]"
+$! then
+$! rel_path = ".examples.scripts_noah]"
+$! endif
+$! if rel_path .eqs. ".examples.scripts^.v2]"
+$! then
+$! rel_path = ".examples.scripts_v2]"
+$! endif
+$ endif
+$!
+$ wrk_path = wrk + rel_path
+$!
+$ ref_name_type = ref_name + ref_type
+$!
+$ if ODS2_SYNTAX
+$ then
+$ endif
+$!
+$ wrk_spec = wrk_path + ref_name_type
+$!
+$!
+$ wrk_chk = f$search(wrk_spec, 0)
+$ if wrk_chk .eqs. ""
+$ then
+$ if report_missing
+$ then
+$ write sys$output "''wrk_spec' is missing"
+$ endif
+$ if update_file
+$ then
+$ copy/log 'ref_spec' 'wrk_spec'
+$ endif
+$ goto loop
+$ endif
+$!
+$ wrk_name = f$parse(wrk_spec,,,"NAME")
+$ wrk_type = f$parse(wrk_spec,,,"TYPE")
+$ wrk_fname = wrk_name + wrk_type"
+$ ref_fname = ref_name + ref_type
+$!
+$ if ref_fname .nes. wrk_fname
+$ then
+$ write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
+$ endif
+$!
+$ ref_type = f$edit(ref_type, "UPCASE")
+$ if ref_type .eqs. ".DIR" then goto loop
+$!
+$ if ODS2_SYNTAX
+$ then
+$ ref_fname = f$edit(ref_fname, "LOWERCASE")
+$ endif
+$!
+$! These files are in the wrong format for VMS diff, and we don't change them.
+$ ref_skip = 0
+$ if ref_type .eqs. ".PDF" then ref_skip = 1
+$ if ref_type .eqs. ".HTML" then ref_skip = 1
+$ if ref_type .eqs. ".HQX" then ref_skip = 1
+$ if ref_type .eqs. ".P12" then ref_skip = 1
+$ if ref_type .eqs. "."
+$ then
+$ if f$locate("test", ref_fname) .eq. 0 then ref_skip = 1
+$ if ref_fname .eqs. "configure." then ref_skip = 1
+$ endif
+$ if ref_fname .eqs. "MACINSTALL.TXT" then ref_skip = 1
+$ if ref_fname .eqs. "$macinstall.txt" then ref_skip = 1
+$ if ref_fname .eqs. "curl.mcp$5nxml$5nsit$5nhqx" then ref_skip = 1
+$ if ref_fname .eqs. "curl_GUSIConfig.cpp" then ref_skip = 1
+$ if ref_fname .eqs. "curl_$gusic$onfig.cpp" then ref_skip = 1
+$ if ref_fname .eqs. "macos_main.cpp" then ref_skip = 1
+$!
+$!
+$ if ref_skip .ne. 0
+$ then
+$ if report_missing
+$ then
+$ write sys$output "Skipping diff of ''ref_fname'"
+$ endif
+$ goto loop
+$ endif
+$!
+$!
+$ wrk_ver = f$parse(wrk_chk,,,"VERSION")
+$ if wrk_ver .nes. ";1"
+$ then
+$ write sys$output "Version for ''wrk_spec' is not 1"
+$ endif
+$ set noon
+$ diff/out=nl: 'wrk_spec' 'ref_spec'
+$ if $severity .nes. "1"
+$ then
+$ write sys$output "''wrk_spec' is different from ''ref_spec'"
+$ if update_file
+$ then
+$ delete 'wrk_spec';*
+$ copy/log 'ref_spec' 'wrk_spec'
+$ endif
+$ endif
+$ set on
+$
+$!
+$ goto loop
+$loop_end:
+$!
+$!
+$missing_loop:
+$! For missing loop, check the latest generation.
+$ ref_spec = f$search("''wrk'...]*.*;")
+$ if ref_spec .eqs. "" then goto missing_loop_end
+$!
+$ ref_dev = f$parse(ref_spec,,,"DEVICE")
+$ ref_dir = f$parse(ref_spec,,,"DIRECTORY")
+$ ref_dir = f$edit(ref_dir, "LOWERCASE")
+$ ref_name = f$parse(ref_spec,,,"NAME")
+$ ref_type = f$parse(ref_spec,,,"TYPE")
+$ ref_name_type = ref_name + ref_type
+$!
+$ rel_path = ref_dir - "[" - wrk_base_dir
+$!
+$!
+$ wrk_path = ref + rel_path
+$ wrk_spec = wrk_path + ref_name + ref_type
+$ wrk_name = f$parse(wrk_spec,,,"NAME")
+$ wrk_type = f$parse(wrk_spec,,,"TYPE")
+$!
+$ wrk_fname = wrk_name + wrk_type"
+$ ref_fname = ref_name + ref_type
+$!
+$ wrk_skip = 0
+$ ref_utype = f$edit(ref_type,"UPCASE")
+$ ref_ufname = f$edit(ref_fname,"UPCASE")
+$!
+$ if wrk_skip .eq. 0
+$ then
+$ wrk_chk = f$search(wrk_spec, 0)
+$ if wrk_chk .eqs. ""
+$ then
+$ if report_missing
+$ then
+$ write sys$output "''wrk_spec' is missing"
+$ endif
+$ goto missing_loop
+$ endif
+$ else
+$ goto missing_loop
+$ endif
+$!
+$ if ref_fname .nes. wrk_fname
+$ then
+$ write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
+$ endif
+$!
+$ if ref_utype .eqs. ".DIR" then goto missing_loop
+$!
+$ wrk_ver = f$parse(wrk_chk,,,"VERSION")
+$ if wrk_ver .nes. ";1"
+$ then
+$ write sys$output "Version for ''wrk_spec' is not 1"
+$ endif
+$!
+$ goto missing_loop
+$!
+$!
+$missing_loop_end:
+$!
+$exit
diff --git a/packages/vms/config-vms.h b/packages/vms/config-vms.h
deleted file mode 100644
index 461001c1..00000000
--- a/packages/vms/config-vms.h
+++ /dev/null
@@ -1,371 +0,0 @@
-#ifndef HEADER_CONFIG_VMS_H
-#define HEADER_CONFIG_VMS_H
-
-/* */
-/* MSK, 02/05/04, Hand edited for trail build on Alpha V7.3, DEC C 6.5-003 */
-/* MSK, 03/09/04, Seems to work for all platforms I've built on so far. */
-/* Added HAVE_SYS_IOCTL_H define */
-/* TES, 10/06/04, Added MAX_INITIAL_POST_SIZE, HAVE_BASENAME */
-/* MSK, 02/02/05, Changed HAVE_TERMIOS_H to an undef since the change in */
-/* getpass.c no longer undef'd it during compile. */
-/* MSK, 02/08/05, turned two config-vms files into one by using USE_SSLEAY */
-/* MPZ, 12/28/05, changed HAVE_STRTOK_R define to use CRTL_VER */
-/* MSK, 01/27/07, needed to add HAVE_STRUCT_TIMEVAL define */
-
-/* Define cpu-machine-OS */
-#if defined(__alpha)
-# define OS "ALPHA-HP-VMS"
-#elif defined(__vax)
-# define OS "VAX-HP-VMS"
-#elif defined(__ia64)
-# define OS "IA64-HP-VMS"
-#else
-# define OS "UNKNOWN-HP-VMS"
-#endif
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long double', as computed by sizeof. */
-#define SIZEOF_LONG_DOUBLE 8
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* Define if you have the alarm function. */
-#define HAVE_ALARM 1
-
-/* Define if you have the geteuid function. */
-#define HAVE_GETEUID 1
-
-/* Define if you have the basename function. */
-#define HAVE_BASENAME 1
-
-/* Define if you have the gethostbyaddr function. */
-#define HAVE_GETHOSTBYADDR 1
-
-/* Define if you have the gethostname function. */
-#define HAVE_GETHOSTNAME 1
-
-/* Define if you have the getpwuid function. */
-#define HAVE_GETPWUID 1
-
-/* Define if you have the getservbyname function. */
-#define HAVE_GETSERVBYNAME 1
-
-/* Define if you have the gettimeofday function. */
-#define HAVE_GETTIMEOFDAY 1
-
-/* Define if you have the inet_addr function. */
-#define HAVE_INET_ADDR 1
-
-/* Define if you have the ioctl function. */
-#define HAVE_IOCTL 1
-
-/* Define if you have a working ioctl FIONBIO function. */
-#define HAVE_IOCTL_FIONBIO 1
-
-/* Define if you have a working ioctl SIOCGIFADDR function. */
-#define HAVE_IOCTL_SIOCGIFADDR 1
-
-/* Define if you have the perror function. */
-#define HAVE_PERROR 1
-
-/* Define if you have the select function. */
-#define HAVE_SELECT 1
-
-/* Define if you have the setvbuf function. */
-#define HAVE_SETVBUF 1
-
-/* Define if you have the sigaction function. */
-#define HAVE_SIGACTION 1
-
-/* Define if you have the signal function. */
-#define HAVE_SIGNAL 1
-
-/* Define if you have the socket function. */
-#define HAVE_SOCKET 1
-
-/* Define if you have the strcasecmp function. */
-#define HAVE_STRCASECMP 1
-
-/* Define if you have the strcmpi function. */
-/* #define HAVE_STRCMPI 1 */
-
-/* Define if you have the strdup function. */
-#define HAVE_STRDUP 1
-
-/* Define if you have the strftime function. */
-#define HAVE_STRFTIME 1
-
-/* Define if you have the stricmp function. */
-/* #define HAVE_STRICMP 1 */
-
-/* Define if you have the strstr function. */
-#define HAVE_STRSTR 1
-
-/* Define if you have the ftruncate function. */
-#define HAVE_FTRUNCATE 1
-
-/* Define if you have the uname function. */
-#define HAVE_UNAME 1
-
-/* Define if you have the <err.h> header file. */
-#define HAVE_ERR_H 1
-
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <getopt.h> header file. */
-#define HAVE_GETOPT_H 1
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
-/* Define if you need the malloc.h header header file even with stdlib.h */
-/* #define NEED_MALLOC_H 1 */
-
-/* Define if you have the <net/if.h> header file. */
-#define HAVE_NET_IF_H 1
-
-/* Define if you have the <netdb.h> header file. */
-#define HAVE_NETDB_H 1
-
-/* Define if you have the <netinet/if_ether.h> header file. */
-#define HAVE_NETINET_IF_ETHER_H 1
-
-/* Define if you have the <netinet/in.h> header file. */
-#define HAVE_NETINET_IN_H 1
-
-/* OpenSSL section starts here */
-
-/* Define if you have a working OpenSSL installation */
-#ifdef USE_SSLEAY
-
-/* if OpenSSL is in use */
-#define USE_OPENSSL 1
-
-/* Define if you have the crypto library (-lcrypto). */
-#define HAVE_LIBCRYPTO 1
-
-/* Define if you have the ssl library (-lssl). */
-#define HAVE_LIBSSL 1
-
-/* Define if you have the <openssl/crypto.h> header file. */
-#define HAVE_OPENSSL_CRYPTO_H 1
-
-/* Define if you have the <openssl/err.h> header file. */
-#define HAVE_OPENSSL_ERR_H 1
-
-/* Define if you have the <openssl/pem.h> header file. */
-#define HAVE_OPENSSL_PEM_H 1
-
-/* Define if you have the <openssl/rsa.h> header file. */
-#define HAVE_OPENSSL_RSA_H 1
-
-/* Define if you have the <openssl/ssl.h> header file. */
-#define HAVE_OPENSSL_SSL_H 1
-
-/* Define if you have the <openssl/x509.h> header file. */
-#define HAVE_OPENSSL_X509_H 1
-
-/*
- * This needs to be defined for OpenSSL 0.9.7 and other versions that have the
- * ENGINE stuff supported. If an include of "openssl/engine.h" fails, then
- * undefine the define below.
-*/
-#define HAVE_OPENSSL_ENGINE_H 1
-
-#endif /* USE_SSLEAY */
-/* OpenSSL section ends here */
-
-/* Define if you have the <pwd.h> header file. */
-#define HAVE_PWD_H 1
-
-/* Define if you have the <sgtty.h> header file. */
-#define HAVE_SGTTY_H 1
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <sys/socket.h> header file. */
-#define HAVE_SYS_SOCKET_H 1
-
-/* Define if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H
-
-/* Define if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define if you have the resolv library (-lresolv). */
-#define HAVE_LIBRESOLV 1
-
-/* Define if you have the socket library (-lsocket). */
-#define HAVE_LIBSOCKET 1
-
-/* Define if getaddrinfo exists and works */
-#define HAVE_GETADDRINFO 1
-
-/* Define if you have the <timeval.h> header file. */
-#define HAVE_TIMEVAL_H 1
-
-/* Define if you have the timeval struct. */
-#define HAVE_STRUCT_TIMEVAL 1
-
-/* Name of this package! */
-#define PACKAGE "not-used"
-
-/* Version number of this archive. */
-#define VERSION "not-used"
-
-/* Define if you have the getpass function. */
-#undef HAVE_GETPASS
-
-/* Define if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define if you have the `strtok_r' function. */
-/* Condition lifted from <string.h> */
-#if __CRTL_VER >= 70301000
-# define HAVE_STRTOK_R 1
-#endif
-
-/* Define if you have the `strtoll' function. */
-#define HAVE_STRTOLL 1
-
-/* Define if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you need the memory.h header file even with stdlib.h */
-#define NEED_MEMORY_H 1
-
-/* Define if you have the `sigsetjmp' function. */
-#define HAVE_SIGSETJMP 1
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#define HAVE_SETJMP_H 1
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#define HAVE_SYS_IOCTL_H 1
-
-/* Define to 1 if you have the <stropts.h> header file. */
-#define HAVE_STROPTS_H 1
-
-/* Define if you have the getnameinfo function. */
-#define HAVE_GETNAMEINFO 1
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#define GETNAMEINFO_QUAL_ARG1 const
-
-/* Define to the type of arg 1 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-
-/* Define to the type of arg 2 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG2 size_t
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG46 size_t
-
-/* Define to the type of arg 7 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG7 int
-
-/* Define if you have the recv function. */
-#define HAVE_RECV 1
-
-/* Define to the type of arg 1 for recv. */
-#define RECV_TYPE_ARG1 int
-
-/* Define to the type of arg 2 for recv. */
-#define RECV_TYPE_ARG2 void *
-
-/* Define to the type of arg 3 for recv. */
-#define RECV_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recv. */
-#define RECV_TYPE_ARG4 int
-
-/* Define to the function return type for recv. */
-#define RECV_TYPE_RETV int
-
-/* Define if you have the recvfrom function. */
-#define HAVE_RECVFROM 1
-
-/* Define to the type of arg 1 for recvfrom. */
-#define RECVFROM_TYPE_ARG1 int
-
-/* Define to the type pointed by arg 2 for recvfrom. */
-#define RECVFROM_TYPE_ARG2 void
-
-/* Define if the type pointed by arg 2 for recvfrom is void. */
-#define RECVFROM_TYPE_ARG2_IS_VOID 1
-
-/* Define to the type of arg 3 for recvfrom. */
-#define RECVFROM_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recvfrom. */
-#define RECVFROM_TYPE_ARG4 int
-
-/* Define to the type pointed by arg 5 for recvfrom. */
-#define RECVFROM_TYPE_ARG5 struct sockaddr
-
-/* Define to the type pointed by arg 6 for recvfrom. */
-#define RECVFROM_TYPE_ARG6 int
-
-/* Define to the function return type for recvfrom. */
-#define RECVFROM_TYPE_RETV int
-
-/* Define if you have the send function. */
-#define HAVE_SEND 1
-
-/* Define to the type of arg 1 for send. */
-#define SEND_TYPE_ARG1 int
-
-/* Define to the type qualifier of arg 2 for send. */
-#define SEND_QUAL_ARG2 const
-
-/* Define to the type of arg 2 for send. */
-#define SEND_TYPE_ARG2 void *
-
-/* Define to the type of arg 3 for send. */
-#define SEND_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for send. */
-#define SEND_TYPE_ARG4 int
-
-/* Define to the function return type for send. */
-#define SEND_TYPE_RETV int
-
-/* Define to hide dollar sign from compilers in strict ansi mode. */
-#define decc_translate_vms(__s) decc$translate_vms(__s)
-
-#endif /* HEADER_CONFIG_VMS_H */
diff --git a/packages/vms/config_h.com b/packages/vms/config_h.com
new file mode 100644
index 00000000..2a5503f7
--- /dev/null
+++ b/packages/vms/config_h.com
@@ -0,0 +1,2184 @@
+$! File: config_h.com
+$!
+$! $Id: config_h.com,v 1.1.1.1 2012/12/02 19:25:21 wb8tyw Exp $
+$!
+$! This procedure attempts to figure out how to build a config.h file
+$! for the current project.
+$!
+$! P1 specifies the config.h.in file or equivalent. If it is not specified
+$! then this procedure will search for several common names of the file.
+$!
+$! The CONFIGURE shell script will be examined for hints and a few symbols
+$! but most of the tests will not produce valid results on OpenVMS. Some
+$! will produce false positives and some will produce false negatives.
+$!
+$! It is easier to just read the config.h_in file and make up tests based
+$! on what is in it!
+$!
+$! This file will create an empty config_vms.h file if one does not exist.
+$! The config_vms.h is intended for manual edits to handle things that
+$! this procedure can not.
+$!
+$! The config_vms.h will be invoked by the resulting config.h file.
+$!
+$! This procedure knows about the DEC C RTL on the system it is on.
+$! Future versions may be handle the GNV, the OpenVMS porting library,
+$! and others.
+$!
+$! This procedure may not guess the options correctly for all architectures,
+$! and is a work in progress.
+$!
+$! Copyright 2011, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 15-Jan-2001 J. Malmberg Original
+$! 29-Apr-2001 J. Malmberg Also look for config.*in* in a [.include]
+$! subdirectory
+$! 30-Apr-2001 J. Malmberg Update for SAMBA checks
+$! 09-Apr-2005 J. Malmberg Update for RSYNC and large file.
+$! 29-Sep-2011 J. Malmberg Update for Bash 4.2
+$! 01-Mar-2012 J. Malmberg Warn about getcwd(0,0)
+$! 21-Dec-2012 J. Malmberg Update for gawk
+$! 29-Dec-2012 J. Malmberg Update for curl
+$!============================================================================
+$!
+$ss_normal = 1
+$ss_abort = 44
+$ss_control_y = 1556
+$status = ss_normal
+$on control_y then goto control_y
+$on warning then goto general_error
+$!on warning then set ver
+$!
+$! Some information for writing timestamps to created files
+$!----------------------------------------------------------
+$my_proc = f$environment("PROCEDURE")
+$my_proc_file = f$parse(my_proc,,,"NAME") + f$parse(my_proc,,,"TYPE")
+$tab[0,8] = 9
+$datetime = f$element(0,".",f$cvtime(,"ABSOLUTE","DATETIME"))
+$username = f$edit(f$getjpi("","USERNAME"),"TRIM")
+$!
+$pid = f$getjpi("","PID")
+$tfile1 = "SYS$SCRATCH:config_h_temp1_''pid'.TEMP"
+$dchfile = "SYS$SCRATCH:config_h_decc_''pid'.TEMP"
+$starhfile = "SYS$SCRATCH:config_h_starlet_''pid'.TEMP"
+$configure_script = "SYS$SCRATCH:configure_script_''pid'.TEMP"
+$!
+$! Get the system type
+$!----------------------
+$arch_type = f$getsyi("arch_type")
+$!
+$! Does config_vms.h exist?
+$!-------------------------
+$update_config_vms = 0
+$file = f$search("sys$disk:[]config_vms.h")
+$if file .nes. ""
+$then
+$ write sys$output "Found existing custom file ''file'."
+$else
+$ update_config_vms = 1
+$ write sys$output "Creating new sys$disk:[]config_vms.h for you."
+$ gosub write_config_vms
+$endif
+$!
+$!
+$! On some platforms, DCL search has problems with searching a file
+$! on a NFS mounted volume. So copy it to sys$scratch:
+$!
+$if f$search(configure_script) .nes. "" then delete 'configure_script';*
+$copy sys$disk:[]configure 'configure_script'
+$!
+$ssl_header_dir = "OPENSSL:"
+$if f$trnlnm("OPENSSL") .eqs. ""
+$then
+$ ssl_header_dir = "SSL$INCLUDE:"
+$endif
+$!
+$!
+$! Write out the header
+$!----------------------
+$gosub write_config_h_header
+$!
+$!
+$!
+$! config.h.in could have at least five different names depending
+$! on how it was transferred to OpenVMS
+$!------------------------------------------------------------------
+$if p1 .nes. ""
+$then
+$ cfile = p1
+$else
+$ cfile = f$search("sys$disk:[]config.h.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("sys$disk:[]config.h_in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("sys$disk:[]configh.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("sys$disk:[]config__2eh.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("sys$disk:[]config.h__2ein")
+$ endif
+$ endif
+$ endif
+$ endif
+$endif
+$if f$trnlnm("PRJ_INCLUDE") .nes. ""
+$then
+$ cfile = f$search("PRJ_INCLUDE:config.h.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("PRJ_INCLUDE:config.h_in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("PRJ_INCLUDE:config__2eh.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("PRJ_INCLUDE:config__2eh.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("PRJ_INCLUDE:config.h__2ein")
+$ endif
+$ endif
+$ endif
+$ endif
+$endif
+$if cfile .eqs. ""
+$then
+$ write sys$output "Can not find sys$disk:config.h.in"
+$ line_out = "Looked for config.h.in, config.h_in, configh.in, "
+$ line_out = line_out + "config__2eh.in, config.h__2ein"
+$ write/symbol sys$output line_out
+$ if f$trnlnm("PRJ_INCLUDE") .nes. ""
+$ then
+$ write sys$output "Also looked in PRJ_INCLUDE: for these files."
+$ endif
+$!
+$ write tf ""
+$ write tf -
+ " /* Could not find sys$disk:config.h.in */"
+$ write tf -
+ " /* Looked also for config.h_in, configh.in, config__2eh.in, */"
+$ write tf -
+ " /* config.h__2ein */"
+$ if f$trnlnm("PRJ_INCLUDE") .nes. ""
+$ then
+$ write tf -
+ " /* Also looked in PRJ_INCLUDE: for these files. */"
+$ endif
+$ write tf -
+ "/*--------------------------------------------------------------*/
+$ write tf ""
+$ goto write_tail
+$endif
+$!
+$!
+$! Locate the DECC libraries in use
+$!-----------------------------------
+$decc_rtldef = f$parse("decc$rtldef","sys$library:.tlb;0")
+$decc_starletdef = f$parse("sys$starlet_c","sys$library:.tlb;0")
+$decc_shr = f$parse("decc$shr","sys$share:.exe;0")
+$!
+$! Dump the DECC header names into a file
+$!----------------------------------------
+$if f$search(dchfile) .nes. "" then delete 'dchfile';*
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$define/user sys$output 'tfile1'
+$library/list 'decc_rtldef'
+$open/read/error=rtldef_loop1_end tf1 'tfile1'
+$open/write/error=rtldef_loop1_end tf2 'dchfile'
+$rtldef_loop1:
+$ read/end=rtldef_loop1_end tf1 line_in
+$ line_in = f$edit(line_in,"TRIM,COMPRESS")
+$ key1 = f$element(0," ",line_in)
+$ key2 = f$element(1," ",line_in)
+$ if key1 .eqs. " " .or. key1 .eqs. "" then goto rtldef_loop1
+$ if key2 .nes. " " .and. key2 .nes. "" then goto rtldef_loop1
+$ write tf2 "|",key1,"|"
+$ goto rtldef_loop1
+$rtldef_loop1_end:
+$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1
+$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$!
+$! Dump the STARLET header names into a file
+$!----------------------------------------
+$if f$search(starhfile) .nes. "" then delete 'starhfile';*
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$define/user sys$output 'tfile1'
+$library/list 'decc_starletdef'
+$open/read/error=stardef_loop1_end tf1 'tfile1'
+$open/write/error=stardef_loop1_end tf2 'starhfile'
+$stardef_loop1:
+$ read/end=stardef_loop1_end tf1 line_in
+$ line_in = f$edit(line_in,"TRIM,COMPRESS")
+$ key1 = f$element(0," ",line_in)
+$ key2 = f$element(1," ",line_in)
+$ if key1 .eqs. " " .or. key1 .eqs. "" then goto stardef_loop1
+$ if key2 .nes. " " .and. key2 .nes. "" then goto stardef_loop1
+$ write tf2 "|",key1,"|"
+$ goto stardef_loop1
+$stardef_loop1_end:
+$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1
+$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$!
+$!
+$! Now calculate what should be in the file from reading
+$! config.h.in and CONFIGURE.
+$!---------------------------------------------------------------
+$open/read inf 'cfile'
+$do_comment = 0
+$if_block = 0
+$cfgh_in_loop1:
+$!set nover
+$ read/end=cfgh_in_loop1_end inf line_in
+$ xline = f$edit(line_in,"TRIM,COMPRESS")
+$!
+$! Blank line handling
+$!---------------------
+$ if xline .eqs. ""
+$ then
+$ write tf ""
+$ goto cfgh_in_loop1
+$ endif
+$ xlen = f$length(xline)
+$ key = f$extract(0,2,xline)
+$!
+$! deal with comments by copying exactly
+$!-----------------------------------------
+$ if (do_comment .eq. 1) .or. (key .eqs. "/*")
+$ then
+$ do_comment = 1
+$ write tf line_in
+$ key = f$extract(xlen - 2, 2, xline)
+$ if key .eqs. "*/" then do_comment = 0
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Some quick parsing
+$!----------------------
+$ keyif = f$extract(0,3,xline)
+$ key1 = f$element(0," ",xline)
+$ key2 = f$element(1," ",xline)
+$ key2a = f$element(0,"_",key2)
+$ key2b = f$element(1,"_",key2)
+$ key2_len = f$length(key2)
+$ key2_h = f$extract(key2_len - 2, 2, key2)
+$ key2_t = f$extract(key2_len - 5, 5, key2)
+$ if key2_t .eqs. "_TYPE" then key2_h = "_T"
+$ key64 = 0
+$ if f$locate("64", xline) .lt. xlen then key64 = 1
+$!
+$!write sys$output "xline = ''xline'"
+$!
+$! Comment out this section of the ifblock
+$!-----------------------------------------
+$ if if_block .ge. 3
+$ then
+$ write tf "/* ", xline, " */"
+$ if keyif .eqs. "#en" then if_block = 0
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Handle the end of an ifblock
+$!-------------------------------
+$ if keyif .eqs. "#en"
+$ then
+$ write tf xline
+$ if_block = 0
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key1 .eqs. "#ifndef"
+$ then
+$! Manual check for _ALL_SOURCE on AIX error
+$!-----------------------------------------------
+$ if key2 .eqs. "_ALL_SOURCE"
+$ then
+$ write tf "/* ", xline, " */"
+$!
+$! Ignore the rest of the block
+$!--------------------------------------
+$ if_block = 3
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$! Default action for an #if/#else/#endif
+$!------------------------------------------
+$ if keyif .eqs. "#if" .or. keyif .eqs. "#el"
+$ then
+$ if_block = 1
+$ write tf xline
+$ goto cfgh_in_loop1
+$ endif
+$!
+$!
+$! Process "normal?" stuff
+$!---------------------------
+$ if key1 .eqs. "#undef"
+$ then
+$ key2c = f$element(2, "_", key2)
+$ if (key2c .eqs. "_") .or. (key2c .eqs. "H") then key2c = ""
+$ key2d = f$element(3, "_", key2)
+$ if (key2d .eqs. "_") .or. (key2d .eqs. "H") then key2d = ""
+$ key2e = f$element(4, "_", key2)
+$ if (key2e .eqs. "_") .or. (key2e .eqs. "H") then key2e = ""
+$ if key2d .eqs. "T"
+$ then
+$ if key2e .eqs. "TYPE"
+$ then
+$ key2_h = "_T"
+$ key2d = ""
+$ endif
+$ endif
+$!
+$ double_under = 0
+$!
+$! Process FCNTL directives
+$!-------------------------------------
+$ if (key2b .eqs. "FCNTL") .and. (key2c .eqs. "O") .and. -
+ (key2d .eqs. "NONBLOCK")
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process GETADDRINFO directives
+$!-------------------------------------
+$ if key2 .eqs. "GETADDRINFO_THREADSAFE"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process IOCTL directives
+$!-------------------------------------
+$ if (key2b .eqs. "IOCTL") .and. (key2c .nes. "")
+$ then
+$ if (key2c .eqs. "FIONBIO") .or. (key2c .eqs. "SIOCGIFADDR")
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$! Manual check for LL on
+$!-----------------------------------------------
+$ if key2 .eqs. "LL"
+$ then
+$ write tf "#ifndef __VAX
+$ write tf "#define HAVE_''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "bool_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' short"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "bits16_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' short"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "u_bits16_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' unsigned short"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "bits32_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "u_bits32_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' unsigned int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "intmax_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#ifdef __VAX"
+$ write tf "#define ''key2' long"
+$ write tf "#else"
+$ write tf "#define ''key2' long long"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "uintmax_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#ifdef __VAX"
+$ write tf "#define ''key2' unsigned long"
+$ write tf "#else"
+$ write tf "#define ''key2' unsigned long long"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "socklen_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "GETGROUPS_T"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' gid_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_SYS_SIGLIST"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_SYS_ERRLIST"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_STRUCT_DIRENT_D_INO"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_STRUCT_TIMEVAL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! ! The header files have this information, however
+$! ! The ioctl() call only works on sockets.
+$! if key2 .eqs. "FIONREAD_IN_SYS_IOCTL"
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ''key2' 1"
+$! write tf "#endif"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$! ! The header files have this information, however
+$! ! The ioctl() call only works on sockets.
+$! if key2 .eqs. "GWINSZ_IN_SYS_IOCTL"
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ''key2' 1"
+$! write tf "#endif"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$! ! The header files have this information, however
+$! ! The ioctl() call only works on sockets.
+$! if key2 .eqs. "STRUCT_WINSIZE_IN_SYS_IOCTL"
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ''key2' 0"
+$! write tf "#endif"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$ if key2 .eqs. "HAVE_STRUCT_TM_TM_ZONE"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_TM_ZONE"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_TIMEVAL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "WEXITSTATUS_OFFSET"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 2"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_GETPW_DECLS"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_CONFSTR"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_PRINTF"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_SBRK"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRSIGNAL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2a .eqs. "HAVE_DECL_STRTOLD"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOIMAX"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOLL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOUL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOULL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOUMAX"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "GETPGRP_VOID"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "NAMED_PIPES_MISSING"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "OPENDIR_NOT_ROBUST"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "PGRP_PIPE"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "CAN_REDEFINE_GETENV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_PRINTF_A_FORMAT"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "CTYPE_NON_ASCII"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_LANGINFO_CODESET"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! This wants execve() to do this automagically to pass.
+$! if key2 .eqs. "HAVE_HASH_BANG_EXEC"
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ''key2' 1"
+$! write tf "#endif"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$ if key2 .eqs. "ICONV_CONST"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2'"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "VOID_SIGHANDLER"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_POSIX_SIGNALS"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "UNUSABLE_RT_SIGNALS"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2a .eqs. "HAVE_DECL_FPURGE"
+$ then
+$ write tf "#ifndef ''key2a'"
+$ write tf "#define ''key2a' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_SETREGID"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_POSIX_SIGSETJMP"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_LIBDL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_ENGINE_LOAD_BUILTIN_ENGINES"
+$ then
+$ if f$search("''ssl_header_dir'engine.h") .nes. ""
+$ then
+$ search_key = key2 - "HAVE_"
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/output=nl: 'ssl_header_dir'engine.h 'search_key'
+$ if '$severity' .eq. 1
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ else
+$ write tf "/* #undef ''key2' */"
+$ endif
+$ else
+$ write tf "/* #undef ''key2' */"
+$ endif
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_SSL_GET_SHUTDOWN"
+$ then
+$ if f$search("''ssl_header_dir'ssl.h") .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ else
+$ write tf "/* #undef ''key2' */"
+$ endif
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2b .eqs. "RAND" .and. key2c .nes. "" .and. key2d .eqs. ""
+$ then
+$ if (key2c .eqs. "EGD") .or. -
+ (key2c .eqs. "STATUS") .or. -
+ (key2c .eqs. "SCREEN")
+$ then
+$ if f$search("''ssl_header_dir'rand.h") .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ else
+$ write tf "/* #undef ''key2' */"
+$ endif
+$ endif
+$ endif
+$!
+$ if key2 .eqs. "STRCOLL_BROKEN"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "DUP_BROKEN"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! This is for a test that getcwd(0,0) works.
+$! It does not on VMS.
+$!--------------------------
+$ if key2 .eqs. "GETCWD_BROKEN"
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being tested for!"
+$ write sys$output -
+ "-CONFIG_H-I-GETCWD, GETCWD(0,0) does not work on VMS."
+$ write sys$output -
+ "-CONFIG_H-I-GETCWD2, Work around hack probably required."
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of ''key2' settings */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if (key2a .eqs. "HAVE") .or. (key2a .eqs. "STAT") .or. -
+ (key2 .eqs. "ENABLE_IPV6") .or. (key2b .eqs. "LDAP")
+$ then
+$!
+$! Process extra underscores
+$!------------------------------------
+$ if f$locate("HAVE___", key2) .lt. key2_len
+$ then
+$ key2b = "__" + key2d
+$ key2d = ""
+$ double_under = 1
+$ else
+$ if f$locate("HAVE__", key2) .lt. key2_len
+$ then
+$ key2b = "_" + key2c
+$ key2c = ""
+$ double_under = 1
+$ endif
+$ endif
+$!
+$ if (key2_h .eqs. "_H") .or. (key2 .eqs. "ENABLE_IPV6") .or. -
+ (key2b .eqs. "LDAP")
+$ then
+$!
+$! Looking for a header file
+$!---------------------------------------
+$ headf = key2b
+$ if key2c .nes. "" then headf = headf + "_" + key2c
+$ if key2d .nes. "" then headf = headf + "_" + key2d
+$!
+$! (key2b .eqs. "READLINE")
+$!
+$! Some special parsing
+$!------------------------------------------
+$ if (key2b .eqs. "SYS") .or. (key2b .eqs. "ARPA") .or. -
+ (key2b .eqs. "NET") .or. (key2b .eqs. "NETINET")
+$ then
+$ if key2c .nes. ""
+$ then
+$ headf = key2c
+$ if key2d .nes. "" then headf = key2c + "_" + key2d
+$ endif
+$ endif
+$!
+$! And of course what's life with out some special cases
+$!--------------------------------------------------------------------
+$ if key2 .eqs. "ENABLE_IPV6"
+$ then
+$ headf = "in6"
+$ endif
+$!
+$ if key2b .eqs. "LDAP"
+$ then
+$ if (key2 .eqs. "HAVE_LDAP_SSL") .or. -
+ (key2 .eqs. "HAVE_LDAP_URL_PARSE")
+$ then
+$ headf = "ldap"
+$ endif
+$ endif
+$!
+$!
+$ if key2b .eqs. "FILE"
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$ write sys$output -
+ "-CONFIG_H-I-FILE_OLD, file.h will not be configured as is obsolete!"
+$ write sys$output -
+ "-CONFIG_H_I-FCNTL_NEW, "Expecting fcntl.h to be configured instead!"
+$ write sys$output -
+ "-CONFIG_H_I-FCNTL_CHK, "Unable to verify at this time!"
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$!
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of fcntl.h instead of file.h */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$ endif
+$!
+$! Now look it up in the DEC C RTL
+$!---------------------------------------------
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/output=nl: 'dchfile' |'headf'|/exact
+$ if '$severity' .eq. 1
+$ then
+$ if key64 then write tf "#ifndef __VAX"
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''dchfile' - #define ''key2' 1"
+$ write tf "#endif"
+$ if key64 then write tf "#endif"
+$set nover
+$ goto cfgh_in_loop1
+$ endif
+$!
+$!
+$! Now look it up in the DEC C STARLET_C
+$!---------------------------------------------
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/output=nl: 'starhfile' |'headf'|/exact
+$ if '$severity' .eq. 1
+$ then
+$ if key64 then write tf "#ifndef __VAX"
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''starfile' - #define ''key2' 1"
+$ write tf "#endif"
+$ if key64 then write tf "#endif"
+$set nover
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Now look for OPENSSL headers
+$!---------------------------------------------------------
+$ if key2b .eqs. "OPENSSL"
+$ then
+$ headf = headf - "OPENSSL_"
+$ header = f$search("''ssl_header_dir'''headf'.h")
+$ if header .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$set nover
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$! Now look for Kerberos
+$!------------------------------------------------------------
+$ if key2b .eqs. "GSSAPI"
+$ then
+$ header_dir = "sys$sysroot:[kerberos.include]"
+$ headf = headf - "GSSAPI_"
+$ header = f$search("''header_dir'''headf'.h")
+$ if header .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$set nover
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$set nover
+$ else
+$!
+$! Looking for a routine or a symbol
+$!------------------------------------------------
+$ if key2c .eqs. "MACRO"
+$ then
+$ if (key2b .eqs. "FILE") .or. (key2b .eqs. "DATE") -
+ .or. (key2b .eqs. "LINE") .or. (key2b .eqs. "TIME")
+$ then
+$ write tf "#ifndef HAVE_''key2b'"
+$ write tf "#define HAVE_''key2b' 1"
+$ write tf "#endif"
+$ endif
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Special false tests
+$!-------------------------------------
+$ if double_under
+$ then
+$ if key2b .eqs. "_FCNTL" .or. key2b .eqs. "__FCNTL"
+$ then
+$ write tf "/* #undef HAVE_''key2b' */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2b .eqs. "_STAT" .or. key2b .eqs. "__STAT"
+$ then
+$ write tf "/* #undef HAVE_''key2b' */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2b .eqs. "_READ" .or. key2b .eqs. "__READ"
+$ then
+$ write tf "/* #undef HAVE_''key2b' */"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$ keysym = key2b
+$ if key2c .nes. "" then keysym = keysym + "_" + key2c
+$ if key2d .nes. "" then keysym = keysym + "_" + key2d
+$ if key2e .nes. "" then keysym = keysym + "_" + key2e
+$!
+$!
+$! Stat structure members
+$!-------------------------------------
+$ if key2b .eqs. "STRUCT"
+$ then
+$ if key2c .eqs. "STAT" .and (key2d .nes. "")
+$ then
+$ key2b = key2b + "_" + key2c + "_" + key2d
+$ key2c = key2e
+$ key2d = ""
+$ key2e = ""
+$ endif
+$ endif
+$ if (key2b .eqs. "ST") .or. (key2b .eqs. "STRUCT_STAT_ST")
+$ then
+$ keysym = "ST" + "_" + key2c
+$ keysym = f$edit(keysym,"LOWERCASE")
+$ endif
+$ if key2a .eqs. "STAT"
+$ then
+$ if (f$locate("STATVFS", key2b) .eq. 0) .and. key2c .eqs. ""
+$ then
+$ keysym = f$edit(key2b, "LOWERCASE")
+$ endif
+$!$ if (key2b .eqs. "STATVFS" .or. key2b .eqs. "STATFS2" -
+$! .or. key2b .eqs. "STATFS3") .and. key2c .nes. ""
+$!
+$ if (key2b .eqs. "STATVFS") .and. key2c .nes. ""
+$ then
+$! Should really verify that the structure
+$! named by key2b actually exists first.
+$!------------------------------------------------------------
+$!
+$! Statvfs structure members
+$!-------------------------------------------------
+$ keysym = "f_" + f$edit(key2c,"LOWERCASE")
+$ endif
+$ endif
+$!
+$! UTMPX structure members
+$!--------------------------------------
+$ if key2b .eqs. "UT" .and. key2c .eqs. "UT"
+$ then
+$ keysym = "ut_" + f$edit(key2d,"LOWERCASE")
+$ endif
+$!
+$ if f$locate("MMAP",key2) .lt. key2_len
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$ write sys$output -
+ "-CONFIG_H-I-MMAP, MMAP operations only work on STREAM and BINARY files!"
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of ''key2' settings */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$ endif
+$!
+$!
+$ if keysym .eqs. "CRYPT"
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$ write sys$output -
+ "-CONFIG_H-I-CRYPT, CRYPT operations on the VMS SYSUAF may not work!"
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of ''keysym' */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$ endif
+$!
+$!
+$ if keysym .eqs. "EXECL"
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$ write sys$output -
+ "-CONFIG_H-I-EXCEL, EXECL configured, Will probably not work."
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of ''keysym' */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$ endif
+$!
+$!
+$! Process if cpp supports ANSI-C stringizing '#' operator
+$!-----------------------------------------------------------------------
+$ if keysym .eqs. "STRINGIZE"
+$ then
+$ write tf "#ifndef HAVE_STRINGIZE"
+$ write tf "#define HAVE_STRINGSIZE 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "VOLATILE"
+$ then
+$ write tf "#ifndef HAVE_VOLATILE"
+$ write tf "#define HAVE_VOLATILE 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "ALLOCA"
+$ then
+$ write tf "#ifndef HAVE_ALLOCA"
+$ write tf "#define HAVE_ALLOCA 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "ERRNO_DECL"
+$ then
+$ write tf "#ifndef HAVE_ERRNO_DECL"
+$ write tf "#define HAVE_ERRNO_DECL 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "LONGLONG"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_LONGLONG"
+$ write tf "#define HAVE_LONGLONG 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! May need to test compiler version
+$!-----------------------------------------------
+$ if keysym .eqs. "LONG_LONG"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_LONG_LONG"
+$ write tf "#define HAVE_LONG_LONG 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! May need to test compiler version
+$!-----------------------------------------------
+$ if keysym .eqs. "UNSIGNED_LONG_LONG"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_UNSIGNED_LONG_LONG"
+$ write tf "#define HAVE_UNSIGNED_LONG_LONG 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! May need to test compiler version
+$!-----------------------------------------------
+$ if keysym .eqs. "UNSIGNED_LONG_LONG_INT"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_UNSIGNED_LONG_LONG_INT"
+$ write tf "#define HAVE_UNSIGNED_LONG_LONG_INT 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! May need to test compiler version
+$!-----------------------------------------------
+$ if keysym .eqs. "LONG_DOUBLE"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_LONG_DOUBLE"
+$ write tf "#define HAVE_LONG_DOUBLE 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "FCNTL_LOCK"
+$ then
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$!
+$! These libraries are provided by the DEC C RTL
+$!-------------------------------------------------------------
+$ if keysym .eqs. "LIBINET" .or. keysym .eqs. "LIBSOCKET"
+$ then
+$ write tf "#ifndef HAVE_''keysym'"
+$ write tf "#define HAVE_''keysym' 1"
+$if p2 .nes. "" then write sys$output "''decc_shr' #define ''keysym' 1"
+$ write tf "#endif
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "HERRNO" then keysym = "h_errno"
+$ if keysym .eqs. "UTIMBUF" then keysym = "utimbuf"
+$ if key2c .eqs. "STRUCT"
+$ then
+$ keysym = f$edit(key2d,"LOWERCASE")
+$ else
+$ if key2_h .eqs. "_T"
+$ then
+$ if key2_t .eqs. "_TYPE"
+$ then
+$ keysym = f$extract(0, key2_len - 5, key2) - "HAVE_"
+$ endif
+$ keysym = f$edit(keysym,"LOWERCASE")
+$ endif
+$ endif
+$!
+$! Check the DEC C RTL shared image first
+$!------------------------------------------------------
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/format=nonull/out='tfile1' 'decc_shr' 'keysym'
+$ if '$severity' .eq. 1
+$ then
+$!
+$! Not documented, but from observation
+$!------------------------------------------------------
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ if arch_type .eq. 3
+$ then
+$ keyterm = "''keysym'<SOH>"
+$ else
+$ if arch_type .eq. 2
+$ then
+$ keyterm = "''keysym'<BS>"
+$ else
+$ keyterm = "''keysym'<STX>"
+$ endif
+$ endif
+$ search/out=nl: 'tfile1' -
+ "$''keyterm'","$g''keyterm'","$__utc_''keyterm'",-
+ "$__utctz_''keyterm'","$__bsd44_''keyterm'","$bsd_''keyterm'",-
+ "$''keysym'decc$","$G''keysym'decc$","$GX''keyterm'"
+$ severity = '$severity'
+$!
+$!
+$! Of course the 64 bit stuff is different
+$!---------------------------------------------------------
+$ if severity .ne. 1 .and. key64
+$ then
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/out=nl: 'tfile1' "$_''keyterm'"
+$! search/out 'tfile1' "$_''keyterm'"
+$ severity = '$severity'
+$ endif
+$!
+$! Unix compatability routines
+$!---------------------------------------------
+$ if severity .ne. 1
+$ then
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/out=nl: 'tfile1' -
+ "$__unix_''keyterm'","$__vms_''keyterm'","$_posix_''keyterm'"
+$ severity = '$severity'
+$ endif
+$!
+$! Show the result of the search
+$!------------------------------------------------
+$ if 'severity' .eq. 1
+$ then
+$ if key64 then write tf "#ifndef __VAX"
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''decc_shr' #define ''key2' 1"
+$ write tf "#endif"
+$ if key64 then write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$!
+$! Check the DECC Header files next
+$!----------------------------------------------
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/out=nl: 'decc_rtldef' -
+ "''keysym';", "''keysym'[", "struct ''keysym'"/exact
+$ severity = '$severity'
+$ if severity .eq. 1
+$ then
+$ if key64 then write tf "#ifndef __VAX"
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''decc_rtldef' #define ''key2' 1"
+$ write tf "#endif"
+$ if key64 then write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Check kerberos
+$!--------------------------------------------
+$ if f$search("SYS$SYSROOT:[kerberos]include.dir") .nes. ""
+$ then
+$ test_mit = "SYS$SYSROOT:[kerberos.include]gssapi_krb5.h"
+$ if (key2 .eqs. "HAVE_GSSAPI")
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! This is really do we have the newer MIT Kerberos
+$!----------------------------------------------------------------------
+$ if (key2 .eqs. "HAVE_GSSMIT")
+$ then
+$ if f$search(test_mit) .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ else
+$ write tf "#ifdef ''key2'"
+$ write tf "#undef ''key2'"
+$ endif
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Older MIT looks like Heimdal
+$!------------------------------------------------
+$ if (key2 .eqs. "HAVE_HEIMDAL")
+$ then
+$ if f$search(test_mit) .eqs. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ else
+$ write tf "#ifdef ''key2'"
+$ write tf "#undef ''key2'"
+$ endif
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$ endif
+$ write tf "/* ", xline, " */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$!
+$! Process SIZEOF directives found in SAMBA and others
+$!----------------------------------------------------------
+$ if key2a .eqs. "SIZEOF"
+$ then
+$ if key2b .eqs. "INO" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_INO_T"
+$ write tf "#if !__USING_STD_STAT
+$ write tf "#define SIZEOF_INO_T 6"
+$ write tf "#else
+$ write tf "#define SIZEOF_INO_T 8"
+$ write tf "#endif
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "INTMAX" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_INTMAX_T"
+$ write tf "#ifdef __VAX"
+$ write tf "#define SIZEOF_INTMAX_T 4"
+$ write tf "#else"
+$ write tf "#define SIZEOF_INTMAX_T 8"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "OFF" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_OFF_T"
+$ write tf "#if __USE_OFF64_T"
+$ write tf "#define SIZEOF_OFF_T 8"
+$ write tf "#else"
+$ write tf "#define SIZEOF_OFF_T 4"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "CHAR" .and. key2_h .eqs. "_P"
+$ then
+$ write tf "#ifndef SIZEOF_CHAR_P"
+$ write tf "#if __INITIAL_POINTER_SIZE == 64"
+$ write tf "#define SIZEOF_CHAR_P 8"
+$ write tf "#else"
+$ write tf "#define SIZEOF_CHAR_P 4"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "VOIDP"
+$ then
+$ write tf "#ifndef SIZEOF_VOIDP"
+$ write tf "#if __INITIAL_POINTER_SIZE == 64"
+$ write tf "#define SIZEOF_VOIDP 8"
+$ write tf "#else"
+$ write tf "#define SIZEOF_VOIDP 4"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "INT"
+$ then
+$ write tf "#ifndef SIZEOF_INT"
+$ write tf "#define SIZEOF_INT 4"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "SIZE" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_SIZE_T"
+$ write tf "#define SIZEOF_SIZE_T 4"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "TIME" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_TIME_T"
+$ write tf "#define SIZEOF_TIME_T 4"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "DOUBLE"
+$ then
+$ write tf "#ifndef SIZEOF_DOUBLE"
+$ write tf "#define SIZEOF_DOUBLE 8"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "LONG"
+$ then
+$ if key2c .eqs. ""
+$ then
+$ write tf "#ifndef SIZEOF_LONG"
+$ write tf "#define SIZEOF_LONG 4"
+$ write tf "#endif"
+$ else
+$ write tf "#ifndef SIZEOF_LONG_LONG"
+$ write tf "#ifndef __VAX"
+$ write tf "#define SIZEOF_LONG_LONG 8"
+$ write tf "#endif"
+$ write tf "#endif"
+$ endif
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "SHORT"
+$ then
+$ write tf "#ifndef SIZEOF_SHORT"
+$ write tf "#define SIZEOF_SHORT 2"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ write tf "/* ", xline, " */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process NEED directives
+$!-------------------------------
+$ if key2a .eqs. "NEED"
+$ then
+$ if key2b .eqs. "STRINGS" .and. key2_h .eqs. "_H"
+$ then
+$ write tf "#ifndef NEED_STRINGS_H"
+$ write tf "#define NEED_STRINGS_H 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ write tf "/* ", xline, " */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process GETHOSTNAME directives
+$!-------------------------------------
+$ if key2 .eqs. "GETHOSTNAME_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#ifdef _DECC_V4_SOURCE"
+$ write tf "#define ''key2' int"
+$ write tf "#else"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process GETNAMEINFO directives
+$!-------------------------------------
+$ if key2a .eqs. "GETNAMEINFO"
+$ then
+$ if key2 .eqs. "GETNAMEINFO_QUAL_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' const"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' struct sockaddr *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG46"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG7"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$! Process RECV directives
+$!-------------------------------------
+$ if key2a .eqs. "RECV"
+$ then
+$ if key2 .eqs. "RECV_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECV_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' void *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECV_TYPE_ARG3"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECV_TYPE_ARG4"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECV_TYPE_RETV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$! Process RECVFROM directives
+$!-------------------------------------
+$ if key2a .eqs. "RECVFROM"
+$ then
+$ if key2 .eqs. "RECVFROM_QUAL_ARG5"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2'"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' void *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG3"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG4"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG5"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' struct sockaddr"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG6"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' unsigned int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_RETV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$! Process SELECT directives
+$!-------------------------------------
+$ if key2a .eqs. "SELECT"
+$ then
+$ if key2 .eqs. "SELECT_QUAL_ARG5"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' const"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' void *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_ARG234"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' fd_set *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_ARG5"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' struct timeval *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_RETV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$! Process SEND directives
+$!-------------------------------------
+$ if key2a .eqs. "SEND"
+$ then
+$ if key2 .eqs. "SEND_QUAL_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' const"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' void *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_ARG3"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_ARG4"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_RETV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$! Process STATFS directives
+$!-------------------------------
+$! if key2a .eqs. "STATFS"
+$! then
+$! write tf "/* ", xline, " */"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$! Process inline directive
+$!------------------------------
+$ if key2 .eqs. "inline"
+$ then
+$ write tf "#ifndef inline"
+$ write tf "#define inline __inline"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process restrict directive
+$!--------------------------------
+$ if key2 .eqs. "restrict"
+$ then
+$ write tf "#ifndef restrict"
+$ write tf "#define restrict __restrict"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process RETSIGTYPE directive
+$!----------------------------------
+$ if key2 .eqs. "RETSIGTYPE"
+$ then
+$ write tf "#ifndef RETSIGTYPE"
+$ write tf "#define RETSIGTYPE void"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process STDC_HEADERS (SAMBA!)
+$!---------------------------
+$ if key2 .eqs. "STDC_HEADERS"
+$ then
+$ write tf "#ifndef STDC_HEADERS"
+$ write tf "#define STDC_HEADERS 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process PROTOTYPES directive
+$!-------------------------------------
+$ if key2 .eqs. "PROTOTYPES"
+$ then
+$ write tf "#ifndef PROTOTYPES"
+$ write tf "#define PROTOTYPES 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Special for SEEKDIR_RETURNS_VOID
+$!---------------------------------------
+$ if key2 .eqs. "SEEKDIR_RETURNS_VOID"
+$ then
+$ write tf "#ifndef SEEKDIR_RETURNS_VOID"
+$ write tf "#define SEEKDIR_RETURNS_VOID 1"
+$ write tf "#endif"
+$ endif
+$!
+$! Unknown - See if CONFIGURE can give a clue for this
+$!----------------------------------------------------------
+$ pflag = 0
+$ set_flag = 0
+$! gproj_name = proj_name - "_VMS" - "-VMS"
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$! if f$locate("FILE", key2) .lt. key2_len then pflag = 1
+$! if f$locate("DIR", key2) .eq. key2_len - 3 then pflag = 1
+$! if f$locate("PATH", key2) .eq. key2_len - 4 then pflag = 1
+$!
+$ search/out='tfile1' 'configure_script' "''key2'="/exact
+$ search_sev = '$severity'
+$ if 'search_sev' .eq. 1
+$ then
+$ open/read/err=unknown_cf_rd_error sf 'tfile1'
+$search_file_rd_loop:
+$ read/end=unknown_cf_rd_err sf line_in
+$ line_in = f$edit(line_in, "TRIM")
+$ skey1 = f$element(0,"=",line_in)
+$ if skey1 .eqs. key2
+$ then
+$ skey2 = f$element(1,"=",line_in)
+$ skey2a = f$extract(0,2,skey2)
+$!
+$!
+$! We can not handle assignment to shell symbols.
+$! For now skip them.
+$!------------------------------------------------------------
+$ if f$locate("$", skey2) .lt. f$length(skey2)
+$ then
+$ write tf "/* ", xline, " */"
+$ set_flag = 1
+$ goto found_in_configure
+$ endif
+$!
+$! Keep these two cases separate to make it easier to add
+$! more future intelligence to this routine
+$!----------------------------------------------------------------------
+$ if skey2a .eqs. """`"
+$ then
+$! if pflag .eq. 1
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ",key2," """,gproj_name,"_",key2,""""
+$! write tf "#endif"
+$! else
+$! Ignore this for now
+$!------------------------------------------
+$ write tf "/* ", xline, " */"
+$! endif
+$ set_flag = 1
+$ goto found_in_configure
+$ endif
+$ if skey2a .eqs. """$"
+$ then
+$! if pflag .eq. 1
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ",key2," """,gproj_name,"_",key2,""""
+$! write tf "#endif"
+$! else
+$! Ignore this for now
+$!-------------------------------------------
+$ write tf "/* ", xline, " */"
+$! endif
+$ set_flag = 1
+$ goto found_in_configure
+$ endif
+$!
+$! Remove multiple layers of quotes if present
+$!----------------------------------------------------------
+$ if f$extract(0, 1, skey2) .eqs. "'"
+$ then
+$ skey2 = skey2 - "'" - "'" - "'" - "'"
+$ endif
+$ if f$extract(0, 1, skey2) .eqs. """"
+$ then
+$ skey2 = skey2 - """" - """" - """" - """"
+$ endif
+$ write tf "#ifndef ''key2'"
+$ if skey2 .eqs. ""
+$ then
+$ write tf "#define ",key2
+$ else
+$! Only quote non-numbers
+$!----------------------------------------
+$ if f$string(skey2+0) .eqs. skey2
+$ then
+$ write tf "#define ",key2," ",skey2
+$ else
+$ write tf "#define ",key2," """,skey2,""""
+$ endif
+$ endif
+$ write tf "#endif"
+$ set_flag = 1
+$ else
+$ goto search_file_rd_loop
+$! if pflag .eq. 1
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ",key2," """,gproj_name,"_",key2,""""
+$! write tf "#endif"
+$! set_flag = 1
+$! endif
+$ endif
+$found_in_configure:
+$unknown_cf_rd_err:
+$ if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. ""
+$ then
+$ close sf
+$ endif
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$ if set_flag .eq. 1 then goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$!
+$! If it falls through everything else, comment it out
+$!-----------------------------------------------------
+$ write tf "/* ", xline, " */"
+$ goto cfgh_in_loop1
+$cfgh_in_loop1_end:
+$close inf
+$!
+$!
+$! Write out the tail
+$!--------------------
+$write_tail:
+$gosub write_config_h_tail
+$!
+$! Exit and clean up
+$!--------------------
+$general_error:
+$status = '$status'
+$all_exit:
+$set noon
+$if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. "" then close sf
+$if f$trnlnm("tf","lnm$process",,"SUPERVISOR") .nes. "" then close tf
+$if f$trnlnm("inf","lnm$process",,"SUPERVISOR") .nes. "" then close inf
+$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1
+$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2
+$if f$trnlnm("tfcv","lnm$process",,"SUPERVISOR") .nes. "" then close tfcv
+$if f$type(tfile1) .eqs. "STRING"
+$then
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$endif
+$if f$type(dchfile) .eqs. "STRING"
+$then
+$ if f$search(dchfile) .nes. "" then delete 'dchfile';*
+$endif
+$if f$type(starhfile) .eqs. "STRING"
+$then
+$ if f$search(starhfile) .nes. "" then delete 'starhfile';*
+$endif
+$if f$type(configure_script) .eqs. "STRING"
+$then
+$ if f$search(configure_script) .nes. "" then delete 'configure_script';*
+$endif
+$exit 'status'
+$!
+$!
+$control_y:
+$ status = ss_control_y
+$ goto all_exit
+$!
+$!
+$!
+$! Gosub to write a new config_vms.h
+$!-----------------------------------
+$write_config_vms:
+$outfile = "sys$disk:[]config_vms.h"
+$create 'outfile'
+$open/append tf 'outfile'
+$write tf "/* File: config_vms.h"
+$write tf "**"
+$write tf "** This file contains the manual edits needed for porting"
+$!write tf "** the ''proj_name' package to OpenVMS.
+$write tf "**"
+$write tf "** Edit this file as needed. The procedure that automatically"
+$write tf "** generated this header stub will not overwrite or make any"
+$write tf "** changes to this file."
+$write tf "**"
+$write tf -
+ "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'"
+$write tf "**"
+$write tf -
+ "**========================================================================*/"
+$write tf ""
+$close tf
+$return
+$!
+$! gosub to write out a documentation header for config.h
+$!----------------------------------------------------------------
+$write_config_h_header:
+$outfile = "sys$disk:[]config.h"
+$create 'outfile'
+$open/append tf 'outfile'
+$write tf "#ifndef CONFIG_H"
+$write tf "#define CONFIG_H"
+$write tf "/* File: config.h"
+$write tf "**"
+$write tf -
+ "** This file contains the options needed for porting "
+$write tf "** the project on a VMS system."
+$write tf "**"
+$write tf "** Try not to make any edits to this file, as it is"
+$write tf "** automagically generated."
+$write tf "**"
+$write tf "** Manual edits should be made to the config_vms.h file."
+$write tf "**"
+$write tf -
+ "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'"
+$write tf "**"
+$write tf -
+ "**========================================================================*/"
+$write tf ""
+$write tf "#if (__CRTL_VER >= 70200000) && !defined (__VAX)"
+$write tf "#define _LARGEFILE 1"
+$write tf "#endif"
+$write tf ""
+$write tf "#ifndef __VAX"
+$write tf "#ifdef __CRTL_VER"
+$write tf "#if __CRTL_VER >= 80200000"
+$write tf "#define _USE_STD_STAT 1"
+$write tf "#endif"
+$write tf "#endif"
+$write tf "#endif"
+$write tf ""
+$!
+$write tf " /* Allow compiler builtins */"
+$write tf "/*-------------------------*/"
+$write tf "#ifdef __DECC_VER"
+$write tf "#include <non_existant_dir:builtins.h>"
+$write tf "#endif"
+$!
+$write tf ""
+$return
+$!
+$! gosub to write out the tail for config.h and close it
+$!---------------------------------------------------------
+$write_config_h_tail:
+$write tf ""
+$write tf " /* Include the hand customized settings */"
+$write tf "/*--------------------------------------*/"
+$write tf "#include ""config_vms.h"""
+$write tf ""
+$write tf "#endif /* CONFIG_H */"
+$close tf
+$return
+$!
diff --git a/packages/vms/curl_crtl_init.c b/packages/vms/curl_crtl_init.c
new file mode 100644
index 00000000..01a34e55
--- /dev/null
+++ b/packages/vms/curl_crtl_init.c
@@ -0,0 +1,311 @@
+/* File: curl_crtl_init.c
+ *
+ * This file makes sure that the DECC Unix settings are correct for
+ * the mode the the program is run in.
+ *
+ * The CRTL has not been initialized at the time that these routines
+ * are called, so many routines can not be called.
+ *
+ * This is a module that provides a LIB$INITIALIZE routine that
+ * will turn on some CRTL features that are not enabled by default.
+ *
+ * The CRTL features can also be turned on via logical names, but that
+ * impacts all programs and some aren't ready, willing, or able to handle
+ * those settings.
+ *
+ * On VMS versions that are too old to use the feature setting API, this
+ * module falls back to using logical names.
+ *
+ * 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
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* Unix headers */
+#include <stdio.h>
+#include <string.h>
+
+/* VMS specific headers */
+#include <descrip.h>
+#include <lnmdef.h>
+#include <stsdef.h>
+
+#pragma member_alignment save
+#pragma nomember_alignment longword
+#pragma message save
+#pragma message disable misalgndmem
+struct itmlst_3 {
+ unsigned short int buflen;
+ unsigned short int itmcode;
+ void *bufadr;
+ unsigned short int *retlen;
+};
+#pragma message restore
+#pragma member_alignment restore
+
+#ifdef __VAX
+#define ENABLE "ENABLE"
+#define DISABLE "DISABLE"
+#else
+
+#define ENABLE TRUE
+#define DISABLE 0
+int decc$feature_get_index (const char *name);
+int decc$feature_set_value (int index, int mode, int value);
+#endif
+
+int SYS$TRNLNM(
+ const unsigned long * attr,
+ const struct dsc$descriptor_s * table_dsc,
+ struct dsc$descriptor_s * name_dsc,
+ const unsigned char * acmode,
+ const struct itmlst_3 * item_list);
+int SYS$CRELNM(
+ const unsigned long * attr,
+ const struct dsc$descriptor_s * table_dsc,
+ const struct dsc$descriptor_s * name_dsc,
+ const unsigned char * acmode,
+ const struct itmlst_3 * item_list);
+
+
+/* Take all the fun out of simply looking up a logical name */
+static int sys_trnlnm
+ (const char * logname,
+ char * value,
+ int value_len)
+{
+ const $DESCRIPTOR(table_dsc, "LNM$FILE_DEV");
+ const unsigned long attr = LNM$M_CASE_BLIND;
+ struct dsc$descriptor_s name_dsc;
+ int status;
+ unsigned short result;
+ struct itmlst_3 itlst[2];
+
+ itlst[0].buflen = value_len;
+ itlst[0].itmcode = LNM$_STRING;
+ itlst[0].bufadr = value;
+ itlst[0].retlen = &result;
+
+ itlst[1].buflen = 0;
+ itlst[1].itmcode = 0;
+
+ name_dsc.dsc$w_length = strlen(logname);
+ name_dsc.dsc$a_pointer = (char *)logname;
+ name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ name_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ status = SYS$TRNLNM(&attr, &table_dsc, &name_dsc, 0, itlst);
+
+ if ($VMS_STATUS_SUCCESS(status)) {
+
+ /* Null terminate and return the string */
+ /*--------------------------------------*/
+ value[result] = '\0';
+ }
+
+ return status;
+}
+
+/* How to simply create a logical name */
+static int sys_crelnm
+ (const char * logname,
+ const char * value)
+{
+ int ret_val;
+ const char * proc_table = "LNM$PROCESS_TABLE";
+ struct dsc$descriptor_s proc_table_dsc;
+ struct dsc$descriptor_s logname_dsc;
+ struct itmlst_3 item_list[2];
+
+ proc_table_dsc.dsc$a_pointer = (char *) proc_table;
+ proc_table_dsc.dsc$w_length = strlen(proc_table);
+ proc_table_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ proc_table_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ logname_dsc.dsc$a_pointer = (char *) logname;
+ logname_dsc.dsc$w_length = strlen(logname);
+ logname_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ logname_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ item_list[0].buflen = strlen(value);
+ item_list[0].itmcode = LNM$_STRING;
+ item_list[0].bufadr = (char *)value;
+ item_list[0].retlen = NULL;
+
+ item_list[1].buflen = 0;
+ item_list[1].itmcode = 0;
+
+ ret_val = SYS$CRELNM(NULL, &proc_table_dsc, &logname_dsc, NULL, item_list);
+
+ return ret_val;
+}
+
+
+ /* Start of DECC RTL Feature handling */
+
+/*
+** Sets default value for a feature
+*/
+#ifdef __VAX
+static void set_feature_default(const char *name, const char *value)
+{
+ sys_crelnm(name, value);
+}
+#else
+static void set_feature_default(const char *name, int value)
+{
+ int index;
+
+ index = decc$feature_get_index(name);
+
+ if (index > 0)
+ decc$feature_set_value (index, 0, value);
+}
+#endif
+
+static void set_features(void)
+{
+ int status;
+ char unix_shell_name[255];
+ int use_unix_settings = 1;
+
+ status = sys_trnlnm("GNV$UNIX_SHELL",
+ unix_shell_name, sizeof unix_shell_name -1);
+ if (!$VMS_STATUS_SUCCESS(status)) {
+ unix_shell_name[0] = 0;
+ use_unix_settings = 0;
+ }
+
+ /* ACCESS should check ACLs or it is lying. */
+ set_feature_default("DECC$ACL_ACCESS_CHECK", ENABLE);
+
+ /* We always want the new parse style */
+ set_feature_default ("DECC$ARGV_PARSE_STYLE" , ENABLE);
+
+
+ /* Unless we are in POSIX compliant mode, we want the old POSIX root
+ * enabled.
+ */
+ set_feature_default("DECC$DISABLE_POSIX_ROOT", DISABLE);
+
+ /* EFS charset, means UTF-8 support */
+ /* VTF-7 support is controlled by a feature setting called UTF8 */
+ set_feature_default ("DECC$EFS_CHARSET", ENABLE);
+ set_feature_default ("DECC$EFS_CASE_PRESERVE", ENABLE);
+
+ /* Support timestamps when available */
+ set_feature_default ("DECC$EFS_FILE_TIMESTAMPS", ENABLE);
+
+ /* Cache environment variables - performance improvements */
+ set_feature_default ("DECC$ENABLE_GETENV_CACHE", ENABLE);
+
+ /* Start out with new file attribute inheritance */
+#ifdef __VAX
+ set_feature_default ("DECC$EXEC_FILEATTR_INHERITANCE", "2");
+#else
+ set_feature_default ("DECC$EXEC_FILEATTR_INHERITANCE", 2);
+#endif
+
+ /* Don't display trailing dot after files without type */
+ set_feature_default ("DECC$READDIR_DROPDOTNOTYPE", ENABLE);
+
+ /* For standard output channels buffer output until terminator */
+ /* Gets rid of output logs with single character lines in them. */
+ set_feature_default ("DECC$STDIO_CTX_EOL", ENABLE);
+
+ /* Fix mv aa.bb aa */
+ set_feature_default ("DECC$RENAME_NO_INHERIT", ENABLE);
+
+ if (use_unix_settings) {
+
+ /* 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 */
+ set_feature_default ("DECC$FILENAME_UNIX_ONLY", ENABLE);
+ /* FILENAME_UNIX_ONLY Implicitly sets */
+ /* decc$disable_to_vms_logname_translation */
+
+ set_feature_default ("DECC$FILE_PERMISSION_UNIX", ENABLE);
+
+ set_feature_default ("DECC$FILE_SHARING", ENABLE);
+
+ set_feature_default ("DECC$FILE_OWNER_UNIX", ENABLE);
+ set_feature_default ("DECC$POSIX_SEEK_STREAM_FILE", ENABLE);
+
+ } else {
+ set_feature_default("DECC$FILENAME_UNIX_REPORT", ENABLE);
+ }
+
+ /* 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 */
+ /* ported packages. */
+ set_feature_default("DECC$FILENAME_UNIX_NO_VERSION", ENABLE);
+
+ /* The VMS version numbers on Unix filenames is incompatible with most */
+ /* ported packages. */
+ set_feature_default("DECC$UNIX_PATH_BEFORE_LOGNAME", ENABLE);
+
+ /* Set strtol to proper behavior */
+ set_feature_default("DECC$STRTOL_ERANGE", ENABLE);
+
+ /* Commented here to prevent future bugs: A program or user should */
+ /* never ever enable DECC$POSIX_STYLE_UID. */
+ /* It will probably break all code that accesses UIDs */
+ /* do_not_set_default ("DECC$POSIX_STYLE_UID", TRUE); */
+}
+
+
+/* Some boilerplate to force this to be a proper LIB$INITIALIZE section */
+
+#pragma nostandard
+#pragma extern_model save
+#ifdef __VAX
+#pragma extern_model strict_refdef "LIB$INITIALIZE" nowrt, long, nopic
+#else
+#pragma extern_model strict_refdef "LIB$INITIALIZE" nowrt, long
+# if __INITIAL_POINTER_SIZE
+# pragma __pointer_size __save
+# pragma __pointer_size 32
+# else
+# pragma __required_pointer_size __save
+# pragma __required_pointer_size 32
+# endif
+#endif
+/* Set our contribution to the LIB$INITIALIZE array */
+void (* const iniarray[])(void) = {set_features, } ;
+#ifndef __VAX
+# if __INITIAL_POINTER_SIZE
+# pragma __pointer_size __restore
+# else
+# pragma __required_pointer_size __restore
+# endif
+#endif
+
+
+/*
+** Force a reference to LIB$INITIALIZE to ensure it
+** exists in the image.
+*/
+int LIB$INITIALIZE(void);
+#ifdef __DECC
+#pragma extern_model strict_refdef
+#endif
+ int lib_init_ref = (int) LIB$INITIALIZE;
+#ifdef __DECC
+#pragma extern_model restore
+#pragma standard
+#endif
diff --git a/packages/vms/curl_gnv_build_steps.txt b/packages/vms/curl_gnv_build_steps.txt
new file mode 100644
index 00000000..6a87fef9
--- /dev/null
+++ b/packages/vms/curl_gnv_build_steps.txt
@@ -0,0 +1,288 @@
+From File: curl_gnv_build_steps.txt
+
+ Copyright 2009, 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
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Currently building Curl using GNV takes longer than building Curl via DCL.
+The GNV procedure actually uses the same configure and makefiles that
+Unix builds use.
+
+Building CURL on OpenVMS using GNV requires GNV V2.1-2 or the updated
+images that are available via anonymous FTP at encompasserve.org in the gnv
+directory. It also requires the GNV Bash 4.2.45 kit as an update from the
+same location or from the sourceforge.net GNV project.
+
+The HP C 7.x compiler was used for building the GNV version.
+
+The source kits are provided in backup savesets inside of the PCSI install kit.
+
+Backup save sets are currently the only distribution medium that I can be
+sure is installed on a target VMS system that will correctly unpack files
+with extended character sets in them. You may need to adjust the ownership
+of the restored files, since /Interchange/noconvert was not available at the
+time that this document was written.
+
+[gnv.common_src]curl_*_original_src.bck is the original source of the curl kit
+as provided by the curl project. [gnv.vms_src]curl-*_vms_src.bck, if present,
+has the OpenVMS specific files that are used for building that are not yet in
+the curl source kits for that release distributed http://curl.haxx.se
+
+These backup savesets should be restored to different directory trees on
+an ODS-5 volume(s) which are referenced by concealed rooted logical names.
+
+SRC_ROOT: is for the source files common to all platforms.
+VMS_ROOT: is for the source files that are specific to OpenVMS.
+ Note, you should create the VMS_ROOT: directory tree even if it is
+ initially empty. This is where you should put edits if you are
+ making changes.
+LCL_ROOT: is manually created to have the same base and sub-directories as
+ SRC_ROOT: and VMS_ROOT:
+
+The logical name REF_ROOT: may be defined to be a search list for
+VMS_ROOT:,SRC_ROOT:
+
+The logical name PRJ_ROOT: is defined to be a search list for
+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
+should be GNV$GNU:
+
+As directly updating those directories would probably be disruptive to other
+users of the system and require elevated privilege, this can be handled by
+creating a separate directory tree to install into which can be referenced
+by the concealed rooted logical name new_gnu:. A concealed logical name of
+OLD_GNU: can be set up to reference the real GNV directory tree.
+
+Then a local copy of the GNU/GNV$GNU logical names can be set up as a search
+list such as NEW_GNU:,OLD_GNU:
+
+The directory NEW_GNU:[usr] should be created. The make install phase should
+create all the other directories.
+
+The make install process may abort if curl is already because it can not
+uninstall the older version of curl because it does not have permission.
+
+The file stage_curl_install.com is used set up a new_gnu: directory tree
+for testing. The PCSI kitting procedure uses these files as input.
+
+These files do not create the directories in the VMS_ROOT and LCL_ROOT
+directory trees. You can create them with commands similar to:
+
+ $ create/dir lcl_root:[curl]/prot=w:re
+ $ copy src_root:[curl...]*.dir -
+ lcl_root:[curl...]/prot=(o:rwed,w:re)
+ $ create/dir vms_root:[curl]/prot=w:re
+ $ copy src_root:[curl...]*.dir -
+ vms_root:[curl...]/prot=(o:rwed,w:re)
+
+One of the ways with to protect the source from being modified is to have
+the directories under src_root: owned by a user or resource where the build
+username only has read access to it.
+
+
+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 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
+different names on VMS than on Unix. The Bash environment variable
+GNV_CC_QUALIFIERS can override all other settings for the C Compiler.
+
+? cc: No support for switch -warnprotos
+? cc: Unrecognized file toomanyargs
+? cc: Warning: library "ssl" not found
+? cc: Warning: library "crypto" not found
+? cc: Warning: library "gssapi" not found
+? cc: Warning: library "z" not found
+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
+
+ $ @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:
+
+ $ @setup_gnv_curl_build.com
+
+ $ bash gnv_curl_configure.sh
+
+ $ @clean_gnv_curl.com
+
+ $ bash make_gnv_curl_install.sh
+
+ $ @gnv_link_curl.com
+
+ $ @stage_curl_install.com
+
+ $ purge new_gnu:[*...]/log
+
+To clean up after a GNV based build to start over, the following commands are
+used:
+
+ $ bash
+ bash$ cd ../..
+ bash$ make clean
+ bash$ exit
+
+Then run the @clean_gnv_curl.com. Use the parameter "realclean" if you are
+going to run the setup_gnv_curl_build.com and configure script again.
+
+ $ @clean_gnv_curl.com realclean
+
+If new public symbols have been added, adjust the file gnv_libcurl_symbols.opt
+to have the new symbols. If the symbols are longer than 32 characters,
+then they will need to have the original be exact case CRC shortened and
+an alias in upper case with CRC shortened, in addition to having an exact
+case truncated alias and an uppercase truncated alias.
+
+The *.EXE files are not moved to the new_gnu: directory.
+
+After you are satisfied with the results of your build, you can move the
+files from new_gnu: to old_gnu: at your convenience.
+
+Building a PCSI kit for an archictecture takes the following steps after
+making sure that you have a working build environment.
+
+Note that it requires manually creating two logical names as described
+below. It is intentional that they be manually set. This is for
+branding the PCSI kit based on who is making the kit.
+
+ 1. Make sure that you have a staging directory that can be referenced
+ by the path STAGE_ROOT:[KIT]
+
+ 2. Edit the file curl_release_note_start.txt or other text files to
+ reflect any changes.
+
+ 3. Define the logical name GNV_PCSI_PRODUCER to indicate who is making
+ the distribution. For making updates to an existing open source
+ kit you may need to keep the producer the same.
+
+ 4. Define the logical name GNV_PCSI_PRODUCER_FULL_NAME to be your full
+ name or full name of your company.
+
+ 5. If you are producing an update kit, then update the file
+ vms_eco_level.h by changing the value for the VMS_ECO_LEVEL macro.
+ This file is currently only used in building the PCSI kit.
+
+ 6. Edit the file PCSI_GNV_CURL_FILE_LIST.TXT if there are new files added
+ to the kit. These files should all be ODS-2 legal filenames and
+ directories.
+
+ A limitation of the PCSI kitting procedure is that when selecting files,
+ it tends to ignore the directory structure and assumes that all files
+ with the same name are the same file, so every file placed in the kit
+ must have a unique name. Then a procedure needs to be added to the kit
+ to create an alias link on install and remove the link on remove.
+
+ Since at this time curl does not need this alias procedure, the steps
+ to automatically build it are not included here.
+
+ While newer versions of PCSI can support ODS-5 filenames, not all verions
+ of PCSI on systems that have ODS-5 filenames do. So as a post install
+ step, the PCSI kit built by these steps does a rename to the correct
+ case as a post install step.
+
+ 7. Edit the build_curl_pcsi_desc.com and build_curl_pcsi_text.com if you
+ have changed the version of ZLIB that curl is built against.
+
+ 8. Prepare to backup the files for building the kit.
+
+ Note that if src_root: or vms_root: are NFS mounted disks, the
+ step of backing up the source files will probably hang or fail.
+
+ You need to copy the source files to VMS mounted disks and create
+ logical names SRC_ROOT1 and VMS_ROOT1 to work around this to to
+ reference local disks. Make sure src_root1:[000000] and
+ vms_root1:[000000] exist and can be written to.
+
+ The command procedure compare_curl_source can be used to check
+ those directories and keep them up to date.
+
+ @compare_curl_source.com SRCBCK UPDATE
+
+ This compares the reference project source with the backup
+ staging directory for it and updates with any changes.
+
+ @compare_curl_source.com VMSBCK UPDATE
+
+ This compares the VMS specific source with the backup
+ staging directory for it and updates with any changes.
+
+ Leave off "UPDATE" to just check without doing any changes.
+
+ If you are not using NFS mounted disks and do not want to have a
+ separate directory for staging the sources for backup make sure
+ that src_root1: and vms_root1: do not exist.
+
+ 9. Build the PCSI kit with @pcsi_product_gnv_curl.com
+
+ The following message is normal:
+ %PCSI-I-CANNOTVAL, cannot validate
+ EAGLE$DQA0:[stage_root.][kit]VMSPORTS-AXPVMS-CURL-V0731-0-1.PCSI;1
+ -PCSI-I-NOTSIGNED, product kit is not signed and therefore has
+ no manifest file
+
+ This will result in an uncompressed kit for the target platform.
+ On Alpha and Integrity, the pcsi_product_gnv_curl.com can be used with
+ the "COMPRESSED" parameter to build both a compressed and uncompressed
+ kits.
+
+Good Luck.
diff --git a/packages/vms/curl_release_note_start.txt b/packages/vms/curl_release_note_start.txt
new file mode 100644
index 00000000..977dce12
--- /dev/null
+++ b/packages/vms/curl_release_note_start.txt
@@ -0,0 +1,77 @@
+From file: CURL_RELEASE_NOTE_START.TXT
+
+Note: These kits are produced by a hobbyist and are providing any support
+or any commitment to supply bug fixes or future releases. This code is
+as-is with no warrantees.
+
+The testing of this build of curl was minimal and involved building some of
+the sample and test programs, accessing a public HTTPS: website, doing a
+form post of some VMS test files, and FTP upload of some text files.
+
+Due to the way that PCSI identifies packages, if you install a package from
+one producer and then want to upgrade it from another producer, you will
+probably need to uninstall the previous package first.
+
+OpenVMS specific building and kitting instructions are after the standard
+curl readme file.
+
+This product may be available for your platform in a PCSI kit. The source kit
+contains files for building CURL using GNV or with a DCL procedure.
+
+The GNV based build creates a libcurl share imaged which is supplied in the
+PCSI kit.
+
+This version of CURL will return VMS compatible status codes when run from
+DCL and Unix compatible exit codes and messages when run with the SHELL
+environment variable set.
+
+This port of Curl uses the OpenSSL, Ldap, and Kerberos V5 that are bundled
+with OpenVMS or supplied as updates by HP. Ldap and Kerberos are not available
+on the VAX platform. See section below for a special note about HP OpenSSL
+on Alpha and IA64.
+
+The supplied CURL_STARTUP.COM procedure that is installed in
+[VMS$COMMON.SYS$STARTUP] can be put in your VMS startup procedure to install
+the GNV$LIBCURL shared image and create logical names GNV$LIBCURL to reference
+it. It will create the GNV$CURL_INCLUDE logical name for build procedures
+to access the header files.
+
+Normally to use curl from DCL, just create a foreign command as:
+ curl :== $gnv$gnu:[usr.bin]gnv$curl.exe
+
+If you need to work around having the older HP SSL kit installed, then
+for DCL create this command procedure:
+
+ $ create/dir gnv$gnu:[vms_bin]/prot=w:re
+ $ create gnv$gnu:[vms_bin]curl.com
+ $ curl := $gnv$gnu:[usr.bin]gnv$curl.exe
+ $ define/user ssl$libcrypto_shr32 gnv$curl_ssl_libcryptoshr32
+ $ curl "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'"
+ ^Z
+
+Then you can use: curl :== @gnv$gnu:[vms_bin]curl.com to run curl.
+
+For the HP SSL work around to work for GNV do the following:
+ $ create/dir gnv$gnu:[usr.local.bin]/prot=w:re
+ $ create gnv$gnu:[usr.local.bin]curl.
+ #! /bin/sh
+ dcl @gnv\$gnu:[vms_bin]curl.com $*
+ ^Z
+
+Similar work arounds will be needed for any program linked with GNV$LIBCURL
+until the HP OpenSSL is upgraded to the current 1.4 version or later.
+
+If you are installing a "daily" build instead of a release build of Curl, some
+things have been changed so that it can be installed at the same time as
+a production build with out conflicts.
+
+ The CURL_DAILY_STARTUP.COM will be supplied instead of CURL_STARTUP.COM.
+ This file is actually not used with the daily package and is provided as
+ a preview of what the next CURL_STARTUP.COM will be for the next release.
+ Do not run it.
+
+ The files that are normally installed in [VMS$COMMON.GNV.usr], for the
+ daily build are installed in [VMS$COMMON.GNV.beta] directory.
+
+ To use the daily GNV$LIBCURL image, you will need to define the logical
+ name GNV$LIBCURL to the image.
diff --git a/packages/vms/curl_startup.com b/packages/vms/curl_startup.com
new file mode 100644
index 00000000..84760a0a
--- /dev/null
+++ b/packages/vms/curl_startup.com
@@ -0,0 +1,100 @@
+$! File: curl_Startup.com
+$!
+$! $Id$
+$!
+$! Procedure to setup the CURL libraries for use by programs from the
+$! VMS SYSTARTUP*.COM procedure.
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 15-Jun-2009 J. Malmberg
+$! 30-Jul-2013 J. Malmberg Update for Curl 7.32
+$!========================================================================
+$!
+$!
+$! GNV$GNU if needed.
+$ if f$trnlnm("GNV$GNU") .eqs. ""
+$ then
+$ x = f$trnlnm("GNU","LNM$SYSTEM_TABLE")
+$ if x .eqs. ""
+$ then
+$ write sys$output "GNV must be started up before this procedure.
+$ exit 44
+$ endif
+$ define/system/exec/trans=conc GNV$GNU 'x'
+$ endif
+$!
+$!
+$ myproc = f$environment("procedure")
+$!
+$! ZLIB needed.
+$ if f$trnlnm("GNV$LIBZSHR32") .eqs. ""
+$ then
+$ zlib_startup = f$parse("gnv$zlib_startup.com;0", myproc,,,)
+$ if f$search(zlib_startup) .nes. ""
+$ then
+$ @'zlib_startup
+$ else
+$ write sys$output "ZLIB package not found and is required."
+$ exit 44
+$ endif
+$ endif
+$!
+$!
+$ curl_ssl_libcrypto32 = ""
+$ curl_ssl_libssl32 = ""
+$ gnv_ssl_libcrypto32 = "gnv$gnu:[lib]ssl$libcrypto_shr32.exe"
+$ gnv_ssl_libssl32 = "gnv$gnu:[lib]ssl$libssl_shr32.exe"
+$ if f$search(gnv_ssl_libcrypto32) .nes. ""
+$ then
+$ curl_ssl_libcrypto32 = gnv_ssl_libcrypto32
+$ curl_ssl_libssl32 = gnv_ssl_libssl32
+$ else
+$ hp_ssl_libcrypto32 = "sys$share:ssl$libcrypto_shr32.exe"
+$ hp_ssl_libssl32 = "sys$share:ssl$libssl_shr32.exe"
+$ if f$search(hp_ssl_libcrypto32) .nes. ""
+$ then
+$ curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$ curl_ssl_libssl32 = hp_ssl_libssl32
+$ else
+$ write sys$output "HP SSL package not found and is required."
+$ endif
+$ endif
+$!
+$ define/system/exec gnv$curl_ssl_libcryptoshr32 'curl_ssl_libcrypto32'
+$ define/system/exec gnv$curl_ssl_libsslshr32 'curl_ssl_libssl32'
+$!
+$!
+$! CURL setup
+$ define/system/exec gnv$libcurl gnv$gnu:[usr.lib]GNV$LIBCURL.EXE
+$ define/system/exec gnv$curl_include gnv$gnu:[usr.include.curl]
+$ if .not. f$file_attributes("gnv$libcurl", "known")
+$ then
+$ install ADD gnv$libcurl/OPEN/SHARE/HEADER
+$ else
+$ install REPLACE gnv$libcurl/OPEN/SHARE/HEADER
+$ endif
+$!
+$!
+$ curl_exe = "gnv$gnu:[usr.bin]gnv$curl.exe"
+$ if .not. f$file_attributes(curl_exe, "known")
+$ then
+$ install ADD 'curl_exe'/OPEN/SHARE/HEADER
+$ else
+$ install REPLACE 'curl_exe'/OPEN/SHARE/HEADER
+$ endif
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/curlmsg.h b/packages/vms/curlmsg.h
index 32f335fd..0473be6f 100644
--- a/packages/vms/curlmsg.h
+++ b/packages/vms/curlmsg.h
@@ -1,5 +1,26 @@
#ifndef HEADER_CURLMSG_H
#define HEADER_CURLMSG_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
#pragma __member_alignment __save
#pragma __nomember_alignment
diff --git a/packages/vms/curlmsg_vms.h b/packages/vms/curlmsg_vms.h
index e99e88c4..3976973a 100644
--- a/packages/vms/curlmsg_vms.h
+++ b/packages/vms/curlmsg_vms.h
@@ -1,5 +1,26 @@
#ifndef HEADER_CURLMSG_VMS_H
#define HEADER_CURLMSG_VMS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
/* */
/* CURLMSG_VMS.H */
diff --git a/packages/vms/generate_config_vms_h_curl.com b/packages/vms/generate_config_vms_h_curl.com
new file mode 100644
index 00000000..90a83d58
--- /dev/null
+++ b/packages/vms/generate_config_vms_h_curl.com
@@ -0,0 +1,484 @@
+$! File: GENERATE_CONFIG_H_CURL.COM
+$!
+$! $Id$
+$!
+$! Curl like most open source products uses a variant of a config.h file.
+$! Depending on the curl version, this could be config.h or curl_config.h.
+$!
+$! For GNV based builds, the configure script is run and that produces
+$! a [curl_]config.h file. Configure scripts on VMS generally do not
+$! know how to do everything, so there is also a [-.lib]config-vms.h file
+$! that has VMS specific code that compensates for bugs in some of the
+$! VMS shared images.
+$!
+$! This generates a [curl_]config.h file and also a config_vms.h file,
+$! which is used to supplement that file. Note that the config_vms.h file
+$! and the [.lib]config-vms.h file do two different tasks and that the
+$! filenames are slightly different.
+$!
+$!
+$! 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 06-Jan-2013 J. Malmberg
+$!
+$!=========================================================================
+$!
+$! Allow arguments to be grouped together with comma or separated by spaces
+$! Do no know if we will need more than 8.
+$args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
+$args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
+$!
+$! Provide lower case version to simplify parsing.
+$args_lower = f$edit(args, "LOWERCASE")
+$!
+$args_len = f$length(args)
+$!
+$if (f$getsyi("HW_MODEL") .lt. 1024)
+$then
+$ arch_name = "VAX"
+$else
+$ arch_name = ""
+$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$ if (arch_name .eqs. "") then arch_name = "UNK"
+$endif
+$!
+$!
+$nossl = 0
+$nohpssl = 1
+$hpssl = 0
+$libidn = 0
+$libssh2 = 0
+$noldap = 0
+$nozlib = 0
+$nokerberos = 0
+$!
+$! First check to see if SSL is disabled.
+$!---------------------------------------
+$if f$locate(",nossl,", args_lower) .lt. args_len then nossl = 1
+$if .not. nossl
+$then
+$!
+$! ssl$* logicals means HP ssl is present
+$!----------------------------------------
+$ if f$trnlnm("ssl$root") .nes. ""
+$ then
+$ nohpssl = 0
+$ hpssl = 1
+$ endif
+$!
+$! HP defines OPENSSL as SSL$INCLUDE as a convenience for linking.
+$! As it is a violation of VMS standards for this to be provided,
+$! some sites may have removed it, but if present, assume that
+$! it indicates which OpenSSL to use.
+$!------------------------------------
+$ openssl_lnm = f$trnlnm("OPENSSL")
+$ if (openssl_lnm .nes. "SYS$INCLUDE")
+$ then
+$! Non HP SSL is installed, default to use it.
+$ nohpssl = 1
+$ hpssl = 0
+$ endif
+$!
+$! Now check to see if hpssl has been specifically disabled
+$!----------------------------------------------------------
+$ if f$locate(",nohpssl,", args_lower) .lt. args_len
+$ then
+$ nohpssl = 1
+$ hpssl = 0
+$ endif
+$!
+$! Finally check to see if hp ssl has been specifically included.
+$!----------------------------------------------------------------
+$ if f$locate(",nohpssl,", args_lower) .lt. args_len
+$ then
+$ nohpssl = 1
+$ hpssl = 0
+$ endif
+$endif
+$!
+$! Did someone port LIBIDN in the GNV compatible way?
+$!------------------------------------------------------
+$if f$trnlnm("GNV$LIBIDNSHR") .nes. ""
+$then
+$ write sys$output "NOTICE: A LIBIDN port has been detected."
+$ write sys$output " This port of curl for VMS has not been tested with it."
+$ if f$locate(",libidn,", args_lower) .lt. args_len
+$ then
+$ libidn = 1
+$ endif
+$ if .not. libidn
+$ then
+$ write sys$output " LIBIDN support is not enabled."
+$ write sys$output "Run with the ""libidn"" parameter to attempt to use."
+$ else
+$ write sys$output " Untested LIBIDN support requested."
+$ endif
+$endif
+$!
+$! Did someone port LIBSSH2 in the GNV compatible way?
+$!------------------------------------------------------
+$if f$trnlnm("GNV$LIBSSH2SHR") .nes. ""
+$then
+$ write sys$output "NOTICE: A LIBSSH2 port has been detected."
+$ write sys$output " This port of curl for VMS has not been tested with it."
+$ if f$locate(",libssh2,", args_lower) .lt. args_len
+$ then
+$ libssh2 = 1
+$ endif
+$ if .not. libssh2
+$ then
+$ write sys$output " LIBSSH2 support is not enabled."
+$ write sys$output "Run with the ""libssh2"" parameter to attempt to use."
+$ else
+$ write sys$output " Untested LIBSSH2 support requested."
+$ endif
+$endif
+$!
+$! LDAP suppressed?
+$if f$locate(",noldap,", args_lower) .lt. args_len
+$then
+$ noldap = 1
+$endif
+$if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
+$then
+$ noldap = 1
+$endif
+$!
+$if f$locate(",nokerberos,", args_lower) .lt. args_len then nokerberos = 1
+$if .not. nokerberos
+$then
+$! If kerberos is installed: sys$share:gss$rtl.exe exists.
+$ if f$search("sys$shsare:gss$rtl.exe") .eqs. ""
+$ then
+$ nokerberos = 1
+$ endif
+$endif
+$!
+$!
+$! Is GNV compatible LIBZ present?
+$!------------------------------------------------------
+$if f$trnlnm("GNV$LIBZSHR") .nes. ""
+$then
+$ if f$locate(",nozlib,", args_lower) .lt. args_len
+$ then
+$ nozlib = 1
+$ endif
+$! if .not. nozlib
+$! then
+$! write sys$output " GNV$LIBZSHR support is enabled."
+$! else
+$! write sys$output " GNV$LIBZSHR support is disabled by nozlib."
+$! endif
+$else
+$ nozlib = 1
+$endif
+$!
+$!
+$! Start the configuration file.
+$! Need to do a create and then an append to make the file have the
+$! typical file attributes of a VMS text file.
+$create sys$disk:[curl.lib]config_vms.h
+$open/append cvh sys$disk:[curl.lib]config_vms.h
+$!
+$! Write the defines to prevent multiple includes.
+$! These are probably not needed in this case,
+$! but are best practice to put on all header files.
+$write cvh "#ifndef __CONFIG_VMS_H__"
+$write cvh "#define __CONFIG_VMS_H__"
+$write cvh ""
+$write cvh "/* Define cpu-machine-OS */"
+$!
+$! Curl uses an OS macro to set the build environment.
+$!----------------------------------------------------
+$! Now the DCL builds usually say xxx-HP-VMS and configure scripts
+$! may put DEC or COMPAQ or HP for the middle part.
+$!
+$write cvh "#if defined(__alpha)"
+$write cvh "#define OS ""ALPHA-HP-VMS"""
+$write cvh "#elif defined(__vax)"
+$write cvh "#define OS ""VAX-HP-VMS"""
+$write cvh "#elif defined(__ia64)"
+$write cvh "#define OS ""IA64-HP-VMS""
+$write cvh "#else"
+$write cvh "#define OS ""UNKNOWN-HP-VMS""
+$write cvh "#endif"
+$write cvh ""
+$!
+$! We are now setting this on the GNV build, so also do this
+$! for compatibility.
+$write cvh "/* Location of default ca path */"
+$write cvh "#define curl_ca_path ""gnv$curl_ca_path"""
+$!
+$! NTLM_WB_ENABLED requires fork() but configure does not know this
+$! We have to disble this in th configure command line.
+$! config_h.com finds that configure defaults to it being enabled so
+$! reports it. So we need to turn it off here.
+$!
+$write cvh "#ifdef NTLM_WB_ENABLED"
+$write cvh "#undef NTLM_WB_ENABLED"
+$write cvh "#endif"
+$!
+$! The config_h.com finds a bunch of default disable commands in
+$! configure and will incorrectly disable these options. The config_h.com
+$! is a generic procedure and it would break more things to try to fix it
+$! to special case it for curl. So we will fix it here.
+$!
+$! We do them all here, even the ones that config_h.com currently gets correct.
+$!
+$write cvh "#ifdef CURL_DISABLE_COOKIES"
+$write cvh "#undef CURL_DISABLE_COOKIES"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_CRYPTO_AUTH"
+$write cvh "#undef CURL_DISABLE_CRYPTO_AUTH"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_DICT"
+$write cvh "#undef CURL_DISABLE_DICT"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_FILE"
+$write cvh "#undef CURL_DISABLE_FILE"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_FTP"
+$write cvh "#undef CURL_DISABLE_FTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_GOPHER"
+$write cvh "#undef CURL_DISABLE_GOPHER"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_HTTP"
+$write cvh "#undef CURL_DISABLE_HTTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_IMAP"
+$write cvh "#undef CURL_DISABLE_IMAP"
+$write cvh "#endif"
+$if .not. noldap
+$then
+$ write cvh "#ifdef CURL_DISABLE_LDAP"
+$ write cvh "#undef CURL_DISABLE_LDAP"
+$ write cvh "#endif"
+$ if .not. nossl
+$ then
+$ write cvh "#ifdef CURL_DISABLE_LDAPS"
+$ write cvh "#undef CURL_DISABLE_LDAPS"
+$ write cvh "#endif"
+$ endif
+$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"
+$write cvh "#ifdef CURL_DISABLE_PROXY"
+$write cvh "#undef CURL_DISABLE_PROXY"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_RTSP"
+$write cvh "#undef CURL_DISABLE_RTSP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_SMTP"
+$write cvh "#undef CURL_DISABLE_SMTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_TELNET"
+$write cvh "#undef CURL_DISABLE_TELNET"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_TFTP"
+$write cvh "#undef CURL_DISABLE_TFTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_POP3"
+$write cvh "#undef CURL_DISABLE_POP3"
+$write cvh "#endif"
+$if .not. nossl
+$then
+$ write cvh "#ifdef CURL_DISABLE_TLS_SRP"
+$ write cvh "#undef CURL_DISABLE_TLS_SRP"
+$ write cvh "#endif"
+$!
+$endif
+$write cvh "#ifdef CURL_DISABLE_VERBOSE_STRINGS"
+$write cvh "#undef CURL_DISABLE_VERBOSE_STRINGS"
+$write cvh "#endif"
+$!
+$! configure defaults to USE_*, a real configure on VMS chooses different.
+$write cvh "#ifdef USE_ARES"
+$write cvh "#undef USE_ARES"
+$write cvh "#endif"
+$write cvh "#ifdef USE_AXTLS"
+$write cvh "#undef USE_AXTLS"
+$write cvh "#endif"
+$write cvh "#ifdef USE_CYASSL"
+$write cvh "#undef USE_CYASSL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_DARWINSSL"
+$write cvh "#undef USE_DARWINSSL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_GNUTLS"
+$write cvh "#undef USE_GNUTLS"
+$write cvh "#endif"
+$write cvh "#ifdef USE_GNUTLS_NETTLE"
+$write cvh "#undef USE_GNUTLS_NETTLE"
+$write cvh "#endif"
+$write cvh "#ifdef USE_LIBRTMP"
+$write cvh "#undef USE_LIBRTMP"
+$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"
+$write cvh "#ifdef USE_OPENLDAP"
+$write cvh "#undef USE_OPENLDAP"
+$write cvh "#endif"
+$write cvh "#ifdef USE_POLARSSL"
+$write cvh "#undef USE_POLARSSL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_SCHANNEL"
+$write cvh "#undef USE_SCHANNEL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_THREADS_POSIX"
+$write cvh "#undef USE_THREADS_POSIX"
+$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
+$! to know about universal symbols. VMS does not need this support so
+$! we do not set it here.
+$!
+$!
+$! I can not figure out where the C compiler is finding the ALLOCA.H file
+$! in the text libraries, so CONFIG_H.COM can not find it either.
+$! Usually the header file name is the module name in the text library.
+$! It does not appear to hurt anything to not find header file, so we
+$! are not overriding it here.
+$!
+$!
+$! Check to see if OpenSSL is present.
+$!----------------------------------
+$ssl_include = f$trnlnm("OPENSSL")
+$if ssl_include .eqs. ""
+$then
+$ ssl_include = f$trnlnm("ssl$include")
+$endif
+$if ssl_include .eqs. "" then nossl = 1
+$!
+$if .not. nossl
+$then
+$!
+$ write cvh "#ifndef USE_OPENSSL"
+$ write cvh "#define USE_OPENSSL 1"
+$ 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
+$!
+$!
+$! LibIDN not ported to VMS at this time.
+$! This is for international domain name support.
+$! Allow explicit experimentation.
+$if libidn
+$then
+$ write cvh "#define HAVE_IDNA_STRERROR 1"
+$ write cvh "#define HAVE_IDNA_FREE 1"
+$ write cvh "#define HAVE_IDNA_FREE_H 1"
+$ write cvh "#define HAVE_LIBIDN 1"
+$else
+$ write cvh "#ifdef HAVE_LIBIDN"
+$ write cvh "#undef HAVE_LIBIDN"
+$ write cvh "#endif"
+$endif
+$!
+$!
+$! LibSSH2 not ported to VMS at this time.
+$! Allow explicit experimentation.
+$if libssh2
+$then
+$ write cvh "#define HAVE_LIBSSH2_EXIT 1"
+$ write cvh "#define HAVE_LIBSSH2_H 1"
+$ write cvh "#define HAVE_LIBSSH2_INIT 1"
+$ write cvh "#define HAVE_LIBSSH2_SCP_SEND64 1"
+$ write cvh "#define HAVE_LIBSSH2_SESSION_HANDSHAKE 1"
+$ write cvh "#define HAVE_LIBSSH2_VERSION 1
+$ write cvh "#define HAVE_LIBSSH2 1
+$!
+$ write cvh "#ifndef USE_LIBSSH2"
+$ write cvh "#define USE_LIBSSH2 1"
+$ write cvh "#endif"
+$else
+$ write cvh "#ifdef USE_LIBSSH2"
+$ write cvh "#undef USE_LIBSSH2"
+$ write cvh "#endif"
+$endif
+$!
+$!
+$!
+$if .not. nozlib
+$then
+$ write cvh "#define HAVE_LIBZ 1"
+$ 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 ""
+$write cvh "#endif /* __CONFIG_VMS_H__ */"
+$close cvh
+$!
+$all_exit:
+$exit
diff --git a/packages/vms/generate_vax_transfer.com b/packages/vms/generate_vax_transfer.com
new file mode 100644
index 00000000..115db8a8
--- /dev/null
+++ b/packages/vms/generate_vax_transfer.com
@@ -0,0 +1,274 @@
+$! File: generate_vax_transfer.com
+$!
+$! $Id$
+$!
+$! File to generate and compile the VAX transfer vectors from reading in the
+$! Alpha/Itanium gnv_libcurl_symbols.opt file.
+$!
+$! This procedure patches the VAX Macro32 assembler to be case sensitive
+$! and then compiles the generated
+$!
+$! The output of this procedure is:
+$! gnv_libcurl_xfer.mar_exact
+$! gnv_libcurl_xfer.obj
+$! gnv_libcurl_xfer.opt
+$! macro32_exactcase.exe
+$!
+$! 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 20-Jul-2013 J. Malmberg
+$!============================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$!
+$ on warning then goto all_exit
+$!
+$! Want hard tabs in the generated file.
+$ tab[0,8] = 9
+$!
+$! This procedure is used on VAX only
+$ if (f$getsyi("HW_MODEL") .ge. 1024)
+$ then
+$ write sys$output "This procedure is only used on VAX."
+$ goto all_exit
+$ endif
+$!
+$!
+$! Get the libcurl version to generate the ident string.
+$! ident string is max of 31 characters.
+$!
+$ ident_string = "unknown"
+$ open/read cver [-.-.include.curl]curlver.h
+$cver_loop:
+$ read/end=cver_loop_end cver line_in
+$ line_in = f$edit(line_in, "COMPRESS,TRIM")
+$ if line_in .eqs. "" then goto cver_loop
+$ code = f$extract(0, 1, line_in)
+$ if code .nes. "#" then goto cver_loop
+$ directive = f$element(0, " ", line_in)
+$ if directive .nes. "#define" then goto cver_loop
+$ name = f$element(1, " ", line_in)
+$ if name .nes. "LIBCURL_VERSION" then goto cver_loop
+$ ident_string = f$element(2, " ", line_in) - "" - ""
+$cver_loop_end:
+$ close cver
+$!
+$ open/read aopt gnv_libcurl_symbols.opt
+$!
+$! Write out the header
+$ gosub do_header
+$!
+$ open/append vopt gnv_libcurl_xfer.mar_exact
+$ write vopt tab,".IDENT /", ident_string, "/"
+$!
+$ write vopt tab, ".PSECT LIBCURL_XFERVECTORS -"
+$ write vopt tab,tab,tab, "PIC,USR,CON,REL,GBL,SHR,EXE,RD,NOWRT,QUAD"
+$ write vopt ""
+$ write vopt tab, "SPARE", tab, "; never delete this spare"
+$ write vopt ";"
+$ write vopt ";", tab, "Exact case and upper case transfer vectors"
+$!
+$ alias_count = 0
+$vector_loop:
+$!
+$! Read in symbol_vector
+$!
+$ read/end=vector_loop_end aopt line_in
+$ line = f$edit(line_in, "UNCOMMENT,COMPRESS,TRIM")
+$ if line .eqs. "" then goto vector_loop
+$!
+$ line_u = f$edit(line, "UPCASE")
+$ key = f$element(0, "=", line_u)
+$ if (key .eqs. "SYMBOL_VECTOR")
+$ then
+$ symbol_string = f$element(1, "=", line) - "("
+$ symbol_type = f$element(2, "=", line_u) - ")"
+$ symbol_name = f$element(1, "/", symbol_string)
+$ if symbol_type .nes. "PROCEDURE"
+$ then
+$ write sys$output "%CURLBUILD-W-NOTPROC, " + -
+$ "This procedure can only handle procedure vectors"
+$ write sys$output -
+"Data vectors require manual construction for which this procedure or"
+$ write sys$output -
+"the shared library needs to be updated to resolve."
+$ write sys$output -
+"the preferred solution is to have a procedure return the address of the "
+$ write sys$output -
+"the variable instead of having a variable, as if the size of the variable "
+ write sys$output -
+"changes, the symbol vector is no longer backwards compatible."
+$ endif
+$ if (symbol_name .eqs. "/")
+$ then
+$ symbol_name = symbol_string
+$ write vopt tab, symbol_type, tab, symbol_name
+$ else
+$ alias_count = alias_count + 1
+$ symbol_alias = f$element(0, "/", symbol_string)
+$ write vopt -
+ tab, "''symbol_type_U", tab, symbol_name, tab, symbol_alias
+$ endif
+$ endif
+$ goto vector_loop
+$vector_loop_end:
+$!
+$! End of pass one, second pass needed if aliases exist
+$ close aopt
+$!
+$ if alias_count .eq. 0 then goto finish_file
+$!
+$! Start pass 2, write stub routine header
+$!
+$ open/read aopt gnv_libcurl_symbols.opt
+$!
+$alias_loop:
+$!
+$! Read in symbol_vector
+$!
+$ read/end=alias_loop_end aopt line_in
+$ line = f$edit(line_in, "UNCOMMENT,COMPRESS,TRIM")
+$ if line .eqs. "" then goto alias_loop
+$!
+$ line_u = f$edit(line, "UPCASE")
+$ key = f$element(0, "=", line_u)
+$ if (key .eqs. "SYMBOL_VECTOR")
+$ then
+$ symbol_string = f$element(1, "=", line) - "("
+$ symbol_type = f$element(2, "=", line_u) - ")"
+$ symbol_name = f$element(1, "/", symbol_string)
+$ if (symbol_name .eqs. "/")
+$ then
+$ symbol_name = symbol_string
+$ else
+$ alias_count = alias_count + 1
+$ symbol_alias = f$element(0, "/", symbol_string)
+$ write vopt tab, ".ENTRY", tab, symbol_alias, ", ^M<>"
+$ endif
+$ endif
+$ goto alias_loop
+$! read in symbol_vector
+$! if not alias, then loop
+$! write out subroutine name
+$!
+$alias_loop_end:
+$!
+$ write vopt tab, "MOVL #1, R0"
+$ write vopt tab, "RET"
+$!
+$finish_file:
+$!
+$ write vopt ""
+$ write vopt tab, ".END"
+$!
+$ close aopt
+$ close vopt
+$!
+$! Patch the Macro32 compiler
+$!----------------------------
+$ patched_macro = "sys$disk:[]macro32_exactcase.exe"
+$ if f$search(patched_macro) .eqs. ""
+$ then
+$ copy sys$system:macro32.exe 'patched_macro'
+$ patch @macro32_exactcase.patch
+$ endif
+$ define/user macro32 'patched_macro'
+$ macro/object=gnv_libcurl_xfer.obj gnv_libcurl_xfer.mar_exact
+$!
+$! Create the option file for linking the shared image.
+$ create gnv_libcurl_xfer.opt
+$ open/append lco gnv_libcurl_xfer.opt
+$ write lco "gsmatch=lequal,1,1"
+$ write lco "cluster=transfer_vector,,,''default_dir'gnv_libcurl_xfer"
+$ write lco "collect=libcurl_global, libcurl_xfervectors"
+$ close lco
+$!
+$!
+$ goto all_exit
+$!
+$! Process the header
+$do_header:
+$!
+$! Force the mode of the file to same as text editor generated.
+$ create gnv_libcurl_xfer.mar_exact
+$deck
+; File: gnv_libcurl_xfer.mar_exact
+;
+; VAX transfer vectors
+;
+; This needs to be compiled with a specialized patch on Macro32 to make it
+; preserve the case of symbols instead of converting it to uppercase.
+;
+; This patched Macro32 requires all directives to be in upper case.
+;
+; There are three sets of symbols for transfer vectors here.
+;
+; The first for upper case which matches the tradition method of generating
+; VAX transfer vectors.
+;
+; The second is the exact case for compatibilty with open source C programs
+; that expect exact case symbols in images. These are separated because a
+; previous kit had only upper case symbols.
+;
+; The third is the routine stub that is used to resolve part of the upper
+; case transfer vectors, with exact case entry symbols.
+;
+; When you add routines, you need to add them after the second set of transfer
+; vectors for both upper and exact case, and then additional entry points
+; in upper case added to stub routines.
+;
+;*************************************************************************
+
+ .TITLE libcurl_xfer - Transfer vector for libcurl
+ .DISABLE GLOBAL
+
+;
+; Macro to generate a transfer vector entry
+;
+ .MACRO PROCEDURE NAME
+ .EXTRN 'NAME
+ .ALIGN QUAD
+ .TRANSFER 'NAME
+ .MASK 'NAME
+ JMP 'NAME+2
+ .ENDM
+
+ .MACRO PROCEDUREU NAME NAMEU
+ .EXTRN 'NAME
+ .ALIGN QUAD
+ .TRANSFER 'NAMEU
+ .MASK 'NAME
+ JMP 'NAME+2
+
+ .ENDM
+;
+;
+; Macro to reserve a spare entry.
+;
+ .MACRO SPARE
+ .ALIGN QUAD
+ .ALIGN QUAD
+ .QUAD 0
+ .ENDM
+
+$EOD
+$!
+$!
+$ return
+$!
+$all_exit:
+$set def 'default_dir'
+$exit '$status'
diff --git a/packages/vms/gnv_conftest.c_first b/packages/vms/gnv_conftest.c_first
new file mode 100644
index 00000000..8645b0e3
--- /dev/null
+++ b/packages/vms/gnv_conftest.c_first
@@ -0,0 +1,61 @@
+/* File: GNV$CONFTEST.C_FIRST
+ *
+ * $Id$
+ *
+ * Copyright 2009, 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
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* This is needed for Configure tests to get the correct exit status */
+void __posix_exit(int __status);
+#define exit(__p1) __posix_exit(__p1)
+
+/* Fake pass the test to find a standard ldap routine that we know is */
+/* present on VMS, but with the wrong case for the symbol */
+char ldap_url_parse(void) {return 0;}
+
+/* These are to pass the test that does not use headers */
+/* Because configure does an #undef which keeps us from using #define */
+/* char CRYPTO_add_lock(void) {return 0;} */
+char SSL_connnect(void) {return 0;}
+char ENGINE_init(void) {return 0;}
+char RAND_status(void) {return 0;}
+/* char RAND_screen(void) {return 0;} In headers, but not present */
+char RAND_egd(void) {return 0;}
+char CRYPTO_cleanup_all_ex_data(void) {return 0;}
+char SSL_get_shutdown(void) {return 0;}
+char ENGINE_load_builtin_engines (void) {return 0;}
+
+/* And these are to pass the test that uses headers. */
+/* Because the HP OpenSSL transfer vectors are currently in Upper case only */
+#pragma message disable macroredef
+#define CRYPTO_add_lock CRYPTO_ADD_LOCK
+#define SSL_connect SSL_CONNECT
+#define ENGINE_init ENGINE_INIT
+#define RAND_status RAND_STATUS
+/* #define RAND_screen RAND_SCREEN */
+#define RAND_egd RAND_EGD
+#define CRYPTO_cleanup_all_ex_data CRYPTO_CLEANUP_ALL_EX_DATA
+#define SSL_get_shutdown SSL_GET_SHUTDOWN
+#define ENGINE_load_builtin_engines ENGINE_LOAD_BUILTIN_ENGINES
+
+/* Can not use the #define macro to fix the case on CRYPTO_lock because */
+/* there is a macro CRYPTO_LOCK that is a number */
+
+/* After all the work to get configure to pass the CRYPTO_LOCK tests,
+ * it turns out that VMS does not have the CRYPTO_LOCK symbol in the
+ * transfer vector, even though it is in the header file.
+ */
+
diff --git a/packages/vms/gnv_curl_configure.sh b/packages/vms/gnv_curl_configure.sh
new file mode 100644
index 00000000..2eeb209c
--- /dev/null
+++ b/packages/vms/gnv_curl_configure.sh
@@ -0,0 +1,46 @@
+# File: gnv_curl_configure.sh
+#
+# $Id$
+#
+# Set up and run the configure script for Curl so that it can find the
+# proper options for VMS.
+#
+# Copyright 2009, 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
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# 06-Jun-2009 J. Malmberg
+# 28-Dec-2012 J. Malmberg Update for Bash 4.2.39
+#==========================================================================
+#
+# POSIX exit mode is needed for Unix shells.
+export GNV_CC_MAIN_POSIX_EXIT=1
+#
+# Where to look for the helper files.
+export GNV_OPT_DIR=.
+#
+# How to find the SSL library files.
+export LIB_OPENSSL=/SSL_LIB
+#
+# Override configure adding -std1 which is too strict for what curl
+# actually wants.
+export GNV_CC_QUALIFIERS=/STANDARD=RELAXED
+#
+# Set the directory to where the Configure script actually is.
+cd ../..
+#
+#
+./configure --prefix=/usr --exec-prefix=/usr --disable-dependency-tracking \
+ --disable-libtool-lock --with-gssapi --disable-ntlm-wb \
+ --with-ca-path=gnv\$curl_ca_path
+#
diff --git a/packages/vms/gnv_libcurl_symbols.opt b/packages/vms/gnv_libcurl_symbols.opt
new file mode 100644
index 00000000..84655926
--- /dev/null
+++ b/packages/vms/gnv_libcurl_symbols.opt
@@ -0,0 +1,181 @@
+! File GNV$LIBCURL_SYMBOLS.OPT
+!
+! $Id$
+!
+! This file must be manually maintained to allow upward compatibility
+! The SYMBOL_VECTORs are set up so that applications can be compiled
+! with either case sensitive symbol names or the default of uppercase.
+! This is because many of the Open Source applications that would call
+! the LIBCURL library need to be built with case sensitive names.
+!
+! Automatic generation is currently not practical because the order of
+! the entries are important for upward compatibility.
+!
+! The GSMATCH is manually set to the major version of 1, with the minor
+! version being the next two sections multiplied by a power of 10 to
+! become the minor version.
+! So LIBCURL 7.18.1 becomes 1,718010.
+! And a future LIBCURL of 7.18.2 would be 1,718020 if new routines were added.
+!
+! This leaves some spare digits for minor patches.
+!
+! Note that the GSMATCH does not need to have any real relationship to the
+! actual package version number.
+!
+! New SYMBOL_VECTORs must be added to the end of this list, and added
+! in pairs for both exact and with an uppercase alias.
+! If the public symbol is more than 31 characters long, then a special
+! shortened symbol will be exported, and three aliases should be created,
+! The aliases will be the special shortened uppercase alias, and both
+! upper and lowercase versions of a truncated name (preferred) or a
+! modified manually shortened name if a truncated name will not be
+! unique.
+!
+! Routines can not be removed, the functionality must be maintained.
+! If a new routine is supplied where the arguments are incompatible with
+! the older version, both versions are needed to be maintained.
+! The old version can be given a different name, but must be in the same
+! SYMBOL_VECTOR positions in this file.
+!
+! Changing the number of parameters for an existing routine does not require
+! maintaining multiple versions as long as the routine can be called with
+! the old number of parameters.
+!
+! Copyright 2009, 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
+! copyright notice and this permission notice appear in all copies.
+!
+! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+!============================================================================
+GSMATCH=LEQUAL,1,719050
+CASE_SENSITIVE=YES
+SYMBOL_VECTOR=(curl_strequal=PROCEDURE)
+SYMBOL_VECTOR=(CURL_STREQUAL/curl_strequal=PROCEDURE)
+SYMBOL_VECTOR=(curl_strnequal=PROCEDURE)
+SYMBOL_VECTOR=(CURL_STRNEQUAL/curl_strnequal=PROCEDURE)
+SYMBOL_VECTOR=(curl_formadd=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FORMADD/curl_formadd=PROCEDURE)
+SYMBOL_VECTOR=(curl_formget=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FORMGET/curl_formget=PROCEDURE)
+SYMBOL_VECTOR=(curl_formfree=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FORMFREE/curl_formfree=PROCEDURE)
+SYMBOL_VECTOR=(curl_getenv=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GETENV/curl_getenv=PROCEDURE)
+SYMBOL_VECTOR=(curl_version=PROCEDURE)
+SYMBOL_VECTOR=(CURL_VERSION/curl_version=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_escape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_ESCAPE/curl_easy_escape=PROCEDURE)
+SYMBOL_VECTOR=(curl_escape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_ESCAPE/curl_escape=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_unescape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_UNESCAPE/curl_easy_unescape=PROCEDURE)
+SYMBOL_VECTOR=(curl_unescape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_UNESCAPE/curl_unescape=PROCEDURE)
+SYMBOL_VECTOR=(curl_free=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FREE/curl_free=PROCEDURE)
+SYMBOL_VECTOR=(curl_global_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GLOBAL_INIT/curl_global_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_global_init_mem=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GLOBAL_INIT_MEM/curl_global_init_mem=PROCEDURE)
+SYMBOL_VECTOR=(curl_global_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GLOBAL_CLEANUP/curl_global_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_slist_append=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SLIST_APPEND/curl_slist_append=PROCEDURE)
+SYMBOL_VECTOR=(curl_slist_free_all=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SLIST_FREE_ALL/curl_slist_free_all=PROCEDURE)
+SYMBOL_VECTOR=(curl_getdate=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GETDATE/curl_getdate=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_INIT/curl_share_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_setopt=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_SETOPT/curl_share_setopt=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_CLEANUP/curl_share_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_version_info=PROCEDURE)
+SYMBOL_VECTOR=(CURL_VERSION_INFO/curl_version_info=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_strerror=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_STRERROR/curl_easy_strerror=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_strerror=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_STRERROR/curl_share_strerror=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_pause=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_PAUSE/curl_easy_pause=PROCEDURE)
+!
+! easy.h
+SYMBOL_VECTOR=(curl_easy_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_INIT/curl_easy_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_setopt=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_SETOPT/curl_easy_setopt=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_perform=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_PERFORM/curl_easy_perform=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_CLEANUP/curl_easy_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_getinfo=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_GETINFO/curl_easy_getinfo=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_duphandle=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_DUPHANDLE/curl_easy_duphandle=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_reset=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_RESET/curl_easy_reset=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_recv=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_RECV/curl_easy_recv=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_send=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_SEND/curl_easy_send=PROCEDURE)
+!
+! multi.h
+SYMBOL_VECTOR=(curl_multi_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_INIT/curl_multi_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_add_handle=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_ADD_HANDLE/curl_multi_add_handle=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_remove_handle=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_REMOVE_HANDLE/curl_multi_remove_handle=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_fdset=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_FDSET/curl_multi_fdset=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_perform=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_PERFORM/curl_multi_perform=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_CLEANUP/curl_multi_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_info_read=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_INFO_READ/curl_multi_info_read=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_strerror=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_STRERROR/curl_multi_strerror=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_socket=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SOCKET/curl_multi_socket=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_socket_action=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SOCKET_ACTION/curl_multi_socket_action=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_socket_all=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SOCKET_ALL/curl_multi_socket_all=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_timeout=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_TIMEOUT/curl_multi_timeout=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_setopt=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SETOPT/curl_multi_setopt=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_assign=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_ASSIGN/curl_multi_assign=PROCEDURE)
+!
+! mprintf.h
+SYMBOL_VECTOR=(curl_mprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MPRINTF/curl_mprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mfprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MFPRINTF/curl_mfprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_msprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MSPRINTF/curl_msprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_msnprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MSNPRINTF/curl_msnprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVPRINTF/curl_mvprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvfprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVFPRINTF/curl_mvfprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvsprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVSPRINTF/curl_mvsprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvsnprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVSNPRINTF/curl_mvsnprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_maprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MAPRINTF/curl_maprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvaprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVAPRINTF/curl_mvaprintf=PROCEDURE)
diff --git a/packages/vms/gnv_link_curl.com b/packages/vms/gnv_link_curl.com
new file mode 100644
index 00000000..b7e60838
--- /dev/null
+++ b/packages/vms/gnv_link_curl.com
@@ -0,0 +1,852 @@
+$! File: gnv_link_curl.com
+$!
+$! $Id$
+$!
+$! File to build images using gnv$libcurl.exe
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 10-Jun-2009 J. Malmberg
+$!============================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$ define/job gnv_packages_vms 'default_dir'
+$!
+$ on warning then goto all_exit
+$!
+$! On VAX, we need to generate a Macro transfer vector.
+$ parse_style = "TRADITIONAL"
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$ @generate_vax_transfer.com
+$ arch_name = "VAX"
+$ else
+$ arch_name = ""
+$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$ if (arch_name .eqs. "") then arch_name = "UNK"
+$!
+$! Extended parsing option starts with VMS 7.3-1.
+$! There is no 7.4, so that simplifies the parse a bit.
+$!
+$ node_swvers = f$getsyi("node_swvers")
+$ version_patch = f$extract(1, f$length(node_swvers), node_swvers)
+$ maj_ver = f$element(0, ".", version_patch)
+$ min_ver_patch = f$element(1, ".", version_patch)
+$ min_ver = f$element(0, "-", min_ver_patch)
+$ patch = f$element(1, "-", min_ver_patch)
+$ if patch .eqs. "-" then patch = ""
+$ parse_x = 0
+$ if maj_ver .ges. "8"
+$ then
+$ parse_x = 1
+$ else
+$ if maj_ver .eqs. "7" .and. min_ver .ges. "3" .and. patch .nes. ""
+$ then
+$ parse_x = 1
+$ endif
+$ endif
+$ if parse_x
+$ then
+$ parse_style = f$getjpi("", "parse_style_perm")
+$ endif
+$ endif
+$!
+$!
+$! Move to where the base directories.
+$ set def [--]
+$!
+$!
+$! Build the Message file.
+$!--------------------------
+$ if f$search("[.packages.vms]curlmsg.obj") .eqs. ""
+$ then
+$ message [.packages.vms]curlmsg.msg/object=[.packages.vms]
+$ endif
+$ if f$search("gnv$curlmsg.exe") .eqs. ""
+$ then
+$ link/share=gnv$curlmsg.exe [.packages.vms]curlmsg.obj
+$ endif
+$!
+$!
+$! Need to build the common init module.
+$!-------------------------------------------
+$ cflags = "/list/show=(expan,includ)"
+$ init_obj = "[.packages.vms]curl_crtl_init.obj"
+$ if f$search(init_obj) .eqs. ""
+$ then
+$ cc'cflags' 'default_dir'curl_crtl_init.c/obj='init_obj'
+$ endif
+$ purge 'init_obj'
+$ rename 'init_obj' ;1
+$!
+$!
+$! Need to build the module to test the HP OpenSSL version
+$!--------------------------------------------------------
+$ if arch_name .nes. "VAX"
+$ then
+$ rpt_obj = "[.packages.vms]report_openssl_version.obj
+$ if f$search(rpt_obj) .eqs. ""
+$ then
+$ cc'cflags' 'default_dir'report_openssl_version.c/obj='rpt_obj'
+$ endif
+$ purge 'rpt_obj'
+$ rename 'rpt_obj' ;1
+$!
+$ link/exe='default_dir'report_openssl_version.exe 'rpt_obj'
+$ report_openssl_version := $'default_dir'report_openssl_version.exe
+$ endif
+$!
+$!
+$ base_link_opt_file = "[.packages.vms.''arch_name']gnv_libcurl_linker.opt"
+$ share_link_opt_file = "[.packages.vms.''arch_name']gnv_ssl_libcurl_linker.opt"
+$ if f$search(base_link_opt_file) .eqs. ""
+$ then
+$ base_link_opt_file = "[.packages.vms]gnv_libcurl_linker.opt"
+$ share_link_opt_file = "[.packages.vms]gnv_ssl_libcurl_linker.opt"
+$ if f$search(base_link_opt_file) .eqs. ""
+$ then
+$ write sys$output "Can not find base library option file!"
+$ goto all_exit
+$ endif
+$ endif
+$!
+$! Create the a new option file with special fixup for HP SSL
+$! For a shared image, we always want ZLIB and 32 bit HPSSL
+$!
+$ if f$search("gnv$libzshr32") .eqs. ""
+$ then
+$ write sys$output "VMSPORTS/GNV LIBZ Shared image not found!"
+$ goto all_exit
+$ endif
+$!
+$!
+$! Need to check the version of the HP SSL shared image.
+$!
+$! VAX platform can not be checked this way, it appears symbol lookup
+$! was disabled. VAX has not been updated in a while.
+$ if arch_name .eqs. "VAX"
+$ then
+$ hp_ssl_libcrypto32 = "sys$common:[syslib]ssl$libcrypto_shr32.exe"
+$ hp_ssl_libssl32 = "sys$common:[syslib]ssl$libssl_shr32.exe"
+$ if f$search(hp_ssl_libcrypto32) .nes. ""
+$ then
+$ use_hp_ssl = 1
+$ curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$ curl_ssl_libssl32 = hp_ssl_libssl32
+$ curl_ssl_version = "OpenSSL/0.9.6g"
+$ else
+$ write sys$output "HP OpenSSL Shared images not found!"
+$ goto all_exit
+$ endif
+$ else
+$!
+$! Minimum HP version we can use reports:
+$! "OpenSSL 0.9.8w 23 Apr 2012"
+$!
+$ use_hp_ssl = 0
+$ hp_ssl_libcrypto32 = "sys$share:ssl$libcrypto_shr32.exe"
+$ hp_ssl_libssl32 = "sys$share:ssl$libssl_shr32.exe"
+$ if f$search(hp_ssl_libcrypto32) .nes. ""
+$ then
+$ curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$ curl_ssl_libssl32 = hp_ssl_libssl32
+$ report_openssl_version 'hp_ssl_libcrypto32' hp_ssl_version
+$ endif
+$!
+$ if f$type(hp_ssl_version) .eqs. "STRING"
+$ then
+$ curl_ssl_version = hp_ssl_version
+$ full_version = f$element(1, " ", hp_ssl_version)
+$ ver_maj = f$element(0, ".", full_version)
+$ ver_min = f$element(1, ".", full_version)
+$ ver_patch = f$element(2, ".", full_version)
+$! ! ver_patch is typically both a number and some letters
+$ ver_patch_len = f$length(ver_patch)
+$ ver_patchltr = ""
+$ver_patch_loop:
+$ ver_patchltr_c = f$extract(ver_patch_len - 1, 1, ver_patch)
+$ if ver_patchltr_c .les. "9" then goto ver_patch_loop_end
+$ ver_patchltr = ver_patchltr_c + ver_patchltr
+$ ver_patch_len = ver_patch_len - 1
+$ goto ver_patch_loop
+$ver_patch_loop_end:
+$ ver_patchnum = ver_patch - ver_patchltr
+$ if 'ver_maj' .ge. 0
+$ then
+$ if 'ver_min' .ge. 9
+$ then
+$ if 'ver_patchnum' .ge. 8
+$ then
+$ if ver_patchltr .ges. "w" then use_hp_ssl = 1
+$ endif
+$ endif
+$ endif
+$set nover
+$ if use_hp_ssl .eq. 0
+$ then
+$ write sys$output -
+ " HP OpenSSL version of ""''hp_ssl_version'"" is too old for shared libcurl!"
+$ endif
+$ else
+$ write sys$output "Unable to get version of HP OpenSSL"
+$ endif
+$!
+$ gnv_ssl_libcrypto32 = "gnv$gnu:[lib]ssl$libcrypto_shr32.exe"
+$ gnv_ssl_libssl32 = "gnv$gnu:[lib]ssl$libssl_shr32.exe"
+$ if f$search(gnv_ssl_libcrypto32) .nes. ""
+$ then
+$ report_openssl_version 'gnv_ssl_libcrypto32' gnv_ssl_version
+$ endif
+$!
+$ use_gnv_ssl = 0
+$ if f$type(gnv_ssl_version) .eqs. "STRING"
+$ then
+$ gnv_full_version = f$element(1, " ", gnv_ssl_version)
+$ gnv_ver_maj = f$element(0, ".", gnv_full_version)
+$ gnv_ver_min = f$element(1, ".", gnv_full_version)
+$ gnv_ver_patch = f$element(2, ".", gnv_full_version)
+$ gnv_ver_patch_len = f$length(gnv_ver_patch)
+$ gnv_ver_patchnum = f$extract(0, gnv_ver_patch_len - 1, gnv_ver_patch)
+$ gnv_ver_patchltr = f$extract(gnv_ver_patch_len - 1, 1, gnv_ver_patch)
+$ if 'gnv_ver_maj' .ge. 0
+$ then
+$ if 'gnv_ver_min' .ge. 9
+$ then
+$ if 'gnv_ver_patchnum' .ge. 8
+$ then
+$ if gnv_ver_patchltr .ges. "w" then use_gnv_ssl = 1
+$ endif
+$ endif
+$ endif
+$ if use_gnv_ssl .eq. 0
+$ then
+$ write sys$output -
+ "GNV OpenSSL version of ""''gnv_ssl_version'" is too old for shared libcurl!"
+$ endif
+$!
+$! Prefer to break the tie with the lowest supported version
+$! For simplicity, if the GNV image is present, it will be used.
+$! Version tuple is not a simple compare.
+$!
+$ if use_gnv_ssl .eq. 1 then
+$ curl_ssl_libcrypto32 = gnv_ssl_libcrypto32
+$ curl_ssl_libssl32 = gnv_ssl_libssl32
+$ curl_ssl_version = gnv_ssl_version
+$ use_hp_ssl = 0
+$ endif
+!$!
+$ else
+$ write sys$output "Unable to get version of GNV OpenSSL"
+$ endif
+$!
+$! Need to write a release note section about HP OpenSSL
+$!
+$create 'default_dir'hp_ssl_release_info.txt
+$deck
+This package is built on with the OpenSSL version listed below and requires
+the shared images from the HP OpenSSL product that is kitted with that
+version or a compatible later version.
+
+For Alpha and IA64 platforms, see the url below to register to get the
+download URL. The kit will be HP 1.4-467 or later.
+ http://h71000.www7.hp.com/openvms/products/ssl/ssl.html
+
+For VAX, use the same registration, but remove the kit name from any of the
+download URLs provided and put in CPQ-VAXVMS-SSL-V0101-B-1.PCSI-DCX_VAXEXE
+
+If your system can not be upgraded to a compatible version of OpenSSL, then
+you can extract the two shared images from the kit and place them in the
+[vms$common.gnv.lib]directory of the volume that you are installing GNV and
+or GNV compatible components like Curl.
+
+If GNV is installed, you must run the GNV startup procedure before these steps
+and before installing Curl.
+
+
+ 1. make sure that [vms$common.gnv.lib] exists by using the following
+ commands. We want the directory to be in lowercase except on VAX.
+
+ $SET PROCESS/PARSE=extend !If not VAX.
+ $CREATE/DIR device:[vms$common.gnv.lib]/prot=w:re
+
+ 2. Extract the ssl$crypto_shr32.exe and ssl$libssl_shr32.exe images.
+
+ $PRODUCT EXTRACT FILE -
+ /select=(ssl$libcrypto_shr32.exe,ssl$libssl_shr32.exe)-
+ /source=device:[dir] -
+ /options=noconfirm -
+ /destination=device:[vms$common.gnv.lib] SSL
+
+The [vms$common.sys$startup}curl_startup.com procedure will then configure
+libcurl to use these shared images instead of the system ones.
+
+When you upgrade SSL on VMS to the newer version of HP SSL, then these copies
+should be deleted.
+
+$eod
+$!
+$ open/append sslr 'default_dir'hp_ssl_release_info.txt
+$ write sslr "OpenSSL version used for building this kit: ",curl_ssl_version
+$ write sslr ""
+$ close sslr
+$!
+$!
+$! LIBZ
+$ libzshr_line = ""
+$ try_shr = "gnv$libzshr32"
+$ if f$search(try_shr) .nes. ""
+$ then
+$ libzshr_line = "''try_shr'/share"
+$ else
+$ write sys$output "''try_shr' image not found!"
+$ goto all_exit
+$ endif
+$!
+$!
+$ gssrtlshr_line = ""
+$ if arch_name .nes. "VAX"
+$ then
+$ try_shr = "sys$share:gss$rtl"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ gssrtlshr_line = "''try_shr'/share"
+$ else
+$ write sys$output "''try_shr' image not found!"
+$ goto all_exit
+$ endif
+$ endif
+$!
+$!
+$!
+$ if f$search(share_link_opt_file) .eqs. ""
+$ then
+$ create 'share_link_opt_file'
+$ open/append slopt 'share_link_opt_file'
+$ if libzshr_line .nes. "" then write slopt libzshr_line
+$ if gssrtlshr_line .nes. "" then write slopt gssrtlshr_line
+$ write slopt "gnv$curl_ssl_libcryptoshr32/share"
+$ write slopt "gnv$curl_ssl_libsslshr32/share"
+$ close slopt
+$ endif
+$!
+$! DCL build puts curllib in architecture directory
+$! GNV build uses the makefile.
+$ libfile = "[.packages.vms.''arch_name']curllib.olb"
+$ if f$search(libfile) .nes. ""
+$ then
+$ olb_file = libfile
+$ else
+$ ! GNV based build
+$ libfile = "[.lib.^.libs]libcurl.a"
+$ if f$search(libfile) .nes. ""
+$ then
+$ olb_file = libfile
+$ else
+$ write sys$output -
+ "Can not build shared image, libcurl object library not found!"
+$ goto all_exit
+$ endif
+$ endif
+$!
+$gnv_libcurl_share = "''default_dir'gnv$libcurl.exe"
+$!
+$ if f$search(gnv_libcurl_share) .eqs. ""
+$ then
+$ if arch_name .nes. "VAX"
+$ then
+$ define/user gnv$curl_ssl_libcryptoshr32 'curl_ssl_libcrypto32'
+$ define/user gnv$curl_ssl_libsslshr32 'curl_ssl_libssl32'
+$ link/dsf='default_dir'gnv$libcurl.dsf/share='gnv_libcurl_share' -
+ /map='default_dir'gnv$libcurl.map -
+ gnv_packages_vms:gnv_libcurl_symbols.opt/opt,-
+ 'olb_file'/lib,-
+ 'share_link_opt_file'/opt
+$ else
+$! VAX will not allow the logical name hack for the
+$! SSL libcryto library, it is pulling it in twice if I try it.
+$ link/share='gnv_libcurl_share'/map='default_dir'gnv$libcurl.map -
+ gnv_packages_vms:gnv_libcurl_xfer.opt/opt,-
+ 'olb_file'/lib,-
+ 'base_link_opt_file'/opt
+$ endif
+$ endif
+$!
+$!
+$ if f$search("[.src]curl-tool_main.o") .nes. ""
+$ then
+$! From src/makefile.inc:
+$! # libcurl has sources that provide functions named curlx_* that aren't
+$! # part of the official API, but we re-use the code here to avoid
+$! # duplication.
+$!
+$!
+$ if f$search("[.src]curl.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.src]curl.exe/dsf=[.src]curl.dsf -
+ [.src]curl-tool_main.o, [.src]curl-tool_binmode.o, -
+ [.src]curl-tool_bname.o, [.src]curl-tool_cb_dbg.o, -
+ [.src]curl-tool_cb_hdr.o, [.src]curl-tool_cb_prg.o, -
+ [.src]curl-tool_cb_rea.o, [.src]curl-tool_cb_see.o, -
+ [.src]curl-tool_cb_wrt.o, [.src]curl-tool_cfgable.o, -
+ [.src]curl-tool_convert.o, [.src]curl-tool_dirhie.o, -
+ [.src]curl-tool_doswin.o, [.src]curl-tool_easysrc.o, -
+ [.src]curl-tool_formparse.o, [.src]curl-tool_getparam.o, -
+ [.src]curl-tool_getpass.o, [.src]curl-tool_help.o, -
+ [.src]curl-tool_helpers.o, [.src]curl-tool_homedir.o, -
+ [.src]curl-tool_hugehelp.o, [.src]curl-tool_libinfo.o, -
+ [.src]curl-tool_metalink.o, [.src]curl-tool_mfiles.o, -
+ [.src]curl-tool_msgs.o, [.src]curl-tool_operate.o, -
+ [.src]curl-tool_operhlp.o, [.src]curl-tool_panykey.o, -
+ [.src]curl-tool_paramhlp.o, [.src]curl-tool_parsecfg.o, -
+ [.src]curl-tool_setopt.o, [.src]curl-tool_sleep.o, -
+ [.src]curl-tool_urlglob.o, [.src]curl-tool_util.o, -
+ [.src]curl-tool_vms.o, [.src]curl-tool_writeenv.o, -
+ [.src]curl-tool_writeout.o, [.src]curl-tool_xattr.o, -
+ [.src]curl-strtoofft.o, [.src]curl-strdup.o, [.src]curl-rawstr.o, -
+ [.src]curl-nonblock.o, gnv_packages_vms:curlmsg.obj,-
+ sys$input:/opt
+gnv$libcurl/share
+gnv_packages_vms:curl_crtl_init.obj
+$ endif
+$ else
+$ curl_exe = "[.src]curl.exe"
+$ 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"
+$ rawstr = "rawstr"
+$ nonblock = "nonblock"
+$ warnless = "warnless"
+$!
+$! Extended parse style requires special quoting
+$!
+$ if (arch_name .nes. "VAX") .and. (parse_style .eqs. "EXTENDED")
+$ then
+$ rawstr = """rawstr"""
+$ nonblock = """nonblock"""
+$ warnless = """warnless"""
+$ endif
+$ if f$search(curl_exe) .eqs. ""
+$ then
+$ 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'),-
+ gnv_packages_vms:curlmsg.obj,-
+ sys$input:/opt
+gnv$libcurl/share
+gnv_packages_vms:curl_crtl_init.obj
+$ endif
+$ endif
+$!
+$!
+$!
+$! in6addr_missing so skip building:
+$! [.server]sws.o
+$! [.server]sockfilt.o
+$! [.server]tftpd.o
+$!
+$!
+$ target = "10-at-a-time"
+$ if f$search("[.docs.examples]''target'.o") .eqs. ""
+$ then
+$ write sys$output "examples not built"
+$ goto all_exit
+$ endif
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "anyauthput"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "certinfo"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "cookie_interface"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "debug"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "fileupload"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "fopen"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$target = "ftpget"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "ftpgetresp"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "ftpupload"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "getinfo"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "getinmemory"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "http-post"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "httpcustomheader"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "httpput"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "https"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-app"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-debugcallback"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-double"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-post"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-single"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "persistant"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "post-callback"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "postit2"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "sendrecv"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "sepheaders"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "simple"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "simplepost"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "simplessl"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$! =============== End of docs/examples =========================
+$!
+$!
+$all_exit:
+$set def 'default_dir'
+$exit '$status'
+$!
diff --git a/packages/vms/hpssl_alpha.opt b/packages/vms/hpssl_alpha.opt
deleted file mode 100644
index 3ad9fbdb..00000000
--- a/packages/vms/hpssl_alpha.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE/SHARE
-SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE/SHARE
diff --git a/packages/vms/hpssl_ia64.opt b/packages/vms/hpssl_ia64.opt
deleted file mode 100644
index 9b220148..00000000
--- a/packages/vms/hpssl_ia64.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SYS$LIBRARY:SSL$LIBCRYPTO_SHR.EXE/SHARE
-SYS$LIBRARY:SSL$LIBSSL_SHR.EXE/SHARE
diff --git a/packages/vms/hpssl_vax.opt b/packages/vms/hpssl_vax.opt
deleted file mode 100644
index 3ad9fbdb..00000000
--- a/packages/vms/hpssl_vax.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE/SHARE
-SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE/SHARE
diff --git a/packages/vms/ldap.opt b/packages/vms/ldap.opt
deleted file mode 100644
index 23f1ee40..00000000
--- a/packages/vms/ldap.opt
+++ /dev/null
@@ -1 +0,0 @@
-SYS$SHARE:LDAP$SHR.EXE /SHARE
diff --git a/packages/vms/macro32_exactcase.patch b/packages/vms/macro32_exactcase.patch
new file mode 100644
index 00000000..eda5cac7
--- /dev/null
+++ b/packages/vms/macro32_exactcase.patch
@@ -0,0 +1,11 @@
+macro32_exactcase.exe
+SE EC
+^X00000001
+RE /I
+^X00012B1D
+'BICB2 #^X00000020,R3'
+EXIT
+'BICB2 #^X00000000,R3'
+EXI
+U
+EXI
diff --git a/packages/vms/make_gnv_curl_install.sh b/packages/vms/make_gnv_curl_install.sh
new file mode 100644
index 00000000..5099fe44
--- /dev/null
+++ b/packages/vms/make_gnv_curl_install.sh
@@ -0,0 +1,45 @@
+# File: make_gnv_curl_install.sh
+#
+# $Id$
+#
+# Set up and run the make script for Curl.
+#
+# This makes the library, the curl binary and attempts an install.
+# A search list should be set up for GNU (GNV$GNU).
+#
+# Copyright 2009, 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
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# 06-Jun-2009 J. Malmberg
+#==========================================================================
+#
+#
+# Needed VMS build setups for GNV.
+export GNV_OPT_DIR=.
+export GNV_CC_QUALIFIERS=/DEBUG/OPTIMIZE/STANDARD=RELAXED\
+/float=ieee_float/ieee_mode=denorm_results
+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.
+export GNV_CC_MAIN_POSIX_EXIT=1
+make
+cd ../..
+# adjust the libcurl.pc file, GNV currently ignores the Lib: line.
+# but is noisy about it, so we just remove it.
+sed -e 's/^Libs:/#Libs:/g' libcurl.pc > libcurl.pc_new
+rm libcurl.pc
+mv libcurl.pc_new libcurl.pc
+make install
diff --git a/packages/vms/make_pcsi_curl_kit_name.com b/packages/vms/make_pcsi_curl_kit_name.com
new file mode 100644
index 00000000..f644fe3e
--- /dev/null
+++ b/packages/vms/make_pcsi_curl_kit_name.com
@@ -0,0 +1,190 @@
+$! File: MAKE_PCSI_CURL_KIT_NAME.COM
+$!
+$! $Id$
+$!
+$! Calculates the PCSI kit name for use in building an installation kit.
+$! PCSI is HP's PolyCenter Software Installation Utility.
+$!
+$! The results are stored in as logical names so that other procedures
+$! can use them.
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 11-Jun-2009 J. Malmberg
+$!
+$!========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$! Move to the base directories
+$ set def [--]
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$! The producer is the name or common abbreviation for the entity that is
+$! making the kit. It must be set as a logical name before running this
+$! procedure.
+$!
+$! HP documents the producer as the legal owner of the software, but for
+$! open source work, it should document who is creating the package for
+$! distribution.
+$!
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "The logical name GNV_PCSI_PRODUCER needs to be defined."
+$ write sys$output "This should be set to the common abbreviation or name of"
+$ write sys$output "the entity creating this kit. If you are an individual"
+$ write sys$output "then use your initials."
+$ goto all_exit
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$ write sys$output "The logical name GNV_PCSI_PRODUCER_FULL_NAME needs to"
+$ write sys$output "be defined. This should be set to the full name of"
+$ write sys$output "the entity creating this kit. If you are an individual"
+$ write sys$output "then use your name."
+$ write sys$output "EX: DEFINE GNV_PCSI_PRODUCER_FULL_NAME ""First M. Last"""
+$ goto all_exit
+$ endif
+$!
+$ write sys$output "*****"
+$ write sys$output "***** Producer = ''producer'"
+$ write sys$output "*****"
+$!
+$!
+$! Base is one of 'VMS', 'AXPVMS', 'I64VMS', 'VAXVMS' and indicates what
+$! binaries are in the kit. A kit with just 'VMS' can be installed on all
+$! architectures.
+$!
+$ base = "VMS"
+$ arch_type = f$getsyi("ARCH_NAME")
+$ code = f$extract(0, 1, arch_type)
+$ if (code .eqs. "I") then base = "I64VMS"
+$ if (code .eqs. "V") then base = "VAXVMS"
+$ if (code .eqs. "A") then base = "AXPVMS"
+$!
+$!
+$ product = "curl"
+$!
+$!
+$! We need to get the version from curlver_h. It will have a line like
+$! #define LIBCURL_VERSION "7.31.0"
+$! or
+$! #define LIBCURL_VERSION "7.32.0-20130731".
+$!
+$! The dash indicates that this is a daily pre-release.
+$!
+$!
+$ open/read/error=version_loop_end vhf [.include.curl]curlver.h
+$ version_loop:
+$ read vhf line_in
+$ if line_in .eqs. "" then goto version_loop
+$ if f$locate("#define LIBCURL_VERSION ", line_in) .ne. 0
+$ then
+$ goto version_loop
+$ endif
+$ raw_version = f$element(2," ", line_in) - """" - """"
+$ version_loop_end:
+$ close vhf
+$!
+$!
+$ eco_level = ""
+$ if f$search("''default_dir'vms_eco_level.h") .nes. ""
+$ then
+$ open/read ef 'default_dir'vms_eco_level.h
+$ecolevel_loop:
+$ read/end=ecolevel_loop_end ef line_in
+$ prefix = f$element(0, " ", line_in)
+$ if prefix .nes. "#define" then goto ecolevel_loop
+$ key = f$element(1, " ", line_in)
+$ value = f$element(2, " ", line_in) - """" - """"
+$ if key .eqs. "VMS_ECO_LEVEL"
+$ then
+$ eco_level = "''value'"
+$ if eco_level .eqs. "0"
+$ then
+$ eco_level = ""
+$ else
+$ eco_level = "E" + eco_level
+$ endif
+$ goto ecolevel_loop_end
+$ endif
+$ goto ecolevel_loop
+$ecolevel_loop_end:
+$ close ef
+$ endif
+$!
+$!
+$! This translates to V0732-0 or D0732-0
+$! We encode the snapshot date into the version as an ECO since a daily
+$! can never have an ECO.
+$!
+$! version_type = 'V' for a production release, and 'D' for a build from a
+$! daiy snapshot of the curl source.
+$ majorver = f$element(0, ".", raw_version)
+$ minorver = f$element(1, ".", raw_version)
+$ raw_update = f$element(2, ".", raw_version)
+$ update = f$element(0, "-", raw_update)
+$ if update .eqs. "0" then update = ""
+$ daily_tag = f$element(1, "-", raw_update)
+$ vtype = "V"
+$ patch = ""
+$ if daily_tag .nes. "-"
+$ then
+$ vtype = "D"
+$ daily_tag_len = f$length(daily_tag)
+$ daily_tag = f$extract(4, daily_tag_len - 4, daily_tag)
+$ patch = vtype + daily_tag
+$ product = product + "_d"
+$ else
+$ daily_tag = ""
+$ if eco_level .nes. "" then patch = eco_level
+$ endif
+$!
+$!
+$ version_fao = "!2ZB!2ZB"
+$ mmversion = f$fao(version_fao, 'majorver', 'minorver')
+$ version = vtype + "''mmversion'"
+$ if update .nes. "" .or. patch .nes. ""
+$ then
+$! The presence of a patch implies an update
+$ if update .eqs. "" .and. patch .nes. "" then update = "0"
+$ version = version + "-" + update + patch
+$ fversion = version
+$ else
+$ fversion = version
+$ version = version + "-"
+$ endif
+$!
+$! Kit type 1 is complete kit, the only type that this procedure will make.
+$ kittype = 1
+$!
+$! Write out a logical name for the resulting base kit name.
+$ name = "''producer'-''base'-''product'-''version'-''kittype'"
+$ define GNV_PCSI_KITNAME "''name'"
+$ fname = "''product'-''fversion'"
+$ define GNV_PCSI_FILENAME_BASE "''fname'"
+$ write sys$output "*****"
+$ write sys$output "***** GNV_PCSI_KITNAME = ''name'."
+$ write sys$output "***** GNV_PCSI_FILENAME_BASE = ''fname'."
+$ write sys$output "*****"
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit '$status'
diff --git a/packages/vms/openssl_alpha.opt b/packages/vms/openssl_alpha.opt
deleted file mode 100644
index b445119a..00000000
--- a/packages/vms/openssl_alpha.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:LIBCRYPTO.EXE /SHARE
-SSLLIB:LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ia64.opt b/packages/vms/openssl_ia64.opt
deleted file mode 100644
index b445119a..00000000
--- a/packages/vms/openssl_ia64.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:LIBCRYPTO.EXE /SHARE
-SSLLIB:LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ssl_alpha.opt b/packages/vms/openssl_ssl_alpha.opt
deleted file mode 100644
index c726c2fa..00000000
--- a/packages/vms/openssl_ssl_alpha.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
-SSLLIB:SSL_LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ssl_ia64.opt b/packages/vms/openssl_ssl_ia64.opt
deleted file mode 100644
index c726c2fa..00000000
--- a/packages/vms/openssl_ssl_ia64.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
-SSLLIB:SSL_LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ssl_vax.opt b/packages/vms/openssl_ssl_vax.opt
deleted file mode 100644
index c726c2fa..00000000
--- a/packages/vms/openssl_ssl_vax.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
-SSLLIB:SSL_LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_vax.opt b/packages/vms/openssl_vax.opt
deleted file mode 100644
index b445119a..00000000
--- a/packages/vms/openssl_vax.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:LIBCRYPTO.EXE /SHARE
-SSLLIB:LIBSSL.EXE /SHARE
diff --git a/packages/vms/pcsi_gnv_curl_file_list.txt b/packages/vms/pcsi_gnv_curl_file_list.txt
new file mode 100644
index 00000000..ab5b633d
--- /dev/null
+++ b/packages/vms/pcsi_gnv_curl_file_list.txt
@@ -0,0 +1,127 @@
+! File: PCSI_GNV_CURL_FILE_LIST.TXT
+!
+! $Id$
+!
+! File list for building a PCSI kit.
+! Very simple format so that the parsing logic can be simple.
+! links first, directory second, and files third.
+!
+! link -> file tells procedure to create/remove a link on install/uninstall
+! If more than one link, consider using an alias file.
+!
+! [xxx.yyy]foo.dir is a directory file for the rename phase.
+! [xxx.yyy.foo] is a directory file for the create phase.
+! Each subdirectory needs to be on its own pair of lines.
+!
+! [xxx.yyy]file.ext is a file for the rename and add phases.
+!
+! Copyright 2009, 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
+! copyright notice and this permission notice appear in all copies.
+!
+! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+!
+! 15-Jun-2009 J. Malmberg
+!============================================================================
+[gnv.usr.bin]curl. -> [gnv.usr.bin]gnv$curl.exe
+[gnv.usr.bin]curl.exe -> [gnv.usr.bin]gnv$curl.exe
+[gnv]
+[000000]gnv.dir
+[gnv.usr]
+[gnv]usr.dir
+[gnv.usr]bin.dir
+[gnv.usr.bin]
+[gnv.usr]include.dir
+[gnv.usr.include]
+[gnv.usr.include]curl.dir
+[gnv.usr.include.curl]
+[gnv.usr]lib.dir
+[gnv.usr.lib]
+[gnv.usr.lib]pkgconfig.dir
+[gnv.usr.lib.pkgconfig]
+[gnv.usr]share.dir
+[gnv.usr.share]
+[gnv.usr.share]man.dir
+[gnv.usr.share.man]
+[gnv.usr.share.man]man1.dir
+[gnv.usr.share.man.man1]
+[gnv.usr.share.man]man3.dir
+[gnv.usr.share.man.man3]
+[gnv.usr.bin]curl-config.
+[gnv.usr.bin]gnv$curl.exe
+[gnv.usr.include.curl]curl.h
+[gnv.usr.include.curl]curlbuild.h
+[gnv.usr.include.curl]curlrules.h
+[gnv.usr.include.curl]curlver.h
+[gnv.usr.include.curl]easy.h
+[gnv.usr.include.curl]mprintf.h
+[gnv.usr.include.curl]multi.h
+[gnv.usr.include.curl]stdcheaders.h
+[gnv.usr.include.curl]typecheck-gcc.h
+[gnv.usr.lib]gnv$libcurl.exe
+[gnv.usr.lib]gnv$curlmsg.exe
+[gnv.usr.lib.pkgconfig]libcurl.pc
+[gnv.usr.share.man.man1]curl-config.1
+[gnv.usr.share.man.man1]curl.1
+[gnv.usr.share.man.man3]curl_easy_cleanup.3
+[gnv.usr.share.man.man3]curl_easy_duphandle.3
+[gnv.usr.share.man.man3]curl_easy_escape.3
+[gnv.usr.share.man.man3]curl_easy_getinfo.3
+[gnv.usr.share.man.man3]curl_easy_init.3
+[gnv.usr.share.man.man3]curl_easy_pause.3
+[gnv.usr.share.man.man3]curl_easy_perform.3
+[gnv.usr.share.man.man3]curl_easy_recv.3
+[gnv.usr.share.man.man3]curl_easy_reset.3
+[gnv.usr.share.man.man3]curl_easy_send.3
+[gnv.usr.share.man.man3]curl_easy_setopt.3
+[gnv.usr.share.man.man3]curl_easy_strerror.3
+[gnv.usr.share.man.man3]curl_easy_unescape.3
+[gnv.usr.share.man.man3]curl_escape.3
+[gnv.usr.share.man.man3]curl_formadd.3
+[gnv.usr.share.man.man3]curl_formfree.3
+[gnv.usr.share.man.man3]curl_formget.3
+[gnv.usr.share.man.man3]curl_free.3
+[gnv.usr.share.man.man3]curl_getdate.3
+[gnv.usr.share.man.man3]curl_getenv.3
+[gnv.usr.share.man.man3]curl_global_cleanup.3
+[gnv.usr.share.man.man3]curl_global_init.3
+[gnv.usr.share.man.man3]curl_global_init_mem.3
+[gnv.usr.share.man.man3]curl_mprintf.3
+[gnv.usr.share.man.man3]curl_multi_add_handle.3
+[gnv.usr.share.man.man3]curl_multi_assign.3
+[gnv.usr.share.man.man3]curl_multi_cleanup.3
+[gnv.usr.share.man.man3]curl_multi_fdset.3
+[gnv.usr.share.man.man3]curl_multi_info_read.3
+[gnv.usr.share.man.man3]curl_multi_init.3
+[gnv.usr.share.man.man3]curl_multi_perform.3
+[gnv.usr.share.man.man3]curl_multi_remove_handle.3
+[gnv.usr.share.man.man3]curl_multi_setopt.3
+[gnv.usr.share.man.man3]curl_multi_socket.3
+[gnv.usr.share.man.man3]curl_multi_socket_action.3
+[gnv.usr.share.man.man3]curl_multi_strerror.3
+[gnv.usr.share.man.man3]curl_multi_timeout.3
+[gnv.usr.share.man.man3]curl_multi_wait.3
+[gnv.usr.share.man.man3]curl_share_cleanup.3
+[gnv.usr.share.man.man3]curl_share_init.3
+[gnv.usr.share.man.man3]curl_share_setopt.3
+[gnv.usr.share.man.man3]curl_share_strerror.3
+[gnv.usr.share.man.man3]curl_slist_append.3
+[gnv.usr.share.man.man3]curl_slist_free_all.3
+[gnv.usr.share.man.man3]curl_strequal.3
+[gnv.usr.share.man.man3]curl_unescape.3
+[gnv.usr.share.man.man3]curl_version.3
+[gnv.usr.share.man.man3]curl_version_info.3
+[gnv.usr.share.man.man3]libcurl-easy.3
+[gnv.usr.share.man.man3]libcurl-errors.3
+[gnv.usr.share.man.man3]libcurl-multi.3
+[gnv.usr.share.man.man3]libcurl-share.3
+[gnv.usr.share.man.man3]libcurl-tutorial.3
+[gnv.usr.share.man.man3]libcurl.3
diff --git a/packages/vms/pcsi_product_gnv_curl.com b/packages/vms/pcsi_product_gnv_curl.com
new file mode 100644
index 00000000..747cbd63
--- /dev/null
+++ b/packages/vms/pcsi_product_gnv_curl.com
@@ -0,0 +1,199 @@
+$! File: PCSI_PRODUCT_GNV_CURL.COM
+$!
+$! $Id$
+$!
+$! This command file packages up the product CURL into a sequential
+$! format kit
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 16-Jun-2009 J.Malmberg
+$!
+$!=========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$!
+$ can_build = 1
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "GNV_PCSI_PRODUCER logical name has not been set."
+$ can_build = 0
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$ write sys$output -
+ "GNV_PCSI_PRODUCER_FULL_NAME logical name has not been set."
+$ can_build = 0
+$ endif
+$ stage_root_name = f$trnlnm("STAGE_ROOT")
+$ if stage_root_name .eqs. ""
+$ then
+$ write sys$output "STAGE_ROOT logical name has not been set."
+$ can_build = 0
+$ endif
+$!
+$ if (can_build .eq. 0)
+$ then
+$ write sys$output "Not able to build a kit."
+$ goto all_exit
+$ endif
+$!
+$! 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
+$!
+$!
+$! Make sure that the source has been backed up.
+$!----------------------------------------------
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$ @backup_gnv_curl_src.com
+$!
+$! Regenerate the PCSI description file.
+$!--------------------------------------
+$ @BUILD_GNV_CURL_PCSI_DESC.COM
+$!
+$! Regenerate the PCSI Text file.
+$!---------------------------------
+$ @BUILD_GNV_CURL_PCSI_TEXT.COM
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ 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
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product_name = 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 = ""
+$!
+$ version_fao = "!AS.!AS"
+$ mmversion = f$fao(version_fao, "''majorver'", "''minorver'")
+$ if updatepatch .nes. ""
+$ then
+$ version = "''mmversion'" + "-" + updatepatch
+$ else
+$ version = "''mmversion'"
+$ endif
+$!
+$ @stage_curl_install remove
+$ @stage_curl_install
+$!
+$! Move to the base directories
+$ set def [--]
+$ 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],"
+$ src3 = "new_gnu:[usr.lib],"
+$ src4 = "new_gnu:[usr.lib.pkgconfig],"
+$ src5 = "new_gnu:[usr.share.man.man1],"
+$ src6 = "new_gnu:[usr.share.man.man3],"
+$ src7 = "new_gnu:[vms_src],"
+$ src8 = "new_gnu:[common_src],"
+$ src9 = "prj_root:[''my_dir'],prj_root:[''my_dir'.src]"
+$ gnu_src = src1 + src2 + src3 + src4 + src5 + src6 + src7 + src8 + src9
+$!
+$!
+$ base = ""
+$ if arch_name .eqs. "ALPHA" then base = "AXPVMS"
+$ if arch_name .eqs. "IA64" then base = "I64VMS"
+$ if arch_name .eqs. "VAX" then base = "VAXVMS"
+$!
+$ if base .eqs. "" then exit 44
+$!
+$ pcsi_option = "/option=noconfirm"
+$ if arch_code .eqs. "V"
+$ then
+$ pcsi_option = ""
+$ endif
+$!
+$!
+$product package 'product_name' -
+ /base='base' -
+ /producer='producer' -
+ /source='source' -
+ /destination=STAGE_ROOT:[KIT] -
+ /material=('gnu_src','source') -
+ /format=sequential 'pcsi_option'
+$!
+$!
+$! VAX can not do a compressed kit.
+$! ZIP -9 "-V" does a better job, so no reason to normally build a compressed
+$! kit.
+$!----------------------------------
+$if p1 .eqs. "COMPRESSED"
+$then
+$ if arch_code .nes. "V"
+$ then
+$ product copy /options=(novalidate, noconfirm) /format=compressed -
+ 'product_name' -
+ /source=stage_root:[kit]/dest=stage_root:[kit] -
+ /version='version'/base='base'
+$ endif
+$endif
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit
diff --git a/packages/vms/readme b/packages/vms/readme
index 22fde88e..1b245805 100644
--- a/packages/vms/readme
+++ b/packages/vms/readme
@@ -11,6 +11,11 @@ History:
15-MAR-2004, MSK, Updated to reflect the new files in this directory.
14-FEB-2005, MSK, removed config-vms.h_with* file comments
10-FEB-2010, SMS. General update.
+14-Jul-2013, JEM, General Update, add GNV build information.
+
+
+The release notes installed by the PCSI kit consist of this file and the
+curl_gnv_build_steps.txt and other useful information.
Prerequisites:
@@ -20,37 +25,161 @@ OpenSSL or hp SSL, if you want SSL support
What is Here:
-This directory contains the following files:
+This directory contains the following files for a DCL based build.
+
+backup_gnv_curl_src.com This procedure backs up the source modules for
+ creating a PCSI kit.
+
+build_curl-config_script.com
+ Procedure to create the curl-config script.
+
+build_gnv_curl.com This procedure does a build of curl using the
+ GNV utilities and then uses DCL tools to build
+ the libcurl shared image. The setup_gnv_curl_build.com
+ procedure must be run first.
+
+build_gnv_curl_pcsi_desc.com
+ This procedure builds the pcsi$desc file for
+ creating a PCSI based package.
+
+build_gnv_curl_pcsi_text.com
+ This procedure builds the pcsi$text file for
+ creating a PCSI based package.
+
+build_gnv_curl_release_notes.com
+ This procedure creates the release notes for
+ a PCSI kit based on curl_release_note_start.txt,
+ this readme file, and the curl_gnv_build_steps.txt
+
+build_libcurl_pc.com Procedure to create a libcurl.pc file.
+
+build_vms.com DCL based build procedure.
+
+clean_gnv_curl.com This procedure cleans up the files generated by
+ a GNV based build.
+
+config_h.com DCL based procedure used by build_vms.com
+ to run generate the curl_config.h file.
+ This is a generic procedure that does most
+ of the work for generating config.h files.
+
+compare_curl_source.com Procedure to compare the working directory
+ with a repository directory or a backup staging
+ directory.
+
+curl_crtl_init.c A special pre-initialization routine to for
+ programs to behave more Unix like when run
+ under GNV.
+
+curl_gnv_build_steps.txt
+ Detailed instructions on how to built curl using
+ GNV and how to build the libcurl shared image and
+ PCSI kit.
+
+curl_release_note_start.txt
+ The first part of the curl release notes.
+
+curl_startup.com A procedure run at VMS startup to install the
+ libcurl shared image and to set up the needed
+ logical names.
-build_vms.com Build procedure.
-config-vms.h VMS-specific config.h.
curlmsg.h C header defining cURL status code macros.
+
curlmsg.msg Error message source for curlmsg.h and curlmsg.sdl.
+
curlmsg.sdl SDL source defining cURL status code constants.
+
curlmsg_vms.h Mapping of cURL status codes to VMS-form codes.
-hpssl_alpha.opt LINK options file for HP SSL on Alpha.
-hpssl_ia64.opt LINK options file for HP SSL on IA64.
-hpssl_vax.opt LINK options file for HP SSL on VAX.
-ldap.opt LINK options file for LDAP.
+
+generate_config_vms_h_curl.com
+ DCL procedure to generate the curl specific
+ definitions for curl_config.h that config_h.com
+ can not properly generate.
+
+generate_vax_transfer.com
+ DCL procedure to read an Alpha/IA64 symbol vector
+ linker option file and generate the VAX transfer
+ vector modules.
+
+gnv_conftest.c_first A helper file for the configure script.
+
+gnv_curl_configure.sh A script to run the configure script with the
+ options needed for VMS.
+
+gnv_libcurl_symbols.opt The symbol vectors needed for Alpha and IA64
+ libcurl shared image.
+
+gnv_link_curl.com Links the libcurl shared image and then links a curl
+ image to use the libcurl.
+
+macro32_exactcase.patch The patch file needed to modify VAX Macro32 to be
+ case sensitive and case preserving.
+
Makefile.am cURL kit file list for this directory.
+
Makefile.in cURL kit makefile source for this directory.
-openssl_alpha.opt LINK options file for OpenSSL on Alpha.
-openssl_ia64.opt LINK options file for OpenSSL on IA64.
-openssl_ssl_alpha.opt LINK options file for OpenSSL (SSL_ prefix) on Alpha.
-openssl_ssl_ia64.opt LINK options file for OpenSSL (SSL_ prefix) on IA64.
-openssl_ssl_vax.opt LINK options file for OpenSSL (SSL_ prefix) on VAX.
-openssl_vax.opt LINK options file for OpenSSL on VAX.
+
+make_gnv_curl_install.sh
+ Script to do a make install using GNV after running
+ the configure script.
+
+make_pcsi_curl_kit_name.com
+ This generates the name of the PCSI kit based on
+ the version of curl being built.
+
+pcsi_gnv_curl_file_list.txt
+ This is a text file describing what files should
+ be included in a PCSI kit.
+
+pcsi_product_gnv_curl.com
+ This generates the PCSI kit after the libcurl
+ shared image has been made.
+
readme. This file.
+report_openssl_version.c
+ Program to check that the openssl version is new
+ enough for building a shared libcurl image.
+
+setup_gnv_curl_build.com
+ This procedure sets up symbols and logical names
+ for a GNV build environment and also copies some
+ helper files.
+
+stage_curl_install.com This procedure sets up new_gnu: directory tree to
+ for testing the install and building the PCSI kit.
+ It takes a "remove" option to remove all the staged
+ files.
+
+vms_eco_level.h This sets the ECO level for the PCSI kit name.
+
How to Build:
-The (brute-force) builder is [.packages.vms]build_vms.com. Comments in
-this procedure describe various optional parameters which enable or
-disable optional program features, or which control the build in other
-ways. Product files (.EXE, .H, .LIS, .MAP, .OBJ, .OLB, ...) should be
-produced in an architecture-specific subdirectory under this directory
-([.ALPHA], [.IA64], [.VAX]).
+The GNV based build and the DCL based build procedures are not compatible
+and you must make sure that none of the build files are present before
+running a different type of build. Use the "REALCLEAN" option for
+BUILD_VMS.COM and the "REALCLEAN" option for clean_gnv_curl.com.
+
+The (brute-force) DCL based builder is [.packages.vms]build_vms.com.
+Comments in this procedure describe various optional parameters which
+enable or disable optional program features, or which control the build
+in other ways. Product files (.EXE, .H, .LIS, .MAP, .OBJ, .OLB, ...)
+should be produced in an architecture-specific subdirectory under this
+directory ([.ALPHA], [.IA64], [.VAX]).
+
+The file curl_gnv_build_steps.txt contains information on buildling using
+the GNV tool kit, building a shared libcurl, and producting a PCSI kit for
+distribution. The curl_gnv_build_steps.text is included in the release
+notes file of the PCSI kit.
+
+The building with 64 bit pointers does not currently work.
+
+The build procedure will detect if HP OpenSSL, LDAP, and Kerberos are
+installed and default to building with them.
+
+The build procedure will also detect if a compatible ZLIB shared image
+is installed from a PCSI kit and default to using it.
Example build commands:
@@ -58,13 +187,42 @@ produced in an architecture-specific subdirectory under this directory
@ [.packages.vms]build_vms.com LARGE LDAP
submit /noprint [.packages.vms]build_vms.com /param = (LARGE, LDAP)
+The build_vms.com procedure does not build the shared image file or the PCSI
+kit. If you have built a curl with ZLIB and HPSSL support as well as if
+LDAP and Kerberos installed, you can use the GNV_LINK_CURL.COM file.
+
+The GNV_LINK_CURL.COM contains information on how to link and run with a newer
+version of HP SSL than what may be install on an Alpha or IA64 based system.
+
+To build the PCSI kit, follow the the instructions in the file
+curl_gnv_build_steps.txt.
Other Notes:
+This release fixes known bugs #22, and #57 in the [curl.docs]known_bugs.
+file.
+
+The libcurl formdata.c module and Curl tools post form now have some
+understanding of VMS file types. Files will be posted in STREAM_LF format.
+
+The Curl tool now has some understanding of VMS file types and will upload the
+files in STREAM_LF fomat.
+
+When CURL is uploading a VARIABLE format VMS file, it is less efficient as in
+order to get the file size, it will first read the entire file once, and then
+read the file again for the actual upload.
+
+The Curl tool will now always download files into STREAM_LF format. Even if a
+file by that name with a different format already exists. This is needed to
+allow interrupted downloads to be continued.
+
+
+The libcurl file module still does not understand VMS file types and requires
+the input files to be in STREAM_LF to work propery.
+
The test suites are not supported as of 7.11.0.
The curlmsg.sdl and curlmsg.h files are generated from curlmsg.msg.
This is not done automatically, since the .MSG file is a hand edit
of the relevant stuff from the curl.h file. If you want to do this
yourself you'll need the SDL package from the freeware collection.
-
diff --git a/packages/vms/report_openssl_version.c b/packages/vms/report_openssl_version.c
new file mode 100644
index 00000000..ccb363be
--- /dev/null
+++ b/packages/vms/report_openssl_version.c
@@ -0,0 +1,100 @@
+/* File: report_openssl_version.c
+ *
+ * $Id$
+ *
+ * This file dynamically loads the openssl shared image to report the
+ * version string.
+ *
+ * It will optionally place that version string in a DCL symbol.
+ *
+ * Usage: report_openssl_version <shared_image> [<dcl_symbol>]
+ *
+ * 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
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <dlfcn.h>
+#include <openssl/opensslv.h>
+#include <openssl/crypto.h>
+
+#include <string.h>
+#include <descrip.h>
+#include <libclidef.h>
+#include <stsdef.h>
+#include <errno.h>
+
+unsigned long LIB$SET_SYMBOL(
+ const struct dsc$descriptor_s * symbol,
+ const struct dsc$descriptor_s * value,
+ const unsigned long * table_type);
+
+int main(int argc, char ** argv) {
+
+
+void * libptr;
+const char * (*ssl_version)(int t);
+const char * version;
+
+ if (argc < 1) {
+ puts("report_openssl_version filename");
+ exit(1);
+ }
+
+ libptr = dlopen(argv[1], 0);
+
+ ssl_version = (const char * (*)(int))dlsym(libptr, "SSLeay_version");
+ if ((void *)ssl_version == NULL) {
+ ssl_version = (const char * (*)(int))dlsym(libptr, "ssleay_version");
+ if ((void *)ssl_version == NULL) {
+ ssl_version = (const char * (*)(int))dlsym(libptr, "SSLEAY_VERSION");
+ }
+ }
+
+ dlclose(libptr);
+
+ if ((void *)ssl_version == NULL) {
+ puts("Unable to lookup version of OpenSSL");
+ exit(1);
+ }
+
+ version = ssl_version(SSLEAY_VERSION);
+
+ puts(version);
+
+ /* Was a symbol argument given? */
+ if (argc > 1) {
+ int status;
+ struct dsc$descriptor_s symbol_dsc;
+ struct dsc$descriptor_s value_dsc;
+ const unsigned long table_type = LIB$K_CLI_LOCAL_SYM;
+
+ symbol_dsc.dsc$a_pointer = argv[2];
+ symbol_dsc.dsc$w_length = strlen(argv[2]);
+ symbol_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ symbol_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ value_dsc.dsc$a_pointer = (char *)version; /* Cast ok */
+ value_dsc.dsc$w_length = strlen(version);
+ value_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ value_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ status = LIB$SET_SYMBOL(&symbol_dsc, &value_dsc, &table_type);
+ if (!$VMS_STATUS_SUCCESS(status)) {
+ exit(status);
+ }
+ }
+
+ exit(0);
+}
diff --git a/packages/vms/setup_gnv_curl_build.com b/packages/vms/setup_gnv_curl_build.com
new file mode 100644
index 00000000..beec733c
--- /dev/null
+++ b/packages/vms/setup_gnv_curl_build.com
@@ -0,0 +1,288 @@
+$! File: setup_gnv_curl_build.com
+$!
+$! $Id$
+$!
+$! Set up build environment for building Curl under GNV on VMS.
+$!
+$! GNV needs some files moved into the other directories to help with
+$! the configure script and the build.
+$!
+$! Copyright 2009, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 30-May-2009 J. Malmberg
+$!
+$!=======================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$!
+$! Move to where the Configure script is.
+$ set def [--]
+$!
+$! Get the path to where the Configure script is.
+$ base_dir = f$environment("default")
+$!
+$! Allow arguments to be grouped together with comma or separated by spaces
+$! Do no know if we will need more than 8.
+$ args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
+$ args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
+$!
+$! Provide lower case version to simplify parsing.
+$ args_lower = f$edit(args, "LOWERCASE,COLLAPSE")
+$!
+$ args_len = f$length(args)
+$ args_lower_len = f$length(args_lower)
+$!
+$ tests = 0
+$ if f$locate(",test", args_lower) .lt. args_lower_len
+$ then
+$ tests = 1
+$ endif
+$!
+$ examples = 0
+$ if f$locate(",exam", args_lower) .lt. args_lower_len
+$ then
+$ examples = 1
+$ endif
+$!
+$! We want detailed build logs.
+$ clist = "/list/show=(expan,includ)"
+$!
+$! We want full symbol names in exact case. Need a commmon
+$! repository for all directories.
+$ cnames = "/names=(shortened,as_is)/repository=''base_dir'"
+$!
+$! Set the compiler options for GNV CC wrapper to inherit.
+$ cc :== cc'clist''cnames'/nested_include_directory=none
+$ cxx :== cxx'clist''cnames'/nested_include_directory=none
+$ pointer_size = "32"
+$! Note 64 bit pointers requires all libraries to either have
+$! 64 bit pointers or have #pragma directives.
+$! Currently building curl on VMS with 64 bit pointers does not work.
+$!
+$! A logical name to make it easier to find some of the hacks.
+$ define/job gnv_hacks 'base_dir'
+$!
+$! A logical name to find the [.packages.vms] directory where we started.
+$ define/job gnv_packages_vms 'default_dir'
+$!
+$! Kerberos headers:
+$ if f$trnlnm("gssapi") .eqs. ""
+$ then
+$ if f$search("sys$sysroot:[kerberos]include.dir") .nes. ""
+$ then
+$ define/job gssapi sys$sysroot:[kerberos.include]
+$ endif
+$ endif
+$!
+$! OpenSSL headers
+$ if f$trnlnm("openssl") .eqs. ""
+$ then
+$ if f$trnlnm("ssl$include") .nes. ""
+$ then
+$ define/job openssl ssl$include:
+$ endif
+$ endif
+$!
+$! C compiler include path.
+$ define/job decc$system_include prj_root:[.include.curl],-
+ [-.packages.vms],-
+ ssl$include:,gnv$gnu:[usr.include],-
+ gnv$gnu:[usr.include.libz],gnv$gnu:[include],-
+ gnv$zlib_include:,-
+ sys$sysroot:[kerberos.include]
+$!
+$! Set up a include list for the compiler to find all the header files
+$! that they need.
+$!
+$ define/job decc$user_include src_root:[.include.curl]
+$ define ssl_lib sys$library:
+$!
+$! Calculate what is needed in the option files
+$ libzshr_line = ""
+$ try_shr = "gnv$libzshr''pointer_size'"
+$ if f$search(try_shr) .nes. "" then libzshr_line = "''try_shr'/share"
+$ if (libzshr_line .eqs. "")
+$ then
+$ try_shr = "sys$share:" + try_shr
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ libzshr_line = "''try_shr'/share"
+$ endif
+$ endif
+$!
+$! Kerberos
+$ gssrtlshr_line = ""
+$ try_shr = "sys$share:gss$rtl"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ gssrtlshr_line = "''try_shr'/share"
+$ endif
+$!
+$! HP OpenSSL
+$ libcryptoshr_line = ""
+$ try_shr = "sys$share:ssl$libcrypto_shr''pointer_size'"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ libcryptoshr_line = "''try_shr'/share"
+$ endif
+$!
+$ libsslshr_line = ""
+$ try_shr = "sys$share:ssl$libssl_shr''pointer_size'"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ libsslshr_line = "''try_shr'/share"
+$ endif
+$!
+$!
+$! Copy over the gnv$conftest* files to base directory.
+$!-----------------------------------------------------
+$ copy 'default_dir'gnv_conftest.c_first 'base_dir'gnv$conftest.c_first
+$ create 'base_dir'gnv$conftest.opt
+$ open/append opt 'base_dir'gnv$conftest.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$ purge 'base_dir'gnv$conftest.*
+$ rename 'base_dir'gnv$conftest.* ;1
+$!
+$!
+$!
+$! GNV helper files for building the test curl binary.
+$!-----------------------------------------------
+$ create [.src]gnv$curl.opt
+$ open/append opt [.src]gnv$curl.opt
+$ write opt "gnv_packages_vms:curlmsg.obj"
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$ purge [.src]gnv$*.*
+$ rename [.src]gnv$*.* ;1
+$!
+$!
+$! Create the libcurl
+$!------------------------------------------------------
+$ create 'default_dir'gnv_libcurl_linker.opt
+$ open/append opt 'default_dir'gnv_libcurl_linker.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$!
+$! Create the template linker file
+$!---------------------------------
+$ create 'default_dir'gnv_template_linker.opt
+$ open/append opt 'default_dir'gnv_template_linker.opt
+$ write opt "gnv_vms_common:vms_curl_init_unix.obj"
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$! Copy over the gnv$*.opt files for [.docs.examples]
+$!----------------------------------------------------
+$ if examples .ne. 0
+$ then
+$ example_apps = "10-at-a-time,anyauthput,certinfo,cookie_interface,debug"
+$ example_apps = example_apps + ",fileupload,fopen,ftpget,ftpgetresp"
+$ example_apps = example_apps + ",ftpupload,getinfo,getinmemory"
+$ example_apps = example_apps + ",http-post,httpcustomheader,httpput"
+$ example_apps = example_apps + ",https,multi-app,multi-debugcallback"
+$ example_apps = example_apps + ",multi-double,multi-post,multi-single"
+$ example_apps = example_apps + ",persistant,post-callback,postit2"
+$ example_apps = example_apps + ",sendrecv,sepheaders,simple,simplepost"
+$ example_apps = example_apps + ",simplessl"
+$!
+$ i = 0
+$example_loop:
+$ ap_name = f$element(i, ",", example_apps)
+$ if ap_name .eqs. "," then goto example_loop_end
+$ if ap_name .eqs. "" then goto example_loop_end
+$ copy 'default_dir'gnv_template_linker.opt -
+ [.docs.examples]gnv$'ap_name'.opt
+$ i = i + 1
+$ goto example_loop
+$example_loop_end:
+$!
+$! clean up the copy.
+$ purge [.docs.examples]gnv$*.opt
+$ rename [.docs.examples]gnv$*.opt ;1
+$ endif
+$!
+$!
+$ if tests .ne. 0
+$ then
+$ libtest_apps = "lib500,lib501,lib502,lib503,lib504,lib505,lib506,lib507"
+$ libtest_apps = libtest_apps + ",lib508,lib510,lib511,lib512,lib513,lib514"
+$ libtest_apps = libtest_apps + ",lib515,lib516,lib517,lib518,lib519,lib520"
+$ libtest_apps = libtest_apps + ",lib521,lib523,lib524,lib525,lib526,lib527"
+$ libtest_apps = libtest_apps + ",lib529,lib530,lib532,lib533,lib536,lib537"
+$ libtest_apps = libtest_apps + ",lib539,lib540,lib541,lib542,lib543,lib544"
+$ libtest_apps = libtest_apps + ",lib545,lib547,lib548,lib549,lib552,lib553"
+$ libtest_apps = libtest_apps + ",lib554,lib555,lib556,lib557,lib558,lib559"
+$ libtest_apps = libtest_apps + ",lib560,lib562,lib564"
+$ i = 0
+$libtest_loop:
+$ ap_name = f$element(i, ",", libtest_apps)
+$ if ap_name .eqs. "," then goto libtest_loop_end
+$ if ap_name .eqs. "" then goto libtest_loop_end
+$ copy 'default_dir'gnv_template_linker.opt -
+ [.tests.libtest]gnv$'ap_name'.opt
+$ i = i + 1
+$ goto libtest_loop
+$libtest_loop_end:
+$!
+$! clean up the copy.
+$ purge [.tests.libtest]gnv$*.opt
+$ rename [.tests.libtest]gnv$*.opt ;1
+$ endif
+$!
+$!
+$! Build the Message file.
+$!--------------------------
+$ if f$search("[.packages.vms]curlmsg.obj") .eqs. ""
+$ then
+$ message [.packages.vms]curlmsg.msg/object=[.packages.vms]
+$ endif
+$ if f$search("gnv$curlmsg.exe") .eqs. ""
+$ then
+$ link/share=gnv$curlmsg.exe [.packages.vms]curlmsg.obj
+$ endif
+$!
+$!
+$!
+$! Need to build the common init module.
+$!-------------------------------------------
+$ init_obj = "[.packages.vms]curl_crtl_init.obj"
+$ if f$search(init_obj) .eqs. ""
+$ then
+$ cc'cflags' 'default_dir'curl_crtl_init.c/obj='init_obj'
+$ purge 'init_obj'
+$ rename 'init_obj' ;1
+$ endif
+$!
+$all_exit:
+$!
+$ set def 'default_dir'
+$!
+$! Verify can break things in bash, especially in Configure scripts.
+$ set nover
+$ exit
diff --git a/packages/vms/stage_curl_install.com b/packages/vms/stage_curl_install.com
new file mode 100644
index 00000000..0dccdd6a
--- /dev/null
+++ b/packages/vms/stage_curl_install.com
@@ -0,0 +1,177 @@
+$! File: stage_curl_install.com
+$!
+$! $Id$
+$!
+$! This updates or removes the GNV$CURL.EXE and related files for the
+$! new_gnu:[*...] directory tree for running the self tests.
+$!
+$! The files installed/removed are:
+$! [usr.bin]gnv$curl.exe
+$! [usr.bin]curl-config.
+$! [usr.lib]gnv$libcurl.exe
+$! [usr.bin]curl. hard link for [usr.bin]gnv$curl.exe
+$! [usr.include.curl]curl.h
+$! [usr.include.curl]curlbuild.h
+$! [usr.include.curl]curlrules.h
+$! [usr.include.curl]curlver.h
+$! [usr.include.curl]easy.h
+$! [usr.include.curl]mprintf.h
+$! [usr.include.curl]multi.h
+$! [usr.include.curl]stdcheaders.h
+$! [usr.include.curl]typecheck-gcc.h
+$! [usr.lib.pkgconfig]libcurl.pc
+$! [usr.share.man.man1]curl-config.1
+$! [usr.share.man.man1]curl.1
+$! [usr.share.man.man3]curl*.3
+$! [usr.share.man.man3]libcurl*.3
+$! Future: A symbolic link to the release notes?
+$!
+$! Copyright 2012, 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
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 20-Aug-2012 J. Malmberg
+$!
+$!===========================================================================
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$!
+$ if arch_code .nes. "V"
+$ then
+$ set proc/parse=extended
+$ endif
+$!
+$!
+$! If the first parameter begins with "r" or "R" then this is to
+$! remove the files instead of installing them.
+$ remove_filesq = f$edit(p1, "upcase,trim")
+$ remove_filesq = f$extract(0, 1, remove_filesq)
+$ remove_files = 0
+$ if remove_filesq .eqs. "R" then remove_files = 1
+$!
+$!
+$! If we are staging files, make sure that the libcurl.pc and curl-config
+$! files are present.
+$ if remove_files .eq. 0
+$ then
+$ if f$search("[--]libcurl.pc") .eqs. ""
+$ then
+$ @build_libcurl_pc.com
+$ endif
+$ if f$search("[--]curl-config") .eqs. ""
+$ then
+$ @build_curl-config_script.com
+$ endif
+$ endif
+$!
+$!
+$! Dest dirs
+$!------------------
+$ dest_dirs1 = "[usr],[usr.bin],[usr.include],[usr.include.curl]"
+$ dest_dirs2 = ",[usr.bin],[usr.lib.pkgconfig],[usr.share]"
+$ dest_dirs3 = ",[usr.share.man],[usr.share.man.man1],[usr.share.man.man3]"
+$ dest_dirs = dest_dirs1 + dest_dirs2 + dest_dirs3
+$!
+$!
+$! Alias links needed.
+$!-------------------------
+$ source_curl = "gnv$curl.exe"
+$ dest_curl = "[bin]gnv$curl.exe"
+$ curl_links = "[bin]curl."
+$ new_gnu = "new_gnu:"
+$!
+$!
+$! Create the directories if they do not exist
+$!---------------------------------------------
+$ i = 0
+$curl_dir_loop:
+$ this_dir = f$element(i, ",", dest_dirs)
+$ i = i + 1
+$ if this_dir .eqs. "" then goto curl_dir_loop
+$ if this_dir .eqs. "," then goto curl_dir_loop_end
+$! Just create the directories, do not delete them.
+$! --------------------------------------------------
+$ if remove_files .eq. 0
+$ then
+$ create/dir 'new_gnu''this_dir'/prot=(o:rwed)
+$ endif
+$ goto curl_dir_loop
+$curl_dir_loop_end:
+$!
+$!
+$! Need to add in the executable file
+$!-----------------------------------
+$ if remove_files .eq. 0
+$ then
+$ copy [--.src]curl.exe 'new_gnu'[usr.bin]gnv$curl.exe/prot=w:re
+$ copy [--]curl-config. 'new_gnu'[usr.bin]curl-config./prot=w:re
+$ copy sys$disk:[]gnv$libcurl.exe 'new_gnu'[usr.lib]gnv$libcurl.exe/prot=w:re
+$ endif
+$!
+$ if remove_files .eq. 0
+$ then
+$ set file/enter='new_gnu'[bin]curl. 'new_gnu'[usr.bin]gnv$curl.exe
+$ else
+$ file = "''new_gnu'[bin]curl."
+$ if f$search(file) .nes. "" then set file/remove 'file';*
+$ endif
+$!
+$!
+$ if remove_files .eq. 0
+$ then
+$ copy [--.include.curl]curl.h 'new_gnu'[usr.include.curl]curl.h
+$ copy [--.include.curl]curlbuild.h -
+ 'new_gnu'[usr.include.curl]curlbuild.h
+$ copy [--.include.curl]curlrules.h -
+ 'new_gnu'[usr.include.curl]curlrules.h
+$ copy [--.include.curl]curlver.h -
+ 'new_gnu'[usr.include.curl]curlver.h
+$ copy [--.include.curl]easy.h -
+ 'new_gnu'[usr.include.curl]easy.h
+$ copy [--.include.curl]mprintf.h -
+ 'new_gnu'[usr.include.curl]mprintf.h
+$ copy [--.include.curl]multi.h -
+ 'new_gnu'[usr.include.curl]multi.h
+$ copy [--.include.curl]stdcheaders.h -
+ 'new_gnu'[usr.include.curl]stdcheaders.h
+$ copy [--.include.curl]typecheck-gcc.h -
+ 'new_gnu'[usr.include.curl]typecheck-gcc.h
+$ copy [--]libcurl.pc 'new_gnu'[usr.lib.pkgconfig]libcurl.pc
+$!
+$ copy [--.docs]curl-config.1 'new_gnu'[usr.share.man.man1]curl-config.1
+$ copy [--.docs]curl.1 'new_gnu'[usr.share.man.man1]curl.1
+$!
+$ copy [--.docs.libcurl]*.3 -
+ 'new_gnu'[usr.share.man.man3]*.3
+$!
+$ else
+$ file = "''new_gnu'[usr.bin]curl-config."
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.bin]gnv$curl.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.lib]gnv$libcurl.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.include.curl]*.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.share.man.man1]curl-config.1"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.share.man.man1]curl.1"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.share.man.man3]curl*.3"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.share.man.man3]libcurl*.3"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ endif
+$!
diff --git a/packages/vms/vms_eco_level.h b/packages/vms/vms_eco_level.h
new file mode 100644
index 00000000..43534077
--- /dev/null
+++ b/packages/vms/vms_eco_level.h
@@ -0,0 +1,30 @@
+/* File: vms_eco_level.h
+ *
+ * $Id$
+ *
+ * Copyright 2012, 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
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ */
+
+/* This file should be incremented for each ECO that is kit */
+/* for a specific cURL x.y-z release. */
+/* When any part of x.y-z is incremented, the ECO should be set back to 0 */
+
+#ifndef _VMS_ECO_LEVEL_H
+#define _VMS_ECO_LEVEL_H
+
+#define VMS_ECO_LEVEL "0"
+
+#endif
diff --git a/projects/README b/projects/README
new file mode 100644
index 00000000..b45d7839
--- /dev/null
+++ b/projects/README
@@ -0,0 +1,125 @@
+Building via IDE Project Files
+==============================
+
+ This document describes how to compile, build and install curl and libcurl
+ from sources using an IDE based development tool such as Visual Studio.
+
+ Project files are currently available for Visual C++ v6.0 to v12.0. The
+ following directory structure has been used to cater for this:
+
+ somedirectory\
+ |_curl
+ |_projects
+ |_<platform>
+ |_<ide>
+ |_lib
+ |_src
+
+ This structure allows for side-by-side compilation of curl on the same
+ machine using different versions of a given compiler (for example VC8, VC9
+ and VC10) and allows for your own application or product to be compiled
+ against those variants of libcurl for example.
+
+ Note: Typically this side-by-side compilation is generally only required
+ when a library is being compiled against dynamic runtime libraries.
+
+Dependencies
+============
+
+ The projects files also support build configurations that require third
+ 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
+ compilers, the following directory structure has been used for both the
+ output of curl and libcurl as well as these dependencies.
+
+ somedirectory\
+ |_curl
+ | |_ build
+ | |_<architecture>
+ | |_<ide>
+ | |_<configuration>
+ | |_lib
+ | |_src
+ |
+ |_openssl
+ | |_ build
+ | |_<architecture>
+ | |_VC <version>
+ | |_<configuration>
+ |
+ |_libssh2
+ |_ build
+ |_<architecture>
+ |_VC <version>
+ |_<configuration>
+
+ As OpenSSL doesn't support side-by-side compilation when using different
+ versions of Visual Studio a build helper batch file has been provided to
+ assist with this. Please run "build-openssl -help" for usage details.
+
+Building with Visual C++
+========================
+
+ To build with VC++, you will of course have to first install VC++ which is
+ 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:
+
+ 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.
+
+ Whilst files are provided for both libcurl and the curl command line tool as
+ well as a configuration that includes both, it is recommend that you use the
+ all-in-one configuration.
+
+Notes
+=====
+
+ The following keywords have been used in the directory hierarchy:
+
+ <platform> - The platform (For example: Windows)
+ <ide> - The IDE (For example: VC6, VC10, BCC5)
+ <architecture> - The platform architecture (For example: Win32, Win64)
+ <configuration> - 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
+====
+
+ These project files are a recent addition to the curl source code and as such
+ are not 100% complete. This is a list of things that are still todo:
+
+ * Support zlib
+ * Use of static runtime libraries
+ * Generate *.vcxproj.filters files for VC10, VC11 and VC12
+ * Add the Test Suite components
+ * Support for other development IDEs
+
+ Any additional help would be appreciated ;-) \ No newline at end of file
diff --git a/projects/Windows/VC10/.gitignore b/projects/Windows/VC10/.gitignore
new file mode 100644
index 00000000..3e0c9cc6
--- /dev/null
+++ b/projects/Windows/VC10/.gitignore
@@ -0,0 +1,4 @@
+/*.ncb
+/*.opensdf
+/*.sdf
+/*.suo
diff --git a/projects/Windows/VC10/curl-all.sln b/projects/Windows/VC10/curl-all.sln
new file mode 100644
index 00000000..45012721
--- /dev/null
+++ b/projects/Windows/VC10/curl-all.sln
@@ -0,0 +1,258 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "src\curlsrc.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC10/lib/.gitignore b/projects/Windows/VC10/lib/.gitignore
new file mode 100644
index 00000000..d2d7b7fb
--- /dev/null
+++ b/projects/Windows/VC10/lib/.gitignore
@@ -0,0 +1,6 @@
+/*.vcxproj
+/*.filters
+/*.user
+/*.ncb
+/*.sdf
+/*.suo
diff --git a/projects/Windows/VC10/lib/libcurl.sln b/projects/Windows/VC10/lib/libcurl.sln
new file mode 100644
index 00000000..afa547eb
--- /dev/null
+++ b/projects/Windows/VC10/lib/libcurl.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC10/lib/libcurl.tmpl b/projects/Windows/VC10/lib/libcurl.tmpl
new file mode 100644
index 00000000..7fbda831
--- /dev/null
+++ b/projects/Windows/VC10/lib/libcurl.tmpl
@@ -0,0 +1,1999 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|x64">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|Win32">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|x64">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|Win32">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|x64">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|x64">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|Win32">
+ <Configuration>DLL Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|x64">
+ <Configuration>DLL Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|x64">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|x64">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|Win32">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|x64">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|Win32">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|x64">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|x64">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|Win32">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|x64">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|Win32">
+ <Configuration>LIB Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|x64">
+ <Configuration>LIB Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}</ProjectGuid>
+ <RootNamespace>libcurl</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">$(ProjectName)d</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+CURL_LIB_C_FILES
+CURL_LIB_VTLS_C_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_LIB_H_FILES
+CURL_LIB_VTLS_H_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_LIB_RC_FILES
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/projects/Windows/VC10/src/.gitignore b/projects/Windows/VC10/src/.gitignore
new file mode 100644
index 00000000..d2d7b7fb
--- /dev/null
+++ b/projects/Windows/VC10/src/.gitignore
@@ -0,0 +1,6 @@
+/*.vcxproj
+/*.filters
+/*.user
+/*.ncb
+/*.sdf
+/*.suo
diff --git a/projects/Windows/VC10/src/curlsrc.sln b/projects/Windows/VC10/src/curlsrc.sln
new file mode 100644
index 00000000..13fc1d35
--- /dev/null
+++ b/projects/Windows/VC10/src/curlsrc.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "curlsrc.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC10/src/curlsrc.tmpl b/projects/Windows/VC10/src/curlsrc.tmpl
new file mode 100644
index 00000000..fe3a934c
--- /dev/null
+++ b/projects/Windows/VC10/src/curlsrc.tmpl
@@ -0,0 +1,2263 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|x64">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|Win32">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|x64">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|Win32">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|x64">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|x64">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|Win32">
+ <Configuration>DLL Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|x64">
+ <Configuration>DLL Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|x64">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|x64">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|Win32">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|x64">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|Win32">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|x64">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|x64">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|Win32">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|x64">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|Win32">
+ <Configuration>LIB Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|x64">
+ <Configuration>LIB Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{5228E9CE-A216-422F-A5E6-58E95E2DD71D}</ProjectGuid>
+ <RootNamespace>curlsrc</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC10\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">curl</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+CURL_SRC_X_C_FILES
+CURL_SRC_C_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_SRC_X_H_FILES
+CURL_SRC_H_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_SRC_RC_FILES
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/projects/Windows/VC11/.gitignore b/projects/Windows/VC11/.gitignore
new file mode 100644
index 00000000..3e0c9cc6
--- /dev/null
+++ b/projects/Windows/VC11/.gitignore
@@ -0,0 +1,4 @@
+/*.ncb
+/*.opensdf
+/*.sdf
+/*.suo
diff --git a/projects/Windows/VC11/curl-all.sln b/projects/Windows/VC11/curl-all.sln
new file mode 100644
index 00000000..c9085a93
--- /dev/null
+++ b/projects/Windows/VC11/curl-all.sln
@@ -0,0 +1,258 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "src\curlsrc.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC11/lib/.gitignore b/projects/Windows/VC11/lib/.gitignore
new file mode 100644
index 00000000..d2d7b7fb
--- /dev/null
+++ b/projects/Windows/VC11/lib/.gitignore
@@ -0,0 +1,6 @@
+/*.vcxproj
+/*.filters
+/*.user
+/*.ncb
+/*.sdf
+/*.suo
diff --git a/projects/Windows/VC11/lib/libcurl.sln b/projects/Windows/VC11/lib/libcurl.sln
new file mode 100644
index 00000000..6944bb9d
--- /dev/null
+++ b/projects/Windows/VC11/lib/libcurl.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC11/lib/libcurl.tmpl b/projects/Windows/VC11/lib/libcurl.tmpl
new file mode 100644
index 00000000..833c39f2
--- /dev/null
+++ b/projects/Windows/VC11/lib/libcurl.tmpl
@@ -0,0 +1,2047 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|x64">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|Win32">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|x64">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|Win32">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|x64">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|x64">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|Win32">
+ <Configuration>DLL Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|x64">
+ <Configuration>DLL Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|x64">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|x64">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|Win32">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|x64">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|Win32">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|x64">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|x64">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|Win32">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|x64">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|Win32">
+ <Configuration>LIB Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|x64">
+ <Configuration>LIB Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}</ProjectGuid>
+ <RootNamespace>libcurl</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">$(ProjectName)d</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+CURL_LIB_C_FILES
+CURL_LIB_VTLS_C_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_LIB_H_FILES
+CURL_LIB_VTLS_H_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_LIB_RC_FILES
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/projects/Windows/VC11/src/.gitignore b/projects/Windows/VC11/src/.gitignore
new file mode 100644
index 00000000..d2d7b7fb
--- /dev/null
+++ b/projects/Windows/VC11/src/.gitignore
@@ -0,0 +1,6 @@
+/*.vcxproj
+/*.filters
+/*.user
+/*.ncb
+/*.sdf
+/*.suo
diff --git a/projects/Windows/VC11/src/curlsrc.sln b/projects/Windows/VC11/src/curlsrc.sln
new file mode 100644
index 00000000..88b4f7eb
--- /dev/null
+++ b/projects/Windows/VC11/src/curlsrc.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "curlsrc.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC11/src/curlsrc.tmpl b/projects/Windows/VC11/src/curlsrc.tmpl
new file mode 100644
index 00000000..017578c3
--- /dev/null
+++ b/projects/Windows/VC11/src/curlsrc.tmpl
@@ -0,0 +1,2311 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|x64">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|Win32">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|x64">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|Win32">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|x64">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|x64">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|Win32">
+ <Configuration>DLL Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|x64">
+ <Configuration>DLL Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|x64">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|x64">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|Win32">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|x64">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|Win32">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|x64">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|x64">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|Win32">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|x64">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|Win32">
+ <Configuration>LIB Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|x64">
+ <Configuration>LIB Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{5228E9CE-A216-422F-A5E6-58E95E2DD71D}</ProjectGuid>
+ <RootNamespace>curlsrc</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC11\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">curl</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+CURL_SRC_X_C_FILES
+CURL_SRC_C_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_SRC_X_H_FILES
+CURL_SRC_H_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_SRC_RC_FILES
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/projects/Windows/VC12/.gitignore b/projects/Windows/VC12/.gitignore
new file mode 100644
index 00000000..3e0c9cc6
--- /dev/null
+++ b/projects/Windows/VC12/.gitignore
@@ -0,0 +1,4 @@
+/*.ncb
+/*.opensdf
+/*.sdf
+/*.suo
diff --git a/projects/Windows/VC12/curl-all.sln b/projects/Windows/VC12/curl-all.sln
new file mode 100644
index 00000000..57064c49
--- /dev/null
+++ b/projects/Windows/VC12/curl-all.sln
@@ -0,0 +1,258 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "src\curlsrc.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC12/lib/.gitignore b/projects/Windows/VC12/lib/.gitignore
new file mode 100644
index 00000000..d2d7b7fb
--- /dev/null
+++ b/projects/Windows/VC12/lib/.gitignore
@@ -0,0 +1,6 @@
+/*.vcxproj
+/*.filters
+/*.user
+/*.ncb
+/*.sdf
+/*.suo
diff --git a/projects/Windows/VC12/lib/libcurl.sln b/projects/Windows/VC12/lib/libcurl.sln
new file mode 100644
index 00000000..4c3e6347
--- /dev/null
+++ b/projects/Windows/VC12/lib/libcurl.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC12/lib/libcurl.tmpl b/projects/Windows/VC12/lib/libcurl.tmpl
new file mode 100644
index 00000000..65098efd
--- /dev/null
+++ b/projects/Windows/VC12/lib/libcurl.tmpl
@@ -0,0 +1,2047 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|x64">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|Win32">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|x64">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|Win32">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|x64">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|x64">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|Win32">
+ <Configuration>DLL Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|x64">
+ <Configuration>DLL Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|x64">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|x64">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|Win32">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|x64">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|Win32">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|x64">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|x64">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|Win32">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|x64">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|Win32">
+ <Configuration>LIB Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|x64">
+ <Configuration>LIB Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}</ProjectGuid>
+ <RootNamespace>libcurl</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">$(OutDir)lib\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)lib\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)lib\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">$(ProjectName)d</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+CURL_LIB_C_FILES
+CURL_LIB_VTLS_C_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_LIB_H_FILES
+CURL_LIB_VTLS_H_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_LIB_RC_FILES
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/projects/Windows/VC12/src/.gitignore b/projects/Windows/VC12/src/.gitignore
new file mode 100644
index 00000000..d2d7b7fb
--- /dev/null
+++ b/projects/Windows/VC12/src/.gitignore
@@ -0,0 +1,6 @@
+/*.vcxproj
+/*.filters
+/*.user
+/*.ncb
+/*.sdf
+/*.suo
diff --git a/projects/Windows/VC12/src/curlsrc.sln b/projects/Windows/VC12/src/curlsrc.sln
new file mode 100644
index 00000000..292699ca
--- /dev/null
+++ b/projects/Windows/VC12/src/curlsrc.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "curlsrc.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC12/src/curlsrc.tmpl b/projects/Windows/VC12/src/curlsrc.tmpl
new file mode 100644
index 00000000..88ace496
--- /dev/null
+++ b/projects/Windows/VC12/src/curlsrc.tmpl
@@ -0,0 +1,2311 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|Win32">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL OpenSSL|x64">
+ <Configuration>DLL Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|Win32">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug - DLL Windows SSPI|x64">
+ <Configuration>DLL Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|Win32">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Debug|x64">
+ <Configuration>DLL Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>DLL Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|Win32">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL OpenSSL|x64">
+ <Configuration>DLL Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>DLL Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|Win32">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release - DLL Windows SSPI|x64">
+ <Configuration>DLL Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|Win32">
+ <Configuration>DLL Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DLL Release|x64">
+ <Configuration>DLL Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Debug - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|Win32">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL OpenSSL|x64">
+ <Configuration>LIB Debug - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|Win32">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - DLL Windows SSPI|x64">
+ <Configuration>LIB Debug - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Debug - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|Win32">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug - LIB OpenSSL|x64">
+ <Configuration>LIB Debug - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|Win32">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Debug|x64">
+ <Configuration>LIB Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL - DLL LibSSH2|x64">
+ <Configuration>LIB Release - DLL OpenSSL - DLL LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|Win32">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL OpenSSL|x64">
+ <Configuration>LIB Release - DLL OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI - DLL WinIDN|x64">
+ <Configuration>LIB Release - DLL Windows SSPI - DLL WinIDN</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|Win32">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - DLL Windows SSPI|x64">
+ <Configuration>LIB Release - DLL Windows SSPI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL - LIB LibSSH2|x64">
+ <Configuration>LIB Release - LIB OpenSSL - LIB LibSSH2</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|Win32">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release - LIB OpenSSL|x64">
+ <Configuration>LIB Release - LIB OpenSSL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|Win32">
+ <Configuration>LIB Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="LIB Release|x64">
+ <Configuration>LIB Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{5228E9CE-A216-422F-A5E6-58E95E2DD71D}</ProjectGuid>
+ <RootNamespace>curlsrc</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">..\..\..\..\build\Win32\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">..\..\..\..\build\Win64\VC12\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">$(OutDir)src\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">$(OutDir)src\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">false</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">curld</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">curl</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">curl</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - LIB OpenSSL - LIB LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL OpenSSL - DLL LibSSH2|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|Win32'">
+ <Midl>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Release - DLL Windows SSPI - DLL WinIDN|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(TargetDir)$(TargetName).tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;wldap32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+CURL_SRC_X_C_FILES
+CURL_SRC_C_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_SRC_X_H_FILES
+CURL_SRC_H_FILES
+ </ItemGroup>
+ <ItemGroup>
+CURL_SRC_RC_FILES
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/projects/Windows/VC6/.gitignore b/projects/Windows/VC6/.gitignore
new file mode 100644
index 00000000..3f9df935
--- /dev/null
+++ b/projects/Windows/VC6/.gitignore
@@ -0,0 +1,2 @@
+/*.ncb
+/*.opt
diff --git a/projects/Windows/VC6/curl-all.dsw b/projects/Windows/VC6/curl-all.dsw
new file mode 100644
index 00000000..0d368d61
--- /dev/null
+++ b/projects/Windows/VC6/curl-all.dsw
@@ -0,0 +1,44 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "libcurl"=".\lib\libcurl.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "curlsrc"=".\src\curlsrc.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libcurl
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/projects/Windows/VC6/lib/.gitignore b/projects/Windows/VC6/lib/.gitignore
new file mode 100644
index 00000000..0d679953
--- /dev/null
+++ b/projects/Windows/VC6/lib/.gitignore
@@ -0,0 +1,5 @@
+/*.dsp
+/*.html
+/*.ncb
+/*.opt
+/*.plg
diff --git a/projects/Windows/VC6/lib/libcurl.dsw b/projects/Windows/VC6/lib/libcurl.dsw
new file mode 100644
index 00000000..e07624de
--- /dev/null
+++ b/projects/Windows/VC6/lib/libcurl.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "libcurl"=".\libcurl.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/projects/Windows/VC6/lib/libcurl.tmpl b/projects/Windows/VC6/lib/libcurl.tmpl
new file mode 100644
index 00000000..74c8c9c3
--- /dev/null
+++ b/projects/Windows/VC6/lib/libcurl.tmpl
@@ -0,0 +1,746 @@
+# Microsoft Developer Studio Project File - Name="libcurl" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=libcurl - Win32 LIB Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "libcurl.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "libcurl.mak" CFG="libcurl - Win32 LIB Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "libcurl - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Debug DLL OpenSSL" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Debug DLL Windows SSPI" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Release DLL OpenSSL" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Release DLL Windows SSPI" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Debug DLL OpenSSL" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Debug DLL Windows SSPI" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Debug LIB OpenSSL" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Release DLL OpenSSL" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Release DLL Windows SSPI" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Release LIB OpenSSL" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF "$(CFG)" == "libcurl - Win32 DLL Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\lib"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /win32
+# ADD MTL /nologo /D "_DEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\libcurld.dll" /pdbtype:con /fixed:no
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\libcurld.dll" /pdbtype:con /fixed:no
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\lib"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\lib"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /win32
+# ADD MTL /nologo /D "_DEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /fixed:no
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\lib"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\lib"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /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 "DEBUGBUILD" /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 "DEBUGBUILD" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /win32
+# ADD MTL /nologo /D "_DEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL Windows SSPI"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\lib"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\lib"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /GZ /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /win32
+# ADD MTL /nologo /D "_DEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib /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 "DEBUGBUILD" /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 "DEBUGBUILD" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /win32
+# ADD MTL /nologo /D "_DEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib /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
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\lib"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /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
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /win32
+# ADD MTL /nologo /D "NDEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\lib"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\lib"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c
+# ADD CPP /nologo /MD /W3 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /win32
+# ADD MTL /nologo /D "NDEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no /release
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\lib"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\lib"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /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_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_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /win32
+# ADD MTL /nologo /D "NDEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL Windows SSPI"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\lib"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\lib"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /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
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /win32
+# ADD MTL /nologo /D "NDEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL 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
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug\libcurld.lib" /machine:I386
+# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug\libcurld.lib" /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\libcurld.lib" /machine:I386
+# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\libcurld.lib" /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /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 "DEBUGBUILD" /D "CURL_STATICLIB" /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 "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\libcurld.lib" /machine:I386
+# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\libcurld.lib" /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL Windows SSPI"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /GZ /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\libcurld.lib" /machine:I386
+# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\libcurld.lib" /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\libcurld.lib" /machine:I386
+# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\libcurld.lib" /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug LIB OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\libcurld.lib" /machine:I386
+# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\libcurld.lib" /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /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 "DEBUGBUILD" /D "CURL_STATICLIB" /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 "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\libcurld.lib" /machine:I386
+# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\libcurld.lib" /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /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
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /machine:I386
+# ADD LIB32 /nologo /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /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_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_OPENSSL" /FD /EHsc /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /machine:I386
+# ADD LIB32 /nologo /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL OpenSSL DLL LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /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_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_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /machine:I386
+# ADD LIB32 /nologo /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL Windows SSPI"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /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
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /machine:I386
+# ADD LIB32 /nologo /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release LIB OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /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_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_OPENSSL" /FD /EHsc /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /machine:I386
+# ADD LIB32 /nologo /machine:I386
+
+!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release LIB OpenSSL LIB LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\lib"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\lib"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /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_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_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /machine:I386
+# ADD LIB32 /nologo /machine:I386
+
+!ENDIF
+
+# Begin Target
+
+# Name "libcurl - Win32 DLL Debug"
+# Name "libcurl - Win32 DLL Debug DLL OpenSSL"
+# Name "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2"
+# Name "libcurl - Win32 DLL Debug DLL Windows SSPI"
+# Name "libcurl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN"
+# Name "libcurl - Win32 DLL Release"
+# Name "libcurl - Win32 DLL Release DLL OpenSSL"
+# Name "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2"
+# Name "libcurl - Win32 DLL Release DLL Windows SSPI"
+# Name "libcurl - Win32 DLL Release DLL Windows SSPI DLL WinIDN"
+# Name "libcurl - Win32 LIB Debug"
+# Name "libcurl - Win32 LIB Debug DLL OpenSSL"
+# Name "libcurl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2"
+# Name "libcurl - Win32 LIB Debug DLL Windows SSPI"
+# Name "libcurl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN"
+# Name "libcurl - Win32 LIB Debug LIB OpenSSL"
+# Name "libcurl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2"
+# Name "libcurl - Win32 LIB Release"
+# Name "libcurl - Win32 LIB Release DLL OpenSSL"
+# Name "libcurl - Win32 LIB Release DLL OpenSSL DLL LibSSH2"
+# Name "libcurl - Win32 LIB Release DLL Windows SSPI"
+# Name "libcurl - Win32 LIB Release DLL Windows SSPI DLL WinIDN"
+# Name "libcurl - Win32 LIB Release LIB OpenSSL"
+# Name "libcurl - Win32 LIB Release LIB OpenSSL LIB LibSSH2"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ""
+CURL_LIB_C_FILES
+CURL_LIB_VTLS_C_FILES
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ""
+CURL_LIB_H_FILES
+CURL_LIB_VTLS_H_FILES
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter ""
+CURL_LIB_RC_FILES
+# End Group
+# End Target
+# End Project
diff --git a/projects/Windows/VC6/src/.gitignore b/projects/Windows/VC6/src/.gitignore
new file mode 100644
index 00000000..0d679953
--- /dev/null
+++ b/projects/Windows/VC6/src/.gitignore
@@ -0,0 +1,5 @@
+/*.dsp
+/*.html
+/*.ncb
+/*.opt
+/*.plg
diff --git a/projects/Windows/VC6/src/curlsrc.dsw b/projects/Windows/VC6/src/curlsrc.dsw
new file mode 100644
index 00000000..2aec0107
--- /dev/null
+++ b/projects/Windows/VC6/src/curlsrc.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "curlsrc"=".\curlsrc.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/projects/Windows/VC6/src/curlsrc.tmpl b/projects/Windows/VC6/src/curlsrc.tmpl
new file mode 100644
index 00000000..18a54134
--- /dev/null
+++ b/projects/Windows/VC6/src/curlsrc.tmpl
@@ -0,0 +1,695 @@
+# Microsoft Developer Studio Project File - Name="curlsrc" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=curlsrc - Win32 LIB Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "curlsrc.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "curlsrc.mak" CFG="curlsrc - Win32 LIB Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "curlsrc - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
+!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
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "curlsrc - Win32 DLL Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\src"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug" /fixed:no
+# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 DLL Debug DLL OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no
+# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 DLL Debug DLL OpenSSL DLL LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no
+# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 DLL Debug DLL Windows SSPI"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" /fixed:no
+# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" /fixed:no
+
+!ELSEIF "$(CFG)" == "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" /D "DEBUGBUILD" /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 "DEBUGBUILD" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no
+# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 DLL Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\src"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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 RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release" /fixed:no
+# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 DLL Release DLL OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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 OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no
+# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 DLL Release DLL OpenSSL DLL LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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 OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no
+# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 DLL Release DLL Windows SSPI"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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\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
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\src"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug\curl.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug" /fixed:no
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 LIB Debug DLL OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /fixed:no
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 LIB Debug DLL OpenSSL DLL LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 LIB Debug DLL Windows SSPI"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - 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 "DEBUGBUILD" /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 "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib 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
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /fixed:no
+# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 LIB Debug LIB OpenSSL LIB LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c
+# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no
+# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 LIB Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\src"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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 RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG"
+# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release" /fixed:no
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 LIB Release DLL OpenSSL"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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 wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /fixed:no
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 LIB Release DLL OpenSSL DLL LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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 wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no
+# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 LIB Release DLL Windows SSPI"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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 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
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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 crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /fixed:no
+# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /fixed:no
+
+!ELSEIF "$(CFG)" == "curlsrc - Win32 LIB Release LIB OpenSSL LIB LibSSH2"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2"
+# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\src"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2"
+# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\src"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /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 crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no
+# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no
+
+!ENDIF
+
+# Begin Target
+
+# Name "curlsrc - Win32 DLL Debug"
+# 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"
+
+# PROP Default_Filter ""
+CURL_SRC_X_C_FILES
+CURL_SRC_C_FILES
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ""
+CURL_SRC_X_H_FILES
+CURL_SRC_H_FILES
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter ""
+CURL_SRC_RC_FILES
+# End Group
+# End Target
+# End Project
diff --git a/projects/Windows/VC7.1/.gitignore b/projects/Windows/VC7.1/.gitignore
new file mode 100644
index 00000000..90525b85
--- /dev/null
+++ b/projects/Windows/VC7.1/.gitignore
@@ -0,0 +1,2 @@
+/*.ncb
+/*.suo
diff --git a/projects/Windows/VC7.1/curl-all.sln b/projects/Windows/VC7.1/curl-all.sln
new file mode 100644
index 00000000..4475c775
--- /dev/null
+++ b/projects/Windows/VC7.1/curl-all.sln
@@ -0,0 +1,140 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "src\curlsrc.vcproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ DLL Debug = DLL Debug
+ 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
+ GlobalSection(ProjectConfiguration) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC7.1/lib/.gitignore b/projects/Windows/VC7.1/lib/.gitignore
new file mode 100644
index 00000000..8b319a72
--- /dev/null
+++ b/projects/Windows/VC7.1/lib/.gitignore
@@ -0,0 +1,3 @@
+/*.vcproj
+/*.ncb
+/*.suo
diff --git a/projects/Windows/VC7.1/lib/libcurl.sln b/projects/Windows/VC7.1/lib/libcurl.sln
new file mode 100644
index 00000000..7513d353
--- /dev/null
+++ b/projects/Windows/VC7.1/lib/libcurl.sln
@@ -0,0 +1,87 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl.vcproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ DLL Debug = DLL Debug
+ 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
+ GlobalSection(ProjectConfiguration) = postSolution
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC7.1/lib/libcurl.tmpl b/projects/Windows/VC7.1/lib/libcurl.tmpl
new file mode 100644
index 00000000..f27782e5
--- /dev/null
+++ b/projects/Windows/VC7.1/lib/libcurl.tmpl
@@ -0,0 +1,1287 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="libcurl"
+ ProjectGUID="{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC7.1\DLL Release,..\..\..\..\..\libssh2\build\Win32\VC7.1\DLL Release"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC7.1\DLL Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC7.1\DLL Release"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC7.1\DLL Debug,..\..\..\..\..\libssh2\build\Win32\VC7.1\DLL Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="normaliz.lib wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="normaliz.lib wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="">
+CURL_LIB_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+CURL_LIB_H_FILES
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="">
+CURL_LIB_RC_FILES
+ </Filter>
+ <Filter
+ Name="vtls"
+ Filter="">
+ <Filter
+ Name="Source Files"
+ Filter="">
+CURL_LIB_VTLS_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+CURL_LIB_VTLS_H_FILES
+ </Filter>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/projects/Windows/VC7.1/src/.gitignore b/projects/Windows/VC7.1/src/.gitignore
new file mode 100644
index 00000000..8b319a72
--- /dev/null
+++ b/projects/Windows/VC7.1/src/.gitignore
@@ -0,0 +1,3 @@
+/*.vcproj
+/*.ncb
+/*.suo
diff --git a/projects/Windows/VC7.1/src/curlsrc.sln b/projects/Windows/VC7.1/src/curlsrc.sln
new file mode 100644
index 00000000..cba3b606
--- /dev/null
+++ b/projects/Windows/VC7.1/src/curlsrc.sln
@@ -0,0 +1,87 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "curlsrc.vcproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ DLL Debug = DLL Debug
+ 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
+ GlobalSection(ProjectConfiguration) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC7.1/src/curlsrc.tmpl b/projects/Windows/VC7.1/src/curlsrc.tmpl
new file mode 100644
index 00000000..65226c09
--- /dev/null
+++ b/projects/Windows/VC7.1/src/curlsrc.tmpl
@@ -0,0 +1,1381 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="curlsrc"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7.1\LIB Release"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7.1\DLL Debug,..\..\..\..\..\libssh2\build\Win32\VC7.1\DLL Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7.1\LIB Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7.1\LIB Debug,..\..\..\..\..\libssh2\build\Win32\VC7.1\LIB Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7.1\DLL Release"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7.1\DLL Release,..\..\..\..\..\libssh2\build\Win32\VC7.1\DLL Release"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7.1\LIB Release,..\..\..\..\..\libssh2\build\Win32\VC7.1\LIB Release"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7.1\DLL Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="normaliz.lib wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="normaliz.lib wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7.1\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="">
+CURL_SRC_X_C_FILES
+CURL_SRC_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+CURL_SRC_X_H_FILES
+CURL_SRC_H_FILES
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="">
+CURL_SRC_RC_FILES
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/projects/Windows/VC7/.gitignore b/projects/Windows/VC7/.gitignore
new file mode 100644
index 00000000..50098534
--- /dev/null
+++ b/projects/Windows/VC7/.gitignore
@@ -0,0 +1 @@
+/*.ncb
diff --git a/projects/Windows/VC7/curl-all.sln b/projects/Windows/VC7/curl-all.sln
new file mode 100644
index 00000000..fb7b89a4
--- /dev/null
+++ b/projects/Windows/VC7/curl-all.sln
@@ -0,0 +1,138 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "src\curlsrc.vcproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = DLL Debug
+ 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
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.0 = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC7/lib/.gitignore b/projects/Windows/VC7/lib/.gitignore
new file mode 100644
index 00000000..d884acc2
--- /dev/null
+++ b/projects/Windows/VC7/lib/.gitignore
@@ -0,0 +1,2 @@
+/*.vcproj
+/*.ncb
diff --git a/projects/Windows/VC7/lib/libcurl.sln b/projects/Windows/VC7/lib/libcurl.sln
new file mode 100644
index 00000000..f092661d
--- /dev/null
+++ b/projects/Windows/VC7/lib/libcurl.sln
@@ -0,0 +1,87 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl.vcproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = DLL Debug
+ 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
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC7/lib/libcurl.tmpl b/projects/Windows/VC7/lib/libcurl.tmpl
new file mode 100644
index 00000000..aa31f80f
--- /dev/null
+++ b/projects/Windows/VC7/lib/libcurl.tmpl
@@ -0,0 +1,1141 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="libcurl"
+ ProjectGUID="{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC7\DLL Release,..\..\..\..\..\libssh2\build\Win32\VC7\DLL Release"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC7\DLL Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC7\DLL Release"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC7\DLL Debug,..\..\..\..\..\libssh2\build\Win32\VC7\DLL Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="normaliz.lib wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="normaliz.lib wldap32.lib ws2_32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ SetChecksum="TRUE"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ AdditionalOptions="/machine:I386 "
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="">
+CURL_LIB_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+CURL_LIB_H_FILES
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="">
+CURL_LIB_RC_FILES
+ </Filter>
+ <Filter
+ Name="vtls"
+ Filter="">
+ <Filter
+ Name="Source Files"
+ Filter="">
+CURL_LIB_VTLS_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+CURL_LIB_VTLS_H_FILES
+ </Filter>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/projects/Windows/VC7/src/.gitignore b/projects/Windows/VC7/src/.gitignore
new file mode 100644
index 00000000..d884acc2
--- /dev/null
+++ b/projects/Windows/VC7/src/.gitignore
@@ -0,0 +1,2 @@
+/*.vcproj
+/*.ncb
diff --git a/projects/Windows/VC7/src/curlsrc.sln b/projects/Windows/VC7/src/curlsrc.sln
new file mode 100644
index 00000000..651c9b2b
--- /dev/null
+++ b/projects/Windows/VC7/src/curlsrc.sln
@@ -0,0 +1,87 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "curlsrc.vcproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = DLL Debug
+ 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
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {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
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC7/src/curlsrc.tmpl b/projects/Windows/VC7/src/curlsrc.tmpl
new file mode 100644
index 00000000..cb152b5f
--- /dev/null
+++ b/projects/Windows/VC7/src/curlsrc.tmpl
@@ -0,0 +1,1235 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="curlsrc"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7\LIB Release"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7\DLL Debug,..\..\..\..\..\libssh2\build\Win32\VC7\DLL Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7\LIB Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7\LIB Debug,..\..\..\..\..\libssh2\build\Win32\VC7\LIB Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7\DLL Release"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7\DLL Release,..\..\..\..\..\libssh2\build\Win32\VC7\DLL Release"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7\LIB Release,..\..\..\..\..\libssh2\build\Win32\VC7\LIB Release"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName),..\..\..\..\..\openssl\build\Win32\VC7\DLL Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ Optimization="0"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="normaliz.lib wldap32.lib ws2_32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory=".\..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc "
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\src"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386 /FIXED:NO"
+ AdditionalDependencies="normaliz.lib wldap32.lib ws2_32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC7\$(ConfigurationName)"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="">
+CURL_SRC_X_C_FILES
+CURL_SRC_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+CURL_SRC_X_H_FILES
+CURL_SRC_H_FILES
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="">
+CURL_SRC_RC_FILES
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/projects/Windows/VC8/.gitignore b/projects/Windows/VC8/.gitignore
new file mode 100644
index 00000000..90525b85
--- /dev/null
+++ b/projects/Windows/VC8/.gitignore
@@ -0,0 +1,2 @@
+/*.ncb
+/*.suo
diff --git a/projects/Windows/VC8/curl-all.sln b/projects/Windows/VC8/curl-all.sln
new file mode 100644
index 00000000..0dfbd1a4
--- /dev/null
+++ b/projects/Windows/VC8/curl-all.sln
@@ -0,0 +1,258 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "src\curlsrc.vcproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC8/lib/.gitignore b/projects/Windows/VC8/lib/.gitignore
new file mode 100644
index 00000000..6cd62ca8
--- /dev/null
+++ b/projects/Windows/VC8/lib/.gitignore
@@ -0,0 +1,4 @@
+/*.vcproj
+/*.user
+/*.ncb
+/*.suo
diff --git a/projects/Windows/VC8/lib/libcurl.sln b/projects/Windows/VC8/lib/libcurl.sln
new file mode 100644
index 00000000..f844fdff
--- /dev/null
+++ b/projects/Windows/VC8/lib/libcurl.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl.vcproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC8/lib/libcurl.tmpl b/projects/Windows/VC8/lib/libcurl.tmpl
new file mode 100644
index 00000000..b57c49f4
--- /dev/null
+++ b/projects/Windows/VC8/lib/libcurl.tmpl
@@ -0,0 +1,3648 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="libcurl"
+ ProjectGUID="{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+ RootNamespace="libcurl"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="DLL Debug|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC8\DLL Debug"
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC8\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC8\DLL Release"
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC8\DLL Release"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC8\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC8\DLL Debug"
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC8\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC8\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC8\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC8\DLL Release"
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC8\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC8\DLL Release"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ >
+CURL_LIB_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ >
+CURL_LIB_H_FILES
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ >
+CURL_LIB_RC_FILES
+ </Filter>
+ <Filter
+ Name="vtls"
+ >
+ <Filter
+ Name="Source Files"
+ >
+CURL_LIB_VTLS_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ >
+CURL_LIB_VTLS_H_FILES
+ </Filter>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/projects/Windows/VC8/src/.gitignore b/projects/Windows/VC8/src/.gitignore
new file mode 100644
index 00000000..6cd62ca8
--- /dev/null
+++ b/projects/Windows/VC8/src/.gitignore
@@ -0,0 +1,4 @@
+/*.vcproj
+/*.user
+/*.ncb
+/*.suo
diff --git a/projects/Windows/VC8/src/curlsrc.sln b/projects/Windows/VC8/src/curlsrc.sln
new file mode 100644
index 00000000..2e8ad075
--- /dev/null
+++ b/projects/Windows/VC8/src/curlsrc.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "curlsrc.vcproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC8/src/curlsrc.tmpl b/projects/Windows/VC8/src/curlsrc.tmpl
new file mode 100644
index 00000000..ad752812
--- /dev/null
+++ b/projects/Windows/VC8/src/curlsrc.tmpl
@@ -0,0 +1,4100 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="curlsrc"
+ ProjectGUID="{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+ RootNamespace="curlsrc"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="DLL Release|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\LIB Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\LIB Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\LIB Release"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\LIB Release"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC8\LIB Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC8\LIB Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC8\LIB Release"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC8\LIB Release"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\DLL Release"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\DLL Release"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC8\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC8\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC8\DLL Release"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib libssh2.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC8\DLL Release"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ >
+CURL_SRC_X_C_FILES
+CURL_SRC_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ >
+CURL_SRC_X_H_FILES
+CURL_SRC_H_FILES
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ >
+CURL_SRC_RC_FILES
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/projects/Windows/VC9/.gitignore b/projects/Windows/VC9/.gitignore
new file mode 100644
index 00000000..90525b85
--- /dev/null
+++ b/projects/Windows/VC9/.gitignore
@@ -0,0 +1,2 @@
+/*.ncb
+/*.suo
diff --git a/projects/Windows/VC9/curl-all.sln b/projects/Windows/VC9/curl-all.sln
new file mode 100644
index 00000000..44151862
--- /dev/null
+++ b/projects/Windows/VC9/curl-all.sln
@@ -0,0 +1,258 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "src\curlsrc.vcproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC9/lib/.gitignore b/projects/Windows/VC9/lib/.gitignore
new file mode 100644
index 00000000..6cd62ca8
--- /dev/null
+++ b/projects/Windows/VC9/lib/.gitignore
@@ -0,0 +1,4 @@
+/*.vcproj
+/*.user
+/*.ncb
+/*.suo
diff --git a/projects/Windows/VC9/lib/libcurl.sln b/projects/Windows/VC9/lib/libcurl.sln
new file mode 100644
index 00000000..a6619d50
--- /dev/null
+++ b/projects/Windows/VC9/lib/libcurl.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl.vcproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC9/lib/libcurl.tmpl b/projects/Windows/VC9/lib/libcurl.tmpl
new file mode 100644
index 00000000..f3ec143b
--- /dev/null
+++ b/projects/Windows/VC9/lib/libcurl.tmpl
@@ -0,0 +1,3589 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="libcurl"
+ ProjectGUID="{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}"
+ RootNamespace="libcurl"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="DLL Debug|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC9\DLL Debug"
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC9\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC9\DLL Release"
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC9\DLL Release"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC9\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC9\DLL Debug"
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC9\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC9\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC9\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC9\DLL Release"
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC9\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC9\DLL Release"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib"
+ OutputFile="$(OutDir)\$(ProjectName)d.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ ImportLibrary="$(TargetDir)$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName)d.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\lib"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ >
+CURL_LIB_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ >
+CURL_LIB_H_FILES
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ >
+CURL_LIB_RC_FILES
+ </Filter>
+ <Filter
+ Name="vtls"
+ >
+ <Filter
+ Name="Source Files"
+ >
+CURL_LIB_VTLS_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ >
+CURL_LIB_VTLS_H_FILES
+ </Filter>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/projects/Windows/VC9/src/.gitignore b/projects/Windows/VC9/src/.gitignore
new file mode 100644
index 00000000..6cd62ca8
--- /dev/null
+++ b/projects/Windows/VC9/src/.gitignore
@@ -0,0 +1,4 @@
+/*.vcproj
+/*.user
+/*.ncb
+/*.suo
diff --git a/projects/Windows/VC9/src/curlsrc.sln b/projects/Windows/VC9/src/curlsrc.sln
new file mode 100644
index 00000000..d673349e
--- /dev/null
+++ b/projects/Windows/VC9/src/curlsrc.sln
@@ -0,0 +1,157 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curlsrc", "curlsrc.vcproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32
+ DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32
+ DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64
+ DLL Debug|Win32 = DLL Debug|Win32
+ DLL Debug|x64 = DLL Debug|x64
+ DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32
+ DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64
+ DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32
+ DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64
+ DLL Release|Win32 = DLL Release|Win32
+ DLL Release|x64 = DLL Release|x64
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32
+ LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32
+ LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32
+ LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64
+ LIB Debug|Win32 = LIB Debug|Win32
+ LIB Debug|x64 = LIB Debug|x64
+ LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32
+ LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64
+ LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32
+ LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64
+ LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32
+ LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64
+ LIB Release|Win32 = LIB Release|Win32
+ LIB Release|x64 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64
+ {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/projects/Windows/VC9/src/curlsrc.tmpl b/projects/Windows/VC9/src/curlsrc.tmpl
new file mode 100644
index 00000000..e192696c
--- /dev/null
+++ b/projects/Windows/VC9/src/curlsrc.tmpl
@@ -0,0 +1,3957 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="curlsrc"
+ ProjectGUID="{5228E9CE-A216-422F-A5E6-58E95E2DD71D}"
+ RootNamespace="curlsrc"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="DLL Release|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\LIB Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\LIB Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\LIB Release"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\LIB Release"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC9\LIB Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - LIB OpenSSL - LIB LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC9\LIB Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC9\LIB Release"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - LIB OpenSSL - LIB LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC9\LIB Release"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\DLL Release"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\DLL Release"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC9\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC9\DLL Debug"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC9\DLL Release"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL OpenSSL - DLL LibSSH2|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib libssh2.lib libeay32.lib ssleay32.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC9\DLL Release"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Debug - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DLL Release - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Debug - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib libcurld.lib"
+ OutputFile="$(OutDir)\curld.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|Win32"
+ OutputDirectory="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="LIB Release - DLL Windows SSPI - DLL WinIDN|x64"
+ OutputDirectory="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\src"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName="$(TargetDir)$(TargetName).tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;CURL_STATICLIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="..\..\..\..\include"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wldap32.lib normaliz.lib libcurl.lib"
+ OutputFile="$(OutDir)\curl.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName)"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ >
+CURL_SRC_X_C_FILES
+CURL_SRC_C_FILES
+ </Filter>
+ <Filter
+ Name="Header Files"
+ >
+CURL_SRC_X_H_FILES
+CURL_SRC_H_FILES
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ >
+CURL_SRC_RC_FILES
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/projects/build-openssl.bat b/projects/build-openssl.bat
new file mode 100644
index 00000000..207ecf8b
--- /dev/null
+++ b/projects/build-openssl.bat
@@ -0,0 +1,341 @@
+@echo off
+rem ***************************************************************************
+rem * _ _ ____ _
+rem * Project ___| | | | _ \| |
+rem * / __| | | | |_) | |
+rem * | (__| |_| | _ <| |___
+rem * \___|\___/|_| \_\_____|
+rem *
+rem * Copyright (C) 2012 - 2015, Steve Holme, <steve_holme@hotmail.com>.
+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" == "-?" goto syntax
+ if /i "%~1" == "-h" goto syntax
+ if /i "%~1" == "-help" goto syntax
+
+:parseArgs
+ if "%~1" == "" goto prerequisites
+
+ if /i "%~1" == "vc6" (
+ set VC_VER=6.0
+ set VC_DESC=VC6
+ set "VC_PATH=Microsoft Visual Studio\VC98"
+ ) else if /i "%~1" == "vc7" (
+ set VC_VER=7.0
+ set VC_DESC=VC7
+ set "VC_PATH=Microsoft Visual Studio .NET\Vc7"
+ ) else if /i "%~1" == "vc7.1" (
+ set VC_VER=7.1
+ set VC_DESC=VC7.1
+ set "VC_PATH=Microsoft Visual Studio .NET 2003\Vc7"
+ ) else if /i "%~1" == "vc8" (
+ set VC_VER=8.0
+ set VC_DESC=VC8
+ set "VC_PATH=Microsoft Visual Studio 8\VC"
+ ) else if /i "%~1" == "vc9" (
+ set VC_VER=9.0
+ set VC_DESC=VC9
+ set "VC_PATH=Microsoft Visual Studio 9.0\VC"
+ ) else if /i "%~1" == "vc10" (
+ set VC_VER=10.0
+ set VC_DESC=VC10
+ set "VC_PATH=Microsoft Visual Studio 10.0\VC"
+ ) else if /i "%~1" == "vc11" (
+ set VC_VER=11.0
+ set VC_DESC=VC11
+ set "VC_PATH=Microsoft Visual Studio 11.0\VC"
+ ) else if /i "%~1" == "vc12" (
+ set VC_VER=12.0
+ set VC_DESC=VC12
+ set "VC_PATH=Microsoft Visual Studio 12.0\VC"
+ ) else if /i "%~1%" == "x86" (
+ set BUILD_PLATFORM=x86
+ ) else if /i "%~1%" == "x64" (
+ set BUILD_PLATFORM=x64
+ ) else if /i "%~1%" == "debug" (
+ set BUILD_CONFIG=debug
+ ) else if /i "%~1%" == "release" (
+ set BUILD_CONFIG=release
+ ) else (
+ if not defined START_DIR (
+ set START_DIR=%~1%
+ ) else (
+ goto unknown
+ )
+ )
+
+ shift & goto parseArgs
+
+:prerequisites
+ rem Default the start directory if one isn't specified
+ if not defined START_DIR set START_DIR=..\..\openssl
+
+ rem Calculate the program files directory
+ if defined PROGRAMFILES (
+ set "PF=%PROGRAMFILES%"
+ set OS_PLATFORM=x86
+ )
+ if defined PROGRAMFILES(x86) (
+ set "PF=%PROGRAMFILES(x86)%"
+ set OS_PLATFORM=x64
+ )
+
+ rem Check we have a program files directory
+ if not defined PF goto nopf
+
+ 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
+
+:configure
+ if "%BUILD_PLATFORM%" == "" (
+ if "%VC_VER%" == "6.0" (
+ set BUILD_PLATFORM=x86
+ ) else if "%VC_VER%" == "7.0" (
+ set BUILD_PLATFORM=x86
+ ) else if "%VC_VER%" == "7.1" (
+ set BUILD_PLATFORM=x86
+ ) else (
+ set BUILD_PLATFORM=%OS_PLATFORM%
+ )
+ )
+
+ if "%BUILD_PLATFORM%" == "x86" (
+ set VCVARS_PLATFORM=x86
+ ) else if "%BUILD_PLATFORM%" == "x64" (
+ if "%VC_VER%" == "6.0" goto nox64
+ if "%VC_VER%" == "7.0" goto nox64
+ if "%VC_VER%" == "7.1" goto nox64
+ if "%VC_VER%" == "8.0" set VCVARS_PLATFORM=x86_amd64
+ if "%VC_VER%" == "9.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
+ if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
+ if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64
+ if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64
+ )
+
+:start
+ echo.
+ if "%VC_VER%" == "6.0" (
+ call "%PF%\%VC_PATH%\bin\vcvars32"
+ ) else if "%VC_VER%" == "7.0" (
+ call "%PF%\%VC_PATH%\bin\vcvars32"
+ ) else if "%VC_VER%" == "7.1" (
+ call "%PF%\%VC_PATH%\bin\vcvars32"
+ ) else (
+ call "%PF%\%VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
+ )
+
+ echo.
+ set SAVED_PATH=%CD%
+ if defined START_DIR CD %START_DIR%
+ goto %BUILD_PLATFORM%
+
+:x64
+ rem Calculate our output directory
+ set OUTDIR=build\Win64\%VC_DESC%
+ if not exist %OUTDIR% md %OUTDIR%
+
+ if "%BUILD_CONFIG%" == "release" goto x64release
+
+:x64debug
+ rem Configuring 64-bit Debug Build
+ perl Configure debug-VC-WIN64A --prefix=%CD%
+
+ rem Perform the build
+ call ms\do_win64a
+ nmake -f ms\nt.mak
+ nmake -f ms\ntdll.mak
+
+ rem Move the output directories
+ move out32.dbg "%OUTDIR%\LIB Debug"
+ move out32dll.dbg "%OUTDIR%\DLL Debug"
+
+ rem Move the PDB files
+ move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug"
+ move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug"
+
+ rem Remove the intermediate directories
+ rd tmp32.dbg /s /q
+ rd tmp32dll.dbg /s /q
+
+ if "%BUILD_CONFIG%" == "debug" goto success
+
+:x64release
+ rem Configuring 64-bit Release Build
+ perl Configure VC-WIN64A --prefix=%CD%
+
+ rem Perform the build
+ call ms\do_win64a
+ nmake -f ms\nt.mak
+ nmake -f ms\ntdll.mak
+
+ rem Move the output directories
+ move out32 "%OUTDIR%\LIB Release"
+ move out32dll "%OUTDIR%\DLL Release"
+
+ rem Move the PDB files
+ move tmp32\lib.pdb "%OUTDIR%\LIB Release"
+ move tmp32dll\lib.pdb "%OUTDIR%\DLL Release"
+
+ rem Remove the intermediate directories
+ rd tmp32 /s /q
+ rd tmp32dll /s /q
+
+ goto success
+
+:x86
+ rem Calculate our output directory
+ set OUTDIR=build\Win32\%VC_DESC%
+ if not exist %OUTDIR% md %OUTDIR%
+
+ if "%BUILD_CONFIG%" == "release" goto x86release
+
+:x86debug
+ rem Configuring 32-bit Debug Build
+ perl Configure debug-VC-WIN32 no-asm --prefix=%CD%
+
+ rem Perform the build
+ call ms\do_ms
+ nmake -f ms\nt.mak
+ nmake -f ms\ntdll.mak
+
+ rem Move the output directories
+ move out32.dbg "%OUTDIR%\LIB Debug"
+ move out32dll.dbg "%OUTDIR%\DLL Debug"
+
+ rem Move the PDB files
+ move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug"
+ move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug"
+
+ rem Remove the intermediate directories
+ rd tmp32.dbg /s /q
+ rd tmp32dll.dbg /s /q
+
+ if "%BUILD_CONFIG%" == "debug" goto success
+
+:x86release
+ rem Configuring 32-bit Release Build
+ perl Configure VC-WIN32 no-asm --prefix=%CD%
+
+ rem Perform the build
+ call ms\do_ms
+ nmake -f ms\nt.mak
+ nmake -f ms\ntdll.mak
+
+ rem Move the output directories
+ move out32 "%OUTDIR%\LIB Release"
+ move out32dll "%OUTDIR%\DLL Release"
+
+ rem Move the PDB files
+ move tmp32\lib.pdb "%OUTDIR%\LIB Release"
+ move tmp32dll\lib.pdb "%OUTDIR%\DLL Release"
+
+ rem Remove the intermediate directories
+ rd tmp32 /s /q
+ rd tmp32dll /s /q
+
+ goto success
+
+:syntax
+ rem Display the help
+ echo.
+ echo Usage: build-openssl ^<compiler^> ^<platform^> [configuration] [directory]
+ 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
+ echo.
+ echo Platform:
+ echo.
+ echo x86 - Perform a 32-bit build
+ echo x64 - Perform a 64-bit build
+ echo.
+ echo Configuration:
+ echo.
+ echo debug - Perform a debug build
+ echo release - Perform a release build
+ echo.
+ echo Other:
+ echo.
+ echo directory - Specifies the OpenSSL source directory
+ 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
+
+:nopf
+ echo.
+ echo Error: Cannot obtain the directory for Program Files
+ goto error
+
+:novc
+ echo.
+ 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
+
+:error
+ if "%OS%" == "Windows_NT" endlocal
+ exit /B 1
+
+:success
+ cd %SAVED_PATH%
+ endlocal
+ exit /B 0
diff --git a/projects/checksrc.bat b/projects/checksrc.bat
new file mode 100644
index 00000000..8a2f63af
--- /dev/null
+++ b/projects/checksrc.bat
@@ -0,0 +1,86 @@
+@echo off
+rem ***************************************************************************
+rem * _ _ ____ _
+rem * Project ___| | | | _ \| |
+rem * / __| | | | |_) | |
+rem * | (__| |_| | _ <| |___
+rem * \___|\___/|_| \_\_____|
+rem *
+rem * Copyright (C) 2014 - 2015, Steve Holme, <steve_holme@hotmail.com>.
+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" -Wtool_hugehelp.c "%%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"
+ for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.c.*" /b') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
+ for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.h.*" /b') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%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
new file mode 100644
index 00000000..2aa04de9
--- /dev/null
+++ b/projects/generate.bat
@@ -0,0 +1,490 @@
+@echo off
+rem ***************************************************************************
+rem * _ _ ____ _
+rem * Project ___| | | | _ \| |
+rem * / __| | | | |_) | |
+rem * | (__| |_| | _ <| |___
+rem * \___|\___/|_| \_\_____|
+rem *
+rem * Copyright (C) 2014 - 2015, Steve Holme, <steve_holme@hotmail.com>.
+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 ***************************************************************************
+
+rem NOTES
+rem
+rem Do not set %ERRORLEVEL% to anything. %ERRORLEVEL% is a special variable
+rem that only contains errorlevel when %ERRORLEVEL% is not set. Same for %CD%.
+rem http://blogs.msdn.com/b/oldnewthing/archive/2008/09/26/8965755.aspx
+rem If you need to set the errorlevel do this instead: CALL :seterr [#]
+
+:begin
+ rem Check we are running on a Windows NT derived OS
+ if not "%OS%" == "Windows_NT" goto nodos
+
+ rem Check we are not running on a network drive
+ if "%~d0."=="\\." goto nonetdrv
+
+ rem Switch to this batch file's directory
+ cd /d "%~0\.." 1>NUL 2>&1
+
+ rem Set our variables
+ setlocal ENABLEEXTENSIONS
+ set VERSION=ALL
+ set MODE=GENERATE
+
+ rem Detect programs. HAVE_<PROGNAME>
+ rem When not found the variable is set undefined. The undefined pattern
+ rem allows for statements like "if not defined HAVE_PERL (command)"
+ groff --version <NUL 1>NUL 2>&1
+ if %ERRORLEVEL% EQU 0 (set HAVE_GROFF=Y) else (set HAVE_GROFF=)
+ nroff --version <NUL 1>NUL 2>&1
+ if %ERRORLEVEL% EQU 0 (set HAVE_NROFF=Y) else (set HAVE_NROFF=)
+ perl --version <NUL 1>NUL 2>&1
+ if %ERRORLEVEL% EQU 0 (set HAVE_PERL=Y) else (set HAVE_PERL=)
+ gzip --version <NUL 1>NUL 2>&1
+ if %ERRORLEVEL% EQU 0 (set HAVE_GZIP=Y) else (set HAVE_GZIP=)
+
+ 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 start
+
+ if /i "%~1" == "vc6" (
+ set VERSION=VC6
+ ) else if /i "%~1" == "vc7" (
+ set VERSION=VC7
+ ) else if /i "%~1" == "vc7.1" (
+ set VERSION=VC7.1
+ ) else if /i "%~1" == "vc8" (
+ set VERSION=VC8
+ ) else if /i "%~1" == "vc9" (
+ set VERSION=VC9
+ ) else if /i "%~1" == "vc10" (
+ set VERSION=VC10
+ ) else if /i "%~1" == "vc11" (
+ set VERSION=VC11
+ ) else if /i "%~1" == "vc12" (
+ set VERSION=VC12
+ ) else if /i "%~1" == "-clean" (
+ set MODE=CLEAN
+ ) else (
+ goto unknown
+ )
+ shift & goto parseArgs
+
+:start
+ if "%MODE%" == "GENERATE" (
+ echo.
+ echo Generating prerequisite files
+ CALL :gen_curlbuild
+ if errorlevel 1 goto error
+ CALL :gen_hugehelp
+ if errorlevel 1 goto error
+ ) else (
+ echo.
+ echo Removing prerequisite files
+ call :clean ..\include\curl\curlbuild.h
+ call :clean ..\src\tool_hugehelp.c
+ )
+ if "%VERSION%" == "VC6" goto vc6
+ if "%VERSION%" == "VC7" goto vc7
+ if "%VERSION%" == "VC7.1" goto vc71
+ if "%VERSION%" == "VC8" goto vc8
+ if "%VERSION%" == "VC9" goto vc9
+ if "%VERSION%" == "VC10" goto vc10
+ if "%VERSION%" == "VC11" goto vc11
+ if "%VERSION%" == "VC12" goto vc12
+
+:vc6
+ echo.
+
+ if "%MODE%" == "GENERATE" (
+ 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
+ ) else (
+ echo Removing VC6 project files
+ call :clean Windows\VC6\src\curlsrc.dsp
+ call :clean Windows\VC6\lib\libcurl.dsp
+ )
+
+ if not "%VERSION%" == "ALL" goto success
+
+:vc7
+ echo.
+
+ if "%MODE%" == "GENERATE" (
+ echo Generating VC7 project files
+ call :generate vcproj1 Windows\VC7\src\curlsrc.tmpl Windows\VC7\src\curlsrc.vcproj
+ call :generate vcproj1 Windows\VC7\lib\libcurl.tmpl Windows\VC7\lib\libcurl.vcproj
+ ) else (
+ echo Removing VC7 project files
+ call :clean Windows\VC7\src\curlsrc.vcproj
+ call :clean Windows\VC7\lib\libcurl.vcproj
+ )
+
+ if not "%VERSION%" == "ALL" goto success
+
+:vc71
+ echo.
+
+ if "%MODE%" == "GENERATE" (
+ echo Generating VC7.1 project files
+ call :generate vcproj1 Windows\VC7.1\src\curlsrc.tmpl Windows\VC7.1\src\curlsrc.vcproj
+ call :generate vcproj1 Windows\VC7.1\lib\libcurl.tmpl Windows\VC7.1\lib\libcurl.vcproj
+ ) else (
+ echo Removing VC7.1 project files
+ call :clean Windows\VC7.1\src\curlsrc.vcproj
+ call :clean Windows\VC7.1\lib\libcurl.vcproj
+ )
+
+ if not "%VERSION%" == "ALL" goto success
+
+:vc8
+ echo.
+
+ if "%MODE%" == "GENERATE" (
+ echo Generating VC8 project files
+ call :generate vcproj2 Windows\VC8\src\curlsrc.tmpl Windows\VC8\src\curlsrc.vcproj
+ call :generate vcproj2 Windows\VC8\lib\libcurl.tmpl Windows\VC8\lib\libcurl.vcproj
+ ) else (
+ echo Removing VC8 project files
+ call :clean Windows\VC8\src\curlsrc.vcproj
+ call :clean Windows\VC8\lib\libcurl.vcproj
+ )
+
+ if not "%VERSION%" == "ALL" goto success
+
+:vc9
+ echo.
+
+ if "%MODE%" == "GENERATE" (
+ echo Generating VC9 project files
+ call :generate vcproj2 Windows\VC9\src\curlsrc.tmpl Windows\VC9\src\curlsrc.vcproj
+ call :generate vcproj2 Windows\VC9\lib\libcurl.tmpl Windows\VC9\lib\libcurl.vcproj
+ ) else (
+ echo Removing VC9 project files
+ call :clean Windows\VC9\src\curlsrc.vcproj
+ call :clean Windows\VC9\lib\libcurl.vcproj
+ )
+
+ if not "%VERSION%" == "ALL" goto success
+
+:vc10
+ echo.
+
+ if "%MODE%" == "GENERATE" (
+ echo Generating VC10 project files
+ call :generate vcxproj Windows\VC10\src\curlsrc.tmpl Windows\VC10\src\curlsrc.vcxproj
+ call :generate vcxproj Windows\VC10\lib\libcurl.tmpl Windows\VC10\lib\libcurl.vcxproj
+ ) else (
+ echo Removing VC10 project files
+ call :clean Windows\VC10\src\curlsrc.vcxproj
+ call :clean Windows\VC10\lib\libcurl.vcxproj
+ )
+
+ if not "%VERSION%" == "ALL" goto success
+
+:vc11
+ echo.
+
+ if "%MODE%" == "GENERATE" (
+ echo Generating VC11 project files
+ call :generate vcxproj Windows\VC11\src\curlsrc.tmpl Windows\VC11\src\curlsrc.vcxproj
+ call :generate vcxproj Windows\VC11\lib\libcurl.tmpl Windows\VC11\lib\libcurl.vcxproj
+ ) else (
+ echo Removing VC11 project files
+ call :clean Windows\VC11\src\curlsrc.vcxproj
+ call :clean Windows\VC11\lib\libcurl.vcxproj
+ )
+
+ if not "%VERSION%" == "ALL" goto success
+
+:vc12
+ echo.
+
+ if "%MODE%" == "GENERATE" (
+ echo Generating VC12 project files
+ call :generate vcxproj Windows\VC12\src\curlsrc.tmpl Windows\VC12\src\curlsrc.vcxproj
+ call :generate vcxproj Windows\VC12\lib\libcurl.tmpl Windows\VC12\lib\libcurl.vcxproj
+ ) else (
+ echo Removing VC12 project files
+ call :clean Windows\VC12\src\curlsrc.vcxproj
+ call :clean Windows\VC12\lib\libcurl.vcxproj
+ )
+
+ goto success
+
+rem Main generate function.
+rem
+rem %1 - Project Type (dsp for VC6, vcproj1 for VC7 and VC7.1, vcproj2 for VC8 and VC9
+rem or vcxproj for VC10, VC11 and VC12)
+rem %2 - Input template file
+rem %3 - Output project file
+rem
+:generate
+ if not exist %2 (
+ echo.
+ echo Error: Cannot open %CD%\%2
+ exit /B
+ )
+
+ if exist %3 (
+ del %3
+ )
+
+ echo * %CD%\%3
+ for /f "usebackq delims=" %%i in (`"findstr /n ^^ %2"`) do (
+ set "var=%%i"
+ setlocal enabledelayedexpansion
+ set "var=!var:*:=!"
+
+ if "!var!" == "CURL_SRC_C_FILES" (
+ for /f "delims=" %%c in ('dir /b ..\src\*.c') do call :element %1 src "%%c" %3
+ ) else if "!var!" == "CURL_SRC_H_FILES" (
+ for /f "delims=" %%h in ('dir /b ..\src\*.h') do call :element %1 src "%%h" %3
+ ) else if "!var!" == "CURL_SRC_RC_FILES" (
+ for /f "delims=" %%r in ('dir /b ..\src\*.rc') do call :element %1 src "%%r" %3
+ ) else if "!var!" == "CURL_SRC_X_C_FILES" (
+ call :element %1 lib "strtoofft.c" %3
+ call :element %1 lib "rawstr.c" %3
+ call :element %1 lib "nonblock.c" %3
+ call :element %1 lib "warnless.c" %3
+ ) else if "!var!" == "CURL_SRC_X_H_FILES" (
+ call :element %1 lib "config-win32.h" %3
+ call :element %1 lib "curl_setup.h" %3
+ call :element %1 lib "strtoofft.h" %3
+ call :element %1 lib "rawstr.h" %3
+ call :element %1 lib "nonblock.h" %3
+ call :element %1 lib "warnless.h" %3
+ ) else if "!var!" == "CURL_LIB_C_FILES" (
+ for /f "delims=" %%c in ('dir /b ..\lib\*.c') do call :element %1 lib "%%c" %3
+ ) else if "!var!" == "CURL_LIB_H_FILES" (
+ for /f "delims=" %%h in ('dir /b ..\lib\*.h') do call :element %1 lib "%%h" %3
+ ) else if "!var!" == "CURL_LIB_RC_FILES" (
+ for /f "delims=" %%r in ('dir /b ..\lib\*.rc') do call :element %1 lib "%%r" %3
+ ) else if "!var!" == "CURL_LIB_VAUTH_C_FILES" (
+ for /f "delims=" %%c in ('dir /b ..\lib\vauth\*.c') do call :element %1 lib\vauth "%%c" %3
+ ) else if "!var!" == "CURL_LIB_VAUTH_H_FILES" (
+ for /f "delims=" %%h in ('dir /b ..\lib\vauth\*.h') do call :element %1 lib\vauth "%%h" %3
+ ) else if "!var!" == "CURL_LIB_VTLS_C_FILES" (
+ for /f "delims=" %%c in ('dir /b ..\lib\vtls\*.c') do call :element %1 lib\vtls "%%c" %3
+ ) else if "!var!" == "CURL_LIB_VTLS_H_FILES" (
+ for /f "delims=" %%h in ('dir /b ..\lib\vtls\*.h') do call :element %1 lib\vtls "%%h" %3
+ ) else (
+ echo.!var!>> %3
+ )
+
+ endlocal
+ )
+ exit /B
+
+rem Generates a single file xml element.
+rem
+rem %1 - Project Type (dsp for VC6, vcproj1 for VC7 and VC7.1, vcproj2 for VC8 and VC9
+rem or vcxproj for VC10, VC11 and VC12)
+rem %2 - Directory (src, lib, lib\vauth or lib\vtls)
+rem %3 - Source filename
+rem %4 - Output project file
+rem
+:element
+ set "SPACES= "
+ if "%2" == "lib\vauth" (
+ set "TABS= "
+ ) else if "%2" == "lib\vtls" (
+ set "TABS= "
+ ) else (
+ set "TABS= "
+ )
+
+ call :extension %3 ext
+
+ if "%1" == "dsp" (
+ echo # Begin Source File>> %4
+ echo.>> %4
+ echo SOURCE=..\..\..\..\%2\%~3>> %4
+ echo # End Source File>> %4
+ ) else if "%1" == "vcproj1" (
+ echo %TABS%^<File>> %4
+ echo %TABS% RelativePath="..\..\..\..\%2\%~3"^>>> %4
+ echo %TABS%^</File^>>> %4
+ ) else if "%1" == "vcproj2" (
+ echo %TABS%^<File>> %4
+ echo %TABS% RelativePath="..\..\..\..\%2\%~3">> %4
+ echo %TABS%^>>> %4
+ echo %TABS%^</File^>>> %4
+ ) else if "%1" == "vcxproj" (
+ if "%ext%" == "c" (
+ echo %SPACES%^<ClCompile Include=^"..\..\..\..\%2\%~3^" /^>>> %4
+ ) else if "%ext%" == "h" (
+ echo %SPACES%^<ClInclude Include=^"..\..\..\..\%2\%~3^" /^>>> %4
+ ) else if "%ext%" == "rc" (
+ echo %SPACES%^<ResourceCompile Include=^"..\..\..\..\%2\%~3^" /^>>> %4
+ )
+ )
+
+ exit /B
+
+rem Returns the extension for a given filename.
+rem
+rem %1 - The filename
+rem %2 - The return value
+rem
+:extension
+ set fname=%~1
+ set ename=
+:loop1
+ if "%fname%"=="" (
+ set %2=
+ exit /B
+ )
+
+ if not "%fname:~-1%"=="." (
+ set ename=%fname:~-1%%ename%
+ set fname=%fname:~0,-1%
+ goto loop1
+ )
+
+ set %2=%ename%
+ exit /B
+
+rem Removes the given project file.
+rem
+rem %1 - The filename
+rem
+:clean
+ echo * %CD%\%1
+
+ if exist %1 (
+ del %1
+ )
+
+ exit /B
+
+rem CALL this function to generate ..\src\tool_hugehelp.c
+rem Returns exit code 0 on success or 1 on failure.
+:gen_hugehelp
+ setlocal
+ set LC_ALL=C
+ set ROFFCMD=
+ if defined HAVE_PERL (
+ if defined HAVE_GROFF (
+ set ROFFCMD=groff -mtty-char -Tascii -P-c -man
+ ) else if defined HAVE_NROFF (
+ set ROFFCMD=nroff -c -Tascii -man
+ )
+ )
+ echo * %CD%\..\src\tool_hugehelp.c
+ echo #include "tool_setup.h"> ..\src\tool_hugehelp.c
+ echo #include "tool_hugehelp.h">> ..\src\tool_hugehelp.c
+ if defined ROFFCMD (
+ if defined HAVE_GZIP (
+ echo #ifndef HAVE_LIBZ>> ..\src\tool_hugehelp.c
+ )
+ %ROFFCMD% ..\docs\curl.1 2>NUL | perl ..\src\mkhelp.pl ..\docs\MANUAL >> ..\src\tool_hugehelp.c
+ if defined HAVE_GZIP (
+ echo #else>> ..\src\tool_hugehelp.c
+ %ROFFCMD% ..\docs\curl.1 2>NUL | perl ..\src\mkhelp.pl -c ..\docs\MANUAL >> ..\src\tool_hugehelp.c
+ echo #endif /^* HAVE_LIBZ ^*/>> ..\src\tool_hugehelp.c
+ )
+ ) else (
+ echo.
+ echo Warning: The curl manual could not be integrated in the source. This means when
+ echo you build curl the manual will not be available (curl --man^). Integration of
+ echo the manual is not required and a summary of the options will still be available
+ echo (curl --help^). To integrate the manual your PATH is required to have
+ echo groff/nroff, perl and optionally gzip for compression.
+ echo.
+ echo void hugehelp(void^)>> ..\src\tool_hugehelp.c
+ echo #ifdef USE_MANUAL>> ..\src\tool_hugehelp.c
+ echo { fputs("built-in manual not included\n", stdout^); }>> ..\src\tool_hugehelp.c
+ echo #else>> ..\src\tool_hugehelp.c
+ echo {}>> ..\src\tool_hugehelp.c
+ echo #endif>> ..\src\tool_hugehelp.c
+ )
+ findstr "/C:void hugehelp(void)" ..\src\tool_hugehelp.c 1>NUL 2>&1
+ if %ERRORLEVEL% NEQ 0 (
+ echo Error: Unable to generate ..\src\tool_hugehelp.c
+ exit /B 1
+ )
+ exit /B 0
+
+rem CALL this function to generate ..\include\curl\curlbuild.h
+rem Returns exit code 0 on success or 1 on failure.
+:gen_curlbuild
+ setlocal
+ echo * %CD%\..\include\curl\curlbuild.h
+ copy /y ..\include\curl\curlbuild.h.dist ..\include\curl\curlbuild.h 1>NUL
+ if %ERRORLEVEL% NEQ 0 (
+ echo Error: Unable to generate ..\include\curl\curlbuild.h
+ exit /B 1
+ )
+ exit /B 0
+
+:syntax
+ rem Display the help
+ echo.
+ echo Usage: generate [compiler] [-clean]
+ 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
+ echo.
+ echo -clean - Removes the project files
+ goto error
+
+:unknown
+ echo.
+ echo Error: Unknown argument '%1'
+ goto error
+
+:nodos
+ echo.
+ echo Error: Only a Windows NT based Operating System is supported
+ goto error
+
+:nonetdrv
+ echo.
+ echo Error: This batch file cannot run from a network drive
+ goto error
+
+:seterr
+ rem Set the caller's errorlevel.
+ rem %1[opt]: Errorlevel as integer.
+ rem If %1 is empty the errorlevel will be set to 0.
+ rem If %1 is not empty and not an integer the errorlevel will be set to 1.
+ setlocal
+ set EXITCODE=%~1
+ if not defined EXITCODE set EXITCODE=0
+ echo %EXITCODE%|findstr /r "[^0-9\-]" 1>NUL 2>&1
+ if %ERRORLEVEL% EQU 0 set EXITCODE=1
+ exit /b %EXITCODE%
+
+:error
+ endlocal
+ exit /B 1
+
+:success
+ endlocal
+ exit /B 0
diff --git a/sample.emacs b/sample.emacs
deleted file mode 100644
index e4470fe9..00000000
--- a/sample.emacs
+++ /dev/null
@@ -1,45 +0,0 @@
-
-;; This file was contributed by Mats Lidell
-
-;; Here's a sample .emacs file that might help you along the way.
-
-;; First comes a setup that is ideal when you are only working with curl. Just
-;; select the next few lines, paste it into your .emacs and change the path to
-;; the tools folder. (If you are using more than one style. Look further down
-;; this file.)
-
-(load-file "<YOUR-PATH-TO-CURL>/curl-style.el")
-(add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)
-
-;; If you are using more than one style in maybe more than one project the
-;; example below might help out. It uses a predicate hook pair to select the
-;; right hook to use.
-
-(defvar my-style-selective-mode-hook nil
- "Holds a list of predicate and hooks pairs. (list (PREDICATE . HOOK)
-...) It is used by my-mode-selective-mood-hook-function for choosing
-the right hook to run.")
-
-(defun my-style-selective-mode-hook-function ()
- "Run each PREDICATE in `my-style-selective-mode-hook' to see if the
-HOOK in the pair should be executed. If the PREDICATE evaluate to non
-nil HOOK is executed and the rest of the hooks are ignored."
- (let ((h my-style-selective-mode-hook))
- (while (not (eval (caar h)))
- (setq h (cdr h)))
- (funcall (cdar h))))
-
-;;; Example configuration.
-;; Add the selective hook to the c-mode-common-hook
-(add-hook 'c-mode-common-hook 'my-style-selective-mode-hook-function)
-
-;; Add your own hooks and predicates. The predicate should evaluate to
-;; non nil if the hook in the pair is supposed to be evaluated. In the
-;; example a part of the path is used to select what style to
-;; use. Choose what is appropriate for you.
-(add-hook 'my-style-selective-mode-hook
- '((string-match "curl" (buffer-file-name)) . curl-c-mode-common-hook))
-(add-hook 'my-style-selective-mode-hook
- '((string-match "other" (buffer-file-name)) . other-c-mode-common-hook))
-;; Make sure the default style is appended.
-(add-hook 'my-style-selective-mode-hook '(t . my-c-mode-common-hook) t)
diff --git a/scripts/contributors.sh b/scripts/contributors.sh
new file mode 100755
index 00000000..0840bfab
--- /dev/null
+++ b/scripts/contributors.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, 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 script shows all mentioned contributors from <hash> 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
+
+if test -z "$start"; then
+ echo "Usage: $0 <since this tag/hash> [--releasenotes]"
+ exit
+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):' | \
+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 | \
+grep ' ' | \
+sort -fu | \
+awk '{
+ num++;
+ n = sprintf("%s%s%s,", n, length(n)?" ":"", $0);
+ #print n;
+ if(length(n) > 78) {
+ printf(" %s\n", p);
+ n=sprintf("%s,", $0);
+ }
+ p=n;
+
+}
+
+ END {
+ printf(" %s\n", p);
+ printf(" (%d contributors)\n", num);
+ }
+
+'
diff --git a/scripts/contrithanks.sh b/scripts/contrithanks.sh
new file mode 100755
index 00000000..b7a16ca5
--- /dev/null
+++ b/scripts/contrithanks.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, 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 script shows all mentioned contributors from <hash> until HEAD and
+# puts them at the end of the THANKS document on stdout
+#
+
+start=$1
+
+if test -z "$start"; then
+ echo "Usage: $0 <since this tag/hash>"
+fi
+
+cat ./docs/THANKS
+
+(
+git log $start..HEAD | \
+egrep -i '(Author|Commit|by):' | \
+cut -d: -f2- | \
+cut '-d<' -f1 | \
+tr , '\012' | \
+sed 's/ and /\n/' | \
+sed -e 's/^ //' -e 's/ $//g'
+
+# grep out the list of names from RELEASE-NOTES
+# split on ", "
+# remove leading white spaces
+grep "^ [^ (]" RELEASE-NOTES| \
+sed 's/, */\n/g'| \
+sed 's/^ *//'
+
+)| \
+sed -f ./docs/THANKS-filter | \
+grep ' ' | \
+sort -fu | \
+grep -xvf ./docs/THANKS
diff --git a/scripts/log2changes.pl b/scripts/log2changes.pl
new file mode 100755
index 00000000..667daabf
--- /dev/null
+++ b/scripts/log2changes.pl
@@ -0,0 +1,81 @@
+#!/usr/bin/perl
+
+# git log --pretty=fuller --no-color --date=short --decorate=full
+
+my @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
+
+sub nicedate {
+ my ($date)=$_;
+
+ if($date =~ /(\d\d\d\d)-(\d\d)-(\d\d)/) {
+ return sprintf("%d %s %4d", $3, $mname[$2-1], $1);
+ }
+ return $date;
+}
+
+print
+' _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+ Changelog
+';
+
+my $line;
+my $tag;
+while(<STDIN>) {
+ my $l = $_;
+
+ if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) {
+ $co = $1;
+ my $ref = $2;
+ if ($ref =~ /refs\/tags\/curl-([0-9_]*)/) {
+ $tag = $1;
+ $tag =~ tr/_/./;
+ }
+ }
+ elsif($l =~ /^Author: *(.*) +</) {
+ $a = $1;
+ }
+ elsif($l =~ /^Commit: *(.*) +</) {
+ $c = $1;
+ }
+ elsif($l =~ /^CommitDate: (.*)/) {
+ $date = nicedate($1);
+ }
+ elsif($l =~ /^( )(.*)/) {
+ my $extra;
+ if ($tag) {
+ # Version entries have a special format
+ print "\nVersion " . $tag." ($date)\n";
+ $oldc = "";
+ $tag = "";
+ }
+ if($a ne $c) {
+ $extra=sprintf("\n- [%s brought this change]\n\n ", $a);
+ }
+ else {
+ $extra="\n- ";
+ }
+ if($co ne $oldco) {
+ if($c ne $oldc) {
+ print "\n$c ($date)$extra";
+ }
+ else {
+ print "$extra";
+ }
+ $line =0;
+ }
+
+ $oldco = $co;
+ $oldc = $c;
+ $olddate = $date;
+ if($line++) {
+ print " ";
+ }
+ print $2."\n";
+ }
+}
diff --git a/scripts/zsh.pl b/scripts/zsh.pl
new file mode 100755
index 00000000..7520a15a
--- /dev/null
+++ b/scripts/zsh.pl
@@ -0,0 +1,77 @@
+#!/usr/bin/perl
+
+# Generate ZSH completion
+
+use strict;
+use warnings;
+
+my $curl = $ARGV[0] || 'curl';
+
+my $regex = '\s+(?:(-[^\s]+),\s)?(--[^\s]+)\s([^\s.]+)?\s+(.*)';
+my @opts = parse_main_opts('--help', $regex);
+
+my $opts_str;
+
+$opts_str .= qq{ $_ \\\n} foreach (@opts);
+chomp $opts_str;
+
+my $tmpl = <<"EOS";
+#compdef curl
+
+# curl zsh completion
+
+local curcontext="\$curcontext" state state_descr line
+typeset -A opt_args
+
+local rc=1
+
+_arguments -C -S \\
+$opts_str
+ '*:URL:_urls' && rc=0
+
+return rc
+EOS
+
+print $tmpl;
+
+sub parse_main_opts {
+ my ($cmd, $regex) = @_;
+
+ my @list;
+ my @lines = split /\n/, `"$curl" $cmd`;
+
+ foreach my $line (@lines) {
+ my ($short, $long, $arg, $desc) = ($line =~ /^$regex/) or next;
+
+ my $option = '';
+
+ $desc =~ s/'/''/g if defined $desc;
+ $desc =~ s/\[/\\\[/g if defined $desc;
+ $desc =~ s/\]/\\\]/g if defined $desc;
+
+ $option .= '{' . trim($short) . ',' if defined $short;
+ $option .= trim($long) if defined $long;
+ $option .= '}' if defined $short;
+ $option .= '\'[' . trim($desc) . ']\'' if defined $desc;
+
+ $option .= ":$arg" if defined $arg;
+
+ $option .= ':_files'
+ if defined $arg and ($arg eq 'FILE' || $arg eq 'DIR');
+
+ push @list, $option;
+ }
+
+ # Sort longest first, because zsh won't complete an option listed
+ # after one that's a prefix of it.
+ @list = sort {
+ $a =~ /([^=]*)/; my $ma = $1;
+ $b =~ /([^=]*)/; my $mb = $1;
+
+ length($mb) <=> length($ma)
+ } @list;
+
+ return @list;
+}
+
+sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 00000000..c7ffcdce
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,13 @@
+curl
+curl_config.h
+curl_config.h.in
+tool_hugehelp.c
+stamp-h2
+Makefile.vc8.dist
+Makefile.vc9.dist
+tool_version.h.dist
+Makefile.vc10.dist
+config-win32.h
+*.a
+*.res
+*.nlm
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index faea0967..bfb866bd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,11 +1,39 @@
set(EXE_NAME curl)
-# First try to locate 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 hugehelp.c PATHS . NO_DEFAULT_PATH)
-if (NOT HUGEHELP_C_FILE)
- message(STATUS "Warning: hugehelp.c file was not generated before. Generating an 'empty' file...")
- file(WRITE hugehelp.c "/* built-in manual is disabled, blank function */\n#include \"hugehelp.h\"\nvoid hugehelp(void) {}\n\n")
+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 ${CMAKE_COMMAND} -E echo "#include \"tool_setup.h\"" > tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "#ifndef HAVE_LIBZ" >> tool_hugehelp.c
+ COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT}
+ "${CURL_SOURCE_DIR}/docs/curl.1" |
+ "${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl"
+ "${CURL_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "#else" >> tool_hugehelp.c
+ COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT}
+ "${CURL_SOURCE_DIR}/docs/curl.1" |
+ "${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" -c
+ "${CURL_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "#endif /* HAVE_LIBZ */" >> tool_hugehelp.c
+ DEPENDS
+ "${CURL_SOURCE_DIR}/docs/MANUAL"
+ "${CURL_SOURCE_DIR}/docs/curl.1"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h"
+ VERBATIM)
+else()
+ add_custom_command(
+ OUTPUT tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "/* built-in manual is disabled, blank function */" > tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_hugehelp.h\"" >> tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "void hugehelp(void) {}" >> tool_hugehelp.c
+ DEPENDS
+ "${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h"
+ VERBATIM)
+
endif()
transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
@@ -20,21 +48,20 @@ add_executable(
${curl_SOURCES}
)
-source_group("cURLX source files" FILES ${CURLX_ONES})
+source_group("cURLX source files" FILES ${CURLX_CFILES})
source_group("cURL source files" FILES ${CURL_CFILES})
source_group("cURL header files" FILES ${CURL_HFILES})
include_directories(
- ${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
- ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
+ ${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"
)
-
-# Setup dependencies
-setup_curl_dependencies(${EXE_NAME})
-target_link_libraries( ${EXE_NAME} libcurl )
-
+#Build cURL executable
+target_link_libraries( ${EXE_NAME} libcurl ${CURL_LIBS})
################################################################################
@@ -46,11 +73,6 @@ target_link_libraries( ${EXE_NAME} libcurl )
set_target_properties(${EXE_NAME} PROPERTIES
DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
-if(MSVC)
- if(NOT BUILD_RELEASE_DEBUG_DIRS)
- # Ugly workaround to remove the "/debug" or "/release" in each output
- set_target_properties(${EXE_NAME} PROPERTIES PREFIX "../")
- endif()
-endif()
-
#INCLUDE(ModuleInstall OPTIONAL)
+
+install(TARGETS ${EXE_NAME} DESTINATION bin)
diff --git a/src/Makefile.Watcom b/src/Makefile.Watcom
index 3d42303b..6ec598d4 100644
--- a/src/Makefile.Watcom
+++ b/src/Makefile.Watcom
@@ -3,11 +3,23 @@
# G. Vanem <gvanem@broadpark.no>
#
+.ERASE
+
+!if $(__VERSION__) < 1280
+!message !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!message ! This Open Watcom version is too old and is no longer supported !
+!message ! Please download latest version from www.openwatcom.org !
+!message !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!error Unsupported version of Open Watcom
+!endif
+
!ifndef %watcom
!error WATCOM environment variable not set!
-!else
-SYS_INCL = -I$(%watcom)\h\nt -I$(%watcom)\h
-SYS_LIBS = $(%watcom)\lib386\nt;$(%watcom)\lib386
+!endif
+
+# In order to process Makefile.inc wmake must be called with -u switch!
+!ifndef %MAKEFLAGS
+!error You MUST call wmake with the -u switch!
!endif
!ifdef %libname
@@ -15,7 +27,8 @@ LIBNAME = $(%libname)
!else
LIBNAME = libcurl
!endif
-TARGETS = $(LIBNAME).dll $(LIBNAME)_imp.lib $(LIBNAME).lib
+
+TARGETS = curl.exe
CC = wcc386
LD = wlink
@@ -26,25 +39,29 @@ RC = wrc
! loaddll wcc386 wccd386
! loaddll wpp386 wppd386
! loaddll wlib wlibd
-! if $(__VERSION__) > 1270
-! loaddll wlink wlinkd
-! else
-! loaddll wlink wlink
-! endif
+! loaddll wlink wlinkd
!endif
-!if $(__VERSION__) < 1250
-RM = del /q /f 2>NUL
+!ifdef __UNIX__
+CP = cp
+MD = mkdir -p
!else
-RM = rm -f
-!endif
+CP = copy 2>NUL
MD = mkdir
+!endif
+!if $(__VERSION__) > 1290
+RD = rm -rf
+!else ifdef __UNIX__
+RD = rm -rf
+!else
RD = rmdir /q /s 2>NUL
-CP = copy
+!endif
+
+SYS_INCL = -I"$(%watcom)/h/nt" -I"$(%watcom)/h"
CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -s -fr=con -w2 -fpi -oilrtfm &
-wcd=201 -bt=nt -bc -d+ -dWIN32 -dHAVE_STRTOLL &
- -I..\include -I..\lib $(SYS_INCL)
+ -I"../include" -I"../lib" $(SYS_INCL)
!ifdef %debug
DEBUG = -dDEBUG=1 -dDEBUGBUILD
@@ -57,134 +74,139 @@ CFLAGS += -d0
CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6
!endif
+!ifdef %use_ssl
+CFLAGS += -wcd=138 -dUSE_OPENSSL -dUSE_OPENSSL -I"$(OPENSSL_ROOT)/inc32"
+!endif
+
+!ifdef %curl_static
+CFLAGS += -DCURL_STATICLIB
+!else
+CFLAGS += -br
+!endif
+
#
# Change to suite.
#
!ifdef %zlib_root
ZLIB_ROOT = $(%zlib_root)
!else
-ZLIB_ROOT = ..\..\zlib-1.2.5
+ZLIB_ROOT = ../../zlib-1.2.8
!endif
!ifdef %libssh2_root
LIBSSH2_ROOT = $(%libssh2_root)
!else
-LIBSSH2_ROOT = ..\..\libssh2-1.2.7
+LIBSSH2_ROOT = ../../libssh2-1.5.0
!endif
!ifdef %librtmp_root
LIBRTMP_ROOT = $(%librtmp_root)
!else
-LIBRTMP_ROOT = ..\..\librtmp-2.3
+LIBRTMP_ROOT = ../../rtmpdump-2.3
!endif
!ifdef %openssl_root
OPENSSL_ROOT = $(%openssl_root)
!else
-OPENSSL_ROOT = ..\..\openssl-0.9.8o
+OPENSSL_ROOT = ../../openssl-1.0.2a
!endif
!ifdef %ares_root
ARES_ROOT = $(%ares_root)
!else
-ARES_ROOT = ..\ares
-!endif
-
-!ifdef %use_ssl
-CFLAGS += -wcd=138 -dUSE_OPENSSL -dUSE_SSLEAY -I$(OPENSSL_ROOT)\inc32
+ARES_ROOT = ../ares
!endif
OBJ_DIR = WC_Win32.obj
-LINK_ARG = $(OBJ_DIR)\wlink.arg
+LINK_ARG = $(OBJ_DIR)/wlink.arg
-# In order to process Makefile.inc wmake must be called with -u switch!
-!ifndef %MAKEFLAGS
-!error You MUST call wmake with the -u switch!
-!else
!include Makefile.inc
-!endif
-# For now we still define the CURLX_ONES sources here unless we know how
-# to split off the prefixed path.
-CURLX_SOURCES = rawstr.c nonblock.c
-OBJS = $(CURL_CFILES:.c=.obj)
-!ifdef %curl_static
-CFLAGS += -DCURL_STATICLIB
-!else
-CFLAGS += -br
-OBJS += $(CURLX_SOURCES:.c=.obj)
+OBJS1 = $(OBJ_DIR)/$(CURL_CFILES)
+!ifndef %curl_static
+OBJS1 += $(CURLX_CFILES:../lib/=)
!endif
-OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
+OBJS2 = $(OBJS1: = $(OBJ_DIR)/)
+OBJS = $(OBJS2:.c=.obj)
-RESOURCE = $(OBJ_DIR)\curl.res
+RESOURCE = $(OBJ_DIR)/curl.res
-all: hugehelp.c $(OBJ_DIR) curl.exe .SYMBOLIC
+DIRS = $(OBJ_DIR)
+
+all: tool_hugehelp.c $(DIRS) $(TARGETS) .SYMBOLIC
@echo Welcome to cURL
clean: .SYMBOLIC
- -$(RM) $(OBJS)
- -$(RM) $(RESOURCE) $(LINK_ARG)
+ -rm -f $(OBJS)
+ -rm -f $(RESOURCE) $(LINK_ARG)
vclean distclean: clean .SYMBOLIC
-$(RD) $(OBJ_DIR)
- -$(RM) curl.exe curl.map curl.sym hugehelp.c
+ -rm -f curl.exe curl.sym tool_hugehelp.c
-hugehelp.c: hugehelp.c.cvs
+tool_hugehelp.c: tool_hugehelp.c.cvs
$(CP) $[@ $^@
-hugehelp.c.cvs: .EXISTSONLY
- $(CP) hugehelp.c $^@
+tool_hugehelp.c.cvs: .EXISTSONLY
+ $(CP) tool_hugehelp.c $^@
-$(OBJ_DIR):
+$(DIRS):
-$(MD) $^@
-curl.exe: $(OBJS) $(RESOURCE) $(LINK_ARG)
- $(LD) name $^@ @$]@
-
-$(RESOURCE): curl.rc
- $(RC) $(DEBUG) -q -r -zm -I..\include $(SYS_INCL) $[@ -fo=$^@
-
-# suffix search path - vpath-like hack
-.c: ..\lib
-
-.ERASE
-.c{$(OBJ_DIR)}.obj:
- $(CC) $(CFLAGS) $[@ -fo=$^@
-
-$(LINK_ARG): $(__MAKEFILES__)
- %create $^@
- @%append $^@ system nt
- @%append $^@ file { $(OBJS) }
+curl.exe: $(OBJS) $(RESOURCE)
+ %create $(LINK_ARG)
+ @%append $(LINK_ARG) system nt
!ifdef %debug
- @%append $^@ debug all
- @%append $^@ option symfile
-!endif
- @%append $^@ option quiet, map, caseexact, eliminate,
- @%append $^@ res=$(RESOURCE) libpath $(SYS_LIBS)
-!ifdef %curl_static
- @%append $^@ library wldap32.lib
- @%append $^@ library ..\lib\$(LIBNAME).lib
-!ifdef %use_zlib
- @%append $^@ library $(ZLIB_ROOT)\zlib.lib
-!endif
-!ifdef %use_rtmp
- @%append $^@ library $(LIBRTMP_ROOT)\librtmp\librtmp.lib, winmm.lib
-!endif
-!ifdef %use_ssh2
- @%append $^@ library $(LIBSSH2_ROOT)\win32\libssh2.lib
-!endif
-!ifdef %use_ssl
- @%append $^@ library $(OPENSSL_ROOT)\out32\libeay32.lib, $(OPENSSL_ROOT)\out32\ssleay32.lib
-!endif
-!ifdef %use_ares
- @%append $^@ library $(ARES_ROOT)\cares.lib
-!endif
+ @%append $(LINK_ARG) debug all
+ @%append $(LINK_ARG) option symfile
+!endif
+ @%append $(LINK_ARG) option quiet, caseexact, eliminate
+ @%append $(LINK_ARG) option map=$(OBJ_DIR)/$^&.map
+ @%append $(LINK_ARG) option res=$(RESOURCE)
+ @%append $(LINK_ARG) file { $(OBJS) }
+!ifndef %curl_static
+ @%append $(LINK_ARG) library ../lib/$(LIBNAME)_imp.lib
!else
- @%append $^@ library ..\lib\$(LIBNAME)_imp.lib
+ @%append $(LINK_ARG) library ../lib/$(LIBNAME).lib
+ @%append $(LINK_ARG) library wldap32.lib
+! ifdef %use_zlib
+ @%append $(LINK_ARG) library '$(ZLIB_ROOT)/zlib.lib'
+! endif
+! ifdef %use_rtmp
+ @%append $(LINK_ARG) library '$(LIBRTMP_ROOT)/librtmp/librtmp.lib'
+ @%append $(LINK_ARG) library winmm.lib
+! endif
+! ifdef %use_ssh2
+ @%append $(LINK_ARG) library '$(LIBSSH2_ROOT)/win32/libssh2.lib'
+! endif
+! ifdef %use_ssl
+ @%append $(LINK_ARG) library '$(OPENSSL_ROOT)/out32/libeay32.lib'
+ @%append $(LINK_ARG) library '$(OPENSSL_ROOT)/out32/ssleay32.lib'
+! endif
+! ifdef %use_ares
+ @%append $(LINK_ARG) library '$(ARES_ROOT)/cares.lib'
+! endif
+! ifdef %use_winidn
+! if $(__VERSION__) > 1290
+ @%append $(LINK_ARG) library normaliz.lib
+! else
+ @%append $(LINK_ARG) import '_IdnToAscii@20' 'NORMALIZ.DLL'.'IdnToAscii'
+ @%append $(LINK_ARG) import '_IdnToUnicode@20' 'NORMALIZ.DLL'.'IdnToUnicode'
+! endif
+! endif
!endif
!ifeq USE_WATT32 1
- @%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
+ @%append $(LINK_ARG) library '$(%watt_root)/lib/wattcpw_imp.lib'
!else
- @%append $^@ library ws2_32.lib
+ @%append $(LINK_ARG) library ws2_32.lib
!endif
+ $(LD) name $^@ @$(LINK_ARG)
+
+$(RESOURCE): curl.rc
+ $(RC) $(DEBUG) -q -r -zm -bt=nt -I"../include" $(SYS_INCL) $[@ -fo=$^@
+# suffix search path - vpath-like hack
+.c: ../lib
+
+.c{$(OBJ_DIR)}.obj:
+ $(CC) $(CFLAGS) $[@ -fo=$^@
diff --git a/src/Makefile.am b/src/Makefile.am
index f2b4c8c6..f4bc6c9a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,70 +21,97 @@
###########################################################################
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
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_builddir)/src is for curl's generated src/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
-# $(top_srcdir)/src is for curl's src/setup.h and "curl-private" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/lib \
- -I$(top_builddir)/src \
- -I$(top_srcdir)/lib \
- -I$(top_srcdir)/src
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_builddir)/src \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/src
bin_PROGRAMS = curl
+if USE_CPPFLAG_CURL_STATICLIB
+AM_CPPFLAGS += -DCURL_STATICLIB
+endif
+
include Makefile.inc
# This might hold -Werror
CFLAGS += @CURL_CFLAG_EXTRAS@
-curl_LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
+# Prevent LIBS from being used for all link targets
+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@ @SSL_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
+endif
+
+curl_LDFLAGS = @LIBMETALINK_LDFLAGS@
+curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-BUILT_SOURCES = hugehelp.c
-CLEANFILES = hugehelp.c
+
+# if unit tests are enabled, build a static library to link them with
+if BUILD_UNITTESTS
+noinst_LTLIBRARIES = libcurltool.la
+libcurltool_la_CPPFLAGS = $(LIBMETALINK_CPPFLAGS) $(AM_CPPFLAGS)
+libcurltool_la_CFLAGS = -DUNITTESTS
+libcurltool_la_LDFLAGS = -static $(LINKFLAGS)
+libcurltool_la_SOURCES = $(curl_SOURCES)
+endif
+
+BUILT_SOURCES = tool_hugehelp.c
+CLEANFILES = tool_hugehelp.c
# Use the C locale to ensure that only ASCII characters appear in the
# embedded text.
NROFF=env LC_ALL=C @NROFF@ @MANOPT@ # figured out by the configure script
-EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 Makefile.m32 \
- Makefile.riscos curl_config.h.in macos/curl.mcp.xml.sit.hqx \
- macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp vc6curlsrc.dsp \
- macos/src/macos_main.cpp config-amigaos.h makefile.amiga curl.rc \
- Makefile.netware Makefile.inc Makefile.Watcom vc6curlsrc.dsw \
- CMakeLists.txt
+EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 \
+ Makefile.m32 macos/curl.mcp.xml.sit.hqx macos/MACINSTALL.TXT \
+ macos/src/curl_GUSIConfig.cpp macos/src/macos_main.cpp makefile.amiga \
+ curl.rc Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt \
+ checksrc.whitelist
MANPAGE=$(top_srcdir)/docs/curl.1
README=$(top_srcdir)/docs/MANUAL
MKHELP=$(top_srcdir)/src/mkhelp.pl
-HUGE=hugehelp.c
+HUGE=tool_hugehelp.c
if USE_MANUAL
# Here are the stuff to create a built-in manual
if HAVE_LIBZ
-# This generates the hugehelp.c file in both uncompressed and compressed formats
+# This generates the tool_hugehelp.c file in both uncompressed and
+# compressed formats
$(HUGE): $(README) $(MANPAGE) mkhelp.pl
- echo '#include "setup.h"' > $(HUGE)
+ echo '#include "tool_setup.h"' > $(HUGE)
echo '#ifndef HAVE_LIBZ' >> $(HUGE)
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
echo '#else' >> $(HUGE)
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
else # HAVE_LIBZ
-# This generates the hugehelp.c file uncompressed only
+# This generates the tool_hugehelp.c file uncompressed only
$(HUGE): $(README) $(MANPAGE) mkhelp.pl
- echo '#include "setup.h"' > $(HUGE)
+ echo '#include "tool_setup.h"' > $(HUGE)
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
endif
@@ -92,6 +119,16 @@ else # USE_MANUAL
# built-in manual has been disabled, make a blank file
$(HUGE):
echo "/* built-in manual is disabled, blank function */" > $(HUGE)
- echo '#include "hugehelp.h"' >> $(HUGE)
+ echo '#include "tool_hugehelp.h"' >> $(HUGE)
echo "void hugehelp(void) {}" >>$(HUGE)
endif
+
+# ignore tool_hugehelp.c since it is generated source code and it plays
+# by slightly different rules!
+checksrc:
+ @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/src -Wtool_hugehelp.c $(CURL_CFILES) $(CURL_HFILES)
+
+if CURLDEBUG
+# for debug builds, we scan the sources on all regular make invokes
+all-local: checksrc
+endif
diff --git a/src/Makefile.b32 b/src/Makefile.b32
index 7408dd2d..85fe49f8 100644
--- a/src/Makefile.b32
+++ b/src/Makefile.b32
@@ -6,84 +6,129 @@
#
# 'BCCDIR' has to be set up to point to the base directory
# of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55
-# where c:\Borland\BCC55 is the compiler is installed
#
-# Written by Jaepil Kim, pit@paradise.net.nz
+# Initially written by Jaepil Kim, pit@paradise.net.nz
############################################################
+!if "$(__MAKE__)" == ""
+!error __MAKE__ not defined. Use Borlands's MAKE to process this makefile.
+!endif
+
+# Borland's $(MAKEDIR) expands to the path where make.exe is located,
+# use this feature to define BCCDIR when user has not defined BCCDIR.
+!ifndef BCCDIR
+BCCDIR = $(MAKEDIR)\..
+!endif
+
# Edit the path below to point to the base of your Zlib sources.
!ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.1
+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.7d
+OPENSSL_PATH = ..\..\openssl-1.0.2a
!endif
# Set program's name
PROGNAME = curl.exe
# Setup environment
-CXX = bcc32
+PP_CMD = cpp32 -q -P-
+CC_CMD = bcc32 -q -c
LD = bcc32
-CP = copy
-RM = del
-LIB = tlib
+RM = del 2>NUL
+MKDIR = md
+RMDIR = rd /q 2>NUL
+COPY = $(COMSPEC) /c copy /y
-CXXFLAGS = -q -5 -O2 -w-aus -w-ccc -w-csu -w-par -w-pia -w-rch -w-inl -w-ngu -w-pro -tWM
+CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -w-inl -w-pia -w-pin -Dinline=__inline
LDFLAGS = -q -lq -lap
-INCDIRS = -I.;../include;../lib
-LINKLIB = $(BCCDIR)/lib/cw32mt.lib
-
-# If you build with SSL support, set WITH_SSL=1
+SRCDIRS = .;..\lib
+OBJDIR = .\BCC_objs
+INCDIRS = -I.;..\include;..\lib
+LINKLIB = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib
DEFINES = -DNDEBUG -DWIN32
!ifdef DYNAMIC
-LIBCURL_LIB = ../lib/libcurl_imp.lib
+LIBCURL_LIB = ..\lib\libcurl_imp.lib
!else
-LIBCURL_LIB = ../lib/libcurl.lib
+LIBCURL_LIB = ..\lib\libcurl.lib
DEFINES = $(DEFINES) -DCURL_STATICLIB
!endif
+# ZLIB support is enabled setting WITH_ZLIB=1
!ifdef WITH_ZLIB
DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
INCDIRS = $(INCDIRS);$(ZLIB_PATH)
-LINKLIB = $(LINKLIB) $(ZLIB_PATH)/zlib.lib
+LINKLIB = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
!endif
+# SSL support is enabled setting WITH_SSL=1
!ifdef WITH_SSL
-DEFINES = $(DEFINES) -DUSE_SSLEAY
-INCDIRS = $(INCDIRS);$(OPENSSL_PATH)/inc32;$(OPENSSL_PATH)/inc32/openssl
-LINKLIB = $(LINKLIB) $(OPENSSL_PATH)/out32/ssleay32.lib $(OPENSSL_PATH)/out32/libeay32.lib
+DEFINES = $(DEFINES) -DUSE_OPENSSL
+INCDIRS = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
+LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
!endif
.autodepend
+.path.c = $(SRCDIRS)
+.path.obj = $(OBJDIR)
+.path.int = $(OBJDIR)
+
# Makefile.inc provides the CSOURCES and HHEADERS defines
-top_srcdir = ..
!include Makefile.inc
-CSOURCES = $(CURL_CFILES) $(CURLX_ONES)
+CSOURCES = $(CURL_CFILES) $(CURLX_CFILES:../lib/=)
OBJECTS = $(CSOURCES:.c=.obj)
+PREPROCESSED = $(CSOURCES:.c=.int)
+
+# Borland's command line compiler (BCC32) version 5.5.1 integrated
+# preprocessor has a bug which results in silently generating wrong
+# definitions for libcurl macros such as CURL_OFF_T_C, on the other
+# hand Borland's command line preprocessor (CPP32) version 5.5.1 does
+# not have the bug and achieves proper results. In order to avoid the
+# silent bug we first preprocess source files and later compile the
+# preprocessed result.
.c.obj:
- $(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
+ @-$(RM) $(@R).int
+ $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
+ $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
-all: $(PROGNAME)
+all: $(OBJDIR) tool_hugehelp $(PROGNAME)
clean:
- -$(RM) $(PROGNAME)
- -$(RM) *.obj
- -$(RM) hugehelp.c
+ cd $(OBJDIR)
+ @-$(RM) $(OBJECTS)
+ @-$(RM) $(PREPROCESSED)
+ cd ..
+ @-$(RMDIR) $(OBJDIR)
+ @-$(RM) $(PROGNAME)
+ @-$(RM) curl.tds
+
+$(OBJDIR):
+ @-$(RMDIR) $(OBJDIR)
+ @-$(MKDIR) $(OBJDIR)
-$(PROGNAME): $(OBJECTS) $(LIBCURL_LIB) $(LINKLIB)
- @-$(RM) $@
- $(LD) $(LDFLAGS) -e$@ $**
+!ifdef WITH_ZLIB
+tool_hugehelp: ..\docs\MANUAL ..\docs\curl.1 mkhelp.pl
+ groff -Tascii -man -P -c ../docs/curl.1 > tool_hugehelp.tmp
+ perl -w mkhelp.pl -c ../docs/MANUAL < tool_hugehelp.tmp > tool_hugehelp.c
+ @-$(RM) tool_hugehelp.tmp
+!else
+tool_hugehelp:
+ if exist ..\GIT-INFO $(COPY) tool_hugehelp.c.cvs tool_hugehelp.c
+!endif
-hugehelp.c: hugehelp.c.cvs
- @echo Creating $@
- @$(CP) $** $@
+$(PROGNAME): $(OBJECTS) $(LIBCURL_LIB) $(LINKLIB)
+ @-$(RM) $(PROGNAME)
+ $(LD) $(LDFLAGS) -e$@ @&&!
+$(**: = ^
+)
+!
+# End of Makefile.b32
diff --git a/src/Makefile.in b/src/Makefile.in
deleted file mode 100644
index 962ac87a..00000000
--- a/src/Makefile.in
+++ /dev/null
@@ -1,743 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# ./src/Makefile.inc
-# Using the backslash as line continuation character might be problematic
-# with some make flavours, as Watcom's wmake showed us already. If we
-# ever want to change this in a portable manner then we should consider
-# this idea (posted to the libcurl list by Adam Kellas):
-# CSRC1 = file1.c file2.c file3.c
-# CSRC2 = file4.c file5.c file6.c
-# CSOURCES = $(CSRC1) $(CSRC2)
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = curl$(EXEEXT)
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/Makefile.inc $(srcdir)/curl_config.h.in
-subdir = src
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
-am__objects_1 = main.$(OBJEXT) hugehelp.$(OBJEXT) urlglob.$(OBJEXT) \
- writeout.$(OBJEXT) writeenv.$(OBJEXT) getpass.$(OBJEXT) \
- homedir.$(OBJEXT) curlutil.$(OBJEXT) os-specific.$(OBJEXT)
-am__objects_2 = strtoofft.$(OBJEXT) strdup.$(OBJEXT) rawstr.$(OBJEXT) \
- nonblock.$(OBJEXT)
-am__objects_3 =
-am_curl_OBJECTS = $(am__objects_1) $(am__objects_2) $(am__objects_3)
-curl_OBJECTS = $(am_curl_OBJECTS)
-DEFAULT_INCLUDES =
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(curl_SOURCES)
-DIST_SOURCES = $(curl_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-
-# This might hold -Werror
-CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-# Use the C locale to ensure that only ASCII characters appear in the
-# embedded text.
-NROFF = env LC_ALL=C @NROFF@ @MANOPT@ # figured out by the configure script
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-###########################################################################
-AUTOMAKE_OPTIONS = foreign nostdinc
-
-# 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
-# might possibly already be installed in the system.
-#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
-# $(top_srcdir)/include is for libcurl's external include files
-# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_builddir)/src is for curl's generated src/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
-# $(top_srcdir)/src is for curl's src/setup.h and "curl-private" files
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/lib \
- -I$(top_builddir)/src \
- -I$(top_srcdir)/lib \
- -I$(top_srcdir)/src
-
-
-# libcurl has sources that provide functions named curlx_* that aren't part of
-# the official API, but we re-use the code here to avoid duplication.
-CURLX_ONES = $(top_srcdir)/lib/strtoofft.c \
- $(top_srcdir)/lib/strdup.c \
- $(top_srcdir)/lib/rawstr.c \
- $(top_srcdir)/lib/nonblock.c
-
-CURL_CFILES = main.c hugehelp.c urlglob.c writeout.c writeenv.c \
- getpass.c homedir.c curlutil.c os-specific.c
-
-CURL_HFILES = hugehelp.h setup.h config-win32.h config-mac.h \
- config-riscos.h urlglob.h version.h os-specific.h \
- writeout.h writeenv.h getpass.h homedir.h curlutil.h
-
-curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)
-curl_LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
-curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-BUILT_SOURCES = hugehelp.c
-CLEANFILES = hugehelp.c
-EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 Makefile.m32 \
- Makefile.riscos curl_config.h.in macos/curl.mcp.xml.sit.hqx \
- macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp vc6curlsrc.dsp \
- macos/src/macos_main.cpp config-amigaos.h makefile.amiga curl.rc \
- Makefile.netware Makefile.inc Makefile.Watcom vc6curlsrc.dsw \
- CMakeLists.txt
-
-MANPAGE = $(top_srcdir)/docs/curl.1
-README = $(top_srcdir)/docs/MANUAL
-MKHELP = $(top_srcdir)/src/mkhelp.pl
-HUGE = hugehelp.c
-all: $(BUILT_SOURCES) curl_config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-curl_config.h: stamp-h2
- @if test ! -f $@; then \
- rm -f stamp-h2; \
- $(MAKE) stamp-h2; \
- else :; fi
-
-stamp-h2: $(srcdir)/curl_config.h.in $(top_builddir)/config.status
- @rm -f stamp-h2
- cd $(top_builddir) && $(SHELL) ./config.status src/curl_config.h
-$(srcdir)/curl_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_srcdir) && $(AUTOHEADER)
- rm -f stamp-h2
- touch $@
-
-distclean-hdr:
- -rm -f curl_config.h stamp-h2
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
-
-clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-curl$(EXEEXT): $(curl_OBJECTS) $(curl_DEPENDENCIES)
- @rm -f curl$(EXEEXT)
- $(LINK) $(curl_LDFLAGS) $(curl_OBJECTS) $(curl_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curlutil.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpass.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/homedir.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hugehelp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonblock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os-specific.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawstr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoofft.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urlglob.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writeenv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writeout.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strtoofft.o -MD -MP -MF "$(DEPDIR)/strtoofft.Tpo" -c -o strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/strtoofft.Tpo" "$(DEPDIR)/strtoofft.Po"; else rm -f "$(DEPDIR)/strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='strtoofft.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
-
-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strtoofft.obj -MD -MP -MF "$(DEPDIR)/strtoofft.Tpo" -c -o strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/strtoofft.Tpo" "$(DEPDIR)/strtoofft.Po"; else rm -f "$(DEPDIR)/strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='strtoofft.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
-
-strdup.o: $(top_srcdir)/lib/strdup.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strdup.o -MD -MP -MF "$(DEPDIR)/strdup.Tpo" -c -o strdup.o `test -f '$(top_srcdir)/lib/strdup.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strdup.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/strdup.Tpo" "$(DEPDIR)/strdup.Po"; else rm -f "$(DEPDIR)/strdup.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strdup.c' object='strdup.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strdup.o `test -f '$(top_srcdir)/lib/strdup.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strdup.c
-
-strdup.obj: $(top_srcdir)/lib/strdup.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strdup.obj -MD -MP -MF "$(DEPDIR)/strdup.Tpo" -c -o strdup.obj `if test -f '$(top_srcdir)/lib/strdup.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strdup.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strdup.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/strdup.Tpo" "$(DEPDIR)/strdup.Po"; else rm -f "$(DEPDIR)/strdup.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strdup.c' object='strdup.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strdup.obj `if test -f '$(top_srcdir)/lib/strdup.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strdup.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strdup.c'; fi`
-
-rawstr.o: $(top_srcdir)/lib/rawstr.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rawstr.o -MD -MP -MF "$(DEPDIR)/rawstr.Tpo" -c -o rawstr.o `test -f '$(top_srcdir)/lib/rawstr.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/rawstr.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rawstr.Tpo" "$(DEPDIR)/rawstr.Po"; else rm -f "$(DEPDIR)/rawstr.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/rawstr.c' object='rawstr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rawstr.o `test -f '$(top_srcdir)/lib/rawstr.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/rawstr.c
-
-rawstr.obj: $(top_srcdir)/lib/rawstr.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rawstr.obj -MD -MP -MF "$(DEPDIR)/rawstr.Tpo" -c -o rawstr.obj `if test -f '$(top_srcdir)/lib/rawstr.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/rawstr.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/rawstr.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rawstr.Tpo" "$(DEPDIR)/rawstr.Po"; else rm -f "$(DEPDIR)/rawstr.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/rawstr.c' object='rawstr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rawstr.obj `if test -f '$(top_srcdir)/lib/rawstr.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/rawstr.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/rawstr.c'; fi`
-
-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonblock.o -MD -MP -MF "$(DEPDIR)/nonblock.Tpo" -c -o nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/nonblock.Tpo" "$(DEPDIR)/nonblock.Po"; else rm -f "$(DEPDIR)/nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='nonblock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
-
-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonblock.obj -MD -MP -MF "$(DEPDIR)/nonblock.Tpo" -c -o nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/nonblock.Tpo" "$(DEPDIR)/nonblock.Po"; else rm -f "$(DEPDIR)/nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='nonblock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) curl_config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) curl_config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) curl_config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) curl_config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/macos $(distdir)/macos/src
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(PROGRAMS) curl_config.h
-installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic distclean-hdr distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-info-am
-
-
-# Here are the stuff to create a built-in manual
-
-# This generates the hugehelp.c file in both uncompressed and compressed formats
-@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@$(HUGE): $(README) $(MANPAGE) mkhelp.pl
-@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ echo '#include "setup.h"' > $(HUGE)
-@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ echo '#ifndef HAVE_LIBZ' >> $(HUGE)
-@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
-@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ echo '#else' >> $(HUGE)
-@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
-@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
-# This generates the hugehelp.c file uncompressed only
-@HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@$(HUGE): $(README) $(MANPAGE) mkhelp.pl
-@HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@ echo '#include "setup.h"' > $(HUGE)
-@HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@ $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
-
-# built-in manual has been disabled, make a blank file
-@USE_MANUAL_FALSE@$(HUGE):
-@USE_MANUAL_FALSE@ echo "/* built-in manual is disabled, blank function */" > $(HUGE)
-@USE_MANUAL_FALSE@ echo '#include "hugehelp.h"' >> $(HUGE)
-@USE_MANUAL_FALSE@ echo "void hugehelp(void) {}" >>$(HUGE)
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/Makefile.inc b/src/Makefile.inc
index 34dfd45a..401a635a 100644
--- a/src/Makefile.inc
+++ b/src/Makefile.inc
@@ -9,17 +9,105 @@
# libcurl has sources that provide functions named curlx_* that aren't part of
# the official API, but we re-use the code here to avoid duplication.
-CURLX_ONES = $(top_srcdir)/lib/strtoofft.c \
- $(top_srcdir)/lib/strdup.c \
- $(top_srcdir)/lib/rawstr.c \
- $(top_srcdir)/lib/nonblock.c
+CURLX_CFILES = \
+ ../lib/strtoofft.c \
+ ../lib/rawstr.c \
+ ../lib/nonblock.c \
+ ../lib/warnless.c
-CURL_CFILES = main.c hugehelp.c urlglob.c writeout.c writeenv.c \
- getpass.c homedir.c curlutil.c os-specific.c
+CURLX_HFILES = \
+ ../lib/curl_setup.h \
+ ../lib/strtoofft.h \
+ ../lib/rawstr.h \
+ ../lib/nonblock.h \
+ ../lib/warnless.h
-CURL_HFILES = hugehelp.h setup.h config-win32.h config-mac.h \
- config-riscos.h urlglob.h version.h os-specific.h \
- writeout.h writeenv.h getpass.h homedir.h curlutil.h
+CURL_CFILES = \
+ tool_binmode.c \
+ tool_bname.c \
+ tool_cb_dbg.c \
+ tool_cb_hdr.c \
+ tool_cb_prg.c \
+ tool_cb_rea.c \
+ tool_cb_see.c \
+ tool_cb_wrt.c \
+ tool_cfgable.c \
+ tool_convert.c \
+ tool_dirhie.c \
+ tool_doswin.c \
+ tool_easysrc.c \
+ tool_formparse.c \
+ tool_getparam.c \
+ tool_getpass.c \
+ tool_help.c \
+ tool_helpers.c \
+ tool_homedir.c \
+ tool_hugehelp.c \
+ tool_libinfo.c \
+ tool_main.c \
+ tool_metalink.c \
+ tool_mfiles.c \
+ tool_msgs.c \
+ tool_operate.c \
+ tool_operhlp.c \
+ tool_panykey.c \
+ tool_paramhlp.c \
+ tool_parsecfg.c \
+ tool_strdup.c \
+ tool_setopt.c \
+ tool_sleep.c \
+ tool_urlglob.c \
+ tool_util.c \
+ tool_vms.c \
+ tool_writeenv.c \
+ tool_writeout.c \
+ tool_xattr.c
-curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)
+CURL_HFILES = \
+ tool_binmode.h \
+ tool_bname.h \
+ tool_cb_dbg.h \
+ tool_cb_hdr.h \
+ tool_cb_prg.h \
+ tool_cb_rea.h \
+ tool_cb_see.h \
+ tool_cb_wrt.h \
+ tool_cfgable.h \
+ tool_convert.h \
+ tool_dirhie.h \
+ tool_doswin.h \
+ tool_easysrc.h \
+ tool_formparse.h \
+ tool_getparam.h \
+ tool_getpass.h \
+ tool_help.h \
+ tool_helpers.h \
+ tool_homedir.h \
+ tool_hugehelp.h \
+ tool_libinfo.h \
+ tool_main.h \
+ tool_metalink.h \
+ tool_mfiles.h \
+ tool_msgs.h \
+ tool_operate.h \
+ tool_operhlp.h \
+ tool_panykey.h \
+ tool_paramhlp.h \
+ tool_parsecfg.h \
+ tool_sdecls.h \
+ tool_setopt.h \
+ tool_setup.h \
+ tool_sleep.h \
+ tool_strdup.h \
+ tool_urlglob.h \
+ tool_util.h \
+ tool_version.h \
+ tool_vms.h \
+ tool_writeenv.h \
+ tool_writeout.h \
+ tool_xattr.h
+
+CURL_RCFILES = curl.rc
+
+curl_SOURCES = $(CURL_CFILES) $(CURLX_CFILES) $(CURL_HFILES)
diff --git a/src/Makefile.m32 b/src/Makefile.m32
index dfe80927..fc59f63e 100644
--- a/src/Makefile.m32
+++ b/src/Makefile.m32
@@ -1,111 +1,285 @@
-#########################################################################
+###########################################################################
#
-## Makefile for building curl.exe with MingW32 (GCC-3.2 or later)
-## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5)
+## Makefile for building curl.exe with MingW (GCC-3.2 or later)
+## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4)
##
-## Usage:
-## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [RTMP=1] [DYN=1]
+## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
+## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn
##
## Hint: you can also set environment vars to control the build, f.e.:
-## set ZLIB_PATH=c:/zlib-1.2.5
+## set ZLIB_PATH=c:/zlib-1.2.8
## set ZLIB=1
-##
-## Comments to: Troy Engel <tengel@sonic.net> or
-## Joern Hartroth <hartroth@acm.org>
-#########################################################################
+#
+###########################################################################
# Edit the path below to point to the base of your Zlib sources.
ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+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.8o
+OPENSSL_PATH = ../../openssl-1.0.2a
endif
# Edit the path below to point to the base of your LibSSH2 package.
ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2.7
+LIBSSH2_PATH = ../../libssh2-1.5.0
+endif
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../librtmp-2.4
+endif
+# Edit the path below to point to the base of your libmetalink package.
+ifndef LIBMETALINK_PATH
+LIBMETALINK_PATH = ../../libmetalink-0.1.3
+endif
+# Edit the path below to point to the base of your libexpat package.
+ifndef LIBEXPAT_PATH
+LIBEXPAT_PATH = ../../expat-2.1.0
+endif
+# Edit the path below to point to the base of your libxml2 package.
+ifndef LIBXML2_PATH
+LIBXML2_PATH = ../../libxml2-2.9.2
endif
# Edit the path below to point to the base of your libidn package.
ifndef LIBIDN_PATH
-LIBIDN_PATH = ../../libidn-1.18
+LIBIDN_PATH = ../../libidn-1.30
endif
-# Edit the path below to point to the base of your librtmp package.
-ifndef LIBRTMP_PATH
-LIBRTMP_PATH = ../../librtmp-2.3
+# Edit the path below to point to the base of your MS IDN package.
+# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
+# https://www.microsoft.com/en-us/download/details.aspx?id=734
+ifndef WINIDN_PATH
+WINIDN_PATH = ../../Microsoft IDN Mitigation APIs
endif
# Edit the path below to point to the base of your Novell LDAP NDK.
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-1.0.0
+endif
+
+PROOT = ..
# Edit the path below to point to the base of your c-ares package.
ifndef LIBCARES_PATH
-LIBCARES_PATH = ../ares
+LIBCARES_PATH = $(PROOT)/ares
endif
-CC = gcc
-CFLAGS = -g -O2
+CC = $(CROSSPREFIX)gcc
+CFLAGS = -g -O2 -Wall
+CFLAGS += -fno-strict-aliasing
# comment LDFLAGS below to keep debug info
-LDFLAGS = -s
-RC = windres
-RCFLAGS = --include-dir=../include -O COFF -i
-RM = del /q /f 2>NUL
-CP = copy
+LDFLAGS = -s
+AR = $(CROSSPREFIX)ar
+RC = $(CROSSPREFIX)windres
+RCFLAGS = --include-dir=$(PROOT)/include -O COFF
+STRIP = $(CROSSPREFIX)strip -g
# 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
+RMDIR = rm -fr $1
+MKDIR = mkdir -p $1
+COPY = -cp -afv $1 $2
+#COPYR = -cp -afr $1/* $2
+COPYR = -rsync -aC $1/* $2
+TOUCH = touch $1
+CAT = cat
+ECHONL = echo ""
+DL = '
+else
+ifeq "$(OS)" "Windows_NT"
+DEL = -del 2>NUL /q /f $(subst /,\,$1)
+RMDIR = -rd 2>NUL /q /s $(subst /,\,$1)
+else
+DEL = -del 2>NUL $(subst /,\,$1)
+RMDIR = -deltree 2>NUL /y $(subst /,\,$1)
+endif
+MKDIR = -md 2>NUL $(subst /,\,$1)
+COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
+COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
+TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,,
+CAT = type
+ECHONL = $(ComSpec) /c echo.
+endif
+
########################################################
## Nothing more to do below this line!
-INCLUDES = -I. -I.. -I../include -I../lib
-LINK = $(CC) $(LDFLAGS) -o $@
+ifeq ($(findstring -dyn,$(CFG)),-dyn)
+DYN = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+ARES = 1
+endif
+ifeq ($(findstring -sync,$(CFG)),-sync)
+SYNC = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+RTMP = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+SSH2 = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+SSL = 1
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+IDN = 1
+endif
+ifeq ($(findstring -winidn,$(CFG)),-winidn)
+WINIDN = 1
+endif
+ifeq ($(findstring -sspi,$(CFG)),-sspi)
+SSPI = 1
+endif
+ifeq ($(findstring -ldaps,$(CFG)),-ldaps)
+LDAPS = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+IPV6 = 1
+endif
+ifeq ($(findstring -metalink,$(CFG)),-metalink)
+METALINK = 1
+endif
+ifeq ($(findstring -winssl,$(CFG)),-winssl)
+WINSSL = 1
+SSPI = 1
+endif
+ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
+NGHTTP2 = 1
+endif
+
+INCLUDES = -I. -I../include -I../lib
-curl_PROGRAMS = curl.exe
ifdef DYN
- curl_DEPENDENCIES = ../lib/libcurldll.a ../lib/libcurl.dll
- curl_LDADD = -L../lib -lcurldll
+ curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
+ curl_LDADD = -L$(PROOT)/lib -lcurldll
else
- curl_DEPENDENCIES = ../lib/libcurl.a
- curl_LDADD = -L../lib -lcurl
+ curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a
+ curl_LDADD = -L$(PROOT)/lib -lcurl
CFLAGS += -DCURL_STATICLIB
+ LDFLAGS += -static
endif
-ifdef ARES
- ifndef DYN
- curl_DEPENDENCIES += $(LIBCARES_PATH)/libcares.a
+ifdef SYNC
+ CFLAGS += -DUSE_SYNC_DNS
+else
+ ifdef ARES
+ ifndef DYN
+ curl_DEPENDENCIES += $(LIBCARES_PATH)/libcares.a
+ endif
+ CFLAGS += -DUSE_ARES -DCARES_STATICLIB
+ curl_LDADD += -L"$(LIBCARES_PATH)" -lcares
endif
- CFLAGS += -DUSE_ARES
- curl_LDADD += -L$(LIBCARES_PATH) -lcares
endif
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
+ curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2
endif
ifdef SSL
- CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
- curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
+ ifndef OPENSSL_INCLUDE
+ ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc"
+ OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
+ endif
+ ifeq "$(wildcard $(OPENSSL_PATH)/include)" "$(OPENSSL_PATH)/include"
+ OPENSSL_INCLUDE = $(OPENSSL_PATH)/include
+ endif
+ endif
+ ifneq "$(wildcard $(OPENSSL_INCLUDE)/openssl/opensslv.h)" "$(OPENSSL_INCLUDE)/openssl/opensslv.h"
+ $(error Invalid path to OpenSSL package: $(OPENSSL_PATH))
+ endif
+ ifndef OPENSSL_LIBPATH
+ OPENSSL_LIBS = -lssl -lcrypto
+ ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
+ OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
+ ifdef DYN
+ OPENSSL_LIBS = -lssl32 -leay32
+ endif
+ endif
+ ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
+ OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
+ endif
+ endif
+ ifndef DYN
+ OPENSSL_LIBS += -lgdi32 -lcrypt32
+ endif
+ INCLUDES += -I"$(OPENSSL_INCLUDE)"
+ CFLAGS += -DUSE_OPENSSL
+ curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
endif
ifdef ZLIB
INCLUDES += -I"$(ZLIB_PATH)"
CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
- curl_LDADD += -L$(ZLIB_PATH) -lz
+ curl_LDADD += -L"$(ZLIB_PATH)" -lz
endif
ifdef IDN
- INCLUDES += -I"$(LIBIDN_PATH)/include"
CFLAGS += -DUSE_LIBIDN
- curl_LDADD += -L$(LIBIDN_PATH)/lib -lidn
+ curl_LDADD += -L"$(LIBIDN_PATH)/lib" -lidn
+else
+ifdef WINIDN
+ CFLAGS += -DUSE_WIN32_IDN
+ curl_LDADD += -L"$(WINIDN_PATH)" -lnormaliz
+endif
+endif
+ifdef METALINK
+ INCLUDES += -I"$(LIBMETALINK_PATH)/include"
+ CFLAGS += -DUSE_METALINK
+ curl_LDADD += -L"$(LIBMETALINK_PATH)/lib" -lmetalink
+ ifndef DYN
+ ifeq ($(findstring libexpat_metalink_parser.o,$(shell $(AR) t "$(LIBMETALINK_PATH)/lib/libmetalink.a")),libexpat_metalink_parser.o)
+ curl_LDADD += -L"$(LIBEXPAT_PATH)/lib" -lexpat
+ else
+ curl_LDADD += -L"$(LIBXML2_PATH)/lib" -lxml2
+ endif
+ endif
endif
ifdef SSPI
CFLAGS += -DUSE_WINDOWS_SSPI
+ ifdef WINSSL
+ CFLAGS += -DUSE_SCHANNEL
+ endif
endif
ifdef IPV6
- CFLAGS += -DENABLE_IPV6
+ CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
endif
ifdef LDAPS
CFLAGS += -DHAVE_LDAP_SSL
@@ -124,49 +298,47 @@ curl_LDADD += -lwldap32
endif
endif
curl_LDADD += -lws2_32
-COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
# Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc
+curl_PROGRAMS = curl.exe
curl_OBJECTS := $(patsubst %.c,%.o,$(strip $(CURL_CFILES)))
+curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_CFILES))))
ifdef DYN
-curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_ONES))))
curl_OBJECTS += $(curlx_OBJECTS)
-vpath %.c ../lib
+vpath %.c $(PROOT)/lib
endif
RESOURCE = curl.res
-.SUFFIXES: .rc .res
-all: curl.exe
+all: $(curl_PROGRAMS)
curl.exe: $(RESOURCE) $(curl_OBJECTS) $(curl_DEPENDENCIES)
- -$(RM) $@
- $(LINK) $< $(curl_OBJECTS) $(curl_LDADD)
+ $(call DEL, $@)
+ $(CC) $(LDFLAGS) -o $@ $< $(curl_OBJECTS) $(curl_LDADD)
# We don't have nroff normally under win32
-# hugehelp.c: ../README.curl ../curl.1 mkhelp.pl
-# -$(RM) hugehelp.c
-# $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c
+# tool_hugehelp.c: $(PROOT)/docs/MANUAL $(PROOT)/docs/curl.1 mkhelp.pl
+# @$(call DEL, tool_hugehelp.c)
+# $(NROFF) -man $(PROOT)/docs/curl.1 | $(PERL) mkhelp.pl $(PROOT)/docs/MANUAL > tool_hugehelp.c
-hugehelp.c:
+tool_hugehelp.c:
@echo Creating $@
- @$(CP) hugehelp.c.cvs $@
+ @$(call COPY, $@.cvs, $@)
-.c.o:
- $(COMPILE) -c $<
+%.o: %.c
+ $(CC) $(INCLUDES) $(CFLAGS) -c $<
-.rc.res:
- $(RC) $(RCFLAGS) $< -o $@
+%.res: %.rc
+ $(RC) $(RCFLAGS) -i $< -o $@
clean:
-ifeq "$(wildcard hugehelp.c.cvs)" "hugehelp.c.cvs"
- -$(RM) hugehelp.c
+ifeq "$(wildcard tool_hugehelp.c.cvs)" "tool_hugehelp.c.cvs"
+ @$(call DEL, tool_hugehelp.c)
endif
- -$(RM) $(curl_OBJECTS) $(RESOURCE)
+ @$(call DEL, $(curl_OBJECTS) $(curlx_OBJECTS) $(RESOURCE))
distclean vclean: clean
- -$(RM) $(curl_PROGRAMS)
-
+ @$(call DEL, $(curl_PROGRAMS))
diff --git a/src/Makefile.netware b/src/Makefile.netware
index 3f5802ce..5065cbfe 100644
--- a/src/Makefile.netware
+++ b/src/Makefile.netware
@@ -14,17 +14,22 @@ endif
# Edit the path below to point to the base of your Zlib sources.
ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+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.8o
+OPENSSL_PATH = ../../openssl-1.0.2a
endif
# Edit the path below to point to the base of your LibSSH2 package.
ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2.7
+LIBSSH2_PATH = ../../libssh2-1.5.0
+endif
+
+# Edit the path below to point to the base of your axTLS package.
+ifndef AXTLS_PATH
+AXTLS_PATH = ../../axTLS-1.2.7
endif
# Edit the path below to point to the base of your libidn package.
@@ -37,6 +42,31 @@ 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
+endif
+
+# Edit the path below to point to the base of your libmetalink package.
+ifndef LIBMETALINK_PATH
+LIBMETALINK_PATH = ../../libmetalink-0.1.2
+endif
+
+# Edit the path below to point to the base of your libexpat package.
+ifndef LIBEXPAT_PATH
+LIBEXPAT_PATH = ../../expat-2.1.0
+endif
+
+# Edit the path below to point to the base of your libXML2 package.
+ifndef LIBXML2_PATH
+LIBXML2_PATH = ../../libxml2-2.8.0
+endif
+
# Edit the path below to point to the base of your c-ares package.
ifndef LIBCARES_PATH
LIBCARES_PATH = ../ares
@@ -91,7 +121,7 @@ else
endif
PERL = perl
# Here you can find a native Win32 binary of the original awk:
-# http://www.gknw.net/development/prgtools/awk-20070501.zip
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
AWK = awk
CP = cp -afv
MKDIR = mkdir
@@ -135,7 +165,11 @@ else
LD = nlmconv
LDFLAGS = -T
LIBEXT = a
-CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
+CFLAGS += -m32
+CFLAGS += -fno-builtin -fno-strict-aliasing
+ifeq ($(findstring gcc,$(CC)),gcc)
+CFLAGS += -fpcc-struct-return
+endif
CFLAGS += -Wall # -pedantic
ifeq ($(LIBARCH),LIBC)
ifeq ($(POSIXFL),1)
@@ -167,6 +201,47 @@ CURL_LIB = ../lib
INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
+ifeq ($(findstring -static,$(CFG)),-static)
+LINK_STATIC = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+WITH_ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+WITH_RTMP = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+WITH_SSH2 = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -axtls,$(CFG)),-axtls)
+WITH_AXTLS = 1
+WITH_SSL =
+else
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+WITH_SSL = 1
+endif
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+WITH_IDN = 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
+
ifdef LINK_STATIC
LDLIBS = $(CURL_LIB)/libcurl.$(LIBEXT)
ifdef WITH_ARES
@@ -177,7 +252,7 @@ else
IMPORTS = @$(CURL_LIB)/libcurl.imp
endif
ifdef WITH_SSH2
- INCLUDES += -I$(LIBSSH2_PATH)/include
+ # INCLUDES += -I$(LIBSSH2_PATH)/include
ifdef LINK_STATIC
LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
else
@@ -192,10 +267,20 @@ ifdef LINK_STATIC
endif
endif
ifdef WITH_SSL
- INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
+ # INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
IMPORTS += GetProcessSwitchCount RunningProcess
+else
+ifdef WITH_AXTLS
+ # INCLUDES += -I$(AXTLS_PATH)/inc
+ifdef LINK_STATIC
+ LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
+else
+ MODULES += libaxtls.nlm
+ IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
+endif
+endif
endif
ifdef WITH_ZLIB
INCLUDES += -I$(ZLIB_PATH)
@@ -210,6 +295,30 @@ 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)
+ INCLUDES += -I$(LIBMETALINK_PATH)/include
+ LDLIBS += $(LIBMETALINK_PATH)/lib/libmetalink.$(LIBEXT)
+ifdef WITH_LIBEXPAT
+ ifeq ($(LIBARCH),LIBC)
+ IMPORTS += @$(LIBEXPAT_PATH)/imports/expatlbc.imp
+ MODULES += expatlbc
+ else
+ IMPORTS += @$(LIBEXPAT_PATH)/imports/expatlib.imp
+ MODULES += expatlib
+ endif
+else
+ifdef WITH_LIBXML2
+ IMPORTS += @$(LIBXML2_PATH)/lib/libxml2.imp
+ MODULES += libxml2
+endif
+endif
+endif
ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(NDK_LIBC)/include
@@ -248,7 +357,7 @@ endif
# Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc
-OBJX := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_ONES))))
+OBJX := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_CFILES))))
OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_CFILES)))
ifndef LINK_STATIC
OBJS += $(OBJX)
@@ -258,7 +367,7 @@ vpath %.c $(CURL_LIB)
all: prebuild $(TARGET).nlm
-prebuild: $(OBJDIR) $(OBJDIR)/version.inc curl_config.h
+prebuild: $(OBJDIR) $(OBJDIR)/version.inc
$(OBJDIR)/%.o: %.c
# @echo Compiling $<
@@ -274,10 +383,9 @@ install: $(INSTDIR) all
@$(CP) $(TARGET).nlm $(INSTDIR)
clean:
-ifeq "$(wildcard hugehelp.c.cvs)" "hugehelp.c.cvs"
- -$(RM) hugehelp.c
+ifeq "$(wildcard tool_hugehelp.c.cvs)" "tool_hugehelp.c.cvs"
+ -$(RM) tool_hugehelp.c
endif
- -$(RM) curl_config.h
-$(RM) -r $(OBJDIR)
distclean vclean: clean
@@ -384,203 +492,9 @@ endif
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
endif
-curl_config.h: Makefile.netware
- @echo Creating $@
- @echo $(DL)/* $@ for NetWare target.$(DL) > $@
- @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
- @echo $(DL)** All your changes will be lost!!$(DL) >> $@
- @echo $(DL)*/$(DL) >> $@
- @echo $(DL)#ifndef NETWARE$(DL) >> $@
- @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
- @echo $(DL)#endif$(DL) >> $@
- @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
- @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
-ifeq ($(LIBARCH),CLIB)
- @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
- @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@
- @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
- @echo $(DL)#define pressanykey PressAnyKeyToContinue$(DL) >> $@
-else
- @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
- @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
- @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
- @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
- @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@
- @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
- @echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@
- @echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@
- @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
- @echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
- @echo $(DL)#define SIZEOF_OFF_T 8$(DL) >> $@
- @echo $(DL)#define _LARGEFILE 1$(DL) >> $@
-ifdef ENABLE_IPV6
- @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
- @echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
- @echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
- @echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
- @echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
- @echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
- @echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
-endif
-endif
- @echo $(DL)#define USE_MANUAL 1$(DL) >> $@
- @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
- @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
- @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
- @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
- @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
- @echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@
- @echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@
- @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_LL 1$(DL) >> $@
- @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
- @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_RECV 1$(DL) >> $@
- @echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@
- @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
- @echo $(DL)#define HAVE_SEND 1$(DL) >> $@
- @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@
- @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
- @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
- @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
- @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
- @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
- @echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
- @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
- @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@
- @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
- @echo $(DL)#define SIZEOF_INT 4$(DL) >> $@
- @echo $(DL)#define SIZEOF_SHORT 2$(DL) >> $@
- @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
- @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
- @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
-ifdef DISABLE_LDAP
- @echo $(DL)#define CURL_DISABLE_LDAP 1$(DL) >> $@
-else
- @echo $(DL)#define CURL_HAS_NOVELL_LDAPSDK 1$(DL) >> $@
-ifndef DISABLE_LDAPS
- @echo $(DL)#define HAVE_LDAP_SSL 1$(DL) >> $@
-endif
- @echo $(DL)#define HAVE_LDAP_SSL_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_LDAP_URL_PARSE 1$(DL) >> $@
-endif
-ifdef NW_WINSOCK
- @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
-else
- @echo $(DL)#define USE_BSD_SOCKETS 1$(DL) >> $@
- @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
-endif
-ifdef WITH_ARES
- @echo $(DL)#define USE_ARES 1$(DL) >> $@
-endif
-ifdef WITH_ZLIB
- @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
-endif
-ifdef WITH_SSL
- @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
- @echo $(DL)#define USE_OPENSSL 1$(DL) >> $@
- @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
- @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
- @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
- @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
-endif
-ifdef WITH_SSH2
- @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
- @echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@
-endif
-ifdef WITH_IDN
- @echo $(DL)#define HAVE_LIBIDN 1$(DL) >> $@
- @echo $(DL)#define HAVE_TLD_H 1$(DL) >> $@
-endif
-ifdef WITH_RTMP
- @echo $(DL)#define USE_LIBRTMP 1$(DL) >> $@
-endif
- @echo $(DL)#ifdef __GNUC__$(DL) >> $@
- @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
- @echo $(DL)#else$(DL) >> $@
- @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
- @echo $(DL)#endif$(DL) >> $@
-ifdef CABUNDLE
- @echo $(DL)#define CURL_CA_BUNDLE "$(CABUNDLE)"$(DL) >> $@
-else
- @echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
-endif
-
-hugehelp.c:
+tool_hugehelp.c:
@echo Creating $@
- @$(CP) hugehelp.c.cvs $@
+ @$(CP) tool_hugehelp.c.cvs $@
$(LIBCARES_PATH)/libcares.$(LIBEXT):
$(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
diff --git a/src/Makefile.riscos b/src/Makefile.riscos
deleted file mode 100644
index 35a194ff..00000000
--- a/src/Makefile.riscos
+++ /dev/null
@@ -1,64 +0,0 @@
-# Makefile for project cURL
-# Generated on Sun,13 Jan 2002.17:11:10 by EasyGCC (0.1.3 [beta 2] (3 Jan 2002))
-# Manually updated
-# Contact: easygcc@melotech.co.uk
-
-# Project objects:
-objs = o.hugehelp o.main o.urlglob o.writeout o.writeenv o.rawstr o.nonblock
-
-
-# Compile options:
-linkopts = ../lib/libcurl openldap:libraries/libldap/libldap -o curl
-compileropts = -mpoke-function-name -IUtilLib: -mthrowback
-
-# Project target:
-curl: $(objs)
- gcc $(linkopts) $(objs)
-
-# Static dependancies:
-o.hugehelp: c.hugehelp
- gcc $(compileropts) -c -o hugehelp.o c.hugehelp
-
-o.main: c.main
- gcc $(compileropts) -c -o main.o c.main
-
-o.os-specific: c.os-specific
- gcc $(compileropts) -c -o os-specific.o c.os-specific
-
-o.urlglob: c.urlglob
- gcc $(compileropts) -c -o urlglob.o c.urlglob
-
-o.writeout: c.writeout
- gcc $(compileropts) -c -o writeout.o c.writeout
-
-o.writeenv: c.writeenv
- gcc $(compileropts) -c -o writeenv.o c.writeenv
-
-o.rawstr: ../lib/c.rawstr
- gcc $(compileropts) -c -o rawstr.o ../lib/c.rawstr
-
-o.nonblock: ../lib/c.nonblock
- gcc $(compileropts) -c -o nonblock.o ../lib/c.nonblock
-
-# Dynamic dependancies:
-o.hugehelp: c.hugehelp
-
-o.main: c.main
-o.main: h.setup
-o.main: h.os-specific
-o.main: h.urlglob
-o.main: h.writeout
-o.main: h.version
-
-o.os-specific: c.os-specific
-o.os-specific: h.setup
-o.os-specific: h.os-specific
-
-o.urlglob: c.urlglob
-o.urlglob: h.setup
-o.urlglob: h.os-specific
-o.urlglob: h.urlglob
-
-o.writeout: c.writeout
-o.writeout: h.writeout
-
diff --git a/src/Makefile.vc10 b/src/Makefile.vc10
deleted file mode 100644
index 24d1b93d..00000000
--- a/src/Makefile.vc10
+++ /dev/null
@@ -1,299 +0,0 @@
-#############################################################
-#
-## Makefile for building curl.exe with MSVC10
-## Use: nmake -f makefile.vc10 [release | debug] [CFG=release-ssl]
-## (default is release)
-## "nmake -f makefile.vc10 CFG=release-ssl" statically links OpenSSL
-## into curl.exe producing a standalone SSL-enabled executable.
-##
-## Comments to: Troy Engel <tengel@sonic.net>
-## Updated by: Craig Davison <cd@securityfocus.com>
-## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>
-#
-#############################################################
-
-PROGRAM_NAME = curl.exe
-
-!IFNDEF OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8o
-!ENDIF
-
-!IFNDEF ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
-!ENDIF
-
-!IFNDEF MACHINE
-MACHINE = X86
-!ENDIF
-
-# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication
-# without an openssl installation and offers the ability to authenticate
-# using the "current logged in user". Since at least with MSVC10 the sspi.h
-# header is broken it is either required to install the Windows SDK,
-# or to fix sspi.h with adding this define at the beginning of sspi.h:
-# #define FreeCredentialHandle FreeCredentialsHandle
-#
-# If, for some reason the Windows SDK is installed but not installed
-# in the default location, you can specify WINDOWS_SDK_PATH.
-# It can be downloaded from:
-# http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
-
-# WINDOWS_SSPI = 1
-
-!IFDEF WINDOWS_SSPI
-!IFNDEF WINDOWS_SDK_PATH
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
-!ENDIF
-!ENDIF
-
-########################################################
-## Nothing more to do below this line!
-ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
-ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)"
-ZLIB_LIBS = zlib.lib
-ZLIB_IMP_LIBS = zdll.lib
-
-SSL_CFLAGS = /DUSE_SSLEAY
-SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32"
-SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"
-SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib
-
-# Runtime library configuration
-RTLIB = /MD
-RTLIBD = /MDd
-
-!IF "$(RTLIBCFG)" == "static"
-RTLIB = /MT
-RTLIBD = /MTd
-!ENDIF
-
-## Release
-CCR = cl.exe $(RTLIB) /O2 /DNDEBUG
-LINKR = link.exe /incremental:no /libpath:"../lib"
-RCR = rc.exe /dDEBUGBUILD=0
-
-## Debug
-CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1
-LINKD = link.exe /incremental:yes /debug /libpath:"../lib"
-RCD = rc.exe /dDEBUGBUILD=1
-
-CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c
-LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)
-RESFLAGS = /i../include
-
-# This manifest thing is for VC8, enabled by the maketgz script that
-# builds the VC8 version of this makefile. Left commented out in the VC10
-# version!
-#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1
-
-!IFDEF WINDOWS_SSPI
-CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
-!ENDIF
-
-RELEASE_OBJS= \
- hugehelpr.obj \
- writeoutr.obj \
- urlglobr.obj \
- getpassr.obj \
- homedirr.obj \
- curlutilr.obj \
- os-specificr.obj \
- nonblockr.obj \
- rawstrr.obj \
- strtoofftr.obj \
- mainr.obj \
- curlr.res
-
-DEBUG_OBJS= \
- hugehelpd.obj \
- writeoutd.obj \
- urlglobd.obj \
- getpassd.obj \
- homedird.obj \
- curlutild.obj \
- os-specificd.obj \
- nonblockd.obj \
- rawstrd.obj \
- strtoofftd.obj \
- maind.obj \
- curld.res
-
-#################################################
-# If CFG not specified, use static libs
-
-CFLAGS = $(CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib
-LINKLIBS_DEBUG = libcurld.lib
-
-#################################################
-# release dynamic library
-
-!IF "$(CFG)" == "release-dll"
-LINKLIBS = libcurl_imp.lib
-LINKLIBS_DEBUG = libcurld_imp.lib
-!ENDIF
-
-#################################################
-# release static library with zlib
-
-!IF "$(CFG)" == "release-zlib"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(ZLIB_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with ssl
-
-!IF "$(CFG)" == "release-ssl"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_LFLAGS)
-!ENDIF
-
-#################################################
-# release dynamic library with dynamic ssl
-
-!IF "$(CFG)" == "release-dll-ssl-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with ssl and zlib
-
-!IF "$(CFG)" == "release-ssl-zlib"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS) $(ZLIB_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with dynamic ssl
-
-!IF "$(CFG)" == "release-ssl-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with dynamic zlib
-
-!IF "$(CFG)" == "release-zlib-dll"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release dynamic library with dynamic zlib
-
-!IF "$(CFG)" == "release-dll-zlib-dll"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with dynamic ssl and dynamic zlib
-
-!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release dynamic library with dynamic ssl and dynamic zlib
-
-!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-
-LINKLIBS = $(LINKLIBS) ws2_32.lib wldap32.lib
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib
-
-all : release
-
-release: $(RELEASE_OBJS)
- $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS)
- $(MANIFESTTOOL)
-
-debug: $(DEBUG_OBJS)
- $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS)
- $(MANIFESTTOOL)
-
-## Release
-hugehelpr.obj: hugehelp.c
- $(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
-writeoutr.obj: writeout.c
- $(CCR) $(CFLAGS) /Fo"$@" writeout.c
-urlglobr.obj: urlglob.c
- $(CCR) $(CFLAGS) /Fo"$@" urlglob.c
-getpassr.obj: getpass.c
- $(CCR) $(CFLAGS) /Fo"$@" getpass.c
-homedirr.obj: homedir.c
- $(CCR) $(CFLAGS) /Fo"$@" homedir.c
-curlutilr.obj: curlutil.c
- $(CCR) $(CFLAGS) /Fo"$@" curlutil.c
-os-specificr.obj: os-specific.c
- $(CCR) $(CFLAGS) /Fo"$@" os-specific.c
-nonblockr.obj: ../lib/nonblock.c
- $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
-rawstrr.obj: ../lib/rawstr.c
- $(CCR) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
-strtoofftr.obj: ../lib/strtoofft.c
- $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
-mainr.obj: main.c
- $(CCR) $(CFLAGS) /Fo"$@" main.c
-curlr.res : curl.rc
- $(RCR) $(RESFLAGS) /Fo"$@" curl.rc
-
-## Debug
-hugehelpd.obj: hugehelp.c
- $(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
-writeoutd.obj: writeout.c
- $(CCD) $(CFLAGS) /Fo"$@" writeout.c
-urlglobd.obj: urlglob.c
- $(CCD) $(CFLAGS) /Fo"$@" urlglob.c
-getpassd.obj: getpass.c
- $(CCD) $(CFLAGS) /Fo"$@" getpass.c
-homedird.obj: homedir.c
- $(CCD) $(CFLAGS) /Fo"$@" homedir.c
-curlutild.obj: curlutil.c
- $(CCD) $(CFLAGS) /Fo"$@" curlutil.c
-os-specificd.obj: os-specific.c
- $(CCD) $(CFLAGS) /Fo"$@" os-specific.c
-nonblockd.obj: ../lib/nonblock.c
- $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
-rawstrd.obj: ../lib/rawstr.c
- $(CCD) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
-strtoofftd.obj: ../lib/strtoofft.c
- $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
-maind.obj: main.c
- $(CCD) $(CFLAGS) /Fo"$@" main.c
-curld.res : curl.rc
- $(RCD) $(RESFLAGS) /Fo"$@" curl.rc
-
-clean:
- @-erase $(PROGRAM_NAME) 2> NUL
- @-erase $(RELEASE_OBJS) 2> NUL
- @-erase $(DEBUG_OBJS) 2> NUL
- @-erase *.idb 2> NUL
- @-erase *.pdb 2> NUL
- @-erase *.pch 2> NUL
- @-erase *.ilk 2> NUL
diff --git a/src/Makefile.vc6 b/src/Makefile.vc6
index 4a3480d2..eec89c25 100644
--- a/src/Makefile.vc6
+++ b/src/Makefile.vc6
@@ -1,3 +1,30 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1999 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+#***************************************************************************
+
+# All files in the Makefile.vc* series are generated automatically from the
+# one made for MSVC version 6. Alas, if you want to do changes to any of the
+# files and send back to the project, edit the version six, make your diff and
+# mail curl-users.
+
#############################################################
#
## Makefile for building curl.exe with MSVC6
@@ -6,20 +33,34 @@
## "nmake -f makefile.vc6 CFG=release-ssl" statically links OpenSSL
## into curl.exe producing a standalone SSL-enabled executable.
##
-## Comments to: Troy Engel <tengel@sonic.net>
-## Updated by: Craig Davison <cd@securityfocus.com>
-## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>
#
#############################################################
PROGRAM_NAME = curl.exe
+# -------------------------------------------
+# Verify that current subdir is curl's 'src'
+# -------------------------------------------
+
+!IF ! EXIST(.\tool_main.c)
+! MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory.
+! MESSAGE Change to curl's 'src' subdirectory, and try again.
+! ERROR See previous message.
+!ENDIF
+
+# ------------------------------------------------
+# Makefile.msvc.names provides libcurl file names
+# ------------------------------------------------
+
+!INCLUDE ..\winbuild\Makefile.msvc.names
+
+
!IFNDEF OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8o
+OPENSSL_PATH = ../../openssl-1.0.2a
!ENDIF
!IFNDEF ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+ZLIB_PATH = ../../zlib-1.2.8
!ENDIF
!IFNDEF MACHINE
@@ -36,27 +77,36 @@ MACHINE = X86
# If, for some reason the Windows SDK is installed but not installed
# in the default location, you can specify WINDOWS_SDK_PATH.
# It can be downloaded from:
-# http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
+# https://msdn.microsoft.com/windows/bb980924.aspx
# WINDOWS_SSPI = 1
!IFDEF WINDOWS_SSPI
!IFNDEF WINDOWS_SDK_PATH
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"
!ENDIF
!ENDIF
########################################################
## Nothing more to do below this line!
-ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
-ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)"
-ZLIB_LIBS = zlib.lib
-ZLIB_IMP_LIBS = zdll.lib
-SSL_CFLAGS = /DUSE_SSLEAY
+ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
+ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)"
+ZLIB_LIBS = zlib.lib
+ZLIB_IMP_LIBS = zdll.lib
+
+SSL_CFLAGS = /DUSE_OPENSSL
SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32"
SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"
-SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib
+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
@@ -77,7 +127,7 @@ CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /GZ
LINKD = link.exe /incremental:yes /debug /libpath:"../lib"
RCD = rc.exe /dDEBUGBUILD=1
-CFLAGS = /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c
+CFLAGS = /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1
LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)
RESFLAGS = /i../include
@@ -91,46 +141,108 @@ CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
!ENDIF
RELEASE_OBJS= \
- hugehelpr.obj \
- writeoutr.obj \
- urlglobr.obj \
- getpassr.obj \
- homedirr.obj \
- curlutilr.obj \
- os-specificr.obj \
nonblockr.obj \
rawstrr.obj \
strtoofftr.obj \
- mainr.obj \
+ warnless.obj \
+ tool_binmoder.obj \
+ tool_bnamer.obj \
+ tool_cb_dbgr.obj \
+ tool_cb_hdrr.obj \
+ tool_cb_prgr.obj \
+ tool_cb_rear.obj \
+ tool_cb_seer.obj \
+ tool_cb_wrtr.obj \
+ tool_cfgabler.obj \
+ tool_convertr.obj \
+ tool_dirhier.obj \
+ tool_doswinr.obj \
+ tool_easysrcr.obj \
+ tool_formparser.obj \
+ tool_getparamr.obj \
+ tool_getpassr.obj \
+ tool_helpr.obj \
+ tool_helpersr.obj \
+ tool_homedirr.obj \
+ tool_hugehelpr.obj \
+ tool_libinfor.obj \
+ tool_mainr.obj \
+ tool_metalinkr.obj \
+ tool_mfilesr.obj \
+ tool_msgsr.obj \
+ tool_operater.obj \
+ tool_operhlpr.obj \
+ tool_panykeyr.obj \
+ tool_paramhlpr.obj \
+ tool_parsecfgr.obj \
+ tool_setoptr.obj \
+ tool_sleepr.obj \
+ tool_urlglobr.obj \
+ tool_utilr.obj \
+ tool_vmsr.obj \
+ tool_writeenvr.obj \
+ tool_writeoutr.obj \
+ tool_xattrr.obj \
curlr.res
DEBUG_OBJS= \
- hugehelpd.obj \
- writeoutd.obj \
- urlglobd.obj \
- getpassd.obj \
- homedird.obj \
- curlutild.obj \
- os-specificd.obj \
nonblockd.obj \
rawstrd.obj \
strtoofftd.obj \
- maind.obj \
+ warnlessd.obj \
+ tool_binmoded.obj \
+ tool_bnamed.obj \
+ tool_cb_dbgd.obj \
+ tool_cb_hdrd.obj \
+ tool_cb_prgd.obj \
+ tool_cb_read.obj \
+ tool_cb_seed.obj \
+ tool_cb_wrtd.obj \
+ tool_cfgabled.obj \
+ tool_convertd.obj \
+ tool_dirhied.obj \
+ tool_doswind.obj \
+ tool_easysrcd.obj \
+ tool_formparsed.obj \
+ tool_getparamd.obj \
+ tool_getpassd.obj \
+ tool_helpd.obj \
+ tool_helpersd.obj \
+ tool_homedird.obj \
+ tool_hugehelpd.obj \
+ tool_libinfod.obj \
+ tool_maind.obj \
+ tool_metalinkd.obj \
+ tool_mfilesd.obj \
+ tool_msgsd.obj \
+ tool_operated.obj \
+ tool_operhlpd.obj \
+ tool_panykeyd.obj \
+ tool_paramhlpd.obj \
+ tool_parsecfgd.obj \
+ tool_setoptd.obj \
+ tool_sleepd.obj \
+ tool_urlglobd.obj \
+ tool_utild.obj \
+ tool_vmsd.obj \
+ tool_writeenvd.obj \
+ tool_writeoutd.obj \
+ tool_xattrd.obj \
curld.res
#################################################
# If CFG not specified, use static libs
CFLAGS = $(CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib
-LINKLIBS_DEBUG = libcurld.lib
+LINKLIBS = $(LIBCURL_STA_LIB_REL)
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG)
#################################################
# release dynamic library
!IF "$(CFG)" == "release-dll"
-LINKLIBS = libcurl_imp.lib
-LINKLIBS_DEBUG = libcurld_imp.lib
+LINKLIBS = $(LIBCURL_IMP_LIB_REL)
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG)
!ENDIF
#################################################
@@ -138,8 +250,8 @@ LINKLIBS_DEBUG = libcurld_imp.lib
!IF "$(CFG)" == "release-zlib"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(ZLIB_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)
+LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
@@ -148,8 +260,8 @@ LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!IF "$(CFG)" == "release-ssl"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)
+LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS)
!ENDIF
@@ -158,8 +270,8 @@ LFLAGS = $(LFLAGS) $(SSL_LFLAGS)
!IF "$(CFG)" == "release-dll-ssl-dll"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS)
+LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
!ENDIF
@@ -168,18 +280,28 @@ LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
!IF "$(CFG)" == "release-ssl-zlib"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS) $(ZLIB_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_LIBS)
+LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
#################################################
+# release static library with winssl and zlib
+
+!IF "$(CFG)" == "release-winssl-zlib"
+CFLAGS = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
+LINKLIBS = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS)
+LFLAGS = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS)
+!ENDIF
+
+#################################################
# release static library with dynamic ssl
!IF "$(CFG)" == "release-ssl-dll"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)
+LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
!ENDIF
@@ -188,8 +310,8 @@ LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
!IF "$(CFG)" == "release-zlib-dll"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_IMP_LIBS)
+LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
@@ -198,8 +320,8 @@ LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!IF "$(CFG)" == "release-dll-zlib-dll"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(ZLIB_IMP_LIBS)
+LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
@@ -208,8 +330,8 @@ LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
+LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
@@ -218,14 +340,13 @@ LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
+LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
-
-LINKLIBS = $(LINKLIBS) ws2_32.lib wldap32.lib
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib
+LINKLIBS = $(LINKLIBS) $(WINLIBS)
+LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(WINLIBS)
all : release
@@ -238,54 +359,178 @@ debug: $(DEBUG_OBJS)
$(MANIFESTTOOL)
## Release
-hugehelpr.obj: hugehelp.c
- $(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
-writeoutr.obj: writeout.c
- $(CCR) $(CFLAGS) /Fo"$@" writeout.c
-urlglobr.obj: urlglob.c
- $(CCR) $(CFLAGS) /Fo"$@" urlglob.c
-getpassr.obj: getpass.c
- $(CCR) $(CFLAGS) /Fo"$@" getpass.c
-homedirr.obj: homedir.c
- $(CCR) $(CFLAGS) /Fo"$@" homedir.c
-curlutilr.obj: curlutil.c
- $(CCR) $(CFLAGS) /Fo"$@" curlutil.c
-os-specificr.obj: os-specific.c
- $(CCR) $(CFLAGS) /Fo"$@" os-specific.c
nonblockr.obj: ../lib/nonblock.c
$(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
rawstrr.obj: ../lib/rawstr.c
$(CCR) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
strtoofftr.obj: ../lib/strtoofft.c
$(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
-mainr.obj: main.c
- $(CCR) $(CFLAGS) /Fo"$@" main.c
+warnless.obj: ../lib/warnless.c
+ $(CCR) $(CFLAGS) /Fo"$@" ../lib/warnless.c
+tool_binmoder.obj: tool_binmode.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c
+tool_bnamer.obj: tool_bname.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c
+tool_cb_dbgr.obj: tool_cb_dbg.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c
+tool_cb_hdrr.obj: tool_cb_hdr.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c
+tool_cb_prgr.obj: tool_cb_prg.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c
+tool_cb_rear.obj: tool_cb_rea.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c
+tool_cb_seer.obj: tool_cb_see.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c
+tool_cb_wrtr.obj: tool_cb_wrt.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c
+tool_cfgabler.obj: tool_cfgable.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c
+tool_convertr.obj: tool_convert.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c
+tool_dirhier.obj: tool_dirhie.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c
+tool_doswinr.obj: tool_doswin.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c
+tool_easysrcr.obj: tool_easysrc.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c
+tool_formparser.obj: tool_formparse.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c
+tool_getparamr.obj: tool_getparam.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c
+tool_getpassr.obj: tool_getpass.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c
+tool_helpr.obj: tool_help.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_help.c
+tool_helpersr.obj: tool_helpers.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c
+tool_homedirr.obj: tool_homedir.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c
+tool_hugehelpr.obj: tool_hugehelp.c
+ $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c
+tool_libinfor.obj: tool_libinfo.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c
+tool_mainr.obj: tool_main.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_main.c
+tool_metalinkr.obj: tool_metalink.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c
+tool_mfilesr.obj: tool_mfiles.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c
+tool_msgsr.obj: tool_msgs.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c
+tool_operater.obj: tool_operate.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c
+tool_operhlpr.obj: tool_operhlp.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c
+tool_panykeyr.obj: tool_panykey.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c
+tool_paramhlpr.obj: tool_paramhlp.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c
+tool_parsecfgr.obj: tool_parsecfg.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c
+tool_setoptr.obj: tool_setopt.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c
+tool_sleepr.obj: tool_sleep.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c
+tool_urlglobr.obj: tool_urlglob.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c
+tool_utilr.obj: tool_util.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_util.c
+tool_vmsr.obj: tool_vms.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c
+tool_writeenvr.obj: tool_writeenv.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c
+tool_writeoutr.obj: tool_writeout.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c
+tool_xattrr.obj: tool_xattr.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c
curlr.res : curl.rc
$(RCR) $(RESFLAGS) /Fo"$@" curl.rc
## Debug
-hugehelpd.obj: hugehelp.c
- $(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
-writeoutd.obj: writeout.c
- $(CCD) $(CFLAGS) /Fo"$@" writeout.c
-urlglobd.obj: urlglob.c
- $(CCD) $(CFLAGS) /Fo"$@" urlglob.c
-getpassd.obj: getpass.c
- $(CCD) $(CFLAGS) /Fo"$@" getpass.c
-homedird.obj: homedir.c
- $(CCD) $(CFLAGS) /Fo"$@" homedir.c
-curlutild.obj: curlutil.c
- $(CCD) $(CFLAGS) /Fo"$@" curlutil.c
-os-specificd.obj: os-specific.c
- $(CCD) $(CFLAGS) /Fo"$@" os-specific.c
nonblockd.obj: ../lib/nonblock.c
$(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
rawstrd.obj: ../lib/rawstr.c
$(CCD) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
strtoofftd.obj: ../lib/strtoofft.c
$(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
-maind.obj: main.c
- $(CCD) $(CFLAGS) /Fo"$@" main.c
+warnlessd.obj: ../lib/warnless.c
+ $(CCD) $(CFLAGS) /Fo"$@" ../lib/warnless.c
+tool_binmoded.obj: tool_binmode.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c
+tool_bnamed.obj: tool_bname.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c
+tool_cb_dbgd.obj: tool_cb_dbg.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c
+tool_cb_hdrd.obj: tool_cb_hdr.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c
+tool_cb_prgd.obj: tool_cb_prg.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c
+tool_cb_read.obj: tool_cb_rea.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c
+tool_cb_seed.obj: tool_cb_see.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c
+tool_cb_wrtd.obj: tool_cb_wrt.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c
+tool_cfgabled.obj: tool_cfgable.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c
+tool_convertd.obj: tool_convert.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c
+tool_dirhied.obj: tool_dirhie.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c
+tool_doswind.obj: tool_doswin.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c
+tool_easysrcd.obj: tool_easysrc.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c
+tool_formparsed.obj: tool_formparse.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c
+tool_getparamd.obj: tool_getparam.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c
+tool_getpassd.obj: tool_getpass.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c
+tool_helpd.obj: tool_help.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_help.c
+tool_helpersd.obj: tool_helpers.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c
+tool_homedird.obj: tool_homedir.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c
+tool_hugehelpd.obj: tool_hugehelp.c
+ $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c
+tool_libinfod.obj: tool_libinfo.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c
+tool_maind.obj: tool_main.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_main.c
+tool_metalinkd.obj: tool_metalink.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c
+tool_mfilesd.obj: tool_mfiles.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c
+tool_msgsd.obj: tool_msgs.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c
+tool_operated.obj: tool_operate.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c
+tool_operhlpd.obj: tool_operhlp.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c
+tool_panykeyd.obj: tool_panykey.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c
+tool_paramhlpd.obj: tool_paramhlp.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c
+tool_parsecfgd.obj: tool_parsecfg.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c
+tool_setoptd.obj: tool_setopt.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c
+tool_sleepd.obj: tool_sleep.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c
+tool_urlglobd.obj: tool_urlglob.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c
+tool_utild.obj: tool_util.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_util.c
+tool_vmsd.obj: tool_vms.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c
+tool_writeenvd.obj: tool_writeenv.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c
+tool_writeoutd.obj: tool_writeout.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c
+tool_xattrd.obj: tool_xattr.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c
curld.res : curl.rc
$(RCD) $(RESFLAGS) /Fo"$@" curl.rc
diff --git a/src/Makefile.vc8 b/src/Makefile.vc8
deleted file mode 100644
index ffcb05f4..00000000
--- a/src/Makefile.vc8
+++ /dev/null
@@ -1,299 +0,0 @@
-#############################################################
-#
-## Makefile for building curl.exe with MSVC8
-## Use: nmake -f makefile.vc6 [release | debug] [CFG=release-ssl]
-## (default is release)
-## "nmake -f makefile.vc6 CFG=release-ssl" statically links OpenSSL
-## into curl.exe producing a standalone SSL-enabled executable.
-##
-## Comments to: Troy Engel <tengel@sonic.net>
-## Updated by: Craig Davison <cd@securityfocus.com>
-## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>
-#
-#############################################################
-
-PROGRAM_NAME = curl.exe
-
-!IFNDEF OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8o
-!ENDIF
-
-!IFNDEF ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
-!ENDIF
-
-!IFNDEF MACHINE
-MACHINE = X86
-!ENDIF
-
-# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication
-# without an openssl installation and offers the ability to authenticate
-# using the "current logged in user". Since at least with MSVC8 the sspi.h
-# header is broken it is either required to install the Windows SDK,
-# or to fix sspi.h with adding this define at the beginning of sspi.h:
-# #define FreeCredentialHandle FreeCredentialsHandle
-#
-# If, for some reason the Windows SDK is installed but not installed
-# in the default location, you can specify WINDOWS_SDK_PATH.
-# It can be downloaded from:
-# http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
-
-# WINDOWS_SSPI = 1
-
-!IFDEF WINDOWS_SSPI
-!IFNDEF WINDOWS_SDK_PATH
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
-!ENDIF
-!ENDIF
-
-########################################################
-## Nothing more to do below this line!
-ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
-ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)"
-ZLIB_LIBS = zlib.lib
-ZLIB_IMP_LIBS = zdll.lib
-
-SSL_CFLAGS = /DUSE_SSLEAY
-SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32"
-SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"
-SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib
-
-# Runtime library configuration
-RTLIB = /MD
-RTLIBD = /MDd
-
-!IF "$(RTLIBCFG)" == "static"
-RTLIB = /MT
-RTLIBD = /MTd
-!ENDIF
-
-## Release
-CCR = cl.exe $(RTLIB) /O2 /DNDEBUG
-LINKR = link.exe /incremental:no /libpath:"../lib"
-RCR = rc.exe /dDEBUGBUILD=0
-
-## Debug
-CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1
-LINKD = link.exe /incremental:yes /debug /libpath:"../lib"
-RCD = rc.exe /dDEBUGBUILD=1
-
-CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c
-LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)
-RESFLAGS = /i../include
-
-# This manifest thing is for VC8, enabled by the maketgz script that
-# builds the VC8 version of this makefile. Left commented out in the VC8
-# version!
-#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1
-
-!IFDEF WINDOWS_SSPI
-CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
-!ENDIF
-
-RELEASE_OBJS= \
- hugehelpr.obj \
- writeoutr.obj \
- urlglobr.obj \
- getpassr.obj \
- homedirr.obj \
- curlutilr.obj \
- os-specificr.obj \
- nonblockr.obj \
- rawstrr.obj \
- strtoofftr.obj \
- mainr.obj \
- curlr.res
-
-DEBUG_OBJS= \
- hugehelpd.obj \
- writeoutd.obj \
- urlglobd.obj \
- getpassd.obj \
- homedird.obj \
- curlutild.obj \
- os-specificd.obj \
- nonblockd.obj \
- rawstrd.obj \
- strtoofftd.obj \
- maind.obj \
- curld.res
-
-#################################################
-# If CFG not specified, use static libs
-
-CFLAGS = $(CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib
-LINKLIBS_DEBUG = libcurld.lib
-
-#################################################
-# release dynamic library
-
-!IF "$(CFG)" == "release-dll"
-LINKLIBS = libcurl_imp.lib
-LINKLIBS_DEBUG = libcurld_imp.lib
-!ENDIF
-
-#################################################
-# release static library with zlib
-
-!IF "$(CFG)" == "release-zlib"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(ZLIB_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with ssl
-
-!IF "$(CFG)" == "release-ssl"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_LFLAGS)
-!ENDIF
-
-#################################################
-# release dynamic library with dynamic ssl
-
-!IF "$(CFG)" == "release-dll-ssl-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with ssl and zlib
-
-!IF "$(CFG)" == "release-ssl-zlib"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS) $(ZLIB_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with dynamic ssl
-
-!IF "$(CFG)" == "release-ssl-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with dynamic zlib
-
-!IF "$(CFG)" == "release-zlib-dll"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release dynamic library with dynamic zlib
-
-!IF "$(CFG)" == "release-dll-zlib-dll"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with dynamic ssl and dynamic zlib
-
-!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release dynamic library with dynamic ssl and dynamic zlib
-
-!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-
-LINKLIBS = $(LINKLIBS) ws2_32.lib bufferoverflowu.lib wldap32.lib
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib bufferoverflowu.lib wldap32.lib
-
-all : release
-
-release: $(RELEASE_OBJS)
- $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS)
- $(MANIFESTTOOL)
-
-debug: $(DEBUG_OBJS)
- $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS)
- $(MANIFESTTOOL)
-
-## Release
-hugehelpr.obj: hugehelp.c
- $(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
-writeoutr.obj: writeout.c
- $(CCR) $(CFLAGS) /Fo"$@" writeout.c
-urlglobr.obj: urlglob.c
- $(CCR) $(CFLAGS) /Fo"$@" urlglob.c
-getpassr.obj: getpass.c
- $(CCR) $(CFLAGS) /Fo"$@" getpass.c
-homedirr.obj: homedir.c
- $(CCR) $(CFLAGS) /Fo"$@" homedir.c
-curlutilr.obj: curlutil.c
- $(CCR) $(CFLAGS) /Fo"$@" curlutil.c
-os-specificr.obj: os-specific.c
- $(CCR) $(CFLAGS) /Fo"$@" os-specific.c
-nonblockr.obj: ../lib/nonblock.c
- $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
-rawstrr.obj: ../lib/rawstr.c
- $(CCR) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
-strtoofftr.obj: ../lib/strtoofft.c
- $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
-mainr.obj: main.c
- $(CCR) $(CFLAGS) /Fo"$@" main.c
-curlr.res : curl.rc
- $(RCR) $(RESFLAGS) /Fo"$@" curl.rc
-
-## Debug
-hugehelpd.obj: hugehelp.c
- $(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
-writeoutd.obj: writeout.c
- $(CCD) $(CFLAGS) /Fo"$@" writeout.c
-urlglobd.obj: urlglob.c
- $(CCD) $(CFLAGS) /Fo"$@" urlglob.c
-getpassd.obj: getpass.c
- $(CCD) $(CFLAGS) /Fo"$@" getpass.c
-homedird.obj: homedir.c
- $(CCD) $(CFLAGS) /Fo"$@" homedir.c
-curlutild.obj: curlutil.c
- $(CCD) $(CFLAGS) /Fo"$@" curlutil.c
-os-specificd.obj: os-specific.c
- $(CCD) $(CFLAGS) /Fo"$@" os-specific.c
-nonblockd.obj: ../lib/nonblock.c
- $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
-rawstrd.obj: ../lib/rawstr.c
- $(CCD) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
-strtoofftd.obj: ../lib/strtoofft.c
- $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
-maind.obj: main.c
- $(CCD) $(CFLAGS) /Fo"$@" main.c
-curld.res : curl.rc
- $(RCD) $(RESFLAGS) /Fo"$@" curl.rc
-
-clean:
- @-erase $(PROGRAM_NAME) 2> NUL
- @-erase $(RELEASE_OBJS) 2> NUL
- @-erase $(DEBUG_OBJS) 2> NUL
- @-erase *.idb 2> NUL
- @-erase *.pdb 2> NUL
- @-erase *.pch 2> NUL
- @-erase *.ilk 2> NUL
diff --git a/src/Makefile.vc9 b/src/Makefile.vc9
deleted file mode 100644
index 5dd44f89..00000000
--- a/src/Makefile.vc9
+++ /dev/null
@@ -1,299 +0,0 @@
-#############################################################
-#
-## Makefile for building curl.exe with MSVC9
-## Use: nmake -f makefile.vc9 [release | debug] [CFG=release-ssl]
-## (default is release)
-## "nmake -f makefile.vc9 CFG=release-ssl" statically links OpenSSL
-## into curl.exe producing a standalone SSL-enabled executable.
-##
-## Comments to: Troy Engel <tengel@sonic.net>
-## Updated by: Craig Davison <cd@securityfocus.com>
-## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>
-#
-#############################################################
-
-PROGRAM_NAME = curl.exe
-
-!IFNDEF OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8o
-!ENDIF
-
-!IFNDEF ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
-!ENDIF
-
-!IFNDEF MACHINE
-MACHINE = X86
-!ENDIF
-
-# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication
-# without an openssl installation and offers the ability to authenticate
-# using the "current logged in user". Since at least with MSVC9 the sspi.h
-# header is broken it is either required to install the Windows SDK,
-# or to fix sspi.h with adding this define at the beginning of sspi.h:
-# #define FreeCredentialHandle FreeCredentialsHandle
-#
-# If, for some reason the Windows SDK is installed but not installed
-# in the default location, you can specify WINDOWS_SDK_PATH.
-# It can be downloaded from:
-# http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
-
-# WINDOWS_SSPI = 1
-
-!IFDEF WINDOWS_SSPI
-!IFNDEF WINDOWS_SDK_PATH
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
-!ENDIF
-!ENDIF
-
-########################################################
-## Nothing more to do below this line!
-ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
-ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)"
-ZLIB_LIBS = zlib.lib
-ZLIB_IMP_LIBS = zdll.lib
-
-SSL_CFLAGS = /DUSE_SSLEAY
-SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32"
-SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"
-SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib
-
-# Runtime library configuration
-RTLIB = /MD
-RTLIBD = /MDd
-
-!IF "$(RTLIBCFG)" == "static"
-RTLIB = /MT
-RTLIBD = /MTd
-!ENDIF
-
-## Release
-CCR = cl.exe $(RTLIB) /O2 /DNDEBUG
-LINKR = link.exe /incremental:no /libpath:"../lib"
-RCR = rc.exe /dDEBUGBUILD=0
-
-## Debug
-CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1
-LINKD = link.exe /incremental:yes /debug /libpath:"../lib"
-RCD = rc.exe /dDEBUGBUILD=1
-
-CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c
-LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)
-RESFLAGS = /i../include
-
-# This manifest thing is for VC8, enabled by the maketgz script that
-# builds the VC8 version of this makefile. Left commented out in the VC9
-# version!
-#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1
-
-!IFDEF WINDOWS_SSPI
-CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
-!ENDIF
-
-RELEASE_OBJS= \
- hugehelpr.obj \
- writeoutr.obj \
- urlglobr.obj \
- getpassr.obj \
- homedirr.obj \
- curlutilr.obj \
- os-specificr.obj \
- nonblockr.obj \
- rawstrr.obj \
- strtoofftr.obj \
- mainr.obj \
- curlr.res
-
-DEBUG_OBJS= \
- hugehelpd.obj \
- writeoutd.obj \
- urlglobd.obj \
- getpassd.obj \
- homedird.obj \
- curlutild.obj \
- os-specificd.obj \
- nonblockd.obj \
- rawstrd.obj \
- strtoofftd.obj \
- maind.obj \
- curld.res
-
-#################################################
-# If CFG not specified, use static libs
-
-CFLAGS = $(CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib
-LINKLIBS_DEBUG = libcurld.lib
-
-#################################################
-# release dynamic library
-
-!IF "$(CFG)" == "release-dll"
-LINKLIBS = libcurl_imp.lib
-LINKLIBS_DEBUG = libcurld_imp.lib
-!ENDIF
-
-#################################################
-# release static library with zlib
-
-!IF "$(CFG)" == "release-zlib"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(ZLIB_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with ssl
-
-!IF "$(CFG)" == "release-ssl"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_LFLAGS)
-!ENDIF
-
-#################################################
-# release dynamic library with dynamic ssl
-
-!IF "$(CFG)" == "release-dll-ssl-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with ssl and zlib
-
-!IF "$(CFG)" == "release-ssl-zlib"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS) $(ZLIB_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with dynamic ssl
-
-!IF "$(CFG)" == "release-ssl-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with dynamic zlib
-
-!IF "$(CFG)" == "release-zlib-dll"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release dynamic library with dynamic zlib
-
-!IF "$(CFG)" == "release-dll-zlib-dll"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release static library with dynamic ssl and dynamic zlib
-
-!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
-LINKLIBS = libcurl.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-#################################################
-# release dynamic library with dynamic ssl and dynamic zlib
-
-!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS)
-LINKLIBS = libcurl_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)
-LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
-!ENDIF
-
-
-LINKLIBS = $(LINKLIBS) ws2_32.lib wldap32.lib
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib
-
-all : release
-
-release: $(RELEASE_OBJS)
- $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS)
- $(MANIFESTTOOL)
-
-debug: $(DEBUG_OBJS)
- $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS)
- $(MANIFESTTOOL)
-
-## Release
-hugehelpr.obj: hugehelp.c
- $(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
-writeoutr.obj: writeout.c
- $(CCR) $(CFLAGS) /Fo"$@" writeout.c
-urlglobr.obj: urlglob.c
- $(CCR) $(CFLAGS) /Fo"$@" urlglob.c
-getpassr.obj: getpass.c
- $(CCR) $(CFLAGS) /Fo"$@" getpass.c
-homedirr.obj: homedir.c
- $(CCR) $(CFLAGS) /Fo"$@" homedir.c
-curlutilr.obj: curlutil.c
- $(CCR) $(CFLAGS) /Fo"$@" curlutil.c
-os-specificr.obj: os-specific.c
- $(CCR) $(CFLAGS) /Fo"$@" os-specific.c
-nonblockr.obj: ../lib/nonblock.c
- $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
-rawstrr.obj: ../lib/rawstr.c
- $(CCR) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
-strtoofftr.obj: ../lib/strtoofft.c
- $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
-mainr.obj: main.c
- $(CCR) $(CFLAGS) /Fo"$@" main.c
-curlr.res : curl.rc
- $(RCR) $(RESFLAGS) /Fo"$@" curl.rc
-
-## Debug
-hugehelpd.obj: hugehelp.c
- $(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
-writeoutd.obj: writeout.c
- $(CCD) $(CFLAGS) /Fo"$@" writeout.c
-urlglobd.obj: urlglob.c
- $(CCD) $(CFLAGS) /Fo"$@" urlglob.c
-getpassd.obj: getpass.c
- $(CCD) $(CFLAGS) /Fo"$@" getpass.c
-homedird.obj: homedir.c
- $(CCD) $(CFLAGS) /Fo"$@" homedir.c
-curlutild.obj: curlutil.c
- $(CCD) $(CFLAGS) /Fo"$@" curlutil.c
-os-specificd.obj: os-specific.c
- $(CCD) $(CFLAGS) /Fo"$@" os-specific.c
-nonblockd.obj: ../lib/nonblock.c
- $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
-rawstrd.obj: ../lib/rawstr.c
- $(CCD) $(CFLAGS) /Fo"$@" ../lib/rawstr.c
-strtoofftd.obj: ../lib/strtoofft.c
- $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c
-maind.obj: main.c
- $(CCD) $(CFLAGS) /Fo"$@" main.c
-curld.res : curl.rc
- $(RCD) $(RESFLAGS) /Fo"$@" curl.rc
-
-clean:
- @-erase $(PROGRAM_NAME) 2> NUL
- @-erase $(RELEASE_OBJS) 2> NUL
- @-erase $(DEBUG_OBJS) 2> NUL
- @-erase *.idb 2> NUL
- @-erase *.pdb 2> NUL
- @-erase *.pch 2> NUL
- @-erase *.ilk 2> NUL
diff --git a/src/checksrc.whitelist b/src/checksrc.whitelist
new file mode 100644
index 00000000..b078ac1a
--- /dev/null
+++ b/src/checksrc.whitelist
@@ -0,0 +1,3 @@
+ * 'name=@filename,filename2,filename3'
+ * 'name=@filename;type=image/gif,filename2,filename3'
+ file = fopen(name, "r"); /* VMS */
diff --git a/src/config-amigaos.h b/src/config-amigaos.h
deleted file mode 100644
index fba875da..00000000
--- a/src/config-amigaos.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef CURL_CONFIG_AMIGAOS_H
-#define CURL_CONFIG_AMIGAOS_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-#ifdef __AMIGA__ /* Any AmigaOS flavour */
-
-/* Define to 1 if you want the built-in manual */
-#define USE_MANUAL 1
-
-#define OS "AmigaOS"
-
-#define HAVE_CLOSESOCKET_CAMEL 1
-#define HAVE_UNISTD_H 1
-#define HAVE_STRDUP 1
-#define HAVE_UTIME 1
-#define HAVE_UTIME_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_SOCKET_H 1
-#define HAVE_WRITABLE_ARGV 1
-#define HAVE_SYS_TIME_H 1
-#define HAVE_TIME_H 1
-#define TIME_WITH_SYS_TIME 1
-#define HAVE_STRUCT_TIMEVAL 1
-
-#if 0
-# define HAVE_TERMIOS_H 1
-# define HAVE_FTRUNCATE 1
-#endif
-
-#define HAVE_PWD_H 1
-
-#ifndef F_OK
-# define F_OK 0
-#endif
-#ifndef O_RDONLY
-# define O_RDONLY 0x0000 /* open for reading only */
-#endif
-#ifndef LONG_MAX
-# define LONG_MAX 0x7fffffffL /* max value for a long */
-#endif
-#ifndef LONG_MIN
-# define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
-#endif
-
-#define SIZEOF_INT 4
-#define SIZEOF_SHORT 2
-
-#endif /* __AMIGA__ */
-#endif /* CURL_CONFIG_AMIGAOS_H */
diff --git a/src/config-mac.h b/src/config-mac.h
deleted file mode 100644
index dc7f767a..00000000
--- a/src/config-mac.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef __SRC_CONFIG_MAC_H
-#define __SRC_CONFIG_MAC_H
-
-/* =================================================================== */
-/* src/config-mac.h - Hand crafted config file for Mac OS 9 */
-/* =================================================================== */
-/* On Mac OS X you must run configure to generate curl_config.h file */
-/* =================================================================== */
-
-/* Define to 1 if you want the built-in manual */
-#define USE_MANUAL 1
-
-#define HAVE_UNISTD_H 1
-#define HAVE_FCNTL_H 1
-#define HAVE_UTIME_H 1
-#define HAVE_SYS_UTIME_H 1
-
-#define HAVE_SETVBUF 1
-#define HAVE_UTIME 1
-#define HAVE_FTRUNCATE 1
-
-#define HAVE_TIME_H 1
-#define HAVE_SYS_TIME_H 1
-#define TIME_WITH_SYS_TIME 1
-#define HAVE_STRUCT_TIMEVAL 1
-
-#define SIZEOF_INT 4
-#define SIZEOF_SHORT 2
-
-#define main(x,y) curl_main(x,y)
-
-/* we provide our own strdup prototype */
-char *strdup(char *s1);
-
-#endif /* __SRC_CONFIG_MAC_H */
diff --git a/src/config-riscos.h b/src/config-riscos.h
deleted file mode 100644
index ba95f13d..00000000
--- a/src/config-riscos.h
+++ /dev/null
@@ -1,379 +0,0 @@
-/* curl_config.h.in. Generated automatically from configure.in by autoheader. */
-/* Name of this package! */
-#undef PACKAGE
-
-/* Version number of this archive. */
-#undef VERSION
-
-/* Define if you have the getpass function. */
-#undef HAVE_GETPASS
-
-/* Define cpu-machine-OS */
-#define OS "ARM-RISC OS"
-
-/* Define to 1 if you want the built-in manual */
-#define USE_MANUAL 1
-
-/* Define if you have the gethostbyaddr_r() function with 5 arguments */
-#undef HAVE_GETHOSTBYADDR_R_5
-
-/* Define if you have the gethostbyaddr_r() function with 7 arguments */
-#undef HAVE_GETHOSTBYADDR_R_7
-
-/* Define if you have the gethostbyaddr_r() function with 8 arguments */
-#undef HAVE_GETHOSTBYADDR_R_8
-
-/* Define if you have the gethostbyname_r() function with 3 arguments */
-#undef HAVE_GETHOSTBYNAME_R_3
-
-/* Define if you have the gethostbyname_r() function with 5 arguments */
-#undef HAVE_GETHOSTBYNAME_R_5
-
-/* Define if you have the gethostbyname_r() function with 6 arguments */
-#undef HAVE_GETHOSTBYNAME_R_6
-
-/* Define if you need the _REENTRANT define for some functions */
-#undef NEED_REENTRANT
-
-/* Define if you have the Kerberos4 libraries (including -ldes) */
-#undef HAVE_KRB4
-
-/* Define if you want to enable IPv6 support */
-#undef ENABLE_IPV6
-
-/* Define if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
-
-/* Define this to 'int' if ssize_t is not an available typedefed type */
-#undef ssize_t
-
-/* Define this as a suitable file to read random data from */
-#undef RANDOM_FILE
-
-/* Define this to your Entropy Gathering Daemon socket pathname */
-#undef EGD_SOCKET
-
-/* Define if you want to enable IPv6 support */
-#undef ENABLE_IPV6
-
-/* Define if you have the <alloca.h> header file. */
-#define HAVE_ALLOCA_H
-
-/* Define if you have the <arpa/inet.h> header file. */
-#define HAVE_ARPA_INET_H
-
-/* Define if you have the `closesocket' function. */
-#undef HAVE_CLOSESOCKET
-
-/* Define if you have the <crypto.h> header file. */
-#undef HAVE_CRYPTO_H
-
-/* Define if you have the <des.h> header file. */
-#undef HAVE_DES_H
-
-/* Define if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H
-
-/* Define if you have the `ftruncate' function. */
-#define HAVE_FTRUNCATE
-
-/* Define if getaddrinfo exists and works */
-#define HAVE_GETADDRINFO
-
-/* Define if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
-/* Define if you have the `gethostbyaddr' function. */
-#define HAVE_GETHOSTBYADDR
-
-/* Define if you have the `gethostbyaddr_r' function. */
-#undef HAVE_GETHOSTBYADDR_R
-
-/* Define if you have the `gethostbyname_r' function. */
-#undef HAVE_GETHOSTBYNAME_R
-
-/* Define if you have the `gethostname' function. */
-#define HAVE_GETHOSTNAME
-
-/* Define if you have the <getopt.h> header file. */
-#define HAVE_GETOPT_H
-
-/* Define if you have the `getpass_r' function. */
-#undef HAVE_GETPASS_R
-
-/* Define if you have the `getpwuid' function. */
-#undef HAVE_GETPWUID
-
-/* Define if you have the `getservbyname' function. */
-#undef HAVE_GETSERVBYNAME
-
-/* Define if you have the `gettimeofday' function. */
-#define HAVE_GETTIMEOFDAY
-
-/* Define if you have the `timeval' struct. */
-#define HAVE_STRUCT_TIMEVAL
-
-/* Define if you have the `inet_addr' function. */
-#undef HAVE_INET_ADDR
-
-/* Define if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H
-
-/* Define if you have the <io.h> header file. */
-#undef HAVE_IO_H
-
-/* Define if you have the `krb_get_our_ip_for_realm' function. */
-#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
-
-/* Define if you have the <krb.h> header file. */
-#undef HAVE_KRB_H
-
-/* Define if you have the `crypto' library (-lcrypto). */
-#undef HAVE_LIBCRYPTO
-
-/* Define if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
-/* Define if you have the `resolv' library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define if you have the `resolve' library (-lresolve). */
-#undef HAVE_LIBRESOLVE
-
-/* Define if you have the `socket' library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
-/* Define if you have the `ssl' library (-lssl). */
-#undef HAVE_LIBSSL
-
-/* Define if you have the `ucb' library (-lucb). */
-#undef HAVE_LIBUCB
-
-/* Define if you have the `localtime_r' function. */
-#undef HAVE_LOCALTIME_R
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H
-
-/* Define to 1 if you need the malloc.h header file even with stdlib.h */
-/* #define NEED_MALLOC_H 1 */
-
-/* Define if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define if you have the <netdb.h> header file. */
-#define HAVE_NETDB_H
-
-/* Define if you have the <netinet/if_ether.h> header file. */
-#undef HAVE_NETINET_IF_ETHER_H
-
-/* Define if you have the <netinet/in.h> header file. */
-#define HAVE_NETINET_IN_H
-
-/* Define if you have the <net/if.h> header file. */
-#define HAVE_NET_IF_H
-
-/* Define if you have the <openssl/crypto.h> header file. */
-#undef HAVE_OPENSSL_CRYPTO_H
-
-/* Define if you have the <openssl/err.h> header file. */
-#undef HAVE_OPENSSL_ERR_H
-
-/* Define if you have the <openssl/pem.h> header file. */
-#undef HAVE_OPENSSL_PEM_H
-
-/* Define if you have the <openssl/rsa.h> header file. */
-#undef HAVE_OPENSSL_RSA_H
-
-/* Define if you have the <openssl/ssl.h> header file. */
-#undef HAVE_OPENSSL_SSL_H
-
-/* Define if you have the <openssl/x509.h> header file. */
-#undef HAVE_OPENSSL_X509_H
-
-/* Define if you have the <pem.h> header file. */
-#undef HAVE_PEM_H
-
-/* Define if you have the `perror' function. */
-#undef HAVE_PERROR
-
-/* Define if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H
-
-/* Define if you have the `RAND_egd' function. */
-#undef HAVE_RAND_EGD
-
-/* Define if you have the `RAND_screen' function. */
-#undef HAVE_RAND_SCREEN
-
-/* Define if you have the `RAND_status' function. */
-#undef HAVE_RAND_STATUS
-
-/* Define if you have the <rsa.h> header file. */
-#undef HAVE_RSA_H
-
-/* Define if you have the `select' function. */
-#define HAVE_SELECT
-
-/* Define if you have the `setvbuf' function. */
-#undef HAVE_SETVBUF
-
-/* Define if you have the <sgtty.h> header file. */
-#define HAVE_SGTTY_H
-
-/* Define if you have the `sigaction' function. */
-#undef HAVE_SIGACTION
-
-/* Define if you have the `signal' function. */
-#define HAVE_SIGNAL
-
-/* Define if you have the `socket' function. */
-#define HAVE_SOCKET
-
-/* Define if you have the <ssl.h> header file. */
-#undef HAVE_SSL_H
-
-/* Define if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H
-
-/* Define if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the `strcmpi' function. */
-#undef HAVE_STRCMPI
-
-/* Define if you have the `strdup' function. */
-#define HAVE_STRDUP
-
-/* Define if you have the `strftime' function. */
-#define HAVE_STRFTIME
-
-/* Define if you have the `stricmp' function. */
-#define HAVE_STRICMP
-
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H
-
-/* Define if you have the `strlcat' function. */
-#undef HAVE_STRLCAT
-
-/* Define if you have the `strlcpy' function. */
-#undef HAVE_STRLCPY
-
-/* Define if you have the `strstr' function. */
-#define HAVE_STRSTR
-
-/* Define if you have the `strtok_r' function. */
-#undef HAVE_STRTOK_R
-
-/* Define if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define if you have the <sys/socket.h> header file. */
-#define HAVE_SYS_SOCKET_H
-
-/* Define if you have the <sys/sockio.h> header file. */
-#undef HAVE_SYS_SOCKIO_H
-
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H
-
-/* Define if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H
-
-/* Define if you have the `tcgetattr' function. */
-#define HAVE_TCGETATTR
-
-/* Define if you have the `tcsetattr' function. */
-#define HAVE_TCSETATTR
-
-/* Define if you have the <termios.h> header file. */
-#define HAVE_TERMIOS_H
-
-/* Define if you have the <termio.h> header file. */
-#undef HAVE_TERMIO_H
-
-/* Define if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define if you have the `uname' function. */
-#define HAVE_UNAME
-
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H
-
-/* Define if you have the <winsock.h> header file. */
-#undef HAVE_WINSOCK_H
-
-/* Define if you have the <x509.h> header file. */
-#undef HAVE_X509_H
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long double', as computed by sizeof. */
-#undef SIZEOF_LONG_DOUBLE
-
-/* The size of `long long', as computed by sizeof. */
-#undef SIZEOF_LONG_LONG
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Version number of package */
-#undef VERSION
-
-/* Define if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef ssize_t
-
-/* Define if you have the ioctl function. */
-#define HAVE_IOCTL
-
-/* Define if you have a working ioctl FIONBIO function. */
-#define HAVE_IOCTL_FIONBIO
diff --git a/src/config-win32.h b/src/config-win32.h
deleted file mode 100644
index 10a5eaf1..00000000
--- a/src/config-win32.h
+++ /dev/null
@@ -1,416 +0,0 @@
-#ifndef __SRC_CONFIG_WIN32_H
-#define __SRC_CONFIG_WIN32_H
-
-/* ================================================================ */
-/* src/config-win32.h - Hand crafted config file for windows */
-/* ================================================================ */
-
-/* ---------------------------------------------------------------- */
-/* HEADER FILES */
-/* ---------------------------------------------------------------- */
-
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <io.h> header file. */
-#define HAVE_IO_H 1
-
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define if you need the malloc.h header file even with stdlib.h */
-#if !defined(__SALFORDC__) && !defined(__POCC__)
-#define NEED_MALLOC_H 1
-#endif
-
-/* Define if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H 1
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <sys/time.h> header file */
-/* #define HAVE_SYS_TIME_H 1 */
-
-/* Define if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if you have the <sys/utime.h> header file. */
-#ifndef __BORLANDC__
-#define HAVE_SYS_UTIME_H 1
-#endif
-
-/* Define if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
-/* Define if you have the <unistd.h> header file. */
-#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
- defined(__POCC__)
-#define HAVE_UNISTD_H 1
-#endif
-
-/* Define if you have the <windows.h> header file. */
-#define HAVE_WINDOWS_H 1
-
-/* Define if you have the <winsock.h> header file. */
-#define HAVE_WINSOCK_H 1
-
-/* Define if you have the <winsock2.h> header file. */
-#ifndef __SALFORDC__
-#define HAVE_WINSOCK2_H 1
-#endif
-
-/* Define if you have the <ws2tcpip.h> header file. */
-#ifndef __SALFORDC__
-#define HAVE_WS2TCPIP_H 1
-#endif
-
-/* ---------------------------------------------------------------- */
-/* OTHER HEADER INFO */
-/* ---------------------------------------------------------------- */
-
-/* Define if sig_atomic_t is an available typedef. */
-#define HAVE_SIG_ATOMIC_T 1
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-/* #define TIME_WITH_SYS_TIME 1 */
-
-/* ---------------------------------------------------------------- */
-/* FUNCTIONS */
-/* ---------------------------------------------------------------- */
-
-/* Define if you have the ftruncate function. */
-#define HAVE_FTRUNCATE 1
-
-/* Define if you have the ioctlsocket function. */
-#define HAVE_IOCTLSOCKET 1
-
-/* Define if you have a working ioctlsocket FIONBIO function. */
-#define HAVE_IOCTLSOCKET_FIONBIO 1
-
-/* Define if you have the setlocale function. */
-#define HAVE_SETLOCALE 1
-
-/* Define if you have the setmode function. */
-#define HAVE_SETMODE 1
-
-/* Define if you have the strcasecmp function. */
-/* #define HAVE_STRCASECMP 1 */
-
-/* Define if you have the strdup function. */
-#define HAVE_STRDUP 1
-
-/* Define if you have the stricmp function. */
-#define HAVE_STRICMP 1
-
-/* Define if you have the strncasecmp function. */
-/* #define HAVE_STRNCASECMP 1 */
-
-/* Define if you have the strnicmp function. */
-#define HAVE_STRNICMP 1
-
-/* Define if you have the utime function */
-#ifndef __BORLANDC__
-#define HAVE_UTIME 1
-#endif
-
-/* Define if you have the recv function. */
-#define HAVE_RECV 1
-
-/* Define to the type of arg 1 for recv. */
-#define RECV_TYPE_ARG1 SOCKET
-
-/* Define to the type of arg 2 for recv. */
-#define RECV_TYPE_ARG2 char *
-
-/* Define to the type of arg 3 for recv. */
-#define RECV_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recv. */
-#define RECV_TYPE_ARG4 int
-
-/* Define to the function return type for recv. */
-#define RECV_TYPE_RETV int
-
-/* Define if you have the recvfrom function. */
-#define HAVE_RECVFROM 1
-
-/* Define to the type of arg 1 for recvfrom. */
-#define RECVFROM_TYPE_ARG1 SOCKET
-
-/* Define to the type pointed by arg 2 for recvfrom. */
-#define RECVFROM_TYPE_ARG2 char
-
-/* Define to the type of arg 3 for recvfrom. */
-#define RECVFROM_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recvfrom. */
-#define RECVFROM_TYPE_ARG4 int
-
-/* Define to the type pointed by arg 5 for recvfrom. */
-#define RECVFROM_TYPE_ARG5 struct sockaddr
-
-/* Define to the type pointed by arg 6 for recvfrom. */
-#define RECVFROM_TYPE_ARG6 int
-
-/* Define to the function return type for recvfrom. */
-#define RECVFROM_TYPE_RETV int
-
-/* Define if you have the send function. */
-#define HAVE_SEND 1
-
-/* Define to the type of arg 1 for send. */
-#define SEND_TYPE_ARG1 SOCKET
-
-/* Define to the type qualifier of arg 2 for send. */
-#define SEND_QUAL_ARG2 const
-
-/* Define to the type of arg 2 for send. */
-#define SEND_TYPE_ARG2 char *
-
-/* Define to the type of arg 3 for send. */
-#define SEND_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for send. */
-#define SEND_TYPE_ARG4 int
-
-/* Define to the function return type for send. */
-#define SEND_TYPE_RETV int
-
-/* ---------------------------------------------------------------- */
-/* TYPEDEF REPLACEMENTS */
-/* ---------------------------------------------------------------- */
-
-/* Define this if in_addr_t is not an available 'typedefed' type */
-#define in_addr_t unsigned long
-
-/* Define as the return type of signal handlers (int or void). */
-#define RETSIGTYPE void
-
-/* Define ssize_t if it is not an available 'typedefed' type */
-#ifndef _SSIZE_T_DEFINED
-# if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
- defined(__POCC__) || \
- defined(__MINGW32__)
-# elif defined(_WIN64)
-# define _SSIZE_T_DEFINED
-# define ssize_t __int64
-# else
-# define _SSIZE_T_DEFINED
-# define ssize_t int
-# endif
-#endif
-
-/* ---------------------------------------------------------------- */
-/* TYPE SIZES */
-/* ---------------------------------------------------------------- */
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long double', as computed by sizeof. */
-#define SIZEOF_LONG_DOUBLE 16
-
-/* The size of `long long', as computed by sizeof. */
-/* #define SIZEOF_LONG_LONG 8 */
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* ---------------------------------------------------------------- */
-/* STRUCT RELATED */
-/* ---------------------------------------------------------------- */
-
-/* Define this if you have struct sockaddr_storage */
-#ifndef __SALFORDC__
-#define HAVE_STRUCT_SOCKADDR_STORAGE 1
-#endif
-
-/* Define this if you have struct timeval */
-#define HAVE_STRUCT_TIMEVAL 1
-
-/* Define this if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
-
-/* ---------------------------------------------------------------- */
-/* Watt-32 tcp/ip SPECIFIC */
-/* ---------------------------------------------------------------- */
-
-#ifdef USE_WATT32
- #include <tcp.h>
- #undef byte
- #undef word
- #undef USE_WINSOCK
- #undef HAVE_WINSOCK_H
- #undef HAVE_WINSOCK2_H
- #undef HAVE_WS2TCPIP_H
- #define HAVE_GETADDRINFO
- #define HAVE_GETNAMEINFO
- #define HAVE_SYS_IOCTL_H
- #define HAVE_SYS_SOCKET_H
- #define HAVE_NETINET_IN_H
- #define HAVE_NETDB_H
- #define HAVE_ARPA_INET_H
- #define HAVE_FREEADDRINFO
- #define SOCKET int
-#endif
-
-
-/* ---------------------------------------------------------------- */
-/* COMPILER SPECIFIC */
-/* ---------------------------------------------------------------- */
-
-/* Undef keyword 'const' if it does not work. */
-/* #undef const */
-
-/* Windows should not have HAVE_GMTIME_R defined */
-/* #undef HAVE_GMTIME_R */
-
-/* Define if the compiler supports C99 variadic macro style. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-#define HAVE_VARIADIC_MACROS_C99 1
-#endif
-
-/* Define if the compiler supports the 'long long' data type. */
-#if defined(__MINGW32__) || defined(__WATCOMC__)
-#define HAVE_LONGLONG 1
-#endif
-
-/* Define to avoid VS2005 complaining about portable C functions */
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-#define _CRT_SECURE_NO_DEPRECATE 1
-#define _CRT_NONSTDC_NO_DEPRECATE 1
-#endif
-
-/* VS2005 and later dafault size for time_t is 64-bit, unless */
-/* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-# ifndef _USE_32BIT_TIME_T
-# define SIZEOF_TIME_T 8
-# else
-# define SIZEOF_TIME_T 4
-# endif
-#endif
-
-/* 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 using
- Windows SDK versions 6.X and Windows 2000 as a build target are functional */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
-# define VS2008_MINIMUM_TARGET 0x0500
-#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_DEFAULT_TARGET 0x0501
-#endif
-
-/* VS2008 default target settings and minimum build target check */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
-# ifndef _WIN32_WINNT
-# define _WIN32_WINNT VS2008_DEFAULT_TARGET
-# endif
-# ifndef WINVER
-# define WINVER VS2008_DEFAULT_TARGET
-# endif
-# if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
-# error VS2008 does not support Windows build targets prior to Windows 2000
-# 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)
-# ifndef _WIN32_WINNT
-# define _WIN32_WINNT 0x0500
-# endif
-# ifndef WINVER
-# define WINVER 0x0500
-# endif
-#endif
-
-/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
- quite convoluted, compiler dependent and even build target dependent. */
-#if defined(HAVE_WS2TCPIP_H)
-# if defined(__POCC__)
-# define HAVE_FREEADDRINFO 1
-# define HAVE_GETADDRINFO 1
-# define HAVE_GETADDRINFO_THREADSAFE 1
-# define HAVE_GETNAMEINFO 1
-# elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
-# define HAVE_FREEADDRINFO 1
-# define HAVE_GETADDRINFO 1
-# define HAVE_GETADDRINFO_THREADSAFE 1
-# define HAVE_GETNAMEINFO 1
-# elif defined(_MSC_VER) && (_MSC_VER >= 1200)
-# define HAVE_FREEADDRINFO 1
-# define HAVE_GETADDRINFO 1
-# define HAVE_GETADDRINFO_THREADSAFE 1
-# define HAVE_GETNAMEINFO 1
-# endif
-#endif
-
-#if defined(__POCC__)
-# ifndef _MSC_VER
-# error Microsoft extensions /Ze compiler option is required
-# endif
-# ifndef __POCC__OLDNAMES
-# error Compatibility names /Go compiler option is required
-# endif
-#endif
-
-/* ---------------------------------------------------------------- */
-/* LARGE FILE SUPPORT */
-/* ---------------------------------------------------------------- */
-
-#if defined(_MSC_VER) && !defined(_WIN32_WCE)
-# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
-# define USE_WIN32_LARGE_FILES
-# else
-# define USE_WIN32_SMALL_FILES
-# endif
-#endif
-
-#if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
-# define USE_WIN32_LARGE_FILES
-#endif
-
-#if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
-# define USE_WIN32_LARGE_FILES
-#endif
-
-#if defined(__POCC__)
-# undef USE_WIN32_LARGE_FILES
-#endif
-
-#if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
-# define USE_WIN32_SMALL_FILES
-#endif
-
-/* ---------------------------------------------------------------- */
-/* ADDITIONAL DEFINITIONS */
-/* ---------------------------------------------------------------- */
-
-/* Define cpu-machine-OS */
-#ifndef OS
-#define OS "i386-pc-win32"
-#endif
-
-/* Define to 1 if you want the built-in manual */
-#define USE_MANUAL 1
-
-#if defined(__POCC__)
-# define ENABLE_IPV6 1
-#endif
-
-#endif /* __SRC_CONFIG_WIN32_H */
diff --git a/src/curl.rc b/src/curl.rc
index 58e439d3..3db59bd3 100644
--- a/src/curl.rc
+++ b/src/curl.rc
@@ -20,7 +20,7 @@
*
***************************************************************************/
#include <winver.h>
-#include "version.h"
+#include "tool_version.h"
LANGUAGE 0x09,0x01
diff --git a/src/curl_config.h.in b/src/curl_config.h.in
deleted file mode 100644
index 15ea387f..00000000
--- a/src/curl_config.h.in
+++ /dev/null
@@ -1,1006 +0,0 @@
-/* lib/curl_config.h.in. Generated from configure.ac by autoheader. */
-
-/* when building libcurl itself */
-#undef BUILDING_LIBCURL
-
-/* Location of default ca bundle */
-#undef CURL_CA_BUNDLE
-
-/* Location of default ca path */
-#undef CURL_CA_PATH
-
-/* to disable cookies support */
-#undef CURL_DISABLE_COOKIES
-
-/* to disable cryptographic authentication */
-#undef CURL_DISABLE_CRYPTO_AUTH
-
-/* to disable DICT */
-#undef CURL_DISABLE_DICT
-
-/* to disable FILE */
-#undef CURL_DISABLE_FILE
-
-/* to disable FTP */
-#undef CURL_DISABLE_FTP
-
-/* to disable Gopher */
-#undef CURL_DISABLE_GOPHER
-
-/* to disable HTTP */
-#undef CURL_DISABLE_HTTP
-
-/* to disable IMAP */
-#undef CURL_DISABLE_IMAP
-
-/* to disable LDAP */
-#undef CURL_DISABLE_LDAP
-
-/* to disable LDAPS */
-#undef CURL_DISABLE_LDAPS
-
-/* to disable POP3 */
-#undef CURL_DISABLE_POP3
-
-/* to disable proxies */
-#undef CURL_DISABLE_PROXY
-
-/* to disable RTSP */
-#undef CURL_DISABLE_RTSP
-
-/* to disable SMTP */
-#undef CURL_DISABLE_SMTP
-
-/* to disable TELNET */
-#undef CURL_DISABLE_TELNET
-
-/* to disable TFTP */
-#undef CURL_DISABLE_TFTP
-
-/* to disable verbose strings */
-#undef CURL_DISABLE_VERBOSE_STRINGS
-
-/* to make a symbol visible */
-#undef CURL_EXTERN_SYMBOL
-
-/* to enable hidden symbols */
-#undef CURL_HIDDEN_SYMBOLS
-
-/* Use Windows LDAP implementation */
-#undef CURL_LDAP_WIN
-
-/* when not building a shared library */
-#undef CURL_STATICLIB
-
-/* your Entropy Gathering Daemon socket pathname */
-#undef EGD_SOCKET
-
-/* Define if you want to enable IPv6 support */
-#undef ENABLE_IPV6
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#undef GETNAMEINFO_QUAL_ARG1
-
-/* Define to the type of arg 1 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG1
-
-/* Define to the type of arg 2 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG2
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG46
-
-/* Define to the type of arg 7 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG7
-
-/* Specifies the number of arguments to getservbyport_r */
-#undef GETSERVBYPORT_R_ARGS
-
-/* Specifies the size of the buffer to pass to getservbyport_r */
-#undef GETSERVBYPORT_R_BUFSIZE
-
-/* Define to 1 if you have the alarm function. */
-#undef HAVE_ALARM
-
-/* Define to 1 if you have the <alloca.h> header file. */
-#undef HAVE_ALLOCA_H
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
-
-/* Define to 1 if you have the <arpa/tftp.h> header file. */
-#undef HAVE_ARPA_TFTP_H
-
-/* Define to 1 if you have the <assert.h> header file. */
-#undef HAVE_ASSERT_H
-
-/* Define to 1 if you have the basename function. */
-#undef HAVE_BASENAME
-
-/* Define to 1 if bool is an available type. */
-#undef HAVE_BOOL_T
-
-/* Define to 1 if you have the clock_gettime function and monotonic timer. */
-#undef HAVE_CLOCK_GETTIME_MONOTONIC
-
-/* Define to 1 if you have the closesocket function. */
-#undef HAVE_CLOSESOCKET
-
-/* Define to 1 if you have the CloseSocket camel case function. */
-#undef HAVE_CLOSESOCKET_CAMEL
-
-/* Define to 1 if you have the connect function. */
-#undef HAVE_CONNECT
-
-/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
-#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
-
-/* Define to 1 if you have the <crypto.h> header file. */
-#undef HAVE_CRYPTO_H
-
-/* Define to 1 if you have the <des.h> header file. */
-#undef HAVE_DES_H
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the `ENGINE_cleanup' function. */
-#undef HAVE_ENGINE_CLEANUP
-
-/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */
-#undef HAVE_ENGINE_LOAD_BUILTIN_ENGINES
-
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define to 1 if you have the fcntl function. */
-#undef HAVE_FCNTL
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
-#undef HAVE_FCNTL_O_NONBLOCK
-
-/* Define to 1 if you have the fdopen function. */
-#undef HAVE_FDOPEN
-
-/* Define to 1 if you have the `fork' function. */
-#undef HAVE_FORK
-
-/* Define to 1 if you have the freeaddrinfo function. */
-#undef HAVE_FREEADDRINFO
-
-/* Define to 1 if you have the freeifaddrs function. */
-#undef HAVE_FREEIFADDRS
-
-/* Define to 1 if you have the ftruncate function. */
-#undef HAVE_FTRUNCATE
-
-/* Define to 1 if you have a working getaddrinfo function. */
-#undef HAVE_GETADDRINFO
-
-/* Define to 1 if the getaddrinfo function is threadsafe. */
-#undef HAVE_GETADDRINFO_THREADSAFE
-
-/* Define to 1 if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
-/* Define to 1 if you have the gethostbyaddr function. */
-#undef HAVE_GETHOSTBYADDR
-
-/* Define to 1 if you have the gethostbyaddr_r function. */
-#undef HAVE_GETHOSTBYADDR_R
-
-/* gethostbyaddr_r() takes 5 args */
-#undef HAVE_GETHOSTBYADDR_R_5
-
-/* gethostbyaddr_r() takes 7 args */
-#undef HAVE_GETHOSTBYADDR_R_7
-
-/* gethostbyaddr_r() takes 8 args */
-#undef HAVE_GETHOSTBYADDR_R_8
-
-/* Define to 1 if you have the gethostbyname function. */
-#undef HAVE_GETHOSTBYNAME
-
-/* Define to 1 if you have the gethostbyname_r function. */
-#undef HAVE_GETHOSTBYNAME_R
-
-/* gethostbyname_r() takes 3 args */
-#undef HAVE_GETHOSTBYNAME_R_3
-
-/* gethostbyname_r() takes 5 args */
-#undef HAVE_GETHOSTBYNAME_R_5
-
-/* gethostbyname_r() takes 6 args */
-#undef HAVE_GETHOSTBYNAME_R_6
-
-/* Define to 1 if you have the gethostname function. */
-#undef HAVE_GETHOSTNAME
-
-/* Define to 1 if you have a working getifaddrs function. */
-#undef HAVE_GETIFADDRS
-
-/* Define to 1 if you have the getnameinfo function. */
-#undef HAVE_GETNAMEINFO
-
-/* Define to 1 if you have the `getpass_r' function. */
-#undef HAVE_GETPASS_R
-
-/* Define to 1 if you have the `getppid' function. */
-#undef HAVE_GETPPID
-
-/* Define to 1 if you have the `getprotobyname' function. */
-#undef HAVE_GETPROTOBYNAME
-
-/* Define to 1 if you have the `getpwuid' function. */
-#undef HAVE_GETPWUID
-
-/* Define to 1 if you have the `getrlimit' function. */
-#undef HAVE_GETRLIMIT
-
-/* Define to 1 if you have the getservbyport_r function. */
-#undef HAVE_GETSERVBYPORT_R
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define to 1 if you have a working glibc-style strerror_r function. */
-#undef HAVE_GLIBC_STRERROR_R
-
-/* Define to 1 if you have a working gmtime_r function. */
-#undef HAVE_GMTIME_R
-
-/* if you have the gssapi libraries */
-#undef HAVE_GSSAPI
-
-/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
-
-/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_H
-
-/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_KRB5_H
-
-/* if you have the GNU gssapi libraries */
-#undef HAVE_GSSGNU
-
-/* if you have the Heimdal gssapi libraries */
-#undef HAVE_GSSHEIMDAL
-
-/* if you have the MIT gssapi libraries */
-#undef HAVE_GSSMIT
-
-/* Define to 1 if you have the `idna_strerror' function. */
-#undef HAVE_IDNA_STRERROR
-
-/* Define to 1 if you have the `idn_free' function. */
-#undef HAVE_IDN_FREE
-
-/* Define to 1 if you have the <idn-free.h> header file. */
-#undef HAVE_IDN_FREE_H
-
-/* Define to 1 if you have the <ifaddrs.h> header file. */
-#undef HAVE_IFADDRS_H
-
-/* Define to 1 if you have the `inet_addr' function. */
-#undef HAVE_INET_ADDR
-
-/* Define to 1 if you have the inet_ntoa_r function. */
-#undef HAVE_INET_NTOA_R
-
-/* inet_ntoa_r() takes 2 args */
-#undef HAVE_INET_NTOA_R_2
-
-/* inet_ntoa_r() takes 3 args */
-#undef HAVE_INET_NTOA_R_3
-
-/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
-#undef HAVE_INET_NTOP
-
-/* Define to 1 if you have a IPv6 capable working inet_pton function. */
-#undef HAVE_INET_PTON
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the ioctl function. */
-#undef HAVE_IOCTL
-
-/* Define to 1 if you have the ioctlsocket function. */
-#undef HAVE_IOCTLSOCKET
-
-/* 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.
- */
-#undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
-
-/* Define to 1 if you have a working ioctlsocket FIONBIO function. */
-#undef HAVE_IOCTLSOCKET_FIONBIO
-
-/* Define to 1 if you have a working ioctl FIONBIO function. */
-#undef HAVE_IOCTL_FIONBIO
-
-/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
-#undef HAVE_IOCTL_SIOCGIFADDR
-
-/* Define to 1 if you have the <io.h> header file. */
-#undef HAVE_IO_H
-
-/* if you have the Kerberos4 libraries (including -ldes) */
-#undef HAVE_KRB4
-
-/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
-#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
-
-/* Define to 1 if you have the <krb.h> header file. */
-#undef HAVE_KRB_H
-
-/* Define to 1 if you have the lber.h header file. */
-#undef HAVE_LBER_H
-
-/* Define to 1 if you have the ldapssl.h header file. */
-#undef HAVE_LDAPSSL_H
-
-/* Define to 1 if you have the ldap.h header file. */
-#undef HAVE_LDAP_H
-
-/* Define to 1 if you have the `ldap_init_fd' function. */
-#undef HAVE_LDAP_INIT_FD
-
-/* Use LDAPS implementation */
-#undef HAVE_LDAP_SSL
-
-/* Define to 1 if you have the ldap_ssl.h header file. */
-#undef HAVE_LDAP_SSL_H
-
-/* Define to 1 if you have the `ldap_url_parse' function. */
-#undef HAVE_LDAP_URL_PARSE
-
-/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */
-#undef HAVE_LIBGCRYPT
-
-/* Define to 1 if you have the <libgen.h> header file. */
-#undef HAVE_LIBGEN_H
-
-/* Define to 1 if you have the `idn' library (-lidn). */
-#undef HAVE_LIBIDN
-
-/* Define to 1 if you have the `resolv' library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define to 1 if you have the `resolve' library (-lresolve). */
-#undef HAVE_LIBRESOLVE
-
-/* Define to 1 if you have the <librtmp/rtmp.h> header file. */
-#undef HAVE_LIBRTMP_RTMP_H
-
-/* Define to 1 if you have the `ssh2' library (-lssh2). */
-#undef HAVE_LIBSSH2
-
-/* Define to 1 if you have the `libssh2_exit' function. */
-#undef HAVE_LIBSSH2_EXIT
-
-/* Define to 1 if you have the <libssh2.h> header file. */
-#undef HAVE_LIBSSH2_H
-
-/* Define to 1 if you have the `libssh2_init' function. */
-#undef HAVE_LIBSSH2_INIT
-
-/* Define to 1 if you have the `libssh2_scp_send64' function. */
-#undef HAVE_LIBSSH2_SCP_SEND64
-
-/* Define to 1 if you have the `libssh2_version' function. */
-#undef HAVE_LIBSSH2_VERSION
-
-/* Define to 1 if you have the `ssl' library (-lssl). */
-#undef HAVE_LIBSSL
-
-/* if zlib is available */
-#undef HAVE_LIBZ
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* if your compiler supports LL */
-#undef HAVE_LL
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if you have a working localtime_r function. */
-#undef HAVE_LOCALTIME_R
-
-/* Define to 1 if the compiler supports the 'long long' data type. */
-#undef HAVE_LONGLONG
-
-/* Define to 1 if you have the malloc.h header file. */
-#undef HAVE_MALLOC_H
-
-/* Define to 1 if you have the memory.h header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the memrchr function or macro. */
-#undef HAVE_MEMRCHR
-
-/* Define to 1 if you have the MSG_NOSIGNAL flag. */
-#undef HAVE_MSG_NOSIGNAL
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#undef HAVE_NETINET_TCP_H
-
-/* Define to 1 if you have the <net/if.h> header file. */
-#undef HAVE_NET_IF_H
-
-/* Define to 1 if NI_WITHSCOPEID exists and works. */
-#undef HAVE_NI_WITHSCOPEID
-
-/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
- */
-#undef HAVE_OLD_GSSMIT
-
-/* Define to 1 if you have the <openssl/crypto.h> header file. */
-#undef HAVE_OPENSSL_CRYPTO_H
-
-/* Define to 1 if you have the <openssl/engine.h> header file. */
-#undef HAVE_OPENSSL_ENGINE_H
-
-/* Define to 1 if you have the <openssl/err.h> header file. */
-#undef HAVE_OPENSSL_ERR_H
-
-/* Define to 1 if you have the <openssl/pem.h> header file. */
-#undef HAVE_OPENSSL_PEM_H
-
-/* Define to 1 if you have the <openssl/pkcs12.h> header file. */
-#undef HAVE_OPENSSL_PKCS12_H
-
-/* Define to 1 if you have the <openssl/rsa.h> header file. */
-#undef HAVE_OPENSSL_RSA_H
-
-/* Define to 1 if you have the <openssl/ssl.h> header file. */
-#undef HAVE_OPENSSL_SSL_H
-
-/* Define to 1 if you have the <openssl/x509.h> header file. */
-#undef HAVE_OPENSSL_X509_H
-
-/* Define to 1 if you have the <pem.h> header file. */
-#undef HAVE_PEM_H
-
-/* Define to 1 if you have the `perror' function. */
-#undef HAVE_PERROR
-
-/* Define to 1 if you have the `pipe' function. */
-#undef HAVE_PIPE
-
-/* if you have the function PK11_CreateGenericObject */
-#undef HAVE_PK11_CREATEGENERICOBJECT
-
-/* Define to 1 if you have a working poll function. */
-#undef HAVE_POLL
-
-/* If you have a fine poll */
-#undef HAVE_POLL_FINE
-
-/* Define to 1 if you have the <poll.h> header file. */
-#undef HAVE_POLL_H
-
-/* Define to 1 if you have a working POSIX-style strerror_r function. */
-#undef HAVE_POSIX_STRERROR_R
-
-/* if you have <pthread.h> */
-#undef HAVE_PTHREAD_H
-
-/* Define to 1 if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H
-
-/* Define to 1 if you have the `RAND_egd' function. */
-#undef HAVE_RAND_EGD
-
-/* Define to 1 if you have the `RAND_screen' function. */
-#undef HAVE_RAND_SCREEN
-
-/* Define to 1 if you have the `RAND_status' function. */
-#undef HAVE_RAND_STATUS
-
-/* Define to 1 if you have the recv function. */
-#undef HAVE_RECV
-
-/* Define to 1 if you have the recvfrom function. */
-#undef HAVE_RECVFROM
-
-/* Define to 1 if you have the <rsa.h> header file. */
-#undef HAVE_RSA_H
-
-/* Define to 1 if you have the select function. */
-#undef HAVE_SELECT
-
-/* Define to 1 if you have the send function. */
-#undef HAVE_SEND
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#undef HAVE_SETJMP_H
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
-/* Define to 1 if you have the `setmode' function. */
-#undef HAVE_SETMODE
-
-/* Define to 1 if you have the `setrlimit' function. */
-#undef HAVE_SETRLIMIT
-
-/* Define to 1 if you have the setsockopt function. */
-#undef HAVE_SETSOCKOPT
-
-/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
-#undef HAVE_SETSOCKOPT_SO_NONBLOCK
-
-/* Define to 1 if you have the <sgtty.h> header file. */
-#undef HAVE_SGTTY_H
-
-/* Define to 1 if you have the sigaction function. */
-#undef HAVE_SIGACTION
-
-/* Define to 1 if you have the siginterrupt function. */
-#undef HAVE_SIGINTERRUPT
-
-/* Define to 1 if you have the signal function. */
-#undef HAVE_SIGNAL
-
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
-/* Define to 1 if you have the sigsetjmp function or macro. */
-#undef HAVE_SIGSETJMP
-
-/* Define to 1 if sig_atomic_t is an available typedef. */
-#undef HAVE_SIG_ATOMIC_T
-
-/* Define to 1 if sig_atomic_t is already defined as volatile. */
-#undef HAVE_SIG_ATOMIC_T_VOLATILE
-
-/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */
-#undef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-
-/* Define to 1 if you have the socket function. */
-#undef HAVE_SOCKET
-
-/* Define to 1 if you have the <socket.h> header file. */
-#undef HAVE_SOCKET_H
-
-/* Define this if you have the SPNEGO library fbopenssl */
-#undef HAVE_SPNEGO
-
-/* Define to 1 if you have the `SSL_get_shutdown' function. */
-#undef HAVE_SSL_GET_SHUTDOWN
-
-/* Define to 1 if you have the <ssl.h> header file. */
-#undef HAVE_SSL_H
-
-/* Define to 1 if you have the <stdbool.h> header file. */
-#undef HAVE_STDBOOL_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdio.h> header file. */
-#undef HAVE_STDIO_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
-
-/* Define to 1 if you have the strcasestr function. */
-#undef HAVE_STRCASESTR
-
-/* Define to 1 if you have the strcmpi function. */
-#undef HAVE_STRCMPI
-
-/* Define to 1 if you have the strdup function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the strerror_r function. */
-#undef HAVE_STRERROR_R
-
-/* Define to 1 if you have the stricmp function. */
-#undef HAVE_STRICMP
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the strlcat function. */
-#undef HAVE_STRLCAT
-
-/* Define to 1 if you have the `strlcpy' function. */
-#undef HAVE_STRLCPY
-
-/* Define to 1 if you have the strncasecmp function. */
-#undef HAVE_STRNCASECMP
-
-/* Define to 1 if you have the strncmpi function. */
-#undef HAVE_STRNCMPI
-
-/* Define to 1 if you have the strnicmp function. */
-#undef HAVE_STRNICMP
-
-/* Define to 1 if you have the <stropts.h> header file. */
-#undef HAVE_STROPTS_H
-
-/* Define to 1 if you have the strstr function. */
-#undef HAVE_STRSTR
-
-/* Define to 1 if you have the strtok_r function. */
-#undef HAVE_STRTOK_R
-
-/* Define to 1 if you have the strtoll function. */
-#undef HAVE_STRTOLL
-
-/* if struct sockaddr_storage is defined */
-#undef HAVE_STRUCT_SOCKADDR_STORAGE
-
-/* Define to 1 if you have the timeval struct. */
-#undef HAVE_STRUCT_TIMEVAL
-
-/* Define to 1 if you have the <sys/filio.h> header file. */
-#undef HAVE_SYS_FILIO_H
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/poll.h> header file. */
-#undef HAVE_SYS_POLL_H
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/sockio.h> header file. */
-#undef HAVE_SYS_SOCKIO_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-#undef HAVE_SYS_UIO_H
-
-/* Define to 1 if you have the <sys/un.h> header file. */
-#undef HAVE_SYS_UN_H
-
-/* Define to 1 if you have the <sys/utime.h> header file. */
-#undef HAVE_SYS_UTIME_H
-
-/* Define to 1 if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H
-
-/* Define to 1 if you have the <termio.h> header file. */
-#undef HAVE_TERMIO_H
-
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define to 1 if you have the <tld.h> header file. */
-#undef HAVE_TLD_H
-
-/* Define to 1 if you have the `tld_strerror' function. */
-#undef HAVE_TLD_STRERROR
-
-/* Define to 1 if you have the `uname' function. */
-#undef HAVE_UNAME
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `utime' function. */
-#undef HAVE_UTIME
-
-/* Define to 1 if you have the <utime.h> header file. */
-#undef HAVE_UTIME_H
-
-/* Define to 1 if compiler supports C99 variadic macro style. */
-#undef HAVE_VARIADIC_MACROS_C99
-
-/* Define to 1 if compiler supports old gcc variadic macro style. */
-#undef HAVE_VARIADIC_MACROS_GCC
-
-/* Define to 1 if you have the winber.h header file. */
-#undef HAVE_WINBER_H
-
-/* Define to 1 if you have the windows.h header file. */
-#undef HAVE_WINDOWS_H
-
-/* Define to 1 if you have the winldap.h header file. */
-#undef HAVE_WINLDAP_H
-
-/* Define to 1 if you have the winsock2.h header file. */
-#undef HAVE_WINSOCK2_H
-
-/* Define to 1 if you have the winsock.h header file. */
-#undef HAVE_WINSOCK_H
-
-/* Define this symbol if your OS supports changing the contents of argv */
-#undef HAVE_WRITABLE_ARGV
-
-/* Define to 1 if you have the writev function. */
-#undef HAVE_WRITEV
-
-/* Define to 1 if you have the ws2tcpip.h header file. */
-#undef HAVE_WS2TCPIP_H
-
-/* Define to 1 if you have the <x509.h> header file. */
-#undef HAVE_X509_H
-
-/* if you have the zlib.h header file */
-#undef HAVE_ZLIB_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#undef LT_OBJDIR
-
-/* Define to 1 if you are building a native Windows target. */
-#undef NATIVE_WINDOWS
-
-/* Define to 1 if you need the lber.h header file even with ldap.h */
-#undef NEED_LBER_H
-
-/* Define to 1 if you need the malloc.h header file even with stdlib.h */
-#undef NEED_MALLOC_H
-
-/* Define to 1 if you need the memory.h header file even with stdlib.h */
-#undef NEED_MEMORY_H
-
-/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
-#undef NEED_REENTRANT
-
-/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */
-#undef NEED_THREAD_SAFE
-
-/* cpu-machine-OS */
-#undef OS
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* a suitable file to read random data from */
-#undef RANDOM_FILE
-
-/* Define to the type of arg 1 for recvfrom. */
-#undef RECVFROM_TYPE_ARG1
-
-/* Define to the type pointed by arg 2 for recvfrom. */
-#undef RECVFROM_TYPE_ARG2
-
-/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG2_IS_VOID
-
-/* Define to the type of arg 3 for recvfrom. */
-#undef RECVFROM_TYPE_ARG3
-
-/* Define to the type of arg 4 for recvfrom. */
-#undef RECVFROM_TYPE_ARG4
-
-/* Define to the type pointed by arg 5 for recvfrom. */
-#undef RECVFROM_TYPE_ARG5
-
-/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG5_IS_VOID
-
-/* Define to the type pointed by arg 6 for recvfrom. */
-#undef RECVFROM_TYPE_ARG6
-
-/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG6_IS_VOID
-
-/* Define to the function return type for recvfrom. */
-#undef RECVFROM_TYPE_RETV
-
-/* Define to the type of arg 1 for recv. */
-#undef RECV_TYPE_ARG1
-
-/* Define to the type of arg 2 for recv. */
-#undef RECV_TYPE_ARG2
-
-/* Define to the type of arg 3 for recv. */
-#undef RECV_TYPE_ARG3
-
-/* Define to the type of arg 4 for recv. */
-#undef RECV_TYPE_ARG4
-
-/* Define to the function return type for recv. */
-#undef RECV_TYPE_RETV
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Define to the type qualifier of arg 5 for select. */
-#undef SELECT_QUAL_ARG5
-
-/* Define to the type of arg 1 for select. */
-#undef SELECT_TYPE_ARG1
-
-/* Define to the type of args 2, 3 and 4 for select. */
-#undef SELECT_TYPE_ARG234
-
-/* Define to the type of arg 5 for select. */
-#undef SELECT_TYPE_ARG5
-
-/* Define to the function return type for select. */
-#undef SELECT_TYPE_RETV
-
-/* Define to the type qualifier of arg 2 for send. */
-#undef SEND_QUAL_ARG2
-
-/* Define to the type of arg 1 for send. */
-#undef SEND_TYPE_ARG1
-
-/* Define to the type of arg 2 for send. */
-#undef SEND_TYPE_ARG2
-
-/* Define to the type of arg 3 for send. */
-#undef SEND_TYPE_ARG3
-
-/* Define to the type of arg 4 for send. */
-#undef SEND_TYPE_ARG4
-
-/* Define to the function return type for send. */
-#undef SEND_TYPE_RETV
-
-/* The size of `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* The size of `off_t', as computed by sizeof. */
-#undef SIZEOF_OFF_T
-
-/* The size of `short', as computed by sizeof. */
-#undef SIZEOF_SHORT
-
-/* The size of `size_t', as computed by sizeof. */
-#undef SIZEOF_SIZE_T
-
-/* The size of `time_t', as computed by sizeof. */
-#undef SIZEOF_TIME_T
-
-/* The size of `void*', as computed by sizeof. */
-#undef SIZEOF_VOIDP
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to the type of arg 3 for strerror_r. */
-#undef STRERROR_R_TYPE_ARG3
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to enable c-ares support */
-#undef USE_ARES
-
-/* Define to disable non-blocking sockets. */
-#undef USE_BLOCKING_SOCKETS
-
-/* if GnuTLS is enabled */
-#undef USE_GNUTLS
-
-/* if librtmp is in use */
-#undef USE_LIBRTMP
-
-/* if libSSH2 is in use */
-#undef USE_LIBSSH2
-
-/* If you want to build curl with the built-in manual */
-#undef USE_MANUAL
-
-/* if NSS is enabled */
-#undef USE_NSS
-
-/* Use OpenLDAP-specific code */
-#undef USE_OPENLDAP
-
-/* if OpenSSL is in use */
-#undef USE_OPENSSL
-
-/* if PolarSSL is enabled */
-#undef USE_POLARSSL
-
-/* if SSL is enabled */
-#undef USE_SSLEAY
-
-/* if you want POSIX threaded DNS lookup */
-#undef USE_THREADS_POSIX
-
-/* Define to 1 if you are building a Windows target without large file
- support. */
-#undef USE_WIN32_LARGE_FILES
-
-/* to enable SSPI support */
-#undef USE_WINDOWS_SSPI
-
-/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */
-#undef USE_YASSLEMUL
-
-/* Version number of package */
-#undef VERSION
-
-/* Define to avoid automatic inclusion of winsock.h */
-#undef WIN32_LEAN_AND_MEAN
-
-/* Define to 1 if OS is AIX. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Type to use in place of in_addr_t when system does not provide it. */
-#undef in_addr_t
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef size_t
-
-/* the signed version of size_t */
-#undef ssize_t
diff --git a/src/curlsrc.vcproj b/src/curlsrc.vcproj
deleted file mode 100755
index c453c60c..00000000
--- a/src/curlsrc.vcproj
+++ /dev/null
@@ -1,553 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="curlsrc"
- ProjectGUID="{01F90008-9A5F-42AD-9ADB-1E2EADE41CFD}"
- RootNamespace="curlsrc"
- TargetFrameworkVersion="0"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- EnableManagedIncrementalBuild="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\lib;..\include;.;&quot;..\..\openssl-0.9.8h\Win32\include&quot;;&quot;..\..\zlib-1.2.3&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;HAVE_ZLIB_H"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="1"
- PrecompiledHeaderFile=""
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib ..\..\openssl-0.9.8h\Win32\static\libeay32.lib ..\..\openssl-0.9.8h\Win32\static\ssleay32.lib"
- OutputFile="$(OutDir)\curl.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- EnableManagedIncrementalBuild="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\lib;..\include;.;&quot;..\..\openssl-0.9.8h\Win32\include&quot;;&quot;..\..\zlib-1.2.3&quot;"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CURL_STATICLIB;USE_SSLEAY;USE_OPENSSL;HAVE_ZLIB_H"
- MinimalRebuild="true"
- RuntimeLibrary="1"
- EnableEnhancedInstructionSet="1"
- PrecompiledHeaderFile=""
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib ..\..\openssl-0.9.8h\Win32\static\libeay32.lib ..\..\openssl-0.9.8h\Win32\static\ssleay32.lib"
- OutputFile="$(OutDir)\curl.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="curlutil.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="getpass.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="homedir.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="hugehelp.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="main.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\lib\nonblock.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="os-specific.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\lib\rawstr.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\lib\strtoofft.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="urlglob.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="writeenv.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="writeout.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="config-win32.h"
- >
- </File>
- <File
- RelativePath="curlutil.h"
- >
- </File>
- <File
- RelativePath="getpass.h"
- >
- </File>
- <File
- RelativePath="homedir.h"
- >
- </File>
- <File
- RelativePath="hugehelp.h"
- >
- </File>
- <File
- RelativePath="..\lib\nonblock.h"
- >
- </File>
- <File
- RelativePath="os-specific.h"
- >
- </File>
- <File
- RelativePath="..\lib\rawstr.h"
- >
- </File>
- <File
- RelativePath="setup.h"
- >
- </File>
- <File
- RelativePath="..\lib\strtoofft.h"
- >
- </File>
- <File
- RelativePath="urlglob.h"
- >
- </File>
- <File
- RelativePath="version.h"
- >
- </File>
- <File
- RelativePath="writeenv.h"
- >
- </File>
- <File
- RelativePath="writeout.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- >
- <File
- RelativePath="curl.rc"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions=""
- AdditionalIncludeDirectories=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions=""
- AdditionalIncludeDirectories=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/curlutil.c b/src/curlutil.c
deleted file mode 100644
index bca2db7a..00000000
--- a/src/curlutil.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#include "curlutil.h"
-
-#if defined(WIN32) && !defined(MSDOS)
-
-struct timeval cutil_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.
- */
- struct timeval now;
- DWORD milliseconds = GetTickCount();
- now.tv_sec = milliseconds / 1000;
- now.tv_usec = (milliseconds % 1000) * 1000;
- return now;
-}
-
-#elif defined(HAVE_CLOCK_GETTIME_MONOTONIC)
-
-struct timeval cutil_tvnow(void)
-{
- /*
- ** clock_gettime() is granted to be increased monotonically when the
- ** monotonic clock is queried. Time starting point is unspecified, it
- ** could be the system start-up time, the Epoch, or something else,
- ** in any case the time starting point does not change once that the
- ** system has started up.
- */
- struct timeval now;
- struct timespec tsnow;
- if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) {
- now.tv_sec = tsnow.tv_sec;
- now.tv_usec = tsnow.tv_nsec / 1000;
- }
- /*
- ** Even when the configure process has truly detected monotonic clock
- ** availability, it might happen that it is not actually available at
- ** run-time. When this occurs simply fallback to other time source.
- */
-#ifdef HAVE_GETTIMEOFDAY
- else
- (void)gettimeofday(&now, NULL);
-#else
- else {
- now.tv_sec = (long)time(NULL);
- now.tv_usec = 0;
- }
-#endif
- return now;
-}
-
-#elif defined(HAVE_GETTIMEOFDAY)
-
-struct timeval cutil_tvnow(void)
-{
- /*
- ** gettimeofday() is not granted to be increased monotonically, due to
- ** clock drifting and external source time synchronization it can jump
- ** forward or backward in time.
- */
- struct timeval now;
- (void)gettimeofday(&now, NULL);
- return now;
-}
-
-#else
-
-struct timeval cutil_tvnow(void)
-{
- /*
- ** time() returns the value of time in seconds since the Epoch.
- */
- struct timeval now;
- now.tv_sec = (long)time(NULL);
- now.tv_usec = 0;
- return now;
-}
-
-#endif
-
-/*
- * Make sure that the first argument is the more recent time, as otherwise
- * we'll get a weird negative time-diff back...
- *
- * Returns: the time difference in number of milliseconds.
- */
-long cutil_tvdiff(struct timeval newer, struct timeval older)
-{
- return (newer.tv_sec-older.tv_sec)*1000+
- (newer.tv_usec-older.tv_usec)/1000;
-}
-
-/*
- * Same as cutil_tvdiff but with full usec resolution.
- *
- * Returns: the time difference in seconds with subsecond resolution.
- */
-double cutil_tvdiff_secs(struct timeval newer, struct timeval older)
-{
- return (double)(newer.tv_sec-older.tv_sec)+
- (double)(newer.tv_usec-older.tv_usec)/1000000.0;
-}
-
-/* return the number of seconds in the given input timeval struct */
-long cutil_tvlong(struct timeval t1)
-{
- return t1.tv_sec;
-}
-
diff --git a/src/curlutil.h b/src/curlutil.h
deleted file mode 100644
index a993a775..00000000
--- a/src/curlutil.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef __CURL_SRC_UTIL_H
-#define __CURL_SRC_UTIL_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-
-struct timeval cutil_tvnow(void);
-
-/*
- * Make sure that the first argument (t1) is the more recent time and t2 is
- * the older time, as otherwise you get a weird negative time-diff back...
- *
- * Returns: the time difference in number of milliseconds.
- */
-long cutil_tvdiff(struct timeval t1, struct timeval t2);
-
-/*
- * Same as cutil_tvdiff but with full usec resolution.
- *
- * Returns: the time difference in seconds with subsecond resolution.
- */
-double cutil_tvdiff_secs(struct timeval t1, struct timeval t2);
-
-long cutil_tvlong(struct timeval t1);
-
-
-#endif /* __CURL_SRC_UTIL_H */
-
diff --git a/src/getpass.c b/src/getpass.c
deleted file mode 100644
index b441a5ad..00000000
--- a/src/getpass.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 file is a reimplementation of the previous one, due to license
- problems. */
-
-#include "setup.h"
-
-#ifndef HAVE_GETPASS_R
-/* this file is only for systems without getpass_r() */
-
-#include <stdio.h>
-#include <string.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "getpass.h"
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_TERMIOS_H
-#include <termios.h>
-#else
-#ifdef HAVE_TERMIO_H
-#include <termio.h>
-#endif
-#endif
-
-/* The last #include file should be: */
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#include "memdebug.h"
-#endif
-
-#ifdef __VMS
-/* VMS implementation */
-#include descrip
-#include starlet
-#include iodef
-/* #include iosbdef */
-char *getpass_r(const char *prompt, char *buffer, size_t buflen)
-{
- long sts;
- short chan;
-
- /* MSK, 23-JAN-2004, iosbdef.h wasn't in VAX V7.2 or CC 6.4 */
- /* distribution so I created this. May revert back later to */
- /* struct _iosb iosb; */
- struct _iosb
- {
- short int iosb$w_status; /* status */
- short int iosb$w_bcnt; /* byte count */
- int unused; /* unused */
- } iosb;
-
- $DESCRIPTOR(ttdesc, "TT");
-
- buffer[0]='\0';
- sts = sys$assign(&ttdesc, &chan,0,0);
- if (sts & 1) {
- sts = sys$qiow(0, chan,
- IO$_READPROMPT | IO$M_NOECHO,
- &iosb, 0, 0, buffer, buflen, 0, 0,
- prompt, strlen(prompt));
-
- if((sts & 1) && (iosb.iosb$w_status&1))
- buffer[iosb.iosb$w_bcnt] = '\0';
-
- sts = sys$dassgn(chan);
- }
- return buffer; /* we always return success */
-}
-#define DONE
-#endif /* __VMS */
-
-
-#ifdef WIN32
-/* Windows implementation */
-#include <conio.h>
-#endif
-
-#ifdef __SYMBIAN32__
-#define getch() getchar()
-#endif
-
-#if defined(WIN32) || defined(__SYMBIAN32__)
-
-char *getpass_r(const char *prompt, char *buffer, size_t buflen)
-{
- size_t i;
- fputs(prompt, stderr);
-
- for(i=0; i<buflen; i++) {
- buffer[i] = (char)getch();
- if ( buffer[i] == '\r' || buffer[i] == '\n' ) {
- buffer[i] = 0;
- break;
- }
- else
- if ( buffer[i] == '\b')
- /* remove this letter and if this is not the first key, remove the
- previous one as well */
- i = i - (i>=1?2:1);
- }
-#ifndef __SYMBIAN32__
- /* since echo is disabled, print a newline */
- fputs("\n", stderr);
-#endif
- /* if user didn't hit ENTER, terminate buffer */
- if (i==buflen)
- buffer[buflen-1]=0;
-
- return buffer; /* we always return success */
-}
-#define DONE
-#endif /* WIN32 || __SYMBIAN32__ */
-
-#ifdef NETWARE
-/* NetWare implementation */
-#ifdef __NOVELL_LIBC__
-#include <screen.h>
-char *getpass_r(const char *prompt, char *buffer, size_t buflen)
-{
- return getpassword(prompt, buffer, buflen);
-}
-#else
-#include <nwconio.h>
-char *getpass_r(const char *prompt, char *buffer, size_t buflen)
-{
- size_t i = 0;
-
- printf("%s", prompt);
- do {
- buffer[i++] = getch();
- if (buffer[i-1] == '\b') {
- /* remove this letter and if this is not the first key,
- remove the previous one as well */
- if (i > 1) {
- printf("\b \b");
- i = i - 2;
- } else {
- RingTheBell();
- i = i - 1;
- }
- } else if (buffer[i-1] != 13) {
- putchar('*');
- }
- } while ((buffer[i-1] != 13) && (i < buflen));
- buffer[i-1] = 0;
- printf("\r\n");
- return buffer;
-}
-#endif /* __NOVELL_LIBC__ */
-#define DONE
-#endif /* NETWARE */
-
-#ifndef DONE /* not previously provided */
-
-#ifdef HAVE_TERMIOS_H
-#define struct_term struct termios
-#else
-#ifdef HAVE_TERMIO_H
-#define struct_term struct termio
-#else
-#undef struct_term
-#endif
-#endif
-
-static bool ttyecho(bool enable, int fd)
-{
-#ifdef struct_term
- static struct_term withecho;
- static struct_term noecho;
-#endif
- if(!enable) {
- /* disable echo by extracting the current 'withecho' mode and remove the
- ECHO bit and set back the struct */
-#ifdef HAVE_TERMIOS_H
- tcgetattr(fd, &withecho);
- noecho = withecho;
- noecho.c_lflag &= ~ECHO;
- tcsetattr(fd, TCSANOW, &noecho);
-#else /* HAVE_TERMIOS_H */
-#ifdef HAVE_TERMIO_H
- ioctl(fd, TCGETA, &withecho);
- noecho = withecho;
- noecho.c_lflag &= ~ECHO;
- ioctl(fd, TCSETA, &noecho);
-#else /* HAVE_TERMIO_H */
-/* neither HAVE_TERMIO_H nor HAVE_TERMIOS_H, we can't disable echo! */
- (void)fd; /* prevent compiler warning on unused variable */
- return FALSE; /* not disabled */
-#endif
-#endif
- return TRUE; /* disabled */
- }
- else {
- /* re-enable echo, assumes we disabled it before (and set the structs we
- now use to reset the terminal status) */
-#ifdef HAVE_TERMIOS_H
- tcsetattr(fd, TCSAFLUSH, &withecho);
-#else /* HAVE_TERMIOS_H */
-#ifdef HAVE_TERMIO_H
- ioctl(fd, TCSETA, &withecho);
-#else
-/* neither HAVE_TERMIO_H nor HAVE_TERMIOS_H */
- return FALSE; /* not enabled */
-#endif
-#endif
- return TRUE; /* enabled */
- }
-}
-
-char *getpass_r(const char *prompt, /* prompt to display */
- char *password, /* buffer to store password in */
- size_t buflen) /* size of buffer to store password in */
-{
- ssize_t nread;
- bool disabled;
- int fd=open("/dev/tty", O_RDONLY);
- if(-1 == fd)
- fd = 1; /* use stdin if the tty couldn't be used */
-
- disabled = ttyecho(FALSE, fd); /* disable terminal echo */
-
- fputs(prompt, stderr);
- nread=read(fd, password, buflen);
- if(nread > 0)
- password[--nread]=0; /* zero terminate where enter is stored */
- else
- password[0]=0; /* got nothing */
-
- if(disabled) {
- /* if echo actually was disabled, add a newline */
- fputs("\n", stderr);
- (void)ttyecho(TRUE, fd); /* enable echo */
- }
-
- if(1 != fd)
- close(fd);
-
- return password; /* return pointer to buffer */
-}
-
-#endif /* DONE */
-#endif /* HAVE_GETPASS_R */
diff --git a/src/getpass.h b/src/getpass.h
deleted file mode 100644
index 3b29d47a..00000000
--- a/src/getpass.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef __GETPASS_H
-#define __GETPASS_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-#ifndef HAVE_GETPASS_R
-/* If there's a system-provided function named like this, we trust it is
- also found in one of the standard headers. */
-
-/*
- * Returning NULL will abort the continued operation!
- */
-char* getpass_r(const char *prompt, char* buffer, size_t buflen );
-#endif
-
-#endif
diff --git a/src/homedir.c b/src/homedir.c
deleted file mode 100644
index ab1d3694..00000000
--- a/src/homedir.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef __VMS
-#include <unixlib.h>
-#endif
-
-#include "homedir.h"
-
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#include "memdebug.h"
-#endif
-
-static
-char *GetEnv(const char *variable, char do_expand)
-{
- char *env = NULL;
-#ifdef WIN32
- char buf1[1024], buf2[1024];
- DWORD rc;
-
- /* Don't use getenv(); it doesn't find variable added after program was
- * started. Don't accept truncated results (i.e. rc >= sizeof(buf1)). */
-
- rc = GetEnvironmentVariable(variable, buf1, sizeof(buf1));
- if (rc > 0 && rc < sizeof(buf1)) {
- env = buf1;
- variable = buf1;
- }
- if (do_expand && strchr(variable,'%')) {
- /* buf2 == variable if not expanded */
- rc = ExpandEnvironmentStrings (variable, buf2, sizeof(buf2));
- if (rc > 0 && rc < sizeof(buf2) &&
- !strchr(buf2,'%')) /* no vars still unexpanded */
- env = buf2;
- }
-#else
- (void)do_expand;
-#ifdef __VMS
- env = getenv(variable);
- if (env && strcmp("HOME",variable) == 0) {
- env = decc_translate_vms(env);
- }
-#else
- /* no length control */
- env = getenv(variable);
-#endif
-#endif
- return (env && env[0])?strdup(env):NULL;
-}
-
-/* return the home directory of the current user as an allocated string */
-char *homedir(void)
-{
- char *home;
-
- home = GetEnv("CURL_HOME", FALSE);
- if(home)
- return home;
-
- home = GetEnv("HOME", FALSE);
- if(home)
- return home;
-
-#if defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
- {
- struct passwd *pw = getpwuid(geteuid());
-
- if (pw) {
-#ifdef __VMS
- home = decc_translate_vms(pw->pw_dir);
-#else
- home = pw->pw_dir;
-#endif
- if (home && home[0])
- home = strdup(home);
- else
- home = NULL;
- }
- }
-#endif /* PWD-stuff */
-#ifdef WIN32
- home = GetEnv("APPDATA", TRUE);
- if(!home)
- home = GetEnv("%USERPROFILE%\\Application Data", TRUE); /* Normally only
- on Win-2K/XP */
-#endif /* WIN32 */
- return home;
-}
diff --git a/src/homedir.h b/src/homedir.h
deleted file mode 100644
index c88d5172..00000000
--- a/src/homedir.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef HEADER_CURL_HOMEDIR_H
-#define HEADER_CURL_HOMEDIR_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-char *homedir(void);
-
-#endif /* HEADER_CURL_HOMEDIR_H */
diff --git a/src/hugehelp.c b/src/hugehelp.c
deleted file mode 100644
index 0c1728ab..00000000
--- a/src/hugehelp.c
+++ /dev/null
@@ -1,7061 +0,0 @@
-#include "setup.h"
-#ifndef HAVE_LIBZ
-/*
- * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
- * Generation time: Wed Oct 6 19:13:33 2010
- */
-#include "setup.h"
-#ifdef USE_MANUAL
-#include "hugehelp.h"
-#include <stdio.h>
-void hugehelp(void)
-{
- fputs(
-" _ _ ____ _\n"
-" Project ___| | | | _ \\| |\n"
-" / __| | | | |_) | |\n"
-" | (__| |_| | _ <| |___\n"
-" \\___|\\___/|_| \\_\\_____|\n"
-"\n"
-"NAME\n"
-" curl - transfer a URL\n"
-"\n"
-"SYNOPSIS\n"
-" curl [options] [URL...]\n"
-"\n"
-"DESCRIPTION\n"
-" curl is a tool to transfer data from or to a server, using one of the\n"
-" supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP,\n"
-, stdout);
- fputs(
-" IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS,\n"
-" TELNET and TFTP). The command is designed to work without user inter-\n"
-" action.\n"
-"\n"
-" curl offers a busload of useful tricks like proxy support, user authen-\n"
-" tication, FTP upload, HTTP post, SSL connections, cookies, file trans-\n"
-" fer resume and more. As you will see below, the number of features will\n"
-" make your head spin!\n"
-"\n"
-, stdout);
- fputs(
-" curl is powered by libcurl for all transfer-related features. See\n"
-" libcurl(3) for details.\n"
-"\n"
-"URL\n"
-" The URL syntax is protocol-dependent. You'll find a detailed descrip-\n"
-" tion in RFC 3986.\n"
-"\n"
-" You can specify multiple URLs or parts of URLs by writing part sets\n"
-" within braces as in:\n"
-"\n"
-" http://site.{one,two,three}.com\n"
-"\n"
-" or you can get sequences of alphanumeric series by using [] as in:\n"
-"\n"
-" ftp://ftp.numericals.com/file[1-100].txt\n"
-, stdout);
- fputs(
-" ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)\n"
-" ftp://ftp.letters.com/file[a-z].txt\n"
-"\n"
-" Nested sequences are not supported, but you can use several ones next\n"
-" to each other:\n"
-"\n"
-" http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html\n"
-"\n"
-" You can specify any amount of URLs on the command line. They will be\n"
-" fetched in a sequential manner in the specified order.\n"
-"\n"
-, stdout);
- fputs(
-" You can specify a step counter for the ranges to get every Nth number\n"
-" or letter:\n"
-"\n"
-" http://www.numericals.com/file[1-100:10].txt\n"
-" http://www.letters.com/file[a-z:2].txt\n"
-"\n"
-" If you specify URL without protocol:// prefix, curl will attempt to\n"
-" guess what protocol you might want. It will then default to HTTP but\n"
-" try other protocols based on often-used host name prefixes. For exam-\n"
-, stdout);
- fputs(
-" ple, for host names starting with \"ftp.\" curl will assume you want to\n"
-" speak FTP.\n"
-"\n"
-" curl will do its best to use what you pass to it as a URL. It is not\n"
-" trying to validate it as a syntactically correct URL by any means but\n"
-" is instead very liberal with what it accepts.\n"
-"\n"
-" Curl will attempt to re-use connections for multiple file transfers, so\n"
-" that getting many files from the same server will not do multiple con-\n"
-, stdout);
- fputs(
-" nects / handshakes. This improves speed. Of course this is only done on\n"
-" files specified on a single command line and cannot be used between\n"
-" separate curl invokes.\n"
-"\n"
-"PROGRESS METER\n"
-" curl normally displays a progress meter during operations, indicating\n"
-" the amount of transferred data, transfer speeds and estimated time\n"
-" left, etc.\n"
-"\n"
-" curl displays this data to the terminal by default, so if you invoke\n"
-, stdout);
- fputs(
-" curl to do an operation and it is about to write data to the terminal,\n"
-" it disables the progress meter as otherwise it would mess up the output\n"
-" mixing progress meter and response data.\n"
-"\n"
-" If you want a progress meter for HTTP POST or PUT requests, you need to\n"
-" redirect the response output to a file, using shell redirect (>), -o\n"
-" [file] or similar.\n"
-"\n"
-" It is not the same case for FTP upload as that operation does not spit\n"
-, stdout);
- fputs(
-" out any response data to the terminal.\n"
-"\n"
-" If you prefer a progress \"bar\" instead of the regular meter, -# is your\n"
-" friend.\n"
-"OPTIONS\n"
-" In general, all boolean options are enabled with --option and yet again\n"
-" disabled with --no-option. That is, you use the exact same option name\n"
-" but prefix it with \"no-\". However, in this list we mostly only list and\n"
-" show the --option version of them. (This concept with --no options was\n"
-, stdout);
- fputs(
-" added in 7.19.0. Previously most options were toggled on/off on\n"
-" repeated use of the same command line option.)\n"
-"\n"
-" -a/--append\n"
-" (FTP/SFTP) When used in an upload, this will tell curl to append\n"
-" to the target file instead of overwriting it. If the file\n"
-" doesn't exist, it will be created. Note that this flag is\n"
-" ignored by some SSH servers (including OpenSSH).\n"
-"\n"
-" -A/--user-agent <agent string>\n"
-, stdout);
- fputs(
-" (HTTP) Specify the User-Agent string to send to the HTTP server.\n"
-" Some badly done CGIs fail if this field isn't set to\n"
-" \"Mozilla/4.0\". To encode blanks in the string, surround the\n"
-" string with single quote marks. This can also be set with the\n"
-" -H/--header option of course.\n"
-"\n"
-" If this option is set more than once, the last one will be the\n"
-" one that's used.\n"
-"\n"
-" --anyauth\n"
-, stdout);
- fputs(
-" (HTTP) Tells curl to figure out authentication method by itself,\n"
-" and use the most secure one the remote site claims to support.\n"
-" This is done by first doing a request and checking the response-\n"
-" headers, thus possibly inducing an extra network round-trip.\n"
-" This is used instead of setting a specific authentication\n"
-" method, which you can do with --basic, --digest, --ntlm, and\n"
-, stdout);
- fputs(
-" --negotiate.\n"
-"\n"
-" Note that using --anyauth is not recommended if you do uploads\n"
-" from stdin, since it may require data to be sent twice and then\n"
-" the client must be able to rewind. If the need should arise when\n"
-" uploading from stdin, the upload operation will fail.\n"
-"\n"
-" -b/--cookie <name=data>\n"
-" (HTTP) Pass the data to the HTTP server as a cookie. It is sup-\n"
-, stdout);
- fputs(
-" posedly the data previously received from the server in a \"Set-\n"
-" Cookie:\" line. The data should be in the format \"NAME1=VALUE1;\n"
-" NAME2=VALUE2\".\n"
-"\n"
-" If no '=' symbol is used in the line, it is treated as a file-\n"
-" name to use to read previously stored cookie lines from, which\n"
-" should be used in this session if they match. Using this method\n"
-, stdout);
- fputs(
-" also activates the \"cookie parser\" which will make curl record\n"
-" incoming cookies too, which may be handy if you're using this in\n"
-" combination with the -L/--location option. The file format of\n"
-" the file to read cookies from should be plain HTTP headers or\n"
-" the Netscape/Mozilla cookie file format.\n"
-"\n"
-" NOTE that the file specified with -b/--cookie is only used as\n"
-, stdout);
- fputs(
-" input. No cookies will be stored in the file. To store cookies,\n"
-" use the -c/--cookie-jar option or you could even save the HTTP\n"
-" headers to a file using -D/--dump-header!\n"
-"\n"
-" If this option is set more than once, the last one will be the\n"
-" one that's used.\n"
-"\n"
-" -B/--use-ascii\n"
-" Enable ASCII transfer when using FTP or LDAP. For FTP, this can\n"
-, stdout);
- fputs(
-" also be enforced by using an URL that ends with \";type=A\". This\n"
-" option causes data sent to stdout to be in text mode for win32\n"
-" systems.\n"
-"\n"
-" --basic\n"
-" (HTTP) Tells curl to use HTTP Basic authentication. This is the\n"
-" default and this option is usually pointless, unless you use it\n"
-" to override a previously set option that sets a different\n"
-, stdout);
- fputs(
-" authentication method (such as --ntlm, --digest, or --negoti-\n"
-" ate).\n"
-"\n"
-" --ciphers <list of ciphers>\n"
-" (SSL) Specifies which ciphers to use in the connection. The list\n"
-" of ciphers must specify valid ciphers. Read up on SSL cipher\n"
-" list details on this URL:\n"
-" http://www.openssl.org/docs/apps/ciphers.html\n"
-"\n"
-, stdout);
- fputs(
-" NSS ciphers are done differently than OpenSSL and GnuTLS. The\n"
-" full list of NSS ciphers is in the NSSCipherSuite entry at this\n"
-" URL: http://directory.fedora.redhat.com/docs/mod_nss.html#Direc-\n"
-" tives\n"
-"\n"
-" If this option is used several times, the last one will override\n"
-" the others.\n"
-"\n"
-" --compressed\n"
-" (HTTP) Request a compressed response using one of the algorithms\n"
-, stdout);
- fputs(
-" libcurl supports, and return the uncompressed document. If this\n"
-" option is used and the server sends an unsupported encoding,\n"
-" curl will report an error.\n"
-"\n"
-" --connect-timeout <seconds>\n"
-" Maximum time in seconds that you allow the connection to the\n"
-" server to take. This only limits the connection phase, once\n"
-" curl has connected this option is of no more use. See also the\n"
-, stdout);
- fputs(
-" -m/--max-time option.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -c/--cookie-jar <file name>\n"
-" Specify to which file you want curl to write all cookies after a\n"
-" completed operation. Curl writes all cookies previously read\n"
-" from a specified file as well as all cookies received from\n"
-" remote server(s). If no cookies are known, no file will be writ-\n"
-, stdout);
- fputs(
-" ten. The file will be written using the Netscape cookie file\n"
-" format. If you set the file name to a single dash, \"-\", the\n"
-" cookies will be written to stdout.\n"
-"\n"
-" NOTE If the cookie jar can't be created or written to, the whole\n"
-" curl operation won't fail or even report an error clearly. Using\n"
-" -v will get a warning displayed, but that is the only visible\n"
-, stdout);
- fputs(
-" feedback you get about this possibly lethal situation.\n"
-"\n"
-" If this option is used several times, the last specified file\n"
-" name will be used.\n"
-"\n"
-" -C/--continue-at <offset>\n"
-" Continue/Resume a previous file transfer at the given offset.\n"
-" The given offset is the exact number of bytes that will be\n"
-" skipped, counting from the beginning of the source file before\n"
-, stdout);
- fputs(
-" it is transferred to the destination. If used with uploads, the\n"
-" FTP server command SIZE will not be used by curl.\n"
-"\n"
-" Use \"-C -\" to tell curl to automatically find out where/how to\n"
-" resume the transfer. It then uses the given output/input files\n"
-" to figure that out.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --create-dirs\n"
-, stdout);
- fputs(
-" When used in conjunction with the -o option, curl will create\n"
-" the necessary local directory hierarchy as needed. This option\n"
-" creates the dirs mentioned with the -o option, nothing else. If\n"
-" the -o file name uses no dir or if the dirs it mentions already\n"
-" exist, no dir will be created.\n"
-"\n"
-" To create remote directories when using FTP or SFTP, try --ftp-\n"
-" create-dirs.\n"
-"\n"
-, stdout);
- fputs(
-" --crlf (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).\n"
-"\n"
-" --crlfile <file>\n"
-" (HTTPS/FTPS) Provide a file using PEM format with a Certificate\n"
-" Revocation List that may specify peer certificates that are to\n"
-" be considered revoked.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" (Added in 7.19.7)\n"
-"\n"
-" -d/--data <data>\n"
-, stdout);
- fputs(
-" (HTTP) Sends the specified data in a POST request to the HTTP\n"
-" server, in the same way that a browser does when a user has\n"
-" filled in an HTML form and presses the submit button. This will\n"
-" cause curl to pass the data to the server using the content-type\n"
-" application/x-www-form-urlencoded. Compare to -F/--form.\n"
-"\n"
-" -d/--data is the same as --data-ascii. To post data purely\n"
-, stdout);
- fputs(
-" binary, you should instead use the --data-binary option. To URL-\n"
-" encode the value of a form field you may use --data-urlencode.\n"
-"\n"
-" If any of these options is used more than once on the same com-\n"
-" mand line, the data pieces specified will be merged together\n"
-" with a separating &-symbol. Thus, using '-d name=daniel -d\n"
-" skill=lousy' would generate a post chunk that looks like\n"
-, stdout);
- fputs(
-" 'name=daniel&skill=lousy'.\n"
-"\n"
-" If you start the data with the letter @, the rest should be a\n"
-" file name to read the data from, or - if you want curl to read\n"
-" the data from stdin. The contents of the file must already be\n"
-" URL-encoded. Multiple files can also be specified. Posting data\n"
-" from a file named 'foobar' would thus be done with --data @foo-\n"
-" bar.\n"
-"\n"
-" --data-binary <data>\n"
-, stdout);
- fputs(
-" (HTTP) This posts data exactly as specified with no extra pro-\n"
-" cessing whatsoever.\n"
-"\n"
-" If you start the data with the letter @, the rest should be a\n"
-" filename. Data is posted in a similar manner as --data-ascii\n"
-" does, except that newlines are preserved and conversions are\n"
-" never done.\n"
-"\n"
-" If this option is used several times, the ones following the\n"
-, stdout);
- fputs(
-" first will append data as described in -d/--data.\n"
-"\n"
-" --data-urlencode <data>\n"
-" (HTTP) This posts data, similar to the other --data options with\n"
-" the exception that this performs URL-encoding. (Added in 7.18.0)\n"
-" To be CGI-compliant, the <data> part should begin with a name\n"
-" followed by a separator and a content specification. The <data>\n"
-" part can be passed to curl using one of the following syntaxes:\n"
-"\n"
-, stdout);
- fputs(
-" content\n"
-" This will make curl URL-encode the content and pass that\n"
-" on. Just be careful so that the content doesn't contain\n"
-" any = or @ symbols, as that will then make the syntax\n"
-" match one of the other cases below!\n"
-"\n"
-" =content\n"
-" This will make curl URL-encode the content and pass that\n"
-" on. The preceding = symbol is not included in the data.\n"
-"\n"
-, stdout);
- fputs(
-" name=content\n"
-" This will make curl URL-encode the content part and pass\n"
-" that on. Note that the name part is expected to be URL-\n"
-" encoded already.\n"
-"\n"
-" @filename\n"
-" This will make curl load data from the given file\n"
-" (including any newlines), URL-encode that data and pass\n"
-" it on in the POST.\n"
-"\n"
-" name@filename\n"
-, stdout);
- fputs(
-" This will make curl load data from the given file\n"
-" (including any newlines), URL-encode that data and pass\n"
-" it on in the POST. The name part gets an equal sign\n"
-" appended, resulting in name=urlencoded-file-content. Note\n"
-" that the name is expected to be URL-encoded already.\n"
-"\n"
-" --digest\n"
-" (HTTP) Enables HTTP Digest authentication. This is a authentica-\n"
-, stdout);
- fputs(
-" tion that prevents the password from being sent over the wire in\n"
-" clear text. Use this in combination with the normal -u/--user\n"
-" option to set user name and password. See also --ntlm, --negoti-\n"
-" ate and --anyauth for related options.\n"
-"\n"
-" If this option is used several times, the following occurrences\n"
-" make no difference.\n"
-"\n"
-" --disable-eprt\n"
-, stdout);
- fputs(
-" (FTP) Tell curl to disable the use of the EPRT and LPRT commands\n"
-" when doing active FTP transfers. Curl will normally always first\n"
-" attempt to use EPRT, then LPRT before using PORT, but with this\n"
-" option, it will use PORT right away. EPRT and LPRT are exten-\n"
-" sions to the original FTP protocol, and may not work on all\n"
-" servers, but they enable more functionality in a better way than\n"
-, stdout);
- fputs(
-" the traditional PORT command.\n"
-"\n"
-" --eprt can be used to explicitly enable EPRT again and --no-eprt\n"
-" is an alias for --disable-eprt.\n"
-"\n"
-" Disabling EPRT only changes the active behavior. If you want to\n"
-" switch to passive mode you need to not use -P/--ftp-port or\n"
-" force it with --ftp-pasv.\n"
-"\n"
-" --disable-epsv\n"
-" (FTP) Tell curl to disable the use of the EPSV command when\n"
-, stdout);
- fputs(
-" doing passive FTP transfers. Curl will normally always first\n"
-" attempt to use EPSV before PASV, but with this option, it will\n"
-" not try using EPSV.\n"
-"\n"
-" --epsv can be used to explicitly enable EPRT again and --no-epsv\n"
-" is an alias for --disable-epsv.\n"
-"\n"
-" Disabling EPSV only changes the passive behavior. If you want to\n"
-" switch to active mode you need to use -P/--ftp-port.\n"
-"\n"
-" -D/--dump-header <file>\n"
-, stdout);
- fputs(
-" Write the protocol headers to the specified file.\n"
-"\n"
-" This option is handy to use when you want to store the headers\n"
-" that a HTTP site sends to you. Cookies from the headers could\n"
-" then be read in a second curl invocation by using the\n"
-" -b/--cookie option! The -c/--cookie-jar option is however a bet-\n"
-" ter way to store cookies.\n"
-"\n"
-, stdout);
- fputs(
-" When used in FTP, the FTP server response lines are considered\n"
-" being \"headers\" and thus are saved there.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -e/--referer <URL>\n"
-" (HTTP) Sends the \"Referer Page\" information to the HTTP server.\n"
-" This can also be set with the -H/--header flag of course. When\n"
-" used with -L/--location you can append \";auto\" to the --referer\n"
-, stdout);
- fputs(
-" URL to make curl automatically set the previous URL when it fol-\n"
-" lows a Location: header. The \";auto\" string can be used alone,\n"
-" even if you don't set an initial --referer.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --engine <name>\n"
-" Select the OpenSSL crypto engine to use for cipher operations.\n"
-" Use --engine list to print a list of build-time supported\n"
-, stdout);
- fputs(
-" engines. Note that not all (or none) of the engines may be\n"
-" available at run-time.\n"
-"\n"
-" --environment\n"
-" (RISC OS ONLY) Sets a range of environment variables, using the\n"
-" names the -w option supports, to allow easier extraction of use-\n"
-" ful information after having run curl.\n"
-"\n"
-" --egd-file <file>\n"
-" (SSL) Specify the path name to the Entropy Gathering Daemon\n"
-, stdout);
- fputs(
-" socket. The socket is used to seed the random engine for SSL\n"
-" connections. See also the --random-file option.\n"
-"\n"
-" -E/--cert <certificate[:password]>\n"
-" (SSL) Tells curl to use the specified certificate file when get-\n"
-" ting a file with HTTPS or FTPS. The certificate must be in PEM\n"
-" format. If the optional password isn't specified, it will be\n"
-" queried for on the terminal. Note that this option assumes a\n"
-, stdout);
- fputs(
-" \"certificate\" file that is the private key and the private cer-\n"
-" tificate concatenated! See --cert and --key to specify them\n"
-" independently.\n"
-"\n"
-" If curl is built against the NSS SSL library then this option\n"
-" tells curl the nickname of the certificate to use within the NSS\n"
-" database defined by the environment variable SSL_DIR (or by\n"
-, stdout);
- fputs(
-" default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (lib-\n"
-" nsspem.so) is available then PEM files may be loaded.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --cert-type <type>\n"
-" (SSL) Tells curl what certificate type the provided certificate\n"
-" is in. PEM, DER and ENG are recognized types. If not specified,\n"
-" PEM is assumed.\n"
-"\n"
-, stdout);
- fputs(
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --cacert <CA certificate>\n"
-" (SSL) Tells curl to use the specified certificate file to verify\n"
-" the peer. The file may contain multiple CA certificates. The\n"
-" certificate(s) must be in PEM format. Normally curl is built to\n"
-" use a default file for this, so this option is typically used to\n"
-" alter that default file.\n"
-"\n"
-, stdout);
- fputs(
-" curl recognizes the environment variable named 'CURL_CA_BUNDLE'\n"
-" if it is set, and uses the given path as a path to a CA cert\n"
-" bundle. This option overrides that variable.\n"
-"\n"
-" The windows version of curl will automatically look for a CA\n"
-" certs file named 'curl-ca-bundle.crt', either in the same direc-\n"
-" tory as curl.exe, or in the Current Working Directory, or in any\n"
-" folder along your PATH.\n"
-"\n"
-, stdout);
- fputs(
-" If curl is built against the NSS SSL library then this option\n"
-" tells curl the nickname of the CA certificate to use within the\n"
-" NSS database defined by the environment variable SSL_DIR (or by\n"
-" default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (lib-\n"
-" nsspem.so) is available then PEM files may be loaded.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-, stdout);
- fputs(
-" --capath <CA certificate directory>\n"
-" (SSL) Tells curl to use the specified certificate directory to\n"
-" verify the peer. The certificates must be in PEM format, and the\n"
-" directory must have been processed using the c_rehash utility\n"
-" supplied with openssl. Using --capath can allow curl to make\n"
-" SSL-connections much more efficiently than using --cacert if the\n"
-" --cacert file contains many CA certificates.\n"
-"\n"
-, stdout);
- fputs(
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -f/--fail\n"
-" (HTTP) Fail silently (no output at all) on server errors. This\n"
-" is mostly done to better enable scripts etc to better deal with\n"
-" failed attempts. In normal cases when a HTTP server fails to\n"
-" deliver a document, it returns an HTML document stating so\n"
-" (which often also describes why and more). This flag will pre-\n"
-, stdout);
- fputs(
-" vent curl from outputting that and return error 22.\n"
-"\n"
-" This method is not fail-safe and there are occasions where non-\n"
-" successful response codes will slip through, especially when\n"
-" authentication is involved (response codes 401 and 407).\n"
-"\n"
-" --ftp-account [data]\n"
-" (FTP) When an FTP server asks for \"account data\" after user name\n"
-" and password has been provided, this data is sent off using the\n"
-, stdout);
- fputs(
-" ACCT command. (Added in 7.13.0)\n"
-"\n"
-" If this option is used twice, the second will override the pre-\n"
-" vious use.\n"
-"\n"
-" --ftp-create-dirs\n"
-" (FTP/SFTP) When an FTP or SFTP URL/operation uses a path that\n"
-" doesn't currently exist on the server, the standard behavior of\n"
-" curl is to fail. Using this option, curl will instead attempt to\n"
-" create missing directories.\n"
-"\n"
-" --ftp-method [method]\n"
-, stdout);
- fputs(
-" (FTP) Control what method curl should use to reach a file on a\n"
-" FTP(S) server. The method argument should be one of the follow-\n"
-" ing alternatives:\n"
-"\n"
-" multicwd\n"
-" curl does a single CWD operation for each path part in\n"
-" the given URL. For deep hierarchies this means very many\n"
-" commands. This is how RFC1738 says it should be done.\n"
-, stdout);
- fputs(
-" This is the default but the slowest behavior.\n"
-"\n"
-" nocwd curl does no CWD at all. curl will do SIZE, RETR, STOR\n"
-" etc and give a full path to the server for all these com-\n"
-" mands. This is the fastest behavior.\n"
-"\n"
-" singlecwd\n"
-" curl does one CWD with the full target directory and then\n"
-" operates on the file \"normally\" (like in the multicwd\n"
-, stdout);
- fputs(
-" case). This is somewhat more standards compliant than\n"
-" 'nocwd' but without the full penalty of 'multicwd'.\n"
-" (Added in 7.15.1)\n"
-"\n"
-" --ftp-pasv\n"
-" (FTP) Use passive mode for the data conection. Passive is the\n"
-" internal default behavior, but using this option can be used to\n"
-" override a previous -P/-ftp-port option. (Added in 7.11.0)\n"
-"\n"
-, stdout);
- fputs(
-" If this option is used several times, the following occurrences\n"
-" make no difference. Undoing an enforced passive really isn't\n"
-" doable but you must then instead enforce the correct -P/--ftp-\n"
-" port again.\n"
-"\n"
-" Passive mode means that curl will try the EPSV command first and\n"
-" then PASV, unless --disable-epsv is used.\n"
-"\n"
-" --ftp-alternative-to-user <command>\n"
-, stdout);
- fputs(
-" (FTP) If authenticating with the USER and PASS commands fails,\n"
-" send this command. When connecting to Tumbleweed's Secure\n"
-" Transport server over FTPS using a client certificate, using\n"
-" \"SITE AUTH\" will tell the server to retrieve the username from\n"
-" the certificate. (Added in 7.15.5)\n"
-"\n"
-" --ftp-skip-pasv-ip\n"
-" (FTP) Tell curl to not use the IP address the server suggests in\n"
-, stdout);
- fputs(
-" its response to curl's PASV command when curl connects the data\n"
-" connection. Instead curl will re-use the same IP address it\n"
-" already uses for the control connection. (Added in 7.14.2)\n"
-"\n"
-" This option has no effect if PORT, EPRT or EPSV is used instead\n"
-" of PASV.\n"
-"\n"
-" --ftp-pret\n"
-" (FTP) Tell curl to send a PRET command before PASV (and EPSV).\n"
-, stdout);
- fputs(
-" Certain FTP servers, mainly drftpd, require this non-standard\n"
-" command for directory listings as well as up and downloads in\n"
-" PASV mode. (Added in 7.20.x)\n"
-"\n"
-" --ssl (FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.\n"
-" Reverts to a non-secure connection if the server doesn't support\n"
-" SSL/TLS. See also --ftp-ssl-control and --ssl-reqd for differ-\n"
-, stdout);
- fputs(
-" ent levels of encryption required. (Added in 7.20.0)\n"
-"\n"
-" This option was formerly known as --ftp-ssl (Added in 7.11.0)\n"
-" and that can still be used but will be removed in a future ver-\n"
-" sion.\n"
-"\n"
-" --ftp-ssl-control\n"
-" (FTP) Require SSL/TLS for the FTP login, clear for transfer.\n"
-" Allows secure authentication, but non-encrypted data transfers\n"
-, stdout);
- fputs(
-" for efficiency. Fails the transfer if the server doesn't sup-\n"
-" port SSL/TLS. (Added in 7.16.0)\n"
-"\n"
-" --ssl-reqd\n"
-" (FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.\n"
-" Terminates the connection if the server doesn't support SSL/TLS.\n"
-" (Added in 7.20.0)\n"
-"\n"
-" This option was formerly known as --ftp-ssl-reqd (added in\n"
-" 7.15.5) and that can still be used but will be removed in a\n"
-, stdout);
- fputs(
-" future version.\n"
-"\n"
-" --ftp-ssl-ccc\n"
-" (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS\n"
-" layer after authenticating. The rest of the control channel com-\n"
-" munication will be unencrypted. This allows NAT routers to fol-\n"
-" low the FTP transaction. The default mode is passive. See --ftp-\n"
-" ssl-ccc-mode for other modes. (Added in 7.16.1)\n"
-"\n"
-" --ftp-ssl-ccc-mode [active/passive]\n"
-, stdout);
- fputs(
-" (FTP) Use CCC (Clear Command Channel) Sets the CCC mode. The\n"
-" passive mode will not initiate the shutdown, but instead wait\n"
-" for the server to do it, and will not reply to the shutdown from\n"
-" the server. The active mode initiates the shutdown and waits for\n"
-" a reply from the server. (Added in 7.16.2)\n"
-"\n"
-" -F/--form <name=content>\n"
-" (HTTP) This lets curl emulate a filled-in form in which a user\n"
-, stdout);
- fputs(
-" has pressed the submit button. This causes curl to POST data\n"
-" using the Content-Type multipart/form-data according to RFC2388.\n"
-" This enables uploading of binary files etc. To force the 'con-\n"
-" tent' part to be a file, prefix the file name with an @ sign. To\n"
-" just get the content part from a file, prefix the file name with\n"
-" the symbol <. The difference between @ and < is then that @\n"
-, stdout);
- fputs(
-" makes a file get attached in the post as a file upload, while\n"
-" the < makes a text field and just get the contents for that text\n"
-" field from a file.\n"
-"\n"
-" Example, to send your password file to the server, where 'pass-\n"
-" word' is the name of the form-field to which /etc/passwd will be\n"
-" the input:\n"
-"\n"
-" curl -F password=@/etc/passwd www.mypasswords.com\n"
-"\n"
-, stdout);
- fputs(
-" To read the file's content from stdin instead of a file, use -\n"
-" where the file name should've been. This goes for both @ and <\n"
-" constructs.\n"
-"\n"
-" You can also tell curl what Content-Type to use by using\n"
-" 'type=', in a manner similar to:\n"
-"\n"
-" curl -F \"web=@index.html;type=text/html\" url.com\n"
-"\n"
-" or\n"
-"\n"
-" curl -F \"name=daniel;type=text/foo\" url.com\n"
-"\n"
-, stdout);
- fputs(
-" You can also explicitly change the name field of an file upload\n"
-" part by setting filename=, like this:\n"
-"\n"
-" curl -F \"file=@localfile;filename=nameinpost\" url.com\n"
-"\n"
-" See further examples and details in the MANUAL.\n"
-"\n"
-" This option can be used multiple times.\n"
-"\n"
-" --form-string <name=string>\n"
-" (HTTP) Similar to --form except that the value string for the\n"
-, stdout);
- fputs(
-" named parameter is used literally. Leading '@' and '<' charac-\n"
-" ters, and the ';type=' string in the value have no special mean-\n"
-" ing. Use this in preference to --form if there's any possibility\n"
-" that the string value may accidentally trigger the '@' or '<'\n"
-" features of --form.\n"
-"\n"
-" -g/--globoff\n"
-" This option switches off the \"URL globbing parser\". When you set\n"
-, stdout);
- fputs(
-" this option, you can specify URLs that contain the letters {}[]\n"
-" without having them being interpreted by curl itself. Note that\n"
-" these letters are not normal legal URL contents but they should\n"
-" be encoded according to the URI standard.\n"
-"\n"
-" -G/--get\n"
-" When used, this option will make all data specified with\n"
-" -d/--data or --data-binary to be used in a HTTP GET request\n"
-, stdout);
- fputs(
-" instead of the POST request that otherwise would be used. The\n"
-" data will be appended to the URL with a '?' separator.\n"
-"\n"
-" If used in combination with -I, the POST data will instead be\n"
-" appended to the URL with a HEAD request.\n"
-"\n"
-" If this option is used several times, the following occurrences\n"
-" make no difference. This is because undoing a GET doesn't make\n"
-, stdout);
- fputs(
-" sense, but you should then instead enforce the alternative\n"
-" method you prefer.\n"
-"\n"
-" -h/--help\n"
-" Usage help.\n"
-"\n"
-" -H/--header <header>\n"
-" (HTTP) Extra header to use when getting a web page. You may\n"
-" specify any number of extra headers. Note that if you should add\n"
-" a custom header that has the same name as one of the internal\n"
-, stdout);
- fputs(
-" ones curl would use, your externally set header will be used\n"
-" instead of the internal one. This allows you to make even trick-\n"
-" ier stuff than curl would normally do. You should not replace\n"
-" internally set headers without knowing perfectly well what\n"
-" you're doing. Remove an internal header by giving a replacement\n"
-" without content on the right side of the colon, as in: -H\n"
-" \"Host:\".\n"
-"\n"
-, stdout);
- fputs(
-" curl will make sure that each header you add/replace is sent\n"
-" with the proper end-of-line marker, you should thus not add that\n"
-" as a part of the header content: do not add newlines or carriage\n"
-" returns, they will only mess things up for you.\n"
-"\n"
-" See also the -A/--user-agent and -e/--referer options.\n"
-"\n"
-" This option can be used multiple times to add/replace/remove\n"
-" multiple headers.\n"
-"\n"
-, stdout);
- fputs(
-" --hostpubmd5 <md5>\n"
-" Pass a string containing 32 hexadecimal digits. The string\n"
-" should be the 128 bit MD5 checksum of the remote host's public\n"
-" key, curl will refuse the connection with the host unless the\n"
-" md5sums match. This option is only for SCP and SFTP transfers.\n"
-" (Added in 7.17.1)\n"
-"\n"
-" --ignore-content-length\n"
-" (HTTP) Ignore the Content-Length header. This is particularly\n"
-, stdout);
- fputs(
-" useful for servers running Apache 1.x, which will report incor-\n"
-" rect Content-Length for files larger than 2 gigabytes.\n"
-"\n"
-" -i/--include\n"
-" (HTTP) Include the HTTP-header in the output. The HTTP-header\n"
-" includes things like server-name, date of the document, HTTP-\n"
-" version and more...\n"
-"\n"
-" --interface <name>\n"
-" Perform an operation using a specified interface. You can enter\n"
-, stdout);
- fputs(
-" interface name, IP address or host name. An example could look\n"
-" like:\n"
-"\n"
-" curl --interface eth0:1 http://www.netscape.com/\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -I/--head\n"
-" (HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature\n"
-" the command HEAD which this uses to get nothing but the header\n"
-" of a document. When used on a FTP or FILE file, curl displays\n"
-, stdout);
- fputs(
-" the file size and last modification time only.\n"
-"\n"
-" -j/--junk-session-cookies\n"
-" (HTTP) When curl is told to read cookies from a given file, this\n"
-" option will make it discard all \"session cookies\". This will\n"
-" basically have the same effect as if a new session is started.\n"
-" Typical browsers always discard session cookies when they're\n"
-" closed down.\n"
-"\n"
-" -J/--remote-header-name\n"
-, stdout);
- fputs(
-" (HTTP) This option tells the -O/--remote-name option to use the\n"
-" server-specified Content-Disposition filename instead of\n"
-" extracting a filename from the URL.\n"
-"\n"
-" -k/--insecure\n"
-" (SSL) This option explicitly allows curl to perform \"insecure\"\n"
-" SSL connections and transfers. All SSL connections are attempted\n"
-" to be made secure by using the CA certificate bundle installed\n"
-, stdout);
- fputs(
-" by default. This makes all connections considered \"insecure\"\n"
-" fail unless -k/--insecure is used.\n"
-"\n"
-" See this online resource for further details:\n"
-" http://curl.haxx.se/docs/sslcerts.html\n"
-"\n"
-" --keepalive-time <seconds>\n"
-" This option sets the time a connection needs to remain idle\n"
-" before sending keepalive probes and the time between individual\n"
-, stdout);
- fputs(
-" keepalive probes. It is currently effective on operating systems\n"
-" offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options\n"
-" (meaning Linux, recent AIX, HP-UX and more). This option has no\n"
-" effect if --no-keepalive is used. (Added in 7.18.0)\n"
-"\n"
-" If this option is used multiple times, the last occurrence sets\n"
-" the amount.\n"
-" --key <key>\n"
-, stdout);
- fputs(
-" (SSL/SSH) Private key file name. Allows you to provide your pri-\n"
-" vate key in this separate file.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --key-type <type>\n"
-" (SSL) Private key file type. Specify which type your --key pro-\n"
-" vided private key is. DER, PEM, and ENG are supported. If not\n"
-" specified, PEM is assumed.\n"
-"\n"
-, stdout);
- fputs(
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --krb <level>\n"
-" (FTP) Enable Kerberos authentication and use. The level must be\n"
-" entered and should be one of 'clear', 'safe', 'confidential', or\n"
-" 'private'. Should you use a level that is not one of these,\n"
-" 'private' will instead be used.\n"
-"\n"
-" This option requires a library built with kerberos4 or GSSAPI\n"
-, stdout);
- fputs(
-" (GSS-Negotiate) support. This is not very common. Use -V/--ver-\n"
-" sion to see if your curl supports it.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -K/--config <config file>\n"
-" Specify which config file to read curl arguments from. The con-\n"
-" fig file is a text file in which command line arguments can be\n"
-" written which then will be used as if they were written on the\n"
-, stdout);
- fputs(
-" actual command line. Options and their parameters must be speci-\n"
-" fied on the same config file line, separated by whitespace,\n"
-" colon, the equals sign or any combination thereof (however, the\n"
-" preferred separator is the equals sign). If the parameter is to\n"
-" contain whitespace, the parameter must be enclosed within\n"
-" quotes. Within double quotes, the following escape sequences are\n"
-, stdout);
- fputs(
-" available: \\\\, \\\", \\t, \\n, \\r and \\v. A backslash preceding any\n"
-" other letter is ignored. If the first column of a config line is\n"
-" a '#' character, the rest of the line will be treated as a com-\n"
-" ment. Only write one option per physical line in the config\n"
-" file.\n"
-"\n"
-" Specify the filename to -K/--config as '-' to make curl read the\n"
-" file from stdin.\n"
-"\n"
-, stdout);
- fputs(
-" Note that to be able to specify a URL in the config file, you\n"
-" need to specify it using the --url option, and not by simply\n"
-" writing the URL on its own line. So, it could look similar to\n"
-" this:\n"
-"\n"
-" url = \"http://curl.haxx.se/docs/\"\n"
-"\n"
-" Long option names can optionally be given in the config file\n"
-" without the initial double dashes.\n"
-"\n"
-, stdout);
- fputs(
-" When curl is invoked, it always (unless -q is used) checks for a\n"
-" default config file and uses it if found. The default config\n"
-" file is checked for in the following places in this order:\n"
-"\n"
-" 1) curl tries to find the \"home dir\": It first checks for the\n"
-" CURL_HOME and then the HOME environment variables. Failing that,\n"
-" it uses getpwuid() on UNIX-like systems (which returns the home\n"
-, stdout);
- fputs(
-" dir given the current user in your system). On Windows, it then\n"
-" checks for the APPDATA variable, or as a last resort the '%USER-\n"
-" PROFILE%\\Application Data'.\n"
-"\n"
-" 2) On windows, if there is no _curlrc file in the home dir, it\n"
-" checks for one in the same dir the curl executable is placed. On\n"
-" UNIX-like systems, it will simply try to load .curlrc from the\n"
-" determined home dir.\n"
-"\n"
-, stdout);
- fputs(
-" # --- Example file ---\n"
-" # this is a comment\n"
-" url = \"curl.haxx.se\"\n"
-" output = \"curlhere.html\"\n"
-" user-agent = \"superagent/1.0\"\n"
-"\n"
-" # and fetch another URL too\n"
-" url = \"curl.haxx.se/docs/manpage.html\"\n"
-" -O\n"
-" referer = \"http://nowhereatall.com/\"\n"
-" # --- End of example file ---\n"
-"\n"
-" This option can be used multiple times to load multiple config\n"
-" files.\n"
-"\n"
-, stdout);
- fputs(
-" --libcurl <file>\n"
-" Append this option to any ordinary curl command line, and you\n"
-" will get a libcurl-using source code written to the file that\n"
-" does the equivalent of what your command-line operation does!\n"
-"\n"
-" NOTE: this does not properly support -F and the sending of mul-\n"
-" tipart formposts, so in those cases the output program will be\n"
-" missing necessary calls to curl_formadd(3), and possibly more.\n"
-"\n"
-, stdout);
- fputs(
-" If this option is used several times, the last given file name\n"
-" will be used. (Added in 7.16.1)\n"
-"\n"
-" --limit-rate <speed>\n"
-" Specify the maximum transfer rate you want curl to use. This\n"
-" feature is useful if you have a limited pipe and you'd like your\n"
-" transfer not to use your entire bandwidth.\n"
-"\n"
-" The given speed is measured in bytes/second, unless a suffix is\n"
-, stdout);
- fputs(
-" appended. Appending 'k' or 'K' will count the number as kilo-\n"
-" bytes, 'm' or M' makes it megabytes, while 'g' or 'G' makes it\n"
-" gigabytes. Examples: 200K, 3m and 1G.\n"
-"\n"
-" The given rate is the average speed counted during the entire\n"
-" transfer. It means that curl might use higher transfer speeds in\n"
-" short bursts, but over time it uses no more than the given rate.\n"
-, stdout);
- fputs(
-" If you also use the -Y/--speed-limit option, that option will\n"
-" take precedence and might cripple the rate-limiting slightly, to\n"
-" help keeping the speed-limit logic working.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -l/--list-only\n"
-" (FTP) When listing an FTP directory, this switch forces a name-\n"
-" only view. Especially useful if you want to machine-parse the\n"
-, stdout);
- fputs(
-" contents of an FTP directory since the normal directory view\n"
-" doesn't use a standard look or format.\n"
-"\n"
-" This option causes an FTP NLST command to be sent. Some FTP\n"
-" servers list only files in their response to NLST; they do not\n"
-" include subdirectories and symbolic links.\n"
-"\n"
-" --local-port <num>[-num]\n"
-" Set a preferred number or range of local port numbers to use for\n"
-, stdout);
- fputs(
-" the connection(s). Note that port numbers by nature are a\n"
-" scarce resource that will be busy at times so setting this range\n"
-" to something too narrow might cause unnecessary connection setup\n"
-" failures. (Added in 7.15.2)\n"
-"\n"
-" -L/--location\n"
-" (HTTP/HTTPS) If the server reports that the requested page has\n"
-" moved to a different location (indicated with a Location: header\n"
-, stdout);
- fputs(
-" and a 3XX response code), this option will make curl redo the\n"
-" request on the new place. If used together with -i/--include or\n"
-" -I/--head, headers from all requested pages will be shown. When\n"
-" authentication is used, curl only sends its credentials to the\n"
-" initial host. If a redirect takes curl to a different host, it\n"
-" won't be able to intercept the user+password. See also --loca-\n"
-, stdout);
- fputs(
-" tion-trusted on how to change this. You can limit the amount of\n"
-" redirects to follow by using the --max-redirs option.\n"
-"\n"
-" When curl follows a redirect and the request is not a plain GET\n"
-" (for example POST or PUT), it will do the following request with\n"
-" a GET if the HTTP response was 301, 302, or 303. If the response\n"
-" code was any other 3xx code, curl will re-send the following\n"
-, stdout);
- fputs(
-" request using the same unmodified method.\n"
-"\n"
-" --location-trusted\n"
-" (HTTP/HTTPS) Like -L/--location, but will allow sending the name\n"
-" + password to all hosts that the site may redirect to. This may\n"
-" or may not introduce a security breach if the site redirects you\n"
-" to a site to which you'll send your authentication info (which\n"
-" is plaintext in the case of HTTP Basic authentication).\n"
-"\n"
-" --mail-rcpt <address>\n"
-, stdout);
- fputs(
-" (SMTP) Specify a single address that the given mail should get\n"
-" sent to. This option can be used multiple times to specify many\n"
-" recipients.\n"
-"\n"
-" (Added in 7.20.0)\n"
-"\n"
-" --mail-from <address>\n"
-" (SMTP) Specify a single address that the given mail should get\n"
-" sent from.\n"
-"\n"
-" (Added in 7.20.0)\n"
-"\n"
-" --max-filesize <bytes>\n"
-" Specify the maximum size (in bytes) of a file to download. If\n"
-, stdout);
- fputs(
-" the file requested is larger than this value, the transfer will\n"
-" not start and curl will return with exit code 63.\n"
-"\n"
-" NOTE: The file size is not always known prior to download, and\n"
-" for such files this option has no effect even if the file trans-\n"
-" fer ends up being larger than this given limit. This concerns\n"
-" both FTP and HTTP transfers.\n"
-"\n"
-" -m/--max-time <seconds>\n"
-, stdout);
- fputs(
-" Maximum time in seconds that you allow the whole operation to\n"
-" take. This is useful for preventing your batch jobs from hang-\n"
-" ing for hours due to slow networks or links going down. See\n"
-" also the --connect-timeout option.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -M/--manual\n"
-" Manual. Display the huge help text.\n"
-"\n"
-" -n/--netrc\n"
-, stdout);
- fputs(
-" Makes curl scan the .netrc (_netrc on Windows) file in the\n"
-" user's home directory for login name and password. This is typi-\n"
-" cally used for FTP on UNIX. If used with HTTP, curl will enable\n"
-" user authentication. See netrc(4) or ftp(1) for details on the\n"
-" file format. Curl will not complain if that file doesn't have\n"
-" the right permissions (it should not be either world- or group-\n"
-, stdout);
- fputs(
-" readable). The environment variable \"HOME\" is used to find the\n"
-" home directory.\n"
-"\n"
-" A quick and very simple example of how to setup a .netrc to\n"
-" allow curl to FTP to the machine host.domain.com with user name\n"
-" 'myself' and password 'secret' should look similar to:\n"
-"\n"
-" machine host.domain.com login myself password secret\n"
-"\n"
-" --netrc-optional\n"
-, stdout);
- fputs(
-" Very similar to --netrc, but this option makes the .netrc usage\n"
-" optional and not mandatory as the --netrc option does.\n"
-"\n"
-" --negotiate\n"
-" (HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate\n"
-" method was designed by Microsoft and is used in their web appli-\n"
-" cations. It is primarily meant as a support for Kerberos5\n"
-" authentication but may be also used along with another authenti-\n"
-, stdout);
- fputs(
-" cation method. For more information see IETF draft draft-brezak-\n"
-" spnego-http-04.txt.\n"
-"\n"
-" If you want to enable Negotiate for your proxy authentication,\n"
-" then use --proxy-negotiate.\n"
-"\n"
-" This option requires a library built with GSSAPI support. This\n"
-" is not very common. Use -V/--version to see if your version sup-\n"
-" ports GSS-Negotiate.\n"
-"\n"
-, stdout);
- fputs(
-" When using this option, you must also provide a fake -u/--user\n"
-" option to activate the authentication code properly. Sending a\n"
-" '-u :' is enough as the user name and password from the -u\n"
-" option aren't actually used.\n"
-"\n"
-" If this option is used several times, the following occurrences\n"
-" make no difference.\n"
-"\n"
-" -N/--no-buffer\n"
-" Disables the buffering of the output stream. In normal work sit-\n"
-, stdout);
- fputs(
-" uations, curl will use a standard buffered output stream that\n"
-" will have the effect that it will output the data in chunks, not\n"
-" necessarily exactly when the data arrives. Using this option\n"
-" will disable that buffering.\n"
-"\n"
-" Note that this is the negated option name documented. You can\n"
-" thus use --buffer to enforce the buffering.\n"
-"\n"
-" --no-keepalive\n"
-, stdout);
- fputs(
-" Disables the use of keepalive messages on the TCP connection, as\n"
-" by default curl enables them.\n"
-"\n"
-" Note that this is the negated option name documented. You can\n"
-" thus use --keepalive to enforce keepalive.\n"
-"\n"
-" --no-sessionid\n"
-" (SSL) Disable curl's use of SSL session-ID caching. By default\n"
-" all transfers are done using the cache. Note that while nothing\n"
-, stdout);
- fputs(
-" should ever get hurt by attempting to reuse SSL session-IDs,\n"
-" there seem to be broken SSL implementations in the wild that may\n"
-" require you to disable this in order for you to succeed. (Added\n"
-" in 7.16.0)\n"
-"\n"
-" Note that this is the negated option name documented. You can\n"
-" thus use --sessionid to enforce session-ID caching.\n"
-"\n"
-" --noproxy <no-proxy-list>\n"
-, stdout);
- fputs(
-" Comma-separated list of hosts which do not use a proxy, if one\n"
-" is specified. The only wildcard is a single * character, which\n"
-" matches all hosts, and effectively disables the proxy. Each name\n"
-" in this list is matched as either a domain which contains the\n"
-" hostname, or the hostname itself. For example, local.com would\n"
-" match local.com, local.com:80, and www.local.com, but not\n"
-, stdout);
- fputs(
-" www.notlocal.com. (Added in 7.19.4).\n"
-"\n"
-" --ntlm (HTTP) Enables NTLM authentication. The NTLM authentication\n"
-" method was designed by Microsoft and is used by IIS web servers.\n"
-" It is a proprietary protocol, reverse-engineered by clever peo-\n"
-" ple and implemented in curl based on their efforts. This kind of\n"
-" behavior should not be endorsed, you should encourage everyone\n"
-, stdout);
- fputs(
-" who uses NTLM to switch to a public and documented authentica-\n"
-" tion method instead, such as Digest.\n"
-"\n"
-" If you want to enable NTLM for your proxy authentication, then\n"
-" use --proxy-ntlm.\n"
-"\n"
-" This option requires a library built with SSL support. Use\n"
-" -V/--version to see if your curl supports NTLM.\n"
-"\n"
-" If this option is used several times, the following occurrences\n"
-" make no difference.\n"
-"\n"
-, stdout);
- fputs(
-" -o/--output <file>\n"
-" Write output to <file> instead of stdout. If you are using {} or\n"
-" [] to fetch multiple documents, you can use '#' followed by a\n"
-" number in the <file> specifier. That variable will be replaced\n"
-" with the current string for the URL being fetched. Like in:\n"
-"\n"
-" curl http://{one,two}.site.com -o \"file_#1.txt\"\n"
-"\n"
-" or use several variables like:\n"
-"\n"
-, stdout);
- fputs(
-" curl http://{site,host}.host[1-5].com -o \"#1_#2\"\n"
-"\n"
-" You may use this option as many times as the number of URLs you\n"
-" have.\n"
-"\n"
-" See also the --create-dirs option to create the local directo-\n"
-" ries dynamically. Specifying the output as '-' (a single dash)\n"
-" will force the output to be done to stdout.\n"
-"\n"
-" -O/--remote-name\n"
-" Write output to a local file named like the remote file we get.\n"
-, stdout);
- fputs(
-" (Only the file part of the remote file is used, the path is cut\n"
-" off.)\n"
-"\n"
-" The remote file name to use for saving is extracted from the\n"
-" given URL, nothing else.\n"
-"\n"
-" You may use this option as many times as the number of URLs you\n"
-" have.\n"
-"\n"
-" --remote-name-all\n"
-" This option changes the default action for all given URLs to be\n"
-, stdout);
- fputs(
-" dealt with as if -O/--remote-name were used for each one. So if\n"
-" you want to disable that for a specific URL after --remote-name-\n"
-" all has been used, you must use \"-o -\" or --no-remote-name.\n"
-" (Added in 7.19.0)\n"
-"\n"
-" --pass <phrase>\n"
-" (SSL/SSH) Passphrase for the private key\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --post301\n"
-, stdout);
- fputs(
-" Tells curl to respect RFC 2616/10.3.2 and not convert POST\n"
-" requests into GET requests when following a 301 redirection. The\n"
-" non-RFC behaviour is ubiquitous in web browsers, so curl does\n"
-" the conversion by default to maintain consistency. However, a\n"
-" server may require a POST to remain a POST after such a redi-\n"
-" rection. This option is meaningful only when using -L/--location\n"
-, stdout);
- fputs(
-" (Added in 7.17.1)\n"
-"\n"
-" --post302\n"
-" Tells curl to respect RFC 2616/10.3.2 and not convert POST\n"
-" requests into GET requests when following a 302 redirection. The\n"
-" non-RFC behaviour is ubiquitous in web browsers, so curl does\n"
-" the conversion by default to maintain consistency. However, a\n"
-" server may require a POST to remain a POST after such a redi-\n"
-, stdout);
- fputs(
-" rection. This option is meaningful only when using -L/--location\n"
-" (Added in 7.19.1)\n"
-"\n"
-" --proto <protocols>\n"
-" Tells curl to use the listed protocols for its initial\n"
-" retrieval. Protocols are evaluated left to right, are comma sep-\n"
-" arated, and are each a protocol name or 'all', optionally pre-\n"
-" fixed by zero or more modifiers. Available modifiers are:\n"
-"\n"
-, stdout);
- fputs(
-" + Permit this protocol in addition to protocols already permit-\n"
-" ted (this is the default if no modifier is used).\n"
-"\n"
-" - Deny this protocol, removing it from the list of protocols\n"
-" already permitted.\n"
-"\n"
-" = Permit only this protocol (ignoring the list already permit-\n"
-" ted), though subject to later modification by subsequent\n"
-" entries in the comma separated list.\n"
-"\n"
-, stdout);
- fputs(
-" For example:\n"
-"\n"
-" --proto -ftps uses the default protocols, but disables ftps\n"
-"\n"
-" --proto -all,https,+http\n"
-" only enables http and https\n"
-"\n"
-" --proto =http,https\n"
-" also only enables http and https\n"
-"\n"
-" Unknown protocols produce a warning. This allows scripts to\n"
-" safely rely on being able to disable potentially dangerous pro-\n"
-, stdout);
- fputs(
-" tocols, without relying upon support for that protocol being\n"
-" built into curl to avoid an error.\n"
-"\n"
-" This option can be used multiple times, in which case the effect\n"
-" is the same as concatenating the protocols into one instance of\n"
-" the option.\n"
-"\n"
-" (Added in 7.20.2)\n"
-"\n"
-" --proto-redir <protocols>\n"
-" Tells curl to use the listed protocols after a redirect. See\n"
-, stdout);
- fputs(
-" --proto for how protocols are represented.\n"
-"\n"
-" (Added in 7.20.2)\n"
-"\n"
-" --proxy-anyauth\n"
-" Tells curl to pick a suitable authentication method when commu-\n"
-" nicating with the given proxy. This might cause an extra\n"
-" request/response round-trip. (Added in 7.13.2)\n"
-"\n"
-" --proxy-basic\n"
-" Tells curl to use HTTP Basic authentication when communicating\n"
-, stdout);
- fputs(
-" with the given proxy. Use --basic for enabling HTTP Basic with a\n"
-" remote host. Basic is the default authentication method curl\n"
-" uses with proxies.\n"
-"\n"
-" --proxy-digest\n"
-" Tells curl to use HTTP Digest authentication when communicating\n"
-" with the given proxy. Use --digest for enabling HTTP Digest with\n"
-" a remote host.\n"
-"\n"
-" --proxy-negotiate\n"
-, stdout);
- fputs(
-" Tells curl to use HTTP Negotiate authentication when communicat-\n"
-" ing with the given proxy. Use --negotiate for enabling HTTP\n"
-" Negotiate with a remote host. (Added in 7.17.1)\n"
-"\n"
-" --proxy-ntlm\n"
-" Tells curl to use HTTP NTLM authentication when communicating\n"
-" with the given proxy. Use --ntlm for enabling NTLM with a remote\n"
-" host.\n"
-"\n"
-" --proxy1.0 <proxyhost[:port]>\n"
-, stdout);
- fputs(
-" Use the specified HTTP 1.0 proxy. If the port number is not\n"
-" specified, it is assumed at port 1080.\n"
-"\n"
-" The only difference between this and the HTTP proxy option\n"
-" (-x/--proxy), is that attempts to use CONNECT through the proxy\n"
-" will specify an HTTP 1.0 protocol instead of the default HTTP\n"
-" 1.1.\n"
-"\n"
-" -p/--proxytunnel\n"
-" When an HTTP proxy is used (-x/--proxy), this option will cause\n"
-, stdout);
- fputs(
-" non-HTTP protocols to attempt to tunnel through the proxy\n"
-" instead of merely using it to do HTTP-like operations. The tun-\n"
-" nel approach is made with the HTTP proxy CONNECT request and\n"
-" requires that the proxy allows direct connect to the remote port\n"
-" number curl wants to tunnel through to.\n"
-"\n"
-" --pubkey <key>\n"
-" (SSH) Public key file name. Allows you to provide your public\n"
-, stdout);
- fputs(
-" key in this separate file.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -P/--ftp-port <address>\n"
-" (FTP) Reverses the default initiator/listener roles when con-\n"
-" necting with FTP. This switch makes curl use active mode. In\n"
-" practice, curl then tells the server to connect back to the\n"
-" client's specified address and port, while passive mode asks the\n"
-, stdout);
- fputs(
-" server to setup an IP address and port for it to connect to.\n"
-" <address> should be one of:\n"
-"\n"
-" interface\n"
-" i.e \"eth0\" to specify which interface's IP address you\n"
-" want to use (Unix only)\n"
-"\n"
-" IP address\n"
-" i.e \"192.168.10.1\" to specify the exact IP address\n"
-"\n"
-" host name\n"
-" i.e \"my.host.domain\" to specify the machine\n"
-"\n"
-, stdout);
- fputs(
-" - make curl pick the same IP address that is already used\n"
-" for the control connection\n"
-"\n"
-" If this option is used several times, the last one will be used. Dis-\n"
-" able the use of PORT with --ftp-pasv. Disable the attempt to use the\n"
-" EPRT command instead of PORT by using --disable-eprt. EPRT is really\n"
-" PORT++.\n"
-"\n"
-" Starting in 7.19.5, you can append \":[start]-[end]\" to the right of the\n"
-, stdout);
- fputs(
-" address, to tell curl what TCP port range to use. That means you spec-\n"
-" ify a port range, from a lower to a higher number. A single number\n"
-" works as well, but do note that it increases the risk of failure since\n"
-" the port may not be available.\n"
-"\n"
-" -q If used as the first parameter on the command line, the curlrc\n"
-" config file will not be read and used. See the -K/--config for\n"
-" details on the default config file search path.\n"
-"\n"
-, stdout);
- fputs(
-" -Q/--quote <command>\n"
-" (FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP\n"
-" server. Quote commands are sent BEFORE the transfer takes place\n"
-" (just after the initial PWD command in an FTP transfer, to be\n"
-" exact). To make commands take place after a successful transfer,\n"
-" prefix them with a dash '-'. To make commands be sent after\n"
-, stdout);
- fputs(
-" libcurl has changed the working directory, just before the\n"
-" transfer command(s), prefix the command with a '+' (this is only\n"
-" supported for FTP). You may specify any number of commands. If\n"
-" the server returns failure for one of the commands, the entire\n"
-" operation will be aborted. You must send syntactically correct\n"
-" FTP commands as RFC959 defines to FTP servers, or one of the\n"
-, stdout);
- fputs(
-" commands listed below to SFTP servers. This option can be used\n"
-" multiple times.\n"
-"\n"
-" SFTP is a binary protocol. Unlike for FTP, libcurl interprets\n"
-" SFTP quote commands before sending them to the server. Follow-\n"
-" ing is the list of all supported SFTP quote commands:\n"
-"\n"
-" chgrp group file\n"
-" The chgrp command sets the group ID of the file named by\n"
-, stdout);
- fputs(
-" the file operand to the group ID specified by the group\n"
-" operand. The group operand is a decimal integer group ID.\n"
-"\n"
-" chmod mode file\n"
-" The chmod command modifies the file mode bits of the\n"
-" specified file. The mode operand is an octal integer mode\n"
-" number.\n"
-"\n"
-" chown user file\n"
-" The chown command sets the owner of the file named by the\n"
-, stdout);
- fputs(
-" file operand to the user ID specified by the user oper-\n"
-" and. The user operand is a decimal integer user ID.\n"
-"\n"
-" ln source_file target_file\n"
-" The ln and symlink commands create a symbolic link at the\n"
-" target_file location pointing to the source_file loca-\n"
-" tion.\n"
-"\n"
-" mkdir directory_name\n"
-" The mkdir command creates the directory named by the\n"
-, stdout);
- fputs(
-" directory_name operand.\n"
-"\n"
-" pwd The pwd command returns the absolute pathname of the cur-\n"
-" rent working directory.\n"
-"\n"
-" rename source target\n"
-" The rename command renames the file or directory named by\n"
-" the source operand to the destination path named by the\n"
-" target operand.\n"
-"\n"
-" rm file\n"
-, stdout);
- fputs(
-" The rm command removes the file specified by the file op-\n"
-" erand.\n"
-"\n"
-" rmdir directory\n"
-" The rmdir command removes the directory entry specified\n"
-" by the directory operand, provided it is empty.\n"
-"\n"
-" symlink source_file target_file\n"
-" See ln.\n"
-"\n"
-" --random-file <file>\n"
-" (SSL) Specify the path name to file containing what will be con-\n"
-, stdout);
- fputs(
-" sidered as random data. The data is used to seed the random\n"
-" engine for SSL connections. See also the --egd-file option.\n"
-"\n"
-" -r/--range <range>\n"
-" (HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial docu-\n"
-" ment) from a HTTP/1.1, FTP or SFTP server or a local FILE.\n"
-" Ranges can be specified in a number of ways.\n"
-"\n"
-" 0-499 specifies the first 500 bytes\n"
-"\n"
-, stdout);
- fputs(
-" 500-999 specifies the second 500 bytes\n"
-"\n"
-" -500 specifies the last 500 bytes\n"
-"\n"
-" 9500- specifies the bytes from offset 9500 and forward\n"
-"\n"
-" 0-0,-1 specifies the first and last byte only(*)(H)\n"
-"\n"
-" 500-700,600-799\n"
-" specifies 300 bytes from offset 500(H)\n"
-"\n"
-" 100-199,500-599\n"
-" specifies two separate 100-byte ranges(*)(H)\n"
-"\n"
-, stdout);
- fputs(
-" (*) = NOTE that this will cause the server to reply with a multipart\n"
-" response!\n"
-"\n"
-" Only digit characters (0-9) are valid in the 'start' and 'stop' fields\n"
-" of the 'start-stop' range syntax. If a non-digit character is given in\n"
-" the range, the server's response will be unspecified, depending on the\n"
-" server's configuration.\n"
-"\n"
-" You should also be aware that many HTTP/1.1 servers do not have this\n"
-, stdout);
- fputs(
-" feature enabled, so that when you attempt to get a range, you'll\n"
-" instead get the whole document.\n"
-"\n"
-" FTP and SFTP range downloads only support the simple 'start-stop' syn-\n"
-" tax (optionally with one of the numbers omitted). FTP use depends on\n"
-" the extended FTP command SIZE.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --raw When used, it disables all internal HTTP decoding of content or\n"
-, stdout);
- fputs(
-" transfer encodings and instead makes them passed on unaltered,\n"
-" raw. (Added in 7.16.2)\n"
-"\n"
-" -R/--remote-time\n"
-" When used, this will make libcurl attempt to figure out the\n"
-" timestamp of the remote file, and if that is available make the\n"
-" local file get that same timestamp.\n"
-"\n"
-" --retry <num>\n"
-" If a transient error is returned when curl tries to perform a\n"
-, stdout);
- fputs(
-" transfer, it will retry this number of times before giving up.\n"
-" Setting the number to 0 makes curl do no retries (which is the\n"
-" default). Transient error means either: a timeout, an FTP 4xx\n"
-" response code or an HTTP 5xx response code.\n"
-"\n"
-" When curl is about to retry a transfer, it will first wait one\n"
-" second and then for all forthcoming retries it will double the\n"
-, stdout);
- fputs(
-" waiting time until it reaches 10 minutes which then will be the\n"
-" delay between the rest of the retries. By using --retry-delay\n"
-" you disable this exponential backoff algorithm. See also\n"
-" --retry-max-time to limit the total time allowed for retries.\n"
-" (Added in 7.12.3)\n"
-"\n"
-" If this option is used multiple times, the last occurrence\n"
-" decide the amount.\n"
-"\n"
-" --retry-delay <seconds>\n"
-, stdout);
- fputs(
-" Make curl sleep this amount of time before each retry when a\n"
-" transfer has failed with a transient error (it changes the\n"
-" default backoff time algorithm between retries). This option is\n"
-" only interesting if --retry is also used. Setting this delay to\n"
-" zero will make curl use the default backoff time. (Added in\n"
-" 7.12.3)\n"
-"\n"
-" If this option is used multiple times, the last occurrence\n"
-, stdout);
- fputs(
-" determines the amount.\n"
-"\n"
-" --retry-max-time <seconds>\n"
-" The retry timer is reset before the first transfer attempt.\n"
-" Retries will be done as usual (see --retry) as long as the timer\n"
-" hasn't reached this given limit. Notice that if the timer hasn't\n"
-" reached the limit, the request will be made and while perform-\n"
-" ing, it may take longer than this given time period. To limit a\n"
-, stdout);
- fputs(
-" single request's maximum time, use -m/--max-time. Set this\n"
-" option to zero to not timeout retries. (Added in 7.12.3)\n"
-"\n"
-" If this option is used multiple times, the last occurrence\n"
-" determines the amount.\n"
-"\n"
-" -s/--silent\n"
-" Silent or quiet mode. Don't show progress meter or error mes-\n"
-" sages. Makes Curl mute.\n"
-"\n"
-" -S/--show-error\n"
-, stdout);
- fputs(
-" When used with -s it makes curl show an error message if it\n"
-" fails.\n"
-"\n"
-" --socks4 <host[:port]>\n"
-" Use the specified SOCKS4 proxy. If the port number is not speci-\n"
-" fied, it is assumed at port 1080. (Added in 7.15.2)\n"
-"\n"
-" This option overrides any previous use of -x/--proxy, as they\n"
-" are mutually exclusive.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-, stdout);
- fputs(
-" --socks4a <host[:port]>\n"
-" Use the specified SOCKS4a proxy. If the port number is not spec-\n"
-" ified, it is assumed at port 1080. (Added in 7.18.0)\n"
-"\n"
-" This option overrides any previous use of -x/--proxy, as they\n"
-" are mutually exclusive.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --socks5-hostname <host[:port]>\n"
-" Use the specified SOCKS5 proxy (and let the proxy resolve the\n"
-, stdout);
- fputs(
-" host name). If the port number is not specified, it is assumed\n"
-" at port 1080. (Added in 7.18.0)\n"
-"\n"
-" This option overrides any previous use of -x/--proxy, as they\n"
-" are mutually exclusive.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-" (This option was previously wrongly documented and used as\n"
-" --socks without the number appended.)\n"
-"\n"
-" --socks5 <host[:port]>\n"
-, stdout);
- fputs(
-" Use the specified SOCKS5 proxy - but resolve the host name\n"
-" locally. If the port number is not specified, it is assumed at\n"
-" port 1080.\n"
-"\n"
-" This option overrides any previous use of -x/--proxy, as they\n"
-" are mutually exclusive.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-" (This option was previously wrongly documented and used as\n"
-, stdout);
- fputs(
-" --socks without the number appended.)\n"
-"\n"
-" This option (as well as --socks4) does not work with IPV6, FTPS\n"
-" or LDAP.\n"
-"\n"
-" --socks5-gssapi-service <servicename>\n"
-" The default service name for a socks server is rcmd/server-fqdn.\n"
-" This option allows you to change it.\n"
-"\n"
-" Examples:\n"
-" --socks5 proxy-name --socks5-gssapi-service sockd would use\n"
-" sockd/proxy-name\n"
-, stdout);
- fputs(
-" --socks5 proxy-name --socks5-gssapi-service sockd/real-name\n"
-" would use sockd/real-name for cases where the proxy-name does\n"
-" not match the princpal name.\n"
-" (Added in 7.19.4).\n"
-"\n"
-" --socks5-gssapi-nec\n"
-" As part of the gssapi negotiation a protection mode is negoti-\n"
-" ated. The rfc1961 says in section 4.3/4.4 it should be pro-\n"
-" tected, but the NEC reference implementation does not. The\n"
-, stdout);
- fputs(
-" option --socks5-gssapi-nec allows the unprotected exchange of\n"
-" the protection mode negotiation. (Added in 7.19.4).\n"
-"\n"
-" --stderr <file>\n"
-" Redirect all writes to stderr to the specified file instead. If\n"
-" the file name is a plain '-', it is instead written to stdout.\n"
-" This option has no point when you're using a shell with decent\n"
-" redirecting capabilities.\n"
-"\n"
-, stdout);
- fputs(
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --tcp-nodelay\n"
-" Turn on the TCP_NODELAY option. See the curl_easy_setopt(3) man\n"
-" page for details about this option. (Added in 7.11.2)\n"
-"\n"
-" -t/--telnet-option <OPT=val>\n"
-" Pass options to the telnet protocol. Supported options are:\n"
-"\n"
-" TTYPE=<term> Sets the terminal type.\n"
-"\n"
-" XDISPLOC=<X display> Sets the X display location.\n"
-"\n"
-, stdout);
- fputs(
-" NEW_ENV=<var,val> Sets an environment variable.\n"
-"\n"
-" --tftp-blksize <value>\n"
-" (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block\n"
-" size that curl will try to use when tranferring data to or from\n"
-" a TFTP server. By default 512 bytes will be used.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" (Added in 7.20.0)\n"
-"\n"
-" -T/--upload-file <file>\n"
-, stdout);
- fputs(
-" This transfers the specified local file to the remote URL. If\n"
-" there is no file part in the specified URL, Curl will append the\n"
-" local file name. NOTE that you must use a trailing / on the last\n"
-" directory to really prove to Curl that there is no file name or\n"
-" curl will think that your last directory name is the remote file\n"
-" name to use. That will most likely cause the upload operation to\n"
-, stdout);
- fputs(
-" fail. If this is used on a HTTP(S) server, the PUT command will\n"
-" be used.\n"
-"\n"
-" Use the file name \"-\" (a single dash) to use stdin instead of a\n"
-" given file. Alternately, the file name \".\" (a single period)\n"
-" may be specified instead of \"-\" to use stdin in non-blocking\n"
-" mode to allow reading server output while stdin is being\n"
-" uploaded.\n"
-"\n"
-, stdout);
- fputs(
-" You can specify one -T for each URL on the command line. Each -T\n"
-" + URL pair specifies what to upload and to where. curl also sup-\n"
-" ports \"globbing\" of the -T argument, meaning that you can upload\n"
-" multiple files to a single URL by using the same URL globbing\n"
-" style supported in the URL, like this:\n"
-"\n"
-" curl -T \"{file1,file2}\" http://www.uploadtothissite.com\n"
-"\n"
-" or even\n"
-"\n"
-, stdout);
- fputs(
-" curl -T \"img[1-1000].png\" ftp://ftp.picturemania.com/upload/\n"
-"\n"
-" --trace <file>\n"
-" Enables a full trace dump of all incoming and outgoing data,\n"
-" including descriptive information, to the given output file. Use\n"
-" \"-\" as filename to have the output sent to stdout.\n"
-"\n"
-" This option overrides previous uses of -v/--verbose or --trace-\n"
-" ascii.\n"
-"\n"
-, stdout);
- fputs(
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --trace-ascii <file>\n"
-" Enables a full trace dump of all incoming and outgoing data,\n"
-" including descriptive information, to the given output file. Use\n"
-" \"-\" as filename to have the output sent to stdout.\n"
-"\n"
-" This is very similar to --trace, but leaves out the hex part and\n"
-" only shows the ASCII part of the dump. It makes smaller output\n"
-, stdout);
- fputs(
-" that might be easier to read for untrained humans.\n"
-"\n"
-" This option overrides previous uses of -v/--verbose or --trace.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --trace-time\n"
-" Prepends a time stamp to each trace or verbose line that curl\n"
-" displays. (Added in 7.14.0)\n"
-"\n"
-" -u/--user <user:password>\n"
-" Specify the user name and password to use for server authentica-\n"
-, stdout);
- fputs(
-" tion. Overrides -n/--netrc and --netrc-optional.\n"
-"\n"
-" If you just give the user name (without entering a colon) curl\n"
-" will prompt for a password.\n"
-"\n"
-" If you use an SSPI-enabled curl binary and do NTLM authentica-\n"
-" tion, you can force curl to pick up the user name and password\n"
-" from your environment by simply specifying a single colon with\n"
-" this option: \"-u :\".\n"
-"\n"
-, stdout);
- fputs(
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -U/--proxy-user <user:password>\n"
-" Specify the user name and password to use for proxy authentica-\n"
-" tion.\n"
-"\n"
-" If you use an SSPI-enabled curl binary and do NTLM authentica-\n"
-" tion, you can force curl to pick up the user name and password\n"
-" from your environment by simply specifying a single colon with\n"
-" this option: \"-U :\".\n"
-"\n"
-, stdout);
- fputs(
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --url <URL>\n"
-" Specify a URL to fetch. This option is mostly handy when you\n"
-" want to specify URL(s) in a config file.\n"
-"\n"
-" This option may be used any number of times. To control where\n"
-" this URL is written, use the -o/--output or the -O/--remote-name\n"
-" options.\n"
-"\n"
-" -v/--verbose\n"
-, stdout);
- fputs(
-" Makes the fetching more verbose/talkative. Mostly useful for\n"
-" debugging. A line starting with '>' means \"header data\" sent by\n"
-" curl, '<' means \"header data\" received by curl that is hidden in\n"
-" normal cases, and a line starting with '*' means additional info\n"
-" provided by curl.\n"
-"\n"
-" Note that if you only want HTTP headers in the output,\n"
-" -i/--include might be the option you're looking for.\n"
-"\n"
-, stdout);
- fputs(
-" If you think this option still doesn't give you enough details,\n"
-" consider using --trace or --trace-ascii instead.\n"
-"\n"
-" This option overrides previous uses of --trace-ascii or --trace.\n"
-"\n"
-" Use -S/--silent to make curl quiet.\n"
-"\n"
-" -V/--version\n"
-" Displays information about curl and the libcurl version it uses.\n"
-" The first line includes the full version of curl, libcurl and\n"
-, stdout);
- fputs(
-" other 3rd party libraries linked with the executable.\n"
-"\n"
-" The second line (starts with \"Protocols:\") shows all protocols\n"
-" that libcurl reports to support.\n"
-"\n"
-" The third line (starts with \"Features:\") shows specific features\n"
-" libcurl reports to offer. Available features include:\n"
-"\n"
-" IPv6 You can use IPv6 with this.\n"
-"\n"
-" krb4 Krb4 for FTP is supported.\n"
-"\n"
-" SSL HTTPS and FTPS are supported.\n"
-"\n"
-, stdout);
- fputs(
-" libz Automatic decompression of compressed files over HTTP is\n"
-" supported.\n"
-"\n"
-" NTLM NTLM authentication is supported.\n"
-"\n"
-" GSS-Negotiate\n"
-" Negotiate authentication and krb5 for FTP is supported.\n"
-"\n"
-" Debug This curl uses a libcurl built with Debug. This enables\n"
-" more error-tracking and memory debugging etc. For curl-\n"
-" developers only!\n"
-"\n"
-" AsynchDNS\n"
-, stdout);
- fputs(
-" This curl uses asynchronous name resolves.\n"
-"\n"
-" SPNEGO SPNEGO Negotiate authentication is supported.\n"
-"\n"
-" Largefile\n"
-" This curl supports transfers of large files, files larger\n"
-" than 2GB.\n"
-"\n"
-" IDN This curl supports IDN - international domain names.\n"
-"\n"
-" SSPI SSPI is supported. If you use NTLM and set a blank user\n"
-, stdout);
- fputs(
-" name, curl will authenticate with your current user and\n"
-" password.\n"
-"\n"
-" -w/--write-out <format>\n"
-" Defines what to display on stdout after a completed and success-\n"
-" ful operation. The format is a string that may contain plain\n"
-" text mixed with any number of variables. The string can be spec-\n"
-" ified as \"string\", to get read from a particular file you spec-\n"
-, stdout);
- fputs(
-" ify it \"@filename\" and to tell curl to read the format from\n"
-" stdin you write \"@-\".\n"
-"\n"
-" The variables present in the output format will be substituted\n"
-" by the value or text that curl thinks fit, as described below.\n"
-" All variables are specified as %{variable_name} and to output a\n"
-" normal % you just write them as %%. You can output a newline by\n"
-, stdout);
- fputs(
-" using \\n, a carriage return with \\r and a tab space with \\t.\n"
-"\n"
-" NOTE: The %-symbol is a special symbol in the win32-environment,\n"
-" where all occurrences of % must be doubled when using this\n"
-" option.\n"
-"\n"
-" The variables available at this point are:\n"
-"\n"
-" url_effective The URL that was fetched last. This is most mean-\n"
-" ingful if you've told curl to follow location:\n"
-, stdout);
- fputs(
-" headers.\n"
-"\n"
-" http_code The numerical response code that was found in the\n"
-" last retrieved HTTP(S) or FTP(s) transfer. In\n"
-" 7.18.2 the alias response_code was added to show\n"
-" the same info.\n"
-"\n"
-" http_connect The numerical code that was found in the last\n"
-" response (from a proxy) to a curl CONNECT\n"
-, stdout);
- fputs(
-" request. (Added in 7.12.4)\n"
-"\n"
-" time_total The total time, in seconds, that the full opera-\n"
-" tion lasted. The time will be displayed with mil-\n"
-" lisecond resolution.\n"
-"\n"
-" time_namelookup\n"
-" The time, in seconds, it took from the start\n"
-" until the name resolving was completed.\n"
-"\n"
-, stdout);
- fputs(
-" time_connect The time, in seconds, it took from the start\n"
-" until the TCP connect to the remote host (or\n"
-" proxy) was completed.\n"
-"\n"
-" time_appconnect\n"
-" The time, in seconds, it took from the start\n"
-" until the SSL/SSH/etc connect/handshake to the\n"
-" remote host was completed. (Added in 7.19.0)\n"
-"\n"
-, stdout);
- fputs(
-" time_pretransfer\n"
-" The time, in seconds, it took from the start\n"
-" until the file transfer was just about to begin.\n"
-" This includes all pre-transfer commands and nego-\n"
-" tiations that are specific to the particular pro-\n"
-" tocol(s) involved.\n"
-"\n"
-" time_redirect The time, in seconds, it took for all redirection\n"
-, stdout);
- fputs(
-" steps include name lookup, connect, pretransfer\n"
-" and transfer before the final transaction was\n"
-" started. time_redirect shows the complete execu-\n"
-" tion time for multiple redirections. (Added in\n"
-" 7.12.3)\n"
-"\n"
-" time_starttransfer\n"
-" The time, in seconds, it took from the start\n"
-, stdout);
- fputs(
-" until the first byte was just about to be trans-\n"
-" ferred. This includes time_pretransfer and also\n"
-" the time the server needed to calculate the\n"
-" result.\n"
-"\n"
-" size_download The total amount of bytes that were downloaded.\n"
-"\n"
-" size_upload The total amount of bytes that were uploaded.\n"
-"\n"
-, stdout);
- fputs(
-" size_header The total amount of bytes of the downloaded head-\n"
-" ers.\n"
-"\n"
-" size_request The total amount of bytes that were sent in the\n"
-" HTTP request.\n"
-"\n"
-" speed_download The average download speed that curl measured for\n"
-" the complete download. Bytes per second.\n"
-"\n"
-" speed_upload The average upload speed that curl measured for\n"
-, stdout);
- fputs(
-" the complete upload. Bytes per second.\n"
-"\n"
-" content_type The Content-Type of the requested document, if\n"
-" there was any.\n"
-"\n"
-" num_connects Number of new connects made in the recent trans-\n"
-" fer. (Added in 7.12.3)\n"
-"\n"
-" num_redirects Number of redirects that were followed in the\n"
-" request. (Added in 7.12.3)\n"
-"\n"
-, stdout);
- fputs(
-" redirect_url When a HTTP request was made without -L to follow\n"
-" redirects, this variable will show the actual URL\n"
-" a redirect would take you to. (Added in 7.18.2)\n"
-"\n"
-" ftp_entry_path The initial path libcurl ended up in when logging\n"
-" on to the remote FTP server. (Added in 7.15.4)\n"
-"\n"
-" ssl_verify_result\n"
-, stdout);
- fputs(
-" The result of the SSL peer certificate verifica-\n"
-" tion that was requested. 0 means the verification\n"
-" was successful. (Added in 7.19.0)\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -x/--proxy <proxyhost[:port]>\n"
-" Use the specified HTTP proxy. If the port number is not speci-\n"
-" fied, it is assumed at port 1080.\n"
-"\n"
-, stdout);
- fputs(
-" This option overrides existing environment variables that set\n"
-" the proxy to use. If there's an environment variable setting a\n"
-" proxy, you can set proxy to \"\" to override it.\n"
-"\n"
-" Note that all operations that are performed over a HTTP proxy\n"
-" will transparently be converted to HTTP. It means that certain\n"
-" protocol specific operations might not be available. This is not\n"
-, stdout);
- fputs(
-" the case if you can tunnel through the proxy, as done with the\n"
-" -p/--proxytunnel option.\n"
-"\n"
-" Starting with 7.14.1, the proxy host can be specified the exact\n"
-" same way as the proxy environment variables, including the pro-\n"
-" tocol prefix (http://) and the embedded user + password.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -X/--request <command>\n"
-, stdout);
- fputs(
-" (HTTP) Specifies a custom request method to use when communicat-\n"
-" ing with the HTTP server. The specified request will be used\n"
-" instead of the method otherwise used (which defaults to GET).\n"
-" Read the HTTP 1.1 specification for details and explanations.\n"
-" Common additional HTTP requests include PUT and DELETE, but\n"
-" related technologies like WebDAV offers PROPFIND, COPY, MOVE and\n"
-" more.\n"
-"\n"
-, stdout);
- fputs(
-" (FTP) Specifies a custom FTP command to use instead of LIST when\n"
-" doing file lists with FTP.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -y/--speed-time <time>\n"
-" If a download is slower than speed-limit bytes per second during\n"
-" a speed-time period, the download gets aborted. If speed-time is\n"
-" used, the default speed-limit will be 1 unless set with -Y.\n"
-"\n"
-, stdout);
- fputs(
-" This option controls transfers and thus will not affect slow\n"
-" connects etc. If this is a concern for you, try the --connect-\n"
-" timeout option.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -Y/--speed-limit <speed>\n"
-" If a download is slower than this given speed (in bytes per sec-\n"
-" ond) for speed-time seconds it gets aborted. speed-time is set\n"
-, stdout);
- fputs(
-" with -y and is 30 if not set.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -z/--time-cond <date expression>\n"
-" (HTTP/FTP) Request a file that has been modified later than the\n"
-" given time and date, or one that has been modified before that\n"
-" time. The date expression can be all sorts of date strings or if\n"
-" it doesn't match any internal ones, it tries to get the time\n"
-, stdout);
- fputs(
-" from a given file name instead! See the curl_getdate(3) man\n"
-" pages for date expression details.\n"
-"\n"
-" Start the date expression with a dash (-) to make it request for\n"
-" a document that is older than the given date/time, default is a\n"
-" document that is newer than the specified date/time.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" --max-redirs <num>\n"
-, stdout);
- fputs(
-" Set maximum number of redirection-followings allowed. If\n"
-" -L/--location is used, this option can be used to prevent curl\n"
-" from following redirections \"in absurdum\". By default, the limit\n"
-" is set to 50 redirections. Set this option to -1 to make it lim-\n"
-" itless.\n"
-"\n"
-" If this option is used several times, the last one will be used.\n"
-"\n"
-" -0/--http1.0\n"
-, stdout);
- fputs(
-" (HTTP) Forces curl to issue its requests using HTTP 1.0 instead\n"
-" of using its internally preferred: HTTP 1.1.\n"
-"\n"
-" -1/--tlsv1\n"
-" (SSL) Forces curl to use TLS version 1 when negotiating with a\n"
-" remote TLS server.\n"
-"\n"
-" -2/--sslv2\n"
-" (SSL) Forces curl to use SSL version 2 when negotiating with a\n"
-" remote SSL server.\n"
-"\n"
-" -3/--sslv3\n"
-" (SSL) Forces curl to use SSL version 3 when negotiating with a\n"
-, stdout);
- fputs(
-" remote SSL server.\n"
-"\n"
-" -4/--ipv4\n"
-" If libcurl is capable of resolving an address to multiple IP\n"
-" versions (which it is if it is IPv6-capable), this option tells\n"
-" libcurl to resolve names to IPv4 addresses only.\n"
-"\n"
-" -6/--ipv6\n"
-" If libcurl is capable of resolving an address to multiple IP\n"
-" versions (which it is if it is IPv6-capable), this option tells\n"
-, stdout);
- fputs(
-" libcurl to resolve names to IPv6 addresses only.\n"
-"\n"
-" -#/--progress-bar\n"
-" Make curl display progress information as a progress bar instead\n"
-" of the default statistics.\n"
-"\n"
-"FILES\n"
-" ~/.curlrc\n"
-" Default config file, see -K/--config for details.\n"
-"\n"
-"ENVIRONMENT\n"
-" The environment variables can be specified in lower case or upper case.\n"
-" The lower case version has precedence. http_proxy is an exception as it\n"
-, stdout);
- fputs(
-" is only available in lower case.\n"
-"\n"
-" http_proxy [protocol://]<host>[:port]\n"
-" Sets the proxy server to use for HTTP.\n"
-" HTTPS_PROXY [protocol://]<host>[:port]\n"
-" Sets the proxy server to use for HTTPS.\n"
-"\n"
-" FTP_PROXY [protocol://]<host>[:port]\n"
-" Sets the proxy server to use for FTP.\n"
-"\n"
-" ALL_PROXY [protocol://]<host>[:port]\n"
-" Sets the proxy server to use if no protocol-specific proxy is\n"
-" set.\n"
-"\n"
-, stdout);
- fputs(
-" NO_PROXY <comma-separated list of hosts>\n"
-" list of host names that shouldn't go through any proxy. If set\n"
-" to a asterisk '*' only, it matches all hosts.\n"
-"\n"
-"EXIT CODES\n"
-" There are a bunch of different error codes and their corresponding\n"
-" error messages that may appear during bad conditions. At the time of\n"
-" this writing, the exit codes are:\n"
-"\n"
-" 1 Unsupported protocol. This build of curl has no support for this\n"
-, stdout);
- fputs(
-" protocol.\n"
-"\n"
-" 2 Failed to initialize.\n"
-"\n"
-" 3 URL malformed. The syntax was not correct.\n"
-"\n"
-" 5 Couldn't resolve proxy. The given proxy host could not be\n"
-" resolved.\n"
-"\n"
-" 6 Couldn't resolve host. The given remote host was not resolved.\n"
-"\n"
-" 7 Failed to connect to host.\n"
-"\n"
-" 8 FTP weird server reply. The server sent data curl couldn't\n"
-" parse.\n"
-"\n"
-, stdout);
- fputs(
-" 9 FTP access denied. The server denied login or denied access to\n"
-" the particular resource or directory you wanted to reach. Most\n"
-" often you tried to change to a directory that doesn't exist on\n"
-" the server.\n"
-"\n"
-" 11 FTP weird PASS reply. Curl couldn't parse the reply sent to the\n"
-" PASS request.\n"
-"\n"
-" 13 FTP weird PASV reply, Curl couldn't parse the reply sent to the\n"
-" PASV request.\n"
-"\n"
-, stdout);
- fputs(
-" 14 FTP weird 227 format. Curl couldn't parse the 227-line the\n"
-" server sent.\n"
-"\n"
-" 15 FTP can't get host. Couldn't resolve the host IP we got in the\n"
-" 227-line.\n"
-"\n"
-" 17 FTP couldn't set binary. Couldn't change transfer method to\n"
-" binary.\n"
-"\n"
-" 18 Partial file. Only a part of the file was transferred.\n"
-"\n"
-" 19 FTP couldn't download/access the given file, the RETR (or simi-\n"
-" lar) command failed.\n"
-"\n"
-, stdout);
- fputs(
-" 21 FTP quote error. A quote command returned error from the server.\n"
-" 22 HTTP page not retrieved. The requested url was not found or\n"
-" returned another error with the HTTP error code being 400 or\n"
-" above. This return code only appears if -f/--fail is used.\n"
-"\n"
-" 23 Write error. Curl couldn't write data to a local filesystem or\n"
-" similar.\n"
-"\n"
-" 25 FTP couldn't STOR file. The server denied the STOR operation,\n"
-, stdout);
- fputs(
-" used for FTP uploading.\n"
-"\n"
-" 26 Read error. Various reading problems.\n"
-"\n"
-" 27 Out of memory. A memory allocation request failed.\n"
-"\n"
-" 28 Operation timeout. The specified time-out period was reached\n"
-" according to the conditions.\n"
-"\n"
-" 30 FTP PORT failed. The PORT command failed. Not all FTP servers\n"
-" support the PORT command, try doing a transfer using PASV\n"
-" instead!\n"
-"\n"
-, stdout);
- fputs(
-" 31 FTP couldn't use REST. The REST command failed. This command is\n"
-" used for resumed FTP transfers.\n"
-"\n"
-" 33 HTTP range error. The range \"command\" didn't work.\n"
-"\n"
-" 34 HTTP post error. Internal post-request generation error.\n"
-"\n"
-" 35 SSL connect error. The SSL handshaking failed.\n"
-"\n"
-" 36 FTP bad download resume. Couldn't continue an earlier aborted\n"
-" download.\n"
-"\n"
-, stdout);
- fputs(
-" 37 FILE couldn't read file. Failed to open the file. Permissions?\n"
-"\n"
-" 38 LDAP cannot bind. LDAP bind operation failed.\n"
-"\n"
-" 39 LDAP search failed.\n"
-"\n"
-" 41 Function not found. A required LDAP function was not found.\n"
-"\n"
-" 42 Aborted by callback. An application told curl to abort the oper-\n"
-" ation.\n"
-"\n"
-" 43 Internal error. A function was called with a bad parameter.\n"
-"\n"
-, stdout);
- fputs(
-" 45 Interface error. A specified outgoing interface could not be\n"
-" used.\n"
-"\n"
-" 47 Too many redirects. When following redirects, curl hit the maxi-\n"
-" mum amount.\n"
-"\n"
-" 48 Unknown TELNET option specified.\n"
-"\n"
-" 49 Malformed telnet option.\n"
-"\n"
-" 51 The peer's SSL certificate or SSH MD5 fingerprint was not ok.\n"
-"\n"
-" 52 The server didn't reply anything, which here is considered an\n"
-" error.\n"
-"\n"
-, stdout);
- fputs(
-" 53 SSL crypto engine not found.\n"
-"\n"
-" 54 Cannot set SSL crypto engine as default.\n"
-"\n"
-" 55 Failed sending network data.\n"
-"\n"
-" 56 Failure in receiving network data.\n"
-"\n"
-" 58 Problem with the local certificate.\n"
-"\n"
-" 59 Couldn't use specified SSL cipher.\n"
-"\n"
-" 60 Peer certificate cannot be authenticated with known CA certifi-\n"
-" cates.\n"
-"\n"
-" 61 Unrecognized transfer encoding.\n"
-"\n"
-" 62 Invalid LDAP URL.\n"
-"\n"
-, stdout);
- fputs(
-" 63 Maximum file size exceeded.\n"
-"\n"
-" 64 Requested FTP SSL level failed.\n"
-"\n"
-" 65 Sending the data requires a rewind that failed.\n"
-"\n"
-" 66 Failed to initialise SSL Engine.\n"
-"\n"
-" 67 The user name, password, or similar was not accepted and curl\n"
-" failed to log in.\n"
-"\n"
-" 68 File not found on TFTP server.\n"
-"\n"
-" 69 Permission problem on TFTP server.\n"
-"\n"
-" 70 Out of disk space on TFTP server.\n"
-"\n"
-" 71 Illegal TFTP operation.\n"
-"\n"
-, stdout);
- fputs(
-" 72 Unknown TFTP transfer ID.\n"
-"\n"
-" 73 File already exists (TFTP).\n"
-"\n"
-" 74 No such user (TFTP).\n"
-"\n"
-" 75 Character conversion failed.\n"
-"\n"
-" 76 Character conversion functions required.\n"
-"\n"
-" 77 Problem with reading the SSL CA cert (path? access rights?).\n"
-"\n"
-" 78 The resource referenced in the URL does not exist.\n"
-"\n"
-" 79 An unspecified error occurred during the SSH session.\n"
-"\n"
-" 80 Failed to shut down the SSL connection.\n"
-"\n"
-, stdout);
- fputs(
-" 82 Could not load CRL file, missing or wrong format (added in\n"
-" 7.19.0).\n"
-"\n"
-" 83 Issuer check failed (added in 7.19.0).\n"
-"\n"
-" XX More error codes will appear here in future releases. The exist-\n"
-" ing ones are meant to never change.\n"
-"\n"
-"AUTHORS / CONTRIBUTORS\n"
-" Daniel Stenberg is the main author, but the whole list of contributors\n"
-" is found in the separate THANKS file.\n"
-"\n"
-"WWW\n"
-" http://curl.haxx.se\n"
-"\n"
-"FTP\n"
-, stdout);
- fputs(
-" ftp://ftp.sunet.se/pub/www/utilities/curl/\n"
-"\n"
-"SEE ALSO\n"
-" ftp(1), wget(1)\n"
-"\n"
-"LATEST VERSION\n"
-"\n"
-" You always find news about what's going on as well as the latest versions\n"
-" from the curl web pages, located at:\n"
-"\n"
-" http://curl.haxx.se\n"
-"\n"
-"SIMPLE USAGE\n"
-"\n"
-" Get the main page from Netscape's web-server:\n"
-"\n"
-" curl http://www.netscape.com/\n"
-"\n"
-" Get the README file the user's home directory at funet's ftp-server:\n"
-"\n"
-" curl ftp://ftp.funet.fi/README\n"
-"\n"
-, stdout);
- fputs(
-" Get a web page from a server using port 8000:\n"
-"\n"
-" curl http://www.weirdserver.com:8000/\n"
-"\n"
-" Get a list of a directory of an FTP site:\n"
-"\n"
-" curl ftp://cool.haxx.se/\n"
-"\n"
-" Get the definition of curl from a dictionary:\n"
-"\n"
-" curl dict://dict.org/m:curl\n"
-"\n"
-" Fetch two documents at once:\n"
-"\n"
-" curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/\n"
-"\n"
-" Get a file off an FTPS server:\n"
-"\n"
-" curl ftps://files.are.secure.com/secrets.txt\n"
-"\n"
-, stdout);
- fputs(
-" or use the more appropriate FTPS way to get the same file:\n"
-"\n"
-" curl --ftp-ssl ftp://files.are.secure.com/secrets.txt\n"
-"\n"
-" Get a file from an SSH server using SFTP:\n"
-"\n"
-" curl -u username sftp://shell.example.com/etc/issue\n"
-"\n"
-" Get a file from an SSH server using SCP using a private key to authenticate:\n"
-"\n"
-" curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \\\n"
-" scp://shell.example.com/~/personal.txt\n"
-"\n"
-" Get the main page from an IPv6 web server:\n"
-"\n"
-, stdout);
- fputs(
-" curl -g \"http://[2001:1890:1112:1::20]/\"\n"
-"\n"
-"DOWNLOAD TO A FILE\n"
-"\n"
-" Get a web page and store in a local file:\n"
-"\n"
-" curl -o thatpage.html http://www.netscape.com/\n"
-"\n"
-" Get a web page and store in a local file, make the local file get the name\n"
-" of the remote document (if no file name part is specified in the URL, this\n"
-" will fail):\n"
-"\n"
-" curl -O http://www.netscape.com/index.html\n"
-"\n"
-" Fetch two files and store them with their remote names:\n"
-"\n"
-, stdout);
- fputs(
-" curl -O www.haxx.se/index.html -O curl.haxx.se/download.html\n"
-"\n"
-"USING PASSWORDS\n"
-"\n"
-" FTP\n"
-"\n"
-" To ftp files using name+passwd, include them in the URL like:\n"
-"\n"
-" curl ftp://name:passwd@machine.domain:port/full/path/to/file\n"
-"\n"
-" or specify them with the -u flag like\n"
-"\n"
-" curl -u name:passwd ftp://machine.domain:port/full/path/to/file\n"
-"\n"
-" FTPS\n"
-"\n"
-" It is just like for FTP, but you may also want to specify and use\n"
-" SSL-specific options for certificates etc.\n"
-"\n"
-, stdout);
- fputs(
-" Note that using FTPS:// as prefix is the \"implicit\" way as described in the\n"
-" standards while the recommended \"explicit\" way is done by using FTP:// and\n"
-" the --ftp-ssl option.\n"
-"\n"
-" SFTP / SCP\n"
-"\n"
-" This is similar to FTP, but you can specify a private key to use instead of\n"
-" a password. Note that the private key may itself be protected by a password\n"
-" that is unrelated to the login password of the remote system. If you\n"
-" provide a private key file you must also provide a public key file.\n"
-, stdout);
- fputs(
-"\n"
-" HTTP\n"
-"\n"
-" Curl also supports user and password in HTTP URLs, thus you can pick a file\n"
-" like:\n"
-"\n"
-" curl http://name:passwd@machine.domain/full/path/to/file\n"
-"\n"
-" or specify user and password separately like in\n"
-"\n"
-" curl -u name:passwd http://machine.domain/full/path/to/file\n"
-"\n"
-" HTTP offers many different methods of authentication and curl supports\n"
-" several: Basic, Digest, NTLM and Negotiate. Without telling which method to\n"
-, stdout);
- fputs(
-" use, curl defaults to Basic. You can also ask curl to pick the most secure\n"
-" ones out of the ones that the server accepts for the given URL, by using\n"
-" --anyauth.\n"
-"\n"
-" NOTE! Since HTTP URLs don't support user and password, you can't use that\n"
-" style when using Curl via a proxy. You _must_ use the -u style fetch\n"
-" during such circumstances.\n"
-"\n"
-" HTTPS\n"
-"\n"
-" Probably most commonly used with private certificates, as explained below.\n"
-"\n"
-"PROXY\n"
-"\n"
-, stdout);
- fputs(
-" Get an ftp file using a proxy named my-proxy that uses port 888:\n"
-"\n"
-" curl -x my-proxy:888 ftp://ftp.leachsite.com/README\n"
-"\n"
-" Get a file from a HTTP server that requires user and password, using the\n"
-" same proxy as above:\n"
-"\n"
-" curl -u user:passwd -x my-proxy:888 http://www.get.this/\n"
-"\n"
-" Some proxies require special authentication. Specify by using -U as above:\n"
-"\n"
-" curl -U user:passwd -x my-proxy:888 http://www.get.this/\n"
-"\n"
-, stdout);
- fputs(
-" A comma-separated list of hosts and domains which do not use the proxy can\n"
-" be specified as:\n"
-"\n"
-" curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/\n"
-"\n"
-" If the proxy is specified with --proxy1.0 instead of --proxy or -x, then\n"
-" curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.\n"
-"\n"
-" curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.\n"
-"\n"
-" See also the environment variables Curl support that offer further proxy\n"
-" control.\n"
-"\n"
-"RANGES\n"
-"\n"
-, stdout);
- fputs(
-" With HTTP 1.1 byte-ranges were introduced. Using this, a client can request\n"
-" to get only one or more subparts of a specified document. Curl supports\n"
-" this with the -r flag.\n"
-"\n"
-" Get the first 100 bytes of a document:\n"
-"\n"
-" curl -r 0-99 http://www.get.this/\n"
-"\n"
-" Get the last 500 bytes of a document:\n"
-"\n"
-" curl -r -500 http://www.get.this/\n"
-"\n"
-" Curl also supports simple ranges for FTP files as well. Then you can only\n"
-" specify start and stop position.\n"
-"\n"
-, stdout);
- fputs(
-" Get the first 100 bytes of a document using FTP:\n"
-"\n"
-" curl -r 0-99 ftp://www.get.this/README\n"
-"\n"
-"UPLOADING\n"
-"\n"
-" FTP / FTPS / SFTP / SCP\n"
-"\n"
-" Upload all data on stdin to a specified server:\n"
-"\n"
-" curl -T - ftp://ftp.upload.com/myfile\n"
-"\n"
-" Upload data from a specified file, login with user and password:\n"
-"\n"
-" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile\n"
-"\n"
-" Upload a local file to the remote site, and use the local file name remote\n"
-" too:\n"
-"\n"
-, stdout);
- fputs(
-" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/\n"
-"\n"
-" Upload a local file to get appended to the remote file:\n"
-"\n"
-" curl -T localfile -a ftp://ftp.upload.com/remotefile\n"
-"\n"
-" Curl also supports ftp upload through a proxy, but only if the proxy is\n"
-" configured to allow that kind of tunneling. If it does, you can run curl in\n"
-" a fashion similar to:\n"
-"\n"
-" curl --proxytunnel -x proxy:port -T localfile ftp.upload.com\n"
-"\n"
-" HTTP\n"
-"\n"
-" Upload all data on stdin to a specified http site:\n"
-"\n"
-, stdout);
- fputs(
-" curl -T - http://www.upload.com/myfile\n"
-"\n"
-" Note that the http server must have been configured to accept PUT before\n"
-" this can be done successfully.\n"
-"\n"
-" For other ways to do http data upload, see the POST section below.\n"
-"\n"
-"VERBOSE / DEBUG\n"
-"\n"
-" If curl fails where it isn't supposed to, if the servers don't let you in,\n"
-" if you can't understand the responses: use the -v flag to get verbose\n"
-" fetching. Curl will output lots of info and what it sends and receives in\n"
-, stdout);
- fputs(
-" order to let the user see all client-server interaction (but it won't show\n"
-" you the actual data).\n"
-"\n"
-" curl -v ftp://ftp.upload.com/\n"
-"\n"
-" To get even more details and information on what curl does, try using the\n"
-" --trace or --trace-ascii options with a given file name to log to, like\n"
-" this:\n"
-"\n"
-" curl --trace trace.txt www.haxx.se\n"
-"\n"
-"\n"
-"DETAILED INFORMATION\n"
-"\n"
-" Different protocols provide different ways of getting detailed information\n"
-, stdout);
- fputs(
-" about specific files/documents. To get curl to show detailed information\n"
-" about a single file, you should use -I/--head option. It displays all\n"
-" available info on a single file for HTTP and FTP. The HTTP information is a\n"
-" lot more extensive.\n"
-"\n"
-" For HTTP, you can get the header information (the same as -I would show)\n"
-" shown before the data by using -i/--include. Curl understands the\n"
-" -D/--dump-header option when getting files from both FTP and HTTP, and it\n"
-, stdout);
- fputs(
-" will then store the headers in the specified file.\n"
-"\n"
-" Store the HTTP headers in a separate file (headers.txt in the example):\n"
-"\n"
-" curl --dump-header headers.txt curl.haxx.se\n"
-"\n"
-" Note that headers stored in a separate file can be very useful at a later\n"
-" time if you want curl to use cookies sent by the server. More about that in\n"
-" the cookies section.\n"
-"\n"
-"POST (HTTP)\n"
-"\n"
-" It's easy to post data using curl. This is done using the -d <data>\n"
-" option. The post data must be urlencoded.\n"
-"\n"
-, stdout);
- fputs(
-" Post a simple \"name\" and \"phone\" guestbook.\n"
-"\n"
-" curl -d \"name=Rafael%20Sagula&phone=3320780\" \\\n"
-" http://www.where.com/guest.cgi\n"
-"\n"
-" How to post a form with curl, lesson #1:\n"
-"\n"
-" Dig out all the <input> tags in the form that you want to fill in. (There's\n"
-" a perl program called formfind.pl on the curl site that helps with this).\n"
-"\n"
-" If there's a \"normal\" post, you use -d to post. -d takes a full \"post\n"
-" string\", which is in the format\n"
-"\n"
-, stdout);
- fputs(
-" <variable1>=<data1>&<variable2>=<data2>&...\n"
-"\n"
-" The 'variable' names are the names set with \"name=\" in the <input> tags, and\n"
-" the data is the contents you want to fill in for the inputs. The data *must*\n"
-" be properly URL encoded. That means you replace space with + and that you\n"
-" write weird letters with %XX where XX is the hexadecimal representation of\n"
-" the letter's ASCII code.\n"
-"\n"
-" Example:\n"
-"\n"
-" (page located at http://www.formpost.com/getthis/\n"
-"\n"
-, stdout);
- fputs(
-" <form action=\"post.cgi\" method=\"post\">\n"
-" <input name=user size=10>\n"
-" <input name=pass type=password size=10>\n"
-" <input name=id type=hidden value=\"blablabla\">\n"
-" <input name=ding value=\"submit\">\n"
-" </form>\n"
-"\n"
-" We want to enter user 'foobar' with password '12345'.\n"
-"\n"
-" To post to this, you enter a curl command line like:\n"
-"\n"
-" curl -d \"user=foobar&pass=12345&id=blablabla&ding=submit\" (continues)\n"
-" http://www.formpost.com/getthis/post.cgi\n"
-"\n"
-"\n"
-, stdout);
- fputs(
-" While -d uses the application/x-www-form-urlencoded mime-type, generally\n"
-" understood by CGI's and similar, curl also supports the more capable\n"
-" multipart/form-data type. This latter type supports things like file upload.\n"
-"\n"
-" -F accepts parameters like -F \"name=contents\". If you want the contents to\n"
-" be read from a file, use <@filename> as contents. When specifying a file,\n"
-" you can also specify the file content type by appending ';type=<mime type>'\n"
-, stdout);
- fputs(
-" to the file name. You can also post the contents of several files in one\n"
-" field. For example, the field name 'coolfiles' is used to send three files,\n"
-" with different content types using the following syntax:\n"
-"\n"
-" curl -F \"coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html\" \\\n"
-" http://www.post.com/postit.cgi\n"
-"\n"
-" If the content-type is not specified, curl will try to guess from the file\n"
-" extension (it only knows a few), or use the previously specified type (from\n"
-, stdout);
- fputs(
-" an earlier file if several files are specified in a list) or else it will\n"
-" using the default type 'text/plain'.\n"
-"\n"
-" Emulate a fill-in form with -F. Let's say you fill in three fields in a\n"
-" form. One field is a file name which to post, one field is your name and one\n"
-" field is a file description. We want to post the file we have written named\n"
-" \"cooltext.txt\". To let curl do the posting of this data instead of your\n"
-" favourite browser, you have to read the HTML source of the form page and\n"
-, stdout);
- fputs(
-" find the names of the input fields. In our example, the input field names\n"
-" are 'file', 'yourname' and 'filedescription'.\n"
-"\n"
-" curl -F \"file=@cooltext.txt\" -F \"yourname=Daniel\" \\\n"
-" -F \"filedescription=Cool text file with cool text inside\" \\\n"
-" http://www.post.com/postit.cgi\n"
-"\n"
-" To send two files in one post you can do it in two ways:\n"
-"\n"
-" 1. Send multiple files in a single \"field\" with a single field name:\n"
-"\n"
-" curl -F \"pictures=@dog.gif,cat.gif\"\n"
-"\n"
-, stdout);
- fputs(
-" 2. Send two fields with two field names:\n"
-"\n"
-" curl -F \"docpicture=@dog.gif\" -F \"catpicture=@cat.gif\"\n"
-"\n"
-" To send a field value literally without interpreting a leading '@'\n"
-" or '<', or an embedded ';type=', use --form-string instead of\n"
-" -F. This is recommended when the value is obtained from a user or\n"
-" some other unpredictable source. Under these circumstances, using\n"
-" -F instead of --form-string would allow a user to trick curl into\n"
-" uploading a file.\n"
-"\n"
-"REFERRER\n"
-"\n"
-, stdout);
- fputs(
-" A HTTP request has the option to include information about which address\n"
-" that referred to actual page. Curl allows you to specify the\n"
-" referrer to be used on the command line. It is especially useful to\n"
-" fool or trick stupid servers or CGI scripts that rely on that information\n"
-" being available or contain certain data.\n"
-"\n"
-" curl -e www.coolsite.com http://www.showme.com/\n"
-"\n"
-" NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.\n"
-"\n"
-"USER AGENT\n"
-"\n"
-, stdout);
- fputs(
-" A HTTP request has the option to include information about the browser\n"
-" that generated the request. Curl allows it to be specified on the command\n"
-" line. It is especially useful to fool or trick stupid servers or CGI\n"
-" scripts that only accept certain browsers.\n"
-"\n"
-" Example:\n"
-"\n"
-" curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/\n"
-"\n"
-" Other common strings:\n"
-" 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95\n"
-" 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95\n"
-, stdout);
- fputs(
-" 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2\n"
-" 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX\n"
-" 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux\n"
-"\n"
-" Note that Internet Explorer tries hard to be compatible in every way:\n"
-" 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95\n"
-"\n"
-" Mozilla is not the only possible User-Agent name:\n"
-" 'Konqueror/1.0' KDE File Manager desktop client\n"
-, stdout);
- fputs(
-" 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser\n"
-"\n"
-"COOKIES\n"
-"\n"
-" Cookies are generally used by web servers to keep state information at the\n"
-" client's side. The server sets cookies by sending a response line in the\n"
-" headers that looks like 'Set-Cookie: <data>' where the data part then\n"
-" typically contains a set of NAME=VALUE pairs (separated by semicolons ';'\n"
-" like \"NAME1=VALUE1; NAME2=VALUE2;\"). The server can also specify for what\n"
-, stdout);
- fputs(
-" path the \"cookie\" should be used for (by specifying \"path=value\"), when the\n"
-" cookie should expire (\"expire=DATE\"), for what domain to use it\n"
-" (\"domain=NAME\") and if it should be used on secure connections only\n"
-" (\"secure\").\n"
-"\n"
-" If you've received a page from a server that contains a header like:\n"
-" Set-Cookie: sessionid=boo123; path=\"/foo\";\n"
-"\n"
-" it means the server wants that first pair passed on when we get anything in\n"
-" a path beginning with \"/foo\".\n"
-"\n"
-, stdout);
- fputs(
-" Example, get a page that wants my name passed in a cookie:\n"
-"\n"
-" curl -b \"name=Daniel\" www.sillypage.com\n"
-"\n"
-" Curl also has the ability to use previously received cookies in following\n"
-" sessions. If you get cookies from a server and store them in a file in a\n"
-" manner similar to:\n"
-"\n"
-" curl --dump-header headers www.example.com\n"
-"\n"
-" ... you can then in a second connect to that (or another) site, use the\n"
-" cookies from the 'headers' file like:\n"
-"\n"
-" curl -b headers www.example.com\n"
-"\n"
-, stdout);
- fputs(
-" While saving headers to a file is a working way to store cookies, it is\n"
-" however error-prone and not the preferred way to do this. Instead, make curl\n"
-" save the incoming cookies using the well-known netscape cookie format like\n"
-" this:\n"
-"\n"
-" curl -c cookies.txt www.example.com\n"
-"\n"
-" Note that by specifying -b you enable the \"cookie awareness\" and with -L\n"
-" you can make curl follow a location: (which often is used in combination\n"
-, stdout);
- fputs(
-" with cookies). So that if a site sends cookies and a location, you can\n"
-" use a non-existing file to trigger the cookie awareness like:\n"
-"\n"
-" curl -L -b empty.txt www.example.com\n"
-"\n"
-" The file to read cookies from must be formatted using plain HTTP headers OR\n"
-" as netscape's cookie file. Curl will determine what kind it is based on the\n"
-" file contents. In the above command, curl will parse the header and store\n"
-" the cookies received from www.example.com. curl will send to the server the\n"
-, stdout);
- fputs(
-" stored cookies which match the request as it follows the location. The\n"
-" file \"empty.txt\" may be a nonexistent file.\n"
-"\n"
-" Alas, to both read and write cookies from a netscape cookie file, you can\n"
-" set both -b and -c to use the same file:\n"
-"\n"
-" curl -b cookies.txt -c cookies.txt www.example.com\n"
-"\n"
-"PROGRESS METER\n"
-"\n"
-" The progress meter exists to show a user that something actually is\n"
-" happening. The different fields in the output have the following meaning:\n"
-"\n"
-, stdout);
- fputs(
-" % Total % Received % Xferd Average Speed Time Curr.\n"
-" Dload Upload Total Current Left Speed\n"
-" 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287\n"
-"\n"
-" From left-to-right:\n"
-" % - percentage completed of the whole transfer\n"
-" Total - total size of the whole expected transfer\n"
-" % - percentage completed of the download\n"
-" Received - currently downloaded amount of bytes\n"
-, stdout);
- fputs(
-" % - percentage completed of the upload\n"
-" Xferd - currently uploaded amount of bytes\n"
-" Average Speed\n"
-" Dload - the average transfer speed of the download\n"
-" Average Speed\n"
-" Upload - the average transfer speed of the upload\n"
-" Time Total - expected time to complete the operation\n"
-" Time Current - time passed since the invoke\n"
-" Time Left - expected time left to completion\n"
-" Curr.Speed - the average transfer speed the last 5 seconds (the first\n"
-, stdout);
- fputs(
-" 5 seconds of a transfer is based on less time of course.)\n"
-"\n"
-" The -# option will display a totally different progress bar that doesn't\n"
-" need much explanation!\n"
-"\n"
-"SPEED LIMIT\n"
-"\n"
-" Curl allows the user to set the transfer speed conditions that must be met\n"
-" to let the transfer keep going. By using the switch -y and -Y you\n"
-" can make curl abort transfers if the transfer speed is below the specified\n"
-" lowest limit for a specified time.\n"
-"\n"
-, stdout);
- fputs(
-" To have curl abort the download if the speed is slower than 3000 bytes per\n"
-" second for 1 minute, run:\n"
-"\n"
-" curl -Y 3000 -y 60 www.far-away-site.com\n"
-"\n"
-" This can very well be used in combination with the overall time limit, so\n"
-" that the above operation must be completed in whole within 30 minutes:\n"
-"\n"
-" curl -m 1800 -Y 3000 -y 60 www.far-away-site.com\n"
-"\n"
-" Forcing curl not to transfer data faster than a given rate is also possible,\n"
-, stdout);
- fputs(
-" which might be useful if you're using a limited bandwidth connection and you\n"
-" don't want your transfer to use all of it (sometimes referred to as\n"
-" \"bandwidth throttle\").\n"
-"\n"
-" Make curl transfer data no faster than 10 kilobytes per second:\n"
-"\n"
-" curl --limit-rate 10K www.far-away-site.com\n"
-"\n"
-" or\n"
-"\n"
-" curl --limit-rate 10240 www.far-away-site.com\n"
-"\n"
-" Or prevent curl from uploading data faster than 1 megabyte per second:\n"
-"\n"
-" curl -T upload --limit-rate 1M ftp://uploadshereplease.com\n"
-"\n"
-, stdout);
- fputs(
-" When using the --limit-rate option, the transfer rate is regulated on a\n"
-" per-second basis, which will cause the total transfer speed to become lower\n"
-" than the given number. Sometimes of course substantially lower, if your\n"
-" transfer stalls during periods.\n"
-"\n"
-"CONFIG FILE\n"
-"\n"
-" Curl automatically tries to read the .curlrc file (or _curlrc file on win32\n"
-" systems) from the user's home dir on startup.\n"
-"\n"
-" The config file could be made up with normal command line switches, but you\n"
-, stdout);
- fputs(
-" can also specify the long options without the dashes to make it more\n"
-" readable. You can separate the options and the parameter with spaces, or\n"
-" with = or :. Comments can be used within the file. If the first letter on a\n"
-" line is a '#'-symbol the rest of the line is treated as a comment.\n"
-"\n"
-" If you want the parameter to contain spaces, you must enclose the entire\n"
-" parameter within double quotes (\"). Within those quotes, you specify a\n"
-" quote as \\\".\n"
-"\n"
-, stdout);
- fputs(
-" NOTE: You must specify options and their arguments on the same line.\n"
-"\n"
-" Example, set default time out and proxy in a config file:\n"
-"\n"
-" # We want a 30 minute timeout:\n"
-" -m 1800\n"
-" # ... and we use a proxy for all accesses:\n"
-" proxy = proxy.our.domain.com:8080\n"
-"\n"
-" White spaces ARE significant at the end of lines, but all white spaces\n"
-" leading up to the first characters of each line are ignored.\n"
-"\n"
-" Prevent curl from reading the default file by using -q as the first command\n"
-, stdout);
- fputs(
-" line parameter, like:\n"
-"\n"
-" curl -q www.thatsite.com\n"
-"\n"
-" Force curl to get and display a local help page in case it is invoked\n"
-" without URL by making a config file similar to:\n"
-"\n"
-" # default url to get\n"
-" url = \"http://help.with.curl.com/curlhelp.html\"\n"
-"\n"
-" You can specify another config file to be read by using the -K/--config\n"
-" flag. If you set config file name to \"-\" it'll read the config from stdin,\n"
-" which can be handy if you want to hide options from being visible in process\n"
-, stdout);
- fputs(
-" tables etc:\n"
-"\n"
-" echo \"user = user:passwd\" | curl -K - http://that.secret.site.com\n"
-"\n"
-"EXTRA HEADERS\n"
-"\n"
-" When using curl in your own very special programs, you may end up needing\n"
-" to pass on your own custom headers when getting a web page. You can do\n"
-" this by using the -H flag.\n"
-"\n"
-" Example, send the header \"X-you-and-me: yes\" to the server when getting a\n"
-" page:\n"
-"\n"
-" curl -H \"X-you-and-me: yes\" www.love.com\n"
-"\n"
-" This can also be useful in case you want curl to send a different text in a\n"
-, stdout);
- fputs(
-" header than it normally does. The -H header you specify then replaces the\n"
-" header curl would normally send. If you replace an internal header with an\n"
-" empty one, you prevent that header from being sent. To prevent the Host:\n"
-" header from being used:\n"
-"\n"
-" curl -H \"Host:\" www.server.com\n"
-"\n"
-"FTP and PATH NAMES\n"
-"\n"
-" Do note that when getting files with the ftp:// URL, the given path is\n"
-" relative the directory you enter. To get the file 'README' from your home\n"
-" directory at your ftp site, do:\n"
-"\n"
-, stdout);
- fputs(
-" curl ftp://user:passwd@my.site.com/README\n"
-"\n"
-" But if you want the README file from the root directory of that very same\n"
-" site, you need to specify the absolute file name:\n"
-"\n"
-" curl ftp://user:passwd@my.site.com//README\n"
-"\n"
-" (I.e with an extra slash in front of the file name.)\n"
-"\n"
-"SFTP and SCP and PATH NAMES\n"
-"\n"
-" With sftp: and scp: URLs, the path name given is the absolute name on the\n"
-" server. To access a file relative to the remote user's home directory,\n"
-, stdout);
- fputs(
-" prefix the file with /~/ , such as:\n"
-"\n"
-" curl -u $USER sftp://home.example.com/~/.bashrc\n"
-"\n"
-"FTP and firewalls\n"
-"\n"
-" The FTP protocol requires one of the involved parties to open a second\n"
-" connection as soon as data is about to get transfered. There are two ways to\n"
-" do this.\n"
-"\n"
-" The default way for curl is to issue the PASV command which causes the\n"
-" server to open another port and await another connection performed by the\n"
-, stdout);
- fputs(
-" client. This is good if the client is behind a firewall that don't allow\n"
-" incoming connections.\n"
-"\n"
-" curl ftp.download.com\n"
-"\n"
-" If the server for example, is behind a firewall that don't allow connections\n"
-" on other ports than 21 (or if it just doesn't support the PASV command), the\n"
-" other way to do it is to use the PORT command and instruct the server to\n"
-" connect to the client on the given (as parameters to the PORT command) IP\n"
-" number and port.\n"
-"\n"
-, stdout);
- fputs(
-" The -P flag to curl supports a few different options. Your machine may have\n"
-" several IP-addresses and/or network interfaces and curl allows you to select\n"
-" which of them to use. Default address can also be used:\n"
-"\n"
-" curl -P - ftp.download.com\n"
-"\n"
-" Download with PORT but use the IP address of our 'le0' interface (this does\n"
-" not work on windows):\n"
-"\n"
-" curl -P le0 ftp.download.com\n"
-"\n"
-" Download with PORT but use 192.168.0.10 as our IP address to use:\n"
-"\n"
-, stdout);
- fputs(
-" curl -P 192.168.0.10 ftp.download.com\n"
-"\n"
-"NETWORK INTERFACE\n"
-"\n"
-" Get a web page from a server using a specified port for the interface:\n"
-"\n"
-" curl --interface eth0:1 http://www.netscape.com/\n"
-"\n"
-" or\n"
-"\n"
-" curl --interface 192.168.1.10 http://www.netscape.com/\n"
-"\n"
-"HTTPS\n"
-"\n"
-" Secure HTTP requires SSL libraries to be installed and used when curl is\n"
-" built. If that is done, curl is capable of retrieving and posting documents\n"
-" using the HTTPS protocol.\n"
-"\n"
-" Example:\n"
-"\n"
-, stdout);
- fputs(
-" curl https://www.secure-site.com\n"
-"\n"
-" Curl is also capable of using your personal certificates to get/post files\n"
-" from sites that require valid certificates. The only drawback is that the\n"
-" certificate needs to be in PEM-format. PEM is a standard and open format to\n"
-" store certificates with, but it is not used by the most commonly used\n"
-" browsers (Netscape and MSIE both use the so called PKCS#12 format). If you\n"
-, stdout);
- fputs(
-" want curl to use the certificates you use with your (favourite) browser, you\n"
-" may need to download/compile a converter that can convert your browser's\n"
-" formatted certificates to PEM formatted ones. This kind of converter is\n"
-" included in recent versions of OpenSSL, and for older versions Dr Stephen\n"
-" N. Henson has written a patch for SSLeay that adds this functionality. You\n"
-" can get his patch (that requires an SSLeay installation) from his site at:\n"
-" http://www.drh-consultancy.demon.co.uk/\n"
-, stdout);
- fputs(
-"\n"
-" Example on how to automatically retrieve a document using a certificate with\n"
-" a personal password:\n"
-"\n"
-" curl -E /path/to/cert.pem:password https://secure.site.com/\n"
-"\n"
-" If you neglect to specify the password on the command line, you will be\n"
-" prompted for the correct password before any data can be received.\n"
-"\n"
-" Many older SSL-servers have problems with SSLv3 or TLS, that newer versions\n"
-" of OpenSSL etc is using, therefore it is sometimes useful to specify what\n"
-, stdout);
- fputs(
-" SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL\n"
-" version to use (for SSLv3, SSLv2 or TLSv1 respectively):\n"
-"\n"
-" curl -2 https://secure.site.com/\n"
-"\n"
-" Otherwise, curl will first attempt to use v3 and then v2.\n"
-"\n"
-" To use OpenSSL to convert your favourite browser's certificate into a PEM\n"
-" formatted one that curl can use, do something like this (assuming netscape,\n"
-" but IE is likely to work similarly):\n"
-"\n"
-" You start with hitting the 'security' menu button in netscape.\n"
-"\n"
-, stdout);
- fputs(
-" Select 'certificates->yours' and then pick a certificate in the list\n"
-"\n"
-" Press the 'export' button\n"
-"\n"
-" enter your PIN code for the certs\n"
-"\n"
-" select a proper place to save it\n"
-"\n"
-" Run the 'openssl' application to convert the certificate. If you cd to the\n"
-" openssl installation, you can do it like:\n"
-"\n"
-" # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]\n"
-"\n"
-"\n"
-"RESUMING FILE TRANSFERS\n"
-"\n"
-" To continue a file transfer where it was previously aborted, curl supports\n"
-, stdout);
- fputs(
-" resume on http(s) downloads as well as ftp uploads and downloads.\n"
-"\n"
-" Continue downloading a document:\n"
-"\n"
-" curl -C - -o file ftp://ftp.server.com/path/file\n"
-"\n"
-" Continue uploading a document(*1):\n"
-"\n"
-" curl -C - -T file ftp://ftp.server.com/path/file\n"
-"\n"
-" Continue downloading a document from a web server(*2):\n"
-"\n"
-" curl -C - -o file http://www.server.com/\n"
-"\n"
-" (*1) = This requires that the ftp server supports the non-standard command\n"
-" SIZE. If it doesn't, curl will say so.\n"
-"\n"
-, stdout);
- fputs(
-" (*2) = This requires that the web server supports at least HTTP/1.1. If it\n"
-" doesn't, curl will say so.\n"
-"\n"
-"TIME CONDITIONS\n"
-"\n"
-" HTTP allows a client to specify a time condition for the document it\n"
-" requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to\n"
-" specify them with the -z/--time-cond flag.\n"
-"\n"
-" For example, you can easily make a download that only gets performed if the\n"
-" remote file is newer than a local copy. It would be made like:\n"
-"\n"
-, stdout);
- fputs(
-" curl -z local.html http://remote.server.com/remote.html\n"
-"\n"
-" Or you can download a file only if the local file is newer than the remote\n"
-" one. Do this by prepending the date string with a '-', as in:\n"
-"\n"
-" curl -z -local.html http://remote.server.com/remote.html\n"
-"\n"
-" You can specify a \"free text\" date as condition. Tell curl to only download\n"
-" the file if it was updated since January 12, 2012:\n"
-"\n"
-" curl -z \"Jan 12 2012\" http://remote.server.com/remote.html\n"
-"\n"
-, stdout);
- fputs(
-" Curl will then accept a wide range of date formats. You always make the date\n"
-" check the other way around by prepending it with a dash '-'.\n"
-"\n"
-"DICT\n"
-"\n"
-" For fun try\n"
-"\n"
-" curl dict://dict.org/m:curl\n"
-" curl dict://dict.org/d:heisenbug:jargon\n"
-" curl dict://dict.org/d:daniel:web1913\n"
-"\n"
-" Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'\n"
-" and 'lookup'. For example,\n"
-"\n"
-" curl dict://dict.org/find:curl\n"
-"\n"
-, stdout);
- fputs(
-" Commands that break the URL description of the RFC (but not the DICT\n"
-" protocol) are\n"
-"\n"
-" curl dict://dict.org/show:db\n"
-" curl dict://dict.org/show:strat\n"
-"\n"
-" Authentication is still missing (but this is not required by the RFC)\n"
-"\n"
-"LDAP\n"
-"\n"
-" If you have installed the OpenLDAP library, curl can take advantage of it\n"
-" and offer ldap:// support.\n"
-"\n"
-" LDAP is a complex thing and writing an LDAP query is not an easy task. I do\n"
-, stdout);
- fputs(
-" advice you to dig up the syntax description for that elsewhere. Two places\n"
-" that might suit you are:\n"
-"\n"
-" Netscape's \"Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:\n"
-" Working with LDAP URLs\":\n"
-" http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm\n"
-"\n"
-" RFC 2255, \"The LDAP URL Format\" http://curl.haxx.se/rfc/rfc2255.txt\n"
-"\n"
-" To show you an example, this is now I can get all people from my local LDAP\n"
-" server that has a certain sub-domain in their email address:\n"
-"\n"
-, stdout);
- fputs(
-" curl -B \"ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se\"\n"
-"\n"
-" If I want the same info in HTML format, I can get it by not using the -B\n"
-" (enforce ASCII) flag.\n"
-"\n"
-"ENVIRONMENT VARIABLES\n"
-"\n"
-" Curl reads and understands the following environment variables:\n"
-"\n"
-" http_proxy, HTTPS_PROXY, FTP_PROXY\n"
-"\n"
-" They should be set for protocol-specific proxies. General proxy should be\n"
-" set with\n"
-"\n"
-" ALL_PROXY\n"
-"\n"
-" A comma-separated list of host names that shouldn't go through any proxy is\n"
-, stdout);
- fputs(
-" set in (only an asterisk, '*' matches all hosts)\n"
-"\n"
-" NO_PROXY\n"
-"\n"
-" If the host name matches one of these strings, or the host is within the\n"
-" domain of one of these strings, transactions with that node will not be\n"
-" proxied.\n"
-"\n"
-"\n"
-" The usage of the -x/--proxy flag overrides the environment variables.\n"
-"\n"
-"NETRC\n"
-"\n"
-" Unix introduced the .netrc concept a long time ago. It is a way for a user\n"
-" to specify name and password for commonly visited ftp sites in a file so\n"
-, stdout);
- fputs(
-" that you don't have to type them in each time you visit those sites. You\n"
-" realize this is a big security risk if someone else gets hold of your\n"
-" passwords, so therefore most unix programs won't read this file unless it is\n"
-" only readable by yourself (curl doesn't care though).\n"
-"\n"
-" Curl supports .netrc files if told so (using the -n/--netrc and\n"
-" --netrc-optional options). This is not restricted to only ftp,\n"
-" but curl can use it for all protocols where authentication is used.\n"
-"\n"
-, stdout);
- fputs(
-" A very simple .netrc file could look something like:\n"
-"\n"
-" machine curl.haxx.se login iamdaniel password mysecret\n"
-"\n"
-"CUSTOM OUTPUT\n"
-"\n"
-" To better allow script programmers to get to know about the progress of\n"
-" curl, the -w/--write-out option was introduced. Using this, you can specify\n"
-" what information from the previous transfer you want to extract.\n"
-"\n"
-" To display the amount of bytes downloaded together with some text and an\n"
-" ending newline:\n"
-"\n"
-, stdout);
- fputs(
-" curl -w 'We downloaded %{size_download} bytes\\n' www.download.com\n"
-"\n"
-"KERBEROS FTP TRANSFER\n"
-"\n"
-" Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need\n"
-" the kerberos package installed and used at curl build time for it to be\n"
-" used.\n"
-"\n"
-" First, get the krb-ticket the normal way, like with the kinit/kauth tool.\n"
-" Then use curl in way similar to:\n"
-"\n"
-" curl --krb private ftp://krb4site.com -u username:fakepwd\n"
-"\n"
-, stdout);
- fputs(
-" There's no use for a password on the -u switch, but a blank one will make\n"
-" curl ask for one and you already entered the real password to kinit/kauth.\n"
-"\n"
-"TELNET\n"
-"\n"
-" The curl telnet support is basic and very easy to use. Curl passes all data\n"
-" passed to it on stdin to the remote server. Connect to a remote telnet\n"
-" server using a command line similar to:\n"
-"\n"
-" curl telnet://remote.server.com\n"
-"\n"
-" And enter the data to pass to the server on stdin. The result will be sent\n"
-, stdout);
- fputs(
-" to stdout or to the file you specify with -o.\n"
-"\n"
-" You might want the -N/--no-buffer option to switch off the buffered output\n"
-" for slow connections or similar.\n"
-"\n"
-" Pass options to the telnet protocol negotiation, by using the -t option. To\n"
-" tell the server we use a vt100 terminal, try something like:\n"
-"\n"
-" curl -tTTYPE=vt100 telnet://remote.server.com\n"
-"\n"
-" Other interesting options for it -t include:\n"
-"\n"
-" - XDISPLOC=<X display> Sets the X display location.\n"
-"\n"
-, stdout);
- fputs(
-" - NEW_ENV=<var,val> Sets an environment variable.\n"
-"\n"
-" NOTE: the telnet protocol does not specify any way to login with a specified\n"
-" user and password so curl can't do that automatically. To do that, you need\n"
-" to track when the login prompt is received and send the username and\n"
-" password accordingly.\n"
-"\n"
-"PERSISTENT CONNECTIONS\n"
-"\n"
-" Specifying multiple files on a single command line will make curl transfer\n"
-" all of them, one after the other in the specified order.\n"
-"\n"
-, stdout);
- fputs(
-" libcurl will attempt to use persistent connections for the transfers so that\n"
-" the second transfer to the same host can use the same connection that was\n"
-" already initiated and was left open in the previous transfer. This greatly\n"
-" decreases connection time for all but the first transfer and it makes a far\n"
-" better use of the network.\n"
-"\n"
-" Note that curl cannot use persistent connections for transfers that are used\n"
-" in subsequence curl invokes. Try to stuff as many URLs as possible on the\n"
-, stdout);
- fputs(
-" same command line if they are using the same host, as that'll make the\n"
-" transfers faster. If you use a http proxy for file transfers, practically\n"
-" all transfers will be persistent.\n"
-"\n"
-"MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE\n"
-"\n"
-" As is mentioned above, you can download multiple files with one command line\n"
-" by simply adding more URLs. If you want those to get saved to a local file\n"
-" instead of just printed to stdout, you need to add one save option for each\n"
-, stdout);
- fputs(
-" URL you specify. Note that this also goes for the -O option (but not\n"
-" --remote-name-all).\n"
-"\n"
-" For example: get two files and use -O for the first and a custom file\n"
-" name for the second:\n"
-"\n"
-" curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg\n"
-"\n"
-" You can also upload multiple files in a similar fashion:\n"
-"\n"
-" curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt\n"
-"\n"
-"IPv6\n"
-"\n"
-" curl will connect to a server with IPv6 when a host lookup returns an IPv6\n"
-, stdout);
- fputs(
-" address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6\n"
-" options can specify which address to use when both are available. IPv6\n"
-" addresses can also be specified directly in URLs using the syntax:\n"
-"\n"
-" http://[2001:1890:1112:1::20]/overview.html\n"
-"\n"
-" When this style is used, the -g option must be given to stop curl from\n"
-" interpreting the square brackets as special globbing characters. Link local\n"
-, stdout);
- fputs(
-" and site local addresses including a scope identifier, such as fe80::1234%1,\n"
-" may also be used, but the scope portion must be numeric and the percent\n"
-" character must be URL escaped. The previous example in an SFTP URL might\n"
-" look like:\n"
-"\n"
-" sftp://[fe80::1234%251]/\n"
-"\n"
-" IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface\n"
-" or --ftp-port options) should not be URL encoded.\n"
-"\n"
-"\n"
-"MAILING LISTS\n"
-"\n"
-" For your convenience, we have several open mailing lists to discuss curl,\n"
-, stdout);
- fputs(
-" its development and things relevant to this. Get all info at\n"
-" http://curl.haxx.se/mail/. Some of the lists available are:\n"
-"\n"
-" curl-users\n"
-"\n"
-" Users of the command line tool. How to use it, what doesn't work, new\n"
-" features, related tools, questions, news, installations, compilations,\n"
-" running, porting etc.\n"
-"\n"
-" curl-library\n"
-"\n"
-" Developers using or developing libcurl. Bugs, extensions, improvements.\n"
-"\n"
-" curl-announce\n"
-"\n"
-, stdout);
- fputs(
-" Low-traffic. Only receives announcements of new public versions. At worst,\n"
-" that makes something like one or two mails per month, but usually only one\n"
-" mail every second month.\n"
-"\n"
-" curl-and-php\n"
-"\n"
-" Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP\n"
-" with a curl angle.\n"
-"\n"
-" curl-and-python\n"
-"\n"
-" Python hackers using curl with or without the python binding pycurl.\n"
-"\n"
-" Please direct curl questions, feature requests and trouble reports to one of\n"
-, stdout);
- fputs(
-" these mailing lists instead of mailing any individual.\n"
-, stdout) ;
-}
-#endif /* USE_MANUAL */
-#else
-/*
- * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
- * Generation time: Wed Oct 6 19:13:33 2010
- */
-#include "setup.h"
-#ifdef USE_MANUAL
-#include "hugehelp.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <zlib.h>
-static const unsigned char hugehelpgz[] = {
- /* This mumbo-jumbo is the huge help text compressed with gzip.
- Thanks to this operation, the size of this data shrunk from 132605
- to 40864 bytes. You can disable the use of compressed help
- texts by NOT passing -c to the mkhelp.pl tool. */
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0xed, 0xbd,
- 0x69, 0x7b, 0x23, 0xc7, 0x91, 0x2e, 0xfa, 0x9d, 0xbf, 0xa2, 0x0c, 0x5d,
- 0x1b, 0xa4, 0x0d, 0x80, 0x4b, 0x2f, 0x52, 0xd3, 0xdd, 0x1a, 0x51, 0x24,
- 0x5b, 0xe2, 0x88, 0xdd, 0xe4, 0x21, 0xd8, 0x5a, 0x8e, 0xac, 0xa7, 0x9f,
- 0x02, 0x50, 0x24, 0xcb, 0x04, 0x50, 0x70, 0x55, 0x81, 0x24, 0xe4, 0xf1,
- 0xfc, 0xf6, 0x1b, 0xf1, 0x46, 0x44, 0x66, 0xd6, 0x02, 0x76, 0xcb, 0x96,
- 0x3c, 0xf7, 0x9c, 0xe7, 0x7a, 0x46, 0x4d, 0x12, 0xa8, 0xca, 0x35, 0x32,
- 0x32, 0xd6, 0x37, 0xa2, 0xe8, 0x43, 0xff, 0x7b, 0x8f, 0xff, 0xde, 0xd3,
- 0xff, 0xe8, 0xe7, 0x46, 0x14, 0x9d, 0xe7, 0xd9, 0x5f, 0x93, 0x71, 0xd9,
- 0xfe, 0xec, 0xfb, 0xf7, 0xff, 0x15, 0xc9, 0xff, 0xd1, 0x3b, 0x7f, 0xa1,
- 0x9f, 0x1b, 0x8f, 0xb6, 0xbd, 0x1d, 0xf9, 0x17, 0xfe, 0xeb, 0xfd, 0x56,
- 0xf4, 0xa1, 0x17, 0xfe, 0x2b, 0xda, 0xc4, 0x0b, 0xef, 0xb5, 0x87, 0x97,
- 0xfc, 0xfb, 0xfb, 0xf7, 0x8f, 0x77, 0xf2, 0x17, 0x1e, 0x15, 0xff, 0xb3,
- 0xcd, 0xef, 0xfd, 0xe5, 0x3d, 0xff, 0x4a, 0x9f, 0x6c, 0x6c, 0xbc, 0x3d,
- 0x78, 0x73, 0x6c, 0xaf, 0x8e, 0x97, 0xf9, 0x34, 0xea, 0x47, 0x65, 0x1e,
- 0xcf, 0x8b, 0xab, 0x24, 0x8f, 0xe2, 0xe8, 0xdd, 0xc5, 0xe9, 0xc6, 0xc6,
- 0xf0, 0x87, 0xb7, 0x67, 0xe7, 0xc3, 0x93, 0x61, 0xe5, 0xb1, 0x1f, 0xb3,
- 0x45, 0x99, 0x66, 0xf3, 0xe2, 0xa7, 0xe8, 0x47, 0x7a, 0x68, 0x30, 0x18,
- 0xfc, 0xb4, 0xb1, 0x71, 0x74, 0x3c, 0x3c, 0xbc, 0x38, 0x39, 0xbf, 0x3c,
- 0x39, 0x7b, 0x5b, 0x79, 0x36, 0x4a, 0x8b, 0x88, 0x1a, 0x2b, 0xb3, 0x6c,
- 0x4a, 0xff, 0xf8, 0xf6, 0x27, 0x71, 0x19, 0x47, 0x57, 0x79, 0x36, 0x8b,
- 0xb2, 0x9c, 0xbf, 0x88, 0xa3, 0x22, 0xc9, 0xef, 0x92, 0xbc, 0x17, 0x2d,
- 0x8b, 0x74, 0x7e, 0x1d, 0x65, 0xf3, 0x24, 0xca, 0xae, 0xa2, 0xf2, 0x26,
- 0xb1, 0xe6, 0x8a, 0xe5, 0x62, 0x91, 0xe5, 0x65, 0x32, 0x89, 0x16, 0x79,
- 0x56, 0x66, 0xe3, 0x6c, 0x5a, 0x44, 0x9b, 0x47, 0x27, 0x87, 0x97, 0xbd,
- 0xe8, 0xf5, 0xc9, 0xe9, 0x31, 0xfd, 0x7b, 0x79, 0x8e, 0x7f, 0x86, 0xbd,
- 0xe8, 0xab, 0xb3, 0xf3, 0xaf, 0x8f, 0x2f, 0x7a, 0xd1, 0xd7, 0x97, 0xfc,
- 0x19, 0xff, 0x4b, 0x1f, 0x46, 0x27, 0x6f, 0x0e, 0xce, 0x7b, 0xd6, 0x1c,
- 0xff, 0xc1, 0x1f, 0x9e, 0x1e, 0xd1, 0x87, 0xf2, 0x83, 0xff, 0x3c, 0x3f,
- 0x3b, 0x7f, 0xd2, 0xc3, 0xbf, 0xf4, 0xd7, 0xc5, 0xe5, 0x9b, 0x73, 0xfe,
- 0x77, 0x48, 0xff, 0x0e, 0x0f, 0xf9, 0x1f, 0xf4, 0x31, 0x7c, 0x63, 0xff,
- 0x0e, 0x5d, 0x73, 0x97, 0xc7, 0xa7, 0x6f, 0x8f, 0x2f, 0xa3, 0x78, 0x3e,
- 0x89, 0x2e, 0xe9, 0xa1, 0xad, 0x01, 0x7d, 0x74, 0x93, 0x44, 0xe3, 0x6c,
- 0x36, 0xe3, 0xcf, 0x68, 0x15, 0x26, 0x49, 0x91, 0x5e, 0xcf, 0x69, 0xf8,
- 0x34, 0xdb, 0xfb, 0x2c, 0xbf, 0x8d, 0xee, 0xd3, 0xf2, 0x26, 0x5b, 0x96,
- 0x34, 0x61, 0x5a, 0x8f, 0x28, 0x9d, 0x97, 0x49, 0xde, 0xb7, 0xe6, 0xe2,
- 0x31, 0xaf, 0xf0, 0x60, 0xa3, 0xb2, 0x96, 0xd9, 0x15, 0xad, 0x5c, 0x41,
- 0x4b, 0x35, 0x5a, 0x16, 0xd3, 0x2c, 0x9e, 0xf0, 0x02, 0xd1, 0xcb, 0x57,
- 0x4b, 0x5a, 0xda, 0x3c, 0x1d, 0xdf, 0x16, 0xd1, 0x34, 0xbd, 0x4d, 0x78,
- 0x79, 0x1e, 0x56, 0xb6, 0x5c, 0x3d, 0x69, 0x3e, 0x5e, 0xd2, 0x4a, 0xce,
- 0x5d, 0xf3, 0x65, 0x3a, 0x8e, 0xb9, 0x03, 0xac, 0x57, 0xb4, 0x5c, 0x70,
- 0x6b, 0xb2, 0x4e, 0xd1, 0x22, 0x2b, 0xe8, 0xa5, 0xe1, 0xf0, 0x94, 0xc6,
- 0x3e, 0x9f, 0x27, 0x18, 0x47, 0xd1, 0xa3, 0x3f, 0xb2, 0xdb, 0x34, 0xa1,
- 0x5f, 0xae, 0xd2, 0x69, 0x12, 0xc9, 0x3e, 0xba, 0xe6, 0x78, 0x43, 0xf3,
- 0xa4, 0x58, 0xce, 0x12, 0x2c, 0xc0, 0x2c, 0xcb, 0x93, 0x41, 0x74, 0x50,
- 0x44, 0xab, 0x6c, 0x49, 0xb3, 0x9c, 0x4e, 0x69, 0x6f, 0x93, 0x68, 0x94,
- 0x4c, 0xb3, 0xfb, 0x1e, 0xef, 0x68, 0x34, 0x5f, 0xce, 0x46, 0xf4, 0x0a,
- 0x0d, 0xff, 0x2a, 0x89, 0xcb, 0x25, 0xbd, 0x8a, 0xc7, 0xac, 0xb9, 0x59,
- 0x4c, 0xb3, 0xa0, 0x77, 0xf3, 0xe8, 0x26, 0xa1, 0x59, 0x16, 0x8b, 0x74,
- 0xfe, 0xbb, 0xea, 0x4a, 0xd0, 0x72, 0x2e, 0xb2, 0xfb, 0x24, 0xa7, 0xd5,
- 0x1c, 0xad, 0x22, 0x9a, 0xf6, 0x48, 0x88, 0xed, 0x8a, 0x88, 0x29, 0x8a,
- 0xa9, 0x43, 0x47, 0x68, 0xfd, 0x3c, 0x99, 0xc6, 0x4c, 0x34, 0xae, 0x2b,
- 0xda, 0x99, 0x61, 0xe2, 0xa8, 0x4a, 0x5f, 0xdd, 0x7c, 0xb2, 0x85, 0x97,
- 0x27, 0x49, 0x19, 0xa7, 0xd3, 0x82, 0x16, 0x9e, 0xc9, 0xdf, 0xf6, 0x96,
- 0x86, 0xcc, 0xc7, 0x81, 0x68, 0x70, 0x35, 0x2f, 0xe3, 0x07, 0x74, 0xaf,
- 0x34, 0xd8, 0x9f, 0x24, 0x8b, 0x64, 0x3e, 0x49, 0xe6, 0xe5, 0x20, 0xfa,
- 0x21, 0x5b, 0x76, 0xa9, 0xef, 0xab, 0x94, 0xd6, 0x20, 0xd6, 0xa6, 0xa8,
- 0x67, 0xda, 0xf8, 0x71, 0x9e, 0x2e, 0x82, 0xc5, 0xcf, 0xe6, 0xb4, 0xdd,
- 0xd1, 0xc5, 0xeb, 0xc3, 0xe8, 0xc9, 0x8b, 0xcf, 0x9e, 0xfb, 0x5d, 0xa6,
- 0x06, 0xa2, 0x71, 0x3c, 0xa7, 0x19, 0x27, 0xe3, 0xf4, 0x6a, 0x15, 0xcd,
- 0x96, 0xd3, 0x32, 0x5d, 0xd0, 0x7a, 0x53, 0xe7, 0x05, 0x1f, 0x94, 0x45,
- 0x9c, 0x97, 0x05, 0xaf, 0x1b, 0x3e, 0xc0, 0xdc, 0xef, 0xf3, 0xb4, 0xe4,
- 0x03, 0x83, 0xef, 0x68, 0x84, 0x49, 0x59, 0x58, 0x73, 0x4c, 0x60, 0xd4,
- 0xcf, 0x28, 0x8f, 0xc7, 0xb4, 0xc2, 0x71, 0x41, 0x9d, 0xee, 0xbb, 0xbe,
- 0xa2, 0x9b, 0xb2, 0x5c, 0xec, 0x6f, 0x6f, 0x17, 0x69, 0x99, 0x0c, 0xfe,
- 0x4e, 0xc7, 0xad, 0x57, 0xde, 0x67, 0xbd, 0xf2, 0x26, 0x4f, 0x92, 0x7f,
- 0x0c, 0x88, 0x6c, 0xdd, 0x83, 0xd4, 0xed, 0x4a, 0xc7, 0x75, 0x9d, 0x94,
- 0xd4, 0xc1, 0xdf, 0x96, 0xc9, 0x9c, 0x1b, 0xa4, 0x61, 0xc4, 0xd3, 0xc5,
- 0x4d, 0x4c, 0xbb, 0x99, 0x10, 0xf9, 0xf1, 0x01, 0x26, 0x0a, 0xe1, 0x41,
- 0xc9, 0x11, 0xfe, 0xf1, 0xa7, 0x46, 0x9f, 0x57, 0xe8, 0x92, 0xfe, 0x1d,
- 0xe8, 0x4b, 0x31, 0xad, 0x35, 0x75, 0xb6, 0xcd, 0x54, 0xf5, 0xe3, 0x6e,
- 0x7f, 0x77, 0x67, 0xe7, 0xa7, 0x41, 0xf9, 0x50, 0x7e, 0xe4, 0x0b, 0x3b,
- 0x3b, 0xfe, 0x15, 0x7e, 0x7a, 0x93, 0x67, 0x1c, 0x4d, 0x89, 0x68, 0xb8,
- 0xff, 0x9f, 0x93, 0x3c, 0x2b, 0xb6, 0x5a, 0x9a, 0x9a, 0x26, 0x25, 0x9d,
- 0xb5, 0xa0, 0x9d, 0xb8, 0xff, 0xb3, 0x74, 0x6b, 0x0f, 0xbf, 0x4d, 0x0a,
- 0xd0, 0x8c, 0x9f, 0x6c, 0x14, 0xe7, 0x44, 0xb7, 0x59, 0xe9, 0xd9, 0x50,
- 0x8f, 0x8e, 0x61, 0xe9, 0x96, 0x86, 0x4e, 0x19, 0x3d, 0x4d, 0x0c, 0x2c,
- 0x9e, 0x32, 0xef, 0x2a, 0xa2, 0x79, 0xe2, 0xa7, 0x41, 0x27, 0x3e, 0x89,
- 0xc7, 0x37, 0x51, 0x46, 0xc4, 0x9f, 0x37, 0xb7, 0x20, 0x9e, 0xaf, 0x06,
- 0x59, 0x7e, 0xbd, 0x1d, 0xe7, 0xe3, 0x9b, 0xf4, 0x8e, 0xd6, 0xe1, 0xc5,
- 0x8b, 0xe7, 0x7d, 0xfa, 0xe7, 0xc5, 0x4f, 0xdb, 0x77, 0xd9, 0x94, 0x96,
- 0xe5, 0xe9, 0x4f, 0xdb, 0xbc, 0xbb, 0x7f, 0x8f, 0x7b, 0xa3, 0xde, 0xf8,
- 0x1f, 0x83, 0x9b, 0x72, 0x36, 0x5d, 0x4b, 0x33, 0xd4, 0x58, 0x14, 0xcf,
- 0xb2, 0xe5, 0xbc, 0x74, 0x74, 0x42, 0xe4, 0x56, 0x06, 0xbc, 0x68, 0x9a,
- 0xce, 0x13, 0x61, 0x4f, 0x4c, 0x3e, 0x7c, 0x3c, 0xe9, 0x6c, 0xfa, 0xa3,
- 0x5c, 0x8e, 0x6f, 0x68, 0xea, 0x44, 0x37, 0xb1, 0x4e, 0xbf, 0x4c, 0x69,
- 0x4e, 0xf4, 0xe6, 0x9c, 0x8e, 0x6c, 0x2a, 0x4d, 0x49, 0x67, 0x29, 0x3d,
- 0x97, 0xe5, 0x93, 0x24, 0xaf, 0x52, 0x30, 0x86, 0xe3, 0xc7, 0x13, 0xd1,
- 0x52, 0x2e, 0xa8, 0xf3, 0x25, 0x33, 0x38, 0x1c, 0x32, 0x6e, 0x81, 0x8e,
- 0xe7, 0x35, 0xad, 0x12, 0xad, 0x0c, 0x13, 0x15, 0x2f, 0xdc, 0x2a, 0x7a,
- 0x4b, 0x9b, 0x27, 0xac, 0x21, 0xa0, 0x3d, 0xd9, 0xac, 0xe6, 0xa2, 0xdd,
- 0xdf, 0xdf, 0xaf, 0x27, 0xa2, 0xfd, 0xdd, 0x1a, 0x1d, 0x05, 0x2f, 0xb5,
- 0xed, 0xfe, 0xfe, 0x5e, 0x75, 0xff, 0x4f, 0xae, 0xb0, 0xb1, 0x36, 0x07,
- 0x3e, 0xfb, 0xc6, 0xad, 0xed, 0xe0, 0x53, 0x6b, 0xf4, 0x7b, 0x72, 0x95,
- 0x3e, 0xf4, 0xec, 0xaa, 0x93, 0xb5, 0x8c, 0xa9, 0xf9, 0xd9, 0xa2, 0xe4,
- 0x5d, 0xb7, 0xe6, 0xae, 0x97, 0x49, 0x41, 0x24, 0x74, 0x7f, 0x13, 0xd3,
- 0xc7, 0xd6, 0x40, 0x84, 0x2e, 0x66, 0xe9, 0xf5, 0x4d, 0x19, 0xdd, 0xc7,
- 0xcc, 0x3f, 0x4e, 0x4a, 0x69, 0x82, 0x59, 0x35, 0x71, 0x8d, 0xab, 0x98,
- 0x8e, 0x3f, 0xaf, 0x10, 0xf8, 0x32, 0x11, 0x9b, 0x23, 0x27, 0x5a, 0x2b,
- 0x90, 0x52, 0x70, 0x13, 0x8e, 0xe2, 0x82, 0x77, 0x63, 0x4e, 0x9b, 0x5e,
- 0x12, 0xa3, 0x5f, 0xf2, 0x5f, 0x37, 0xc4, 0xca, 0xa3, 0x79, 0x3c, 0x4b,
- 0x74, 0xa0, 0xe0, 0x7d, 0xaf, 0x99, 0x45, 0x26, 0x0f, 0xf1, 0xcc, 0xf1,
- 0x23, 0x62, 0x30, 0x3d, 0x65, 0x9d, 0xee, 0x8d, 0x82, 0x76, 0x8d, 0x28,
- 0x8e, 0x8f, 0x11, 0xce, 0x54, 0x87, 0xcf, 0x4d, 0x47, 0xe6, 0x89, 0x31,
- 0xc6, 0x05, 0xd8, 0x3d, 0x38, 0x3c, 0x0d, 0x3e, 0x98, 0x2c, 0x2d, 0x5a,
- 0x7c, 0xcb, 0xf7, 0x4a, 0xed, 0xf6, 0xc2, 0x6b, 0x93, 0x2c, 0x4a, 0x89,
- 0x83, 0x8d, 0xe8, 0x7c, 0xf1, 0xcc, 0xf8, 0xd4, 0x60, 0x55, 0xb8, 0x9d,
- 0x05, 0xb5, 0xc9, 0x1f, 0xa6, 0x25, 0xf3, 0x0d, 0x08, 0x20, 0x34, 0x5e,
- 0x5a, 0x14, 0xc8, 0x10, 0x74, 0xf6, 0x82, 0xf9, 0x83, 0xe3, 0xd1, 0xb3,
- 0xd1, 0x5d, 0x3c, 0x4d, 0x49, 0x96, 0x48, 0xdc, 0x5b, 0x60, 0xd1, 0x63,
- 0xbe, 0xe0, 0xa6, 0xd3, 0x15, 0x91, 0x5d, 0x9e, 0xb3, 0xb0, 0xc6, 0x3b,
- 0x38, 0x92, 0xc3, 0x31, 0x4b, 0xe8, 0x66, 0x08, 0x97, 0x33, 0x65, 0x26,
- 0x45, 0x44, 0x4a, 0x57, 0x0d, 0xc8, 0x90, 0xae, 0x04, 0x1c, 0x63, 0x4c,
- 0x1c, 0xa3, 0xe3, 0xb6, 0xc7, 0xe3, 0x64, 0x51, 0x16, 0x7e, 0x4e, 0x87,
- 0x7e, 0x29, 0x74, 0xc3, 0x69, 0x38, 0x79, 0xc2, 0x2b, 0x1f, 0xde, 0x9c,
- 0x58, 0x57, 0xc7, 0xc7, 0x71, 0x79, 0xda, 0xd5, 0x44, 0x97, 0x69, 0xe1,
- 0x56, 0xad, 0x04, 0x6d, 0xd0, 0x59, 0xc0, 0x9a, 0xcf, 0x78, 0xa0, 0xfc,
- 0x70, 0x21, 0x32, 0x12, 0xce, 0x1c, 0x6f, 0xa4, 0x08, 0x49, 0xd2, 0x2f,
- 0x73, 0x23, 0x5a, 0x4f, 0xd7, 0x38, 0xf5, 0xea, 0xf6, 0x94, 0xbb, 0x2f,
- 0x48, 0xbc, 0x24, 0xee, 0x3c, 0x29, 0x6e, 0xe8, 0x3e, 0xa5, 0xad, 0xbf,
- 0xbc, 0xe1, 0x99, 0xce, 0x88, 0x66, 0xee, 0x78, 0x7f, 0x17, 0x49, 0x32,
- 0x19, 0x44, 0x67, 0x57, 0x7c, 0x34, 0x73, 0x1a, 0x74, 0x89, 0xaf, 0x99,
- 0x5b, 0xd0, 0xba, 0x4d, 0x20, 0x7f, 0xcd, 0x1d, 0x57, 0xc0, 0x50, 0x82,
- 0x63, 0xcf, 0x94, 0x46, 0x8b, 0x1d, 0x31, 0xa3, 0x9f, 0x56, 0x59, 0x0b,
- 0x44, 0x00, 0x62, 0x01, 0x3c, 0xbc, 0x51, 0x12, 0x81, 0x12, 0x47, 0x49,
- 0x79, 0x9f, 0x24, 0xae, 0xb9, 0x22, 0x21, 0x76, 0xc6, 0x9b, 0x26, 0x97,
- 0xf9, 0xfc, 0x2e, 0xe3, 0x01, 0x6e, 0x6c, 0x9c, 0x5f, 0x9c, 0x7d, 0x75,
- 0x71, 0x3c, 0x1c, 0x46, 0x6f, 0x8e, 0x2f, 0x8f, 0x2f, 0x2a, 0xd4, 0x33,
- 0xcf, 0xf2, 0x19, 0x76, 0x74, 0x92, 0x16, 0x8b, 0x69, 0xbc, 0xe2, 0xad,
- 0xa6, 0x99, 0x5c, 0xe7, 0x7c, 0xb2, 0x66, 0x09, 0xb3, 0x96, 0xc9, 0x32,
- 0x07, 0x59, 0x64, 0x0b, 0xda, 0x3e, 0x15, 0x5b, 0xa8, 0xf1, 0x09, 0x64,
- 0x9d, 0xf9, 0xb5, 0x5f, 0x69, 0xba, 0xcd, 0x95, 0x43, 0x32, 0x8b, 0x74,
- 0xfb, 0xc1, 0xd2, 0x04, 0xe4, 0xd2, 0x9e, 0xff, 0x4c, 0x96, 0xa9, 0xc0,
- 0x9c, 0x88, 0x66, 0xd3, 0x19, 0x64, 0x09, 0xfa, 0xe9, 0x05, 0x88, 0xe4,
- 0x8a, 0xe4, 0x25, 0xe2, 0x9a, 0x35, 0x72, 0x77, 0xe3, 0xc4, 0xba, 0x42,
- 0xdc, 0x65, 0xf9, 0x97, 0x3a, 0xa7, 0xb1, 0xce, 0xd2, 0x39, 0x11, 0x18,
- 0x11, 0xa4, 0x9e, 0x72, 0xa6, 0x04, 0x1a, 0xeb, 0x95, 0xf0, 0x04, 0x5d,
- 0x91, 0xaa, 0x1c, 0x4d, 0x2f, 0xd3, 0x66, 0x13, 0x67, 0x75, 0xd3, 0xc3,
- 0xa0, 0x88, 0x34, 0xa9, 0xf9, 0x78, 0xc4, 0xac, 0x89, 0x05, 0x4b, 0x92,
- 0x06, 0x92, 0xd6, 0xde, 0x9c, 0xa4, 0x4a, 0x6f, 0xd0, 0xd8, 0xe2, 0x11,
- 0xef, 0x28, 0x3f, 0x50, 0x5b, 0x45, 0x3a, 0x44, 0xe0, 0x2d, 0xf7, 0x69,
- 0x81, 0x43, 0x75, 0x9f, 0x2d, 0xa7, 0x24, 0xd2, 0xf1, 0x03, 0xcb, 0x05,
- 0x5e, 0xa0, 0xae, 0x16, 0xfe, 0xf4, 0xcc, 0xd2, 0x07, 0x5e, 0xf5, 0x7a,
- 0x2b, 0x34, 0x34, 0xfa, 0x73, 0x41, 0x9b, 0x20, 0xc3, 0x19, 0xd4, 0x79,
- 0x2b, 0xb8, 0x46, 0x63, 0x0f, 0xf9, 0xb4, 0x80, 0xdd, 0x9d, 0x9f, 0x0d,
- 0x2f, 0x99, 0xfd, 0x9f, 0xbf, 0xbb, 0xa4, 0x86, 0xe8, 0x1a, 0x2a, 0x4a,
- 0xda, 0x4e, 0x7e, 0x71, 0x9e, 0x40, 0x86, 0xb6, 0xe6, 0x68, 0xd7, 0x52,
- 0x1c, 0x71, 0xdc, 0x2a, 0xd6, 0xa5, 0x8c, 0x51, 0x14, 0x0b, 0x26, 0x5e,
- 0x53, 0x2b, 0x8a, 0x9b, 0x84, 0x79, 0xb4, 0x7b, 0x29, 0xda, 0xfc, 0x7c,
- 0x8b, 0xb6, 0xbb, 0xef, 0x9a, 0xfb, 0x91, 0x9f, 0xfe, 0x89, 0x7b, 0x2e,
- 0xd2, 0x59, 0x3a, 0x8d, 0x83, 0xbb, 0x4d, 0x39, 0x11, 0xd3, 0xb5, 0x3b,
- 0x8f, 0x63, 0x62, 0xbb, 0x18, 0xb4, 0x97, 0xa3, 0x79, 0x05, 0x71, 0x9a,
- 0xfd, 0x46, 0x4d, 0xb2, 0x44, 0xde, 0x23, 0x51, 0xd6, 0x2d, 0x1c, 0xef,
- 0x18, 0x1f, 0xf3, 0xca, 0x32, 0xd5, 0x77, 0xad, 0xb1, 0x6c, 0xcc, 0xc9,
- 0xa1, 0x9e, 0xb9, 0x85, 0xeb, 0x8c, 0xe2, 0xbc, 0xe3, 0x38, 0x98, 0xe8,
- 0x4c, 0xd4, 0xe8, 0xf5, 0x92, 0x06, 0x2f, 0xab, 0xda, 0x8b, 0xfa, 0x9f,
- 0xf0, 0xc8, 0x59, 0xa4, 0x76, 0x27, 0x9a, 0x64, 0xb5, 0xf9, 0x64, 0xb0,
- 0x71, 0x06, 0x95, 0xcd, 0xe9, 0x77, 0x27, 0x2c, 0xe4, 0xcd, 0x99, 0xfd,
- 0xf5, 0x20, 0x47, 0x8f, 0x48, 0x6f, 0x4b, 0x40, 0x74, 0xc2, 0xcd, 0x58,
- 0x0a, 0x4a, 0xe6, 0x4c, 0x3c, 0x13, 0xe1, 0x8f, 0xfd, 0xbe, 0x7c, 0x85,
- 0x1d, 0x5f, 0xd1, 0x55, 0x1e, 0x5f, 0xc7, 0xa9, 0x3b, 0xe8, 0x4a, 0x68,
- 0xee, 0xd9, 0x79, 0xa6, 0x8f, 0x33, 0x37, 0x62, 0xc6, 0xaa, 0x7b, 0xba,
- 0x04, 0xff, 0x49, 0xf8, 0x5e, 0xa2, 0x4d, 0xc1, 0xca, 0x6a, 0xb3, 0xb8,
- 0x8d, 0xac, 0xb9, 0x11, 0xee, 0x5f, 0xbe, 0xca, 0x40, 0x99, 0xb8, 0x98,
- 0xa8, 0xc9, 0xce, 0x20, 0xfa, 0x9a, 0xb4, 0x01, 0x68, 0x8f, 0x10, 0x50,
- 0x52, 0xd6, 0x84, 0xe8, 0x86, 0xb9, 0x4f, 0x48, 0x17, 0x29, 0x4a, 0xe2,
- 0x1a, 0x60, 0x6a, 0xf8, 0x8c, 0xc6, 0xe9, 0xd8, 0xd0, 0x4d, 0x76, 0x8f,
- 0x6e, 0xdd, 0x24, 0xa8, 0x89, 0x22, 0xc5, 0x25, 0xca, 0x9f, 0xcf, 0x06,
- 0xd1, 0x26, 0x98, 0x26, 0x71, 0x56, 0xe6, 0xfe, 0x7e, 0x16, 0x6e, 0x3d,
- 0x88, 0x8c, 0x9d, 0xb8, 0x1d, 0x4f, 0x26, 0xcc, 0x41, 0x68, 0x04, 0xd1,
- 0xa7, 0x83, 0xdd, 0x17, 0x83, 0x9d, 0x01, 0x1b, 0x0b, 0x92, 0xbb, 0x34,
- 0x23, 0x75, 0x8d, 0x44, 0x2d, 0x1e, 0x4a, 0x14, 0xbc, 0x49, 0xea, 0x0b,
- 0x1f, 0xeb, 0xeb, 0xeb, 0xa9, 0x30, 0xd4, 0x6d, 0xd2, 0xef, 0x02, 0x9e,
- 0x9b, 0x93, 0x62, 0x01, 0x6e, 0xc3, 0x8b, 0xa3, 0xdb, 0x2a, 0x34, 0x17,
- 0x32, 0x5b, 0x5d, 0xce, 0x2d, 0x47, 0x27, 0xfd, 0x78, 0xbb, 0xdf, 0x8f,
- 0x17, 0xac, 0x94, 0xd4, 0xcc, 0x02, 0x9b, 0x44, 0xa3, 0xdb, 0xac, 0xc1,
- 0x6e, 0x45, 0xdf, 0xb1, 0x84, 0x01, 0xce, 0xcc, 0x72, 0xde, 0xdc, 0x69,
- 0x80, 0x58, 0x3a, 0x91, 0x41, 0xf8, 0x9c, 0x80, 0xf3, 0xf0, 0x19, 0x6a,
- 0x6b, 0x8e, 0x6f, 0x5f, 0xf0, 0x52, 0x12, 0x14, 0x58, 0x86, 0x53, 0xcd,
- 0xd0, 0x08, 0x11, 0xac, 0x95, 0x6e, 0x9a, 0xdc, 0x29, 0x28, 0x29, 0x8b,
- 0x38, 0x32, 0x0f, 0x7e, 0xb4, 0xd6, 0x1c, 0x9f, 0x91, 0x79, 0x97, 0x44,
- 0xc1, 0x87, 0x94, 0x15, 0xd0, 0x54, 0x65, 0x21, 0xba, 0x41, 0xa2, 0x71,
- 0x8e, 0x85, 0x18, 0xb0, 0x60, 0x9e, 0x95, 0x89, 0x5d, 0x96, 0x18, 0x6c,
- 0x74, 0x35, 0x8d, 0xb9, 0xed, 0xa2, 0xd6, 0x1c, 0xa9, 0xda, 0x99, 0xaa,
- 0x87, 0x45, 0x46, 0x8b, 0x36, 0x1c, 0x7e, 0xad, 0x97, 0x67, 0x11, 0x6d,
- 0xa6, 0xf3, 0xf1, 0x74, 0x09, 0x1d, 0xe1, 0x8c, 0x26, 0x46, 0x5f, 0x6d,
- 0xf9, 0x73, 0xd6, 0x3f, 0xa0, 0xf5, 0x63, 0x9d, 0xb9, 0x1f, 0xd3, 0x49,
- 0x28, 0xa3, 0x97, 0xf2, 0xa3, 0x28, 0xf9, 0x72, 0xf9, 0xbc, 0xbe, 0xa4,
- 0xcc, 0xab, 0xb6, 0xa2, 0xa1, 0xca, 0x89, 0x3c, 0xb5, 0x77, 0xfc, 0xea,
- 0x41, 0xf0, 0x0e, 0x2f, 0x54, 0x41, 0xcb, 0x67, 0x47, 0x1b, 0xec, 0x4d,
- 0x86, 0x32, 0xa8, 0x35, 0x37, 0xe4, 0x91, 0x92, 0x28, 0x37, 0x61, 0x72,
- 0xc1, 0x15, 0x1c, 0x1d, 0x7e, 0x75, 0xc2, 0x93, 0x24, 0x4d, 0x52, 0xee,
- 0x07, 0x9d, 0x74, 0x9a, 0x4c, 0x99, 0xd4, 0xb0, 0x62, 0x50, 0xfa, 0xa2,
- 0x50, 0xde, 0xd4, 0xff, 0x75, 0xde, 0x64, 0x3f, 0xd3, 0x1a, 0xc6, 0xdb,
- 0x4f, 0x07, 0x3b, 0x1d, 0x96, 0xf8, 0x69, 0xc7, 0x48, 0x9b, 0xc9, 0x26,
- 0xdc, 0xc9, 0x34, 0x9e, 0xdf, 0x16, 0x42, 0xad, 0xa0, 0x2c, 0x8c, 0x95,
- 0xee, 0xa1, 0x65, 0x9e, 0xd3, 0xd5, 0x38, 0x09, 0x2d, 0x2f, 0x76, 0x5c,
- 0x64, 0x3a, 0x38, 0x04, 0x7a, 0xef, 0xff, 0x6d, 0xc9, 0xfb, 0x31, 0x8b,
- 0xf3, 0x5b, 0x93, 0x2f, 0x58, 0xf6, 0x27, 0x79, 0x3c, 0xc3, 0xc6, 0x61,
- 0x5c, 0x78, 0xbe, 0xa5, 0xb9, 0xfe, 0xd7, 0xb4, 0xd0, 0xac, 0xe0, 0xb3,
- 0x25, 0x40, 0x8e, 0x5f, 0x66, 0xc2, 0x88, 0xdf, 0x0e, 0xcf, 0xfd, 0x74,
- 0xea, 0xfa, 0x28, 0xfd, 0xca, 0xad, 0xb3, 0xa9, 0x81, 0xc9, 0x81, 0xde,
- 0xa5, 0x23, 0x2a, 0xd6, 0x85, 0x69, 0x4c, 0xe7, 0x8c, 0x17, 0xcf, 0x08,
- 0xa8, 0xd9, 0x37, 0x7f, 0xcb, 0x44, 0xd4, 0x2d, 0x70, 0x0a, 0x82, 0xdd,
- 0xef, 0x13, 0x4b, 0x66, 0x63, 0x49, 0xfb, 0x46, 0x5f, 0xd2, 0xa9, 0x28,
- 0xdc, 0xb1, 0xb8, 0x4a, 0xaf, 0x97, 0x79, 0x22, 0x8c, 0x1c, 0xf6, 0x15,
- 0x33, 0xab, 0x30, 0xdb, 0xbd, 0xc9, 0x40, 0x7c, 0x24, 0xed, 0x26, 0xd3,
- 0xab, 0x5e, 0xad, 0x39, 0x3e, 0xbe, 0x38, 0xd7, 0x18, 0x30, 0x18, 0x43,
- 0x91, 0x8c, 0xd1, 0xd8, 0x3c, 0x51, 0x06, 0x3e, 0xe3, 0xa5, 0x65, 0xed,
- 0x3c, 0x1a, 0x4f, 0xe3, 0x74, 0x06, 0xd1, 0x58, 0x95, 0xcf, 0x3a, 0xdd,
- 0x5c, 0xaa, 0xe8, 0x06, 0x92, 0x19, 0xb1, 0xe4, 0x98, 0x17, 0x2c, 0x1b,
- 0xf2, 0x76, 0xc5, 0x76, 0x7d, 0x8a, 0x5c, 0x76, 0x93, 0x8c, 0x6f, 0x41,
- 0x94, 0xc1, 0x6d, 0xd9, 0xaf, 0x35, 0x27, 0x9b, 0xc2, 0xd2, 0x53, 0x79,
- 0xb3, 0xa4, 0x25, 0x5f, 0x64, 0x45, 0x91, 0x8e, 0x98, 0x26, 0x49, 0x9a,
- 0x5a, 0x8e, 0x71, 0x98, 0x69, 0xc5, 0x49, 0xc1, 0xcd, 0x63, 0xba, 0x8e,
- 0x4b, 0x58, 0xb3, 0x40, 0x35, 0x7d, 0x22, 0x91, 0xc5, 0xba, 0xd1, 0x09,
- 0xc3, 0xa9, 0x32, 0x88, 0x42, 0x05, 0x5e, 0xc8, 0x92, 0x22, 0x5d, 0x8e,
- 0xa3, 0xda, 0x6a, 0xd6, 0x9a, 0x93, 0xb5, 0xed, 0xb1, 0x3a, 0x95, 0x92,
- 0x4e, 0x2d, 0x12, 0x13, 0x54, 0x4e, 0x92, 0x8f, 0x94, 0x43, 0x93, 0x36,
- 0x94, 0x8e, 0xe9, 0xda, 0xeb, 0x4f, 0x52, 0xd2, 0x32, 0x4b, 0xfe, 0x6d,
- 0x5e, 0x4e, 0x67, 0xbd, 0x90, 0xfb, 0xbb, 0x1d, 0x9f, 0x27, 0xd7, 0x19,
- 0xe9, 0xb8, 0x65, 0x93, 0xea, 0xc0, 0x6d, 0xc0, 0x6c, 0x44, 0x7a, 0x70,
- 0xd4, 0x61, 0x72, 0x00, 0xc9, 0x10, 0xc4, 0x8c, 0xd9, 0xfe, 0x33, 0xe1,
- 0xd3, 0x89, 0xa1, 0xd0, 0x28, 0x94, 0x9f, 0xd6, 0x79, 0x12, 0x44, 0x79,
- 0x3a, 0x46, 0xc4, 0x79, 0x7a, 0x7c, 0x82, 0xc6, 0x10, 0xb0, 0x66, 0xf1,
- 0x0a, 0x5b, 0x44, 0x02, 0x89, 0x13, 0x01, 0x46, 0x2c, 0xe9, 0xb3, 0x56,
- 0x75, 0x9f, 0x8e, 0x45, 0xa0, 0xe6, 0x05, 0xa9, 0x33, 0x60, 0xd6, 0xe9,
- 0xa7, 0x29, 0x3f, 0x37, 0x5b, 0x16, 0x10, 0xb6, 0xf9, 0xb2, 0x15, 0x3d,
- 0xe4, 0x9e, 0xb6, 0xca, 0xb1, 0x5b, 0x88, 0x4c, 0x74, 0xdb, 0xb1, 0x24,
- 0x17, 0xe7, 0x29, 0x94, 0xae, 0x46, 0x73, 0x32, 0x66, 0x9e, 0x26, 0xc6,
- 0xa9, 0xc3, 0xe4, 0xd7, 0x55, 0xae, 0xf1, 0xf2, 0x0c, 0x0e, 0x16, 0xf3,
- 0xa4, 0xe0, 0xe0, 0x8c, 0xe8, 0x34, 0x8b, 0x91, 0x30, 0x7a, 0xc9, 0x77,
- 0xf6, 0x2b, 0x9e, 0xcb, 0x1a, 0x7e, 0x19, 0x9d, 0x43, 0xd5, 0xbb, 0xa9,
- 0xca, 0x3c, 0x01, 0x63, 0x14, 0x55, 0x4e, 0x9a, 0x83, 0x5e, 0xcc, 0xc7,
- 0x7d, 0xb9, 0xa8, 0x13, 0x2a, 0x11, 0x66, 0xc2, 0xbc, 0xd2, 0xb5, 0xb4,
- 0xf0, 0xd7, 0x2d, 0x6d, 0x4d, 0x92, 0xde, 0xd1, 0xbc, 0xbd, 0x02, 0x25,
- 0x4d, 0xc3, 0xb2, 0x11, 0x75, 0x86, 0x49, 0x59, 0x6f, 0xee, 0x10, 0xfd,
- 0xed, 0x77, 0xa2, 0xc0, 0x44, 0x22, 0xed, 0xea, 0xda, 0xd1, 0x0a, 0xab,
- 0x01, 0xe4, 0x8a, 0xd5, 0x91, 0x32, 0xea, 0xb0, 0x09, 0x7d, 0xf7, 0xd5,
- 0xb7, 0x07, 0xa7, 0xef, 0x8e, 0x77, 0xff, 0x5c, 0xa7, 0x1e, 0xfa, 0x6e,
- 0x4f, 0xbe, 0xdb, 0xeb, 0xb4, 0x71, 0x34, 0x92, 0x23, 0xba, 0xaf, 0xba,
- 0xa4, 0xb1, 0xce, 0x46, 0x19, 0x6c, 0x9a, 0x76, 0x23, 0x83, 0x8b, 0xd1,
- 0x10, 0x7a, 0x2a, 0xde, 0x97, 0x72, 0x01, 0xf2, 0xaa, 0xf0, 0xd8, 0xf9,
- 0xf6, 0xac, 0x8f, 0x1d, 0x6a, 0x3e, 0xee, 0x64, 0xc8, 0x52, 0x4c, 0x02,
- 0xf1, 0x24, 0x5c, 0x8f, 0xa2, 0xc4, 0x7d, 0xa8, 0x5b, 0xc4, 0xad, 0x8b,
- 0x6e, 0xd9, 0x93, 0x73, 0x54, 0xe7, 0xf5, 0x6e, 0xc2, 0x7e, 0x4c, 0x60,
- 0xb9, 0x05, 0xe4, 0xa3, 0x14, 0x74, 0x45, 0xba, 0x74, 0x5c, 0x8e, 0x6f,
- 0x06, 0x74, 0xe7, 0x09, 0x4b, 0xe1, 0x43, 0x2e, 0xc7, 0xb3, 0xce, 0xef,
- 0xf8, 0x46, 0x80, 0x51, 0xfb, 0x8e, 0x26, 0x52, 0x08, 0xed, 0x76, 0x74,
- 0x2c, 0xa4, 0x0b, 0xd2, 0xd6, 0x74, 0xf4, 0x3c, 0x83, 0xb6, 0x60, 0x01,
- 0x06, 0x9b, 0xe5, 0x13, 0x96, 0xd7, 0x9b, 0xa3, 0xa3, 0x93, 0xcd, 0xb8,
- 0x4b, 0xb5, 0x4a, 0xb3, 0x7b, 0x41, 0xe7, 0x81, 0xe3, 0x44, 0xc3, 0x66,
- 0xc5, 0x77, 0xa5, 0x67, 0xb2, 0x9b, 0x27, 0x7a, 0x80, 0x45, 0xc7, 0xad,
- 0x53, 0x3e, 0x35, 0x36, 0x22, 0x61, 0x5b, 0xe4, 0x4d, 0x77, 0x5d, 0x11,
- 0x4d, 0x9f, 0x12, 0x4d, 0x4f, 0x33, 0xe5, 0xe9, 0x5e, 0x70, 0x55, 0x3d,
- 0x5e, 0x69, 0x20, 0xbb, 0x6a, 0x39, 0x97, 0xa2, 0xe8, 0xeb, 0x2e, 0xd8,
- 0x28, 0xe5, 0x5c, 0xb9, 0x95, 0x25, 0xf5, 0x90, 0x6f, 0x5f, 0x90, 0xbd,
- 0xf1, 0x5c, 0x36, 0x79, 0xb5, 0x34, 0xf7, 0x36, 0x29, 0x8b, 0x71, 0xbc,
- 0x48, 0xb6, 0xf5, 0x46, 0xb7, 0x6d, 0x0c, 0xc6, 0xd1, 0x64, 0x5e, 0x67,
- 0x97, 0xc7, 0x5e, 0x54, 0x4a, 0x54, 0x3e, 0xf3, 0x2a, 0xbc, 0xb0, 0xca,
- 0xe0, 0xd8, 0x9a, 0xee, 0x8f, 0x1d, 0x8f, 0x1b, 0x02, 0xd5, 0x9c, 0x14,
- 0xaa, 0x01, 0xb1, 0x44, 0x37, 0x1d, 0xbb, 0x5e, 0x95, 0xb2, 0xec, 0x64,
- 0x50, 0x2f, 0x03, 0x16, 0x35, 0xf0, 0x71, 0xe4, 0x1c, 0x07, 0x75, 0x6e,
- 0x63, 0x97, 0x5f, 0xd4, 0x1f, 0xbb, 0x21, 0xf4, 0xff, 0x1a, 0x7b, 0x59,
- 0x40, 0xcd, 0xce, 0x58, 0x2d, 0x92, 0xed, 0xe7, 0x24, 0xfc, 0xde, 0x25,
- 0x8e, 0x51, 0xb4, 0x5f, 0x59, 0x5e, 0xe1, 0x33, 0x8e, 0x7d, 0x44, 0x8d,
- 0x4f, 0x96, 0xb3, 0x85, 0x4a, 0x1a, 0xbf, 0x6b, 0x39, 0x86, 0x20, 0x8a,
- 0x5f, 0x2a, 0x56, 0x40, 0xbe, 0xf9, 0x25, 0x82, 0xc5, 0x97, 0x22, 0x56,
- 0xf6, 0xe3, 0x62, 0x9c, 0xa6, 0xb5, 0xb7, 0x8e, 0xa1, 0x51, 0x45, 0xd1,
- 0xc1, 0xf0, 0xf0, 0xe4, 0xc4, 0xdb, 0x1e, 0xee, 0x45, 0x4a, 0xe7, 0x79,
- 0xb0, 0x7a, 0x49, 0x2b, 0xc2, 0x5e, 0xaa, 0x01, 0x4c, 0x78, 0x70, 0x44,
- 0x95, 0x2a, 0x71, 0xb5, 0x9d, 0xb6, 0x11, 0x2b, 0x6a, 0x44, 0x1a, 0x63,
- 0x11, 0x82, 0xa5, 0x19, 0x9a, 0x10, 0x5b, 0xc2, 0x40, 0x14, 0x74, 0x6b,
- 0x15, 0xaa, 0x43, 0xfd, 0xb9, 0x5c, 0x2d, 0x92, 0x57, 0x07, 0x90, 0x11,
- 0x6f, 0x1a, 0xa2, 0xb4, 0x69, 0x62, 0xe3, 0x98, 0xc6, 0x5f, 0x44, 0xca,
- 0x11, 0x71, 0x3d, 0xf1, 0x2e, 0x4f, 0xd4, 0xf4, 0xa0, 0xcc, 0x91, 0xa4,
- 0x02, 0x5a, 0xbe, 0x89, 0x68, 0xc5, 0x74, 0x0b, 0x3d, 0xd9, 0xab, 0xb3,
- 0x96, 0x15, 0xdd, 0xff, 0xb3, 0x22, 0x94, 0xb9, 0x70, 0x5d, 0x7f, 0x8c,
- 0xc4, 0xc5, 0x54, 0x83, 0xf3, 0xf2, 0x25, 0xbf, 0x51, 0x93, 0x13, 0x06,
- 0x5e, 0xd2, 0x68, 0x6e, 0x8c, 0x99, 0x53, 0xf5, 0x32, 0xad, 0xec, 0xf8,
- 0xb2, 0x58, 0xc2, 0xb4, 0xb4, 0x20, 0x81, 0xa9, 0x9c, 0x12, 0x8b, 0xeb,
- 0x45, 0xcb, 0x39, 0xff, 0x74, 0xba, 0xa9, 0xd7, 0xda, 0xbd, 0xf2, 0xc3,
- 0xba, 0x4d, 0x9e, 0xd2, 0x44, 0xe3, 0x28, 0xe4, 0xb3, 0x22, 0xf4, 0xda,
- 0x9a, 0xc9, 0xf1, 0x63, 0xa7, 0x0c, 0x38, 0xf7, 0x24, 0x65, 0x17, 0x1e,
- 0x0d, 0xb9, 0xbe, 0x63, 0x55, 0xf1, 0xd1, 0xe4, 0xc7, 0x68, 0xb3, 0x58,
- 0xb2, 0x88, 0x43, 0x7c, 0xdf, 0x04, 0x18, 0x2f, 0xd2, 0xd0, 0xf2, 0x9a,
- 0xec, 0x52, 0xbf, 0x0c, 0x88, 0xc7, 0x86, 0x1a, 0x4d, 0x7f, 0x9c, 0x2e,
- 0x6e, 0xf8, 0x74, 0xbc, 0x84, 0x06, 0xcc, 0x52, 0xb6, 0x7c, 0xd0, 0xb8,
- 0x9e, 0x87, 0xc3, 0x53, 0xd3, 0x66, 0x70, 0xc2, 0xc1, 0x51, 0xed, 0x6d,
- 0x5d, 0xff, 0xd4, 0xbc, 0x09, 0x66, 0xe3, 0x14, 0x96, 0xc8, 0x4d, 0xd7,
- 0x09, 0x87, 0x04, 0x3c, 0x7b, 0x59, 0x44, 0x14, 0x67, 0x51, 0x17, 0xbb,
- 0xad, 0x7d, 0x3b, 0x88, 0x2e, 0x98, 0x4f, 0x2e, 0x17, 0x6c, 0x56, 0x84,
- 0xeb, 0x11, 0x9f, 0xd7, 0x9a, 0xc3, 0xe0, 0x83, 0x0d, 0x85, 0xa7, 0xae,
- 0x72, 0xf6, 0x2a, 0x5c, 0x33, 0x0d, 0xbf, 0x23, 0xaa, 0xdf, 0xaf, 0xb3,
- 0x0c, 0xef, 0x12, 0x20, 0xc9, 0x66, 0x5e, 0x14, 0x53, 0x38, 0x61, 0x26,
- 0xd9, 0xb8, 0xd8, 0x26, 0x85, 0xb7, 0xd8, 0xb6, 0xc1, 0x55, 0xdc, 0x2d,
- 0xc6, 0x5c, 0x87, 0xc3, 0x60, 0x6e, 0x6c, 0x15, 0x11, 0xe1, 0xdb, 0x6d,
- 0x30, 0xa4, 0x12, 0x3a, 0x6e, 0xa2, 0x60, 0x9e, 0x82, 0xec, 0xbe, 0x9a,
- 0x2f, 0x2f, 0x4f, 0x87, 0x58, 0xae, 0xba, 0x64, 0xb8, 0x24, 0x96, 0x62,
- 0x9b, 0xc3, 0x6d, 0x5b, 0xd3, 0xb8, 0xae, 0xe4, 0x0a, 0x18, 0x0e, 0x0f,
- 0xf1, 0xe1, 0x70, 0xc9, 0x3a, 0x01, 0x75, 0x91, 0xaf, 0x22, 0x53, 0x83,
- 0x6b, 0xcd, 0xf1, 0x6c, 0x6d, 0x7e, 0x62, 0xe8, 0xca, 0xf2, 0xd5, 0xe0,
- 0x2a, 0x99, 0x64, 0x79, 0x3c, 0x20, 0x5e, 0x4d, 0x44, 0x09, 0xf7, 0x07,
- 0xe6, 0x4a, 0x87, 0xf5, 0x3d, 0xcd, 0x1e, 0xd3, 0xfc, 0xe4, 0x88, 0x9f,
- 0xae, 0x93, 0x13, 0xdd, 0xda, 0x49, 0xf1, 0x61, 0xc6, 0x89, 0x7b, 0xc3,
- 0x7c, 0x60, 0x6c, 0x22, 0x2d, 0xda, 0x18, 0xa7, 0x1d, 0x9b, 0x96, 0x5b,
- 0x0e, 0x76, 0xc7, 0x0a, 0x63, 0xa0, 0x41, 0x2e, 0xd8, 0xc8, 0x95, 0x4c,
- 0xda, 0xb9, 0xc3, 0x85, 0xa9, 0x36, 0x91, 0x7f, 0xd2, 0x1b, 0xd4, 0xea,
- 0x91, 0x04, 0xc4, 0x18, 0xaf, 0xb3, 0x9c, 0x38, 0xde, 0xac, 0x68, 0x90,
- 0x96, 0x38, 0x90, 0x55, 0xbf, 0x2a, 0x7a, 0x6a, 0xc0, 0x2c, 0x97, 0xb9,
- 0xac, 0xfe, 0x72, 0x1e, 0x74, 0x40, 0xcb, 0xb6, 0x9c, 0xc1, 0xe3, 0x6b,
- 0xab, 0xb0, 0x86, 0x63, 0x7a, 0xa5, 0x07, 0x0a, 0x5f, 0x20, 0x84, 0x16,
- 0xe0, 0xbe, 0x6c, 0x79, 0x99, 0xfb, 0xb8, 0x06, 0xe8, 0xe6, 0xac, 0x85,
- 0xd7, 0xe5, 0x13, 0xe7, 0x6a, 0xc8, 0x13, 0x7e, 0x14, 0xca, 0x17, 0xa9,
- 0xe9, 0x79, 0x75, 0xa9, 0x70, 0x1e, 0xfb, 0xbc, 0xf0, 0xcc, 0x91, 0x5f,
- 0x92, 0x42, 0x99, 0x51, 0x27, 0xf5, 0x33, 0xfe, 0x26, 0x7e, 0x48, 0x67,
- 0xcb, 0x19, 0x36, 0x88, 0x69, 0x4b, 0x1f, 0x13, 0x4e, 0xc5, 0xfc, 0x8e,
- 0x58, 0x61, 0x76, 0xaf, 0x77, 0xb3, 0x3f, 0xe4, 0xce, 0xde, 0x53, 0xe7,
- 0xe6, 0x32, 0x1f, 0xf9, 0x96, 0xa4, 0xb6, 0x81, 0x29, 0x7c, 0x66, 0x72,
- 0x9b, 0xb1, 0xbf, 0xa7, 0xca, 0x30, 0xa2, 0xc5, 0x4d, 0x5c, 0xd0, 0xad,
- 0xca, 0x77, 0x6b, 0xdb, 0x54, 0xe9, 0x5b, 0x7b, 0x3a, 0x69, 0x30, 0xeb,
- 0x0c, 0x72, 0x33, 0x2e, 0x68, 0x5a, 0xda, 0x01, 0xfb, 0xf2, 0x4d, 0xbe,
- 0x6c, 0xb1, 0x31, 0xcc, 0xe8, 0xd6, 0x9d, 0xc5, 0x0f, 0x58, 0x15, 0x93,
- 0xe0, 0x7e, 0x2d, 0x4a, 0x56, 0xe1, 0x38, 0xd8, 0x84, 0x9a, 0x24, 0xf3,
- 0x12, 0x82, 0x08, 0x4b, 0xe6, 0xf5, 0x4d, 0x70, 0x06, 0xa3, 0x4c, 0x79,
- 0x2c, 0x9e, 0x74, 0x66, 0x71, 0xbb, 0xee, 0xc4, 0x9a, 0xcf, 0x76, 0x58,
- 0x93, 0xb9, 0xe2, 0x2b, 0x58, 0xd7, 0x9b, 0x02, 0xec, 0x62, 0x9a, 0xf0,
- 0x62, 0x39, 0x1d, 0x6d, 0xa0, 0x0e, 0x2a, 0x6e, 0xa1, 0xd0, 0x98, 0x08,
- 0x6b, 0xa4, 0x72, 0x5d, 0xb1, 0x84, 0xda, 0xaa, 0xa7, 0xc6, 0x15, 0x7f,
- 0x8f, 0x18, 0xf7, 0x62, 0xd8, 0x2d, 0xe1, 0xe5, 0x2c, 0x2a, 0xe3, 0xaa,
- 0x68, 0x5b, 0xb5, 0xe6, 0xcc, 0x94, 0x01, 0x4a, 0xd9, 0x2c, 0xb6, 0x06,
- 0xaa, 0xfb, 0xb8, 0x39, 0xd1, 0x56, 0xde, 0xce, 0xb3, 0x7b, 0xd2, 0x36,
- 0xe7, 0x99, 0x74, 0x64, 0xeb, 0xcb, 0xc3, 0x6f, 0x70, 0xa3, 0x64, 0xae,
- 0xaa, 0x99, 0x0e, 0xca, 0xc9, 0x63, 0xfc, 0x74, 0xe9, 0x44, 0xa6, 0x50,
- 0x6e, 0x0e, 0xe5, 0xe5, 0xfa, 0x64, 0x45, 0x7a, 0x76, 0x2e, 0xdf, 0xa4,
- 0xf4, 0x02, 0x3c, 0x94, 0x2a, 0xa6, 0x6c, 0xef, 0xe9, 0x22, 0xe9, 0xa7,
- 0xb8, 0xe9, 0x91, 0xfe, 0xd8, 0xef, 0xf4, 0xda, 0x28, 0xae, 0x2e, 0x1c,
- 0xdb, 0x98, 0x9c, 0xa8, 0xd4, 0x2e, 0xa7, 0xab, 0xa2, 0xae, 0xc3, 0x64,
- 0xe2, 0x21, 0xb1, 0xae, 0x0b, 0x9d, 0x5e, 0xad, 0x9f, 0x7c, 0xdf, 0xfb,
- 0xc6, 0x84, 0x1e, 0xef, 0x6f, 0xb2, 0x69, 0xeb, 0x09, 0x0a, 0x54, 0xf5,
- 0x8c, 0x9b, 0x81, 0xfd, 0x90, 0x1a, 0x80, 0x1c, 0x5d, 0x63, 0x22, 0xd1,
- 0x78, 0x9a, 0xc4, 0xf9, 0x74, 0xa5, 0x6a, 0x5c, 0xfd, 0x04, 0xdd, 0xd9,
- 0x02, 0xc3, 0xc6, 0x1b, 0x13, 0x81, 0xe6, 0x73, 0x5e, 0x5e, 0xf5, 0x6f,
- 0x59, 0x1c, 0x44, 0x29, 0xe6, 0x7c, 0xe1, 0xe3, 0x7c, 0xf2, 0xef, 0x52,
- 0xb6, 0x19, 0x35, 0x56, 0x3b, 0x49, 0x26, 0xa3, 0x78, 0x7c, 0x8b, 0xb5,
- 0xe6, 0x16, 0xd5, 0x73, 0x75, 0x83, 0x88, 0x1e, 0x35, 0x33, 0x11, 0x29,
- 0xdf, 0xd0, 0xc1, 0x2b, 0xd2, 0x72, 0x19, 0xff, 0x8b, 0x27, 0x56, 0x8e,
- 0x6c, 0x9d, 0x90, 0xdb, 0x74, 0xe7, 0x35, 0x47, 0xfa, 0x10, 0x47, 0x9a,
- 0x44, 0xb3, 0xf9, 0x92, 0x64, 0x77, 0x62, 0xab, 0xd9, 0xd5, 0x15, 0xd1,
- 0xc8, 0xe7, 0x0d, 0xd3, 0x81, 0x3c, 0xb2, 0x7d, 0x21, 0x61, 0x50, 0xa1,
- 0x50, 0x18, 0x55, 0xdd, 0xbe, 0x7c, 0x69, 0xf3, 0xd0, 0xae, 0x53, 0xde,
- 0x0c, 0x69, 0xae, 0x69, 0x32, 0xab, 0x7e, 0x6f, 0x2b, 0x2b, 0xfe, 0x11,
- 0x8b, 0x9f, 0x82, 0x80, 0x35, 0x5a, 0xa9, 0x42, 0x1d, 0x97, 0xcd, 0x68,
- 0x0e, 0x63, 0xd2, 0xb7, 0xe9, 0x62, 0xc1, 0x3b, 0x25, 0x61, 0x18, 0x30,
- 0xb8, 0x39, 0xb3, 0xc8, 0x28, 0xb9, 0x4e, 0xe7, 0xd8, 0x52, 0x73, 0x32,
- 0x64, 0x4b, 0xd2, 0x1a, 0x64, 0xd0, 0xa3, 0x84, 0xce, 0x47, 0xbd, 0x39,
- 0x33, 0x4a, 0x78, 0xb7, 0xa9, 0x5a, 0x70, 0x26, 0xec, 0x22, 0x9d, 0x2b,
- 0xff, 0xe1, 0x5d, 0xc2, 0xb6, 0x40, 0xc7, 0x50, 0x8b, 0x58, 0xaf, 0xe5,
- 0xc8, 0xbc, 0xf6, 0x66, 0x1f, 0x73, 0x6d, 0x0c, 0x4f, 0xfe, 0xf7, 0xb1,
- 0x77, 0x72, 0x3b, 0x2f, 0xf2, 0x0a, 0xd4, 0xdd, 0x20, 0x87, 0x77, 0xac,
- 0x4b, 0x76, 0xfa, 0x87, 0xb4, 0x5d, 0x1d, 0x0c, 0xa5, 0xe2, 0xbb, 0x58,
- 0x96, 0x19, 0x1d, 0x70, 0x8d, 0x07, 0x40, 0x6c, 0x16, 0x53, 0x1c, 0xe9,
- 0x56, 0x79, 0xb2, 0x0d, 0x07, 0x50, 0xd6, 0xe0, 0x57, 0xd8, 0x42, 0xb8,
- 0xe1, 0x74, 0x8e, 0xb0, 0x41, 0x95, 0xea, 0x34, 0x29, 0x82, 0xed, 0x53,
- 0x47, 0xe3, 0x36, 0xb4, 0x63, 0xf5, 0x93, 0x37, 0x55, 0x05, 0x35, 0x14,
- 0x8b, 0x57, 0xb0, 0x85, 0x05, 0xfc, 0x7a, 0x37, 0x50, 0x5f, 0xb8, 0x05,
- 0x29, 0x09, 0x79, 0x7d, 0x1c, 0xf0, 0xf9, 0x38, 0x1b, 0x2c, 0xee, 0xf6,
- 0xbf, 0x92, 0x58, 0xa3, 0x06, 0x3d, 0xda, 0x22, 0x78, 0xc2, 0xcc, 0xb5,
- 0xd5, 0x0b, 0xa4, 0x0e, 0x69, 0xb3, 0x45, 0x60, 0xa3, 0x1b, 0x9a, 0x24,
- 0xa2, 0x98, 0x63, 0x26, 0x32, 0x5a, 0xdf, 0xc8, 0xc9, 0x9a, 0xd1, 0x4d,
- 0x4a, 0x23, 0xcf, 0xc7, 0x37, 0x2b, 0xbe, 0x28, 0xd8, 0xfc, 0x08, 0xf7,
- 0xcd, 0x65, 0x60, 0xc1, 0xaf, 0xb3, 0x2d, 0xf4, 0xa1, 0x96, 0x21, 0x1e,
- 0x7d, 0xc4, 0x12, 0x16, 0x3d, 0x67, 0x04, 0x54, 0x1b, 0x1d, 0xd1, 0xc5,
- 0x0d, 0xd3, 0x6c, 0x32, 0x65, 0x21, 0xe0, 0xa4, 0xcd, 0x06, 0xd3, 0xcf,
- 0x02, 0x2e, 0x8e, 0x7d, 0xa3, 0xeb, 0x85, 0x9a, 0x66, 0x46, 0x28, 0x06,
- 0x2c, 0xe9, 0x88, 0x6d, 0xb0, 0xd2, 0x17, 0x2e, 0x4a, 0xbe, 0x10, 0x57,
- 0xb5, 0xe6, 0xd4, 0x29, 0xa5, 0xef, 0xdb, 0xda, 0x9b, 0x5f, 0xaa, 0xbe,
- 0x9d, 0xec, 0x67, 0x91, 0xef, 0xec, 0xee, 0xb3, 0x85, 0x11, 0xa5, 0xaa,
- 0xae, 0xd5, 0x4b, 0x54, 0x29, 0xcb, 0xf3, 0xfd, 0xfe, 0x55, 0xd9, 0xb0,
- 0x72, 0x06, 0x5b, 0x5a, 0xdd, 0xe9, 0xe9, 0x15, 0x7c, 0x7a, 0x5b, 0xcc,
- 0x7d, 0x88, 0x52, 0xca, 0xe8, 0xf4, 0x35, 0x53, 0xdb, 0xe1, 0x05, 0xfd,
- 0x4c, 0xcd, 0xa9, 0xc7, 0x6c, 0x1d, 0x21, 0xa2, 0xac, 0x8f, 0xbf, 0xf9,
- 0x76, 0x18, 0x6d, 0x9e, 0x0d, 0xb7, 0x9f, 0xbc, 0xd8, 0xd9, 0xaa, 0xb7,
- 0xc5, 0x4b, 0x05, 0x89, 0xa5, 0xd5, 0x68, 0x3b, 0xdc, 0xe6, 0xc8, 0xda,
- 0x2d, 0x8e, 0x7e, 0xbe, 0x13, 0xa5, 0x37, 0xb0, 0xb2, 0x9c, 0x1f, 0xbf,
- 0x31, 0x6b, 0x18, 0xf6, 0x8a, 0x98, 0xdf, 0x21, 0x8d, 0x87, 0x8d, 0xf9,
- 0x4d, 0xc2, 0xb9, 0x48, 0xee, 0xcc, 0xa4, 0x16, 0x9d, 0x42, 0xa5, 0xc3,
- 0xb9, 0x60, 0xbb, 0x9d, 0x69, 0x87, 0x8b, 0x84, 0x79, 0x81, 0x6f, 0x41,
- 0xa5, 0x53, 0x16, 0x14, 0x1a, 0xa7, 0x75, 0x04, 0xc9, 0xb2, 0xa0, 0x31,
- 0xe5, 0x90, 0xfd, 0x39, 0x72, 0x62, 0xf2, 0xdb, 0x9d, 0x30, 0x5b, 0x93,
- 0x03, 0x38, 0x7b, 0x69, 0x95, 0xe1, 0xea, 0xfd, 0x34, 0xf0, 0xbf, 0x4e,
- 0xd8, 0xe2, 0xc4, 0x26, 0x92, 0x97, 0x8f, 0x58, 0xc0, 0x87, 0x89, 0xc8,
- 0xdc, 0xa1, 0x41, 0x0e, 0x2f, 0xc1, 0x3a, 0x8d, 0xe0, 0x07, 0x73, 0xdb,
- 0x78, 0x47, 0x6b, 0x8b, 0xdd, 0xcb, 0x82, 0xa6, 0x9d, 0x1f, 0x4f, 0x5c,
- 0xc4, 0x74, 0x4b, 0xaf, 0x74, 0x5d, 0xe3, 0x68, 0x94, 0x67, 0xf7, 0x1c,
- 0x03, 0x8c, 0x28, 0x04, 0x50, 0x5f, 0x2c, 0x41, 0xc1, 0x37, 0x0d, 0x23,
- 0x1f, 0xed, 0xe9, 0xd4, 0x39, 0x85, 0xbf, 0xbe, 0x7c, 0x73, 0x8a, 0x6d,
- 0x85, 0xf6, 0x22, 0xca, 0x8f, 0x8e, 0x79, 0x39, 0x22, 0xb1, 0x9e, 0xef,
- 0xfd, 0xd2, 0x99, 0x5d, 0x2a, 0x11, 0xbc, 0x46, 0xb9, 0x31, 0xa2, 0xa1,
- 0x94, 0x13, 0x2f, 0xda, 0x8c, 0xfe, 0xca, 0xf8, 0xbd, 0xc8, 0xc6, 0x97,
- 0x2d, 0x9d, 0xc6, 0x3e, 0x9b, 0xa4, 0xea, 0x66, 0x8d, 0xc5, 0x62, 0xaa,
- 0x26, 0x92, 0xed, 0x87, 0x3e, 0x29, 0xee, 0x7d, 0x1e, 0x5d, 0x9f, 0x9a,
- 0x17, 0xaf, 0x26, 0xb3, 0x98, 0x43, 0x12, 0x85, 0x85, 0x4e, 0xa2, 0xfe,
- 0x6b, 0xda, 0x09, 0x7e, 0xa2, 0xb1, 0x7b, 0x7e, 0x8f, 0xf4, 0x5e, 0x95,
- 0x45, 0x63, 0xe9, 0x56, 0x3e, 0x17, 0x2b, 0x9d, 0xba, 0x4c, 0x17, 0xf0,
- 0xdb, 0xe3, 0xf1, 0x68, 0x41, 0x7c, 0x7c, 0x5a, 0xe7, 0x0e, 0x6c, 0x3c,
- 0xce, 0x57, 0x12, 0xc9, 0xa0, 0xe6, 0x5d, 0x73, 0x72, 0x59, 0x60, 0x83,
- 0x36, 0x2b, 0x4f, 0x7a, 0x53, 0x72, 0xc6, 0xaa, 0x7a, 0xfd, 0xbc, 0xab,
- 0x8b, 0x96, 0x5f, 0xbb, 0x8b, 0xa7, 0x4b, 0x68, 0xaf, 0xb1, 0x6c, 0x84,
- 0xf8, 0x7d, 0x11, 0x37, 0x18, 0xc3, 0x50, 0x6b, 0x0d, 0xbb, 0x35, 0x68,
- 0xa3, 0x7c, 0x8e, 0x32, 0x91, 0xbb, 0xbd, 0x48, 0x5c, 0xfc, 0x81, 0x1d,
- 0x81, 0xaa, 0xa9, 0xd3, 0x62, 0x45, 0x65, 0x41, 0xe8, 0x3a, 0xae, 0x0f,
- 0x0e, 0xd7, 0xb3, 0x3a, 0x27, 0x84, 0xe0, 0x74, 0x61, 0x52, 0xbe, 0x0b,
- 0x2a, 0xe6, 0x65, 0x39, 0x3e, 0xb3, 0x24, 0xbf, 0x86, 0x84, 0x40, 0xd2,
- 0x5e, 0xd3, 0xa6, 0xa3, 0xec, 0x42, 0x03, 0xc2, 0x20, 0x98, 0xfc, 0xa1,
- 0x2f, 0x0e, 0x11, 0xdc, 0x17, 0x4b, 0xf6, 0x42, 0x0a, 0x71, 0x44, 0xdd,
- 0xfe, 0x44, 0x64, 0xb5, 0x57, 0x93, 0x78, 0x4e, 0x0b, 0xc1, 0xfb, 0xd8,
- 0x14, 0x74, 0xa6, 0xd3, 0x57, 0x53, 0x12, 0xba, 0x56, 0xdd, 0x48, 0x43,
- 0x97, 0x34, 0xa0, 0xa5, 0x54, 0xa1, 0x0c, 0x9b, 0x39, 0xbe, 0x59, 0xce,
- 0x6f, 0x4d, 0x68, 0x9a, 0x92, 0xd0, 0x5d, 0x44, 0x88, 0x9d, 0xaf, 0x35,
- 0xd7, 0x0d, 0x7a, 0xfb, 0x43, 0xd8, 0x76, 0xdb, 0x2a, 0x63, 0xf7, 0x39,
- 0x68, 0xd2, 0xd3, 0xb8, 0xbb, 0xb8, 0x24, 0xe6, 0x34, 0xfa, 0xa2, 0x67,
- 0x7e, 0xd7, 0xd2, 0xb9, 0x58, 0x60, 0x48, 0x8e, 0x9b, 0xe7, 0x30, 0x09,
- 0x7c, 0x3a, 0xf0, 0x22, 0xb8, 0x56, 0xc5, 0x6b, 0xc3, 0xe6, 0x3f, 0xf3,
- 0x39, 0x56, 0x94, 0xc6, 0x16, 0x85, 0xae, 0xf2, 0xaa, 0x78, 0xf6, 0x5c,
- 0x7e, 0x02, 0x4e, 0x5b, 0x61, 0xb2, 0x1f, 0x3a, 0x16, 0x53, 0x9d, 0xde,
- 0x84, 0x2d, 0xe2, 0x24, 0xd3, 0xac, 0x3f, 0x71, 0x6f, 0xc2, 0xe0, 0xc6,
- 0x6a, 0x00, 0x80, 0xa3, 0x86, 0x41, 0x74, 0x9e, 0x15, 0xd8, 0x5e, 0x1e,
- 0x46, 0x9b, 0xba, 0x19, 0xfb, 0xbb, 0x7a, 0x12, 0x75, 0xaf, 0xb2, 0x6c,
- 0x14, 0xe7, 0x5d, 0xdd, 0x41, 0x78, 0xa1, 0xa9, 0xb9, 0x89, 0xb0, 0x65,
- 0x78, 0x78, 0x85, 0xea, 0xbe, 0xa0, 0x07, 0xeb, 0x14, 0x3a, 0x8a, 0x2b,
- 0x76, 0x91, 0xf0, 0xdc, 0x3d, 0xc6, 0x91, 0x95, 0x8b, 0x31, 0x7d, 0x68,
- 0xb8, 0x1e, 0x84, 0xed, 0x29, 0x24, 0x98, 0x9a, 0xd7, 0x84, 0xe4, 0x00,
- 0x71, 0x7e, 0x2f, 0xf2, 0x46, 0xf7, 0x2c, 0x11, 0x21, 0x4c, 0x82, 0x68,
- 0xab, 0xc8, 0x92, 0xbb, 0x30, 0x3a, 0xfa, 0xb7, 0x23, 0x16, 0x5e, 0x37,
- 0x36, 0xbd, 0x1c, 0x61, 0x59, 0x6c, 0x22, 0x2e, 0x8e, 0x5b, 0x42, 0xd9,
- 0x2c, 0x88, 0x1b, 0xe6, 0x64, 0xcf, 0xe6, 0x5a, 0x02, 0x71, 0x7a, 0x34,
- 0x3f, 0x44, 0x3c, 0xe1, 0x84, 0xcc, 0x93, 0x7b, 0xf1, 0x17, 0xc2, 0xce,
- 0xc9, 0x17, 0x01, 0x33, 0x6d, 0xb3, 0x6a, 0x8d, 0x21, 0x7c, 0x14, 0x2a,
- 0x3e, 0x35, 0x94, 0x85, 0x39, 0x2f, 0x01, 0xb6, 0xee, 0xc3, 0x41, 0x1d,
- 0xde, 0x60, 0xd6, 0x72, 0x31, 0x23, 0xaa, 0xfe, 0x2a, 0x63, 0xeb, 0x94,
- 0xde, 0x15, 0x8d, 0x75, 0xe0, 0xa8, 0x07, 0x09, 0xc9, 0x45, 0xc0, 0x92,
- 0xac, 0x6b, 0x5c, 0x68, 0x06, 0xc6, 0x48, 0x96, 0xc3, 0x31, 0xff, 0x06,
- 0x95, 0x38, 0x26, 0xfa, 0x28, 0xa1, 0x5c, 0xaa, 0xae, 0xaa, 0x64, 0xd2,
- 0x73, 0xab, 0xab, 0x37, 0x9a, 0x44, 0x66, 0x2b, 0x85, 0x1a, 0xb7, 0xe5,
- 0xcd, 0x6d, 0x39, 0x94, 0xb2, 0xca, 0x29, 0x98, 0x6e, 0x6c, 0x6a, 0x70,
- 0x92, 0x33, 0xaf, 0x2f, 0xfc, 0x31, 0xa3, 0xe9, 0x0e, 0xaa, 0x12, 0xc7,
- 0x67, 0x83, 0x9d, 0xad, 0x16, 0xa1, 0x73, 0x24, 0x01, 0x43, 0x30, 0x9b,
- 0x4e, 0x53, 0x62, 0x0a, 0xca, 0xa3, 0x65, 0x3a, 0x92, 0x21, 0xe2, 0xfc,
- 0x8f, 0xa4, 0xf5, 0x19, 0xfb, 0x0d, 0x63, 0xec, 0x9c, 0x59, 0x84, 0x17,
- 0x5a, 0x94, 0x2e, 0xc7, 0x9f, 0x33, 0x09, 0xec, 0x8c, 0x8d, 0x6d, 0xb8,
- 0x90, 0x8d, 0xd8, 0xfb, 0x01, 0xda, 0xd7, 0x0e, 0x5d, 0x33, 0x6b, 0x60,
- 0xbf, 0x67, 0x0c, 0x2b, 0x2a, 0x2d, 0x17, 0x58, 0x56, 0xc3, 0x4a, 0xeb,
- 0xf7, 0x58, 0xd2, 0x6d, 0x92, 0x62, 0x7f, 0xa3, 0x61, 0x65, 0x41, 0xff,
- 0xed, 0x79, 0x6f, 0x5e, 0x1c, 0x09, 0xfc, 0xc8, 0x9e, 0x67, 0x85, 0x52,
- 0x86, 0x48, 0x36, 0x22, 0x97, 0xc4, 0x6b, 0x9a, 0xe3, 0x89, 0xfd, 0xa7,
- 0xc6, 0x57, 0x8c, 0x89, 0xbe, 0x59, 0x96, 0x2e, 0x32, 0xdb, 0x30, 0xdf,
- 0x94, 0x8b, 0x60, 0xc3, 0x27, 0x71, 0xc3, 0xcb, 0xec, 0x42, 0x7f, 0x88,
- 0xa5, 0xbe, 0x42, 0x6a, 0x43, 0xf4, 0x45, 0xa4, 0xce, 0x7f, 0x36, 0x38,
- 0xab, 0x90, 0xeb, 0x33, 0x00, 0x30, 0x78, 0x5c, 0xc6, 0x58, 0x86, 0xf6,
- 0xe6, 0xe0, 0x81, 0x0f, 0x57, 0x4f, 0xc8, 0x8f, 0xe3, 0x52, 0x0b, 0x49,
- 0xb9, 0x6a, 0xb8, 0x3c, 0x5f, 0x7d, 0x78, 0xf5, 0x7e, 0xe1, 0xe2, 0x7d,
- 0x60, 0xf5, 0x2e, 0x11, 0x65, 0x4c, 0xf2, 0x01, 0xa2, 0x4b, 0x5e, 0x05,
- 0x01, 0x0f, 0xac, 0xdd, 0x4b, 0x30, 0x9e, 0x77, 0x20, 0x57, 0x8f, 0x66,
- 0x60, 0xa2, 0x79, 0xf5, 0xab, 0xed, 0x3a, 0xa8, 0xd1, 0x46, 0xdf, 0xde,
- 0x9c, 0xe8, 0xea, 0xf3, 0x41, 0x10, 0x03, 0x04, 0x8d, 0x17, 0xd9, 0x14,
- 0xfc, 0x3a, 0xf5, 0x96, 0x3c, 0x2c, 0xd4, 0x44, 0xad, 0x67, 0xaf, 0x45,
- 0x98, 0xab, 0xc8, 0x74, 0x13, 0xbb, 0x54, 0x1b, 0xf3, 0xfb, 0xc2, 0x98,
- 0xf8, 0x07, 0x27, 0x27, 0xb3, 0xd3, 0xa0, 0x70, 0xc4, 0xe5, 0xa8, 0x04,
- 0x26, 0x56, 0x5b, 0x88, 0x64, 0x62, 0x9b, 0x68, 0xb1, 0x74, 0x19, 0x27,
- 0xf3, 0x01, 0x90, 0x4c, 0x8e, 0xc6, 0xdf, 0xb7, 0x7a, 0xd5, 0x05, 0xa3,
- 0x39, 0x4b, 0xd3, 0xe0, 0xf3, 0xeb, 0xd7, 0x2a, 0xe5, 0x95, 0xb2, 0xed,
- 0x63, 0xdd, 0xa5, 0x75, 0xfb, 0xfe, 0x4f, 0x9f, 0x22, 0xfc, 0x8b, 0x4e,
- 0xcd, 0xc2, 0x34, 0xd5, 0x0c, 0xed, 0x89, 0xe2, 0x9a, 0x1d, 0xbd, 0x6c,
- 0x58, 0xfd, 0xdb, 0x12, 0x06, 0xcc, 0xeb, 0x75, 0x4c, 0x00, 0xf7, 0x13,
- 0x5b, 0xe4, 0xd8, 0xd8, 0x34, 0x85, 0x64, 0x44, 0x4d, 0x83, 0xca, 0xbd,
- 0x3a, 0xd3, 0x47, 0xa0, 0x8f, 0x12, 0xad, 0x50, 0xe2, 0x23, 0xc4, 0xea,
- 0xc8, 0xb3, 0x46, 0x99, 0xa3, 0x24, 0x14, 0xd8, 0x9a, 0x14, 0x68, 0x1e,
- 0xe5, 0xf6, 0xdb, 0x4e, 0x42, 0x13, 0x0a, 0xf1, 0xba, 0x1f, 0xe1, 0xc1,
- 0xb5, 0x6e, 0xf7, 0x38, 0xf8, 0xa6, 0xe9, 0x43, 0xb4, 0x4b, 0x8e, 0xcd,
- 0xa2, 0x10, 0x39, 0x91, 0x7c, 0x40, 0x2b, 0x7e, 0x9f, 0xe5, 0x1a, 0xa5,
- 0x35, 0x4a, 0xc0, 0xf5, 0xf9, 0x88, 0xb2, 0x9b, 0x50, 0x6c, 0xdc, 0x1c,
- 0x17, 0xd7, 0x0c, 0xd9, 0x61, 0x9b, 0x75, 0x84, 0x68, 0x83, 0x81, 0x1a,
- 0x00, 0x35, 0xb6, 0xa7, 0x12, 0xcd, 0xe3, 0x64, 0x2a, 0x49, 0x1f, 0x89,
- 0xfa, 0x4b, 0x0d, 0xee, 0x6d, 0x77, 0xd8, 0x21, 0x52, 0x57, 0x13, 0x72,
- 0xb1, 0x94, 0xc6, 0x23, 0x78, 0x88, 0xe2, 0x6a, 0x82, 0x68, 0xeb, 0x9d,
- 0xf1, 0x6b, 0xfd, 0xef, 0x78, 0xd5, 0xc7, 0x0b, 0xb2, 0xf1, 0xc5, 0x32,
- 0x51, 0x55, 0x26, 0x58, 0x2f, 0x0e, 0x7d, 0xd8, 0x48, 0xe1, 0xaf, 0xc8,
- 0x6c, 0x4c, 0xc7, 0x24, 0x47, 0x8e, 0x62, 0x43, 0x53, 0xbb, 0x4d, 0xc4,
- 0x62, 0x25, 0x2e, 0xe9, 0x71, 0x52, 0xdd, 0x73, 0x44, 0xe6, 0xf7, 0x93,
- 0x45, 0x5e, 0xb6, 0xc4, 0x89, 0x4b, 0xe0, 0x85, 0xd3, 0x29, 0xf4, 0x69,
- 0x71, 0x85, 0xfa, 0x70, 0xf4, 0xe3, 0xf3, 0x0b, 0x49, 0x79, 0x3e, 0xe5,
- 0x5f, 0xd4, 0x78, 0x5b, 0x1f, 0x07, 0x2c, 0x0e, 0x1a, 0x8b, 0xca, 0x01,
- 0x60, 0x09, 0xcc, 0x5e, 0x2e, 0x09, 0x6a, 0x10, 0x64, 0x52, 0xb9, 0x24,
- 0x9f, 0x78, 0x7a, 0xcf, 0xa9, 0x33, 0x90, 0xe8, 0x1a, 0x6b, 0xeb, 0xb2,
- 0xad, 0x78, 0x24, 0x3c, 0x84, 0x9e, 0xdc, 0x97, 0x18, 0x84, 0x18, 0xac,
- 0xcd, 0x2e, 0x75, 0xc6, 0x5f, 0xb2, 0x7b, 0xc2, 0xa2, 0xba, 0xd6, 0xb8,
- 0x6a, 0x7b, 0x72, 0xc2, 0x85, 0xfb, 0x70, 0xb3, 0xfc, 0x66, 0x94, 0x23,
- 0x37, 0x2f, 0xa6, 0xa1, 0x0c, 0x6a, 0x53, 0x45, 0x1a, 0xc4, 0x43, 0x19,
- 0x64, 0x54, 0x9b, 0x02, 0x0a, 0x69, 0xcf, 0x24, 0x41, 0x6a, 0x00, 0x89,
- 0x3e, 0x3c, 0x61, 0x4b, 0xd5, 0x13, 0xd7, 0x32, 0xf4, 0x77, 0x5c, 0x7f,
- 0x92, 0x0b, 0x2e, 0xf9, 0x54, 0x0d, 0x03, 0x8a, 0x46, 0xac, 0x9b, 0x8b,
- 0x25, 0x59, 0x69, 0xf2, 0x85, 0x68, 0xed, 0x57, 0x6a, 0xbe, 0x8d, 0xa7,
- 0x69, 0xb9, 0x12, 0x49, 0x7f, 0x24, 0xba, 0x03, 0x9b, 0x7f, 0x58, 0xa7,
- 0x6f, 0x11, 0x39, 0x69, 0xe1, 0x27, 0xa9, 0xbc, 0x25, 0xb3, 0xd4, 0x6d,
- 0x6b, 0x1a, 0x49, 0x40, 0x1b, 0x26, 0xb4, 0x2d, 0x55, 0x64, 0x23, 0xce,
- 0x32, 0x4d, 0xc7, 0x29, 0xeb, 0x45, 0x3a, 0x14, 0x59, 0x19, 0xce, 0xfa,
- 0x50, 0x9a, 0x9f, 0x67, 0x6d, 0x54, 0x95, 0x82, 0x31, 0xd2, 0x50, 0x63,
- 0xc9, 0x89, 0xab, 0x92, 0x60, 0xa3, 0xf7, 0x23, 0x7c, 0x09, 0xbd, 0x1f,
- 0x1d, 0xc0, 0xa7, 0x34, 0xbe, 0xd1, 0xac, 0x51, 0xf6, 0xe5, 0x0b, 0x2d,
- 0x8d, 0x92, 0x9b, 0xf8, 0x2e, 0xcd, 0xf2, 0x41, 0x25, 0xaf, 0xa8, 0x61,
- 0x25, 0x2c, 0x88, 0x00, 0x48, 0x4e, 0x52, 0x2b, 0x14, 0xbf, 0x88, 0x18,
- 0x25, 0x97, 0x4f, 0x84, 0x2b, 0x1c, 0xdb, 0x81, 0xc0, 0xb4, 0xfe, 0xf9,
- 0xb6, 0x98, 0x62, 0xe1, 0x29, 0x6b, 0xc6, 0xe4, 0x21, 0xae, 0xca, 0xe5,
- 0xa0, 0xe8, 0xa3, 0x71, 0x71, 0xd7, 0x7e, 0xc2, 0x8a, 0xbb, 0xd6, 0x13,
- 0x26, 0x47, 0xcc, 0xa7, 0x77, 0xb9, 0x53, 0xd6, 0x3c, 0x66, 0xc3, 0x6f,
- 0x9d, 0x6b, 0xa4, 0x25, 0x72, 0x57, 0x0e, 0x97, 0x4d, 0xac, 0xed, 0x74,
- 0x29, 0x65, 0xbb, 0xf3, 0x65, 0x07, 0xec, 0xd1, 0x13, 0xe6, 0xa2, 0x49,
- 0xd1, 0xbf, 0x1e, 0xac, 0xf3, 0x83, 0xe1, 0xb7, 0xc1, 0x91, 0x0a, 0xf8,
- 0x95, 0xcb, 0xd9, 0xa8, 0xdf, 0xfd, 0x9c, 0x2f, 0x95, 0x5b, 0x04, 0x1a,
- 0xb7, 0xd5, 0x4a, 0x6a, 0xc5, 0xdd, 0x3f, 0x4b, 0x6a, 0x8d, 0xe5, 0x7d,
- 0x8c, 0xd4, 0xc2, 0x3d, 0x6a, 0x90, 0x1a, 0x26, 0xda, 0xa0, 0x34, 0x5b,
- 0xd8, 0x5f, 0x4c, 0x6a, 0x4a, 0xa2, 0x55, 0x4a, 0x53, 0xbe, 0x55, 0xa1,
- 0xb0, 0x80, 0x6c, 0x6a, 0xf1, 0x8a, 0xed, 0x16, 0xf9, 0xef, 0x10, 0x17,
- 0xa0, 0xc9, 0x7b, 0x92, 0x4c, 0x1c, 0x04, 0x40, 0x56, 0xad, 0xca, 0x88,
- 0xc7, 0xdc, 0x68, 0x0b, 0xc9, 0xf7, 0xd7, 0x8c, 0x04, 0xcb, 0xba, 0x7c,
- 0x5c, 0xe2, 0xa5, 0xc1, 0xf4, 0x2c, 0x90, 0x13, 0x62, 0x8f, 0x76, 0xb3,
- 0xd1, 0x22, 0x7f, 0xb0, 0x75, 0x4d, 0x62, 0x59, 0x91, 0xb4, 0x20, 0x11,
- 0x2e, 0xf4, 0x3a, 0x35, 0x35, 0xd0, 0xd0, 0xea, 0x20, 0x9b, 0xd5, 0xc6,
- 0x8b, 0xf8, 0xce, 0x26, 0x9b, 0x9a, 0x8b, 0x40, 0x0d, 0xc3, 0x17, 0x84,
- 0x2e, 0xf6, 0xc0, 0x23, 0x52, 0xc5, 0xe1, 0x8a, 0xcc, 0xbd, 0x1b, 0x81,
- 0x71, 0x10, 0xd4, 0x48, 0xd8, 0x16, 0x04, 0x12, 0xc4, 0xb8, 0xca, 0x9c,
- 0x7f, 0x07, 0xb9, 0x6d, 0x4d, 0xe0, 0x29, 0xaf, 0x87, 0x64, 0x93, 0x09,
- 0x3f, 0x6d, 0xc6, 0x1f, 0x28, 0x7f, 0xb5, 0x95, 0x51, 0x97, 0x7f, 0x63,
- 0x91, 0x2b, 0x49, 0x56, 0x1a, 0xaf, 0x99, 0x84, 0xde, 0x4e, 0x17, 0xa8,
- 0x24, 0xd6, 0x15, 0x31, 0xaf, 0x78, 0x67, 0x46, 0xc3, 0xd1, 0xc1, 0x13,
- 0xec, 0xe8, 0xc2, 0x75, 0x34, 0x90, 0x71, 0x29, 0x56, 0x19, 0x8e, 0x8d,
- 0x85, 0x89, 0x30, 0x4f, 0x7e, 0x43, 0xef, 0x62, 0x42, 0x0b, 0x86, 0xfc,
- 0x43, 0x26, 0x4c, 0x12, 0x2a, 0xd7, 0x99, 0xd2, 0xbc, 0x77, 0xa3, 0x73,
- 0xa1, 0x8f, 0x9f, 0xc7, 0xd7, 0x09, 0x67, 0x29, 0x8a, 0x9b, 0x48, 0x85,
- 0xad, 0x0f, 0xa4, 0x43, 0x35, 0x12, 0x8a, 0x58, 0x38, 0xf3, 0xce, 0xc0,
- 0x20, 0x7f, 0x08, 0x49, 0x60, 0x3e, 0x7b, 0x48, 0x17, 0xbf, 0x19, 0x72,
- 0x3c, 0x51, 0x8b, 0x73, 0x35, 0xb2, 0xdb, 0x30, 0x1c, 0xd4, 0x6a, 0xd4,
- 0xf9, 0x33, 0xfb, 0x8c, 0x3b, 0x36, 0x40, 0x37, 0xe5, 0xa6, 0x15, 0x94,
- 0x1f, 0xf1, 0xca, 0x66, 0xd5, 0xd3, 0x6c, 0x81, 0x24, 0x2e, 0x0a, 0x00,
- 0x20, 0x02, 0x4c, 0x12, 0xc4, 0x26, 0x49, 0x7e, 0xab, 0x93, 0x15, 0xc9,
- 0x73, 0x12, 0x23, 0x7a, 0xaa, 0xc3, 0xda, 0xd7, 0x33, 0x22, 0xfa, 0xb3,
- 0x0d, 0x4a, 0x93, 0xb0, 0x42, 0x56, 0x19, 0x4f, 0x19, 0xbd, 0xa3, 0xee,
- 0x44, 0x60, 0xf5, 0x48, 0xcd, 0xc3, 0x13, 0xc4, 0x80, 0xf0, 0x80, 0x62,
- 0x56, 0xd3, 0x52, 0x00, 0x3a, 0xb8, 0x69, 0xfd, 0x96, 0xde, 0xe8, 0x64,
- 0x7e, 0xcd, 0x49, 0x8a, 0x2f, 0x5b, 0x63, 0xa0, 0x92, 0xa9, 0xa5, 0xed,
- 0x5a, 0x90, 0xe4, 0x38, 0x5f, 0x2d, 0x98, 0xf1, 0xcb, 0x5b, 0xca, 0x8f,
- 0x00, 0x4c, 0x20, 0xf1, 0x90, 0x61, 0x6e, 0xf7, 0xa0, 0x2d, 0x08, 0xc0,
- 0xf5, 0xa8, 0xc1, 0xa2, 0x7c, 0x83, 0x2d, 0x68, 0xc1, 0x84, 0x3b, 0xc9,
- 0x67, 0x44, 0x26, 0xa3, 0x65, 0x3a, 0x9d, 0x48, 0x4c, 0x98, 0x8b, 0xbe,
- 0x6b, 0x38, 0x61, 0xb8, 0x9d, 0x22, 0xd4, 0xff, 0xf9, 0x22, 0xe3, 0x98,
- 0xa7, 0x4d, 0x1e, 0xd0, 0x9c, 0xa6, 0xbd, 0xa5, 0xf9, 0xe3, 0xcc, 0x18,
- 0xf5, 0x79, 0x15, 0xec, 0x1a, 0x26, 0xf3, 0xf8, 0x2e, 0x4e, 0xa7, 0xb8,
- 0xc3, 0xa8, 0xa1, 0x7c, 0x39, 0x47, 0xe7, 0xd5, 0x95, 0xba, 0x4b, 0xf3,
- 0x6c, 0x3e, 0x6b, 0xda, 0x37, 0x36, 0x2f, 0x4e, 0x86, 0x87, 0x51, 0x74,
- 0x36, 0x8c, 0xce, 0xde, 0x9e, 0xfe, 0xc0, 0xae, 0x43, 0xd6, 0x31, 0x05,
- 0x40, 0x83, 0xfb, 0x0f, 0xde, 0x8c, 0xee, 0xe2, 0x3c, 0x85, 0xbe, 0xd6,
- 0xf3, 0x1e, 0xb5, 0x16, 0x55, 0x5c, 0xce, 0x66, 0xff, 0xde, 0xb6, 0xd8,
- 0x87, 0x3d, 0xf2, 0xad, 0x85, 0xf8, 0xbf, 0x24, 0x2e, 0x52, 0x5a, 0x70,
- 0x98, 0xb9, 0xc7, 0x96, 0x9c, 0xb7, 0x6c, 0xe6, 0x8a, 0xb1, 0x35, 0x2c,
- 0x3c, 0xd5, 0x12, 0xa0, 0xc6, 0x17, 0x25, 0xf5, 0x4e, 0x13, 0xad, 0x45,
- 0x6c, 0xd0, 0x44, 0xaf, 0x45, 0xaf, 0x5d, 0xe3, 0x6b, 0x46, 0x04, 0xb2,
- 0x8b, 0x8f, 0x93, 0xb5, 0x5d, 0xc4, 0x2c, 0xbc, 0x3b, 0x6f, 0x08, 0x44,
- 0xa2, 0x79, 0x99, 0x67, 0x8b, 0x55, 0xf4, 0x55, 0xcc, 0x3c, 0x8f, 0xfb,
- 0x3a, 0x8a, 0x93, 0x59, 0x23, 0xaa, 0xa0, 0xc8, 0xc6, 0xb7, 0x49, 0x29,
- 0x27, 0x48, 0x7e, 0x77, 0xe4, 0x0c, 0x5d, 0x4f, 0x78, 0x66, 0xc4, 0x8b,
- 0x39, 0x61, 0xd3, 0x82, 0x51, 0x0f, 0x68, 0x8e, 0x86, 0xd2, 0x34, 0x3b,
- 0x1a, 0xae, 0x43, 0xa0, 0x0d, 0x2a, 0x93, 0x40, 0x13, 0x32, 0xb5, 0x7a,
- 0xa0, 0x61, 0xff, 0x98, 0x6f, 0x1a, 0xf6, 0xd0, 0xbf, 0x0c, 0xbc, 0xda,
- 0x3f, 0xee, 0x9b, 0x6a, 0xf9, 0x53, 0xfb, 0x32, 0x34, 0x63, 0xdf, 0xab,
- 0x57, 0x7b, 0xd0, 0x96, 0x86, 0xcd, 0x31, 0x7b, 0xb9, 0x6e, 0xb9, 0xb2,
- 0x24, 0x11, 0x50, 0x43, 0xeb, 0x68, 0x31, 0xe1, 0xd1, 0x8f, 0x24, 0x8d,
- 0x40, 0x02, 0x92, 0x2b, 0x8d, 0x59, 0x3a, 0x19, 0x6e, 0xde, 0xf3, 0xe3,
- 0x37, 0x6b, 0x42, 0xe6, 0x4c, 0x65, 0x4d, 0x4c, 0x8d, 0x22, 0xee, 0xe0,
- 0x14, 0x7a, 0xc9, 0x4d, 0x75, 0x83, 0x0d, 0x33, 0x7a, 0x6b, 0xcd, 0xfd,
- 0x6d, 0xc9, 0xc0, 0x41, 0x13, 0x2c, 0xba, 0xba, 0x1f, 0x5d, 0xfa, 0x7b,
- 0x70, 0xfc, 0x6a, 0xae, 0x02, 0x01, 0x20, 0x29, 0x9a, 0xee, 0x90, 0x4e,
- 0x30, 0x93, 0x8e, 0xc5, 0x5e, 0x05, 0xd1, 0x69, 0xc4, 0x0f, 0x38, 0x09,
- 0x29, 0xba, 0x4d, 0x56, 0x96, 0x59, 0xe7, 0x3e, 0x1b, 0x07, 0x10, 0x5c,
- 0x6e, 0xed, 0x74, 0x51, 0x38, 0x09, 0x9c, 0x7e, 0xce, 0x59, 0x87, 0xff,
- 0x1d, 0x76, 0x5f, 0xf7, 0x54, 0x14, 0xba, 0x7e, 0x9f, 0x1b, 0x04, 0xc7,
- 0x29, 0x02, 0xea, 0x9d, 0x35, 0xd2, 0x68, 0x1c, 0x60, 0xd4, 0x74, 0xd5,
- 0x6a, 0x02, 0xf0, 0xb0, 0x69, 0xcc, 0xa6, 0x34, 0xa1, 0xbe, 0x28, 0x2d,
- 0x08, 0x1c, 0xf1, 0xf1, 0xd3, 0x74, 0x94, 0xb3, 0x43, 0x0b, 0x92, 0x52,
- 0xc0, 0xac, 0x1b, 0xa2, 0x8a, 0x27, 0x20, 0x36, 0x82, 0xa4, 0xe3, 0x5b,
- 0x9c, 0x22, 0xd5, 0x2b, 0xc2, 0x2d, 0x37, 0xe1, 0x4f, 0x20, 0xa3, 0xb4,
- 0xaf, 0xba, 0x9e, 0x11, 0x97, 0x31, 0xe3, 0xcc, 0x20, 0x9b, 0x22, 0xe5,
- 0xc8, 0x1c, 0x48, 0x5e, 0xca, 0xff, 0x3c, 0x17, 0x72, 0x6c, 0x88, 0xc7,
- 0xfa, 0xfe, 0xe8, 0xe4, 0x02, 0x2c, 0x73, 0xb4, 0x5a, 0x93, 0x92, 0xb1,
- 0x9d, 0x94, 0xe3, 0xed, 0xc5, 0x6d, 0xba, 0x3d, 0x2f, 0x8a, 0xc9, 0x68,
- 0xcb, 0x65, 0x2d, 0x22, 0xc6, 0x9e, 0x43, 0x4b, 0xa2, 0xf3, 0x6f, 0x0e,
- 0x87, 0x9f, 0xec, 0xee, 0x72, 0x0a, 0xfd, 0x64, 0xc9, 0x0a, 0xd2, 0x26,
- 0x2d, 0x40, 0x23, 0x03, 0xae, 0xa0, 0x75, 0x9f, 0x0d, 0x8a, 0x6c, 0x0b,
- 0x0a, 0x80, 0x63, 0xb8, 0x58, 0x23, 0x44, 0xa8, 0xc0, 0x3f, 0xa9, 0xf9,
- 0x61, 0x6c, 0x56, 0xfc, 0x2d, 0xe3, 0x44, 0x84, 0x36, 0x10, 0xc5, 0x10,
- 0xbd, 0xe4, 0x7f, 0xd7, 0x70, 0xba, 0xe0, 0x8c, 0x03, 0x6a, 0xa6, 0xb2,
- 0x27, 0xfc, 0xb2, 0x4a, 0xf9, 0x1c, 0x74, 0x53, 0x39, 0xf1, 0x4d, 0x9d,
- 0x87, 0x9d, 0xba, 0x34, 0xcf, 0x5e, 0x74, 0x74, 0x7c, 0x01, 0x9a, 0x3c,
- 0x7e, 0xfb, 0x15, 0x84, 0x43, 0xce, 0xa1, 0xbb, 0x9e, 0xa7, 0x3f, 0x33,
- 0xb7, 0xa3, 0x26, 0x8b, 0x81, 0x66, 0x1f, 0x86, 0xc7, 0xb3, 0xd6, 0x1c,
- 0xaf, 0x17, 0xaf, 0x22, 0x0e, 0xd9, 0x6f, 0xbb, 0x4c, 0xb1, 0x30, 0xc6,
- 0xc3, 0x83, 0x70, 0x76, 0xbf, 0x12, 0x43, 0xa4, 0xa7, 0x68, 0x44, 0x74,
- 0x16, 0x5b, 0x0c, 0x21, 0x1c, 0x64, 0x14, 0x64, 0xf3, 0x31, 0x5d, 0xa8,
- 0xe3, 0x26, 0xf2, 0x98, 0x3a, 0x11, 0x0d, 0xab, 0x12, 0x89, 0x24, 0x36,
- 0xdf, 0x86, 0xcf, 0xd7, 0x3d, 0xb0, 0x59, 0x6c, 0x45, 0x8e, 0x7f, 0xa6,
- 0xf3, 0x20, 0x34, 0x8a, 0x79, 0x99, 0xaa, 0xdf, 0x86, 0x61, 0x27, 0x07,
- 0xbc, 0xa1, 0x41, 0xf2, 0xc4, 0x62, 0x77, 0x3c, 0x2c, 0xc7, 0x0f, 0x2b,
- 0xde, 0x13, 0xd7, 0x53, 0x65, 0xe9, 0x69, 0x4f, 0x55, 0xe6, 0xd4, 0x8b,
- 0xad, 0x91, 0x0e, 0x56, 0xc2, 0x96, 0xca, 0xb6, 0xee, 0xa0, 0xcd, 0xc6,
- 0xa6, 0x0a, 0xe3, 0x71, 0xc4, 0xa2, 0x11, 0xa7, 0x2d, 0xd2, 0x85, 0x79,
- 0xe9, 0x0f, 0x49, 0xa4, 0x7d, 0x7f, 0x78, 0xf0, 0xfe, 0xcb, 0x77, 0x6f,
- 0x8f, 0x4e, 0x8f, 0xbb, 0x75, 0x8a, 0xbc, 0xd2, 0x40, 0x51, 0x12, 0x3c,
- 0xc5, 0xe8, 0x55, 0x8b, 0x9d, 0xc4, 0xb5, 0x8e, 0x44, 0x5f, 0xb9, 0xe0,
- 0x35, 0xd0, 0xda, 0x56, 0xbc, 0xae, 0xfe, 0x2c, 0xe7, 0x13, 0x64, 0x16,
- 0x06, 0x93, 0xb7, 0x5c, 0x12, 0x75, 0x9d, 0xd9, 0xf8, 0x5a, 0xd4, 0x5d,
- 0x84, 0x89, 0xd3, 0x05, 0xcd, 0x32, 0xb6, 0x81, 0x7c, 0x48, 0x7e, 0x92,
- 0x87, 0x71, 0xaa, 0x88, 0xef, 0x1c, 0x14, 0x82, 0x55, 0x8f, 0x69, 0x40,
- 0x2d, 0xdb, 0x5d, 0x54, 0xe2, 0x15, 0xb8, 0x15, 0xa2, 0xe4, 0xbe, 0x0e,
- 0x72, 0x9c, 0x97, 0xdd, 0x5e, 0x94, 0xa4, 0x70, 0xc5, 0xa5, 0x41, 0x44,
- 0xcd, 0xa4, 0x35, 0xbd, 0x86, 0x03, 0x26, 0x63, 0xa1, 0xeb, 0x41, 0xf2,
- 0x90, 0x20, 0xb6, 0x43, 0xdf, 0x3a, 0x84, 0x71, 0xb7, 0x8c, 0xbe, 0xcb,
- 0x72, 0xa4, 0xed, 0x1f, 0x59, 0x84, 0xa5, 0x3d, 0x14, 0xcf, 0x57, 0x4d,
- 0xcf, 0x2d, 0xab, 0x44, 0xac, 0x15, 0x5c, 0x0b, 0x8a, 0xe2, 0xf9, 0xc1,
- 0xe5, 0xd7, 0x6d, 0x47, 0xb8, 0x4a, 0x86, 0x8f, 0xdd, 0x33, 0xaa, 0x92,
- 0x97, 0xeb, 0xe3, 0x37, 0xe5, 0xaa, 0x59, 0x7f, 0xd7, 0x54, 0x8f, 0x77,
- 0xf3, 0xba, 0x69, 0xc9, 0xaf, 0x72, 0xd7, 0x8d, 0xdd, 0x36, 0xa3, 0xd5,
- 0x7a, 0x92, 0x0c, 0x6f, 0x9a, 0xf5, 0x57, 0x4d, 0xf3, 0xae, 0xf1, 0x32,
- 0x0c, 0x77, 0xc9, 0xa7, 0xd5, 0x2e, 0x1b, 0xbd, 0x6b, 0xfe, 0x8f, 0xb8,
- 0x6a, 0x62, 0x9c, 0xa0, 0x1a, 0x0f, 0xf5, 0xe1, 0xb8, 0xff, 0x3a, 0x37,
- 0x0d, 0x42, 0x7b, 0x9b, 0x0c, 0x46, 0x58, 0x6c, 0x8d, 0xa9, 0x56, 0xc2,
- 0x37, 0x5b, 0x19, 0x62, 0xcf, 0xc4, 0xaf, 0xfa, 0x66, 0xb9, 0xae, 0xf0,
- 0xda, 0x4d, 0x0c, 0xdb, 0x1b, 0x33, 0x8c, 0x3c, 0x1b, 0x4b, 0x06, 0x96,
- 0x1a, 0x7b, 0x24, 0x47, 0xe9, 0x7d, 0x9e, 0xdc, 0xc4, 0x05, 0x31, 0x90,
- 0x65, 0x99, 0xb2, 0x25, 0xbc, 0xae, 0x03, 0x2c, 0x39, 0x6c, 0xd0, 0xa9,
- 0xfe, 0x91, 0x25, 0xfb, 0x45, 0x9a, 0xb6, 0xee, 0xd7, 0x4f, 0x4c, 0x0d,
- 0xac, 0xfd, 0xd8, 0xa2, 0xb0, 0x72, 0x5f, 0x57, 0x5b, 0x87, 0xa7, 0xfd,
- 0x10, 0xdf, 0x6d, 0xc6, 0x19, 0x9a, 0x30, 0xc7, 0x27, 0x57, 0x34, 0xdd,
- 0x34, 0xc8, 0xfd, 0x33, 0xd0, 0x08, 0xbd, 0xe2, 0xd2, 0xab, 0x36, 0xe3,
- 0x94, 0x7d, 0x0b, 0x76, 0xa2, 0x17, 0x50, 0x21, 0x00, 0x70, 0xd5, 0xed,
- 0x2c, 0x7e, 0x43, 0x0a, 0xba, 0x62, 0x63, 0x24, 0x51, 0xf1, 0x1a, 0x7b,
- 0xce, 0x6b, 0xc0, 0xcf, 0x14, 0xec, 0xbf, 0xe5, 0xc9, 0x6d, 0x32, 0x00,
- 0x92, 0x00, 0x6c, 0xc5, 0x50, 0x89, 0xb7, 0x58, 0x6e, 0x57, 0xa3, 0x16,
- 0x72, 0x4a, 0x14, 0x0d, 0xa6, 0x29, 0xa3, 0x28, 0x1c, 0x13, 0x22, 0xb9,
- 0xe0, 0x9b, 0x84, 0xbb, 0x42, 0xcd, 0xbb, 0x80, 0x49, 0x25, 0xce, 0x4a,
- 0x67, 0x34, 0xf8, 0x72, 0x92, 0xc4, 0xd3, 0xa8, 0x2d, 0x80, 0xe6, 0x4a,
- 0xe0, 0x55, 0xcd, 0x5e, 0x0d, 0xb1, 0x66, 0x6e, 0x46, 0xee, 0x48, 0x43,
- 0x20, 0x34, 0xde, 0x35, 0xc4, 0x96, 0xb8, 0x42, 0xde, 0x68, 0x83, 0x8a,
- 0x27, 0xc9, 0x34, 0x15, 0xa3, 0x9f, 0xe5, 0xf7, 0x41, 0x67, 0xd1, 0x2c,
- 0xc0, 0x02, 0x90, 0x27, 0x12, 0x13, 0xeb, 0x1e, 0x60, 0x30, 0x0f, 0x8d,
- 0x5a, 0x2c, 0xea, 0xcd, 0x6d, 0x2a, 0x3c, 0x09, 0xf0, 0x18, 0x35, 0x43,
- 0xcd, 0xe2, 0x90, 0x78, 0x58, 0x2b, 0x07, 0x95, 0xbb, 0xa5, 0x97, 0x1a,
- 0x8c, 0x58, 0xd8, 0xa0, 0x45, 0xde, 0xd0, 0xb3, 0xd9, 0x65, 0x2a, 0x64,
- 0x29, 0xa0, 0xc9, 0x58, 0xfe, 0x52, 0x54, 0xfc, 0xb8, 0x0c, 0xd3, 0x15,
- 0x25, 0xa9, 0x67, 0x6f, 0xaf, 0xdd, 0xe8, 0xab, 0x99, 0xc5, 0x1a, 0x7b,
- 0xc1, 0x4b, 0xd1, 0x2f, 0xe2, 0x2b, 0x87, 0x31, 0x42, 0x64, 0xcc, 0x12,
- 0x63, 0x36, 0xa6, 0xd5, 0x93, 0xc0, 0x25, 0x7c, 0xc6, 0xe6, 0x8e, 0x86,
- 0xab, 0x6b, 0x39, 0xe6, 0xd3, 0xc8, 0x06, 0x00, 0x6f, 0xc9, 0x8c, 0xd8,
- 0xc9, 0xec, 0xfc, 0xf8, 0xc5, 0x34, 0x65, 0xc8, 0xb8, 0x3c, 0x5b, 0x5e,
- 0xdf, 0xd0, 0x7d, 0x08, 0xd6, 0x82, 0xdb, 0xb5, 0xc5, 0x89, 0x51, 0x4b,
- 0x81, 0x86, 0x3c, 0x7b, 0x97, 0x4d, 0xd9, 0xac, 0xb9, 0xe9, 0x9a, 0x97,
- 0xd6, 0x9f, 0xee, 0xec, 0x62, 0xbc, 0x4f, 0x77, 0x3e, 0xad, 0x44, 0xb1,
- 0xb3, 0x39, 0x3d, 0x1e, 0x23, 0xc5, 0x25, 0xfa, 0x91, 0x6f, 0x8f, 0x9f,
- 0x5a, 0xfd, 0x2e, 0xb0, 0xcb, 0xc6, 0xf3, 0xd0, 0x12, 0x1b, 0x17, 0xb7,
- 0xe2, 0x2a, 0xe8, 0xd8, 0xfb, 0xfc, 0x7a, 0x47, 0xad, 0x19, 0xce, 0x1f,
- 0xdc, 0x86, 0xe2, 0xe3, 0x14, 0x5e, 0xce, 0x5a, 0x34, 0x36, 0x05, 0x69,
- 0xbd, 0x17, 0x40, 0xff, 0x41, 0x0c, 0x02, 0x24, 0xeb, 0xd5, 0x5a, 0xcb,
- 0xcc, 0xc1, 0xe1, 0xa1, 0xf7, 0xc6, 0x55, 0xe3, 0xbd, 0x9e, 0x70, 0xbc,
- 0xd7, 0xc7, 0x9d, 0x7e, 0x40, 0xc6, 0xf4, 0x34, 0xb6, 0x1a, 0x06, 0xf3,
- 0x4a, 0xda, 0xad, 0x5a, 0x54, 0x5a, 0x08, 0x0c, 0x46, 0xca, 0x65, 0x91,
- 0xd4, 0x57, 0x74, 0x7d, 0x46, 0x49, 0x00, 0x28, 0xa6, 0xd9, 0x25, 0x7c,
- 0x44, 0x82, 0xa4, 0x06, 0xb6, 0x79, 0x6e, 0xfb, 0x5c, 0x34, 0xc8, 0x7f,
- 0x2a, 0xed, 0xb5, 0x44, 0x0c, 0x59, 0xfc, 0x94, 0x38, 0xb4, 0xe1, 0xf6,
- 0x79, 0x40, 0x4a, 0xf4, 0x3c, 0x88, 0x14, 0xd7, 0x99, 0x95, 0xb4, 0x46,
- 0x71, 0x3e, 0x71, 0x3e, 0x99, 0xa8, 0x09, 0xc3, 0x61, 0xd2, 0x0d, 0xe7,
- 0xdf, 0x30, 0x54, 0x4d, 0x88, 0x52, 0xd2, 0xcc, 0x71, 0xb1, 0x80, 0x6d,
- 0xef, 0x5e, 0x6e, 0xcd, 0xc2, 0x88, 0x66, 0xa9, 0x84, 0x77, 0x06, 0x19,
- 0x1d, 0xf5, 0x05, 0xd3, 0x23, 0xf6, 0xa3, 0xfc, 0x6c, 0xa7, 0x41, 0xce,
- 0x17, 0xcb, 0x33, 0xd5, 0xf9, 0xf4, 0x05, 0xc9, 0x40, 0x96, 0xf0, 0x3c,
- 0x0f, 0xe2, 0x32, 0xbe, 0x31, 0xcb, 0x8d, 0xf8, 0x88, 0x9b, 0xc9, 0x53,
- 0x9b, 0xc3, 0x2d, 0xf3, 0x14, 0xcb, 0xd5, 0xab, 0xed, 0xc5, 0xf9, 0xb5,
- 0x70, 0x29, 0x0f, 0x39, 0xd2, 0x88, 0xb2, 0xeb, 0x37, 0xcc, 0x13, 0xd7,
- 0xa2, 0x2f, 0x70, 0x00, 0xc5, 0x5d, 0x4b, 0xe4, 0x1d, 0x34, 0xa3, 0xf1,
- 0xfd, 0xa4, 0x3d, 0x10, 0x45, 0x90, 0x2f, 0x33, 0x6c, 0xb3, 0x26, 0x4c,
- 0x1e, 0x7e, 0x77, 0x14, 0xa4, 0x23, 0xf2, 0x19, 0xc3, 0x9c, 0x54, 0xe6,
- 0x17, 0xd0, 0xea, 0x75, 0xb1, 0x72, 0x41, 0xa4, 0x0f, 0xc0, 0x60, 0x5f,
- 0x03, 0xa1, 0x3b, 0x59, 0xb8, 0xf4, 0x22, 0x60, 0xbf, 0x08, 0x5b, 0x63,
- 0x50, 0x57, 0xc0, 0xb7, 0xce, 0x9a, 0x22, 0xb1, 0x4f, 0x93, 0x45, 0x80,
- 0x82, 0x8f, 0x58, 0xe1, 0xfc, 0xaf, 0x8b, 0xd7, 0x87, 0xbb, 0x9f, 0x3e,
- 0xf9, 0x8c, 0x04, 0x74, 0x76, 0x88, 0xa6, 0xb5, 0x60, 0x5b, 0x09, 0x5c,
- 0x5d, 0x1f, 0xb1, 0xa4, 0x46, 0x25, 0x13, 0x30, 0xd5, 0x4f, 0x4f, 0x9c,
- 0x2f, 0xbb, 0x4f, 0x20, 0xf3, 0xa8, 0xcf, 0xb0, 0x11, 0x11, 0x95, 0xd1,
- 0x22, 0x9a, 0xce, 0x85, 0x15, 0xe3, 0x58, 0x0d, 0xac, 0x96, 0xdc, 0xa9,
- 0x83, 0x2a, 0x6a, 0x2e, 0x67, 0xc4, 0xf5, 0xa2, 0x8b, 0xe3, 0xcb, 0x8b,
- 0x5e, 0x34, 0xbc, 0x3c, 0xbb, 0x58, 0x13, 0x66, 0x46, 0x37, 0x27, 0x73,
- 0x25, 0x5e, 0x33, 0x26, 0x1b, 0x86, 0x15, 0x90, 0xe3, 0x56, 0xc9, 0xb6,
- 0x80, 0x5e, 0x23, 0x61, 0x86, 0x60, 0xaa, 0xb3, 0xfe, 0xba, 0xe0, 0xc2,
- 0xca, 0x6a, 0x81, 0x6c, 0x48, 0x92, 0x78, 0x74, 0x62, 0xb2, 0xed, 0x1f,
- 0x41, 0x21, 0x4c, 0x8b, 0x3c, 0x5d, 0xe7, 0xd0, 0xc1, 0x68, 0x15, 0x4c,
- 0xd0, 0xcb, 0x80, 0x6b, 0xc0, 0xaf, 0x5c, 0xf8, 0x06, 0x42, 0xfb, 0x1d,
- 0xc6, 0x35, 0x0e, 0x4a, 0xc7, 0xfc, 0xdc, 0x1d, 0x58, 0x8a, 0x6e, 0x93,
- 0x20, 0x6e, 0xeb, 0x03, 0xf4, 0x4b, 0x32, 0xc3, 0x96, 0x4b, 0x54, 0xe3,
- 0xff, 0x18, 0x3c, 0x50, 0x70, 0x9b, 0x21, 0xe3, 0x19, 0xe3, 0x29, 0x22,
- 0x17, 0x63, 0xdb, 0x16, 0x68, 0xe1, 0xf2, 0x07, 0x78, 0x97, 0xbb, 0xce,
- 0x5d, 0x9e, 0x29, 0x75, 0xc8, 0xbe, 0x90, 0xd4, 0x33, 0x2d, 0x91, 0x99,
- 0xd1, 0xb5, 0x51, 0x75, 0x1d, 0xa9, 0x55, 0xd8, 0xff, 0xb3, 0xc1, 0xee,
- 0x56, 0x8d, 0xc9, 0x70, 0xb4, 0x41, 0x2b, 0x67, 0x61, 0x3f, 0x48, 0x25,
- 0xc6, 0xc1, 0x10, 0xb7, 0x71, 0x0f, 0xd1, 0x85, 0x60, 0xa0, 0x1d, 0x00,
- 0xe1, 0xe2, 0xa7, 0xd6, 0x20, 0xa6, 0xa0, 0x20, 0x01, 0x9b, 0x74, 0x3d,
- 0x71, 0xeb, 0x9e, 0x8b, 0xff, 0x7f, 0x59, 0x67, 0xa7, 0x35, 0xff, 0x7d,
- 0x3d, 0xd0, 0xc6, 0xc3, 0xa5, 0x38, 0x97, 0x18, 0x3b, 0xc1, 0x5d, 0x94,
- 0x85, 0x25, 0xc5, 0x54, 0x66, 0xbe, 0xfb, 0xf1, 0x17, 0xdf, 0xa3, 0x61,
- 0x52, 0x1f, 0x8a, 0x93, 0xc2, 0xe1, 0x0b, 0x22, 0xa5, 0x48, 0x39, 0x98,
- 0x4b, 0x58, 0x05, 0xc2, 0xf9, 0x0c, 0x48, 0xc7, 0x16, 0x96, 0xf8, 0x32,
- 0x8b, 0x31, 0xb0, 0x71, 0x37, 0x6e, 0x31, 0xc8, 0xb2, 0x86, 0x0d, 0x0f,
- 0x15, 0x06, 0x7a, 0xa1, 0xdd, 0x30, 0xda, 0x98, 0x01, 0x2c, 0x08, 0x3e,
- 0xb5, 0x8f, 0x07, 0x68, 0x40, 0x9c, 0xe5, 0xaa, 0x9a, 0x37, 0x4e, 0xda,
- 0x79, 0xb8, 0xcb, 0xc2, 0x00, 0x21, 0x0b, 0x7a, 0xbe, 0x51, 0x8a, 0x89,
- 0xb8, 0x1a, 0x40, 0x22, 0x61, 0xf2, 0x4d, 0x20, 0x3c, 0x51, 0x5e, 0x11,
- 0xde, 0xa1, 0xe8, 0x37, 0xd5, 0xb8, 0x09, 0x5b, 0xe8, 0x86, 0xc4, 0xe5,
- 0xaf, 0x8b, 0x7e, 0x99, 0x21, 0xba, 0x2e, 0x7a, 0xa9, 0x9d, 0x7d, 0xde,
- 0x4a, 0xa2, 0x9c, 0x92, 0x14, 0x48, 0x7b, 0x86, 0x29, 0x09, 0xf4, 0xcc,
- 0xa1, 0xda, 0x2e, 0x69, 0x20, 0x43, 0xcf, 0xb1, 0x45, 0xd8, 0x6f, 0x80,
- 0x48, 0x01, 0x56, 0x53, 0xad, 0x12, 0x4e, 0x70, 0x32, 0x59, 0xc4, 0x94,
- 0x34, 0x43, 0x0a, 0xbf, 0x5c, 0xce, 0x68, 0x2a, 0xf7, 0x49, 0x32, 0xe9,
- 0x16, 0xd1, 0x10, 0x68, 0x8b, 0x75, 0x01, 0x99, 0xa3, 0x66, 0xb0, 0xe0,
- 0xca, 0x27, 0x11, 0x84, 0xc8, 0x2e, 0x12, 0x53, 0x38, 0xe3, 0xc8, 0x10,
- 0xf7, 0x42, 0xcd, 0xcc, 0x52, 0x94, 0xea, 0x8e, 0x88, 0xe1, 0x09, 0x23,
- 0x70, 0x1d, 0xbc, 0xbb, 0xfc, 0xba, 0x13, 0x05, 0xa8, 0xaa, 0x01, 0x23,
- 0xc6, 0x15, 0x5f, 0x92, 0x10, 0x71, 0xe7, 0x62, 0xeb, 0x72, 0x58, 0x4d,
- 0x5a, 0x60, 0x14, 0x6a, 0x16, 0xfb, 0x41, 0x9d, 0x45, 0x3c, 0xab, 0xb3,
- 0x08, 0xce, 0xfa, 0x06, 0x9f, 0xe8, 0xa7, 0x8b, 0x0f, 0x87, 0xf8, 0xb1,
- 0x3a, 0x60, 0x36, 0x80, 0x93, 0x73, 0x06, 0xb3, 0x05, 0xba, 0x70, 0x88,
- 0x59, 0xb2, 0xbc, 0xe6, 0xf0, 0xcf, 0x16, 0x00, 0x35, 0x86, 0xf8, 0xf0,
- 0x3a, 0x80, 0x06, 0xf6, 0xd3, 0x2a, 0x33, 0x35, 0x55, 0x02, 0x97, 0xa4,
- 0x37, 0xdd, 0x19, 0x9f, 0x0c, 0xb8, 0xd6, 0xcd, 0x36, 0x20, 0x8d, 0x4e,
- 0x4e, 0x4d, 0x88, 0x81, 0xd2, 0xf7, 0xe0, 0x61, 0x92, 0xa7, 0x46, 0xe3,
- 0x75, 0x03, 0x6e, 0x62, 0x35, 0x59, 0x22, 0x13, 0xc4, 0x4f, 0xe3, 0x86,
- 0x63, 0x15, 0xc0, 0xc2, 0xbe, 0x2a, 0x0b, 0xfa, 0x74, 0xb0, 0xb7, 0xd5,
- 0xaa, 0x41, 0x19, 0xdf, 0x61, 0x79, 0x9f, 0x13, 0x81, 0x88, 0x67, 0x8c,
- 0xa1, 0xdc, 0x4b, 0xb4, 0xa1, 0x44, 0xab, 0xe5, 0x72, 0xe6, 0x3c, 0xa6,
- 0x1f, 0x66, 0xd1, 0xc4, 0x47, 0xe2, 0x15, 0xaa, 0x1f, 0x28, 0x62, 0x8f,
- 0x1f, 0x11, 0x92, 0x09, 0xda, 0x8f, 0xa3, 0x73, 0x12, 0x09, 0xdc, 0x12,
- 0x07, 0x31, 0x5a, 0xf4, 0x0e, 0xd4, 0x13, 0x1e, 0xc6, 0x56, 0x5d, 0x80,
- 0xe1, 0xe4, 0x5c, 0xd8, 0xb9, 0x5f, 0x23, 0x5c, 0xc7, 0x82, 0x0c, 0x89,
- 0x15, 0xa6, 0x00, 0x7f, 0xcf, 0x69, 0x18, 0x88, 0x4d, 0x16, 0x54, 0x4a,
- 0x1c, 0x30, 0xd6, 0x00, 0xed, 0xf6, 0xdb, 0x68, 0x95, 0xab, 0xa4, 0x80,
- 0x8a, 0xbb, 0xb8, 0xd9, 0xdb, 0x4e, 0x87, 0x02, 0x85, 0x47, 0x80, 0x19,
- 0x12, 0x03, 0x41, 0x5c, 0xb4, 0xa6, 0x49, 0x76, 0x3f, 0x07, 0x20, 0x40,
- 0x8b, 0xf0, 0x87, 0xe1, 0x33, 0x53, 0x1b, 0x54, 0xaf, 0xc1, 0xbd, 0x9d,
- 0xc1, 0x43, 0x48, 0xe3, 0x45, 0x31, 0x95, 0x95, 0x71, 0x65, 0x7b, 0xa4,
- 0xc2, 0x0f, 0x2a, 0xf3, 0xd0, 0x6a, 0xe5, 0x2e, 0xa4, 0x69, 0x38, 0x3c,
- 0xdd, 0xbe, 0x3c, 0x1d, 0x86, 0x9b, 0x6f, 0x9b, 0xde, 0x4c, 0x4e, 0x86,
- 0x71, 0x17, 0x38, 0x72, 0x98, 0xb2, 0xc0, 0xb2, 0x06, 0xe0, 0x35, 0x9a,
- 0x3a, 0xae, 0x87, 0xc2, 0x94, 0x16, 0x75, 0xa1, 0x37, 0x8d, 0x45, 0xdb,
- 0x80, 0x7c, 0x8a, 0xc2, 0xe0, 0x61, 0x1c, 0xce, 0x62, 0xda, 0x37, 0x1a,
- 0x94, 0x58, 0x36, 0xfe, 0x84, 0x56, 0xdc, 0x96, 0x91, 0xaf, 0xa2, 0x66,
- 0x66, 0x68, 0x19, 0x4d, 0x69, 0x84, 0xd3, 0x42, 0x1c, 0xff, 0x88, 0x97,
- 0xe0, 0x31, 0xe9, 0x4e, 0xd5, 0xd4, 0x46, 0x5a, 0xb0, 0x9d, 0xad, 0xc7,
- 0x42, 0xbf, 0xee, 0x25, 0x40, 0x6e, 0x96, 0xe4, 0xb4, 0xeb, 0x80, 0x60,
- 0x91, 0xdc, 0x30, 0x1d, 0xa0, 0x5b, 0x7e, 0xc3, 0xb4, 0xde, 0x6d, 0xa6,
- 0x1d, 0x29, 0xb0, 0x51, 0x2c, 0x81, 0xa2, 0xb4, 0xe3, 0xde, 0xbe, 0xa4,
- 0x62, 0x8f, 0x7c, 0xc0, 0x89, 0xf0, 0x77, 0x96, 0x8f, 0x76, 0xb5, 0xe4,
- 0x4a, 0x3c, 0x2c, 0xae, 0xb7, 0xc5, 0xcf, 0xd6, 0xcf, 0x43, 0xb0, 0x54,
- 0xad, 0xc7, 0xe2, 0x42, 0xc9, 0xb4, 0xbe, 0xcb, 0x20, 0xee, 0x69, 0x76,
- 0xcd, 0x30, 0xa6, 0x16, 0x30, 0x0e, 0xc7, 0xbe, 0x43, 0x75, 0xa8, 0x2b,
- 0xe0, 0x53, 0x09, 0xc2, 0xd1, 0x3d, 0xaf, 0x99, 0x24, 0x44, 0xea, 0x61,
- 0x9a, 0xd0, 0x85, 0xb7, 0x94, 0x6d, 0x17, 0x6c, 0xd9, 0x74, 0x93, 0x3b,
- 0x9b, 0xe0, 0x78, 0x35, 0x10, 0x33, 0x5a, 0x51, 0xc1, 0x95, 0xa8, 0x11,
- 0x93, 0x4f, 0x21, 0x6a, 0x05, 0x3b, 0xa5, 0x8b, 0xc9, 0x13, 0x54, 0x85,
- 0x59, 0x3d, 0x0f, 0x37, 0xda, 0x93, 0x52, 0xcb, 0x72, 0xd5, 0xcf, 0x8a,
- 0x1e, 0x16, 0xb7, 0x88, 0xbf, 0xe0, 0xac, 0x5c, 0x8a, 0x93, 0xbe, 0x4c,
- 0x1a, 0xf8, 0x4e, 0x8f, 0x1e, 0x11, 0x37, 0x87, 0x47, 0x52, 0xea, 0xd7,
- 0x53, 0xae, 0xf3, 0xff, 0x33, 0xed, 0x7a, 0xe2, 0x55, 0xea, 0xd5, 0x14,
- 0x6e, 0xa3, 0x1a, 0x1c, 0xa7, 0xcd, 0x58, 0xdb, 0xad, 0x35, 0xa7, 0x97,
- 0xa6, 0x2a, 0x18, 0x6b, 0x09, 0x38, 0x80, 0x7b, 0x34, 0x1a, 0x96, 0x80,
- 0xc4, 0x46, 0x20, 0x8c, 0xd1, 0xf4, 0x5a, 0x1a, 0x1e, 0x8f, 0xdb, 0xe3,
- 0x80, 0x11, 0xba, 0x74, 0x78, 0x78, 0x48, 0x1f, 0x1c, 0x0a, 0x99, 0x1e,
- 0x2a, 0x47, 0x3d, 0xbc, 0xe1, 0x8c, 0xcd, 0xe9, 0x56, 0x34, 0xbc, 0x59,
- 0x72, 0xbe, 0x21, 0xcf, 0x91, 0x57, 0x56, 0x97, 0xb0, 0x1e, 0x42, 0x16,
- 0xaf, 0xd8, 0x96, 0x25, 0x10, 0x51, 0x15, 0x01, 0x4b, 0xec, 0x02, 0x48,
- 0x25, 0x35, 0xdf, 0xbf, 0xdd, 0x7f, 0xd2, 0x43, 0x6b, 0xaa, 0xf7, 0x72,
- 0xee, 0x00, 0x09, 0x9d, 0xdd, 0x78, 0xee, 0x88, 0x5f, 0xf5, 0xc2, 0x58,
- 0x0e, 0xcd, 0xdb, 0x83, 0x4b, 0x86, 0x80, 0x2e, 0x35, 0x06, 0xb5, 0x3d,
- 0xc0, 0xcd, 0x1d, 0x4b, 0xd0, 0x7f, 0x1c, 0xa0, 0x07, 0x9a, 0x8a, 0x01,
- 0x59, 0x96, 0x93, 0x20, 0x45, 0xb6, 0x1d, 0x68, 0x9c, 0x45, 0x8b, 0x60,
- 0xac, 0x2b, 0xda, 0x77, 0x3a, 0x8e, 0x24, 0xbe, 0xf1, 0x9f, 0x45, 0xf3,
- 0x78, 0x34, 0xf4, 0xa7, 0xca, 0xeb, 0x3f, 0x4a, 0xa4, 0xee, 0xb6, 0xf6,
- 0xfa, 0xd3, 0x3f, 0xbf, 0x4d, 0x89, 0x4a, 0x35, 0xfc, 0x98, 0x5c, 0x61,
- 0x4d, 0x6f, 0x71, 0x45, 0x3b, 0x73, 0x20, 0x37, 0x12, 0x97, 0xa7, 0x61,
- 0xbd, 0x05, 0x6d, 0xf7, 0x04, 0x88, 0x58, 0x42, 0x83, 0x0e, 0x33, 0xfb,
- 0x3e, 0x6e, 0x88, 0x37, 0x76, 0x50, 0xbd, 0x48, 0x89, 0x22, 0x3b, 0xe2,
- 0x5d, 0x71, 0xcd, 0xe7, 0xc9, 0x62, 0xba, 0x72, 0x66, 0x00, 0x6d, 0x7e,
- 0x9d, 0x98, 0x19, 0x1a, 0x93, 0xc2, 0x20, 0x66, 0x1b, 0x63, 0x51, 0x6d,
- 0x05, 0x1d, 0xc5, 0x2c, 0x04, 0x5e, 0x35, 0x22, 0xe5, 0x63, 0xed, 0xb9,
- 0x86, 0xc2, 0xdc, 0xdc, 0xa1, 0x40, 0xda, 0x72, 0xc0, 0x0d, 0x8a, 0x24,
- 0xad, 0x19, 0x50, 0x8f, 0x27, 0x6e, 0x4f, 0x79, 0xe9, 0x21, 0x1c, 0x25,
- 0xa4, 0x4d, 0x23, 0x03, 0x47, 0xe1, 0x2c, 0xfa, 0xe9, 0x5c, 0xd0, 0x13,
- 0x38, 0xe1, 0x15, 0x46, 0x79, 0xc1, 0xbf, 0xa8, 0xe3, 0x41, 0xc6, 0x45,
- 0x64, 0x08, 0x7f, 0xeb, 0x40, 0x2e, 0x0c, 0x02, 0xd5, 0xc7, 0xec, 0x03,
- 0xaa, 0xa3, 0x4d, 0x88, 0xf5, 0x88, 0x16, 0x87, 0x8a, 0x68, 0x71, 0xc9,
- 0xe1, 0x1c, 0x12, 0x59, 0x10, 0xe7, 0xe5, 0x36, 0xb0, 0x2b, 0x24, 0x43,
- 0x79, 0xcc, 0x18, 0xc7, 0x5a, 0x2a, 0xe0, 0xe2, 0xf5, 0xe1, 0xde, 0x93,
- 0xcf, 0x3e, 0x6b, 0x8d, 0x85, 0x4d, 0x34, 0x19, 0xcb, 0x43, 0x75, 0x73,
- 0x30, 0xa3, 0xe4, 0xb6, 0x8b, 0xcb, 0x91, 0xeb, 0xd0, 0x70, 0x2a, 0xb0,
- 0xa8, 0x98, 0x22, 0x23, 0x77, 0xc7, 0x4d, 0xe3, 0x3d, 0x0f, 0xa8, 0x2b,
- 0xd6, 0x37, 0x49, 0x11, 0xb3, 0x32, 0x29, 0x5a, 0x5e, 0xa3, 0x0a, 0x81,
- 0x26, 0x69, 0xc2, 0xf3, 0xe8, 0x0b, 0xa4, 0xb4, 0x71, 0x07, 0xb5, 0xe6,
- 0xfe, 0xca, 0x5a, 0xee, 0x75, 0x52, 0x36, 0xb3, 0x2c, 0x83, 0xe4, 0xfe,
- 0x47, 0x1a, 0x6f, 0xa1, 0x41, 0xcb, 0x12, 0x8d, 0x5e, 0x5a, 0x9a, 0x9d,
- 0x57, 0xcf, 0x23, 0x2b, 0x28, 0x44, 0x23, 0x62, 0xe2, 0x7b, 0xa9, 0xd6,
- 0x29, 0xcd, 0x30, 0xfb, 0xa2, 0x45, 0xc3, 0x2f, 0xcc, 0x8a, 0x0a, 0xd0,
- 0xb1, 0xb2, 0x8c, 0xad, 0xca, 0x19, 0xbc, 0x96, 0x0c, 0x0a, 0x81, 0x48,
- 0x04, 0xb5, 0xb4, 0x5a, 0x3d, 0x0c, 0xa6, 0x97, 0x69, 0x1b, 0xf2, 0xd1,
- 0x4b, 0xd7, 0x28, 0x00, 0x6f, 0x05, 0x97, 0x83, 0x87, 0xd2, 0xb6, 0x12,
- 0xa6, 0x75, 0x70, 0x92, 0x5e, 0x50, 0x15, 0xce, 0xa5, 0xad, 0xf3, 0xbb,
- 0xc1, 0x3a, 0x35, 0x14, 0xfd, 0xe3, 0x87, 0x78, 0x86, 0x22, 0x5d, 0x26,
- 0xf6, 0xc3, 0xab, 0xef, 0x53, 0xe7, 0x34, 0xd2, 0x25, 0x34, 0x92, 0xab,
- 0xdb, 0xa6, 0xcb, 0x0f, 0xd5, 0xf7, 0x9e, 0x5f, 0xea, 0x9a, 0x3d, 0x2f,
- 0xf4, 0xd1, 0x83, 0x22, 0x65, 0x38, 0x0e, 0x98, 0x50, 0x1c, 0xe6, 0xdc,
- 0xd5, 0x64, 0x4d, 0xf8, 0x1e, 0xbf, 0x09, 0xf8, 0xab, 0xfd, 0xd6, 0x80,
- 0x92, 0xfe, 0x6b, 0x37, 0xd2, 0x57, 0x5f, 0x54, 0x5a, 0xbb, 0xbf, 0x1f,
- 0xcc, 0x56, 0xf6, 0x5d, 0x51, 0xa9, 0x39, 0xe8, 0x73, 0xda, 0x1d, 0xf4,
- 0x05, 0xcf, 0xb2, 0x5b, 0x38, 0xe2, 0xf2, 0x48, 0x16, 0x61, 0xe9, 0x1b,
- 0x23, 0x34, 0xcd, 0xe2, 0x69, 0x66, 0xa2, 0xb9, 0x44, 0x06, 0x4f, 0x7f,
- 0x62, 0xed, 0xed, 0xaa, 0x93, 0x59, 0x0f, 0xfa, 0x75, 0xa6, 0xba, 0xe2,
- 0x88, 0xae, 0x15, 0xa3, 0xb2, 0xa6, 0x9a, 0x5a, 0x94, 0xf9, 0x72, 0x5c,
- 0x36, 0x3d, 0xb3, 0x56, 0x94, 0x4f, 0x71, 0x29, 0x83, 0x3c, 0x1f, 0xb1,
- 0x25, 0x56, 0x58, 0x82, 0xcb, 0xb3, 0xf1, 0x79, 0x0c, 0x75, 0x1c, 0x12,
- 0xe0, 0x33, 0x77, 0x7b, 0x22, 0x3d, 0x2b, 0x8a, 0x83, 0x87, 0x1d, 0x58,
- 0xbb, 0xf0, 0x9d, 0xfb, 0x64, 0xf4, 0xea, 0x0b, 0x0e, 0x39, 0x7c, 0x00,
- 0xbc, 0xab, 0xe0, 0x3c, 0x33, 0x0d, 0x6e, 0xf3, 0x9f, 0x9d, 0x88, 0x23,
- 0x4e, 0x5a, 0xd6, 0x9d, 0xb8, 0xf8, 0xba, 0x16, 0x03, 0x44, 0x94, 0xa0,
- 0xb5, 0xab, 0x2c, 0x5b, 0xdb, 0x98, 0x2b, 0x09, 0x88, 0xc5, 0x08, 0x92,
- 0x7a, 0x24, 0xc7, 0xc6, 0x53, 0xa1, 0x50, 0x1e, 0xef, 0xe2, 0x5c, 0xc1,
- 0xa5, 0x70, 0x0a, 0xdb, 0x90, 0x04, 0x46, 0x2b, 0x57, 0x39, 0xc2, 0xb2,
- 0x8a, 0x5f, 0xf5, 0xa4, 0xfa, 0x29, 0x2b, 0xab, 0xeb, 0x17, 0x84, 0x9f,
- 0x7e, 0xf5, 0x05, 0xd0, 0xca, 0xf8, 0xd7, 0x3f, 0xbb, 0xb7, 0xf9, 0x1f,
- 0xa2, 0x62, 0x62, 0x04, 0x6b, 0x27, 0xc2, 0xa2, 0xc8, 0xd5, 0x32, 0x87,
- 0x98, 0x91, 0xc8, 0x91, 0x94, 0xc2, 0x60, 0x06, 0x45, 0xac, 0xdc, 0xe4,
- 0xcd, 0xc1, 0xdb, 0x77, 0x07, 0xa7, 0x8f, 0xe6, 0xdc, 0x84, 0x96, 0x52,
- 0x17, 0x6b, 0x06, 0xc3, 0x65, 0x45, 0x70, 0xe4, 0xf3, 0xa8, 0x01, 0xff,
- 0x72, 0x13, 0x3e, 0x5e, 0x85, 0xc6, 0xe3, 0x50, 0xe8, 0xf5, 0x19, 0x82,
- 0x78, 0x78, 0x38, 0x21, 0xcb, 0x21, 0x50, 0x65, 0xa8, 0x35, 0x42, 0x1c,
- 0x8e, 0xcd, 0x3c, 0x96, 0xa2, 0x5c, 0xce, 0x8c, 0x31, 0x4d, 0x4b, 0x36,
- 0xb1, 0x32, 0x56, 0xe4, 0xa9, 0x16, 0xd9, 0xec, 0x7e, 0xd1, 0xc5, 0x1a,
- 0x74, 0x5f, 0x76, 0x79, 0x43, 0xf3, 0x78, 0xdc, 0x92, 0x2f, 0x53, 0xb8,
- 0x50, 0x8f, 0xa8, 0x2b, 0x54, 0xd3, 0xb5, 0x41, 0xe8, 0x9a, 0xc9, 0xc8,
- 0x10, 0xea, 0x31, 0xcf, 0x22, 0x75, 0x14, 0xc3, 0xa8, 0xd9, 0xe2, 0xa1,
- 0x02, 0xa4, 0x99, 0xcb, 0xf7, 0x95, 0x8a, 0x58, 0xb8, 0x16, 0xfc, 0xcc,
- 0x45, 0x03, 0xc9, 0x99, 0x63, 0x70, 0x24, 0x85, 0x40, 0x4b, 0xb6, 0x45,
- 0x87, 0xb8, 0xb5, 0xd1, 0xf1, 0xc8, 0x40, 0x38, 0x72, 0x87, 0x6e, 0xe5,
- 0x94, 0xc3, 0x74, 0x61, 0xe9, 0xa5, 0x2f, 0xaf, 0xaf, 0x35, 0x23, 0x19,
- 0x73, 0x06, 0x7e, 0x03, 0x4d, 0xba, 0x81, 0x6f, 0xa9, 0xf5, 0x6c, 0x89,
- 0x8c, 0xeb, 0xe0, 0x53, 0xfd, 0x6b, 0x12, 0x6b, 0xae, 0xa7, 0xd9, 0x28,
- 0xbb, 0xba, 0x7a, 0x84, 0x36, 0x24, 0x7f, 0x0c, 0x4d, 0x08, 0x5b, 0xee,
- 0x70, 0xe6, 0x08, 0xbf, 0x37, 0x92, 0x34, 0x3f, 0x54, 0x4b, 0x18, 0x88,
- 0x95, 0x53, 0x21, 0x4b, 0x1b, 0x93, 0x0a, 0x7c, 0x9c, 0xab, 0x5a, 0x81,
- 0x50, 0x94, 0x04, 0x15, 0x85, 0x47, 0xc3, 0x1d, 0x3d, 0xe8, 0x0c, 0x89,
- 0x36, 0x7f, 0xff, 0xc7, 0x8f, 0x3f, 0xb5, 0x80, 0x34, 0xb1, 0xeb, 0xc2,
- 0xc2, 0xfa, 0x39, 0xac, 0x59, 0xd3, 0x91, 0xe0, 0x24, 0x60, 0x83, 0x95,
- 0x87, 0x67, 0xd4, 0x92, 0x37, 0x41, 0xe8, 0x76, 0xf3, 0xc2, 0x28, 0x7c,
- 0x87, 0x56, 0x57, 0x55, 0xc3, 0x36, 0xa6, 0xc9, 0x75, 0x0c, 0xdc, 0x06,
- 0x7f, 0x79, 0xba, 0xdc, 0x57, 0x65, 0xd5, 0x4d, 0x00, 0x38, 0x97, 0xdb,
- 0x1e, 0x0a, 0x52, 0x30, 0x27, 0x5f, 0x9c, 0x38, 0x97, 0x4d, 0xb0, 0x11,
- 0x5f, 0xf1, 0x46, 0x34, 0x56, 0xcd, 0x03, 0x24, 0xf6, 0xea, 0xc1, 0xe6,
- 0x21, 0x2c, 0x01, 0xa0, 0x74, 0x05, 0x34, 0xa0, 0x0a, 0x0b, 0xb4, 0x16,
- 0x64, 0x2c, 0xcb, 0x6b, 0x38, 0x44, 0x22, 0x72, 0x79, 0x28, 0x46, 0x97,
- 0x39, 0xf7, 0xd5, 0xf1, 0x65, 0x64, 0xc0, 0x6f, 0x0d, 0xba, 0x0f, 0xca,
- 0xe6, 0x38, 0x08, 0x02, 0x87, 0x12, 0x27, 0x78, 0x15, 0xae, 0x70, 0xdf,
- 0x7d, 0x58, 0xbe, 0xa3, 0x4d, 0x09, 0x51, 0xc8, 0x21, 0xd1, 0xea, 0x0c,
- 0x8e, 0xc0, 0x2f, 0xdb, 0xa9, 0x41, 0xc3, 0x74, 0xff, 0xa3, 0xeb, 0xd1,
- 0x5f, 0xda, 0x22, 0x90, 0x2c, 0xc1, 0xad, 0x91, 0x76, 0xdf, 0x3f, 0xe9,
- 0x39, 0x40, 0x08, 0x5d, 0x2f, 0x59, 0x46, 0x37, 0x93, 0x51, 0x0b, 0xc0,
- 0xdb, 0xba, 0x71, 0x7c, 0x7d, 0x7c, 0x70, 0x64, 0x93, 0xfd, 0x1f, 0xc8,
- 0x9c, 0x77, 0x3e, 0xd0, 0x51, 0x22, 0xa0, 0x76, 0xcb, 0xb9, 0x95, 0x57,
- 0xc2, 0x9e, 0x39, 0xc3, 0x4d, 0x4b, 0xc4, 0x18, 0x89, 0x6c, 0x8c, 0x76,
- 0x2d, 0x9a, 0x1c, 0x4a, 0x04, 0x99, 0x83, 0x59, 0xa2, 0x2a, 0xdd, 0x7a,
- 0x84, 0x9e, 0xa1, 0xc0, 0xab, 0xd2, 0x5a, 0xff, 0x28, 0x28, 0x06, 0x18,
- 0x10, 0xf6, 0x0d, 0x52, 0xe2, 0xa6, 0x8b, 0x46, 0x6e, 0x54, 0x7c, 0xcd,
- 0x29, 0x97, 0xd3, 0x45, 0xf0, 0x6c, 0x90, 0x3e, 0xf7, 0x52, 0x7e, 0xae,
- 0xb9, 0x57, 0x8e, 0x01, 0x75, 0xa5, 0x8f, 0x86, 0x49, 0xa2, 0xd7, 0x41,
- 0xf1, 0x26, 0x92, 0x34, 0xf8, 0xca, 0xb8, 0x66, 0xa3, 0x2d, 0x6e, 0x7c,
- 0x62, 0xa1, 0xf5, 0x75, 0x08, 0x2a, 0x14, 0xfb, 0x0a, 0xe0, 0x49, 0xd0,
- 0x7a, 0x25, 0xdd, 0x4a, 0x93, 0xd7, 0xac, 0x6c, 0xd1, 0xa4, 0x51, 0x53,
- 0x86, 0xb8, 0x4d, 0x51, 0x92, 0x14, 0x68, 0x23, 0xe3, 0x97, 0x6e, 0xe2,
- 0x00, 0xd0, 0x4f, 0x20, 0x1c, 0xc4, 0xd3, 0xec, 0x8f, 0x8d, 0xf9, 0x35,
- 0x9b, 0x95, 0x3b, 0x9c, 0x62, 0xa7, 0xc0, 0x71, 0x4b, 0x6c, 0x1b, 0x84,
- 0x6d, 0x4e, 0xf6, 0xe7, 0x97, 0x34, 0xb1, 0x4f, 0xbb, 0x0c, 0xa3, 0xe9,
- 0xd6, 0x1c, 0x57, 0x15, 0xad, 0x9d, 0x33, 0x95, 0xc3, 0x09, 0x2a, 0x86,
- 0x13, 0x9e, 0xa3, 0xa5, 0x11, 0x22, 0x69, 0x0f, 0xa5, 0xdc, 0x1b, 0xb7,
- 0x1e, 0x5f, 0xc3, 0x45, 0xb9, 0xbc, 0xc2, 0x2c, 0x38, 0xcc, 0x46, 0x1c,
- 0x22, 0x18, 0xa8, 0xaf, 0x8d, 0x9a, 0xa1, 0x08, 0xb9, 0xad, 0x99, 0xe9,
- 0xfd, 0xf1, 0x78, 0x9d, 0x6f, 0x57, 0xa7, 0xe3, 0xab, 0xcf, 0x38, 0x56,
- 0xcf, 0xf6, 0x34, 0x29, 0x2b, 0x9e, 0xe4, 0xec, 0xe0, 0x60, 0x1b, 0x9b,
- 0x20, 0x7f, 0xdf, 0x37, 0x39, 0xba, 0xd6, 0xd8, 0x91, 0x44, 0x74, 0x2e,
- 0xe6, 0xc0, 0x76, 0x32, 0x49, 0x36, 0xd4, 0x69, 0xeb, 0x82, 0xd1, 0x15,
- 0x71, 0x9d, 0xde, 0x59, 0x59, 0x32, 0x8c, 0xac, 0x25, 0xe3, 0xcd, 0x06,
- 0x61, 0xb2, 0xbe, 0xfa, 0xf6, 0x05, 0x8e, 0x21, 0xe2, 0xec, 0xd8, 0x60,
- 0x3b, 0xc7, 0xd9, 0x14, 0xf8, 0x0d, 0x31, 0x5c, 0x09, 0xfb, 0x4c, 0xd8,
- 0x75, 0x3f, 0xdc, 0xd7, 0x24, 0xd5, 0xed, 0x77, 0xd6, 0xc4, 0xbb, 0x87,
- 0xac, 0xbd, 0x58, 0xe6, 0x56, 0x5d, 0x10, 0x41, 0x2a, 0x3a, 0x6a, 0xa0,
- 0xe2, 0x4f, 0x26, 0xdb, 0x3a, 0x62, 0x0b, 0xe6, 0x6a, 0x83, 0x32, 0xd4,
- 0x6c, 0x8d, 0x05, 0x82, 0x1a, 0x27, 0xfd, 0xec, 0xaa, 0x8f, 0x2a, 0x8d,
- 0x5c, 0x21, 0x8f, 0xd5, 0xb2, 0x80, 0xa0, 0x91, 0xba, 0x8b, 0x94, 0xc2,
- 0xc9, 0xa4, 0xed, 0x96, 0xd4, 0xc0, 0xf8, 0xdc, 0x59, 0xec, 0x74, 0x30,
- 0xba, 0x28, 0xfb, 0x6c, 0xe5, 0xb1, 0xd7, 0x1d, 0x40, 0x1b, 0xa3, 0x79,
- 0xc7, 0x79, 0x9e, 0xd2, 0x39, 0x6c, 0x80, 0x1a, 0x23, 0x8a, 0xb1, 0x27,
- 0x37, 0xa9, 0x84, 0x84, 0xb1, 0xaf, 0x67, 0x26, 0x4e, 0x3e, 0x38, 0x6a,
- 0x96, 0x0b, 0x88, 0x84, 0x9c, 0xb0, 0xdd, 0x26, 0xfb, 0xfa, 0x64, 0xb7,
- 0x5a, 0x89, 0x44, 0xf8, 0x2f, 0xc2, 0xdc, 0xe0, 0x75, 0x08, 0x27, 0xeb,
- 0x44, 0xe0, 0x20, 0xdf, 0x02, 0xac, 0x5a, 0x73, 0x01, 0xfc, 0x92, 0x6f,
- 0x8b, 0xe9, 0xb5, 0x2d, 0x16, 0x89, 0xdf, 0x32, 0xee, 0x11, 0xc8, 0xce,
- 0x5c, 0xc9, 0x7a, 0xb1, 0x1c, 0xcd, 0x26, 0xcf, 0xa2, 0x97, 0xf4, 0xcf,
- 0xe7, 0x2d, 0xbe, 0x73, 0x49, 0x2a, 0x57, 0x59, 0x58, 0x65, 0x21, 0xfc,
- 0xfe, 0x64, 0x8f, 0x4f, 0xc4, 0x03, 0xb5, 0x39, 0x4e, 0x11, 0x4a, 0x3a,
- 0x49, 0xaf, 0xd3, 0xb2, 0xd0, 0x34, 0x42, 0xbc, 0xb0, 0xb6, 0x5c, 0x16,
- 0xaf, 0xcf, 0xee, 0xde, 0x67, 0xd1, 0x28, 0x2d, 0xa3, 0x37, 0x47, 0xcf,
- 0xa4, 0xe0, 0x5e, 0xb1, 0x9c, 0xf9, 0xc2, 0xac, 0x00, 0x04, 0x46, 0xa5,
- 0xed, 0x2e, 0xc3, 0xf4, 0x2d, 0x47, 0xd3, 0x46, 0xed, 0x9b, 0xdb, 0x64,
- 0x55, 0x2b, 0x2a, 0xce, 0xb0, 0x63, 0x45, 0x52, 0xb7, 0xb3, 0x3b, 0x92,
- 0x43, 0xdd, 0x6e, 0xf5, 0xda, 0x37, 0x05, 0x7a, 0x9a, 0x3f, 0x8d, 0xa0,
- 0xb0, 0x6a, 0x5d, 0xb5, 0xe4, 0x7f, 0x90, 0x01, 0xef, 0xfb, 0xf0, 0xf0,
- 0x5c, 0xdc, 0x39, 0x08, 0xdd, 0x0b, 0x30, 0x24, 0x1e, 0xc3, 0xbe, 0xfd,
- 0xb4, 0x6a, 0x5a, 0x95, 0xb2, 0x9b, 0x86, 0x59, 0xd4, 0x27, 0xe5, 0xea,
- 0x7a, 0x5d, 0x2d, 0xc5, 0xe8, 0x04, 0xcf, 0xea, 0x31, 0x36, 0x8d, 0xf8,
- 0x14, 0x6f, 0x04, 0xa9, 0xcf, 0x72, 0xed, 0xf2, 0x41, 0x48, 0xc7, 0x5c,
- 0xd2, 0xb6, 0x81, 0xbe, 0xba, 0xf4, 0xf0, 0xc6, 0x56, 0xe0, 0x33, 0x5f,
- 0x0a, 0xa0, 0xf9, 0xc1, 0x82, 0xcd, 0x3c, 0xd1, 0xee, 0xe0, 0xa1, 0x17,
- 0x56, 0x17, 0x53, 0x00, 0x7c, 0x94, 0x11, 0x6b, 0x78, 0xa0, 0x10, 0x8e,
- 0x51, 0x1b, 0x0d, 0xb7, 0x2d, 0xf6, 0xb5, 0x29, 0x87, 0x27, 0xe5, 0xc2,
- 0x82, 0xf7, 0x88, 0x97, 0x5d, 0xc7, 0xc0, 0x5f, 0x0f, 0x28, 0x2f, 0xa5,
- 0x73, 0xa0, 0x90, 0x66, 0xeb, 0xe6, 0x2d, 0xdf, 0x06, 0xa0, 0xbe, 0x76,
- 0x0f, 0xab, 0x2c, 0x2e, 0xc1, 0xbd, 0x42, 0x6e, 0xc1, 0xd7, 0xcd, 0x22,
- 0x68, 0xdc, 0x8c, 0x3b, 0xbd, 0xd0, 0x7e, 0x65, 0x05, 0xfa, 0x7c, 0xf3,
- 0xf5, 0x22, 0xd4, 0x45, 0x77, 0x8c, 0xd2, 0x47, 0x35, 0x4b, 0xa3, 0xcd,
- 0x20, 0xfe, 0xc2, 0xea, 0xf8, 0x72, 0xa8, 0xd3, 0x60, 0x10, 0x1e, 0x27,
- 0x30, 0xf2, 0x2b, 0x66, 0x7e, 0xad, 0xb9, 0xdc, 0xe7, 0x82, 0x59, 0x18,
- 0x55, 0xeb, 0x53, 0x6b, 0xcd, 0xa9, 0x40, 0x4c, 0x76, 0xcd, 0x0c, 0x9c,
- 0x89, 0x24, 0xe1, 0x8f, 0xda, 0xae, 0x27, 0xf4, 0x26, 0x13, 0x09, 0xe2,
- 0x11, 0x68, 0x27, 0x5c, 0x91, 0xfa, 0x41, 0x74, 0x30, 0x37, 0x4d, 0x3c,
- 0xd2, 0x4a, 0x61, 0x48, 0xdc, 0x69, 0x54, 0x77, 0xb9, 0x4d, 0x1a, 0x26,
- 0x01, 0xb5, 0x09, 0x04, 0x33, 0x23, 0xb9, 0x6a, 0x67, 0x7f, 0x37, 0xac,
- 0x0b, 0x34, 0xd7, 0xf2, 0x11, 0x28, 0x96, 0xf3, 0xdb, 0x45, 0xdf, 0x9f,
- 0xa8, 0x24, 0xd6, 0x46, 0x2f, 0x0c, 0xbb, 0xbd, 0xfd, 0xfa, 0xe4, 0xf4,
- 0x78, 0x2b, 0x7a, 0x9d, 0x00, 0x57, 0xa4, 0x4a, 0x14, 0x38, 0xbe, 0xbf,
- 0x93, 0x4f, 0x8c, 0xfc, 0x55, 0x09, 0x6d, 0x8b, 0x1f, 0x51, 0x87, 0x05,
- 0xa4, 0x69, 0x39, 0x11, 0x98, 0x83, 0x64, 0x66, 0x65, 0x30, 0x5c, 0x1a,
- 0xb2, 0x3a, 0xc4, 0xd5, 0x00, 0xf4, 0xa3, 0xa5, 0xb8, 0x53, 0x1c, 0x85,
- 0xb5, 0x70, 0x3c, 0xde, 0x05, 0x93, 0x91, 0xc5, 0x01, 0xf3, 0xd8, 0xd5,
- 0x2a, 0x57, 0xa9, 0x8b, 0xbe, 0xae, 0x68, 0x5e, 0x91, 0xfe, 0x2c, 0xd1,
- 0xe8, 0x58, 0xb5, 0x59, 0x36, 0x71, 0xf8, 0x92, 0x52, 0xb2, 0x86, 0xe7,
- 0x1b, 0xac, 0xdd, 0x5f, 0x69, 0xed, 0xfe, 0xba, 0x9c, 0xdf, 0xf6, 0xb5,
- 0x34, 0xa1, 0x02, 0x7a, 0x14, 0xed, 0x67, 0xef, 0x3b, 0x17, 0x83, 0x82,
- 0xc0, 0x60, 0x31, 0x74, 0x36, 0x6b, 0xf4, 0xc5, 0x01, 0xbc, 0x5c, 0xef,
- 0xb1, 0x02, 0x3f, 0xa1, 0xf0, 0xc0, 0x91, 0xa3, 0x34, 0xb9, 0x31, 0x87,
- 0x25, 0xb3, 0x8e, 0xd8, 0xb1, 0x62, 0x89, 0xda, 0x74, 0x67, 0xe0, 0xb1,
- 0x15, 0x1b, 0x90, 0xb5, 0x85, 0xa6, 0x9d, 0xdd, 0x58, 0x8d, 0x3b, 0x08,
- 0xb0, 0x1a, 0x5b, 0x42, 0xa2, 0x40, 0xca, 0xb6, 0x4d, 0xba, 0xe6, 0x5d,
- 0x05, 0x46, 0x09, 0x4e, 0x64, 0x04, 0x59, 0x26, 0xa5, 0xda, 0x35, 0x2b,
- 0x09, 0x81, 0x91, 0x21, 0x7f, 0x17, 0x1e, 0xef, 0xc7, 0x06, 0x18, 0xd5,
- 0x06, 0x27, 0x02, 0x3d, 0xcb, 0x06, 0xdd, 0x06, 0xe1, 0x8c, 0xa7, 0x99,
- 0x54, 0x3d, 0xba, 0x0f, 0xdd, 0x9a, 0xff, 0x89, 0xfb, 0x9e, 0x2f, 0x33,
- 0xa5, 0xc4, 0x7e, 0x4b, 0x84, 0x7c, 0x08, 0x99, 0x6a, 0x18, 0x6b, 0xc8,
- 0x3a, 0x82, 0x18, 0x71, 0xe6, 0x9b, 0x98, 0x07, 0x25, 0xbf, 0x55, 0xc5,
- 0x58, 0x5b, 0x6c, 0xa8, 0x1f, 0x54, 0xf3, 0x70, 0x9c, 0xfa, 0x88, 0xc8,
- 0x2a, 0x2b, 0x52, 0xd9, 0x16, 0x67, 0x14, 0x0c, 0xf5, 0xe6, 0x66, 0x84,
- 0xb8, 0x81, 0x1b, 0xb8, 0xe4, 0x78, 0x17, 0x7a, 0x65, 0xda, 0x67, 0x30,
- 0xdf, 0x5b, 0xf0, 0xf5, 0xa2, 0x2d, 0x6e, 0x4c, 0xd3, 0xa9, 0x82, 0x49,
- 0x06, 0x56, 0x4e, 0x15, 0xf3, 0x2d, 0x6c, 0xc7, 0xe0, 0x5d, 0x49, 0x2c,
- 0xb5, 0xd6, 0x3a, 0xcd, 0xa0, 0x91, 0x10, 0x69, 0x40, 0x4c, 0x67, 0x1e,
- 0xd0, 0xe9, 0x80, 0x68, 0xab, 0xf1, 0x08, 0xe7, 0x6d, 0x48, 0xe4, 0x7a,
- 0xd2, 0x52, 0xa7, 0x9b, 0x61, 0xb8, 0x69, 0x8b, 0x2c, 0xb0, 0xc1, 0x95,
- 0x03, 0x6c, 0x49, 0xcc, 0xd3, 0x3c, 0x4b, 0x59, 0xb7, 0x98, 0xdd, 0x67,
- 0x75, 0x5a, 0x5d, 0xb9, 0x80, 0x50, 0x17, 0x28, 0x2b, 0xbe, 0x10, 0x2d,
- 0x08, 0xe4, 0x47, 0x15, 0xe0, 0xf2, 0xaf, 0x9d, 0x2c, 0x2a, 0xd3, 0x58,
- 0xbc, 0x61, 0xb8, 0xc6, 0xcd, 0x70, 0xc3, 0x40, 0x14, 0x8d, 0x7c, 0x81,
- 0x37, 0xe2, 0x07, 0x80, 0x6c, 0x40, 0x00, 0x9a, 0x54, 0x2e, 0x51, 0xa7,
- 0x28, 0x9c, 0xf2, 0x62, 0xae, 0x95, 0xfc, 0x1e, 0x58, 0x69, 0xd7, 0x94,
- 0x81, 0x43, 0xf2, 0xe5, 0x4d, 0xfc, 0xf0, 0x30, 0x28, 0x12, 0xa9, 0x8b,
- 0x56, 0x14, 0x53, 0x24, 0x7a, 0x56, 0xeb, 0xbf, 0x71, 0x9a, 0x7f, 0xb2,
- 0x88, 0xa7, 0x88, 0x76, 0x64, 0x7e, 0xb4, 0xae, 0xce, 0x56, 0x35, 0x5a,
- 0x41, 0x2a, 0x00, 0x4a, 0xb9, 0xf4, 0x54, 0xea, 0xc3, 0x04, 0x72, 0x1c,
- 0x03, 0x43, 0x15, 0xc2, 0x8a, 0x38, 0x04, 0x2b, 0x4a, 0x27, 0x0d, 0xa7,
- 0x93, 0x86, 0x76, 0xb1, 0xfb, 0x87, 0x77, 0xce, 0x0d, 0x82, 0xb5, 0x8d,
- 0x91, 0xda, 0xa1, 0x11, 0x59, 0xc2, 0xad, 0x9b, 0x77, 0x8c, 0xd1, 0x06,
- 0x48, 0xdd, 0x9a, 0x2c, 0x1b, 0xda, 0x6e, 0xfd, 0x7d, 0x2b, 0xb2, 0x1b,
- 0xe4, 0x5e, 0x80, 0xf7, 0xf0, 0x13, 0x99, 0xbb, 0xd3, 0x01, 0xc9, 0x8b,
- 0xea, 0x8d, 0x8d, 0xcb, 0xe0, 0x4a, 0x50, 0x38, 0x64, 0x8a, 0x97, 0x87,
- 0xe7, 0xef, 0xbf, 0x39, 0x3e, 0x3e, 0x3f, 0x39, 0x22, 0xde, 0x2f, 0x32,
- 0xa5, 0xfb, 0xe8, 0xed, 0xe5, 0xb7, 0xa7, 0x06, 0xcc, 0x61, 0xeb, 0xd3,
- 0xe0, 0xd6, 0x6c, 0xf8, 0x45, 0x73, 0xa7, 0xe9, 0x7c, 0xf9, 0xd0, 0x43,
- 0x79, 0x29, 0x52, 0x34, 0x0e, 0x4e, 0xbe, 0xef, 0x45, 0x5f, 0x9f, 0xf7,
- 0xdf, 0x7d, 0xdf, 0x48, 0x9e, 0xaa, 0x04, 0xe5, 0xd5, 0xcf, 0xb9, 0x0b,
- 0xd1, 0x03, 0x62, 0x98, 0x9f, 0xbb, 0x91, 0x58, 0x0b, 0xb8, 0xf2, 0xc7,
- 0x5d, 0xf6, 0x55, 0xdb, 0x7d, 0x78, 0xdb, 0x3b, 0xe3, 0x92, 0xec, 0x7d,
- 0xcb, 0x6d, 0x17, 0xcf, 0x38, 0xd1, 0x68, 0x10, 0x12, 0xd6, 0x2a, 0x7a,
- 0x49, 0xff, 0xb4, 0x65, 0x6b, 0x6e, 0x73, 0x91, 0xfa, 0xe8, 0x3c, 0x80,
- 0xae, 0x70, 0x0e, 0xac, 0x81, 0xc5, 0x2d, 0xa9, 0x25, 0x41, 0xd3, 0x8f,
- 0xd4, 0x49, 0x98, 0x37, 0xc0, 0x29, 0x5d, 0x0b, 0xbe, 0xa8, 0x2f, 0xcc,
- 0x7b, 0x49, 0xbb, 0xf3, 0xf1, 0x57, 0x4c, 0x53, 0xa5, 0x4e, 0x3f, 0x08,
- 0x88, 0xd0, 0x98, 0x22, 0x3f, 0x3a, 0x70, 0x80, 0x30, 0x2a, 0xb3, 0x70,
- 0x23, 0x98, 0x9f, 0xa2, 0x6e, 0xb4, 0xe0, 0xb0, 0x0b, 0x60, 0x82, 0x43,
- 0xf6, 0x40, 0x83, 0x34, 0xfa, 0x01, 0xa3, 0x23, 0xf4, 0x04, 0x27, 0x21,
- 0xc4, 0x48, 0x70, 0x38, 0x40, 0x5a, 0x9d, 0xac, 0x6c, 0x35, 0x5e, 0x01,
- 0xc8, 0xe4, 0xdf, 0x87, 0x8d, 0x70, 0x9b, 0x8f, 0xa2, 0x97, 0x08, 0xf8,
- 0x6b, 0x0f, 0xa4, 0xd6, 0xba, 0xb1, 0xdf, 0x24, 0xf9, 0x28, 0xc9, 0xb3,
- 0xa2, 0x9e, 0x43, 0xa7, 0x39, 0xf7, 0x5a, 0x9f, 0x93, 0x9b, 0x51, 0x68,
- 0xff, 0x86, 0xe1, 0x15, 0x42, 0x78, 0x22, 0x1e, 0xec, 0x46, 0xb6, 0x50,
- 0x17, 0xb1, 0x73, 0xdd, 0x5e, 0xd4, 0xe5, 0x4c, 0x41, 0xfe, 0x49, 0xac,
- 0xeb, 0x0a, 0xbe, 0x91, 0x34, 0x9e, 0x76, 0x7b, 0x4d, 0x78, 0xc4, 0xae,
- 0xae, 0x7a, 0x97, 0x36, 0x4e, 0x5a, 0xb3, 0x42, 0xaa, 0xb1, 0x8e, 0x43,
- 0x10, 0x5d, 0xd2, 0x42, 0x41, 0x17, 0x43, 0x0b, 0x5d, 0xd1, 0xc0, 0xb2,
- 0x72, 0xcd, 0x55, 0x53, 0xb5, 0xd6, 0xd5, 0x66, 0xa9, 0x72, 0x5e, 0x0d,
- 0x8d, 0x84, 0xb6, 0x6f, 0xe9, 0xec, 0x92, 0xf0, 0x0e, 0xed, 0xf9, 0x56,
- 0xd7, 0xee, 0x29, 0xcb, 0xaa, 0x5f, 0x0d, 0x87, 0x07, 0xe7, 0x27, 0xf5,
- 0xa5, 0xa6, 0x4f, 0xfb, 0x6f, 0xad, 0x46, 0xfc, 0x96, 0x51, 0x8a, 0xd7,
- 0x4d, 0x79, 0x06, 0xc8, 0x3c, 0x62, 0xe9, 0x9a, 0x43, 0x45, 0x04, 0x8a,
- 0xea, 0x5b, 0xba, 0xcc, 0xd6, 0x44, 0x38, 0x2a, 0xf8, 0x90, 0x9a, 0x38,
- 0xf3, 0xa8, 0x52, 0x7b, 0x92, 0x04, 0xc9, 0xdf, 0x90, 0xa6, 0xbe, 0x91,
- 0x7a, 0x66, 0x57, 0xe9, 0x35, 0x07, 0xe9, 0xe3, 0x67, 0x1b, 0x0e, 0x93,
- 0x03, 0x60, 0xd2, 0x12, 0xb0, 0xfe, 0x49, 0x2f, 0x31, 0x03, 0xf3, 0x4c,
- 0x73, 0xcc, 0x44, 0x70, 0x1e, 0x58, 0x4d, 0x89, 0x06, 0x4a, 0x94, 0xbd,
- 0x9c, 0x06, 0x21, 0x13, 0xd3, 0xc4, 0x47, 0xe4, 0x98, 0x62, 0x82, 0xbb,
- 0xdc, 0x37, 0x0a, 0x0d, 0xb1, 0x49, 0xae, 0x56, 0x07, 0x4f, 0x5f, 0x16,
- 0x3b, 0x7a, 0x38, 0x61, 0x15, 0x99, 0xc5, 0xd6, 0xc5, 0x4e, 0x7f, 0x7b,
- 0x23, 0x6b, 0x03, 0x1b, 0x20, 0x19, 0x90, 0xe1, 0x9a, 0xc3, 0x31, 0x0c,
- 0xa2, 0xb3, 0x45, 0x20, 0x7d, 0xdd, 0x24, 0x69, 0xee, 0x1d, 0xa2, 0x3e,
- 0x9f, 0x1d, 0x5c, 0xa1, 0x39, 0x59, 0x66, 0x3c, 0x59, 0xb5, 0x20, 0x8f,
- 0xae, 0xa0, 0x4c, 0x5b, 0xca, 0xa7, 0x18, 0xdf, 0x85, 0xe7, 0x8c, 0x66,
- 0x52, 0x26, 0xc5, 0x82, 0xf4, 0xd0, 0x46, 0xf5, 0x4f, 0x31, 0x70, 0x02,
- 0xf9, 0x80, 0x61, 0xa5, 0x0b, 0x04, 0xe1, 0x44, 0xc0, 0xe2, 0x5f, 0x55,
- 0xdc, 0x2e, 0xf0, 0x78, 0xd2, 0x29, 0xda, 0x54, 0xfc, 0xc2, 0xd6, 0x02,
- 0x85, 0xe2, 0x33, 0xe0, 0xc3, 0x1e, 0xa0, 0xfa, 0x5b, 0x79, 0x39, 0xdf,
- 0xbe, 0x87, 0xe1, 0xf1, 0x7e, 0xe0, 0xb4, 0x25, 0x6b, 0xda, 0x41, 0xa6,
- 0x04, 0x13, 0x70, 0xb0, 0x5d, 0xce, 0x81, 0x6c, 0x6c, 0x07, 0x40, 0xe8,
- 0xa2, 0x4e, 0x28, 0xf6, 0x43, 0x03, 0x0b, 0x2a, 0x03, 0xc8, 0xca, 0x77,
- 0x02, 0x0c, 0x31, 0xc9, 0x96, 0xcc, 0xe0, 0xe4, 0xd3, 0xba, 0x03, 0x27,
- 0x91, 0xd2, 0x8e, 0x05, 0x3b, 0x85, 0xd8, 0x8b, 0xd3, 0x52, 0x7c, 0xc2,
- 0x41, 0x33, 0xec, 0x47, 0x7f, 0xf9, 0x4b, 0x2f, 0xfa, 0x4b, 0x87, 0xfe,
- 0x2b, 0xe9, 0x3f, 0x5a, 0xcf, 0xbf, 0x48, 0x2d, 0x83, 0xbf, 0xdc, 0xd1,
- 0xfd, 0x19, 0x71, 0x49, 0xc2, 0x62, 0xca, 0x20, 0x02, 0x1e, 0xa7, 0xbe,
- 0x05, 0x5a, 0x43, 0x42, 0x0c, 0xb5, 0x3e, 0x07, 0x1f, 0x7e, 0x58, 0xb0,
- 0x26, 0x6e, 0xa9, 0x24, 0xb5, 0x86, 0x36, 0x6c, 0x39, 0x9b, 0x4b, 0x38,
- 0x8a, 0x6e, 0x3b, 0xc8, 0xba, 0xa1, 0x45, 0xc6, 0x51, 0xf7, 0x13, 0xf3,
- 0x9a, 0x97, 0x96, 0xda, 0x1a, 0x06, 0x69, 0xe2, 0x35, 0xa3, 0xeb, 0x52,
- 0xeb, 0x40, 0x4a, 0x9c, 0x52, 0x5b, 0xbc, 0xa6, 0xa8, 0xe1, 0x67, 0x73,
- 0xd8, 0xea, 0x01, 0x11, 0xaa, 0x8c, 0x55, 0x59, 0x21, 0x5b, 0xa5, 0x17,
- 0x37, 0x2b, 0xe8, 0x9a, 0x3a, 0x24, 0x57, 0xcb, 0x99, 0x46, 0xd9, 0x52,
- 0x56, 0xa4, 0x29, 0x7c, 0x5b, 0xe1, 0x52, 0x55, 0xd7, 0xad, 0x42, 0x66,
- 0xc8, 0x57, 0x68, 0x80, 0xdd, 0x7e, 0xb7, 0x8a, 0x8d, 0x68, 0x61, 0x3c,
- 0x6d, 0x75, 0x6e, 0x82, 0xa2, 0x34, 0x8d, 0xda, 0x98, 0xb0, 0x95, 0x2a,
- 0xfc, 0x97, 0x80, 0xec, 0x0b, 0xd0, 0x46, 0xe6, 0xbd, 0x49, 0xf0, 0x12,
- 0x56, 0x26, 0xa2, 0x7a, 0x3b, 0xb1, 0xd6, 0x46, 0x2d, 0x12, 0x05, 0x7e,
- 0xd3, 0x77, 0xd3, 0x32, 0x50, 0x84, 0xfa, 0x7d, 0xa9, 0x9c, 0xa9, 0x78,
- 0xd0, 0x90, 0x5a, 0x71, 0x39, 0xb1, 0xc6, 0x53, 0xa4, 0xb3, 0x45, 0xc3,
- 0xf2, 0xc8, 0x6b, 0xec, 0x85, 0x5e, 0x1e, 0x06, 0x70, 0xf0, 0xb9, 0x9a,
- 0xce, 0xfd, 0x5c, 0xd9, 0xc8, 0x30, 0x03, 0x8a, 0x80, 0x18, 0xa7, 0x00,
- 0x2a, 0xe3, 0xe3, 0x76, 0x5a, 0xbc, 0xf6, 0x0d, 0x33, 0x15, 0x8f, 0xe9,
- 0x55, 0xd4, 0x59, 0xab, 0xa5, 0x74, 0xea, 0x2f, 0x9c, 0x32, 0xec, 0x8b,
- 0xee, 0xb8, 0x60, 0xfd, 0x8d, 0x61, 0x94, 0x13, 0x7c, 0xb6, 0x29, 0x10,
- 0x49, 0xb4, 0x76, 0xa1, 0x4b, 0x8a, 0x0c, 0x99, 0xd3, 0x1a, 0x5f, 0x8c,
- 0x38, 0xb1, 0x04, 0x3a, 0x52, 0x4f, 0x25, 0x57, 0x42, 0x5d, 0x07, 0x7b,
- 0x6a, 0x36, 0x16, 0xce, 0xe1, 0xbf, 0x55, 0xf4, 0x37, 0xb5, 0x41, 0x6c,
- 0x9a, 0xb6, 0xf7, 0x37, 0xbb, 0xc7, 0xb6, 0xd4, 0x4a, 0x2e, 0x79, 0xa9,
- 0x6b, 0xa0, 0x5b, 0xc2, 0x2b, 0xc8, 0x81, 0x09, 0xa5, 0x90, 0xea, 0xe9,
- 0xbd, 0xe5, 0x7c, 0xe2, 0xc2, 0x04, 0x0d, 0xeb, 0x65, 0x2d, 0x55, 0x43,
- 0xd1, 0xe1, 0x1e, 0x15, 0x74, 0x4e, 0x89, 0xc7, 0x73, 0x16, 0xf8, 0x1c,
- 0x0a, 0x27, 0x20, 0x67, 0x39, 0x29, 0xb1, 0x8d, 0x9d, 0xd9, 0xdd, 0x72,
- 0x71, 0xa0, 0xa8, 0xeb, 0x27, 0x85, 0x1e, 0x55, 0x0d, 0xeb, 0xdc, 0x64,
- 0x02, 0xf7, 0xd3, 0xd9, 0x67, 0xcd, 0x4a, 0x19, 0x83, 0x9f, 0x65, 0xf3,
- 0x28, 0x00, 0x4c, 0xe9, 0xeb, 0xb3, 0x37, 0xc7, 0x2e, 0xe3, 0x55, 0x4c,
- 0x7d, 0xfc, 0x49, 0x2b, 0xc4, 0xe3, 0x00, 0xf9, 0x04, 0x86, 0x00, 0xd1,
- 0x6b, 0xd6, 0xe8, 0x94, 0x25, 0xba, 0x4e, 0xca, 0xc5, 0xfd, 0x32, 0x9d,
- 0x6c, 0x02, 0xa4, 0xe3, 0xdd, 0xdb, 0x93, 0xef, 0xfb, 0x62, 0x29, 0x16,
- 0x45, 0xce, 0x70, 0x2a, 0x0c, 0xe5, 0x42, 0xbc, 0x09, 0xb3, 0x16, 0x4c,
- 0x16, 0xa5, 0x1a, 0x1c, 0x33, 0x45, 0x25, 0x42, 0xae, 0x5f, 0x3a, 0x17,
- 0x21, 0x46, 0x1a, 0xa4, 0x7b, 0xe3, 0x6c, 0x4e, 0xec, 0x1b, 0x58, 0x4b,
- 0x02, 0xa0, 0xd1, 0x92, 0xbd, 0x5b, 0x5d, 0x89, 0xe8, 0xe0, 0xfc, 0xfc,
- 0xe8, 0xe0, 0xf2, 0xc0, 0xcd, 0x0d, 0xe0, 0x46, 0xe0, 0x73, 0x10, 0x67,
- 0x58, 0xb1, 0xd7, 0x4a, 0x49, 0xdd, 0xdf, 0x73, 0x86, 0x60, 0x9d, 0xf3,
- 0x9d, 0x5f, 0x9c, 0xb1, 0x99, 0xf1, 0xf7, 0x7f, 0x39, 0xf0, 0x15, 0xe2,
- 0x50, 0x0a, 0xa9, 0x59, 0xa8, 0x6b, 0x6f, 0x8b, 0xc7, 0x77, 0xef, 0xc6,
- 0xa7, 0x71, 0x42, 0x22, 0xc7, 0x45, 0xef, 0x79, 0x43, 0xf3, 0xb1, 0x13,
- 0x4e, 0x6c, 0x35, 0xb0, 0x00, 0xbd, 0x96, 0xdc, 0xb2, 0x60, 0x22, 0x99,
- 0xe7, 0xa7, 0x86, 0xf5, 0x64, 0x8b, 0x35, 0x8d, 0x92, 0x87, 0x64, 0xbc,
- 0x2c, 0xc1, 0xbb, 0xd8, 0x9b, 0xc1, 0xf4, 0x35, 0xe1, 0x95, 0xaa, 0x3b,
- 0xea, 0xeb, 0xdb, 0xe3, 0x61, 0x13, 0x85, 0x03, 0x49, 0x4a, 0x67, 0x26,
- 0x55, 0x31, 0x06, 0x3a, 0x5a, 0x5f, 0x17, 0xa3, 0x71, 0x76, 0x04, 0x48,
- 0x91, 0xe8, 0xdc, 0xe8, 0xb1, 0xb1, 0x20, 0x9f, 0x10, 0xe3, 0xeb, 0x5b,
- 0x88, 0xa9, 0x4c, 0x9c, 0x3e, 0x68, 0x3c, 0x54, 0xba, 0x1a, 0x0f, 0x2c,
- 0x26, 0x35, 0xbd, 0x9f, 0xca, 0xa7, 0x42, 0x06, 0x55, 0x37, 0xf5, 0x28,
- 0x64, 0x8c, 0x3e, 0x05, 0xa8, 0x62, 0x44, 0x21, 0x36, 0xfd, 0x39, 0xe6,
- 0x58, 0xa4, 0x47, 0x49, 0x2a, 0x26, 0x11, 0x97, 0xff, 0xda, 0xde, 0x1d,
- 0xec, 0x74, 0x9a, 0xa3, 0x47, 0xe2, 0x19, 0x2c, 0xe3, 0xf1, 0x5c, 0xee,
- 0x67, 0x01, 0xe6, 0xcd, 0x3e, 0x3c, 0x40, 0xe1, 0xa0, 0x24, 0xf3, 0x21,
- 0x6e, 0xa1, 0x6d, 0x2c, 0xfd, 0xb3, 0x86, 0x77, 0x48, 0x3c, 0x9c, 0x9e,
- 0x25, 0xcf, 0x33, 0x84, 0x95, 0xc6, 0x6c, 0x2c, 0x83, 0x9f, 0xa0, 0xd3,
- 0xbe, 0xc0, 0xf3, 0x89, 0x44, 0x3b, 0xd4, 0xd6, 0xf9, 0x51, 0xdd, 0x65,
- 0x7d, 0x98, 0xa0, 0xa3, 0x01, 0xf7, 0xf1, 0x5a, 0x6e, 0x57, 0x71, 0x8b,
- 0x5a, 0xa1, 0xfb, 0x56, 0xf0, 0xd5, 0x03, 0xc1, 0x3f, 0x0e, 0x35, 0x0d,
- 0xce, 0x83, 0xe3, 0xea, 0x81, 0x1c, 0x55, 0xc5, 0x9a, 0x93, 0xe6, 0x6f,
- 0xce, 0x2a, 0x65, 0x00, 0xf1, 0x7b, 0xf3, 0xb6, 0xad, 0x94, 0x8d, 0x8e,
- 0xb4, 0xe7, 0xbe, 0x5c, 0xb8, 0x6a, 0xa9, 0x43, 0x15, 0x96, 0xa0, 0x44,
- 0xb6, 0xf3, 0x02, 0xac, 0x81, 0x07, 0x31, 0x29, 0x95, 0xd4, 0xc1, 0xa9,
- 0xc0, 0xa9, 0x48, 0x40, 0xad, 0x68, 0x51, 0x32, 0x2c, 0xf1, 0xb8, 0x7b,
- 0x2f, 0x14, 0xbf, 0xf7, 0xbb, 0xb6, 0xa2, 0xdb, 0xfb, 0x8a, 0xcf, 0x92,
- 0x25, 0xa2, 0xc3, 0x89, 0xdf, 0x9e, 0x43, 0x22, 0x34, 0x51, 0xa9, 0xff,
- 0xda, 0x99, 0xd5, 0xcc, 0xee, 0xc6, 0x3a, 0x2a, 0x2d, 0x79, 0x13, 0x24,
- 0x54, 0x80, 0x2c, 0xd8, 0xb2, 0x8b, 0xd2, 0x60, 0x3d, 0x36, 0x71, 0x09,
- 0x3b, 0xc8, 0x18, 0x62, 0x21, 0x36, 0xe8, 0x3b, 0x3d, 0x04, 0xd4, 0xd7,
- 0x35, 0x49, 0xc7, 0x6b, 0x42, 0xaa, 0x0d, 0x64, 0xc4, 0xd7, 0xd7, 0x65,
- 0xef, 0x40, 0x61, 0x99, 0xb5, 0xef, 0x81, 0x9f, 0x35, 0x99, 0x6c, 0x3e,
- 0xd9, 0x12, 0x23, 0x86, 0xab, 0x9c, 0x0d, 0xc7, 0xdd, 0xbf, 0xa8, 0x3c,
- 0xaa, 0x70, 0xe0, 0x4b, 0x10, 0xb6, 0x6d, 0xab, 0x8b, 0x2c, 0x7b, 0x2c,
- 0xcf, 0x66, 0x4a, 0x92, 0x4e, 0xd9, 0x87, 0x69, 0xe9, 0x25, 0x89, 0x5c,
- 0xc9, 0x64, 0xad, 0x96, 0x29, 0xd0, 0x0c, 0xf1, 0x43, 0x3a, 0x5b, 0xce,
- 0xbc, 0xe7, 0x99, 0x71, 0x79, 0xcb, 0xa4, 0x59, 0xe1, 0x50, 0x6d, 0x1a,
- 0x0d, 0x79, 0x5a, 0xfd, 0x5e, 0x3a, 0x43, 0x20, 0x13, 0x4b, 0x0c, 0x11,
- 0xbc, 0x2a, 0xac, 0xfe, 0xd3, 0x78, 0x38, 0x8b, 0x3f, 0x5d, 0x88, 0x0c,
- 0xc1, 0x71, 0x2b, 0x13, 0x71, 0x9c, 0x32, 0x05, 0xd5, 0x37, 0xd5, 0x86,
- 0x81, 0x0a, 0x06, 0xe2, 0x94, 0x90, 0x60, 0xa0, 0x79, 0xc9, 0xa9, 0x72,
- 0x23, 0x6a, 0xe2, 0x3e, 0x9d, 0x94, 0x37, 0xed, 0x78, 0x83, 0xb2, 0x8e,
- 0x98, 0x77, 0x24, 0x08, 0x25, 0x1c, 0x5e, 0x82, 0xa5, 0x82, 0xcf, 0x78,
- 0x5b, 0x0c, 0xc7, 0x2e, 0xdb, 0x3e, 0x26, 0xba, 0xbb, 0xe2, 0xf4, 0x88,
- 0xa6, 0x9e, 0xa0, 0x61, 0x71, 0x03, 0x3b, 0xa2, 0x08, 0xbc, 0xbd, 0xed,
- 0xf2, 0x2d, 0xd9, 0xfd, 0x46, 0xad, 0x22, 0x02, 0x5b, 0x84, 0x60, 0x6a,
- 0xad, 0x0e, 0xce, 0x11, 0x31, 0xb7, 0xe9, 0xb4, 0x59, 0x20, 0x71, 0x05,
- 0x65, 0x2a, 0xea, 0xce, 0x24, 0x8c, 0xf5, 0x4d, 0x57, 0x0d, 0xf8, 0x28,
- 0x84, 0xac, 0x1e, 0xed, 0x9e, 0xa4, 0x3e, 0x44, 0xdd, 0x6b, 0xe9, 0xe6,
- 0x2b, 0xff, 0x50, 0xad, 0x39, 0xef, 0x04, 0xb7, 0x5b, 0xa4, 0xd8, 0x8f,
- 0xf6, 0x76, 0x76, 0xbe, 0xe9, 0x45, 0x4f, 0xa4, 0x74, 0xec, 0xee, 0x57,
- 0xad, 0x2b, 0x24, 0x0b, 0x84, 0x2d, 0x56, 0xfd, 0x33, 0xbe, 0x03, 0xaf,
- 0xd7, 0x45, 0xc3, 0x8c, 0x58, 0x53, 0x9c, 0x2c, 0x03, 0xdb, 0xb2, 0x2c,
- 0xfe, 0x9a, 0xad, 0x82, 0x19, 0xbb, 0x0e, 0x85, 0x30, 0x43, 0xdc, 0x10,
- 0xef, 0xde, 0x0d, 0xfd, 0xc6, 0xde, 0x7b, 0xdb, 0x58, 0xf4, 0xd3, 0x92,
- 0xcf, 0x5e, 0xdc, 0xf0, 0xf1, 0x1f, 0x2d, 0x73, 0x9c, 0x64, 0x76, 0x84,
- 0x4a, 0x39, 0x22, 0xb6, 0xad, 0x43, 0x67, 0x90, 0x5a, 0xd2, 0xbe, 0x74,
- 0x6a, 0x59, 0x99, 0xce, 0xa0, 0xbd, 0xde, 0x23, 0xe2, 0x67, 0x5c, 0x41,
- 0xd8, 0x1f, 0x48, 0x61, 0x42, 0xff, 0x72, 0x4c, 0xbc, 0xe2, 0x21, 0xda,
- 0x4e, 0xe8, 0x61, 0xac, 0x4f, 0x96, 0xb5, 0x2a, 0xd1, 0x53, 0x61, 0x60,
- 0x86, 0x29, 0x1c, 0x73, 0x64, 0xfc, 0xb4, 0x85, 0x96, 0xe9, 0xe1, 0x81,
- 0x48, 0xd3, 0xe0, 0xb7, 0x53, 0x7e, 0x60, 0xba, 0xea, 0x35, 0xd5, 0x0e,
- 0x0e, 0x0b, 0x84, 0x3f, 0xc0, 0x14, 0xa1, 0x70, 0x54, 0x9c, 0x3e, 0x3b,
- 0x46, 0x89, 0x1a, 0x8e, 0xec, 0xfa, 0xed, 0xcc, 0x52, 0x53, 0xc6, 0xe3,
- 0x4f, 0x8b, 0xb2, 0xcf, 0xee, 0xdd, 0xf5, 0xa8, 0x5d, 0x9a, 0x53, 0x6e,
- 0xe8, 0x5d, 0x13, 0x8f, 0x86, 0x29, 0x96, 0x6c, 0x29, 0xbd, 0x81, 0x28,
- 0x4a, 0x68, 0xc9, 0xcc, 0xbe, 0xfa, 0x8d, 0x40, 0x3f, 0xd6, 0x8f, 0xef,
- 0xd2, 0xe4, 0x9e, 0xd3, 0xb2, 0x8f, 0x3d, 0x28, 0x59, 0x95, 0x67, 0x58,
- 0xf5, 0x8b, 0x59, 0x3c, 0xbe, 0xa1, 0x0b, 0xa5, 0x8f, 0xb8, 0xeb, 0x16,
- 0x19, 0x2b, 0xac, 0xa0, 0x5a, 0x1f, 0x16, 0x83, 0xe1, 0xb8, 0x34, 0x2c,
- 0xc3, 0xa5, 0x0b, 0x90, 0x14, 0x79, 0x10, 0x6b, 0x40, 0xb0, 0xc4, 0x58,
- 0xea, 0x70, 0xae, 0xa0, 0x39, 0x66, 0xb9, 0x41, 0xc9, 0x7e, 0x48, 0x6c,
- 0x90, 0x2c, 0x35, 0x43, 0xe3, 0x7a, 0x7b, 0x3a, 0xf4, 0x18, 0x01, 0xa5,
- 0x56, 0x52, 0x80, 0xad, 0x60, 0xc8, 0x52, 0xe1, 0xeb, 0x35, 0x55, 0xa5,
- 0x0b, 0x01, 0xcc, 0x97, 0xf8, 0x20, 0x44, 0xbf, 0x88, 0x78, 0x9b, 0xe6,
- 0x15, 0xac, 0x07, 0x6e, 0xfd, 0xcf, 0x1a, 0xa0, 0x3d, 0x91, 0x2a, 0x3a,
- 0xed, 0x91, 0x2a, 0x9c, 0x51, 0x17, 0x16, 0x42, 0x87, 0xb1, 0x19, 0x49,
- 0x5e, 0x44, 0x62, 0x74, 0x69, 0xdf, 0x56, 0x25, 0x15, 0xce, 0xd1, 0x10,
- 0x64, 0x98, 0x97, 0xc4, 0xd1, 0x3e, 0xff, 0xb1, 0x4f, 0xff, 0xfe, 0xd4,
- 0xf0, 0x05, 0x96, 0x82, 0x27, 0xa3, 0x26, 0x2d, 0x0b, 0x2b, 0xcd, 0x3d,
- 0x3c, 0xbe, 0x54, 0xa6, 0x47, 0x3b, 0xf2, 0x6d, 0x11, 0x14, 0x16, 0x68,
- 0x0d, 0x91, 0x30, 0xb7, 0xdc, 0x66, 0xc1, 0x50, 0x40, 0x01, 0x00, 0xb9,
- 0x44, 0x0d, 0x59, 0x2b, 0xb0, 0x0b, 0xcc, 0xe5, 0xc6, 0x91, 0xd2, 0x1d,
- 0x75, 0xd5, 0x95, 0x5d, 0xed, 0xe3, 0xc4, 0xfb, 0x25, 0x7d, 0x7d, 0xc7,
- 0x11, 0x03, 0xc4, 0x14, 0x2b, 0x86, 0x7a, 0x12, 0x71, 0xae, 0xc8, 0x5c,
- 0x42, 0x0b, 0x28, 0x19, 0xc3, 0x6f, 0x3a, 0x72, 0x19, 0x8d, 0x48, 0xa2,
- 0x33, 0x48, 0xc0, 0xa5, 0xce, 0xf3, 0x3c, 0xbb, 0xb7, 0xb3, 0xaf, 0x61,
- 0xc9, 0x81, 0xcc, 0xe0, 0x1d, 0x8c, 0xd4, 0xf6, 0x72, 0xd1, 0xe2, 0x79,
- 0xe5, 0x54, 0x85, 0x06, 0x90, 0x48, 0x98, 0x89, 0x19, 0xd6, 0xc9, 0x68,
- 0x0d, 0x4f, 0x01, 0x92, 0xfc, 0x96, 0x47, 0x51, 0x75, 0xa5, 0x4d, 0xc4,
- 0x96, 0xed, 0xd2, 0x2b, 0x34, 0x74, 0x1b, 0x18, 0x3a, 0x1c, 0x8b, 0xdc,
- 0x28, 0x3d, 0x2e, 0xa9, 0xd5, 0xc0, 0x5d, 0xb0, 0xb8, 0xeb, 0x32, 0x72,
- 0x25, 0x3a, 0x36, 0xd9, 0x93, 0x39, 0x86, 0xfd, 0x4b, 0x03, 0xc2, 0xeb,
- 0x65, 0x32, 0xda, 0x70, 0x09, 0x88, 0x03, 0x3c, 0xf9, 0xfe, 0xfb, 0x00,
- 0x9a, 0x84, 0xe5, 0xcd, 0xad, 0x5e, 0x85, 0x69, 0xd5, 0x2a, 0x46, 0x12,
- 0x15, 0x65, 0x2d, 0xa7, 0xdc, 0xc2, 0xec, 0x35, 0x14, 0x95, 0x23, 0x31,
- 0xa0, 0xc4, 0x0d, 0x5c, 0x08, 0xbc, 0x15, 0xb8, 0xd6, 0xe0, 0xf7, 0x20,
- 0x0c, 0xac, 0xa5, 0x7e, 0x94, 0x0b, 0xf9, 0xe9, 0xf9, 0xd8, 0x5b, 0x89,
- 0x3c, 0x41, 0x78, 0x5a, 0xb8, 0x54, 0x85, 0xa3, 0x18, 0xba, 0x95, 0xee,
- 0xe7, 0x83, 0xb6, 0xca, 0x26, 0x4d, 0xec, 0x44, 0xc9, 0x62, 0xc0, 0x8c,
- 0x70, 0x7e, 0xa5, 0x1a, 0x0f, 0x9b, 0xa6, 0xc6, 0x79, 0xa2, 0x9e, 0x9b,
- 0xc2, 0x95, 0x96, 0x6f, 0x9c, 0x57, 0xb1, 0xf3, 0x20, 0xd2, 0x4a, 0xc0,
- 0xc2, 0x39, 0x5c, 0x57, 0xce, 0x2e, 0xae, 0x1f, 0x1f, 0xcf, 0x10, 0xee,
- 0x16, 0x3f, 0xde, 0x6b, 0x0a, 0x08, 0xf7, 0x28, 0x3f, 0x12, 0x98, 0xee,
- 0x10, 0x72, 0xa5, 0x99, 0x49, 0x82, 0x79, 0xf3, 0xa7, 0x6a, 0x91, 0x3d,
- 0xcd, 0x9b, 0x13, 0xd2, 0x6b, 0xab, 0x24, 0xd8, 0x2f, 0xf3, 0x25, 0x56,
- 0x88, 0x37, 0x84, 0x41, 0xdc, 0x58, 0x32, 0xb6, 0x74, 0x32, 0x76, 0xf2,
- 0x59, 0x74, 0x99, 0xdc, 0x62, 0xde, 0xdd, 0xda, 0x0c, 0x02, 0xb1, 0x79,
- 0x59, 0xda, 0x3a, 0xa7, 0xa9, 0x57, 0x02, 0x24, 0xfa, 0x7d, 0x12, 0x4c,
- 0xfb, 0x78, 0xac, 0x68, 0x54, 0x76, 0x68, 0xd8, 0xbc, 0xa4, 0x85, 0x22,
- 0x5c, 0x30, 0xd3, 0x21, 0x8c, 0x86, 0xd4, 0x65, 0x14, 0x33, 0x05, 0xb1,
- 0x09, 0xee, 0xab, 0xe3, 0xcb, 0xfa, 0xd1, 0x02, 0x74, 0x84, 0xaa, 0x8a,
- 0xc8, 0x9f, 0xa0, 0xbf, 0xcf, 0xdf, 0x5d, 0x6e, 0x79, 0x73, 0xc0, 0x24,
- 0xab, 0xd9, 0xac, 0xac, 0xf5, 0x96, 0x4c, 0x14, 0xc9, 0x51, 0x50, 0x50,
- 0x06, 0x24, 0x9a, 0xb8, 0x03, 0xc1, 0x28, 0x0a, 0x4f, 0x76, 0x76, 0x49,
- 0x54, 0xdb, 0xd9, 0x83, 0xd5, 0xe5, 0xc9, 0xce, 0x13, 0x67, 0xce, 0xb6,
- 0xa7, 0x1a, 0x37, 0x1e, 0xd3, 0x34, 0xf0, 0x17, 0x50, 0xcc, 0x56, 0xb4,
- 0xee, 0xe8, 0xc9, 0xc3, 0x03, 0xbe, 0xea, 0x55, 0xb1, 0x7a, 0x8a, 0x44,
- 0xa7, 0xef, 0x86, 0xba, 0xe6, 0x68, 0xf9, 0x15, 0x87, 0xf9, 0x64, 0x39,
- 0x97, 0xd8, 0x2f, 0x56, 0x7d, 0x91, 0xf1, 0x50, 0xbf, 0x1c, 0x42, 0x3a,
- 0x78, 0x8c, 0x35, 0x9d, 0xb2, 0x78, 0x5f, 0x61, 0x64, 0x3d, 0x8f, 0x4c,
- 0x22, 0x70, 0xbf, 0xa6, 0xdd, 0x59, 0x2a, 0x62, 0xad, 0xb9, 0x3f, 0x05,
- 0x28, 0x9f, 0x52, 0x20, 0x05, 0xa4, 0x1e, 0x70, 0x37, 0x54, 0xbc, 0xe2,
- 0xa4, 0x31, 0x7f, 0x4a, 0x32, 0x75, 0x10, 0x36, 0xf3, 0x20, 0xb2, 0x1c,
- 0x8f, 0x4a, 0xd2, 0x7f, 0x99, 0x67, 0x93, 0xe5, 0x18, 0x77, 0x3d, 0x87,
- 0xbd, 0x70, 0x21, 0xbf, 0x91, 0xa0, 0x3e, 0x1a, 0x88, 0x06, 0x37, 0xed,
- 0x89, 0xb4, 0xa9, 0x66, 0x2b, 0x6c, 0x3a, 0x9e, 0x73, 0x69, 0xbb, 0xac,
- 0xd9, 0xb0, 0xd1, 0xc8, 0x65, 0x0b, 0xd7, 0x59, 0xc4, 0xfc, 0x2a, 0x53,
- 0xd3, 0x5f, 0x13, 0xa4, 0x17, 0x74, 0x09, 0x27, 0x9d, 0x99, 0xd5, 0x63,
- 0x29, 0x46, 0x07, 0xda, 0xf9, 0x92, 0x83, 0xd5, 0x6a, 0xed, 0x55, 0x60,
- 0x58, 0x67, 0x0c, 0x2a, 0x9b, 0x8f, 0xe9, 0x78, 0xbf, 0xd4, 0xa8, 0xcd,
- 0xa6, 0xab, 0x1f, 0xa0, 0x23, 0x43, 0x67, 0xc2, 0x57, 0xac, 0x48, 0x0f,
- 0x3a, 0xa5, 0xeb, 0x2a, 0x32, 0xf5, 0x4c, 0xe0, 0x87, 0x35, 0x69, 0xa6,
- 0x99, 0xb8, 0x05, 0x64, 0x55, 0xbf, 0xe2, 0x1f, 0xcc, 0xb1, 0x0c, 0x5d,
- 0x00, 0x2d, 0x68, 0x91, 0xb4, 0xd0, 0xe9, 0x82, 0x41, 0xbe, 0x9a, 0xb6,
- 0xed, 0xf5, 0x18, 0x25, 0x3a, 0x6d, 0x30, 0xf1, 0x7f, 0xe7, 0xb4, 0xe1,
- 0x76, 0xfd, 0x65, 0xc3, 0x7c, 0x40, 0x91, 0x1a, 0xc4, 0x59, 0xbe, 0x84,
- 0xe2, 0xf6, 0x91, 0x6a, 0x39, 0xde, 0xd8, 0x34, 0xf5, 0x75, 0xcb, 0xe7,
- 0x5b, 0x0b, 0xe6, 0x84, 0x00, 0x3a, 0x31, 0xf3, 0x58, 0x17, 0xda, 0xe9,
- 0x2f, 0xb6, 0xb4, 0x1a, 0x49, 0x8d, 0xfb, 0x18, 0x99, 0x97, 0xbd, 0x2a,
- 0x3c, 0xce, 0xba, 0x7a, 0x82, 0x08, 0x7c, 0x04, 0x63, 0x0d, 0x79, 0x0d,
- 0xe0, 0x8f, 0x71, 0xfd, 0x26, 0x0f, 0xf0, 0xb9, 0x10, 0x9f, 0x7a, 0xfe,
- 0x64, 0xd0, 0x6e, 0xfb, 0x11, 0x25, 0xdd, 0x87, 0x9c, 0x1a, 0x57, 0x16,
- 0x27, 0x85, 0xc0, 0xc9, 0x2c, 0x72, 0x86, 0x96, 0x0d, 0x66, 0xd7, 0x6b,
- 0xc1, 0xcd, 0x43, 0xe0, 0x39, 0x83, 0x80, 0x8b, 0x8c, 0x5c, 0x36, 0xa2,
- 0x91, 0x2c, 0xfe, 0xc8, 0x4a, 0x72, 0x79, 0x23, 0x17, 0x4f, 0xb3, 0xe1,
- 0x3d, 0xe6, 0x69, 0xe3, 0xb6, 0x06, 0x5a, 0x96, 0xa4, 0x59, 0x36, 0x16,
- 0x4b, 0x28, 0x04, 0xb7, 0x9b, 0x41, 0x53, 0x64, 0xa4, 0x6a, 0xe4, 0x8d,
- 0x50, 0x2a, 0xe4, 0xaf, 0xb3, 0x12, 0x80, 0xb0, 0xdf, 0xcb, 0x4a, 0x6d,
- 0x48, 0x4f, 0x15, 0xb3, 0x6d, 0x21, 0x8c, 0x47, 0x23, 0xda, 0xde, 0x28,
- 0x21, 0x88, 0x1a, 0x3c, 0x57, 0x78, 0x61, 0x25, 0x5b, 0x51, 0x70, 0x0d,
- 0xe3, 0x85, 0xb8, 0x50, 0x06, 0xc4, 0x5a, 0x67, 0x85, 0x6b, 0x71, 0x77,
- 0x91, 0x1c, 0x31, 0x08, 0x60, 0x54, 0x83, 0x38, 0x7e, 0x2d, 0x11, 0x9c,
- 0x5a, 0x01, 0x83, 0x11, 0x8a, 0x9c, 0xff, 0x35, 0x1b, 0xa9, 0x94, 0xc4,
- 0x37, 0x7d, 0x1b, 0x72, 0xed, 0x15, 0xa2, 0xc3, 0x49, 0x6d, 0x8f, 0x26,
- 0x4b, 0x71, 0x12, 0xf2, 0x80, 0xe6, 0x49, 0xc9, 0x0a, 0x2c, 0x62, 0xc7,
- 0x45, 0xcf, 0xa0, 0xd3, 0x24, 0xd8, 0x8e, 0x88, 0x69, 0x95, 0x98, 0xc2,
- 0x06, 0x68, 0x9c, 0xab, 0xec, 0xa4, 0x72, 0x34, 0x16, 0x87, 0x5d, 0x61,
- 0x6b, 0x64, 0x80, 0x5f, 0x4f, 0x19, 0x7e, 0x83, 0xdd, 0x98, 0x37, 0xa3,
- 0xf6, 0xde, 0xe0, 0xc3, 0x01, 0x57, 0xac, 0xe4, 0x18, 0x6a, 0x71, 0x4f,
- 0x2c, 0x35, 0xb5, 0x4f, 0x8a, 0x21, 0xfb, 0x56, 0xe6, 0xdb, 0x5c, 0x9e,
- 0xb8, 0xcc, 0xc7, 0x8d, 0x46, 0x6e, 0x7d, 0xa6, 0x5b, 0x81, 0x00, 0x0b,
- 0x6c, 0xd9, 0x00, 0x0f, 0x13, 0xf3, 0x78, 0xaf, 0xbf, 0x64, 0xce, 0x8f,
- 0xb3, 0x15, 0x3a, 0x44, 0x5a, 0xcc, 0xf5, 0xdd, 0xc2, 0xf9, 0x17, 0x54,
- 0xb5, 0xe5, 0x9d, 0x00, 0xf4, 0x56, 0x5b, 0x1d, 0x65, 0x87, 0x27, 0xbb,
- 0x5a, 0x34, 0x82, 0x27, 0x24, 0x0c, 0x5a, 0x96, 0xee, 0x4a, 0x0a, 0x54,
- 0x99, 0xdf, 0xca, 0xcb, 0xda, 0xae, 0x86, 0x55, 0x28, 0x6b, 0x08, 0x38,
- 0x4a, 0xcb, 0xe8, 0x1a, 0xf5, 0xaa, 0x59, 0xc4, 0xc4, 0x1c, 0x37, 0x9f,
- 0x6e, 0x41, 0xa9, 0x2e, 0x17, 0x9b, 0xbb, 0x5b, 0x82, 0xbb, 0xa6, 0xa9,
- 0xfc, 0x16, 0xbe, 0xd1, 0xe6, 0x3d, 0xf4, 0xf5, 0xaf, 0x82, 0xda, 0xaa,
- 0xcc, 0x3b, 0x00, 0x09, 0x8b, 0xf8, 0xcd, 0x2b, 0x39, 0x14, 0x78, 0xdc,
- 0x34, 0x7a, 0x36, 0x42, 0xb6, 0x70, 0x46, 0xc9, 0x6a, 0x5b, 0xb0, 0x9f,
- 0xa6, 0x10, 0xc8, 0xf5, 0xcd, 0xb4, 0x0c, 0x33, 0xf8, 0x38, 0xbf, 0x59,
- 0x2a, 0x89, 0xd0, 0xea, 0x4d, 0x27, 0x7d, 0x90, 0xf1, 0x75, 0x9e, 0x35,
- 0x11, 0xc2, 0xd8, 0xc9, 0xce, 0x6b, 0xb0, 0x65, 0xae, 0xd0, 0xd6, 0x4a,
- 0x19, 0x1d, 0x76, 0x29, 0x76, 0xc2, 0x3a, 0x68, 0xe6, 0xb5, 0xac, 0x1b,
- 0x86, 0x2a, 0x5b, 0xda, 0xa0, 0xf7, 0x83, 0xe8, 0x6f, 0xcb, 0x74, 0x7c,
- 0x8b, 0xbd, 0x45, 0xf8, 0x13, 0x3c, 0x54, 0x89, 0x93, 0x5b, 0xe9, 0x7a,
- 0x60, 0xc9, 0x5c, 0x2a, 0x62, 0xb1, 0xfe, 0x09, 0x31, 0xc5, 0xa8, 0xac,
- 0xa5, 0x4a, 0x0d, 0x9f, 0x55, 0xa7, 0x57, 0x00, 0x25, 0x4a, 0x4e, 0xa0,
- 0x5a, 0x60, 0x44, 0x1b, 0x99, 0x64, 0x1c, 0x21, 0xcb, 0x8e, 0x16, 0xa1,
- 0x82, 0x75, 0xd8, 0xec, 0xdd, 0xd9, 0x8a, 0xb3, 0xd0, 0xbb, 0x15, 0xd2,
- 0x8b, 0xba, 0xc4, 0xb3, 0xe8, 0x9e, 0xe8, 0xda, 0xfa, 0xd6, 0x1c, 0xf2,
- 0x4d, 0xb4, 0xeb, 0x35, 0x5d, 0x0b, 0x69, 0x4b, 0x17, 0xbe, 0x75, 0x69,
- 0x3c, 0xb8, 0x6b, 0x31, 0xd7, 0xbe, 0xf9, 0xde, 0x6b, 0x6d, 0x7f, 0xab,
- 0x6b, 0xe6, 0x31, 0x1b, 0xf0, 0xb8, 0xd5, 0x7a, 0xf6, 0x9c, 0x44, 0xec,
- 0xae, 0xbc, 0x12, 0xb6, 0x78, 0xcb, 0xa2, 0x99, 0xe0, 0xe7, 0x2a, 0xb0,
- 0xf1, 0x84, 0x99, 0x6e, 0xd8, 0xda, 0x13, 0x5b, 0x6d, 0x19, 0xe1, 0x64,
- 0xf2, 0xba, 0x36, 0xcb, 0x74, 0x39, 0xa8, 0x0c, 0x56, 0x43, 0xdc, 0xd6,
- 0xa4, 0x2d, 0x59, 0x25, 0xf8, 0xa8, 0x12, 0x0f, 0xd7, 0x52, 0x0c, 0x3e,
- 0xa9, 0x3e, 0xd1, 0x9e, 0xbe, 0xcc, 0xea, 0xc3, 0x24, 0xe1, 0x48, 0x23,
- 0x89, 0x7f, 0x7a, 0x93, 0x8e, 0xf3, 0xac, 0xc8, 0xae, 0xe4, 0x56, 0xf7,
- 0xb8, 0x99, 0x6a, 0x70, 0xe2, 0xf4, 0xe2, 0x98, 0x9d, 0xbb, 0x4d, 0x7e,
- 0xa1, 0xe5, 0xf8, 0xd8, 0xf2, 0x8b, 0x80, 0x42, 0xba, 0xb4, 0x67, 0x44,
- 0xeb, 0xcc, 0x45, 0xd8, 0x12, 0x5c, 0x8a, 0x21, 0x3c, 0x8e, 0x9c, 0x5b,
- 0x87, 0xcf, 0xb9, 0x85, 0x4c, 0x3e, 0x7b, 0x5c, 0x93, 0xe6, 0xad, 0xd0,
- 0x2a, 0x2e, 0x66, 0xbd, 0x9d, 0x68, 0x65, 0x1d, 0xc5, 0x44, 0x12, 0xe5,
- 0xc7, 0x5e, 0x6b, 0x1f, 0x9d, 0x29, 0x30, 0xc0, 0x2f, 0x87, 0xd1, 0x38,
- 0xac, 0x98, 0xc8, 0x81, 0x80, 0x27, 0xc7, 0x97, 0xaf, 0xa3, 0x49, 0x1e,
- 0xd3, 0xf4, 0xf1, 0x6f, 0x9f, 0x74, 0x80, 0x9f, 0xe3, 0x46, 0x16, 0x70,
- 0xb1, 0xe0, 0x4d, 0xea, 0xb3, 0xe7, 0xb1, 0xbf, 0xf3, 0x74, 0x50, 0x3e,
- 0xb4, 0x46, 0x0a, 0x86, 0xd6, 0x4b, 0xad, 0xac, 0xe1, 0xb7, 0x4b, 0x13,
- 0x3c, 0x73, 0xc4, 0xcc, 0x3e, 0xac, 0x1a, 0x20, 0x87, 0x6d, 0xa0, 0xc0,
- 0xa8, 0x57, 0xdc, 0xc7, 0xf3, 0x9e, 0x4a, 0x3e, 0x36, 0xec, 0xb2, 0x35,
- 0xea, 0x52, 0x02, 0x2d, 0xab, 0xa1, 0x94, 0x4d, 0x3d, 0xa4, 0x35, 0xb0,
- 0xd2, 0xe2, 0x2a, 0xdb, 0xe2, 0x28, 0xed, 0xe3, 0x35, 0xe8, 0x89, 0x45,
- 0x95, 0x30, 0xdb, 0xb5, 0x78, 0x5f, 0x5b, 0xa6, 0x86, 0xa1, 0x81, 0x18,
- 0x36, 0x50, 0x81, 0x45, 0x58, 0x93, 0xf4, 0xcb, 0x76, 0xa3, 0xfe, 0x52,
- 0xd3, 0x61, 0xdb, 0x93, 0x84, 0xac, 0x10, 0xb4, 0x61, 0xbb, 0xd5, 0x48,
- 0x0c, 0x52, 0xaa, 0xb9, 0x1e, 0x07, 0x52, 0x3b, 0x57, 0xc2, 0xcf, 0xea,
- 0x1c, 0xad, 0xbf, 0x8c, 0xa2, 0xfd, 0xae, 0x10, 0x79, 0x32, 0xe7, 0x9a,
- 0x1a, 0x42, 0xda, 0xb8, 0xbd, 0x1d, 0x1f, 0xac, 0x32, 0x3c, 0x97, 0xcc,
- 0xd2, 0x5f, 0xb6, 0x8f, 0x2e, 0xce, 0x13, 0xbe, 0x9c, 0x24, 0x04, 0x52,
- 0x4b, 0x88, 0x0d, 0xfe, 0x1d, 0x88, 0xdb, 0x55, 0x7c, 0x05, 0xcf, 0x87,
- 0xde, 0x6e, 0x23, 0x48, 0x7f, 0xb4, 0xe4, 0xef, 0x5a, 0x2b, 0x75, 0x2b,
- 0x33, 0x94, 0x27, 0xd4, 0x29, 0x1b, 0xb8, 0x56, 0x0b, 0x0e, 0x94, 0x9b,
- 0x31, 0x72, 0xb0, 0x99, 0xdc, 0x59, 0xfa, 0x63, 0xfd, 0xb8, 0x4e, 0x13,
- 0x4b, 0xe1, 0x1d, 0xa1, 0x10, 0x51, 0x33, 0xbb, 0x4b, 0x1f, 0xb0, 0x33,
- 0x49, 0xe3, 0xda, 0x7a, 0xd4, 0xe6, 0xa0, 0x46, 0x03, 0x2e, 0x81, 0x4b,
- 0x85, 0x7e, 0x81, 0x32, 0x50, 0x6b, 0x83, 0x36, 0xe2, 0xd0, 0xd8, 0x19,
- 0x36, 0xe3, 0x66, 0x49, 0x02, 0x69, 0xaf, 0xc5, 0x6a, 0x6e, 0x86, 0xdc,
- 0x14, 0x85, 0x30, 0x62, 0xa4, 0xe0, 0x5b, 0x96, 0x96, 0xbc, 0xce, 0x99,
- 0xde, 0x77, 0x40, 0x3b, 0xb4, 0x52, 0x46, 0x8f, 0x14, 0xe8, 0x12, 0xab,
- 0x91, 0x56, 0x98, 0xc7, 0xa8, 0xdc, 0x02, 0x3e, 0x1e, 0x76, 0x67, 0x50,
- 0xf8, 0x62, 0xf7, 0xbc, 0x86, 0x0d, 0x36, 0x88, 0x2f, 0x73, 0x19, 0x80,
- 0xec, 0x9f, 0x54, 0xb3, 0x5b, 0x83, 0x89, 0x48, 0x65, 0x11, 0x62, 0x22,
- 0xd2, 0xa7, 0x70, 0x26, 0x0f, 0x76, 0xd1, 0x32, 0x92, 0x6a, 0xa6, 0xc6,
- 0x63, 0x74, 0xb0, 0x14, 0xdb, 0x84, 0xcf, 0xea, 0xe0, 0x94, 0x76, 0x18,
- 0x4e, 0xd5, 0x58, 0x7b, 0x79, 0x78, 0x1e, 0xd8, 0xc2, 0x49, 0x85, 0x2b,
- 0x9a, 0x29, 0x4d, 0x2e, 0xca, 0x0c, 0xc1, 0x3a, 0x73, 0xd7, 0xfa, 0xec,
- 0xdf, 0xb8, 0x36, 0x7e, 0x06, 0xc1, 0xf2, 0xb8, 0x0f, 0x6b, 0x4b, 0xa3,
- 0xf9, 0x7b, 0xe9, 0xa4, 0x35, 0x8b, 0x42, 0x17, 0xc8, 0x70, 0xb8, 0x75,
- 0x89, 0x38, 0x6b, 0xcc, 0xd2, 0x24, 0x4f, 0x8e, 0x68, 0x30, 0x2c, 0xdc,
- 0x5c, 0x13, 0xf9, 0x7c, 0xe9, 0x73, 0xba, 0x9a, 0x52, 0x59, 0x90, 0x09,
- 0x0e, 0x37, 0x07, 0x6a, 0x37, 0x79, 0x63, 0x1d, 0xb7, 0x92, 0x84, 0xb8,
- 0x1d, 0xe2, 0x37, 0xd6, 0x2c, 0xd2, 0xf6, 0x3c, 0x79, 0x14, 0x57, 0xe7,
- 0xc0, 0x90, 0x9b, 0xa5, 0x80, 0x79, 0x69, 0xee, 0x9a, 0xc3, 0x6a, 0xcf,
- 0x13, 0x64, 0x00, 0xf2, 0x80, 0x83, 0x11, 0x17, 0x2d, 0xb7, 0x13, 0x72,
- 0xa2, 0x92, 0x99, 0xba, 0xb5, 0x46, 0x79, 0x76, 0x4b, 0x27, 0x84, 0xdf,
- 0x83, 0x30, 0xca, 0x6b, 0x2f, 0x87, 0xdc, 0x4c, 0x59, 0x74, 0x0c, 0x14,
- 0xee, 0xb5, 0x69, 0x98, 0x33, 0xbc, 0x6b, 0x4d, 0xa4, 0xf1, 0x87, 0x45,
- 0x80, 0xa6, 0x10, 0x06, 0x68, 0x17, 0x28, 0xae, 0x1e, 0xae, 0x80, 0x04,
- 0xb7, 0xbc, 0x18, 0x5c, 0x1a, 0x1a, 0x69, 0x03, 0x9a, 0xf7, 0x37, 0xa7,
- 0x21, 0x47, 0x16, 0x21, 0x0d, 0xb5, 0xec, 0x79, 0x85, 0x98, 0x44, 0x12,
- 0x78, 0x49, 0x54, 0x25, 0x77, 0x3c, 0xbb, 0xfd, 0xea, 0xca, 0x3f, 0xa0,
- 0x4e, 0xfb, 0x3e, 0x64, 0x5d, 0x5c, 0x83, 0x57, 0x6a, 0x08, 0x15, 0xa3,
- 0xe3, 0xc4, 0xa3, 0xc8, 0xc7, 0x22, 0x5e, 0xf4, 0x50, 0x06, 0x92, 0x75,
- 0xdd, 0xe6, 0xed, 0xee, 0x53, 0x6a, 0x54, 0x5d, 0x81, 0xa3, 0x82, 0xf7,
- 0x07, 0x19, 0xaa, 0x69, 0x50, 0x43, 0xe6, 0x8f, 0x61, 0x90, 0x74, 0x9b,
- 0xd1, 0x12, 0xc8, 0x06, 0x49, 0xe1, 0x4d, 0xb3, 0x12, 0x17, 0xe3, 0x72,
- 0xd8, 0x18, 0x1b, 0x25, 0xe4, 0x19, 0x18, 0xdc, 0x20, 0x3a, 0x66, 0x3b,
- 0x6b, 0x8b, 0xf2, 0x90, 0xba, 0x5a, 0x87, 0x52, 0x32, 0x3c, 0x55, 0xec,
- 0x04, 0x89, 0xbe, 0x56, 0x6d, 0x8c, 0xeb, 0x84, 0x21, 0x5b, 0xcf, 0xa5,
- 0x48, 0x48, 0xe9, 0xb6, 0x36, 0x45, 0xaa, 0x28, 0x25, 0x91, 0x5d, 0xe3,
- 0x1d, 0xed, 0x03, 0x07, 0x95, 0xf5, 0xda, 0xdb, 0xfb, 0x7b, 0x91, 0xb8,
- 0x2c, 0xa1, 0x67, 0x08, 0xc0, 0x4b, 0xdb, 0x64, 0xa3, 0xe0, 0xb1, 0xf0,
- 0x95, 0xfd, 0xcf, 0x76, 0x2c, 0x22, 0x8b, 0x33, 0xd8, 0xc3, 0x67, 0x90,
- 0xd0, 0xdd, 0xbc, 0x67, 0x90, 0xe8, 0x9e, 0x95, 0xee, 0xc9, 0x3a, 0x34,
- 0xeb, 0x8b, 0xc1, 0xd3, 0x8a, 0x79, 0x77, 0x5e, 0x4e, 0x67, 0x0e, 0x1a,
- 0xc8, 0x74, 0x82, 0xb7, 0x97, 0xa7, 0x6f, 0xa2, 0x86, 0x2e, 0x20, 0x5a,
- 0x68, 0xdb, 0x77, 0xff, 0x8a, 0x52, 0x40, 0x5f, 0x9c, 0x9c, 0x0c, 0xa1,
- 0x12, 0xa8, 0xa3, 0xba, 0x11, 0x70, 0x51, 0x0a, 0xf9, 0xb0, 0x58, 0x95,
- 0xa7, 0xa4, 0xd2, 0x93, 0x0c, 0x49, 0xbf, 0x97, 0xd9, 0x38, 0x9b, 0x72,
- 0x32, 0x21, 0xbf, 0x93, 0x68, 0xa9, 0x78, 0x5c, 0xef, 0x0c, 0x5d, 0x36,
- 0x05, 0x57, 0x22, 0x4d, 0xbc, 0x11, 0x30, 0xb3, 0xd0, 0x90, 0x63, 0xc7,
- 0x52, 0x14, 0xf1, 0x8a, 0xef, 0x0a, 0x2e, 0x50, 0x39, 0xd1, 0x9b, 0x26,
- 0x05, 0xde, 0x37, 0x0b, 0x9a, 0x6a, 0xe3, 0xb8, 0x4d, 0x11, 0xf5, 0xd7,
- 0x48, 0xe5, 0xd4, 0x9a, 0x55, 0x35, 0x25, 0x7f, 0x3e, 0xc9, 0x72, 0xb8,
- 0xed, 0x02, 0x94, 0x18, 0x40, 0x9b, 0x2d, 0x11, 0x14, 0x03, 0xae, 0xb9,
- 0x6a, 0x1e, 0xa5, 0xfb, 0x9b, 0x4c, 0x43, 0x7d, 0x65, 0xa5, 0x99, 0x31,
- 0x49, 0x1c, 0x04, 0xdc, 0x73, 0x02, 0x30, 0x22, 0x38, 0x85, 0x8e, 0x93,
- 0x04, 0xbb, 0xd1, 0xe6, 0x5e, 0x73, 0x55, 0xe2, 0x24, 0xd3, 0xaa, 0x27,
- 0xf6, 0x4d, 0xda, 0x9c, 0xa3, 0xf4, 0x7a, 0x0d, 0xfe, 0x56, 0x9b, 0xd2,
- 0xc1, 0xa3, 0x71, 0xfa, 0x46, 0xbb, 0xba, 0xd1, 0x1a, 0x1d, 0x5c, 0xd1,
- 0x37, 0x88, 0xda, 0x7e, 0x41, 0x86, 0x97, 0xaf, 0x58, 0x2a, 0xda, 0x86,
- 0xa8, 0x1b, 0xb8, 0xf8, 0x4c, 0xd7, 0x78, 0xd7, 0x70, 0x68, 0x3d, 0xa6,
- 0x52, 0x54, 0x53, 0xb3, 0x78, 0x4a, 0xff, 0xa3, 0xd2, 0x71, 0x46, 0x23,
- 0x55, 0x29, 0xb2, 0x35, 0x84, 0xf3, 0x3b, 0xa4, 0x7d, 0x98, 0x9c, 0x99,
- 0xe9, 0x43, 0x21, 0x1a, 0x55, 0x51, 0x4e, 0x32, 0x06, 0x17, 0xb1, 0xa0,
- 0xa4, 0xdc, 0x2e, 0xf3, 0xbf, 0xff, 0xa3, 0xe9, 0xa7, 0xfe, 0xf1, 0x27,
- 0xd8, 0x87, 0x10, 0x5e, 0xeb, 0x7c, 0x28, 0x46, 0x46, 0x85, 0xc7, 0x16,
- 0xe4, 0x1d, 0xe3, 0x5c, 0x16, 0x9d, 0xa1, 0x55, 0x06, 0xaf, 0xab, 0x30,
- 0x16, 0x99, 0x66, 0x89, 0x07, 0x3a, 0x3a, 0xbb, 0x08, 0x80, 0xf7, 0x12,
- 0xd4, 0xf1, 0x0d, 0x8a, 0x07, 0x48, 0xc4, 0xf4, 0x3a, 0xc4, 0x25, 0x8b,
- 0x47, 0x57, 0x30, 0x1f, 0x0b, 0x2b, 0xe7, 0x40, 0x60, 0xb1, 0x9f, 0x63,
- 0x06, 0x7c, 0xd1, 0xc0, 0x19, 0x98, 0xce, 0x9b, 0x68, 0x20, 0xb2, 0xd1,
- 0x1a, 0xd3, 0xfb, 0x77, 0x3a, 0x65, 0xbd, 0xf2, 0x3e, 0xfb, 0xc7, 0x80,
- 0xbd, 0x6a, 0xe0, 0xc4, 0xfd, 0x4c, 0xc0, 0x43, 0xdf, 0x7f, 0xb2, 0xcb,
- 0x7a, 0x77, 0xa7, 0x09, 0x99, 0x8a, 0x45, 0xb0, 0x4d, 0x77, 0x51, 0xfa,
- 0x6b, 0xc0, 0x47, 0xaa, 0xdd, 0x71, 0x2f, 0x3d, 0xbe, 0x14, 0xfe, 0x31,
- 0xe0, 0x7f, 0x7f, 0xdc, 0xed, 0x3f, 0xfb, 0xc9, 0xf5, 0xfa, 0xc9, 0xee,
- 0xfb, 0x4f, 0xf6, 0x3a, 0x6d, 0xa8, 0xaa, 0x6c, 0x99, 0x58, 0x1a, 0x12,
- 0xa6, 0xe9, 0x73, 0x5a, 0x3b, 0x54, 0x1c, 0x5d, 0x6a, 0xf9, 0xf1, 0x68,
- 0x6b, 0x00, 0x7f, 0x6c, 0x71, 0x22, 0xb2, 0xda, 0xd2, 0x9e, 0x69, 0xaf,
- 0x10, 0xb6, 0x62, 0x09, 0xf7, 0xa5, 0x00, 0x03, 0xed, 0x56, 0x2b, 0xe3,
- 0xc1, 0xb2, 0x8d, 0x60, 0x1b, 0xb5, 0x19, 0x36, 0xcc, 0x93, 0x1c, 0xf4,
- 0x33, 0x59, 0xd1, 0xc5, 0x27, 0x60, 0x17, 0x2e, 0xab, 0xd7, 0x44, 0x49,
- 0xab, 0x29, 0x2a, 0xf9, 0x43, 0x9b, 0xb1, 0x15, 0x13, 0x8b, 0x90, 0x6a,
- 0xb2, 0xd5, 0xa6, 0xd0, 0x78, 0x1d, 0xc2, 0xd3, 0xfc, 0x28, 0x71, 0xf5,
- 0x45, 0x95, 0xd8, 0xfd, 0xf9, 0xa9, 0x41, 0x4e, 0xb4, 0x9e, 0x9e, 0xa0,
- 0xa9, 0x58, 0x67, 0x14, 0xd4, 0x7a, 0x56, 0x90, 0x59, 0x87, 0xe4, 0x84,
- 0xaf, 0xee, 0x81, 0x2b, 0xdd, 0x00, 0x4a, 0x42, 0x2a, 0x96, 0x73, 0xf7,
- 0x84, 0x60, 0x5e, 0xe1, 0xcb, 0x2e, 0x5c, 0x43, 0xb2, 0xed, 0x88, 0xa6,
- 0x51, 0xcf, 0x68, 0x59, 0x36, 0x93, 0xec, 0x07, 0x5b, 0xad, 0xa1, 0xa6,
- 0x06, 0x2a, 0xe5, 0x63, 0x76, 0xa3, 0x20, 0xc8, 0x29, 0x2a, 0x04, 0xb6,
- 0x93, 0x01, 0xc4, 0x05, 0xf1, 0x22, 0xf1, 0x86, 0x81, 0x46, 0x30, 0xa7,
- 0x16, 0xdb, 0xeb, 0x39, 0x1c, 0x98, 0x64, 0x5a, 0x24, 0x83, 0x7f, 0x2b,
- 0xf9, 0x55, 0xb6, 0xa8, 0x1f, 0x37, 0x3c, 0x80, 0x15, 0xf6, 0x2f, 0x61,
- 0x1f, 0xd5, 0x2a, 0x7c, 0x52, 0x59, 0xc0, 0x95, 0xb9, 0x73, 0x93, 0x2a,
- 0x84, 0x3c, 0x1a, 0x59, 0x12, 0xb1, 0xd9, 0xa5, 0x24, 0x6d, 0xb4, 0x01,
- 0x4c, 0x82, 0x14, 0x52, 0xe7, 0x92, 0x80, 0x77, 0x3e, 0x93, 0xe4, 0x2e,
- 0x96, 0x6f, 0x9b, 0x60, 0x78, 0xee, 0x26, 0xac, 0xe8, 0xdb, 0x52, 0x4d,
- 0x5c, 0x99, 0xdd, 0x18, 0xdc, 0x49, 0x6a, 0x35, 0x54, 0xe7, 0xdb, 0xa2,
- 0x81, 0xb9, 0xd2, 0xa2, 0x4b, 0x27, 0x1f, 0x48, 0x46, 0x25, 0xb4, 0xa4,
- 0x4e, 0x9f, 0x63, 0x65, 0x3a, 0x02, 0x49, 0x0b, 0xe5, 0x30, 0x68, 0xee,
- 0x51, 0xf0, 0xae, 0x17, 0x55, 0xd7, 0x30, 0x5b, 0x8d, 0xa2, 0x97, 0x8b,
- 0x9b, 0x9c, 0x64, 0x9a, 0x47, 0x40, 0x08, 0xe8, 0x29, 0x79, 0xc6, 0x31,
- 0xda, 0x85, 0x4f, 0xda, 0xff, 0x0d, 0xb3, 0xe1, 0x39, 0xb0, 0xfe, 0xc9,
- 0xce, 0x6e, 0xa3, 0x0a, 0x89, 0x2f, 0x3c, 0xae, 0xba, 0x23, 0x2f, 0x31,
- 0x2d, 0xce, 0xc5, 0xeb, 0xc3, 0x28, 0xda, 0x7b, 0xbe, 0xfb, 0x7c, 0x7b,
- 0x77, 0x67, 0xf0, 0x64, 0xb0, 0x17, 0x39, 0xd3, 0x38, 0xc9, 0xea, 0x5c,
- 0xe6, 0x07, 0xa1, 0x35, 0xed, 0xd1, 0x28, 0xac, 0xf0, 0x51, 0x63, 0x1c,
- 0x37, 0xe3, 0x3e, 0x81, 0xf1, 0xc5, 0x5f, 0xe1, 0x31, 0x07, 0xce, 0xb8,
- 0xc8, 0x0c, 0xb3, 0x7d, 0x37, 0x9c, 0xd5, 0xf3, 0x3e, 0xc6, 0xa1, 0x42,
- 0xdf, 0x52, 0xd0, 0x94, 0xa3, 0xe5, 0x28, 0x25, 0xa1, 0xa5, 0xe4, 0x22,
- 0x78, 0xac, 0x41, 0x90, 0x28, 0x6b, 0x58, 0x3d, 0x3d, 0x8e, 0x05, 0x74,
- 0x55, 0x12, 0xdb, 0x03, 0x14, 0x4d, 0x56, 0x09, 0x0c, 0x17, 0x88, 0x54,
- 0x4d, 0x35, 0x17, 0x17, 0xc0, 0x2b, 0x74, 0xe3, 0x4b, 0xd9, 0x99, 0xaf,
- 0x5d, 0x36, 0x70, 0xdc, 0x1a, 0xe7, 0x09, 0xac, 0x4e, 0xaf, 0xfd, 0x72,
- 0x51, 0x29, 0x0e, 0x39, 0xf2, 0x70, 0x24, 0xfa, 0x81, 0x10, 0xab, 0x88,
- 0x82, 0x98, 0x77, 0x1b, 0x74, 0x5a, 0xea, 0x6a, 0x25, 0xf8, 0x1d, 0x57,
- 0x34, 0x0f, 0xf6, 0xee, 0x8a, 0x8e, 0x27, 0x46, 0x65, 0x14, 0xc7, 0x7e,
- 0x2c, 0xc0, 0xf0, 0x11, 0x9c, 0x39, 0xa1, 0x85, 0xbd, 0xff, 0x2f, 0xd1,
- 0xc2, 0xde, 0xff, 0x4f, 0x0b, 0xff, 0x26, 0x5a, 0x78, 0x51, 0xa3, 0x05,
- 0xd6, 0xec, 0x88, 0x6f, 0xa9, 0x82, 0xd7, 0x44, 0xe2, 0x11, 0xaa, 0x08,
- 0xc8, 0xc2, 0xd7, 0x8f, 0x63, 0xfd, 0x5e, 0x60, 0x42, 0xf4, 0x65, 0x85,
- 0x0e, 0x42, 0x45, 0x3b, 0x8d, 0x83, 0x6c, 0x22, 0x69, 0x72, 0xc1, 0x3e,
- 0xf6, 0xc3, 0x9f, 0xbb, 0xb7, 0x58, 0x8c, 0xe6, 0xcf, 0x96, 0x62, 0x1c,
- 0x49, 0xae, 0xb0, 0x0b, 0xf0, 0xed, 0xf6, 0xf0, 0x25, 0xc2, 0xaf, 0x39,
- 0xe3, 0xbe, 0xc1, 0xdf, 0x61, 0x4f, 0x31, 0x9d, 0x1d, 0xed, 0x48, 0xcd,
- 0x5f, 0x1b, 0x92, 0x96, 0x68, 0xc8, 0xa3, 0x2e, 0x5d, 0x05, 0x8c, 0xb6,
- 0xe1, 0x53, 0x79, 0x5b, 0xca, 0x38, 0x5f, 0xa5, 0x0f, 0xa2, 0xcf, 0xfe,
- 0x9c, 0xe4, 0x59, 0x64, 0xfe, 0x26, 0x0d, 0xa5, 0x03, 0x7c, 0x94, 0xa5,
- 0xc4, 0xfb, 0x0f, 0xb9, 0xd7, 0x86, 0x88, 0xfa, 0x27, 0xa0, 0xfa, 0x49,
- 0xf4, 0x24, 0xc7, 0x84, 0xd9, 0x68, 0x98, 0x06, 0x26, 0x93, 0xd4, 0x84,
- 0x3f, 0xbf, 0x70, 0x56, 0x66, 0x0f, 0xae, 0xec, 0xb2, 0xa5, 0xa2, 0x2c,
- 0xaf, 0xcc, 0x66, 0xd9, 0x52, 0x34, 0x37, 0xbd, 0x92, 0x6c, 0x0a, 0x19,
- 0x8e, 0xcb, 0x0a, 0x6e, 0x08, 0x1d, 0xfd, 0x28, 0x3a, 0x4a, 0xe6, 0x2b,
- 0xb3, 0xcd, 0x78, 0x8d, 0x5e, 0x2a, 0x33, 0x41, 0xc6, 0x29, 0xbd, 0xcb,
- 0xc3, 0x4c, 0x54, 0x6e, 0x88, 0xcd, 0x21, 0x55, 0xc7, 0x5c, 0xb6, 0xb8,
- 0x3e, 0x5e, 0xb9, 0x65, 0xc8, 0x44, 0x98, 0x0b, 0xd7, 0x62, 0x13, 0x00,
- 0x00, 0x26, 0xbe, 0xa2, 0x3f, 0x6b, 0xf1, 0xd1, 0x65, 0xd8, 0x82, 0xde,
- 0x2b, 0x1e, 0x9c, 0x62, 0x39, 0xfa, 0x2b, 0x58, 0x14, 0x13, 0x26, 0xd7,
- 0xad, 0xe1, 0x33, 0x18, 0xa2, 0xde, 0x71, 0xad, 0x83, 0xe5, 0x48, 0x50,
- 0x0e, 0xca, 0x66, 0x73, 0xf4, 0x21, 0x04, 0x6b, 0x97, 0x01, 0xaf, 0x74,
- 0x16, 0xd8, 0xe9, 0x1a, 0x93, 0x0a, 0xcc, 0x4d, 0x8d, 0x7d, 0xb7, 0xf3,
- 0xc4, 0x55, 0x92, 0x0a, 0x35, 0x2c, 0x84, 0x9b, 0xe5, 0x56, 0x53, 0x1c,
- 0xd5, 0xce, 0xac, 0xc6, 0x8f, 0xaf, 0x6d, 0x8b, 0xa8, 0xb5, 0xc7, 0xca,
- 0x4e, 0xd1, 0xfb, 0x13, 0xff, 0x68, 0xaf, 0x96, 0x5b, 0x49, 0xd0, 0x30,
- 0x1b, 0x3c, 0x3f, 0x8e, 0xa3, 0x81, 0xd7, 0xd7, 0x75, 0xf0, 0x8a, 0xbf,
- 0x95, 0x1e, 0x1e, 0x6f, 0x1b, 0xda, 0xcc, 0x2f, 0xe8, 0xe0, 0xdd, 0xdc,
- 0x22, 0xc1, 0x8c, 0xcc, 0x17, 0x2e, 0x60, 0x93, 0xa4, 0xbc, 0x7c, 0x2e,
- 0x06, 0x74, 0x91, 0x48, 0x63, 0xab, 0x1f, 0xc7, 0x79, 0x38, 0xc0, 0xfb,
- 0xaa, 0x07, 0x39, 0x30, 0x80, 0xce, 0x14, 0xfc, 0x95, 0xfe, 0xe5, 0xbd,
- 0x85, 0x76, 0x6a, 0x71, 0xd1, 0x26, 0x2d, 0x2e, 0xb2, 0x52, 0x22, 0xb4,
- 0xd9, 0x6c, 0xc9, 0xd2, 0x6d, 0xce, 0x77, 0x43, 0x0b, 0xc6, 0x91, 0x6d,
- 0x84, 0x25, 0xe9, 0x73, 0xb3, 0xdc, 0xe0, 0x72, 0x21, 0x4e, 0x50, 0x49,
- 0x58, 0xd0, 0x32, 0x0f, 0xc8, 0x60, 0x30, 0xca, 0x95, 0x9e, 0xeb, 0x86,
- 0x29, 0x98, 0x4c, 0x70, 0xd9, 0xb9, 0xf0, 0xee, 0xbb, 0x2c, 0x9d, 0xa0,
- 0x04, 0x6e, 0x9e, 0xb7, 0xe0, 0xbf, 0x7f, 0x5c, 0xbc, 0x65, 0x2f, 0xc0,
- 0x79, 0x89, 0x8b, 0xd0, 0x3d, 0xd6, 0xb4, 0x0a, 0xbb, 0xf8, 0xdf, 0x58,
- 0x42, 0xda, 0x88, 0x88, 0xe7, 0x71, 0x69, 0x47, 0xcc, 0x6f, 0x03, 0x46,
- 0x29, 0x29, 0xd7, 0xec, 0xad, 0x1b, 0x27, 0x2d, 0xf8, 0x7e, 0x50, 0x0b,
- 0xdb, 0x83, 0xb5, 0x6a, 0x11, 0x92, 0x7b, 0x8d, 0xfb, 0x44, 0x02, 0xbe,
- 0x3f, 0x7c, 0xab, 0xb4, 0x5c, 0x2a, 0x7a, 0xa7, 0x04, 0x9c, 0x51, 0x2a,
- 0xb2, 0x39, 0xf9, 0x60, 0xd0, 0x12, 0x6f, 0x66, 0x94, 0x2c, 0x21, 0x6c,
- 0xf7, 0xe1, 0xdb, 0x39, 0x0c, 0x20, 0x24, 0xca, 0x88, 0x13, 0xe0, 0x17,
- 0x4e, 0xe5, 0x61, 0xd5, 0x27, 0x85, 0x8c, 0xcd, 0x6e, 0xad, 0x13, 0xb0,
- 0x8d, 0x5e, 0x20, 0x94, 0x87, 0x88, 0x26, 0x95, 0x2c, 0xf5, 0x9a, 0x97,
- 0xda, 0x0c, 0xb4, 0x5a, 0x59, 0x77, 0x36, 0x5b, 0xd6, 0x69, 0x71, 0x6e,
- 0xb5, 0x7c, 0x45, 0x93, 0x0a, 0x6b, 0xb7, 0x9b, 0xb9, 0xdd, 0xd0, 0x02,
- 0x05, 0xc7, 0x5b, 0x12, 0x56, 0x40, 0x5b, 0xac, 0x95, 0xb6, 0xcb, 0x5e,
- 0xdb, 0x2e, 0x52, 0x3d, 0x67, 0x8c, 0x87, 0x3e, 0xf1, 0xba, 0x45, 0x2d,
- 0x61, 0xe5, 0x49, 0xdb, 0x94, 0x81, 0xa8, 0xf9, 0xe8, 0x84, 0xb9, 0xf3,
- 0xb5, 0xf1, 0xcc, 0x51, 0x38, 0x53, 0x9b, 0xd9, 0x3a, 0xeb, 0x93, 0x4c,
- 0x52, 0xe7, 0xf8, 0x4e, 0xdc, 0x9c, 0x68, 0x13, 0xca, 0x22, 0xb3, 0x19,
- 0x5e, 0x96, 0xa0, 0x2f, 0x51, 0x35, 0x1b, 0x13, 0x86, 0x0e, 0x2f, 0x29,
- 0x17, 0xf2, 0x9c, 0x1e, 0x07, 0x8f, 0x68, 0x51, 0x1f, 0xa4, 0xee, 0x0a,
- 0xe6, 0xd4, 0xb4, 0xa1, 0x16, 0xd2, 0x11, 0x0f, 0x2c, 0xad, 0x86, 0xfa,
- 0xc8, 0x1a, 0x4d, 0x60, 0xcc, 0x7d, 0x84, 0xac, 0xc3, 0x55, 0x12, 0xcb,
- 0x6f, 0x7d, 0x04, 0x52, 0xd3, 0xf7, 0x9f, 0x5c, 0x24, 0xe9, 0xbf, 0x65,
- 0x95, 0xb4, 0xaf, 0xd6, 0x4c, 0x86, 0x70, 0x99, 0x1a, 0x33, 0x5a, 0x17,
- 0xc2, 0xb4, 0x66, 0xe7, 0xd7, 0x05, 0x31, 0xd5, 0xa7, 0xd5, 0x16, 0x6a,
- 0xda, 0x3e, 0x31, 0x85, 0xfe, 0xf2, 0x03, 0x51, 0xee, 0xeb, 0xe6, 0x87,
- 0x8e, 0xeb, 0xde, 0x40, 0xf7, 0xb0, 0xa6, 0x36, 0x55, 0x48, 0xe1, 0x51,
- 0x2d, 0xc8, 0x99, 0xc8, 0x3f, 0x86, 0x39, 0xc9, 0x9c, 0xd9, 0x28, 0xff,
- 0x6b, 0xee, 0x22, 0xdc, 0x41, 0x95, 0x3d, 0x44, 0x17, 0x95, 0xa9, 0xb4,
- 0xf8, 0xc3, 0x1a, 0x9b, 0xb7, 0x3b, 0xd8, 0x01, 0xb7, 0x7d, 0x58, 0xc1,
- 0x04, 0xba, 0xcf, 0x77, 0xd7, 0x4f, 0x9f, 0x37, 0x0a, 0x59, 0xb8, 0xc2,
- 0xcf, 0x1e, 0x03, 0x56, 0x4a, 0xa7, 0xf0, 0xfb, 0x36, 0x32, 0x43, 0xae,
- 0xf2, 0x49, 0x7f, 0x1a, 0x4e, 0xb4, 0x1e, 0xd4, 0x2f, 0x2d, 0x03, 0x4c,
- 0x3f, 0xce, 0xcb, 0xc3, 0xcb, 0xbb, 0x3b, 0x9f, 0xed, 0xb4, 0xe6, 0x2e,
- 0x43, 0x84, 0x08, 0x0a, 0xd2, 0x39, 0xc4, 0x4d, 0x11, 0x4d, 0xb5, 0x2a,
- 0x6e, 0x62, 0x83, 0x53, 0xe7, 0x47, 0x6b, 0x60, 0xc6, 0x66, 0xff, 0x61,
- 0x5b, 0xd7, 0x80, 0xe5, 0xc2, 0x54, 0x03, 0xaa, 0xd5, 0x25, 0xee, 0xb2,
- 0x15, 0x0f, 0xcf, 0xde, 0xbe, 0x3d, 0x3e, 0x24, 0x55, 0xec, 0x26, 0x87,
- 0xe0, 0xe8, 0xdc, 0x98, 0x6d, 0x66, 0x51, 0x5f, 0x6a, 0x43, 0x06, 0xc0,
- 0x8b, 0x13, 0x48, 0xf0, 0xce, 0x19, 0x50, 0xe3, 0x2f, 0x2d, 0xc4, 0xb9,
- 0x3b, 0xd8, 0x0d, 0xb6, 0x6a, 0x61, 0x23, 0x2d, 0x39, 0xd1, 0x70, 0xda,
- 0x1a, 0x3f, 0x65, 0x7d, 0xca, 0x9c, 0xcd, 0xe0, 0x53, 0x9d, 0x65, 0x23,
- 0x01, 0x0f, 0x97, 0x41, 0x8b, 0xbe, 0x6c, 0x2d, 0x99, 0x72, 0x86, 0x64,
- 0x17, 0x59, 0x19, 0xcd, 0x5e, 0xc3, 0x40, 0x22, 0xb7, 0x2c, 0x0a, 0x3d,
- 0xd6, 0xb2, 0x30, 0x61, 0x01, 0x9d, 0x59, 0x02, 0x09, 0x4c, 0xf4, 0xce,
- 0xb4, 0xd4, 0xa2, 0x99, 0x00, 0xd1, 0x86, 0x7d, 0xd7, 0xc5, 0xad, 0x2b,
- 0xe8, 0x3f, 0xf5, 0xd2, 0xb8, 0xef, 0xa8, 0xd7, 0x78, 0x41, 0x1d, 0x21,
- 0x57, 0xa7, 0x10, 0x80, 0x5d, 0x77, 0x50, 0x2a, 0xdb, 0x6e, 0x5b, 0xe7,
- 0x52, 0x9d, 0x5a, 0xb2, 0x08, 0x9c, 0x13, 0xcb, 0x25, 0x81, 0xc8, 0xcb,
- 0x2a, 0x53, 0x6a, 0x56, 0x91, 0x86, 0xb1, 0x58, 0x64, 0xac, 0x32, 0x8a,
- 0x96, 0xc2, 0xd3, 0x4a, 0xf5, 0x12, 0xd8, 0x14, 0xcf, 0x85, 0x8c, 0x74,
- 0xad, 0x1c, 0x05, 0x65, 0x95, 0x43, 0xb8, 0x1c, 0x3d, 0x02, 0x40, 0xca,
- 0x76, 0x3f, 0x71, 0x24, 0x3e, 0x8a, 0x3d, 0xea, 0x42, 0xe3, 0x2c, 0xc6,
- 0x70, 0x4d, 0x75, 0x83, 0x7f, 0x3b, 0xf6, 0xe8, 0xf9, 0xb6, 0xd6, 0x56,
- 0x47, 0x3e, 0xf1, 0xba, 0xfc, 0x9c, 0xd7, 0x5a, 0x0a, 0x19, 0xfe, 0xe1,
- 0xa2, 0x76, 0x3a, 0xb4, 0xf8, 0x69, 0x96, 0x6f, 0x43, 0xc0, 0xe3, 0x12,
- 0x7c, 0x79, 0x36, 0x35, 0xe8, 0xec, 0x16, 0xd0, 0x43, 0x04, 0x1c, 0xd9,
- 0x55, 0x41, 0x4d, 0xab, 0x2d, 0x44, 0x9d, 0xb3, 0x33, 0x9f, 0x46, 0x29,
- 0xa2, 0xa3, 0x16, 0x5a, 0xb5, 0xca, 0xe7, 0x27, 0xf3, 0x06, 0x70, 0x1f,
- 0x3f, 0x01, 0x78, 0x3d, 0xe5, 0xeb, 0x38, 0x6e, 0x82, 0xa7, 0xad, 0x4c,
- 0xd1, 0x95, 0x80, 0x35, 0x42, 0x61, 0x60, 0x3b, 0xa5, 0x96, 0x06, 0xaa,
- 0x37, 0xa7, 0x38, 0x75, 0x8b, 0x80, 0x93, 0x5a, 0x1e, 0x92, 0x40, 0x8a,
- 0xe4, 0xa5, 0x61, 0x40, 0x54, 0x0a, 0xd6, 0xc6, 0xc5, 0x6d, 0xb1, 0x16,
- 0x9a, 0xbb, 0x1a, 0xed, 0x4d, 0xa3, 0x0b, 0x90, 0xfb, 0xad, 0x55, 0x81,
- 0xdc, 0x2a, 0xc3, 0x51, 0x32, 0x25, 0x56, 0x9b, 0x73, 0x5b, 0xd4, 0x80,
- 0x23, 0x6d, 0x28, 0xac, 0x0e, 0xc0, 0xbf, 0x5d, 0xf3, 0x4b, 0x07, 0x49,
- 0xd4, 0x61, 0x68, 0xff, 0x4e, 0x98, 0xf6, 0x25, 0xda, 0x88, 0x7b, 0x95,
- 0x2b, 0x71, 0xd0, 0x50, 0xdd, 0x58, 0x5b, 0x5c, 0x14, 0xc6, 0x5e, 0xd5,
- 0xb2, 0xcf, 0x5b, 0xb6, 0xf9, 0x6e, 0x9e, 0x3e, 0xe0, 0x2a, 0x68, 0xe2,
- 0x05, 0xbb, 0x79, 0x3f, 0x32, 0xaa, 0xdd, 0x17, 0x7b, 0x83, 0xdd, 0xe7,
- 0x9f, 0x0d, 0x76, 0x77, 0x06, 0xbb, 0x95, 0xd1, 0x41, 0x41, 0xe2, 0x90,
- 0xbf, 0xb0, 0x9d, 0x96, 0x4b, 0xb4, 0x2d, 0x76, 0x25, 0xec, 0x60, 0xb6,
- 0x1a, 0x04, 0x91, 0xeb, 0x8d, 0x2e, 0x34, 0xba, 0xbd, 0xc5, 0xcc, 0xe2,
- 0xfc, 0xd0, 0x4a, 0x6a, 0xd0, 0x0e, 0x9c, 0x6a, 0x16, 0x6c, 0xaa, 0x84,
- 0x37, 0x7a, 0xe3, 0x4f, 0x4b, 0x25, 0xa4, 0x20, 0x4d, 0xaa, 0x52, 0x78,
- 0xda, 0x45, 0xe4, 0xb9, 0xfe, 0xff, 0x85, 0xe3, 0xae, 0x68, 0x34, 0x1c,
- 0xf8, 0xe6, 0x8e, 0x21, 0xf4, 0x18, 0x17, 0x1d, 0x0b, 0xbe, 0x7f, 0x7e,
- 0x76, 0x71, 0xa9, 0x09, 0xda, 0xc2, 0x0e, 0xe2, 0xe2, 0x6e, 0xe0, 0xa2,
- 0xe5, 0x10, 0x9d, 0xab, 0x97, 0x4b, 0xe9, 0xa0, 0x3a, 0xac, 0xb9, 0xe3,
- 0xf3, 0x0b, 0x8f, 0xa2, 0x10, 0xdc, 0xa1, 0x68, 0xd3, 0x65, 0x0c, 0xb3,
- 0x58, 0x8b, 0xd6, 0xfa, 0xa4, 0xb2, 0x71, 0x8e, 0x08, 0x5e, 0x83, 0x9d,
- 0x97, 0x56, 0x68, 0xea, 0xc1, 0x2d, 0xf8, 0xb5, 0x3f, 0xfd, 0xc9, 0xb3,
- 0xa8, 0x21, 0xa7, 0xb4, 0x69, 0x45, 0x44, 0xd8, 0x38, 0x9f, 0x79, 0xf7,
- 0xba, 0x00, 0xc0, 0x44, 0x9d, 0xfd, 0x1f, 0x91, 0xf8, 0xf6, 0x53, 0xff,
- 0x47, 0xfa, 0xf3, 0xa7, 0x8e, 0xbb, 0x06, 0xa0, 0x50, 0x89, 0x67, 0xd1,
- 0x4d, 0x5e, 0x36, 0x08, 0x35, 0x63, 0x51, 0x7f, 0x54, 0xae, 0x02, 0xde,
- 0x2e, 0x8e, 0x87, 0xc4, 0x41, 0x14, 0x8c, 0x04, 0x0f, 0xa8, 0x13, 0x1b,
- 0x76, 0x8a, 0x14, 0x29, 0x23, 0x4a, 0x71, 0x6b, 0x89, 0x74, 0xc0, 0xd8,
- 0x20, 0x10, 0xf0, 0x62, 0xcf, 0x70, 0xc7, 0xd8, 0x49, 0x7a, 0x2f, 0x6c,
- 0x27, 0x36, 0x88, 0x15, 0xb9, 0x7f, 0x18, 0x5a, 0x53, 0x5d, 0xb8, 0xf2,
- 0xc1, 0x86, 0x4b, 0x09, 0xe7, 0x7c, 0x2c, 0x52, 0xf1, 0xb9, 0xa4, 0x94,
- 0x1a, 0x92, 0x10, 0x3c, 0x96, 0xb8, 0x80, 0xd9, 0x74, 0xce, 0x7e, 0x65,
- 0xb3, 0x3e, 0xe5, 0x69, 0x71, 0xcb, 0x33, 0x54, 0xd0, 0x82, 0x48, 0x90,
- 0x35, 0x36, 0x02, 0x45, 0x1f, 0x23, 0xb3, 0xbc, 0x5a, 0x8e, 0xd7, 0x37,
- 0x3b, 0x67, 0x70, 0x0b, 0xfc, 0xcd, 0xc8, 0x4c, 0xcb, 0x0e, 0xa9, 0x7f,
- 0x52, 0xd0, 0xf9, 0x3c, 0x5c, 0x69, 0x36, 0xaf, 0x14, 0xcb, 0x10, 0x94,
- 0x2b, 0x83, 0x72, 0x6b, 0xe4, 0x53, 0x85, 0xc0, 0x84, 0x2e, 0x15, 0x08,
- 0x41, 0x0b, 0xf1, 0xc4, 0x90, 0x0a, 0x35, 0xaf, 0x1d, 0xb4, 0x18, 0x42,
- 0x65, 0xb6, 0x60, 0x50, 0x58, 0x06, 0x92, 0x0e, 0xa2, 0x0d, 0xfe, 0xb0,
- 0x48, 0xe2, 0x9c, 0xb8, 0x17, 0xbb, 0x8a, 0x83, 0xc9, 0xfd, 0x2f, 0x6a,
- 0x16, 0x40, 0xa9, 0x0c, 0xec, 0x8b, 0x91, 0xb7, 0xdd, 0x6f, 0xdb, 0x43,
- 0xb9, 0xe4, 0x38, 0xcc, 0x1c, 0x2c, 0x3a, 0xce, 0x47, 0x69, 0x99, 0xc7,
- 0x1a, 0x65, 0xaf, 0x08, 0x21, 0x81, 0x70, 0xa1, 0x65, 0x3c, 0x86, 0xeb,
- 0x50, 0x42, 0x06, 0xd1, 0xff, 0x42, 0xa7, 0xfa, 0xb6, 0xd8, 0x2b, 0x90,
- 0x9a, 0xfa, 0xe5, 0xf1, 0xeb, 0xb3, 0x8b, 0xe3, 0x6a, 0x42, 0xa7, 0x80,
- 0x07, 0x44, 0x6d, 0x35, 0xc9, 0x36, 0x51, 0x3a, 0x59, 0x8d, 0x25, 0x56,
- 0xaa, 0x4d, 0x80, 0x08, 0xce, 0xbf, 0x3b, 0x0a, 0x4e, 0x9e, 0xc1, 0xac,
- 0x58, 0xa3, 0xbd, 0x56, 0xaf, 0x2e, 0xf8, 0xe7, 0x16, 0x8a, 0x61, 0x0b,
- 0xba, 0x83, 0x8d, 0x4f, 0xe0, 0x73, 0x50, 0xc8, 0xcb, 0x0c, 0x33, 0x08,
- 0xe4, 0x2c, 0x0a, 0x76, 0x4a, 0xb8, 0x46, 0x5b, 0x60, 0x73, 0x89, 0xd9,
- 0x4b, 0xed, 0x4b, 0x35, 0x71, 0xc4, 0x12, 0x98, 0xc0, 0xd1, 0x0a, 0x83,
- 0xa8, 0xd9, 0x91, 0xc2, 0xac, 0x48, 0x2f, 0x8d, 0x92, 0x34, 0x82, 0xc3,
- 0xc6, 0x9e, 0x5d, 0xf1, 0x60, 0x9b, 0xc2, 0xa0, 0x58, 0x3b, 0x51, 0x08,
- 0x6e, 0x23, 0x55, 0xa5, 0xad, 0x06, 0x40, 0xcb, 0xed, 0xeb, 0xd6, 0x57,
- 0x3b, 0xdf, 0x2c, 0xb6, 0x2a, 0xd5, 0xb6, 0x6d, 0xf1, 0xac, 0xa8, 0xe3,
- 0x9f, 0xba, 0xde, 0x12, 0xdf, 0x82, 0xb8, 0xe3, 0xc0, 0xd0, 0x2d, 0x05,
- 0x6f, 0x6b, 0xe0, 0x3c, 0xfe, 0xed, 0x55, 0xfc, 0xdc, 0xac, 0x01, 0x17,
- 0xd1, 0x5a, 0xce, 0x5b, 0x05, 0x04, 0x03, 0x9a, 0xb4, 0x93, 0x6c, 0xd0,
- 0x89, 0x1a, 0x18, 0x61, 0xed, 0x28, 0xe0, 0x71, 0x1b, 0xd8, 0x93, 0x4f,
- 0x2a, 0x75, 0xf5, 0x2b, 0x47, 0x0a, 0xdd, 0xfe, 0x83, 0x79, 0xc6, 0x91,
- 0xf8, 0x1e, 0x15, 0xab, 0x79, 0x09, 0xa1, 0x49, 0x92, 0x0a, 0xc7, 0x59,
- 0x9e, 0x37, 0x8d, 0x8e, 0x28, 0x76, 0xe5, 0x36, 0x0d, 0x19, 0x15, 0x17,
- 0xaf, 0x0f, 0x5f, 0x3c, 0x7b, 0x01, 0xd1, 0x0f, 0x65, 0xd5, 0x34, 0x1f,
- 0x4d, 0xa3, 0x0d, 0x11, 0xc6, 0xe9, 0x87, 0xdc, 0x60, 0x07, 0xda, 0x92,
- 0x9a, 0x01, 0x47, 0xc9, 0x54, 0xf0, 0x29, 0x86, 0x41, 0x13, 0x83, 0x56,
- 0xd3, 0x69, 0xdb, 0xed, 0xb9, 0xae, 0x3a, 0xb0, 0xdd, 0x1a, 0x18, 0x7d,
- 0x2a, 0xb1, 0x6f, 0x5a, 0x5d, 0xd4, 0xd4, 0x25, 0xd2, 0xd0, 0xe7, 0xd0,
- 0x66, 0x74, 0x13, 0x7b, 0x8e, 0xea, 0x5c, 0xd5, 0xd6, 0xa2, 0xad, 0xb9,
- 0xbf, 0x55, 0xcf, 0x73, 0xad, 0xf2, 0x04, 0x0e, 0x40, 0xa5, 0xda, 0xf8,
- 0x00, 0x1e, 0x05, 0xd6, 0x03, 0xda, 0x0c, 0x25, 0x6a, 0xc4, 0x32, 0x67,
- 0x0c, 0x87, 0x33, 0x78, 0xf2, 0x6a, 0xe9, 0xaf, 0x59, 0xbb, 0xf9, 0xe6,
- 0x3a, 0x5f, 0x48, 0xc2, 0x63, 0x1b, 0x40, 0x6d, 0x18, 0x07, 0x23, 0x8f,
- 0x1a, 0xb1, 0xa3, 0xe6, 0x06, 0xac, 0x16, 0x78, 0xf7, 0xe4, 0xc8, 0xd5,
- 0x39, 0xf7, 0xd1, 0x3c, 0xa3, 0x55, 0x7b, 0x73, 0xee, 0x31, 0x10, 0x9b,
- 0x67, 0x8a, 0xae, 0x29, 0x2f, 0x35, 0x8f, 0x2c, 0x51, 0x1e, 0xdf, 0xb5,
- 0x37, 0xa7, 0xad, 0x88, 0x32, 0x29, 0x6d, 0x58, 0xc3, 0x08, 0x54, 0xb5,
- 0x4a, 0x73, 0xbc, 0x31, 0x9c, 0xe8, 0x6d, 0xdd, 0x34, 0x6b, 0x16, 0xde,
- 0x90, 0x10, 0x2e, 0x82, 0xf8, 0x07, 0xd7, 0x62, 0x06, 0xd3, 0xa0, 0x61,
- 0x35, 0xaa, 0x7b, 0xad, 0x08, 0xeb, 0x9f, 0xa3, 0x9d, 0x51, 0x2a, 0xe0,
- 0x55, 0x4d, 0x52, 0xae, 0x5b, 0x49, 0x44, 0x49, 0x43, 0xf3, 0x78, 0x33,
- 0x9c, 0xc2, 0x3c, 0xca, 0xc6, 0x65, 0x30, 0x03, 0x7e, 0xa0, 0xbd, 0x39,
- 0x15, 0x0d, 0x9a, 0x33, 0x63, 0x3f, 0x0b, 0xd2, 0x98, 0x1e, 0x9f, 0x99,
- 0x3c, 0xd8, 0xd8, 0x64, 0xfa, 0x50, 0x58, 0x51, 0x63, 0x87, 0xd7, 0xcf,
- 0xac, 0x6d, 0x87, 0x31, 0x82, 0xfa, 0x06, 0xfb, 0x14, 0x2b, 0x3c, 0xde,
- 0x6f, 0x6f, 0xce, 0xed, 0x30, 0x9e, 0x7c, 0x74, 0x83, 0xb5, 0x97, 0xc6,
- 0x2a, 0x4c, 0xe7, 0x0a, 0x8d, 0xf9, 0x5e, 0x10, 0x02, 0x38, 0xef, 0xbf,
- 0x7c, 0xff, 0xf8, 0x82, 0x4c, 0xe7, 0x06, 0xa5, 0xc5, 0xc9, 0xed, 0xfe,
- 0xe0, 0x6a, 0x5c, 0x5e, 0x5c, 0x05, 0xd9, 0x8a, 0xc4, 0xbc, 0xb0, 0x86,
- 0xec, 0x7d, 0x7f, 0x1e, 0x7b, 0x69, 0x91, 0xa5, 0x92, 0x8b, 0xaf, 0x68,
- 0x41, 0x51, 0x65, 0x88, 0x51, 0x1b, 0x46, 0x4f, 0x10, 0x4b, 0xdc, 0x98,
- 0xe2, 0xec, 0x96, 0x1d, 0x2b, 0xee, 0x76, 0x7b, 0xbf, 0x5e, 0x87, 0x01,
- 0x1d, 0xcb, 0xe3, 0x9e, 0x8e, 0x65, 0x56, 0x4e, 0x39, 0x77, 0x19, 0xe7,
- 0x1f, 0xde, 0xed, 0x6a, 0x97, 0xee, 0x4c, 0xd6, 0xc7, 0xb7, 0xb8, 0x9f,
- 0x58, 0xe7, 0xfc, 0xab, 0x75, 0x1c, 0x02, 0x24, 0xc7, 0xa3, 0x22, 0x9b,
- 0x2e, 0x4b, 0x89, 0xd6, 0x93, 0xc6, 0xae, 0x4c, 0x40, 0x5c, 0xb3, 0x14,
- 0x88, 0x4f, 0xb5, 0xbb, 0x7d, 0x7d, 0x52, 0x75, 0x2e, 0x88, 0xea, 0x06,
- 0x18, 0x86, 0xed, 0x58, 0xbf, 0x38, 0xfa, 0xb4, 0x1f, 0xa2, 0x00, 0x7e,
- 0x7b, 0xe6, 0x95, 0xb7, 0x2c, 0xd0, 0x7a, 0x86, 0xa7, 0xbd, 0xd6, 0x0e,
- 0xc4, 0x24, 0x61, 0xcc, 0x3d, 0x25, 0x05, 0x8e, 0x4e, 0xd4, 0xfa, 0xf0,
- 0xca, 0xf7, 0x1e, 0x23, 0xa4, 0xb5, 0x6b, 0x9c, 0xcf, 0x3e, 0x70, 0xc8,
- 0xe9, 0x01, 0x3f, 0x2b, 0x86, 0x06, 0x0b, 0x66, 0xd5, 0x38, 0x99, 0x7a,
- 0x8c, 0xd7, 0xac, 0xfc, 0xba, 0x11, 0x54, 0xa8, 0xf0, 0xb1, 0x91, 0xf0,
- 0x83, 0x6d, 0x83, 0x09, 0x80, 0xfc, 0xd8, 0x09, 0xbf, 0x0a, 0x38, 0x65,
- 0x7b, 0x73, 0x3a, 0x5c, 0xff, 0x9e, 0x2e, 0x4f, 0xcf, 0xcc, 0x66, 0x13,
- 0x35, 0x43, 0xb3, 0x06, 0xda, 0xa4, 0x0d, 0x3b, 0xe0, 0xbf, 0x88, 0x41,
- 0xb0, 0xda, 0x31, 0x9d, 0x57, 0x62, 0x2b, 0xa9, 0xc7, 0x6c, 0x06, 0x0c,
- 0x98, 0xf6, 0x18, 0x72, 0x49, 0x21, 0x0b, 0x91, 0xfe, 0xdd, 0xb6, 0x0b,
- 0x5a, 0x80, 0xa0, 0x0d, 0x5b, 0xb9, 0xd4, 0xfb, 0x10, 0xd5, 0xae, 0xc5,
- 0x0c, 0x66, 0x25, 0xc0, 0x62, 0xa0, 0xda, 0x51, 0xd7, 0x48, 0x5e, 0x14,
- 0x46, 0x29, 0x59, 0x90, 0x85, 0xe9, 0x63, 0x62, 0x3c, 0x72, 0xa2, 0xb0,
- 0x3c, 0xde, 0x28, 0x55, 0xc3, 0x59, 0x1b, 0x52, 0xb0, 0xb4, 0x5a, 0x05,
- 0x6d, 0x50, 0x2f, 0x53, 0xdb, 0x4f, 0xae, 0x27, 0x7d, 0x25, 0x8e, 0x2a,
- 0x2b, 0xea, 0xe7, 0xdb, 0x58, 0x08, 0x52, 0x7f, 0x5f, 0xe2, 0xc7, 0xe7,
- 0x6b, 0x6b, 0x2f, 0x0e, 0x7d, 0x01, 0xc6, 0xe8, 0x42, 0x42, 0x7f, 0x98,
- 0xa7, 0x32, 0x06, 0x8e, 0x2a, 0xd0, 0x9b, 0x6c, 0x6b, 0x91, 0x5a, 0xbd,
- 0x82, 0x8e, 0x3f, 0x5e, 0xb6, 0x95, 0x66, 0xd8, 0xb2, 0xda, 0x82, 0x68,
- 0x7a, 0x77, 0xb0, 0xdb, 0x33, 0xdd, 0x4a, 0xa5, 0x38, 0x93, 0x90, 0xf9,
- 0x93, 0x58, 0x53, 0x7a, 0x22, 0xd4, 0x4f, 0xac, 0x5b, 0xc7, 0x2e, 0x24,
- 0xe4, 0x55, 0xc5, 0xc6, 0xb0, 0xbc, 0x26, 0x57, 0x09, 0x74, 0x42, 0x39,
- 0x23, 0xd9, 0x34, 0xa8, 0x68, 0xa7, 0xff, 0xf4, 0xc5, 0x8b, 0xca, 0xbd,
- 0x1e, 0x2a, 0xc1, 0xcf, 0x76, 0x76, 0x04, 0xde, 0xa7, 0xfe, 0x1a, 0x7d,
- 0xd1, 0x7f, 0x81, 0x17, 0xab, 0xaf, 0x09, 0x08, 0xcc, 0xfa, 0xf7, 0xfa,
- 0xfc, 0x4d, 0x4b, 0x77, 0xb0, 0xe0, 0xac, 0x7d, 0xeb, 0x05, 0x77, 0xd7,
- 0xf2, 0x16, 0x1e, 0x96, 0x75, 0xcc, 0xae, 0xae, 0xb8, 0x74, 0x35, 0x3f,
- 0x29, 0x18, 0xe0, 0x59, 0x7e, 0x1f, 0xe7, 0x93, 0xe6, 0x74, 0x77, 0x7a,
- 0xfd, 0xdd, 0x75, 0xd3, 0x75, 0x75, 0x26, 0xb1, 0x9d, 0xac, 0x09, 0x6d,
- 0xfe, 0x71, 0x6b, 0xf3, 0xeb, 0xad, 0xb6, 0xd9, 0x7f, 0xba, 0xb3, 0xd3,
- 0x7b, 0xce, 0x3f, 0x5f, 0xbc, 0x58, 0x1b, 0x63, 0xe2, 0xfb, 0x78, 0x62,
- 0x53, 0xab, 0x8c, 0x96, 0xda, 0x69, 0x69, 0x7d, 0x97, 0x5a, 0xdd, 0x7d,
- 0xf1, 0xa2, 0xc7, 0xbd, 0x3c, 0xfb, 0xa8, 0xd6, 0xcb, 0xfb, 0xcc, 0x9b,
- 0xce, 0xf9, 0x75, 0x4f, 0x8e, 0x45, 0x6d, 0x06, 0xf4, 0x27, 0xa2, 0x98,
- 0x18, 0xf5, 0x28, 0x32, 0xef, 0x82, 0x96, 0xa1, 0x54, 0x1f, 0x7c, 0x80,
- 0xdb, 0x88, 0x40, 0xbf, 0x05, 0xf2, 0xf0, 0xa0, 0x29, 0x8a, 0xfa, 0x11,
- 0x7b, 0xff, 0x82, 0xf9, 0xe3, 0x3d, 0xa2, 0xf6, 0x99, 0xb8, 0xc2, 0xae,
- 0x19, 0x71, 0xc9, 0xb2, 0xf4, 0x8a, 0x68, 0x93, 0xc8, 0x65, 0x0b, 0xb6,
- 0x80, 0xbb, 0x78, 0x9a, 0x1a, 0x92, 0x43, 0xd4, 0x85, 0x01, 0x4b, 0x50,
- 0x39, 0xe8, 0xf7, 0x6c, 0xd1, 0x45, 0xbd, 0x9c, 0xe9, 0xc4, 0x69, 0x22,
- 0xe6, 0x95, 0x92, 0x27, 0xfb, 0xf2, 0x8c, 0x1c, 0x34, 0xa8, 0x73, 0x0f,
- 0x03, 0xc1, 0x23, 0x64, 0xef, 0x50, 0xad, 0xd7, 0xc8, 0x01, 0x23, 0x79,
- 0x44, 0x5f, 0x81, 0xc2, 0x85, 0xb9, 0xca, 0x4f, 0xb3, 0x5b, 0x04, 0x08,
- 0x78, 0xe6, 0x30, 0x98, 0x07, 0xde, 0xc0, 0x49, 0x62, 0x30, 0xcb, 0x35,
- 0x1c, 0x18, 0xf7, 0xbe, 0xd8, 0x63, 0x96, 0xa2, 0x88, 0xfa, 0x43, 0xf6,
- 0x03, 0x2c, 0x67, 0x9a, 0xbb, 0x25, 0xa9, 0x13, 0xac, 0x9f, 0xde, 0xc7,
- 0x79, 0x62, 0x59, 0xa7, 0xa4, 0x37, 0x1b, 0x07, 0x70, 0x40, 0xab, 0x9a,
- 0x39, 0xa9, 0xc9, 0xe3, 0x1e, 0x0b, 0xc1, 0x10, 0xad, 0x25, 0x58, 0x69,
- 0x82, 0x78, 0x50, 0x4d, 0xb2, 0x65, 0xdb, 0x3f, 0xec, 0x74, 0x15, 0x77,
- 0x98, 0xa1, 0xad, 0x9b, 0x85, 0x4e, 0x70, 0xe0, 0x36, 0x6a, 0x2e, 0x30,
- 0x7e, 0x0a, 0xc9, 0xb0, 0x40, 0x69, 0x72, 0x25, 0x5c, 0xdd, 0x2c, 0xc0,
- 0x8e, 0x78, 0x8b, 0xc0, 0x98, 0x64, 0xf1, 0x0d, 0x02, 0x4b, 0x0b, 0x46,
- 0x5b, 0x74, 0x91, 0x40, 0xd4, 0x01, 0xf0, 0xa5, 0xb2, 0x63, 0xb4, 0x57,
- 0x8e, 0x09, 0xd2, 0xa6, 0x45, 0x9b, 0x41, 0xd8, 0x22, 0x68, 0x2b, 0xd0,
- 0xf9, 0x0d, 0x51, 0x35, 0x93, 0x18, 0xbc, 0xad, 0x81, 0x0c, 0x00, 0x46,
- 0x5b, 0xd9, 0x09, 0x00, 0xf2, 0x84, 0x5b, 0x9a, 0x3c, 0x94, 0x80, 0xc4,
- 0xc6, 0x93, 0x76, 0x39, 0x0f, 0x4f, 0xfe, 0xf7, 0xf1, 0xe0, 0xd7, 0xb0,
- 0x26, 0xd7, 0x23, 0xcf, 0xf3, 0xf8, 0xde, 0xa3, 0x43, 0xa8, 0xb7, 0xd8,
- 0x05, 0xbe, 0xc5, 0xd3, 0xa9, 0xaf, 0x73, 0x0f, 0xbf, 0x1f, 0x09, 0xfb,
- 0x99, 0xa1, 0xc5, 0xbb, 0x1a, 0xf6, 0x6b, 0xd1, 0xc5, 0x39, 0xc3, 0x6f,
- 0x82, 0x0a, 0xce, 0xa1, 0x61, 0xd9, 0x81, 0xbe, 0xcc, 0xe0, 0x7e, 0xb1,
- 0x8a, 0x52, 0x4b, 0xea, 0x04, 0xa5, 0xda, 0xea, 0xf6, 0x29, 0x1a, 0x62,
- 0x03, 0x8c, 0x3d, 0x8c, 0x8b, 0xb9, 0xf0, 0x29, 0x0d, 0x3c, 0xf3, 0x35,
- 0xc8, 0x17, 0x08, 0x44, 0x15, 0x17, 0x76, 0x58, 0xda, 0xd6, 0xec, 0x06,
- 0x81, 0x71, 0x1c, 0xc4, 0x8f, 0xac, 0x9b, 0x36, 0x73, 0x14, 0xaf, 0x6d,
- 0x19, 0xcf, 0x16, 0x2d, 0xe9, 0x2e, 0x92, 0x99, 0x6b, 0x08, 0x49, 0xac,
- 0x1c, 0xf9, 0x80, 0x54, 0x74, 0xd6, 0x6c, 0x2e, 0xc8, 0xc1, 0x11, 0xca,
- 0xa5, 0x17, 0xe1, 0x88, 0x70, 0xfd, 0x54, 0x73, 0x47, 0x58, 0x16, 0x03,
- 0x66, 0x70, 0xd3, 0x9d, 0xc8, 0x67, 0x03, 0x2b, 0x9f, 0x02, 0x33, 0x10,
- 0x51, 0x6d, 0x3c, 0x08, 0x91, 0xee, 0x13, 0x8d, 0x70, 0x92, 0x48, 0x11,
- 0x84, 0x55, 0x72, 0x68, 0x94, 0x56, 0x6c, 0x8d, 0xd7, 0xec, 0xa0, 0x07,
- 0xe5, 0x94, 0xae, 0xb1, 0x7e, 0xfe, 0x16, 0x96, 0x54, 0x18, 0xb3, 0xdd,
- 0x11, 0x7f, 0x82, 0x75, 0x6f, 0xb9, 0x18, 0x34, 0xb1, 0x8c, 0x83, 0x6a,
- 0x42, 0xfa, 0x3e, 0x75, 0xbf, 0x13, 0xba, 0x0a, 0xc1, 0x28, 0x34, 0x04,
- 0xd9, 0xd5, 0x6e, 0x49, 0x8b, 0xd6, 0xda, 0x1f, 0x30, 0x1c, 0xb3, 0x05,
- 0xd4, 0xcd, 0x57, 0xa6, 0x2b, 0x36, 0x7e, 0xc9, 0x62, 0xde, 0xe7, 0x72,
- 0x6c, 0x82, 0x6b, 0xd6, 0xf3, 0x80, 0xd1, 0xd1, 0xd3, 0x87, 0x87, 0x86,
- 0x62, 0x12, 0x40, 0xe8, 0x4a, 0xf1, 0x31, 0x21, 0xf6, 0x67, 0x0f, 0x0f,
- 0xd5, 0x2f, 0xd7, 0xc0, 0xaa, 0x88, 0x23, 0x89, 0xf7, 0x7b, 0x94, 0x49,
- 0x72, 0x95, 0xac, 0x56, 0xdc, 0xb2, 0x8e, 0x72, 0x39, 0xdf, 0xc7, 0x88,
- 0xba, 0x6d, 0x7a, 0x1a, 0x21, 0x71, 0xb8, 0x2a, 0x39, 0x96, 0xe5, 0xc3,
- 0x89, 0xb7, 0x37, 0xc4, 0x0a, 0x04, 0x0c, 0x55, 0x83, 0x62, 0xb5, 0x41,
- 0x2b, 0x59, 0xd4, 0xb2, 0x4e, 0xdc, 0x8b, 0x2c, 0x7b, 0x0a, 0xd4, 0xd1,
- 0x32, 0x9d, 0xf2, 0x6b, 0xc0, 0xe0, 0xa4, 0x16, 0x76, 0x69, 0xf9, 0xd3,
- 0xf9, 0xb2, 0x4c, 0x0a, 0x57, 0x2f, 0x3b, 0xa8, 0x35, 0xd7, 0xb6, 0xec,
- 0x53, 0xe0, 0x05, 0x49, 0x38, 0x48, 0xbd, 0xa0, 0x97, 0x8e, 0x4b, 0x21,
- 0x17, 0x14, 0x69, 0x46, 0x49, 0xb6, 0x8f, 0x57, 0x5b, 0x92, 0x89, 0x22,
- 0x17, 0x18, 0xaa, 0x47, 0x33, 0x79, 0xa0, 0xd5, 0x96, 0x08, 0xd1, 0x08,
- 0x1e, 0x5e, 0x92, 0x2e, 0xf8, 0xb6, 0xb9, 0xce, 0x72, 0xda, 0xd4, 0xd9,
- 0x20, 0xc8, 0xdc, 0x6b, 0x44, 0x19, 0x4a, 0x57, 0x0e, 0xeb, 0x8f, 0xcb,
- 0x88, 0x38, 0x88, 0xdc, 0x32, 0x2b, 0x95, 0x31, 0x6a, 0x2c, 0x2b, 0x73,
- 0x1d, 0xc4, 0x2f, 0xd9, 0xb8, 0x1f, 0x8b, 0xca, 0xdf, 0x1b, 0x3c, 0x69,
- 0x2b, 0x9b, 0x5a, 0xc1, 0x24, 0x89, 0x02, 0x61, 0xdf, 0x59, 0x36, 0x1f,
- 0x29, 0x9e, 0xda, 0x58, 0xdc, 0x31, 0x07, 0x17, 0x84, 0xd5, 0x53, 0x6b,
- 0xe7, 0x5e, 0x16, 0xf1, 0x11, 0x08, 0x43, 0xc3, 0x79, 0x2e, 0xa6, 0x49,
- 0xb2, 0x90, 0xb1, 0x39, 0x64, 0x60, 0x2b, 0x9e, 0x2b, 0x27, 0x15, 0x61,
- 0xf8, 0x4a, 0xa4, 0x7a, 0xdf, 0xae, 0xe3, 0x00, 0x11, 0xec, 0xf8, 0x30,
- 0x69, 0x5b, 0x65, 0xbb, 0x76, 0x4e, 0xb3, 0x29, 0xe2, 0x8a, 0x25, 0xac,
- 0xad, 0x29, 0x75, 0x65, 0x5b, 0x8a, 0xe1, 0xb8, 0x6d, 0x75, 0x44, 0xa5,
- 0x9b, 0x51, 0xab, 0x7c, 0xdb, 0x2c, 0x1b, 0x21, 0x40, 0xf7, 0xb8, 0x9a,
- 0x12, 0x81, 0xcd, 0x47, 0x05, 0x5c, 0x99, 0x11, 0x7c, 0xb6, 0x8a, 0x68,
- 0x35, 0x70, 0xbc, 0x47, 0x0a, 0xa2, 0x60, 0x09, 0x1b, 0xb1, 0xcb, 0x48,
- 0x28, 0xa8, 0xa1, 0x65, 0x9b, 0xf4, 0xe8, 0x22, 0x88, 0x1c, 0x35, 0xf2,
- 0xd8, 0x07, 0x9e, 0x44, 0x9a, 0x35, 0x16, 0xfe, 0x5d, 0x14, 0xa3, 0x15,
- 0x90, 0x8a, 0x47, 0xa9, 0xe6, 0x83, 0xd8, 0x97, 0x97, 0x7a, 0x78, 0x25,
- 0xb3, 0x51, 0xaf, 0x0c, 0x96, 0xe8, 0x43, 0xa7, 0x4c, 0xa4, 0x8c, 0x2b,
- 0xa0, 0x0b, 0xbd, 0x31, 0x1b, 0x0a, 0x9c, 0xf2, 0x27, 0xe3, 0x23, 0xc8,
- 0x57, 0x8d, 0x59, 0x42, 0xe1, 0x42, 0x94, 0x9b, 0x9c, 0x80, 0xae, 0x43,
- 0xdb, 0xe2, 0x8f, 0x01, 0x38, 0xa6, 0xce, 0x4a, 0xf4, 0xdf, 0x48, 0x9f,
- 0x04, 0xc2, 0xa0, 0xf0, 0xac, 0x49, 0x0b, 0x42, 0xe8, 0xdb, 0x8c, 0x23,
- 0x47, 0xf4, 0xca, 0xbd, 0xf2, 0xed, 0xe8, 0x9b, 0x4d, 0x1c, 0x41, 0xb4,
- 0x63, 0x29, 0x32, 0xd4, 0x44, 0xaf, 0x82, 0x60, 0x6d, 0xc3, 0x46, 0xcc,
- 0x13, 0xfc, 0x4a, 0x12, 0x27, 0x22, 0x17, 0x65, 0x8b, 0x17, 0x00, 0xac,
- 0x9d, 0xbd, 0x47, 0x70, 0xbe, 0xf1, 0x74, 0x5a, 0xd0, 0x4c, 0xb1, 0x01,
- 0xd4, 0x46, 0xca, 0x50, 0x69, 0x97, 0xc6, 0x98, 0x9a, 0x89, 0x4a, 0x9a,
- 0x13, 0xac, 0x83, 0xe9, 0x16, 0x61, 0xe5, 0x98, 0x94, 0x51, 0x36, 0x44,
- 0x72, 0xac, 0x80, 0x9a, 0x0e, 0xa4, 0x56, 0x40, 0xd9, 0xc4, 0x19, 0xf3,
- 0x79, 0xcc, 0x20, 0xf0, 0x52, 0x24, 0x71, 0xc3, 0xfa, 0x74, 0x0c, 0xfb,
- 0x63, 0x58, 0x5d, 0x4d, 0xdc, 0x5c, 0x47, 0xb5, 0xba, 0xac, 0x4c, 0xb7,
- 0xff, 0x3c, 0xe1, 0x16, 0x5c, 0x3e, 0x84, 0x0b, 0x30, 0xd6, 0x37, 0x6f,
- 0x88, 0x0f, 0xc5, 0x8a, 0xf0, 0xb7, 0x65, 0xca, 0x24, 0x2a, 0x11, 0x45,
- 0x47, 0x80, 0x61, 0x2f, 0x34, 0xb8, 0xfc, 0x1a, 0xe1, 0x1b, 0xea, 0xef,
- 0xce, 0x9d, 0x64, 0xd0, 0x80, 0xa3, 0x05, 0x92, 0xd2, 0xc0, 0x50, 0x43,
- 0x01, 0x78, 0x39, 0x5b, 0x86, 0xd8, 0x69, 0xfd, 0x21, 0x8f, 0x84, 0x5a,
- 0xed, 0xa3, 0x8d, 0xb6, 0xbb, 0xdf, 0x63, 0x76, 0xf6, 0xa5, 0xc8, 0x8c,
- 0x97, 0x67, 0x30, 0x1c, 0xc8, 0x1d, 0x32, 0x02, 0x03, 0x6f, 0x12, 0xdc,
- 0x98, 0x06, 0x94, 0x3c, 0x73, 0xd8, 0x4a, 0x24, 0x33, 0xd7, 0x11, 0x2f,
- 0x9e, 0x46, 0x2f, 0x3f, 0x10, 0x33, 0xaa, 0x65, 0x4d, 0xd4, 0x4c, 0x32,
- 0x3c, 0x3b, 0xfc, 0x66, 0xf8, 0xf4, 0x83, 0xc1, 0xa2, 0xeb, 0xab, 0xbb,
- 0x3e, 0x1a, 0x2e, 0xfa, 0x48, 0x39, 0x85, 0x96, 0xac, 0x09, 0x2e, 0x2c,
- 0x93, 0xd3, 0xa5, 0x56, 0xc0, 0xa1, 0xca, 0xc0, 0xb7, 0x69, 0xb6, 0x74,
- 0x88, 0x4d, 0x91, 0x8f, 0x9a, 0xec, 0x39, 0xb0, 0xb7, 0x55, 0x23, 0x83,
- 0x2c, 0xe1, 0x3d, 0x11, 0xfc, 0xb6, 0xe4, 0x61, 0x3c, 0x5d, 0x16, 0xe9,
- 0xdd, 0x6f, 0x5a, 0xc8, 0x5b, 0x56, 0x3d, 0xfe, 0xa7, 0x96, 0x3d, 0xfe,
- 0xb8, 0x75, 0x6f, 0x30, 0x91, 0x5f, 0xb8, 0xee, 0x6d, 0x45, 0xdc, 0xff,
- 0xef, 0x58, 0xf7, 0x67, 0x7d, 0x07, 0x1f, 0xf4, 0xf2, 0x97, 0x86, 0x4a,
- 0x63, 0x0b, 0x9e, 0x69, 0x68, 0xe9, 0x26, 0xac, 0x5f, 0x49, 0x18, 0x6d,
- 0xca, 0xa5, 0x4a, 0xa6, 0x77, 0xc9, 0x1a, 0x0c, 0x23, 0x98, 0x80, 0xb7,
- 0x3e, 0x78, 0x62, 0xdc, 0x4e, 0x89, 0x5f, 0x5a, 0xf6, 0xaa, 0xbe, 0x76,
- 0xff, 0xc4, 0xce, 0x39, 0x89, 0xc0, 0xef, 0x5d, 0xeb, 0xe6, 0x85, 0x7b,
- 0x27, 0x97, 0xe6, 0xff, 0xd4, 0xce, 0xd5, 0xa4, 0xe5, 0xea, 0x2c, 0x50,
- 0x40, 0xc1, 0xc6, 0x2e, 0x25, 0x7b, 0xe9, 0x5e, 0x9c, 0xa2, 0x8a, 0x8e,
- 0xc3, 0xe9, 0x71, 0x01, 0x44, 0x4d, 0xd4, 0x3a, 0x25, 0x87, 0x4a, 0x85,
- 0x56, 0xdd, 0x0d, 0x57, 0x30, 0x6c, 0xab, 0x41, 0x3c, 0xff, 0xcc, 0x99,
- 0x35, 0x82, 0xe1, 0xc8, 0x40, 0x80, 0x48, 0x19, 0x99, 0x08, 0x7d, 0x81,
- 0x34, 0xda, 0x42, 0x11, 0xa1, 0xb7, 0x03, 0xd4, 0xd2, 0xaa, 0xc3, 0x7c,
- 0x90, 0x64, 0x2a, 0x87, 0xbb, 0x05, 0xc2, 0x73, 0x5d, 0x44, 0xfe, 0xff,
- 0x91, 0x07, 0xbb, 0x8d, 0x3c, 0x2c, 0x28, 0xfe, 0xa3, 0x89, 0xc3, 0x85,
- 0xb2, 0xfd, 0x4b, 0xe4, 0xd1, 0x76, 0xce, 0x36, 0x35, 0x3e, 0x8f, 0x97,
- 0xc9, 0x78, 0xfe, 0x96, 0x2f, 0x97, 0x08, 0x54, 0x4d, 0xdc, 0xea, 0x27,
- 0xe7, 0xdf, 0x3e, 0x87, 0x33, 0x63, 0xd8, 0x04, 0xc5, 0x39, 0x3d, 0x3a,
- 0x38, 0x6f, 0x61, 0x61, 0xd7, 0x74, 0xcb, 0x2f, 0xd2, 0x3e, 0xdb, 0x3f,
- 0x59, 0x30, 0x7d, 0xa9, 0xbf, 0x30, 0x11, 0xb5, 0x89, 0xde, 0xa6, 0x5f,
- 0xd8, 0xf3, 0xe0, 0x7e, 0x8a, 0xa7, 0x81, 0x59, 0xaa, 0xf9, 0x9a, 0xc5,
- 0xf2, 0xf1, 0x6c, 0xb2, 0x2d, 0x7f, 0xf6, 0xaf, 0xfe, 0x36, 0x99, 0x0f,
- 0x1e, 0xa1, 0x95, 0xb8, 0x12, 0xbc, 0xae, 0x05, 0x64, 0xd2, 0x66, 0xbe,
- 0xac, 0xab, 0x6b, 0x57, 0x37, 0xcd, 0xbb, 0x53, 0x15, 0x69, 0x2a, 0x0e,
- 0xa0, 0x57, 0xd6, 0xcd, 0x92, 0x3f, 0x9d, 0x44, 0x0a, 0xea, 0x16, 0x35,
- 0x13, 0x1e, 0xf0, 0xfd, 0xb6, 0x6f, 0xe9, 0x5f, 0xeb, 0xcd, 0xda, 0xe3,
- 0xb0, 0xd3, 0xb6, 0xe6, 0x64, 0x14, 0x22, 0x2b, 0xd7, 0x9e, 0x14, 0xad,
- 0x5f, 0x8a, 0x56, 0xa2, 0xba, 0xa9, 0xbf, 0x22, 0xfa, 0x8a, 0x49, 0xd8,
- 0x80, 0x23, 0x10, 0xc8, 0xe9, 0x72, 0x6c, 0x99, 0x29, 0xe9, 0x7c, 0xbc,
- 0x88, 0x25, 0x79, 0xbd, 0xbe, 0x05, 0x8f, 0xe3, 0xcb, 0x55, 0x67, 0x33,
- 0x4f, 0xea, 0xf1, 0x96, 0x07, 0x45, 0x05, 0x49, 0x47, 0x9e, 0x8b, 0x2c,
- 0xe3, 0x0a, 0xdb, 0x8a, 0x10, 0x28, 0x2d, 0x7d, 0x85, 0x48, 0x15, 0xdc,
- 0x44, 0xf2, 0x48, 0x23, 0xff, 0xbe, 0x74, 0x00, 0x84, 0x51, 0x7e, 0x35,
- 0xde, 0x7d, 0xf1, 0x7c, 0x97, 0xa5, 0xde, 0x55, 0x21, 0x30, 0x55, 0x85,
- 0x36, 0xf3, 0x74, 0xf0, 0x64, 0xfb, 0xe9, 0xe0, 0x69, 0xe4, 0xb1, 0xd9,
- 0x47, 0x49, 0x6b, 0x4a, 0x6e, 0x32, 0x46, 0x3a, 0xff, 0x48, 0x8f, 0xdc,
- 0xdb, 0xe3, 0x43, 0xab, 0x1a, 0x8b, 0x24, 0xd5, 0x2a, 0x2c, 0xa5, 0x56,
- 0x35, 0xe5, 0xc5, 0x93, 0x52, 0x08, 0xed, 0xa8, 0xde, 0xad, 0xcb, 0xe2,
- 0xf3, 0x8d, 0x11, 0xb6, 0x32, 0xd7, 0x39, 0xd3, 0xba, 0x12, 0xcb, 0xba,
- 0xd1, 0xf2, 0x67, 0x2d, 0x91, 0x78, 0xf5, 0xb5, 0x09, 0x56, 0x6e, 0xf0,
- 0x81, 0x9d, 0x29, 0x27, 0xc4, 0x5b, 0xdb, 0x9d, 0xc6, 0x17, 0xae, 0xda,
- 0x11, 0x31, 0x0c, 0x14, 0x9f, 0x2f, 0x14, 0x80, 0x89, 0x5f, 0xb1, 0x78,
- 0xb1, 0x4a, 0x24, 0x91, 0xd9, 0xba, 0xd7, 0x86, 0x0c, 0x06, 0x70, 0x46,
- 0x02, 0xe7, 0x07, 0x70, 0xfd, 0x6e, 0xbf, 0x6b, 0x57, 0x85, 0x19, 0xcb,
- 0x83, 0x0a, 0xb2, 0x86, 0xf8, 0xb4, 0xfe, 0xd0, 0x6b, 0x51, 0x0e, 0x44,
- 0xb5, 0x88, 0x5d, 0x87, 0x9d, 0x24, 0x0e, 0x06, 0x8d, 0x38, 0xca, 0x0d,
- 0x33, 0x3d, 0xb5, 0xe2, 0x4c, 0x92, 0x71, 0x53, 0xc7, 0x72, 0x40, 0x1f,
- 0xf4, 0xfc, 0x38, 0x5e, 0xc4, 0xa3, 0x74, 0x9a, 0x96, 0x69, 0x4b, 0x78,
- 0xde, 0xaf, 0x28, 0xfb, 0x95, 0xe3, 0x45, 0x7f, 0x9e, 0xb5, 0xd9, 0x08,
- 0x2f, 0xb9, 0xec, 0x49, 0x00, 0x76, 0xfb, 0xfe, 0xed, 0xd9, 0xd1, 0xf1,
- 0xe9, 0xc1, 0x0f, 0xe6, 0xf5, 0x76, 0xa1, 0xc7, 0xa8, 0x1d, 0x9b, 0xc4,
- 0xc5, 0xea, 0x7d, 0x91, 0x94, 0xf4, 0xe5, 0xe6, 0x93, 0x2d, 0xf6, 0x47,
- 0xd5, 0xaf, 0x59, 0x56, 0xbf, 0xc2, 0x5a, 0x08, 0x6a, 0xb0, 0xf5, 0xf3,
- 0xa8, 0x91, 0xc9, 0x6e, 0xc5, 0xd1, 0x50, 0xd2, 0xfd, 0x5a, 0x26, 0xd3,
- 0x79, 0x52, 0x2a, 0xf0, 0x7d, 0xf4, 0xf2, 0xec, 0xfc, 0xf2, 0xd5, 0x5d,
- 0x3c, 0xad, 0x93, 0x0c, 0x03, 0x09, 0x69, 0x8b, 0x85, 0x51, 0x88, 0xbc,
- 0x19, 0x84, 0x30, 0x0e, 0x5d, 0xac, 0xa0, 0x3d, 0xd9, 0x06, 0x56, 0x71,
- 0x79, 0xf9, 0xc3, 0xf9, 0xf1, 0xab, 0x97, 0xac, 0x32, 0x7f, 0xce, 0x8a,
- 0xbe, 0x9a, 0x4a, 0xa0, 0x41, 0xf3, 0x3a, 0xaf, 0x16, 0xcd, 0xeb, 0xfb,
- 0xfb, 0xa3, 0x93, 0xe1, 0xf9, 0xe9, 0xd9, 0xe1, 0xab, 0x97, 0xdf, 0xb3,
- 0x81, 0x95, 0x0b, 0x6a, 0x04, 0xef, 0xba, 0xcf, 0x5c, 0x1c, 0x54, 0x13,
- 0x09, 0xf8, 0xf8, 0xbb, 0xf7, 0xc7, 0x6f, 0xbf, 0x7d, 0xf5, 0xf2, 0x2e,
- 0xce, 0x7b, 0x3c, 0x3f, 0x79, 0x9b, 0x13, 0x9a, 0x5b, 0xea, 0x2e, 0x54,
- 0xf6, 0x92, 0x73, 0x0f, 0x46, 0xd3, 0x5b, 0xa9, 0xc1, 0x83, 0xc2, 0x37,
- 0x8d, 0x00, 0x84, 0x4b, 0xc4, 0x69, 0xb3, 0xd1, 0x82, 0x7f, 0x8b, 0xbe,
- 0x3c, 0xfd, 0x86, 0xdd, 0x5b, 0xee, 0x6e, 0x46, 0x94, 0x2b, 0x91, 0xc9,
- 0xe7, 0xcf, 0x76, 0xf7, 0xb6, 0x82, 0x92, 0x1a, 0xec, 0x24, 0xa7, 0x11,
- 0xdf, 0x36, 0x8c, 0x26, 0x3f, 0x1b, 0xe2, 0xac, 0x07, 0xbb, 0xd6, 0x5a,
- 0xe2, 0x7c, 0x03, 0x08, 0xb0, 0x74, 0x1e, 0xcf, 0xb9, 0x90, 0x22, 0x42,
- 0x94, 0x38, 0x32, 0xa3, 0x04, 0x82, 0x08, 0x3b, 0xb0, 0x1b, 0x79, 0xb8,
- 0x97, 0x3e, 0x9a, 0x75, 0xc0, 0xc6, 0x6c, 0xbb, 0xa1, 0x69, 0x38, 0xea,
- 0xf7, 0x6e, 0x27, 0xe4, 0x5f, 0xfb, 0x60, 0xb4, 0x27, 0xc1, 0x87, 0xb0,
- 0x56, 0x97, 0x8c, 0xce, 0xbe, 0x60, 0xd7, 0xe5, 0x23, 0x31, 0x2f, 0x58,
- 0x3f, 0x8f, 0x73, 0x5c, 0x65, 0x56, 0x81, 0xff, 0x49, 0xc9, 0xd4, 0x21,
- 0xae, 0xbd, 0xbb, 0x38, 0x5d, 0xc3, 0xbe, 0x5c, 0x4d, 0x79, 0x8f, 0xfd,
- 0x66, 0xd5, 0xe1, 0x5d, 0xc3, 0xc0, 0x59, 0x3b, 0x74, 0xfb, 0x11, 0x5b,
- 0xfd, 0xed, 0x47, 0x1c, 0x60, 0x92, 0x75, 0x07, 0x67, 0xbe, 0xab, 0xbb,
- 0x03, 0x5a, 0x10, 0xd4, 0x5d, 0x9a, 0x42, 0x8a, 0x24, 0xdc, 0x6d, 0x63,
- 0x08, 0xbc, 0x7e, 0x1b, 0x6b, 0x02, 0xe1, 0x22, 0x71, 0xc3, 0x28, 0x96,
- 0x4c, 0x26, 0xc8, 0xd3, 0x18, 0x8f, 0x65, 0x21, 0x56, 0x67, 0xa1, 0x48,
- 0x34, 0x1b, 0x2d, 0x50, 0x86, 0x42, 0x50, 0x37, 0x1c, 0x9f, 0x54, 0xba,
- 0x8a, 0xdc, 0xd8, 0xbb, 0x6a, 0x04, 0x9a, 0x11, 0x69, 0xe0, 0x11, 0xac,
- 0x0b, 0x12, 0x1a, 0x67, 0xe4, 0x93, 0x52, 0xc4, 0xe8, 0xcc, 0x5a, 0x06,
- 0x87, 0x33, 0x4f, 0x57, 0x41, 0xd8, 0x82, 0x6c, 0x6c, 0x10, 0x12, 0xde,
- 0x30, 0x5b, 0xb3, 0xc9, 0x68, 0xe0, 0xe8, 0xcd, 0x08, 0x0d, 0x52, 0x02,
- 0xfb, 0xaf, 0x36, 0x87, 0x5b, 0x4a, 0xc6, 0x42, 0x6e, 0xe7, 0xef, 0x7c,
- 0x92, 0x4f, 0x5b, 0xf5, 0xa9, 0x75, 0x04, 0xe8, 0xd4, 0x6d, 0xbf, 0x50,
- 0x9d, 0x7e, 0x87, 0x41, 0x0c, 0xd5, 0x5e, 0x09, 0x08, 0x43, 0x3b, 0x6e,
- 0x74, 0x4b, 0x71, 0x99, 0x18, 0x9f, 0x44, 0x14, 0xb7, 0xe2, 0xf0, 0x49,
- 0xbc, 0x6d, 0x74, 0x30, 0x85, 0x77, 0x99, 0x78, 0xe3, 0xaa, 0x57, 0xef,
- 0x63, 0xd0, 0x89, 0x2a, 0x48, 0x89, 0x62, 0x3f, 0xdd, 0x6a, 0x60, 0x8a,
- 0xae, 0x30, 0xf4, 0xd0, 0x16, 0x10, 0xe6, 0xc3, 0xf2, 0x50, 0x6b, 0x43,
- 0x43, 0x80, 0x05, 0x58, 0x49, 0x33, 0x1f, 0x1c, 0x72, 0x03, 0x52, 0x71,
- 0xa5, 0x68, 0x0b, 0xa7, 0xba, 0xc0, 0x95, 0xe5, 0x42, 0x98, 0x14, 0x2d,
- 0x5f, 0xec, 0xc2, 0xda, 0x26, 0x84, 0xb0, 0x36, 0xdc, 0x11, 0xd9, 0xc4,
- 0x96, 0x45, 0xb5, 0x2a, 0x8e, 0x96, 0x73, 0xc0, 0x6c, 0xa0, 0x7f, 0xe9,
- 0x41, 0xf8, 0x18, 0x42, 0xaf, 0x25, 0x59, 0x47, 0x81, 0x9d, 0xfb, 0x97,
- 0x0d, 0x48, 0x23, 0x7e, 0x61, 0x11, 0xa7, 0x79, 0x10, 0x4a, 0x83, 0xf0,
- 0x35, 0x9e, 0xbb, 0x50, 0x92, 0x06, 0x3e, 0x42, 0xea, 0x1d, 0x08, 0x69,
- 0xc3, 0x4f, 0xb2, 0xb6, 0xa4, 0x44, 0xe7, 0x7a, 0x9a, 0x8d, 0x46, 0x34,
- 0xa9, 0x8e, 0x49, 0xa4, 0x34, 0xc2, 0x38, 0xbf, 0x86, 0x92, 0xd6, 0x33,
- 0xbc, 0x2b, 0x7f, 0x58, 0x01, 0x97, 0x8a, 0xbe, 0xd6, 0x45, 0xfa, 0x6b,
- 0x1d, 0xb1, 0xcc, 0xe3, 0x5f, 0x03, 0xc8, 0x34, 0xac, 0x49, 0x29, 0xee,
- 0x6f, 0x7c, 0x1e, 0x59, 0xff, 0x75, 0x8e, 0x5f, 0xae, 0x38, 0x56, 0xd2,
- 0x5d, 0x9f, 0xca, 0x7c, 0xc0, 0x72, 0x14, 0xc3, 0x32, 0x6d, 0x09, 0xb6,
- 0xe7, 0x09, 0xd3, 0x04, 0x3a, 0x7f, 0xe7, 0x51, 0xec, 0xf6, 0xf8, 0xdf,
- 0xbd, 0x7f, 0x74, 0x0c, 0xa9, 0x94, 0xb1, 0xa2, 0x65, 0xf0, 0x25, 0xa3,
- 0x43, 0x16, 0x06, 0x8f, 0xda, 0x82, 0x86, 0xca, 0x15, 0xbc, 0xd6, 0xb6,
- 0x9e, 0xce, 0xae, 0x7f, 0xdc, 0xed, 0xef, 0xee, 0xec, 0xec, 0xfc, 0x34,
- 0x58, 0xf0, 0xd2, 0x5d, 0xa1, 0x79, 0xfa, 0x77, 0xb0, 0x48, 0xc7, 0x1c,
- 0xf2, 0x42, 0x9b, 0x99, 0xc6, 0xdc, 0xf4, 0xb6, 0xf4, 0xb7, 0x1d, 0x5e,
- 0x9f, 0x39, 0x27, 0xef, 0xb4, 0xf2, 0x71, 0x07, 0x48, 0x4d, 0x47, 0xe2,
- 0x6a, 0xa9, 0xe0, 0xf5, 0x2c, 0x77, 0x4f, 0x96, 0x12, 0x8d, 0x20, 0xd1,
- 0x1a, 0xea, 0x26, 0xe6, 0xcd, 0x26, 0x52, 0x95, 0x62, 0x60, 0x7c, 0xe3,
- 0xf5, 0x5a, 0x2b, 0x17, 0xe3, 0xdb, 0x44, 0x50, 0x7d, 0x38, 0x0f, 0x36,
- 0xa8, 0xde, 0xd2, 0x73, 0x89, 0x01, 0x38, 0xb0, 0x4a, 0xf7, 0x72, 0x6e,
- 0x9b, 0x40, 0xc3, 0x7c, 0xcc, 0x48, 0xfa, 0xe4, 0xaf, 0x8d, 0xcb, 0xb9,
- 0x7a, 0x11, 0x56, 0xbd, 0x22, 0x91, 0xfc, 0xd2, 0x3a, 0x72, 0x69, 0x9b,
- 0x82, 0xee, 0x4d, 0x1d, 0xa1, 0x99, 0x03, 0xc1, 0xfc, 0xfd, 0x3b, 0x81,
- 0x34, 0x1e, 0x65, 0x05, 0xbc, 0xf5, 0xba, 0x68, 0x0d, 0xe5, 0xa7, 0x18,
- 0xa7, 0xe9, 0x6f, 0x2a, 0xb5, 0xa2, 0x57, 0x74, 0xf3, 0xf8, 0x86, 0xc5,
- 0xb2, 0x5d, 0xb2, 0x5b, 0xe1, 0x66, 0xf9, 0xdd, 0x12, 0x73, 0x87, 0xdb,
- 0xaf, 0xff, 0x83, 0x36, 0x8c, 0xab, 0x1b, 0x36, 0xaa, 0x3d, 0x61, 0xaa,
- 0xa2, 0x28, 0x4e, 0x93, 0x98, 0x83, 0x8a, 0xcd, 0x4c, 0x73, 0x93, 0x3c,
- 0x88, 0xc0, 0xd0, 0x84, 0x09, 0x10, 0x9f, 0x2e, 0x7b, 0x4d, 0x54, 0xef,
- 0x3b, 0x18, 0x1e, 0x9e, 0x9c, 0x54, 0x14, 0x62, 0x5e, 0xbc, 0x01, 0x43,
- 0xa0, 0x8b, 0x9b, 0xa5, 0x98, 0xd1, 0x2a, 0xb2, 0x93, 0x07, 0xc3, 0x6d,
- 0xc8, 0x29, 0x1c, 0x92, 0x86, 0xf4, 0x51, 0x46, 0x20, 0x8f, 0x8b, 0xd4,
- 0x62, 0x00, 0x63, 0xc9, 0xfd, 0x5a, 0xce, 0x59, 0xa2, 0xe0, 0xc0, 0x98,
- 0x9b, 0x25, 0x1d, 0xc9, 0xe2, 0x23, 0x4d, 0x6f, 0x1f, 0x4b, 0x8f, 0xbf,
- 0x3d, 0xe9, 0xb5, 0x04, 0x3b, 0x9d, 0xe7, 0x1a, 0x53, 0x26, 0xa1, 0x2f,
- 0x91, 0x44, 0x2a, 0x31, 0x6e, 0x39, 0xdf, 0x1a, 0x42, 0x81, 0x19, 0x8a,
- 0x09, 0x61, 0xb4, 0xb8, 0x52, 0x0c, 0x40, 0xab, 0x05, 0x69, 0x47, 0xf5,
- 0x84, 0xa2, 0x8e, 0x9b, 0xff, 0xb4, 0x22, 0x85, 0x5a, 0x8d, 0xa0, 0xe8,
- 0x25, 0xff, 0xbb, 0x6f, 0x05, 0x7a, 0xd6, 0x95, 0xde, 0x74, 0x99, 0x28,
- 0xcd, 0x92, 0x3e, 0x21, 0xb0, 0xaf, 0x5c, 0xb7, 0x8f, 0x83, 0xb9, 0x0f,
- 0xa2, 0x33, 0xb7, 0x2f, 0xbe, 0x28, 0x20, 0xda, 0xac, 0x57, 0x28, 0x5b,
- 0x07, 0xec, 0x8e, 0xf4, 0xc3, 0xeb, 0x54, 0x09, 0xdf, 0x8f, 0x6b, 0xd3,
- 0x8c, 0x8b, 0x6c, 0x8f, 0xcc, 0x45, 0x7b, 0xa6, 0x9b, 0x78, 0x9a, 0xcd,
- 0xb7, 0x5a, 0x97, 0x0a, 0x5b, 0x45, 0x82, 0x26, 0xc7, 0x90, 0x89, 0xf5,
- 0xce, 0x15, 0x05, 0x6c, 0x8b, 0x03, 0x40, 0xf0, 0x0b, 0xe4, 0x5a, 0x2e,
- 0xe9, 0x71, 0x7e, 0xd2, 0xd7, 0x30, 0x48, 0x45, 0xde, 0x97, 0x6c, 0x37,
- 0x01, 0xb6, 0xaf, 0xe3, 0xda, 0xb4, 0x2d, 0x84, 0xcf, 0xa7, 0x16, 0xd4,
- 0xe8, 0x0a, 0xf4, 0xd5, 0x72, 0x51, 0x9b, 0x9b, 0x70, 0x1b, 0x1b, 0x5f,
- 0x5d, 0xa8, 0x44, 0xe2, 0xb3, 0x60, 0x5c, 0x84, 0xca, 0xde, 0x48, 0xab,
- 0xe0, 0xb9, 0x34, 0x49, 0xb5, 0x28, 0xc8, 0x35, 0x8e, 0x95, 0x69, 0x83,
- 0x35, 0x0a, 0x48, 0x7e, 0x9f, 0x78, 0xce, 0x32, 0xda, 0xef, 0xfc, 0x86,
- 0x27, 0xe3, 0x9d, 0x59, 0xc0, 0x7f, 0x7d, 0x82, 0x6c, 0x80, 0xfc, 0xb7,
- 0x12, 0xe4, 0xff, 0xbf, 0xd7, 0x7e, 0xaf, 0xdf, 0xfd, 0xb6, 0x7b, 0xdd,
- 0xe7, 0x79, 0xbf, 0x24, 0xa1, 0x6f, 0xdd, 0xbe, 0xc6, 0x10, 0x22, 0x0d,
- 0xe4, 0xbf, 0x01, 0xd7, 0x0a, 0xb5, 0x8b, 0xaf, 0x9c, 0x1b, 0x5a, 0x22,
- 0x17, 0x07, 0xd5, 0x44, 0xc7, 0x30, 0x58, 0x0c, 0x93, 0xd4, 0xa9, 0xd1,
- 0xcd, 0x62, 0x4b, 0x12, 0x12, 0x82, 0xd4, 0xf5, 0x0f, 0x54, 0x72, 0x30,
- 0x35, 0x45, 0x1c, 0x5e, 0x95, 0x04, 0x63, 0x49, 0x7f, 0xe5, 0xb0, 0x10,
- 0x03, 0x90, 0x80, 0x88, 0xde, 0xb6, 0xb8, 0x3c, 0x21, 0x0e, 0x70, 0x17,
- 0xa3, 0x60, 0xcf, 0x05, 0x29, 0x85, 0xc5, 0x13, 0x14, 0x8c, 0xe2, 0x03,
- 0x78, 0xf0, 0x6a, 0x72, 0x0a, 0xd6, 0x33, 0xb8, 0xc6, 0xda, 0xcb, 0xaa,
- 0x8a, 0xe1, 0x92, 0xd7, 0x12, 0x32, 0x0a, 0xd0, 0x57, 0xed, 0x2a, 0xd9,
- 0x2e, 0xe3, 0xe9, 0x6d, 0xcc, 0x12, 0xc9, 0x20, 0x7a, 0x23, 0xeb, 0xea,
- 0x8b, 0xde, 0x36, 0xe2, 0x3f, 0x46, 0xcb, 0xeb, 0x6b, 0xa0, 0x4b, 0x1e,
- 0xc8, 0x0d, 0x54, 0x18, 0x40, 0x04, 0x0c, 0x93, 0xdd, 0xcf, 0xbb, 0x1a,
- 0xc8, 0xd9, 0xb9, 0xa1, 0xcb, 0x9a, 0x16, 0x89, 0xc5, 0xa1, 0x8e, 0xd6,
- 0xc2, 0x6e, 0x64, 0x79, 0x31, 0xfd, 0xf7, 0xa2, 0xee, 0xcb, 0xf6, 0x97,
- 0x48, 0x41, 0x4f, 0x68, 0x54, 0x52, 0x07, 0xc5, 0xa9, 0xff, 0xb4, 0x86,
- 0x37, 0x29, 0x5d, 0x68, 0xf3, 0x66, 0xf0, 0x96, 0x16, 0x56, 0x83, 0x87,
- 0x40, 0x02, 0x7a, 0xe3, 0xd6, 0x41, 0xfe, 0xd1, 0xfa, 0x33, 0xc8, 0x58,
- 0xa4, 0x40, 0x5e, 0x65, 0x8d, 0xe4, 0x7a, 0x4d, 0x7f, 0xd2, 0xfe, 0x1f,
- 0x2d, 0xba, 0x95, 0x1a, 0xb7, 0x10, 0x59, 0x08, 0x94, 0xa7, 0x78, 0x4b,
- 0x32, 0xa9, 0xc2, 0x17, 0x98, 0x50, 0xa9, 0xa7, 0x2e, 0x25, 0xf6, 0x53,
- 0xda, 0x46, 0x11, 0x15, 0x13, 0x2f, 0xfe, 0x78, 0xb8, 0x48, 0xb3, 0x08,
- 0x73, 0x79, 0x50, 0x2d, 0x28, 0xb1, 0xee, 0x6a, 0x34, 0x93, 0x87, 0x3f,
- 0x35, 0x45, 0x89, 0x4a, 0x6b, 0x5a, 0xf5, 0x15, 0xb7, 0x26, 0x3f, 0x68,
- 0x15, 0xfb, 0xd4, 0xaa, 0xda, 0x6b, 0xa2, 0x48, 0x20, 0x51, 0xca, 0xc1,
- 0x88, 0x38, 0x39, 0xa4, 0x2a, 0x44, 0x9b, 0xcd, 0xfc, 0x9f, 0x95, 0xc3,
- 0x2a, 0x8d, 0x3d, 0x22, 0x88, 0x01, 0xdc, 0x6d, 0xe8, 0x82, 0x8c, 0x04,
- 0x53, 0xda, 0xc2, 0xfe, 0x10, 0x57, 0x14, 0x9c, 0x8a, 0xa0, 0x7e, 0x4a,
- 0xb3, 0x52, 0x1b, 0x84, 0xa3, 0x4a, 0xc5, 0x4b, 0x31, 0x28, 0x8b, 0x6e,
- 0x2d, 0xf6, 0x2e, 0x17, 0x61, 0x6e, 0x68, 0xd6, 0x29, 0x0c, 0x5a, 0xc5,
- 0xa0, 0xad, 0xda, 0x81, 0x06, 0xd9, 0x89, 0x58, 0xa6, 0xbb, 0xa8, 0x49,
- 0x3d, 0xac, 0x42, 0x58, 0x13, 0x1c, 0x7c, 0x0f, 0xaa, 0x77, 0xd1, 0xeb,
- 0x4d, 0x69, 0x1a, 0x85, 0x9c, 0x9e, 0xe4, 0x13, 0x08, 0xd0, 0x2b, 0x2d,
- 0x1e, 0x93, 0xa2, 0x6a, 0xc7, 0xfc, 0xd6, 0x82, 0x96, 0x24, 0xdf, 0x20,
- 0x19, 0x2f, 0xcb, 0xaa, 0x1d, 0x37, 0x18, 0x93, 0xc6, 0x24, 0x63, 0x48,
- 0x9b, 0x38, 0x03, 0x0a, 0xbe, 0xd8, 0x71, 0x10, 0xd1, 0xfb, 0x9d, 0x2d,
- 0x93, 0xdb, 0xa1, 0xd6, 0xac, 0x43, 0x25, 0x06, 0x91, 0xdb, 0x90, 0x49,
- 0x52, 0x85, 0x91, 0x01, 0xc5, 0xc6, 0xa4, 0x7e, 0x4d, 0x5b, 0xf7, 0x44,
- 0x7e, 0x79, 0x6b, 0xef, 0xaf, 0x25, 0x7f, 0x24, 0xe8, 0xdc, 0x95, 0x1f,
- 0xd0, 0xd4, 0x92, 0x62, 0x0d, 0x30, 0x45, 0xd0, 0x73, 0xc6, 0x28, 0x77,
- 0x21, 0x70, 0xb4, 0xbd, 0x6a, 0x8b, 0xbf, 0xdf, 0x44, 0x3f, 0xba, 0x7b,
- 0x1e, 0x98, 0x6f, 0x98, 0x01, 0xe3, 0x23, 0x5d, 0xce, 0xb4, 0xa9, 0x46,
- 0xdc, 0xe6, 0xa3, 0xa7, 0xf4, 0xe3, 0x1b, 0xfe, 0x61, 0x65, 0x9f, 0x19,
- 0x2b, 0xcb, 0xcc, 0x17, 0x4d, 0xe0, 0x03, 0x2e, 0x0d, 0x27, 0xe7, 0x7e,
- 0x08, 0x2a, 0x7a, 0x8d, 0x5f, 0xf2, 0xe4, 0x91, 0x77, 0x68, 0x6e, 0x3f,
- 0xb3, 0x03, 0x71, 0x59, 0x66, 0x4c, 0x89, 0x63, 0x24, 0x6a, 0xcc, 0x18,
- 0x59, 0xd5, 0x11, 0x8c, 0xfe, 0xa9, 0x1e, 0xaa, 0x02, 0x47, 0x49, 0x99,
- 0x4b, 0xba, 0x06, 0xca, 0x69, 0x7d, 0x7f, 0x52, 0xf8, 0xaa, 0x15, 0x72,
- 0xf1, 0xd1, 0xb9, 0x3d, 0x56, 0x3e, 0xb7, 0x81, 0x19, 0x59, 0x6b, 0x98,
- 0x97, 0x82, 0x16, 0xf3, 0xd9, 0xc7, 0xad, 0xe2, 0x11, 0xdf, 0x32, 0x76,
- 0x0b, 0x3b, 0x2c, 0x32, 0x2d, 0xda, 0x2a, 0x92, 0x97, 0x2f, 0xda, 0x8a,
- 0x87, 0x55, 0x42, 0x50, 0xf4, 0xe4, 0xf6, 0xc1, 0xe1, 0xd2, 0x43, 0x3c,
- 0x1f, 0x98, 0xcb, 0xad, 0x99, 0x5a, 0x66, 0x74, 0xd1, 0xe6, 0x2b, 0x7f,
- 0xb5, 0x45, 0x74, 0x4d, 0x0e, 0x04, 0x8d, 0x1a, 0x9d, 0xaf, 0x49, 0xe0,
- 0x9d, 0x90, 0xd8, 0x33, 0x65, 0x0b, 0xaf, 0xa4, 0x1e, 0xfd, 0xae, 0x51,
- 0x88, 0xba, 0x58, 0xcd, 0xc7, 0x37, 0x47, 0x6f, 0x87, 0xeb, 0x92, 0x78,
- 0xd3, 0xc2, 0x45, 0x2b, 0x73, 0x78, 0x09, 0x3f, 0x4d, 0x42, 0x1c, 0xb3,
- 0x45, 0x48, 0x7f, 0x1a, 0xcd, 0xd2, 0x02, 0xae, 0x71, 0xfe, 0xf6, 0xf8,
- 0xab, 0x33, 0xfb, 0xb1, 0x76, 0xc9, 0x1f, 0x5d, 0xe1, 0x53, 0x4e, 0xd0,
- 0x7d, 0x2c, 0xd7, 0xd9, 0x06, 0xe7, 0x6a, 0x4c, 0x79, 0x2f, 0x04, 0x11,
- 0xe4, 0x94, 0x5f, 0x17, 0x5a, 0xec, 0x29, 0x49, 0xe2, 0xa3, 0x7c, 0x5d,
- 0x16, 0x37, 0x1d, 0xb7, 0xbd, 0xaf, 0xbe, 0x6c, 0xde, 0x56, 0x47, 0x6f,
- 0xd7, 0x74, 0xc7, 0xdf, 0xf4, 0x2d, 0x81, 0x49, 0xaf, 0x68, 0x2d, 0x6c,
- 0x87, 0x6c, 0xf2, 0x96, 0x93, 0x77, 0x7e, 0x62, 0x3f, 0x2a, 0x53, 0xb7,
- 0x2b, 0x91, 0x8f, 0xbb, 0xd0, 0xbc, 0xe0, 0x33, 0x00, 0x9a, 0x64, 0x1a,
- 0xd3, 0x35, 0x19, 0xb5, 0x54, 0xc9, 0x0d, 0xac, 0xfe, 0x0e, 0xd9, 0x4e,
- 0xbc, 0x21, 0x7e, 0x95, 0x15, 0x58, 0xd1, 0x0a, 0x72, 0x21, 0x97, 0x5e,
- 0x2a, 0xbb, 0xcf, 0xd7, 0xa4, 0x5a, 0x37, 0xf5, 0xca, 0xfe, 0x3d, 0x5d,
- 0x52, 0x70, 0x4c, 0xb3, 0x0c, 0x18, 0xbd, 0x94, 0xeb, 0xe8, 0xf3, 0xc6,
- 0x81, 0x10, 0xc4, 0x17, 0xb3, 0x0a, 0x9b, 0x13, 0x10, 0xf7, 0x3a, 0x1b,
- 0x78, 0x1c, 0x66, 0x10, 0x8a, 0xbd, 0x27, 0xa8, 0xa5, 0xc6, 0xd3, 0x14,
- 0x04, 0xa1, 0x46, 0xb0, 0x28, 0xc9, 0x76, 0xde, 0x39, 0x61, 0x61, 0x06,
- 0xd2, 0x75, 0xa4, 0x25, 0x0e, 0xcb, 0xdc, 0xd9, 0x87, 0x59, 0xfe, 0xd5,
- 0xcc, 0x6a, 0x71, 0x76, 0x37, 0x82, 0x0b, 0x1e, 0xd8, 0x5c, 0xf3, 0x60,
- 0x37, 0x53, 0x55, 0x44, 0x76, 0x35, 0xa7, 0x24, 0xb7, 0x5a, 0x1b, 0x0e,
- 0x92, 0x84, 0x5b, 0x63, 0x2a, 0x11, 0x05, 0xd5, 0x91, 0x87, 0x3b, 0xb0,
- 0x8e, 0x71, 0x8e, 0x95, 0x18, 0x80, 0x24, 0x5f, 0x19, 0x89, 0xcd, 0xe3,
- 0x25, 0x1b, 0xae, 0xe0, 0x78, 0x40, 0x79, 0xba, 0xd6, 0xe6, 0x56, 0x7c,
- 0x6f, 0x77, 0xbe, 0x30, 0x73, 0x59, 0xc7, 0xac, 0xe9, 0x1e, 0x80, 0x4c,
- 0xab, 0x72, 0xc4, 0x16, 0x5c, 0x6e, 0x4b, 0xd1, 0xe2, 0x63, 0x14, 0xa7,
- 0x01, 0xaa, 0xe9, 0xa0, 0x2c, 0x53, 0xe7, 0x8b, 0x7e, 0xa7, 0xf5, 0xf6,
- 0x0b, 0x8a, 0x6d, 0x45, 0x0a, 0x93, 0x6d, 0xd6, 0x6e, 0x33, 0xef, 0x49,
- 0x2f, 0xa6, 0x23, 0x31, 0x9c, 0x7e, 0x99, 0x96, 0xcb, 0xb2, 0x11, 0x96,
- 0xa8, 0x19, 0xfa, 0xf0, 0xc8, 0x42, 0x47, 0xe0, 0x05, 0xf7, 0x5e, 0x53,
- 0x08, 0x7b, 0x6c, 0x0e, 0x2c, 0x11, 0x59, 0xa8, 0x36, 0xc6, 0x11, 0xd0,
- 0x10, 0x18, 0xe6, 0xa7, 0x2e, 0xae, 0x1c, 0xf0, 0x45, 0xef, 0x47, 0x87,
- 0xdb, 0xc9, 0xa3, 0x2d, 0x16, 0xd1, 0xef, 0xff, 0x6e, 0x5f, 0x02, 0x92,
- 0xe2, 0x1f, 0xb6, 0x5e, 0x56, 0x08, 0xab, 0x5d, 0xea, 0xfe, 0xbd, 0xb7,
- 0xc9, 0xc8, 0xca, 0x20, 0x4b, 0x90, 0x9b, 0xfb, 0xbd, 0xab, 0x10, 0xea,
- 0x9a, 0x88, 0xe6, 0xc9, 0xbd, 0x48, 0x4a, 0x0d, 0x9d, 0x40, 0x24, 0xcd,
- 0xbf, 0x70, 0x45, 0x5c, 0x7a, 0x85, 0x24, 0x46, 0x76, 0xfc, 0x4b, 0x22,
- 0x9c, 0x90, 0xd7, 0x5f, 0x72, 0x15, 0xed, 0x49, 0xf0, 0xa1, 0x81, 0xb3,
- 0x3c, 0x2a, 0x9f, 0x37, 0xa5, 0x10, 0x76, 0x48, 0xee, 0x63, 0x37, 0x7e,
- 0xdf, 0x17, 0xb8, 0x11, 0xa5, 0x6e, 0x9e, 0x2e, 0x8d, 0xd9, 0x3e, 0xb3,
- 0x22, 0xac, 0xf3, 0x27, 0x7b, 0xfd, 0x40, 0x99, 0xee, 0x35, 0x6a, 0x1a,
- 0xb2, 0xe7, 0x91, 0xe5, 0xa4, 0xa0, 0x4e, 0x1e, 0xd3, 0xf8, 0xef, 0x23,
- 0xad, 0x7c, 0xc4, 0xce, 0x2c, 0x49, 0xea, 0x9a, 0x98, 0x56, 0x1a, 0x14,
- 0xee, 0x6e, 0xd5, 0xe3, 0x5a, 0x89, 0x27, 0xd8, 0x1d, 0x27, 0xdf, 0x58,
- 0x8a, 0xb4, 0x84, 0x88, 0xb4, 0xc5, 0x1b, 0x20, 0x90, 0xc2, 0x8a, 0x8b,
- 0x4a, 0x43, 0x50, 0xa3, 0xe1, 0xad, 0x64, 0x83, 0xb1, 0xd4, 0x9b, 0x83,
- 0x7a, 0xee, 0x9d, 0xf3, 0x70, 0x61, 0xb2, 0x3e, 0xd4, 0x7f, 0xbc, 0x48,
- 0x81, 0xd6, 0x47, 0x91, 0x12, 0x84, 0x5d, 0x78, 0x65, 0xa7, 0x93, 0xe0,
- 0xfc, 0x48, 0xdd, 0x99, 0xc8, 0x45, 0x26, 0xec, 0x3f, 0xde, 0x9c, 0x6a,
- 0x45, 0x8d, 0xe9, 0xb3, 0x4f, 0xe7, 0x3d, 0xd2, 0xf9, 0xdc, 0x6a, 0x10,
- 0x33, 0x49, 0x72, 0x86, 0xcb, 0xaa, 0xe5, 0xfb, 0xf9, 0x89, 0x31, 0x0a,
- 0xbb, 0x6e, 0xe3, 0xe3, 0xbd, 0xc2, 0x32, 0xa1, 0xb5, 0x52, 0x68, 0x25,
- 0xcc, 0xd7, 0x8a, 0xbc, 0x04, 0x92, 0x4b, 0xd8, 0x3a, 0xe0, 0xae, 0xba,
- 0x36, 0xb8, 0xd3, 0xa8, 0x91, 0x2e, 0xf4, 0x19, 0x97, 0xed, 0x41, 0x32,
- 0xc4, 0x34, 0x8d, 0x7d, 0x06, 0xb7, 0x4c, 0x81, 0x07, 0x17, 0xc3, 0xfa,
- 0xca, 0xb2, 0x32, 0x89, 0xba, 0x8f, 0x37, 0xe7, 0xb0, 0x2c, 0x59, 0x2f,
- 0x59, 0xb7, 0x32, 0x02, 0x4e, 0x5a, 0x5f, 0x99, 0xea, 0x82, 0xe8, 0x8a,
- 0x78, 0x8d, 0xb3, 0xc5, 0xdf, 0x1e, 0xad, 0x49, 0xa5, 0x8c, 0xa2, 0x4d,
- 0x43, 0x50, 0x14, 0xcb, 0xd9, 0x96, 0x02, 0x1c, 0xdb, 0x3d, 0xa8, 0xc0,
- 0xc1, 0x1f, 0x6a, 0x0e, 0x79, 0x30, 0x8d, 0x14, 0x95, 0xa7, 0x8d, 0xe8,
- 0x4e, 0xb6, 0xa1, 0xbc, 0x97, 0x24, 0x3f, 0xa7, 0x39, 0xb8, 0x94, 0x3f,
- 0x14, 0x69, 0xd0, 0xec, 0xa7, 0x9e, 0x47, 0x21, 0x16, 0x27, 0x1a, 0xae,
- 0xb0, 0x0f, 0x50, 0x2d, 0x64, 0x21, 0x9e, 0x7d, 0xa2, 0x28, 0x48, 0x30,
- 0xae, 0xbb, 0x0c, 0x27, 0xb9, 0x48, 0xed, 0xe6, 0x9a, 0xa5, 0xd3, 0x0f,
- 0x34, 0x37, 0x4d, 0x55, 0xa9, 0x82, 0x78, 0xb6, 0x6c, 0x3d, 0xc0, 0x98,
- 0x10, 0x73, 0x4e, 0x56, 0xd4, 0x97, 0x1f, 0x28, 0x2b, 0x62, 0x43, 0xaa,
- 0x4e, 0x14, 0x71, 0xea, 0x25, 0xbd, 0x6e, 0x86, 0x3e, 0x71, 0xaf, 0x96,
- 0x71, 0xfe, 0x81, 0x5d, 0x94, 0x4c, 0x51, 0x44, 0xd5, 0x7a, 0x21, 0x12,
- 0x96, 0x0f, 0x54, 0xae, 0x50, 0xe1, 0xa0, 0x7d, 0xc8, 0x55, 0xd2, 0xb2,
- 0xac, 0x25, 0x0d, 0x37, 0xac, 0x8f, 0xcb, 0xd5, 0xb3, 0xf9, 0x45, 0x83,
- 0x0a, 0x8a, 0x9e, 0x47, 0x1e, 0xb8, 0xc9, 0xc2, 0x56, 0x24, 0x64, 0x7b,
- 0x33, 0xcb, 0x1f, 0x6f, 0x4e, 0x89, 0xf2, 0x23, 0x66, 0x14, 0x2f, 0x16,
- 0xda, 0xdb, 0x87, 0x37, 0xe1, 0x37, 0x99, 0xaf, 0x96, 0xa7, 0xdb, 0x26,
- 0xc6, 0x1b, 0xd9, 0xc4, 0xb7, 0xd9, 0x68, 0x59, 0xdc, 0x48, 0x56, 0x79,
- 0x16, 0x7d, 0x98, 0x67, 0x05, 0xc0, 0xfb, 0xb5, 0x49, 0x3f, 0x52, 0x37,
- 0x2f, 0x5c, 0x06, 0xc6, 0xd4, 0x53, 0x9e, 0xf6, 0x3f, 0xb4, 0x0e, 0x12,
- 0xa5, 0x64, 0xf9, 0x87, 0x3c, 0x09, 0x08, 0x0a, 0x2e, 0xe9, 0x9a, 0xce,
- 0x22, 0xa9, 0x5e, 0x83, 0x0f, 0x8d, 0x2e, 0x2d, 0xbc, 0x65, 0x25, 0x86,
- 0xd3, 0x26, 0xe9, 0xd7, 0x41, 0x26, 0x05, 0xb0, 0x80, 0xc3, 0x47, 0x3f,
- 0xc8, 0x19, 0xb4, 0x06, 0xbb, 0x00, 0xdb, 0x7b, 0x29, 0x68, 0x6c, 0xce,
- 0xd8, 0x40, 0xc4, 0x6c, 0x89, 0xa9, 0xad, 0x37, 0xc7, 0x66, 0x13, 0xb1,
- 0x2e, 0xdf, 0xb1, 0xe2, 0xb6, 0x86, 0x24, 0x2d, 0x48, 0x73, 0xdd, 0xc9,
- 0x07, 0x04, 0x35, 0xaf, 0xb3, 0xe6, 0x8f, 0x07, 0xd5, 0xdb, 0x1e, 0xef,
- 0x9f, 0x38, 0xdc, 0xc2, 0x2d, 0x8f, 0x9c, 0x7e, 0xe1, 0x3f, 0x3d, 0x47,
- 0x79, 0x3d, 0x48, 0xa2, 0x1f, 0x47, 0x0a, 0x52, 0x2b, 0xc0, 0x65, 0x8c,
- 0xd6, 0xf2, 0x49, 0x11, 0xbe, 0xc8, 0x5f, 0x6a, 0x4d, 0xcb, 0xfb, 0xb8,
- 0xf8, 0xd0, 0xe8, 0x62, 0xd1, 0xc6, 0xaa, 0x8b, 0x20, 0xd6, 0x1f, 0x8d,
- 0x94, 0x01, 0x51, 0x47, 0x62, 0xd4, 0xfa, 0x18, 0xae, 0xae, 0x39, 0xe1,
- 0x48, 0x05, 0x77, 0x61, 0x2a, 0xc1, 0x7a, 0x85, 0xf9, 0x91, 0x1f, 0xbc,
- 0xc6, 0xdb, 0x92, 0x27, 0x31, 0x56, 0x8c, 0xfc, 0xe3, 0x8f, 0xcf, 0xaf,
- 0xce, 0xcb, 0x03, 0x5c, 0x20, 0xc0, 0xe9, 0x34, 0x0f, 0xcf, 0x48, 0x8f,
- 0xd6, 0x07, 0xd6, 0x8c, 0x63, 0x28, 0xe5, 0x12, 0x0c, 0x8f, 0x51, 0x9d,
- 0x41, 0x58, 0xc5, 0xb7, 0x66, 0x96, 0x7e, 0x8b, 0xac, 0xa2, 0x3b, 0x50,
- 0x41, 0x52, 0x9d, 0x27, 0xc9, 0xc4, 0x50, 0xb3, 0x48, 0x30, 0xe1, 0xe3,
- 0x53, 0x26, 0x1f, 0xc3, 0xe4, 0x0a, 0xda, 0xc2, 0x26, 0xba, 0x58, 0xfa,
- 0x73, 0xf2, 0xde, 0x40, 0x5e, 0x42, 0xe1, 0xc0, 0xa7, 0xc7, 0x4b, 0x5c,
- 0xa7, 0x88, 0x3e, 0x2c, 0x9f, 0xdb, 0xd3, 0x2d, 0x27, 0x10, 0xad, 0x69,
- 0x48, 0x55, 0xf4, 0x71, 0xad, 0xad, 0x8d, 0x02, 0x43, 0x5b, 0xea, 0xaf,
- 0x78, 0xb4, 0x2d, 0x0b, 0x80, 0x70, 0xc3, 0x82, 0xe8, 0xfb, 0x81, 0xcd,
- 0x6a, 0x93, 0x8c, 0xd1, 0xa3, 0x2b, 0xd6, 0xa0, 0xcc, 0x5a, 0xe4, 0xa6,
- 0xf5, 0xe3, 0x0f, 0xf4, 0xce, 0xc7, 0x7b, 0x84, 0x39, 0xd1, 0xa4, 0xb6,
- 0x8d, 0x66, 0x49, 0x92, 0x64, 0xe2, 0xf7, 0x81, 0xbb, 0x8e, 0xd9, 0xeb,
- 0x17, 0x20, 0xf0, 0xc8, 0x33, 0x81, 0x5a, 0x4a, 0x2a, 0x45, 0xb1, 0xcc,
- 0x05, 0xad, 0xf7, 0xc3, 0xa4, 0xe4, 0xce, 0xbf, 0xb5, 0xc7, 0xf1, 0xbb,
- 0x3c, 0x95, 0x05, 0x57, 0x74, 0xc4, 0x59, 0x5a, 0x33, 0x2a, 0xb7, 0x9f,
- 0x58, 0x10, 0x1b, 0x96, 0x45, 0xce, 0xfd, 0x4a, 0xa3, 0x92, 0xd6, 0x3e,
- 0x62, 0x4c, 0x8a, 0xac, 0xf3, 0x9e, 0x83, 0xbb, 0x75, 0x4c, 0x87, 0xf2,
- 0x51, 0xff, 0x92, 0x3f, 0x52, 0x6a, 0xb0, 0x95, 0xe6, 0x93, 0x62, 0xb9,
- 0x53, 0xbd, 0x96, 0xb2, 0xbd, 0x51, 0x5b, 0x04, 0x2f, 0xb4, 0x8a, 0x79,
- 0x13, 0x8a, 0x8f, 0xb4, 0x01, 0x13, 0xe2, 0xb8, 0xb2, 0xe4, 0x5b, 0xad,
- 0x6b, 0x4e, 0x5d, 0x92, 0xba, 0x1d, 0xb9, 0x6f, 0x90, 0x1f, 0x9f, 0x1a,
- 0x0c, 0xc8, 0x18, 0x7e, 0x94, 0x8f, 0xe3, 0x1f, 0x1f, 0x91, 0x70, 0xce,
- 0x63, 0x30, 0x1e, 0x5c, 0xb8, 0x31, 0xd0, 0x10, 0xfc, 0x87, 0xe2, 0x30,
- 0x03, 0x75, 0x06, 0x95, 0xd9, 0xd3, 0xf9, 0x47, 0x89, 0x42, 0xed, 0x5a,
- 0x45, 0x73, 0x1c, 0xd6, 0xdd, 0x7b, 0xa8, 0x2c, 0x92, 0xf1, 0x1d, 0x57,
- 0x88, 0x1c, 0xcb, 0xe8, 0xea, 0xa3, 0x30, 0x2f, 0xed, 0x8b, 0xcb, 0x19,
- 0x43, 0xfa, 0xd0, 0x38, 0x74, 0x32, 0x5a, 0x34, 0xa6, 0x5a, 0x1b, 0x1e,
- 0xe9, 0xe3, 0x50, 0x09, 0xc7, 0x9c, 0xae, 0xc7, 0x4a, 0xf8, 0x07, 0x2e,
- 0x5b, 0xd7, 0xa0, 0xe6, 0x3f, 0x01, 0x90, 0x40, 0x12, 0xc0, 0x1a, 0x79,
- 0xa8, 0xcd, 0xcc, 0xed, 0x2b, 0xd2, 0x0b, 0x81, 0xf5, 0xf8, 0x1e, 0x90,
- 0x88, 0x4c, 0x73, 0x86, 0x51, 0x8e, 0x0f, 0xcc, 0x6a, 0x2e, 0xd8, 0x54,
- 0xcb, 0x85, 0x14, 0xbe, 0x63, 0x1c, 0x86, 0x0c, 0x16, 0xef, 0x0f, 0x15,
- 0x3e, 0x6c, 0xc1, 0x5e, 0xb7, 0x18, 0xfb, 0x5a, 0x56, 0x79, 0x53, 0xbb,
- 0x2b, 0x8a, 0xe9, 0x7b, 0x7a, 0x32, 0xbd, 0x5a, 0xbd, 0x17, 0x16, 0xff,
- 0xe1, 0x2b, 0x54, 0x9e, 0xb3, 0x93, 0xc2, 0x2e, 0x15, 0x3a, 0xc3, 0x24,
- 0xdf, 0x25, 0x24, 0x8d, 0x5d, 0x89, 0xe1, 0x35, 0x42, 0x93, 0xe9, 0xf8,
- 0xa3, 0xb4, 0x3f, 0xa7, 0x15, 0xbb, 0x33, 0x37, 0x60, 0xf8, 0x22, 0x78,
- 0x80, 0x61, 0x57, 0xd3, 0xb6, 0x3e, 0x2c, 0x63, 0x71, 0x23, 0x1e, 0x95,
- 0xfd, 0x31, 0xf1, 0xfb, 0xd7, 0x8b, 0x95, 0x70, 0x99, 0xa1, 0x1f, 0x57,
- 0x87, 0xaa, 0x1a, 0xca, 0xef, 0x4b, 0x1e, 0xad, 0xcb, 0x8f, 0x46, 0x86,
- 0xdc, 0x3f, 0x89, 0x29, 0xf0, 0xd1, 0xf9, 0xd0, 0xc9, 0x43, 0x2a, 0x50,
- 0x2f, 0x6d, 0x29, 0x28, 0xca, 0x10, 0x8a, 0xa4, 0x6c, 0x4f, 0x0b, 0x7b,
- 0x58, 0xb9, 0xb8, 0x7b, 0x99, 0x42, 0xce, 0x85, 0x51, 0xd6, 0xe4, 0xb3,
- 0xa0, 0xcc, 0x8b, 0x20, 0x27, 0xc5, 0x1b, 0x2d, 0x6a, 0xa3, 0x8f, 0xc0,
- 0x29, 0x24, 0xa1, 0x47, 0x5a, 0xef, 0x20, 0xd0, 0xdc, 0x46, 0xdc, 0x96,
- 0x6c, 0x19, 0xfa, 0xfa, 0xe3, 0x69, 0x68, 0x3f, 0x0f, 0x14, 0x08, 0x85,
- 0x1a, 0xe1, 0x48, 0x7e, 0x44, 0xc0, 0x05, 0xeb, 0xdf, 0x16, 0x73, 0x06,
- 0xae, 0x4b, 0x4a, 0x06, 0x4d, 0x60, 0xba, 0x52, 0x9c, 0x52, 0xae, 0xfa,
- 0x2c, 0xe6, 0x22, 0x7e, 0x57, 0x22, 0x26, 0x41, 0xa9, 0x16, 0xea, 0x47,
- 0xdf, 0x37, 0x4d, 0xf0, 0xae, 0x8a, 0x96, 0x53, 0x61, 0x82, 0xe1, 0x49,
- 0x28, 0x41, 0xa3, 0x00, 0x85, 0x33, 0x00, 0x36, 0x2b, 0x90, 0xe1, 0xea,
- 0xe3, 0x9a, 0x98, 0x62, 0xec, 0xc3, 0x7a, 0xd5, 0xcb, 0x34, 0xd9, 0xe6,
- 0xc0, 0xe6, 0x0c, 0xa4, 0x18, 0x5f, 0x62, 0xb1, 0x1e, 0xd8, 0x50, 0x2b,
- 0xd0, 0xb5, 0xce, 0xf2, 0xe9, 0x8a, 0x8d, 0x48, 0x4b, 0x88, 0x56, 0xdc,
- 0xed, 0x05, 0x74, 0x00, 0x15, 0xb8, 0x81, 0x2f, 0xea, 0xea, 0xd2, 0x34,
- 0x40, 0x42, 0xd8, 0xd2, 0x13, 0xaf, 0x0c, 0xa3, 0x46, 0xda, 0x68, 0x25,
- 0xc1, 0x5e, 0x10, 0xa2, 0x6b, 0xa5, 0xba, 0x5a, 0xcb, 0x9a, 0x5a, 0xf9,
- 0x82, 0x4d, 0x0d, 0x3d, 0xdf, 0x72, 0xb1, 0x02, 0x09, 0x9d, 0x28, 0x70,
- 0x03, 0xb8, 0x80, 0xfe, 0xf4, 0x68, 0x0c, 0xe1, 0xaf, 0xc4, 0x1a, 0xbe,
- 0x47, 0x98, 0x90, 0x5c, 0x66, 0x6b, 0xab, 0x6b, 0x30, 0x19, 0x19, 0x6e,
- 0x6e, 0x0a, 0x27, 0xea, 0x98, 0xb4, 0x07, 0xd2, 0x43, 0xec, 0x4d, 0x2d,
- 0xd7, 0x18, 0xa6, 0x5c, 0x7d, 0x64, 0x91, 0x41, 0x50, 0xb7, 0x43, 0xdb,
- 0xbf, 0xac, 0x70, 0x1e, 0x27, 0xa7, 0x0a, 0xd2, 0xd9, 0x9a, 0x3a, 0x02,
- 0x61, 0xb6, 0x87, 0x2c, 0xbc, 0x8e, 0x06, 0x31, 0x10, 0xf7, 0x69, 0xa1,
- 0x51, 0x57, 0x0a, 0x29, 0xa7, 0xe9, 0x5c, 0xf0, 0xff, 0x7f, 0x75, 0x7c,
- 0xb9, 0xd5, 0x04, 0x30, 0x8a, 0x27, 0x7e, 0x64, 0x80, 0xb2, 0xd4, 0xf3,
- 0x20, 0x3e, 0x51, 0xa8, 0x8a, 0x96, 0x40, 0x28, 0x8a, 0x4e, 0xf2, 0xb0,
- 0x98, 0xc6, 0x73, 0xad, 0xaa, 0x56, 0x6b, 0xee, 0x90, 0x96, 0x81, 0x39,
- 0x59, 0x10, 0x26, 0xa4, 0x5e, 0x77, 0x57, 0x71, 0xdd, 0x29, 0xdc, 0x48,
- 0xd1, 0xe1, 0x16, 0x8f, 0x8e, 0x4f, 0x8f, 0x2f, 0x8f, 0x11, 0x41, 0xdd,
- 0x10, 0x49, 0xa6, 0x28, 0x7e, 0x5c, 0x26, 0xe3, 0x9b, 0x79, 0x46, 0x77,
- 0xaf, 0x84, 0x74, 0xd0, 0x4d, 0xff, 0x5d, 0x32, 0x3a, 0x3a, 0xf8, 0x56,
- 0x42, 0x1a, 0x8a, 0xe8, 0xfc, 0xe2, 0xec, 0xfc, 0xf5, 0xc9, 0xdb, 0xa3,
- 0x5e, 0x74, 0x78, 0x76, 0xfe, 0x43, 0x2f, 0x7a, 0x73, 0xf6, 0xed, 0x71,
- 0x8b, 0x4f, 0x91, 0xfd, 0xd9, 0xcd, 0x8c, 0xb3, 0xd7, 0x6b, 0x76, 0x3b,
- 0x44, 0xa4, 0xd4, 0xad, 0x0e, 0x12, 0x7d, 0x4e, 0x4f, 0x86, 0x97, 0xd8,
- 0xfa, 0x7a, 0xbc, 0x17, 0x62, 0xda, 0x05, 0x78, 0x3d, 0x2d, 0x2c, 0x80,
- 0x83, 0xab, 0x86, 0xfd, 0x76, 0x54, 0xbd, 0xe2, 0xf0, 0x1e, 0x96, 0xda,
- 0x15, 0xfb, 0x8a, 0xff, 0x6d, 0xc1, 0x4c, 0x8c, 0xbd, 0xe6, 0xc1, 0xfe,
- 0x5e, 0x2d, 0xf6, 0x73, 0x23, 0x79, 0x39, 0xf4, 0xb2, 0xe0, 0x34, 0x8d,
- 0x6a, 0xf2, 0x7a, 0x34, 0x59, 0xe6, 0x4d, 0x89, 0x27, 0x8e, 0x82, 0x0e,
- 0x25, 0x57, 0xa9, 0x57, 0x51, 0xda, 0xd8, 0xfb, 0x58, 0xf8, 0x82, 0x1e,
- 0xd4, 0x7d, 0xf0, 0x42, 0xc3, 0xb1, 0x23, 0x88, 0x95, 0x21, 0x02, 0x59,
- 0x38, 0x24, 0x9b, 0xf6, 0x2e, 0x29, 0xf8, 0x53, 0x86, 0x3b, 0xe2, 0x9b,
- 0x48, 0x70, 0x88, 0x7e, 0x78, 0xbc, 0x94, 0xb1, 0x84, 0x18, 0x86, 0xbe,
- 0x78, 0x61, 0x3e, 0x4b, 0x07, 0x8c, 0x89, 0xcb, 0x3c, 0x86, 0x0b, 0x28,
- 0xc2, 0x9a, 0x34, 0xb5, 0x13, 0xd5, 0x0e, 0x24, 0xc8, 0x21, 0x48, 0x40,
- 0x43, 0x44, 0x24, 0xdd, 0x2e, 0x72, 0x4a, 0x88, 0xeb, 0xf7, 0x24, 0x13,
- 0x13, 0x90, 0xd5, 0xfa, 0x5e, 0xbf, 0xc5, 0x40, 0xc2, 0x82, 0xf3, 0x1a,
- 0x7e, 0xfe, 0xeb, 0xd1, 0xc4, 0x0f, 0x8e, 0x26, 0x64, 0x0d, 0x5f, 0xe2,
- 0x8f, 0x5f, 0x44, 0x15, 0x01, 0xa4, 0x97, 0xe8, 0x84, 0x9b, 0xe9, 0xbc,
- 0x4a, 0x1e, 0xfd, 0x46, 0x56, 0xc3, 0x64, 0x4b, 0xcd, 0x4b, 0xc1, 0x6e,
- 0xab, 0x5d, 0x87, 0xe5, 0xa2, 0x2a, 0x51, 0x54, 0x28, 0xa2, 0x45, 0x9c,
- 0x91, 0x2d, 0x96, 0x70, 0xe1, 0x94, 0xa1, 0x98, 0xa5, 0xc2, 0x3c, 0x24,
- 0x9f, 0xdf, 0x70, 0xe9, 0x7e, 0xe6, 0xcc, 0x67, 0x7a, 0xbc, 0x0f, 0xf2,
- 0x7f, 0x39, 0x61, 0xf1, 0x99, 0x98, 0x9e, 0x86, 0x17, 0xad, 0x45, 0x18,
- 0xdf, 0x22, 0x66, 0x2a, 0x1c, 0x3c, 0x56, 0xeb, 0x2d, 0x8b, 0x1f, 0x9c,
- 0xa5, 0x3e, 0x62, 0xb4, 0x3f, 0xad, 0xdb, 0x31, 0xd1, 0xda, 0xf0, 0x58,
- 0xe1, 0x96, 0x9b, 0x5f, 0x2b, 0x2d, 0x2b, 0x78, 0x23, 0x1f, 0x3f, 0x7a,
- 0xdc, 0x55, 0xaa, 0x59, 0xd3, 0xa4, 0xda, 0x1a, 0xf9, 0xdb, 0x16, 0x7a,
- 0x73, 0x10, 0xed, 0xe1, 0x34, 0x4c, 0x28, 0x40, 0x1d, 0x17, 0x04, 0x90,
- 0x10, 0x53, 0xc3, 0x33, 0x12, 0x42, 0x50, 0x70, 0x97, 0x0d, 0xe5, 0x9a,
- 0x0d, 0x73, 0x16, 0x11, 0xa9, 0x28, 0x11, 0x08, 0x5e, 0xf0, 0xc0, 0xb9,
- 0x34, 0x4a, 0xb5, 0xc9, 0x1a, 0xec, 0xaa, 0x81, 0x14, 0xb7, 0x64, 0x70,
- 0x68, 0x60, 0x82, 0x4f, 0x92, 0xd4, 0x30, 0x6e, 0xe5, 0xb3, 0xbf, 0x53,
- 0x00, 0x4c, 0x5c, 0x73, 0x48, 0x7a, 0xa7, 0xb6, 0x78, 0x8c, 0x9c, 0xf0,
- 0xbe, 0x26, 0xe3, 0xbd, 0x90, 0x94, 0xf7, 0xda, 0x64, 0xf5, 0x06, 0x6b,
- 0x97, 0x9f, 0x84, 0xef, 0xd4, 0xde, 0x50, 0xdc, 0x6c, 0xd4, 0x85, 0xda,
- 0xec, 0x6f, 0xb9, 0xb8, 0x49, 0x40, 0x8a, 0xca, 0x36, 0x37, 0xed, 0x21,
- 0xb1, 0xb3, 0x4c, 0xb8, 0xc8, 0xdb, 0x6c, 0x3a, 0xf1, 0xe7, 0xc9, 0xb2,
- 0x95, 0xb8, 0xb3, 0x6d, 0xb1, 0x7b, 0xba, 0xaa, 0x94, 0x45, 0x53, 0xfe,
- 0x6e, 0x34, 0x36, 0x4f, 0xee, 0xc3, 0xc6, 0xbc, 0xec, 0xe0, 0x1a, 0xfc,
- 0x2d, 0x43, 0xd0, 0x19, 0x83, 0x0f, 0x5a, 0x77, 0xd1, 0x8a, 0xca, 0xcb,
- 0x29, 0xee, 0x01, 0x84, 0x9f, 0x69, 0x4c, 0x10, 0x54, 0x02, 0x1b, 0x73,
- 0x5f, 0xac, 0x05, 0x20, 0x31, 0x43, 0x27, 0x6d, 0x4b, 0xbd, 0xee, 0x9f,
- 0xd2, 0x31, 0x74, 0xb5, 0x4b, 0x74, 0xdc, 0xd5, 0x8a, 0xb3, 0x61, 0xa5,
- 0x7a, 0x29, 0x5a, 0xca, 0xc9, 0x8a, 0xed, 0xd9, 0x3d, 0x20, 0x35, 0xd7,
- 0x75, 0xc5, 0xe8, 0x1d, 0x75, 0x38, 0xbc, 0x7d, 0x54, 0x2c, 0xf3, 0xc9,
- 0x72, 0xd6, 0x09, 0xb3, 0xe0, 0x75, 0x61, 0x98, 0x81, 0x36, 0x2b, 0xdc,
- 0xf3, 0x25, 0x44, 0xbd, 0x3e, 0xdb, 0xa9, 0x59, 0xd0, 0x0d, 0x9f, 0x30,
- 0x40, 0x24, 0xec, 0xef, 0x86, 0xf4, 0x43, 0xed, 0x35, 0x84, 0xc4, 0x92,
- 0xef, 0xb5, 0xdf, 0x70, 0xf3, 0x76, 0x68, 0x31, 0x59, 0x00, 0xdf, 0x1d,
- 0xec, 0xb4, 0x8b, 0xbb, 0x1c, 0xbd, 0x37, 0x4e, 0x7c, 0x71, 0xed, 0x94,
- 0xd4, 0x57, 0x1e, 0x6d, 0xe1, 0x25, 0x37, 0x89, 0xcb, 0x70, 0x75, 0x88,
- 0xf5, 0x90, 0xd6, 0xaf, 0x80, 0x2b, 0x57, 0x8d, 0xb7, 0x70, 0x5c, 0x01,
- 0x69, 0xe9, 0x89, 0x98, 0xd3, 0xf7, 0x9d, 0xa8, 0x19, 0x0c, 0x6f, 0x97,
- 0x59, 0xee, 0xb4, 0xb8, 0xdb, 0x6d, 0x2d, 0x61, 0x51, 0x1b, 0x1a, 0x4b,
- 0x62, 0x97, 0xa7, 0x43, 0x17, 0x20, 0xbc, 0x2b, 0x22, 0xb8, 0xc3, 0x3f,
- 0xf1, 0xb5, 0xeb, 0xd7, 0xd4, 0x66, 0xe7, 0x97, 0x55, 0x08, 0xf7, 0x43,
- 0xd8, 0xe3, 0x0b, 0xb3, 0x98, 0xde, 0xed, 0xb5, 0x0e, 0xc1, 0xc6, 0x50,
- 0x19, 0x04, 0x1b, 0x5a, 0x6c, 0x10, 0x7b, 0xcd, 0x41, 0x3c, 0x56, 0x1e,
- 0x9e, 0x5f, 0x6d, 0x0c, 0xe1, 0x89, 0x0e, 0xe1, 0xc9, 0xc7, 0xae, 0x42,
- 0x38, 0x80, 0x27, 0xbf, 0x74, 0x15, 0x5a, 0x87, 0xf0, 0x94, 0x03, 0xea,
- 0x17, 0x77, 0x4f, 0x5b, 0x32, 0x7b, 0xcc, 0x26, 0x06, 0x56, 0x05, 0xb4,
- 0x94, 0xa9, 0x14, 0xe3, 0xf4, 0x2e, 0x73, 0x2e, 0x43, 0x68, 0x05, 0x45,
- 0x33, 0xef, 0x61, 0x3a, 0xa9, 0x57, 0x1c, 0xd4, 0x31, 0x7b, 0xe0, 0x6b,
- 0x41, 0x81, 0xb9, 0xd2, 0x5f, 0x38, 0xc6, 0xb8, 0xaf, 0x3d, 0xd4, 0x8a,
- 0x4c, 0x4b, 0x99, 0xdc, 0x35, 0xb1, 0xce, 0x48, 0x78, 0x14, 0x44, 0x33,
- 0x2d, 0xa0, 0x93, 0x71, 0x5b, 0x4f, 0x6d, 0x50, 0x89, 0x04, 0x9e, 0x06,
- 0xd3, 0x7d, 0x2e, 0xd3, 0x7d, 0xfe, 0x7f, 0xd3, 0x74, 0x9f, 0xaf, 0x9f,
- 0xee, 0x27, 0x62, 0x55, 0x00, 0x66, 0x68, 0x7f, 0x14, 0xe7, 0x6b, 0x51,
- 0x95, 0x2d, 0x5c, 0xd2, 0x01, 0x8c, 0x56, 0xc2, 0xfe, 0x0b, 0x41, 0x66,
- 0x92, 0x6f, 0xa8, 0x99, 0xf5, 0xac, 0xa0, 0x22, 0xd1, 0x33, 0x54, 0x52,
- 0x51, 0xa6, 0x63, 0xe6, 0x73, 0x5c, 0x0d, 0xc5, 0xc5, 0xf9, 0xfe, 0xf7,
- 0xf6, 0xa0, 0xb5, 0x22, 0xe7, 0x51, 0xb3, 0x66, 0x66, 0x2f, 0x02, 0xa6,
- 0x6e, 0x50, 0x7a, 0x33, 0x40, 0xb8, 0xa1, 0x76, 0x8f, 0xdf, 0x7e, 0x7b,
- 0x72, 0x71, 0xf6, 0xf6, 0xcd, 0xf1, 0x5b, 0x17, 0x6d, 0x73, 0x89, 0xfa,
- 0x83, 0x6d, 0x56, 0xb4, 0xb6, 0xba, 0x2b, 0x22, 0xff, 0xc2, 0x94, 0xc3,
- 0x69, 0xb3, 0x8b, 0x85, 0xfe, 0x35, 0x08, 0x9b, 0x0b, 0x1e, 0xb2, 0xe3,
- 0xc7, 0x42, 0xd9, 0x82, 0x7d, 0x03, 0x13, 0x8e, 0x71, 0x1b, 0x48, 0xe8,
- 0x91, 0x2b, 0x9d, 0xce, 0xb6, 0xb7, 0x87, 0x71, 0xb2, 0xb0, 0xf5, 0xf3,
- 0xf7, 0x89, 0x16, 0x6e, 0x0c, 0xa2, 0xd6, 0x2a, 0x83, 0xf0, 0x9b, 0x17,
- 0x34, 0xf8, 0xa3, 0x19, 0xaf, 0xf6, 0xb7, 0xb7, 0x7f, 0x02, 0x0e, 0xe0,
- 0xe7, 0x6a, 0xdf, 0x6c, 0x5e, 0xc9, 0xa1, 0x21, 0xc7, 0xd7, 0x06, 0xb1,
- 0x3c, 0x3f, 0x58, 0xcc, 0x36, 0x02, 0x7f, 0xd6, 0xf0, 0x3d, 0xe9, 0xd2,
- 0xdf, 0xff, 0xf0, 0x2b, 0x77, 0x31, 0xac, 0x94, 0xa4, 0xf8, 0xd5, 0xbb,
- 0xa8, 0x68, 0xd7, 0x07, 0xa7, 0xa7, 0xbf, 0x6a, 0x07, 0x50, 0x39, 0xbc,
- 0xbd, 0xb0, 0xef, 0xec, 0x85, 0x96, 0x24, 0xd9, 0x50, 0x66, 0x2b, 0xda,
- 0xc9, 0xdb, 0x33, 0x1d, 0x8d, 0x98, 0x9b, 0xfa, 0x56, 0xed, 0x65, 0xe2,
- 0x2a, 0x29, 0xf2, 0xc0, 0x1a, 0x38, 0xd5, 0xf8, 0x12, 0xa2, 0x93, 0x03,
- 0xec, 0x34, 0xab, 0x2f, 0x50, 0xcb, 0x90, 0x92, 0x94, 0x39, 0xdb, 0xa2,
- 0x40, 0x24, 0x9a, 0xd1, 0xba, 0xc5, 0x30, 0xcc, 0x20, 0x14, 0x1c, 0xd2,
- 0x85, 0xfa, 0xbb, 0x9c, 0xce, 0xc5, 0x44, 0xa7, 0x68, 0xce, 0x25, 0x00,
- 0xf2, 0x59, 0x11, 0xc0, 0x50, 0xf8, 0x14, 0x7d, 0x7f, 0x72, 0x19, 0x1d,
- 0x9e, 0x1d, 0xf9, 0x23, 0x7a, 0x29, 0x81, 0x9c, 0x39, 0x4a, 0x26, 0x2d,
- 0xe7, 0xc4, 0xc4, 0x58, 0x5d, 0x48, 0xaf, 0x80, 0x87, 0xe6, 0x60, 0xd1,
- 0x11, 0x53, 0x67, 0x76, 0x22, 0x5a, 0x50, 0x29, 0xf8, 0x96, 0x4b, 0xa0,
- 0xdc, 0x24, 0xb0, 0x22, 0x54, 0x41, 0x82, 0x9d, 0xa9, 0x96, 0xe3, 0xa6,
- 0x19, 0x3c, 0x87, 0x58, 0x8a, 0x58, 0x1d, 0x88, 0xbb, 0x70, 0xe5, 0xb6,
- 0xb9, 0x58, 0x93, 0x48, 0xb8, 0x3a, 0xf0, 0xba, 0x44, 0x80, 0x8a, 0x26,
- 0x85, 0x70, 0x72, 0x14, 0x00, 0xd0, 0x82, 0xa3, 0x0f, 0x8c, 0xd0, 0x8e,
- 0xd1, 0x54, 0xe2, 0x3e, 0x77, 0xd5, 0xee, 0x3f, 0xf7, 0x80, 0x1a, 0x1e,
- 0xa3, 0x0a, 0xa6, 0x03, 0x4e, 0x94, 0x98, 0x58, 0xd2, 0x91, 0x81, 0x8c,
- 0x59, 0x95, 0x14, 0x29, 0x7e, 0xdd, 0xd8, 0x71, 0xd7, 0x84, 0xeb, 0x67,
- 0x4f, 0xa9, 0x5d, 0x90, 0xe4, 0x59, 0x9e, 0x12, 0xf7, 0x52, 0xfa, 0x73,
- 0x70, 0xa4, 0x9f, 0xe8, 0x60, 0x2e, 0x4e, 0x69, 0xe6, 0x53, 0xb1, 0x83,
- 0x6b, 0xcc, 0x37, 0x2a, 0xe4, 0xc0, 0x7b, 0xc2, 0xfa, 0xae, 0x16, 0x3c,
- 0xf5, 0x6f, 0x3e, 0x33, 0x73, 0x9b, 0x92, 0x82, 0x47, 0xf2, 0x54, 0x2a,
- 0x10, 0xd7, 0xae, 0x2a, 0x93, 0x4a, 0xa8, 0x12, 0x2c, 0x36, 0x86, 0xbb,
- 0x4c, 0x6c, 0xdb, 0xcd, 0xda, 0x10, 0xb5, 0x38, 0x9c, 0xe7, 0xb5, 0x7e,
- 0xac, 0x1b, 0x54, 0x23, 0x97, 0x22, 0x98, 0xe8, 0xa2, 0x1e, 0x70, 0xc5,
- 0xcd, 0x37, 0x5b, 0xfb, 0xb4, 0xbe, 0x28, 0xbe, 0x6e, 0xbc, 0xb4, 0xe8,
- 0x9e, 0xfc, 0xcc, 0x31, 0x8b, 0xe8, 0x3e, 0xe1, 0x9c, 0x28, 0x3d, 0x93,
- 0xa8, 0x69, 0x64, 0xb3, 0xb3, 0xf8, 0x09, 0x49, 0x95, 0x04, 0xd0, 0x95,
- 0xc6, 0x5b, 0x8e, 0x75, 0xbc, 0x0d, 0xfd, 0x30, 0x0f, 0x39, 0xea, 0x0b,
- 0xdf, 0x49, 0x14, 0xc3, 0x45, 0xc5, 0xa6, 0xce, 0x79, 0xea, 0x36, 0x41,
- 0xda, 0x97, 0x8f, 0xd8, 0xf3, 0x47, 0x9c, 0x39, 0x73, 0x7f, 0xeb, 0x1b,
- 0x0d, 0x9c, 0xa2, 0x5a, 0x18, 0x14, 0xaf, 0x82, 0x54, 0xe3, 0x0b, 0x6b,
- 0xf8, 0x21, 0x1a, 0x3e, 0x9e, 0xab, 0xdf, 0x42, 0x80, 0xda, 0x19, 0x9c,
- 0x3b, 0x6b, 0xc4, 0x9c, 0x66, 0x57, 0xa5, 0xab, 0x10, 0xc4, 0x2a, 0xf5,
- 0x24, 0x40, 0xb8, 0xc4, 0xa9, 0xf6, 0x8d, 0xe2, 0x0c, 0x99, 0x76, 0x0e,
- 0x07, 0x52, 0xd4, 0x70, 0xcf, 0x05, 0xd5, 0x5e, 0xfd, 0x99, 0xd8, 0xad,
- 0x2d, 0xf6, 0xf9, 0xc1, 0x70, 0x68, 0x4b, 0x0d, 0x14, 0x29, 0x5b, 0x4f,
- 0x59, 0x41, 0xf5, 0x6c, 0x22, 0x63, 0x5a, 0x53, 0x0a, 0x5b, 0x0c, 0x19,
- 0xda, 0x48, 0x2d, 0x3a, 0x62, 0xf7, 0x89, 0x5f, 0x73, 0xd7, 0xd9, 0xb7,
- 0xd2, 0x5a, 0xef, 0x23, 0x3b, 0x6b, 0xed, 0xeb, 0xdb, 0x96, 0xbe, 0x9e,
- 0xd6, 0xe6, 0xb5, 0xb7, 0xf7, 0xa9, 0xa6, 0x10, 0xd0, 0x5a, 0x1f, 0x56,
- 0x28, 0x45, 0x89, 0x43, 0x6d, 0x0d, 0xf4, 0x60, 0xdf, 0xd0, 0x22, 0x92,
- 0xd6, 0x6a, 0xd9, 0x18, 0x4c, 0xd0, 0xd5, 0x33, 0x3f, 0x2d, 0x92, 0x2a,
- 0xb8, 0x3d, 0x36, 0x7b, 0xc8, 0x31, 0x69, 0x9c, 0x1e, 0x60, 0x83, 0xf0,
- 0x51, 0x39, 0xe1, 0x91, 0x11, 0x1f, 0x5f, 0x13, 0x6f, 0x62, 0xc3, 0x08,
- 0xfa, 0xf9, 0xd4, 0xf5, 0xe3, 0x46, 0xce, 0x7a, 0xa8, 0xe4, 0xd5, 0x0f,
- 0x42, 0x8e, 0xa0, 0x34, 0x12, 0x44, 0xa4, 0xa9, 0xa3, 0xa0, 0x49, 0xb2,
- 0xfa, 0xb6, 0xef, 0x45, 0x8e, 0xdf, 0xb9, 0x16, 0xc2, 0x13, 0x50, 0x15,
- 0x94, 0x07, 0x8b, 0x2b, 0x08, 0x25, 0x52, 0x2a, 0x3d, 0xf6, 0xe6, 0xd5,
- 0x3c, 0x3c, 0xed, 0xbb, 0x2f, 0x82, 0x35, 0xb1, 0x61, 0x99, 0xad, 0x71,
- 0xdb, 0x8e, 0x8f, 0x63, 0x21, 0x22, 0xdd, 0xf1, 0xdf, 0x17, 0xc7, 0x97,
- 0x17, 0x1c, 0xd3, 0x0a, 0x98, 0x95, 0xba, 0xa6, 0x4c, 0x67, 0x6a, 0xcb,
- 0x99, 0xe5, 0xa5, 0x50, 0x47, 0xc0, 0x75, 0x3d, 0x25, 0x4b, 0x31, 0x62,
- 0xdc, 0x33, 0x9c, 0x79, 0x5d, 0xa9, 0x4d, 0xec, 0xab, 0x04, 0xc9, 0x3d,
- 0xe4, 0x23, 0x34, 0xf5, 0x64, 0xb8, 0xf5, 0xf7, 0x71, 0x3e, 0x40, 0x53,
- 0x14, 0xb6, 0xa6, 0xa1, 0xf0, 0x03, 0x75, 0xbd, 0xbb, 0xa8, 0x14, 0x49,
- 0x79, 0x8a, 0xcd, 0x43, 0xac, 0x01, 0xe5, 0x0d, 0x23, 0x91, 0xeb, 0x9c,
- 0xae, 0x49, 0x49, 0x5c, 0xb5, 0xeb, 0xd0, 0x79, 0x03, 0xa5, 0x4b, 0xf9,
- 0x14, 0x61, 0xea, 0x40, 0xdb, 0x8a, 0x9e, 0xee, 0xec, 0x34, 0x9b, 0x8b,
- 0x47, 0xd9, 0x9d, 0xb9, 0x26, 0x35, 0xe9, 0x43, 0x4a, 0xfb, 0x60, 0xbf,
- 0x70, 0x99, 0x42, 0xd7, 0xe8, 0x5f, 0x91, 0xcc, 0xcc, 0x0b, 0x66, 0x66,
- 0x84, 0x60, 0xd9, 0xe4, 0x50, 0x7e, 0x87, 0x24, 0x14, 0x5d, 0xb2, 0xea,
- 0x51, 0x94, 0xfc, 0x14, 0xc3, 0x12, 0x8c, 0xad, 0xa6, 0x21, 0x12, 0xd9,
- 0x56, 0x34, 0xfb, 0x59, 0xcb, 0x3c, 0x15, 0x24, 0x27, 0xe8, 0xe6, 0x59,
- 0x0b, 0x41, 0x44, 0xc3, 0xcb, 0xb3, 0x8b, 0x28, 0xa8, 0x48, 0x5c, 0xe5,
- 0xba, 0x88, 0x67, 0xe0, 0x27, 0x9c, 0x77, 0xb6, 0xd7, 0xe2, 0x3a, 0x70,
- 0x49, 0x92, 0x12, 0x74, 0xc4, 0xd9, 0xf6, 0xbe, 0xd7, 0xe7, 0xde, 0xd1,
- 0xa5, 0x73, 0xfb, 0x96, 0x34, 0x00, 0xce, 0x1a, 0x34, 0xb8, 0x33, 0xba,
- 0x1f, 0x49, 0xf0, 0x9e, 0x05, 0xf6, 0x97, 0x3d, 0x39, 0x67, 0x67, 0x4b,
- 0xd0, 0xba, 0xe4, 0x3b, 0x32, 0x19, 0x69, 0xe6, 0x23, 0x9b, 0xad, 0xd4,
- 0x30, 0xe5, 0x8c, 0x81, 0x75, 0x52, 0x94, 0x33, 0x74, 0xe6, 0x01, 0xed,
- 0xc4, 0xf2, 0x3f, 0xa8, 0x79, 0xfd, 0xf0, 0x39, 0x32, 0xd9, 0xd4, 0x8d,
- 0xa2, 0x24, 0xa4, 0xb5, 0x3b, 0xea, 0x9b, 0x3d, 0x26, 0x51, 0x60, 0xa2,
- 0x35, 0x7c, 0x25, 0xdc, 0xca, 0xc9, 0x46, 0x5e, 0xac, 0xd8, 0xf1, 0xeb,
- 0x7c, 0x7e, 0x76, 0x71, 0x69, 0x05, 0x6d, 0xf4, 0xde, 0xc4, 0x47, 0xb5,
- 0x13, 0xc4, 0xce, 0x7a, 0x48, 0x80, 0x41, 0x6d, 0xf3, 0xf6, 0x5a, 0xf2,
- 0x02, 0xae, 0x87, 0x56, 0xb5, 0x0d, 0x2e, 0x84, 0x91, 0xaf, 0xcc, 0xf3,
- 0xe5, 0xca, 0xe5, 0x80, 0xe5, 0x68, 0x2a, 0x0f, 0xf3, 0xe7, 0x76, 0x3f,
- 0xa6, 0x4f, 0x02, 0x7d, 0xb2, 0xdb, 0x42, 0x1d, 0x2c, 0x80, 0x5f, 0x1c,
- 0x0f, 0x2f, 0x65, 0xd5, 0xf8, 0xb7, 0xc6, 0xc8, 0x25, 0x15, 0x52, 0x3f,
- 0x6c, 0x75, 0x2c, 0x81, 0x3a, 0x38, 0x44, 0x66, 0xa6, 0x75, 0xe6, 0x9c,
- 0x37, 0x28, 0x58, 0xb3, 0x27, 0x41, 0x48, 0x1f, 0x18, 0xa7, 0xd2, 0xca,
- 0xa5, 0xd5, 0x1d, 0x8c, 0x3a, 0xda, 0x49, 0x87, 0xae, 0x5c, 0x39, 0x14,
- 0x59, 0x7e, 0x1b, 0xb4, 0xf0, 0x34, 0x60, 0x16, 0xcc, 0xdc, 0xb5, 0x81,
- 0x13, 0xb3, 0x8c, 0xf3, 0x87, 0xce, 0xf9, 0x7c, 0x9d, 0xcc, 0x8d, 0x30,
- 0xe4, 0x39, 0xdf, 0xce, 0x33, 0x97, 0x17, 0x6d, 0xe2, 0x51, 0x30, 0x14,
- 0xfe, 0xd8, 0xa2, 0xe1, 0xe1, 0x68, 0xac, 0x91, 0xdd, 0x93, 0xe7, 0x6e,
- 0x15, 0x59, 0x74, 0x76, 0xae, 0x1d, 0x99, 0x7e, 0x70, 0x17, 0xb1, 0x6b,
- 0x2c, 0x9d, 0x2f, 0x13, 0x2d, 0xda, 0x11, 0xe7, 0xd3, 0x14, 0xa1, 0xac,
- 0xe2, 0x9b, 0x69, 0x18, 0xa2, 0x35, 0xc2, 0xd0, 0xf7, 0xa3, 0x17, 0x11,
- 0xa9, 0xf1, 0x7e, 0xb7, 0x24, 0xd9, 0x10, 0x27, 0xd9, 0xcb, 0x78, 0x74,
- 0x70, 0xe7, 0xee, 0xb6, 0x18, 0x44, 0xe7, 0x8c, 0xe5, 0x0a, 0x13, 0x7b,
- 0xf1, 0x1f, 0xbe, 0x35, 0x39, 0x2c, 0x8c, 0x31, 0xce, 0xd7, 0x27, 0x84,
- 0xd3, 0x94, 0x8b, 0x70, 0xe3, 0x13, 0xfe, 0x35, 0x40, 0x86, 0x6c, 0x4c,
- 0xf9, 0x85, 0x7f, 0xb9, 0xa0, 0x89, 0x90, 0x6e, 0x52, 0x7f, 0xe4, 0xa9,
- 0xd2, 0x16, 0x29, 0x2e, 0x68, 0x82, 0x3b, 0x00, 0x7b, 0xe6, 0x33, 0xcd,
- 0x5b, 0x92, 0x72, 0x7c, 0x23, 0x5a, 0xb8, 0xb2, 0x67, 0x4c, 0x8c, 0x95,
- 0xe7, 0x7c, 0x53, 0x72, 0x27, 0x1c, 0xc8, 0x3a, 0x01, 0xe8, 0x82, 0xce,
- 0x0d, 0x97, 0x4b, 0xa2, 0xb6, 0xe6, 0xcc, 0x70, 0xa7, 0xe6, 0x3b, 0xf7,
- 0xd9, 0x5e, 0xcc, 0x33, 0x47, 0x76, 0x78, 0xda, 0x0a, 0x8f, 0xd7, 0x80,
- 0x69, 0x9f, 0x0a, 0x35, 0x3a, 0xd2, 0x71, 0xd7, 0x58, 0x65, 0x74, 0xdc,
- 0xb1, 0xcb, 0x20, 0xc5, 0x76, 0xb3, 0x6a, 0x89, 0x52, 0x30, 0x41, 0x53,
- 0xcf, 0x7c, 0x53, 0x57, 0x9c, 0xf9, 0xe7, 0xda, 0xf2, 0x3c, 0xc8, 0x43,
- 0xb1, 0xa5, 0xee, 0x31, 0xd5, 0x13, 0xe4, 0x2a, 0x6b, 0x68, 0x0a, 0xd5,
- 0xfb, 0xe3, 0xa9, 0x10, 0xc3, 0x65, 0x96, 0x49, 0x59, 0x4c, 0x17, 0xeb,
- 0x37, 0x90, 0x28, 0xc2, 0xa6, 0xd9, 0xbd, 0xe8, 0xa9, 0x7a, 0xa5, 0x15,
- 0xcb, 0xd8, 0x6b, 0xd0, 0xa8, 0xb5, 0xbb, 0x9c, 0x35, 0xca, 0xe5, 0x3c,
- 0xfd, 0x4c, 0xd5, 0xb7, 0xdb, 0x39, 0x17, 0x8f, 0xbf, 0x3c, 0x3e, 0x7d,
- 0x7b, 0x7c, 0xe9, 0x00, 0x3b, 0x6c, 0x42, 0xc1, 0xf3, 0x2f, 0xd4, 0xb0,
- 0xa5, 0xda, 0x95, 0xe1, 0x12, 0xd7, 0xdd, 0xaf, 0xcf, 0x76, 0x9d, 0x6d,
- 0x87, 0x23, 0xe7, 0xba, 0x85, 0x9c, 0xbf, 0x20, 0x7e, 0x0e, 0x65, 0x8a,
- 0xbf, 0x8e, 0xde, 0x1c, 0x3d, 0xe3, 0x60, 0xfe, 0xeb, 0x24, 0x67, 0x64,
- 0x74, 0xaf, 0xec, 0x64, 0x01, 0x27, 0x78, 0xb6, 0x17, 0xe0, 0x49, 0xc8,
- 0x65, 0x96, 0xea, 0xf9, 0x60, 0x31, 0x96, 0x56, 0x88, 0xf3, 0x4f, 0x49,
- 0x51, 0x15, 0x6b, 0x20, 0x34, 0x6b, 0xb1, 0x32, 0x2a, 0x76, 0x88, 0xc8,
- 0x06, 0xf5, 0x7a, 0xc9, 0x55, 0x36, 0xf1, 0xec, 0x89, 0x67, 0x13, 0xf9,
- 0x6a, 0xc1, 0xa8, 0x67, 0x52, 0x50, 0xb9, 0x85, 0x66, 0x9f, 0x09, 0x6b,
- 0x3a, 0x94, 0x93, 0xc5, 0xf2, 0x62, 0xf3, 0x35, 0x0e, 0x49, 0x12, 0x73,
- 0x5b, 0xf0, 0xde, 0xb3, 0x50, 0x5f, 0x2b, 0xb4, 0x92, 0x2a, 0xad, 0x1f,
- 0x4a, 0x06, 0xa0, 0xfa, 0xb3, 0x7f, 0xf6, 0xb9, 0x7b, 0x96, 0xeb, 0x49,
- 0xa6, 0x73, 0x05, 0xa3, 0x79, 0xe4, 0x0d, 0x95, 0x32, 0xe5, 0xf2, 0xf5,
- 0x31, 0x32, 0x22, 0x5b, 0x04, 0x6b, 0x1f, 0xbc, 0xf2, 0xa2, 0xaa, 0x8e,
- 0x02, 0xe7, 0xd4, 0xd7, 0xb8, 0xe0, 0x49, 0xa5, 0x8b, 0x9b, 0x90, 0xfc,
- 0x9f, 0xcb, 0x5d, 0x78, 0xce, 0xe1, 0x90, 0x95, 0xfd, 0x34, 0x36, 0x53,
- 0x41, 0x01, 0xb0, 0xd3, 0x24, 0xd4, 0x75, 0x78, 0x60, 0x6f, 0xd4, 0x49,
- 0x93, 0x1f, 0x0d, 0x2e, 0x8f, 0xe7, 0xbb, 0x4a, 0x95, 0x34, 0xe5, 0xec,
- 0x7a, 0x4e, 0x3a, 0xfe, 0xa4, 0x59, 0x16, 0x34, 0x78, 0x7c, 0x4f, 0x8f,
- 0xa4, 0x54, 0xd4, 0x05, 0xdb, 0x61, 0xfc, 0x61, 0xff, 0xc0, 0x13, 0xa5,
- 0x5a, 0x71, 0xa5, 0x49, 0xb1, 0x74, 0x06, 0x7e, 0x66, 0x1b, 0x62, 0x52,
- 0x09, 0xad, 0x7f, 0xfe, 0x54, 0xa5, 0x1b, 0x93, 0x42, 0x99, 0xf3, 0xf3,
- 0x42, 0x4c, 0x19, 0x6c, 0xa1, 0xc1, 0x08, 0x9f, 0xeb, 0xe5, 0xa2, 0x5b,
- 0x59, 0x5a, 0xe9, 0x6e, 0xe5, 0x81, 0x05, 0xe2, 0x6a, 0xef, 0xd3, 0xb9,
- 0xc6, 0x7f, 0x37, 0x5e, 0x7f, 0xbe, 0xc6, 0xaa, 0xa1, 0xbe, 0x88, 0x63,
- 0xd0, 0x52, 0xf0, 0xfc, 0xa7, 0xee, 0x24, 0x38, 0x90, 0xae, 0x9e, 0x8b,
- 0xf3, 0x82, 0x57, 0xdb, 0xa0, 0x14, 0xed, 0x20, 0x41, 0xaf, 0x5e, 0xf8,
- 0xaa, 0x18, 0x6d, 0xae, 0x3c, 0xd7, 0x3d, 0xe9, 0xe4, 0x51, 0x1a, 0x1c,
- 0xe3, 0xe7, 0x42, 0x52, 0xaf, 0xe1, 0x49, 0xb6, 0x73, 0xc0, 0xe1, 0xb8,
- 0x21, 0xca, 0xb5, 0x7f, 0xfa, 0x85, 0xd2, 0x86, 0xdd, 0x48, 0x26, 0x08,
- 0xae, 0x7d, 0xe3, 0xd3, 0x9d, 0x50, 0x2c, 0x9c, 0xb0, 0x2d, 0x4d, 0xd2,
- 0xa9, 0xd7, 0xbe, 0x20, 0x94, 0x71, 0x42, 0x8c, 0xfa, 0x9a, 0x88, 0x1a,
- 0xcf, 0x78, 0x18, 0x01, 0xff, 0xd8, 0x5e, 0x95, 0xad, 0x85, 0x42, 0x4a,
- 0x74, 0x72, 0x14, 0x3c, 0xf8, 0xc4, 0x4f, 0x30, 0x9e, 0xf2, 0x7d, 0xbb,
- 0x12, 0x4d, 0xbf, 0x50, 0xa0, 0xf1, 0xe0, 0xd1, 0xa7, 0x1a, 0x85, 0xc9,
- 0xf1, 0xb7, 0x37, 0xb2, 0xfe, 0x8d, 0x67, 0x84, 0x1c, 0x0e, 0x5d, 0xe1,
- 0x65, 0x09, 0xa7, 0x2c, 0xda, 0xae, 0xd9, 0x4f, 0x9f, 0x3f, 0xf2, 0xac,
- 0x5e, 0x4b, 0x85, 0xbb, 0x4c, 0x83, 0xf7, 0x3e, 0x6d, 0x1e, 0x73, 0x13,
- 0xbc, 0x2d, 0x5a, 0x59, 0x4f, 0x5a, 0xb4, 0xc9, 0xc1, 0xd7, 0xff, 0x61,
- 0xa6, 0x95, 0x9c, 0xa3, 0x30, 0x8b, 0xff, 0x08, 0xc7, 0xfb, 0x59, 0x18,
- 0xf2, 0x2c, 0x76, 0x15, 0x57, 0x93, 0x21, 0x84, 0xc6, 0xf5, 0xd5, 0x4d,
- 0xb0, 0x3a, 0x41, 0x0b, 0xb2, 0xe7, 0x74, 0x53, 0x07, 0x75, 0xa2, 0x55,
- 0xd3, 0xd2, 0x14, 0x75, 0x8b, 0x78, 0xd2, 0xd1, 0x7d, 0x4d, 0x9b, 0x0a,
- 0xea, 0x08, 0xac, 0x53, 0x3b, 0xb5, 0x63, 0x50, 0xdc, 0x2c, 0x45, 0xb5,
- 0x75, 0x33, 0xf2, 0xe5, 0xec, 0x83, 0xd7, 0xf6, 0x3c, 0xf7, 0xd2, 0x8b,
- 0x55, 0xf2, 0x30, 0x0e, 0x19, 0xfe, 0x57, 0xf4, 0xdf, 0x08, 0xa4, 0xc8,
- 0x57, 0x31, 0x0d, 0x08, 0xb5, 0x62, 0x0c, 0xf4, 0x60, 0x33, 0x6e, 0x4f,
- 0xcc, 0xd2, 0x38, 0xea, 0xa0, 0x1b, 0x15, 0x1e, 0xd8, 0x81, 0x4b, 0xbb,
- 0x74, 0x93, 0x8c, 0x6f, 0xed, 0xc8, 0xb8, 0x36, 0x9a, 0x6f, 0x7d, 0xff,
- 0xbd, 0xf0, 0x1c, 0x07, 0xf9, 0xa2, 0xd6, 0x53, 0x07, 0x68, 0x4e, 0x67,
- 0x54, 0x60, 0xc4, 0x79, 0xbb, 0x51, 0xcc, 0x3a, 0x4f, 0xa6, 0x09, 0x03,
- 0x87, 0x89, 0x64, 0x8a, 0x85, 0x6e, 0x0b, 0x7e, 0xe4, 0x88, 0x10, 0x29,
- 0xc5, 0x93, 0x28, 0xb8, 0xdc, 0x9c, 0xfd, 0xd7, 0x6a, 0xa0, 0xa0, 0x11,
- 0x1c, 0xbc, 0xbb, 0xfc, 0xfa, 0xec, 0x62, 0x18, 0x6d, 0x73, 0x9e, 0xf4,
- 0xe5, 0xc5, 0xc9, 0x97, 0xef, 0x48, 0xe1, 0x73, 0x96, 0xe7, 0xa3, 0x98,
- 0x14, 0xc1, 0x29, 0x87, 0x6a, 0x24, 0xf3, 0x51, 0x92, 0x5f, 0x1b, 0xf0,
- 0x38, 0x90, 0x4d, 0x98, 0x77, 0x67, 0xb9, 0xaf, 0xd2, 0x21, 0x85, 0xb0,
- 0xcd, 0xb2, 0x8e, 0xf0, 0xaf, 0x94, 0xbe, 0xcb, 0xbc, 0x36, 0x93, 0x56,
- 0x73, 0xdf, 0x7d, 0xf5, 0xf5, 0xcb, 0xaf, 0x0f, 0xde, 0x7e, 0x33, 0x34,
- 0x74, 0xbb, 0xef, 0xbe, 0xfb, 0x2e, 0x74, 0xbc, 0xec, 0x6f, 0x6f, 0x03,
- 0xcf, 0xec, 0x26, 0x7e, 0x78, 0x18, 0x14, 0xc9, 0xc6, 0x06, 0x9d, 0xa3,
- 0x0d, 0x9f, 0x4b, 0xa0, 0x90, 0xc7, 0xc5, 0x92, 0x6e, 0x3a, 0xfa, 0x7a,
- 0x7b, 0xb1, 0x1c, 0x31, 0xc4, 0xf2, 0xf6, 0xb2, 0xd4, 0x82, 0x12, 0x78,
- 0x7b, 0x7b, 0x63, 0x63, 0x78, 0x7c, 0x1c, 0x1d, 0x9c, 0x0e, 0xcf, 0x82,
- 0x77, 0x37, 0x77, 0xb7, 0x48, 0x12, 0xb8, 0x4e, 0x4a, 0xfa, 0x65, 0x63,
- 0xe3, 0xf4, 0xe0, 0x92, 0x95, 0x9c, 0x6f, 0x8f, 0x2f, 0x86, 0x27, 0x67,
- 0x6f, 0x79, 0x77, 0x18, 0x08, 0x22, 0x9e, 0xde, 0x33, 0xf6, 0xd6, 0x55,
- 0x8a, 0x3c, 0xcd, 0x7b, 0x2b, 0xe5, 0xc0, 0xe0, 0x26, 0x24, 0xaa, 0x88,
- 0xec, 0x26, 0x8e, 0x25, 0xab, 0xf3, 0x23, 0x31, 0x01, 0x25, 0xab, 0x1a,
- 0xe6, 0x7d, 0xdc, 0x88, 0xbc, 0xa1, 0x43, 0xa0, 0xde, 0x93, 0x91, 0x84,
- 0xcc, 0xf4, 0x04, 0x81, 0x00, 0xc1, 0xea, 0x01, 0x44, 0x42, 0xeb, 0xc4,
- 0x87, 0x27, 0x6f, 0xce, 0x49, 0xe6, 0x7f, 0x37, 0x3c, 0xf8, 0xea, 0x98,
- 0x1f, 0xfd, 0x2a, 0x29, 0xfd, 0x76, 0x48, 0xc9, 0x09, 0xee, 0xe4, 0x6d,
- 0x52, 0x16, 0xe3, 0x78, 0xc1, 0x71, 0xe7, 0xd4, 0x4d, 0x5f, 0xf8, 0x62,
- 0xd0, 0xb6, 0x48, 0x7f, 0x1e, 0x8c, 0x7a, 0xae, 0xcf, 0x03, 0x29, 0x3a,
- 0x6c, 0xf7, 0xe2, 0xf8, 0xe0, 0xe8, 0xcd, 0xb1, 0x05, 0x54, 0xc9, 0x3d,
- 0x42, 0x8d, 0xde, 0x64, 0x5c, 0xbd, 0xc6, 0x99, 0x3e, 0xf9, 0xae, 0xe2,
- 0xc5, 0xa7, 0x6f, 0xb8, 0x24, 0x43, 0x7b, 0x77, 0x7e, 0xa3, 0xf0, 0xec,
- 0xe0, 0x2a, 0xdd, 0x96, 0xd6, 0xad, 0xbf, 0xd8, 0x2d, 0x89, 0x45, 0x26,
- 0xa9, 0xfc, 0x26, 0x6a, 0x2c, 0xd4, 0xdf, 0xcf, 0x76, 0x76, 0x76, 0x1e,
- 0x99, 0x07, 0x0c, 0x8d, 0x7a, 0x0b, 0xd0, 0x54, 0xf6, 0xf9, 0xf1, 0x6d,
- 0xdf, 0xbe, 0x51, 0x66, 0x68, 0xb6, 0xe5, 0x3f, 0xe7, 0xa2, 0x78, 0xa7,
- 0x65, 0xd2, 0x3e, 0xe8, 0x71, 0x96, 0xb9, 0x3d, 0xa8, 0x2c, 0xcf, 0x84,
- 0x71, 0x6e, 0xd2, 0x32, 0xc0, 0x49, 0xb3, 0xa1, 0x4f, 0x52, 0xb0, 0x9f,
- 0x38, 0x5f, 0xd5, 0x9b, 0xe4, 0x6f, 0xa8, 0x4d, 0xfe, 0x31, 0xc8, 0xf2,
- 0xeb, 0xed, 0xd9, 0x3e, 0x2e, 0x59, 0x7a, 0xe8, 0x75, 0x82, 0xba, 0x3f,
- 0xf7, 0x99, 0x0b, 0x3d, 0x2a, 0x78, 0x69, 0x39, 0xca, 0xf1, 0x23, 0xc6,
- 0xf5, 0x0b, 0xd6, 0x01, 0xdb, 0xc9, 0xf5, 0x65, 0x65, 0xe6, 0x16, 0x8e,
- 0xd1, 0xd2, 0x49, 0xc1, 0x5b, 0xc6, 0x66, 0xa6, 0x01, 0xb1, 0x10, 0xea,
- 0x85, 0x3e, 0x17, 0x22, 0xa1, 0x5f, 0x73, 0x22, 0x9a, 0x41, 0xf9, 0x50,
- 0xf2, 0x5b, 0xec, 0xac, 0x55, 0x6b, 0x31, 0x60, 0xab, 0x88, 0x65, 0xe5,
- 0x19, 0xc9, 0xe8, 0xb1, 0xa4, 0xdf, 0x0c, 0x11, 0xd6, 0x1e, 0x44, 0xa3,
- 0x21, 0xd4, 0x9d, 0x1b, 0xae, 0xf7, 0xd9, 0xef, 0x83, 0x82, 0x0a, 0x47,
- 0x2f, 0x1f, 0xd1, 0x79, 0x30, 0x29, 0x59, 0xfd, 0xb9, 0x5e, 0x1c, 0x01,
- 0xf5, 0x0c, 0x69, 0x14, 0x8d, 0xbe, 0x00, 0xb2, 0x94, 0x23, 0xe8, 0xad,
- 0x90, 0xee, 0x50, 0xb4, 0x66, 0x90, 0x48, 0xa1, 0x2a, 0xf4, 0x45, 0x7b,
- 0xb2, 0x8d, 0x68, 0x9c, 0x8f, 0xee, 0xe9, 0xf0, 0xdc, 0xd5, 0xc0, 0xa1,
- 0x15, 0xb8, 0xe3, 0x25, 0xb8, 0x4d, 0x30, 0xfb, 0x50, 0xd6, 0x7d, 0x64,
- 0x30, 0xfb, 0xb4, 0x0a, 0xfc, 0xc6, 0x7f, 0x6f, 0x0f, 0x8a, 0xe2, 0x66,
- 0x3b, 0x9d, 0xbc, 0x9f, 0x14, 0x31, 0x7d, 0x46, 0x7c, 0xad, 0xf1, 0xf1,
- 0x80, 0x3e, 0x8c, 0xfe, 0x52, 0xe1, 0xfb, 0xc5, 0xb8, 0x7d, 0x26, 0xff,
- 0xbd, 0xcd, 0xe0, 0x5f, 0x00, 0x28, 0x0e, 0x16, 0xae, 0x85, 0x7b, 0xd0,
- 0xac, 0x04, 0x67, 0x8e, 0x8e, 0x63, 0x3b, 0x65, 0xf4, 0xaf, 0xa3, 0x8e,
- 0x92, 0xdb, 0x8f, 0x7b, 0x3b, 0x3b, 0xbb, 0xfb, 0xbb, 0x9f, 0xbd, 0xd8,
- 0xd9, 0xdf, 0xdd, 0xdd, 0xdd, 0xdb, 0xdf, 0xdd, 0xdf, 0xdf, 0xdb, 0xf9,
- 0x69, 0xbb, 0xb3, 0xb1, 0x71, 0x74, 0xf6, 0xdd, 0xdb, 0xd3, 0xb3, 0x83,
- 0xa3, 0xe8, 0xf2, 0x8c, 0xf4, 0x5d, 0xb6, 0x55, 0xb4, 0x9c, 0x74, 0xa0,
- 0x3e, 0x95, 0x99, 0xdc, 0x6c, 0x71, 0x50, 0xa2, 0xa3, 0xd1, 0x65, 0x06,
- 0xa1, 0x98, 0x5f, 0x1a, 0xdc, 0x94, 0xb3, 0x0f, 0xb3, 0xaf, 0x8f, 0xe9,
- 0xa4, 0x27, 0x51, 0x61, 0x5e, 0xef, 0xc1, 0xd6, 0x1a, 0x91, 0x2a, 0x94,
- 0xa9, 0x2b, 0x3a, 0x0e, 0x27, 0x9b, 0x8b, 0x0a, 0xdc, 0x14, 0xd7, 0xb4,
- 0x8f, 0x9b, 0x94, 0xe2, 0x24, 0x45, 0x35, 0xa0, 0xc1, 0x15, 0x0b, 0x50,
- 0xbf, 0xa5, 0x14, 0x66, 0x27, 0x79, 0x60, 0xab, 0x31, 0xc1, 0xb3, 0xb5,
- 0x53, 0xa2, 0x8b, 0x27, 0x79, 0xc0, 0xac, 0xab, 0x6c, 0x42, 0x90, 0xcc,
- 0xfc, 0xec, 0x80, 0x60, 0x64, 0x9a, 0x5c, 0x9a, 0xdb, 0x90, 0xe1, 0xbe,
- 0x6e, 0xe9, 0x8e, 0xfb, 0x31, 0xee, 0xe1, 0xbb, 0xe0, 0x6f, 0xc2, 0x4b,
- 0x67, 0xdb, 0x99, 0x9f, 0x64, 0x00, 0xef, 0x86, 0x27, 0x6f, 0xbf, 0x82,
- 0x7f, 0xe9, 0xbb, 0xb3, 0x8b, 0xa3, 0x21, 0x35, 0xcb, 0xb7, 0xf1, 0x06,
- 0x2c, 0x10, 0x7c, 0x68, 0x75, 0x54, 0x72, 0x04, 0xb8, 0xeb, 0x3f, 0x41,
- 0xe3, 0x98, 0xf4, 0x5c, 0xea, 0x01, 0x86, 0x19, 0x48, 0x8b, 0x9c, 0x52,
- 0xd0, 0xce, 0xe0, 0x70, 0x1a, 0xe4, 0xf5, 0x2f, 0x66, 0x31, 0x83, 0xc1,
- 0x26, 0x03, 0x41, 0x55, 0x43, 0x24, 0xc1, 0x36, 0xc3, 0xaa, 0x6c, 0xb3,
- 0xd4, 0xba, 0x5d, 0x66, 0x60, 0x15, 0x68, 0x25, 0xcb, 0x1d, 0x80, 0x6e,
- 0x65, 0x45, 0xf8, 0x8c, 0x5d, 0x4d, 0xe3, 0x6b, 0x74, 0xd8, 0x3c, 0x7e,
- 0x41, 0x67, 0xda, 0xfd, 0xc7, 0x76, 0x89, 0x9a, 0x7d, 0xdc, 0xde, 0x09,
- 0x08, 0x00, 0xd9, 0xee, 0xc8, 0x93, 0x50, 0xc3, 0xb8, 0x48, 0x48, 0xa8,
- 0x31, 0xc3, 0x2e, 0x76, 0x2e, 0x84, 0x51, 0x47, 0xfa, 0xd5, 0x02, 0x95,
- 0x1b, 0x62, 0x54, 0xe8, 0x07, 0x69, 0x51, 0x22, 0xd9, 0xa3, 0x92, 0x9c,
- 0x57, 0xa0, 0x0b, 0xc4, 0xc3, 0xa3, 0x4f, 0x24, 0x7a, 0x41, 0x5f, 0x94,
- 0x25, 0xe7, 0xc1, 0xd0, 0xd8, 0x23, 0x89, 0x88, 0xe1, 0xdc, 0x1f, 0x15,
- 0xd9, 0x3a, 0x0c, 0xb3, 0x9c, 0x8e, 0xd3, 0xb2, 0x63, 0x49, 0x46, 0x1e,
- 0x78, 0xcb, 0x3b, 0xc0, 0x8a, 0x92, 0x86, 0x12, 0xd3, 0xed, 0xa1, 0x55,
- 0x47, 0x34, 0xe9, 0x36, 0x9b, 0xcd, 0x24, 0x1b, 0xb3, 0xc3, 0x09, 0x28,
- 0xbe, 0x95, 0x54, 0x73, 0xa9, 0x5c, 0x5d, 0x0d, 0xe6, 0xb3, 0xdc, 0xbb,
- 0xa4, 0x7f, 0x48, 0x34, 0xbe, 0xb1, 0x74, 0x6f, 0xf7, 0x61, 0x76, 0x4c,
- 0x12, 0x27, 0xf1, 0x4a, 0xa1, 0x1c, 0x8d, 0xe9, 0x0f, 0x90, 0xfd, 0x2b,
- 0xcb, 0x16, 0x56, 0x2f, 0x69, 0x70, 0xd5, 0x6a, 0x6a, 0xc8, 0x06, 0x02,
- 0x81, 0x5d, 0x32, 0x53, 0xb0, 0x3c, 0x5a, 0x50, 0xcf, 0xbd, 0xca, 0x7b,
- 0x91, 0x96, 0x45, 0x32, 0xbd, 0xd2, 0x22, 0x74, 0x5a, 0xf7, 0x6d, 0xb4,
- 0x0a, 0x1a, 0x90, 0x49, 0x48, 0xfc, 0xef, 0x72, 0xee, 0x32, 0x62, 0x32,
- 0xe5, 0x19, 0xd7, 0x60, 0x9c, 0x8a, 0xe0, 0x5d, 0x65, 0x14, 0xe2, 0x99,
- 0x19, 0x18, 0xc4, 0xed, 0x46, 0xe4, 0x00, 0x7a, 0x6b, 0x53, 0x70, 0x68,
- 0x70, 0x80, 0xe4, 0x02, 0x75, 0x04, 0x0f, 0x2e, 0x47, 0xb4, 0xda, 0xee,
- 0x39, 0x5e, 0x3b, 0xb6, 0x71, 0x63, 0xd5, 0x0e, 0xc3, 0xb2, 0x2a, 0x02,
- 0x43, 0x68, 0x70, 0x7e, 0x7e, 0x50, 0x34, 0x40, 0x18, 0xc5, 0xe9, 0xa0,
- 0x21, 0x58, 0x75, 0x59, 0xb8, 0x15, 0x05, 0x8a, 0x77, 0xec, 0x8a, 0x07,
- 0xb5, 0x1d, 0x43, 0xe5, 0x48, 0xeb, 0xcf, 0xe1, 0x87, 0x8f, 0x60, 0x73,
- 0x48, 0x26, 0xf4, 0x4f, 0x57, 0x72, 0x4a, 0xd2, 0xf9, 0xe3, 0x87, 0x51,
- 0x07, 0xf1, 0x51, 0x1d, 0x63, 0xae, 0x9a, 0x97, 0x04, 0x6b, 0xa8, 0x8f,
- 0x92, 0x11, 0x07, 0x2c, 0x22, 0xed, 0x5b, 0xd0, 0x3e, 0x2b, 0x70, 0x8e,
- 0x38, 0x08, 0x12, 0xe6, 0xbb, 0x1f, 0x7d, 0x19, 0x17, 0xe9, 0xb8, 0x17,
- 0x1d, 0xa5, 0x24, 0xab, 0x97, 0x3d, 0x8f, 0xc9, 0xe8, 0x90, 0x2c, 0x07,
- 0xd1, 0x77, 0x56, 0x1d, 0x94, 0xee, 0x5c, 0xc4, 0x9e, 0xc2, 0xb4, 0xe8,
- 0x12, 0xd5, 0x36, 0xc4, 0x66, 0xab, 0x56, 0xd7, 0x30, 0x29, 0x0c, 0x6d,
- 0x7b, 0xb8, 0x39, 0x6c, 0x66, 0x5c, 0xdc, 0x56, 0x81, 0xd6, 0x45, 0xaa,
- 0x2a, 0xd8, 0x76, 0xc8, 0x22, 0x10, 0xd6, 0x77, 0xae, 0x85, 0x2e, 0x94,
- 0xe6, 0xb2, 0xb9, 0x05, 0x28, 0x79, 0x47, 0xaa, 0xda, 0x72, 0x0a, 0x0d,
- 0x9b, 0x31, 0x4f, 0x2f, 0x6e, 0x23, 0x3b, 0xae, 0x1b, 0x08, 0x2d, 0xa7,
- 0x75, 0xe2, 0x15, 0x51, 0x7e, 0x72, 0x76, 0x79, 0xfc, 0xbb, 0x68, 0x98,
- 0x72, 0x9d, 0x45, 0x47, 0x39, 0x7c, 0xc8, 0xd9, 0xd9, 0xad, 0x5e, 0xa8,
- 0xc6, 0x9e, 0xba, 0x34, 0x55, 0x35, 0x0b, 0x5a, 0x2e, 0x84, 0x94, 0xcf,
- 0xb9, 0x97, 0xf2, 0xe5, 0xbc, 0x32, 0xa0, 0xd9, 0xbb, 0x34, 0x8e, 0x5c,
- 0x01, 0x6b, 0x9e, 0xfb, 0x7b, 0x26, 0xfd, 0xf7, 0x1e, 0x62, 0x7c, 0xa9,
- 0x2f, 0x02, 0x00, 0x8e, 0xdb, 0x51, 0x9b, 0x00, 0x6c, 0x29, 0xe3, 0x34,
- 0xa7, 0x2b, 0x98, 0xf9, 0xd4, 0x58, 0xcc, 0x80, 0x88, 0x71, 0xc3, 0xd8,
- 0xd9, 0xcc, 0x11, 0x8f, 0x88, 0xae, 0xb0, 0x5c, 0x63, 0xa4, 0xc3, 0x09,
- 0x3c, 0xb8, 0x9a, 0x16, 0xed, 0xdc, 0x85, 0xac, 0x14, 0x09, 0xa1, 0x48,
- 0xab, 0x43, 0x85, 0x0e, 0x85, 0x20, 0xdc, 0x40, 0xdc, 0x18, 0xb5, 0x0a,
- 0x59, 0x62, 0xee, 0x6e, 0xb6, 0x40, 0xb6, 0xe3, 0xb0, 0x1e, 0xa6, 0xd3,
- 0x49, 0x34, 0x5b, 0x69, 0xca, 0xb3, 0xf2, 0x61, 0xce, 0xd1, 0x81, 0xba,
- 0xf2, 0xd9, 0x67, 0x8d, 0x7b, 0xf7, 0xc1, 0x3d, 0xbd, 0x4f, 0x5f, 0x07,
- 0x6a, 0xd1, 0x94, 0x7d, 0x8e, 0x56, 0x0a, 0xc8, 0xeb, 0x46, 0x0d, 0x99,
- 0x33, 0x4c, 0x63, 0x94, 0x0e, 0x9d, 0xfd, 0xb0, 0x65, 0x5f, 0x5c, 0xb5,
- 0xa3, 0x0d, 0x11, 0xba, 0x65, 0x9c, 0x71, 0x21, 0x9e, 0xeb, 0x35, 0x52,
- 0xa8, 0x9d, 0xbc, 0xfa, 0x60, 0x03, 0x01, 0x85, 0x84, 0xa4, 0x01, 0xcb,
- 0x34, 0x2c, 0x6f, 0x0d, 0x33, 0x6d, 0x98, 0x73, 0x4e, 0x74, 0x30, 0x0e,
- 0xb3, 0xb0, 0x7a, 0xd6, 0x06, 0x0e, 0x32, 0xdf, 0xdd, 0x18, 0xfd, 0x77,
- 0xeb, 0x87, 0xf3, 0xee, 0x9f, 0x19, 0xce, 0x41, 0xf4, 0x68, 0xb0, 0x9f,
- 0xd6, 0x3f, 0x60, 0x26, 0x52, 0xe8, 0x49, 0x9d, 0x64, 0x30, 0x08, 0x19,
- 0xfd, 0xc9, 0x1a, 0x8d, 0xd9, 0x09, 0x30, 0xaa, 0x62, 0x4d, 0x36, 0xd5,
- 0x95, 0x79, 0x26, 0x4f, 0x43, 0x7e, 0xe4, 0xf6, 0x7b, 0x36, 0x94, 0x8f,
- 0x1d, 0xae, 0xe5, 0xb9, 0x5b, 0xb4, 0xaa, 0xef, 0x4f, 0x32, 0xb0, 0xa4,
- 0x85, 0x20, 0xe6, 0x5f, 0x10, 0xc8, 0xe5, 0x79, 0xc6, 0x1e, 0x7f, 0x40,
- 0xe0, 0x06, 0x0d, 0xd6, 0x97, 0x90, 0xe3, 0x99, 0x20, 0x33, 0xaa, 0xf6,
- 0x9a, 0x7e, 0xb6, 0x2b, 0x70, 0x4d, 0xc4, 0x1e, 0x15, 0x1b, 0x8f, 0xf4,
- 0x4c, 0xba, 0xac, 0x16, 0x08, 0x3f, 0xac, 0x96, 0xeb, 0x92, 0x7b, 0x45,
- 0x8a, 0xce, 0x63, 0xe5, 0x82, 0x5a, 0xd6, 0x28, 0xfc, 0x25, 0x63, 0x94,
- 0xba, 0xc6, 0x5a, 0x0e, 0x45, 0x8a, 0xac, 0xe2, 0x9e, 0x4f, 0x12, 0x69,
- 0xa9, 0x5c, 0x1b, 0x06, 0x7c, 0x18, 0x30, 0x5e, 0x21, 0x67, 0xb0, 0xef,
- 0xe8, 0x6a, 0x99, 0x23, 0x3c, 0x43, 0xb3, 0xd1, 0x35, 0x99, 0x90, 0x1a,
- 0xbd, 0x38, 0x78, 0xfb, 0xd5, 0x31, 0xce, 0x3b, 0xb3, 0x5d, 0x9f, 0x3a,
- 0xcb, 0xb9, 0x71, 0x7d, 0x38, 0x8b, 0x0b, 0x01, 0xeb, 0x48, 0xf9, 0x8d,
- 0xc9, 0x72, 0xcc, 0x7e, 0xea, 0x77, 0x7a, 0x0c, 0xd2, 0x02, 0x38, 0x9d,
- 0xd3, 0x94, 0x07, 0xc1, 0x2c, 0x57, 0x5d, 0xc2, 0x1b, 0x91, 0xa9, 0xa7,
- 0xe0, 0x18, 0x2c, 0xd2, 0xd0, 0x0a, 0x41, 0x97, 0x2d, 0x96, 0xa3, 0x45,
- 0xac, 0x29, 0x5a, 0x71, 0x98, 0xf5, 0xa3, 0x9a, 0xc0, 0xa0, 0x32, 0x05,
- 0xbe, 0x3b, 0x24, 0x20, 0xd2, 0x49, 0x9d, 0x39, 0xa4, 0xce, 0x41, 0xa8,
- 0x71, 0x09, 0x3e, 0xd2, 0xee, 0xce, 0x8e, 0xc7, 0xdc, 0xf1, 0xd9, 0x4b,
- 0x0d, 0x22, 0xcb, 0xa3, 0x9d, 0xfe, 0x8b, 0x17, 0xeb, 0xe8, 0xc7, 0x35,
- 0x8a, 0x2c, 0x94, 0x67, 0x1f, 0xdd, 0x66, 0x9f, 0x1f, 0x5d, 0xd7, 0x66,
- 0x8b, 0x6c, 0x81, 0x32, 0x1d, 0xea, 0x8e, 0x2f, 0x5c, 0xcc, 0x87, 0xea,
- 0x20, 0x62, 0xfb, 0x82, 0x2d, 0x72, 0xee, 0x04, 0x0c, 0x5e, 0xca, 0x8d,
- 0xc8, 0x49, 0x02, 0x80, 0x90, 0x32, 0x75, 0x65, 0xc1, 0x1e, 0xf9, 0xd4,
- 0x99, 0x68, 0x3f, 0x6a, 0x61, 0x02, 0x11, 0x73, 0xcd, 0x12, 0x5d, 0x35,
- 0x67, 0x63, 0x8c, 0xf4, 0xdd, 0x39, 0x2b, 0xa3, 0xa4, 0xbb, 0x88, 0xc0,
- 0x4e, 0xd2, 0x27, 0x0c, 0x13, 0xdb, 0x35, 0x59, 0xf4, 0x9d, 0x16, 0xb0,
- 0xe3, 0xe2, 0x03, 0xec, 0x9b, 0x11, 0xc8, 0xe2, 0x74, 0xae, 0x95, 0xe4,
- 0xdc, 0xee, 0xaf, 0x51, 0x8c, 0x2f, 0xa3, 0x7e, 0xc0, 0xd2, 0x15, 0x85,
- 0x87, 0xf9, 0xf9, 0x6c, 0x65, 0x32, 0x8a, 0xf6, 0x80, 0xd6, 0xcd, 0xd0,
- 0x55, 0xa9, 0xe8, 0xdb, 0x53, 0xc1, 0x12, 0x14, 0xd4, 0x60, 0xe9, 0x2d,
- 0x5d, 0x4a, 0x37, 0xb8, 0x22, 0x6a, 0x0c, 0xfc, 0xe3, 0x86, 0x12, 0xb7,
- 0xd4, 0xe6, 0x34, 0x29, 0x36, 0xe5, 0xfc, 0x47, 0xd5, 0x4e, 0xea, 0x8a,
- 0xb2, 0x42, 0x36, 0xf2, 0x83, 0x38, 0x3f, 0xd9, 0xbf, 0x3e, 0xb6, 0x47,
- 0x46, 0xc5, 0x87, 0xd3, 0x6a, 0xae, 0xd7, 0x46, 0xd9, 0x6a, 0x30, 0xb8,
- 0x94, 0xf7, 0xa5, 0xeb, 0xb8, 0xbd, 0x3b, 0x79, 0xdf, 0x96, 0xa3, 0x85,
- 0xe8, 0xf9, 0xda, 0x57, 0x64, 0x26, 0x17, 0xed, 0x6d, 0x38, 0x12, 0xac,
- 0x9d, 0x80, 0x5b, 0xa4, 0x55, 0x0e, 0xbe, 0x11, 0x69, 0xce, 0x04, 0x70,
- 0x9b, 0x98, 0x6e, 0x00, 0x34, 0x0b, 0xde, 0x76, 0x8b, 0x68, 0x8a, 0x2b,
- 0x45, 0xa7, 0x40, 0x61, 0x92, 0x13, 0x64, 0xa2, 0xb0, 0xcb, 0xc4, 0x83,
- 0x7d, 0xe4, 0xcb, 0xb9, 0xcc, 0x02, 0x0e, 0x07, 0x1a, 0x7c, 0x5c, 0xdc,
- 0xc0, 0xc9, 0xee, 0x14, 0xa4, 0xe6, 0x4d, 0x14, 0x02, 0x56, 0xd0, 0xd5,
- 0x23, 0xf7, 0x0e, 0xb8, 0x6a, 0x65, 0x29, 0xaa, 0x2b, 0x10, 0xe8, 0x13,
- 0x1f, 0x4b, 0xf9, 0xcc, 0x32, 0x5a, 0x8d, 0xa5, 0x20, 0xfe, 0x46, 0x89,
- 0xc3, 0x1a, 0xc9, 0x55, 0xf5, 0x31, 0x69, 0x4b, 0x44, 0x19, 0xa8, 0x3f,
- 0xa8, 0x0b, 0x87, 0xf4, 0xda, 0xda, 0x12, 0x42, 0x96, 0x05, 0x68, 0x81,
- 0xa4, 0xdb, 0x1a, 0x9b, 0xd5, 0x2c, 0x12, 0x28, 0xa1, 0x1e, 0xea, 0x46,
- 0xf3, 0x6e, 0x18, 0x13, 0x5f, 0x82, 0xfc, 0x60, 0xc1, 0x67, 0x24, 0xf2,
- 0x4c, 0xfa, 0xc4, 0x0c, 0x65, 0x80, 0x92, 0xd4, 0x22, 0x81, 0x55, 0xc3,
- 0x4b, 0x57, 0xaa, 0xdc, 0xe4, 0xc0, 0x6f, 0x8f, 0x2f, 0xbe, 0x3c, 0x1b,
- 0x1e, 0x13, 0x87, 0x38, 0x3a, 0xfe, 0xf2, 0x1d, 0x73, 0x0f, 0xde, 0x31,
- 0x31, 0x52, 0x00, 0x97, 0x41, 0x50, 0x96, 0x91, 0x4c, 0xe4, 0x64, 0x64,
- 0xc9, 0x89, 0xec, 0x19, 0x65, 0x68, 0x4c, 0x97, 0x4a, 0xd1, 0xd3, 0x44,
- 0xb4, 0xda, 0x14, 0xd1, 0x74, 0x1e, 0xb2, 0x84, 0x65, 0xe7, 0x39, 0x63,
- 0x0c, 0x97, 0x86, 0xd1, 0x61, 0x18, 0xb7, 0xc5, 0xbe, 0x97, 0x8d, 0xef,
- 0xc4, 0x86, 0xa1, 0x07, 0xc2, 0x57, 0xd1, 0xb1, 0x6a, 0x39, 0x83, 0xa0,
- 0x14, 0xae, 0xc2, 0x57, 0x4f, 0x33, 0xb9, 0xbd, 0x38, 0x8d, 0x08, 0x67,
- 0x19, 0xb8, 0xec, 0x29, 0xaa, 0xee, 0x29, 0xfe, 0xa4, 0xd6, 0xae, 0x29,
- 0x84, 0xe0, 0x88, 0xcd, 0x48, 0x0a, 0xc6, 0x54, 0xd9, 0x32, 0xb8, 0x50,
- 0x91, 0x48, 0xc2, 0xb2, 0xdc, 0x9e, 0x6a, 0xe6, 0x97, 0xa0, 0x15, 0x85,
- 0x55, 0xdc, 0xe4, 0x23, 0xc1, 0x90, 0x01, 0xa2, 0x2d, 0x08, 0x7e, 0xb0,
- 0xd4, 0x77, 0x71, 0xe0, 0x52, 0xbc, 0xf2, 0x81, 0xe7, 0x4b, 0x49, 0xe7,
- 0x6e, 0x3d, 0x3b, 0xb8, 0x94, 0x99, 0x72, 0x72, 0xa9, 0x5c, 0xc8, 0xae,
- 0xa2, 0x36, 0xfc, 0x48, 0x3e, 0x33, 0x8a, 0x03, 0x73, 0x1c, 0x6e, 0x9a,
- 0x9c, 0x27, 0x0e, 0x8d, 0x0b, 0x24, 0xe0, 0xf5, 0x05, 0x61, 0xcc, 0xce,
- 0xa2, 0xe1, 0x3c, 0xf5, 0x9c, 0x68, 0xf5, 0x76, 0xf3, 0x96, 0xc2, 0x78,
- 0x14, 0xd5, 0xeb, 0x7e, 0xea, 0x19, 0x94, 0xd6, 0xa5, 0x16, 0x4c, 0xf9,
- 0x50, 0x86, 0x26, 0xb6, 0x8d, 0x8d, 0x8d, 0xa3, 0xe3, 0xcb, 0x83, 0x93,
- 0xd3, 0xe3, 0xa3, 0xe8, 0xe4, 0xed, 0xeb, 0xb3, 0x8b, 0x37, 0x07, 0x97,
- 0xea, 0x64, 0x3a, 0x72, 0x3a, 0xaa, 0x2b, 0x67, 0xe2, 0x4c, 0x00, 0x5e,
- 0x7f, 0x05, 0x09, 0xd3, 0x2e, 0x5e, 0x2b, 0x60, 0x90, 0x2c, 0x43, 0x52,
- 0x59, 0x83, 0x8d, 0x48, 0x9d, 0x53, 0xbe, 0x40, 0x09, 0xdf, 0xcf, 0xdb,
- 0xce, 0xa1, 0x30, 0xb0, 0xe5, 0x34, 0x0d, 0x13, 0xd8, 0x5f, 0x8f, 0x36,
- 0xe5, 0x8a, 0x71, 0xc9, 0xdd, 0x04, 0xdc, 0x7a, 0x64, 0xc1, 0x80, 0x26,
- 0xfb, 0x27, 0x9c, 0xdb, 0x0a, 0xf1, 0x52, 0xab, 0x9a, 0x9f, 0x94, 0xae,
- 0x98, 0x1f, 0x93, 0x0b, 0xb7, 0x13, 0x64, 0x57, 0x11, 0x05, 0xa2, 0x6a,
- 0x70, 0xd0, 0xa6, 0x4b, 0x54, 0xb2, 0x0a, 0x24, 0xe2, 0xd2, 0xc4, 0x27,
- 0xe1, 0xfe, 0x72, 0x26, 0xd7, 0x06, 0x7b, 0x6d, 0x4b, 0xad, 0x8d, 0xf1,
- 0x50, 0x26, 0xf3, 0x82, 0xeb, 0x40, 0xd9, 0x59, 0xe7, 0x57, 0x3c, 0x13,
- 0x35, 0x3b, 0xae, 0x82, 0x1e, 0x86, 0x4d, 0x6d, 0x3a, 0x27, 0x04, 0x49,
- 0x2e, 0xfd, 0x13, 0x45, 0x31, 0xe3, 0xb5, 0xe0, 0x9a, 0xbf, 0xfc, 0x73,
- 0xee, 0xd3, 0xfa, 0x35, 0x4a, 0xc3, 0x2b, 0x2c, 0x41, 0xdd, 0x23, 0x3d,
- 0x6d, 0xfe, 0xdc, 0x16, 0x46, 0x69, 0x47, 0xf4, 0x10, 0x17, 0x91, 0xec,
- 0x6b, 0xf7, 0x1a, 0x26, 0x05, 0x5d, 0xd8, 0xb6, 0x50, 0x84, 0x27, 0x08,
- 0x01, 0xa3, 0x4c, 0x80, 0x4a, 0xb0, 0x06, 0x32, 0x0f, 0xd0, 0x77, 0x69,
- 0x46, 0x63, 0x16, 0xf1, 0xbd, 0x9d, 0xd7, 0x15, 0x69, 0x6a, 0x54, 0xc3,
- 0x76, 0x05, 0xc2, 0x86, 0xee, 0x59, 0xac, 0x64, 0xf0, 0x42, 0xec, 0xfd,
- 0xae, 0x58, 0xff, 0x4d, 0xc3, 0x36, 0x67, 0x92, 0xd5, 0x06, 0xd5, 0x73,
- 0xd0, 0x34, 0x53, 0x57, 0x26, 0x15, 0xbe, 0x58, 0xf5, 0x54, 0x86, 0x9c,
- 0xde, 0xba, 0xc6, 0xe8, 0x27, 0x6d, 0x23, 0x50, 0x2e, 0x8e, 0xf2, 0x9e,
- 0x5a, 0xcc, 0x2b, 0x86, 0xc7, 0x8e, 0xd1, 0x1a, 0x36, 0x14, 0x90, 0x41,
- 0x39, 0x25, 0x4c, 0xa7, 0x61, 0x1e, 0xee, 0x98, 0xeb, 0x4b, 0x71, 0x8d,
- 0x4e, 0xad, 0x27, 0x17, 0xc4, 0x92, 0x8b, 0x47, 0x5d, 0x91, 0x47, 0xc1,
- 0xf4, 0xe6, 0x1b, 0x86, 0x94, 0x68, 0x2f, 0x59, 0x9c, 0x00, 0xb8, 0xbf,
- 0xe4, 0x63, 0x83, 0xc9, 0xb3, 0x3b, 0x33, 0x89, 0x0b, 0xd8, 0x18, 0x11,
- 0x52, 0x2a, 0x77, 0x06, 0x48, 0x00, 0x73, 0x75, 0x66, 0x4b, 0x5c, 0x3e,
- 0xbe, 0xac, 0x70, 0x5f, 0x60, 0x2b, 0x62, 0xce, 0x2a, 0xb3, 0x43, 0x21,
- 0xc1, 0x6d, 0xae, 0x15, 0xab, 0x3b, 0x4f, 0xcd, 0x20, 0x42, 0x49, 0x43,
- 0x36, 0xce, 0xb3, 0x42, 0xce, 0x1b, 0x24, 0xed, 0x8e, 0xaf, 0xfe, 0xd0,
- 0x59, 0xdc, 0x50, 0x1f, 0x9d, 0xe8, 0x9a, 0x75, 0x95, 0x51, 0x16, 0xc6,
- 0xbb, 0xe9, 0xb6, 0x4c, 0xe4, 0xf1, 0x57, 0x17, 0xf1, 0x55, 0x9c, 0x4c,
- 0x7f, 0xbf, 0xb7, 0x33, 0x8c, 0xaf, 0x97, 0xd3, 0xf8, 0x0f, 0x78, 0xf1,
- 0xd5, 0x93, 0x27, 0x7b, 0x3b, 0x9f, 0x7e, 0xb6, 0xd3, 0xa9, 0xb9, 0x8a,
- 0x02, 0x3f, 0x33, 0xdc, 0x86, 0x28, 0xd7, 0xcc, 0x7c, 0x17, 0xfd, 0x0c,
- 0xc6, 0xd7, 0x29, 0x77, 0xf3, 0x35, 0x0b, 0x2f, 0xba, 0x06, 0x31, 0x02,
- 0x22, 0x84, 0x4d, 0x6a, 0x5d, 0x28, 0xba, 0x71, 0x89, 0xae, 0x3f, 0xd9,
- 0xdd, 0x17, 0x56, 0x76, 0x0d, 0xbb, 0x54, 0x2c, 0x14, 0x1b, 0xbd, 0x4c,
- 0xe7, 0x74, 0x03, 0x7d, 0x1e, 0x95, 0xf1, 0xb5, 0xa3, 0x55, 0xb4, 0xe0,
- 0x2a, 0x39, 0x9b, 0x25, 0xfc, 0x2a, 0x45, 0x4d, 0xe1, 0x41, 0xb4, 0x79,
- 0x29, 0x90, 0x69, 0x10, 0x7c, 0x16, 0x49, 0x3e, 0x95, 0x6c, 0xd7, 0x78,
- 0x66, 0x21, 0x97, 0xfc, 0x3e, 0x3b, 0xe3, 0x07, 0x8b, 0xa9, 0xab, 0x5b,
- 0x0d, 0x0d, 0x2c, 0xf5, 0x04, 0x37, 0x5d, 0x14, 0xbe, 0x4e, 0x92, 0x5c,
- 0x37, 0x21, 0x18, 0x1b, 0x2d, 0x16, 0xaa, 0x40, 0x74, 0x30, 0xab, 0x9e,
- 0x2b, 0xb8, 0xd2, 0x9f, 0xd8, 0x4c, 0x07, 0xf8, 0x1d, 0xd5, 0xe8, 0xb4,
- 0xa8, 0x6e, 0x67, 0x21, 0xf9, 0x41, 0xae, 0xc8, 0x87, 0xa6, 0x13, 0x57,
- 0xe6, 0x15, 0x97, 0x7e, 0x63, 0x5e, 0x9a, 0x92, 0xbb, 0xfb, 0xf9, 0x2b,
- 0x10, 0xc4, 0xee, 0xe7, 0x7f, 0x70, 0x9f, 0xed, 0xe9, 0x67, 0x7b, 0x9f,
- 0xff, 0x61, 0x30, 0xc0, 0xf8, 0x98, 0x42, 0xba, 0xf6, 0x75, 0x57, 0x93,
- 0x0e, 0x63, 0x3d, 0xc2, 0xf2, 0x97, 0x43, 0xde, 0x91, 0xbd, 0xee, 0x58,
- 0xcf, 0xe1, 0x2a, 0xf7, 0xd4, 0xf6, 0xee, 0xf8, 0x56, 0x6a, 0x80, 0xc5,
- 0x40, 0xf5, 0x2c, 0xda, 0x16, 0xdd, 0x99, 0x08, 0xd1, 0x4e, 0xe1, 0x20,
- 0x4b, 0xe2, 0xe8, 0x8f, 0x4c, 0xa9, 0x7f, 0xdc, 0x88, 0xd4, 0x44, 0xce,
- 0xdb, 0x81, 0xb2, 0x84, 0x91, 0x91, 0xad, 0xd4, 0x96, 0x17, 0xc8, 0x37,
- 0x6e, 0x99, 0xa3, 0x2c, 0xf9, 0x0e, 0x0c, 0x0a, 0x5d, 0xfc, 0x49, 0x61,
- 0x7f, 0x64, 0xc3, 0x99, 0x9f, 0x21, 0x9f, 0x41, 0xb2, 0x82, 0x48, 0xc2,
- 0x28, 0x99, 0x37, 0xe0, 0xc9, 0xdf, 0x7f, 0xff, 0xbd, 0x8a, 0x53, 0xf4,
- 0x8b, 0x8e, 0xfb, 0x86, 0x38, 0xd1, 0x84, 0x98, 0xdb, 0x0c, 0xe5, 0x14,
- 0xb4, 0x32, 0x89, 0x5e, 0xf8, 0x57, 0x3a, 0x4f, 0x69, 0x84, 0x36, 0x56,
- 0xea, 0xf8, 0xf2, 0xc8, 0xb0, 0xa4, 0xc7, 0xc2, 0xc4, 0x40, 0x99, 0x9b,
- 0x70, 0x05, 0xfa, 0x50, 0x8b, 0x90, 0xf0, 0x79, 0xe7, 0xb0, 0xe9, 0xa0,
- 0x7d, 0x6a, 0xcc, 0xd4, 0x60, 0xdd, 0x48, 0x50, 0xac, 0xc8, 0x38, 0xaf,
- 0x3a, 0xf2, 0xe0, 0x75, 0xda, 0x51, 0x03, 0xaf, 0x7c, 0xd2, 0xf1, 0x39,
- 0xa4, 0xb2, 0x1b, 0xd8, 0xb2, 0x57, 0x22, 0x38, 0xa5, 0x3f, 0x27, 0xaf,
- 0x76, 0x77, 0xda, 0x9f, 0x60, 0x6d, 0x28, 0x62, 0xf4, 0xd5, 0x57, 0xde,
- 0x40, 0xfe, 0xd8, 0xf3, 0xe9, 0x44, 0x9e, 0xd6, 0xa2, 0x82, 0x28, 0xb2,
- 0xf2, 0xaa, 0x33, 0xe2, 0xfb, 0x95, 0xff, 0x7f, 0xcd, 0x38, 0x10, 0xf0,
- 0xa5, 0xcf, 0x16, 0xcb, 0xd1, 0x2c, 0xad, 0x0c, 0x78, 0x9b, 0x27, 0xf8,
- 0x39, 0x4c, 0x2a, 0x89, 0xa3, 0x0d, 0x54, 0xa3, 0x15, 0xc9, 0xaf, 0x7b,
- 0x95, 0x65, 0xa3, 0x38, 0xef, 0xaa, 0x11, 0xd5, 0xc6, 0xd9, 0xdd, 0xdd,
- 0x7b, 0xf2, 0xf4, 0x59, 0x77, 0xa0, 0x52, 0x1a, 0x18, 0x04, 0x14, 0xb3,
- 0x54, 0x55, 0x19, 0x69, 0x22, 0x96, 0xe3, 0x19, 0xd6, 0x96, 0x6f, 0x75,
- 0x36, 0x30, 0x0f, 0xe3, 0xee, 0x5e, 0x49, 0x6f, 0x7f, 0xe0, 0x7e, 0x5e,
- 0xa1, 0x8b, 0x3f, 0xa4, 0x93, 0x57, 0x6e, 0x86, 0x7f, 0xe0, 0xb9, 0xbc,
- 0xd2, 0x49, 0xd0, 0xbe, 0x5a, 0x2c, 0x7d, 0xb1, 0xb5, 0xd1, 0xca, 0xd5,
- 0x5a, 0x37, 0xd7, 0x36, 0x71, 0x03, 0x93, 0x86, 0xa7, 0xab, 0x3f, 0x11,
- 0xcb, 0x2d, 0x64, 0x55, 0x1f, 0x48, 0xbe, 0xfd, 0xd0, 0xa7, 0x56, 0xfa,
- 0xdc, 0x4a, 0xdf, 0xb3, 0xeb, 0x68, 0xc6, 0x89, 0x23, 0xbc, 0x11, 0x3d,
- 0xcd, 0x26, 0x98, 0xc2, 0xd6, 0xa1, 0x82, 0x40, 0x96, 0xc1, 0x8f, 0x74,
- 0xf8, 0xd5, 0x49, 0x57, 0x1d, 0xb4, 0xa2, 0xb8, 0xf5, 0xda, 0x8c, 0x6b,
- 0x2e, 0x6a, 0x42, 0x51, 0x08, 0x36, 0x0c, 0x1e, 0x3c, 0x66, 0x7f, 0x23,
- 0xf7, 0x2b, 0xa9, 0x3f, 0xd4, 0x99, 0xde, 0x39, 0x53, 0x36, 0xd7, 0xe5,
- 0xf8, 0x24, 0x6c, 0x06, 0xa8, 0x2e, 0xe2, 0x78, 0x84, 0xa5, 0x7a, 0xe1,
- 0xb2, 0x06, 0xfa, 0xaf, 0x9d, 0x37, 0xc0, 0x45, 0xa9, 0xeb, 0xa3, 0xf4,
- 0x95, 0x70, 0x13, 0x63, 0x10, 0x1d, 0x57, 0x82, 0x4a, 0x28, 0x21, 0xe4,
- 0x1d, 0xf0, 0x65, 0x8c, 0x92, 0x4a, 0x61, 0x23, 0x11, 0x0b, 0x99, 0x7b,
- 0xbe, 0x74, 0x35, 0x8b, 0x3e, 0x8f, 0x80, 0xfb, 0x2f, 0x6f, 0x69, 0x1c,
- 0x7a, 0xa5, 0xbe, 0x2b, 0x5e, 0x52, 0xe5, 0xc0, 0x79, 0x3e, 0x02, 0xaf,
- 0xad, 0x8a, 0x05, 0xd2, 0x82, 0x4c, 0x74, 0xb4, 0x52, 0xf5, 0x9f, 0x5b,
- 0xe8, 0xfe, 0x19, 0x87, 0xe0, 0x25, 0x6f, 0x03, 0xbe, 0xfe, 0xbc, 0x2b,
- 0x26, 0x3c, 0xf7, 0x2e, 0x0f, 0xa3, 0xe6, 0x59, 0x11, 0x02, 0x0d, 0xe7,
- 0x93, 0x5d, 0x39, 0x38, 0x17, 0x91, 0xc5, 0x38, 0xc9, 0x74, 0x0e, 0x75,
- 0x2a, 0x4d, 0xa6, 0x13, 0x2d, 0xab, 0xa6, 0xb2, 0x50, 0x4f, 0x1b, 0x4f,
- 0x38, 0x83, 0x97, 0x65, 0xc7, 0x2e, 0x07, 0xe0, 0xe0, 0xbd, 0xae, 0x43,
- 0x87, 0x61, 0x91, 0x3a, 0x01, 0xbb, 0xcb, 0x13, 0x2b, 0x39, 0xb6, 0xa1,
- 0xc9, 0x65, 0x5e, 0x96, 0x0f, 0x27, 0x56, 0x04, 0xa2, 0x83, 0x8f, 0xd5,
- 0x97, 0x1c, 0xe4, 0xc6, 0x11, 0x79, 0xcd, 0x89, 0x30, 0xda, 0xe9, 0x2b,
- 0x5e, 0xee, 0xdd, 0xc1, 0x75, 0x7a, 0x25, 0x8b, 0x41, 0x2c, 0xf2, 0x3a,
- 0xd9, 0xa6, 0x3f, 0x7b, 0xf4, 0xf9, 0x1e, 0xcb, 0x64, 0xfc, 0xcb, 0x13,
- 0xf8, 0xed, 0xc3, 0x9b, 0x3f, 0x38, 0x1b, 0xee, 0x5c, 0xf0, 0x2f, 0xa9,
- 0xbb, 0xf1, 0xd5, 0x24, 0xad, 0xa3, 0x04, 0x99, 0x2b, 0xf0, 0xa6, 0x17,
- 0x34, 0x7b, 0x81, 0xb9, 0x19, 0xc0, 0x6b, 0x19, 0xa4, 0x93, 0xc2, 0x87,
- 0xb9, 0xa9, 0x63, 0x51, 0xc5, 0x74, 0x96, 0xba, 0x53, 0x35, 0x98, 0x70,
- 0xa0, 0x2d, 0xee, 0xd5, 0xe4, 0x7e, 0xab, 0x17, 0x06, 0x0f, 0x59, 0xa5,
- 0x4d, 0x57, 0x0e, 0x18, 0x59, 0x68, 0xdc, 0xfd, 0xa6, 0xd6, 0xb6, 0x62,
- 0x2c, 0x07, 0x4d, 0x97, 0xc1, 0x36, 0xa7, 0xf5, 0x1d, 0xac, 0x96, 0x87,
- 0x92, 0x80, 0x8f, 0xb4, 0x28, 0xb7, 0xb8, 0x9b, 0x64, 0x5a, 0x40, 0x53,
- 0xe7, 0x41, 0x6f, 0x44, 0xc1, 0xba, 0x1b, 0x4a, 0x06, 0xba, 0xea, 0x72,
- 0xbd, 0xaa, 0x6d, 0xf8, 0x83, 0x84, 0xb7, 0x1d, 0xcf, 0x04, 0x14, 0x1e,
- 0x64, 0x3b, 0xed, 0xcb, 0x7d, 0xa9, 0x42, 0x50, 0xff, 0xf5, 0x20, 0x3a,
- 0x45, 0xe8, 0x5b, 0x11, 0x4b, 0x66, 0xb1, 0xdd, 0xa9, 0x46, 0x01, 0x44,
- 0x2e, 0x22, 0x75, 0x6f, 0x48, 0xa1, 0x2e, 0x4e, 0xe6, 0x34, 0x32, 0x02,
- 0x8e, 0x9d, 0x57, 0x33, 0x45, 0xa2, 0x50, 0x09, 0xa4, 0x07, 0x2b, 0xb4,
- 0x7b, 0x0e, 0x65, 0xdb, 0x5c, 0xd9, 0xe8, 0x80, 0x48, 0x83, 0x46, 0xc4,
- 0xa1, 0xaf, 0x22, 0x67, 0xc0, 0xca, 0x1d, 0xe1, 0x4b, 0xce, 0x68, 0x22,
- 0x66, 0x16, 0x2d, 0xed, 0x2b, 0x3e, 0x2c, 0x6a, 0x0d, 0x94, 0xc5, 0x73,
- 0x67, 0xd2, 0xe9, 0x40, 0x53, 0x9c, 0x26, 0x4e, 0x9d, 0x56, 0x30, 0x5e,
- 0xc1, 0xc5, 0xcd, 0x14, 0x1a, 0x49, 0x04, 0x0c, 0xef, 0x5f, 0xe0, 0x41,
- 0xf2, 0xb8, 0xe2, 0x3b, 0xfa, 0x85, 0x2f, 0xf9, 0x51, 0x4e, 0x3b, 0x9d,
- 0xe4, 0x72, 0x1d, 0xa0, 0x57, 0xe0, 0xa6, 0x38, 0xd8, 0xcb, 0x37, 0xa7,
- 0x91, 0x65, 0x68, 0x5f, 0x79, 0xe1, 0xd0, 0xa2, 0x76, 0x30, 0x45, 0xb5,
- 0x85, 0x88, 0x04, 0xa4, 0x4f, 0xc9, 0xcd, 0x26, 0x6b, 0xcb, 0x49, 0x5e,
- 0x11, 0x2f, 0x4e, 0xe5, 0x98, 0x06, 0x4f, 0xc8, 0xab, 0x4c, 0x3b, 0x44,
- 0x1a, 0x5d, 0x5e, 0x82, 0x6e, 0x2f, 0xea, 0xf2, 0x50, 0xf9, 0x8b, 0x2e,
- 0xd6, 0x13, 0x1f, 0x07, 0xcb, 0xd7, 0x1d, 0xb4, 0x9c, 0x3c, 0x7e, 0xe6,
- 0xd5, 0x17, 0x95, 0x55, 0xc2, 0xe7, 0xd6, 0xd4, 0x2b, 0x89, 0x96, 0x6d,
- 0x48, 0xd9, 0xf6, 0x6e, 0xd0, 0xfe, 0xab, 0x43, 0x6a, 0x45, 0x0a, 0xa3,
- 0xc9, 0x9e, 0x40, 0xa0, 0x76, 0x9f, 0xa5, 0x48, 0x45, 0x69, 0x34, 0xf4,
- 0xe1, 0x93, 0x7b, 0x69, 0xec, 0xc7, 0x85, 0x07, 0x09, 0x47, 0x13, 0x12,
- 0x30, 0x6e, 0x4b, 0xbb, 0x99, 0x8a, 0xa6, 0x77, 0x9f, 0xc1, 0xae, 0x00,
- 0x3e, 0xb3, 0x3b, 0x40, 0x6a, 0x82, 0x87, 0xd2, 0x71, 0x0d, 0x38, 0x75,
- 0xbd, 0x83, 0x05, 0xed, 0x98, 0x99, 0xc4, 0x29, 0xf1, 0xb6, 0xca, 0x6d,
- 0xfc, 0x6a, 0x91, 0x8e, 0x51, 0xe7, 0xf4, 0xd5, 0x17, 0x93, 0xec, 0x9a,
- 0xb9, 0x55, 0x8f, 0x2e, 0x56, 0xfe, 0xd9, 0xe1, 0x87, 0xf7, 0xb4, 0x53,
- 0x19, 0x30, 0xce, 0x8a, 0xc8, 0xed, 0xf6, 0xf7, 0x9a, 0xf0, 0x25, 0x6a,
- 0x78, 0x92, 0x8d, 0xb5, 0x6d, 0xd7, 0xb4, 0xec, 0x07, 0xb5, 0xef, 0xbe,
- 0x08, 0xfb, 0xb2, 0xc5, 0x89, 0xb5, 0x65, 0x29, 0x50, 0x37, 0x4d, 0x4b,
- 0xb9, 0xbe, 0x1d, 0xae, 0x3a, 0x4c, 0x5a, 0x5c, 0x63, 0x42, 0xee, 0xaa,
- 0xa9, 0xc6, 0xcb, 0x77, 0xbf, 0xe8, 0x4a, 0xa8, 0x63, 0xf7, 0x65, 0x17,
- 0x5c, 0x8b, 0x79, 0x91, 0xa1, 0xe8, 0xea, 0x85, 0xd4, 0x95, 0x9b, 0xb0,
- 0x2f, 0xf2, 0x82, 0x16, 0x0f, 0xac, 0x44, 0xa7, 0x30, 0xc3, 0x30, 0xc5,
- 0x31, 0x0c, 0xac, 0x81, 0x61, 0xc0, 0x97, 0xcd, 0x63, 0x64, 0x9a, 0x51,
- 0x29, 0x2e, 0x69, 0xbd, 0x68, 0x21, 0x8a, 0x21, 0xd1, 0xb7, 0x60, 0x87,
- 0xab, 0x18, 0x36, 0x97, 0xf3, 0x05, 0xa7, 0x75, 0x8d, 0x51, 0x55, 0x57,
- 0xcf, 0xd2, 0x20, 0x7a, 0x37, 0x17, 0xdc, 0xbb, 0x84, 0xd5, 0xe3, 0xd0,
- 0x5f, 0xde, 0x73, 0x7e, 0x7f, 0x5a, 0xa8, 0x8a, 0x3f, 0x31, 0x1c, 0xb0,
- 0x98, 0x43, 0xc4, 0x6c, 0xad, 0xfd, 0xf2, 0xd5, 0x9a, 0x73, 0x34, 0x82,
- 0x9a, 0xa5, 0x21, 0x09, 0xb8, 0x84, 0x5f, 0x65, 0x40, 0xec, 0x9d, 0x3b,
- 0x7e, 0x7d, 0x7c, 0x71, 0x71, 0x7c, 0xc1, 0xeb, 0x7d, 0x50, 0xc5, 0xaf,
- 0xbf, 0xd1, 0xc8, 0x68, 0x8f, 0xcc, 0x66, 0x11, 0x61, 0xcd, 0xb2, 0xc6,
- 0xc2, 0x09, 0x15, 0x4a, 0x69, 0x23, 0x32, 0x3f, 0xb7, 0x64, 0xb9, 0x8b,
- 0x41, 0x18, 0xd6, 0x44, 0xc4, 0x03, 0x3a, 0xcb, 0xfd, 0x94, 0xaf, 0x15,
- 0x81, 0xa1, 0x0f, 0x85, 0x89, 0x8d, 0xc8, 0x5e, 0xcd, 0xb5, 0xfe, 0x08,
- 0xae, 0x6a, 0xd3, 0x1d, 0x03, 0xb9, 0x74, 0xa0, 0x21, 0x5c, 0x89, 0x7a,
- 0xaf, 0x7d, 0x6d, 0x71, 0xcc, 0xf7, 0x8a, 0x0f, 0x28, 0xab, 0x4a, 0x58,
- 0x89, 0xa2, 0x5c, 0x2e, 0xd2, 0x89, 0x33, 0xee, 0xd2, 0xe7, 0x24, 0xef,
- 0x45, 0x72, 0xc4, 0x0b, 0x1b, 0x31, 0x9c, 0x89, 0x66, 0x7b, 0x08, 0x8d,
- 0x6b, 0x92, 0x54, 0xee, 0x4d, 0x63, 0x88, 0xf9, 0x97, 0xa2, 0x95, 0x8a,
- 0x99, 0x5d, 0xcb, 0xd8, 0x52, 0xc2, 0x4f, 0x60, 0x54, 0x64, 0x56, 0x61,
- 0xb1, 0x02, 0x21, 0x5b, 0x60, 0xd3, 0xd5, 0xcc, 0x07, 0x42, 0xfa, 0x82,
- 0x82, 0x17, 0x48, 0xd4, 0xc8, 0xf7, 0xa3, 0x1f, 0x8b, 0x74, 0xfc, 0x93,
- 0xbf, 0x39, 0x10, 0xc2, 0xec, 0x63, 0x15, 0x25, 0xb6, 0x80, 0x26, 0xaf,
- 0x0b, 0xa5, 0xba, 0xaf, 0x24, 0x48, 0xbd, 0x1b, 0x1e, 0x5f, 0x44, 0x07,
- 0x5f, 0x31, 0xba, 0xd3, 0xbf, 0xb6, 0xbb, 0xfc, 0x9c, 0xde, 0x0c, 0xb6,
- 0xb7, 0x9a, 0x92, 0x9b, 0x98, 0xe1, 0x5b, 0xeb, 0x26, 0x84, 0x1b, 0x9b,
- 0x5a, 0xf5, 0x98, 0x20, 0x77, 0xb2, 0xb2, 0x85, 0x1b, 0xd1, 0x07, 0x37,
- 0xf1, 0x63, 0xb6, 0x90, 0x0f, 0x58, 0xb8, 0x89, 0x92, 0xcb, 0x2f, 0x0e,
- 0x08, 0xdb, 0x1a, 0x1d, 0x7d, 0xd1, 0x50, 0x33, 0x65, 0x93, 0x0e, 0xa2,
- 0xee, 0x9b, 0xec, 0x67, 0x12, 0x04, 0xe2, 0xed, 0x27, 0x83, 0x9d, 0x68,
- 0xf3, 0xbb, 0x74, 0xfe, 0xe2, 0xd9, 0x9f, 0xa3, 0x93, 0xad, 0x6e, 0x25,
- 0xc8, 0x53, 0x60, 0x9c, 0x47, 0xf1, 0xfc, 0xd6, 0xed, 0xd8, 0x19, 0x4e,
- 0xb5, 0x84, 0xae, 0x18, 0x18, 0xa8, 0x54, 0x26, 0x5c, 0xdb, 0x22, 0x12,
- 0x8d, 0x34, 0x5e, 0x34, 0xfa, 0xd6, 0x01, 0xd2, 0xb1, 0x4e, 0x4f, 0x4f,
- 0x4d, 0x78, 0xe9, 0x5e, 0x3c, 0x6b, 0x34, 0xf1, 0xd4, 0xb5, 0xf1, 0x4e,
- 0xda, 0xf8, 0x85, 0x4d, 0xec, 0x0d, 0x76, 0xf6, 0xa2, 0xcd, 0xb3, 0xe1,
- 0xf6, 0x9e, 0x6b, 0xa1, 0xd9, 0xc4, 0x1e, 0x9a, 0xe0, 0x87, 0xaa, 0x2f,
- 0x3f, 0xe5, 0xfe, 0x7f, 0x4c, 0xe6, 0x3f, 0x45, 0x9b, 0xdf, 0xef, 0xee,
- 0x52, 0x03, 0x7f, 0x8e, 0x0e, 0x4e, 0xbe, 0x8f, 0x9e, 0x0e, 0xa8, 0xb1,
- 0xb7, 0xf1, 0x9d, 0x36, 0xa7, 0x18, 0x4e, 0x43, 0x34, 0x42, 0xdf, 0x37,
- 0xda, 0x78, 0x56, 0x6b, 0xe3, 0x94, 0xf4, 0xc0, 0x07, 0xba, 0x52, 0x76,
- 0x06, 0x4f, 0xf6, 0xa2, 0xf4, 0xd9, 0x67, 0xcf, 0xad, 0x21, 0x6d, 0x03,
- 0xdf, 0x57, 0x6d, 0x93, 0x92, 0xe5, 0x4b, 0x62, 0xce, 0xf1, 0x03, 0x31,
- 0x33, 0x70, 0x08, 0x40, 0xa7, 0xde, 0xc4, 0xf9, 0x44, 0xc9, 0x8d, 0x8b,
- 0xaa, 0xd0, 0x4e, 0x29, 0x3a, 0x58, 0x02, 0x23, 0x25, 0x5d, 0x9a, 0xfb,
- 0x8d, 0xe1, 0xb0, 0x2e, 0x6a, 0x8f, 0xfe, 0x39, 0x7a, 0x33, 0x3c, 0x39,
- 0xa6, 0x19, 0xed, 0xd0, 0xd0, 0xfc, 0x1a, 0xca, 0x80, 0xf0, 0x15, 0x16,
- 0x97, 0x56, 0x75, 0x83, 0xf3, 0x7e, 0xd0, 0x86, 0xc9, 0xd8, 0x12, 0xd1,
- 0xc5, 0xb0, 0x8d, 0x59, 0x51, 0xa0, 0xdf, 0x77, 0x44, 0x6b, 0xfd, 0x83,
- 0x6b, 0x56, 0x19, 0xe4, 0x9a, 0x45, 0xd7, 0xdf, 0x64, 0x73, 0x3a, 0x26,
- 0x79, 0x96, 0x73, 0x98, 0x47, 0xb7, 0x22, 0x29, 0x7c, 0x73, 0x74, 0x2c,
- 0x79, 0x6a, 0x6f, 0xe2, 0x39, 0xb1, 0x48, 0x46, 0x74, 0x28, 0x6e, 0xd9,
- 0xeb, 0x2e, 0xce, 0x1b, 0x79, 0xff, 0x74, 0x35, 0x7f, 0xa0, 0x7d, 0xfc,
- 0x74, 0xb0, 0xcb, 0xa8, 0x76, 0xac, 0xe5, 0xbe, 0x7e, 0x43, 0x7f, 0xef,
- 0x3e, 0xed, 0x46, 0xfc, 0x55, 0x55, 0x63, 0xb7, 0xf3, 0xba, 0x71, 0x78,
- 0x76, 0xf6, 0xcd, 0x89, 0x04, 0x60, 0x1c, 0xaa, 0x11, 0x95, 0x05, 0x2b,
- 0xa7, 0x05, 0x0b, 0x73, 0x25, 0x6d, 0xcd, 0xc7, 0x8f, 0xc3, 0xf5, 0x76,
- 0x9b, 0x24, 0x0b, 0xc0, 0xd0, 0xd5, 0x38, 0x42, 0xa9, 0x2c, 0x5a, 0x46,
- 0xc6, 0x82, 0x74, 0x3a, 0xa9, 0xa2, 0x51, 0x14, 0x8c, 0x10, 0x66, 0x06,
- 0xdb, 0xd1, 0xca, 0xe5, 0xc2, 0xc6, 0xbe, 0x08, 0x24, 0x86, 0xe8, 0xa2,
- 0x58, 0xcd, 0xe0, 0x2c, 0x55, 0xe0, 0xe9, 0x45, 0xd5, 0x75, 0xbb, 0xc3,
- 0xa4, 0xec, 0xcb, 0xa0, 0xf7, 0xd5, 0x46, 0xdb, 0x55, 0x83, 0x93, 0x33,
- 0x97, 0x2d, 0x14, 0x93, 0x16, 0x86, 0xe2, 0xd5, 0x82, 0x8b, 0x55, 0x4e,
- 0x5d, 0x3d, 0x61, 0x14, 0x63, 0x4d, 0x10, 0x4b, 0xf4, 0xf6, 0xe0, 0xcd,
- 0xf1, 0xab, 0x6f, 0x0f, 0x4e, 0xdf, 0x1d, 0xd3, 0x2b, 0x8c, 0xca, 0xba,
- 0xe9, 0xe3, 0x8d, 0x30, 0xc6, 0x59, 0x3a, 0xce, 0xa6, 0xec, 0x53, 0xea,
- 0xfe, 0xb9, 0xbb, 0x21, 0xe1, 0x95, 0x51, 0x87, 0xdf, 0xda, 0x95, 0xd7,
- 0x88, 0x2e, 0xf8, 0xaf, 0x3d, 0xf9, 0x6b, 0xef, 0xcf, 0x9d, 0xad, 0xca,
- 0xa4, 0x1b, 0x5a, 0x31, 0xd3, 0xcb, 0xbd, 0xc4, 0xd5, 0xa1, 0x4a, 0x0a,
- 0x62, 0x7a, 0x65, 0x55, 0x3a, 0xe6, 0x91, 0xb1, 0xab, 0x8d, 0x9f, 0xdd,
- 0x1c, 0xad, 0x42, 0x9d, 0xbb, 0xc3, 0x2f, 0xbd, 0x82, 0x70, 0xd1, 0xe1,
- 0x9c, 0x27, 0x15, 0x37, 0xe0, 0xac, 0xe6, 0x36, 0xac, 0x89, 0xe4, 0x61,
- 0xc1, 0xe1, 0x5b, 0x9b, 0x1d, 0xf9, 0xe5, 0xd5, 0xd1, 0xc1, 0xe5, 0x31,
- 0xbf, 0x60, 0xdd, 0x5b, 0x59, 0x6b, 0x8b, 0xbc, 0xe5, 0xf1, 0x6c, 0x76,
- 0xe4, 0xc3, 0x57, 0x3c, 0xa1, 0x8e, 0xd4, 0x18, 0x10, 0x80, 0xc5, 0xda,
- 0xb8, 0xb2, 0xb9, 0x06, 0x31, 0x06, 0x29, 0x7a, 0x85, 0xc5, 0x89, 0x6c,
- 0x76, 0xe4, 0xbb, 0x8e, 0xb3, 0xd7, 0x6a, 0xe1, 0x56, 0x75, 0x4e, 0x4e,
- 0x10, 0x97, 0xdb, 0x48, 0x0f, 0x92, 0x5a, 0x49, 0x7e, 0x7f, 0xd4, 0x35,
- 0x21, 0x16, 0xa6, 0x00, 0x64, 0xce, 0x6d, 0xbc, 0x66, 0x14, 0xb2, 0x4d,
- 0x29, 0xcb, 0x76, 0xf7, 0x9e, 0xfc, 0x19, 0xeb, 0xf9, 0xaa, 0xb3, 0x4d,
- 0x77, 0x43, 0xe7, 0xcf, 0xdc, 0x75, 0x5a, 0x06, 0xe5, 0x56, 0xb4, 0x1b,
- 0xd6, 0xa5, 0x94, 0xa2, 0x24, 0x48, 0x85, 0x77, 0x1d, 0xb6, 0x30, 0x99,
- 0x17, 0x16, 0xf4, 0x5e, 0xb2, 0x07, 0x2c, 0xc9, 0xdc, 0xdc, 0xf7, 0xd8,
- 0x2f, 0x94, 0x0c, 0x9c, 0x3b, 0x68, 0x52, 0xe9, 0x2e, 0xbc, 0x3f, 0x7a,
- 0xf2, 0xae, 0xcc, 0x51, 0x8b, 0xc0, 0x70, 0x9f, 0xb3, 0x95, 0x25, 0x18,
- 0xa0, 0x2f, 0xc8, 0xe3, 0xb2, 0x67, 0x0d, 0xa9, 0x78, 0xa4, 0xb6, 0x1c,
- 0x53, 0x44, 0x20, 0x12, 0x10, 0x6b, 0x59, 0x41, 0x4e, 0x12, 0x7f, 0x7f,
- 0x10, 0xe6, 0x60, 0x77, 0x76, 0x3c, 0xe2, 0x4c, 0x39, 0x17, 0x4d, 0x1d,
- 0x68, 0xe1, 0x6e, 0xe9, 0xed, 0xf8, 0xa5, 0x01, 0xa0, 0x00, 0x5f, 0x94,
- 0xb2, 0x96, 0x85, 0xb3, 0x19, 0xc1, 0xb7, 0xa8, 0xcf, 0x56, 0xf7, 0xa9,
- 0x96, 0xa7, 0x80, 0x69, 0x88, 0x0a, 0x2f, 0xba, 0x31, 0xb1, 0x9a, 0x79,
- 0x92, 0x3f, 0x1a, 0xe2, 0xd0, 0xe2, 0x7a, 0xc2, 0x14, 0x83, 0x34, 0x17,
- 0x7e, 0x67, 0x30, 0x18, 0xf8, 0x32, 0x20, 0xbc, 0x2d, 0xea, 0x71, 0x02,
- 0xa2, 0x78, 0x80, 0x7a, 0x86, 0x35, 0xde, 0x84, 0x20, 0x0f, 0x61, 0x7a,
- 0x4b, 0xc3, 0x5d, 0xd4, 0x1a, 0xe1, 0x8e, 0x46, 0x60, 0xd3, 0xe8, 0x6a,
- 0xb7, 0x5d, 0x2b, 0x32, 0x70, 0xdb, 0xb6, 0x09, 0x8f, 0x8c, 0x4d, 0x6c,
- 0x8d, 0x45, 0x8c, 0xd4, 0x7c, 0xc7, 0xa7, 0x32, 0xb7, 0x16, 0x4c, 0xc1,
- 0x9c, 0xae, 0x2f, 0x35, 0x50, 0xb1, 0x25, 0xb2, 0x68, 0x3a, 0x14, 0x2d,
- 0x70, 0xc3, 0x4c, 0x2e, 0xbb, 0x47, 0x26, 0x27, 0xf2, 0x45, 0x39, 0xfa,
- 0x63, 0x2e, 0xa6, 0x01, 0xbb, 0x41, 0x1c, 0xe6, 0xaf, 0xb5, 0x33, 0x11,
- 0xd3, 0x2c, 0xeb, 0xcb, 0x90, 0xfb, 0x35, 0xfb, 0x45, 0x73, 0xbc, 0x8b,
- 0x58, 0xb1, 0xb1, 0x48, 0x6c, 0xcb, 0x66, 0x70, 0x72, 0xe9, 0xe4, 0xbd,
- 0x99, 0x84, 0x63, 0xbc, 0xfa, 0x92, 0x25, 0x6d, 0x09, 0x2a, 0xc6, 0x3d,
- 0x34, 0x4f, 0xf6, 0x31, 0xef, 0xf8, 0xd8, 0x5a, 0x74, 0xae, 0xf1, 0xda,
- 0xda, 0xf8, 0x5b, 0xb9, 0xca, 0xba, 0x68, 0x45, 0xc5, 0x9a, 0x0c, 0x41,
- 0x39, 0xe0, 0x7b, 0x51, 0x7c, 0xcf, 0xd5, 0x68, 0x88, 0x06, 0xc5, 0x4d,
- 0x26, 0x16, 0x99, 0xd3, 0xc0, 0xae, 0xe8, 0x66, 0x68, 0xe5, 0x9e, 0x63,
- 0x5f, 0xef, 0xd9, 0x00, 0x61, 0x05, 0xe4, 0xcd, 0x0c, 0x78, 0x29, 0xca,
- 0x89, 0x30, 0x28, 0x97, 0x0a, 0xea, 0xa6, 0x9a, 0xf3, 0xc8, 0x89, 0x45,
- 0x0f, 0x95, 0x6e, 0x52, 0x44, 0x03, 0xb2, 0x8d, 0x43, 0xa2, 0x28, 0x6c,
- 0xb5, 0xa4, 0xd6, 0xb7, 0x75, 0xe2, 0xbc, 0xd1, 0x30, 0x37, 0xb1, 0x3c,
- 0x3d, 0xcf, 0xe6, 0x7d, 0x57, 0x5f, 0xc8, 0x45, 0x5c, 0xe5, 0xe9, 0xf5,
- 0xb5, 0x68, 0x6c, 0x51, 0x7d, 0x6a, 0xed, 0x44, 0x76, 0xca, 0xab, 0xc2,
- 0x21, 0x9b, 0xab, 0x75, 0xab, 0x79, 0xe9, 0xea, 0x98, 0xaa, 0xc5, 0xa5,
- 0x42, 0xcc, 0xe6, 0x81, 0x94, 0x7d, 0x2b, 0x51, 0x07, 0x06, 0x69, 0x96,
- 0x6c, 0xf6, 0xaa, 0x7a, 0x8c, 0xcf, 0x2e, 0x36, 0x50, 0xde, 0x7e, 0xee,
- 0xb3, 0x4a, 0x6d, 0xd3, 0x01, 0x2a, 0xe3, 0xe3, 0x4d, 0x26, 0x6c, 0x57,
- 0x9e, 0xf1, 0x55, 0x7c, 0xef, 0x82, 0x9d, 0x04, 0x65, 0x77, 0x14, 0x7b,
- 0x8d, 0x6b, 0x23, 0xaa, 0x58, 0x77, 0x0b, 0xd4, 0xad, 0x56, 0x3e, 0x94,
- 0xdd, 0x25, 0x1e, 0xd9, 0xc8, 0x1b, 0x18, 0x3d, 0x18, 0x9d, 0x9e, 0x7e,
- 0xc7, 0x4c, 0x6a, 0xee, 0x5c, 0xc7, 0xaf, 0x30, 0xc9, 0xda, 0xaa, 0x0c,
- 0xa2, 0xa0, 0x49, 0x31, 0x93, 0x64, 0x21, 0x8b, 0x97, 0xb1, 0xa9, 0x97,
- 0xda, 0x5a, 0xd4, 0x58, 0x7e, 0xa0, 0xed, 0x07, 0xaa, 0x89, 0xe0, 0xc8,
- 0x2a, 0x55, 0x15, 0x2e, 0x32, 0xce, 0x7b, 0x7b, 0x6d, 0x96, 0x1d, 0xb7,
- 0x49, 0x1d, 0xa4, 0x9c, 0x8c, 0x94, 0x08, 0x40, 0x03, 0x2c, 0xd0, 0x39,
- 0x87, 0xfd, 0xc1, 0x34, 0xe6, 0x90, 0x95, 0x4c, 0x62, 0x01, 0xb0, 0x65,
- 0x20, 0x6a, 0x18, 0xd2, 0x6a, 0x3c, 0xb5, 0x71, 0xfc, 0x5c, 0x6c, 0x86,
- 0xd0, 0x1a, 0x60, 0xe9, 0xb8, 0x19, 0xa2, 0x12, 0x04, 0xe5, 0x8e, 0x8d,
- 0xb9, 0x3f, 0x9e, 0x7e, 0x39, 0xaa, 0x9c, 0xd1, 0x0f, 0x1d, 0xd9, 0xf3,
- 0x8b, 0xb3, 0xaf, 0x2e, 0x8e, 0x87, 0xc3, 0xe8, 0xcd, 0xf1, 0xa5, 0xa8,
- 0xfc, 0x97, 0x12, 0x07, 0x27, 0xe0, 0xc4, 0x70, 0x33, 0x18, 0x42, 0x82,
- 0xc5, 0x9a, 0x98, 0x3d, 0x01, 0x68, 0xaa, 0x19, 0xbb, 0xd0, 0x20, 0xca,
- 0x41, 0x9d, 0x9f, 0x6a, 0xf8, 0xdc, 0x0d, 0x0c, 0xfd, 0x08, 0x66, 0x82,
- 0x27, 0xd2, 0xd9, 0xcd, 0xbd, 0x35, 0x15, 0x32, 0xb2, 0x84, 0x37, 0xdd,
- 0x18, 0xe7, 0xf2, 0xd6, 0x73, 0xbe, 0xbd, 0xe9, 0x27, 0xa6, 0xf7, 0xfb,
- 0xe8, 0xd2, 0x8a, 0x75, 0xff, 0x9e, 0xd4, 0x60, 0xa5, 0x8f, 0xdf, 0x47,
- 0xdf, 0x53, 0x9b, 0x13, 0x5a, 0x75, 0x2d, 0xc0, 0x38, 0x44, 0x91, 0x0d,
- 0x5f, 0xc8, 0x04, 0x25, 0x20, 0xc2, 0xe2, 0x3a, 0xcb, 0x3c, 0xff, 0x40,
- 0xc1, 0x5f, 0x24, 0xcc, 0x0b, 0xa8, 0x80, 0x06, 0xd3, 0xb9, 0x9e, 0xf9,
- 0x6d, 0x00, 0x65, 0x9e, 0x26, 0x57, 0x25, 0x04, 0x12, 0xee, 0x8e, 0x9a,
- 0xdb, 0x61, 0xf8, 0xc2, 0xdd, 0x37, 0xfc, 0xd1, 0x4e, 0xf4, 0xe4, 0xb3,
- 0xe7, 0x3b, 0x9f, 0xc9, 0xaf, 0xf6, 0xef, 0x8b, 0xa7, 0x3b, 0x0a, 0x03,
- 0x4a, 0x7f, 0x3d, 0xdd, 0x7f, 0xba, 0xbb, 0xcf, 0xf0, 0x44, 0x3b, 0xfb,
- 0x3b, 0xf4, 0xff, 0x4f, 0xf5, 0x13, 0xc6, 0x60, 0x7a, 0xb1, 0xf7, 0xd9,
- 0xa7, 0x08, 0x83, 0x61, 0xfa, 0x98, 0x52, 0x27, 0xfd, 0x32, 0xeb, 0x03,
- 0xc3, 0x01, 0x42, 0xd0, 0xef, 0xab, 0x06, 0x49, 0xf6, 0xab, 0x73, 0x21,
- 0x45, 0x9e, 0xb8, 0x2b, 0xcf, 0x6c, 0xc6, 0x55, 0x49, 0xe3, 0x0f, 0x4b,
- 0xc8, 0xba, 0x69, 0xe8, 0xdb, 0x52, 0xc5, 0x13, 0xa0, 0x28, 0x95, 0x77,
- 0x48, 0x64, 0x94, 0x1c, 0xaa, 0xf0, 0xe5, 0x5f, 0xd2, 0xb5, 0xe5, 0x1a,
- 0x6e, 0x00, 0x55, 0x45, 0xb7, 0x4a, 0xdf, 0x1b, 0xcb, 0x12, 0x12, 0x8d,
- 0x04, 0xa5, 0x49, 0x6b, 0x85, 0x44, 0x7f, 0x69, 0x7f, 0x62, 0xc0, 0xe2,
- 0xb7, 0x94, 0x1a, 0xa2, 0x66, 0x6f, 0x56, 0x51, 0xb5, 0xad, 0xaf, 0x0a,
- 0xf1, 0x6c, 0xf8, 0xed, 0xf7, 0x2b, 0x15, 0x54, 0x1e, 0x75, 0x98, 0x22,
- 0x52, 0xcf, 0xa5, 0x65, 0xca, 0x8d, 0xe6, 0xde, 0x2d, 0xc2, 0xf6, 0x3e,
- 0xa6, 0x39, 0x3f, 0x23, 0x50, 0xb0, 0xdb, 0xb9, 0x7e, 0xb0, 0x39, 0xa9,
- 0x44, 0xb4, 0xb9, 0x62, 0xa1, 0x86, 0x8b, 0xe5, 0x2a, 0x0a, 0xe2, 0x55,
- 0x47, 0xb2, 0x7d, 0x79, 0x43, 0xc5, 0xcf, 0x02, 0x99, 0x41, 0x22, 0x28,
- 0xdc, 0x65, 0xb8, 0xed, 0xe5, 0x79, 0xa3, 0xec, 0x46, 0x57, 0x4c, 0x8d,
- 0x41, 0x7f, 0xda, 0x07, 0xce, 0x93, 0x3b, 0x74, 0x8f, 0x4e, 0xcd, 0x07,
- 0xb7, 0xbb, 0x6a, 0x36, 0x9b, 0x2e, 0x58, 0xbc, 0xed, 0x48, 0xfa, 0xe7,
- 0x10, 0x3f, 0xee, 0x9a, 0x0b, 0x2f, 0x22, 0x94, 0x32, 0x52, 0x24, 0x63,
- 0x86, 0xdb, 0x62, 0x70, 0xda, 0x2d, 0x63, 0x61, 0xfd, 0x4f, 0x5c, 0xbc,
- 0x16, 0xee, 0x35, 0x05, 0x64, 0x8f, 0x85, 0xf2, 0xa7, 0x61, 0x5a, 0x59,
- 0x05, 0x8a, 0x3d, 0x04, 0x81, 0xdd, 0x90, 0xda, 0xc2, 0x74, 0xd3, 0xd2,
- 0xcd, 0x11, 0x94, 0xed, 0xfa, 0xdd, 0xc6, 0xc6, 0xf0, 0xfc, 0xf8, 0xf8,
- 0x28, 0x3a, 0x3d, 0x79, 0x73, 0x72, 0x19, 0x08, 0xe4, 0xee, 0x22, 0x31,
- 0x83, 0x6b, 0x61, 0xb5, 0x5b, 0xaa, 0xcb, 0xe1, 0x51, 0x07, 0xa5, 0x3f,
- 0xbb, 0xca, 0x67, 0x89, 0xa6, 0x31, 0x4c, 0xeb, 0xef, 0x41, 0xf5, 0x06,
- 0x50, 0x05, 0xea, 0x6b, 0x78, 0x81, 0xae, 0x20, 0xe1, 0x66, 0xec, 0xaa,
- 0xfc, 0xf4, 0x7f, 0xd0, 0x00, 0x8d, 0xaa, 0xe4, 0xa4, 0xe0, 0x69, 0xae,
- 0x88, 0x93, 0x06, 0xb5, 0xd6, 0x46, 0xc5, 0x6b, 0x9b, 0x4c, 0xb5, 0x90,
- 0xa8, 0xb3, 0xd0, 0x21, 0x5e, 0xef, 0x3e, 0x41, 0x42, 0xec, 0x2c, 0x15,
- 0x08, 0xe7, 0x30, 0x98, 0xd8, 0x55, 0x4d, 0xb9, 0xcc, 0x84, 0x8f, 0x87,
- 0x3d, 0x86, 0x05, 0xad, 0x2c, 0x92, 0xd6, 0xfa, 0x0a, 0x4b, 0x25, 0x3d,
- 0xd9, 0x71, 0xf9, 0x02, 0x0b, 0xf0, 0x1c, 0x15, 0xf5, 0xb9, 0xb3, 0xdd,
- 0x88, 0xe4, 0x91, 0x25, 0x4b, 0xf5, 0xf9, 0x72, 0xde, 0xb8, 0xee, 0x7e,
- 0x90, 0x77, 0x69, 0xfe, 0xcf, 0x77, 0x70, 0xbd, 0x5d, 0xc5, 0x79, 0x9f,
- 0x24, 0xaf, 0x55, 0xdf, 0x8c, 0xab, 0x42, 0x11, 0x1a, 0x68, 0x2c, 0xa6,
- 0x9f, 0xc4, 0xd7, 0xf8, 0xa8, 0x49, 0x8b, 0x3e, 0xe9, 0x23, 0x83, 0x4b,
- 0x72, 0xaa, 0x07, 0x80, 0xa7, 0xde, 0x8b, 0x50, 0xa1, 0xda, 0x85, 0x3e,
- 0x8b, 0xac, 0xe3, 0x81, 0xf5, 0x6c, 0x17, 0x3d, 0x8f, 0x42, 0xd5, 0xd3,
- 0x4c, 0x9d, 0x43, 0x29, 0x4f, 0x53, 0xe7, 0xd2, 0x14, 0xad, 0x67, 0xd1,
- 0xee, 0x67, 0x3c, 0x8f, 0x8f, 0x9b, 0x0f, 0xd7, 0xb2, 0xb0, 0x28, 0x36,
- 0x51, 0x17, 0x32, 0xbf, 0x9b, 0x92, 0x97, 0x00, 0xb4, 0x72, 0x59, 0x5d,
- 0x8b, 0x86, 0x45, 0xb4, 0x1e, 0xeb, 0x27, 0xea, 0x4a, 0x87, 0x65, 0x0a,
- 0xbe, 0x6d, 0x91, 0x90, 0x50, 0xb5, 0x51, 0xd6, 0x85, 0x6d, 0xad, 0x12,
- 0xad, 0xd7, 0xcd, 0x7d, 0xc6, 0x1c, 0x96, 0x81, 0xad, 0x23, 0x44, 0x6b,
- 0xf7, 0xe9, 0x04, 0x52, 0xb5, 0x19, 0x01, 0x40, 0x7f, 0x42, 0x7c, 0x12,
- 0x24, 0x0d, 0xd7, 0x25, 0x7c, 0x9e, 0x6e, 0x64, 0x2a, 0xc0, 0xf0, 0xb2,
- 0x66, 0x30, 0x2e, 0x6c, 0x42, 0x7e, 0xe0, 0x32, 0x2c, 0x55, 0xd7, 0x00,
- 0xb3, 0xe6, 0x8e, 0xef, 0x85, 0x03, 0xf7, 0xcb, 0x72, 0x6a, 0x76, 0x05,
- 0x5f, 0x67, 0xa1, 0x3a, 0x67, 0x4e, 0xe6, 0x0f, 0xa6, 0xbd, 0xbb, 0x43,
- 0xf2, 0xeb, 0x34, 0xab, 0x17, 0x64, 0x6b, 0x2a, 0xa5, 0x98, 0x56, 0x1f,
- 0xab, 0xb3, 0xbb, 0xf3, 0xcd, 0xfa, 0x55, 0x07, 0x48, 0xeb, 0xa3, 0x2f,
- 0xef, 0x3d, 0x7d, 0x64, 0xd3, 0xce, 0x72, 0x57, 0x61, 0xc7, 0x03, 0x8d,
- 0x78, 0x07, 0x4c, 0x63, 0xdb, 0x88, 0xf0, 0x93, 0xeb, 0x18, 0x25, 0xd8,
- 0x1f, 0x19, 0xbd, 0x25, 0x68, 0xd4, 0x86, 0xf2, 0x46, 0xc3, 0xb1, 0xe5,
- 0xcb, 0x82, 0x2d, 0x64, 0x0b, 0xc0, 0x0d, 0x79, 0x35, 0xd6, 0xa5, 0x74,
- 0x4a, 0x8e, 0x77, 0xf0, 0xb6, 0x70, 0xce, 0x5e, 0x95, 0x49, 0x18, 0xf5,
- 0xe4, 0xc9, 0xf5, 0x52, 0x92, 0xa8, 0x33, 0x51, 0xfb, 0x19, 0x8f, 0x51,
- 0xcf, 0x2b, 0xf1, 0x66, 0x8e, 0x1c, 0x12, 0x7a, 0x02, 0xe3, 0x1d, 0xc7,
- 0x26, 0xb2, 0x8a, 0xc8, 0x51, 0xbf, 0x18, 0xd8, 0x3e, 0x3b, 0x66, 0x67,
- 0x18, 0xb8, 0x81, 0x1c, 0xaf, 0xb0, 0xd4, 0x93, 0x54, 0x41, 0x1a, 0x20,
- 0x43, 0x51, 0x08, 0xc5, 0x31, 0x7b, 0xce, 0xeb, 0x62, 0xa7, 0x58, 0x29,
- 0x1e, 0x02, 0x34, 0xd0, 0x53, 0xaa, 0x45, 0x4b, 0xae, 0x2b, 0xe6, 0xf8,
- 0x85, 0xa5, 0xa0, 0x0a, 0x4c, 0x2c, 0xdb, 0xfd, 0x0f, 0xcf, 0xde, 0xbe,
- 0x3e, 0xf9, 0xca, 0x01, 0x5b, 0x08, 0x13, 0x5f, 0x96, 0x19, 0xdb, 0x35,
- 0xc5, 0x68, 0xe8, 0x8a, 0x70, 0x39, 0x87, 0xb7, 0x56, 0xda, 0xd0, 0xb0,
- 0x5b, 0x62, 0x4f, 0xef, 0xc3, 0x0f, 0xc0, 0x40, 0xe6, 0x4f, 0xd8, 0x56,
- 0x2e, 0xd9, 0xe3, 0xc5, 0x96, 0xb7, 0x3c, 0xd4, 0xa0, 0x77, 0x24, 0x3d,
- 0x23, 0xce, 0xcb, 0xe5, 0xc2, 0x45, 0x0f, 0x06, 0x95, 0x3a, 0x14, 0x40,
- 0x92, 0x6f, 0x05, 0xae, 0x18, 0xbd, 0x5c, 0x08, 0x6b, 0x92, 0xa8, 0xc7,
- 0xaa, 0x61, 0x57, 0xee, 0x00, 0xb6, 0x2c, 0x68, 0xba, 0xbd, 0x5e, 0x00,
- 0x8d, 0x90, 0x9c, 0x29, 0xe3, 0x61, 0x85, 0x81, 0xf2, 0xe6, 0xca, 0xe1,
- 0x32, 0x5d, 0x32, 0x51, 0x2b, 0xb2, 0x34, 0x13, 0xcd, 0x8c, 0xe7, 0x2d,
- 0xb5, 0x5b, 0x7f, 0x70, 0x55, 0x6c, 0x35, 0xec, 0xd7, 0xbb, 0x8a, 0x0a,
- 0x57, 0x92, 0xd4, 0x85, 0x26, 0xc9, 0x60, 0x11, 0x42, 0x58, 0xf4, 0xc4,
- 0xe5, 0x89, 0x4f, 0x5e, 0xb1, 0x87, 0x66, 0x7f, 0x80, 0x42, 0x97, 0x88,
- 0xdf, 0x09, 0x6b, 0x50, 0x29, 0x97, 0xf4, 0x60, 0xa7, 0x27, 0x57, 0x41,
- 0x4a, 0x99, 0x84, 0x08, 0x1a, 0xd1, 0x89, 0xb9, 0x98, 0x6d, 0x2d, 0xdd,
- 0x4f, 0xba, 0xfd, 0x62, 0x35, 0x1b, 0x65, 0x53, 0xcb, 0xb8, 0x70, 0x49,
- 0xd5, 0xf6, 0x50, 0x49, 0xd3, 0x40, 0xcc, 0xa0, 0x14, 0x1d, 0x44, 0xd7,
- 0x81, 0x85, 0xd2, 0x87, 0x49, 0xf9, 0xf1, 0x0b, 0xba, 0x3e, 0x3c, 0x45,
- 0x36, 0x0b, 0x97, 0xe1, 0x9f, 0xcc, 0xc7, 0xd3, 0x4c, 0xa9, 0x9a, 0x13,
- 0x63, 0xb1, 0x52, 0xd5, 0xa9, 0xb3, 0xef, 0x2f, 0x5b, 0xb2, 0xb1, 0x03,
- 0xc8, 0xd9, 0x24, 0xee, 0xb0, 0x71, 0xf8, 0x3b, 0x9b, 0x20, 0xbf, 0x2d,
- 0x5f, 0x68, 0x38, 0xbe, 0x41, 0x23, 0x50, 0x43, 0x02, 0xb5, 0x4d, 0x43,
- 0xfd, 0x8b, 0xd8, 0x16, 0xc5, 0x03, 0xf8, 0x83, 0x75, 0x6e, 0x8f, 0xd6,
- 0x96, 0x9e, 0xe8, 0x29, 0xce, 0xaf, 0x15, 0x73, 0x48, 0x9d, 0x6a, 0x50,
- 0x12, 0x1d, 0x00, 0xba, 0xb3, 0x51, 0xb2, 0x50, 0xe2, 0xc2, 0x65, 0x20,
- 0x3e, 0x2d, 0x25, 0xa9, 0x4f, 0xd3, 0x9f, 0xc4, 0x3a, 0xe9, 0x08, 0x31,
- 0xe0, 0x38, 0x9f, 0xb8, 0x90, 0x94, 0xd8, 0xdf, 0x65, 0x86, 0xcc, 0xec,
- 0x4d, 0xb5, 0x7a, 0x99, 0x05, 0xaf, 0xb1, 0x3d, 0x0f, 0x9a, 0x70, 0xa2,
- 0x36, 0x14, 0xe9, 0x0a, 0xb2, 0x04, 0x03, 0x6e, 0x21, 0xeb, 0x27, 0x29,
- 0x7c, 0x13, 0xf2, 0xfd, 0x2b, 0x4d, 0x31, 0xa7, 0xf3, 0xac, 0xa0, 0x01,
- 0x0a, 0x86, 0xf4, 0xd9, 0x8e, 0x5a, 0xe2, 0x4a, 0x8d, 0x53, 0x2d, 0xa2,
- 0x83, 0x8b, 0x63, 0x92, 0x6c, 0xaf, 0xe7, 0x48, 0x0a, 0xe7, 0x11, 0x96,
- 0xba, 0x3f, 0x10, 0xac, 0x79, 0x15, 0xf4, 0x7c, 0x70, 0x87, 0xf7, 0xc1,
- 0x9b, 0x4c, 0x4c, 0x1a, 0x1f, 0x40, 0x87, 0xcc, 0x05, 0xa0, 0x31, 0xc9,
- 0x8d, 0x0d, 0xac, 0x0f, 0x5c, 0x87, 0xb3, 0xbb, 0x85, 0xa4, 0xd8, 0x5b,
- 0x42, 0x5d, 0x65, 0x06, 0xd4, 0x77, 0xde, 0x60, 0xeb, 0x21, 0x42, 0x9f,
- 0xad, 0x35, 0x4e, 0xb5, 0xcf, 0x41, 0xf8, 0x9b, 0xe1, 0x8c, 0x69, 0x5f,
- 0x15, 0x0f, 0xa8, 0x27, 0xa7, 0x5e, 0xbb, 0xf5, 0xe8, 0x6f, 0xb8, 0x67,
- 0x58, 0x16, 0xa9, 0xcb, 0x05, 0x89, 0x0b, 0xad, 0x17, 0x43, 0xf6, 0x24,
- 0x10, 0x7e, 0x25, 0x1f, 0x8f, 0x83, 0xab, 0xc5, 0x46, 0xcd, 0xc2, 0x4f,
- 0x5c, 0x24, 0x56, 0x51, 0x09, 0xea, 0xc0, 0x44, 0xcf, 0x2a, 0x53, 0x05,
- 0xc7, 0x09, 0x8f, 0x18, 0x68, 0xe3, 0x56, 0x04, 0x80, 0x90, 0x3f, 0xb5,
- 0x9a, 0x79, 0x3f, 0x71, 0xb3, 0xf5, 0x63, 0x70, 0x5f, 0xf2, 0x47, 0xaf,
- 0x1c, 0xee, 0x10, 0x8f, 0x62, 0xc0, 0x1d, 0x81, 0xa5, 0xc2, 0x7d, 0xca,
- 0xbf, 0xe0, 0x63, 0x04, 0xbc, 0x19, 0x7a, 0x5b, 0x05, 0x3b, 0x44, 0x21,
- 0xdf, 0xc3, 0x81, 0x88, 0x8f, 0x0f, 0x1c, 0x7a, 0x14, 0x8a, 0xc6, 0x41,
- 0x95, 0x23, 0x36, 0xe5, 0x70, 0x06, 0xaf, 0x1d, 0xf8, 0x22, 0xa9, 0x54,
- 0x45, 0x72, 0x29, 0x42, 0x9d, 0x7e, 0x87, 0xd6, 0xa2, 0x3b, 0x9d, 0x7a,
- 0x86, 0x6f, 0x8f, 0xf1, 0xae, 0x22, 0x9b, 0xce, 0x0b, 0x4c, 0xca, 0xbb,
- 0x18, 0x4f, 0x7a, 0x55, 0xc9, 0x6d, 0xe0, 0x7a, 0x1c, 0x9c, 0xfa, 0xe3,
- 0xb0, 0x5f, 0x90, 0x1f, 0x82, 0x70, 0x81, 0xbb, 0xb4, 0x30, 0x3f, 0x24,
- 0xd1, 0xf6, 0x58, 0x63, 0x23, 0x24, 0x91, 0x3a, 0x29, 0xc7, 0xc1, 0x52,
- 0x26, 0xe3, 0x9b, 0x4c, 0xc2, 0x69, 0x69, 0xd1, 0x82, 0xb4, 0xcb, 0x4e,
- 0xf4, 0x5f, 0x4a, 0x03, 0xdf, 0xf8, 0x6c, 0x3d, 0x26, 0x84, 0x81, 0xa0,
- 0x6a, 0x0d, 0x3c, 0x41, 0x1c, 0x7f, 0x7f, 0x79, 0x71, 0x10, 0x7d, 0x7d,
- 0x7c, 0x70, 0x74, 0x7c, 0x31, 0xac, 0x5d, 0xfa, 0x1a, 0x05, 0x22, 0x12,
- 0x1a, 0xdb, 0x83, 0x21, 0x1a, 0x5b, 0xce, 0xbf, 0x06, 0xec, 0x1b, 0xd7,
- 0x8b, 0x57, 0x38, 0x48, 0x74, 0x3e, 0x58, 0x21, 0x12, 0xc7, 0x01, 0x47,
- 0xa5, 0x71, 0xe4, 0x73, 0x16, 0xb4, 0xa1, 0xa5, 0x7f, 0x9d, 0xf5, 0x3c,
- 0x4c, 0x95, 0xf1, 0x70, 0x4e, 0xfe, 0x32, 0x99, 0x64, 0x96, 0x05, 0x58,
- 0xdd, 0xb9, 0xaf, 0x7d, 0xc2, 0x75, 0xc0, 0xb6, 0xf4, 0x92, 0x51, 0x03,
- 0x62, 0xe7, 0xfb, 0x3e, 0xf5, 0xdb, 0xa7, 0xc5, 0xef, 0x33, 0xe2, 0xd6,
- 0x2a, 0x29, 0x3a, 0x35, 0x6b, 0x60, 0xb5, 0xfb, 0x0d, 0x29, 0x70, 0xd9,
- 0x38, 0x49, 0x5f, 0xb7, 0xb6, 0xc4, 0xa7, 0x6b, 0xca, 0x95, 0x01, 0xea,
- 0x1a, 0x04, 0x2e, 0xd5, 0x40, 0x48, 0xd6, 0x13, 0xd4, 0xc8, 0x6b, 0xd1,
- 0x38, 0x25, 0xaf, 0x66, 0x6a, 0x58, 0x18, 0x06, 0xa2, 0x53, 0x80, 0xac,
- 0x93, 0x96, 0x7a, 0xa9, 0xc3, 0x2e, 0x62, 0x70, 0x90, 0x34, 0x2c, 0x7d,
- 0x28, 0xbc, 0x1f, 0xe0, 0x0b, 0xd1, 0x00, 0xfd, 0xa2, 0xe2, 0x2a, 0x55,
- 0xbb, 0xa8, 0x16, 0xa7, 0xd1, 0xe6, 0x78, 0x0c, 0x8e, 0xe6, 0x2d, 0xae,
- 0x9f, 0xbb, 0x34, 0x60, 0x6c, 0x7d, 0x57, 0x82, 0xc1, 0x58, 0xa9, 0x87,
- 0xa9, 0x93, 0xc3, 0xcd, 0x64, 0xe3, 0x4d, 0x5e, 0x0d, 0x92, 0x80, 0x42,
- 0x62, 0x46, 0x11, 0x0f, 0x04, 0x8e, 0xbb, 0xe7, 0x92, 0xe8, 0xeb, 0xac,
- 0xc0, 0x5d, 0xd0, 0x7c, 0x9c, 0x2f, 0xf9, 0xb6, 0xe5, 0xc7, 0x1b, 0xea,
- 0xea, 0x72, 0x90, 0x77, 0xc0, 0x88, 0x04, 0xfb, 0x3a, 0x3f, 0xb8, 0xfc,
- 0x1a, 0x8e, 0x56, 0x90, 0xf0, 0x11, 0x90, 0x1e, 0xcc, 0xbd, 0xd6, 0xcc,
- 0xc5, 0x72, 0x0a, 0x9c, 0xc8, 0xbf, 0x86, 0xdd, 0x65, 0xf2, 0x24, 0x1c,
- 0x79, 0x30, 0x51, 0x02, 0x0a, 0x28, 0x55, 0xc3, 0x63, 0xb5, 0xb4, 0x0c,
- 0xa2, 0xde, 0x5d, 0xa2, 0x9d, 0x0b, 0xbb, 0xec, 0x4a, 0x26, 0x7a, 0x57,
- 0xe6, 0x04, 0xa2, 0x67, 0x61, 0x8e, 0x35, 0x9e, 0x10, 0x49, 0x11, 0x5f,
- 0x5c, 0x69, 0x8a, 0x6d, 0x8f, 0xf6, 0xb4, 0x1d, 0x1a, 0x2b, 0x38, 0xd2,
- 0x5f, 0xcc, 0x56, 0x83, 0x26, 0x6e, 0x48, 0xf4, 0xe5, 0xb2, 0xac, 0xb2,
- 0x95, 0x1a, 0x9e, 0xa3, 0x93, 0x2c, 0xf3, 0x2c, 0x2b, 0xab, 0x88, 0x88,
- 0x58, 0x1d, 0x39, 0xd1, 0x82, 0x81, 0x26, 0x63, 0xe1, 0xa6, 0xe6, 0x2a,
- 0x77, 0x87, 0x82, 0x61, 0x3c, 0x2a, 0xb2, 0xe9, 0xb2, 0x0c, 0x02, 0xaf,
- 0x7f, 0xd9, 0x98, 0x83, 0x41, 0x6f, 0x9e, 0x0c, 0x12, 0x23, 0x28, 0x8e,
- 0x1c, 0xce, 0x63, 0xd2, 0xf4, 0xb9, 0x0a, 0x2c, 0xfb, 0x1d, 0xf3, 0x6c,
- 0x5e, 0xad, 0x7e, 0x82, 0x18, 0xef, 0xad, 0x8d, 0x8d, 0xa1, 0x6d, 0x36,
- 0x83, 0xef, 0x35, 0x37, 0x1d, 0x38, 0x11, 0x40, 0xf8, 0x13, 0xbf, 0xc1,
- 0x98, 0x7e, 0x31, 0x3c, 0xa4, 0x44, 0xf6, 0x14, 0x2c, 0x5c, 0xf6, 0x38,
- 0x2d, 0xaa, 0x93, 0xc2, 0x57, 0xce, 0x73, 0x61, 0x89, 0x65, 0x97, 0x99,
- 0x01, 0xe5, 0xaa, 0xe7, 0xce, 0x13, 0x44, 0x25, 0x35, 0xbd, 0x15, 0x31,
- 0x93, 0x2f, 0x01, 0x05, 0xe7, 0xf2, 0x51, 0xb9, 0x3c, 0xc8, 0xed, 0xff,
- 0xde, 0x8e, 0x7a, 0x02, 0x73, 0xd3, 0x02, 0x36, 0xb2, 0x8c, 0xfe, 0x1f,
- 0x84, 0x60, 0x29, 0x58, 0x21, 0xb7, 0x59, 0x43, 0xf8, 0x1b, 0x90, 0x0a,
- 0x75, 0x93, 0x8f, 0x3d, 0xf5, 0x93, 0x74, 0x90, 0xdc, 0xb3, 0xfe, 0x62,
- 0x3a, 0x02, 0x7f, 0x61, 0x59, 0xa6, 0x1e, 0x38, 0x06, 0x78, 0x17, 0x57,
- 0xce, 0xaa, 0xc7, 0x85, 0xa3, 0xa4, 0x8c, 0x92, 0x88, 0xf5, 0xa8, 0x22,
- 0x60, 0x1e, 0xd4, 0x8d, 0xa8, 0xa2, 0xb7, 0x17, 0x51, 0x91, 0xc9, 0x4f,
- 0xcb, 0x36, 0xd2, 0x18, 0x2f, 0x25, 0x7f, 0x55, 0xa3, 0xb4, 0x62, 0x8b,
- 0x96, 0x31, 0xb3, 0xb8, 0x53, 0x09, 0xab, 0x33, 0xc7, 0xa4, 0x8d, 0xd1,
- 0x84, 0x00, 0xf6, 0x5b, 0x02, 0xf8, 0x0c, 0x97, 0x4d, 0xe1, 0x0b, 0xa3,
- 0x22, 0x59, 0x9b, 0xab, 0x0e, 0x99, 0x22, 0x63, 0x37, 0xaa, 0x25, 0x70,
- 0xb8, 0x8d, 0xf2, 0xa3, 0xd7, 0xab, 0x1f, 0x09, 0xf1, 0xf0, 0xd1, 0xdd,
- 0xc7, 0x69, 0x19, 0x4a, 0x04, 0x36, 0x23, 0xd2, 0xf0, 0x14, 0xae, 0x7e,
- 0xb4, 0xaa, 0x84, 0xa6, 0xf8, 0xb8, 0xcd, 0x6b, 0xce, 0xef, 0x50, 0x8b,
- 0x94, 0x62, 0x89, 0xc0, 0xfc, 0x75, 0x93, 0x6a, 0x74, 0xa9, 0x2c, 0xba,
- 0x99, 0x03, 0xd9, 0x9e, 0x01, 0xf3, 0x1e, 0x87, 0x16, 0x78, 0xef, 0xaa,
- 0x0b, 0x80, 0x18, 0x34, 0x4f, 0xcb, 0xc0, 0xa1, 0xee, 0xe9, 0x0d, 0x72,
- 0x12, 0x66, 0x92, 0x63, 0x55, 0x5c, 0xb8, 0xf3, 0x47, 0x75, 0x1d, 0xf6,
- 0xc7, 0x51, 0xac, 0xf3, 0xc8, 0xaf, 0x47, 0x21, 0x57, 0xc9, 0xde, 0x2e,
- 0x54, 0x52, 0x09, 0xdc, 0x00, 0x88, 0x9d, 0x95, 0xb3, 0xaa, 0x54, 0x1f,
- 0x09, 0xd6, 0x1d, 0xf5, 0x32, 0x81, 0x91, 0x68, 0x49, 0xf6, 0xea, 0x67,
- 0x16, 0x89, 0x30, 0xf0, 0x38, 0x55, 0xca, 0x9e, 0x48, 0xe2, 0x76, 0x51,
- 0xe6, 0xcb, 0x71, 0x05, 0xb0, 0x0a, 0xc4, 0x50, 0xf1, 0xcf, 0xbb, 0xe5,
- 0xcd, 0x42, 0xad, 0x7e, 0x33, 0xae, 0xa4, 0xb1, 0xe8, 0x93, 0x61, 0x17,
- 0x5b, 0x52, 0x06, 0x54, 0x8b, 0x20, 0x43, 0x3b, 0xa1, 0xf1, 0x3b, 0x02,
- 0xeb, 0x9f, 0xbb, 0x24, 0xfa, 0x0a, 0xee, 0x97, 0xa4, 0x24, 0x04, 0xb7,
- 0xae, 0x8a, 0x60, 0x10, 0x39, 0xf2, 0x48, 0x11, 0xc8, 0x20, 0xd0, 0xb0,
- 0xb1, 0x72, 0xc3, 0xa1, 0x84, 0x51, 0x77, 0x7d, 0x5f, 0xf7, 0x93, 0xfa,
- 0xdb, 0xa6, 0x85, 0x34, 0xe0, 0x7d, 0x57, 0xd6, 0xa1, 0xf0, 0x48, 0x63,
- 0xb5, 0x58, 0xd5, 0x64, 0x4a, 0x53, 0x76, 0x92, 0xa1, 0x9c, 0xc4, 0x99,
- 0xae, 0xdf, 0xc0, 0x55, 0xe2, 0xb4, 0x72, 0xa7, 0x35, 0x41, 0xa2, 0x79,
- 0x2b, 0x9e, 0x0b, 0x0a, 0x49, 0x83, 0x88, 0x8e, 0xcc, 0x9a, 0x0a, 0x66,
- 0x83, 0x05, 0x63, 0x9d, 0xc6, 0x36, 0xe9, 0xe4, 0xdc, 0x75, 0x41, 0x43,
- 0xe0, 0x19, 0x77, 0xa7, 0xc9, 0x4e, 0x37, 0xa8, 0x4b, 0xb1, 0x29, 0x51,
- 0xff, 0x19, 0xf4, 0x1e, 0xb6, 0x1c, 0x62, 0x82, 0x62, 0xb7, 0xe0, 0x08,
- 0xb7, 0xad, 0x96, 0xa1, 0x50, 0x13, 0xbf, 0x74, 0x30, 0xbb, 0x2f, 0xf6,
- 0x06, 0xbb, 0xcf, 0x3f, 0x1b, 0xec, 0x0c, 0x76, 0x77, 0x98, 0xb3, 0xf0,
- 0x50, 0x82, 0xc1, 0xc9, 0xba, 0xb4, 0x74, 0x55, 0x79, 0xaf, 0xd9, 0xe7,
- 0xdb, 0xe3, 0xcb, 0xef, 0xce, 0x2e, 0xbe, 0x89, 0x4e, 0xde, 0x5e, 0x1e,
- 0x5f, 0xbc, 0x3e, 0x38, 0xfc, 0x58, 0xe8, 0xe1, 0xd0, 0x60, 0x1d, 0x14,
- 0x22, 0x4c, 0xfc, 0xc2, 0x34, 0xad, 0x82, 0x7e, 0xcd, 0x92, 0xf2, 0x66,
- 0x67, 0x7f, 0xf7, 0x51, 0xbc, 0xd2, 0x16, 0xc3, 0xa0, 0x7f, 0xdf, 0x26,
- 0xb5, 0xcb, 0x93, 0x5a, 0xdf, 0x8a, 0x43, 0x41, 0x1b, 0x4a, 0x80, 0x95,
- 0x0b, 0xce, 0x05, 0x83, 0x47, 0x51, 0x82, 0x74, 0x94, 0xc7, 0x66, 0x92,
- 0x1a, 0x09, 0x68, 0xa2, 0x64, 0xd4, 0x2a, 0xbe, 0x8b, 0x06, 0xa1, 0x2b,
- 0xbb, 0xe5, 0x18, 0xe5, 0x65, 0x3a, 0x2d, 0xd5, 0x90, 0x22, 0x18, 0x88,
- 0x13, 0x08, 0x77, 0xc6, 0x90, 0xad, 0x30, 0x2f, 0xea, 0xf2, 0xa2, 0x30,
- 0x97, 0x14, 0xe6, 0x9d, 0xb8, 0x44, 0x11, 0x07, 0x3c, 0x50, 0x49, 0xb7,
- 0xc1, 0x58, 0xab, 0x75, 0x1b, 0xc3, 0x18, 0xda, 0x1a, 0x00, 0x61, 0x61,
- 0xb1, 0xcd, 0x98, 0x58, 0xc5, 0x28, 0x7a, 0xa8, 0x03, 0xc1, 0x69, 0x08,
- 0x46, 0x23, 0x5d, 0x41, 0x94, 0x32, 0xd0, 0xdb, 0x2a, 0x7c, 0xa6, 0xdc,
- 0x4e, 0x48, 0x9e, 0x10, 0xc9, 0xcf, 0xf0, 0xb9, 0xb9, 0xf5, 0xa2, 0x02,
- 0xab, 0x16, 0x49, 0xa1, 0x88, 0xf0, 0x75, 0x11, 0xb2, 0x11, 0xa2, 0x39,
- 0xc9, 0xe3, 0x7b, 0xae, 0x3f, 0x23, 0x62, 0x83, 0x0f, 0x66, 0x0c, 0x8a,
- 0x5d, 0xb0, 0xc8, 0xe4, 0xd7, 0x3c, 0x3a, 0x3f, 0x7e, 0xd3, 0xb7, 0x3a,
- 0x78, 0xf4, 0xbb, 0x98, 0xa1, 0x0c, 0x76, 0x53, 0x92, 0x7b, 0x16, 0xc9,
- 0xdc, 0x02, 0x6a, 0xc0, 0x13, 0x35, 0x02, 0x28, 0x9c, 0x00, 0x1f, 0x1a,
- 0xb1, 0x48, 0x08, 0xaf, 0x55, 0xfc, 0x32, 0xbb, 0xb4, 0x5a, 0x10, 0xf0,
- 0x78, 0x3f, 0x35, 0x6a, 0x39, 0xda, 0x74, 0x91, 0xba, 0xdc, 0x1f, 0xc2,
- 0x51, 0x11, 0x2d, 0xe0, 0x02, 0x04, 0x32, 0x4b, 0xb6, 0x3e, 0xff, 0xe6,
- 0x70, 0xf8, 0xc9, 0xee, 0x9e, 0x0e, 0x67, 0x6b, 0xe0, 0xe1, 0x2c, 0x1b,
- 0x79, 0xf8, 0x60, 0xd7, 0xe1, 0x18, 0x2d, 0xab, 0x1a, 0x07, 0x1c, 0x9b,
- 0xb1, 0xe9, 0x32, 0x83, 0xb6, 0x2a, 0xa9, 0x41, 0x1b, 0x52, 0x7d, 0xd4,
- 0x84, 0x4b, 0x57, 0xa7, 0x8e, 0x9d, 0x21, 0xa8, 0xb6, 0xa0, 0xf5, 0x0e,
- 0x4a, 0x17, 0xef, 0x17, 0xcf, 0xed, 0x23, 0x69, 0x59, 0x5b, 0x43, 0xda,
- 0xb8, 0x8f, 0x69, 0xa9, 0xef, 0x39, 0xaf, 0xb7, 0xff, 0x96, 0x51, 0x13,
- 0xf5, 0x52, 0x37, 0x5c, 0x1e, 0xdf, 0x0d, 0x0e, 0x80, 0x86, 0xb0, 0x4f,
- 0xac, 0xa2, 0xca, 0xdc, 0x03, 0xba, 0xf3, 0xd3, 0x67, 0xb4, 0x51, 0x74,
- 0xb2, 0x04, 0xaa, 0x81, 0x99, 0x42, 0x36, 0x65, 0xa5, 0xc5, 0x3d, 0x72,
- 0x94, 0x33, 0x70, 0xfe, 0x42, 0x82, 0x49, 0xdf, 0x0e, 0xa2, 0xaf, 0x93,
- 0x79, 0xa1, 0xd5, 0x8a, 0x2d, 0xf9, 0x0a, 0xc1, 0x81, 0x5c, 0x34, 0x09,
- 0x25, 0x6e, 0x4e, 0x93, 0x58, 0x41, 0x04, 0x89, 0xd7, 0x15, 0xa2, 0xdb,
- 0x5a, 0x79, 0x87, 0x98, 0x43, 0xf4, 0x70, 0x13, 0xa9, 0x81, 0x16, 0x35,
- 0x0e, 0xd3, 0x42, 0x1b, 0xd8, 0xac, 0x42, 0x01, 0x02, 0x9a, 0x1a, 0xcd,
- 0xe9, 0x31, 0x87, 0x97, 0x49, 0xed, 0xc9, 0x37, 0xc0, 0x5a, 0x65, 0x3b,
- 0xa1, 0xe8, 0x5a, 0x9e, 0xa9, 0x4c, 0xf2, 0x1b, 0x36, 0x7a, 0x14, 0x74,
- 0xdd, 0xc4, 0xf3, 0xf1, 0x6a, 0x30, 0x21, 0x29, 0x96, 0xcd, 0x66, 0x83,
- 0xe5, 0xed, 0x76, 0x70, 0x4c, 0x99, 0xe5, 0xdf, 0x08, 0x2c, 0x40, 0xd5,
- 0xe4, 0x6d, 0xf5, 0xf9, 0x9a, 0xa8, 0x5d, 0x71, 0xe5, 0x4c, 0x30, 0x49,
- 0x58, 0x82, 0xbf, 0x1c, 0xcf, 0xb5, 0xf8, 0x56, 0xc7, 0x91, 0x83, 0xf9,
- 0xe4, 0x16, 0x06, 0x8b, 0x64, 0xb6, 0xef, 0x52, 0x90, 0x8d, 0x3f, 0x28,
- 0x3a, 0xb8, 0x53, 0x29, 0x02, 0xf3, 0xec, 0x3c, 0xb9, 0x9e, 0xaa, 0x40,
- 0x11, 0x2a, 0x2d, 0x1e, 0xb6, 0xb5, 0x99, 0x06, 0x22, 0xaa, 0x0e, 0x3c,
- 0x10, 0x28, 0xbe, 0x44, 0x9c, 0x6a, 0x86, 0xaa, 0x28, 0xc6, 0xf8, 0xb5,
- 0x24, 0xac, 0x6f, 0x44, 0xc1, 0x42, 0x80, 0x38, 0xca, 0x62, 0xb0, 0x1a,
- 0x77, 0x2c, 0x1c, 0x49, 0x1d, 0x4f, 0xf4, 0xad, 0x50, 0x08, 0x30, 0x7e,
- 0x35, 0x34, 0x1a, 0x6e, 0x4f, 0x2b, 0x82, 0x27, 0x67, 0x85, 0xbe, 0xbe,
- 0x7b, 0xc2, 0xb6, 0xee, 0xcb, 0xd3, 0x61, 0x4f, 0xe8, 0x61, 0x9e, 0xdc,
- 0x07, 0x94, 0x25, 0xb0, 0xd4, 0x4a, 0x7e, 0x6c, 0xf9, 0x91, 0xf0, 0x35,
- 0x2b, 0xc0, 0x9b, 0xcb, 0x68, 0x84, 0x33, 0x78, 0x27, 0x99, 0xcf, 0x82,
- 0xb0, 0x85, 0xd0, 0x78, 0x62, 0x1e, 0x8e, 0x55, 0x13, 0x11, 0x81, 0xc8,
- 0x01, 0xbc, 0x30, 0x74, 0x1e, 0x09, 0x4c, 0x4f, 0x7a, 0x51, 0x7f, 0x0f,
- 0xb0, 0x39, 0xbb, 0xd5, 0x85, 0x8c, 0xb9, 0xc8, 0x47, 0x3c, 0x46, 0x51,
- 0xa3, 0x0d, 0x57, 0x6c, 0xdd, 0x58, 0xc2, 0xa6, 0x92, 0xf5, 0x1d, 0xbd,
- 0xcf, 0x3f, 0xf6, 0x74, 0x52, 0x77, 0xbb, 0x08, 0xdd, 0x66, 0x79, 0xf4,
- 0x2e, 0x99, 0xae, 0x9a, 0x62, 0xc3, 0xde, 0xa3, 0x3b, 0x8b, 0x24, 0x89,
- 0xfb, 0xd4, 0x41, 0xaa, 0x0a, 0xaa, 0x36, 0x0c, 0xa1, 0x0a, 0x64, 0x68,
- 0x03, 0xa0, 0x65, 0x54, 0x13, 0xf7, 0x3c, 0xba, 0xdb, 0x33, 0x4f, 0x33,
- 0x7f, 0x63, 0x8b, 0x27, 0xa6, 0x7a, 0xcf, 0x48, 0x1a, 0xb9, 0x8b, 0x1c,
- 0xee, 0x16, 0x50, 0x2e, 0xa7, 0x3e, 0x11, 0xdd, 0x12, 0x27, 0xa9, 0x70,
- 0x1a, 0xd6, 0xa0, 0x4a, 0x87, 0x3e, 0xc4, 0xdb, 0x0f, 0xc4, 0x57, 0x92,
- 0x85, 0x7d, 0x90, 0x13, 0x42, 0xc0, 0x71, 0xa6, 0x49, 0x82, 0x2d, 0x96,
- 0x33, 0xad, 0xce, 0x04, 0x46, 0xdc, 0xc3, 0x75, 0x5b, 0x46, 0xc4, 0x89,
- 0x53, 0x09, 0xf9, 0x9b, 0x42, 0x98, 0x86, 0x80, 0xa5, 0xc6, 0x52, 0xbf,
- 0x50, 0x6c, 0x01, 0x13, 0x38, 0x3d, 0xd0, 0xcb, 0x4d, 0x2a, 0x36, 0x0c,
- 0x44, 0xa8, 0x62, 0xc1, 0x88, 0x55, 0x74, 0x23, 0x3a, 0x7d, 0x4b, 0x6e,
- 0xb4, 0xcc, 0x10, 0x02, 0xeb, 0x04, 0x06, 0x69, 0x63, 0x08, 0xa1, 0x33,
- 0xea, 0x86, 0x3c, 0xb2, 0xff, 0x39, 0xaf, 0x41, 0xd1, 0xf5, 0x8b, 0xa6,
- 0x20, 0xc1, 0xd5, 0x15, 0x50, 0xf7, 0x48, 0xa1, 0x60, 0x17, 0xe7, 0xb9,
- 0x15, 0x13, 0xed, 0x26, 0x0f, 0x2c, 0x20, 0x75, 0xb5, 0x57, 0xf9, 0x5a,
- 0x50, 0x00, 0xb0, 0xb8, 0xe7, 0x27, 0x6f, 0xa5, 0x3e, 0xa6, 0x3b, 0x48,
- 0x09, 0x43, 0x26, 0x6e, 0x48, 0x69, 0x57, 0x8c, 0x27, 0x56, 0x9c, 0x89,
- 0x48, 0xec, 0x4d, 0x4c, 0x6c, 0x7c, 0x40, 0x52, 0xed, 0xeb, 0x62, 0x29,
- 0xbd, 0x77, 0xf9, 0x92, 0x2c, 0x8a, 0x69, 0xb7, 0x56, 0xf4, 0xcd, 0x6d,
- 0x66, 0xed, 0x36, 0x72, 0x86, 0xac, 0xf1, 0x24, 0xac, 0x62, 0xab, 0xad,
- 0x54, 0x98, 0x64, 0xaf, 0x96, 0x27, 0x19, 0x5a, 0xd0, 0x3f, 0x89, 0x06,
- 0xdb, 0xd4, 0x61, 0xb1, 0x6d, 0x2f, 0x2e, 0x6e, 0xc7, 0x05, 0x5d, 0x8f,
- 0x9c, 0x14, 0xfc, 0xa3, 0x43, 0x72, 0xe6, 0x11, 0x4f, 0x7e, 0x8a, 0xfa,
- 0xe3, 0x29, 0xe6, 0x17, 0xa1, 0xc2, 0xe4, 0x8f, 0x44, 0x32, 0xfc, 0xc4,
- 0x4f, 0x1b, 0x9c, 0x25, 0x37, 0x7c, 0xf7, 0x86, 0x71, 0xd4, 0x51, 0xc2,
- 0xef, 0xf2, 0xe2, 0xe0, 0xed, 0xf0, 0xb5, 0x18, 0x59, 0x2f, 0x33, 0x5f,
- 0x1c, 0x50, 0x2d, 0x0b, 0xce, 0x13, 0xe9, 0x90, 0xc6, 0xee, 0x05, 0xdc,
- 0xdb, 0x82, 0xb4, 0xb5, 0x6c, 0x60, 0xaf, 0x0e, 0x62, 0x2c, 0x65, 0x07,
- 0xc1, 0xab, 0xe9, 0x30, 0x6d, 0x16, 0x5b, 0xee, 0x62, 0x2d, 0xc2, 0x6a,
- 0x25, 0x1e, 0xe3, 0xce, 0xb0, 0x51, 0xf5, 0x21, 0x26, 0x94, 0x43, 0x1b,
- 0x8c, 0x7d, 0x2a, 0xbc, 0x7c, 0x2d, 0xae, 0xe4, 0x21, 0xa9, 0x1e, 0x7d,
- 0x85, 0xc5, 0x0f, 0x6a, 0xb3, 0x38, 0xc3, 0x9c, 0xf0, 0x72, 0x45, 0x83,
- 0x73, 0x8d, 0x87, 0x89, 0x84, 0xd6, 0xf4, 0xe6, 0x1f, 0x77, 0xb7, 0xda,
- 0x9b, 0xbf, 0xfc, 0xa5, 0xcd, 0xb7, 0x8f, 0xdd, 0x64, 0x7d, 0x9f, 0xa7,
- 0xb2, 0xf9, 0xc7, 0xbd, 0xad, 0x47, 0x67, 0x14, 0x66, 0xda, 0xf9, 0x3e,
- 0xe9, 0x0d, 0x1e, 0x6c, 0xf4, 0xca, 0xea, 0xc0, 0xea, 0x1d, 0xec, 0x62,
- 0x3d, 0xae, 0x3c, 0xca, 0x5d, 0x05, 0xf5, 0x81, 0x63, 0x81, 0x9d, 0xe4,
- 0xe7, 0x5d, 0x38, 0x9a, 0xb2, 0x70, 0xf2, 0xbf, 0x8f, 0x43, 0x74, 0x40,
- 0x52, 0xc4, 0x43, 0x76, 0xc7, 0xe9, 0xe6, 0x45, 0x36, 0x40, 0xdf, 0x7b,
- 0x8f, 0xf4, 0xed, 0x67, 0x17, 0xa8, 0xb9, 0xec, 0x0f, 0xe5, 0x80, 0x2a,
- 0xc3, 0x83, 0xd5, 0x7e, 0x36, 0x7c, 0xc9, 0xc9, 0xf5, 0xfd, 0x5d, 0x9e,
- 0xbc, 0x39, 0x66, 0xdc, 0xd8, 0xa3, 0x13, 0xc6, 0x2f, 0x1b, 0x2a, 0x82,
- 0xa0, 0x69, 0xb4, 0x0e, 0x5c, 0x35, 0x04, 0xb7, 0x17, 0x47, 0xa1, 0x8b,
- 0x5b, 0x72, 0xa7, 0xdf, 0xed, 0x04, 0x77, 0xad, 0x81, 0xb5, 0x85, 0xa5,
- 0xef, 0x9d, 0x5c, 0xf5, 0xdf, 0x64, 0x13, 0x68, 0x5d, 0x7d, 0x81, 0xa3,
- 0xa6, 0xb7, 0xe8, 0xc3, 0x77, 0xf3, 0x59, 0xe5, 0xe3, 0x30, 0x49, 0x50,
- 0x15, 0xea, 0x8d, 0x75, 0x05, 0x00, 0x7e, 0xde, 0xee, 0xf7, 0x51, 0xf2,
- 0x55, 0xe2, 0x83, 0xd4, 0x4b, 0x50, 0xc1, 0x78, 0xb0, 0xb3, 0x4f, 0xeb,
- 0x93, 0x4e, 0x57, 0xe2, 0xd1, 0x8e, 0x7d, 0x1c, 0x92, 0xcf, 0x08, 0xbc,
- 0xe6, 0xac, 0x24, 0x6f, 0x2c, 0x12, 0x73, 0xd0, 0x46, 0x08, 0x49, 0x09,
- 0xb9, 0x3c, 0xb9, 0xf7, 0x81, 0x34, 0x5a, 0x5c, 0x2f, 0x5b, 0xac, 0x30,
- 0xc9, 0xfb, 0x8a, 0x8f, 0xbe, 0xd5, 0x51, 0xf7, 0xb3, 0xbc, 0x53, 0x29,
- 0x79, 0x21, 0x3d, 0x84, 0x04, 0xa8, 0x9f, 0x68, 0x85, 0x88, 0xb3, 0x3c,
- 0x60, 0x60, 0x3a, 0x6c, 0x2b, 0xfa, 0x12, 0xc0, 0x55, 0x06, 0xe8, 0x9a,
- 0xd5, 0x71, 0x7a, 0xeb, 0xe5, 0x06, 0x5f, 0x6b, 0x03, 0x36, 0x9a, 0x9b,
- 0x97, 0x85, 0xb8, 0xce, 0xa2, 0x5a, 0xbe, 0x2e, 0x89, 0x2c, 0x69, 0x58,
- 0x72, 0xc2, 0xbb, 0xfd, 0x2e, 0x10, 0xb5, 0xd3, 0x79, 0xcb, 0x64, 0xfa,
- 0xbf, 0x7c, 0x36, 0x0d, 0x1f, 0x5e, 0xd4, 0xb9, 0x62, 0x60, 0x05, 0x76,
- 0x88, 0x74, 0x64, 0x00, 0x82, 0x35, 0x22, 0xb4, 0x45, 0xf2, 0x3c, 0xb3,
- 0x35, 0xd3, 0x4b, 0x44, 0x47, 0x73, 0x21, 0x96, 0xce, 0xda, 0x2a, 0x46,
- 0x2e, 0xe6, 0xa3, 0xcb, 0xc5, 0x04, 0xde, 0x7d, 0x89, 0x6b, 0xfc, 0xcf,
- 0x78, 0xbe, 0x8c, 0xf3, 0x55, 0xb4, 0xbb, 0xd7, 0x8b, 0xf6, 0x76, 0x76,
- 0xf7, 0x5a, 0xe6, 0xd0, 0xf9, 0x4f, 0x8e, 0xae, 0xd9, 0xc3, 0xd7, 0x9d,
- 0x8f, 0x9d, 0x85, 0x8f, 0x91, 0xc7, 0xad, 0xaa, 0xd9, 0xa4, 0xc4, 0x7b,
- 0xd8, 0xd1, 0x27, 0x15, 0x6e, 0xb9, 0xa6, 0x1d, 0x00, 0xd1, 0x20, 0x53,
- 0x88, 0xcd, 0xc9, 0x6a, 0x4f, 0xb9, 0x32, 0x25, 0xfc, 0xc4, 0x86, 0x96,
- 0x15, 0x43, 0x08, 0x85, 0x33, 0xbc, 0xc5, 0x39, 0x0a, 0x6b, 0x55, 0xf7,
- 0x28, 0x2d, 0x6d, 0x5b, 0x38, 0x46, 0x83, 0xf7, 0x86, 0xe8, 0xfd, 0xe8,
- 0xe4, 0xf0, 0xd2, 0x10, 0xf3, 0xae, 0xf8, 0x3a, 0xcd, 0x57, 0x1f, 0x57,
- 0xa3, 0xe8, 0xd1, 0x67, 0x26, 0xfb, 0x37, 0x09, 0x49, 0x64, 0xf3, 0xd1,
- 0xf2, 0x7a, 0xff, 0xaf, 0x71, 0x7e, 0x9d, 0xcd, 0x3f, 0xf4, 0xfc, 0x04,
- 0x49, 0x4a, 0xfb, 0xc4, 0xa0, 0x76, 0x5f, 0xec, 0x3e, 0x91, 0x08, 0xf8,
- 0x94, 0x4b, 0x9a, 0x81, 0x3f, 0x74, 0x67, 0x5d, 0x01, 0x6c, 0x40, 0xe8,
- 0xbd, 0x43, 0x69, 0x98, 0x4f, 0xba, 0xa2, 0x6e, 0xc5, 0xe1, 0xb3, 0x13,
- 0x7d, 0x56, 0xb2, 0x99, 0xbb, 0x1b, 0x52, 0xbe, 0xb0, 0xcb, 0xa9, 0x7f,
- 0xcb, 0x45, 0x77, 0x50, 0x39, 0xe1, 0x1f, 0x98, 0x2b, 0x77, 0xe1, 0x4a,
- 0x32, 0x1d, 0x0a, 0x4f, 0x56, 0x76, 0x3a, 0xca, 0x93, 0xf8, 0xd6, 0x17,
- 0xb9, 0xf3, 0x68, 0x0e, 0x66, 0x3b, 0xbf, 0x78, 0x7d, 0x28, 0x18, 0x98,
- 0x96, 0x83, 0x83, 0xa5, 0x8e, 0x9c, 0xa5, 0x63, 0x8b, 0x47, 0xf9, 0x81,
- 0xfe, 0x39, 0x48, 0x7e, 0x7f, 0x32, 0xfa, 0x88, 0x87, 0xe8, 0xdc, 0x09,
- 0xdc, 0xd8, 0x41, 0xb5, 0x9c, 0x01, 0xcb, 0xfc, 0x25, 0x93, 0x9a, 0x55,
- 0xb3, 0xdb, 0x94, 0x02, 0x6d, 0x62, 0xbb, 0x96, 0x2a, 0xea, 0x5a, 0x74,
- 0x57, 0x8d, 0x05, 0x34, 0x6e, 0xae, 0x7e, 0x76, 0x74, 0x70, 0x1e, 0xe8,
- 0x4d, 0xd0, 0x4b, 0xbc, 0x8d, 0x88, 0x9f, 0x63, 0x99, 0x19, 0x05, 0x33,
- 0xc5, 0x94, 0xb4, 0xea, 0x79, 0x69, 0xb7, 0x04, 0x9f, 0x9c, 0xdc, 0xc5,
- 0x12, 0x69, 0x9d, 0xe9, 0x75, 0x02, 0x73, 0x06, 0xf0, 0xbc, 0xa7, 0x93,
- 0x18, 0x1e, 0x35, 0xbd, 0x84, 0x20, 0x84, 0xa2, 0xad, 0x54, 0xc3, 0x6a,
- 0x68, 0x6f, 0x1e, 0x22, 0xcd, 0x06, 0xd0, 0xb4, 0x07, 0xf9, 0x5d, 0x1e,
- 0xe3, 0x4c, 0xd7, 0x95, 0x4d, 0x40, 0xf8, 0x33, 0x0d, 0x3e, 0x2e, 0x6e,
- 0x89, 0x95, 0x8a, 0x27, 0x98, 0x7a, 0x4f, 0xc7, 0x89, 0xd9, 0x54, 0x27,
- 0xa9, 0x44, 0x64, 0xb0, 0x35, 0x03, 0x58, 0x3a, 0x95, 0x0d, 0x93, 0x1b,
- 0x88, 0x95, 0x97, 0x69, 0x91, 0x08, 0xee, 0x5d, 0x74, 0x79, 0x9f, 0x89,
- 0xd0, 0xe9, 0x00, 0x07, 0x24, 0xa6, 0xb1, 0x58, 0xa6, 0x02, 0x9d, 0x41,
- 0x9b, 0x07, 0x7e, 0x10, 0x94, 0x57, 0xeb, 0x38, 0x43, 0xca, 0x91, 0x73,
- 0xa0, 0x0d, 0x8f, 0xbe, 0x89, 0x38, 0x47, 0x9b, 0xfb, 0x38, 0xe4, 0x9a,
- 0x04, 0xec, 0x0b, 0x9f, 0x41, 0x91, 0xf8, 0x6a, 0xc9, 0xe7, 0xfd, 0xf0,
- 0x26, 0x5e, 0xb0, 0x48, 0xbc, 0xbb, 0xc3, 0xda, 0xf7, 0x77, 0x96, 0xed,
- 0xc5, 0x07, 0xd5, 0xca, 0x91, 0x16, 0x9d, 0x40, 0x31, 0x9f, 0x70, 0x35,
- 0x51, 0x96, 0x89, 0xab, 0x36, 0x3f, 0xba, 0x3d, 0x8b, 0xed, 0x19, 0x33,
- 0xac, 0x69, 0x41, 0xa4, 0x91, 0x17, 0x93, 0xdb, 0xed, 0x31, 0xfd, 0xf3,
- 0x64, 0x67, 0x1b, 0x50, 0x8c, 0x25, 0x4c, 0x64, 0x4c, 0x93, 0x7b, 0x7b,
- 0xcf, 0x9e, 0xf5, 0xa2, 0x0e, 0x1b, 0xad, 0xac, 0x03, 0x3e, 0x12, 0x74,
- 0xb2, 0x3a, 0x6d, 0x75, 0xe6, 0xb6, 0xf3, 0xab, 0x31, 0xff, 0xc7, 0xaf,
- 0x59, 0xad, 0xa8, 0x4b, 0x4d, 0xdf, 0xc0, 0x3a, 0xcc, 0x43, 0xac, 0x15,
- 0x23, 0xab, 0x7b, 0xda, 0x07, 0x33, 0x4b, 0xb0, 0x07, 0x62, 0x91, 0x64,
- 0x0b, 0x73, 0x33, 0xce, 0x14, 0x20, 0x1f, 0xdd, 0x07, 0xce, 0x19, 0x38,
- 0x86, 0x25, 0xae, 0x4a, 0x13, 0xeb, 0x8b, 0xe5, 0xa8, 0xaf, 0x19, 0xa6,
- 0xa2, 0x67, 0xa4, 0x74, 0x72, 0xe9, 0xcf, 0xa9, 0x59, 0x7f, 0x1b, 0x1c,
- 0xf9, 0xcb, 0xa8, 0xa3, 0xb4, 0xc5, 0x3f, 0x06, 0xf0, 0x12, 0x26, 0x63,
- 0x9e, 0x46, 0xf6, 0x4a, 0xff, 0xf8, 0x8f, 0xff, 0xa0, 0x66, 0xff, 0x83,
- 0x5b, 0x79, 0xf5, 0xc7, 0xa2, 0xbc, 0x09, 0x9e, 0xe9, 0x28, 0xc1, 0x9f,
- 0x78, 0x1f, 0x29, 0xe2, 0x9e, 0x00, 0x54, 0x8a, 0x44, 0xa8, 0x37, 0xa7,
- 0xca, 0x91, 0x7b, 0xc1, 0xfc, 0x52, 0xa4, 0xa8, 0x89, 0xcd, 0xcd, 0x85,
- 0x1d, 0x7c, 0xc9, 0xfe, 0xcb, 0x84, 0x53, 0x9b, 0x89, 0x0a, 0x81, 0x44,
- 0xb7, 0x65, 0x22, 0xc6, 0xf1, 0xdb, 0x6f, 0x4f, 0x2e, 0xce, 0xde, 0xbe,
- 0x39, 0x7e, 0x7b, 0x19, 0x7d, 0x7b, 0x70, 0x71, 0x72, 0xf0, 0xe5, 0xa9,
- 0x66, 0x50, 0xf3, 0x14, 0x38, 0x5a, 0x44, 0x44, 0xef, 0x1a, 0x8e, 0x68,
- 0x90, 0xd1, 0xd2, 0x0a, 0x9e, 0x5f, 0x2b, 0x17, 0xf8, 0x5e, 0x81, 0xa9,
- 0x61, 0x5e, 0x7d, 0x8f, 0x02, 0x16, 0x3d, 0x76, 0xf8, 0xbd, 0xb7, 0x5a,
- 0x16, 0x6c, 0xb6, 0x5c, 0x05, 0x39, 0xb9, 0x1c, 0xc8, 0xc2, 0x54, 0x6a,
- 0xfc, 0xc9, 0xd7, 0x1d, 0x52, 0x78, 0xff, 0x41, 0xf4, 0x95, 0xa4, 0x75,
- 0x6b, 0x48, 0x95, 0x7b, 0x55, 0x53, 0x8c, 0x60, 0xc6, 0x71, 0x63, 0x38,
- 0x38, 0x3d, 0xf5, 0x5d, 0x3d, 0x5e, 0x85, 0x41, 0xe1, 0x7c, 0x24, 0x0b,
- 0xe8, 0xc6, 0x2a, 0x0a, 0x5f, 0x67, 0x1e, 0x65, 0x7b, 0xbe, 0x0a, 0x01,
- 0xb5, 0xb9, 0x33, 0xda, 0x8e, 0x4d, 0xc1, 0x62, 0x60, 0x77, 0x23, 0x1d,
- 0xa0, 0xb4, 0xb8, 0xed, 0x45, 0xdd, 0x3f, 0x76, 0x25, 0x3b, 0x2b, 0x01,
- 0xdc, 0xac, 0xd4, 0x78, 0xd8, 0xf2, 0x83, 0x7a, 0x7b, 0xe6, 0xc7, 0xa4,
- 0x4e, 0x34, 0x37, 0x00, 0xf7, 0xa2, 0xf7, 0x7f, 0x16, 0x26, 0xcf, 0x20,
- 0xf0, 0xd0, 0x3f, 0xae, 0x88, 0xfe, 0x2e, 0xc5, 0x5c, 0x69, 0x94, 0xfd,
- 0x24, 0xad, 0xef, 0x42, 0x69, 0x8b, 0xc7, 0x01, 0xaa, 0xb0, 0x98, 0x71,
- 0x58, 0xf9, 0x85, 0x1c, 0x20, 0xf5, 0x8f, 0xe5, 0x72, 0x78, 0x90, 0xb2,
- 0xd9, 0x1b, 0x56, 0xac, 0x57, 0x39, 0x28, 0xa8, 0xea, 0x61, 0xdb, 0x6a,
- 0x3d, 0xc0, 0x65, 0xc5, 0x81, 0xe5, 0x79, 0x3a, 0x51, 0x9c, 0xba, 0x56,
- 0xaa, 0x18, 0xc0, 0xd3, 0x71, 0x71, 0x08, 0x50, 0xef, 0x39, 0x17, 0x80,
- 0x72, 0x85, 0x10, 0x24, 0x08, 0x95, 0xb8, 0x48, 0xce, 0x99, 0x5d, 0x73,
- 0x15, 0x42, 0x10, 0xd8, 0x09, 0x11, 0x3d, 0xbe, 0xce, 0x4c, 0xfc, 0x8e,
- 0x9d, 0xfb, 0x55, 0x32, 0xb6, 0x24, 0x66, 0xc7, 0xa4, 0x30, 0x07, 0x44,
- 0xe5, 0x2c, 0x60, 0x70, 0xd4, 0x9a, 0xbd, 0x99, 0xe3, 0x94, 0x60, 0x2f,
- 0xd3, 0x38, 0x86, 0x22, 0x48, 0xf7, 0xf5, 0x61, 0xf0, 0xcc, 0x4b, 0xc4,
- 0x45, 0x69, 0xc8, 0x50, 0xc0, 0xdf, 0xb2, 0xf4, 0x60, 0x44, 0xcc, 0x61,
- 0x58, 0xfc, 0x20, 0x9a, 0xd4, 0xe0, 0x47, 0x34, 0x69, 0xa6, 0x50, 0x3a,
- 0x3d, 0x53, 0xce, 0x44, 0x32, 0x4e, 0x14, 0x47, 0xa3, 0xf4, 0x3a, 0x32,
- 0x2b, 0x48, 0xc4, 0x54, 0x02, 0x94, 0xb0, 0x6c, 0x96, 0xf0, 0x56, 0x01,
- 0x03, 0x0c, 0xb2, 0xfb, 0x0d, 0x57, 0x88, 0xf7, 0xa0, 0x55, 0x36, 0x93,
- 0x82, 0x23, 0xf5, 0x03, 0x2b, 0x1a, 0x2c, 0xe9, 0x4b, 0x5e, 0x47, 0x0b,
- 0x6b, 0x52, 0x7c, 0x6b, 0x0d, 0xf2, 0x62, 0x13, 0x2d, 0xe0, 0xf6, 0xe6,
- 0x48, 0x29, 0xb1, 0xf4, 0x5c, 0xac, 0x83, 0x05, 0xc0, 0x32, 0xb7, 0x80,
- 0x65, 0x85, 0xab, 0x4d, 0x6d, 0x3a, 0x80, 0x6a, 0x6e, 0x65, 0x2c, 0x10,
- 0x9f, 0x4c, 0xf4, 0x12, 0x9f, 0x5e, 0xa9, 0x26, 0x61, 0x9b, 0xa5, 0x50,
- 0x4c, 0x57, 0x52, 0xd6, 0x9e, 0xc6, 0xb7, 0x19, 0x30, 0x9e, 0x39, 0x91,
- 0x88, 0x3c, 0x26, 0xfa, 0xa3, 0xfe, 0xd5, 0x17, 0xef, 0x65, 0x6c, 0x85,
- 0xb7, 0x8a, 0x2d, 0xef, 0xc1, 0x16, 0x29, 0x80, 0xa9, 0x75, 0xac, 0x05,
- 0xad, 0x30, 0x5e, 0xda, 0x2f, 0x33, 0x44, 0x85, 0x76, 0xac, 0xc8, 0x32,
- 0x37, 0xa6, 0xd3, 0x00, 0xa2, 0x5a, 0xcc, 0x11, 0x71, 0x43, 0xf8, 0x70,
- 0xe5, 0xe9, 0x0f, 0x34, 0x86, 0x44, 0xe0, 0x6c, 0x83, 0x99, 0x68, 0x74,
- 0x32, 0x8b, 0x67, 0x35, 0xf3, 0x58, 0xc0, 0xd1, 0xcc, 0xdb, 0x1a, 0xde,
- 0x4c, 0x5a, 0x19, 0x21, 0x8d, 0x67, 0x22, 0x3c, 0x7a, 0xf2, 0x9b, 0xad,
- 0x24, 0x7e, 0x6d, 0x63, 0xe3, 0xf0, 0xdd, 0xf0, 0xf2, 0xec, 0x4d, 0x74,
- 0xf6, 0xee, 0xf2, 0xfc, 0xdd, 0xa5, 0x5e, 0x5d, 0x23, 0x89, 0xfe, 0x15,
- 0x1d, 0x51, 0xa4, 0x00, 0xdb, 0xcd, 0x99, 0xba, 0x90, 0x11, 0xac, 0x90,
- 0x01, 0x9a, 0x2e, 0x40, 0xa9, 0x71, 0xd9, 0x3d, 0xc0, 0x6e, 0x12, 0xc4,
- 0x5b, 0xac, 0xf9, 0x3d, 0xad, 0x39, 0x32, 0x33, 0x61, 0xdb, 0xb1, 0x64,
- 0x21, 0xe8, 0x3d, 0xed, 0x55, 0x47, 0x6a, 0x75, 0xcc, 0xe0, 0xec, 0xad,
- 0x82, 0x02, 0xf9, 0x88, 0x1c, 0xb3, 0xed, 0x78, 0xd3, 0x4f, 0x18, 0x1c,
- 0x88, 0xb0, 0x98, 0x71, 0x69, 0xc6, 0x4c, 0x8b, 0xcf, 0x44, 0xd0, 0x4a,
- 0x35, 0x45, 0x2d, 0xcc, 0x94, 0x2b, 0x33, 0x9a, 0xe1, 0x8d, 0x8b, 0xad,
- 0xe6, 0x78, 0x14, 0xc4, 0x94, 0x89, 0x43, 0x9e, 0x83, 0xb7, 0xac, 0xc0,
- 0xfc, 0x3d, 0x9b, 0xc0, 0x1b, 0xd7, 0xec, 0x7d, 0xd4, 0xfd, 0x2e, 0x09,
- 0x1b, 0xfc, 0xfd, 0xdf, 0x39, 0x01, 0xf0, 0xbd, 0x7d, 0xf2, 0x0f, 0xe9,
- 0xf2, 0x2f, 0xf3, 0x2e, 0x42, 0xb1, 0xaa, 0x9e, 0xd7, 0x6f, 0x8e, 0x2f,
- 0xbe, 0x3c, 0xbe, 0x38, 0x1b, 0x22, 0xfc, 0xc4, 0xcc, 0x5d, 0x4d, 0x62,
- 0xbf, 0x4d, 0xf2, 0x51, 0x92, 0x67, 0x5a, 0x48, 0xc6, 0xfe, 0x7a, 0xb6,
- 0xfd, 0xd5, 0x70, 0x78, 0x70, 0x7e, 0xe2, 0x6a, 0x8e, 0xb8, 0x54, 0x24,
- 0xd1, 0x91, 0xe6, 0x92, 0x2c, 0xc7, 0xf3, 0xb7, 0x57, 0x88, 0x2e, 0xc6,
- 0xb7, 0x12, 0xa2, 0xda, 0xf0, 0x71, 0x9a, 0x8d, 0x96, 0x9d, 0x9b, 0x9a,
- 0xa1, 0xc6, 0x0d, 0x1b, 0xba, 0x90, 0x24, 0x6a, 0x0b, 0x01, 0xbf, 0x66,
- 0x93, 0x72, 0xcf, 0x85, 0x71, 0xdd, 0xe6, 0xa3, 0x3e, 0x11, 0xfa, 0xad,
- 0xd5, 0x87, 0x94, 0x60, 0x7a, 0x62, 0x93, 0x12, 0x65, 0xeb, 0xed, 0x0c,
- 0xb7, 0x5c, 0x15, 0x76, 0xfb, 0x96, 0x8f, 0x06, 0x97, 0xc5, 0x98, 0x0e,
- 0x84, 0xb3, 0xcb, 0x59, 0xb2, 0xd0, 0x49, 0x66, 0xaf, 0x8f, 0x81, 0x1d,
- 0x50, 0x6f, 0xae, 0x5e, 0x95, 0x98, 0xba, 0xe8, 0x93, 0xa7, 0x0e, 0xf4,
- 0x29, 0x2c, 0x18, 0x7a, 0x45, 0xc2, 0xf7, 0xe2, 0x7e, 0xa2, 0x17, 0x08,
- 0x20, 0x8e, 0xe7, 0x62, 0xe5, 0x16, 0xfe, 0x5d, 0xf7, 0x75, 0x70, 0x81,
- 0x2d, 0x44, 0xfd, 0x6b, 0x4c, 0x73, 0x34, 0x9a, 0xc6, 0xf3, 0x5b, 0xdc,
- 0x64, 0xb8, 0x9b, 0x58, 0xdd, 0x34, 0x2c, 0x23, 0x2e, 0x47, 0x06, 0xd7,
- 0x96, 0xc2, 0x0b, 0x40, 0x00, 0xb4, 0xe2, 0xe7, 0x6c, 0xd9, 0x75, 0x90,
- 0x4d, 0x81, 0x13, 0x07, 0x27, 0xc9, 0x2f, 0x02, 0x5b, 0x8d, 0x8e, 0x4f,
- 0xe9, 0x52, 0x72, 0x99, 0x0a, 0x50, 0xcf, 0x93, 0x29, 0x03, 0xef, 0x58,
- 0x70, 0x89, 0x24, 0xe7, 0xa5, 0x60, 0x62, 0xc2, 0x38, 0x0c, 0x7d, 0x1b,
- 0x6e, 0x08, 0x50, 0x0a, 0x72, 0x10, 0x0b, 0x57, 0xa3, 0x42, 0xb9, 0xb6,
- 0x30, 0x30, 0x80, 0x4b, 0xfa, 0x92, 0x15, 0x61, 0x11, 0x13, 0x8d, 0xd9,
- 0x3a, 0xf4, 0xa1, 0x25, 0xb1, 0x7d, 0x27, 0x83, 0xf0, 0x22, 0xa9, 0x73,
- 0x56, 0x55, 0x52, 0x24, 0xd6, 0x6e, 0x93, 0xbc, 0xde, 0x66, 0x00, 0x00,
- 0x03, 0xa4, 0x06, 0xc4, 0xfa, 0xed, 0xe0, 0x65, 0x2c, 0xee, 0xb5, 0x1a,
- 0x6b, 0x6a, 0x03, 0x1f, 0x58, 0x75, 0x75, 0x84, 0x3f, 0x89, 0xff, 0x09,
- 0x71, 0x92, 0x7a, 0xfb, 0x96, 0x13, 0x70, 0x9b, 0xbc, 0x82, 0x74, 0x1a,
- 0x86, 0x78, 0x0a, 0x02, 0x02, 0xcc, 0x82, 0x12, 0xf4, 0x0f, 0x0d, 0xc6,
- 0xc9, 0xb6, 0xfd, 0xb7, 0x7c, 0x55, 0x64, 0xfd, 0xd1, 0x12, 0x3a, 0x99,
- 0xc7, 0xea, 0xd2, 0x44, 0x40, 0x2e, 0x0a, 0x0c, 0x70, 0x2e, 0x7c, 0xcf,
- 0x6e, 0x0d, 0xa4, 0x58, 0x8b, 0xa7, 0x03, 0x39, 0x77, 0x55, 0xe0, 0x16,
- 0x07, 0xd7, 0x21, 0x81, 0xec, 0x08, 0xe8, 0xd5, 0xa8, 0x65, 0x1d, 0xa1,
- 0x6e, 0xb2, 0x0b, 0x39, 0x9b, 0x6b, 0xd5, 0x3c, 0xd8, 0xd9, 0xab, 0x61,
- 0xbb, 0xa5, 0x43, 0x4b, 0xbf, 0x84, 0x88, 0x90, 0x28, 0x86, 0xb8, 0xc5,
- 0xe3, 0x5a, 0xf4, 0xff, 0x5d, 0xc9, 0xf5, 0x81, 0x04, 0x69, 0x20, 0x9e,
- 0x4a, 0x91, 0x87, 0xb5, 0xb7, 0x88, 0x1c, 0xa6, 0xf2, 0xf2, 0xf2, 0x87,
- 0xf3, 0xe3, 0x57, 0xf6, 0xe6, 0x63, 0x7b, 0x26, 0x00, 0x5c, 0x08, 0xbf,
- 0x48, 0x14, 0xec, 0x32, 0xa8, 0xc1, 0x49, 0x44, 0xd6, 0x2f, 0xcd, 0x2d,
- 0x2c, 0xdd, 0xf4, 0xa3, 0xef, 0x8f, 0x4e, 0x86, 0xe7, 0xa7, 0x67, 0x87,
- 0xaf, 0x5e, 0x7e, 0x6f, 0xdc, 0xf8, 0x73, 0x46, 0x9c, 0x11, 0x19, 0xcd,
- 0x7d, 0xe6, 0x01, 0x02, 0xf4, 0xbd, 0xb7, 0xc7, 0xdf, 0xbd, 0x27, 0xcd,
- 0xe0, 0x15, 0x83, 0x82, 0xf7, 0xee, 0xe2, 0xa9, 0xbe, 0xc4, 0xea, 0x55,
- 0x8b, 0x5c, 0x17, 0xa4, 0x73, 0xb4, 0x2d, 0x2c, 0xcb, 0x13, 0x01, 0x42,
- 0xeb, 0x0a, 0x12, 0xb4, 0x46, 0x64, 0x05, 0xf5, 0x84, 0xe2, 0x4a, 0x6e,
- 0x66, 0x4b, 0x71, 0xc6, 0xcc, 0xdd, 0xfc, 0xdd, 0x52, 0x22, 0xf3, 0xd8,
- 0x1b, 0x1d, 0x3a, 0x79, 0x11, 0xfc, 0xa8, 0xdf, 0xf8, 0xa0, 0x50, 0x85,
- 0xdf, 0xcd, 0x39, 0x16, 0xc2, 0x61, 0x19, 0x6a, 0x85, 0x4c, 0xb8, 0x4f,
- 0x15, 0xf0, 0x50, 0x91, 0x7c, 0x38, 0x0e, 0xd3, 0x42, 0xb2, 0x5d, 0x15,
- 0x66, 0x11, 0x5f, 0xdc, 0x58, 0xe2, 0xf1, 0x98, 0x7e, 0x30, 0xc6, 0x24,
- 0x97, 0x73, 0x39, 0xe7, 0xaa, 0xec, 0xc3, 0x4b, 0x56, 0xa1, 0xb4, 0x6a,
- 0x99, 0x9a, 0x9f, 0xad, 0xa4, 0x1c, 0x12, 0xff, 0xab, 0xd8, 0x95, 0x61,
- 0xa9, 0x89, 0xca, 0x89, 0x76, 0x6c, 0xae, 0x9a, 0x09, 0xc8, 0x56, 0x04,
- 0x49, 0x2f, 0x64, 0x21, 0x54, 0x10, 0x58, 0xe3, 0x2b, 0x3b, 0xc0, 0x99,
- 0x92, 0x46, 0xad, 0xe2, 0x02, 0xaa, 0xa5, 0x60, 0x77, 0xa6, 0xe9, 0xc8,
- 0x1b, 0xcc, 0x6b, 0x9e, 0x48, 0x76, 0x74, 0x2b, 0xe2, 0x43, 0x78, 0x84,
- 0xcc, 0x14, 0xee, 0xd3, 0x6b, 0x8b, 0xcc, 0xca, 0x27, 0x0a, 0xf1, 0xc3,
- 0x54, 0x1d, 0x26, 0x41, 0x3a, 0x25, 0x15, 0x8a, 0x89, 0x89, 0x68, 0xee,
- 0xd3, 0x20, 0x94, 0x51, 0x41, 0x84, 0x80, 0x7d, 0xaa, 0x2c, 0x1b, 0xf5,
- 0xca, 0x25, 0x9d, 0x89, 0x8d, 0x2c, 0x24, 0xb0, 0x20, 0x3d, 0x1b, 0x21,
- 0x27, 0x3a, 0xb3, 0x86, 0xf4, 0xa1, 0x62, 0xe3, 0x35, 0xe7, 0x41, 0x01,
- 0xa9, 0x69, 0xc2, 0xa2, 0x16, 0xac, 0x6f, 0x61, 0x67, 0x76, 0x93, 0xf2,
- 0x0a, 0x8e, 0x96, 0x61, 0x3d, 0x2f, 0x37, 0x7a, 0x29, 0x69, 0x81, 0x85,
- 0x47, 0xb0, 0x5d, 0x9c, 0x03, 0x09, 0xb1, 0x54, 0xa4, 0x71, 0x53, 0x7a,
- 0x34, 0x72, 0x6e, 0x50, 0x05, 0x85, 0x31, 0xba, 0xb4, 0x52, 0x7d, 0x8f,
- 0xad, 0xa8, 0x5b, 0x4d, 0x21, 0xdf, 0x3c, 0xb1, 0x10, 0x18, 0x31, 0x31,
- 0x14, 0xec, 0x6b, 0x98, 0x8f, 0xdd, 0x65, 0xcc, 0x99, 0x2b, 0x1c, 0x0a,
- 0x92, 0x2b, 0xe0, 0xce, 0x92, 0x8b, 0xa3, 0x6b, 0x05, 0x51, 0xd4, 0xbf,
- 0x64, 0x87, 0x9b, 0x81, 0xb1, 0xf9, 0x58, 0x60, 0x59, 0xee, 0x80, 0xac,
- 0xc4, 0xb4, 0xbe, 0xd2, 0x0e, 0x5d, 0x96, 0xb5, 0x6d, 0x56, 0x4f, 0x92,
- 0x76, 0x62, 0xe4, 0x88, 0x98, 0x4d, 0x37, 0xc8, 0x35, 0x2c, 0x34, 0x83,
- 0xd3, 0x39, 0x2b, 0x85, 0xe1, 0xa1, 0x62, 0x91, 0xcf, 0x79, 0xaa, 0x38,
- 0x05, 0x49, 0xb2, 0x5c, 0xa0, 0xfc, 0xce, 0x58, 0x11, 0xc8, 0x11, 0xfc,
- 0xe9, 0xda, 0xb3, 0x3b, 0xc4, 0xaf, 0x15, 0x2d, 0xea, 0x9b, 0x77, 0xa7,
- 0x97, 0x27, 0xe7, 0xa1, 0xe3, 0x31, 0xfa, 0xee, 0xe4, 0xf2, 0x6b, 0x92,
- 0xd7, 0xb9, 0xb6, 0xf3, 0x29, 0x7b, 0x77, 0xde, 0xbc, 0x39, 0x78, 0xcb,
- 0x19, 0xea, 0x6f, 0x11, 0x23, 0x77, 0x00, 0x9d, 0x81, 0xb9, 0x11, 0xad,
- 0x30, 0x93, 0x0e, 0xe7, 0x2e, 0xf7, 0x9a, 0x5e, 0x86, 0xda, 0xe9, 0x03,
- 0xc3, 0xe1, 0x23, 0x14, 0xae, 0x11, 0x6f, 0xb8, 0xea, 0x04, 0x2b, 0xb6,
- 0xe9, 0xe0, 0xd4, 0xb2, 0x9e, 0xc5, 0xeb, 0x5c, 0x87, 0x1e, 0x47, 0x9e,
- 0x9c, 0xc8, 0xe6, 0xf0, 0xa9, 0xca, 0xd5, 0xed, 0x3d, 0x17, 0xd8, 0x50,
- 0x07, 0x62, 0x8a, 0x98, 0x55, 0x12, 0x99, 0xe6, 0xaa, 0xd2, 0xc8, 0x75,
- 0x59, 0x8d, 0x5b, 0xa7, 0x1e, 0x31, 0x24, 0x38, 0x95, 0x33, 0x6f, 0x0c,
- 0x64, 0x65, 0x93, 0xf5, 0xe5, 0x8b, 0xd3, 0xf0, 0x3e, 0xad, 0xd6, 0x0f,
- 0xb6, 0x40, 0xb3, 0xeb, 0x2c, 0xf1, 0x07, 0xb7, 0x7f, 0x66, 0xcd, 0x98,
- 0xe5, 0x17, 0x1a, 0x98, 0xdc, 0x2d, 0x7d, 0x66, 0x6b, 0x7d, 0xda, 0x92,
- 0x2d, 0x57, 0xa3, 0x46, 0x2d, 0x67, 0xfb, 0x22, 0x55, 0x56, 0xaa, 0x78,
- 0x03, 0x39, 0xf6, 0xcc, 0xb5, 0xac, 0x01, 0x0d, 0x88, 0xeb, 0xd5, 0xd4,
- 0x18, 0x9d, 0x33, 0x98, 0xa5, 0x3d, 0x56, 0xc9, 0xec, 0xad, 0x95, 0x12,
- 0xb7, 0xd4, 0x28, 0x24, 0x44, 0x32, 0x84, 0x8b, 0xf7, 0x99, 0xa2, 0x2c,
- 0x57, 0x96, 0x0d, 0x92, 0x87, 0x84, 0xdd, 0x9b, 0xfc, 0xeb, 0x5f, 0x17,
- 0xd7, 0x61, 0xd6, 0x14, 0xe6, 0xaa, 0xe9, 0xc1, 0xed, 0x98, 0xc0, 0x22,
- 0x15, 0x69, 0x71, 0xb2, 0xca, 0x08, 0xb4, 0xe2, 0xd8, 0xee, 0xba, 0x0e,
- 0xf5, 0xfb, 0xbd, 0xe6, 0xf7, 0x7b, 0x62, 0x71, 0xe4, 0x0a, 0xf4, 0x0e,
- 0x4f, 0x53, 0x72, 0x81, 0x43, 0xe9, 0xcd, 0x64, 0x02, 0xa6, 0x30, 0x29,
- 0x56, 0x0f, 0xb7, 0x8a, 0xb0, 0x44, 0x31, 0xfb, 0x73, 0x2c, 0xd2, 0x32,
- 0x47, 0x8e, 0x23, 0x1e, 0x81, 0x85, 0x58, 0x02, 0x48, 0x11, 0xae, 0x05,
- 0x36, 0xc5, 0xb7, 0x15, 0x35, 0x48, 0xdf, 0x3f, 0x75, 0x01, 0xdd, 0x9e,
- 0xa5, 0xa1, 0xc0, 0x97, 0x66, 0xd4, 0xf4, 0xd3, 0xc5, 0x9d, 0x15, 0xb8,
- 0xa4, 0x5f, 0x9f, 0xbb, 0xe2, 0x2e, 0x45, 0xc5, 0x3d, 0x55, 0x01, 0xae,
- 0x35, 0xde, 0x8f, 0xc1, 0x21, 0xc0, 0x8e, 0x19, 0x83, 0xc3, 0x7c, 0x1d,
- 0xd4, 0xc6, 0x95, 0x54, 0x43, 0x7b, 0x83, 0x52, 0x93, 0xb0, 0x2d, 0x4f,
- 0x91, 0x5d, 0x09, 0x76, 0x14, 0xf0, 0x96, 0x10, 0x27, 0x5e, 0x77, 0xfd,
- 0xc7, 0xbd, 0x9d, 0x9d, 0xdd, 0xfd, 0xdd, 0xcf, 0x5e, 0xec, 0xec, 0xef,
- 0xee, 0xee, 0xee, 0xed, 0xef, 0xee, 0xef, 0xef, 0xed, 0xfc, 0xb4, 0xcd,
- 0xa6, 0xa3, 0xbb, 0x34, 0xb9, 0x77, 0x95, 0xe4, 0xbf, 0x93, 0x6b, 0x1a,
- 0xfe, 0x82, 0x95, 0xb8, 0x01, 0x99, 0x4b, 0xaa, 0x86, 0x6b, 0x82, 0x8f,
- 0x43, 0x26, 0x90, 0xe0, 0x6b, 0x01, 0x24, 0x5b, 0xf8, 0x6c, 0x45, 0x9c,
- 0xc1, 0x00, 0x30, 0x19, 0xa3, 0xfa, 0xdb, 0x92, 0x67, 0x3a, 0x62, 0x69,
- 0x00, 0x22, 0x4d, 0xe1, 0x72, 0xc3, 0xae, 0xa7, 0xd9, 0x68, 0x84, 0x00,
- 0x78, 0x97, 0x1e, 0x39, 0x88, 0x18, 0x99, 0xf3, 0x56, 0x48, 0x42, 0x9d,
- 0x06, 0x08, 0x4f, 0x93, 0x83, 0xee, 0x57, 0x47, 0xe4, 0x2e, 0x0d, 0xc9,
- 0x1d, 0x67, 0x8c, 0x4a, 0x3f, 0x61, 0xa6, 0x44, 0x8b, 0x94, 0xbb, 0xb4,
- 0x89, 0xe8, 0x2a, 0xf9, 0x6c, 0x67, 0x7f, 0x9f, 0x0b, 0x47, 0xfc, 0x7e,
- 0xb7, 0xa7, 0x91, 0x85, 0x61, 0xb8, 0x74, 0xcf, 0xdd, 0x4e, 0xd2, 0x06,
- 0x6b, 0x1f, 0xe1, 0x3c, 0xe7, 0xcb, 0x59, 0x92, 0xab, 0x1e, 0x82, 0xfb,
- 0x50, 0x00, 0x64, 0x98, 0x18, 0x6d, 0xc8, 0xee, 0x59, 0x94, 0x42, 0x81,
- 0x49, 0x5e, 0xf2, 0x1b, 0xfc, 0xe5, 0xa9, 0xe7, 0x1c, 0x47, 0x65, 0x2e,
- 0x45, 0x26, 0xf9, 0x61, 0x08, 0xe4, 0x40, 0xc5, 0xc8, 0x6e, 0x43, 0x59,
- 0x55, 0x73, 0x3a, 0x7e, 0x0c, 0x06, 0xbf, 0xf7, 0x6c, 0xf7, 0x27, 0x09,
- 0x64, 0x63, 0x02, 0xf7, 0xab, 0xa0, 0xa5, 0xc1, 0x26, 0x2a, 0x8f, 0x48,
- 0x1a, 0x98, 0x12, 0xc6, 0x66, 0x32, 0xb8, 0x1e, 0x98, 0x90, 0xa0, 0x86,
- 0xc3, 0x5e, 0x18, 0x4e, 0x2c, 0x08, 0xd6, 0x52, 0x93, 0x1d, 0x6a, 0x97,
- 0xd9, 0x86, 0xcc, 0xb6, 0x2b, 0x76, 0xc9, 0x4a, 0x8d, 0x97, 0x0d, 0xba,
- 0x32, 0x0e, 0x4e, 0x4e, 0x39, 0x5e, 0xe5, 0x94, 0x24, 0xb0, 0xa1, 0xb1,
- 0x32, 0x84, 0xf4, 0x20, 0xde, 0x66, 0x9e, 0xf2, 0x6d, 0xda, 0x73, 0xd0,
- 0xf2, 0x16, 0x16, 0x0f, 0xb1, 0x82, 0xed, 0xee, 0x22, 0x99, 0x2b, 0x0e,
- 0x14, 0xc9, 0xc3, 0xc4, 0xcf, 0x0a, 0x31, 0xa7, 0x00, 0x6e, 0x91, 0x71,
- 0x88, 0xe1, 0xe3, 0x80, 0xc4, 0x2b, 0x0b, 0x8f, 0x6a, 0x16, 0x79, 0x32,
- 0x4d, 0xee, 0xd4, 0xee, 0x21, 0xe0, 0x75, 0x5f, 0xa9, 0x7b, 0x41, 0x8a,
- 0xd9, 0x95, 0xde, 0x4b, 0x52, 0xf1, 0x60, 0x70, 0x9f, 0xdb, 0x92, 0xf7,
- 0xef, 0xd3, 0xb9, 0x51, 0xfc, 0xd7, 0x01, 0x2e, 0x9b, 0x37, 0x87, 0xdf,
- 0xeb, 0xb3, 0x08, 0xaa, 0x71, 0x48, 0xef, 0x0a, 0xcd, 0xd8, 0xad, 0x47,
- 0x05, 0x8a, 0x2a, 0x6f, 0xe5, 0x90, 0xc4, 0x2c, 0xd6, 0x33, 0x4c, 0x4c,
- 0x31, 0xe6, 0xb1, 0xd4, 0xd2, 0x63, 0x13, 0x0a, 0x5a, 0xba, 0x22, 0x79,
- 0x89, 0x91, 0xcf, 0x7b, 0x91, 0x2f, 0x1c, 0x9f, 0x4d, 0xe9, 0x4f, 0x04,
- 0x3a, 0xf0, 0xaa, 0xe3, 0x59, 0xc6, 0xf4, 0x0b, 0xc2, 0x8f, 0xe8, 0x4f,
- 0x09, 0x7b, 0xd5, 0xbf, 0xd0, 0x54, 0xbe, 0x04, 0x74, 0x64, 0x4f, 0x88,
- 0x95, 0xfd, 0x01, 0xe5, 0x78, 0xe0, 0x46, 0xaf, 0xee, 0x38, 0x19, 0xff,
- 0x91, 0x79, 0x8b, 0x8c, 0x4d, 0x64, 0xb9, 0xad, 0xae, 0xec, 0xc2, 0x48,
- 0xaa, 0x57, 0x7d, 0xb9, 0x64, 0x3b, 0xb5, 0xab, 0xce, 0xc0, 0xa3, 0x98,
- 0x31, 0x69, 0x25, 0x52, 0x28, 0xce, 0x35, 0xce, 0x02, 0xd7, 0x92, 0x76,
- 0x57, 0x5a, 0x3f, 0xcd, 0xee, 0xb9, 0xca, 0xdd, 0xd5, 0x15, 0xd7, 0x2d,
- 0x3f, 0x9b, 0x7b, 0x88, 0x48, 0xe6, 0xaa, 0xf2, 0xe0, 0xcc, 0x4a, 0x6b,
- 0xd0, 0xdc, 0xac, 0x80, 0xbd, 0x05, 0x2e, 0x0e, 0xa2, 0x03, 0xac, 0x12,
- 0xc9, 0x42, 0x68, 0x4e, 0xdc, 0x6c, 0x10, 0x07, 0x6b, 0x71, 0x72, 0x5a,
- 0x82, 0x97, 0x6f, 0xc8, 0x19, 0xca, 0xfd, 0x71, 0x4c, 0xd8, 0x2c, 0x9b,
- 0x5b, 0xd8, 0xf3, 0xb2, 0x10, 0xc0, 0x30, 0xab, 0xd7, 0xbb, 0x21, 0x36,
- 0xc3, 0x74, 0xaa, 0x08, 0xbd, 0x2a, 0x38, 0xe3, 0x8d, 0x70, 0x32, 0x93,
- 0xfe, 0xe2, 0x66, 0x61, 0x3b, 0x6d, 0xfc, 0x4a, 0x98, 0x99, 0x06, 0xda,
- 0xe2, 0x7a, 0x3b, 0xff, 0xfa, 0x7c, 0x10, 0x1d, 0x73, 0x4b, 0x32, 0x26,
- 0xbd, 0x87, 0xa0, 0x41, 0xd1, 0x77, 0x34, 0xd9, 0x6b, 0x66, 0xe0, 0x67,
- 0x39, 0xff, 0x85, 0xd6, 0xf4, 0x4b, 0x31, 0x9a, 0xe0, 0xdb, 0x6a, 0xaf,
- 0xd4, 0x90, 0x45, 0xc4, 0x9d, 0xe3, 0x77, 0x3a, 0x2a, 0xc4, 0x1d, 0xdd,
- 0x36, 0xf9, 0x1e, 0xb2, 0xbc, 0x02, 0xaf, 0x20, 0x6f, 0x46, 0xc4, 0x34,
- 0xc1, 0xfa, 0x16, 0x2b, 0xec, 0x1f, 0x14, 0x6e, 0x60, 0x72, 0xe8, 0xf5,
- 0x20, 0x0d, 0x04, 0xa4, 0xa5, 0xe4, 0xe7, 0x02, 0x6b, 0xe4, 0x5c, 0xe5,
- 0x02, 0x2c, 0x90, 0x27, 0x1a, 0x86, 0x94, 0xa9, 0x03, 0x43, 0xf4, 0x8d,
- 0x22, 0xa9, 0x1d, 0xd7, 0x40, 0xbc, 0xb2, 0x2f, 0x58, 0x28, 0xe6, 0xb1,
- 0x10, 0x13, 0xa2, 0x2d, 0x18, 0x6c, 0xfc, 0xbf, 0xe1, 0xec, 0xb1, 0x7d,
- 0xfd, 0x05, 0x02, 0x00,
-};
-#define BUF_SIZE 0x10000
-/* Decompress and send to stdout a gzip-compressed buffer */
-void hugehelp(void)
-{
- unsigned char* buf;
- int status,headerlen;
- z_stream z;
-
- /* Make sure no gzip options are set */
- if (hugehelpgz[3] & 0xfe)
- return;
-
- headerlen = 10;
- z.avail_in = (unsigned int)(sizeof(hugehelpgz) - headerlen);
- z.next_in = (unsigned char *)hugehelpgz + headerlen;
- z.zalloc = (alloc_func)Z_NULL;
- z.zfree = (free_func)Z_NULL;
- z.opaque = 0;
-
- if (inflateInit2(&z, -MAX_WBITS) != Z_OK)
- return;
-
- buf = malloc(BUF_SIZE);
- if (buf) {
- while(1) {
- z.avail_out = BUF_SIZE;
- z.next_out = buf;
- status = inflate(&z, Z_SYNC_FLUSH);
- if (status == Z_OK || status == Z_STREAM_END) {
- fwrite(buf, BUF_SIZE - z.avail_out, 1, stdout);
- if (status == Z_STREAM_END)
- break;
- }
- else
- break; /* Error */
- }
- free(buf);
- }
- inflateEnd(&z);
-}
-#endif /* USE_MANUAL */
-#endif /* HAVE_LIBZ */
diff --git a/src/hugehelp.h b/src/hugehelp.h
deleted file mode 100644
index b84be17f..00000000
--- a/src/hugehelp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef HEADER_CURL_HUGEHELP_H
-#define HEADER_CURL_HUGEHELP_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-void hugehelp(void);
-
-#endif /* HEADER_CURL_HUGEHELP_H */
diff --git a/src/macos/MACINSTALL.TXT b/src/macos/MACINSTALL.TXT
index 17da1332..1839ef20 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 <http://sourceforge.net/projects/gusi/> 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 <http://perso.wanadoo.fr/ela/resources.html#gusiextra> 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 "hugehelp.c" is missing rename "curl/src/hugehelp.c.cvs" to "hugehelp.c" and make sure its file type is 'TEXT' \ No newline at end of file
+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 <http://sourceforge.net/projects/gusi/> 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 <http://perso.wanadoo.fr/ela/resources.html#gusiextra> 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/main.c b/src/main.c
deleted file mode 100644
index 95b47ea3..00000000
--- a/src/main.c
+++ /dev/null
@@ -1,6084 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <errno.h>
-
-#if defined(MSDOS) || defined(WIN32)
-# if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
-# include <libgen.h>
-# endif
-#endif
-
-#include <curl/curl.h>
-
-#include "urlglob.h"
-#include "writeout.h"
-#include "getpass.h"
-#include "homedir.h"
-#include "curlutil.h"
-#ifdef USE_MANUAL
-#include "hugehelp.h"
-#endif
-#ifdef USE_ENVIRONMENT
-#include "writeenv.h"
-#endif
-#include "rawstr.h"
-
-#define CURLseparator "--_curl_--"
-
-#ifdef NETWARE
-#ifdef __NOVELL_LIBC__
-#include <screen.h>
-#else
-#include <nwconio.h>
-#define mkdir mkdir_510
-#endif
-#endif
-
-#include "version.h"
-
-#ifdef HAVE_IO_H /* typical win32 habit */
-#include <io.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_UTIME_H
-#include <utime.h>
-#else
-#ifdef HAVE_SYS_UTIME_H
-#include <sys/utime.h>
-#endif
-
-#endif /* HAVE_UTIME_H */
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#elif defined(HAVE_POLL_H)
-#include <poll.h>
-#endif
-
-#ifdef HAVE_LOCALE_H
-#include <locale.h> /* for setlocale() */
-#endif
-
-#define ENABLE_CURLX_PRINTF
-/* make the curlx header define all printf() functions to use the curlx_*
- versions instead */
-#include "curlx.h" /* header from the libcurl directory */
-
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
-#include <iconv.h>
-/* set default codesets for iconv */
-#ifndef CURL_ICONV_CODESET_OF_NETWORK
-#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
-#endif
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h> /* for IPPROTO_TCP */
-#endif
-#ifdef HAVE_NETINET_TCP_H
-#include <netinet/tcp.h> /* for TCP_KEEPIDLE, TCP_KEEPINTVL */
-#endif
-
-#include "os-specific.h"
-
-/* The last #include file should be: */
-#ifdef CURLDEBUG
-#ifndef CURLTOOLDEBUG
-#define MEMDEBUG_NODEFINES
-#endif
-/* This is low-level hard-hacking memory leak tracking and similar. Using
- the library level code from this client-side is ugly, but we do this
- anyway for convenience. */
-#include "memdebug.h"
-#endif
-
-#ifdef __VMS
-static int vms_show = 0;
-#endif
-
-#if defined(NETWARE)
-#define PRINT_LINES_PAUSE 23
-#endif
-
-#if defined(__SYMBIAN32__)
-#define PRINT_LINES_PAUSE 16
-#define pressanykey() getchar()
-#endif
-
-#define DEFAULT_MAXREDIRS 50L
-
-#if defined(O_BINARY) && defined(HAVE_SETMODE)
-#ifdef __HIGHC__
-#define SET_BINMODE(file) _setmode(file,O_BINARY)
-#else
-#define SET_BINMODE(file) setmode(fileno(file),O_BINARY)
-#endif
-#else
-#define SET_BINMODE(file) ((void)0)
-#endif
-
-#ifndef O_BINARY
-/* since O_BINARY as used in bitmasks, setting it to zero makes it usable in
- source code but yet it doesn't ruin anything */
-#define O_BINARY 0
-#endif
-
-#if defined(MSDOS) || defined(WIN32)
-
-static const char *msdosify(const char *);
-static char *rename_if_dos_device_name(char *);
-static char *sanitize_dos_name(char *);
-
-#ifndef S_ISCHR
-# ifdef S_IFCHR
-# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-# else
-# define S_ISCHR(m) (0) /* cannot tell if file is a device */
-# endif
-#endif
-
-#ifdef WIN32
-# define _use_lfn(f) (1) /* long file names always available */
-#elif !defined(__DJGPP__) || (__DJGPP__ < 2) /* DJGPP 2.0 has _use_lfn() */
-# define _use_lfn(f) (0) /* long file names never available */
-#endif
-
-#endif /* MSDOS || WIN32 */
-
-#ifdef MSDOS
-#define USE_WATT32
-#include <dos.h>
-
-#ifdef DJGPP
-/* we want to glob our own argv[] */
-char **__crt0_glob_function (char *arg)
-{
- (void)arg;
- return (char**)0;
-}
-#endif /* __DJGPP__ */
-#endif /* MSDOS */
-
-#ifndef STDIN_FILENO
-#define STDIN_FILENO fileno(stdin)
-#endif
-
-#ifndef STDOUT_FILENO
-#define STDOUT_FILENO fileno(stdout)
-#endif
-
-#ifndef STDERR_FILENO
-#define STDERR_FILENO fileno(stderr)
-#endif
-
-#define CURL_PROGRESS_STATS 0 /* default progress display */
-#define CURL_PROGRESS_BAR 1
-
-typedef enum {
- HTTPREQ_UNSPEC,
- HTTPREQ_GET,
- HTTPREQ_HEAD,
- HTTPREQ_POST,
- HTTPREQ_SIMPLEPOST,
- HTTPREQ_CUSTOM,
- HTTPREQ_LAST
-} HttpReq;
-
-/*
- * Large file support (>2Gb) using WIN32 functions.
- */
-
-#ifdef USE_WIN32_LARGE_FILES
-# include <io.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# define lseek(fdes,offset,whence) _lseeki64(fdes, offset, whence)
-# define fstat(fdes,stp) _fstati64(fdes, stp)
-# define stat(fname,stp) _stati64(fname, stp)
-# define struct_stat struct _stati64
-# define LSEEK_ERROR (__int64)-1
-#endif
-
-/*
- * Small file support (<2Gb) using WIN32 functions.
- */
-
-#ifdef USE_WIN32_SMALL_FILES
-# include <io.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# define lseek(fdes,offset,whence) _lseek(fdes, (long)offset, whence)
-# define fstat(fdes,stp) _fstat(fdes, stp)
-# define stat(fname,stp) _stat(fname, stp)
-# define struct_stat struct _stat
-# define LSEEK_ERROR (long)-1
-#endif
-
-#ifndef struct_stat
-# define struct_stat struct stat
-#endif
-
-#ifndef LSEEK_ERROR
-# define LSEEK_ERROR (off_t)-1
-#endif
-
-#ifdef WIN32
-# include <direct.h>
-# define mkdir(x,y) (mkdir)(x)
-# undef PATH_MAX
-# define PATH_MAX MAX_PATH
-# ifndef __POCC__
-# define F_OK 0
-# endif
-#endif
-
-/*
- * Default sizeof(off_t) in case it hasn't been defined in config file.
- */
-
-#ifndef SIZEOF_OFF_T
-# if defined(__VMS) && !defined(__VAX)
-# if defined(_LARGEFILE)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(__OS400__) && defined(__ILEC400__)
-# if defined(_LARGE_FILES)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(__MVS__) && defined(__IBMC__)
-# if defined(_LP64) || defined(_LARGE_FILES)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(__370__) && defined(__IBMC__)
-# if defined(_LP64) || defined(_LARGE_FILES)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(TPF)
-# define SIZEOF_OFF_T 8
-# endif
-# ifndef SIZEOF_OFF_T
-# define SIZEOF_OFF_T 4
-# endif
-#endif
-
-#ifdef CURL_DOES_CONVERSIONS
-#ifdef HAVE_ICONV
-iconv_t inbound_cd = (iconv_t)-1;
-iconv_t outbound_cd = (iconv_t)-1;
-
-/*
- * convert_to_network() is an internal function to convert
- * from the host encoding to ASCII on non-ASCII platforms.
- */
-static CURLcode
-convert_to_network(char *buffer, size_t length)
-{
- CURLcode rc;
-
- /* translate from the host encoding to the network encoding */
- char *input_ptr, *output_ptr;
- size_t in_bytes, out_bytes;
-
- /* open an iconv conversion descriptor if necessary */
- if(outbound_cd == (iconv_t)-1) {
- outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
- CURL_ICONV_CODESET_OF_HOST);
- if(outbound_cd == (iconv_t)-1) {
- return CURLE_CONV_FAILED;
- }
- }
- /* call iconv */
- input_ptr = output_ptr = buffer;
- in_bytes = out_bytes = length;
- rc = iconv(outbound_cd, &input_ptr, &in_bytes,
- &output_ptr, &out_bytes);
- if((rc == -1) || (in_bytes != 0)) {
- return CURLE_CONV_FAILED;
- }
-
- return CURLE_OK;
-}
-
-/*
- * convert_from_network() is an internal function
- * for performing ASCII conversions on non-ASCII platforms.
- */
-static CURLcode
-convert_from_network(char *buffer, size_t length)
-{
- CURLcode rc;
-
- /* translate from the network encoding to the host encoding */
- char *input_ptr, *output_ptr;
- size_t in_bytes, out_bytes;
-
- /* open an iconv conversion descriptor if necessary */
- if(inbound_cd == (iconv_t)-1) {
- inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
- CURL_ICONV_CODESET_OF_NETWORK);
- if(inbound_cd == (iconv_t)-1) {
- return CURLE_CONV_FAILED;
- }
- }
- /* call iconv */
- input_ptr = output_ptr = buffer;
- in_bytes = out_bytes = length;
- rc = iconv(inbound_cd, &input_ptr, &in_bytes,
- &output_ptr, &out_bytes);
- if((rc == -1) || (in_bytes != 0)) {
- return CURLE_CONV_FAILED;
- }
-
- return CURLE_OK;
-}
-#endif /* HAVE_ICONV */
-
-static
-char convert_char(curl_infotype infotype, char this_char)
-{
-/* determine how this specific character should be displayed */
- switch(infotype) {
- case CURLINFO_DATA_IN:
- case CURLINFO_DATA_OUT:
- case CURLINFO_SSL_DATA_IN:
- case CURLINFO_SSL_DATA_OUT:
- /* data, treat as ASCII */
- if((this_char >= 0x20) && (this_char < 0x7f)) {
- /* printable ASCII hex value: convert to host encoding */
- convert_from_network(&this_char, 1);
- }
- else {
- /* non-printable ASCII, use a replacement character */
- return UNPRINTABLE_CHAR;
- }
- /* fall through to default */
- default:
- /* treat as host encoding */
- if(ISPRINT(this_char)
- && (this_char != '\t')
- && (this_char != '\r')
- && (this_char != '\n')) {
- /* printable characters excluding tabs and line end characters */
- return this_char;
- }
- break;
- }
- /* non-printable, use a replacement character */
- return UNPRINTABLE_CHAR;
-}
-#endif /* CURL_DOES_CONVERSIONS */
-
-#ifdef WIN32
-
-#ifdef __BORLANDC__
-/* 64-bit lseek-like function unavailable */
-# define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
-#endif
-
-#ifdef __POCC__
-# if(__POCC__ < 450)
-/* 64-bit lseek-like function unavailable */
-# define _lseeki64(hnd,ofs,whence) _lseek(hnd,ofs,whence)
-# else
-# define _lseeki64(hnd,ofs,whence) _lseek64(hnd,ofs,whence)
-# endif
-#endif
-
-#ifndef HAVE_FTRUNCATE
-#define HAVE_FTRUNCATE 1
-#endif
-
-/*
- * Truncate a file handle at a 64-bit position 'where'.
- */
-
-static int ftruncate64(int fd, curl_off_t where)
-{
- if(_lseeki64(fd, where, SEEK_SET) < 0)
- return -1;
-
- if(!SetEndOfFile((HANDLE)_get_osfhandle(fd)))
- return -1;
-
- return 0;
-}
-#define ftruncate(fd,where) ftruncate64(fd,where)
-
-#endif /* WIN32 */
-
-typedef enum {
- TRACE_NONE, /* no trace/verbose output at all! */
- TRACE_BIN, /* tcpdump inspired look */
- TRACE_ASCII, /* like *BIN but without the hex output */
- TRACE_PLAIN /* -v/--verbose type */
-} trace;
-
-struct OutStruct {
- char *filename;
- FILE *stream;
- struct Configurable *config;
- curl_off_t bytes; /* amount written so far */
- curl_off_t init; /* original size (non-zero when appending) */
-};
-
-struct Configurable {
- CURL *easy; /* once we have one, we keep it here */
- bool remote_time;
- char *random_file;
- char *egd_file;
- char *useragent;
- char *cookie; /* single line with specified cookies */
- char *cookiejar; /* write to this file */
- char *cookiefile; /* read from this file */
- bool cookiesession; /* new session? */
- bool encoding; /* Accept-Encoding please */
- long authtype; /* auth bitmask */
- bool use_resume;
- bool resume_from_current;
- bool disable_epsv;
- bool disable_eprt;
- bool ftp_pret;
- long proto;
- bool proto_present;
- long proto_redir;
- bool proto_redir_present;
- curl_off_t resume_from;
- char *postfields;
- curl_off_t postfieldsize;
- char *referer;
- long timeout;
- long connecttimeout;
- long maxredirs;
- curl_off_t max_filesize;
- char *headerfile;
- char *ftpport;
- char *iface;
- int localport;
- int localportrange;
- unsigned short porttouse;
- char *range;
- long low_speed_limit;
- long low_speed_time;
- bool showerror;
- char *userpwd;
- char *proxyuserpwd;
- char *proxy;
- int proxyver; /* set to CURLPROXY_HTTP* define */
- char *noproxy;
- char *mail_from;
- struct curl_slist *mail_rcpt;
- bool proxytunnel;
- bool ftp_append; /* APPE on ftp */
- bool mute; /* shutup */
- bool use_ascii; /* select ascii or text transfer */
- bool autoreferer; /* automatically set referer */
- bool failonerror; /* fail on (HTTP) errors */
- bool include_headers; /* send headers to data output */
- bool no_body; /* don't get the body */
- bool dirlistonly; /* only get the FTP dir list */
- bool followlocation; /* follow http redirects */
- bool unrestricted_auth; /* Continue to send authentication (user+password)
- when following ocations, even when hostname
- changed */
- bool netrc_opt;
- bool netrc;
- bool noprogress;
- bool isatty; /* updated internally only if the output is a tty */
- struct getout *url_list; /* point to the first node */
- struct getout *url_last; /* point to the last/current node */
- struct getout *url_get; /* point to the node to fill in URL */
- struct getout *url_out; /* point to the node to fill in outfile */
- char *cipher_list;
- char *cert;
- char *cert_type;
- char *cacert;
- char *capath;
- char *crlfile;
- char *key;
- char *key_type;
- char *key_passwd;
- char *pubkey;
- char *hostpubmd5;
- char *engine;
- bool list_engines;
- bool crlf;
- char *customrequest;
- char *krblevel;
- char *trace_dump; /* file to dump the network trace to, or NULL */
- FILE *trace_stream;
- bool trace_fopened;
- trace tracetype;
- bool tracetime; /* include timestamp? */
- long httpversion;
- int progressmode;
- bool nobuffer;
- bool readbusy; /* set when reading input returns EAGAIN */
- bool globoff;
- bool use_httpget;
- bool insecure_ok; /* set TRUE to allow insecure SSL connects */
- bool create_dirs;
- bool ftp_create_dirs;
- bool ftp_skip_ip;
- bool proxynegotiate;
- bool proxyntlm;
- bool proxydigest;
- bool proxybasic;
- bool proxyanyauth;
- char *writeout; /* %-styled format string to output */
- bool writeenv; /* write results to environment, if available */
- FILE *errors; /* if stderr redirect is requested */
- bool errors_fopened;
- struct curl_slist *quote;
- struct curl_slist *postquote;
- struct curl_slist *prequote;
- long ssl_version;
- long ip_version;
- curl_TimeCond timecond;
- time_t condtime;
- struct curl_slist *headers;
- struct curl_httppost *httppost;
- struct curl_httppost *last_post;
- struct curl_slist *telnet_options;
- HttpReq httpreq;
-
- /* for bandwidth limiting features: */
- curl_off_t sendpersecond; /* send to peer */
- curl_off_t recvpersecond; /* receive from peer */
-
- bool ftp_ssl;
- bool ftp_ssl_reqd;
- bool ftp_ssl_control;
- bool ftp_ssl_ccc;
- int ftp_ssl_ccc_mode;
-
- char *socksproxy; /* set to server string */
- int socksver; /* set to CURLPROXY_SOCKS* define */
- char *socks5_gssapi_service; /* set service name for gssapi principal
- * default rcmd */
- int socks5_gssapi_nec ; /* The NEC reference server does not protect
- * the encryption type exchange */
-
- bool tcp_nodelay;
- long req_retry; /* number of retries */
- long retry_delay; /* delay between retries (in seconds) */
- long retry_maxtime; /* maximum time to keep retrying */
-
- char *ftp_account; /* for ACCT */
- char *ftp_alternative_to_user; /* send command if USER/PASS fails */
- int ftp_filemethod;
- long tftp_blksize; /* TFTP BLKSIZE option */
- bool ignorecl; /* --ignore-content-length */
- bool disable_sessionid;
-
- char *libcurl; /* output libcurl code to this file name */
- bool raw;
- bool post301;
- bool post302;
- bool nokeepalive; /* for keepalive needs */
- long alivetime;
- bool content_disposition; /* use Content-disposition filename */
-
- int default_node_flags; /* default flags to seach for each 'node', which is
- basically each given URL to transfer */
- struct OutStruct *outs;
-};
-
-#define WARN_PREFIX "Warning: "
-#define WARN_TEXTWIDTH (79 - (int)strlen(WARN_PREFIX))
-/* produce this text message to the user unless mute was selected */
-static void warnf(struct Configurable *config, const char *fmt, ...)
-{
- if(!config->mute) {
- va_list ap;
- int len;
- char *ptr;
- char print_buffer[256];
-
- va_start(ap, fmt);
- len = vsnprintf(print_buffer, sizeof(print_buffer), fmt, ap);
- va_end(ap);
-
- ptr = print_buffer;
- while(len > 0) {
- fputs(WARN_PREFIX, config->errors);
-
- if(len > (int)WARN_TEXTWIDTH) {
- int cut = WARN_TEXTWIDTH-1;
-
- while(!ISSPACE(ptr[cut]) && cut) {
- cut--;
- }
- if(0 == cut)
- /* not a single cutting position was found, just cut it at the
- max text width then! */
- cut = WARN_TEXTWIDTH-1;
-
- (void)fwrite(ptr, cut + 1, 1, config->errors);
- fputs("\n", config->errors);
- ptr += cut+1; /* skip the space too */
- len -= cut;
- }
- else {
- fputs(ptr, config->errors);
- len = 0;
- }
- }
- }
-}
-
-/*
- * This is the main global constructor for the app. Call this before
- * _any_ libcurl usage. If this fails, *NO* libcurl functions may be
- * used, or havoc may be the result.
- */
-static CURLcode main_init(void)
-{
-#ifdef DJGPP
- /* stop stat() wasting time */
- _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
-#endif
-
- return curl_global_init(CURL_GLOBAL_DEFAULT);
-}
-
-/*
- * This is the main global destructor for the app. Call this after
- * _all_ libcurl usage is done.
- */
-static void main_free(void)
-{
- curl_global_cleanup();
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
- /* close iconv conversion descriptor */
- if(inbound_cd != (iconv_t)-1)
- iconv_close(inbound_cd);
- if(outbound_cd != (iconv_t)-1)
- iconv_close(outbound_cd);
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
-}
-
-static int SetHTTPrequest(struct Configurable *config,
- HttpReq req, HttpReq *store)
-{
- if((*store == HTTPREQ_UNSPEC) ||
- (*store == req)) {
- *store = req;
- return 0;
- }
- warnf(config, "You can only select one HTTP request!\n");
- return 1;
-}
-
-static void helpf(FILE *errors, const char *fmt, ...)
-{
- va_list ap;
- if(fmt) {
- va_start(ap, fmt);
- fputs("curl: ", errors); /* prefix it */
- vfprintf(errors, fmt, ap);
- va_end(ap);
- }
- fprintf(errors, "curl: try 'curl --help' "
-#ifdef USE_MANUAL
- "or 'curl --manual' "
-#endif
- "for more information\n");
-}
-
-/*
- * A chain of these nodes contain URL to get and where to put the URL's
- * contents.
- */
-struct getout {
- struct getout *next; /* next one */
- char *url; /* the URL we deal with */
- char *outfile; /* where to store the output */
- char *infile; /* file to upload, if GETOUT_UPLOAD is set */
- int flags; /* options */
-};
-#define GETOUT_OUTFILE (1<<0) /* set when outfile is deemed done */
-#define GETOUT_URL (1<<1) /* set when URL is deemed done */
-#define GETOUT_USEREMOTE (1<<2) /* use remote file name locally */
-#define GETOUT_UPLOAD (1<<3) /* if set, -T has been used */
-#define GETOUT_NOUPLOAD (1<<4) /* if set, -T "" has been used */
-
-static void help(void)
-{
- int i;
- /* A few of these source lines are >80 columns wide, but that's only because
- breaking the strings narrower makes this chunk look even worse!
-
- Starting with 7.18.0, this list of command line options is sorted based
- on the long option name. It is not done automatically, although a command
- line like the following can help out:
-
- curl --help | cut -c5- | grep "^-" | sort
- */
- static const char * const helptext[]={
- "Usage: curl [options...] <url>",
- "Options: (H) means HTTP/HTTPS only, (F) means FTP only",
- " --anyauth Pick \"any\" authentication method (H)",
- " -a/--append Append to target file when uploading (F/SFTP)",
- " --basic Use HTTP Basic Authentication (H)",
- " --cacert <file> CA certificate to verify peer against (SSL)",
- " --capath <directory> CA directory to verify peer against (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> Specify which config file to read",
- " --connect-timeout <seconds> Maximum time allowed for connection",
- " -C/--continue-at <offset> Resumed transfer offset",
- " -b/--cookie <name=string/file> Cookie 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",
- " -d/--data <data> HTTP POST data (H)",
- " --data-ascii <data> HTTP POST ASCII data (H)",
- " --data-binary <data> HTTP POST binary data (H)",
- " --data-urlencode <name=data/name@filename> HTTP POST data url encoded (H)",
- " --digest Use HTTP Digest Authentication (H)",
- " --disable-eprt Inhibit using EPRT or LPRT (F)",
- " --disable-epsv Inhibit using EPSV (F)",
- " -D/--dump-header <file> Write the headers to this file",
- " --egd-file <file> EGD socket path for random data (SSL)",
- " --engine <eng> Crypto engine to use (SSL). \"--engine list\" for list",
-#ifdef USE_ENVIRONMENT
- " --environment Write results to environment variables (RISC OS)",
-#endif
- " -f/--fail Fail silently (no output at all) on HTTP errors (H)",
- " -F/--form <name=content> Specify HTTP multipart POST data (H)",
- " --form-string <name=string> Specify HTTP multipart POST data (H)",
- " --ftp-account <data> Account data to send when requested by server (F)",
- " --ftp-alternative-to-user <cmd> String to replace \"USER [name]\" (F)",
- " --ftp-create-dirs Create the remote dirs if not present (F)",
- " --ftp-method [multicwd/nocwd/singlecwd] Control CWD usage (F)",
- " --ftp-pasv Use PASV/EPSV instead of PORT (F)",
- " -P/--ftp-port <address> Use PORT with address instead of PASV (F)",
- " --ftp-skip-pasv-ip Skip the IP address for PASV (F)\n"
- " --ftp-pret Send PRET before PASV (for drftpd) (F)",
- " --ftp-ssl-ccc Send CCC after authenticating (F)",
- " --ftp-ssl-ccc-mode [active/passive] Set CCC mode (F)",
- " --ftp-ssl-control Require SSL/TLS for ftp login, clear for transfer (F)",
- " -G/--get Send the -d data with a HTTP GET (H)",
- " -g/--globoff Disable URL sequences and ranges using {} and []",
- " -H/--header <line> 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)",
- " -0/--http1.0 Use HTTP 1.0 (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> 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> 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 specified security level (F)",
- " --libcurl <file> Dump libcurl equivalent code of this command line",
- " --limit-rate <rate> Limit transfer speed to this rate",
- " -J/--remote-header-name Use the header-provided filename (H)",
- " -l/--list-only List only names of an FTP directory (F)",
- " --local-port <num>[-num] Force use of these local port numbers",
- " -L/--location Follow Location: hints (H)",
- " --location-trusted Follow Location: and send auth to other hosts (H)",
- " -M/--manual Display the full manual",
- " --mail-from <from> Mail from this address",
- " --mail-rcpt <to> Mail to this receiver(s)",
- " --max-filesize <bytes> Maximum file size to download (H/F)",
- " --max-redirs <num> Maximum number of redirects allowed (H)",
- " -m/--max-time <seconds> Maximum time allowed for the transfer",
- " --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",
- " -N/--no-buffer Disable buffering of the output stream",
- " --no-keepalive Disable keepalive use on the connection",
- " --no-sessionid Disable SSL session-ID reusing (SSL)",
- " --noproxy Comma-separated list of hosts which do not use proxy",
- " --ntlm Use HTTP NTLM authentication (H)",
- " -o/--output <file> Write output to <file> instead of stdout",
- " --pass <pass> Pass phrase for the private key (SSL/SSH)",
- " --post301 Do not switch to GET after following a 301 redirect (H)",
- " --post302 Do not switch to GET after following a 302 redirect (H)",
- " -#/--progress-bar Display transfer progress as a progress bar",
- " --proto <protocols> Enable/disable specified protocols",
- " --proto-redir <protocols> Enable/disable specified protocols on redirect",
- " -x/--proxy <host[:port]> Use HTTP 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 Negotiate authentication on the proxy (H)",
- " --proxy-ntlm Use NTLM authentication on the proxy (H)",
- " -U/--proxy-user <user[:password]> Set proxy user and password",
- " --proxy1.0 <host[:port]> Use HTTP/1.0 proxy on given port",
- " -p/--proxytunnel Operate through a HTTP proxy tunnel (using CONNECT)",
- " --pubkey <key> Public key file name (SSH)",
- " -Q/--quote <cmd> Send command(s) to server before file transfer (F/SFTP)",
- " --random-file <file> File for reading random data from (SSL)",
- " -r/--range <range> Retrieve only the bytes within a range",
- " --raw Pass HTTP \"raw\", without any transfer decoding (H)",
- " -e/--referer Referer URL (H)",
- " -O/--remote-name Write output to a file named as the remote file",
- " --remote-name-all Use the remote file name for all URLs",
- " -R/--remote-time Set the remote file's time on the local output",
- " -X/--request <command> Specify request command to use",
- " --retry <num> Retry request <num> times if transient problems occur",
- " --retry-delay <seconds> When retrying, wait this many seconds between each",
- " --retry-max-time <seconds> Retry only within this period",
- " -S/--show-error Show error. With -s, make curl show errors when they occur",
- " -s/--silent Silent mode. Don't output anything",
- " --socks4 <host[:port]> SOCKS4 proxy on given host + port",
- " --socks4a <host[:port]> SOCKS4a proxy on given host + port",
- " --socks5 <host[:port]> SOCKS5 proxy on given host + port",
- " --socks5-hostname <host[:port]> SOCKS5 proxy, pass host name to proxy",
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
- " --socks5-gssapi-service <name> SOCKS5 proxy service name for gssapi",
- " --socks5-gssapi-nec Compatibility with NEC SOCKS5 server",
-#endif
- " -Y/--speed-limit Stop transfer if below speed-limit for 'speed-time' secs",
- " -y/--speed-time Time needed to 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)",
- " --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)",
- " -z/--time-cond <time> Transfer based on a time condition",
- " -1/--tlsv1 Use TLSv1 (SSL)",
- " --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",
- " -T/--upload-file <file> Transfer <file> to remote site",
- " --url <URL> Set URL to work with",
- " -B/--use-ascii Use ASCII/text transfer",
- " -u/--user <user[:password]> Set server user and password",
- " -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> What to output after completion",
- " -q If used as the first parameter disables .curlrc",
- NULL
- };
- for(i=0; helptext[i]; i++) {
- puts(helptext[i]);
-#ifdef PRINT_LINES_PAUSE
- if(i && ((i % PRINT_LINES_PAUSE) == 0))
- pressanykey();
-#endif
- }
-}
-
-struct LongShort {
- const char *letter;
- const char *lname;
- bool extraparam;
-};
-
-/* global variable to hold info about libcurl */
-static curl_version_info_data *curlinfo;
-
-static int parseconfig(const char *filename,
- struct Configurable *config);
-static char *my_get_line(FILE *fp);
-static int create_dir_hierarchy(const char *outfile, FILE *errors);
-
-static void GetStr(char **string,
- const char *value)
-{
- if(*string)
- free(*string);
- if(value)
- *string = strdup(value);
- else
- *string = NULL;
-}
-
-static void clean_getout(struct Configurable *config)
-{
- struct getout *node=config->url_list;
- struct getout *next;
-
- while(node) {
- next = node->next;
- if(node->url)
- free(node->url);
- if(node->outfile)
- free(node->outfile);
- if(node->infile)
- free(node->infile);
- free(node);
-
- node = next; /* GOTO next */
- }
-}
-
-static struct getout *new_getout(struct Configurable *config)
-{
- struct getout *node =malloc(sizeof(struct getout));
- struct getout *last= config->url_last;
- if(node) {
- /* clear the struct */
- memset(node, 0, sizeof(struct getout));
-
- /* append this new node last in the list */
- if(last)
- last->next = node;
- else
- config->url_list = node; /* first node */
-
- /* move the last pointer */
- config->url_last = node;
-
- node->flags = config->default_node_flags;
- }
- return node;
-}
-
-/* Structure for storing the information needed to build a multiple files
- * section
- */
-struct multi_files {
- struct curl_forms form;
- struct multi_files *next;
-};
-
-/* Add a new list entry possibly with a type_name
- */
-static struct multi_files *
-AddMultiFiles(const char *file_name,
- const char *type_name,
- const char *show_filename,
- struct multi_files **multi_start,
- struct multi_files **multi_current)
-{
- struct multi_files *multi;
- struct multi_files *multi_type = NULL;
- struct multi_files *multi_name = NULL;
- multi = malloc(sizeof(struct multi_files));
- if(multi) {
- memset(multi, 0, sizeof(struct multi_files));
- multi->form.option = CURLFORM_FILE;
- multi->form.value = file_name;
- }
- else
- return NULL;
-
- if(!*multi_start)
- *multi_start = multi;
-
- if(type_name) {
- multi_type = malloc(sizeof(struct multi_files));
- if(multi_type) {
- memset(multi_type, 0, sizeof(struct multi_files));
- multi_type->form.option = CURLFORM_CONTENTTYPE;
- multi_type->form.value = type_name;
- multi->next = multi_type;
-
- multi = multi_type;
- }
- else {
- free(multi);
- return NULL;
- }
- }
- if(show_filename) {
- multi_name = malloc(sizeof(struct multi_files));
- if(multi_name) {
- memset(multi_name, 0, sizeof(struct multi_files));
- multi_name->form.option = CURLFORM_FILENAME;
- multi_name->form.value = show_filename;
- multi->next = multi_name;
-
- multi = multi_name;
- }
- else {
- free(multi);
- return NULL;
- }
- }
-
- if(*multi_current)
- (*multi_current)->next = multi;
-
- *multi_current = multi;
-
- return *multi_current;
-}
-
-/* Free the items of the list.
- */
-static void FreeMultiInfo(struct multi_files *multi_start)
-{
- struct multi_files *multi;
- while(multi_start) {
- multi = multi_start;
- multi_start = multi_start->next;
- free(multi);
- }
-}
-
-/* Print list of OpenSSL engines supported.
- */
-static void list_engines(const struct curl_slist *engines)
-{
- puts("Build-time engines:");
- if(!engines) {
- puts(" <none>");
- return;
- }
- for( ; engines; engines = engines->next)
- printf(" %s\n", engines->data);
-}
-
-/***************************************************************************
- *
- * formparse()
- *
- * Reads a 'name=value' parameter and builds the appropriate linked list.
- *
- * Specify files to upload with 'name=@filename'. Supports specified
- * given Content-Type of the files. Such as ';type=<content-type>'.
- *
- * If literal_value is set, any initial '@' or '<' in the value string
- * loses its special meaning, as does any embedded ';type='.
- *
- * You may specify more than one file for a single name (field). Specify
- * multiple files by writing it like:
- *
- * 'name=@filename,filename2,filename3'
- *
- * If you want content-types specified for each too, write them like:
- *
- * 'name=@filename;type=image/gif,filename2,filename3'
- *
- * If you want custom headers added for a single part, write them in a separate
- * file and do like this:
- *
- * 'name=foo;headers=@headerfile' or why not
- * 'name=@filemame;headers=@headerfile'
- *
- * To upload a file, but to fake the file name that will be included in the
- * formpost, do like this:
- *
- * 'name=@filename;filename=/dev/null'
- *
- * This function uses curl_formadd to fulfill it's job. Is heavily based on
- * the old curl_formparse code.
- *
- ***************************************************************************/
-
-#define FORM_FILE_SEPARATOR ','
-#define FORM_TYPE_SEPARATOR ';'
-
-static int formparse(struct Configurable *config,
- const char *input,
- struct curl_httppost **httppost,
- struct curl_httppost **last_post,
- bool literal_value)
-{
- /* nextarg MUST be a string in the format 'name=contents' and we'll
- build a linked list with the info */
- char name[256];
- char *contents;
- char major[128];
- char minor[128];
- char *contp;
- const char *type = NULL;
- char *sep;
- char *sep2;
-
- if((1 == sscanf(input, "%255[^=]=", name)) &&
- (contp = strchr(input, '='))) {
- /* the input was using the correct format */
-
- /* Allocate the contents */
- contents = strdup(contp+1);
- if(!contents) {
- fprintf(config->errors, "out of memory\n");
- return 1;
- }
- contp = contents;
-
- if('@' == contp[0] && !literal_value) {
- struct multi_files *multi_start = NULL, *multi_current = NULL;
- /* we use the @-letter to indicate file name(s) */
- contp++;
-
- multi_start = multi_current=NULL;
-
- do {
- /* since this was a file, it may have a content-type specifier
- at the end too, or a filename. Or both. */
- char *ptr;
- char *filename=NULL;
-
- sep=strchr(contp, FORM_TYPE_SEPARATOR);
- sep2=strchr(contp, FORM_FILE_SEPARATOR);
-
- /* pick the closest */
- if(sep2 && (sep2 < sep)) {
- sep = sep2;
-
- /* no type was specified! */
- }
-
- type = NULL;
-
- if(sep) {
-
- /* if we got here on a comma, don't do much */
- if(FORM_FILE_SEPARATOR == *sep)
- ptr = NULL;
- else
- ptr = sep+1;
-
- *sep=0; /* terminate file name at separator */
-
- while(ptr && (FORM_FILE_SEPARATOR!= *ptr)) {
-
- /* pass all white spaces */
- while(ISSPACE(*ptr))
- ptr++;
-
- if(checkprefix("type=", ptr)) {
- /* set type pointer */
- type = &ptr[5];
-
- /* verify that this is a fine type specifier */
- if(2 != sscanf(type, "%127[^/]/%127[^;,\n]",
- major, minor)) {
- warnf(config, "Illegally formatted content-type field!\n");
- free(contents);
- FreeMultiInfo(multi_start);
- return 2; /* illegal content-type syntax! */
- }
-
- /* now point beyond the content-type specifier */
- sep = (char *)type + strlen(major)+strlen(minor)+1;
-
- /* there's a semicolon following - we check if it is a filename
- specified and if not we simply assume that it is text that
- the user wants included in the type and include that too up
- to the next zero or semicolon. */
- if((*sep==';') && !checkprefix(";filename=", sep)) {
- sep2 = strchr(sep+1, ';');
- if(sep2)
- sep = sep2;
- else
- sep = sep+strlen(sep); /* point to end of string */
- }
-
- if(*sep) {
- *sep=0; /* zero terminate type string */
-
- ptr=sep+1;
- }
- else
- ptr = NULL; /* end */
- }
- else if(checkprefix("filename=", ptr)) {
- filename = &ptr[9];
- ptr=strchr(filename, FORM_TYPE_SEPARATOR);
- if(!ptr) {
- ptr=strchr(filename, FORM_FILE_SEPARATOR);
- }
- if(ptr) {
- *ptr=0; /* zero terminate */
- ptr++;
- }
- }
- else
- /* confusion, bail out of loop */
- break;
- }
- /* find the following comma */
- if(ptr)
- sep=strchr(ptr, FORM_FILE_SEPARATOR);
- else
- sep=NULL;
- }
- else {
- sep=strchr(contp, FORM_FILE_SEPARATOR);
- }
- if(sep) {
- /* the next file name starts here */
- *sep =0;
- sep++;
- }
- /* if type == NULL curl_formadd takes care of the problem */
-
- if(!AddMultiFiles(contp, type, filename, &multi_start,
- &multi_current)) {
- warnf(config, "Error building form post!\n");
- free(contents);
- FreeMultiInfo(multi_start);
- return 3;
- }
- contp = sep; /* move the contents pointer to after the separator */
-
- } while(sep && *sep); /* loop if there's another file name */
-
- /* now we add the multiple files section */
- if(multi_start) {
- struct curl_forms *forms = NULL;
- struct multi_files *ptr = multi_start;
- unsigned int i, count = 0;
- while(ptr) {
- ptr = ptr->next;
- ++count;
- }
- forms = malloc((count+1)*sizeof(struct curl_forms));
- if(!forms)
- {
- fprintf(config->errors, "Error building form post!\n");
- free(contents);
- FreeMultiInfo(multi_start);
- return 4;
- }
- for(i = 0, ptr = multi_start; i < count; ++i, ptr = ptr->next)
- {
- forms[i].option = ptr->form.option;
- forms[i].value = ptr->form.value;
- }
- forms[count].option = CURLFORM_END;
- FreeMultiInfo(multi_start);
- if(curl_formadd(httppost, last_post,
- CURLFORM_COPYNAME, name,
- CURLFORM_ARRAY, forms, CURLFORM_END) != 0) {
- warnf(config, "curl_formadd failed!\n");
- free(forms);
- free(contents);
- return 5;
- }
- free(forms);
- }
- }
- else {
- struct curl_forms info[4];
- int i = 0;
- char *ct = literal_value? NULL: strstr(contp, ";type=");
-
- info[i].option = CURLFORM_COPYNAME;
- info[i].value = name;
- i++;
-
- if(ct) {
- info[i].option = CURLFORM_CONTENTTYPE;
- info[i].value = &ct[6];
- i++;
- ct[0]=0; /* zero terminate here */
- }
-
- if( contp[0]=='<' && !literal_value) {
- info[i].option = CURLFORM_FILECONTENT;
- info[i].value = contp+1;
- i++;
- info[i].option = CURLFORM_END;
-
- if(curl_formadd(httppost, last_post,
- CURLFORM_ARRAY, info, CURLFORM_END ) != 0) {
- warnf(config, "curl_formadd failed, possibly the file %s is bad!\n",
- contp+1);
- free(contents);
- return 6;
- }
- }
- else {
-#ifdef CURL_DOES_CONVERSIONS
- convert_to_network(contp, strlen(contp));
-#endif
- info[i].option = CURLFORM_COPYCONTENTS;
- info[i].value = contp;
- i++;
- info[i].option = CURLFORM_END;
- if(curl_formadd(httppost, last_post,
- CURLFORM_ARRAY, info, CURLFORM_END) != 0) {
- warnf(config, "curl_formadd failed!\n");
- free(contents);
- return 7;
- }
- }
- }
-
- }
- else {
- warnf(config, "Illegally formatted input field!\n");
- return 1;
- }
- free(contents);
- return 0;
-}
-
-
-typedef enum {
- PARAM_OK,
- PARAM_OPTION_AMBIGUOUS,
- PARAM_OPTION_UNKNOWN,
- PARAM_REQUIRES_PARAMETER,
- PARAM_BAD_USE,
- PARAM_HELP_REQUESTED,
- PARAM_GOT_EXTRA_PARAMETER,
- PARAM_BAD_NUMERIC,
- PARAM_LIBCURL_DOESNT_SUPPORT,
- PARAM_NO_MEM,
- PARAM_LAST
-} ParameterError;
-
-static const char *param2text(int res)
-{
- ParameterError error = (ParameterError)res;
- switch(error) {
- case PARAM_GOT_EXTRA_PARAMETER:
- return "had unsupported trailing garbage";
- case PARAM_OPTION_UNKNOWN:
- return "is unknown";
- case PARAM_OPTION_AMBIGUOUS:
- return "is ambiguous";
- case PARAM_REQUIRES_PARAMETER:
- return "requires parameter";
- case PARAM_BAD_USE:
- return "is badly used here";
- case PARAM_BAD_NUMERIC:
- return "expected a proper numerical parameter";
- case PARAM_LIBCURL_DOESNT_SUPPORT:
- return "the installed libcurl version doesn't support this";
- case PARAM_NO_MEM:
- return "out of memory";
- default:
- return "unknown error";
- }
-}
-
-static ParameterError file2string(char **bufp, FILE *file)
-{
- char buffer[256];
- char *ptr;
- char *string = NULL;
- size_t stringlen = 0;
- size_t buflen;
-
- if(file) {
- while(fgets(buffer, sizeof(buffer), file)) {
- if((ptr = strchr(buffer, '\r')) != NULL)
- *ptr = '\0';
- if((ptr = strchr(buffer, '\n')) != NULL)
- *ptr = '\0';
- buflen = strlen(buffer);
- if((ptr = realloc(string, stringlen+buflen+1)) == NULL) {
- if(string)
- free(string);
- return PARAM_NO_MEM;
- }
- string = ptr;
- strcpy(string+stringlen, buffer);
- stringlen += buflen;
- }
- }
- *bufp = string;
- return PARAM_OK;
-}
-
-static ParameterError file2memory(char **bufp, size_t *size, FILE *file)
-{
- char *newbuf;
- char *buffer = NULL;
- size_t alloc = 512;
- size_t nused = 0;
- size_t nread;
-
- if(file) {
- do {
- if(!buffer || (alloc == nused)) {
- /* size_t overflow detection for huge files */
- if(alloc+1 > ((size_t)-1)/2) {
- if(buffer)
- free(buffer);
- return PARAM_NO_MEM;
- }
- alloc *= 2;
- /* allocate an extra char, reserved space, for null termination */
- if((newbuf = realloc(buffer, alloc+1)) == NULL) {
- if(buffer)
- free(buffer);
- return PARAM_NO_MEM;
- }
- buffer = newbuf;
- }
- nread = fread(buffer+nused, 1, alloc-nused, file);
- nused += nread;
- } while(nread);
- /* null terminate the buffer in case it's used as a string later */
- buffer[nused] = '\0';
- /* free trailing slack space, if possible */
- if(alloc != nused) {
- if((newbuf = realloc(buffer, nused+1)) != NULL)
- buffer = newbuf;
- }
- /* discard buffer if nothing was read */
- if(!nused) {
- free(buffer);
- buffer = NULL; /* no string */
- }
- }
- *size = nused;
- *bufp = buffer;
- return PARAM_OK;
-}
-
-static void cleanarg(char *str)
-{
-#ifdef HAVE_WRITABLE_ARGV
- /* now that GetStr has copied the contents of nextarg, wipe the next
- * argument out so that the username:password isn't displayed in the
- * system process list */
- if(str) {
- size_t len = strlen(str);
- memset(str, ' ', len);
- }
-#else
- (void)str;
-#endif
-}
-
-/*
- * Parse the string and write the integer in the given address. Return
- * non-zero on failure, zero on success.
- *
- * The string must start with a digit to be valid.
- *
- * Since this function gets called with the 'nextarg' pointer from within the
- * getparameter a lot, we must check it for NULL before accessing the str
- * data.
- */
-
-static int str2num(long *val, const char *str)
-{
- int retcode = 0;
- if(str && ISDIGIT(*str))
- *val = atoi(str);
- else
- retcode = 1; /* badness */
- return retcode;
-}
-
-/*
- * Parse the string and modify the long in the given address. Return
- * non-zero on failure, zero on success.
- *
- * The string is a list of protocols
- *
- * Since this function gets called with the 'nextarg' pointer from within the
- * getparameter a lot, we must check it for NULL before accessing the str
- * data.
- */
-
-static long proto2num(struct Configurable *config, long *val, const char *str)
-{
- char *buffer;
- const char *sep = ",";
- char *token;
-
- static struct sprotos {
- const char *name;
- long bit;
- } const protos[] = {
- { "all", CURLPROTO_ALL },
- { "http", CURLPROTO_HTTP },
- { "https", CURLPROTO_HTTPS },
- { "ftp", CURLPROTO_FTP },
- { "ftps", CURLPROTO_FTPS },
- { "scp", CURLPROTO_SCP },
- { "sftp", CURLPROTO_SFTP },
- { "telnet", CURLPROTO_TELNET },
- { "ldap", CURLPROTO_LDAP },
- { "ldaps", CURLPROTO_LDAPS },
- { "dict", CURLPROTO_DICT },
- { "file", CURLPROTO_FILE },
- { "tftp", CURLPROTO_TFTP },
- { "imap", CURLPROTO_IMAP },
- { "imaps", CURLPROTO_IMAPS },
- { "pop3", CURLPROTO_POP3 },
- { "pop3s", CURLPROTO_POP3S },
- { "smtp", CURLPROTO_SMTP },
- { "smtps", CURLPROTO_SMTPS },
- { "rtsp", CURLPROTO_RTSP },
- { "gopher", CURLPROTO_GOPHER },
- { NULL, 0 }
- };
-
- if(!str)
- return 1;
-
- buffer = strdup(str); /* because strtok corrupts it */
-
- for(token = strtok(buffer, sep);
- token;
- token = strtok(NULL, sep)) {
- enum e_action { allow, deny, set } action = allow;
-
- struct sprotos const *pp;
-
- /* Process token modifiers */
- while(!ISALNUM(*token)) { /* may be NULL if token is all modifiers */
- switch (*token++) {
- case '=':
- action = set;
- break;
- case '-':
- action = deny;
- break;
- case '+':
- action = allow;
- break;
- default: /* Includes case of terminating NULL */
- free(buffer);
- return 1;
- }
- }
-
- for(pp=protos; pp->name; pp++) {
- if(curlx_raw_equal(token, pp->name)) {
- switch (action) {
- case deny:
- *val &= ~(pp->bit);
- break;
- case allow:
- *val |= pp->bit;
- break;
- case set:
- *val = pp->bit;
- break;
- }
- break;
- }
- }
-
- if(!(pp->name)) { /* unknown protocol */
- /* If they have specified only this protocol, we say treat it as
- if no protocols are allowed */
- if(action == set)
- *val = 0;
- warnf(config, "unrecognized protocol '%s'\n", token);
- }
- }
- free(buffer);
- return 0;
-}
-
-/**
- * Parses the given string looking for an offset (which may be
- * a larger-than-integer value).
- *
- * @param val the offset to populate
- * @param str the buffer containing the offset
- * @return zero if successful, non-zero if failure.
- */
-static int str2offset(curl_off_t *val, const char *str)
-{
-#if(CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
- *val = curlx_strtoofft(str, NULL, 0);
- if((*val == CURL_OFF_T_MAX || *val == CURL_OFF_T_MIN) && (ERRNO == ERANGE))
- return 1;
-#else
- *val = strtol(str, NULL, 0);
- if((*val == LONG_MIN || *val == LONG_MAX) && ERRNO == ERANGE)
- return 1;
-#endif
- return 0;
-}
-
-static void checkpasswd(const char *kind, /* for what purpose */
- char **userpwd) /* pointer to allocated string */
-{
- char *ptr;
- if(!*userpwd)
- return;
-
- ptr = strchr(*userpwd, ':');
- if(!ptr) {
- /* no password present, prompt for one */
- char passwd[256]="";
- char prompt[256];
- size_t passwdlen;
- size_t userlen = strlen(*userpwd);
- char *passptr;
-
- /* build a nice-looking prompt */
- curlx_msnprintf(prompt, sizeof(prompt),
- "Enter %s password for user '%s':",
- kind, *userpwd);
-
- /* get password */
- getpass_r(prompt, passwd, sizeof(passwd));
- passwdlen = strlen(passwd);
-
- /* extend the allocated memory area to fit the password too */
- passptr = realloc(*userpwd,
- passwdlen + 1 + /* an extra for the colon */
- userlen + 1); /* an extra for the zero */
-
- if(passptr) {
- /* append the password separated with a colon */
- passptr[userlen]=':';
- memcpy(&passptr[userlen+1], passwd, passwdlen+1);
- *userpwd = passptr;
- }
- }
-}
-
-static ParameterError add2list(struct curl_slist **list,
- const char *ptr)
-{
- struct curl_slist *newlist = curl_slist_append(*list, ptr);
- if(newlist)
- *list = newlist;
- else
- return PARAM_NO_MEM;
-
- return PARAM_OK;
-}
-
-static int ftpfilemethod(struct Configurable *config, const char *str)
-{
- if(curlx_raw_equal("singlecwd", str))
- return CURLFTPMETHOD_SINGLECWD;
- if(curlx_raw_equal("nocwd", str))
- return CURLFTPMETHOD_NOCWD;
- if(curlx_raw_equal("multicwd", str))
- return CURLFTPMETHOD_MULTICWD;
- warnf(config, "unrecognized ftp file method '%s', using default\n", str);
- return CURLFTPMETHOD_MULTICWD;
-}
-
-static int ftpcccmethod(struct Configurable *config, const char *str)
-{
- if(curlx_raw_equal("passive", str))
- return CURLFTPSSL_CCC_PASSIVE;
- if(curlx_raw_equal("active", str))
- return CURLFTPSSL_CCC_ACTIVE;
- warnf(config, "unrecognized ftp CCC method '%s', using default\n", str);
- return CURLFTPSSL_CCC_PASSIVE;
-}
-
-
-static int sockoptcallback(void *clientp, curl_socket_t curlfd,
- curlsocktype purpose)
-{
- struct Configurable *config = (struct Configurable *)clientp;
- int onoff = 1; /* this callback is only used if we ask for keepalives on the
- connection */
-#if defined(TCP_KEEPIDLE) || defined(TCP_KEEPINTVL)
- int keepidle = (int)config->alivetime;
-#endif
-
- switch(purpose) {
- case CURLSOCKTYPE_IPCXN:
- if(setsockopt(curlfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&onoff,
- sizeof(onoff)) < 0) {
- /* don't abort operation, just issue a warning */
- SET_SOCKERRNO(0);
- warnf(clientp, "Could not set SO_KEEPALIVE!\n");
- return 0;
- }
- else {
- if(config->alivetime) {
-#ifdef TCP_KEEPIDLE
- if(setsockopt(curlfd, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&keepidle,
- sizeof(keepidle)) < 0) {
- /* don't abort operation, just issue a warning */
- SET_SOCKERRNO(0);
- warnf(clientp, "Could not set TCP_KEEPIDLE!\n");
- return 0;
- }
-#endif
-#ifdef TCP_KEEPINTVL
- if(setsockopt(curlfd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&keepidle,
- sizeof(keepidle)) < 0) {
- /* don't abort operation, just issue a warning */
- SET_SOCKERRNO(0);
- warnf(clientp, "Could not set TCP_KEEPINTVL!\n");
- return 0;
- }
-#endif
- }
- }
- break;
- default:
- break;
- }
-
- return 0;
-}
-
-
-static ParameterError getparameter(char *flag, /* f or -long-flag */
- char *nextarg, /* NULL if unset */
- bool *usedarg, /* set to TRUE if the arg
- has been used */
- struct Configurable *config)
-{
- char letter;
- char subletter=0; /* subletters can only occur on long options */
- int rc; /* generic return code variable */
- const char *parse=NULL;
- unsigned int j;
- time_t now;
- int hit=-1;
- bool longopt=FALSE;
- bool singleopt=FALSE; /* when true means '-o foo' used '-ofoo' */
- ParameterError err;
- bool toggle=TRUE; /* how to switch boolean options, on or off. Controlled
- by using --OPTION or --no-OPTION */
-
- /* single-letter,
- long-name,
- boolean whether it takes an additional argument
- */
- static const struct LongShort aliases[]= {
- /* all these ones, starting with "*" or "$" as a short-option have *no*
- short option to mention. */
- {"*", "url", TRUE},
- {"*a", "random-file", TRUE},
- {"*b", "egd-file", TRUE},
- {"*c", "connect-timeout", TRUE},
- {"*d", "ciphers", TRUE},
- {"*e", "disable-epsv", FALSE},
- {"*E", "epsv", FALSE}, /* made like this to make --no-epsv and --epsv to
- work although --disable-epsv is the documented
- option */
-#ifdef USE_ENVIRONMENT
- {"*f", "environment", FALSE},
-#endif
- {"*g", "trace", TRUE},
- {"*h", "trace-ascii", TRUE},
- {"*i", "limit-rate", TRUE},
- {"*j", "compressed", FALSE}, /* might take an arg someday */
- {"*k", "digest", FALSE},
- {"*l", "negotiate", FALSE},
- {"*m", "ntlm", FALSE},
- {"*n", "basic", FALSE},
- {"*o", "anyauth", FALSE},
-#ifdef USE_WATT32
- {"*p", "wdebug", FALSE},
-#endif
- {"*q", "ftp-create-dirs", FALSE},
- {"*r", "create-dirs", FALSE},
- {"*s", "max-redirs", TRUE},
- {"*t", "proxy-ntlm", FALSE},
- {"*u", "crlf", FALSE},
- {"*v", "stderr", TRUE},
- {"*w", "interface", TRUE},
- {"*x", "krb" , TRUE},
- {"*x", "krb4" , TRUE}, /* this is the previous name */
- {"*y", "max-filesize", TRUE},
- {"*z", "disable-eprt", FALSE},
- {"*Z", "eprt", FALSE}, /* made like this to make --no-eprt and --eprt to
- work although --disable-eprt is the documented
- option */
- {"$a", "ftp-ssl", FALSE}, /* deprecated name since 7.20.0 */
- {"$a", "ssl", FALSE}, /* new option name in 7.20.0, previously this
- was ftp-ssl */
- {"$b", "ftp-pasv", FALSE},
- {"$c", "socks5", TRUE},
- {"$c", "socks", TRUE}, /* this is how the option once was documented
- but we prefer the --socks5 version for
- explicit version */
- {"$d", "tcp-nodelay",FALSE},
- {"$e", "proxy-digest", FALSE},
- {"$f", "proxy-basic", FALSE},
- {"$g", "retry", TRUE},
- {"$h", "retry-delay", TRUE},
- {"$i", "retry-max-time", TRUE},
- {"$k", "proxy-negotiate", FALSE},
- {"$m", "ftp-account", TRUE},
- {"$n", "proxy-anyauth", FALSE},
- {"$o", "trace-time", FALSE},
- {"$p", "ignore-content-length", FALSE},
- {"$q", "ftp-skip-pasv-ip", FALSE},
- {"$r", "ftp-method", TRUE},
- {"$s", "local-port", TRUE},
- {"$t", "socks4", TRUE},
- {"$T", "socks4a", TRUE},
- {"$u", "ftp-alternative-to-user", TRUE},
- {"$v", "ftp-ssl-reqd", FALSE}, /* deprecated name since 7.20.0 */
- {"$v", "ssl-reqd", FALSE}, /* new option name in 7.20.0, previously this
- was ftp-ssl-reqd */
- {"$w", "sessionid", FALSE}, /* listed as --no-sessionid in the help */
- {"$x", "ftp-ssl-control", FALSE},
- {"$y", "ftp-ssl-ccc", FALSE},
- {"$j", "ftp-ssl-ccc-mode", TRUE},
- {"$z", "libcurl", TRUE},
- {"$#", "raw", FALSE},
- {"$0", "post301", FALSE},
- {"$1", "keepalive", FALSE}, /* listed as --no-keepalive in the help */
- {"$2", "socks5-hostname", TRUE},
- {"$3", "keepalive-time", TRUE},
- {"$4", "post302", FALSE},
- {"$5", "noproxy", TRUE},
-
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
- {"$6", "socks5-gssapi-service", TRUE},
- {"$7", "socks5-gssapi-nec", FALSE},
-#endif
- {"$8", "proxy1.0", TRUE},
- {"$9", "tftp-blksize", TRUE},
- {"$A", "mail-from", TRUE},
- {"$B", "mail-rcpt", TRUE},
- {"$C", "ftp-pret", FALSE},
- {"$D", "proto", TRUE},
- {"$E", "proto-redir", TRUE},
- {"0", "http1.0", FALSE},
- {"1", "tlsv1", FALSE},
- {"2", "sslv2", FALSE},
- {"3", "sslv3", FALSE},
- {"4", "ipv4", FALSE},
- {"6", "ipv6", FALSE},
- {"a", "append", FALSE},
- {"A", "user-agent", TRUE},
- {"b", "cookie", TRUE},
- {"B", "use-ascii", FALSE},
- {"c", "cookie-jar", TRUE},
- {"C", "continue-at", TRUE},
- {"d", "data", TRUE},
- {"da", "data-ascii", TRUE},
- {"db", "data-binary", TRUE},
- {"de", "data-urlencode", TRUE},
- {"D", "dump-header", TRUE},
- {"e", "referer", TRUE},
- {"E", "cert", TRUE},
- {"Ea", "cacert", TRUE},
- {"Eb","cert-type", TRUE},
- {"Ec","key", TRUE},
- {"Ed","key-type", TRUE},
- {"Ee","pass", TRUE},
- {"Ef","engine", TRUE},
- {"Eg","capath ", TRUE},
- {"Eh","pubkey", TRUE},
- {"Ei", "hostpubmd5", TRUE},
- {"Ej","crlfile", TRUE},
- {"f", "fail", FALSE},
- {"F", "form", TRUE},
- {"Fs","form-string", TRUE},
- {"g", "globoff", FALSE},
- {"G", "get", FALSE},
- {"h", "help", FALSE},
- {"H", "header", TRUE},
- {"i", "include", FALSE},
- {"I", "head", FALSE},
- {"j", "junk-session-cookies", FALSE},
- {"J", "remote-header-name", FALSE},
- {"k", "insecure", FALSE},
- {"K", "config", TRUE},
- {"l", "list-only", FALSE},
- {"L", "location", FALSE},
- {"Lt", "location-trusted", FALSE},
- {"m", "max-time", TRUE},
- {"M", "manual", FALSE},
- {"n", "netrc", FALSE},
- {"no", "netrc-optional", FALSE},
- {"N", "buffer", FALSE}, /* listed as --no-buffer in the help */
- {"o", "output", TRUE},
- {"O", "remote-name", FALSE},
- {"Oa", "remote-name-all", FALSE},
- {"p", "proxytunnel", FALSE},
- {"P", "ftpport", TRUE}, /* older version */
- {"P", "ftp-port", TRUE},
- {"q", "disable", FALSE},
- {"Q", "quote", TRUE},
- {"r", "range", TRUE},
- {"R", "remote-time", FALSE},
- {"s", "silent", FALSE},
- {"S", "show-error", FALSE},
- {"t", "telnet-options", TRUE}, /* this is documented as telnet-option */
- {"T", "upload-file", TRUE},
- {"u", "user", TRUE},
- {"U", "proxy-user", TRUE},
- {"v", "verbose", FALSE},
- {"V", "version", FALSE},
- {"w", "write-out", TRUE},
- {"x", "proxy", TRUE},
- {"X", "request", TRUE},
- {"X", "http-request", TRUE}, /* OBSOLETE VERSION */
- {"Y", "speed-limit", TRUE},
- {"y", "speed-time", TRUE},
- {"z", "time-cond", TRUE},
- {"#", "progress-bar",FALSE},
- };
-
- if(('-' != flag[0]) ||
- (('-' == flag[0]) && ('-' == flag[1]))) {
- /* this should be a long name */
- char *word=('-' == flag[0])?flag+2:flag;
- size_t fnam=strlen(word);
- int numhits=0;
-
- if(!strncmp(word, "no-", 3)) {
- /* disable this option but ignore the "no-" part when looking for it */
- word += 3;
- toggle = FALSE;
- }
-
- for(j=0; j< sizeof(aliases)/sizeof(aliases[0]); j++) {
- if(curlx_strnequal(aliases[j].lname, word, fnam)) {
- longopt = TRUE;
- numhits++;
- if(curlx_raw_equal(aliases[j].lname, word)) {
- parse = aliases[j].letter;
- hit = j;
- numhits = 1; /* a single unique hit */
- break;
- }
- parse = aliases[j].letter;
- hit = j;
- }
- }
- if(numhits>1) {
- /* this is at least the second match! */
- return PARAM_OPTION_AMBIGUOUS;
- }
- if(hit < 0) {
- return PARAM_OPTION_UNKNOWN;
- }
- }
- else {
- flag++; /* prefixed with one dash, pass it */
- hit=-1;
- parse = flag;
- }
-
- do {
- /* we can loop here if we have multiple single-letters */
-
- if(!longopt) {
- if(NULL != parse) {
- letter = (char)*parse;
- }
- else {
- letter = '\0';
- }
- subletter='\0';
- }
- else {
- letter = parse[0];
- subletter = parse[1];
- }
- *usedarg = FALSE; /* default is that we don't use the arg */
-
- if(hit < 0) {
- for(j=0; j< sizeof(aliases)/sizeof(aliases[0]); j++) {
- if(letter == aliases[j].letter[0]) {
- hit = j;
- break;
- }
- }
- if(hit < 0) {
- return PARAM_OPTION_UNKNOWN;
- }
- }
-
- if(aliases[hit].extraparam) {
- /* this option requires an extra parameter */
- if(!longopt && parse[1]) {
- nextarg=(char *)&parse[1]; /* this is the actual extra parameter */
- singleopt=TRUE; /* don't loop anymore after this */
- }
- else if(!nextarg)
- return PARAM_REQUIRES_PARAMETER;
- else
- *usedarg = TRUE; /* mark it as used */
- }
-
- switch(letter) {
- case '*': /* options without a short option */
- switch(subletter) {
- case 'a': /* random-file */
- GetStr(&config->random_file, nextarg);
- break;
- case 'b': /* egd-file */
- GetStr(&config->egd_file, nextarg);
- break;
- case 'c': /* connect-timeout */
- if(str2num(&config->connecttimeout, nextarg))
- return PARAM_BAD_NUMERIC;
- break;
- case 'd': /* ciphers */
- GetStr(&config->cipher_list, nextarg);
- break;
- case 'e': /* --disable-epsv */
- config->disable_epsv = toggle;
- break;
- case 'E': /* --epsv */
- config->disable_epsv = (bool)(!toggle);
- break;
-#ifdef USE_ENVIRONMENT
- case 'f':
- config->writeenv = toggle;
- break;
-#endif
- case 'g': /* --trace */
- GetStr(&config->trace_dump, nextarg);
- if(config->tracetype && (config->tracetype != TRACE_BIN))
- warnf(config, "--trace overrides an earlier trace/verbose option\n");
- config->tracetype = TRACE_BIN;
- break;
- case 'h': /* --trace-ascii */
- GetStr(&config->trace_dump, nextarg);
- if(config->tracetype && (config->tracetype != TRACE_ASCII))
- warnf(config,
- "--trace-ascii overrides an earlier trace/verbose option\n");
- config->tracetype = TRACE_ASCII;
- break;
- case 'i': /* --limit-rate */
- {
- /* We support G, M, K too */
- char *unit;
- curl_off_t value = curlx_strtoofft(nextarg, &unit, 0);
-
- if(!*unit)
- unit=(char *)"b";
- else if(strlen(unit) > 1)
- unit=(char *)"w"; /* unsupported */
-
- switch(*unit) {
- case 'G':
- case 'g':
- value *= 1024*1024*1024;
- break;
- case 'M':
- case 'm':
- value *= 1024*1024;
- break;
- case 'K':
- case 'k':
- value *= 1024;
- break;
- case 'b':
- case 'B':
- /* for plain bytes, leave as-is */
- break;
- default:
- warnf(config, "unsupported rate unit. Use G, M, K or B!\n");
- return PARAM_BAD_USE;
- }
- config->recvpersecond = value;
- config->sendpersecond = value;
- }
- break;
-
- case 'j': /* --compressed */
- config->encoding = toggle;
- break;
-
- case 'k': /* --digest */
- if(toggle)
- config->authtype |= CURLAUTH_DIGEST;
- else
- config->authtype &= ~CURLAUTH_DIGEST;
- break;
-
- case 'l': /* --negotiate */
- if(toggle) {
- if(curlinfo->features & CURL_VERSION_GSSNEGOTIATE)
- config->authtype |= CURLAUTH_GSSNEGOTIATE;
- else
- return PARAM_LIBCURL_DOESNT_SUPPORT;
- }
- else
- config->authtype &= ~CURLAUTH_GSSNEGOTIATE;
- break;
-
- case 'm': /* --ntlm */
- if(toggle) {
- if(curlinfo->features & CURL_VERSION_NTLM)
- config->authtype |= CURLAUTH_NTLM;
- else
- return PARAM_LIBCURL_DOESNT_SUPPORT;
- }
- else
- config->authtype &= ~CURLAUTH_NTLM;
- break;
-
- case 'n': /* --basic for completeness */
- if(toggle)
- config->authtype |= CURLAUTH_BASIC;
- else
- config->authtype &= ~CURLAUTH_BASIC;
- break;
-
- case 'o': /* --anyauth, let libcurl pick it */
- if(toggle)
- config->authtype = CURLAUTH_ANY;
- /* --no-anyauth simply doesn't touch it */
- break;
-
-#ifdef USE_WATT32
- case 'p': /* --wdebug */
- dbug_init();
- break;
-#endif
- case 'q': /* --ftp-create-dirs */
- config->ftp_create_dirs = toggle;
- break;
-
- case 'r': /* --create-dirs */
- config->create_dirs = TRUE;
- break;
-
- case 's': /* --max-redirs */
- /* specified max no of redirects (http(s)) */
- if(str2num(&config->maxredirs, nextarg))
- return PARAM_BAD_NUMERIC;
- break;
-
- case 't': /* --proxy-ntlm */
- if(curlinfo->features & CURL_VERSION_NTLM)
- config->proxyntlm = toggle;
- else
- return PARAM_LIBCURL_DOESNT_SUPPORT;
- break;
-
- case 'u': /* --crlf */
- /* LF -> CRLF conversion? */
- config->crlf = TRUE;
- break;
-
- case 'v': /* --stderr */
- if(strcmp(nextarg, "-")) {
- FILE *newfile = fopen(nextarg, "wt");
- if(!newfile)
- warnf(config, "Failed to open %s!\n", nextarg);
- else {
- if(config->errors_fopened)
- fclose(config->errors);
- config->errors = newfile;
- config->errors_fopened = TRUE;
- }
- }
- else
- config->errors = stdout;
- break;
- case 'w': /* --interface */
- /* interface */
- GetStr(&config->iface, nextarg);
- break;
- case 'x': /* --krb */
- /* kerberos level string */
- if(curlinfo->features & (CURL_VERSION_KERBEROS4 |
- CURL_VERSION_GSSNEGOTIATE))
- GetStr(&config->krblevel, nextarg);
- else
- return PARAM_LIBCURL_DOESNT_SUPPORT;
- break;
- case 'y': /* --max-filesize */
- if(str2offset(&config->max_filesize, nextarg))
- return PARAM_BAD_NUMERIC;
- break;
- case 'z': /* --disable-eprt */
- config->disable_eprt = toggle;
- break;
- case 'Z': /* --eprt */
- config->disable_eprt = (bool)(!toggle);
- break;
-
- default: /* the URL! */
- {
- struct getout *url;
- if(config->url_get || (config->url_get=config->url_list)) {
- /* there's a node here, if it already is filled-in continue to find
- an "empty" node */
- while(config->url_get && (config->url_get->flags&GETOUT_URL))
- config->url_get = config->url_get->next;
- }
-
- /* now there might or might not be an available node to fill in! */
-
- if(config->url_get)
- /* existing node */
- url = config->url_get;
- else
- /* there was no free node, create one! */
- url=new_getout(config);
-
- if(url) {
- /* fill in the URL */
- GetStr(&url->url, nextarg);
- url->flags |= GETOUT_URL;
- }
- }
- }
- break;
- case '$': /* more options without a short option */
- switch(subletter) {
- case 'a': /* --ftp-ssl */
- config->ftp_ssl = toggle;
- break;
- case 'b': /* --ftp-pasv */
- if(config->ftpport)
- free(config->ftpport);
- config->ftpport = NULL;
- break;
- case 'c': /* --socks5 specifies a socks5 proxy to use, and resolves
- the name locally and passes on the resolved address */
- GetStr(&config->socksproxy, nextarg);
- config->socksver = CURLPROXY_SOCKS5;
- break;
- case 't': /* --socks4 specifies a socks4 proxy to use */
- GetStr(&config->socksproxy, nextarg);
- config->socksver = CURLPROXY_SOCKS4;
- break;
- case 'T': /* --socks4a specifies a socks4a proxy to use */
- GetStr(&config->socksproxy, nextarg);
- config->socksver = CURLPROXY_SOCKS4A;
- break;
- case '2': /* --socks5-hostname specifies a socks5 proxy and enables name
- resolving with the proxy */
- GetStr(&config->socksproxy, nextarg);
- config->socksver = CURLPROXY_SOCKS5_HOSTNAME;
- break;
- case 'd': /* --tcp-nodelay option */
- config->tcp_nodelay = toggle;
- break;
- case 'e': /* --proxy-digest */
- config->proxydigest = toggle;
- break;
- case 'f': /* --proxy-basic */
- config->proxybasic = toggle;
- break;
- case 'g': /* --retry */
- if(str2num(&config->req_retry, nextarg))
- return PARAM_BAD_NUMERIC;
- break;
- case 'h': /* --retry-delay */
- if(str2num(&config->retry_delay, nextarg))
- return PARAM_BAD_NUMERIC;
- break;
- case 'i': /* --retry-max-time */
- if(str2num(&config->retry_maxtime, nextarg))
- return PARAM_BAD_NUMERIC;
- break;
-
- case 'k': /* --proxy-negotiate */
- 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;
- case 'n': /* --proxy-anyauth */
- config->proxyanyauth = toggle;
- break;
- case 'o': /* --trace-time */
- config->tracetime = toggle;
- break;
- case 'p': /* --ignore-content-length */
- config->ignorecl = toggle;
- break;
- case 'q': /* --ftp-skip-pasv-ip */
- config->ftp_skip_ip = toggle;
- break;
- case 'r': /* --ftp-method (undocumented at this point) */
- config->ftp_filemethod = ftpfilemethod(config, nextarg);
- break;
- case 's': /* --local-port */
- rc = sscanf(nextarg, "%d - %d",
- &config->localport,
- &config->localportrange);
- if(!rc)
- return PARAM_BAD_USE;
- else if(rc == 1)
- config->localportrange = 1; /* default number of ports to try */
- else {
- config->localportrange -= config->localport;
- if(config->localportrange < 1) {
- warnf(config, "bad range input\n");
- return PARAM_BAD_USE;
- }
- }
- break;
- case 'u': /* --ftp-alternative-to-user */
- GetStr(&config->ftp_alternative_to_user, nextarg);
- break;
- case 'v': /* --ftp-ssl-reqd */
- config->ftp_ssl_reqd = toggle;
- break;
- case 'w': /* --no-sessionid */
- config->disable_sessionid = (bool)(!toggle);
- break;
- case 'x': /* --ftp-ssl-control */
- config->ftp_ssl_control = toggle;
- break;
- case 'y': /* --ftp-ssl-ccc */
- config->ftp_ssl_ccc = toggle;
- if(!config->ftp_ssl_ccc_mode)
- config->ftp_ssl_ccc_mode = CURLFTPSSL_CCC_PASSIVE;
- break;
- case 'j': /* --ftp-ssl-ccc-mode */
- config->ftp_ssl_ccc = TRUE;
- config->ftp_ssl_ccc_mode = ftpcccmethod(config, nextarg);
- break;
- case 'z': /* --libcurl */
- GetStr(&config->libcurl, nextarg);
- break;
- case '#': /* --raw */
- config->raw = toggle;
- break;
- case '0': /* --post301 */
- config->post301 = toggle;
- break;
- case '1': /* --no-keepalive */
- config->nokeepalive = (bool)(!toggle);
- break;
- case '3': /* --keepalive-time */
- if(str2num(&config->alivetime, nextarg))
- return PARAM_BAD_NUMERIC;
- break;
- case '4': /* --post302 */
- config->post302 = toggle;
- break;
- case '5': /* --noproxy */
- /* This specifies the noproxy list */
- GetStr(&config->noproxy, nextarg);
- break;
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
- case '6': /* --socks5-gssapi-service */
- GetStr(&config->socks5_gssapi_service, nextarg);
- break;
- case '7': /* --socks5-gssapi-nec*/
- config->socks5_gssapi_nec = TRUE;
- break;
-#endif
- case '8': /* --proxy1.0 */
- /* http 1.0 proxy */
- GetStr(&config->proxy, nextarg);
- config->proxyver = CURLPROXY_HTTP_1_0;
- break;
- case '9': /* --tftp-blksize */
- str2num(&config->tftp_blksize, nextarg);
- break;
- case 'A': /* --mail-from */
- GetStr(&config->mail_from, nextarg);
- break;
- case 'B': /* --mail-rcpt */
- /* append receiver to a list */
- err = add2list(&config->mail_rcpt, nextarg);
- if(err)
- return err;
- break;
- case 'C': /* --ftp-pret */
- config->ftp_pret = toggle;
- break;
- case 'D': /* --proto */
- config->proto_present = TRUE;
- if(proto2num(config, &config->proto, nextarg))
- return PARAM_BAD_USE;
- break;
- case 'E': /* --proto-redir */
- config->proto_redir_present = TRUE;
- if(proto2num(config, &config->proto_redir, nextarg))
- return PARAM_BAD_USE;
- break;
- }
- break;
- case '#': /* --progress-bar */
- if(toggle)
- config->progressmode = CURL_PROGRESS_BAR;
- else
- config->progressmode = CURL_PROGRESS_STATS;
- break;
- case '0':
- /* HTTP version 1.0 */
- config->httpversion = CURL_HTTP_VERSION_1_0;
- break;
- case '1':
- /* TLS version 1 */
- config->ssl_version = CURL_SSLVERSION_TLSv1;
- break;
- case '2':
- /* SSL version 2 */
- config->ssl_version = CURL_SSLVERSION_SSLv2;
- break;
- case '3':
- /* SSL version 3 */
- config->ssl_version = CURL_SSLVERSION_SSLv3;
- break;
- case '4':
- /* IPv4 */
- config->ip_version = 4;
- break;
- case '6':
- /* IPv6 */
- config->ip_version = 6;
- break;
- case 'a':
- /* This makes the FTP sessions use APPE instead of STOR */
- config->ftp_append = toggle;
- break;
- case 'A':
- /* This specifies the User-Agent name */
- GetStr(&config->useragent, nextarg);
- break;
- case 'b': /* cookie string coming up: */
- if(nextarg[0] == '@') {
- nextarg++;
- }
- else if(strchr(nextarg, '=')) {
- /* A cookie string must have a =-letter */
- GetStr(&config->cookie, nextarg);
- break;
- }
- /* We have a cookie file to read from! */
- GetStr(&config->cookiefile, nextarg);
- break;
- case 'B':
- /* use ASCII/text when transfering */
- config->use_ascii = toggle;
- break;
- case 'c':
- /* get the file name to dump all cookies in */
- GetStr(&config->cookiejar, nextarg);
- break;
- case 'C':
- /* This makes us continue an ftp transfer at given position */
- if(!curlx_strequal(nextarg, "-")) {
- if(str2offset(&config->resume_from, nextarg))
- return PARAM_BAD_NUMERIC;
- config->resume_from_current = FALSE;
- }
- else {
- config->resume_from_current = TRUE;
- config->resume_from = 0;
- }
- config->use_resume=TRUE;
- break;
- case 'd':
- /* postfield data */
- {
- char *postdata=NULL;
- FILE *file;
-
- if(subletter == 'e') { /* --data-urlencode*/
- /* [name]=[content], we encode the content part only
- * [name]@[file name]
- *
- * Case 2: we first load the file using that name and then encode
- * the content.
- */
- const char *p = strchr(nextarg, '=');
- size_t size = 0;
- size_t nlen;
- char is_file;
- if(!p)
- /* there was no '=' letter, check for a '@' instead */
- p = strchr(nextarg, '@');
- if(p) {
- nlen = p - nextarg; /* length of the name part */
- is_file = *p++; /* pass the separator */
- }
- else {
- /* neither @ nor =, so no name and it isn't a file */
- nlen = is_file = 0;
- p = nextarg;
- }
- if('@' == is_file) {
- /* a '@' letter, it means that a file name or - (stdin) follows */
-
- if(curlx_strequal("-", p)) {
- file = stdin;
- SET_BINMODE(stdin);
- }
- else {
- file = fopen(p, "rb");
- if(!file)
- warnf(config,
- "Couldn't read data from file \"%s\", this makes "
- "an empty POST.\n", nextarg);
- }
-
- err = file2memory(&postdata, &size, file);
-
- if(file && (file != stdin))
- fclose(file);
- if(err)
- return err;
- }
- else {
- GetStr(&postdata, p);
- size = strlen(postdata);
- }
-
- if(!postdata) {
- /* no data from the file, point to a zero byte string to make this
- get sent as a POST anyway */
- postdata=strdup("");
- }
- else {
- char *enc = curl_easy_escape(config->easy, postdata, (int)size);
- free(postdata); /* no matter if it worked or not */
- if(enc) {
- /* now make a string with the name from above and append the
- encoded string */
- size_t outlen = nlen + strlen(enc) + 2;
- char *n = malloc(outlen);
- if(!n) {
- curl_free(enc);
- return PARAM_NO_MEM;
- }
- if(nlen > 0) /* only append '=' if we have a name */
- snprintf(n, outlen, "%.*s=%s", nlen, nextarg, enc);
- else
- strcpy(n, enc);
- curl_free(enc);
- postdata = n;
- }
- else
- return PARAM_NO_MEM;
- }
- }
- else if('@' == *nextarg) {
- size_t size = 0;
- /* the data begins with a '@' letter, it means that a file name
- or - (stdin) follows */
- nextarg++; /* pass the @ */
-
- if(curlx_strequal("-", nextarg)) {
- file = stdin;
- if(subletter == 'b') /* forced data-binary */
- SET_BINMODE(stdin);
- }
- else {
- file = fopen(nextarg, "rb");
- if(!file)
- warnf(config, "Couldn't read data from file \"%s\", this makes "
- "an empty POST.\n", nextarg);
- }
-
- if(subletter == 'b') {
- /* forced binary */
- err = file2memory(&postdata, &size, file);
- config->postfieldsize = (curl_off_t)size;
- }
- else
- err = file2string(&postdata, file);
-
- if(file && (file != stdin))
- fclose(file);
- if(err)
- return err;
-
- if(!postdata) {
- /* no data from the file, point to a zero byte string to make this
- get sent as a POST anyway */
- postdata=strdup("");
- }
- }
- else {
- GetStr(&postdata, nextarg);
- }
-
-#ifdef CURL_DOES_CONVERSIONS
- if(subletter != 'b') { /* NOT forced binary, convert to ASCII */
- convert_to_network(postdata, strlen(postdata));
- }
-#endif
-
- if(config->postfields) {
- /* we already have a string, we append this one
- with a separating &-letter */
- char *oldpost=config->postfields;
- size_t newlen = strlen(oldpost) + strlen(postdata) + 2;
- config->postfields=malloc(newlen);
- if(!config->postfields) {
- free(postdata);
- return PARAM_NO_MEM;
- }
- /* use ASCII value 0x26 for '&' to accommodate non-ASCII platforms */
- snprintf(config->postfields, newlen, "%s\x26%s", oldpost, postdata);
- free(oldpost);
- free(postdata);
- }
- else
- config->postfields=postdata;
- }
- /*
- We can't set the request type here, as this data might be used in
- a simple GET if -G is used. Already or soon.
-
- if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq))
- return PARAM_BAD_USE;
- */
- break;
- case 'D':
- /* dump-header to given file name */
- GetStr(&config->headerfile, nextarg);
- break;
- case 'e':
- {
- char *ptr = strstr(nextarg, ";auto");
- if(ptr) {
- /* Automatic referer requested, this may be combined with a
- set initial one */
- config->autoreferer = TRUE;
- *ptr = 0; /* zero terminate here */
- }
- else
- config->autoreferer = FALSE;
- GetStr(&config->referer, nextarg);
- }
- break;
- case 'E':
- switch(subletter) {
- case 'a': /* CA info PEM file */
- /* CA info PEM file */
- GetStr(&config->cacert, nextarg);
- break;
- case 'b': /* cert file type */
- GetStr(&config->cert_type, nextarg);
- break;
- case 'c': /* private key file */
- GetStr(&config->key, nextarg);
- break;
- case 'd': /* private key file type */
- GetStr(&config->key_type, nextarg);
- break;
- case 'e': /* private key passphrase */
- GetStr(&config->key_passwd, nextarg);
- cleanarg(nextarg);
- break;
- case 'f': /* crypto engine */
- GetStr(&config->engine, nextarg);
- if(config->engine && curlx_raw_equal(config->engine,"list"))
- config->list_engines = TRUE;
- break;
- case 'g': /* CA info PEM file */
- /* CA cert directory */
- GetStr(&config->capath, nextarg);
- break;
- case 'h': /* --pubkey public key file */
- GetStr(&config->pubkey, nextarg);
- break;
- case 'i': /* --hostpubmd5 md5 of the host public key */
- GetStr(&config->hostpubmd5, nextarg);
- if(!config->hostpubmd5 || strlen(config->hostpubmd5) != 32)
- return PARAM_BAD_USE;
- break;
- case 'j': /* CRL info PEM file */
- /* CRL file */
- GetStr(&config->crlfile, nextarg);
- break;
- default: /* certificate file */
- {
- char *ptr = strchr(nextarg, ':');
- /* Since we live in a world of weirdness and confusion, the win32
- dudes can use : when using drive letters and thus
- c:\file:password needs to work. In order not to break
- compatibility, we still use : as separator, but we try to detect
- when it is used for a file name! On windows. */
-#ifdef WIN32
- if(ptr &&
- (ptr == &nextarg[1]) &&
- (nextarg[2] == '\\' || nextarg[2] == '/') &&
- (ISALPHA(nextarg[0])) )
- /* colon in the second column, followed by a backslash, and the
- first character is an alphabetic letter:
-
- this is a drive letter colon */
- ptr = strchr(&nextarg[3], ':'); /* find the next one instead */
-#endif
- if(ptr) {
- /* we have a password too */
- *ptr=0;
- ptr++;
- GetStr(&config->key_passwd, ptr);
- }
- GetStr(&config->cert, nextarg);
- cleanarg(nextarg);
- }
- }
- break;
- case 'f':
- /* fail hard on errors */
- config->failonerror = toggle;
- break;
- case 'F':
- /* "form data" simulation, this is a little advanced so lets do our best
- to sort this out slowly and carefully */
- if(formparse(config,
- nextarg,
- &config->httppost,
- &config->last_post,
- (bool) (subletter=='s'))) /* 's' means literal string */
- return PARAM_BAD_USE;
- if(SetHTTPrequest(config, HTTPREQ_POST, &config->httpreq))
- return PARAM_BAD_USE;
- break;
-
- case 'g': /* g disables URLglobbing */
- config->globoff = toggle;
- break;
-
- case 'G': /* HTTP GET */
- config->use_httpget = TRUE;
- break;
-
- case 'h': /* h for help */
- if(toggle) {
- help();
- return PARAM_HELP_REQUESTED;
- }
- /* we now actually support --no-help too! */
- break;
- case 'H':
- /* A custom header to append to a list */
- err = add2list(&config->headers, nextarg);
- if(err)
- return err;
- break;
- case 'i':
- config->include_headers = toggle; /* include the headers as well in the
- general output stream */
- break;
- case 'j':
- config->cookiesession = toggle;
- break;
- case 'I':
- /*
- * no_body will imply include_headers later on
- */
- config->no_body = toggle;
- if(SetHTTPrequest(config,
- (config->no_body)?HTTPREQ_HEAD:HTTPREQ_GET,
- &config->httpreq))
- return PARAM_BAD_USE;
- break;
- case 'J': /* --remote-header-name */
- if(config->include_headers) {
- warnf(config,
- "--include and --remote-header-name cannot be combined.\n");
- return PARAM_BAD_USE;
- }
- config->content_disposition = toggle;
- break;
- case 'k': /* allow insecure SSL connects */
- config->insecure_ok = toggle;
- break;
- case 'K': /* parse config file */
- if(parseconfig(nextarg, config))
- warnf(config, "error trying read config from the '%s' file\n",
- nextarg);
- break;
- case 'l':
- config->dirlistonly = toggle; /* only list the names of the FTP dir */
- break;
- case 'L':
- config->followlocation = toggle; /* Follow Location: HTTP headers */
- switch (subletter) {
- case 't':
- /* Continue to send authentication (user+password) when following
- * locations, even when hostname changed */
- config->unrestricted_auth = toggle;
- break;
- }
- break;
- case 'm':
- /* specified max time */
- if(str2num(&config->timeout, nextarg))
- return PARAM_BAD_NUMERIC;
- break;
- case 'M': /* M for manual, huge help */
- if(toggle) { /* --no-manual shows no manual... */
-#ifdef USE_MANUAL
- hugehelp();
- return PARAM_HELP_REQUESTED;
-#else
- warnf(config,
- "built-in manual was disabled at build-time!\n");
- return PARAM_OPTION_UNKNOWN;
-#endif
- }
- break;
- case 'n':
- switch(subletter) {
- case 'o': /* CA info PEM file */
- /* use .netrc or URL */
- config->netrc_opt = toggle;
- break;
- default:
- /* pick info from .netrc, if this is used for http, curl will
- automatically enfore user+password with the request */
- config->netrc = toggle;
- break;
- }
- break;
- case 'N':
- /* disable the output I/O buffering. note that the option is called
- --buffer but is mostly used in the negative form: --no-buffer */
- if(longopt)
- config->nobuffer = (bool)(!toggle);
- else
- config->nobuffer = toggle;
- break;
- case 'O': /* --remote-name */
- if(subletter == 'a') { /* --remote-name-all */
- config->default_node_flags = toggle?GETOUT_USEREMOTE:0;
- break;
- }
- /* fall-through! */
- case 'o': /* --output */
- /* output file */
- {
- struct getout *url;
- if(config->url_out || (config->url_out=config->url_list)) {
- /* there's a node here, if it already is filled-in continue to find
- an "empty" node */
- while(config->url_out && (config->url_out->flags&GETOUT_OUTFILE))
- config->url_out = config->url_out->next;
- }
-
- /* now there might or might not be an available node to fill in! */
-
- if(config->url_out)
- /* existing node */
- url = config->url_out;
- else
- /* there was no free node, create one! */
- url=new_getout(config);
-
- if(url) {
- /* fill in the outfile */
- if('o' == letter) {
- GetStr(&url->outfile, nextarg);
- url->flags &= ~GETOUT_USEREMOTE; /* switch off */
- }
- else {
- url->outfile=NULL; /* leave it */
- if(toggle)
- url->flags |= GETOUT_USEREMOTE; /* switch on */
- else
- url->flags &= ~GETOUT_USEREMOTE; /* switch off */
- }
- url->flags |= GETOUT_OUTFILE;
- }
- }
- break;
- case 'P':
- /* This makes the FTP sessions use PORT instead of PASV */
- /* use <eth0> or <192.168.10.10> style addresses. Anything except
- this will make us try to get the "default" address.
- NOTE: this is a changed behaviour since the released 4.1!
- */
- GetStr(&config->ftpport, nextarg);
- break;
- case 'p':
- /* proxy tunnel for non-http protocols */
- config->proxytunnel = toggle;
- break;
-
- case 'q': /* if used first, already taken care of, we do it like
- this so we don't cause an error! */
- break;
- case 'Q':
- /* QUOTE command to send to FTP server */
- switch(nextarg[0]) {
- case '-':
- /* prefixed with a dash makes it a POST TRANSFER one */
- nextarg++;
- err = add2list(&config->postquote, nextarg);
- break;
- case '+':
- /* prefixed with a plus makes it a just-before-transfer one */
- nextarg++;
- err = add2list(&config->prequote, nextarg);
- break;
- default:
- err = add2list(&config->quote, nextarg);
- break;
- }
- if(err)
- return err;
- break;
- case 'r':
- /* Specifying a range WITHOUT A DASH will create an illegal HTTP range
- (and won't actually be range by definition). The man page previously
- claimed that to be a good way, why this code is added to work-around
- it. */
- if(ISDIGIT(*nextarg) && !strchr(nextarg, '-')) {
- char buffer[32];
- curl_off_t off;
- warnf(config,
- "A specified range MUST include at least one dash (-). "
- "Appending one for you!\n");
- off = curlx_strtoofft(nextarg, NULL, 10);
- snprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", off);
- GetStr(&config->range, buffer);
- }
- {
- /* byte range requested */
- char* tmp_range;
- tmp_range=nextarg;
- while(*tmp_range != '\0') {
- if(!ISDIGIT(*tmp_range)&&*tmp_range!='-'&&*tmp_range!=',') {
- warnf(config,"Invalid character is found in given range. "
- "A specified range MUST have only digits in "
- "\'start\'-\'stop\'. The server's response to this "
- "request is uncertain.\n");
- break;
- }
- tmp_range++;
- }
- /* byte range requested */
- GetStr(&config->range, nextarg);
- }
- break;
- case 'R':
- /* use remote file's time */
- config->remote_time = toggle;
- break;
- case 's':
- /* don't show progress meter, don't show errors : */
- if(toggle)
- config->mute = config->noprogress = TRUE;
- else
- config->mute = config->noprogress = FALSE;
- config->showerror = (bool)(!toggle); /* toggle off */
- break;
- case 'S':
- /* show errors */
- config->showerror = toggle; /* toggle on if used with -s */
- break;
- case 't':
- /* Telnet options */
- err = add2list(&config->telnet_options, nextarg);
- if(err)
- return err;
- break;
- case 'T':
- /* we are uploading */
- {
- struct getout *url;
- if(config->url_out || (config->url_out=config->url_list)) {
- /* there's a node here, if it already is filled-in continue to find
- an "empty" node */
- while(config->url_out && (config->url_out->flags&GETOUT_UPLOAD))
- config->url_out = config->url_out->next;
- }
-
- /* now there might or might not be an available node to fill in! */
-
- if(config->url_out)
- /* existing node */
- url = config->url_out;
- else
- /* there was no free node, create one! */
- url=new_getout(config);
-
- if(url) {
- url->flags |= GETOUT_UPLOAD; /* mark -T used */
- if(!*nextarg)
- url->flags |= GETOUT_NOUPLOAD;
- else {
- /* "-" equals stdin, but keep the string around for now */
- GetStr(&url->infile, nextarg);
- }
- }
- }
- break;
- case 'u':
- /* user:password */
- GetStr(&config->userpwd, nextarg);
- cleanarg(nextarg);
- checkpasswd("host", &config->userpwd);
- break;
- case 'U':
- /* Proxy user:password */
- GetStr(&config->proxyuserpwd, nextarg);
- cleanarg(nextarg);
- checkpasswd("proxy", &config->proxyuserpwd);
- break;
- case 'v':
- if(toggle) {
- /* the '%' thing here will cause the trace get sent to stderr */
- GetStr(&config->trace_dump, (char *)"%");
- if(config->tracetype && (config->tracetype != TRACE_PLAIN))
- warnf(config,
- "-v/--verbose overrides an earlier trace/verbose option\n");
- config->tracetype = TRACE_PLAIN;
- }
- else
- /* verbose is disabled here */
- config->tracetype = TRACE_NONE;
- break;
- case 'V':
- {
- const char * const *proto;
-
- if(!toggle)
- /* --no-version yields no output! */
- break;
-
- printf(CURL_ID "%s\n", curl_version());
- if(curlinfo->protocols) {
- printf("Protocols: ");
- for(proto=curlinfo->protocols; *proto; ++proto) {
- printf("%s ", *proto);
- }
- puts(""); /* newline */
- }
- if(curlinfo->features) {
- unsigned int i;
- struct feat {
- const char *name;
- int bitmask;
- };
- 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},
- {"NTLM", CURL_VERSION_NTLM},
- {"SPNEGO", CURL_VERSION_SPNEGO},
- {"SSL", CURL_VERSION_SSL},
- {"SSPI", CURL_VERSION_SSPI},
- {"krb4", CURL_VERSION_KERBEROS4},
- {"libz", CURL_VERSION_LIBZ},
- {"CharConv", CURL_VERSION_CONV}
- };
- printf("Features: ");
- for(i=0; i<sizeof(feats)/sizeof(feats[0]); i++) {
- if(curlinfo->features & feats[i].bitmask)
- printf("%s ", feats[i].name);
- }
- puts(""); /* newline */
- }
- }
- return PARAM_HELP_REQUESTED;
- case 'w':
- /* get the output string */
- if('@' == *nextarg) {
- /* the data begins with a '@' letter, it means that a file name
- or - (stdin) follows */
- FILE *file;
- const char *fname;
- nextarg++; /* pass the @ */
- if(curlx_strequal("-", nextarg)) {
- fname = "<stdin>";
- file = stdin;
- }
- else {
- fname = nextarg;
- file = fopen(nextarg, "r");
- }
- err = file2string(&config->writeout, file);
- if(file && (file != stdin))
- fclose(file);
- if(err)
- return err;
- if(!config->writeout)
- warnf(config, "Failed to read %s", fname);
- }
- else
- GetStr(&config->writeout, nextarg);
- break;
- case 'x':
- /* proxy */
- GetStr(&config->proxy, nextarg);
- config->proxyver = CURLPROXY_HTTP;
- break;
- case 'X':
- /* set custom request */
- GetStr(&config->customrequest, nextarg);
- break;
- case 'y':
- /* low speed time */
- if(str2num(&config->low_speed_time, nextarg))
- return PARAM_BAD_NUMERIC;
- if(!config->low_speed_limit)
- config->low_speed_limit = 1;
- break;
- case 'Y':
- /* low speed limit */
- if(str2num(&config->low_speed_limit, nextarg))
- return PARAM_BAD_NUMERIC;
- if(!config->low_speed_time)
- config->low_speed_time=30;
- break;
- case 'z': /* time condition coming up */
- switch(*nextarg) {
- case '+':
- nextarg++;
- default:
- /* If-Modified-Since: (section 14.28 in RFC2068) */
- config->timecond = CURL_TIMECOND_IFMODSINCE;
- break;
- case '-':
- /* If-Unmodified-Since: (section 14.24 in RFC2068) */
- config->timecond = CURL_TIMECOND_IFUNMODSINCE;
- nextarg++;
- break;
- case '=':
- /* Last-Modified: (section 14.29 in RFC2068) */
- config->timecond = CURL_TIMECOND_LASTMOD;
- nextarg++;
- break;
- }
- now=time(NULL);
- config->condtime=curl_getdate(nextarg, &now);
- if(-1 == (int)config->condtime) {
- /* now let's see if it is a file name to get the time from instead! */
- struct_stat statbuf;
- if(-1 == stat(nextarg, &statbuf)) {
- /* failed, remove time condition */
- config->timecond = CURL_TIMECOND_NONE;
- warnf(config,
- "Illegal date format for -z/--timecond (and not "
- "a file name). Disabling time condition. "
- "See curl_getdate(3) for valid date syntax.\n");
- }
- else {
- /* pull the time out from the file */
- config->condtime = statbuf.st_mtime;
- }
- }
- break;
- default: /* unknown flag */
- return PARAM_OPTION_UNKNOWN;
- }
- hit = -1;
-
- } while(!longopt && !singleopt && *++parse && !*usedarg);
-
- return PARAM_OK;
-}
-
-/*
- * Copies the string from line to the buffer at param, unquoting
- * backslash-quoted characters and NUL-terminating the output string.
- * Stops at the first non-backslash-quoted double quote character or the
- * end of the input string. param must be at least as long as the input
- * string. Returns the pointer after the last handled input character.
- */
-static const char *unslashquote(const char *line, char *param)
-{
- while(*line && (*line != '\"')) {
- if(*line == '\\') {
- char out;
- line++;
-
- /* default is to output the letter after the backslash */
- switch(out = *line) {
- case '\0':
- continue; /* this'll break out of the loop */
- case 't':
- out='\t';
- break;
- case 'n':
- out='\n';
- break;
- case 'r':
- out='\r';
- break;
- case 'v':
- out='\v';
- break;
- }
- *param++=out;
- line++;
- }
- else
- *param++=*line++;
- }
- *param=0; /* always zero terminate */
- return line;
-}
-
-/* return 0 on everything-is-fine, and non-zero otherwise */
-static int parseconfig(const char *filename,
- struct Configurable *config)
-{
- int res;
- FILE *file;
- char filebuffer[512];
- bool usedarg;
- char *home;
- int rc = 0;
-
- if(!filename || !*filename) {
- /* NULL or no file name attempts to load .curlrc from the homedir! */
-
-#define CURLRC DOT_CHAR "curlrc"
-
-#ifndef __AMIGA__
- filename = CURLRC; /* sensible default */
- home = homedir(); /* portable homedir finder */
- if(home) {
- if(strlen(home)<(sizeof(filebuffer)-strlen(CURLRC))) {
- snprintf(filebuffer, sizeof(filebuffer),
- "%s%s%s", home, DIR_CHAR, CURLRC);
-
-#ifdef WIN32
- /* Check if the file exists - if not, try CURLRC in the same
- * directory as our executable
- */
- file = fopen(filebuffer, "r");
- if(file != NULL) {
- fclose(file);
- filename = filebuffer;
- }
- else {
- /* Get the filename of our executable. GetModuleFileName is
- * already declared via inclusions done in setup header file.
- * We assume that we are using the ASCII version here.
- */
- int n = GetModuleFileName(0, filebuffer, sizeof(filebuffer));
- if(n > 0 && n < (int)sizeof(filebuffer)) {
- /* We got a valid filename - get the directory part */
- char *lastdirchar = strrchr(filebuffer, '\\');
- if(lastdirchar) {
- size_t remaining;
- *lastdirchar = 0;
- /* If we have enough space, build the RC filename */
- remaining = sizeof(filebuffer) - strlen(filebuffer);
- if(strlen(CURLRC) < remaining - 1) {
- snprintf(lastdirchar, remaining,
- "%s%s", DIR_CHAR, CURLRC);
- /* Don't bother checking if it exists - we do
- * that later
- */
- filename = filebuffer;
- }
- }
- }
- }
-#else /* WIN32 */
- filename = filebuffer;
-#endif /* WIN32 */
- }
- free(home); /* we've used it, now free it */
- }
-
-# else /* __AMIGA__ */
- /* On AmigaOS all the config files are into env:
- */
- filename = "ENV:" CURLRC;
-
-#endif
- }
-
- if(strcmp(filename,"-"))
- file = fopen(filename, "r");
- else
- file = stdin;
-
- if(file) {
- char *line;
- char *aline;
- char *option;
- char *param;
- int lineno=0;
- bool alloced_param;
-
-#define ISSEP(x) (((x)=='=') || ((x) == ':'))
-
- while(NULL != (aline = my_get_line(file))) {
- lineno++;
- line = aline;
- alloced_param=FALSE;
-
- /* line with # in the first non-blank column is a comment! */
- while(*line && ISSPACE(*line))
- line++;
-
- switch(*line) {
- case '#':
- case '/':
- case '\r':
- case '\n':
- case '*':
- case '\0':
- free(aline);
- continue;
- }
-
- /* the option keywords starts here */
- option = line;
- while(*line && !ISSPACE(*line) && !ISSEP(*line))
- line++;
- /* ... and has ended here */
-
- if(*line)
- *line++=0; /* zero terminate, we have a local copy of the data */
-
-#ifdef DEBUG_CONFIG
- fprintf(stderr, "GOT: %s\n", option);
-#endif
-
- /* pass spaces and separator(s) */
- while(*line && (ISSPACE(*line) || ISSEP(*line)))
- line++;
-
- /* the parameter starts here (unless quoted) */
- if(*line == '\"') {
- /* quoted parameter, do the quote dance */
- line++;
- param=malloc(strlen(line)+1); /* parameter */
- if(!param) {
- /* out of memory */
- free(aline);
- rc = 1;
- break;
- }
- alloced_param=TRUE;
- (void)unslashquote(line, param);
- }
- else {
- param=line; /* parameter starts here */
- while(*line && !ISSPACE(*line))
- line++;
- *line=0; /* zero terminate */
- }
-
- if(param && !*param) {
- /* do this so getparameter can check for required parameters.
- Otherwise it always thinks there's a parameter. */
- if(alloced_param)
- free(param);
- param = NULL;
- }
-
-#ifdef DEBUG_CONFIG
- fprintf(stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
-#endif
- res = getparameter(option, param, &usedarg, config);
-
- if(param && *param && !usedarg)
- /* we passed in a parameter that wasn't used! */
- res = PARAM_GOT_EXTRA_PARAMETER;
-
- if(res != PARAM_OK) {
- /* the help request isn't really an error */
- if(!strcmp(filename, "-")) {
- filename=(char *)"<stdin>";
- }
- if(PARAM_HELP_REQUESTED != res) {
- const char *reason = param2text(res);
- warnf(config, "%s:%d: warning: '%s' %s\n",
- filename, lineno, option, reason);
- }
- }
-
- if(alloced_param)
- {
- free(param);
- param = NULL;
- }
-
- free(aline);
- }
- if(file != stdin)
- fclose(file);
- }
- else
- rc = 1; /* couldn't open the file */
- return rc;
-}
-
-static void go_sleep(long ms)
-{
-#ifdef HAVE_POLL_FINE
- /* portable subsecond "sleep" */
- poll((void *)0, 0, (int)ms);
-#else
- /* systems without poll() need other solutions */
-
-#ifdef WIN32
- /* Windows offers a millisecond sleep */
- Sleep(ms);
-#elif defined(MSDOS)
- delay(ms);
-#else
- /* Other systems must use select() for this */
- struct timeval timeout;
-
- timeout.tv_sec = ms/1000;
- ms = ms%1000;
- timeout.tv_usec = ms * 1000;
-
- select(0, NULL, NULL, NULL, &timeout);
-#endif
-
-#endif
-}
-
-static size_t my_fwrite(void *buffer, size_t sz, size_t nmemb, void *stream)
-{
- size_t rc;
- struct OutStruct *out=(struct OutStruct *)stream;
- struct Configurable *config = out->config;
-
- /*
- * Once that libcurl has called back my_fwrite() the returned value
- * is checked against the amount that was intended to be written, if
- * it does not match then it fails with CURLE_WRITE_ERROR. So at this
- * point returning a value different from sz*nmemb indicates failure.
- */
- const size_t err_rc = (sz * nmemb) ? 0 : 1;
-
- if(!out->stream) {
- out->bytes = 0; /* nothing written yet */
- if(!out->filename) {
- warnf(config, "Remote filename has no length!\n");
- return err_rc; /* Failure */
- }
-
- if(config->content_disposition) {
- /* don't overwrite existing files */
- FILE* f = fopen(out->filename, "r");
- if(f) {
- fclose(f);
- warnf(config, "Refusing to overwrite %s: %s\n", out->filename,
- strerror(EEXIST));
- return err_rc; /* Failure */
- }
- }
-
- /* open file for writing */
- out->stream=fopen(out->filename, "wb");
- if(!out->stream) {
- warnf(config, "Failed to create the file %s: %s\n", out->filename,
- strerror(errno));
- return err_rc; /* failure */
- }
- }
-
- rc = fwrite(buffer, sz, nmemb, out->stream);
-
- if((sz * nmemb) == rc)
- /* we added this amount of data to the output */
- out->bytes += (sz * nmemb);
-
- if(config->readbusy) {
- config->readbusy = FALSE;
- curl_easy_pause(config->easy, CURLPAUSE_CONT);
- }
-
- if(config->nobuffer) {
- /* disable output buffering */
- int res = fflush(out->stream);
- if(res) {
- /* return a value that isn't the same as sz * nmemb */
- return err_rc; /* failure */
- }
- }
-
- return rc;
-}
-
-struct InStruct {
- int fd;
- struct Configurable *config;
-};
-
-#define MAX_SEEK 2147483647
-
-/*
- * my_seek() is the CURLOPT_SEEKFUNCTION we use
- */
-static int my_seek(void *stream, curl_off_t offset, int whence)
-{
- struct InStruct *in=(struct InStruct *)stream;
-
-#if(CURL_SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES)
- /* The offset check following here is only interesting if curl_off_t is
- larger than off_t and we are not using the WIN32 large file support
- macros that provide the support to do 64bit seeks correctly */
-
- if(offset > MAX_SEEK) {
- /* Some precaution code to work around problems with different data sizes
- to allow seeking >32bit even if off_t is 32bit. Should be very rare and
- is really valid on weirdo-systems. */
- curl_off_t left = offset;
-
- if(whence != SEEK_SET)
- /* this code path doesn't support other types */
- return 1;
-
- if(LSEEK_ERROR == lseek(in->fd, 0, SEEK_SET))
- /* couldn't rewind to beginning */
- return 1;
-
- while(left) {
- long step = (left>MAX_SEEK ? MAX_SEEK : (long)left);
- if(LSEEK_ERROR == lseek(in->fd, step, SEEK_CUR))
- /* couldn't seek forwards the desired amount */
- return 1;
- left -= step;
- }
- return 0;
- }
-#endif
- if(LSEEK_ERROR == lseek(in->fd, offset, whence))
- /* couldn't rewind, the reason is in errno but errno is just not portable
- enough and we don't actually care that much why we failed. We'll let
- libcurl know that it may try other means if it wants to. */
- return CURL_SEEKFUNC_CANTSEEK;
-
- return 0;
-}
-
-static size_t my_fread(void *buffer, size_t sz, size_t nmemb, void *userp)
-{
- ssize_t rc;
- struct InStruct *in=(struct InStruct *)userp;
-
- rc = read(in->fd, buffer, sz*nmemb);
- if(rc < 0) {
- if(errno == EAGAIN) {
- errno = 0;
- in->config->readbusy = TRUE;
- return CURL_READFUNC_PAUSE;
- }
- /* since size_t is unsigned we can't return negative values fine */
- rc = 0;
- }
- in->config->readbusy = FALSE;
- return (size_t)rc;
-}
-
-struct ProgressData {
- int calls;
- curl_off_t prev;
- int width;
- FILE *out; /* where to write everything to */
- curl_off_t initial_size;
-};
-
-static int myprogress (void *clientp,
- double dltotal,
- double dlnow,
- double ultotal,
- double ulnow)
-{
- /* The original progress-bar source code was written for curl by Lars Aas,
- and this new edition inherits some of his concepts. */
-
- char line[256];
- char outline[256];
- char format[40];
- double frac;
- double percent;
- int barwidth;
- int num;
- int i;
-
- struct ProgressData *bar = (struct ProgressData *)clientp;
- curl_off_t total = (curl_off_t)dltotal + (curl_off_t)ultotal +
- bar->initial_size; /* expected transfer size */
- curl_off_t point = (curl_off_t)dlnow + (curl_off_t)ulnow +
- bar->initial_size; /* we've come this far */
-
- if(point > total)
- /* we have got more than the expected total! */
- total = point;
-
- bar->calls++; /* simply count invokes */
-
- if(total < 1) {
- curl_off_t prevblock = bar->prev / 1024;
- curl_off_t thisblock = point / 1024;
- while( thisblock > prevblock ) {
- fprintf( bar->out, "#" );
- prevblock++;
- }
- }
- else {
- frac = (double)point / (double)total;
- percent = frac * 100.0f;
- barwidth = bar->width - 7;
- num = (int) (((double)barwidth) * frac);
- for( i = 0; i < num; i++ ) {
- line[i] = '#';
- }
- line[i] = '\0';
- snprintf( format, sizeof(format), "%%-%ds %%5.1f%%%%", barwidth );
- snprintf( outline, sizeof(outline), format, line, percent );
- fprintf( bar->out, "\r%s", outline );
- }
- fflush(bar->out);
- bar->prev = point;
-
- return 0;
-}
-
-static
-void progressbarinit(struct ProgressData *bar,
- struct Configurable *config)
-{
-#ifdef __EMX__
- /* 20000318 mgs */
- int scr_size [2];
-#endif
- char *colp;
-
- memset(bar, 0, sizeof(struct ProgressData));
-
- /* pass this through to progress function so
- * it can display progress towards total file
- * not just the part that's left. (21-may-03, dbyron) */
- if(config->use_resume)
- bar->initial_size = config->resume_from;
-
-/* TODO: get terminal width through ansi escapes or something similar.
- try to update width when xterm is resized... - 19990617 larsa */
-#ifndef __EMX__
- /* 20000318 mgs
- * OS/2 users most likely won't have this env var set, and besides that
- * we're using our own way to determine screen width */
- colp = curlx_getenv("COLUMNS");
- if(colp != NULL) {
- bar->width = atoi(colp);
- curl_free(colp);
- }
- else
- bar->width = 79;
-#else
- /* 20000318 mgs
- * We use this emx library call to get the screen width, and subtract
- * one from what we got in order to avoid a problem with the cursor
- * advancing to the next line if we print a string that is as long as
- * the screen is wide. */
-
- _scrsize(scr_size);
- bar->width = scr_size[0] - 1;
-#endif
-
- bar->out = config->errors;
-}
-
-
-static
-void dump(const char *timebuf, const char *text,
- FILE *stream, const unsigned char *ptr, size_t size,
- trace tracetype, curl_infotype infotype)
-{
- size_t i;
- size_t c;
-
- unsigned int width=0x10;
-
- if(tracetype == TRACE_ASCII)
- /* without the hex output, we can fit more on screen */
- width = 0x40;
-
- fprintf(stream, "%s%s, %zd bytes (0x%zx)\n", timebuf, text, size, size);
-
- for(i=0; i<size; i+= width) {
-
- fprintf(stream, "%04zx: ", i);
-
- if(tracetype == TRACE_BIN) {
- /* hex not disabled, show it */
- for(c = 0; c < width; c++)
- if(i+c < size)
- fprintf(stream, "%02x ", ptr[i+c]);
- else
- fputs(" ", stream);
- }
-
- for(c = 0; (c < width) && (i+c < size); c++) {
- /* check for 0D0A; if found, skip past and start a new line of output */
- if((tracetype == TRACE_ASCII) &&
- (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
- i+=(c+2-width);
- break;
- }
-#ifdef CURL_DOES_CONVERSIONS
- /* repeat the 0D0A check above but use the host encoding for CRLF */
- if((tracetype == TRACE_ASCII) &&
- (i+c+1 < size) && ptr[i+c]=='\r' && ptr[i+c+1]=='\n') {
- i+=(c+2-width);
- break;
- }
- /* convert to host encoding and print this character */
- fprintf(stream, "%c", convert_char(infotype, ptr[i+c]));
-#else
- (void)infotype;
- fprintf(stream, "%c",
- (ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:UNPRINTABLE_CHAR);
-#endif /* CURL_DOES_CONVERSIONS */
- /* check again for 0D0A, to avoid an extra \n if it's at width */
- if((tracetype == TRACE_ASCII) &&
- (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
- i+=(c+3-width);
- break;
- }
- }
- fputc('\n', stream); /* newline */
- }
- fflush(stream);
-}
-
-static
-int my_trace(CURL *handle, curl_infotype type,
- unsigned char *data, size_t size,
- void *userp)
-{
- struct Configurable *config = (struct Configurable *)userp;
- FILE *output=config->errors;
- const char *text;
- struct timeval tv;
- struct tm *now;
- char timebuf[20];
- time_t secs;
- static time_t epoch_offset;
- static int known_offset;
-
- (void)handle; /* prevent compiler warning */
-
- if(config->tracetime) {
- tv = cutil_tvnow();
- if(!known_offset) {
- epoch_offset = time(NULL) - tv.tv_sec;
- known_offset = 1;
- }
- secs = epoch_offset + tv.tv_sec;
- now = localtime(&secs); /* not thread safe but we don't care */
- snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld ",
- now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
- }
- else
- timebuf[0]=0;
-
- if(!config->trace_stream) {
- /* open for append */
- if(curlx_strequal("-", config->trace_dump))
- config->trace_stream = stdout;
- else if(curlx_strequal("%", config->trace_dump))
- /* Ok, this is somewhat hackish but we do it undocumented for now */
- config->trace_stream = config->errors; /* aka stderr */
- else {
- config->trace_stream = fopen(config->trace_dump, "w");
- config->trace_fopened = TRUE;
- }
- }
-
- if(config->trace_stream)
- output = config->trace_stream;
-
- if(!output) {
- warnf(config, "Failed to create/open output");
- return 0;
- }
-
- if(config->tracetype == TRACE_PLAIN) {
- /*
- * This is the trace look that is similar to what libcurl makes on its
- * own.
- */
- static const char * const s_infotype[] = {
- "*", "<", ">", "{", "}", "{", "}"
- };
- size_t i;
- size_t st=0;
- static bool newl = FALSE;
- static bool traced_data = FALSE;
-
- switch(type) {
- case CURLINFO_HEADER_OUT:
- for(i=0; i<size-1; i++) {
- if(data[i] == '\n') { /* LF */
- if(!newl) {
- fprintf(output, "%s%s ", timebuf, s_infotype[type]);
- }
- (void)fwrite(data+st, i-st+1, 1, output);
- st = i+1;
- newl = FALSE;
- }
- }
- if(!newl)
- fprintf(output, "%s%s ", timebuf, s_infotype[type]);
- (void)fwrite(data+st, i-st+1, 1, output);
- newl = (bool)(size && (data[size-1] != '\n'));
- traced_data = FALSE;
- break;
- case CURLINFO_TEXT:
- case CURLINFO_HEADER_IN:
- if(!newl)
- fprintf(output, "%s%s ", timebuf, s_infotype[type]);
- (void)fwrite(data, size, 1, output);
- newl = (bool)(size && (data[size-1] != '\n'));
- traced_data = FALSE;
- break;
- case CURLINFO_DATA_OUT:
- case CURLINFO_DATA_IN:
- case CURLINFO_SSL_DATA_IN:
- case CURLINFO_SSL_DATA_OUT:
- if(!traced_data) {
- /* if the data is output to a tty and we're sending this debug trace
- to stderr or stdout, we don't display the alert about the data not
- being shown as the data _is_ shown then just not via this
- function */
- if(!config->isatty ||
- ((output != stderr) && (output != stdout))) {
- if(!newl)
- fprintf(output, "%s%s ", timebuf, s_infotype[type]);
- fprintf(output, "[data not shown]\n");
- newl = FALSE;
- traced_data = TRUE;
- }
- }
- break;
- default: /* nada */
- newl = FALSE;
- traced_data = FALSE;
- break;
- }
-
- return 0;
- }
-
-#ifdef CURL_DOES_CONVERSIONS
- /* Special processing is needed for CURLINFO_HEADER_OUT blocks
- * if they contain both headers and data (separated by CRLFCRLF).
- * We dump the header text and then switch type to CURLINFO_DATA_OUT.
- */
- if((type == CURLINFO_HEADER_OUT) && (size > 4)) {
- size_t i;
- for(i = 0; i < size - 4; i++) {
- if(memcmp(&data[i], "\r\n\r\n", 4) == 0) {
- /* dump everthing through the CRLFCRLF as a sent header */
- text = "=> Send header";
- dump(timebuf, text, output, data, i+4, config->tracetype, type);
- data += i + 3;
- size -= i + 4;
- type = CURLINFO_DATA_OUT;
- data += 1;
- break;
- }
- }
- }
-#endif /* CURL_DOES_CONVERSIONS */
-
- switch (type) {
- case CURLINFO_TEXT:
- fprintf(output, "%s== Info: %s", timebuf, 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_HEADER_IN:
- text = "<= Recv header";
- break;
- case CURLINFO_DATA_IN:
- text = "<= Recv data";
- break;
- case CURLINFO_SSL_DATA_IN:
- text = "<= Recv SSL data";
- break;
- case CURLINFO_SSL_DATA_OUT:
- text = "=> Send SSL data";
- break;
- }
-
- dump(timebuf, text, output, data, size, config->tracetype, type);
- return 0;
-}
-
-static void free_config_fields(struct Configurable *config)
-{
- if(config->random_file)
- free(config->random_file);
- if(config->egd_file)
- free(config->egd_file);
- if(config->trace_dump)
- free(config->trace_dump);
- if(config->cipher_list)
- free(config->cipher_list);
- if(config->userpwd)
- free(config->userpwd);
- if(config->postfields)
- free(config->postfields);
- if(config->proxy)
- free(config->proxy);
- if(config->proxyuserpwd)
- free(config->proxyuserpwd);
- if(config->noproxy)
- free(config->noproxy);
- if(config->cookie)
- free(config->cookie);
- if(config->cookiefile)
- free(config->cookiefile);
- if(config->krblevel)
- free(config->krblevel);
- if(config->headerfile)
- free(config->headerfile);
- if(config->ftpport)
- free(config->ftpport);
- if(config->range)
- free(config->range);
- if(config->customrequest)
- free(config->customrequest);
- if(config->writeout)
- free(config->writeout);
- if(config->httppost)
- curl_formfree(config->httppost);
- if(config->cert)
- free(config->cert);
- if(config->cacert)
- free(config->cacert);
- if(config->cert_type)
- free(config->cert_type);
- if(config->capath)
- free(config->capath);
- if(config->crlfile)
- free(config->crlfile);
- if(config->cookiejar)
- free(config->cookiejar);
- if(config->ftp_account)
- free(config->ftp_account);
- if(config->ftp_alternative_to_user)
- free(config->ftp_alternative_to_user);
- if(config->iface)
- free(config->iface);
- if(config->socksproxy)
- free(config->socksproxy);
- if(config->libcurl)
- free(config->libcurl);
- if(config->key_passwd)
- free(config->key_passwd);
- if(config->key)
- free(config->key);
- if(config->key_type)
- free(config->key_type);
- if(config->pubkey)
- free(config->pubkey);
- if(config->referer)
- free(config->referer);
- if(config->hostpubmd5)
- free(config->hostpubmd5);
- if(config->mail_from)
- free(config->mail_from);
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
- if(config->socks5_gssapi_service)
- free(config->socks5_gssapi_service);
-#endif
-
- curl_slist_free_all(config->quote); /* checks for config->quote == NULL */
- curl_slist_free_all(config->prequote);
- curl_slist_free_all(config->postquote);
- curl_slist_free_all(config->headers);
- curl_slist_free_all(config->telnet_options);
- curl_slist_free_all(config->mail_rcpt);
-
- if(config->easy)
- curl_easy_cleanup(config->easy);
-}
-
-#ifdef WIN32
-
-/* Function to find CACert bundle on a Win32 platform using SearchPath.
- * (SearchPath is already declared via inclusions done in setup header file)
- * (Use the ASCII version instead of the unicode one!)
- * The order of the directories it searches is:
- * 1. application's directory
- * 2. current working directory
- * 3. Windows System directory (e.g. C:\windows\system32)
- * 4. Windows Directory (e.g. C:\windows)
- * 5. all directories along %PATH%
- */
-static void FindWin32CACert(struct Configurable *config,
- const char *bundle_file)
-{
- /* only check for cert file if "we" support SSL */
- if(curlinfo->features & CURL_VERSION_SSL) {
- DWORD buflen;
- char *ptr = NULL;
- char *retval = malloc(sizeof (TCHAR) * (MAX_PATH + 1));
- if(!retval)
- return;
- retval[0] = '\0';
- buflen = SearchPathA(NULL, bundle_file, NULL, MAX_PATH+2, retval, &ptr);
- if(buflen > 0) {
- GetStr(&config->cacert, retval);
- }
- free(retval);
- }
-}
-
-#endif
-
-#define RETRY_SLEEP_DEFAULT 1000 /* ms */
-#define RETRY_SLEEP_MAX 600000 /* ms == 10 minutes */
-
-static bool
-output_expected(const char* url, const char* uploadfile)
-{
- if(!uploadfile)
- return TRUE; /* download */
- if(checkprefix("http://", url) || checkprefix("https://", url))
- return TRUE; /* HTTP(S) upload */
-
- return FALSE; /* non-HTTP upload, probably no output should be expected */
-}
-
-#define my_setopt(x,y,z) _my_setopt(x, FALSE, config, #y, y, z)
-#define my_setopt_str(x,y,z) _my_setopt(x, TRUE, config, #y, y, z)
-
-static struct curl_slist *easycode;
-static struct curl_slist *easycode_remarks;
-
-static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
- const char *name, CURLoption tag, ...);
-
-static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
- const char *name, CURLoption tag, ...)
-{
- va_list arg;
- CURLcode ret;
- char *bufp;
- char value[256];
- bool remark=FALSE;
- bool skip=FALSE;
-
- va_start(arg, tag);
-
- if(tag < CURLOPTTYPE_OBJECTPOINT) {
- long lval = va_arg(arg, long);
- snprintf(value, sizeof(value), "%ld", lval);
- ret = curl_easy_setopt(curl, tag, lval);
- if(!lval)
- skip = TRUE;
- }
- else if(tag < CURLOPTTYPE_OFF_T) {
- void *pval = va_arg(arg, void *);
- unsigned char *ptr = (unsigned char *)pval;
-
- /* function pointers are never printable */
- if(tag >= CURLOPTTYPE_FUNCTIONPOINT) {
- if(pval) {
- strcpy(value, "functionpointer"); /* 'value' fits 256 bytes */
- remark = TRUE;
- }
- else
- skip = TRUE;
- }
-
- else if(pval && str)
- snprintf(value, sizeof(value), "\"%s\"", (char *)ptr);
- else if(pval) {
- strcpy(value, "objectpointer"); /* 'value' fits 256 bytes */
- remark = TRUE;
- }
- else
- skip = TRUE;
-
- ret = curl_easy_setopt(curl, tag, pval);
-
- }
- else {
- curl_off_t oval = va_arg(arg, curl_off_t);
- snprintf(value, sizeof(value),
- "(curl_off_t)%" CURL_FORMAT_CURL_OFF_T, oval);
- ret = curl_easy_setopt(curl, tag, oval);
-
- if(!oval)
- skip = TRUE;
- }
-
- if(config->libcurl && !skip) {
- /* we only use this for real if --libcurl was used */
-
- if(remark)
- bufp = curlx_maprintf("%s set to a %s", name, value);
- else
- bufp = curlx_maprintf("curl_easy_setopt(hnd, %s, %s);", name, value);
-
- if(!bufp)
- ret = CURLE_OUT_OF_MEMORY;
- else {
- struct curl_slist *list =
- curl_slist_append(remark?easycode_remarks:easycode, bufp);
-
- if(remark)
- easycode_remarks = list;
- else
- easycode = list;
- }
- if(bufp)
- curl_free(bufp);
- }
- va_end(arg);
-
- return ret;
-}
-
-static const char * const srchead[]={
- "/********* Sample code generated by the curl command line tool **********",
- " * Add error code checking where appropriate!",
- " * Compile this with a suitable header include path. Then link with ",
- " * libcurl.",
- " * If you use any *_LARGE options, make sure your compiler figure",
- " * out the correct size for the curl_off_t variable.",
- " * Read the details for all curl_easy_setopt() options online on:",
- " * http://curlm.haxx.se/libcurl/c/curl_easy_setopt.html",
- " ************************************************************************/",
- "[m]",
- "#include <curl/curl.h>",
- "",
- "int main(int argc, char *argv[])",
- "{",
- " CURLcode ret;",
- NULL
-};
-
-static void dumpeasycode(struct Configurable *config)
-{
- struct curl_slist *ptr;
- char *o = config->libcurl;
-
- if(o) {
- FILE *out;
- bool fopened = FALSE;
- if(strcmp(o, "-")) {
- out = fopen(o, "wt");
- fopened = TRUE;
- }
- else
- out= stdout;
- if(!out)
- warnf(config, "Failed to open %s to write libcurl code!\n", o);
- else {
- int i;
- const char *c;
-
- for(i=0; (c = srchead[i]); i++) {
- if(!memcmp((char *)c, "[m]", 3)) {
-#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS > 32)
- fprintf(out, "#define _FILE_OFFSET_BITS %d "
- "/* for pre libcurl 7.19.0 curl_off_t magic */\n",
- _FILE_OFFSET_BITS);
-#endif
- }
- else
- fprintf(out, "%s\n", c);
- }
-
- ptr = easycode;
- while(ptr) {
- fprintf(out, " %s\n", ptr->data);
- ptr = ptr->next;
- }
-
- ptr = easycode_remarks;
- if(ptr) {
- fprintf(out,
- "\n /* Here is a list of options the curl code"
- " used that cannot get generated\n"
- " as source easily. You may select to either"
- " not use them or implement\n them yourself.\n"
- "\n");
- while(ptr) {
- fprintf(out, " %s\n", ptr->data);
- ptr = ptr->next;
- }
- fprintf(out, "\n */\n");
- }
-
- fprintf(out,
- " return (int)ret;\n"
- "}\n"
- "/**** End of sample code ****/\n");
- if(fopened)
- fclose(out);
- }
- }
- curl_slist_free_all(easycode);
-}
-
-static bool stdin_upload(const char *uploadfile)
-{
- return (bool)(curlx_strequal(uploadfile, "-") ||
- curlx_strequal(uploadfile, "."));
-}
-
-/* Adds the file name to the URL if it doesn't already have one.
- * url will be freed before return if the returned pointer is different
- */
-static char *add_file_name_to_url(CURL *curl, char *url, const char *filename)
-{
- /* If no file name part is given in the URL, we add this file name */
- char *ptr=strstr(url, "://");
- if(ptr)
- ptr+=3;
- else
- ptr=url;
- ptr = strrchr(ptr, '/');
- if(!ptr || !strlen(++ptr)) {
- /* The URL has no file name part, add the local file name. In order
- to be able to do so, we have to create a new URL in another
- buffer.*/
-
- /* We only want the part of the local path that is on the right
- side of the rightmost slash and backslash. */
- const char *filep = strrchr(filename, '/');
- char *file2 = strrchr(filep?filep:filename, '\\');
- char *encfile;
-
- if(file2)
- filep = file2+1;
- else if(filep)
- filep++;
- else
- filep = filename;
-
- /* URL encode the file name */
- encfile = curl_easy_escape(curl, filep, 0 /* use strlen */);
- if(encfile) {
- char *urlbuffer = malloc(strlen(url) + strlen(encfile) + 3);
- if(!urlbuffer) {
- free(url);
- return NULL;
- }
- if(ptr)
- /* there is a trailing slash on the URL */
- sprintf(urlbuffer, "%s%s", url, encfile);
- else
- /* there is no trailing slash on the URL */
- sprintf(urlbuffer, "%s/%s", url, encfile);
-
- curl_free(encfile);
-
- free(url);
- url = urlbuffer; /* use our new URL instead! */
- }
- }
- return url;
-}
-
-/* Extracts the name portion of the URL.
- * Returns a heap-allocated string, or NULL if no name part
- */
-static char *get_url_file_name(const char *url)
-{
- char *fn = NULL;
-
- /* Find and get the remote file name */
- const char * pc =strstr(url, "://");
- if(pc)
- pc+=3;
- else
- pc=url;
- pc = strrchr(pc, '/');
-
- if(pc) {
- /* duplicate the string beyond the slash */
- pc++;
- fn = *pc ? strdup(pc): NULL;
- }
- return fn;
-}
-
-static char*
-parse_filename(char *ptr, size_t len)
-{
- char* copy;
- char* p;
- char* q;
- char quote = 0;
-
- /* simple implementation of strndup() */
- copy = malloc(len+1);
- if(!copy)
- return NULL;
- strncpy(copy, ptr, len);
- copy[len] = 0;
-
- p = copy;
- if(*p == '\'' || *p == '"') {
- /* store the starting quote */
- quote = *p;
- p++;
- }
-
- /* if the filename contains a path, only use filename portion */
- q = strrchr(copy, '/');
- if(q) {
- p=q+1;
- if(!*p) {
- free(copy);
- return NULL;
- }
- }
-
- /* If the filename contains a backslash, only use filename portion. The idea
- is that even systems that don't handle backslashes as path separators
- probably want the path removed for convenience. */
- q = strrchr(p, '\\');
- if (q) {
- p = q+1;
- if (!*p) {
- free(copy);
- return NULL;
- }
- }
-
- if(quote) {
- /* if the file name started with a quote, then scan for the end quote and
- stop there */
- q = strrchr(p, quote);
- if(q)
- *q = 0;
- }
- else
- q = NULL; /* no start quote, so no end has been found */
-
- if(!q) {
- /* make sure the file name doesn't end in \r or \n */
- q = strchr(p, '\r');
- if(q)
- *q = 0;
-
- q = strchr(p, '\n');
- if(q)
- *q = 0;
- }
-
- if(copy!=p)
- memmove(copy, p, strlen(p)+1);
-
- return copy;
-}
-
-static size_t
-header_callback(void *ptr, size_t size, size_t nmemb, void *stream)
-{
- struct OutStruct* outs = (struct OutStruct*)stream;
- const char* str = (char*)ptr;
- const size_t cb = size*nmemb;
- const char* end = (char*)ptr + cb;
- size_t len;
-
- if(cb > 20 && checkprefix("Content-disposition:", str)) {
- char *p = (char*)str + 20;
-
- /* look for the 'filename=' parameter
- (encoded filenames (*=) are not supported) */
- for(;;) {
- char *filename;
- char *semi;
-
- while(*p && (p < end) && !ISALPHA(*p))
- p++;
- if(p > end-9)
- break;
-
- if(memcmp(p, "filename=", 9)) {
- /* no match, find next parameter */
- while((p < end) && (*p != ';'))
- p++;
- continue;
- }
- p+=9;
- semi = strchr(p, ';');
-
- /* this expression below typecasts 'cb' only to avoid
- warning: signed and unsigned type in conditional expression
- */
- len = semi ? (semi - p) : (ssize_t)cb - (p - str);
- filename = parse_filename(p, len);
- if(filename) {
- outs->filename = filename;
- break;
- }
- }
- }
-
- return cb;
-}
-
-static int
-operate(struct Configurable *config, int argc, argv_item_t argv[])
-{
- char errorbuffer[CURL_ERROR_SIZE];
- char useragent[256]; /* buah, we don't want a larger default user agent */
- struct ProgressData progressbar;
- struct getout *urlnode;
- struct getout *nextnode;
-
- struct OutStruct outs;
- struct OutStruct heads;
- struct InStruct input;
-
- URLGlob *urls=NULL;
- URLGlob *inglob=NULL;
- int urlnum;
- int infilenum;
- char *uploadfile=NULL; /* a single file, never a glob */
-
- curl_off_t uploadfilesize; /* -1 means unknown */
- bool stillflags=TRUE;
-
- bool allocuseragent=FALSE;
-
- char *httpgetfields=NULL;
-
- CURL *curl;
- int res = 0;
- int i;
- long retry_sleep_default;
- long retry_sleep;
-
- char *env;
-
- memset(&heads, 0, sizeof(struct OutStruct));
-
-#ifdef CURLDEBUG
- /* this sends all memory debug messages to a logfile named memdump */
- env = curlx_getenv("CURL_MEMDEBUG");
- if(env) {
- /* use the value as file name */
- char *s = strdup(env);
- curl_free(env);
- curl_memdebug(s);
- free(s);
- /* this weird strdup() and stuff here is to make the curl_free() get
- called before the memdebug() as otherwise the memdebug tracing will
- with tracing a free() without an alloc! */
- }
- env = curlx_getenv("CURL_MEMLIMIT");
- if(env) {
- curl_memlimit(atoi(env));
- curl_free(env);
- }
-#endif
-
- /* Initialize curl library - do not call any libcurl functions before.
- Note that the CURLDEBUG magic above is an exception, but then that's not
- part of the official public API.
- */
- if(main_init() != CURLE_OK) {
- helpf(config->errors, "error initializing curl library\n");
- return CURLE_FAILED_INIT;
- }
-
- /*
- * Get a curl handle to use for all forthcoming curl transfers. Cleanup
- * when all transfers are done.
- */
- curl = curl_easy_init();
- if(!curl) {
- clean_getout(config);
- return CURLE_FAILED_INIT;
- }
- config->easy = curl;
-
- memset(&outs,0,sizeof(outs));
-
- config->outs = &outs;
-
- /* we get libcurl info right away */
- curlinfo = curl_version_info(CURLVERSION_NOW);
-
- errorbuffer[0]=0; /* prevent junk from being output */
-
- /* setup proper locale from environment */
-#ifdef HAVE_SETLOCALE
- setlocale(LC_ALL, "");
-#endif
-
- /* inits */
- config->postfieldsize = -1;
- config->showerror=TRUE;
- config->use_httpget=FALSE;
- config->create_dirs=FALSE;
- config->maxredirs = DEFAULT_MAXREDIRS;
- config->proto = CURLPROTO_ALL; /* FIXME: better to read from library */
- config->proto_present = FALSE;
- config->proto_redir =
- CURLPROTO_ALL & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */
- config->proto_redir_present = FALSE;
-
- if(argc>1 &&
- (!curlx_strnequal("--", argv[1], 2) && (argv[1][0] == '-')) &&
- strchr(argv[1], 'q')) {
- /*
- * The first flag, that is not a verbose name, but a shortname
- * and it includes the 'q' flag!
- */
- ;
- }
- else {
- parseconfig(NULL, config); /* ignore possible failure */
- }
-
- if((argc < 2) && !config->url_list) {
- helpf(config->errors, NULL);
- return CURLE_FAILED_INIT;
- }
-
- /* Parse options */
- for(i = 1; i < argc; i++) {
- if(stillflags &&
- ('-' == argv[i][0])) {
- char *nextarg;
- bool passarg;
- char *origopt=argv[i];
-
- char *flag = argv[i];
-
- if(curlx_strequal("--", argv[i]))
- /* this indicates the end of the flags and thus enables the
- following (URL) argument to start with -. */
- stillflags=FALSE;
- else {
- nextarg= (i < argc - 1)? argv[i+1]: NULL;
-
- res = getparameter(flag, nextarg, &passarg, config);
- if(res) {
- int retval = CURLE_OK;
- if(res != PARAM_HELP_REQUESTED) {
- const char *reason = param2text(res);
- helpf(config->errors, "option %s: %s\n", origopt, reason);
- retval = CURLE_FAILED_INIT;
- }
- clean_getout(config);
- return retval;
- }
-
- if(passarg) /* we're supposed to skip this */
- i++;
- }
- }
- else {
- bool used;
- /* just add the URL please */
- res = getparameter((char *)"--url", argv[i], &used, config);
- if(res)
- return res;
- }
- }
-
- retry_sleep_default = config->retry_delay?
- config->retry_delay*1000:RETRY_SLEEP_DEFAULT; /* ms */
- retry_sleep = retry_sleep_default;
-
- if((!config->url_list || !config->url_list->url) && !config->list_engines) {
- clean_getout(config);
- helpf(config->errors, "no URL specified!\n");
- return CURLE_FAILED_INIT;
- }
- if(NULL == config->useragent) {
- /* set non-zero default values: */
- snprintf(useragent, sizeof(useragent),
- CURL_NAME "/" CURL_VERSION " (" OS ") " "%s", curl_version());
- config->useragent= useragent;
- }
- else
- allocuseragent = TRUE;
-
- /* On WIN32 we can't set the path to curl-ca-bundle.crt
- * at compile time. So we look here for the file in two ways:
- * 1: look at the environment variable CURL_CA_BUNDLE for a path
- * 2: if #1 isn't found, use the windows API function SearchPath()
- * to find it along the app's path (includes app's dir and CWD)
- *
- * We support the environment variable thing for non-Windows platforms
- * too. Just for the sake of it.
- */
- if(!config->cacert &&
- !config->capath &&
- !config->insecure_ok) {
- env = curlx_getenv("CURL_CA_BUNDLE");
- if(env)
- GetStr(&config->cacert, env);
- else {
- env = curlx_getenv("SSL_CERT_DIR");
- if(env)
- GetStr(&config->capath, env);
- else {
- env = curlx_getenv("SSL_CERT_FILE");
- if(env)
- GetStr(&config->cacert, env);
- }
- }
-
- if(env)
- curl_free(env);
-#ifdef WIN32
- else
- FindWin32CACert(config, "curl-ca-bundle.crt");
-#endif
- }
-
- if(config->postfields) {
- if(config->use_httpget) {
- /* Use the postfields data for a http get */
- httpgetfields = strdup(config->postfields);
- free(config->postfields);
- config->postfields = NULL;
- if(SetHTTPrequest(config,
- (config->no_body?HTTPREQ_HEAD:HTTPREQ_GET),
- &config->httpreq)) {
- free(httpgetfields);
- return PARAM_BAD_USE;
- }
- }
- else {
- if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq))
- return PARAM_BAD_USE;
- }
- }
-
- /* This is the first entry added to easycode and it initializes the slist */
- easycode = curl_slist_append(easycode, "CURL *hnd = curl_easy_init();");
- if(!easycode) {
- clean_getout(config);
- res = CURLE_OUT_OF_MEMORY;
- goto quit_curl;
- }
-
- if(config->list_engines) {
- struct curl_slist *engines = NULL;
-
- curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
- list_engines(engines);
- curl_slist_free_all(engines);
- res = CURLE_OK;
- goto quit_curl;
- }
-
- /* After this point, we should call curl_easy_cleanup() if we decide to bail
- * out from this function! */
-
- urlnode = config->url_list;
-
- if(config->headerfile) {
- /* open file for output: */
- if(strcmp(config->headerfile,"-")) {
- heads.filename = config->headerfile;
- }
- else
- heads.stream=stdout;
- heads.config = config;
- }
-
- /* loop through the list of given URLs */
- while(urlnode) {
- int up; /* upload file counter within a single upload glob */
- char *dourl;
- char *url;
- char *infiles; /* might be a glob pattern */
- char *outfiles=NULL;
-
- /* get the full URL (it might be NULL) */
- dourl=urlnode->url;
-
- url = dourl;
-
- if(NULL == url) {
- /* This node had no URL, skip it and continue to the next */
- if(urlnode->outfile)
- free(urlnode->outfile);
-
- /* move on to the next URL */
- nextnode=urlnode->next;
- free(urlnode); /* free the node */
- urlnode = nextnode;
- continue; /* next please */
- }
-
- /* default output stream is stdout */
- outs.stream = stdout;
- outs.config = config;
- outs.bytes = 0; /* nothing written yet */
-
- /* save outfile pattern before expansion */
- if(urlnode->outfile) {
- outfiles = strdup(urlnode->outfile);
- if(!outfiles) {
- clean_getout(config);
- break;
- }
- }
-
- infiles = urlnode->infile;
-
- if(!config->globoff && infiles) {
- /* Unless explicitly shut off */
- res = glob_url(&inglob, infiles, &infilenum,
- config->showerror?config->errors:NULL);
- if(res != CURLE_OK) {
- clean_getout(config);
- if(outfiles)
- free(outfiles);
- break;
- }
- }
-
- /* Here's the loop for uploading multiple files within the same
- single globbed string. If no upload, we enter the loop once anyway. */
- for(up = 0;
- (!up && !infiles) ||
- (uploadfile = inglob?
- glob_next_url(inglob):
- (!up?strdup(infiles):NULL));
- up++) {
- int separator = 0;
- long retry_numretries;
- uploadfilesize=-1;
-
- if(!config->globoff) {
- /* Unless explicitly shut off, we expand '{...}' and '[...]'
- expressions and return total number of URLs in pattern set */
- res = glob_url(&urls, dourl, &urlnum,
- config->showerror?config->errors:NULL);
- if(res != CURLE_OK) {
- break;
- }
- }
- else
- urlnum = 1; /* without globbing, this is a single URL */
-
- /* if multiple files extracted to stdout, insert separators! */
- separator= ((!outfiles || curlx_strequal(outfiles, "-")) && urlnum > 1);
-
- /* Here's looping around each globbed URL */
- for(i = 0;
- (url = urls?glob_next_url(urls):(i?NULL:strdup(url)));
- i++) {
- /* NOTE: In the condition expression in the for() statement above, the
- 'url' variable is only ever strdup()ed if(i == 0) and thus never
- when this loops later on. Further down in this function we call
- free(url) and then the code loops. Static code parsers may thus get
- tricked into believing that we have a potential access-after-free
- here. I can however not spot any such case. */
-
- int infd = STDIN_FILENO;
- bool infdopen;
- char *outfile;
- struct timeval retrystart;
- outfile = outfiles?strdup(outfiles):NULL;
-
- if((urlnode->flags&GETOUT_USEREMOTE) ||
- (outfile && !curlx_strequal("-", outfile)) ) {
-
- /*
- * We have specified a file name to store the result in, or we have
- * decided we want to use the remote file name.
- */
-
- if(!outfile) {
- /* extract the file name from the URL */
- outfile = get_url_file_name(url);
- if((!outfile || !*outfile) && !config->content_disposition) {
- helpf(config->errors, "Remote file name has no length!\n");
- res = CURLE_WRITE_ERROR;
- free(url);
- break;
- }
-#if defined(MSDOS) || defined(WIN32)
- /* For DOS and WIN32, we do some major replacing of
- bad characters in the file name before using it */
- outfile = sanitize_dos_name(outfile);
- if(!outfile) {
- res = CURLE_OUT_OF_MEMORY;
- break;
- }
-#endif /* MSDOS || WIN32 */
- }
- else if(urls) {
- /* fill '#1' ... '#9' terms from URL pattern */
- char *storefile = outfile;
- outfile = glob_match_url(storefile, urls);
- free(storefile);
- if(!outfile) {
- /* bad globbing */
- warnf(config, "bad output glob!\n");
- free(url);
- res = CURLE_FAILED_INIT;
- break;
- }
- }
-
- /* Create the directory hierarchy, if not pre-existant to a multiple
- file output call */
-
- if(config->create_dirs &&
- (-1 == create_dir_hierarchy(outfile, config->errors))) {
- free(url);
- res = CURLE_WRITE_ERROR;
- break;
- }
-
- if(config->resume_from_current) {
- /* We're told to continue from where we are now. Get the
- size of the file as it is now and open it for append instead */
-
- struct_stat fileinfo;
-
- /* VMS -- Danger, the filesize is only valid for stream files */
- if(0 == stat(outfile, &fileinfo))
- /* set offset to current file size: */
- config->resume_from = fileinfo.st_size;
- else
- /* let offset be 0 */
- config->resume_from = 0;
- }
-
- outs.filename = outfile;
-
- if(config->resume_from) {
- outs.init = config->resume_from;
- /* open file for output: */
- outs.stream=(FILE *) fopen(outfile, config->resume_from?"ab":"wb");
- if(!outs.stream) {
- helpf(config->errors, "Can't open '%s'!\n", outfile);
- free(url);
- res = CURLE_WRITE_ERROR;
- break;
- }
- }
- else {
- outs.stream = NULL; /* open when needed */
- outs.bytes = 0; /* reset byte counter */
- }
- }
- infdopen=FALSE;
- if(uploadfile && !stdin_upload(uploadfile)) {
- /*
- * We have specified a file to upload and it isn't "-".
- */
- struct_stat fileinfo;
-
- url = add_file_name_to_url(curl, url, uploadfile);
- if(!url) {
- helpf(config->errors, "out of memory\n");
- res = CURLE_OUT_OF_MEMORY;
- break;
- }
- /* VMS Note:
- *
- * Reading binary from files can be a problem... Only FIXED, VAR
- * etc WITHOUT implied CC will work Others need a \n appended to a
- * line
- *
- * - Stat gives a size but this is UNRELIABLE in VMS As a f.e. a
- * fixed file with implied CC needs to have a byte added for every
- * record processed, this can by derived from Filesize & recordsize
- * for VARiable record files the records need to be counted! for
- * every record add 1 for linefeed and subtract 2 for the record
- * header for VARIABLE header files only the bare record data needs
- * to be considered with one appended if implied CC
- */
-
- infd= open(uploadfile, O_RDONLY | O_BINARY);
- if((infd == -1) || fstat(infd, &fileinfo)) {
- helpf(config->errors, "Can't open '%s'!\n", uploadfile);
- if(infd != -1)
- close(infd);
-
- /* Free the list of remaining URLs and globbed upload files
- * to force curl to exit immediately
- */
- if(urls) {
- glob_cleanup(urls);
- urls = NULL;
- }
- if(inglob) {
- glob_cleanup(inglob);
- inglob = NULL;
- }
-
- res = CURLE_READ_ERROR;
- goto quit_urls;
- }
- infdopen=TRUE;
-
- /* we ignore file size for char/block devices, sockets, etc. */
- if(S_ISREG(fileinfo.st_mode))
- uploadfilesize=fileinfo.st_size;
-
- }
- else if(uploadfile && stdin_upload(uploadfile)) {
- /* count to see if there are more than one auth bit set
- in the authtype field */
- int authbits = 0;
- int bitcheck = 0;
- while(bitcheck < 32) {
- if(config->authtype & (1 << bitcheck++)) {
- authbits++;
- if(authbits > 1) {
- /* more than one, we're done! */
- break;
- }
- }
- }
-
- /*
- * If the user has also selected --anyauth or --proxy-anyauth
- * we should warn him/her.
- */
- if(config->proxyanyauth || (authbits>1)) {
- warnf(config,
- "Using --anyauth or --proxy-anyauth with upload from stdin"
- " involves a big risk of it not working. Use a temporary"
- " file or a fixed auth type instead!\n");
- }
-
- SET_BINMODE(stdin);
- infd = STDIN_FILENO;
- if(curlx_strequal(uploadfile, ".")) {
- if(curlx_nonblock((curl_socket_t)infd, TRUE) < 0)
- warnf(config,
- "fcntl failed on fd=%d: %s\n", infd, strerror(errno));
- }
- }
-
- if(uploadfile && config->resume_from_current)
- config->resume_from = -1; /* -1 will then force get-it-yourself */
-
- if(output_expected(url, uploadfile)
- && outs.stream && isatty(fileno(outs.stream)))
- /* we send the output to a tty, therefore we switch off the progress
- meter */
- config->noprogress = config->isatty = TRUE;
-
- if(urlnum > 1 && !(config->mute)) {
- fprintf(config->errors, "\n[%d/%d]: %s --> %s\n",
- i+1, urlnum, url, outfile ? outfile : "<stdout>");
- if(separator)
- printf("%s%s\n", CURLseparator, url);
- }
- if(httpgetfields) {
- char *urlbuffer;
- /* Find out whether the url contains a file name */
- const char *pc =strstr(url, "://");
- char sep='?';
- if(pc)
- pc+=3;
- else
- pc=url;
-
- pc = strrchr(pc, '/'); /* check for a slash */
-
- if(pc) {
- /* there is a slash present in the URL */
-
- if(strchr(pc, '?'))
- /* Ouch, there's already a question mark in the URL string, we
- then append the data with an ampersand separator instead! */
- sep='&';
- }
- /*
- * Then append ? followed by the get fields to the url.
- */
- urlbuffer = malloc(strlen(url) + strlen(httpgetfields) + 3);
- if(!urlbuffer) {
- helpf(config->errors, "out of memory\n");
-
- /* Free the list of remaining URLs and globbed upload files
- * to force curl to exit immediately
- */
- if(urls) {
- glob_cleanup(urls);
- urls = NULL;
- }
- if(inglob) {
- glob_cleanup(inglob);
- inglob = NULL;
- }
-
- res = CURLE_OUT_OF_MEMORY;
- goto quit_urls;
- }
- if(pc)
- sprintf(urlbuffer, "%s%c%s", url, sep, httpgetfields);
- else
- /* Append / before the ? to create a well-formed url
- if the url contains a hostname only
- */
- sprintf(urlbuffer, "%s/?%s", url, httpgetfields);
-
- free(url); /* free previous URL */
- url = urlbuffer; /* use our new URL instead! */
- }
-
- if(!config->errors)
- config->errors = stderr;
-
- if((!outfile || !strcmp(outfile, "-")) && !config->use_ascii) {
- /* We get the output to stdout and we have not got the ASCII/text
- flag, then set stdout to be binary */
- SET_BINMODE(stdout);
- }
-
- if(1 == config->tcp_nodelay)
- my_setopt(curl, CURLOPT_TCP_NODELAY, 1);
-
- /* where to store */
- my_setopt(curl, CURLOPT_WRITEDATA, &outs);
- /* what call to write */
- my_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
-
- /* for uploads */
- input.fd = infd;
- input.config = config;
- my_setopt(curl, CURLOPT_READDATA, &input);
- /* what call to read */
- if((outfile && !curlx_strequal("-", outfile)) ||
- !checkprefix("telnet:", url))
- my_setopt(curl, CURLOPT_READFUNCTION, my_fread);
-
- /* in 7.18.0, the CURLOPT_SEEKFUNCTION/DATA pair is taking over what
- CURLOPT_IOCTLFUNCTION/DATA pair previously provided for seeking */
- my_setopt(curl, CURLOPT_SEEKDATA, &input);
- my_setopt(curl, CURLOPT_SEEKFUNCTION, my_seek);
-
- if(config->recvpersecond)
- /* tell libcurl to use a smaller sized buffer as it allows us to
- make better sleeps! 7.9.9 stuff! */
- my_setopt(curl, CURLOPT_BUFFERSIZE, config->recvpersecond);
-
- /* size of uploaded file: */
- if(uploadfilesize != -1)
- my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
- my_setopt_str(curl, CURLOPT_URL, url); /* what to fetch */
- my_setopt_str(curl, CURLOPT_PROXY, config->proxy); /* proxy to use */
- if(config->proxy)
- my_setopt(curl, CURLOPT_PROXYTYPE, config->proxyver);
- my_setopt(curl, CURLOPT_NOPROGRESS, config->noprogress);
- if(config->no_body) {
- my_setopt(curl, CURLOPT_NOBODY, 1);
- my_setopt(curl, CURLOPT_HEADER, 1);
- }
- else
- my_setopt(curl, CURLOPT_HEADER, config->include_headers);
-
- my_setopt(curl, CURLOPT_FAILONERROR, config->failonerror);
- my_setopt(curl, CURLOPT_UPLOAD, uploadfile?TRUE:FALSE);
- my_setopt(curl, CURLOPT_DIRLISTONLY, config->dirlistonly);
- my_setopt(curl, CURLOPT_APPEND, config->ftp_append);
-
- if(config->netrc_opt)
- my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
- else if(config->netrc)
- my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_REQUIRED);
- else
- my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_IGNORED);
-
- my_setopt(curl, CURLOPT_FOLLOWLOCATION, config->followlocation);
- my_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, config->unrestricted_auth);
- my_setopt(curl, CURLOPT_TRANSFERTEXT, config->use_ascii);
- my_setopt_str(curl, CURLOPT_USERPWD, config->userpwd);
- my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd);
- my_setopt(curl, CURLOPT_NOPROXY, config->noproxy);
- my_setopt_str(curl, CURLOPT_RANGE, config->range);
- my_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
- my_setopt(curl, CURLOPT_TIMEOUT, config->timeout);
-
- switch(config->httpreq) {
- case HTTPREQ_SIMPLEPOST:
- my_setopt_str(curl, CURLOPT_POSTFIELDS, config->postfields);
- my_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, config->postfieldsize);
- break;
- case HTTPREQ_POST:
- my_setopt(curl, CURLOPT_HTTPPOST, config->httppost);
- break;
- default:
- break;
- }
- my_setopt_str(curl, CURLOPT_REFERER, config->referer);
- my_setopt(curl, CURLOPT_AUTOREFERER, config->autoreferer);
- my_setopt_str(curl, CURLOPT_USERAGENT, config->useragent);
- my_setopt_str(curl, CURLOPT_FTPPORT, config->ftpport);
- my_setopt(curl, CURLOPT_LOW_SPEED_LIMIT,
- config->low_speed_limit);
- my_setopt(curl, CURLOPT_LOW_SPEED_TIME, config->low_speed_time);
- my_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE,
- config->sendpersecond);
- my_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE,
- config->recvpersecond);
- my_setopt(curl, CURLOPT_RESUME_FROM_LARGE,
- config->use_resume?config->resume_from:0);
- my_setopt_str(curl, CURLOPT_COOKIE, config->cookie);
- my_setopt(curl, CURLOPT_HTTPHEADER, config->headers);
- my_setopt(curl, CURLOPT_SSLCERT, config->cert);
- my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type);
- my_setopt(curl, CURLOPT_SSLKEY, config->key);
- my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type);
- my_setopt_str(curl, CURLOPT_KEYPASSWD, config->key_passwd);
-
- /* SSH private key uses the same command-line option as SSL private
- key */
- my_setopt_str(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key);
- my_setopt_str(curl, CURLOPT_SSH_PUBLIC_KEYFILE, config->pubkey);
-
- /* SSH host key md5 checking allows us to fail if we are
- * not talking to who we think we should
- */
- my_setopt_str(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
- config->hostpubmd5);
-
- /* default to strict verifyhost */
- /* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2); */
- if(config->cacert || config->capath) {
- if(config->cacert)
- my_setopt_str(curl, CURLOPT_CAINFO, config->cacert);
-
- if(config->capath)
- my_setopt_str(curl, CURLOPT_CAPATH, config->capath);
- my_setopt(curl, CURLOPT_SSL_VERIFYPEER, TRUE);
- }
- if(config->crlfile)
- my_setopt_str(curl, CURLOPT_CRLFILE, config->crlfile);
- if(config->insecure_ok) {
- /* new stuff needed for libcurl 7.10 */
- my_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
- my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
- }
- else {
- char *home = homedir();
- char *file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR);
- if(home)
- free(home);
-
- if(file) {
- my_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
- curl_free(file);
- }
- else {
- /* Free the list of remaining URLs and globbed upload files
- * to force curl to exit immediately
- */
- if(urls) {
- glob_cleanup(urls);
- urls = NULL;
- }
- if(inglob) {
- glob_cleanup(inglob);
- inglob = NULL;
- }
-
- res = CURLE_OUT_OF_MEMORY;
- goto quit_urls;
- }
- }
-
- if(config->no_body || config->remote_time) {
- /* no body or use remote time */
- my_setopt(curl, CURLOPT_FILETIME, TRUE);
- }
-
- my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs);
- my_setopt(curl, CURLOPT_CRLF, config->crlf);
- my_setopt(curl, CURLOPT_QUOTE, config->quote);
- my_setopt(curl, CURLOPT_POSTQUOTE, config->postquote);
- my_setopt(curl, CURLOPT_PREQUOTE, config->prequote);
- my_setopt(curl, CURLOPT_HEADERDATA,
- config->headerfile?&heads:NULL);
- my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
- /* cookie jar was added in 7.9 */
- if(config->cookiejar)
- my_setopt_str(curl, CURLOPT_COOKIEJAR, config->cookiejar);
- /* cookie session added in 7.9.7 */
- my_setopt(curl, CURLOPT_COOKIESESSION, config->cookiesession);
-
- my_setopt(curl, CURLOPT_SSLVERSION, config->ssl_version);
- my_setopt(curl, CURLOPT_TIMECONDITION, config->timecond);
- my_setopt(curl, CURLOPT_TIMEVALUE, config->condtime);
- my_setopt_str(curl, CURLOPT_CUSTOMREQUEST, config->customrequest);
- my_setopt(curl, CURLOPT_STDERR, config->errors);
-
- /* three new ones in libcurl 7.3: */
- my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel);
- my_setopt_str(curl, CURLOPT_INTERFACE, config->iface);
- my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel);
-
- progressbarinit(&progressbar, config);
- if((config->progressmode == CURL_PROGRESS_BAR) &&
- !config->noprogress && !config->mute) {
- /* we want the alternative style, then we have to implement it
- ourselves! */
- my_setopt(curl, CURLOPT_PROGRESSFUNCTION, myprogress);
- my_setopt(curl, CURLOPT_PROGRESSDATA, &progressbar);
- }
-
- /* new in libcurl 7.6.2: */
- my_setopt(curl, CURLOPT_TELNETOPTIONS, config->telnet_options);
-
- /* new in libcurl 7.7: */
- my_setopt_str(curl, CURLOPT_RANDOM_FILE, config->random_file);
- my_setopt(curl, CURLOPT_EGDSOCKET, config->egd_file);
- my_setopt(curl, CURLOPT_CONNECTTIMEOUT, config->connecttimeout);
-
- if(config->cipher_list)
- my_setopt_str(curl, CURLOPT_SSL_CIPHER_LIST, config->cipher_list);
-
- if(config->httpversion)
- my_setopt(curl, CURLOPT_HTTP_VERSION, config->httpversion);
-
- /* new in libcurl 7.9.2: */
- if(config->disable_epsv)
- /* disable it */
- my_setopt(curl, CURLOPT_FTP_USE_EPSV, FALSE);
-
- /* new in libcurl 7.10.5 */
- if(config->disable_eprt)
- /* disable it */
- my_setopt(curl, CURLOPT_FTP_USE_EPRT, FALSE);
-
- /* new in libcurl 7.10.6 (default is Basic) */
- if(config->authtype)
- my_setopt(curl, CURLOPT_HTTPAUTH, config->authtype);
-
- if(config->tracetype != TRACE_NONE) {
- my_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
- my_setopt(curl, CURLOPT_DEBUGDATA, config);
- my_setopt(curl, CURLOPT_VERBOSE, TRUE);
- }
-
- res = CURLE_OK;
-
- /* new in curl ?? */
- if(config->engine) {
- res = my_setopt_str(curl, CURLOPT_SSLENGINE, config->engine);
- my_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1);
- }
-
- if(res != CURLE_OK)
- goto show_error;
-
- /* new in curl 7.10 */
- my_setopt_str(curl, CURLOPT_ENCODING,
- (config->encoding) ? "" : NULL);
-
- /* new in curl 7.10.7, extended in 7.19.4 but this only sets 0 or 1 */
- my_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
- config->ftp_create_dirs);
- if(config->proxyanyauth)
- my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
- else if(config->proxynegotiate)
- my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_GSSNEGOTIATE);
- else if(config->proxyntlm)
- my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
- else if(config->proxydigest)
- my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_DIGEST);
- else if(config->proxybasic)
- my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
-
- /* new in curl 7.10.8 */
- if(config->max_filesize)
- my_setopt(curl, CURLOPT_MAXFILESIZE_LARGE,
- config->max_filesize);
-
- if(4 == config->ip_version)
- my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
- else if(6 == config->ip_version)
- my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
- else
- my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER);
-
- /* new in curl 7.15.5 */
- if(config->ftp_ssl_reqd)
- my_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
-
- /* new in curl 7.11.0 */
- else if(config->ftp_ssl)
- my_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
-
- /* new in curl 7.16.0 */
- else if(config->ftp_ssl_control)
- my_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
-
- /* new in curl 7.16.1 */
- if(config->ftp_ssl_ccc)
- my_setopt(curl, CURLOPT_FTP_SSL_CCC, config->ftp_ssl_ccc_mode);
-
- /* new in curl 7.11.1, modified in 7.15.2 */
- if(config->socksproxy) {
- my_setopt_str(curl, CURLOPT_PROXY, config->socksproxy);
- my_setopt(curl, CURLOPT_PROXYTYPE, config->socksver);
- }
-
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
- /* new in curl 7.19.4 */
- if(config->socks5_gssapi_service)
- my_setopt_str(curl, CURLOPT_SOCKS5_GSSAPI_SERVICE,
- config->socks5_gssapi_service);
-
- /* new in curl 7.19.4 */
- if(config->socks5_gssapi_nec)
- my_setopt_str(curl, CURLOPT_SOCKS5_GSSAPI_NEC,
- config->socks5_gssapi_nec);
-#endif
- /* curl 7.13.0 */
- my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account);
-
- my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl);
-
- /* curl 7.14.2 */
- my_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, config->ftp_skip_ip);
-
- /* curl 7.15.1 */
- my_setopt(curl, CURLOPT_FTP_FILEMETHOD, config->ftp_filemethod);
-
- /* curl 7.15.2 */
- if(config->localport) {
- my_setopt(curl, CURLOPT_LOCALPORT, config->localport);
- my_setopt_str(curl, CURLOPT_LOCALPORTRANGE,
- config->localportrange);
- }
-
- /* curl 7.15.5 */
- my_setopt_str(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER,
- config->ftp_alternative_to_user);
-
- /* curl 7.16.0 */
- if(config->disable_sessionid)
- my_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE,
- !config->disable_sessionid);
-
- /* curl 7.16.2 */
- if(config->raw) {
- my_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, FALSE);
- my_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, FALSE);
- }
-
- /* curl 7.17.1 */
- if(!config->nokeepalive) {
- my_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockoptcallback);
- my_setopt(curl, CURLOPT_SOCKOPTDATA, config);
- }
-
- /* curl 7.19.1 (the 301 version existed in 7.18.2) */
- my_setopt(curl, CURLOPT_POSTREDIR, config->post301 |
- (config->post302 ? CURL_REDIR_POST_302 : FALSE));
-
- /* curl 7.20.0 */
- if(config->tftp_blksize)
- my_setopt(curl, CURLOPT_TFTP_BLKSIZE, config->tftp_blksize);
-
- if(config->mail_from)
- my_setopt_str(curl, CURLOPT_MAIL_FROM, config->mail_from);
-
- if(config->mail_rcpt)
- my_setopt(curl, CURLOPT_MAIL_RCPT, config->mail_rcpt);
-
- /* curl 7.20.x */
- if(config->ftp_pret)
- my_setopt(curl, CURLOPT_FTP_USE_PRET, TRUE);
-
- if(config->proto_present)
- my_setopt(curl, CURLOPT_PROTOCOLS, config->proto);
- if(config->proto_redir_present)
- my_setopt(curl, CURLOPT_REDIR_PROTOCOLS, config->proto_redir);
-
- if((urlnode->flags & GETOUT_USEREMOTE)
- && config->content_disposition) {
- my_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
- my_setopt(curl, CURLOPT_HEADERDATA, &outs);
- }
-
- retry_numretries = config->req_retry;
-
- retrystart = cutil_tvnow();
-
- for(;;) {
- res = curl_easy_perform(curl);
- if(!curl_slist_append(easycode, "ret = curl_easy_perform(hnd);")) {
- res = CURLE_OUT_OF_MEMORY;
- break;
- }
-
- if(config->content_disposition && outs.stream && !config->mute &&
- outs.filename)
- printf("curl: Saved to filename '%s'\n", outs.filename);
-
- /* if retry-max-time is non-zero, make sure we haven't exceeded the
- time */
- if(retry_numretries &&
- (!config->retry_maxtime ||
- (cutil_tvdiff(cutil_tvnow(), retrystart)<
- config->retry_maxtime*1000)) ) {
- enum {
- RETRY_NO,
- RETRY_TIMEOUT,
- RETRY_HTTP,
- RETRY_FTP,
- RETRY_LAST /* not used */
- } retry = RETRY_NO;
- long response;
- if(CURLE_OPERATION_TIMEDOUT == res)
- /* retry timeout always */
- retry = RETRY_TIMEOUT;
- else if((CURLE_OK == res) ||
- (config->failonerror &&
- (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. */
- char *this_url=NULL;
- curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &this_url);
- if(this_url &&
- checkprefix("http", this_url)) {
- /* This was HTTP(S) */
- curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
-
- switch(response) {
- case 500: /* Internal Server Error */
- case 502: /* Bad Gateway */
- case 503: /* Service Unavailable */
- case 504: /* Gateway Timeout */
- retry = RETRY_HTTP;
- /*
- * At this point, we have already written data to the output
- * file (or terminal). If we write to a file, we must rewind
- * or close/re-open the file so that the next attempt starts
- * over from the beginning.
- *
- * TODO: similar action for the upload case. We might need
- * to start over reading from a previous point if we have
- * uploaded something when this was returned.
- */
- break;
- }
- }
- } /* if CURLE_OK */
- else if(res) {
- curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
-
- if(response/100 == 4)
- /*
- * This is typically when the FTP server only allows a certain
- * amount of users and we are not one of them. All 4xx codes
- * are transient.
- */
- retry = RETRY_FTP;
- }
-
- if(retry) {
- static const char * const m[]={
- NULL, "timeout", "HTTP error", "FTP error"
- };
- warnf(config, "Transient problem: %s "
- "Will retry in %ld seconds. "
- "%ld retries left.\n",
- m[retry], retry_sleep/1000, retry_numretries);
-
- go_sleep(retry_sleep);
- retry_numretries--;
- if(!config->retry_delay) {
- retry_sleep *= 2;
- if(retry_sleep > RETRY_SLEEP_MAX)
- retry_sleep = RETRY_SLEEP_MAX;
- }
- if(outs.bytes && outs.filename) {
- /* We have written data to a output file, we truncate file
- */
- if(!config->mute)
- fprintf(config->errors, "Throwing away %"
- CURL_FORMAT_CURL_OFF_T " bytes\n",
- outs.bytes);
- fflush(outs.stream);
- /* truncate file at the position where we started appending */
-#ifdef HAVE_FTRUNCATE
- if(ftruncate( fileno(outs.stream), outs.init)) {
- /* when truncate fails, we can't just append as then we'll
- create something strange, bail out */
- if(!config->mute)
- fprintf(config->errors,
- "failed to truncate, exiting\n");
- break;
- }
- /* now seek to the end of the file, the position where we
- just truncated the file in a large file-safe way */
- fseek(outs.stream, 0, SEEK_END);
-#else
- /* ftruncate is not available, so just reposition the file
- to the location we would have truncated it. This won't
- work properly with large files on 32-bit systems, but
- most of those will have ftruncate. */
- fseek(outs.stream, (long)outs.init, SEEK_SET);
-#endif
- outs.bytes = 0; /* clear for next round */
- }
- continue;
- }
- } /* if retry_numretries */
-
- /* In all ordinary cases, just break out of loop here */
- retry_sleep = retry_sleep_default;
- break;
-
- }
-
- if((config->progressmode == CURL_PROGRESS_BAR) &&
- progressbar.calls)
- /* if the custom progress bar has been displayed, we output a
- newline here */
- fputs("\n", progressbar.out);
-
- if(config->writeout)
- ourWriteOut(curl, config->writeout);
-#ifdef USE_ENVIRONMENT
- if(config->writeenv)
- ourWriteEnv(curl);
-#endif
-
- show_error:
-
-#ifdef __VMS
- if(is_vms_shell()) {
- /* VMS DCL shell behavior */
- if(!config->showerror) {
- vms_show = VMSSTS_HIDE;
- }
- }
- else
-#endif
- {
- if((res!=CURLE_OK) && config->showerror) {
- fprintf(config->errors, "curl: (%d) %s\n", res,
- errorbuffer[0]? errorbuffer:
- curl_easy_strerror((CURLcode)res));
- if(CURLE_SSL_CACERT == res) {
-#define CURL_CA_CERT_ERRORMSG1 \
- "More details here: http://curl.haxx.se/docs/sslcerts.html\n\n" \
- "curl performs SSL certificate verification by default, using a \"bundle\"\n" \
- " of Certificate Authority (CA) public keys (CA certs). If the default\n" \
- " bundle file isn't adequate, you can specify an alternate file\n" \
- " using the --cacert option.\n"
-
-#define CURL_CA_CERT_ERRORMSG2 \
- "If this HTTPS server uses a certificate signed by a CA represented in\n" \
- " the bundle, the certificate verification probably failed due to a\n" \
- " problem with the certificate (it might be expired, or the name might\n" \
- " not match the domain name in the URL).\n" \
- "If you'd like to turn off curl's verification of the certificate, use\n" \
- " the -k (or --insecure) option.\n"
-
- fprintf(config->errors, "%s%s",
- CURL_CA_CERT_ERRORMSG1,
- CURL_CA_CERT_ERRORMSG2 );
- }
- }
- }
-
- if(outfile && !curlx_strequal(outfile, "-") && outs.stream) {
- int rc = fclose(outs.stream);
- if(!res && rc) {
- /* something went wrong in the writing process */
- res = CURLE_WRITE_ERROR;
- fprintf(config->errors, "(%d) Failed writing body\n", res);
- }
- }
-
-#ifdef HAVE_UTIME
- /* Important that we set the time _after_ the file has been
- closed, as is done above here */
- if(config->remote_time && outs.filename) {
- /* ask libcurl if we got a time. Pretty please */
- long filetime;
- curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
- if(filetime >= 0) {
- struct utimbuf times;
- times.actime = (time_t)filetime;
- times.modtime = (time_t)filetime;
- utime(outs.filename, &times); /* set the time we got */
- }
- }
-#endif
-#ifdef __AMIGA__
- /* Set the url as comment for the file. (up to 80 chars are allowed)
- */
- if( strlen(url) > 78 )
- url[79] = '\0';
-
- SetComment( outs.filename, url);
-#endif
-
- quit_urls:
- if(url)
- free(url);
-
- if(outfile)
- free(outfile);
-
- if(infdopen)
- close(infd);
-
- } /* loop to the next URL */
-
- if(urls) {
- /* cleanup memory used for URL globbing patterns */
- glob_cleanup(urls);
- urls = NULL;
- }
-
- if(uploadfile)
- free(uploadfile);
-
- } /* loop to the next globbed upload file */
-
- if(inglob) {
- glob_cleanup(inglob);
- inglob = NULL;
- }
-
- if(outfiles)
- free(outfiles);
-
- /* empty this urlnode struct */
- if(urlnode->url)
- free(urlnode->url);
- if(urlnode->outfile)
- free(urlnode->outfile);
- if(urlnode->infile)
- free(urlnode->infile);
-
- /* move on to the next URL */
- nextnode=urlnode->next;
- free(urlnode); /* free the node */
- urlnode = nextnode;
-
- } /* while-loop through all URLs */
-
- quit_curl:
- if(httpgetfields)
- free(httpgetfields);
-
- if(config->engine)
- free(config->engine);
-
- /* cleanup the curl handle! */
- curl_easy_cleanup(curl);
- config->easy = NULL; /* cleanup now */
- if(easycode)
- curl_slist_append(easycode, "curl_easy_cleanup(hnd);");
-
- if(heads.stream && (heads.stream != stdout))
- fclose(heads.stream);
-
- if(allocuseragent)
- free(config->useragent);
-
- if(config->trace_fopened && config->trace_stream)
- fclose(config->trace_stream);
-
- /* Dump the libcurl code if previously enabled.
- NOTE: that this function relies on config->errors amongst other things
- so not everything can be closed and cleaned before this is called */
- dumpeasycode(config);
-
- if(config->errors_fopened)
- fclose(config->errors);
-
- main_free(); /* cleanup */
-
- return res;
-}
-
-/* Ensure that file descriptors 0, 1 and 2 (stdin, stdout, stderr) are
- open before starting to run. Otherwise, the first three network
- sockets opened by curl could be used for input sources, downloaded data
- or error logs as they will effectively be stdin, stdout and/or stderr.
-*/
-static void checkfds(void)
-{
-#ifdef HAVE_PIPE
- int fd[2] = { STDIN_FILENO, STDIN_FILENO };
- while( fd[0] == STDIN_FILENO ||
- fd[0] == STDOUT_FILENO ||
- fd[0] == STDERR_FILENO ||
- fd[1] == STDIN_FILENO ||
- fd[1] == STDOUT_FILENO ||
- fd[1] == STDERR_FILENO )
- if(pipe(fd) < 0)
- return; /* Out of handles. This isn't really a big problem now, but
- will be when we try to create a socket later. */
- close(fd[0]);
- close(fd[1]);
-#endif
-}
-
-
-
-int main(int argc, char *argv[])
-{
- int res;
- struct Configurable config;
-
- memset(&config, 0, sizeof(struct Configurable));
-
- config.errors = stderr; /* default errors to stderr */
-
- checkfds();
-
- res = operate(&config, argc, argv);
-#ifdef __SYMBIAN32__
- if(config.showerror)
- pressanykey();
-#endif
- free_config_fields(&config);
-
-#ifdef __NOVELL_LIBC__
- if(getenv("_IN_NETWARE_BASH_") == NULL)
- pressanykey();
-#endif
-#ifdef __VMS
- vms_special_exit(res, vms_show);
-#else
- return res;
-#endif
-}
-
-/*
- * Reads a line from the given file, ensuring is NUL terminated.
- * The pointer must be freed by the caller.
- * NULL is returned on an out of memory condition.
- */
-static char *my_get_line(FILE *fp)
-{
- char buf[4096];
- char *nl = NULL;
- char *retval = NULL;
-
- do {
- if(NULL == fgets(buf, sizeof(buf), fp))
- break;
- if(NULL == retval) {
- retval = strdup(buf);
- if(!retval)
- return NULL;
- }
- else {
- char *ptr;
- ptr = realloc(retval, strlen(retval) + strlen(buf) + 1);
- if(NULL == ptr) {
- free(retval);
- return NULL;
- }
- retval = ptr;
- strcat(retval, buf);
- }
- }
- while(NULL == (nl = strchr(retval, '\n')));
-
- if(NULL != nl)
- *nl = '\0';
-
- return retval;
-}
-
-static void show_dir_errno(FILE *errors, const char *name)
-{
- switch (ERRNO) {
-#ifdef EACCES
- case EACCES:
- fprintf(errors,"You don't have permission to create %s.\n", name);
- break;
-#endif
-#ifdef ENAMETOOLONG
- case ENAMETOOLONG:
- fprintf(errors,"The directory name %s is too long.\n", name);
- break;
-#endif
-#ifdef EROFS
- case EROFS:
- fprintf(errors,"%s resides on a read-only file system.\n", name);
- break;
-#endif
-#ifdef ENOSPC
- case ENOSPC:
- fprintf(errors,"No space left on the file system that will "
- "contain the directory %s.\n", name);
- break;
-#endif
-#ifdef EDQUOT
- case EDQUOT:
- fprintf(errors,"Cannot create directory %s because you "
- "exceeded your quota.\n", name);
- break;
-#endif
- default :
- fprintf(errors,"Error creating directory %s.\n", name);
- break;
- }
-}
-
-/* Create the needed directory hierarchy recursively in order to save
- multi-GETs in file output, ie:
- curl "http://my.site/dir[1-5]/file[1-5].txt" -o "dir#1/file#2.txt"
- should create all the dir* automagically
-*/
-static int create_dir_hierarchy(const char *outfile, FILE *errors)
-{
- char *tempdir;
- char *tempdir2;
- char *outdup;
- char *dirbuildup;
- int result=0;
-
- outdup = strdup(outfile);
- if(!outdup)
- return -1;
-
- dirbuildup = malloc(sizeof(char) * strlen(outfile));
- if(!dirbuildup) {
- free(outdup);
- return -1;
- }
- dirbuildup[0] = '\0';
-
- tempdir = strtok(outdup, DIR_CHAR);
-
- while(tempdir != NULL) {
- tempdir2 = strtok(NULL, DIR_CHAR);
- /* since strtok returns a token for the last word even
- if not ending with DIR_CHAR, we need to prune it */
- if(tempdir2 != NULL) {
- size_t dlen = strlen(dirbuildup);
- if(dlen)
- sprintf(&dirbuildup[dlen], "%s%s", DIR_CHAR, tempdir);
- else {
- if(0 != strncmp(outdup, DIR_CHAR, 1))
- strcpy(dirbuildup, tempdir);
- else
- sprintf(dirbuildup, "%s%s", DIR_CHAR, tempdir);
- }
- if(access(dirbuildup, F_OK) == -1) {
- result = mkdir(dirbuildup,(mode_t)0000750);
- if(-1 == result) {
- show_dir_errno(errors, dirbuildup);
- break; /* get out of loop */
- }
- }
- }
- tempdir = tempdir2;
- }
- free(dirbuildup);
- free(outdup);
-
- return result; /* 0 is fine, -1 is badness */
-}
-
-#if defined(MSDOS) || defined(WIN32)
-
-#ifndef HAVE_BASENAME
-/* basename() returns a pointer to the last component of a pathname.
- * Ripped from lib/formdata.c.
- */
-static char *Curl_basename(char *path)
-{
- /* Ignore all the details above for now and make a quick and simple
- implementaion here */
- char *s1;
- char *s2;
-
- s1=strrchr(path, '/');
- s2=strrchr(path, '\\');
-
- if(s1 && s2) {
- path = (s1 > s2? s1 : s2)+1;
- }
- else if(s1)
- path = s1 + 1;
- else if(s2)
- path = s2 + 1;
-
- return path;
-}
-#define basename(x) Curl_basename((x))
-#endif /* HAVE_BASENAME */
-
-/* The following functions are taken with modification from the DJGPP
- * port of tar 1.12. They use algorithms originally from DJTAR. */
-
-static const char *
-msdosify (const char *file_name)
-{
- static char dos_name[PATH_MAX];
- static const char illegal_chars_dos[] = ".+, ;=[]" /* illegal in DOS */
- "|<>\\\":?*"; /* illegal in DOS & W95 */
- static const char *illegal_chars_w95 = &illegal_chars_dos[8];
- int idx, dot_idx;
- const char *s = file_name;
- char *d = dos_name;
- const char * const dlimit = dos_name + sizeof(dos_name) - 1;
- const char *illegal_aliens = illegal_chars_dos;
- size_t len = sizeof (illegal_chars_dos) - 1;
-
- /* Support for Windows 9X VFAT systems, when available. */
- if(_use_lfn (file_name)) {
- illegal_aliens = illegal_chars_w95;
- len -= (illegal_chars_w95 - illegal_chars_dos);
- }
-
- /* Get past the drive letter, if any. */
- if(s[0] >= 'A' && s[0] <= 'z' && s[1] == ':') {
- *d++ = *s++;
- *d++ = *s++;
- }
-
- for(idx = 0, dot_idx = -1; *s && d < dlimit; s++, d++) {
- if(memchr (illegal_aliens, *s, len)) {
- /* Dots are special: DOS doesn't allow them as the leading character,
- and a file name cannot have more than a single dot. We leave the
- first non-leading dot alone, unless it comes too close to the
- beginning of the name: we want sh.lex.c to become sh_lex.c, not
- sh.lex-c. */
- if(*s == '.') {
- if(idx == 0 && (s[1] == '/' || (s[1] == '.' && s[2] == '/'))) {
- /* Copy "./" and "../" verbatim. */
- *d++ = *s++;
- if(*s == '.')
- *d++ = *s++;
- *d = *s;
- }
- else if(idx == 0)
- *d = '_';
- else if(dot_idx >= 0) {
- if(dot_idx < 5) { /* 5 is a heuristic ad-hoc'ery */
- d[dot_idx - idx] = '_'; /* replace previous dot */
- *d = '.';
- }
- else
- *d = '-';
- }
- else
- *d = '.';
-
- if(*s == '.')
- dot_idx = idx;
- }
- else if(*s == '+' && s[1] == '+') {
- if(idx - 2 == dot_idx) { /* .c++, .h++ etc. */
- *d++ = 'x';
- *d = 'x';
- }
- else {
- /* libg++ etc. */
- memcpy (d, "plus", 4);
- d += 3;
- }
- s++;
- idx++;
- }
- else
- *d = '_';
- }
- else
- *d = *s;
- if(*s == '/') {
- idx = 0;
- dot_idx = -1;
- }
- else
- idx++;
- }
-
- *d = '\0';
- return dos_name;
-}
-
-static char *
-rename_if_dos_device_name (char *file_name)
-{
- /* We could have a file whose name is a device on MS-DOS. Trying to
- * retrieve such a file would fail at best and wedge us at worst. We need
- * to rename such files. */
- char *base;
- struct_stat st_buf;
- char fname[PATH_MAX];
-
- strncpy(fname, file_name, PATH_MAX-1);
- fname[PATH_MAX-1] = 0;
- base = basename(fname);
- if(((stat(base, &st_buf)) == 0) && (S_ISCHR(st_buf.st_mode))) {
- size_t blen = strlen (base);
-
- if(strlen(fname) >= PATH_MAX-1) {
- /* Make room for the '_' */
- blen--;
- base[blen] = 0;
- }
- /* Prepend a '_'. */
- memmove (base + 1, base, blen + 1);
- base[0] = '_';
- strcpy (file_name, fname);
- }
- return file_name;
-}
-
-/* Replace bad characters in the file name before using it.
- * fn will always be freed before return
- * The returned pointer must be freed by the caller if not NULL
- */
-static char *sanitize_dos_name(char *fn)
-{
- char tmpfn[PATH_MAX];
- if(strlen(fn) >= PATH_MAX)
- fn[PATH_MAX-1]=0; /* truncate it */
- strcpy(tmpfn, msdosify(fn));
- free(fn);
- return strdup(rename_if_dos_device_name(tmpfn));
-}
-#endif /* MSDOS || WIN32 */
diff --git a/src/makefile.amiga b/src/makefile.amiga
index dc984811..25449a6d 100644
--- a/src/makefile.amiga
+++ b/src/makefile.amiga
@@ -14,18 +14,16 @@ MANPAGE = ../docs/curl.1
README = ../docs/MANUAL
MKHELP = ../src/mkhelp.pl
-top_srcdir = ..
-
include Makefile.inc
-OBJS = $(CURL_CFILES:.c=.o) $(CURLX_ONES:.c=.o)
+OBJS = $(CURL_CFILES:.c=.o) $(CURLX_CFILES:.c=.o)
-all: hugehelp.c $(OBJS)
+all: tool_hugehelp.c $(OBJS)
$(CC) $(CFLAGS) -o cURL $(OBJS) $(LIBS) -Wl,-Map,cURL.map,--cref
-hugehelp.c: $(README) $(MANPAGE) mkhelp.pl
- rm -f hugehelp.c
- /bin/nroff -man $(MANPAGE) | /bin/perl $(MKHELP) -c $(README) > hugehelp.c
+tool_hugehelp.c: $(README) $(MANPAGE) mkhelp.pl
+ rm -f tool_hugehelp.c
+ /bin/nroff -man $(MANPAGE) | /bin/perl $(MKHELP) -c $(README) > tool_hugehelp.c
install:
$(INSTALL) -c cURL /c/cURL
diff --git a/src/makefile.dj b/src/makefile.dj
index fc3ae16d..d3428595 100644
--- a/src/makefile.dj
+++ b/src/makefile.dj
@@ -1,12 +1,10 @@
#
-#
# Adapted for djgpp2 / Watt-32 / DOS by
-# Gisle Vanem <giva@bgnett.no>
+# Gisle Vanem <gvanem@broadpark.no>
#
-DEPEND_PREREQ = curl_config.h hugehelp.c
+DEPEND_PREREQ = # tool_hugehelp.c
-top_srcdir = ..
TOPDIR = ..
include ../packages/DOS/common.dj
@@ -38,31 +36,23 @@ CFLAGS += -DUSE_ENVIRONMENT
PROGRAM = curl.exe
OBJECTS += $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
-all: $(OBJ_DIR) curl_config.h $(PROGRAM)
+all: $(OBJ_DIR) $(PROGRAM)
@echo Welcome to cURL
$(PROGRAM): $(OBJECTS) ../lib/libcurl.a
$(CC) -o $@ $^ $(LDFLAGS) $(EX_LIBS)
-curl_config.h:
-ifeq ($(IS_UNIX_SHELL),1)
- @echo '#include "../lib/config.dos"' > $@
-else
- @echo #include "../lib/config.dos" > $@
-endif
-
#
# groff 1.18+ requires "-P -c"
#
-hugehelp.c: ../docs/MANUAL ../docs/curl.1 mkhelp.pl
+tool_hugehelp.c: ../docs/MANUAL ../docs/curl.1 mkhelp.pl
groff -Tascii -man ../docs/curl.1 | \
perl -w mkhelp.pl ../docs/MANUAL > $@
# clean generated files
#
genclean:
- - $(DELETE) curl_config.h
- - $(DELETE) hugehelp.c
+ - $(DELETE) tool_hugehelp.c
# clean object files and subdir
#
diff --git a/src/mkhelp.pl b/src/mkhelp.pl
index 03c884fe..088a09a0 100644
--- a/src/mkhelp.pl
+++ b/src/mkhelp.pl
@@ -1,4 +1,25 @@
#!/usr/local/bin/perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
# Yeah, I know, probably 1000 other persons already wrote a script like
# this, but I'll tell ya:
@@ -33,6 +54,9 @@ while (<STDIN>) {
# this should be removed:
$line =~ s/(.|_)//g;
+ # remove trailing CR from line. msysgit checks out files as line+CRLF
+ $line =~ s/\r$//;
+
if($line =~ /^([ \t]*\n|curl)/i) {
# cut off headers and empty lines
$wline++; # count number of cut off lines
@@ -40,7 +64,7 @@ while (<STDIN>) {
}
my $text = $line;
- $text =~ s/^\s+//g; # cut off preceeding...
+ $text =~ s/^\s+//g; # cut off preceding...
$text =~ s/\s+$//g; # and trailing whitespaces
$tlen = length($text);
@@ -69,7 +93,12 @@ open(READ, "<$README") ||
die "couldn't read the README infile $README";
while(<READ>) {
- push @out, $_;
+ my $line = $_;
+
+ # remove trailing CR from line. msysgit checks out files as line+CRLF
+ $line =~ s/\r$//;
+
+ push @out, $line;
}
close(READ);
@@ -112,16 +141,14 @@ print <<HEAD
* NEVER EVER edit this manually, fix the mkhelp.pl script instead!
* Generation time: $now
*/
-#include "setup.h"
#ifdef USE_MANUAL
-#include "hugehelp.h"
-#include <stdio.h>
+#include "tool_hugehelp.h"
HEAD
;
if($c) {
print <<HEAD
-#include <stdlib.h>
#include <zlib.h>
+#include "memdebug.h" /* keep this as LAST include */
static const unsigned char hugehelpgz[] = {
/* This mumbo-jumbo is the huge help text compressed with gzip.
Thanks to this operation, the size of this data shrunk from $gzip
@@ -146,6 +173,17 @@ HEAD
print <<EOF
#define BUF_SIZE 0x10000
+static voidpf zalloc_func(voidpf opaque, unsigned int items, unsigned int size)
+{
+ (void) opaque;
+ /* not a typo, keep it calloc() */
+ return (voidpf) calloc(items, size);
+}
+static void zfree_func(voidpf opaque, voidpf ptr)
+{
+ (void) opaque;
+ free(ptr);
+}
/* Decompress and send to stdout a gzip-compressed buffer */
void hugehelp(void)
{
@@ -158,11 +196,11 @@ void hugehelp(void)
return;
headerlen = 10;
+ memset(&z, 0, sizeof(z_stream));
+ z.zalloc = (alloc_func)zalloc_func;
+ z.zfree = (free_func)zfree_func;
z.avail_in = (unsigned int)(sizeof(hugehelpgz) - headerlen);
z.next_in = (unsigned char *)hugehelpgz + headerlen;
- z.zalloc = (alloc_func)Z_NULL;
- z.zfree = (free_func)Z_NULL;
- z.opaque = 0;
if (inflateInit2(&z, -MAX_WBITS) != Z_OK)
return;
@@ -226,6 +264,10 @@ foot();
sub foot {
print <<FOOT
+#else /* !USE_MANUAL */
+/* built-in manual is disabled, blank function */
+#include "tool_hugehelp.h"
+void hugehelp(void) {}
#endif /* USE_MANUAL */
FOOT
;
diff --git a/src/os-specific.c b/src/os-specific.c
deleted file mode 100644
index ac07c4ce..00000000
--- a/src/os-specific.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#include <curl/curl.h>
-
-#define ENABLE_CURLX_PRINTF
-#include "curlx.h"
-
-#include "os-specific.h"
-
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-# include "memdebug.h"
-#endif
-
-#ifdef __VMS
-
-#include "curlmsg_vms.h"
-
-void decc$__posix_exit(int __status);
-void decc$exit(int __status);
-
-static int vms_shell = -1;
-
-/* VMS has a DCL shell and and also has Unix shells ported to it.
- * When curl is running under a Unix shell, we want it to be as much
- * like Unix as possible.
- */
-int is_vms_shell(void)
-{
- char *shell;
-
- /* Have we checked the shell yet? */
- if(vms_shell >= 0)
- return vms_shell;
-
- shell = getenv("SHELL");
-
- /* No shell, means DCL */
- if(shell == NULL) {
- vms_shell = 1;
- return 1;
- }
-
- /* Have to make sure some one did not set shell to DCL */
- if(strcmp(shell, "DCL") == 0) {
- vms_shell = 1;
- return 1;
- }
-
- vms_shell = 0;
- return 0;
-}
-
-/*
- * VMS has two exit() routines. When running under a Unix style shell, then
- * Unix style and the __posix_exit() routine is used.
- *
- * When running under the DCL shell, then the VMS encoded codes and decc$exit()
- * is used.
- *
- * We can not use exit() or return a code from main() because the actual
- * routine called depends on both the compiler version, compile options, and
- * feature macro settings, and one of the exit routines is hidden at compile
- * time.
- *
- * Since we want Curl to work properly under the VMS DCL shell and Unix
- * shells under VMS, this routine should compile correctly regardless of
- * the settings.
- */
-
-void vms_special_exit(int code, int vms_show)
-{
- int vms_code;
-
- /* The Posix exit mode is only available after VMS 7.0 */
-#if __CRTL_VER >= 70000000
- if(is_vms_shell() == 0) {
- decc$__posix_exit(code);
- }
-#endif
-
- if(code > CURL_LAST) { /* If CURL_LAST exceeded then */
- vms_code = CURL_LAST; /* curlmsg.h is out of sync. */
- }
- else {
- vms_code = vms_cond[code] | vms_show;
- }
- decc$exit(vms_code);
-}
-
-#if defined(__DECC) && !defined(__VAX) && \
- defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
-
-/*
- * 2004-09-19 SMS.
- *
- * decc_init()
- *
- * On non-VAX systems, use LIB$INITIALIZE to set a collection of C
- * RTL features without using the DECC$* logical name method, nor
- * requiring the user to define the corresponding logical names.
- */
-
-#include <unixlib.h>
-
-/* Structure to hold a DECC$* feature name and its desired value. */
-typedef struct {
- char *name;
- int value;
-} decc_feat_t;
-
-/* Array of DECC$* feature names and their desired values. */
-static decc_feat_t decc_feat_array[] = {
- /* Preserve command-line case with SET PROCESS/PARSE_STYLE=EXTENDED */
- { "DECC$ARGV_PARSE_STYLE", 1 },
- /* Preserve case for file names on ODS5 disks. */
- { "DECC$EFS_CASE_PRESERVE", 1 },
- /* Enable multiple dots (and most characters) in ODS5 file names,
- while preserving VMS-ness of ";version". */
- { "DECC$EFS_CHARSET", 1 },
- /* List terminator. */
- { (char *)NULL, 0 }
-};
-
-/* Flag to sense if decc_init() was called. */
-static int decc_init_done = -1;
-
-/* LIB$INITIALIZE initialization function. */
-static void decc_init(void)
-{
- int feat_index;
- int feat_value;
- int feat_value_max;
- int feat_value_min;
- int i;
- int sts;
-
- /* Set the global flag to indicate that LIB$INITIALIZE worked. */
- decc_init_done = 1;
-
- /* Loop through all items in the decc_feat_array[]. */
- for(i = 0; decc_feat_array[i].name != NULL; i++) {
-
- /* Get the feature index. */
- feat_index = decc$feature_get_index( decc_feat_array[i].name);
-
- if(feat_index >= 0) {
- /* Valid item. Collect its properties. */
- feat_value = decc$feature_get_value( feat_index, 1);
- feat_value_min = decc$feature_get_value( feat_index, 2);
- feat_value_max = decc$feature_get_value( feat_index, 3);
-
- if((decc_feat_array[i].value >= feat_value_min) &&
- (decc_feat_array[i].value <= feat_value_max)) {
- /* Valid value. Set it if necessary. */
- if(feat_value != decc_feat_array[i].value) {
- sts = decc$feature_set_value( feat_index, 1,
- decc_feat_array[i].value);
- }
- }
- else {
- /* Invalid DECC feature value. */
- printf(" INVALID DECC FEATURE VALUE, %d: %d <= %s <= %d.\n",
- feat_value,
- feat_value_min, decc_feat_array[i].name, feat_value_max);
- }
- }
- else {
- /* Invalid DECC feature name. */
- printf(" UNKNOWN DECC FEATURE: %s.\n", decc_feat_array[i].name);
- }
-
- }
-}
-
-/* Get "decc_init()" into a valid, loaded LIB$INITIALIZE PSECT. */
-
-#pragma nostandard
-
-/* Establish the LIB$INITIALIZE PSECTs, with proper alignment and
- other attributes. Note that "nopic" is significant only on VAX. */
-#pragma extern_model save
-#pragma extern_model strict_refdef "LIB$INITIALIZ" 2, nopic, nowrt
-const int spare[8] = {0};
-#pragma extern_model strict_refdef "LIB$INITIALIZE" 2, nopic, nowrt
-void (*const x_decc_init)() = decc_init;
-#pragma extern_model restore
-
-/* Fake reference to ensure loading the LIB$INITIALIZE PSECT. */
-#pragma extern_model save
-int LIB$INITIALIZE(void);
-#pragma extern_model strict_refdef
-int dmy_lib$initialize = (int) LIB$INITIALIZE;
-#pragma extern_model restore
-
-#pragma standard
-
-#endif /* __DECC && !__VAX && __CRTL_VER && __CRTL_VER >= 70301000 */
-
-#endif /* __VMS */
-
diff --git a/src/os-specific.h b/src/os-specific.h
deleted file mode 100644
index 93cac743..00000000
--- a/src/os-specific.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef HEADER_CURL_OS_SPECIFIC_H
-#define HEADER_CURL_OS_SPECIFIC_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-#ifdef __VMS
-
-int is_vms_shell(void);
-void vms_special_exit(int code, int vms_show);
-
-#undef exit
-#define exit(__code) vms_special_exit((__code), (0))
-
-#define VMS_STS(c,f,e,s) (((c&0xF)<<28)|((f&0xFFF)<<16)|((e&0x1FFF)<3)|(s&7))
-#define VMSSTS_HIDE VMS_STS(1,0,0,0)
-
-#endif /* __VMS */
-
-#endif /* HEADER_CURL_OS_SPECIFIC_H */
diff --git a/src/setup.h b/src/setup.h
deleted file mode 100644
index 0d2a99fb..00000000
--- a/src/setup.h
+++ /dev/null
@@ -1,223 +0,0 @@
-#ifndef HEADER_CURL_SRC_SETUP_H
-#define HEADER_CURL_SRC_SETUP_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-/*
- * Define WIN32 when build target is Win32 API
- */
-
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__)
-#define WIN32
-#endif
-
-/*
- * Include configuration script results or hand-crafted
- * configuration file for platforms which lack config tool.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "curl_config.h"
-#else
-
-#ifdef WIN32
-#include "config-win32.h"
-#endif
-
-#if defined(macintosh) && defined(__MRC__)
-# include "config-mac.h"
-#endif
-
-#ifdef __riscos__
-#include "config-riscos.h"
-#endif
-
-#ifdef __AMIGA__
-#include "config-amigaos.h"
-#endif
-
-#ifdef __SYMBIAN32__
-#include "config-symbian.h"
-#endif
-
-#ifdef TPF
-#include "config-tpf.h"
-#endif
-
-#endif /* HAVE_CONFIG_H */
-
-/*
- * AIX 4.3 and newer needs _THREAD_SAFE defined to build
- * proper reentrant code. Others may also need it.
- */
-
-#ifdef NEED_THREAD_SAFE
-# ifndef _THREAD_SAFE
-# define _THREAD_SAFE
-# endif
-#endif
-
-/*
- * Tru64 needs _REENTRANT set for a few function prototypes and
- * things to appear in the system header files. Unixware needs it
- * to build proper reentrant code. Others may also need it.
- */
-
-#ifdef NEED_REENTRANT
-# ifndef _REENTRANT
-# define _REENTRANT
-# endif
-#endif
-
-/*
- * Include header files for windows builds before redefining anything.
- * Use this preproessor block only to include or exclude windows.h,
- * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
- * to any other further and independent block. Under Cygwin things work
- * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
- * never be included when __CYGWIN__ is defined. configure script takes
- * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
- * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
- */
-
-#ifdef HAVE_WINDOWS_H
-# ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-# endif
-# include <windows.h>
-# ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-# ifdef HAVE_WS2TCPIP_H
-# include <ws2tcpip.h>
-# endif
-# else
-# ifdef HAVE_WINSOCK_H
-# include <winsock.h>
-# endif
-# endif
-#endif
-
-/*
- * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
- * define USE_WINSOCK to 1 if we have and use WINSOCK API, else
- * undefine USE_WINSOCK.
- */
-
-#undef USE_WINSOCK
-
-#ifdef HAVE_WINSOCK2_H
-# define USE_WINSOCK 2
-#else
-# ifdef HAVE_WINSOCK_H
-# define USE_WINSOCK 1
-# endif
-#endif
-
-#ifdef TPF
-# include <sys/socket.h>
- /* change which select is used for the curl command line tool */
-# define select(a,b,c,d,e) tpf_select_bsd(a,b,c,d,e)
- /* and turn off the progress meter */
-# define CONF_DEFAULT (0|CONF_NOPROGRESS)
-#endif
-
-#include <stdio.h>
-
-#ifdef __TANDEM
-#include <floss.h>
-#endif
-
-
-#ifndef OS
-#define OS "unknown"
-#endif
-
-#if !defined(fileno) && !defined(WIN32) /* sunos 4 have this as a macro! */
-int fileno( FILE *stream);
-#endif
-
-#ifdef WIN32
-#define DIR_CHAR "\\"
-#define DOT_CHAR "_"
-#else
-#ifdef __EMX__
-/* 20000318 mgs
- * OS/2 supports leading dots in filenames if the volume is formatted
- * with JFS or HPFS. */
-#define DIR_CHAR "\\"
-#define DOT_CHAR "."
-#else
-
-#ifdef DJGPP
-#include <tcp.h>
-#ifdef word
-#undef word
-#endif
-#define DIR_CHAR "/"
-#define DOT_CHAR "_"
-#else
-
-#define DIR_CHAR "/"
-#define DOT_CHAR "."
-
-#endif /* !DJGPP */
-#endif /* !__EMX__ */
-#endif /* !WIN32 */
-
-#ifdef __riscos__
-#define USE_ENVIRONMENT
-#endif
-
-#ifdef __BEOS__
-#define typedef_bool
-#endif
-
-#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
-#include <sys/timeval.h>
-#endif
-
-#ifndef UNPRINTABLE_CHAR
-/* define what to use for unprintable characters */
-#define UNPRINTABLE_CHAR '.'
-#endif
-
-#ifndef HAVE_STRDUP
-#include "strdup.h"
-#define strdup(ptr) curlx_strdup(ptr)
-#endif
-
-/* Define S_ISREG if not defined by system headers, f.e. MSVC */
-#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-
-/*
- * Include macros and defines that should only be processed once.
- */
-
-#ifndef __SETUP_ONCE_H
-#include "setup_once.h"
-#endif
-
-#endif /* HEADER_CURL_SRC_SETUP_H */
diff --git a/src/tool_binmode.c b/src/tool_binmode.c
new file mode 100644
index 00000000..5495ba4e
--- /dev/null
+++ b/src/tool_binmode.c
@@ -0,0 +1,52 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef HAVE_SETMODE
+
+#ifdef HAVE_IO_H
+# include <io.h>
+#endif
+
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#include "tool_binmode.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void set_binmode(FILE *stream)
+{
+#ifdef O_BINARY
+# ifdef __HIGHC__
+ _setmode(stream, O_BINARY);
+# else
+ (void)setmode(fileno(stream), O_BINARY);
+# endif
+#else
+ (void)stream;
+#endif
+}
+
+#endif /* HAVE_SETMODE */
+
diff --git a/src/tool_binmode.h b/src/tool_binmode.h
new file mode 100644
index 00000000..b5cb08d5
--- /dev/null
+++ b/src/tool_binmode.h
@@ -0,0 +1,37 @@
+#ifndef HEADER_CURL_TOOL_BINMODE_H
+#define HEADER_CURL_TOOL_BINMODE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef HAVE_SETMODE
+
+void set_binmode(FILE *stream);
+
+#else
+
+#define set_binmode(x) Curl_nop_stmt
+
+#endif /* HAVE_SETMODE */
+
+#endif /* HEADER_CURL_TOOL_BINMODE_H */
+
diff --git a/src/tool_bname.c b/src/tool_bname.c
new file mode 100644
index 00000000..27783054
--- /dev/null
+++ b/src/tool_bname.c
@@ -0,0 +1,50 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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_bname.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifndef HAVE_BASENAME
+
+char *tool_basename(char *path)
+{
+ char *s1;
+ char *s2;
+
+ s1 = strrchr(path, '/');
+ s2 = strrchr(path, '\\');
+
+ if(s1 && s2) {
+ path = (s1 > s2) ? s1 + 1 : s2 + 1;
+ }
+ else if(s1)
+ path = s1 + 1;
+ else if(s2)
+ path = s2 + 1;
+
+ return path;
+}
+
+#endif /* HAVE_BASENAME */
+
diff --git a/src/tool_bname.h b/src/tool_bname.h
new file mode 100644
index 00000000..69cf92c1
--- /dev/null
+++ b/src/tool_bname.h
@@ -0,0 +1,35 @@
+#ifndef HEADER_CURL_TOOL_BNAME_H
+#define HEADER_CURL_TOOL_BNAME_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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_BASENAME
+
+char *tool_basename(char *path);
+
+#define basename(x) tool_basename((x))
+
+#endif /* HAVE_BASENAME */
+
+#endif /* HEADER_CURL_TOOL_BNAME_H */
+
diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c
new file mode 100644
index 00000000..f5271468
--- /dev/null
+++ b/src/tool_cb_dbg.c
@@ -0,0 +1,275 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+#include "tool_cb_dbg.h"
+#include "tool_util.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+static void dump(const char *timebuf, const char *text,
+ FILE *stream, const unsigned char *ptr, size_t size,
+ trace tracetype, curl_infotype infotype);
+
+/*
+** callback for CURLOPT_DEBUGFUNCTION
+*/
+
+int tool_debug_cb(CURL *handle, curl_infotype type,
+ unsigned char *data, size_t size,
+ void *userdata)
+{
+ struct OperationConfig *operation = userdata;
+ struct GlobalConfig *config = operation->global;
+ FILE *output = config->errors;
+ const char *text;
+ struct timeval tv;
+ struct tm *now;
+ char timebuf[20];
+ time_t secs;
+ static time_t epoch_offset;
+ static int known_offset;
+
+ (void)handle; /* not used */
+
+ if(config->tracetime) {
+ tv = tvnow();
+ if(!known_offset) {
+ epoch_offset = time(NULL) - tv.tv_sec;
+ known_offset = 1;
+ }
+ secs = epoch_offset + tv.tv_sec;
+ now = localtime(&secs); /* not thread safe but we don't care */
+ snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld ",
+ now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
+ }
+ else
+ timebuf[0] = 0;
+
+ if(!config->trace_stream) {
+ /* open for append */
+ if(curlx_strequal("-", config->trace_dump))
+ config->trace_stream = stdout;
+ else if(curlx_strequal("%", config->trace_dump))
+ /* Ok, this is somewhat hackish but we do it undocumented for now */
+ config->trace_stream = config->errors; /* aka stderr */
+ else {
+ config->trace_stream = fopen(config->trace_dump, FOPEN_WRITETEXT);
+ config->trace_fopened = TRUE;
+ }
+ }
+
+ if(config->trace_stream)
+ output = config->trace_stream;
+
+ if(!output) {
+ warnf(config, "Failed to create/open output");
+ return 0;
+ }
+
+ if(config->tracetype == TRACE_PLAIN) {
+ /*
+ * This is the trace look that is similar to what libcurl makes on its
+ * own.
+ */
+ static const char * const s_infotype[] = {
+ "*", "<", ">", "{", "}", "{", "}"
+ };
+ size_t i;
+ size_t st = 0;
+ static bool newl = FALSE;
+ static bool traced_data = FALSE;
+
+ switch(type) {
+ case CURLINFO_HEADER_OUT:
+ if(size > 0) {
+ for(i = 0; i < size - 1; i++) {
+ if(data[i] == '\n') { /* LF */
+ if(!newl) {
+ fprintf(output, "%s%s ", timebuf, s_infotype[type]);
+ }
+ (void)fwrite(data + st, i - st + 1, 1, output);
+ st = i + 1;
+ newl = FALSE;
+ }
+ }
+ if(!newl)
+ fprintf(output, "%s%s ", timebuf, s_infotype[type]);
+ (void)fwrite(data + st, i - st + 1, 1, output);
+ }
+ newl = (size && (data[size - 1] != '\n')) ? TRUE : FALSE;
+ traced_data = FALSE;
+ break;
+ case CURLINFO_TEXT:
+ case CURLINFO_HEADER_IN:
+ if(!newl)
+ fprintf(output, "%s%s ", timebuf, s_infotype[type]);
+ (void)fwrite(data, size, 1, output);
+ newl = (size && (data[size - 1] != '\n')) ? TRUE : FALSE;
+ traced_data = FALSE;
+ break;
+ case CURLINFO_DATA_OUT:
+ case CURLINFO_DATA_IN:
+ case CURLINFO_SSL_DATA_IN:
+ case CURLINFO_SSL_DATA_OUT:
+ if(!traced_data) {
+ /* if the data is output to a tty and we're sending this debug trace
+ to stderr or stdout, we don't display the alert about the data not
+ being shown as the data _is_ shown then just not via this
+ function */
+ if(!config->isatty || ((output != stderr) && (output != stdout))) {
+ if(!newl)
+ fprintf(output, "%s%s ", timebuf, s_infotype[type]);
+ fprintf(output, "[%zd bytes data]\n", size);
+ newl = FALSE;
+ traced_data = TRUE;
+ }
+ }
+ break;
+ default: /* nada */
+ newl = FALSE;
+ traced_data = FALSE;
+ break;
+ }
+
+ return 0;
+ }
+
+#ifdef CURL_DOES_CONVERSIONS
+ /* Special processing is needed for CURLINFO_HEADER_OUT blocks
+ * if they contain both headers and data (separated by CRLFCRLF).
+ * We dump the header text and then switch type to CURLINFO_DATA_OUT.
+ */
+ if((type == CURLINFO_HEADER_OUT) && (size > 4)) {
+ size_t i;
+ for(i = 0; i < size - 4; i++) {
+ if(memcmp(&data[i], "\r\n\r\n", 4) == 0) {
+ /* dump everything through the CRLFCRLF as a sent header */
+ text = "=> Send header";
+ dump(timebuf, text, output, data, i + 4, config->tracetype, type);
+ data += i + 3;
+ size -= i + 4;
+ type = CURLINFO_DATA_OUT;
+ data += 1;
+ break;
+ }
+ }
+ }
+#endif /* CURL_DOES_CONVERSIONS */
+
+ switch (type) {
+ case CURLINFO_TEXT:
+ fprintf(output, "%s== Info: %s", timebuf, 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_HEADER_IN:
+ text = "<= Recv header";
+ break;
+ case CURLINFO_DATA_IN:
+ text = "<= Recv data";
+ break;
+ case CURLINFO_SSL_DATA_IN:
+ text = "<= Recv SSL data";
+ break;
+ case CURLINFO_SSL_DATA_OUT:
+ text = "=> Send SSL data";
+ break;
+ }
+
+ dump(timebuf, text, output, data, size, config->tracetype, type);
+ return 0;
+}
+
+static void dump(const char *timebuf, const char *text,
+ FILE *stream, const unsigned char *ptr, size_t size,
+ trace tracetype, curl_infotype infotype)
+{
+ size_t i;
+ size_t c;
+
+ unsigned int width = 0x10;
+
+ if(tracetype == TRACE_ASCII)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stream, "%s%s, %zd bytes (0x%zx)\n", timebuf, text, size, size);
+
+ for(i = 0; i < size; i += width) {
+
+ fprintf(stream, "%04zx: ", i);
+
+ if(tracetype == TRACE_BIN) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i+c < size)
+ fprintf(stream, "%02x ", ptr[i+c]);
+ else
+ fputs(" ", stream);
+ }
+
+ for(c = 0; (c < width) && (i+c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if((tracetype == TRACE_ASCII) &&
+ (i+c+1 < size) && (ptr[i+c] == 0x0D) && (ptr[i+c+1] == 0x0A)) {
+ i += (c+2-width);
+ break;
+ }
+#ifdef CURL_DOES_CONVERSIONS
+ /* repeat the 0D0A check above but use the host encoding for CRLF */
+ if((tracetype == TRACE_ASCII) &&
+ (i+c+1 < size) && (ptr[i+c] == '\r') && (ptr[i+c+1] == '\n')) {
+ i += (c+2-width);
+ break;
+ }
+ /* convert to host encoding and print this character */
+ fprintf(stream, "%c", convert_char(infotype, ptr[i+c]));
+#else
+ (void)infotype;
+ fprintf(stream, "%c", ((ptr[i+c] >= 0x20) && (ptr[i+c] < 0x80)) ?
+ ptr[i+c] : UNPRINTABLE_CHAR);
+#endif /* CURL_DOES_CONVERSIONS */
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if((tracetype == TRACE_ASCII) &&
+ (i+c+2 < size) && (ptr[i+c+1] == 0x0D) && (ptr[i+c+2] == 0x0A)) {
+ i += (c+3-width);
+ break;
+ }
+ }
+ fputc('\n', stream); /* newline */
+ }
+ fflush(stream);
+}
+
diff --git a/src/tool_cb_dbg.h b/src/tool_cb_dbg.h
new file mode 100644
index 00000000..d0ed7b0d
--- /dev/null
+++ b/src/tool_cb_dbg.h
@@ -0,0 +1,35 @@
+#ifndef HEADER_CURL_TOOL_CB_DBG_H
+#define HEADER_CURL_TOOL_CB_DBG_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/*
+** callback for CURLOPT_DEBUGFUNCTION
+*/
+
+int tool_debug_cb(CURL *handle, curl_infotype type,
+ unsigned char *data, size_t size,
+ void *userdata);
+
+#endif /* HEADER_CURL_TOOL_CB_DBG_H */
+
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
new file mode 100644
index 00000000..af9bb87e
--- /dev/null
+++ b/src/tool_cb_hdr.c
@@ -0,0 +1,226 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+#include "tool_cb_hdr.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+static char *parse_filename(const char *ptr, size_t len);
+
+/*
+** callback for CURLOPT_HEADERFUNCTION
+*/
+
+size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
+{
+ struct HdrCbData *hdrcbdata = userdata;
+ struct OutStruct *outs = hdrcbdata->outs;
+ struct OutStruct *heads = hdrcbdata->heads;
+ const char *str = ptr;
+ const size_t cb = size * nmemb;
+ const char *end = (char*)ptr + cb;
+
+ /*
+ * Once that libcurl has called back tool_header_cb() the returned value
+ * is checked against the amount that was intended to be written, if
+ * it does not match then it fails with CURLE_WRITE_ERROR. So at this
+ * point returning a value different from sz*nmemb indicates failure.
+ */
+ size_t failure = (size * nmemb) ? 0 : 1;
+
+ if(!heads->config)
+ return failure;
+
+#ifdef DEBUGBUILD
+ if(size * nmemb > (size_t)CURL_MAX_HTTP_HEADER) {
+ warnf(heads->config->global, "Header data exceeds single call write "
+ "limit!\n");
+ return failure;
+ }
+#endif
+
+ /*
+ * Write header data when curl option --dump-header (-D) is given.
+ */
+
+ if(heads->config->headerfile && heads->stream) {
+ size_t rc = fwrite(ptr, size, nmemb, heads->stream);
+ if(rc != cb)
+ return rc;
+ }
+
+ /*
+ * This callback sets the filename where output shall be written when
+ * curl options --remote-name (-O) and --remote-header-name (-J) have
+ * been simultaneously given and additionally server returns an HTTP
+ * Content-Disposition header specifying a filename property.
+ */
+
+ if(hdrcbdata->honor_cd_filename &&
+ (cb > 20) && checkprefix("Content-disposition:", str)) {
+ const char *p = str + 20;
+
+ /* look for the 'filename=' parameter
+ (encoded filenames (*=) are not supported) */
+ for(;;) {
+ char *filename;
+ size_t len;
+
+ while(*p && (p < end) && !ISALPHA(*p))
+ p++;
+ if(p > end - 9)
+ break;
+
+ if(memcmp(p, "filename=", 9)) {
+ /* no match, find next parameter */
+ while((p < end) && (*p != ';'))
+ p++;
+ continue;
+ }
+ p += 9;
+
+ /* this expression below typecasts 'cb' only to avoid
+ warning: signed and unsigned type in conditional expression
+ */
+ len = (ssize_t)cb - (p - str);
+ filename = parse_filename(p, len);
+ if(filename) {
+ outs->filename = filename;
+ outs->alloc_filename = TRUE;
+ outs->is_cd_filename = TRUE;
+ outs->s_isreg = TRUE;
+ outs->fopened = FALSE;
+ outs->stream = NULL;
+ hdrcbdata->honor_cd_filename = FALSE;
+ break;
+ }
+ else
+ return failure;
+ }
+ }
+
+ return cb;
+}
+
+/*
+ * Copies a file name part and returns an ALLOCATED data buffer.
+ */
+static char *parse_filename(const char *ptr, size_t len)
+{
+ char *copy;
+ char *p;
+ char *q;
+ char stop = '\0';
+
+ /* simple implementation of strndup() */
+ copy = malloc(len+1);
+ if(!copy)
+ return NULL;
+ memcpy(copy, ptr, len);
+ copy[len] = '\0';
+
+ p = copy;
+ if(*p == '\'' || *p == '"') {
+ /* store the starting quote */
+ stop = *p;
+ p++;
+ }
+ else
+ stop = ';';
+
+ /* if the filename contains a path, only use filename portion */
+ q = strrchr(copy, '/');
+ if(q) {
+ p = q + 1;
+ if(!*p) {
+ Curl_safefree(copy);
+ return NULL;
+ }
+ }
+
+ /* If the filename contains a backslash, only use filename portion. The idea
+ is that even systems that don't handle backslashes as path separators
+ probably want the path removed for convenience. */
+ q = strrchr(p, '\\');
+ if(q) {
+ p = q + 1;
+ if(!*p) {
+ Curl_safefree(copy);
+ return NULL;
+ }
+ }
+
+ /* scan for the end letter and stop there */
+ q = p;
+ while(*q) {
+ if(q[1] && (q[0] == '\\'))
+ q++;
+ else if(q[0] == stop)
+ break;
+ q++;
+ }
+ *q = '\0';
+
+ /* make sure the file name doesn't end in \r or \n */
+ q = strchr(p, '\r');
+ if(q)
+ *q = '\0';
+
+ q = strchr(p, '\n');
+ if(q)
+ *q = '\0';
+
+ if(copy != p)
+ memmove(copy, p, strlen(p) + 1);
+
+ /* in case we built debug enabled, we allow an evironment variable
+ * named CURL_TESTDIR to prefix the given file name to put it into a
+ * specific directory
+ */
+#ifdef DEBUGBUILD
+ {
+ char *tdir = curlx_getenv("CURL_TESTDIR");
+ if(tdir) {
+ char buffer[512]; /* suitably large */
+ snprintf(buffer, sizeof(buffer), "%s/%s", tdir, copy);
+ Curl_safefree(copy);
+ copy = strdup(buffer); /* clone the buffer, we don't use the libcurl
+ aprintf() or similar since we want to use the
+ same memory code as the "real" parse_filename
+ function */
+ curl_free(tdir);
+ }
+ }
+#endif
+
+ return copy;
+}
+
diff --git a/src/tool_cb_hdr.h b/src/tool_cb_hdr.h
new file mode 100644
index 00000000..bd504313
--- /dev/null
+++ b/src/tool_cb_hdr.h
@@ -0,0 +1,54 @@
+#ifndef HEADER_CURL_TOOL_CB_HDR_H
+#define HEADER_CURL_TOOL_CB_HDR_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/*
+ * curl operates using a single HdrCbData struct variable, a
+ * pointer to this is passed as userdata pointer to tool_header_cb.
+ *
+ * 'outs' member is a pointer to the OutStruct variable used to keep
+ * track of information relative to curl's output writing.
+ *
+ * 'heads' member is a pointer to the OutStruct variable used to keep
+ * track of information relative to header response writing.
+ *
+ * 'honor_cd_filename' member is TRUE when tool_header_cb is allowed
+ * to honor Content-Disposition filename property and accordingly
+ * set 'outs' filename, otherwise FALSE;
+ */
+
+struct HdrCbData {
+ struct OutStruct *outs;
+ struct OutStruct *heads;
+ bool honor_cd_filename;
+};
+
+/*
+** callback for CURLOPT_HEADERFUNCTION
+*/
+
+size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata);
+
+#endif /* HEADER_CURL_TOOL_CB_HDR_H */
+
diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c
new file mode 100644
index 00000000..9e3c5fb4
--- /dev/null
+++ b/src/tool_cb_prg.c
@@ -0,0 +1,150 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_cb_prg.h"
+#include "tool_util.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+** callback for CURLOPT_XFERINFOFUNCTION
+*/
+
+#define MAX_BARLENGTH 256
+
+int tool_progress_cb(void *clientp,
+ curl_off_t dltotal, curl_off_t dlnow,
+ curl_off_t ultotal, curl_off_t ulnow)
+{
+ /* The original progress-bar source code was written for curl by Lars Aas,
+ and this new edition inherits some of his concepts. */
+
+ char line[MAX_BARLENGTH+1];
+ char format[40];
+ double frac;
+ double percent;
+ int barwidth;
+ int num;
+ struct timeval now = tvnow();
+ struct ProgressData *bar = (struct ProgressData *)clientp;
+ curl_off_t total;
+ curl_off_t point;
+
+ /* expected transfer size */
+ total = dltotal + ultotal + bar->initial_size;
+
+ /* we've come this far */
+ point = dlnow + ulnow + bar->initial_size;
+
+ if(bar->calls && (tvdiff(now, bar->prevtime) < 100L) && point < total)
+ /* after first call, limit progress-bar updating to 10 Hz */
+ /* update when we're at 100% even if last update is less than 200ms ago */
+ return 0;
+
+ if(point > total)
+ /* we have got more than the expected total! */
+ total = point;
+
+ /* simply count invokes */
+ bar->calls++;
+
+ if(total < 1) {
+ curl_off_t prevblock = bar->prev / 1024;
+ curl_off_t thisblock = point / 1024;
+ while(thisblock > prevblock) {
+ fprintf(bar->out, "#");
+ prevblock++;
+ }
+ }
+ else if(point != bar->prev) {
+ frac = (double)point / (double)total;
+ percent = frac * 100.0f;
+ barwidth = bar->width - 7;
+ num = (int) (((double)barwidth) * frac);
+ if(num > MAX_BARLENGTH)
+ num = MAX_BARLENGTH;
+ memset(line, '#', num);
+ line[num] = '\0';
+ snprintf(format, sizeof(format), "\r%%-%ds %%5.1f%%%%", barwidth);
+ fprintf(bar->out, format, line, percent);
+ }
+ fflush(bar->out);
+ bar->prev = point;
+ bar->prevtime = now;
+
+ return 0;
+}
+
+void progressbarinit(struct ProgressData *bar,
+ struct OperationConfig *config)
+{
+#ifdef __EMX__
+ /* 20000318 mgs */
+ int scr_size[2];
+#endif
+ char *colp;
+
+ memset(bar, 0, sizeof(struct ProgressData));
+
+ /* pass this through to progress function so
+ * it can display progress towards total file
+ * not just the part that's left. (21-may-03, dbyron) */
+ if(config->use_resume)
+ bar->initial_size = config->resume_from;
+
+/* TODO: get terminal width through ansi escapes or something similar.
+ try to update width when xterm is resized... - 19990617 larsa */
+#ifndef __EMX__
+ /* 20000318 mgs
+ * OS/2 users most likely won't have this env var set, and besides that
+ * we're using our own way to determine screen width */
+ colp = curlx_getenv("COLUMNS");
+ if(colp) {
+ char *endptr;
+ long num = strtol(colp, &endptr, 10);
+ if((endptr != colp) && (endptr == colp + strlen(colp)) && (num > 0))
+ bar->width = (int)num;
+ else
+ bar->width = 79;
+ curl_free(colp);
+ }
+ else
+ bar->width = 79;
+#else
+ /* 20000318 mgs
+ * We use this emx library call to get the screen width, and subtract
+ * one from what we got in order to avoid a problem with the cursor
+ * advancing to the next line if we print a string that is as long as
+ * the screen is wide. */
+
+ _scrsize(scr_size);
+ bar->width = scr_size[0] - 1;
+#endif
+
+ bar->out = config->global->errors;
+}
diff --git a/src/tool_cb_prg.h b/src/tool_cb_prg.h
new file mode 100644
index 00000000..c635be80
--- /dev/null
+++ b/src/tool_cb_prg.h
@@ -0,0 +1,50 @@
+#ifndef HEADER_CURL_TOOL_CB_PRG_H
+#define HEADER_CURL_TOOL_CB_PRG_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define CURL_PROGRESS_STATS 0 /* default progress display */
+#define CURL_PROGRESS_BAR 1
+
+struct ProgressData {
+ int calls;
+ curl_off_t prev;
+ struct timeval prevtime;
+ int width;
+ FILE *out; /* where to write everything to */
+ curl_off_t initial_size;
+};
+
+void progressbarinit(struct ProgressData *bar,
+ struct OperationConfig *config);
+
+/*
+** callback for CURLOPT_PROGRESSFUNCTION
+*/
+
+int tool_progress_cb(void *clientp,
+ curl_off_t dltotal, curl_off_t dlnow,
+ curl_off_t ultotal, curl_off_t ulnow);
+
+#endif /* HEADER_CURL_TOOL_CB_PRG_H */
+
diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c
new file mode 100644
index 00000000..4565a15d
--- /dev/null
+++ b/src/tool_cb_rea.c
@@ -0,0 +1,55 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_cb_rea.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+** callback for CURLOPT_READFUNCTION
+*/
+
+size_t tool_read_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
+{
+ ssize_t rc;
+ struct InStruct *in = userdata;
+
+ rc = read(in->fd, buffer, sz*nmemb);
+ if(rc < 0) {
+ if(errno == EAGAIN) {
+ errno = 0;
+ in->config->readbusy = TRUE;
+ return CURL_READFUNC_PAUSE;
+ }
+ /* since size_t is unsigned we can't return negative values fine */
+ rc = 0;
+ }
+ in->config->readbusy = FALSE;
+ return (size_t)rc;
+}
+
diff --git a/src/tool_cb_rea.h b/src/tool_cb_rea.h
new file mode 100644
index 00000000..4294166a
--- /dev/null
+++ b/src/tool_cb_rea.h
@@ -0,0 +1,33 @@
+#ifndef HEADER_CURL_TOOL_CB_REA_H
+#define HEADER_CURL_TOOL_CB_REA_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/*
+** callback for CURLOPT_READFUNCTION
+*/
+
+size_t tool_read_cb(void *buffer, size_t sz, size_t nmemb, void *userdata);
+
+#endif /* HEADER_CURL_TOOL_CB_REA_H */
+
diff --git a/src/tool_cb_see.c b/src/tool_cb_see.c
new file mode 100644
index 00000000..2f49e1d9
--- /dev/null
+++ b/src/tool_cb_see.c
@@ -0,0 +1,131 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_cb_see.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* OUR_MAX_SEEK_L has 'long' data type, OUR_MAX_SEEK_O has 'curl_off_t,
+ both represent the same value. Maximum offset used here when we lseek
+ using a 'long' data type offset */
+
+#define OUR_MAX_SEEK_L 2147483647L - 1L
+#define OUR_MAX_SEEK_O CURL_OFF_T_C(0x7FFFFFFF) - CURL_OFF_T_C(0x1)
+
+/*
+** callback for CURLOPT_SEEKFUNCTION
+**
+** Notice that this is not supposed to return the resulting offset. This
+** shall only return CURL_SEEKFUNC_* return codes.
+*/
+
+int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
+{
+ struct InStruct *in = userdata;
+
+#if(CURL_SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES)
+
+ /* The offset check following here is only interesting if curl_off_t is
+ larger than off_t and we are not using the WIN32 large file support
+ macros that provide the support to do 64bit seeks correctly */
+
+ if(offset > OUR_MAX_SEEK_O) {
+ /* Some precaution code to work around problems with different data sizes
+ to allow seeking >32bit even if off_t is 32bit. Should be very rare and
+ is really valid on weirdo-systems. */
+ curl_off_t left = offset;
+
+ if(whence != SEEK_SET)
+ /* this code path doesn't support other types */
+ return CURL_SEEKFUNC_FAIL;
+
+ if(LSEEK_ERROR == lseek(in->fd, 0, SEEK_SET))
+ /* couldn't rewind to beginning */
+ return CURL_SEEKFUNC_FAIL;
+
+ while(left) {
+ long step = (left > OUR_MAX_SEEK_O) ? OUR_MAX_SEEK_L : (long)left;
+ if(LSEEK_ERROR == lseek(in->fd, step, SEEK_CUR))
+ /* couldn't seek forwards the desired amount */
+ return CURL_SEEKFUNC_FAIL;
+ left -= step;
+ }
+ return CURL_SEEKFUNC_OK;
+ }
+#endif
+
+ if(LSEEK_ERROR == lseek(in->fd, offset, whence))
+ /* couldn't rewind, the reason is in errno but errno is just not portable
+ enough and we don't actually care that much why we failed. We'll let
+ libcurl know that it may try other means if it wants to. */
+ return CURL_SEEKFUNC_CANTSEEK;
+
+ return CURL_SEEKFUNC_OK;
+}
+
+#if defined(WIN32) && !defined(__MINGW64__)
+
+#ifdef __BORLANDC__
+/* 64-bit lseek-like function unavailable */
+# define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
+#endif
+
+#ifdef __POCC__
+# if(__POCC__ < 450)
+/* 64-bit lseek-like function unavailable */
+# define _lseeki64(hnd,ofs,whence) _lseek(hnd,ofs,whence)
+# else
+# define _lseeki64(hnd,ofs,whence) _lseek64(hnd,ofs,whence)
+# endif
+#endif
+
+#ifdef _WIN32_WCE
+/* 64-bit lseek-like function unavailable */
+# undef _lseeki64
+# define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
+# undef _get_osfhandle
+# define _get_osfhandle(fd) (fd)
+#endif
+
+/*
+ * Truncate a file handle at a 64-bit position 'where'.
+ */
+
+int tool_ftruncate64(int fd, curl_off_t where)
+{
+ if(_lseeki64(fd, where, SEEK_SET) < 0)
+ return -1;
+
+ if(!SetEndOfFile((HANDLE)_get_osfhandle(fd)))
+ return -1;
+
+ return 0;
+}
+
+#endif /* WIN32 && ! __MINGW64__ */
+
diff --git a/src/tool_cb_see.h b/src/tool_cb_see.h
new file mode 100644
index 00000000..ceb22d65
--- /dev/null
+++ b/src/tool_cb_see.h
@@ -0,0 +1,46 @@
+#ifndef HEADER_CURL_TOOL_CB_SEE_H
+#define HEADER_CURL_TOOL_CB_SEE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#if defined(WIN32) && !defined(__MINGW64__)
+
+int tool_ftruncate64(int fd, curl_off_t where);
+
+#undef ftruncate
+#define ftruncate(fd,where) tool_ftruncate64(fd,where)
+
+#ifndef HAVE_FTRUNCATE
+# define HAVE_FTRUNCATE 1
+#endif
+
+#endif /* WIN32 && ! __MINGW64__ */
+
+/*
+** callback for CURLOPT_SEEKFUNCTION
+*/
+
+int tool_seek_cb(void *userdata, curl_off_t offset, int whence);
+
+#endif /* HEADER_CURL_TOOL_CB_SEE_H */
+
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
new file mode 100644
index 00000000..9be393ff
--- /dev/null
+++ b/src/tool_cb_wrt.c
@@ -0,0 +1,159 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+#include "tool_cb_wrt.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* create a local file for writing, return TRUE on success */
+bool tool_create_output_file(struct OutStruct *outs)
+{
+ struct GlobalConfig *global = outs->config->global;
+ FILE *file;
+
+ if(!outs->filename || !*outs->filename) {
+ warnf(global, "Remote filename has no length!\n");
+ return FALSE;
+ }
+
+ if(outs->is_cd_filename) {
+ /* don't overwrite existing files */
+ file = fopen(outs->filename, "rb");
+ if(file) {
+ fclose(file);
+ warnf(global, "Refusing to overwrite %s: %s\n", outs->filename,
+ strerror(EEXIST));
+ return FALSE;
+ }
+ }
+
+ /* open file for writing */
+ file = fopen(outs->filename, "wb");
+ if(!file) {
+ warnf(global, "Failed to create the file %s: %s\n", outs->filename,
+ strerror(errno));
+ return FALSE;
+ }
+ outs->s_isreg = TRUE;
+ outs->fopened = TRUE;
+ outs->stream = file;
+ outs->bytes = 0;
+ outs->init = 0;
+ return TRUE;
+}
+
+/*
+** callback for CURLOPT_WRITEFUNCTION
+*/
+
+size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
+{
+ size_t rc;
+ struct OutStruct *outs = userdata;
+ struct OperationConfig *config = outs->config;
+
+ /*
+ * Once that libcurl has called back tool_write_cb() the returned value
+ * is checked against the amount that was intended to be written, if
+ * it does not match then it fails with CURLE_WRITE_ERROR. So at this
+ * point returning a value different from sz*nmemb indicates failure.
+ */
+ const size_t failure = (sz * nmemb) ? 0 : 1;
+
+ if(!config)
+ return failure;
+
+#ifdef DEBUGBUILD
+ if(config->include_headers) {
+ if(sz * nmemb > (size_t)CURL_MAX_HTTP_HEADER) {
+ warnf(config->global, "Header data size exceeds single call write "
+ "limit!\n");
+ return failure;
+ }
+ }
+ else {
+ if(sz * nmemb > (size_t)CURL_MAX_WRITE_SIZE) {
+ warnf(config->global, "Data size exceeds single call write limit!\n");
+ return failure;
+ }
+ }
+
+ {
+ /* Some internal congruency checks on received OutStruct */
+ bool check_fails = FALSE;
+ if(outs->filename) {
+ /* regular file */
+ if(!*outs->filename)
+ check_fails = TRUE;
+ if(!outs->s_isreg)
+ check_fails = TRUE;
+ if(outs->fopened && !outs->stream)
+ check_fails = TRUE;
+ if(!outs->fopened && outs->stream)
+ check_fails = TRUE;
+ if(!outs->fopened && outs->bytes)
+ check_fails = TRUE;
+ }
+ else {
+ /* standard stream */
+ if(!outs->stream || outs->s_isreg || outs->fopened)
+ check_fails = TRUE;
+ if(outs->alloc_filename || outs->is_cd_filename || outs->init)
+ check_fails = TRUE;
+ }
+ if(check_fails) {
+ warnf(config->global, "Invalid output struct data for write callback\n");
+ return failure;
+ }
+ }
+#endif
+
+ if(!outs->stream && !tool_create_output_file(outs))
+ return failure;
+
+ rc = fwrite(buffer, sz, nmemb, outs->stream);
+
+ if((sz * nmemb) == rc)
+ /* we added this amount of data to the output */
+ outs->bytes += (sz * nmemb);
+
+ if(config->readbusy) {
+ config->readbusy = FALSE;
+ curl_easy_pause(config->easy, CURLPAUSE_CONT);
+ }
+
+ if(config->nobuffer) {
+ /* output buffering disabled */
+ int res = fflush(outs->stream);
+ if(res)
+ return failure;
+ }
+
+ return rc;
+}
diff --git a/src/tool_cb_wrt.h b/src/tool_cb_wrt.h
new file mode 100644
index 00000000..ecbefa80
--- /dev/null
+++ b/src/tool_cb_wrt.h
@@ -0,0 +1,36 @@
+#ifndef HEADER_CURL_TOOL_CB_WRT_H
+#define HEADER_CURL_TOOL_CB_WRT_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/*
+** callback for CURLOPT_WRITEFUNCTION
+*/
+
+size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata);
+
+/* create a local file for writing, return TRUE on success */
+bool tool_create_output_file(struct OutStruct *outs);
+
+#endif /* HEADER_CURL_TOOL_CB_WRT_H */
+
diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c
new file mode 100644
index 00000000..ba6c468c
--- /dev/null
+++ b/src/tool_cfgable.c
@@ -0,0 +1,159 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_cfgable.h"
+#include "tool_main.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void config_init(struct OperationConfig* config)
+{
+ memset(config, 0, sizeof(struct OperationConfig));
+
+ config->postfieldsize = -1;
+ config->use_httpget = FALSE;
+ config->create_dirs = FALSE;
+ 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_present = FALSE;
+}
+
+static void free_config_fields(struct OperationConfig *config)
+{
+ struct getout *urlnode;
+
+ Curl_safefree(config->random_file);
+ Curl_safefree(config->egd_file);
+ Curl_safefree(config->useragent);
+ Curl_safefree(config->cookie);
+ Curl_safefree(config->cookiejar);
+ Curl_safefree(config->cookiefile);
+
+ Curl_safefree(config->postfields);
+ Curl_safefree(config->referer);
+
+ Curl_safefree(config->headerfile);
+ Curl_safefree(config->ftpport);
+ Curl_safefree(config->iface);
+
+ Curl_safefree(config->range);
+
+ Curl_safefree(config->userpwd);
+ Curl_safefree(config->tls_username);
+ Curl_safefree(config->tls_password);
+ Curl_safefree(config->tls_authtype);
+ Curl_safefree(config->proxyuserpwd);
+ Curl_safefree(config->proxy);
+
+ Curl_safefree(config->dns_ipv6_addr);
+ Curl_safefree(config->dns_ipv4_addr);
+ Curl_safefree(config->dns_interface);
+ Curl_safefree(config->dns_servers);
+
+ Curl_safefree(config->noproxy);
+
+ Curl_safefree(config->mail_from);
+ curl_slist_free_all(config->mail_rcpt);
+ Curl_safefree(config->mail_auth);
+
+ Curl_safefree(config->netrc_file);
+
+ urlnode = config->url_list;
+ while(urlnode) {
+ struct getout *next = urlnode->next;
+ Curl_safefree(urlnode->url);
+ Curl_safefree(urlnode->outfile);
+ Curl_safefree(urlnode->infile);
+ Curl_safefree(urlnode);
+ urlnode = next;
+ }
+ config->url_list = NULL;
+ config->url_last = NULL;
+ config->url_get = NULL;
+ config->url_out = NULL;
+
+ Curl_safefree(config->cipher_list);
+ Curl_safefree(config->cert);
+ Curl_safefree(config->cert_type);
+ 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);
+ Curl_safefree(config->pubkey);
+ Curl_safefree(config->hostpubmd5);
+ Curl_safefree(config->engine);
+
+ Curl_safefree(config->customrequest);
+ Curl_safefree(config->krblevel);
+
+ Curl_safefree(config->xoauth2_bearer);
+
+ Curl_safefree(config->unix_socket_path);
+ Curl_safefree(config->writeout);
+
+ curl_slist_free_all(config->quote);
+ curl_slist_free_all(config->postquote);
+ curl_slist_free_all(config->prequote);
+
+ curl_slist_free_all(config->headers);
+ curl_slist_free_all(config->proxyheaders);
+
+ if(config->httppost) {
+ curl_formfree(config->httppost);
+ config->httppost = NULL;
+ }
+ config->last_post = NULL;
+
+ curl_slist_free_all(config->telnet_options);
+ curl_slist_free_all(config->resolve);
+
+ Curl_safefree(config->socksproxy);
+ Curl_safefree(config->socks5_gssapi_service);
+ Curl_safefree(config->proxy_service_name);
+ Curl_safefree(config->service_name);
+
+ Curl_safefree(config->ftp_account);
+ Curl_safefree(config->ftp_alternative_to_user);
+}
+
+void config_free(struct OperationConfig *config)
+{
+ struct OperationConfig *last = config;
+
+ /* Free each of the structures in reverse order */
+ while(last) {
+ struct OperationConfig *prev = last->prev;
+
+ free_config_fields(last);
+ free(last);
+
+ last = prev;
+ }
+}
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h
new file mode 100644
index 00000000..048eb4ff
--- /dev/null
+++ b/src/tool_cfgable.h
@@ -0,0 +1,246 @@
+#ifndef HEADER_CURL_TOOL_CFGABLE_H
+#define HEADER_CURL_TOOL_CFGABLE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_sdecls.h"
+
+#include "tool_metalink.h"
+
+struct GlobalConfig;
+
+struct OperationConfig {
+ CURL *easy; /* A copy of the handle from GlobalConfig */
+ bool remote_time;
+ char *random_file;
+ char *egd_file;
+ char *useragent;
+ char *cookie; /* single line with specified cookies */
+ char *cookiejar; /* write to this file */
+ char *cookiefile; /* read from this file */
+ bool cookiesession; /* new session? */
+ bool encoding; /* Accept-Encoding please */
+ bool tr_encoding; /* Transfer-Encoding please */
+ unsigned long authtype; /* auth bitmask */
+ bool use_resume;
+ bool resume_from_current;
+ bool disable_epsv;
+ bool disable_eprt;
+ bool ftp_pret;
+ long proto;
+ bool proto_present;
+ long proto_redir;
+ bool proto_redir_present;
+ curl_off_t resume_from;
+ char *postfields;
+ curl_off_t postfieldsize;
+ char *referer;
+ double timeout;
+ double connecttimeout;
+ long maxredirs;
+ curl_off_t max_filesize;
+ char *headerfile;
+ char *ftpport;
+ char *iface;
+ int localport;
+ int localportrange;
+ unsigned short porttouse;
+ char *range;
+ long low_speed_limit;
+ long low_speed_time;
+ char *dns_servers; /* dot notation: 1.1.1.1;2.2.2.2 */
+ char *dns_interface; /* interface name */
+ char *dns_ipv4_addr; /* dot notation */
+ char *dns_ipv6_addr; /* dot notation */
+ char *userpwd;
+ char *login_options;
+ char *tls_username;
+ char *tls_password;
+ char *tls_authtype;
+ char *proxyuserpwd;
+ char *proxy;
+ int proxyver; /* set to CURLPROXY_HTTP* define */
+ char *noproxy;
+ char *mail_from;
+ struct curl_slist *mail_rcpt;
+ char *mail_auth;
+ bool sasl_ir; /* Enable/disable SASL initial response */
+ bool proxytunnel;
+ bool ftp_append; /* APPE on ftp */
+ bool use_ascii; /* select ascii or text transfer */
+ bool autoreferer; /* automatically set referer */
+ bool failonerror; /* fail on (HTTP) errors */
+ bool include_headers; /* send headers to data output */
+ bool no_body; /* don't get the body */
+ bool dirlistonly; /* only get the FTP dir list */
+ bool followlocation; /* follow http redirects */
+ bool unrestricted_auth; /* Continue to send authentication (user+password)
+ when following ocations, even when hostname
+ changed */
+ bool netrc_opt;
+ bool netrc;
+ char *netrc_file;
+ struct getout *url_list; /* point to the first node */
+ struct getout *url_last; /* point to the last/current node */
+ struct getout *url_get; /* point to the node to fill in URL */
+ struct getout *url_out; /* point to the node to fill in outfile */
+ char *cipher_list;
+ char *cert;
+ char *cert_type;
+ char *cacert;
+ char *capath;
+ char *crlfile;
+ char *pinnedpubkey;
+ char *key;
+ char *key_type;
+ char *key_passwd;
+ char *pubkey;
+ char *hostpubmd5;
+ char *engine;
+ bool crlf;
+ char *customrequest;
+ char *krblevel;
+ long httpversion;
+ bool nobuffer;
+ bool readbusy; /* set when reading input returns EAGAIN */
+ 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;
+ bool proxynegotiate;
+ bool proxyntlm;
+ bool proxydigest;
+ bool proxybasic;
+ bool proxyanyauth;
+ char *writeout; /* %-styled format string to output */
+ bool writeenv; /* write results to environment, if available */
+ struct curl_slist *quote;
+ struct curl_slist *postquote;
+ struct curl_slist *prequote;
+ long ssl_version;
+ long ip_version;
+ curl_TimeCond timecond;
+ time_t condtime;
+ struct curl_slist *headers;
+ struct curl_slist *proxyheaders;
+ struct curl_httppost *httppost;
+ struct curl_httppost *last_post;
+ struct curl_slist *telnet_options;
+ struct curl_slist *resolve;
+ HttpReq httpreq;
+
+ /* for bandwidth limiting features: */
+ curl_off_t sendpersecond; /* send to peer */
+ curl_off_t recvpersecond; /* receive from peer */
+
+ bool ftp_ssl;
+ bool ftp_ssl_reqd;
+ bool ftp_ssl_control;
+ bool ftp_ssl_ccc;
+ int ftp_ssl_ccc_mode;
+
+ char *socksproxy; /* set to server string */
+ int socksver; /* set to CURLPROXY_SOCKS* define */
+ char *socks5_gssapi_service; /* set service name for gssapi principal
+ * default rcmd */
+ char *proxy_service_name; /* set service name for proxy negotiation
+ * default HTTP */
+ int socks5_gssapi_nec ; /* The NEC reference server does not protect
+ * the encryption type exchange */
+ char *service_name; /* set negotiation service name
+ * default HTTP */
+
+ bool tcp_nodelay;
+ long req_retry; /* number of retries */
+ long retry_delay; /* delay between retries (in seconds) */
+ long retry_maxtime; /* maximum time to keep retrying */
+
+ char *ftp_account; /* for ACCT */
+ char *ftp_alternative_to_user; /* send command if USER/PASS fails */
+ int ftp_filemethod;
+ long tftp_blksize; /* TFTP BLKSIZE option */
+ bool ignorecl; /* --ignore-content-length */
+ bool disable_sessionid;
+
+ bool raw;
+ bool post301;
+ bool post302;
+ bool post303;
+ bool nokeepalive; /* for keepalive needs */
+ long alivetime;
+ bool content_disposition; /* use Content-disposition filename */
+
+ int default_node_flags; /* default flags to search for each 'node', which
+ is basically each given URL to transfer */
+
+ bool xattr; /* store metadata in extended attributes */
+ long gssapi_delegation;
+ bool ssl_allow_beast; /* allow this SSL vulnerability */
+
+ bool use_metalink; /* process given URLs as metalink XML file */
+ metalinkfile *metalinkfile_list; /* point to the first node */
+ metalinkfile *metalinkfile_last; /* point to the last/current node */
+#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 */
+ bool falsestart;
+ bool path_as_is;
+ struct GlobalConfig *global;
+ struct OperationConfig *prev;
+ struct OperationConfig *next; /* Always last in the struct */
+};
+
+struct GlobalConfig {
+ CURL *easy; /* Once we have one, we keep it here */
+ int showerror; /* -1 == unset, default => show errors
+ 0 => -s is used to NOT show errors
+ 1 => -S has been used to show errors */
+ bool mute; /* don't show messages, --silent given */
+ bool noprogress; /* don't show progress bar --silent given */
+ bool isatty; /* Updated internally if output is a tty */
+ FILE *errors; /* Error stream, defaults to stderr */
+ bool errors_fopened; /* Whether error stream isn't stderr */
+ char *trace_dump; /* file to dump the network trace to */
+ FILE *trace_stream;
+ bool trace_fopened;
+ trace tracetype;
+ bool tracetime; /* include timestamp? */
+ int progressmode; /* CURL_PROGRESS_BAR / CURL_PROGRESS_STATS */
+ char *libcurl; /* Output libcurl code to this file name */
+
+ struct OperationConfig *first;
+ struct OperationConfig *current;
+ struct OperationConfig *last; /* Always last in the struct */
+};
+
+void config_init(struct OperationConfig *config);
+void config_free(struct OperationConfig *config);
+
+#endif /* HEADER_CURL_TOOL_CFGABLE_H */
diff --git a/src/tool_convert.c b/src/tool_convert.c
new file mode 100644
index 00000000..ecce036a
--- /dev/null
+++ b/src/tool_convert.c
@@ -0,0 +1,150 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef CURL_DOES_CONVERSIONS
+
+#ifdef HAVE_ICONV
+# include <iconv.h>
+#endif
+
+#include "tool_convert.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef HAVE_ICONV
+
+/* curl tool iconv conversion descriptors */
+static iconv_t inbound_cd = (iconv_t)-1;
+static iconv_t outbound_cd = (iconv_t)-1;
+
+/* set default codesets for iconv */
+#ifndef CURL_ICONV_CODESET_OF_NETWORK
+# define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+#endif
+
+/*
+ * convert_to_network() is a curl tool function to convert
+ * from the host encoding to ASCII on non-ASCII platforms.
+ */
+CURLcode convert_to_network(char *buffer, size_t length)
+{
+ /* translate from the host encoding to the network encoding */
+ char *input_ptr, *output_ptr;
+ size_t res, in_bytes, out_bytes;
+
+ /* open an iconv conversion descriptor if necessary */
+ if(outbound_cd == (iconv_t)-1) {
+ outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
+ CURL_ICONV_CODESET_OF_HOST);
+ if(outbound_cd == (iconv_t)-1) {
+ return CURLE_CONV_FAILED;
+ }
+ }
+ /* call iconv */
+ input_ptr = output_ptr = buffer;
+ in_bytes = out_bytes = length;
+ res = iconv(outbound_cd, &input_ptr, &in_bytes,
+ &output_ptr, &out_bytes);
+ if((res == (size_t)-1) || (in_bytes != 0)) {
+ return CURLE_CONV_FAILED;
+ }
+
+ return CURLE_OK;
+}
+
+/*
+ * convert_from_network() is a curl tool function
+ * for performing ASCII conversions on non-ASCII platforms.
+ */
+CURLcode convert_from_network(char *buffer, size_t length)
+{
+ /* translate from the network encoding to the host encoding */
+ char *input_ptr, *output_ptr;
+ size_t res, in_bytes, out_bytes;
+
+ /* open an iconv conversion descriptor if necessary */
+ if(inbound_cd == (iconv_t)-1) {
+ inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+ CURL_ICONV_CODESET_OF_NETWORK);
+ if(inbound_cd == (iconv_t)-1) {
+ return CURLE_CONV_FAILED;
+ }
+ }
+ /* call iconv */
+ input_ptr = output_ptr = buffer;
+ in_bytes = out_bytes = length;
+ res = iconv(inbound_cd, &input_ptr, &in_bytes,
+ &output_ptr, &out_bytes);
+ if((res == (size_t)-1) || (in_bytes != 0)) {
+ return CURLE_CONV_FAILED;
+ }
+
+ return CURLE_OK;
+}
+
+void convert_cleanup(void)
+{
+ /* close iconv conversion descriptors */
+ if(inbound_cd != (iconv_t)-1)
+ (void)iconv_close(inbound_cd);
+ if(outbound_cd != (iconv_t)-1)
+ (void)iconv_close(outbound_cd);
+}
+
+#endif /* HAVE_ICONV */
+
+char convert_char(curl_infotype infotype, char this_char)
+{
+/* determine how this specific character should be displayed */
+ switch(infotype) {
+ case CURLINFO_DATA_IN:
+ case CURLINFO_DATA_OUT:
+ case CURLINFO_SSL_DATA_IN:
+ case CURLINFO_SSL_DATA_OUT:
+ /* data, treat as ASCII */
+ if((this_char >= 0x20) && (this_char < 0x7f)) {
+ /* printable ASCII hex value: convert to host encoding */
+ (void)convert_from_network(&this_char, 1);
+ }
+ else {
+ /* non-printable ASCII, use a replacement character */
+ return UNPRINTABLE_CHAR;
+ }
+ /* fall through to default */
+ default:
+ /* treat as host encoding */
+ if(ISPRINT(this_char)
+ && (this_char != '\t')
+ && (this_char != '\r')
+ && (this_char != '\n')) {
+ /* printable characters excluding tabs and line end characters */
+ return this_char;
+ }
+ break;
+ }
+ /* non-printable, use a replacement character */
+ return UNPRINTABLE_CHAR;
+}
+
+#endif /* CURL_DOES_CONVERSIONS */
+
diff --git a/src/tool_convert.h b/src/tool_convert.h
new file mode 100644
index 00000000..32d473f9
--- /dev/null
+++ b/src/tool_convert.h
@@ -0,0 +1,45 @@
+#ifndef HEADER_CURL_TOOL_CONVERT_H
+#define HEADER_CURL_TOOL_CONVERT_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef CURL_DOES_CONVERSIONS
+
+#ifdef HAVE_ICONV
+
+CURLcode convert_to_network(char *buffer, size_t length);
+CURLcode convert_from_network(char *buffer, size_t length);
+void convert_cleanup(void);
+
+#endif /* HAVE_ICONV */
+
+char convert_char(curl_infotype infotype, char this_char);
+
+#endif /* CURL_DOES_CONVERSIONS */
+
+#if !defined(CURL_DOES_CONVERSIONS) || !defined(HAVE_ICONV)
+#define convert_cleanup() Curl_nop_stmt
+#endif
+
+#endif /* HEADER_CURL_TOOL_CONVERT_H */
+
diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c
new file mode 100644
index 00000000..b6a8067c
--- /dev/null
+++ b/src/tool_dirhie.c
@@ -0,0 +1,147 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/stat.h>
+
+#ifdef WIN32
+# include <direct.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_dirhie.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef NETWARE
+# ifndef __NOVELL_LIBC__
+# define mkdir mkdir_510
+# endif
+#endif
+
+#ifdef WIN32
+# define mkdir(x,y) (mkdir)((x))
+# ifndef __POCC__
+# define F_OK 0
+# endif
+#endif
+
+static void show_dir_errno(FILE *errors, const char *name)
+{
+ switch(ERRNO) {
+#ifdef EACCES
+ case EACCES:
+ fprintf(errors, "You don't have permission to create %s.\n", name);
+ break;
+#endif
+#ifdef ENAMETOOLONG
+ case ENAMETOOLONG:
+ fprintf(errors, "The directory name %s is too long.\n", name);
+ break;
+#endif
+#ifdef EROFS
+ case EROFS:
+ fprintf(errors, "%s resides on a read-only file system.\n", name);
+ break;
+#endif
+#ifdef ENOSPC
+ case ENOSPC:
+ fprintf(errors, "No space left on the file system that will "
+ "contain the directory %s.\n", name);
+ break;
+#endif
+#ifdef EDQUOT
+ case EDQUOT:
+ fprintf(errors, "Cannot create directory %s because you "
+ "exceeded your quota.\n", name);
+ break;
+#endif
+ default :
+ fprintf(errors, "Error creating directory %s.\n", name);
+ break;
+ }
+}
+
+/*
+ * Create the needed directory hierarchy recursively in order to save
+ * multi-GETs in file output, ie:
+ * curl "http://my.site/dir[1-5]/file[1-5].txt" -o "dir#1/file#2.txt"
+ * should create all the dir* automagically
+ */
+
+CURLcode create_dir_hierarchy(const char *outfile, FILE *errors)
+{
+ char *tempdir;
+ char *tempdir2;
+ char *outdup;
+ char *dirbuildup;
+ CURLcode result = CURLE_OK;
+ size_t outlen;
+
+ outlen = strlen(outfile);
+ outdup = strdup(outfile);
+ if(!outdup)
+ return CURLE_OUT_OF_MEMORY;
+
+ dirbuildup = malloc(outlen + 1);
+ if(!dirbuildup) {
+ Curl_safefree(outdup);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ dirbuildup[0] = '\0';
+
+ tempdir = strtok(outdup, DIR_CHAR);
+
+ while(tempdir != NULL) {
+ tempdir2 = strtok(NULL, DIR_CHAR);
+ /* since strtok returns a token for the last word even
+ if not ending with DIR_CHAR, we need to prune it */
+ if(tempdir2 != NULL) {
+ size_t dlen = strlen(dirbuildup);
+ if(dlen)
+ snprintf(&dirbuildup[dlen], outlen - dlen, "%s%s", DIR_CHAR, tempdir);
+ else {
+ if(0 != strncmp(outdup, DIR_CHAR, 1))
+ strcpy(dirbuildup, tempdir);
+ else
+ snprintf(dirbuildup, outlen, "%s%s", DIR_CHAR, tempdir);
+ }
+ if(access(dirbuildup, F_OK) == -1) {
+ if(-1 == mkdir(dirbuildup, (mode_t)0000750)) {
+ show_dir_errno(errors, dirbuildup);
+ result = CURLE_WRITE_ERROR;
+ break; /* get out of loop */
+ }
+ }
+ }
+ tempdir = tempdir2;
+ }
+
+ Curl_safefree(dirbuildup);
+ Curl_safefree(outdup);
+
+ return result;
+}
+
diff --git a/src/tool_dirhie.h b/src/tool_dirhie.h
new file mode 100644
index 00000000..5f19575d
--- /dev/null
+++ b/src/tool_dirhie.h
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_TOOL_DIRHIE_H
+#define HEADER_CURL_TOOL_DIRHIE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+CURLcode create_dir_hierarchy(const char *outfile, FILE *errors);
+
+#endif /* HEADER_CURL_TOOL_DIRHIE_H */
+
diff --git a/src/tool_doswin.c b/src/tool_doswin.c
new file mode 100644
index 00000000..dd6e8bb8
--- /dev/null
+++ b/src/tool_doswin.c
@@ -0,0 +1,299 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#if defined(MSDOS) || defined(WIN32)
+
+#if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
+# include <libgen.h>
+#endif
+
+#ifdef WIN32
+# include "tool_cfgable.h"
+# include "tool_libinfo.h"
+#endif
+
+#include "tool_bname.h"
+#include "tool_doswin.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+ * Macros ALWAYS_TRUE and ALWAYS_FALSE are used to avoid compiler warnings.
+ */
+
+#define ALWAYS_TRUE (1)
+#define ALWAYS_FALSE (0)
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+# undef ALWAYS_TRUE
+# undef ALWAYS_FALSE
+# if (_MSC_VER < 1500)
+# define ALWAYS_TRUE (0, 1)
+# define ALWAYS_FALSE (1, 0)
+# else
+# define ALWAYS_TRUE \
+__pragma(warning(push)) \
+__pragma(warning(disable:4127)) \
+(1) \
+__pragma(warning(pop))
+# define ALWAYS_FALSE \
+__pragma(warning(push)) \
+__pragma(warning(disable:4127)) \
+(0) \
+__pragma(warning(pop))
+# endif
+#endif
+
+#ifdef WIN32
+# undef PATH_MAX
+# define PATH_MAX MAX_PATH
+#endif
+
+#ifndef S_ISCHR
+# ifdef S_IFCHR
+# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+# else
+# define S_ISCHR(m) (0) /* cannot tell if file is a device */
+# endif
+#endif
+
+#ifdef WIN32
+# define _use_lfn(f) ALWAYS_TRUE /* long file names always available */
+#elif !defined(__DJGPP__) || (__DJGPP__ < 2) /* DJGPP 2.0 has _use_lfn() */
+# define _use_lfn(f) ALWAYS_FALSE /* long file names never available */
+#elif defined(__DJGPP__)
+# include <fcntl.h> /* _use_lfn(f) prototype */
+#endif
+
+static const char *msdosify (const char *file_name);
+static char *rename_if_dos_device_name (char *file_name);
+
+/*
+ * sanitize_dos_name: returns a newly allocated string holding a
+ * valid file name which will be a transformation of given argument
+ * in case this wasn't already a valid file name.
+ *
+ * This function takes ownership of given argument, free'ing it before
+ * returning. Caller is responsible of free'ing returned string. Upon
+ * out of memory condition function returns NULL.
+ */
+
+char *sanitize_dos_name(char *file_name)
+{
+ char new_name[PATH_MAX];
+
+ if(!file_name)
+ return NULL;
+
+ if(strlen(file_name) >= PATH_MAX)
+ file_name[PATH_MAX-1] = '\0'; /* truncate it */
+
+ strcpy(new_name, msdosify(file_name));
+
+ Curl_safefree(file_name);
+
+ return strdup(rename_if_dos_device_name(new_name));
+}
+
+/* The following functions are taken with modification from the DJGPP
+ * port of tar 1.12. They use algorithms originally from DJTAR. */
+
+static const char *msdosify (const char *file_name)
+{
+ static char dos_name[PATH_MAX];
+ static const char illegal_chars_dos[] = ".+, ;=[]" /* illegal in DOS */
+ "|<>\\\":?*"; /* illegal in DOS & W95 */
+ static const char *illegal_chars_w95 = &illegal_chars_dos[8];
+ int idx, dot_idx;
+ const char *s = file_name;
+ char *d = dos_name;
+ const char *const dlimit = dos_name + sizeof(dos_name) - 1;
+ const char *illegal_aliens = illegal_chars_dos;
+ size_t len = sizeof(illegal_chars_dos) - 1;
+
+ /* Support for Windows 9X VFAT systems, when available. */
+ if(_use_lfn(file_name)) {
+ illegal_aliens = illegal_chars_w95;
+ len -= (illegal_chars_w95 - illegal_chars_dos);
+ }
+
+ /* Get past the drive letter, if any. */
+ if(s[0] >= 'A' && s[0] <= 'z' && s[1] == ':') {
+ *d++ = *s++;
+ *d++ = *s++;
+ }
+
+ for(idx = 0, dot_idx = -1; *s && d < dlimit; s++, d++) {
+ if(memchr(illegal_aliens, *s, len)) {
+ /* Dots are special: DOS doesn't allow them as the leading character,
+ and a file name cannot have more than a single dot. We leave the
+ first non-leading dot alone, unless it comes too close to the
+ beginning of the name: we want sh.lex.c to become sh_lex.c, not
+ sh.lex-c. */
+ if(*s == '.') {
+ if(idx == 0 && (s[1] == '/' || (s[1] == '.' && s[2] == '/'))) {
+ /* Copy "./" and "../" verbatim. */
+ *d++ = *s++;
+ if(*s == '.')
+ *d++ = *s++;
+ *d = *s;
+ }
+ else if(idx == 0)
+ *d = '_';
+ else if(dot_idx >= 0) {
+ if(dot_idx < 5) { /* 5 is a heuristic ad-hoc'ery */
+ d[dot_idx - idx] = '_'; /* replace previous dot */
+ *d = '.';
+ }
+ else
+ *d = '-';
+ }
+ else
+ *d = '.';
+
+ if(*s == '.')
+ dot_idx = idx;
+ }
+ else if(*s == '+' && s[1] == '+') {
+ if(idx - 2 == dot_idx) { /* .c++, .h++ etc. */
+ *d++ = 'x';
+ *d = 'x';
+ }
+ else {
+ /* libg++ etc. */
+ memcpy (d, "plus", 4);
+ d += 3;
+ }
+ s++;
+ idx++;
+ }
+ else
+ *d = '_';
+ }
+ else
+ *d = *s;
+ if(*s == '/') {
+ idx = 0;
+ dot_idx = -1;
+ }
+ else
+ idx++;
+ }
+
+ *d = '\0';
+ return dos_name;
+}
+
+static char *rename_if_dos_device_name (char *file_name)
+{
+ /* We could have a file whose name is a device on MS-DOS. Trying to
+ * retrieve such a file would fail at best and wedge us at worst. We need
+ * to rename such files. */
+ char *base;
+ struct_stat st_buf;
+ char fname[PATH_MAX];
+
+ strncpy(fname, file_name, PATH_MAX-1);
+ fname[PATH_MAX-1] = '\0';
+ base = basename(fname);
+ if(((stat(base, &st_buf)) == 0) && (S_ISCHR(st_buf.st_mode))) {
+ size_t blen = strlen(base);
+
+ if(strlen(fname) >= PATH_MAX-1) {
+ /* Make room for the '_' */
+ blen--;
+ base[blen] = '\0';
+ }
+ /* Prepend a '_'. */
+ memmove(base + 1, base, blen + 1);
+ base[0] = '_';
+ strcpy(file_name, fname);
+ }
+ return file_name;
+}
+
+#if defined(MSDOS) && (defined(__DJGPP__) || defined(__GO32__))
+
+/*
+ * Disable program default argument globbing. We do it on our own.
+ */
+char **__crt0_glob_function(char *arg)
+{
+ (void)arg;
+ return (char**)0;
+}
+
+#endif /* MSDOS && (__DJGPP__ || __GO32__) */
+
+#ifdef WIN32
+
+/*
+ * Function to find CACert bundle on a Win32 platform using SearchPath.
+ * (SearchPath is already declared via inclusions done in setup header file)
+ * (Use the ASCII version instead of the unicode one!)
+ * The order of the directories it searches is:
+ * 1. application's directory
+ * 2. current working directory
+ * 3. Windows System directory (e.g. C:\windows\system32)
+ * 4. Windows Directory (e.g. C:\windows)
+ * 5. all directories along %PATH%
+ *
+ * For WinXP and later search order actually depends on registry value:
+ * HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode
+ */
+
+CURLcode FindWin32CACert(struct OperationConfig *config,
+ const char *bundle_file)
+{
+ CURLcode result = CURLE_OK;
+
+ /* search and set cert file only if libcurl supports SSL */
+ if(curlinfo->features & CURL_VERSION_SSL) {
+
+ DWORD res_len;
+ DWORD buf_tchar_size = PATH_MAX + 1;
+ DWORD buf_bytes_size = sizeof(TCHAR) * buf_tchar_size;
+ char *ptr = NULL;
+
+ char *buf = malloc(buf_bytes_size);
+ if(!buf)
+ return CURLE_OUT_OF_MEMORY;
+ buf[0] = '\0';
+
+ res_len = SearchPathA(NULL, bundle_file, NULL, buf_tchar_size, buf, &ptr);
+ if(res_len > 0) {
+ Curl_safefree(config->cacert);
+ config->cacert = strdup(buf);
+ if(!config->cacert)
+ result = CURLE_OUT_OF_MEMORY;
+ }
+
+ Curl_safefree(buf);
+ }
+
+ return result;
+}
+
+#endif /* WIN32 */
+
+#endif /* MSDOS || WIN32 */
diff --git a/src/tool_doswin.h b/src/tool_doswin.h
new file mode 100644
index 00000000..cd216dbc
--- /dev/null
+++ b/src/tool_doswin.h
@@ -0,0 +1,46 @@
+#ifndef HEADER_CURL_TOOL_DOSWIN_H
+#define HEADER_CURL_TOOL_DOSWIN_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#if defined(MSDOS) || defined(WIN32)
+
+char *sanitize_dos_name(char *file_name);
+
+#if defined(MSDOS) && (defined(__DJGPP__) || defined(__GO32__))
+
+char **__crt0_glob_function(char *arg);
+
+#endif /* MSDOS && (__DJGPP__ || __GO32__) */
+
+#ifdef WIN32
+
+CURLcode FindWin32CACert(struct OperationConfig *config,
+ const char *bundle_file);
+
+#endif /* WIN32 */
+
+#endif /* MSDOS || WIN32 */
+
+#endif /* HEADER_CURL_TOOL_DOSWIN_H */
+
diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c
new file mode 100644
index 00000000..0482ef6a
--- /dev/null
+++ b/src/tool_easysrc.c
@@ -0,0 +1,229 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 CURL_DISABLE_LIBCURL_OPTION
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_easysrc.h"
+#include "tool_msgs.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* global variable definitions, for easy-interface source code generation */
+
+struct curl_slist *easysrc_decl = NULL; /* Variable declarations */
+struct curl_slist *easysrc_data = NULL; /* Build slists, forms etc. */
+struct curl_slist *easysrc_code = NULL; /* Setopt calls */
+struct curl_slist *easysrc_toohard = NULL; /* Unconvertible setopt */
+struct curl_slist *easysrc_clean = NULL; /* Clean up allocated data */
+int easysrc_form_count = 0;
+int easysrc_slist_count = 0;
+
+static const char *const srchead[]={
+ "/********* 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 <curl/curl.h>",
+ "",
+ "int main(int argc, char *argv[])",
+ "{",
+ " CURLcode ret;",
+ " CURL *hnd;",
+ NULL
+};
+/* easysrc_decl declarations come here */
+/* easysrc_data initialisations come here */
+/* easysrc_code statements come here */
+static const char *const srchard[]={
+ "/* 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.",
+ "",
+ NULL
+};
+static const char *const srcend[]={
+ "",
+ " return (int)ret;",
+ "}",
+ "/**** End of sample code ****/",
+ NULL
+};
+
+/* Clean up all source code if we run out of memory */
+static void easysrc_free(void)
+{
+ curl_slist_free_all(easysrc_decl);
+ easysrc_decl = NULL;
+ curl_slist_free_all(easysrc_data);
+ easysrc_data = NULL;
+ curl_slist_free_all(easysrc_code);
+ easysrc_code = NULL;
+ curl_slist_free_all(easysrc_toohard);
+ easysrc_toohard = NULL;
+ curl_slist_free_all(easysrc_clean);
+ easysrc_clean = NULL;
+}
+
+/* Add a source line to the main code or remarks */
+CURLcode easysrc_add(struct curl_slist **plist, const char *line)
+{
+ CURLcode ret = CURLE_OK;
+ struct curl_slist *list =
+ curl_slist_append(*plist, line);
+ if(!list) {
+ easysrc_free();
+ ret = CURLE_OUT_OF_MEMORY;
+ }
+ else
+ *plist = list;
+ return ret;
+}
+
+CURLcode easysrc_addf(struct curl_slist **plist, const char *fmt, ...)
+{
+ CURLcode ret;
+ char *bufp;
+ va_list ap;
+ va_start(ap, fmt);
+ bufp = curlx_mvaprintf(fmt, ap);
+ va_end(ap);
+ if(! bufp) {
+ ret = CURLE_OUT_OF_MEMORY;
+ }
+ else {
+ ret = easysrc_add(plist, bufp);
+ curl_free(bufp);
+ }
+ return ret;
+}
+
+#define CHKRET(v) do {CURLcode ret = (v); if(ret) return ret;} WHILE_FALSE
+
+CURLcode easysrc_init(void)
+{
+ CHKRET(easysrc_add(&easysrc_code,
+ "hnd = curl_easy_init();"));
+ return CURLE_OK;
+}
+
+CURLcode easysrc_perform(void)
+{
+ /* Note any setopt calls which we could not convert */
+ if(easysrc_toohard) {
+ int i;
+ struct curl_slist *ptr;
+ const char *c;
+ CHKRET(easysrc_add(&easysrc_code, ""));
+ /* Preamble comment */
+ for(i=0; ((c = srchard[i]) != NULL); i++)
+ CHKRET(easysrc_add(&easysrc_code, c));
+ /* Each unconverted option */
+ for(ptr=easysrc_toohard; ptr; ptr = ptr->next)
+ CHKRET(easysrc_add(&easysrc_code, ptr->data));
+ CHKRET(easysrc_add(&easysrc_code, ""));
+ CHKRET(easysrc_add(&easysrc_code, "*/"));
+
+ curl_slist_free_all(easysrc_toohard);
+ easysrc_toohard = NULL;
+ }
+
+ CHKRET(easysrc_add(&easysrc_code, ""));
+ CHKRET(easysrc_add(&easysrc_code, "ret = curl_easy_perform(hnd);"));
+ CHKRET(easysrc_add(&easysrc_code, ""));
+
+ return CURLE_OK;
+}
+
+CURLcode easysrc_cleanup(void)
+{
+ CHKRET(easysrc_add(&easysrc_code, "curl_easy_cleanup(hnd);"));
+ CHKRET(easysrc_add(&easysrc_code, "hnd = NULL;"));
+
+ return CURLE_OK;
+}
+
+void dumpeasysrc(struct GlobalConfig *config)
+{
+ struct curl_slist *ptr;
+ char *o = config->libcurl;
+
+ if(o) {
+ FILE *out;
+ bool fopened = FALSE;
+ if(strcmp(o, "-")) {
+ out = fopen(o, FOPEN_WRITETEXT);
+ fopened = TRUE;
+ }
+ else
+ out = stdout;
+ if(!out)
+ warnf(config, "Failed to open %s to write libcurl code!\n", o);
+ else {
+ int i;
+ const char *c;
+
+ for(i=0; ((c = srchead[i]) != NULL); i++)
+ fprintf(out, "%s\n", c);
+
+ /* Declare variables used for complex setopt values */
+ for(ptr=easysrc_decl; ptr; ptr = ptr->next)
+ fprintf(out, " %s\n", ptr->data);
+
+ /* Set up complex values for setopt calls */
+ if(easysrc_data) {
+ fprintf(out, "\n");
+
+ for(ptr=easysrc_data; ptr; ptr = ptr->next)
+ fprintf(out, " %s\n", ptr->data);
+ }
+
+ fprintf(out, "\n");
+ for(ptr=easysrc_code; ptr; ptr = ptr->next) {
+ if(ptr->data[0]) {
+ fprintf(out, " %s\n", ptr->data);
+ }
+ else {
+ fprintf(out, "\n");
+ }
+ }
+
+ for(ptr=easysrc_clean; ptr; ptr = ptr->next)
+ fprintf(out, " %s\n", ptr->data);
+
+ for(i=0; ((c = srcend[i]) != NULL); i++)
+ fprintf(out, "%s\n", c);
+
+ if(fopened)
+ fclose(out);
+ }
+ }
+
+ easysrc_free();
+}
+
+#endif /* CURL_DISABLE_LIBCURL_OPTION */
diff --git a/src/tool_easysrc.h b/src/tool_easysrc.h
new file mode 100644
index 00000000..07a4b787
--- /dev/null
+++ b/src/tool_easysrc.h
@@ -0,0 +1,48 @@
+#ifndef HEADER_CURL_TOOL_EASYSRC_H
+#define HEADER_CURL_TOOL_EASYSRC_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 CURL_DISABLE_LIBCURL_OPTION
+
+/* global variable declarations, for easy-interface source code generation */
+
+extern struct curl_slist *easysrc_decl; /* Variable declarations */
+extern struct curl_slist *easysrc_data; /* Build slists, forms etc. */
+extern struct curl_slist *easysrc_code; /* Setopt calls etc. */
+extern struct curl_slist *easysrc_toohard; /* Unconvertible setopt */
+extern struct curl_slist *easysrc_clean; /* Clean up (reverse order) */
+
+extern int easysrc_form_count; /* Number of curl_httppost variables */
+extern int easysrc_slist_count; /* Number of curl_slist variables */
+
+extern CURLcode easysrc_init(void);
+extern CURLcode easysrc_add(struct curl_slist **plist, const char *bupf);
+extern CURLcode easysrc_addf(struct curl_slist **plist, const char *fmt, ...);
+extern CURLcode easysrc_perform(void);
+extern CURLcode easysrc_cleanup(void);
+
+void dumpeasysrc(struct GlobalConfig *config);
+
+#endif /* CURL_DISABLE_LIBCURL_OPTION */
+
+#endif /* HEADER_CURL_TOOL_EASYSRC_H */
diff --git a/src/tool_formparse.c b/src/tool_formparse.c
new file mode 100644
index 00000000..f26f2595
--- /dev/null
+++ b/src/tool_formparse.c
@@ -0,0 +1,361 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_mfiles.h"
+#include "tool_msgs.h"
+#include "tool_formparse.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+
+/*
+ * helper function to get a word from form param
+ * after call get_parm_word, str either point to string end
+ * or point to any of end chars.
+ */
+static char *get_param_word(char **str, char **end_pos)
+{
+ char *ptr = *str;
+ char *word_begin = NULL;
+ char *ptr2;
+ char *escape = NULL;
+ const char *end_chars = ";,";
+
+ /* the first non-space char is here */
+ word_begin = ptr;
+ if(*ptr == '"') {
+ ++ptr;
+ while(*ptr) {
+ if(*ptr == '\\') {
+ if(ptr[1] == '\\' || ptr[1] == '"') {
+ /* remember the first escape position */
+ if(!escape)
+ escape = ptr;
+ /* skip escape of back-slash or double-quote */
+ ptr += 2;
+ continue;
+ }
+ }
+ if(*ptr == '"') {
+ *end_pos = ptr;
+ if(escape) {
+ /* has escape, we restore the unescaped string here */
+ ptr = ptr2 = escape;
+ do {
+ if(*ptr == '\\' && (ptr[1] == '\\' || ptr[1] == '"'))
+ ++ptr;
+ *ptr2++ = *ptr++;
+ }
+ while(ptr < *end_pos);
+ *end_pos = ptr2;
+ }
+ while(*ptr && NULL==strchr(end_chars, *ptr))
+ ++ptr;
+ *str = ptr;
+ return word_begin+1;
+ }
+ ++ptr;
+ }
+ /* end quote is missing, treat it as non-quoted. */
+ ptr = word_begin;
+ }
+
+ while(*ptr && NULL==strchr(end_chars, *ptr))
+ ++ptr;
+ *str = *end_pos = ptr;
+ return word_begin;
+}
+
+/***************************************************************************
+ *
+ * formparse()
+ *
+ * Reads a 'name=value' parameter and builds the appropriate linked list.
+ *
+ * Specify files to upload with 'name=@filename', or 'name=@"filename"'
+ * in case the filename contain ',' or ';'. Supports specified
+ * given Content-Type of the files. Such as ';type=<content-type>'.
+ *
+ * If literal_value is set, any initial '@' or '<' in the value string
+ * loses its special meaning, as does any embedded ';type='.
+ *
+ * You may specify more than one file for a single name (field). Specify
+ * multiple files by writing it like:
+ *
+ * 'name=@filename,filename2,filename3'
+ *
+ * or use double-quotes quote the filename:
+ *
+ * 'name=@"filename","filename2","filename3"'
+ *
+ * If you want content-types specified for each too, write them like:
+ *
+ * 'name=@filename;type=image/gif,filename2,filename3'
+ *
+ * If you want custom headers added for a single part, write them in a separate
+ * file and do like this:
+ *
+ * 'name=foo;headers=@headerfile' or why not
+ * 'name=@filemame;headers=@headerfile'
+ *
+ * To upload a file, but to fake the file name that will be included in the
+ * formpost, do like this:
+ *
+ * 'name=@filename;filename=/dev/null' or quote the faked filename like:
+ * 'name=@filename;filename="play, play, and play.txt"'
+ *
+ * If filename/path contains ',' or ';', it must be quoted by double-quotes,
+ * else curl will fail to figure out the correct filename. if the filename
+ * tobe quoted contains '"' or '\', '"' and '\' must be escaped by backslash.
+ *
+ * This function uses curl_formadd to fulfill it's job. Is heavily based on
+ * the old curl_formparse code.
+ *
+ ***************************************************************************/
+
+int formparse(struct OperationConfig *config,
+ const char *input,
+ struct curl_httppost **httppost,
+ struct curl_httppost **last_post,
+ bool literal_value)
+{
+ /* nextarg MUST be a string in the format 'name=contents' and we'll
+ build a linked list with the info */
+ char name[256];
+ char *contents = NULL;
+ char type_major[128] = "";
+ char type_minor[128] = "";
+ char *contp;
+ const char *type = NULL;
+ char *sep;
+
+ if((1 == sscanf(input, "%255[^=]=", name)) &&
+ ((contp = strchr(input, '=')) != NULL)) {
+ /* the input was using the correct format */
+
+ /* Allocate the contents */
+ contents = strdup(contp+1);
+ if(!contents) {
+ fprintf(config->global->errors, "out of memory\n");
+ return 1;
+ }
+ contp = contents;
+
+ if('@' == contp[0] && !literal_value) {
+
+ /* we use the @-letter to indicate file name(s) */
+
+ struct multi_files *multi_start = NULL;
+ struct multi_files *multi_current = NULL;
+
+ char *ptr = contp;
+ char *end = ptr + strlen(ptr);
+
+ do {
+ /* since this was a file, it may have a content-type specifier
+ at the end too, or a filename. Or both. */
+ char *filename = NULL;
+ char *word_end;
+ bool semicolon;
+
+ type = NULL;
+
+ ++ptr;
+ contp = get_param_word(&ptr, &word_end);
+ semicolon = (';' == *ptr) ? TRUE : FALSE;
+ *word_end = '\0'; /* terminate the contp */
+
+ /* have other content, continue parse */
+ while(semicolon) {
+ /* have type or filename field */
+ ++ptr;
+ while(*ptr && (ISSPACE(*ptr)))
+ ++ptr;
+
+ if(checkprefix("type=", ptr)) {
+ /* set type pointer */
+ type = &ptr[5];
+
+ /* verify that this is a fine type specifier */
+ if(2 != sscanf(type, "%127[^/]/%127[^;,\n]",
+ type_major, type_minor)) {
+ warnf(config->global,
+ "Illegally formatted content-type field!\n");
+ Curl_safefree(contents);
+ FreeMultiInfo(&multi_start, &multi_current);
+ return 2; /* illegal content-type syntax! */
+ }
+
+ /* now point beyond the content-type specifier */
+ sep = (char *)type + strlen(type_major)+strlen(type_minor)+1;
+
+ /* there's a semicolon following - we check if it is a filename
+ specified and if not we simply assume that it is text that
+ the user wants included in the type and include that too up
+ to the next sep. */
+ ptr = sep;
+ if(*sep==';') {
+ if(!checkprefix(";filename=", sep)) {
+ ptr = sep + 1;
+ (void)get_param_word(&ptr, &sep);
+ semicolon = (';' == *ptr) ? TRUE : FALSE;
+ }
+ }
+ else
+ semicolon = FALSE;
+
+ if(*sep)
+ *sep = '\0'; /* zero terminate type string */
+ }
+ else if(checkprefix("filename=", ptr)) {
+ ptr += 9;
+ filename = get_param_word(&ptr, &word_end);
+ semicolon = (';' == *ptr) ? TRUE : FALSE;
+ *word_end = '\0';
+ }
+ else {
+ /* unknown prefix, skip to next block */
+ char *unknown = NULL;
+ unknown = get_param_word(&ptr, &word_end);
+ semicolon = (';' == *ptr) ? TRUE : FALSE;
+ if(*unknown) {
+ *word_end = '\0';
+ warnf(config->global, "skip unknown form field: %s\n", unknown);
+ }
+ }
+ }
+ /* now ptr point to comma or string end */
+
+
+ /* if type == NULL curl_formadd takes care of the problem */
+
+ if(*contp && !AddMultiFiles(contp, type, filename, &multi_start,
+ &multi_current)) {
+ warnf(config->global, "Error building form post!\n");
+ Curl_safefree(contents);
+ FreeMultiInfo(&multi_start, &multi_current);
+ return 3;
+ }
+
+ /* *ptr could be '\0', so we just check with the string end */
+ } while(ptr < end); /* loop if there's another file name */
+
+ /* now we add the multiple files section */
+ if(multi_start) {
+ struct curl_forms *forms = NULL;
+ struct multi_files *start = multi_start;
+ unsigned int i, count = 0;
+ while(start) {
+ start = start->next;
+ ++count;
+ }
+ forms = malloc((count+1)*sizeof(struct curl_forms));
+ if(!forms) {
+ fprintf(config->global->errors, "Error building form post!\n");
+ Curl_safefree(contents);
+ FreeMultiInfo(&multi_start, &multi_current);
+ return 4;
+ }
+ for(i = 0, start = multi_start; i < count; ++i, start = start->next) {
+ forms[i].option = start->form.option;
+ forms[i].value = start->form.value;
+ }
+ forms[count].option = CURLFORM_END;
+ FreeMultiInfo(&multi_start, &multi_current);
+ if(curl_formadd(httppost, last_post,
+ CURLFORM_COPYNAME, name,
+ CURLFORM_ARRAY, forms, CURLFORM_END) != 0) {
+ warnf(config->global, "curl_formadd failed!\n");
+ Curl_safefree(forms);
+ Curl_safefree(contents);
+ return 5;
+ }
+ Curl_safefree(forms);
+ }
+ }
+ else {
+ struct curl_forms info[4];
+ int i = 0;
+ char *ct = literal_value ? NULL : strstr(contp, ";type=");
+
+ info[i].option = CURLFORM_COPYNAME;
+ info[i].value = name;
+ i++;
+
+ if(ct) {
+ info[i].option = CURLFORM_CONTENTTYPE;
+ info[i].value = &ct[6];
+ i++;
+ ct[0] = '\0'; /* zero terminate here */
+ }
+
+ if(contp[0]=='<' && !literal_value) {
+ info[i].option = CURLFORM_FILECONTENT;
+ info[i].value = contp+1;
+ i++;
+ info[i].option = CURLFORM_END;
+
+ if(curl_formadd(httppost, last_post,
+ CURLFORM_ARRAY, info, CURLFORM_END ) != 0) {
+ warnf(config->global, "curl_formadd failed, possibly the file %s is "
+ "bad!\n", contp + 1);
+ Curl_safefree(contents);
+ return 6;
+ }
+ }
+ else {
+#ifdef CURL_DOES_CONVERSIONS
+ if(convert_to_network(contp, strlen(contp))) {
+ warnf(config->global, "curl_formadd failed!\n");
+ Curl_safefree(contents);
+ return 7;
+ }
+#endif
+ info[i].option = CURLFORM_COPYCONTENTS;
+ info[i].value = contp;
+ i++;
+ info[i].option = CURLFORM_END;
+ if(curl_formadd(httppost, last_post,
+ CURLFORM_ARRAY, info, CURLFORM_END) != 0) {
+ warnf(config->global, "curl_formadd failed!\n");
+ Curl_safefree(contents);
+ return 8;
+ }
+ }
+ }
+
+ }
+ else {
+ warnf(config->global, "Illegally formatted input field!\n");
+ return 1;
+ }
+ Curl_safefree(contents);
+ return 0;
+}
diff --git a/src/tool_formparse.h b/src/tool_formparse.h
new file mode 100644
index 00000000..f7736264
--- /dev/null
+++ b/src/tool_formparse.h
@@ -0,0 +1,33 @@
+#ifndef HEADER_CURL_TOOL_FORMPARSE_H
+#define HEADER_CURL_TOOL_FORMPARSE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+int formparse(struct OperationConfig *config,
+ const char *input,
+ struct curl_httppost **httppost,
+ struct curl_httppost **last_post,
+ bool literal_value);
+
+#endif /* HEADER_CURL_TOOL_FORMPARSE_H */
+
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
new file mode 100644
index 00000000..c86e6b4b
--- /dev/null
+++ b/src/tool_getparam.c
@@ -0,0 +1,1918 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_binmode.h"
+#include "tool_cfgable.h"
+#include "tool_cb_prg.h"
+#include "tool_formparse.h"
+#include "tool_getparam.h"
+#include "tool_helpers.h"
+#include "tool_libinfo.h"
+#include "tool_metalink.h"
+#include "tool_msgs.h"
+#include "tool_paramhlp.h"
+#include "tool_parsecfg.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef MSDOS
+# define USE_WATT32
+#endif
+
+#define GetStr(str,val) do { \
+ if(*(str)) { \
+ free(*(str)); \
+ *(str) = NULL; \
+ } \
+ if((val)) { \
+ *(str) = strdup((val)); \
+ if(!(*(str))) \
+ return PARAM_NO_MEM; \
+ } \
+} WHILE_FALSE
+
+struct LongShort {
+ const char *letter; /* short name option */
+ const char *lname; /* long name option */
+ bool extraparam; /* whether it takes an additional argument */
+};
+
+static const struct LongShort aliases[]= {
+ /* all these ones, starting with "*" or "$" as a short-option have *no*
+ short option to mention. */
+ {"*", "url", TRUE},
+ {"*4", "dns-ipv4-addr", TRUE},
+ {"*6", "dns-ipv6-addr", TRUE},
+ {"*a", "random-file", TRUE},
+ {"*b", "egd-file", TRUE},
+ {"*B", "oauth2-bearer", TRUE},
+ {"*c", "connect-timeout", TRUE},
+ {"*d", "ciphers", TRUE},
+ {"*D", "dns-interface", TRUE},
+ {"*e", "disable-epsv", FALSE},
+ {"*E", "epsv", FALSE},
+ /* 'epsv' made like this to make --no-epsv and --epsv to work
+ although --disable-epsv is the documented option */
+#ifdef USE_ENVIRONMENT
+ {"*f", "environment", FALSE},
+#endif
+ {"*F", "dns-servers", TRUE},
+ {"*g", "trace", TRUE},
+ {"*G", "npn", FALSE},
+ {"*h", "trace-ascii", TRUE},
+ {"*H", "alpn", FALSE},
+ {"*i", "limit-rate", TRUE},
+ {"*j", "compressed", FALSE},
+ {"*J", "tr-encoding", FALSE},
+ {"*k", "digest", FALSE},
+ {"*l", "negotiate", FALSE},
+ {"*m", "ntlm", FALSE},
+ {"*M", "ntlm-wb", FALSE},
+ {"*n", "basic", FALSE},
+ {"*o", "anyauth", FALSE},
+#ifdef USE_WATT32
+ {"*p", "wdebug", FALSE},
+#endif
+ {"*q", "ftp-create-dirs", FALSE},
+ {"*r", "create-dirs", FALSE},
+ {"*s", "max-redirs", TRUE},
+ {"*t", "proxy-ntlm", FALSE},
+ {"*u", "crlf", FALSE},
+ {"*v", "stderr", TRUE},
+ {"*w", "interface", TRUE},
+ {"*x", "krb" , TRUE},
+ {"*x", "krb4" , TRUE},
+ /* 'krb4' is the previous name */
+ {"*y", "max-filesize", TRUE},
+ {"*z", "disable-eprt", FALSE},
+ {"*Z", "eprt", FALSE},
+ /* 'eprt' made like this to make --no-eprt and --eprt to work
+ although --disable-eprt is the documented option */
+ {"$a", "ftp-ssl", FALSE},
+ /* 'ftp-ssl' deprecated name since 7.20.0 */
+ {"$a", "ssl", FALSE},
+ /* 'ssl' new option name in 7.20.0, previously this was ftp-ssl */
+ {"$b", "ftp-pasv", FALSE},
+ {"$c", "socks5", TRUE},
+ {"$c", "socks", TRUE},
+ /* 'socks' is how the option once was documented but we prefer
+ the --socks5 version for explicit version */
+ {"$d", "tcp-nodelay", FALSE},
+ {"$e", "proxy-digest", FALSE},
+ {"$f", "proxy-basic", FALSE},
+ {"$g", "retry", TRUE},
+ {"$h", "retry-delay", TRUE},
+ {"$i", "retry-max-time", TRUE},
+ {"$k", "proxy-negotiate", FALSE},
+ {"$m", "ftp-account", TRUE},
+ {"$n", "proxy-anyauth", FALSE},
+ {"$o", "trace-time", FALSE},
+ {"$p", "ignore-content-length", FALSE},
+ {"$q", "ftp-skip-pasv-ip", FALSE},
+ {"$r", "ftp-method", TRUE},
+ {"$s", "local-port", TRUE},
+ {"$t", "socks4", TRUE},
+ {"$T", "socks4a", TRUE},
+ {"$u", "ftp-alternative-to-user", TRUE},
+ {"$v", "ftp-ssl-reqd", FALSE},
+ /* 'ftp-ssl-reqd' deprecated name since 7.20.0 */
+ {"$v", "ssl-reqd", FALSE},
+ /* 'ssl-reqd' new in 7.20.0, previously this was ftp-ssl-reqd */
+ {"$w", "sessionid", FALSE},
+ /* 'sessionid' listed as --no-sessionid in the help */
+ {"$x", "ftp-ssl-control", FALSE},
+ {"$y", "ftp-ssl-ccc", FALSE},
+ {"$j", "ftp-ssl-ccc-mode", TRUE},
+ {"$z", "libcurl", TRUE},
+ {"$#", "raw", FALSE},
+ {"$0", "post301", FALSE},
+ {"$1", "keepalive", FALSE},
+ /* 'keepalive' listed as --no-keepalive in the help */
+ {"$2", "socks5-hostname", TRUE},
+ {"$3", "keepalive-time", TRUE},
+ {"$4", "post302", FALSE},
+ {"$5", "noproxy", TRUE},
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+ {"$6", "socks5-gssapi-service", TRUE},
+ {"$7", "socks5-gssapi-nec", FALSE},
+ {"$O", "proxy-service-name", TRUE},
+ {"$P", "service-name", TRUE},
+#endif
+ {"$8", "proxy1.0", TRUE},
+ {"$9", "tftp-blksize", TRUE},
+ {"$A", "mail-from", TRUE},
+ {"$B", "mail-rcpt", TRUE},
+ {"$C", "ftp-pret", FALSE},
+ {"$D", "proto", TRUE},
+ {"$E", "proto-redir", TRUE},
+ {"$F", "resolve", TRUE},
+ {"$G", "delegation", TRUE},
+ {"$H", "mail-auth", TRUE},
+ {"$I", "post303", FALSE},
+ {"$J", "metalink", FALSE},
+ {"$K", "sasl-ir", FALSE},
+ {"$L", "test-event", FALSE},
+ {"$M", "unix-socket", TRUE},
+ {"$N", "path-as-is", FALSE},
+ {"0", "http1.0", FALSE},
+ {"01", "http1.1", FALSE},
+ {"02", "http2", FALSE},
+ {"1", "tlsv1", FALSE},
+ {"10", "tlsv1.0", FALSE},
+ {"11", "tlsv1.1", FALSE},
+ {"12", "tlsv1.2", FALSE},
+ {"2", "sslv2", FALSE},
+ {"3", "sslv3", FALSE},
+ {"4", "ipv4", FALSE},
+ {"6", "ipv6", FALSE},
+ {"a", "append", FALSE},
+ {"A", "user-agent", TRUE},
+ {"b", "cookie", TRUE},
+ {"B", "use-ascii", FALSE},
+ {"c", "cookie-jar", TRUE},
+ {"C", "continue-at", TRUE},
+ {"d", "data", TRUE},
+ {"dr", "data-raw", TRUE},
+ {"da", "data-ascii", TRUE},
+ {"db", "data-binary", TRUE},
+ {"de", "data-urlencode", TRUE},
+ {"D", "dump-header", TRUE},
+ {"e", "referer", TRUE},
+ {"E", "cert", TRUE},
+ {"Ea", "cacert", TRUE},
+ {"Eb", "cert-type", TRUE},
+ {"Ec", "key", TRUE},
+ {"Ed", "key-type", TRUE},
+ {"Ee", "pass", TRUE},
+ {"Ef", "engine", TRUE},
+ {"Eg", "capath ", TRUE},
+ {"Eh", "pubkey", TRUE},
+ {"Ei", "hostpubmd5", TRUE},
+ {"Ej", "crlfile", TRUE},
+ {"Ek", "tlsuser", TRUE},
+ {"El", "tlspassword", TRUE},
+ {"Em", "tlsauthtype", TRUE},
+ {"En", "ssl-allow-beast", FALSE},
+ {"Eo", "login-options", TRUE},
+ {"Ep", "pinnedpubkey", TRUE},
+ {"Eq", "cert-status", FALSE},
+ {"Er", "false-start", FALSE},
+ {"f", "fail", FALSE},
+ {"F", "form", TRUE},
+ {"Fs", "form-string", TRUE},
+ {"g", "globoff", FALSE},
+ {"G", "get", FALSE},
+ {"h", "help", FALSE},
+ {"H", "header", TRUE},
+ {"Hp", "proxy-header", TRUE},
+ {"i", "include", FALSE},
+ {"I", "head", FALSE},
+ {"j", "junk-session-cookies", FALSE},
+ {"J", "remote-header-name", FALSE},
+ {"k", "insecure", FALSE},
+ {"K", "config", TRUE},
+ {"l", "list-only", FALSE},
+ {"L", "location", FALSE},
+ {"Lt", "location-trusted", FALSE},
+ {"m", "max-time", TRUE},
+ {"M", "manual", FALSE},
+ {"n", "netrc", FALSE},
+ {"no", "netrc-optional", FALSE},
+ {"ne", "netrc-file", TRUE},
+ {"N", "buffer", FALSE},
+ /* 'buffer' listed as --no-buffer in the help */
+ {"o", "output", TRUE},
+ {"O", "remote-name", FALSE},
+ {"Oa", "remote-name-all", FALSE},
+ {"p", "proxytunnel", FALSE},
+ {"P", "ftpport", TRUE},
+ /* 'ftpport' old version */
+ {"P", "ftp-port", TRUE},
+ {"q", "disable", FALSE},
+ {"Q", "quote", TRUE},
+ {"r", "range", TRUE},
+ {"R", "remote-time", FALSE},
+ {"s", "silent", FALSE},
+ {"S", "show-error", FALSE},
+ {"t", "telnet-options", TRUE},
+ /* 'telnet-options' documented as telnet-option */
+ {"T", "upload-file", TRUE},
+ {"u", "user", TRUE},
+ {"U", "proxy-user", TRUE},
+ {"v", "verbose", FALSE},
+ {"V", "version", FALSE},
+ {"w", "write-out", TRUE},
+ {"x", "proxy", TRUE},
+ {"X", "request", TRUE},
+ {"X", "http-request", TRUE},
+ /* 'http-request' OBSOLETE VERSION */
+ {"Y", "speed-limit", TRUE},
+ {"y", "speed-time", TRUE},
+ {"z", "time-cond", TRUE},
+ {"#", "progress-bar", FALSE},
+ {":", "next", FALSE},
+ {"~", "xattr", FALSE},
+};
+
+/* Split the argument of -E to 'certname' and 'passphrase' separated by colon.
+ * We allow ':' and '\' to be escaped by '\' so that we can use certificate
+ * nicknames containing ':'. See <https://sourceforge.net/p/curl/bugs/1196/>
+ * for details. */
+#ifndef UNITTESTS
+static
+#endif
+void parse_cert_parameter(const char *cert_parameter,
+ char **certname,
+ char **passphrase)
+{
+ size_t param_length = strlen(cert_parameter);
+ size_t span;
+ const char *param_place = NULL;
+ char *certname_place = NULL;
+ *certname = NULL;
+ *passphrase = NULL;
+
+ /* most trivial assumption: cert_parameter is empty */
+ if(param_length == 0)
+ return;
+
+ /* next less trivial: cert_parameter contains no colon nor backslash; this
+ * means no passphrase was given and no characters escaped */
+ if(!strpbrk(cert_parameter, ":\\")) {
+ *certname = strdup(cert_parameter);
+ return;
+ }
+ /* deal with escaped chars; find unescaped colon if it exists */
+ certname_place = malloc(param_length + 1);
+ if(!certname_place)
+ return;
+
+ *certname = certname_place;
+ param_place = cert_parameter;
+ while(*param_place) {
+ span = strcspn(param_place, ":\\");
+ strncpy(certname_place, param_place, span);
+ param_place += span;
+ certname_place += span;
+ /* we just ate all the non-special chars. now we're on either a special
+ * char or the end of the string. */
+ switch(*param_place) {
+ case '\0':
+ break;
+ case '\\':
+ param_place++;
+ switch(*param_place) {
+ case '\0':
+ *certname_place++ = '\\';
+ break;
+ case '\\':
+ *certname_place++ = '\\';
+ param_place++;
+ break;
+ case ':':
+ *certname_place++ = ':';
+ param_place++;
+ break;
+ default:
+ *certname_place++ = '\\';
+ *certname_place++ = *param_place;
+ param_place++;
+ break;
+ }
+ break;
+ case ':':
+ /* Since we live in a world of weirdness and confusion, the win32
+ dudes can use : when using drive letters and thus c:\file:password
+ needs to work. In order not to break compatibility, we still use : as
+ separator, but we try to detect when it is used for a file name! On
+ windows. */
+#ifdef WIN32
+ if(param_place &&
+ (param_place == &cert_parameter[1]) &&
+ (cert_parameter[2] == '\\' || cert_parameter[2] == '/') &&
+ (ISALPHA(cert_parameter[0])) ) {
+ /* colon in the second column, followed by a backslash, and the
+ first character is an alphabetic letter:
+
+ this is a drive letter colon */
+ *certname_place++ = ':';
+ param_place++;
+ break;
+ }
+#endif
+ /* escaped colons and Windows drive letter colons were handled
+ * above; if we're still here, this is a separating colon */
+ param_place++;
+ if(strlen(param_place) > 0) {
+ *passphrase = strdup(param_place);
+ }
+ goto done;
+ }
+ }
+done:
+ *certname_place = '\0';
+}
+
+ParameterError getparameter(char *flag, /* f or -long-flag */
+ char *nextarg, /* NULL if unset */
+ bool *usedarg, /* set to TRUE if the arg
+ has been used */
+ struct GlobalConfig *global,
+ struct OperationConfig *config)
+{
+ char letter;
+ char subletter = '\0'; /* subletters can only occur on long options */
+ int rc;
+ const char *parse = NULL;
+ unsigned int j;
+ time_t now;
+ int hit = -1;
+ bool longopt = FALSE;
+ bool singleopt = FALSE; /* when true means '-o foo' used '-ofoo' */
+ ParameterError err;
+ bool toggle = TRUE; /* how to switch boolean options, on or off. Controlled
+ by using --OPTION or --no-OPTION */
+
+
+ if(('-' != flag[0]) ||
+ (('-' == flag[0]) && ('-' == flag[1]))) {
+ /* this should be a long name */
+ char *word = ('-' == flag[0]) ? flag+2 : flag;
+ size_t fnam = strlen(word);
+ int numhits = 0;
+
+ if(!strncmp(word, "no-", 3)) {
+ /* disable this option but ignore the "no-" part when looking for it */
+ word += 3;
+ toggle = FALSE;
+ }
+
+ for(j = 0; j < sizeof(aliases)/sizeof(aliases[0]); j++) {
+ if(curlx_strnequal(aliases[j].lname, word, fnam)) {
+ longopt = TRUE;
+ numhits++;
+ if(curlx_raw_equal(aliases[j].lname, word)) {
+ parse = aliases[j].letter;
+ hit = j;
+ numhits = 1; /* a single unique hit */
+ break;
+ }
+ parse = aliases[j].letter;
+ hit = j;
+ }
+ }
+ if(numhits > 1) {
+ /* this is at least the second match! */
+ return PARAM_OPTION_AMBIGUOUS;
+ }
+ if(hit < 0) {
+ return PARAM_OPTION_UNKNOWN;
+ }
+ }
+ else {
+ flag++; /* prefixed with one dash, pass it */
+ hit = -1;
+ parse = flag;
+ }
+
+ do {
+ /* we can loop here if we have multiple single-letters */
+
+ if(!longopt) {
+ letter = (char)*parse;
+ subletter='\0';
+ }
+ else {
+ letter = parse[0];
+ subletter = parse[1];
+ }
+ *usedarg = FALSE; /* default is that we don't use the arg */
+
+ if(hit < 0) {
+ for(j = 0; j < sizeof(aliases)/sizeof(aliases[0]); j++) {
+ if(letter == aliases[j].letter[0]) {
+ hit = j;
+ break;
+ }
+ }
+ if(hit < 0) {
+ return PARAM_OPTION_UNKNOWN;
+ }
+ }
+
+ if(aliases[hit].extraparam) {
+ /* this option requires an extra parameter */
+ if(!longopt && parse[1]) {
+ nextarg = (char *)&parse[1]; /* this is the actual extra parameter */
+ singleopt = TRUE; /* don't loop anymore after this */
+ }
+ else if(!nextarg)
+ return PARAM_REQUIRES_PARAMETER;
+ else
+ *usedarg = TRUE; /* mark it as used */
+ }
+
+ switch(letter) {
+ case '*': /* options without a short option */
+ switch(subletter) {
+ case '4': /* --dns-ipv4-addr */
+ /* addr in dot notation */
+ GetStr(&config->dns_ipv4_addr, nextarg);
+ break;
+ case '6': /* --dns-ipv6-addr */
+ /* addr in dot notation */
+ GetStr(&config->dns_ipv6_addr, nextarg);
+ break;
+ case 'a': /* random-file */
+ GetStr(&config->random_file, nextarg);
+ break;
+ case 'b': /* egd-file */
+ GetStr(&config->egd_file, nextarg);
+ break;
+ case 'B': /* XOAUTH2 Bearer */
+ GetStr(&config->xoauth2_bearer, nextarg);
+ break;
+ case 'c': /* connect-timeout */
+ err = str2udouble(&config->connecttimeout, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'd': /* ciphers */
+ GetStr(&config->cipher_list, nextarg);
+ break;
+ case 'D': /* --dns-interface */
+ /* interface name */
+ GetStr(&config->dns_interface, nextarg);
+ break;
+ case 'e': /* --disable-epsv */
+ config->disable_epsv = toggle;
+ break;
+ case 'E': /* --epsv */
+ config->disable_epsv = (!toggle)?TRUE:FALSE;
+ break;
+#ifdef USE_ENVIRONMENT
+ case 'f':
+ config->writeenv = toggle;
+ break;
+#endif
+ case 'F': /* --dns-servers */
+ /* IP addrs of DNS servers */
+ GetStr(&config->dns_servers, nextarg);
+ break;
+ case 'g': /* --trace */
+ GetStr(&global->trace_dump, nextarg);
+ if(global->tracetype && (global->tracetype != TRACE_BIN))
+ warnf(global, "--trace overrides an earlier trace/verbose option\n");
+ global->tracetype = TRACE_BIN;
+ break;
+ case 'G': /* --npn */
+ config->nonpn = (!toggle)?TRUE:FALSE;
+ break;
+ case 'h': /* --trace-ascii */
+ GetStr(&global->trace_dump, nextarg);
+ if(global->tracetype && (global->tracetype != TRACE_ASCII))
+ warnf(global,
+ "--trace-ascii overrides an earlier trace/verbose option\n");
+ global->tracetype = TRACE_ASCII;
+ break;
+ case 'H': /* --alpn */
+ config->noalpn = (!toggle)?TRUE:FALSE;
+ break;
+ case 'i': /* --limit-rate */
+ {
+ /* We support G, M, K too */
+ char *unit;
+ curl_off_t value = curlx_strtoofft(nextarg, &unit, 0);
+
+ if(!*unit)
+ unit = (char *)"b";
+ else if(strlen(unit) > 1)
+ unit = (char *)"w"; /* unsupported */
+
+ switch(*unit) {
+ case 'G':
+ case 'g':
+ value *= 1024*1024*1024;
+ break;
+ case 'M':
+ case 'm':
+ value *= 1024*1024;
+ break;
+ case 'K':
+ case 'k':
+ value *= 1024;
+ break;
+ case 'b':
+ case 'B':
+ /* for plain bytes, leave as-is */
+ break;
+ default:
+ warnf(global, "unsupported rate unit. Use G, M, K or B!\n");
+ return PARAM_BAD_USE;
+ }
+ config->recvpersecond = value;
+ config->sendpersecond = value;
+ }
+ break;
+
+ case 'j': /* --compressed */
+ if(toggle && !(curlinfo->features & CURL_VERSION_LIBZ))
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ config->encoding = toggle;
+ break;
+
+ case 'J': /* --tr-encoding */
+ config->tr_encoding = toggle;
+ break;
+
+ case 'k': /* --digest */
+ if(toggle)
+ config->authtype |= CURLAUTH_DIGEST;
+ else
+ config->authtype &= ~CURLAUTH_DIGEST;
+ break;
+
+ case 'l': /* --negotiate */
+ if(toggle) {
+ if(curlinfo->features & CURL_VERSION_SPNEGO)
+ config->authtype |= CURLAUTH_NEGOTIATE;
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ }
+ else
+ config->authtype &= ~CURLAUTH_NEGOTIATE;
+ break;
+
+ case 'm': /* --ntlm */
+ if(toggle) {
+ if(curlinfo->features & CURL_VERSION_NTLM)
+ config->authtype |= CURLAUTH_NTLM;
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ }
+ else
+ config->authtype &= ~CURLAUTH_NTLM;
+ break;
+
+ case 'M': /* --ntlm-wb */
+ if(toggle) {
+ if(curlinfo->features & CURL_VERSION_NTLM_WB)
+ config->authtype |= CURLAUTH_NTLM_WB;
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ }
+ else
+ config->authtype &= ~CURLAUTH_NTLM_WB;
+ break;
+
+ case 'n': /* --basic for completeness */
+ if(toggle)
+ config->authtype |= CURLAUTH_BASIC;
+ else
+ config->authtype &= ~CURLAUTH_BASIC;
+ break;
+
+ case 'o': /* --anyauth, let libcurl pick it */
+ if(toggle)
+ config->authtype = CURLAUTH_ANY;
+ /* --no-anyauth simply doesn't touch it */
+ break;
+
+#ifdef USE_WATT32
+ case 'p': /* --wdebug */
+ dbug_init();
+ break;
+#endif
+ case 'q': /* --ftp-create-dirs */
+ config->ftp_create_dirs = toggle;
+ break;
+
+ case 'r': /* --create-dirs */
+ config->create_dirs = toggle;
+ break;
+
+ case 's': /* --max-redirs */
+ /* specified max no of redirects (http(s)), this accepts -1 as a
+ special condition */
+ err = str2num(&config->maxredirs, nextarg);
+ if(err)
+ return err;
+ if(config->maxredirs < -1)
+ return PARAM_BAD_NUMERIC;
+ break;
+
+ case 't': /* --proxy-ntlm */
+ if(curlinfo->features & CURL_VERSION_NTLM)
+ config->proxyntlm = toggle;
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ break;
+
+ case 'u': /* --crlf */
+ /* LF -> CRLF conversion? */
+ config->crlf = toggle;
+ break;
+
+ case 'v': /* --stderr */
+ if(strcmp(nextarg, "-")) {
+ FILE *newfile = fopen(nextarg, FOPEN_WRITETEXT);
+ if(!newfile)
+ warnf(global, "Failed to open %s!\n", nextarg);
+ else {
+ if(global->errors_fopened)
+ fclose(global->errors);
+ global->errors = newfile;
+ global->errors_fopened = TRUE;
+ }
+ }
+ else
+ global->errors = stdout;
+ break;
+ case 'w': /* --interface */
+ /* interface */
+ GetStr(&config->iface, nextarg);
+ break;
+ case 'x': /* --krb */
+ /* kerberos level string */
+ if(curlinfo->features & CURL_VERSION_KERBEROS4)
+ GetStr(&config->krblevel, nextarg);
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ break;
+ case 'y': /* --max-filesize */
+ err = str2offset(&config->max_filesize, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'z': /* --disable-eprt */
+ config->disable_eprt = toggle;
+ break;
+ case 'Z': /* --eprt */
+ config->disable_eprt = (!toggle)?TRUE:FALSE;
+ break;
+
+ default: /* the URL! */
+ {
+ struct getout *url;
+ if(config->url_get || ((config->url_get = config->url_list) != NULL)) {
+ /* there's a node here, if it already is filled-in continue to find
+ an "empty" node */
+ while(config->url_get && (config->url_get->flags & GETOUT_URL))
+ config->url_get = config->url_get->next;
+ }
+
+ /* now there might or might not be an available node to fill in! */
+
+ if(config->url_get)
+ /* existing node */
+ url = config->url_get;
+ else
+ /* there was no free node, create one! */
+ url = new_getout(config);
+
+ if(!url)
+ return PARAM_NO_MEM;
+ else {
+ /* fill in the URL */
+ GetStr(&url->url, nextarg);
+ url->flags |= GETOUT_URL;
+ }
+ }
+ }
+ break;
+ case '$': /* more options without a short option */
+ switch(subletter) {
+ case 'a': /* --ftp-ssl */
+ if(toggle && !(curlinfo->features & CURL_VERSION_SSL))
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ config->ftp_ssl = toggle;
+ break;
+ case 'b': /* --ftp-pasv */
+ Curl_safefree(config->ftpport);
+ break;
+ case 'c': /* --socks5 specifies a socks5 proxy to use, and resolves
+ the name locally and passes on the resolved address */
+ GetStr(&config->socksproxy, nextarg);
+ config->socksver = CURLPROXY_SOCKS5;
+ break;
+ case 't': /* --socks4 specifies a socks4 proxy to use */
+ GetStr(&config->socksproxy, nextarg);
+ config->socksver = CURLPROXY_SOCKS4;
+ break;
+ case 'T': /* --socks4a specifies a socks4a proxy to use */
+ GetStr(&config->socksproxy, nextarg);
+ config->socksver = CURLPROXY_SOCKS4A;
+ break;
+ case '2': /* --socks5-hostname specifies a socks5 proxy and enables name
+ resolving with the proxy */
+ GetStr(&config->socksproxy, nextarg);
+ config->socksver = CURLPROXY_SOCKS5_HOSTNAME;
+ break;
+ case 'd': /* --tcp-nodelay option */
+ config->tcp_nodelay = toggle;
+ break;
+ case 'e': /* --proxy-digest */
+ config->proxydigest = toggle;
+ break;
+ case 'f': /* --proxy-basic */
+ config->proxybasic = toggle;
+ break;
+ case 'g': /* --retry */
+ err = str2unum(&config->req_retry, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'h': /* --retry-delay */
+ err = str2unum(&config->retry_delay, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'i': /* --retry-max-time */
+ err = str2unum(&config->retry_maxtime, nextarg);
+ if(err)
+ return err;
+ break;
+
+ case 'k': /* --proxy-negotiate */
+ if(curlinfo->features & CURL_VERSION_SPNEGO)
+ config->proxynegotiate = toggle;
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ break;
+
+ case 'm': /* --ftp-account */
+ GetStr(&config->ftp_account, nextarg);
+ break;
+ case 'n': /* --proxy-anyauth */
+ config->proxyanyauth = toggle;
+ break;
+ case 'o': /* --trace-time */
+ global->tracetime = toggle;
+ break;
+ case 'p': /* --ignore-content-length */
+ config->ignorecl = toggle;
+ break;
+ case 'q': /* --ftp-skip-pasv-ip */
+ config->ftp_skip_ip = toggle;
+ break;
+ case 'r': /* --ftp-method (undocumented at this point) */
+ config->ftp_filemethod = ftpfilemethod(config, nextarg);
+ break;
+ case 's': /* --local-port */
+ rc = sscanf(nextarg, "%d - %d",
+ &config->localport,
+ &config->localportrange);
+ if(!rc)
+ return PARAM_BAD_USE;
+ else if(rc == 1)
+ config->localportrange = 1; /* default number of ports to try */
+ else {
+ config->localportrange -= config->localport;
+ if(config->localportrange < 1) {
+ warnf(global, "bad range input\n");
+ return PARAM_BAD_USE;
+ }
+ }
+ break;
+ case 'u': /* --ftp-alternative-to-user */
+ GetStr(&config->ftp_alternative_to_user, nextarg);
+ break;
+ case 'v': /* --ftp-ssl-reqd */
+ if(toggle && !(curlinfo->features & CURL_VERSION_SSL))
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ config->ftp_ssl_reqd = toggle;
+ break;
+ case 'w': /* --no-sessionid */
+ config->disable_sessionid = (!toggle)?TRUE:FALSE;
+ break;
+ case 'x': /* --ftp-ssl-control */
+ if(toggle && !(curlinfo->features & CURL_VERSION_SSL))
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ config->ftp_ssl_control = toggle;
+ break;
+ case 'y': /* --ftp-ssl-ccc */
+ config->ftp_ssl_ccc = toggle;
+ if(!config->ftp_ssl_ccc_mode)
+ config->ftp_ssl_ccc_mode = CURLFTPSSL_CCC_PASSIVE;
+ break;
+ case 'j': /* --ftp-ssl-ccc-mode */
+ config->ftp_ssl_ccc = TRUE;
+ config->ftp_ssl_ccc_mode = ftpcccmethod(config, nextarg);
+ break;
+ case 'z': /* --libcurl */
+#ifdef CURL_DISABLE_LIBCURL_OPTION
+ warnf(global,
+ "--libcurl option was disabled at build-time!\n");
+ return PARAM_OPTION_UNKNOWN;
+#else
+ GetStr(&global->libcurl, nextarg);
+ break;
+#endif
+ case '#': /* --raw */
+ config->raw = toggle;
+ break;
+ case '0': /* --post301 */
+ config->post301 = toggle;
+ break;
+ case '1': /* --no-keepalive */
+ config->nokeepalive = (!toggle)?TRUE:FALSE;
+ break;
+ case '3': /* --keepalive-time */
+ err = str2unum(&config->alivetime, nextarg);
+ if(err)
+ return err;
+ break;
+ case '4': /* --post302 */
+ config->post302 = toggle;
+ break;
+ case 'I': /* --post303 */
+ config->post303 = toggle;
+ break;
+ case '5': /* --noproxy */
+ /* This specifies the noproxy list */
+ GetStr(&config->noproxy, nextarg);
+ break;
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+ case '6': /* --socks5-gssapi-service */
+ GetStr(&config->socks5_gssapi_service, nextarg);
+ break;
+ case '7': /* --socks5-gssapi-nec*/
+ config->socks5_gssapi_nec = toggle;
+ break;
+ case 'O': /* --proxy-service-name */
+ GetStr(&config->proxy_service_name, nextarg);
+ break;
+ case 'P': /* --service-name */
+ GetStr(&config->service_name, nextarg);
+ break;
+#endif
+ case '8': /* --proxy1.0 */
+ /* http 1.0 proxy */
+ GetStr(&config->proxy, nextarg);
+ config->proxyver = CURLPROXY_HTTP_1_0;
+ break;
+ case '9': /* --tftp-blksize */
+ err = str2unum(&config->tftp_blksize, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'A': /* --mail-from */
+ GetStr(&config->mail_from, nextarg);
+ break;
+ case 'B': /* --mail-rcpt */
+ /* append receiver to a list */
+ err = add2list(&config->mail_rcpt, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'C': /* --ftp-pret */
+ config->ftp_pret = toggle;
+ break;
+ case 'D': /* --proto */
+ config->proto_present = TRUE;
+ if(proto2num(config, &config->proto, nextarg))
+ return PARAM_BAD_USE;
+ break;
+ case 'E': /* --proto-redir */
+ config->proto_redir_present = TRUE;
+ if(proto2num(config, &config->proto_redir, nextarg))
+ return PARAM_BAD_USE;
+ break;
+ case 'F': /* --resolve */
+ err = add2list(&config->resolve, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'G': /* --delegation LEVEL */
+ config->gssapi_delegation = delegation(config, nextarg);
+ break;
+ case 'H': /* --mail-auth */
+ GetStr(&config->mail_auth, nextarg);
+ break;
+ case 'J': /* --metalink */
+ {
+#ifdef USE_METALINK
+ int mlmaj, mlmin, mlpatch;
+ metalink_get_version(&mlmaj, &mlmin, &mlpatch);
+ if((mlmaj*10000)+(mlmin*100)+mlpatch < CURL_REQ_LIBMETALINK_VERS) {
+ warnf(global,
+ "--metalink option cannot be used because the version of "
+ "the linked libmetalink library is too old. "
+ "Required: %d.%d.%d, found %d.%d.%d\n",
+ CURL_REQ_LIBMETALINK_MAJOR,
+ CURL_REQ_LIBMETALINK_MINOR,
+ CURL_REQ_LIBMETALINK_PATCH,
+ mlmaj, mlmin, mlpatch);
+ return PARAM_BAD_USE;
+ }
+ else
+ config->use_metalink = toggle;
+#else
+ warnf(global, "--metalink option is ignored because the binary is "
+ "built without the Metalink support.\n");
+#endif
+ break;
+ }
+ case 'K': /* --sasl-ir */
+ config->sasl_ir = toggle;
+ break;
+ case 'L': /* --test-event */
+#ifdef CURLDEBUG
+ config->test_event_based = toggle;
+#else
+ warnf(global, "--test-event is ignored unless a debug build!\n");
+#endif
+ break;
+ case 'M': /* --unix-socket */
+ GetStr(&config->unix_socket_path, nextarg);
+ break;
+ case 'N': /* --path-as-is */
+ config->path_as_is = toggle;
+ break;
+ }
+ break;
+ case '#': /* --progress-bar */
+ if(toggle)
+ global->progressmode = CURL_PROGRESS_BAR;
+ else
+ global->progressmode = CURL_PROGRESS_STATS;
+ break;
+ case ':': /* --next */
+ return PARAM_NEXT_OPERATION;
+ case '~': /* --xattr */
+ config->xattr = toggle;
+ break;
+ case '0': /* --http* options */
+ switch(subletter) {
+ case '\0':
+ /* HTTP version 1.0 */
+ config->httpversion = CURL_HTTP_VERSION_1_0;
+ break;
+ case '1':
+ /* HTTP version 1.1 */
+ config->httpversion = CURL_HTTP_VERSION_1_1;
+ break;
+ case '2':
+ /* HTTP version 2.0 */
+ config->httpversion = CURL_HTTP_VERSION_2_0;
+ break;
+ }
+ break;
+ case '1': /* --tlsv1* options */
+ switch(subletter) {
+ case '\0':
+ /* TLS version 1.x */
+ config->ssl_version = CURL_SSLVERSION_TLSv1;
+ break;
+ case '0':
+ /* TLS version 1.0 */
+ config->ssl_version = CURL_SSLVERSION_TLSv1_0;
+ break;
+ case '1':
+ /* TLS version 1.1 */
+ config->ssl_version = CURL_SSLVERSION_TLSv1_1;
+ break;
+ case '2':
+ /* TLS version 1.2 */
+ config->ssl_version = CURL_SSLVERSION_TLSv1_2;
+ break;
+ }
+ break;
+ case '2':
+ /* SSL version 2 */
+ config->ssl_version = CURL_SSLVERSION_SSLv2;
+ break;
+ case '3':
+ /* SSL version 3 */
+ config->ssl_version = CURL_SSLVERSION_SSLv3;
+ break;
+ case '4':
+ /* IPv4 */
+ config->ip_version = 4;
+ break;
+ case '6':
+ /* IPv6 */
+ config->ip_version = 6;
+ break;
+ case 'a':
+ /* This makes the FTP sessions use APPE instead of STOR */
+ config->ftp_append = toggle;
+ break;
+ case 'A':
+ /* This specifies the User-Agent name */
+ GetStr(&config->useragent, nextarg);
+ break;
+ case 'b': /* cookie string coming up: */
+ if(nextarg[0] == '@') {
+ nextarg++;
+ }
+ else if(strchr(nextarg, '=')) {
+ /* A cookie string must have a =-letter */
+ GetStr(&config->cookie, nextarg);
+ break;
+ }
+ /* We have a cookie file to read from! */
+ GetStr(&config->cookiefile, nextarg);
+ break;
+ case 'B':
+ /* use ASCII/text when transferring */
+ config->use_ascii = toggle;
+ break;
+ case 'c':
+ /* get the file name to dump all cookies in */
+ GetStr(&config->cookiejar, nextarg);
+ break;
+ case 'C':
+ /* This makes us continue an ftp transfer at given position */
+ if(!curlx_strequal(nextarg, "-")) {
+ err = str2offset(&config->resume_from, nextarg);
+ if(err)
+ return err;
+ config->resume_from_current = FALSE;
+ }
+ else {
+ config->resume_from_current = TRUE;
+ config->resume_from = 0;
+ }
+ config->use_resume=TRUE;
+ break;
+ case 'd':
+ /* postfield data */
+ {
+ char *postdata = NULL;
+ FILE *file;
+ size_t size = 0;
+ bool raw_mode = (subletter == 'r');
+
+ if(subletter == 'e') { /* --data-urlencode*/
+ /* [name]=[content], we encode the content part only
+ * [name]@[file name]
+ *
+ * Case 2: we first load the file using that name and then encode
+ * the content.
+ */
+ const char *p = strchr(nextarg, '=');
+ size_t nlen;
+ char is_file;
+ if(!p)
+ /* there was no '=' letter, check for a '@' instead */
+ p = strchr(nextarg, '@');
+ if(p) {
+ nlen = p - nextarg; /* length of the name part */
+ is_file = *p++; /* pass the separator */
+ }
+ else {
+ /* neither @ nor =, so no name and it isn't a file */
+ nlen = is_file = 0;
+ p = nextarg;
+ }
+ if('@' == is_file) {
+ /* a '@' letter, it means that a file name or - (stdin) follows */
+ if(curlx_strequal("-", p)) {
+ file = stdin;
+ set_binmode(stdin);
+ }
+ else {
+ file = fopen(p, "rb");
+ if(!file)
+ warnf(global,
+ "Couldn't read data from file \"%s\", this makes "
+ "an empty POST.\n", nextarg);
+ }
+
+ err = file2memory(&postdata, &size, file);
+
+ if(file && (file != stdin))
+ fclose(file);
+ if(err)
+ return err;
+ }
+ else {
+ GetStr(&postdata, p);
+ if(postdata)
+ size = strlen(postdata);
+ }
+
+ if(!postdata) {
+ /* no data from the file, point to a zero byte string to make this
+ get sent as a POST anyway */
+ postdata = strdup("");
+ if(!postdata)
+ return PARAM_NO_MEM;
+ size = 0;
+ }
+ else {
+ char *enc = curl_easy_escape(config->easy, postdata, (int)size);
+ Curl_safefree(postdata); /* no matter if it worked or not */
+ if(enc) {
+ /* now make a string with the name from above and append the
+ encoded string */
+ size_t outlen = nlen + strlen(enc) + 2;
+ char *n = malloc(outlen);
+ if(!n) {
+ curl_free(enc);
+ return PARAM_NO_MEM;
+ }
+ if(nlen > 0) { /* only append '=' if we have a name */
+ snprintf(n, outlen, "%.*s=%s", nlen, nextarg, enc);
+ size = outlen-1;
+ }
+ else {
+ strcpy(n, enc);
+ size = outlen-2; /* since no '=' was inserted */
+ }
+ curl_free(enc);
+ postdata = n;
+ }
+ else
+ return PARAM_NO_MEM;
+ }
+ }
+ else if('@' == *nextarg && !raw_mode) {
+ /* the data begins with a '@' letter, it means that a file name
+ or - (stdin) follows */
+ nextarg++; /* pass the @ */
+
+ if(curlx_strequal("-", nextarg)) {
+ file = stdin;
+ if(subletter == 'b') /* forced data-binary */
+ set_binmode(stdin);
+ }
+ else {
+ file = fopen(nextarg, "rb");
+ if(!file)
+ warnf(global, "Couldn't read data from file \"%s\", this makes "
+ "an empty POST.\n", nextarg);
+ }
+
+ if(subletter == 'b')
+ /* forced binary */
+ err = file2memory(&postdata, &size, file);
+ else {
+ err = file2string(&postdata, file);
+ if(postdata)
+ size = strlen(postdata);
+ }
+
+ if(file && (file != stdin))
+ fclose(file);
+ if(err)
+ return err;
+
+ if(!postdata) {
+ /* no data from the file, point to a zero byte string to make this
+ get sent as a POST anyway */
+ postdata = strdup("");
+ if(!postdata)
+ return PARAM_NO_MEM;
+ }
+ }
+ else {
+ GetStr(&postdata, nextarg);
+ if(postdata)
+ size = strlen(postdata);
+ }
+
+#ifdef CURL_DOES_CONVERSIONS
+ if(subletter != 'b') {
+ /* NOT forced binary, convert to ASCII */
+ if(convert_to_network(postdata, strlen(postdata))) {
+ Curl_safefree(postdata);
+ return PARAM_NO_MEM;
+ }
+ }
+#endif
+
+ if(config->postfields) {
+ /* we already have a string, we append this one with a separating
+ &-letter */
+ char *oldpost = config->postfields;
+ curl_off_t oldlen = config->postfieldsize;
+ curl_off_t newlen = oldlen + curlx_uztoso(size) + 2;
+ config->postfields = malloc((size_t)newlen);
+ if(!config->postfields) {
+ Curl_safefree(oldpost);
+ Curl_safefree(postdata);
+ return PARAM_NO_MEM;
+ }
+ memcpy(config->postfields, oldpost, (size_t)oldlen);
+ /* use byte value 0x26 for '&' to accommodate non-ASCII platforms */
+ config->postfields[oldlen] = '\x26';
+ memcpy(&config->postfields[oldlen+1], postdata, size);
+ config->postfields[oldlen+1+size] = '\0';
+ Curl_safefree(oldpost);
+ Curl_safefree(postdata);
+ config->postfieldsize += size+1;
+ }
+ else {
+ config->postfields = postdata;
+ config->postfieldsize = curlx_uztoso(size);
+ }
+ }
+ /*
+ We can't set the request type here, as this data might be used in
+ a simple GET if -G is used. Already or soon.
+
+ if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq)) {
+ Curl_safefree(postdata);
+ return PARAM_BAD_USE;
+ }
+ */
+ break;
+ case 'D':
+ /* dump-header to given file name */
+ GetStr(&config->headerfile, nextarg);
+ break;
+ case 'e':
+ {
+ char *ptr = strstr(nextarg, ";auto");
+ if(ptr) {
+ /* Automatic referer requested, this may be combined with a
+ set initial one */
+ config->autoreferer = TRUE;
+ *ptr = 0; /* zero terminate here */
+ }
+ else
+ config->autoreferer = FALSE;
+ GetStr(&config->referer, nextarg);
+ }
+ break;
+ case 'E':
+ switch(subletter) {
+ case 'a': /* CA info PEM file */
+ /* CA info PEM file */
+ GetStr(&config->cacert, nextarg);
+ break;
+ case 'b': /* cert file type */
+ GetStr(&config->cert_type, nextarg);
+ break;
+ case 'c': /* private key file */
+ GetStr(&config->key, nextarg);
+ break;
+ case 'd': /* private key file type */
+ GetStr(&config->key_type, nextarg);
+ break;
+ case 'e': /* private key passphrase */
+ GetStr(&config->key_passwd, nextarg);
+ cleanarg(nextarg);
+ break;
+ case 'f': /* crypto engine */
+ GetStr(&config->engine, nextarg);
+ if(config->engine && curlx_raw_equal(config->engine, "list"))
+ return PARAM_ENGINES_REQUESTED;
+ break;
+ case 'g': /* CA info PEM file */
+ /* CA cert directory */
+ GetStr(&config->capath, nextarg);
+ break;
+ case 'h': /* --pubkey public key file */
+ GetStr(&config->pubkey, nextarg);
+ break;
+ case 'i': /* --hostpubmd5 md5 of the host public key */
+ GetStr(&config->hostpubmd5, nextarg);
+ if(!config->hostpubmd5 || strlen(config->hostpubmd5) != 32)
+ return PARAM_BAD_USE;
+ break;
+ case 'j': /* CRL info PEM file */
+ /* CRL file */
+ GetStr(&config->crlfile, nextarg);
+ break;
+ case 'k': /* TLS username */
+ if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP)
+ GetStr(&config->tls_username, nextarg);
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ break;
+ case 'l': /* TLS password */
+ if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP)
+ GetStr(&config->tls_password, nextarg);
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ break;
+ case 'm': /* TLS authentication type */
+ if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP) {
+ GetStr(&config->tls_authtype, nextarg);
+ if(!strequal(config->tls_authtype, "SRP"))
+ return PARAM_LIBCURL_DOESNT_SUPPORT; /* only support TLS-SRP */
+ }
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ break;
+ case 'n': /* no empty SSL fragments, --ssl-allow-beast */
+ if(curlinfo->features & CURL_VERSION_SSL)
+ config->ssl_allow_beast = toggle;
+ break;
+
+ case 'o': /* --login-options */
+ 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;
+
+ case 'r': /* --false-start */
+ config->falsestart = TRUE;
+ break;
+
+ default: /* certificate file */
+ {
+ char *certname, *passphrase;
+ parse_cert_parameter(nextarg, &certname, &passphrase);
+ Curl_safefree(config->cert);
+ config->cert = certname;
+ if(passphrase) {
+ Curl_safefree(config->key_passwd);
+ config->key_passwd = passphrase;
+ }
+ cleanarg(nextarg);
+ }
+ }
+ break;
+ case 'f':
+ /* fail hard on errors */
+ config->failonerror = toggle;
+ break;
+ case 'F':
+ /* "form data" simulation, this is a little advanced so lets do our best
+ to sort this out slowly and carefully */
+ if(formparse(config,
+ nextarg,
+ &config->httppost,
+ &config->last_post,
+ (subletter=='s')?TRUE:FALSE)) /* 's' means literal string */
+ return PARAM_BAD_USE;
+ if(SetHTTPrequest(config, HTTPREQ_POST, &config->httpreq))
+ return PARAM_BAD_USE;
+ break;
+
+ case 'g': /* g disables URLglobbing */
+ config->globoff = toggle;
+ break;
+
+ case 'G': /* HTTP GET */
+ config->use_httpget = TRUE;
+ break;
+
+ case 'h': /* h for help */
+ if(toggle) {
+ return PARAM_HELP_REQUESTED;
+ }
+ /* we now actually support --no-help too! */
+ break;
+ case 'H':
+ /* A custom header to append to a list */
+ if(subletter == 'p') /* --proxy-header */
+ err = add2list(&config->proxyheaders, nextarg);
+ else
+ err = add2list(&config->headers, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'i':
+ config->include_headers = toggle; /* include the headers as well in the
+ general output stream */
+ break;
+ case 'j':
+ config->cookiesession = toggle;
+ break;
+ case 'I':
+ /*
+ * no_body will imply include_headers later on
+ */
+ config->no_body = toggle;
+ if(SetHTTPrequest(config,
+ (config->no_body)?HTTPREQ_HEAD:HTTPREQ_GET,
+ &config->httpreq))
+ return PARAM_BAD_USE;
+ break;
+ case 'J': /* --remote-header-name */
+ if(config->include_headers) {
+ warnf(global,
+ "--include and --remote-header-name cannot be combined.\n");
+ return PARAM_BAD_USE;
+ }
+ config->content_disposition = toggle;
+ break;
+ case 'k': /* allow insecure SSL connects */
+ config->insecure_ok = toggle;
+ break;
+ case 'K': /* parse config file */
+ if(parseconfig(nextarg, global))
+ warnf(global, "error trying read config from the '%s' file\n",
+ nextarg);
+ break;
+ case 'l':
+ config->dirlistonly = toggle; /* only list the names of the FTP dir */
+ break;
+ case 'L':
+ config->followlocation = toggle; /* Follow Location: HTTP headers */
+ switch (subletter) {
+ case 't':
+ /* Continue to send authentication (user+password) when following
+ * locations, even when hostname changed */
+ config->unrestricted_auth = toggle;
+ break;
+ }
+ break;
+ case 'm':
+ /* specified max time */
+ err = str2udouble(&config->timeout, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'M': /* M for manual, huge help */
+ if(toggle) { /* --no-manual shows no manual... */
+#ifdef USE_MANUAL
+ return PARAM_MANUAL_REQUESTED;
+#else
+ warnf(global,
+ "built-in manual was disabled at build-time!\n");
+ return PARAM_OPTION_UNKNOWN;
+#endif
+ }
+ break;
+ case 'n':
+ switch(subletter) {
+ case 'o': /* CA info PEM file */
+ /* use .netrc or URL */
+ config->netrc_opt = toggle;
+ break;
+ case 'e': /* netrc-file */
+ GetStr(&config->netrc_file, nextarg);
+ break;
+ default:
+ /* pick info from .netrc, if this is used for http, curl will
+ automatically enfore user+password with the request */
+ config->netrc = toggle;
+ break;
+ }
+ break;
+ case 'N':
+ /* disable the output I/O buffering. note that the option is called
+ --buffer but is mostly used in the negative form: --no-buffer */
+ if(longopt)
+ config->nobuffer = (!toggle)?TRUE:FALSE;
+ else
+ config->nobuffer = toggle;
+ break;
+ case 'O': /* --remote-name */
+ if(subletter == 'a') { /* --remote-name-all */
+ config->default_node_flags = toggle?GETOUT_USEREMOTE:0;
+ break;
+ }
+ /* fall-through! */
+ case 'o': /* --output */
+ /* output file */
+ {
+ struct getout *url;
+ if(config->url_out || ((config->url_out = config->url_list) != NULL)) {
+ /* there's a node here, if it already is filled-in continue to find
+ an "empty" node */
+ while(config->url_out && (config->url_out->flags & GETOUT_OUTFILE))
+ config->url_out = config->url_out->next;
+ }
+
+ /* now there might or might not be an available node to fill in! */
+
+ if(config->url_out)
+ /* existing node */
+ url = config->url_out;
+ else
+ /* there was no free node, create one! */
+ url = new_getout(config);
+
+ if(!url)
+ return PARAM_NO_MEM;
+ else {
+ /* fill in the outfile */
+ if('o' == letter) {
+ GetStr(&url->outfile, nextarg);
+ url->flags &= ~GETOUT_USEREMOTE; /* switch off */
+ }
+ else {
+ url->outfile = NULL; /* leave it */
+ if(toggle)
+ url->flags |= GETOUT_USEREMOTE; /* switch on */
+ else
+ url->flags &= ~GETOUT_USEREMOTE; /* switch off */
+ }
+ url->flags |= GETOUT_OUTFILE;
+ }
+ }
+ break;
+ case 'P':
+ /* This makes the FTP sessions use PORT instead of PASV */
+ /* use <eth0> or <192.168.10.10> style addresses. Anything except
+ this will make us try to get the "default" address.
+ NOTE: this is a changed behaviour since the released 4.1!
+ */
+ GetStr(&config->ftpport, nextarg);
+ break;
+ case 'p':
+ /* proxy tunnel for non-http protocols */
+ config->proxytunnel = toggle;
+ break;
+
+ case 'q': /* if used first, already taken care of, we do it like
+ this so we don't cause an error! */
+ break;
+ case 'Q':
+ /* QUOTE command to send to FTP server */
+ switch(nextarg[0]) {
+ case '-':
+ /* prefixed with a dash makes it a POST TRANSFER one */
+ nextarg++;
+ err = add2list(&config->postquote, nextarg);
+ break;
+ case '+':
+ /* prefixed with a plus makes it a just-before-transfer one */
+ nextarg++;
+ err = add2list(&config->prequote, nextarg);
+ break;
+ default:
+ err = add2list(&config->quote, nextarg);
+ break;
+ }
+ if(err)
+ return err;
+ break;
+ case 'r':
+ /* Specifying a range WITHOUT A DASH will create an illegal HTTP range
+ (and won't actually be range by definition). The man page previously
+ claimed that to be a good way, why this code is added to work-around
+ it. */
+ if(ISDIGIT(*nextarg) && !strchr(nextarg, '-')) {
+ char buffer[32];
+ curl_off_t off;
+ warnf(global,
+ "A specified range MUST include at least one dash (-). "
+ "Appending one for you!\n");
+ off = curlx_strtoofft(nextarg, NULL, 10);
+ snprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", off);
+ Curl_safefree(config->range);
+ config->range = strdup(buffer);
+ if(!config->range)
+ return PARAM_NO_MEM;
+ }
+ {
+ /* byte range requested */
+ char *tmp_range;
+ tmp_range = nextarg;
+ while(*tmp_range != '\0') {
+ if(!ISDIGIT(*tmp_range) && *tmp_range != '-' && *tmp_range != ',') {
+ warnf(global, "Invalid character is found in given range. "
+ "A specified range MUST have only digits in "
+ "\'start\'-\'stop\'. The server's response to this "
+ "request is uncertain.\n");
+ break;
+ }
+ tmp_range++;
+ }
+ /* byte range requested */
+ GetStr(&config->range, nextarg);
+ }
+ break;
+ case 'R':
+ /* use remote file's time */
+ config->remote_time = toggle;
+ break;
+ case 's':
+ /* don't show progress meter, don't show errors : */
+ if(toggle)
+ global->mute = global->noprogress = TRUE;
+ else
+ global->mute = global->noprogress = FALSE;
+ if(global->showerror < 0)
+ /* if still on the default value, set showerror to the reverse of
+ toggle. This is to allow -S and -s to be used in an independent
+ order but still have the same effect. */
+ global->showerror = (!toggle)?TRUE:FALSE; /* toggle off */
+ break;
+ case 'S':
+ /* show errors */
+ global->showerror = toggle?1:0; /* toggle on if used with -s */
+ break;
+ case 't':
+ /* Telnet options */
+ err = add2list(&config->telnet_options, nextarg);
+ if(err)
+ return err;
+ break;
+ case 'T':
+ /* we are uploading */
+ {
+ struct getout *url;
+ if(config->url_out || ((config->url_out = config->url_list) != NULL)) {
+ /* there's a node here, if it already is filled-in continue to find
+ an "empty" node */
+ while(config->url_out && (config->url_out->flags & GETOUT_UPLOAD))
+ config->url_out = config->url_out->next;
+ }
+
+ /* now there might or might not be an available node to fill in! */
+
+ if(config->url_out)
+ /* existing node */
+ url = config->url_out;
+ else
+ /* there was no free node, create one! */
+ url = new_getout(config);
+
+ if(!url)
+ return PARAM_NO_MEM;
+ else {
+ url->flags |= GETOUT_UPLOAD; /* mark -T used */
+ if(!*nextarg)
+ url->flags |= GETOUT_NOUPLOAD;
+ else {
+ /* "-" equals stdin, but keep the string around for now */
+ GetStr(&url->infile, nextarg);
+ }
+ }
+ }
+ break;
+ case 'u':
+ /* user:password */
+ GetStr(&config->userpwd, nextarg);
+ cleanarg(nextarg);
+ break;
+ case 'U':
+ /* Proxy user:password */
+ GetStr(&config->proxyuserpwd, nextarg);
+ cleanarg(nextarg);
+ break;
+ case 'v':
+ if(toggle) {
+ /* the '%' thing here will cause the trace get sent to stderr */
+ Curl_safefree(global->trace_dump);
+ global->trace_dump = strdup("%");
+ if(!global->trace_dump)
+ return PARAM_NO_MEM;
+ if(global->tracetype && (global->tracetype != TRACE_PLAIN))
+ warnf(global,
+ "-v, --verbose overrides an earlier trace/verbose option\n");
+ global->tracetype = TRACE_PLAIN;
+ }
+ else
+ /* verbose is disabled here */
+ global->tracetype = TRACE_NONE;
+ break;
+ case 'V':
+ if(toggle) /* --no-version yields no output! */
+ return PARAM_VERSION_INFO_REQUESTED;
+ break;
+
+ case 'w':
+ /* get the output string */
+ if('@' == *nextarg) {
+ /* the data begins with a '@' letter, it means that a file name
+ or - (stdin) follows */
+ FILE *file;
+ const char *fname;
+ nextarg++; /* pass the @ */
+ if(curlx_strequal("-", nextarg)) {
+ fname = "<stdin>";
+ file = stdin;
+ }
+ else {
+ fname = nextarg;
+ file = fopen(nextarg, FOPEN_READTEXT);
+ }
+ err = file2string(&config->writeout, file);
+ if(file && (file != stdin))
+ fclose(file);
+ if(err)
+ return err;
+ if(!config->writeout)
+ warnf(global, "Failed to read %s", fname);
+ }
+ else
+ GetStr(&config->writeout, nextarg);
+ break;
+ case 'x':
+ /* proxy */
+ GetStr(&config->proxy, nextarg);
+ config->proxyver = CURLPROXY_HTTP;
+ break;
+ case 'X':
+ /* set custom request */
+ GetStr(&config->customrequest, nextarg);
+ break;
+ case 'y':
+ /* low speed time */
+ err = str2unum(&config->low_speed_time, nextarg);
+ if(err)
+ return err;
+ if(!config->low_speed_limit)
+ config->low_speed_limit = 1;
+ break;
+ case 'Y':
+ /* low speed limit */
+ err = str2unum(&config->low_speed_limit, nextarg);
+ if(err)
+ return err;
+ if(!config->low_speed_time)
+ config->low_speed_time = 30;
+ break;
+ case 'z': /* time condition coming up */
+ switch(*nextarg) {
+ case '+':
+ nextarg++;
+ /* FALLTHROUGH */
+ default:
+ /* If-Modified-Since: (section 14.28 in RFC2068) */
+ config->timecond = CURL_TIMECOND_IFMODSINCE;
+ break;
+ case '-':
+ /* If-Unmodified-Since: (section 14.24 in RFC2068) */
+ config->timecond = CURL_TIMECOND_IFUNMODSINCE;
+ nextarg++;
+ break;
+ case '=':
+ /* Last-Modified: (section 14.29 in RFC2068) */
+ config->timecond = CURL_TIMECOND_LASTMOD;
+ nextarg++;
+ break;
+ }
+ now = time(NULL);
+ config->condtime=curl_getdate(nextarg, &now);
+ if(-1 == (int)config->condtime) {
+ /* now let's see if it is a file name to get the time from instead! */
+ struct_stat statbuf;
+ if(-1 == stat(nextarg, &statbuf)) {
+ /* failed, remove time condition */
+ config->timecond = CURL_TIMECOND_NONE;
+ warnf(global,
+ "Illegal date format for -z, --timecond (and not "
+ "a file name). Disabling time condition. "
+ "See curl_getdate(3) for valid date syntax.\n");
+ }
+ else {
+ /* pull the time out from the file */
+ config->condtime = statbuf.st_mtime;
+ }
+ }
+ break;
+ default: /* unknown flag */
+ return PARAM_OPTION_UNKNOWN;
+ }
+ hit = -1;
+
+ } while(!longopt && !singleopt && *++parse && !*usedarg);
+
+ return PARAM_OK;
+}
+
+ParameterError parse_args(struct GlobalConfig *config, int argc,
+ argv_item_t argv[])
+{
+ int i;
+ bool stillflags;
+ char *orig_opt = NULL;
+ ParameterError result = PARAM_OK;
+ struct OperationConfig *operation = config->first;
+
+ for(i = 1, stillflags = TRUE; i < argc && !result; i++) {
+ orig_opt = argv[i];
+
+ if(stillflags && ('-' == argv[i][0])) {
+ char *nextarg;
+ bool passarg;
+ char *flag = argv[i];
+
+ if(curlx_strequal("--", argv[i]))
+ /* This indicates the end of the flags and thus enables the
+ following (URL) argument to start with -. */
+ stillflags = FALSE;
+ else {
+ nextarg = (i < (argc - 1)) ? argv[i + 1] : NULL;
+
+ result = getparameter(flag, nextarg, &passarg, config, operation);
+ if(result == PARAM_NEXT_OPERATION) {
+ /* Reset result as PARAM_NEXT_OPERATION is only used here and not
+ returned from this function */
+ result = PARAM_OK;
+
+ if(operation->url_list && operation->url_list->url) {
+ /* Allocate the next config */
+ operation->next = malloc(sizeof(struct OperationConfig));
+ if(operation->next) {
+ /* Initialise the newly created config */
+ config_init(operation->next);
+
+ /* Copy the easy handle */
+ operation->next->easy = config->easy;
+
+ /* Set the global config pointer */
+ operation->next->global = config;
+
+ /* Update the last operation pointer */
+ config->last = operation->next;
+
+ /* Move onto the new config */
+ operation->next->prev = operation;
+ operation = operation->next;
+ }
+ else
+ result = PARAM_NO_MEM;
+ }
+ }
+ else if(!result && passarg)
+ i++; /* we're supposed to skip this */
+ }
+ }
+ else {
+ bool used;
+
+ /* Just add the URL please */
+ result = getparameter((char *)"--url", argv[i], &used, config,
+ operation);
+ }
+ }
+
+ if(result && result != PARAM_HELP_REQUESTED &&
+ result != PARAM_MANUAL_REQUESTED &&
+ result != PARAM_VERSION_INFO_REQUESTED &&
+ result != PARAM_ENGINES_REQUESTED) {
+ const char *reason = param2text(result);
+
+ if(orig_opt && !curlx_strequal(":", orig_opt))
+ helpf(config->errors, "option %s: %s\n", orig_opt, reason);
+ else
+ helpf(config->errors, "%s\n", reason);
+ }
+
+ return result;
+}
diff --git a/src/tool_getparam.h b/src/tool_getparam.h
new file mode 100644
index 00000000..ef4366b7
--- /dev/null
+++ b/src/tool_getparam.h
@@ -0,0 +1,62 @@
+#ifndef HEADER_CURL_TOOL_GETPARAM_H
+#define HEADER_CURL_TOOL_GETPARAM_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+typedef enum {
+ PARAM_OK = 0,
+ PARAM_OPTION_AMBIGUOUS,
+ PARAM_OPTION_UNKNOWN,
+ PARAM_REQUIRES_PARAMETER,
+ PARAM_BAD_USE,
+ PARAM_HELP_REQUESTED,
+ PARAM_MANUAL_REQUESTED,
+ PARAM_VERSION_INFO_REQUESTED,
+ PARAM_ENGINES_REQUESTED,
+ PARAM_GOT_EXTRA_PARAMETER,
+ PARAM_BAD_NUMERIC,
+ PARAM_NEGATIVE_NUMERIC,
+ PARAM_LIBCURL_DOESNT_SUPPORT,
+ PARAM_NO_MEM,
+ PARAM_NEXT_OPERATION,
+ PARAM_LAST
+} ParameterError;
+
+struct GlobalConfig;
+struct OperationConfig;
+
+ParameterError getparameter(char *flag, char *nextarg, bool *usedarg,
+ struct GlobalConfig *global,
+ struct OperationConfig *operation);
+
+#ifdef UNITTESTS
+void parse_cert_parameter(const char *cert_parameter,
+ char **certname,
+ char **passphrase);
+#endif
+
+ParameterError parse_args(struct GlobalConfig *config, int argc,
+ argv_item_t argv[]);
+
+#endif /* HEADER_CURL_TOOL_GETPARAM_H */
+
diff --git a/src/tool_getpass.c b/src/tool_getpass.c
new file mode 100644
index 00000000..0f7ed01f
--- /dev/null
+++ b/src/tool_getpass.c
@@ -0,0 +1,256 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_GETPASS_R
+/* this file is only for systems without getpass_r() */
+
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#ifdef HAVE_TERMIOS_H
+# include <termios.h>
+#elif defined(HAVE_TERMIO_H)
+# include <termio.h>
+#endif
+
+#ifdef __VMS
+# include descrip
+# include starlet
+# include iodef
+#endif
+
+#ifdef WIN32
+# include <conio.h>
+#endif
+
+#ifdef NETWARE
+# ifdef __NOVELL_LIBC__
+# include <screen.h>
+# else
+# include <nwconio.h>
+# endif
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include "tool_getpass.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef __VMS
+/* VMS implementation */
+char *getpass_r(const char *prompt, char *buffer, size_t buflen)
+{
+ long sts;
+ short chan;
+
+ /* MSK, 23-JAN-2004, iosbdef.h wasn't in VAX V7.2 or CC 6.4 */
+ /* distribution so I created this. May revert back later to */
+ /* struct _iosb iosb; */
+ struct _iosb
+ {
+ short int iosb$w_status; /* status */
+ short int iosb$w_bcnt; /* byte count */
+ int unused; /* unused */
+ } iosb;
+
+ $DESCRIPTOR(ttdesc, "TT");
+
+ buffer[0] = '\0';
+ sts = sys$assign(&ttdesc, &chan, 0, 0);
+ if(sts & 1) {
+ sts = sys$qiow(0, chan,
+ IO$_READPROMPT | IO$M_NOECHO,
+ &iosb, 0, 0, buffer, buflen, 0, 0,
+ prompt, strlen(prompt));
+
+ if((sts & 1) && (iosb.iosb$w_status & 1))
+ buffer[iosb.iosb$w_bcnt] = '\0';
+
+ sts = sys$dassgn(chan);
+ }
+ return buffer; /* we always return success */
+}
+#define DONE
+#endif /* __VMS */
+
+#ifdef __SYMBIAN32__
+# define getch() getchar()
+#endif
+
+#if defined(WIN32) || defined(__SYMBIAN32__)
+
+char *getpass_r(const char *prompt, char *buffer, size_t buflen)
+{
+ size_t i;
+ fputs(prompt, stderr);
+
+ for(i = 0; i < buflen; i++) {
+ buffer[i] = (char)getch();
+ if(buffer[i] == '\r' || buffer[i] == '\n') {
+ buffer[i] = '\0';
+ break;
+ }
+ else
+ if(buffer[i] == '\b')
+ /* remove this letter and if this is not the first key, remove the
+ previous one as well */
+ i = i - (i >= 1 ? 2 : 1);
+ }
+#ifndef __SYMBIAN32__
+ /* since echo is disabled, print a newline */
+ fputs("\n", stderr);
+#endif
+ /* if user didn't hit ENTER, terminate buffer */
+ if(i == buflen)
+ buffer[buflen-1] = '\0';
+
+ return buffer; /* we always return success */
+}
+#define DONE
+#endif /* WIN32 || __SYMBIAN32__ */
+
+#ifdef NETWARE
+/* NetWare implementation */
+#ifdef __NOVELL_LIBC__
+char *getpass_r(const char *prompt, char *buffer, size_t buflen)
+{
+ return getpassword(prompt, buffer, buflen);
+}
+#else
+char *getpass_r(const char *prompt, char *buffer, size_t buflen)
+{
+ size_t i = 0;
+
+ printf("%s", prompt);
+ do {
+ buffer[i++] = getch();
+ if(buffer[i-1] == '\b') {
+ /* remove this letter and if this is not the first key,
+ remove the previous one as well */
+ if(i > 1) {
+ printf("\b \b");
+ i = i - 2;
+ }
+ else {
+ RingTheBell();
+ i = i - 1;
+ }
+ }
+ else if(buffer[i-1] != 13)
+ putchar('*');
+
+ } while((buffer[i-1] != 13) && (i < buflen));
+ buffer[i-1] = '\0';
+ printf("\r\n");
+ return buffer;
+}
+#endif /* __NOVELL_LIBC__ */
+#define DONE
+#endif /* NETWARE */
+
+#ifndef DONE /* not previously provided */
+
+#ifdef HAVE_TERMIOS_H
+# define struct_term struct termios
+#elif defined(HAVE_TERMIO_H)
+# define struct_term struct termio
+#else
+# undef struct_term
+#endif
+
+static bool ttyecho(bool enable, int fd)
+{
+#ifdef struct_term
+ static struct_term withecho;
+ static struct_term noecho;
+#endif
+ if(!enable) {
+ /* disable echo by extracting the current 'withecho' mode and remove the
+ ECHO bit and set back the struct */
+#ifdef HAVE_TERMIOS_H
+ tcgetattr(fd, &withecho);
+ noecho = withecho;
+ noecho.c_lflag &= ~ECHO;
+ tcsetattr(fd, TCSANOW, &noecho);
+#elif defined(HAVE_TERMIO_H)
+ ioctl(fd, TCGETA, &withecho);
+ noecho = withecho;
+ noecho.c_lflag &= ~ECHO;
+ ioctl(fd, TCSETA, &noecho);
+#else
+ /* neither HAVE_TERMIO_H nor HAVE_TERMIOS_H, we can't disable echo! */
+ (void)fd;
+ return FALSE; /* not disabled */
+#endif
+ return TRUE; /* disabled */
+ }
+ else {
+ /* re-enable echo, assumes we disabled it before (and set the structs we
+ now use to reset the terminal status) */
+#ifdef HAVE_TERMIOS_H
+ tcsetattr(fd, TCSAFLUSH, &withecho);
+#elif defined(HAVE_TERMIO_H)
+ ioctl(fd, TCSETA, &withecho);
+#else
+ return FALSE; /* not enabled */
+#endif
+ return TRUE; /* enabled */
+ }
+}
+
+char *getpass_r(const char *prompt, /* prompt to display */
+ char *password, /* buffer to store password in */
+ size_t buflen) /* size of buffer to store password in */
+{
+ ssize_t nread;
+ bool disabled;
+ int fd = open("/dev/tty", O_RDONLY);
+ if(-1 == fd)
+ fd = STDIN_FILENO; /* use stdin if the tty couldn't be used */
+
+ disabled = ttyecho(FALSE, fd); /* disable terminal echo */
+
+ fputs(prompt, stderr);
+ nread = read(fd, password, buflen);
+ if(nread > 0)
+ password[--nread] = '\0'; /* zero terminate where enter is stored */
+ else
+ password[0] = '\0'; /* got nothing */
+
+ if(disabled) {
+ /* if echo actually was disabled, add a newline */
+ fputs("\n", stderr);
+ (void)ttyecho(TRUE, fd); /* enable echo */
+ }
+
+ if(STDIN_FILENO != fd)
+ close(fd);
+
+ return password; /* return pointer to buffer */
+}
+
+#endif /* DONE */
+#endif /* HAVE_GETPASS_R */
diff --git a/src/tool_getpass.h b/src/tool_getpass.h
new file mode 100644
index 00000000..d4fc7e23
--- /dev/null
+++ b/src/tool_getpass.h
@@ -0,0 +1,36 @@
+#ifndef HEADER_CURL_TOOL_GETPASS_H
+#define HEADER_CURL_TOOL_GETPASS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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_GETPASS_R
+/* If there's a system-provided function named like this, we trust it is
+ also found in one of the standard headers. */
+
+/*
+ * Returning NULL will abort the continued operation!
+ */
+char* getpass_r(const char *prompt, char* buffer, size_t buflen);
+#endif
+
+#endif /* HEADER_CURL_TOOL_GETPASS_H */
diff --git a/src/tool_help.c b/src/tool_help.c
new file mode 100644
index 00000000..46ae341f
--- /dev/null
+++ b/src/tool_help.c
@@ -0,0 +1,345 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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_panykey.h"
+#include "tool_help.h"
+#include "tool_libinfo.h"
+#include "tool_version.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef MSDOS
+# define USE_WATT32
+#endif
+
+/*
+ * A few of these source lines are >80 columns wide, but that's only because
+ * breaking the strings narrower makes this chunk look even worse!
+ *
+ * Starting with 7.18.0, this list of command line options is sorted based
+ * on the long option name. It is not done automatically, although a command
+ * line like the following can help out:
+ *
+ * curl --help | cut -c5- | grep "^-" | sort
+ */
+
+static const char *const helptext[] = {
+ "Usage: curl [options...] <url>",
+ "Options: (H) means HTTP/HTTPS only, (F) means FTP only",
+ " --anyauth Pick \"any\" authentication method (H)",
+ " -a, --append Append to target file when uploading (F/SFTP)",
+ " --basic Use HTTP Basic Authentication (H)",
+ " --cacert FILE CA certificate to verify peer against (SSL)",
+ " --capath DIR CA directory to verify peer against (SSL)",
+ " -E, --cert CERT[:PASSWD] Client certificate file and password (SSL)",
+ " --cert-status Verify the status of the server certificate (SSL)",
+ " --cert-type TYPE Certificate file type (DER/PEM/ENG) (SSL)",
+ " --ciphers LIST SSL ciphers to use (SSL)",
+ " --compressed Request compressed response (using deflate or gzip)",
+ " -K, --config FILE Read config from FILE",
+ " --connect-timeout SECONDS Maximum time allowed for connection",
+ " -C, --continue-at OFFSET Resumed transfer OFFSET",
+ " -b, --cookie STRING/FILE Read cookies from STRING/FILE (H)",
+ " -c, --cookie-jar FILE Write cookies to FILE after operation (H)",
+ " --create-dirs Create necessary local directory hierarchy",
+ " --crlf Convert LF to CRLF in upload",
+ " --crlfile FILE Get a CRL list in PEM format from the given file",
+ " -d, --data DATA HTTP POST data (H)",
+ " --data-raw DATA HTTP POST data, '@' allowed (H)",
+ " --data-ascii DATA HTTP POST ASCII data (H)",
+ " --data-binary DATA HTTP POST binary data (H)",
+ " --data-urlencode DATA HTTP POST data url encoded (H)",
+ " --delegation STRING GSS-API delegation permission",
+ " --digest Use HTTP Digest Authentication (H)",
+ " --disable-eprt Inhibit using EPRT or LPRT (F)",
+ " --disable-epsv Inhibit using EPSV (F)",
+ " --dns-servers DNS server addrs to use: 1.1.1.1;2.2.2.2",
+ " --dns-interface Interface to use for DNS requests",
+ " --dns-ipv4-addr IPv4 address to use for DNS requests, dot notation",
+ " --dns-ipv6-addr IPv6 address to use for DNS requests, dot notation",
+ " -D, --dump-header FILE Write the headers to FILE",
+ " --egd-file FILE EGD socket path for random data (SSL)",
+ " --engine ENGINE Crypto engine (use \"--engine list\" for list) (SSL)",
+#ifdef USE_ENVIRONMENT
+ " --environment Write results to environment variables (RISC OS)",
+#endif
+ " -f, --fail Fail silently (no output at all) on HTTP errors (H)",
+ " --false-start Enable TLS False Start.",
+ " -F, --form CONTENT Specify HTTP multipart POST data (H)",
+ " --form-string STRING Specify HTTP multipart POST data (H)",
+ " --ftp-account DATA Account data string (F)",
+ " --ftp-alternative-to-user COMMAND "
+ "String to replace \"USER [name]\" (F)",
+ " --ftp-create-dirs Create the remote dirs if not present (F)",
+ " --ftp-method [MULTICWD/NOCWD/SINGLECWD] Control CWD usage (F)",
+ " --ftp-pasv Use PASV/EPSV instead of PORT (F)",
+ " -P, --ftp-port ADR Use PORT with given address instead of PASV (F)",
+ " --ftp-skip-pasv-ip Skip the IP address for PASV (F)\n"
+ " --ftp-pret Send PRET before PASV (for drftpd) (F)",
+ " --ftp-ssl-ccc Send CCC after authenticating (F)",
+ " --ftp-ssl-ccc-mode ACTIVE/PASSIVE Set CCC mode (F)",
+ " --ftp-ssl-control Require SSL/TLS for FTP login, "
+ "clear for transfer (F)",
+ " -G, --get Send the -d data with a HTTP GET (H)",
+ " -g, --globoff Disable URL sequences and ranges using {} and []",
+ " -H, --header LINE Pass custom header LINE to server (H)",
+ " -I, --head Show document info only",
+ " -h, --help This help text",
+ " --hostpubmd5 MD5 "
+ "Hex-encoded MD5 string of the host public key. (SSH)",
+ " -0, --http1.0 Use HTTP 1.0 (H)",
+ " --http1.1 Use HTTP 1.1 (H)",
+ " --http2 Use HTTP 2 (H)",
+ " --ignore-content-length Ignore the HTTP Content-Length header",
+ " -i, --include Include protocol headers in the output (H/F)",
+ " -k, --insecure Allow connections to SSL sites without certs (H)",
+ " --interface INTERFACE Use network INTERFACE (or address)",
+ " -4, --ipv4 Resolve name to IPv4 address",
+ " -6, --ipv6 Resolve name to IPv6 address",
+ " -j, --junk-session-cookies Ignore session cookies read from file (H)",
+ " --keepalive-time SECONDS Wait SECONDS between keepalive probes",
+ " --key KEY Private key file name (SSL/SSH)",
+ " --key-type TYPE Private key file type (DER/PEM/ENG) (SSL)",
+ " --krb LEVEL Enable Kerberos with security LEVEL (F)",
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+ " --libcurl FILE Dump libcurl equivalent code of this command line",
+#endif
+ " --limit-rate RATE Limit transfer speed to RATE",
+ " -l, --list-only List only mode (F/POP3)",
+ " --local-port RANGE Force use of RANGE for local port numbers",
+ " -L, --location Follow redirects (H)",
+ " --location-trusted "
+ "Like '--location', and send auth to other hosts (H)",
+ " --login-options OPTIONS Server login options (IMAP, POP3, SMTP)",
+ " -M, --manual Display the full manual",
+ " --mail-from FROM Mail from this address (SMTP)",
+ " --mail-rcpt TO Mail to this/these addresses (SMTP)",
+ " --mail-auth AUTH Originator address of the original email (SMTP)",
+ " --max-filesize BYTES Maximum file size to download (H/F)",
+ " --max-redirs NUM Maximum number of redirects allowed (H)",
+ " -m, --max-time SECONDS Maximum time allowed for the transfer",
+ " --metalink Process given URLs as metalink XML file",
+ " --negotiate Use HTTP Negotiate (SPNEGO) authentication (H)",
+ " -n, --netrc Must read .netrc for user name and password",
+ " --netrc-optional Use either .netrc or URL; overrides -n",
+ " --netrc-file FILE Specify FILE for netrc",
+ " -:, --next "
+ "Allows the following URL to use a separate set of options",
+ " --no-alpn Disable the ALPN TLS extension (H)",
+ " -N, --no-buffer Disable buffering of the output stream",
+ " --no-keepalive Disable keepalive use on the connection",
+ " --no-npn Disable the NPN TLS extension (H)",
+ " --no-sessionid Disable SSL session-ID reusing (SSL)",
+ " --noproxy List of hosts which do not use proxy",
+ " --ntlm Use HTTP NTLM authentication (H)",
+ " --oauth2-bearer TOKEN OAuth 2 Bearer Token (IMAP, POP3, SMTP)",
+ " -o, --output FILE Write to FILE instead of stdout",
+ " --pass PASS Pass phrase for the private key (SSL/SSH)",
+ " --path-as-is Do not squash .. sequences in URL path",
+ " --pinnedpubkey FILE Public key (PEM/DER) to verify peer against "
+ "(OpenSSL/GnuTLS/NSS/wolfSSL/CyaSSL/GSKit only)",
+ " --post301 "
+ "Do not switch to GET after following a 301 redirect (H)",
+ " --post302 "
+ "Do not switch to GET after following a 302 redirect (H)",
+ " --post303 "
+ "Do not switch to GET after following a 303 redirect (H)",
+ " -#, --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)",
+ " --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-ntlm Use NTLM authentication on the proxy (H)",
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+ " --proxy-service-name NAME SPNEGO proxy service name",
+ " --service-name NAME SPNEGO service name",
+#endif
+ " -U, --proxy-user USER[:PASSWORD] Proxy user and password",
+ " --proxy1.0 HOST[:PORT] Use HTTP/1.0 proxy on given port",
+ " -p, --proxytunnel Operate through a HTTP proxy tunnel (using CONNECT)",
+ " --pubkey KEY Public key file name (SSH)",
+ " -Q, --quote CMD Send command(s) to server before transfer (F/SFTP)",
+ " --random-file FILE File for reading random data from (SSL)",
+ " -r, --range RANGE Retrieve only the bytes within RANGE",
+ " --raw Do HTTP \"raw\"; no transfer decoding (H)",
+ " -e, --referer Referer URL (H)",
+ " -J, --remote-header-name Use the header-provided filename (H)",
+ " -O, --remote-name Write output to a file named as the remote file",
+ " --remote-name-all Use the remote file name for all URLs",
+ " -R, --remote-time Set the remote file's time on the local output",
+ " -X, --request COMMAND Specify request command to use",
+ " --resolve HOST:PORT:ADDRESS Force resolve of HOST:PORT to ADDRESS",
+ " --retry NUM "
+ "Retry request NUM times if transient problems occur",
+ " --retry-delay SECONDS Wait SECONDS between retries",
+ " --retry-max-time SECONDS Retry only within this period",
+ " --sasl-ir Enable initial response in SASL authentication",
+ " -S, --show-error "
+ "Show error. With -s, make curl show errors when they occur",
+ " -s, --silent Silent mode (don't output anything)",
+ " --socks4 HOST[:PORT] SOCKS4 proxy on given host + port",
+ " --socks4a HOST[:PORT] SOCKS4a proxy on given host + port",
+ " --socks5 HOST[:PORT] SOCKS5 proxy on given host + port",
+ " --socks5-hostname HOST[:PORT] "
+ "SOCKS5 proxy, pass host name to proxy",
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+ " --socks5-gssapi-service NAME SOCKS5 proxy service name for GSS-API",
+ " --socks5-gssapi-nec Compatibility with NEC SOCKS5 server",
+#endif
+ " -Y, --speed-limit RATE "
+ "Stop transfers below RATE for 'speed-time' secs",
+ " -y, --speed-time SECONDS "
+ "Trigger 'speed-limit' abort after SECONDS (default: 30)",
+ " --ssl Try SSL/TLS (FTP, IMAP, POP3, SMTP)",
+ " --ssl-reqd Require SSL/TLS (FTP, IMAP, POP3, SMTP)",
+ " -2, --sslv2 Use SSLv2 (SSL)",
+ " -3, --sslv3 Use SSLv3 (SSL)",
+ " --ssl-allow-beast Allow security flaw to improve interop (SSL)",
+ " --stderr FILE Where to redirect stderr (use \"-\" for 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)",
+ " -z, --time-cond TIME Transfer based on a time condition",
+ " -1, --tlsv1 Use => TLSv1 (SSL)",
+ " --tlsv1.0 Use TLSv1.0 (SSL)",
+ " --tlsv1.1 Use TLSv1.1 (SSL)",
+ " --tlsv1.2 Use TLSv1.2 (SSL)",
+ " --trace FILE Write a debug trace to FILE",
+ " --trace-ascii FILE Like --trace, but without hex output",
+ " --trace-time Add time stamps to trace/verbose output",
+ " --tr-encoding Request compressed transfer encoding (H)",
+ " -T, --upload-file FILE Transfer FILE to destination",
+ " --url URL URL to work with",
+ " -B, --use-ascii Use ASCII/text transfer",
+ " -u, --user USER[:PASSWORD] Server user and password",
+ " --tlsuser USER TLS username",
+ " --tlspassword STRING TLS password",
+ " --tlsauthtype STRING TLS authentication type (default: SRP)",
+ " --unix-socket FILE Connect through this Unix domain socket",
+ " -A, --user-agent STRING Send User-Agent STRING to server (H)",
+ " -v, --verbose Make the operation more talkative",
+ " -V, --version Show version number and quit",
+#ifdef USE_WATT32
+ " --wdebug Turn on Watt-32 debugging",
+#endif
+ " -w, --write-out FORMAT Use output FORMAT after completion",
+ " --xattr Store metadata in extended file attributes",
+ " -q Disable .curlrc (must be first parameter)",
+ NULL
+};
+
+#ifdef NETWARE
+# define PRINT_LINES_PAUSE 23
+#endif
+
+#ifdef __SYMBIAN32__
+# define PRINT_LINES_PAUSE 16
+#endif
+
+struct feat {
+ const char *name;
+ int bitmask;
+};
+
+static const struct feat feats[] = {
+ {"AsynchDNS", CURL_VERSION_ASYNCHDNS},
+ {"Debug", CURL_VERSION_DEBUG},
+ {"TrackMemory", CURL_VERSION_CURLDEBUG},
+ {"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},
+ {"SSL", CURL_VERSION_SSL},
+ {"libz", CURL_VERSION_LIBZ},
+ {"CharConv", CURL_VERSION_CONV},
+ {"TLS-SRP", CURL_VERSION_TLSAUTH_SRP},
+ {"HTTP2", CURL_VERSION_HTTP2},
+ {"UnixSockets", CURL_VERSION_UNIX_SOCKETS},
+};
+
+void tool_help(void)
+{
+ int i;
+ for(i = 0; helptext[i]; i++) {
+ puts(helptext[i]);
+#ifdef PRINT_LINES_PAUSE
+ if(i && ((i % PRINT_LINES_PAUSE) == 0))
+ tool_pressanykey();
+#endif
+ }
+}
+
+void tool_version_info(void)
+{
+ const char *const *proto;
+
+ printf(CURL_ID "%s\n", curl_version());
+ if(curlinfo->protocols) {
+ printf("Protocols: ");
+ for(proto = curlinfo->protocols; *proto; ++proto) {
+ printf("%s ", *proto);
+ }
+ puts(""); /* newline */
+ }
+ if(curlinfo->features) {
+ unsigned int i;
+ printf("Features: ");
+ for(i = 0; i < sizeof(feats)/sizeof(feats[0]); i++) {
+ if(curlinfo->features & feats[i].bitmask)
+ printf("%s ", feats[i].name);
+ }
+#ifdef USE_METALINK
+ printf("Metalink ");
+#endif
+ puts(""); /* newline */
+ }
+}
+
+void tool_list_engines(CURL *curl)
+{
+ struct curl_slist *engines = NULL;
+
+ /* Get the list of engines */
+ curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
+
+ puts("Build-time engines:");
+ if(engines) {
+ for(; engines; engines = engines->next)
+ printf(" %s\n", engines->data);
+ }
+ else {
+ puts(" <none>");
+ }
+
+ /* Cleanup the list of engines */
+ curl_slist_free_all(engines);
+}
diff --git a/src/tool_help.h b/src/tool_help.h
new file mode 100644
index 00000000..9ef50069
--- /dev/null
+++ b/src/tool_help.h
@@ -0,0 +1,31 @@
+#ifndef HEADER_CURL_TOOL_HELP_H
+#define HEADER_CURL_TOOL_HELP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+void tool_help(void);
+void tool_list_engines(CURL *curl);
+void tool_version_info(void);
+
+#endif /* HEADER_CURL_TOOL_HELP_H */
+
diff --git a/src/tool_helpers.c b/src/tool_helpers.c
new file mode 100644
index 00000000..5479a1c0
--- /dev/null
+++ b/src/tool_helpers.c
@@ -0,0 +1,79 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+#include "tool_getparam.h"
+#include "tool_helpers.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+** Helper functions that are used from more tha one source file.
+*/
+
+const char *param2text(int res)
+{
+ ParameterError error = (ParameterError)res;
+ switch(error) {
+ case PARAM_GOT_EXTRA_PARAMETER:
+ return "had unsupported trailing garbage";
+ case PARAM_OPTION_UNKNOWN:
+ return "is unknown";
+ case PARAM_OPTION_AMBIGUOUS:
+ return "is ambiguous";
+ case PARAM_REQUIRES_PARAMETER:
+ return "requires parameter";
+ case PARAM_BAD_USE:
+ return "is badly used here";
+ case PARAM_BAD_NUMERIC:
+ return "expected a proper numerical parameter";
+ case PARAM_NEGATIVE_NUMERIC:
+ return "expected a positive numerical parameter";
+ case PARAM_LIBCURL_DOESNT_SUPPORT:
+ return "the installed libcurl version doesn't support this";
+ case PARAM_NO_MEM:
+ return "out of memory";
+ default:
+ return "unknown error";
+ }
+}
+
+int SetHTTPrequest(struct OperationConfig *config, HttpReq req, HttpReq *store)
+{
+ if((*store == HTTPREQ_UNSPEC) ||
+ (*store == req)) {
+ *store = req;
+ return 0;
+ }
+
+ warnf(config->global, "You can only select one HTTP request!\n");
+
+ return 1;
+}
diff --git a/src/tool_helpers.h b/src/tool_helpers.h
new file mode 100644
index 00000000..73bcfc77
--- /dev/null
+++ b/src/tool_helpers.h
@@ -0,0 +1,32 @@
+#ifndef HEADER_CURL_TOOL_HELPERS_H
+#define HEADER_CURL_TOOL_HELPERS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+const char *param2text(int res);
+
+int SetHTTPrequest(struct OperationConfig *config, HttpReq req,
+ HttpReq *store);
+
+#endif /* HEADER_CURL_TOOL_HELPERS_H */
+
diff --git a/src/tool_homedir.c b/src/tool_homedir.c
new file mode 100644
index 00000000..73a66f8f
--- /dev/null
+++ b/src/tool_homedir.c
@@ -0,0 +1,95 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef HAVE_PWD_H
+# include <pwd.h>
+#endif
+
+#include "tool_homedir.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+static char *GetEnv(const char *variable, char do_expand)
+{
+ char *env = NULL;
+#ifdef WIN32
+ char buf1[1024], buf2[1024];
+ DWORD rc;
+
+ /* Don't use getenv(); it doesn't find variable added after program was
+ * started. Don't accept truncated results (i.e. rc >= sizeof(buf1)). */
+
+ rc = GetEnvironmentVariable(variable, buf1, sizeof(buf1));
+ if(rc > 0 && rc < sizeof(buf1)) {
+ env = buf1;
+ variable = buf1;
+ }
+ if(do_expand && strchr(variable, '%')) {
+ /* buf2 == variable if not expanded */
+ rc = ExpandEnvironmentStrings (variable, buf2, sizeof(buf2));
+ if(rc > 0 && rc < sizeof(buf2) &&
+ !strchr(buf2, '%')) /* no vars still unexpanded */
+ env = buf2;
+ }
+#else
+ (void)do_expand;
+ /* no length control */
+ env = getenv(variable);
+#endif
+ return (env && env[0]) ? strdup(env) : NULL;
+}
+
+/* return the home directory of the current user as an allocated string */
+char *homedir(void)
+{
+ char *home;
+
+ home = GetEnv("CURL_HOME", FALSE);
+ if(home)
+ return home;
+
+ home = GetEnv("HOME", FALSE);
+ if(home)
+ return home;
+
+#if defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
+ {
+ struct passwd *pw = getpwuid(geteuid());
+
+ if(pw) {
+ home = pw->pw_dir;
+ if(home && home[0])
+ home = strdup(home);
+ else
+ home = NULL;
+ }
+ }
+#endif /* PWD-stuff */
+#ifdef WIN32
+ home = GetEnv("APPDATA", TRUE);
+ if(!home)
+ home = GetEnv("%USERPROFILE%\\Application Data", TRUE); /* Normally only
+ on Win-2K/XP */
+#endif /* WIN32 */
+ return home;
+}
diff --git a/src/tool_homedir.h b/src/tool_homedir.h
new file mode 100644
index 00000000..d5886155
--- /dev/null
+++ b/src/tool_homedir.h
@@ -0,0 +1,28 @@
+#ifndef HEADER_CURL_TOOL_HOMEDIR_H
+#define HEADER_CURL_TOOL_HOMEDIR_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+char *homedir(void);
+
+#endif /* HEADER_CURL_TOOL_HOMEDIR_H */
diff --git a/src/tool_hugehelp.c.cvs b/src/tool_hugehelp.c.cvs
new file mode 100644
index 00000000..5895900c
--- /dev/null
+++ b/src/tool_hugehelp.c.cvs
@@ -0,0 +1,29 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_hugehelp.h b/src/tool_hugehelp.h
new file mode 100644
index 00000000..442579e5
--- /dev/null
+++ b/src/tool_hugehelp.h
@@ -0,0 +1,28 @@
+#ifndef HEADER_CURL_TOOL_HUGEHELP_H
+#define HEADER_CURL_TOOL_HUGEHELP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+void hugehelp(void);
+
+#endif /* HEADER_CURL_TOOL_HUGEHELP_H */
diff --git a/src/tool_libinfo.c b/src/tool_libinfo.c
new file mode 100644
index 00000000..a8ffb8f6
--- /dev/null
+++ b/src/tool_libinfo.c
@@ -0,0 +1,102 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_libinfo.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* global variable definitions, for libcurl run-time info */
+
+curl_version_info_data *curlinfo = NULL;
+long built_in_protos = 0;
+
+/*
+ * libcurl_info_init: retrieves run-time information about libcurl,
+ * setting a global pointer 'curlinfo' to libcurl's run-time info
+ * struct, and a global bit pattern 'built_in_protos' composed of
+ * CURLPROTO_* bits indicating which protocols are actually built
+ * into library being used.
+ */
+
+CURLcode get_libcurl_info(void)
+{
+ static struct proto_name_pattern {
+ const char *proto_name;
+ long proto_pattern;
+ } const possibly_built_in[] = {
+ { "dict", CURLPROTO_DICT },
+ { "file", CURLPROTO_FILE },
+ { "ftp", CURLPROTO_FTP },
+ { "ftps", CURLPROTO_FTPS },
+ { "gopher", CURLPROTO_GOPHER },
+ { "http", CURLPROTO_HTTP },
+ { "https", CURLPROTO_HTTPS },
+ { "imap", CURLPROTO_IMAP },
+ { "imaps", CURLPROTO_IMAPS },
+ { "ldap", CURLPROTO_LDAP },
+ { "ldaps", CURLPROTO_LDAPS },
+ { "pop3", CURLPROTO_POP3 },
+ { "pop3s", CURLPROTO_POP3S },
+ { "rtmp", CURLPROTO_RTMP },
+ { "rtsp", CURLPROTO_RTSP },
+ { "scp", CURLPROTO_SCP },
+ { "sftp", CURLPROTO_SFTP },
+ { "smb", CURLPROTO_SMB },
+ { "smbs", CURLPROTO_SMBS },
+ { "smtp", CURLPROTO_SMTP },
+ { "smtps", CURLPROTO_SMTPS },
+ { "telnet", CURLPROTO_TELNET },
+ { "tftp", CURLPROTO_TFTP },
+ { NULL, 0 }
+ };
+
+ struct proto_name_pattern const *p;
+ const char *const *proto;
+
+ /* Pointer to libcurl's run-time version information */
+ curlinfo = curl_version_info(CURLVERSION_NOW);
+ if(!curlinfo)
+ return CURLE_FAILED_INIT;
+
+ /* Build CURLPROTO_* bit pattern with libcurl's built-in protocols */
+ built_in_protos = 0;
+ if(curlinfo->protocols) {
+ for(proto = curlinfo->protocols; *proto; proto++) {
+ for(p = possibly_built_in; p->proto_name; p++) {
+ if(curlx_raw_equal(*proto, p->proto_name)) {
+ built_in_protos |= p->proto_pattern;
+ break;
+ }
+ }
+ }
+ }
+
+ return CURLE_OK;
+}
+
diff --git a/src/tool_libinfo.h b/src/tool_libinfo.h
new file mode 100644
index 00000000..5c149d91
--- /dev/null
+++ b/src/tool_libinfo.h
@@ -0,0 +1,34 @@
+#ifndef HEADER_CURL_TOOL_LIBINFO_H
+#define HEADER_CURL_TOOL_LIBINFO_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/* global variable declarations, for libcurl run-time info */
+
+extern curl_version_info_data *curlinfo;
+extern long built_in_protos;
+
+CURLcode get_libcurl_info(void);
+
+#endif /* HEADER_CURL_TOOL_LIBINFO_H */
+
diff --git a/src/tool_main.c b/src/tool_main.c
new file mode 100644
index 00000000..9a5cebad
--- /dev/null
+++ b/src/tool_main.c
@@ -0,0 +1,275 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/stat.h>
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#ifdef USE_NSS
+#include <nspr.h>
+#include <plarenas.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_convert.h"
+#include "tool_msgs.h"
+#include "tool_operate.h"
+#include "tool_panykey.h"
+#include "tool_vms.h"
+#include "tool_main.h"
+#include "tool_libinfo.h"
+
+/*
+ * This is low-level hard-hacking memory leak tracking and similar. Using
+ * the library level code from this client-side is ugly, but we do this
+ * anyway for convenience.
+ */
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef __VMS
+/*
+ * vms_show is a global variable, used in main() as parameter for
+ * function vms_special_exit() to allow proper curl tool exiting.
+ * Its value may be set in other tool_*.c source files thanks to
+ * forward declaration present in tool_vms.h
+ */
+int vms_show = 0;
+#endif
+
+/* if we build a static library for unit tests, there is no main() function */
+#ifndef UNITTESTS
+
+/*
+ * Ensure that file descriptors 0, 1 and 2 (stdin, stdout, stderr) are
+ * open before starting to run. Otherwise, the first three network
+ * sockets opened by curl could be used for input sources, downloaded data
+ * or error logs as they will effectively be stdin, stdout and/or stderr.
+ */
+static void main_checkfds(void)
+{
+#ifdef HAVE_PIPE
+ int fd[2] = { STDIN_FILENO, STDIN_FILENO };
+ while(fd[0] == STDIN_FILENO ||
+ fd[0] == STDOUT_FILENO ||
+ fd[0] == STDERR_FILENO ||
+ fd[1] == STDIN_FILENO ||
+ fd[1] == STDOUT_FILENO ||
+ fd[1] == STDERR_FILENO)
+ if(pipe(fd) < 0)
+ return; /* Out of handles. This isn't really a big problem now, but
+ will be when we try to create a socket later. */
+ close(fd[0]);
+ close(fd[1]);
+#endif
+}
+
+#ifdef CURLDEBUG
+static void memory_tracking_init(void)
+{
+ char *env;
+ /* if CURL_MEMDEBUG is set, this starts memory tracking message logging */
+ env = curlx_getenv("CURL_MEMDEBUG");
+ if(env) {
+ /* use the value as file name */
+ char fname[CURL_MT_LOGFNAME_BUFSIZE];
+ if(strlen(env) >= CURL_MT_LOGFNAME_BUFSIZE)
+ env[CURL_MT_LOGFNAME_BUFSIZE-1] = '\0';
+ strcpy(fname, env);
+ curl_free(env);
+ curl_memdebug(fname);
+ /* this weird stuff here is to make curl_free() get called
+ before curl_memdebug() as otherwise memory tracking will
+ log a free() without an alloc! */
+ }
+ /* if CURL_MEMLIMIT is set, this enables fail-on-alloc-number-N feature */
+ env = curlx_getenv("CURL_MEMLIMIT");
+ if(env) {
+ char *endptr;
+ long num = strtol(env, &endptr, 10);
+ if((endptr != env) && (endptr == env + strlen(env)) && (num > 0))
+ curl_memlimit(num);
+ curl_free(env);
+ }
+}
+#else
+# define memory_tracking_init() Curl_nop_stmt
+#endif
+
+/*
+ * This is the main global constructor for the app. Call this before
+ * _any_ libcurl usage. If this fails, *NO* libcurl functions may be
+ * used, or havoc may be the result.
+ */
+static CURLcode main_init(struct GlobalConfig *config)
+{
+ CURLcode result = CURLE_OK;
+
+#if defined(__DJGPP__) || defined(__GO32__)
+ /* stop stat() wasting time */
+ _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
+#endif
+
+ /* Initialise the global config */
+ config->showerror = -1; /* Will show errors */
+ config->errors = stderr; /* Default errors to stderr */
+
+ /* Allocate the initial operate config */
+ config->first = config->last = malloc(sizeof(struct OperationConfig));
+ if(config->first) {
+ /* Perform the libcurl initialization */
+ result = curl_global_init(CURL_GLOBAL_DEFAULT);
+ if(!result) {
+ /* Get information about libcurl */
+ result = get_libcurl_info();
+
+ if(!result) {
+ /* Get a curl handle to use for all forthcoming curl transfers */
+ config->easy = curl_easy_init();
+ if(config->easy) {
+ /* Initialise the config */
+ config_init(config->first);
+ config->first->easy = config->easy;
+ config->first->global = config;
+ }
+ else {
+ helpf(stderr, "error initializing curl easy handle\n");
+ result = CURLE_FAILED_INIT;
+ free(config->first);
+ }
+ }
+ else {
+ helpf(stderr, "error retrieving curl library information\n");
+ free(config->first);
+ }
+ }
+ else {
+ helpf(stderr, "error initializing curl library\n");
+ free(config->first);
+ }
+ }
+ else {
+ helpf(stderr, "error initializing curl\n");
+ result = CURLE_FAILED_INIT;
+ }
+
+ return result;
+}
+
+static void free_config_fields(struct GlobalConfig *config)
+{
+ Curl_safefree(config->trace_dump);
+
+ if(config->errors_fopened && config->errors)
+ fclose(config->errors);
+ config->errors = NULL;
+
+ if(config->trace_fopened && config->trace_stream)
+ fclose(config->trace_stream);
+ config->trace_stream = NULL;
+
+ Curl_safefree(config->libcurl);
+}
+
+/*
+ * This is the main global destructor for the app. Call this after
+ * _all_ libcurl usage is done.
+ */
+static void main_free(struct GlobalConfig *config)
+{
+ /* Cleanup the easy handle */
+ curl_easy_cleanup(config->easy);
+ config->easy = NULL;
+
+ /* Main cleanup */
+ curl_global_cleanup();
+ convert_cleanup();
+ metalink_cleanup();
+#ifdef USE_NSS
+ if(PR_Initialized()) {
+ /* prevent valgrind from reporting still reachable mem from NSRP arenas */
+ PL_ArenaFinish();
+ /* prevent valgrind from reporting possibly lost memory (fd cache, ...) */
+ PR_Cleanup();
+ }
+#endif
+ free_config_fields(config);
+
+ /* Free the config structures */
+ config_free(config->last);
+ config->first = NULL;
+ config->last = NULL;
+}
+
+/*
+** curl tool main function.
+*/
+int main(int argc, char *argv[])
+{
+ CURLcode result = CURLE_OK;
+ struct GlobalConfig global;
+ memset(&global, 0, sizeof(global));
+
+ main_checkfds();
+
+#if defined(HAVE_SIGNAL) && defined(SIGPIPE)
+ (void)signal(SIGPIPE, SIG_IGN);
+#endif
+
+ /* Initialize memory tracking */
+ memory_tracking_init();
+
+ /* Initialize the curl library - do not call any libcurl functions before
+ this point */
+ result = main_init(&global);
+ if(!result) {
+ /* Start our curl operation */
+ result = operate(&global, argc, argv);
+
+#ifdef __SYMBIAN32__
+ if(global.showerror)
+ tool_pressanykey();
+#endif
+
+ /* Perform the main cleanup */
+ main_free(&global);
+ }
+
+#ifdef __NOVELL_LIBC__
+ if(getenv("_IN_NETWARE_BASH_") == NULL)
+ tool_pressanykey();
+#endif
+
+#ifdef __VMS
+ vms_special_exit(result, vms_show);
+#else
+ return (int)result;
+#endif
+}
+
+#endif /* ndef UNITTESTS */
diff --git a/src/tool_main.h b/src/tool_main.h
new file mode 100644
index 00000000..9a7972fd
--- /dev/null
+++ b/src/tool_main.h
@@ -0,0 +1,44 @@
+#ifndef HEADER_CURL_TOOL_MAIN_H
+#define HEADER_CURL_TOOL_MAIN_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define DEFAULT_MAXREDIRS 50L
+
+#define RETRY_SLEEP_DEFAULT 1000L /* ms */
+#define RETRY_SLEEP_MAX 600000L /* ms == 10 minutes */
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO fileno(stdin)
+#endif
+
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO fileno(stdout)
+#endif
+
+#ifndef STDERR_FILENO
+# define STDERR_FILENO fileno(stderr)
+#endif
+
+#endif /* HEADER_CURL_TOOL_MAIN_H */
+
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
new file mode 100644
index 00000000..5873adf6
--- /dev/null
+++ b/src/tool_metalink.c
@@ -0,0 +1,982 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef USE_METALINK
+
+#include <sys/stat.h>
+
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#ifdef USE_OPENSSL
+# include <openssl/md5.h>
+# include <openssl/sha.h>
+#elif defined(USE_GNUTLS_NETTLE)
+# include <nettle/md5.h>
+# include <nettle/sha.h>
+# define MD5_CTX struct md5_ctx
+# define SHA_CTX struct sha1_ctx
+# define SHA256_CTX struct sha256_ctx
+#elif defined(USE_GNUTLS)
+# include <gcrypt.h>
+# define MD5_CTX gcry_md_hd_t
+# define SHA_CTX gcry_md_hd_t
+# define SHA256_CTX gcry_md_hd_t
+#elif defined(USE_NSS)
+# include <nss.h>
+# include <pk11pub.h>
+# define MD5_CTX void *
+# define SHA_CTX void *
+# define SHA256_CTX void *
+ static NSSInitContext *nss_context;
+#elif defined(USE_POLARSSL)
+# include <polarssl/md5.h>
+# include <polarssl/sha1.h>
+# include <polarssl/sha256.h>
+# define MD5_CTX md5_context
+# define SHA_CTX sha1_context
+# define SHA256_CTX sha256_context
+#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
+ (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
+ (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
+ (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000))
+/* For Apple operating systems: CommonCrypto has the functions we need.
+ The library's headers are even backward-compatible with OpenSSL's
+ headers as long as we define COMMON_DIGEST_FOR_OPENSSL first.
+
+ These functions are available on Tiger and later, as well as iOS 2.0
+ and later. If you're building for an older cat, well, sorry. */
+# define COMMON_DIGEST_FOR_OPENSSL
+# include <CommonCrypto/CommonDigest.h>
+#elif defined(_WIN32)
+/* For Windows: If no other crypto library is provided, we fallback
+ to the hash functions provided within the Microsoft Windows CryptoAPI */
+# include <wincrypt.h>
+/* Custom structure in order to store the required provider and hash handle */
+struct win32_crypto_hash {
+ HCRYPTPROV hCryptProv;
+ HCRYPTHASH hHash;
+};
+/* Custom Microsoft AES Cryptographic Provider defines required for MinGW */
+# ifndef ALG_SID_SHA_256
+# define ALG_SID_SHA_256 12
+# endif
+# ifndef CALG_SHA_256
+# define CALG_SHA_256 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_256)
+# endif
+# define MD5_CTX struct win32_crypto_hash
+# define SHA_CTX struct win32_crypto_hash
+# define SHA256_CTX struct win32_crypto_hash
+#else
+# error "Can't compile METALINK support without a crypto library."
+#endif
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_getparam.h"
+#include "tool_paramhlp.h"
+#include "tool_cfgable.h"
+#include "tool_metalink.h"
+#include "tool_msgs.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* Copied from tool_getparam.c */
+#define GetStr(str,val) do { \
+ if(*(str)) { \
+ free(*(str)); \
+ *(str) = NULL; \
+ } \
+ if((val)) \
+ *(str) = strdup((val)); \
+ if(!(val)) \
+ return PARAM_NO_MEM; \
+} WHILE_FALSE
+
+#ifdef USE_GNUTLS_NETTLE
+
+static int MD5_Init(MD5_CTX *ctx)
+{
+ md5_init(ctx);
+ return 1;
+}
+
+static void MD5_Update(MD5_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ md5_update(ctx, inputLen, input);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+ md5_digest(ctx, 16, digest);
+}
+
+static int SHA1_Init(SHA_CTX *ctx)
+{
+ sha1_init(ctx);
+ return 1;
+}
+
+static void SHA1_Update(SHA_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ sha1_update(ctx, inputLen, input);
+}
+
+static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
+{
+ sha1_digest(ctx, 20, digest);
+}
+
+static int SHA256_Init(SHA256_CTX *ctx)
+{
+ sha256_init(ctx);
+ return 1;
+}
+
+static void SHA256_Update(SHA256_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ sha256_update(ctx, inputLen, input);
+}
+
+static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
+{
+ sha256_digest(ctx, 32, digest);
+}
+
+#elif defined(USE_GNUTLS)
+
+static int MD5_Init(MD5_CTX *ctx)
+{
+ gcry_md_open(ctx, GCRY_MD_MD5, 0);
+ return 1;
+}
+
+static void MD5_Update(MD5_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ gcry_md_write(*ctx, input, inputLen);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+ memcpy(digest, gcry_md_read(*ctx, 0), 16);
+ gcry_md_close(*ctx);
+}
+
+static int SHA1_Init(SHA_CTX *ctx)
+{
+ gcry_md_open(ctx, GCRY_MD_SHA1, 0);
+ return 1;
+}
+
+static void SHA1_Update(SHA_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ gcry_md_write(*ctx, input, inputLen);
+}
+
+static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
+{
+ memcpy(digest, gcry_md_read(*ctx, 0), 20);
+ gcry_md_close(*ctx);
+}
+
+static int SHA256_Init(SHA256_CTX *ctx)
+{
+ gcry_md_open(ctx, GCRY_MD_SHA256, 0);
+ return 1;
+}
+
+static void SHA256_Update(SHA256_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ gcry_md_write(*ctx, input, inputLen);
+}
+
+static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
+{
+ memcpy(digest, gcry_md_read(*ctx, 0), 32);
+ gcry_md_close(*ctx);
+}
+
+#elif defined(USE_NSS)
+
+static int nss_hash_init(void **pctx, SECOidTag hash_alg)
+{
+ PK11Context *ctx;
+
+ /* we have to initialize NSS if not initialized alraedy */
+ if(!NSS_IsInitialized() && !nss_context) {
+ static NSSInitParameters params;
+ params.length = sizeof params;
+ nss_context = NSS_InitContext("", "", "", "", &params, NSS_INIT_READONLY
+ | NSS_INIT_NOCERTDB | NSS_INIT_NOMODDB | NSS_INIT_FORCEOPEN
+ | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD);
+ }
+
+ ctx = PK11_CreateDigestContext(hash_alg);
+ if(!ctx)
+ return /* failure */ 0;
+
+ if(PK11_DigestBegin(ctx) != SECSuccess) {
+ PK11_DestroyContext(ctx, PR_TRUE);
+ return /* failure */ 0;
+ }
+
+ *pctx = ctx;
+ return /* success */ 1;
+}
+
+static void nss_hash_final(void **pctx, unsigned char *out, unsigned int len)
+{
+ PK11Context *ctx = *pctx;
+ unsigned int outlen;
+ PK11_DigestFinal(ctx, out, &outlen, len);
+ PK11_DestroyContext(ctx, PR_TRUE);
+}
+
+static int MD5_Init(MD5_CTX *pctx)
+{
+ return nss_hash_init(pctx, SEC_OID_MD5);
+}
+
+static void MD5_Update(MD5_CTX *pctx,
+ const unsigned char *input,
+ unsigned int input_len)
+{
+ PK11_DigestOp(*pctx, input, input_len);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *pctx)
+{
+ nss_hash_final(pctx, digest, 16);
+}
+
+static int SHA1_Init(SHA_CTX *pctx)
+{
+ return nss_hash_init(pctx, SEC_OID_SHA1);
+}
+
+static void SHA1_Update(SHA_CTX *pctx,
+ const unsigned char *input,
+ unsigned int input_len)
+{
+ PK11_DigestOp(*pctx, input, input_len);
+}
+
+static void SHA1_Final(unsigned char digest[20], SHA_CTX *pctx)
+{
+ nss_hash_final(pctx, digest, 20);
+}
+
+static int SHA256_Init(SHA256_CTX *pctx)
+{
+ return nss_hash_init(pctx, SEC_OID_SHA256);
+}
+
+static void SHA256_Update(SHA256_CTX *pctx,
+ const unsigned char *input,
+ unsigned int input_len)
+{
+ PK11_DigestOp(*pctx, input, input_len);
+}
+
+static void SHA256_Final(unsigned char digest[32], SHA256_CTX *pctx)
+{
+ nss_hash_final(pctx, digest, 32);
+}
+
+#elif defined(USE_POLARSSL)
+
+static int MD5_Init(MD5_CTX *ctx)
+{
+ md5_starts(ctx);
+ return 1;
+}
+
+static void MD5_Update(MD5_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ md5_update(ctx, input, inputLen);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+ md5_finish(ctx, digest);
+}
+
+static int SHA1_Init(SHA_CTX *ctx)
+{
+ sha1_starts(ctx);
+ return 1;
+}
+
+static void SHA1_Update(SHA_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ sha1_update(ctx, input, inputLen);
+}
+
+static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
+{
+ sha1_finish(ctx, digest);
+}
+
+static int SHA256_Init(SHA256_CTX *ctx)
+{
+ sha256_starts(ctx, 0); /* 0 = sha256 */
+ return 1;
+}
+
+static void SHA256_Update(SHA256_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ sha256_update(ctx, input, inputLen);
+}
+
+static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
+{
+ sha256_finish(ctx, digest);
+}
+
+#elif defined(_WIN32) && !defined(USE_OPENSSL)
+
+static void win32_crypto_final(struct win32_crypto_hash *ctx,
+ unsigned char *digest,
+ unsigned int digestLen)
+{
+ unsigned long length;
+ CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0);
+ if(length == digestLen)
+ CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0);
+ if(ctx->hHash)
+ CryptDestroyHash(ctx->hHash);
+ if(ctx->hCryptProv)
+ CryptReleaseContext(ctx->hCryptProv, 0);
+}
+
+static int MD5_Init(MD5_CTX *ctx)
+{
+ if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL,
+ PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+ CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash);
+ }
+ return 1;
+}
+
+static void MD5_Update(MD5_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+ win32_crypto_final(ctx, digest, 16);
+}
+
+static int SHA1_Init(SHA_CTX *ctx)
+{
+ if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL,
+ PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+ CryptCreateHash(ctx->hCryptProv, CALG_SHA1, 0, 0, &ctx->hHash);
+ }
+ return 1;
+}
+
+static void SHA1_Update(SHA_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
+}
+
+static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
+{
+ win32_crypto_final(ctx, digest, 20);
+}
+
+static int SHA256_Init(SHA256_CTX *ctx)
+{
+ if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL,
+ PROV_RSA_AES, CRYPT_VERIFYCONTEXT)) {
+ CryptCreateHash(ctx->hCryptProv, CALG_SHA_256, 0, 0, &ctx->hHash);
+ }
+ return 1;
+}
+
+static void SHA256_Update(SHA256_CTX *ctx,
+ const unsigned char *input,
+ unsigned int inputLen)
+{
+ CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
+}
+
+static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
+{
+ win32_crypto_final(ctx, digest, 32);
+}
+
+#endif /* CRYPTO LIBS */
+
+const digest_params MD5_DIGEST_PARAMS[] = {
+ {
+ (Curl_digest_init_func) MD5_Init,
+ (Curl_digest_update_func) MD5_Update,
+ (Curl_digest_final_func) MD5_Final,
+ sizeof(MD5_CTX),
+ 16
+ }
+};
+
+const digest_params SHA1_DIGEST_PARAMS[] = {
+ {
+ (Curl_digest_init_func) SHA1_Init,
+ (Curl_digest_update_func) SHA1_Update,
+ (Curl_digest_final_func) SHA1_Final,
+ sizeof(SHA_CTX),
+ 20
+ }
+};
+
+const digest_params SHA256_DIGEST_PARAMS[] = {
+ {
+ (Curl_digest_init_func) SHA256_Init,
+ (Curl_digest_update_func) SHA256_Update,
+ (Curl_digest_final_func) SHA256_Final,
+ sizeof(SHA256_CTX),
+ 32
+ }
+};
+
+static const metalink_digest_def SHA256_DIGEST_DEF[] = {
+ {"sha-256", SHA256_DIGEST_PARAMS}
+};
+
+static const metalink_digest_def SHA1_DIGEST_DEF[] = {
+ {"sha-1", SHA1_DIGEST_PARAMS}
+};
+
+static const metalink_digest_def MD5_DIGEST_DEF[] = {
+ {"md5", MD5_DIGEST_PARAMS}
+};
+
+/*
+ * The alias of supported hash functions in the order by preference
+ * (basically stronger hash comes first). We included "sha-256" and
+ * "sha256". The former is the name defined in the IANA registry named
+ * "Hash Function Textual Names". The latter is widely (and
+ * historically) used in Metalink version 3.
+ */
+static const metalink_digest_alias digest_aliases[] = {
+ {"sha-256", SHA256_DIGEST_DEF},
+ {"sha256", SHA256_DIGEST_DEF},
+ {"sha-1", SHA1_DIGEST_DEF},
+ {"sha1", SHA1_DIGEST_DEF},
+ {"md5", MD5_DIGEST_DEF},
+ {NULL, NULL}
+};
+
+digest_context *Curl_digest_init(const digest_params *dparams)
+{
+ digest_context *ctxt;
+
+ /* Create digest context */
+ ctxt = malloc(sizeof *ctxt);
+
+ if(!ctxt)
+ return ctxt;
+
+ ctxt->digest_hashctx = malloc(dparams->digest_ctxtsize);
+
+ if(!ctxt->digest_hashctx) {
+ free(ctxt);
+ return NULL;
+ }
+
+ ctxt->digest_hash = dparams;
+
+ if(dparams->digest_init(ctxt->digest_hashctx) != 1) {
+ free(ctxt);
+ return NULL;
+ }
+
+ return ctxt;
+}
+
+int Curl_digest_update(digest_context *context,
+ const unsigned char *data,
+ unsigned int len)
+{
+ (*context->digest_hash->digest_update)(context->digest_hashctx, data, len);
+
+ return 0;
+}
+
+int Curl_digest_final(digest_context *context, unsigned char *result)
+{
+ (*context->digest_hash->digest_final)(result, context->digest_hashctx);
+
+ free(context->digest_hashctx);
+ free(context);
+
+ return 0;
+}
+
+static unsigned char hex_to_uint(const char *s)
+{
+ int v[2];
+ int i;
+ for(i = 0; i < 2; ++i) {
+ v[i] = Curl_raw_toupper(s[i]);
+ if('0' <= v[i] && v[i] <= '9') {
+ v[i] -= '0';
+ }
+ else if('A' <= v[i] && v[i] <= 'Z') {
+ v[i] -= 'A'-10;
+ }
+ }
+ return (unsigned char)((v[0] << 4) | v[1]);
+}
+
+/*
+ * Check checksum of file denoted by filename. The expected hash value
+ * is given in hex_hash which is hex-encoded string.
+ *
+ * This function returns 1 if it succeeds or one of the following
+ * integers:
+ *
+ * 0:
+ * Checksum didn't match.
+ * -1:
+ * Could not open file; or could not read data from file.
+ * -2:
+ * Hash algorithm not available.
+ */
+static int check_hash(const char *filename,
+ const metalink_digest_def *digest_def,
+ const unsigned char *digest, FILE *error)
+{
+ unsigned char *result;
+ digest_context *dctx;
+ int check_ok, flags, fd;
+
+ flags = O_RDONLY;
+#ifdef O_BINARY
+ /* O_BINARY is required in order to avoid binary EOF in text mode */
+ flags |= O_BINARY;
+#endif
+
+ fd = open(filename, flags);
+ if(fd == -1) {
+ fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename,
+ digest_def->hash_name, strerror(errno));
+ return -1;
+ }
+
+ dctx = Curl_digest_init(digest_def->dparams);
+ if(!dctx) {
+ fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename,
+ digest_def->hash_name, "failed to initialize hash algorithm");
+ close(fd);
+ return -2;
+ }
+
+ result = malloc(digest_def->dparams->digest_resultlen);
+ if(!result) {
+ close(fd);
+ return -1;
+ }
+ while(1) {
+ unsigned char buf[4096];
+ ssize_t len = read(fd, buf, sizeof(buf));
+ if(len == 0) {
+ break;
+ }
+ else if(len == -1) {
+ fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename,
+ digest_def->hash_name, strerror(errno));
+ Curl_digest_final(dctx, result);
+ close(fd);
+ return -1;
+ }
+ Curl_digest_update(dctx, buf, (unsigned int)len);
+ }
+ Curl_digest_final(dctx, result);
+ check_ok = memcmp(result, digest,
+ digest_def->dparams->digest_resultlen) == 0;
+ /* sha*sum style verdict output */
+ if(check_ok)
+ fprintf(error, "Metalink: validating (%s) [%s] OK\n", filename,
+ digest_def->hash_name);
+ else
+ fprintf(error, "Metalink: validating (%s) [%s] FAILED (digest mismatch)\n",
+ filename, digest_def->hash_name);
+
+ free(result);
+ close(fd);
+ return check_ok;
+}
+
+int metalink_check_hash(struct GlobalConfig *config,
+ metalinkfile *mlfile,
+ const char *filename)
+{
+ int rv;
+ fprintf(config->errors, "Metalink: validating (%s)...\n", filename);
+ if(mlfile->checksum == NULL) {
+ fprintf(config->errors,
+ "Metalink: validating (%s) FAILED (digest missing)\n", filename);
+ return -2;
+ }
+ rv = check_hash(filename, mlfile->checksum->digest_def,
+ mlfile->checksum->digest, config->errors);
+ return rv;
+}
+
+static metalink_checksum *new_metalink_checksum_from_hex_digest
+(const metalink_digest_def *digest_def, const char *hex_digest)
+{
+ metalink_checksum *chksum;
+ unsigned char *digest;
+ size_t i;
+ size_t len = strlen(hex_digest);
+ digest = malloc(len/2);
+ if(!digest)
+ return 0;
+
+ for(i = 0; i < len; i += 2) {
+ digest[i/2] = hex_to_uint(hex_digest+i);
+ }
+ chksum = malloc(sizeof(metalink_checksum));
+ if(chksum) {
+ chksum->digest_def = digest_def;
+ chksum->digest = digest;
+ }
+ return chksum;
+}
+
+static metalink_resource *new_metalink_resource(const char *url)
+{
+ metalink_resource *res;
+ res = malloc(sizeof(metalink_resource));
+ if(res) {
+ res->next = NULL;
+ res->url = strdup(url);
+ if(!res->url) {
+ free(res);
+ return NULL;
+ }
+ }
+ return res;
+}
+
+/* Returns nonzero if hex_digest is properly formatted; that is each
+ letter is in [0-9A-Za-z] and the length of the string equals to the
+ result length of digest * 2. */
+static int check_hex_digest(const char *hex_digest,
+ const metalink_digest_def *digest_def)
+{
+ size_t i;
+ for(i = 0; hex_digest[i]; ++i) {
+ char c = hex_digest[i];
+ if(!(('0' <= c && c <= '9') || ('a' <= c && c <= 'z') ||
+ ('A' <= c && c <= 'Z'))) {
+ return 0;
+ }
+ }
+ return digest_def->dparams->digest_resultlen * 2 == i;
+}
+
+static metalinkfile *new_metalinkfile(metalink_file_t *fileinfo)
+{
+ metalinkfile *f;
+ f = (metalinkfile*)malloc(sizeof(metalinkfile));
+ if(!f)
+ return NULL;
+
+ f->next = NULL;
+ f->filename = strdup(fileinfo->name);
+ if(!f->filename) {
+ free(f);
+ return NULL;
+ }
+ f->checksum = NULL;
+ f->resource = NULL;
+ if(fileinfo->checksums) {
+ const metalink_digest_alias *digest_alias;
+ for(digest_alias = digest_aliases; digest_alias->alias_name;
+ ++digest_alias) {
+ metalink_checksum_t **p;
+ for(p = fileinfo->checksums; *p; ++p) {
+ if(Curl_raw_equal(digest_alias->alias_name, (*p)->type) &&
+ check_hex_digest((*p)->hash, digest_alias->digest_def)) {
+ f->checksum =
+ new_metalink_checksum_from_hex_digest(digest_alias->digest_def,
+ (*p)->hash);
+ break;
+ }
+ }
+ if(f->checksum) {
+ break;
+ }
+ }
+ }
+ if(fileinfo->resources) {
+ metalink_resource_t **p;
+ metalink_resource root, *tail;
+ root.next = NULL;
+ tail = &root;
+ for(p = fileinfo->resources; *p; ++p) {
+ metalink_resource *res;
+ /* Filter by type if it is non-NULL. In Metalink v3, type
+ includes the type of the resource. In curl, we are only
+ interested in HTTP, HTTPS and FTP. In addition to them,
+ Metalink v3 file may contain bittorrent type URL, which
+ points to the BitTorrent metainfo file. We ignore it here.
+ In Metalink v4, type was deprecated and all
+ fileinfo->resources point to the target file. BitTorrent
+ metainfo file URL may be appeared in fileinfo->metaurls.
+ */
+ if((*p)->type == NULL ||
+ Curl_raw_equal((*p)->type, "http") ||
+ Curl_raw_equal((*p)->type, "https") ||
+ Curl_raw_equal((*p)->type, "ftp") ||
+ Curl_raw_equal((*p)->type, "ftps")) {
+ res = new_metalink_resource((*p)->url);
+ tail->next = res;
+ tail = res;
+ }
+ }
+ f->resource = root.next;
+ }
+ return f;
+}
+
+int parse_metalink(struct OperationConfig *config, struct OutStruct *outs,
+ const char *metalink_url)
+{
+ metalink_error_t r;
+ metalink_t* metalink;
+ metalink_file_t **files;
+ bool warnings = FALSE;
+
+ /* metlaink_parse_final deletes outs->metalink_parser */
+ r = metalink_parse_final(outs->metalink_parser, NULL, 0, &metalink);
+ outs->metalink_parser = NULL;
+ if(r != 0) {
+ return -1;
+ }
+ if(metalink->files == NULL) {
+ fprintf(config->global->errors, "Metalink: parsing (%s) WARNING "
+ "(missing or invalid file name)\n",
+ metalink_url);
+ metalink_delete(metalink);
+ return -1;
+ }
+ for(files = metalink->files; *files; ++files) {
+ struct getout *url;
+ /* Skip an entry which has no resource. */
+ if(!(*files)->resources) {
+ fprintf(config->global->errors, "Metalink: parsing (%s) WARNING "
+ "(missing or invalid resource)\n",
+ metalink_url, (*files)->name);
+ continue;
+ }
+ if(config->url_get ||
+ ((config->url_get = config->url_list) != NULL)) {
+ /* there's a node here, if it already is filled-in continue to
+ find an "empty" node */
+ while(config->url_get && (config->url_get->flags & GETOUT_URL))
+ config->url_get = config->url_get->next;
+ }
+
+ /* now there might or might not be an available node to fill in! */
+
+ if(config->url_get)
+ /* existing node */
+ url = config->url_get;
+ else
+ /* there was no free node, create one! */
+ url = new_getout(config);
+
+ if(url) {
+ metalinkfile *mlfile = new_metalinkfile(*files);
+ if(!mlfile)
+ break;
+
+ if(!mlfile->checksum) {
+ warnings = TRUE;
+ fprintf(config->global->errors,
+ "Metalink: parsing (%s) WARNING (digest missing)\n",
+ metalink_url);
+ }
+ /* Set name as url */
+ GetStr(&url->url, mlfile->filename);
+
+ /* set flag metalink here */
+ url->flags |= GETOUT_URL | GETOUT_METALINK;
+
+ if(config->metalinkfile_list) {
+ config->metalinkfile_last->next = mlfile;
+ config->metalinkfile_last = mlfile;
+ }
+ else {
+ config->metalinkfile_list = config->metalinkfile_last = mlfile;
+ }
+ }
+ }
+ metalink_delete(metalink);
+ return (warnings) ? -2 : 0;
+}
+
+size_t metalink_write_cb(void *buffer, size_t sz, size_t nmemb,
+ void *userdata)
+{
+ struct OutStruct *outs = userdata;
+ struct OperationConfig *config = outs->config;
+ int rv;
+
+ /*
+ * Once that libcurl has called back tool_write_cb() the returned value
+ * is checked against the amount that was intended to be written, if
+ * it does not match then it fails with CURLE_WRITE_ERROR. So at this
+ * point returning a value different from sz*nmemb indicates failure.
+ */
+ const size_t failure = (sz * nmemb) ? 0 : 1;
+
+ if(!config)
+ return failure;
+
+ rv = metalink_parse_update(outs->metalink_parser, buffer, sz *nmemb);
+ if(rv == 0)
+ return sz * nmemb;
+ else {
+ fprintf(config->global->errors, "Metalink: parsing FAILED\n");
+ return failure;
+ }
+}
+
+/*
+ * Returns nonzero if content_type includes mediatype.
+ */
+static int check_content_type(const char *content_type, const char *media_type)
+{
+ const char *ptr = content_type;
+ size_t media_type_len = strlen(media_type);
+ for(; *ptr && (*ptr == ' ' || *ptr == '\t'); ++ptr);
+ if(!*ptr) {
+ return 0;
+ }
+ return Curl_raw_nequal(ptr, media_type, media_type_len) &&
+ (*(ptr+media_type_len) == '\0' || *(ptr+media_type_len) == ' ' ||
+ *(ptr+media_type_len) == '\t' || *(ptr+media_type_len) == ';');
+}
+
+int check_metalink_content_type(const char *content_type)
+{
+ return check_content_type(content_type, "application/metalink+xml");
+}
+
+int count_next_metalink_resource(metalinkfile *mlfile)
+{
+ int count = 0;
+ metalink_resource *res;
+ for(res = mlfile->resource; res; res = res->next, ++count);
+ return count;
+}
+
+static void delete_metalink_checksum(metalink_checksum *chksum)
+{
+ if(chksum == NULL) {
+ return;
+ }
+ Curl_safefree(chksum->digest);
+ Curl_safefree(chksum);
+}
+
+static void delete_metalink_resource(metalink_resource *res)
+{
+ if(res == NULL) {
+ return;
+ }
+ Curl_safefree(res->url);
+ Curl_safefree(res);
+}
+
+static void delete_metalinkfile(metalinkfile *mlfile)
+{
+ metalink_resource *res;
+ if(mlfile == NULL) {
+ return;
+ }
+ Curl_safefree(mlfile->filename);
+ delete_metalink_checksum(mlfile->checksum);
+ for(res = mlfile->resource; res;) {
+ metalink_resource *next;
+ next = res->next;
+ delete_metalink_resource(res);
+ res = next;
+ }
+ Curl_safefree(mlfile);
+}
+
+void clean_metalink(struct OperationConfig *config)
+{
+ while(config->metalinkfile_list) {
+ metalinkfile *mlfile = config->metalinkfile_list;
+ config->metalinkfile_list = config->metalinkfile_list->next;
+ delete_metalinkfile(mlfile);
+ }
+ config->metalinkfile_last = 0;
+}
+
+void metalink_cleanup(void)
+{
+#ifdef USE_NSS
+ if(nss_context) {
+ NSS_ShutdownContext(nss_context);
+ nss_context = NULL;
+ }
+#endif
+}
+
+#endif /* USE_METALINK */
diff --git a/src/tool_metalink.h b/src/tool_metalink.h
new file mode 100644
index 00000000..36859068
--- /dev/null
+++ b/src/tool_metalink.h
@@ -0,0 +1,167 @@
+#ifndef HEADER_CURL_TOOL_METALINK_H
+#define HEADER_CURL_TOOL_METALINK_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+struct GlobalConfig;
+struct OperationConfig;
+
+/* returns 1 for success, 0 otherwise (we use OpenSSL *_Init fncs directly) */
+typedef int (* Curl_digest_init_func)(void *context);
+
+typedef void (* Curl_digest_update_func)(void *context,
+ const unsigned char *data,
+ unsigned int len);
+typedef void (* Curl_digest_final_func)(unsigned char *result, void *context);
+
+typedef struct {
+ Curl_digest_init_func digest_init; /* Initialize context procedure */
+ Curl_digest_update_func digest_update; /* Update context with data */
+ Curl_digest_final_func digest_final; /* Get final result procedure */
+ unsigned int digest_ctxtsize; /* Context structure size */
+ unsigned int digest_resultlen; /* Result length (bytes) */
+} digest_params;
+
+typedef struct {
+ const digest_params *digest_hash; /* Hash function definition */
+ void *digest_hashctx; /* Hash function context */
+} digest_context;
+
+digest_context * Curl_digest_init(const digest_params *dparams);
+int Curl_digest_update(digest_context *context,
+ const unsigned char *data,
+ unsigned int len);
+int Curl_digest_final(digest_context *context, unsigned char *result);
+
+typedef struct {
+ const char *hash_name;
+ const digest_params *dparams;
+} metalink_digest_def;
+
+typedef struct {
+ const char *alias_name;
+ const metalink_digest_def *digest_def;
+} metalink_digest_alias;
+
+typedef struct metalink_checksum {
+ const metalink_digest_def *digest_def;
+ /* raw digest value, not ascii hex digest */
+ unsigned char *digest;
+} metalink_checksum;
+
+typedef struct metalink_resource {
+ struct metalink_resource *next;
+ char *url;
+} metalink_resource;
+
+typedef struct metalinkfile {
+ struct metalinkfile *next;
+ char *filename;
+ metalink_checksum *checksum;
+ metalink_resource *resource;
+} metalinkfile;
+
+#ifdef USE_METALINK
+
+/*
+ * curl requires libmetalink 0.1.0 or newer
+ */
+#define CURL_REQ_LIBMETALINK_MAJOR 0
+#define CURL_REQ_LIBMETALINK_MINOR 1
+#define CURL_REQ_LIBMETALINK_PATCH 0
+
+#define CURL_REQ_LIBMETALINK_VERS ((CURL_REQ_LIBMETALINK_MAJOR * 10000) + \
+ (CURL_REQ_LIBMETALINK_MINOR * 100) + \
+ CURL_REQ_LIBMETALINK_PATCH)
+
+extern const digest_params MD5_DIGEST_PARAMS[1];
+extern const digest_params SHA1_DIGEST_PARAMS[1];
+extern const digest_params SHA256_DIGEST_PARAMS[1];
+
+#include <metalink/metalink.h>
+
+/*
+ * Counts the resource in the metalinkfile.
+ */
+int count_next_metalink_resource(metalinkfile *mlfile);
+void clean_metalink(struct OperationConfig *config);
+
+/*
+ * Performs final parse operation and extracts information from
+ * Metalink and creates metalinkfile structs.
+ *
+ * This function returns 0 if it succeeds without warnings, or one of
+ * the following negative error codes:
+ *
+ * -1: Parsing failed; or no file is found
+ * -2: Parsing succeeded with some warnings.
+ */
+int parse_metalink(struct OperationConfig *config, struct OutStruct *outs,
+ const char *metalink_url);
+
+/*
+ * Callback function for CURLOPT_WRITEFUNCTION
+ */
+size_t metalink_write_cb(void *buffer, size_t sz, size_t nmemb,
+ void *userdata);
+
+/*
+ * Returns nonzero if content_type includes "application/metalink+xml"
+ * media-type. The check is done in case-insensitive manner.
+ */
+int check_metalink_content_type(const char *content_type);
+
+/*
+ * Check checksum of file denoted by filename.
+ *
+ * This function returns 1 if the checksum matches or one of the
+ * following integers:
+ *
+ * 0:
+ * Checksum didn't match.
+ * -1:
+ * Could not open file; or could not read data from file.
+ * -2:
+ * No checksum in Metalink supported, hash algorithm not available, or
+ * Metalink does not contain checksum.
+ */
+int metalink_check_hash(struct GlobalConfig *config,
+ metalinkfile *mlfile,
+ const char *filename);
+
+/*
+ * Release resources allocated at global scope.
+ */
+void metalink_cleanup(void);
+
+#else /* USE_METALINK */
+
+#define count_next_metalink_resource(x) 0
+#define clean_metalink(x) (void)x
+
+/* metalink_cleanup() takes no arguments */
+#define metalink_cleanup() Curl_nop_stmt
+
+#endif /* USE_METALINK */
+
+#endif /* HEADER_CURL_TOOL_METALINK_H */
diff --git a/src/tool_mfiles.c b/src/tool_mfiles.c
new file mode 100644
index 00000000..3eda45f9
--- /dev/null
+++ b/src/tool_mfiles.c
@@ -0,0 +1,127 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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_mfiles.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+static void AppendNode(struct multi_files **first,
+ struct multi_files **last,
+ struct multi_files *new)
+{
+ DEBUGASSERT(((*first) && (*last)) || ((!*first) && (!*last)));
+
+ if(*last)
+ (*last)->next = new;
+ else
+ *first = new;
+ *last = new;
+}
+
+/*
+ * AddMultiFiles: Add a new list node possibly followed with a type_name.
+ *
+ * multi_first argument is the address of a pointer to the first element
+ * of the multi_files linked list. A NULL pointer indicates empty list.
+ *
+ * multi_last argument is the address of a pointer to the last element
+ * of the multi_files linked list. A NULL pointer indicates empty list.
+ *
+ * Pointers stored in multi_first and multi_last are modified while
+ * function is executed. An out of memory condition free's the whole
+ * list and returns with pointers stored in multi_first and multi_last
+ * set to NULL and a NULL function result.
+ *
+ * Function returns same pointer as stored at multi_last.
+ */
+
+struct multi_files *AddMultiFiles(const char *file_name,
+ const char *type_name,
+ const char *show_filename,
+ struct multi_files **multi_first,
+ struct multi_files **multi_last)
+{
+ struct multi_files *multi;
+ struct multi_files *multi_type;
+ struct multi_files *multi_name;
+
+ multi = calloc(1, sizeof(struct multi_files));
+ if(multi) {
+ multi->form.option = CURLFORM_FILE;
+ multi->form.value = file_name;
+ AppendNode(multi_first, multi_last, multi);
+ }
+ else {
+ FreeMultiInfo(multi_first, multi_last);
+ return NULL;
+ }
+
+ if(type_name) {
+ multi_type = calloc(1, sizeof(struct multi_files));
+ if(multi_type) {
+ multi_type->form.option = CURLFORM_CONTENTTYPE;
+ multi_type->form.value = type_name;
+ AppendNode(multi_first, multi_last, multi_type);
+ }
+ else {
+ FreeMultiInfo(multi_first, multi_last);
+ return NULL;
+ }
+ }
+
+ if(show_filename) {
+ multi_name = calloc(1, sizeof(struct multi_files));
+ if(multi_name) {
+ multi_name->form.option = CURLFORM_FILENAME;
+ multi_name->form.value = show_filename;
+ AppendNode(multi_first, multi_last, multi_name);
+ }
+ else {
+ FreeMultiInfo(multi_first, multi_last);
+ return NULL;
+ }
+ }
+
+ return *multi_last;
+}
+
+/*
+ * FreeMultiInfo: Free the items of the list.
+ */
+
+void FreeMultiInfo(struct multi_files **multi_first,
+ struct multi_files **multi_last)
+{
+ struct multi_files *next;
+ struct multi_files *item = *multi_first;
+
+ while(item) {
+ next = item->next;
+ Curl_safefree(item);
+ item = next;
+ }
+ *multi_first = NULL;
+ if(multi_last)
+ *multi_last = NULL;
+}
+
diff --git a/src/tool_mfiles.h b/src/tool_mfiles.h
new file mode 100644
index 00000000..1ea6f4a4
--- /dev/null
+++ b/src/tool_mfiles.h
@@ -0,0 +1,46 @@
+#ifndef HEADER_CURL_TOOL_MFILES_H
+#define HEADER_CURL_TOOL_MFILES_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/*
+ * Structure for storing the information needed to build
+ * a multiple files section.
+ */
+
+struct multi_files {
+ struct curl_forms form;
+ struct multi_files *next;
+};
+
+struct multi_files *AddMultiFiles(const char *file_name,
+ const char *type_name,
+ const char *show_filename,
+ struct multi_files **multi_first,
+ struct multi_files **multi_last);
+
+void FreeMultiInfo(struct multi_files **multi_first,
+ struct multi_files **multi_last);
+
+#endif /* HEADER_CURL_TOOL_MFILES_H */
+
diff --git a/src/tool_msgs.c b/src/tool_msgs.c
new file mode 100644
index 00000000..38de977a
--- /dev/null
+++ b/src/tool_msgs.c
@@ -0,0 +1,100 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#define WARN_PREFIX "Warning: "
+#define WARN_TEXTWIDTH (79 - (int)strlen(WARN_PREFIX))
+
+/*
+ * Emit warning formatted message on configured 'errors' stream unless
+ * mute (--silent) was selected.
+ */
+
+void warnf(struct GlobalConfig *config, const char *fmt, ...)
+{
+ if(!config->mute) {
+ va_list ap;
+ int len;
+ char *ptr;
+ char print_buffer[256];
+
+ va_start(ap, fmt);
+ len = vsnprintf(print_buffer, sizeof(print_buffer), fmt, ap);
+ va_end(ap);
+
+ ptr = print_buffer;
+ while(len > 0) {
+ fputs(WARN_PREFIX, config->errors);
+
+ if(len > (int)WARN_TEXTWIDTH) {
+ int cut = WARN_TEXTWIDTH-1;
+
+ while(!ISSPACE(ptr[cut]) && cut) {
+ cut--;
+ }
+ if(0 == cut)
+ /* not a single cutting position was found, just cut it at the
+ max text width then! */
+ cut = WARN_TEXTWIDTH-1;
+
+ (void)fwrite(ptr, cut + 1, 1, config->errors);
+ fputs("\n", config->errors);
+ ptr += cut+1; /* skip the space too */
+ len -= cut;
+ }
+ else {
+ fputs(ptr, config->errors);
+ len = 0;
+ }
+ }
+ }
+}
+
+/*
+ * Emit help formatted message on given stream.
+ */
+
+void helpf(FILE *errors, const char *fmt, ...)
+{
+ va_list ap;
+ if(fmt) {
+ va_start(ap, fmt);
+ fputs("curl: ", errors); /* prefix it */
+ vfprintf(errors, fmt, ap);
+ va_end(ap);
+ }
+ fprintf(errors, "curl: try 'curl --help' "
+#ifdef USE_MANUAL
+ "or 'curl --manual' "
+#endif
+ "for more information\n");
+}
+
diff --git a/src/tool_msgs.h b/src/tool_msgs.h
new file mode 100644
index 00000000..bf97bfba
--- /dev/null
+++ b/src/tool_msgs.h
@@ -0,0 +1,31 @@
+#ifndef HEADER_CURL_TOOL_MSGS_H
+#define HEADER_CURL_TOOL_MSGS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+void warnf(struct GlobalConfig *config, const char *fmt, ...);
+
+void helpf(FILE *errors, const char *fmt, ...);
+
+#endif /* HEADER_CURL_TOOL_MSGS_H */
+
diff --git a/src/tool_operate.c b/src/tool_operate.c
new file mode 100644
index 00000000..fea587bc
--- /dev/null
+++ b/src/tool_operate.c
@@ -0,0 +1,1900 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#ifdef HAVE_UTIME_H
+# include <utime.h>
+#elif defined(HAVE_SYS_UTIME_H)
+# include <sys/utime.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
+# include <netinet/tcp.h>
+#endif
+
+#ifdef __VMS
+# include <fabdef.h>
+#endif
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_binmode.h"
+#include "tool_cfgable.h"
+#include "tool_cb_dbg.h"
+#include "tool_cb_hdr.h"
+#include "tool_cb_prg.h"
+#include "tool_cb_rea.h"
+#include "tool_cb_see.h"
+#include "tool_cb_wrt.h"
+#include "tool_dirhie.h"
+#include "tool_doswin.h"
+#include "tool_easysrc.h"
+#include "tool_getparam.h"
+#include "tool_helpers.h"
+#include "tool_homedir.h"
+#include "tool_libinfo.h"
+#include "tool_main.h"
+#include "tool_metalink.h"
+#include "tool_msgs.h"
+#include "tool_operate.h"
+#include "tool_operhlp.h"
+#include "tool_paramhlp.h"
+#include "tool_parsecfg.h"
+#include "tool_setopt.h"
+#include "tool_sleep.h"
+#include "tool_urlglob.h"
+#include "tool_util.h"
+#include "tool_writeenv.h"
+#include "tool_writeout.h"
+#include "tool_xattr.h"
+#include "tool_vms.h"
+#include "tool_help.h"
+#include "tool_hugehelp.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef CURLDEBUG
+/* libcurl's debug builds provide an extra function */
+CURLcode curl_easy_perform_ev(CURL *easy);
+#endif
+
+#define CURLseparator "--_curl_--"
+
+#ifndef O_BINARY
+/* since O_BINARY as used in bitmasks, setting it to zero makes it usable in
+ source code but yet it doesn't ruin anything */
+# define O_BINARY 0
+#endif
+
+#define CURL_CA_CERT_ERRORMSG1 \
+ "More details here: http://curl.haxx.se/docs/sslcerts.html\n\n" \
+ "curl performs SSL certificate verification by default, " \
+ "using a \"bundle\"\n" \
+ " of Certificate Authority (CA) public keys (CA certs). If the default\n" \
+ " bundle file isn't adequate, you can specify an alternate file\n" \
+ " using the --cacert option.\n"
+
+#define CURL_CA_CERT_ERRORMSG2 \
+ "If this HTTPS server uses a certificate signed by a CA represented in\n" \
+ " the bundle, the certificate verification probably failed due to a\n" \
+ " problem with the certificate (it might be expired, or the name might\n" \
+ " not match the domain name in the URL).\n" \
+ "If you'd like to turn off curl's verification of the certificate, use\n" \
+ " the -k (or --insecure) option.\n"
+
+static bool is_fatal_error(CURLcode code)
+{
+ switch(code) {
+ /* TODO: Should CURLE_SSL_CACERT be included as critical error ? */
+ case CURLE_FAILED_INIT:
+ case CURLE_OUT_OF_MEMORY:
+ case CURLE_UNKNOWN_OPTION:
+ case CURLE_FUNCTION_NOT_FOUND:
+ case CURLE_BAD_FUNCTION_ARGUMENT:
+ /* critical error */
+ return TRUE;
+ default:
+ break;
+ }
+
+ /* no error or not critical */
+ return FALSE;
+}
+
+#ifdef __VMS
+/*
+ * get_vms_file_size does what it takes to get the real size of the file
+ *
+ * For fixed files, find out the size of the EOF block and adjust.
+ *
+ * For all others, have to read the entire file in, discarding the contents.
+ * Most posted text files will be small, and binary files like zlib archives
+ * and CD/DVD images should be either a STREAM_LF format or a fixed format.
+ *
+ */
+static curl_off_t vms_realfilesize(const char * name,
+ const struct_stat * stat_buf)
+{
+ char buffer[8192];
+ curl_off_t count;
+ int ret_stat;
+ FILE * file;
+
+ file = fopen(name, "r"); /* VMS */
+ if(file == NULL) {
+ return 0;
+ }
+ count = 0;
+ ret_stat = 1;
+ while(ret_stat > 0) {
+ ret_stat = fread(buffer, 1, sizeof(buffer), file);
+ if(ret_stat != 0)
+ count += ret_stat;
+ }
+ fclose(file);
+
+ return count;
+}
+
+/*
+ *
+ * VmsSpecialSize checks to see if the stat st_size can be trusted and
+ * if not to call a routine to get the correct size.
+ *
+ */
+static curl_off_t VmsSpecialSize(const char * name,
+ const struct_stat * stat_buf)
+{
+ switch(stat_buf->st_fab_rfm) {
+ case FAB$C_VAR:
+ case FAB$C_VFC:
+ return vms_realfilesize(name, stat_buf);
+ break;
+ default:
+ return stat_buf->st_size;
+ }
+}
+#endif /* __VMS */
+
+static CURLcode operate_do(struct GlobalConfig *global,
+ struct OperationConfig *config)
+{
+ char errorbuffer[CURL_ERROR_SIZE];
+ struct ProgressData progressbar;
+ struct getout *urlnode;
+
+ struct HdrCbData hdrcbdata;
+ struct OutStruct heads;
+
+ metalinkfile *mlfile_last = NULL;
+
+ CURL *curl = config->easy;
+ char *httpgetfields = NULL;
+
+ CURLcode result = CURLE_OK;
+ unsigned long li;
+
+ /* Save the values of noprogress and isatty to restore them later on */
+ bool orig_noprogress = global->noprogress;
+ bool orig_isatty = global->isatty;
+
+ errorbuffer[0] = '\0';
+
+ /* default headers output stream is stdout */
+ memset(&hdrcbdata, 0, sizeof(struct HdrCbData));
+ memset(&heads, 0, sizeof(struct OutStruct));
+ heads.stream = stdout;
+ heads.config = config;
+
+ /*
+ ** Beyond this point no return'ing from this function allowed.
+ ** Jump to label 'quit_curl' in order to abandon this function
+ ** from outside of nested loops further down below.
+ */
+
+ /* Check we have a url */
+ if(!config->url_list || !config->url_list->url) {
+ helpf(global->errors, "no URL specified!\n");
+ result = CURLE_FAILED_INIT;
+ goto quit_curl;
+ }
+
+ /* On WIN32 we can't set the path to curl-ca-bundle.crt
+ * at compile time. So we look here for the file in two ways:
+ * 1: look at the environment variable CURL_CA_BUNDLE for a path
+ * 2: if #1 isn't found, use the windows API function SearchPath()
+ * to find it along the app's path (includes app's dir and CWD)
+ *
+ * We support the environment variable thing for non-Windows platforms
+ * too. Just for the sake of it.
+ */
+ if(!config->cacert &&
+ !config->capath &&
+ !config->insecure_ok) {
+ char *env;
+ env = curlx_getenv("CURL_CA_BUNDLE");
+ if(env) {
+ config->cacert = strdup(env);
+ if(!config->cacert) {
+ curl_free(env);
+ helpf(global->errors, "out of memory\n");
+ result = CURLE_OUT_OF_MEMORY;
+ goto quit_curl;
+ }
+ }
+ else {
+ env = curlx_getenv("SSL_CERT_DIR");
+ if(env) {
+ config->capath = strdup(env);
+ if(!config->capath) {
+ curl_free(env);
+ helpf(global->errors, "out of memory\n");
+ result = CURLE_OUT_OF_MEMORY;
+ goto quit_curl;
+ }
+ }
+ else {
+ env = curlx_getenv("SSL_CERT_FILE");
+ if(env) {
+ config->cacert = strdup(env);
+ if(!config->cacert) {
+ curl_free(env);
+ helpf(global->errors, "out of memory\n");
+ result = CURLE_OUT_OF_MEMORY;
+ goto quit_curl;
+ }
+ }
+ }
+ }
+
+ if(env)
+ curl_free(env);
+#ifdef WIN32
+ else {
+ result = FindWin32CACert(config, "curl-ca-bundle.crt");
+ if(result)
+ goto quit_curl;
+ }
+#endif
+ }
+
+ if(config->postfields) {
+ if(config->use_httpget) {
+ /* Use the postfields data for a http get */
+ httpgetfields = strdup(config->postfields);
+ Curl_safefree(config->postfields);
+ if(!httpgetfields) {
+ helpf(global->errors, "out of memory\n");
+ result = CURLE_OUT_OF_MEMORY;
+ goto quit_curl;
+ }
+ if(SetHTTPrequest(config,
+ (config->no_body?HTTPREQ_HEAD:HTTPREQ_GET),
+ &config->httpreq)) {
+ result = CURLE_FAILED_INIT;
+ goto quit_curl;
+ }
+ }
+ else {
+ if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq)) {
+ result = CURLE_FAILED_INIT;
+ goto quit_curl;
+ }
+ }
+ }
+
+ /* Single header file for all URLs */
+ if(config->headerfile) {
+ /* open file for output: */
+ if(!curlx_strequal(config->headerfile, "-")) {
+ FILE *newfile = fopen(config->headerfile, "wb");
+ if(!newfile) {
+ warnf(config->global, "Failed to open %s\n", config->headerfile);
+ result = CURLE_WRITE_ERROR;
+ goto quit_curl;
+ }
+ else {
+ heads.filename = config->headerfile;
+ heads.s_isreg = TRUE;
+ heads.fopened = TRUE;
+ heads.stream = newfile;
+ }
+ }
+ else {
+ /* always use binary mode for protocol header output */
+ set_binmode(heads.stream);
+ }
+ }
+
+ /*
+ ** Nested loops start here.
+ */
+
+ /* loop through the list of given URLs */
+
+ for(urlnode = config->url_list; urlnode; urlnode = urlnode->next) {
+
+ unsigned long up; /* upload file counter within a single upload glob */
+ char *infiles; /* might be a glob pattern */
+ char *outfiles;
+ unsigned long infilenum;
+ URLGlob *inglob;
+
+ int metalink = 0; /* nonzero for metalink download. */
+ metalinkfile *mlfile;
+ metalink_resource *mlres;
+
+ outfiles = NULL;
+ infilenum = 1;
+ inglob = NULL;
+
+ if(urlnode->flags & GETOUT_METALINK) {
+ metalink = 1;
+ if(mlfile_last == NULL) {
+ mlfile_last = config->metalinkfile_list;
+ }
+ mlfile = mlfile_last;
+ mlfile_last = mlfile_last->next;
+ mlres = mlfile->resource;
+ }
+ else {
+ mlfile = NULL;
+ mlres = NULL;
+ }
+
+ /* urlnode->url is the full URL (it might be NULL) */
+
+ if(!urlnode->url) {
+ /* This node has no URL. Free node data without destroying the
+ node itself nor modifying next pointer and continue to next */
+ Curl_safefree(urlnode->outfile);
+ Curl_safefree(urlnode->infile);
+ urlnode->flags = 0;
+ continue; /* next URL please */
+ }
+
+ /* save outfile pattern before expansion */
+ if(urlnode->outfile) {
+ outfiles = strdup(urlnode->outfile);
+ if(!outfiles) {
+ helpf(global->errors, "out of memory\n");
+ result = CURLE_OUT_OF_MEMORY;
+ break;
+ }
+ }
+
+ infiles = urlnode->infile;
+
+ if(!config->globoff && infiles) {
+ /* Unless explicitly shut off */
+ result = glob_url(&inglob, infiles, &infilenum,
+ global->showerror?global->errors:NULL);
+ if(result) {
+ Curl_safefree(outfiles);
+ break;
+ }
+ }
+
+ /* Here's the loop for uploading multiple files within the same
+ single globbed string. If no upload, we enter the loop once anyway. */
+ for(up = 0 ; up < infilenum; up++) {
+
+ char *uploadfile; /* a single file, never a glob */
+ int separator;
+ URLGlob *urls;
+ unsigned long urlnum;
+
+ uploadfile = NULL;
+ urls = NULL;
+ urlnum = 0;
+
+ if(!up && !infiles)
+ Curl_nop_stmt;
+ else {
+ if(inglob) {
+ result = glob_next_url(&uploadfile, inglob);
+ if(result == 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;
+ }
+ }
+ else
+ uploadfile = NULL;
+ if(!uploadfile)
+ break;
+ }
+
+ if(metalink) {
+ /* For Metalink download, we don't use glob. Instead we use
+ the number of resources as urlnum. */
+ urlnum = count_next_metalink_resource(mlfile);
+ }
+ else
+ 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) {
+ Curl_safefree(uploadfile);
+ break;
+ }
+ }
+ else
+ urlnum = 1; /* without globbing, this is a single URL */
+
+ /* if multiple files extracted to stdout, insert separators! */
+ separator= ((!outfiles || curlx_strequal(outfiles, "-")) && urlnum > 1);
+
+ /* Here's looping around each globbed URL */
+ for(li = 0 ; li < urlnum; li++) {
+
+ int infd;
+ bool infdopen;
+ char *outfile;
+ struct OutStruct outs;
+ struct InStruct input;
+ struct timeval retrystart;
+ curl_off_t uploadfilesize;
+ long retry_numretries;
+ long retry_sleep_default;
+ long retry_sleep;
+ char *this_url = NULL;
+ int metalink_next_res = 0;
+
+ outfile = NULL;
+ infdopen = FALSE;
+ infd = STDIN_FILENO;
+ uploadfilesize = -1; /* -1 means unknown */
+
+ /* default output stream is stdout */
+ memset(&outs, 0, sizeof(struct OutStruct));
+ outs.stream = stdout;
+ outs.config = config;
+
+ if(metalink) {
+ /* For Metalink download, use name in Metalink file as
+ filename. */
+ outfile = strdup(mlfile->filename);
+ if(!outfile) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto show_error;
+ }
+ this_url = strdup(mlres->url);
+ if(!this_url) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto show_error;
+ }
+ }
+ else {
+ if(urls) {
+ result = glob_next_url(&this_url, urls);
+ if(result)
+ goto show_error;
+ }
+ else if(!li) {
+ this_url = strdup(urlnode->url);
+ if(!this_url) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto show_error;
+ }
+ }
+ else
+ this_url = NULL;
+ if(!this_url)
+ break;
+
+ if(outfiles) {
+ outfile = strdup(outfiles);
+ if(!outfile) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto show_error;
+ }
+ }
+ }
+
+ if(((urlnode->flags&GETOUT_USEREMOTE) ||
+ (outfile && !curlx_strequal("-", outfile))) &&
+ (metalink || !config->use_metalink)) {
+
+ /*
+ * We have specified a file name to store the result in, or we have
+ * decided we want to use the remote file name.
+ */
+
+ if(!outfile) {
+ /* extract the file name from the URL */
+ result = get_url_file_name(&outfile, this_url);
+ if(result)
+ goto show_error;
+ if(!*outfile && !config->content_disposition) {
+ helpf(global->errors, "Remote file name has no length!\n");
+ result = CURLE_WRITE_ERROR;
+ goto quit_urls;
+ }
+#if defined(MSDOS) || defined(WIN32)
+ /* For DOS and WIN32, we do some major replacing of
+ bad characters in the file name before using it */
+ outfile = sanitize_dos_name(outfile);
+ if(!outfile) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto show_error;
+ }
+#endif /* MSDOS || WIN32 */
+ }
+ else if(urls) {
+ /* fill '#1' ... '#9' terms from URL pattern */
+ char *storefile = outfile;
+ result = glob_match_url(&outfile, storefile, urls);
+ Curl_safefree(storefile);
+ if(result) {
+ /* bad globbing */
+ warnf(config->global, "bad output glob!\n");
+ goto quit_urls;
+ }
+ }
+
+ /* Create the directory hierarchy, if not pre-existent to a multiple
+ file output call */
+
+ if(config->create_dirs || metalink) {
+ result = create_dir_hierarchy(outfile, global->errors);
+ /* create_dir_hierarchy shows error upon CURLE_WRITE_ERROR */
+ if(result == CURLE_WRITE_ERROR)
+ goto quit_urls;
+ if(result) {
+ goto show_error;
+ }
+ }
+
+ if((urlnode->flags & GETOUT_USEREMOTE)
+ && config->content_disposition) {
+ /* Our header callback MIGHT set the filename */
+ DEBUGASSERT(!outs.filename);
+ }
+
+ if(config->resume_from_current) {
+ /* We're told to continue from where we are now. Get the size
+ of the file as it is now and open it for append instead */
+ struct_stat fileinfo;
+ /* VMS -- Danger, the filesize is only valid for stream files */
+ if(0 == stat(outfile, &fileinfo))
+ /* set offset to current file size: */
+ config->resume_from = fileinfo.st_size;
+ else
+ /* let offset be 0 */
+ config->resume_from = 0;
+ }
+
+ if(config->resume_from) {
+#ifdef __VMS
+ /* open file for output, forcing VMS output format into stream
+ mode which is needed for stat() call above to always work. */
+ FILE *file = fopen(outfile, config->resume_from?"ab":"wb",
+ "ctx=stm", "rfm=stmlf", "rat=cr", "mrs=0");
+#else
+ /* open file for output: */
+ FILE *file = fopen(outfile, config->resume_from?"ab":"wb");
+#endif
+ if(!file) {
+ helpf(global->errors, "Can't open '%s'!\n", outfile);
+ result = CURLE_WRITE_ERROR;
+ goto quit_urls;
+ }
+ outs.fopened = TRUE;
+ outs.stream = file;
+ outs.init = config->resume_from;
+ }
+ else {
+ outs.stream = NULL; /* open when needed */
+ }
+ outs.filename = outfile;
+ outs.s_isreg = TRUE;
+ }
+
+ if(uploadfile && !stdin_upload(uploadfile)) {
+ /*
+ * We have specified a file to upload and it isn't "-".
+ */
+ struct_stat fileinfo;
+
+ this_url = add_file_name_to_url(curl, this_url, uploadfile);
+ if(!this_url) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto show_error;
+ }
+ /* VMS Note:
+ *
+ * Reading binary from files can be a problem... Only FIXED, VAR
+ * etc WITHOUT implied CC will work Others need a \n appended to a
+ * line
+ *
+ * - Stat gives a size but this is UNRELIABLE in VMS As a f.e. a
+ * fixed file with implied CC needs to have a byte added for every
+ * record processed, this can by derived from Filesize & recordsize
+ * for VARiable record files the records need to be counted! for
+ * every record add 1 for linefeed and subtract 2 for the record
+ * header for VARIABLE header files only the bare record data needs
+ * to be considered with one appended if implied CC
+ */
+#ifdef __VMS
+ /* Calculate the real upload site for VMS */
+ infd = -1;
+ if(stat(uploadfile, &fileinfo) == 0) {
+ fileinfo.st_size = VmsSpecialSize(uploadfile, &fileinfo);
+ switch (fileinfo.st_fab_rfm) {
+ case FAB$C_VAR:
+ case FAB$C_VFC:
+ case FAB$C_STMCR:
+ infd = open(uploadfile, O_RDONLY | O_BINARY);
+ break;
+ default:
+ infd = open(uploadfile, O_RDONLY | O_BINARY,
+ "rfm=stmlf", "ctx=stm");
+ }
+ }
+ if(infd == -1)
+#else
+ infd = open(uploadfile, O_RDONLY | O_BINARY);
+ if((infd == -1) || fstat(infd, &fileinfo))
+#endif
+ {
+ helpf(global->errors, "Can't open '%s'!\n", uploadfile);
+ if(infd != -1) {
+ close(infd);
+ infd = STDIN_FILENO;
+ }
+ result = CURLE_READ_ERROR;
+ goto quit_urls;
+ }
+ infdopen = TRUE;
+
+ /* we ignore file size for char/block devices, sockets, etc. */
+ if(S_ISREG(fileinfo.st_mode))
+ uploadfilesize = fileinfo.st_size;
+
+ }
+ else if(uploadfile && stdin_upload(uploadfile)) {
+ /* count to see if there are more than one auth bit set
+ in the authtype field */
+ int authbits = 0;
+ int bitcheck = 0;
+ while(bitcheck < 32) {
+ if(config->authtype & (1UL << bitcheck++)) {
+ authbits++;
+ if(authbits > 1) {
+ /* more than one, we're done! */
+ break;
+ }
+ }
+ }
+
+ /*
+ * If the user has also selected --anyauth or --proxy-anyauth
+ * we should warn him/her.
+ */
+ if(config->proxyanyauth || (authbits>1)) {
+ warnf(config->global,
+ "Using --anyauth or --proxy-anyauth with upload from stdin"
+ " involves a big risk of it not working. Use a temporary"
+ " file or a fixed auth type instead!\n");
+ }
+
+ DEBUGASSERT(infdopen == FALSE);
+ DEBUGASSERT(infd == STDIN_FILENO);
+
+ set_binmode(stdin);
+ if(curlx_strequal(uploadfile, ".")) {
+ if(curlx_nonblock((curl_socket_t)infd, TRUE) < 0)
+ warnf(config->global,
+ "fcntl failed on fd=%d: %s\n", infd, strerror(errno));
+ }
+ }
+
+ if(uploadfile && config->resume_from_current)
+ config->resume_from = -1; /* -1 will then force get-it-yourself */
+
+ if(output_expected(this_url, uploadfile) && outs.stream &&
+ isatty(fileno(outs.stream)))
+ /* we send the output to a tty, therefore we switch off the progress
+ meter */
+ global->noprogress = global->isatty = TRUE;
+ else {
+ /* progress meter is per download, so restore config
+ values */
+ global->noprogress = orig_noprogress;
+ global->isatty = orig_isatty;
+ }
+
+ if(urlnum > 1 && !global->mute) {
+ fprintf(global->errors, "\n[%lu/%lu]: %s --> %s\n",
+ li+1, urlnum, this_url, outfile ? outfile : "<stdout>");
+ if(separator)
+ printf("%s%s\n", CURLseparator, this_url);
+ }
+ if(httpgetfields) {
+ char *urlbuffer;
+ /* Find out whether the url contains a file name */
+ const char *pc = strstr(this_url, "://");
+ char sep = '?';
+ if(pc)
+ pc += 3;
+ else
+ pc = this_url;
+
+ pc = strrchr(pc, '/'); /* check for a slash */
+
+ if(pc) {
+ /* there is a slash present in the URL */
+
+ if(strchr(pc, '?'))
+ /* Ouch, there's already a question mark in the URL string, we
+ then append the data with an ampersand separator instead! */
+ sep='&';
+ }
+ /*
+ * Then append ? followed by the get fields to the url.
+ */
+ if(pc)
+ urlbuffer = aprintf("%s%c%s", this_url, sep, httpgetfields);
+ else
+ /* Append / before the ? to create a well-formed url
+ if the url contains a hostname only
+ */
+ urlbuffer = aprintf("%s/?%s", this_url, httpgetfields);
+
+ if(!urlbuffer) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto show_error;
+ }
+
+ Curl_safefree(this_url); /* free previous URL */
+ this_url = urlbuffer; /* use our new URL instead! */
+ }
+
+ if(!global->errors)
+ global->errors = stderr;
+
+ if((!outfile || !strcmp(outfile, "-")) && !config->use_ascii) {
+ /* We get the output to stdout and we have not got the ASCII/text
+ flag, then set stdout to be binary */
+ set_binmode(stdout);
+ }
+
+ if(config->tcp_nodelay)
+ my_setopt(curl, CURLOPT_TCP_NODELAY, 1L);
+
+ /* where to store */
+ my_setopt(curl, CURLOPT_WRITEDATA, &outs);
+ if(metalink || !config->use_metalink)
+ /* what call to write */
+ my_setopt(curl, CURLOPT_WRITEFUNCTION, tool_write_cb);
+#ifdef USE_METALINK
+ else
+ /* Set Metalink specific write callback function to parse
+ XML data progressively. */
+ my_setopt(curl, CURLOPT_WRITEFUNCTION, metalink_write_cb);
+#endif /* USE_METALINK */
+
+ /* for uploads */
+ input.fd = infd;
+ input.config = config;
+ /* Note that if CURLOPT_READFUNCTION is fread (the default), then
+ * lib/telnet.c will Curl_poll() on the input file descriptor
+ * rather then calling the READFUNCTION at regular intervals.
+ * The circumstances in which it is preferable to enable this
+ * behaviour, by omitting to set the READFUNCTION & READDATA options,
+ * have not been determined.
+ */
+ my_setopt(curl, CURLOPT_READDATA, &input);
+ /* what call to read */
+ my_setopt(curl, CURLOPT_READFUNCTION, tool_read_cb);
+
+ /* in 7.18.0, the CURLOPT_SEEKFUNCTION/DATA pair is taking over what
+ CURLOPT_IOCTLFUNCTION/DATA pair previously provided for seeking */
+ my_setopt(curl, CURLOPT_SEEKDATA, &input);
+ my_setopt(curl, CURLOPT_SEEKFUNCTION, tool_seek_cb);
+
+ if(config->recvpersecond)
+ /* tell libcurl to use a smaller sized buffer as it allows us to
+ make better sleeps! 7.9.9 stuff! */
+ my_setopt(curl, CURLOPT_BUFFERSIZE, (long)config->recvpersecond);
+
+ /* size of uploaded file: */
+ if(uploadfilesize != -1)
+ my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
+ my_setopt_str(curl, CURLOPT_URL, this_url); /* what to fetch */
+ my_setopt(curl, CURLOPT_NOPROGRESS, global->noprogress?1L:0L);
+ if(config->no_body) {
+ my_setopt(curl, CURLOPT_NOBODY, 1L);
+ my_setopt(curl, CURLOPT_HEADER, 1L);
+ }
+ /* If --metalink is used, we ignore --include (headers in
+ output) option because mixing headers to the body will
+ confuse XML parser and/or hash check will fail. */
+ else if(!config->use_metalink)
+ my_setopt(curl, CURLOPT_HEADER, config->include_headers?1L:0L);
+
+ if(config->xoauth2_bearer)
+ my_setopt_str(curl, CURLOPT_XOAUTH2_BEARER, config->xoauth2_bearer);
+
+#if !defined(CURL_DISABLE_PROXY)
+ {
+ /* TODO: Make this a run-time check instead of compile-time one. */
+
+ my_setopt_str(curl, CURLOPT_PROXY, config->proxy);
+ my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd);
+
+ /* new in libcurl 7.3 */
+ my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel?1L:0L);
+
+ /* new in libcurl 7.5 */
+ if(config->proxy)
+ my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->proxyver);
+
+ /* new in libcurl 7.10 */
+ if(config->socksproxy) {
+ my_setopt_str(curl, CURLOPT_PROXY, config->socksproxy);
+ my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->socksver);
+ }
+
+ /* new in libcurl 7.10.6 */
+ if(config->proxyanyauth)
+ my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+ (long)CURLAUTH_ANY);
+ else if(config->proxynegotiate)
+ my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+ (long)CURLAUTH_GSSNEGOTIATE);
+ else if(config->proxyntlm)
+ my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+ (long)CURLAUTH_NTLM);
+ else if(config->proxydigest)
+ my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+ (long)CURLAUTH_DIGEST);
+ else if(config->proxybasic)
+ my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+ (long)CURLAUTH_BASIC);
+
+ /* new in libcurl 7.19.4 */
+ my_setopt(curl, CURLOPT_NOPROXY, config->noproxy);
+ }
+#endif
+
+ my_setopt(curl, CURLOPT_FAILONERROR, config->failonerror?1L:0L);
+ my_setopt(curl, CURLOPT_UPLOAD, uploadfile?1L:0L);
+ my_setopt(curl, CURLOPT_DIRLISTONLY, config->dirlistonly?1L:0L);
+ my_setopt(curl, CURLOPT_APPEND, config->ftp_append?1L:0L);
+
+ if(config->netrc_opt)
+ my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_OPTIONAL);
+ else if(config->netrc || config->netrc_file)
+ my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_REQUIRED);
+ else
+ my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_IGNORED);
+
+ if(config->netrc_file)
+ my_setopt(curl, CURLOPT_NETRC_FILE, config->netrc_file);
+
+ my_setopt(curl, CURLOPT_TRANSFERTEXT, config->use_ascii?1L:0L);
+ if(config->login_options)
+ my_setopt_str(curl, CURLOPT_LOGIN_OPTIONS, config->login_options);
+ my_setopt_str(curl, CURLOPT_USERPWD, config->userpwd);
+ my_setopt_str(curl, CURLOPT_RANGE, config->range);
+ my_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
+ my_setopt(curl, CURLOPT_TIMEOUT_MS, (long)(config->timeout * 1000));
+
+ if(built_in_protos & CURLPROTO_HTTP) {
+
+ long postRedir = 0;
+
+ my_setopt(curl, CURLOPT_FOLLOWLOCATION,
+ config->followlocation?1L:0L);
+ my_setopt(curl, CURLOPT_UNRESTRICTED_AUTH,
+ config->unrestricted_auth?1L:0L);
+
+ switch(config->httpreq) {
+ case HTTPREQ_SIMPLEPOST:
+ my_setopt_str(curl, CURLOPT_POSTFIELDS,
+ config->postfields);
+ my_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE,
+ config->postfieldsize);
+ break;
+ case HTTPREQ_POST:
+ my_setopt_httppost(curl, CURLOPT_HTTPPOST, config->httppost);
+ break;
+ default:
+ break;
+ }
+
+ my_setopt_str(curl, CURLOPT_REFERER, config->referer);
+ my_setopt(curl, CURLOPT_AUTOREFERER, config->autoreferer?1L:0L);
+ my_setopt_str(curl, CURLOPT_USERAGENT, config->useragent);
+ my_setopt_slist(curl, CURLOPT_HTTPHEADER, config->headers);
+
+ /* new in libcurl 7.36.0 */
+ if(config->proxyheaders) {
+ my_setopt_slist(curl, CURLOPT_PROXYHEADER, config->proxyheaders);
+ my_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
+ }
+
+ /* new in libcurl 7.5 */
+ my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs);
+
+ /* new in libcurl 7.9.1 */
+ if(config->httpversion)
+ my_setopt_enum(curl, CURLOPT_HTTP_VERSION, config->httpversion);
+
+ /* new in libcurl 7.10.6 (default is Basic) */
+ if(config->authtype)
+ my_setopt_bitmask(curl, CURLOPT_HTTPAUTH, (long)config->authtype);
+
+ /* curl 7.19.1 (the 301 version existed in 7.18.2),
+ 303 was added in 7.26.0 */
+ if(config->post301)
+ postRedir |= CURL_REDIR_POST_301;
+ if(config->post302)
+ postRedir |= CURL_REDIR_POST_302;
+ if(config->post303)
+ postRedir |= CURL_REDIR_POST_303;
+ my_setopt(curl, CURLOPT_POSTREDIR, postRedir);
+
+ /* new in libcurl 7.21.6 */
+ if(config->encoding)
+ my_setopt_str(curl, CURLOPT_ACCEPT_ENCODING, "");
+
+ /* new in libcurl 7.21.6 */
+ if(config->tr_encoding)
+ my_setopt(curl, CURLOPT_TRANSFER_ENCODING, 1L);
+
+ } /* (built_in_protos & CURLPROTO_HTTP) */
+
+ my_setopt_str(curl, CURLOPT_FTPPORT, config->ftpport);
+ my_setopt(curl, CURLOPT_LOW_SPEED_LIMIT,
+ config->low_speed_limit);
+ my_setopt(curl, CURLOPT_LOW_SPEED_TIME, config->low_speed_time);
+ my_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE,
+ config->sendpersecond);
+ my_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE,
+ config->recvpersecond);
+
+ if(config->use_resume)
+ my_setopt(curl, CURLOPT_RESUME_FROM_LARGE, config->resume_from);
+ else
+ my_setopt(curl, CURLOPT_RESUME_FROM_LARGE, CURL_OFF_T_C(0));
+
+ my_setopt_str(curl, CURLOPT_KEYPASSWD, config->key_passwd);
+
+ if(built_in_protos & (CURLPROTO_SCP|CURLPROTO_SFTP)) {
+
+ /* SSH and SSL private key uses same command-line option */
+ /* new in libcurl 7.16.1 */
+ my_setopt_str(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key);
+ /* new in libcurl 7.16.1 */
+ my_setopt_str(curl, CURLOPT_SSH_PUBLIC_KEYFILE, config->pubkey);
+
+ /* new in libcurl 7.17.1: SSH host key md5 checking allows us
+ to fail if we are not talking to who we think we should */
+ my_setopt_str(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
+ config->hostpubmd5);
+ }
+
+ if(config->cacert)
+ my_setopt_str(curl, CURLOPT_CAINFO, config->cacert);
+ if(config->capath)
+ my_setopt_str(curl, CURLOPT_CAPATH, config->capath);
+ 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) {
+ my_setopt_str(curl, CURLOPT_SSLCERT, config->cert);
+ my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type);
+ my_setopt_str(curl, CURLOPT_SSLKEY, config->key);
+ my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type);
+
+ if(config->insecure_ok) {
+ my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ }
+ else {
+ my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
+ /* libcurl default is strict verifyhost -> 2L */
+ /* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); */
+ }
+
+ if(config->verifystatus)
+ my_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);
+
+ if(config->falsestart)
+ my_setopt(curl, CURLOPT_SSL_FALSESTART, 1L);
+
+ my_setopt_enum(curl, CURLOPT_SSLVERSION, config->ssl_version);
+ }
+ if(config->path_as_is)
+ my_setopt(curl, CURLOPT_PATH_AS_IS, 1L);
+
+ if(built_in_protos & (CURLPROTO_SCP|CURLPROTO_SFTP)) {
+ if(!config->insecure_ok) {
+ char *home;
+ char *file;
+ result = 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);
+ curl_free(file);
+ if(result == CURLE_UNKNOWN_OPTION)
+ /* libssh2 version older than 1.1.1 */
+ result = CURLE_OK;
+ }
+ Curl_safefree(home);
+ }
+ if(result)
+ goto show_error;
+ }
+ }
+
+ if(config->no_body || config->remote_time) {
+ /* no body or use remote time */
+ my_setopt(curl, CURLOPT_FILETIME, 1L);
+ }
+
+ my_setopt(curl, CURLOPT_CRLF, config->crlf?1L:0L);
+ my_setopt_slist(curl, CURLOPT_QUOTE, config->quote);
+ my_setopt_slist(curl, CURLOPT_POSTQUOTE, config->postquote);
+ my_setopt_slist(curl, CURLOPT_PREQUOTE, config->prequote);
+
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
+ if(config->cookie)
+ my_setopt_str(curl, CURLOPT_COOKIE, config->cookie);
+
+ if(config->cookiefile)
+ my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
+
+ /* new in libcurl 7.9 */
+ if(config->cookiejar)
+ my_setopt_str(curl, CURLOPT_COOKIEJAR, config->cookiejar);
+
+ /* new in libcurl 7.9.7 */
+ my_setopt(curl, CURLOPT_COOKIESESSION, config->cookiesession?1L:0L);
+#else
+ if(config->cookie || config->cookiefile || config->cookiejar) {
+ warnf(config->global, "cookie option(s) used even though cookie "
+ "support is disabled!\n");
+ return CURLE_NOT_BUILT_IN;
+ }
+#endif
+
+ my_setopt_enum(curl, CURLOPT_TIMECONDITION, (long)config->timecond);
+ my_setopt(curl, CURLOPT_TIMEVALUE, (long)config->condtime);
+ my_setopt_str(curl, CURLOPT_CUSTOMREQUEST, config->customrequest);
+ my_setopt(curl, CURLOPT_STDERR, global->errors);
+
+ /* three new ones in libcurl 7.3: */
+ my_setopt_str(curl, CURLOPT_INTERFACE, config->iface);
+ my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel);
+
+ progressbarinit(&progressbar, config);
+ if((global->progressmode == CURL_PROGRESS_BAR) &&
+ !global->noprogress && !global->mute) {
+ /* we want the alternative style, then we have to implement it
+ ourselves! */
+ my_setopt(curl, CURLOPT_XFERINFOFUNCTION, tool_progress_cb);
+ my_setopt(curl, CURLOPT_XFERINFODATA, &progressbar);
+ }
+
+ /* new in libcurl 7.24.0: */
+ if(config->dns_servers)
+ my_setopt_str(curl, CURLOPT_DNS_SERVERS, config->dns_servers);
+
+ /* new in libcurl 7.33.0: */
+ if(config->dns_interface)
+ my_setopt_str(curl, CURLOPT_DNS_INTERFACE, config->dns_interface);
+ if(config->dns_ipv4_addr)
+ my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP4, config->dns_ipv4_addr);
+ if(config->dns_ipv6_addr)
+ my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP6, config->dns_ipv6_addr);
+
+ /* new in libcurl 7.6.2: */
+ my_setopt_slist(curl, CURLOPT_TELNETOPTIONS, config->telnet_options);
+
+ /* new in libcurl 7.7: */
+ my_setopt_str(curl, CURLOPT_RANDOM_FILE, config->random_file);
+ my_setopt_str(curl, CURLOPT_EGDSOCKET, config->egd_file);
+ my_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS,
+ (long)(config->connecttimeout * 1000));
+
+ if(config->cipher_list)
+ my_setopt_str(curl, CURLOPT_SSL_CIPHER_LIST, config->cipher_list);
+
+ /* new in libcurl 7.9.2: */
+ if(config->disable_epsv)
+ /* disable it */
+ my_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
+
+ /* new in libcurl 7.10.5 */
+ if(config->disable_eprt)
+ /* disable it */
+ my_setopt(curl, CURLOPT_FTP_USE_EPRT, 0L);
+
+ if(global->tracetype != TRACE_NONE) {
+ my_setopt(curl, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
+ my_setopt(curl, CURLOPT_DEBUGDATA, config);
+ my_setopt(curl, CURLOPT_VERBOSE, 1L);
+ }
+
+ /* new in curl 7.9.3 */
+ if(config->engine) {
+ result = res_setopt_str(curl, CURLOPT_SSLENGINE, config->engine);
+ if(result)
+ goto show_error;
+ my_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L);
+ }
+
+ /* new in curl 7.10.7, extended in 7.19.4 but this only sets 0 or 1 */
+ my_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
+ config->ftp_create_dirs?1L:0L);
+
+ /* new in curl 7.10.8 */
+ if(config->max_filesize)
+ my_setopt(curl, CURLOPT_MAXFILESIZE_LARGE,
+ config->max_filesize);
+
+ if(4 == config->ip_version)
+ my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
+ else if(6 == config->ip_version)
+ my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
+ else
+ my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER);
+
+ /* new in curl 7.15.5 */
+ if(config->ftp_ssl_reqd)
+ my_setopt_enum(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* new in curl 7.11.0 */
+ else if(config->ftp_ssl)
+ my_setopt_enum(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_TRY);
+
+ /* new in curl 7.16.0 */
+ else if(config->ftp_ssl_control)
+ my_setopt_enum(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_CONTROL);
+
+ /* new in curl 7.16.1 */
+ if(config->ftp_ssl_ccc)
+ my_setopt_enum(curl, CURLOPT_FTP_SSL_CCC,
+ (long)config->ftp_ssl_ccc_mode);
+
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+ {
+ /* TODO: Make this a run-time check instead of compile-time one. */
+
+ /* new in curl 7.19.4 */
+ if(config->socks5_gssapi_service)
+ my_setopt_str(curl, CURLOPT_SOCKS5_GSSAPI_SERVICE,
+ config->socks5_gssapi_service);
+
+ /* new in curl 7.19.4 */
+ if(config->socks5_gssapi_nec)
+ my_setopt_str(curl, CURLOPT_SOCKS5_GSSAPI_NEC,
+ config->socks5_gssapi_nec);
+
+ /* new in curl 7.43.0 */
+ if(config->proxy_service_name)
+ my_setopt_str(curl, CURLOPT_PROXY_SERVICE_NAME,
+ config->proxy_service_name);
+
+ /* new in curl 7.43.0 */
+ if(config->service_name)
+ my_setopt_str(curl, CURLOPT_SERVICE_NAME,
+ config->service_name);
+
+ }
+#endif
+ /* curl 7.13.0 */
+ my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account);
+
+ my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl?1L:0L);
+
+ /* curl 7.14.2 */
+ my_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, config->ftp_skip_ip?1L:0L);
+
+ /* curl 7.15.1 */
+ my_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long)config->ftp_filemethod);
+
+ /* curl 7.15.2 */
+ if(config->localport) {
+ my_setopt(curl, CURLOPT_LOCALPORT, (long)config->localport);
+ my_setopt_str(curl, CURLOPT_LOCALPORTRANGE,
+ (long)config->localportrange);
+ }
+
+ /* curl 7.15.5 */
+ my_setopt_str(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER,
+ config->ftp_alternative_to_user);
+
+ /* curl 7.16.0 */
+ if(config->disable_sessionid)
+ /* disable it */
+ my_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
+
+ /* curl 7.16.2 */
+ if(config->raw) {
+ my_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 0L);
+ my_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 0L);
+ }
+
+ /* curl 7.17.1 */
+ if(!config->nokeepalive) {
+ my_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
+ if(config->alivetime != 0) {
+#if !defined(TCP_KEEPIDLE) || !defined(TCP_KEEPINTVL)
+ warnf(config->global, "Keep-alive functionality somewhat crippled "
+ "due to missing support in your operating system!\n");
+#endif
+ my_setopt(curl, CURLOPT_TCP_KEEPIDLE, config->alivetime);
+ my_setopt(curl, CURLOPT_TCP_KEEPINTVL, config->alivetime);
+ }
+ }
+ else
+ my_setopt(curl, CURLOPT_TCP_KEEPALIVE, 0L);
+
+ /* curl 7.20.0 */
+ if(config->tftp_blksize)
+ my_setopt(curl, CURLOPT_TFTP_BLKSIZE, config->tftp_blksize);
+
+ if(config->mail_from)
+ my_setopt_str(curl, CURLOPT_MAIL_FROM, config->mail_from);
+
+ if(config->mail_rcpt)
+ my_setopt_slist(curl, CURLOPT_MAIL_RCPT, config->mail_rcpt);
+
+ /* curl 7.20.x */
+ if(config->ftp_pret)
+ my_setopt(curl, CURLOPT_FTP_USE_PRET, 1L);
+
+ if(config->proto_present)
+ my_setopt_flags(curl, CURLOPT_PROTOCOLS, config->proto);
+ if(config->proto_redir_present)
+ my_setopt_flags(curl, CURLOPT_REDIR_PROTOCOLS, config->proto_redir);
+
+ if(config->content_disposition
+ && (urlnode->flags & GETOUT_USEREMOTE)
+ && (checkprefix("http://", this_url) ||
+ checkprefix("https://", this_url)))
+ hdrcbdata.honor_cd_filename = TRUE;
+ else
+ hdrcbdata.honor_cd_filename = FALSE;
+
+ hdrcbdata.outs = &outs;
+ hdrcbdata.heads = &heads;
+
+ my_setopt(curl, CURLOPT_HEADERFUNCTION, tool_header_cb);
+ my_setopt(curl, CURLOPT_HEADERDATA, &hdrcbdata);
+
+ if(config->resolve)
+ /* new in 7.21.3 */
+ my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve);
+
+ /* new in 7.21.4 */
+ if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP) {
+ if(config->tls_username)
+ my_setopt_str(curl, CURLOPT_TLSAUTH_USERNAME,
+ config->tls_username);
+ if(config->tls_password)
+ my_setopt_str(curl, CURLOPT_TLSAUTH_PASSWORD,
+ config->tls_password);
+ if(config->tls_authtype)
+ my_setopt_str(curl, CURLOPT_TLSAUTH_TYPE,
+ config->tls_authtype);
+ }
+
+ /* new in 7.22.0 */
+ if(config->gssapi_delegation)
+ my_setopt_str(curl, CURLOPT_GSSAPI_DELEGATION,
+ config->gssapi_delegation);
+
+ /* new in 7.25.0 */
+ if(config->ssl_allow_beast)
+ my_setopt(curl, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_ALLOW_BEAST);
+
+ if(config->mail_auth)
+ my_setopt_str(curl, CURLOPT_MAIL_AUTH, config->mail_auth);
+
+ /* new in 7.31.0 */
+ if(config->sasl_ir)
+ my_setopt(curl, CURLOPT_SASL_IR, 1L);
+
+ if(config->nonpn) {
+ my_setopt(curl, CURLOPT_SSL_ENABLE_NPN, 0L);
+ }
+
+ if(config->noalpn) {
+ 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 */
+
+ retry_numretries = config->req_retry;
+ retry_sleep = retry_sleep_default; /* ms */
+ retrystart = tvnow();
+
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+ result = easysrc_perform();
+ if(result) {
+ goto show_error;
+ }
+#endif
+
+ for(;;) {
+#ifdef USE_METALINK
+ if(!metalink && config->use_metalink) {
+ /* If outs.metalink_parser is non-NULL, delete it first. */
+ if(outs.metalink_parser)
+ metalink_parser_context_delete(outs.metalink_parser);
+ outs.metalink_parser = metalink_parser_context_new();
+ if(outs.metalink_parser == NULL) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto show_error;
+ }
+ fprintf(config->global->errors,
+ "Metalink: parsing (%s) metalink/XML...\n", this_url);
+ }
+ else if(metalink)
+ fprintf(config->global->errors,
+ "Metalink: fetching (%s) from (%s)...\n",
+ mlfile->filename, this_url);
+#endif /* USE_METALINK */
+
+#ifdef CURLDEBUG
+ if(config->test_event_based)
+ result = curl_easy_perform_ev(curl);
+ else
+#endif
+ result = curl_easy_perform(curl);
+
+ if(!result && !outs.stream && !outs.bytes) {
+ /* we have received no data despite the transfer was successful
+ ==> force cration of an empty output file (if an output file
+ was specified) */
+ long cond_unmet = 0L;
+ /* do not create (or even overwrite) the file in case we get no
+ data because of unmet condition */
+ curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &cond_unmet);
+ if(!cond_unmet && !tool_create_output_file(&outs))
+ result = CURLE_WRITE_ERROR;
+ }
+
+ if(outs.is_cd_filename && outs.stream && !global->mute &&
+ outs.filename)
+ printf("curl: Saved to filename '%s'\n", outs.filename);
+
+ /* if retry-max-time is non-zero, make sure we haven't exceeded the
+ time */
+ if(retry_numretries &&
+ (!config->retry_maxtime ||
+ (tvdiff(tvnow(), retrystart) <
+ config->retry_maxtime*1000L)) ) {
+ enum {
+ RETRY_NO,
+ RETRY_TIMEOUT,
+ RETRY_HTTP,
+ RETRY_FTP,
+ 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))
+ /* retry timeout always */
+ retry = RETRY_TIMEOUT;
+ else if((CURLE_OK == result) ||
+ (config->failonerror &&
+ (CURLE_HTTP_RETURNED_ERROR == result))) {
+ /* If it returned OK. _or_ failonerror was enabled and it
+ returned due to such an error, check for HTTP transient
+ errors to retry on. */
+ char *effective_url = NULL;
+ curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_url);
+ if(effective_url &&
+ checkprefix("http", effective_url)) {
+ /* This was HTTP(S) */
+ curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
+
+ switch(response) {
+ case 500: /* Internal Server Error */
+ case 502: /* Bad Gateway */
+ case 503: /* Service Unavailable */
+ case 504: /* Gateway Timeout */
+ retry = RETRY_HTTP;
+ /*
+ * At this point, we have already written data to the output
+ * file (or terminal). If we write to a file, we must rewind
+ * or close/re-open the file so that the next attempt starts
+ * over from the beginning.
+ *
+ * TODO: similar action for the upload case. We might need
+ * to start over reading from a previous point if we have
+ * uploaded something when this was returned.
+ */
+ break;
+ }
+ }
+ } /* if CURLE_OK */
+ else if(result) {
+ curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
+
+ if(response/100 == 4)
+ /*
+ * This is typically when the FTP server only allows a certain
+ * amount of users and we are not one of them. All 4xx codes
+ * are transient.
+ */
+ retry = RETRY_FTP;
+ }
+
+ if(retry) {
+ static const char * const m[]={
+ NULL, "timeout", "HTTP error", "FTP error"
+ };
+
+ warnf(config->global, "Transient problem: %s "
+ "Will retry in %ld seconds. "
+ "%ld retries left.\n",
+ m[retry], retry_sleep/1000L, retry_numretries);
+
+ tool_go_sleep(retry_sleep);
+ retry_numretries--;
+ if(!config->retry_delay) {
+ retry_sleep *= 2;
+ if(retry_sleep > RETRY_SLEEP_MAX)
+ retry_sleep = RETRY_SLEEP_MAX;
+ }
+ if(outs.bytes && outs.filename && outs.stream) {
+ /* We have written data to a output file, we truncate file
+ */
+ if(!global->mute)
+ fprintf(global->errors, "Throwing away %"
+ CURL_FORMAT_CURL_OFF_T " bytes\n",
+ outs.bytes);
+ fflush(outs.stream);
+ /* truncate file at the position where we started appending */
+#ifdef HAVE_FTRUNCATE
+ if(ftruncate( fileno(outs.stream), outs.init)) {
+ /* when truncate fails, we can't just append as then we'll
+ create something strange, bail out */
+ if(!global->mute)
+ fprintf(global->errors,
+ "failed to truncate, exiting\n");
+ result = CURLE_WRITE_ERROR;
+ goto quit_urls;
+ }
+ /* now seek to the end of the file, the position where we
+ just truncated the file in a large file-safe way */
+ fseek(outs.stream, 0, SEEK_END);
+#else
+ /* ftruncate is not available, so just reposition the file
+ to the location we would have truncated it. This won't
+ work properly with large files on 32-bit systems, but
+ most of those will have ftruncate. */
+ fseek(outs.stream, (long)outs.init, SEEK_SET);
+#endif
+ outs.bytes = 0; /* clear for next round */
+ }
+ continue; /* curl_easy_perform loop */
+ }
+ } /* if retry_numretries */
+ else if(metalink) {
+ /* Metalink: Decide to try the next resource or
+ not. Basically, we want to try the next resource if
+ download was not successful. */
+ long response;
+ if(CURLE_OK == result) {
+ /* TODO We want to try next resource when download was
+ not successful. How to know that? */
+ char *effective_url = NULL;
+ curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_url);
+ if(effective_url &&
+ curlx_strnequal(effective_url, "http", 4)) {
+ /* This was HTTP(S) */
+ curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
+ if(response != 200 && response != 206) {
+ metalink_next_res = 1;
+ fprintf(global->errors,
+ "Metalink: fetching (%s) from (%s) FAILED "
+ "(HTTP status code %d)\n",
+ mlfile->filename, this_url, response);
+ }
+ }
+ }
+ else {
+ metalink_next_res = 1;
+ fprintf(global->errors,
+ "Metalink: fetching (%s) from (%s) FAILED (%s)\n",
+ mlfile->filename, this_url,
+ (errorbuffer[0]) ?
+ errorbuffer : curl_easy_strerror(result));
+ }
+ }
+ if(metalink && !metalink_next_res)
+ fprintf(global->errors, "Metalink: fetching (%s) from (%s) OK\n",
+ mlfile->filename, this_url);
+
+ /* In all ordinary cases, just break out of loop here */
+ break; /* curl_easy_perform loop */
+
+ }
+
+ if((global->progressmode == CURL_PROGRESS_BAR) &&
+ progressbar.calls)
+ /* if the custom progress bar has been displayed, we output a
+ newline here */
+ fputs("\n", progressbar.out);
+
+ if(config->writeout)
+ ourWriteOut(curl, &outs, config->writeout);
+
+ if(config->writeenv)
+ ourWriteEnv(curl);
+
+ /*
+ ** Code within this loop may jump directly here to label 'show_error'
+ ** in order to display an error message for CURLcode stored in 'res'
+ ** variable and exit loop once that necessary writing and cleanup
+ ** in label 'quit_urls' has been done.
+ */
+
+ show_error:
+
+#ifdef __VMS
+ if(is_vms_shell()) {
+ /* VMS DCL shell behavior */
+ if(!global->showerror)
+ vms_show = VMSSTS_HIDE;
+ }
+ 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)
+ fprintf(global->errors, "%s%s",
+ CURL_CA_CERT_ERRORMSG1, CURL_CA_CERT_ERRORMSG2);
+ }
+
+ /* Fall through comment to 'quit_urls' label */
+
+ /*
+ ** Upon error condition and always that a message has already been
+ ** displayed, code within this loop may jump directly here to label
+ ** 'quit_urls' otherwise it should jump to 'show_error' label above.
+ **
+ ** When 'res' variable is _not_ CURLE_OK loop will exit once that
+ ** all code following 'quit_urls' has been executed. Otherwise it
+ ** will loop to the beginning from where it may exit if there are
+ ** no more urls left.
+ */
+
+ quit_urls:
+
+ /* Set file extended attributes */
+ if(!result && config->xattr && outs.fopened && outs.stream) {
+ int rc = fwrite_xattr(curl, fileno(outs.stream));
+ if(rc)
+ warnf(config->global, "Error setting extended attributes: %s\n",
+ strerror(errno));
+ }
+
+ /* Close the file */
+ if(outs.fopened && outs.stream) {
+ int rc = fclose(outs.stream);
+ if(!result && rc) {
+ /* something went wrong in the writing process */
+ result = CURLE_WRITE_ERROR;
+ fprintf(global->errors, "(%d) Failed writing body\n", result);
+ }
+ }
+ else if(!outs.s_isreg && outs.stream) {
+ /* Dump standard stream buffered data */
+ int rc = fflush(outs.stream);
+ if(!result && rc) {
+ /* something went wrong in the writing process */
+ result = CURLE_WRITE_ERROR;
+ fprintf(global->errors, "(%d) Failed writing body\n", result);
+ }
+ }
+
+#ifdef __AMIGA__
+ if(!result && outs.s_isreg && outs.filename) {
+ /* Set the url (up to 80 chars) as comment for the file */
+ if(strlen(url) > 78)
+ url[79] = '\0';
+ SetComment(outs.filename, url);
+ }
+#endif
+
+#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) {
+ /* Ask libcurl if we got a remote file time */
+ long filetime = -1;
+ curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
+ if(filetime >= 0) {
+ struct utimbuf times;
+ times.actime = (time_t)filetime;
+ times.modtime = (time_t)filetime;
+ utime(outs.filename, &times); /* set the time we got */
+ }
+ }
+#endif
+
+#ifdef USE_METALINK
+ if(!metalink && config->use_metalink && result == CURLE_OK) {
+ int rv = parse_metalink(config, &outs, this_url);
+ if(rv == 0)
+ fprintf(config->global->errors, "Metalink: parsing (%s) OK\n",
+ this_url);
+ else if(rv == -1)
+ fprintf(config->global->errors, "Metalink: parsing (%s) FAILED\n",
+ this_url);
+ }
+ else if(metalink && result == CURLE_OK && !metalink_next_res) {
+ int rv = metalink_check_hash(global, mlfile, outs.filename);
+ if(rv == 0) {
+ metalink_next_res = 1;
+ }
+ }
+#endif /* USE_METALINK */
+
+ /* No more business with this output struct */
+ if(outs.alloc_filename)
+ Curl_safefree(outs.filename);
+#ifdef USE_METALINK
+ if(outs.metalink_parser)
+ metalink_parser_context_delete(outs.metalink_parser);
+#endif /* USE_METALINK */
+ memset(&outs, 0, sizeof(struct OutStruct));
+ hdrcbdata.outs = NULL;
+
+ /* Free loop-local allocated memory and close loop-local opened fd */
+
+ Curl_safefree(outfile);
+ Curl_safefree(this_url);
+
+ if(infdopen)
+ close(infd);
+
+ if(metalink) {
+ /* Should exit if error is fatal. */
+ if(is_fatal_error(result)) {
+ break;
+ }
+ if(!metalink_next_res)
+ break;
+ mlres = mlres->next;
+ if(mlres == NULL)
+ /* TODO If metalink_next_res is 1 and mlres is NULL,
+ * set res to error code
+ */
+ break;
+ }
+ else
+ if(urlnum > 1) {
+ /* when url globbing, exit loop upon critical error */
+ if(is_fatal_error(result))
+ break;
+ }
+ else if(result)
+ /* when not url globbing, exit loop upon any error */
+ break;
+
+ } /* loop to the next URL */
+
+ /* Free loop-local allocated memory */
+
+ Curl_safefree(uploadfile);
+
+ if(urls) {
+ /* Free list of remaining URLs */
+ glob_cleanup(urls);
+ urls = NULL;
+ }
+
+ if(infilenum > 1) {
+ /* when file globbing, exit loop upon critical error */
+ if(is_fatal_error(result))
+ break;
+ }
+ else if(result)
+ /* when not file globbing, exit loop upon any error */
+ break;
+
+ } /* loop to the next globbed upload file */
+
+ /* Free loop-local allocated memory */
+
+ Curl_safefree(outfiles);
+
+ if(inglob) {
+ /* Free list of globbed upload files */
+ glob_cleanup(inglob);
+ inglob = NULL;
+ }
+
+ /* Free this URL node data without destroying the
+ the node itself nor modifying next pointer. */
+ Curl_safefree(urlnode->url);
+ Curl_safefree(urlnode->outfile);
+ Curl_safefree(urlnode->infile);
+ urlnode->flags = 0;
+
+ /*
+ ** Bail out upon critical errors
+ */
+ if(is_fatal_error(result))
+ goto quit_curl;
+
+ } /* for-loop through all URLs */
+
+ /*
+ ** Nested loops end here.
+ */
+
+ quit_curl:
+
+ /* Reset the global config variables */
+ global->noprogress = orig_noprogress;
+ global->isatty = orig_isatty;
+
+ /* Free function-local referenced allocated memory */
+ Curl_safefree(httpgetfields);
+
+ /* Free list of given URLs */
+ clean_getout(config);
+
+ hdrcbdata.heads = NULL;
+
+ /* Close function-local opened file descriptors */
+ if(heads.fopened && heads.stream)
+ fclose(heads.stream);
+
+ if(heads.alloc_filename)
+ Curl_safefree(heads.filename);
+
+ /* Release metalink related resources here */
+ clean_metalink(config);
+
+ return result;
+}
+
+CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
+{
+ CURLcode result = CURLE_OK;
+
+ /* Setup proper locale from environment */
+#ifdef HAVE_SETLOCALE
+ setlocale(LC_ALL, "");
+#endif
+
+ /* Parse .curlrc if necessary */
+ if((argc == 1) || (!curlx_strequal(argv[1], "-q"))) {
+ parseconfig(NULL, config); /* ignore possible failure */
+
+ /* If we had no arguments then make sure a url was specified in .curlrc */
+ if((argc < 2) && (!config->first->url_list)) {
+ helpf(config->errors, NULL);
+ result = CURLE_FAILED_INIT;
+ }
+ }
+
+ if(!result) {
+ /* Parse the command line arguments */
+ ParameterError res = parse_args(config, argc, argv);
+ if(res) {
+ result = CURLE_OK;
+
+ /* Check if we were asked for the help */
+ if(res == PARAM_HELP_REQUESTED)
+ tool_help();
+ /* Check if we were asked for the manual */
+ else if(res == PARAM_MANUAL_REQUESTED)
+ hugehelp();
+ /* Check if we were asked for the version information */
+ else if(res == PARAM_VERSION_INFO_REQUESTED)
+ tool_version_info();
+ /* Check if we were asked to list the SSL engines */
+ else if(res == PARAM_ENGINES_REQUESTED)
+ tool_list_engines(config->easy);
+ else
+ result = CURLE_FAILED_INIT;
+ }
+ else {
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+ /* Initialise the libcurl source output */
+ result = easysrc_init();
+#endif
+
+ /* Perform the main operations */
+ if(!result) {
+ size_t count = 0;
+ struct OperationConfig *operation = config->first;
+
+ /* Get the required aguments for each operation */
+ while(!result && operation) {
+ result = get_args(operation, count++);
+
+ operation = operation->next;
+ }
+
+ /* Set the current operation pointer */
+ config->current = config->first;
+
+ /* Perform each operation */
+ while(!result && config->current) {
+ result = operate_do(config, config->current);
+
+ config->current = config->current->next;
+ }
+
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+ /* Cleanup the libcurl source output */
+ easysrc_cleanup();
+
+ /* Dump the libcurl code if previously enabled */
+ dumpeasysrc(config);
+#endif
+ }
+ else
+ helpf(config->errors, "out of memory\n");
+ }
+ }
+
+ return result;
+}
diff --git a/src/tool_operate.h b/src/tool_operate.h
new file mode 100644
index 00000000..1d5c1a96
--- /dev/null
+++ b/src/tool_operate.h
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_TOOL_OPERATE_H
+#define HEADER_CURL_TOOL_OPERATE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[]);
+
+#endif /* HEADER_CURL_TOOL_OPERATE_H */
+
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c
new file mode 100644
index 00000000..abf94961
--- /dev/null
+++ b/src/tool_operhlp.c
@@ -0,0 +1,174 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_convert.h"
+#include "tool_operhlp.h"
+#include "tool_metalink.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void clean_getout(struct OperationConfig *config)
+{
+ struct getout *next;
+ struct getout *node = config->url_list;
+
+ while(node) {
+ next = node->next;
+ Curl_safefree(node->url);
+ Curl_safefree(node->outfile);
+ Curl_safefree(node->infile);
+ Curl_safefree(node);
+ node = next;
+ }
+ config->url_list = NULL;
+}
+
+bool output_expected(const char *url, const char *uploadfile)
+{
+ if(!uploadfile)
+ return TRUE; /* download */
+ if(checkprefix("http://", url) || checkprefix("https://", url))
+ return TRUE; /* HTTP(S) upload */
+
+ return FALSE; /* non-HTTP upload, probably no output should be expected */
+}
+
+bool stdin_upload(const char *uploadfile)
+{
+ return (curlx_strequal(uploadfile, "-") ||
+ curlx_strequal(uploadfile, ".")) ? TRUE : FALSE;
+}
+
+/*
+ * Adds the file name to the URL if it doesn't already have one.
+ * url will be freed before return if the returned pointer is different
+ */
+char *add_file_name_to_url(CURL *curl, char *url, const char *filename)
+{
+ /* If no file name part is given in the URL, we add this file name */
+ char *ptr = strstr(url, "://");
+ if(ptr)
+ ptr += 3;
+ else
+ ptr = url;
+ ptr = strrchr(ptr, '/');
+ if(!ptr || !strlen(++ptr)) {
+ /* The URL has no file name part, add the local file name. In order
+ to be able to do so, we have to create a new URL in another
+ buffer.*/
+
+ /* We only want the part of the local path that is on the right
+ side of the rightmost slash and backslash. */
+ const char *filep = strrchr(filename, '/');
+ char *file2 = strrchr(filep?filep:filename, '\\');
+ char *encfile;
+
+ if(file2)
+ filep = file2 + 1;
+ else if(filep)
+ filep++;
+ else
+ filep = filename;
+
+ /* URL encode the file name */
+ encfile = curl_easy_escape(curl, filep, 0 /* use strlen */);
+ if(encfile) {
+ char *urlbuffer;
+ if(ptr)
+ /* there is a trailing slash on the URL */
+ urlbuffer = aprintf("%s%s", url, encfile);
+ else
+ /* there is no trailing slash on the URL */
+ urlbuffer = aprintf("%s/%s", url, encfile);
+
+ curl_free(encfile);
+ Curl_safefree(url);
+
+ if(!urlbuffer)
+ return NULL;
+
+ url = urlbuffer; /* use our new URL instead! */
+ }
+ else
+ Curl_safefree(url);
+ }
+ return url;
+}
+
+/* Extracts the name portion of the URL.
+ * Returns a pointer to a heap-allocated string or NULL if
+ * no name part, at location indicated by first argument.
+ */
+CURLcode get_url_file_name(char **filename, const char *url)
+{
+ const char *pc;
+
+ *filename = NULL;
+
+ /* Find and get the remote file name */
+ pc = strstr(url, "://");
+ if(pc)
+ pc += 3;
+ else
+ pc = url;
+ pc = strrchr(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;
+
+ /* in case we built debug enabled, we allow an environment variable
+ * named CURL_TESTDIR to prefix the given file name to put it into a
+ * specific directory
+ */
+#ifdef DEBUGBUILD
+ {
+ char *tdir = curlx_getenv("CURL_TESTDIR");
+ if(tdir) {
+ char buffer[512]; /* suitably large */
+ snprintf(buffer, sizeof(buffer), "%s/%s", tdir, *filename);
+ Curl_safefree(*filename);
+ *filename = strdup(buffer); /* clone the buffer */
+ curl_free(tdir);
+ if(!*filename)
+ return CURLE_OUT_OF_MEMORY;
+ }
+ }
+#endif
+
+ return CURLE_OK;
+}
diff --git a/src/tool_operhlp.h b/src/tool_operhlp.h
new file mode 100644
index 00000000..8fcaad69
--- /dev/null
+++ b/src/tool_operhlp.h
@@ -0,0 +1,39 @@
+#ifndef HEADER_CURL_TOOL_OPERHLP_H
+#define HEADER_CURL_TOOL_OPERHLP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+struct OperationConfig;
+
+void clean_getout(struct OperationConfig *config);
+
+bool output_expected(const char *url, const char *uploadfile);
+
+bool stdin_upload(const char *uploadfile);
+
+char *add_file_name_to_url(CURL *curl, char *url, const char *filename);
+
+CURLcode get_url_file_name(char **filename, const char *url);
+
+#endif /* HEADER_CURL_TOOL_OPERHLP_H */
+
diff --git a/src/tool_panykey.c b/src/tool_panykey.c
new file mode 100644
index 00000000..d8718e32
--- /dev/null
+++ b/src/tool_panykey.c
@@ -0,0 +1,48 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#if defined(__SYMBIAN32__) || defined(NETWARE)
+
+#ifdef NETWARE
+# ifdef __NOVELL_LIBC__
+# include <screen.h>
+# else
+# include <nwconio.h>
+# endif
+#endif
+
+#include "tool_panykey.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void tool_pressanykey(void)
+{
+#if defined(__SYMBIAN32__)
+ getchar();
+#elif defined(NETWARE)
+ pressanykey();
+#endif
+}
+
+#endif /* __SYMBIAN32__ || NETWARE */
+
diff --git a/src/tool_panykey.h b/src/tool_panykey.h
new file mode 100644
index 00000000..50b15d2d
--- /dev/null
+++ b/src/tool_panykey.h
@@ -0,0 +1,37 @@
+#ifndef HEADER_CURL_TOOL_PANYKEY_H
+#define HEADER_CURL_TOOL_PANYKEY_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#if defined(__SYMBIAN32__) || defined(NETWARE)
+
+void tool_pressanykey(void);
+
+#else
+
+#define tool_pressanykey() Curl_nop_stmt
+
+#endif
+
+#endif /* HEADER_CURL_TOOL_PANYKEY_H */
+
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
new file mode 100644
index 00000000..d4b96e76
--- /dev/null
+++ b/src/tool_paramhlp.c
@@ -0,0 +1,524 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_getparam.h"
+#include "tool_getpass.h"
+#include "tool_homedir.h"
+#include "tool_msgs.h"
+#include "tool_paramhlp.h"
+#include "tool_version.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+struct getout *new_getout(struct OperationConfig *config)
+{
+ struct getout *node = calloc(1, sizeof(struct getout));
+ struct getout *last = config->url_last;
+ if(node) {
+ /* append this new node last in the list */
+ if(last)
+ last->next = node;
+ else
+ config->url_list = node; /* first node */
+
+ /* move the last pointer */
+ config->url_last = node;
+
+ node->flags = config->default_node_flags;
+ }
+ return node;
+}
+
+ParameterError file2string(char **bufp, FILE *file)
+{
+ char buffer[256];
+ char *ptr;
+ char *string = NULL;
+ size_t stringlen = 0;
+ size_t buflen;
+
+ if(file) {
+ while(fgets(buffer, sizeof(buffer), file)) {
+ if((ptr = strchr(buffer, '\r')) != NULL)
+ *ptr = '\0';
+ if((ptr = strchr(buffer, '\n')) != NULL)
+ *ptr = '\0';
+ buflen = strlen(buffer);
+ if((ptr = realloc(string, stringlen+buflen+1)) == NULL) {
+ Curl_safefree(string);
+ return PARAM_NO_MEM;
+ }
+ string = ptr;
+ strcpy(string+stringlen, buffer);
+ stringlen += buflen;
+ }
+ }
+ *bufp = string;
+ return PARAM_OK;
+}
+
+ParameterError file2memory(char **bufp, size_t *size, FILE *file)
+{
+ char *newbuf;
+ char *buffer = NULL;
+ size_t alloc = 512;
+ size_t nused = 0;
+ size_t nread;
+
+ if(file) {
+ do {
+ if(!buffer || (alloc == nused)) {
+ /* size_t overflow detection for huge files */
+ if(alloc+1 > ((size_t)-1)/2) {
+ Curl_safefree(buffer);
+ return PARAM_NO_MEM;
+ }
+ alloc *= 2;
+ /* allocate an extra char, reserved space, for null termination */
+ if((newbuf = realloc(buffer, alloc+1)) == NULL) {
+ Curl_safefree(buffer);
+ return PARAM_NO_MEM;
+ }
+ buffer = newbuf;
+ }
+ nread = fread(buffer+nused, 1, alloc-nused, file);
+ nused += nread;
+ } while(nread);
+ /* null terminate the buffer in case it's used as a string later */
+ buffer[nused] = '\0';
+ /* free trailing slack space, if possible */
+ if(alloc != nused) {
+ if((newbuf = realloc(buffer, nused+1)) == NULL) {
+ Curl_safefree(buffer);
+ return PARAM_NO_MEM;
+ }
+ buffer = newbuf;
+ }
+ /* discard buffer if nothing was read */
+ if(!nused) {
+ Curl_safefree(buffer); /* no string */
+ }
+ }
+ *size = nused;
+ *bufp = buffer;
+ return PARAM_OK;
+}
+
+void cleanarg(char *str)
+{
+#ifdef HAVE_WRITABLE_ARGV
+ /* now that GetStr has copied the contents of nextarg, wipe the next
+ * argument out so that the username:password isn't displayed in the
+ * system process list */
+ if(str) {
+ size_t len = strlen(str);
+ memset(str, ' ', len);
+ }
+#else
+ (void)str;
+#endif
+}
+
+/*
+ * Parse the string and write the long in the given address. Return PARAM_OK
+ * on success, otherwise a parameter specific error enum.
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+ParameterError str2num(long *val, const char *str)
+{
+ if(str) {
+ char *endptr;
+ long num = strtol(str, &endptr, 10);
+ if((endptr != str) && (endptr == str + strlen(str))) {
+ *val = num;
+ return PARAM_OK; /* Ok */
+ }
+ }
+ return PARAM_BAD_NUMERIC; /* badness */
+}
+
+/*
+ * Parse the string and write the long in the given address. Return PARAM_OK
+ * on success, otherwise a parameter error enum. ONLY ACCEPTS POSITIVE NUMBERS!
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+ParameterError str2unum(long *val, const char *str)
+{
+ ParameterError result = str2num(val, str);
+ if(result != PARAM_OK)
+ return result;
+ if(*val < 0)
+ return PARAM_NEGATIVE_NUMERIC;
+
+ return PARAM_OK;
+}
+
+/*
+ * Parse the string and write the double in the given address. Return PARAM_OK
+ * on success, otherwise a parameter specific error enum.
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+ParameterError str2double(double *val, const char *str)
+{
+ if(str) {
+ char *endptr;
+ double num = strtod(str, &endptr);
+ if((endptr != str) && (endptr == str + strlen(str))) {
+ *val = num;
+ return PARAM_OK; /* Ok */
+ }
+ }
+ return PARAM_BAD_NUMERIC; /* badness */
+}
+
+/*
+ * Parse the string and write the double in the given address. Return PARAM_OK
+ * on success, otherwise a parameter error enum. ONLY ACCEPTS POSITIVE NUMBERS!
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+ParameterError str2udouble(double *val, const char *str)
+{
+ ParameterError result = str2double(val, str);
+ if(result != PARAM_OK)
+ return result;
+ if(*val < 0)
+ return PARAM_NEGATIVE_NUMERIC;
+
+ return PARAM_OK;
+}
+
+/*
+ * Parse the string and modify the long in the given address. Return
+ * non-zero on failure, zero on success.
+ *
+ * The string is a list of protocols
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+long proto2num(struct OperationConfig *config, long *val, const char *str)
+{
+ char *buffer;
+ const char *sep = ",";
+ char *token;
+
+ static struct sprotos {
+ const char *name;
+ long bit;
+ } const protos[] = {
+ { "all", CURLPROTO_ALL },
+ { "http", CURLPROTO_HTTP },
+ { "https", CURLPROTO_HTTPS },
+ { "ftp", CURLPROTO_FTP },
+ { "ftps", CURLPROTO_FTPS },
+ { "scp", CURLPROTO_SCP },
+ { "sftp", CURLPROTO_SFTP },
+ { "telnet", CURLPROTO_TELNET },
+ { "ldap", CURLPROTO_LDAP },
+ { "ldaps", CURLPROTO_LDAPS },
+ { "dict", CURLPROTO_DICT },
+ { "file", CURLPROTO_FILE },
+ { "tftp", CURLPROTO_TFTP },
+ { "imap", CURLPROTO_IMAP },
+ { "imaps", CURLPROTO_IMAPS },
+ { "pop3", CURLPROTO_POP3 },
+ { "pop3s", CURLPROTO_POP3S },
+ { "smtp", CURLPROTO_SMTP },
+ { "smtps", CURLPROTO_SMTPS },
+ { "rtsp", CURLPROTO_RTSP },
+ { "gopher", CURLPROTO_GOPHER },
+ { "smb", CURLPROTO_SMB },
+ { "smbs", CURLPROTO_SMBS },
+ { NULL, 0 }
+ };
+
+ if(!str)
+ return 1;
+
+ buffer = strdup(str); /* because strtok corrupts it */
+ if(!buffer)
+ return 1;
+
+ for(token = strtok(buffer, sep);
+ token;
+ token = strtok(NULL, sep)) {
+ enum e_action { allow, deny, set } action = allow;
+
+ struct sprotos const *pp;
+
+ /* Process token modifiers */
+ while(!ISALNUM(*token)) { /* may be NULL if token is all modifiers */
+ switch (*token++) {
+ case '=':
+ action = set;
+ break;
+ case '-':
+ action = deny;
+ break;
+ case '+':
+ action = allow;
+ break;
+ default: /* Includes case of terminating NULL */
+ Curl_safefree(buffer);
+ return 1;
+ }
+ }
+
+ for(pp=protos; pp->name; pp++) {
+ if(curlx_raw_equal(token, pp->name)) {
+ switch (action) {
+ case deny:
+ *val &= ~(pp->bit);
+ break;
+ case allow:
+ *val |= pp->bit;
+ break;
+ case set:
+ *val = pp->bit;
+ break;
+ }
+ break;
+ }
+ }
+
+ if(!(pp->name)) { /* unknown protocol */
+ /* If they have specified only this protocol, we say treat it as
+ if no protocols are allowed */
+ if(action == set)
+ *val = 0;
+ warnf(config->global, "unrecognized protocol '%s'\n", token);
+ }
+ }
+ Curl_safefree(buffer);
+ return 0;
+}
+
+/**
+ * Parses the given string looking for an offset (which may be a
+ * larger-than-integer value). The offset CANNOT be negative!
+ *
+ * @param val the offset to populate
+ * @param str the buffer containing the offset
+ * @return PARAM_OK if successful, a parameter specific error enum if failure.
+ */
+ParameterError str2offset(curl_off_t *val, const char *str)
+{
+ char *endptr;
+ if(str[0] == '-')
+ /* offsets aren't negative, this indicates weird input */
+ return PARAM_NEGATIVE_NUMERIC;
+
+#if(CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
+ *val = curlx_strtoofft(str, &endptr, 0);
+ if((*val == CURL_OFF_T_MAX || *val == CURL_OFF_T_MIN) && (ERRNO == ERANGE))
+ return PARAM_BAD_NUMERIC;
+#else
+ *val = strtol(str, &endptr, 0);
+ if((*val == LONG_MIN || *val == LONG_MAX) && ERRNO == ERANGE)
+ return PARAM_BAD_NUMERIC;
+#endif
+ if((endptr != str) && (endptr == str + strlen(str)))
+ return PARAM_OK;
+
+ return PARAM_BAD_NUMERIC;
+}
+
+static CURLcode checkpasswd(const char *kind, /* for what purpose */
+ const size_t i, /* operation index */
+ const bool last, /* TRUE if last operation */
+ char **userpwd) /* pointer to allocated string */
+{
+ char *psep;
+ char *osep;
+
+ if(!*userpwd)
+ return CURLE_OK;
+
+ /* Attempt to find the password separator */
+ psep = strchr(*userpwd, ':');
+
+ /* Attempt to find the options separator */
+ osep = strchr(*userpwd, ';');
+
+ if(!psep && **userpwd != ';') {
+ /* no password present, prompt for one */
+ char passwd[256] = "";
+ char prompt[256];
+ size_t passwdlen;
+ size_t userlen = strlen(*userpwd);
+ char *passptr;
+
+ if(osep)
+ *osep = '\0';
+
+ /* build a nice-looking prompt */
+ if(!i && last)
+ curlx_msnprintf(prompt, sizeof(prompt),
+ "Enter %s password for user '%s':",
+ kind, *userpwd);
+ else
+ curlx_msnprintf(prompt, sizeof(prompt),
+ "Enter %s password for user '%s' on URL #%"
+ CURL_FORMAT_CURL_OFF_TU ":",
+ kind, *userpwd, i + 1);
+
+ /* get password */
+ getpass_r(prompt, passwd, sizeof(passwd));
+ passwdlen = strlen(passwd);
+
+ if(osep)
+ *osep = ';';
+
+ /* extend the allocated memory area to fit the password too */
+ passptr = realloc(*userpwd,
+ passwdlen + 1 + /* an extra for the colon */
+ userlen + 1); /* an extra for the zero */
+ if(!passptr)
+ return CURLE_OUT_OF_MEMORY;
+
+ /* append the password separated with a colon */
+ passptr[userlen] = ':';
+ memcpy(&passptr[userlen+1], passwd, passwdlen+1);
+ *userpwd = passptr;
+ }
+
+ return CURLE_OK;
+}
+
+ParameterError add2list(struct curl_slist **list, const char *ptr)
+{
+ struct curl_slist *newlist = curl_slist_append(*list, ptr);
+ if(newlist)
+ *list = newlist;
+ else
+ return PARAM_NO_MEM;
+
+ return PARAM_OK;
+}
+
+int ftpfilemethod(struct OperationConfig *config, const char *str)
+{
+ if(curlx_raw_equal("singlecwd", str))
+ return CURLFTPMETHOD_SINGLECWD;
+ if(curlx_raw_equal("nocwd", str))
+ return CURLFTPMETHOD_NOCWD;
+ if(curlx_raw_equal("multicwd", str))
+ return CURLFTPMETHOD_MULTICWD;
+
+ warnf(config->global, "unrecognized ftp file method '%s', using default\n",
+ str);
+
+ return CURLFTPMETHOD_MULTICWD;
+}
+
+int ftpcccmethod(struct OperationConfig *config, const char *str)
+{
+ if(curlx_raw_equal("passive", str))
+ return CURLFTPSSL_CCC_PASSIVE;
+ if(curlx_raw_equal("active", str))
+ return CURLFTPSSL_CCC_ACTIVE;
+
+ warnf(config->global, "unrecognized ftp CCC method '%s', using default\n",
+ str);
+
+ return CURLFTPSSL_CCC_PASSIVE;
+}
+
+long delegation(struct OperationConfig *config, char *str)
+{
+ if(curlx_raw_equal("none", str))
+ return CURLGSSAPI_DELEGATION_NONE;
+ if(curlx_raw_equal("policy", str))
+ return CURLGSSAPI_DELEGATION_POLICY_FLAG;
+ if(curlx_raw_equal("always", str))
+ return CURLGSSAPI_DELEGATION_FLAG;
+
+ warnf(config->global, "unrecognized delegation method '%s', using none\n",
+ str);
+
+ return CURLGSSAPI_DELEGATION_NONE;
+}
+
+/*
+ * my_useragent: returns allocated string with default user agent
+ */
+static char *my_useragent(void)
+{
+ return strdup(CURL_NAME "/" CURL_VERSION);
+}
+
+CURLcode get_args(struct OperationConfig *config, const size_t i)
+{
+ CURLcode result = CURLE_OK;
+ bool last = (config->next ? FALSE : TRUE);
+
+ /* Check we have a password for the given host user */
+ if(config->userpwd && !config->xoauth2_bearer) {
+ result = checkpasswd("host", i, last, &config->userpwd);
+ if(result)
+ return result;
+ }
+
+ /* Check we have a password for the given proxy user */
+ if(config->proxyuserpwd) {
+ result = checkpasswd("proxy", i, last, &config->proxyuserpwd);
+ if(result)
+ return result;
+ }
+
+ /* Check we have a user agent */
+ if(!config->useragent) {
+ config->useragent = my_useragent();
+ if(!config->useragent) {
+ helpf(config->global->errors, "out of memory\n");
+ result = CURLE_OUT_OF_MEMORY;
+ }
+ }
+
+ return result;
+}
diff --git a/src/tool_paramhlp.h b/src/tool_paramhlp.h
new file mode 100644
index 00000000..69d7fd42
--- /dev/null
+++ b/src/tool_paramhlp.h
@@ -0,0 +1,54 @@
+#ifndef HEADER_CURL_TOOL_PARAMHLP_H
+#define HEADER_CURL_TOOL_PARAMHLP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+struct getout *new_getout(struct OperationConfig *config);
+
+ParameterError file2string(char **bufp, FILE *file);
+
+ParameterError file2memory(char **bufp, size_t *size, FILE *file);
+
+void cleanarg(char *str);
+
+ParameterError str2num(long *val, const char *str);
+ParameterError str2unum(long *val, const char *str);
+ParameterError str2double(double *val, const char *str);
+ParameterError str2udouble(double *val, const char *str);
+
+long proto2num(struct OperationConfig *config, long *val, const char *str);
+
+ParameterError str2offset(curl_off_t *val, const char *str);
+
+CURLcode get_args(struct OperationConfig *config, const size_t i);
+
+ParameterError add2list(struct curl_slist **list, const char *ptr);
+
+int ftpfilemethod(struct OperationConfig *config, const char *str);
+
+int ftpcccmethod(struct OperationConfig *config, const char *str);
+
+long delegation(struct OperationConfig *config, char *str);
+
+#endif /* HEADER_CURL_TOOL_PARAMHLP_H */
+
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
new file mode 100644
index 00000000..39b43eef
--- /dev/null
+++ b/src/tool_parsecfg.c
@@ -0,0 +1,365 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_getparam.h"
+#include "tool_helpers.h"
+#include "tool_homedir.h"
+#include "tool_msgs.h"
+#include "tool_parsecfg.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#define CURLRC DOT_CHAR "curlrc"
+
+/* only acknowledge colon or equals as separators if the option was not
+ specified with an initial dash! */
+#define ISSEP(x,dash) (!dash && (((x) == '=') || ((x) == ':')))
+
+static const char *unslashquote(const char *line, char *param);
+static char *my_get_line(FILE *fp);
+
+/* return 0 on everything-is-fine, and non-zero otherwise */
+int parseconfig(const char *filename, struct GlobalConfig *global)
+{
+ int res;
+ FILE *file;
+ char filebuffer[512];
+ bool usedarg;
+ char *home;
+ int rc = 0;
+ struct OperationConfig *operation = global->first;
+
+ if(!filename || !*filename) {
+ /* NULL or no file name attempts to load .curlrc from the homedir! */
+
+#ifndef __AMIGA__
+ filename = CURLRC; /* sensible default */
+ home = homedir(); /* portable homedir finder */
+ if(home) {
+ if(strlen(home) < (sizeof(filebuffer) - strlen(CURLRC))) {
+ snprintf(filebuffer, sizeof(filebuffer),
+ "%s%s%s", home, DIR_CHAR, CURLRC);
+
+#ifdef WIN32
+ /* Check if the file exists - if not, try CURLRC in the same
+ * directory as our executable
+ */
+ file = fopen(filebuffer, FOPEN_READTEXT);
+ if(file != NULL) {
+ fclose(file);
+ filename = filebuffer;
+ }
+ else {
+ /* Get the filename of our executable. GetModuleFileName is
+ * already declared via inclusions done in setup header file.
+ * We assume that we are using the ASCII version here.
+ */
+ int n = GetModuleFileName(0, filebuffer, sizeof(filebuffer));
+ if(n > 0 && n < (int)sizeof(filebuffer)) {
+ /* We got a valid filename - get the directory part */
+ char *lastdirchar = strrchr(filebuffer, '\\');
+ if(lastdirchar) {
+ size_t remaining;
+ *lastdirchar = 0;
+ /* If we have enough space, build the RC filename */
+ remaining = sizeof(filebuffer) - strlen(filebuffer);
+ if(strlen(CURLRC) < remaining - 1) {
+ snprintf(lastdirchar, remaining,
+ "%s%s", DIR_CHAR, CURLRC);
+ /* Don't bother checking if it exists - we do
+ * that later
+ */
+ filename = filebuffer;
+ }
+ }
+ }
+ }
+#else /* WIN32 */
+ filename = filebuffer;
+#endif /* WIN32 */
+ }
+ Curl_safefree(home); /* we've used it, now free it */
+ }
+
+# else /* __AMIGA__ */
+ /* On AmigaOS all the config files are into env:
+ */
+ filename = "ENV:" CURLRC;
+
+#endif
+ }
+
+ if(strcmp(filename, "-"))
+ file = fopen(filename, FOPEN_READTEXT);
+ else
+ file = stdin;
+
+ if(file) {
+ char *line;
+ char *aline;
+ char *option;
+ char *param;
+ int lineno = 0;
+ bool alloced_param;
+ bool dashed_option;
+
+ while(NULL != (aline = my_get_line(file))) {
+ lineno++;
+ line = aline;
+ alloced_param=FALSE;
+
+ /* line with # in the first non-blank column is a comment! */
+ while(*line && ISSPACE(*line))
+ line++;
+
+ switch(*line) {
+ case '#':
+ case '/':
+ case '\r':
+ case '\n':
+ case '*':
+ case '\0':
+ Curl_safefree(aline);
+ continue;
+ }
+
+ /* the option keywords starts here */
+ option = line;
+
+ /* the option starts with a dash? */
+ dashed_option = option[0]=='-'?TRUE:FALSE;
+
+ while(*line && !ISSPACE(*line) && !ISSEP(*line, dashed_option))
+ line++;
+ /* ... and has ended here */
+
+ if(*line)
+ *line++ = '\0'; /* zero terminate, we have a local copy of the data */
+
+#ifdef DEBUG_CONFIG
+ fprintf(stderr, "GOT: %s\n", option);
+#endif
+
+ /* pass spaces and separator(s) */
+ while(*line && (ISSPACE(*line) || ISSEP(*line, dashed_option)))
+ line++;
+
+ /* the parameter starts here (unless quoted) */
+ if(*line == '\"') {
+ /* quoted parameter, do the quote dance */
+ line++;
+ param = malloc(strlen(line) + 1); /* parameter */
+ if(!param) {
+ /* out of memory */
+ Curl_safefree(aline);
+ rc = 1;
+ break;
+ }
+ alloced_param = TRUE;
+ (void)unslashquote(line, param);
+ }
+ else {
+ param = line; /* parameter starts here */
+ while(*line && !ISSPACE(*line))
+ line++;
+
+ if(*line) {
+ *line = '\0'; /* zero terminate */
+
+ /* to detect mistakes better, see if there's data following */
+ line++;
+ /* pass all spaces */
+ while(*line && ISSPACE(*line))
+ line++;
+
+ switch(*line) {
+ case '\0':
+ case '\r':
+ case '\n':
+ case '#': /* comment */
+ break;
+ default:
+ warnf(operation->global, "%s:%d: warning: '%s' uses unquoted "
+ "white space in the line that may cause side-effects!\n",
+ filename, lineno, option);
+ }
+ }
+ }
+
+ if(!*param) {
+ /* do this so getparameter can check for required parameters.
+ Otherwise it always thinks there's a parameter. */
+ if(alloced_param)
+ Curl_safefree(param);
+ param = NULL;
+ }
+
+#ifdef DEBUG_CONFIG
+ fprintf(stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
+#endif
+ res = getparameter(option, param, &usedarg, global, operation);
+
+ if(param && *param && !usedarg)
+ /* we passed in a parameter that wasn't used! */
+ res = PARAM_GOT_EXTRA_PARAMETER;
+
+ if(res == PARAM_NEXT_OPERATION) {
+ if(operation->url_list && operation->url_list->url) {
+ /* Allocate the next config */
+ operation->next = malloc(sizeof(struct OperationConfig));
+ if(operation->next) {
+ /* Initialise the newly created config */
+ config_init(operation->next);
+
+ /* Copy the easy handle */
+ operation->next->easy = global->easy;
+
+ /* Set the global config pointer */
+ operation->next->global = global;
+
+ /* Update the last operation pointer */
+ global->last = operation->next;
+
+ /* Move onto the new config */
+ operation->next->prev = operation;
+ operation = operation->next;
+ }
+ else
+ res = PARAM_NO_MEM;
+ }
+ }
+
+ if(res != PARAM_OK && res != PARAM_NEXT_OPERATION) {
+ /* the help request isn't really an error */
+ if(!strcmp(filename, "-")) {
+ filename = (char *)"<stdin>";
+ }
+ if(res != PARAM_HELP_REQUESTED &&
+ res != PARAM_MANUAL_REQUESTED &&
+ res != PARAM_VERSION_INFO_REQUESTED &&
+ res != PARAM_ENGINES_REQUESTED) {
+ const char *reason = param2text(res);
+ warnf(operation->global, "%s:%d: warning: '%s' %s\n",
+ filename, lineno, option, reason);
+ }
+ }
+
+ if(alloced_param)
+ Curl_safefree(param);
+
+ Curl_safefree(aline);
+ }
+ if(file != stdin)
+ fclose(file);
+ }
+ else
+ rc = 1; /* couldn't open the file */
+
+ return rc;
+}
+
+/*
+ * Copies the string from line to the buffer at param, unquoting
+ * backslash-quoted characters and NUL-terminating the output string.
+ * Stops at the first non-backslash-quoted double quote character or the
+ * end of the input string. param must be at least as long as the input
+ * string. Returns the pointer after the last handled input character.
+ */
+static const char *unslashquote(const char *line, char *param)
+{
+ while(*line && (*line != '\"')) {
+ if(*line == '\\') {
+ char out;
+ line++;
+
+ /* default is to output the letter after the backslash */
+ switch(out = *line) {
+ case '\0':
+ continue; /* this'll break out of the loop */
+ case 't':
+ out = '\t';
+ break;
+ case 'n':
+ out = '\n';
+ break;
+ case 'r':
+ out = '\r';
+ break;
+ case 'v':
+ out = '\v';
+ break;
+ }
+ *param++ = out;
+ line++;
+ }
+ else
+ *param++ = *line++;
+ }
+ *param = '\0'; /* always zero terminate */
+ return line;
+}
+
+/*
+ * Reads a line from the given file, ensuring is NUL terminated.
+ * The pointer must be freed by the caller.
+ * NULL is returned on an out of memory condition.
+ */
+static char *my_get_line(FILE *fp)
+{
+ char buf[4096];
+ char *nl = NULL;
+ char *line = NULL;
+
+ do {
+ if(NULL == fgets(buf, sizeof(buf), fp))
+ break;
+ if(!line) {
+ line = strdup(buf);
+ if(!line)
+ return NULL;
+ }
+ else {
+ char *ptr;
+ size_t linelen = strlen(line);
+ ptr = realloc(line, linelen + strlen(buf) + 1);
+ if(!ptr) {
+ Curl_safefree(line);
+ return NULL;
+ }
+ line = ptr;
+ strcpy(&line[linelen], buf);
+ }
+ nl = strchr(line, '\n');
+ } while(!nl);
+
+ if(nl)
+ *nl = '\0';
+
+ return line;
+}
+
diff --git a/src/tool_parsecfg.h b/src/tool_parsecfg.h
new file mode 100644
index 00000000..c3b19d54
--- /dev/null
+++ b/src/tool_parsecfg.h
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_TOOL_PARSECFG_H
+#define HEADER_CURL_TOOL_PARSECFG_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+int parseconfig(const char *filename, struct GlobalConfig *config);
+
+#endif /* HEADER_CURL_TOOL_PARSECFG_H */
+
diff --git a/src/tool_sdecls.h b/src/tool_sdecls.h
new file mode 100644
index 00000000..e74020f7
--- /dev/null
+++ b/src/tool_sdecls.h
@@ -0,0 +1,153 @@
+#ifndef HEADER_CURL_TOOL_SDECLS_H
+#define HEADER_CURL_TOOL_SDECLS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+#ifdef USE_METALINK
+# include <metalink/metalink.h>
+#endif /* USE_METALINK */
+
+/*
+ * OutStruct variables keep track of information relative to curl's
+ * output writing, which may take place to a standard stream or a file.
+ *
+ * 'filename' member is either a pointer to a file name string or NULL
+ * when dealing with a standard stream.
+ *
+ * 'alloc_filename' member is TRUE when string pointed by 'filename' has been
+ * dynamically allocated and 'belongs' to this OutStruct, otherwise FALSE.
+ *
+ * 'is_cd_filename' member is TRUE when string pointed by 'filename' has been
+ * set using a server-specified Content-Disposition filename, otherwise FALSE.
+ *
+ * 's_isreg' member is TRUE when output goes to a regular file, this also
+ * implies that output is 'seekable' and 'appendable' and also that member
+ * 'filename' points to file name's string. For any standard stream member
+ * 's_isreg' will be FALSE.
+ *
+ * 'fopened' member is TRUE when output goes to a regular file and it
+ * has been fopen'ed, requiring it to be closed later on. In any other
+ * case this is FALSE.
+ *
+ * 'stream' member is a pointer to a stream controlling object as returned
+ * from a 'fopen' call or a standard stream.
+ *
+ * 'config' member is a pointer to associated 'OperationConfig' struct.
+ *
+ * 'bytes' member represents amount written so far.
+ *
+ * 'init' member holds original file size or offset at which truncation is
+ * taking place. Always zero unless appending to a non-empty regular file.
+ *
+ * 'metalink_parser' member is a pointer to Metalink XML parser
+ * context.
+ */
+
+struct OutStruct {
+ char *filename;
+ bool alloc_filename;
+ bool is_cd_filename;
+ bool s_isreg;
+ bool fopened;
+ FILE *stream;
+ struct OperationConfig *config;
+ curl_off_t bytes;
+ curl_off_t init;
+#ifdef USE_METALINK
+ metalink_parser_context_t *metalink_parser;
+#endif /* USE_METALINK */
+};
+
+
+/*
+ * InStruct variables keep track of information relative to curl's
+ * input reading, which may take place from stdin or from some file.
+ *
+ * 'fd' member is either 'stdin' file descriptor number STDIN_FILENO
+ * or a file descriptor as returned from an 'open' call for some file.
+ *
+ * 'config' member is a pointer to associated 'OperationConfig' struct.
+ */
+
+struct InStruct {
+ int fd;
+ struct OperationConfig *config;
+};
+
+
+/*
+ * A linked list of these 'getout' nodes contain URL's to fetch,
+ * as well as information relative to where URL contents should
+ * be stored or which file should be uploaded.
+ */
+
+struct getout {
+ struct getout *next; /* next one */
+ char *url; /* the URL we deal with */
+ char *outfile; /* where to store the output */
+ char *infile; /* file to upload, if GETOUT_UPLOAD is set */
+ int flags; /* options - composed of GETOUT_* bits */
+};
+
+#define GETOUT_OUTFILE (1<<0) /* set when outfile is deemed done */
+#define GETOUT_URL (1<<1) /* set when URL is deemed done */
+#define GETOUT_USEREMOTE (1<<2) /* use remote file name locally */
+#define GETOUT_UPLOAD (1<<3) /* if set, -T has been used */
+#define GETOUT_NOUPLOAD (1<<4) /* if set, -T "" has been used */
+#define GETOUT_METALINK (1<<5) /* set when Metalink download */
+
+/*
+ * 'trace' enumeration represents curl's output look'n feel possibilities.
+ */
+
+typedef enum {
+ TRACE_NONE, /* no trace/verbose output at all */
+ TRACE_BIN, /* tcpdump inspired look */
+ TRACE_ASCII, /* like *BIN but without the hex output */
+ TRACE_PLAIN /* -v/--verbose type */
+} trace;
+
+
+/*
+ * 'HttpReq' enumeration represents HTTP request types.
+ */
+
+typedef enum {
+ HTTPREQ_UNSPEC, /* first in list */
+ HTTPREQ_GET,
+ HTTPREQ_HEAD,
+ HTTPREQ_POST,
+ HTTPREQ_SIMPLEPOST,
+ HTTPREQ_CUSTOM,
+ HTTPREQ_LAST /* last in list */
+} HttpReq;
+
+
+/*
+ * Complete struct declarations which have OperationConfig struct members,
+ * just in case this header is directly included in some source file.
+ */
+
+#include "tool_cfgable.h"
+
+#endif /* HEADER_CURL_TOOL_SDECLS_H */
+
diff --git a/src/tool_setopt.c b/src/tool_setopt.c
new file mode 100644
index 00000000..a53fdc83
--- /dev/null
+++ b/src/tool_setopt.c
@@ -0,0 +1,567 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 CURL_DISABLE_LIBCURL_OPTION
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_easysrc.h"
+#include "tool_setopt.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* Lookup tables for converting setopt values back to symbols */
+/* For enums, values may be in any order. */
+/* For bit masks, put combinations first, then single bits, */
+/* and finally any "NONE" value. */
+
+#define NV(e) {#e, e}
+#define NV1(e, v) {#e, (v)}
+#define NVEND {NULL, 0} /* sentinel to mark end of list */
+
+const NameValue setopt_nv_CURLPROXY[] = {
+ NV(CURLPROXY_HTTP),
+ NV(CURLPROXY_HTTP_1_0),
+ NV(CURLPROXY_SOCKS4),
+ NV(CURLPROXY_SOCKS5),
+ NV(CURLPROXY_SOCKS4A),
+ NV(CURLPROXY_SOCKS5_HOSTNAME),
+ NVEND,
+};
+
+const NameValueUnsigned setopt_nv_CURLAUTH[] = {
+ NV(CURLAUTH_ANY), /* combination */
+ NV(CURLAUTH_ANYSAFE), /* combination */
+ NV(CURLAUTH_BASIC),
+ NV(CURLAUTH_DIGEST),
+ NV(CURLAUTH_GSSNEGOTIATE),
+ NV(CURLAUTH_NTLM),
+ NV(CURLAUTH_DIGEST_IE),
+ NV(CURLAUTH_NTLM_WB),
+ NV(CURLAUTH_ONLY),
+ NV(CURLAUTH_NONE),
+ NVEND,
+};
+
+const NameValue setopt_nv_CURL_HTTP_VERSION[] = {
+ NV(CURL_HTTP_VERSION_NONE),
+ NV(CURL_HTTP_VERSION_1_0),
+ NV(CURL_HTTP_VERSION_1_1),
+ NVEND,
+};
+
+const NameValue setopt_nv_CURL_SSLVERSION[] = {
+ NV(CURL_SSLVERSION_DEFAULT),
+ NV(CURL_SSLVERSION_TLSv1),
+ NV(CURL_SSLVERSION_SSLv2),
+ NV(CURL_SSLVERSION_SSLv3),
+ NV(CURL_SSLVERSION_TLSv1_0),
+ NV(CURL_SSLVERSION_TLSv1_1),
+ NV(CURL_SSLVERSION_TLSv1_2),
+ NVEND,
+};
+
+const NameValue setopt_nv_CURL_TIMECOND[] = {
+ NV(CURL_TIMECOND_IFMODSINCE),
+ NV(CURL_TIMECOND_IFUNMODSINCE),
+ NV(CURL_TIMECOND_LASTMOD),
+ NV(CURL_TIMECOND_NONE),
+ NVEND,
+};
+
+const NameValue setopt_nv_CURLFTPSSL_CCC[] = {
+ NV(CURLFTPSSL_CCC_NONE),
+ NV(CURLFTPSSL_CCC_PASSIVE),
+ NV(CURLFTPSSL_CCC_ACTIVE),
+ NVEND,
+};
+
+const NameValue setopt_nv_CURLUSESSL[] = {
+ NV(CURLUSESSL_NONE),
+ NV(CURLUSESSL_TRY),
+ NV(CURLUSESSL_CONTROL),
+ NV(CURLUSESSL_ALL),
+ NVEND,
+};
+
+const NameValue setopt_nv_CURL_NETRC[] = {
+ NV(CURL_NETRC_IGNORED),
+ NV(CURL_NETRC_OPTIONAL),
+ NV(CURL_NETRC_REQUIRED),
+ NVEND,
+};
+
+/* These mappings essentially triplicated - see
+ * tool_libinfo.c and tool_paramhlp.c */
+const NameValue setopt_nv_CURLPROTO[] = {
+ NV(CURLPROTO_ALL), /* combination */
+ NV(CURLPROTO_DICT),
+ NV(CURLPROTO_FILE),
+ NV(CURLPROTO_FTP),
+ NV(CURLPROTO_FTPS),
+ NV(CURLPROTO_GOPHER),
+ NV(CURLPROTO_HTTP),
+ NV(CURLPROTO_HTTPS),
+ NV(CURLPROTO_IMAP),
+ NV(CURLPROTO_IMAPS),
+ NV(CURLPROTO_LDAP),
+ NV(CURLPROTO_LDAPS),
+ NV(CURLPROTO_POP3),
+ NV(CURLPROTO_POP3S),
+ NV(CURLPROTO_RTSP),
+ NV(CURLPROTO_SCP),
+ NV(CURLPROTO_SFTP),
+ NV(CURLPROTO_SMB),
+ NV(CURLPROTO_SMBS),
+ NV(CURLPROTO_SMTP),
+ NV(CURLPROTO_SMTPS),
+ NV(CURLPROTO_TELNET),
+ NV(CURLPROTO_TFTP),
+ NVEND,
+};
+
+/* These options have non-zero default values. */
+static const NameValue setopt_nv_CURLNONZERODEFAULTS[] = {
+ NV1(CURLOPT_SSL_VERIFYPEER, 1),
+ NV1(CURLOPT_SSL_VERIFYHOST, 1),
+ NV1(CURLOPT_SSL_ENABLE_NPN, 1),
+ NV1(CURLOPT_SSL_ENABLE_ALPN, 1),
+ NVEND
+};
+
+/* Format and add code; jump to nomem on malloc error */
+#define ADD(args) do { \
+ ret = easysrc_add args; \
+ if(ret) \
+ goto nomem; \
+} WHILE_FALSE
+#define ADDF(args) do { \
+ ret = easysrc_addf args; \
+ if(ret) \
+ goto nomem; \
+} WHILE_FALSE
+
+#define DECL0(s) ADD((&easysrc_decl, s))
+#define DECL1(f,a) ADDF((&easysrc_decl, f,a))
+
+#define DATA0(s) ADD((&easysrc_data, s))
+#define DATA1(f,a) ADDF((&easysrc_data, f,a))
+#define DATA2(f,a,b) ADDF((&easysrc_data, f,a,b))
+#define DATA3(f,a,b,c) ADDF((&easysrc_data, f,a,b,c))
+
+#define CODE0(s) ADD((&easysrc_code, s))
+#define CODE1(f,a) ADDF((&easysrc_code, f,a))
+#define CODE2(f,a,b) ADDF((&easysrc_code, f,a,b))
+#define CODE3(f,a,b,c) ADDF((&easysrc_code, f,a,b,c))
+
+#define CLEAN0(s) ADD((&easysrc_clean, s))
+#define CLEAN1(f,a) ADDF((&easysrc_clean, f,a))
+
+#define REM0(s) ADD((&easysrc_toohard, s))
+#define REM1(f,a) ADDF((&easysrc_toohard, f,a))
+#define REM2(f,a,b) ADDF((&easysrc_toohard, f,a,b))
+
+/* Escape string to C string syntax. Return NULL if out of memory.
+ * Is this correct for those wacky EBCDIC guys? */
+static char *c_escape(const char *str)
+{
+ size_t len = 0;
+ const char *s;
+ unsigned char c;
+ char *escaped, *e;
+ /* Allocate space based on worst-case */
+ len = strlen(str);
+ escaped = malloc(4 * len + 1);
+ if(!escaped)
+ return NULL;
+
+ e = escaped;
+ for(s=str; (c=*s) != '\0'; s++) {
+ if(c=='\n') {
+ strcpy(e, "\\n");
+ e += 2;
+ }
+ else if(c=='\r') {
+ strcpy(e, "\\r");
+ e += 2;
+ }
+ else if(c=='\t') {
+ strcpy(e, "\\t");
+ e += 2;
+ }
+ else if(c=='\\') {
+ strcpy(e, "\\\\");
+ e += 2;
+ }
+ else if(c=='"') {
+ strcpy(e, "\\\"");
+ e += 2;
+ }
+ else if(! isprint(c)) {
+ snprintf(e, 4, "\\%03o", c);
+ e += 4;
+ }
+ else
+ *e++ = c;
+ }
+ *e = '\0';
+ return escaped;
+}
+
+/* setopt wrapper for enum types */
+CURLcode tool_setopt_enum(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ const NameValue *nvlist, long lval)
+{
+ CURLcode ret = CURLE_OK;
+ bool skip = FALSE;
+
+ ret = curl_easy_setopt(curl, tag, lval);
+ if(!lval)
+ skip = TRUE;
+
+ if(config->libcurl && !skip && !ret) {
+ /* we only use this for real if --libcurl was used */
+ const NameValue *nv = NULL;
+ for(nv=nvlist; nv->name; nv++) {
+ if(nv->value == lval) break; /* found it */
+ }
+ if(! nv->name) {
+ /* If no definition was found, output an explicit value.
+ * This could happen if new values are defined and used
+ * but the NameValue list is not updated. */
+ CODE2("curl_easy_setopt(hnd, %s, %ldL);", name, lval);
+ }
+ else {
+ CODE2("curl_easy_setopt(hnd, %s, (long)%s);", name, nv->name);
+ }
+ }
+
+ nomem:
+ return ret;
+}
+
+/* setopt wrapper for flags */
+CURLcode tool_setopt_flags(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ const NameValue *nvlist, long lval)
+{
+ CURLcode ret = CURLE_OK;
+ bool skip = FALSE;
+
+ ret = curl_easy_setopt(curl, tag, lval);
+ if(!lval)
+ skip = TRUE;
+
+ if(config->libcurl && !skip && !ret) {
+ /* we only use this for real if --libcurl was used */
+ char preamble[80]; /* should accommodate any symbol name */
+ long rest = lval; /* bits not handled yet */
+ const NameValue *nv = NULL;
+ snprintf(preamble, sizeof(preamble),
+ "curl_easy_setopt(hnd, %s, ", name);
+ for(nv=nvlist; nv->name; nv++) {
+ if((nv->value & ~ rest) == 0) {
+ /* all value flags contained in rest */
+ rest &= ~ nv->value; /* remove bits handled here */
+ CODE3("%s(long)%s%s",
+ preamble, nv->name, rest ? " |" : ");");
+ if(!rest)
+ break; /* handled them all */
+ /* replace with all spaces for continuation line */
+ snprintf(preamble, sizeof(preamble), "%*s", strlen(preamble), "");
+ }
+ }
+ /* If any bits have no definition, output an explicit value.
+ * This could happen if new bits are defined and used
+ * but the NameValue list is not updated. */
+ if(rest)
+ CODE2("%s%ldL);", preamble, rest);
+ }
+
+ nomem:
+ return ret;
+}
+
+/* setopt wrapper for bitmasks */
+CURLcode tool_setopt_bitmask(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ const NameValueUnsigned *nvlist,
+ long lval)
+{
+ CURLcode ret = CURLE_OK;
+ bool skip = FALSE;
+
+ ret = curl_easy_setopt(curl, tag, lval);
+ if(!lval)
+ skip = TRUE;
+
+ if(config->libcurl && !skip && !ret) {
+ /* we only use this for real if --libcurl was used */
+ char preamble[80];
+ unsigned long rest = (unsigned long)lval;
+ const NameValueUnsigned *nv = NULL;
+ snprintf(preamble, sizeof(preamble),
+ "curl_easy_setopt(hnd, %s, ", name);
+ for(nv=nvlist; nv->name; nv++) {
+ if((nv->value & ~ rest) == 0) {
+ /* all value flags contained in rest */
+ rest &= ~ nv->value; /* remove bits handled here */
+ CODE3("%s(long)%s%s",
+ preamble, nv->name, rest ? " |" : ");");
+ if(!rest)
+ break; /* handled them all */
+ /* replace with all spaces for continuation line */
+ snprintf(preamble, sizeof(preamble), "%*s", strlen(preamble), "");
+ }
+ }
+ /* If any bits have no definition, output an explicit value.
+ * This could happen if new bits are defined and used
+ * but the NameValue list is not updated. */
+ if(rest)
+ CODE2("%s%luUL);", preamble, rest);
+ }
+
+ nomem:
+ return ret;
+}
+
+/* setopt wrapper for CURLOPT_HTTPPOST */
+CURLcode tool_setopt_httppost(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ struct curl_httppost *post)
+{
+ CURLcode ret = CURLE_OK;
+ char *escaped = NULL;
+ bool skip = FALSE;
+
+ ret = curl_easy_setopt(curl, tag, post);
+ if(!post)
+ skip = TRUE;
+
+ if(config->libcurl && !skip && !ret) {
+ struct curl_httppost *pp, *p;
+ int i;
+ /* May use several httppost lists, if multiple POST actions */
+ i = ++ easysrc_form_count;
+ DECL1("struct curl_httppost *post%d;", i);
+ DATA1("post%d = NULL;", i);
+ CLEAN1("curl_formfree(post%d);", i);
+ CLEAN1("post%d = NULL;", i);
+ if(i == 1)
+ DECL0("struct curl_httppost *postend;");
+ DATA0("postend = NULL;");
+ for(p=post; p; p=p->next) {
+ DATA1("curl_formadd(&post%d, &postend,", i);
+ DATA1(" CURLFORM_COPYNAME, \"%s\",", p->name);
+ for(pp=p; pp; pp=pp->more) {
+ /* May be several files uploaded for one name;
+ * these are linked through the 'more' pointer */
+ Curl_safefree(escaped);
+ escaped = c_escape(pp->contents);
+ if(!escaped) {
+ ret = CURLE_OUT_OF_MEMORY;
+ goto nomem;
+ }
+ if(pp->flags & HTTPPOST_FILENAME) {
+ /* file upload as for -F @filename */
+ DATA1(" CURLFORM_FILE, \"%s\",", escaped);
+ }
+ else if(pp->flags & HTTPPOST_READFILE) {
+ /* content from file as for -F <filename */
+ DATA1(" CURLFORM_FILECONTENT, \"%s\",", escaped);
+ }
+ else
+ DATA1(" CURLFORM_COPYCONTENTS, \"%s\",", escaped);
+ if(pp->showfilename) {
+ Curl_safefree(escaped);
+ escaped = c_escape(pp->showfilename);
+ if(!escaped) {
+ ret = CURLE_OUT_OF_MEMORY;
+ goto nomem;
+ }
+ DATA1(" CURLFORM_FILENAME, \"%s\",", escaped);
+ }
+ if(pp->contenttype) {
+ Curl_safefree(escaped);
+ escaped = c_escape(pp->contenttype);
+ if(!escaped) {
+ ret = CURLE_OUT_OF_MEMORY;
+ goto nomem;
+ }
+ DATA1(" CURLFORM_CONTENTTYPE, \"%s\",", escaped);
+ }
+ }
+ DATA0(" CURLFORM_END);");
+ }
+ CODE2("curl_easy_setopt(hnd, %s, post%d);", name, i);
+ }
+
+ nomem:
+ Curl_safefree(escaped);
+ return ret;
+}
+
+/* setopt wrapper for curl_slist options */
+CURLcode tool_setopt_slist(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ struct curl_slist *list)
+{
+ CURLcode ret = CURLE_OK;
+ char *escaped = NULL;
+ bool skip = FALSE;
+
+ ret = curl_easy_setopt(curl, tag, list);
+ if(!list)
+ skip = TRUE;
+
+ if(config->libcurl && !skip && !ret) {
+ struct curl_slist *s;
+ int i;
+ /* May need several slist variables, so invent name */
+ i = ++ easysrc_slist_count;
+ DECL1("struct curl_slist *slist%d;", i);
+ DATA1("slist%d = NULL;", i);
+ CLEAN1("curl_slist_free_all(slist%d);", i);
+ CLEAN1("slist%d = NULL;", i);
+ for(s=list; s; s=s->next) {
+ Curl_safefree(escaped);
+ escaped = c_escape(s->data);
+ if(!escaped) {
+ ret = CURLE_OUT_OF_MEMORY;
+ goto nomem;
+ }
+ DATA3("slist%d = curl_slist_append(slist%d, \"%s\");", i, i, escaped);
+ }
+ CODE2("curl_easy_setopt(hnd, %s, slist%d);", name, i);
+ }
+
+ nomem:
+ Curl_safefree(escaped);
+ return ret;
+}
+
+/* generic setopt wrapper for all other options.
+ * Some type information is encoded in the tag value. */
+CURLcode tool_setopt(CURL *curl, bool str, struct GlobalConfig *config,
+ const char *name, CURLoption tag, ...)
+{
+ va_list arg;
+ char buf[256];
+ const char *value = NULL;
+ bool remark = FALSE;
+ bool skip = FALSE;
+ bool escape = FALSE;
+ char *escaped = NULL;
+ CURLcode ret = CURLE_OK;
+
+ va_start(arg, tag);
+
+ if(tag < CURLOPTTYPE_OBJECTPOINT) {
+ /* Value is expected to be a long */
+ long lval = va_arg(arg, long);
+ long defval = 0L;
+ const NameValue *nv = NULL;
+ for(nv=setopt_nv_CURLNONZERODEFAULTS; nv->name; nv++) {
+ if(!strcmp(name, nv->name)) {
+ defval = nv->value;
+ break; /* found it */
+ }
+ }
+
+ snprintf(buf, sizeof(buf), "%ldL", lval);
+ value = buf;
+ ret = curl_easy_setopt(curl, tag, lval);
+ if(lval == defval)
+ skip = TRUE;
+ }
+ else if(tag < CURLOPTTYPE_OFF_T) {
+ /* Value is some sort of object pointer */
+ void *pval = va_arg(arg, void *);
+
+ /* function pointers are never printable */
+ if(tag >= CURLOPTTYPE_FUNCTIONPOINT) {
+ if(pval) {
+ value = "functionpointer";
+ remark = TRUE;
+ }
+ else
+ skip = TRUE;
+ }
+
+ else if(pval && str) {
+ value = (char *)pval;
+ escape = TRUE;
+ }
+ else if(pval) {
+ value = "objectpointer";
+ remark = TRUE;
+ }
+ else
+ skip = TRUE;
+
+ ret = curl_easy_setopt(curl, tag, pval);
+
+ }
+ else {
+ /* Value is expected to be curl_off_t */
+ curl_off_t oval = va_arg(arg, curl_off_t);
+ snprintf(buf, sizeof(buf),
+ "(curl_off_t)%" CURL_FORMAT_CURL_OFF_T, oval);
+ value = buf;
+ ret = curl_easy_setopt(curl, tag, oval);
+
+ if(!oval)
+ skip = TRUE;
+ }
+
+ va_end(arg);
+
+ if(config->libcurl && !skip && !ret) {
+ /* we only use this for real if --libcurl was used */
+
+ if(remark)
+ REM2("%s set to a %s", name, value);
+ else {
+ if(escape) {
+ escaped = c_escape(value);
+ if(!escaped) {
+ ret = CURLE_OUT_OF_MEMORY;
+ goto nomem;
+ }
+ CODE2("curl_easy_setopt(hnd, %s, \"%s\");", name, escaped);
+ }
+ else
+ CODE2("curl_easy_setopt(hnd, %s, %s);", name, value);
+ }
+ }
+
+ nomem:
+ Curl_safefree(escaped);
+ return ret;
+}
+
+#endif /* CURL_DISABLE_LIBCURL_OPTION */
diff --git a/src/tool_setopt.h b/src/tool_setopt.h
new file mode 100644
index 00000000..fcba94cb
--- /dev/null
+++ b/src/tool_setopt.h
@@ -0,0 +1,148 @@
+#ifndef HEADER_CURL_TOOL_SETOPT_H
+#define HEADER_CURL_TOOL_SETOPT_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/*
+ * Macros used in operate()
+ */
+
+#define SETOPT_CHECK(v) do { \
+ result = (v); \
+ if(result) \
+ goto show_error; \
+} WHILE_FALSE
+
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+
+/* Associate symbolic names with option values */
+typedef struct {
+ const char *name;
+ long value;
+} NameValue;
+
+typedef struct {
+ const char *name;
+ unsigned long value;
+} NameValueUnsigned;
+
+extern const NameValue setopt_nv_CURLPROXY[];
+extern const NameValue setopt_nv_CURL_HTTP_VERSION[];
+extern const NameValue setopt_nv_CURL_SSLVERSION[];
+extern const NameValue setopt_nv_CURL_TIMECOND[];
+extern const NameValue setopt_nv_CURLFTPSSL_CCC[];
+extern const NameValue setopt_nv_CURLUSESSL[];
+extern const NameValue setopt_nv_CURL_NETRC[];
+extern const NameValue setopt_nv_CURLPROTO[];
+extern const NameValueUnsigned setopt_nv_CURLAUTH[];
+
+/* Map options to NameValue sets */
+#define setopt_nv_CURLOPT_HTTP_VERSION setopt_nv_CURL_HTTP_VERSION
+#define setopt_nv_CURLOPT_HTTPAUTH setopt_nv_CURLAUTH
+#define setopt_nv_CURLOPT_SSLVERSION setopt_nv_CURL_SSLVERSION
+#define setopt_nv_CURLOPT_TIMECONDITION setopt_nv_CURL_TIMECOND
+#define setopt_nv_CURLOPT_FTP_SSL_CCC setopt_nv_CURLFTPSSL_CCC
+#define setopt_nv_CURLOPT_USE_SSL setopt_nv_CURLUSESSL
+#define setopt_nv_CURLOPT_NETRC setopt_nv_CURL_NETRC
+#define setopt_nv_CURLOPT_PROTOCOLS setopt_nv_CURLPROTO
+#define setopt_nv_CURLOPT_REDIR_PROTOCOLS setopt_nv_CURLPROTO
+#define setopt_nv_CURLOPT_PROXYTYPE setopt_nv_CURLPROXY
+#define setopt_nv_CURLOPT_PROXYAUTH setopt_nv_CURLAUTH
+
+/* Intercept setopt calls for --libcurl */
+
+CURLcode tool_setopt_enum(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ const NameValue *nv, long lval);
+CURLcode tool_setopt_flags(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ const NameValue *nv, long lval);
+CURLcode tool_setopt_bitmask(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ const NameValueUnsigned *nv, long lval);
+CURLcode tool_setopt_httppost(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ struct curl_httppost *httppost);
+CURLcode tool_setopt_slist(CURL *curl, struct GlobalConfig *config,
+ const char *name, CURLoption tag,
+ struct curl_slist *list);
+CURLcode tool_setopt(CURL *curl, bool str, struct GlobalConfig *config,
+ const char *name, CURLoption tag, ...);
+
+#define my_setopt(x,y,z) \
+ SETOPT_CHECK(tool_setopt(x, FALSE, global, #y, y, z))
+
+#define my_setopt_str(x,y,z) \
+ SETOPT_CHECK(tool_setopt(x, TRUE, global, #y, y, z))
+
+#define my_setopt_enum(x,y,z) \
+ SETOPT_CHECK(tool_setopt_enum(x, global, #y, y, setopt_nv_ ## y, z))
+
+#define my_setopt_flags(x,y,z) \
+ SETOPT_CHECK(tool_setopt_flags(x, global, #y, y, setopt_nv_ ## y, z))
+
+#define my_setopt_bitmask(x,y,z) \
+ SETOPT_CHECK(tool_setopt_bitmask(x, global, #y, y, setopt_nv_ ## y, z))
+
+#define my_setopt_httppost(x,y,z) \
+ SETOPT_CHECK(tool_setopt_httppost(x, global, #y, y, z))
+
+#define my_setopt_slist(x,y,z) \
+ SETOPT_CHECK(tool_setopt_slist(x, global, #y, y, z))
+
+#define res_setopt(x,y,z) tool_setopt(x, FALSE, global, #y, y, z)
+
+#define res_setopt_str(x,y,z) tool_setopt(x, TRUE, global, #y, y, z)
+
+#else /* CURL_DISABLE_LIBCURL_OPTION */
+
+/* No --libcurl, so pass options directly to library */
+
+#define my_setopt(x,y,z) \
+ SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_str(x,y,z) \
+ SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_enum(x,y,z) \
+ SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_flags(x,y,z) \
+ SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_bitmask(x,y,z) \
+ SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_httppost(x,y,z) \
+ SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_slist(x,y,z) \
+ SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define res_setopt(x,y,z) curl_easy_setopt(x,y,z)
+
+#define res_setopt_str(x,y,z) curl_easy_setopt(x,y,z)
+
+#endif /* CURL_DISABLE_LIBCURL_OPTION */
+
+#endif /* HEADER_CURL_TOOL_SETOPT_H */
diff --git a/src/tool_setup.h b/src/tool_setup.h
new file mode 100644
index 00000000..3d7c1580
--- /dev/null
+++ b/src/tool_setup.h
@@ -0,0 +1,74 @@
+#ifndef HEADER_CURL_TOOL_SETUP_H
+#define HEADER_CURL_TOOL_SETUP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+#define CURL_NO_OLDIES
+
+/*
+ * curl_setup.h may define preprocessor macros such as _FILE_OFFSET_BITS and
+ * _LARGE_FILES in order to support files larger than 2 GB. On platforms
+ * where this happens it is mandatory that these macros are defined before
+ * any system header file is included, otherwise file handling function
+ * prototypes will be misdeclared and curl tool may not build properly;
+ * therefore we must include curl_setup.h before curl.h when building curl.
+ */
+
+#include "curl_setup.h" /* from the lib directory */
+
+/*
+ * curl tool certainly uses libcurl's external interface.
+ */
+
+#include <curl/curl.h> /* external interface */
+
+/*
+ * Platform specific stuff.
+ */
+
+#if defined(macintosh) && defined(__MRC__)
+# define main(x,y) curl_main(x,y)
+#endif
+
+#ifdef TPF
+# undef select
+ /* change which select is used for the curl command line tool */
+# define select(a,b,c,d,e) tpf_select_bsd(a,b,c,d,e)
+ /* and turn off the progress meter */
+# define CONF_DEFAULT (0|CONF_NOPROGRESS)
+#endif
+
+#ifndef OS
+# define OS "unknown"
+#endif
+
+#ifndef UNPRINTABLE_CHAR
+ /* define what to use for unprintable characters */
+# define UNPRINTABLE_CHAR '.'
+#endif
+
+#ifndef HAVE_STRDUP
+# include "tool_strdup.h"
+#endif
+
+#endif /* HEADER_CURL_TOOL_SETUP_H */
+
diff --git a/src/tool_sleep.c b/src/tool_sleep.c
new file mode 100644
index 00000000..d023b325
--- /dev/null
+++ b/src/tool_sleep.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+
+#ifdef HAVE_SYS_POLL_H
+# include <sys/poll.h>
+#elif defined(HAVE_POLL_H)
+# include <poll.h>
+#endif
+
+#ifdef MSDOS
+# include <dos.h>
+#endif
+
+#include "tool_sleep.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void tool_go_sleep(long ms)
+{
+#if defined(MSDOS)
+ delay(ms);
+#elif defined(WIN32)
+ Sleep(ms);
+#elif defined(HAVE_POLL_FINE)
+ (void)poll((void *)0, 0, (int)ms);
+#else
+ struct timeval timeout;
+ timeout.tv_sec = ms / 1000L;
+ ms = ms % 1000L;
+ timeout.tv_usec = ms * 1000L;
+ select(0, NULL, NULL, NULL, &timeout);
+#endif
+}
+
diff --git a/src/tool_sleep.h b/src/tool_sleep.h
new file mode 100644
index 00000000..115a4e40
--- /dev/null
+++ b/src/tool_sleep.h
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_TOOL_SLEEP_H
+#define HEADER_CURL_TOOL_SLEEP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+void tool_go_sleep(long ms);
+
+#endif /* HEADER_CURL_TOOL_SLEEP_H */
+
diff --git a/src/tool_strdup.c b/src/tool_strdup.c
new file mode 100644
index 00000000..a0bbe88b
--- /dev/null
+++ b/src/tool_strdup.c
@@ -0,0 +1,47 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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
new file mode 100644
index 00000000..83c8102c
--- /dev/null
+++ b/src/tool_strdup.h
@@ -0,0 +1,30 @@
+#ifndef HEADER_TOOL_STRDUP_H
+#define HEADER_TOOL_STRDUP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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
new file mode 100644
index 00000000..13372524
--- /dev/null
+++ b/src/tool_urlglob.c
@@ -0,0 +1,671 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+#include "tool_urlglob.h"
+#include "tool_vms.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#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)
+{
+ URLPattern *pat = &glob->pattern[glob->size];
+ pat->type = UPTSet;
+ pat->content.Set.size = 1;
+ pat->content.Set.ptr_s = 0;
+ pat->globindex = -1;
+
+ pat->content.Set.elements = malloc(sizeof(char*));
+
+ if(!pat->content.Set.elements)
+ return GLOBERROR("out of memory", 0, CURLE_OUT_OF_MEMORY);
+
+ pat->content.Set.elements[0] = malloc(len+1);
+ if(!pat->content.Set.elements[0])
+ return GLOBERROR("out of memory", 0, CURLE_OUT_OF_MEMORY);
+
+ memcpy(pat->content.Set.elements[0], fixed, len);
+ pat->content.Set.elements[0][len] = 0;
+
+ return CURLE_OK;
+}
+
+/* multiply
+ *
+ * Multiplies and checks for overflow.
+ */
+static int multiply(unsigned long *amount, long with)
+{
+ unsigned long sum = *amount * with;
+ if(sum/with != *amount)
+ return 1; /* didn't fit, bail out */
+ *amount = sum;
+ return 0;
+}
+
+static CURLcode glob_set(URLGlob *glob, char **patternp,
+ size_t *posp, unsigned long *amount,
+ int globindex)
+{
+ /* processes a set expression with the point behind the opening '{'
+ ','-separated elements are collected until the next closing '}'
+ */
+ URLPattern *pat;
+ bool done = FALSE;
+ char *buf = glob->glob_buffer;
+ char *pattern = *patternp;
+ char *opattern = pattern;
+ size_t opos = *posp-1;
+
+ pat = &glob->pattern[glob->size];
+ /* patterns 0,1,2,... correspond to size=1,3,5,... */
+ pat->type = UPTSet;
+ pat->content.Set.size = 0;
+ pat->content.Set.ptr_s = 0;
+ pat->content.Set.elements = NULL;
+ pat->globindex = globindex;
+
+ while(!done) {
+ switch (*pattern) {
+ case '\0': /* URL ended while set was still open */
+ return GLOBERROR("unmatched brace", opos, CURLE_URL_MALFORMAT);
+
+ case '{':
+ case '[': /* no nested expressions at this time */
+ return GLOBERROR("nested brace", *posp, CURLE_URL_MALFORMAT);
+
+ case '}': /* set element completed */
+ if(opattern == pattern)
+ return GLOBERROR("empty string within braces", *posp,
+ CURLE_URL_MALFORMAT);
+
+ /* 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);
+
+ /* fall-through */
+ case ',':
+
+ *buf = '\0';
+ if(pat->content.Set.elements) {
+ 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);
+
+ pat->content.Set.elements = new_arr;
+ }
+ else
+ pat->content.Set.elements = malloc(sizeof(char*));
+
+ if(!pat->content.Set.elements)
+ return GLOBERROR("out of memory", 0, CURLE_OUT_OF_MEMORY);
+
+ 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);
+ ++pat->content.Set.size;
+
+ if(*pattern == '}') {
+ pattern++; /* pass the closing brace */
+ done = TRUE;
+ continue;
+ }
+
+ buf = glob->glob_buffer;
+ ++pattern;
+ ++(*posp);
+ break;
+
+ case ']': /* illegal closing bracket */
+ return GLOBERROR("unexpected close bracket", *posp, CURLE_URL_MALFORMAT);
+
+ case '\\': /* escaped character, skip '\' */
+ if(pattern[1]) {
+ ++pattern;
+ ++(*posp);
+ }
+ /* intentional fallthrough */
+ default:
+ *buf++ = *pattern++; /* copy character to set element */
+ ++(*posp);
+ }
+ }
+
+ *patternp = pattern; /* return with the new position */
+ return CURLE_OK;
+}
+
+static CURLcode glob_range(URLGlob *glob, char **patternp,
+ size_t *posp, unsigned long *amount,
+ int globindex)
+{
+ /* processes a range expression with the point behind the opening '['
+ - char range: e.g. "a-z]", "B-Q]"
+ - num range: e.g. "0-9]", "17-2000]"
+ - num range with leading zeros: e.g. "001-999]"
+ expression is checked for well-formedness and collected until the next ']'
+ */
+ URLPattern *pat;
+ int rc;
+ char *pattern = *patternp;
+ char *c;
+
+ pat = &glob->pattern[glob->size];
+ pat->globindex = globindex;
+
+ if(ISALPHA(*pattern)) {
+ /* character range detected */
+ char min_c;
+ char max_c;
+ int step=1;
+
+ pat->type = UPTCharRange;
+
+ rc = sscanf(pattern, "%c-%c", &min_c, &max_c);
+
+ if((rc == 2) && (pattern[3] == ':')) {
+ char *endp;
+ unsigned long lstep;
+ errno = 0;
+ lstep = strtoul(&pattern[4], &endp, 10);
+ if(errno || (*endp != ']'))
+ step = -1;
+ else {
+ pattern = endp+1;
+ step = (int)lstep;
+ if(step > (max_c - min_c))
+ step = -1;
+ }
+ }
+ else
+ pattern += 4;
+
+ *posp += (pattern - *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);
+
+ /* if there was a ":[num]" thing, use that as step or else use 1 */
+ pat->content.CharRange.step = step;
+ pat->content.CharRange.ptr_c = pat->content.CharRange.min_c = min_c;
+ pat->content.CharRange.max_c = max_c;
+
+ if(multiply(amount, (pat->content.CharRange.max_c -
+ pat->content.CharRange.min_c) /
+ pat->content.CharRange.step + 1) )
+ return GLOBERROR("range overflow", *posp, CURLE_URL_MALFORMAT);
+ }
+ else if(ISDIGIT(*pattern)) {
+ /* numeric range detected */
+ unsigned long min_n;
+ unsigned long max_n = 0;
+ unsigned long step_n = 0;
+ char *endp;
+
+ pat->type = UPTNumRange;
+ pat->content.NumRange.padlength = 0;
+
+ if(*pattern == '0') {
+ /* leading zero specified, count them! */
+ c = pattern;
+ while(ISDIGIT(*c)) {
+ c++;
+ ++pat->content.NumRange.padlength; /* padding length is set for all
+ instances of this pattern */
+ }
+ }
+
+ errno = 0;
+ min_n = strtoul(pattern, &endp, 10);
+ if(errno || (endp == pattern))
+ endp=NULL;
+ else {
+ if(*endp != '-')
+ endp = NULL;
+ else {
+ pattern = endp+1;
+ errno = 0;
+ max_n = strtoul(pattern, &endp, 10);
+ if(errno || (*endp == ':')) {
+ pattern = endp+1;
+ errno = 0;
+ step_n = strtoul(pattern, &endp, 10);
+ if(errno)
+ /* over/underflow situation */
+ endp = NULL;
+ }
+ else
+ step_n = 1;
+ if(endp && (*endp == ']')) {
+ pattern= endp+1;
+ }
+ else
+ endp = NULL;
+ }
+ }
+
+ *posp += (pattern - *patternp);
+
+ if(!endp || (min_n > max_n) || (step_n > (max_n - min_n)) ||
+ (step_n <= 0) )
+ /* the pattern is not well-formed */
+ return GLOBERROR("bad range", *posp, CURLE_URL_MALFORMAT);
+
+ /* typecasting to ints are fine here since we make sure above that we
+ are within 31 bits */
+ pat->content.NumRange.ptr_n = pat->content.NumRange.min_n = min_n;
+ pat->content.NumRange.max_n = max_n;
+ pat->content.NumRange.step = step_n;
+
+ if(multiply(amount, (pat->content.NumRange.max_n -
+ pat->content.NumRange.min_n) /
+ pat->content.NumRange.step + 1) )
+ return GLOBERROR("range overflow", *posp, CURLE_URL_MALFORMAT);
+ }
+ else
+ return GLOBERROR("bad range specification", *posp, CURLE_URL_MALFORMAT);
+
+ *patternp = pattern;
+ return CURLE_OK;
+}
+
+static bool peek_ipv6(const char *str, size_t *skip)
+{
+ /*
+ * Scan for a potential IPv6 literal.
+ * - Valid globs contain a hyphen and <= 1 colon.
+ * - IPv6 literals contain no hyphens and >= 2 colons.
+ */
+ size_t i = 0;
+ size_t colons = 0;
+ if(str[i++] != '[') {
+ return FALSE;
+ }
+ for(;;) {
+ const char c = str[i++];
+ if(ISALNUM(c) || c == '.' || c == '%') {
+ /* ok */
+ }
+ else if(c == ':') {
+ colons++;
+ }
+ else if(c == ']') {
+ *skip = i;
+ return colons >= 2 ? TRUE : FALSE;
+ }
+ else {
+ return FALSE;
+ }
+ }
+}
+
+static CURLcode 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;
+ int globindex = 0; /* count "actual" globs */
+
+ *amount = 1;
+
+ while(*pattern && !res) {
+ char *buf = glob->glob_buffer;
+ size_t sublen = 0;
+ while(*pattern && *pattern != '{') {
+ if(*pattern == '[') {
+ /* Skip over potential IPv6 literals. */
+ size_t skip;
+ if(peek_ipv6(pattern, &skip)) {
+ memcpy(buf, pattern, skip);
+ buf += skip;
+ pattern += skip;
+ sublen += skip;
+ continue;
+ }
+ break;
+ }
+ if(*pattern == '}' || *pattern == ']')
+ return GLOBERROR("unmatched close brace/bracket", pos,
+ CURLE_URL_MALFORMAT);
+
+ /* only allow \ to escape known "special letters" */
+ if(*pattern == '\\' &&
+ (*(pattern+1) == '{' || *(pattern+1) == '[' ||
+ *(pattern+1) == '}' || *(pattern+1) == ']') ) {
+
+ /* escape character, skip '\' */
+ ++pattern;
+ ++pos;
+ }
+ *buf++ = *pattern++; /* copy character to literal */
+ ++pos;
+ sublen++;
+ }
+ if(sublen) {
+ /* we got a literal string, add it as a single-item list */
+ *buf = '\0';
+ res = glob_fixed(glob, glob->glob_buffer, sublen);
+ }
+ else {
+ switch (*pattern) {
+ case '\0': /* done */
+ break;
+
+ case '{':
+ /* process set pattern */
+ pattern++;
+ pos++;
+ res = glob_set(glob, &pattern, &pos, amount, globindex++);
+ break;
+
+ case '[':
+ /* process range pattern */
+ pattern++;
+ pos++;
+ res = glob_range(glob, &pattern, &pos, amount, globindex++);
+ break;
+ }
+ }
+
+ if(++glob->size > GLOB_PATTERN_NUM)
+ return GLOBERROR("too many globs", pos, CURLE_URL_MALFORMAT);
+ }
+ return res;
+}
+
+CURLcode 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
+ * as the specified URL!
+ */
+ URLGlob *glob_expand;
+ unsigned long amount = 0;
+ char *glob_buffer;
+ CURLcode res;
+
+ *glob = NULL;
+
+ glob_buffer = malloc(strlen(url) + 1);
+ if(!glob_buffer)
+ return CURLE_OUT_OF_MEMORY;
+
+ glob_expand = calloc(1, sizeof(URLGlob));
+ if(!glob_expand) {
+ Curl_safefree(glob_buffer);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ glob_expand->urllen = strlen(url);
+ glob_expand->glob_buffer = glob_buffer;
+
+ res = glob_parse(glob_expand, url, 1, &amount);
+ if(!res)
+ *urlnum = amount;
+ else {
+ if(error && glob_expand->error) {
+ char text[128];
+ const char *t;
+ if(glob_expand->pos) {
+ snprintf(text, sizeof(text), "%s in column %zu", glob_expand->error,
+ glob_expand->pos);
+ t = text;
+ }
+ else
+ t = glob_expand->error;
+
+ /* send error description to the error-stream */
+ fprintf(error, "curl: (%d) [globbing] %s\n", res, t);
+ }
+ /* it failed, we cleanup */
+ glob_cleanup(glob_expand);
+ *urlnum = 1;
+ return res;
+ }
+
+ *glob = glob_expand;
+ return CURLE_OK;
+}
+
+void glob_cleanup(URLGlob* glob)
+{
+ size_t i;
+ int elem;
+
+ for(i = 0; 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;
+ elem >= 0;
+ --elem) {
+ Curl_safefree(glob->pattern[i].content.Set.elements[elem]);
+ }
+ Curl_safefree(glob->pattern[i].content.Set.elements);
+ }
+ }
+ Curl_safefree(glob->glob_buffer);
+ Curl_safefree(glob);
+}
+
+CURLcode glob_next_url(char **globbed, URLGlob *glob)
+{
+ URLPattern *pat;
+ size_t i;
+ size_t len;
+ size_t buflen = glob->urllen + 1;
+ char *buf = glob->glob_buffer;
+
+ *globbed = NULL;
+
+ if(!glob->beenhere)
+ glob->beenhere = 1;
+ 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++) {
+ carry = FALSE;
+ pat = &glob->pattern[glob->size - 1 - i];
+ switch (pat->type) {
+ case UPTSet:
+ if((pat->content.Set.elements) &&
+ (++pat->content.Set.ptr_s == pat->content.Set.size)) {
+ pat->content.Set.ptr_s = 0;
+ carry = TRUE;
+ }
+ break;
+ case UPTCharRange:
+ 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;
+ }
+ break;
+ case UPTNumRange:
+ pat->content.NumRange.ptr_n += pat->content.NumRange.step;
+ if(pat->content.NumRange.ptr_n > pat->content.NumRange.max_n) {
+ pat->content.NumRange.ptr_n = pat->content.NumRange.min_n;
+ carry = TRUE;
+ }
+ break;
+ default:
+ printf("internal error: invalid pattern type (%d)\n", (int)pat->type);
+ return CURLE_FAILED_INIT;
+ }
+ }
+ if(carry) { /* first pattern ptr has run into overflow, done! */
+ /* TODO: verify if this should actally return CURLE_OK. */
+ return CURLE_OK; /* CURLE_OK to match previous behavior */
+ }
+ }
+
+ for(i = 0; i < glob->size; ++i) {
+ pat = &glob->pattern[i];
+ switch(pat->type) {
+ case UPTSet:
+ if(pat->content.Set.elements) {
+ len = strlen(pat->content.Set.elements[pat->content.Set.ptr_s]);
+ snprintf(buf, buflen, "%s",
+ pat->content.Set.elements[pat->content.Set.ptr_s]);
+ buf += len;
+ buflen -= len;
+ }
+ break;
+ case UPTCharRange:
+ *buf++ = pat->content.CharRange.ptr_c;
+ break;
+ case UPTNumRange:
+ len = snprintf(buf, buflen, "%0*ld",
+ pat->content.NumRange.padlength,
+ pat->content.NumRange.ptr_n);
+ buf += len;
+ buflen -= len;
+ break;
+ default:
+ printf("internal error: invalid pattern type (%d)\n", (int)pat->type);
+ return CURLE_FAILED_INIT;
+ }
+ }
+ *buf = '\0';
+
+ *globbed = strdup(glob->glob_buffer);
+ if(!*globbed)
+ return CURLE_OUT_OF_MEMORY;
+
+ return CURLE_OK;
+}
+
+CURLcode glob_match_url(char **result, char *filename, URLGlob *glob)
+{
+ char *target;
+ size_t allocsize;
+ char numbuf[18];
+ char *appendthis = NULL;
+ size_t appendlen = 0;
+ size_t stringlen = 0;
+
+ *result = NULL;
+
+ /* We cannot use the glob_buffer for storage here since the filename may
+ * be longer than the URL we use. We allocate a good start size, then
+ * we need to realloc in case of need.
+ */
+ allocsize = strlen(filename) + 1; /* make it at least one byte to store the
+ trailing zero */
+ target = malloc(allocsize);
+ if(!target)
+ return CURLE_OUT_OF_MEMORY;
+
+ while(*filename) {
+ if(*filename == '#' && ISDIGIT(filename[1])) {
+ unsigned long i;
+ char *ptr = filename;
+ unsigned long num = strtoul(&filename[1], &filename, 10);
+ URLPattern *pat =NULL;
+
+ if(num < glob->size) {
+ num--; /* make it zero based */
+ /* find the correct glob entry */
+ for(i=0; i<glob->size; i++) {
+ if(glob->pattern[i].globindex == (int)num) {
+ pat = &glob->pattern[i];
+ break;
+ }
+ }
+ }
+
+ if(pat) {
+ switch (pat->type) {
+ case UPTSet:
+ if(pat->content.Set.elements) {
+ appendthis = pat->content.Set.elements[pat->content.Set.ptr_s];
+ appendlen =
+ strlen(pat->content.Set.elements[pat->content.Set.ptr_s]);
+ }
+ break;
+ case UPTCharRange:
+ numbuf[0] = pat->content.CharRange.ptr_c;
+ numbuf[1] = 0;
+ appendthis = numbuf;
+ appendlen = 1;
+ break;
+ case UPTNumRange:
+ snprintf(numbuf, sizeof(numbuf), "%0*d",
+ pat->content.NumRange.padlength,
+ pat->content.NumRange.ptr_n);
+ appendthis = numbuf;
+ appendlen = strlen(numbuf);
+ break;
+ default:
+ fprintf(stderr, "internal error: invalid pattern type (%d)\n",
+ (int)pat->type);
+ Curl_safefree(target);
+ return CURLE_FAILED_INIT;
+ }
+ }
+ else {
+ /* #[num] out of range, use the #[num] in the output */
+ filename = ptr;
+ appendthis = filename++;
+ appendlen = 1;
+ }
+ }
+ else {
+ appendthis = filename++;
+ appendlen = 1;
+ }
+ if(appendlen + stringlen >= allocsize) {
+ char *newstr;
+ /* we append a single byte to allow for the trailing byte to be appended
+ at the end of this function outside the while() loop */
+ allocsize = (appendlen + stringlen) * 2;
+ newstr = realloc(target, allocsize + 1);
+ if(!newstr) {
+ Curl_safefree(target);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ target = newstr;
+ }
+ memcpy(&target[stringlen], appendthis, appendlen);
+ stringlen += appendlen;
+ }
+ target[stringlen]= '\0';
+ *result = target;
+ return CURLE_OK;
+}
diff --git a/src/tool_urlglob.h b/src/tool_urlglob.h
new file mode 100644
index 00000000..62c1abdd
--- /dev/null
+++ b/src/tool_urlglob.h
@@ -0,0 +1,77 @@
+#ifndef HEADER_CURL_TOOL_URLGLOB_H
+#define HEADER_CURL_TOOL_URLGLOB_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+typedef enum {
+ UPTSet = 1,
+ UPTCharRange,
+ UPTNumRange
+} URLPatternType;
+
+typedef struct {
+ URLPatternType type;
+ int globindex; /* the number of this particular glob or -1 if not used
+ within {} or [] */
+ union {
+ struct {
+ char **elements;
+ int size;
+ int ptr_s;
+ } Set;
+ struct {
+ char min_c;
+ char max_c;
+ char ptr_c;
+ int step;
+ } CharRange;
+ struct {
+ unsigned long min_n;
+ unsigned long max_n;
+ int padlength;
+ unsigned long ptr_n;
+ unsigned long step;
+ } NumRange;
+ } content;
+} URLPattern;
+
+/* the total number of globs supported */
+#define GLOB_PATTERN_NUM 100
+
+typedef struct {
+ URLPattern pattern[GLOB_PATTERN_NUM];
+ size_t size;
+ size_t urllen;
+ char *glob_buffer;
+ char beenhere;
+ const char *error; /* error message */
+ 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 *);
+void glob_cleanup(URLGlob* glob);
+
+#endif /* HEADER_CURL_TOOL_URLGLOB_H */
+
diff --git a/src/tool_util.c b/src/tool_util.c
new file mode 100644
index 00000000..6c26414d
--- /dev/null
+++ b/src/tool_util.c
@@ -0,0 +1,147 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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_util.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#if defined(WIN32) && !defined(MSDOS)
+
+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_usec = (milliseconds % 1000) * 1000;
+ return now;
+}
+
+#elif defined(HAVE_CLOCK_GETTIME_MONOTONIC)
+
+struct timeval tool_tvnow(void)
+{
+ /*
+ ** clock_gettime() is granted to be increased monotonically when the
+ ** monotonic clock is queried. Time starting point is unspecified, it
+ ** could be the system start-up time, the Epoch, or something else,
+ ** in any case the time starting point does not change once that the
+ ** system has started up.
+ */
+ struct timeval now;
+ struct timespec tsnow;
+ if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) {
+ now.tv_sec = tsnow.tv_sec;
+ now.tv_usec = tsnow.tv_nsec / 1000;
+ }
+ /*
+ ** Even when the configure process has truly detected monotonic clock
+ ** availability, it might happen that it is not actually available at
+ ** run-time. When this occurs simply fallback to other time source.
+ */
+#ifdef HAVE_GETTIMEOFDAY
+ else
+ (void)gettimeofday(&now, NULL);
+#else
+ else {
+ now.tv_sec = (long)time(NULL);
+ now.tv_usec = 0;
+ }
+#endif
+ return now;
+}
+
+#elif defined(HAVE_GETTIMEOFDAY)
+
+struct timeval tool_tvnow(void)
+{
+ /*
+ ** gettimeofday() is not granted to be increased monotonically, due to
+ ** clock drifting and external source time synchronization it can jump
+ ** forward or backward in time.
+ */
+ struct timeval now;
+ (void)gettimeofday(&now, NULL);
+ return now;
+}
+
+#else
+
+struct timeval tool_tvnow(void)
+{
+ /*
+ ** time() returns the value of time in seconds since the Epoch.
+ */
+ struct timeval now;
+ now.tv_sec = (long)time(NULL);
+ now.tv_usec = 0;
+ return now;
+}
+
+#endif
+
+/*
+ * Make sure that the first argument is the more recent time, as otherwise
+ * we'll get a weird negative time-diff back...
+ *
+ * Returns: the time difference in number of milliseconds.
+ */
+long tool_tvdiff(struct timeval newer, struct timeval older)
+{
+ return (newer.tv_sec-older.tv_sec)*1000+
+ (newer.tv_usec-older.tv_usec)/1000;
+}
+
+/*
+ * Same as tool_tvdiff but with full usec resolution.
+ *
+ * Returns: the time difference in seconds with subsecond resolution.
+ */
+double tool_tvdiff_secs(struct timeval newer, struct timeval older)
+{
+ if(newer.tv_sec != older.tv_sec)
+ return (double)(newer.tv_sec-older.tv_sec)+
+ (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+ else
+ return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+}
+
+/* return the number of seconds in the given input timeval struct */
+long tool_tvlong(struct timeval t1)
+{
+ return t1.tv_sec;
+}
+
diff --git a/src/tool_util.h b/src/tool_util.h
new file mode 100644
index 00000000..d8bb0366
--- /dev/null
+++ b/src/tool_util.h
@@ -0,0 +1,56 @@
+#ifndef HEADER_CURL_TOOL_UTIL_H
+#define HEADER_CURL_TOOL_UTIL_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+struct timeval tool_tvnow(void);
+
+/*
+ * Make sure that the first argument (t1) is the more recent time and t2 is
+ * the older time, as otherwise you get a weird negative time-diff back...
+ *
+ * Returns: the time difference in number of milliseconds.
+ */
+long tool_tvdiff(struct timeval t1, struct timeval t2);
+
+/*
+ * Same as tool_tvdiff but with full usec resolution.
+ *
+ * Returns: the time difference in seconds with subsecond resolution.
+ */
+double tool_tvdiff_secs(struct timeval t1, struct timeval t2);
+
+long tool_tvlong(struct timeval t1);
+
+#undef tvnow
+#undef tvdiff
+#undef tvdiff_secs
+#undef tvlong
+
+#define tvnow() tool_tvnow()
+#define tvdiff(a,b) tool_tvdiff((a), (b))
+#define tvdiff_secs(a,b) tool_tvdiff_secs((a), (b))
+#define tvlong(a) tool_tvlong((a))
+
+#endif /* HEADER_CURL_TOOL_UTIL_H */
+
diff --git a/src/tool_version.h b/src/tool_version.h
new file mode 100644
index 00000000..569526bf
--- /dev/null
+++ b/src/tool_version.h
@@ -0,0 +1,34 @@
+#ifndef HEADER_CURL_TOOL_VERSION_H
+#define HEADER_CURL_TOOL_VERSION_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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/curlver.h>
+
+#define CURL_NAME "curl"
+#define CURL_COPYRIGHT LIBCURL_COPYRIGHT
+#define CURL_VERSION LIBCURL_VERSION
+#define CURL_VERSION_MAJOR LIBCURL_VERSION_MAJOR
+#define CURL_VERSION_MINOR LIBCURL_VERSION_MINOR
+#define CURL_VERSION_PATCH LIBCURL_VERSION_PATCH
+#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "
+
+#endif /* HEADER_CURL_TOOL_VERSION_H */
diff --git a/src/tool_vms.c b/src/tool_vms.c
new file mode 100644
index 00000000..4a6a6f58
--- /dev/null
+++ b/src/tool_vms.c
@@ -0,0 +1,219 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef __VMS
+
+#if defined(__DECC) && !defined(__VAX) && \
+ defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
+#include <unixlib.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+#include "curlx.h"
+
+#include "curlmsg_vms.h"
+#include "tool_vms.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void decc$__posix_exit(int __status);
+void decc$exit(int __status);
+
+static int vms_shell = -1;
+
+/* VMS has a DCL shell and and also has Unix shells ported to it.
+ * When curl is running under a Unix shell, we want it to be as much
+ * like Unix as possible.
+ */
+int is_vms_shell(void)
+{
+ char *shell;
+
+ /* Have we checked the shell yet? */
+ if(vms_shell >= 0)
+ return vms_shell;
+
+ shell = getenv("SHELL");
+
+ /* No shell, means DCL */
+ if(shell == NULL) {
+ vms_shell = 1;
+ return 1;
+ }
+
+ /* Have to make sure some one did not set shell to DCL */
+ if(strcmp(shell, "DCL") == 0) {
+ vms_shell = 1;
+ return 1;
+ }
+
+ vms_shell = 0;
+ return 0;
+}
+
+/*
+ * VMS has two exit() routines. When running under a Unix style shell, then
+ * Unix style and the __posix_exit() routine is used.
+ *
+ * When running under the DCL shell, then the VMS encoded codes and decc$exit()
+ * is used.
+ *
+ * We can not use exit() or return a code from main() because the actual
+ * routine called depends on both the compiler version, compile options, and
+ * feature macro settings, and one of the exit routines is hidden at compile
+ * time.
+ *
+ * Since we want Curl to work properly under the VMS DCL shell and Unix
+ * shells under VMS, this routine should compile correctly regardless of
+ * the settings.
+ */
+
+void vms_special_exit(int code, int vms_show)
+{
+ int vms_code;
+
+ /* The Posix exit mode is only available after VMS 7.0 */
+#if __CRTL_VER >= 70000000
+ if(is_vms_shell() == 0) {
+ decc$__posix_exit(code);
+ }
+#endif
+
+ if(code > CURL_LAST) { /* If CURL_LAST exceeded then */
+ vms_code = CURL_LAST; /* curlmsg.h is out of sync. */
+ }
+ else {
+ vms_code = vms_cond[code] | vms_show;
+ }
+ decc$exit(vms_code);
+}
+
+#if defined(__DECC) && !defined(__VAX) && \
+ defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
+
+/*
+ * 2004-09-19 SMS.
+ *
+ * decc_init()
+ *
+ * On non-VAX systems, use LIB$INITIALIZE to set a collection of C
+ * RTL features without using the DECC$* logical name method, nor
+ * requiring the user to define the corresponding logical names.
+ */
+
+/* Structure to hold a DECC$* feature name and its desired value. */
+typedef struct {
+ char *name;
+ int value;
+} decc_feat_t;
+
+/* Array of DECC$* feature names and their desired values. */
+static decc_feat_t decc_feat_array[] = {
+ /* Preserve command-line case with SET PROCESS/PARSE_STYLE=EXTENDED */
+ { "DECC$ARGV_PARSE_STYLE", 1 },
+ /* Preserve case for file names on ODS5 disks. */
+ { "DECC$EFS_CASE_PRESERVE", 1 },
+ /* Enable multiple dots (and most characters) in ODS5 file names,
+ while preserving VMS-ness of ";version". */
+ { "DECC$EFS_CHARSET", 1 },
+ /* List terminator. */
+ { (char *)NULL, 0 }
+};
+
+/* Flag to sense if decc_init() was called. */
+static int decc_init_done = -1;
+
+/* LIB$INITIALIZE initialization function. */
+static void decc_init(void)
+{
+ int feat_index;
+ int feat_value;
+ int feat_value_max;
+ int feat_value_min;
+ int i;
+ int sts;
+
+ /* Set the global flag to indicate that LIB$INITIALIZE worked. */
+ decc_init_done = 1;
+
+ /* Loop through all items in the decc_feat_array[]. */
+ for(i = 0; decc_feat_array[i].name != NULL; i++) {
+
+ /* Get the feature index. */
+ feat_index = decc$feature_get_index( decc_feat_array[i].name);
+
+ if(feat_index >= 0) {
+ /* Valid item. Collect its properties. */
+ feat_value = decc$feature_get_value( feat_index, 1);
+ feat_value_min = decc$feature_get_value( feat_index, 2);
+ feat_value_max = decc$feature_get_value( feat_index, 3);
+
+ if((decc_feat_array[i].value >= feat_value_min) &&
+ (decc_feat_array[i].value <= feat_value_max)) {
+ /* Valid value. Set it if necessary. */
+ if(feat_value != decc_feat_array[i].value) {
+ sts = decc$feature_set_value( feat_index, 1,
+ decc_feat_array[i].value);
+ }
+ }
+ else {
+ /* Invalid DECC feature value. */
+ printf(" INVALID DECC FEATURE VALUE, %d: %d <= %s <= %d.\n",
+ feat_value,
+ feat_value_min, decc_feat_array[i].name, feat_value_max);
+ }
+ }
+ else {
+ /* Invalid DECC feature name. */
+ printf(" UNKNOWN DECC FEATURE: %s.\n", decc_feat_array[i].name);
+ }
+
+ }
+}
+
+/* Get "decc_init()" into a valid, loaded LIB$INITIALIZE PSECT. */
+
+#pragma nostandard
+
+/* Establish the LIB$INITIALIZE PSECTs, with proper alignment and
+ other attributes. Note that "nopic" is significant only on VAX. */
+#pragma extern_model save
+#pragma extern_model strict_refdef "LIB$INITIALIZ" 2, nopic, nowrt
+const int spare[8] = {0};
+#pragma extern_model strict_refdef "LIB$INITIALIZE" 2, nopic, nowrt
+void (*const x_decc_init)() = decc_init;
+#pragma extern_model restore
+
+/* Fake reference to ensure loading the LIB$INITIALIZE PSECT. */
+#pragma extern_model save
+int LIB$INITIALIZE(void);
+#pragma extern_model strict_refdef
+int dmy_lib$initialize = (int) LIB$INITIALIZE;
+#pragma extern_model restore
+
+#pragma standard
+
+#endif /* __DECC && !__VAX && __CRTL_VER && __CRTL_VER >= 70301000 */
+
+#endif /* __VMS */
+
diff --git a/src/tool_vms.h b/src/tool_vms.h
new file mode 100644
index 00000000..1afd75ec
--- /dev/null
+++ b/src/tool_vms.h
@@ -0,0 +1,47 @@
+#ifndef HEADER_CURL_TOOL_VMS_H
+#define HEADER_CURL_TOOL_VMS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef __VMS
+
+/*
+ * Forward-declaration of global variable vms_show defined
+ * in tool_main.c, used in main() as parameter for function
+ * vms_special_exit() to allow proper curl tool exiting.
+ */
+extern int vms_show;
+
+int is_vms_shell(void);
+void vms_special_exit(int code, int vms_show);
+
+#undef exit
+#define exit(__code) vms_special_exit((__code), (0))
+
+#define VMS_STS(c,f,e,s) (((c&0xF)<<28)|((f&0xFFF)<<16)|((e&0x1FFF)<3)|(s&7))
+#define VMSSTS_HIDE VMS_STS(1,0,0,0)
+
+#endif /* __VMS */
+
+#endif /* HEADER_CURL_TOOL_VMS_H */
+
diff --git a/src/tool_writeenv.c b/src/tool_writeenv.c
new file mode 100644
index 00000000..b28f35a8
--- /dev/null
+++ b/src/tool_writeenv.c
@@ -0,0 +1,113 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef USE_ENVIRONMENT
+
+#ifdef __riscos__
+# include <kernel.h>
+#endif
+
+#include <curl/mprintf.h>
+#include "tool_writeenv.h"
+#include "memdebug.h" /* keep this as LAST include */
+
+static const struct
+{
+ const char * name;
+ CURLINFO id;
+ enum {
+ writeenv_NONE,
+ writeenv_DOUBLE,
+ writeenv_LONG,
+ writeenv_STRING
+ } type;
+} variables[14] =
+{
+ {"curl_url_effective", CURLINFO_EFFECTIVE_URL, writeenv_STRING},
+ {"curl_http_code", CURLINFO_RESPONSE_CODE, writeenv_LONG},
+ {"curl_time_total", CURLINFO_TOTAL_TIME, writeenv_DOUBLE},
+ {"curl_time_namelookup", CURLINFO_NAMELOOKUP_TIME, writeenv_DOUBLE},
+ {"curl_time_connect", CURLINFO_CONNECT_TIME, writeenv_DOUBLE},
+ {"curl_time_pretransfer", CURLINFO_PRETRANSFER_TIME, writeenv_DOUBLE},
+ {"curl_time_starttransfer", CURLINFO_STARTTRANSFER_TIME, writeenv_DOUBLE},
+ {"curl_size_header", CURLINFO_HEADER_SIZE, writeenv_LONG},
+ {"curl_size_request", CURLINFO_REQUEST_SIZE, writeenv_LONG},
+ {"curl_size_download", CURLINFO_SIZE_DOWNLOAD, writeenv_DOUBLE},
+ {"curl_size_upload", CURLINFO_SIZE_UPLOAD, writeenv_DOUBLE},
+ {"curl_speed_download", CURLINFO_SPEED_DOWNLOAD, writeenv_DOUBLE},
+ {"curl_speed_upload", CURLINFO_SPEED_UPLOAD, writeenv_DOUBLE},
+ {NULL, 0, writeenv_NONE}
+ };
+
+static void internalSetEnv(const char * name, char * value)
+{
+ /* Add your OS-specific code here. */
+#ifdef __riscos__
+ _kernel_setenv(name, value);
+#elif defined (CURLDEBUG)
+ curl_memlog("ENV %s = %s\n", name, value);
+#endif
+ return;
+}
+
+void ourWriteEnv(CURL *curl)
+{
+ unsigned int i;
+ char *string, numtext[10];
+ long longinfo;
+ double doubleinfo;
+
+ for(i=0; variables[i].name; i++) {
+ switch (variables[i].type) {
+ case writeenv_STRING:
+ if(curl_easy_getinfo(curl, variables[i].id, &string) == CURLE_OK)
+ internalSetEnv(variables[i].name, string);
+ else
+ internalSetEnv(variables[i].name, NULL);
+ break;
+
+ case writeenv_LONG:
+ if(curl_easy_getinfo(curl, variables[i].id, &longinfo) == CURLE_OK) {
+ curl_msprintf(numtext, "%5ld", longinfo);
+ internalSetEnv(variables[i].name, numtext);
+ }
+ else
+ internalSetEnv(variables[i].name, NULL);
+ break;
+ case writeenv_DOUBLE:
+ if(curl_easy_getinfo(curl, variables[i].id, &doubleinfo) == CURLE_OK) {
+ curl_msprintf(numtext, "%6.2f", doubleinfo);
+ internalSetEnv(variables[i].name, numtext);
+ }
+ else
+ internalSetEnv(variables[i].name, NULL);
+ break;
+ default:
+ break;
+ }
+ }
+
+ return;
+}
+
+#endif
diff --git a/src/tool_writeenv.h b/src/tool_writeenv.h
new file mode 100644
index 00000000..c0a952fe
--- /dev/null
+++ b/src/tool_writeenv.h
@@ -0,0 +1,35 @@
+#ifndef HEADER_CURL_TOOL_WRITEENV_H
+#define HEADER_CURL_TOOL_WRITEENV_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef USE_ENVIRONMENT
+
+void ourWriteEnv(CURL *curl);
+
+#else
+# define ourWriteEnv(x) Curl_nop_stmt
+#endif
+
+#endif /* HEADER_CURL_TOOL_WRITEENV_H */
+
diff --git a/src/tool_writeout.c b/src/tool_writeout.c
new file mode 100644
index 00000000..63db90c9
--- /dev/null
+++ b/src/tool_writeout.c
@@ -0,0 +1,326 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+#include "tool_cfgable.h"
+#include "tool_writeout.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+typedef enum {
+ VAR_NONE, /* must be the first */
+ VAR_TOTAL_TIME,
+ VAR_NAMELOOKUP_TIME,
+ VAR_CONNECT_TIME,
+ VAR_APPCONNECT_TIME,
+ VAR_PRETRANSFER_TIME,
+ VAR_STARTTRANSFER_TIME,
+ VAR_SIZE_DOWNLOAD,
+ VAR_SIZE_UPLOAD,
+ VAR_SPEED_DOWNLOAD,
+ VAR_SPEED_UPLOAD,
+ VAR_HTTP_CODE,
+ VAR_HTTP_CODE_PROXY,
+ VAR_HEADER_SIZE,
+ VAR_REQUEST_SIZE,
+ VAR_EFFECTIVE_URL,
+ VAR_CONTENT_TYPE,
+ VAR_NUM_CONNECTS,
+ VAR_REDIRECT_TIME,
+ VAR_REDIRECT_COUNT,
+ VAR_FTP_ENTRY_PATH,
+ VAR_REDIRECT_URL,
+ VAR_SSL_VERIFY_RESULT,
+ VAR_EFFECTIVE_FILENAME,
+ VAR_PRIMARY_IP,
+ VAR_PRIMARY_PORT,
+ VAR_LOCAL_IP,
+ VAR_LOCAL_PORT,
+ VAR_NUM_OF_VARS /* must be the last */
+} replaceid;
+
+struct variable {
+ const char *name;
+ replaceid id;
+};
+
+
+static const struct variable replacements[]={
+ {"url_effective", VAR_EFFECTIVE_URL},
+ {"http_code", VAR_HTTP_CODE},
+ {"response_code", VAR_HTTP_CODE},
+ {"http_connect", VAR_HTTP_CODE_PROXY},
+ {"time_total", VAR_TOTAL_TIME},
+ {"time_namelookup", VAR_NAMELOOKUP_TIME},
+ {"time_connect", VAR_CONNECT_TIME},
+ {"time_appconnect", VAR_APPCONNECT_TIME},
+ {"time_pretransfer", VAR_PRETRANSFER_TIME},
+ {"time_starttransfer", VAR_STARTTRANSFER_TIME},
+ {"size_header", VAR_HEADER_SIZE},
+ {"size_request", VAR_REQUEST_SIZE},
+ {"size_download", VAR_SIZE_DOWNLOAD},
+ {"size_upload", VAR_SIZE_UPLOAD},
+ {"speed_download", VAR_SPEED_DOWNLOAD},
+ {"speed_upload", VAR_SPEED_UPLOAD},
+ {"content_type", VAR_CONTENT_TYPE},
+ {"num_connects", VAR_NUM_CONNECTS},
+ {"time_redirect", VAR_REDIRECT_TIME},
+ {"num_redirects", VAR_REDIRECT_COUNT},
+ {"ftp_entry_path", VAR_FTP_ENTRY_PATH},
+ {"redirect_url", VAR_REDIRECT_URL},
+ {"ssl_verify_result", VAR_SSL_VERIFY_RESULT},
+ {"filename_effective", VAR_EFFECTIVE_FILENAME},
+ {"remote_ip", VAR_PRIMARY_IP},
+ {"remote_port", VAR_PRIMARY_PORT},
+ {"local_ip", VAR_LOCAL_IP},
+ {"local_port", VAR_LOCAL_PORT},
+ {NULL, VAR_NONE}
+};
+
+void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo)
+{
+ FILE *stream = stdout;
+ const char *ptr = writeinfo;
+ char *stringp = NULL;
+ long longinfo;
+ double doubleinfo;
+
+ while(ptr && *ptr) {
+ if('%' == *ptr) {
+ if('%' == ptr[1]) {
+ /* an escaped %-letter */
+ fputc('%', stream);
+ ptr += 2;
+ }
+ else {
+ /* this is meant as a variable to output */
+ char *end;
+ char keepit;
+ int i;
+ if(('{' == ptr[1]) && ((end = strchr(ptr, '}')) != NULL)) {
+ bool match = FALSE;
+ ptr += 2; /* pass the % and the { */
+ keepit = *end;
+ *end = 0; /* zero terminate */
+ for(i = 0; replacements[i].name; i++) {
+ if(curl_strequal(ptr, replacements[i].name)) {
+ match = TRUE;
+ switch(replacements[i].id) {
+ case VAR_EFFECTIVE_URL:
+ if((CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &stringp))
+ && stringp)
+ fputs(stringp, stream);
+ break;
+ case VAR_HTTP_CODE:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &longinfo))
+ fprintf(stream, "%03ld", longinfo);
+ break;
+ case VAR_HTTP_CODE_PROXY:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE,
+ &longinfo))
+ fprintf(stream, "%03ld", longinfo);
+ break;
+ case VAR_HEADER_SIZE:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &longinfo))
+ fprintf(stream, "%ld", longinfo);
+ break;
+ case VAR_REQUEST_SIZE:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &longinfo))
+ fprintf(stream, "%ld", longinfo);
+ break;
+ case VAR_NUM_CONNECTS:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &longinfo))
+ fprintf(stream, "%ld", longinfo);
+ break;
+ case VAR_REDIRECT_COUNT:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &longinfo))
+ fprintf(stream, "%ld", longinfo);
+ break;
+ case VAR_REDIRECT_TIME:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME,
+ &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
+ case VAR_TOTAL_TIME:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
+ case VAR_NAMELOOKUP_TIME:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME,
+ &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
+ case VAR_CONNECT_TIME:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
+ case VAR_APPCONNECT_TIME:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME,
+ &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
+ case VAR_PRETRANSFER_TIME:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME,
+ &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
+ case VAR_STARTTRANSFER_TIME:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
+ &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
+ case VAR_SIZE_UPLOAD:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &doubleinfo))
+ fprintf(stream, "%.0f", doubleinfo);
+ break;
+ case VAR_SIZE_DOWNLOAD:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD,
+ &doubleinfo))
+ fprintf(stream, "%.0f", doubleinfo);
+ break;
+ case VAR_SPEED_DOWNLOAD:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD,
+ &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
+ case VAR_SPEED_UPLOAD:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
+ case VAR_CONTENT_TYPE:
+ if((CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &stringp))
+ && stringp)
+ fputs(stringp, stream);
+ break;
+ case VAR_FTP_ENTRY_PATH:
+ if((CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &stringp))
+ && stringp)
+ fputs(stringp, stream);
+ break;
+ case VAR_REDIRECT_URL:
+ if((CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &stringp))
+ && stringp)
+ fputs(stringp, stream);
+ break;
+ case VAR_SSL_VERIFY_RESULT:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT,
+ &longinfo))
+ fprintf(stream, "%ld", longinfo);
+ break;
+ case VAR_EFFECTIVE_FILENAME:
+ if(outs->filename)
+ fprintf(stream, "%s", outs->filename);
+ break;
+ case VAR_PRIMARY_IP:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP,
+ &stringp))
+ fprintf(stream, "%s", stringp);
+ break;
+ case VAR_PRIMARY_PORT:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT,
+ &longinfo))
+ fprintf(stream, "%ld", longinfo);
+ break;
+ case VAR_LOCAL_IP:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_LOCAL_IP,
+ &stringp))
+ fprintf(stream, "%s", stringp);
+ break;
+ case VAR_LOCAL_PORT:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT,
+ &longinfo))
+ fprintf(stream, "%ld", longinfo);
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ }
+ if(!match) {
+ fprintf(stderr, "curl: unknown --write-out variable: '%s'\n", ptr);
+ }
+ ptr = end + 1; /* pass the end */
+ *end = keepit;
+ }
+ else {
+ /* illegal syntax, then just output the characters that are used */
+ fputc('%', stream);
+ fputc(ptr[1], stream);
+ ptr += 2;
+ }
+ }
+ }
+ else if('\\' == *ptr) {
+ switch(ptr[1]) {
+ case 'r':
+ fputc('\r', stream);
+ break;
+ case 'n':
+ fputc('\n', stream);
+ break;
+ case 't':
+ fputc('\t', stream);
+ break;
+ default:
+ /* unknown, just output this */
+ fputc(*ptr, stream);
+ fputc(ptr[1], stream);
+ break;
+ }
+ ptr += 2;
+ }
+ else {
+ fputc(*ptr, stream);
+ ptr++;
+ }
+ }
+
+}
diff --git a/src/tool_writeout.h b/src/tool_writeout.h
new file mode 100644
index 00000000..4dd3a75a
--- /dev/null
+++ b/src/tool_writeout.h
@@ -0,0 +1,28 @@
+#ifndef HEADER_CURL_TOOL_WRITEOUT_H
+#define HEADER_CURL_TOOL_WRITEOUT_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo);
+
+#endif /* HEADER_CURL_TOOL_WRITEOUT_H */
diff --git a/src/tool_xattr.c b/src/tool_xattr.c
new file mode 100644
index 00000000..da0cad67
--- /dev/null
+++ b/src/tool_xattr.c
@@ -0,0 +1,90 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef HAVE_FSETXATTR
+# include <sys/xattr.h> /* header from libc, not from libattr */
+# define USE_XATTR
+#elif defined(__FreeBSD_version) && (__FreeBSD_version > 500000)
+# include <sys/types.h>
+# include <sys/extattr.h>
+# define USE_XATTR
+#endif
+
+#include "tool_xattr.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef USE_XATTR
+
+/* mapping table of curl metadata to extended attribute names */
+static const struct xattr_mapping {
+ const char *attr; /* name of the xattr */
+ CURLINFO info;
+} mappings[] = {
+ /* mappings proposed by
+ * http://freedesktop.org/wiki/CommonExtendedAttributes
+ */
+ { "user.xdg.origin.url", CURLINFO_EFFECTIVE_URL },
+ { "user.mime_type", CURLINFO_CONTENT_TYPE },
+ { NULL, CURLINFO_NONE } /* last element, abort loop here */
+};
+
+/* store metadata from the curl request alongside the downloaded
+ * file using extended attributes
+ */
+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) {
+#ifdef HAVE_FSETXATTR_6
+ err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0, 0);
+#elif defined(HAVE_FSETXATTR_5)
+ err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0);
+#elif defined(__FreeBSD_version)
+ err = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, mappings[i].attr, value,
+ strlen(value));
+ /* FreeBSD's extattr_set_fd returns the length of the extended attribute
+ */
+ err = err < 0 ? err : 0;
+#endif
+ }
+ i++;
+ }
+
+ return err;
+}
+#else
+int fwrite_xattr(CURL *curl, int fd)
+{
+ (void)curl;
+ (void)fd;
+
+ return 0;
+}
+#endif
diff --git a/src/tool_xattr.h b/src/tool_xattr.h
new file mode 100644
index 00000000..3f8f585e
--- /dev/null
+++ b/src/tool_xattr.h
@@ -0,0 +1,28 @@
+#ifndef HEADER_CURL_TOOL_XATTR_H
+#define HEADER_CURL_TOOL_XATTR_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+int fwrite_xattr(CURL *curl, int fd);
+
+#endif /* HEADER_CURL_TOOL_XATTR_H */
diff --git a/src/urlglob.c b/src/urlglob.c
deleted file mode 100644
index 590c37ae..00000000
--- a/src/urlglob.c
+++ /dev/null
@@ -1,549 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-/* client-local setup.h */
-#include "setup.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <curl/curl.h>
-
-#define _MPRINTF_REPLACE /* we want curl-functions instead of native ones */
-#include <curl/mprintf.h>
-
-#include "urlglob.h"
-#include "os-specific.h"
-
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#include "memdebug.h"
-#endif
-
-typedef enum {
- GLOB_OK,
- GLOB_ERROR
-} GlobCode;
-
-/*
- * glob_word()
- *
- * Input a full globbed string, set the forth argument to the amount of
- * strings we get out of this. Return GlobCode.
- */
-static GlobCode glob_word(URLGlob *, /* object anchor */
- char *, /* globbed string */
- size_t, /* position */
- int *); /* returned number of strings */
-
-static GlobCode glob_set(URLGlob *glob, char *pattern,
- size_t pos, int *amount)
-{
- /* processes a set expression with the point behind the opening '{'
- ','-separated elements are collected until the next closing '}'
- */
- bool done = FALSE;
- char* buf = glob->glob_buffer;
- URLPattern *pat;
-
- pat = (URLPattern*)&glob->pattern[glob->size / 2];
- /* patterns 0,1,2,... correspond to size=1,3,5,... */
- pat->type = UPTSet;
- pat->content.Set.size = 0;
- pat->content.Set.ptr_s = 0;
- /* FIXME: Here's a nasty zero size malloc */
- pat->content.Set.elements = (char**)malloc(0);
- ++glob->size;
-
- while (!done) {
- switch (*pattern) {
- case '\0': /* URL ended while set was still open */
- snprintf(glob->errormsg, sizeof(glob->errormsg),
- "unmatched brace at pos %zu\n", pos);
- return GLOB_ERROR;
-
- case '{':
- case '[': /* no nested expressions at this time */
- snprintf(glob->errormsg, sizeof(glob->errormsg),
- "nested braces not supported at pos %zu\n", pos);
- return GLOB_ERROR;
-
- case ',':
- case '}': /* set element completed */
- *buf = '\0';
- pat->content.Set.elements =
- realloc(pat->content.Set.elements,
- (pat->content.Set.size + 1) * sizeof(char*));
- if (!pat->content.Set.elements) {
- snprintf(glob->errormsg, sizeof(glob->errormsg), "out of memory");
- return GLOB_ERROR;
- }
- pat->content.Set.elements[pat->content.Set.size] =
- strdup(glob->glob_buffer);
- ++pat->content.Set.size;
-
- if (*pattern == '}') {
- /* entire set pattern completed */
- int wordamount;
-
- /* always check for a literal (may be "") between patterns */
- if(GLOB_ERROR == glob_word(glob, ++pattern, ++pos, &wordamount))
- return GLOB_ERROR;
- *amount = pat->content.Set.size * wordamount;
-
- done = TRUE;
- continue;
- }
-
- buf = glob->glob_buffer;
- ++pattern;
- ++pos;
- break;
-
- case ']': /* illegal closing bracket */
- snprintf(glob->errormsg, sizeof(glob->errormsg),
- "illegal pattern at pos %zu\n", pos);
- return GLOB_ERROR;
-
- case '\\': /* escaped character, skip '\' */
- if(pattern[1]) {
- ++pattern;
- ++pos;
- }
- /* intentional fallthrough */
- default:
- *buf++ = *pattern++; /* copy character to set element */
- ++pos;
- }
- }
- return GLOB_OK;
-}
-
-static GlobCode glob_range(URLGlob *glob, char *pattern,
- size_t pos, int *amount)
-{
- /* processes a range expression with the point behind the opening '['
- - char range: e.g. "a-z]", "B-Q]"
- - num range: e.g. "0-9]", "17-2000]"
- - num range with leading zeros: e.g. "001-999]"
- expression is checked for well-formedness and collected until the next ']'
- */
- URLPattern *pat;
- char *c;
- int wordamount=1;
- char sep;
- char sep2;
- int step;
- int rc;
-
- pat = (URLPattern*)&glob->pattern[glob->size / 2];
- /* patterns 0,1,2,... correspond to size=1,3,5,... */
- ++glob->size;
-
- if (ISALPHA(*pattern)) { /* character range detected */
- char min_c;
- char max_c;
-
- pat->type = UPTCharRange;
- rc = sscanf(pattern, "%c-%c%c%d%c", &min_c, &max_c, &sep, &step, &sep2);
- if ((rc < 3) || (min_c >= max_c) || ((max_c - min_c) > ('z' - 'a'))) {
- /* the pattern is not well-formed */
- snprintf(glob->errormsg, sizeof(glob->errormsg),
- "error: bad range specification after pos %zu\n", pos);
- return GLOB_ERROR;
- }
-
- /* check the (first) separating character */
- if((sep != ']') && (sep != ':')) {
- snprintf(glob->errormsg, sizeof(glob->errormsg),
- "error: unsupported character (%c) after range at pos %zu\n",
- sep, pos);
- return GLOB_ERROR;
- }
-
- /* if there was a ":[num]" thing, use that as step or else use 1 */
- pat->content.CharRange.step =
- ((sep == ':') && (rc == 5) && (sep2 == ']'))?step:1;
-
- pat->content.CharRange.ptr_c = pat->content.CharRange.min_c = min_c;
- pat->content.CharRange.max_c = max_c;
- }
- else if (ISDIGIT(*pattern)) { /* numeric range detected */
- int min_n;
- int max_n;
-
- pat->type = UPTNumRange;
- pat->content.NumRange.padlength = 0;
-
- rc = sscanf(pattern, "%d-%d%c%d%c", &min_n, &max_n, &sep, &step, &sep2);
-
- if ((rc < 2) || (min_n > max_n)) {
- /* the pattern is not well-formed */
- snprintf(glob->errormsg, sizeof(glob->errormsg),
- "error: bad range specification after pos %zu\n", pos);
- return GLOB_ERROR;
- }
- pat->content.NumRange.ptr_n = pat->content.NumRange.min_n = min_n;
- pat->content.NumRange.max_n = max_n;
-
- /* if there was a ":[num]" thing, use that as step or else use 1 */
- pat->content.NumRange.step =
- ((sep == ':') && (rc == 5) && (sep2 == ']'))?step:1;
-
- if (*pattern == '0') { /* leading zero specified */
- c = pattern;
- while (ISDIGIT(*c)) {
- c++;
- ++pat->content.NumRange.padlength; /* padding length is set for all
- instances of this pattern */
- }
- }
-
- }
- else {
- snprintf(glob->errormsg, sizeof(glob->errormsg),
- "illegal character in range specification at pos %zu\n", pos);
- return GLOB_ERROR;
- }
-
- c = (char*)strchr(pattern, ']'); /* continue after next ']' */
- if(c)
- c++;
- else {
- snprintf(glob->errormsg, sizeof(glob->errormsg), "missing ']'");
- return GLOB_ERROR; /* missing ']' */
- }
-
- /* always check for a literal (may be "") between patterns */
-
- if(GLOB_ERROR == glob_word(glob, c, pos + (c - pattern), &wordamount))
- wordamount = 1;
-
- if(pat->type == UPTCharRange)
- *amount = (pat->content.CharRange.max_c -
- pat->content.CharRange.min_c + 1) *
- wordamount;
- else
- *amount = (pat->content.NumRange.max_n -
- pat->content.NumRange.min_n + 1) * wordamount;
-
- return GLOB_OK;
-}
-
-static GlobCode glob_word(URLGlob *glob, char *pattern,
- size_t pos, int *amount)
-{
- /* processes a literal string component of a URL
- special characters '{' and '[' branch to set/range processing functions
- */
- char* buf = glob->glob_buffer;
- size_t litindex;
- GlobCode res = GLOB_OK;
-
- *amount = 1; /* default is one single string */
-
- while (*pattern != '\0' && *pattern != '{' && *pattern != '[') {
- if (*pattern == '}' || *pattern == ']') {
- snprintf(glob->errormsg, sizeof(glob->errormsg),
- "unmatched close brace/bracket at pos %zu\n", pos);
- return GLOB_ERROR;
- }
-
- /* only allow \ to escape known "special letters" */
- if (*pattern == '\\' &&
- (*(pattern+1) == '{' || *(pattern+1) == '[' ||
- *(pattern+1) == '}' || *(pattern+1) == ']') ) {
-
- /* escape character, skip '\' */
- ++pattern;
- ++pos;
- }
- *buf++ = *pattern++; /* copy character to literal */
- ++pos;
- }
- *buf = '\0';
- litindex = glob->size / 2;
- /* literals 0,1,2,... correspond to size=0,2,4,... */
- glob->literal[litindex] = strdup(glob->glob_buffer);
- if(!glob->literal[litindex])
- return GLOB_ERROR;
- ++glob->size;
-
- switch (*pattern) {
- case '\0':
- break; /* singular URL processed */
-
- case '{':
- /* process set pattern */
- res = glob_set(glob, ++pattern, ++pos, amount);
- break;
-
- case '[':
- /* process range pattern */
- res= glob_range(glob, ++pattern, ++pos, amount);
- break;
- }
-
- if(GLOB_OK != res)
- /* free that strdup'ed string again */
- free(glob->literal[litindex]);
-
- return res; /* something got wrong */
-}
-
-int glob_url(URLGlob** glob, char* url, int *urlnum, FILE *error)
-{
- /*
- * We can deal with any-size, just make a buffer with the same length
- * as the specified URL!
- */
- URLGlob *glob_expand;
- int amount;
- char *glob_buffer = malloc(strlen(url)+1);
-
- *glob = NULL;
- if(NULL == glob_buffer)
- return CURLE_OUT_OF_MEMORY;
-
- glob_expand = calloc(1, sizeof(URLGlob));
- if(NULL == glob_expand) {
- free(glob_buffer);
- return CURLE_OUT_OF_MEMORY;
- }
- glob_expand->size = 0;
- glob_expand->urllen = strlen(url);
- glob_expand->glob_buffer = glob_buffer;
- glob_expand->beenhere=0;
- if(GLOB_OK == glob_word(glob_expand, url, 1, &amount))
- *urlnum = amount;
- else {
- if(error && glob_expand->errormsg[0]) {
- /* send error description to the error-stream */
- fprintf(error, "curl: (%d) [globbing] %s",
- CURLE_URL_MALFORMAT, glob_expand->errormsg);
- }
- /* it failed, we cleanup */
- free(glob_buffer);
- free(glob_expand);
- glob_expand = NULL;
- *urlnum = 1;
- return CURLE_URL_MALFORMAT;
- }
-
- *glob = glob_expand;
- return CURLE_OK;
-}
-
-void glob_cleanup(URLGlob* glob)
-{
- size_t i;
- int elem;
-
- for (i = glob->size - 1; i < glob->size; --i) {
- if (!(i & 1)) { /* even indexes contain literals */
- free(glob->literal[i/2]);
- }
- else { /* odd indexes contain sets or ranges */
- if (glob->pattern[i/2].type == UPTSet) {
- for (elem = glob->pattern[i/2].content.Set.size - 1;
- elem >= 0;
- --elem) {
- free(glob->pattern[i/2].content.Set.elements[elem]);
- }
- free(glob->pattern[i/2].content.Set.elements);
- }
- }
- }
- free(glob->glob_buffer);
- free(glob);
-}
-
-char *glob_next_url(URLGlob *glob)
-{
- char *buf = glob->glob_buffer;
- URLPattern *pat;
- char *lit;
- size_t i;
- size_t j;
- size_t buflen = glob->urllen+1;
- size_t len;
-
- if (!glob->beenhere)
- glob->beenhere = 1;
- else {
- bool carry = TRUE;
-
- /* implement a counter over the index ranges of all patterns,
- starting with the rightmost pattern */
- for (i = glob->size / 2 - 1; carry && i < glob->size; --i) {
- carry = FALSE;
- pat = &glob->pattern[i];
- switch (pat->type) {
- case UPTSet:
- if (++pat->content.Set.ptr_s == pat->content.Set.size) {
- pat->content.Set.ptr_s = 0;
- carry = TRUE;
- }
- break;
- case UPTCharRange:
- 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;
- }
- break;
- case UPTNumRange:
- pat->content.NumRange.ptr_n += pat->content.NumRange.step;
- if (pat->content.NumRange.ptr_n > pat->content.NumRange.max_n) {
- pat->content.NumRange.ptr_n = pat->content.NumRange.min_n;
- carry = TRUE;
- }
- break;
- default:
- printf("internal error: invalid pattern type (%d)\n", (int)pat->type);
- exit (CURLE_FAILED_INIT);
- }
- }
- if (carry) /* first pattern ptr has run into overflow, done! */
- return NULL;
- }
-
- for (j = 0; j < glob->size; ++j) {
- if (!(j&1)) { /* every other term (j even) is a literal */
- lit = glob->literal[j/2];
- len = snprintf(buf, buflen, "%s", lit);
- buf += len;
- buflen -= len;
- }
- else { /* the rest (i odd) are patterns */
- pat = &glob->pattern[j/2];
- switch(pat->type) {
- case UPTSet:
- len = strlen(pat->content.Set.elements[pat->content.Set.ptr_s]);
- snprintf(buf, buflen, "%s",
- pat->content.Set.elements[pat->content.Set.ptr_s]);
- buf += len;
- buflen -= len;
- break;
- case UPTCharRange:
- *buf++ = pat->content.CharRange.ptr_c;
- break;
- case UPTNumRange:
- len = snprintf(buf, buflen, "%0*d",
- pat->content.NumRange.padlength,
- pat->content.NumRange.ptr_n);
- buf += len;
- buflen -= len;
- break;
- default:
- printf("internal error: invalid pattern type (%d)\n", (int)pat->type);
- exit (CURLE_FAILED_INIT);
- }
- }
- }
- *buf = '\0';
- return strdup(glob->glob_buffer);
-}
-
-char *glob_match_url(char *filename, URLGlob *glob)
-{
- char *target;
- size_t allocsize;
- size_t stringlen=0;
- char numbuf[18];
- char *appendthis = NULL;
- size_t appendlen = 0;
-
- /* We cannot use the glob_buffer for storage here since the filename may
- * be longer than the URL we use. We allocate a good start size, then
- * we need to realloc in case of need.
- */
- allocsize=strlen(filename)+1; /* make it at least one byte to store the
- trailing zero */
- target = malloc(allocsize);
- if(NULL == target)
- return NULL; /* major failure */
-
- while (*filename) {
- if (*filename == '#' && ISDIGIT(filename[1])) {
- unsigned long i;
- char *ptr = filename;
- unsigned long num = strtoul(&filename[1], &filename, 10);
- i = num-1;
-
- if (num && (i <= glob->size / 2)) {
- URLPattern pat = glob->pattern[i];
- switch (pat.type) {
- case UPTSet:
- appendthis = pat.content.Set.elements[pat.content.Set.ptr_s];
- appendlen = strlen(pat.content.Set.elements[pat.content.Set.ptr_s]);
- break;
- case UPTCharRange:
- numbuf[0]=pat.content.CharRange.ptr_c;
- numbuf[1]=0;
- appendthis=numbuf;
- appendlen=1;
- break;
- case UPTNumRange:
- snprintf(numbuf, sizeof(numbuf), "%0*d",
- pat.content.NumRange.padlength,
- pat.content.NumRange.ptr_n);
- appendthis = numbuf;
- appendlen = strlen(numbuf);
- break;
- default:
- printf("internal error: invalid pattern type (%d)\n",
- (int)pat.type);
- free(target);
- return NULL;
- }
- }
- else {
- /* #[num] out of range, use the #[num] in the output */
- filename = ptr;
- appendthis=filename++;
- appendlen=1;
- }
- }
- else {
- appendthis=filename++;
- appendlen=1;
- }
- if(appendlen + stringlen >= allocsize) {
- char *newstr;
- /* we append a single byte to allow for the trailing byte to be appended
- at the end of this function outside the while() loop */
- allocsize = (appendlen + stringlen)*2;
- newstr=realloc(target, allocsize + 1);
- if(NULL ==newstr) {
- free(target);
- return NULL;
- }
- target=newstr;
- }
- memcpy(&target[stringlen], appendthis, appendlen);
- stringlen += appendlen;
- }
- target[stringlen]= '\0';
- return target;
-}
diff --git a/src/urlglob.h b/src/urlglob.h
deleted file mode 100644
index a5b789e6..00000000
--- a/src/urlglob.h
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef __URLGLOB_H
-#define __URLGLOB_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-typedef enum {
- UPTSet=1,
- UPTCharRange,
- UPTNumRange
-} URLPatternType;
-
-typedef struct {
- URLPatternType type;
- union {
- struct {
- char **elements;
- short size;
- short ptr_s;
- } Set;
- struct {
- char min_c, max_c;
- char ptr_c;
- int step;
- } CharRange;
- struct {
- int min_n, max_n;
- short padlength;
- int ptr_n;
- int step;
- } NumRange ;
- } content;
-} URLPattern;
-
-typedef struct {
- char* literal[10];
- URLPattern pattern[9];
- size_t size;
- size_t urllen;
- char *glob_buffer;
- char beenhere;
- char errormsg[80]; /* error message buffer */
-} URLGlob;
-
-int glob_url(URLGlob**, char*, int *, FILE *);
-char* glob_next_url(URLGlob*);
-char* glob_match_url(char*, URLGlob *);
-void glob_cleanup(URLGlob* glob);
-
-#endif
diff --git a/src/vc6curlsrc.dsp b/src/vc6curlsrc.dsp
deleted file mode 100644
index 642cd5d3..00000000
--- a/src/vc6curlsrc.dsp
+++ /dev/null
@@ -1,258 +0,0 @@
-# Microsoft Developer Studio Project File - Name="curlsrc" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=curlsrc - Win32 using libcurl LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "curlsrc.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "curlsrc.mak" CFG="curlsrc - Win32 using libcurl LIB Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "curlsrc - Win32 using libcurl DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "curlsrc - Win32 using libcurl DLL Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "curlsrc - Win32 using libcurl LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "curlsrc - Win32 using libcurl LIB Release" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "curlsrc - Win32 using libcurl DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "DLL-Debug"
-# PROP BASE Intermediate_Dir "DLL-Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "DLL-Debug"
-# PROP Intermediate_Dir "DLL-Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" /FD /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 libcurld_imp.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"DLL-Debug/curl.exe" /pdbtype:sept /libpath:"..\lib\DLL-Debug"
-# ADD LINK32 libcurld_imp.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"DLL-Debug/curl.exe" /pdbtype:sept /libpath:"..\lib\DLL-Debug"
-
-!ELSEIF "$(CFG)" == "curlsrc - Win32 using libcurl DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "DLL-Release"
-# PROP BASE Intermediate_Dir "DLL-Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "DLL-Release"
-# PROP Intermediate_Dir "DLL-Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_CONSOLE" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_CONSOLE" /FD /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 libcurl_imp.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"DLL-Release/curl.exe" /libpath:"..\lib\DLL-Release"
-# ADD LINK32 libcurl_imp.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"DLL-Release/curl.exe" /libpath:"..\lib\DLL-Release"
-
-!ELSEIF "$(CFG)" == "curlsrc - Win32 using libcurl LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "LIB-Debug"
-# PROP BASE Intermediate_Dir "LIB-Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "LIB-Debug"
-# PROP Intermediate_Dir "LIB-Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /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 libcurld.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"LIB-Debug/curl.exe" /pdbtype:sept /libpath:"..\lib\LIB-Debug"
-# ADD LINK32 libcurld.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"LIB-Debug/curl.exe" /pdbtype:sept /libpath:"..\lib\LIB-Debug"
-
-!ELSEIF "$(CFG)" == "curlsrc - Win32 using libcurl LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "LIB-Release"
-# PROP BASE Intermediate_Dir "LIB-Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "LIB-Release"
-# PROP Intermediate_Dir "LIB-Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /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 libcurl.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"LIB-Release/curl.exe" /libpath:"..\lib\LIB-Release"
-# ADD LINK32 libcurl.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"LIB-Release/curl.exe" /libpath:"..\lib\LIB-Release"
-
-!ENDIF
-
-# Begin Target
-
-# Name "curlsrc - Win32 using libcurl DLL Debug"
-# Name "curlsrc - Win32 using libcurl DLL Release"
-# Name "curlsrc - Win32 using libcurl LIB Debug"
-# Name "curlsrc - Win32 using libcurl LIB Release"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\curlutil.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\getpass.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\homedir.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\hugehelp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\os-specific.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lib\nonblock.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lib\rawstr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lib\strtoofft.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\urlglob.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\writeenv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\writeout.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=".\config-win32.h"
-# End Source File
-# Begin Source File
-
-SOURCE=.\curlutil.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\getpass.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\homedir.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\hugehelp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\os-specific.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\setup.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lib\nonblock.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lib\rawstr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lib\strtoofft.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\urlglob.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\version.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\writeenv.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\writeout.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\curl.rc
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/src/vc6curlsrc.dsw b/src/vc6curlsrc.dsw
deleted file mode 100644
index 6b2db6fb..00000000
--- a/src/vc6curlsrc.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "curlsrc"=".\vc6curlsrc.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/src/version.h b/src/version.h
deleted file mode 100644
index 676102fa..00000000
--- a/src/version.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef HEADER_CURL_VERSION_H
-#define HEADER_CURL_VERSION_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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/curlver.h>
-
-#define CURL_NAME "curl"
-#define CURL_COPYRIGHT LIBCURL_COPYRIGHT
-#define CURL_VERSION "7.21.2"
-#define CURL_VERSION_MAJOR LIBCURL_VERSION_MAJOR
-#define CURL_VERSION_MINOR LIBCURL_VERSION_MINOR
-#define CURL_VERSION_PATCH LIBCURL_VERSION_PATCH
-#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "
-
-#endif /* HEADER_CURL_VERSION_H */
diff --git a/src/writeenv.c b/src/writeenv.c
deleted file mode 100644
index 18e1a063..00000000
--- a/src/writeenv.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#ifdef USE_ENVIRONMENT
-
-#include <curl/curl.h>
-#include "writeenv.h"
-
-#ifdef __riscos__
-#include <kernel.h>
-#endif
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#include "memdebug.h"
-#endif
-
-static const struct
-{
- const char * name;
- CURLINFO id;
- enum {
- writeenv_NONE,
- writeenv_DOUBLE,
- writeenv_LONG,
- writeenv_STRING
- } type;
-} variables[14] =
-{
- {"curl_url_effective", CURLINFO_EFFECTIVE_URL, writeenv_STRING},
- {"curl_http_code", CURLINFO_RESPONSE_CODE, writeenv_LONG},
- {"curl_time_total", CURLINFO_TOTAL_TIME, writeenv_DOUBLE},
- {"curl_time_namelookup", CURLINFO_NAMELOOKUP_TIME, writeenv_DOUBLE},
- {"curl_time_connect", CURLINFO_CONNECT_TIME, writeenv_DOUBLE},
- {"curl_time_pretransfer", CURLINFO_PRETRANSFER_TIME, writeenv_DOUBLE},
- {"curl_time_starttransfer", CURLINFO_STARTTRANSFER_TIME, writeenv_DOUBLE},
- {"curl_size_header", CURLINFO_HEADER_SIZE, writeenv_LONG},
- {"curl_size_request", CURLINFO_REQUEST_SIZE, writeenv_LONG},
- {"curl_size_download", CURLINFO_SIZE_DOWNLOAD, writeenv_DOUBLE},
- {"curl_size_upload", CURLINFO_SIZE_UPLOAD, writeenv_DOUBLE},
- {"curl_speed_download", CURLINFO_SPEED_DOWNLOAD, writeenv_DOUBLE},
- {"curl_speed_upload", CURLINFO_SPEED_UPLOAD, writeenv_DOUBLE},
- {NULL, 0, writeenv_NONE}
- };
-
-static void internalSetEnv(const char * name, char * value)
-{
- /* Add your OS-specific code here. */
-#ifdef __riscos__
- _kernel_setenv(name, value);
-#elif defined (CURLDEBUG)
- curl_memlog("ENV %s = %s\n", name, value);
-#endif
- return;
-}
-
-void ourWriteEnv(CURL *curl)
-{
- unsigned int i;
- char *string, numtext[10];
- long longinfo;
- double doubleinfo;
-
- for (i=0; variables[i].name; i++) {
- switch (variables[i].type) {
- case writeenv_STRING:
- if (curl_easy_getinfo(curl, variables[i].id, &string) == CURLE_OK)
- internalSetEnv(variables[i].name, string);
- else
- internalSetEnv(variables[i].name, NULL);
- break;
-
- case writeenv_LONG:
- if (curl_easy_getinfo(curl, variables[i].id, &longinfo) == CURLE_OK) {
- curl_msprintf(numtext, "%5ld", longinfo);
- internalSetEnv(variables[i].name, numtext);
- }
- else
- internalSetEnv(variables[i].name, NULL);
- break;
- case writeenv_DOUBLE:
- if (curl_easy_getinfo(curl, variables[i].id, &doubleinfo) == CURLE_OK) {
- curl_msprintf(numtext, "%6.2f", doubleinfo);
- internalSetEnv(variables[i].name, numtext);
- }
- else
- internalSetEnv(variables[i].name, NULL);
- break;
- default:
- break;
- }
- }
-
- return;
-}
-
-#endif
diff --git a/src/writeenv.h b/src/writeenv.h
deleted file mode 100644
index 8d92f6c8..00000000
--- a/src/writeenv.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef HEADER_CURL_WRITEENV_H
-#define HEADER_CURL_WRITEENV_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-void ourWriteEnv(CURL *curl);
-
-#endif /* HEADER_CURL_WRITEENV_H */
diff --git a/src/writeout.c b/src/writeout.c
deleted file mode 100644
index b8801a4b..00000000
--- a/src/writeout.c
+++ /dev/null
@@ -1,295 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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 "setup.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
-#include <curl/curl.h>
-
-#define _MPRINTF_REPLACE /* we want curl-functions instead of native ones */
-#include <curl/mprintf.h>
-
-#include "writeout.h"
-
-typedef enum {
- VAR_NONE, /* must be the first */
- VAR_TOTAL_TIME,
- VAR_NAMELOOKUP_TIME,
- VAR_CONNECT_TIME,
- VAR_APPCONNECT_TIME,
- VAR_PRETRANSFER_TIME,
- VAR_STARTTRANSFER_TIME,
- VAR_SIZE_DOWNLOAD,
- VAR_SIZE_UPLOAD,
- VAR_SPEED_DOWNLOAD,
- VAR_SPEED_UPLOAD,
- VAR_HTTP_CODE,
- VAR_HTTP_CODE_PROXY,
- VAR_HEADER_SIZE,
- VAR_REQUEST_SIZE,
- VAR_EFFECTIVE_URL,
- VAR_CONTENT_TYPE,
- VAR_NUM_CONNECTS,
- VAR_REDIRECT_TIME,
- VAR_REDIRECT_COUNT,
- VAR_FTP_ENTRY_PATH,
- VAR_REDIRECT_URL,
- VAR_SSL_VERIFY_RESULT,
- VAR_NUM_OF_VARS /* must be the last */
-} replaceid;
-
-struct variable {
- const char *name;
- replaceid id;
-};
-
-
-static const struct variable replacements[]={
- {"url_effective", VAR_EFFECTIVE_URL},
- {"http_code", VAR_HTTP_CODE},
- {"response_code", VAR_HTTP_CODE},
- {"http_connect", VAR_HTTP_CODE_PROXY},
- {"time_total", VAR_TOTAL_TIME},
- {"time_namelookup", VAR_NAMELOOKUP_TIME},
- {"time_connect", VAR_CONNECT_TIME},
- {"time_appconnect", VAR_APPCONNECT_TIME},
- {"time_pretransfer", VAR_PRETRANSFER_TIME},
- {"time_starttransfer", VAR_STARTTRANSFER_TIME},
- {"size_header", VAR_HEADER_SIZE},
- {"size_request", VAR_REQUEST_SIZE},
- {"size_download", VAR_SIZE_DOWNLOAD},
- {"size_upload", VAR_SIZE_UPLOAD},
- {"speed_download", VAR_SPEED_DOWNLOAD},
- {"speed_upload", VAR_SPEED_UPLOAD},
- {"content_type", VAR_CONTENT_TYPE},
- {"num_connects", VAR_NUM_CONNECTS},
- {"time_redirect", VAR_REDIRECT_TIME},
- {"num_redirects", VAR_REDIRECT_COUNT},
- {"ftp_entry_path", VAR_FTP_ENTRY_PATH},
- {"redirect_url", VAR_REDIRECT_URL},
- {"ssl_verify_result", VAR_SSL_VERIFY_RESULT},
- {NULL, VAR_NONE}
-};
-
-void ourWriteOut(CURL *curl, const char *writeinfo)
-{
- FILE *stream = stdout;
- const char *ptr=writeinfo;
- char *stringp;
- long longinfo;
- double doubleinfo;
-
- while(ptr && *ptr) {
- if('%' == *ptr) {
- if('%' == ptr[1]) {
- /* an escaped %-letter */
- fputc('%', stream);
- ptr+=2;
- }
- else {
- /* this is meant as a variable to output */
- char *end;
- char keepit;
- int i;
- if(('{' == ptr[1]) && ((end = strchr(ptr, '}')) != NULL)) {
- bool match = FALSE;
- ptr+=2; /* pass the % and the { */
- keepit=*end;
- *end=0; /* zero terminate */
- for(i=0; replacements[i].name; i++) {
- if(curl_strequal(ptr, replacements[i].name)) {
- match = TRUE;
- switch(replacements[i].id) {
- case VAR_EFFECTIVE_URL:
- if((CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &stringp))
- && stringp)
- fputs(stringp, stream);
- break;
- case VAR_HTTP_CODE:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &longinfo))
- fprintf(stream, "%03ld", longinfo);
- break;
- case VAR_HTTP_CODE_PROXY:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE,
- &longinfo))
- fprintf(stream, "%03ld", longinfo);
- break;
- case VAR_HEADER_SIZE:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &longinfo))
- fprintf(stream, "%ld", longinfo);
- break;
- case VAR_REQUEST_SIZE:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &longinfo))
- fprintf(stream, "%ld", longinfo);
- break;
- case VAR_NUM_CONNECTS:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &longinfo))
- fprintf(stream, "%ld", longinfo);
- break;
- case VAR_REDIRECT_COUNT:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &longinfo))
- fprintf(stream, "%ld", longinfo);
- break;
- case VAR_REDIRECT_TIME:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &doubleinfo))
- fprintf(stream, "%.3f", doubleinfo);
- break;
- case VAR_TOTAL_TIME:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo))
- fprintf(stream, "%.3f", doubleinfo);
- break;
- case VAR_NAMELOOKUP_TIME:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME,
- &doubleinfo))
- fprintf(stream, "%.3f", doubleinfo);
- break;
- case VAR_CONNECT_TIME:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &doubleinfo))
- fprintf(stream, "%.3f", doubleinfo);
- break;
- case VAR_APPCONNECT_TIME:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME,
- &doubleinfo))
- fprintf(stream, "%.3f", doubleinfo);
- break;
- case VAR_PRETRANSFER_TIME:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME,
- &doubleinfo))
- fprintf(stream, "%.3f", doubleinfo);
- break;
- case VAR_STARTTRANSFER_TIME:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
- &doubleinfo))
- fprintf(stream, "%.3f", doubleinfo);
- break;
- case VAR_SIZE_UPLOAD:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &doubleinfo))
- fprintf(stream, "%.0f", doubleinfo);
- break;
- case VAR_SIZE_DOWNLOAD:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &doubleinfo))
- fprintf(stream, "%.0f", doubleinfo);
- break;
- case VAR_SPEED_DOWNLOAD:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &doubleinfo))
- fprintf(stream, "%.3f", doubleinfo);
- break;
- case VAR_SPEED_UPLOAD:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &doubleinfo))
- fprintf(stream, "%.3f", doubleinfo);
- break;
- case VAR_CONTENT_TYPE:
- if((CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &stringp))
- && stringp)
- fputs(stringp, stream);
- break;
- case VAR_FTP_ENTRY_PATH:
- if((CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &stringp))
- && stringp)
- fputs(stringp, stream);
- break;
- case VAR_REDIRECT_URL:
- if((CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &stringp))
- && stringp)
- fputs(stringp, stream);
- break;
- case VAR_SSL_VERIFY_RESULT:
- if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &longinfo))
- fprintf(stream, "%ld", longinfo);
- break;
- default:
- break;
- }
- break;
- }
- }
- if(FALSE == match) {
- fprintf(stderr, "curl: unknown --write-out variable: '%s'\n", ptr);
- }
- ptr=end+1; /* pass the end */
- *end = keepit;
- }
- else {
- /* illegal syntax, then just output the characters that are used */
- fputc('%', stream);
- fputc(ptr[1], stream);
- ptr+=2;
- }
- }
- }
- else if('\\' == *ptr) {
- switch(ptr[1]) {
- case 'r':
- fputc('\r', stream);
- break;
- case 'n':
- fputc('\n', stream);
- break;
- case 't':
- fputc('\t', stream);
- break;
- default:
- /* unknown, just output this */
- fputc(*ptr, stream);
- fputc(ptr[1], stream);
- break;
- }
- ptr+=2;
- }
- else {
- fputc(*ptr, stream);
- ptr++;
- }
- }
-
-}
diff --git a/src/writeout.h b/src/writeout.h
deleted file mode 100644
index 1b221026..00000000
--- a/src/writeout.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef HEADER_CURL_WRITEOUT_H
-#define HEADER_CURL_WRITEOUT_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
- *
- ***************************************************************************/
-
-void ourWriteOut(CURL *curl, const char *out);
-
-#endif /* HEADER_CURL_WRITEOUT_H */
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 00000000..ef7ce119
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,17 @@
+log
+curl_client_key
+curl_client_key.pub
+curl_client_knownhosts
+curl_host_dsa_key
+curl_host_dsa_key.pub
+curl_sftp_cmds
+curl_sftp_config
+curl_ssh_config
+curl_sshd_config
+*pid
+stunnel.conf
+runtests.html
+runtests.pdf
+testcurl.html
+testcurl.pdf
+configurehelp.pm
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 04ab06ed..acd9caa0 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,2 +1,3 @@
+add_subdirectory(data)
add_subdirectory(libtest)
add_subdirectory(server)
diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT
index fb162a35..c234c225 100644
--- a/tests/FILEFORMAT
+++ b/tests/FILEFORMAT
@@ -59,6 +59,12 @@ transfers.
of data encoded with base64. It is the only way a test case can contain binary
data. (This attribute can in fact be used on any section, but it doesn't make
much sense for other sections than "data").
+
+For FTP file listings, the <data> section will be used *only* if you make sure
+that there has been a CWD done first to a directory named 'test-[num]' where
+[num] is the test case number. Otherwise the ftp server can't know from which
+test file to load the list content.
+
</data>
<dataNUM>
Send back this contents instead of the <data> one. The num is set by:
@@ -75,6 +81,11 @@ to complete a transfer. The response to each request is found in its own data
section. Validating the entire negotiation sequence can be done by
specifying a datacheck section.
</dataNUM>
+<connect>
+The connect section is used instead of the 'data' for all CONNECT
+requests. The remainder of the rules for the data section then apply but with
+a connect prefix.
+</connect>
<datacheck [nonewline="yes"]>
if the data is sent but this is what should be checked afterwards. If
'nonewline' is set, we will cut off the trailing newline of this given data
@@ -97,11 +108,13 @@ wait [secs]
</postcmd>
<servercmd>
Special-commands for the server.
-For FTP, these are supported:
+For FTP/SMTP/POP/IMAP, these are supported:
REPLY [command] [return value] [response string]
- Changes how the server responds to the [command]. [response string] is
evaluated as a perl string, so it can contain embedded \r\n, for example.
+ There's a special [command] named "welcome" (without quotes) which is the
+ string sent immediately on connect as a welcome.
COUNT [command] [num]
- Do the REPLY change for [command] only [num] times and then go back to the
built-in approach
@@ -118,6 +131,13 @@ SLOWDOWN
- Send FTP responses with 0.01 sec delay between each byte
PASVBADIP
- makes PASV send back an illegal IP in its 227 response
+CAPA [capabilities]
+ - Enables support for and specifies a list of space separated capabilities to
+ return to the client for the IMAP CAPABILITY, POP3 CAPA and SMTP EHLO
+ commands
+AUTH [mechanisms]
+ - Enables support for SASL authentication and specifies a list of space
+ separated mechanisms for IMAP, POP3 and SMTP
For HTTP/HTTPS:
auth_required if this is set and a POST/PUT is made without auth, the
@@ -133,6 +153,15 @@ skip: [num] instructs the server to ignore reading this many bytes from a PU
rtp: part [num] channel [num] size [num]
stream a fake RTP packet for the given part on a chosen channel
with the given payload size
+
+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
+ 512 bytes payload)
</servercmd>
</reply>
@@ -147,39 +176,61 @@ ftp-ipv6
ftps
http
http-ipv6
+http-proxy
+http-unix
https
+httptls+srp
+httptls+srp-ipv6
+imap
none
+pop3
+rtsp
+rtsp-ipv6
scp
sftp
+smtp
socks4
socks5
-rtsp
-rtsp-ipv6
-imap
-pop3
-smtp
Give only one per line. This subsection is mandatory.
</server>
<features>
A list of features that MUST be present in the client/library for this test to
-be able to run (if these features are not present, the test will be
-SKIPPED). Features testable here are:
+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:
+axTLS
crypto
+debug
getrlimit
GnuTLS
idn
ipv6
large_file
libz
-netrc_debug
+Metalink
NSS
NTLM
OpenSSL
-SSL
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
@@ -208,7 +259,8 @@ to have failed. Variables are substituted as in the <command> section.
<tool>
Name of tool to use instead of "curl". This tool must be built and exist
-in the libtest/ directory.
+either in the libtest/ directory (if the tool starts with 'lib') or in the
+unit/ directory (if the tool starts with 'unit').
</tool>
<name>
@@ -224,7 +276,8 @@ command is run. They are cleared again after the command has been run.
Variables are first substituted as in the <command> section.
</setenv>
-<command [option="no-output"] [timeout="secs"] [delay="secs"]>
+<command [option="no-output/no-include"] [timeout="secs"] [delay="secs"]
+ [type="perl"]>
command line to run, there's a bunch of %variables that get replaced
accordingly.
@@ -233,14 +286,23 @@ that is returned. The last slash in the URL must be followed by a number. That
number (N) will be used by the test-server to load test case N and return the
data that is defined within the <reply><data></data></reply> section.
-If a CONNECT is used to the server (to emulate HTTPS etc over proxy), the port
-number given in the CONNECT request will be used to identify which test that
-is being run, if the proxy host name is said to start with 'test'.
+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
+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.
+
+Set type="perl" to write the test case as a perl script. It implies that
+there's no memory debugging and valgrind gets shut off for this test.
Set option="no-output" to prevent the test script to slap on the --output
argument that directs the output to a file. The --output is also not added if
the verify/stdout section is used.
+Set option="no-include" to prevent the test script to slap on the --include
+argument.
+
Set timeout="secs" to override default server logs advisor read lock timeout.
This timeout is used by the test harness, once that the command has completed
execution, to wait for the test server to write out server side log files and
@@ -255,28 +317,42 @@ not negative integer number of seconds for the delay. This 'delay' attribute
is intended for very specific test cases, and normally not needed.
Available substitute variables include:
-%CLIENTIP - IPv4 address of the client running curl
-%CLIENT6IP - IPv6 address of the client running curl
-%HOSTIP - IPv4 address of the host running this test
-%HOSTPORT - Port number of the HTTP server
-%HOST6IP - IPv6 address of the host running this test
-%HOST6PORT - IPv6 port number of the HTTP server
-%HTTPSPORT - Port number of the HTTPS server
-%FTPPORT - Port number of the FTP server
+%CLIENT6IP - IPv6 address of the client running curl
+%CLIENTIP - IPv4 address of the client running curl
+%CURL - Path to the curl executable
+%FTP2PORT - Port number of the FTP server 2
%FTP6PORT - IPv6 port number of the FTP server
+%FTPPORT - Port number of the FTP server
%FTPSPORT - Port number of the FTPS server
-%FTP2PORT - Port number of the FTP server 2
%FTPTIME2 - Timeout in seconds that should be just sufficient to receive
a response from the test FTP server
-%TFTPPORT - Port number of the TFTP server
-%TFTP6PORT - IPv6 port number of the TFTP server
-%SSHPORT - Port number of the SCP/SFTP server
-%SOCKSPORT - Port number of the SOCKS4/5 server
-%RTSPPORT - Port number of the RTSP server
+%FTPTIME3 - Even longer than %FTPTIME2
+%GOPHER6PORT - IPv6 port number of the Gopher server
+%GOPHERPORT - Port number of the Gopher server
+%HOST6IP - IPv6 address of the host running this test
+%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
+%HTTPTLSPORT - Port number of the HTTP TLS server
+%IMAP6PORT - IPv6 port number of the IMAP server
+%IMAPPORT - Port number of the IMAP server
+%POP36PORT - IPv6 ort number of the POP3 server
+%POP3PORT - Port number of the POP3 server
+%PROXYPORT - Port number of the HTTP proxy
+%PWD - Current directory
%RTSP6PORT - IPv6 port number of the RTSP server
+%RTSPPORT - Port number of the RTSP server
+%SMTP6PORT - IPv6 port number of the SMTP server
+%SMTPPORT - Port number of the SMTP server
+%SOCKSPORT - Port number of the SOCKS4/5 server
%SRCDIR - Full path to the source dir
-%PWD - Current directory
-%CURL - Path to the curl executable
+%SSHPORT - Port number of the SCP/SFTP server
+%TFTP6PORT - IPv6 port number of the TFTP server
+%TFTPPORT - Port number of the TFTP server
%USER - Login ID of the user running the test
</command>
@@ -287,8 +363,11 @@ Variables are substituted on the contents of the file as in the <command>
section.
</file>
-<stdin>
+<stdin [nonewline="yes"]>
Pass this given data on stdin to the tool.
+
+If 'nonewline' is set, we will cut off the trailing newline of this given data
+before comparing with the one actually received by the client
</stdin>
</client>
@@ -308,12 +387,26 @@ changing protocol data such as port numbers or user-agent strings.
One perl op per line that operates on the protocol dump. This is pretty
advanced. Example: "s/^EPRT .*/EPRT stripped/"
</strippart>
+
<protocol [nonewline="yes"]>
-the protocol dump curl should transmit, if 'nonewline' is set, we will cut
-off the trailing newline of this given data before comparing with the one
-actually sent by the client
-Variables are substituted as in the <command> section.
+
+the protocol dump curl should transmit, if 'nonewline' is set, we will cut off
+the trailing newline of this given data before comparing with the one actually
+sent by the client Variables are substituted as in the <command> section. The
+<strip> and <strippart> rules are applied before comparisons are made.
+
</protocol>
+
+<proxy [nonewline="yes"]>
+
+The protocol dump curl should transmit to a HTTP proxy (when the http-proxy
+server is used), if 'nonewline' is set, we will cut off the trailing newline
+of this given data before comparing with the one actually sent by the client
+Variables are substituted as in the <command> section. The <strip> and
+<strippart> rules are applied before comparisons are made.
+
+</proxy>
+
<stdout [mode="text"] [nonewline="yes"]>
This verifies that this data was passed to stdout. Variables are
substituted as in the <command> section.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1d5a4afa..eac455ae 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,10 +26,24 @@ PDFPAGES = testcurl.pdf runtests.pdf
EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \
FILEFORMAT README stunnel.pem memanalyze.pl testcurl.pl valgrind.pm ftp.pm \
sshserver.pl sshhelp.pm testcurl.1 runtests.1 $(HTMLPAGES) $(PDFPAGES) \
- CMakeLists.txt certs/scripts/*.sh certs/Server* certs/EdelCurlRoot* \
- serverhelp.pm tftpserver.pl rtspserver.pl directories.pm
+ serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl \
+ CMakeLists.txt mem-include-scan.pl valgrind.supp http_pipe.py extern-scan.pl
-SUBDIRS = data server libtest
+DISTCLEANFILES = configurehelp.pm
+
+# we have two variables here to make sure DIST_SUBDIRS won't get 'unit'
+# added twice as then targets such as 'distclean' misbehave and try to
+# do things twice in that subdir at times (and thus fails).
+if BUILD_UNITTESTS
+BUILD_UNIT = unit
+DIST_UNIT =
+else
+BUILD_UNIT =
+DIST_UNIT = unit
+endif
+
+SUBDIRS = certs data server libtest $(BUILD_UNIT)
+DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT)
PERLFLAGS = -I$(srcdir)
@@ -42,26 +56,31 @@ curl:
if CROSSCOMPILING
TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
-TEST_Q =
-TEST_F =
-TEST_T =
else # if not cross-compiling:
TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
TEST_Q = -a -s
+TEST_AM = -a -am
TEST_F = -a -p -r
TEST_T = -a -t
endif
-test: all
+# make sure that PERL is pointing to an executable
+perlcheck:
+ @if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi
+
+test: perlcheck all
$(TEST)
-quiet-test: all
+quiet-test: perlcheck all
$(TEST) $(TEST_Q)
-full-test: all
+am-test: perlcheck all
+ $(TEST) $(TEST_AM)
+
+full-test: perlcheck all
$(TEST) $(TEST_F)
-torture-test: all
+torture-test: perlcheck all
$(TEST) $(TEST_T)
.1.html:
diff --git a/tests/Makefile.in b/tests/Makefile.in
deleted file mode 100644
index a944800b..00000000
--- a/tests/Makefile.in
+++ /dev/null
@@ -1,631 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-###########################################################################
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = tests
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-HTMLPAGES = testcurl.html runtests.html
-PDFPAGES = testcurl.pdf runtests.pdf
-EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \
- FILEFORMAT README stunnel.pem memanalyze.pl testcurl.pl valgrind.pm ftp.pm \
- sshserver.pl sshhelp.pm testcurl.1 runtests.1 $(HTMLPAGES) $(PDFPAGES) \
- CMakeLists.txt certs/scripts/*.sh certs/Server* certs/EdelCurlRoot* \
- serverhelp.pm tftpserver.pl rtspserver.pl directories.pm
-
-SUBDIRS = data server libtest
-PERLFLAGS = -I$(srcdir)
-CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid
-MAN2HTML = roffit < $< >$@
-@CROSSCOMPILING_FALSE@TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
-@CROSSCOMPILING_TRUE@TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
-@CROSSCOMPILING_FALSE@TEST_Q = -a -s
-@CROSSCOMPILING_TRUE@TEST_Q =
-@CROSSCOMPILING_FALSE@TEST_F = -a -p -r
-@CROSSCOMPILING_TRUE@TEST_F =
-@CROSSCOMPILING_FALSE@TEST_T = -a -t
-@CROSSCOMPILING_TRUE@TEST_T =
-all: all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .1 .html .pdf
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign tests/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/certs $(distdir)/certs/scripts
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
-
-
-curl:
- @cd $(top_builddir) && $(MAKE)
-
-test: all
- $(TEST)
-
-quiet-test: all
- $(TEST) $(TEST_Q)
-
-full-test: all
- $(TEST) $(TEST_F)
-
-torture-test: all
- $(TEST) $(TEST_T)
-
-.1.html:
- $(MAN2HTML)
-
-.1.pdf:
- @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
- groff -Tps -man $< >$$foo.ps; \
- ps2pdf $$foo.ps $@; \
- rm $$foo.ps; \
- echo "converted $< to $@")
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tests/README b/tests/README
index be22778c..ae8ff25c 100644
--- a/tests/README
+++ b/tests/README
@@ -6,13 +6,45 @@
The cURL Test Suite
-Requires:
+ 1. Running
+ 1.1 Requires to run
+ 1.2 Port numbers used by test servers
+ 1.3 Test servers
+ 1.4 Run
+ 1.5 Shell startup scripts
+ 1.6 Memory test
+ 1.7 Debug
+ 1.8 Logs
+ 1.9 Test input files
+ 1.10 Code coverage
+ 1.11 Remote testing
+
+ 2. Numbering
+ 2.1 Test case numbering
+
+ 3. Write tests
+ 3.1 test data
+ 3.2 curl tests
+ 3.3 libcurl tests
+ 3.4 unit tests
+
+ 4. TODO
+ 4.1 More protocols
+ 4.2 SOCKS auth
+
+==============================================================================
+
+1. Running
+
+ 1.1 Requires to run
+
perl (and a unix-style shell)
+ python (and a unix-style shell)
diff (when a test fails, a diff is shown)
stunnel (for HTTPS and FTPS tests)
OpenSSH or SunSSH (for SCP, SFTP and SOCKS4/5 tests)
-Ports used by default:
+ 1.2 Port numbers used by test servers
- TCP/8990 for HTTP
- TCP/8991 for HTTPS
@@ -28,25 +60,39 @@ Ports used by default:
- TCP/9001 for POP3
- TCP/9002 for IMAP
- TCP/9003 for SMTP
+ - TCP/9004 for SMTP IPv6
+ - TCP/9005 for RTSP
+ - TCP/9006 for RTSP IPv6
+ - TCP/9007 for GOPHER
+ - TCP/9008 for GOPHER IPv6
+ - TCP/9008 for HTTPS server with TLS-SRP support
+
+ 1.3 Test servers
The test suite runs simple FTP, POP3, IMAP, SMTP, HTTP and TFTP stand-alone
- servers on these ports to which it makes requests. For SSL tests, it runs
- stunnel to handle encryption to the regular servers. For SSH, it runs a
- standard OpenSSH server. For SOCKS4/5 tests SSH is used to perform the SOCKS
- functionality and requires a SSH client and server.
+ servers on the ports listed above to which it makes requests. For SSL tests,
+ it runs stunnel to handle encryption to the regular servers. For SSH, it
+ runs a standard OpenSSH server. For SOCKS4/5 tests SSH is used to perform
+ the SOCKS functionality and requires a SSH client and server.
+
+ The base port number (8990), which all the individual port numbers are
+ indexed from, can be set explicitly using runtests.pl' -b option to allow
+ running more than one instance of the test suite simultaneously on one
+ 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'.
- The base port number shown above can be changed using runtests' -b option
- to allow running more than one instance of the test suite simultaneously
- on one machine.
+ 1.4 Run
-Run:
'make test'. This builds the test suite support code and invokes the
'runtests.pl' perl script to run all the tests. Edit the top variables
of that script in case you have some specific needs, or run the script
manually (after the support code has been built).
The script breaks on the first test that doesn't do OK. Use -a to prevent
- the script from abort on the first error. Run the script with -v for more
+ the script from aborting on the first error. Run the script with -v for more
verbose output. Use -d to run the test servers with debug output enabled as
well. Specifying -k keeps all the log files generated by the test intact.
@@ -54,9 +100,27 @@ Run:
(like "./runtests.pl 3 4" to test 3 and 4 only). It also supports test case
ranges with 'to', as in "./runtests 3 to 9" which runs the seven tests from
3 to 9. Any test numbers starting with ! are disabled, as are any test
- numbers found in the file data/DISABLED (one per line).
+ numbers found in the files data/DISABLED or data/DISABLED.local (one per
+ line). The latter is meant for local temporary disables and will be ignored
+ by git.
+
+ When -s is not present, each successful test will display on one line the
+ test number and description and on the next line a set of flags, the test
+ result, current test sequence, total number of tests to be run and an
+ estimated amount of time to complete the test run. The flags consist of
+ these letters describing what is checked in this test:
+
+ s stdout
+ d data
+ u upload
+ p protocol
+ o output
+ e exit code
+ m memory
+ v valgrind
+
+ 1.5 Shell startup scripts
-Shell startup scripts:
Tests which use the ssh test server, SCP/SFTP/SOCKS tests, might be badly
influenced by the output of system wide or user specific shell startup
scripts, .bashrc, .profile, /etc/csh.cshrc, .login, /etc/bashrc, etc. which
@@ -71,44 +135,47 @@ Shell startup scripts:
output of a shell startup script. Locate, cleanup or adjust the shell
script.
-Memory:
+ 1.6 Memory test
+
The test script will check that all allocated memory is freed properly IF
curl has been built with the CURLDEBUG define set. The script will
- automatically detect if that is the case, and it will use the ../memanalyze
- script to analyze the memory debugging output.
+ automatically detect if that is the case, and it will use the
+ 'memanalyze.pl' script to analyze the memory debugging output.
+
+ Also, if you run tests on a machine where valgrind is found, the script will
+ use valgrind to run the test with (unless you use -n) to further verify
+ correctness.
+
+ runtests.pl's -t option will enable torture testing mode, which runs each
+ test many times and makes each different memory allocation fail on each
+ successive run. This tests the out of memory error handling code to ensure
+ that memory leaks do not occur even in those situations. It can help to
+ compile curl with CPPFLAGS=-DMEMDEBUG_LOG_SYNC when using this option, to
+ ensure that the memory log file is properly written even if curl crashes.
- The -t option will enable torture testing mode, which runs each test
- many times but causes a different memory allocation to fail on each
- successive run. This tests the out of memory error handling code to
- ensure that memory leaks do not occur even in those situations.
+ 1.7 Debug
-Debug:
If a test case fails, you can conveniently get the script to invoke the
debugger (gdb) for you with the server running and the exact same command
line parameters that failed. Just invoke 'runtests.pl <test number> -g' and
then just type 'run' in the debugger to perform the command through the
debugger.
- If a test case causes a core dump, analyze it by running gdb like:
+ 1.8 Logs
- # gdb ../curl/src core
+ All logs are generated in the logs/ subdirectory (it is emptied first in the
+ runtests.pl script). Use runtests.pl -k to force it to keep the temporary
+ files after the test run since successful runs will clean it up otherwise.
- ... and get a stack trace with the gdb command:
+ 1.9 Test input files
- (gdb) where
-
-Logs:
- All logs are generated in the logs/ subdirectory (it is emptied first
- in the runtests.pl script). Use runtests.pl -k to keep the temporary files
- after the test run.
-
-Data:
All test cases are put in the data/ subdirectory. Each test is stored in the
file named according to the test number.
See FILEFORMAT for the description of the test case files.
-Code coverage:
+ 1.10 Code coverage
+
gcc provides a tool that can determine the code coverage figures for
the test suite. To use it, configure curl with
CFLAGS='-fprofile-arcs -ftest-coverage -g -O0'. Make sure you run the normal
@@ -125,36 +192,86 @@ Code coverage:
The text mode tool gcov may also be used, but it doesn't handle object files
in more than one directory very well.
-Remote testing:
+ 1.11 Remote testing
+
The runtests.pl script provides some hooks to allow curl to be tested on a
machine where perl can not be run. The test framework in this case runs on
a workstation where perl is available, while curl itself is run on a remote
system using ssh or some other remote execution method. See the comments at
the beginning of runtests.pl for details.
-TEST CASE NUMBERS
+2. Numbering
+
+ 2.1 Test case numbering
+
+ 1 - 99 HTTP
+ 100 - 199 FTP
+ 200 - 299 FILE
+ 300 - 399 HTTPS
+ 400 - 499 FTPS
+ 500 - 599 libcurl source code tests, not using the curl command tool
+ 600 - 699 SCP/SFTP
+ 700 - 799 SOCKS4 (even numbers) and SOCK5 (odd numbers)
+ 800 - 849 IMAP
+ 850 - 899 POP3
+ 900 - 999 SMTP
+ 1000 - 1299 miscellaneous
+ 1300 - 1399 unit tests
+ 1400 - 1499 miscellaneous
+ 1500 - 1599 libcurl source code tests, not using the curl command tool
+ (same as 5xx)
+ 1600 - 1699 unit tests
+ 2000 - x multiple sequential protocols per test case
+
+ There's nothing in the system that *requires* us to keep within these number
+ series.
+
+3. Write tests
+
+ Here's a quick description on writing test cases. We basically have three
+ kinds of tests: the ones that test the curl tool, the ones that build small
+ applications and test libcurl directly and the unit tests that test
+ individual (possibly internal) functions.
+
+ 3.1 test data
+
+ Each test has a master file that controls all the test data. What to read,
+ what the protocol exchange should look like, what exit code to expect and
+ what command line arguments to use etc.
+
+ These files are tests/data/test[num] where [num] is described in section 2
+ of this document, and the XML-like file format of them is described in the
+ separate tests/FILEFORMAT document.
+
+ 3.2 curl tests
+
+ A test case that runs the curl tool and verifies that it gets the correct
+ data, it sends the correct data, it uses the correct protocol primitives
+ etc.
+
+ 3.3 libcurl tests
+
+ The libcurl tests are identical to the curl ones, except that they use a
+ specific and dedicated custom-built program to run instead of "curl". This
+ tool is built from source code placed in tests/libtest and if you want to
+ make a new libcurl test that is where you add your code.
+
+ 3.4 unit tests
+
+ Unit tests are tests in the 13xx sequence and they are placed in tests/unit.
+ There's a tests/unit/README describing the specific set of checks and macros
+ that may be used when writing tests that verify behaviors of specific
+ individual functions.
+
+ The unit tests depend on curl being built with debug enabled.
- So far, we've used this system:
+4. TODO
- 1 - 99 HTTP
- 100 - 199 FTP*
- 200 - 299 FILE*
- 300 - 399 HTTPS
- 400 - 499 FTPS
- 500 - 599 libcurl source code tests, not using the curl command tool
- 600 - 699 SCP/SFTP
- 700 - 799 SOCKS4 (even numbers) and SOCK5 (odd numbers)
- 800 - 899 POP3, IMAP, SMTP
- 1000 - 1999 miscellaneous*
- 2000 - x multiple sequential protocols per test case*
+ 4.1 More protocols
- Since 30-apr-2003, there's nothing in the system that requires us to keep
- within these number series, and those sections marked with * actually
- contain tests for a variety of protocols. Each test case now specifies
- its own server requirements, independent of test number.
+ Add tests for TELNET, LDAP, DICT...
-TODO:
+ 4.2 SOCKS auth
- * Add tests for TELNET, LDAP, DICT...
- * SOCKS4/5 test deficiencies - no proxy authentication tests as SSH (the
- test mechanism) doesn't support them
+ SOCKS4/5 test deficiencies - no proxy authentication tests as SSH (the
+ test mechanism) doesn't support them
diff --git a/tests/certs/EdelCurlRoot-ca.cacert b/tests/certs/EdelCurlRoot-ca.cacert
index 8bcbc180..d3ec4d35 100644
--- a/tests/certs/EdelCurlRoot-ca.cacert
+++ b/tests/certs/EdelCurlRoot-ca.cacert
@@ -1,42 +1,41 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number:
- 0b:98:94:f5:ab:a6
- Signature Algorithm: sha1WithRSAEncryption
+ Serial Number: 14269504311616 (0xcfa60bc5140)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Validity
- Not Before: May 27 21:36:46 2010 GMT
- Not After : Oct 30 21:36:46 2026 GMT
+ Not Before: Mar 21 15:07:11 2015 GMT
+ Not After : Aug 24 15:07:11 2031 GMT
Subject:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
- 00:c1:a9:0a:ef:76:06:7d:fe:78:3a:f1:0e:40:6d:
- c2:5b:ae:8f:8d:7f:f0:d5:89:9e:42:2a:f0:17:94:
- d9:2e:67:c7:2d:01:1c:95:a3:b1:a6:86:d4:12:3c:
- 47:3a:70:e6:7b:1f:11:06:d3:73:ae:df:ca:24:19:
- 03:e4:62:0a:eb:67:d4:dc:ef:9d:2d:e0:82:77:fe:
- 2a:30:5a:fb:57:e5:b8:4f:36:52:4c:2f:57:ad:12:
- 6a:94:3e:e4:48:a7:ad:a5:c0:3a:d0:4e:00:99:88:
- 8f:bd:4a:70:be:3b:5b:6b:ff:5e:6f:29:6d:0c:a7:
- 55:4a:e2:43:e7:49:0f:99:54:59:68:81:34:d8:a9:
- fb:c8:0d:14:5a:40:cb:70:1e:f5:3b:c0:42:39:06:
- f9:63:ad:d9:29:14:53:af:42:10:1d:18:95:b6:15:
- 8a:d8:41:d8:37:31:0a:97:5a:1b:10:90:ac:1d:ff:
- 6e:71:33:6b:7e:88:18:20:ed:be:35:ff:e7:69:48:
- 05:c0:78:2e:04:46:f4:c2:8d:4d:70:6e:42:fa:93:
- eb:ce:12:3b:d1:f5:ce:3f:29:5c:8c:bd:59:83:e4:
- a1:c1:3c:8e:3e:38:55:f3:99:18:b0:df:f6:74:c9:
- 8e:28:f4:38:0d:45:20:d6:db:c0:73:a2:e6:8c:6e:
- 98:9f
+ 00:e1:4c:d9:74:1a:a4:a3:42:57:a4:7a:2e:74:02:
+ 08:49:6a:6a:1d:db:de:c3:43:d6:48:60:12:30:ed:
+ d6:6e:74:16:81:16:4e:50:b9:6c:b9:36:0d:19:a4:
+ f7:85:99:40:46:26:46:33:86:ce:0c:27:71:e4:8f:
+ 0f:b4:3a:99:6d:af:78:48:b7:cb:c4:d3:60:7d:d0:
+ 17:6f:23:bc:89:c0:bc:16:b8:94:f0:b2:10:8d:c8:
+ e0:35:97:ed:8f:c6:db:9b:cd:aa:f6:8c:45:dc:0f:
+ ee:a0:78:12:be:f6:7d:f4:f7:b6:8c:4e:e5:7d:32:
+ e8:f7:f7:1e:04:46:9e:08:cd:cb:ec:e2:9a:c3:35:
+ 3f:ce:a1:01:e3:10:0a:ec:d9:ab:13:09:eb:e6:39:
+ 6b:92:30:c7:08:bd:8a:32:ef:0b:b2:61:6f:11:43:
+ 95:cf:31:ea:19:01:cc:1a:6d:d2:d5:57:35:da:c0:
+ ae:46:39:d3:33:ed:f8:c0:1e:ad:3d:68:6f:a8:53:
+ 24:ac:d6:f9:dd:2b:51:50:77:e4:b7:5d:ad:48:80:
+ 5d:65:57:e5:eb:07:82:7d:cb:72:4f:06:6a:34:d4:
+ 38:c8:6b:ed:8a:3a:68:5e:35:e3:78:14:da:5d:86:
+ 9f:e5:d4:1c:dd:90:c2:7c:a2:00:d4:95:65:04:85:
+ ff:83
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints: critical
@@ -44,42 +43,42 @@ Certificate:
X509v3 Key Usage: critical
Certificate Sign, CRL Sign
X509v3 Subject Key Identifier:
- AD:3E:E2:39:07:B8:5C:AA:26:90:94:4C:26:69:21:83:E2:4E:36:94
+ 12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE
Signature Algorithm: sha1WithRSAEncryption
- 86:1f:9d:dd:45:11:c8:6b:f1:97:1a:f0:25:b2:0c:f7:1f:58:
- c4:6a:a5:56:07:32:cb:2d:7a:8c:ae:47:1e:7d:e7:73:6c:3b:
- 96:1e:75:b4:e5:89:05:a7:7e:b6:52:56:5a:e2:6b:38:e4:18:
- 3c:64:6f:be:bd:d3:01:76:b4:83:7f:7a:1e:9c:cb:40:1b:9a:
- dd:43:cb:9a:db:8a:f8:76:50:ab:ad:85:7f:cf:3a:6f:4b:e2:
- 27:b0:8c:a9:0a:e0:d8:45:00:05:5e:29:ab:a0:8a:78:e5:09:
- 89:48:8a:0d:42:49:1e:ad:c2:85:2f:29:9d:af:2e:c8:ef:b9:
- dc:74:33:eb:e9:45:e9:a2:b3:00:ba:76:0b:74:59:c9:a8:96:
- 4c:f3:cd:9b:34:5a:4a:87:b2:6a:52:74:5b:be:f3:81:f8:32:
- d0:1f:c9:cc:9f:8a:6a:eb:6e:f3:6d:2c:54:20:86:f6:87:62:
- c0:ed:55:03:9d:97:a9:5a:ae:39:a0:7e:e4:a6:95:e9:26:19:
- 91:e6:0f:b6:18:f7:49:6c:a7:ce:fd:c1:04:c2:f9:27:27:4c:
- 59:e9:bf:7a:f6:65:a0:d9:a0:71:a6:54:c6:6f:9a:5d:23:19:
- 57:49:59:2c:06:91:3e:28:9b:c1:6f:f2:2d:9a:24:a7:0b:da:
- cd:cc:f3:bc
+ d4:d0:22:19:78:2e:2e:1d:83:c6:79:89:c1:a8:23:43:4e:86:
+ 76:16:31:bd:b7:c0:44:2c:b9:2c:79:99:2f:02:48:33:1e:a7:
+ d7:0e:d9:f1:cb:ed:39:1a:34:b3:50:af:c9:8d:64:bf:ff:72:
+ 1b:1d:e0:5d:40:3b:b5:00:7c:d1:78:ff:45:ee:d9:05:3f:32:
+ f6:cd:f4:d3:79:58:d8:44:94:65:f5:c3:a9:5d:d8:13:d9:57:
+ e7:13:18:fa:f3:72:0b:cf:a3:4a:f4:6e:5e:74:30:3c:cb:76:
+ 28:f9:44:9a:ba:3e:b7:3e:01:79:3e:cb:5c:df:5a:d4:6c:34:
+ aa:bd:c0:6d:25:85:e5:28:f6:15:e1:9d:af:a7:f7:a7:6c:2a:
+ 1d:1d:93:1e:89:71:66:c7:0b:e4:ce:36:c1:21:c4:73:5d:2b:
+ 24:a9:3d:26:df:1c:e8:60:69:e3:82:98:c3:5b:91:9e:da:bd:
+ 27:ee:e0:fd:64:ea:7d:35:91:fd:5e:1e:33:82:24:39:7b:49:
+ af:23:05:fc:6e:53:7e:07:69:f4:e7:e3:1f:f0:1c:59:87:4c:
+ b6:74:c9:60:ed:f5:ab:a0:31:8a:05:d4:64:9f:1e:16:b6:9f:
+ f8:7e:0d:ac:b7:d9:16:b9:b3:bc:0b:03:6b:24:e9:46:81:dc:
+ d8:52:63:75
-----BEGIN CERTIFICATE-----
-MIIDkDCCAnigAwIBAgIGC5iU9aumMA0GCSqGSIb3DQEBBQUAMGcxCzAJBgNVBAYT
+MIIDkjCCAnqgAwIBAgIGDPpgvFFAMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
-IENsb3VkMSUwIwYDVQQDDBxOb3RoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yMB4X
-DTEwMDUyNzIxMzY0NloXDTI2MTAzMDIxMzY0NlowZzELMAkGA1UEBhMCTk4xMTAv
-BgNVBAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQx
-JTAjBgNVBAMMHE5vdGhlcm4gTm93aGVyZSBUcnVzdCBBbmNob3IwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBqQrvdgZ9/ng68Q5AbcJbro+Nf/DViZ5C
-KvAXlNkuZ8ctARyVo7GmhtQSPEc6cOZ7HxEG03Ou38okGQPkYgrrZ9Tc750t4IJ3
-/iowWvtX5bhPNlJML1etEmqUPuRIp62lwDrQTgCZiI+9SnC+O1tr/15vKW0Mp1VK
-4kPnSQ+ZVFlogTTYqfvIDRRaQMtwHvU7wEI5BvljrdkpFFOvQhAdGJW2FYrYQdg3
-MQqXWhsQkKwd/25xM2t+iBgg7b41/+dpSAXAeC4ERvTCjU1wbkL6k+vOEjvR9c4/
-KVyMvVmD5KHBPI4+OFXzmRiw3/Z0yY4o9DgNRSDW28BzouaMbpifAgMBAAGjQjBA
-MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBStPuI5
-B7hcqiaQlEwmaSGD4k42lDANBgkqhkiG9w0BAQUFAAOCAQEAhh+d3UURyGvxlxrw
-JbIM9x9YxGqlVgcyyy16jK5HHn3nc2w7lh51tOWJBad+tlJWWuJrOOQYPGRvvr3T
-AXa0g396HpzLQBua3UPLmtuK+HZQq62Ff886b0viJ7CMqQrg2EUABV4pq6CKeOUJ
-iUiKDUJJHq3ChS8pna8uyO+53HQz6+lF6aKzALp2C3RZyaiWTPPNmzRaSoeyalJ0
-W77zgfgy0B/JzJ+Kautu820sVCCG9odiwO1VA52XqVquOaB+5KaV6SYZkeYPthj3
-SWynzv3BBML5JydMWem/evZloNmgcaZUxm+aXSMZV0lZLAaRPiibwW/yLZokpwva
-zczzvA==
+IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
+Fw0xNTAzMjExNTA3MTFaFw0zMTA4MjQxNTA3MTFaMGgxCzAJBgNVBAYTAk5OMTEw
+LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
+MSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjCCASIwDQYJ
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBAOFM2XQapKNCV6R6LnQCCElqah3b3sND
+1khgEjDt1m50FoEWTlC5bLk2DRmk94WZQEYmRjOGzgwnceSPD7Q6mW2veEi3y8TT
+YH3QF28jvInAvBa4lPCyEI3I4DWX7Y/G25vNqvaMRdwP7qB4Er72ffT3toxO5X0y
+6Pf3HgRGngjNy+zimsM1P86hAeMQCuzZqxMJ6+Y5a5Iwxwi9ijLvC7JhbxFDlc8x
+6hkBzBpt0tVXNdrArkY50zPt+MAerT1ob6hTJKzW+d0rUVB35LddrUiAXWVX5esH
+gn3Lck8GajTUOMhr7Yo6aF4143gU2l2Gn+XUHN2QwnyiANSVZQSF/4MCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLK
+uktGBKd1iizoDlSUvBJlpnvOMA0GCSqGSIb3DQEBBQUAA4IBAQDU0CIZeC4uHYPG
+eYnBqCNDToZ2FjG9t8BELLkseZkvAkgzHqfXDtnxy+05GjSzUK/JjWS//3IbHeBd
+QDu1AHzReP9F7tkFPzL2zfTTeVjYRJRl9cOpXdgT2VfnExj683ILz6NK9G5edDA8
+y3Yo+USauj63PgF5Pstc31rUbDSqvcBtJYXlKPYV4Z2vp/enbCodHZMeiXFmxwvk
+zjbBIcRzXSskqT0m3xzoYGnjgpjDW5Ge2r0n7uD9ZOp9NZH9Xh4zgiQ5e0mvIwX8
+blN+B2n05+Mf8BxZh0y2dMlg7fWroDGKBdRknx4Wtp/4fg2st9kWubO8CwNrJOlG
+gdzYUmN1
-----END CERTIFICATE-----
diff --git a/tests/certs/EdelCurlRoot-ca.crt b/tests/certs/EdelCurlRoot-ca.crt
index 8bcbc180..d3ec4d35 100644
--- a/tests/certs/EdelCurlRoot-ca.crt
+++ b/tests/certs/EdelCurlRoot-ca.crt
@@ -1,42 +1,41 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number:
- 0b:98:94:f5:ab:a6
- Signature Algorithm: sha1WithRSAEncryption
+ Serial Number: 14269504311616 (0xcfa60bc5140)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Validity
- Not Before: May 27 21:36:46 2010 GMT
- Not After : Oct 30 21:36:46 2026 GMT
+ Not Before: Mar 21 15:07:11 2015 GMT
+ Not After : Aug 24 15:07:11 2031 GMT
Subject:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
- 00:c1:a9:0a:ef:76:06:7d:fe:78:3a:f1:0e:40:6d:
- c2:5b:ae:8f:8d:7f:f0:d5:89:9e:42:2a:f0:17:94:
- d9:2e:67:c7:2d:01:1c:95:a3:b1:a6:86:d4:12:3c:
- 47:3a:70:e6:7b:1f:11:06:d3:73:ae:df:ca:24:19:
- 03:e4:62:0a:eb:67:d4:dc:ef:9d:2d:e0:82:77:fe:
- 2a:30:5a:fb:57:e5:b8:4f:36:52:4c:2f:57:ad:12:
- 6a:94:3e:e4:48:a7:ad:a5:c0:3a:d0:4e:00:99:88:
- 8f:bd:4a:70:be:3b:5b:6b:ff:5e:6f:29:6d:0c:a7:
- 55:4a:e2:43:e7:49:0f:99:54:59:68:81:34:d8:a9:
- fb:c8:0d:14:5a:40:cb:70:1e:f5:3b:c0:42:39:06:
- f9:63:ad:d9:29:14:53:af:42:10:1d:18:95:b6:15:
- 8a:d8:41:d8:37:31:0a:97:5a:1b:10:90:ac:1d:ff:
- 6e:71:33:6b:7e:88:18:20:ed:be:35:ff:e7:69:48:
- 05:c0:78:2e:04:46:f4:c2:8d:4d:70:6e:42:fa:93:
- eb:ce:12:3b:d1:f5:ce:3f:29:5c:8c:bd:59:83:e4:
- a1:c1:3c:8e:3e:38:55:f3:99:18:b0:df:f6:74:c9:
- 8e:28:f4:38:0d:45:20:d6:db:c0:73:a2:e6:8c:6e:
- 98:9f
+ 00:e1:4c:d9:74:1a:a4:a3:42:57:a4:7a:2e:74:02:
+ 08:49:6a:6a:1d:db:de:c3:43:d6:48:60:12:30:ed:
+ d6:6e:74:16:81:16:4e:50:b9:6c:b9:36:0d:19:a4:
+ f7:85:99:40:46:26:46:33:86:ce:0c:27:71:e4:8f:
+ 0f:b4:3a:99:6d:af:78:48:b7:cb:c4:d3:60:7d:d0:
+ 17:6f:23:bc:89:c0:bc:16:b8:94:f0:b2:10:8d:c8:
+ e0:35:97:ed:8f:c6:db:9b:cd:aa:f6:8c:45:dc:0f:
+ ee:a0:78:12:be:f6:7d:f4:f7:b6:8c:4e:e5:7d:32:
+ e8:f7:f7:1e:04:46:9e:08:cd:cb:ec:e2:9a:c3:35:
+ 3f:ce:a1:01:e3:10:0a:ec:d9:ab:13:09:eb:e6:39:
+ 6b:92:30:c7:08:bd:8a:32:ef:0b:b2:61:6f:11:43:
+ 95:cf:31:ea:19:01:cc:1a:6d:d2:d5:57:35:da:c0:
+ ae:46:39:d3:33:ed:f8:c0:1e:ad:3d:68:6f:a8:53:
+ 24:ac:d6:f9:dd:2b:51:50:77:e4:b7:5d:ad:48:80:
+ 5d:65:57:e5:eb:07:82:7d:cb:72:4f:06:6a:34:d4:
+ 38:c8:6b:ed:8a:3a:68:5e:35:e3:78:14:da:5d:86:
+ 9f:e5:d4:1c:dd:90:c2:7c:a2:00:d4:95:65:04:85:
+ ff:83
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints: critical
@@ -44,42 +43,42 @@ Certificate:
X509v3 Key Usage: critical
Certificate Sign, CRL Sign
X509v3 Subject Key Identifier:
- AD:3E:E2:39:07:B8:5C:AA:26:90:94:4C:26:69:21:83:E2:4E:36:94
+ 12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE
Signature Algorithm: sha1WithRSAEncryption
- 86:1f:9d:dd:45:11:c8:6b:f1:97:1a:f0:25:b2:0c:f7:1f:58:
- c4:6a:a5:56:07:32:cb:2d:7a:8c:ae:47:1e:7d:e7:73:6c:3b:
- 96:1e:75:b4:e5:89:05:a7:7e:b6:52:56:5a:e2:6b:38:e4:18:
- 3c:64:6f:be:bd:d3:01:76:b4:83:7f:7a:1e:9c:cb:40:1b:9a:
- dd:43:cb:9a:db:8a:f8:76:50:ab:ad:85:7f:cf:3a:6f:4b:e2:
- 27:b0:8c:a9:0a:e0:d8:45:00:05:5e:29:ab:a0:8a:78:e5:09:
- 89:48:8a:0d:42:49:1e:ad:c2:85:2f:29:9d:af:2e:c8:ef:b9:
- dc:74:33:eb:e9:45:e9:a2:b3:00:ba:76:0b:74:59:c9:a8:96:
- 4c:f3:cd:9b:34:5a:4a:87:b2:6a:52:74:5b:be:f3:81:f8:32:
- d0:1f:c9:cc:9f:8a:6a:eb:6e:f3:6d:2c:54:20:86:f6:87:62:
- c0:ed:55:03:9d:97:a9:5a:ae:39:a0:7e:e4:a6:95:e9:26:19:
- 91:e6:0f:b6:18:f7:49:6c:a7:ce:fd:c1:04:c2:f9:27:27:4c:
- 59:e9:bf:7a:f6:65:a0:d9:a0:71:a6:54:c6:6f:9a:5d:23:19:
- 57:49:59:2c:06:91:3e:28:9b:c1:6f:f2:2d:9a:24:a7:0b:da:
- cd:cc:f3:bc
+ d4:d0:22:19:78:2e:2e:1d:83:c6:79:89:c1:a8:23:43:4e:86:
+ 76:16:31:bd:b7:c0:44:2c:b9:2c:79:99:2f:02:48:33:1e:a7:
+ d7:0e:d9:f1:cb:ed:39:1a:34:b3:50:af:c9:8d:64:bf:ff:72:
+ 1b:1d:e0:5d:40:3b:b5:00:7c:d1:78:ff:45:ee:d9:05:3f:32:
+ f6:cd:f4:d3:79:58:d8:44:94:65:f5:c3:a9:5d:d8:13:d9:57:
+ e7:13:18:fa:f3:72:0b:cf:a3:4a:f4:6e:5e:74:30:3c:cb:76:
+ 28:f9:44:9a:ba:3e:b7:3e:01:79:3e:cb:5c:df:5a:d4:6c:34:
+ aa:bd:c0:6d:25:85:e5:28:f6:15:e1:9d:af:a7:f7:a7:6c:2a:
+ 1d:1d:93:1e:89:71:66:c7:0b:e4:ce:36:c1:21:c4:73:5d:2b:
+ 24:a9:3d:26:df:1c:e8:60:69:e3:82:98:c3:5b:91:9e:da:bd:
+ 27:ee:e0:fd:64:ea:7d:35:91:fd:5e:1e:33:82:24:39:7b:49:
+ af:23:05:fc:6e:53:7e:07:69:f4:e7:e3:1f:f0:1c:59:87:4c:
+ b6:74:c9:60:ed:f5:ab:a0:31:8a:05:d4:64:9f:1e:16:b6:9f:
+ f8:7e:0d:ac:b7:d9:16:b9:b3:bc:0b:03:6b:24:e9:46:81:dc:
+ d8:52:63:75
-----BEGIN CERTIFICATE-----
-MIIDkDCCAnigAwIBAgIGC5iU9aumMA0GCSqGSIb3DQEBBQUAMGcxCzAJBgNVBAYT
+MIIDkjCCAnqgAwIBAgIGDPpgvFFAMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
-IENsb3VkMSUwIwYDVQQDDBxOb3RoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yMB4X
-DTEwMDUyNzIxMzY0NloXDTI2MTAzMDIxMzY0NlowZzELMAkGA1UEBhMCTk4xMTAv
-BgNVBAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQx
-JTAjBgNVBAMMHE5vdGhlcm4gTm93aGVyZSBUcnVzdCBBbmNob3IwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBqQrvdgZ9/ng68Q5AbcJbro+Nf/DViZ5C
-KvAXlNkuZ8ctARyVo7GmhtQSPEc6cOZ7HxEG03Ou38okGQPkYgrrZ9Tc750t4IJ3
-/iowWvtX5bhPNlJML1etEmqUPuRIp62lwDrQTgCZiI+9SnC+O1tr/15vKW0Mp1VK
-4kPnSQ+ZVFlogTTYqfvIDRRaQMtwHvU7wEI5BvljrdkpFFOvQhAdGJW2FYrYQdg3
-MQqXWhsQkKwd/25xM2t+iBgg7b41/+dpSAXAeC4ERvTCjU1wbkL6k+vOEjvR9c4/
-KVyMvVmD5KHBPI4+OFXzmRiw3/Z0yY4o9DgNRSDW28BzouaMbpifAgMBAAGjQjBA
-MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBStPuI5
-B7hcqiaQlEwmaSGD4k42lDANBgkqhkiG9w0BAQUFAAOCAQEAhh+d3UURyGvxlxrw
-JbIM9x9YxGqlVgcyyy16jK5HHn3nc2w7lh51tOWJBad+tlJWWuJrOOQYPGRvvr3T
-AXa0g396HpzLQBua3UPLmtuK+HZQq62Ff886b0viJ7CMqQrg2EUABV4pq6CKeOUJ
-iUiKDUJJHq3ChS8pna8uyO+53HQz6+lF6aKzALp2C3RZyaiWTPPNmzRaSoeyalJ0
-W77zgfgy0B/JzJ+Kautu820sVCCG9odiwO1VA52XqVquOaB+5KaV6SYZkeYPthj3
-SWynzv3BBML5JydMWem/evZloNmgcaZUxm+aXSMZV0lZLAaRPiibwW/yLZokpwva
-zczzvA==
+IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
+Fw0xNTAzMjExNTA3MTFaFw0zMTA4MjQxNTA3MTFaMGgxCzAJBgNVBAYTAk5OMTEw
+LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
+MSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjCCASIwDQYJ
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBAOFM2XQapKNCV6R6LnQCCElqah3b3sND
+1khgEjDt1m50FoEWTlC5bLk2DRmk94WZQEYmRjOGzgwnceSPD7Q6mW2veEi3y8TT
+YH3QF28jvInAvBa4lPCyEI3I4DWX7Y/G25vNqvaMRdwP7qB4Er72ffT3toxO5X0y
+6Pf3HgRGngjNy+zimsM1P86hAeMQCuzZqxMJ6+Y5a5Iwxwi9ijLvC7JhbxFDlc8x
+6hkBzBpt0tVXNdrArkY50zPt+MAerT1ob6hTJKzW+d0rUVB35LddrUiAXWVX5esH
+gn3Lck8GajTUOMhr7Yo6aF4143gU2l2Gn+XUHN2QwnyiANSVZQSF/4MCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLK
+uktGBKd1iizoDlSUvBJlpnvOMA0GCSqGSIb3DQEBBQUAA4IBAQDU0CIZeC4uHYPG
+eYnBqCNDToZ2FjG9t8BELLkseZkvAkgzHqfXDtnxy+05GjSzUK/JjWS//3IbHeBd
+QDu1AHzReP9F7tkFPzL2zfTTeVjYRJRl9cOpXdgT2VfnExj683ILz6NK9G5edDA8
+y3Yo+USauj63PgF5Pstc31rUbDSqvcBtJYXlKPYV4Z2vp/enbCodHZMeiXFmxwvk
+zjbBIcRzXSskqT0m3xzoYGnjgpjDW5Ge2r0n7uD9ZOp9NZH9Xh4zgiQ5e0mvIwX8
+blN+B2n05+Mf8BxZh0y2dMlg7fWroDGKBdRknx4Wtp/4fg2st9kWubO8CwNrJOlG
+gdzYUmN1
-----END CERTIFICATE-----
diff --git a/tests/certs/EdelCurlRoot-ca.csr b/tests/certs/EdelCurlRoot-ca.csr
index 2df94f57..7d5e3001 100644
--- a/tests/certs/EdelCurlRoot-ca.csr
+++ b/tests/certs/EdelCurlRoot-ca.csr
@@ -1,17 +1,17 @@
-----BEGIN CERTIFICATE REQUEST-----
-MIICrDCCAZQCAQAwZzELMAkGA1UEBhMCTk4xMTAvBgNVBAoMKEVkZWwgQ3VybCBB
-cmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQxJTAjBgNVBAMMHE5vdGhlcm4g
-Tm93aGVyZSBUcnVzdCBBbmNob3IwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
-AoIBAQDBqQrvdgZ9/ng68Q5AbcJbro+Nf/DViZ5CKvAXlNkuZ8ctARyVo7GmhtQS
-PEc6cOZ7HxEG03Ou38okGQPkYgrrZ9Tc750t4IJ3/iowWvtX5bhPNlJML1etEmqU
-PuRIp62lwDrQTgCZiI+9SnC+O1tr/15vKW0Mp1VK4kPnSQ+ZVFlogTTYqfvIDRRa
-QMtwHvU7wEI5BvljrdkpFFOvQhAdGJW2FYrYQdg3MQqXWhsQkKwd/25xM2t+iBgg
-7b41/+dpSAXAeC4ERvTCjU1wbkL6k+vOEjvR9c4/KVyMvVmD5KHBPI4+OFXzmRiw
-3/Z0yY4o9DgNRSDW28BzouaMbpifAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEA
-eFMy55kFke/e9mrGloRUh1o8dxmzSiVwVCw5DTZQzTFNAMSOZXIId8k2IeHSUd84
-ZyJ1UNyJn2EFcwgaYaMtvZ8xMWR2W0C7lBvOOcjvWmiGze9F2Z5XMQzL8cjkK4jW
-RKIq9b0W6TC8lLO5F2eJpW6BoTQ8cBCDiVIDlCm7xZxPRjHowuyM0Tpewq2PltC1
-p8DbQipZWl5LPaHBSZSmIuUgOBU9porH/Vn0oWXxYfts59103VJY5YKkdz0PiqqA
-5kWYCMFDZyL+nZ2aIol4r8nXkN9MuPOU12aHqPGcDlaGS2i5zfm2Ywsg110k+NCk
-AmqhjnrQjvJhif3rGO4+qw==
+MIICrTCCAZUCAQAwaDELMAkGA1UEBhMCTk4xMTAvBgNVBAoMKEVkZWwgQ3VybCBB
+cmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQxJjAkBgNVBAMMHU5vcnRoZXJu
+IE5vd2hlcmUgVHJ1c3QgQW5jaG9yMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEA4UzZdBqko0JXpHoudAIISWpqHdvew0PWSGASMO3WbnQWgRZOULlsuTYN
+GaT3hZlARiZGM4bODCdx5I8PtDqZba94SLfLxNNgfdAXbyO8icC8FriU8LIQjcjg
+NZftj8bbm82q9oxF3A/uoHgSvvZ99Pe2jE7lfTLo9/ceBEaeCM3L7OKawzU/zqEB
+4xAK7NmrEwnr5jlrkjDHCL2KMu8LsmFvEUOVzzHqGQHMGm3S1Vc12sCuRjnTM+34
+wB6tPWhvqFMkrNb53StRUHfkt12tSIBdZVfl6weCfctyTwZqNNQ4yGvtijpoXjXj
+eBTaXYaf5dQc3ZDCfKIA1JVlBIX/gwIDAQABoAAwDQYJKoZIhvcNAQELBQADggEB
+ANpolqnyNQ2zhqURf1ImBOTKLqN77neGe01rdkMrQfNP+ZSr5pxcoOZgMjUGrhyQ
+C6RWexcjwMFvr+16bsEyiBgw/PxTziw6ozvJZkDVQanKZet9+6o8P6AzfjOfwIiU
+8OkLYDaNJ0M807fTNFWdt/yDY1WNfNAxIX3gMMJ1dRvvLvgIJVE4RRAaW/pEMHky
+sQTfExs99Xooqh3E6CWyR1bVHWuid0a02LcD2Q0bKTBmi3xyBjEaq3vXxS6j1fDs
+aWpwznwuuX+J7K+MHYJH9DQIg/QY6rQzxokZ92wJGFdzL3m+kou6++OAPu1plpTL
+im5n/e87gdjerEJgCqoP4S8=
-----END CERTIFICATE REQUEST-----
diff --git a/tests/certs/EdelCurlRoot-ca.der b/tests/certs/EdelCurlRoot-ca.der
index 1eaf4245..3f4ec7b0 100644
--- a/tests/certs/EdelCurlRoot-ca.der
+++ b/tests/certs/EdelCurlRoot-ca.der
Binary files differ
diff --git a/tests/certs/EdelCurlRoot-ca.key b/tests/certs/EdelCurlRoot-ca.key
index 9a1303af..bf46d1ec 100644
--- a/tests/certs/EdelCurlRoot-ca.key
+++ b/tests/certs/EdelCurlRoot-ca.key
@@ -1,27 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAwakK73YGff54OvEOQG3CW66PjX/w1YmeQirwF5TZLmfHLQEc
-laOxpobUEjxHOnDmex8RBtNzrt/KJBkD5GIK62fU3O+dLeCCd/4qMFr7V+W4TzZS
-TC9XrRJqlD7kSKetpcA60E4AmYiPvUpwvjtba/9ebyltDKdVSuJD50kPmVRZaIE0
-2Kn7yA0UWkDLcB71O8BCOQb5Y63ZKRRTr0IQHRiVthWK2EHYNzEKl1obEJCsHf9u
-cTNrfogYIO2+Nf/naUgFwHguBEb0wo1NcG5C+pPrzhI70fXOPylcjL1Zg+ShwTyO
-PjhV85kYsN/2dMmOKPQ4DUUg1tvAc6LmjG6YnwIDAQABAoIBAEQculXigwIJYCwK
-4GJUuEkaqi6wUvonvtuy0mLY3VHu+iSgAXe37SGOxkPro3mwf7/J+2kVMdjNqQDt
-M2s9+G03Ray3MecS0ZB2ekwrk78kcqCZkHRvKj0a/xVI0W2kW/SyGX1uEdPuLe/7
-oI+nvM3NMV+TiGEs8Vi3H/7WuX/JiEpBFNtgKqlT1ZdTblj+igrAT30on9FBfOyo
-NtkxIL7YY1TAZ7YjdpZWrAAyo7gBjXAmeslnJ9IHzKPBsuSXQ4A7JjGOAGyv3INi
-D8mwoa/8pNaZTxFCCRnvezA3JvVa4gWigZtb0JX5Z+H1nERZWoJq4Cj4kMa3ERuC
-iyVXijECgYEA4q5bkQTrQ7liRCrNETmbVspmbuBc6XaAFrYwbrxlzvl2nyumCgKg
-GaPeP2Skh5nPz+1x1EXmYAqXsAfLoE4z6kk1D1Ws4FWxxaAuwlWTmoJ2HXl2dcbR
-f0HLgQ/oswYtNVaP7HASmEf5Y3DeGLDrojh1aOE8kq/MpBHsO28qTA0CgYEA2rVV
-eTfj4VV5tpVlfiU5D947qIERVwIQ+FW8Epokwct1VgUeWwXMQFJFX6KWQdkB+Ktj
-vknBSrN+VmwBMMhuUTpMxvaZFL5UCyLUUt2K8azNDdg9FcfH8dSZnnNoo8aH9k6A
-v5gFk+QQ7VgGVBeLv22PG1zknj4SsGZhzx9H0FsCgYB/8uq8cIpbL8jHsWEO1/VW
-h+hJrVrEbJ7gMvYjizPsH+NU9M5D2DeGQXixT52O7MLgGqalqs7eZxw3wC6vzXSA
-SdIpVbK+7Z/qbP/3sVYfYIRLHsQ+tnqJ2hmEP/aZFmNuN+4FBz13tyiNeKfkR/i5
-GCUtjfUi1xgrg/JTmevGAQKBgQC9QEh0Gj7gj9xAeEpYu9ECwCUTjIv6pFkW6ulR
-l3zTDUG9a7R2wy+ZQReyx7gJxsSD75rh4GSYRXW/RrpJAkcjlrU1PdH9Nyz2be8Y
-vYgr1IGjx0gkfrmvs24yxF75ySOBqTCTmfLJpIJZPuBLCAzvWtiIrvtNSx1U82MT
-nVfBHQKBgDJZQmr5lqdo5Zv/VP+w+VtxeX2oCgw7Mn56TW4IzDEL6ly+sKNNs+Ji
-pp/c2XYw24o7318yV70oWVWscay1SOjK7RdoCat590iuTGMSYyY8pMkgK+QuDqDe
-1Hhyb0iPorMS5wZXx/TROS4+4GOIHLAtZOZ8B+20tczp7HGqUIK1
+MIIEpAIBAAKCAQEA4UzZdBqko0JXpHoudAIISWpqHdvew0PWSGASMO3WbnQWgRZO
+ULlsuTYNGaT3hZlARiZGM4bODCdx5I8PtDqZba94SLfLxNNgfdAXbyO8icC8FriU
+8LIQjcjgNZftj8bbm82q9oxF3A/uoHgSvvZ99Pe2jE7lfTLo9/ceBEaeCM3L7OKa
+wzU/zqEB4xAK7NmrEwnr5jlrkjDHCL2KMu8LsmFvEUOVzzHqGQHMGm3S1Vc12sCu
+RjnTM+34wB6tPWhvqFMkrNb53StRUHfkt12tSIBdZVfl6weCfctyTwZqNNQ4yGvt
+ijpoXjXjeBTaXYaf5dQc3ZDCfKIA1JVlBIX/gwIDAQABAoIBAQDGGcWGgjrLVnUr
+qUcZOARDUW9XK9IWjZpn7xlvrmECo8552Lwp3LDNtcoVB2mhLhxG0jad7eVU6IYL
+ewNK7M+lk0lHX1yrh1Trq0I/tgN8eFyp+cj0Tw2hLcR/O0RmTGsi9tdhi/uNQPEI
+ZivNf31HHVyEyIae7FnOVpotFk6022EElQd8F8GeeKpo9pQs8sHAVOUVC8Mf2sr+
+bFyo9nzU0XkSay72ozU9O5Iw2d5aVrN5f3NS+JG9OpzvouNwkaAMOUsLVvZlUTqY
+0ve5CY2rB3D72h4GJfM2aHi8hwj56yBOsyIhBSXNYJM8nXKEbJaK5ulVv/a7KKTk
+KzSdk/mJAoGBAPXPLLJgx0mZKXNXqSvSsvgVzcpLrJh8figoF4rMzq8+5bN9Y6KU
+Lvb2ODIm/oGCIiGDdFTYqBJ0/EpauaAJgdzIwYnMZXmVB97pmwni9KrDPDwWTOqS
+3Yzh0t4C8DAgwZE4X6Ad/fmn7V06dfJZZJynL9exPp8RF7ptJ2yOnlbdAoGBAOqk
+AfRWuPGeZL9rFkd45+j03MDHglE2xKhsbRobHANItHo7r26D/Ov7QkM+lGlqdrNg
+tTPPtHs50Ek+Sb0X31/Fj45IqQroxctpbZAaJchVl88tvKXA8fkk14a9GLiow3Bk
+UGA5DFRmsIMXEengzRJoxcHAbbciGWdeSneH49nfAoGAVMypHcyXU8Ob8ieuu+iP
+R1i2SvC6VUy1dQMHxCGNuBVZxwcd5Ut7vEUK8/pR2LndLnScIF0x9lQXaUtNOHGv
+NEypv/EcnMoWEgfDLbD3OSXrVMtYs6ABAIYzadXXqLLUNFYfXyyZnpQZJg1x/S5r
+sENZFO8XrGaIKg9YB3JYG50CgYBUQweMpmQOKNKHRz6d9hZaOyzXcg4jeiaPUTiw
+6lFaAI8HYk2yw2VdnUKDgYKshJYR/sWz0IBAzFc3Jk42wM7vxrOx5fgGuebmEHtP
+B4TP96TnusYHRE3hKdDYSyoIjlp5Dx0qIPKDkMkMmolNUvRyCvwRgzgjTvSOgXb+
+i+dQQwKBgQCKn04xYbhkMOiHxNP/DUf6+XmV1V7KbpjIySychbxcTKCV98c9q491
+YjF8FJgi2JdV5XOHWaKti2Qg/tYz7CBtqkQdeNjtfKkOUA8ZyZeiNZdPIza9tzmr
+t6mCthH1oT3jyiddhSYxyfUBW3olPhBPj8YBblmq1QHE8y2j3CNjvw==
-----END RSA PRIVATE KEY-----
diff --git a/tests/certs/EdelCurlRoot-ca.prm b/tests/certs/EdelCurlRoot-ca.prm
index 4c53ef51..d0eff489 100644
--- a/tests/certs/EdelCurlRoot-ca.prm
+++ b/tests/certs/EdelCurlRoot-ca.prm
@@ -10,7 +10,7 @@ countryName_value = NN
organizationName = "Organization Name"
organizationName_value = Edel Curl Arctic Illudium Research Cloud
commonName = "Common Name"
-commonName_value = Nothern Nowhere Trust Anchor
+commonName_value = Northern Nowhere Trust Anchor
[ x509v3 ]
basicConstraints = critical,CA:true
keyUsage = critical,keyCertSign,cRLSign
diff --git a/tests/certs/Makefile.am b/tests/certs/Makefile.am
new file mode 100644
index 00000000..bd0bbbb7
--- /dev/null
+++ b/tests/certs/Makefile.am
@@ -0,0 +1,91 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = scripts
+
+CERTCONFIGS = \
+ EdelCurlRoot-ca.prm \
+ EdelCurlRoot-ca.cnf \
+ Server-localhost-sv.prm \
+ Server-localhost.nn-sv.prm \
+ Server-localhost0h-sv.prm
+
+GENERATEDCERTS = \
+ EdelCurlRoot-ca.cacert \
+ EdelCurlRoot-ca.crt \
+ EdelCurlRoot-ca.csr \
+ EdelCurlRoot-ca.der \
+ EdelCurlRoot-ca.key \
+ Server-localhost-sv.crl \
+ Server-localhost-sv.crt \
+ Server-localhost-sv.csr \
+ Server-localhost-sv.der \
+ Server-localhost-sv.dhp \
+ Server-localhost-sv.key \
+ Server-localhost-sv.pem \
+ 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 \
+ Server-localhost.nn-sv.der \
+ Server-localhost.nn-sv.dhp \
+ Server-localhost.nn-sv.key \
+ Server-localhost.nn-sv.pem \
+ Server-localhost.nn-sv.pub.der \
+ Server-localhost.nn-sv.pub.pem \
+ Server-localhost0h-sv.crl \
+ Server-localhost0h-sv.crt \
+ Server-localhost0h-sv.csr \
+ Server-localhost0h-sv.der \
+ Server-localhost0h-sv.dhp \
+ Server-localhost0h-sv.key \
+ Server-localhost0h-sv.pem \
+ Server-localhost0h-sv.pub.der \
+ Server-localhost0h-sv.pub.pem
+
+SRPFILES = \
+ srp-verifier-conf \
+ srp-verifier-db
+
+EXTRA_DIST = $(CERTCONFIGS) $(GENERATEDCERTS) $(SRPFILES)
+
+# Rebuild the certificates
+
+clean-certs:
+ cd $(srcdir); rm -f $(GENERATEDCERTS)
+
+build-certs: $(srcdir)/EdelCurlRoot-ca.cacert $(srcdir)/Server-localhost-sv.pem \
+ $(srcdir)/Server-localhost.nn-sv.pem $(srcdir)/Server-localhost0h-sv.pem
+
+$(srcdir)/EdelCurlRoot-ca.cacert:
+ cd $(srcdir); scripts/genroot.sh EdelCurlRoot
+
+$(srcdir)/Server-localhost-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
+ cd $(srcdir); scripts/genserv.sh Server-localhost EdelCurlRoot
+
+$(srcdir)/Server-localhost.nn-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
+ cd $(srcdir); scripts/genserv.sh Server-localhost.nn EdelCurlRoot
+
+$(srcdir)/Server-localhost0h-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
+ cd $(srcdir); scripts/genserv.sh Server-localhost0h EdelCurlRoot
diff --git a/tests/certs/Server-localhost-sv.crl b/tests/certs/Server-localhost-sv.crl
index 804655d0..3e75229b 100644
--- a/tests/certs/Server-localhost-sv.crl
+++ b/tests/certs/Server-localhost-sv.crl
@@ -1,12 +1,21 @@
-----BEGIN X509 CRL-----
-MIIB2zCBxAIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJOTjExMC8GA1UE
-CgwoRWRlbCBDdXJsIEFyY3RpYyBJbGx1ZGl1bSBSZXNlYXJjaCBDbG91ZDElMCMG
-A1UEAwwcTm90aGVybiBOb3doZXJlIFRydXN0IEFuY2hvchcNMTAwNTI3MjEzNzEx
-WhcNMTAwNjI2MjEzNzExWjAZMBcCBguYlPl8ahcNMTAwNTI3MjEzNzExWqAOMAww
-CgYDVR0UBAMCAQEwDQYJKoZIhvcNAQEFBQADggEBAFuPZJ/cNNCeAzkSxVvPPPRX
-Wsv9T6Dt61C5Fmq9eSNN2kRf7/dq5A5nqTIlHbXXiLdj3UqNhUHXe2oA1UpbdHz9
-0JlfwWm1Y/gMr1fh1n0oFebEtCuOgDRpd07Uiz8AqOUBykDNDUlMvVwR9raHL8hj
-NRwzugsfIxl0CvLLqrBpUWMxW3qemk4cWW39yrDdZgKo6eOZAOR3FQYlLIrw6Jcr
-Kmm0PjdcJIfRgJvNysgyx1dIIKe7QXvFTR/QzdHWIWTkiYIW7wUKSzSICvDCr094
-eo3nr3n9BtOqT61Z1m6FGCP6Mm0wFl6xLTCNd6ygfFo7pcAdWlUsdBgKzics0Kc=
+MIIDbzCCAlcCAQEwDQYJKoZIhvcNAQEFBQAwaDELMAkGA1UEBhMCTk4xMTAvBgNV
+BAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQxJjAk
+BgNVBAMMHU5vcnRoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yFw0xNTAzMjExNTA3
+MTFaFw0xNTA0MjAxNTA3MTFaMIIBqTAXAgYM+ly45CIXDTE1MDMyMTEzMTQ1N1ow
+FwIGDPpcwXH8Fw0xNTAzMjExMzE1NTNaMBcCBgz6XO7ujBcNMTUwMzIxMTMyMDUx
+WjAXAgYM+lzu7p0XDTE1MDMyMTEzMjA1MVowFwIGDPpc7u6uFw0xNTAzMjExMzIw
+NTFaMBcCBgz6XZyD1RcNMTUwMzIxMTMzOTQ5WjAXAgYM+l4OXa8XDTE1MDMyMTEz
+NTIxNVowFwIGDPpeJlPZFw0xNTAzMjExMzU0NTJaMBcCBgz6XiZT6hcNMTUwMzIx
+MTM1NDUyWjAXAgYM+l4mU/sXDTE1MDMyMTEzNTQ1MlowFwIGDPpemKKEFw0xNTAz
+MjExNDA3MjFaMBcCBgz6XpiilRcNMTUwMzIxMTQwNzIxWjAXAgYM+l6YoqYXDTE1
+MDMyMTE0MDcyMVowFwIGDPpffssxFw0xNTAzMjExNDMyMzBaMBcCBgz6X37yUxcN
+MTUwMzIxMTQzMjMxWjAXAgYM+l9+8mYXDTE1MDMyMTE0MzIzMVowFwIGDPpgvFFL
+Fw0xNTAzMjExNTA3MTFaoA4wDDAKBgNVHRQEAwIBATANBgkqhkiG9w0BAQUFAAOC
+AQEAllslrhWUoq49PC+KQghVDAeFREP3pKPUlSebVVR8PCtCKrFtc53dUaTl8qhK
+1wOLodr80lfr2kEgzTEDt2CfXryl3orLPeMWe0OWTBsPbuwj+d7m3uq4B43laqJn
+JM5ebRvzHWMJkVNkwiXiadPTW5ZMUqu2Bs97rdcjklUrEcamf9aMLqb6sPGtU4EO
+o/GxGW2eypYwncFmzAc5W3NDRePGPhN5rUDfqm5Id4T9FKmGcNmI7qlLQi+jp23F
+V6RvrqANIemopQQ4kYGy7pzilDYm6+R+fPCIh2H/0eqCDY8NdjygXtWW+pJ58axV
+MPZ2mFPcH5UHiqmi8kRstnA8KQ==
-----END X509 CRL-----
diff --git a/tests/certs/Server-localhost-sv.crt b/tests/certs/Server-localhost-sv.crt
index 9a3d9449..abf69245 100644
--- a/tests/certs/Server-localhost-sv.crt
+++ b/tests/certs/Server-localhost-sv.crt
@@ -1,16 +1,15 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number:
- 0b:98:94:f9:7c:6a
- Signature Algorithm: sha1WithRSAEncryption
+ Serial Number: 14269504311627 (0xcfa60bc514b)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Validity
- Not Before: May 27 21:37:11 2010 GMT
- Not After : Aug 13 21:37:11 2018 GMT
+ Not Before: Mar 21 15:07:11 2015 GMT
+ Not After : Jun 7 15:07:11 2023 GMT
Subject:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
@@ -19,63 +18,63 @@ Certificate:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:b0:27:79:26:2c:b9:e4:d1:81:0a:09:d2:76:fe:
- 9a:e1:05:68:01:b3:72:77:97:38:e4:60:1c:71:9d:
- 99:f7:26:7b:21:b5:6d:aa:9f:14:76:07:6c:a4:2a:
- 2d:7d:ee:f6:6f:8a:58:c4:93:de:fe:a1:25:0f:ff:
- 57:49:c0:d9:94:d9:07:79:bf:8c:6d:fa:f1:18:82:
- 67:a0:3f:d7:31:03:82:ec:b9:39:69:07:ec:ec:93:
- 17:5b:1a:72:91:93:b2:6b:98:66:63:fe:61:29:e7:
- ad:86:0e:04:ba:bf:8b:55:57:61:a5:4a:f6:ca:e7:
- c6:d1:b8:65:42:ab:67:64:17
+ 00:ba:5f:4b:69:74:31:99:4d:f4:b4:b7:2a:65:b8:
+ b7:31:c1:38:cf:36:37:bb:5e:18:e3:52:1f:52:aa:
+ 5a:25:2f:0c:66:88:32:b0:ef:b2:2c:90:38:5e:6e:
+ 6f:0e:e4:3b:3f:f0:2e:f1:7a:3d:5e:c3:64:86:3f:
+ 68:b7:cf:0b:b3:ea:0a:ca:94:16:d4:2b:6a:02:e3:
+ a1:b3:c7:d1:d0:06:b8:ff:df:dc:e0:32:2a:e7:dd:
+ 62:cc:71:c4:e8:cf:9d:de:5c:75:69:9d:b6:ce:e2:
+ 42:d8:a7:bd:50:54:78:2d:55:67:7f:00:7b:8f:9c:
+ 11:d1:9e:ce:be:1e:fe:cf:37
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:localhost
X509v3 Key Usage:
- Key Encipherment
+ Digital Signature, Key Encipherment, Key Agreement
X509v3 Extended Key Usage:
TLS Web Server Authentication
X509v3 Subject Key Identifier:
- BC:69:86:84:70:3A:AD:DE:08:2A:70:C6:3B:47:8C:11:3F:E0:9A:6D
+ 7E:42:8D:AC:2E:93:AD:4C:E0:09:AC:C6:08:F1:82:E0:B7:B7:C6:7F
X509v3 Authority Key Identifier:
- keyid:AD:3E:E2:39:07:B8:5C:AA:26:90:94:4C:26:69:21:83:E2:4E:36:94
+ keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE
- X509v3 Basic Constraints: critical
+ X509v3 Basic Constraints:
CA:FALSE
Signature Algorithm: sha1WithRSAEncryption
- 7b:f0:b0:a0:d9:d0:91:38:9b:fe:cf:78:c8:d6:30:5d:87:9d:
- b3:b9:6e:8b:5a:73:74:93:cb:30:49:d1:00:79:9d:5a:c2:71:
- a3:93:5f:de:d3:5a:0c:fb:6d:41:83:89:1b:4f:0d:1c:65:0c:
- 1a:0c:0f:96:79:62:90:e1:74:04:dd:c6:d8:cf:0f:5f:0f:28:
- 87:d7:86:56:90:b4:d0:88:80:f1:a7:cd:fd:0b:13:58:bb:6d:
- e6:ab:44:f6:9b:d6:cc:c7:db:3d:3a:90:c4:20:72:f4:38:38:
- c0:ef:80:1d:60:3f:4e:30:40:11:56:29:70:aa:17:91:90:5f:
- 70:0b:89:51:af:17:a8:ed:20:4e:76:bb:cf:a8:88:9a:25:0f:
- 3a:96:26:17:50:2a:af:f3:8b:21:9c:cf:ff:f9:20:fc:fe:c0:
- 37:95:c7:cd:0d:7a:53:d9:26:12:38:2c:f6:03:95:1b:da:d0:
- 08:f7:32:91:07:a7:35:0c:14:00:44:c7:43:fb:23:2e:14:44:
- e6:ee:a9:c9:20:37:09:b8:ae:21:4f:4b:b7:86:4d:e3:41:84:
- 15:4e:1a:29:00:03:a8:92:99:3c:75:ea:43:0f:e3:2b:f7:17:
- b1:1b:87:80:04:d3:a7:73:b1:5e:85:38:7d:89:01:16:19:f6:
- c4:e1:1b:75
+ 00:fe:c4:fc:4b:28:b8:bc:39:8c:6f:f1:72:d3:76:da:28:27:
+ e2:97:94:bb:ad:2f:91:c4:db:df:33:4b:48:4e:97:5b:4c:4c:
+ be:fc:e4:b7:19:5c:b8:83:6e:ef:2c:b0:d5:7c:fc:0d:cb:7e:
+ 29:ed:fd:4d:ef:05:1c:89:15:31:78:9b:18:29:d3:37:83:c7:
+ 39:f4:78:27:b7:00:75:d1:fb:f0:29:88:79:e4:e9:a7:d4:65:
+ 04:bf:d5:a1:dc:05:b2:17:c4:a9:da:61:10:22:5f:8f:50:fc:
+ 1f:ab:f6:39:dd:ab:35:a6:94:54:63:5c:6d:25:f0:dc:3a:0a:
+ 70:4e:49:ef:be:fa:2c:0a:cd:ce:a6:2d:26:cd:f8:24:89:77:
+ 2c:ea:6e:19:b6:5c:8c:1a:08:ea:a8:9f:2c:1b:c7:fc:13:6c:
+ fe:a7:90:08:e5:98:83:30:52:86:ac:83:0b:cb:25:92:21:94:
+ 80:13:d7:e8:d0:42:56:83:55:d3:09:9b:e8:c5:96:82:15:64:
+ 6b:83:77:eb:99:e5:52:dc:1b:36:29:a0:c9:da:8b:d3:0d:77:
+ 24:f2:c3:df:2e:c4:93:e0:34:47:a9:9b:54:d3:75:d5:c7:de:
+ 88:a1:ef:7b:40:2f:dc:e9:28:8c:69:be:eb:71:4a:c2:30:50:
+ 99:36:52:69
-----BEGIN CERTIFICATE-----
-MIIDQTCCAimgAwIBAgIGC5iU+XxqMA0GCSqGSIb3DQEBBQUAMGcxCzAJBgNVBAYT
+MIIDPzCCAiegAwIBAgIGDPpgvFFLMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
-IENsb3VkMSUwIwYDVQQDDBxOb3RoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yMB4X
-DTEwMDUyNzIxMzcxMVoXDTE4MDgxMzIxMzcxMVowVDELMAkGA1UEBhMCTk4xMTAv
-BgNVBAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQx
-EjAQBgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-sCd5Jiy55NGBCgnSdv6a4QVoAbNyd5c45GAccZ2Z9yZ7IbVtqp8UdgdspCotfe72
-b4pYxJPe/qElD/9XScDZlNkHeb+MbfrxGIJnoD/XMQOC7Lk5aQfs7JMXWxpykZOy
-a5hmY/5hKeethg4Eur+LVVdhpUr2yufG0bhlQqtnZBcCAwEAAaOBiTCBhjAUBgNV
-HREEDTALgglsb2NhbGhvc3QwCwYDVR0PBAQDAgUgMBMGA1UdJQQMMAoGCCsGAQUF
-BwMBMB0GA1UdDgQWBBS8aYaEcDqt3ggqcMY7R4wRP+CabTAfBgNVHSMEGDAWgBSt
-PuI5B7hcqiaQlEwmaSGD4k42lDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBQUA
-A4IBAQB78LCg2dCROJv+z3jI1jBdh52zuW6LWnN0k8swSdEAeZ1awnGjk1/e01oM
-+21Bg4kbTw0cZQwaDA+WeWKQ4XQE3cbYzw9fDyiH14ZWkLTQiIDxp839CxNYu23m
-q0T2m9bMx9s9OpDEIHL0ODjA74AdYD9OMEARVilwqheRkF9wC4lRrxeo7SBOdrvP
-qIiaJQ86liYXUCqv84shnM//+SD8/sA3lcfNDXpT2SYSOCz2A5Ub2tAI9zKRB6c1
-DBQARMdD+yMuFETm7qnJIDcJuK4hT0u3hk3jQYQVThopAAOokpk8depDD+Mr9xex
-G4eABNOnc7FehTh9iQEWGfbE4Rt1
+IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
+Fw0xNTAzMjExNTA3MTFaFw0yMzA2MDcxNTA3MTFaMFQxCzAJBgNVBAYTAk5OMTEw
+LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
+MRIwEAYDVQQDDAlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
+ALpfS2l0MZlN9LS3KmW4tzHBOM82N7teGONSH1KqWiUvDGaIMrDvsiyQOF5ubw7k
+Oz/wLvF6PV7DZIY/aLfPC7PqCsqUFtQragLjobPH0dAGuP/f3OAyKufdYsxxxOjP
+nd5cdWmdts7iQtinvVBUeC1VZ38Ae4+cEdGezr4e/s83AgMBAAGjgYYwgYMwFAYD
+VR0RBA0wC4IJbG9jYWxob3N0MAsGA1UdDwQEAwIDqDATBgNVHSUEDDAKBggrBgEF
+BQcDATAdBgNVHQ4EFgQUfkKNrC6TrUzgCazGCPGC4Le3xn8wHwYDVR0jBBgwFoAU
+Esq6S0YEp3WKLOgOVJS8EmWme84wCQYDVR0TBAIwADANBgkqhkiG9w0BAQUFAAOC
+AQEAAP7E/EsouLw5jG/xctN22ign4peUu60vkcTb3zNLSE6XW0xMvvzktxlcuINu
+7yyw1Xz8Dct+Ke39Te8FHIkVMXibGCnTN4PHOfR4J7cAddH78CmIeeTpp9RlBL/V
+odwFshfEqdphECJfj1D8H6v2Od2rNaaUVGNcbSXw3DoKcE5J7776LArNzqYtJs34
+JIl3LOpuGbZcjBoI6qifLBvH/BNs/qeQCOWYgzBShqyDC8slkiGUgBPX6NBCVoNV
+0wmb6MWWghVka4N365nlUtwbNimgydqL0w13JPLD3y7Ek+A0R6mbVNN11cfeiKHv
+e0Av3OkojGm+63FKwjBQmTZSaQ==
-----END CERTIFICATE-----
diff --git a/tests/certs/Server-localhost-sv.csr b/tests/certs/Server-localhost-sv.csr
index a8773f55..f919409b 100644
--- a/tests/certs/Server-localhost-sv.csr
+++ b/tests/certs/Server-localhost-sv.csr
@@ -1,11 +1,11 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIBkzCB/QIBADBUMQswCQYDVQQGEwJOTjExMC8GA1UECgwoRWRlbCBDdXJsIEFy
Y3RpYyBJbGx1ZGl1bSBSZXNlYXJjaCBDbG91ZDESMBAGA1UEAwwJbG9jYWxob3N0
-MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwJ3kmLLnk0YEKCdJ2/prhBWgB
-s3J3lzjkYBxxnZn3JnshtW2qnxR2B2ykKi197vZviljEk97+oSUP/1dJwNmU2Qd5
-v4xt+vEYgmegP9cxA4LsuTlpB+zskxdbGnKRk7JrmGZj/mEp562GDgS6v4tVV2Gl
-SvbK58bRuGVCq2dkFwIDAQABoAAwDQYJKoZIhvcNAQELBQADgYEAlIivGkhU8iph
-eZQAaiwakIwPx1TPA3+Dl4tbStTr3Ludd8rjZMGPRXKU+wjvfhCmDlyk90yOun2C
-lPIT8W/ibXNgRF1vz+eFofjM0hZtNPOX4G18wwD5y0OTr7obyqJPKAZsJZh6L3YE
-aARr27RCoFv92hFwVr181wAU+bVCekA=
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6X0tpdDGZTfS0typluLcxwTjP
+Nje7XhjjUh9SqlolLwxmiDKw77IskDhebm8O5Ds/8C7xej1ew2SGP2i3zwuz6grK
+lBbUK2oC46Gzx9HQBrj/39zgMirn3WLMccToz53eXHVpnbbO4kLYp71QVHgtVWd/
+AHuPnBHRns6+Hv7PNwIDAQABoAAwDQYJKoZIhvcNAQELBQADgYEAsJ+ypJAE5YiR
+A1niVNXKoqXmIQsXGJv9BA39AjT+cdqvdd+WTKCaZ9QXucDArhG9B9Dp66bfSgvT
+WVz6F85ju5HQekZrS2ZxdR1+muWAFE/vDgi22QwTysXvTWUfsqBQ0ZGEmdzyPJJq
+7AGzbAWx8JDhgGg2jStvQJBLhtYxhoY=
-----END CERTIFICATE REQUEST-----
diff --git a/tests/certs/Server-localhost-sv.der b/tests/certs/Server-localhost-sv.der
index 766cf539..b76db9dd 100644
--- a/tests/certs/Server-localhost-sv.der
+++ b/tests/certs/Server-localhost-sv.der
Binary files differ
diff --git a/tests/certs/Server-localhost-sv.dhp b/tests/certs/Server-localhost-sv.dhp
index b61c28b8..e69de29b 100644
--- a/tests/certs/Server-localhost-sv.dhp
+++ b/tests/certs/Server-localhost-sv.dhp
@@ -1,5 +0,0 @@
------BEGIN DH PARAMETERS-----
-MIGHAoGBAP5mA7oYimErFUulbvNC8V0HwyB62NCj6TZb6YXJwElCksQc8RyHnkrY
-9Wx2+lduFqHjUWalgVF7Gma7CfR/pt+fiU6Jn2vWR2v7KT6hYeRKsJrONJlth+NK
-V7/d4zyvleJ/VSp0TuuSxmMMQ6hG3i5YhSGXyCh4h0pl4Wu/hdVTAgEC
------END DH PARAMETERS-----
diff --git a/tests/certs/Server-localhost-sv.key b/tests/certs/Server-localhost-sv.key
index 8ade26aa..35401791 100644
--- a/tests/certs/Server-localhost-sv.key
+++ b/tests/certs/Server-localhost-sv.key
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQCwJ3kmLLnk0YEKCdJ2/prhBWgBs3J3lzjkYBxxnZn3JnshtW2q
-nxR2B2ykKi197vZviljEk97+oSUP/1dJwNmU2Qd5v4xt+vEYgmegP9cxA4LsuTlp
-B+zskxdbGnKRk7JrmGZj/mEp562GDgS6v4tVV2GlSvbK58bRuGVCq2dkFwIDAQAB
-AoGBAKa0JHWZHC9MiSa71t5f4qiTGjOJ5AkDJocR4bkv4dZAJ4TmEqvGsnFkY08U
-z0p/i95Q+eLG4eDtFYsHJU8Z343odktK99BUJzkDzqWT9RMzJ5Ykx6LbldJyW5NN
-IwvhDuW3rq8fbCMr+NGe9chc1Rg2lrfeEJDwjki/drBQs7zpAkEA3R6QEcuST7Gq
-JzjfU9uLD2tHLYZFNzS4dm4PvwC2aK7OdEOm7VkXFwUyP97QjwPV7fabrQ2QjwGg
-ek+nVEdH9QJBAMvxFickez9eqgiMfZbfY8t5I+Dxz69ZVGsPvl/6xhiUvgxjREM7
-EnScf86HwlBnteoUtMptAKu7Dbq5inPbkFsCQCV8FuRNZGJKNhQsGf/3Sd21S/21
-s2omb9bz1YuFrWaVq74d8eBup/FpGhmlxilYdx2+Hqn5kLYNiozxj+ZDpzkCQQC8
-7VJAYKNsSR3rXXra0Yd5b3e1Y02qe26g36zU7VOmYeTNRQhv38FxFamwgkOYiPsV
-Jql0/RWqAVburAN+4OARAkB9FwUtKyhs7FM4N9bXi+c8m42hkBv+dSim534tPijS
-UCcCONLEQTv4yjlCOwTKMVDoajkWH1A2e7psTmIR+zwc
+MIICXgIBAAKBgQC6X0tpdDGZTfS0typluLcxwTjPNje7XhjjUh9SqlolLwxmiDKw
+77IskDhebm8O5Ds/8C7xej1ew2SGP2i3zwuz6grKlBbUK2oC46Gzx9HQBrj/39zg
+Mirn3WLMccToz53eXHVpnbbO4kLYp71QVHgtVWd/AHuPnBHRns6+Hv7PNwIDAQAB
+AoGBAJdWRGVIPfJP1BJe3eWl3dRgI2JXk1/pY+pLSDYXMIYbM0Wa+RamPRdksPE1
+WadM+zPLNENP0L+/iERe/wiq7sNxKQLwH5eE3tUxC+iC8GO6gQ2zHaWVNu3R79CM
+t8YZhlmG2o+xC4CGYzuITgPE16m24CYauLZHO/YVDzG6yNApAkEA6K0db5bZmIaU
+TJW/jEnPJSubDx8kE1YncTOAKaAeoJwaaSfFphVKNGNrZHu3jBhKFgVNBNxGUWrW
+0pIkDrb3hQJBAM0N7+ghZ/7vaOoKqYHQI2z8SgPsUjQjmubCBALe/Ys3kg9PPpyz
+umJSAOYjC4X1dSlkAkciJqRS0Y6uKgSH4osCQQCVIWftft1GsnNYxt43t5MKOvGu
+doIz1pN/LcgmZddbj9IptfErqxedjl9lzxnstCDADnO3+ssjIfxAiKSNvd3VAkA3
+3yFMTbXpZ9BdXPRc05qjeoasVPr9C+qMD7dKFPpesZCRrVTxG6OgYJmwG0JriLsY
+wRBB05NV2N8SknAOdfwLAkEAw5Hqxc/Xlh6xhy9tBdJXDtuptV10mg6EbO98x9/7
+gyuAArSguhXna+aRqjLRelCwVB9f9aZ1XVoDKWVCsnfCbQ==
-----END RSA PRIVATE KEY-----
diff --git a/tests/certs/Server-localhost-sv.p12 b/tests/certs/Server-localhost-sv.p12
deleted file mode 100644
index d7b8441a..00000000
--- a/tests/certs/Server-localhost-sv.p12
+++ /dev/null
Binary files differ
diff --git a/tests/certs/Server-localhost-sv.pem b/tests/certs/Server-localhost-sv.pem
index 86b48b34..6ef1fd51 100644
--- a/tests/certs/Server-localhost-sv.pem
+++ b/tests/certs/Server-localhost-sv.pem
@@ -1,11 +1,11 @@
extensions = x509v3
[ x509v3 ]
subjectAltName = DNS:localhost
-keyUsage = keyEncipherment
+keyUsage = keyEncipherment,digitalSignature,keyAgreement
extendedKeyUsage = serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
-basicConstraints = critical,CA:false
+basicConstraints = CA:false
[ req ]
default_bits = 1024
distinguished_name = req_DN
@@ -24,33 +24,32 @@ commonName_value = localhost
# the certficate
# some dhparam
-----BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQCwJ3kmLLnk0YEKCdJ2/prhBWgBs3J3lzjkYBxxnZn3JnshtW2q
-nxR2B2ykKi197vZviljEk97+oSUP/1dJwNmU2Qd5v4xt+vEYgmegP9cxA4LsuTlp
-B+zskxdbGnKRk7JrmGZj/mEp562GDgS6v4tVV2GlSvbK58bRuGVCq2dkFwIDAQAB
-AoGBAKa0JHWZHC9MiSa71t5f4qiTGjOJ5AkDJocR4bkv4dZAJ4TmEqvGsnFkY08U
-z0p/i95Q+eLG4eDtFYsHJU8Z343odktK99BUJzkDzqWT9RMzJ5Ykx6LbldJyW5NN
-IwvhDuW3rq8fbCMr+NGe9chc1Rg2lrfeEJDwjki/drBQs7zpAkEA3R6QEcuST7Gq
-JzjfU9uLD2tHLYZFNzS4dm4PvwC2aK7OdEOm7VkXFwUyP97QjwPV7fabrQ2QjwGg
-ek+nVEdH9QJBAMvxFickez9eqgiMfZbfY8t5I+Dxz69ZVGsPvl/6xhiUvgxjREM7
-EnScf86HwlBnteoUtMptAKu7Dbq5inPbkFsCQCV8FuRNZGJKNhQsGf/3Sd21S/21
-s2omb9bz1YuFrWaVq74d8eBup/FpGhmlxilYdx2+Hqn5kLYNiozxj+ZDpzkCQQC8
-7VJAYKNsSR3rXXra0Yd5b3e1Y02qe26g36zU7VOmYeTNRQhv38FxFamwgkOYiPsV
-Jql0/RWqAVburAN+4OARAkB9FwUtKyhs7FM4N9bXi+c8m42hkBv+dSim534tPijS
-UCcCONLEQTv4yjlCOwTKMVDoajkWH1A2e7psTmIR+zwc
+MIICXgIBAAKBgQC6X0tpdDGZTfS0typluLcxwTjPNje7XhjjUh9SqlolLwxmiDKw
+77IskDhebm8O5Ds/8C7xej1ew2SGP2i3zwuz6grKlBbUK2oC46Gzx9HQBrj/39zg
+Mirn3WLMccToz53eXHVpnbbO4kLYp71QVHgtVWd/AHuPnBHRns6+Hv7PNwIDAQAB
+AoGBAJdWRGVIPfJP1BJe3eWl3dRgI2JXk1/pY+pLSDYXMIYbM0Wa+RamPRdksPE1
+WadM+zPLNENP0L+/iERe/wiq7sNxKQLwH5eE3tUxC+iC8GO6gQ2zHaWVNu3R79CM
+t8YZhlmG2o+xC4CGYzuITgPE16m24CYauLZHO/YVDzG6yNApAkEA6K0db5bZmIaU
+TJW/jEnPJSubDx8kE1YncTOAKaAeoJwaaSfFphVKNGNrZHu3jBhKFgVNBNxGUWrW
+0pIkDrb3hQJBAM0N7+ghZ/7vaOoKqYHQI2z8SgPsUjQjmubCBALe/Ys3kg9PPpyz
+umJSAOYjC4X1dSlkAkciJqRS0Y6uKgSH4osCQQCVIWftft1GsnNYxt43t5MKOvGu
+doIz1pN/LcgmZddbj9IptfErqxedjl9lzxnstCDADnO3+ssjIfxAiKSNvd3VAkA3
+3yFMTbXpZ9BdXPRc05qjeoasVPr9C+qMD7dKFPpesZCRrVTxG6OgYJmwG0JriLsY
+wRBB05NV2N8SknAOdfwLAkEAw5Hqxc/Xlh6xhy9tBdJXDtuptV10mg6EbO98x9/7
+gyuAArSguhXna+aRqjLRelCwVB9f9aZ1XVoDKWVCsnfCbQ==
-----END RSA PRIVATE KEY-----
Certificate:
Data:
Version: 3 (0x2)
- Serial Number:
- 0b:98:94:f9:7c:6a
- Signature Algorithm: sha1WithRSAEncryption
+ Serial Number: 14269504311627 (0xcfa60bc514b)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Validity
- Not Before: May 27 21:37:11 2010 GMT
- Not After : Aug 13 21:37:11 2018 GMT
+ Not Before: Mar 21 15:07:11 2015 GMT
+ Not After : Jun 7 15:07:11 2023 GMT
Subject:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
@@ -59,68 +58,63 @@ Certificate:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:b0:27:79:26:2c:b9:e4:d1:81:0a:09:d2:76:fe:
- 9a:e1:05:68:01:b3:72:77:97:38:e4:60:1c:71:9d:
- 99:f7:26:7b:21:b5:6d:aa:9f:14:76:07:6c:a4:2a:
- 2d:7d:ee:f6:6f:8a:58:c4:93:de:fe:a1:25:0f:ff:
- 57:49:c0:d9:94:d9:07:79:bf:8c:6d:fa:f1:18:82:
- 67:a0:3f:d7:31:03:82:ec:b9:39:69:07:ec:ec:93:
- 17:5b:1a:72:91:93:b2:6b:98:66:63:fe:61:29:e7:
- ad:86:0e:04:ba:bf:8b:55:57:61:a5:4a:f6:ca:e7:
- c6:d1:b8:65:42:ab:67:64:17
+ 00:ba:5f:4b:69:74:31:99:4d:f4:b4:b7:2a:65:b8:
+ b7:31:c1:38:cf:36:37:bb:5e:18:e3:52:1f:52:aa:
+ 5a:25:2f:0c:66:88:32:b0:ef:b2:2c:90:38:5e:6e:
+ 6f:0e:e4:3b:3f:f0:2e:f1:7a:3d:5e:c3:64:86:3f:
+ 68:b7:cf:0b:b3:ea:0a:ca:94:16:d4:2b:6a:02:e3:
+ a1:b3:c7:d1:d0:06:b8:ff:df:dc:e0:32:2a:e7:dd:
+ 62:cc:71:c4:e8:cf:9d:de:5c:75:69:9d:b6:ce:e2:
+ 42:d8:a7:bd:50:54:78:2d:55:67:7f:00:7b:8f:9c:
+ 11:d1:9e:ce:be:1e:fe:cf:37
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:localhost
X509v3 Key Usage:
- Key Encipherment
+ Digital Signature, Key Encipherment, Key Agreement
X509v3 Extended Key Usage:
TLS Web Server Authentication
X509v3 Subject Key Identifier:
- BC:69:86:84:70:3A:AD:DE:08:2A:70:C6:3B:47:8C:11:3F:E0:9A:6D
+ 7E:42:8D:AC:2E:93:AD:4C:E0:09:AC:C6:08:F1:82:E0:B7:B7:C6:7F
X509v3 Authority Key Identifier:
- keyid:AD:3E:E2:39:07:B8:5C:AA:26:90:94:4C:26:69:21:83:E2:4E:36:94
+ keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE
- X509v3 Basic Constraints: critical
+ X509v3 Basic Constraints:
CA:FALSE
Signature Algorithm: sha1WithRSAEncryption
- 7b:f0:b0:a0:d9:d0:91:38:9b:fe:cf:78:c8:d6:30:5d:87:9d:
- b3:b9:6e:8b:5a:73:74:93:cb:30:49:d1:00:79:9d:5a:c2:71:
- a3:93:5f:de:d3:5a:0c:fb:6d:41:83:89:1b:4f:0d:1c:65:0c:
- 1a:0c:0f:96:79:62:90:e1:74:04:dd:c6:d8:cf:0f:5f:0f:28:
- 87:d7:86:56:90:b4:d0:88:80:f1:a7:cd:fd:0b:13:58:bb:6d:
- e6:ab:44:f6:9b:d6:cc:c7:db:3d:3a:90:c4:20:72:f4:38:38:
- c0:ef:80:1d:60:3f:4e:30:40:11:56:29:70:aa:17:91:90:5f:
- 70:0b:89:51:af:17:a8:ed:20:4e:76:bb:cf:a8:88:9a:25:0f:
- 3a:96:26:17:50:2a:af:f3:8b:21:9c:cf:ff:f9:20:fc:fe:c0:
- 37:95:c7:cd:0d:7a:53:d9:26:12:38:2c:f6:03:95:1b:da:d0:
- 08:f7:32:91:07:a7:35:0c:14:00:44:c7:43:fb:23:2e:14:44:
- e6:ee:a9:c9:20:37:09:b8:ae:21:4f:4b:b7:86:4d:e3:41:84:
- 15:4e:1a:29:00:03:a8:92:99:3c:75:ea:43:0f:e3:2b:f7:17:
- b1:1b:87:80:04:d3:a7:73:b1:5e:85:38:7d:89:01:16:19:f6:
- c4:e1:1b:75
+ 00:fe:c4:fc:4b:28:b8:bc:39:8c:6f:f1:72:d3:76:da:28:27:
+ e2:97:94:bb:ad:2f:91:c4:db:df:33:4b:48:4e:97:5b:4c:4c:
+ be:fc:e4:b7:19:5c:b8:83:6e:ef:2c:b0:d5:7c:fc:0d:cb:7e:
+ 29:ed:fd:4d:ef:05:1c:89:15:31:78:9b:18:29:d3:37:83:c7:
+ 39:f4:78:27:b7:00:75:d1:fb:f0:29:88:79:e4:e9:a7:d4:65:
+ 04:bf:d5:a1:dc:05:b2:17:c4:a9:da:61:10:22:5f:8f:50:fc:
+ 1f:ab:f6:39:dd:ab:35:a6:94:54:63:5c:6d:25:f0:dc:3a:0a:
+ 70:4e:49:ef:be:fa:2c:0a:cd:ce:a6:2d:26:cd:f8:24:89:77:
+ 2c:ea:6e:19:b6:5c:8c:1a:08:ea:a8:9f:2c:1b:c7:fc:13:6c:
+ fe:a7:90:08:e5:98:83:30:52:86:ac:83:0b:cb:25:92:21:94:
+ 80:13:d7:e8:d0:42:56:83:55:d3:09:9b:e8:c5:96:82:15:64:
+ 6b:83:77:eb:99:e5:52:dc:1b:36:29:a0:c9:da:8b:d3:0d:77:
+ 24:f2:c3:df:2e:c4:93:e0:34:47:a9:9b:54:d3:75:d5:c7:de:
+ 88:a1:ef:7b:40:2f:dc:e9:28:8c:69:be:eb:71:4a:c2:30:50:
+ 99:36:52:69
-----BEGIN CERTIFICATE-----
-MIIDQTCCAimgAwIBAgIGC5iU+XxqMA0GCSqGSIb3DQEBBQUAMGcxCzAJBgNVBAYT
+MIIDPzCCAiegAwIBAgIGDPpgvFFLMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
-IENsb3VkMSUwIwYDVQQDDBxOb3RoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yMB4X
-DTEwMDUyNzIxMzcxMVoXDTE4MDgxMzIxMzcxMVowVDELMAkGA1UEBhMCTk4xMTAv
-BgNVBAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQx
-EjAQBgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-sCd5Jiy55NGBCgnSdv6a4QVoAbNyd5c45GAccZ2Z9yZ7IbVtqp8UdgdspCotfe72
-b4pYxJPe/qElD/9XScDZlNkHeb+MbfrxGIJnoD/XMQOC7Lk5aQfs7JMXWxpykZOy
-a5hmY/5hKeethg4Eur+LVVdhpUr2yufG0bhlQqtnZBcCAwEAAaOBiTCBhjAUBgNV
-HREEDTALgglsb2NhbGhvc3QwCwYDVR0PBAQDAgUgMBMGA1UdJQQMMAoGCCsGAQUF
-BwMBMB0GA1UdDgQWBBS8aYaEcDqt3ggqcMY7R4wRP+CabTAfBgNVHSMEGDAWgBSt
-PuI5B7hcqiaQlEwmaSGD4k42lDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBQUA
-A4IBAQB78LCg2dCROJv+z3jI1jBdh52zuW6LWnN0k8swSdEAeZ1awnGjk1/e01oM
-+21Bg4kbTw0cZQwaDA+WeWKQ4XQE3cbYzw9fDyiH14ZWkLTQiIDxp839CxNYu23m
-q0T2m9bMx9s9OpDEIHL0ODjA74AdYD9OMEARVilwqheRkF9wC4lRrxeo7SBOdrvP
-qIiaJQ86liYXUCqv84shnM//+SD8/sA3lcfNDXpT2SYSOCz2A5Ub2tAI9zKRB6c1
-DBQARMdD+yMuFETm7qnJIDcJuK4hT0u3hk3jQYQVThopAAOokpk8depDD+Mr9xex
-G4eABNOnc7FehTh9iQEWGfbE4Rt1
+IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
+Fw0xNTAzMjExNTA3MTFaFw0yMzA2MDcxNTA3MTFaMFQxCzAJBgNVBAYTAk5OMTEw
+LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
+MRIwEAYDVQQDDAlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
+ALpfS2l0MZlN9LS3KmW4tzHBOM82N7teGONSH1KqWiUvDGaIMrDvsiyQOF5ubw7k
+Oz/wLvF6PV7DZIY/aLfPC7PqCsqUFtQragLjobPH0dAGuP/f3OAyKufdYsxxxOjP
+nd5cdWmdts7iQtinvVBUeC1VZ38Ae4+cEdGezr4e/s83AgMBAAGjgYYwgYMwFAYD
+VR0RBA0wC4IJbG9jYWxob3N0MAsGA1UdDwQEAwIDqDATBgNVHSUEDDAKBggrBgEF
+BQcDATAdBgNVHQ4EFgQUfkKNrC6TrUzgCazGCPGC4Le3xn8wHwYDVR0jBBgwFoAU
+Esq6S0YEp3WKLOgOVJS8EmWme84wCQYDVR0TBAIwADANBgkqhkiG9w0BAQUFAAOC
+AQEAAP7E/EsouLw5jG/xctN22ign4peUu60vkcTb3zNLSE6XW0xMvvzktxlcuINu
+7yyw1Xz8Dct+Ke39Te8FHIkVMXibGCnTN4PHOfR4J7cAddH78CmIeeTpp9RlBL/V
+odwFshfEqdphECJfj1D8H6v2Od2rNaaUVGNcbSXw3DoKcE5J7776LArNzqYtJs34
+JIl3LOpuGbZcjBoI6qifLBvH/BNs/qeQCOWYgzBShqyDC8slkiGUgBPX6NBCVoNV
+0wmb6MWWghVka4N365nlUtwbNimgydqL0w13JPLD3y7Ek+A0R6mbVNN11cfeiKHv
+e0Av3OkojGm+63FKwjBQmTZSaQ==
-----END CERTIFICATE-----
------BEGIN DH PARAMETERS-----
-MIGHAoGBAP5mA7oYimErFUulbvNC8V0HwyB62NCj6TZb6YXJwElCksQc8RyHnkrY
-9Wx2+lduFqHjUWalgVF7Gma7CfR/pt+fiU6Jn2vWR2v7KT6hYeRKsJrONJlth+NK
-V7/d4zyvleJ/VSp0TuuSxmMMQ6hG3i5YhSGXyCh4h0pl4Wu/hdVTAgEC
------END DH PARAMETERS-----
diff --git a/tests/certs/Server-localhost-sv.prm b/tests/certs/Server-localhost-sv.prm
index 6351025d..97e64cec 100644
--- a/tests/certs/Server-localhost-sv.prm
+++ b/tests/certs/Server-localhost-sv.prm
@@ -1,11 +1,11 @@
extensions = x509v3
[ x509v3 ]
subjectAltName = DNS:localhost
-keyUsage = keyEncipherment
+keyUsage = keyEncipherment,digitalSignature,keyAgreement
extendedKeyUsage = serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
-basicConstraints = critical,CA:false
+basicConstraints = CA:false
[ req ]
default_bits = 1024
distinguished_name = req_DN
diff --git a/tests/certs/Server-localhost-sv.pub.der b/tests/certs/Server-localhost-sv.pub.der
new file mode 100644
index 00000000..e954839e
--- /dev/null
+++ b/tests/certs/Server-localhost-sv.pub.der
Binary files differ
diff --git a/tests/certs/Server-localhost-sv.pub.pem b/tests/certs/Server-localhost-sv.pub.pem
new file mode 100644
index 00000000..d119616b
--- /dev/null
+++ b/tests/certs/Server-localhost-sv.pub.pem
@@ -0,0 +1,6 @@
+-----BEGIN PUBLIC KEY-----
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6X0tpdDGZTfS0typluLcxwTjP
+Nje7XhjjUh9SqlolLwxmiDKw77IskDhebm8O5Ds/8C7xej1ew2SGP2i3zwuz6grK
+lBbUK2oC46Gzx9HQBrj/39zgMirn3WLMccToz53eXHVpnbbO4kLYp71QVHgtVWd/
+AHuPnBHRns6+Hv7PNwIDAQAB
+-----END PUBLIC KEY-----
diff --git a/tests/certs/Server-localhost.nn-sv.crl b/tests/certs/Server-localhost.nn-sv.crl
index db408315..0676f731 100644
--- a/tests/certs/Server-localhost.nn-sv.crl
+++ b/tests/certs/Server-localhost.nn-sv.crl
@@ -1,13 +1,21 @@
-----BEGIN X509 CRL-----
-MIIB9DCB3QIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJOTjExMC8GA1UE
-CgwoRWRlbCBDdXJsIEFyY3RpYyBJbGx1ZGl1bSBSZXNlYXJjaCBDbG91ZDElMCMG
-A1UEAwwcTm90aGVybiBOb3doZXJlIFRydXN0IEFuY2hvchcNMTAwNTI3MjEzNzI0
-WhcNMTAwNjI2MjEzNzI0WjAyMBcCBguYlPl8ahcNMTAwNTI3MjEzNzExWjAXAgYL
-mJT7eF8XDTEwMDUyNzIxMzcyNFqgDjAMMAoGA1UdFAQDAgEBMA0GCSqGSIb3DQEB
-BQUAA4IBAQCo8mBpkZqiYWJMkJsZ1qqqOqVRne4iWhPOJSDGDgxoCTA4RgN1sQUv
-/MxO2LgSEyo9GopCpgWlhig+wzQmYCUf7HDw8sLzClUG4XUKRSW2Uq6q5BF5fwIu
-vHksi/RIPdcMx/+3dGIFeoccZZd5o7xgryGySAN6wHy6lY7LeeW7acpaDU43D7yi
-wQipBczrlH/jJDy6ja5FFBrAvvyRc4zC2X1/Rh3f0vNqnX9PLC524HxRmasCKYM8
-vgcPbvJ7Z/HRGOYRu9vTp5X0+lPPj24WE8vX3AZdjyI6qpinHzrsYen/qs6c0v3k
-FKYuzuVlUAy+5aZDhx+GHr+KW+y2T/ol
+MIIDiDCCAnACAQEwDQYJKoZIhvcNAQEFBQAwaDELMAkGA1UEBhMCTk4xMTAvBgNV
+BAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQxJjAk
+BgNVBAMMHU5vcnRoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yFw0xNTAzMjExNTA3
+MTFaFw0xNTA0MjAxNTA3MTFaMIIBwjAXAgYM+ly45CIXDTE1MDMyMTEzMTQ1N1ow
+FwIGDPpcwXH8Fw0xNTAzMjExMzE1NTNaMBcCBgz6XO7ujBcNMTUwMzIxMTMyMDUx
+WjAXAgYM+lzu7p0XDTE1MDMyMTEzMjA1MVowFwIGDPpc7u6uFw0xNTAzMjExMzIw
+NTFaMBcCBgz6XZyD1RcNMTUwMzIxMTMzOTQ5WjAXAgYM+l4OXa8XDTE1MDMyMTEz
+NTIxNVowFwIGDPpeJlPZFw0xNTAzMjExMzU0NTJaMBcCBgz6XiZT6hcNMTUwMzIx
+MTM1NDUyWjAXAgYM+l4mU/sXDTE1MDMyMTEzNTQ1MlowFwIGDPpemKKEFw0xNTAz
+MjExNDA3MjFaMBcCBgz6XpiilRcNMTUwMzIxMTQwNzIxWjAXAgYM+l6YoqYXDTE1
+MDMyMTE0MDcyMVowFwIGDPpffssxFw0xNTAzMjExNDMyMzBaMBcCBgz6X37yUxcN
+MTUwMzIxMTQzMjMxWjAXAgYM+l9+8mYXDTE1MDMyMTE0MzIzMVowFwIGDPpgvFFL
+Fw0xNTAzMjExNTA3MTFaMBcCBgz6YLxRXBcNMTUwMzIxMTUwNzExWqAOMAwwCgYD
+VR0UBAMCAQEwDQYJKoZIhvcNAQEFBQADggEBANd1Fp3lPmLALcGvEB4kB4Uo6vhM
+ZWcAUE96oerpW0OnZ6v7o8ghLvs/pJfIoD+7hV3RuAgUUBqv2N8VTaL2IYarom/H
+CK78oLrIwwej/7K1pIfG53bJuaYyim5Lpl/YzGwhdC2vO2kBXHC1gVj5hN3uM/2A
++cFPTDMsDU7szGq1bHObEKumXXzG5LfwGJGaHNGdvglV7zKthRjk/plYKE4/F0Ah
+jRQys6crClCKC5vug1GbzKbQue/Pbw1e3Rm/e0DVeOCREdvcHat43SIPf5yUYLsz
+b7P7pIOIoSgiIgEdbmj2pi1xdtxrYRyJJk0H7XQJHDehkyZsy6l62mKam/E=
-----END X509 CRL-----
diff --git a/tests/certs/Server-localhost.nn-sv.crt b/tests/certs/Server-localhost.nn-sv.crt
index 722aeeb1..69bd40d2 100644
--- a/tests/certs/Server-localhost.nn-sv.crt
+++ b/tests/certs/Server-localhost.nn-sv.crt
@@ -1,16 +1,15 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number:
- 0b:98:94:fb:78:5f
- Signature Algorithm: sha1WithRSAEncryption
+ Serial Number: 14269504311644 (0xcfa60bc515c)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Validity
- Not Before: May 27 21:37:24 2010 GMT
- Not After : Aug 13 21:37:24 2018 GMT
+ Not Before: Mar 21 15:07:11 2015 GMT
+ Not After : Jun 7 15:07:11 2023 GMT
Subject:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
@@ -19,63 +18,63 @@ Certificate:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:d3:d4:4e:db:63:5c:3f:3a:3a:5e:38:09:94:e6:
- 4d:70:9d:0d:af:49:e6:82:5d:07:b7:f5:cd:a0:df:
- af:71:f1:cf:bf:d5:9a:bd:af:7c:78:5d:55:3f:14:
- bd:bb:2c:0e:73:9d:d6:82:9a:d5:e6:f6:21:5d:08:
- 92:a2:71:5f:80:5f:5c:ce:f0:c2:37:37:79:0f:4d:
- 3d:d4:f2:80:6d:47:36:45:d1:d2:8b:7a:2e:12:71:
- 4b:47:86:f5:8c:99:af:e7:0e:cf:b5:c9:4d:7a:75:
- f7:b2:74:0c:41:e3:ab:bb:2c:9d:6f:54:08:13:5a:
- 3a:ef:7c:27:f7:3f:0b:0b:71
+ 00:ac:cc:11:70:74:29:ed:7b:00:44:8a:c0:47:03:
+ 50:9d:6f:51:b7:c9:7b:dd:7e:ee:29:67:5b:91:9b:
+ c7:c5:e6:9d:59:3e:6b:33:25:b7:7c:39:7c:84:79:
+ dd:15:98:e7:27:63:93:10:3a:3a:40:a0:dd:d0:1e:
+ 6e:60:f4:1e:a4:f7:1e:0a:0b:84:44:77:e7:05:16:
+ 39:aa:de:bd:1e:c7:bc:c9:e1:4e:8c:86:1c:3f:d6:
+ cd:e3:f2:68:02:5b:17:53:49:51:29:a8:89:f3:d0:
+ e1:5e:71:07:9f:15:47:08:40:e9:ac:49:e4:21:ac:
+ 65:29:09:ca:a2:dc:9e:ab:89
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:localhost.nn
X509v3 Key Usage:
- Key Encipherment
+ Digital Signature, Key Encipherment, Key Agreement
X509v3 Extended Key Usage:
TLS Web Server Authentication
X509v3 Subject Key Identifier:
- 81:26:F9:75:CC:9C:2D:3C:36:64:68:41:F7:07:3C:66:86:E5:4A:C1
+ 12:AF:44:46:B1:04:69:61:64:83:39:A2:BD:5D:97:2B:F4:1D:D4:6C
X509v3 Authority Key Identifier:
- keyid:AD:3E:E2:39:07:B8:5C:AA:26:90:94:4C:26:69:21:83:E2:4E:36:94
+ keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE
- X509v3 Basic Constraints: critical
+ X509v3 Basic Constraints:
CA:FALSE
Signature Algorithm: sha1WithRSAEncryption
- 65:05:8c:48:14:58:8c:1a:d4:95:67:1c:29:52:ed:5a:6e:14:
- 41:bc:2b:16:20:c4:89:3a:6e:cb:c1:ff:ab:61:79:5f:ce:27:
- 93:3c:ff:29:7a:25:68:00:27:04:f3:68:17:30:f0:fd:ff:09:
- 0e:15:2a:25:b1:45:18:93:ab:12:8e:0c:13:11:9a:b8:a4:75:
- d0:17:1b:ca:f2:66:6b:73:15:dd:8b:bb:34:d6:70:dc:34:1b:
- e7:7a:30:ea:50:50:2f:88:67:b3:f8:b3:55:62:44:7e:3e:df:
- 59:4f:a8:57:83:40:9f:bf:52:bf:fd:2c:18:6e:bd:0c:41:b7:
- 78:1c:9b:fa:c4:ff:c3:2b:46:a4:8f:0c:19:a7:3d:75:81:29:
- 6b:cf:07:f0:1d:65:d4:0e:19:51:87:92:a8:3d:7e:80:04:84:
- ad:5e:4e:b6:ef:9a:02:c3:84:95:ec:c3:e8:a1:69:1f:42:cb:
- da:63:1a:35:6f:d0:ba:62:9e:73:36:63:58:0f:cc:25:c8:59:
- 73:df:3b:c2:b9:5a:da:3d:e1:3f:0a:1f:0f:41:c4:88:2d:92:
- 06:88:d4:54:81:e1:12:57:53:ab:6b:f8:c8:90:3e:30:4c:f5:
- 72:cf:f0:d4:18:70:c1:78:85:30:9c:fe:94:f4:1b:c2:6c:14:
- 49:7a:0e:27
+ 44:54:d7:d7:75:14:60:a5:1a:1d:1e:a9:dc:6f:b1:b1:d8:13:
+ e2:10:22:9a:f5:ca:b6:38:3c:d9:ac:2e:dc:ce:38:bc:cc:38:
+ a1:cc:a8:9c:73:37:f9:b6:a8:42:87:d9:80:21:45:81:43:9d:
+ 73:3c:67:cf:cd:c5:c3:91:df:60:6b:6d:69:f9:be:a1:92:cc:
+ 5d:ea:bc:67:f3:c7:bc:ea:41:d1:11:7b:e3:f1:b8:a7:8d:9a:
+ d0:23:6c:df:0e:2a:35:98:50:c1:a6:8b:d2:07:aa:a6:2f:cb:
+ 98:a9:a3:8d:a0:8c:87:ab:ec:e1:c5:0b:25:e2:e9:a9:08:13:
+ 30:86:1b:e5:b6:ac:03:85:35:0c:9a:5d:5b:82:c4:04:6a:05:
+ 4c:f3:f7:b3:b5:ac:92:3b:46:71:a8:7f:54:c7:96:37:dc:38:
+ 2c:a2:18:23:10:00:de:f8:21:40:52:99:94:ad:b2:b6:e5:87:
+ 8e:29:0b:3b:b3:8a:52:67:54:dc:0a:e9:75:60:33:ff:13:9a:
+ 61:a4:15:0c:d0:6f:de:0d:06:23:a8:44:ad:f0:68:60:93:6b:
+ 75:06:24:5b:47:9a:b9:3a:ef:d9:4f:df:31:d5:65:3a:e2:94:
+ 03:be:88:94:49:7c:6a:d0:da:c0:d0:62:81:f5:61:50:96:5a:
+ d0:ee:22:39
-----BEGIN CERTIFICATE-----
-MIIDRzCCAi+gAwIBAgIGC5iU+3hfMA0GCSqGSIb3DQEBBQUAMGcxCzAJBgNVBAYT
+MIIDRTCCAi2gAwIBAgIGDPpgvFFcMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
-IENsb3VkMSUwIwYDVQQDDBxOb3RoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yMB4X
-DTEwMDUyNzIxMzcyNFoXDTE4MDgxMzIxMzcyNFowVzELMAkGA1UEBhMCTk4xMTAv
-BgNVBAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQx
-FTATBgNVBAMMDGxvY2FsaG9zdC5ubjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
-gYEA09RO22NcPzo6XjgJlOZNcJ0Nr0nmgl0Ht/XNoN+vcfHPv9Wava98eF1VPxS9
-uywOc53WgprV5vYhXQiSonFfgF9czvDCNzd5D0091PKAbUc2RdHSi3ouEnFLR4b1
-jJmv5w7PtclNenX3snQMQeOruyydb1QIE1o673wn9z8LC3ECAwEAAaOBjDCBiTAX
-BgNVHREEEDAOggxsb2NhbGhvc3Qubm4wCwYDVR0PBAQDAgUgMBMGA1UdJQQMMAoG
-CCsGAQUFBwMBMB0GA1UdDgQWBBSBJvl1zJwtPDZkaEH3BzxmhuVKwTAfBgNVHSME
-GDAWgBStPuI5B7hcqiaQlEwmaSGD4k42lDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3
-DQEBBQUAA4IBAQBlBYxIFFiMGtSVZxwpUu1abhRBvCsWIMSJOm7Lwf+rYXlfzieT
-PP8peiVoACcE82gXMPD9/wkOFSolsUUYk6sSjgwTEZq4pHXQFxvK8mZrcxXdi7s0
-1nDcNBvnejDqUFAviGez+LNVYkR+Pt9ZT6hXg0Cfv1K//SwYbr0MQbd4HJv6xP/D
-K0akjwwZpz11gSlrzwfwHWXUDhlRh5KoPX6ABIStXk6275oCw4SV7MPooWkfQsva
-Yxo1b9C6Yp5zNmNYD8wlyFlz3zvCuVraPeE/Ch8PQcSILZIGiNRUgeESV1Ora/jI
-kD4wTPVyz/DUGHDBeIUwnP6U9BvCbBRJeg4n
+IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
+Fw0xNTAzMjExNTA3MTFaFw0yMzA2MDcxNTA3MTFaMFcxCzAJBgNVBAYTAk5OMTEw
+LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
+MRUwEwYDVQQDDAxsb2NhbGhvc3Qubm4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
+AoGBAKzMEXB0Ke17AESKwEcDUJ1vUbfJe91+7ilnW5Gbx8XmnVk+azMlt3w5fIR5
+3RWY5ydjkxA6OkCg3dAebmD0HqT3HgoLhER35wUWOarevR7HvMnhToyGHD/WzePy
+aAJbF1NJUSmoifPQ4V5xB58VRwhA6axJ5CGsZSkJyqLcnquJAgMBAAGjgYkwgYYw
+FwYDVR0RBBAwDoIMbG9jYWxob3N0Lm5uMAsGA1UdDwQEAwIDqDATBgNVHSUEDDAK
+BggrBgEFBQcDATAdBgNVHQ4EFgQUEq9ERrEEaWFkgzmivV2XK/Qd1GwwHwYDVR0j
+BBgwFoAUEsq6S0YEp3WKLOgOVJS8EmWme84wCQYDVR0TBAIwADANBgkqhkiG9w0B
+AQUFAAOCAQEARFTX13UUYKUaHR6p3G+xsdgT4hAimvXKtjg82awu3M44vMw4ocyo
+nHM3+baoQofZgCFFgUOdczxnz83Fw5HfYGttafm+oZLMXeq8Z/PHvOpB0RF74/G4
+p42a0CNs3w4qNZhQwaaL0geqpi/LmKmjjaCMh6vs4cULJeLpqQgTMIYb5basA4U1
+DJpdW4LEBGoFTPP3s7WskjtGcah/VMeWN9w4LKIYIxAA3vghQFKZlK2ytuWHjikL
+O7OKUmdU3ArpdWAz/xOaYaQVDNBv3g0GI6hErfBoYJNrdQYkW0eauTrv2U/fMdVl
+OuKUA76IlEl8atDawNBigfVhUJZa0O4iOQ==
-----END CERTIFICATE-----
diff --git a/tests/certs/Server-localhost.nn-sv.csr b/tests/certs/Server-localhost.nn-sv.csr
index 64243434..7f2fa773 100644
--- a/tests/certs/Server-localhost.nn-sv.csr
+++ b/tests/certs/Server-localhost.nn-sv.csr
@@ -1,11 +1,11 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIBlzCCAQACAQAwVzELMAkGA1UEBhMCTk4xMTAvBgNVBAoMKEVkZWwgQ3VybCBB
cmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQxFTATBgNVBAMMDGxvY2FsaG9z
-dC5ubjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA09RO22NcPzo6XjgJlOZN
-cJ0Nr0nmgl0Ht/XNoN+vcfHPv9Wava98eF1VPxS9uywOc53WgprV5vYhXQiSonFf
-gF9czvDCNzd5D0091PKAbUc2RdHSi3ouEnFLR4b1jJmv5w7PtclNenX3snQMQeOr
-uyydb1QIE1o673wn9z8LC3ECAwEAAaAAMA0GCSqGSIb3DQEBCwUAA4GBAM5PenDC
-AtDhzdVKrX6DcJINWck5XFEnvWQksSYU7iDeiQVycQxR+LYKGZiy04u+9C+MN7eq
-JmHAIi+88r7/ZaGJLujqSUOJn8ocZ+vwhJOwh2XBhhLaCjIW/H05g0aNlk80Ye6m
-OA9DCIZUINF0lDQaJCpKXxwNVcz4Rifp5/9T
+dC5ubjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArMwRcHQp7XsARIrARwNQ
+nW9Rt8l73X7uKWdbkZvHxeadWT5rMyW3fDl8hHndFZjnJ2OTEDo6QKDd0B5uYPQe
+pPceCguERHfnBRY5qt69Hse8yeFOjIYcP9bN4/JoAlsXU0lRKaiJ89DhXnEHnxVH
+CEDprEnkIaxlKQnKotyeq4kCAwEAAaAAMA0GCSqGSIb3DQEBCwUAA4GBADnob1ds
+8MytEcgSZdkgP4iQ2L+aPXTPBqTThaV7Zto1mAhwG/D6rTiGq6t+IlZQNoDdZPp3
+r1WDQJj6ed54xUY4Im4m1Np8oURamt5NJMKURDbv0xOQHW8EOoN+F8rfKyu2Hk1O
+hJulv+cBz75yi3+LVu+IEuSFQIQUZiy6V+Il
-----END CERTIFICATE REQUEST-----
diff --git a/tests/certs/Server-localhost.nn-sv.der b/tests/certs/Server-localhost.nn-sv.der
index 08cf02f4..9bb4ff35 100644
--- a/tests/certs/Server-localhost.nn-sv.der
+++ b/tests/certs/Server-localhost.nn-sv.der
Binary files differ
diff --git a/tests/certs/Server-localhost.nn-sv.dhp b/tests/certs/Server-localhost.nn-sv.dhp
index 5d54840b..e69de29b 100644
--- a/tests/certs/Server-localhost.nn-sv.dhp
+++ b/tests/certs/Server-localhost.nn-sv.dhp
@@ -1,5 +0,0 @@
------BEGIN DH PARAMETERS-----
-MIGHAoGBAPrtEVPhZfEczB9JnWXbln79YnTh/V6ehXMWe414wyn/VT1ow25sLEev
-H2+eT84aDp5e+TfBSFjA6or96/lyQvsgAE+cE6f6uuw9ApVG2MK+BCn4snxHBb6G
-LFQf+9qHZ4BEkpBL60p1fkGu8BM1wXGXEaeYhgGumNA9fm5YJrl7AgEC
------END DH PARAMETERS-----
diff --git a/tests/certs/Server-localhost.nn-sv.key b/tests/certs/Server-localhost.nn-sv.key
index bf1cc7ec..6a75071b 100644
--- a/tests/certs/Server-localhost.nn-sv.key
+++ b/tests/certs/Server-localhost.nn-sv.key
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXgIBAAKBgQDT1E7bY1w/OjpeOAmU5k1wnQ2vSeaCXQe39c2g369x8c+/1Zq9
-r3x4XVU/FL27LA5zndaCmtXm9iFdCJKicV+AX1zO8MI3N3kPTT3U8oBtRzZF0dKL
-ei4ScUtHhvWMma/nDs+1yU16dfeydAxB46u7LJ1vVAgTWjrvfCf3PwsLcQIDAQAB
-AoGBALr1HQxAq8AaMj3KE5rZkOudkeBtxwaz+QYB6hTcl8pnc8aKTmKwKZlKNtzP
-/4zdG3wriJII+lU4UsX7tP+uNGxKxALrDQRuBPyi8XQfUT1nJth6qkp8g3V/ixfE
-Yah3od9dL3+xsOH28RKKUC5kjmnNupO9KQZ6/CyYfUHAEG+pAkEA+PP+7FIvpPQ+
-7bbG4IIqn7QKVxGbtaFY8pdLnsUkrnIqwEIbZoU12iEKm5qMoXNv30GknXrvxU53
-tdIZU5Z28wJBANnTTMb/jac+Q1SaqmWQnrpcmvuPZ/8xRM6xeSJh+MDpK768WpYe
-nivHvinQjQZBQmNM3IPYbJ33nTAdJylmFQsCQQCn4crATPAKOheRsJdO4RijWAM9
-EgfCJUtZVMPPDr0c0qqXujzGFwDo1y1TH5bEbZc8pATBmhzFHpRFzaf8oVQXAkAX
-Hch5GefDhuUIVn2c17MwneFIrxhfSbA+qzDqyDDo8BXXYQ/P/KHWjZUNxPciYcyU
-0zRXvaERRpTk5UMhrpavAkEAy4ZyhH1UViuWsmTQaRjc5mDs8aXkd2y85A7jnfWA
-8r7CL+sOe4TU1/CVyJf2FJaqHfD/GG6fqqeFoHuaqwTyiw==
+MIICXQIBAAKBgQCszBFwdCntewBEisBHA1Cdb1G3yXvdfu4pZ1uRm8fF5p1ZPmsz
+Jbd8OXyEed0VmOcnY5MQOjpAoN3QHm5g9B6k9x4KC4REd+cFFjmq3r0ex7zJ4U6M
+hhw/1s3j8mgCWxdTSVEpqInz0OFecQefFUcIQOmsSeQhrGUpCcqi3J6riQIDAQAB
+AoGAK7nYD+TVV0rw3mdeEJo+JBivTRqnRX2BNuj4uvf4rZOV7adl6SN6Mu05HSzZ
+TUXL+KOx60FQzFnox2lr9QzRU/LelLQ3H9fgVTVmGUCEAoDVRoWas8XlYGZsiHZ/
+yJn+9Z3yQYpufSb0LQiSt73sgrTNPu50gMxe/ZSAbSscyyECQQDV8juKzWmizlTh
++wVs/pihE0+BX1BRCsezs7FCdDEWle3XidBtYlYyUIm5wx6v8xM/F7Q/nwgymOnV
+A62PtfyjAkEAzsM3DsuJ9dG5n+EPTH3kDdfr0eYy76XPYz4HK8/FgiKPWy55BRCH
+biLcbDAe06olJiCzEvwggFigthrIqj0t4wJBALDTUi74c3SiADn+FI/vJQsMQMv2
+kRVKSZ/WxozcJ645IKjiOKgPfJp9QjeMcxKNXrzoxItIz6eyBqGONqbujO0CQQCh
+b6azdJR5TJEklfL+BGVlsas8rgIjP1FX6Xxr5sQNwbIwvW5cV/WGNs3n4wKOvZBX
+3rwzHIy76XdB+FOpKC+FAkBDVbicC19LE6+tBzOyx4uTEm3N7N8vh566VaOpok02
+Io7F/WYL7WSCXAtvmueWV+FJyVUMN1f2nWfWqaEXP2ag
-----END RSA PRIVATE KEY-----
diff --git a/tests/certs/Server-localhost.nn-sv.pem b/tests/certs/Server-localhost.nn-sv.pem
index b5c25312..b3712f74 100644
--- a/tests/certs/Server-localhost.nn-sv.pem
+++ b/tests/certs/Server-localhost.nn-sv.pem
@@ -1,11 +1,11 @@
extensions = x509v3
[ x509v3 ]
subjectAltName = DNS:localhost.nn
-keyUsage = keyEncipherment
+keyUsage = keyEncipherment,digitalSignature,keyAgreement
extendedKeyUsage = serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
-basicConstraints = critical,CA:false
+basicConstraints = CA:false
[ req ]
default_bits = 1024
distinguished_name = req_DN
@@ -24,33 +24,32 @@ commonName_value = localhost.nn
# the certficate
# some dhparam
-----BEGIN RSA PRIVATE KEY-----
-MIICXgIBAAKBgQDT1E7bY1w/OjpeOAmU5k1wnQ2vSeaCXQe39c2g369x8c+/1Zq9
-r3x4XVU/FL27LA5zndaCmtXm9iFdCJKicV+AX1zO8MI3N3kPTT3U8oBtRzZF0dKL
-ei4ScUtHhvWMma/nDs+1yU16dfeydAxB46u7LJ1vVAgTWjrvfCf3PwsLcQIDAQAB
-AoGBALr1HQxAq8AaMj3KE5rZkOudkeBtxwaz+QYB6hTcl8pnc8aKTmKwKZlKNtzP
-/4zdG3wriJII+lU4UsX7tP+uNGxKxALrDQRuBPyi8XQfUT1nJth6qkp8g3V/ixfE
-Yah3od9dL3+xsOH28RKKUC5kjmnNupO9KQZ6/CyYfUHAEG+pAkEA+PP+7FIvpPQ+
-7bbG4IIqn7QKVxGbtaFY8pdLnsUkrnIqwEIbZoU12iEKm5qMoXNv30GknXrvxU53
-tdIZU5Z28wJBANnTTMb/jac+Q1SaqmWQnrpcmvuPZ/8xRM6xeSJh+MDpK768WpYe
-nivHvinQjQZBQmNM3IPYbJ33nTAdJylmFQsCQQCn4crATPAKOheRsJdO4RijWAM9
-EgfCJUtZVMPPDr0c0qqXujzGFwDo1y1TH5bEbZc8pATBmhzFHpRFzaf8oVQXAkAX
-Hch5GefDhuUIVn2c17MwneFIrxhfSbA+qzDqyDDo8BXXYQ/P/KHWjZUNxPciYcyU
-0zRXvaERRpTk5UMhrpavAkEAy4ZyhH1UViuWsmTQaRjc5mDs8aXkd2y85A7jnfWA
-8r7CL+sOe4TU1/CVyJf2FJaqHfD/GG6fqqeFoHuaqwTyiw==
+MIICXQIBAAKBgQCszBFwdCntewBEisBHA1Cdb1G3yXvdfu4pZ1uRm8fF5p1ZPmsz
+Jbd8OXyEed0VmOcnY5MQOjpAoN3QHm5g9B6k9x4KC4REd+cFFjmq3r0ex7zJ4U6M
+hhw/1s3j8mgCWxdTSVEpqInz0OFecQefFUcIQOmsSeQhrGUpCcqi3J6riQIDAQAB
+AoGAK7nYD+TVV0rw3mdeEJo+JBivTRqnRX2BNuj4uvf4rZOV7adl6SN6Mu05HSzZ
+TUXL+KOx60FQzFnox2lr9QzRU/LelLQ3H9fgVTVmGUCEAoDVRoWas8XlYGZsiHZ/
+yJn+9Z3yQYpufSb0LQiSt73sgrTNPu50gMxe/ZSAbSscyyECQQDV8juKzWmizlTh
++wVs/pihE0+BX1BRCsezs7FCdDEWle3XidBtYlYyUIm5wx6v8xM/F7Q/nwgymOnV
+A62PtfyjAkEAzsM3DsuJ9dG5n+EPTH3kDdfr0eYy76XPYz4HK8/FgiKPWy55BRCH
+biLcbDAe06olJiCzEvwggFigthrIqj0t4wJBALDTUi74c3SiADn+FI/vJQsMQMv2
+kRVKSZ/WxozcJ645IKjiOKgPfJp9QjeMcxKNXrzoxItIz6eyBqGONqbujO0CQQCh
+b6azdJR5TJEklfL+BGVlsas8rgIjP1FX6Xxr5sQNwbIwvW5cV/WGNs3n4wKOvZBX
+3rwzHIy76XdB+FOpKC+FAkBDVbicC19LE6+tBzOyx4uTEm3N7N8vh566VaOpok02
+Io7F/WYL7WSCXAtvmueWV+FJyVUMN1f2nWfWqaEXP2ag
-----END RSA PRIVATE KEY-----
Certificate:
Data:
Version: 3 (0x2)
- Serial Number:
- 0b:98:94:fb:78:5f
- Signature Algorithm: sha1WithRSAEncryption
+ Serial Number: 14269504311644 (0xcfa60bc515c)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Validity
- Not Before: May 27 21:37:24 2010 GMT
- Not After : Aug 13 21:37:24 2018 GMT
+ Not Before: Mar 21 15:07:11 2015 GMT
+ Not After : Jun 7 15:07:11 2023 GMT
Subject:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
@@ -59,68 +58,63 @@ Certificate:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:d3:d4:4e:db:63:5c:3f:3a:3a:5e:38:09:94:e6:
- 4d:70:9d:0d:af:49:e6:82:5d:07:b7:f5:cd:a0:df:
- af:71:f1:cf:bf:d5:9a:bd:af:7c:78:5d:55:3f:14:
- bd:bb:2c:0e:73:9d:d6:82:9a:d5:e6:f6:21:5d:08:
- 92:a2:71:5f:80:5f:5c:ce:f0:c2:37:37:79:0f:4d:
- 3d:d4:f2:80:6d:47:36:45:d1:d2:8b:7a:2e:12:71:
- 4b:47:86:f5:8c:99:af:e7:0e:cf:b5:c9:4d:7a:75:
- f7:b2:74:0c:41:e3:ab:bb:2c:9d:6f:54:08:13:5a:
- 3a:ef:7c:27:f7:3f:0b:0b:71
+ 00:ac:cc:11:70:74:29:ed:7b:00:44:8a:c0:47:03:
+ 50:9d:6f:51:b7:c9:7b:dd:7e:ee:29:67:5b:91:9b:
+ c7:c5:e6:9d:59:3e:6b:33:25:b7:7c:39:7c:84:79:
+ dd:15:98:e7:27:63:93:10:3a:3a:40:a0:dd:d0:1e:
+ 6e:60:f4:1e:a4:f7:1e:0a:0b:84:44:77:e7:05:16:
+ 39:aa:de:bd:1e:c7:bc:c9:e1:4e:8c:86:1c:3f:d6:
+ cd:e3:f2:68:02:5b:17:53:49:51:29:a8:89:f3:d0:
+ e1:5e:71:07:9f:15:47:08:40:e9:ac:49:e4:21:ac:
+ 65:29:09:ca:a2:dc:9e:ab:89
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:localhost.nn
X509v3 Key Usage:
- Key Encipherment
+ Digital Signature, Key Encipherment, Key Agreement
X509v3 Extended Key Usage:
TLS Web Server Authentication
X509v3 Subject Key Identifier:
- 81:26:F9:75:CC:9C:2D:3C:36:64:68:41:F7:07:3C:66:86:E5:4A:C1
+ 12:AF:44:46:B1:04:69:61:64:83:39:A2:BD:5D:97:2B:F4:1D:D4:6C
X509v3 Authority Key Identifier:
- keyid:AD:3E:E2:39:07:B8:5C:AA:26:90:94:4C:26:69:21:83:E2:4E:36:94
+ keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE
- X509v3 Basic Constraints: critical
+ X509v3 Basic Constraints:
CA:FALSE
Signature Algorithm: sha1WithRSAEncryption
- 65:05:8c:48:14:58:8c:1a:d4:95:67:1c:29:52:ed:5a:6e:14:
- 41:bc:2b:16:20:c4:89:3a:6e:cb:c1:ff:ab:61:79:5f:ce:27:
- 93:3c:ff:29:7a:25:68:00:27:04:f3:68:17:30:f0:fd:ff:09:
- 0e:15:2a:25:b1:45:18:93:ab:12:8e:0c:13:11:9a:b8:a4:75:
- d0:17:1b:ca:f2:66:6b:73:15:dd:8b:bb:34:d6:70:dc:34:1b:
- e7:7a:30:ea:50:50:2f:88:67:b3:f8:b3:55:62:44:7e:3e:df:
- 59:4f:a8:57:83:40:9f:bf:52:bf:fd:2c:18:6e:bd:0c:41:b7:
- 78:1c:9b:fa:c4:ff:c3:2b:46:a4:8f:0c:19:a7:3d:75:81:29:
- 6b:cf:07:f0:1d:65:d4:0e:19:51:87:92:a8:3d:7e:80:04:84:
- ad:5e:4e:b6:ef:9a:02:c3:84:95:ec:c3:e8:a1:69:1f:42:cb:
- da:63:1a:35:6f:d0:ba:62:9e:73:36:63:58:0f:cc:25:c8:59:
- 73:df:3b:c2:b9:5a:da:3d:e1:3f:0a:1f:0f:41:c4:88:2d:92:
- 06:88:d4:54:81:e1:12:57:53:ab:6b:f8:c8:90:3e:30:4c:f5:
- 72:cf:f0:d4:18:70:c1:78:85:30:9c:fe:94:f4:1b:c2:6c:14:
- 49:7a:0e:27
+ 44:54:d7:d7:75:14:60:a5:1a:1d:1e:a9:dc:6f:b1:b1:d8:13:
+ e2:10:22:9a:f5:ca:b6:38:3c:d9:ac:2e:dc:ce:38:bc:cc:38:
+ a1:cc:a8:9c:73:37:f9:b6:a8:42:87:d9:80:21:45:81:43:9d:
+ 73:3c:67:cf:cd:c5:c3:91:df:60:6b:6d:69:f9:be:a1:92:cc:
+ 5d:ea:bc:67:f3:c7:bc:ea:41:d1:11:7b:e3:f1:b8:a7:8d:9a:
+ d0:23:6c:df:0e:2a:35:98:50:c1:a6:8b:d2:07:aa:a6:2f:cb:
+ 98:a9:a3:8d:a0:8c:87:ab:ec:e1:c5:0b:25:e2:e9:a9:08:13:
+ 30:86:1b:e5:b6:ac:03:85:35:0c:9a:5d:5b:82:c4:04:6a:05:
+ 4c:f3:f7:b3:b5:ac:92:3b:46:71:a8:7f:54:c7:96:37:dc:38:
+ 2c:a2:18:23:10:00:de:f8:21:40:52:99:94:ad:b2:b6:e5:87:
+ 8e:29:0b:3b:b3:8a:52:67:54:dc:0a:e9:75:60:33:ff:13:9a:
+ 61:a4:15:0c:d0:6f:de:0d:06:23:a8:44:ad:f0:68:60:93:6b:
+ 75:06:24:5b:47:9a:b9:3a:ef:d9:4f:df:31:d5:65:3a:e2:94:
+ 03:be:88:94:49:7c:6a:d0:da:c0:d0:62:81:f5:61:50:96:5a:
+ d0:ee:22:39
-----BEGIN CERTIFICATE-----
-MIIDRzCCAi+gAwIBAgIGC5iU+3hfMA0GCSqGSIb3DQEBBQUAMGcxCzAJBgNVBAYT
+MIIDRTCCAi2gAwIBAgIGDPpgvFFcMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
-IENsb3VkMSUwIwYDVQQDDBxOb3RoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yMB4X
-DTEwMDUyNzIxMzcyNFoXDTE4MDgxMzIxMzcyNFowVzELMAkGA1UEBhMCTk4xMTAv
-BgNVBAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQx
-FTATBgNVBAMMDGxvY2FsaG9zdC5ubjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
-gYEA09RO22NcPzo6XjgJlOZNcJ0Nr0nmgl0Ht/XNoN+vcfHPv9Wava98eF1VPxS9
-uywOc53WgprV5vYhXQiSonFfgF9czvDCNzd5D0091PKAbUc2RdHSi3ouEnFLR4b1
-jJmv5w7PtclNenX3snQMQeOruyydb1QIE1o673wn9z8LC3ECAwEAAaOBjDCBiTAX
-BgNVHREEEDAOggxsb2NhbGhvc3Qubm4wCwYDVR0PBAQDAgUgMBMGA1UdJQQMMAoG
-CCsGAQUFBwMBMB0GA1UdDgQWBBSBJvl1zJwtPDZkaEH3BzxmhuVKwTAfBgNVHSME
-GDAWgBStPuI5B7hcqiaQlEwmaSGD4k42lDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3
-DQEBBQUAA4IBAQBlBYxIFFiMGtSVZxwpUu1abhRBvCsWIMSJOm7Lwf+rYXlfzieT
-PP8peiVoACcE82gXMPD9/wkOFSolsUUYk6sSjgwTEZq4pHXQFxvK8mZrcxXdi7s0
-1nDcNBvnejDqUFAviGez+LNVYkR+Pt9ZT6hXg0Cfv1K//SwYbr0MQbd4HJv6xP/D
-K0akjwwZpz11gSlrzwfwHWXUDhlRh5KoPX6ABIStXk6275oCw4SV7MPooWkfQsva
-Yxo1b9C6Yp5zNmNYD8wlyFlz3zvCuVraPeE/Ch8PQcSILZIGiNRUgeESV1Ora/jI
-kD4wTPVyz/DUGHDBeIUwnP6U9BvCbBRJeg4n
+IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
+Fw0xNTAzMjExNTA3MTFaFw0yMzA2MDcxNTA3MTFaMFcxCzAJBgNVBAYTAk5OMTEw
+LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
+MRUwEwYDVQQDDAxsb2NhbGhvc3Qubm4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
+AoGBAKzMEXB0Ke17AESKwEcDUJ1vUbfJe91+7ilnW5Gbx8XmnVk+azMlt3w5fIR5
+3RWY5ydjkxA6OkCg3dAebmD0HqT3HgoLhER35wUWOarevR7HvMnhToyGHD/WzePy
+aAJbF1NJUSmoifPQ4V5xB58VRwhA6axJ5CGsZSkJyqLcnquJAgMBAAGjgYkwgYYw
+FwYDVR0RBBAwDoIMbG9jYWxob3N0Lm5uMAsGA1UdDwQEAwIDqDATBgNVHSUEDDAK
+BggrBgEFBQcDATAdBgNVHQ4EFgQUEq9ERrEEaWFkgzmivV2XK/Qd1GwwHwYDVR0j
+BBgwFoAUEsq6S0YEp3WKLOgOVJS8EmWme84wCQYDVR0TBAIwADANBgkqhkiG9w0B
+AQUFAAOCAQEARFTX13UUYKUaHR6p3G+xsdgT4hAimvXKtjg82awu3M44vMw4ocyo
+nHM3+baoQofZgCFFgUOdczxnz83Fw5HfYGttafm+oZLMXeq8Z/PHvOpB0RF74/G4
+p42a0CNs3w4qNZhQwaaL0geqpi/LmKmjjaCMh6vs4cULJeLpqQgTMIYb5basA4U1
+DJpdW4LEBGoFTPP3s7WskjtGcah/VMeWN9w4LKIYIxAA3vghQFKZlK2ytuWHjikL
+O7OKUmdU3ArpdWAz/xOaYaQVDNBv3g0GI6hErfBoYJNrdQYkW0eauTrv2U/fMdVl
+OuKUA76IlEl8atDawNBigfVhUJZa0O4iOQ==
-----END CERTIFICATE-----
------BEGIN DH PARAMETERS-----
-MIGHAoGBAPrtEVPhZfEczB9JnWXbln79YnTh/V6ehXMWe414wyn/VT1ow25sLEev
-H2+eT84aDp5e+TfBSFjA6or96/lyQvsgAE+cE6f6uuw9ApVG2MK+BCn4snxHBb6G
-LFQf+9qHZ4BEkpBL60p1fkGu8BM1wXGXEaeYhgGumNA9fm5YJrl7AgEC
------END DH PARAMETERS-----
diff --git a/tests/certs/Server-localhost.nn-sv.prm b/tests/certs/Server-localhost.nn-sv.prm
index e515ea15..399e38a4 100644
--- a/tests/certs/Server-localhost.nn-sv.prm
+++ b/tests/certs/Server-localhost.nn-sv.prm
@@ -1,11 +1,11 @@
extensions = x509v3
[ x509v3 ]
subjectAltName = DNS:localhost.nn
-keyUsage = keyEncipherment
+keyUsage = keyEncipherment,digitalSignature,keyAgreement
extendedKeyUsage = serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
-basicConstraints = critical,CA:false
+basicConstraints = CA:false
[ req ]
default_bits = 1024
distinguished_name = req_DN
diff --git a/tests/certs/Server-localhost.nn-sv.pub.der b/tests/certs/Server-localhost.nn-sv.pub.der
new file mode 100644
index 00000000..68b64eb4
--- /dev/null
+++ b/tests/certs/Server-localhost.nn-sv.pub.der
Binary files differ
diff --git a/tests/certs/Server-localhost.nn-sv.pub.pem b/tests/certs/Server-localhost.nn-sv.pub.pem
new file mode 100644
index 00000000..a59a0e6e
--- /dev/null
+++ b/tests/certs/Server-localhost.nn-sv.pub.pem
@@ -0,0 +1,6 @@
+-----BEGIN PUBLIC KEY-----
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCszBFwdCntewBEisBHA1Cdb1G3
+yXvdfu4pZ1uRm8fF5p1ZPmszJbd8OXyEed0VmOcnY5MQOjpAoN3QHm5g9B6k9x4K
+C4REd+cFFjmq3r0ex7zJ4U6Mhhw/1s3j8mgCWxdTSVEpqInz0OFecQefFUcIQOms
+SeQhrGUpCcqi3J6riQIDAQAB
+-----END PUBLIC KEY-----
diff --git a/tests/certs/Server-localhost0h-sv.crl b/tests/certs/Server-localhost0h-sv.crl
index 87a18590..319af89b 100644
--- a/tests/certs/Server-localhost0h-sv.crl
+++ b/tests/certs/Server-localhost0h-sv.crl
@@ -1,14 +1,22 @@
-----BEGIN X509 CRL-----
-MIICDTCB9gIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJOTjExMC8GA1UE
-CgwoRWRlbCBDdXJsIEFyY3RpYyBJbGx1ZGl1bSBSZXNlYXJjaCBDbG91ZDElMCMG
-A1UEAwwcTm90aGVybiBOb3doZXJlIFRydXN0IEFuY2hvchcNMTAwNTI3MjEzNzU0
-WhcNMTAwNjI2MjEzNzU0WjBLMBcCBguYlPl8ahcNMTAwNTI3MjEzNzExWjAXAgYL
-mJT7eF8XDTEwMDUyNzIxMzcyNFowFwIGC5iVAAx+Fw0xMDA1MjcyMTM3NTRaoA4w
-DDAKBgNVHRQEAwIBATANBgkqhkiG9w0BAQUFAAOCAQEAWBL4VhArwJkUv91oyMIo
-xyyRmVl+1oY5IjEpLGd+mNIgqXuljQmbp8cS8A+jWinJPOWZqvsHa+mLCl4OuwhP
-JbAtIQ22OQRaVqWRuguG2T1sh3Dd7a1GcupIGKc/zgnY45D4pY4UNZv+KmY3bF0S
-83zn6YoQtBTzF9y2Nq5R0UTdxl6+j5swpo1ttvQPz40yqIlmjmW/llkaD4UBaegl
-zSxmnR5xCjAR7nYm+HyWW9SLSWGptUOd32B9TPJPLDhJa9lfBb8H9l5k7kx9ECJG
-LyujleeXIucfqOgE2cB0zCjExqrGWRp8ZgEWfpdSkDEpXBCDo88TA3dIr2f3Zxwp
-QA==
+MIIDoTCCAokCAQEwDQYJKoZIhvcNAQEFBQAwaDELMAkGA1UEBhMCTk4xMTAvBgNV
+BAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQxJjAk
+BgNVBAMMHU5vcnRoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yFw0xNTAzMjExNTA3
+MTFaFw0xNTA0MjAxNTA3MTFaMIIB2zAXAgYM+ly45CIXDTE1MDMyMTEzMTQ1N1ow
+FwIGDPpcwXH8Fw0xNTAzMjExMzE1NTNaMBcCBgz6XO7ujBcNMTUwMzIxMTMyMDUx
+WjAXAgYM+lzu7p0XDTE1MDMyMTEzMjA1MVowFwIGDPpc7u6uFw0xNTAzMjExMzIw
+NTFaMBcCBgz6XZyD1RcNMTUwMzIxMTMzOTQ5WjAXAgYM+l4OXa8XDTE1MDMyMTEz
+NTIxNVowFwIGDPpeJlPZFw0xNTAzMjExMzU0NTJaMBcCBgz6XiZT6hcNMTUwMzIx
+MTM1NDUyWjAXAgYM+l4mU/sXDTE1MDMyMTEzNTQ1MlowFwIGDPpemKKEFw0xNTAz
+MjExNDA3MjFaMBcCBgz6XpiilRcNMTUwMzIxMTQwNzIxWjAXAgYM+l6YoqYXDTE1
+MDMyMTE0MDcyMVowFwIGDPpffssxFw0xNTAzMjExNDMyMzBaMBcCBgz6X37yUxcN
+MTUwMzIxMTQzMjMxWjAXAgYM+l9+8mYXDTE1MDMyMTE0MzIzMVowFwIGDPpgvFFL
+Fw0xNTAzMjExNTA3MTFaMBcCBgz6YLxRXBcNMTUwMzIxMTUwNzExWjAXAgYM+mC8
+UW4XDTE1MDMyMTE1MDcxMVqgDjAMMAoGA1UdFAQDAgEBMA0GCSqGSIb3DQEBBQUA
+A4IBAQDER99gBe9w8a9X1pQQnzC87kYnW7R0K8wFr4KqCYP0De8tKxhCGrXaoQDK
+AvHQcT3RpCR5PAK5J1InxlCumJJjvo39OLTsaCbSyoynmAMGCXS0earSL83biquG
+jJ29ROXukT3fGE6HO+cKAaHyHeJa6OZEibmCvCls/YvvQTW2jlceOZmi22AL3jYN
+w6UVHRpbHDHupF5YxhwFG1GVTOd9cuik8CqVxPkOfIxeQbEV+qEiDWzjyy2aU3X7
+dLhZE47P5tYgb8nIsXb5PATqiK9vdv4EOyVKiiCmyFemrGGU7MqbTtTjJVB9nS2R
+QMWLS24xr3IcHt7FOX1w8UF/GXiP
-----END X509 CRL-----
diff --git a/tests/certs/Server-localhost0h-sv.crt b/tests/certs/Server-localhost0h-sv.crt
index 0dcb5df2..b00859a5 100644
--- a/tests/certs/Server-localhost0h-sv.crt
+++ b/tests/certs/Server-localhost0h-sv.crt
@@ -1,16 +1,15 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number:
- 0b:98:95:00:0c:7e
- Signature Algorithm: sha1WithRSAEncryption
+ Serial Number: 14269504311662 (0xcfa60bc516e)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Validity
- Not Before: May 27 21:37:54 2010 GMT
- Not After : Aug 13 21:37:54 2018 GMT
+ Not Before: Mar 21 15:07:11 2015 GMT
+ Not After : Jun 7 15:07:11 2023 GMT
Subject:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
@@ -19,63 +18,63 @@ Certificate:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:cc:a9:91:2b:22:e8:90:2b:e5:4c:dc:ae:6d:da:
- 4c:f3:32:cc:a5:68:67:5a:3b:b9:86:a3:95:88:3e:
- e8:63:c3:ed:00:60:19:03:2b:5d:5b:56:8a:da:21:
- 5e:71:5c:d1:e3:de:51:18:c1:17:14:b1:33:90:00:
- 5c:9a:e5:73:0b:a8:88:9c:d0:0b:54:bc:ea:3a:39:
- dd:f6:65:81:4b:29:99:4c:71:d3:f7:69:7f:80:e8:
- e8:6d:61:41:83:87:eb:ac:2c:bd:0f:eb:1b:fd:a2:
- 37:97:6d:31:56:ba:4b:51:dd:b1:01:eb:89:f8:25:
- de:5b:a3:e5:b2:3f:4c:77:53
+ 00:e3:c7:52:fb:7d:02:b1:a7:0b:4c:2d:a6:2a:b0:
+ 57:6b:5e:0b:f9:9e:4b:e7:d0:ac:55:43:47:fa:b1:
+ e0:fc:b0:63:30:84:31:f5:95:44:90:9a:b7:22:01:
+ 6f:c7:17:16:be:5a:19:ee:47:35:90:a5:5e:27:ba:
+ 86:47:3b:c5:63:d2:f2:c6:a1:db:ac:be:b1:2f:4c:
+ c2:98:86:19:72:d5:f9:12:45:09:bc:23:e2:00:eb:
+ 4d:ba:99:71:b5:4a:fb:49:8c:4d:f3:0b:4e:cf:48:
+ 7b:c8:06:37:92:35:ff:bb:4f:ea:98:af:13:ac:a8:
+ cd:9f:a7:e0:78:db:15:bc:3b
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:localhost
X509v3 Key Usage:
- Key Encipherment
+ Digital Signature, Key Encipherment, Key Agreement
X509v3 Extended Key Usage:
TLS Web Server Authentication
X509v3 Subject Key Identifier:
- 3B:2B:84:0D:23:3C:46:F9:9B:E5:C2:FA:B7:30:E7:AC:E3:ED:09:C3
+ 23:D7:CE:D8:B2:D0:F8:8E:3C:82:26:6C:F1:F5:2A:8A:48:90:58:66
X509v3 Authority Key Identifier:
- keyid:AD:3E:E2:39:07:B8:5C:AA:26:90:94:4C:26:69:21:83:E2:4E:36:94
+ keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE
- X509v3 Basic Constraints: critical
+ X509v3 Basic Constraints:
CA:FALSE
Signature Algorithm: sha1WithRSAEncryption
- a2:fa:61:4e:c0:10:1f:f8:38:2c:fd:a6:74:85:df:8e:ee:41:
- 90:a1:d7:c9:32:65:5d:61:d5:13:51:3b:11:1c:7b:01:06:70:
- 9f:93:52:54:15:bd:93:3a:f8:40:e3:e2:ab:01:96:fb:73:c5:
- 42:2c:ad:ce:e8:52:57:db:b6:15:90:75:e3:e5:75:99:b0:83:
- ed:b0:fc:f2:d0:d9:3d:68:1c:d9:b4:cd:a1:a9:40:19:44:46:
- 14:8b:11:6e:2e:1c:65:85:73:45:f0:8b:4f:ea:01:2d:61:0f:
- ae:0d:70:0c:d3:3c:1c:1f:24:66:a3:0b:62:d1:87:1e:8e:96:
- f6:43:cf:1c:24:e7:94:d0:7e:b0:ee:1b:6f:14:1f:04:35:e8:
- fc:3c:c8:9e:e3:6e:0e:4c:7d:a9:23:97:2d:6e:b1:4d:e3:05:
- 1b:ce:86:2f:2f:b3:c9:60:47:58:ac:ea:4c:cb:c2:7b:0f:08:
- b8:a7:90:e7:22:32:70:f6:09:3e:f9:54:94:b0:37:50:22:60:
- 49:1c:84:9e:1a:22:0c:3e:a9:16:7c:5e:b1:50:13:6b:82:14:
- d3:8a:3d:4d:ed:18:ca:40:59:d6:b9:72:9f:64:e5:0b:e7:a6:
- b8:ee:29:b5:6a:ec:82:b2:94:56:36:e3:87:b3:07:aa:69:b8:
- 2c:ef:0c:14
+ 28:b9:77:ea:4a:8d:d6:a5:fb:72:5b:d6:cd:60:40:33:56:bf:
+ dd:23:ff:bf:e8:2e:10:cd:30:ab:24:a4:43:d8:98:71:e3:59:
+ 66:3e:38:bd:b8:fb:19:1a:13:8f:a1:c8:39:93:b5:83:8d:62:
+ 52:a9:7a:5b:0d:69:47:40:5c:51:4c:3a:be:a7:c9:5f:7b:93:
+ 49:20:59:23:30:7c:d9:4a:dd:29:2c:ed:96:fd:cb:b8:13:ff:
+ 36:2c:27:ce:28:c3:a6:d0:d8:ba:8c:38:9f:78:ff:54:c7:76:
+ 05:37:47:f5:d3:55:9c:2c:12:41:81:14:ca:48:a2:b7:6d:05:
+ 49:2b:c5:f5:7b:63:6d:6f:cd:3f:f4:8d:74:51:07:ff:e1:40:
+ d5:96:60:d8:c8:38:5a:15:f9:c5:fd:e1:5e:a3:02:95:90:4b:
+ fc:8a:42:de:72:31:72:3d:dd:a2:df:19:42:c8:fa:a8:77:11:
+ 67:e6:64:8c:d0:fd:45:fd:f0:49:8c:e1:85:e6:f5:1f:47:c6:
+ ae:f2:70:c3:e8:99:d0:cd:9d:88:6b:33:ba:b9:65:3d:f4:b1:
+ f4:d0:3c:76:9c:18:9e:9e:c8:62:29:43:8e:f7:2f:2c:12:37:
+ 39:02:26:4e:4b:b0:14:30:80:bb:2d:cc:fc:93:dc:c9:8b:c0:
+ 69:12:71:36
-----BEGIN CERTIFICATE-----
-MIIDQzCCAiugAwIBAgIGC5iVAAx+MA0GCSqGSIb3DQEBBQUAMGcxCzAJBgNVBAYT
+MIIDQTCCAimgAwIBAgIGDPpgvFFuMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
-IENsb3VkMSUwIwYDVQQDDBxOb3RoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yMB4X
-DTEwMDUyNzIxMzc1NFoXDTE4MDgxMzIxMzc1NFowVDELMAkGA1UEBhMCTk4xMTAv
-BgNVBAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQx
-EjAQBgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-zKmRKyLokCvlTNyubdpM8zLMpWhnWju5hqOViD7oY8PtAGAZAytdW1aK2iFecVzR
-495RGMEXFLEzkABcmuVzC6iInNALVLzqOjnd9mWBSymZTHHT92l/gOjobWFBg4fr
-rCy9D+sb/aI3l20xVrpLUd2xAeuJ+CXeW6Plsj9Md1MCAwEAAaOBizCBiDAWBgNV
-HREEDzANggtsb2NhbGhvc3QAaDALBgNVHQ8EBAMCBSAwEwYDVR0lBAwwCgYIKwYB
-BQUHAwEwHQYDVR0OBBYEFDsrhA0jPEb5m+XC+rcw56zj7QnDMB8GA1UdIwQYMBaA
-FK0+4jkHuFyqJpCUTCZpIYPiTjaUMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEF
-BQADggEBAKL6YU7AEB/4OCz9pnSF347uQZCh18kyZV1h1RNROxEcewEGcJ+TUlQV
-vZM6+EDj4qsBlvtzxUIsrc7oUlfbthWQdePldZmwg+2w/PLQ2T1oHNm0zaGpQBlE
-RhSLEW4uHGWFc0Xwi0/qAS1hD64NcAzTPBwfJGajC2LRhx6OlvZDzxwk55TQfrDu
-G28UHwQ16Pw8yJ7jbg5Mfakjly1usU3jBRvOhi8vs8lgR1is6kzLwnsPCLinkOci
-MnD2CT75VJSwN1AiYEkchJ4aIgw+qRZ8XrFQE2uCFNOKPU3tGMpAWda5cp9k5Qvn
-prjuKbVq7IKylFY244ezB6ppuCzvDBQ=
+IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
+Fw0xNTAzMjExNTA3MTFaFw0yMzA2MDcxNTA3MTFaMFQxCzAJBgNVBAYTAk5OMTEw
+LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
+MRIwEAYDVQQDDAlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
+AOPHUvt9ArGnC0wtpiqwV2teC/meS+fQrFVDR/qx4PywYzCEMfWVRJCatyIBb8cX
+Fr5aGe5HNZClXie6hkc7xWPS8sah26y+sS9MwpiGGXLV+RJFCbwj4gDrTbqZcbVK
++0mMTfMLTs9Ie8gGN5I1/7tP6pivE6yozZ+n4HjbFbw7AgMBAAGjgYgwgYUwFgYD
+VR0RBA8wDYILbG9jYWxob3N0AGgwCwYDVR0PBAQDAgOoMBMGA1UdJQQMMAoGCCsG
+AQUFBwMBMB0GA1UdDgQWBBQj187YstD4jjyCJmzx9SqKSJBYZjAfBgNVHSMEGDAW
+gBQSyrpLRgSndYos6A5UlLwSZaZ7zjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBBQUA
+A4IBAQAouXfqSo3WpftyW9bNYEAzVr/dI/+/6C4QzTCrJKRD2Jhx41lmPji9uPsZ
+GhOPocg5k7WDjWJSqXpbDWlHQFxRTDq+p8lfe5NJIFkjMHzZSt0pLO2W/cu4E/82
+LCfOKMOm0Ni6jDifeP9Ux3YFN0f101WcLBJBgRTKSKK3bQVJK8X1e2Ntb80/9I10
+UQf/4UDVlmDYyDhaFfnF/eFeowKVkEv8ikLecjFyPd2i3xlCyPqodxFn5mSM0P1F
+/fBJjOGF5vUfR8au8nDD6JnQzZ2IazO6uWU99LH00Dx2nBienshiKUOO9y8sEjc5
+AiZOS7AUMIC7Lcz8k9zJi8BpEnE2
-----END CERTIFICATE-----
diff --git a/tests/certs/Server-localhost0h-sv.csr b/tests/certs/Server-localhost0h-sv.csr
index edf776f3..d075157d 100644
--- a/tests/certs/Server-localhost0h-sv.csr
+++ b/tests/certs/Server-localhost0h-sv.csr
@@ -1,11 +1,11 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIBkzCB/QIBADBUMQswCQYDVQQGEwJOTjExMC8GA1UECgwoRWRlbCBDdXJsIEFy
Y3RpYyBJbGx1ZGl1bSBSZXNlYXJjaCBDbG91ZDESMBAGA1UEAwwJbG9jYWxob3N0
-MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMqZErIuiQK+VM3K5t2kzzMsyl
-aGdaO7mGo5WIPuhjw+0AYBkDK11bVoraIV5xXNHj3lEYwRcUsTOQAFya5XMLqIic
-0AtUvOo6Od32ZYFLKZlMcdP3aX+A6OhtYUGDh+usLL0P6xv9ojeXbTFWuktR3bEB
-64n4Jd5bo+WyP0x3UwIDAQABoAAwDQYJKoZIhvcNAQELBQADgYEAPor+2apn3kPJ
-ZdjyyT/iXETRTrN87PuBaujcV+oVeVSWW+YgGUzDHi+RkEKTxWdz3leW2goE41X9
-2D/n66ASQGs1x8wXwIMIX83MjkWtjqdfcrJVi1l6T7NjzZt6EyJdvreRntCUu8zc
-J5tK3rl/tIeudKUE2COc0Ngu9JUB1j8=
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjx1L7fQKxpwtMLaYqsFdrXgv5
+nkvn0KxVQ0f6seD8sGMwhDH1lUSQmrciAW/HFxa+WhnuRzWQpV4nuoZHO8Vj0vLG
+odusvrEvTMKYhhly1fkSRQm8I+IA6026mXG1SvtJjE3zC07PSHvIBjeSNf+7T+qY
+rxOsqM2fp+B42xW8OwIDAQABoAAwDQYJKoZIhvcNAQELBQADgYEAC6NxWuiENuj/
+oPsopZy/tVZzbioXZP/S9ECCbdgy33bg9zKwQYLeHOSgXxJzES+RhJwQCliFV17j
+jM1CH7heggwkPAx5KelyZ20DeoeaYOi/xv7TjozrZ+EkmivHKBJi3+qNjNYH0ul9
+HhQBO5+sSDAGLMkWL/nAfYKbf/8KSvA=
-----END CERTIFICATE REQUEST-----
diff --git a/tests/certs/Server-localhost0h-sv.der b/tests/certs/Server-localhost0h-sv.der
index 14be0ba6..93642f42 100644
--- a/tests/certs/Server-localhost0h-sv.der
+++ b/tests/certs/Server-localhost0h-sv.der
Binary files differ
diff --git a/tests/certs/Server-localhost0h-sv.dhp b/tests/certs/Server-localhost0h-sv.dhp
index 99e6107e..e69de29b 100644
--- a/tests/certs/Server-localhost0h-sv.dhp
+++ b/tests/certs/Server-localhost0h-sv.dhp
@@ -1,5 +0,0 @@
------BEGIN DH PARAMETERS-----
-MIGHAoGBAL/3hRxvWX+Mdyu/aBPU1JeeA5sg4nXtA7B24eCql9Tq53Lks1/HJ5B+
-xSapGAFd+22xhBsNkJihf74oiPEVr9nNoLjFV/DZe259+JYgs+pBTFN+Cp13ALUi
-CeZxX2mlxlstD1SBRTKgxA/j4ttR1Chn8knn+RVdFE9YFKCYPyLrAgEC
------END DH PARAMETERS-----
diff --git a/tests/certs/Server-localhost0h-sv.key b/tests/certs/Server-localhost0h-sv.key
index 95c4666a..5fcc9c58 100644
--- a/tests/certs/Server-localhost0h-sv.key
+++ b/tests/certs/Server-localhost0h-sv.key
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDMqZErIuiQK+VM3K5t2kzzMsylaGdaO7mGo5WIPuhjw+0AYBkD
-K11bVoraIV5xXNHj3lEYwRcUsTOQAFya5XMLqIic0AtUvOo6Od32ZYFLKZlMcdP3
-aX+A6OhtYUGDh+usLL0P6xv9ojeXbTFWuktR3bEB64n4Jd5bo+WyP0x3UwIDAQAB
-AoGAGT+OBilPUYHoztumtSyqM5J/xqQjo/EcSSzjJKTGHJCuK06vp0FxSfRaOuDE
-+u09g4QIsyoXA9l8h/ZTdlR6Jax5nc+iRFs/21isrgKAsZYj4DghjgXJ9LWGHXnb
-7xstVFkFBGnOaeY7dVr54907TYUQwtJg4fk7Vror05gb1qECQQDykAxr2D/CxLk9
-RjWDi/P6JnfF0ZxZzCe0yATvuZ89+rpWQ5uxEJDq5FqwW4QXX+0G2aWDv64YExPS
-JmWQTlojAkEA2AAHDv2KBWFcXeTlWnKZTdzUOniE8PzS5zipi2ssiqXScrj9NX2U
-yCCOkv/42blPXBKbaVnfWBEhtj7pQxHJEQJBAOTvXjnfVXafs/IINPPegLyF2B/G
-EZqTXJp8+mPEP28BGSPYFbdN2mlIc+vlxEtHh3AitdweatNgFiIPiWZk/R8CQEIf
-EAoYtw2alknv7f3YIvHg7d7QUfHrkyxQ/iW9sy7mQBv6YRjkzozM2phJX4ZW4eJP
-l9+SMXqmE+nULFfps+ECQFVkjPDF065x++Fh3BVtNJ0goYStTJM6IcmYKflap+Ux
-cORZUWJ8tvDavlSSwQQYK8kOVTINC6iFwwEQ41HlYLE=
+MIICXAIBAAKBgQDjx1L7fQKxpwtMLaYqsFdrXgv5nkvn0KxVQ0f6seD8sGMwhDH1
+lUSQmrciAW/HFxa+WhnuRzWQpV4nuoZHO8Vj0vLGodusvrEvTMKYhhly1fkSRQm8
+I+IA6026mXG1SvtJjE3zC07PSHvIBjeSNf+7T+qYrxOsqM2fp+B42xW8OwIDAQAB
+AoGAHdkk2qfLDpShOl5RBA8PpZYxY4iG0d3ad2HVsNhWb0Z9+QGZumDRF1Hu5Zni
+l+hCprcP5tWWA1poODSNHBCNEQRYZcHrfZlh+sDiV6ZmexBg7x9D5azyRbn20vr1
+79UxmisRxnDQQHCfOmgZtgs1EZXnFOs0OotoZAHFr+GLtQECQQD+R2TaWMCEPKJc
+IswGBqLGL8cyy+v2d5Glt5l+xzb/KCdY9cbOR/B9wq//0Nvqyiq1I1jUBVw9NJi/
+eBx/OYxhAkEA5VIC6uMpIck0Qxpbj7/H3k2pBf1HROgmLEq+cVLFgY62CIpTgleO
+SAzTmn0vDXir0jQHJn+JTokvn0PxyNquGwJBAJW+77rSl5WIq8j8yRAnakayrmnQ
+w8ZjBggExsVthorfV8TBAPJMVWmKdOF/W3O62UnRZid+fKKize28S3P1LSECQDF8
+3FJSSWsYH6YnhwDjkz9fJQ281eeB7dL7IlQUV7kY0iHPsCvdtz/HPNcHEuNmWjYX
+sj9VoI0JP/Sv1frRbmcCQDPaeWowPGf1Xtj0oTSlA6KQsKZPO7t15nivgX/AnZWQ
+01l8q6GPHeYwyG/caD3BZwAavsVLg9nhKx0lf0wExM0=
-----END RSA PRIVATE KEY-----
diff --git a/tests/certs/Server-localhost0h-sv.p12 b/tests/certs/Server-localhost0h-sv.p12
deleted file mode 100644
index 82e03c78..00000000
--- a/tests/certs/Server-localhost0h-sv.p12
+++ /dev/null
Binary files differ
diff --git a/tests/certs/Server-localhost0h-sv.pem b/tests/certs/Server-localhost0h-sv.pem
index 45be9c35..a953370e 100644
--- a/tests/certs/Server-localhost0h-sv.pem
+++ b/tests/certs/Server-localhost0h-sv.pem
@@ -2,11 +2,11 @@ extensions = x509v3
[ x509v3 ]
#subjectAltName = DNS:localhost\0h
subjectAltName = DER:30:0d:82:0b:6c:6f:63:61:6c:68:6f:73:74:00:68
-keyUsage = keyEncipherment
+keyUsage = keyEncipherment,digitalSignature,keyAgreement
extendedKeyUsage = serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
-basicConstraints = critical,CA:false
+basicConstraints = CA:false
[ req ]
default_bits = 1024
distinguished_name = req_DN
@@ -25,33 +25,32 @@ commonName_value = localhost
# the certificate
# some dhparam
-----BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDMqZErIuiQK+VM3K5t2kzzMsylaGdaO7mGo5WIPuhjw+0AYBkD
-K11bVoraIV5xXNHj3lEYwRcUsTOQAFya5XMLqIic0AtUvOo6Od32ZYFLKZlMcdP3
-aX+A6OhtYUGDh+usLL0P6xv9ojeXbTFWuktR3bEB64n4Jd5bo+WyP0x3UwIDAQAB
-AoGAGT+OBilPUYHoztumtSyqM5J/xqQjo/EcSSzjJKTGHJCuK06vp0FxSfRaOuDE
-+u09g4QIsyoXA9l8h/ZTdlR6Jax5nc+iRFs/21isrgKAsZYj4DghjgXJ9LWGHXnb
-7xstVFkFBGnOaeY7dVr54907TYUQwtJg4fk7Vror05gb1qECQQDykAxr2D/CxLk9
-RjWDi/P6JnfF0ZxZzCe0yATvuZ89+rpWQ5uxEJDq5FqwW4QXX+0G2aWDv64YExPS
-JmWQTlojAkEA2AAHDv2KBWFcXeTlWnKZTdzUOniE8PzS5zipi2ssiqXScrj9NX2U
-yCCOkv/42blPXBKbaVnfWBEhtj7pQxHJEQJBAOTvXjnfVXafs/IINPPegLyF2B/G
-EZqTXJp8+mPEP28BGSPYFbdN2mlIc+vlxEtHh3AitdweatNgFiIPiWZk/R8CQEIf
-EAoYtw2alknv7f3YIvHg7d7QUfHrkyxQ/iW9sy7mQBv6YRjkzozM2phJX4ZW4eJP
-l9+SMXqmE+nULFfps+ECQFVkjPDF065x++Fh3BVtNJ0goYStTJM6IcmYKflap+Ux
-cORZUWJ8tvDavlSSwQQYK8kOVTINC6iFwwEQ41HlYLE=
+MIICXAIBAAKBgQDjx1L7fQKxpwtMLaYqsFdrXgv5nkvn0KxVQ0f6seD8sGMwhDH1
+lUSQmrciAW/HFxa+WhnuRzWQpV4nuoZHO8Vj0vLGodusvrEvTMKYhhly1fkSRQm8
+I+IA6026mXG1SvtJjE3zC07PSHvIBjeSNf+7T+qYrxOsqM2fp+B42xW8OwIDAQAB
+AoGAHdkk2qfLDpShOl5RBA8PpZYxY4iG0d3ad2HVsNhWb0Z9+QGZumDRF1Hu5Zni
+l+hCprcP5tWWA1poODSNHBCNEQRYZcHrfZlh+sDiV6ZmexBg7x9D5azyRbn20vr1
+79UxmisRxnDQQHCfOmgZtgs1EZXnFOs0OotoZAHFr+GLtQECQQD+R2TaWMCEPKJc
+IswGBqLGL8cyy+v2d5Glt5l+xzb/KCdY9cbOR/B9wq//0Nvqyiq1I1jUBVw9NJi/
+eBx/OYxhAkEA5VIC6uMpIck0Qxpbj7/H3k2pBf1HROgmLEq+cVLFgY62CIpTgleO
+SAzTmn0vDXir0jQHJn+JTokvn0PxyNquGwJBAJW+77rSl5WIq8j8yRAnakayrmnQ
+w8ZjBggExsVthorfV8TBAPJMVWmKdOF/W3O62UnRZid+fKKize28S3P1LSECQDF8
+3FJSSWsYH6YnhwDjkz9fJQ281eeB7dL7IlQUV7kY0iHPsCvdtz/HPNcHEuNmWjYX
+sj9VoI0JP/Sv1frRbmcCQDPaeWowPGf1Xtj0oTSlA6KQsKZPO7t15nivgX/AnZWQ
+01l8q6GPHeYwyG/caD3BZwAavsVLg9nhKx0lf0wExM0=
-----END RSA PRIVATE KEY-----
Certificate:
Data:
Version: 3 (0x2)
- Serial Number:
- 0b:98:95:00:0c:7e
- Signature Algorithm: sha1WithRSAEncryption
+ Serial Number: 14269504311662 (0xcfa60bc516e)
+ Signature Algorithm: sha1WithRSAEncryption
Issuer:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
- commonName = Nothern Nowhere Trust Anchor
+ commonName = Northern Nowhere Trust Anchor
Validity
- Not Before: May 27 21:37:54 2010 GMT
- Not After : Aug 13 21:37:54 2018 GMT
+ Not Before: Mar 21 15:07:11 2015 GMT
+ Not After : Jun 7 15:07:11 2023 GMT
Subject:
countryName = NN
organizationName = Edel Curl Arctic Illudium Research Cloud
@@ -60,68 +59,63 @@ Certificate:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:cc:a9:91:2b:22:e8:90:2b:e5:4c:dc:ae:6d:da:
- 4c:f3:32:cc:a5:68:67:5a:3b:b9:86:a3:95:88:3e:
- e8:63:c3:ed:00:60:19:03:2b:5d:5b:56:8a:da:21:
- 5e:71:5c:d1:e3:de:51:18:c1:17:14:b1:33:90:00:
- 5c:9a:e5:73:0b:a8:88:9c:d0:0b:54:bc:ea:3a:39:
- dd:f6:65:81:4b:29:99:4c:71:d3:f7:69:7f:80:e8:
- e8:6d:61:41:83:87:eb:ac:2c:bd:0f:eb:1b:fd:a2:
- 37:97:6d:31:56:ba:4b:51:dd:b1:01:eb:89:f8:25:
- de:5b:a3:e5:b2:3f:4c:77:53
+ 00:e3:c7:52:fb:7d:02:b1:a7:0b:4c:2d:a6:2a:b0:
+ 57:6b:5e:0b:f9:9e:4b:e7:d0:ac:55:43:47:fa:b1:
+ e0:fc:b0:63:30:84:31:f5:95:44:90:9a:b7:22:01:
+ 6f:c7:17:16:be:5a:19:ee:47:35:90:a5:5e:27:ba:
+ 86:47:3b:c5:63:d2:f2:c6:a1:db:ac:be:b1:2f:4c:
+ c2:98:86:19:72:d5:f9:12:45:09:bc:23:e2:00:eb:
+ 4d:ba:99:71:b5:4a:fb:49:8c:4d:f3:0b:4e:cf:48:
+ 7b:c8:06:37:92:35:ff:bb:4f:ea:98:af:13:ac:a8:
+ cd:9f:a7:e0:78:db:15:bc:3b
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:localhost
X509v3 Key Usage:
- Key Encipherment
+ Digital Signature, Key Encipherment, Key Agreement
X509v3 Extended Key Usage:
TLS Web Server Authentication
X509v3 Subject Key Identifier:
- 3B:2B:84:0D:23:3C:46:F9:9B:E5:C2:FA:B7:30:E7:AC:E3:ED:09:C3
+ 23:D7:CE:D8:B2:D0:F8:8E:3C:82:26:6C:F1:F5:2A:8A:48:90:58:66
X509v3 Authority Key Identifier:
- keyid:AD:3E:E2:39:07:B8:5C:AA:26:90:94:4C:26:69:21:83:E2:4E:36:94
+ keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE
- X509v3 Basic Constraints: critical
+ X509v3 Basic Constraints:
CA:FALSE
Signature Algorithm: sha1WithRSAEncryption
- a2:fa:61:4e:c0:10:1f:f8:38:2c:fd:a6:74:85:df:8e:ee:41:
- 90:a1:d7:c9:32:65:5d:61:d5:13:51:3b:11:1c:7b:01:06:70:
- 9f:93:52:54:15:bd:93:3a:f8:40:e3:e2:ab:01:96:fb:73:c5:
- 42:2c:ad:ce:e8:52:57:db:b6:15:90:75:e3:e5:75:99:b0:83:
- ed:b0:fc:f2:d0:d9:3d:68:1c:d9:b4:cd:a1:a9:40:19:44:46:
- 14:8b:11:6e:2e:1c:65:85:73:45:f0:8b:4f:ea:01:2d:61:0f:
- ae:0d:70:0c:d3:3c:1c:1f:24:66:a3:0b:62:d1:87:1e:8e:96:
- f6:43:cf:1c:24:e7:94:d0:7e:b0:ee:1b:6f:14:1f:04:35:e8:
- fc:3c:c8:9e:e3:6e:0e:4c:7d:a9:23:97:2d:6e:b1:4d:e3:05:
- 1b:ce:86:2f:2f:b3:c9:60:47:58:ac:ea:4c:cb:c2:7b:0f:08:
- b8:a7:90:e7:22:32:70:f6:09:3e:f9:54:94:b0:37:50:22:60:
- 49:1c:84:9e:1a:22:0c:3e:a9:16:7c:5e:b1:50:13:6b:82:14:
- d3:8a:3d:4d:ed:18:ca:40:59:d6:b9:72:9f:64:e5:0b:e7:a6:
- b8:ee:29:b5:6a:ec:82:b2:94:56:36:e3:87:b3:07:aa:69:b8:
- 2c:ef:0c:14
+ 28:b9:77:ea:4a:8d:d6:a5:fb:72:5b:d6:cd:60:40:33:56:bf:
+ dd:23:ff:bf:e8:2e:10:cd:30:ab:24:a4:43:d8:98:71:e3:59:
+ 66:3e:38:bd:b8:fb:19:1a:13:8f:a1:c8:39:93:b5:83:8d:62:
+ 52:a9:7a:5b:0d:69:47:40:5c:51:4c:3a:be:a7:c9:5f:7b:93:
+ 49:20:59:23:30:7c:d9:4a:dd:29:2c:ed:96:fd:cb:b8:13:ff:
+ 36:2c:27:ce:28:c3:a6:d0:d8:ba:8c:38:9f:78:ff:54:c7:76:
+ 05:37:47:f5:d3:55:9c:2c:12:41:81:14:ca:48:a2:b7:6d:05:
+ 49:2b:c5:f5:7b:63:6d:6f:cd:3f:f4:8d:74:51:07:ff:e1:40:
+ d5:96:60:d8:c8:38:5a:15:f9:c5:fd:e1:5e:a3:02:95:90:4b:
+ fc:8a:42:de:72:31:72:3d:dd:a2:df:19:42:c8:fa:a8:77:11:
+ 67:e6:64:8c:d0:fd:45:fd:f0:49:8c:e1:85:e6:f5:1f:47:c6:
+ ae:f2:70:c3:e8:99:d0:cd:9d:88:6b:33:ba:b9:65:3d:f4:b1:
+ f4:d0:3c:76:9c:18:9e:9e:c8:62:29:43:8e:f7:2f:2c:12:37:
+ 39:02:26:4e:4b:b0:14:30:80:bb:2d:cc:fc:93:dc:c9:8b:c0:
+ 69:12:71:36
-----BEGIN CERTIFICATE-----
-MIIDQzCCAiugAwIBAgIGC5iVAAx+MA0GCSqGSIb3DQEBBQUAMGcxCzAJBgNVBAYT
+MIIDQTCCAimgAwIBAgIGDPpgvFFuMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
-IENsb3VkMSUwIwYDVQQDDBxOb3RoZXJuIE5vd2hlcmUgVHJ1c3QgQW5jaG9yMB4X
-DTEwMDUyNzIxMzc1NFoXDTE4MDgxMzIxMzc1NFowVDELMAkGA1UEBhMCTk4xMTAv
-BgNVBAoMKEVkZWwgQ3VybCBBcmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQx
-EjAQBgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-zKmRKyLokCvlTNyubdpM8zLMpWhnWju5hqOViD7oY8PtAGAZAytdW1aK2iFecVzR
-495RGMEXFLEzkABcmuVzC6iInNALVLzqOjnd9mWBSymZTHHT92l/gOjobWFBg4fr
-rCy9D+sb/aI3l20xVrpLUd2xAeuJ+CXeW6Plsj9Md1MCAwEAAaOBizCBiDAWBgNV
-HREEDzANggtsb2NhbGhvc3QAaDALBgNVHQ8EBAMCBSAwEwYDVR0lBAwwCgYIKwYB
-BQUHAwEwHQYDVR0OBBYEFDsrhA0jPEb5m+XC+rcw56zj7QnDMB8GA1UdIwQYMBaA
-FK0+4jkHuFyqJpCUTCZpIYPiTjaUMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEF
-BQADggEBAKL6YU7AEB/4OCz9pnSF347uQZCh18kyZV1h1RNROxEcewEGcJ+TUlQV
-vZM6+EDj4qsBlvtzxUIsrc7oUlfbthWQdePldZmwg+2w/PLQ2T1oHNm0zaGpQBlE
-RhSLEW4uHGWFc0Xwi0/qAS1hD64NcAzTPBwfJGajC2LRhx6OlvZDzxwk55TQfrDu
-G28UHwQ16Pw8yJ7jbg5Mfakjly1usU3jBRvOhi8vs8lgR1is6kzLwnsPCLinkOci
-MnD2CT75VJSwN1AiYEkchJ4aIgw+qRZ8XrFQE2uCFNOKPU3tGMpAWda5cp9k5Qvn
-prjuKbVq7IKylFY244ezB6ppuCzvDBQ=
+IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
+Fw0xNTAzMjExNTA3MTFaFw0yMzA2MDcxNTA3MTFaMFQxCzAJBgNVBAYTAk5OMTEw
+LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
+MRIwEAYDVQQDDAlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
+AOPHUvt9ArGnC0wtpiqwV2teC/meS+fQrFVDR/qx4PywYzCEMfWVRJCatyIBb8cX
+Fr5aGe5HNZClXie6hkc7xWPS8sah26y+sS9MwpiGGXLV+RJFCbwj4gDrTbqZcbVK
++0mMTfMLTs9Ie8gGN5I1/7tP6pivE6yozZ+n4HjbFbw7AgMBAAGjgYgwgYUwFgYD
+VR0RBA8wDYILbG9jYWxob3N0AGgwCwYDVR0PBAQDAgOoMBMGA1UdJQQMMAoGCCsG
+AQUFBwMBMB0GA1UdDgQWBBQj187YstD4jjyCJmzx9SqKSJBYZjAfBgNVHSMEGDAW
+gBQSyrpLRgSndYos6A5UlLwSZaZ7zjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBBQUA
+A4IBAQAouXfqSo3WpftyW9bNYEAzVr/dI/+/6C4QzTCrJKRD2Jhx41lmPji9uPsZ
+GhOPocg5k7WDjWJSqXpbDWlHQFxRTDq+p8lfe5NJIFkjMHzZSt0pLO2W/cu4E/82
+LCfOKMOm0Ni6jDifeP9Ux3YFN0f101WcLBJBgRTKSKK3bQVJK8X1e2Ntb80/9I10
+UQf/4UDVlmDYyDhaFfnF/eFeowKVkEv8ikLecjFyPd2i3xlCyPqodxFn5mSM0P1F
+/fBJjOGF5vUfR8au8nDD6JnQzZ2IazO6uWU99LH00Dx2nBienshiKUOO9y8sEjc5
+AiZOS7AUMIC7Lcz8k9zJi8BpEnE2
-----END CERTIFICATE-----
------BEGIN DH PARAMETERS-----
-MIGHAoGBAL/3hRxvWX+Mdyu/aBPU1JeeA5sg4nXtA7B24eCql9Tq53Lks1/HJ5B+
-xSapGAFd+22xhBsNkJihf74oiPEVr9nNoLjFV/DZe259+JYgs+pBTFN+Cp13ALUi
-CeZxX2mlxlstD1SBRTKgxA/j4ttR1Chn8knn+RVdFE9YFKCYPyLrAgEC
------END DH PARAMETERS-----
diff --git a/tests/certs/Server-localhost0h-sv.prm b/tests/certs/Server-localhost0h-sv.prm
index 5e8944b3..619d8255 100644
--- a/tests/certs/Server-localhost0h-sv.prm
+++ b/tests/certs/Server-localhost0h-sv.prm
@@ -2,11 +2,11 @@ extensions = x509v3
[ x509v3 ]
#subjectAltName = DNS:localhost\0h
subjectAltName = DER:30:0d:82:0b:6c:6f:63:61:6c:68:6f:73:74:00:68
-keyUsage = keyEncipherment
+keyUsage = keyEncipherment,digitalSignature,keyAgreement
extendedKeyUsage = serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
-basicConstraints = critical,CA:false
+basicConstraints = CA:false
[ req ]
default_bits = 1024
distinguished_name = req_DN
diff --git a/tests/certs/Server-localhost0h-sv.pub.der b/tests/certs/Server-localhost0h-sv.pub.der
new file mode 100644
index 00000000..1b079f42
--- /dev/null
+++ b/tests/certs/Server-localhost0h-sv.pub.der
Binary files differ
diff --git a/tests/certs/Server-localhost0h-sv.pub.pem b/tests/certs/Server-localhost0h-sv.pub.pem
new file mode 100644
index 00000000..c34cc776
--- /dev/null
+++ b/tests/certs/Server-localhost0h-sv.pub.pem
@@ -0,0 +1,6 @@
+-----BEGIN PUBLIC KEY-----
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjx1L7fQKxpwtMLaYqsFdrXgv5
+nkvn0KxVQ0f6seD8sGMwhDH1lUSQmrciAW/HFxa+WhnuRzWQpV4nuoZHO8Vj0vLG
+odusvrEvTMKYhhly1fkSRQm8I+IA6026mXG1SvtJjE3zC07PSHvIBjeSNf+7T+qY
+rxOsqM2fp+B42xW8OwIDAQAB
+-----END PUBLIC KEY-----
diff --git a/tests/certs/scripts/Makefile.am b/tests/certs/scripts/Makefile.am
new file mode 100644
index 00000000..ffc1449b
--- /dev/null
+++ b/tests/certs/scripts/Makefile.am
@@ -0,0 +1,29 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign
+
+SCRIPTFILES = \
+ genroot.sh \
+ genserv.sh
+
+EXTRA_DIST = $(SCRIPTFILES)
+
diff --git a/tests/certs/scripts/genroot.sh b/tests/certs/scripts/genroot.sh
index 6ac13887..4d2118aa 100755
--- a/tests/certs/scripts/genroot.sh
+++ b/tests/certs/scripts/genroot.sh
@@ -50,15 +50,15 @@ echo "openssl x509 -set_serial $SERIAL -extfile $PREFIX-ca.prm -days $DURATION -
$OPENSSL x509 -set_serial $SERIAL -extfile $PREFIX-ca.prm -days $DURATION -req -signkey $PREFIX-ca.key -in $PREFIX-ca.csr -out $PREFIX-$SERIAL-ca.cacert -sha1
-echo "openssl x509 -text -hash -out $PREFIX-ca.cacert -in $PREFIX-$SERIAL-ca.cacert -nameopt multiline"
-$OPENSSL x509 -text -hash -out $PREFIX-ca.cacert -in $PREFIX-$SERIAL-ca.cacert -nameopt multiline
+echo "openssl x509 -text -in $PREFIX-$SERIAL-ca.cacert -nameopt multiline > $PREFIX-ca.cacert "
+$OPENSSL x509 -text -in $PREFIX-$SERIAL-ca.cacert -nameopt multiline > $PREFIX-ca.cacert
echo "openssl x509 -in $PREFIX-ca.cacert -outform der -out $PREFIX-ca.der "
$OPENSSL x509 -in $PREFIX-ca.cacert -outform der -out $PREFIX-ca.der
-echo "openssl x509 -in $PREFIX-ca.cacert -text -out $PREFIX-ca.crt -nameopt multiline"
+echo "openssl x509 -in $PREFIX-ca.cacert -text -nameopt multiline > $PREFIX-ca.crt "
-$OPENSSL x509 -in $PREFIX-ca.cacert -text -out $PREFIX-ca.crt -nameopt multiline
+$OPENSSL x509 -in $PREFIX-ca.cacert -text -nameopt multiline > $PREFIX-ca.crt
echo "openssl x509 -noout -text -in $PREFIX-ca.cacert -nameopt multiline"
$OPENSSL x509 -noout -text -in $PREFIX-ca.cacert -nameopt multiline
diff --git a/tests/certs/scripts/genserv.sh b/tests/certs/scripts/genserv.sh
index a70da9c7..e7845c5c 100755
--- a/tests/certs/scripts/genserv.sh
+++ b/tests/certs/scripts/genserv.sh
@@ -75,9 +75,15 @@ echo "openssl rsa -in $PREFIX-sv.key -out $PREFIX-sv.key"
$OPENSSL rsa -in $PREFIX-sv.key -out $PREFIX-sv.key -passin pass:secret
echo pseudo secrets generated
-echo "openssl x509 -set_serial $SERIAL -extfile $PREFIX-sv.prm -days $DURATION -CA $CAPREFIX-ca.cacert -CAkey $CAPREFIX-ca.key -in $PREFIX-sv.csr -req -out $PREFIX-sv.crt -text -nameopt multiline -sha1"
+echo "openssl rsa -in $PREFIX-sv.key -pubout -outform DER -out $PREFIX-sv.pub.der"
+$OPENSSL rsa -in $PREFIX-sv.key -pubout -outform DER -out $PREFIX-sv.pub.der
-$OPENSSL x509 -set_serial $SERIAL -extfile $PREFIX-sv.prm -days $DURATION -CA $CAPREFIX-ca.cacert -CAkey $CAPREFIX-ca.key -in $PREFIX-sv.csr -req -out $PREFIX-sv.crt -text -nameopt multiline -sha1
+echo "openssl rsa -in $PREFIX-sv.key -pubout -outform PEM -out $PREFIX-sv.pub.pem"
+$OPENSSL rsa -in $PREFIX-sv.key -pubout -outform PEM -out $PREFIX-sv.pub.pem
+
+echo "openssl x509 -set_serial $SERIAL -extfile $PREFIX-sv.prm -days $DURATION -CA $CAPREFIX-ca.cacert -CAkey $CAPREFIX-ca.key -in $PREFIX-sv.csr -req -text -nameopt multiline -sha1 > $PREFIX-sv.crt "
+
+$OPENSSL x509 -set_serial $SERIAL -extfile $PREFIX-sv.prm -days $DURATION -CA $CAPREFIX-ca.cacert -CAkey $CAPREFIX-ca.key -in $PREFIX-sv.csr -req -text -nameopt multiline -sha1 > $PREFIX-sv.crt
if [ "$P12." = YES. ] ; then
diff --git a/tests/certs/srp-verifier-conf b/tests/certs/srp-verifier-conf
new file mode 100644
index 00000000..67825cea
--- /dev/null
+++ b/tests/certs/srp-verifier-conf
@@ -0,0 +1,3 @@
+1:Ewl2hcjiutMd3Fu2lgFnUXWSc67TVyy2vwYCKoS9MLsrdJVT9RgWTCuEqWJrfB6uE3LsE9GkOlaZabS7M29sj5TnzUqOLJMjiwEzArfiLr9WbMRANlF68N5AVLcPWvNx6Zjl3m5Scp0BzJBz9TkgfhzKJZ.WtP3Mv/67I/0wmRZ:2
+2:dUyyhxav9tgnyIg65wHxkzkb7VIPh4o0lkwfOKiPp4rVJrzLRYVBtb76gKlaO7ef5LYGEw3G.4E0jbMxcYBetDy2YdpiP/3GWJInoBbvYHIRO9uBuxgsFKTKWu7RnR7yTau/IrFTdQ4LY/q.AvoCzMxV0PKvD9Odso/LFIItn8PbTov3VMn/ZEH2SqhtpBUkWtmcIkEflhX/YY/fkBKfBbe27/zUaKUUZEUYZ2H2nlCL60.JIPeZJSzsu/xHDVcx:2
+3:2iQzj1CagQc/5ctbuJYLWlhtAsPHc7xWVyCPAKFRLWKADpASkqe9djWPFWTNTdeJtL8nAhImCn3Sr/IAdQ1FrGw0WvQUstPx3FO9KNcXOwisOQ1VlL.gheAHYfbYyBaxXL.NcJx9TUwgWDT0hRzFzqSrdGGTN3FgSTA1v4QnHtEygNj3eZ.u0MThqWUaDiP87nqha7XnT66bkTCkQ8.7T8L4KZjIImrNrUftedTTBi.WCi.zlrBxDuOM0da0JbUkQlXqvp0yvJAPpC11nxmmZOAbQOywZGmu9nhZNuwTlxjfIro0FOdthaDTuZRL9VL7MRPUDo/DQEyW.d4H.UIlzp:2
diff --git a/tests/certs/srp-verifier-db b/tests/certs/srp-verifier-db
new file mode 100644
index 00000000..2f851a34
--- /dev/null
+++ b/tests/certs/srp-verifier-db
@@ -0,0 +1,2 @@
+jsmith:34fPk7u.w3R/M1k2sQ9F.04GZqLKAsqDn44CHGu7ML0M8VWwu1p79OLxi6jRhSNdSM46Kx9GRVyJLXz7eok53..A6X5p3NdnMSYX8WwYrDmuseHDr.eua7gjd04S4EoY4ZuKix2.WGAsMTwk86AmTvcqyzqsH7GDhGOHEhjP5zs:lTjBBoK04K9vTKiL10rI/:1
+alice:3IIP1g1HDTN6VEUr8DUkMleocoC1cpuFZnmunDaGhMyIsw8LAwCc7ZapWaC66gZSyis4ezSuCqvhsJdwdc.0es2UrH6PBkBQflcQDuC.dEpjhWgAcH2Dw.2qU.E0ApQzLkcKOjXMQ2R6jMBL14kEUPjjHS3aa16yB.Afj3bNPdf:1JxU4GkweUEii6.b0grkzU:1
diff --git a/tests/convsrctest.pl b/tests/convsrctest.pl
new file mode 100755
index 00000000..ee442394
--- /dev/null
+++ b/tests/convsrctest.pl
@@ -0,0 +1,255 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+#***************************************************************************
+
+#=======================================================================
+# Read a test definition which exercises curl's --libcurl option.
+# Generate either compilable source code for a new test tool,
+# or a new test definition which runs the tool and expects the
+# same output.
+# This should verify that the --libcurl code really does perform
+# the same actions as the original curl invocation.
+#-----------------------------------------------------------------------
+# The output of curl's --libcurl option differs in several ways from
+# the code needed to integrate with the test tool environment:
+# - #include "test.h"
+# - no call of curl_global_init & curl_global_cleanup
+# - main() function vs. test() function
+# - no checking of curl_easy_setopt calls vs. test_setopt wrapper
+# - handling of stdout
+# - variable names ret & hnd vs. res & curl
+# - URL as literal string vs. passed as argument
+#=======================================================================
+use strict;
+require "getpart.pm";
+
+# Boilerplate code for test tool
+my $head =
+'#include "test.h"
+#include "memdebug.h"
+
+int test(char *URL)
+{
+ CURLcode res;
+ CURL *curl;
+';
+# Other declarations from --libcurl come here
+# e.g. curl_slist
+my $init =
+'
+ 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;
+ }
+';
+# Option setting, perform and cleanup come here
+my $exit =
+' curl_global_cleanup();
+
+ return (int)res;
+}
+';
+
+my $myname = leaf($0);
+sub usage {die "Usage: $myname -c|-test=num testfile\n";}
+
+sub main {
+ @ARGV == 2
+ or usage;
+ my($opt,$testfile) = @ARGV;
+
+ if(loadtest($testfile)) {
+ die "$myname: $testfile doesn't look like a test case\n";
+ }
+
+ my $comment = sprintf("DO NOT EDIT - generated from %s by %s",
+ leaf($testfile), $myname);
+ if($opt eq '-c') {
+ generate_c($comment);
+ }
+ elsif(my($num) = $opt =~ /^-test=(\d+)$/) {
+ generate_test($comment, $num);
+ }
+ else {
+ usage;
+ }
+}
+
+sub generate_c {
+ my($comment) = @_;
+ # Fetch the generated code, which is the output file checked by
+ # the old test.
+ my @libcurl = getpart("verify", "file")
+ or die "$myname: no <verify><file> section found\n";
+
+ # Mangle the code into a suitable form for a test tool.
+ # We want to extract the important parts (declarations,
+ # URL, setopt calls, cleanup code) from the --libcurl
+ # boilerplate and insert them into a new boilerplate.
+ my(@decl,@code);
+ # First URL passed in as argument, others as global
+ my @urlvars = ('URL', 'libtest_arg2', 'libtest_arg3');
+ my($seen_main,$seen_setopt,$seen_return);
+ foreach (@libcurl) {
+ # Check state changes first (even though it
+ # duplicates some matches) so that the other tests
+ # are in a logical order).
+ if(/^int main/) {
+ $seen_main = 1;
+ }
+ if($seen_main and /curl_easy_setopt/) {
+ # Don't match 'curl_easy_setopt' in comment!
+ $seen_setopt = 1;
+ }
+ if(/^\s*return/) {
+ $seen_return = 1;
+ }
+
+ # Now filter the code according to purpose
+ if(! $seen_main) {
+ next;
+ }
+ elsif(! $seen_setopt) {
+ if(/^\s*(int main|\{|CURLcode |CURL |hnd = curl_easy_init)/) {
+ # Initialisations handled by boilerplate
+ next;
+ }
+ else {
+ push @decl, $_;
+ }
+ }
+ elsif(! $seen_return) {
+ if(/CURLOPT_URL/) {
+ # URL is passed in as argument or by global
+ my $var = shift @urlvars;
+ s/\"[^\"]*\"/$var/;
+ }
+ s/\bhnd\b/curl/;
+ # Convert to macro wrapper
+ s/curl_easy_setopt/test_setopt/;
+ if(/curl_easy_perform/) {
+ s/\bret\b/res/;
+ push @code, $_;
+ push @code, "test_cleanup:\n";
+ }
+ else {
+ push @code, $_;
+ }
+ }
+ }
+
+ print ("/* $comment */\n",
+ $head,
+ @decl,
+ $init,
+ @code,
+ $exit);
+}
+
+# Read the original test data file and transform it
+# - add a "DO NOT EDIT comment"
+# - replace CURLOPT_URL string with URL variable
+# - remove <verify><file> section (was the --libcurl output)
+# - insert a <client><tool> section with our new C program name
+# - replace <client><command> section with the URL
+sub generate_test {
+ my($comment,$newnumber) = @_;
+ my @libcurl = getpart("verify", "file")
+ or die "$myname: no <verify><file> section found\n";
+ # Scan the --libcurl code to find the URL used.
+ my $url;
+ foreach (@libcurl) {
+ if(my($u) = /CURLOPT_URL, \"([^\"]*)\"/) {
+ $url = $u;
+ }
+ }
+ die "$myname: CURLOPT_URL not found\n"
+ unless defined $url;
+
+ # Traverse the pseudo-XML transforming as required
+ my @new;
+ my(@path,$path,$skip);
+ foreach (getall()) {
+ if(my($end) = /\s*<(\/?)testcase>/) {
+ push @new, $_;
+ push @new, "# $comment\n"
+ unless $end;
+ }
+ elsif(my($tag) = /^\s*<(\w+)/) {
+ push @path, $tag;
+ $path = join '/', @path;
+ if($path eq 'verify/file') {
+ $skip = 1;
+ }
+ push @new, $_
+ unless $skip;
+ if($path eq 'client') {
+ push @new, ("<tool>\n",
+ "lib$newnumber\n",
+ "</tool>\n");
+ }
+ elsif($path eq 'client/command') {
+ push @new, sh_quote($url)."\n";
+ }
+ }
+ elsif(my($etag) = /^\s*<\/(\w+)/) {
+ my $tag = pop @path;
+ die "$myname: mismatched </$etag>\n"
+ unless $tag eq $etag;
+ push @new, $_
+ unless $skip;
+ $skip --
+ if $path eq 'verify/file';
+ $path = join '/', @path;
+ }
+ else {
+ if($path eq 'client/command') {
+ # Replaced above
+ }
+ else {
+ push @new, $_
+ unless $skip;
+ }
+ }
+ }
+ print @new;
+}
+
+sub leaf {
+ # Works for POSIX filenames
+ (my $path = shift) =~ s!.*/!!;
+ return $path;
+}
+
+sub sh_quote {
+ my $word = shift;
+ $word =~ s/[\$\"\'\\]/\\$&/g;
+ return '"' . $word . '"';
+}
+
+main;
diff --git a/tests/data/.gitattributes b/tests/data/.gitattributes
new file mode 100644
index 00000000..4636c2cc
--- /dev/null
+++ b/tests/data/.gitattributes
@@ -0,0 +1 @@
+test* -crlf
diff --git a/tests/data/.gitignore b/tests/data/.gitignore
new file mode 100644
index 00000000..124ebf93
--- /dev/null
+++ b/tests/data/.gitignore
@@ -0,0 +1 @@
+DISABLED.local
diff --git a/tests/data/CMakeLists.txt b/tests/data/CMakeLists.txt
new file mode 100644
index 00000000..dec92e54
--- /dev/null
+++ b/tests/data/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Loads 'TESTCASES' from for the 'make show' target in runtests.pl
+transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
+include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
+
+# Prints all available test cases. Do not quote TESTCASES, it must be displayed
+# as a space-separated string rather than comma-separated (a list in CMake).
+add_custom_target(show COMMAND echo ${TESTCASES})
diff --git a/tests/data/DISABLED b/tests/data/DISABLED
index b6071cbd..6a0119db 100644
--- a/tests/data/DISABLED
+++ b/tests/data/DISABLED
@@ -2,4 +2,11 @@
# test cases are run by runtests.pl. Just add the plain test case numbers, one
# per line.
# Lines starting with '#' letters are treated as comments.
-564
+594
+1209
+1211
+1316
+1512
+836
+882
+938
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 93709741..a4b281f3 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -2,73 +2,10 @@ iall:
install:
test:
-EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
- test10 test109 test118 test13 test200 test28 test36 test47 test100 test11 \
- test119 test14 test201 test29 test37 test5 test101 test110 test12 test15 \
- test202 test3 test4 test6 test102 test111 test120 test16 test21 test30 \
- test7 test103 test112 test121 test17 test22 test300 test8 test104 test113 \
- test122 test18 test23 test301 test9 test105 test114 test123 test19 test24 \
- test302 test43 test31 test106 test115 test124 test190 test25 test303 \
- test44 test38 test107 test116 test125 test2 test26 test33 test45 test126 \
- test304 test39 test32 test128 test48 test306 test130 test131 test132 \
- test133 test134 test135 test305 test49 test50 test51 test52 test53 test54 \
- test55 test56 test500 test501 test502 test503 test504 test136 test57 \
- test137 test138 test58 test139 test140 test141 test59 test60 test61 \
- test142 test143 test62 test63 test64 test65 test66 test144 test145 test67 \
- test68 test41 test40 test42 test69 test70 test71 test72 test73 test146 \
- test505 test74 test75 test76 test77 test78 test147 test148 test506 test79 \
- test80 test81 test82 test83 test84 test85 test86 test87 test507 test149 \
- test88 test89 test90 test508 test91 test92 test203 test93 test94 test95 \
- test510 test97 test98 test99 test150 test151 test152 test153 test154 \
- test155 test156 test157 test158 test159 test511 test160 test161 test162 \
- test163 test164 test512 test165 test166 test167 test168 test169 test170 \
- test171 test172 test204 test205 test173 test174 test175 test176 test177 \
- test513 test514 test178 test179 test180 test181 test182 test183 test184 \
- test185 test186 test187 test188 test189 test191 test192 test193 test194 \
- test195 test196 test197 test198 test515 test516 test517 test518 test210 \
- test211 test212 test220 test221 test222 test223 test224 test206 test207 \
- test208 test209 test213 test240 test241 test242 test519 test214 test215 \
- test216 test217 test218 test199 test225 test226 test227 test228 test229 \
- test233 test234 test235 test236 test520 test237 test238 test239 test243 \
- test245 test246 test247 test248 test249 test250 test251 test252 test253 \
- test254 test255 test521 test522 test523 test256 test257 test258 test259 \
- test260 test261 test262 test263 test264 test265 test266 test267 test268 \
- test269 test270 test271 test272 test273 test274 test275 test524 test525 \
- test276 test277 test526 test527 test528 test530 DISABLED test278 test279 \
- test531 test280 test529 test532 test533 test534 test535 test281 test537 \
- test282 test283 test284 test538 test285 test286 test307 test308 test287 \
- test400 test288 test600 test601 test602 test603 test401 test402 test290 \
- test291 test292 test293 test403 test404 test405 test604 test605 test606 \
- test607 test608 test609 test294 test295 test296 test297 test298 test610 \
- test611 test612 test406 test407 test408 test409 test613 test614 test700 \
- test701 test702 test704 test705 test703 test706 test707 test350 test351 \
- test352 test353 test289 test540 test354 test231 test1000 test1001 \
- test1002 test1003 test1004 test1005 test1006 test615 test1007 test541 \
- test1010 test1011 test1012 test542 test543 test536 test1008 test1009 \
- test2000 test2001 test2002 test2003 test35 test544 test545 test2004 \
- test546 test1013 test1014 test1015 test547 test548 test549 test550 \
- test551 test552 test1016 test1017 test1018 test1019 test1020 test553 \
- test1021 test1022 test1023 test309 test616 test617 test618 test619 \
- test620 test621 test622 test623 test624 test625 test626 test627 test554 \
- test1024 test1025 test555 test1026 test1027 test1028 test1029 test1030 \
- test556 test557 test1031 test628 test629 test630 test631 test632 test1032 \
- test1033 test539 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 test633 test634 \
- test635 test636 test637 test558 test559 test1086 test1087 test1088 \
- test574 test575 test576 test577 test1113 test1114 test1089 test1090 \
- test1091 test1092 test1093 test1094 test1095 test1096 test1097 test560 \
- test561 test1098 test1099 test562 test563 test1100 test564 test1101 \
- test1102 test1103 test1104 test299 test310 test311 test312 test1105 \
- test565 test800 test1106 test801 test566 test802 test803 test1107 \
- test1108 test1109 test1110 test1111 test1112 test129 test567 test568 \
- test569 test570 test571 test572 test804 test805 test806 test807 test573 \
- test313 test1115 test578 test579 test1116 test1200 test1201 test1202 \
- test1203 test1117
+# TESTCASES are taken from Makefile.inc
+include Makefile.inc
+
+EXTRA_DIST = $(TESTCASES) DISABLED
filecheck:
@mkdir test-place; \
diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in
deleted file mode 100644
index 435b126c..00000000
--- a/tests/data/Makefile.in
+++ /dev/null
@@ -1,495 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = tests/data
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
- test10 test109 test118 test13 test200 test28 test36 test47 test100 test11 \
- test119 test14 test201 test29 test37 test5 test101 test110 test12 test15 \
- test202 test3 test4 test6 test102 test111 test120 test16 test21 test30 \
- test7 test103 test112 test121 test17 test22 test300 test8 test104 test113 \
- test122 test18 test23 test301 test9 test105 test114 test123 test19 test24 \
- test302 test43 test31 test106 test115 test124 test190 test25 test303 \
- test44 test38 test107 test116 test125 test2 test26 test33 test45 test126 \
- test304 test39 test32 test128 test48 test306 test130 test131 test132 \
- test133 test134 test135 test305 test49 test50 test51 test52 test53 test54 \
- test55 test56 test500 test501 test502 test503 test504 test136 test57 \
- test137 test138 test58 test139 test140 test141 test59 test60 test61 \
- test142 test143 test62 test63 test64 test65 test66 test144 test145 test67 \
- test68 test41 test40 test42 test69 test70 test71 test72 test73 test146 \
- test505 test74 test75 test76 test77 test78 test147 test148 test506 test79 \
- test80 test81 test82 test83 test84 test85 test86 test87 test507 test149 \
- test88 test89 test90 test508 test91 test92 test203 test93 test94 test95 \
- test510 test97 test98 test99 test150 test151 test152 test153 test154 \
- test155 test156 test157 test158 test159 test511 test160 test161 test162 \
- test163 test164 test512 test165 test166 test167 test168 test169 test170 \
- test171 test172 test204 test205 test173 test174 test175 test176 test177 \
- test513 test514 test178 test179 test180 test181 test182 test183 test184 \
- test185 test186 test187 test188 test189 test191 test192 test193 test194 \
- test195 test196 test197 test198 test515 test516 test517 test518 test210 \
- test211 test212 test220 test221 test222 test223 test224 test206 test207 \
- test208 test209 test213 test240 test241 test242 test519 test214 test215 \
- test216 test217 test218 test199 test225 test226 test227 test228 test229 \
- test233 test234 test235 test236 test520 test237 test238 test239 test243 \
- test245 test246 test247 test248 test249 test250 test251 test252 test253 \
- test254 test255 test521 test522 test523 test256 test257 test258 test259 \
- test260 test261 test262 test263 test264 test265 test266 test267 test268 \
- test269 test270 test271 test272 test273 test274 test275 test524 test525 \
- test276 test277 test526 test527 test528 test530 DISABLED test278 test279 \
- test531 test280 test529 test532 test533 test534 test535 test281 test537 \
- test282 test283 test284 test538 test285 test286 test307 test308 test287 \
- test400 test288 test600 test601 test602 test603 test401 test402 test290 \
- test291 test292 test293 test403 test404 test405 test604 test605 test606 \
- test607 test608 test609 test294 test295 test296 test297 test298 test610 \
- test611 test612 test406 test407 test408 test409 test613 test614 test700 \
- test701 test702 test704 test705 test703 test706 test707 test350 test351 \
- test352 test353 test289 test540 test354 test231 test1000 test1001 \
- test1002 test1003 test1004 test1005 test1006 test615 test1007 test541 \
- test1010 test1011 test1012 test542 test543 test536 test1008 test1009 \
- test2000 test2001 test2002 test2003 test35 test544 test545 test2004 \
- test546 test1013 test1014 test1015 test547 test548 test549 test550 \
- test551 test552 test1016 test1017 test1018 test1019 test1020 test553 \
- test1021 test1022 test1023 test309 test616 test617 test618 test619 \
- test620 test621 test622 test623 test624 test625 test626 test627 test554 \
- test1024 test1025 test555 test1026 test1027 test1028 test1029 test1030 \
- test556 test557 test1031 test628 test629 test630 test631 test632 test1032 \
- test1033 test539 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 test633 test634 \
- test635 test636 test637 test558 test559 test1086 test1087 test1088 \
- test574 test575 test576 test577 test1113 test1114 test1089 test1090 \
- test1091 test1092 test1093 test1094 test1095 test1096 test1097 test560 \
- test561 test1098 test1099 test562 test563 test1100 test564 test1101 \
- test1102 test1103 test1104 test299 test310 test311 test312 test1105 \
- test565 test800 test1106 test801 test566 test802 test803 test1107 \
- test1108 test1109 test1110 test1111 test1112 test129 test567 test568 \
- test569 test570 test571 test572 test804 test805 test806 test807 test573 \
- test313 test1115 test578 test579 test1116 test1200 test1201 test1202 \
- test1203 test1117
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/data/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign tests/data/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-info-am
-
-iall:
-install:
-test:
-
-filecheck:
- @mkdir test-place; \
- cp "$(top_srcdir)"/tests/data/test[0-9]* test-place/; \
- rm test-place/*~; \
- for f in $(EXTRA_DIST); do \
- if test -f "$(top_srcdir)/tests/data/$$f"; then \
- rm -f "test-place/$$f"; \
- else \
- echo "$$f is listed but missing!"; \
- fi \
- done; \
- echo "Local files not present in EXTRA_DIST:" ; \
- ls test-place; \
- ! ls test-place | grep . >/dev/null ; \
- RC=$$? ; \
- rm -rf test-place ; \
- exit $$RC
-
-show:
- @echo $(EXTRA_DIST)
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
new file mode 100644
index 00000000..73877c67
--- /dev/null
+++ b/tests/data/Makefile.inc
@@ -0,0 +1,169 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 test837 test838 test839 test840 \
+\
+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 test883 test884 test885 \
+test886 \
+\
+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 test942 test943 test944 \
+test945 \
+\
+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 test1135 \
+\
+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 test1241 \
+\
+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 test1421 test1422 test1423 \
+test1424 \
+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 test1530 \
+\
+test1600 test1601 test1602 \
+\
+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 test2039 \
+test2040
diff --git a/tests/data/test100 b/tests/data/test100
index 6127163b..72f9c856 100644
--- a/tests/data/test100
+++ b/tests/data/test100
@@ -11,11 +11,11 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<data mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
-drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT
+drwxr-xr-x 2 98 98 512 May 2 1996 curl-releases
-r--r--r-- 1 0 1 35 Jul 16 1996 README
lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
@@ -23,7 +23,7 @@ drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
-</datacheck>
+</data>
</reply>
#
@@ -36,7 +36,7 @@ ftp
FTP dir list PASV
</name>
<command>
-ftp://%HOSTIP:%FTPPORT/
+ftp://%HOSTIP:%FTPPORT/test-100/
</command>
</client>
@@ -47,6 +47,7 @@ ftp://%HOSTIP:%FTPPORT/
USER anonymous
PASS ftp@example.com
PWD
+CWD test-100
EPSV
TYPE A
LIST
diff --git a/tests/data/test1001 b/tests/data/test1001
index 9a87d6e8..91b13203 100644
--- a/tests/data/test1001
+++ b/tests/data/test1001
@@ -63,6 +63,10 @@ ok
<server>
http
</server>
+<features>
+!SSPI
+crypto
+</features>
<name>
HTTP POST --digest with PUT and resumed upload and modified method
</name>
@@ -81,18 +85,17 @@ test
</strip>
<protocol>
GET http://%HOSTIP:%HTTPPORT/1001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Content-Range: bytes 2-4/5
User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 0
-Expect: 100-continue
GET http://%HOSTIP:%HTTPPORT/1001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1001", response="6af4d89c952f4dd4cc215a6878dc499d"
Content-Range: bytes 2-4/5
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 3
diff --git a/tests/data/test1002 b/tests/data/test1002
index 04c18f91..83cce6e4 100644
--- a/tests/data/test1002
+++ b/tests/data/test1002
@@ -62,6 +62,10 @@ ok
<server>
http
</server>
+<features>
+!SSPI
+crypto
+</features>
<name>
HTTP POST --digest with PUT and resumed upload and modified method, twice
</name>
@@ -80,18 +84,17 @@ test
</strip>
<protocol>
GET http://%HOSTIP:%HTTPPORT/1002.upload1 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Content-Range: bytes 2-4/5
User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 0
-Expect: 100-continue
GET http://%HOSTIP:%HTTPPORT/1002.upload1 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1002.upload1", response="198aa9b6acb4b0c71d02a197a5e41f54"
Content-Range: bytes 2-4/5
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 3
@@ -99,10 +102,10 @@ Expect: 100-continue
st
GET http://%HOSTIP:%HTTPPORT/1002.upload2 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1002.upload2", response="d711f0d2042786d930de635ba0d1a1d0"
Content-Range: bytes 2-4/5
User-Agent: curl/7.16.1
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 3
diff --git a/tests/data/test1008 b/tests/data/test1008
index 5334f856..bcc503e5 100644
--- a/tests/data/test1008
+++ b/tests/data/test1008
@@ -11,9 +11,12 @@ HTTP proxy NTLM auth
# Server-side
<reply>
+<servercmd>
+connection-monitor
+</servercmd>
# this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
Transfer-Encoding: chunked
@@ -24,16 +27,16 @@ FA0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0
-</data1001>
+</connect1001>
# This is supposed to be returned when the server gets the second
# Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
HTTP/1.1 200 Things are fine in proxy land
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
-</data1002>
+</connect1002>
# this is returned when we get a GET!
<data2>
@@ -82,6 +85,8 @@ http
</server>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP proxy CONNECT auth NTLM with chunked-encoded 407 response
@@ -93,7 +98,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://test.remote.haxx.se:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
+http://test.remote.example.com.1008:%HTTPPORT/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
</command>
<precheck>
chkhostname curlhost
@@ -106,21 +111,22 @@ chkhostname curlhost
^User-Agent: curl/.*
</strip>
<protocol>
-CONNECT test.remote.haxx.se:1008 HTTP/1.1
-Host: test.remote.haxx.se:1008
+CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.1008:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
Proxy-Connection: Keep-Alive
-CONNECT test.remote.haxx.se:1008 HTTP/1.1
-Host: test.remote.haxx.se:1008
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
+CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.1008:%HTTPPORT
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
GET /path/10080002 HTTP/1.1
User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
-Host: test.remote.haxx.se:1008
+Host: test.remote.example.com.1008:%HTTPPORT
Accept: */*
+[DISCONNECT]
</protocol>
</verify>
</testcase>
diff --git a/tests/data/test101 b/tests/data/test101
index 815292b2..09faade2 100644
--- a/tests/data/test101
+++ b/tests/data/test101
@@ -10,7 +10,7 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test1010 b/tests/data/test1010
index 1f8bf3a8..a51d68ab 100644
--- a/tests/data/test1010
+++ b/tests/data/test1010
@@ -11,7 +11,7 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test1011 b/tests/data/test1011
index 62ba074a..566867dd 100644
--- a/tests/data/test1011
+++ b/tests/data/test1011
@@ -10,31 +10,31 @@ followlocation
# Server-side
<reply>
<data>
-HTTP/1.1 301 OK swsclose
+HTTP/1.1 301 OK
Location: moo.html&testcase=/10110002
Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
+Content-Length: 0
</data>
<data2>
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body
</data2>
<datacheck>
-HTTP/1.1 301 OK swsclose
+HTTP/1.1 301 OK
Location: moo.html&testcase=/10110002
Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 0
+
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
Connection: close
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
body
</datacheck>
</reply>
diff --git a/tests/data/test1012 b/tests/data/test1012
index 6aa17156..4edc1731 100644
--- a/tests/data/test1012
+++ b/tests/data/test1012
@@ -17,11 +17,11 @@ Connection: close
</data>
<data2>
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body
</data2>
<datacheck>
@@ -30,11 +30,11 @@ Location: moo.html&testcase=/10120002
Date: Thu, 09 Nov 2010 14:49:00 GMT
Connection: close
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body
</datacheck>
</reply>
diff --git a/tests/data/test1015 b/tests/data/test1015
index c1674664..a2b2cefa 100644
--- a/tests/data/test1015
+++ b/tests/data/test1015
@@ -1,6 +1,8 @@
<testcase>
<info>
<keywords>
+HTTP
+HTTP POST
--data-urlencode
</keywords>
</info>
diff --git a/tests/data/test1021 b/tests/data/test1021
index 5ab77287..3ac9e12e 100644
--- a/tests/data/test1021
+++ b/tests/data/test1021
@@ -12,32 +12,32 @@ HTTP proxy NTLM auth
# Server-side
<reply>
-<data>
+<connect>
HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
Proxy-Authenticate: NTLM
Content-Length: 21
Connection: close
data to discard
-</data>
+</connect>
# this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
Content-Length: 28
And you should ignore this data.
-</data1001>
+</connect1001>
# This is supposed to be returned when the server gets the second
# Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
HTTP/1.1 200 Things are fine in proxy land
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
-</data1002>
+</connect1002>
# this is returned when we get a GET!
<data2>
@@ -91,6 +91,8 @@ http
</server>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close
@@ -102,7 +104,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://test.remote.haxx.se:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel
+http://test.remote.example.com.1021:%HTTPPORT/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth --proxytunnel
</command>
<precheck>
chkhostname curlhost
@@ -115,23 +117,23 @@ chkhostname curlhost
^User-Agent: curl/.*
</strip>
<protocol>
-CONNECT test.remote.haxx.se:1021 HTTP/1.1
-Host: test.remote.haxx.se:1021
+CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.1021:%HTTPPORT
Proxy-Connection: Keep-Alive
-CONNECT test.remote.haxx.se:1021 HTTP/1.1
-Host: test.remote.haxx.se:1021
+CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.1021:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
Proxy-Connection: Keep-Alive
-CONNECT test.remote.haxx.se:1021 HTTP/1.1
-Host: test.remote.haxx.se:1021
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
+CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.1021:%HTTPPORT
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
GET /path/10210002 HTTP/1.1
User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
-Host: test.remote.haxx.se:1021
+Host: test.remote.example.com.1021:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test1029 b/tests/data/test1029
index 9c2bc5ff..2ffc7c64 100644
--- a/tests/data/test1029
+++ b/tests/data/test1029
@@ -12,11 +12,11 @@ followlocation
# Server-side
<reply>
<data nocheck="yes">
-HTTP/1.1 301 This is a weirdo text message swsclose
-Location: data/10290002.txt?coolsite=yes
-Content-Length: 62
-Connection: close
-
+HTTP/1.1 301 This is a weirdo text message swsclose
+Location: data/10290002.txt?coolsite=yes
+Content-Length: 62
+Connection: close
+
This server reply is for testing a simple Location: following
</data>
</reply>
@@ -45,12 +45,12 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
-<stdout mode="text">
-HTTP/1.1 301 This is a weirdo text message swsclose
-Location: data/10290002.txt?coolsite=yes
-Content-Length: 62
-Connection: close
-
+<stdout>
+HTTP/1.1 301 This is a weirdo text message swsclose
+Location: data/10290002.txt?coolsite=yes
+Content-Length: 62
+Connection: close
+
This server reply is for testing a simple Location: following
http://%HOSTIP:%HTTPPORT/we/want/our/data/10290002.txt?coolsite=yes
</stdout>
diff --git a/tests/data/test1030 b/tests/data/test1030
index d05a0927..5a8ed4cd 100644
--- a/tests/data/test1030
+++ b/tests/data/test1030
@@ -60,6 +60,7 @@ This IS the real page!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -93,9 +94,9 @@ a second line
line three
four is the number of lines
PUT /1030 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1030", response="01cb59db1ddaac246b072d5f5f0716d9"
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 85
Expect: 100-continue
diff --git a/tests/data/test1032 b/tests/data/test1032
index 614cdbf7..b0b6834c 100644
--- a/tests/data/test1032
+++ b/tests/data/test1032
@@ -3,7 +3,7 @@
<keywords>
HTTP
HTTP HEAD
-range
+Range
</keywords>
</info>
@@ -47,8 +47,8 @@ HTTP HEAD with --range
</strip>
<protocol>
HEAD /1032 HTTP/1.1
-Range: bytes=1-3
Host: %HOSTIP:%HTTPPORT
+Range: bytes=1-3
Accept: */*
</protocol>
diff --git a/tests/data/test1040 b/tests/data/test1040
index 2466e705..e21ed819 100644
--- a/tests/data/test1040
+++ b/tests/data/test1040
@@ -70,8 +70,8 @@ http://%HOSTIP:%HTTPPORT/1040 -C -
</strip>
<protocol>
GET /1040 HTTP/1.1
-Range: bytes=100-
Host: %HOSTIP:%HTTPPORT
+Range: bytes=100-
Accept: */*
</protocol>
diff --git a/tests/data/test1041 b/tests/data/test1041
index fa1692c1..c77d616a 100644
--- a/tests/data/test1041
+++ b/tests/data/test1041
@@ -12,7 +12,7 @@ Content-Range
# Server-side
<reply>
<data>
-HTTP/1.1 OK swsclose
+HTTP/1.1 200 OK swsclose
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Accept-Ranges: bytes
@@ -57,8 +57,8 @@ http://%HOSTIP:%HTTPPORT/1041 -Tlog/test1041.txt -C -
# it can skip part of the file or not. Instead, it sends the entire file.
<protocol>
PUT /1041 HTTP/1.1
-Content-Range: bytes 0-99/100
Host: %HOSTIP:%HTTPPORT
+Content-Range: bytes 0-99/100
Accept: */*
Content-Length: 100
Expect: 100-continue
diff --git a/tests/data/test1042 b/tests/data/test1042
index d532120d..dfebaa15 100644
--- a/tests/data/test1042
+++ b/tests/data/test1042
@@ -56,10 +56,10 @@ Content-Type: text/plain
http
</server>
<name>
-HTTP GET from end of entirely-downloaded file, no server resume
+HTTP GET beyond end of entirely-downloaded file, no server resume
</name>
<command>
-http://%HOSTIP:%HTTPPORT/1042 -C -
+http://%HOSTIP:%HTTPPORT/1042 -C 200
</command>
<file name="log/curl1042.out">
012345678
@@ -85,8 +85,8 @@ http://%HOSTIP:%HTTPPORT/1042 -C -
</strip>
<protocol>
GET /1042 HTTP/1.1
-Range: bytes=100-
Host: %HOSTIP:%HTTPPORT
+Range: bytes=200-
Accept: */*
</protocol>
diff --git a/tests/data/test1043 b/tests/data/test1043
index f9bd1057..4ab49876 100644
--- a/tests/data/test1043
+++ b/tests/data/test1043
@@ -75,8 +75,8 @@ http://%HOSTIP:%HTTPPORT/1043 -C -
</strip>
<protocol>
GET /1043 HTTP/1.1
-Range: bytes=40-
Host: %HOSTIP:%HTTPPORT
+Range: bytes=40-
Accept: */*
</protocol>
diff --git a/tests/data/test1047 b/tests/data/test1047
index 421708cc..028a8a6c 100644
--- a/tests/data/test1047
+++ b/tests/data/test1047
@@ -13,7 +13,7 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test1048 b/tests/data/test1048
index cba99ba7..c3034733 100644
--- a/tests/data/test1048
+++ b/tests/data/test1048
@@ -2,6 +2,8 @@
<info>
<keywords>
FTP
+FTP-ipv6
+IPv6
PASV
LIST
--interface
diff --git a/tests/data/test1057 b/tests/data/test1057
index cfb88f2c..b4ef20c8 100644
--- a/tests/data/test1057
+++ b/tests/data/test1057
@@ -45,6 +45,7 @@ TYPE I
SIZE 1057
REST 52
RETR 1057
+ABOR
QUIT
</protocol>
</verify>
diff --git a/tests/data/test1058 b/tests/data/test1058
index 0731778e..4eb34da7 100644
--- a/tests/data/test1058
+++ b/tests/data/test1058
@@ -44,8 +44,8 @@ http://%HOSTIP:%HTTPPORT/want/1058 -r -101
</strip>
<protocol>
GET /want/1058 HTTP/1.1
-Range: bytes=-101
Host: %HOSTIP:%HTTPPORT
+Range: bytes=-101
Accept: */*
</protocol>
diff --git a/tests/data/test1059 b/tests/data/test1059
index 5a96de61..6820ea67 100644
--- a/tests/data/test1059
+++ b/tests/data/test1059
@@ -12,13 +12,13 @@ FAILURE
#
# Server-side
<reply>
-<data>
+<connect>
HTTP/1.1 501 Method not implemented swsclose
Date: Thu, 09 Nov 2010 14:49:00 GMT
Connection: close
Content-Length: 0
-</data>
+</connect>
</reply>
#
diff --git a/tests/data/test106 b/tests/data/test106
index d1b9a81b..56eca642 100644
--- a/tests/data/test106
+++ b/tests/data/test106
@@ -39,7 +39,8 @@ FTP GET with type=A style ASCII URL using %20 codes
USER anonymous
PASS ftp@example.com
PWD
-CWD /path with spaces
+CWD /
+CWD path with spaces
CWD and things2
EPSV
TYPE A
diff --git a/tests/data/test1060 b/tests/data/test1060
index 767a7ccc..e4aea658 100644
--- a/tests/data/test1060
+++ b/tests/data/test1060
@@ -14,7 +14,7 @@ HTTP proxy Digest auth
<reply>
# this is returned first since we get no proxy-auth
-<data>
+<connect>
HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
Content-Length: 40000
@@ -820,7 +820,7 @@ And you should ignore this data. aaaaaaaaaaaaaaaa
And you should ignore this data. aaaaaaaaaaaaaaaa
And you should ignore this data. aaaaaaaaaaaaaaaa
end of 1 KB aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-</data>
+</connect>
# this is returned when we get a GET!
<data2>
@@ -835,12 +835,12 @@ daniel
</data2>
# then this is returned when we get proxy-auth
-<data1000>
+<connect1000>
HTTP/1.1 200 OK swsbounce
Server: no
Nice proxy auth sir!
-</data1000>
+</connect1000>
<datacheck>
HTTP/1.1 407 Authorization Required to proxy me my dear
@@ -868,13 +868,14 @@ daniel
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
HTTP proxy CONNECT auth Digest, large headers and data
</name>
<command>
-http://test.remote.haxx.se:1060/path/10600002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
+http://test.remote.haxx.se.1060:8990/path/10600002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
</command>
</client>
@@ -884,17 +885,17 @@ http://test.remote.haxx.se:1060/path/10600002 --proxy http://%HOSTIP:%HTTPPORT -
^User-Agent: curl/.*
</strip>
<protocol>
-CONNECT test.remote.haxx.se:1060 HTTP/1.1
-Host: test.remote.haxx.se:1060
+CONNECT test.remote.haxx.se.1060:8990 HTTP/1.1
+Host: test.remote.haxx.se.1060:8990
Proxy-Connection: Keep-Alive
-CONNECT test.remote.haxx.se:1060 HTTP/1.1
-Host: test.remote.haxx.se:1060
-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:1060", response="79e394ffcd42b6c771c7582da1fc4498"
+CONNECT test.remote.haxx.se.1060:8990 HTTP/1.1
+Host: test.remote.haxx.se.1060:8990
+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.1060:8990", response="e1fbed39c26f4efe284adc0e576ff638"
Proxy-Connection: Keep-Alive
GET /path/10600002 HTTP/1.1
-Host: test.remote.haxx.se:1060
+Host: test.remote.haxx.se.1060:8990
Accept: */*
</protocol>
diff --git a/tests/data/test1061 b/tests/data/test1061
index 0fb8c511..a55a2729 100644
--- a/tests/data/test1061
+++ b/tests/data/test1061
@@ -15,7 +15,7 @@ HTTP proxy Digest auth
<reply>
# this is returned first since we get no proxy-auth
-<data>
+<connect>
HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
Transfer-Encoding: chunked
@@ -825,7 +825,7 @@ end of 1 KB aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0
-</data>
+</connect>
# this is returned when we get a GET!
<data2>
@@ -840,12 +840,12 @@ daniel
</data2>
# then this is returned when we get proxy-auth
-<data1000>
+<connect1000>
HTTP/1.1 200 OK swsbounce
Server: no
Nice proxy auth sir!
-</data1000>
+</connect1000>
<datacheck>
HTTP/1.1 407 Authorization Required to proxy me my dear
@@ -873,13 +873,14 @@ daniel
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
HTTP proxy CONNECT auth Digest, large headers and chunked data
</name>
<command>
-http://test.remote.haxx.se:1061/path/10610002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
+http://test.remote.haxx.se.1061:8990/path/10610002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
</command>
</client>
@@ -889,17 +890,17 @@ http://test.remote.haxx.se:1061/path/10610002 --proxy http://%HOSTIP:%HTTPPORT -
^User-Agent: curl/.*
</strip>
<protocol>
-CONNECT test.remote.haxx.se:1061 HTTP/1.1
-Host: test.remote.haxx.se:1061
+CONNECT test.remote.haxx.se.1061:8990 HTTP/1.1
+Host: test.remote.haxx.se.1061:8990
Proxy-Connection: Keep-Alive
-CONNECT test.remote.haxx.se:1061 HTTP/1.1
-Host: test.remote.haxx.se:1061
-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:1061", response="8e96acf6a6214012183879e28e73b2d3"
+CONNECT test.remote.haxx.se.1061:8990 HTTP/1.1
+Host: test.remote.haxx.se.1061:8990
+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.1061:8990", response="4e23449fa93224834299e7282a70472c"
Proxy-Connection: Keep-Alive
GET /path/10610002 HTTP/1.1
-Host: test.remote.haxx.se:1061
+Host: test.remote.haxx.se.1061:8990
Accept: */*
</protocol>
diff --git a/tests/data/test1071 b/tests/data/test1071
index 758457a0..4352e611 100644
--- a/tests/data/test1071
+++ b/tests/data/test1071
@@ -66,6 +66,7 @@ This IS the real page!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -99,8 +100,8 @@ a second line
line three
four is the number of lines
PUT /1071 HTTP/1.0
-Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1071", response="df4cef6b52a30e65d472dd848d2055a1"
Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1071", response="df4cef6b52a30e65d472dd848d2055a1"
Accept: */*
Content-Length: 85
diff --git a/tests/data/test1075 b/tests/data/test1075
index 5b8f186a..4b30c593 100644
--- a/tests/data/test1075
+++ b/tests/data/test1075
@@ -79,8 +79,8 @@ a second line
line three
four is the number of lines
PUT /1075 HTTP/1.1
-Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
Accept: */*
Content-Length: 85
Expect: 100-continue
diff --git a/tests/data/test1078 b/tests/data/test1078
index e2355e3a..a9bb771b 100644
--- a/tests/data/test1078
+++ b/tests/data/test1078
@@ -13,6 +13,12 @@ proxytunnel
#
# Server-side
<reply>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+Server: test tunnel 2000
+
+</connect>
+
<data nocheck="yes">
HTTP/1.0 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
@@ -31,12 +37,13 @@ contents
<client>
<server>
http
+http-proxy
</server>
<name>
HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0
</name>
<command>
---proxy1.0 %HOSTIP:%HTTPPORT -p http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP:%HTTPPORT/we/want/that/page/1078
+--proxy1.0 %HOSTIP:%PROXYPORT -p http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078
</command>
</client>
@@ -46,22 +53,25 @@ HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0
<strip>
^User-Agent:.*
</strip>
-<protocol>
-CONNECT %HOSTIP:%HTTPPORT HTTP/1.0
-Host: %HOSTIP:%HTTPPORT
+<proxy>
+CONNECT %HOSTIP.1078:%HTTPPORT HTTP/1.0
+Host: %HOSTIP.1078:%HTTPPORT
Proxy-Connection: Keep-Alive
+</proxy>
+<protocol>
GET /we/want/that/page/1078 HTTP/1.1
-Host: %HOSTIP:%HTTPPORT
+Host: %HOSTIP.1078:%HTTPPORT
Accept: */*
GET /we/want/that/page/1078 HTTP/1.0
-Host: %HOSTIP:%HTTPPORT
+Host: %HOSTIP.1078:%HTTPPORT
Accept: */*
</protocol>
<stdout>
HTTP/1.1 200 Mighty fine indeed
+Server: test tunnel 2000
HTTP/1.0 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test1079 b/tests/data/test1079
index c188e792..ac7b899f 100644
--- a/tests/data/test1079
+++ b/tests/data/test1079
@@ -42,6 +42,7 @@ Content-Length: 26
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -66,8 +67,8 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /1079 HTTP/1.1
-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1079", response="e340c7cdca0950462070f46ee139e9f7"
Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1079", response="e340c7cdca0950462070f46ee139e9f7"
Accept: */*
</protocol>
diff --git a/tests/data/test1080 b/tests/data/test1080
index ae37fb7f..e0f7d62a 100644
--- a/tests/data/test1080
+++ b/tests/data/test1080
@@ -49,7 +49,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
-<stdout mode="text">
+<stdout>
HTTP/1.1 301 This is a weirdo text message swsclose
Location: data/10800002.txt?coolsite=yes
Content-Length: 62
diff --git a/tests/data/test1081 b/tests/data/test1081
index d290020b..d9f895fd 100644
--- a/tests/data/test1081
+++ b/tests/data/test1081
@@ -57,7 +57,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
-<stdout mode="text">
+<stdout>
HTTP/1.1 301 This is a weirdo text message swsclose
Location: data/10810099.txt?coolsite=yes
Content-Length: 62
diff --git a/tests/data/test1086 b/tests/data/test1086
index 402e1f92..354b2e09 100644
--- a/tests/data/test1086
+++ b/tests/data/test1086
@@ -6,6 +6,7 @@ EPSV
RETR
timeout
FAILURE
+flaky
</keywords>
</info>
diff --git a/tests/data/test1087 b/tests/data/test1087
index d3bec0c8..d228976a 100644
--- a/tests/data/test1087
+++ b/tests/data/test1087
@@ -95,8 +95,8 @@ Accept: */*
Proxy-Connection: Keep-Alive
GET http://first.host.it.is/we/want/that/page/10871000 HTTP/1.1
-Authorization: Basic aWFtOm15c2VsZg==
Host: first.host.it.is
+Authorization: Basic aWFtOm15c2VsZg==
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test1088 b/tests/data/test1088
index 13e7d03c..a807ce9e 100644
--- a/tests/data/test1088
+++ b/tests/data/test1088
@@ -96,14 +96,14 @@ Accept: */*
Proxy-Connection: Keep-Alive
GET http://first.host.it.is/we/want/that/page/10881000 HTTP/1.1
-Authorization: Basic aWFtOm15c2VsZg==
Host: first.host.it.is
+Authorization: Basic aWFtOm15c2VsZg==
Accept: */*
Proxy-Connection: Keep-Alive
GET http://goto.second.host.now/10881002 HTTP/1.1
-Authorization: Basic aWFtOm15c2VsZg==
Host: goto.second.host.now
+Authorization: Basic aWFtOm15c2VsZg==
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test1095 b/tests/data/test1095
index d401b52b..6bfe54f3 100644
--- a/tests/data/test1095
+++ b/tests/data/test1095
@@ -52,6 +52,7 @@ This IS the real page!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -73,9 +74,9 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /1095 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="test \"this\" realm!!", nonce="1053604145", uri="/1095", response="a1c7931ece9e8617bae2715045e4f49f"
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test1097 b/tests/data/test1097
index ebb03996..3b733a55 100644
--- a/tests/data/test1097
+++ b/tests/data/test1097
@@ -18,13 +18,15 @@ Content-Length: 27
This is all fine and dandy
</data>
-<data1001>
+
+<connect1001>
HTTP/1.1 200 We are fine and cool
Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2
Content-Length: 27
This is all fine and dandy
-</data1001>
+</connect1001>
+
<datacheck>
HTTP/1.1 200 We are fine and cool
Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2
@@ -45,12 +47,13 @@ https
</server>
<features>
NTLM
+!SSPI
</features>
<name>
HTTP POST using CONNECT with --proxy-ntlm but no auth is required
</name>
<command>
-http://test.a.galaxy.far.far.away:1097/1097 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -d "dummy=value" -p
+http://test.a.galaxy.far.far.away.1097:%HTTPPORT/1097 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -d "dummy=value" -p
</command>
</client>
@@ -60,15 +63,15 @@ http://test.a.galaxy.far.far.away:1097/1097 --proxy http://%HOSTIP:%HTTPPORT --p
^User-Agent: curl/.*
</strip>
<protocol>
-CONNECT test.a.galaxy.far.far.away:1097 HTTP/1.1
-Host: test.a.galaxy.far.far.away:1097
+CONNECT test.a.galaxy.far.far.away.1097:%HTTPPORT HTTP/1.1
+Host: test.a.galaxy.far.far.away.1097:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.12 libssh2/1.0.1_CVS
Proxy-Connection: Keep-Alive
POST /1097 HTTP/1.1
User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.12 libssh2/1.0.1_CVS
-Host: test.a.galaxy.far.far.away:1097
+Host: test.a.galaxy.far.far.away.1097:%HTTPPORT
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test1098 b/tests/data/test1098
index b5c45cbc..98056481 100644
--- a/tests/data/test1098
+++ b/tests/data/test1098
@@ -11,10 +11,10 @@ CURLOPT_PROXY
# Server-side
<reply>
<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Content-Length: 6
-
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+
hello
</data>
@@ -57,16 +57,16 @@ Accept: */*
Proxy-Connection: Keep-Alive
</protocol>
-<stdout mode="text">
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Content-Length: 6
-
+<stdout>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+
hello
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Content-Length: 6
-
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+
hello
</stdout>
</verify>
diff --git a/tests/data/test1099 b/tests/data/test1099
index f81e6017..cde40397 100644
--- a/tests/data/test1099
+++ b/tests/data/test1099
@@ -38,7 +38,7 @@ opcode: 1
filename: /1099
mode: octet
</protocol>
-<stdout mode="text">
+<stdout>
data for 1099
</stdout>
</verify>
diff --git a/tests/data/test1100 b/tests/data/test1100
index e38c0e0d..cd616918 100644
--- a/tests/data/test1100
+++ b/tests/data/test1100
@@ -63,6 +63,8 @@ This is the final page !
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -91,24 +93,24 @@ chkhostname curlhost
</strip>
<protocol>
POST /1100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST /1100 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Content-Length: 18
Content-Type: application/x-www-form-urlencoded
stuff to send awayGET /1100 HTTP/1.1
-User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS GnuTLS/2.6.6 zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.14 libssh2/1.1
Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS GnuTLS/2.6.6 zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.14 libssh2/1.1
Accept: */*
</protocol>
diff --git a/tests/data/test1101 b/tests/data/test1101
index 63887c4b..75c66195 100644
--- a/tests/data/test1101
+++ b/tests/data/test1101
@@ -45,8 +45,8 @@ http://user:secret@%HOSTIP:%HTTPPORT/gimme/1101
</strip>
<protocol>
GET /gimme/1101 HTTP/1.1
-Authorization: Basic dXNlcjpzZWNyZXQ=
Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dXNlcjpzZWNyZXQ=
Accept: */*
</protocol>
diff --git a/tests/data/test1105 b/tests/data/test1105
index 1a8f896a..95647753 100644
--- a/tests/data/test1105
+++ b/tests/data/test1105
@@ -34,6 +34,9 @@ HTTP with cookie parser and header recording
<command>
"http://%HOSTIP:%HTTPPORT/we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105" -c log/cookie1105.txt -d "userid=myname&password=mypassword"
</command>
+<precheck>
+perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}'
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -50,14 +53,13 @@ Content-Type: application/x-www-form-urlencoded
userid=myname&password=mypassword
</protocol>
-<file name="log/cookie1105.txt">
+<file name="log/cookie1105.txt" mode="text">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# 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 TRUE "/silly/" FALSE 0 mismatch this
-.0.0.1 TRUE / FALSE 0 partmatch present
+127.0.0.1 FALSE "/silly/" FALSE 0 mismatch this
</file>
</verify>
</testcase>
diff --git a/tests/data/test1112 b/tests/data/test1112
index 9307d935..849f671c 100644
--- a/tests/data/test1112
+++ b/tests/data/test1112
@@ -89,7 +89,7 @@ ftps
FTPS download with strict timeout and slow data transfer
</name>
<command timeout="1">
--k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/1112 -m 7
+-k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/1112 -m 16
</command>
</client>
diff --git a/tests/data/test1113 b/tests/data/test1113
index 4d692ae3..8d10975e 100644
--- a/tests/data/test1113
+++ b/tests/data/test1113
@@ -6,13 +6,14 @@ RETR
LIST
wildcardmatch
ftplistparser
+flaky
</keywords>
</info>
#
# Server-side
<reply>
-<data mode="text">
+<data>
</data>
</reply>
@@ -82,7 +83,7 @@ EPSV
RETR someothertext.txt
QUIT
</protocol>
-<stdout mode="text">
+<stdout>
This file should have permissions 444
This file should have permissions 666
This file should have permissions 777
diff --git a/tests/data/test1114 b/tests/data/test1114
index 8eee4293..573eda4d 100644
--- a/tests/data/test1114
+++ b/tests/data/test1114
@@ -34,7 +34,7 @@ ftp://%HOSTIP:%FTPPORT/fully_simulated/DOS/*
<errorcode>
0
</errorcode>
-<stdout mode="text">
+<stdout>
=============================================================
Remains: 12
Filename: .
diff --git a/tests/data/test1115 b/tests/data/test1115
index 0f294d4c..f9d6e364 100644
--- a/tests/data/test1115
+++ b/tests/data/test1115
@@ -29,9 +29,6 @@ Content-Length: 0
<server>
http
</server>
-<features>
-crypto
-</features>
<name>
HTTP GET with unexpected 1xx response
</name>
diff --git a/tests/data/test1117 b/tests/data/test1117
index 5b696112..963f1efe 100644
--- a/tests/data/test1117
+++ b/tests/data/test1117
@@ -73,13 +73,13 @@ partial body
</strip>
<protocol>
GET /want/1117 HTTP/1.1
-Range: bytes=10-22
Host: %HOSTIP:%HTTPPORT
+Range: bytes=10-22
Accept: */*
GET /wantmore/11170001 HTTP/1.1
-Range: bytes=10-22
Host: %HOSTIP:%HTTPPORT
+Range: bytes=10-22
Accept: */*
</protocol>
diff --git a/tests/data/test1118 b/tests/data/test1118
new file mode 100644
index 00000000..bc776aff
--- /dev/null
+++ b/tests/data/test1118
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+URL without slash and @-letter in query
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT?email=name@example.com/1118
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /?email=name@example.com/1118 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1119 b/tests/data/test1119
new file mode 100644
index 00000000..017f598f
--- /dev/null
+++ b/tests/data/test1119
@@ -0,0 +1,25 @@
+<testcase>
+<info>
+<keywords>
+source analysis
+symbols-in-versions
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+
+ <name>
+Verify that symbols-in-versions and headers are in sync
+ </name>
+
+<command type="perl">
+%SRCDIR/symbol-scan.pl %SRCDIR/.. ../include/curl
+</command>
+</client>
+
+</testcase>
diff --git a/tests/data/test1120 b/tests/data/test1120
new file mode 100644
index 00000000..4ea20425
--- /dev/null
+++ b/tests/data/test1120
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+421
+</keywords>
+</info>
+# Server-side
+<reply>
+<servercmd>
+REPLY CWD 421 Timeout!
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP with 421 timeout response
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/a/path/1120
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip all valid kinds of PORT and EPRT that curl can send
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD a
+</protocol>
+# CURLE_OPERATION_TIMEDOUT is 28
+<errorcode>
+28
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1121 b/tests/data/test1121
new file mode 100644
index 00000000..405066ff
--- /dev/null
+++ b/tests/data/test1121
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.0 200 OK
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 6
+
+blaha
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP multiple provided Host: headers
+ </name>
+ <command>
+-H "Host: host1" -H "Host: host2" -H "Host: host3" http://%HOSTIP:%HTTPPORT/1121
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1121 HTTP/1.1
+Host: host1
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1122 b/tests/data/test1122
new file mode 100644
index 00000000..78d50d77
--- /dev/null
+++ b/tests/data/test1122
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+compressed
+Transfer-Encoding
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data base64="yes">
+SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBNb24sIDI5IE5vdiAyMDA0IDIxOjU2OjUzIEdNVA0KU2Vy
+dmVyOiBBcGFjaGUvMS4zLjMxIChEZWJpYW4gR05VL0xpbnV4KSBtb2RfZ3ppcC8xLjMuMjYuMWEg
+UEhQLzQuMy45LTEgbW9kX3NzbC8yLjguMjAgT3BlblNTTC8wLjkuN2QgbW9kX3BlcmwvMS4yOQ0K
+VmFyeTogQWNjZXB0LUVuY29kaW5nDQpDb250ZW50LVR5cGU6IHRleHQvaHRtbDsgY2hhcnNldD1J
+U08tODg1OS0xDQpUcmFuc2Zlci1FbmNvZGluZzogZ3ppcA0KQ29udGVudC1MZW5ndGg6IDQ0DQoN
+Ch+LCAh5nqtBAANsYWxhbGEAy8nMS1Uw5FLIAdFGXAoQhjEXAAoCcWAYAAAA
+</data>
+
+<datacheck>
+HTTP/1.1 200 OK
+Date: Mon, 29 Nov 2004 21:56:53 GMT
+Server: Apache/1.3.31 (Debian GNU/Linux) mod_gzip/1.3.26.1a PHP/4.3.9-1 mod_ssl/2.8.20 OpenSSL/0.9.7d mod_perl/1.29
+Vary: Accept-Encoding
+Content-Type: text/html; charset=ISO-8859-1
+Transfer-Encoding: gzip
+Content-Length: 44
+
+line 1
+ line 2
+ line 3
+</datacheck>
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+libz
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP GET gzip transfer-encoded content
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1122 --tr-encoding
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1122 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Connection: TE
+TE: gzip
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1123 b/tests/data/test1123
new file mode 100644
index 00000000..bd441a99
--- /dev/null
+++ b/tests/data/test1123
@@ -0,0 +1,201 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+compressed
+Transfer-Encoding
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data base64="yes">
+SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBNb24sIDI5IE5vdiAyMDA0IDIxOjU2OjUzIEdNVA0KU2Vy
+dmVyOiBBcGFjaGUvMS4zLjMxIChEZWJpYW4gR05VL0xpbnV4KSBtb2RfZ3ppcC8xLjMuMjYuMWEg
+UEhQLzQuMy45LTEgbW9kX3NzbC8yLjguMjAgT3BlblNTTC8wLjkuN2QgbW9kX3BlcmwvMS4yOQ0K
+VmFyeTogQWNjZXB0LUVuY29kaW5nDQpDb250ZW50LVR5cGU6IHRleHQvaHRtbDsgY2hhcnNldD1J
+U08tODg1OS0xDQpUcmFuc2Zlci1FbmNvZGluZzogZGVmbGF0ZQ0KQ29udGVudC1MZW5ndGg6IDEz
+MDUNCg0KeJzcWNtu4zYQfTeQf2D91AK2brYTOXC0KHLZBM02wdoFuk8GLdE2G0kUSMq5PPTbO5Qo
+ibEcr3eDvgRIYnLmnMPhDEmTmXx6SmK0IVxQlp51XcvpIpKGLKLp6qx7M73r+/5o3He7n4LO5JeL
+u/PZt/tLlHH2DwllP6ZCAhBNv01nl19Qdy1ldmrbS07EOiFYWimR9gKHDySN7GXS1zzRd6yhFcmo
+C6JbWkEHocqm2k1vTqPAPXa9iW0YSkSEJZnjKCKAGI/9vuP3PRc5w1PHPfXGE9vwG4Q8Ux9R4DnO
+sO86fddHjnfqwc9AUyrEqzhSnJC5WDMugzDncR2OYW/jl3kcF3CE0wjFdNGmFhAdHhGhljpnSVJS
+UoIkY7UAx/wZLRlHYUxJKvuCRgT99fUWSY5TsYSKWjCLRshQ3hkMogLhcgSlWqlwVd8ljYk46uRC
+ddQY4jmV+MlCNxKJPMtAX6Dr2ey+V/yd9tAVtI86V0X74uZ81kOzy9s/L+Hz9uJ3gF3d3F72iuE/
+391fX36FNgzwSGKIqZTqZ0zInm7m0AoZe6BEFNooz2KGIxgCllqekKiZdQ9lWIhHxiPVhMjSPFkU
+9un09qgTEi7pkoZQVzD9QTj4mChDgWo8wQjFtCAbGXsknERHncVzlaQekmvyZsarslhHndkaqAjD
+74KmajMJSG2dapVgBpsOec5RJ8bpKscrIooYSLqhnKUJDCBAR5fQWBsbKnFM5fNchIyTYHTiD63R
+ycTesm+BM8JDkAwGlntsYCvzFhrm8wB7bWwgC5Ne1yzLY8ybsY5HY4hhCMt529MiVAO6A8t3XxFe
+h2I4ymCc0Su0EQ7HxbnhWyNnYuuO6ZmHLAddz6282vAKUw7iD2qMMYDIFyLkNJNwRIpgoE6H16YS
+BqVPw/Vc7eXggixxHsuJbRpLGNR/Xh1gGZQ92HloVielrdaLPbFbrEZszRLythAsYMpLFXV42iZD
+69YCjaZcvRwuB2CtpGiNyOLFO1wEwFpE0RqRF5odLgJgLaJojUi4hj1GYrY6XKqmaMFGopHlWXK4
+IIC1lKI1IhFZHC4CYC2iaI0IE0+HiwBYiyiaUS8RqfPyB2pWEqq6abqxzHMOaRMk0Ou36hqF2Ygf
+KMlGVMXYCENE3RwOV1FoLVMQG52Ecs744UolXmtpslnXhAVVraBZemIKhxyk4MvNzP4bncPpASmj
+eYJuS8fErhAar76n5JyTmNSZa5nn+v4WnFiuZ8EF6Q33G2x1rzo5dvxRi1hdsNocdS/afXHaBSzn
+Yu+azATOUQITXjM5l2v4qoactUwlEucSbjKiDqnsV93aoE9gnFISo6kkKXzDrya26WxRoEq76/7v
+Aq8ioopsIFt0zmIS3D2mhNe4wlRFapuhVr1qCasveE4TmmJpzk5yuCEUtYGC1p2W1/OO97kHe7n7
+nK7v7+W6e8eFpbE/6r1u93i4zz3eS/bHe73OXrc7+k7c3wlsf2SD1tjl/W67/LAmMngywUMMrqO1
+Tm18RvI5I2ddTkJ4HSibeknVi7LBmRvZUUPtcuwk6nsLuE+Gqhg7XTuZxuOsRd1+uL3FlVSqDQV2
+uLOjX/Vt6redWiW23mkN4u28seLehuP/L2nOT2dsOHhnxtT76uMnyvUGI/cdmXqBp9jHz9LAc4Yn
+78jSNaFJhOOPn6jhcDTw3pGosA9PffEzeTIs+qyv/ysUdP4DAAD//4IzEaNjAAAAAP//AwDdOI7R
+</data>
+
+<datacheck>
+HTTP/1.1 200 OK
+Date: Mon, 29 Nov 2004 21:56:53 GMT
+Server: Apache/1.3.31 (Debian GNU/Linux) mod_gzip/1.3.26.1a PHP/4.3.9-1 mod_ssl/2.8.20 OpenSSL/0.9.7d mod_perl/1.29
+Vary: Accept-Encoding
+Content-Type: text/html; charset=ISO-8859-1
+Transfer-Encoding: deflate
+Content-Length: 1305
+
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project-listing SYSTEM "http://freshmeat.net/backend/fm-projects-0.4.dtd">
+<project-listing>
+ <project>
+ <project_id>1612</project_id>
+ <date_added>1998-08-21 04:01:29</date_added>
+ <date_updated>2004-10-18 02:22:23</date_updated>
+ <projectname_short>curl</projectname_short>
+ <projectname_full>curl and libcurl</projectname_full>
+ <desc_short>Command line tool and library for client-side URL transfers.</desc_short>
+ <desc_full>curl and libcurl is a tool for transferring files
+using URL syntax. It supports HTTP, HTTPS, FTP,
+FTPS, DICT, TELNET, LDAP, FILE, and GOPHER, as
+well as HTTP-post, HTTP-put, cookies, FTP upload,
+resumed transfers, passwords, portnumbers, SSL
+certificates, Kerberos, and proxies. It is powered
+by libcurl, the client-side URL transfer library.
+There are bindings to libcurl for over 20
+languages and environments.
+</desc_full>
+ <vitality_score>5784.57</vitality_score>
+ <vitality_percent>3.16</vitality_percent>
+ <vitality_rank>169</vitality_rank>
+ <popularity_score>6594.54</popularity_score>
+ <popularity_percent>13.81</popularity_percent>
+ <popularity_rank>105</popularity_rank>
+ <rating>8.50</rating>
+ <rating_count>21</rating_count>
+ <rating_rank>183</rating_rank>
+ <subscriptions>323</subscriptions>
+ <branch_name>Default</branch_name>
+ <url_project_page>http://freshmeat.net/projects/curl/</url_project_page>
+ <url_homepage>http://freshmeat.net/redir/curl/1612/url_homepage/</url_homepage>
+ <url_tgz>http://freshmeat.net/redir/curl/1612/url_tgz/</url_tgz>
+ <url_bz2>http://freshmeat.net/redir/curl/1612/url_bz2/</url_bz2>
+ <url_zip>http://freshmeat.net/redir/curl/1612/url_zip/</url_zip>
+ <url_changelog>http://freshmeat.net/redir/curl/1612/url_changelog/</url_changelog>
+ <url_rpm>http://freshmeat.net/redir/curl/1612/url_rpm/</url_rpm>
+ <url_deb>http://freshmeat.net/redir/curl/1612/url_deb/</url_deb>
+ <url_osx>http://freshmeat.net/redir/curl/1612/url_osx/</url_osx>
+ <url_bsdport>http://freshmeat.net/redir/curl/1612/url_bsdport/</url_bsdport>
+ <url_purchase></url_purchase>
+ <url_cvs>http://freshmeat.net/redir/curl/1612/url_cvs/</url_cvs>
+ <url_list>http://freshmeat.net/redir/curl/1612/url_list/</url_list>
+ <url_mirror>http://freshmeat.net/redir/curl/1612/url_mirror/</url_mirror>
+ <url_demo></url_demo>
+ <license>MIT/X Consortium License</license>
+ <latest_release>
+ <latest_release_version>7.12.2</latest_release_version>
+ <latest_release_id>176085</latest_release_id>
+ <latest_release_date>2004-10-18 02:22:23</latest_release_date>
+ </latest_release>
+ <screenshot_thumb></screenshot_thumb>
+ <authors>
+ <author>
+ <author_name>Daniel Stenberg</author_name>
+ <author_url>http://freshmeat.net/~bagder/</author_url>
+ <author_role>Owner</author_role>
+ </author>
+ </authors>
+ <descriminators>
+ <trove_id>12</trove_id>
+ <trove_id>226</trove_id>
+ <trove_id>3</trove_id>
+ <trove_id>2</trove_id>
+ <trove_id>188</trove_id>
+ <trove_id>216</trove_id>
+ <trove_id>200</trove_id>
+ <trove_id>220</trove_id>
+ <trove_id>164</trove_id>
+ <trove_id>90</trove_id>
+ <trove_id>89</trove_id>
+ <trove_id>809</trove_id>
+ <trove_id>150</trove_id>
+ <trove_id>224</trove_id>
+ <trove_id>900</trove_id>
+ <trove_id>839</trove_id>
+ </descriminators>
+ <dependencies>
+ <dependency type="recommended">
+ <dependency_release_id>0</dependency_release_id>
+ <dependency_branch_id>7464</dependency_branch_id>
+ <dependency_project_id>7464</dependency_project_id>
+ <dependency_project_title>OpenSSL (Default)</dependency_project_title>
+ </dependency>
+ <dependency type="optional">
+ <dependency_release_id>0</dependency_release_id>
+ <dependency_branch_id>0</dependency_branch_id>
+ <dependency_project_id>7443</dependency_project_id>
+ <dependency_project_title>OpenLDAP</dependency_project_title>
+ </dependency>
+ <dependency type="optional">
+ <dependency_release_id>0</dependency_release_id>
+ <dependency_branch_id>0</dependency_branch_id>
+ <dependency_project_id>12351</dependency_project_id>
+ <dependency_project_title>zlib</dependency_project_title>
+ </dependency>
+ <dependency type="optional">
+ <dependency_release_id>0</dependency_release_id>
+ <dependency_branch_id>0</dependency_branch_id>
+ <dependency_project_id>32047</dependency_project_id>
+ <dependency_project_title>Heimdal</dependency_project_title>
+ </dependency>
+ <dependency type="optional">
+ <dependency_release_id>0</dependency_release_id>
+ <dependency_branch_id>0</dependency_branch_id>
+ <dependency_project_id>44532</dependency_project_id>
+ <dependency_project_title>c-ares</dependency_project_title>
+ </dependency>
+ </dependencies>
+ </project>
+</project-listing>
+</datacheck>
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+libz
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP GET deflate transfer-encoded content
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1123 --tr-encoding
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1123 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Connection: TE
+TE: gzip
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1124 b/tests/data/test1124
new file mode 100644
index 00000000..58f63f93
--- /dev/null
+++ b/tests/data/test1124
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+compressed
+Transfer-Encoding
+chunked Transfer-Encoding
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data base64="yes">
+SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBNb24sIDI5IE5vdiAyMDI0IDIxOjU2OjUzIEdNVA0KU2Vy
+dmVyOiBTb21ldGhpbmctVEUtZnJpZW5kbHkvMC4xDQpWYXJ5OiBBY2NlcHQtRW5jb2RpbmcNCkNv
+bnRlbnQtVHlwZTogdGV4dC9odG1sOyBjaGFyc2V0PUlTTy04ODU5LTENClRyYW5zZmVyLUVuY29k
+aW5nOiBnemlwLCBjaHVua2VkDQoNCjE0DQofiwgIeZ6rQQADbGFsYWxhAMvJzA0KMTgNCktVMORS
+yAHRRlwKEIYxFwAKAnFgGAAAAA0KMA0KDQo=
+</data>
+
+<datacheck>
+HTTP/1.1 200 OK
+Date: Mon, 29 Nov 2024 21:56:53 GMT
+Server: Something-TE-friendly/0.1
+Vary: Accept-Encoding
+Content-Type: text/html; charset=ISO-8859-1
+Transfer-Encoding: gzip, chunked
+
+line 1
+ line 2
+ line 3
+</datacheck>
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+libz
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP GET gzip+chunked transfer-encoded content
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1124 --tr-encoding
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1124 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Connection: TE
+TE: gzip
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1125 b/tests/data/test1125
new file mode 100644
index 00000000..1883734d
--- /dev/null
+++ b/tests/data/test1125
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+compressed
+Transfer-Encoding
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data base64="yes">
+SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBNb24sIDI5IE5vdiAyMDA0IDIxOjU2OjUzIEdNVA0KU2Vy
+dmVyOiBBcGFjaGUvMS4zLjMxIChEZWJpYW4gR05VL0xpbnV4KSBtb2RfZ3ppcC8xLjMuMjYuMWEg
+UEhQLzQuMy45LTEgbW9kX3NzbC8yLjguMjAgT3BlblNTTC8wLjkuN2QgbW9kX3BlcmwvMS4yOQ0K
+VmFyeTogQWNjZXB0LUVuY29kaW5nDQpDb250ZW50LVR5cGU6IHRleHQvaHRtbDsgY2hhcnNldD1J
+U08tODg1OS0xDQpUcmFuc2Zlci1FbmNvZGluZzogZ3ppcA0KQ29udGVudC1MZW5ndGg6IDQ0DQoN
+Ch+LCAh5nqtBAANsYWxhbGEAy8nMS1Uw5FLIAdFGXAoQhjEXAAoCcWAYAAAA
+</data>
+
+<datacheck>
+HTTP/1.1 200 OK
+Date: Mon, 29 Nov 2004 21:56:53 GMT
+Server: Apache/1.3.31 (Debian GNU/Linux) mod_gzip/1.3.26.1a PHP/4.3.9-1 mod_ssl/2.8.20 OpenSSL/0.9.7d mod_perl/1.29
+Vary: Accept-Encoding
+Content-Type: text/html; charset=ISO-8859-1
+Transfer-Encoding: gzip
+Content-Length: 44
+
+line 1
+ line 2
+ line 3
+</datacheck>
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+libz
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP GET transfer-encoding with custom Connection:
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1125 --tr-encoding -H "Connection: close"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1125 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Connection: close, TE
+TE: gzip
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1126 b/tests/data/test1126
new file mode 100644
index 00000000..52f4db41
--- /dev/null
+++ b/tests/data/test1126
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+If-Modified-Since
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2003 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP 200 If-Modified-Since with newer document
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1126 -z "dec 12 12:00:00 1999 GMT"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1126 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+If-Modified-Since: Sun, 12 Dec 1999 12:00:00 GMT
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1127 b/tests/data/test1127
new file mode 100644
index 00000000..3cc42c26
--- /dev/null
+++ b/tests/data/test1127
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+If-Modified-Since
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</data>
+<datacheck>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP 200 If-Modified-Since with older document
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1127 -z "dec 12 12:00:00 1999 GMT"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1127 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+If-Modified-Since: Sun, 12 Dec 1999 12:00:00 GMT
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1128 b/tests/data/test1128
new file mode 100644
index 00000000..a20487b4
--- /dev/null
+++ b/tests/data/test1128
@@ -0,0 +1,85 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+If-Modified-Since
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</data>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:01 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2002 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP 200 If-Modified-Since with old+new documents
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1128 http://%HOSTIP:%HTTPPORT/11280001 -z "dec 12 12:00:00 1999 GMT"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1128 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+If-Modified-Since: Sun, 12 Dec 1999 12:00:00 GMT
+
+GET /11280001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+If-Modified-Since: Sun, 12 Dec 1999 12:00:00 GMT
+
+</protocol>
+
+<stdout>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:01 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2002 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1129 b/tests/data/test1129
new file mode 100644
index 00000000..f47141cd
--- /dev/null
+++ b/tests/data/test1129
@@ -0,0 +1,97 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+Expect: 100-continue
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 404 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</data>
+
+<data1>
+HTTP/1.1 404 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</data1>
+
+# we use skip to make the test server never read the full payload off
+# the socket and instead return the response at once
+<servercmd>
+skip: 1025
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+# 1025 x 'x'
+<file name="log/file1129">
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+</file>
+<server>
+http
+</server>
+ <name>
+HTTP POST expect 100-continue with a 404
+ </name>
+ <command option="no-output">
+-d @log/file1129 http://%HOSTIP:%HTTPPORT/1129 http://%HOSTIP:%HTTPPORT/11290001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+HTTP/1.1 404 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+HTTP/1.1 404 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+POST /1129 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 1025
+Content-Type: application/x-www-form-urlencoded
+Expect: 100-continue
+
+POST /11290001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 1025
+Content-Type: application/x-www-form-urlencoded
+Expect: 100-continue
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1130 b/tests/data/test1130
new file mode 100644
index 00000000..eb1e59f5
--- /dev/null
+++ b/tests/data/test1130
@@ -0,0 +1,97 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+Expect: 100-continue
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 404 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</data>
+
+<data1>
+HTTP/1.1 404 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</data1>
+
+# we use skip to make the test server never read the full payload off
+# the socket and instead return the response at once
+<servercmd>
+skip: 100
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+# 100 x 'x'
+<file name="log/file1130">
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+</file>
+<server>
+http
+</server>
+ <name>
+HTTP POST forced expect 100-continue with a 404
+ </name>
+ <command option="no-output">
+-d @log/file1130 http://%HOSTIP:%HTTPPORT/1130 http://%HOSTIP:%HTTPPORT/11300001 -H "Expect: 100-continue"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+HTTP/1.1 404 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+HTTP/1.1 404 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+POST /1130 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Expect: 100-continue
+Content-Length: 100
+Content-Type: application/x-www-form-urlencoded
+
+POST /11300001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Expect: 100-continue
+Content-Length: 100
+Content-Type: application/x-www-form-urlencoded
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1131 b/tests/data/test1131
new file mode 100644
index 00000000..96843af5
--- /dev/null
+++ b/tests/data/test1131
@@ -0,0 +1,95 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+Expect: 100-continue
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 400 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+Content-Type: text/html
+
+FAILURE1
+</data>
+
+<data1>
+HTTP/1.1 400 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+Content-Type: text/html
+
+FAILURE2
+</data1>
+
+# we use skip to make the test server never read the full payload off
+# the socket and instead return the response at once
+<servercmd>
+skip: 100
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+# 100 x 'x'
+<file name="log/file1131">
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+</file>
+<server>
+http
+</server>
+ <name>
+HTTP PUT expect 100-continue with a 400
+ </name>
+ <command option="no-output">
+-T log/file1131 http://%HOSTIP:%HTTPPORT/1131 -T log/file1131 http://%HOSTIP:%HTTPPORT/11310001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+HTTP/1.1 400 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+Content-Type: text/html
+
+FAILURE1
+HTTP/1.1 400 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+Content-Type: text/html
+
+FAILURE2
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+PUT /1131 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 100
+Expect: 100-continue
+
+PUT /11310001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 100
+Expect: 100-continue
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1132 b/tests/data/test1132
new file mode 100644
index 00000000..8aa64322
--- /dev/null
+++ b/tests/data/test1132
@@ -0,0 +1,25 @@
+<testcase>
+<info>
+<keywords>
+source analysis
+memory-includes
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+
+ <name>
+Verify memory #include files in libcurl's C source files
+ </name>
+
+<command type="perl">
+%SRCDIR/mem-include-scan.pl %SRCDIR/../lib
+</command>
+</client>
+
+</testcase>
diff --git a/tests/data/test1133 b/tests/data/test1133
new file mode 100644
index 00000000..8b016fc1
--- /dev/null
+++ b/tests/data/test1133
@@ -0,0 +1,95 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP FORMPOST
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 10
+
+blablabla
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP RFC1867-type formposting with filename contains ',', ';', '"'
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1133 -F "file=@\"log/test1133,a\\\"nd;.txt\";type=mo/foo;filename=\"faker,and;.txt\"" -F 'file2=@"log/test1133,a\"nd;.txt"' -F 'file3=@"log/test1133,a\"nd;.txt";type=m/f,"log/test1133,a\"nd;.txt"'
+</command>
+# We create this file before the command is invoked!
+<file name=log/test1133,a"nd;.txt>
+foo bar
+This is a bar foo
+bar
+foo
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^(User-Agent:|Content-Type: multipart/form-data;|Content-Type: multipart/mixed; boundary=|-------).*
+</strip>
+<protocol>
+POST /we/want/1133 HTTP/1.1
+User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 967
+Expect: 100-continue
+Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32
+
+------------------------------24e78000bd32
+Content-Disposition: form-data; name="file"; filename="faker,and;.txt"
+Content-Type: mo/foo
+
+foo bar
+This is a bar foo
+bar
+foo
+
+------------------------------24e78000bd32
+Content-Disposition: form-data; name="file2"; filename="test1133,a\"nd;.txt"
+Content-Type: text/plain
+
+foo bar
+This is a bar foo
+bar
+foo
+
+------------------------------24e78000bd32
+Content-Disposition: form-data; name="file3"
+Content-Type: multipart/mixed; boundary=----------------------------7f0e85a48b0b
+
+Content-Disposition: attachment; filename="test1133,a\"nd;.txt"
+Content-Type: m/f
+
+foo bar
+This is a bar foo
+bar
+foo
+
+Content-Disposition: attachment; filename="test1133,a\"nd;.txt"
+Content-Type: text/plain
+
+foo bar
+This is a bar foo
+bar
+foo
+
+------------------------------24e78000bd32--
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1134 b/tests/data/test1134
new file mode 100644
index 00000000..e290b536
--- /dev/null
+++ b/tests/data/test1134
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP HEAD
+-G
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<servercmd>
+connection-monitor
+</servercmd>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 10
+
+contents1
+</data>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 10
+
+contents2
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP connection re-use with different credentials
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1134 -u user1:password1 --next http://%HOSTIP:%HTTPPORT/11340001 -u 2user:password2
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1134 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dXNlcjE6cGFzc3dvcmQx
+Accept: */*
+
+GET /11340001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic MnVzZXI6cGFzc3dvcmQy
+Accept: */*
+
+[DISCONNECT]
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1135 b/tests/data/test1135
new file mode 100644
index 00000000..8fce5658
--- /dev/null
+++ b/tests/data/test1135
@@ -0,0 +1,93 @@
+<testcase>
+<info>
+<keywords>
+source analysis
+CURL_EXTERN
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+
+# The VMS and OS/400 builds extract the CURL_EXTERN protos and use in
+# the build. We break binary compatibility by changing order. Only add
+# new entries last or bump the SONAME.
+#
+ <name>
+Verify CURL_EXTERN order
+ </name>
+
+<command type="perl">
+%SRCDIR/extern-scan.pl %SRCDIR/..
+</command>
+</client>
+
+<verify>
+<stdout>
+CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2);
+CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n);
+CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
+CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,
+CURL_EXTERN void curl_formfree(struct curl_httppost *form);
+CURL_EXTERN char *curl_getenv(const char *variable);
+CURL_EXTERN char *curl_version(void);
+CURL_EXTERN char *curl_easy_escape(CURL *handle,
+CURL_EXTERN char *curl_escape(const char *string,
+CURL_EXTERN char *curl_easy_unescape(CURL *handle,
+CURL_EXTERN char *curl_unescape(const char *string,
+CURL_EXTERN void curl_free(void *p);
+CURL_EXTERN CURLcode curl_global_init(long flags);
+CURL_EXTERN CURLcode curl_global_init_mem(long flags,
+CURL_EXTERN void curl_global_cleanup(void);
+CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *,
+CURL_EXTERN void curl_slist_free_all(struct curl_slist *);
+CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
+CURL_EXTERN CURLSH *curl_share_init(void);
+CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...);
+CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *);
+CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
+CURL_EXTERN const char *curl_easy_strerror(CURLcode);
+CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
+CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
+CURL_EXTERN CURL *curl_easy_init(void);
+CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
+CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
+CURL_EXTERN void curl_easy_cleanup(CURL *curl);
+CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
+CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl);
+CURL_EXTERN void curl_easy_reset(CURL *curl);
+CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
+CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
+CURL_EXTERN int curl_mprintf(const char *format, ...);
+CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);
+CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);
+CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
+CURL_EXTERN int curl_mvprintf(const char *format, va_list args);
+CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);
+CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);
+CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
+CURL_EXTERN char *curl_maprintf(const char *format, ...);
+CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
+CURL_EXTERN CURLM *curl_multi_init(void);
+CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
+CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,
+CURL_EXTERN const char *curl_multi_strerror(CURLMcode);
+CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s,
+CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
+</stdout>
+</verify>
+
+</testcase>
diff --git a/tests/data/test116 b/tests/data/test116
index bf04492f..2ed4ab08 100644
--- a/tests/data/test116
+++ b/tests/data/test116
@@ -2,13 +2,16 @@
<info>
<keywords>
FTP
+EPRT
PORT
FAILURE
+EPRT refused
</keywords>
</info>
# Server-side
<reply>
<servercmd>
+REPLY EPRT 500 we don't like EPRT now
REPLY PORT 314 bluah you f00l!
</servercmd>
</reply>
diff --git a/tests/data/test12 b/tests/data/test12
index 95b891ac..06dbdf56 100644
--- a/tests/data/test12
+++ b/tests/data/test12
@@ -47,8 +47,8 @@ http://%HOSTIP:%HTTPPORT/want/12 -r 100-200
</strip>
<protocol>
GET /want/12 HTTP/1.1
-Range: bytes=100-200
Host: %HOSTIP:%HTTPPORT
+Range: bytes=100-200
Accept: */*
</protocol>
diff --git a/tests/data/test1203 b/tests/data/test1203
index 3cb83be1..02d094da 100644
--- a/tests/data/test1203
+++ b/tests/data/test1203
@@ -29,7 +29,7 @@ gopher-ipv6
Gopher IPv6 index
</name>
<command>
--g gopher://%HOSTIP:%GOPHER6PORT/1/moo/1203
+-g gopher://%HOST6IP:%GOPHER6PORT/1/moo/1203
</command>
</client>
diff --git a/tests/data/test1204 b/tests/data/test1204
new file mode 100644
index 00000000..d2f06b68
--- /dev/null
+++ b/tests/data/test1204
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+--anyauth
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 401 Authorization Required swsbounce
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun fun"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 26
+
+This is not the real page
+</data>
+
+# This is supposed to be returned when the server gets the second request
+<data1>
+HTTP/1.1 200 OK
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+
+This IS the real page!
+</data1>
+
+<datacheck>
+HTTP/1.1 401 Authorization Required swsbounce
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun fun"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 26
+
+HTTP/1.1 200 OK
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+
+This IS the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with WWW-Authenticate and multiple auths in a single line
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1204 -u testuser:testpass --anyauth
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1204 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /1204 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1205 b/tests/data/test1205
new file mode 100644
index 00000000..6d7bb7b0
--- /dev/null
+++ b/tests/data/test1205
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply name="1205">
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Funny-head: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAendofthem
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET with 18K HTTP header
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1205
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1205 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1206 b/tests/data/test1206
new file mode 100644
index 00000000..3f853d1d
--- /dev/null
+++ b/tests/data/test1206
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN425
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN425
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT and 425 on download
+ </name>
+ <command>
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1206 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPRT |1|
+TYPE I
+SIZE 1206
+RETR 1206
+QUIT
+</protocol>
+<errorcode>
+10
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1207 b/tests/data/test1207
new file mode 100644
index 00000000..283e46d5
--- /dev/null
+++ b/tests/data/test1207
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN421
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN421
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT and 421 on download
+ </name>
+ <command>
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1207 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPRT |1|
+TYPE I
+SIZE 1207
+RETR 1207
+QUIT
+</protocol>
+<errorcode>
+10
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1208 b/tests/data/test1208
new file mode 100644
index 00000000..504f6c7b
--- /dev/null
+++ b/tests/data/test1208
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN150
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN150
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT download, no data conn and no transient negative reply
+ </name>
+ <command>
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1208 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+
+# This test doesn't send a QUIT because the main state machine in multi.c
+# triggers the timeout and sets the CURLE_OPERATION_TIMEDOUT error (28) for
+# which the FTP disconect code generically has to assume could mean the
+# control the connection and thus it cannot send any command.
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPRT |1|
+TYPE I
+SIZE 1208
+RETR 1208
+</protocol>
+<errorcode>
+28
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1209 b/tests/data/test1209
new file mode 100644
index 00000000..7086829f
--- /dev/null
+++ b/tests/data/test1209
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT download, no data conn and no positive preliminary reply
+ </name>
+ <command>
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1209 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+
+# The protocol part does not include QUIT simply because the error is
+# CURLE_OPERATION_TIMEDOUT (28) which is a generic timeout error without
+# specificly saying for which connection it concerns, and for timeouts libcurl
+# marks the control channel as "invalid". As this test case times out for the
+# data connection it could still use the control channel.
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPRT |1|
+TYPE I
+SIZE 1209
+RETR 1209
+</protocol>
+<errorcode>
+28
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1210 b/tests/data/test1210
new file mode 100644
index 00000000..df931988
--- /dev/null
+++ b/tests/data/test1210
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -J without Content-Disposition
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1210 -J -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1210 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file name="log/1210">
+12345
+</file>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1211 b/tests/data/test1211
new file mode 100644
index 00000000..5418a85f
--- /dev/null
+++ b/tests/data/test1211
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN425
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN425
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT and 425 on download
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1211 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPRT |1|
+TYPE I
+SIZE 1211
+RETR 1211
+</protocol>
+<errorcode>
+28
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1212 b/tests/data/test1212
new file mode 100644
index 00000000..a50601f7
--- /dev/null
+++ b/tests/data/test1212
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+SOCKS5
+NO_PROXY
+noproxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+boo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+noproxy setting together with socks proxy
+ </name>
+
+<command>
+http://user:secret@%HOSTIP:%HTTPPORT/ulion/1212 --socks5 non-existing-host.haxx.se:1080 --noproxy %HOSTIP --max-time 5
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /ulion/1212 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dXNlcjpzZWNyZXQ=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1213 b/tests/data/test1213
new file mode 100644
index 00000000..729a7034
--- /dev/null
+++ b/tests/data/test1213
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Funny-head: yesyes
+Content-Length: 22
+
+the content goes here
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with proxy and host-only URL
+ </name>
+# the thing here is that this sloppy form is accepted and we convert it
+# for normal server use, and we need to make sure it gets converted to
+# RFC style even for proxies
+ <command>
+-x %HOSTIP:%HTTPPORT we.want.that.site.com.1213
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET HTTP://we.want.that.site.com.1213/ HTTP/1.1
+Host: we.want.that.site.com.1213
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1214 b/tests/data/test1214
new file mode 100644
index 00000000..3eeb3e3a
--- /dev/null
+++ b/tests/data/test1214
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Funny-head: yesyes
+Content-Length: 22
+
+the content goes here
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with proxy and URL with ? and no slash separator
+ </name>
+# the thing here is that this sloppy form is accepted and we convert it
+# for normal server use, and we need to make sure it gets converted to
+# RFC style even for proxies
+ <command>
+-x %HOSTIP:%HTTPPORT http://we.want.that.site.com.1214?moo=foo
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://we.want.that.site.com.1214/?moo=foo HTTP/1.1
+Host: we.want.that.site.com.1214
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1215 b/tests/data/test1215
new file mode 100644
index 00000000..f8c52a9a
--- /dev/null
+++ b/tests/data/test1215
@@ -0,0 +1,106 @@
+<testcase>
+<info>
+# This test is a copy of test 67, modified to use a HTTP proxy.
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+HTTP proxy
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- no <data> in this test since we have NTLM from the start
+
+This is supposed to be returned when the server gets a first
+Authorization: NTLM line passed-in from the client -->
+
+<data1001>
+HTTP/1.1 401 Now gimme that second request of crap
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 34
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+
+This is not the real page either!
+</data1001>
+
+# This is supposed to be returned when the server gets the second
+# Authorization: NTLM line passed-in from the client
+<data1002>
+HTTP/1.1 200 Things are fine in server land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1002>
+
+<datacheck>
+HTTP/1.1 401 Now gimme that second request of crap
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 34
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+
+HTTP/1.1 200 Things are fine in server land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+!SSPI
+debug
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP with server NTLM authorization using a proxy
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/1215 -u testuser:testpass --ntlm --proxy http://%HOSTIP:%HTTPPORT
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://%HOSTIP:%HTTPPORT/1215 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+User-Agent: curl/7.30.0-DEV
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://%HOSTIP:%HTTPPORT/1215 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.30.0-DEV
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1216 b/tests/data/test1216
new file mode 100644
index 00000000..5beda797
--- /dev/null
+++ b/tests/data/test1216
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+cookies
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Server: Microsoft-IIS/4.0
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Content-Type: text/html
+Connection: close
+Content-Length: 21
+
+This server says moo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP cookie domains tailmatching the host name
+ </name>
+ <command>
+http://example.fake/c/1216 http://bexample.fake/c/1216 -b log/injar1216 -x %HOSTIP:%HTTPPORT
+</command>
+<file name="log/injar1216">
+example.fake FALSE /a FALSE 2139150993 mooo indeed
+example.fake FALSE /b FALSE 0 moo1 indeed
+example.fake FALSE /c FALSE 2139150993 moo2 indeed
+example.fake TRUE /c FALSE 2139150993 moo3 indeed
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://example.fake/c/1216 HTTP/1.1
+Host: example.fake
+Accept: */*
+Proxy-Connection: Keep-Alive
+Cookie: moo2=indeed; moo3=indeed
+
+GET http://bexample.fake/c/1216 HTTP/1.1
+Host: bexample.fake
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1217 b/tests/data/test1217
new file mode 100644
index 00000000..1efa4d60
--- /dev/null
+++ b/tests/data/test1217
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+NLST
+--data-binary
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+contents
+</data>
+<servercmd>
+REPLY PWD 257 there is rubbish all over "/this/is/the/path"
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP with rubbish before name in 257-response
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/get/file/1217 ftp://%HOSTIP:%FTPPORT/get/file/again/1217 --ftp-method singlecwd
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip all valid kinds of PORT and EPRT that curl can send
+<strip>
+^PORT \d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3}
+^EPRT \|1\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|\d{1,5}\|
+</strip>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD get/file
+EPSV
+TYPE I
+SIZE 1217
+RETR 1217
+CWD /this/is/the/path
+CWD get/file/again
+EPSV
+SIZE 1217
+RETR 1217
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1218 b/tests/data/test1218
new file mode 100644
index 00000000..7d865476
--- /dev/null
+++ b/tests/data/test1218
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+cookies
+</keywords>
+</info>
+
+# This test is very similar to 1216, only that it sets the cookies from the
+# first site instead of reading from a file
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Set-Cookie: domain=.example.fake; bug=fixed;
+Content-Length: 21
+
+This server says moo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP cookies and domains with same prefix
+ </name>
+ <command>
+http://example.fake/c/1218 http://example.fake/c/1218 http://bexample.fake/c/1218 -b nonexisting -x %HOSTIP:%HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://example.fake/c/1218 HTTP/1.1
+Host: example.fake
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://example.fake/c/1218 HTTP/1.1
+Host: example.fake
+Accept: */*
+Proxy-Connection: Keep-Alive
+Cookie: bug=fixed
+
+GET http://bexample.fake/c/1218 HTTP/1.1
+Host: bexample.fake
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1219 b/tests/data/test1219
new file mode 100644
index 00000000..e42a211a
--- /dev/null
+++ b/tests/data/test1219
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+<servercmd>
+REPLY welcome 230 welcome without password
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP with no user+password required (230 response)
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1219
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+PWD
+EPSV
+TYPE I
+SIZE 1219
+RETR 1219
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1220 b/tests/data/test1220
new file mode 100644
index 00000000..959abbf7
--- /dev/null
+++ b/tests/data/test1220
@@ -0,0 +1,37 @@
+<testcase>
+<info>
+<keywords>
+FILE
+URL
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+ <name>
+file:// URLs with query string
+ </name>
+ <command>
+file://localhost/%PWD/log/test1220.txt?a_query=foobar#afragment
+</command>
+<file name="log/test1220.txt">
+contents in a single file
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+contents in a single file
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1221 b/tests/data/test1221
new file mode 100644
index 00000000..261cb8c6
--- /dev/null
+++ b/tests/data/test1221
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+build system
+source analysis
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+
+<name>
+10 chars object name generation testing
+</name>
+<command option="no-output,no-include" type="shell">
+%SRCDIR/../lib/objnames-test10.sh %SRCDIR
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stderr1221" mode="text">
+</file1>
+<file2 name="log/stdout1221">
+Testing curl_10char_object_name...
+
+result: 16AFKPQRST expected: 16AFKPQRST input: 123__678__ABC__FGH__KLM__PQRSTUV
+result: 16AFKPQ expected: 16AFKPQ input: 123__678__ABC__FGH__KLM__PQ.S.UV
+result: 16ABC expected: 16ABC input: 123__678__ABC..FGH..KLM..PQRSTUV
+result: 16 expected: 16 input: 123__678_.ABC._FGH__KLM__PQRSTUV
+result: 123 expected: 123 input: 123.567.90ABCDEFGHIJKLMNOPQRSTUV
+result: 1234567 expected: 1234567 input: 1234567.90A.CDEFGHIJKLMNOPQRSTUV
+result: 1234567890 expected: 1234567890 input: 1234567890.BCD.FGHIJKLMNOPQRSTUV
+result: 1470AB expected: 1470AB input: 12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
+result: 1234567890 expected: 1234567890 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
+result: 159CGHIJKL expected: 159CGHIJKL input: 123_567_90A_CDE_GHIJKLMNOPQRSTUV
+result: 159CDEFGHI expected: 159CDEFGHI input: 123_567_90A_CDEFGHIJKLMNOPQRSTUV
+result: 1590ABCDEF expected: 1590ABCDEF input: 123_567_90ABCDEFGHIJKLMNOPQRSTUV
+result: 1567890ABC expected: 1567890ABC input: 123_567890ABCDEFGHIJKLMNOPQRSTUV
+result: 1234567890 expected: 1234567890 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
+
+
+
+10-characters-or-less generated object names are unique.
+</file2>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1222 b/tests/data/test1222
new file mode 100644
index 00000000..51edc970
--- /dev/null
+++ b/tests/data/test1222
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+build system
+source analysis
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+
+<name>
+8 chars object name generation testing
+</name>
+<command option="no-output,no-include" type="shell">
+%SRCDIR/../lib/objnames-test08.sh %SRCDIR
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stderr1222">
+</file1>
+<file2 name="log/stdout1222">
+Testing curl_8char_object_name...
+
+result: 16AFKPQR expected: 16AFKPQR input: 123__678__ABC__FGH__KLM__PQRSTUV
+result: 16AFKPQ expected: 16AFKPQ input: 123__678__ABC__FGH__KLM__PQ.S.UV
+result: 16ABC expected: 16ABC input: 123__678__ABC..FGH..KLM..PQRSTUV
+result: 16 expected: 16 input: 123__678_.ABC._FGH__KLM__PQRSTUV
+result: 123 expected: 123 input: 123.567.90ABCDEFGHIJKLMNOPQRSTUV
+result: 1234567 expected: 1234567 input: 1234567.90A.CDEFGHIJKLMNOPQRSTUV
+result: 12345678 expected: 12345678 input: 1234567890.BCD.FGHIJKLMNOPQRSTUV
+result: 1470AB expected: 1470AB input: 12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
+result: 12345678 expected: 12345678 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
+result: 159CGHIJ expected: 159CGHIJ input: 123_567_90A_CDE_GHIJKLMNOPQRSTUV
+result: 159CDEFG expected: 159CDEFG input: 123_567_90A_CDEFGHIJKLMNOPQRSTUV
+result: 1590ABCD expected: 1590ABCD input: 123_567_90ABCDEFGHIJKLMNOPQRSTUV
+result: 1567890A expected: 1567890A input: 123_567890ABCDEFGHIJKLMNOPQRSTUV
+result: 12345678 expected: 12345678 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
+
+
+
+8-characters-or-less generated object names are unique.
+</file2>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1223 b/tests/data/test1223
new file mode 100644
index 00000000..2885bc59
--- /dev/null
+++ b/tests/data/test1223
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# disable data check since it gets sent to stdout and is verified there
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 4
+Connection: close
+Content-Type: text/html
+
+hej
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET -w remote_ip and -w remote_port
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1223 -w 'IP %{remote_ip} and PORT %{remote_port}\n'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1223 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<stdout>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 4
+Connection: close
+Content-Type: text/html
+
+hej
+IP %HOSTIP and PORT %HTTPPORT
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1224 b/tests/data/test1224
new file mode 100644
index 00000000..315936b9
--- /dev/null
+++ b/tests/data/test1224
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP fetch a file from the root directory
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT//1224
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD /
+EPSV
+TYPE I
+SIZE 1224
+RETR 1224
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1225 b/tests/data/test1225
new file mode 100644
index 00000000..2b2519c9
--- /dev/null
+++ b/tests/data/test1225
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP fetch two files using absolute paths
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT//foo/1225 ftp://%HOSTIP:%FTPPORT//foo/bar/1225
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD /
+CWD foo
+EPSV
+TYPE I
+SIZE 1225
+RETR 1225
+CWD /
+CWD /
+CWD foo
+CWD bar
+EPSV
+SIZE 1225
+RETR 1225
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1226 b/tests/data/test1226
new file mode 100644
index 00000000..6381b122
--- /dev/null
+++ b/tests/data/test1226
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP fetch a file from the root directory with singlecwd
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT//1226 --ftp-method singlecwd
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD /
+EPSV
+TYPE I
+SIZE 1226
+RETR 1226
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1227 b/tests/data/test1227
new file mode 100644
index 00000000..46b28d51
--- /dev/null
+++ b/tests/data/test1227
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP fetch a file from the root directory with nocwd
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT//1227 --ftp-method nocwd
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE /1227
+RETR /1227
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1228 b/tests/data/test1228
new file mode 100644
index 00000000..a7e56a79
--- /dev/null
+++ b/tests/data/test1228
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+cookies
+cookie path
+</keywords>
+</info>
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Set-Cookie: path1=root; domain=.example.fake; path=/;
+Set-Cookie: path2=depth1; domain=.example.fake; path=/hoge;
+Content-Length: 34
+
+This server says cookie path test
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP cookie path match
+ </name>
+ <command>
+http://example.fake/hoge/1228 http://example.fake/hogege/ -b nonexisting -x %HOSTIP:%HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://example.fake/hoge/1228 HTTP/1.1
+Host: example.fake
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://example.fake/hogege/ HTTP/1.1
+Host: example.fake
+Accept: */*
+Proxy-Connection: Keep-Alive
+Cookie: path1=root
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1229 b/tests/data/test1229
new file mode 100644
index 00000000..225ba3cc
--- /dev/null
+++ b/tests/data/test1229
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 401 Authorization Required swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 26
+
+This is not the real page
+</data>
+
+# This is supposed to be returned when the server gets a
+# Authorization: Digest line passed-in from the client
+<data1000>
+HTTP/1.1 200 OK swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+
+This IS the real page!
+</data1000>
+
+<datacheck>
+HTTP/1.1 401 Authorization Required swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 26
+
+HTTP/1.1 200 OK swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+
+This IS the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+</features>
+ <name>
+HTTP with Digest authorization with user name needing escape
+ </name>
+ <command>
+http://%5cuser%22:password@%HOSTIP:%HTTPPORT/1229 --digest
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1229 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /1229 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="\\user\"", realm="testrealm", nonce="1053604145", uri="/1229", response="f2694d426040712584c156d3de72b8d6"
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1230 b/tests/data/test1230
new file mode 100644
index 00000000..3c1d3d44
--- /dev/null
+++ b/tests/data/test1230
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP CONNECT
+HTTP proxy
+IPv6
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 9
+
+mooooooo
+</data>
+
+<connect>
+HTTP/1.1 200 welcome dear
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 0
+
+</connect>
+
+<datacheck>
+HTTP/1.1 200 welcome dear
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 0
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 9
+
+mooooooo
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+ipv6
+</features>
+<server>
+http-proxy
+http-ipv6
+http
+</server>
+ <name>
+HTTP CONNECT to IPv6 numerical address
+ </name>
+# 0x4ce == 1230, the test number
+ <command>
+http://[1234:1234:1234::4ce]:%HTTPPORT/wanted/page/1230 -p -x %HOSTIP:%HTTPPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+CONNECT [1234:1234:1234::4ce]:%HTTPPORT HTTP/1.1
+Host: [1234:1234:1234::4ce]:%HTTPPORT
+Proxy-Connection: Keep-Alive
+
+GET /wanted/page/1230 HTTP/1.1
+Host: [1234:1234:1234::4ce]:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1231 b/tests/data/test1231
new file mode 100644
index 00000000..16533a85
--- /dev/null
+++ b/tests/data/test1231
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+dotdot removal
+</keywords>
+</info>
+
+#
+# Server-side
+<reply name="1">
+<data>
+HTTP/1.1 200 OK
+Content-Length: 6
+Connection: close
+
+-foo-
+</data>
+
+<data1>
+HTTP/1.1 200 OK
+Content-Length: 7
+Connection: close
+
+-cool-
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP URL with dotdot removal from path
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/../../hej/but/who/../1231?stupid=me/../1231#soo/../1231 http://%HOSTIP:%HTTPPORT/../../hej/but/who/../12310001#/../12310001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /hej/but/1231?stupid=me/../1231 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /hej/but/12310001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1232 b/tests/data/test1232
new file mode 100644
index 00000000..ead43365
--- /dev/null
+++ b/tests/data/test1232
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+# This test is a copy of test 1231, modified to use a HTTP proxy.
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+dotdot removal
+</keywords>
+</info>
+
+#
+# Server-side
+<reply name="1">
+<data>
+HTTP/1.1 200 OK
+Content-Length: 6
+Connection: close
+
+-foo-
+</data>
+
+<data1>
+HTTP/1.1 200 OK
+Content-Length: 7
+Connection: close
+
+-cool-
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP URL with dotdot removal from path using an HTTP proxy
+ </name>
+ <command>
+--proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.1232:8990/../../hej/but/who/../1232?stupid=me/../1232#soo/../1232 http://test.remote.haxx.se.1232:8990/../../hej/but/who/../12320001#/../12320001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://test.remote.haxx.se.1232:8990/hej/but/1232?stupid=me/../1232 HTTP/1.1
+Host: test.remote.haxx.se.1232:8990
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://test.remote.haxx.se.1232:8990/hej/but/12320001 HTTP/1.1
+Host: test.remote.haxx.se.1232:8990
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1233 b/tests/data/test1233
new file mode 100644
index 00000000..caf0527f
--- /dev/null
+++ b/tests/data/test1233
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<servercmd>
+# Assuming there's nothing listening on port 1
+REPLY EPSV 229 Entering Passiv Mode (|||1|)
+</servercmd>
+<data>
+here are some bytes
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP failing to connect to EPSV port, switching to PASV
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1233
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+PASV
+TYPE I
+SIZE 1233
+RETR 1233
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1234 b/tests/data/test1234
new file mode 100644
index 00000000..41c4bc06
--- /dev/null
+++ b/tests/data/test1234
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+globbing
+{} list
+FAILURE
+</keywords>
+</info>
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+ <name>
+abusing {}-globbing
+ </name>
+ <command>
+"%HOSTIP:%HTTPPORT/1234[0-1]{" "%HOSTIP:%HTTPPORT/{}{}{}{"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# 3 == CURLE_URL_MALFORMAT
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1235 b/tests/data/test1235
new file mode 100644
index 00000000..9e51219f
--- /dev/null
+++ b/tests/data/test1235
@@ -0,0 +1,95 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+globbing
+{} list
+</keywords>
+</info>
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Funny-head: yesyes
+Content-Length: 15
+
+the number one
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Funny-head: yesyes
+Content-Length: 16
+
+two is nice too
+</data2>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+multiple requests using {}{} in the URL
+ </name>
+ <command>
+"%HOSTIP:%HTTPPORT/{1235,1235}{0001,0002}"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /12350001 HTTP/1.1
+User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /12350002 HTTP/1.1
+User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /12350001 HTTP/1.1
+User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /12350002 HTTP/1.1
+User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<stdout>
+--_curl_--%HOSTIP:%HTTPPORT/12350001
+HTTP/1.1 200 OK
+Funny-head: yesyes
+Content-Length: 15
+
+the number one
+--_curl_--%HOSTIP:%HTTPPORT/12350002
+HTTP/1.1 200 OK
+Funny-head: yesyes
+Content-Length: 16
+
+two is nice too
+--_curl_--%HOSTIP:%HTTPPORT/12350001
+HTTP/1.1 200 OK
+Funny-head: yesyes
+Content-Length: 15
+
+the number one
+--_curl_--%HOSTIP:%HTTPPORT/12350002
+HTTP/1.1 200 OK
+Funny-head: yesyes
+Content-Length: 16
+
+two is nice too
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1236 b/tests/data/test1236
new file mode 100644
index 00000000..0829be31
--- /dev/null
+++ b/tests/data/test1236
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+globbing
+FAILURE
+</keywords>
+</info>
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+ <name>
+[] globbing overflowing the range counter
+ </name>
+# 2^62 == 4611686018427387904
+ <command>
+"%HOSTIP:%HTTPPORT/1234[0-1]{" "%HOSTIP:%HTTPPORT/[1-4611686018427387904][1-4611686018427387904]"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# 3 == CURLE_URL_MALFORMAT
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1237 b/tests/data/test1237
new file mode 100644
index 00000000..21da17dc
--- /dev/null
+++ b/tests/data/test1237
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP Basic auth
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+URL with 1000+ letter user name + password
+ </name>
+ <command>
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@%HOSTIP:%HTTPPORT/1237"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1237 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQTpCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkI=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1238 b/tests/data/test1238
new file mode 100644
index 00000000..18593398
--- /dev/null
+++ b/tests/data/test1238
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+TFTP
+TFTP RRQ
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+writedelay: 1
+</servercmd>
+# ~1200 bytes (so that they don't fit in two 512 byte chunks)
+<data nocheck="yes">
+012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+tftp
+</server>
+ <name>
+slow TFTP retrieve cancel due to -Y and -y
+ </name>
+# if less than 1000 bytes/sec within 2 seconds, abort!
+ <command>
+tftp://%HOSTIP:%TFTPPORT//1238 -Y1000 -y2
+</command>
+</client>
+
+#
+# Verify pseudo protocol after the test has been "shot"
+<verify>
+<protocol>
+opcode: 1
+filename: /1238
+mode: octet
+</protocol>
+# 28 = CURLE_OPERATION_TIMEDOUT
+<errorcode>
+28
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1239 b/tests/data/test1239
new file mode 100644
index 00000000..b3503d9c
--- /dev/null
+++ b/tests/data/test1239
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-z
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2010 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with -z + -w response_code and simulated 304
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1239 -z "-dec 12 12:00:00 1999 GMT" -w '%{response_code}'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1239 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+If-Unmodified-Since: Sun, 12 Dec 1999 12:00:00 GMT
+
+</protocol>
+<stdout nonewline="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2010 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+304
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1240 b/tests/data/test1240
new file mode 100644
index 00000000..64359505
--- /dev/null
+++ b/tests/data/test1240
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+globbing
+HTTP
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Content-Length: 6
+Connection: close
+
+-foo-
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+glob [0-1] with stuff after range (7.33.0 regression)
+ </name>
+ <command>
+"%HOSTIP:%HTTPPORT/0[0-1]/1240"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /00/1240 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /01/1240 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1241 b/tests/data/test1241
new file mode 100644
index 00000000..aaa56886
--- /dev/null
+++ b/tests/data/test1241
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+# verify that dotdot removal can be disabled!
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Content-Length: 6
+Connection: close
+
+-foo-
+</data>
+
+<data1>
+HTTP/1.1 200 OK
+Content-Length: 7
+Connection: close
+
+-cool-
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP _without_ dotdot removal
+ </name>
+ <command>
+--path-as-is --proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.1241:8990/../../hej/but/who/../1241?stupid=me/../1241#soo/../1241 http://test.remote.haxx.se.1241:8990/../../hej/but/who/../12410001#/../12410001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://test.remote.haxx.se.1241:8990/../../hej/but/who/../1241?stupid=me/../1241 HTTP/1.1
+Host: test.remote.haxx.se.1241:8990
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://test.remote.haxx.se.1241:8990/../../hej/but/who/../12410001 HTTP/1.1
+Host: test.remote.haxx.se.1241:8990
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test13 b/tests/data/test13
index 8f997f0a..18f7f811 100644
--- a/tests/data/test13
+++ b/tests/data/test13
@@ -8,10 +8,10 @@ HTTP custom request
# Server-side
<reply>
<data>
-HTTP/1.1 200 Read you
+HTTP/1.1 200 Read you
Content-Length: 29
-Deleted: suppose we got a header like this! ;-)
-
+Deleted: suppose we got a header like this! ;-)
+
blabla custom request result
</data>
</reply>
diff --git a/tests/data/test130 b/tests/data/test130
index 43ab24c0..6e6d9c16 100644
--- a/tests/data/test130
+++ b/tests/data/test130
@@ -12,7 +12,7 @@ netrc
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@@ -30,9 +30,6 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
<client>
-<features>
-netrc_debug
-</features>
<server>
ftp
</server>
@@ -40,12 +37,13 @@ ftp
FTP (optional .netrc; no user/pass) dir list PASV
</name>
<command>
---netrc-optional ftp://%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc130 ftp://%HOSTIP:%FTPPORT/
</command>
-<file name="log/netrc" >
+<file name="log/netrc130" >
# the following two lines were created while testing curl
machine %HOSTIP login user1 password passwd1
machine %HOSTIP login user2 password passwd2
+default login userdef password passwddef
</file>
</client>
diff --git a/tests/data/test1300 b/tests/data/test1300
new file mode 100644
index 00000000..10088856
--- /dev/null
+++ b/tests/data/test1300
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+llist
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+llist unit tests
+ </name>
+<tool>
+unit1300
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1301 b/tests/data/test1301
new file mode 100644
index 00000000..4b6fac8b
--- /dev/null
+++ b/tests/data/test1301
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+curl_strequal
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+curl_strequal unit tests
+ </name>
+<tool>
+unit1301
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1302 b/tests/data/test1302
new file mode 100644
index 00000000..27ea8624
--- /dev/null
+++ b/tests/data/test1302
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+base64
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+base64 encode/decode unit tests
+ </name>
+<tool>
+unit1302
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1303 b/tests/data/test1303
new file mode 100644
index 00000000..925b47e1
--- /dev/null
+++ b/tests/data/test1303
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+Curl_timeleft
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+Curl_timeleft unit tests
+ </name>
+<tool>
+unit1303
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1304 b/tests/data/test1304
new file mode 100644
index 00000000..d518de9e
--- /dev/null
+++ b/tests/data/test1304
@@ -0,0 +1,30 @@
+<testcase>
+<info>
+<keywords>
+unittest
+netrc
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+netrc parsing unit tests
+ </name>
+<tool>
+unit1304
+</tool>
+<file name="log/netrc1304">
+machine example.com login admin password passwd
+machine curl.example.com login none password none
+</file>
+</client>
+
+</testcase>
diff --git a/tests/data/test1305 b/tests/data/test1305
new file mode 100644
index 00000000..91149b3a
--- /dev/null
+++ b/tests/data/test1305
@@ -0,0 +1,30 @@
+<testcase>
+<!-- This replaces test 558 -->
+<info>
+<keywords>
+unittest
+hash
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+internal hash create/destroy testing
+ </name>
+<tool>
+unit1305
+</tool>
+<command>
+1305
+</command>
+</client>
+
+</testcase>
diff --git a/tests/data/test1306 b/tests/data/test1306
new file mode 100644
index 00000000..b490efb5
--- /dev/null
+++ b/tests/data/test1306
@@ -0,0 +1,30 @@
+<testcase>
+<!-- This replaces test 559 -->
+<info>
+<keywords>
+unittest
+hash
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+internal hash create/add/destroy testing
+ </name>
+<tool>
+unit1305
+</tool>
+<command>
+1306
+</command>
+</client>
+
+</testcase>
diff --git a/tests/data/test1307 b/tests/data/test1307
new file mode 100644
index 00000000..82ed3c07
--- /dev/null
+++ b/tests/data/test1307
@@ -0,0 +1,27 @@
+<testcase>
+<!-- This replaces test 577 -->
+<info>
+<keywords>
+unittest
+wildcardmatch
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+internal Curl_fnmatch() testing
+ </name>
+<tool>
+unit1307
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1308 b/tests/data/test1308
new file mode 100644
index 00000000..88e9771d
--- /dev/null
+++ b/tests/data/test1308
@@ -0,0 +1,31 @@
+<testcase>
+<info>
+<keywords>
+unittest
+curl_formadd
+curl_formget
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+http
+</features>
+ <name>
+formpost unit tests
+ </name>
+<tool>
+unit1308
+</tool>
+<file name="log/test-1308">
+Piece of the file that is to uploaded as a formpost
+</file>
+</client>
+
+</testcase>
diff --git a/tests/data/test1309 b/tests/data/test1309
new file mode 100644
index 00000000..c2f67ff1
--- /dev/null
+++ b/tests/data/test1309
@@ -0,0 +1,1457 @@
+<testcase>
+<info>
+<keywords>
+unittest
+splay
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+splay unit tests
+ </name>
+<tool>
+unit1309
+</tool>
+</client>
+
+<verify>
+<stdout>
+Result:
+ 0.1013[3]
+ 0.1003[2]
+ 0.954[3]
+ 0.944[1]
+0.934[0]
+ 0.895[1]
+ 0.885[4]
+ 0.875[3]
+ 0.836[4]
+ 0.826[7]
+ 0.816[6]
+ 0.777[5]
+ 0.767[9]
+ 0.757[8]
+ 0.718[7]
+ 0.708[10]
+ 0.698[9]
+ 0.659[8]
+ 0.649[9]
+ 0.639[10]
+ 0.600[12]
+ 0.590[13]
+ 0.580[11]
+ 0.541[6]
+ 0.531[9]
+ 0.521[10]
+ 0.472[8]
+ 0.462[9]
+ 0.413[7]
+ 0.403[2]
+ 0.393[3]
+ 0.354[5]
+ 0.344[4]
+ 0.334[5]
+ 0.295[7]
+ 0.285[6]
+ 0.275[7]
+ 0.236[9]
+ 0.226[8]
+ 0.216[9]
+ 0.177[11]
+ 0.167[12]
+ 0.157[10]
+ 0.118[11]
+ 0.108[13]
+ 0.98[12]
+ 0.59[13]
+ 0.49[15]
+ 0.39[14]
+ 0.0[15]
+Tree look:
+ 0.1013[3]
+ 0.1003[2]
+ 0.954[3]
+ 0.944[1]
+0.934[0]
+ 0.895[1]
+ 0.885[4]
+ 0.875[3]
+ 0.836[4]
+ 0.826[7]
+ 0.816[6]
+ 0.777[5]
+ 0.767[9]
+ 0.757[8]
+ 0.718[7]
+ 0.708[10]
+ 0.698[9]
+ 0.659[8]
+ 0.649[9]
+ 0.639[10]
+ 0.600[12]
+ 0.590[13]
+ 0.580[11]
+ 0.541[6]
+ 0.531[9]
+ 0.521[10]
+ 0.472[8]
+ 0.462[9]
+ 0.413[7]
+ 0.403[2]
+ 0.393[3]
+ 0.354[5]
+ 0.344[4]
+ 0.334[5]
+ 0.295[7]
+ 0.285[6]
+ 0.275[7]
+ 0.236[9]
+ 0.226[8]
+ 0.216[9]
+ 0.177[11]
+ 0.167[12]
+ 0.157[10]
+ 0.118[11]
+ 0.108[13]
+ 0.98[12]
+ 0.59[13]
+ 0.49[15]
+ 0.39[14]
+ 0.0[15]
+remove pointer 7, payload 718
+Tree look:
+ 0.1013[5]
+ 0.1003[4]
+ 0.954[5]
+ 0.944[3]
+ 0.934[2]
+ 0.895[1]
+ 0.885[4]
+ 0.875[3]
+ 0.836[2]
+ 0.826[5]
+ 0.816[4]
+ 0.777[3]
+ 0.767[5]
+ 0.757[4]
+0.708[0]
+ 0.698[2]
+ 0.659[3]
+ 0.649[4]
+ 0.639[5]
+ 0.600[7]
+ 0.590[8]
+ 0.580[6]
+ 0.541[1]
+ 0.531[5]
+ 0.521[6]
+ 0.472[4]
+ 0.462[5]
+ 0.413[3]
+ 0.403[2]
+ 0.393[3]
+ 0.354[5]
+ 0.344[4]
+ 0.334[5]
+ 0.295[7]
+ 0.285[6]
+ 0.275[7]
+ 0.236[9]
+ 0.226[8]
+ 0.216[9]
+ 0.177[11]
+ 0.167[12]
+ 0.157[10]
+ 0.118[11]
+ 0.108[13]
+ 0.98[12]
+ 0.59[13]
+ 0.49[15]
+ 0.39[14]
+ 0.0[15]
+remove pointer 8, payload 236
+Tree look:
+ 0.1013[7]
+ 0.1003[6]
+ 0.954[7]
+ 0.944[5]
+ 0.934[4]
+ 0.895[3]
+ 0.885[6]
+ 0.875[5]
+ 0.836[4]
+ 0.826[7]
+ 0.816[6]
+ 0.777[5]
+ 0.767[7]
+ 0.757[6]
+ 0.708[2]
+ 0.698[3]
+ 0.659[4]
+ 0.649[5]
+ 0.639[6]
+ 0.600[8]
+ 0.590[9]
+ 0.580[7]
+ 0.541[1]
+ 0.531[6]
+ 0.521[7]
+ 0.472[5]
+ 0.462[6]
+ 0.413[4]
+ 0.403[3]
+ 0.393[2]
+ 0.354[5]
+ 0.344[4]
+ 0.334[3]
+ 0.295[6]
+ 0.285[5]
+ 0.275[4]
+0.226[0]
+ 0.216[1]
+ 0.177[3]
+ 0.167[4]
+ 0.157[2]
+ 0.118[3]
+ 0.108[5]
+ 0.98[4]
+ 0.59[5]
+ 0.49[7]
+ 0.39[6]
+ 0.0[7]
+remove pointer 9, payload 777
+Tree look:
+ 0.1013[6]
+ 0.1003[5]
+ 0.954[6]
+ 0.944[4]
+ 0.934[3]
+ 0.895[2]
+ 0.885[4]
+ 0.875[3]
+ 0.836[1]
+ 0.826[3]
+ 0.816[2]
+0.767[0]
+ 0.757[2]
+ 0.708[1]
+ 0.698[3]
+ 0.659[4]
+ 0.649[5]
+ 0.639[6]
+ 0.600[8]
+ 0.590[9]
+ 0.580[7]
+ 0.541[2]
+ 0.531[8]
+ 0.521[9]
+ 0.472[7]
+ 0.462[8]
+ 0.413[6]
+ 0.403[5]
+ 0.393[4]
+ 0.354[7]
+ 0.344[6]
+ 0.334[5]
+ 0.295[8]
+ 0.285[7]
+ 0.275[6]
+ 0.226[3]
+ 0.216[4]
+ 0.177[6]
+ 0.167[7]
+ 0.157[5]
+ 0.118[6]
+ 0.108[8]
+ 0.98[7]
+ 0.59[8]
+ 0.49[10]
+ 0.39[9]
+ 0.0[10]
+remove pointer 10, payload 295
+Tree look:
+ 0.1013[8]
+ 0.1003[7]
+ 0.954[8]
+ 0.944[6]
+ 0.934[5]
+ 0.895[4]
+ 0.885[6]
+ 0.875[5]
+ 0.836[3]
+ 0.826[5]
+ 0.816[4]
+ 0.767[2]
+ 0.757[3]
+ 0.708[1]
+ 0.698[3]
+ 0.659[4]
+ 0.649[5]
+ 0.639[6]
+ 0.600[8]
+ 0.590[9]
+ 0.580[7]
+ 0.541[2]
+ 0.531[8]
+ 0.521[9]
+ 0.472[7]
+ 0.462[8]
+ 0.413[6]
+ 0.403[5]
+ 0.393[4]
+ 0.354[6]
+ 0.344[5]
+ 0.334[3]
+0.285[0]
+ 0.275[2]
+ 0.226[1]
+ 0.216[2]
+ 0.177[4]
+ 0.167[5]
+ 0.157[3]
+ 0.118[4]
+ 0.108[6]
+ 0.98[5]
+ 0.59[6]
+ 0.49[8]
+ 0.39[7]
+ 0.0[8]
+remove pointer 11, payload 836
+Tree look:
+ 0.1013[5]
+ 0.1003[4]
+ 0.954[5]
+ 0.944[3]
+ 0.934[2]
+ 0.895[1]
+ 0.885[3]
+ 0.875[2]
+0.826[0]
+ 0.816[2]
+ 0.767[1]
+ 0.757[3]
+ 0.708[2]
+ 0.698[5]
+ 0.659[6]
+ 0.649[7]
+ 0.639[8]
+ 0.600[10]
+ 0.590[11]
+ 0.580[9]
+ 0.541[4]
+ 0.531[10]
+ 0.521[11]
+ 0.472[9]
+ 0.462[10]
+ 0.413[8]
+ 0.403[7]
+ 0.393[6]
+ 0.354[8]
+ 0.344[7]
+ 0.334[5]
+ 0.285[3]
+ 0.275[5]
+ 0.226[4]
+ 0.216[5]
+ 0.177[7]
+ 0.167[8]
+ 0.157[6]
+ 0.118[7]
+ 0.108[9]
+ 0.98[8]
+ 0.59[9]
+ 0.49[11]
+ 0.39[10]
+ 0.0[11]
+remove pointer 12, payload 354
+Tree look:
+ 0.1013[7]
+ 0.1003[6]
+ 0.954[7]
+ 0.944[5]
+ 0.934[4]
+ 0.895[3]
+ 0.885[5]
+ 0.875[4]
+ 0.826[2]
+ 0.816[3]
+ 0.767[1]
+ 0.757[3]
+ 0.708[2]
+ 0.698[4]
+ 0.659[5]
+ 0.649[6]
+ 0.639[7]
+ 0.600[9]
+ 0.590[10]
+ 0.580[8]
+ 0.541[3]
+ 0.531[8]
+ 0.521[9]
+ 0.472[7]
+ 0.462[8]
+ 0.413[6]
+ 0.403[5]
+ 0.393[4]
+0.344[0]
+ 0.334[1]
+ 0.285[2]
+ 0.275[4]
+ 0.226[3]
+ 0.216[4]
+ 0.177[6]
+ 0.167[7]
+ 0.157[5]
+ 0.118[6]
+ 0.108[8]
+ 0.98[7]
+ 0.59[8]
+ 0.49[10]
+ 0.39[9]
+ 0.0[10]
+remove pointer 13, payload 895
+Tree look:
+ 0.1013[4]
+ 0.1003[3]
+ 0.954[4]
+ 0.944[2]
+ 0.934[1]
+0.885[0]
+ 0.875[2]
+ 0.826[1]
+ 0.816[3]
+ 0.767[2]
+ 0.757[5]
+ 0.708[4]
+ 0.698[6]
+ 0.659[7]
+ 0.649[8]
+ 0.639[9]
+ 0.600[11]
+ 0.590[12]
+ 0.580[10]
+ 0.541[5]
+ 0.531[10]
+ 0.521[11]
+ 0.472[9]
+ 0.462[10]
+ 0.413[8]
+ 0.403[7]
+ 0.393[6]
+ 0.344[3]
+ 0.334[4]
+ 0.285[5]
+ 0.275[7]
+ 0.226[6]
+ 0.216[7]
+ 0.177[9]
+ 0.167[10]
+ 0.157[8]
+ 0.118[9]
+ 0.108[11]
+ 0.98[10]
+ 0.59[11]
+ 0.49[13]
+ 0.39[12]
+ 0.0[13]
+remove pointer 14, payload 413
+Tree look:
+ 0.1013[6]
+ 0.1003[5]
+ 0.954[6]
+ 0.944[4]
+ 0.934[3]
+ 0.885[2]
+ 0.875[3]
+ 0.826[1]
+ 0.816[3]
+ 0.767[2]
+ 0.757[5]
+ 0.708[4]
+ 0.698[5]
+ 0.659[6]
+ 0.649[7]
+ 0.639[8]
+ 0.600[10]
+ 0.590[11]
+ 0.580[9]
+ 0.541[3]
+ 0.531[5]
+ 0.521[6]
+ 0.472[4]
+ 0.462[5]
+0.403[0]
+ 0.393[2]
+ 0.344[1]
+ 0.334[2]
+ 0.285[3]
+ 0.275[5]
+ 0.226[4]
+ 0.216[5]
+ 0.177[7]
+ 0.167[8]
+ 0.157[6]
+ 0.118[7]
+ 0.108[9]
+ 0.98[8]
+ 0.59[9]
+ 0.49[11]
+ 0.39[10]
+ 0.0[11]
+remove pointer 15, payload 954
+Tree look:
+ 0.1013[2]
+ 0.1003[1]
+0.944[0]
+ 0.934[1]
+ 0.885[3]
+ 0.875[4]
+ 0.826[2]
+ 0.816[5]
+ 0.767[4]
+ 0.757[7]
+ 0.708[6]
+ 0.698[7]
+ 0.659[8]
+ 0.649[9]
+ 0.639[10]
+ 0.600[12]
+ 0.590[13]
+ 0.580[11]
+ 0.541[5]
+ 0.531[7]
+ 0.521[8]
+ 0.472[6]
+ 0.462[7]
+ 0.403[3]
+ 0.393[5]
+ 0.344[4]
+ 0.334[5]
+ 0.285[6]
+ 0.275[8]
+ 0.226[7]
+ 0.216[8]
+ 0.177[10]
+ 0.167[11]
+ 0.157[9]
+ 0.118[10]
+ 0.108[12]
+ 0.98[11]
+ 0.59[12]
+ 0.49[14]
+ 0.39[13]
+ 0.0[14]
+remove pointer 16, payload 472
+Tree look:
+ 0.1013[4]
+ 0.1003[3]
+ 0.944[2]
+ 0.934[1]
+ 0.885[3]
+ 0.875[4]
+ 0.826[2]
+ 0.816[5]
+ 0.767[4]
+ 0.757[6]
+ 0.708[5]
+ 0.698[6]
+ 0.659[7]
+ 0.649[8]
+ 0.639[9]
+ 0.600[11]
+ 0.590[12]
+ 0.580[10]
+ 0.541[3]
+ 0.531[4]
+ 0.521[5]
+0.462[0]
+ 0.403[1]
+ 0.393[3]
+ 0.344[2]
+ 0.334[3]
+ 0.285[4]
+ 0.275[6]
+ 0.226[5]
+ 0.216[6]
+ 0.177[8]
+ 0.167[9]
+ 0.157[7]
+ 0.118[8]
+ 0.108[10]
+ 0.98[9]
+ 0.59[10]
+ 0.49[12]
+ 0.39[11]
+ 0.0[12]
+remove pointer 17, payload 1013
+Tree look:
+0.1003[0]
+ 0.944[2]
+ 0.934[1]
+ 0.885[4]
+ 0.875[5]
+ 0.826[3]
+ 0.816[6]
+ 0.767[5]
+ 0.757[7]
+ 0.708[6]
+ 0.698[7]
+ 0.659[8]
+ 0.649[9]
+ 0.639[10]
+ 0.600[12]
+ 0.590[13]
+ 0.580[11]
+ 0.541[4]
+ 0.531[5]
+ 0.521[6]
+ 0.462[2]
+ 0.403[3]
+ 0.393[5]
+ 0.344[4]
+ 0.334[5]
+ 0.285[6]
+ 0.275[8]
+ 0.226[7]
+ 0.216[8]
+ 0.177[10]
+ 0.167[11]
+ 0.157[9]
+ 0.118[10]
+ 0.108[12]
+ 0.98[11]
+ 0.59[12]
+ 0.49[14]
+ 0.39[13]
+ 0.0[14]
+remove pointer 18, payload 531
+Tree look:
+ 0.1003[2]
+ 0.944[3]
+ 0.934[1]
+ 0.885[4]
+ 0.875[5]
+ 0.826[3]
+ 0.816[5]
+ 0.767[4]
+ 0.757[6]
+ 0.708[5]
+ 0.698[6]
+ 0.659[7]
+ 0.649[8]
+ 0.639[9]
+ 0.600[11]
+ 0.590[12]
+ 0.580[10]
+ 0.541[2]
+0.521[0]
+ 0.462[1]
+ 0.403[2]
+ 0.393[4]
+ 0.344[3]
+ 0.334[4]
+ 0.285[5]
+ 0.275[7]
+ 0.226[6]
+ 0.216[7]
+ 0.177[9]
+ 0.167[10]
+ 0.157[8]
+ 0.118[9]
+ 0.108[11]
+ 0.98[10]
+ 0.59[11]
+ 0.49[13]
+ 0.39[12]
+ 0.0[13]
+remove pointer 19, payload 49
+Tree look:
+ 0.1003[4]
+ 0.944[5]
+ 0.934[3]
+ 0.885[6]
+ 0.875[7]
+ 0.826[5]
+ 0.816[7]
+ 0.767[6]
+ 0.757[8]
+ 0.708[7]
+ 0.698[8]
+ 0.659[9]
+ 0.649[10]
+ 0.639[11]
+ 0.600[13]
+ 0.590[14]
+ 0.580[12]
+ 0.541[4]
+ 0.521[2]
+ 0.462[1]
+ 0.403[3]
+ 0.393[4]
+ 0.344[2]
+ 0.334[4]
+ 0.285[3]
+ 0.275[6]
+ 0.226[5]
+ 0.216[4]
+ 0.177[7]
+ 0.167[8]
+ 0.157[6]
+ 0.118[5]
+ 0.108[8]
+ 0.98[7]
+ 0.59[6]
+0.39[0]
+ 0.0[1]
+remove pointer 20, payload 590
+Tree look:
+ 0.1003[2]
+ 0.944[3]
+ 0.934[1]
+ 0.885[4]
+ 0.875[5]
+ 0.826[3]
+ 0.816[4]
+ 0.767[2]
+ 0.757[5]
+ 0.708[4]
+ 0.698[3]
+ 0.659[5]
+ 0.649[4]
+ 0.639[5]
+ 0.600[6]
+0.580[0]
+ 0.541[2]
+ 0.521[1]
+ 0.462[2]
+ 0.403[5]
+ 0.393[6]
+ 0.344[4]
+ 0.334[6]
+ 0.285[5]
+ 0.275[8]
+ 0.226[7]
+ 0.216[6]
+ 0.177[9]
+ 0.167[10]
+ 0.157[8]
+ 0.118[7]
+ 0.108[10]
+ 0.98[9]
+ 0.59[8]
+ 0.39[3]
+ 0.0[4]
+remove pointer 21, payload 108
+Tree look:
+ 0.1003[4]
+ 0.944[5]
+ 0.934[3]
+ 0.885[6]
+ 0.875[7]
+ 0.826[5]
+ 0.816[6]
+ 0.767[4]
+ 0.757[7]
+ 0.708[6]
+ 0.698[5]
+ 0.659[7]
+ 0.649[6]
+ 0.639[7]
+ 0.600[8]
+ 0.580[2]
+ 0.541[3]
+ 0.521[1]
+ 0.462[2]
+ 0.403[5]
+ 0.393[6]
+ 0.344[4]
+ 0.334[5]
+ 0.285[3]
+ 0.275[7]
+ 0.226[6]
+ 0.216[5]
+ 0.177[7]
+ 0.167[8]
+ 0.157[6]
+ 0.118[4]
+0.98[0]
+ 0.59[2]
+ 0.39[1]
+ 0.0[2]
+remove pointer 22, payload 649
+Tree look:
+ 0.1003[3]
+ 0.944[4]
+ 0.934[2]
+ 0.885[4]
+ 0.875[5]
+ 0.826[3]
+ 0.816[4]
+ 0.767[1]
+ 0.757[4]
+ 0.708[3]
+ 0.698[2]
+ 0.659[3]
+0.639[0]
+ 0.600[2]
+ 0.580[1]
+ 0.541[3]
+ 0.521[2]
+ 0.462[4]
+ 0.403[7]
+ 0.393[8]
+ 0.344[6]
+ 0.334[7]
+ 0.285[5]
+ 0.275[9]
+ 0.226[8]
+ 0.216[7]
+ 0.177[9]
+ 0.167[10]
+ 0.157[8]
+ 0.118[6]
+ 0.98[3]
+ 0.59[5]
+ 0.39[4]
+ 0.0[5]
+remove pointer 23, payload 167
+Tree look:
+ 0.1003[5]
+ 0.944[6]
+ 0.934[4]
+ 0.885[6]
+ 0.875[7]
+ 0.826[5]
+ 0.816[6]
+ 0.767[3]
+ 0.757[6]
+ 0.708[5]
+ 0.698[4]
+ 0.659[5]
+ 0.639[2]
+ 0.600[3]
+ 0.580[1]
+ 0.541[3]
+ 0.521[2]
+ 0.462[4]
+ 0.403[6]
+ 0.393[7]
+ 0.344[5]
+ 0.334[6]
+ 0.285[3]
+ 0.275[6]
+ 0.226[5]
+ 0.216[4]
+ 0.177[5]
+0.157[0]
+ 0.118[1]
+ 0.98[2]
+ 0.59[4]
+ 0.39[3]
+ 0.0[4]
+remove pointer 24, payload 708
+Tree look:
+ 0.1003[3]
+ 0.944[4]
+ 0.934[2]
+ 0.885[4]
+ 0.875[5]
+ 0.826[3]
+ 0.816[4]
+ 0.767[1]
+ 0.757[2]
+0.698[0]
+ 0.659[2]
+ 0.639[1]
+ 0.600[3]
+ 0.580[2]
+ 0.541[5]
+ 0.521[4]
+ 0.462[6]
+ 0.403[8]
+ 0.393[9]
+ 0.344[7]
+ 0.334[8]
+ 0.285[5]
+ 0.275[8]
+ 0.226[7]
+ 0.216[6]
+ 0.177[7]
+ 0.157[3]
+ 0.118[4]
+ 0.98[5]
+ 0.59[7]
+ 0.39[6]
+ 0.0[7]
+remove pointer 25, payload 226
+Tree look:
+ 0.1003[5]
+ 0.944[6]
+ 0.934[4]
+ 0.885[6]
+ 0.875[7]
+ 0.826[5]
+ 0.816[6]
+ 0.767[3]
+ 0.757[4]
+ 0.698[2]
+ 0.659[3]
+ 0.639[1]
+ 0.600[3]
+ 0.580[2]
+ 0.541[5]
+ 0.521[4]
+ 0.462[5]
+ 0.403[7]
+ 0.393[8]
+ 0.344[6]
+ 0.334[7]
+ 0.285[3]
+ 0.275[4]
+0.216[0]
+ 0.177[2]
+ 0.157[1]
+ 0.118[2]
+ 0.98[3]
+ 0.59[5]
+ 0.39[4]
+ 0.0[5]
+remove pointer 26, payload 767
+Tree look:
+ 0.1003[2]
+ 0.944[3]
+ 0.934[1]
+ 0.885[3]
+ 0.875[4]
+ 0.826[2]
+ 0.816[3]
+0.757[0]
+ 0.698[1]
+ 0.659[3]
+ 0.639[2]
+ 0.600[5]
+ 0.580[4]
+ 0.541[7]
+ 0.521[6]
+ 0.462[7]
+ 0.403[9]
+ 0.393[10]
+ 0.344[8]
+ 0.334[9]
+ 0.285[5]
+ 0.275[6]
+ 0.216[3]
+ 0.177[5]
+ 0.157[4]
+ 0.118[5]
+ 0.98[6]
+ 0.59[8]
+ 0.39[7]
+ 0.0[8]
+remove pointer 27, payload 285
+Tree look:
+ 0.1003[4]
+ 0.944[5]
+ 0.934[3]
+ 0.885[5]
+ 0.875[6]
+ 0.826[4]
+ 0.816[5]
+ 0.757[2]
+ 0.698[1]
+ 0.659[3]
+ 0.639[2]
+ 0.600[4]
+ 0.580[3]
+ 0.541[5]
+ 0.521[4]
+ 0.462[5]
+ 0.403[7]
+ 0.393[8]
+ 0.344[6]
+ 0.334[7]
+0.275[0]
+ 0.216[1]
+ 0.177[3]
+ 0.157[2]
+ 0.118[3]
+ 0.98[4]
+ 0.59[6]
+ 0.39[5]
+ 0.0[6]
+remove pointer 28, payload 826
+Tree look:
+ 0.1003[2]
+ 0.944[3]
+ 0.934[1]
+ 0.885[2]
+ 0.875[3]
+0.816[0]
+ 0.757[1]
+ 0.698[2]
+ 0.659[5]
+ 0.639[4]
+ 0.600[6]
+ 0.580[5]
+ 0.541[7]
+ 0.521[6]
+ 0.462[7]
+ 0.403[9]
+ 0.393[10]
+ 0.344[8]
+ 0.334[9]
+ 0.275[3]
+ 0.216[4]
+ 0.177[6]
+ 0.157[5]
+ 0.118[6]
+ 0.98[7]
+ 0.59[9]
+ 0.39[8]
+ 0.0[9]
+remove pointer 29, payload 344
+Tree look:
+ 0.1003[4]
+ 0.944[5]
+ 0.934[3]
+ 0.885[4]
+ 0.875[5]
+ 0.816[2]
+ 0.757[1]
+ 0.698[2]
+ 0.659[5]
+ 0.639[4]
+ 0.600[5]
+ 0.580[3]
+ 0.541[6]
+ 0.521[5]
+ 0.462[4]
+ 0.403[5]
+ 0.393[6]
+0.334[0]
+ 0.275[1]
+ 0.216[2]
+ 0.177[4]
+ 0.157[3]
+ 0.118[4]
+ 0.98[5]
+ 0.59[7]
+ 0.39[6]
+ 0.0[7]
+remove pointer 30, payload 885
+Tree look:
+ 0.1003[2]
+ 0.944[3]
+ 0.934[1]
+0.875[0]
+ 0.816[1]
+ 0.757[2]
+ 0.698[4]
+ 0.659[7]
+ 0.639[6]
+ 0.600[7]
+ 0.580[5]
+ 0.541[8]
+ 0.521[7]
+ 0.462[6]
+ 0.403[7]
+ 0.393[8]
+ 0.334[3]
+ 0.275[4]
+ 0.216[5]
+ 0.177[7]
+ 0.157[6]
+ 0.118[7]
+ 0.98[8]
+ 0.59[10]
+ 0.39[9]
+ 0.0[10]
+remove pointer 31, payload 403
+Tree look:
+ 0.1003[4]
+ 0.944[5]
+ 0.934[3]
+ 0.875[2]
+ 0.816[1]
+ 0.757[2]
+ 0.698[4]
+ 0.659[6]
+ 0.639[5]
+ 0.600[6]
+ 0.580[3]
+ 0.541[6]
+ 0.521[5]
+ 0.462[4]
+0.393[0]
+ 0.334[1]
+ 0.275[2]
+ 0.216[3]
+ 0.177[5]
+ 0.157[4]
+ 0.118[5]
+ 0.98[6]
+ 0.59[8]
+ 0.39[7]
+ 0.0[8]
+remove pointer 32, payload 944
+Tree look:
+ 0.1003[1]
+0.934[0]
+ 0.875[2]
+ 0.816[1]
+ 0.757[3]
+ 0.698[5]
+ 0.659[7]
+ 0.639[6]
+ 0.600[7]
+ 0.580[4]
+ 0.541[7]
+ 0.521[6]
+ 0.462[5]
+ 0.393[2]
+ 0.334[3]
+ 0.275[4]
+ 0.216[5]
+ 0.177[7]
+ 0.157[6]
+ 0.118[7]
+ 0.98[8]
+ 0.59[10]
+ 0.39[9]
+ 0.0[10]
+remove pointer 33, payload 462
+Tree look:
+ 0.1003[3]
+ 0.934[2]
+ 0.875[3]
+ 0.816[1]
+ 0.757[3]
+ 0.698[4]
+ 0.659[6]
+ 0.639[5]
+ 0.600[6]
+ 0.580[2]
+ 0.541[4]
+ 0.521[3]
+0.393[0]
+ 0.334[1]
+ 0.275[2]
+ 0.216[3]
+ 0.177[5]
+ 0.157[4]
+ 0.118[5]
+ 0.98[6]
+ 0.59[8]
+ 0.39[7]
+ 0.0[8]
+remove pointer 34, payload 1003
+Tree look:
+0.934[0]
+ 0.875[2]
+ 0.816[1]
+ 0.757[4]
+ 0.698[5]
+ 0.659[7]
+ 0.639[6]
+ 0.600[7]
+ 0.580[3]
+ 0.541[5]
+ 0.521[4]
+ 0.393[2]
+ 0.334[3]
+ 0.275[4]
+ 0.216[5]
+ 0.177[7]
+ 0.157[6]
+ 0.118[7]
+ 0.98[8]
+ 0.59[10]
+ 0.39[9]
+ 0.0[10]
+remove pointer 35, payload 521
+Tree look:
+ 0.934[2]
+ 0.875[3]
+ 0.816[1]
+ 0.757[3]
+ 0.698[4]
+ 0.659[6]
+ 0.639[5]
+ 0.600[6]
+ 0.580[2]
+ 0.541[3]
+0.393[0]
+ 0.334[1]
+ 0.275[2]
+ 0.216[3]
+ 0.177[5]
+ 0.157[4]
+ 0.118[5]
+ 0.98[6]
+ 0.59[8]
+ 0.39[7]
+ 0.0[8]
+remove pointer 36, payload 39
+Tree look:
+ 0.934[4]
+ 0.875[5]
+ 0.816[3]
+ 0.757[5]
+ 0.698[6]
+ 0.659[8]
+ 0.639[7]
+ 0.600[8]
+ 0.580[4]
+ 0.541[5]
+ 0.393[2]
+ 0.334[1]
+ 0.275[3]
+ 0.216[2]
+ 0.177[5]
+ 0.157[4]
+ 0.118[3]
+ 0.98[4]
+ 0.59[5]
+0.0[0]
+remove pointer 37, payload 580
+Tree look:
+ 0.934[2]
+ 0.875[3]
+ 0.816[1]
+ 0.757[2]
+ 0.698[3]
+ 0.659[5]
+ 0.639[4]
+ 0.600[5]
+0.541[0]
+ 0.393[1]
+ 0.334[2]
+ 0.275[5]
+ 0.216[4]
+ 0.177[7]
+ 0.157[6]
+ 0.118[5]
+ 0.98[6]
+ 0.59[7]
+ 0.0[3]
+remove pointer 38, payload 98
+Tree look:
+ 0.934[4]
+ 0.875[5]
+ 0.816[3]
+ 0.757[4]
+ 0.698[5]
+ 0.659[7]
+ 0.639[6]
+ 0.600[7]
+ 0.541[2]
+ 0.393[1]
+ 0.334[2]
+ 0.275[5]
+ 0.216[4]
+ 0.177[6]
+ 0.157[5]
+ 0.118[3]
+0.59[0]
+ 0.0[1]
+remove pointer 39, payload 639
+Tree look:
+ 0.934[3]
+ 0.875[4]
+ 0.816[2]
+ 0.757[1]
+ 0.698[2]
+ 0.659[3]
+0.600[0]
+ 0.541[1]
+ 0.393[2]
+ 0.334[4]
+ 0.275[7]
+ 0.216[6]
+ 0.177[8]
+ 0.157[7]
+ 0.118[5]
+ 0.59[3]
+ 0.0[4]
+remove pointer 40, payload 157
+Tree look:
+ 0.934[5]
+ 0.875[6]
+ 0.816[4]
+ 0.757[3]
+ 0.698[4]
+ 0.659[5]
+ 0.600[2]
+ 0.541[1]
+ 0.393[2]
+ 0.334[3]
+ 0.275[5]
+ 0.216[4]
+ 0.177[5]
+0.118[0]
+ 0.59[1]
+ 0.0[2]
+remove pointer 41, payload 698
+Tree look:
+ 0.934[3]
+ 0.875[4]
+ 0.816[2]
+ 0.757[1]
+0.659[0]
+ 0.600[1]
+ 0.541[2]
+ 0.393[4]
+ 0.334[5]
+ 0.275[7]
+ 0.216[6]
+ 0.177[7]
+ 0.118[3]
+ 0.59[4]
+ 0.0[5]
+remove pointer 42, payload 216
+Tree look:
+ 0.934[5]
+ 0.875[6]
+ 0.816[4]
+ 0.757[3]
+ 0.659[2]
+ 0.600[1]
+ 0.541[2]
+ 0.393[4]
+ 0.334[3]
+ 0.275[4]
+0.177[0]
+ 0.118[1]
+ 0.59[2]
+ 0.0[3]
+remove pointer 43, payload 757
+Tree look:
+ 0.934[2]
+ 0.875[3]
+ 0.816[1]
+0.659[0]
+ 0.600[1]
+ 0.541[3]
+ 0.393[5]
+ 0.334[4]
+ 0.275[5]
+ 0.177[2]
+ 0.118[3]
+ 0.59[4]
+ 0.0[5]
+remove pointer 44, payload 275
+Tree look:
+ 0.934[4]
+ 0.875[5]
+ 0.816[3]
+ 0.659[2]
+ 0.600[1]
+ 0.541[3]
+ 0.393[4]
+ 0.334[2]
+0.177[0]
+ 0.118[1]
+ 0.59[2]
+ 0.0[3]
+remove pointer 45, payload 816
+Tree look:
+ 0.934[1]
+ 0.875[2]
+0.659[0]
+ 0.600[1]
+ 0.541[4]
+ 0.393[5]
+ 0.334[3]
+ 0.177[2]
+ 0.118[3]
+ 0.59[4]
+ 0.0[5]
+remove pointer 46, payload 334
+Tree look:
+ 0.934[3]
+ 0.875[4]
+ 0.659[2]
+ 0.600[1]
+ 0.541[2]
+ 0.393[3]
+0.177[0]
+ 0.118[1]
+ 0.59[2]
+ 0.0[3]
+remove pointer 47, payload 875
+Tree look:
+ 0.934[1]
+0.659[0]
+ 0.600[1]
+ 0.541[3]
+ 0.393[4]
+ 0.177[2]
+ 0.118[3]
+ 0.59[4]
+ 0.0[5]
+remove pointer 48, payload 393
+Tree look:
+ 0.934[3]
+ 0.659[2]
+ 0.600[1]
+ 0.541[2]
+0.177[0]
+ 0.118[1]
+ 0.59[2]
+ 0.0[3]
+remove pointer 49, payload 934
+Tree look:
+0.659[0]
+ 0.600[1]
+ 0.541[3]
+ 0.177[2]
+ 0.118[3]
+ 0.59[4]
+ 0.0[5]
+remove pointer 0, payload 0
+Tree look:
+ 0.659[1]
+0.600[0]
+ 0.541[3]
+ 0.177[2]
+ 0.118[1]
+ 0.59[2]
+remove pointer 1, payload 541
+Tree look:
+ 0.659[2]
+ 0.600[1]
+0.177[0]
+ 0.118[1]
+ 0.59[2]
+remove pointer 2, payload 59
+Tree look:
+ 0.659[3]
+ 0.600[2]
+ 0.177[1]
+0.118[0]
+remove pointer 3, payload 600
+Tree look:
+ 0.659[1]
+0.177[0]
+ 0.118[1]
+remove pointer 4, payload 118
+Tree look:
+ 0.659[1]
+0.177[0]
+remove pointer 5, payload 659
+Tree look:
+0.177[0]
+remove pointer 6, payload 177
+</stdout>
+</verify>
+
+</testcase>
diff --git a/tests/data/test131 b/tests/data/test131
index 4e9ba6d9..6e99d8a8 100644
--- a/tests/data/test131
+++ b/tests/data/test131
@@ -13,7 +13,7 @@ netrc
#
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@@ -31,9 +31,6 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
<client>
-<features>
-netrc_debug
-</features>
<server>
ftp
</server>
@@ -41,9 +38,9 @@ ftp
FTP (optional .netrc; user/no pass) dir list PASV
</name>
<command>
---netrc-optional ftp://user2@%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc131 ftp://user2@%HOSTIP:%FTPPORT/
</command>
-<file name="log/netrc" >
+<file name="log/netrc131" >
# the following two lines were created while testing curl
machine %HOSTIP login user1 password passwd1
machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1310 b/tests/data/test1310
new file mode 100644
index 00000000..9ffe0d58
--- /dev/null
+++ b/tests/data/test1310
@@ -0,0 +1,125 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- no <data> in this test since we have NTLM from the start
+
+This is supposed to be returned when the server gets a first
+Authorization: NTLM line passed-in from the client -->
+
+<data1001>
+HTTP/1.1 401 Now gimme that second request of crap
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 34
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+
+This is not the real page either!
+</data1001>
+
+# This is supposed to be returned when the server gets the second
+# Authorization: NTLM line passed-in from the client
+<data1002>
+HTTP/1.1 200 Things are fine in server land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1002>
+
+<datacheck>
+HTTP/1.1 401 Now gimme that second request of crap
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 34
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+
+HTTP/1.1 200 Things are fine in server land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM_WB
+debug
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP with NTLM delegation to winbind helper
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+# set path to fake_auth instead of real ntlm_auth to generate NTLM type1 and type 3 messages
+CURL_NTLM_WB_FILE=%PWD/server/fake_ntlm
+# set source directory so fake_ntlm can find the test files
+CURL_NTLM_AUTH_SRCDIR=%SRCDIR
+# set the test number
+CURL_NTLM_AUTH_TESTNUM=1310
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/1310 -u testuser:anypasswd --ntlm-wb
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1310 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
+Accept: */*
+
+GET /1310 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
+Accept: */*
+
+</protocol>
+</verify>
+# Input and output (type 1 message) for fake_ntlm
+<ntlm_auth_type1>
+<input>
+YR
+</input>
+<output>
+YR TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA
+</output>
+</ntlm_auth_type1>
+# Input and output (type 3 message) for fake_ntlm
+<ntlm_auth_type3>
+<input>
+TT TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+</input>
+<output>
+KK TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==
+</output>
+</ntlm_auth_type3>
+</testcase>
diff --git a/tests/data/test1311 b/tests/data/test1311
new file mode 100644
index 00000000..e47647c3
--- /dev/null
+++ b/tests/data/test1311
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1311; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -J output in
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -J and Content-Disposition
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1311 -J -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1311 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file name="log/name1311">
+12345
+</file>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1312 b/tests/data/test1312
new file mode 100644
index 00000000..92144015
--- /dev/null
+++ b/tests/data/test1312
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: inline; filename="name1312;weird"
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -J output in
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -J, Content-Disposition and ; in filename
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1312 -J -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1312 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file name="log/name1312;weird">
+12345
+</file>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1313 b/tests/data/test1313
new file mode 100644
index 00000000..2331ae9e
--- /dev/null
+++ b/tests/data/test1313
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: inline; filename='name1313
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -J output in
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -J, Content-Disposition, uneven quotes
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1313 -J -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1313 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file name="log/name1313">
+12345
+</file>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1314 b/tests/data/test1314
new file mode 100644
index 00000000..078ada64
--- /dev/null
+++ b/tests/data/test1314
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+followlocation
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 301 This is a weirdo text message swsbounce
+Server: test-server/fake
+Location: //somewhere.example.com/reply/1314
+Content-Length: 32
+Connection: close
+
+Redirect to the same URL again!
+</data>
+
+<data1>
+HTTP/1.1 200 okidoki
+Server: test-server/fake
+Content-Length: 4
+Connection: close
+
+moo
+</data1>
+
+<datacheck>
+HTTP/1.1 301 This is a weirdo text message swsbounce
+Server: test-server/fake
+Location: //somewhere.example.com/reply/1314
+Content-Length: 32
+Connection: close
+
+HTTP/1.1 200 okidoki
+Server: test-server/fake
+Content-Length: 4
+Connection: close
+
+moo
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP Location: following a // prefixed url
+ </name>
+ <command>
+http://firstplace.example.com/want/1314 -L -x http://%HOSTIP:%HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent: curl/.*
+</strip>
+<protocol>
+GET http://firstplace.example.com/want/1314 HTTP/1.1
+Host: firstplace.example.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://somewhere.example.com/reply/1314 HTTP/1.1
+Host: somewhere.example.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1315 b/tests/data/test1315
new file mode 100644
index 00000000..c2f158a9
--- /dev/null
+++ b/tests/data/test1315
@@ -0,0 +1,83 @@
+<testcase>
+# Based on tests 186 and 1053
+<info>
+<keywords>
+HTTP
+HTTP FORMPOST
+HTTP file upload
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP RFC1867-type formposting - -F with three files, one with explicit type
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1315 -F name=value -F 'file=@log/test1315.txt,log/test1315.txt;type=magic/content,log/test1315.txt'
+</command>
+# We create this file before the command is invoked!
+<file name="log/test1315.txt">
+dummy data
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+(^User-Agent:.*|-----+\w+)
+</strip>
+<protocol>
+POST /we/want/1315 HTTP/1.1
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 795
+Expect: 100-continue
+Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
+
+------------------------------9ef8d6205763
+Content-Disposition: form-data; name="name"
+
+value
+------------------------------9ef8d6205763
+Content-Disposition: form-data; name="file"
+Content-Type: multipart/mixed; boundary=----------------------------aaaaaaaaaaaa
+
+Content-Disposition: attachment; filename="test1315.txt"
+Content-Type: text/plain
+
+dummy data
+
+------------------------------9ef8d6205763
+Content-Disposition: attachment; filename="test1315.txt"
+Content-Type: magic/content
+
+dummy data
+
+------------------------------9ef8d6205763
+Content-Disposition: attachment; filename="test1315.txt"
+Content-Type: text/plain
+
+dummy data
+
+------------------------------aaaaaaaaaaaa--
+------------------------------9ef8d6205763--
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1316 b/tests/data/test1316
new file mode 100644
index 00000000..d6ea5e18
--- /dev/null
+++ b/tests/data/test1316
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+LIST
+HTTP
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+Magic: sure you can FTP me
+
+</connect>
+
+# When doing LIST, we get the default list output hard-coded in the test
+# FTP server
+<datacheck mode="text">
+HTTP/1.1 200 Mighty fine indeed
+Magic: sure you can FTP me
+
+HTTP/1.1 200 Mighty fine indeed
+Magic: sure you can FTP me
+
+total 20
+drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
+drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
+drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT
+-r--r--r-- 1 0 1 35 Jul 16 1996 README
+lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
+dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
+drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
+dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
+drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
+dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+
+# please send the real CONNECT connect off to the FTP server's port
+<connectport>
+%FTPPORT
+</connectport>
+<server>
+ftp
+http-proxy
+</server>
+<features>
+http
+</features>
+ <name>
+FTP LIST tunneled through HTTP proxy
+ </name>
+ <command>
+ftp://ftp.1316:%FTPPORT/ -p -x %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE A
+LIST
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1317 b/tests/data/test1317
new file mode 100644
index 00000000..d41886a5
--- /dev/null
+++ b/tests/data/test1317
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--resolve
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP with --resolve
+</name>
+<command>
+--resolve example.com:%HTTPPORT:%HOSTIP http://example.com:%HTTPPORT/1317
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1317 HTTP/1.1
+Host: example.com:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1318 b/tests/data/test1318
new file mode 100644
index 00000000..dc182dcc
--- /dev/null
+++ b/tests/data/test1318
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--resolve
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+
+</data>
+<data1>
+HTTP/1.1 200 second version
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with --resolve and same host name using different cases
+ </name>
+ <command>
+--resolve MiXeDcAsE.cOm:%HTTPPORT:%HOSTIP http://MiXeDcAsE.cOm:%HTTPPORT/1318 http://mixedcase.com:%HTTPPORT/13180001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1318 HTTP/1.1
+Host: MiXeDcAsE.cOm:%HTTPPORT
+Accept: */*
+
+GET /13180001 HTTP/1.1
+Host: mixedcase.com:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1319 b/tests/data/test1319
new file mode 100644
index 00000000..0520b1b3
--- /dev/null
+++ b/tests/data/test1319
@@ -0,0 +1,86 @@
+<testcase>
+<info>
+<keywords>
+POP3
+RETR
+HTTP
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+pop3: sure hit me
+
+</connect>
+
+# When doing LIST, we get the default list output hard-coded in the test
+# FTP server
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed
+pop3: sure hit me
+
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+http-proxy
+</server>
+<features>
+http
+</features>
+ <name>
+POP3 fetch tunneled through HTTP proxy
+ </name>
+ <command>
+pop3://pop.1319:%POP3PORT/1319 -p -x %HOSTIP:%PROXYPORT -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:
+</strip>
+<protocol>
+CAPA
+USER user
+PASS secret
+RETR 1319
+QUIT
+</protocol>
+<proxy>
+CONNECT pop.1319:%POP3PORT HTTP/1.1
+Host: pop.1319:%POP3PORT
+User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e
+Proxy-Connection: Keep-Alive
+
+</proxy>
+</verify>
+</testcase>
diff --git a/tests/data/test132 b/tests/data/test132
index 2ff39fb9..51cb89c9 100644
--- a/tests/data/test132
+++ b/tests/data/test132
@@ -12,7 +12,7 @@ netrc
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@@ -30,9 +30,6 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
<client>
-<features>
-netrc_debug
-</features>
<server>
ftp
</server>
@@ -40,9 +37,9 @@ ftp
FTP (optional .netrc; user/passwd supplied) dir list PASV
</name>
<command>
---netrc-optional ftp://mary:mark@%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc132 ftp://mary:mark@%HOSTIP:%FTPPORT/
</command>
-<file name="log/netrc" >
+<file name="log/netrc132" >
# the following two lines were created while testing curl
machine %HOSTIP login user1 password passwd1
machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1320 b/tests/data/test1320
new file mode 100644
index 00000000..7a15f809
--- /dev/null
+++ b/tests/data/test1320
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+HTTP
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+smtp: sure hit me
+
+</connect>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+http-proxy
+</server>
+<features>
+http
+</features>
+ <name>
+SMTP send tunneled through HTTP proxy
+ </name>
+<stdin>
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://smtp.1320:%SMTPPORT/1320 --mail-rcpt recipient@example.com --mail-from sender@example.com -T - -p -x %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent: curl/.*
+</strip>
+<protocol>
+EHLO 1320
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+body
+.
+</upload>
+<proxy>
+CONNECT smtp.1320:%SMTPPORT HTTP/1.1
+Host: smtp.1320:%SMTPPORT
+User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e
+Proxy-Connection: Keep-Alive
+
+</proxy>
+</verify>
+</testcase>
diff --git a/tests/data/test1321 b/tests/data/test1321
new file mode 100644
index 00000000..266fd882
--- /dev/null
+++ b/tests/data/test1321
@@ -0,0 +1,82 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+FETCH
+HTTP
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+imap: sure hit me
+
+</connect>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed
+imap: sure hit me
+
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+http-proxy
+</server>
+<features>
+http
+</features>
+ <name>
+IMAP FETCH tunneled through HTTP proxy
+ </name>
+ <command>
+'imap://imap.1321:%IMAPPORT/1321/;UID=1' -u user:secret -p -x %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent: curl/.*
+</strip>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 1321
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+<proxy>
+CONNECT imap.1321:%IMAPPORT HTTP/1.1
+Host: imap.1321:%IMAPPORT
+User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e
+Proxy-Connection: Keep-Alive
+
+</proxy>
+</verify>
+</testcase>
diff --git a/tests/data/test1325 b/tests/data/test1325
new file mode 100644
index 00000000..9f5ee58e
--- /dev/null
+++ b/tests/data/test1325
@@ -0,0 +1,80 @@
+<testcase>
+# http://greenbytes.de/tech/webdav/draft-reschke-http-status-308-latest.html
+<info>
+<keywords>
+HTTP
+HTTP GET
+308
+followlocation
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 308 OK swsclose
+Location: 13250002
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+</data>
+<data2>
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</data2>
+<datacheck>
+HTTP/1.1 308 OK swsclose
+Location: 13250002
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP 308-redirect with POST
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/1325 -L -d "moo"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST /we/1325 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 3
+Content-Type: application/x-www-form-urlencoded
+
+mooPOST /we/13250002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 3
+Content-Type: application/x-www-form-urlencoded
+
+moo
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1326 b/tests/data/test1326
new file mode 100644
index 00000000..bb0cbacc
--- /dev/null
+++ b/tests/data/test1326
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+TELNET
+UPLOAD
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 swsclose
+
+moo
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+telnet
+</features>
+ <name>
+TELNET to HTTP server
+ </name>
+<stdin>
+GET /we/want/1326 HTTP/1.0
+
+</stdin>
+ <command>
+telnet://%HOSTIP:%HTTPPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/1326 HTTP/1.0
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1327 b/tests/data/test1327
new file mode 100644
index 00000000..a6e3d4fd
--- /dev/null
+++ b/tests/data/test1327
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+TELNET
+UPLOAD
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+telnet
+</features>
+ <name>
+TELNET check of upload with stdout redirected
+ </name>
+<stdin>
+GET /ignore/for/1327 HTTP/1.0
+
+</stdin>
+<file name="log/1327.txt">
+GET /we/want/1327 HTTP/1.0
+
+</file>
+ <command option="no-output">
+telnet://%HOSTIP:%HTTPPORT -T log/1327.txt
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/1327 HTTP/1.0
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1328 b/tests/data/test1328
new file mode 100644
index 00000000..06088884
--- /dev/null
+++ b/tests/data/test1328
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+globbing
+--fail
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 404 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Funny-head: yesyes
+
+-noo-
+</data>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Funny-head: yesyes
+
+-yes-
+</data1>
+<datacheck>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Funny-head: yesyes
+
+-yes-
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET a globbed range with -f
+ </name>
+ <command>
+-f 'http://%HOSTIP:%HTTPPORT/[13280000-13280001]' -o log/#1
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /13280000 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /13280001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1329 b/tests/data/test1329
new file mode 100644
index 00000000..3d2d0cb6
--- /dev/null
+++ b/tests/data/test1329
@@ -0,0 +1,30 @@
+<testcase>
+<info>
+<keywords>
+HTTP proxy
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+/-prefixed proxy name
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/that/page/1329 -x "/server"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 5 == CURLE_COULDNT_RESOLVE_PROXY
+<errorcode>
+5
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test133 b/tests/data/test133
index 2e6b2c3a..0b4d2ff7 100644
--- a/tests/data/test133
+++ b/tests/data/test133
@@ -12,7 +12,7 @@ netrc
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@@ -30,9 +30,6 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
<client>
-<features>
-netrc_debug
-</features>
<server>
ftp
</server>
@@ -40,9 +37,9 @@ ftp
FTP (compulsory .netrc; ignored user/passwd) dir list PASV
</name>
<command>
--n ftp://mary:mark@%HOSTIP:%FTPPORT/
+-n --netrc-file log/netrc133 ftp://mary:mark@%HOSTIP:%FTPPORT/
</command>
-<file name="log/netrc" >
+<file name="log/netrc133" >
# the following two lines were created while testing curl
machine %HOSTIP login user1 password passwd1
machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1330 b/tests/data/test1330
new file mode 100644
index 00000000..1fb5a668
--- /dev/null
+++ b/tests/data/test1330
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+unittest
+TrackMemory
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+TrackMemory
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+unit1330
+</tool>
+
+<name>
+unit tests memory tracking operational
+</name>
+<command>
+nothing
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file name="log/memdump">
+MEM unit1330.c: malloc()
+MEM unit1330.c: free()
+</file>
+<stripfile>
+s/ =.*//
+s/\(.*\)/()/
+s/:\d+/:/
+s:^(MEM )(.*/)(.*):$1$3:
+</stripfile>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1331 b/tests/data/test1331
new file mode 100644
index 00000000..3299df46
--- /dev/null
+++ b/tests/data/test1331
@@ -0,0 +1,89 @@
+<testcase>
+# Test case inspired by this question on stackoverflow:
+#
+# http://stackoverflow.com/questions/10017165/use-libcurl-with-bluecoat-cookie-proxy
+#
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+cookies
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 407 Me not know you swsbounce
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Content-Type: text/html
+Set-Cookie: proxycookie=weirdo; Path=/
+Cache-control: private
+Content-Length: 62
+Proxy-Authenticate: Basic realm="moo on you"
+
+This server reply is for testing a simple cookie test case...
+</data>
+
+<data1>
+HTTP/1.1 200 Fine!
+Content-Type: text/html
+Content-Length: 6
+
+hello
+</data1>
+
+<datacheck>
+HTTP/1.1 407 Me not know you swsbounce
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Content-Type: text/html
+Set-Cookie: proxycookie=weirdo; Path=/
+Cache-control: private
+Content-Length: 62
+Proxy-Authenticate: Basic realm="moo on you"
+
+HTTP/1.1 200 Fine!
+Content-Type: text/html
+Content-Length: 6
+
+hello
+</datacheck>
+
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP --proxy-anyauth and 407 with cookies
+ </name>
+ <command>
+-U myname:mypassword -x %HOSTIP:%HTTPPORT http://z.x.com/1331 --proxy-anyauth -c log/dump1331
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://z.x.com/1331 HTTP/1.1
+Host: z.x.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://z.x.com/1331 HTTP/1.1
+Host: z.x.com
+Proxy-Authorization: Basic bXluYW1lOm15cGFzc3dvcmQ=
+Accept: */*
+Proxy-Connection: Keep-Alive
+Cookie: proxycookie=weirdo
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1332 b/tests/data/test1332
new file mode 100644
index 00000000..3447b2dd
--- /dev/null
+++ b/tests/data/test1332
@@ -0,0 +1,80 @@
+<testcase>
+# test case cloned from 1076 and then 302 was replaced with 303
+<info>
+<keywords>
+HTTP
+HTTP POST
+followlocation
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 303 OK swsclose
+Location: moo.html&testcase=/13320002
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+</data>
+<data2>
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</data2>
+<datacheck>
+HTTP/1.1 303 OK swsclose
+Location: moo.html&testcase=/13320002
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP POST with 303 redirect and --post303
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/blah/1332 -L -d "moo" --post303
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST /blah/1332 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 3
+Content-Type: application/x-www-form-urlencoded
+
+mooPOST /blah/moo.html&testcase=/13320002 HTTP/1.1
+User-Agent: curl/7.10 (i686-pc-linux-gnu) libcurl/7.10 OpenSSL/0.9.6c ipv6 zlib/1.1.3
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 3
+Content-Type: application/x-www-form-urlencoded
+
+moo
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1333 b/tests/data/test1333
new file mode 100644
index 00000000..a2ea3014
--- /dev/null
+++ b/tests/data/test1333
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP POST zero length, chunked-encoded
+ </name>
+ <command>
+-d "" --header "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/1333
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+POST /1333 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Transfer-Encoding: chunked
+Content-Type: application/x-www-form-urlencoded
+
+0
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1334 b/tests/data/test1334
new file mode 100644
index 00000000..59116e38
--- /dev/null
+++ b/tests/data/test1334
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O without Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1334 -O -D log/heads1334
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1334 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1334">
+12345
+</file1>
+
+<file2 name="log/heads1334">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1334">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1335 b/tests/data/test1335
new file mode 100644
index 00000000..bb499e73
--- /dev/null
+++ b/tests/data/test1335
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O without Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1335 -O -D -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1335 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1335">
+12345
+</file1>
+
+<file2 name="log/stdout1335">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1336 b/tests/data/test1336
new file mode 100644
index 00000000..ebe562b6
--- /dev/null
+++ b/tests/data/test1336
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1336; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O and Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1336 -O -D log/heads1336
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1336
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1336 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1336">
+12345
+</file1>
+
+<file2 name="log/heads1336">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1336; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1336">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1337 b/tests/data/test1337
new file mode 100644
index 00000000..80a99fac
--- /dev/null
+++ b/tests/data/test1337
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1337; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O and Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1337 -O -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1337
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1337 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1337">
+12345
+</file1>
+
+<file2 name="log/stdout1337">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1337; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1338 b/tests/data/test1338
new file mode 100644
index 00000000..d96f8046
--- /dev/null
+++ b/tests/data/test1338
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -J without Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1338 -J -O -D log/heads1338
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1338 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1338">
+12345
+</file1>
+
+<file2 name="log/heads1338">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1338">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1339 b/tests/data/test1339
new file mode 100644
index 00000000..a3c1f0e5
--- /dev/null
+++ b/tests/data/test1339
@@ -0,0 +1,74 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -J without Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1339 -J -O -D -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1339 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1339">
+12345
+</file1>
+
+<file2 name="log/stdout1339">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test134 b/tests/data/test134
index 8ff9c190..e314b662 100644
--- a/tests/data/test134
+++ b/tests/data/test134
@@ -12,7 +12,7 @@ netrc
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
@@ -30,9 +30,6 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
<client>
-<features>
-netrc_debug
-</features>
<server>
ftp
</server>
@@ -40,9 +37,9 @@ ftp
FTP (optional .netrc; programmatic user/passwd) dir list PASV
</name>
<command>
---netrc-optional -u romulus:rhemus ftp://mary:mark@%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc134 -u romulus:rhemus ftp://mary:mark@%HOSTIP:%FTPPORT/
</command>
-<file name="log/netrc" >
+<file name="log/netrc134" >
# the following two lines were created while testing curl
machine %HOSTIP login user1 password passwd1
machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1340 b/tests/data/test1340
new file mode 100644
index 00000000..81f1ed68
--- /dev/null
+++ b/tests/data/test1340
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1340; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -J and Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1340 -J -O -D log/heads1340
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1340 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/name1340">
+12345
+</file1>
+
+<file2 name="log/heads1340">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1340; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1340" mode="text">
+curl: Saved to filename '%PWD/log/name1340'
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1341 b/tests/data/test1341
new file mode 100644
index 00000000..b364edeb
--- /dev/null
+++ b/tests/data/test1341
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1341; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -J and Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1341 -J -O -D -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1341 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/name1341">
+12345
+</file1>
+
+<file2 name="log/stdout1341">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1341; charset=funny; option=strange
+
+curl: Saved to filename '%PWD/log/name1341'
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1342 b/tests/data/test1342
new file mode 100644
index 00000000..1d7889d1
--- /dev/null
+++ b/tests/data/test1342
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i without Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1342 -i -O -D log/heads1342
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1342 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1342">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/heads1342">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1342">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1343 b/tests/data/test1343
new file mode 100644
index 00000000..a05cab04
--- /dev/null
+++ b/tests/data/test1343
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i without Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1343 -i -O -D -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1343 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1343">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/stdout1343">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1344 b/tests/data/test1344
new file mode 100644
index 00000000..ac354f0d
--- /dev/null
+++ b/tests/data/test1344
@@ -0,0 +1,89 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1344; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i and Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1344 -i -O -D log/heads1344
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1344
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1344 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1344">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1344; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/heads1344">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1344; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1344">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1345 b/tests/data/test1345
new file mode 100644
index 00000000..6d1201e1
--- /dev/null
+++ b/tests/data/test1345
@@ -0,0 +1,86 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1345; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i and Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1345 -i -O -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1345
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1345 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1345">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1345; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/stdout1345">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1345; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1346 b/tests/data/test1346
new file mode 100644
index 00000000..347214e6
--- /dev/null
+++ b/tests/data/test1346
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i without Content-Disposition, without -D
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1346 -i -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1346 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1346">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/stdout1346">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1347 b/tests/data/test1347
new file mode 100644
index 00000000..8eac42cb
--- /dev/null
+++ b/tests/data/test1347
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1347; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i and Content-Disposition, without -D
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1347 -i -O
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1347
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1347 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/1347">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1347; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/stdout1347">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1348 b/tests/data/test1348
new file mode 100644
index 00000000..5f374cb2
--- /dev/null
+++ b/tests/data/test1348
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without Content-Disposition inside, using -O
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1348 -O
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1348
+RETR file1348
+QUIT
+</protocol>
+
+<file1 name="log/file1348">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1348">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1349 b/tests/data/test1349
new file mode 100644
index 00000000..33906f8a
--- /dev/null
+++ b/tests/data/test1349
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1349 -O -D log/heads1349
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1349
+RETR file1349
+QUIT
+</protocol>
+
+<file1 name="log/file1349">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/heads1349">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1349 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1349">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test135 b/tests/data/test135
index a051dba2..10eb0eac 100644
--- a/tests/data/test135
+++ b/tests/data/test135
@@ -47,6 +47,7 @@ TYPE I
SIZE 135
REST 4
RETR 135
+ABOR
QUIT
</protocol>
</verify>
diff --git a/tests/data/test1350 b/tests/data/test1350
new file mode 100644
index 00000000..b7885972
--- /dev/null
+++ b/tests/data/test1350
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1350 -O -D -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1350
+RETR file1350
+QUIT
+</protocol>
+
+<file1 name="log/file1350">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/stdout1350">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1350 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1351 b/tests/data/test1351
new file mode 100644
index 00000000..3e9cc211
--- /dev/null
+++ b/tests/data/test1351
@@ -0,0 +1,84 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -J -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1351 -O -J -D log/heads1351
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1351
+RETR file1351
+QUIT
+</protocol>
+
+<file1 name="log/file1351">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/heads1351">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1351 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1351">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1352 b/tests/data/test1352
new file mode 100644
index 00000000..cf690af6
--- /dev/null
+++ b/tests/data/test1352
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -J -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1352 -O -J -D -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1352
+RETR file1352
+QUIT
+</protocol>
+
+<file1 name="log/file1352">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/stdout1352">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1352 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1353 b/tests/data/test1353
new file mode 100644
index 00000000..8bd751c2
--- /dev/null
+++ b/tests/data/test1353
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -i -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1353 -O -i -D log/heads1353
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1353
+RETR file1353
+QUIT
+</protocol>
+
+<file1 name="log/file1353">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/heads1353">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1353 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1353">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1354 b/tests/data/test1354
new file mode 100644
index 00000000..13c5a1bb
--- /dev/null
+++ b/tests/data/test1354
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -i -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1354 -O -i -D -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1354
+RETR file1354
+QUIT
+</protocol>
+
+<file1 name="log/file1354">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1354">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1354 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1355 b/tests/data/test1355
new file mode 100644
index 00000000..e7a392c1
--- /dev/null
+++ b/tests/data/test1355
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -i, without -D
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1355 -O -i
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1355
+RETR file1355
+QUIT
+</protocol>
+
+<file1 name="log/file1355">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1355">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1356 b/tests/data/test1356
new file mode 100644
index 00000000..ea610a56
--- /dev/null
+++ b/tests/data/test1356
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1356 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1356; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with Content-Disposition inside, using -O
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1356 -O
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1356
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1356
+RETR file1356
+QUIT
+</protocol>
+
+<file1 name="log/file1356">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1356; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1356">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1357 b/tests/data/test1357
new file mode 100644
index 00000000..3df0ad33
--- /dev/null
+++ b/tests/data/test1357
@@ -0,0 +1,99 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1357 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1357; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1357 -O -D log/heads1357
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1357
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1357
+RETR file1357
+QUIT
+</protocol>
+
+<file1 name="log/file1357">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1357; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1357">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 214
+150 Binary data connection for 1357 () (214 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1357">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1358 b/tests/data/test1358
new file mode 100644
index 00000000..b0e2795e
--- /dev/null
+++ b/tests/data/test1358
@@ -0,0 +1,96 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1358 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1358; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1358 -O -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1358
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1358
+RETR file1358
+QUIT
+</protocol>
+
+<file1 name="log/file1358">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1358; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1358">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 214
+150 Binary data connection for 1358 () (214 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1359 b/tests/data/test1359
new file mode 100644
index 00000000..fc7851d9
--- /dev/null
+++ b/tests/data/test1359
@@ -0,0 +1,100 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1359 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1359; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -J -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1359 -O -J -D log/heads1359
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1359
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1359
+RETR file1359
+QUIT
+</protocol>
+
+<file1 name="log/file1359">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1359; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1359">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 214
+150 Binary data connection for 1359 () (214 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1359">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1360 b/tests/data/test1360
new file mode 100644
index 00000000..0000d60b
--- /dev/null
+++ b/tests/data/test1360
@@ -0,0 +1,97 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1360 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1360; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -J -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1360 -O -J -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1360
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1360
+RETR file1360
+QUIT
+</protocol>
+
+<file1 name="log/file1360">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1360; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1360">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 214
+150 Binary data connection for 1360 () (214 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1361 b/tests/data/test1361
new file mode 100644
index 00000000..884e0b21
--- /dev/null
+++ b/tests/data/test1361
@@ -0,0 +1,99 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1361 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1361; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -i -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1361 -O -i -D log/heads1361
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1361
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1361
+RETR file1361
+QUIT
+</protocol>
+
+<file1 name="log/file1361">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1361; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1361">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 214
+150 Binary data connection for 1361 () (214 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1361">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1362 b/tests/data/test1362
new file mode 100644
index 00000000..98fffb6b
--- /dev/null
+++ b/tests/data/test1362
@@ -0,0 +1,96 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1362 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1362; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -i -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1362 -O -i -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1362
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1362
+RETR file1362
+QUIT
+</protocol>
+
+<file1 name="log/file1362">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1362; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1362">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 214
+150 Binary data connection for 1362 () (214 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1363 b/tests/data/test1363
new file mode 100644
index 00000000..c34f05a0
--- /dev/null
+++ b/tests/data/test1363
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1363 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1363; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -i, without -D
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1363 -O -i
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1363
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1363
+RETR file1363
+QUIT
+</protocol>
+
+<file1 name="log/file1363">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1363; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1363">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1364 b/tests/data/test1364
new file mode 100644
index 00000000..e8c981d7
--- /dev/null
+++ b/tests/data/test1364
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname without Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1364 -o log/outfile1364 -D log/heads1364
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1364
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1364 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1364">
+12345
+</file1>
+
+<file2 name="log/heads1364">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1364">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1365 b/tests/data/test1365
new file mode 100644
index 00000000..4a09cfd6
--- /dev/null
+++ b/tests/data/test1365
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname without Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1365 -o log/outfile1365 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1365
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1365 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1365">
+12345
+</file1>
+
+<file2 name="log/stdout1365">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1366 b/tests/data/test1366
new file mode 100644
index 00000000..62e3b0c4
--- /dev/null
+++ b/tests/data/test1366
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1366; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname and Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1366 -o log/outfile1366 -D log/heads1366
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1366 log/name1366
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1366 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1366">
+12345
+</file1>
+
+<file2 name="log/heads1366">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1366; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1366">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1367 b/tests/data/test1367
new file mode 100644
index 00000000..d4bd3d77
--- /dev/null
+++ b/tests/data/test1367
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1367; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname and Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1367 -o log/outfile1367 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1367 log/name1367
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1367 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1367">
+12345
+</file1>
+
+<file2 name="log/stdout1367">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1367; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1368 b/tests/data/test1368
new file mode 100644
index 00000000..6a926ab6
--- /dev/null
+++ b/tests/data/test1368
@@ -0,0 +1,72 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -J without Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1368 -J -o log/outfile1368 -D log/heads1368
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1368
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1368 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1368">
+12345
+</file1>
+
+<file2 name="log/heads1368">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1368">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1369 b/tests/data/test1369
new file mode 100644
index 00000000..5176ed0b
--- /dev/null
+++ b/tests/data/test1369
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -J without Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1369 -J -o log/outfile1369 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1369
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1369 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1369">
+12345
+</file1>
+
+<file2 name="log/stdout1369">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1370 b/tests/data/test1370
new file mode 100644
index 00000000..d0abbdd6
--- /dev/null
+++ b/tests/data/test1370
@@ -0,0 +1,74 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1370; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -J and Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1370 -J -o log/outfile1370 -D log/heads1370
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1370 log/name1370
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1370 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1370">
+12345
+</file1>
+
+<file2 name="log/heads1370">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1370; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1370">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1371 b/tests/data/test1371
new file mode 100644
index 00000000..fe3977fa
--- /dev/null
+++ b/tests/data/test1371
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1371; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -J and Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1371 -J -o log/outfile1371 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1371 log/name1371
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1371 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1371">
+12345
+</file1>
+
+<file2 name="log/stdout1371">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1371; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1372 b/tests/data/test1372
new file mode 100644
index 00000000..a2b8ec96
--- /dev/null
+++ b/tests/data/test1372
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i without Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1372 -i -o log/outfile1372 -D log/heads1372
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1372
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1372 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1372">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/heads1372">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1372">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1373 b/tests/data/test1373
new file mode 100644
index 00000000..ae906d7b
--- /dev/null
+++ b/tests/data/test1373
@@ -0,0 +1,75 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i without Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1373 -i -o log/outfile1373 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1373
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1373 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1373">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/stdout1373">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1374 b/tests/data/test1374
new file mode 100644
index 00000000..f8d9d0dd
--- /dev/null
+++ b/tests/data/test1374
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1374; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i and Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1374 -i -o log/outfile1374 -D log/heads1374
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1374 log/name1374
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1374 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1374">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1374; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/heads1374">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1374; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1374">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1375 b/tests/data/test1375
new file mode 100644
index 00000000..595f03ac
--- /dev/null
+++ b/tests/data/test1375
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1375; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i and Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1375 -i -o log/outfile1375 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1375 log/name1375
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1375 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1375">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1375; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/stdout1375">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1375; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1376 b/tests/data/test1376
new file mode 100644
index 00000000..f34c2774
--- /dev/null
+++ b/tests/data/test1376
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i without Content-Disposition, without -D
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1376 -i -o log/outfile1376
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1376
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1376 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1376">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/stdout1376">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1377 b/tests/data/test1377
new file mode 100644
index 00000000..f542b11c
--- /dev/null
+++ b/tests/data/test1377
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1377; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i and Content-Disposition, without -D
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1377 -i -o log/outfile1377
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1377 log/name1377
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1377 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1377">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1377; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/stdout1377">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1378 b/tests/data/test1378
new file mode 100644
index 00000000..e004afca
--- /dev/null
+++ b/tests/data/test1378
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without Content-Disposition inside, using -o fname
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1378 -o log/download1378
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1378
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1378
+RETR file1378
+QUIT
+</protocol>
+
+<file1 name="log/download1378">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1378">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1379 b/tests/data/test1379
new file mode 100644
index 00000000..81314b6d
--- /dev/null
+++ b/tests/data/test1379
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1379 -o log/download1379 -D log/heads1379
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1379
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1379
+RETR file1379
+QUIT
+</protocol>
+
+<file1 name="log/download1379">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1379">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1379 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1379">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1380 b/tests/data/test1380
new file mode 100644
index 00000000..e7152700
--- /dev/null
+++ b/tests/data/test1380
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1380 -o log/download1380 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1380
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1380
+RETR file1380
+QUIT
+</protocol>
+
+<file1 name="log/download1380">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1380">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1380 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1381 b/tests/data/test1381
new file mode 100644
index 00000000..a55c6b58
--- /dev/null
+++ b/tests/data/test1381
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -J -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1381 -o log/download1381 -J -D log/heads1381
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1381
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1381
+RETR file1381
+QUIT
+</protocol>
+
+<file1 name="log/download1381">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1381">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1381 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1381">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1382 b/tests/data/test1382
new file mode 100644
index 00000000..a657e1fe
--- /dev/null
+++ b/tests/data/test1382
@@ -0,0 +1,74 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -J -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1382 -o log/download1382 -J -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1382
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1382
+RETR file1382
+QUIT
+</protocol>
+
+<file1 name="log/download1382">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1382">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1382 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1383 b/tests/data/test1383
new file mode 100644
index 00000000..0694a224
--- /dev/null
+++ b/tests/data/test1383
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -i -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1383 -o log/download1383 -i -D log/heads1383
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1383
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1383
+RETR file1383
+QUIT
+</protocol>
+
+<file1 name="log/download1383">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1383">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1383 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1383">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1384 b/tests/data/test1384
new file mode 100644
index 00000000..c07c266b
--- /dev/null
+++ b/tests/data/test1384
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -i -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1384 -o log/download1384 -i -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1384
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1384
+RETR file1384
+QUIT
+</protocol>
+
+<file1 name="log/download1384">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1384">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 10
+150 Binary data connection for 1384 () (10 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1385 b/tests/data/test1385
new file mode 100644
index 00000000..ee35ab70
--- /dev/null
+++ b/tests/data/test1385
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -i, without -D
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1385 -o log/download1385 -i
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1385
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1385
+RETR file1385
+QUIT
+</protocol>
+
+<file1 name="log/download1385">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1385">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1386 b/tests/data/test1386
new file mode 100644
index 00000000..c7f5d8ae
--- /dev/null
+++ b/tests/data/test1386
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1386 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1386; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with Content-Disposition inside, using -o fname
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1386 -o log/download1386
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1386 log/name1386
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1386
+RETR file1386
+QUIT
+</protocol>
+
+<file1 name="log/download1386">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1386; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1386">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1387 b/tests/data/test1387
new file mode 100644
index 00000000..2b6c3fcb
--- /dev/null
+++ b/tests/data/test1387
@@ -0,0 +1,91 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1387 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1387; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1387 -o log/download1387 -D log/heads1387
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1387 log/name1387
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1387
+RETR file1387
+QUIT
+</protocol>
+
+<file1 name="log/download1387">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1387; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1387">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 222
+150 Binary data connection for 1387 () (222 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1387">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1388 b/tests/data/test1388
new file mode 100644
index 00000000..3d2c59a2
--- /dev/null
+++ b/tests/data/test1388
@@ -0,0 +1,88 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1388 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1388; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1388 -o log/download1388 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1388 log/name1388
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1388
+RETR file1388
+QUIT
+</protocol>
+
+<file1 name="log/download1388">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1388; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1388">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 222
+150 Binary data connection for 1388 () (222 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1389 b/tests/data/test1389
new file mode 100644
index 00000000..4aaacd82
--- /dev/null
+++ b/tests/data/test1389
@@ -0,0 +1,92 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1389 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1389; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -J -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1389 -o log/download1389 -J -D log/heads1389
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1389 log/name1389
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1389
+RETR file1389
+QUIT
+</protocol>
+
+<file1 name="log/download1389">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1389; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1389">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 222
+150 Binary data connection for 1389 () (222 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1389">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1390 b/tests/data/test1390
new file mode 100644
index 00000000..0668cf7b
--- /dev/null
+++ b/tests/data/test1390
@@ -0,0 +1,89 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1390 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1390; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -J -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1390 -o log/download1390 -J -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1390 log/name1390
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1390
+RETR file1390
+QUIT
+</protocol>
+
+<file1 name="log/download1390">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1390; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1390">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 222
+150 Binary data connection for 1390 () (222 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1391 b/tests/data/test1391
new file mode 100644
index 00000000..09c670a9
--- /dev/null
+++ b/tests/data/test1391
@@ -0,0 +1,91 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1391 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1391; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -i -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1391 -o log/download1391 -i -D log/heads1391
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1391 log/name1391
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1391
+RETR file1391
+QUIT
+</protocol>
+
+<file1 name="log/download1391">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1391; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1391">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 222
+150 Binary data connection for 1391 () (222 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1391">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1392 b/tests/data/test1392
new file mode 100644
index 00000000..994c881d
--- /dev/null
+++ b/tests/data/test1392
@@ -0,0 +1,88 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1392 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1392; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -i -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1392 -o log/download1392 -i -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1392 log/name1392
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1392
+RETR file1392
+QUIT
+</protocol>
+
+<file1 name="log/download1392">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1392; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1392">
+220- _ _ ____ _
+220- ___| | | | _ \| |
+220- / __| | | | |_) | |
+220- | (__| |_| | _ {| |___
+220 \___|\___/|_| \_\_____|
+331 We are happy you popped in!
+230 Welcome you silly person
+257 "/" is current directory
+250 CWD command successful.
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted
+213 222
+150 Binary data connection for 1392 () (222 bytes).
+226 File transfer complete
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1393 b/tests/data/test1393
new file mode 100644
index 00000000..12f92847
--- /dev/null
+++ b/tests/data/test1393
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1393 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1393; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -i, without -D
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1393 -o log/download1393 -i
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1393 log/name1393
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPSV
+TYPE I
+SIZE file1393
+RETR file1393
+QUIT
+</protocol>
+
+<file1 name="log/download1393">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1393; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1393">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1394 b/tests/data/test1394
new file mode 100644
index 00000000..34d4a0e3
--- /dev/null
+++ b/tests/data/test1394
@@ -0,0 +1,30 @@
+<testcase>
+<info>
+<keywords>
+unittest
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+unit test for parse_cert_parameter()
+ </name>
+<tool>
+unit1394
+</tool>
+</client>
+
+<verify>
+<stdout mode="text">
+</stdout>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1395 b/tests/data/test1395
new file mode 100644
index 00000000..967c8d49
--- /dev/null
+++ b/tests/data/test1395
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+Curl_dedotdotify
+ </name>
+<tool>
+unit1395
+</tool>
+
+</client>
+
+</testcase>
diff --git a/tests/data/test1396 b/tests/data/test1396
new file mode 100644
index 00000000..8ffe35f4
--- /dev/null
+++ b/tests/data/test1396
@@ -0,0 +1,27 @@
+<testcase>
+<info>
+<keywords>
+unittest
+curl_easy_escape
+curl_easy_unescape
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+curl_easy_escape and curl_easy_unescape
+ </name>
+<tool>
+unit1396
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1397 b/tests/data/test1397
new file mode 100644
index 00000000..5f479b46
--- /dev/null
+++ b/tests/data/test1397
@@ -0,0 +1,27 @@
+<testcase>
+<info>
+<keywords>
+unittest
+ssl
+wildcard
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+Check wildcard certificate matching function Curl_cert_hostcheck
+ </name>
+<tool>
+unit1397
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1398 b/tests/data/test1398
new file mode 100644
index 00000000..dd50baa6
--- /dev/null
+++ b/tests/data/test1398
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+curl_msnprintf
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+curl_msnprintf unit tests
+ </name>
+<tool>
+unit1398
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1400 b/tests/data/test1400
new file mode 100644
index 00000000..72989c4c
--- /dev/null
+++ b/tests/data/test1400
@@ -0,0 +1,103 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--libcurl for simple HTTP GET
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1400 --libcurl log/test1400.c
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/1400 HTTP/1.1
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<stripfile>
+s/(USERAGENT, \")[^\"]+/${1}stripped/
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+<file name="log/test1400.c" mode="text">
+/********* 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 <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURLcode ret;
+ CURL *hnd;
+
+ hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1400");
+ curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+ 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 ****/
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1401 b/tests/data/test1401
new file mode 100644
index 00000000..d10cac26
--- /dev/null
+++ b/tests/data/test1401
@@ -0,0 +1,126 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP set cookie
+cookies
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Content-Type: text/plain
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--libcurl for GET with various options
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1401 --libcurl log/test1401.c --basic -u fake:user -H "X-Files: Mulder" -H "X-Men: cyclops, iceman" -A MyUA -b chocolate=chip --proto "=http,ftp,file"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/1401 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: stripped
+Authorization: Basic ZmFrZTp1c2Vy
+Accept: */*
+Cookie: chocolate=chip
+X-Files: Mulder
+X-Men: cyclops, iceman
+
+</protocol>
+<stripfile>
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+<file name="log/test1401.c" mode="text">
+/********* 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 <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURLcode ret;
+ CURL *hnd;
+ struct curl_slist *slist1;
+
+ slist1 = NULL;
+ slist1 = curl_slist_append(slist1, "X-Files: Mulder");
+ slist1 = curl_slist_append(slist1, "X-Men: cyclops, iceman");
+
+ hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1401");
+ curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+ curl_easy_setopt(hnd, CURLOPT_USERPWD, "fake:user");
+ curl_easy_setopt(hnd, CURLOPT_USERAGENT, "MyUA");
+ curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, slist1);
+ curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
+ curl_easy_setopt(hnd, CURLOPT_HTTPAUTH, (long)CURLAUTH_BASIC);
+ curl_easy_setopt(hnd, CURLOPT_COOKIE, "chocolate=chip");
+ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+ curl_easy_setopt(hnd, CURLOPT_PROTOCOLS, (long)CURLPROTO_FILE |
+ (long)CURLPROTO_FTP |
+ (long)CURLPROTO_HTTP);
+
+ /* 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;
+ curl_slist_free_all(slist1);
+ slist1 = NULL;
+
+ return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+<stdout>
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1402 b/tests/data/test1402
new file mode 100644
index 00000000..c3bf834b
--- /dev/null
+++ b/tests/data/test1402
@@ -0,0 +1,112 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Content-Type: text/plain
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--libcurl for simple POST
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1402 --libcurl log/test1402.c -d "foo=bar" -d "baz=quux"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST /we/want/1402 HTTP/1.1
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 16
+Content-Type: application/x-www-form-urlencoded
+
+foo=bar&baz=quux
+</protocol>
+<stripfile>
+# 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/
+</stripfile>
+<file name="log/test1402.c" mode="text">
+/********* 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 <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURLcode ret;
+ CURL *hnd;
+
+ hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1402");
+ curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+ curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "foo=bar&baz=quux");
+ curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)16);
+ 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 ****/
+</file>
+<stdout>
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1403 b/tests/data/test1403
new file mode 100644
index 00000000..3ec7dd03
--- /dev/null
+++ b/tests/data/test1403
@@ -0,0 +1,107 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Content-Type: text/plain
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--libcurl for GET with query
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1403 --libcurl log/test1403.c -G -d "foo=bar" -d "baz=quux"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/1403?foo=bar&baz=quux HTTP/1.1
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<stripfile>
+# 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/
+</stripfile>
+<file name="log/test1403.c" mode="text">
+/********* 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 <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURLcode ret;
+ CURL *hnd;
+
+ hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1403?foo=bar&baz=quux");
+ curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+ 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 ****/
+</file>
+<stdout>
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1404 b/tests/data/test1404
new file mode 100644
index 00000000..44156975
--- /dev/null
+++ b/tests/data/test1404
@@ -0,0 +1,161 @@
+<testcase>
+# Based on test 1315
+<info>
+<keywords>
+HTTP
+HTTP FORMPOST
+HTTP file upload
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--libcurl for HTTP RFC1867-type formposting - -F with three files, one with explicit type
+ </name>
+ <command>
+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
+</command>
+# We create this file before the command is invoked!
+<file name="log/test1404.txt">
+dummy data
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+(^User-Agent:.*|-----+\w+)
+</strip>
+<protocol>
+POST /we/want/1404 HTTP/1.1
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 795
+Expect: 100-continue
+Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
+
+------------------------------9ef8d6205763
+Content-Disposition: form-data; name="name"
+
+value
+------------------------------9ef8d6205763
+Content-Disposition: form-data; name="file"
+Content-Type: multipart/mixed; boundary=----------------------------aaaaaaaaaaaa
+
+Content-Disposition: attachment; filename="test1404.txt"
+Content-Type: text/plain
+
+dummy data
+
+------------------------------9ef8d6205763
+Content-Disposition: attachment; filename="test1404.txt"
+Content-Type: magic/content
+
+dummy data
+
+------------------------------9ef8d6205763
+Content-Disposition: attachment; filename="test1404.txt"
+Content-Type: text/plain
+
+dummy data
+
+------------------------------aaaaaaaaaaaa--
+------------------------------9ef8d6205763--
+</protocol>
+<stripfile>
+# 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/
+</stripfile>
+<file name="log/test1404.c" mode="text">
+/********* 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 <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURLcode ret;
+ CURL *hnd;
+ struct curl_httppost *post1;
+ struct curl_httppost *postend;
+
+ post1 = NULL;
+ postend = NULL;
+ curl_formadd(&post1, &postend,
+ CURLFORM_COPYNAME, "name",
+ CURLFORM_COPYCONTENTS, "value",
+ CURLFORM_END);
+ curl_formadd(&post1, &postend,
+ CURLFORM_COPYNAME, "file",
+ CURLFORM_FILE, "log/test1404.txt",
+ CURLFORM_CONTENTTYPE, "text/plain",
+ CURLFORM_FILE, "log/test1404.txt",
+ CURLFORM_CONTENTTYPE, "magic/content",
+ CURLFORM_FILE, "log/test1404.txt",
+ CURLFORM_CONTENTTYPE, "text/plain",
+ CURLFORM_END);
+
+ hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1404");
+ curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+ curl_easy_setopt(hnd, CURLOPT_HTTPPOST, post1);
+ 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;
+ curl_formfree(post1);
+ post1 = NULL;
+
+ return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1405 b/tests/data/test1405
new file mode 100644
index 00000000..38bfd5c5
--- /dev/null
+++ b/tests/data/test1405
@@ -0,0 +1,136 @@
+<testcase>
+# Derived from test227
+<info>
+<keywords>
+FTP
+post-quote
+pre-quote
+--libcurl
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+<servercmd>
+REPLY EPSV 500 no such command
+REPLY FAIL 500 this might not be a failure!
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+--libcurl for FTP with quote ops
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1405 -Q "NOOP 1" -Q "+NOOP 2" -Q "-NOOP 3" -Q "*FAIL" -Q "+*FAIL HARD" --libcurl log/test1405.c
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+NOOP 1
+FAIL
+EPSV
+PASV
+TYPE I
+NOOP 2
+FAIL HARD
+SIZE 1405
+RETR 1405
+NOOP 3
+QUIT
+</protocol>
+<file name="log/test1405.c" mode="text">
+/********* 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 <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURLcode ret;
+ CURL *hnd;
+ struct curl_slist *slist1;
+ struct curl_slist *slist2;
+ struct curl_slist *slist3;
+
+ slist1 = NULL;
+ slist1 = curl_slist_append(slist1, "NOOP 1");
+ slist1 = curl_slist_append(slist1, "*FAIL");
+ slist2 = NULL;
+ slist2 = curl_slist_append(slist2, "NOOP 3");
+ slist3 = NULL;
+ slist3 = curl_slist_append(slist3, "NOOP 2");
+ slist3 = curl_slist_append(slist3, "*FAIL HARD");
+
+ hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_URL, "ftp://%HOSTIP:%FTPPORT/1405");
+ curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+ curl_easy_setopt(hnd, CURLOPT_QUOTE, slist1);
+ curl_easy_setopt(hnd, CURLOPT_POSTQUOTE, slist2);
+ curl_easy_setopt(hnd, CURLOPT_PREQUOTE, slist3);
+ 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;
+ curl_slist_free_all(slist1);
+ slist1 = NULL;
+ curl_slist_free_all(slist2);
+ slist2 = NULL;
+ curl_slist_free_all(slist3);
+ slist3 = NULL;
+
+ return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+<stripfile>
+# CURLOPT_USERAGENT and CURLOPT_MAXREDIRS requires HTTP protocol
+# support, IOW depends on configuration - just ignore these.
+$_ = '' if /CURLOPT_USERAGENT/
+$_ = '' if /CURLOPT_MAXREDIRS/
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1406 b/tests/data/test1406
new file mode 100644
index 00000000..c80459f9
--- /dev/null
+++ b/tests/data/test1406
@@ -0,0 +1,125 @@
+<testcase>
+# Based on test900
+# N.B. --libcurl output not sufficient to deal with uploaded files.
+<info>
+<keywords>
+SMTP
+--libcurl
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+CAPA SIZE
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+--libcurl for SMTP
+ </name>
+<file name="log/test1406.eml">
+From: different
+To: another
+
+body
+</file>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/1406 --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-from sender@example.com -T log/test1406.eml --libcurl log/test1406.c
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 1406
+MAIL FROM:<sender@example.com> SIZE=38
+RCPT TO:<recipient.one@example.com>
+RCPT TO:<recipient.two@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+body
+.
+</upload>
+<file name="log/test1406.c" mode="text">
+/********* 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 <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURLcode ret;
+ CURL *hnd;
+ struct curl_slist *slist1;
+
+ slist1 = NULL;
+ slist1 = curl_slist_append(slist1, "recipient.one@example.com");
+ slist1 = curl_slist_append(slist1, "recipient.two@example.com");
+
+ hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38);
+ curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/1406");
+ curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+ curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
+ 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);
+ curl_easy_setopt(hnd, CURLOPT_MAIL_FROM, "sender@example.com");
+ curl_easy_setopt(hnd, CURLOPT_MAIL_RCPT, slist1);
+
+ /* 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;
+ curl_slist_free_all(slist1);
+ slist1 = NULL;
+
+ return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+<stripfile>
+# 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/
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1407 b/tests/data/test1407
new file mode 100644
index 00000000..e84463a3
--- /dev/null
+++ b/tests/data/test1407
@@ -0,0 +1,103 @@
+<testcase>
+# Based on test851
+<info>
+<keywords>
+POP3
+Clear Text
+LIST
+--libcurl
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY LIST +OK 1407 100\r\n.
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+--libcurl for POP3 LIST one message
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/1407 -l -u user:secret --libcurl log/test1407.c
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+LIST 1407
+QUIT
+</protocol>
+<file name="log/test1407.c" mode="text">
+/********* 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 <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURLcode ret;
+ CURL *hnd;
+
+ hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/1407");
+ curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+ curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 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 ****/
+</file>
+<stripfile>
+# 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/
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1408 b/tests/data/test1408
new file mode 100644
index 00000000..54d5e777
--- /dev/null
+++ b/tests/data/test1408
@@ -0,0 +1,74 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+IPv6
+cookies
+cookiejar
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Set-Cookie: time=1
+
+-foo-
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Set-Cookie: time=2
+
+-foo-
+</data2>
+
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+ipv6
+</features>
+<server>
+http-ipv6
+</server>
+ <name>
+HTTP receive cookies over IPV6
+ </name>
+ <command>
+-c log/jar1408 -g http://%HOST6IP:%HTTP6PORT/path/14080001 http://%HOST6IP:%HTTP6PORT/path/14080002
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /path/14080001 HTTP/1.1
+Host: %HOST6IP:%HTTP6PORT
+Accept: */*
+
+GET /path/14080002 HTTP/1.1
+Host: %HOST6IP:%HTTP6PORT
+Accept: */*
+Cookie: time=1
+
+</protocol>
+</verify>
+</testcase>
+
diff --git a/tests/data/test1409 b/tests/data/test1409
new file mode 100644
index 00000000..5ceb53be
--- /dev/null
+++ b/tests/data/test1409
@@ -0,0 +1,31 @@
+<testcase>
+<info>
+<keywords>
+cmdline
+FAILURE
+</keywords>
+</info>
+
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+ <name>
+Pass in string to -C
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1409 -C wrong
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+2
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1410 b/tests/data/test1410
new file mode 100644
index 00000000..97ad0569
--- /dev/null
+++ b/tests/data/test1410
@@ -0,0 +1,31 @@
+<testcase>
+<info>
+<keywords>
+cmdline
+FAILURE
+</keywords>
+</info>
+
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+ <name>
+Pass in negative number to --max-time
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1410 --max-time -4
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+2
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1411 b/tests/data/test1411
new file mode 100644
index 00000000..3ffd586d
--- /dev/null
+++ b/tests/data/test1411
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+PUT
+</keywords>
+</info>
+
+<reply>
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+
+# make sure there's no Expect: 100-continue when there's no file to send!
+ <name>
+HTTP with zero size file PUT
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1411 -T log/empty1411
+</command>
+# create an empty file
+<file name="log/empty1411">
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+PUT /1411 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 0
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1412 b/tests/data/test1412
new file mode 100644
index 00000000..ae63290e
--- /dev/null
+++ b/tests/data/test1412
@@ -0,0 +1,118 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+--anyauth
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<servercmd>
+auth_required
+</servercmd>
+<data>
+HTTP/1.1 401 Authorization Required swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
+WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
+WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
+Content-Type: text/html; charset=iso-8859-1
+Connection: close
+
+This is not the real page
+</data>
+
+# This is supposed to be returned when the server gets a
+# Authorization: Digest line passed-in from the client
+<data1000>
+HTTP/1.1 200 OK swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+Connection: close
+
+This IS the real page!
+</data1000>
+
+# This is the second request
+<data1001>
+HTTP/1.1 200 OK swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+Connection: close
+
+This IS the second real page!
+</data1001>
+
+<datacheck>
+HTTP/1.1 401 Authorization Required swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
+WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
+WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
+Content-Type: text/html; charset=iso-8859-1
+Connection: close
+
+HTTP/1.1 200 OK swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+Connection: close
+
+This IS the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+</features>
+ <name>
+HTTP GET with --anyauth with two URLs (picking Digest)
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1412 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14120001
+</command>
+<file name="log/put1412">
+This is data we upload with PUT
+a second line
+line three
+four is the number of lines
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1412 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /1412 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1412", response="0390dbe89e31adca0413d11f91f30e7f"
+User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
+Accept: */*
+
+GET /14120001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/14120001", response="0085df91870374c8bf4e94415e7fbf8e"
+User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1413 b/tests/data/test1413
new file mode 100644
index 00000000..6e889a8a
--- /dev/null
+++ b/tests/data/test1413
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+followlocation
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 OK swsclose
+Location: moo.html/14130002#fragmentpart
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+</data>
+<data2>
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</data2>
+<datacheck>
+HTTP/1.1 302 OK swsclose
+Location: moo.html/14130002#fragmentpart
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP redirect with fragment in new URL
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/this/1413 -L
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /this/1413 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /this/moo.html/14130002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1414 b/tests/data/test1414
new file mode 100644
index 00000000..44403783
--- /dev/null
+++ b/tests/data/test1414
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+no SIZE
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+<servercmd>
+REPLY SIZE 502 no such command
+REPLY EPRT 502 no such command
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT without SIZE or EPRT support
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1414 -P -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^(EPRT \|1\|)(.*)/$1/
+s/^(PORT)(.*)/$1/
+</strippart>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPRT |1|
+PORT
+TYPE I
+SIZE 1414
+RETR 1414
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1415 b/tests/data/test1415
new file mode 100644
index 00000000..d97dfcea
--- /dev/null
+++ b/tests/data/test1415
@@ -0,0 +1,75 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+cookies
+cookiejar
+delete expired cookie
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+Funny-head: yesyes
+Set-Cookie: test1value=test1; domain=example.com; path=/;
+Set-Cookie: test2value=test2; expires=Friday, 01-Jan-2037 00:00:00 GMT; domain=example.com; path=/;
+Set-Cookie: test3value=test3; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
+Set-Cookie: test4value=test4; expires=Friday, 01-Jan-2037 00:00:00 GMT; domain=example.com; path=/;
+Set-Cookie: test5value=test5; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
+Set-Cookie: test6value=test6; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
+Set-Cookie: test7value=test7; expires=Friday, 01-Jan-2037 00:00:00 GMT; domain=example.com; path=/;
+Set-Cookie: test8value=test8; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
+
+boo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Delete expired cookies
+</name>
+<setenv>
+TZ=GMT
+</setenv>
+<command>
+http://example.com/we/want/1415 -b none -c log/jar1415.txt -x %HOSTIP:%HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://example.com/we/want/1415 HTTP/1.1
+Host: example.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+
+<file name="log/jar1415.txt" mode="text">
+# Netscape HTTP Cookie File
+# http://curl.haxx.se/docs/http-cookies.html
+# This file was generated by libcurl! Edit at your own risk.
+
+.example.com TRUE / FALSE 0 test1value test1
+.example.com TRUE / FALSE 2114380800 test2value test2
+.example.com TRUE / FALSE 2114380800 test4value test4
+.example.com TRUE / FALSE 2114380800 test7value test7
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1416 b/tests/data/test1416
new file mode 100644
index 00000000..546575e5
--- /dev/null
+++ b/tests/data/test1416
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked Transfer-Encoding
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 funky chunky!
+Server: fakeit/0.9 fakeitbad/1.0
+Transfer-Encoding: chunked
+Connection: mooo
+
+12345678123456789
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+30
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+21;heresatest=moooo
+cccccccccccccccccccccccccccccccc
+
+0
+
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET with chunked Transfer-Encoding overflowed chunked size
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1416
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1416 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+# 56 = CURLE_RECV_ERROR
+<errorcode>
+56
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1417 b/tests/data/test1417
new file mode 100644
index 00000000..13ba6b16
--- /dev/null
+++ b/tests/data/test1417
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+chunked Transfer-Encoding
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 funky chunky!
+Server: fakeit/0.9 fakeitbad/1.0
+Transfer-Encoding: chunked
+Trailer: chunky-trailer
+Connection: mooo
+
+40
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+30
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+21;heresatest=moooo
+cccccccccccccccccccccccccccccccc
+
+0
+chunky-trailer: header data
+
+</data>
+<datacheck>
+HTTP/1.1 200 funky chunky!
+Server: fakeit/0.9 fakeitbad/1.0
+Transfer-Encoding: chunked
+Trailer: chunky-trailer
+Connection: mooo
+
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET with chunked encoding and chunked trailer without CRs
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1417 -D log/heads1417
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1417 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file name="log/heads1417">
+HTTP/1.1 200 funky chunky!
+Server: fakeit/0.9 fakeitbad/1.0
+Transfer-Encoding: chunked
+Trailer: chunky-trailer
+Connection: mooo
+
+chunky-trailer: header data
+</file>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1418 b/tests/data/test1418
new file mode 100644
index 00000000..b3a2f23b
--- /dev/null
+++ b/tests/data/test1418
@@ -0,0 +1,108 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+connection re-use
+</keywords>
+</info>
+# Server-side
+<reply>
+<servercmd>
+connection-monitor
+</servercmd>
+
+<data>
+HTTP/1.1 401 Authentication please!
+Content-Length: 20
+WWW-Authenticate: Digest realm="loonie", nonce="314156592"
+WWW-Authenticate: Basic
+
+Please auth with me
+</data>
+
+# This is supposed to be returned when the server gets the second
+# Authorization: NTLM line passed-in from the client
+<data1000>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Length: 4
+
+moo
+</data1000>
+
+<data1003>
+HTTP/1.1 200 OK
+Server: Another one/1.0
+Content-Length: 4
+
+boo
+</data1003>
+
+# This is the first reply after the redirection
+<data1011>
+HTTP/1.1 200 OK
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 34
+
+This is not the real page either!
+</data1011>
+
+<datacheck>
+HTTP/1.1 401 Authentication please!
+Content-Length: 20
+WWW-Authenticate: Digest realm="loonie", nonce="314156592"
+WWW-Authenticate: Basic
+
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Length: 4
+
+moo
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+</features>
+ <name>
+HTTP with --anyauth and connection re-use
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1418 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14180003
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1418 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /1418 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/1418", response="986238b7e0077754944c966f56d9bc77"
+Accept: */*
+
+GET /14180003 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/14180003", response="1c6390a67bac3283a9b023402f3b3540"
+Accept: */*
+
+[DISCONNECT]
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1419 b/tests/data/test1419
new file mode 100644
index 00000000..f29ce444
--- /dev/null
+++ b/tests/data/test1419
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+connection re-use
+</keywords>
+</info>
+# Server-side
+<reply>
+<servercmd>
+connection-monitor
+</servercmd>
+
+<data>
+HTTP/1.1 200 fine!
+Content-Length: 20
+
+Feel free to get it
+</data>
+
+<data3>
+HTTP/1.1 200 OK
+Server: Another one/1.0
+Content-Length: 4
+
+boo
+</data3>
+
+<datacheck>
+HTTP/1.1 200 fine!
+Content-Length: 20
+
+Feel free to get it
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with --anyauth (but no auth!) and connection re-use
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1419 --anyauth http://%HOSTIP:%HTTPPORT/14190003
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1419 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /14190003 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+[DISCONNECT]
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1420 b/tests/data/test1420
new file mode 100644
index 00000000..79ca675a
--- /dev/null
+++ b/tests/data/test1420
@@ -0,0 +1,108 @@
+<testcase>
+# Based on test800
+<info>
+<keywords>
+IMAP
+Clear Text
+FETCH
+--libcurl
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+--libcurl for IMAP FETCH message
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/1420/;UID=1' -u user:secret --libcurl log/test1420.c
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 1420
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+<file name="log/test1420.c" mode="text">
+/********* 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 <curl/curl.h>
+
+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 ****/
+</file>
+<stripfile>
+# 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/
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1421 b/tests/data/test1421
new file mode 100644
index 00000000..6c59b216
--- /dev/null
+++ b/tests/data/test1421
@@ -0,0 +1,72 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Uknown-header: blrub
+Content-Length: 6
+
+-foo-
+</data>
+
+<servercmd>
+connection-monitor
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+Re-using HTTP proxy connection for two different host names
+ </name>
+ <command>
+--proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.1421:8990/ http://different.remote.haxx.se.1421:8990
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+HTTP/1.1 200 OK
+Uknown-header: blrub
+Content-Length: 6
+
+-foo-
+HTTP/1.1 200 OK
+Uknown-header: blrub
+Content-Length: 6
+
+-foo-
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://test.remote.haxx.se.1421:8990/ HTTP/1.1
+Host: test.remote.haxx.se.1421:8990
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://different.remote.haxx.se.1421:8990/ HTTP/1.1
+Host: different.remote.haxx.se.1421:8990
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+[DISCONNECT]
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1422 b/tests/data/test1422
new file mode 100644
index 00000000..9b436cc4
--- /dev/null
+++ b/tests/data/test1422
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1422; charset=funny; option=strange
+
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -J and Content-Disposition (empty file)
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1422 -J -O file://%PWD/log/name1422
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1422 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/name1422">
+</file1>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1423 b/tests/data/test1423
new file mode 100644
index 00000000..908ff8c2
--- /dev/null
+++ b/tests/data/test1423
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Connection: close
+Content-Type: text/html
+
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+file
+</server>
+<name>
+HTTP GET -o fname without Content-Disposition (empty file)
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1423 -o log/outfile1423 file://%PWD/log/outfile1423
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1423
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1423 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<file1 name="log/outfile1423">
+</file1>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1424 b/tests/data/test1424
new file mode 100644
index 00000000..17bc46a1
--- /dev/null
+++ b/tests/data/test1424
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+If-Modified-Since
+-z
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1990 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+<datacheck>
+HTTP/1.1 200 OK
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1990 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname without Content-Disposition (unmet time condition)
+</name>
+<file name="log/outfile1424">
+original contents
+</file>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1424 -z "dec 12 11:00:00 1999 GMT" -o log/outfile1424
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1424 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+If-Modified-Since: Sun, 12 Dec 1999 11:00:00 GMT
+
+</protocol>
+
+<file1 name="log/outfile1424">
+original contents
+</file1>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1428 b/tests/data/test1428
new file mode 100644
index 00000000..59041ec9
--- /dev/null
+++ b/tests/data/test1428
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP Basic auth
+proxytunnel
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake swsclose
+Content-Type: text/html
+Funny-head: yesyes
+Content-Length: 9
+
+contents
+</data>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+
+</connect>
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake swsclose
+Content-Type: text/html
+Funny-head: yesyes
+Content-Length: 9
+
+contents
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+ <name>
+HTTP over proxy-tunnel with --proxy-header and --header
+ </name>
+ <command>
+http://test.1428:%HTTPPORT/we/want/that/page/1428 -p -x %HOSTIP:%PROXYPORT --user 'iam:my:;self' --header "header-type: server" --proxy-header "header-type: proxy"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<proxy>
+CONNECT test.1428:%HTTPPORT HTTP/1.1
+Host: test.1428:%HTTPPORT
+User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
+Proxy-Connection: Keep-Alive
+header-type: proxy
+
+</proxy>
+<protocol>
+GET /we/want/that/page/1428 HTTP/1.1
+Host: test.1428:%HTTPPORT
+Authorization: Basic aWFtOm15OjtzZWxm
+User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
+Accept: */*
+header-type: server
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1429 b/tests/data/test1429
new file mode 100644
index 00000000..da09dca4
--- /dev/null
+++ b/tests/data/test1429
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data nocheck="yes">
+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-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+
+<name>
+HTTP GET with 4-digit reponse code
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1429 --write-out '%{response_code}'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout nonewline="yes">
+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
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1429 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1430 b/tests/data/test1430
new file mode 100644
index 00000000..c5f65cfc
--- /dev/null
+++ b/tests/data/test1430
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+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-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET with negative reponse code
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1430
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1430 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1431 b/tests/data/test1431
new file mode 100644
index 00000000..4ea33edc
--- /dev/null
+++ b/tests/data/test1431
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+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-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET with single-digit reponse code
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1431
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1431 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1432 b/tests/data/test1432
new file mode 100644
index 00000000..eb1d0c2a
--- /dev/null
+++ b/tests/data/test1432
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data nocheck="yes">
+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-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+
+<name>
+HTTP GET with 100-digit reponse code and survive
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1432
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1432 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1433 b/tests/data/test1433
new file mode 100644
index 00000000..8634db2c
--- /dev/null
+++ b/tests/data/test1433
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data nocheck="yes">
+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-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+
+<name>
+HTTP GET with 100-digit subversion number in response
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1433 --write-out '%{response_code}'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout nonewline="yes">
+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
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1433 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1434 b/tests/data/test1434
new file mode 100644
index 00000000..0b33bb95
--- /dev/null
+++ b/tests/data/test1434
@@ -0,0 +1,90 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+Resume
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# Some servers (e.g. Apache 1.2) respond this way to an invalid byte range
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Length: 100
+Content-Type: text/plain
+
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+</data>
+
+# The file data that exists at the start of the test must be included in
+# the verification.
+<datacheck>
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+HTTP/1.1 200 OK
+Connection: close
+Content-Length: 100
+Content-Type: text/plain
+
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET resume at exactly the existing file size is fine
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1434 -C 100
+</command>
+<file name="log/curl1434.out">
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1434 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Range: bytes=100-
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1435 b/tests/data/test1435
new file mode 100644
index 00000000..bd171a45
--- /dev/null
+++ b/tests/data/test1435
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+unix sockets
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Sun, 16 Nov 2014 23:47:38 GMT
+Content-Length: 17
+
+Based on test300
+</data>
+</reply>
+
+<client>
+<features>
+unix-sockets
+</features>
+<server>
+http-unix
+</server>
+ <name>
+simple HTTP GET over Unix socket
+ </name>
+ <command>
+--unix-socket %HTTPUNIXPATH http://server-interpreted.example.com/1435
+</command>
+</client>
+
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1435 HTTP/1.1
+Host: server-interpreted.example.com
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1436 b/tests/data/test1436
new file mode 100644
index 00000000..e40a3bf4
--- /dev/null
+++ b/tests/data/test1436
@@ -0,0 +1,85 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+unix sockets
+</keywords>
+</info>
+
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Mon, 17 Nov 2014 13:42:47 GMT
+Content-Length: 6
+
+First
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Mon, 17 Nov 2014 13:42:48 GMT
+Content-Length: 7
+
+Second
+</data2>
+<data3>
+HTTP/1.1 200 OK
+Date: Mon, 17 Nov 2014 13:42:49 GMT
+Content-Length: 6
+
+Third
+</data3>
+</reply>
+
+<client>
+<features>
+unix-sockets
+</features>
+<server>
+http-unix
+</server>
+ <name>
+HTTP requests with multiple connections over Unix socket
+ </name>
+ <command>
+--unix-socket %HTTPUNIXPATH http://one.example.com/14360001 http://two.example.com/14360002 http://one.example.com/14360003
+</command>
+</client>
+
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+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: */*
+
+</protocol>
+<stdout>
+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
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test147 b/tests/data/test147
index aaa4ca15..6651df03 100644
--- a/tests/data/test147
+++ b/tests/data/test147
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test148 b/tests/data/test148
index de0fa7ab..fbac10f9 100644
--- a/tests/data/test148
+++ b/tests/data/test148
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<servercmd>
diff --git a/tests/data/test149 b/tests/data/test149
index f7973f49..a5d14998 100644
--- a/tests/data/test149
+++ b/tests/data/test149
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
</reply>
diff --git a/tests/data/test150 b/tests/data/test150
index cdd4cf67..69c5835c 100644
--- a/tests/data/test150
+++ b/tests/data/test150
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+</keywords>
+</info>
<!-- Server-side -->
<reply>
@@ -50,6 +57,8 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -78,15 +87,15 @@ chkhostname curlhost
</strip>
<protocol>
GET /150 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /150 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
</protocol>
diff --git a/tests/data/test1500 b/tests/data/test1500
new file mode 100644
index 00000000..cd3131e6
--- /dev/null
+++ b/tests/data/test1500
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 all good!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 12
+Connection: close
+
+Hello World
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib1500
+</tool>
+
+ <name>
+curl_multi_wait
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1500
+</command>
+</client>
+</testcase>
diff --git a/tests/data/test1501 b/tests/data/test1501
new file mode 100644
index 00000000..8c7e13af
--- /dev/null
+++ b/tests/data/test1501
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+multi
+LIST
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+DELAY LIST 2
+DELAY TYPE 2
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib1501
+</tool>
+ <name>
+FTP with multi interface and slow LIST response
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1501/
+</command>
+</client>
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD 1501
+EPSV
+TYPE A
+LIST
+QUIT
+</protocol>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1502 b/tests/data/test1502
new file mode 100644
index 00000000..4c084d64
--- /dev/null
+++ b/tests/data/test1502
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_RESOLVE
+</keywords>
+</info>
+
+<reply>
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1502
+</tool>
+ <name>
+HTTP multi with CURLOPT_RESOLVE, cleanup sequence UA
+ </name>
+ <command>
+http://google.com:%HTTPPORT/1502 %HTTPPORT %HOSTIP
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1502 HTTP/1.1
+Host: google.com:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1503 b/tests/data/test1503
new file mode 100644
index 00000000..8665de60
--- /dev/null
+++ b/tests/data/test1503
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_RESOLVE
+</keywords>
+</info>
+
+<reply>
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1503
+</tool>
+ <name>
+HTTP multi with CURLOPT_RESOLVE, cleanup sequence PA
+ </name>
+ <command>
+http://google.com:%HTTPPORT/1503 %HTTPPORT %HOSTIP
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1503 HTTP/1.1
+Host: google.com:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1504 b/tests/data/test1504
new file mode 100644
index 00000000..b8463c52
--- /dev/null
+++ b/tests/data/test1504
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_RESOLVE
+</keywords>
+</info>
+
+<reply>
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1504
+</tool>
+ <name>
+HTTP multi with CURLOPT_RESOLVE, cleanup sequence UB
+ </name>
+ <command>
+http://google.com:%HTTPPORT/1504 %HTTPPORT %HOSTIP
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1504 HTTP/1.1
+Host: google.com:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1505 b/tests/data/test1505
new file mode 100644
index 00000000..c6e5a7ca
--- /dev/null
+++ b/tests/data/test1505
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_RESOLVE
+</keywords>
+</info>
+
+<reply>
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1505
+</tool>
+ <name>
+HTTP multi with CURLOPT_RESOLVE, cleanup sequence PB
+ </name>
+ <command>
+http://google.com:%HTTPPORT/1505 %HTTPPORT %HOSTIP
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1505 HTTP/1.1
+Host: google.com:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1506 b/tests/data/test1506
new file mode 100644
index 00000000..815fef92
--- /dev/null
+++ b/tests/data/test1506
@@ -0,0 +1,96 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+multi
+verbose logs
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data2>
+<data3>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data3>
+<data4>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data4>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1506
+</tool>
+ <name>
+HTTP GET connection cache limit (CURLMOPT_MAXCONNECTS)
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/1506 %HOSTIP %HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /path/15060001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/15060002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/15060003 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/15060004 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<strip>
+^Host:.*
+</strip>
+<file name="log/stderr1506" mode="text">
+* Connection #0 to host server1.example.com left intact
+* Connection #1 to host server2.example.com left intact
+* Connection #2 to host server3.example.com left intact
+* Closing connection 0
+* Connection #3 to host server4.example.com left intact
+</file>
+<stripfile>
+$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1507 b/tests/data/test1507
new file mode 100644
index 00000000..ab7b47eb
--- /dev/null
+++ b/tests/data/test1507
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+multi
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<tool>
+lib1507
+</tool>
+
+# based on bug report #1184
+ <name>
+SMTP with multi interface and CURLE_ABORTED_BY_CALLBACK
+ </name>
+<stdin>
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/1507
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 1507
+MAIL FROM:<1507-realuser@example.com>
+RCPT TO:<1507-recipient@example.com>
+DATA
+</protocol>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test1508 b/tests/data/test1508
new file mode 100644
index 00000000..b276b8b3
--- /dev/null
+++ b/tests/data/test1508
@@ -0,0 +1,31 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+multi
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<tool>
+lib1508
+</tool>
+ <name>
+Close a multi handle without using it
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/1508
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<file name="log/stdout1508">
+We are done
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1509 b/tests/data/test1509
new file mode 100644
index 00000000..b4bfc660
--- /dev/null
+++ b/tests/data/test1509
@@ -0,0 +1,88 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP proxy
+proxytunnel
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<servercmd>
+connection-monitor
+</servercmd>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+Server: the beast that eats naughty clients
+
+</connect>
+
+<data>
+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"
+
+</data>
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed
+Server: the beast that eats naughty clients
+
+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"
+
+header length is ........: 245
+header length should be..: 245
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib1509
+</tool>
+
+ <name>
+simple multi http:// through proxytunnel with authentication info
+ </name>
+ <command>
+http://the.old.moo.1509:%HTTPPORT/1509 %HOSTIP:%PROXYPORT
+</command>
+<file name="log/test1509.txt">
+foo
+ bar
+bar
+ foo
+moo
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<proxy>
+CONNECT the.old.moo.1509:%HTTPPORT HTTP/1.1
+Host: the.old.moo.1509:%HTTPPORT
+Proxy-Connection: Keep-Alive
+
+</proxy>
+<protocol>
+GET /1509 HTTP/1.1
+Host: the.old.moo.1509:%HTTPPORT
+Accept: */*
+
+[DISCONNECT]
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test151 b/tests/data/test151
index 7fb19088..8f20d1d8 100644
--- a/tests/data/test151
+++ b/tests/data/test151
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test1510 b/tests/data/test1510
new file mode 100644
index 00000000..2767f600
--- /dev/null
+++ b/tests/data/test1510
@@ -0,0 +1,96 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+verbose logs
+flaky
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data2>
+<data3>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data3>
+<data4>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data4>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1510
+</tool>
+ <name>
+HTTP GET connection cache limit (CURLOPT_MAXCONNECTS)
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/1510 %HOSTIP %HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /path/15100001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/15100002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/15100003 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/15100004 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<strip>
+^Host:.*
+</strip>
+<file name="log/stderr1510" mode="text">
+* Connection #0 to host server1.example.com left intact
+* Connection #1 to host server2.example.com left intact
+* Connection #2 to host server3.example.com left intact
+* Closing connection 0
+* Connection #3 to host server4.example.com left intact
+</file>
+<stripfile>
+$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1511 b/tests/data/test1511
new file mode 100644
index 00000000..d2b26e53
--- /dev/null
+++ b/tests/data/test1511
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fakem
+Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT
+Content-Type: text/html
+Content-Length: 12
+Connection: close
+
+Hello World
+</data>
+
+<datacheck>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fakem
+Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT
+Content-Type: text/html
+Content-Length: 12
+Connection: close
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fakem
+Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT
+Content-Type: text/html
+Content-Length: 12
+Connection: close
+
+Hello World
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+<tool>
+lib1511
+</tool>
+<name>
+HTTP GET time conditions in repeated requests
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/1511
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+# TEST_ERR_SUCCESS is errorcode 120
+<verify>
+<errorcode>
+120
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1512 b/tests/data/test1512
new file mode 100644
index 00000000..a5de5cda
--- /dev/null
+++ b/tests/data/test1512
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+GLOBAL DNS CACHE
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data2>
+<data3>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data3>
+<data4>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data4>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1512
+</tool>
+ <name>
+GLOBAL CACHE test over two easy performs
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/1512 %HOSTIP %HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /path/15120001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/15120002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<strip>
+^Host:.*
+</strip>
+<stripfile>
+$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1513 b/tests/data/test1513
new file mode 100644
index 00000000..8abb96fa
--- /dev/null
+++ b/tests/data/test1513
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+PROGRESSFUNCTION
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 204 PARTIAL
+X-Comment: partial response to keep the client waiting
+</data>
+<postcmd>
+wait 10
+</postcmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1513
+</tool>
+ <name>
+return failure immediately from progress callback
+ </name>
+
+# this server/host won't be used for real
+ <command>
+http://%HOSTIP:%HTTPPORT/1513
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+</protocol>
+# 42 == CURLE_ABORTED_BY_CALLBACK
+<errorcode>
+42
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1514 b/tests/data/test1514
new file mode 100644
index 00000000..38f5da61
--- /dev/null
+++ b/tests/data/test1514
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+Content-Length
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 411 Length Required
+Date: Sun, 19 Jan 2014 18:50:58 GMT
+Server: test-server/fake swsclose
+Connection: close
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1514
+</tool>
+<name>
+HTTP POST with read callback and unknown data size
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/1514
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Content-Length header is not present
+<protocol>
+POST /1514 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Type: application/x-www-form-urlencoded
+Expect: 100-continue
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1515 b/tests/data/test1515
new file mode 100644
index 00000000..3a49d1be
--- /dev/null
+++ b/tests/data/test1515
@@ -0,0 +1,58 @@
+<testcase>
+
+<info>
+<keywords>
+HTTP
+multi
+FAILURE
+resolve
+</keywords>
+</info>
+
+<reply>
+# Close the connection after the first request. Second request will happen after
+# the DNS cache timeout elapses and must succeed exactly like the first one.
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 03 Feb 2014 17:04:00 GMT
+Server: test-server/fake swsclose
+Connection: close
+Content-Type: text/html
+Content-Length: 6
+
+hello
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 03 Feb 2014 17:04:02 GMT
+Server: test-server/fake swsclose
+Connection: close
+Content-Type: text/html
+Content-Length: 6
+
+hello
+</data2>
+</reply>
+
+<client>
+<server>
+http
+</server>
+<tool>
+lib1515
+</tool>
+<name>
+caching of manual libcurl DNS entries after DNS cache timeout
+</name>
+<command>
+/path/1515 %HOSTIP %HTTPPORT
+</command>
+</client>
+
+<verify>
+<errorcode>
+0
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1516 b/tests/data/test1516
new file mode 100644
index 00000000..bf2cd151
--- /dev/null
+++ b/tests/data/test1516
@@ -0,0 +1,58 @@
+<testcase>
+
+<info>
+<keywords>
+HTTP
+multi
+FAILURE
+resolve
+</keywords>
+</info>
+
+<reply>
+# Close the connection after the first request but don't tell the client to do
+# so! When starting the second request it'll detect a dead connection and must
+# not clean the DNS entries added manually.
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 03 Feb 2014 17:04:00 GMT
+Server: test-server/fake swsclose
+Content-Type: text/html
+Content-Length: 6
+
+hello
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 03 Feb 2014 17:04:02 GMT
+Server: test-server/fake swsclose
+Connection: close
+Content-Type: text/html
+Content-Length: 6
+
+hello
+</data2>
+</reply>
+
+<client>
+<server>
+http
+</server>
+<tool>
+lib1515
+</tool>
+<name>
+caching of manual libcurl DNS entries after dead connection
+</name>
+<command>
+/path/1516 %HOSTIP %HTTPPORT
+</command>
+</client>
+
+<verify>
+<errorcode>
+0
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test152 b/tests/data/test152
index c3f4159e..2cc52161 100644
--- a/tests/data/test152
+++ b/tests/data/test152
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--fail
+</keywords>
+</info>
+
# Server-side
<reply>
<data nocheck="yes">
diff --git a/tests/data/test1520 b/tests/data/test1520
new file mode 100644
index 00000000..5f9344d9
--- /dev/null
+++ b/tests/data/test1520
@@ -0,0 +1,63 @@
+<testcase>
+# Based off test 901 after bug report #1456
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<tool>
+lib1520
+</tool>
+
+ <name>
+SMTP with CRLF-dot-CRLF in data
+ </name>
+<stdin>
+From: different
+To: another
+
+
+.
+.
+
+.
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/1520
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 1520
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+
+..
+..
+
+..
+
+body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test1525 b/tests/data/test1525
new file mode 100644
index 00000000..0560d5c1
--- /dev/null
+++ b/tests/data/test1525
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP proxy
+proxytunnel
+CURLOPT_PROXYHEADER
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 OK
+Content-Length: 17
+
+</connect>
+<data>
+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"
+</data>
+<datacheck>
+HTTP/1.1 200 OK
+Content-Length: 17
+
+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"
+</datacheck>
+
+</reply>
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+<tool>
+lib1525
+</tool>
+ <name>
+CURLOPT_PROXYHEADER is ignored CURLHEADER_UNIFIED
+ </name>
+ <command>
+ http://the.old.moo.1525:%HTTPPORT/1525 %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<proxy>
+CONNECT the.old.moo.1525:%HTTPPORT HTTP/1.1
+Host: the.old.moo.1525:%HTTPPORT
+Proxy-Connection: Keep-Alive
+User-Agent: Http Agent
+
+</proxy>
+<protocol>
+PUT /1525 HTTP/1.1
+Host: the.old.moo.1525:%HTTPPORT
+Accept: */*
+User-Agent: Http Agent
+Content-Length: 13
+Expect: 100-continue
+
+Hello Cloud!
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1526 b/tests/data/test1526
new file mode 100644
index 00000000..aa111c89
--- /dev/null
+++ b/tests/data/test1526
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP proxy
+proxytunnel
+CURLOPT_PROXYHEADER
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 OK
+Server: present
+
+</connect>
+<data>
+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"
+</data>
+<datacheck>
+HTTP/1.1 200 OK
+Server: present
+
+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"
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+<tool>
+lib1526
+</tool>
+ <name>
+CURLOPT_PROXYHEADER: separate host/proxy headers
+ </name>
+ <command>
+ http://the.old.moo.1526:%HTTPPORT/1526 %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<proxy>
+CONNECT the.old.moo.1526:%HTTPPORT HTTP/1.1
+Host: the.old.moo.1526:%HTTPPORT
+Proxy-Connection: Keep-Alive
+User-Agent: Proxy Agent
+
+</proxy>
+<protocol>
+PUT /1526 HTTP/1.1
+Host: the.old.moo.1526:%HTTPPORT
+Accept: */*
+User-Agent: Http Agent
+Content-Length: 13
+Expect: 100-continue
+
+Hello Cloud!
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1527 b/tests/data/test1527
new file mode 100644
index 00000000..e8d52794
--- /dev/null
+++ b/tests/data/test1527
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP proxy
+proxytunnel
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 OK
+We-are: good
+
+</connect>
+<data>
+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"
+</data>
+<datacheck>
+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"
+</datacheck>
+
+</reply>
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+<tool>
+lib1527
+</tool>
+ <name>
+Check same headers are generated with CURLOPT_HEADEROPT == CURLHEADER_UNIFIED
+ </name>
+ <command>
+ http://the.old.moo.1527:%HTTPPORT/1527 %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<proxy>
+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
+
+</proxy>
+<protocol>
+PUT /1527 HTTP/1.1
+Host: the.old.moo.1527:%HTTPPORT
+Accept: */*
+User-Agent: Http Agent
+Expect: 100-continue
+Content-Length: 13
+
+Hello Cloud!
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1528 b/tests/data/test1528
new file mode 100644
index 00000000..876806af
--- /dev/null
+++ b/tests/data/test1528
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP proxy
+proxytunnel
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 OK
+We-are: good
+
+</connect>
+<data>
+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"
+Content-Length: 5
+
+stop
+</data>
+
+</reply>
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+<tool>
+lib1528
+</tool>
+ <name>
+Separately specified proxy/server headers sent in a proxy GET
+ </name>
+ <command>
+ http://the.old.moo:%HTTPPORT/1528 %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<proxy>
+GET http://the.old.moo:%HTTPPORT/1528 HTTP/1.1
+Host: the.old.moo:%HTTPPORT
+Accept: */*
+Proxy-Connection: Keep-Alive
+User-Agent: Http Agent
+Proxy-User-Agent: Http Agent2
+
+</proxy>
+</verify>
+</testcase>
diff --git a/tests/data/test1529 b/tests/data/test1529
new file mode 100644
index 00000000..33df2682
--- /dev/null
+++ b/tests/data/test1529
@@ -0,0 +1,43 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 OK
+We-are: good
+
+</connect>
+
+</reply>
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+<tool>
+lib1529
+</tool>
+ <name>
+HTTP request-injection in URL sent over proxy
+ </name>
+ <command>
+ "http://the.old.moo:%HTTPPORT/1529" %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+# it should be detected and an error should be reported
+<verify>
+# 3 == CURLE_URL_MALFORMAT
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test153 b/tests/data/test153
index 5a1db315..fc1d812d 100644
--- a/tests/data/test153
+++ b/tests/data/test153
@@ -63,6 +63,7 @@ This IS the second real page!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -85,21 +86,21 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /1530001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1530001", response="f4f83139396995bac665f24a1f1055c7"
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /1530002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1530002", response="f84511b014fdd0ba6494f42871079c32"
User-Agent: curl/7.11.0-CVS (i686-pc-linux-gnu) libcurl/7.11.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /1530002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/1530002", cnonce="MTA4MzIy", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm="MD5"
User-Agent: curl/7.11.0-CVS (i686-pc-linux-gnu) libcurl/7.11.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test1530 b/tests/data/test1530
new file mode 100644
index 00000000..8372d29e
--- /dev/null
+++ b/tests/data/test1530
@@ -0,0 +1,30 @@
+<testcase>
+<info>
+<keywords>
+CURLOPT_OPENSOCKETFUNCTION
+</keywords>
+</info>
+
+<client>
+<server>
+none
+</server>
+<features>
+http
+</features>
+<tool>
+lib1530
+</tool>
+ <name>
+CURLOPT_OPENSOCKETFUNCTION returns bad socket
+ </name>
+</client>
+
+# it should be detected and an error should be reported
+<verify>
+# 7 == CURLE_COULDNT_CONNECT
+<errorcode>
+7
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test154 b/tests/data/test154
index 89e2bd51..3d693f4b 100644
--- a/tests/data/test154
+++ b/tests/data/test154
@@ -63,6 +63,7 @@ This IS the real page!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -92,9 +93,9 @@ Content-Length: 85
Expect: 100-continue
PUT /154 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/154", response="b71551e12d1c456e47d8388ecb2edeca"
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 85
Expect: 100-continue
diff --git a/tests/data/test155 b/tests/data/test155
index 891aa35f..46f890fc 100644
--- a/tests/data/test155
+++ b/tests/data/test155
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+HTTP NTLM auth
+</keywords>
+</info>
+
# Server-side
<reply>
<servercmd>
@@ -68,6 +76,8 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -108,16 +118,15 @@ Content-Length: 85
Expect: 100-continue
PUT /155 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
Accept: */*
Content-Length: 0
-Expect: 100-continue
PUT /155 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Content-Length: 85
Expect: 100-continue
diff --git a/tests/data/test156 b/tests/data/test156
index 0ff5e7e0..098de218 100644
--- a/tests/data/test156
+++ b/tests/data/test156
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+--anyauth
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test157 b/tests/data/test157
index 872d93b8..77700f6a 100644
--- a/tests/data/test157
+++ b/tests/data/test157
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--anyauth
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test158 b/tests/data/test158
index 417238d6..9c4b22f7 100644
--- a/tests/data/test158
+++ b/tests/data/test158
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
@@ -26,7 +33,7 @@ http://%HOSTIP:%HTTPPORT/158 -F name=daniel
<strip>
^User-Agent:.*
^Content-Type: multipart/form-data.*
-^---------------------------.*
+^-----------------------.*
</strip>
<protocol>
POST /158 HTTP/1.1
diff --git a/tests/data/test159 b/tests/data/test159
index 2b9c8321..5a062176 100644
--- a/tests/data/test159
+++ b/tests/data/test159
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+</keywords>
+</info>
+
# Server-side
<reply>
@@ -13,34 +21,20 @@ Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 34
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+Connection: close
This is not the real page either!
</data1001>
-# This is supposed to be returned when the server gets the second
-# Authorization: NTLM line passed-in from the client
-<data1002>
-HTTP/1.1 200 Things are fine in server land swsclose
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 32
-
-Finally, this is the real page!
-</data1002>
-
<datacheck>
HTTP/1.1 401 Now gimme that second request of crap
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 34
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+Connection: close
-HTTP/1.1 200 Things are fine in server land swsclose
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 32
-
-Finally, this is the real page!
+This is not the real page either!
</datacheck>
</reply>
@@ -49,12 +43,14 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
</server>
<name>
-HTTP with NTLM authorization when talking HTTP/1.0
+HTTP with NTLM authorization when talking HTTP/1.0 (known to fail)
</name>
<setenv>
# we force our own host name, in order to make the test machine independent
@@ -77,15 +73,9 @@ chkhostname curlhost
</strip>
<protocol>
GET /159 HTTP/1.0
-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
-Accept: */*
-
-GET /159 HTTP/1.0
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test16 b/tests/data/test16
index 98539beb..5cbde59a 100644
--- a/tests/data/test16
+++ b/tests/data/test16
@@ -42,8 +42,8 @@ HTTP with proxy authorization
</strip>
<protocol>
GET http://we.want.that.site.com/16 HTTP/1.1
-Proxy-Authorization: Basic ZmFrZUB1c2VyOqenp2xvb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29uZw==
Host: we.want.that.site.com
+Proxy-Authorization: Basic ZmFrZUB1c2VyOqenp2xvb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29uZw==
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test160 b/tests/data/test160
index d6ead593..df80aef9 100644
--- a/tests/data/test160
+++ b/tests/data/test160
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
# Server-side
<reply>
<data nocheck="yes">
diff --git a/tests/data/test1600 b/tests/data/test1600
new file mode 100644
index 00000000..88040747
--- /dev/null
+++ b/tests/data/test1600
@@ -0,0 +1,27 @@
+<testcase>
+<info>
+<keywords>
+unittest
+NTLM
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+NTLM
+</features>
+ <name>
+NTLM unit tests
+ </name>
+<tool>
+unit1600
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1601 b/tests/data/test1601
new file mode 100644
index 00000000..125493bb
--- /dev/null
+++ b/tests/data/test1601
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+MD5
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+MD5 unit tests
+ </name>
+<tool>
+unit1601
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1602 b/tests/data/test1602
new file mode 100644
index 00000000..4717058c
--- /dev/null
+++ b/tests/data/test1602
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+hash
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+Internal hash create/add/destroy testing, exercising clean functions
+ </name>
+<tool>
+unit1602
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test161 b/tests/data/test161
index bc6820ce..04583599 100644
--- a/tests/data/test161
+++ b/tests/data/test161
@@ -1,5 +1,12 @@
<testcase>
-# Server-side
+<info>
+<keywords>
+FTP
+CURLE_PARTIAL_FILE
+RETR
+PASV
+</keywords>
+</info>
<reply>
<data>
1oooooooooooooooooooooooooooooooooooooooooo2
@@ -25,6 +32,8 @@ ftp://%HOSTIP:%FTPPORT/161
# Verify data after the test has been "shot"
<verify>
+# This gets QUIT sent because CURLE_PARTIAL_FILE does NOT mark the control
+# connection as bad
<protocol>
USER anonymous
PASS ftp@example.com
@@ -33,6 +42,7 @@ EPSV
TYPE I
SIZE 161
RETR 161
+QUIT
</protocol>
<errorcode>
18
diff --git a/tests/data/test162 b/tests/data/test162
index 9b75f7c6..ee2f40aa 100644
--- a/tests/data/test162
+++ b/tests/data/test162
@@ -27,6 +27,7 @@ isn't because there's no Proxy-Authorization: NTLM header
<client>
<features>
NTLM
+!SSPI
</features>
<server>
http
@@ -46,9 +47,9 @@ http://%HOSTIP:%HTTPPORT/162 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:b
</strip>
<protocol>
GET http://%HOSTIP:%HTTPPORT/162 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled)
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test163 b/tests/data/test163
index 9e8256d0..22341c04 100644
--- a/tests/data/test163
+++ b/tests/data/test163
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test164 b/tests/data/test164
index baac1962..9240611d 100644
--- a/tests/data/test164
+++ b/tests/data/test164
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
# Server-side
# This particular response is an exact excerpt from an actual Apache
# server when asked for a 0-10,12-15 range (except gt/lt changed to {}
@@ -52,8 +59,8 @@ http://%HOSTIP:%HTTPPORT/want/164 -r 0-10,12-15
</strip>
<protocol>
GET /want/164 HTTP/1.1
-Range: bytes=0-10,12-15
Host: %HOSTIP:%HTTPPORT
+Range: bytes=0-10,12-15
Accept: */*
</protocol>
diff --git a/tests/data/test166 b/tests/data/test166
index 374be283..2036773f 100644
--- a/tests/data/test166
+++ b/tests/data/test166
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test167 b/tests/data/test167
index 2ce968db..0b14996a 100644
--- a/tests/data/test167
+++ b/tests/data/test167
@@ -43,6 +43,7 @@ Nice auth sir!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -60,17 +61,17 @@ http://data.from.server.requiring.digest.hohoho.com/167 --proxy http://%HOSTIP:%
</strip>
<protocol>
GET http://data.from.server.requiring.digest.hohoho.com/167 HTTP/1.1
+Host: data.from.server.requiring.digest.hohoho.com
Proxy-Authorization: Basic Zm9vOmJhcg==
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3
-Host: data.from.server.requiring.digest.hohoho.com
Accept: */*
Proxy-Connection: Keep-Alive
GET http://data.from.server.requiring.digest.hohoho.com/167 HTTP/1.1
+Host: data.from.server.requiring.digest.hohoho.com
Proxy-Authorization: Basic Zm9vOmJhcg==
Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/167", response="13c7c02a252cbe1c46d8669898a3be26"
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3
-Host: data.from.server.requiring.digest.hohoho.com
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test168 b/tests/data/test168
index e72e9314..20e0b6d9 100644
--- a/tests/data/test168
+++ b/tests/data/test168
@@ -57,6 +57,7 @@ Nice auth sir!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -74,23 +75,23 @@ http://data.from.server.requiring.digest.hohoho.com/168 --proxy http://%HOSTIP:%
</strip>
<protocol>
GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1
-User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3
Host: data.from.server.requiring.digest.hohoho.com
+User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3
Accept: */*
Proxy-Connection: Keep-Alive
GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1
+Host: data.from.server.requiring.digest.hohoho.com
Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/168", response="fb8608e00ad9239a3dedb14bc8575976"
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3
-Host: data.from.server.requiring.digest.hohoho.com
Accept: */*
Proxy-Connection: Keep-Alive
GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1
+Host: data.from.server.requiring.digest.hohoho.com
Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/168", response="fb8608e00ad9239a3dedb14bc8575976"
Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/168", response="ca87f2d768a231e2d637a55698d5c416"
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
-Host: data.from.server.requiring.digest.hohoho.com
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test169 b/tests/data/test169
index f7419e6d..73ca9bd2 100644
--- a/tests/data/test169
+++ b/tests/data/test169
@@ -77,6 +77,8 @@ http
</server>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP with proxy-requiring-NTLM to site-requiring-Digest
@@ -88,7 +90,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm --digest --user digest:alot
+http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot
</command>
<precheck>
chkhostname curlhost
@@ -102,23 +104,23 @@ chkhostname curlhost
</strip>
<protocol>
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
+Host: data.from.server.requiring.digest.hohoho.com
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
-Host: data.from.server.requiring.digest.hohoho.com
Accept: */*
Proxy-Connection: Keep-Alive
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAwADAHAAAAAIAAgAcwAAAAAAAAAAAAAABoKBAIP6B+XVQ6vQsx3DfDXUVhd9436GAxPu0IYcl2Z7LxHmNeOAWQ+vxUmhuCFJBUgXCWZvb2N1cmxob3N0
-User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
Host: data.from.server.requiring.digest.hohoho.com
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
Accept: */*
Proxy-Connection: Keep-Alive
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
+Host: data.from.server.requiring.digest.hohoho.com
Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/169", response="95d48591985a03c4b49cb962aa7bd3e6"
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
-Host: data.from.server.requiring.digest.hohoho.com
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test17 b/tests/data/test17
index 259580bf..de03c1de 100644
--- a/tests/data/test17
+++ b/tests/data/test17
@@ -45,8 +45,8 @@ request MOOO
<verify>
<protocol>
MOOO /that.site.com/17 HTTP/1.1
-User-Agent: agent007 license to drill
Host: %HOSTIP:%HTTPPORT
+User-Agent: agent007 license to drill
Accept: */*
</protocol>
diff --git a/tests/data/test170 b/tests/data/test170
index a2c22179..8ce7774f 100644
--- a/tests/data/test170
+++ b/tests/data/test170
@@ -19,6 +19,7 @@ http
</server>
<features>
NTLM
+!SSPI
</features>
<name>
HTTP POST with --proxy-ntlm and no SSL with no response
@@ -35,9 +36,9 @@ http://a.galaxy.far.far.away/170 --proxy http://%HOSTIP:%HTTPPORT --proxy-user f
</strip>
<protocol>
POST http://a.galaxy.far.far.away/170 HTTP/1.1
+Host: a.galaxy.far.far.away
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 libidn/0.4.3
-Host: a.galaxy.far.far.away
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 0
diff --git a/tests/data/test171 b/tests/data/test171
index 870d236f..147be0a8 100644
--- a/tests/data/test171
+++ b/tests/data/test171
@@ -49,7 +49,7 @@ Proxy-Connection: Keep-Alive
</protocol>
<file name="log/jar171" mode="text">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
.z.x.com TRUE / FALSE 0 XToken xt
diff --git a/tests/data/test172 b/tests/data/test172
index 1ab90201..3d534189 100644
--- a/tests/data/test172
+++ b/tests/data/test172
@@ -31,12 +31,12 @@ http://%HOSTIP:%HTTPPORT/we/want/172 -b log/jar172.txt -b "tool=curl; name=fool"
</command>
<file name="log/jar172.txt">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
.%HOSTIP TRUE /silly/ FALSE 0 ismatch this
.%HOSTIP TRUE / FALSE 0 partmatch present
-%HOSTIP FALSE /we/want/ FALSE 1391252187 nodomain value
+%HOSTIP FALSE /we/want/ FALSE 2139150993 nodomain value
</file>
</client>
diff --git a/tests/data/test174 b/tests/data/test174
index fc5ccc18..9767f2f5 100644
--- a/tests/data/test174
+++ b/tests/data/test174
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
@@ -6,7 +13,7 @@ HTTP/1.1 200 beng swsclose
Server: Microsoft-IIS/6.0
Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 26
+Content-Length: 26
This is not the real page
</data>
diff --git a/tests/data/test175 b/tests/data/test175
index 2ee78d50..9e005f1f 100644
--- a/tests/data/test175
+++ b/tests/data/test175
@@ -22,7 +22,7 @@ This is not the real page
HTTP/1.1 200 moo swsclose
Server: Microsoft-IIS/6.0
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 16
+Content-Length: 16
content for you
</data1>
@@ -36,7 +36,7 @@ Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 200 moo swsclose
Server: Microsoft-IIS/6.0
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 16
+Content-Length: 16
content for you
</datacheck>
diff --git a/tests/data/test176 b/tests/data/test176
index d3b220b8..73c53ca8 100644
--- a/tests/data/test176
+++ b/tests/data/test176
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+HTTP NTLM auth
+</keywords>
+</info>
+
# Server-side
<reply>
# the first request has NTLM type-1 included, and then the 1001 is returned
@@ -15,7 +23,7 @@ Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 200 moo swsclose
Server: Microsoft-IIS/6.0
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 16
+Content-Length: 16
content for you
</data>
@@ -29,7 +37,7 @@ Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 200 moo swsclose
Server: Microsoft-IIS/6.0
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 16
+Content-Length: 16
content for you
</datacheck>
@@ -40,6 +48,7 @@ content for you
<client>
<features>
NTLM
+!SSPI
</features>
<server>
http
@@ -59,16 +68,16 @@ http://%HOSTIP:%HTTPPORT/176 -u auser:apasswd --ntlm -d "junkelijunk"
</strip>
<protocol nonewline="yes">
POST /176 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST /176 HTTP/1.1
-User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
Accept: */*
Content-Length: 11
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test178 b/tests/data/test178
index 07f0566e..7481467d 100644
--- a/tests/data/test178
+++ b/tests/data/test178
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
#
# Server-side
<reply>
diff --git a/tests/data/test18 b/tests/data/test18
index ff65817d..e1d76398 100644
--- a/tests/data/test18
+++ b/tests/data/test18
@@ -3,30 +3,31 @@
<keywords>
HTTP
HTTP GET
+globbing
{} list
</keywords>
</info>
# Server-side
<reply>
<data nocheck="yes">
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
-
+
moo
</data>
<data2>
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
-
+
foo
</data2>
<data3>
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
-
+
hoo
</data3>
</reply>
@@ -68,22 +69,22 @@ Accept: */*
</protocol>
<stdout>
--_curl_--%HOSTIP:%HTTPPORT/18
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
-
+
moo
--_curl_--%HOSTIP:%HTTPPORT/180002
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
-
+
foo
--_curl_--%HOSTIP:%HTTPPORT/180003
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
-
+
hoo
</stdout>
</verify>
diff --git a/tests/data/test180 b/tests/data/test180
index c93302e7..0b2ca037 100644
--- a/tests/data/test180
+++ b/tests/data/test180
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+HTTP/1.0
+</keywords>
+</info>
+
<reply>
<data>
HTTP/1.0 200 OK swsclose
diff --git a/tests/data/test1800 b/tests/data/test1800
new file mode 100644
index 00000000..b7d534ed
--- /dev/null
+++ b/tests/data/test1800
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+http2
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+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-
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http2
+</features>
+ <name>
+HTTP/2 upgrade refused
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1800 --http2
+</command>
+
+</client>
+
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1800 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Connection: Upgrade, HTTP2-Settings
+Upgrade: %H2CVER
+HTTP2-Settings: AAMAAABkAAQAAP__
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1801 b/tests/data/test1801
new file mode 100644
index 00000000..0aedfed5
--- /dev/null
+++ b/tests/data/test1801
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+http2
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+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!
+</data>
+
+<datacheck>
+HTTP/1.1 101 Switching!
+</datacheck>
+
+# listen to the upgrade request!
+<servercmd>
+upgrade
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http2
+</features>
+ <name>
+HTTP/2 upgrade with lying server
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1801 --http2
+</command>
+
+</client>
+
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1801 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Connection: Upgrade, HTTP2-Settings
+Upgrade: %H2CVER
+HTTP2-Settings: AAMAAABkAAQAAP__
+
+</protocol>
+# CURLE_HTTP2: Send failure: Broken pipe
+<errorcode>
+16
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test181 b/tests/data/test181
index 87c5701f..b6b55cb9 100644
--- a/tests/data/test181
+++ b/tests/data/test181
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+HTTP/1.0
+</keywords>
+</info>
+
<reply>
<data>
HTTP/1.0 200 OK swsclose
diff --git a/tests/data/test182 b/tests/data/test182
index 272cdee2..f640a0e1 100644
--- a/tests/data/test182
+++ b/tests/data/test182
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<data sendzero="yes">
diff --git a/tests/data/test184 b/tests/data/test184
index e42a393e..8b09dde2 100644
--- a/tests/data/test184
+++ b/tests/data/test184
@@ -59,10 +59,10 @@ http://deathstar.another.galaxy/184 -L -H "Host: another.visitor.stay.a.while.st
</strip>
<protocol>
GET http://deathstar.another.galaxy/184 HTTP/1.1
+Host: another.visitor.stay.a.while.stay.foreeeeeever
User-Agent: curl/7.12.2-CVS (i686-pc-linux-gnu) libcurl/7.12.2-CVS OpenSSL/0.9.6b zlib/1.1.4 libidn/0.4.6
Accept: */*
Proxy-Connection: Keep-Alive
-Host: another.visitor.stay.a.while.stay.foreeeeeever
GET http://yet.another.host/184 HTTP/1.1
Host: yet.another.host
diff --git a/tests/data/test185 b/tests/data/test185
index 01a66f6d..298dd49c 100644
--- a/tests/data/test185
+++ b/tests/data/test185
@@ -59,15 +59,15 @@ http://deathstar.another.galaxy/185 -L -H "Host: another.visitor.stay.a.while.st
</strip>
<protocol>
GET http://deathstar.another.galaxy/185 HTTP/1.1
+Host: another.visitor.stay.a.while.stay.foreeeeeever
User-Agent: curl/7.12.2-CVS (i686-pc-linux-gnu) libcurl/7.12.2-CVS OpenSSL/0.9.6b zlib/1.1.4 libidn/0.4.6
Accept: */*
Proxy-Connection: Keep-Alive
-Host: another.visitor.stay.a.while.stay.foreeeeeever
GET http://deathstar.another.galaxy/go/west/185 HTTP/1.1
+Host: another.visitor.stay.a.while.stay.foreeeeeever
Accept: */*
Proxy-Connection: Keep-Alive
-Host: another.visitor.stay.a.while.stay.foreeeeeever
</protocol>
diff --git a/tests/data/test186 b/tests/data/test186
index 5a1b7b9a..b07736cb 100644
--- a/tests/data/test186
+++ b/tests/data/test186
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test188 b/tests/data/test188
index 03035441..a23a2a11 100644
--- a/tests/data/test188
+++ b/tests/data/test188
@@ -62,15 +62,15 @@ http://%HOSTIP:%HTTPPORT/188 -C 50 -L
</strip>
<protocol>
GET /188 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Range: bytes=50-
User-Agent: curl/7.6 (sparc-sun-solaris2.7) libcurl 7.6-pre4 (SSL 0.9.6) (krb4 enabled)
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /188 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Range: bytes=50-
User-Agent: curl/7.12.2-CVS (i686-pc-linux-gnu) libcurl/7.12.2-CVS OpenSSL/0.9.7d zlib/1.2.1.2 libidn/0.5.2
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test189 b/tests/data/test189
index 55485104..f82b4ad9 100644
--- a/tests/data/test189
+++ b/tests/data/test189
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
@@ -49,15 +56,15 @@ http://%HOSTIP:%HTTPPORT/189 -C 50 -L
</strip>
<protocol>
GET /189 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Range: bytes=50-
User-Agent: curl/7.6 (sparc-sun-solaris2.7) libcurl 7.6-pre4 (SSL 0.9.6) (krb4 enabled)
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /189 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Range: bytes=50-
User-Agent: curl/7.12.2-CVS (i686-pc-linux-gnu) libcurl/7.12.2-CVS OpenSSL/0.9.7d zlib/1.2.1.2 libidn/0.5.2
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test190 b/tests/data/test190
index 4789cfa7..6f5d66ad 100644
--- a/tests/data/test190
+++ b/tests/data/test190
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<servercmd>
diff --git a/tests/data/test1900 b/tests/data/test1900
new file mode 100644
index 00000000..04c59a82
--- /dev/null
+++ b/tests/data/test1900
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 4 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+Handle 1 Completed with status 0
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<features>
+http
+</features>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+0 1k.txt
+1000 100k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1901 b/tests/data/test1901
new file mode 100644
index 00000000..17c04d14
--- /dev/null
+++ b/tests/data/test1901
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+flaky
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+Handle 4 Completed with status 0
+Handle 1 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<features>
+http
+</features>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining, blacklisted site
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+blacklist_site 127.0.0.1:%HTTPPIPEPORT
+0 1k.txt
+1000 100k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1902 b/tests/data/test1902
new file mode 100644
index 00000000..555b4863
--- /dev/null
+++ b/tests/data/test1902
@@ -0,0 +1,62 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+flaky
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 1 Completed with status 0
+Handle 4 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<features>
+http
+</features>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining, broken pipe
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+0 1k.txt
+1000 connection_close.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1903 b/tests/data/test1903
new file mode 100644
index 00000000..c7256183
--- /dev/null
+++ b/tests/data/test1903
@@ -0,0 +1,62 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+flaky
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+Handle 4 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+Handle 1 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<features>
+http
+</features>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining, penalized on content-length
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+0 1k.txt
+1000 100k.txt
+550 alphabet.txt
+10 alphabet.txt
+10 alphabet.txt
+10 alphabet.txt
+10 alphabet.txt
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test191 b/tests/data/test191
index 090d4c5b..86fa29f9 100644
--- a/tests/data/test191
+++ b/tests/data/test191
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
@@ -15,7 +21,7 @@ ftp
FTP URL with ?-letters in username and password
</name>
<command>
-"ftp://use?r:pass?word@%HOSTIP:%FTPPORT/191"
+"ftp://use%3fr:pass%3fword@%HOSTIP:%FTPPORT/191"
</command>
</client>
diff --git a/tests/data/test192 b/tests/data/test192
index 5f59e185..42cebc03 100644
--- a/tests/data/test192
+++ b/tests/data/test192
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
#
# Server-side
<reply>
diff --git a/tests/data/test194 b/tests/data/test194
index 582f197f..730446f7 100644
--- a/tests/data/test194
+++ b/tests/data/test194
@@ -13,7 +13,7 @@ Resume
<data>
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
+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
@@ -25,6 +25,19 @@ Connection: close
bad
</data>
+<datacheck>
+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
+</datacheck>
+
</reply>
# Client-side
@@ -47,11 +60,14 @@ http://%HOSTIP:%HTTPPORT/want/194 -C 87 --fail
</strip>
<protocol>
GET /want/194 HTTP/1.1
-Range: bytes=87-
Host: %HOSTIP:%HTTPPORT
+Range: bytes=87-
Accept: */*
</protocol>
-
+# CURLE_HTTP_RETURNED_ERROR
+<errorcode>
+22
+</errorcode>
</verify>
</testcase>
diff --git a/tests/data/test195 b/tests/data/test195
index 788c89a0..3059e8d9 100644
--- a/tests/data/test195
+++ b/tests/data/test195
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<servercmd>
diff --git a/tests/data/test196 b/tests/data/test196
index b070f38a..ee9d3398 100644
--- a/tests/data/test196
+++ b/tests/data/test196
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<servercmd>
diff --git a/tests/data/test197 b/tests/data/test197
index 062f469f..c299a22a 100644
--- a/tests/data/test197
+++ b/tests/data/test197
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
#
# Server-side
<reply>
diff --git a/tests/data/test198 b/tests/data/test198
index bb451b54..dca26b9a 100644
--- a/tests/data/test198
+++ b/tests/data/test198
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
#
# Server-side
<reply>
diff --git a/tests/data/test199 b/tests/data/test199
index c9651bca..881ee03a 100644
--- a/tests/data/test199
+++ b/tests/data/test199
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+globbing
+</keywords>
+</info>
#
# Server-side
<reply name="1">
diff --git a/tests/data/test2 b/tests/data/test2
index 22b4f186..9f9c5061 100644
--- a/tests/data/test2
+++ b/tests/data/test2
@@ -41,8 +41,8 @@ HTTP GET with user and password
</strip>
<protocol>
GET /2 HTTP/1.1
-Authorization: Basic ZmFrZTp1c2Vy
Host: %HOSTIP:%HTTPPORT
+Authorization: Basic ZmFrZTp1c2Vy
Accept: */*
</protocol>
diff --git a/tests/data/test2005 b/tests/data/test2005
new file mode 100644
index 00000000..061f99b6
--- /dev/null
+++ b/tests/data/test2005
@@ -0,0 +1,93 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 37
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2005; charset=funny; option=strange
+Funny-head: yesyes
+
+Data delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, HTTP resource
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2005.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2005.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2005">
+ <verification>
+ <hash type="sha256">a430d26389c69b7a245a9ad692cf20b4dc026fb7c2ff8a2c164c49a77130d6d9</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2005</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2005 log/name2005
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2005 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file1 name="log/download2005">
+Data delivered from an HTTP resource
+</file1>
+<file2 name="log/stdout2005">
+</file2>
+<file3 name="log/stderr2005">
+Metalink: parsing (file://%PWD/log/test2005.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2005.metalink) OK
+Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005)...
+Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005) OK
+Metalink: validating (log/download2005)...
+Metalink: validating (log/download2005) [sha-256] OK
+</file3>
+<stripfile3>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile3>
+</verify>
+</testcase>
diff --git a/tests/data/test2006 b/tests/data/test2006
new file mode 100644
index 00000000..e25556fc
--- /dev/null
+++ b/tests/data/test2006
@@ -0,0 +1,112 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 14:49:01 GMT
+Server: test-server/fake
+Content-Length: 42
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2006; charset=funny; option=strange
+Funny-head: yesyes
+
+Some data delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# This relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable. This test might use it upon
+# failure only, successful execution won't actually use it.
+<features>
+debug
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -O -D file
+ </name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2006.metalink -O -D log/heads2006
+</command>
+# local metalink file written before test command runs
+<file name="log/test2006.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2006">
+ <verification>
+ <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+ <hash type="sha256">319cb6be756734b7ff689628ca3265580cdae6a0e38f42d4ac612ff4fba143b0</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2006</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2006 log/name2006
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2006 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file1 name="log/download2006">
+Some data delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2006">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 14:49:01 GMT
+Server: test-server/fake
+Content-Length: 42
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2006; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2006">
+</file3>
+<file4 name="log/stderr2006">
+Metalink: parsing (file://%PWD/log/test2006.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2006.metalink) OK
+Metalink: fetching (log/download2006) from (http://%HOSTIP:%HTTPPORT/2006)...
+Metalink: fetching (log/download2006) from (http://%HOSTIP:%HTTPPORT/2006) OK
+Metalink: validating (log/download2006)...
+Metalink: validating (log/download2006) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
diff --git a/tests/data/test2007 b/tests/data/test2007
new file mode 100644
index 00000000..cc4bd8c3
--- /dev/null
+++ b/tests/data/test2007
@@ -0,0 +1,113 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 14:50:02 GMT
+Server: test-server/fake
+Content-Length: 42
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2007; charset=funny; option=strange
+Funny-head: yesyes
+
+Something delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# This relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable. This test might use
+# it upon failure only, successful execution won't actually use it.
+<features>
+debug
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -O -J -D file
+ </name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2007.metalink -J -O -D log/heads2007
+</command>
+# local metalink file written before test command runs
+<file name="log/test2007.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2007">
+ <verification>
+ <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+ <hash type="sha256">52899e30f80e3490632d505653204e1fb5b02bda141048704ce9a0ed00b8a3f5</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2007</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2007 log/name2007
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2007 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file1 name="log/download2007">
+Something delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2007">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 14:50:02 GMT
+Server: test-server/fake
+Content-Length: 42
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2007; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2007">
+</file3>
+<file4 name="log/stderr2007">
+Metalink: parsing (file://%PWD/log/test2007.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2007.metalink) OK
+Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007)...
+Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007) OK
+Metalink: validating (log/download2007)...
+Metalink: validating (log/download2007) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
diff --git a/tests/data/test2008 b/tests/data/test2008
new file mode 100644
index 00000000..58437926
--- /dev/null
+++ b/tests/data/test2008
@@ -0,0 +1,105 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 15:23:48 GMT
+Server: test-server/fake
+Content-Length: 43
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2008; charset=funny; option=strange
+Funny-head: yesyes
+
+Some stuff delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -o fname -D file
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2008.metalink -o log/outfile2008 -D log/heads2008
+</command>
+# local metalink file written before test command runs
+<file name="log/test2008.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2008">
+ <verification>
+ <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+ <hash type="sha256">711b1b566b536c5baae9b36f2f5c1830a7c8ff126d1afa2febc5b59f8d0aab54</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2008</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2008 log/name2008 log/outfile2008
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2008 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file1 name="log/download2008">
+Some stuff delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2008">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 15:23:48 GMT
+Server: test-server/fake
+Content-Length: 43
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2008; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2008">
+</file3>
+<file4 name="log/stderr2008">
+Metalink: parsing (file://%PWD/log/test2008.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2008.metalink) OK
+Metalink: fetching (log/download2008) from (http://%HOSTIP:%HTTPPORT/2008)...
+Metalink: fetching (log/download2008) from (http://%HOSTIP:%HTTPPORT/2008) OK
+Metalink: validating (log/download2008)...
+Metalink: validating (log/download2008) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
diff --git a/tests/data/test2009 b/tests/data/test2009
new file mode 100644
index 00000000..84482ce8
--- /dev/null
+++ b/tests/data/test2009
@@ -0,0 +1,106 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 16:27:17 GMT
+Server: test-server/fake
+Content-Length: 46
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2009; charset=funny; option=strange
+Funny-head: yesyes
+
+Some contents delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -o fname -J -D file
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2009.metalink -J -o log/outfile2009 -D log/heads2009
+</command>
+# local metalink file written before test command runs
+<file name="log/test2009.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2009">
+ <verification>
+ <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+ <hash type="sha256">e4c5b83384ba7d5f8e201d61747a14f29baacd7dfadce0fbd56661db4bba72b2</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2009</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2009 log/name2009 log/outfile2009
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2009 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file1 name="log/download2009">
+Some contents delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2009">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 16:27:17 GMT
+Server: test-server/fake
+Content-Length: 46
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2009; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2009">
+</file3>
+<file4 name="log/stderr2009">
+Metalink: parsing (file://%PWD/log/test2009.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2009.metalink) OK
+Metalink: fetching (log/download2009) from (http://%HOSTIP:%HTTPPORT/2009)...
+Metalink: fetching (log/download2009) from (http://%HOSTIP:%HTTPPORT/2009) OK
+Metalink: validating (log/download2009)...
+Metalink: validating (log/download2009) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
diff --git a/tests/data/test201 b/tests/data/test201
index eb242241..254e2412 100644
--- a/tests/data/test201
+++ b/tests/data/test201
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+FILE
+FAILURE
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test2010 b/tests/data/test2010
new file mode 100644
index 00000000..b8b3ddcc
--- /dev/null
+++ b/tests/data/test2010
@@ -0,0 +1,105 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 17:37:27 GMT
+Server: test-server/fake
+Content-Length: 41
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2010; charset=funny; option=strange
+Funny-head: yesyes
+
+Contents delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -o fname -i -D file
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2010.metalink -i -o log/outfile2010 -D log/heads2010
+</command>
+# local metalink file written before test command runs
+<file name="log/test2010.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2010">
+ <verification>
+ <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+ <hash type="sha256">19dcb4e2a99b9cd02c30b1ed6c55869b7ef8cda9f985648909c48a6dbb54356c</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2010</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2010 log/name2010 log/outfile2010
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2010 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file1 name="log/download2010">
+Contents delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2010">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 17:37:27 GMT
+Server: test-server/fake
+Content-Length: 41
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2010; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2010">
+</file3>
+<file4 name="log/stderr2010">
+Metalink: parsing (file://%PWD/log/test2010.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2010.metalink) OK
+Metalink: fetching (log/download2010) from (http://%HOSTIP:%HTTPPORT/2010)...
+Metalink: fetching (log/download2010) from (http://%HOSTIP:%HTTPPORT/2010) OK
+Metalink: validating (log/download2010)...
+Metalink: validating (log/download2010) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
diff --git a/tests/data/test2011 b/tests/data/test2011
new file mode 100644
index 00000000..46785cf9
--- /dev/null
+++ b/tests/data/test2011
@@ -0,0 +1,93 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 37
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2011; charset=funny; option=strange
+Funny-head: yesyes
+
+Data delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, HTTP resource, hash mismatch
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2011.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2011.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2011">
+ <verification>
+ <hash type="sha256">badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2011</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2011 log/name2011
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2011 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file1 name="log/download2011">
+Data delivered from an HTTP resource
+</file1>
+<file2 name="log/stdout2011">
+</file2>
+<file3 name="log/stderr2011">
+Metalink: parsing (file://%PWD/log/test2011.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2011.metalink) OK
+Metalink: fetching (log/download2011) from (http://%HOSTIP:%HTTPPORT/2011)...
+Metalink: fetching (log/download2011) from (http://%HOSTIP:%HTTPPORT/2011) OK
+Metalink: validating (log/download2011)...
+Metalink: validating (log/download2011) [sha-256] FAILED (digest mismatch)
+</file3>
+<stripfile3>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile3>
+</verify>
+</testcase>
diff --git a/tests/data/test2012 b/tests/data/test2012
new file mode 100644
index 00000000..59c042d1
--- /dev/null
+++ b/tests/data/test2012
@@ -0,0 +1,92 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 46
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2012; charset=funny; option=strange
+Funny-head: yesyes
+
+Some contents delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, HTTP resource, without hash
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2012.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2012.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2012">
+ <verification>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2012</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2012 log/name2012
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2012 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file1 name="log/download2012">
+Some contents delivered from an HTTP resource
+</file1>
+<file2 name="log/stdout2012">
+</file2>
+<file3 name="log/stderr2012">
+Metalink: parsing (file://%PWD/log/test2012.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2012.metalink) WARNING (digest missing)
+Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012)...
+Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012) OK
+Metalink: validating (log/download2012)...
+Metalink: validating (log/download2012) FAILED (digest missing)
+</file3>
+<stripfile3>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile3>
+</verify>
+</testcase>
diff --git a/tests/data/test2013 b/tests/data/test2013
new file mode 100644
index 00000000..0985b32d
--- /dev/null
+++ b/tests/data/test2013
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2013; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix absolute path
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2013.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2013.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="/tmp/download2013">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2013</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2013 log/name2013 /tmp/download2013
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2013">
+</file1>
+<file2 name="log/stderr2013">
+Metalink: parsing (file://%PWD/log/test2013.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2013.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2013.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2014 b/tests/data/test2014
new file mode 100644
index 00000000..d2dbdc7a
--- /dev/null
+++ b/tests/data/test2014
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2014; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix path relative to current
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2014.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2014.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="./log/download2014">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2014</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2014 log/name2014 log/download2014
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2014">
+</file1>
+<file2 name="log/stderr2014">
+Metalink: parsing (file://%PWD/log/test2014.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2014.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2014.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2015 b/tests/data/test2015
new file mode 100644
index 00000000..a35f3117
--- /dev/null
+++ b/tests/data/test2015
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2015; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix path relative to upper
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2015.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2015.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="../tests/log/download2015">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2015</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2015 log/name2015 log/download2015
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2015">
+</file1>
+<file2 name="log/stderr2015">
+Metalink: parsing (file://%PWD/log/test2015.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2015.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2015.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2016 b/tests/data/test2016
new file mode 100644
index 00000000..572aa65c
--- /dev/null
+++ b/tests/data/test2016
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2016; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix path traversal
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2016.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2016.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/../log/download2016">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2016</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2016 log/name2016 log/download2016
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2016">
+</file1>
+<file2 name="log/stderr2016">
+Metalink: parsing (file://%PWD/log/test2016.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2016.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2016.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2017 b/tests/data/test2017
new file mode 100644
index 00000000..15fd9347
--- /dev/null
+++ b/tests/data/test2017
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2017; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix home path traversal
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2017.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2017.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="~/download2017">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2017</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2017 log/name2017
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2017">
+</file1>
+<file2 name="log/stderr2017">
+Metalink: parsing (file://%PWD/log/test2017.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2017.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2017.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2018 b/tests/data/test2018
new file mode 100644
index 00000000..6d0652dc
--- /dev/null
+++ b/tests/data/test2018
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2018; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix questionable file name I
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2018.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2018.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/.download2018">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2018</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2018 log/name2018 log/.download2018
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2018">
+</file1>
+<file2 name="log/stderr2018">
+Metalink: parsing (file://%PWD/log/test2018.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2018.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2018.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2019 b/tests/data/test2019
new file mode 100644
index 00000000..b17b3f23
--- /dev/null
+++ b/tests/data/test2019
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2019; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix questionable file name II
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2019.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2019.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name=".">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2019</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2019 log/name2019
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2019">
+</file1>
+<file2 name="log/stderr2019">
+Metalink: parsing (file://%PWD/log/test2019.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2019.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2019.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test202 b/tests/data/test202
index 51784706..f863ec50 100644
--- a/tests/data/test202
+++ b/tests/data/test202
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test2020 b/tests/data/test2020
new file mode 100644
index 00000000..8bf85a4d
--- /dev/null
+++ b/tests/data/test2020
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2020; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix questionable file name III
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2020.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2020.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="..">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2020</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2020 log/name2020
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2020">
+</file1>
+<file2 name="log/stderr2020">
+Metalink: parsing (file://%PWD/log/test2020.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2020.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2020.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2021 b/tests/data/test2021
new file mode 100644
index 00000000..20a92244
--- /dev/null
+++ b/tests/data/test2021
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2021; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix questionable file name IV
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2021.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2021.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2021 >/dev/null">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2021</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2021 log/name2021 log/download2021
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2021">
+</file1>
+<file2 name="log/stderr2021">
+Metalink: parsing (file://%PWD/log/test2021.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2021.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2021.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2022 b/tests/data/test2022
new file mode 100644
index 00000000..4f4efd17
--- /dev/null
+++ b/tests/data/test2022
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2022; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt Unix questionable file name V
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2022.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2022.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+ <file name="log/download2022 |/dev/null">
+ <verification>
+ <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+ </verification>
+ <resources maxconnections="1">
+ <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2022</url>
+ </resources>
+ </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2022 log/name2022 log/download2022
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2022">
+</file1>
+<file2 name="log/stderr2022">
+Metalink: parsing (file://%PWD/log/test2022.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2022.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2022.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2023 b/tests/data/test2023
new file mode 100644
index 00000000..382b6cb8
--- /dev/null
+++ b/tests/data/test2023
@@ -0,0 +1,162 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- First request has Basic auth, wrong password -->
+<data100>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data100>
+
+<!-- Second request has Basic auth, right password -->
+<data200>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data200>
+
+<!-- Third request has Basic auth, wrong password -->
+<data300>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data300>
+
+<!-- Fourth request has Basic auth, wrong password -->
+<data400>
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data400>
+
+<!-- Fifth request has Basic auth, right password -->
+<data500>
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data500>
+
+<datacheck>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Basic)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2023 basic basic
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20230100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
+Accept: */*
+
+GET /20230200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+GET /20230300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
+Accept: */*
+
+GET /20230400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
+Accept: */*
+
+GET /20230500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2024 b/tests/data/test2024
new file mode 100644
index 00000000..cd06b7c9
--- /dev/null
+++ b/tests/data/test2024
@@ -0,0 +1,176 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP Digest auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Basic and Digest headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has Basic auth, wrong password -->
+<data100>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="1"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data100>
+
+<!-- Second request has Digest auth, right password -->
+<data1200>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1200>
+
+<!-- Third request has Basic auth, wrong password -->
+<data300>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data300>
+
+<!-- Fourth request has Digest auth, wrong password -->
+<data1400>
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="3"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data1400>
+
+<!-- Fifth request has Digest auth, right password -->
+<data1500>
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1500>
+
+<datacheck>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="1"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="3"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+</features>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Basic switching to Digest)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2024 basic digest
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20240100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
+Accept: */*
+
+GET /20240200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20240200", response="ed646c565f79e2dd9fa37cb5a621213c"
+Accept: */*
+
+GET /20240300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
+Accept: */*
+
+GET /20240400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20240400", response="9741ced8caacc6124770187b36f007c5"
+Accept: */*
+
+GET /20240500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/20240500", response="5bc77ec8c2d443b27a1b55f1fd8fbb13"
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2025 b/tests/data/test2025
new file mode 100644
index 00000000..1eae4826
--- /dev/null
+++ b/tests/data/test2025
@@ -0,0 +1,272 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Basic and NTLM headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has Basic auth, wrong password -->
+<data100>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data100>
+
+<!-- Second request has NTLM auth, right password -->
+<data200>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1202>
+
+<!-- Third request has Basic auth, wrong password -->
+<data300>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data300>
+
+<!-- Fourth request has NTLM auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need Basic or NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data400>
+
+<data1401>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1401>
+
+<data1402>
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data1402>
+
+<!-- Fifth request has NTLM auth, right password -->
+<data500>
+HTTP/1.1 401 Need Basic or NTLM auth (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data500>
+
+<data1501>
+HTTP/1.1 401 NTLM intermediate (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1501>
+
+<data1502>
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1502>
+
+<datacheck>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+!SSPI
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Basic switching to NTLM)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2025 basic ntlm
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20250100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
+Accept: */*
+
+GET /20250200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20250200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20250300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
+Accept: */*
+
+GET /20250400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20250400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20250500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20250500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2026 b/tests/data/test2026
new file mode 100644
index 00000000..afbd4f31
--- /dev/null
+++ b/tests/data/test2026
@@ -0,0 +1,220 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP Digest auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Basic and Digest headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has Digest auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Basic or Digest auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="1"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is not the real page!
+</data100>
+
+<data1100>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+
+This is a bad password page!
+</data1100>
+
+<!-- Second request has Basic auth, right password -->
+<data200>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data200>
+
+<!-- Third request has Digest auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Basic or Digest auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="3"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is not the real page!
+</data300>
+
+<data1300>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: Digest realm="testrealm", nonce="4"
+
+This is a bad password page!
+</data1300>
+
+<!-- Fourth request has Basic auth, wrong password -->
+<data400>
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="5"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data400>
+
+<!-- Fifth request has Basic auth, right password -->
+<data500>
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data500>
+
+<datacheck>
+HTTP/1.1 401 Need Basic or Digest auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="1"
+WWW-Authenticate: Basic realm="testrealm"
+
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+HTTP/1.1 401 Need Basic or Digest auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="3"
+WWW-Authenticate: Basic realm="testrealm"
+
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: Digest realm="testrealm", nonce="4"
+
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="5"
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+</features>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Digest switching to Basic)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2026 digest basic
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20260100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /20260100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20260100", response="5f992a2e761ab926256419f7c685f85b"
+Accept: */*
+
+GET /20260200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+GET /20260300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /20260300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/20260300", response="132242e602882251929be93228c830ae"
+Accept: */*
+
+GET /20260400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
+Accept: */*
+
+GET /20260500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2027 b/tests/data/test2027
new file mode 100644
index 00000000..3302a155
--- /dev/null
+++ b/tests/data/test2027
@@ -0,0 +1,248 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!--
+
+ Explanation for the duplicate 400 requests:
+
+ libcurl doesn't detect that a given Digest password is wrong already on the
+ first 401 response (as the data400 gives). libcurl will instead consider the
+ new response just as a duplicate and it sends another and detects the auth
+ problem on the second 401 response!
+
+-->
+
+<!-- First request has Digest auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Digest auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="1"
+
+This is not the real page!
+</data100>
+
+<data1100>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+
+This is a bad password page!
+</data1100>
+
+<!-- Second request has Digest auth, right password -->
+<data200>
+HTTP/1.1 401 Need Digest auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="3"
+
+This is not the real page!
+</data200>
+
+<data1200>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1200>
+
+<!-- Third request has Digest auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Digest auth (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="4"
+
+This is not the real page!
+</data300>
+
+<data1300>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="5"
+
+This is a bad password page!
+</data1300>
+
+<!-- Fourth request has Digest auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need Digest auth (4)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="6"
+
+This is not the real page!
+</data400>
+
+<data1400>
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
+This is a bad password page!
+</data1400>
+
+<!-- Fifth request has Digest auth, right password -->
+<data1500>
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1500>
+
+<datacheck>
+HTTP/1.1 401 Need Digest auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="1"
+
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+HTTP/1.1 401 Need Digest auth (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="4"
+
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="5"
+
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+</features>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Digest)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2027 digest digest
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20270100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /20270100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20270100", response="f7fd60eefaff5225971bf9b3d80d6ba6"
+Accept: */*
+
+GET /20270200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20270200", response="785ca3ef511999f7e9c178195f5b388c"
+Accept: */*
+
+GET /20270300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /20270300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/20270300", response="4c735d2360fd6848e7cb32a11ae3612b"
+Accept: */*
+
+GET /20270400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20270400", response="f5906785511fb60a2af8b1cd53008ead"
+Accept: */*
+
+GET /20270400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20270400", response="f5906785511fb60a2af8b1cd53008ead"
+Accept: */*
+
+GET /20270500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/20270500", response="8ef4d935fd964a46c3965c0863b52cf1"
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2028 b/tests/data/test2028
new file mode 100644
index 00000000..1ae1faea
--- /dev/null
+++ b/tests/data/test2028
@@ -0,0 +1,316 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Digest and NTLM headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has Digest auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Digest or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="1"
+
+This is not the real page!
+</data100>
+
+<data1100>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+</data1100>
+
+<!-- Second request has NTLM auth, right password -->
+<data200>
+HTTP/1.1 401 Need Digest or NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="3"
+
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1202>
+
+<!-- Third request has Digest auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Digest or NTLM auth (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="4"
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data300>
+
+<data1300>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="5"
+
+This is a bad password page!
+</data1300>
+
+<!-- Fourth request has NTLM auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need Digest or NTLM auth (4)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="6"
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data400>
+
+<data1401>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1401>
+
+<data1402>
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
+This is a bad password page!
+</data1402>
+
+<!-- Fifth request has NTLM auth, right password -->
+<data500>
+HTTP/1.1 401 Need Digest or NTLM auth (5)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="8"
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data500>
+
+<data1501>
+HTTP/1.1 401 NTLM intermediate (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1501>
+
+<data1502>
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1502>
+
+<datacheck>
+HTTP/1.1 401 Need Digest or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="1"
+
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+HTTP/1.1 401 Need Digest or NTLM auth (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="4"
+WWW-Authenticate: NTLM
+
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="5"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+!SSPI
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Digest switching to NTLM)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2028 digest ntlm
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20280100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /20280100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20280100", response="53c80666f5e3a4a55f92a66aaf0078bb"
+Accept: */*
+
+GET /20280200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20280200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20280300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /20280300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/20280300", response="1aa5d90da9803ca12d04b24e0f19476e"
+Accept: */*
+
+GET /20280400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20280400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20280500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20280500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2029 b/tests/data/test2029
new file mode 100644
index 00000000..42866a31
--- /dev/null
+++ b/tests/data/test2029
@@ -0,0 +1,240 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Basic and NTLM headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has NTLM auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is not the real page!
+</data100>
+
+<data1101>
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1101>
+
+<data1102>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+</data1102>
+
+<!-- Second request has Basic auth, right password -->
+<data200>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data200>
+
+<!-- Third request has NTLM auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Basic or NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is not the real page!
+</data300>
+
+<data1301>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1301>
+
+<data1302>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+</data1302>
+
+<!-- Fourth request has Basic auth, wrong password -->
+<data400>
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data400>
+
+<!-- Fifth request has Basic auth, right password -->
+<data500>
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data500>
+
+<datacheck>
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+!SSPI
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (NTLM switching to Basic)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2029 ntlm basic
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20290100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20290100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20290200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+GET /20290300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20290300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20290400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
+Accept: */*
+
+GET /20290500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test203 b/tests/data/test203
index c7cdce56..366cc2cd 100644
--- a/tests/data/test203
+++ b/tests/data/test203
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test2030 b/tests/data/test2030
new file mode 100644
index 00000000..5c2754c1
--- /dev/null
+++ b/tests/data/test2030
@@ -0,0 +1,297 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Digest and NTLM headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!--
+
+ Explanation for the duplicate 400 requests:
+
+ libcurl doesn't detect that a given Digest password is wrong already on the
+ first 401 response (as the data400 gives). libcurl will instead consider the
+ new response just as a duplicate and it sends another and detects the auth
+ problem on the second 401 response!
+
+-->
+
+
+<!-- First request has NTLM auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Digest or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="1"
+
+This is not the real page!
+</data100>
+
+<data1101>
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1101>
+
+<data1102>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+</data1102>
+
+<!-- Second request has Digest auth, right password -->
+<data200>
+HTTP/1.1 401 Need Digest or NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="3"
+
+This is not the real page!
+</data200>
+
+<data1200>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1200>
+
+<!-- Third request has NTLM auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Digest or NTLM auth (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="4"
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data300>
+
+<data1301>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1301>
+
+<data1302>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="5"
+
+This is a bad password page!
+</data1302>
+
+<!-- Fourth request has Digest auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need Digest or NTLM auth (4)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="6"
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data400>
+
+<data1400>
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
+This is a bad password page!
+</data1400>
+
+<!-- Fifth request has Digest auth, right password -->
+<data500>
+HTTP/1.1 401 Need Digest or NTLM auth (5)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: Digest realm="testrealm", nonce="8"
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data500>
+
+<data1500>
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1500>
+
+<datacheck>
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="2"
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="5"
+
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+!SSPI
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (NTLM switching to Digest)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2030 ntlm digest
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20300100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20300100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20300200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20300200", response="2f2d784ba53a0a307758a90e98d25c27"
+Accept: */*
+
+GET /20300300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20300300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20300400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20300400", response="d6262e9147db08c62ff2f53b515861e8"
+Accept: */*
+
+GET /20300400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20300400", response="d6262e9147db08c62ff2f53b515861e8"
+Accept: */*
+
+GET /20300500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/20300500", response="198757e61163a779cf24ed4c49c1ad7d"
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2031 b/tests/data/test2031
new file mode 100644
index 00000000..bd5aa074
--- /dev/null
+++ b/tests/data/test2031
@@ -0,0 +1,321 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- First request has NTLM auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data100>
+
+<data1101>
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1101>
+
+<data1102>
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+</data1102>
+
+<!-- Second request has NTML auth, right password -->
+<data200>
+HTTP/1.1 401 Need NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1202>
+
+<!-- Third request has NTLM auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need NTLM auth (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data300>
+
+<data1301>
+HTTP/1.1 401 NTLM intermediate (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1301>
+
+<data1302>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+</data1302>
+
+<!-- Fourth request has NTLM auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need NTLM auth (4)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data400>
+
+<data1401>
+HTTP/1.1 401 NTLM intermediate (4)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1401>
+
+<data1402>
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+</data1402>
+
+<!-- Fifth request has NTLM auth, right password -->
+<data500>
+HTTP/1.1 401 Need NTLM auth (5)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+
+This is not the real page!
+</data500>
+
+<data1501>
+HTTP/1.1 401 NTLM intermediate (5)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1501>
+
+<data1502>
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1502>
+
+<datacheck>
+HTTP/1.1 401 NTLM intermediate
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 401 Sorry wrong password
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+HTTP/1.1 401 NTLM intermediate (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (4)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (5)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+!SSPI
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (NTLM)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2031 ntlm ntlm
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20310100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20310100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20310200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20310200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20310300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20310300 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20310400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20310400 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+GET /20310500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20310500 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2032 b/tests/data/test2032
new file mode 100644
index 00000000..f708665e
--- /dev/null
+++ b/tests/data/test2032
@@ -0,0 +1,147 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Basic auth -->
+<data100>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data100>
+
+<!-- NTML auth -->
+<data200>
+HTTP/1.1 401 Need Basic or NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1202>
+
+<datacheck>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+!SSPI
+</features>
+<server>
+http
+</server>
+<tool>
+libntlmconnect
+</tool>
+
+ <name>
+NTLM connection mapping
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2032
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20320100 HTTP/1.1
+Host: 127.0.0.1:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+GET /20320100 HTTP/1.1
+Host: 127.0.0.1:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+GET /20320200 HTTP/1.1
+Host: 127.0.0.1:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20320200 HTTP/1.1
+Host: 127.0.0.1:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2033 b/tests/data/test2033
new file mode 100644
index 00000000..6c41700a
--- /dev/null
+++ b/tests/data/test2033
@@ -0,0 +1,148 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP NTLM auth
+pipelining
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Basic auth -->
+<data100>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data100>
+
+<!-- NTML auth -->
+<data200>
+HTTP/1.1 401 Need Basic or NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1202>
+
+<datacheck>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+!SSPI
+</features>
+<server>
+http
+</server>
+<tool>
+lib2033
+</tool>
+
+ <name>
+NTLM connection mapping, pipelining enabled
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2032
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20320100 HTTP/1.1
+Host: 127.0.0.1:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+GET /20320100 HTTP/1.1
+Host: 127.0.0.1:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+GET /20320200 HTTP/1.1
+Host: 127.0.0.1:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Accept: */*
+
+GET /20320200 HTTP/1.1
+Host: 127.0.0.1:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2034 b/tests/data/test2034
new file mode 100644
index 00000000..9bf0a817
--- /dev/null
+++ b/tests/data/test2034
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+PEM certificate
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 7
+
+MooMoo
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+SSL
+SSLpinning
+</features>
+<server>
+https Server-localhost-sv.pem
+</server>
+ <name>
+simple HTTPS GET with DER public key pinning
+ </name>
+ <command>
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.der https://localhost:%HTTPSPORT/2034
+</command>
+# Ensure that we're running on localhost because we're checking the host name
+<precheck>
+perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2034 HTTP/1.1
+Host: localhost:%HTTPSPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2035 b/tests/data/test2035
new file mode 100644
index 00000000..7002a5b8
--- /dev/null
+++ b/tests/data/test2035
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+PEM certificate
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+SSL
+SSLpinning
+</features>
+<server>
+https Server-localhost-sv.pem
+</server>
+ <name>
+HTTPS wrong DER pinnedpubkey but right CN
+ </name>
+ <command>
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.der https://localhost:%HTTPSPORT/2035
+</command>
+# Ensure that we're running on localhost because we're checking the host name
+<precheck>
+perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+90
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test2036 b/tests/data/test2036
new file mode 100644
index 00000000..0ab8b66c
--- /dev/null
+++ b/tests/data/test2036
@@ -0,0 +1,39 @@
+<testcase>
+<info>
+<keywords>
+FAILURE
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+http
+</features>
+ <name>
+HTTP, -O with no slash at all in the URL
+ </name>
+ <command option="no-output">
+%HOSTIP:%HTTPPORT -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<errorcode>
+23
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test2037 b/tests/data/test2037
new file mode 100644
index 00000000..d630538e
--- /dev/null
+++ b/tests/data/test2037
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+PEM certificate
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 7
+
+MooMoo
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+SSL
+SSLpinning
+</features>
+<server>
+https Server-localhost-sv.pem
+</server>
+ <name>
+simple HTTPS GET with PEM public key pinning
+ </name>
+ <command>
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.pem https://localhost:%HTTPSPORT/2037
+</command>
+# Ensure that we're running on localhost because we're checking the host name
+<precheck>
+perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2037 HTTP/1.1
+Host: localhost:%HTTPSPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2038 b/tests/data/test2038
new file mode 100644
index 00000000..63d935ad
--- /dev/null
+++ b/tests/data/test2038
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+PEM certificate
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+SSL
+SSLpinning
+</features>
+<server>
+https Server-localhost-sv.pem
+</server>
+ <name>
+HTTPS wrong PEM pinnedpubkey but right CN
+ </name>
+ <command>
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pem https://localhost:%HTTPSPORT/2038
+</command>
+# Ensure that we're running on localhost because we're checking the host name
+<precheck>
+perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+90
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test2039 b/tests/data/test2039
new file mode 100644
index 00000000..1595ded0
--- /dev/null
+++ b/tests/data/test2039
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+FTP
+EPSV
+LIST
+netrc
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+# When doing LIST, we get the default list output hard-coded in the test
+# FTP server
+<datacheck mode="text">
+total 20
+drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
+drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
+drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT
+-r--r--r-- 1 0 1 35 Jul 16 1996 README
+lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
+dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
+drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
+dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
+drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
+dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP (optional .netrc with 'default' override; no user/pass) dir list PASV
+ </name>
+ <command>
+--netrc-optional --netrc-file log/netrc2039 ftp://%HOSTIP:%FTPPORT/
+</command>
+<file name="log/netrc2039" >
+# the following two lines were created while testing curl
+default login userdef password passwddef
+machine %HOSTIP login user1 password passwd1
+machine %HOSTIP login user2 password passwd2
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER userdef
+PASS passwddef
+PWD
+EPSV
+TYPE A
+LIST
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test204 b/tests/data/test204
index c4e219e9..9cc7b015 100644
--- a/tests/data/test204
+++ b/tests/data/test204
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
# no Server-side
# Client-side
diff --git a/tests/data/test2040 b/tests/data/test2040
new file mode 100644
index 00000000..ac600174
--- /dev/null
+++ b/tests/data/test2040
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- First request has Basic auth, right password -->
+<data100>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data100>
+
+<!-- Second request with Basic auth disabled -->
+<data200>
+HTTP/1.1 401 Sorry wrong password (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data200>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP Basic authorization, then without authorization
+</name>
+<command option="no-output,no-include">
+-u testuser:testpass http://%HOSTIP:%HTTPPORT/20400100 --next --no-basic http://%HOSTIP:%HTTPPORT/20400200
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20400100 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Accept: */*
+
+GET /20400200 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<stdout>
+Finally, this is the real page!
+This is a bad password page!
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test205 b/tests/data/test205
index edcf7fec..4af93f64 100644
--- a/tests/data/test205
+++ b/tests/data/test205
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+FILE
+FAILURE
+</keywords>
+</info>
+
# no Server-side
# Client-side
diff --git a/tests/data/test206 b/tests/data/test206
index caf9113f..5f0c8856 100644
--- a/tests/data/test206
+++ b/tests/data/test206
@@ -12,14 +12,20 @@ HTTP proxy Digest auth
# Server-side
<reply>
+<servercmd>
+connection-monitor
+auth_required
+</servercmd>
+
# this is returned first since we get no proxy-auth
-<data>
+<connect>
HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
+Content-Length: 33
And you should ignore this data.
-</data>
+</connect>
# this is returned when we get a GET!
<data2>
@@ -34,16 +40,16 @@ daniel
</data2>
# then this is returned when we get proxy-auth
-<data1000>
+<connect1000>
HTTP/1.1 200 OK swsbounce
Server: no
-Nice proxy auth sir!
-</data1000>
+</connect1000>
<datacheck>
HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
+Content-Length: 33
HTTP/1.1 200 OK swsbounce
Server: no
@@ -65,13 +71,14 @@ daniel
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
HTTP proxy CONNECT auth Digest
</name>
<command>
-http://test.remote.haxx.se:206/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
+http://test.remote.haxx.se.206:8990/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
</command>
</client>
@@ -81,20 +88,21 @@ http://test.remote.haxx.se:206/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --p
^User-Agent: curl/.*
</strip>
<protocol>
-CONNECT test.remote.haxx.se:206 HTTP/1.1
-Host: test.remote.haxx.se:206
+CONNECT test.remote.haxx.se.206:8990 HTTP/1.1
+Host: test.remote.haxx.se.206:8990
Proxy-Connection: Keep-Alive
-CONNECT test.remote.haxx.se:206 HTTP/1.1
-Host: test.remote.haxx.se:206
-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:206", response="676e0836f3e1c5b31bf29770ef9d8224"
+CONNECT test.remote.haxx.se.206:8990 HTTP/1.1
+Host: test.remote.haxx.se.206:8990
+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.206:8990", response="003e36decb4dbf6366b3ecb9b87c24ec"
Proxy-Connection: Keep-Alive
GET /path/2060002 HTTP/1.1
User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
-Host: test.remote.haxx.se:206
+Host: test.remote.haxx.se.206:8990
Accept: */*
+[DISCONNECT]
</protocol>
</verify>
</testcase>
diff --git a/tests/data/test207 b/tests/data/test207
index c2eff632..e44385f1 100644
--- a/tests/data/test207
+++ b/tests/data/test207
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+CURLE_PARTIAL_FILE
+FAILURE
+</keywords>
+</info>
#
# Server-side
<reply>
diff --git a/tests/data/test208 b/tests/data/test208
index a7a99b90..afb2566b 100644
--- a/tests/data/test208
+++ b/tests/data/test208
@@ -54,8 +54,8 @@ the
</strip>
<protocol>
PUT ftp://daniel:mysecret@host.com/we/want/208 HTTP/1.1
-Authorization: Basic ZGFuaWVsOm15c2VjcmV0
Host: host.com:21
+Authorization: Basic ZGFuaWVsOm15c2VjcmV0
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 78
diff --git a/tests/data/test209 b/tests/data/test209
index 81cdcbd8..961eba1a 100644
--- a/tests/data/test209
+++ b/tests/data/test209
@@ -13,21 +13,21 @@ HTTP proxy NTLM auth
<reply>
# this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
And you should ignore this data.
-</data1001>
+</connect1001>
# This is supposed to be returned when the server gets the second
# Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
HTTP/1.1 200 Things are fine in proxy land
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
-</data1002>
+</connect1002>
# this is returned when we get a GET!
<data2>
@@ -75,6 +75,8 @@ http
</server>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP proxy CONNECT auth NTLM
@@ -86,7 +88,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://test.remote.haxx.se:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
+http://test.remote.example.com.209:%HTTPPORT/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
</command>
<precheck>
chkhostname curlhost
@@ -99,19 +101,19 @@ chkhostname curlhost
^User-Agent: curl/.*
</strip>
<protocol>
-CONNECT test.remote.haxx.se:209 HTTP/1.1
-Host: test.remote.haxx.se:209
+CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.209:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
Proxy-Connection: Keep-Alive
-CONNECT test.remote.haxx.se:209 HTTP/1.1
-Host: test.remote.haxx.se:209
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
+CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.209:%HTTPPORT
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
GET /path/2090002 HTTP/1.1
User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
-Host: test.remote.haxx.se:209
+Host: test.remote.example.com.209:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test210 b/tests/data/test210
index 83c9b3e7..e9045675 100644
--- a/tests/data/test210
+++ b/tests/data/test210
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test211 b/tests/data/test211
index 0214effc..96d0573f 100644
--- a/tests/data/test211
+++ b/tests/data/test211
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test212 b/tests/data/test212
index 8a10abfb..444525f1 100644
--- a/tests/data/test212
+++ b/tests/data/test212
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+FTP
+EPRT
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test213 b/tests/data/test213
index bb7763bb..edbb6a6f 100644
--- a/tests/data/test213
+++ b/tests/data/test213
@@ -13,21 +13,21 @@ HTTP proxy NTLM auth
<reply>
# this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
And you should ignore this data.
-</data1001>
+</connect1001>
# This is supposed to be returned when the server gets the second
# Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
HTTP/1.1 200 Things are fine in proxy land
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
-</data1002>
+</connect1002>
# this is returned when we get a GET!
<data2>
@@ -75,6 +75,8 @@ http
</server>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP 1.0 proxy CONNECT auth NTLM and then POST
@@ -86,7 +88,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://test.remote.haxx.se:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
+http://test.remote.example.com.213:%HTTPPORT/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
</command>
<precheck>
chkhostname curlhost
@@ -99,19 +101,19 @@ chkhostname curlhost
^User-Agent: curl/.*
</strip>
<protocol nonewline="yes">
-CONNECT test.remote.haxx.se:213 HTTP/1.0
-Host: test.remote.haxx.se:213
+CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0
+Host: test.remote.example.com.213:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
Proxy-Connection: Keep-Alive
-CONNECT test.remote.haxx.se:213 HTTP/1.0
-Host: test.remote.haxx.se:213
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
+CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0
+Host: test.remote.example.com.213:%HTTPPORT
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
POST /path/2130002 HTTP/1.1
User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
-Host: test.remote.haxx.se:213
+Host: test.remote.example.com.213:%HTTPPORT
Accept: */*
Content-Length: 6
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test214 b/tests/data/test214
index e12dfbfe..a9b8fcd0 100644
--- a/tests/data/test214
+++ b/tests/data/test214
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
#
# Server-side
<reply>
diff --git a/tests/data/test215 b/tests/data/test215
index 50058178..987fd990 100644
--- a/tests/data/test215
+++ b/tests/data/test215
@@ -1,9 +1,15 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test216 b/tests/data/test216
index a8264ce5..0c4de0a6 100644
--- a/tests/data/test216
+++ b/tests/data/test216
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
</reply>
diff --git a/tests/data/test217 b/tests/data/test217
index f2880085..f10df566 100644
--- a/tests/data/test217
+++ b/tests/data/test217
@@ -15,11 +15,11 @@ followlocation
<reply>
# this is returned first since we get no proxy-auth
-<data nocheck="yes">
+<connect nocheck="yes">
HTTP/1.1 405 Method Not Allowed swsclose
And you should ignore this data.
-</data>
+</connect>
</reply>
@@ -32,7 +32,7 @@ http
HTTP proxy CONNECT to proxy returning 405
</name>
<command>
-http://test.remote.haxx.se:217/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n"
+http://test.remote.example.com.217:%HTTPPORT/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n"
</command>
</client>
@@ -42,8 +42,8 @@ http://test.remote.haxx.se:217/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --p
^User-Agent: curl/.*
</strip>
<protocol>
-CONNECT test.remote.haxx.se:217 HTTP/1.1
-Host: test.remote.haxx.se:217
+CONNECT test.remote.example.com.217:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.217:%HTTPPORT
Proxy-Connection: Keep-Alive
</protocol>
diff --git a/tests/data/test218 b/tests/data/test218
index dc146fc0..c201e77a 100644
--- a/tests/data/test218
+++ b/tests/data/test218
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+</keywords>
+</info>
#
# Server-side
<reply>
diff --git a/tests/data/test22 b/tests/data/test22
index 734379e8..f45f8627 100644
--- a/tests/data/test22
+++ b/tests/data/test22
@@ -9,10 +9,10 @@ long URL
# Server-side
<reply>
<data>
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 27
-
+
This is the proof it works
</data>
</reply>
@@ -26,7 +26,7 @@ http
get HTTP with URL > 10000 bytes
</name>
<command>
-%HOSTIP:%HTTPPORT/`perl -e "print \"a\" x 10000;"`/22
+%HOSTIP:%HTTPPORT/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/22
</command>
</client>
diff --git a/tests/data/test227 b/tests/data/test227
index 523fa025..5b6d98cd 100644
--- a/tests/data/test227
+++ b/tests/data/test227
@@ -4,7 +4,6 @@
FTP
post-quote
pre-quote
-quote
</keywords>
</info>
# Server-side
diff --git a/tests/data/test231 b/tests/data/test231
index 912ea412..6994957c 100644
--- a/tests/data/test231
+++ b/tests/data/test231
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
# Server-side
<reply>
# 16 bytes to check
@@ -17,7 +23,7 @@ file
file:// with resume
</name>
<command>
-file://localhost/%PWD/log/test231.txt -C 10-
+file://localhost/%PWD/log/test231.txt -C 10
</command>
<file name="log/test231.txt">
A01234567
diff --git a/tests/data/test233 b/tests/data/test233
index d165da95..b631e52c 100644
--- a/tests/data/test233
+++ b/tests/data/test233
@@ -77,15 +77,15 @@ http://first.host.it.is/we/want/that/page/233 -x %HOSTIP:%HTTPPORT --user iam:my
</strip>
<protocol>
GET http://first.host.it.is/we/want/that/page/233 HTTP/1.1
+Host: first.host.it.is
Proxy-Authorization: Basic dGVzdGluZzp0aGlz
Authorization: Basic aWFtOm15c2VsZg==
-Host: first.host.it.is
Accept: */*
Proxy-Connection: Keep-Alive
GET http://goto.second.host.now/2330002 HTTP/1.1
-Proxy-Authorization: Basic dGVzdGluZzp0aGlz
Host: goto.second.host.now
+Proxy-Authorization: Basic dGVzdGluZzp0aGlz
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test234 b/tests/data/test234
index d8c70810..1d2e05b3 100644
--- a/tests/data/test234
+++ b/tests/data/test234
@@ -79,16 +79,16 @@ http://first.host.it.is/we/want/that/page/234 -x %HOSTIP:%HTTPPORT --user iam:my
</strip>
<protocol>
GET http://first.host.it.is/we/want/that/page/234 HTTP/1.1
+Host: first.host.it.is
Proxy-Authorization: Basic dGVzdGluZzp0aGlz
Authorization: Basic aWFtOm15c2VsZg==
-Host: first.host.it.is
Accept: */*
Proxy-Connection: Keep-Alive
GET http://goto.second.host.now/2340002 HTTP/1.1
+Host: goto.second.host.now
Proxy-Authorization: Basic dGVzdGluZzp0aGlz
Authorization: Basic aWFtOm15c2VsZg==
-Host: goto.second.host.now
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test235 b/tests/data/test235
index ee843f14..62502322 100644
--- a/tests/data/test235
+++ b/tests/data/test235
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
</reply>
diff --git a/tests/data/test236 b/tests/data/test236
index 20d04703..9ba706f1 100644
--- a/tests/data/test236
+++ b/tests/data/test236
@@ -1,4 +1,9 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
# Server-side
<reply>
diff --git a/tests/data/test237 b/tests/data/test237
index 9675a1e4..9a40f1f6 100644
--- a/tests/data/test237
+++ b/tests/data/test237
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<servercmd>
diff --git a/tests/data/test238 b/tests/data/test238
index 6397e3b2..ea54509a 100644
--- a/tests/data/test238
+++ b/tests/data/test238
@@ -1,9 +1,14 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
<servercmd>
REPLY EPSV 229 Entering Passiv Mode (|||1000000|)
-REPLY PASV 227 Entering Passiv Mode (1216,256,2,127,127,127)
</servercmd>
</reply>
@@ -13,7 +18,7 @@ REPLY PASV 227 Entering Passiv Mode (1216,256,2,127,127,127)
ftp
</server>
<name>
-FTP getting bad port in response to EPSV and in response to PASV
+FTP getting bad port in response to EPSV
</name>
<command>
ftp://%HOSTIP:%FTPPORT/238
@@ -22,20 +27,16 @@ ftp://%HOSTIP:%FTPPORT/238
# Verify data after the test has been "shot"
<verify>
-# curl: (15) Can't resolve new host 1216.256.2.127:32639
-# 15 => CURLE_FTP_CANT_GET_HOST
-# some systems just don't fail on the illegal host name/address but instead
-# moves on and attempt to connect to... yes, to what?
-# 7= CURLE_COULDNT_CONNECT
+# 13 = CURLE_FTP_WEIRD_PASV_REPLY
<errorcode>
-7, 15
+13
</errorcode>
<protocol>
USER anonymous
PASS ftp@example.com
PWD
EPSV
-PASV
+QUIT
</protocol>
</verify>
</testcase>
diff --git a/tests/data/test239 b/tests/data/test239
index 2748100f..6b92f07f 100644
--- a/tests/data/test239
+++ b/tests/data/test239
@@ -52,6 +52,8 @@ http
</server>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP proxy-auth NTLM and then POST
@@ -63,7 +65,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm -d "postit"
+http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm -d "postit"
</command>
<precheck>
chkhostname curlhost
@@ -77,18 +79,18 @@ chkhostname curlhost
</strip>
<protocol nonewline="yes">
POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
-User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: %HOSTIP:%HTTPPORT
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 6
diff --git a/tests/data/test24 b/tests/data/test24
index 7985f43b..a2b28a9f 100644
--- a/tests/data/test24
+++ b/tests/data/test24
@@ -24,7 +24,7 @@ http
HTTP GET fail silently on HTTP error return
</name>
<command>
-http://%HOSTIP:%HTTPPORT/24 --fail
+http://%HOSTIP:%HTTPPORT/24 --fail --silent --show-error
</command>
</client>
@@ -43,5 +43,8 @@ Accept: */*
<errorcode>
22
</errorcode>
+<file2 name="log/stderr24" mode="text">
+curl: (22) The requested URL returned error: 404 BAD BOY
+</file2>
</verify>
</testcase>
diff --git a/tests/data/test242 b/tests/data/test242
index 01d40bdd..9457c58c 100644
--- a/tests/data/test242
+++ b/tests/data/test242
@@ -45,8 +45,8 @@ HTTP-IPv6 GET with username+password in URL
</strip>
<protocol>
GET /242 HTTP/1.1
-Authorization: Basic Zm9vYmFyOmJhcmZvbw==
Host: %HOST6IP:%HTTP6PORT
+Authorization: Basic Zm9vYmFyOmJhcmZvbw==
Accept: */*
</protocol>
diff --git a/tests/data/test243 b/tests/data/test243
index d53a4379..3496055d 100644
--- a/tests/data/test243
+++ b/tests/data/test243
@@ -73,6 +73,8 @@ http
</server>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP POST with --proxy-anyauth, picking NTLM
@@ -84,7 +86,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth -d "postit"
+http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth -d "postit"
</command>
<precheck>
chkhostname curlhost
@@ -98,26 +100,26 @@ chkhostname curlhost
</strip>
<protocol nonewline="yes">
POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
-User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 6
Content-Type: application/x-www-form-urlencoded
postitPOST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
-User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: %HOSTIP:%HTTPPORT
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 6
diff --git a/tests/data/test245 b/tests/data/test245
index 8ad45d3a..cbb5ee31 100644
--- a/tests/data/test245
+++ b/tests/data/test245
@@ -50,6 +50,7 @@ ok
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -67,16 +68,16 @@ http://%HOSTIP:%HTTPPORT/245 -u auser:apasswd --digest -d "junkelijunk"
</strip>
<protocol nonewline="yes">
POST /245 HTTP/1.1
-User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST /245 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/245", response="379a439b1737ba257c1d2f103914b18b"
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 11
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test246 b/tests/data/test246
index b92c17a8..acf47da5 100644
--- a/tests/data/test246
+++ b/tests/data/test246
@@ -60,6 +60,7 @@ ok
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -77,16 +78,16 @@ http://%HOSTIP:%HTTPPORT/246 -u auser:apasswd --digest -d "junkelijunk"
</strip>
<protocol nonewline="yes">
POST /246 HTTP/1.1
-User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST /246 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/246", response="761e6fc9a760c39d587092e8d840e740"
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 11
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test247 b/tests/data/test247
index 66c674e9..2720144e 100644
--- a/tests/data/test247
+++ b/tests/data/test247
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
<reply>
<mdtm>
213 20030409102659
diff --git a/tests/data/test248 b/tests/data/test248
index 814b1d71..d254a951 100644
--- a/tests/data/test248
+++ b/tests/data/test248
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
<reply>
<mdtm>
213 20050409102659
diff --git a/tests/data/test249 b/tests/data/test249
index 69df5bec..4f99c2af 100644
--- a/tests/data/test249
+++ b/tests/data/test249
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
#
# Server-side
<reply>
diff --git a/tests/data/test250 b/tests/data/test250
index 2c99c46e..3d0a8f3a 100644
--- a/tests/data/test250
+++ b/tests/data/test250
@@ -1,10 +1,16 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
#
# Server-side
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test251 b/tests/data/test251
index 73ee09ee..cc8cbfa0 100644
--- a/tests/data/test251
+++ b/tests/data/test251
@@ -1,9 +1,15 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test256 b/tests/data/test256
index 5f8323b6..2b96ecf3 100644
--- a/tests/data/test256
+++ b/tests/data/test256
@@ -47,9 +47,9 @@ download on.
</strip>
<protocol>
GET http://%HOSTIP:%HTTPPORT/want/256 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Proxy-Authorization: Basic ZGFuaWVsOnN0ZW5iZXJn
Range: bytes=78-
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test257 b/tests/data/test257
index c211c2f4..502448dd 100644
--- a/tests/data/test257
+++ b/tests/data/test257
@@ -64,9 +64,6 @@ If this is received, the location following worked
# Client-side
<client>
-<features>
-netrc_debug
-</features>
<server>
http
</server>
@@ -74,11 +71,11 @@ http
HTTP Location: following with --netrc-optional
</name>
<command>
-http://supersite.com/want/257 -L -x http://%HOSTIP:%HTTPPORT --netrc-optional
+http://supersite.com/want/257 -L -x http://%HOSTIP:%HTTPPORT --netrc-optional --netrc-file log/netrc257
</command>
# netrc auth for two out of three sites:
-<file name="log/netrc">
+<file name="log/netrc257">
machine supersite.com login user1 password passwd1
machine anotherone.com login user2 password passwd2
</file>
@@ -91,22 +88,22 @@ machine anotherone.com login user2 password passwd2
</strip>
<protocol>
GET http://supersite.com/want/257 HTTP/1.1
+Host: supersite.com
Authorization: Basic dXNlcjE6cGFzc3dkMQ==
User-Agent: curl/7.14.0-CVS (i686-pc-linux-gnu) libcurl/7.14.0-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: supersite.com
Accept: */*
Proxy-Connection: Keep-Alive
GET http://anotherone.com/2570002 HTTP/1.1
+Host: anotherone.com
Authorization: Basic dXNlcjI6cGFzc3dkMg==
User-Agent: curl/7.14.0-CVS (i686-pc-linux-gnu) libcurl/7.14.0-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: anotherone.com
Accept: */*
Proxy-Connection: Keep-Alive
GET http://athird.com/2570003 HTTP/1.1
-User-Agent: curl/7.14.0-CVS (i686-pc-linux-gnu) libcurl/7.14.0-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: athird.com
+User-Agent: curl/7.14.0-CVS (i686-pc-linux-gnu) libcurl/7.14.0-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test258 b/tests/data/test258
index 0d95dec0..98c34014 100644
--- a/tests/data/test258
+++ b/tests/data/test258
@@ -56,6 +56,7 @@ ok
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -79,8 +80,8 @@ bar
</strip>
<protocol>
POST http://remotehost:54321/we/want/258 HTTP/1.1
-User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: remotehost:54321
+User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 409
@@ -104,9 +105,9 @@ bar
------------------------------7c633d5c27ce--
POST http://remotehost:54321/we/want/258 HTTP/1.1
+Host: remotehost:54321
User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/258", response="2501654ca391f0b5c8c12a1da77e34cd"
-Host: remotehost:54321
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 409
diff --git a/tests/data/test259 b/tests/data/test259
index b9d8ef12..9532887a 100644
--- a/tests/data/test259
+++ b/tests/data/test259
@@ -52,6 +52,7 @@ ok
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -75,8 +76,8 @@ bar
</strip>
<protocol>
POST http://remotehost:54321/we/want/259 HTTP/1.1
-User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: remotehost:54321
+User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 409
@@ -101,9 +102,9 @@ bar
------------------------------7c633d5c27ce--
POST http://remotehost:54321/we/want/259 HTTP/1.1
+Host: remotehost:54321
User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/259", response="b479994d13e60f3aa192a67c5892ddc5"
-Host: remotehost:54321
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 409
diff --git a/tests/data/test264 b/tests/data/test264
index 3cfb4d88..f4d171a1 100644
--- a/tests/data/test264
+++ b/tests/data/test264
@@ -39,8 +39,8 @@ http://we.want.that.site.com/264 -x http://f%61ke:user@%HOSTIP:%HTTPPORT
</strip>
<protocol>
GET http://we.want.that.site.com/264 HTTP/1.1
-Proxy-Authorization: Basic ZmFrZTp1c2Vy
Host: we.want.that.site.com
+Proxy-Authorization: Basic ZmFrZTp1c2Vy
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test265 b/tests/data/test265
index 18d20a60..1a162b80 100644
--- a/tests/data/test265
+++ b/tests/data/test265
@@ -13,23 +13,23 @@ HTTP proxy NTLM auth
<reply>
# this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
HTTP/1.0 407 Authorization Required to proxy me my dear
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
Content-Length: 1033
And you should ignore this data.
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQz
-</data1001>
+</connect1001>
# This is supposed to be returned when the server gets the second
# Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
HTTP/1.1 200 Things are fine in proxy land
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
-</data1002>
+</connect1002>
# this is returned when we get a GET!
<data2>
@@ -78,6 +78,8 @@ http
</server>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407
@@ -89,7 +91,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://test.remote.haxx.se:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
+http://test.remote.example.com.265:%HTTPPORT/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
</command>
<precheck>
chkhostname curlhost
@@ -102,19 +104,19 @@ chkhostname curlhost
^User-Agent: curl/.*
</strip>
<protocol nonewline="yes">
-CONNECT test.remote.haxx.se:265 HTTP/1.1
-Host: test.remote.haxx.se:265
+CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.265:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
Proxy-Connection: Keep-Alive
-CONNECT test.remote.haxx.se:265 HTTP/1.1
-Host: test.remote.haxx.se:265
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
+CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1
+Host: test.remote.example.com.265:%HTTPPORT
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
POST /path/2650002 HTTP/1.1
User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
-Host: test.remote.haxx.se:265
+Host: test.remote.example.com.265:%HTTPPORT
Accept: */*
Content-Length: 6
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test267 b/tests/data/test267
index 479031c4..7cc8375a 100644
--- a/tests/data/test267
+++ b/tests/data/test267
@@ -56,6 +56,8 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -84,9 +86,9 @@ chkhostname curlhost
</strip>
<protocol nonewline="yes">
POST /267 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Header1: yes
Header2: no
@@ -94,9 +96,9 @@ Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST /267 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Header1: yes
Header2: no
diff --git a/tests/data/test273 b/tests/data/test273
index bb237252..ce0be331 100644
--- a/tests/data/test273
+++ b/tests/data/test273
@@ -12,7 +12,7 @@ HTTP Digest auth
HTTP/1.1 401 Authorization Required swsclose
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
-WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
Content-Type: text/html; charset=iso-8859-1
This is not the real page
@@ -33,7 +33,7 @@ This IS the real page!
HTTP/1.1 401 Authorization Required swsclose
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
-WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 200 OK swsclose
@@ -52,6 +52,7 @@ This IS the real page!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -73,9 +74,9 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /273 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/273", response="576ae57b1db0039f8c0de43ef58e49e3"
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test275 b/tests/data/test275
index 145c163b..802c4bbc 100644
--- a/tests/data/test275
+++ b/tests/data/test275
@@ -14,6 +14,12 @@ proxytunnel
#
# Server-side
<reply>
+<connect>
+HTTP/1.1 200 OK
+Connected-fine: sure
+
+</connect>
+
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
@@ -24,7 +30,8 @@ Content-Length: 9
contents
</data>
<datacheck>
-HTTP/1.1 200 Mighty fine indeed
+HTTP/1.1 200 OK
+Connected-fine: sure
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
@@ -41,12 +48,13 @@ contents
<client>
<server>
http
+http-proxy
</server>
<name>
HTTP CONNECT with proxytunnel getting two URLs from the same host
</name>
<command>
-http://remotesite.com/we/want/that/page/275 -p -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com/we/want/that/page/275
+http://remotesite.com.275:%HTTPPORT/we/want/that/page/275 -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com.275:%HTTPPORT/we/want/that/page/275
</command>
</client>
@@ -56,21 +64,23 @@ http://remotesite.com/we/want/that/page/275 -p -x %HOSTIP:%HTTPPORT --user iam:m
<strip>
^User-Agent:.*
</strip>
-<protocol>
-CONNECT remotesite.com:80 HTTP/1.1
-Host: remotesite.com:80
+<proxy>
+CONNECT remotesite.com.275:%HTTPPORT HTTP/1.1
+Host: remotesite.com.275:%HTTPPORT
Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
Proxy-Connection: Keep-Alive
+</proxy>
+<protocol>
GET /we/want/that/page/275 HTTP/1.1
+Host: remotesite.com.275:%HTTPPORT
Authorization: Basic aWFtOm15c2VsZg==
-Host: remotesite.com
Accept: */*
GET /we/want/that/page/275 HTTP/1.1
+Host: remotesite.com.275:%HTTPPORT
Authorization: Basic aWFtOm15c2VsZg==
-Host: remotesite.com
Accept: */*
</protocol>
diff --git a/tests/data/test277 b/tests/data/test277
index 18e41985..a509b40e 100644
--- a/tests/data/test277
+++ b/tests/data/test277
@@ -37,8 +37,8 @@ http://%HOSTIP:%HTTPPORT/want/277 -F name=daniel -H "Content-Type: text/info"
^User-Agent:.*
</strip>
<strippart>
-s/^------------------------------[a-z0-9]*/------------------------------/
-s/boundary=----------------------------[a-z0-9]*/boundary=----------------------------/
+s/^--------------------------[a-z0-9]*/--------------------------/
+s/boundary=------------------------[a-z0-9]*/boundary=------------------------/
</strippart>
<protocol>
POST /want/277 HTTP/1.1
@@ -47,13 +47,13 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 145
Expect: 100-continue
-Content-Type: text/info; boundary=----------------------------
+Content-Type: text/info; boundary=------------------------
-------------------------------
+--------------------------
Content-Disposition: form-data; name="name"
daniel
---------------------------------
+----------------------------
</protocol>
</verify>
</testcase>
diff --git a/tests/data/test278 b/tests/data/test278
index 6c57822b..3112264a 100644
--- a/tests/data/test278
+++ b/tests/data/test278
@@ -39,8 +39,8 @@ http://we.want.that.site.com/278 -x http://f%61ke:@%HOSTIP:%HTTPPORT
</strip>
<protocol>
GET http://we.want.that.site.com/278 HTTP/1.1
-Proxy-Authorization: Basic ZmFrZTo=
Host: we.want.that.site.com
+Proxy-Authorization: Basic ZmFrZTo=
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test279 b/tests/data/test279
index 5a1938cb..47f8b687 100644
--- a/tests/data/test279
+++ b/tests/data/test279
@@ -40,8 +40,8 @@ http://we.want.that.site.com/279 -x http://f%61ke@%HOSTIP:%HTTPPORT
</strip>
<protocol>
GET http://we.want.that.site.com/279 HTTP/1.1
-Proxy-Authorization: Basic ZmFrZTo=
Host: we.want.that.site.com
+Proxy-Authorization: Basic ZmFrZTo=
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test280 b/tests/data/test280
index c1699937..de7534e7 100644
--- a/tests/data/test280
+++ b/tests/data/test280
@@ -12,7 +12,7 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test287 b/tests/data/test287
index 30f5834d..6772e220 100644
--- a/tests/data/test287
+++ b/tests/data/test287
@@ -11,12 +11,11 @@ proxytunnel
# Server-side
<reply>
-# this is returned first since we get no proxy-auth
-<data nocheck="yes">
+<connect nocheck="yes">
HTTP/1.1 405 Method Not Allowed swsclose
And you should ignore this data.
-</data>
+</connect>
</reply>
@@ -29,15 +28,15 @@ http
HTTP proxy CONNECT with custom User-Agent header
</name>
<command>
-http://test.remote.haxx.se:287/path/287 -H "User-Agent: looser/2007" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel
+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"
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol>
-CONNECT test.remote.haxx.se:287 HTTP/1.1
-Host: test.remote.haxx.se:287
+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
diff --git a/tests/data/test288 b/tests/data/test288
index da691451..ff4db6a4 100644
--- a/tests/data/test288
+++ b/tests/data/test288
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
# Server-side
<reply>
<data>
diff --git a/tests/data/test294 b/tests/data/test294
index 4d7f2b8e..a9752a27 100644
--- a/tests/data/test294
+++ b/tests/data/test294
@@ -13,7 +13,7 @@ ACCT
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test299 b/tests/data/test299
index a557a14c..4daaea47 100644
--- a/tests/data/test299
+++ b/tests/data/test299
@@ -43,8 +43,8 @@ FTP over HTTP proxy with user:pass not in url
</strip>
<protocol>
GET ftp://michal:aybabtu@host.com/we/want/299 HTTP/1.1
-Authorization: Basic bWljaGFsOmF5YmFidHU=
Host: host.com:21
+Authorization: Basic bWljaGFsOmF5YmFidHU=
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test3 b/tests/data/test3
index 2167b2a4..0fe27646 100644
--- a/tests/data/test3
+++ b/tests/data/test3
@@ -48,8 +48,8 @@ HTTP POST with auth and contents but with content-length set to 0
</strip>
<protocol nonewline="yes">
POST /3 HTTP/1.1
-Authorization: Basic ZmFrZTotdXNlcg==
Host: %HOSTIP:%HTTPPORT
+Authorization: Basic ZmFrZTotdXNlcg==
Accept: */*
Content-Length: 37
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test301 b/tests/data/test301
index d5974ce6..c4046957 100644
--- a/tests/data/test301
+++ b/tests/data/test301
@@ -45,8 +45,8 @@ HTTPS GET with user and password
</strip>
<protocol>
GET /301 HTTP/1.1
-Authorization: Basic ZmFrZTp1c2Vy
Host: %HOSTIP:%HTTPSPORT
+Authorization: Basic ZmFrZTp1c2Vy
Accept: */*
</protocol>
diff --git a/tests/data/test302 b/tests/data/test302
index 1223f1c3..7bb162b4 100644
--- a/tests/data/test302
+++ b/tests/data/test302
@@ -9,6 +9,17 @@ FAILURE
</keywords>
</info>
+# Server-side
+<reply>
+
+<connect nocheck="yes">
+HTTP/1.1 405 Method Not Allowed swsclose
+
+And you should ignore this data.
+</connect>
+
+</reply>
+
# Client-side
<client>
<features>
@@ -21,7 +32,7 @@ https
HTTPS GET over HTTP proxy fails
</name>
<command>
--k -U fake:user -x %HOSTIP:%HTTPPORT https://bad.fakeurl-to.test/slash/302
+-k -U fake:user -x %HOSTIP:%HTTPPORT https://bad.fakeurl-to.test:302/slash/302
</command>
</client>
diff --git a/tests/data/test31 b/tests/data/test31
index d06bc118..7cf556c0 100644
--- a/tests/data/test31
+++ b/tests/data/test31
@@ -18,6 +18,30 @@ Content-Type: text/html
Funny-head: yesyes
Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure
Set-Cookie:ismatch=this ; domain=127.0.0.1; path=/silly/
+Set-Cookie: overwrite=this ; domain=127.0.0.1; path=/overwrite/
+Set-Cookie: overwrite=this2 ; domain=127.0.0.1; path=/overwrite
+Set-Cookie: sec1value=secure1 ; domain=127.0.0.1; path=/secure1/ ; secure
+Set-Cookie: sec2value=secure2 ; domain=127.0.0.1; path=/secure2/ ; secure=
+Set-Cookie: sec3value=secure3 ; domain=127.0.0.1; path=/secure3/ ; secure=
+Set-Cookie: sec4value=secure4 ; secure=; domain=127.0.0.1; path=/secure4/ ;
+Set-Cookie: sec5value=secure5 ; secure; domain=127.0.0.1; path=/secure5/ ;
+Set-Cookie: sec6value=secure6 ; secure ; domain=127.0.0.1; path=/secure6/ ;
+Set-Cookie: sec7value=secure7 ; secure ; domain=127.0.0.1; path=/secure7/ ;
+Set-Cookie: sec8value=secure8 ; secure= ; domain=127.0.0.1; path=/secure8/ ;
+Set-Cookie: secure=very1 ; secure=; domain=127.0.0.1; path=/secure9/;
+Set-Cookie: httpo1=value1 ; domain=127.0.0.1; path=/p1/; httponly
+Set-Cookie: httpo2=value2 ; domain=127.0.0.1; path=/p2/; httponly=
+Set-Cookie: httpo3=value3 ; httponly; domain=127.0.0.1; path=/p3/;
+Set-Cookie: httpo4=value4 ; httponly=; domain=127.0.0.1; path=/p4/;
+Set-Cookie: httponly=myvalue1 ; domain=127.0.0.1; path=/p4/; httponly
+Set-Cookie: httpandsec=myvalue2 ; domain=127.0.0.1; path=/p4/; httponly; secure
+Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure
+Set-Cookie: httpandsec3=myvalue4 ; domain=127.0.0.1; path=/p4/; httponly; secure=
+Set-Cookie: httpandsec4=myvalue5 ; domain=127.0.0.1; path=/p4/; httponly=; secure=
+Set-Cookie: httpandsec5=myvalue6 ; domain=127.0.0.1; path=/p4/; secure; httponly=
+Set-Cookie: httpandsec6=myvalue7 ; domain=127.0.0.1; path=/p4/; secure=; httponly=
+Set-Cookie: httpandsec7=myvalue8 ; domain=127.0.0.1; path=/p4/; secure; httponly
+Set-Cookie: httpandsec8=myvalue9; domain=127.0.0.1; path=/p4/; secure=; httponly
Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/;
Set-Cookie:eat=this; domain=moo.foo.moo;
Set-Cookie: eat=this-too; domain=.foo.moo;
@@ -27,7 +51,12 @@ 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=.0.0.1; domain=.0.0.1; expiry=totally bad;
+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: withspaces= yes within and around ;
+Set-Cookie: withspaces2 =before equals;
+Set-Cookie: prespace= yes before;
+Set-Cookie: securewithspace=after ; secure =
boo
</data>
@@ -50,6 +79,9 @@ TZ=GMT
<command>
http://%HOSTIP:%HTTPPORT/we/want/31 -b none -c log/jar31.txt
</command>
+<precheck>
+perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}'
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -65,14 +97,41 @@ Accept: */*
</protocol>
<file name="log/jar31.txt" mode="text">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
-.127.0.0.1 TRUE /silly/ FALSE 0 ismatch this
-.127.0.0.1 TRUE / FALSE 0 partmatch present
+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 FALSE /we/want/ FALSE 2054030187 nodomain value
#HttpOnly_127.0.0.1 FALSE /silly/ FALSE 0 magic yessir
-.0.0.1 TRUE /we/want/ FALSE 0 blexp yesyes
+127.0.0.1 FALSE /we/want/ FALSE 0 blexp yesyes
+127.0.0.1 FALSE /we/want/ FALSE 0 withspaces yes within and around
+127.0.0.1 FALSE /we/want/ FALSE 0 withspaces2 before equals
+127.0.0.1 FALSE /we/want/ FALSE 0 prespace yes before
+127.0.0.1 FALSE /we/want/ TRUE 0 securewithspace after
</file>
</verify>
</testcase>
diff --git a/tests/data/test320 b/tests/data/test320
new file mode 100644
index 00000000..4b6f833a
--- /dev/null
+++ b/tests/data/test320
@@ -0,0 +1,96 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+TLS-SRP
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.0 200 OK
+Content-type: text/html
+
+
+<HTML><BODY>
+<CENTER><H1>This is <a href="http://www.gnu.org/software/gnutls">GnuTLS</a></H1></CENTER>
+
+
+<p>Session ID: <i>003030000100000001000000000000000030330001000000B062410001000000</i></p>
+<h5>If your browser supports session resuming, then you should see the same session ID, when you press the <b>reload</b> button.</h5>
+<p>Connected as user 'jsmith'.</p>
+<P>
+<TABLE border=1><TR><TD>Protocol version:</TD><TD>TLS1.2</TD></TR>
+<TR><TD>Key Exchange:</TD><TD>SRP</TD></TR>
+<TR><TD>Compression</TD><TD>NULL</TD></TR>
+<TR><TD>Cipher</TD><TD>AES-NNN-CBC</TD></TR>
+<TR><TD>MAC</TD><TD>SHA1</TD></TR>
+<TR><TD>Ciphersuite</TD><TD>SRP_SHA_AES_NNN_CBC_SHA1</TD></TR></p></TABLE>
+<hr><P>Your HTTP header was:<PRE>Host: localhost:9011
+User-Agent: curl-test-suite
+Accept: */*
+
+</PRE></P>
+</BODY></HTML>
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+httptls+srp
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+simple TLS-SRP HTTPS GET, check user in response
+ </name>
+<command>
+--insecure --tlsauthtype SRP --tlsuser jsmith --tlspassword abc -A curl-test-suite https://%HOSTIP:%HTTPTLSPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+</protocol>
+<file name="log/curl320.out" mode="text">
+HTTP/1.0 200 OK
+Content-type: text/html
+
+
+<HTML><BODY>
+<CENTER><H1>This is <a href="http://www.gnu.org/software/gnutls">GnuTLS</a></H1></CENTER>
+
+
+
+<h5>If your browser supports session resuming, then you should see the same session ID, when you press the <b>reload</b> button.</h5>
+<p>Connected as user 'jsmith'.</p>
+<P>
+<TABLE border=1><TR><TD></TD></TR>
+<TR><TD>Key Exchange:</TD><TD>SRP</TD></TR>
+<TR><TD>Compression</TD><TD>NULL</TD></TR>
+<TR><TD>Cipher</TD><TD>AES-NNN-CBC</TD></TR>
+<TR><TD>MAC</TD><TD>SHA1</TD></TR>
+<TR><TD>Ciphersuite</TD><TD>SRP_SHA_AES_NNN_CBC_SHA1</TD></TR></p></TABLE>
+<hr><P>Your HTTP header was:<PRE>Host: %HOSTIP:%HTTPTLSPORT
+User-Agent: curl-test-suite
+Accept: */*
+
+</PRE></P>
+</BODY></HTML>
+
+</file>
+<stripfile>
+s/^<p>Session ID:.*//
+s/Protocol version:.*[0-9]//
+s/GNUTLS/GnuTLS/
+s/(AES[-_])\d\d\d([-_]CBC)/$1NNN$2/
+</stripfile>
+</verify>
+
+</testcase>
diff --git a/tests/data/test321 b/tests/data/test321
new file mode 100644
index 00000000..c6b208b2
--- /dev/null
+++ b/tests/data/test321
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+TLS-SRP
+FAILURE
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+httptls+srp
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+TLS-SRP with bad username and password
+ </name>
+<command>
+--insecure --tlsauthtype SRP --tlsuser baduser --tlspassword badpass https://%HOSTIP:%HTTPTLSPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+35
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test322 b/tests/data/test322
new file mode 100644
index 00000000..f7f82790
--- /dev/null
+++ b/tests/data/test322
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+TLS-SRP
+FAILURE
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+httptls+srp
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+TLS-SRP with bad password
+ </name>
+<command>
+--insecure --tlsauthtype SRP --tlsuser jsmith --tlspassword badpass https://%HOSTIP:%HTTPTLSPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+35
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test323 b/tests/data/test323
new file mode 100644
index 00000000..6439b4d4
--- /dev/null
+++ b/tests/data/test323
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+TLS-SRP
+FAILURE
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+https
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+TLS-SRP to non-TLS-SRP server
+ </name>
+<command>
+--insecure --tlsauthtype SRP --tlsuser jsmith --tlspassword badpass https://%HOSTIP:%HTTPSPORT/want/323
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+35
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test324 b/tests/data/test324
new file mode 100644
index 00000000..b58d940e
--- /dev/null
+++ b/tests/data/test324
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+TLS-SRP
+FAILURE
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+httptls+srp
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+TLS-SRP with server cert checking
+ </name>
+<command> # no --insecure
+--tlsauthtype SRP --tlsuser jsmith --tlspassword abc https://%HOSTIP:%HTTPTLSPORT/want/323
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+51
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test325 b/tests/data/test325
new file mode 100644
index 00000000..6d5898d4
--- /dev/null
+++ b/tests/data/test325
@@ -0,0 +1,66 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+--proto-redir
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 301 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 7
+Location: http://%HOSTIP:%HTTPPORT/325
+
+MooMoo
+</data>
+<datacheck>
+HTTP/1.1 301 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 7
+Location: http://%HOSTIP:%HTTPPORT/325
+
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+SSL
+</features>
+<server>
+https
+</server>
+ <name>
+HTTPS with attempted redirect to denied HTTP
+ </name>
+ <command>
+-k https://%HOSTIP:%HTTPSPORT/325 --proto-redir -http --location
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /325 HTTP/1.1
+Host: %HOSTIP:%HTTPSPORT
+Accept: */*
+
+</protocol>
+# 1 - Protocol http not supported or disabled in libcurl
+<errorcode>
+1
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test33 b/tests/data/test33
index 82cf80b3..9f7c31fb 100644
--- a/tests/data/test33
+++ b/tests/data/test33
@@ -10,7 +10,7 @@ Content-Range
# Server-side
<reply>
<data>
-HTTP/1.1 OK swsclose
+HTTP/1.1 200 OK swsclose
</data>
</reply>
@@ -47,9 +47,9 @@ http://%HOSTIP:%HTTPPORT/33 -Tlog/test33.txt -C 50
</strip>
<protocol>
PUT /33 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Content-Range: bytes 50-99/100
User-Agent: curl/7.6 (sparc-sun-solaris2.7) libcurl 7.6-pre4 (SSL 0.9.6) (krb4 enabled)
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 50
Expect: 100-continue
diff --git a/tests/data/test350 b/tests/data/test350
index 9c22d307..6cb53fa1 100644
--- a/tests/data/test350
+++ b/tests/data/test350
@@ -11,7 +11,7 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test351 b/tests/data/test351
index 5d44a647..219677f7 100644
--- a/tests/data/test351
+++ b/tests/data/test351
@@ -11,7 +11,7 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test352 b/tests/data/test352
index d8688944..5f498a23 100644
--- a/tests/data/test352
+++ b/tests/data/test352
@@ -11,7 +11,7 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test353 b/tests/data/test353
index 417b8c3e..1adee379 100644
--- a/tests/data/test353
+++ b/tests/data/test353
@@ -11,7 +11,7 @@ LIST
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test38 b/tests/data/test38
index 75155866..848150a3 100644
--- a/tests/data/test38
+++ b/tests/data/test38
@@ -46,8 +46,8 @@ download on.
</strip>
<protocol>
GET /want/38 HTTP/1.1
-Range: bytes=78-
Host: %HOSTIP:%HTTPPORT
+Range: bytes=78-
Accept: */*
</protocol>
diff --git a/tests/data/test39 b/tests/data/test39
index 2c8da336..1867b608 100644
--- a/tests/data/test39
+++ b/tests/data/test39
@@ -8,11 +8,11 @@ HTTP FORMPOST
# Server-side
<reply>
<data>
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
Content-Length: 10
-
+
blablabla
</data>
</reply>
@@ -26,7 +26,7 @@ http
HTTP RFC1867-type formposting with filename= and type=
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/39 -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@log/test39.txt;type=moo/foobar;filename=fakerfile" -F file2=@log/test39.txt
+http://%HOSTIP:%HTTPPORT/we/want/39 -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@log/test39.txt;type=moo/foobar;filename=fakerfile" -F file2=@log/test39.txt -F "file3=@\"log/test39.txt\";type=mo/foo;filename=\"f\\\\\\\\ak\\\\\\er,\\\\an\\d;.t\\\"xt\"" -F 'file4=@"log/test39.txt"; filename="A\\AA\"\"\\\"ZZZ"'
</command>
# We create this file before the command is invoked!
<file name="log/test39.txt">
@@ -47,7 +47,7 @@ POST /we/want/39 HTTP/1.1
User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
Accept: */*
-Content-Length: 810
+Content-Length: 1184
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32
@@ -85,6 +85,24 @@ This is a bar foo
bar
foo
+------------------------------24e78000bd32
+Content-Disposition: form-data; name="file3"; filename="f\\\\ak\\\\er,\\an\\d;.t\"xt"
+Content-Type: mo/foo
+
+foo bar
+This is a bar foo
+bar
+foo
+
+------------------------------24e78000bd32
+Content-Disposition: form-data; name="file4"; filename="A\\AA\"\"\\\"ZZZ"
+Content-Type: text/plain
+
+foo bar
+This is a bar foo
+bar
+foo
+
------------------------------24e78000bd32--
</protocol>
</verify>
diff --git a/tests/data/test4 b/tests/data/test4
index ce6bfc8f..df69d327 100644
--- a/tests/data/test4
+++ b/tests/data/test4
@@ -30,7 +30,7 @@ http
Replaced internal and added custom HTTP headers
</name>
<command>
- -H "extra-header: here" -H "Accept: replaced" http://%HOSTIP:%HTTPPORT/4
+ -H "extra-header: here" -H "Accept: replaced" -H "X-Custom-Header;" -H "X-Test: foo; " -H "X-Test:" -H "X-Test2: foo;" -H "X-Test3: " -H "X-Test4; " -H "X-Test5;ignored" http://%HOSTIP:%HTTPPORT/4
</command>
</client>
@@ -45,6 +45,9 @@ GET /4 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
extra-header: here
Accept: replaced
+X-Custom-Header:
+X-Test: foo;
+X-Test2: foo;
</protocol>
</verify>
diff --git a/tests/data/test40 b/tests/data/test40
index b56ff758..6be0d161 100644
--- a/tests/data/test40
+++ b/tests/data/test40
@@ -17,11 +17,11 @@ Connection: close
</data>
<data2>
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body
</data2>
<datacheck>
@@ -30,11 +30,11 @@ Location: ../moo.html/?name=d a niel&testcase=/400002
Date: Thu, 09 Nov 2010 14:49:00 GMT
Connection: close
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body
</datacheck>
</reply>
diff --git a/tests/data/test42 b/tests/data/test42
index ec674260..e303f3a2 100644
--- a/tests/data/test42
+++ b/tests/data/test42
@@ -17,11 +17,11 @@ Connection: close
</data>
<data2>
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body
</data2>
<datacheck>
@@ -30,11 +30,11 @@ Location: ../m o o.html/420002
Date: Thu, 09 Nov 2010 14:49:00 GMT
Connection: close
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body
</datacheck>
</reply>
diff --git a/tests/data/test46 b/tests/data/test46
index d0d19303..b6f8f83e 100644
--- a/tests/data/test46
+++ b/tests/data/test46
@@ -11,18 +11,18 @@ cookiejar
# Server-side
<reply>
<data>
-HTTP/1.1 200 OK
-Server: Microsoft-IIS/4.0
-Date: Tue, 25 Sep 2001 19:37:44 GMT
-Content-Type: text/html
-Set-Cookie: ckyPersistent=permanent; expires=Fri, 02-Feb-2035 11:56:27 GMT; path=/
-Set-Cookie: ckySession=temporary; path=/
-Set-Cookie: ASPSESSIONIDQGGQQSJJ=GKNBDIFAAOFDPDAIEAKDIBKE; path=/
-Set-Cookie: justaname=; path=/;
-Set-Cookie: simplyhuge=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
-Cache-control: private
+HTTP/1.1 200 OK
+Server: Microsoft-IIS/4.0
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Content-Type: text/html
+Set-Cookie: ckyPersistent=permanent; expires=Fri, 02-Feb-2035 11:56:27 GMT; path=/
+Set-Cookie: ckySession=temporary; path=/
+Set-Cookie: ASPSESSIONIDQGGQQSJJ=GKNBDIFAAOFDPDAIEAKDIBKE; path=/
+Set-Cookie: justaname=; path=/;
+Set-Cookie: simplyhuge=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
+Cache-control: private
Content-Length: 41
-
+
This server reply is for testing cookies
</data>
</reply>
@@ -46,14 +46,14 @@ TZ=GMT
</command>
<file name="log/injar46">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# This is generated by libcurl! Do not edit.
www.fake.come FALSE / FALSE 1022144953 cookiecliente si
www.loser.com FALSE / FALSE 1139150993 UID 99
%HOSTIP FALSE / FALSE 1439150993 mooo indeed
-#HttpOnly_%HOSTIP FALSE / FALSE 1439150993 mooo2 indeed2
-%HOSTIP FALSE / FALSE 0 empty
+#HttpOnly_%HOSTIP FALSE /want FALSE 1439150993 mooo2 indeed2
+%HOSTIP FALSE /want FALSE 0 empty
</file>
</client>
@@ -71,14 +71,14 @@ Cookie: empty=; mooo2=indeed2; mooo=indeed
</protocol>
<file name="log/jar46" mode="text">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
www.fake.come FALSE / FALSE 1022144953 cookiecliente si
www.loser.com FALSE / FALSE 1139150993 UID 99
%HOSTIP FALSE / FALSE 1439150993 mooo indeed
-#HttpOnly_%HOSTIP FALSE / FALSE 1439150993 mooo2 indeed2
-%HOSTIP FALSE / FALSE 0 empty
+#HttpOnly_%HOSTIP FALSE /want FALSE 1439150993 mooo2 indeed2
+%HOSTIP FALSE /want FALSE 0 empty
%HOSTIP FALSE / FALSE 2054030187 ckyPersistent permanent
%HOSTIP FALSE / FALSE 0 ckySession temporary
%HOSTIP FALSE / FALSE 0 ASPSESSIONIDQGGQQSJJ GKNBDIFAAOFDPDAIEAKDIBKE
diff --git a/tests/data/test48 b/tests/data/test48
index e092b41e..7ee05ad3 100644
--- a/tests/data/test48
+++ b/tests/data/test48
@@ -9,10 +9,12 @@ HTTP HEAD
#
# Server-side
<reply>
+<servercmd>
+connection-monitor
+</servercmd>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
</data>
</reply>
@@ -27,7 +29,7 @@ http
HTTP with -d and -G and -I
</name>
<command>
--d "foo=moo&moo=poo" http://%HOSTIP:%HTTPPORT/48 -G -I
+-d "foo=moo&moo=poo" http://%HOSTIP:%HTTPPORT/48 -G -I http://%HOSTIP:%HTTPPORT/48
</command>
</client>
@@ -42,6 +44,11 @@ HEAD /48?foo=moo&moo=poo HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
+HEAD /48?foo=moo&moo=poo HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+[DISCONNECT]
</protocol>
</verify>
</testcase>
diff --git a/tests/data/test5 b/tests/data/test5
index 7a0ebd73..b62f1a12 100644
--- a/tests/data/test5
+++ b/tests/data/test5
@@ -29,7 +29,7 @@ http
HTTP over proxy
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/5 -x %HOSTIP:%HTTPPORT
+http://%HOSTIP:%HTTPPORT/we/want/that/page/5#5 -x %HOSTIP:%HTTPPORT
</command>
</client>
diff --git a/tests/data/test500 b/tests/data/test500
index f9b17f37..faf3d727 100644
--- a/tests/data/test500
+++ b/tests/data/test500
@@ -8,18 +8,18 @@ HTTP GET
#
# Server-side
<reply name="1">
-<data mode="text">
-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
-ETag: "21025-dc7-39462498"
-Accept-Ranges: bytes
-Content-Length: 6
-Connection: close
-Content-Type: text/html
-Funny-head: yesyes
-
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
-foo-
</data>
</reply>
@@ -45,7 +45,7 @@ http://%HOSTIP:%HTTPPORT/500 log/ip500
#
# Verify data after the test has been "shot"
<verify>
-<file name="log/ip500" mode="text">
+<file name="log/ip500">
IP: %HOSTIP
</file>
<protocol>
diff --git a/tests/data/test502 b/tests/data/test502
index f73a4eb3..f8d776b6 100644
--- a/tests/data/test502
+++ b/tests/data/test502
@@ -7,7 +7,7 @@ FILE
#
# Server-side
<reply>
-<data mode="text">
+<data>
foo
bar swsclose
bar
diff --git a/tests/data/test503 b/tests/data/test503
index 3f29d8f6..e8dc21e8 100644
--- a/tests/data/test503
+++ b/tests/data/test503
@@ -13,6 +13,13 @@ multi
# Server-side
<reply>
+<servercmd>
+connection-monitor
+</servercmd>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+
+</connect>
<data>
HTTP/1.1 200 OK swsclose
Date: Thu, 09 Nov 2010 14:49:00 GMT
@@ -37,6 +44,7 @@ ETag: "21025-dc7-39462498"
<client>
<server>
http
+http-proxy
</server>
# tool is what to use instead of 'curl'
<tool>
@@ -47,7 +55,7 @@ lib503
simple multi http:// through proxytunnel with authentication info
</name>
<command>
-http://%HOSTIP:%HTTPSPORT/503 %HOSTIP:%HTTPPORT
+http://machine.503:%HTTPPORT/503 %HOSTIP:%PROXYPORT
</command>
<file name="log/test503.txt">
foo
@@ -60,17 +68,20 @@ moo
# Verify data after the test has been "shot"
<verify>
-<protocol>
-CONNECT %HOSTIP:%HTTPSPORT HTTP/1.1
-Host: %HOSTIP:%HTTPSPORT
+<proxy>
+CONNECT machine.503:%HTTPPORT HTTP/1.1
+Host: machine.503:%HTTPPORT
Proxy-Authorization: Basic dGVzdDppbmc=
Proxy-Connection: Keep-Alive
+</proxy>
+<protocol>
GET /503 HTTP/1.1
+Host: machine.503:%HTTPPORT
Authorization: Basic dGVzdDppbmc=
-Host: %HOSTIP:%HTTPSPORT
Accept: */*
+[DISCONNECT]
</protocol>
</verify>
</testcase>
diff --git a/tests/data/test504 b/tests/data/test504
index 573ab51c..2d3a3dd0 100644
--- a/tests/data/test504
+++ b/tests/data/test504
@@ -35,9 +35,10 @@ http://%HOSTIP:%HTTPSPORT/504 %HOSTIP:55555
</client>
# Verify data after the test has been "shot"
+# TEST_ERR_SUCCESS is errorcode 120
<verify>
<errorcode>
-100
+120
</errorcode>
</verify>
</testcase>
diff --git a/tests/data/test505 b/tests/data/test505
index d9e0fd29..a5e5d31f 100644
--- a/tests/data/test505
+++ b/tests/data/test505
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
</reply>
diff --git a/tests/data/test506 b/tests/data/test506
index 64eb6c9c..07bbdeaf 100644
--- a/tests/data/test506
+++ b/tests/data/test506
@@ -72,7 +72,7 @@ http://%HOSTIP:%HTTPPORT/506
# Verify data after the test has been "shot"
<verify>
-<stdout mode="text">
+<stdout>
GLOBAL_INIT
SHARE_INIT
CURLSHOPT_LOCKFUNC
@@ -80,87 +80,131 @@ CURLSHOPT_UNLOCKFUNC
CURLSHOPT_USERDATA
CURL_LOCK_DATA_COOKIE
CURL_LOCK_DATA_DNS
-*** run 1
CURLOPT_SHARE
lock: share [Pigs in space]: 0
unlock: share [Pigs in space]: 1
-PERFORM
-lock: dns [Pigs in space]: 2
-unlock: dns [Pigs in space]: 3
-lock: dns [Pigs in space]: 4
-unlock: dns [Pigs in space]: 5
+CURLOPT_COOKIELIST injected_and_clobbered
+lock: cookie [Pigs in space]: 2
+unlock: cookie [Pigs in space]: 3
+CURLOPT_COOKIELIST ALL
+lock: cookie [Pigs in space]: 4
+unlock: cookie [Pigs in space]: 5
+CURLOPT_COOKIELIST session
lock: cookie [Pigs in space]: 6
unlock: cookie [Pigs in space]: 7
+CURLOPT_COOKIELIST injected
lock: cookie [Pigs in space]: 8
unlock: cookie [Pigs in space]: 9
+CURLOPT_COOKIELIST SESS
lock: cookie [Pigs in space]: 10
unlock: cookie [Pigs in space]: 11
+CLEANUP
lock: cookie [Pigs in space]: 12
unlock: cookie [Pigs in space]: 13
-run 1: set cookie 1, 2 and 3
-lock: dns [Pigs in space]: 14
-unlock: dns [Pigs in space]: 15
-CLEANUP
-lock: dns [Pigs in space]: 16
-unlock: dns [Pigs in space]: 17
-lock: cookie [Pigs in space]: 18
-unlock: cookie [Pigs in space]: 19
-lock: share [Pigs in space]: 20
-unlock: share [Pigs in space]: 21
-*** run 2
+lock: share [Pigs in space]: 14
+unlock: share [Pigs in space]: 15
+*** run 1
CURLOPT_SHARE
-lock: share [Pigs in space]: 22
-unlock: share [Pigs in space]: 23
+lock: share [Pigs in space]: 16
+unlock: share [Pigs in space]: 17
PERFORM
-lock: dns [Pigs in space]: 24
-unlock: dns [Pigs in space]: 25
+lock: dns [Pigs in space]: 18
+unlock: dns [Pigs in space]: 19
+lock: dns [Pigs in space]: 20
+unlock: dns [Pigs in space]: 21
+lock: cookie [Pigs in space]: 22
+unlock: cookie [Pigs in space]: 23
+lock: cookie [Pigs in space]: 24
+unlock: cookie [Pigs in space]: 25
lock: cookie [Pigs in space]: 26
unlock: cookie [Pigs in space]: 27
lock: cookie [Pigs in space]: 28
unlock: cookie [Pigs in space]: 29
-lock: cookie [Pigs in space]: 30
-unlock: cookie [Pigs in space]: 31
-run 2: set cookie 4 and 5
-lock: dns [Pigs in space]: 32
-unlock: dns [Pigs in space]: 33
+run 1: set cookie 1, 2 and 3
+lock: dns [Pigs in space]: 30
+unlock: dns [Pigs in space]: 31
CLEANUP
-lock: dns [Pigs in space]: 34
-unlock: dns [Pigs in space]: 35
-lock: cookie [Pigs in space]: 36
-unlock: cookie [Pigs in space]: 37
-lock: share [Pigs in space]: 38
-unlock: share [Pigs in space]: 39
-*** run 3
+lock: cookie [Pigs in space]: 32
+unlock: cookie [Pigs in space]: 33
+lock: share [Pigs in space]: 34
+unlock: share [Pigs in space]: 35
+*** run 2
CURLOPT_SHARE
-lock: share [Pigs in space]: 40
-unlock: share [Pigs in space]: 41
-CURLOPT_COOKIEJAR
+lock: share [Pigs in space]: 36
+unlock: share [Pigs in space]: 37
PERFORM
-lock: dns [Pigs in space]: 42
-unlock: dns [Pigs in space]: 43
+lock: dns [Pigs in space]: 38
+unlock: dns [Pigs in space]: 39
+lock: cookie [Pigs in space]: 40
+unlock: cookie [Pigs in space]: 41
+lock: cookie [Pigs in space]: 42
+unlock: cookie [Pigs in space]: 43
lock: cookie [Pigs in space]: 44
unlock: cookie [Pigs in space]: 45
-lock: cookie [Pigs in space]: 46
-unlock: cookie [Pigs in space]: 47
+run 2: set cookie 4 and 5
+lock: dns [Pigs in space]: 46
+unlock: dns [Pigs in space]: 47
+CLEANUP
lock: cookie [Pigs in space]: 48
unlock: cookie [Pigs in space]: 49
-run 3: overwrite cookie 1 and 4
-lock: dns [Pigs in space]: 50
-unlock: dns [Pigs in space]: 51
-try SHARE_CLEANUP...
+lock: share [Pigs in space]: 50
+unlock: share [Pigs in space]: 51
+*** run 3
+CURLOPT_SHARE
lock: share [Pigs in space]: 52
unlock: share [Pigs in space]: 53
+CURLOPT_COOKIEJAR
+CURLOPT_COOKIELIST FLUSH
+lock: cookie [Pigs in space]: 54
+unlock: cookie [Pigs in space]: 55
+PERFORM
+lock: dns [Pigs in space]: 56
+unlock: dns [Pigs in space]: 57
+lock: cookie [Pigs in space]: 58
+unlock: cookie [Pigs in space]: 59
+lock: cookie [Pigs in space]: 60
+unlock: cookie [Pigs in space]: 61
+lock: cookie [Pigs in space]: 62
+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
SHARE_CLEANUP failed, correct
CLEANUP
-lock: dns [Pigs in space]: 54
-unlock: dns [Pigs in space]: 55
-lock: cookie [Pigs in space]: 56
-unlock: cookie [Pigs in space]: 57
-lock: share [Pigs in space]: 58
-unlock: share [Pigs in space]: 59
+lock: cookie [Pigs in space]: 78
+unlock: cookie [Pigs in space]: 79
+lock: share [Pigs in space]: 80
+unlock: share [Pigs in space]: 81
SHARE_CLEANUP
-lock: share [Pigs in space]: 60
-unlock: share [Pigs in space]: 61
+lock: share [Pigs in space]: 82
+unlock: share [Pigs in space]: 83
GLOBAL_CLEANUP
</stdout>
<stderr>
@@ -168,9 +212,10 @@ http://%HOSTIP:%HTTPPORT/506
</stderr>
<file name="log/jar506" mode="text">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
+.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
diff --git a/tests/data/test508 b/tests/data/test508
index 5cd4b8c3..2b8a2d52 100644
--- a/tests/data/test508
+++ b/tests/data/test508
@@ -1,14 +1,21 @@
<testcase>
+<info>
+<keywords>
+HTTP
+POST
+POST callback
+</keywords>
+</info>
#
# Server-side
<reply>
-<data mode="text">
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake swsclose
-Connection: close
-Content-Type: text/html
-
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake swsclose
+Connection: close
+Content-Type: text/html
+
hello
</data>
</reply>
diff --git a/tests/data/test509 b/tests/data/test509
new file mode 100644
index 00000000..5de1599e
--- /dev/null
+++ b/tests/data/test509
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+memory callbacks
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib509
+</tool>
+
+<name>
+initialization with memory callbacks and actual usage
+</name>
+<command>
+nothing
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+seen custom_calloc()
+seen custom_malloc()
+seen custom_realloc()
+seen custom_free()
+</stdout>
+</verify>
+
+</testcase>
diff --git a/tests/data/test510 b/tests/data/test510
index 8313f51c..5ba0a7fe 100644
--- a/tests/data/test510
+++ b/tests/data/test510
@@ -1,14 +1,21 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
#
# Server-side
<reply>
-<data mode="text">
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake swsclose
-Connection: close
-Content-Type: text/html
-
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake swsclose
+Connection: close
+Content-Type: text/html
+
hello
</data>
</reply>
diff --git a/tests/data/test511 b/tests/data/test511
index 81fe657f..72b79938 100644
--- a/tests/data/test511
+++ b/tests/data/test511
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
#
# Server-side
<reply>
diff --git a/tests/data/test512 b/tests/data/test512
index 516a5038..d259f40d 100644
--- a/tests/data/test512
+++ b/tests/data/test512
@@ -1,8 +1,15 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
#
# Server-side
<reply>
-<data mode="text">
+<data>
HTTP/1.1 200 OK swsclose
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: yes
diff --git a/tests/data/test513 b/tests/data/test513
index 7d8e69b8..00e0f77e 100644
--- a/tests/data/test513
+++ b/tests/data/test513
@@ -1,4 +1,11 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
#
# Server-side
<reply>
diff --git a/tests/data/test514 b/tests/data/test514
index bd6da02d..ca37a5d6 100644
--- a/tests/data/test514
+++ b/tests/data/test514
@@ -1,19 +1,25 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP HEAD
+</keywords>
+</info>
#
# Server-side
<reply>
-<data mode="text">
-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
-ETag: "21025-dc7-39462498"
-Accept-Ranges: bytes
-Content-Length: 6
-Connection: close
-Content-Type: text/html
-Funny-head: yesyes
-
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
</data>
</reply>
diff --git a/tests/data/test515 b/tests/data/test515
index 9de0ac2b..526f1e13 100644
--- a/tests/data/test515
+++ b/tests/data/test515
@@ -1,13 +1,19 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
#
# Server-side
<reply>
-<data mode="text">
-HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 3
-
+<data>
+HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 3
+
OK
</data>
</reply>
diff --git a/tests/data/test516 b/tests/data/test516
index 22c39dc5..9bc175bd 100644
--- a/tests/data/test516
+++ b/tests/data/test516
@@ -1,13 +1,20 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
#
# Server-side
<reply>
-<data mode="text">
-HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 3
-
+<data>
+HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 3
+
OK
</data>
</reply>
diff --git a/tests/data/test517 b/tests/data/test517
index d7b91842..c81a45e0 100644
--- a/tests/data/test517
+++ b/tests/data/test517
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+getdate
+unittest
+</keywords>
+</info>
#
# Server-side
<reply>
@@ -25,7 +31,7 @@ nothing
#
# Verify data after the test has been "shot"
<verify>
-<stdout mode="text">
+<stdout>
0: Sun, 06 Nov 1994 08:49:37 GMT => 784111777
1: Sunday, 06-Nov-94 08:49:37 GMT => 784111777
2: Sun Nov 6 08:49:37 1994 => 784111777
@@ -104,12 +110,18 @@ nothing
75: Thu, 12-Aug-2007 20:61:99999999999 GMT => -1
76: IAintNoDateFool => -1
77: Thu Apr 18 22:50 2007 GMT => 1176936600
+78: 20110623 12:34:56 => 1308832496
+79: 20110632 12:34:56 => -1
+80: 20110623 56:34:56 => -1
+81: 20111323 12:34:56 => -1
+82: 20110623 12:34:79 => -1
+83: Wed, 31 Dec 2008 23:59:60 GMT => 1230768000
</stdout>
-# This test case previously testes an overflow case ("2094 Nov 6 =>
+# This test case previously tested an overflow case ("2094 Nov 6 =>
# 2147483647") for 32bit time_t, but since some systems have 64bit time_t and
# handles this (returning 3939840000), and some 64bit-time_t systems don't
-# handle this and returns -1 for this, it turned very tricky to write a fine
+# handle this and return -1 for this, it turned very tricky to write a fine
# test case and thus it is now removed until we have a way to write test cases
# for this kind of things.
diff --git a/tests/data/test518 b/tests/data/test518
index 8e52615c..0c881476 100644
--- a/tests/data/test518
+++ b/tests/data/test518
@@ -1,19 +1,26 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
#
# Server-side
<reply>
<data>
-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
-ETag: "21025-dc7-39462498"
-Accept-Ranges: bytes
-Content-Length: 6
-Connection: close
-Content-Type: text/html
-Funny-head: yesyes
-
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
-foo-
</data>
</reply>
diff --git a/tests/data/test519 b/tests/data/test519
index c6bc8615..97605606 100644
--- a/tests/data/test519
+++ b/tests/data/test519
@@ -1,35 +1,42 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
#
# Server-side
<reply>
-<data mode="text">
-HTTP/1.1 200 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 8
-
+<data>
+HTTP/1.1 200 OK swsbounce
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 8
+
content
</data>
<data1>
-HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 9
-
+HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+
content2
</data1>
<datacheck>
-HTTP/1.1 200 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 8
-
+HTTP/1.1 200 OK swsbounce
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 8
+
content
-HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 9
-
+HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+
content2
</datacheck>
</reply>
@@ -57,13 +64,13 @@ http://%HOSTIP:%HTTPPORT/519
<verify>
<protocol>
GET /519 HTTP/1.1
-Authorization: Basic bW9uc3Rlcjp1bmRlcmJlZA==
Host: %HOSTIP:%HTTPPORT
+Authorization: Basic bW9uc3Rlcjp1bmRlcmJlZA==
Accept: */*
GET /519 HTTP/1.1
-Authorization: Basic YW5vdGhlcm1vbnN0ZXI6aW53YXJkcm9iZQ==
Host: %HOSTIP:%HTTPPORT
+Authorization: Basic YW5vdGhlcm1vbnN0ZXI6aW53YXJkcm9iZQ==
Accept: */*
</protocol>
diff --git a/tests/data/test520 b/tests/data/test520
index 0938b580..755caebe 100644
--- a/tests/data/test520
+++ b/tests/data/test520
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
#
# Server-side
<reply>
diff --git a/tests/data/test521 b/tests/data/test521
index 9bc5501f..90f51b38 100644
--- a/tests/data/test521
+++ b/tests/data/test521
@@ -11,7 +11,7 @@ CURLOPT_PORT
<reply>
# When doing LIST, we get the default list output hard-coded in the test
# FTP server
-<datacheck>
+<datacheck mode="text">
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
diff --git a/tests/data/test522 b/tests/data/test522
index 4ac46ff7..89a0dbf5 100644
--- a/tests/data/test522
+++ b/tests/data/test522
@@ -11,14 +11,14 @@ CURLOPT_PORT
# Server-side
<reply>
<data nocheck="yes">
-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
-ETag: "21025-dc7-39462498"
-Accept-Ranges: bytes
-Content-Length: 6
-
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+
hello
</data>
</reply>
@@ -48,12 +48,12 @@ http://%HOSTIP/522 %HTTPPORT
</strip>
<protocol>
GET /522 HTTP/1.1
-Authorization: Basic eHh4Onl5eQ==
Host: %HOSTIP:%HTTPPORT
+Authorization: Basic eHh4Onl5eQ==
Accept: */*
</protocol>
-<stdout mode="text">
+<stdout>
hello
</stdout>
</verify>
diff --git a/tests/data/test523 b/tests/data/test523
index 6c1efbd5..9abe0ed2 100644
--- a/tests/data/test523
+++ b/tests/data/test523
@@ -13,14 +13,14 @@ CURLOPT_PROXY
# Server-side
<reply>
<data nocheck="yes">
-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"
-Accept-Ranges: bytes
-Content-Length: 6
-
+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"
+Accept-Ranges: bytes
+Content-Length: 6
+
hello
</data>
</reply>
@@ -39,7 +39,7 @@ HTTP GET with proxy and CURLOPT_PORT
</name>
# first URL then proxy
<command>
-http://www.haxx.se:999/523 http://%HOSTIP:%HTTPPORT
+http://www.example.com:999/523 http://%HOSTIP:%HTTPPORT
</command>
</client>
@@ -50,14 +50,14 @@ http://www.haxx.se:999/523 http://%HOSTIP:%HTTPPORT
^User-Agent:.*
</strip>
<protocol>
-GET HTTP://www.haxx.se:19999/523 HTTP/1.1
+GET HTTP://www.example.com:19999/523 HTTP/1.1
+Host: www.example.com:19999
Authorization: Basic eHh4Onl5eQ==
-Host: www.haxx.se:19999
Accept: */*
Proxy-Connection: Keep-Alive
</protocol>
-<stdout mode="text">
+<stdout>
hello
</stdout>
</verify>
diff --git a/tests/data/test528 b/tests/data/test528
index 0a55fd3c..1d2e415a 100644
--- a/tests/data/test528
+++ b/tests/data/test528
@@ -10,11 +10,11 @@ multi
# Server-side
<reply>
<data>
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 47
-
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
file contents should appear once for each file
</data>
<datacheck>
diff --git a/tests/data/test53 b/tests/data/test53
index 0ced2d23..679a4fa8 100644
--- a/tests/data/test53
+++ b/tests/data/test53
@@ -9,13 +9,13 @@ cookies
# Server-side
<reply>
<data>
-HTTP/1.1 200 OK
-Server: Microsoft-IIS/4.0
-Date: Tue, 25 Sep 2001 19:37:44 GMT
-Content-Type: text/html
-Connection: close
+HTTP/1.1 200 OK
+Server: Microsoft-IIS/4.0
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Content-Type: text/html
+Connection: close
Content-Length: 21
-
+
This server says moo
</data>
</reply>
diff --git a/tests/data/test530 b/tests/data/test530
index 359d04cf..40182e29 100644
--- a/tests/data/test530
+++ b/tests/data/test530
@@ -2,7 +2,7 @@
<info>
<keywords>
HTTP
-Pipelining
+pipelining
multi
</keywords>
</info>
@@ -10,35 +10,35 @@ multi
# Server-side
<reply>
<data1>
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 47
-
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
file contents should appear once for each file
</data1>
<data2>
-HTTP/1.1 200 OK
+HTTP/1.1 200 OK
</data2>
<data3>
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Thu, 09 Nov 2010 14:49:00 GMT
</data3>
<data4>
-Server: test-server/fake
-Content-Length: 47
-
+Server: test-server/fake
+Content-Length: 47
+
file contents should appear once for each file
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 47
-
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
file contents should appear once for each file
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 47
-
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
file contents should appear once for each file
</data4>
</reply>
diff --git a/tests/data/test535 b/tests/data/test535
index 85515a1b..6837d2a6 100644
--- a/tests/data/test535
+++ b/tests/data/test535
@@ -8,23 +8,23 @@ multi
</info>
<reply>
-<data mode="text">
-HTTP/1.1 404 Badness
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-ETag: "21025-dc7-39462498"
-Content-Length: 6
-Content-Type: text/html
-Funny-head: yesyes
-
+<data>
+HTTP/1.1 404 Badness
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+ETag: "21025-dc7-39462498"
+Content-Length: 6
+Content-Type: text/html
+Funny-head: yesyes
+
hejsan
</data>
<data1>
-HTTP/1.1 200 Fine
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Content-Length: 13
-Connection: close
-Content-Type: text/html
-
+HTTP/1.1 200 Fine
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 13
+Connection: close
+Content-Type: text/html
+
fine content
</data1>
diff --git a/tests/data/test536 b/tests/data/test536
index 334c07f0..51ac9716 100644
--- a/tests/data/test536
+++ b/tests/data/test536
@@ -1,22 +1,31 @@
<testcase>
-<reply>
-<data mode="text">
-HTTP/1.1 404 Badness
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-ETag: "21025-dc7-39462498"
-Content-Length: 6
-Content-Type: text/html
-Funny-head: yesyes
+<info>
+<keywords>
+HTTP
+HTTP GET
+pipelining
+multi
+</keywords>
+</info>
+<reply>
+<data>
+HTTP/1.1 404 Badness
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+ETag: "21025-dc7-39462498"
+Content-Length: 6
+Content-Type: text/html
+Funny-head: yesyes
+
hejsan
</data>
<data1>
-HTTP/1.1 200 Fine
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Content-Length: 13
-Connection: close
-Content-Type: text/html
-
+HTTP/1.1 200 Fine
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 13
+Connection: close
+Content-Type: text/html
+
fine content
</data1>
diff --git a/tests/data/test537 b/tests/data/test537
index ce66c409..14e285f2 100644
--- a/tests/data/test537
+++ b/tests/data/test537
@@ -1,19 +1,26 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
#
# Server-side
<reply>
<data>
-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
-ETag: "21025-dc7-39462498"
-Accept-Ranges: bytes
-Content-Length: 6
-Connection: close
-Content-Type: text/html
-Funny-head: yesyes
-
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
-foo-
</data>
</reply>
diff --git a/tests/data/test538 b/tests/data/test538
index f33b2a65..d2fecd35 100644
--- a/tests/data/test538
+++ b/tests/data/test538
@@ -32,11 +32,10 @@ ftp://%HOSTIP:%FTPPORT/538
</client>
# Verify data after the test has been "shot"
+# TEST_ERR_SUCCESS is errorcode 120
<verify>
-# ok, the error code here is supposed to be 100 for the fine case since
-# that's just how lib504.c is written
<errorcode>
-100
+120
</errorcode>
<protocol>
USER anonymous
diff --git a/tests/data/test539 b/tests/data/test539
index 2406c547..eaa64d51 100644
--- a/tests/data/test539
+++ b/tests/data/test539
@@ -1,12 +1,18 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
#
# Server-side
<reply>
-<data mode="text">
+<data>
file contents
</data>
-<datacheck>
+<datacheck mode="text">
file contents
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
diff --git a/tests/data/test540 b/tests/data/test540
index 7c5b9a86..8decaea9 100644
--- a/tests/data/test540
+++ b/tests/data/test540
@@ -58,13 +58,14 @@ http
lib540
</tool>
<features>
+!SSPI
crypto
</features>
<name>
HTTP proxy auth Digest multi API re-using connection
</name>
<command>
-http://test.remote.haxx.se/path/540 http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
+http://test.remote.example.com/path/540 http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
</command>
</client>
@@ -74,22 +75,22 @@ http://test.remote.haxx.se/path/540 http://%HOSTIP:%HTTPPORT silly:person custom
^User-Agent: curl/.*
</strip>
<protocol>
-GET http://test.remote.haxx.se/path/540 HTTP/1.1
+GET http://test.remote.example.com/path/540 HTTP/1.1
+Host: custom.set.host.name
Accept: */*
Proxy-Connection: Keep-Alive
-Host: custom.set.host.name
-GET http://test.remote.haxx.se/path/540 HTTP/1.1
+GET http://test.remote.example.com/path/540 HTTP/1.1
+Host: custom.set.host.name
Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"
Accept: */*
Proxy-Connection: Keep-Alive
-Host: custom.set.host.name
-GET http://test.remote.haxx.se/path/540 HTTP/1.1
+GET http://test.remote.example.com/path/540 HTTP/1.1
+Host: custom.set.host.name
Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"
Accept: */*
Proxy-Connection: Keep-Alive
-Host: custom.set.host.name
</protocol>
</verify>
diff --git a/tests/data/test541 b/tests/data/test541
index ce4c9111..622daa0f 100644
--- a/tests/data/test541
+++ b/tests/data/test541
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
# Server-side
<reply>
</reply>
diff --git a/tests/data/test544 b/tests/data/test544
index 2fa4edb1..78cb5a45 100644
--- a/tests/data/test544
+++ b/tests/data/test544
@@ -1,13 +1,20 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
#
# Server-side
<reply>
-<data mode="text">
-HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 3
-
+<data>
+HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 3
+
OK
</data>
</reply>
diff --git a/tests/data/test545 b/tests/data/test545
index 66ebb611..f2a5ddde 100644
--- a/tests/data/test545
+++ b/tests/data/test545
Binary files differ
diff --git a/tests/data/test547 b/tests/data/test547
index d1e26040..cee22c6f 100644
--- a/tests/data/test547
+++ b/tests/data/test547
@@ -76,6 +76,8 @@ lib547
</tool>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP proxy auth NTLM with POST data from read callback
@@ -87,7 +89,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://test.remote.haxx.se/path/547 http://%HOSTIP:%HTTPPORT s1lly:pers0n
+http://test.remote.example.com/path/547 http://%HOSTIP:%HTTPPORT testuser:testpass
</command>
<precheck>
chkhostname curlhost
@@ -100,28 +102,28 @@ chkhostname curlhost
^User-Agent: curl/.*
</strip>
<protocol>
-POST http://test.remote.haxx.se/path/547 HTTP/1.1
+POST http://test.remote.example.com/path/547 HTTP/1.1
+Host: test.remote.example.com
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
Content-Type: application/x-www-form-urlencoded
this is the blurb we want to upload
-POST http://test.remote.haxx.se/path/547 HTTP/1.1
+POST http://test.remote.example.com/path/547 HTTP/1.1
+Host: test.remote.example.com
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
-POST http://test.remote.haxx.se/path/547 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=
+POST http://test.remote.example.com/path/547 HTTP/1.1
+Host: test.remote.example.com
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
diff --git a/tests/data/test548 b/tests/data/test548
index c4942e60..34cf5e2e 100644
--- a/tests/data/test548
+++ b/tests/data/test548
@@ -76,6 +76,8 @@ lib548
</tool>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP proxy auth NTLM with POST data from CURLOPT_POSTFIELDS
@@ -87,7 +89,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://test.remote.haxx.se/path/548 http://%HOSTIP:%HTTPPORT s1lly:pers0n
+http://test.remote.example.com/path/548 http://%HOSTIP:%HTTPPORT testuser:testpass
</command>
<precheck>
chkhostname curlhost
@@ -100,28 +102,28 @@ chkhostname curlhost
^User-Agent: curl/.*
</strip>
<protocol>
-POST http://test.remote.haxx.se/path/548 HTTP/1.1
+POST http://test.remote.example.com/path/548 HTTP/1.1
+Host: test.remote.example.com
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
Content-Type: application/x-www-form-urlencoded
this is the blurb we want to upload
-POST http://test.remote.haxx.se/path/548 HTTP/1.1
+POST http://test.remote.example.com/path/548 HTTP/1.1
+Host: test.remote.example.com
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
-POST http://test.remote.haxx.se/path/548 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=
+POST http://test.remote.example.com/path/548 HTTP/1.1
+Host: test.remote.example.com
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
diff --git a/tests/data/test549 b/tests/data/test549
index 298d0ad9..a248edbf 100644
--- a/tests/data/test549
+++ b/tests/data/test549
@@ -12,14 +12,14 @@ HTTP proxy
# Server-side
<reply>
<data nocheck="yes">
-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"
-Accept-Ranges: bytes
-Content-Length: 6
-
+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"
+Accept-Ranges: bytes
+Content-Length: 6
+
hello
</data>
</reply>
@@ -41,7 +41,7 @@ FTP RETR over proxy with CURLOPT_PROXY_TRANSFER_MODE
</name>
# first URL then proxy
<command>
-ftp://www.haxx.se/moo/549 http://%HOSTIP:%HTTPPORT
+ftp://www.example.com/moo/549 http://%HOSTIP:%HTTPPORT
</command>
</client>
@@ -52,13 +52,13 @@ ftp://www.haxx.se/moo/549 http://%HOSTIP:%HTTPPORT
^User-Agent:.*
</strip>
<protocol>
-GET ftp://www.haxx.se/moo/549;type=i HTTP/1.1
-Host: www.haxx.se:21
+GET ftp://www.example.com/moo/549;type=i HTTP/1.1
+Host: www.example.com:21
Accept: */*
Proxy-Connection: Keep-Alive
</protocol>
-<stdout mode="text">
+<stdout>
hello
</stdout>
</verify>
diff --git a/tests/data/test550 b/tests/data/test550
index c99cf4be..a609aa21 100644
--- a/tests/data/test550
+++ b/tests/data/test550
@@ -12,14 +12,14 @@ CURLOPT_PROXY
# Server-side
<reply>
<data nocheck="yes">
-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"
-Accept-Ranges: bytes
-Content-Length: 6
-
+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"
+Accept-Ranges: bytes
+Content-Length: 6
+
hello
</data>
</reply>
@@ -41,7 +41,7 @@ FTP RETR over proxy with CURLOPT_PROXY_TRANSFER_MODE and ASCII transfer
</name>
# first URL then proxy
<command>
-ftp://www.haxx.se/moo/550 http://%HOSTIP:%HTTPPORT ascii
+ftp://www.example.com/moo/550 http://%HOSTIP:%HTTPPORT ascii
</command>
</client>
@@ -52,13 +52,13 @@ ftp://www.haxx.se/moo/550 http://%HOSTIP:%HTTPPORT ascii
^User-Agent:.*
</strip>
<protocol>
-GET ftp://www.haxx.se/moo/550;type=a HTTP/1.1
-Host: www.haxx.se:21
+GET ftp://www.example.com/moo/550;type=a HTTP/1.1
+Host: www.example.com:21
Accept: */*
Proxy-Connection: Keep-Alive
</protocol>
-<stdout mode="text">
+<stdout>
hello
</stdout>
</verify>
diff --git a/tests/data/test551 b/tests/data/test551
index 8027d91c..ed6aee26 100644
--- a/tests/data/test551
+++ b/tests/data/test551
@@ -61,12 +61,14 @@ http
lib547
</tool>
<features>
+!SSPI
+crypto
</features>
<name>
HTTP proxy auth Digest with POST data from read callback
</name>
<command>
-http://test.remote.haxx.se/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
+http://test.remote.example.com/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
</command>
</client>
@@ -76,17 +78,17 @@ http://test.remote.haxx.se/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
^User-Agent: curl/.*
</strip>
<protocol>
-POST http://test.remote.haxx.se/path/551 HTTP/1.1
-Host: test.remote.haxx.se
+POST http://test.remote.example.com/path/551 HTTP/1.1
+Host: test.remote.example.com
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
Content-Type: application/x-www-form-urlencoded
this is the blurb we want to upload
-POST http://test.remote.haxx.se/path/551 HTTP/1.1
+POST http://test.remote.example.com/path/551 HTTP/1.1
+Host: test.remote.example.com
Proxy-Authorization: Digest username="s1lly", realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", uri="/path/551", response="3325240726fbdaf1e61f3a0dd40b930c"
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
diff --git a/tests/data/test552 b/tests/data/test552
index b0db37c1..b44ca345 100644
--- a/tests/data/test552
+++ b/tests/data/test552
Binary files differ
diff --git a/tests/data/test553 b/tests/data/test553
index 55529362..bd937f01 100644
--- a/tests/data/test553
+++ b/tests/data/test553
@@ -44,8 +44,6 @@ http://%HOSTIP:%HTTPPORT/path/553
<strip>
^User-Agent: curl/.*
</strip>
-# We strip off a large chunk of the type-2 NTLM message since it depends on
-# the local host name and thus differs on different machines!
<protocol nonewline="yes">
POST /path/553 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
diff --git a/tests/data/test554 b/tests/data/test554
index 134f7ef9..b55fa3d1 100644
--- a/tests/data/test554
+++ b/tests/data/test554
@@ -1,14 +1,21 @@
<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
#
# Server-side
<reply>
-<data mode="text">
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake swsclose
-Connection: close
-Content-Type: text/html
-
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake swsclose
+Connection: close
+Content-Type: text/html
+
hello
</data>
</reply>
@@ -35,17 +42,17 @@ http://%HOSTIP:%HTTPPORT/554
# Verify data after the test has been "shot"
<verify>
<strippart>
-s/^------------------------------[a-z0-9]*/------------------------------/
-s/boundary=----------------------------[a-z0-9]*/boundary=----------------------------/
+s/^--------------------------[a-z0-9]*/------------------------------/
+s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
</strippart>
# Note that the stripping above removes 12 bytes from every occurance of the
-# boundary string and since 4 of them are in the body contents, we see
-# 415 - (4*12) here == 367 bytes.
+# boundary string and since 5 of them are in the body contents, we see
+# (5*12) == 60 bytes less
<protocol>
POST /554 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
-Content-Length: 415
+Content-Length: 718
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------
@@ -55,6 +62,11 @@ Content-Disposition: form-data; name="sendfile"; filename="postit2.c"
this is what we post to the silly web server
------------------------------
+Content-Disposition: form-data; name="callbackdata"
+
+this is what we post to the silly web server
+
+------------------------------
Content-Disposition: form-data; name="filename"
postit2.c
@@ -62,6 +74,11 @@ postit2.c
Content-Disposition: form-data; name="submit"
send
+------------------------------
+Content-Disposition: form-data; name="somename"; filename="somefile.txt"
+Content-Type: text/plain
+
+blah blah
--------------------------------
</protocol>
</verify>
diff --git a/tests/data/test555 b/tests/data/test555
index 32223452..0f3bb07f 100644
--- a/tests/data/test555
+++ b/tests/data/test555
@@ -81,6 +81,8 @@ lib555
</tool>
<features>
NTLM
+!SSPI
+debug
</features>
<name>
HTTP proxy auth NTLM with POST data from read callback multi-if
@@ -92,7 +94,7 @@ CURL_GETHOSTNAME=curlhost
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
</setenv>
<command>
-http://test.remote.haxx.se/path/555 http://%HOSTIP:%HTTPPORT s1lly:pers0n
+http://test.remote.example.com/path/555 http://%HOSTIP:%HTTPPORT testuser:testpass
</command>
<precheck>
chkhostname curlhost
@@ -109,28 +111,28 @@ chkhostname curlhost
s/^(this is the blurb we want to upload)\r\n/$1\n/ if($has_charconv)
</strippart>
<protocol>
-POST http://test.remote.haxx.se/path/555 HTTP/1.1
+POST http://test.remote.example.com/path/555 HTTP/1.1
+Host: test.remote.example.com
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
Content-Type: application/x-www-form-urlencoded
this is the blurb we want to upload
-POST http://test.remote.haxx.se/path/555 HTTP/1.1
+POST http://test.remote.example.com/path/555 HTTP/1.1
+Host: test.remote.example.com
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 0
Content-Type: application/x-www-form-urlencoded
-POST http://test.remote.haxx.se/path/555 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=
+POST http://test.remote.example.com/path/555 HTTP/1.1
+Host: test.remote.example.com
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
-Host: test.remote.haxx.se
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
diff --git a/tests/data/test556 b/tests/data/test556
index 998bdfb0..55c7c91c 100644
--- a/tests/data/test556
+++ b/tests/data/test556
@@ -8,12 +8,12 @@ HTTP GET
<reply>
<data>
-HTTP/1.1 200 OK
-Server: test-server/fake
-Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
-Content-Length: 6
-Connection: close
-
+HTTP/1.1 200 OK
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+Content-Length: 6
+Connection: close
+
-foo-
</data>
</reply>
diff --git a/tests/data/test557 b/tests/data/test557
index 3da67e99..ee2793f5 100644
--- a/tests/data/test557
+++ b/tests/data/test557
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+printf
+unittest
+</keywords>
+</info>
#
# Server-side
<reply>
@@ -25,7 +31,7 @@ nothing
#
# Verify data after the test has been "shot"
<verify>
-<stdout mode="text">
+<stdout>
All curl_mprintf() unsigned short tests OK!
All curl_mprintf() signed short tests OK!
All curl_mprintf() unsigned int tests OK!
diff --git a/tests/data/test558 b/tests/data/test558
index 5b69ea02..7a9ba706 100644
--- a/tests/data/test558
+++ b/tests/data/test558
@@ -1,4 +1,10 @@
<testcase>
+<info>
+<keywords>
+TrackMemory
+</keywords>
+</info>
+
#
# Server-side
<reply>
@@ -9,18 +15,16 @@
<server>
none
</server>
+<features>
+TrackMemory
+</features>
# tool is what to use instead of 'curl'
<tool>
lib558
</tool>
-# precheck is a command line to run before the test,
-# to see if we can execute the test or not
-<precheck>
-./libtest/lib558 check
-</precheck>
<name>
-internal hash create/destroy testing
+libtest memory tracking operational
</name>
<command>
nothing
@@ -30,15 +34,20 @@ nothing
#
# Verify data after the test has been "shot"
<verify>
-<stdout mode="text">
-easy handle init OK
-creating hash...
-hash creation OK
-destroying hash...
-hash destruction OK
-destroying easy handle...
-easy handle destruction OK
-</stdout>
+<file name="log/memdump">
+MEM lib558.c: malloc()
+MEM lib558.c: free()
+MEM escape.c: malloc()
+MEM escape.c: realloc()
+MEM escape.c: realloc()
+MEM escape.c: free()
+</file>
+<stripfile>
+s/ =.*//
+s/\(.*\)/()/
+s/:\d+/:/
+s:^(MEM )(.*/)(.*):$1$3:
+</stripfile>
</verify>
</testcase>
diff --git a/tests/data/test559 b/tests/data/test559
deleted file mode 100644
index ecaf54c7..00000000
--- a/tests/data/test559
+++ /dev/null
@@ -1,44 +0,0 @@
-<testcase>
-#
-# Server-side
-<reply>
-</reply>
-
-# Client-side
-<client>
-<server>
-none
-</server>
-# tool is what to use instead of 'curl'
-<tool>
-lib559
-</tool>
-# precheck is a command line to run before the test,
-# to see if we can execute the test or not
-<precheck>
-./libtest/lib559 check
-</precheck>
-
-<name>
-internal hash create/add/destroy testing
-</name>
-<command>
-nothing
-</command>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<stdout mode="text">
-easy handle init OK
-creating hash...
-hash creation OK
-destroying hash...
-hash destruction OK
-destroying easy handle...
-easy handle destruction OK
-</stdout>
-</verify>
-
-</testcase>
diff --git a/tests/data/test56 b/tests/data/test56
index a97b3650..f221981c 100644
--- a/tests/data/test56
+++ b/tests/data/test56
@@ -46,8 +46,8 @@ header "Transfer-Encoding: chunked"
<verify>
<protocol>
POST /that.site.com/56 HTTP/1.1
-User-Agent: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Host: %HOSTIP:%HTTPPORT
+User-Agent: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Accept: */*
Transfer-Encoding: chunked
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test560 b/tests/data/test560
index 0e991b82..8d005541 100644
--- a/tests/data/test560
+++ b/tests/data/test560
@@ -11,11 +11,11 @@ multi
# Server-side
<reply>
<data>
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 7
-
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 7
+
MooMoo
</data>
</reply>
diff --git a/tests/data/test561 b/tests/data/test561
index 18e827c1..a6188eac 100644
--- a/tests/data/test561
+++ b/tests/data/test561
@@ -13,14 +13,14 @@ type=
# Server-side
<reply>
<data nocheck="yes">
-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"
-Accept-Ranges: bytes
-Content-Length: 6
-
+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"
+Accept-Ranges: bytes
+Content-Length: 6
+
hello
</data>
</reply>
@@ -42,7 +42,7 @@ FTP RETR with CURLOPT_PROXY_TRANSFER_MODE, ASCII transfer and type=i
</name>
# first URL then proxy
<command>
-"ftp://www.haxx.se/moo/561;type=i" http://%HOSTIP:%HTTPPORT ascii
+"ftp://www.example.com/moo/561;type=i" http://%HOSTIP:%HTTPPORT ascii
</command>
</client>
@@ -53,13 +53,13 @@ FTP RETR with CURLOPT_PROXY_TRANSFER_MODE, ASCII transfer and type=i
^User-Agent:.*
</strip>
<protocol>
-GET ftp://www.haxx.se/moo/561;type=i HTTP/1.1
-Host: www.haxx.se:21
+GET ftp://www.example.com/moo/561;type=i HTTP/1.1
+Host: www.example.com:21
Accept: */*
Proxy-Connection: Keep-Alive
</protocol>
-<stdout mode="text">
+<stdout>
hello
</stdout>
</verify>
diff --git a/tests/data/test564 b/tests/data/test564
index 6d0609d9..72bf1291 100644
--- a/tests/data/test564
+++ b/tests/data/test564
@@ -47,11 +47,8 @@ PWD
CWD path
EPSV
TYPE I
-SIZE 546
-RETR 546
-EPSV
-SIZE 546
-RETR 546
+SIZE 564
+RETR 564
QUIT
</protocol>
<stdout>
diff --git a/tests/data/test565 b/tests/data/test565
index fdf75a5f..6e215a24 100644
--- a/tests/data/test565
+++ b/tests/data/test565
@@ -56,6 +56,10 @@ ok
<server>
http
</server>
+<features>
+!SSPI
+crypto
+</features>
# tool is what to use instead of 'curl'
<tool>
lib565
@@ -79,12 +83,11 @@ Accept: */*
Transfer-Encoding: chunked
Content-Type: application/x-www-form-urlencoded
-
0
POST /565 HTTP/1.1
-Authorization: Digest username="foo", realm="testrealm", nonce="1053604144", uri="/565", response="877424f750af047634dbd94f9933217b"
Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="foo", realm="testrealm", nonce="1053604144", uri="/565", response="877424f750af047634dbd94f9933217b"
Accept: */*
Transfer-Encoding: chunked
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test566 b/tests/data/test566
index 95da61d2..9923d8fb 100644
--- a/tests/data/test566
+++ b/tests/data/test566
@@ -8,18 +8,18 @@ HTTP GET
#
# Server-side
<reply>
-<data mode="text">
-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
-ETag: "21025-dc7-39462498"
-Accept-Ranges: bytes
-Content-Length: 0
-Connection: close
-Content-Type: text/html
-Funny-head: yesyes
-
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 0
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
</data>
</reply>
@@ -44,7 +44,7 @@ http://%HOSTIP:%HTTPPORT/566 log/ip566
#
# Verify data after the test has been "shot"
<verify>
-<file name="log/ip566" mode="text">
+<file name="log/ip566">
CL: 0
</file>
<protocol>
diff --git a/tests/data/test567 b/tests/data/test567
index 4fd14843..de0f6327 100644
--- a/tests/data/test567
+++ b/tests/data/test567
@@ -11,11 +11,11 @@ OPTIONS
# Server-side
<reply>
<data>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-CSeq: 1
-Public: DESCRIBE, OPTIONS, SETUP, TEARDOWN, PLAY, PAUSE
-Curl-Private: swsclose
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+CSeq: 1
+Public: DESCRIBE, OPTIONS, SETUP, TEARDOWN, PLAY, PAUSE
+Curl-Private: swsclose
</data>
</reply>
diff --git a/tests/data/test568 b/tests/data/test568
index d746e96d..09fa81ce 100644
--- a/tests/data/test568
+++ b/tests/data/test568
@@ -11,37 +11,37 @@ ANNOUNCE
# Server-side
<reply>
<data1>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Cseq: 1
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Cseq: 1
+
</data1>
<data2>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Cseq: 2
-Content-Length: 70
-Content-Type: application/sdp
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Cseq: 2
+Content-Length: 70
+Content-Type: application/sdp
+
v=0
s=rtspd SDP
i=A fake SDP reply
-u=http://www.curl.haxx.se/fakesdp.ps
+u=http://www.curl.example.com/fakesdp.ps
</data2>
<data3>
-RTSP/1.0 200 Okie Dokie
-Server: RTSPD/libcurl-test
-Cseq: 3
-
+RTSP/1.0 200 Okie Dokie
+Server: RTSPD/libcurl-test
+Cseq: 3
+
</data3>
<data4>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-CSeq: 4
-Curl-private: swsclose
-Informational: Empty Options Response
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+CSeq: 4
+Curl-private: swsclose
+Informational: Empty Options Response
+
</data4>
</reply>
diff --git a/tests/data/test569 b/tests/data/test569
index 5cd4797f..c4c62a4c 100644
--- a/tests/data/test569
+++ b/tests/data/test569
@@ -51,6 +51,7 @@ Curl-Private: swsclose
CSeq: 6
</data6>
+</reply>
# Client-Side
<client>
diff --git a/tests/data/test570 b/tests/data/test570
index aec86384..65f32a5b 100644
--- a/tests/data/test570
+++ b/tests/data/test570
@@ -11,28 +11,28 @@ Mismatch checking
# Server-side
<reply>
<data1>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-CSeq: 2
-Public: DESCRIBE, OPTIONS, SETUP, TEARDOWN, PLAY, PAUSE
-Informational: CSeq Mismatch
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+CSeq: 2
+Public: DESCRIBE, OPTIONS, SETUP, TEARDOWN, PLAY, PAUSE
+Informational: CSeq Mismatch
+
</data1>
<data2>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Session: asdf
-CSeq: 999
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Session: asdf
+CSeq: 999
+
</data2>
<data3>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Session: asdfWRONG
-Informational: Session ID mismatch
-Curl-Private: swsclose
-CSeq: 1000
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Session: asdfWRONG
+Informational: Session ID mismatch
+Curl-Private: swsclose
+CSeq: 1000
+
</data3>
</reply>
diff --git a/tests/data/test571 b/tests/data/test571
index 9b263b12..5e138cdf 100644
--- a/tests/data/test571
+++ b/tests/data/test571
@@ -15,37 +15,37 @@ RTP
# Server-side
<reply>
<data1>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Session: asdf
-CSeq: 1
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Session: asdf
+CSeq: 1
+
</data1>
<data2>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-CSeq: 2
-Session: asdf
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+CSeq: 2
+Session: asdf
+
</data2>
<data3>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Cseq: 3
-Content-Length: 4
-Content-Type: fake/evil
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Cseq: 3
+Content-Length: 4
+Content-Type: fake/evil
+
$99
</data3>
<data4>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Session: asdf
-CSeq: 4
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Session: asdf
+CSeq: 4
+
</data4>
<servercmd>
diff --git a/tests/data/test572 b/tests/data/test572
index c06e531f..903ded96 100644
--- a/tests/data/test572
+++ b/tests/data/test572
@@ -11,51 +11,52 @@ GET_PARAMETER
# Server-side
<reply>
<data1>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Session: getparams-test
-CSeq: 1
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Session: getparams-test
+CSeq: 1
+
</data1>
<data2>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Session: getparams-test
-Content-Type: text/parameters
-Content-Length: 32
-Cseq: 2
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Session: getparams-test
+Content-Type: text/parameters
+Content-Length: 32
+Cseq: 2
+
scale=enormous
speed=ludicrous
+
</data2>
<data3>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Session: getparams-test
-Cseq: 3
-
+RTSP/1.0 204 OK
+Server: RTSPD/libcurl-test
+Session: getparams-test
+Cseq: 3
+
</data3>
<data4>
-RTSP/1.0 200 Okie Dokie
-Server: RTSPD/libcurl-test
-Session: getparams-test
-Cseq: 4
-Content-Length: 37
-
+RTSP/1.0 200 Okie Dokie
+Server: RTSPD/libcurl-test
+Session: getparams-test
+Cseq: 4
+Content-Length: 37
+
packets_received: 1000
jitter: 0.314
</data4>
<data5>
-RTSP/1.0 200 OK
-Server: RTSPD/libcurl-test
-Session: getparams-test
-CSeq: 5
-Curl-private: swsclose
-Informational: Empty Options Response
-
+RTSP/1.0 200 OK
+Server: RTSPD/libcurl-test
+Session: getparams-test
+CSeq: 5
+Curl-private: swsclose
+Informational: Empty Options Response
+
</data5>
</reply>
diff --git a/tests/data/test573 b/tests/data/test573
index 909ae3cf..e3299b82 100644
--- a/tests/data/test573
+++ b/tests/data/test573
@@ -1,24 +1,26 @@
<testcase>
<info>
<keywords>
-FILE
+HTTP
+multi
+flaky
</keywords>
</info>
#
# Server-side
<reply>
<data>
-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
-ETag: "21025-dc7-39462498"
-Accept-Ranges: bytes
-Content-Length: 6
-Connection: close
-Content-Type: text/html
-Funny-head: yesyes
-
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
-foo-
</data>
</reply>
diff --git a/tests/data/test574 b/tests/data/test574
index 1fa4654d..cb41f03e 100644
--- a/tests/data/test574
+++ b/tests/data/test574
@@ -25,7 +25,7 @@ ftp
lib574
</tool>
<name>
-FTP wildcard download - changed fnmatch, 2x perform (UNIX LIST response)
+FTP wildcard download - changed fnmatch, 2x perform (Unix LIST response)
</name>
<command>
ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/*.txt
@@ -82,7 +82,7 @@ EPSV
RETR someothertext.txt
QUIT
</protocol>
-<stdout mode="text">
+<stdout>
This file should have permissions 444
This file should have permissions 666
This file should have permissions 777
diff --git a/tests/data/test575 b/tests/data/test575
index 5670e6bc..81338345 100644
--- a/tests/data/test575
+++ b/tests/data/test575
@@ -100,7 +100,7 @@ EPSV
RETR someothertext.txt
QUIT
</protocol>
-<stdout mode="text">
+<stdout>
This file should have permissions 444
This file should have permissions 666
This file should have permissions 777
diff --git a/tests/data/test576 b/tests/data/test576
index 4d4b90c8..74a3aedd 100644
--- a/tests/data/test576
+++ b/tests/data/test576
@@ -22,7 +22,7 @@ ftp
lib576
</tool>
<name>
-FTP wildcard download - skip/parser_correctness/CURLOPT_FNMATCH_FUNCTION (UNIX)
+FTP wildcard download - skip/parser_correctness/CURLOPT_FNMATCH_FUNCTION (Unix)
</name>
<command>
ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/*
@@ -34,7 +34,7 @@ ftp://%HOSTIP:%FTPPORT/fully_simulated/UNIX/*
<errorcode>
0
</errorcode>
-<stdout mode="text">
+<stdout>
=============================================================
Remains: 14
Filename: .
diff --git a/tests/data/test577 b/tests/data/test577
deleted file mode 100644
index 7a69ead2..00000000
--- a/tests/data/test577
+++ /dev/null
@@ -1,43 +0,0 @@
-<testcase>
-<info>
-<keywords>
-wildcardmatch
-</keywords>
-</info>
-#
-# Server-side
-<reply>
-</reply>
-
-# Client-side
-<client>
-<server>
-none
-</server>
-# tool is what to use instead of 'curl'
-<tool>
-lib577
-</tool>
-# precheck is a command line to run before the test,
-# to see if we can execute the test or not
-<precheck>
-./libtest/lib577 check
-</precheck>
-
- <name>
-Curl_fnmatch() testing
- </name>
- <command>
-nothing
-</command>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<stdout mode="text">
-===========================
-===========================
-</stdout>
-</verify>
-</testcase>
diff --git a/tests/data/test578 b/tests/data/test578
index 0b6a4373..e4ee4ac1 100644
--- a/tests/data/test578
+++ b/tests/data/test578
@@ -8,18 +8,18 @@ HTTP POST
#
# Server-side
<reply name="1">
-<data mode="text">
-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
-ETag: "21025-dc7-39462498"
-Accept-Ranges: bytes
-Content-Length: 6
-Connection: close
-Content-Type: text/html
-Funny-head: yesyes
-
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
-foo-
</data>
</reply>
@@ -45,7 +45,7 @@ http://%HOSTIP:%HTTPPORT/500 log/ip578
#
# Verify data after the test has been "shot"
<verify>
-<file name="log/ip578" mode="text">
+<file name="log/ip578">
PASSED, UL data matched data size
</file>
</verify>
diff --git a/tests/data/test579 b/tests/data/test579
index 5f879443..e352e3d6 100644
--- a/tests/data/test579
+++ b/tests/data/test579
@@ -10,43 +10,43 @@ HTTP Digest auth
# Server-side
<reply>
<data>
-HTTP/1.1 100 Continue
-Server: Microsoft-IIS/5.0
-Date: Sun, 03 Apr 2005 14:57:45 GMT
-X-Powered-By: ASP.NET
-
-HTTP/1.1 401 authentication please swsbounce
-Server: Microsoft-IIS/6.0
-WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 0
-
+HTTP/1.1 100 Continue
+Server: Microsoft-IIS/5.0
+Date: Sun, 03 Apr 2005 14:57:45 GMT
+X-Powered-By: ASP.NET
+
+HTTP/1.1 401 authentication please swsbounce
+Server: Microsoft-IIS/6.0
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
</data>
<data1>
-HTTP/1.1 200 A OK
-Server: Microsoft-IIS/6.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 3
-
+HTTP/1.1 200 A OK
+Server: Microsoft-IIS/6.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 3
+
ok
</data1>
<datacheck>
-HTTP/1.1 100 Continue
-Server: Microsoft-IIS/5.0
-Date: Sun, 03 Apr 2005 14:57:45 GMT
-X-Powered-By: ASP.NET
-
-HTTP/1.1 401 authentication please swsbounce
-Server: Microsoft-IIS/6.0
-WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 0
-
-HTTP/1.1 200 A OK
-Server: Microsoft-IIS/6.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 3
-
+HTTP/1.1 100 Continue
+Server: Microsoft-IIS/5.0
+Date: Sun, 03 Apr 2005 14:57:45 GMT
+X-Powered-By: ASP.NET
+
+HTTP/1.1 401 authentication please swsbounce
+Server: Microsoft-IIS/6.0
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
+HTTP/1.1 200 A OK
+Server: Microsoft-IIS/6.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 3
+
ok
</datacheck>
</reply>
@@ -56,6 +56,9 @@ ok
<server>
http
</server>
+<features>
+crypto
+</features>
# tool is what to use instead of 'curl'
<tool>
lib579
@@ -72,14 +75,13 @@ http://%HOSTIP:%HTTPPORT/579 log/ip579
#
# Verify data after the test has been "shot"
<verify>
-<file name="log/ip579" mode="text">
+<file name="log/ip579">
Progress callback called with UL 0 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
+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
</file>
</verify>
</testcase>
diff --git a/tests/data/test580 b/tests/data/test580
new file mode 100644
index 00000000..13965598
--- /dev/null
+++ b/tests/data/test580
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+Duplicate-header
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 eat this!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: this-is-the-first.html
+Content-Length: 0
+Connection: close
+Location: and there's a second one too! / moo.html
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib507
+</tool>
+
+ <name>
+multi interface, multiple Location: headers
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/580
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /580 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test581 b/tests/data/test581
new file mode 100644
index 00000000..83d7b604
--- /dev/null
+++ b/tests/data/test581
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+Duplicate-header
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 all good!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+Connection: close
+Content-Type: changed/my/mind
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib507
+</tool>
+
+ <name>
+multi interface, multiple Content-Type: headers
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/581
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /581 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test582 b/tests/data/test582
new file mode 100644
index 00000000..64c32dbf
--- /dev/null
+++ b/tests/data/test582
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<tool>
+lib582
+</tool>
+ <name>
+SFTP upload using multi interface
+ </name>
+ <command>
+Sftp://%HOSTIP:%SSHPORT%PWD/log/upload582.txt %PWD/log/file582.txt %USER:
+</command>
+<file name="log/file582.txt">
+Moooooooooooo
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+<strip>
+</strip>
+<protocol>
+</protocol>
+<file name="log/file582.txt">
+Moooooooooooo
+ upload this
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test583 b/tests/data/test583
new file mode 100644
index 00000000..6ad7f7d0
--- /dev/null
+++ b/tests/data/test583
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<tool>
+lib583
+</tool>
+ <name>
+SFTP with multi interface, remove handle early
+ </name>
+
+# The command here uses 'localhost' just to make sure that curl_multi_perform
+# won't reach too far in the first invoke. When using c-ares at least, the
+# name resolve will cause it to return rather quickly and thus we could trigger
+# the problem we're looking to verify.
+ <command>
+sftp://localhost:%SSHPORT%PWD/log/upload583.txt %USER:
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test584 b/tests/data/test584
new file mode 100644
index 00000000..309c7b65
--- /dev/null
+++ b/tests/data/test584
@@ -0,0 +1,102 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+# Silly division of the first request is solely to appease the server which expects n_data_items == n_requests
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 4
+
+584
+</data1>
+<data2>
+HTTP/1.1 200 OK
+</data2>
+<data3>
+Server: test-server/fake
+</data3>
+<data4>
+Content-Length: 0
+
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 5
+
+585
+
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 4
+
+586
+</data4>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib530
+</tool>
+ <name>
+HTTP GET using pipelining (nonzero length after zero length)
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/584
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /path/5840001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/5840002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/5840003 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /path/5840004 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<stdout>
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 4
+
+584
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 0
+
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 5
+
+585
+
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 4
+
+586
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test585 b/tests/data/test585
new file mode 100644
index 00000000..2096e81c
--- /dev/null
+++ b/tests/data/test585
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_OPENSOCKETFUNCTION
+CURLOPT_CLOSESOCKETFUNCTION
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 eat this!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: this-is-the-first.html
+Content-Length: 0
+Connection: close
+
+</data>
+<datacheck>
+[OPEN] counter: 1
+HTTP/1.1 302 eat this!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: this-is-the-first.html
+Content-Length: 0
+Connection: close
+
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib585
+</tool>
+
+ <name>
+socket open/close callbacks
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/585
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /585 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test586 b/tests/data/test586
new file mode 100644
index 00000000..c0857bdd
--- /dev/null
+++ b/tests/data/test586
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+CURLOPT_PORT
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+line 1
+line 2
+last line
+</data>
+<datacheck>
+[OPEN] counter: 1
+[OPEN] counter: 2
+line 1
+line 2
+last line
+[CLOSE] counter: 2
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib585
+</tool>
+ <name>
+FTP and open/close socket callbacks
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/586
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 586
+RETR 586
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test587 b/tests/data/test587
new file mode 100644
index 00000000..69cbe1ed
--- /dev/null
+++ b/tests/data/test587
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib587
+</tool>
+
+ <name>
+HTTP multi-part formpost with aborted read callback
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/587
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^--------------------------[a-z0-9]*/------------------------------/
+s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
+</strippart>
+<protocol>
+POST /587 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 718
+Expect: 100-continue
+Content-Type: multipart/form-data; boundary=----------------------------
+
+------------------------------
+Content-Disposition: form-data; name="sendfile"; filename="postit2.c"
+
+</protocol>
+# CURLE_ABORTED_BY_CALLBACK (42)
+<errorcode>
+42
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test588 b/tests/data/test588
new file mode 100644
index 00000000..b30828c1
--- /dev/null
+++ b/tests/data/test588
@@ -0,0 +1,69 @@
+<testcase>
+#
+# This test is exactly like 525 but the server rejects the EPRT command.
+# Written up to make sure that there's nothing in the multi interface
+# active connection case that differs between PORT and EPRT use
+#
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib525
+</tool>
+ <name>
+FTP PORT upload using multi interface, EPRT doesn't work
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/588 log/upload588
+</command>
+<file name="log/upload588">
+Moooooooooooo
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPRT |1|
+PORT
+TYPE I
+STOR 588
+QUIT
+</protocol>
+<upload>
+Moooooooooooo
+ upload this
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test590 b/tests/data/test590
new file mode 100644
index 00000000..55ea4f0e
--- /dev/null
+++ b/tests/data/test590
@@ -0,0 +1,125 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+POST callback
+HTTP proxy
+HTTP proxy NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<data>
+HTTP/1.1 407 Authorization Required swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Proxy-Authenticate: Negotiate
+Proxy-Authenticate: NTLM
+Content-Type: text/html; charset=iso-8859-1
+Connection: close
+
+This is not the real page
+</data>
+
+# this is returned first since we get no proxy-auth
+<data1001>
+HTTP/1.1 407 Authorization Required to proxy me my dear
+Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+Content-Length: 34
+
+Hey you, authenticate or go away!
+</data1001>
+
+# This is supposed to be returned when the server gets the second
+# Authorization: NTLM line passed-in from the client
+<data1002>
+HTTP/1.1 200 Things are fine in proxy land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 42
+
+Contents of that page you requested, sir.
+</data1002>
+
+<datacheck>
+HTTP/1.1 407 Authorization Required swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Proxy-Authenticate: Negotiate
+Proxy-Authenticate: NTLM
+Content-Type: text/html; charset=iso-8859-1
+Connection: close
+
+HTTP/1.1 407 Authorization Required to proxy me my dear
+Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+Content-Length: 34
+
+HTTP/1.1 200 Things are fine in proxy land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 42
+
+Contents of that page you requested, sir.
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool to use
+<tool>
+lib590
+</tool>
+<features>
+NTLM
+!SSPI
+debug
+</features>
+ <name>
+HTTP proxy offers Negotiate+NTLM, use only NTLM
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://test.remote.example.com/path/590 http://%HOSTIP:%HTTPPORT
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent: curl/.*
+</strip>
+<protocol>
+GET http://test.remote.example.com/path/590 HTTP/1.1
+Host: test.remote.example.com
+User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://test.remote.example.com/path/590 HTTP/1.1
+Host: test.remote.example.com
+Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://test.remote.example.com/path/590 HTTP/1.1
+Host: test.remote.example.com
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAAAgACAPYAAAAIAAgA+AAAAAAAAAAAAAAABoKBAB3Hr6SDn3NDNkgebbaP88ExMjM0MjIzNFIW4N7aYT44bAIg1jt2blUBAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAbWVjdXJsaG9zdA==
+User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test591 b/tests/data/test591
new file mode 100644
index 00000000..e1dfcd37
--- /dev/null
+++ b/tests/data/test591
@@ -0,0 +1,73 @@
+<testcase>
+#
+# For this test the server rejects the EPRT command,
+# code in lib591 makes use of curl_multi_timeout()
+# and server does not establish data connection.
+#
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+NODATACONN425
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+NODATACONN425
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib591
+</tool>
+ <name>
+FTP multi PORT and 425 on upload
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/591 %FTPTIME2 log/upload591
+</command>
+<file name="log/upload591">
+Moooooooooooo for 591
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPRT |1|
+PORT
+TYPE I
+STOR 591
+QUIT
+</protocol>
+# CURLE_FTP_ACCEPT_FAILED = 10
+<errorcode>
+10
+</errorcode>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test592 b/tests/data/test592
new file mode 100644
index 00000000..6151ccc4
--- /dev/null
+++ b/tests/data/test592
@@ -0,0 +1,74 @@
+<testcase>
+#
+# For this test the server rejects the EPRT command,
+# code in lib591 makes use of curl_multi_timeout()
+# and server does not establish data connection.
+#
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+NODATACONN421
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+NODATACONN421
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib591
+</tool>
+ <name>
+FTP multi PORT and 421 on upload
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/592 %FTPTIME2 log/upload592
+</command>
+<file name="log/upload592">
+Moooooooooooo for 592
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+# a 421 response must prevent further commands from being sent
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPRT |1|
+PORT
+TYPE I
+STOR 592
+QUIT
+</protocol>
+# CURLE_FTP_ACCEPT_FAILED = 10
+<errorcode>
+10
+</errorcode>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test593 b/tests/data/test593
new file mode 100644
index 00000000..a136000b
--- /dev/null
+++ b/tests/data/test593
@@ -0,0 +1,72 @@
+<testcase>
+#
+# For this test the server rejects the EPRT command,
+# code in lib591 makes use of curl_multi_timeout()
+# and server does not establish data connection.
+#
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+NODATACONN150
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+NODATACONN150
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib591
+</tool>
+ <name>
+FTP multi PORT upload, no data conn and no transient neg. reply
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/593 %FTPTIME2 log/upload593
+</command>
+<file name="log/upload593">
+Moooooooooooo for 593
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPRT |1|
+PORT
+TYPE I
+STOR 593
+QUIT
+</protocol>
+<errorcode>
+12
+</errorcode>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test594 b/tests/data/test594
new file mode 100644
index 00000000..d6144ae6
--- /dev/null
+++ b/tests/data/test594
@@ -0,0 +1,72 @@
+<testcase>
+#
+# For this test the server rejects the EPRT command,
+# code in lib591 makes use of curl_multi_timeout()
+# and server does not establish data connection.
+#
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+NODATACONN
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+NODATACONN
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib591
+</tool>
+ <name>
+FTP multi PORT upload, no data conn and no positive prelim. reply
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/594 %FTPTIME2 log/upload594
+</command>
+<file name="log/upload594">
+Moooooooooooo for 594
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD path
+EPRT |1|
+PORT
+TYPE I
+STOR 594
+QUIT
+</protocol>
+<errorcode>
+28
+</errorcode>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test595 b/tests/data/test595
new file mode 100644
index 00000000..0099a857
--- /dev/null
+++ b/tests/data/test595
@@ -0,0 +1,57 @@
+<testcase>
+#
+# This test is like 585 but uses passive FTP instead of HTTP
+#
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+moo
+</data>
+<datacheck>
+[OPEN] counter: 1
+[OPEN] counter: 2
+moo
+[CLOSE] counter: 2
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib585
+</tool>
+
+ <name>
+verify close callbacks with passive FTP
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/595 log/ip595
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 595
+RETR 595
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test596 b/tests/data/test596
new file mode 100644
index 00000000..9377289d
--- /dev/null
+++ b/tests/data/test596
@@ -0,0 +1,60 @@
+<testcase>
+#
+# This test is like 585 but uses active FTP instead of HTTP
+#
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+moo
+</data>
+<datacheck>
+[OPEN] counter: 1
+[OPEN] counter: 2
+[CLOSE] counter: 2
+moo
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib585
+</tool>
+
+ <name>
+verify close callbacks with active FTP
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/596 log/ip596 activeftp
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^(EPRT \|1\|)(.*)/$1/
+</strippart>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPRT |1|
+TYPE I
+SIZE 596
+RETR 596
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test597 b/tests/data/test597
new file mode 100644
index 00000000..458bb645
--- /dev/null
+++ b/tests/data/test597
@@ -0,0 +1,37 @@
+<testcase>
+<info>
+<keywords>
+FTP
+CONNECT_ONLY
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib597
+</tool>
+ <name>
+FTP connect only option
+ </name>
+
+<command>
+ftp://%HOSTIP:%FTPPORT
+</command>
+
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test598 b/tests/data/test598
new file mode 100644
index 00000000..89b8e6f5
--- /dev/null
+++ b/tests/data/test598
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP set cookie
+cookies
+CURLOPT_REFERER
+curl_easy_reset
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+</data>
+
+# since the request runs twice
+<datacheck>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib598
+</tool>
+
+ <name>
+curl_easy_reset with referer and other strings set
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/598
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /598 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: the-moo agent next generation
+Accept: */*
+Referer: http://example.com/the-moo
+Cookie: name=moo
+
+GET /598 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test599 b/tests/data/test599
new file mode 100644
index 00000000..9ce8b234
--- /dev/null
+++ b/tests/data/test599
@@ -0,0 +1,85 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: 5990001
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+</data>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Transfer-Encoding: chunked
+Connection: close
+Content-Type: text/html
+
+32
+this data is slightly larger than the first piece
+
+0
+
+</data1>
+
+<datacheck>
+HTTP/1.1 302 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: 5990001
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Transfer-Encoding: chunked
+Connection: close
+Content-Type: text/html
+
+this data is slightly larger than the first piece
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib599
+</tool>
+
+# Bug 3510057 pointed out that when following a location to a larger chunked
+# encoded page, the first size would still be used in the progress callback
+ <name>
+HTTP GET with progress callback and redirects changing content sizes
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/599 log/ip599
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file name="log/ip599">
+CL: -1
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test604 b/tests/data/test604
index af0259fb..566086e1 100644
--- a/tests/data/test604
+++ b/tests/data/test604
@@ -23,6 +23,9 @@ SFTP retrieval of nonexistent file
#
# Verify data after the test has been "shot"
<verify>
+<valgrind>
+disable
+</valgrind>
<errorcode>
78
</errorcode>
diff --git a/tests/data/test61 b/tests/data/test61
index f2a6a4ee..abc97895 100644
--- a/tests/data/test61
+++ b/tests/data/test61
@@ -22,6 +22,8 @@ SET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 2 11:56:27 GMT 2035
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
@@ -54,13 +56,13 @@ http://%HOSTIP:%HTTPPORT/we/want/61 -c log/jar61.txt -H "Host: www.host.foo.com"
</strip>
<protocol>
GET /we/want/61 HTTP/1.1
-Accept: */*
Host: www.host.foo.com
+Accept: */*
</protocol>
<file name="log/jar61.txt" mode="text">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
#HttpOnly_.foo.com TRUE /we/want/ FALSE 2054030187 test yes
diff --git a/tests/data/test62 b/tests/data/test62
index 99eca1ec..51b88709 100644
--- a/tests/data/test62
+++ b/tests/data/test62
@@ -29,11 +29,11 @@ http
HTTP, send cookies when using custom Host:
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/62 -b log/jar62.txt -H "Host: www.host.foo.com"
+http://%HOSTIP:%HTTPPORT/we/want/62 http://%HOSTIP:%HTTPPORT/we/want?hoge=fuga -b log/jar62.txt -H "Host: www.host.foo.com"
</command>
<file name="log/jar62.txt">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
#HttpOnly_.foo.com TRUE /we/want/ FALSE 2054030187 test yes
@@ -51,9 +51,14 @@ http://%HOSTIP:%HTTPPORT/we/want/62 -b log/jar62.txt -H "Host: www.host.foo.com"
</strip>
<protocol>
GET /we/want/62 HTTP/1.1
+Host: www.host.foo.com
Accept: */*
Cookie: test2=yes; test=yes
+
+GET /we/want?hoge=fuga HTTP/1.1
Host: www.host.foo.com
+Accept: */*
+Cookie: test2=yes; test=yes
</protocol>
</verify>
diff --git a/tests/data/test623 b/tests/data/test623
index 19e505b2..1a639d69 100644
--- a/tests/data/test623
+++ b/tests/data/test623
@@ -33,6 +33,9 @@ for ssh upload test
#
# Verify data after the test has been "shot"
<verify>
+<valgrind>
+disable
+</valgrind>
<errorcode>
79
</errorcode>
diff --git a/tests/data/test627 b/tests/data/test627
index ae29d9b5..01c5221a 100644
--- a/tests/data/test627
+++ b/tests/data/test627
@@ -2,7 +2,7 @@
<info>
<keywords>
SFTP
-quote
+pre-quote
NOBODY
</keywords>
</info>
diff --git a/tests/data/test63 b/tests/data/test63
index 66ed1d86..ccc19dd2 100644
--- a/tests/data/test63
+++ b/tests/data/test63
@@ -42,8 +42,8 @@ http://we.want.that.site.com/63
</strip>
<protocol>
GET http://we.want.that.site.com/63 HTTP/1.1
-Proxy-Authorization: Basic ZmFrZTp1c2Vy
Host: we.want.that.site.com
+Proxy-Authorization: Basic ZmFrZTp1c2Vy
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test638 b/tests/data/test638
new file mode 100644
index 00000000..c72cf636
--- /dev/null
+++ b/tests/data/test638
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+post-quote
+acceptfail
+asterisk
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+Dummy test file for rename test
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<precheck>
+perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test638.dir
+</precheck>
+ <name>
+SFTP post-quote rename * asterisk accept-fail
+ </name>
+ <command>
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test638.dir %PWD/log/test638.new" sftp://%HOSTIP:%SSHPORT%PWD/log/file638.txt --insecure
+</command>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test638.new
+</postcheck>
+<file name="log/file638.txt">
+Dummy test file for rename test
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+</verify>
+</testcase>
diff --git a/tests/data/test639 b/tests/data/test639
new file mode 100644
index 00000000..8dfe8597
--- /dev/null
+++ b/tests/data/test639
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+post-quote
+acceptfail
+asterisk
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+Dummy test file for rename test
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<precheck>
+perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test639.dir
+</precheck>
+ <name>
+SFTP post-quote rename * asterisk accept-fail
+ </name>
+ <command>
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test639-not-exists-dir %PWD/log/test639.new" sftp://%HOSTIP:%SSHPORT%PWD/log/file639.txt --insecure
+</command>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test639.dir
+</postcheck>
+<file name="log/file639.txt">
+Dummy test file for rename test
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+</verify>
+</testcase>
diff --git a/tests/data/test64 b/tests/data/test64
index 6bd82a8e..804a6fa8 100644
--- a/tests/data/test64
+++ b/tests/data/test64
@@ -52,6 +52,7 @@ This IS the real page!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -73,9 +74,9 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /64 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca"
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test640 b/tests/data/test640
new file mode 100644
index 00000000..e3e715ba
--- /dev/null
+++ b/tests/data/test640
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+NOBODY
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+sftp
+</server>
+ <name>
+SFTP --head retrieval
+ </name>
+ <command>
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%PWD/log/file640.txt --insecure --head
+</command>
+<file name="log/file640.txt">
+Test data
+for ssh test
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+</verify>
+</testcase>
diff --git a/tests/data/test641 b/tests/data/test641
new file mode 100644
index 00000000..beb59d6a
--- /dev/null
+++ b/tests/data/test641
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+SCP
+NOBODY
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+scp
+</server>
+ <name>
+SCP --head retrieval
+ </name>
+ <command>
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%PWD/log/file641.txt --insecure --head
+</command>
+<file name="log/file641.txt">
+Test data
+for ssh test
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+</verify>
+</testcase>
diff --git a/tests/data/test65 b/tests/data/test65
index 8582a0ca..f0b97421 100644
--- a/tests/data/test65
+++ b/tests/data/test65
@@ -52,6 +52,7 @@ This is not the real page either
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -73,9 +74,9 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /65 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/65", response="66d68d3251f1839576ba7c766cf9205b"
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test67 b/tests/data/test67
index bfe6edd2..b3431111 100644
--- a/tests/data/test67
+++ b/tests/data/test67
@@ -56,6 +56,8 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -84,15 +86,15 @@ chkhostname curlhost
</strip>
<protocol>
GET /67 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /67 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
</protocol>
diff --git a/tests/data/test68 b/tests/data/test68
index 10b4429c..acd710fe 100644
--- a/tests/data/test68
+++ b/tests/data/test68
@@ -55,6 +55,8 @@ Wrong password dude. Get it fixed and return.
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -83,15 +85,15 @@ chkhostname curlhost
</strip>
<protocol>
GET /68 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /68 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
</protocol>
diff --git a/tests/data/test69 b/tests/data/test69
index 441aed7e..887a4603 100644
--- a/tests/data/test69
+++ b/tests/data/test69
@@ -72,6 +72,8 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -100,20 +102,20 @@ chkhostname curlhost
</strip>
<protocol>
GET /69 HTTP/1.1
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
GET /69 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /69 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
</protocol>
diff --git a/tests/data/test70 b/tests/data/test70
index 2fc03274..9057d6a4 100644
--- a/tests/data/test70
+++ b/tests/data/test70
@@ -52,6 +52,7 @@ This IS the real page!
# Client-side
<client>
<features>
+!SSPI
NTLM
</features>
<server>
@@ -72,14 +73,14 @@ http://%HOSTIP:%HTTPPORT/70 -u testuser:testpass --anyauth
</strip>
<protocol>
GET /70 HTTP/1.1
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
GET /70 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/70", response="2c9a6f00af0d86497b177b90e90c688a"
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test708 b/tests/data/test708
new file mode 100644
index 00000000..716d9aec
--- /dev/null
+++ b/tests/data/test708
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+SOCKS4
+</keywords>
+</info>
+
+#
+# Server-side
+<reply name="1">
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+socks4
+</server>
+<setenv>
+all_proxy=socks4://%HOSTIP:%SOCKSPORT
+</setenv>
+ <name>
+HTTP GET via SOCKS4 proxy
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/708
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /708 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test709 b/tests/data/test709
new file mode 100644
index 00000000..02268885
--- /dev/null
+++ b/tests/data/test709
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+SOCKS5
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+socks5
+</server>
+<setenv>
+http_proxy=socks5://%HOSTIP:%SOCKSPORT
+</setenv>
+ <name>
+HTTP GET via SOCKS5 set in http_proxy environment variable
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/709
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /709 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test710 b/tests/data/test710
new file mode 100644
index 00000000..884eb50a
--- /dev/null
+++ b/tests/data/test710
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+SOCKS5
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+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
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+socks5
+</server>
+ <name>
+HTTP GET via SOCKS5 set with --proxy
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/710 --proxy socks5://%HOSTIP:%SOCKSPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /710 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test711 b/tests/data/test711
new file mode 100644
index 00000000..7be1f3cb
--- /dev/null
+++ b/tests/data/test711
@@ -0,0 +1,52 @@
+<testcase>
+#based off test 707 after bug report #1218
+<info>
+<keywords>
+FTP
+PASV
+RETR
+SOCKS5
+all_proxy
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+silly content
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+socks5
+</server>
+<setenv>
+all_proxy=socks5://%HOSTIP:%SOCKSPORT
+</setenv>
+ <name>
+FTP fetch with all_proxy set to socks5
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/711
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 711
+RETR 711
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test712 b/tests/data/test712
new file mode 100644
index 00000000..c62e9f2c
--- /dev/null
+++ b/tests/data/test712
@@ -0,0 +1,49 @@
+<testcase>
+#based off test 707 after bug report #1218
+<info>
+<keywords>
+FTP
+PASV
+RETR
+SOCKS5
+all_proxy
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+silly content
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+socks5
+</server>
+ <name>
+FTP fetch with --proxy set to socks5://
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/712 --proxy socks5://%HOSTIP:%SOCKSPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 712
+RETR 712
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test72 b/tests/data/test72
index 5c24271f..8e3adaa5 100644
--- a/tests/data/test72
+++ b/tests/data/test72
@@ -54,6 +54,7 @@ This IS the real page!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -71,14 +72,14 @@ http://%HOSTIP:%HTTPPORT/72 -u testuser:testpass --anyauth
</strip>
<protocol>
GET /72 HTTP/1.1
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
GET /72 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/72", response="9fcd1330377365a09bbcb33b2cbb25bd"
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test73 b/tests/data/test73
index dec08010..a23546d4 100644
--- a/tests/data/test73
+++ b/tests/data/test73
@@ -40,13 +40,13 @@ http://%HOSTIP:%HTTPPORT/we/want/73 -c log/jar73.txt -H "Host: host.NOT_DISCLOSE
</strip>
<protocol>
GET /we/want/73 HTTP/1.1
-Accept: */*
Host: host.NOT_DISCLOSED.se
+Accept: */*
</protocol>
<file name="log/jar73.txt" mode="text">
# Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
.NOT_DISCLOSED.se TRUE / FALSE 0 IPCZQX01af0fca5c 000010008168c200d25dfc4b
diff --git a/tests/data/test74 b/tests/data/test74
index 4c08e26e..dbe0e9c1 100644
--- a/tests/data/test74
+++ b/tests/data/test74
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP GET
+globbing
{} list
</keywords>
</info>
diff --git a/tests/data/test75 b/tests/data/test75
index 07f6990b..d8836b95 100644
--- a/tests/data/test75
+++ b/tests/data/test75
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP GET
+globbing
FAILURE
</keywords>
</info>
@@ -24,7 +25,7 @@ http
HTTP, urlglob retrieval with bad range
</name>
<command option="no-output">
-"http://%HOSTIP:%HTTPPORT/[2-1]" -o "log/weee#1.dump" --stderr -
+"http://a-site-never-accessed.example.org/[2-1]" -o "log/weee#1.dump" --stderr -
</command>
# The error message on stdout implicitly depends on the length of the
# URL, so refuse to run if the length is unexpected.
@@ -43,7 +44,7 @@ perl %SRCDIR/libtest/test75.pl http://%HOSTIP:%HTTPPORT/ 22
3
</errorcode>
<stdout mode="text">
-curl: (3) [globbing] error: bad range specification after pos 24
+curl: (3) [globbing] bad range in column 47
</stdout>
</verify>
</testcase>
diff --git a/tests/data/test77 b/tests/data/test77
index 90f4563b..6a92158c 100644
--- a/tests/data/test77
+++ b/tests/data/test77
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP GET
+If-Modified-Since
-z
</keywords>
</info>
diff --git a/tests/data/test78 b/tests/data/test78
index aa889c50..6768000b 100644
--- a/tests/data/test78
+++ b/tests/data/test78
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP GET
+If-Modified-Since
-z
</keywords>
</info>
diff --git a/tests/data/test8 b/tests/data/test8
index 4a6e0045..030fd55e 100644
--- a/tests/data/test8
+++ b/tests/data/test8
@@ -35,16 +35,20 @@ Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Type: text/html
Funny-head: yesyes
-Set-Cookie: foobar=name; domain=127.0.0.1; path=/;
-Set-Cookie: mismatch=this; domain=127.0.0.1; path="/silly/";
+Set-Cookie: foobar=name; domain=%HOSTIP; path=/;
+Set-Cookie: mismatch=this; domain=%HOSTIP; path="/silly/";
Set-Cookie: partmatch=present; domain=.0.0.1; path=/w;
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=.0.0.1; domain=.0.0.1; expiry=totally bad;
+Set-Cookie: blexp=yesyes; domain=%HOSTIP; domain=%HOSTIP; expiry=totally bad;
+Set-Cookie: partialip=nono; domain=.0.0.1;
</file>
+<precheck>
+perl -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}'
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -56,7 +60,7 @@ Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;
GET /we/want/8 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
-Cookie: cookie=perhaps; cookie=yes; partmatch=present; foobar=name; blexp=yesyes
+Cookie: cookie=perhaps; cookie=yes; foobar=name; blexp=yesyes
</protocol>
</verify>
diff --git a/tests/data/test80 b/tests/data/test80
index a405af7a..147a6aa1 100644
--- a/tests/data/test80
+++ b/tests/data/test80
@@ -24,6 +24,10 @@ Content-Length: 9
contents
</data>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+
+</connect>
<datacheck>
HTTP/1.1 200 Mighty fine indeed
@@ -43,12 +47,13 @@ contents
<client>
<server>
http
+http-proxy
</server>
<name>
-HTTP 1.0 CONNECT with proxytunnel and host Basic authentication
+HTTP 1.0 CONNECT with proxytunnel and proxy+host Basic authentication
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%HTTPPORT --user iam:myself --proxy-user youare:yourself
+http://test.80:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself
</command>
</client>
@@ -58,17 +63,19 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%HTTPPORT --
<strip>
^User-Agent:.*
</strip>
-<protocol>
-CONNECT %HOSTIP:%HTTPPORT HTTP/1.0
-Host: %HOSTIP:%HTTPPORT
+<proxy>
+CONNECT test.80:%HTTPPORT HTTP/1.0
+Host: test.80:%HTTPPORT
Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
Proxy-Connection: Keep-Alive
+</proxy>
+<protocol>
GET /we/want/that/page/80 HTTP/1.1
+Host: test.80:%HTTPPORT
Authorization: Basic aWFtOm15c2VsZg==
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test800 b/tests/data/test800
index 3281b632..6b29f7a2 100644
--- a/tests/data/test800
+++ b/tests/data/test800
@@ -1,8 +1,9 @@
<testcase>
<info>
<keywords>
-POP3
-RETR
+IMAP
+Clear Text
+FETCH
</keywords>
</info>
@@ -10,13 +11,13 @@ RETR
# Server-side
<reply>
<data>
-From: me@somewhere
-To: fake@nowhere
-
-body
-
---
- yours sincerely
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
</data>
</reply>
@@ -24,13 +25,13 @@ body
# Client-side
<client>
<server>
-pop3
+imap
</server>
<name>
-POP3 RETR
+IMAP FETCH message
</name>
<command>
-pop3://%HOSTIP:%POP3PORT/800 -u user:secret
+'imap://%HOSTIP:%IMAPPORT/800/;UID=1' -u user:secret
</command>
</client>
@@ -38,10 +39,11 @@ pop3://%HOSTIP:%POP3PORT/800 -u user:secret
# Verify data after the test has been "shot"
<verify>
<protocol>
-USER user
-PASS secret
-RETR 800
-QUIT
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 800
+A004 FETCH 1 BODY[]
+A005 LOGOUT
</protocol>
</verify>
</testcase>
diff --git a/tests/data/test801 b/tests/data/test801
index 271d8d1f..0012d3e4 100644
--- a/tests/data/test801
+++ b/tests/data/test801
@@ -2,6 +2,7 @@
<info>
<keywords>
IMAP
+Clear Text
FETCH
</keywords>
</info>
@@ -10,13 +11,10 @@ FETCH
# Server-side
<reply>
<data>
-From: me@somewhere
-To: fake@nowhere
-
-body
-
---
- yours sincerely
+body
+
+--
+ yours sincerely
</data>
</reply>
@@ -27,10 +25,10 @@ body
imap
</server>
<name>
-IMAP FETCH
+IMAP FETCH message by UID and SECTION
</name>
<command>
-imap://%HOSTIP:%IMAPPORT/801 -u user:secret
+'imap://%HOSTIP:%IMAPPORT/801/;UID=123/;SECTION=1' -u user:secret
</command>
</client>
@@ -38,10 +36,11 @@ imap://%HOSTIP:%IMAPPORT/801 -u user:secret
# Verify data after the test has been "shot"
<verify>
<protocol>
-B LOGIN user secret
-C SELECT 801
-D FETCH 1 BODY[TEXT]
-A LOGOUT
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 801
+A004 FETCH 123 BODY[1]
+A005 LOGOUT
</protocol>
</verify>
</testcase>
diff --git a/tests/data/test802 b/tests/data/test802
index 7027c802..17349a89 100644
--- a/tests/data/test802
+++ b/tests/data/test802
@@ -1,32 +1,35 @@
<testcase>
<info>
<keywords>
-SMTP
+IMAP
+Clear Text
+SELECT
+UIDVALIDITY
</keywords>
</info>
#
# Server-side
<reply>
+<data>
+body
+
+--
+ yours sincerely
+</data>
</reply>
#
# Client-side
<client>
<server>
-smtp
+imap
</server>
<name>
-SMTP
+IMAP SELECT UIDVALIDITY Success
</name>
-<stdin>
-From: different
-To: another
-
-body
-</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 802@foo --mail-rcpt 802@foobar.example --mail-from 802@from -T -
+'imap://%HOSTIP:%IMAPPORT/802;UIDVALIDITY=3857529045/;UID=123/;SECTION=TEXT' -u user:secret
</command>
</client>
@@ -34,20 +37,11 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 802@foo --mail-rcpt 802@foobar.example
# Verify data after the test has been "shot"
<verify>
<protocol>
-EHLO user
-MAIL FROM:802@from
-RCPT TO:<802@foo>
-RCPT TO:<802@foobar.example>
-DATA
-QUIT
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 802
+A004 FETCH 123 BODY[TEXT]
+A005 LOGOUT
</protocol>
-<upload>
-From: different
-To: another
-
-body
-
-.
-</upload>
</verify>
</testcase>
diff --git a/tests/data/test803 b/tests/data/test803
index 24ff0d00..5b8cc9eb 100644
--- a/tests/data/test803
+++ b/tests/data/test803
@@ -1,7 +1,11 @@
<testcase>
<info>
<keywords>
-SMTP
+IMAP
+Clear Text
+SELECT
+UIDVALIDITY
+FAILURE
</keywords>
</info>
@@ -14,51 +18,28 @@ SMTP
# Client-side
<client>
<server>
-smtp
+imap
</server>
<name>
-SMTP with CRLF-dot-CRLF in data
+IMAP SELECT UIDVALIDITY Failure
</name>
-<stdin>
-From: different
-To: another
-
-
-.
-.
-
-.
-
-body
-</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 803@foo --mail-from 803@from -T -
+'imap://%HOSTIP:%IMAPPORT/803;UIDVALIDITY=12345/;UID=123' -u user:secret
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
+# CURLE_REMOTE_FILE_NOT_FOUND - UIDVALIDITY mismatch
+<errorcode>
+78
+</errorcode>
<protocol>
-EHLO user
-MAIL FROM:803@from
-RCPT TO:<803@foo>
-DATA
-QUIT
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 803
+A004 LOGOUT
</protocol>
-<upload>
-From: different
-To: another
-
-
-..
-..
-
-..
-
-body
-
-.
-</upload>
</verify>
</testcase>
diff --git a/tests/data/test804 b/tests/data/test804
index 3d490c52..c6dfccf4 100644
--- a/tests/data/test804
+++ b/tests/data/test804
@@ -1,38 +1,34 @@
<testcase>
<info>
<keywords>
-SMTP
-SMTP HELO
-RFC821
+IMAP
+Clear Text
+SELECT
</keywords>
</info>
#
# Server-side
<reply>
-<servercmd>
-REPLY EHLO 500 Command unrecognized
-REPLY HELO 250 Already old but still servicing...
-</servercmd>
+<data>
+body
+
+--
+ yours sincerely
+</data>
</reply>
#
# Client-side
<client>
<server>
-smtp
+imap
</server>
<name>
-RFC821-only SMTP server (EHLO not supported)
+IMAP doesn't perform SELECT if re-using the same mailbox
</name>
-<stdin>
-From: different
-To: another
-
-body
-</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 804@foo --mail-from 804@from -T -
+'imap://%HOSTIP:%IMAPPORT/804/;UID=123/;SECTION=1' 'imap://%HOSTIP:%IMAPPORT/804/;UID=456/;SECTION=2.3' -u user:secret
</command>
</client>
@@ -40,20 +36,12 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 804@foo --mail-from 804@from -T -
# Verify data after the test has been "shot"
<verify>
<protocol>
-EHLO user
-HELO user
-MAIL FROM:804@from
-RCPT TO:<804@foo>
-DATA
-QUIT
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 804
+A004 FETCH 123 BODY[1]
+A005 FETCH 456 BODY[2.3]
+A006 LOGOUT
</protocol>
-<upload>
-From: different
-To: another
-
-body
-
-.
-</upload>
</verify>
</testcase>
diff --git a/tests/data/test805 b/tests/data/test805
index fba5124f..e70c1a66 100644
--- a/tests/data/test805
+++ b/tests/data/test805
@@ -1,54 +1,62 @@
<testcase>
<info>
<keywords>
-SMTP
-SMTP AUTH PLAIN
-RFC4616
-RFC4954
+IMAP
+Clear Text
+APPEND
+UPLOAD
</keywords>
</info>
#
# Server-side
<reply>
-<servercmd>
-REPLY EHLO 220 AUTH PLAIN
-REPLY AUTH 235 Authenticated
-</servercmd>
</reply>
#
# Client-side
<client>
<server>
-smtp
+imap
</server>
<name>
-SMTP plain authentication
+IMAP APPEND message
</name>
-<stdin>
-mail body
-</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 805@foo --mail-from 805@from -u test:1234 -T -
+imap://%HOSTIP:%IMAPPORT/805 -T log/upload805 -u user:secret
</command>
+<file name="log/upload805">
+Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+From: Fred Foobar <foobar@example.COM>
+Subject: afternoon meeting
+To: joe@example.com
+Message-Id: <B27397-0100000@example.COM>
+MIME-Version: 1.0
+Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+
+Hello Joe, do you think we can meet at 3:30 tomorrow?
+</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
-EHLO user
-AUTH PLAIN dGVzdAB0ZXN0ADEyMzQ=
-MAIL FROM:805@from
-RCPT TO:<805@foo>
-DATA
-QUIT
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 APPEND 805 (\Seen) {295}
+A004 LOGOUT
</protocol>
<upload>
-mail body
+Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
+From: Fred Foobar <foobar@example.COM>
+Subject: afternoon meeting
+To: joe@example.com
+Message-Id: <B27397-0100000@example.COM>
+MIME-Version: 1.0
+Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
-.
+Hello Joe, do you think we can meet at 3:30 tomorrow?
</upload>
</verify>
</testcase>
diff --git a/tests/data/test806 b/tests/data/test806
index 8ece5dc8..37822a47 100644
--- a/tests/data/test806
+++ b/tests/data/test806
@@ -1,36 +1,33 @@
<testcase>
<info>
<keywords>
-SMTP
-SMTP AUTH LOGIN
-RFC4954
+IMAP
+Clear Text
+LIST
</keywords>
</info>
#
# Server-side
<reply>
-<servercmd>
-REPLY EHLO 220 AUTH LOGIN
-REPLY AUTH 334 UGFzc3dvcmQ6
-REPLY MTIzNA== 235 Authenticated
-</servercmd>
+<data>
+* LIST () "/" /806/blurdybloop
+* LIST (\Noselect) "/" /806/foo
+* LIST () "/" /806/foo/bar
+</data>
</reply>
#
# Client-side
<client>
<server>
-smtp
+imap
</server>
<name>
-SMTP login authentication
+IMAP LIST mailbox
</name>
-<stdin>
-mail body
-</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 806@foo --mail-from 806@from -u test:1234 -T -
+imap://%HOSTIP:%IMAPPORT/806 -u user:secret
</command>
</client>
@@ -38,18 +35,10 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 806@foo --mail-from 806@from -u test:1
# Verify data after the test has been "shot"
<verify>
<protocol>
-EHLO user
-AUTH LOGIN dGVzdA==
-MTIzNA==
-MAIL FROM:806@from
-RCPT TO:<806@foo>
-DATA
-QUIT
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 LIST "806" *
+A004 LOGOUT
</protocol>
-<upload>
-mail body
-
-.
-</upload>
</verify>
</testcase>
diff --git a/tests/data/test807 b/tests/data/test807
index 6daa1d02..1271b6d6 100644
--- a/tests/data/test807
+++ b/tests/data/test807
@@ -1,40 +1,34 @@
<testcase>
<info>
<keywords>
-SMTP
-SMTP AUTH CRAM-MD5
-RFC2195
-RFC4954
+IMAP
+Clear Text
+LSUB
+CUSTOMREQUEST
</keywords>
</info>
#
# Server-side
<reply>
-<servercmd>
-REPLY EHLO 220 AUTH CRAM-MD5
-REPLY AUTH 334 PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
-REPLY dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw 235 Authenticated
-</servercmd>
+<data>
+* LSUB () "/" /807/blurdybloop
+* LSUB (\Noselect) "/" /807/foo
+* LSUB () "/" /807/foo/bar
+</data>
</reply>
#
# Client-side
<client>
<server>
-smtp
+imap
</server>
-<features>
-crypto
-</features>
<name>
-SMTP CRAM-MD5 authentication
+IMAP LSUB mailbox
</name>
-<stdin>
-mail body
-</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 807@foo --mail-from 807@from -u tim:tanstaaftanstaaf -T -
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'LSUB "807" *'
</command>
</client>
@@ -42,18 +36,10 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 807@foo --mail-from 807@from -u tim:ta
# Verify data after the test has been "shot"
<verify>
<protocol>
-EHLO user
-AUTH CRAM-MD5
-dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
-MAIL FROM:807@from
-RCPT TO:<807@foo>
-DATA
-QUIT
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 LSUB "807" *
+A004 LOGOUT
</protocol>
-<upload>
-mail body
-
-.
-</upload>
</verify>
</testcase>
diff --git a/tests/data/test808 b/tests/data/test808
new file mode 100644
index 00000000..30c8bdfd
--- /dev/null
+++ b/tests/data/test808
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+EXAMINE
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+* 17 EXISTS
+* 2 RECENT
+* OK [UNSEEN 8] Message 8 is first unseen
+* OK [UIDVALIDITY 3857529045] UIDs valid
+* OK [UIDNEXT 4392] Predicted next UID
+* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
+* OK [PERMANENTFLAGS ()] No permanent flags permitted
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP EXAMINE mailbox (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'EXAMINE 808'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 EXAMINE 808
+A004 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test809 b/tests/data/test809
new file mode 100644
index 00000000..4283179d
--- /dev/null
+++ b/tests/data/test809
@@ -0,0 +1,43 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+STATUS
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+* STATUS 809 (MESSAGES 231 UIDNEXT 44292)
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP mailbox STATUS (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'STATUS 809 (UIDNEXT MESSAGES)'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 STATUS 809 (UIDNEXT MESSAGES)
+A004 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test81 b/tests/data/test81
index 0da0bdca..dc054d29 100644
--- a/tests/data/test81
+++ b/tests/data/test81
@@ -55,6 +55,8 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -83,16 +85,16 @@ chkhostname curlhost
</strip>
<protocol>
GET http://%HOSTIP:%HTTPPORT/81 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
GET http://%HOSTIP:%HTTPPORT/81 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test810 b/tests/data/test810
new file mode 100644
index 00000000..6b4d243f
--- /dev/null
+++ b/tests/data/test810
@@ -0,0 +1,43 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+SEARCH
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+* SEARCH 1 123 456 810
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP SEARCH for NEW messages
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT/810?NEW -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 810
+A004 SEARCH NEW
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test811 b/tests/data/test811
new file mode 100644
index 00000000..8fb3aa7a
--- /dev/null
+++ b/tests/data/test811
@@ -0,0 +1,40 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+CREATE
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP CREATE mailbox (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'CREATE 811'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 CREATE 811
+A004 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test812 b/tests/data/test812
new file mode 100644
index 00000000..6d1b42df
--- /dev/null
+++ b/tests/data/test812
@@ -0,0 +1,40 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+DELETE
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP DELETE mailbox (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'DELETE 812'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 DELETE 812
+A004 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test813 b/tests/data/test813
new file mode 100644
index 00000000..3544da67
--- /dev/null
+++ b/tests/data/test813
@@ -0,0 +1,40 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+RENAME
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP RENAME mailbox (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'RENAME 666 813'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 RENAME 666 813
+A004 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test814 b/tests/data/test814
new file mode 100644
index 00000000..0b90e5bc
--- /dev/null
+++ b/tests/data/test814
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+CHECK
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP CHECK mailbox (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT/814 -u user:secret -X 'CHECK'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 814
+A004 CHECK
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test815 b/tests/data/test815
new file mode 100644
index 00000000..6ebe5bf6
--- /dev/null
+++ b/tests/data/test815
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+STORE
+CLOSE
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data1>
+* 123 FETCH (FLAGS (\Seen \Deleted))
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP STORE - delete message (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT/815 -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/815 -X CLOSE -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 815
+A004 STORE 123 +Flags \Deleted
+A005 CLOSE
+A006 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test816 b/tests/data/test816
new file mode 100644
index 00000000..6df9b7df
--- /dev/null
+++ b/tests/data/test816
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+STORE
+EXPUNGE
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data1>
+* 123 FETCH (FLAGS (\Seen \Deleted))
+</data1>
+<data2>
+* 123 EXPUNGE
+</data2>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP STORE - delete message with confirmation (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT/816 -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/816 -X EXPUNGE -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 SELECT 816
+A004 STORE 123 +Flags \Deleted
+A005 EXPUNGE
+A006 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test817 b/tests/data/test817
new file mode 100644
index 00000000..9b44ae9b
--- /dev/null
+++ b/tests/data/test817
@@ -0,0 +1,40 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+COPY
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP COPY message to mailbox (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'COPY 123 817'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 COPY 123 817
+A004 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test818 b/tests/data/test818
new file mode 100644
index 00000000..95282c4e
--- /dev/null
+++ b/tests/data/test818
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+NOOP
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+* 22 EXPUNGE
+* 23 EXISTS
+* 3 RECENT
+* 14 FETCH (FLAGS (\Seen \Deleted))
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP NOOP (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT -X NOOP -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user secret
+A003 NOOP
+A004 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test819 b/tests/data/test819
new file mode 100644
index 00000000..d0aa47ba
--- /dev/null
+++ b/tests/data/test819
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH PLAIN
+RFC4616
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH PLAIN
+REPLY AUTHENTICATE +
+REPLY dXNlcgB1c2VyAHNlY3JldA== A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP plain authentication
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/819/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+A003 SELECT 819
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test82 b/tests/data/test82
index 9e800bb7..8b58f75d 100644
--- a/tests/data/test82
+++ b/tests/data/test82
@@ -45,9 +45,9 @@ http://%HOSTIP:%HTTPPORT/82 --proxy-user testuser:testpass -x http://%HOSTIP:%HT
</strip>
<protocol>
GET http://%HOSTIP:%HTTPPORT/82 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Proxy-Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test820 b/tests/data/test820
new file mode 100644
index 00000000..f638f1cb
--- /dev/null
+++ b/tests/data/test820
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH LOGIN
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH LOGIN
+REPLY AUTHENTICATE + VXNlcm5hbWU6
+REPLY dXNlcg== + UGFzc3dvcmQ6
+REPLY c2VjcmV0 A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP login authentication
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/820/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE LOGIN
+dXNlcg==
+c2VjcmV0
+A003 SELECT 820
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test821 b/tests/data/test821
new file mode 100644
index 00000000..aee373b9
--- /dev/null
+++ b/tests/data/test821
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH CRAM-MD5
+RFC2195
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH CRAM-MD5
+REPLY AUTHENTICATE + PDE5NzIuOTg3NjU0MzIxQGN1cmw+
+REPLY dXNlciA3MDMxNzI1NTk5ZmRiYjVkNDEyNjg5YWEzMjNlM2UwYg== A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+crypto
+</features>
+ <name>
+IMAP CRAM-MD5 authentication
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/821/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE CRAM-MD5
+dXNlciA3MDMxNzI1NTk5ZmRiYjVkNDEyNjg5YWEzMjNlM2UwYg==
+A003 SELECT 821
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test822 b/tests/data/test822
new file mode 100644
index 00000000..65ac43e5
--- /dev/null
+++ b/tests/data/test822
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH NTLM
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM
+REPLY AUTHENTICATE +
+REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+NTLM
+!SSPI
+debug
+</features>
+ <name>
+IMAP NTLM authentication
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/822/;UID=1' -u testuser:testpass
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE NTLM
+TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+A003 SELECT 822
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test823 b/tests/data/test823
new file mode 100644
index 00000000..6f8249b1
--- /dev/null
+++ b/tests/data/test823
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH DIGEST-MD5
+RFC2831
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5
+REPLY AUTHENTICATE + cmVhbG09ImN1cmwiLG5vbmNlPSI1MzAwZDE3YTFkNjk1YmQ0MTFlNGNkZjk2Zjk1NDhjMjNjZWQ2MTc1IixhbGdvcml0aG09bWQ1LXNlc3MscW9wPSJhdXRoIg==
+REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJpbWFwL2N1cmwiLHJlc3BvbnNlPWJlYjMzYmY2MWFhMDgzNzZmZWE4ZjJkM2MwODliMjFmLHFvcD1hdXRo +
+REPLY A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+!SSPI
+debug
+crypto
+</features>
+ <name>
+IMAP DIGEST-MD5 authentication
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/823/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE DIGEST-MD5
+dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJpbWFwL2N1cmwiLHJlc3BvbnNlPWJlYjMzYmY2MWFhMDgzNzZmZWE4ZjJkM2MwODliMjFmLHFvcD1hdXRo
+
+A003 SELECT 823
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test824 b/tests/data/test824
new file mode 100644
index 00000000..242c1b4a
--- /dev/null
+++ b/tests/data/test824
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH OAUTH2
+RFC6749
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH XOAUTH2
+REPLY AUTHENTICATE +
+REPLY dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP OAuth 2.0 authentication
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/824/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE XOAUTH2
+dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB
+A003 SELECT 824
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test825 b/tests/data/test825
new file mode 100644
index 00000000..6532b3ac
--- /dev/null
+++ b/tests/data/test825
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH PLAIN
+SASL-IR
+RFC4616
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH PLAIN
+CAPA SASL-IR
+REPLY AUTHENTICATE A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP plain authentication with initial response
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/825/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE PLAIN dXNlcgB1c2VyAHNlY3JldA==
+A003 SELECT 825
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test826 b/tests/data/test826
new file mode 100644
index 00000000..0f928294
--- /dev/null
+++ b/tests/data/test826
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH LOGIN
+SASL-IR
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH LOGIN
+CAPA SASL-IR
+REPLY AUTHENTICATE + UGFzc3dvcmQ6
+REPLY c2VjcmV0 A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP login authentication with initial response
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/826/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE LOGIN dXNlcg==
+c2VjcmV0
+A003 SELECT 826
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test827 b/tests/data/test827
new file mode 100644
index 00000000..778e7658
--- /dev/null
+++ b/tests/data/test827
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH NTLM
+SASL-IR
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM
+CAPA SASL-IR
+REPLY AUTHENTICATE + TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+NTLM
+!SSPI
+debug
+</features>
+ <name>
+IMAP NTLM authentication with initial response
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/827/;UID=1' -u testuser:testpass
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+A003 SELECT 827
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test828 b/tests/data/test828
new file mode 100644
index 00000000..b2fb693f
--- /dev/null
+++ b/tests/data/test828
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH OAUTH2
+SASL-IR
+RFC6749
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH XOAUTH2
+CAPA SASL-IR
+REPLY AUTHENTICATE A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP OAuth 2.0 authentication with initial response
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/828/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE XOAUTH2 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB
+A003 SELECT 828
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test829 b/tests/data/test829
new file mode 100644
index 00000000..cefba0d7
--- /dev/null
+++ b/tests/data/test829
@@ -0,0 +1,29 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+CRLF-in-URL
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP with URL-encoded CR LF in the URL
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT/%0d%0a/829
+</command>
+</client>
+
+#
+<verify>
+# 3 - CURLE_URL_MALFORMAT
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test83 b/tests/data/test83
index 0ada5d1a..120bcc6a 100644
--- a/tests/data/test83
+++ b/tests/data/test83
@@ -21,6 +21,10 @@ Content-Length: 9
contents
</data>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+
+</connect>
<datacheck>
HTTP/1.1 200 Mighty fine indeed
@@ -40,12 +44,13 @@ contents
<client>
<server>
http
+http-proxy
</server>
<name>
HTTP over proxy-tunnel with site authentication
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%HTTPPORT --user iam:myself
+http://test.83:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%PROXYPORT --user 'iam:my:;self'
</command>
</client>
@@ -55,16 +60,18 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%HTTPPORT --user iam
<strip>
^User-Agent:.*
</strip>
-<protocol>
-CONNECT %HOSTIP:%HTTPPORT HTTP/1.1
+<proxy>
+CONNECT test.83:%HTTPPORT HTTP/1.1
+Host: test.83:%HTTPPORT
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Proxy-Connection: Keep-Alive
+</proxy>
+<protocol>
GET /we/want/that/page/83 HTTP/1.1
-Authorization: Basic aWFtOm15c2VsZg==
+Host: test.83:%HTTPPORT
+Authorization: Basic aWFtOm15OjtzZWxm
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
diff --git a/tests/data/test830 b/tests/data/test830
new file mode 100644
index 00000000..5803bb11
--- /dev/null
+++ b/tests/data/test830
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH CRAM-MD5
+SASL CANCELLATION
+RFC2195
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH CRAM-MD5
+CAPA LOGINDISABLED
+REPLY AUTHENTICATE + Rubbish
+REPLY * A002 NO AUTH exchange cancelled by client
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+crypto
+</features>
+ <name>
+IMAP CRAM-MD5 graceful cancellation
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/830/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "LOGOUT"
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE CRAM-MD5
+*
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test831 b/tests/data/test831
new file mode 100644
index 00000000..8bff7eac
--- /dev/null
+++ b/tests/data/test831
@@ -0,0 +1,67 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH NTLM
+SASL CANCELLATION
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM
+CAPA LOGINDISABLED
+REPLY AUTHENTICATE +
+REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + Rubbish
+REPLY * A002 NO AUTH exchange cancelled by client
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+NTLM
+!SSPI
+</features>
+ <name>
+IMAP NTLM graceful cancellation
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/831/;UID=1' -u testuser:testpass
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "LOGOUT"
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE NTLM
+TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+*
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test832 b/tests/data/test832
new file mode 100644
index 00000000..044edb19
--- /dev/null
+++ b/tests/data/test832
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH DIGEST-MD5
+SASL CANCELLATION
+RFC2831
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5
+CAPA LOGINDISABLED
+REPLY AUTHENTICATE + Rubbish
+REPLY * A002 NO AUTH exchange cancelled by client
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+!SSPI
+debug
+crypto
+</features>
+ <name>
+IMAP DIGEST-MD5 graceful cancellation
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/832/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "LOGOUT"
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE DIGEST-MD5
+*
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test833 b/tests/data/test833
new file mode 100644
index 00000000..b5fa03f9
--- /dev/null
+++ b/tests/data/test833
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH CRAM-MD5
+SASL AUTH PLAIN
+SASL DOWNGRADE
+RFC2195
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH CRAM-MD5 PLAIN
+REPLY "AUTHENTICATE CRAM-MD5" + Rubbish
+REPLY * A002 NO AUTH exchange cancelled by client
+REPLY "AUTHENTICATE PLAIN" +
+REPLY dXNlcgB1c2VyAHNlY3JldA== A003 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+crypto
+</features>
+ <name>
+IMAP CRAM-MD5 authentication with SASL downgrade
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/833/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE CRAM-MD5
+*
+A003 AUTHENTICATE PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+A004 SELECT 833
+A005 FETCH 1 BODY[]
+A006 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test834 b/tests/data/test834
new file mode 100644
index 00000000..17101ddf
--- /dev/null
+++ b/tests/data/test834
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH NTLM
+SASL AUTH PLAIN
+SASL DOWNGRADE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM PLAIN
+REPLY "AUTHENTICATE NTLM" +
+REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + Rubbish
+REPLY * A002 NO AUTH exchange cancelled by client
+REPLY "AUTHENTICATE PLAIN" +
+REPLY dXNlcgB1c2VyAHNlY3JldA== A003 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+NTLM
+!SSPI
+</features>
+ <name>
+IMAP NTLM authentication with SASL downgrade
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/834/;UID=1' -u user:secret
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE NTLM
+TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+*
+A003 AUTHENTICATE PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+A004 SELECT 834
+A005 FETCH 1 BODY[]
+A006 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test835 b/tests/data/test835
new file mode 100644
index 00000000..34f28b71
--- /dev/null
+++ b/tests/data/test835
@@ -0,0 +1,67 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH DIGEST-MD5
+SASL AUTH PLAIN
+SASL DOWNGRADE
+RFC2831
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5 PLAIN
+REPLY "AUTHENTICATE DIGEST-MD5" + Rubbish
+REPLY * A002 NO AUTH exchange cancelled by client
+REPLY "AUTHENTICATE PLAIN" +
+REPLY dXNlcgB1c2VyAHNlY3JldA== A003 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+<features>
+!SSPI
+debug
+crypto
+</features>
+ <name>
+IMAP DIGEST-MD5 authentication with SASL downgrade
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/835/;UID=1' -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE DIGEST-MD5
+*
+A003 AUTHENTICATE PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+A004 SELECT 835
+A005 FETCH 1 BODY[]
+A006 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test836 b/tests/data/test836
new file mode 100644
index 00000000..035d48ff
--- /dev/null
+++ b/tests/data/test836
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+Clear Text
+FETCH
+connection re-use
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY "LOGIN user.one secret" A002 OK LOGIN completed
+REPLY "LOGIN user.two secret" B002 OK LOGIN completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP multiple connection authentication
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT/836/;UID=1' -u user.one:secret -: 'imap://%HOSTIP:%IMAPPORT/836/;UID=2' -u user.two:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 LOGIN user.one secret
+A003 SELECT 836
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+B001 CAPABILITY
+B002 LOGIN user.two secret
+B003 SELECT 836
+B004 FETCH 2 BODY[]
+B005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test837 b/tests/data/test837
new file mode 100644
index 00000000..d5974634
--- /dev/null
+++ b/tests/data/test837
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH EXTERNAL
+RFC4422
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTHENTICATE +
+REPLY dXNlcg== A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP external authentication
+ </name>
+ <command>
+'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/837/;UID=1'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE EXTERNAL
+dXNlcg==
+A003 SELECT 837
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test838 b/tests/data/test838
new file mode 100644
index 00000000..da2d28d0
--- /dev/null
+++ b/tests/data/test838
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH EXTERNAL
+RFC4422
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTHENTICATE +
+REPLY = A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP external authentication without credentials
+ </name>
+ <command>
+'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/838/;UID=1'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE EXTERNAL
+=
+A003 SELECT 838
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test839 b/tests/data/test839
new file mode 100644
index 00000000..2a544c1c
--- /dev/null
+++ b/tests/data/test839
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH EXTERNAL
+SASL-IR
+RFC4422
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+CAPA SASL-IR
+REPLY AUTHENTICATE A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP external authentication with initial response
+ </name>
+ <command>
+'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/839/;UID=1'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE EXTERNAL dXNlcg==
+A003 SELECT 839
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test84 b/tests/data/test84
index 4dbf1643..629dae2f 100644
--- a/tests/data/test84
+++ b/tests/data/test84
@@ -43,9 +43,9 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/84 -x %HOSTIP:%HTTPPORT --user iam:my
</strip>
<protocol>
GET http://%HOSTIP:%HTTPPORT/we/want/that/page/84 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Basic aWFtOm15c2VsZg==
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test840 b/tests/data/test840
new file mode 100644
index 00000000..eaf1aeea
--- /dev/null
+++ b/tests/data/test840
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+SASL
+SASL AUTH EXTERNAL
+SASL-IR
+RFC4422
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+CAPA SASL-IR
+REPLY AUTHENTICATE A002 OK AUTHENTICATE completed
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP external authentication with initial response without credentials
+ </name>
+ <command>
+'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/840/;UID=1'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY
+A002 AUTHENTICATE EXTERNAL =
+A003 SELECT 840
+A004 FETCH 1 BODY[]
+A005 LOGOUT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test85 b/tests/data/test85
index a5d1a3bc..cb5e6e05 100644
--- a/tests/data/test85
+++ b/tests/data/test85
@@ -46,10 +46,10 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/85 -x %HOSTIP:%HTTPPORT --user iam:my
</strip>
<protocol>
GET http://%HOSTIP:%HTTPPORT/we/want/that/page/85 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Proxy-Authorization: Basic dGVzdGluZzp0aGlz
Authorization: Basic aWFtOm15c2VsZg==
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test850 b/tests/data/test850
new file mode 100644
index 00000000..61761015
--- /dev/null
+++ b/tests/data/test850
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+RETR
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 RETR message
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/850 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+RETR 850
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test851 b/tests/data/test851
new file mode 100644
index 00000000..60c49c47
--- /dev/null
+++ b/tests/data/test851
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+LIST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+# include the '.\r\n' 3-byte trailer to end the transfer poperly!
+REPLY LIST +OK 851 100\r\n.
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 LIST one message
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/851 -l -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+LIST 851
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test852 b/tests/data/test852
new file mode 100644
index 00000000..de9fbe2f
--- /dev/null
+++ b/tests/data/test852
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+LIST
+FAILURE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY LIST -ERR no such message
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 LIST invalid message
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/852 -l -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+56
+</errorcode>
+<protocol>
+CAPA
+USER user
+PASS secret
+LIST 852
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test853 b/tests/data/test853
new file mode 100644
index 00000000..a3b96880
--- /dev/null
+++ b/tests/data/test853
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+LIST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+# We use SLOWDOWN to really exercise the end-of-body parsing over multiple
+# packets
+<servercmd>
+SLOWDOWN
+</servercmd>
+# When doing LIST, we get the default list output hard-coded in the test
+# POP3 server
+<datacheck>
+1 100
+2 4294967400
+3 200
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 LIST messages from *SLOW* server
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/ -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+LIST
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test854 b/tests/data/test854
new file mode 100644
index 00000000..a8a18b68
--- /dev/null
+++ b/tests/data/test854
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+LIST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY LIST +OK but no messages\r\n.
+</servercmd>
+<datacheck>
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 LIST no messages available
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/ -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+LIST
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test855 b/tests/data/test855
new file mode 100644
index 00000000..87fe744f
--- /dev/null
+++ b/tests/data/test855
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+RETR
+FAILURE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY RETR -ERR no such message
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 RETR invalid message
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/855 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+56
+</errorcode>
+<protocol>
+CAPA
+USER user
+PASS secret
+RETR 855
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test856 b/tests/data/test856
new file mode 100644
index 00000000..4d8d7ed6
--- /dev/null
+++ b/tests/data/test856
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+FAILURE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 invalid login
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/856 -u user:wrong
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "QUIT"
+<protocol>
+CAPA
+USER user
+PASS wrong
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test857 b/tests/data/test857
new file mode 100644
index 00000000..055e35cf
--- /dev/null
+++ b/tests/data/test857
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+RETR
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+..body with a single dot first
+...triple dots...
+
+--
+ yours sincerely
+</data>
+<datacheck>
+From: me@somewhere
+To: fake@nowhere
+
+.body with a single dot first
+..triple dots...
+
+--
+ yours sincerely
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 RETR message with dot-prefixed line
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/857 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+RETR 857
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test858 b/tests/data/test858
new file mode 100644
index 00000000..926dcd9e
--- /dev/null
+++ b/tests/data/test858
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+DELE
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 DELE message (CUSTOMREQUEST)
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/858 -u user:secret -X DELE -I
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+DELE 858
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test859 b/tests/data/test859
new file mode 100644
index 00000000..3d2e1c76
--- /dev/null
+++ b/tests/data/test859
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+STAT
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 STAT (CUSTOMREQUEST)
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT -u user:secret -X STAT -I
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+STAT
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test86 b/tests/data/test86
index 70c28e93..a69509ae 100644
--- a/tests/data/test86
+++ b/tests/data/test86
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP GET
+globbing
[] range
</keywords>
</info>
diff --git a/tests/data/test860 b/tests/data/test860
new file mode 100644
index 00000000..26809bf3
--- /dev/null
+++ b/tests/data/test860
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+NOOP
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 NOOP (CUSTOMREQUEST)
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT -u user:secret -X NOOP -I
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+NOOP
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test861 b/tests/data/test861
new file mode 100644
index 00000000..4cc39874
--- /dev/null
+++ b/tests/data/test861
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+UIDL
+CUSTOMREQUEST
+RFC2449
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+CAPA UIDL USER
+</servercmd>
+# When doing UIDL, we get the default list output hard-coded in the test
+# POP3 server
+<datacheck>
+1 1
+2 2
+3 4
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 UIDL (CUSTOMREQUEST)
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT -u user:secret -X UIDL
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+UIDL
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test862 b/tests/data/test862
new file mode 100644
index 00000000..a21b5144
--- /dev/null
+++ b/tests/data/test862
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+TOP
+CUSTOMREQUEST
+RFC2449
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+CAPA TOP USER
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 retrieve message header (CUSTOMREQUEST)
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT -u user:secret -X 'TOP 862 0'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+TOP 862 0
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test863 b/tests/data/test863
new file mode 100644
index 00000000..940045f6
--- /dev/null
+++ b/tests/data/test863
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+RSET
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 RSET (CUSTOMREQUEST)
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT -u user:secret -X RSET -I
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user
+PASS secret
+RSET
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test864 b/tests/data/test864
new file mode 100644
index 00000000..9ad98f7e
--- /dev/null
+++ b/tests/data/test864
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+POP3
+APOP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+CAPA APOP
+REPLY welcome +OK cURL POP3 server ready to serve <1972.987654321\@curl>
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+crypto
+</features>
+ <name>
+POP3 APOP authentication
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/864 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+APOP user 7501b4cdc224d469940e65e7b5e4d6eb
+RETR 864
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test865 b/tests/data/test865
new file mode 100644
index 00000000..6f66f82d
--- /dev/null
+++ b/tests/data/test865
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH PLAIN
+RFC1734
+RFC4616
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH PLAIN
+REPLY AUTH +
+REPLY dXNlcgB1c2VyAHNlY3JldA== +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 plain authentication
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/865 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+RETR 865
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test866 b/tests/data/test866
new file mode 100644
index 00000000..8fee23ab
--- /dev/null
+++ b/tests/data/test866
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH LOGIN
+RFC1734
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH LOGIN
+REPLY AUTH + VXNlcm5hbWU6
+REPLY dXNlcg== + UGFzc3dvcmQ6
+REPLY c2VjcmV0 +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 login authentication
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/866 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH LOGIN
+dXNlcg==
+c2VjcmV0
+RETR 866
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test867 b/tests/data/test867
new file mode 100644
index 00000000..139b467d
--- /dev/null
+++ b/tests/data/test867
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH CRAM-MD5
+RFC1734
+RFC2195
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH CRAM-MD5
+REPLY AUTH + PDE5NzIuOTg3NjU0MzIxQGN1cmw+
+REPLY dXNlciA3MDMxNzI1NTk5ZmRiYjVkNDEyNjg5YWEzMjNlM2UwYg== +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+crypto
+</features>
+ <name>
+POP3 CRAM-MD5 authentication
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/867 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH CRAM-MD5
+dXNlciA3MDMxNzI1NTk5ZmRiYjVkNDEyNjg5YWEzMjNlM2UwYg==
+RETR 867
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test868 b/tests/data/test868
new file mode 100644
index 00000000..591bd509
--- /dev/null
+++ b/tests/data/test868
@@ -0,0 +1,72 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH NTLM
+RFC1734
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM
+REPLY AUTH +
+REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+NTLM
+!SSPI
+debug
+</features>
+ <name>
+POP3 NTLM authentication
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+pop3://%HOSTIP:%POP3PORT/868 -u testuser:testpass
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH NTLM
+TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+RETR 868
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test869 b/tests/data/test869
new file mode 100644
index 00000000..cba33b35
--- /dev/null
+++ b/tests/data/test869
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH DIGEST-MD5
+RFC1734
+RFC2831
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5
+REPLY AUTH + cmVhbG09ImN1cmwiLG5vbmNlPSI1MzAwZDE3YTFkNjk1YmQ0MTFlNGNkZjk2Zjk1NDhjMjNjZWQ2MTc1IixhbGdvcml0aG09bWQ1LXNlc3MscW9wPSJhdXRoIg==
+REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJwb3AvY3VybCIscmVzcG9uc2U9MDE2MTNmOWEwNTgxODNmYTc2NmFkNWEwOThiNmE3MTUscW9wPWF1dGg= +
+REPLY +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+!SSPI
+debug
+crypto
+</features>
+ <name>
+POP3 DIGEST-MD5 authentication
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/869 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH DIGEST-MD5
+dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJwb3AvY3VybCIscmVzcG9uc2U9MDE2MTNmOWEwNTgxODNmYTc2NmFkNWEwOThiNmE3MTUscW9wPWF1dGg=
+
+RETR 869
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test87 b/tests/data/test87
index 40b274b2..488037c8 100644
--- a/tests/data/test87
+++ b/tests/data/test87
@@ -1,6 +1,9 @@
<testcase>
<info>
<keywords>
+HTTP
+HTTP GET
+globbing
[] range
FAILURE
</keywords>
@@ -8,29 +11,51 @@ FAILURE
#
# Server-side
<reply>
+<data1>
+HTTP/1.1 200 OK
+Funny-head: yesyes
+Content-Length: 15
+
+the number one
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Funny-head: yesyes
+Content-Length: 16
+
+two is nice too
+</data2>
+
</reply>
#
# Client-side
<client>
<server>
-none
+http
</server>
<features>
http
</features>
<name>
-urlglob with bad -o #[num] usage
+urlglob with out of range -o #[num] usage
</name>
<command option="no-output">
-"http://%HOSTIP:%HTTPPORT/[870001-870003]" -o "log/dumpit#2.dump"
+"http://%HOSTIP:%HTTPPORT/[870001-870002]" -o "log/dumpit#2.dump"
</command>
</client>
#
-# Verify data after the test has been "shot"
+# Verify data after the test has been "shot". Note that the command line
+# will write both responses into the same file name so only the second
+# survives
+#
<verify>
-<errorcode>
-2
-</errorcode>
+<file name="log/dumpit#2.dump" mode="text">
+HTTP/1.1 200 OK
+Funny-head: yesyes
+Content-Length: 16
+
+two is nice too
+</file>
</verify>
</testcase>
diff --git a/tests/data/test870 b/tests/data/test870
new file mode 100644
index 00000000..885b8c15
--- /dev/null
+++ b/tests/data/test870
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH OAUTH2
+RFC1734
+RFC5034
+RFC6749
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH XOAUTH2
+REPLY AUTH +
+REPLY dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 OAuth 2.0 authentication
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/870 -u user --oauth2-bearer mF_9.B5f-4.1JqM
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH XOAUTH2
+dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB
+RETR 870
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test871 b/tests/data/test871
new file mode 100644
index 00000000..f4f23604
--- /dev/null
+++ b/tests/data/test871
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH PLAIN
+SASL-IR
+RFC1734
+RFC4616
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH PLAIN
+REPLY AUTH +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 plain authentication with initial response
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/871 -u user:secret --sasl-ir
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH PLAIN dXNlcgB1c2VyAHNlY3JldA==
+RETR 871
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test872 b/tests/data/test872
new file mode 100644
index 00000000..05cb2a20
--- /dev/null
+++ b/tests/data/test872
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH LOGIN
+SASL-IR
+RFC1734
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH LOGIN
+REPLY AUTH + UGFzc3dvcmQ6
+REPLY c2VjcmV0 +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 login authentication with initial response
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/872 -u user:secret --sasl-ir
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH LOGIN dXNlcg==
+c2VjcmV0
+RETR 872
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test873 b/tests/data/test873
new file mode 100644
index 00000000..a91b3608
--- /dev/null
+++ b/tests/data/test873
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH NTLM
+SASL-IR
+RFC1734
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM
+REPLY AUTH + TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+NTLM
+!SSPI
+debug
+</features>
+ <name>
+POP3 NTLM authentication with initial response
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+pop3://%HOSTIP:%POP3PORT/873 -u testuser:testpass --sasl-ir
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+RETR 873
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test874 b/tests/data/test874
new file mode 100644
index 00000000..de221fa9
--- /dev/null
+++ b/tests/data/test874
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH OAUTH2
+SASL-IR
+RFC1734
+RFC5034
+RFC6749
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH XOAUTH2
+REPLY AUTH +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 OAuth 2.0 authentication with initial response
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/874 -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH XOAUTH2 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB
+RETR 874
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test875 b/tests/data/test875
new file mode 100644
index 00000000..53e99408
--- /dev/null
+++ b/tests/data/test875
@@ -0,0 +1,29 @@
+<testcase>
+<info>
+<keywords>
+POP3
+CRLF-in-URL
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 with URL-encoded CR LF in the URL
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/%0d%0a/875
+</command>
+</client>
+
+#
+<verify>
+# 3 - CURLE_URL_MALFORMAT
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test876 b/tests/data/test876
new file mode 100644
index 00000000..6d30e538
--- /dev/null
+++ b/tests/data/test876
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH CRAM-MD5
+SASL CANCELLATION
+RFC1734
+RFC2195
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH CRAM-MD5
+REPLY AUTH + Rubbish
+REPLY * -ERR AUTH exchange cancelled by client
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+crypto
+</features>
+ <name>
+POP3 CRAM-MD5 graceful cancellation
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/876 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "QUIT"
+<protocol>
+CAPA
+AUTH CRAM-MD5
+*
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test877 b/tests/data/test877
new file mode 100644
index 00000000..c4775942
--- /dev/null
+++ b/tests/data/test877
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH NTLM
+SASL CANCELLATION
+RFC1734
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM
+REPLY AUTH +
+REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + Rubbish
+REPLY * -ERR AUTH exchange cancelled by client
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+NTLM
+!SSPI
+</features>
+ <name>
+POP3 NTLM graceful cancellation
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+pop3://%HOSTIP:%POP3PORT/877 -u testuser:testpass
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "QUIT"
+<protocol>
+CAPA
+AUTH NTLM
+TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+*
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test878 b/tests/data/test878
new file mode 100644
index 00000000..98961fbe
--- /dev/null
+++ b/tests/data/test878
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH DIGEST-MD5
+SASL CANCELLATION
+RFC1734
+RFC2831
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5
+REPLY AUTH + Rubbish
+REPLY * -ERR AUTH exchange cancelled by client
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+!SSPI
+debug
+crypto
+</features>
+ <name>
+POP3 DIGEST-MD5 graceful cancellation
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/878 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "QUIT"
+<protocol>
+CAPA
+AUTH DIGEST-MD5
+*
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test879 b/tests/data/test879
new file mode 100644
index 00000000..681d779b
--- /dev/null
+++ b/tests/data/test879
@@ -0,0 +1,66 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH CRAM-MD5
+SASL AUTH PLAIN
+SASL DOWNGRADE
+RFC1734
+RFC2195
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH CRAM-MD5 PLAIN
+REPLY "AUTH CRAM-MD5" + Rubbish
+REPLY * -ERR AUTH exchange cancelled by client
+REPLY "AUTH PLAIN" +
+REPLY dXNlcgB1c2VyAHNlY3JldA== +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+crypto
+</features>
+ <name>
+POP3 CRAM-MD5 authentication with SASL downgrade
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/879 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH CRAM-MD5
+*
+AUTH PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+RETR 879
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test88 b/tests/data/test88
index 2495aecf..e2d019c0 100644
--- a/tests/data/test88
+++ b/tests/data/test88
@@ -56,6 +56,7 @@ This IS the real page!
http
</server>
<features>
+!SSPI
crypto
</features>
<name>
@@ -82,12 +83,11 @@ PUT /88 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 0
-Expect: 100-continue
PUT /88 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/88", response="78a49fa53d0c228778297687d4168e71"
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 85
Expect: 100-continue
diff --git a/tests/data/test880 b/tests/data/test880
new file mode 100644
index 00000000..f5eb6973
--- /dev/null
+++ b/tests/data/test880
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH NTLM
+SASL AUTH PLAIN
+SASL DOWNGRADE
+RFC1734
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM PLAIN
+REPLY "AUTH NTLM" +
+REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + Rubbish
+REPLY * -ERR AUTH exchange cancelled by client
+REPLY "AUTH PLAIN" +
+REPLY dXNlcgB1c2VyAHNlY3JldA== +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+NTLM
+!SSPI
+</features>
+ <name>
+POP3 NTLM authentication with SASL downgrade
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+pop3://%HOSTIP:%POP3PORT/880 -u user:secret
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH NTLM
+TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+*
+AUTH PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+RETR 880
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test881 b/tests/data/test881
new file mode 100644
index 00000000..80eca500
--- /dev/null
+++ b/tests/data/test881
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH DIGEST-MD5
+SASL AUTH PLAIN
+SASL DOWNGRADE
+RFC1734
+RFC2831
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5 PLAIN
+REPLY "AUTH DIGEST-MD5" + Rubbish
+REPLY * -ERR AUTH exchange cancelled by client
+REPLY "AUTH PLAIN" +
+REPLY dXNlcgB1c2VyAHNlY3JldA== +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+<features>
+!SSPI
+debug
+crypto
+</features>
+ <name>
+POP3 DIGEST-MD5 authentication with SASL downgrade
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/881 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH DIGEST-MD5
+*
+AUTH PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+RETR 881
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test882 b/tests/data/test882
new file mode 100644
index 00000000..1e321ff1
--- /dev/null
+++ b/tests/data/test882
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+POP3
+Clear Text
+RETR
+connection re-use
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY "PASS secret" +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 multiple connection authentication
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/882001 -u user.one:secret -: pop3://%HOSTIP:%POP3PORT/882002 -u user.two:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+USER user.one
+PASS secret
+RETR 882001
+QUIT
+CAPA
+USER user.two
+PASS secret
+RETR 882002
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test883 b/tests/data/test883
new file mode 100644
index 00000000..5d5a756a
--- /dev/null
+++ b/tests/data/test883
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH EXTERNAL
+RFC1734
+RFC4422
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTH +
+REPLY dXNlcg== +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 external authentication
+ </name>
+ <command>
+'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/883'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH EXTERNAL
+dXNlcg==
+RETR 883
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test884 b/tests/data/test884
new file mode 100644
index 00000000..34fd94d1
--- /dev/null
+++ b/tests/data/test884
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH EXTERNAL
+RFC1734
+RFC4422
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTH +
+REPLY = +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 external authentication without credentials
+ </name>
+ <command>
+'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/884'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH EXTERNAL
+=
+RETR 884
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test885 b/tests/data/test885
new file mode 100644
index 00000000..581e9b24
--- /dev/null
+++ b/tests/data/test885
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH EXTERNAL
+SASL-IR
+RFC1734
+RFC4422
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTH +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 external authentication with initial response
+ </name>
+ <command>
+'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/885' --sasl-ir
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH EXTERNAL dXNlcg==
+RETR 885
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test886 b/tests/data/test886
new file mode 100644
index 00000000..3aca2f18
--- /dev/null
+++ b/tests/data/test886
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+POP3
+SASL
+SASL AUTH EXTERNAL
+SASL-IR
+RFC1734
+RFC4422
+RFC5034
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTH +OK Login successful
+</servercmd>
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+ yours sincerely
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 external authentication with initial response without credentials
+ </name>
+ <command>
+'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/886' --sasl-ir
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA
+AUTH EXTERNAL =
+RETR 886
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test89 b/tests/data/test89
index f348eb65..c7f69a2b 100644
--- a/tests/data/test89
+++ b/tests/data/test89
@@ -89,6 +89,8 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -117,27 +119,27 @@ chkhostname curlhost
</strip>
<protocol>
GET /89 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /89 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
GET /you/890010 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /you/890010 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBALIBPdoGahtQQ8gQ7TJrKTYzMjM0NDIzNBFnpKw8B1BLcb456sVeozgBAQAAAAAAAACAPtXesZ0BMzIzNDQyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
Accept: */*
</protocol>
diff --git a/tests/data/test90 b/tests/data/test90
index 24a7ff4d..3b1231a3 100644
--- a/tests/data/test90
+++ b/tests/data/test90
@@ -127,6 +127,8 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -159,15 +161,15 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /90 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /90 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
GET /you/900010 HTTP/1.1
@@ -175,15 +177,15 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /you/900010 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /you/900010 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
-User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBALIBPdoGahtQQ8gQ7TJrKTYzMjM0NDIzNBFnpKw8B1BLcb456sVeozgBAQAAAAAAAACAPtXesZ0BMzIzNDQyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
Accept: */*
</protocol>
diff --git a/tests/data/test900 b/tests/data/test900
new file mode 100644
index 00000000..0dd7f527
--- /dev/null
+++ b/tests/data/test900
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP
+ </name>
+<stdin>
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/900 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 900
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test901 b/tests/data/test901
new file mode 100644
index 00000000..8148b29e
--- /dev/null
+++ b/tests/data/test901
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with CRLF-dot-CRLF in data
+ </name>
+<stdin>
+From: different
+To: another
+
+
+.
+.
+
+.
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/901 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 901
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+
+..
+..
+
+..
+
+body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test902 b/tests/data/test902
new file mode 100644
index 00000000..8ee105f7
--- /dev/null
+++ b/tests/data/test902
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SMTP HELO
+RFC821
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY EHLO 500 Command unrecognized
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+RFC821-only SMTP server (EHLO not supported)
+ </name>
+<stdin>
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/902 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 902
+HELO 902
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test903 b/tests/data/test903
new file mode 100644
index 00000000..2baf5e69
--- /dev/null
+++ b/tests/data/test903
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH PLAIN
+RFC4616
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH PLAIN
+REPLY AUTH 334 PLAIN supported
+REPLY dXNlcgB1c2VyAHNlY3JldA== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP plain authentication
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/903 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 903
+AUTH PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test904 b/tests/data/test904
new file mode 100644
index 00000000..dd3dad09
--- /dev/null
+++ b/tests/data/test904
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH LOGIN
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH LOGIN
+REPLY AUTH 334 VXNlcm5hbWU6
+REPLY dXNlcg== 334 UGFzc3dvcmQ6
+REPLY c2VjcmV0 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP login authentication
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/904 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 904
+AUTH LOGIN
+dXNlcg==
+c2VjcmV0
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test905 b/tests/data/test905
new file mode 100644
index 00000000..565b0413
--- /dev/null
+++ b/tests/data/test905
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH CRAM-MD5
+RFC2195
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH CRAM-MD5
+REPLY AUTH 334 PDE5NzIuOTg3NjU0MzIxQGN1cmw+
+REPLY dXNlciA3MDMxNzI1NTk5ZmRiYjVkNDEyNjg5YWEzMjNlM2UwYg== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+crypto
+</features>
+ <name>
+SMTP CRAM-MD5 authentication
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/905 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 905
+AUTH CRAM-MD5
+dXNlciA3MDMxNzI1NTk5ZmRiYjVkNDEyNjg5YWEzMjNlM2UwYg==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test906 b/tests/data/test906
new file mode 100644
index 00000000..3c04d15e
--- /dev/null
+++ b/tests/data/test906
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH NTLM
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM
+REPLY AUTH 334 NTLM supported
+REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 334 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+NTLM
+!SSPI
+debug
+</features>
+ <name>
+SMTP NTLM authentication
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/906 --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass -T -
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 906
+AUTH NTLM
+TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test907 b/tests/data/test907
new file mode 100644
index 00000000..65c87b40
--- /dev/null
+++ b/tests/data/test907
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH DIGEST-MD5
+RFC2831
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5
+REPLY AUTH 334 cmVhbG09ImN1cmwiLG5vbmNlPSI1MzAwZDE3YTFkNjk1YmQ0MTFlNGNkZjk2Zjk1NDhjMjNjZWQ2MTc1IixhbGdvcml0aG09bWQ1LXNlc3MscW9wPSJhdXRoIg==
+REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJzbXRwL2N1cmwiLHJlc3BvbnNlPWJkYmExNzYwOGY4NmMyZjEzYTczMTM1NzdkZjkyMzNkLHFvcD1hdXRo 334
+REPLY 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+!SSPI
+debug
+crypto
+</features>
+ <name>
+SMTP DIGEST-MD5 authentication
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/907 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 907
+AUTH DIGEST-MD5
+dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJzbXRwL2N1cmwiLHJlc3BvbnNlPWJkYmExNzYwOGY4NmMyZjEzYTczMTM1NzdkZjkyMzNkLHFvcD1hdXRo
+
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test908 b/tests/data/test908
new file mode 100644
index 00000000..c471cb7b
--- /dev/null
+++ b/tests/data/test908
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH OAUTH2
+RFC4954
+RFC6749
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH XOAUTH2
+REPLY AUTH 334 XOAUTH2 supported
+REPLY dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP OAuth 2.0 authentication
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/908 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 908
+AUTH XOAUTH2
+dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test909 b/tests/data/test909
new file mode 100644
index 00000000..e3e907ac
--- /dev/null
+++ b/tests/data/test909
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP without SIZE support
+ </name>
+<file name="log/test909.eml">
+From: different
+To: another
+
+body
+</file>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/909 --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/test909.eml
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 909
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test91 b/tests/data/test91
index e6f34aed..35195ad3 100644
--- a/tests/data/test91
+++ b/tests/data/test91
@@ -73,6 +73,8 @@ Finally, this is the real page!
<client>
<features>
NTLM
+!SSPI
+debug
</features>
<server>
http
@@ -101,20 +103,20 @@ chkhostname curlhost
</strip>
<protocol>
GET /91 HTTP/1.1
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
GET /91 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /91 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAAIAAgAfgAAAAAAAAAAAAAABoKBAMIyJpR5mHpg2FZha5kRaFZ9436GAxPu0C5llxexSQ5QzVkiLSfkcpVyRgCXXqR+Am15ZG9tYWlubXlzZWxmY3VybGhvc3Q=
-User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAgACAD2AAAABgAGAP4AAAAIAAgABAEAAAAAAAAAAAAABoKBAI9byKoy6qyyS+1JCYN1XYoxMjM0MjIzNEYCr85trkciZ2j/7/T8MmUBAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAbXlkb21haW5teXNlbGZjdXJsaG9zdA==
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
</protocol>
diff --git a/tests/data/test910 b/tests/data/test910
new file mode 100644
index 00000000..c1b84ac0
--- /dev/null
+++ b/tests/data/test910
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP without terminating CRLF
+ </name>
+<stdin nonewline="yes">
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/910 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 910
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test911 b/tests/data/test911
new file mode 100644
index 00000000..cc87349b
--- /dev/null
+++ b/tests/data/test911
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with no mail data
+ </name>
+
+<stdin nonewline="yes">
+
+</stdin>
+
+ <command>
+smtp://%HOSTIP:%SMTPPORT/911 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 911
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test912 b/tests/data/test912
new file mode 100644
index 00000000..8970c3f1
--- /dev/null
+++ b/tests/data/test912
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SIZE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+CAPA SIZE
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with SIZE support
+ </name>
+<file name="log/test912.eml">
+From: different
+To: another
+
+body
+</file>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/912 --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/test912.eml
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 912
+MAIL FROM:<sender@example.com> SIZE=38
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test913 b/tests/data/test913
new file mode 100644
index 00000000..d13a11ae
--- /dev/null
+++ b/tests/data/test913
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SIZE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+CAPA "SIZE 32"
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with large message SIZE
+ </name>
+<file name="log/test913.eml">
+From: different
+To: another
+
+body
+</file>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/913 --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/test913.eml
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 55 - CURLE_SEND_ERROR
+<errorcode>
+55
+</errorcode>
+<protocol>
+EHLO 913
+MAIL FROM:<sender@example.com> SIZE=38
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test914 b/tests/data/test914
new file mode 100644
index 00000000..d1532c80
--- /dev/null
+++ b/tests/data/test914
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP invalid --mail-from
+ </name>
+<file name="log/test914.eml">
+From: different
+To: another
+
+body
+</file>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/914 --mail-rcpt recipient@example.com --mail-from invalid -T log/test914.eml
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 55 - CURLE_SEND_ERROR
+<errorcode>
+55
+</errorcode>
+<protocol>
+EHLO 914
+MAIL FROM:<invalid>
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test915 b/tests/data/test915
new file mode 100644
index 00000000..4d31db3c
--- /dev/null
+++ b/tests/data/test915
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP without --mail-from
+ </name>
+<stdin>
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/915 --mail-rcpt recipient@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 915
+MAIL FROM:<>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test916 b/tests/data/test916
new file mode 100644
index 00000000..00211550
--- /dev/null
+++ b/tests/data/test916
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with invalid --mail-rcpt
+ </name>
+<stdin>
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/916 --mail-rcpt invalid --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 55 - CURLE_SEND_ERROR
+<errorcode>
+55
+</errorcode>
+<protocol>
+EHLO 916
+MAIL FROM:<sender@example.com>
+RCPT TO:<invalid>
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test917 b/tests/data/test917
new file mode 100644
index 00000000..cc75da3a
--- /dev/null
+++ b/tests/data/test917
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with multiple --mail-rcpt
+ </name>
+<stdin>
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/917 --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 917
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient.one@example.com>
+RCPT TO:<recipient.two@example.com>
+RCPT TO:<recipient.three@example.com>
+RCPT TO:<recipient.four@example.com>
+RCPT TO:<recipient.five@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test918 b/tests/data/test918
new file mode 100644
index 00000000..3756edd7
--- /dev/null
+++ b/tests/data/test918
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with multiple and invalid --mail-rcpt
+ </name>
+<stdin>
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/918 --mail-rcpt recipient.one@example.com --mail-rcpt invalid --mail-rcpt recipient.three@example.com --mail-rcpt sTrAnGe --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 55 - CURLE_SEND_ERROR
+<errorcode>
+55
+</errorcode>
+<protocol>
+EHLO 918
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient.one@example.com>
+RCPT TO:<invalid>
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test919 b/tests/data/test919
new file mode 100644
index 00000000..3e74494c
--- /dev/null
+++ b/tests/data/test919
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH PLAIN
+SASL-IR
+RFC4616
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH PLAIN
+REPLY AUTH 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP plain authentication with initial response
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/919 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret --sasl-ir -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 919
+AUTH PLAIN dXNlcgB1c2VyAHNlY3JldA==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test92 b/tests/data/test92
index 726aa791..1304c81e 100644
--- a/tests/data/test92
+++ b/tests/data/test92
@@ -13,7 +13,7 @@ Resume
<data>
HTTP/1.1 416 Requested Range Not Satisfiable
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
+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
@@ -45,8 +45,8 @@ http://%HOSTIP:%HTTPPORT/want/92 -C 87
</strip>
<protocol>
GET /want/92 HTTP/1.1
-Range: bytes=87-
Host: %HOSTIP:%HTTPPORT
+Range: bytes=87-
Accept: */*
</protocol>
diff --git a/tests/data/test920 b/tests/data/test920
new file mode 100644
index 00000000..82f6c560
--- /dev/null
+++ b/tests/data/test920
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH LOGIN
+SASL-IR
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH LOGIN
+REPLY AUTH 334 UGFzc3dvcmQ6
+REPLY c2VjcmV0 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP login authentication with initial response
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/920 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret --sasl-ir -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 920
+AUTH LOGIN dXNlcg==
+c2VjcmV0
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test921 b/tests/data/test921
new file mode 100644
index 00000000..91a7c6f4
--- /dev/null
+++ b/tests/data/test921
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH NTLM
+SASL-IR
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM
+REPLY AUTH 334 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+NTLM
+!SSPI
+debug
+</features>
+ <name>
+SMTP NTLM authentication with initial response
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/921 --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass --sasl-ir -T -
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 921
+AUTH NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test922 b/tests/data/test922
new file mode 100644
index 00000000..e9e0d5f8
--- /dev/null
+++ b/tests/data/test922
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH OAUTH2
+SASL-IR
+RFC4954
+RFC6749
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH XOAUTH2
+REPLY AUTH 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP OAuth 2.0 authentication with initial response
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/922 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 922
+AUTH XOAUTH2 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test923 b/tests/data/test923
new file mode 100644
index 00000000..cb811bb0
--- /dev/null
+++ b/tests/data/test923
@@ -0,0 +1,40 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+VRFY
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+250 <recipient@example.com>
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP VRFY
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/923 --mail-rcpt recipient
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 923
+VRFY recipient
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test924 b/tests/data/test924
new file mode 100644
index 00000000..51e373c7
--- /dev/null
+++ b/tests/data/test924
@@ -0,0 +1,43 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+VRFY
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+553-Ambiguous; Possibilities are:
+553-Joe Smith <joe.smith@example.com>
+553-Harry Smith <harry.smith@example.com>
+553 Melvin Smith <melvin.smith@example.com>
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP ambiguous VRFY
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/924 --mail-rcpt smith
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 924
+VRFY smith
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test925 b/tests/data/test925
new file mode 100644
index 00000000..2d53100d
--- /dev/null
+++ b/tests/data/test925
@@ -0,0 +1,40 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+VRFY
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+252 Send some mail and I'll try my best
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP external VRFY
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/925 --mail-rcpt user@example.net
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 925
+VRFY user@example.net
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test926 b/tests/data/test926
new file mode 100644
index 00000000..4c4576c8
--- /dev/null
+++ b/tests/data/test926
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+VRFY
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY VRFY 550 Unknown user
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP unknown user VRFY
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/926 --mail-rcpt recipient
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 56 - CURLE_RECV_ERROR
+<errorcode>
+56
+</errorcode>
+<protocol>
+EHLO 926
+VRFY recipient
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test927 b/tests/data/test927
new file mode 100644
index 00000000..b1997102
--- /dev/null
+++ b/tests/data/test927
@@ -0,0 +1,43 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+EXPN
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+250-Joe Smith <joe.smith@example.com>
+250-Harry Smith <harry.smith@example.com>
+250 Melvin Smith <melvin.smith@example.com>
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP mailing list EXPN (CUSTOMREQUEST)
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/927 --mail-rcpt Friends -X EXPN
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 927
+EXPN Friends
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test928 b/tests/data/test928
new file mode 100644
index 00000000..81bbdc2f
--- /dev/null
+++ b/tests/data/test928
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+HELP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+214-This server supports the following commands:
+214 HELO EHLO RCPT DATA RSET MAIL VRFY EXPN QUIT HELP
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP HELP
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/928
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 928
+HELP
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test929 b/tests/data/test929
new file mode 100644
index 00000000..3761ab5a
--- /dev/null
+++ b/tests/data/test929
@@ -0,0 +1,38 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+NOOP
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP NOOP (CUSTOMREQUEST)
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/929 -X NOOP -I
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 929
+NOOP
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test930 b/tests/data/test930
new file mode 100644
index 00000000..be633c1f
--- /dev/null
+++ b/tests/data/test930
@@ -0,0 +1,38 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+RSET
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP RSET (CUSTOMREQUEST)
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/930 -X RSET -I
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 930
+RSET
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test931 b/tests/data/test931
new file mode 100644
index 00000000..722aa022
--- /dev/null
+++ b/tests/data/test931
@@ -0,0 +1,29 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+CRLF-in-URL
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with URL-encoded CR LF in the URL
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/%0d%0a/931
+</command>
+</client>
+
+#
+<verify>
+# 3 - CURLE_URL_MALFORMAT
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test932 b/tests/data/test932
new file mode 100644
index 00000000..13ab790d
--- /dev/null
+++ b/tests/data/test932
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH CRAM-MD5
+SASL CANCELLATION
+RFC2195
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH CRAM-MD5
+REPLY AUTH 334 Rubbish
+REPLY * 501 AUTH exchange cancelled by client
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+crypto
+</features>
+ <name>
+SMTP CRAM-MD5 graceful cancellation
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/932 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "QUIT"
+<protocol>
+EHLO 932
+AUTH CRAM-MD5
+*
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test933 b/tests/data/test933
new file mode 100644
index 00000000..08b4e9dd
--- /dev/null
+++ b/tests/data/test933
@@ -0,0 +1,67 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH NTLM
+SASL CANCELLATION
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM
+REPLY AUTH 334 NTLM supported
+REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 334 Rubbish
+REPLY * 501 AUTH exchange cancelled by client
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+NTLM
+!SSPI
+</features>
+ <name>
+SMTP NTLM graceful cancellation
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/933 --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass -T -
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "QUIT"
+<protocol>
+EHLO 933
+AUTH NTLM
+TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+*
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test934 b/tests/data/test934
new file mode 100644
index 00000000..1794d81d
--- /dev/null
+++ b/tests/data/test934
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH DIGEST-MD5
+SASL CANCELLATION
+RFC2831
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5
+REPLY AUTH 334 Rubbish
+REPLY * 501 AUTH exchange cancelled by client
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+!SSPI
+debug
+crypto
+</features>
+ <name>
+SMTP DIGEST-MD5 graceful cancellation
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/934 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 67 - CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "CONNECT" as a prematurely broken
+# transfer and such a connection will not get a "QUIT"
+<protocol>
+EHLO 934
+AUTH DIGEST-MD5
+*
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test935 b/tests/data/test935
new file mode 100644
index 00000000..3fd5c2e5
--- /dev/null
+++ b/tests/data/test935
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH CRAM-MD5
+SASL AUTH PLAIN
+SASL DOWNGRADE
+RFC2195
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH CRAM-MD5 PLAIN
+REPLY "AUTH CRAM-MD5" 334 Rubbish
+REPLY * 501 AUTH exchange cancelled by client
+REPLY "AUTH PLAIN" 334 PLAIN supported
+REPLY dXNlcgB1c2VyAHNlY3JldA== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+crypto
+</features>
+ <name>
+SMTP CRAM-MD5 authentication with SASL downgrade
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/935 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 935
+AUTH CRAM-MD5
+*
+AUTH PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test936 b/tests/data/test936
new file mode 100644
index 00000000..88c8a937
--- /dev/null
+++ b/tests/data/test936
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH NTLM
+SASL AUTH PLAIN
+SASL DOWNGRADE
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH NTLM PLAIN
+REPLY "AUTH NTLM" 334 NTLM supported
+REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 334 Rubbish
+REPLY * 501 AUTH exchange cancelled by client
+REPLY "AUTH PLAIN" 334 PLAIN supported
+REPLY dXNlcgB1c2VyAHNlY3JldA== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+NTLM
+!SSPI
+</features>
+ <name>
+SMTP NTLM authentication with SASL downgrade
+ </name>
+<stdin>
+mail body
+</stdin>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/936 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 936
+AUTH NTLM
+TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+*
+AUTH PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test937 b/tests/data/test937
new file mode 100644
index 00000000..a2cb9b5c
--- /dev/null
+++ b/tests/data/test937
@@ -0,0 +1,67 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH DIGEST-MD5
+SASL AUTH PLAIN
+SASL DOWNGRADE
+RFC2831
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH DIGEST-MD5 PLAIN
+REPLY "AUTH DIGEST-MD5" 334 Rubbish
+REPLY * 501 AUTH exchange cancelled by client
+REPLY "AUTH PLAIN" 334 PLAIN supported
+REPLY dXNlcgB1c2VyAHNlY3JldA== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+!SSPI
+debug
+crypto
+</features>
+ <name>
+SMTP DIGEST-MD5 authentication with SASL downgrade
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/937 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 937
+AUTH DIGEST-MD5
+*
+AUTH PLAIN
+dXNlcgB1c2VyAHNlY3JldA==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test938 b/tests/data/test938
new file mode 100644
index 00000000..7931d0aa
--- /dev/null
+++ b/tests/data/test938
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH PLAIN
+connection re-use
+RFC4616
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH PLAIN
+REPLY AUTH 334 PLAIN supported
+REPLY dXNlci5vbmUAdXNlci5vbmUAc2VjcmV0 235 Authenticated
+REPLY dXNlci50d28AdXNlci50d28Ac2VjcmV0 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP multiple connection authentication
+ </name>
+<file name="log/upload938">
+mail body
+</file>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/938001 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.one:secret -T log/upload938 -: smtp://%HOSTIP:%SMTPPORT/938002 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.two:secret -T log/upload938
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 938001
+AUTH PLAIN
+dXNlci5vbmUAdXNlci5vbmUAc2VjcmV0
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+EHLO 938002
+AUTH PLAIN
+dXNlci50d28AdXNlci50d28Ac2VjcmV0
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test939 b/tests/data/test939
new file mode 100644
index 00000000..34ba8a0e
--- /dev/null
+++ b/tests/data/test939
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+RFC821
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY EHLO 500 Command unrecognized
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+RFC821-only SMTP with username and password
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/939 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 939
+HELO 939
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test94 b/tests/data/test94
index a7bafa69..2f3f4824 100644
--- a/tests/data/test94
+++ b/tests/data/test94
@@ -11,14 +11,14 @@ FAILURE
#
# Server-side
<reply>
-<data nocheck="yes">
+<connect nocheck="yes">
HTTP/1.1 407 Needs proxy authentication
Server: test-server/fake swsclose yesyes
Proxy-Authenticate: Basic "oh please"
Connection: close
bing
-</data>
+</connect>
</reply>
#
diff --git a/tests/data/test940 b/tests/data/test940
new file mode 100644
index 00000000..4dfb72ca
--- /dev/null
+++ b/tests/data/test940
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with username and password but no AUTH capability
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/940 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 940
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test941 b/tests/data/test941
new file mode 100644
index 00000000..fd69b873
--- /dev/null
+++ b/tests/data/test941
@@ -0,0 +1,66 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+--crlf
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with --crlf
+ </name>
+<file name="log/upload941">
+From: different
+To: another
+
+email
+headers and body
+with unix newlines
+meant to be
+converted
+with
+the
+--crlf option
+</file>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/941 --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/upload941 --crlf
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 941
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+From: different
+To: another
+
+email
+headers and body
+with unix newlines
+meant to be
+converted
+with
+the
+--crlf option
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test942 b/tests/data/test942
new file mode 100644
index 00000000..26740f7b
--- /dev/null
+++ b/tests/data/test942
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH EXTERNAL
+RFC4422
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTH 334 EXTERNAL supported
+REPLY dXNlcg== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP external authentication
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/942' --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 942
+AUTH EXTERNAL
+dXNlcg==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test943 b/tests/data/test943
new file mode 100644
index 00000000..aef2c622
--- /dev/null
+++ b/tests/data/test943
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH EXTERNAL
+RFC4422
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTH 334 EXTERNAL supported
+REPLY = 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP external authentication without credentials
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/943' --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 943
+AUTH EXTERNAL
+=
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test944 b/tests/data/test944
new file mode 100644
index 00000000..4b60f120
--- /dev/null
+++ b/tests/data/test944
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH EXTERNAL
+SASL-IR
+RFC4422
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTH 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP external authentication with initial response
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/944' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 944
+AUTH EXTERNAL dXNlcg==
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test945 b/tests/data/test945
new file mode 100644
index 00000000..3526408d
--- /dev/null
+++ b/tests/data/test945
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SASL
+SASL AUTH EXTERNAL
+SASL-IR
+RFC4422
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+AUTH EXTERNAL
+REPLY AUTH 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP external authentication with initial response without credentials
+ </name>
+<stdin>
+mail body
+</stdin>
+ <command>
+'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/945' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO 945
+AUTH EXTERNAL =
+MAIL FROM:<sender@example.com>
+RCPT TO:<recipient@example.com>
+DATA
+QUIT
+</protocol>
+<upload>
+mail body
+.
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test95 b/tests/data/test95
index 9fea1bec..1cd88aca 100644
--- a/tests/data/test95
+++ b/tests/data/test95
@@ -21,6 +21,10 @@ Content-Length: 9
contents
</data>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+
+</connect>
<datacheck>
HTTP/1.1 200 Mighty fine indeed
@@ -40,12 +44,13 @@ contents
<client>
<server>
http
+http-proxy
</server>
<name>
HTTP over proxytunnel using POST
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%HTTPPORT -d "datatopost=ohthatsfunyesyes"
+http://test.95:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes"
</command>
</client>
@@ -55,15 +60,17 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%HTTPPORT -d "datato
<strip>
^User-Agent:.*
</strip>
-<protocol nonewline="yes">
-CONNECT %HOSTIP:%HTTPPORT HTTP/1.1
+<proxy>
+CONNECT test.95:%HTTPPORT HTTP/1.1
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
+Host: test.95:%HTTPPORT
Proxy-Connection: Keep-Alive
+</proxy>
+<protocol nonewline="yes">
POST /we/want/that/page/95 HTTP/1.1
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
-Host: %HOSTIP:%HTTPPORT
+Host: test.95:%HTTPPORT
Accept: */*
Content-Length: 27
Content-Type: application/x-www-form-urlencoded
diff --git a/tests/data/test96 b/tests/data/test96
new file mode 100644
index 00000000..27044bc9
--- /dev/null
+++ b/tests/data/test96
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+TrackMemory
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+TrackMemory
+</features>
+
+<name>
+curl memory tracking operational
+</name>
+<command>
+--version
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file name="log/memdump">
+MEM tool_paramhlp.c
+MEM tool_cfgable.c
+MEM tool_cfgable.c
+MEM tool_cfgable.c
+</file>
+<stripfile>
+$_ = '' if ((($_ !~ /tool_paramhlp/) && ($_ !~ /tool_cfgable/)) || ($_ =~ /free\(\(nil\)\)/))
+s/:\d+.*//
+s:^(MEM )(.*/)(.*):$1$3:
+</stripfile>
+</verify>
+
+</testcase>
diff --git a/tests/data/test99 b/tests/data/test99
index 2517002f..9797600c 100644
--- a/tests/data/test99
+++ b/tests/data/test99
@@ -60,8 +60,8 @@ http://%HOSTIP:%HTTPPORT/99 -C 9999999999
</strip>
<protocol>
GET /99 HTTP/1.1
-Range: bytes=9999999999-
Host: %HOSTIP:%HTTPPORT
+Range: bytes=9999999999-
Accept: */*
</protocol>
diff --git a/tests/directories.pm b/tests/directories.pm
index 6f20e6fe..6cbb963b 100644
--- a/tests/directories.pm
+++ b/tests/directories.pm
@@ -1,3 +1,24 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
%file_chmod1 = (
'name' => 'chmod1',
'content' => "This file should have permissions 444\n",
diff --git a/tests/extern-scan.pl b/tests/extern-scan.pl
new file mode 100755
index 00000000..49d0c86b
--- /dev/null
+++ b/tests/extern-scan.pl
@@ -0,0 +1,60 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2010-2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+#
+#
+
+use strict;
+use warnings;
+
+# we may get the dir root pointed out
+my $root=$ARGV[0] || ".";
+
+my @incs = (
+ "$root/include/curl/curl.h",
+ "$root/include/curl/easy.h",
+ "$root/include/curl/mprintf.h",
+ "$root/include/curl/multi.h",
+ );
+
+my $verbose=0;
+my $summary=0;
+my $misses=0;
+
+my @syms;
+my %doc;
+my %rem;
+
+sub scanheader {
+ my ($f)=@_;
+ open H, "<$f" || die;
+ while(<H>) {
+ if (/^(CURL_EXTERN.*)/) {
+ print "$1\n";
+ }
+ }
+ close H;
+}
+
+foreach my $i (@incs) {
+ scanheader($i);
+}
diff --git a/tests/ftp.pm b/tests/ftp.pm
index 6a46e765..2e125e29 100644
--- a/tests/ftp.pm
+++ b/tests/ftp.pm
@@ -48,6 +48,78 @@ sub pidfromfile {
}
#######################################################################
+# pidexists checks if a process with a given pid exists and is alive.
+# This will return the positive pid if the process exists and is alive.
+# This will return the negative pid if the process exists differently.
+# This will return 0 if the process could not be found.
+#
+sub pidexists {
+ my $pid = $_[0];
+
+ if($pid > 0) {
+ # verify if currently existing and alive
+ if(kill(0, $pid)) {
+ return $pid;
+ }
+
+ # verify if currently existing Windows process
+ if($^O eq "msys") {
+ my $filter = "PID eq $pid";
+ my $result = `tasklist -fi \"$filter\" 2>nul`;
+ if(index($result, "$pid") != -1) {
+ return -$pid;
+ }
+ }
+ }
+
+ return 0;
+}
+
+#######################################################################
+# pidterm asks the process with a given pid to terminate gracefully.
+#
+sub pidterm {
+ my $pid = $_[0];
+
+ if($pid > 0) {
+ # signal the process to terminate
+ kill("TERM", $pid);
+
+ # request the process to quit
+ if($^O eq "msys") {
+ my $filter = "PID eq $pid";
+ my $result = `tasklist -fi \"$filter\" 2>nul`;
+ if(index($result, "$pid") != -1) {
+ system("taskkill -fi \"$filter\" >nul 2>&1");
+ }
+ }
+ }
+}
+
+#######################################################################
+# pidkill kills the process with a given pid mercilessly andforcefully.
+#
+sub pidkill {
+ my $pid = $_[0];
+
+ if($pid > 0) {
+ # signal the process to terminate
+ kill("KILL", $pid);
+
+ # request the process to quit
+ if($^O eq "msys") {
+ my $filter = "PID eq $pid";
+ my $result = `tasklist -fi \"$filter\" 2>nul`;
+ if(index($result, "$pid") != -1) {
+ system("taskkill -f -fi \"$filter\" >nul 2>&1");
+ # Windows XP Home compatibility
+ system("tskill $pid >nul 2>&1");
+ }
+ }
+ }
+}
+
+#######################################################################
# processexists checks if a process with the pid stored in the given
# pidfile exists and is alive. This will return 0 on any file related
# error or if a pid can not be extracted from the given file. When a
@@ -64,7 +136,7 @@ sub processexists {
if($pid > 0) {
# verify if currently alive
- if(kill(0, $pid)) {
+ if(pidexists($pid)) {
return $pid;
}
else {
@@ -111,10 +183,10 @@ sub killpid {
if($tmp =~ /^(\d+)$/) {
my $pid = $1;
if($pid > 0) {
- if(kill(0, $pid)) {
+ if(pidexists($pid)) {
print("RUN: Process with pid $pid signalled to die\n")
if($verbose);
- kill("TERM", $pid);
+ pidterm($pid);
push @signalled, $pid;
}
else {
@@ -134,7 +206,7 @@ sub killpid {
while($twentieths--) {
for(my $i = scalar(@signalled) - 1; $i >= 0; $i--) {
my $pid = $signalled[$i];
- if(!kill(0, $pid)) {
+ if(!pidexists($pid)) {
print("RUN: Process with pid $pid gracefully died\n")
if($verbose);
splice @signalled, $i, 1;
@@ -154,7 +226,7 @@ sub killpid {
if($pid > 0) {
print("RUN: Process with pid $pid forced to die with SIGKILL\n")
if($verbose);
- kill("KILL", $pid);
+ pidkill($pid);
# if possible reap its dead children
waitpid($pid, &WNOHANG);
push @reapchild, $pid;
@@ -194,7 +266,7 @@ sub killsockfilters {
if($pid > 0) {
printf("* kill pid for %s-%s => %d\n", $server,
($proto eq 'ftp')?'ctrl':'filt', $pid) if($verbose);
- kill("KILL", $pid);
+ pidkill($pid);
waitpid($pid, 0);
}
unlink($pidfile) if(-f $pidfile);
@@ -208,7 +280,7 @@ sub killsockfilters {
if($pid > 0) {
printf("* kill pid for %s-data => %d\n", $server,
$pid) if($verbose);
- kill("KILL", $pid);
+ pidkill($pid);
waitpid($pid, 0);
}
unlink($pidfile) if(-f $pidfile);
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index ed2a8326..4807a1fe 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -26,7 +26,7 @@
# In December 2009 we started remaking the server to support more protocols
# that are similar in spirit. Like POP3, IMAP and SMTP in addition to the FTP
# it already supported since a long time. Note that it still only supports one
-# protocol per invoke. You need to start mulitple servers to support multiple
+# protocol per invoke. You need to start multiple servers to support multiple
# protocols simultaneously.
#
# It is meant to exercise curl, it is not meant to be a fully working
@@ -39,7 +39,8 @@
#
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
# sub second timestamping needs Time::HiRes
eval {
no warnings "all";
@@ -51,6 +52,7 @@ BEGIN {
use strict;
use warnings;
use IPC::Open2;
+use Digest::MD5;
require "getpart.pm";
require "ftp.pm";
@@ -76,8 +78,7 @@ my $ipvnum = 4; # server IPv number (4 or 6)
my $proto = 'ftp'; # default server protocol
my $srcdir; # directory where ftpserver.pl is located
my $srvrname; # server name for presentation purposes
-my $grok_eprt;
-
+my $cwd_testno; # test case numbers extracted from CWD command
my $path = '.';
my $logdir = $path .'/log';
@@ -117,32 +118,52 @@ local *SFWRITE; # used to write to primary connection
local *DREAD; # used to read from secondary connection
local *DWRITE; # used to write to secondary connection
+my $sockfilt_timeout = 5; # default timeout for sockfilter eXsysreads
+
#**********************************************************************
# global vars which depend on server protocol selection
#
-my %commandfunc; # protocol command specific function callbacks
-my %displaytext; # text returned to client before callback runs
-my @welcome; # text returned to client upon connection
+my %commandfunc; # protocol command specific function callbacks
+my %displaytext; # text returned to client before callback runs
#**********************************************************************
# global vars customized for each test from the server commands file
#
-my $ctrldelay; # set if server should throttle ctrl stream
-my $datadelay; # set if server should throttle data stream
-my $retrweirdo; # set if ftp server should use RETRWEIRDO
-my $retrnosize; # set if ftp server should use RETRNOSIZE
-my $pasvbadip; # set if ftp server should use PASVBADIP
-my $nosave; # set if ftp server should not save uploaded data
-my %customreply; #
-my %customcount; #
-my %delayreply; #
+my $ctrldelay; # set if server should throttle ctrl stream
+my $datadelay; # set if server should throttle data stream
+my $retrweirdo; # set if ftp server should use RETRWEIRDO
+my $retrnosize; # set if ftp server should use RETRNOSIZE
+my $pasvbadip; # set if ftp server should use PASVBADIP
+my $nosave; # set if ftp server should not save uploaded data
+my $nodataconn; # set if ftp srvr doesn't establish or accepts data channel
+my $nodataconn425; # set if ftp srvr doesn't establish data ch and replies 425
+my $nodataconn421; # set if ftp srvr doesn't establish data ch and replies 421
+my $nodataconn150; # set if ftp srvr doesn't establish data ch and replies 150
+my @capabilities; # set if server supports capability commands
+my @auth_mechs; # set if server supports authentication commands
+my %fulltextreply; #
+my %commandreply; #
+my %customcount; #
+my %delayreply; #
#**********************************************************************
# global variables for to test ftp wildcardmatching or other test that
# need flexible LIST responses.. and corresponding files.
# $ftptargetdir is keeping the fake "name" of LIST directory.
+#
my $ftplistparserstate;
-my $ftptargetdir;
+my $ftptargetdir="";
+
+#**********************************************************************
+# global variables used when running a ftp server to keep state info
+# relative to the secondary or data sockfilt process. Values of these
+# variables should only be modified using datasockf_state() sub, given
+# that they are closely related and relationship is a bit awkward.
+#
+my $datasockf_state = 'STOPPED'; # see datasockf_state() sub
+my $datasockf_mode = 'none'; # ['none','active','passive']
+my $datasockf_runs = 'no'; # ['no','yes']
+my $datasockf_conn = 'no'; # ['no','yes']
#**********************************************************************
# global vars used for signal handling
@@ -151,6 +172,13 @@ my $got_exit_signal = 0; # set if program should finish execution ASAP
my $exit_signal; # first signal handled in exit_signal_handler
#**********************************************************************
+# Mail related definitions
+#
+my $TEXT_USERNAME = "user";
+my $TEXT_PASSWORD = "secret";
+my $POP3_TIMESTAMP = "<1972.987654321\@curl>";
+
+#**********************************************************************
# exit_signal_handler will be triggered to indicate that the program
# should finish its execution in a controlled way as soon as possible.
# For now, program will also terminate from within this handler.
@@ -205,6 +233,141 @@ sub ftpmsg {
# better on windows/cygwin
}
+#**********************************************************************
+# eXsysread is a wrapper around perl's sysread() function. This will
+# repeat the call to sysread() until it has actually read the complete
+# number of requested bytes or an unrecoverable condition occurs.
+# On success returns a positive value, the number of bytes requested.
+# On failure or timeout returns zero.
+#
+sub eXsysread {
+ my $FH = shift;
+ my $scalar = shift;
+ my $nbytes = shift;
+ my $timeout = shift; # A zero timeout disables eXsysread() time limit
+ #
+ my $time_limited = 0;
+ my $timeout_rest = 0;
+ my $start_time = 0;
+ my $nread = 0;
+ my $rc;
+
+ $$scalar = "";
+
+ if((not defined $nbytes) || ($nbytes < 1)) {
+ logmsg "Error: eXsysread() failure: " .
+ "length argument must be positive\n";
+ return 0;
+ }
+ if((not defined $timeout) || ($timeout < 0)) {
+ logmsg "Error: eXsysread() failure: " .
+ "timeout argument must be zero or positive\n";
+ return 0;
+ }
+ if($timeout > 0) {
+ # caller sets eXsysread() time limit
+ $time_limited = 1;
+ $timeout_rest = $timeout;
+ $start_time = int(time());
+ }
+
+ while($nread < $nbytes) {
+ if($time_limited) {
+ eval {
+ local $SIG{ALRM} = sub { die "alarm\n"; };
+ alarm $timeout_rest;
+ $rc = sysread($FH, $$scalar, $nbytes - $nread, $nread);
+ alarm 0;
+ };
+ $timeout_rest = $timeout - (int(time()) - $start_time);
+ if($timeout_rest < 1) {
+ logmsg "Error: eXsysread() failure: timed out\n";
+ return 0;
+ }
+ }
+ else {
+ $rc = sysread($FH, $$scalar, $nbytes - $nread, $nread);
+ }
+ if($got_exit_signal) {
+ logmsg "Error: eXsysread() failure: signalled to die\n";
+ return 0;
+ }
+ if(not defined $rc) {
+ if($!{EINTR}) {
+ logmsg "Warning: retrying sysread() interrupted system call\n";
+ next;
+ }
+ if($!{EAGAIN}) {
+ logmsg "Warning: retrying sysread() due to EAGAIN\n";
+ next;
+ }
+ if($!{EWOULDBLOCK}) {
+ logmsg "Warning: retrying sysread() due to EWOULDBLOCK\n";
+ next;
+ }
+ logmsg "Error: sysread() failure: $!\n";
+ return 0;
+ }
+ if($rc < 0) {
+ logmsg "Error: sysread() failure: returned negative value $rc\n";
+ return 0;
+ }
+ if($rc == 0) {
+ logmsg "Error: sysread() failure: read zero bytes\n";
+ return 0;
+ }
+ $nread += $rc;
+ }
+ return $nread;
+}
+
+#**********************************************************************
+# read_mainsockf attempts to read the given amount of output from the
+# sockfilter which is in use for the main or primary connection. This
+# reads untranslated sockfilt lingo which may hold data read from the
+# main or primary socket. On success returns 1, otherwise zero.
+#
+sub read_mainsockf {
+ my $scalar = shift;
+ my $nbytes = shift;
+ my $timeout = shift; # Optional argument, if zero blocks indefinitively
+ my $FH = \*SFREAD;
+
+ if(not defined $timeout) {
+ $timeout = $sockfilt_timeout + ($nbytes >> 12);
+ }
+ if(eXsysread($FH, $scalar, $nbytes, $timeout) != $nbytes) {
+ my ($fcaller, $lcaller) = (caller)[1,2];
+ logmsg "Error: read_mainsockf() failure at $fcaller " .
+ "line $lcaller. Due to eXsysread() failure\n";
+ return 0;
+ }
+ return 1;
+}
+
+#**********************************************************************
+# read_datasockf attempts to read the given amount of output from the
+# sockfilter which is in use for the data or secondary connection. This
+# reads untranslated sockfilt lingo which may hold data read from the
+# data or secondary socket. On success returns 1, otherwise zero.
+#
+sub read_datasockf {
+ my $scalar = shift;
+ my $nbytes = shift;
+ my $timeout = shift; # Optional argument, if zero blocks indefinitively
+ my $FH = \*DREAD;
+
+ if(not defined $timeout) {
+ $timeout = $sockfilt_timeout + ($nbytes >> 12);
+ }
+ if(eXsysread($FH, $scalar, $nbytes, $timeout) != $nbytes) {
+ my ($fcaller, $lcaller) = (caller)[1,2];
+ logmsg "Error: read_datasockf() failure at $fcaller " .
+ "line $lcaller. Due to eXsysread() failure\n";
+ return 0;
+ }
+ return 1;
+}
sub sysread_or_die {
my $FH = shift;
@@ -273,6 +436,28 @@ sub startsf {
}
}
+#**********************************************************************
+# Returns the given test's reply data
+#
+sub getreplydata {
+ my ($testno) = @_;
+ my $testpart = "";
+
+ $testno =~ s/^([^0-9]*)//;
+ if($testno > 10000) {
+ $testpart = $testno % 10000;
+ $testno = int($testno / 10000);
+ }
+
+ loadtest("$srcdir/data/test$testno");
+
+ my @data = getpart("reply", "data$testpart");
+ if((!@data) && ($testpart ne "")) {
+ @data = getpart("reply", "data");
+ }
+
+ return @data;
+}
sub sockfilt {
my $l;
@@ -282,7 +467,6 @@ sub sockfilt {
}
}
-
sub sockfiltsecondary {
my $l;
foreach $l (@_) {
@@ -291,10 +475,10 @@ sub sockfiltsecondary {
}
}
-
+#**********************************************************************
# Send data to the client on the control stream, which happens to be plain
# stdout.
-
+#
sub sendcontrol {
if(!$ctrldelay) {
# spit it all out at once
@@ -312,27 +496,40 @@ sub sendcontrol {
my $log;
foreach $log (@_) {
my $l = $log;
- $l =~ s/[\r\n]//g;
+ $l =~ s/\r/[CR]/g;
+ $l =~ s/\n/[LF]/g;
logmsg "> \"$l\"\n";
}
}
-# Send data to the client on the data stream
-
+#**********************************************************************
+# Send data to the FTP client on the data stream when data connection
+# is actually established. Given that this sub should only be called
+# when a data connection is supposed to be established, calling this
+# without a data connection is an indication of weak logic somewhere.
+#
sub senddata {
my $l;
+ if($datasockf_conn eq 'no') {
+ logmsg "WARNING: Detected data sending attempt without DATA channel\n";
+ foreach $l (@_) {
+ logmsg "WARNING: Data swallowed: $l\n"
+ }
+ return;
+ }
+
foreach $l (@_) {
- if(!$datadelay) {
- # spit it all out at once
- sockfiltsecondary $l;
- }
- else {
- # pause between each byte
- for (split(//,$l)) {
- sockfiltsecondary $_;
- select(undef, undef, undef, 0.01);
- }
- }
+ if(!$datadelay) {
+ # spit it all out at once
+ sockfiltsecondary $l;
+ }
+ else {
+ # pause between each byte
+ for (split(//,$l)) {
+ sockfiltsecondary $_;
+ select(undef, undef, undef, 0.01);
+ }
+ }
}
}
@@ -380,69 +577,96 @@ sub protocolsetup {
'NOOP' => '200 Yes, I\'m very good at doing nothing.',
'PBSZ' => '500 PBSZ not implemented',
'PROT' => '500 PROT not implemented',
- );
- @welcome = (
+ 'welcome' => join("",
'220- _ _ ____ _ '."\r\n",
'220- ___| | | | _ \| | '."\r\n",
'220- / __| | | | |_) | | '."\r\n",
- '220- | (__| |_| | _ <| |___ '."\r\n",
- '220 \___|\___/|_| \_\_____|'."\r\n"
+ '220- | (__| |_| | _ {| |___ '."\r\n",
+ '220 \___|\___/|_| \_\_____|'."\r\n")
);
}
elsif($proto eq 'pop3') {
%commandfunc = (
+ 'APOP' => \&APOP_pop3,
+ 'AUTH' => \&AUTH_pop3,
+ 'CAPA' => \&CAPA_pop3,
+ 'DELE' => \&DELE_pop3,
+ 'LIST' => \&LIST_pop3,
+ 'NOOP' => \&NOOP_pop3,
+ 'PASS' => \&PASS_pop3,
+ 'QUIT' => \&QUIT_pop3,
'RETR' => \&RETR_pop3,
+ 'RSET' => \&RSET_pop3,
+ 'STAT' => \&STAT_pop3,
+ 'TOP' => \&TOP_pop3,
+ 'UIDL' => \&UIDL_pop3,
+ 'USER' => \&USER_pop3,
);
%displaytext = (
- 'USER' => '+OK We are happy you popped in!',
- 'PASS' => '+OK Access granted',
- 'QUIT' => '+OK byebye',
- );
- @welcome = (
+ 'welcome' => join("",
' _ _ ____ _ '."\r\n",
' ___| | | | _ \| | '."\r\n",
' / __| | | | |_) | | '."\r\n",
- ' | (__| |_| | _ <| |___ '."\r\n",
+ ' | (__| |_| | _ {| |___ '."\r\n",
' \___|\___/|_| \_\_____|'."\r\n",
- '+OK cURL POP3 server ready to serve'."\r\n"
+ '+OK cURL POP3 server ready to serve '."\r\n")
);
}
elsif($proto eq 'imap') {
%commandfunc = (
- 'FETCH' => \&FETCH_imap,
- 'SELECT' => \&SELECT_imap,
+ 'APPEND' => \&APPEND_imap,
+ 'CAPABILITY' => \&CAPABILITY_imap,
+ 'CHECK' => \&CHECK_imap,
+ 'CLOSE' => \&CLOSE_imap,
+ 'COPY' => \&COPY_imap,
+ 'CREATE' => \&CREATE_imap,
+ 'DELETE' => \&DELETE_imap,
+ 'EXAMINE' => \&EXAMINE_imap,
+ 'EXPUNGE' => \&EXPUNGE_imap,
+ 'FETCH' => \&FETCH_imap,
+ 'LIST' => \&LIST_imap,
+ 'LSUB' => \&LSUB_imap,
+ 'LOGIN' => \&LOGIN_imap,
+ 'LOGOUT' => \&LOGOUT_imap,
+ 'NOOP' => \&NOOP_imap,
+ 'RENAME' => \&RENAME_imap,
+ 'SEARCH' => \&SEARCH_imap,
+ 'SELECT' => \&SELECT_imap,
+ 'STATUS' => \&STATUS_imap,
+ 'STORE' => \&STORE_imap,
+ 'UID' => \&UID_imap,
);
%displaytext = (
- 'LOGIN' => ' OK We are happy you popped in!',
- 'SELECT' => ' OK selection done',
- 'LOGOUT' => ' OK thanks for the fish',
- );
- @welcome = (
+ 'welcome' => join("",
' _ _ ____ _ '."\r\n",
' ___| | | | _ \| | '."\r\n",
' / __| | | | |_) | | '."\r\n",
- ' | (__| |_| | _ <| |___ '."\r\n",
+ ' | (__| |_| | _ {| |___ '."\r\n",
' \___|\___/|_| \_\_____|'."\r\n",
- '* OK cURL IMAP server ready to serve'."\r\n"
+ '* OK cURL IMAP server ready to serve'."\r\n")
);
}
elsif($proto eq 'smtp') {
%commandfunc = (
'DATA' => \&DATA_smtp,
+ 'EHLO' => \&EHLO_smtp,
+ 'EXPN' => \&EXPN_smtp,
+ 'HELO' => \&HELO_smtp,
+ 'HELP' => \&HELP_smtp,
+ 'MAIL' => \&MAIL_smtp,
+ 'NOOP' => \&NOOP_smtp,
+ 'RSET' => \&RSET_smtp,
'RCPT' => \&RCPT_smtp,
+ 'VRFY' => \&VRFY_smtp,
+ 'QUIT' => \&QUIT_smtp,
);
%displaytext = (
- 'EHLO' => '230 We are happy you popped in!',
- 'MAIL' => '200 Note taken',
- 'RCPT' => '200 Receivers accepted',
- 'QUIT' => '200 byebye',
- );
- @welcome = (
+ 'welcome' => join("",
'220- _ _ ____ _ '."\r\n",
'220- ___| | | | _ \| | '."\r\n",
'220- / __| | | | |_) | | '."\r\n",
- '220- | (__| |_| | _ <| |___ '."\r\n",
- '220 \___|\___/|_| \_\_____|'."\r\n"
+ '220- | (__| |_| | _ {| |___ '."\r\n",
+ '220 \___|\___/|_| \_\_____|'."\r\n")
);
}
}
@@ -452,118 +676,395 @@ sub close_dataconn {
my $datapid = processexists($datasockf_pidfile);
+ logmsg "=====> Closing $datasockf_mode DATA connection...\n";
+
if(!$closed) {
- logmsg "* disconnect data connection\n";
if($datapid > 0) {
+ logmsg "Server disconnects $datasockf_mode DATA connection\n";
print DWRITE "DISC\n";
my $i;
sysread DREAD, $i, 5;
}
+ else {
+ logmsg "Server finds $datasockf_mode DATA connection already ".
+ "disconnected\n";
+ }
}
else {
- logmsg "data connection already disconnected\n";
+ logmsg "Server knows $datasockf_mode DATA connection is already ".
+ "disconnected\n";
}
- logmsg "=====> Closed data connection\n";
- logmsg "* quit sockfilt for data (pid $datapid)\n";
if($datapid > 0) {
print DWRITE "QUIT\n";
waitpid($datapid, 0);
unlink($datasockf_pidfile) if(-f $datasockf_pidfile);
+ logmsg "DATA sockfilt for $datasockf_mode data channel quits ".
+ "(pid $datapid)\n";
}
+ else {
+ logmsg "DATA sockfilt for $datasockf_mode data channel already ".
+ "dead\n";
+ }
+
+ logmsg "=====> Closed $datasockf_mode DATA connection\n";
+
+ datasockf_state('STOPPED');
}
################
################ SMTP commands
################
-# what set by "RCPT"
-my $smtp_rcpt;
+# The type of server (SMTP or ESMTP)
+my $smtp_type;
-sub DATA_smtp {
- my $testno;
+# The client (which normally contains the test number)
+my $smtp_client;
- if($smtp_rcpt =~ /^TO:(.*)/) {
- $testno = $1;
+sub EHLO_smtp {
+ my ($client) = @_;
+ my @data;
+
+ # TODO: Get the IP address of the client connection to use in the
+ # EHLO response when the client doesn't specify one but for now use
+ # 127.0.0.1
+ if(!$client) {
+ $client = "[127.0.0.1]";
+ }
+
+ # Set the server type to ESMTP
+ $smtp_type = "ESMTP";
+
+ # Calculate the EHLO response
+ push @data, "$smtp_type pingpong test server Hello $client";
+
+ if((@capabilities) || (@auth_mechs)) {
+ my $mechs;
+
+ for my $c (@capabilities) {
+ push @data, $c;
+ }
+
+ for my $am (@auth_mechs) {
+ if(!$mechs) {
+ $mechs = "$am";
+ }
+ else {
+ $mechs .= " $am";
+ }
+ }
+
+ if($mechs) {
+ push @data, "AUTH $mechs";
+ }
+ }
+
+ # Send the EHLO response
+ for(my $i = 0; $i < @data; $i++) {
+ my $d = $data[$i];
+
+ if($i < @data - 1) {
+ sendcontrol "250-$d\r\n";
+ }
+ else {
+ sendcontrol "250 $d\r\n";
+ }
+ }
+
+ # Store the client (as it may contain the test number)
+ $smtp_client = $client;
+
+ return 0;
+}
+
+sub HELO_smtp {
+ my ($client) = @_;
+
+ # TODO: Get the IP address of the client connection to use in the HELO
+ # response when the client doesn't specify one but for now use 127.0.0.1
+ if(!$client) {
+ $client = "[127.0.0.1]";
+ }
+
+ # Set the server type to SMTP
+ $smtp_type = "SMTP";
+
+ # Send the HELO response
+ sendcontrol "250 $smtp_type pingpong test server Hello $client\r\n";
+
+ # Store the client (as it may contain the test number)
+ $smtp_client = $client;
+
+ return 0;
+}
+
+sub MAIL_smtp {
+ my ($args) = @_;
+
+ logmsg "MAIL_smtp got $args\n";
+
+ if (!$args) {
+ sendcontrol "501 Unrecognized parameter\r\n";
}
else {
- return; # failure
+ my $from;
+ my $size;
+ my @elements = split(/ /, $args);
+
+ # Get the FROM and SIZE parameters
+ for my $e (@elements) {
+ if($e =~ /^FROM:(.*)$/) {
+ $from = $1;
+ }
+ elsif($e =~ /^SIZE=(\d+)$/) {
+ $size = $1;
+ }
+ }
+
+ # Validate the from address (only <> and a valid email address inside
+ # <> are allowed, such as <user@example.com>)
+ if ((!$from) || (($from ne "<>") && ($from !~
+ /^<([a-zA-Z0-9._%+-]+)\@([a-zA-Z0-9.-]+).([a-zA-Z]{2,4})>$/))) {
+ sendcontrol "501 Invalid address\r\n";
+ }
+ else {
+ my @found;
+ my $valid = 1;
+
+ # Check the capabilities for SIZE and if the specified size is
+ # greater than the message size then reject it
+ if (@found = grep /^SIZE (\d+)$/, @capabilities) {
+ if ($found[0] =~ /^SIZE (\d+)$/) {
+ if ($size > $1) {
+ $valid = 0;
+ }
+ }
+ }
+
+ if(!$valid) {
+ sendcontrol "552 Message size too large\r\n";
+ }
+ else {
+ sendcontrol "250 Sender OK\r\n";
+ }
+ }
}
- if($testno eq "<verifiedserver>") {
- sendcontrol "554 WE ROOLZ: $$\r\n";
- return 0; # don't wait for data now
+ return 0;
+}
+
+sub RCPT_smtp {
+ my ($args) = @_;
+
+ logmsg "RCPT_smtp got $args\n";
+
+ # Get the TO parameter
+ if($args !~ /^TO:(.*)/) {
+ sendcontrol "501 Unrecognized parameter\r\n";
}
else {
- $testno =~ s/^([^0-9]*)([0-9]+).*/$2/;
- sendcontrol "354 Show me the mail\r\n";
+ my $to = $1;
+
+ # Validate the to address (only a valid email address inside <> is
+ # allowed, such as <user@example.com>)
+ if ($to !~
+ /^<([a-zA-Z0-9._%+-]+)\@([a-zA-Z0-9.-]+).([a-zA-Z]{2,4})>$/) {
+ sendcontrol "501 Invalid address\r\n";
+ }
+ else {
+ sendcontrol "250 Recipient OK\r\n";
+ }
+ }
+
+ return 0;
+}
+
+sub DATA_smtp {
+ my ($args) = @_;
+
+ if ($args) {
+ sendcontrol "501 Unrecognized parameter\r\n";
+ }
+ elsif ($smtp_client !~ /^(\d*)$/) {
+ sendcontrol "501 Invalid arguments\r\n";
}
+ else {
+ sendcontrol "354 Show me the mail\r\n";
- logmsg "===> rcpt $testno was $smtp_rcpt\n";
+ my $testno = $smtp_client;
+ my $filename = "log/upload.$testno";
- my $filename = "log/upload.$testno";
+ logmsg "Store test number $testno in $filename\n";
- logmsg "Store test number $testno in $filename\n";
+ open(FILE, ">$filename") ||
+ return 0; # failed to open output
- open(FILE, ">$filename") ||
- return 0; # failed to open output
+ my $line;
+ my $ulsize=0;
+ my $disc=0;
+ my $raw;
+ while (5 == (sysread \*SFREAD, $line, 5)) {
+ if($line eq "DATA\n") {
+ my $i;
+ my $eob;
+ sysread \*SFREAD, $i, 5;
- my $line;
- my $ulsize=0;
- my $disc=0;
- my $raw;
- while (5 == (sysread \*SFREAD, $line, 5)) {
- if($line eq "DATA\n") {
- my $i;
- my $eob;
- sysread \*SFREAD, $i, 5;
+ my $size = 0;
+ if($i =~ /^([0-9a-fA-F]{4})\n/) {
+ $size = hex($1);
+ }
- my $size = 0;
- if($i =~ /^([0-9a-fA-F]{4})\n/) {
- $size = hex($1);
- }
+ read_mainsockf(\$line, $size);
- sysread \*SFREAD, $line, $size;
+ $ulsize += $size;
+ print FILE $line if(!$nosave);
- $ulsize += $size;
- print FILE $line if(!$nosave);
+ $raw .= $line;
+ if($raw =~ /\x0d\x0a\x2e\x0d\x0a/) {
+ # end of data marker!
+ $eob = 1;
+ }
+
+ logmsg "> Appending $size bytes to file\n";
- $raw .= $line;
- if($raw =~ /\x0d\x0a\x2e\x0d\x0a/) {
- # end of data marker!
- $eob = 1;
+ if($eob) {
+ logmsg "Found SMTP EOB marker\n";
+ last;
+ }
}
- logmsg "> Appending $size bytes to file\n";
- if($eob) {
- logmsg "Found SMTP EOB marker\n";
+ elsif($line eq "DISC\n") {
+ # disconnect!
+ $disc=1;
+ last;
+ }
+ else {
+ logmsg "No support for: $line";
last;
}
}
- elsif($line eq "DISC\n") {
- # disconnect!
- $disc=1;
- last;
+
+ if($nosave) {
+ print FILE "$ulsize bytes would've been stored here\n";
}
- else {
- logmsg "No support for: $line";
- last;
+
+ close(FILE);
+
+ logmsg "received $ulsize bytes upload\n";
+
+ sendcontrol "250 OK, data received!\r\n";
+ }
+
+ return 0;
+}
+
+sub NOOP_smtp {
+ my ($args) = @_;
+
+ if($args) {
+ sendcontrol "501 Unrecognized parameter\r\n";
+ }
+ else {
+ sendcontrol "250 OK\r\n";
+ }
+
+ return 0;
+}
+
+sub RSET_smtp {
+ my ($args) = @_;
+
+ if($args) {
+ sendcontrol "501 Unrecognized parameter\r\n";
+ }
+ else {
+ sendcontrol "250 Resetting\r\n";
+ }
+
+ return 0;
+}
+
+sub HELP_smtp {
+ my ($args) = @_;
+
+ # One argument is optional
+ if($args) {
+ logmsg "HELP_smtp got $args\n";
+ }
+
+ if($smtp_client eq "verifiedserver") {
+ # This is the secret command that verifies that this actually is
+ # the curl test server
+ sendcontrol "214 WE ROOLZ: $$\r\n";
+
+ if($verbose) {
+ print STDERR "FTPD: We returned proof we are the test server\n";
}
+
+ logmsg "return proof we are we\n";
}
- if($nosave) {
- print FILE "$ulsize bytes would've been stored here\n";
+ else {
+ sendcontrol "214-This server supports the following commands:\r\n";
+
+ if(@auth_mechs) {
+ sendcontrol "214 HELO EHLO RCPT DATA RSET MAIL VRFY EXPN QUIT HELP AUTH\r\n";
+ }
+ else {
+ sendcontrol "214 HELO EHLO RCPT DATA RSET MAIL VRFY EXPN QUIT HELP\r\n";
+ }
}
- close(FILE);
- sendcontrol "250 OK, data received!\r\n";
- logmsg "received $ulsize bytes upload\n";
+ return 0;
}
-sub RCPT_smtp {
+sub VRFY_smtp {
my ($args) = @_;
+ my ($username, $address) = split(/ /, $args, 2);
- $smtp_rcpt = $args;
+ logmsg "VRFY_smtp got $args\n";
+
+ if($username eq "") {
+ sendcontrol "501 Unrecognized parameter\r\n";
+ }
+ else {
+ my @data = getreplydata($smtp_client);
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+ }
+
+ return 0;
}
+sub EXPN_smtp {
+ my ($list_name) = @_;
+
+ logmsg "EXPN_smtp got $list_name\n";
+
+ if(!$list_name) {
+ sendcontrol "501 Unrecognized parameter\r\n";
+ }
+ else {
+ my @data = getreplydata($smtp_client);
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+ }
+
+ return 0;
+}
+
+sub QUIT_smtp {
+ sendcontrol "221 cURL $smtp_type server signing off\r\n";
+
+ return 0;
+}
+
+# What was deleted by IMAP STORE / POP3 DELE commands
+my @deleted;
+
################
################ IMAP commands
################
@@ -574,113 +1075,875 @@ my $cmdid;
# what was picked by SELECT
my $selected;
-sub SELECT_imap {
- my ($testno) = @_;
- my @data;
- my $size;
+# Any IMAP parameter can come in escaped and in double quotes.
+# This function is dumb (so far) and just removes the quotes if present.
+sub fix_imap_params {
+ foreach (@_) {
+ $_ = $1 if /^"(.*)"$/;
+ }
+}
+
+sub CAPABILITY_imap {
+ if((!@capabilities) && (!@auth_mechs)) {
+ sendcontrol "$cmdid BAD Command\r\n";
+ }
+ else {
+ my $data;
+
+ # Calculate the CAPABILITY response
+ $data = "* CAPABILITY IMAP4";
+
+ for my $c (@capabilities) {
+ $data .= " $c";
+ }
+
+ for my $am (@auth_mechs) {
+ $data .= " AUTH=$am";
+ }
- logmsg "SELECT_imap got test $testno\n";
+ $data .= " pingpong test server\r\n";
- $selected = $testno;
+ # Send the CAPABILITY response
+ sendcontrol $data;
+ sendcontrol "$cmdid OK CAPABILITY completed\r\n";
+ }
return 0;
}
+sub LOGIN_imap {
+ my ($args) = @_;
+ my ($user, $password) = split(/ /, $args, 2);
+ fix_imap_params($user, $password);
+
+ logmsg "LOGIN_imap got $args\n";
+
+ if ($user eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ elsif (($user ne $TEXT_USERNAME) || ($password ne $TEXT_PASSWORD)) {
+ sendcontrol "$cmdid NO LOGIN failed\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK LOGIN completed\r\n";
+ }
+
+ return 0;
+}
+
+sub SELECT_imap {
+ my ($mailbox) = @_;
+ fix_imap_params($mailbox);
+
+ logmsg "SELECT_imap got test $mailbox\n";
+
+ if($mailbox eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ # Example from RFC 3501, 6.3.1. SELECT Command
+ sendcontrol "* 172 EXISTS\r\n";
+ sendcontrol "* 1 RECENT\r\n";
+ sendcontrol "* OK [UNSEEN 12] Message 12 is first unseen\r\n";
+ sendcontrol "* OK [UIDVALIDITY 3857529045] UIDs valid\r\n";
+ sendcontrol "* OK [UIDNEXT 4392] Predicted next UID\r\n";
+ sendcontrol "* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)\r\n";
+ sendcontrol "* OK [PERMANENTFLAGS (\\Deleted \\Seen \\*)] Limited\r\n";
+ sendcontrol "$cmdid OK [READ-WRITE] SELECT completed\r\n";
+
+ $selected = $mailbox;
+ }
+
+ return 0;
+}
sub FETCH_imap {
- my ($testno) = @_;
- my @data;
- my $size;
+ my ($args) = @_;
+ my ($uid, $how) = split(/ /, $args, 2);
+ fix_imap_params($uid, $how);
- logmsg "FETCH_imap got test $testno\n";
+ logmsg "FETCH_imap got $args\n";
- $testno = $selected;
+ if ($selected eq "") {
+ sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
+ }
+ else {
+ my @data;
+ my $size;
+
+ if($selected eq "verifiedserver") {
+ # this is the secret command that verifies that this actually is
+ # the curl test server
+ my $response = "WE ROOLZ: $$\r\n";
+ if($verbose) {
+ print STDERR "FTPD: We returned proof we are the test server\n";
+ }
+ $data[0] = $response;
+ logmsg "return proof we are we\n";
+ }
+ else {
+ # send mail content
+ logmsg "retrieve a mail\n";
- if($testno =~ /^verifiedserver$/) {
- # this is the secret command that verifies that this actually is
- # the curl test server
- my $response = "WE ROOLZ: $$\r\n";
- if($verbose) {
- print STDERR "FTPD: We returned proof we are the test server\n";
- }
- $data[0] = $response;
- logmsg "return proof we are we\n";
- }
- else {
- logmsg "retrieve a mail\n";
+ @data = getreplydata($selected);
+ }
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
+ for (@data) {
+ $size += length($_);
+ }
- # send mail content
- loadtest("$srcdir/data/test$testno");
+ sendcontrol "* $uid FETCH ($how {$size}\r\n";
- @data = getpart("reply", "data$testpart");
- }
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol ")\r\n";
+ sendcontrol "$cmdid OK FETCH completed\r\n";
+ }
+
+ return 0;
+}
+
+sub APPEND_imap {
+ my ($args) = @_;
+
+ logmsg "APPEND_imap got $args\r\n";
+
+ $args =~ /^([^ ]+) [^{]*\{(\d+)\}$/;
+ my ($mailbox, $size) = ($1, $2);
+ fix_imap_params($mailbox);
+
+ if($mailbox eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "+ Ready for literal data\r\n";
- for (@data) {
- $size += length($_);
- }
+ my $testno = $mailbox;
+ my $filename = "log/upload.$testno";
- sendcontrol "* FETCH starts {$size}\r\n";
+ logmsg "Store test number $testno in $filename\n";
- for my $d (@data) {
- sendcontrol $d;
- }
+ open(FILE, ">$filename") ||
+ return 0; # failed to open output
- sendcontrol "$cmdid OK FETCH completed\r\n";
+ my $received = 0;
+ my $line;
+ while(5 == (sysread \*SFREAD, $line, 5)) {
+ if($line eq "DATA\n") {
+ sysread \*SFREAD, $line, 5;
- return 0;
+ my $chunksize = 0;
+ if($line =~ /^([0-9a-fA-F]{4})\n/) {
+ $chunksize = hex($1);
+ }
+
+ read_mainsockf(\$line, $chunksize);
+
+ my $left = $size - $received;
+ my $datasize = ($left > $chunksize) ? $chunksize : $left;
+
+ if($datasize > 0) {
+ logmsg "> Appending $datasize bytes to file\n";
+ print FILE substr($line, 0, $datasize) if(!$nosave);
+ $line = substr($line, $datasize);
+
+ $received += $datasize;
+ if($received == $size) {
+ logmsg "Received all data, waiting for final CRLF.\n";
+ }
+ }
+
+ if($received == $size && $line eq "\r\n") {
+ last;
+ }
+ }
+ elsif($line eq "DISC\n") {
+ logmsg "Unexpected disconnect!\n";
+ last;
+ }
+ else {
+ logmsg "No support for: $line";
+ last;
+ }
+ }
+
+ if($nosave) {
+ print FILE "$size bytes would've been stored here\n";
+ }
+
+ close(FILE);
+
+ logmsg "received $size bytes upload\n";
+
+ sendcontrol "$cmdid OK APPEND completed\r\n";
+ }
+
+ return 0;
+}
+
+sub STORE_imap {
+ my ($args) = @_;
+ my ($uid, $what, $value) = split(/ /, $args, 3);
+ fix_imap_params($uid);
+
+ logmsg "STORE_imap got $args\n";
+
+ if ($selected eq "") {
+ sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
+ }
+ elsif (($uid eq "") || ($what ne "+Flags") || ($value eq "")) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ if($value eq "\\Deleted") {
+ push(@deleted, $uid);
+ }
+
+ sendcontrol "* $uid FETCH (FLAGS (\\Seen $value))\r\n";
+ sendcontrol "$cmdid OK STORE completed\r\n";
+ }
+
+ return 0;
+}
+
+sub LIST_imap {
+ my ($args) = @_;
+ my ($reference, $mailbox) = split(/ /, $args, 2);
+ fix_imap_params($reference, $mailbox);
+
+ logmsg "LIST_imap got $args\n";
+
+ if ($reference eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ elsif ($reference eq "verifiedserver") {
+ # this is the secret command that verifies that this actually is
+ # the curl test server
+ sendcontrol "* LIST () \"/\" \"WE ROOLZ: $$\"\r\n";
+ sendcontrol "$cmdid OK LIST Completed\r\n";
+
+ if($verbose) {
+ print STDERR "FTPD: We returned proof we are the test server\n";
+ }
+
+ logmsg "return proof we are we\n";
+ }
+ else {
+ my @data = getreplydata($reference);
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol "$cmdid OK LIST Completed\r\n";
+ }
+
+ return 0;
+}
+
+sub LSUB_imap {
+ my ($args) = @_;
+ my ($reference, $mailbox) = split(/ /, $args, 2);
+ fix_imap_params($reference, $mailbox);
+
+ logmsg "LSUB_imap got $args\n";
+
+ if ($reference eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ my @data = getreplydata($reference);
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol "$cmdid OK LSUB Completed\r\n";
+ }
+
+ return 0;
+}
+
+sub EXAMINE_imap {
+ my ($mailbox) = @_;
+ fix_imap_params($mailbox);
+
+ logmsg "EXAMINE_imap got $mailbox\n";
+
+ if ($mailbox eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ my @data = getreplydata($mailbox);
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol "$cmdid OK [READ-ONLY] EXAMINE completed\r\n";
+ }
+
+ return 0;
+}
+
+sub STATUS_imap {
+ my ($args) = @_;
+ my ($mailbox, $what) = split(/ /, $args, 2);
+ fix_imap_params($mailbox);
+
+ logmsg "STATUS_imap got $args\n";
+
+ if ($mailbox eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ my @data = getreplydata($mailbox);
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol "$cmdid OK STATUS completed\r\n";
+ }
+
+ return 0;
+}
+
+sub SEARCH_imap {
+ my ($what) = @_;
+ fix_imap_params($what);
+
+ logmsg "SEARCH_imap got $what\n";
+
+ if ($selected eq "") {
+ sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
+ }
+ elsif ($what eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ my @data = getreplydata($selected);
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol "$cmdid OK SEARCH completed\r\n";
+ }
+
+ return 0;
+}
+
+sub CREATE_imap {
+ my ($args) = @_;
+ fix_imap_params($args);
+
+ logmsg "CREATE_imap got $args\n";
+
+ if ($args eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK CREATE completed\r\n";
+ }
+
+ return 0;
+}
+
+sub DELETE_imap {
+ my ($args) = @_;
+ fix_imap_params($args);
+
+ logmsg "DELETE_imap got $args\n";
+
+ if ($args eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK DELETE completed\r\n";
+ }
+
+ return 0;
+}
+
+sub RENAME_imap {
+ my ($args) = @_;
+ my ($from_mailbox, $to_mailbox) = split(/ /, $args, 2);
+ fix_imap_params($from_mailbox, $to_mailbox);
+
+ logmsg "RENAME_imap got $args\n";
+
+ if (($from_mailbox eq "") || ($to_mailbox eq "")) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK RENAME completed\r\n";
+ }
+
+ return 0;
+}
+
+sub CHECK_imap {
+ if ($selected eq "") {
+ sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK CHECK completed\r\n";
+ }
+
+ return 0;
+}
+
+sub CLOSE_imap {
+ if ($selected eq "") {
+ sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
+ }
+ elsif (!@deleted) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK CLOSE completed\r\n";
+
+ @deleted = ();
+ }
+
+ return 0;
+}
+
+sub EXPUNGE_imap {
+ if ($selected eq "") {
+ sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
+ }
+ else {
+ if (!@deleted) {
+ # Report the number of existing messages as per the SELECT
+ # command
+ sendcontrol "* 172 EXISTS\r\n";
+ }
+ else {
+ # Report the message UIDs being deleted
+ for my $d (@deleted) {
+ sendcontrol "* $d EXPUNGE\r\n";
+ }
+
+ @deleted = ();
+ }
+
+ sendcontrol "$cmdid OK EXPUNGE completed\r\n";
+ }
+
+ return 0;
+}
+
+sub COPY_imap {
+ my ($args) = @_;
+ my ($uid, $mailbox) = split(/ /, $args, 2);
+ fix_imap_params($uid, $mailbox);
+
+ logmsg "COPY_imap got $args\n";
+
+ if (($uid eq "") || ($mailbox eq "")) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK COPY completed\r\n";
+ }
+
+ return 0;
+}
+
+sub UID_imap {
+ my ($args) = @_;
+ my ($command) = split(/ /, $args, 1);
+ fix_imap_params($command);
+
+ logmsg "UID_imap got $args\n";
+
+ if ($selected eq "") {
+ sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
+ }
+ elsif (($command ne "COPY") && ($command ne "FETCH") &&
+ ($command ne "STORE") && ($command ne "SEARCH")) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ my @data = getreplydata($selected);
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol "$cmdid OK $command completed\r\n";
+ }
+
+ return 0;
+}
+
+sub NOOP_imap {
+ my ($args) = @_;
+ my @data = (
+ "* 22 EXPUNGE\r\n",
+ "* 23 EXISTS\r\n",
+ "* 3 RECENT\r\n",
+ "* 14 FETCH (FLAGS (\\Seen \\Deleted))\r\n",
+ );
+
+ if ($args) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol "$cmdid OK NOOP completed\r\n";
+ }
+
+ return 0;
+}
+
+sub LOGOUT_imap {
+ sendcontrol "* BYE cURL IMAP server signing off\r\n";
+ sendcontrol "$cmdid OK LOGOUT completed\r\n";
+
+ return 0;
}
################
################ POP3 commands
################
+# Who is attempting to log in
+my $username;
+
+sub CAPA_pop3 {
+ my @list = ();
+ my $mechs;
+
+ # Calculate the capability list based on the specified capabilities
+ # (except APOP) and any authentication mechanisms
+ for my $c (@capabilities) {
+ push @list, "$c\r\n" unless $c eq "APOP";
+ }
+
+ for my $am (@auth_mechs) {
+ if(!$mechs) {
+ $mechs = "$am";
+ }
+ else {
+ $mechs .= " $am";
+ }
+ }
+
+ if($mechs) {
+ push @list, "SASL $mechs\r\n";
+ }
+
+ if(!@list) {
+ sendcontrol "-ERR Unrecognized command\r\n";
+ }
+ else {
+ my @data = ();
+
+ # Calculate the CAPA response
+ push @data, "+OK List of capabilities follows\r\n";
+
+ for my $l (@list) {
+ push @data, "$l\r\n";
+ }
+
+ push @data, "IMPLEMENTATION POP3 pingpong test server\r\n";
+
+ # Send the CAPA response
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ # End with the magic 3-byte end of listing marker
+ sendcontrol ".\r\n";
+ }
+
+ return 0;
+}
+
+sub APOP_pop3 {
+ my ($args) = @_;
+ my ($user, $secret) = split(/ /, $args, 2);
+
+ if (!grep /^APOP$/, @capabilities) {
+ sendcontrol "-ERR Unrecognized command\r\n";
+ }
+ elsif (($user eq "") || ($secret eq "")) {
+ sendcontrol "-ERR Protocol error\r\n";
+ }
+ else {
+ my $digest = Digest::MD5::md5_hex($POP3_TIMESTAMP, $TEXT_PASSWORD);
+
+ if (($user ne $TEXT_USERNAME) || ($secret ne $digest)) {
+ sendcontrol "-ERR Login failure\r\n";
+ }
+ else {
+ sendcontrol "+OK Login successful\r\n";
+ }
+ }
+
+ return 0;
+}
+
+sub AUTH_pop3 {
+ if(!@auth_mechs) {
+ sendcontrol "-ERR Unrecognized command\r\n";
+ }
+ else {
+ my @data = ();
+
+ # Calculate the AUTH response
+ push @data, "+OK List of supported mechanisms follows\r\n";
+
+ for my $am (@auth_mechs) {
+ push @data, "$am\r\n";
+ }
+
+ # Send the AUTH response
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ # End with the magic 3-byte end of listing marker
+ sendcontrol ".\r\n";
+ }
+
+ return 0;
+}
+
+sub USER_pop3 {
+ my ($user) = @_;
+
+ logmsg "USER_pop3 got $user\n";
+
+ if (!$user) {
+ sendcontrol "-ERR Protocol error\r\n";
+ }
+ else {
+ $username = $user;
+
+ sendcontrol "+OK\r\n";
+ }
+
+ return 0;
+}
+
+sub PASS_pop3 {
+ my ($password) = @_;
+
+ logmsg "PASS_pop3 got $password\n";
+
+ if (($username ne $TEXT_USERNAME) || ($password ne $TEXT_PASSWORD)) {
+ sendcontrol "-ERR Login failure\r\n";
+ }
+ else {
+ sendcontrol "+OK Login successful\r\n";
+ }
+
+ return 0;
+}
+
sub RETR_pop3 {
- my ($testno) = @_;
- my @data;
+ my ($msgid) = @_;
+ my @data;
+
+ if($msgid =~ /^verifiedserver$/) {
+ # this is the secret command that verifies that this actually is
+ # the curl test server
+ my $response = "WE ROOLZ: $$\r\n";
+ if($verbose) {
+ print STDERR "FTPD: We returned proof we are the test server\n";
+ }
+ $data[0] = $response;
+ logmsg "return proof we are we\n";
+ }
+ else {
+ # send mail content
+ logmsg "retrieve a mail\n";
+
+ @data = getreplydata($msgid);
+ }
+
+ sendcontrol "+OK Mail transfer starts\r\n";
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ # end with the magic 3-byte end of mail marker, assumes that the
+ # mail body ends with a CRLF!
+ sendcontrol ".\r\n";
+
+ return 0;
+}
+
+sub LIST_pop3 {
+ # This is a built-in fake-message list
+ my @data = (
+ "1 100\r\n",
+ "2 4294967400\r\n", # > 4 GB
+ "3 200\r\n",
+ );
+
+ logmsg "retrieve a message list\n";
+
+ sendcontrol "+OK Listing starts\r\n";
- if($testno =~ /^verifiedserver$/) {
- # this is the secret command that verifies that this actually is
- # the curl test server
- my $response = "WE ROOLZ: $$\r\n";
- if($verbose) {
- print STDERR "FTPD: We returned proof we are the test server\n";
- }
- $data[0] = $response;
- logmsg "return proof we are we\n";
- }
- else {
- logmsg "retrieve a mail\n";
+ for my $d (@data) {
+ sendcontrol $d;
+ }
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
+ # End with the magic 3-byte end of listing marker
+ sendcontrol ".\r\n";
- # send mail content
- loadtest("$srcdir/data/test$testno");
+ return 0;
+}
- @data = getpart("reply", "data$testpart");
- }
+sub DELE_pop3 {
+ my ($msgid) = @_;
- sendcontrol "+OK Mail transfer starts\r\n";
+ logmsg "DELE_pop3 got $msgid\n";
- for my $d (@data) {
- sendcontrol $d;
- }
+ if (!$msgid) {
+ sendcontrol "-ERR Protocol error\r\n";
+ }
+ else {
+ push (@deleted, $msgid);
- # end with the magic 5-byte end of mail marker
- sendcontrol "\r\n.\r\n";
+ sendcontrol "+OK\r\n";
+ }
- return 0;
+ return 0;
+}
+
+sub STAT_pop3 {
+ my ($args) = @_;
+
+ if ($args) {
+ sendcontrol "-ERR Protocol error\r\n";
+ }
+ else {
+ # Send statistics for the built-in fake message list as
+ # detailed in the LIST_pop3 function above
+ sendcontrol "+OK 3 4294967800\r\n";
+ }
+
+ return 0;
+}
+
+sub NOOP_pop3 {
+ my ($args) = @_;
+
+ if ($args) {
+ sendcontrol "-ERR Protocol error\r\n";
+ }
+ else {
+ sendcontrol "+OK\r\n";
+ }
+
+ return 0;
+}
+
+sub UIDL_pop3 {
+ # This is a built-in fake-message UID list
+ my @data = (
+ "1 1\r\n",
+ "2 2\r\n",
+ "3 4\r\n", # Note that UID 3 is a simulated "deleted" message
+ );
+
+ if (!grep /^UIDL$/, @capabilities) {
+ sendcontrol "-ERR Unrecognized command\r\n";
+ }
+ else {
+ logmsg "retrieve a message UID list\n";
+
+ sendcontrol "+OK Listing starts\r\n";
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ # End with the magic 3-byte end of listing marker
+ sendcontrol ".\r\n";
+ }
+
+ return 0;
+}
+
+sub TOP_pop3 {
+ my ($args) = @_;
+ my ($msgid, $lines) = split(/ /, $args, 2);
+
+ logmsg "TOP_pop3 got $args\n";
+
+ if (!grep /^TOP$/, @capabilities) {
+ sendcontrol "-ERR Unrecognized command\r\n";
+ }
+ elsif (($msgid eq "") || ($lines eq "")) {
+ sendcontrol "-ERR Protocol error\r\n";
+ }
+ else {
+ if ($lines == "0") {
+ logmsg "retrieve header of mail\n";
+ }
+ else {
+ logmsg "retrieve top $lines lines of mail\n";
+ }
+
+ my @data = getreplydata($msgid);
+
+ sendcontrol "+OK Mail transfer starts\r\n";
+
+ # Send mail content
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ # End with the magic 3-byte end of mail marker, assumes that the
+ # mail body ends with a CRLF!
+ sendcontrol ".\r\n";
+ }
+
+ return 0;
+}
+
+sub RSET_pop3 {
+ my ($args) = @_;
+
+ if ($args) {
+ sendcontrol "-ERR Protocol error\r\n";
+ }
+ else {
+ if (@deleted) {
+ logmsg "resetting @deleted message(s)\n";
+
+ @deleted = ();
+ }
+
+ sendcontrol "+OK\r\n";
+ }
+
+ return 0;
+}
+
+sub QUIT_pop3 {
+ if(@deleted) {
+ logmsg "deleting @deleted message(s)\n";
+
+ @deleted = ();
+ }
+
+ sendcontrol "+OK cURL POP3 server signing off\r\n";
+
+ return 0;
}
################
@@ -718,7 +1981,10 @@ sub switch_directory_goto {
sub switch_directory {
my $target_dir = $_[0];
- if($target_dir eq "/") {
+ if($target_dir =~ /^test-(\d+)/) {
+ $cwd_testno = $1;
+ }
+ elsif($target_dir eq "/") {
$ftptargetdir = "/";
}
else {
@@ -751,7 +2017,7 @@ sub PWD_ftp {
}
sub LIST_ftp {
- # print "150 ASCII data connection for /bin/ls (193.15.23.1,59196) (0 bytes)\r\n";
+ # print "150 ASCII data connection for /bin/ls (193.15.23.1,59196) (0 bytes)\r\n";
# this is a built-in fake-dir ;-)
my @ftpdir=("total 20\r\n",
@@ -766,13 +2032,50 @@ my @ftpdir=("total 20\r\n",
"drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub\r\n",
"dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr\r\n");
+ if($datasockf_conn eq 'no') {
+ if($nodataconn425) {
+ sendcontrol "150 Opening data connection\r\n";
+ sendcontrol "425 Can't open data connection\r\n";
+ }
+ elsif($nodataconn421) {
+ sendcontrol "150 Opening data connection\r\n";
+ sendcontrol "421 Connection timed out\r\n";
+ }
+ elsif($nodataconn150) {
+ sendcontrol "150 Opening data connection\r\n";
+ # client shall timeout
+ }
+ else {
+ # client shall timeout
+ }
+ return 0;
+ }
+
if($ftplistparserstate) {
@ftpdir = ftp_contentlist($ftptargetdir);
}
logmsg "pass LIST data on data connection\n";
- for(@ftpdir) {
- senddata $_;
+
+ if($cwd_testno) {
+ loadtest("$srcdir/data/test$cwd_testno");
+
+ my @data = getpart("reply", "data");
+ for(@data) {
+ my $send = $_;
+ # convert all \n to \r\n for ASCII transfer
+ $send =~ s/\r\n/\n/g;
+ $send =~ s/\n/\r\n/g;
+ logmsg "send $send as data\n";
+ senddata $send;
+ }
+ $cwd_testno = 0; # forget it again
+ }
+ else {
+ # old hard-coded style
+ for(@ftpdir) {
+ senddata $_;
+ }
}
close_dataconn(0);
sendcontrol "226 ASCII transfer complete\r\n";
@@ -781,6 +2084,26 @@ my @ftpdir=("total 20\r\n",
sub NLST_ftp {
my @ftpdir=("file", "with space", "fake", "..", " ..", "funny", "README");
+
+ if($datasockf_conn eq 'no') {
+ if($nodataconn425) {
+ sendcontrol "150 Opening data connection\r\n";
+ sendcontrol "425 Can't open data connection\r\n";
+ }
+ elsif($nodataconn421) {
+ sendcontrol "150 Opening data connection\r\n";
+ sendcontrol "421 Connection timed out\r\n";
+ }
+ elsif($nodataconn150) {
+ sendcontrol "150 Opening data connection\r\n";
+ # client shall timeout
+ }
+ else {
+ # client shall timeout
+ }
+ return 0;
+ }
+
logmsg "pass NLST data on data connection\n";
for(@ftpdir) {
senddata "$_\r\n";
@@ -884,6 +2207,25 @@ sub SIZE_ftp {
sub RETR_ftp {
my ($testno) = @_;
+ if($datasockf_conn eq 'no') {
+ if($nodataconn425) {
+ sendcontrol "150 Opening data connection\r\n";
+ sendcontrol "425 Can't open data connection\r\n";
+ }
+ elsif($nodataconn421) {
+ sendcontrol "150 Opening data connection\r\n";
+ sendcontrol "421 Connection timed out\r\n";
+ }
+ elsif($nodataconn150) {
+ sendcontrol "150 Opening data connection\r\n";
+ # client shall timeout
+ }
+ else {
+ # client shall timeout
+ }
+ return 0;
+ }
+
if($ftplistparserstate) {
my @content = wildcard_getfile($ftptargetdir, $testno);
if($content[0] == -1) {
@@ -978,6 +2320,25 @@ sub STOR_ftp {
my $filename = "log/upload.$testno";
+ if($datasockf_conn eq 'no') {
+ if($nodataconn425) {
+ sendcontrol "150 Opening data connection\r\n";
+ sendcontrol "425 Can't open data connection\r\n";
+ }
+ elsif($nodataconn421) {
+ sendcontrol "150 Opening data connection\r\n";
+ sendcontrol "421 Connection timed out\r\n";
+ }
+ elsif($nodataconn150) {
+ sendcontrol "150 Opening data connection\r\n";
+ # client shall timeout
+ }
+ else {
+ # client shall timeout
+ }
+ return 0;
+ }
+
logmsg "STOR test number $testno in $filename\n";
sendcontrol "125 Gimme gimme gimme!\r\n";
@@ -998,7 +2359,7 @@ sub STOR_ftp {
$size = hex($1);
}
- sysread DREAD, $line, $size;
+ read_datasockf(\$line, $size);
#print STDERR " GOT: $size bytes\n";
@@ -1029,31 +2390,61 @@ sub STOR_ftp {
sub PASV_ftp {
my ($arg, $cmd)=@_;
my $pasvport;
+ my $bindonly = ($nodataconn) ? '--bindonly' : '';
# kill previous data connection sockfilt when alive
- killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+ if($datasockf_runs eq 'yes') {
+ killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+ logmsg "DATA sockfilt for $datasockf_mode data channel killed\n";
+ }
+ datasockf_state('STOPPED');
+
+ logmsg "====> Passive DATA channel requested by client\n";
+
+ logmsg "DATA sockfilt for passive data channel starting...\n";
# We fire up a new sockfilt to do the data transfer for us.
my $datasockfcmd = "./server/sockfilt " .
- "--ipv$ipvnum --port 0 " .
+ "--ipv$ipvnum $bindonly --port 0 " .
"--pidfile \"$datasockf_pidfile\" " .
"--logfile \"$datasockf_logfile\"";
$slavepid = open2(\*DREAD, \*DWRITE, $datasockfcmd);
+ if($nodataconn) {
+ datasockf_state('PASSIVE_NODATACONN');
+ }
+ else {
+ datasockf_state('PASSIVE');
+ }
+
+ print STDERR "$datasockfcmd\n" if($verbose);
+
print DWRITE "PING\n";
my $pong;
sysread_or_die(\*DREAD, \$pong, 5);
- if($pong !~ /^PONG/) {
- logmsg "failed to run sockfilt for data connection\n";
+ if($pong =~ /^FAIL/) {
+ logmsg "DATA sockfilt said: FAIL\n";
+ logmsg "DATA sockfilt for passive data channel failed\n";
+ logmsg "DATA sockfilt not running\n";
+ datasockf_state('STOPPED');
+ sendcontrol "500 no free ports!\r\n";
+ return;
+ }
+ elsif($pong !~ /^PONG/) {
+ logmsg "DATA sockfilt unexpected response: $pong\n";
+ logmsg "DATA sockfilt for passive data channel failed\n";
+ logmsg "DATA sockfilt killed now\n";
killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+ logmsg "DATA sockfilt not running\n";
+ datasockf_state('STOPPED');
sendcontrol "500 no free ports!\r\n";
- return 0;
+ return;
}
- logmsg "Run sockfilt for data on pid $slavepid\n";
+ logmsg "DATA sockfilt for passive data channel started (pid $slavepid)\n";
- # Find out what port we listen on
+ # Find out on what port we listen on or have bound
my $i;
print DWRITE "PORT\n";
@@ -1069,7 +2460,7 @@ sub PASV_ftp {
}
# READ the response data
- sysread_or_die(\*DREAD, \$i, $size);
+ read_datasockf(\$i, $size);
# The data is in the format
# IPvX/NNN
@@ -1079,6 +2470,27 @@ sub PASV_ftp {
$pasvport = $2;
}
+ if(!$pasvport) {
+ logmsg "DATA sockfilt unknown listener port\n";
+ logmsg "DATA sockfilt for passive data channel failed\n";
+ logmsg "DATA sockfilt killed now\n";
+ killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+ logmsg "DATA sockfilt not running\n";
+ datasockf_state('STOPPED');
+ sendcontrol "500 no free ports!\r\n";
+ return;
+ }
+
+ if($nodataconn) {
+ my $str = nodataconn_str();
+ logmsg "DATA sockfilt for passive data channel ($str) bound on port ".
+ "$pasvport\n";
+ }
+ else {
+ logmsg "DATA sockfilt for passive data channel listens on port ".
+ "$pasvport\n";
+ }
+
if($cmd ne "EPSV") {
# PASV reply
my $p=$listenaddr;
@@ -1087,13 +2499,22 @@ sub PASV_ftp {
$p="1,2,3,4";
}
sendcontrol sprintf("227 Entering Passive Mode ($p,%d,%d)\n",
- ($pasvport/256), ($pasvport%256));
+ int($pasvport/256), int($pasvport%256));
}
else {
# EPSV reply
sendcontrol sprintf("229 Entering Passive Mode (|||%d|)\n", $pasvport);
}
+ logmsg "Client has been notified that DATA conn ".
+ "will be accepted on port $pasvport\n";
+
+ if($nodataconn) {
+ my $str = nodataconn_str();
+ logmsg "====> Client fooled ($str)\n";
+ return;
+ }
+
eval {
local $SIG{ALRM} = sub { die "alarm\n" };
@@ -1103,6 +2524,8 @@ sub PASV_ftp {
# Wait for 'CNCT'
my $input;
+ # FIX: Monitor ctrl conn for disconnect
+
while(sysread(DREAD, $input, 5)) {
if($input !~ /^CNCT/) {
@@ -1110,7 +2533,7 @@ sub PASV_ftp {
logmsg "Odd, we got $input from client\n";
next;
}
- logmsg "====> Client DATA connect\n";
+ logmsg "Client connects to port $pasvport\n";
last;
}
alarm 0;
@@ -1120,54 +2543,85 @@ sub PASV_ftp {
logmsg "$srvrname server timed out awaiting data connection ".
"on port $pasvport\n";
logmsg "accept failed or connection not even attempted\n";
+ logmsg "DATA sockfilt killed now\n";
killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+ logmsg "DATA sockfilt not running\n";
+ datasockf_state('STOPPED');
return;
}
else {
- logmsg "data connection setup on port $pasvport\n";
+ logmsg "====> Client established passive DATA connection ".
+ "on port $pasvport\n";
}
return;
}
-# Support both PORT and EPRT here. Consider LPRT too.
+#
+# Support both PORT and EPRT here.
+#
sub PORT_ftp {
my ($arg, $cmd) = @_;
my $port;
my $addr;
+ # kill previous data connection sockfilt when alive
+ if($datasockf_runs eq 'yes') {
+ killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+ logmsg "DATA sockfilt for $datasockf_mode data channel killed\n";
+ }
+ datasockf_state('STOPPED');
+
+ logmsg "====> Active DATA channel requested by client\n";
+
# We always ignore the given IP and use localhost.
if($cmd eq "PORT") {
if($arg !~ /(\d+),(\d+),(\d+),(\d+),(\d+),(\d+)/) {
- logmsg "bad PORT-line: $arg\n";
+ logmsg "DATA sockfilt for active data channel not started ".
+ "(bad PORT-line: $arg)\n";
sendcontrol "500 silly you, go away\r\n";
- return 0;
+ return;
}
$port = ($5<<8)+$6;
$addr = "$1.$2.$3.$4";
}
# EPRT |2|::1|49706|
- elsif(($cmd eq "EPRT") && ($grok_eprt)) {
+ elsif($cmd eq "EPRT") {
if($arg !~ /(\d+)\|([^\|]+)\|(\d+)/) {
+ logmsg "DATA sockfilt for active data channel not started ".
+ "(bad EPRT-line: $arg)\n";
sendcontrol "500 silly you, go away\r\n";
- return 0;
+ return;
}
sendcontrol "200 Thanks for dropping by. We contact you later\r\n";
$port = $3;
$addr = $2;
}
else {
+ logmsg "DATA sockfilt for active data channel not started ".
+ "(invalid command: $cmd)\n";
sendcontrol "500 we don't like $cmd now\r\n";
- return 0;
+ return;
}
if(!$port || $port > 65535) {
- print STDERR "very illegal PORT number: $port\n";
- return 1;
+ logmsg "DATA sockfilt for active data channel not started ".
+ "(illegal PORT number: $port)\n";
+ return;
+ }
+
+ if($nodataconn) {
+ my $str = nodataconn_str();
+ logmsg "DATA sockfilt for active data channel not started ($str)\n";
+ datasockf_state('ACTIVE_NODATACONN');
+ logmsg "====> Active DATA channel not established\n";
+ return;
}
+ logmsg "DATA sockfilt for active data channel starting...\n";
+
# We fire up a new sockfilt to do the data transfer for us.
my $datasockfcmd = "./server/sockfilt " .
"--ipv$ipvnum --connect $port --addr \"$addr\" " .
@@ -1175,38 +2629,130 @@ sub PORT_ftp {
"--logfile \"$datasockf_logfile\"";
$slavepid = open2(\*DREAD, \*DWRITE, $datasockfcmd);
+ datasockf_state('ACTIVE');
+
print STDERR "$datasockfcmd\n" if($verbose);
print DWRITE "PING\n";
my $pong;
sysread_or_die(\*DREAD, \$pong, 5);
- if($pong !~ /^PONG/) {
- logmsg "Failed sockfilt for data connection\n";
+ if($pong =~ /^FAIL/) {
+ logmsg "DATA sockfilt said: FAIL\n";
+ logmsg "DATA sockfilt for active data channel failed\n";
+ logmsg "DATA sockfilt not running\n";
+ datasockf_state('STOPPED');
+ # client shall timeout awaiting connection from server
+ return;
+ }
+ elsif($pong !~ /^PONG/) {
+ logmsg "DATA sockfilt unexpected response: $pong\n";
+ logmsg "DATA sockfilt for active data channel failed\n";
+ logmsg "DATA sockfilt killed now\n";
killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+ logmsg "DATA sockfilt not running\n";
+ datasockf_state('STOPPED');
+ # client shall timeout awaiting connection from server
+ return;
}
- logmsg "====> Client DATA connect to port $port\n";
+ logmsg "DATA sockfilt for active data channel started (pid $slavepid)\n";
+
+ logmsg "====> Active DATA channel connected to client port $port\n";
return;
}
#**********************************************************************
+# datasockf_state is used to change variables that keep state info
+# relative to the FTP secondary or data sockfilt process as soon as
+# one of the five possible stable states is reached. Variables that
+# are modified by this sub may be checked independently but should
+# not be changed except by calling this sub.
+#
+sub datasockf_state {
+ my $state = $_[0];
+
+ if($state eq 'STOPPED') {
+ # Data sockfilter initial state, not running,
+ # not connected and not used.
+ $datasockf_state = $state;
+ $datasockf_mode = 'none';
+ $datasockf_runs = 'no';
+ $datasockf_conn = 'no';
+ }
+ elsif($state eq 'PASSIVE') {
+ # Data sockfilter accepted connection from client.
+ $datasockf_state = $state;
+ $datasockf_mode = 'passive';
+ $datasockf_runs = 'yes';
+ $datasockf_conn = 'yes';
+ }
+ elsif($state eq 'ACTIVE') {
+ # Data sockfilter has connected to client.
+ $datasockf_state = $state;
+ $datasockf_mode = 'active';
+ $datasockf_runs = 'yes';
+ $datasockf_conn = 'yes';
+ }
+ elsif($state eq 'PASSIVE_NODATACONN') {
+ # Data sockfilter bound port without listening,
+ # client won't be able to establish data connection.
+ $datasockf_state = $state;
+ $datasockf_mode = 'passive';
+ $datasockf_runs = 'yes';
+ $datasockf_conn = 'no';
+ }
+ elsif($state eq 'ACTIVE_NODATACONN') {
+ # Data sockfilter does not even run,
+ # client awaits data connection from server in vain.
+ $datasockf_state = $state;
+ $datasockf_mode = 'active';
+ $datasockf_runs = 'no';
+ $datasockf_conn = 'no';
+ }
+ else {
+ die "Internal error. Unknown datasockf state: $state!";
+ }
+}
+
+#**********************************************************************
+# nodataconn_str returns string of efective nodataconn command. Notice
+# that $nodataconn may be set alone or in addition to a $nodataconnXXX.
+#
+sub nodataconn_str {
+ my $str;
+ # order matters
+ $str = 'NODATACONN' if($nodataconn);
+ $str = 'NODATACONN425' if($nodataconn425);
+ $str = 'NODATACONN421' if($nodataconn421);
+ $str = 'NODATACONN150' if($nodataconn150);
+ return "$str";
+}
+
+#**********************************************************************
# customize configures test server operation for each curl test, reading
# configuration commands/parameters from server commands file each time
# a new client control connection is established with the test server.
# On success returns 1, otherwise zero.
#
sub customize {
- $ctrldelay = 0; # default is no throttling of the ctrl stream
- $datadelay = 0; # default is no throttling of the data stream
- $retrweirdo = 0; # default is no use of RETRWEIRDO
- $retrnosize = 0; # default is no use of RETRNOSIZE
- $pasvbadip = 0; # default is no use of PASVBADIP
- $nosave = 0; # default is to actually save uploaded data to file
- %customreply = (); #
- %customcount = (); #
- %delayreply = (); #
+ $ctrldelay = 0; # default is no throttling of the ctrl stream
+ $datadelay = 0; # default is no throttling of the data stream
+ $retrweirdo = 0; # default is no use of RETRWEIRDO
+ $retrnosize = 0; # default is no use of RETRNOSIZE
+ $pasvbadip = 0; # default is no use of PASVBADIP
+ $nosave = 0; # default is to actually save uploaded data to file
+ $nodataconn = 0; # default is to establish or accept data channel
+ $nodataconn425 = 0; # default is to not send 425 without data channel
+ $nodataconn421 = 0; # default is to not send 421 without data channel
+ $nodataconn150 = 0; # default is to not send 150 without data channel
+ @capabilities = (); # default is to not support capability commands
+ @auth_mechs = (); # default is to not support authentication commands
+ %fulltextreply = ();#
+ %commandreply = (); #
+ %customcount = (); #
+ %delayreply = (); #
open(CUSTOM, "<log/ftpserver.cmd") ||
return 1;
@@ -1214,15 +2760,24 @@ sub customize {
logmsg "FTPD: Getting commands from log/ftpserver.cmd\n";
while(<CUSTOM>) {
- if($_ =~ /REPLY ([A-Za-z0-9+\/=]+) (.*)/) {
- $customreply{$1}=eval "qq{$2}";
+ if($_ =~ /REPLY \"([A-Z]+ [A-Za-z0-9+-\/=\*. ]+)\" (.*)/) {
+ $fulltextreply{$1}=eval "qq{$2}";
logmsg "FTPD: set custom reply for $1\n";
}
- if($_ =~ /COUNT ([A-Z]+) (.*)/) {
- # we blank the customreply for this command when having
+ elsif($_ =~ /REPLY ([A-Za-z0-9+\/=\*]*) (.*)/) {
+ $commandreply{$1}=eval "qq{$2}";
+ if($1 eq "") {
+ logmsg "FTPD: set custom reply for empty command\n";
+ }
+ else {
+ logmsg "FTPD: set custom reply for $1 command\n";
+ }
+ }
+ elsif($_ =~ /COUNT ([A-Z]+) (.*)/) {
+ # we blank the custom reply for this command when having
# been used this number of times
$customcount{$1}=$2;
- logmsg "FTPD: blank custom reply for $1 after $2 uses\n";
+ logmsg "FTPD: blank custom reply for $1 command after $2 uses\n";
}
elsif($_ =~ /DELAY ([A-Z]+) (\d*)/) {
$delayreply{$1}=$2;
@@ -1245,6 +2800,40 @@ sub customize {
logmsg "FTPD: instructed to use PASVBADIP\n";
$pasvbadip=1;
}
+ elsif($_ =~ /NODATACONN425/) {
+ # applies to both active and passive FTP modes
+ logmsg "FTPD: instructed to use NODATACONN425\n";
+ $nodataconn425=1;
+ $nodataconn=1;
+ }
+ elsif($_ =~ /NODATACONN421/) {
+ # applies to both active and passive FTP modes
+ logmsg "FTPD: instructed to use NODATACONN421\n";
+ $nodataconn421=1;
+ $nodataconn=1;
+ }
+ elsif($_ =~ /NODATACONN150/) {
+ # applies to both active and passive FTP modes
+ logmsg "FTPD: instructed to use NODATACONN150\n";
+ $nodataconn150=1;
+ $nodataconn=1;
+ }
+ elsif($_ =~ /NODATACONN/) {
+ # applies to both active and passive FTP modes
+ logmsg "FTPD: instructed to use NODATACONN\n";
+ $nodataconn=1;
+ }
+ elsif($_ =~ /CAPA (.*)/) {
+ logmsg "FTPD: instructed to support CAPABILITY command\n";
+ @capabilities = split(/ (?!(?:[^" ]|[^"] [^"])+")/, $1);
+ foreach (@capabilities) {
+ $_ = $1 if /^"(.*)"$/;
+ }
+ }
+ elsif($_ =~ /AUTH (.*)/) {
+ logmsg "FTPD: instructed to support AUTHENTICATION command\n";
+ @auth_mechs = split(/ /, $1);
+ }
elsif($_ =~ /NOSAVE/) {
# don't actually store the file we upload - to be used when
# uploading insanely huge amounts
@@ -1317,12 +2906,10 @@ while(@ARGV) {
elsif($ARGV[0] eq '--ipv4') {
$ipvnum = 4;
$listenaddr = '127.0.0.1' if($listenaddr eq '::1');
- $grok_eprt = 0;
}
elsif($ARGV[0] eq '--ipv6') {
$ipvnum = 6;
$listenaddr = '::1' if($listenaddr eq '127.0.0.1');
- $grok_eprt = 1;
}
elsif($ARGV[0] eq '--port') {
if($ARGV[1] && ($ARGV[1] =~ /^(\d+)$/)) {
@@ -1396,6 +2983,14 @@ logmsg("logged pid $$ in $pidfile\n");
while(1) {
+
+ # kill previous data connection sockfilt when alive
+ if($datasockf_runs eq 'yes') {
+ killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+ logmsg "DATA sockfilt for $datasockf_mode data channel killed now\n";
+ }
+ datasockf_state('STOPPED');
+
#
# We read 'sockfilt' commands.
#
@@ -1406,7 +3001,7 @@ while(1) {
if($input !~ /^CNCT/) {
# we wait for a connected client
- logmsg "sockfilt said: $input";
+ logmsg "MAIN sockfilt said: $input";
next;
}
logmsg "====> Client connect\n";
@@ -1417,11 +3012,20 @@ while(1) {
# flush data:
$| = 1;
- killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
-
&customize(); # read test control instructions
- sendcontrol @welcome;
+ my $welcome = $commandreply{"welcome"};
+ if(!$welcome) {
+ $welcome = $displaytext{"welcome"};
+ }
+ else {
+ # clear it after use
+ $commandreply{"welcome"}="";
+ if($welcome !~ /\r\n\z/) {
+ $welcome .= "\r\n";
+ }
+ }
+ sendcontrol $welcome;
#remove global variables from last connection
if($ftplistparserstate) {
@@ -1432,11 +3036,11 @@ while(1) {
}
if($verbose) {
- for(@welcome) {
- print STDERR "OUT: $_";
- }
+ print STDERR "OUT: $welcome";
}
+ my $full = "";
+
while(1) {
my $i;
@@ -1447,7 +3051,7 @@ while(1) {
sysread_or_die(\*SFREAD, \$i, 5);
if($i !~ /^DATA/) {
- logmsg "sockfilt said $i";
+ logmsg "MAIN sockfilt said $i";
if($i =~ /^DISC/) {
# disconnect
last;
@@ -1464,38 +3068,83 @@ while(1) {
}
# data
- sysread SFREAD, $_, $size;
+ read_mainsockf(\$input, $size);
+
+ ftpmsg $input;
- ftpmsg $_;
+ $full .= $input;
+
+ # Loop until command completion
+ next unless($full =~ /\r\n$/);
# Remove trailing CRLF.
- s/[\n\r]+$//;
+ $full =~ s/[\n\r]+$//;
my $FTPCMD;
my $FTPARG;
- my $full=$_;
if($proto eq "imap") {
# IMAP is different with its identifier first on the command line
- unless (m/^([^ ]+) ([^ ]+) (.*)/ ||
- m/^([^ ]+) ([^ ]+)/) {
- sendcontrol "$1 '$_': command not understood.\r\n";
+ if(($full =~ /^([^ ]+) ([^ ]+) (.*)/) ||
+ ($full =~ /^([^ ]+) ([^ ]+)/)) {
+ $cmdid=$1; # set the global variable
+ $FTPCMD=$2;
+ $FTPARG=$3;
+ }
+ # IMAP authentication cancellation
+ elsif($full =~ /^\*$/) {
+ # Command id has already been set
+ $FTPCMD="*";
+ $FTPARG="";
+ }
+ # IMAP long "commands" are base64 authentication data
+ elsif($full =~ /^[A-Z0-9+\/]*={0,2}$/i) {
+ # Command id has already been set
+ $FTPCMD=$full;
+ $FTPARG="";
+ }
+ else {
+ sendcontrol "$full BAD Command\r\n";
last;
}
- $cmdid=$1; # set the global variable
- $FTPCMD=$2;
- $FTPARG=$3;
}
- elsif (m/^([A-Z]{3,4})(\s(.*))?$/i) {
+ elsif($full =~ /^([A-Z]{3,4})(\s(.*))?$/i) {
$FTPCMD=$1;
$FTPARG=$3;
}
- elsif($proto eq "smtp" && m/^[A-Z0-9+\/]{0,512}={0,2}$/i) {
- # SMTP long "commands" are base64 authentication data.
- $FTPCMD=$_;
- $FTPARG="";
+ elsif($proto eq "pop3") {
+ # POP3 authentication cancellation
+ if($full =~ /^\*$/) {
+ $FTPCMD="*";
+ $FTPARG="";
+ }
+ # POP3 long "commands" are base64 authentication data
+ elsif($full =~ /^[A-Z0-9+\/]*={0,2}$/i) {
+ $FTPCMD=$full;
+ $FTPARG="";
+ }
+ else {
+ sendcontrol "-ERR Unrecognized command\r\n";
+ last;
+ }
+ }
+ elsif($proto eq "smtp") {
+ # SMTP authentication cancellation
+ if($full =~ /^\*$/) {
+ $FTPCMD="*";
+ $FTPARG="";
+ }
+ # SMTP long "commands" are base64 authentication data
+ elsif($full =~ /^[A-Z0-9+\/]{0,512}={0,2}$/i) {
+ $FTPCMD=$full;
+ $FTPARG="";
+ }
+ else {
+ sendcontrol "500 Unrecognized command\r\n";
+ last;
+ }
}
else {
- sendcontrol "500 '$_': command not understood.\r\n";
+ sendcontrol "500 Unrecognized command\r\n";
last;
}
@@ -1505,6 +3154,8 @@ while(1) {
print STDERR "IN: $full\n";
}
+ $full = "";
+
my $delay = $delayreply{$FTPCMD};
if($delay) {
# just go sleep this many seconds!
@@ -1515,44 +3166,61 @@ while(1) {
}
}
- my $text;
- $text = $customreply{$FTPCMD};
- my $fake = $text;
+ my $check = 1; # no response yet
+ # See if there is a custom reply for the full text
+ my $fulltext = $FTPARG ? $FTPCMD . " " . $FTPARG : $FTPCMD;
+ my $text = $fulltextreply{$fulltext};
if($text && ($text ne "")) {
- if($customcount{$FTPCMD} && (!--$customcount{$FTPCMD})) {
- # used enough number of times, now blank the customreply
- $customreply{$FTPCMD}="";
- }
+ sendcontrol "$text\r\n";
+ $check = 0;
}
else {
- $text = $displaytext{$FTPCMD};
- }
- my $check;
- if($text && ($text ne "")) {
- if($cmdid && ($cmdid ne "")) {
- sendcontrol "$cmdid$text\r\n";
- }
- else {
+ # See if there is a custom reply for the command
+ $text = $commandreply{$FTPCMD};
+ if($text && ($text ne "")) {
+ if($customcount{$FTPCMD} && (!--$customcount{$FTPCMD})) {
+ # used enough times so blank the custom command reply
+ $commandreply{$FTPCMD}="";
+ }
+
sendcontrol "$text\r\n";
+ $check = 0;
}
- }
- else {
- $check=1; # no response yet
- }
-
- unless($fake && ($fake ne "")) {
- # only perform this if we're not faking a reply
- my $func = $commandfunc{$FTPCMD};
- if($func) {
- &$func($FTPARG, $FTPCMD);
- $check=0; # taken care of
+ else {
+ # See if there is any display text for the command
+ $text = $displaytext{$FTPCMD};
+ if($text && ($text ne "")) {
+ if($proto eq 'imap') {
+ sendcontrol "$cmdid $text\r\n";
+ }
+ else {
+ sendcontrol "$text\r\n";
+ }
+
+ $check = 0;
+ }
+
+ # only perform this if we're not faking a reply
+ my $func = $commandfunc{$FTPCMD};
+ if($func) {
+ &$func($FTPARG, $FTPCMD);
+ $check = 0;
+ }
}
}
if($check) {
logmsg "$FTPCMD wasn't handled!\n";
- sendcontrol "500 $FTPCMD is not dealt with!\r\n";
+ if($proto eq 'pop3') {
+ sendcontrol "-ERR $FTPCMD is not dealt with!\r\n";
+ }
+ elsif($proto eq 'imap') {
+ sendcontrol "$cmdid BAD $FTPCMD is not dealt with!\r\n";
+ }
+ else {
+ sendcontrol "500 $FTPCMD is not dealt with!\r\n";
+ }
}
} # while(1)
diff --git a/tests/getpart.pm b/tests/getpart.pm
index 42e3b2b2..0729cf49 100644
--- a/tests/getpart.pm
+++ b/tests/getpart.pm
@@ -1,3 +1,24 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
#use strict;
@@ -35,13 +56,17 @@ sub getpartattr {
$inside++;
my $attr=$1;
- while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|([^\"> ]*))//) {
+ while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|([^\> ]*))//) {
my ($var, $cont)=($1, $2);
$cont =~ s/^\"(.*)\"$/$1/;
$hash{$var}=$cont;
}
last;
}
+ # detect end of section when part wasn't found
+ elsif((1 ==$inside) && ($_ =~ /^ *\<\/$section\>/)) {
+ last;
+ }
elsif((2 ==$inside) && ($_ =~ /^ *\<\/$part/)) {
$inside--;
}
@@ -63,21 +88,27 @@ sub getpart {
if(!$inside && ($_ =~ /^ *\<$section/)) {
$inside++;
}
- elsif((1 ==$inside) && ($_ =~ /^ *\<$part[ \>]/)) {
- if($_ =~ /$part [^>]*base64=/) {
- # attempt to detect base64 encoded parts
+ elsif(($inside >= 1) && ($_ =~ /^ *\<$part[ \>]/)) {
+ if($inside > 1) {
+ push @this, $_;
+ }
+ elsif($_ =~ /$part [^>]*base64=/) {
+ # attempt to detect our base64 encoded part
$base64=1;
}
$inside++;
}
- elsif((2 ==$inside) && ($_ =~ /^ *\<\/$part/)) {
+ elsif(($inside >= 2) && ($_ =~ /^ *\<\/$part[ \>]/)) {
+ if($inside > 2) {
+ push @this, $_;
+ }
$inside--;
}
- elsif((1==$inside) && ($_ =~ /^ *\<\/$section/)) {
- if($trace) {
+ elsif(($inside >= 1) && ($_ =~ /^ *\<\/$section/)) {
+ if($trace && @this) {
print STDERR "*** getpart.pm: $section/$part returned data!\n";
}
- if(!@this && $warning) {
+ if($warning && !@this) {
print STDERR "*** getpart.pm: $section/$part returned empty!\n";
}
if($base64) {
@@ -89,14 +120,45 @@ sub getpart {
}
return @this;
}
- elsif(2==$inside) {
+ elsif($inside >= 2) {
push @this, $_;
}
}
- if($warning) {
+ if($trace && @this) {
+ # section/part has data but end of section not detected,
+ # end of file implies end of section.
+ print STDERR "*** getpart.pm: $section/$part returned data!\n";
+ }
+ if($warning && !@this) {
+ # section/part does not exist or has no data without an end of
+ # section; end of file implies end of section.
print STDERR "*** getpart.pm: $section/$part returned empty!\n";
}
- return @this; #empty!
+ return @this;
+}
+
+sub partexists {
+ my ($section, $part)=@_;
+
+ my $inside = 0;
+
+ for(@xml) {
+ if(!$inside && ($_ =~ /^ *\<$section/)) {
+ $inside++;
+ }
+ elsif((1 == $inside) && ($_ =~ /^ *\<$part[ \>]/)) {
+ return 1; # exists
+ }
+ elsif((1 == $inside) && ($_ =~ /^ *\<\/$section/)) {
+ return 0; # does not exist
+ }
+ }
+ return 0; # does not exist
+}
+
+# Return entire document as list of lines
+sub getall {
+ return @xml;
}
sub loadtest {
@@ -177,7 +239,7 @@ sub writearray {
}
#
-# Load a specified file an return it as an array
+# Load a specified file and return it as an array
#
sub loadarray {
my ($filename)=@_;
@@ -202,13 +264,21 @@ sub showdiff {
open(TEMP, ">$file1");
for(@$firstref) {
- print TEMP $_;
+ my $l = $_;
+ $l =~ s/\r/[CR]/g;
+ $l =~ s/\n/[LF]/g;
+ print TEMP $l;
+ print TEMP "\n";
}
close(TEMP);
open(TEMP, ">$file2");
for(@$secondref) {
- print TEMP $_;
+ my $l = $_;
+ $l =~ s/\r/[CR]/g;
+ $l =~ s/\n/[LF]/g;
+ print TEMP $l;
+ print TEMP "\n";
}
close(TEMP);
my @out = `diff -u $file2 $file1 2>/dev/null`;
diff --git a/tests/http_pipe.py b/tests/http_pipe.py
new file mode 100755
index 00000000..19ebec73
--- /dev/null
+++ b/tests/http_pipe.py
@@ -0,0 +1,441 @@
+#!/usr/bin/python
+
+# Copyright 2012 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Modified by Linus Nielsen Feltzing for inclusion in the libcurl test
+# framework
+#
+try:
+ import socketserver
+except:
+ import SocketServer as socketserver
+import argparse
+import re
+import select
+import socket
+import time
+import pprint
+import os
+
+INFO_MESSAGE = '''
+This is a test server to test the libcurl pipelining functionality.
+It is a modified version if Google's HTTP pipelining test server. More
+information can be found here:
+
+http://dev.chromium.org/developers/design-documents/network-stack/http-pipelining
+
+Source code can be found here:
+
+http://code.google.com/p/http-pipelining-test/
+'''
+MAX_REQUEST_SIZE = 1024 # bytes
+MIN_POLL_TIME = 0.01 # seconds. Minimum time to poll, in order to prevent
+ # excessive looping because Python refuses to poll for
+ # small timeouts.
+SEND_BUFFER_TIME = 0.5 # seconds
+TIMEOUT = 30 # seconds
+
+
+class Error(Exception):
+ pass
+
+
+class RequestTooLargeError(Error):
+ pass
+
+
+class ServeIndexError(Error):
+ pass
+
+
+class UnexpectedMethodError(Error):
+ pass
+
+
+class RequestParser(object):
+ """Parses an input buffer looking for HTTP GET requests."""
+
+ global logfile
+
+ LOOKING_FOR_GET = 1
+ READING_HEADERS = 2
+
+ HEADER_RE = re.compile('([^:]+):(.*)\n')
+ REQUEST_RE = re.compile('([^ ]+) ([^ ]+) HTTP/(\d+)\.(\d+)\n')
+
+ def __init__(self):
+ """Initializer."""
+ self._buffer = ""
+ self._pending_headers = {}
+ self._pending_request = ""
+ self._state = self.LOOKING_FOR_GET
+ self._were_all_requests_http_1_1 = True
+ self._valid_requests = []
+
+ def ParseAdditionalData(self, data):
+ """Finds HTTP requests in |data|.
+
+ Args:
+ data: (String) Newly received input data from the socket.
+
+ Returns:
+ (List of Tuples)
+ (String) The request path.
+ (Map of String to String) The header name and value.
+
+ Raises:
+ RequestTooLargeError: If the request exceeds MAX_REQUEST_SIZE.
+ UnexpectedMethodError: On a non-GET method.
+ Error: On a programming error.
+ """
+ logfile = open('log/server.input', 'a')
+ logfile.write(data)
+ logfile.close()
+ self._buffer += data.replace('\r', '')
+ should_continue_parsing = True
+ while should_continue_parsing:
+ if self._state == self.LOOKING_FOR_GET:
+ should_continue_parsing = self._DoLookForGet()
+ elif self._state == self.READING_HEADERS:
+ should_continue_parsing = self._DoReadHeader()
+ else:
+ raise Error('Unexpected state: ' + self._state)
+ if len(self._buffer) > MAX_REQUEST_SIZE:
+ raise RequestTooLargeError(
+ 'Request is at least %d bytes' % len(self._buffer))
+ valid_requests = self._valid_requests
+ self._valid_requests = []
+ return valid_requests
+
+ @property
+ def were_all_requests_http_1_1(self):
+ return self._were_all_requests_http_1_1
+
+ def _DoLookForGet(self):
+ """Tries to parse an HTTTP request line.
+
+ Returns:
+ (Boolean) True if a request was found.
+
+ Raises:
+ UnexpectedMethodError: On a non-GET method.
+ """
+ m = self.REQUEST_RE.match(self._buffer)
+ if not m:
+ return False
+ method, path, http_major, http_minor = m.groups()
+
+ if method != 'GET':
+ raise UnexpectedMethodError('Unexpected method: ' + method)
+ if path in ['/', '/index.htm', '/index.html']:
+ raise ServeIndexError()
+
+ if http_major != '1' or http_minor != '1':
+ self._were_all_requests_http_1_1 = False
+
+# print method, path
+
+ self._pending_request = path
+ self._buffer = self._buffer[m.end():]
+ self._state = self.READING_HEADERS
+ return True
+
+ def _DoReadHeader(self):
+ """Tries to parse a HTTP header.
+
+ Returns:
+ (Boolean) True if it found the end of the request or a HTTP header.
+ """
+ if self._buffer.startswith('\n'):
+ self._buffer = self._buffer[1:]
+ self._state = self.LOOKING_FOR_GET
+ self._valid_requests.append((self._pending_request,
+ self._pending_headers))
+ self._pending_headers = {}
+ self._pending_request = ""
+ return True
+
+ m = self.HEADER_RE.match(self._buffer)
+ if not m:
+ return False
+
+ header = m.group(1).lower()
+ value = m.group(2).strip().lower()
+ if header not in self._pending_headers:
+ self._pending_headers[header] = value
+ self._buffer = self._buffer[m.end():]
+ return True
+
+
+class ResponseBuilder(object):
+ """Builds HTTP responses for a list of accumulated requests."""
+
+ def __init__(self):
+ """Initializer."""
+ self._max_pipeline_depth = 0
+ self._requested_paths = []
+ self._processed_end = False
+ self._were_all_requests_http_1_1 = True
+
+ def QueueRequests(self, requested_paths, were_all_requests_http_1_1):
+ """Adds requests to the queue of requests.
+
+ Args:
+ requested_paths: (List of Strings) Requested paths.
+ """
+ self._requested_paths.extend(requested_paths)
+ self._were_all_requests_http_1_1 = were_all_requests_http_1_1
+
+ def Chunkify(self, data, chunksize):
+ """ Divides a string into chunks
+ """
+ return [hex(chunksize)[2:] + "\r\n" + data[i:i+chunksize] + "\r\n" for i in range(0, len(data), chunksize)]
+
+ def BuildResponses(self):
+ """Converts the queue of requests into responses.
+
+ Returns:
+ (String) Buffer containing all of the responses.
+ """
+ result = ""
+ self._max_pipeline_depth = max(self._max_pipeline_depth,
+ len(self._requested_paths))
+ for path, headers in self._requested_paths:
+ if path == '/verifiedserver':
+ body = "WE ROOLZ: {}\r\n".format(os.getpid());
+ result += self._BuildResponse(
+ '200 OK', ['Server: Apache',
+ 'Content-Length: {}'.format(len(body)),
+ 'Cache-Control: no-store'], body)
+
+ elif path == '/alphabet.txt':
+ body = 'abcdefghijklmnopqrstuvwxyz'
+ result += self._BuildResponse(
+ '200 OK', ['Server: Apache',
+ 'Content-Length: 26',
+ 'Cache-Control: no-store'], body)
+
+ elif path == '/reverse.txt':
+ body = 'zyxwvutsrqponmlkjihgfedcba'
+ result += self._BuildResponse(
+ '200 OK', ['Content-Length: 26', 'Cache-Control: no-store'], body)
+
+ elif path == '/chunked.txt':
+ body = ('7\r\nchunked\r\n'
+ '8\r\nencoding\r\n'
+ '2\r\nis\r\n'
+ '3\r\nfun\r\n'
+ '0\r\n\r\n')
+ result += self._BuildResponse(
+ '200 OK', ['Transfer-Encoding: chunked', 'Cache-Control: no-store'],
+ body)
+
+ elif path == '/cached.txt':
+ body = 'azbycxdwevfugthsirjqkplomn'
+ result += self._BuildResponse(
+ '200 OK', ['Content-Length: 26', 'Cache-Control: max-age=60'], body)
+
+ elif path == '/connection_close.txt':
+ body = 'azbycxdwevfugthsirjqkplomn'
+ result += self._BuildResponse(
+ '200 OK', ['Content-Length: 26', 'Cache-Control: max-age=60', 'Connection: close'], body)
+ self._processed_end = True
+
+ elif path == '/1k.txt':
+ body = '0123456789abcdef' * 64
+ result += self._BuildResponse(
+ '200 OK', ['Server: Apache',
+ 'Content-Length: 1024',
+ 'Cache-Control: max-age=60'], body)
+
+ elif path == '/10k.txt':
+ body = '0123456789abcdef' * 640
+ result += self._BuildResponse(
+ '200 OK', ['Server: Apache',
+ 'Content-Length: 10240',
+ 'Cache-Control: max-age=60'], body)
+
+ elif path == '/100k.txt':
+ body = '0123456789abcdef' * 6400
+ result += self._BuildResponse(
+ '200 OK',
+ ['Server: Apache',
+ 'Content-Length: 102400',
+ 'Cache-Control: max-age=60'],
+ body)
+
+ elif path == '/100k_chunked.txt':
+ body = self.Chunkify('0123456789abcdef' * 6400, 20480)
+ body.append('0\r\n\r\n')
+ body = ''.join(body)
+
+ result += self._BuildResponse(
+ '200 OK', ['Transfer-Encoding: chunked', 'Cache-Control: no-store'], body)
+
+ elif path == '/stats.txt':
+ results = {
+ 'max_pipeline_depth': self._max_pipeline_depth,
+ 'were_all_requests_http_1_1': int(self._were_all_requests_http_1_1),
+ }
+ body = ','.join(['%s:%s' % (k, v) for k, v in results.items()])
+ result += self._BuildResponse(
+ '200 OK',
+ ['Content-Length: %s' % len(body), 'Cache-Control: no-store'], body)
+ self._processed_end = True
+
+ else:
+ result += self._BuildResponse('404 Not Found', ['Content-Length: 7'], 'Go away')
+ if self._processed_end:
+ break
+ self._requested_paths = []
+ return result
+
+ def WriteError(self, status, error):
+ """Returns an HTTP response for the specified error.
+
+ Args:
+ status: (String) Response code and descrtion (e.g. "404 Not Found")
+
+ Returns:
+ (String) Text of HTTP response.
+ """
+ return self._BuildResponse(
+ status, ['Connection: close', 'Content-Type: text/plain'], error)
+
+ @property
+ def processed_end(self):
+ return self._processed_end
+
+ def _BuildResponse(self, status, headers, body):
+ """Builds an HTTP response.
+
+ Args:
+ status: (String) Response code and descrtion (e.g. "200 OK")
+ headers: (List of Strings) Headers (e.g. "Connection: close")
+ body: (String) Response body.
+
+ Returns:
+ (String) Text of HTTP response.
+ """
+ return ('HTTP/1.1 %s\r\n'
+ '%s\r\n'
+ '\r\n'
+ '%s' % (status, '\r\n'.join(headers), body))
+
+
+class PipelineRequestHandler(socketserver.BaseRequestHandler):
+ """Called on an incoming TCP connection."""
+
+ def _GetTimeUntilTimeout(self):
+ return self._start_time + TIMEOUT - time.time()
+
+ def _GetTimeUntilNextSend(self):
+ if not self._last_queued_time:
+ return TIMEOUT
+ return self._last_queued_time + SEND_BUFFER_TIME - time.time()
+
+ def handle(self):
+ self._request_parser = RequestParser()
+ self._response_builder = ResponseBuilder()
+ self._last_queued_time = 0
+ self._num_queued = 0
+ self._num_written = 0
+ self._send_buffer = ""
+ self._start_time = time.time()
+ try:
+ while not self._response_builder.processed_end or self._send_buffer:
+
+ time_left = self._GetTimeUntilTimeout()
+ time_until_next_send = self._GetTimeUntilNextSend()
+ max_poll_time = min(time_left, time_until_next_send) + MIN_POLL_TIME
+
+ rlist, wlist, xlist = [], [], []
+ fileno = self.request.fileno()
+ if max_poll_time > 0:
+ rlist.append(fileno)
+ if self._send_buffer:
+ wlist.append(fileno)
+ rlist, wlist, xlist = select.select(rlist, wlist, xlist, max_poll_time)
+
+ if self._GetTimeUntilTimeout() <= 0:
+ return
+
+ if self._GetTimeUntilNextSend() <= 0:
+ self._send_buffer += self._response_builder.BuildResponses()
+ self._num_written = self._num_queued
+ self._last_queued_time = 0
+
+ if fileno in rlist:
+ self.request.setblocking(False)
+ new_data = self.request.recv(MAX_REQUEST_SIZE)
+ self.request.setblocking(True)
+ if not new_data:
+ return
+ new_requests = self._request_parser.ParseAdditionalData(new_data)
+ self._response_builder.QueueRequests(
+ new_requests, self._request_parser.were_all_requests_http_1_1)
+ self._num_queued += len(new_requests)
+ self._last_queued_time = time.time()
+ elif fileno in wlist:
+ num_bytes_sent = self.request.send(self._send_buffer[0:4096])
+ self._send_buffer = self._send_buffer[num_bytes_sent:]
+ time.sleep(0.05)
+
+ except RequestTooLargeError as e:
+ self.request.send(self._response_builder.WriteError(
+ '413 Request Entity Too Large', e))
+ raise
+ except UnexpectedMethodError as e:
+ self.request.send(self._response_builder.WriteError(
+ '405 Method Not Allowed', e))
+ raise
+ except ServeIndexError:
+ self.request.send(self._response_builder.WriteError(
+ '200 OK', INFO_MESSAGE))
+ except Exception as e:
+ print(e)
+ self.request.close()
+
+
+class PipelineServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
+ pass
+
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--port", action="store", default=0,
+ type=int, help="port to listen on")
+parser.add_argument("--verbose", action="store", default=0,
+ type=int, help="verbose output")
+parser.add_argument("--pidfile", action="store", default=0,
+ help="file name for the PID")
+parser.add_argument("--logfile", action="store", default=0,
+ help="file name for the log")
+parser.add_argument("--srcdir", action="store", default=0,
+ help="test directory")
+parser.add_argument("--id", action="store", default=0,
+ help="server ID")
+parser.add_argument("--ipv4", action="store_true", default=0,
+ help="IPv4 flag")
+args = parser.parse_args()
+
+if args.pidfile:
+ pid = os.getpid()
+ f = open(args.pidfile, 'w')
+ f.write('{}'.format(pid))
+ f.close()
+
+server = PipelineServer(('0.0.0.0', args.port), PipelineRequestHandler)
+server.allow_reuse_address = True
+server.serve_forever()
diff --git a/tests/httpserver.pl b/tests/httpserver.pl
index 37161f06..b60dadc3 100755
--- a/tests/httpserver.pl
+++ b/tests/httpserver.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,8 @@
#***************************************************************************
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
}
use strict;
@@ -35,13 +36,14 @@ 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
my $pidfile; # http server pid file
my $logfile; # http server log file
+my $connect; # IP to connect to on CONNECT
my $srcdir;
-my $fork;
my $gopher = 0;
my $flags = "";
@@ -73,6 +75,13 @@ 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;
}
@@ -82,6 +91,12 @@ while(@ARGV) {
shift @ARGV;
}
}
+ elsif($ARGV[0] eq '--connect') {
+ if($ARGV[1]) {
+ $connect = $ARGV[1];
+ shift @ARGV;
+ }
+ }
elsif($ARGV[0] eq '--id') {
if($ARGV[1] =~ /^(\d+)$/) {
$idnum = $1 if($1 > 0);
@@ -91,9 +106,6 @@ while(@ARGV) {
elsif($ARGV[0] eq '--verbose') {
$verbose = 1;
}
- elsif($ARGV[0] eq '--fork') {
- $fork = $ARGV[0];
- }
else {
print STDERR "\nWarning: httpserver.pl unknown parameter: $ARGV[0]\n";
}
@@ -110,9 +122,18 @@ if(!$logfile) {
$logfile = server_logfilename($logdir, $proto, $ipvnum, $idnum);
}
-$flags .= "--gopher " if($gopher);
-$flags .= "--fork " if(defined($fork));
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
-$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
+$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\"";
+
+if($verbose) {
+ print STDERR "RUN: server/sws $flags\n";
+}
exec("server/sws $flags");
diff --git a/tests/keywords.pl b/tests/keywords.pl
new file mode 100755
index 00000000..c61df774
--- /dev/null
+++ b/tests/keywords.pl
@@ -0,0 +1,153 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+
+use strict;
+
+push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+push(@INC, ".");
+
+require "getpart.pm"; # array functions
+
+my $srcdir = $ENV{'srcdir'} || '.';
+my $TESTDIR="$srcdir/data";
+
+# Get all commands and find out their test numbers
+opendir(DIR, $TESTDIR) || die "can't opendir $TESTDIR: $!";
+my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
+closedir DIR;
+
+my $TESTCASES; # start with no test cases
+
+# cut off everything but the digits
+for(@cmds) {
+ $_ =~ s/[a-z\/\.]*//g;
+}
+# the the numbers from low to high
+for(sort { $a <=> $b } @cmds) {
+ $TESTCASES .= " $_";
+}
+
+my $t;
+
+my %k; # keyword count
+my %t; # keyword to test case mapping
+my @miss; # test cases without keywords set
+
+my $count;
+
+my %errors;
+
+for $t (split(/ /, $TESTCASES)) {
+ if(loadtest("${TESTDIR}/test${t}")) {
+ # bad case
+ next;
+ }
+
+ my @ec = getpart("verify", "errorcode");
+ if($ec[0]) {
+ # count number of check error codes
+ $errors{ 0 + $ec[0] } ++;
+ }
+
+
+ my @what = getpart("info", "keywords");
+
+ if(!$what[0]) {
+ push @miss, $t;
+ next;
+ }
+
+ for(@what) {
+ chomp;
+ #print "Test $t: $_\n";
+ $k{$_}++;
+ $t{$_} .= "$t ";
+ }
+
+
+
+
+
+
+
+
+ $count++;
+}
+
+sub show {
+ my ($list)=@_;
+ my @a = split(" ", $list);
+ my $ret;
+
+ my $c;
+ my @l = sort {rand(100) - 50} @a;
+ my @ll;
+
+ for(1 .. 11) {
+ my $v = shift @l;
+ if($v) {
+ push @ll, $v;
+ }
+ }
+
+ for (sort {$a <=> $b} @ll) {
+ if($c++ == 10) {
+ $ret .= "...";
+ last;
+ }
+ $ret .= "$_ ";
+ }
+ return $ret;
+}
+
+# sort alphabetically
+my @mtest = reverse sort { lc($b) cmp lc($a) } keys %k;
+
+print <<TOP
+<table><tr><th>Num</th><th>Keyword</th><th>Test Cases</th></tr>
+TOP
+ ;
+for $t (@mtest) {
+ printf "<tr><td>%d</td><td>$t</td><td>%s</td></tr>\n", $k{$t},
+ show($t{$t});
+}
+printf "</table><p> $count out of %d tests (%d lack keywords)\n",
+ scalar(@miss) + $count,
+ scalar(@miss);
+
+for(@miss) {
+ print "$_ ";
+}
+
+print "\n";
+
+printf "<p> %d different error codes tested for:<br>\n",
+ scalar(keys %errors);
+
+# numerically on amount, or alphebetically if same amount
+my @etest = sort { $a <=> $b} keys %errors;
+
+for(@etest) {
+ print "$_ ";
+}
+print "\n";
diff --git a/tests/libtest/.gitignore b/tests/libtest/.gitignore
new file mode 100644
index 00000000..c33a6d29
--- /dev/null
+++ b/tests/libtest/.gitignore
@@ -0,0 +1,7 @@
+chkhostname
+lib5[0-9][0-9]
+lib15[0-9][0-9]
+lib19[0-9][0-9]
+lib2033
+libauthretry
+libntlmconnect
diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt
new file mode 100644
index 00000000..cc9d7e1f
--- /dev/null
+++ b/tests/libtest/CMakeLists.txt
@@ -0,0 +1,122 @@
+set(TARGET_LABEL_PREFIX "Test ")
+
+function(SETUP_TEST TEST_NAME) # ARGN are the files in the test
+ add_executable( ${TEST_NAME} ${ARGN} )
+ string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
+
+ 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"
+ )
+ if(USE_ARES)
+ include_directories(${CARES_INCLUDE_DIR})
+ endif()
+
+ target_link_libraries( ${TEST_NAME} libcurl ${CURL_LIBS})
+
+ set_target_properties(${TEST_NAME}
+ PROPERTIES COMPILE_DEFINITIONS ${UPPER_TEST_NAME})
+ set_target_properties(${TEST_NAME}
+ PROPERTIES PROJECT_LABEL "${TARGET_LABEL_PREFIX}${TEST_NAME}")
+
+ # Add the postfix to the executable since it is
+ # not added automatically as for modules and shared libraries
+ set_target_properties(${TEST_NAME}
+ PROPERTIES DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
+
+endfunction()
+
+
+transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
+include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
+
+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)
+
+# # these files are used in every single test program below
+# SET(SUPPORTFILES first.c test.h)
+
+# # These are all libcurl test programs
+# SET(noinst_PROGRAMS
+# lib500 lib501 lib502 lib503 lib504 lib505 lib506
+# lib507 lib508 lib510 lib511 lib512 lib513 lib514 lib515 lib516
+# lib517 lib518 lib519 lib520 lib521 lib523 lib524 lib525 lib526
+# #lib527
+# #lib529
+# lib530
+# #lib532
+# lib533 lib536 lib537 lib540 lib541 lib542 lib543
+# lib544
+# #lib545
+# lib547
+# #lib548
+# lib549 lib552 lib553 lib554 lib555 lib556
+# lib539 lib557
+# lib560
+# )
+
+# SET(noinst_PROGRAMS_USE_TESTUTIL
+# lib502 lib503 lib504
+# lib507
+# lib525 lib526 lib527
+# lib529
+# lib530
+# lib532
+# lib533 lib536
+# lib555
+# )
+
+# MACRO(ADD_TESTUTIL_IF_NECESSARY TEST_NAME)
+# LIST(FIND noinst_PROGRAMS_USE_TESTUTIL ${TEST_NAME} USES_TESTUTIL)
+# IF(NOT ${USES_TESTUTIL} EQUAL -1)
+# LIST(APPEND SOURCE ${TESTUTIL}) # Need TestUtil
+# ENDIF()
+# ENDMACRO()
+
+# # General case
+# FOREACH(TEST_NAME ${noinst_PROGRAMS})
+# SET(SOURCE "${TEST_NAME}.c" ${SUPPORTFILES})
+# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
+# SETUP_TEST(${TEST_NAME} ${SOURCE})
+# ENDFOREACH()
+
+# # Special cases
+# SET(TEST_NAME lib527)
+# SET(SOURCE "lib526.c" ${SUPPORTFILES})
+# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
+# SETUP_TEST(${TEST_NAME} ${SOURCE})
+
+# SET(TEST_NAME lib529)
+# SET(SOURCE "lib525.c" ${SUPPORTFILES})
+# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
+# SETUP_TEST(${TEST_NAME} ${SOURCE})
+
+# SET(TEST_NAME lib532)
+# SET(SOURCE "lib526.c" ${SUPPORTFILES})
+# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
+# SETUP_TEST(${TEST_NAME} ${SOURCE})
+
+# SET(TEST_NAME lib545)
+# SET(SOURCE "lib544.c" ${SUPPORTFILES})
+# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
+# SETUP_TEST(${TEST_NAME} ${SOURCE})
+
+# SET(TEST_NAME lib548)
+# SET(SOURCE "lib547.c" ${SUPPORTFILES})
+# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
+# SETUP_TEST(${TEST_NAME} ${SOURCE})
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 9c0d5950..80707b16 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,34 +27,47 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
if USE_EMBEDDED_ARES
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/lib \
- -I$(top_srcdir)/lib \
- -I$(top_builddir)/ares \
- -I$(top_srcdir)/ares
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_builddir)/ares \
+ -I$(top_srcdir)/ares
else
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/lib \
- -I$(top_srcdir)/lib
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib
endif
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
-test1022.pl Makefile.inc
+test1022.pl Makefile.inc notexists.pl
+
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
+if USE_EXPLICIT_LIB_DEPS
+SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+else
+SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@
+TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@
+endif
# Dependencies (may need to be overriden)
-LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
+LDADD = $(SUPPORTFILES_LIBS)
DEPENDENCIES = $(top_builddir)/lib/libcurl.la
# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
@@ -70,14 +83,35 @@ else
noinst_LTLIBRARIES =
endif
-if NO_UNDEFINED
-# The -no-undefined flag is crucial to build fine on some platforms
-UNDEF = -no-undefined
+if USE_CPPFLAG_CURL_STATICLIB
+AM_CPPFLAGS += -DCURL_STATICLIB
endif
+AM_LDFLAGS =
+AM_CFLAGS =
+
+libhostname_la_CPPFLAGS_EXTRA =
+libhostname_la_LDFLAGS_EXTRA = -module -avoid-version -rpath /nowhere
+libhostname_la_CFLAGS_EXTRA =
+
+if CURL_LT_SHLIB_USE_NO_UNDEFINED
+libhostname_la_LDFLAGS_EXTRA += -no-undefined
+endif
+
+if CURL_LT_SHLIB_USE_MIMPURE_TEXT
+libhostname_la_LDFLAGS_EXTRA += -mimpure-text
+endif
+
+if DOING_CURL_SYMBOL_HIDING
+libhostname_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
+libhostname_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
+endif
+
+libhostname_la_CPPFLAGS = $(AM_CPPFLAGS) $(libhostname_la_CPPFLAGS_EXTRA)
+libhostname_la_LDFLAGS = $(AM_LDFLAGS) $(libhostname_la_LDFLAGS_EXTRA)
+libhostname_la_CFLAGS = $(AM_CFLAGS) $(libhostname_la_CFLAGS_EXTRA)
+
libhostname_la_SOURCES = sethostname.c sethostname.h
libhostname_la_LIBADD =
libhostname_la_DEPENDENCIES =
-libhostname_la_LDFLAGS = -module -avoid-version $(UNDEF) -rpath /nowhere
-
diff --git a/tests/libtest/Makefile.in b/tests/libtest/Makefile.in
deleted file mode 100644
index bce2c39b..00000000
--- a/tests/libtest/Makefile.in
+++ /dev/null
@@ -1,1720 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/Makefile.inc
-noinst_PROGRAMS = lib500$(EXEEXT) lib501$(EXEEXT) lib502$(EXEEXT) \
- lib503$(EXEEXT) lib504$(EXEEXT) lib505$(EXEEXT) \
- lib506$(EXEEXT) lib507$(EXEEXT) lib508$(EXEEXT) \
- lib510$(EXEEXT) lib511$(EXEEXT) lib512$(EXEEXT) \
- lib513$(EXEEXT) lib514$(EXEEXT) lib515$(EXEEXT) \
- lib516$(EXEEXT) lib517$(EXEEXT) lib518$(EXEEXT) \
- lib519$(EXEEXT) lib520$(EXEEXT) lib521$(EXEEXT) \
- lib523$(EXEEXT) lib524$(EXEEXT) lib525$(EXEEXT) \
- lib526$(EXEEXT) lib527$(EXEEXT) lib574$(EXEEXT) \
- lib575$(EXEEXT) lib576$(EXEEXT) lib577$(EXEEXT) \
- lib578$(EXEEXT) lib579$(EXEEXT) lib529$(EXEEXT) \
- lib530$(EXEEXT) lib532$(EXEEXT) lib533$(EXEEXT) \
- lib536$(EXEEXT) lib537$(EXEEXT) lib540$(EXEEXT) \
- lib541$(EXEEXT) lib542$(EXEEXT) lib543$(EXEEXT) \
- lib544$(EXEEXT) lib545$(EXEEXT) lib547$(EXEEXT) \
- lib548$(EXEEXT) lib549$(EXEEXT) lib552$(EXEEXT) \
- lib553$(EXEEXT) lib554$(EXEEXT) lib555$(EXEEXT) \
- lib556$(EXEEXT) lib539$(EXEEXT) lib557$(EXEEXT) \
- lib558$(EXEEXT) lib559$(EXEEXT) lib560$(EXEEXT) \
- lib562$(EXEEXT) lib564$(EXEEXT) lib565$(EXEEXT) \
- lib566$(EXEEXT) lib567$(EXEEXT) lib568$(EXEEXT) \
- lib569$(EXEEXT) lib570$(EXEEXT) lib571$(EXEEXT) \
- lib572$(EXEEXT) lib573$(EXEEXT) chkhostname$(EXEEXT)
-subdir = tests/libtest
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-am_libhostname_la_OBJECTS = sethostname.lo
-libhostname_la_OBJECTS = $(am_libhostname_la_OBJECTS)
-@BUILD_LIBHOSTNAME_TRUE@am_libhostname_la_rpath =
-PROGRAMS = $(noinst_PROGRAMS)
-am_chkhostname_OBJECTS = chkhostname-chkhostname.$(OBJEXT) \
- chkhostname-curl_gethostname.$(OBJEXT)
-chkhostname_OBJECTS = $(am_chkhostname_OBJECTS)
-am__objects_1 = first.$(OBJEXT)
-am_lib500_OBJECTS = lib500.$(OBJEXT) $(am__objects_1)
-lib500_OBJECTS = $(am_lib500_OBJECTS)
-lib500_LDADD = $(LDADD)
-lib500_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib501_OBJECTS = lib501.$(OBJEXT) $(am__objects_1)
-lib501_OBJECTS = $(am_lib501_OBJECTS)
-lib501_LDADD = $(LDADD)
-lib501_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_2 = testutil.$(OBJEXT)
-am_lib502_OBJECTS = lib502.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib502_OBJECTS = $(am_lib502_OBJECTS)
-lib502_LDADD = $(LDADD)
-lib502_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib503_OBJECTS = lib503.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib503_OBJECTS = $(am_lib503_OBJECTS)
-lib503_LDADD = $(LDADD)
-lib503_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib504_OBJECTS = lib504.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib504_OBJECTS = $(am_lib504_OBJECTS)
-lib504_LDADD = $(LDADD)
-lib504_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib505_OBJECTS = lib505.$(OBJEXT) $(am__objects_1)
-lib505_OBJECTS = $(am_lib505_OBJECTS)
-lib505_LDADD = $(LDADD)
-lib505_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib506_OBJECTS = lib506.$(OBJEXT) $(am__objects_1)
-lib506_OBJECTS = $(am_lib506_OBJECTS)
-lib506_LDADD = $(LDADD)
-lib506_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib507_OBJECTS = lib507.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib507_OBJECTS = $(am_lib507_OBJECTS)
-lib507_LDADD = $(LDADD)
-lib507_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib508_OBJECTS = lib508.$(OBJEXT) $(am__objects_1)
-lib508_OBJECTS = $(am_lib508_OBJECTS)
-lib508_LDADD = $(LDADD)
-lib508_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib510_OBJECTS = lib510.$(OBJEXT) $(am__objects_1)
-lib510_OBJECTS = $(am_lib510_OBJECTS)
-lib510_LDADD = $(LDADD)
-lib510_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib511_OBJECTS = lib511.$(OBJEXT) $(am__objects_1)
-lib511_OBJECTS = $(am_lib511_OBJECTS)
-lib511_LDADD = $(LDADD)
-lib511_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib512_OBJECTS = lib512.$(OBJEXT) $(am__objects_1)
-lib512_OBJECTS = $(am_lib512_OBJECTS)
-lib512_LDADD = $(LDADD)
-lib512_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib513_OBJECTS = lib513.$(OBJEXT) $(am__objects_1)
-lib513_OBJECTS = $(am_lib513_OBJECTS)
-lib513_LDADD = $(LDADD)
-lib513_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib514_OBJECTS = lib514.$(OBJEXT) $(am__objects_1)
-lib514_OBJECTS = $(am_lib514_OBJECTS)
-lib514_LDADD = $(LDADD)
-lib514_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib515_OBJECTS = lib515.$(OBJEXT) $(am__objects_1)
-lib515_OBJECTS = $(am_lib515_OBJECTS)
-lib515_LDADD = $(LDADD)
-lib515_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib516_OBJECTS = lib516.$(OBJEXT) $(am__objects_1)
-lib516_OBJECTS = $(am_lib516_OBJECTS)
-lib516_LDADD = $(LDADD)
-lib516_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib517_OBJECTS = lib517.$(OBJEXT) $(am__objects_1)
-lib517_OBJECTS = $(am_lib517_OBJECTS)
-lib517_LDADD = $(LDADD)
-lib517_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib518_OBJECTS = lib518.$(OBJEXT) $(am__objects_1)
-lib518_OBJECTS = $(am_lib518_OBJECTS)
-lib518_LDADD = $(LDADD)
-lib518_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib519_OBJECTS = lib519.$(OBJEXT) $(am__objects_1)
-lib519_OBJECTS = $(am_lib519_OBJECTS)
-lib519_LDADD = $(LDADD)
-lib519_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib520_OBJECTS = lib520.$(OBJEXT) $(am__objects_1)
-lib520_OBJECTS = $(am_lib520_OBJECTS)
-lib520_LDADD = $(LDADD)
-lib520_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib521_OBJECTS = lib521.$(OBJEXT) $(am__objects_1)
-lib521_OBJECTS = $(am_lib521_OBJECTS)
-lib521_LDADD = $(LDADD)
-lib521_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib523_OBJECTS = lib523.$(OBJEXT) $(am__objects_1)
-lib523_OBJECTS = $(am_lib523_OBJECTS)
-lib523_LDADD = $(LDADD)
-lib523_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib524_OBJECTS = lib524.$(OBJEXT) $(am__objects_1)
-lib524_OBJECTS = $(am_lib524_OBJECTS)
-lib524_LDADD = $(LDADD)
-lib524_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib525_OBJECTS = lib525.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib525_OBJECTS = $(am_lib525_OBJECTS)
-lib525_LDADD = $(LDADD)
-lib525_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_3 = lib526-first.$(OBJEXT)
-am__objects_4 = lib526-testutil.$(OBJEXT)
-am_lib526_OBJECTS = lib526-lib526.$(OBJEXT) $(am__objects_3) \
- $(am__objects_4)
-lib526_OBJECTS = $(am_lib526_OBJECTS)
-lib526_LDADD = $(LDADD)
-lib526_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_5 = lib527-first.$(OBJEXT)
-am__objects_6 = lib527-testutil.$(OBJEXT)
-am_lib527_OBJECTS = lib527-lib526.$(OBJEXT) $(am__objects_5) \
- $(am__objects_6)
-lib527_OBJECTS = $(am_lib527_OBJECTS)
-lib527_LDADD = $(LDADD)
-lib527_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_7 = lib529-first.$(OBJEXT)
-am__objects_8 = lib529-testutil.$(OBJEXT)
-am_lib529_OBJECTS = lib529-lib525.$(OBJEXT) $(am__objects_7) \
- $(am__objects_8)
-lib529_OBJECTS = $(am_lib529_OBJECTS)
-lib529_LDADD = $(LDADD)
-lib529_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_9 = lib530-first.$(OBJEXT)
-am__objects_10 = lib530-testutil.$(OBJEXT)
-am_lib530_OBJECTS = lib530-lib530.$(OBJEXT) $(am__objects_9) \
- $(am__objects_10)
-lib530_OBJECTS = $(am_lib530_OBJECTS)
-lib530_LDADD = $(LDADD)
-lib530_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_11 = lib532-first.$(OBJEXT)
-am__objects_12 = lib532-testutil.$(OBJEXT)
-am_lib532_OBJECTS = lib532-lib526.$(OBJEXT) $(am__objects_11) \
- $(am__objects_12)
-lib532_OBJECTS = $(am_lib532_OBJECTS)
-lib532_LDADD = $(LDADD)
-lib532_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib533_OBJECTS = lib533.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib533_OBJECTS = $(am_lib533_OBJECTS)
-lib533_LDADD = $(LDADD)
-lib533_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib536_OBJECTS = lib536.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib536_OBJECTS = $(am_lib536_OBJECTS)
-lib536_LDADD = $(LDADD)
-lib536_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib537_OBJECTS = lib537.$(OBJEXT) $(am__objects_1)
-lib537_OBJECTS = $(am_lib537_OBJECTS)
-lib537_LDADD = $(LDADD)
-lib537_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib539_OBJECTS = lib539.$(OBJEXT) $(am__objects_1)
-lib539_OBJECTS = $(am_lib539_OBJECTS)
-lib539_LDADD = $(LDADD)
-lib539_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib540_OBJECTS = lib540.$(OBJEXT) $(am__objects_1)
-lib540_OBJECTS = $(am_lib540_OBJECTS)
-lib540_LDADD = $(LDADD)
-lib540_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib541_OBJECTS = lib541.$(OBJEXT) $(am__objects_1)
-lib541_OBJECTS = $(am_lib541_OBJECTS)
-lib541_LDADD = $(LDADD)
-lib541_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib542_OBJECTS = lib542.$(OBJEXT) $(am__objects_1)
-lib542_OBJECTS = $(am_lib542_OBJECTS)
-lib542_LDADD = $(LDADD)
-lib542_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib543_OBJECTS = lib543.$(OBJEXT) $(am__objects_1)
-lib543_OBJECTS = $(am_lib543_OBJECTS)
-lib543_LDADD = $(LDADD)
-lib543_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib544_OBJECTS = lib544.$(OBJEXT) $(am__objects_1)
-lib544_OBJECTS = $(am_lib544_OBJECTS)
-lib544_LDADD = $(LDADD)
-lib544_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_13 = lib545-first.$(OBJEXT)
-am_lib545_OBJECTS = lib545-lib544.$(OBJEXT) $(am__objects_13)
-lib545_OBJECTS = $(am_lib545_OBJECTS)
-lib545_LDADD = $(LDADD)
-lib545_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib547_OBJECTS = lib547.$(OBJEXT) $(am__objects_1)
-lib547_OBJECTS = $(am_lib547_OBJECTS)
-lib547_LDADD = $(LDADD)
-lib547_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_14 = lib548-first.$(OBJEXT)
-am_lib548_OBJECTS = lib548-lib547.$(OBJEXT) $(am__objects_14)
-lib548_OBJECTS = $(am_lib548_OBJECTS)
-lib548_LDADD = $(LDADD)
-lib548_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib549_OBJECTS = lib549.$(OBJEXT) $(am__objects_1)
-lib549_OBJECTS = $(am_lib549_OBJECTS)
-lib549_LDADD = $(LDADD)
-lib549_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib552_OBJECTS = lib552.$(OBJEXT) $(am__objects_1)
-lib552_OBJECTS = $(am_lib552_OBJECTS)
-lib552_LDADD = $(LDADD)
-lib552_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib553_OBJECTS = lib553.$(OBJEXT) $(am__objects_1)
-lib553_OBJECTS = $(am_lib553_OBJECTS)
-lib553_LDADD = $(LDADD)
-lib553_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib554_OBJECTS = lib554.$(OBJEXT) $(am__objects_1)
-lib554_OBJECTS = $(am_lib554_OBJECTS)
-lib554_LDADD = $(LDADD)
-lib554_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib555_OBJECTS = lib555.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib555_OBJECTS = $(am_lib555_OBJECTS)
-lib555_LDADD = $(LDADD)
-lib555_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib556_OBJECTS = lib556.$(OBJEXT) $(am__objects_1)
-lib556_OBJECTS = $(am_lib556_OBJECTS)
-lib556_LDADD = $(LDADD)
-lib556_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib557_OBJECTS = lib557.$(OBJEXT) $(am__objects_1)
-lib557_OBJECTS = $(am_lib557_OBJECTS)
-lib557_LDADD = $(LDADD)
-lib557_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_15 = lib558-first.$(OBJEXT)
-am_lib558_OBJECTS = lib558-lib558.$(OBJEXT) $(am__objects_15)
-lib558_OBJECTS = $(am_lib558_OBJECTS)
-lib558_LDADD = $(LDADD)
-lib558_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_16 = lib559-first.$(OBJEXT)
-am_lib559_OBJECTS = lib559-lib558.$(OBJEXT) $(am__objects_16)
-lib559_OBJECTS = $(am_lib559_OBJECTS)
-lib559_LDADD = $(LDADD)
-lib559_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib560_OBJECTS = lib560.$(OBJEXT) $(am__objects_1)
-lib560_OBJECTS = $(am_lib560_OBJECTS)
-lib560_LDADD = $(LDADD)
-lib560_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib562_OBJECTS = lib562.$(OBJEXT) $(am__objects_1)
-lib562_OBJECTS = $(am_lib562_OBJECTS)
-lib562_LDADD = $(LDADD)
-lib562_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib564_OBJECTS = lib564.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib564_OBJECTS = $(am_lib564_OBJECTS)
-lib564_LDADD = $(LDADD)
-lib564_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_17 = lib565-first.$(OBJEXT)
-am_lib565_OBJECTS = lib565-lib510.$(OBJEXT) $(am__objects_17)
-lib565_OBJECTS = $(am_lib565_OBJECTS)
-lib565_LDADD = $(LDADD)
-lib565_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib566_OBJECTS = lib566.$(OBJEXT) $(am__objects_1)
-lib566_OBJECTS = $(am_lib566_OBJECTS)
-lib566_LDADD = $(LDADD)
-lib566_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib567_OBJECTS = lib567.$(OBJEXT) $(am__objects_1)
-lib567_OBJECTS = $(am_lib567_OBJECTS)
-lib567_LDADD = $(LDADD)
-lib567_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib568_OBJECTS = lib568.$(OBJEXT) $(am__objects_1)
-lib568_OBJECTS = $(am_lib568_OBJECTS)
-lib568_LDADD = $(LDADD)
-lib568_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib569_OBJECTS = lib569.$(OBJEXT) $(am__objects_1)
-lib569_OBJECTS = $(am_lib569_OBJECTS)
-lib569_LDADD = $(LDADD)
-lib569_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib570_OBJECTS = lib570.$(OBJEXT) $(am__objects_1)
-lib570_OBJECTS = $(am_lib570_OBJECTS)
-lib570_LDADD = $(LDADD)
-lib570_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib571_OBJECTS = lib571.$(OBJEXT) $(am__objects_1)
-lib571_OBJECTS = $(am_lib571_OBJECTS)
-lib571_LDADD = $(LDADD)
-lib571_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib572_OBJECTS = lib572.$(OBJEXT) $(am__objects_1)
-lib572_OBJECTS = $(am_lib572_OBJECTS)
-lib572_LDADD = $(LDADD)
-lib572_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib573_OBJECTS = lib573.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-lib573_OBJECTS = $(am_lib573_OBJECTS)
-lib573_LDADD = $(LDADD)
-lib573_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib574_OBJECTS = lib574.$(OBJEXT) $(am__objects_1)
-lib574_OBJECTS = $(am_lib574_OBJECTS)
-lib574_LDADD = $(LDADD)
-lib574_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib575_OBJECTS = lib575.$(OBJEXT) $(am__objects_1)
-lib575_OBJECTS = $(am_lib575_OBJECTS)
-lib575_LDADD = $(LDADD)
-lib575_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib576_OBJECTS = lib576.$(OBJEXT) $(am__objects_1)
-lib576_OBJECTS = $(am_lib576_OBJECTS)
-lib576_LDADD = $(LDADD)
-lib576_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib577_OBJECTS = lib577.$(OBJEXT) $(am__objects_1)
-lib577_OBJECTS = $(am_lib577_OBJECTS)
-lib577_LDADD = $(LDADD)
-lib577_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib578_OBJECTS = lib578.$(OBJEXT) $(am__objects_1)
-lib578_OBJECTS = $(am_lib578_OBJECTS)
-lib578_LDADD = $(LDADD)
-lib578_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib579_OBJECTS = lib579.$(OBJEXT) $(am__objects_1)
-lib579_OBJECTS = $(am_lib579_OBJECTS)
-lib579_LDADD = $(LDADD)
-lib579_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-DEFAULT_INCLUDES =
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
- $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \
- $(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \
- $(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \
- $(lib510_SOURCES) $(lib511_SOURCES) $(lib512_SOURCES) \
- $(lib513_SOURCES) $(lib514_SOURCES) $(lib515_SOURCES) \
- $(lib516_SOURCES) $(lib517_SOURCES) $(lib518_SOURCES) \
- $(lib519_SOURCES) $(lib520_SOURCES) $(lib521_SOURCES) \
- $(lib523_SOURCES) $(lib524_SOURCES) $(lib525_SOURCES) \
- $(lib526_SOURCES) $(lib527_SOURCES) $(lib529_SOURCES) \
- $(lib530_SOURCES) $(lib532_SOURCES) $(lib533_SOURCES) \
- $(lib536_SOURCES) $(lib537_SOURCES) $(lib539_SOURCES) \
- $(lib540_SOURCES) $(lib541_SOURCES) $(lib542_SOURCES) \
- $(lib543_SOURCES) $(lib544_SOURCES) $(lib545_SOURCES) \
- $(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \
- $(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \
- $(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \
- $(lib558_SOURCES) $(lib559_SOURCES) $(lib560_SOURCES) \
- $(lib562_SOURCES) $(lib564_SOURCES) $(lib565_SOURCES) \
- $(lib566_SOURCES) $(lib567_SOURCES) $(lib568_SOURCES) \
- $(lib569_SOURCES) $(lib570_SOURCES) $(lib571_SOURCES) \
- $(lib572_SOURCES) $(lib573_SOURCES) $(lib574_SOURCES) \
- $(lib575_SOURCES) $(lib576_SOURCES) $(lib577_SOURCES) \
- $(lib578_SOURCES) $(lib579_SOURCES)
-DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
- $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \
- $(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \
- $(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \
- $(lib510_SOURCES) $(lib511_SOURCES) $(lib512_SOURCES) \
- $(lib513_SOURCES) $(lib514_SOURCES) $(lib515_SOURCES) \
- $(lib516_SOURCES) $(lib517_SOURCES) $(lib518_SOURCES) \
- $(lib519_SOURCES) $(lib520_SOURCES) $(lib521_SOURCES) \
- $(lib523_SOURCES) $(lib524_SOURCES) $(lib525_SOURCES) \
- $(lib526_SOURCES) $(lib527_SOURCES) $(lib529_SOURCES) \
- $(lib530_SOURCES) $(lib532_SOURCES) $(lib533_SOURCES) \
- $(lib536_SOURCES) $(lib537_SOURCES) $(lib539_SOURCES) \
- $(lib540_SOURCES) $(lib541_SOURCES) $(lib542_SOURCES) \
- $(lib543_SOURCES) $(lib544_SOURCES) $(lib545_SOURCES) \
- $(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \
- $(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \
- $(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \
- $(lib558_SOURCES) $(lib559_SOURCES) $(lib560_SOURCES) \
- $(lib562_SOURCES) $(lib564_SOURCES) $(lib565_SOURCES) \
- $(lib566_SOURCES) $(lib567_SOURCES) $(lib568_SOURCES) \
- $(lib569_SOURCES) $(lib570_SOURCES) $(lib571_SOURCES) \
- $(lib572_SOURCES) $(lib573_SOURCES) $(lib574_SOURCES) \
- $(lib575_SOURCES) $(lib576_SOURCES) $(lib577_SOURCES) \
- $(lib578_SOURCES) $(lib579_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-###########################################################################
-AUTOMAKE_OPTIONS = foreign nostdinc
-@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib
-
-
-# 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
-# might possibly already be installed in the system.
-#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
-# $(top_srcdir)/include is for libcurl's external include files
-# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
-# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
-# $(top_srcdir)/ares is for in-tree c-ares's external include files
-@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares
-
-EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
-test1022.pl Makefile.inc
-
-
-# Dependencies (may need to be overriden)
-LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
-DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-
-# files used only in some libcurl test programs
-TESTUTIL = testutil.c testutil.h
-
-# these files are used in every single test program below
-SUPPORTFILES = first.c test.h
-chkhostname_SOURCES = chkhostname.c $(top_srcdir)/lib/curl_gethostname.c
-chkhostname_LDADD = @CURL_NETWORK_LIBS@
-chkhostname_DEPENDENCIES =
-chkhostname_CFLAGS = $(AM_CFLAGS)
-lib500_SOURCES = lib500.c $(SUPPORTFILES)
-lib501_SOURCES = lib501.c $(SUPPORTFILES)
-lib502_SOURCES = lib502.c $(SUPPORTFILES) $(TESTUTIL)
-lib503_SOURCES = lib503.c $(SUPPORTFILES) $(TESTUTIL)
-lib504_SOURCES = lib504.c $(SUPPORTFILES) $(TESTUTIL)
-lib505_SOURCES = lib505.c $(SUPPORTFILES)
-lib506_SOURCES = lib506.c $(SUPPORTFILES)
-lib507_SOURCES = lib507.c $(SUPPORTFILES) $(TESTUTIL)
-lib508_SOURCES = lib508.c $(SUPPORTFILES)
-lib510_SOURCES = lib510.c $(SUPPORTFILES)
-lib511_SOURCES = lib511.c $(SUPPORTFILES)
-lib512_SOURCES = lib512.c $(SUPPORTFILES)
-lib513_SOURCES = lib513.c $(SUPPORTFILES)
-lib514_SOURCES = lib514.c $(SUPPORTFILES)
-lib515_SOURCES = lib515.c $(SUPPORTFILES)
-lib516_SOURCES = lib516.c $(SUPPORTFILES)
-lib517_SOURCES = lib517.c $(SUPPORTFILES)
-lib518_SOURCES = lib518.c $(SUPPORTFILES)
-lib519_SOURCES = lib519.c $(SUPPORTFILES)
-lib520_SOURCES = lib520.c $(SUPPORTFILES)
-lib521_SOURCES = lib521.c $(SUPPORTFILES)
-lib523_SOURCES = lib523.c $(SUPPORTFILES)
-lib524_SOURCES = lib524.c $(SUPPORTFILES)
-lib525_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL)
-lib526_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib526_CFLAGS = -DLIB526
-lib527_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib527_CFLAGS = -DLIB527
-lib529_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL)
-lib529_CFLAGS = -DLIB529
-lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL)
-lib530_CFLAGS = -DLIB530
-lib532_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib532_CFLAGS = -DLIB532
-lib533_SOURCES = lib533.c $(SUPPORTFILES) $(TESTUTIL)
-lib536_SOURCES = lib536.c $(SUPPORTFILES) $(TESTUTIL)
-lib537_SOURCES = lib537.c $(SUPPORTFILES)
-lib539_SOURCES = lib539.c $(SUPPORTFILES)
-lib540_SOURCES = lib540.c $(SUPPORTFILES)
-lib541_SOURCES = lib541.c $(SUPPORTFILES)
-lib542_SOURCES = lib542.c $(SUPPORTFILES)
-lib543_SOURCES = lib543.c $(SUPPORTFILES)
-lib544_SOURCES = lib544.c $(SUPPORTFILES)
-lib545_SOURCES = lib544.c $(SUPPORTFILES)
-lib545_CFLAGS = -DLIB545
-lib547_SOURCES = lib547.c $(SUPPORTFILES)
-lib548_SOURCES = lib547.c $(SUPPORTFILES)
-lib548_CFLAGS = -DLIB548
-lib549_SOURCES = lib549.c $(SUPPORTFILES)
-lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL)
-lib552_SOURCES = lib552.c $(SUPPORTFILES)
-lib553_SOURCES = lib553.c $(SUPPORTFILES)
-lib554_SOURCES = lib554.c $(SUPPORTFILES)
-lib556_SOURCES = lib556.c $(SUPPORTFILES)
-lib557_SOURCES = lib557.c $(SUPPORTFILES)
-lib558_SOURCES = lib558.c $(SUPPORTFILES)
-lib558_CFLAGS = -DLIB558
-lib559_SOURCES = lib558.c $(SUPPORTFILES)
-lib559_CFLAGS = -DLIB559
-lib560_SOURCES = lib560.c $(SUPPORTFILES)
-lib574_SOURCES = lib574.c $(SUPPORTFILES)
-lib575_SOURCES = lib575.c $(SUPPORTFILES)
-lib576_SOURCES = lib576.c $(SUPPORTFILES)
-lib577_SOURCES = lib577.c $(SUPPORTFILES)
-lib562_SOURCES = lib562.c $(SUPPORTFILES)
-lib564_SOURCES = lib564.c $(SUPPORTFILES) $(TESTUTIL)
-lib565_SOURCES = lib510.c $(SUPPORTFILES)
-lib565_CFLAGS = -DLIB565
-lib566_SOURCES = lib566.c $(SUPPORTFILES)
-lib567_SOURCES = lib567.c $(SUPPORTFILES)
-lib568_SOURCES = lib568.c $(SUPPORTFILES)
-lib569_SOURCES = lib569.c $(SUPPORTFILES)
-lib570_SOURCES = lib570.c $(SUPPORTFILES)
-lib571_SOURCES = lib571.c $(SUPPORTFILES)
-lib572_SOURCES = lib572.c $(SUPPORTFILES)
-lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL)
-lib578_SOURCES = lib578.c $(SUPPORTFILES)
-lib579_SOURCES = lib579.c $(SUPPORTFILES)
-@BUILD_LIBHOSTNAME_FALSE@noinst_LTLIBRARIES =
-
-# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
-# noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
-
-# Preloading of libhostname allows host name overriding,
-# this is used to make some tests machine independent.
-@BUILD_LIBHOSTNAME_TRUE@noinst_LTLIBRARIES = libhostname.la
-
-# The -no-undefined flag is crucial to build fine on some platforms
-@NO_UNDEFINED_TRUE@UNDEF = -no-undefined
-libhostname_la_SOURCES = sethostname.c sethostname.h
-libhostname_la_LIBADD =
-libhostname_la_DEPENDENCIES =
-libhostname_la_LDFLAGS = -module -avoid-version $(UNDEF) -rpath /nowhere
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/libtest/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign tests/libtest/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-libhostname.la: $(libhostname_la_OBJECTS) $(libhostname_la_DEPENDENCIES)
- $(LINK) $(am_libhostname_la_rpath) $(libhostname_la_LDFLAGS) $(libhostname_la_OBJECTS) $(libhostname_la_LIBADD) $(LIBS)
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-chkhostname$(EXEEXT): $(chkhostname_OBJECTS) $(chkhostname_DEPENDENCIES)
- @rm -f chkhostname$(EXEEXT)
- $(LINK) $(chkhostname_LDFLAGS) $(chkhostname_OBJECTS) $(chkhostname_LDADD) $(LIBS)
-lib500$(EXEEXT): $(lib500_OBJECTS) $(lib500_DEPENDENCIES)
- @rm -f lib500$(EXEEXT)
- $(LINK) $(lib500_LDFLAGS) $(lib500_OBJECTS) $(lib500_LDADD) $(LIBS)
-lib501$(EXEEXT): $(lib501_OBJECTS) $(lib501_DEPENDENCIES)
- @rm -f lib501$(EXEEXT)
- $(LINK) $(lib501_LDFLAGS) $(lib501_OBJECTS) $(lib501_LDADD) $(LIBS)
-lib502$(EXEEXT): $(lib502_OBJECTS) $(lib502_DEPENDENCIES)
- @rm -f lib502$(EXEEXT)
- $(LINK) $(lib502_LDFLAGS) $(lib502_OBJECTS) $(lib502_LDADD) $(LIBS)
-lib503$(EXEEXT): $(lib503_OBJECTS) $(lib503_DEPENDENCIES)
- @rm -f lib503$(EXEEXT)
- $(LINK) $(lib503_LDFLAGS) $(lib503_OBJECTS) $(lib503_LDADD) $(LIBS)
-lib504$(EXEEXT): $(lib504_OBJECTS) $(lib504_DEPENDENCIES)
- @rm -f lib504$(EXEEXT)
- $(LINK) $(lib504_LDFLAGS) $(lib504_OBJECTS) $(lib504_LDADD) $(LIBS)
-lib505$(EXEEXT): $(lib505_OBJECTS) $(lib505_DEPENDENCIES)
- @rm -f lib505$(EXEEXT)
- $(LINK) $(lib505_LDFLAGS) $(lib505_OBJECTS) $(lib505_LDADD) $(LIBS)
-lib506$(EXEEXT): $(lib506_OBJECTS) $(lib506_DEPENDENCIES)
- @rm -f lib506$(EXEEXT)
- $(LINK) $(lib506_LDFLAGS) $(lib506_OBJECTS) $(lib506_LDADD) $(LIBS)
-lib507$(EXEEXT): $(lib507_OBJECTS) $(lib507_DEPENDENCIES)
- @rm -f lib507$(EXEEXT)
- $(LINK) $(lib507_LDFLAGS) $(lib507_OBJECTS) $(lib507_LDADD) $(LIBS)
-lib508$(EXEEXT): $(lib508_OBJECTS) $(lib508_DEPENDENCIES)
- @rm -f lib508$(EXEEXT)
- $(LINK) $(lib508_LDFLAGS) $(lib508_OBJECTS) $(lib508_LDADD) $(LIBS)
-lib510$(EXEEXT): $(lib510_OBJECTS) $(lib510_DEPENDENCIES)
- @rm -f lib510$(EXEEXT)
- $(LINK) $(lib510_LDFLAGS) $(lib510_OBJECTS) $(lib510_LDADD) $(LIBS)
-lib511$(EXEEXT): $(lib511_OBJECTS) $(lib511_DEPENDENCIES)
- @rm -f lib511$(EXEEXT)
- $(LINK) $(lib511_LDFLAGS) $(lib511_OBJECTS) $(lib511_LDADD) $(LIBS)
-lib512$(EXEEXT): $(lib512_OBJECTS) $(lib512_DEPENDENCIES)
- @rm -f lib512$(EXEEXT)
- $(LINK) $(lib512_LDFLAGS) $(lib512_OBJECTS) $(lib512_LDADD) $(LIBS)
-lib513$(EXEEXT): $(lib513_OBJECTS) $(lib513_DEPENDENCIES)
- @rm -f lib513$(EXEEXT)
- $(LINK) $(lib513_LDFLAGS) $(lib513_OBJECTS) $(lib513_LDADD) $(LIBS)
-lib514$(EXEEXT): $(lib514_OBJECTS) $(lib514_DEPENDENCIES)
- @rm -f lib514$(EXEEXT)
- $(LINK) $(lib514_LDFLAGS) $(lib514_OBJECTS) $(lib514_LDADD) $(LIBS)
-lib515$(EXEEXT): $(lib515_OBJECTS) $(lib515_DEPENDENCIES)
- @rm -f lib515$(EXEEXT)
- $(LINK) $(lib515_LDFLAGS) $(lib515_OBJECTS) $(lib515_LDADD) $(LIBS)
-lib516$(EXEEXT): $(lib516_OBJECTS) $(lib516_DEPENDENCIES)
- @rm -f lib516$(EXEEXT)
- $(LINK) $(lib516_LDFLAGS) $(lib516_OBJECTS) $(lib516_LDADD) $(LIBS)
-lib517$(EXEEXT): $(lib517_OBJECTS) $(lib517_DEPENDENCIES)
- @rm -f lib517$(EXEEXT)
- $(LINK) $(lib517_LDFLAGS) $(lib517_OBJECTS) $(lib517_LDADD) $(LIBS)
-lib518$(EXEEXT): $(lib518_OBJECTS) $(lib518_DEPENDENCIES)
- @rm -f lib518$(EXEEXT)
- $(LINK) $(lib518_LDFLAGS) $(lib518_OBJECTS) $(lib518_LDADD) $(LIBS)
-lib519$(EXEEXT): $(lib519_OBJECTS) $(lib519_DEPENDENCIES)
- @rm -f lib519$(EXEEXT)
- $(LINK) $(lib519_LDFLAGS) $(lib519_OBJECTS) $(lib519_LDADD) $(LIBS)
-lib520$(EXEEXT): $(lib520_OBJECTS) $(lib520_DEPENDENCIES)
- @rm -f lib520$(EXEEXT)
- $(LINK) $(lib520_LDFLAGS) $(lib520_OBJECTS) $(lib520_LDADD) $(LIBS)
-lib521$(EXEEXT): $(lib521_OBJECTS) $(lib521_DEPENDENCIES)
- @rm -f lib521$(EXEEXT)
- $(LINK) $(lib521_LDFLAGS) $(lib521_OBJECTS) $(lib521_LDADD) $(LIBS)
-lib523$(EXEEXT): $(lib523_OBJECTS) $(lib523_DEPENDENCIES)
- @rm -f lib523$(EXEEXT)
- $(LINK) $(lib523_LDFLAGS) $(lib523_OBJECTS) $(lib523_LDADD) $(LIBS)
-lib524$(EXEEXT): $(lib524_OBJECTS) $(lib524_DEPENDENCIES)
- @rm -f lib524$(EXEEXT)
- $(LINK) $(lib524_LDFLAGS) $(lib524_OBJECTS) $(lib524_LDADD) $(LIBS)
-lib525$(EXEEXT): $(lib525_OBJECTS) $(lib525_DEPENDENCIES)
- @rm -f lib525$(EXEEXT)
- $(LINK) $(lib525_LDFLAGS) $(lib525_OBJECTS) $(lib525_LDADD) $(LIBS)
-lib526$(EXEEXT): $(lib526_OBJECTS) $(lib526_DEPENDENCIES)
- @rm -f lib526$(EXEEXT)
- $(LINK) $(lib526_LDFLAGS) $(lib526_OBJECTS) $(lib526_LDADD) $(LIBS)
-lib527$(EXEEXT): $(lib527_OBJECTS) $(lib527_DEPENDENCIES)
- @rm -f lib527$(EXEEXT)
- $(LINK) $(lib527_LDFLAGS) $(lib527_OBJECTS) $(lib527_LDADD) $(LIBS)
-lib529$(EXEEXT): $(lib529_OBJECTS) $(lib529_DEPENDENCIES)
- @rm -f lib529$(EXEEXT)
- $(LINK) $(lib529_LDFLAGS) $(lib529_OBJECTS) $(lib529_LDADD) $(LIBS)
-lib530$(EXEEXT): $(lib530_OBJECTS) $(lib530_DEPENDENCIES)
- @rm -f lib530$(EXEEXT)
- $(LINK) $(lib530_LDFLAGS) $(lib530_OBJECTS) $(lib530_LDADD) $(LIBS)
-lib532$(EXEEXT): $(lib532_OBJECTS) $(lib532_DEPENDENCIES)
- @rm -f lib532$(EXEEXT)
- $(LINK) $(lib532_LDFLAGS) $(lib532_OBJECTS) $(lib532_LDADD) $(LIBS)
-lib533$(EXEEXT): $(lib533_OBJECTS) $(lib533_DEPENDENCIES)
- @rm -f lib533$(EXEEXT)
- $(LINK) $(lib533_LDFLAGS) $(lib533_OBJECTS) $(lib533_LDADD) $(LIBS)
-lib536$(EXEEXT): $(lib536_OBJECTS) $(lib536_DEPENDENCIES)
- @rm -f lib536$(EXEEXT)
- $(LINK) $(lib536_LDFLAGS) $(lib536_OBJECTS) $(lib536_LDADD) $(LIBS)
-lib537$(EXEEXT): $(lib537_OBJECTS) $(lib537_DEPENDENCIES)
- @rm -f lib537$(EXEEXT)
- $(LINK) $(lib537_LDFLAGS) $(lib537_OBJECTS) $(lib537_LDADD) $(LIBS)
-lib539$(EXEEXT): $(lib539_OBJECTS) $(lib539_DEPENDENCIES)
- @rm -f lib539$(EXEEXT)
- $(LINK) $(lib539_LDFLAGS) $(lib539_OBJECTS) $(lib539_LDADD) $(LIBS)
-lib540$(EXEEXT): $(lib540_OBJECTS) $(lib540_DEPENDENCIES)
- @rm -f lib540$(EXEEXT)
- $(LINK) $(lib540_LDFLAGS) $(lib540_OBJECTS) $(lib540_LDADD) $(LIBS)
-lib541$(EXEEXT): $(lib541_OBJECTS) $(lib541_DEPENDENCIES)
- @rm -f lib541$(EXEEXT)
- $(LINK) $(lib541_LDFLAGS) $(lib541_OBJECTS) $(lib541_LDADD) $(LIBS)
-lib542$(EXEEXT): $(lib542_OBJECTS) $(lib542_DEPENDENCIES)
- @rm -f lib542$(EXEEXT)
- $(LINK) $(lib542_LDFLAGS) $(lib542_OBJECTS) $(lib542_LDADD) $(LIBS)
-lib543$(EXEEXT): $(lib543_OBJECTS) $(lib543_DEPENDENCIES)
- @rm -f lib543$(EXEEXT)
- $(LINK) $(lib543_LDFLAGS) $(lib543_OBJECTS) $(lib543_LDADD) $(LIBS)
-lib544$(EXEEXT): $(lib544_OBJECTS) $(lib544_DEPENDENCIES)
- @rm -f lib544$(EXEEXT)
- $(LINK) $(lib544_LDFLAGS) $(lib544_OBJECTS) $(lib544_LDADD) $(LIBS)
-lib545$(EXEEXT): $(lib545_OBJECTS) $(lib545_DEPENDENCIES)
- @rm -f lib545$(EXEEXT)
- $(LINK) $(lib545_LDFLAGS) $(lib545_OBJECTS) $(lib545_LDADD) $(LIBS)
-lib547$(EXEEXT): $(lib547_OBJECTS) $(lib547_DEPENDENCIES)
- @rm -f lib547$(EXEEXT)
- $(LINK) $(lib547_LDFLAGS) $(lib547_OBJECTS) $(lib547_LDADD) $(LIBS)
-lib548$(EXEEXT): $(lib548_OBJECTS) $(lib548_DEPENDENCIES)
- @rm -f lib548$(EXEEXT)
- $(LINK) $(lib548_LDFLAGS) $(lib548_OBJECTS) $(lib548_LDADD) $(LIBS)
-lib549$(EXEEXT): $(lib549_OBJECTS) $(lib549_DEPENDENCIES)
- @rm -f lib549$(EXEEXT)
- $(LINK) $(lib549_LDFLAGS) $(lib549_OBJECTS) $(lib549_LDADD) $(LIBS)
-lib552$(EXEEXT): $(lib552_OBJECTS) $(lib552_DEPENDENCIES)
- @rm -f lib552$(EXEEXT)
- $(LINK) $(lib552_LDFLAGS) $(lib552_OBJECTS) $(lib552_LDADD) $(LIBS)
-lib553$(EXEEXT): $(lib553_OBJECTS) $(lib553_DEPENDENCIES)
- @rm -f lib553$(EXEEXT)
- $(LINK) $(lib553_LDFLAGS) $(lib553_OBJECTS) $(lib553_LDADD) $(LIBS)
-lib554$(EXEEXT): $(lib554_OBJECTS) $(lib554_DEPENDENCIES)
- @rm -f lib554$(EXEEXT)
- $(LINK) $(lib554_LDFLAGS) $(lib554_OBJECTS) $(lib554_LDADD) $(LIBS)
-lib555$(EXEEXT): $(lib555_OBJECTS) $(lib555_DEPENDENCIES)
- @rm -f lib555$(EXEEXT)
- $(LINK) $(lib555_LDFLAGS) $(lib555_OBJECTS) $(lib555_LDADD) $(LIBS)
-lib556$(EXEEXT): $(lib556_OBJECTS) $(lib556_DEPENDENCIES)
- @rm -f lib556$(EXEEXT)
- $(LINK) $(lib556_LDFLAGS) $(lib556_OBJECTS) $(lib556_LDADD) $(LIBS)
-lib557$(EXEEXT): $(lib557_OBJECTS) $(lib557_DEPENDENCIES)
- @rm -f lib557$(EXEEXT)
- $(LINK) $(lib557_LDFLAGS) $(lib557_OBJECTS) $(lib557_LDADD) $(LIBS)
-lib558$(EXEEXT): $(lib558_OBJECTS) $(lib558_DEPENDENCIES)
- @rm -f lib558$(EXEEXT)
- $(LINK) $(lib558_LDFLAGS) $(lib558_OBJECTS) $(lib558_LDADD) $(LIBS)
-lib559$(EXEEXT): $(lib559_OBJECTS) $(lib559_DEPENDENCIES)
- @rm -f lib559$(EXEEXT)
- $(LINK) $(lib559_LDFLAGS) $(lib559_OBJECTS) $(lib559_LDADD) $(LIBS)
-lib560$(EXEEXT): $(lib560_OBJECTS) $(lib560_DEPENDENCIES)
- @rm -f lib560$(EXEEXT)
- $(LINK) $(lib560_LDFLAGS) $(lib560_OBJECTS) $(lib560_LDADD) $(LIBS)
-lib562$(EXEEXT): $(lib562_OBJECTS) $(lib562_DEPENDENCIES)
- @rm -f lib562$(EXEEXT)
- $(LINK) $(lib562_LDFLAGS) $(lib562_OBJECTS) $(lib562_LDADD) $(LIBS)
-lib564$(EXEEXT): $(lib564_OBJECTS) $(lib564_DEPENDENCIES)
- @rm -f lib564$(EXEEXT)
- $(LINK) $(lib564_LDFLAGS) $(lib564_OBJECTS) $(lib564_LDADD) $(LIBS)
-lib565$(EXEEXT): $(lib565_OBJECTS) $(lib565_DEPENDENCIES)
- @rm -f lib565$(EXEEXT)
- $(LINK) $(lib565_LDFLAGS) $(lib565_OBJECTS) $(lib565_LDADD) $(LIBS)
-lib566$(EXEEXT): $(lib566_OBJECTS) $(lib566_DEPENDENCIES)
- @rm -f lib566$(EXEEXT)
- $(LINK) $(lib566_LDFLAGS) $(lib566_OBJECTS) $(lib566_LDADD) $(LIBS)
-lib567$(EXEEXT): $(lib567_OBJECTS) $(lib567_DEPENDENCIES)
- @rm -f lib567$(EXEEXT)
- $(LINK) $(lib567_LDFLAGS) $(lib567_OBJECTS) $(lib567_LDADD) $(LIBS)
-lib568$(EXEEXT): $(lib568_OBJECTS) $(lib568_DEPENDENCIES)
- @rm -f lib568$(EXEEXT)
- $(LINK) $(lib568_LDFLAGS) $(lib568_OBJECTS) $(lib568_LDADD) $(LIBS)
-lib569$(EXEEXT): $(lib569_OBJECTS) $(lib569_DEPENDENCIES)
- @rm -f lib569$(EXEEXT)
- $(LINK) $(lib569_LDFLAGS) $(lib569_OBJECTS) $(lib569_LDADD) $(LIBS)
-lib570$(EXEEXT): $(lib570_OBJECTS) $(lib570_DEPENDENCIES)
- @rm -f lib570$(EXEEXT)
- $(LINK) $(lib570_LDFLAGS) $(lib570_OBJECTS) $(lib570_LDADD) $(LIBS)
-lib571$(EXEEXT): $(lib571_OBJECTS) $(lib571_DEPENDENCIES)
- @rm -f lib571$(EXEEXT)
- $(LINK) $(lib571_LDFLAGS) $(lib571_OBJECTS) $(lib571_LDADD) $(LIBS)
-lib572$(EXEEXT): $(lib572_OBJECTS) $(lib572_DEPENDENCIES)
- @rm -f lib572$(EXEEXT)
- $(LINK) $(lib572_LDFLAGS) $(lib572_OBJECTS) $(lib572_LDADD) $(LIBS)
-lib573$(EXEEXT): $(lib573_OBJECTS) $(lib573_DEPENDENCIES)
- @rm -f lib573$(EXEEXT)
- $(LINK) $(lib573_LDFLAGS) $(lib573_OBJECTS) $(lib573_LDADD) $(LIBS)
-lib574$(EXEEXT): $(lib574_OBJECTS) $(lib574_DEPENDENCIES)
- @rm -f lib574$(EXEEXT)
- $(LINK) $(lib574_LDFLAGS) $(lib574_OBJECTS) $(lib574_LDADD) $(LIBS)
-lib575$(EXEEXT): $(lib575_OBJECTS) $(lib575_DEPENDENCIES)
- @rm -f lib575$(EXEEXT)
- $(LINK) $(lib575_LDFLAGS) $(lib575_OBJECTS) $(lib575_LDADD) $(LIBS)
-lib576$(EXEEXT): $(lib576_OBJECTS) $(lib576_DEPENDENCIES)
- @rm -f lib576$(EXEEXT)
- $(LINK) $(lib576_LDFLAGS) $(lib576_OBJECTS) $(lib576_LDADD) $(LIBS)
-lib577$(EXEEXT): $(lib577_OBJECTS) $(lib577_DEPENDENCIES)
- @rm -f lib577$(EXEEXT)
- $(LINK) $(lib577_LDFLAGS) $(lib577_OBJECTS) $(lib577_LDADD) $(LIBS)
-lib578$(EXEEXT): $(lib578_OBJECTS) $(lib578_DEPENDENCIES)
- @rm -f lib578$(EXEEXT)
- $(LINK) $(lib578_LDFLAGS) $(lib578_OBJECTS) $(lib578_LDADD) $(LIBS)
-lib579$(EXEEXT): $(lib579_OBJECTS) $(lib579_DEPENDENCIES)
- @rm -f lib579$(EXEEXT)
- $(LINK) $(lib579_LDFLAGS) $(lib579_OBJECTS) $(lib579_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkhostname-chkhostname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkhostname-curl_gethostname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib501.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib502.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib503.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib504.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib505.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib506.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib507.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib508.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib510.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib511.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib512.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib513.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib514.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib515.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib516.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib517.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib518.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib519.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib520.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib521.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib523.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib524.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib525.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib526-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib526-lib526.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib526-testutil.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib527-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib527-lib526.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib527-testutil.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib529-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib529-lib525.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib529-testutil.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib530-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib530-lib530.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib530-testutil.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib532-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib532-lib526.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib532-testutil.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib533.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib536.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib537.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib539.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib540.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib541.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib542.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib543.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib544.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib545-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib545-lib544.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib547.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib548-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib548-lib547.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib549.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib552.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib553.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib554.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib555.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib556.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib557.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib558-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib558-lib558.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib559-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib559-lib558.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib560.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib562.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib564.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib565-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib565-lib510.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib566.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib567.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib568.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib569.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib570.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib571.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib572.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib573.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib574.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib575.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib576.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib577.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib578.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib579.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sethostname.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testutil.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-chkhostname-chkhostname.o: chkhostname.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -MT chkhostname-chkhostname.o -MD -MP -MF "$(DEPDIR)/chkhostname-chkhostname.Tpo" -c -o chkhostname-chkhostname.o `test -f 'chkhostname.c' || echo '$(srcdir)/'`chkhostname.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/chkhostname-chkhostname.Tpo" "$(DEPDIR)/chkhostname-chkhostname.Po"; else rm -f "$(DEPDIR)/chkhostname-chkhostname.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='chkhostname.c' object='chkhostname-chkhostname.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -c -o chkhostname-chkhostname.o `test -f 'chkhostname.c' || echo '$(srcdir)/'`chkhostname.c
-
-chkhostname-chkhostname.obj: chkhostname.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -MT chkhostname-chkhostname.obj -MD -MP -MF "$(DEPDIR)/chkhostname-chkhostname.Tpo" -c -o chkhostname-chkhostname.obj `if test -f 'chkhostname.c'; then $(CYGPATH_W) 'chkhostname.c'; else $(CYGPATH_W) '$(srcdir)/chkhostname.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/chkhostname-chkhostname.Tpo" "$(DEPDIR)/chkhostname-chkhostname.Po"; else rm -f "$(DEPDIR)/chkhostname-chkhostname.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='chkhostname.c' object='chkhostname-chkhostname.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -c -o chkhostname-chkhostname.obj `if test -f 'chkhostname.c'; then $(CYGPATH_W) 'chkhostname.c'; else $(CYGPATH_W) '$(srcdir)/chkhostname.c'; fi`
-
-chkhostname-curl_gethostname.o: $(top_srcdir)/lib/curl_gethostname.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -MT chkhostname-curl_gethostname.o -MD -MP -MF "$(DEPDIR)/chkhostname-curl_gethostname.Tpo" -c -o chkhostname-curl_gethostname.o `test -f '$(top_srcdir)/lib/curl_gethostname.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/curl_gethostname.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/chkhostname-curl_gethostname.Tpo" "$(DEPDIR)/chkhostname-curl_gethostname.Po"; else rm -f "$(DEPDIR)/chkhostname-curl_gethostname.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/curl_gethostname.c' object='chkhostname-curl_gethostname.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -c -o chkhostname-curl_gethostname.o `test -f '$(top_srcdir)/lib/curl_gethostname.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/curl_gethostname.c
-
-chkhostname-curl_gethostname.obj: $(top_srcdir)/lib/curl_gethostname.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -MT chkhostname-curl_gethostname.obj -MD -MP -MF "$(DEPDIR)/chkhostname-curl_gethostname.Tpo" -c -o chkhostname-curl_gethostname.obj `if test -f '$(top_srcdir)/lib/curl_gethostname.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/curl_gethostname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/curl_gethostname.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/chkhostname-curl_gethostname.Tpo" "$(DEPDIR)/chkhostname-curl_gethostname.Po"; else rm -f "$(DEPDIR)/chkhostname-curl_gethostname.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/curl_gethostname.c' object='chkhostname-curl_gethostname.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -c -o chkhostname-curl_gethostname.obj `if test -f '$(top_srcdir)/lib/curl_gethostname.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/curl_gethostname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/curl_gethostname.c'; fi`
-
-lib526-lib526.o: lib526.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-lib526.o -MD -MP -MF "$(DEPDIR)/lib526-lib526.Tpo" -c -o lib526-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib526-lib526.Tpo" "$(DEPDIR)/lib526-lib526.Po"; else rm -f "$(DEPDIR)/lib526-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib526.c' object='lib526-lib526.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
-
-lib526-lib526.obj: lib526.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-lib526.obj -MD -MP -MF "$(DEPDIR)/lib526-lib526.Tpo" -c -o lib526-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib526-lib526.Tpo" "$(DEPDIR)/lib526-lib526.Po"; else rm -f "$(DEPDIR)/lib526-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib526.c' object='lib526-lib526.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
-
-lib526-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-first.o -MD -MP -MF "$(DEPDIR)/lib526-first.Tpo" -c -o lib526-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib526-first.Tpo" "$(DEPDIR)/lib526-first.Po"; else rm -f "$(DEPDIR)/lib526-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib526-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib526-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-first.obj -MD -MP -MF "$(DEPDIR)/lib526-first.Tpo" -c -o lib526-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib526-first.Tpo" "$(DEPDIR)/lib526-first.Po"; else rm -f "$(DEPDIR)/lib526-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib526-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-lib526-testutil.o: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-testutil.o -MD -MP -MF "$(DEPDIR)/lib526-testutil.Tpo" -c -o lib526-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib526-testutil.Tpo" "$(DEPDIR)/lib526-testutil.Po"; else rm -f "$(DEPDIR)/lib526-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib526-testutil.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
-
-lib526-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-testutil.obj -MD -MP -MF "$(DEPDIR)/lib526-testutil.Tpo" -c -o lib526-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib526-testutil.Tpo" "$(DEPDIR)/lib526-testutil.Po"; else rm -f "$(DEPDIR)/lib526-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib526-testutil.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
-
-lib527-lib526.o: lib526.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-lib526.o -MD -MP -MF "$(DEPDIR)/lib527-lib526.Tpo" -c -o lib527-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib527-lib526.Tpo" "$(DEPDIR)/lib527-lib526.Po"; else rm -f "$(DEPDIR)/lib527-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib526.c' object='lib527-lib526.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
-
-lib527-lib526.obj: lib526.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-lib526.obj -MD -MP -MF "$(DEPDIR)/lib527-lib526.Tpo" -c -o lib527-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib527-lib526.Tpo" "$(DEPDIR)/lib527-lib526.Po"; else rm -f "$(DEPDIR)/lib527-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib526.c' object='lib527-lib526.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
-
-lib527-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-first.o -MD -MP -MF "$(DEPDIR)/lib527-first.Tpo" -c -o lib527-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib527-first.Tpo" "$(DEPDIR)/lib527-first.Po"; else rm -f "$(DEPDIR)/lib527-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib527-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib527-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-first.obj -MD -MP -MF "$(DEPDIR)/lib527-first.Tpo" -c -o lib527-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib527-first.Tpo" "$(DEPDIR)/lib527-first.Po"; else rm -f "$(DEPDIR)/lib527-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib527-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-lib527-testutil.o: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-testutil.o -MD -MP -MF "$(DEPDIR)/lib527-testutil.Tpo" -c -o lib527-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib527-testutil.Tpo" "$(DEPDIR)/lib527-testutil.Po"; else rm -f "$(DEPDIR)/lib527-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib527-testutil.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
-
-lib527-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-testutil.obj -MD -MP -MF "$(DEPDIR)/lib527-testutil.Tpo" -c -o lib527-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib527-testutil.Tpo" "$(DEPDIR)/lib527-testutil.Po"; else rm -f "$(DEPDIR)/lib527-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib527-testutil.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
-
-lib529-lib525.o: lib525.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-lib525.o -MD -MP -MF "$(DEPDIR)/lib529-lib525.Tpo" -c -o lib529-lib525.o `test -f 'lib525.c' || echo '$(srcdir)/'`lib525.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib529-lib525.Tpo" "$(DEPDIR)/lib529-lib525.Po"; else rm -f "$(DEPDIR)/lib529-lib525.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib525.c' object='lib529-lib525.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-lib525.o `test -f 'lib525.c' || echo '$(srcdir)/'`lib525.c
-
-lib529-lib525.obj: lib525.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-lib525.obj -MD -MP -MF "$(DEPDIR)/lib529-lib525.Tpo" -c -o lib529-lib525.obj `if test -f 'lib525.c'; then $(CYGPATH_W) 'lib525.c'; else $(CYGPATH_W) '$(srcdir)/lib525.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib529-lib525.Tpo" "$(DEPDIR)/lib529-lib525.Po"; else rm -f "$(DEPDIR)/lib529-lib525.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib525.c' object='lib529-lib525.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-lib525.obj `if test -f 'lib525.c'; then $(CYGPATH_W) 'lib525.c'; else $(CYGPATH_W) '$(srcdir)/lib525.c'; fi`
-
-lib529-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-first.o -MD -MP -MF "$(DEPDIR)/lib529-first.Tpo" -c -o lib529-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib529-first.Tpo" "$(DEPDIR)/lib529-first.Po"; else rm -f "$(DEPDIR)/lib529-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib529-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib529-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-first.obj -MD -MP -MF "$(DEPDIR)/lib529-first.Tpo" -c -o lib529-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib529-first.Tpo" "$(DEPDIR)/lib529-first.Po"; else rm -f "$(DEPDIR)/lib529-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib529-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-lib529-testutil.o: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-testutil.o -MD -MP -MF "$(DEPDIR)/lib529-testutil.Tpo" -c -o lib529-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib529-testutil.Tpo" "$(DEPDIR)/lib529-testutil.Po"; else rm -f "$(DEPDIR)/lib529-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib529-testutil.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
-
-lib529-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-testutil.obj -MD -MP -MF "$(DEPDIR)/lib529-testutil.Tpo" -c -o lib529-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib529-testutil.Tpo" "$(DEPDIR)/lib529-testutil.Po"; else rm -f "$(DEPDIR)/lib529-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib529-testutil.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
-
-lib530-lib530.o: lib530.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-lib530.o -MD -MP -MF "$(DEPDIR)/lib530-lib530.Tpo" -c -o lib530-lib530.o `test -f 'lib530.c' || echo '$(srcdir)/'`lib530.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib530-lib530.Tpo" "$(DEPDIR)/lib530-lib530.Po"; else rm -f "$(DEPDIR)/lib530-lib530.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib530.c' object='lib530-lib530.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-lib530.o `test -f 'lib530.c' || echo '$(srcdir)/'`lib530.c
-
-lib530-lib530.obj: lib530.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-lib530.obj -MD -MP -MF "$(DEPDIR)/lib530-lib530.Tpo" -c -o lib530-lib530.obj `if test -f 'lib530.c'; then $(CYGPATH_W) 'lib530.c'; else $(CYGPATH_W) '$(srcdir)/lib530.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib530-lib530.Tpo" "$(DEPDIR)/lib530-lib530.Po"; else rm -f "$(DEPDIR)/lib530-lib530.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib530.c' object='lib530-lib530.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-lib530.obj `if test -f 'lib530.c'; then $(CYGPATH_W) 'lib530.c'; else $(CYGPATH_W) '$(srcdir)/lib530.c'; fi`
-
-lib530-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-first.o -MD -MP -MF "$(DEPDIR)/lib530-first.Tpo" -c -o lib530-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib530-first.Tpo" "$(DEPDIR)/lib530-first.Po"; else rm -f "$(DEPDIR)/lib530-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib530-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib530-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-first.obj -MD -MP -MF "$(DEPDIR)/lib530-first.Tpo" -c -o lib530-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib530-first.Tpo" "$(DEPDIR)/lib530-first.Po"; else rm -f "$(DEPDIR)/lib530-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib530-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-lib530-testutil.o: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-testutil.o -MD -MP -MF "$(DEPDIR)/lib530-testutil.Tpo" -c -o lib530-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib530-testutil.Tpo" "$(DEPDIR)/lib530-testutil.Po"; else rm -f "$(DEPDIR)/lib530-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib530-testutil.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
-
-lib530-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-testutil.obj -MD -MP -MF "$(DEPDIR)/lib530-testutil.Tpo" -c -o lib530-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib530-testutil.Tpo" "$(DEPDIR)/lib530-testutil.Po"; else rm -f "$(DEPDIR)/lib530-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib530-testutil.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
-
-lib532-lib526.o: lib526.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-lib526.o -MD -MP -MF "$(DEPDIR)/lib532-lib526.Tpo" -c -o lib532-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib532-lib526.Tpo" "$(DEPDIR)/lib532-lib526.Po"; else rm -f "$(DEPDIR)/lib532-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib526.c' object='lib532-lib526.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
-
-lib532-lib526.obj: lib526.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-lib526.obj -MD -MP -MF "$(DEPDIR)/lib532-lib526.Tpo" -c -o lib532-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib532-lib526.Tpo" "$(DEPDIR)/lib532-lib526.Po"; else rm -f "$(DEPDIR)/lib532-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib526.c' object='lib532-lib526.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
-
-lib532-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-first.o -MD -MP -MF "$(DEPDIR)/lib532-first.Tpo" -c -o lib532-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib532-first.Tpo" "$(DEPDIR)/lib532-first.Po"; else rm -f "$(DEPDIR)/lib532-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib532-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib532-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-first.obj -MD -MP -MF "$(DEPDIR)/lib532-first.Tpo" -c -o lib532-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib532-first.Tpo" "$(DEPDIR)/lib532-first.Po"; else rm -f "$(DEPDIR)/lib532-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib532-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-lib532-testutil.o: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-testutil.o -MD -MP -MF "$(DEPDIR)/lib532-testutil.Tpo" -c -o lib532-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib532-testutil.Tpo" "$(DEPDIR)/lib532-testutil.Po"; else rm -f "$(DEPDIR)/lib532-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib532-testutil.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
-
-lib532-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-testutil.obj -MD -MP -MF "$(DEPDIR)/lib532-testutil.Tpo" -c -o lib532-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib532-testutil.Tpo" "$(DEPDIR)/lib532-testutil.Po"; else rm -f "$(DEPDIR)/lib532-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutil.c' object='lib532-testutil.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
-
-lib545-lib544.o: lib544.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -MT lib545-lib544.o -MD -MP -MF "$(DEPDIR)/lib545-lib544.Tpo" -c -o lib545-lib544.o `test -f 'lib544.c' || echo '$(srcdir)/'`lib544.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib545-lib544.Tpo" "$(DEPDIR)/lib545-lib544.Po"; else rm -f "$(DEPDIR)/lib545-lib544.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib544.c' object='lib545-lib544.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -c -o lib545-lib544.o `test -f 'lib544.c' || echo '$(srcdir)/'`lib544.c
-
-lib545-lib544.obj: lib544.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -MT lib545-lib544.obj -MD -MP -MF "$(DEPDIR)/lib545-lib544.Tpo" -c -o lib545-lib544.obj `if test -f 'lib544.c'; then $(CYGPATH_W) 'lib544.c'; else $(CYGPATH_W) '$(srcdir)/lib544.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib545-lib544.Tpo" "$(DEPDIR)/lib545-lib544.Po"; else rm -f "$(DEPDIR)/lib545-lib544.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib544.c' object='lib545-lib544.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -c -o lib545-lib544.obj `if test -f 'lib544.c'; then $(CYGPATH_W) 'lib544.c'; else $(CYGPATH_W) '$(srcdir)/lib544.c'; fi`
-
-lib545-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -MT lib545-first.o -MD -MP -MF "$(DEPDIR)/lib545-first.Tpo" -c -o lib545-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib545-first.Tpo" "$(DEPDIR)/lib545-first.Po"; else rm -f "$(DEPDIR)/lib545-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib545-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -c -o lib545-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib545-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -MT lib545-first.obj -MD -MP -MF "$(DEPDIR)/lib545-first.Tpo" -c -o lib545-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib545-first.Tpo" "$(DEPDIR)/lib545-first.Po"; else rm -f "$(DEPDIR)/lib545-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib545-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -c -o lib545-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-lib548-lib547.o: lib547.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -MT lib548-lib547.o -MD -MP -MF "$(DEPDIR)/lib548-lib547.Tpo" -c -o lib548-lib547.o `test -f 'lib547.c' || echo '$(srcdir)/'`lib547.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib548-lib547.Tpo" "$(DEPDIR)/lib548-lib547.Po"; else rm -f "$(DEPDIR)/lib548-lib547.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib547.c' object='lib548-lib547.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -c -o lib548-lib547.o `test -f 'lib547.c' || echo '$(srcdir)/'`lib547.c
-
-lib548-lib547.obj: lib547.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -MT lib548-lib547.obj -MD -MP -MF "$(DEPDIR)/lib548-lib547.Tpo" -c -o lib548-lib547.obj `if test -f 'lib547.c'; then $(CYGPATH_W) 'lib547.c'; else $(CYGPATH_W) '$(srcdir)/lib547.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib548-lib547.Tpo" "$(DEPDIR)/lib548-lib547.Po"; else rm -f "$(DEPDIR)/lib548-lib547.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib547.c' object='lib548-lib547.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -c -o lib548-lib547.obj `if test -f 'lib547.c'; then $(CYGPATH_W) 'lib547.c'; else $(CYGPATH_W) '$(srcdir)/lib547.c'; fi`
-
-lib548-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -MT lib548-first.o -MD -MP -MF "$(DEPDIR)/lib548-first.Tpo" -c -o lib548-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib548-first.Tpo" "$(DEPDIR)/lib548-first.Po"; else rm -f "$(DEPDIR)/lib548-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib548-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -c -o lib548-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib548-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -MT lib548-first.obj -MD -MP -MF "$(DEPDIR)/lib548-first.Tpo" -c -o lib548-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib548-first.Tpo" "$(DEPDIR)/lib548-first.Po"; else rm -f "$(DEPDIR)/lib548-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib548-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -c -o lib548-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-lib558-lib558.o: lib558.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -MT lib558-lib558.o -MD -MP -MF "$(DEPDIR)/lib558-lib558.Tpo" -c -o lib558-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib558-lib558.Tpo" "$(DEPDIR)/lib558-lib558.Po"; else rm -f "$(DEPDIR)/lib558-lib558.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib558.c' object='lib558-lib558.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -c -o lib558-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c
-
-lib558-lib558.obj: lib558.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -MT lib558-lib558.obj -MD -MP -MF "$(DEPDIR)/lib558-lib558.Tpo" -c -o lib558-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib558-lib558.Tpo" "$(DEPDIR)/lib558-lib558.Po"; else rm -f "$(DEPDIR)/lib558-lib558.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib558.c' object='lib558-lib558.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -c -o lib558-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`
-
-lib558-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -MT lib558-first.o -MD -MP -MF "$(DEPDIR)/lib558-first.Tpo" -c -o lib558-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib558-first.Tpo" "$(DEPDIR)/lib558-first.Po"; else rm -f "$(DEPDIR)/lib558-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib558-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -c -o lib558-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib558-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -MT lib558-first.obj -MD -MP -MF "$(DEPDIR)/lib558-first.Tpo" -c -o lib558-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib558-first.Tpo" "$(DEPDIR)/lib558-first.Po"; else rm -f "$(DEPDIR)/lib558-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib558-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -c -o lib558-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-lib559-lib558.o: lib558.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -MT lib559-lib558.o -MD -MP -MF "$(DEPDIR)/lib559-lib558.Tpo" -c -o lib559-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib559-lib558.Tpo" "$(DEPDIR)/lib559-lib558.Po"; else rm -f "$(DEPDIR)/lib559-lib558.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib558.c' object='lib559-lib558.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -c -o lib559-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c
-
-lib559-lib558.obj: lib558.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -MT lib559-lib558.obj -MD -MP -MF "$(DEPDIR)/lib559-lib558.Tpo" -c -o lib559-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib559-lib558.Tpo" "$(DEPDIR)/lib559-lib558.Po"; else rm -f "$(DEPDIR)/lib559-lib558.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib558.c' object='lib559-lib558.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -c -o lib559-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`
-
-lib559-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -MT lib559-first.o -MD -MP -MF "$(DEPDIR)/lib559-first.Tpo" -c -o lib559-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib559-first.Tpo" "$(DEPDIR)/lib559-first.Po"; else rm -f "$(DEPDIR)/lib559-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib559-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -c -o lib559-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib559-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -MT lib559-first.obj -MD -MP -MF "$(DEPDIR)/lib559-first.Tpo" -c -o lib559-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib559-first.Tpo" "$(DEPDIR)/lib559-first.Po"; else rm -f "$(DEPDIR)/lib559-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib559-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -c -o lib559-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-lib565-lib510.o: lib510.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -MT lib565-lib510.o -MD -MP -MF "$(DEPDIR)/lib565-lib510.Tpo" -c -o lib565-lib510.o `test -f 'lib510.c' || echo '$(srcdir)/'`lib510.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib565-lib510.Tpo" "$(DEPDIR)/lib565-lib510.Po"; else rm -f "$(DEPDIR)/lib565-lib510.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib510.c' object='lib565-lib510.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -c -o lib565-lib510.o `test -f 'lib510.c' || echo '$(srcdir)/'`lib510.c
-
-lib565-lib510.obj: lib510.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -MT lib565-lib510.obj -MD -MP -MF "$(DEPDIR)/lib565-lib510.Tpo" -c -o lib565-lib510.obj `if test -f 'lib510.c'; then $(CYGPATH_W) 'lib510.c'; else $(CYGPATH_W) '$(srcdir)/lib510.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib565-lib510.Tpo" "$(DEPDIR)/lib565-lib510.Po"; else rm -f "$(DEPDIR)/lib565-lib510.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib510.c' object='lib565-lib510.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -c -o lib565-lib510.obj `if test -f 'lib510.c'; then $(CYGPATH_W) 'lib510.c'; else $(CYGPATH_W) '$(srcdir)/lib510.c'; fi`
-
-lib565-first.o: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -MT lib565-first.o -MD -MP -MF "$(DEPDIR)/lib565-first.Tpo" -c -o lib565-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib565-first.Tpo" "$(DEPDIR)/lib565-first.Po"; else rm -f "$(DEPDIR)/lib565-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib565-first.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -c -o lib565-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
-
-lib565-first.obj: first.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -MT lib565-first.obj -MD -MP -MF "$(DEPDIR)/lib565-first.Tpo" -c -o lib565-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib565-first.Tpo" "$(DEPDIR)/lib565-first.Po"; else rm -f "$(DEPDIR)/lib565-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='first.c' object='lib565-first.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -c -o lib565-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
- clean-noinstPROGRAMS mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
- ctags distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index a0f1c0ec..78d53137 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -1,166 +1,393 @@
# files used only in some libcurl test programs
TESTUTIL = testutil.c testutil.h
+# files used only in some libcurl test programs
+TSTTRACE = testtrace.c testtrace.h
+
+# files used only in some libcurl test programs
+WARNLESS = ../../lib/warnless.c ../../lib/warnless.h
+
# these files are used in every single test program below
SUPPORTFILES = first.c test.h
# These are all libcurl test programs
-noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506 \
- lib507 lib508 lib510 lib511 lib512 lib513 lib514 lib515 lib516 \
- lib517 lib518 lib519 lib520 lib521 lib523 lib524 lib525 lib526 lib527 \
- lib574 lib575 lib576 lib577 lib578 lib579 \
- lib529 lib530 lib532 lib533 lib536 lib537 lib540 lib541 lib542 lib543 \
- lib544 lib545 lib547 lib548 lib549 lib552 lib553 lib554 lib555 lib556 \
- lib539 lib557 lib558 lib559 lib560 lib562 lib564 lib565 lib566 lib567 \
- lib568 lib569 lib570 lib571 lib572 lib573 chkhostname
-
-chkhostname_SOURCES = chkhostname.c $(top_srcdir)/lib/curl_gethostname.c
+noinst_PROGRAMS = chkhostname libauthretry libntlmconnect \
+ lib500 lib501 lib502 lib503 lib504 lib505 lib506 lib507 lib508 lib509 \
+ lib510 lib511 lib512 lib513 lib514 lib515 lib516 lib517 lib518 lib519 \
+ lib520 lib521 lib523 lib524 lib525 lib526 lib527 lib529 lib530 lib532 \
+ lib533 lib536 lib537 lib539 lib540 lib541 lib542 lib543 lib544 lib545 \
+ lib547 lib548 lib549 lib552 lib553 lib554 lib555 lib556 lib557 lib558 \
+ lib560 lib562 lib564 lib565 lib566 lib567 lib568 lib569 lib570 \
+ lib571 lib572 lib573 lib574 lib575 lib576 lib578 lib579 lib582 \
+ 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 lib1530 \
+ lib1900 \
+ lib2033
+
+chkhostname_SOURCES = chkhostname.c ../../lib/curl_gethostname.c
chkhostname_LDADD = @CURL_NETWORK_LIBS@
chkhostname_DEPENDENCIES =
-chkhostname_CFLAGS = $(AM_CFLAGS)
+chkhostname_CPPFLAGS = $(AM_CPPFLAGS)
-lib500_SOURCES = lib500.c $(SUPPORTFILES)
+libntlmconnect_SOURCES = libntlmconnect.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+libntlmconnect_LDADD = $(TESTUTIL_LIBS)
+libntlmconnect_CPPFLAGS = $(AM_CPPFLAGS)
+
+libauthretry_SOURCES = libauthretry.c $(SUPPORTFILES)
+libauthretry_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib500_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE)
+lib500_LDADD = $(TESTUTIL_LIBS)
+lib500_CPPFLAGS = $(AM_CPPFLAGS)
lib501_SOURCES = lib501.c $(SUPPORTFILES)
+lib501_CPPFLAGS = $(AM_CPPFLAGS)
-lib502_SOURCES = lib502.c $(SUPPORTFILES) $(TESTUTIL)
+lib502_SOURCES = lib502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib502_LDADD = $(TESTUTIL_LIBS)
+lib502_CPPFLAGS = $(AM_CPPFLAGS)
-lib503_SOURCES = lib503.c $(SUPPORTFILES) $(TESTUTIL)
+lib503_SOURCES = lib503.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib503_LDADD = $(TESTUTIL_LIBS)
+lib503_CPPFLAGS = $(AM_CPPFLAGS)
-lib504_SOURCES = lib504.c $(SUPPORTFILES) $(TESTUTIL)
+lib504_SOURCES = lib504.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib504_LDADD = $(TESTUTIL_LIBS)
+lib504_CPPFLAGS = $(AM_CPPFLAGS)
lib505_SOURCES = lib505.c $(SUPPORTFILES)
+lib505_CPPFLAGS = $(AM_CPPFLAGS)
lib506_SOURCES = lib506.c $(SUPPORTFILES)
+lib506_CPPFLAGS = $(AM_CPPFLAGS)
-lib507_SOURCES = lib507.c $(SUPPORTFILES) $(TESTUTIL)
+lib507_SOURCES = lib507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib507_LDADD = $(TESTUTIL_LIBS)
+lib507_CPPFLAGS = $(AM_CPPFLAGS)
lib508_SOURCES = lib508.c $(SUPPORTFILES)
+lib508_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib509_SOURCES = lib509.c $(SUPPORTFILES)
+lib509_CPPFLAGS = $(AM_CPPFLAGS)
lib510_SOURCES = lib510.c $(SUPPORTFILES)
+lib510_CPPFLAGS = $(AM_CPPFLAGS)
lib511_SOURCES = lib511.c $(SUPPORTFILES)
+lib511_CPPFLAGS = $(AM_CPPFLAGS)
lib512_SOURCES = lib512.c $(SUPPORTFILES)
+lib512_CPPFLAGS = $(AM_CPPFLAGS)
lib513_SOURCES = lib513.c $(SUPPORTFILES)
+lib513_CPPFLAGS = $(AM_CPPFLAGS)
lib514_SOURCES = lib514.c $(SUPPORTFILES)
+lib514_CPPFLAGS = $(AM_CPPFLAGS)
lib515_SOURCES = lib515.c $(SUPPORTFILES)
+lib515_CPPFLAGS = $(AM_CPPFLAGS)
lib516_SOURCES = lib516.c $(SUPPORTFILES)
+lib516_CPPFLAGS = $(AM_CPPFLAGS)
lib517_SOURCES = lib517.c $(SUPPORTFILES)
+lib517_CPPFLAGS = $(AM_CPPFLAGS)
-lib518_SOURCES = lib518.c $(SUPPORTFILES)
+lib518_SOURCES = lib518.c $(SUPPORTFILES) $(WARNLESS)
+lib518_CPPFLAGS = $(AM_CPPFLAGS)
lib519_SOURCES = lib519.c $(SUPPORTFILES)
+lib519_CPPFLAGS = $(AM_CPPFLAGS)
lib520_SOURCES = lib520.c $(SUPPORTFILES)
+lib520_CPPFLAGS = $(AM_CPPFLAGS)
lib521_SOURCES = lib521.c $(SUPPORTFILES)
+lib521_CPPFLAGS = $(AM_CPPFLAGS)
lib523_SOURCES = lib523.c $(SUPPORTFILES)
+lib523_CPPFLAGS = $(AM_CPPFLAGS)
lib524_SOURCES = lib524.c $(SUPPORTFILES)
+lib524_CPPFLAGS = $(AM_CPPFLAGS)
-lib525_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL)
+lib525_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib525_LDADD = $(TESTUTIL_LIBS)
+lib525_CPPFLAGS = $(AM_CPPFLAGS)
-lib526_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib526_CFLAGS = -DLIB526
+lib526_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib526_LDADD = $(TESTUTIL_LIBS)
+lib526_CPPFLAGS = $(AM_CPPFLAGS) -DLIB526
-lib527_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib527_CFLAGS = -DLIB527
+lib527_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib527_LDADD = $(TESTUTIL_LIBS)
+lib527_CPPFLAGS = $(AM_CPPFLAGS) -DLIB527
-lib529_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL)
-lib529_CFLAGS = -DLIB529
+lib529_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib529_LDADD = $(TESTUTIL_LIBS)
+lib529_CPPFLAGS = $(AM_CPPFLAGS) -DLIB529
-lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL)
-lib530_CFLAGS = -DLIB530
+lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib530_LDADD = $(TESTUTIL_LIBS)
+lib530_CPPFLAGS = $(AM_CPPFLAGS) -DLIB530
-lib532_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib532_CFLAGS = -DLIB532
+lib532_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib532_LDADD = $(TESTUTIL_LIBS)
+lib532_CPPFLAGS = $(AM_CPPFLAGS) -DLIB532
-lib533_SOURCES = lib533.c $(SUPPORTFILES) $(TESTUTIL)
+lib533_SOURCES = lib533.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib533_LDADD = $(TESTUTIL_LIBS)
+lib533_CPPFLAGS = $(AM_CPPFLAGS)
-lib536_SOURCES = lib536.c $(SUPPORTFILES) $(TESTUTIL)
+lib536_SOURCES = lib536.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib536_LDADD = $(TESTUTIL_LIBS)
+lib536_CPPFLAGS = $(AM_CPPFLAGS)
-lib537_SOURCES = lib537.c $(SUPPORTFILES)
+lib537_SOURCES = lib537.c $(SUPPORTFILES) $(WARNLESS)
+lib537_CPPFLAGS = $(AM_CPPFLAGS)
lib539_SOURCES = lib539.c $(SUPPORTFILES)
+lib539_CPPFLAGS = $(AM_CPPFLAGS)
-lib540_SOURCES = lib540.c $(SUPPORTFILES)
+lib540_SOURCES = lib540.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib540_LDADD = $(TESTUTIL_LIBS)
+lib540_CPPFLAGS = $(AM_CPPFLAGS)
lib541_SOURCES = lib541.c $(SUPPORTFILES)
+lib541_CPPFLAGS = $(AM_CPPFLAGS)
lib542_SOURCES = lib542.c $(SUPPORTFILES)
+lib542_CPPFLAGS = $(AM_CPPFLAGS)
lib543_SOURCES = lib543.c $(SUPPORTFILES)
+lib543_CPPFLAGS = $(AM_CPPFLAGS)
lib544_SOURCES = lib544.c $(SUPPORTFILES)
+lib544_CPPFLAGS = $(AM_CPPFLAGS)
lib545_SOURCES = lib544.c $(SUPPORTFILES)
-lib545_CFLAGS = -DLIB545
+lib545_CPPFLAGS = $(AM_CPPFLAGS) -DLIB545
lib547_SOURCES = lib547.c $(SUPPORTFILES)
+lib547_CPPFLAGS = $(AM_CPPFLAGS)
lib548_SOURCES = lib547.c $(SUPPORTFILES)
-lib548_CFLAGS = -DLIB548
+lib548_CPPFLAGS = $(AM_CPPFLAGS) -DLIB548
lib549_SOURCES = lib549.c $(SUPPORTFILES)
+lib549_CPPFLAGS = $(AM_CPPFLAGS)
-lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL)
-
-lib552_SOURCES = lib552.c $(SUPPORTFILES)
+lib552_SOURCES = lib552.c $(SUPPORTFILES) $(WARNLESS)
+lib552_CPPFLAGS = $(AM_CPPFLAGS)
lib553_SOURCES = lib553.c $(SUPPORTFILES)
+lib553_CPPFLAGS = $(AM_CPPFLAGS)
lib554_SOURCES = lib554.c $(SUPPORTFILES)
+lib554_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib555_LDADD = $(TESTUTIL_LIBS)
+lib555_CPPFLAGS = $(AM_CPPFLAGS)
-lib556_SOURCES = lib556.c $(SUPPORTFILES)
+lib556_SOURCES = lib556.c $(SUPPORTFILES) $(WARNLESS)
+lib556_CPPFLAGS = $(AM_CPPFLAGS)
lib557_SOURCES = lib557.c $(SUPPORTFILES)
+lib557_CPPFLAGS = $(AM_CPPFLAGS)
lib558_SOURCES = lib558.c $(SUPPORTFILES)
-lib558_CFLAGS = -DLIB558
-
-lib559_SOURCES = lib558.c $(SUPPORTFILES)
-lib559_CFLAGS = -DLIB559
-
-lib560_SOURCES = lib560.c $(SUPPORTFILES)
-
-lib574_SOURCES = lib574.c $(SUPPORTFILES)
-
-lib575_SOURCES = lib575.c $(SUPPORTFILES)
+lib558_CPPFLAGS = $(AM_CPPFLAGS)
-lib576_SOURCES = lib576.c $(SUPPORTFILES)
-
-lib577_SOURCES = lib577.c $(SUPPORTFILES)
+lib560_SOURCES = lib560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib560_LDADD = $(TESTUTIL_LIBS)
+lib560_CPPFLAGS = $(AM_CPPFLAGS)
lib562_SOURCES = lib562.c $(SUPPORTFILES)
+lib562_CPPFLAGS = $(AM_CPPFLAGS)
-lib564_SOURCES = lib564.c $(SUPPORTFILES) $(TESTUTIL)
+lib564_SOURCES = lib564.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib564_LDADD = $(TESTUTIL_LIBS)
+lib564_CPPFLAGS = $(AM_CPPFLAGS)
lib565_SOURCES = lib510.c $(SUPPORTFILES)
-lib565_CFLAGS = -DLIB565
+lib565_CPPFLAGS = $(AM_CPPFLAGS) -DLIB565
lib566_SOURCES = lib566.c $(SUPPORTFILES)
+lib566_CPPFLAGS = $(AM_CPPFLAGS)
lib567_SOURCES = lib567.c $(SUPPORTFILES)
+lib567_CPPFLAGS = $(AM_CPPFLAGS)
lib568_SOURCES = lib568.c $(SUPPORTFILES)
+lib568_CPPFLAGS = $(AM_CPPFLAGS)
lib569_SOURCES = lib569.c $(SUPPORTFILES)
+lib569_CPPFLAGS = $(AM_CPPFLAGS)
lib570_SOURCES = lib570.c $(SUPPORTFILES)
+lib570_CPPFLAGS = $(AM_CPPFLAGS)
-lib571_SOURCES = lib571.c $(SUPPORTFILES)
+lib571_SOURCES = lib571.c $(SUPPORTFILES) $(WARNLESS)
+lib571_CPPFLAGS = $(AM_CPPFLAGS)
lib572_SOURCES = lib572.c $(SUPPORTFILES)
+lib572_CPPFLAGS = $(AM_CPPFLAGS)
-lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL)
+lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(TSTTRACE)
+lib573_LDADD = $(TESTUTIL_LIBS)
+lib573_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib574_SOURCES = lib574.c $(SUPPORTFILES)
+lib574_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib575_SOURCES = lib575.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib575_LDADD = $(TESTUTIL_LIBS)
+lib575_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib576_SOURCES = lib576.c $(SUPPORTFILES)
+lib576_CPPFLAGS = $(AM_CPPFLAGS)
lib578_SOURCES = lib578.c $(SUPPORTFILES)
+lib578_CPPFLAGS = $(AM_CPPFLAGS)
lib579_SOURCES = lib579.c $(SUPPORTFILES)
+lib579_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib582_SOURCES = lib582.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib582_LDADD = $(TESTUTIL_LIBS)
+lib582_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib583_SOURCES = lib583.c $(SUPPORTFILES)
+lib583_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib585_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE)
+lib585_LDADD = $(TESTUTIL_LIBS)
+lib585_CPPFLAGS = $(AM_CPPFLAGS) -DLIB585
+
+lib586_SOURCES = lib586.c $(SUPPORTFILES)
+lib586_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib587_SOURCES = lib554.c $(SUPPORTFILES)
+lib587_CPPFLAGS = $(AM_CPPFLAGS) -DLIB587
+
+lib590_SOURCES = lib590.c $(SUPPORTFILES)
+lib590_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib591_SOURCES = lib591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib591_LDADD = $(TESTUTIL_LIBS)
+lib591_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib597_SOURCES = lib597.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib597_LDADD = $(TESTUTIL_LIBS)
+lib597_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib598_SOURCES = lib598.c $(SUPPORTFILES)
+lib598_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib599_SOURCES = lib599.c $(SUPPORTFILES)
+lib599_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1500_SOURCES = lib1500.c $(SUPPORTFILES) $(TESTUTIL)
+lib1500_LDADD = $(TESTUTIL_LIBS)
+lib1500_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1501_SOURCES = lib1501.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1501_LDADD = $(TESTUTIL_LIBS)
+lib1501_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1502_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1502_LDADD = $(TESTUTIL_LIBS)
+lib1502_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1502
+
+lib1503_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1503_LDADD = $(TESTUTIL_LIBS)
+lib1503_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1503
+
+lib1504_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1504_LDADD = $(TESTUTIL_LIBS)
+lib1504_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1504
+
+lib1505_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1505_LDADD = $(TESTUTIL_LIBS)
+lib1505_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1505
+
+lib1506_SOURCES = lib1506.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1506_LDADD = $(TESTUTIL_LIBS)
+lib1506_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1506
+
+lib1507_SOURCES = lib1507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1507_LDADD = $(TESTUTIL_LIBS)
+lib1507_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1507
+
+lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1508_LDADD = $(TESTUTIL_LIBS)
+lib1508_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1508
+
+lib1509_SOURCES = lib1509.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1509_LDADD = $(TESTUTIL_LIBS)
+lib1509_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1509
+
+lib1510_SOURCES = lib1510.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1510_LDADD = $(TESTUTIL_LIBS)
+lib1510_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1510
+
+lib1511_SOURCES = lib1511.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1511_LDADD = $(TESTUTIL_LIBS)
+lib1511_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1511
+
+lib1512_SOURCES = lib1512.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1512_LDADD = $(TESTUTIL_LIBS)
+lib1512_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1512
+
+lib1513_SOURCES = lib1513.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1513_LDADD = $(TESTUTIL_LIBS)
+lib1513_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1513
+
+lib1514_SOURCES = lib1514.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1514_LDADD = $(TESTUTIL_LIBS)
+lib1514_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1514
+
+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
+
+lib1526_SOURCES = lib1526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1526_LDADD = $(TESTUTIL_LIBS)
+lib1526_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1526
+
+lib1527_SOURCES = lib1527.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1527_LDADD = $(TESTUTIL_LIBS)
+lib1527_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1527
+
+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
+
+lib1530_SOURCES = lib1530.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1530_LDADD = $(TESTUTIL_LIBS)
+lib1530_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1530
+
+lib1900_SOURCES = lib1900.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1900_LDADD = $(TESTUTIL_LIBS)
+lib1900_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib2033_SOURCES = libntlmconnect.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib2033_LDADD = $(TESTUTIL_LIBS)
+lib2033_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_PIPELINING
diff --git a/tests/libtest/chkhostname.c b/tests/libtest/chkhostname.c
index 72c8b6a1..168294ab 100644
--- a/tests/libtest/chkhostname.c
+++ b/tests/libtest/chkhostname.c
@@ -1,4 +1,25 @@
-#include "setup.h"
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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_gethostname.h"
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index 770f9d52..0ead39d6 100644
--- a/tests/libtest/first.c
+++ b/tests/libtest/first.c
@@ -1,16 +1,36 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
#ifdef HAVE_LOCALE_H
-#include <locale.h> /* for setlocale() */
+# include <locale.h> /* for setlocale() */
+#endif
+
+#ifdef HAVE_IO_H
+# include <io.h> /* for setmode() */
+#endif
+
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h> /* for setmode() */
#endif
#ifdef CURLDEBUG
@@ -18,19 +38,34 @@
# include "memdebug.h"
#endif
-int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
- struct timeval *tv)
+int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc,
+ struct timeval *tv)
{
+ if(nfds < 0) {
+ SET_SOCKERRNO(EINVAL);
+ return -1;
+ }
#ifdef USE_WINSOCK
- /* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is
- * case when 'num_fds <= 0. So sleep.
+ /*
+ * Winsock select() requires that at least one of the three fd_set
+ * pointers is not NULL and points to a non-empty fdset. IOW Winsock
+ * select() can not be used to sleep without a single fd_set.
*/
- if (num_fds <= 0) {
+ if(!nfds) {
Sleep(1000*tv->tv_sec + tv->tv_usec/1000);
return 0;
}
#endif
- return select(num_fds, rd, wr, exc, tv);
+ return select(nfds, rd, wr, exc, tv);
+}
+
+void wait_ms(int ms)
+{
+ struct timeval t;
+ t.tv_sec = ms/1000;
+ ms -= (int)t.tv_sec * 1000;
+ t.tv_usec = ms * 1000;
+ select_wrapper(0, NULL, NULL , NULL, &t);
}
char *libtest_arg2=NULL;
@@ -38,32 +73,72 @@ char *libtest_arg3=NULL;
int test_argc;
char **test_argv;
+struct timeval tv_test_start; /* for test timing */
-int main(int argc, char **argv)
-{
- char *URL;
+#ifdef UNITTESTS
+int unitfail; /* for unittests */
+#endif
#ifdef CURLDEBUG
- /* this sends all memory debug messages to a logfile named memdump */
- char *env = curl_getenv("CURL_MEMDEBUG");
+static void memory_tracking_init(void)
+{
+ char *env;
+ /* if CURL_MEMDEBUG is set, this starts memory tracking message logging */
+ env = curl_getenv("CURL_MEMDEBUG");
if(env) {
/* use the value as file name */
- char *s = strdup(env);
+ char fname[CURL_MT_LOGFNAME_BUFSIZE];
+ if(strlen(env) >= CURL_MT_LOGFNAME_BUFSIZE)
+ env[CURL_MT_LOGFNAME_BUFSIZE-1] = '\0';
+ strcpy(fname, env);
curl_free(env);
- curl_memdebug(s);
- free(s);
- /* this weird strdup() and stuff here is to make the curl_free() get
- called before the memdebug() as otherwise the memdebug tracing will
- with tracing a free() without an alloc! */
+ curl_memdebug(fname);
+ /* this weird stuff here is to make curl_free() get called
+ before curl_memdebug() as otherwise memory tracking will
+ log a free() without an alloc! */
}
- /* this enables the fail-on-alloc-number-N functionality */
+ /* if CURL_MEMLIMIT is set, this enables fail-on-alloc-number-N feature */
env = curl_getenv("CURL_MEMLIMIT");
if(env) {
- curl_memlimit(atoi(env));
+ char *endptr;
+ long num = strtol(env, &endptr, 10);
+ if((endptr != env) && (endptr == env + strlen(env)) && (num > 0))
+ curl_memlimit(num);
curl_free(env);
}
+}
+#else
+# define memory_tracking_init() Curl_nop_stmt
#endif
+/* returns a hexdump in a static memory area */
+char *hexdump(unsigned char *buffer, size_t len)
+{
+ static char dump[200*3+1];
+ char *p = dump;
+ size_t i;
+ if(len > 200)
+ return NULL;
+ for(i=0; i<len; i++, p += 3)
+ snprintf(p, 4, "%02x ", buffer[i]);
+ return dump;
+}
+
+
+int main(int argc, char **argv)
+{
+ char *URL;
+
+#ifdef O_BINARY
+# ifdef __HIGHC__
+ _setmode(stdout, O_BINARY);
+# else
+ setmode(fileno(stdout), O_BINARY);
+# endif
+#endif
+
+ memory_tracking_init();
+
/*
* Setup proper locale from environment. This is needed to enable locale-
* specific behaviour by the C library in order to test for undesired side
diff --git a/tests/libtest/lib1500.c b/tests/libtest/lib1500.c
new file mode 100644
index 00000000..08b917fc
--- /dev/null
+++ b/tests/libtest/lib1500.c
@@ -0,0 +1,90 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+int test(char *URL)
+{
+ CURL* curls = NULL;
+ CURLM* multi = NULL;
+ int still_running;
+ int i = TEST_ERR_FAILURE;
+ int res = 0;
+ CURLMsg *msg;
+
+ start_test_timing();
+
+ global_init(CURL_GLOBAL_ALL);
+
+ multi_init(multi);
+
+ easy_init(curls);
+
+ easy_setopt(curls, CURLOPT_URL, URL);
+ easy_setopt(curls, CURLOPT_HEADER, 1L);
+
+ multi_add_handle(multi, curls);
+
+ multi_perform(multi, &still_running);
+
+ abort_on_test_timeout();
+
+ while(still_running) {
+ int num;
+ res = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
+ if (res != CURLM_OK) {
+ printf("curl_multi_wait() returned %d\n", res);
+ res = TEST_ERR_MAJOR_BAD;
+ goto test_cleanup;
+ }
+
+ abort_on_test_timeout();
+
+ multi_perform(multi, &still_running);
+
+ abort_on_test_timeout();
+ }
+
+ msg = curl_multi_info_read(multi, &still_running);
+ if(msg)
+ /* this should now contain a result code from the easy handle,
+ get it */
+ i = msg->data.result;
+
+test_cleanup:
+
+ /* undocumented cleanup sequence - type UA */
+
+ curl_multi_cleanup(multi);
+ curl_easy_cleanup(curls);
+ curl_global_cleanup();
+
+ if(res)
+ i = res;
+
+ return i; /* return the final return code */
+}
diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c
new file mode 100644
index 00000000..01a382e8
--- /dev/null
+++ b/tests/libtest/lib1501.c
@@ -0,0 +1,126 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <fcntl.h>
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 30 * 1000
+
+/* 500 milliseconds allowed. An extreme number but lets be really conservative
+ to allow old and slow machines to run this test too */
+#define MAX_BLOCKED_TIME_US 500000
+
+/* return the number of microseconds between two time stamps */
+static int elapsed(struct timeval *before,
+ struct timeval *after)
+{
+ ssize_t result;
+
+ result = (after->tv_sec - before->tv_sec) * 1000000 +
+ after->tv_usec - before->tv_usec;
+ if (result < 0)
+ result = 0;
+
+ return curlx_sztosi(result);
+}
+
+
+int test(char *URL)
+{
+ CURL *handle = NULL;
+ CURLM *mhandle = NULL;
+ int res = 0;
+ int still_running = 0;
+
+ start_test_timing();
+
+ global_init(CURL_GLOBAL_ALL);
+
+ easy_init(handle);
+
+ easy_setopt(handle, CURLOPT_URL, URL);
+ easy_setopt(handle, CURLOPT_VERBOSE, 1L);
+
+ multi_init(mhandle);
+
+ multi_add_handle(mhandle, handle);
+
+ multi_perform(mhandle, &still_running);
+
+ abort_on_test_timeout();
+
+ while(still_running) {
+ struct timeval timeout;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -99;
+ struct timeval before;
+ struct timeval after;
+ int e;
+
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 100000L; /* 100 ms */
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ multi_fdset(mhandle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+ abort_on_test_timeout();
+
+ fprintf(stderr, "ping\n");
+ before = tutil_tvnow();
+
+ multi_perform(mhandle, &still_running);
+
+ abort_on_test_timeout();
+
+ after = tutil_tvnow();
+ e = elapsed(&before, &after);
+ fprintf(stderr, "pong = %d\n", e);
+
+ if(e > MAX_BLOCKED_TIME_US) {
+ res = 100;
+ break;
+ }
+ }
+
+test_cleanup:
+
+ /* undocumented cleanup sequence - type UA */
+
+ curl_multi_cleanup(mhandle);
+ curl_easy_cleanup(handle);
+ curl_global_cleanup();
+
+ return res;
+}
diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c
new file mode 100644
index 00000000..2b50c473
--- /dev/null
+++ b/tests/libtest/lib1502.c
@@ -0,0 +1,145 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 source code is used for lib1502, lib1503, lib1504 and lib1505 with
+ * only #ifdefs controlling the cleanup sequence.
+ *
+ * Test case 1502 converted from bug report #3575448, identifying a memory
+ * leak in the CURLOPT_RESOLVE handling with the multi interface.
+ */
+
+#include "test.h"
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+int test(char *URL)
+{
+ CURL* easy = NULL;
+ CURLM* multi = NULL;
+ int still_running;
+ int res = 0;
+
+ char redirect[160];
+
+ /* DNS cache injection */
+ struct curl_slist *dns_cache_list;
+
+ sprintf(redirect, "google.com:%s:%s", libtest_arg2, libtest_arg3);
+
+ start_test_timing();
+
+ dns_cache_list = curl_slist_append(NULL, redirect);
+ if(!dns_cache_list) {
+ fprintf(stderr, "curl_slist_append() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ res_global_init(CURL_GLOBAL_ALL);
+ if(res) {
+ curl_slist_free_all(dns_cache_list);
+ return res;
+ }
+
+ easy_init(easy);
+
+ easy_setopt(easy, CURLOPT_URL, URL);
+ easy_setopt(easy, CURLOPT_HEADER, 1L);
+ easy_setopt(easy, CURLOPT_RESOLVE, dns_cache_list);
+
+ multi_init(multi);
+
+ multi_add_handle(multi, easy);
+
+ multi_perform(multi, &still_running);
+
+ abort_on_test_timeout();
+
+ while(still_running) {
+ struct timeval timeout;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -99;
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+ abort_on_test_timeout();
+
+ multi_perform(multi, &still_running);
+
+ abort_on_test_timeout();
+ }
+
+test_cleanup:
+
+#ifdef LIB1502
+ /* undocumented cleanup sequence - type UA */
+ curl_multi_cleanup(multi);
+ curl_easy_cleanup(easy);
+ curl_global_cleanup();
+#endif
+
+#ifdef LIB1503
+ /* proper cleanup sequence - type PA */
+ curl_multi_remove_handle(multi, easy);
+ curl_multi_cleanup(multi);
+ curl_easy_cleanup(easy);
+ curl_global_cleanup();
+#endif
+
+#ifdef LIB1504
+ /* undocumented cleanup sequence - type UB */
+ curl_easy_cleanup(easy);
+ curl_multi_cleanup(multi);
+ curl_global_cleanup();
+#endif
+
+#ifdef LIB1505
+ /* proper cleanup sequence - type PB */
+ curl_multi_remove_handle(multi, easy);
+ curl_easy_cleanup(easy);
+ curl_multi_cleanup(multi);
+ curl_global_cleanup();
+#endif
+
+ curl_slist_free_all(dns_cache_list);
+
+ return res;
+}
diff --git a/tests/libtest/lib1506.c b/tests/libtest/lib1506.c
new file mode 100644
index 00000000..b61c4db7
--- /dev/null
+++ b/tests/libtest/lib1506.c
@@ -0,0 +1,135 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
+ *
+ * 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 "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+#define NUM_HANDLES 4
+
+int test(char *URL)
+{
+ int res = 0;
+ CURL *curl[NUM_HANDLES] = {0};
+ int running;
+ CURLM *m = NULL;
+ int i;
+ char target_url[256];
+ char dnsentry[256];
+ struct curl_slist *slist = NULL, *slist2;
+ char *port = libtest_arg3;
+ char *address = libtest_arg2;
+
+ (void)URL;
+
+ /* Create fake DNS entries for serverX.example.com for all handles */
+ for(i=0; i < NUM_HANDLES; i++) {
+ sprintf(dnsentry, "server%d.example.com:%s:%s", i + 1, port, address);
+ printf("%s\n", dnsentry);
+ slist2 = curl_slist_append(slist, dnsentry);
+ if(!slist2) {
+ fprintf(stderr, "curl_slist_append() failed\n");
+ goto test_cleanup;
+ }
+ slist = slist2;
+ }
+
+ start_test_timing();
+
+ global_init(CURL_GLOBAL_ALL);
+
+ multi_init(m);
+
+ multi_setopt(m, CURLMOPT_MAXCONNECTS, 3L);
+
+ /* get NUM_HANDLES easy handles */
+ for(i=0; i < NUM_HANDLES; i++) {
+ /* get an easy handle */
+ easy_init(curl[i]);
+ /* specify target */
+ sprintf(target_url, "http://server%d.example.com:%s/path/1506%04i",
+ i + 1, port, i + 1);
+ target_url[sizeof(target_url) - 1] = '\0';
+ easy_setopt(curl[i], CURLOPT_URL, target_url);
+ /* go verbose */
+ easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
+ /* include headers */
+ easy_setopt(curl[i], CURLOPT_HEADER, 1L);
+
+ easy_setopt(curl[i], CURLOPT_RESOLVE, slist);
+ }
+
+ fprintf(stderr, "Start at URL 0\n");
+
+ for(i=0; i < NUM_HANDLES; i++) {
+ /* add handle to multi */
+ multi_add_handle(m, curl[i]);
+
+ for(;;) {
+ struct timeval interval;
+ fd_set rd, wr, exc;
+ int maxfd = -99;
+
+ interval.tv_sec = 1;
+ interval.tv_usec = 0;
+
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
+ if(!running)
+ break; /* done */
+
+ FD_ZERO(&rd);
+ FD_ZERO(&wr);
+ FD_ZERO(&exc);
+
+ multi_fdset(m, &rd, &wr, &exc, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &rd, &wr, &exc, &interval);
+
+ abort_on_test_timeout();
+ }
+ wait_ms(1); /* to ensure different end times */
+ }
+
+test_cleanup:
+
+ /* proper cleanup sequence - type PB */
+
+ for(i=0; i < NUM_HANDLES; i++) {
+ curl_multi_remove_handle(m, curl[i]);
+ curl_easy_cleanup(curl[i]);
+ }
+
+ curl_slist_free_all(slist);
+
+ curl_multi_cleanup(m);
+ curl_global_cleanup();
+
+ return res;
+}
diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c
new file mode 100644
index 00000000..5bb61b3b
--- /dev/null
+++ b/tests/libtest/lib1507.c
@@ -0,0 +1,168 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+/*
+ * This is the list of basic details you need to tweak to get things right.
+ */
+#define USERNAME "user@example.com"
+#define PASSWORD "123qwerty"
+#define RECIPIENT "<1507-recipient@example.com>"
+#define MAILFROM "<1507-realuser@example.com>"
+
+#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ (void)ptr;
+ (void)size;
+ (void)nmemb;
+ (void)userp;
+ return CURL_READFUNC_ABORT;
+}
+
+static struct timeval tvnow(void)
+{
+ /*
+ ** time() returns the value of time in seconds since the Epoch.
+ */
+ struct timeval now;
+ now.tv_sec = (long)time(NULL);
+ now.tv_usec = 0;
+ return now;
+}
+
+static long tvdiff(struct timeval newer, struct timeval older)
+{
+ return (newer.tv_sec-older.tv_sec)*1000+
+ (newer.tv_usec-older.tv_usec)/1000;
+}
+
+int test(char *URL)
+{
+ int res = 0;
+ CURL *curl = NULL;
+ CURLM *mcurl = NULL;
+ int still_running = 1;
+ struct timeval mp_start;
+ struct curl_slist* rcpt_list = NULL;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ easy_init(curl);
+
+ multi_init(mcurl);
+
+ rcpt_list = curl_slist_append(rcpt_list, RECIPIENT);
+ /* more addresses can be added here
+ rcpt_list = curl_slist_append(rcpt_list, "<others@example.com>");
+ */
+
+ curl_easy_setopt(curl, CURLOPT_URL, URL);
+#if 0
+ curl_easy_setopt(curl, CURLOPT_USERNAME, USERNAME);
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, PASSWORD);
+#endif
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, MAILFROM);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list);
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ multi_add_handle(mcurl, curl);
+
+ mp_start = tvnow();
+
+ /* we start some action by calling perform right away */
+ curl_multi_perform(mcurl, &still_running);
+
+ while(still_running) {
+ 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(mcurl, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* 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, "ABORTING TEST, since it seems "
+ "that it would have run forever.\n");
+ break;
+ }
+
+ switch(rc) {
+ case -1:
+ /* select error */
+ break;
+ case 0: /* timeout */
+ default: /* action */
+ curl_multi_perform(mcurl, &still_running);
+ break;
+ }
+ }
+
+test_cleanup:
+
+ curl_slist_free_all(rcpt_list);
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return res;
+}
+
+
diff --git a/tests/libtest/lib1508.c b/tests/libtest/lib1508.c
new file mode 100644
index 00000000..72f26d12
--- /dev/null
+++ b/tests/libtest/lib1508.c
@@ -0,0 +1,49 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
+ *
+ * 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 "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+int test(char *URL)
+{
+ int res = 0;
+ CURLM *m = NULL;
+
+ (void)URL;
+
+ global_init(CURL_GLOBAL_ALL);
+
+ multi_init(m);
+
+test_cleanup:
+
+ /* proper cleanup sequence - type PB */
+
+ curl_multi_cleanup(m);
+ curl_global_cleanup();
+
+ printf("We are done\n");
+
+ return res;
+}
diff --git a/tests/libtest/lib1509.c b/tests/libtest/lib1509.c
new file mode 100644
index 00000000..f67c7d6e
--- /dev/null
+++ b/tests/libtest/lib1509.c
@@ -0,0 +1,97 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+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;
+
+int test(char *URL)
+{
+ long headerSize;
+ CURLcode code;
+ CURL *curl = NULL;
+ int res = 0;
+
+ global_init(CURL_GLOBAL_ALL);
+
+ easy_init(curl);
+
+ easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); /* set in first.c */
+
+ easy_setopt(curl, CURLOPT_WRITEFUNCTION, *WriteOutput);
+ easy_setopt(curl, CURLOPT_HEADERFUNCTION, *WriteHeader);
+
+ easy_setopt(curl, CURLOPT_HEADER, 1L);
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ easy_setopt(curl, CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
+
+ code = curl_easy_perform(curl);
+ if(CURLE_OK != code) {
+ fprintf(stderr, "%s:%d curl_easy_perform() failed, "
+ "with code %d (%s)\n",
+ __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
+ res = TEST_ERR_MAJOR_BAD;
+ goto test_cleanup;
+ }
+
+ code = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &headerSize);
+ if(CURLE_OK != code) {
+ fprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
+ "with code %d (%s)\n",
+ __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
+ res = TEST_ERR_MAJOR_BAD;
+ goto test_cleanup;
+ }
+
+ printf("header length is ........: %lu\n", headerSize);
+ printf("header length should be..: %lu\n", realHeaderSize);
+
+test_cleanup:
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return res;
+}
+
+size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ fwrite(ptr, size, nmemb, stream);
+ return nmemb * size;
+}
+
+size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ (void)ptr;
+ (void)stream;
+
+ realHeaderSize += curlx_uztoul(size * nmemb);
+
+ return nmemb * size;
+}
diff --git a/tests/libtest/lib1510.c b/tests/libtest/lib1510.c
new file mode 100644
index 00000000..d19a7b5f
--- /dev/null
+++ b/tests/libtest/lib1510.c
@@ -0,0 +1,97 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
+ *
+ * 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 "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+#define NUM_URLS 4
+
+int test(char *URL)
+{
+ int res = 0;
+ CURL *curl = NULL;
+ int i;
+ char target_url[256];
+ char dnsentry[256];
+ struct curl_slist *slist = NULL, *slist2;
+ char *port = libtest_arg3;
+ char *address = libtest_arg2;
+
+ (void)URL;
+
+ /* Create fake DNS entries for serverX.example.com for all handles */
+ for(i=0; i < NUM_URLS; i++) {
+ sprintf(dnsentry, "server%d.example.com:%s:%s", i + 1, port, address);
+ printf("%s\n", dnsentry);
+ slist2 = curl_slist_append(slist, dnsentry);
+ if(!slist2) {
+ fprintf(stderr, "curl_slist_append() failed\n");
+ goto test_cleanup;
+ }
+ slist = slist2;
+ }
+
+ start_test_timing();
+
+ global_init(CURL_GLOBAL_ALL);
+
+ /* get an easy handle */
+ easy_init(curl);
+
+ /* go verbose */
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ /* include headers */
+ easy_setopt(curl, CURLOPT_HEADER, 1L);
+
+ easy_setopt(curl, CURLOPT_RESOLVE, slist);
+
+ easy_setopt(curl, CURLOPT_MAXCONNECTS, 3L);
+
+ /* get NUM_HANDLES easy handles */
+ for(i=0; i < NUM_URLS; i++) {
+ /* specify target */
+ sprintf(target_url, "http://server%d.example.com:%s/path/1510%04i",
+ i + 1, port, i + 1);
+ target_url[sizeof(target_url) - 1] = '\0';
+ easy_setopt(curl, CURLOPT_URL, target_url);
+
+ res = curl_easy_perform(curl);
+
+ abort_on_test_timeout();
+ }
+
+test_cleanup:
+
+ /* proper cleanup sequence - type PB */
+
+ curl_easy_cleanup(curl);
+
+ curl_slist_free_all(slist);
+
+ curl_global_cleanup();
+
+ return res;
+}
diff --git a/tests/libtest/lib1511.c b/tests/libtest/lib1511.c
new file mode 100644
index 00000000..a46f9ab5
--- /dev/null
+++ b/tests/libtest/lib1511.c
@@ -0,0 +1,75 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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)
+{
+ long unmet;
+ CURL* curl = NULL;
+ int res = 0;
+
+ global_init(CURL_GLOBAL_ALL);
+
+ easy_init(curl);
+
+ easy_setopt(curl, CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_HEADER, 1L);
+ easy_setopt(curl, CURLOPT_TIMECONDITION, (long)CURL_TIMECOND_IFMODSINCE);
+
+ /* TIMEVALUE in the future */
+ easy_setopt(curl, CURLOPT_TIMEVALUE, 1566210680L);
+
+ res = curl_easy_perform(curl);
+ if(res)
+ goto test_cleanup;
+
+ curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
+ if(unmet != 1L) {
+ res = TEST_ERR_FAILURE; /* not correct */
+ goto test_cleanup;
+ }
+
+ /* TIMEVALUE in the past */
+ easy_setopt(curl, CURLOPT_TIMEVALUE, 1L);
+
+ res = curl_easy_perform(curl);
+ if(res)
+ goto test_cleanup;
+
+ curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
+ if(unmet != 0L) {
+ res = TEST_ERR_FAILURE; /* not correct */
+ goto test_cleanup;
+ }
+
+ res = TEST_ERR_SUCCESS; /* this is where we should be */
+
+test_cleanup:
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return res;
+}
diff --git a/tests/libtest/lib1512.c b/tests/libtest/lib1512.c
new file mode 100644
index 00000000..86372aac
--- /dev/null
+++ b/tests/libtest/lib1512.c
@@ -0,0 +1,89 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Use global DNS cache (while deprecated it should still work), populate it
+ * with CURLOPT_RESOLVE in the first request and then make sure a subsequent
+ * easy transfer finds and uses the populated stuff.
+ */
+
+#include "test.h"
+
+#include "memdebug.h"
+
+#define NUM_HANDLES 2
+
+int test(char *URL)
+{
+ int res = 0;
+ CURL *curl[NUM_HANDLES] = {NULL, NULL};
+ char *port = libtest_arg3;
+ char *address = libtest_arg2;
+ char dnsentry[256];
+ struct curl_slist *slist = NULL;
+ int i;
+ char target_url[256];
+ (void)URL; /* URL is setup in the code */
+
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ sprintf(dnsentry, "server.example.curl:%s:%s", port, address);
+ printf("%s\n", dnsentry);
+ slist = curl_slist_append(slist, dnsentry);
+
+ /* get NUM_HANDLES easy handles */
+ for(i=0; i < NUM_HANDLES; i++) {
+ /* get an easy handle */
+ easy_init(curl[i]);
+ /* specify target */
+ sprintf(target_url, "http://server.example.curl:%s/path/1512%04i",
+ port, i + 1);
+ target_url[sizeof(target_url) - 1] = '\0';
+ easy_setopt(curl[i], CURLOPT_URL, target_url);
+ /* go verbose */
+ easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
+ /* include headers */
+ easy_setopt(curl[i], CURLOPT_HEADER, 1L);
+
+ easy_setopt(curl[i], CURLOPT_DNS_USE_GLOBAL_CACHE, 1L);
+ }
+
+ /* make the first one populate the GLOBAL cache */
+ easy_setopt(curl[0], CURLOPT_RESOLVE, slist);
+
+ /* run NUM_HANDLES transfers */
+ for(i=0; (i < NUM_HANDLES) && !res; i++)
+ res = curl_easy_perform(curl[i]);
+
+test_cleanup:
+
+ curl_easy_cleanup(curl[0]);
+ curl_easy_cleanup(curl[1]);
+ curl_slist_free_all(slist);
+ curl_global_cleanup();
+
+ return res;
+}
+
diff --git a/tests/libtest/lib1513.c b/tests/libtest/lib1513.c
new file mode 100644
index 00000000..aefb5773
--- /dev/null
+++ b/tests/libtest/lib1513.c
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+/*
+ * Test case converted from bug report #1318 by Petr Novak.
+ *
+ * Before the fix, this test program returned 52 (CURLE_GOT_NOTHING) instead
+ * of 42 (CURLE_ABORTED_BY_CALLBACK).
+ */
+
+#include "test.h"
+
+#include "memdebug.h"
+
+static int progressKiller(void *arg,
+ double dltotal,
+ double dlnow,
+ double ultotal,
+ double ulnow)
+{
+ (void)arg;
+ (void)dltotal;
+ (void)dlnow;
+ (void)ultotal;
+ (void)ulnow;
+ return 1;
+}
+
+int test(char *URL)
+{
+ CURL *curl;
+ int res=0;
+
+ global_init(CURL_GLOBAL_ALL);
+
+ easy_init(curl);
+
+ easy_setopt(curl, CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_TIMEOUT, (long)7);
+ easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1);
+ easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progressKiller);
+ easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL);
+ easy_setopt(curl, CURLOPT_NOPROGRESS, (long)0);
+
+ res = curl_easy_perform(curl);
+
+test_cleanup:
+
+ /* undocumented cleanup sequence - type UA */
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return res;
+}
diff --git a/tests/libtest/lib1514.c b/tests/libtest/lib1514.c
new file mode 100644
index 00000000..ec8f8a32
--- /dev/null
+++ b/tests/libtest/lib1514.c
@@ -0,0 +1,80 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+/*
+ * Make sure libcurl does not send a `Content-Length: -1` header when HTTP POST
+ * size is unknown.
+ */
+
+#include "test.h"
+
+#include "memdebug.h"
+
+static char data[]="dummy";
+
+struct WriteThis {
+ char *readptr;
+ size_t sizeleft;
+};
+
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct WriteThis *pooh = (struct WriteThis *)userp;
+
+ if(size*nmemb < 1)
+ return 0;
+
+ if(pooh->sizeleft) {
+ *(char *)ptr = pooh->readptr[0]; /* copy one single byte */
+ pooh->readptr++; /* advance pointer */
+ pooh->sizeleft--; /* less data left */
+ return 1; /* we return 1 byte at a time! */
+ }
+
+ return 0; /* no more data left to deliver */
+}
+
+int test(char *URL)
+{
+ CURL *curl;
+ CURLcode result = CURLE_OK;
+ int res = 0;
+ struct WriteThis pooh = { data, sizeof(data)-1 };
+
+ global_init(CURL_GLOBAL_ALL);
+
+ easy_init(curl);
+
+ easy_setopt(curl, CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_POST, 1L);
+ /* Purposely omit to set CURLOPT_POSTFIELDSIZE */
+ easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ easy_setopt(curl, CURLOPT_READDATA, &pooh);
+
+ result = curl_easy_perform(curl);
+
+test_cleanup:
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return (int)result;
+}
diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c
new file mode 100644
index 00000000..d5c8f7d0
--- /dev/null
+++ b/tests/libtest/lib1515.c
@@ -0,0 +1,148 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Check for bugs #1303 and #1327: libcurl should never remove DNS entries
+ * created via CURLOPT_RESOLVE, neither after DNS_CACHE_TIMEOUT elapses
+ * (test1515) nor a dead connection is detected (test1616).
+ */
+
+#include "test.h"
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+#define DNS_TIMEOUT 1
+
+#if defined(WIN32) || defined(_WIN32)
+#define sleep(s) Sleep(s * 1000)
+#endif
+
+static int debug_callback(CURL *curl, curl_infotype info, char *msg, size_t len, void *ptr)
+{
+ (void)curl;
+ (void)ptr;
+
+ if(info == CURLINFO_TEXT)
+ fprintf(stderr, "debug: %.*s", (int) len, msg);
+
+ return 0;
+}
+
+static int do_one_request(CURLM *m, char *URL, char *resolve)
+{
+ CURL *curls;
+ struct curl_slist *resolve_list = NULL;
+ int still_running;
+ int res = 0;
+ CURLMsg *msg;
+ int msgs_left;
+
+ resolve_list = curl_slist_append(resolve_list, resolve);
+
+ easy_init(curls);
+
+ easy_setopt(curls, CURLOPT_URL, URL);
+ easy_setopt(curls, CURLOPT_RESOLVE, resolve_list);
+ easy_setopt(curls, CURLOPT_DEBUGFUNCTION, debug_callback);
+ easy_setopt(curls, CURLOPT_VERBOSE, 1);
+ easy_setopt(curls, CURLOPT_DNS_CACHE_TIMEOUT, DNS_TIMEOUT);
+
+ multi_add_handle(m, curls);
+ multi_perform(m, &still_running);
+
+ abort_on_test_timeout();
+
+ while(still_running) {
+ struct timeval timeout;
+ fd_set fdread, fdwrite, fdexcep;
+ int maxfd = -99;
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+ abort_on_test_timeout();
+ multi_perform(m, &still_running);
+
+ abort_on_test_timeout();
+ }
+
+ while((msg = curl_multi_info_read(m, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE && msg->easy_handle == curls) {
+ res = msg->data.result;
+ break;
+ }
+ }
+
+test_cleanup:
+
+ curl_multi_remove_handle(m, curls);
+ curl_easy_cleanup(curls);
+ curl_slist_free_all(resolve_list);
+
+ return res;
+}
+
+int test(char *URL)
+{
+ CURLM* multi = NULL;
+ int res = 0;
+ char *address = libtest_arg2;
+ char *port = libtest_arg3;
+ char *path = URL;
+ char dns_entry[256];
+ int i;
+ int count = 2;
+
+ snprintf(dns_entry, sizeof(dns_entry), "testserver.example.com:%s:%s", port, address);
+
+ start_test_timing();
+
+ global_init(CURL_GLOBAL_ALL);
+ multi_init(multi);
+
+ for(i = 1; i <= count; i++) {
+ char target_url[256];
+ snprintf(target_url, sizeof(target_url), "http://testserver.example.com:%s%s%04d", port, path, i);
+
+ /* second request must succeed like the first one */
+ if((res = do_one_request(multi, target_url, dns_entry)))
+ goto test_cleanup;
+
+ if(i < count)
+ sleep(DNS_TIMEOUT + 1);
+ }
+
+test_cleanup:
+
+ curl_multi_cleanup(multi);
+
+ return (int) res;
+}
diff --git a/tests/libtest/lib1520.c b/tests/libtest/lib1520.c
new file mode 100644
index 00000000..c6d2e820
--- /dev/null
+++ b/tests/libtest/lib1520.c
@@ -0,0 +1,114 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2014, Steve Holme, <steve_holme@hotmail.com>.
+ *
+ * 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 "<recipient@example.com>"
+#define FROM "<sender@example.com>"
+
+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, "<others@example.com>");
+ */
+
+ 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/lib1525.c b/tests/libtest/lib1525.c
new file mode 100644
index 00000000..957b4295
--- /dev/null
+++ b/tests/libtest/lib1525.c
@@ -0,0 +1,97 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2014, Vijay Panghal, <vpanghal@maginatics.com>, 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 unit test PUT http data over proxy. Proxy header will be different
+ * from server http header
+ */
+
+#include "test.h"
+
+#include "memdebug.h"
+
+static char data [] = "Hello Cloud!\n";
+
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ size_t amount = nmemb * size; /* Total bytes curl wants */
+ if (amount < strlen(data)) {
+ return strlen(data);
+ }
+ (void)stream;
+ memcpy(ptr, data, strlen(data));
+ return strlen(data);
+}
+
+
+int test(char *URL)
+{
+ CURL *curl = NULL;
+ CURLcode res = CURLE_FAILED_INIT;
+ /* http and proxy header list*/
+ struct curl_slist *hhl = NULL;
+
+ 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;
+ }
+
+ hhl = curl_slist_append(hhl, "User-Agent: Http Agent");
+
+ if (!hhl) {
+ goto test_cleanup;
+ }
+
+ test_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
+ test_setopt(curl, CURLOPT_HTTPHEADER, hhl);
+ test_setopt(curl, CURLOPT_PROXYHEADER, hhl);
+ test_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED);
+ test_setopt(curl, CURLOPT_POST, 0L);
+ test_setopt(curl, CURLOPT_UPLOAD, 1L);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+ test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
+ test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
+ test_setopt(curl, CURLOPT_INFILESIZE, strlen(data));
+
+ res = curl_easy_perform(curl);
+
+test_cleanup:
+
+ curl_easy_cleanup(curl);
+
+ curl_slist_free_all(hhl);
+
+ curl_global_cleanup();
+
+ return (int)res;
+}
diff --git a/tests/libtest/lib1526.c b/tests/libtest/lib1526.c
new file mode 100644
index 00000000..ec21fb00
--- /dev/null
+++ b/tests/libtest/lib1526.c
@@ -0,0 +1,103 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Vijay Panghal, <vpanghal@maginatics.com>, 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 unit test PUT http data over proxy. Proxy header will be different
+ * from server http header
+ */
+
+#include "test.h"
+
+#include "memdebug.h"
+
+static char data [] = "Hello Cloud!\n";
+
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ size_t amount = nmemb * size; /* Total bytes curl wants */
+ if (amount < strlen(data)) {
+ return strlen(data);
+ }
+ (void)stream;
+ memcpy(ptr, data, strlen(data));
+ return strlen(data);
+}
+
+int test(char *URL)
+{
+ CURL *curl = NULL;
+ CURLcode res = CURLE_FAILED_INIT;
+ /* http and proxy header list*/
+ struct curl_slist *hhl = NULL, *phl = NULL, *tmp = NULL;
+
+ 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;
+ }
+
+ hhl = curl_slist_append(hhl, "User-Agent: Http Agent");
+ phl = curl_slist_append(phl, "User-Agent: Proxy Agent");
+ if (!hhl || !phl) {
+ goto test_cleanup;
+ }
+ tmp = curl_slist_append(phl, "Expect:");
+ if (!tmp) {
+ goto test_cleanup;
+ }
+ phl = tmp;
+
+ test_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
+ test_setopt(curl, CURLOPT_HTTPHEADER, hhl);
+ test_setopt(curl, CURLOPT_PROXYHEADER, phl);
+ test_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
+ test_setopt(curl, CURLOPT_POST, 0L);
+ test_setopt(curl, CURLOPT_UPLOAD, 1L);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+ test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
+ test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
+ test_setopt(curl, CURLOPT_INFILESIZE, strlen(data));
+
+ res = curl_easy_perform(curl);
+
+test_cleanup:
+
+ curl_easy_cleanup(curl);
+
+ curl_slist_free_all(hhl);
+
+ curl_slist_free_all(phl);
+
+ curl_global_cleanup();
+
+ return (int)res;
+}
+
diff --git a/tests/libtest/lib1527.c b/tests/libtest/lib1527.c
new file mode 100644
index 00000000..1122d8ec
--- /dev/null
+++ b/tests/libtest/lib1527.c
@@ -0,0 +1,99 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Vijay Panghal, <vpanghal@maginatics.com>, 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 unit test PUT http data over proxy. Same http header will be generated
+ * for server and proxy
+ */
+
+#include "test.h"
+
+#include "memdebug.h"
+
+static char data [] = "Hello Cloud!\n";
+
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ size_t amount = nmemb * size; /* Total bytes curl wants */
+ if (amount < strlen(data)) {
+ return strlen(data);
+ }
+ (void)stream;
+ memcpy(ptr, data, strlen(data));
+ return strlen(data);
+}
+
+
+int test(char *URL)
+{
+ CURL *curl = NULL;
+ CURLcode res = CURLE_FAILED_INIT;
+ /* http header list*/
+ struct curl_slist *hhl = NULL, *tmp = NULL;
+
+ 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;
+ }
+
+ hhl = curl_slist_append(hhl, "User-Agent: Http Agent");
+ if (!hhl) {
+ goto test_cleanup;
+ }
+ tmp = curl_slist_append(hhl, "Expect: 100-continue");
+ if (!tmp) {
+ goto test_cleanup;
+ }
+ hhl = tmp;
+
+ test_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
+ test_setopt(curl, CURLOPT_HTTPHEADER, hhl);
+ test_setopt(curl, CURLOPT_POST, 0L);
+ test_setopt(curl, CURLOPT_UPLOAD, 1L);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+ test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
+ 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);
+
+test_cleanup:
+
+ curl_easy_cleanup(curl);
+
+ curl_slist_free_all(hhl);
+
+ curl_global_cleanup();
+
+ return (int)res;
+}
diff --git a/tests/libtest/lib1528.c b/tests/libtest/lib1528.c
new file mode 100644
index 00000000..94a7cd02
--- /dev/null
+++ b/tests/libtest/lib1528.c
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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;
+ /* http header list*/
+ struct curl_slist *hhl = NULL;
+ struct curl_slist *phl = NULL;
+
+ 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;
+ }
+
+ hhl = curl_slist_append(hhl, "User-Agent: Http Agent");
+ phl = curl_slist_append(phl, "Proxy-User-Agent: Http Agent2");
+
+ if (!hhl) {
+ goto test_cleanup;
+ }
+
+ test_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
+ test_setopt(curl, CURLOPT_HTTPHEADER, hhl);
+ test_setopt(curl, CURLOPT_PROXYHEADER, phl);
+ test_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
+ 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_slist_free_all(hhl);
+ curl_slist_free_all(phl);
+ curl_global_cleanup();
+
+ return (int)res;
+}
diff --git a/tests/libtest/lib1529.c b/tests/libtest/lib1529.c
new file mode 100644
index 00000000..3def142a
--- /dev/null
+++ b/tests/libtest/lib1529.c
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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/lib1530.c b/tests/libtest/lib1530.c
new file mode 100644
index 00000000..76231c97
--- /dev/null
+++ b/tests/libtest/lib1530.c
@@ -0,0 +1,67 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+static curl_socket_t opensocket(void *clientp,
+ curlsocktype purpose,
+ struct curl_sockaddr *address)
+{
+ (void)purpose;
+ (void)address;
+ (void)clientp;
+ fprintf(stderr, "opensocket() returns CURL_SOCKET_BAD\n");
+ return CURL_SOCKET_BAD;
+}
+
+int test(char *URL)
+{
+ CURL *curl = NULL;
+ CURLcode res = CURLE_FAILED_INIT;
+ (void)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, "http://99.99.99.99:9999");
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+ test_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket);
+
+ 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
new file mode 100644
index 00000000..2f64742a
--- /dev/null
+++ b/tests/libtest/lib1900.c
@@ -0,0 +1,250 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
+ *
+ * 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 "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+#define MAX_URLS 200
+#define MAX_BLACKLIST 20
+
+int urltime[MAX_URLS];
+char *urlstring[MAX_URLS];
+CURL *handles[MAX_URLS];
+char *site_blacklist[MAX_BLACKLIST];
+char *server_blacklist[MAX_BLACKLIST];
+int num_handles;
+int blacklist_num_servers;
+int blacklist_num_sites;
+
+static size_t
+write_callback(void *contents, size_t size, size_t nmemb, void *userp)
+{
+ size_t realsize = size * nmemb;
+ (void)contents;
+ (void)userp;
+
+ return realsize;
+}
+
+static int parse_url_file(const char *filename)
+{
+ FILE *f;
+ int filetime;
+ char buf[200];
+
+ num_handles = 0;
+ blacklist_num_sites = 0;
+ blacklist_num_servers = 0;
+
+ f = fopen(filename, "rb");
+ if(!f)
+ return 0;
+
+ while(!feof(f)) {
+ if(fscanf(f, "%d %s\n", &filetime, buf)) {
+ urltime[num_handles] = filetime;
+ urlstring[num_handles] = strdup(buf);
+ num_handles++;
+ continue;
+ }
+
+ if(fscanf(f, "blacklist_site %s\n", buf)) {
+ site_blacklist[blacklist_num_sites] = strdup(buf);
+ blacklist_num_sites++;
+ continue;
+ }
+
+ break;
+ }
+ fclose(f);
+
+ site_blacklist[blacklist_num_sites] = NULL;
+ server_blacklist[blacklist_num_servers] = NULL;
+ return num_handles;
+}
+
+static void free_urls(void)
+{
+ int i;
+ for(i = 0;i < num_handles;i++) {
+ Curl_safefree(urlstring[i]);
+ }
+ for(i = 0;i < blacklist_num_servers;i++) {
+ Curl_safefree(server_blacklist[i]);
+ }
+ for(i = 0;i < blacklist_num_sites;i++) {
+ Curl_safefree(site_blacklist[i]);
+ }
+}
+
+static int create_handles(void)
+{
+ int i;
+
+ for(i = 0;i < num_handles;i++) {
+ handles[i] = curl_easy_init();
+ }
+ return 0;
+}
+
+static void setup_handle(char *base_url, CURLM *m, int handlenum)
+{
+ char urlbuf[256];
+
+ sprintf(urlbuf, "%s%s", base_url, urlstring[handlenum]);
+ curl_easy_setopt(handles[handlenum], CURLOPT_URL, urlbuf);
+ curl_easy_setopt(handles[handlenum], CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(handles[handlenum], CURLOPT_FAILONERROR, 1L);
+ curl_easy_setopt(handles[handlenum], CURLOPT_WRITEFUNCTION, write_callback);
+ curl_easy_setopt(handles[handlenum], CURLOPT_WRITEDATA, NULL);
+ curl_multi_add_handle(m, handles[handlenum]);
+}
+
+static void remove_handles(void)
+{
+ int i;
+
+ for(i = 0;i < num_handles;i++) {
+ if(handles[i])
+ curl_easy_cleanup(handles[i]);
+ }
+}
+
+int test(char *URL)
+{
+ int res = 0;
+ CURLM *m = NULL;
+ CURLMsg *msg; /* for picking up messages with the transfer status */
+ int msgs_left; /* how many messages are left */
+ int running;
+ int handlenum = 0;
+ struct timeval last_handle_add;
+
+ if(parse_url_file("log/urls.txt") <= 0)
+ goto test_cleanup;
+
+ start_test_timing();
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ multi_init(m);
+
+ create_handles();
+
+ multi_setopt(m, CURLMOPT_PIPELINING, 1L);
+ multi_setopt(m, CURLMOPT_MAX_HOST_CONNECTIONS, 2L);
+ multi_setopt(m, CURLMOPT_MAX_PIPELINE_LENGTH, 3L);
+ multi_setopt(m, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, 15000L);
+ multi_setopt(m, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, 10000L);
+
+ multi_setopt(m, CURLMOPT_PIPELINING_SITE_BL, site_blacklist);
+ multi_setopt(m, CURLMOPT_PIPELINING_SERVER_BL, server_blacklist);
+
+ last_handle_add = tutil_tvnow();
+
+ for(;;) {
+ struct timeval interval;
+ struct timeval now;
+ long int msnow, mslast;
+ fd_set rd, wr, exc;
+ int maxfd = -99;
+ long timeout;
+
+ interval.tv_sec = 1;
+ interval.tv_usec = 0;
+
+ if(handlenum < num_handles) {
+ 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]) {
+ fprintf(stdout, "Adding handle %d\n", handlenum);
+ setup_handle(URL, m, handlenum);
+ last_handle_add = now;
+ handlenum++;
+ }
+ }
+
+ curl_multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
+ /* See how the transfers went */
+ while ((msg = curl_multi_info_read(m, &msgs_left))) {
+ if (msg->msg == CURLMSG_DONE) {
+ int i, found = 0;
+
+ /* Find out which handle this message is about */
+ for (i = 0; i < num_handles; i++) {
+ found = (msg->easy_handle == handles[i]);
+ if(found)
+ break;
+ }
+
+ printf("Handle %d Completed with status %d\n", i, msg->data.result);
+ curl_multi_remove_handle(m, handles[i]);
+ }
+ }
+
+ if(handlenum == num_handles && !running) {
+ break; /* done */
+ }
+
+ FD_ZERO(&rd);
+ FD_ZERO(&wr);
+ FD_ZERO(&exc);
+
+ curl_multi_fdset(m, &rd, &wr, &exc, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ curl_multi_timeout(m, &timeout);
+
+ if(timeout < 0)
+ timeout = 1;
+
+ interval.tv_sec = timeout / 1000;
+ interval.tv_usec = (timeout % 1000) * 1000;
+
+ interval.tv_sec = 0;
+ interval.tv_usec = 1000;
+
+ select_test(maxfd+1, &rd, &wr, &exc, &interval);
+
+ abort_on_test_timeout();
+ }
+
+test_cleanup:
+
+ remove_handles();
+
+ /* undocumented cleanup sequence - type UB */
+
+ curl_multi_cleanup(m);
+ curl_global_cleanup();
+
+ free_urls();
+ return res;
+}
diff --git a/tests/libtest/lib500.c b/tests/libtest/lib500.c
index dc6967cb..4d622084 100644
--- a/tests/libtest/lib500.c
+++ b/tests/libtest/lib500.c
@@ -1,16 +1,62 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 "testtrace.h"
#include "memdebug.h"
+#ifdef LIB585
+
+static int counter;
+
+static curl_socket_t tst_opensocket(void *clientp,
+ curlsocktype purpose,
+ struct curl_sockaddr *addr)
+{
+ (void)clientp;
+ (void)purpose;
+ printf("[OPEN] counter: %d\n", ++counter);
+ return socket(addr->family, addr->socktype, addr->protocol);
+}
+
+static int tst_closesocket(void *clientp, curl_socket_t sock)
+{
+ (void)clientp;
+ printf("[CLOSE] counter: %d\n", counter--);
+ return sclose(sock);
+}
+
+static void setupcallbacks(CURL *curl)
+{
+ curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, tst_opensocket);
+ curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, tst_closesocket);
+ counter = 0;
+}
+
+#else
+#define setupcallbacks(x) Curl_nop_stmt
+#endif
+
+
int test(char *URL)
{
CURLcode res;
@@ -31,15 +77,58 @@ int test(char *URL)
test_setopt(curl, CURLOPT_URL, URL);
test_setopt(curl, CURLOPT_HEADER, 1L);
+ libtest_debug_config.nohex = 1;
+ libtest_debug_config.tracetime = 1;
+ test_setopt(curl, CURLOPT_DEBUGDATA, &libtest_debug_config);
+ test_setopt(curl, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ if(libtest_arg3 && !strcmp(libtest_arg3, "activeftp"))
+ test_setopt(curl, CURLOPT_FTPPORT, "-");
+
+ setupcallbacks(curl);
+
res = curl_easy_perform(curl);
if(!res) {
- FILE *moo;
res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ipstr);
- moo = fopen(libtest_arg2, "wb");
- if(moo) {
- fprintf(moo, "IP: %s\n", ipstr);
- fclose(moo);
+ if (libtest_arg2) {
+ FILE *moo = fopen(libtest_arg2, "wb");
+ if(moo) {
+ double time_namelookup;
+ double time_connect;
+ double time_pretransfer;
+ double time_starttransfer;
+ double time_total;
+ fprintf(moo, "IP: %s\n", ipstr);
+ curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &time_namelookup);
+ curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &time_connect);
+ curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &time_pretransfer);
+ curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
+ &time_starttransfer);
+ curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &time_total);
+
+ /* since the timing will always vary we only compare relative differences
+ between these 5 times */
+ if(time_namelookup > time_connect) {
+ fprintf(moo, "namelookup vs connect: %f %f\n",
+ time_namelookup, time_connect);
+ }
+ if(time_connect > time_pretransfer) {
+ fprintf(moo, "connect vs pretransfer: %f %f\n",
+ time_connect, time_pretransfer);
+ }
+ if(time_pretransfer > time_starttransfer) {
+ fprintf(moo, "pretransfer vs starttransfer: %f %f\n",
+ time_pretransfer, time_starttransfer);
+ }
+ if(time_starttransfer > time_total) {
+ fprintf(moo, "starttransfer vs total: %f %f\n",
+ time_starttransfer, time_total);
+ }
+
+ fclose(moo);
+ }
}
}
diff --git a/tests/libtest/lib501.c b/tests/libtest/lib501.c
index 770cf8f7..26275f97 100644
--- a/tests/libtest/lib501.c
+++ b/tests/libtest/lib501.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib502.c b/tests/libtest/lib502.c
index f6be5aaf..554583ae 100644
--- a/tests/libtest/lib502.c
+++ b/tests/libtest/lib502.c
@@ -1,19 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
/*
* Get a single URL without select().
@@ -21,71 +33,57 @@
int test(char *URL)
{
- CURL *c;
+ CURL *c = NULL;
CURLM *m = NULL;
int res = 0;
- int running=1;
- struct timeval mp_start;
- char mp_timedout = FALSE;
+ int running;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
- return TEST_ERR_MAJOR_BAD;
- }
+ start_test_timing();
- if ((c = curl_easy_init()) == NULL) {
- fprintf(stderr, "curl_easy_init() failed\n");
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ global_init(CURL_GLOBAL_ALL);
- test_setopt(c, CURLOPT_URL, URL);
+ easy_init(c);
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_easy_cleanup(c);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_setopt(c, CURLOPT_URL, URL);
- if ((res = (int)curl_multi_add_handle(m, c)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", res);
- curl_multi_cleanup(m);
- curl_easy_cleanup(c);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ multi_init(m);
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
-
- while (running) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (running <= 0) {
- fprintf(stderr, "nothing left running.\n");
- break;
- }
- }
+ multi_add_handle(m, c);
- if (mp_timedout) {
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ for(;;) {
+ struct timeval timeout;
+ fd_set fdread, fdwrite, fdexcep;
+ int maxfd = -99;
+
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 100000L; /* 100 ms */
+
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
+ if(!running)
+ break; /* done */
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+ abort_on_test_timeout();
}
test_cleanup:
- if(m) {
- curl_multi_remove_handle(m, c);
- curl_multi_cleanup(m);
- }
+ /* proper cleanup sequence - type PA */
+
+ curl_multi_remove_handle(m, c);
+ curl_multi_cleanup(m);
curl_easy_cleanup(c);
curl_global_cleanup();
diff --git a/tests/libtest/lib503.c b/tests/libtest/lib503.c
index 2301186a..50277f7d 100644
--- a/tests/libtest/lib503.c
+++ b/tests/libtest/lib503.c
@@ -1,21 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/types.h>
-
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
/*
* Source code in here hugely as reported in bug report 651460 by
@@ -27,123 +37,63 @@
int test(char *URL)
{
- CURL *c;
+ CURL *c = NULL;
CURLM *m = NULL;
int res = 0;
int running;
- char done = FALSE;
- struct timeval ml_start;
- struct timeval mp_start;
- char ml_timedout = FALSE;
- char mp_timedout = FALSE;
-
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
- return TEST_ERR_MAJOR_BAD;
- }
- if ((c = curl_easy_init()) == NULL) {
- fprintf(stderr, "curl_easy_init() failed\n");
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ start_test_timing();
- test_setopt(c, CURLOPT_PROXY, libtest_arg2); /* set in first.c */
- test_setopt(c, CURLOPT_URL, URL);
- test_setopt(c, CURLOPT_USERPWD, "test:ing");
- test_setopt(c, CURLOPT_PROXYUSERPWD, "test:ing");
- test_setopt(c, CURLOPT_HTTPPROXYTUNNEL, 1L);
- test_setopt(c, CURLOPT_HEADER, 1L);
-
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_easy_cleanup(c);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ global_init(CURL_GLOBAL_ALL);
- if ((res = (int)curl_multi_add_handle(m, c)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", res);
- curl_multi_cleanup(m);
- curl_easy_cleanup(c);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_init(c);
- ml_timedout = FALSE;
- ml_start = tutil_tvnow();
+ easy_setopt(c, CURLOPT_PROXY, libtest_arg2); /* set in first.c */
+ easy_setopt(c, CURLOPT_URL, URL);
+ easy_setopt(c, CURLOPT_USERPWD, "test:ing");
+ easy_setopt(c, CURLOPT_PROXYUSERPWD, "test:ing");
+ easy_setopt(c, CURLOPT_HTTPPROXYTUNNEL, 1L);
+ easy_setopt(c, CURLOPT_HEADER, 1L);
+ easy_setopt(c, CURLOPT_VERBOSE, 1L);
- while(!done) {
- fd_set rd, wr, exc;
- int max_fd;
+ multi_init(m);
+
+ multi_add_handle(m, c);
+
+ for(;;) {
struct timeval interval;
+ fd_set rd, wr, exc;
+ int maxfd = -99;
interval.tv_sec = 1;
interval.tv_usec = 0;
- if (tutil_tvdiff(tutil_tvnow(), ml_start) >
- MAIN_LOOP_HANG_TIMEOUT) {
- ml_timedout = TRUE;
- break;
- }
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
-
- while (res == CURLM_CALL_MULTI_PERFORM) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (running <= 0) {
- done = TRUE;
- break;
- }
- }
- if (mp_timedout || done)
- break;
-
- if (res != CURLM_OK) {
- fprintf(stderr, "not okay???\n");
- break;
- }
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
+ if(!running)
+ break; /* done */
FD_ZERO(&rd);
FD_ZERO(&wr);
FD_ZERO(&exc);
- max_fd = 0;
- if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
- fprintf(stderr, "unexpected failured of fdset.\n");
- res = 89;
- break;
- }
+ multi_fdset(m, &rd, &wr, &exc, &maxfd);
- if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
- fprintf(stderr, "bad select??\n");
- res = 95;
- break;
- }
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
- res = CURLM_CALL_MULTI_PERFORM;
- }
+ select_test(maxfd+1, &rd, &wr, &exc, &interval);
- if (ml_timedout || mp_timedout) {
- if (ml_timedout) fprintf(stderr, "ml_timedout\n");
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ abort_on_test_timeout();
}
test_cleanup:
- if(m) {
- curl_multi_remove_handle(m, c);
- curl_multi_cleanup(m);
- }
+ /* proper cleanup sequence - type PA */
+
+ curl_multi_remove_handle(m, c);
+ curl_multi_cleanup(m);
curl_easy_cleanup(c);
curl_global_cleanup();
diff --git a/tests/libtest/lib504.c b/tests/libtest/lib504.c
index b8091f66..358fc98d 100644
--- a/tests/libtest/lib504.c
+++ b/tests/libtest/lib504.c
@@ -1,21 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/types.h>
-
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
/*
* Source code in here hugely as reported in bug report 651464 by
@@ -26,85 +36,41 @@
*/
int test(char *URL)
{
- CURL *c;
+ CURL *c = NULL;
int res = 0;
CURLM *m = NULL;
fd_set rd, wr, exc;
- CURLMcode ret;
- char done = FALSE;
int running;
- int max_fd;
- int rc;
- struct timeval ml_start;
- struct timeval mp_start;
- char ml_timedout = FALSE;
- char mp_timedout = FALSE;
-
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
- return TEST_ERR_MAJOR_BAD;
- }
- if ((c = curl_easy_init()) == NULL) {
- fprintf(stderr, "curl_easy_init() failed\n");
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ start_test_timing();
+
+ global_init(CURL_GLOBAL_ALL);
+
+ easy_init(c);
/* The point here is that there must not be anything running on the given
proxy port */
if (libtest_arg2)
- test_setopt(c, CURLOPT_PROXY, libtest_arg2);
- test_setopt(c, CURLOPT_URL, URL);
- test_setopt(c, CURLOPT_VERBOSE, 1L);
-
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_easy_cleanup(c);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_setopt(c, CURLOPT_PROXY, libtest_arg2);
+ easy_setopt(c, CURLOPT_URL, URL);
+ easy_setopt(c, CURLOPT_VERBOSE, 1L);
- if ((ret = curl_multi_add_handle(m, c)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", ret);
- curl_multi_cleanup(m);
- curl_easy_cleanup(c);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ multi_init(m);
- ml_timedout = FALSE;
- ml_start = tutil_tvnow();
+ multi_add_handle(m, c);
- while (!done) {
+ for(;;) {
struct timeval interval;
+ int maxfd = -99;
interval.tv_sec = 1;
interval.tv_usec = 0;
- if (tutil_tvdiff(tutil_tvnow(), ml_start) >
- MAIN_LOOP_HANG_TIMEOUT) {
- ml_timedout = TRUE;
- break;
- }
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
-
fprintf(stderr, "curl_multi_perform()\n");
- ret = CURLM_CALL_MULTI_PERFORM;
+ multi_perform(m, &running);
- while (ret == CURLM_CALL_MULTI_PERFORM) {
- ret = curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- }
- if (mp_timedout)
- break;
+ abort_on_test_timeout();
if(!running) {
/* This is where this code is expected to reach */
@@ -112,47 +78,34 @@ int test(char *URL)
CURLMsg *msg = curl_multi_info_read(m, &numleft);
fprintf(stderr, "Expected: not running\n");
if(msg && !numleft)
- res = 100; /* this is where we should be */
+ res = TEST_ERR_SUCCESS; /* this is where we should be */
else
- res = 99; /* not correct */
- break;
- }
- fprintf(stderr, "running == %d, ret == %d\n", running, ret);
-
- if (ret != CURLM_OK) {
- res = 2;
- break;
+ res = TEST_ERR_FAILURE; /* not correct */
+ break; /* done */
}
+ fprintf(stderr, "running == %d\n", running);
FD_ZERO(&rd);
FD_ZERO(&wr);
FD_ZERO(&exc);
- max_fd = 0;
fprintf(stderr, "curl_multi_fdset()\n");
- if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
- fprintf(stderr, "unexpected failured of fdset.\n");
- res = 3;
- break;
- }
- rc = select_test(max_fd+1, &rd, &wr, &exc, &interval);
- fprintf(stderr, "select returned %d\n", rc);
- }
- if (ml_timedout || mp_timedout) {
- if (ml_timedout) fprintf(stderr, "ml_timedout\n");
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ multi_fdset(m, &rd, &wr, &exc, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &rd, &wr, &exc, &interval);
+
+ abort_on_test_timeout();
}
test_cleanup:
- if(m) {
- curl_multi_remove_handle(m, c);
- curl_multi_cleanup(m);
- }
+ /* proper cleanup sequence - type PA */
+
+ curl_multi_remove_handle(m, c);
+ curl_multi_cleanup(m);
curl_easy_cleanup(c);
curl_global_cleanup();
diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c
index 5af7ac0b..9592e0fa 100644
--- a/tests/libtest/lib505.c
+++ b/tests/libtest/lib505.c
@@ -1,31 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include "memdebug.h"
/*
@@ -51,7 +50,7 @@ int test(char *URL)
if (!libtest_arg2) {
fprintf(stderr, "Usage: <url> <file-to-upload>\n");
- return -1;
+ return TEST_ERR_USAGE;
}
hd_src = fopen(libtest_arg2, "rb");
@@ -60,7 +59,7 @@ int test(char *URL)
fprintf(stderr, "fopen() failed with error: %d %s\n",
error, strerror(error));
fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
- return -2; /* if this happens things are major weird */
+ return TEST_ERR_MAJOR_BAD; /* if this happens things are major weird */
}
/* get the file size of the local file */
@@ -72,13 +71,13 @@ int test(char *URL)
error, strerror(error));
fprintf(stderr, "ERROR: cannot open file %s\n", libtest_arg2);
fclose(hd_src);
- return -1;
+ return TEST_ERR_MAJOR_BAD;
}
if(! file_info.st_size) {
fprintf(stderr, "ERROR: file %s has zero size!\n", libtest_arg2);
fclose(hd_src);
- return -4;
+ return TEST_ERR_MAJOR_BAD;
}
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
@@ -127,7 +126,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
/* now specify which file to upload */
- test_setopt(curl, CURLOPT_INFILE, hd_src);
+ test_setopt(curl, CURLOPT_READDATA, hd_src);
/* and give the size of the upload (optional) */
test_setopt(curl, CURLOPT_INFILESIZE_LARGE,
diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c
index 9209056d..6dcc36d3 100644
--- a/tests/libtest/lib506.c
+++ b/tests/libtest/lib506.c
@@ -1,19 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <curl/mprintf.h>
-
#include "memdebug.h"
static const char *HOSTHEADER = "Host: www.host.foo.com";
@@ -31,12 +37,15 @@ struct userdata {
int counter;
};
+int lock[3];
+
/* lock callback */
static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
void *useptr )
{
const char *what;
struct userdata *user = (struct userdata *)useptr;
+ int locknum;
(void)handle;
(void)laccess;
@@ -44,17 +53,28 @@ static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
switch ( data ) {
case CURL_LOCK_DATA_SHARE:
what = "share";
+ locknum = 0;
break;
case CURL_LOCK_DATA_DNS:
what = "dns";
+ locknum = 1;
break;
case CURL_LOCK_DATA_COOKIE:
what = "cookie";
+ locknum = 2;
break;
default:
fprintf(stderr, "lock: no such data: %d\n", (int)data);
return;
}
+
+ /* detect locking of locked locks */
+ if(lock[locknum]) {
+ printf("lock: double locked %s\n", what);
+ return;
+ }
+ lock[locknum]++;
+
printf("lock: %-6s [%s]: %d\n", what, user->text, user->counter);
user->counter++;
}
@@ -64,21 +84,33 @@ static void my_unlock(CURL *handle, curl_lock_data data, void *useptr )
{
const char *what;
struct userdata *user = (struct userdata *)useptr;
+ int locknum;
(void)handle;
switch ( data ) {
case CURL_LOCK_DATA_SHARE:
what = "share";
+ locknum = 0;
break;
case CURL_LOCK_DATA_DNS:
what = "dns";
+ locknum = 1;
break;
case CURL_LOCK_DATA_COOKIE:
what = "cookie";
+ locknum = 2;
break;
default:
fprintf(stderr, "unlock: no such data: %d\n", (int)data);
return;
}
+
+ /* detect unlocking of unlocked locks */
+ if(!lock[locknum]) {
+ printf("unlock: double unlocked %s\n", what);
+ return;
+ }
+ lock[locknum]--;
+
printf("unlock: %-6s [%s]: %d\n", what, user->text, user->counter);
user->counter++;
}
@@ -140,11 +172,14 @@ int test(char *URL)
{
int res;
CURLSHcode scode = CURLSHE_OK;
- char *url;
+ CURLcode code = CURLE_OK;
+ char *url = NULL;
struct Tdata tdata;
CURL *curl;
CURLSH *share;
- struct curl_slist *headers;
+ struct curl_slist *headers = NULL;
+ struct curl_slist *cookies = NULL;
+ struct curl_slist *next_cookie = NULL;
int i;
struct userdata user;
@@ -193,6 +228,32 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
+ /* initial cookie manipulation */
+ 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;
+ }
+ printf( "CURLOPT_SHARE\n" );
+ test_setopt( curl, CURLOPT_SHARE, share );
+ printf( "CURLOPT_COOKIELIST injected_and_clobbered\n" );
+ test_setopt( curl, CURLOPT_COOKIELIST,
+ "Set-Cookie: injected_and_clobbered=yes; "
+ "domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030" );
+ printf( "CURLOPT_COOKIELIST ALL\n" );
+ test_setopt( curl, CURLOPT_COOKIELIST, "ALL" );
+ printf( "CURLOPT_COOKIELIST session\n" );
+ test_setopt( curl, CURLOPT_COOKIELIST, "Set-Cookie: session=elephants" );
+ printf( "CURLOPT_COOKIELIST injected\n" );
+ test_setopt( curl, CURLOPT_COOKIELIST,
+ "Set-Cookie: injected=yes; domain=host.foo.com; "
+ "expires=Sat Feb 2 11:56:27 GMT 2030" );
+ printf( "CURLOPT_COOKIELIST SESS\n" );
+ test_setopt( curl, CURLOPT_COOKIELIST, "SESS" );
+ printf( "CLEANUP\n" );
+ curl_easy_cleanup( curl );
+
res = 0;
@@ -229,10 +290,61 @@ int test(char *URL)
test_setopt( curl, CURLOPT_SHARE, share );
printf( "CURLOPT_COOKIEJAR\n" );
test_setopt( curl, CURLOPT_COOKIEJAR, JAR );
+ printf( "CURLOPT_COOKIELIST FLUSH\n" );
+ test_setopt( curl, CURLOPT_COOKIELIST, "FLUSH" );
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 );
@@ -250,7 +362,6 @@ test_cleanup:
printf( "CLEANUP\n" );
curl_easy_cleanup( curl );
curl_slist_free_all( headers );
-
curl_free(url);
/* free share */
diff --git a/tests/libtest/lib507.c b/tests/libtest/lib507.c
index 9707c9b0..87c21def 100644
--- a/tests/libtest/lib507.c
+++ b/tests/libtest/lib507.c
@@ -1,85 +1,64 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
int test(char *URL)
{
- CURL* curls;
- CURLM* multi;
+ CURL* curls = NULL;
+ CURLM* multi = NULL;
int still_running;
int i = -1;
int res = 0;
CURLMsg *msg;
- CURLMcode ret;
- struct timeval ml_start;
- struct timeval mp_start;
- char ml_timedout = FALSE;
- char mp_timedout = FALSE;
-
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
- return TEST_ERR_MAJOR_BAD;
- }
- if ((multi = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ start_test_timing();
- if ((curls = curl_easy_init()) == NULL) {
- fprintf(stderr, "curl_easy_init() failed\n");
- curl_multi_cleanup(multi);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ global_init(CURL_GLOBAL_ALL);
- test_setopt(curls, CURLOPT_URL, URL);
+ multi_init(multi);
- if ((ret = curl_multi_add_handle(multi, curls)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", ret);
- curl_easy_cleanup(curls);
- curl_multi_cleanup(multi);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_init(curls);
+
+ easy_setopt(curls, CURLOPT_URL, URL);
+ easy_setopt(curls, CURLOPT_HEADER, 1L);
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
+ multi_add_handle(multi, curls);
- do {
- ret = curl_multi_perform(multi, &still_running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- } while (ret == CURLM_CALL_MULTI_PERFORM);
+ multi_perform(multi, &still_running);
- ml_timedout = FALSE;
- ml_start = tutil_tvnow();
+ abort_on_test_timeout();
- while ((!ml_timedout) && (!mp_timedout) && (still_running)) {
+ while(still_running) {
struct timeval timeout;
- int rc;
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
- int maxfd;
+ int maxfd = -99;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
@@ -87,49 +66,29 @@ int test(char *URL)
timeout.tv_sec = 1;
timeout.tv_usec = 0;
- if (tutil_tvdiff(tutil_tvnow(), ml_start) >
- MAIN_LOOP_HANG_TIMEOUT) {
- ml_timedout = TRUE;
- break;
- }
-
- curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
- rc = select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
- switch(rc) {
- case -1:
- break;
- case 0:
- default:
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
- do {
- ret = curl_multi_perform(multi, &still_running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- } while (ret == CURLM_CALL_MULTI_PERFORM);
- break;
- }
- }
- if (ml_timedout || mp_timedout) {
- if (ml_timedout) fprintf(stderr, "ml_timedout\n");
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- i = TEST_ERR_RUNS_FOREVER;
- }
- else {
- msg = curl_multi_info_read(multi, &still_running);
- if(msg)
- /* this should now contain a result code from the easy handle,
- get it */
- i = msg->data.result;
+ multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+ abort_on_test_timeout();
+
+ multi_perform(multi, &still_running);
+
+ abort_on_test_timeout();
}
+ msg = curl_multi_info_read(multi, &still_running);
+ if(msg)
+ /* this should now contain a result code from the easy handle,
+ get it */
+ i = msg->data.result;
+
test_cleanup:
+ /* undocumented cleanup sequence - type UA */
+
curl_multi_cleanup(multi);
curl_easy_cleanup(curls);
curl_global_cleanup();
diff --git a/tests/libtest/lib508.c b/tests/libtest/lib508.c
index 0fa5eb9d..7f373092 100644
--- a/tests/libtest/lib508.c
+++ b/tests/libtest/lib508.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
@@ -74,7 +86,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */
- test_setopt(curl, CURLOPT_INFILE, &pooh);
+ test_setopt(curl, CURLOPT_READDATA, &pooh);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
diff --git a/tests/libtest/lib509.c b/tests/libtest/lib509.c
new file mode 100644
index 00000000..a3de51e9
--- /dev/null
+++ b/tests/libtest/lib509.c
@@ -0,0 +1,146 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/*
+ * This test uses these funny custom memory callbacks for the only purpose
+ * of verifying that curl_global_init_mem() functionallity is present in
+ * libcurl and that it works unconditionally no matter how libcurl is built,
+ * nothing more.
+ *
+ * Do not include memdebug.h in this source file, and do not use directly
+ * memory related functions in this file except those used inside custom
+ * memory callbacks which should be calling 'the real thing'.
+ */
+
+/*
+#include "memdebug.h"
+*/
+
+int seen_malloc = 0;
+int seen_free = 0;
+int seen_realloc = 0;
+int seen_strdup = 0;
+int seen_calloc = 0;
+
+void *custom_malloc(size_t size);
+void custom_free(void *ptr);
+void *custom_realloc(void *ptr, size_t size);
+char *custom_strdup(const char *ptr);
+void *custom_calloc(size_t nmemb, size_t size);
+
+
+void *custom_calloc(size_t nmemb, size_t size)
+{
+ if(!seen_calloc) {
+ printf("seen custom_calloc()\n");
+ seen_calloc = 1;
+ }
+ return (calloc)(nmemb, size);
+}
+
+void *custom_malloc(size_t size)
+{
+ if(!seen_malloc && seen_calloc) {
+ printf("seen custom_malloc()\n");
+ seen_malloc = 1;
+ }
+ return (malloc)(size);
+}
+
+char *custom_strdup(const char *ptr)
+{
+ if(!seen_strdup && seen_malloc) {
+ /* currently (2013.03.13), memory tracking enabled builds do not call
+ the strdup callback, in this case malloc callback and memcpy are used
+ instead. If some day this is changed the following printf() should be
+ uncommented, and a line added to test definition.
+ printf("seen custom_strdup()\n");
+ */
+ seen_strdup = 1;
+ }
+ return (strdup)(ptr);
+}
+
+void *custom_realloc(void *ptr, size_t size)
+{
+ if(!seen_realloc && seen_malloc) {
+ printf("seen custom_realloc()\n");
+ seen_realloc = 1;
+ }
+ return (realloc)(ptr, size);
+}
+
+void custom_free(void *ptr)
+{
+ if(!seen_free && seen_realloc) {
+ printf("seen custom_free()\n");
+ seen_free = 1;
+ }
+ (free)(ptr);
+}
+
+
+int test(char *URL)
+{
+ unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+ 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
+ CURLcode res;
+ CURL *curl;
+ int asize;
+ char *str = NULL;
+
+ (void)URL;
+
+ res = curl_global_init_mem(CURL_GLOBAL_ALL,
+ custom_malloc,
+ custom_free,
+ custom_realloc,
+ custom_strdup,
+ custom_calloc);
+ if (res != CURLE_OK) {
+ fprintf(stderr, "curl_global_init_mem() 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_USERAGENT, "test509"); /* uses strdup() */
+
+ asize = (int)sizeof(a);
+ str = curl_easy_escape(curl, (char *)a, asize); /* uses realloc() */
+
+test_cleanup:
+
+ if(str)
+ curl_free(str);
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return (int)res;
+}
+
diff --git a/tests/libtest/lib510.c b/tests/libtest/lib510.c
index f3f8cdbc..c60b2caf 100644
--- a/tests/libtest/lib510.c
+++ b/tests/libtest/lib510.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
@@ -85,7 +97,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */
- test_setopt(curl, CURLOPT_INFILE, &pooh);
+ test_setopt(curl, CURLOPT_READDATA, &pooh);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
@@ -97,7 +109,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_HTTPHEADER, slist);
#ifdef LIB565
- test_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
+ test_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
test_setopt(curl, CURLOPT_USERPWD, "foo:bar");
#endif
diff --git a/tests/libtest/lib511.c b/tests/libtest/lib511.c
index dea97c5e..6be2d2f7 100644
--- a/tests/libtest/lib511.c
+++ b/tests/libtest/lib511.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib512.c b/tests/libtest/lib512.c
index 9f59f7ba..19da18b4 100644
--- a/tests/libtest/lib512.c
+++ b/tests/libtest/lib512.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib513.c b/tests/libtest/lib513.c
index c85006e1..7aab3b1c 100644
--- a/tests/libtest/lib513.c
+++ b/tests/libtest/lib513.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
@@ -49,7 +61,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */
- test_setopt(curl, CURLOPT_INFILE, NULL);
+ test_setopt(curl, CURLOPT_READDATA, NULL);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
diff --git a/tests/libtest/lib514.c b/tests/libtest/lib514.c
index 283f89e4..953e90df 100644
--- a/tests/libtest/lib514.c
+++ b/tests/libtest/lib514.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib515.c b/tests/libtest/lib515.c
index 2660ae36..4e96c4a8 100644
--- a/tests/libtest/lib515.c
+++ b/tests/libtest/lib515.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib516.c b/tests/libtest/lib516.c
index b796dbbb..a9590948 100644
--- a/tests/libtest/lib516.c
+++ b/tests/libtest/lib516.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c
index 38a65d30..ba49ec41 100644
--- a/tests/libtest/lib517.c
+++ b/tests/libtest/lib517.c
@@ -1,17 +1,29 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
-static const char *dates[]={
+static const char * const dates[]={
"Sun, 06 Nov 1994 08:49:37 GMT",
"Sunday, 06-Nov-94 08:49:37 GMT",
"Sun Nov 6 08:49:37 1994",
@@ -98,7 +110,12 @@ static const char *dates[]={
"Thu, 12-Aug-2007 20:61:99999999999 GMT",
"IAintNoDateFool",
"Thu Apr 18 22:50 2007 GMT", /* without seconds */
-
+ "20110623 12:34:56",
+ "20110632 12:34:56",
+ "20110623 56:34:56",
+ "20111323 12:34:56",
+ "20110623 12:34:79",
+ "Wed, 31 Dec 2008 23:59:60 GMT", /* leap second */
NULL
};
diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c
index 9e683d95..23f7f17c 100644
--- a/tests/libtest/lib518.c
+++ b/tests/libtest/lib518.c
@@ -1,17 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
@@ -21,10 +30,8 @@
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
+#include "warnless.h"
#include "memdebug.h"
#ifndef FD_SETSIZE
diff --git a/tests/libtest/lib519.c b/tests/libtest/lib519.c
index f885c5de..b720c8fe 100644
--- a/tests/libtest/lib519.c
+++ b/tests/libtest/lib519.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib520.c b/tests/libtest/lib520.c
index a0e12448..9ffaa4f9 100644
--- a/tests/libtest/lib520.c
+++ b/tests/libtest/lib520.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib521.c b/tests/libtest/lib521.c
index a4ae5558..93c30686 100644
--- a/tests/libtest/lib521.c
+++ b/tests/libtest/lib521.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
@@ -28,7 +40,7 @@ int test(char *URL)
}
test_setopt(curl, CURLOPT_URL, URL);
- test_setopt(curl, CURLOPT_PORT, atoi(libtest_arg2));
+ test_setopt(curl, CURLOPT_PORT, strtol(libtest_arg2, NULL, 10));
test_setopt(curl, CURLOPT_USERPWD, "xxx:yyy");
test_setopt(curl, CURLOPT_VERBOSE, 1L);
diff --git a/tests/libtest/lib523.c b/tests/libtest/lib523.c
index a1ac4a4e..0fdc83db 100644
--- a/tests/libtest/lib523.c
+++ b/tests/libtest/lib523.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib524.c b/tests/libtest/lib524.c
index ee520628..6f56df9b 100644
--- a/tests/libtest/lib524.c
+++ b/tests/libtest/lib524.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c
index ade63701..ca128cb9 100644
--- a/tests/libtest/lib525.c
+++ b/tests/libtest/lib525.c
@@ -1,52 +1,65 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
int test(char *URL)
{
int res = 0;
- CURL *curl;
- FILE *hd_src ;
+ CURL *curl = NULL;
+ FILE *hd_src = NULL;
int hd ;
int error;
struct_stat file_info;
- int running;
- char done=FALSE;
CURLM *m = NULL;
- struct timeval ml_start;
- struct timeval mp_start;
- char ml_timedout = FALSE;
- char mp_timedout = FALSE;
+ int running;
- if (!libtest_arg2) {
+ start_test_timing();
+
+ if(!libtest_arg2) {
+#ifdef LIB529
+ /* test 529 */
+ fprintf(stderr, "Usage: lib529 [url] [uploadfile]\n");
+#else
+ /* test 525 */
fprintf(stderr, "Usage: lib525 [url] [uploadfile]\n");
- return -1;
+#endif
+ return TEST_ERR_USAGE;
}
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
error = ERRNO;
- fprintf(stderr, "fopen() failed with error: %d %s\n",
+ fprintf(stderr, "fopen() failed with error: %d (%s)\n",
error, strerror(error));
- fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
- return TEST_ERR_MAJOR_BAD;
+ fprintf(stderr, "Error opening file: (%s)\n", libtest_arg2);
+ return TEST_ERR_FOPEN;
}
/* get the file size of the local file */
@@ -54,40 +67,35 @@ int test(char *URL)
if(hd == -1) {
/* can't open file, bail out */
error = ERRNO;
- fprintf(stderr, "fstat() failed with error: %d %s\n",
+ fprintf(stderr, "fstat() failed with error: %d (%s)\n",
error, strerror(error));
- fprintf(stderr, "ERROR: cannot open file %s\n", libtest_arg2);
+ fprintf(stderr, "ERROR: cannot open file (%s)\n", libtest_arg2);
fclose(hd_src);
- return -1;
+ return TEST_ERR_FSTAT;
}
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
+ res_global_init(CURL_GLOBAL_ALL);
+ if(res) {
fclose(hd_src);
- return TEST_ERR_MAJOR_BAD;
+ return res;
}
- if ((curl = curl_easy_init()) == NULL) {
- fprintf(stderr, "curl_easy_init() failed\n");
- fclose(hd_src);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_init(curl);
/* enable uploading */
- test_setopt(curl, CURLOPT_UPLOAD, 1L);
+ easy_setopt(curl, CURLOPT_UPLOAD, 1L);
/* specify target */
- test_setopt(curl,CURLOPT_URL, URL);
+ easy_setopt(curl,CURLOPT_URL, URL);
/* go verbose */
- test_setopt(curl, CURLOPT_VERBOSE, 1L);
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L);
/* use active FTP */
- test_setopt(curl, CURLOPT_FTPPORT, "-");
+ easy_setopt(curl, CURLOPT_FTPPORT, "-");
/* now specify which file to upload */
- test_setopt(curl, CURLOPT_READDATA, hd_src);
+ easy_setopt(curl, CURLOPT_READDATA, hd_src);
/* NOTE: if you want this code to work on Windows with libcurl as a DLL, you
MUST also provide a read callback with CURLOPT_READFUNCTION. Failing to
@@ -98,114 +106,60 @@ int test(char *URL)
option you MUST make sure that the type of the passed-in argument is a
curl_off_t. If you use CURLOPT_INFILESIZE (without _LARGE) you must
make sure that to pass in a type 'long' argument. */
- test_setopt(curl, CURLOPT_INFILESIZE_LARGE,
- (curl_off_t)file_info.st_size);
+ easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size);
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_easy_cleanup(curl);
- curl_global_cleanup();
- fclose(hd_src);
- return TEST_ERR_MAJOR_BAD;
- }
-
- if ((res = (int)curl_multi_add_handle(m, curl)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", res);
- curl_multi_cleanup(m);
- curl_easy_cleanup(curl);
- curl_global_cleanup();
- fclose(hd_src);
- return TEST_ERR_MAJOR_BAD;
- }
+ multi_init(m);
- ml_timedout = FALSE;
- ml_start = tutil_tvnow();
+ multi_add_handle(m, curl);
- while (!done) {
- fd_set rd, wr, exc;
- int max_fd;
+ for(;;) {
struct timeval interval;
+ fd_set rd, wr, exc;
+ int maxfd = -99;
interval.tv_sec = 1;
interval.tv_usec = 0;
- if (tutil_tvdiff(tutil_tvnow(), ml_start) >
- MAIN_LOOP_HANG_TIMEOUT) {
- ml_timedout = TRUE;
- break;
- }
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
-
- while (res == CURLM_CALL_MULTI_PERFORM) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (running <= 0) {
- done = TRUE;
- break;
- }
- }
- if (mp_timedout || done)
- break;
-
- if (res != CURLM_OK) {
- fprintf(stderr, "not okay???\n");
- break;
- }
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
+ if(!running)
+ break; /* done */
FD_ZERO(&rd);
FD_ZERO(&wr);
FD_ZERO(&exc);
- max_fd = 0;
- if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
- fprintf(stderr, "unexpected failured of fdset.\n");
- res = 189;
- break;
- }
+ multi_fdset(m, &rd, &wr, &exc, &maxfd);
- if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
- fprintf(stderr, "bad select??\n");
- res = 195;
- break;
- }
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
- res = CURLM_CALL_MULTI_PERFORM;
- }
+ select_test(maxfd+1, &rd, &wr, &exc, &interval);
- if (ml_timedout || mp_timedout) {
- if (ml_timedout) fprintf(stderr, "ml_timedout\n");
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ abort_on_test_timeout();
}
test_cleanup:
#ifdef LIB529
/* test 529 */
- if(m) {
- curl_multi_remove_handle(m, curl);
- curl_multi_cleanup(m);
- }
+ /* proper cleanup sequence - type PA */
+ curl_multi_remove_handle(m, curl);
+ curl_multi_cleanup(m);
curl_easy_cleanup(curl);
+ curl_global_cleanup();
#else
/* test 525 */
- if(m)
- curl_multi_remove_handle(m, curl);
+ /* proper cleanup sequence - type PB */
+ curl_multi_remove_handle(m, curl);
curl_easy_cleanup(curl);
- if(m)
- curl_multi_cleanup(m);
+ curl_multi_cleanup(m);
+ curl_global_cleanup();
#endif
- fclose(hd_src); /* close the local file */
+ /* close the local file */
+ fclose(hd_src);
- curl_global_cleanup();
return res;
}
diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c
index 0418b6ba..9db04dba 100644
--- a/tests/libtest/lib526.c
+++ b/tests/libtest/lib526.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 code sets up multiple easy handles that transfer a single file from
* the same URL, in a serial manner after each other. Due to the connection
@@ -28,15 +40,13 @@
#include "test.h"
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
#define NUM_HANDLES 4
@@ -45,192 +55,130 @@ int test(char *URL)
int res = 0;
CURL *curl[NUM_HANDLES];
int running;
- char done=FALSE;
CURLM *m = NULL;
- int current=0;
- int i, j;
- struct timeval ml_start;
- struct timeval mp_start;
- char ml_timedout = FALSE;
- char mp_timedout = FALSE;
-
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
- return TEST_ERR_MAJOR_BAD;
- }
+ int current = 0;
+ int i;
+
+ for(i=0; i < NUM_HANDLES; i++)
+ curl[i] = NULL;
+
+ start_test_timing();
+
+ global_init(CURL_GLOBAL_ALL);
/* get NUM_HANDLES easy handles */
for(i=0; i < NUM_HANDLES; i++) {
- curl[i] = curl_easy_init();
- if(!curl[i]) {
- fprintf(stderr, "curl_easy_init() failed "
- "on handle #%d\n", i);
- for (j=i-1; j >= 0; j--) {
- curl_easy_cleanup(curl[j]);
- }
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD + i;
- }
- res = curl_easy_setopt(curl[i], CURLOPT_URL, URL);
- if(res) {
- fprintf(stderr, "curl_easy_setopt() failed "
- "on handle #%d\n", i);
- for (j=i; j >= 0; j--) {
- curl_easy_cleanup(curl[j]);
- }
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD + i;
- }
-
+ easy_init(curl[i]);
+ /* specify target */
+ easy_setopt(curl[i], CURLOPT_URL, URL);
/* go verbose */
- res = curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
- if(res) {
- fprintf(stderr, "curl_easy_setopt() failed "
- "on handle #%d\n", i);
- for (j=i; j >= 0; j--) {
- curl_easy_cleanup(curl[j]);
- }
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD + i;
- }
+ easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
}
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- for(i=0; i < NUM_HANDLES; i++) {
- curl_easy_cleanup(curl[i]);
- }
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ multi_init(m);
- if ((res = (int)curl_multi_add_handle(m, curl[current])) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", res);
- curl_multi_cleanup(m);
- for(i=0; i < NUM_HANDLES; i++) {
- curl_easy_cleanup(curl[i]);
- }
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
-
- ml_timedout = FALSE;
- ml_start = tutil_tvnow();
+ multi_add_handle(m, curl[current]);
fprintf(stderr, "Start at URL 0\n");
- while (!done) {
- fd_set rd, wr, exc;
- int max_fd;
+ for(;;) {
struct timeval interval;
+ fd_set rd, wr, exc;
+ int maxfd = -99;
interval.tv_sec = 1;
interval.tv_usec = 0;
- if (tutil_tvdiff(tutil_tvnow(), ml_start) >
- MAIN_LOOP_HANG_TIMEOUT) {
- ml_timedout = TRUE;
- break;
- }
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
-
- while (res == CURLM_CALL_MULTI_PERFORM) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (running <= 0) {
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
+ if(!running) {
#ifdef LIB527
- /* NOTE: this code does not remove the handle from the multi handle
- here, which would be the nice, sane and documented way of working.
- This however tests that the API survives this abuse gracefully. */
- curl_easy_cleanup(curl[current]);
+ /* NOTE: this code does not remove the handle from the multi handle
+ here, which would be the nice, sane and documented way of working.
+ This however tests that the API survives this abuse gracefully. */
+ curl_easy_cleanup(curl[current]);
+ curl[current] = NULL;
#endif
- if(++current < NUM_HANDLES) {
- fprintf(stderr, "Advancing to URL %d\n", current);
+ if(++current < NUM_HANDLES) {
+ fprintf(stderr, "Advancing to URL %d\n", current);
#ifdef LIB532
- /* first remove the only handle we use */
- curl_multi_remove_handle(m, curl[0]);
-
- /* make us re-use the same handle all the time, and try resetting
- the handle first too */
- curl_easy_reset(curl[0]);
- test_setopt(curl[0], CURLOPT_URL, URL);
- test_setopt(curl[0], CURLOPT_VERBOSE, 1L);
-
- /* re-add it */
- res = (int)curl_multi_add_handle(m, curl[0]);
+ /* first remove the only handle we use */
+ curl_multi_remove_handle(m, curl[0]);
+
+ /* make us re-use the same handle all the time, and try resetting
+ the handle first too */
+ curl_easy_reset(curl[0]);
+ easy_setopt(curl[0], CURLOPT_URL, URL);
+ /* go verbose */
+ easy_setopt(curl[0], CURLOPT_VERBOSE, 1L);
+
+ /* re-add it */
+ multi_add_handle(m, curl[0]);
#else
- res = (int)curl_multi_add_handle(m, curl[current]);
+ multi_add_handle(m, curl[current]);
#endif
- if(res) {
- fprintf(stderr, "add handle failed: %d.\n", res);
- res = 243;
- break;
- }
- }
- else
- done = TRUE; /* bail out */
- break;
}
- }
- if (mp_timedout || done)
- break;
-
- if (res != CURLM_OK) {
- fprintf(stderr, "not okay???\n");
- break;
+ else {
+ break; /* done */
+ }
}
FD_ZERO(&rd);
FD_ZERO(&wr);
FD_ZERO(&exc);
- max_fd = 0;
- if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
- fprintf(stderr, "unexpected failured of fdset.\n");
- res = 189;
- break;
- }
+ multi_fdset(m, &rd, &wr, &exc, &maxfd);
- if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
- fprintf(stderr, "bad select??\n");
- res = 195;
- break;
- }
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
- res = CURLM_CALL_MULTI_PERFORM;
- }
+ select_test(maxfd+1, &rd, &wr, &exc, &interval);
- if (ml_timedout || mp_timedout) {
- if (ml_timedout) fprintf(stderr, "ml_timedout\n");
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ abort_on_test_timeout();
}
-#ifdef LIB532
test_cleanup:
-#endif
-#ifndef LIB527
- /* get NUM_HANDLES easy handles */
+#if defined(LIB526)
+
+ /* test 526 and 528 */
+ /* proper cleanup sequence - type PB */
+
for(i=0; i < NUM_HANDLES; i++) {
-#ifdef LIB526
- if(m)
- curl_multi_remove_handle(m, curl[i]);
-#endif
+ curl_multi_remove_handle(m, curl[i]);
curl_easy_cleanup(curl[i]);
}
-#endif
- if(m)
- curl_multi_cleanup(m);
+ curl_multi_cleanup(m);
+ curl_global_cleanup();
+
+#elif defined(LIB527)
+
+ /* test 527 */
+
+ /* Upon non-failure test flow the easy's have already been cleanup'ed. In
+ case there is a failure we arrive here with easy's that have not been
+ cleanup'ed yet, in this case we have to cleanup them or otherwise these
+ will be leaked, let's use undocumented cleanup sequence - type UB */
+
+ if(res)
+ for(i=0; i < NUM_HANDLES; i++)
+ curl_easy_cleanup(curl[i]);
+
+ curl_multi_cleanup(m);
+ curl_global_cleanup();
+
+#elif defined(LIB532)
+ /* test 532 */
+ /* undocumented cleanup sequence - type UB */
+
+ for(i=0; i < NUM_HANDLES; i++)
+ curl_easy_cleanup(curl[i]);
+ curl_multi_cleanup(m);
curl_global_cleanup();
+
+#endif
+
return res;
}
diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c
index abefc92d..e60d1172 100644
--- a/tests/libtest/lib530.c
+++ b/tests/libtest/lib530.c
@@ -1,29 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
#define NUM_HANDLES 4
@@ -32,173 +34,82 @@ int test(char *URL)
int res = 0;
CURL *curl[NUM_HANDLES];
int running;
- char done=FALSE;
- CURLM *m;
- int i, j;
- struct timeval ml_start;
- struct timeval mp_start;
- char ml_timedout = FALSE;
- char mp_timedout = FALSE;
+ CURLM *m = NULL;
+ int i;
char target_url[256];
+ int handles_added = 0;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
- return TEST_ERR_MAJOR_BAD;
- }
+ for(i=0; i < NUM_HANDLES; i++)
+ curl[i] = NULL;
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ start_test_timing();
+
+ global_init(CURL_GLOBAL_ALL);
+
+ multi_init(m);
/* get NUM_HANDLES easy handles */
for(i=0; i < NUM_HANDLES; i++) {
- curl[i] = curl_easy_init();
- if(!curl[i]) {
- fprintf(stderr, "curl_easy_init() failed "
- "on handle #%d\n", i);
- for (j=i-1; j >= 0; j--) {
- curl_multi_remove_handle(m, curl[j]);
- curl_easy_cleanup(curl[j]);
- }
- curl_multi_cleanup(m);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD + i;
- }
+ /* get an easy handle */
+ easy_init(curl[i]);
+ /* specify target */
sprintf(target_url, "%s%04i", URL, i + 1);
target_url[sizeof(target_url) - 1] = '\0';
-
- res = curl_easy_setopt(curl[i], CURLOPT_URL, target_url);
- if(res) {
- fprintf(stderr, "curl_easy_setopt() failed "
- "on handle #%d\n", i);
- for (j=i; j >= 0; j--) {
- curl_multi_remove_handle(m, curl[j]);
- curl_easy_cleanup(curl[j]);
- }
- curl_multi_cleanup(m);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD + i;
- }
-
+ easy_setopt(curl[i], CURLOPT_URL, target_url);
/* go verbose */
- res = curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
- if(res) {
- fprintf(stderr, "curl_easy_setopt() failed "
- "on handle #%d\n", i);
- for (j=i; j >= 0; j--) {
- curl_multi_remove_handle(m, curl[j]);
- curl_easy_cleanup(curl[j]);
- }
- curl_multi_cleanup(m);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD + i;
- }
-
+ easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
/* include headers */
- res = curl_easy_setopt(curl[i], CURLOPT_HEADER, 1L);
- if(res) {
- fprintf(stderr, "curl_easy_setopt() failed "
- "on handle #%d\n", i);
- for (j=i; j >= 0; j--) {
- curl_multi_remove_handle(m, curl[j]);
- curl_easy_cleanup(curl[j]);
- }
- curl_multi_cleanup(m);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD + i;
- }
-
- /* add handle to multi */
- if ((res = (int)curl_multi_add_handle(m, curl[i])) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "on handle #%d with code %d\n", i, res);
- curl_easy_cleanup(curl[i]);
- for (j=i-1; j >= 0; j--) {
- curl_multi_remove_handle(m, curl[j]);
- curl_easy_cleanup(curl[j]);
- }
- curl_multi_cleanup(m);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD + i;
- }
+ easy_setopt(curl[i], CURLOPT_HEADER, 1L);
}
- curl_multi_setopt(m, CURLMOPT_PIPELINING, 1L);
+ /* Add the first handle to multi. We do this to let libcurl detect
+ that the server can do pipelining. The rest of the handles will be
+ added later. */
+ multi_add_handle(m, curl[handles_added++]);
- ml_timedout = FALSE;
- ml_start = tutil_tvnow();
+ multi_setopt(m, CURLMOPT_PIPELINING, 1L);
fprintf(stderr, "Start at URL 0\n");
- while (!done) {
- fd_set rd, wr, exc;
- int max_fd;
+ for(;;) {
struct timeval interval;
+ fd_set rd, wr, exc;
+ int maxfd = -99;
interval.tv_sec = 1;
interval.tv_usec = 0;
- if (tutil_tvdiff(tutil_tvnow(), ml_start) >
- MAIN_LOOP_HANG_TIMEOUT) {
- ml_timedout = TRUE;
- break;
- }
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
-
- while (res == CURLM_CALL_MULTI_PERFORM) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (running <= 0) {
- done = TRUE; /* bail out */
- break;
- }
- }
- if (mp_timedout || done)
- break;
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
- if (res != CURLM_OK) {
- fprintf(stderr, "not okay???\n");
- break;
+ if(!running) {
+ if(handles_added >= NUM_HANDLES)
+ break; /* done */
+
+ /* Add the rest of the handles now that the first handle has completed
+ its request. */
+ while(handles_added < NUM_HANDLES)
+ multi_add_handle(m, curl[handles_added++]);
}
FD_ZERO(&rd);
FD_ZERO(&wr);
FD_ZERO(&exc);
- max_fd = 0;
- if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
- fprintf(stderr, "unexpected failured of fdset.\n");
- res = 189;
- break;
- }
+ multi_fdset(m, &rd, &wr, &exc, &maxfd);
- if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
- fprintf(stderr, "bad select??\n");
- res = 195;
- break;
- }
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
- res = CURLM_CALL_MULTI_PERFORM;
- }
+ select_test(maxfd+1, &rd, &wr, &exc, &interval);
- if (ml_timedout || mp_timedout) {
- if (ml_timedout) fprintf(stderr, "ml_timedout\n");
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ abort_on_test_timeout();
}
-/* test_cleanup: */
+test_cleanup:
+
+ /* proper cleanup sequence - type PB */
- /* cleanup NUM_HANDLES easy handles */
for(i=0; i < NUM_HANDLES; i++) {
curl_multi_remove_handle(m, curl[i]);
curl_easy_cleanup(curl[i]);
diff --git a/tests/libtest/lib533.c b/tests/libtest/lib533.c
index 89ac7bf8..fdc18a1e 100644
--- a/tests/libtest/lib533.c
+++ b/tests/libtest/lib533.c
@@ -1,165 +1,111 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
/* used for test case 533, 534 and 535 */
#include "test.h"
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
int test(char *URL)
{
int res = 0;
- CURL *curl;
+ CURL *curl = NULL;
int running;
- char done=FALSE;
CURLM *m = NULL;
int current=0;
- struct timeval ml_start;
- struct timeval mp_start;
- char ml_timedout = FALSE;
- char mp_timedout = FALSE;
-
- 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;
- }
+ start_test_timing();
- test_setopt(curl, CURLOPT_URL, URL);
- test_setopt(curl, CURLOPT_VERBOSE, 1);
- test_setopt(curl, CURLOPT_FAILONERROR, 1);
+ global_init(CURL_GLOBAL_ALL);
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_easy_cleanup(curl);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_init(curl);
- if ((res = (int)curl_multi_add_handle(m, curl)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", res);
- curl_multi_cleanup(m);
- curl_easy_cleanup(curl);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_setopt(curl, CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
- ml_timedout = FALSE;
- ml_start = tutil_tvnow();
+ multi_init(m);
+
+ multi_add_handle(m, curl);
fprintf(stderr, "Start at URL 0\n");
- while (!done) {
- fd_set rd, wr, exc;
- int max_fd;
+ for(;;) {
struct timeval interval;
+ fd_set rd, wr, exc;
+ int maxfd = -99;
interval.tv_sec = 1;
interval.tv_usec = 0;
- if (tutil_tvdiff(tutil_tvnow(), ml_start) >
- MAIN_LOOP_HANG_TIMEOUT) {
- ml_timedout = TRUE;
- break;
- }
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
-
- while (res == CURLM_CALL_MULTI_PERFORM) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (running <= 0) {
- if(!current++) {
- fprintf(stderr, "Advancing to URL 1\n");
- /* remove the handle we use */
- curl_multi_remove_handle(m, curl);
-
- /* make us re-use the same handle all the time, and try resetting
- the handle first too */
- curl_easy_reset(curl);
- test_setopt(curl, CURLOPT_URL, libtest_arg2);
- test_setopt(curl, CURLOPT_VERBOSE, 1);
- test_setopt(curl, CURLOPT_FAILONERROR, 1);
-
- /* re-add it */
- res = (int)curl_multi_add_handle(m, curl);
- if(res) {
- fprintf(stderr, "add handle failed: %d.\n", res);
- res = 243;
- break;
- }
- }
- else
- done = TRUE; /* bail out */
- break;
- }
- }
- if (mp_timedout || done)
- break;
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
+ if(!running) {
+ if(!current++) {
+ fprintf(stderr, "Advancing to URL 1\n");
+ /* remove the handle we use */
+ curl_multi_remove_handle(m, curl);
- if (res != CURLM_OK) {
- fprintf(stderr, "not okay???\n");
- break;
+ /* make us re-use the same handle all the time, and try resetting
+ the handle first too */
+ curl_easy_reset(curl);
+ easy_setopt(curl, CURLOPT_URL, libtest_arg2);
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
+
+ /* re-add it */
+ multi_add_handle(m, curl);
+ }
+ else
+ break; /* done */
}
FD_ZERO(&rd);
FD_ZERO(&wr);
FD_ZERO(&exc);
- max_fd = 0;
- if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
- fprintf(stderr, "unexpected failured of fdset.\n");
- res = 189;
- break;
- }
+ multi_fdset(m, &rd, &wr, &exc, &maxfd);
- if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
- fprintf(stderr, "bad select??\n");
- res = 195;
- break;
- }
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
- res = CURLM_CALL_MULTI_PERFORM;
- }
+ select_test(maxfd+1, &rd, &wr, &exc, &interval);
- if (ml_timedout || mp_timedout) {
- if (ml_timedout) fprintf(stderr, "ml_timedout\n");
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ abort_on_test_timeout();
}
test_cleanup:
+ /* undocumented cleanup sequence - type UB */
+
curl_easy_cleanup(curl);
- if(m)
- curl_multi_cleanup(m);
+ curl_multi_cleanup(m);
curl_global_cleanup();
return res;
diff --git a/tests/libtest/lib536.c b/tests/libtest/lib536.c
index e0c19f66..e3ae402b 100644
--- a/tests/libtest/lib536.c
+++ b/tests/libtest/lib536.c
@@ -1,135 +1,137 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
-static CURLMcode perform(CURLM * multi)
+static int perform(CURLM *multi)
{
int handles;
- CURLMcode code;
fd_set fdread, fdwrite, fdexcep;
- struct timeval mp_start;
- char mp_timedout = FALSE;
-
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
-
- for (;;) {
- static struct timeval timeout = /* 100 ms */ { 0, 100000L };
- int maxfd = -1;
-
- code = curl_multi_perform(multi, &handles);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (handles <= 0)
- return CURLM_OK;
-
- switch (code) {
- case CURLM_OK:
- break;
- case CURLM_CALL_MULTI_PERFORM:
- continue;
- default:
- return code;
- }
+ int res = 0;
+
+ for(;;) {
+ struct timeval interval;
+ int maxfd = -99;
+
+ interval.tv_sec = 0;
+ interval.tv_usec = 100000L; /* 100 ms */
+
+ res_multi_perform(multi, &handles);
+ if(res)
+ return res;
+
+ res_test_timedout();
+ if(res)
+ return res;
+
+ if(!handles)
+ break; /* done */
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
FD_ZERO(&fdexcep);
- curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
- /* 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. */
+ res_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+ if(res)
+ return res;
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
- if (select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout) == -1)
- return (CURLMcode) ~CURLM_OK;
+ res_select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+ if(res)
+ return res;
+
+ res_test_timedout();
+ if(res)
+ return res;
}
- /* We only reach this point if (mp_timedout) */
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- return (CURLMcode) ~CURLM_OK;
+ return 0; /* success */
}
int test(char *URL)
{
- CURLM *multi;
- CURL *easy;
+ CURLM *multi = NULL;
+ CURL *easy = NULL;
int res = 0;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
- return TEST_ERR_MAJOR_BAD;
- }
+ start_test_timing();
- if ((multi = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ global_init(CURL_GLOBAL_ALL);
- if ((easy = curl_easy_init()) == NULL) {
- fprintf(stderr, "curl_easy_init() failed\n");
- curl_multi_cleanup(multi);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ multi_init(multi);
+
+ easy_init(easy);
- curl_multi_setopt(multi, CURLMOPT_PIPELINING, 1L);
+ multi_setopt(multi, CURLMOPT_PIPELINING, 1L);
- test_setopt(easy, CURLOPT_WRITEFUNCTION, fwrite);
- test_setopt(easy, CURLOPT_FAILONERROR, 1L);
- test_setopt(easy, CURLOPT_URL, URL);
+ easy_setopt(easy, CURLOPT_WRITEFUNCTION, fwrite);
+ easy_setopt(easy, CURLOPT_FAILONERROR, 1L);
+ easy_setopt(easy, CURLOPT_URL, URL);
- if (curl_multi_add_handle(multi, easy) != CURLM_OK) {
- printf("curl_multi_add_handle() failed\n");
- res = TEST_ERR_MAJOR_BAD;
- } else {
- if (perform(multi) != CURLM_OK)
- printf("retrieve 1 failed\n");
+ res_multi_add_handle(multi, easy);
+ if(res) {
+ printf("curl_multi_add_handle() 1 failed\n");
+ goto test_cleanup;
+ }
- curl_multi_remove_handle(multi, easy);
+ res = perform(multi);
+ if(res) {
+ printf("retrieve 1 failed\n");
+ goto test_cleanup;
}
+
+ curl_multi_remove_handle(multi, easy);
+
curl_easy_reset(easy);
- test_setopt(easy, CURLOPT_FAILONERROR, 1L);
- test_setopt(easy, CURLOPT_URL, libtest_arg2);
+ easy_setopt(easy, CURLOPT_FAILONERROR, 1L);
+ easy_setopt(easy, CURLOPT_URL, libtest_arg2);
- if (curl_multi_add_handle(multi, easy) != CURLM_OK) {
+ res_multi_add_handle(multi, easy);
+ if(res) {
printf("curl_multi_add_handle() 2 failed\n");
- res = TEST_ERR_MAJOR_BAD;
- } else {
- if (perform(multi) != CURLM_OK)
- printf("retrieve 2 failed\n");
+ goto test_cleanup;
+ }
- curl_multi_remove_handle(multi, easy);
+ res = perform(multi);
+ if(res) {
+ printf("retrieve 2 failed\n");
+ goto test_cleanup;
}
+ curl_multi_remove_handle(multi, easy);
+
test_cleanup:
+ /* undocumented cleanup sequence - type UB */
+
curl_easy_cleanup(easy);
curl_multi_cleanup(multi);
curl_global_cleanup();
diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c
index 842dbab7..5da53799 100644
--- a/tests/libtest/lib537.c
+++ b/tests/libtest/lib537.c
@@ -1,17 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
@@ -21,10 +30,8 @@
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
+#include "warnless.h"
#include "memdebug.h"
#if !defined(HAVE_POLL_FINE) && \
@@ -34,7 +41,7 @@
#error "this test requires FD_SETSIZE"
#endif
-#define SAFETY_MARGIN (10)
+#define SAFETY_MARGIN (11)
#if defined(WIN32) || defined(_WIN32) || defined(MSDOS)
#define DEV_NULL "NUL"
diff --git a/tests/libtest/lib539.c b/tests/libtest/lib539.c
index 9909d01d..053d2980 100644
--- a/tests/libtest/lib539.c
+++ b/tests/libtest/lib539.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- */
-
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
@@ -71,8 +83,7 @@ int test(char *URL)
test_cleanup:
curl_slist_free_all(slist);
- if(newURL)
- free(newURL);
+ free(newURL);
curl_easy_cleanup(curl);
curl_global_cleanup();
diff --git a/tests/libtest/lib540.c b/tests/libtest/lib540.c
index bf4cd522..ac0ebe60 100644
--- a/tests/libtest/lib540.c
+++ b/tests/libtest/lib540.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * This is the 'proxyauth.c' test app posted by Shmulik Regev on the libcurl
+ * 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 is the 'proxyauth.c' test app posted by Shmulik Regev on the libcurl
* mailing list on 10 Jul 2007, converted to a test case.
*
* argv1 = URL
@@ -17,111 +30,155 @@
#include "test.h"
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
+#define TEST_HANG_TIMEOUT 60 * 1000
+
#define PROXY libtest_arg2
#define PROXYUSERPWD libtest_arg3
#define HOST test_argv[4]
-static int init(CURLM *cm, const char* url, const char* userpwd,
+#define NUM_HANDLES 2
+
+CURL *eh[NUM_HANDLES];
+
+static int init(int num, CURLM *cm, const char* url, const char* userpwd,
struct curl_slist *headers)
{
- CURL *eh;
- int res;
+ int res = 0;
- if ((eh = curl_easy_init()) == NULL) {
- fprintf(stderr, "curl_easy_init() failed\n");
- return 1; /* failure */
- }
+ res_easy_init(eh[num]);
+ if(res)
+ goto init_failed;
- res = curl_easy_setopt(eh, CURLOPT_URL, url);
- if(res) return 1;
- res = curl_easy_setopt(eh, CURLOPT_PROXY, PROXY);
- if(res) return 1;
- res = curl_easy_setopt(eh, CURLOPT_PROXYUSERPWD, userpwd);
- if(res) return 1;
- res = curl_easy_setopt(eh, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
- if(res) return 1;
- res = curl_easy_setopt(eh, CURLOPT_VERBOSE, 1L);
- if(res) return 1;
- res = curl_easy_setopt(eh, CURLOPT_HEADER, 1L);
- if(res) return 1;
- res = curl_easy_setopt(eh, CURLOPT_HTTPHEADER, headers); /* custom Host: */
- if(res) return 1;
-
- if ((res = (int)curl_multi_add_handle(cm, eh)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", res);
- return 1; /* failure */
- }
+ res_easy_setopt(eh[num], CURLOPT_URL, url);
+ if(res)
+ goto init_failed;
+
+ res_easy_setopt(eh[num], CURLOPT_PROXY, PROXY);
+ if(res)
+ goto init_failed;
+
+ res_easy_setopt(eh[num], CURLOPT_PROXYUSERPWD, userpwd);
+ if(res)
+ goto init_failed;
+
+ res_easy_setopt(eh[num], CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
+ if(res)
+ goto init_failed;
+
+ res_easy_setopt(eh[num], CURLOPT_VERBOSE, 1L);
+ if(res)
+ goto init_failed;
+
+ res_easy_setopt(eh[num], CURLOPT_HEADER, 1L);
+ if(res)
+ goto init_failed;
+
+ res_easy_setopt(eh[num], CURLOPT_HTTPHEADER, headers); /* custom Host: */
+ if(res)
+ goto init_failed;
+
+ res_multi_add_handle(cm, eh[num]);
+ if(res)
+ goto init_failed;
return 0; /* success */
+
+init_failed:
+
+ curl_easy_cleanup(eh[num]);
+ eh[num] = NULL;
+
+ return res; /* failure */
}
-static int loop(CURLM *cm, const char* url, const char* userpwd,
+static int loop(int num, CURLM *cm, const char* url, const char* userpwd,
struct curl_slist *headers)
{
CURLMsg *msg;
- CURLMcode code;
long L;
- int M, Q, U = -1;
+ int Q, U = -1;
fd_set R, W, E;
struct timeval T;
+ int res = 0;
- if(init(cm, url, userpwd, headers))
- return 1; /* failure */
+ res = init(num, cm, url, userpwd, headers);
+ if(res)
+ return res;
while (U) {
- do {
- code = curl_multi_perform(cm, &U);
- } while (code == CURLM_CALL_MULTI_PERFORM);
+ int M = -99;
+
+ res_multi_perform(cm, &U);
+ if(res)
+ return res;
+
+ res_test_timedout();
+ if(res)
+ return res;
if (U) {
FD_ZERO(&R);
FD_ZERO(&W);
FD_ZERO(&E);
- if (curl_multi_fdset(cm, &R, &W, &E, &M)) {
- fprintf(stderr, "E: curl_multi_fdset\n");
- return 1; /* failure */
- }
+ res_multi_fdset(cm, &R, &W, &E, &M);
+ if(res)
+ return res;
- /* In a real-world program you OF COURSE check the return that maxfd is
- bigger than -1 so that the call to select() below makes sense! */
+ /* At this point, M is guaranteed to be greater or equal than -1. */
- if (curl_multi_timeout(cm, &L)) {
- fprintf(stderr, "E: curl_multi_timeout\n");
- return 1; /* failure */
- }
+ res_multi_timeout(cm, &L);
+ if(res)
+ return res;
+
+ /* At this point, L is guaranteed to be greater or equal than -1. */
if(L != -1) {
- T.tv_sec = L/1000;
- T.tv_usec = (L%1000)*1000;
+ int itimeout = (L > (long)INT_MAX) ? INT_MAX : (int)L;
+ T.tv_sec = itimeout/1000;
+ T.tv_usec = (itimeout%1000)*1000;
}
else {
T.tv_sec = 5;
T.tv_usec = 0;
}
- if (0 > select(M+1, &R, &W, &E, &T)) {
- fprintf(stderr, "E: select\n");
- return 1; /* failure */
- }
+ res_select_test(M+1, &R, &W, &E, &T);
+ if(res)
+ return res;
}
- while ((msg = curl_multi_info_read(cm, &Q))) {
- if (msg->msg == CURLMSG_DONE) {
+ while((msg = curl_multi_info_read(cm, &Q)) != NULL) {
+ if(msg->msg == CURLMSG_DONE) {
+ int i;
CURL *e = msg->easy_handle;
fprintf(stderr, "R: %d - %s\n", (int)msg->data.result,
curl_easy_strerror(msg->data.result));
curl_multi_remove_handle(cm, e);
curl_easy_cleanup(e);
+ for(i=0; i < NUM_HANDLES; i++) {
+ if(eh[i] == e) {
+ eh[i] = NULL;
+ break;
+ }
+ }
}
- else {
+ else
fprintf(stderr, "E: CURLMsg (%d)\n", (int)msg->msg);
- }
}
+
+ res_test_timedout();
+ if(res)
+ return res;
}
return 0; /* success */
@@ -132,7 +189,13 @@ int test(char *URL)
CURLM *cm = NULL;
struct curl_slist *headers = NULL;
char buffer[246]; /* naively fixed-size */
- int res;
+ int res = 0;
+ int i;
+
+ for(i=0; i < NUM_HANDLES; i++)
+ eh[i] = NULL;
+
+ start_test_timing();
if(test_argc < 4)
return 99;
@@ -146,30 +209,37 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
+ res_global_init(CURL_GLOBAL_ALL);
+ if(res) {
curl_slist_free_all(headers);
- return TEST_ERR_MAJOR_BAD;
+ return res;
}
- if ((cm = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_slist_free_all(headers);
+ res_multi_init(cm);
+ if(res) {
curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
+ curl_slist_free_all(headers);
+ return res;
}
- res = loop(cm, URL, PROXYUSERPWD, headers);
+ res = loop(0, cm, URL, PROXYUSERPWD, headers);
if(res)
goto test_cleanup;
fprintf(stderr, "lib540: now we do the request again\n");
- res = loop(cm, URL, PROXYUSERPWD, headers);
+
+ res = loop(1, cm, URL, PROXYUSERPWD, headers);
test_cleanup:
- curl_multi_cleanup(cm);
+ /* proper cleanup sequence - type PB */
+ for(i=0; i < NUM_HANDLES; i++) {
+ curl_multi_remove_handle(cm, eh[i]);
+ curl_easy_cleanup(eh[i]);
+ }
+
+ curl_multi_cleanup(cm);
curl_global_cleanup();
curl_slist_free_all(headers);
diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c
index 2fc85b97..6015d2f0 100644
--- a/tests/libtest/lib541.c
+++ b/tests/libtest/lib541.c
@@ -1,31 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include "memdebug.h"
/*
@@ -37,13 +36,13 @@ int test(char *URL)
CURL *curl;
CURLcode res = CURLE_OK;
FILE *hd_src ;
- int hd ;
+ int hd;
struct_stat file_info;
int error;
if (!libtest_arg2) {
fprintf(stderr, "Usage: <url> <file-to-upload>\n");
- return -1;
+ return TEST_ERR_USAGE;
}
hd_src = fopen(libtest_arg2, "rb");
@@ -64,13 +63,13 @@ int test(char *URL)
error, strerror(error));
fprintf(stderr, "ERROR: cannot open file %s\n", libtest_arg2);
fclose(hd_src);
- return -1;
+ return TEST_ERR_MAJOR_BAD;
}
if(! file_info.st_size) {
fprintf(stderr, "ERROR: file %s has zero size!\n", libtest_arg2);
fclose(hd_src);
- return -4;
+ return TEST_ERR_MAJOR_BAD;
}
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
@@ -97,7 +96,7 @@ int test(char *URL)
test_setopt(curl,CURLOPT_URL, URL);
/* now specify which file to upload */
- test_setopt(curl, CURLOPT_INFILE, hd_src);
+ test_setopt(curl, CURLOPT_READDATA, hd_src);
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
diff --git a/tests/libtest/lib542.c b/tests/libtest/lib542.c
index ef7b483b..84f493f3 100644
--- a/tests/libtest/lib542.c
+++ b/tests/libtest/lib542.c
@@ -1,31 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include "memdebug.h"
/*
diff --git a/tests/libtest/lib543.c b/tests/libtest/lib543.c
index 8f14f841..b4a31ca9 100644
--- a/tests/libtest/lib543.c
+++ b/tests/libtest/lib543.c
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * Based on Alex Fishman's bug report on September 30, 2007
- */
+ * 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.
+ *
+ ***************************************************************************/
+/* Based on Alex Fishman's bug report on September 30, 2007 */
#include "test.h"
@@ -33,9 +45,12 @@ int test(char *URL)
s = curl_easy_escape(easy, (char*)a, asize);
- printf("%s\n", s);
+ if(s)
+ printf("%s\n", s);
+
+ if(s)
+ curl_free(s);
- curl_free(s);
curl_easy_cleanup(easy);
return 0;
diff --git a/tests/libtest/lib544.c b/tests/libtest/lib544.c
index 6bc899cc..7e2f7351 100644
--- a/tests/libtest/lib544.c
+++ b/tests/libtest/lib544.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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"
@@ -18,7 +30,10 @@ 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
- "This\0 is test binary data with an embedded NUL byte\n";
+{ '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'};
#endif
@@ -42,7 +57,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_URL, URL);
#ifdef LIB545
- test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring - 1);
+ test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring);
#endif
test_setopt(curl, CURLOPT_COPYPOSTFIELDS, teststring);
@@ -53,6 +68,16 @@ 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/lib547.c b/tests/libtest/lib547.c
index 4ef30372..c82bc3f2 100644
--- a/tests/libtest/lib547.c
+++ b/tests/libtest/lib547.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * argv1 = URL
+ * 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.
+ *
+ ***************************************************************************/
+/* argv1 = URL
* argv2 = proxy
* argv3 = proxyuser:password
*/
diff --git a/tests/libtest/lib549.c b/tests/libtest/lib549.c
index 9fd18b22..a1568c88 100644
--- a/tests/libtest/lib549.c
+++ b/tests/libtest/lib549.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * argv1 = URL
+ * 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.
+ *
+ ***************************************************************************/
+/* argv1 = URL
* argv2 = proxy
* argv3 = non-zero means ASCII transfer
*/
diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c
index eeecf6f9..2cc942ad 100644
--- a/tests/libtest/lib552.c
+++ b/tests/libtest/lib552.c
@@ -1,17 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * argv1 = URL
+ * 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.
+ *
+ ***************************************************************************/
+/* argv1 = URL
* argv2 = proxy with embedded user+password
*/
#include "test.h"
+#include "warnless.h"
#include "memdebug.h"
struct data {
@@ -123,7 +137,8 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
- printf("%.*s", (int)(size * nmemb), (char *)ptr);
+ int amount = curlx_uztosi(size * nmemb);
+ printf("%.*s", amount, (char *)ptr);
(void)stream;
return size * nmemb;
}
diff --git a/tests/libtest/lib553.c b/tests/libtest/lib553.c
index 8694daf6..cb1cefd5 100644
--- a/tests/libtest/lib553.c
+++ b/tests/libtest/lib553.c
@@ -1,12 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * This test case and code is based on the bug recipe Joe Malicki provided for
+ * 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 test case and code is based on the bug recipe Joe Malicki provided for
* bug report #1871269, fixed on Jan 14 2008 before the 7.18.0 release.
*/
diff --git a/tests/libtest/lib554.c b/tests/libtest/lib554.c
index d7c68241..0596f3ef 100644
--- a/tests/libtest/lib554.c
+++ b/tests/libtest/lib554.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
@@ -28,6 +40,14 @@ struct WriteThis {
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
{
+#ifdef LIB587
+ (void)ptr;
+ (void)size;
+ (void)nmemb;
+ (void)userp;
+ return CURL_READFUNC_ABORT;
+#else
+
struct WriteThis *pooh = (struct WriteThis *)userp;
if(size*nmemb < 1)
@@ -41,6 +61,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
}
return 0; /* no more data left to deliver */
+#endif
}
int test(char *URL)
@@ -52,6 +73,7 @@ int test(char *URL)
struct curl_httppost *formpost=NULL;
struct curl_httppost *lastptr=NULL;
struct WriteThis pooh;
+ struct WriteThis pooh2;
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
@@ -66,13 +88,30 @@ int test(char *URL)
&lastptr,
CURLFORM_COPYNAME, "sendfile",
CURLFORM_STREAM, &pooh,
- CURLFORM_CONTENTSLENGTH, pooh.sizeleft,
+ CURLFORM_CONTENTSLENGTH, (long)pooh.sizeleft,
CURLFORM_FILENAME, "postit2.c",
CURLFORM_END);
if(formrc)
printf("curl_formadd(1) = %d\n", (int)formrc);
+ /* Now add the same data with another name and make it not look like
+ a file upload but still using the callback */
+
+ pooh2.readptr = data;
+ pooh2.sizeleft = strlen(data);
+
+ /* Fill in the file upload field */
+ formrc = curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "callbackdata",
+ CURLFORM_STREAM, &pooh2,
+ CURLFORM_CONTENTSLENGTH, (long)pooh2.sizeleft,
+ CURLFORM_END);
+
+ if(formrc)
+ printf("curl_formadd(1) = %d\n", (int)formrc);
+
/* Fill in the filename field */
formrc = curl_formadd(&formpost,
&lastptr,
@@ -106,6 +145,16 @@ int test(char *URL)
if(formrc)
printf("curl_formadd(3) = %d\n", (int)formrc);
+ formrc = curl_formadd(&formpost, &lastptr,
+ CURLFORM_COPYNAME, "somename",
+ CURLFORM_BUFFER, "somefile.txt",
+ CURLFORM_BUFFERPTR, "blah blah",
+ CURLFORM_BUFFERLENGTH, (long)9,
+ CURLFORM_END);
+
+ if(formrc)
+ printf("curl_formadd(4) = %d\n", (int)formrc);
+
if ((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_formfree(formpost);
diff --git a/tests/libtest/lib555.c b/tests/libtest/lib555.c
index 55b3f13e..49a81bf5 100644
--- a/tests/libtest/lib555.c
+++ b/tests/libtest/lib555.c
@@ -1,12 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
- * This test case is supposed to be identical to 547 except that this uses the
+ * 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 test case is supposed to be identical to 547 except that this uses the
* multi interface and 547 is easy interface.
*
* argv1 = URL
@@ -16,9 +30,10 @@
#include "test.h"
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
#define UPLOADTHIS "this is the blurb we want to upload\n"
@@ -60,95 +75,82 @@ static curlioerr ioctlcallback(CURL *handle,
int test(char *URL)
{
- int res;
- CURL *curl;
+ int res = 0;
+ CURL *curl = NULL;
int counter=0;
CURLM *m = NULL;
int running=1;
- struct timeval mp_start;
- char mp_timedout = FALSE;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
- return TEST_ERR_MAJOR_BAD;
- }
+ start_test_timing();
- if ((curl = curl_easy_init()) == NULL) {
- fprintf(stderr, "curl_easy_init() failed\n");
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ global_init(CURL_GLOBAL_ALL);
- test_setopt(curl, CURLOPT_URL, URL);
- test_setopt(curl, CURLOPT_VERBOSE, 1L);
- test_setopt(curl, CURLOPT_HEADER, 1L);
+ easy_init(curl);
+
+ easy_setopt(curl, CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ easy_setopt(curl, CURLOPT_HEADER, 1L);
/* read the POST data from a callback */
- test_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctlcallback);
- test_setopt(curl, CURLOPT_IOCTLDATA, &counter);
- test_setopt(curl, CURLOPT_READFUNCTION, readcallback);
- test_setopt(curl, CURLOPT_READDATA, &counter);
+ easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctlcallback);
+ easy_setopt(curl, CURLOPT_IOCTLDATA, &counter);
+ easy_setopt(curl, CURLOPT_READFUNCTION, readcallback);
+ easy_setopt(curl, CURLOPT_READDATA, &counter);
/* We CANNOT do the POST fine without setting the size (or choose chunked)! */
- test_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS));
+ easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS));
- test_setopt(curl, CURLOPT_POST, 1L);
+ easy_setopt(curl, CURLOPT_POST, 1L);
#ifdef CURL_DOES_CONVERSIONS
/* Convert the POST data to ASCII. */
- test_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
+ easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
#endif
- test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
- test_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3);
- test_setopt(curl, CURLOPT_PROXYAUTH,
+ easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
+ easy_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3);
+ easy_setopt(curl, CURLOPT_PROXYAUTH,
(long) (CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC) );
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_easy_cleanup(curl);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ multi_init(m);
- if ((res = (int)curl_multi_add_handle(m, curl)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", res);
- curl_multi_cleanup(m);
- curl_easy_cleanup(curl);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
-
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
+ multi_add_handle(m, curl);
while (running) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
+ struct timeval timeout;
+ fd_set fdread, fdwrite, fdexcep;
+ int maxfd = -99;
+
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 100000L; /* 100 ms */
+
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
#ifdef TPF
sleep(1); /* avoid ctl-10 dump */
#endif
- if (running <= 0) {
- fprintf(stderr, "nothing left running.\n");
- break;
- }
- }
- if (mp_timedout) {
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ if(!running)
+ break; /* done */
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+ abort_on_test_timeout();
}
test_cleanup:
- if(m) {
- curl_multi_remove_handle(m, curl);
- curl_multi_cleanup(m);
- }
+ /* proper cleanup sequence - type PA */
+
+ curl_multi_remove_handle(m, curl);
+ curl_multi_cleanup(m);
curl_easy_cleanup(curl);
curl_global_cleanup();
diff --git a/tests/libtest/lib556.c b/tests/libtest/lib556.c
index 78d123ba..a4b4b93b 100644
--- a/tests/libtest/lib556.c
+++ b/tests/libtest/lib556.c
@@ -1,14 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "warnless.h"
#include "memdebug.h"
/* For Windows, mainly (may be moved in a config file?) */
@@ -40,6 +53,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_URL, URL);
test_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
res = curl_easy_perform(curl);
@@ -72,9 +86,11 @@ int test(char *URL)
sleep(1); /* avoid ctl-10 dump */
#endif
- if(iolen)
+ if(iolen) {
/* send received stuff to stdout */
- write(STDOUT_FILENO, buf, iolen);
+ if(!write(STDOUT_FILENO, buf, iolen))
+ break;
+ }
total += iolen;
} while(((res == CURLE_OK) || (res == CURLE_AGAIN)) && (total < 129));
diff --git a/tests/libtest/lib557.c b/tests/libtest/lib557.c
index 48ccaf38..b8828521 100644
--- a/tests/libtest/lib557.c
+++ b/tests/libtest/lib557.c
@@ -1,11 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
/*
* The purpose of this test is to minimally exercise libcurl's internal
@@ -13,9 +26,6 @@
*/
#include "test.h"
-
-#include <curl/mprintf.h>
-
#include "memdebug.h"
@@ -1341,7 +1351,7 @@ static int test_curl_off_t_formatting(void)
co_test[i].result[j] = 'X';
co_test[i].result[BUFSZ-1] = '\0';
- (void)curl_msprintf(co_test[i].result, "%" FORMAT_OFF_T, co_test[i].num);
+ (void)curl_msprintf(co_test[i].result, "%" CURL_FORMAT_CURL_OFF_T, co_test[i].num);
if(memcmp(co_test[i].result,
co_test[i].expected,
diff --git a/tests/libtest/lib558.c b/tests/libtest/lib558.c
index 56f2a261..1286a1d1 100644
--- a/tests/libtest/lib558.c
+++ b/tests/libtest/lib558.c
@@ -1,188 +1,53 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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"
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-#ifdef HAVE_NETDB_H
-# include <netdb.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
-
-#define ENABLE_CURLX_PRINTF
-#include "curlx.h"
-
-#include "hash.h"
-#include "hostip.h"
-
-#include "curl_memory.h"
#include "memdebug.h"
-/* This source file is used for test # 558 and 559 */
-
-/*
- * This hacky test bypasses the library external API,
- * using internal only libcurl functions. So don't be
- * surprised if we cannot run it when the library has
- * been built with hidden symbols, exporting only the
- * ones in the public API.
- */
-
-#if defined(CURL_HIDDEN_SYMBOLS)
-# define SKIP_TEST 1
-#elif defined(WIN32) && !defined(CURL_STATICLIB)
-# define SKIP_TEST 1
-#else
-# undef SKIP_TEST
-#endif
-
-
-#if !defined(SKIP_TEST)
-
-#ifdef LIB559
-static Curl_addrinfo *fake_ai(void)
-{
- Curl_addrinfo *ai;
- int ss_size;
-
- ss_size = sizeof (struct sockaddr_in);
-
- if((ai = calloc(1, sizeof(Curl_addrinfo))) == NULL)
- return NULL;
-
- if((ai->ai_canonname = strdup("dummy")) == NULL) {
- free(ai);
- return NULL;
- }
-
- if((ai->ai_addr = calloc(1, ss_size)) == NULL) {
- free(ai->ai_canonname);
- free(ai);
- return NULL;
- }
-
- ai->ai_family = AF_INET;
- ai->ai_addrlen = ss_size;
-
- return ai;
-}
-#endif /* LIB559 */
-
-
int test(char *URL)
{
- CURL *easyh = NULL;
- struct curl_hash *hp = NULL;
- int result = 0;
-
- if(!strcmp(URL, "check")) {
- /* test harness script verifying if this test can run */
- return 0; /* sure, run this! */
- }
-
- easyh = curl_easy_init();
- if(!easyh) {
- fprintf(stdout, "easy handle init failed\n");
- result = TEST_ERR_MAJOR_BAD;
- goto cleanup;
- }
- fprintf(stdout, "easy handle init OK\n");
-
- fprintf(stdout, "creating hash...\n");
- hp = Curl_mk_dnscache();
- if(!hp) {
- fprintf(stdout, "hash creation failed\n");
- result = TEST_ERR_MAJOR_BAD;
- goto cleanup;
- }
- fprintf(stdout, "hash creation OK\n");
-
- /**/
-#ifdef LIB559
- {
- char *data_key;
- struct Curl_dns_entry *data_node;
- struct Curl_dns_entry *nodep;
- size_t key_len;
-
- data_key = aprintf("%s:%d", "dummy", 0);
- if(!data_key) {
- fprintf(stdout, "data key creation failed\n");
- result = TEST_ERR_MAJOR_BAD;
- goto cleanup;
- }
- key_len = strlen(data_key);
+ unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+ 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
+ CURLcode res = CURLE_OK;
+ char *ptr = NULL;
+ int asize;
- data_node = calloc(1, sizeof(struct Curl_dns_entry));
- if(!data_node) {
- fprintf(stdout, "data node creation failed\n");
- result = TEST_ERR_MAJOR_BAD;
- free(data_key);
- goto cleanup;
- }
+ (void)URL; /* we don't use this */
- data_node->addr = fake_ai();
- if(!data_node->addr) {
- fprintf(stdout, "actual data creation failed\n");
- result = TEST_ERR_MAJOR_BAD;
- free(data_node);
- free(data_key);
- goto cleanup;
- }
-
- nodep = Curl_hash_add(hp, data_key, key_len+1, (void *)data_node);
- if(!nodep) {
- fprintf(stdout, "insertion into hash failed\n");
- result = TEST_ERR_MAJOR_BAD;
- Curl_freeaddrinfo(data_node->addr);
- free(data_node);
- free(data_key);
- goto cleanup;
- }
-
- free(data_key);
+ if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
}
-#endif /* LIB559 */
- /**/
-
-cleanup:
- fprintf(stdout, "destroying hash...\n");
- Curl_hash_destroy(hp);
- fprintf(stdout, "hash destruction OK\n");
+ ptr = malloc(558);
+ Curl_safefree(ptr);
- fprintf(stdout, "destroying easy handle...\n");
- curl_easy_cleanup(easyh);
- fprintf(stdout, "easy handle destruction OK\n");
+ asize = (int)sizeof(a);
+ ptr = curl_easy_escape(NULL, (char *)a, asize);
+ if(ptr)
+ curl_free(ptr);
curl_global_cleanup();
- return result;
+ return (int)res;
}
-
-#else /* !defined(SKIP_TEST) */
-
-
-int test(char *URL)
-{
- (void)URL;
- fprintf(stdout, "libcurl built with hidden symbols");
- return 1; /* skip test */
-}
-
-
-#endif /* !defined(SKIP_TEST) */
diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c
index 87e85455..e8be1c7b 100644
--- a/tests/libtest/lib560.c
+++ b/tests/libtest/lib560.c
@@ -1,14 +1,32 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
/*
* Simply download a HTTPS file!
*
@@ -21,46 +39,44 @@
*/
int test(char *URL)
{
- CURL *http_handle;
+ CURL *http_handle = NULL;
CURLM *multi_handle = NULL;
- CURLMcode code;
- int res;
+ int res = 0;
int still_running; /* keep number of running handles */
- http_handle = curl_easy_init();
- if (!http_handle)
- return TEST_ERR_MAJOR_BAD;
+ start_test_timing();
+
+ /*
+ ** curl_global_init called indirectly from curl_easy_init.
+ */
+
+ easy_init(http_handle);
/* set options */
- test_setopt(http_handle, CURLOPT_URL, URL);
- test_setopt(http_handle, CURLOPT_HEADER, 1L);
- test_setopt(http_handle, CURLOPT_SSL_VERIFYPEER, 0L);
- test_setopt(http_handle, CURLOPT_SSL_VERIFYHOST, 0L);
+ easy_setopt(http_handle, CURLOPT_URL, URL);
+ easy_setopt(http_handle, CURLOPT_HEADER, 1L);
+ easy_setopt(http_handle, CURLOPT_SSL_VERIFYPEER, 0L);
+ easy_setopt(http_handle, CURLOPT_SSL_VERIFYHOST, 0L);
/* init a multi stack */
- multi_handle = curl_multi_init();
- if (!multi_handle) {
- curl_easy_cleanup(http_handle);
- return TEST_ERR_MAJOR_BAD;
- }
+ multi_init(multi_handle);
/* add the individual transfers */
- curl_multi_add_handle(multi_handle, http_handle);
+ multi_add_handle(multi_handle, http_handle);
/* we start some action by calling perform right away */
- do {
- code = curl_multi_perform(multi_handle, &still_running);
- } while(code == CURLM_CALL_MULTI_PERFORM);
+ multi_perform(multi_handle, &still_running);
+
+ abort_on_test_timeout();
while(still_running) {
struct timeval timeout;
- int rc; /* select() return code */
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
- int maxfd;
+ int maxfd = -99;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
@@ -71,33 +87,25 @@ int test(char *URL)
timeout.tv_usec = 0;
/* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
- /* In a real-world program you OF COURSE check the return code of the
- function calls, *and* you make sure that maxfd is bigger than -1 so
- that the call to select() below makes sense! */
-
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
-
- switch(rc) {
- case -1:
- /* select error */
- break;
- case 0:
- default:
- /* timeout or readable/writable sockets */
- do {
- code = curl_multi_perform(multi_handle, &still_running);
- } while(code == CURLM_CALL_MULTI_PERFORM);
- break;
- }
+ multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+ abort_on_test_timeout();
+
+ /* timeout or readable/writable sockets */
+ multi_perform(multi_handle, &still_running);
+
+ abort_on_test_timeout();
}
test_cleanup:
- if(multi_handle)
- curl_multi_cleanup(multi_handle);
+ /* undocumented cleanup sequence - type UA */
+ curl_multi_cleanup(multi_handle);
curl_easy_cleanup(http_handle);
curl_global_cleanup();
diff --git a/tests/libtest/lib562.c b/tests/libtest/lib562.c
index d78ecce2..a5f0ea53 100644
--- a/tests/libtest/lib562.c
+++ b/tests/libtest/lib562.c
@@ -1,31 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include "memdebug.h"
/*
@@ -57,7 +56,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_VERBOSE, 1L);
/* set port number */
- test_setopt(curl, CURLOPT_PORT, atoi(libtest_arg2) );
+ test_setopt(curl, CURLOPT_PORT, strtol(libtest_arg2, NULL, 10));
/* specify target */
test_setopt(curl,CURLOPT_URL, URL);
diff --git a/tests/libtest/lib564.c b/tests/libtest/lib564.c
index d33f2304..2a0a5665 100644
--- a/tests/libtest/lib564.c
+++ b/tests/libtest/lib564.c
@@ -1,142 +1,92 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
int test(char *URL)
{
int res = 0;
- CURL *curl;
+ CURL *curl = NULL;
int running;
- char done=FALSE;
CURLM *m = NULL;
- struct timeval ml_start;
- struct timeval mp_start;
- char ml_timedout = FALSE;
- char mp_timedout = FALSE;
-
- 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;
- }
+ start_test_timing();
- test_setopt(curl, CURLOPT_URL, URL);
- test_setopt(curl, CURLOPT_VERBOSE, 1);
- test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
- test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
+ global_init(CURL_GLOBAL_ALL);
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_easy_cleanup(curl);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_init(curl);
- if ((res = (int)curl_multi_add_handle(m, curl)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", res);
- curl_multi_cleanup(m);
- curl_easy_cleanup(curl);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_setopt(curl, CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
+ easy_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS4);
+
+ multi_init(m);
- ml_timedout = FALSE;
- ml_start = tutil_tvnow();
+ multi_add_handle(m, curl);
fprintf(stderr, "Start at URL 0\n");
- while (!done) {
- fd_set rd, wr, exc;
- int max_fd;
+ for(;;) {
struct timeval interval;
+ fd_set rd, wr, exc;
+ int maxfd = -99;
interval.tv_sec = 1;
interval.tv_usec = 0;
- if (tutil_tvdiff(tutil_tvnow(), ml_start) >
- MAIN_LOOP_HANG_TIMEOUT) {
- ml_timedout = TRUE;
- break;
- }
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
-
- while (res == CURLM_CALL_MULTI_PERFORM) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (running <= 0) {
- done = TRUE; /* bail out */
- break;
- }
- }
- if (mp_timedout || done)
- break;
-
- if (res != CURLM_OK) {
- fprintf(stderr, "not okay???\n");
- break;
- }
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
+ if(!running)
+ break; /* done */
FD_ZERO(&rd);
FD_ZERO(&wr);
FD_ZERO(&exc);
- max_fd = 0;
- if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
- fprintf(stderr, "unexpected failured of fdset.\n");
- res = 189;
- break;
- }
+ multi_fdset(m, &rd, &wr, &exc, &maxfd);
- if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
- fprintf(stderr, "bad select??\n");
- res = 195;
- break;
- }
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
- res = CURLM_CALL_MULTI_PERFORM;
- }
+ select_test(maxfd+1, &rd, &wr, &exc, &interval);
- if (ml_timedout || mp_timedout) {
- if (ml_timedout) fprintf(stderr, "ml_timedout\n");
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ abort_on_test_timeout();
}
test_cleanup:
+ /* undocumented cleanup sequence - type UB */
+
curl_easy_cleanup(curl);
- if(m)
- curl_multi_cleanup(m);
+ curl_multi_cleanup(m);
curl_global_cleanup();
return res;
diff --git a/tests/libtest/lib566.c b/tests/libtest/lib566.c
index 889f15b3..ba839d65 100644
--- a/tests/libtest/lib566.c
+++ b/tests/libtest/lib566.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib567.c b/tests/libtest/lib567.c
index e1df0c1e..573529cd 100644
--- a/tests/libtest/lib567.c
+++ b/tests/libtest/lib567.c
@@ -1,13 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
/*
diff --git a/tests/libtest/lib568.c b/tests/libtest/lib568.c
index 1f16664c..b6f5ab7c 100644
--- a/tests/libtest/lib568.c
+++ b/tests/libtest/lib568.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
#ifdef HAVE_SYS_STAT_H
@@ -16,8 +28,6 @@
#include <fcntl.h>
#endif
-#include <curl/mprintf.h>
-
#include "memdebug.h"
/* build request url */
@@ -149,8 +159,7 @@ test_cleanup:
if(sdpf)
fclose(sdpf);
- if(stream_uri)
- free(stream_uri);
+ free(stream_uri);
if(custom_headers)
curl_slist_free_all(custom_headers);
diff --git a/tests/libtest/lib569.c b/tests/libtest/lib569.c
index b5182d64..bc488727 100644
--- a/tests/libtest/lib569.c
+++ b/tests/libtest/lib569.c
@@ -1,16 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/mprintf.h>
-
#include "memdebug.h"
/* build request url */
@@ -106,9 +115,7 @@ test_cleanup:
if(idfile)
fclose(idfile);
- if(stream_uri)
- free(stream_uri);
-
+ free(stream_uri);
curl_easy_cleanup(curl);
curl_global_cleanup();
diff --git a/tests/libtest/lib570.c b/tests/libtest/lib570.c
index 9fe2ecea..178f58f9 100644
--- a/tests/libtest/lib570.c
+++ b/tests/libtest/lib570.c
@@ -1,16 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/mprintf.h>
-
#include "memdebug.h"
/* build request url */
@@ -60,7 +69,7 @@ int test(char *URL)
goto test_cleanup;
}
- test_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, 999);
+ test_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, 999L);
test_setopt(curl, CURLOPT_RTSP_TRANSPORT,
"RAW/RAW/UDP;unicast;client_port=3056-3057");
test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
@@ -93,9 +102,7 @@ int test(char *URL)
}
test_cleanup:
-
- if(stream_uri)
- free(stream_uri);
+ free(stream_uri);
curl_easy_cleanup(curl);
curl_global_cleanup();
diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c
index 2892211a..d8dad396 100644
--- a/tests/libtest/lib571.c
+++ b/tests/libtest/lib571.c
@@ -1,17 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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"
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
@@ -28,8 +37,7 @@
# include <fcntl.h>
#endif
-#include <curl/mprintf.h>
-
+#include "warnless.h"
#include "memdebug.h"
#define RTP_PKT_CHANNEL(p) ((int)((unsigned char)((p)[1])))
@@ -45,12 +53,14 @@ static int rtp_packet_count = 0;
static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream) {
char *data = (char *)ptr;
int channel = RTP_PKT_CHANNEL(data);
- int message_size = (int)(size * nmemb) - 4;
+ int message_size;
int coded_size = RTP_PKT_LENGTH(data);
size_t failure = (size * nmemb) ? 0 : 1;
int i;
(void)stream;
+ message_size = curlx_uztosi(size * nmemb) - 4;
+
printf("RTP: message size %d, channel %d\n", message_size, channel);
if(message_size != coded_size) {
printf("RTP embedded size (%d) does not match the write size (%d).\n",
@@ -123,7 +133,7 @@ int test(char *URL)
stream_uri = NULL;
test_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write);
- test_setopt(curl, CURLOPT_TIMEOUT, 3);
+ test_setopt(curl, CURLOPT_TIMEOUT, 3L);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
test_setopt(curl, CURLOPT_WRITEDATA, protofile);
@@ -185,9 +195,7 @@ int test(char *URL)
}
test_cleanup:
-
- if(stream_uri)
- free(stream_uri);
+ free(stream_uri);
if(protofile)
fclose(protofile);
diff --git a/tests/libtest/lib572.c b/tests/libtest/lib572.c
index 18e74d4d..fd547b8b 100644
--- a/tests/libtest/lib572.c
+++ b/tests/libtest/lib572.c
@@ -1,12 +1,24 @@
-
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
- */
-
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
#ifdef HAVE_SYS_STAT_H
@@ -16,8 +28,6 @@
#include <fcntl.h>
#endif
-#include <curl/mprintf.h>
-
#include "memdebug.h"
/* build request url */
@@ -155,8 +165,7 @@ test_cleanup:
if(paramsf)
fclose(paramsf);
- if(stream_uri)
- free(stream_uri);
+ free(stream_uri);
if(custom_headers)
curl_slist_free_all(custom_headers);
diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c
index 5edb1814..b49d26a5 100644
--- a/tests/libtest/lib573.c
+++ b/tests/libtest/lib573.c
@@ -1,19 +1,32 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 "testtrace.h"
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
-#define MAIN_LOOP_HANG_TIMEOUT 90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
/*
* Get a single URL without select().
@@ -21,79 +34,77 @@
int test(char *URL)
{
- CURL *c;
+ CURL *c = NULL;
CURLM *m = NULL;
int res = 0;
- int running=1;
+ int running = 1;
double connect_time = 0.0;
- struct timeval mp_start;
- char mp_timedout = FALSE;
+ double dbl_epsilon;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
- fprintf(stderr, "curl_global_init() failed\n");
- return TEST_ERR_MAJOR_BAD;
- }
+ dbl_epsilon = 1.0;
+ do {
+ dbl_epsilon /= 2.0;
+ } while ((double)(1.0 + (dbl_epsilon/2.0)) > (double)1.0);
- if ((c = curl_easy_init()) == NULL) {
- fprintf(stderr, "curl_easy_init() failed\n");
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ start_test_timing();
- test_setopt(c, CURLOPT_HEADER, 1L);
- test_setopt(c, CURLOPT_URL, URL);
+ global_init(CURL_GLOBAL_ALL);
- if ((m = curl_multi_init()) == NULL) {
- fprintf(stderr, "curl_multi_init() failed\n");
- curl_easy_cleanup(c);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_init(c);
- if ((res = (int)curl_multi_add_handle(m, c)) != CURLM_OK) {
- fprintf(stderr, "curl_multi_add_handle() failed, "
- "with code %d\n", res);
- curl_multi_cleanup(m);
- curl_easy_cleanup(c);
- curl_global_cleanup();
- return TEST_ERR_MAJOR_BAD;
- }
+ easy_setopt(c, CURLOPT_HEADER, 1L);
+ easy_setopt(c, CURLOPT_URL, URL);
+
+ libtest_debug_config.nohex = 1;
+ libtest_debug_config.tracetime = 1;
+ easy_setopt(c, CURLOPT_DEBUGDATA, &libtest_debug_config);
+ easy_setopt(c, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
+ easy_setopt(c, CURLOPT_VERBOSE, 1L);
+
+ multi_init(m);
- mp_timedout = FALSE;
- mp_start = tutil_tvnow();
+ multi_add_handle(m, c);
while (running) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (running <= 0) {
- fprintf(stderr, "nothing left running.\n");
- break;
- }
- }
+ struct timeval timeout;
+ fd_set fdread, fdwrite, fdexcep;
+ int maxfd = -99;
+
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 100000L; /* 100 ms */
+
+ multi_perform(m, &running);
+
+ abort_on_test_timeout();
+
+ if(!running)
+ break; /* done */
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
- if (mp_timedout) {
- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
- fprintf(stderr, "ABORTING TEST, since it seems "
- "that it would have run forever.\n");
- res = TEST_ERR_RUNS_FOREVER;
+ multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+ abort_on_test_timeout();
}
curl_easy_getinfo(c, CURLINFO_CONNECT_TIME, &connect_time);
- if (connect_time <= 0.0) {
- fprintf(stderr, "connect time is <=0.0\n");
+ if (connect_time < dbl_epsilon) {
+ fprintf(stderr, "connect time is < epsilon\n");
res = TEST_ERR_MAJOR_BAD;
}
test_cleanup:
- if(m) {
- curl_multi_remove_handle(m, c);
- curl_multi_cleanup(m);
- }
+ /* proper cleanup sequence - type PA */
+
+ curl_multi_remove_handle(m, c);
+ curl_multi_cleanup(m);
curl_easy_cleanup(c);
curl_global_cleanup();
diff --git a/tests/libtest/lib574.c b/tests/libtest/lib574.c
index 69b2979a..afb2bcea 100644
--- a/tests/libtest/lib574.c
+++ b/tests/libtest/lib574.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib575.c b/tests/libtest/lib575.c
index 521720e9..942df68c 100644
--- a/tests/libtest/lib575.c
+++ b/tests/libtest/lib575.c
@@ -1,21 +1,34 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include "testutil.h"
+#include "warnless.h"
#include "memdebug.h"
+#define TEST_HANG_TIMEOUT 60 * 1000
+
/* 3x download!
* 1. normal
* 2. dup handle
@@ -24,26 +37,21 @@
int test(char *URL)
{
- CURLMcode m;
- CURL *handle = NULL, *duphandle;
+ CURL *handle = NULL;
+ CURL *duphandle = NULL;
CURLM *mhandle = NULL;
int res = 0;
int still_running = 0;
- if(curl_global_init(CURL_GLOBAL_ALL)) {
- fprintf(stderr, "curl_global_init() failed\n");
- goto test_cleanup;
- }
+ start_test_timing();
- handle = curl_easy_init();
- if(!handle) {
- res = CURLE_OUT_OF_MEMORY;
- goto test_cleanup;
- }
+ global_init(CURL_GLOBAL_ALL);
+
+ easy_init(handle);
- test_setopt(handle, CURLOPT_URL, URL);
- test_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
- test_setopt(handle, CURLOPT_VERBOSE, 1L);
+ easy_setopt(handle, CURLOPT_URL, URL);
+ easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
+ easy_setopt(handle, CURLOPT_VERBOSE, 1L);
res = curl_easy_perform(handle);
if(res)
@@ -59,51 +67,48 @@ int test(char *URL)
curl_easy_cleanup(handle);
handle = duphandle;
- mhandle = curl_multi_init();
- if(!mhandle) {
- fprintf(stderr, "curl_multi_init() failed\n");
- goto test_cleanup;
- }
+ multi_init(mhandle);
+
+ multi_add_handle(mhandle, handle);
- curl_multi_add_handle(mhandle, handle);
+ multi_perform(mhandle, &still_running);
- while(CURLM_CALL_MULTI_PERFORM ==
- curl_multi_perform(mhandle, &still_running));
+ abort_on_test_timeout();
while(still_running) {
- static struct timeval timeout = /* 100 ms */ { 0, 100000L };
- int rc;
+ struct timeval timeout;
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
- int max_fdset = -1;
+ int maxfd = -99;
+
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 100000L; /* 100 ms */
+
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
FD_ZERO(&fdexcep);
- m = curl_multi_fdset(mhandle, &fdread, &fdwrite, &fdexcep, &max_fdset);
- if(m != CURLM_OK) {
- fprintf(stderr, "curl_multi_fdset() error\n");
- goto test_cleanup;
- }
- /* We call select(max_fdset + 1, ...), specially in case of (maxfd == -1),
- * we call select(0, ...), which is basically equal to sleep. */
- rc = select(max_fdset + 1, &fdread, &fdwrite, &fdexcep, &timeout);
- if(rc == -1) {
- fprintf(stderr, "select() error\n");
- goto test_cleanup;
- }
- else {
- while(CURLM_CALL_MULTI_PERFORM ==
- curl_multi_perform(mhandle, &still_running));
- }
+ multi_fdset(mhandle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+ abort_on_test_timeout();
+
+ multi_perform(mhandle, &still_running);
+
+ abort_on_test_timeout();
}
test_cleanup:
- if(mhandle)
- curl_multi_cleanup(mhandle);
- if(handle)
- curl_easy_cleanup(handle);
+
+ /* undocumented cleanup sequence - type UA */
+
+ curl_multi_cleanup(mhandle);
+ curl_easy_cleanup(handle);
curl_global_cleanup();
+
return res;
}
diff --git a/tests/libtest/lib576.c b/tests/libtest/lib576.c
index 821eb61a..61bb6132 100644
--- a/tests/libtest/lib576.c
+++ b/tests/libtest/lib576.c
@@ -1,13 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "testutil.h"
#include "memdebug.h"
diff --git a/tests/libtest/lib577.c b/tests/libtest/lib577.c
deleted file mode 100644
index bd52c625..00000000
--- a/tests/libtest/lib577.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/*****************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- */
-
-#include "test.h"
-
-/*
- * This hacky test bypasses the library external API,
- * using internal only libcurl functions. So don't be
- * surprised if we cannot run it when the library has
- * been built with hidden symbols, exporting only the
- * ones in the public API.
- */
-
-#if defined(CURL_HIDDEN_SYMBOLS)
-# define SKIP_TEST 1
-#elif defined(WIN32) && !defined(CURL_STATICLIB)
-# define SKIP_TEST 1
-#else
-# undef SKIP_TEST
-#endif
-
-
-#if !defined(SKIP_TEST)
-
-#include "memdebug.h"
-
-#include "curl_fnmatch.h"
-
-#define MATCH CURL_FNMATCH_MATCH
-#define NOMATCH CURL_FNMATCH_NOMATCH
-#define RE_ERR CURL_FNMATCH_FAIL
-
-#define MAX_PATTERN_L 100
-#define MAX_STRING_L 100
-
-struct testcase {
- char pattern[MAX_PATTERN_L];
- char string[MAX_STRING_L];
- int result;
-};
-
-static const struct testcase tests[] = {
- /* brackets syntax */
- { "\\[", "[", MATCH },
- { "[", "[", RE_ERR },
- { "[]", "[]", RE_ERR },
- { "[][]", "[", MATCH },
- { "[][]", "]", MATCH },
- { "[[]", "[", MATCH },
- { "[[[]", "[", MATCH },
- { "[[[[]", "[", MATCH },
- { "[[[[]", "[", MATCH },
-
- { "[][[]", "]", MATCH },
- { "[][[[]", "[", MATCH },
- { "[[]", "]", NOMATCH },
-
- { "[a-z]", "a", MATCH },
- { "[a-z]", "A", NOMATCH },
- { "?[a-z]", "?Z", NOMATCH },
- { "[A-Z]", "C", MATCH },
- { "[A-Z]", "c", NOMATCH },
- { "[0-9]", "7", MATCH },
- { "[7-8]", "7", MATCH },
- { "[7-]", "7", MATCH },
- { "[7-]", "-", MATCH },
- { "[7-]", "[", NOMATCH },
- { "[a-bA-F]", "F", MATCH },
- { "[a-bA-B9]", "9", MATCH },
- { "[a-bA-B98]", "8", MATCH },
- { "[a-bA-B98]", "C", NOMATCH },
- { "[a-bA-Z9]", "F", MATCH },
- { "[a-bA-Z9]ero*", "Zero chance.", MATCH },
- { "S[a-][x]opho*", "Saxophone", MATCH },
- { "S[a-][x]opho*", "SaXophone", NOMATCH },
- { "S[a-][x]*.txt", "S-x.txt", MATCH },
- { "[\\a-\\b]", "a", MATCH },
- { "[\\a-\\b]", "b", MATCH },
- { "[?*[][?*[][?*[]", "?*[", MATCH },
- { "[][?*-]", "]", MATCH },
- { "[][?*-]", "[", MATCH },
- { "[][?*-]", "?", MATCH },
- { "[][?*-]", "*", MATCH },
- { "[][?*-]", "-", MATCH },
- { "[]?*-]", "-", MATCH },
- { "?/b/c", "a/b/c", MATCH },
- { "^_{}~", "^_{}~", MATCH },
- { "!#%+,-./01234567889", "!#%+,-./01234567889", MATCH },
- { "PQRSTUVWXYZ]abcdefg", "PQRSTUVWXYZ]abcdefg", MATCH },
- { ":;=@ABCDEFGHIJKLMNO", ":;=@ABCDEFGHIJKLMNO", MATCH },
-
- /* negate */
- { "[!a]", "b", MATCH },
- { "[!a]", "a", NOMATCH },
- { "[^a]", "b", MATCH },
- { "[^a]", "a", NOMATCH },
- { "[^a-z0-9A-Z]", "a", NOMATCH },
- { "[^a-z0-9A-Z]", "-", MATCH },
- { "curl[!a-z]lib", "curl lib", MATCH },
- { "curl[! ]lib", "curl lib", NOMATCH },
- { "[! ][ ]", " ", NOMATCH },
- { "[! ][ ]", "a ", MATCH },
- { "*[^a].t?t", "a.txt", NOMATCH },
- { "*[^a].t?t", "ba.txt", NOMATCH },
- { "*[^a].t?t", "ab.txt", MATCH },
- { "[!?*[]", "?", NOMATCH },
- { "[!!]", "!", NOMATCH },
- { "[!!]", "x", MATCH },
-
- { "[[:alpha:]]", "a", MATCH },
- { "[[:alpha:]]", "9", NOMATCH },
- { "[[:alnum:]]", "a", MATCH },
- { "[[:alnum:]]", "[", NOMATCH },
- { "[[:alnum:]]", "]", NOMATCH },
- { "[[:alnum:]]", "9", MATCH },
- { "[[:digit:]]", "9", MATCH },
- { "[[:xdigit:]]", "9", MATCH },
- { "[[:xdigit:]]", "F", MATCH },
- { "[[:xdigit:]]", "G", NOMATCH },
- { "[[:upper:]]", "U", MATCH },
- { "[[:upper:]]", "u", NOMATCH },
- { "[[:lower:]]", "l", MATCH },
- { "[[:lower:]]", "L", NOMATCH },
- { "[[:print:]]", "L", MATCH },
- { "[[:print:]]", {'\10'}, NOMATCH },
- { "[[:print:]]", {'\10'}, NOMATCH },
- { "[[:space:]]", " ", MATCH },
- { "[[:space:]]", "x", NOMATCH },
- { "[[:graph:]]", " ", NOMATCH },
- { "[[:graph:]]", "x", MATCH },
- { "[[:blank:]]", {'\t'}, MATCH },
- { "[[:blank:]]", {' '}, MATCH },
- { "[[:blank:]]", {'\r'}, NOMATCH },
- { "[^[:blank:]]", {'\t'}, NOMATCH },
- { "[^[:print:]]", {'\10'}, MATCH },
- { "[[:lower:]][[:lower:]]", "ll", MATCH },
-
- { "Curl[[:blank:]];-)", "Curl ;-)", MATCH },
- { "*[[:blank:]]*", " ", MATCH },
- { "*[[:blank:]]*", "", NOMATCH },
- { "*[[:blank:]]*", "hi, im_Pavel", MATCH },
-
- /* common using */
- { "filename.dat", "filename.dat", MATCH },
- { "*curl*", "lets use curl!!", MATCH },
- { "filename.txt", "filename.dat", NOMATCH },
- { "*.txt", "text.txt", MATCH },
- { "*.txt", "a.txt", MATCH },
- { "*.txt", ".txt", MATCH },
- { "*.txt", "txt", NOMATCH },
- { "??.txt", "99.txt", MATCH },
- { "??.txt", "a99.txt", NOMATCH },
- { "?.???", "a.txt", MATCH },
- { "*.???", "somefile.dat", MATCH },
- { "*.???", "photo.jpeg", NOMATCH },
- { ".*", ".htaccess", MATCH },
- { ".*", ".", MATCH },
- { ".*", "..", MATCH },
-
- /* many stars => one star */
- { "**.txt", "text.txt", MATCH },
- { "***.txt", "t.txt", MATCH },
- { "****.txt", ".txt", MATCH },
-
- /* empty string or pattern */
- { "", "", MATCH } ,
- { "", "hello", NOMATCH },
- { "file", "", NOMATCH },
- { "?", "", NOMATCH },
- { "*", "", MATCH },
- { "x", "", NOMATCH },
-
- /* backslash */
- { "\\", "\\", RE_ERR },
- { "\\\\", "\\", MATCH },
- { "\\\\", "\\\\", NOMATCH },
- { "\\?", "?", MATCH },
- { "\\*", "*", MATCH },
- { "?.txt", "?.txt", MATCH },
- { "*.txt", "*.txt", MATCH },
- { "\\?.txt", "?.txt", MATCH },
- { "\\*.txt", "*.txt", MATCH },
- { "\\?.txt", "x.txt", NOMATCH },
- { "\\*.txt", "x.txt", NOMATCH },
- { "\\*\\\\.txt", "*\\.txt", MATCH },
- { "*\\**\\?*\\\\*", "cc*cc?cc\\cc*cc", MATCH },
- { "*\\**\\?*\\\\*", "cc*cc?cccc", NOMATCH },
- { "*\\**\\?*\\\\*", "cc*cc?cc\\cc*cc", MATCH },
- { "*\\?*\\**", "cc?c*c", MATCH },
- { "*\\?*\\**curl*", "cc?c*curl", MATCH },
- { "*\\?*\\**", "cc?cc", NOMATCH },
- { "\\\"\\$\\&\\'\\(\\)", "\"$&'()", MATCH },
- { "\\*\\?\\[\\\\\\`\\|", "*?[\\`|", MATCH },
- { "[\\a\\b]c", "ac", MATCH },
- { "[\\a\\b]c", "bc", MATCH },
- { "[\\a\\b]d", "bc", NOMATCH },
- { "[a-bA-B\\?]", "?", MATCH },
- { "cu[a-ab-b\\r]l", "curl", MATCH },
- { "[\\a-z]", "c", MATCH },
-
- { "?*?*?.*?*", "abc.c", MATCH },
- { "?*?*?.*?*", "abcc", NOMATCH },
- { "?*?*?.*?*", "abc.", NOMATCH },
- { "?*?*?.*?*", "abc.c++", MATCH },
- { "?*?*?.*?*", "abcdef.c++", MATCH },
- { "?*?*?.?", "abcdef.c", MATCH },
- { "?*?*?.?", "abcdef.cd", NOMATCH },
-
- { "Lindmätarv", "Lindmätarv", MATCH },
-
- { "", "", MATCH }
-};
-
-
-int test(char *URL)
-{
- int testnum = sizeof(tests) / sizeof(struct testcase);
- int i, rc;
- (void)URL; /* not used */
-
- if(!strcmp(URL, "check")) {
- /* test harness script verifying if this test can run */
- return 0; /* sure, run this! */
- }
-
- printf("===========================\n");
- for(i = 0; i < testnum; i++) {
- rc = Curl_fnmatch(NULL, tests[i].pattern, tests[i].string);
- if(rc != tests[i].result) {
- printf("Curl_fnmatch(\"%s\", \"%s\") should return %d (returns %d)\n",
- tests[i].pattern, tests[i].string, tests[i].result, rc);
- }
- }
- printf("===========================\n");
- return 0;
-}
-
-#else /* !defined(SKIP_TEST) */
-
-
-int test(char *URL)
-{
- (void)URL;
- fprintf(stdout, "libcurl built with hidden symbols");
- return 1; /* skip test */
-}
-
-
-#endif /* !defined(SKIP_TEST) */
diff --git a/tests/libtest/lib578.c b/tests/libtest/lib578.c
index 2efb003a..a39b3177 100644
--- a/tests/libtest/lib578.c
+++ b/tests/libtest/lib578.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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"
diff --git a/tests/libtest/lib579.c b/tests/libtest/lib579.c
index 2b80ab0b..0e8bd2f1 100644
--- a/tests/libtest/lib579.c
+++ b/tests/libtest/lib579.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
@@ -114,7 +126,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */
- test_setopt(curl, CURLOPT_INFILE, &pooh);
+ test_setopt(curl, CURLOPT_READDATA, &pooh);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
@@ -125,7 +137,7 @@ int test(char *URL)
/* enforce chunked transfer by setting the header */
test_setopt(curl, CURLOPT_HTTPHEADER, slist);
- test_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
+ test_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
test_setopt(curl, CURLOPT_USERPWD, "foo:bar");
/* we want to use our own progress function */
diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c
new file mode 100644
index 00000000..4c3ea6f6
--- /dev/null
+++ b/tests/libtest/lib582.c
@@ -0,0 +1,364 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <fcntl.h>
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+struct Sockets
+{
+ curl_socket_t *sockets;
+ int count; /* number of sockets actually stored in array */
+ int max_count; /* max number of sockets that fit in allocated array */
+};
+
+struct ReadWriteSockets
+{
+ struct Sockets read, write;
+};
+
+/**
+ * Remove a file descriptor from a sockets array.
+ */
+static void removeFd(struct Sockets* sockets, curl_socket_t fd, int mention)
+{
+ int i;
+
+ if(mention)
+ fprintf(stderr, "Remove socket fd %d\n", (int) fd);
+
+ for (i = 0; i < sockets->count; ++i) {
+ if (sockets->sockets[i] == fd) {
+ if (i < sockets->count - 1)
+ memmove(&sockets->sockets[i], &sockets->sockets[i + 1],
+ sizeof(curl_socket_t) * (sockets->count - (i + 1)));
+ --sockets->count;
+ }
+ }
+}
+
+/**
+ * Add a file descriptor to a sockets array.
+ */
+static void addFd(struct Sockets* sockets, curl_socket_t fd, const char *what)
+{
+ /**
+ * To ensure we only have each file descriptor once, we remove it then add
+ * it again.
+ */
+ fprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what);
+ removeFd(sockets, fd, 0);
+ /*
+ * Allocate array storage when required.
+ */
+ if(!sockets->sockets) {
+ sockets->sockets = malloc(sizeof(curl_socket_t) * 20U);
+ if(!sockets->sockets)
+ return;
+ sockets->max_count = 20;
+ }
+ else if(sockets->count + 1 > sockets->max_count) {
+ curl_socket_t *oldptr = sockets->sockets;
+ sockets->sockets = realloc(oldptr, sizeof(curl_socket_t) *
+ (sockets->max_count + 20));
+ if(!sockets->sockets) {
+ /* cleanup in test_cleanup */
+ sockets->sockets = oldptr;
+ return;
+ }
+ sockets->max_count += 20;
+ }
+ /*
+ * Add file descriptor to array.
+ */
+ sockets->sockets[sockets->count] = fd;
+ ++sockets->count;
+}
+
+/**
+ * Callback invoked by curl to poll reading / writing of a socket.
+ */
+static int curlSocketCallback(CURL *easy, curl_socket_t s, int action,
+ void *userp, void *socketp)
+{
+ struct ReadWriteSockets* sockets = userp;
+
+ (void)easy; /* unused */
+ (void)socketp; /* unused */
+
+ if (action == CURL_POLL_IN || action == CURL_POLL_INOUT)
+ addFd(&sockets->read, s, "read");
+
+ if (action == CURL_POLL_OUT || action == CURL_POLL_INOUT)
+ addFd(&sockets->write, s, "write");
+
+ if(action == CURL_POLL_REMOVE) {
+ removeFd(&sockets->read, s, 1);
+ removeFd(&sockets->write, s, 0);
+ }
+
+ return 0;
+}
+
+/**
+ * Callback invoked by curl to set a timeout.
+ */
+static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
+{
+ struct timeval* timeout = userp;
+
+ (void)multi; /* unused */
+ if (timeout_ms != -1) {
+ *timeout = tutil_tvnow();
+ timeout->tv_usec += timeout_ms * 1000;
+ }
+ else {
+ timeout->tv_sec = -1;
+ }
+ return 0;
+}
+
+/**
+ * Check for curl completion.
+ */
+static int checkForCompletion(CURLM* curl, int* success)
+{
+ int numMessages;
+ CURLMsg* message;
+ int result = 0;
+ *success = 0;
+ while ((message = curl_multi_info_read(curl, &numMessages)) != NULL) {
+ if (message->msg == CURLMSG_DONE) {
+ result = 1;
+ if (message->data.result == CURLE_OK)
+ *success = 1;
+ else
+ *success = 0;
+ }
+ else {
+ fprintf(stderr, "Got an unexpected message from curl: %i\n",
+ (int)message->msg);
+ result = 1;
+ *success = 0;
+ }
+ }
+ return result;
+}
+
+static int getMicroSecondTimeout(struct timeval* timeout)
+{
+ struct timeval now;
+ ssize_t result;
+ now = tutil_tvnow();
+ result = (timeout->tv_sec - now.tv_sec) * 1000000 +
+ timeout->tv_usec - now.tv_usec;
+ if (result < 0)
+ result = 0;
+
+ return curlx_sztosi(result);
+}
+
+/**
+ * Update a fd_set with all of the sockets in use.
+ */
+static void updateFdSet(struct Sockets* sockets, fd_set* fdset,
+ curl_socket_t *maxFd)
+{
+ int i;
+ for (i = 0; i < sockets->count; ++i) {
+ FD_SET(sockets->sockets[i], fdset);
+ if (*maxFd < sockets->sockets[i] + 1) {
+ *maxFd = sockets->sockets[i] + 1;
+ }
+ }
+}
+
+static void notifyCurl(CURLM *curl, curl_socket_t s, int evBitmask,
+ const char *info)
+{
+ int numhandles = 0;
+ CURLMcode result = curl_multi_socket_action(curl, s, evBitmask, &numhandles);
+ if (result != CURLM_OK) {
+ fprintf(stderr, "Curl error on %s: %i (%s)\n",
+ info, result, curl_multi_strerror(result));
+ }
+}
+
+/**
+ * Invoke curl when a file descriptor is set.
+ */
+static void checkFdSet(CURLM *curl, struct Sockets *sockets, fd_set *fdset,
+ int evBitmask, const char *name)
+{
+ int i;
+ for (i = 0; i < sockets->count; ++i) {
+ if (FD_ISSET(sockets->sockets[i], fdset)) {
+ notifyCurl(curl, sockets->sockets[i], evBitmask, name);
+ }
+ }
+}
+
+int test(char *URL)
+{
+ int res = 0;
+ CURL *curl = NULL;
+ FILE *hd_src = NULL;
+ int hd ;
+ int error;
+ struct_stat file_info;
+ CURLM *m = NULL;
+ struct ReadWriteSockets sockets = {{NULL, 0, 0}, {NULL, 0, 0}};
+ struct timeval timeout = {-1, 0};
+ int success = 0;
+
+ start_test_timing();
+
+ if (!libtest_arg3) {
+ fprintf(stderr, "Usage: lib582 [url] [filename] [username]\n");
+ return TEST_ERR_USAGE;
+ }
+
+ hd_src = fopen(libtest_arg2, "rb");
+ if(NULL == hd_src) {
+ error = ERRNO;
+ fprintf(stderr, "fopen() failed with error: %d (%s)\n",
+ error, strerror(error));
+ fprintf(stderr, "Error opening file: (%s)\n", libtest_arg2);
+ return TEST_ERR_FOPEN;
+ }
+
+ /* get the file size of the local file */
+ hd = fstat(fileno(hd_src), &file_info);
+ if(hd == -1) {
+ /* can't open file, bail out */
+ error = ERRNO;
+ fprintf(stderr, "fstat() failed with error: %d (%s)\n",
+ error, strerror(error));
+ fprintf(stderr, "ERROR: cannot open file (%s)\n", libtest_arg2);
+ fclose(hd_src);
+ return TEST_ERR_FSTAT;
+ }
+ fprintf(stderr, "Set to upload %d bytes\n", (int)file_info.st_size);
+
+ res_global_init(CURL_GLOBAL_ALL);
+ if(res) {
+ fclose(hd_src);
+ return res;
+ }
+
+ easy_init(curl);
+
+ /* enable uploading */
+ easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* specify target */
+ easy_setopt(curl,CURLOPT_URL, URL);
+
+ /* go verbose */
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* now specify which file to upload */
+ easy_setopt(curl, CURLOPT_READDATA, hd_src);
+
+ easy_setopt(curl, CURLOPT_USERPWD, libtest_arg3);
+ easy_setopt(curl, CURLOPT_SSH_PUBLIC_KEYFILE, "curl_client_key.pub");
+ easy_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE, "curl_client_key");
+
+ easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size);
+
+ multi_init(m);
+
+ multi_setopt(m, CURLMOPT_SOCKETFUNCTION, curlSocketCallback);
+ multi_setopt(m, CURLMOPT_SOCKETDATA, &sockets);
+
+ multi_setopt(m, CURLMOPT_TIMERFUNCTION, curlTimerCallback);
+ multi_setopt(m, CURLMOPT_TIMERDATA, &timeout);
+
+ multi_add_handle(m, curl);
+
+ while (!checkForCompletion(m, &success))
+ {
+ fd_set readSet, writeSet;
+ curl_socket_t maxFd = 0;
+ struct timeval tv = {10, 0};
+
+ FD_ZERO(&readSet);
+ FD_ZERO(&writeSet);
+ updateFdSet(&sockets.read, &readSet, &maxFd);
+ updateFdSet(&sockets.write, &writeSet, &maxFd);
+
+ if (timeout.tv_sec != -1)
+ {
+ int usTimeout = getMicroSecondTimeout(&timeout);
+ tv.tv_sec = usTimeout / 1000000;
+ tv.tv_usec = usTimeout % 1000000;
+ }
+ else if (maxFd <= 0)
+ {
+ tv.tv_sec = 0;
+ tv.tv_usec = 100000;
+ }
+
+ select_test(maxFd, &readSet, &writeSet, NULL, &tv);
+
+ /* Check the sockets for reading / writing */
+ checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read");
+ checkFdSet(m, &sockets.write, &writeSet, CURL_CSELECT_OUT, "write");
+
+ if (timeout.tv_sec != -1 && getMicroSecondTimeout(&timeout) == 0)
+ {
+ /* Curl's timer has elapsed. */
+ notifyCurl(m, CURL_SOCKET_TIMEOUT, 0, "timeout");
+ }
+
+ abort_on_test_timeout();
+ }
+
+ if (!success)
+ {
+ fprintf(stderr, "Error uploading file.\n");
+ res = TEST_ERR_MAJOR_BAD;
+ }
+
+test_cleanup:
+
+ /* proper cleanup sequence - type PB */
+
+ curl_multi_remove_handle(m, curl);
+ curl_easy_cleanup(curl);
+ curl_multi_cleanup(m);
+ curl_global_cleanup();
+
+ /* close the local file */
+ fclose(hd_src);
+
+ /* free local memory */
+ free(sockets.read.sockets);
+ free(sockets.write.sockets);
+
+ return res;
+}
diff --git a/tests/libtest/lib583.c b/tests/libtest/lib583.c
new file mode 100644
index 00000000..ad5a5cea
--- /dev/null
+++ b/tests/libtest/lib583.c
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 test case is based on the sample code provided by Saqib Ali
+ * http://curl.haxx.se/mail/lib-2011-03/0066.html
+ */
+
+#include "test.h"
+
+#include <sys/stat.h>
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+ int stillRunning;
+ CURLM* multiHandle = NULL;
+ CURL* curl = NULL;
+ int res = 0;
+
+ global_init(CURL_GLOBAL_ALL);
+
+ multi_init(multiHandle);
+
+ easy_init(curl);
+
+ easy_setopt(curl, CURLOPT_USERPWD, libtest_arg2);
+ easy_setopt(curl, CURLOPT_SSH_PUBLIC_KEYFILE, "curl_client_key.pub");
+ easy_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE, "curl_client_key");
+
+ easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ easy_setopt(curl, CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_INFILESIZE, (long)5);
+
+ multi_add_handle(multiHandle, curl);
+
+ /* this tests if removing an easy handle immediately after multi
+ perform has been called succeeds or not. */
+
+ fprintf(stderr, "curl_multi_perform()...\n");
+
+ multi_perform(multiHandle, &stillRunning);
+
+ fprintf(stderr, "curl_multi_perform() succeeded\n");
+
+ fprintf(stderr, "curl_multi_remove_handle()...\n");
+ res = (int) curl_multi_remove_handle(multiHandle, curl);
+ if(res)
+ fprintf(stderr, "curl_multi_remove_handle() failed, "
+ "with code %d\n", res);
+ else
+ fprintf(stderr, "curl_multi_remove_handle() succeeded\n");
+
+test_cleanup:
+
+ /* undocumented cleanup sequence - type UB */
+
+ curl_easy_cleanup(curl);
+ curl_multi_cleanup(multiHandle);
+ curl_global_cleanup();
+
+ return res;
+}
diff --git a/tests/libtest/lib586.c b/tests/libtest/lib586.c
new file mode 100644
index 00000000..a1412b5f
--- /dev/null
+++ b/tests/libtest/lib586.c
@@ -0,0 +1,243 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#define THREADS 2
+
+/* struct containing data of a thread */
+struct Tdata {
+ CURLSH *share;
+ char *url;
+};
+
+struct userdata {
+ char *text;
+ int counter;
+};
+
+/* lock callback */
+static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
+ void *useptr )
+{
+ const char *what;
+ struct userdata *user = (struct userdata *)useptr;
+
+ (void)handle;
+ (void)laccess;
+
+ switch ( data ) {
+ case CURL_LOCK_DATA_SHARE:
+ what = "share";
+ break;
+ case CURL_LOCK_DATA_DNS:
+ what = "dns";
+ break;
+ case CURL_LOCK_DATA_COOKIE:
+ what = "cookie";
+ break;
+ case CURL_LOCK_DATA_SSL_SESSION:
+ what = "ssl_session";
+ break;
+ default:
+ fprintf(stderr, "lock: no such data: %d\n", (int)data);
+ return;
+ }
+ printf("lock: %-6s [%s]: %d\n", what, user->text, user->counter);
+ user->counter++;
+}
+
+/* unlock callback */
+static void my_unlock(CURL *handle, curl_lock_data data, void *useptr )
+{
+ const char *what;
+ struct userdata *user = (struct userdata *)useptr;
+ (void)handle;
+ switch ( data ) {
+ case CURL_LOCK_DATA_SHARE:
+ what = "share";
+ break;
+ case CURL_LOCK_DATA_DNS:
+ what = "dns";
+ break;
+ case CURL_LOCK_DATA_COOKIE:
+ what = "cookie";
+ break;
+ case CURL_LOCK_DATA_SSL_SESSION:
+ what = "ssl_session";
+ break;
+ default:
+ fprintf(stderr, "unlock: no such data: %d\n", (int)data);
+ return;
+ }
+ printf("unlock: %-6s [%s]: %d\n", what, user->text, user->counter);
+ user->counter++;
+}
+
+/* the dummy thread function */
+static void *fire(void *ptr)
+{
+ CURLcode code;
+ struct Tdata *tdata = (struct Tdata*)ptr;
+ CURL *curl;
+ int i=0;
+
+ if ((curl = curl_easy_init()) == NULL) {
+ fprintf(stderr, "curl_easy_init() failed\n");
+ return NULL;
+ }
+
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(curl, CURLOPT_URL, tdata->url);
+ printf( "CURLOPT_SHARE\n" );
+ curl_easy_setopt(curl, CURLOPT_SHARE, tdata->share);
+
+ printf( "PERFORM\n" );
+ code = curl_easy_perform(curl);
+ if( code != CURLE_OK ) {
+ fprintf(stderr, "perform url '%s' repeat %d failed, curlcode %d\n",
+ tdata->url, i, (int)code);
+ }
+
+ printf( "CLEANUP\n" );
+ curl_easy_cleanup(curl);
+
+ return NULL;
+}
+
+/* test function */
+int test(char *URL)
+{
+ int res;
+ CURLSHcode scode = CURLSHE_OK;
+ char *url;
+ struct Tdata tdata;
+ CURL *curl;
+ CURLSH *share;
+ int i;
+ struct userdata user;
+
+ user.text = (char *)"Pigs in space";
+ user.counter = 0;
+
+ printf( "GLOBAL_INIT\n" );
+ if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ /* prepare share */
+ printf( "SHARE_INIT\n" );
+ if ((share = curl_share_init()) == NULL) {
+ fprintf(stderr, "curl_share_init() failed\n");
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ if ( CURLSHE_OK == scode ) {
+ printf( "CURLSHOPT_LOCKFUNC\n" );
+ scode = curl_share_setopt( share, CURLSHOPT_LOCKFUNC, my_lock);
+ }
+ if ( CURLSHE_OK == scode ) {
+ printf( "CURLSHOPT_UNLOCKFUNC\n" );
+ scode = curl_share_setopt( share, CURLSHOPT_UNLOCKFUNC, my_unlock);
+ }
+ if ( CURLSHE_OK == scode ) {
+ printf( "CURLSHOPT_USERDATA\n" );
+ scode = curl_share_setopt( share, CURLSHOPT_USERDATA, &user);
+ }
+ if ( CURLSHE_OK == scode ) {
+ printf( "CURL_LOCK_DATA_SSL_SESSION\n" );
+ scode = curl_share_setopt( share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
+ }
+
+ if ( CURLSHE_OK != scode ) {
+ fprintf(stderr, "curl_share_setopt() failed\n");
+ curl_share_cleanup(share);
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+
+ res = 0;
+
+ /* start treads */
+ for (i=1; i<=THREADS; i++ ) {
+
+ /* set thread data */
+ tdata.url = URL;
+ tdata.share = share;
+
+ /* simulate thread, direct call of "thread" function */
+ printf( "*** run %d\n",i );
+ fire( &tdata );
+ }
+
+
+ /* fetch a another one */
+ printf( "*** run %d\n", i );
+ 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 = URL;
+ test_setopt( curl, CURLOPT_URL, url );
+ printf( "CURLOPT_SHARE\n" );
+ test_setopt( curl, CURLOPT_SHARE, share );
+
+ printf( "PERFORM\n" );
+ curl_easy_perform( curl );
+
+ /* try to free share, expect to fail because share is in use*/
+ printf( "try SHARE_CLEANUP...\n" );
+ scode = curl_share_cleanup( share );
+ if ( scode==CURLSHE_OK )
+ {
+ fprintf(stderr, "curl_share_cleanup succeed but error expected\n");
+ share = NULL;
+ } else {
+ printf( "SHARE_CLEANUP failed, correct\n" );
+ }
+
+test_cleanup:
+
+ /* clean up last handle */
+ printf( "CLEANUP\n" );
+ curl_easy_cleanup( curl );
+
+ /* free share */
+ printf( "SHARE_CLEANUP\n" );
+ scode = curl_share_cleanup( share );
+ if ( scode!=CURLSHE_OK )
+ fprintf(stderr, "curl_share_cleanup failed, code errno %d\n",
+ (int)scode);
+
+ printf( "GLOBAL_CLEANUP\n" );
+ curl_global_cleanup();
+
+ return res;
+}
+
diff --git a/tests/libtest/lib590.c b/tests/libtest/lib590.c
new file mode 100644
index 00000000..68603c65
--- /dev/null
+++ b/tests/libtest/lib590.c
@@ -0,0 +1,71 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/*
+ Based on a bug report recipe by Rene Bernhardt in
+ http://curl.haxx.se/mail/lib-2011-10/0323.html
+
+ It is reproducible by the following steps:
+
+ - Use a proxy that offers NTLM and Negotiate ( CURLOPT_PROXY and
+ CURLOPT_PROXYPORT )
+ - Tell libcurl NOT to use Negotiate CURL_EASY_SETOPT(CURLOPT_PROXYAUTH,
+ CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM )
+ - Start the request
+*/
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+ CURLcode res;
+ CURL *curl;
+
+ 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, URL);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_PROXYAUTH,
+ (long) (CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM));
+ test_setopt(curl, CURLOPT_PROXY, libtest_arg2); /* set in first.c */
+ test_setopt(curl, CURLOPT_PROXYUSERPWD, "me:password");
+
+ res = curl_easy_perform(curl);
+
+ test_cleanup:
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return (int)res;
+}
+
diff --git a/tests/libtest/lib591.c b/tests/libtest/lib591.c
new file mode 100644
index 00000000..5cd4644e
--- /dev/null
+++ b/tests/libtest/lib591.c
@@ -0,0 +1,149 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/* lib591 is used for test cases 591, 592, 593 and 594 */
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include <fcntl.h>
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+int test(char *URL)
+{
+ CURL *easy = NULL;
+ CURLM *multi = NULL;
+ int res = 0;
+ int running;
+ int msgs_left;
+ CURLMsg *msg;
+ FILE *upload = NULL;
+ int error;
+
+ start_test_timing();
+
+ upload = fopen(libtest_arg3, "rb");
+ if(!upload) {
+ error = ERRNO;
+ fprintf(stderr, "fopen() failed with error: %d (%s)\n",
+ error, strerror(error));
+ fprintf(stderr, "Error opening file: (%s)\n", libtest_arg3);
+ return TEST_ERR_FOPEN;
+ }
+
+ res_global_init(CURL_GLOBAL_ALL);
+ if(res) {
+ fclose(upload);
+ return res;
+ }
+
+ easy_init(easy);
+
+ /* go verbose */
+ easy_setopt(easy, CURLOPT_VERBOSE, 1L);
+
+ /* specify target */
+ easy_setopt(easy, CURLOPT_URL, URL);
+
+ /* enable uploading */
+ easy_setopt(easy, CURLOPT_UPLOAD, 1L);
+
+ /* data pointer for the file read function */
+ easy_setopt(easy, CURLOPT_READDATA, upload);
+
+ /* use active mode FTP */
+ easy_setopt(easy, CURLOPT_FTPPORT, "-");
+
+ /* server connection timeout */
+ easy_setopt(easy, CURLOPT_ACCEPTTIMEOUT_MS,
+ strtol(libtest_arg2, NULL, 10)*1000);
+
+ multi_init(multi);
+
+ multi_add_handle(multi, easy);
+
+ for(;;) {
+ struct timeval interval;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ long timeout = -99;
+ int maxfd = -99;
+
+ multi_perform(multi, &running);
+
+ abort_on_test_timeout();
+
+ if(!running)
+ break; /* done */
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ multi_timeout(multi, &timeout);
+
+ /* At this point, timeout is guaranteed to be greater or equal than -1. */
+
+ if(timeout != -1L) {
+ int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
+ interval.tv_sec = itimeout/1000;
+ interval.tv_usec = (itimeout%1000)*1000;
+ }
+ else {
+ interval.tv_sec = 0;
+ interval.tv_usec = 100000L; /* 100 ms */
+ }
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+
+ abort_on_test_timeout();
+ }
+
+ msg = curl_multi_info_read(multi, &msgs_left);
+ if(msg)
+ res = msg->data.result;
+
+test_cleanup:
+
+ /* undocumented cleanup sequence - type UA */
+
+ curl_multi_cleanup(multi);
+ curl_easy_cleanup(easy);
+ curl_global_cleanup();
+
+ /* close the local file */
+ fclose(upload);
+
+ return res;
+}
diff --git a/tests/libtest/lib597.c b/tests/libtest/lib597.c
new file mode 100644
index 00000000..a27cefd5
--- /dev/null
+++ b/tests/libtest/lib597.c
@@ -0,0 +1,150 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 5 * 1000
+
+/*
+ * Test case for below scenario:
+ * - Connect to an FTP server using CONNECT_ONLY option
+ * - transfer some files with re-using the connection (omitted in test case)
+ * - Disconnect from FTP server with sending QUIT command
+ *
+ * The test case originated for verifying CONNECT_ONLY option shall not
+ * block after protocol connect is done, but it returns the message
+ * with function curl_multi_info_read().
+ */
+
+enum {
+ CONNECT_ONLY_PHASE = 0,
+ QUIT_PHASE,
+ LAST_PHASE
+};
+
+int test(char *URL)
+{
+ CURL *easy = NULL;
+ CURLM *multi = NULL;
+ int res = 0;
+ int running;
+ int msgs_left;
+ int phase;
+ CURLMsg *msg;
+
+ start_test_timing();
+
+ res_global_init(CURL_GLOBAL_ALL);
+ if(res) {
+ return res;
+ }
+
+ easy_init(easy);
+
+ multi_init(multi);
+
+ for (phase = CONNECT_ONLY_PHASE; phase < LAST_PHASE; ++phase) {
+ /* go verbose */
+ easy_setopt(easy, CURLOPT_VERBOSE, 1L);
+
+ /* specify target */
+ easy_setopt(easy, CURLOPT_URL, URL);
+
+ /* enable 'CONNECT_ONLY' option when in connect phase */
+ if (phase == CONNECT_ONLY_PHASE)
+ easy_setopt(easy, CURLOPT_CONNECT_ONLY, 1L);
+
+ /* enable 'NOBODY' option to send 'QUIT' command in quit phase */
+ if (phase == QUIT_PHASE) {
+ easy_setopt(easy, CURLOPT_CONNECT_ONLY, 0L);
+ easy_setopt(easy, CURLOPT_NOBODY, 1L);
+ easy_setopt(easy, CURLOPT_FORBID_REUSE, 1L);
+ }
+
+ multi_add_handle(multi, easy);
+
+ for(;;) {
+ struct timeval interval;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ long timeout = -99;
+ int maxfd = -99;
+
+ multi_perform(multi, &running);
+
+ abort_on_test_timeout();
+
+ if(!running)
+ break; /* done */
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ multi_timeout(multi, &timeout);
+
+ /* At this point, timeout is guaranteed to be greater or equal than -1. */
+
+ if(timeout != -1L) {
+ int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
+ interval.tv_sec = itimeout/1000;
+ interval.tv_usec = (itimeout%1000)*1000;
+ }
+ else {
+ interval.tv_sec = TEST_HANG_TIMEOUT/1000+1;
+ interval.tv_usec = 0;
+ }
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+
+ abort_on_test_timeout();
+ }
+
+ msg = curl_multi_info_read(multi, &msgs_left);
+ if(msg)
+ res = msg->data.result;
+
+ multi_remove_handle(multi, easy);
+ }
+
+test_cleanup:
+
+ /* undocumented cleanup sequence - type UA */
+
+ curl_multi_cleanup(multi);
+ curl_easy_cleanup(easy);
+ curl_global_cleanup();
+
+ return res;
+}
diff --git a/tests/libtest/lib598.c b/tests/libtest/lib598.c
new file mode 100644
index 00000000..e9c1ad77
--- /dev/null
+++ b/tests/libtest/lib598.c
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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)
+{
+ CURLcode res;
+ CURL *curl;
+
+ 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, URL);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_REFERER, "http://example.com/the-moo");
+ test_setopt(curl, CURLOPT_USERAGENT, "the-moo agent next generation");
+ test_setopt(curl, CURLOPT_COOKIE, "name=moo");
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+ if(res) {
+ fprintf(stderr, "retrieve 1 failed\n");
+ goto test_cleanup;
+ }
+
+ curl_easy_reset(curl);
+
+ test_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+ if(res)
+ fprintf(stderr, "retrieve 2 failed\n");
+
+test_cleanup:
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return (int)res;
+}
+
diff --git a/tests/libtest/lib599.c b/tests/libtest/lib599.c
new file mode 100644
index 00000000..08c536c7
--- /dev/null
+++ b/tests/libtest/lib599.c
@@ -0,0 +1,96 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+static int progress_callback(void *clientp, double dltotal,
+ double dlnow, double ultotal, double ulnow)
+{
+ (void)clientp;
+ (void)ulnow;
+ (void)ultotal;
+
+ if((dltotal > 0.0) && (dlnow > dltotal)) {
+ /* this should not happen with test case 599 */
+ printf("%.0f > %.0f !!\n", dltotal, dlnow);
+ return -1;
+ }
+
+ return 0;
+}
+
+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");
+ 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;
+ }
+
+ /* First set the URL that is about to receive our POST. */
+ test_setopt(curl, CURLOPT_URL, URL);
+
+ /* we want to use our own progress function */
+ test_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+ test_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
+
+ /* get verbose debug output please */
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* follow redirects */
+ test_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ /* include headers in the output */
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+
+ /* 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 */
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return res;
+}
diff --git a/tests/libtest/libauthretry.c b/tests/libtest/libauthretry.c
new file mode 100644
index 00000000..103a89c7
--- /dev/null
+++ b/tests/libtest/libauthretry.c
@@ -0,0 +1,152 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+/* argv1 = URL
+ * argv2 = main auth type
+ * argv3 = second auth type
+ */
+
+#include "test.h"
+#include "strequal.h"
+#include "memdebug.h"
+
+static CURLcode send_request(CURL *curl, const char *url, int seq,
+ long auth_scheme, const char *userpwd)
+{
+ CURLcode res;
+ char* full_url = malloc(strlen(url) + 4 + 1);
+ if (!full_url) {
+ fprintf(stderr, "Not enough memory for full url\n");
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ sprintf(full_url, "%s%04d", url, seq);
+ fprintf(stderr, "Sending new request %d to %s with credential %s "
+ "(auth %ld)\n", seq, full_url, userpwd, auth_scheme);
+ test_setopt(curl, CURLOPT_URL, full_url);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_HTTPGET, 1L);
+ test_setopt(curl, CURLOPT_USERPWD, userpwd);
+ test_setopt(curl, CURLOPT_HTTPAUTH, auth_scheme);
+
+ res = curl_easy_perform(curl);
+
+test_cleanup:
+ free(full_url);
+ return res;
+}
+
+static CURLcode send_wrong_password(CURL *curl, const char *url, int seq,
+ long auth_scheme)
+{
+ return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass");
+}
+
+static CURLcode send_right_password(CURL *curl, const char *url, int seq,
+ long auth_scheme)
+{
+ return send_request(curl, url, seq, auth_scheme, "testuser:testpass");
+}
+
+static long parse_auth_name(const char *arg)
+{
+ if (!arg)
+ return CURLAUTH_NONE;
+ if (strequal(arg, "basic"))
+ return CURLAUTH_BASIC;
+ if (strequal(arg, "digest"))
+ return CURLAUTH_DIGEST;
+ if (strequal(arg, "ntlm"))
+ return CURLAUTH_NTLM;
+ return CURLAUTH_NONE;
+}
+
+int test(char *url)
+{
+ CURLcode res;
+ CURL *curl = NULL;
+
+ long main_auth_scheme = parse_auth_name(libtest_arg2);
+ long fallback_auth_scheme = parse_auth_name(libtest_arg3);
+
+ if (main_auth_scheme == CURLAUTH_NONE ||
+ fallback_auth_scheme == CURLAUTH_NONE) {
+ fprintf(stderr, "auth schemes not found on commandline\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ /* Send wrong password, then right password */
+
+ if ((curl = curl_easy_init()) == NULL) {
+ fprintf(stderr, "curl_easy_init() failed\n");
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ res = send_wrong_password(curl, url, 100, main_auth_scheme);
+ if (res != CURLE_OK)
+ goto test_cleanup;
+ curl_easy_reset(curl);
+
+ res = send_right_password(curl, url, 200, fallback_auth_scheme);
+ if (res != CURLE_OK)
+ goto test_cleanup;
+ curl_easy_reset(curl);
+
+ curl_easy_cleanup(curl);
+
+ /* Send wrong password twice, then right password */
+
+ if ((curl = curl_easy_init()) == NULL) {
+ fprintf(stderr, "curl_easy_init() failed\n");
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ res = send_wrong_password(curl, url, 300, main_auth_scheme);
+ if (res != CURLE_OK)
+ goto test_cleanup;
+ curl_easy_reset(curl);
+
+ res = send_wrong_password(curl, url, 400, fallback_auth_scheme);
+ if (res != CURLE_OK)
+ goto test_cleanup;
+ curl_easy_reset(curl);
+
+ res = send_right_password(curl, url, 500, fallback_auth_scheme);
+ if (res != CURLE_OK)
+ goto test_cleanup;
+ curl_easy_reset(curl);
+
+test_cleanup:
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return (int)res;
+}
+
diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c
new file mode 100644
index 00000000..509b6711
--- /dev/null
+++ b/tests/libtest/libntlmconnect.c
@@ -0,0 +1,281 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#include <assert.h>
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 5 * 1000
+#define MAX_EASY_HANDLES 3
+
+static CURL *easy[MAX_EASY_HANDLES];
+static curl_socket_t sockets[MAX_EASY_HANDLES];
+static int res = 0;
+
+static size_t callback(char* ptr, size_t size, size_t nmemb, void* data)
+{
+ ssize_t idx = ((CURL **) data) - easy;
+ curl_socket_t sock;
+ long longdata;
+ CURLcode code;
+
+ const size_t failure = (size * nmemb) ? 0 : 1;
+
+ char *output = malloc(size * nmemb + 1);
+ if (!output) {
+ fprintf(stderr, "output, malloc() failed\n");
+ res = TEST_ERR_MAJOR_BAD;
+ return failure;
+ }
+
+ memcpy(output, ptr, size * nmemb);
+ output[size * nmemb] = '\0';
+ fprintf(stdout, "%s", output);
+ free(output);
+
+ /* Get socket being used for this easy handle, otherwise CURL_SOCKET_BAD */
+ code = curl_easy_getinfo(easy[idx], CURLINFO_LASTSOCKET, &longdata);
+ if (CURLE_OK != code) {
+ fprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
+ "with code %d (%s)\n",
+ __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
+ res = TEST_ERR_MAJOR_BAD;
+ return failure;
+ }
+ if (longdata == -1L)
+ sock = CURL_SOCKET_BAD;
+ else
+ sock = (curl_socket_t)longdata;
+
+ if (sock != CURL_SOCKET_BAD) {
+ /* Track relationship between this easy handle and the socket. */
+ if (sockets[idx] == CURL_SOCKET_BAD) {
+ /* An easy handle without previous socket, record the socket. */
+ sockets[idx] = sock;
+ }
+ else if (sock != sockets[idx]) {
+ /* An easy handle with a socket different to previously
+ tracked one, log and fail right away. Known bug #37. */
+ fprintf(stderr, "Handle %d started on socket %d and moved to %d\n",
+ curlx_sztosi(idx), (int)sockets[idx], (int)sock);
+ res = TEST_ERR_MAJOR_BAD;
+ return failure;
+ }
+ }
+ return size * nmemb;
+}
+
+enum HandleState {
+ ReadyForNewHandle,
+ NeedSocketForNewHandle,
+ NoMoreHandles
+};
+
+int test(char *url)
+{
+ CURLM *multi = NULL;
+ int running;
+ int i, j;
+ int num_handles = 0;
+ enum HandleState state = ReadyForNewHandle;
+ char* full_url = malloc(strlen(url) + 4 + 1);
+
+ start_test_timing();
+
+ if (!full_url) {
+ fprintf(stderr, "Not enough memory for full url\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ for (i = 0; i < MAX_EASY_HANDLES; ++i) {
+ easy[i] = NULL;
+ sockets[i] = CURL_SOCKET_BAD;
+ }
+
+ res_global_init(CURL_GLOBAL_ALL);
+ if(res) {
+ free(full_url);
+ return res;
+ }
+
+ multi_init(multi);
+
+#ifdef USE_PIPELINING
+ multi_setopt(multi, CURLMOPT_PIPELINING, 1L);
+ multi_setopt(multi, CURLMOPT_MAX_HOST_CONNECTIONS, 5L);
+ multi_setopt(multi, CURLMOPT_MAX_TOTAL_CONNECTIONS, 10L);
+#endif
+
+ for(;;) {
+ struct timeval interval;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ long timeout = -99;
+ int maxfd = -99;
+ bool found_new_socket = FALSE;
+
+ /* Start a new handle if we aren't at the max */
+ if (state == ReadyForNewHandle) {
+ easy_init(easy[num_handles]);
+
+ if (num_handles % 3 == 2) {
+ sprintf(full_url, "%s0200", url);
+ easy_setopt(easy[num_handles], CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
+ } else {
+ sprintf(full_url, "%s0100", url);
+ easy_setopt(easy[num_handles], CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
+ }
+ easy_setopt(easy[num_handles], CURLOPT_FRESH_CONNECT, 1L);
+ easy_setopt(easy[num_handles], CURLOPT_URL, full_url);
+ easy_setopt(easy[num_handles], CURLOPT_VERBOSE, 1L);
+ easy_setopt(easy[num_handles], CURLOPT_HTTPGET, 1L);
+ easy_setopt(easy[num_handles], CURLOPT_USERPWD, "testuser:testpass");
+ easy_setopt(easy[num_handles], CURLOPT_WRITEFUNCTION, callback);
+ easy_setopt(easy[num_handles], CURLOPT_WRITEDATA, easy + num_handles);
+ easy_setopt(easy[num_handles], CURLOPT_HEADER, 1L);
+
+ multi_add_handle(multi, easy[num_handles]);
+ num_handles += 1;
+ state = NeedSocketForNewHandle;
+ }
+
+ multi_perform(multi, &running);
+
+ abort_on_test_timeout();
+
+ if(!running && state == NoMoreHandles)
+ break; /* done */
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+ /* Any socket which is new in fdread is associated with the new handle */
+ for (i = 0; i <= maxfd; ++i) {
+ bool socket_exists = FALSE;
+ curl_socket_t curfd = (curl_socket_t)i;
+
+ if (!FD_ISSET(curfd, &fdread)) {
+ continue;
+ }
+
+ /* Check if this socket was already detected for an earlier handle (or
+ for this handle, num_handles-1, in the callback */
+ for (j = 0; j < num_handles; ++j) {
+ if (sockets[j] == curfd) {
+ socket_exists = TRUE;
+ break;
+ }
+ }
+ if (socket_exists) {
+ continue;
+ }
+
+ if (found_new_socket || state != NeedSocketForNewHandle) {
+ fprintf(stderr, "Unexpected new socket\n");
+ res = TEST_ERR_MAJOR_BAD;
+ goto test_cleanup;
+ }
+
+ /* Now we know the socket is for the most recent handle, num_handles-1 */
+ if (sockets[num_handles-1] != CURL_SOCKET_BAD) {
+ /* A socket for this handle was already detected in the callback; if it
+ matched socket_exists should be true and we would never get here */
+ assert(curfd != sockets[num_handles-1]);
+ fprintf(stderr, "Handle %d wrote to socket %d then detected on %d\n",
+ num_handles-1, (int)sockets[num_handles-1], (int)curfd);
+ res = TEST_ERR_MAJOR_BAD;
+ goto test_cleanup;
+ }
+ else {
+ sockets[num_handles-1] = curfd;
+ found_new_socket = TRUE;
+ /* continue to make sure there's only one new handle */
+ }
+ }
+
+ if (state == NeedSocketForNewHandle) {
+ if(maxfd != -1 && !found_new_socket) {
+ fprintf(stderr, "Warning: socket did not open immediately for new "
+ "handle (trying again)\n");
+ continue;
+ }
+ state = num_handles < MAX_EASY_HANDLES ? ReadyForNewHandle
+ : NoMoreHandles;
+ }
+
+ multi_timeout(multi, &timeout);
+
+ /* At this point, timeout is guaranteed to be greater or equal than -1. */
+
+ fprintf(stderr, "%s:%d num_handles %d timeout %ld\n",
+ __FILE__, __LINE__, num_handles, timeout);
+
+ if(timeout != -1L) {
+ int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
+ interval.tv_sec = itimeout/1000;
+ interval.tv_usec = (itimeout%1000)*1000;
+ }
+ else {
+ interval.tv_sec = TEST_HANG_TIMEOUT/1000+1;
+ interval.tv_usec = 0;
+
+ /* if there's no timeout and we get here on the last handle, we may
+ already have read the last part of the stream so waiting makes no
+ sense */
+ if(!running && num_handles == MAX_EASY_HANDLES) {
+ break;
+ }
+ }
+
+ select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+
+ abort_on_test_timeout();
+ }
+
+test_cleanup:
+
+ /* proper cleanup sequence - type PB */
+
+ for(i = 0; i < MAX_EASY_HANDLES; i++) {
+ curl_multi_remove_handle(multi, easy[i]);
+ curl_easy_cleanup(easy[i]);
+ }
+
+ curl_multi_cleanup(multi);
+ curl_global_cleanup();
+
+ free(full_url);
+
+ return res;
+}
diff --git a/tests/libtest/notexists.pl b/tests/libtest/notexists.pl
new file mode 100755
index 00000000..31b9851e
--- /dev/null
+++ b/tests/libtest/notexists.pl
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+# Check that given arguments do not exist on filesystem.
+my $code = 0;
+if ($#ARGV < 0) {
+ print "Usage: $0 file1 [fileN]\n";
+ exit 2;
+}
+while (@ARGV) {
+ my $fname = shift @ARGV;
+ if (-e $fname) {
+ print "Found '$fname' when not supposed to exist.\n";
+ $code = 1;
+ }
+}
+exit $code;
diff --git a/tests/libtest/sethostname.c b/tests/libtest/sethostname.c
index 3dabb823..9da6a673 100644
--- a/tests/libtest/sethostname.c
+++ b/tests/libtest/sethostname.c
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
-#include "setup.h"
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 "sethostname.h"
diff --git a/tests/libtest/sethostname.h b/tests/libtest/sethostname.h
index 83034a53..032eaa07 100644
--- a/tests/libtest/sethostname.h
+++ b/tests/libtest/sethostname.h
@@ -1,24 +1,33 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
-#if (defined(WIN32) || defined(__SYMBIAN32__)) && !defined(CURL_STATICLIB)
-# if defined(BUILDING_LIBCURL)
-# define LIBHOSTNAME_EXTERN __declspec(dllexport)
-# else
-# define LIBHOSTNAME_EXTERN __declspec(dllimport)
-# endif
+#ifdef CURL_STATICLIB
+# define LIBHOSTNAME_EXTERN
+#elif defined(WIN32) || defined(__SYMBIAN32__)
+# define LIBHOSTNAME_EXTERN __declspec(dllexport)
+#elif defined(CURL_HIDDEN_SYMBOLS)
+# define LIBHOSTNAME_EXTERN CURL_EXTERN_SYMBOL
#else
-# ifdef CURL_HIDDEN_SYMBOLS
-# define LIBHOSTNAME_EXTERN CURL_EXTERN_SYMBOL
-# else
-# define LIBHOSTNAME_EXTERN
-# endif
+# define LIBHOSTNAME_EXTERN
#endif
#ifdef USE_WINSOCK
diff --git a/tests/libtest/test.h b/tests/libtest/test.h
index 2a367118..468eda98 100644
--- a/tests/libtest/test.h
+++ b/tests/libtest/test.h
@@ -1,49 +1,55 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
-/* Now include the setup.h file from libcurl's private libdir (the source
+/* Now include the curl_setup.h file from libcurl's private libdir (the source
version, but that might include "curl_config.h" from the build dir so we
need both of them in the include path), so that we get good in-depth
knowledge about the system we're building this on */
#define CURL_NO_OLDIES
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_SYS_SELECT_H
/* since so many tests use select(), we can just as well include it here */
#include <sys/select.h>
#endif
-#ifdef HAVE_UNISTD_H
-/* at least somewhat oldish FreeBSD systems need this for select() */
-#include <unistd.h>
-#endif
#ifdef TPF
# include "select.h"
#endif
-#define TEST_ERR_MAJOR_BAD 100
-#define TEST_ERR_RUNS_FOREVER 99
+#define _MPRINTF_REPLACE
+#include <curl/mprintf.h>
+
#define test_setopt(A,B,C) \
if((res = curl_easy_setopt((A),(B),(C))) != CURLE_OK) goto test_cleanup
+#define test_multi_setopt(A,B,C) \
+ if((res = curl_multi_setopt((A),(B),(C))) != CURLE_OK) goto test_cleanup
+
extern char *libtest_arg2; /* set by first.c to the argv[2] or NULL */
extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
@@ -51,9 +57,378 @@ extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
extern int test_argc;
extern char **test_argv;
-extern int select_test(int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
- struct timeval *tv);
+extern struct timeval tv_test_start; /* for test timing */
+
+extern int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc,
+ struct timeval *tv);
+
+extern void wait_ms(int ms); /* wait this many milliseconds */
extern int test(char *URL); /* the actual test function provided by each
individual libXXX.c file */
+extern char *hexdump(unsigned char *buffer, size_t len);
+
+#ifdef UNITTESTS
+extern int unitfail;
+#endif
+
+/*
+** TEST_ERR_* values must be greater than CURL_LAST CURLcode in order
+** to avoid confusion with any CURLcode or CURLMcode. These TEST_ERR_*
+** codes are returned to signal test specific situations and should
+** not get mixed with CURLcode or CURLMcode values.
+**
+** For portability reasons TEST_ERR_* values should be less than 127.
+*/
+
+#define TEST_ERR_MAJOR_BAD 126
+#define TEST_ERR_RUNS_FOREVER 125
+#define TEST_ERR_EASY_INIT 124
+#define TEST_ERR_MULTI_INIT 123
+#define TEST_ERR_NUM_HANDLES 122
+#define TEST_ERR_SELECT 121
+#define TEST_ERR_SUCCESS 120
+#define TEST_ERR_FAILURE 119
+#define TEST_ERR_USAGE 118
+#define TEST_ERR_FOPEN 117
+#define TEST_ERR_FSTAT 116
+#define TEST_ERR_BAD_TIMEOUT 115
+
+/*
+** Macros for test source code readability/maintainability.
+**
+** All of the following macros require that an int data type 'res' variable
+** exists in scope where macro is used, and that it has been initialized to
+** zero before the macro is used.
+**
+** exe_* and chk_* macros are helper macros not intended to be used from
+** outside of this header file. Arguments 'Y' and 'Z' of these represent
+** source code file and line number, while Arguments 'A', 'B', etc, are
+** the arguments used to actually call a libcurl function.
+**
+** All easy_* and multi_* macros call a libcurl function and evaluate if
+** the function has succeeded or failed. When the function succeeds 'res'
+** variable is not set nor cleared and program continues normal flow. On
+** the other hand if function fails 'res' variable is set and a jump to
+** label 'test_cleanup' is performed.
+**
+** Every easy_* and multi_* macros have a res_easy_* and res_multi_* macro
+** counterpart that operates in tha same way with the exception that no
+** jump takes place in case of failure. res_easy_* and res_multi_* macros
+** should be immediately followed by checking if 'res' variable has been
+** set.
+**
+** 'res' variable when set will hold a CURLcode, CURLMcode, or any of the
+** TEST_ERR_* values defined above. It is advisable to return this value
+** as test result.
+*/
+
+/* ---------------------------------------------------------------- */
+
+#define exe_easy_init(A,Y,Z) do { \
+ if(((A) = curl_easy_init()) == NULL) { \
+ fprintf(stderr, "%s:%d curl_easy_init() failed\n", (Y), (Z)); \
+ res = TEST_ERR_EASY_INIT; \
+ } \
+} WHILE_FALSE
+
+#define res_easy_init(A) \
+ exe_easy_init((A),(__FILE__),(__LINE__))
+
+#define chk_easy_init(A,Y,Z) do { \
+ exe_easy_init((A),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define easy_init(A) \
+ chk_easy_init((A),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_init(A,Y,Z) do { \
+ if(((A) = curl_multi_init()) == NULL) { \
+ fprintf(stderr, "%s:%d curl_multi_init() failed\n", (Y), (Z)); \
+ res = TEST_ERR_MULTI_INIT; \
+ } \
+} WHILE_FALSE
+
+#define res_multi_init(A) \
+ exe_multi_init((A),(__FILE__),(__LINE__))
+
+#define chk_multi_init(A,Y,Z) do { \
+ exe_multi_init((A),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define multi_init(A) \
+ chk_multi_init((A),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_easy_setopt(A,B,C,Y,Z) do { \
+ CURLcode ec; \
+ if((ec = curl_easy_setopt((A),(B),(C))) != CURLE_OK) { \
+ fprintf(stderr, "%s:%d curl_easy_setopt() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_easy_strerror(ec)); \
+ res = (int)ec; \
+ } \
+} WHILE_FALSE
+
+#define res_easy_setopt(A,B,C) \
+ exe_easy_setopt((A),(B),(C),(__FILE__),(__LINE__))
+
+#define chk_easy_setopt(A,B,C,Y,Z) do { \
+ exe_easy_setopt((A),(B),(C),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define easy_setopt(A,B,C) \
+ chk_easy_setopt((A),(B),(C),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_setopt(A,B,C,Y,Z) do { \
+ CURLMcode ec; \
+ if((ec = curl_multi_setopt((A),(B),(C))) != CURLM_OK) { \
+ fprintf(stderr, "%s:%d curl_multi_setopt() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
+ res = (int)ec; \
+ } \
+} WHILE_FALSE
+
+#define res_multi_setopt(A,B,C) \
+ exe_multi_setopt((A),(B),(C),(__FILE__),(__LINE__))
+
+#define chk_multi_setopt(A,B,C,Y,Z) do { \
+ exe_multi_setopt((A),(B),(C),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define multi_setopt(A,B,C) \
+ chk_multi_setopt((A),(B),(C),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_add_handle(A,B,Y,Z) do { \
+ CURLMcode ec; \
+ if((ec = curl_multi_add_handle((A),(B))) != CURLM_OK) { \
+ fprintf(stderr, "%s:%d curl_multi_add_handle() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
+ res = (int)ec; \
+ } \
+} WHILE_FALSE
+
+#define res_multi_add_handle(A,B) \
+ exe_multi_add_handle((A),(B),(__FILE__),(__LINE__))
+
+#define chk_multi_add_handle(A,B,Y,Z) do { \
+ exe_multi_add_handle((A),(B),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define multi_add_handle(A,B) \
+ chk_multi_add_handle((A),(B),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_remove_handle(A,B,Y,Z) do { \
+ CURLMcode ec; \
+ if((ec = curl_multi_remove_handle((A),(B))) != CURLM_OK) { \
+ fprintf(stderr, "%s:%d curl_multi_remove_handle() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
+ res = (int)ec; \
+ } \
+} WHILE_FALSE
+
+#define res_multi_remove_handle(A,B) \
+ exe_multi_remove_handle((A),(B),(__FILE__),(__LINE__))
+
+#define chk_multi_remove_handle(A,B,Y,Z) do { \
+ exe_multi_remove_handle((A),(B),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+
+#define multi_remove_handle(A,B) \
+ chk_multi_remove_handle((A),(B),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_perform(A,B,Y,Z) do { \
+ CURLMcode ec; \
+ if((ec = curl_multi_perform((A),(B))) != CURLM_OK) { \
+ fprintf(stderr, "%s:%d curl_multi_perform() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
+ res = (int)ec; \
+ } \
+ else if(*((B)) < 0) { \
+ fprintf(stderr, "%s:%d curl_multi_perform() succeeded, " \
+ "but returned invalid running_handles value (%d)\n", \
+ (Y), (Z), (int)*((B))); \
+ res = TEST_ERR_NUM_HANDLES; \
+ } \
+} WHILE_FALSE
+
+#define res_multi_perform(A,B) \
+ exe_multi_perform((A),(B),(__FILE__),(__LINE__))
+
+#define chk_multi_perform(A,B,Y,Z) do { \
+ exe_multi_perform((A),(B),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define multi_perform(A,B) \
+ chk_multi_perform((A),(B),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_fdset(A,B,C,D,E,Y,Z) do { \
+ CURLMcode ec; \
+ if((ec = curl_multi_fdset((A),(B),(C),(D),(E))) != CURLM_OK) { \
+ fprintf(stderr, "%s:%d curl_multi_fdset() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
+ res = (int)ec; \
+ } \
+ else if(*((E)) < -1) { \
+ fprintf(stderr, "%s:%d curl_multi_fdset() succeeded, " \
+ "but returned invalid max_fd value (%d)\n", \
+ (Y), (Z), (int)*((E))); \
+ res = TEST_ERR_NUM_HANDLES; \
+ } \
+} WHILE_FALSE
+
+#define res_multi_fdset(A,B,C,D,E) \
+ exe_multi_fdset((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+
+#define chk_multi_fdset(A,B,C,D,E,Y,Z) do { \
+ exe_multi_fdset((A),(B),(C),(D),(E),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define multi_fdset(A,B,C,D,E) \
+ chk_multi_fdset((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_timeout(A,B,Y,Z) do { \
+ CURLMcode ec; \
+ if((ec = curl_multi_timeout((A),(B))) != CURLM_OK) { \
+ fprintf(stderr, "%s:%d curl_multi_timeout() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
+ res = (int)ec; \
+ } \
+ else if(*((B)) < -1L) { \
+ fprintf(stderr, "%s:%d curl_multi_timeout() succeeded, " \
+ "but returned invalid timeout value (%ld)\n", \
+ (Y), (Z), (long)*((B))); \
+ res = TEST_ERR_BAD_TIMEOUT; \
+ } \
+} WHILE_FALSE
+
+#define res_multi_timeout(A,B) \
+ exe_multi_timeout((A),(B),(__FILE__),(__LINE__))
+
+#define chk_multi_timeout(A,B,Y,Z) do { \
+ exe_multi_timeout((A),(B),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define multi_timeout(A,B) \
+ chk_multi_timeout((A),(B),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_select_test(A,B,C,D,E,Y,Z) do { \
+ int ec; \
+ if(select_wrapper((A),(B),(C),(D),(E)) == -1 ) { \
+ ec = SOCKERRNO; \
+ fprintf(stderr, "%s:%d select() failed, with " \
+ "errno %d (%s)\n", \
+ (Y), (Z), ec, strerror(ec)); \
+ res = TEST_ERR_SELECT; \
+ } \
+} WHILE_FALSE
+
+#define res_select_test(A,B,C,D,E) \
+ exe_select_test((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+
+#define chk_select_test(A,B,C,D,E,Y,Z) do { \
+ exe_select_test((A),(B),(C),(D),(E),(Y),(Z)); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define select_test(A,B,C,D,E) \
+ chk_select_test((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define start_test_timing() do { \
+ tv_test_start = tutil_tvnow(); \
+} WHILE_FALSE
+
+#define exe_test_timedout(Y,Z) do { \
+ if(tutil_tvdiff(tutil_tvnow(), tv_test_start) > TEST_HANG_TIMEOUT) { \
+ fprintf(stderr, "%s:%d ABORTING TEST, since it seems " \
+ "that it would have run forever.\n", (Y), (Z)); \
+ res = TEST_ERR_RUNS_FOREVER; \
+ } \
+} WHILE_FALSE
+
+#define res_test_timedout() \
+ exe_test_timedout((__FILE__),(__LINE__))
+
+#define chk_test_timedout(Y,Z) do { \
+ exe_test_timedout(Y,Z); \
+ if(res) \
+ goto test_cleanup; \
+} WHILE_FALSE
+
+#define abort_on_test_timeout() \
+ chk_test_timedout((__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_global_init(A,Y,Z) do { \
+ CURLcode ec; \
+ if((ec = curl_global_init((A))) != CURLE_OK) { \
+ fprintf(stderr, "%s:%d curl_global_init() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_easy_strerror(ec)); \
+ res = (int)ec; \
+ } \
+} WHILE_FALSE
+
+#define res_global_init(A) \
+ exe_global_init((A),(__FILE__),(__LINE__))
+
+#define chk_global_init(A,Y,Z) do { \
+ exe_global_init((A),(Y),(Z)); \
+ if(res) \
+ return res; \
+} WHILE_FALSE
+
+/* global_init() is different than other macros. In case of
+ failure it 'return's instead of going to 'test_cleanup'. */
+
+#define global_init(A) \
+ chk_global_init((A),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
diff --git a/tests/libtest/test1013.pl b/tests/libtest/test1013.pl
index 99ad524e..b680273d 100755
--- a/tests/libtest/test1013.pl
+++ b/tests/libtest/test1013.pl
@@ -18,11 +18,12 @@ while( <CURL> )
}
close CURL;
+$curl_protocols =~ s/\r//;
$curl_protocols =~ /\w+: (.*)$/;
@curl = split / /,$1;
# These features are not supported by curl-config
-@curl = grep(!/^(Debug|TrackMemory|Largefile|CharConv|GSS-Negotiate|SPNEGO)$/i, @curl);
+@curl = grep(!/^(Debug|TrackMemory|Metalink|Largefile|CharConv)$/i, @curl);
@curl = sort @curl;
# Read the output of curl-config
@@ -31,6 +32,7 @@ open(CURLCONFIG, "sh $ARGV[0] --$what|") || die "Can't get curl-config $what lis
while( <CURLCONFIG> )
{
chomp;
+ # ignore curl-config --features not in curl's feature list
push @curl_config, lc($_);
}
close CURLCONFIG;
diff --git a/tests/libtest/test1022.pl b/tests/libtest/test1022.pl
index 60eee384..377808c7 100755
--- a/tests/libtest/test1022.pl
+++ b/tests/libtest/test1022.pl
@@ -12,7 +12,7 @@ my $what=$ARGV[2];
open(CURL, "$ARGV[1]") || die "Can't open curl --version list in $ARGV[1]\n";
$_ = <CURL>;
chomp;
-/libcurl\/([\.\d]+(-DEV)?)/;
+/libcurl\/([\.\d]+((-DEV)|(-\d+))?)/;
my $version = $1;
close CURL;
@@ -22,17 +22,26 @@ my $curlconfigversion;
open(CURLCONFIG, "sh $ARGV[0] --$what|") || die "Can't get curl-config --$what list\n";
$_ = <CURLCONFIG>;
chomp;
+my $filever=$_;
if ( $what eq "version" ) {
- /^libcurl ([\.\d]+(-DEV)?)$/ ;
- $curlconfigversion = $1;
+ if($filever =~ /^libcurl ([\.\d]+((-DEV)|(-\d+))?)$/) {
+ $curlconfigversion = $1;
+ }
+ else {
+ $curlconfigversion = "illegal value";
+ }
}
-else {
+else { # "vernum" case
# Convert hex version to decimal for comparison's sake
- /^(..)(..)(..)$/ ;
- $curlconfigversion = hex($1) . "." . hex($2) . "." . hex($3);
+ if($filever =~ /^(..)(..)(..)$/) {
+ $curlconfigversion = hex($1) . "." . hex($2) . "." . hex($3);
+ }
+ else {
+ $curlconfigversion = "illegal value";
+ }
# Strip off the -DEV from the curl version if it's there
- $version =~ s/-DEV$//;
+ $version =~ s/-\w*$//;
}
close CURLCONFIG;
diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c
new file mode 100644
index 00000000..8d9c6b81
--- /dev/null
+++ b/tests/libtest/testtrace.c
@@ -0,0 +1,142 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 "testutil.h"
+#include "testtrace.h"
+#include "memdebug.h"
+
+struct libtest_trace_cfg libtest_debug_config;
+
+static time_t epoch_offset; /* for test time tracing */
+static int known_offset; /* for test time tracing */
+
+static
+void libtest_debug_dump(const char *timebuf, const char *text, FILE *stream,
+ const unsigned char *ptr, size_t size, int nohex)
+{
+ size_t i;
+ size_t c;
+
+ unsigned int width = 0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stream, "%s%s, %d bytes (0x%x)\n", timebuf, text,
+ (int)size, (int)size);
+
+ for(i = 0; i < size; i += width) {
+
+ fprintf(stream, "%04x: ", (int)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i+c < size)
+ fprintf(stream, "%02x ", ptr[i+c]);
+ else
+ fputs(" ", stream);
+ }
+
+ for(c = 0; (c < width) && (i+c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if(nohex &&
+ (i+c+1 < size) && (ptr[i+c] == 0x0D) && (ptr[i+c+1] == 0x0A)) {
+ i += (c+2-width);
+ break;
+ }
+ fprintf(stream, "%c", ((ptr[i+c] >= 0x20) && (ptr[i+c] < 0x80)) ?
+ ptr[i+c] : '.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if(nohex &&
+ (i+c+2 < size) && (ptr[i+c+1] == 0x0D) && (ptr[i+c+2] == 0x0A)) {
+ i += (c+3-width);
+ break;
+ }
+ }
+ fputc('\n', stream); /* newline */
+ }
+ fflush(stream);
+}
+
+int libtest_debug_cb(CURL *handle, curl_infotype type,
+ unsigned char *data, size_t size,
+ void *userp)
+{
+
+ struct libtest_trace_cfg *trace_cfg = userp;
+ const char *text;
+ struct timeval tv;
+ struct tm *now;
+ char timebuf[20];
+ char *timestr;
+ time_t secs;
+
+ (void)handle;
+
+ timebuf[0] = '\0';
+ timestr = &timebuf[0];
+
+ if(trace_cfg->tracetime) {
+ tv = tutil_tvnow();
+ if(!known_offset) {
+ epoch_offset = time(NULL) - tv.tv_sec;
+ known_offset = 1;
+ }
+ secs = epoch_offset + tv.tv_sec;
+ now = localtime(&secs); /* not thread safe but we don't care */
+ snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld ",
+ now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
+ }
+
+ switch (type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "%s== Info: %s", timestr, (char *)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;
+ }
+
+ libtest_debug_dump(timebuf, text, stderr, data, size, trace_cfg->nohex);
+ return 0;
+}
+
diff --git a/tests/libtest/testtrace.h b/tests/libtest/testtrace.h
new file mode 100644
index 00000000..73d2489a
--- /dev/null
+++ b/tests/libtest/testtrace.h
@@ -0,0 +1,37 @@
+#ifndef HEADER_LIBTEST_TESTTRACE_H
+#define HEADER_LIBTEST_TESTTRACE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+struct libtest_trace_cfg {
+ int tracetime; /* 0 represents FALSE, anything else TRUE */
+ int nohex; /* 0 represents FALSE, anything else TRUE */
+};
+
+extern struct libtest_trace_cfg libtest_debug_config;
+
+int libtest_debug_cb(CURL *handle, curl_infotype type,
+ unsigned char *data, size_t size,
+ void *userp);
+
+#endif /* HEADER_LIBTEST_TESTTRACE_H */
+
diff --git a/tests/libtest/testutil.c b/tests/libtest/testutil.c
index 63393c58..b18a6073 100644
--- a/tests/libtest/testutil.c
+++ b/tests/libtest/testutil.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,8 +19,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#include "setup.h"
+#include "curl_setup.h"
#include "testutil.h"
#include "memdebug.h"
@@ -123,8 +122,11 @@ long tutil_tvdiff(struct timeval newer, struct timeval older)
*/
double tutil_tvdiff_secs(struct timeval newer, struct timeval older)
{
- return (double)(newer.tv_sec-older.tv_sec)+
- (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+ if(newer.tv_sec != older.tv_sec)
+ return (double)(newer.tv_sec-older.tv_sec)+
+ (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+ else
+ return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
}
/* return the number of seconds in the given input timeval struct */
diff --git a/tests/libtest/testutil.h b/tests/libtest/testutil.h
index 6a322e3c..a236970a 100644
--- a/tests/libtest/testutil.h
+++ b/tests/libtest/testutil.h
@@ -1,5 +1,5 @@
-#ifndef __LIBTEST_TESTUTIL_H
-#define __LIBTEST_TESTUTIL_H
+#ifndef HEADER_CURL_LIBTEST_TESTUTIL_H
+#define HEADER_CURL_LIBTEST_TESTUTIL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,9 +21,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#include "setup.h"
-
+#include "curl_setup.h"
struct timeval tutil_tvnow(void);
@@ -45,5 +43,5 @@ double tutil_tvdiff_secs(struct timeval t1, struct timeval t2);
long tutil_tvlong(struct timeval t1);
-#endif /* __LIBTEST_TESTUTIL_H */
+#endif /* HEADER_CURL_LIBTEST_TESTUTIL_H */
diff --git a/tests/mem-include-scan.pl b/tests/mem-include-scan.pl
new file mode 100644
index 00000000..676df25e
--- /dev/null
+++ b/tests/mem-include-scan.pl
@@ -0,0 +1,96 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2010-2012, Daniel Stenberg, <daniel@haxx.se>, 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 script scans C source files. If they seem to use memory functions,
+# it also makes sure that it #includes the correct two header files!
+#
+# You can also mark a C source as fine by using 'mem-include-scan' anywhere in
+# it.
+#
+
+use strict;
+use warnings;
+
+my $dir = $ARGV[0] || die "specify directory!";
+
+sub scanfile {
+ my ($file) = @_;
+ my $memfunc;
+ my $memdebug;
+ my $curlmem;
+
+ print STDERR "checking $file...\n";
+
+ open(F, "<$file");
+ while(<F>) {
+ if($_ =~ /(free|alloc|strdup)\(/) {
+ $memfunc++;
+ }
+ elsif($_ =~ /^ *# *include \"memdebug.h\"/) {
+ $memdebug++;
+ }
+ elsif($_ =~ /^ *# *include \"curl_memory.h\"/) {
+ $curlmem++;
+ }
+ elsif($_ =~ /mem-include-scan/) {
+ # free pass
+ close(F);
+ return 0;
+ }
+ if($memfunc && $memdebug && $curlmem) {
+ last;
+ }
+ }
+ close(F);
+
+
+ if($memfunc) {
+ if($memdebug && $curlmem) {
+ return 0;
+ }
+ else {
+ if(!$memdebug) {
+ print STDERR "$file doesn't include \"memdebug.h\"!\n";
+ }
+ if(!$curlmem) {
+ print STDERR "$file doesn't include \"curl_memory.h\"!\n";
+ }
+ return 1;
+ }
+ }
+ return 0;
+}
+
+opendir(my $dh, $dir) || die "can't opendir $dir: $!";
+my @cfiles = grep { /\.c\z/ && -f "$dir/$_" } readdir($dh);
+closedir $dh;
+
+my $errs;
+for(@cfiles) {
+ $errs += scanfile("$dir/$_");
+}
+
+if($errs) {
+ print STDERR "----\n$errs errors detected!\n";
+ exit 2;
+}
diff --git a/tests/memanalyze.pl b/tests/memanalyze.pl
index e9f9d225..701cf161 100755
--- a/tests/memanalyze.pl
+++ b/tests/memanalyze.pl
@@ -1,4 +1,25 @@
#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
#
# Example input:
#
@@ -10,6 +31,7 @@ my $mallocs=0;
my $callocs=0;
my $reallocs=0;
my $strdups=0;
+my $wcsdups=0;
my $showlimit;
while(1) {
@@ -86,9 +108,12 @@ while(<FILE>) {
$linenum = $2;
$function = $3;
- if($function =~ /free\(0x([0-9a-f]*)/) {
- $addr = $1;
- if(!exists $sizeataddr{$addr}) {
+ if($function =~ /free\((\(nil\)|0x([0-9a-f]*))/) {
+ $addr = $2;
+ if($1 eq "(nil)") {
+ ; # do nothing when free(NULL)
+ }
+ elsif(!exists $sizeataddr{$addr}) {
print "FREE ERROR: No memory allocated: $line\n";
}
elsif(-1 == $sizeataddr{$addr}) {
@@ -199,6 +224,25 @@ while(<FILE>) {
newtotal($totalmem);
$strdups++;
}
+ elsif($function =~ /wcsdup\(0x([0-9a-f]*)\) \((\d*)\) = 0x([0-9a-f]*)/) {
+ # wcsdup(a5b50) (8) = df7c0
+
+ $dup = $1;
+ $size = $2;
+ $addr = $3;
+ $getmem{$addr}="$source:$linenum";
+ $sizeataddr{$addr}=$size;
+
+ $totalmem += $size;
+
+ if($trace) {
+ printf("WCSDUP: $size bytes at %s, makes totally: %d bytes\n",
+ $getmem{$addr}, $totalmem);
+ }
+
+ newtotal($totalmem);
+ $wcsdups++;
+ }
else {
print "Not recognized input line: $function\n";
}
@@ -215,6 +259,14 @@ while(<FILE>) {
$getfile{$1}="$source:$linenum";
$openfile++;
}
+ elsif($function =~ /socketpair\(\) = (\d*) (\d*)/) {
+ $filedes{$1}=1;
+ $getfile{$1}="$source:$linenum";
+ $openfile++;
+ $filedes{$2}=1;
+ $getfile{$2}="$source:$linenum";
+ $openfile++;
+ }
elsif($function =~ /accept\(\) = (\d*)/) {
$filedes{$1}=1;
$getfile{$1}="$source:$linenum";
@@ -237,7 +289,7 @@ while(<FILE>) {
$linenum = $2;
$function = $3;
- if($function =~ /f[d]*open\(\"([^\"]*)\",\"([^\"]*)\"\) = (\(nil\)|0x([0-9a-f]*))/) {
+ if($function =~ /f[d]*open\(\"(.*)\",\"([^\"]*)\"\) = (\(nil\)|0x([0-9a-f]*))/) {
if($3 eq "(nil)") {
;
}
@@ -349,8 +401,9 @@ if($verbose) {
"Reallocs: $reallocs\n",
"Callocs: $callocs\n",
"Strdups: $strdups\n",
+ "Wcsdups: $wcsdups\n",
"Frees: $frees\n",
- "Allocations: ".($mallocs + $callocs + $reallocs + $strdups)."\n";
+ "Allocations: ".($mallocs + $callocs + $reallocs + $strdups + $wcsdups)."\n";
print "Maximum allocated: $maxmem\n";
}
diff --git a/tests/rtspserver.pl b/tests/rtspserver.pl
index 515128d7..07a588ec 100755
--- a/tests/rtspserver.pl
+++ b/tests/rtspserver.pl
@@ -22,7 +22,8 @@
#***************************************************************************
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
}
use strict;
diff --git a/tests/runtests.1 b/tests/runtests.1
index 45f87833..cb765a64 100644
--- a/tests/runtests.1
+++ b/tests/runtests.1
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -49,10 +49,14 @@ default, the test script stops as soon as an error is detected.
.IP "-bN"
Use N as the base TCP/UDP port number on which to start the test servers.
.IP "-c <curl>"
-Provide a custom curl binary to run the tests with. Default is the curl
-executable in the build tree.
+Provide a path to a custom curl binary to run the tests with. Default is the
+curl executable in the build tree.
.IP "-d"
Enable protocol debug: have the servers display protocol output.
+.IP "-e"
+Run the test event-based (if possible). This will make runtests invoke curl
+with --test-event option. This option only works if both curl and libcurl were
+built debug-enabled.
.IP "-g"
Run the given test(s) with gdb. This is best used on a single test case and
curl built --disable-shared. This then fires up gdb with command line set to
@@ -88,6 +92,10 @@ through everyone, which is very handy when debugging and then often in
combination with \fI-g\fP.
.IP "-v"
Enable verbose output. Speaks more than default.
+.IP "-vc <curl>"
+Provide a path to a custom curl binary to run when verifying that the servers
+running are indeed our test servers. Default is the curl executable in the
+build tree.
.SH "RUNNING TESTS"
Many tests have conditions that must be met before the test case can run
fine. They could depend on built-in features in libcurl or features present in
diff --git a/tests/runtests.html b/tests/runtests.html
deleted file mode 100644
index e308cdb5..00000000
--- a/tests/runtests.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<html><head>
-<title>runtests.pl man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">runtests.pl - run one or more test cases <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">runtests.pl [options] [test number] [!test number] [key word] [!key word]</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="emphasis">runtests.pl</span> runs one, several or all the existing test cases in curl's test suite. It is often called from the root Makefile of the curl package with 'make test'. <a name="TEST"></a><h2 class="nroffsh">TEST NUMBER</h2>
-<p class="level0">If no test case number is given, all existing tests that the script can find will be considered for running. You can specify single test cases to run, space-separated, like "1 3 5 7 11", and you can specify a range like "45 to 67". You can also specify only the tests you don't want to run by listing the numbers with a leading exclamation point, like "!66".
-<p class="level0">It is also possible to specify tests to skip based on a key word describing the test. These are specified with a leading exclamation point and the key word or phrase, like "!HTTP NTLM auth". Likewise, tests to run can be specified simply by specifying the unadorned key words, like "FTPS". Remember that the exclamation marks and spaces will need to be quoted somehow when entered at many command shells. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="-a"></a><span class="nroffip">-a</span>
-<p class="level1">Continue running the rest of the test cases even if one test fails. By default, the test script stops as soon as an error is detected.
-<p class="level0"><a name="-bN"></a><span class="nroffip">-bN</span>
-<p class="level1">Use N as the base TCP/UDP port number on which to start the test servers.
-<p class="level0"><a name="-c"></a><span class="nroffip">-c &lt;curl&gt;</span>
-<p class="level1">Provide a custom curl binary to run the tests with. Default is the curl executable in the build tree.
-<p class="level0"><a name="-d"></a><span class="nroffip">-d</span>
-<p class="level1">Enable protocol debug: have the servers display protocol output.
-<p class="level0"><a name="-g"></a><span class="nroffip">-g</span>
-<p class="level1">Run the given test(s) with gdb. This is best used on a single test case and curl built --disable-shared. This then fires up gdb with command line set to run the specified test case. Simply (set a break-point and) type 'run' to start.
-<p class="level0"><a name="-h"></a><span class="nroffip">-h</span>
-<p class="level1">Displays a help text about this program's command line options.
-<p class="level0"><a name="-k"></a><span class="nroffip">-k</span>
-<p class="level1">Keep output and log files in log/ after a test run, even if no error was detected. Useful for debugging.
-<p class="level0"><a name="-l"></a><span class="nroffip">-l</span>
-<p class="level1">Lists all test case names.
-<p class="level0"><a name="-n"></a><span class="nroffip">-n</span>
-<p class="level1">Disable the check for and use of valgrind.
-<p class="level0"><a name="-p"></a><span class="nroffip">-p</span>
-<p class="level1">Prints out all files in "log/" to stdout when a test case fails. Very practical when used in the automated and distributed tests since then the people checking the failures and the reasons for them might not have physical access to the machine and logs.
-<p class="level0"><a name="-r"></a><span class="nroffip">-r</span>
-<p class="level1">Display run time statistics. (Requires Perl Time::HiRes module)
-<p class="level0"><a name="-rf"></a><span class="nroffip">-rf</span>
-<p class="level1">Display full run time statistics. (Requires Perl Time::HiRes module)
-<p class="level0"><a name="-s"></a><span class="nroffip">-s</span>
-<p class="level1">Shorter output. Speaks less than default.
-<p class="level0"><a name="-tnum"></a><span class="nroffip">-t[num]</span>
-<p class="level1">Selects a <span Class="bold">torture</span> test for the given tests. This makes runtests.pl first run the tests once and count the number of memory allocations made. It then reruns the test that number of times, each time forcing one of the allocations to fail until all allocs have been tested. By setting <span Class="emphasis">num</span> you can force the allocation with that number to be set to fail at once instead of looping through everyone, which is very handy when debugging and then often in combination with <a class="emphasis" href="#-g">-g</a>.
-<p class="level0"><a name="-v"></a><span class="nroffip">-v</span>
-<p class="level1">Enable verbose output. Speaks more than default. <a name="RUNNING"></a><h2 class="nroffsh">RUNNING TESTS</h2>
-<p class="level0">Many tests have conditions that must be met before the test case can run fine. They could depend on built-in features in libcurl or features present in the operating system or even in third-party libraries that curl may or may not use.
-<p class="level0">The test script checks most of these by itself to determine when it is safe to attempt to run each test. Those which cannot be run due to failed requirements will simply be skipped and listed at the completion of all test cases. In some unusual configurations, the test script cannot make the correct determination for all tests. In these cases, the problematic tests can be skipped using the "!keyword" skip feature documented earlier. <a name="WRITING"></a><h2 class="nroffsh">WRITING TESTS</h2>
-<p class="level0">The simplest way to write test cases is to start with a similar existing test, save it with a new number and then adjust it to fit. There's an attempt to document the test case file format in the tests/FILEFORMAT. <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/tests/runtests.pdf b/tests/runtests.pdf
deleted file mode 100644
index a8a79e70..00000000
--- a/tests/runtests.pdf
+++ /dev/null
Binary files differ
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 347adf7e..01010913 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,8 @@
# These should be the only variables that might be needed to get edited:
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, ".");
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
# run time statistics needs Time::HiRes
eval {
no warnings "all";
@@ -100,6 +101,7 @@ use sshhelp qw(
find_sshd
find_ssh
find_sftp
+ find_httptlssrv
sshversioninfo
);
@@ -114,27 +116,32 @@ my $CLIENT6IP="[::1]"; # address which curl uses for incoming connections
my $base = 8990; # base port number
-my $HTTPPORT; # HTTP server port
-my $HTTP6PORT; # HTTP IPv6 server port
-my $HTTPSPORT; # HTTPS server port
-my $FTPPORT; # FTP server port
-my $FTP2PORT; # FTP server 2 port
-my $FTPSPORT; # FTPS server port
-my $FTP6PORT; # FTP IPv6 server port
-my $TFTPPORT; # TFTP
-my $TFTP6PORT; # TFTP
-my $SSHPORT; # SCP/SFTP
-my $SOCKSPORT; # SOCKS4/5 port
-my $POP3PORT; # POP3
-my $POP36PORT; # POP3 IPv6 server port
-my $IMAPPORT; # IMAP
-my $IMAP6PORT; # IMAP IPv6 server port
-my $SMTPPORT; # SMTP
-my $SMTP6PORT; # SMTP IPv6 server port
-my $RTSPPORT; # RTSP
-my $RTSP6PORT; # RTSP IPv6 server port
-my $GOPHERPORT; # Gopher
-my $GOPHER6PORT; # Gopher IPv6 server port
+my $HTTPPORT; # HTTP server port
+my $HTTP6PORT; # HTTP IPv6 server port
+my $HTTPSPORT; # HTTPS (stunnel) server port
+my $FTPPORT; # FTP server port
+my $FTP2PORT; # FTP server 2 port
+my $FTPSPORT; # FTPS (stunnel) server port
+my $FTP6PORT; # FTP IPv6 server port
+my $TFTPPORT; # TFTP
+my $TFTP6PORT; # TFTP
+my $SSHPORT; # SCP/SFTP
+my $SOCKSPORT; # SOCKS4/5 port
+my $POP3PORT; # POP3
+my $POP36PORT; # POP3 IPv6 server port
+my $IMAPPORT; # IMAP
+my $IMAP6PORT; # IMAP IPv6 server port
+my $SMTPPORT; # SMTP
+my $SMTP6PORT; # SMTP IPv6 server port
+my $RTSPPORT; # RTSP
+my $RTSP6PORT; # RTSP IPv6 server port
+my $GOPHERPORT; # Gopher
+my $GOPHER6PORT; # Gopher IPv6 server port
+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
@@ -145,8 +152,11 @@ my $DBGCURL=$CURL; #"../src/.libs/curl"; # alternative for debugging
my $LOGDIR="log";
my $TESTDIR="$srcdir/data";
my $LIBDIR="./libtest";
+my $UNITDIR="./unit";
+# TODO: change this to use server_inputfilename()
my $SERVERIN="$LOGDIR/server.input"; # what curl sent the server
my $SERVER2IN="$LOGDIR/server2.input"; # what curl sent the second server
+my $PROXYIN="$LOGDIR/proxy.input"; # what curl sent the proxy
my $CURLLOG="$LOGDIR/curl.log"; # all command lines run
my $FTPDCMD="$LOGDIR/ftpserver.cmd"; # copy ftp server instructions here
my $SERVERLOGS_LOCK="$LOGDIR/serverlogs.lock"; # server logs advisor read lock
@@ -167,8 +177,8 @@ my $TESTCASES="all";
my $perl="perl -I$srcdir";
my $server_response_maxtime=13;
-my $debug_build=0; # curl built with --enable-debug
-my $curl_debug=0; # curl built with --enable-curldebug (memory tracking)
+my $debug_build=0; # built debug enabled (--enable-debug)
+my $has_memory_tracking=0; # built with memory tracking (--enable-curldebug)
my $libtool;
# name of the file that the memory debugging creates:
@@ -180,47 +190,73 @@ my $memanalyze="$perl $srcdir/memanalyze.pl";
my $pwd = getcwd(); # current working directory
my $start;
-my $forkserver=0;
my $ftpchecktime=1; # time it took to verify our test FTP server
-my $stunnel = checkcmd("stunnel4") || checkcmd("stunnel");
+my $stunnel = checkcmd("stunnel4") || checkcmd("tstunnel") || checkcmd("stunnel");
my $valgrind = checktestcmd("valgrind");
my $valgrind_logfile="--logfile";
my $valgrind_tool;
my $gdb = checktestcmd("gdb");
-
-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 $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 $has_getrlimit; # set if system has getrlimit()
-my $has_ntlm; # set if libcurl is built with NTLM support
-my $has_charconv;# set if libcurl is built with CharConv 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_shared; # built shared
-
-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 supported protocols
+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";
+
+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; # built with DarwinSSL (Secure Transport)
+my $has_boringssl; # built with BoringSSL
+my $has_libressl; # built with libressl
+
+my $has_sslpinning; # built with a TLS backend that supports pinning
+
+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 $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
my $skipped=0; # number of tests skipped; reported in main loop
my %skipped; # skipped{reason}=counter, reasons for skip
my @teststat; # teststat[testnum]=reason, reasons for skip
my %disabled_keywords; # key words of tests to skip
my %enabled_keywords; # key words of tests to run
+my %disabled; # disabled test cases
my $sshdid; # for socks server, ssh daemon version id
my $sshdvernum; # for socks server, ssh daemon version number
@@ -244,17 +280,20 @@ my $testnumcheck; # test number, set in singletest sub.
my %oldenv;
#######################################################################
-# variables the command line options may set
+# variables that command line options may set
#
my $short;
+my $automakestyle;
my $verbose;
my $debugprotocol;
my $anyway;
my $gdbthis; # run test case with gdb debugger
+my $gdbxwin; # use windowed gdb when using gdb
my $keepoutfiles; # keep stdout and stderr files after tests
my $listonly; # only list the tests
my $postmortem; # display detailed info about failed tests
+my $run_event_based; # run curl with --test-event to test the event API
my %run; # running server
my %doesntrun; # servers that don't work, identified by pidfile
@@ -280,12 +319,14 @@ 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)
}
}
# enable memory debugging if curl is compiled with it
$ENV{'CURL_MEMDEBUG'} = $memdump;
+$ENV{'CURL_ENTROPY'}="12345678";
+$ENV{'CURL_FORCETIME'}=1; # for debug NTLM magic
$ENV{'HOME'}=$pwd;
sub catch_zap {
@@ -302,7 +343,7 @@ $SIG{TERM} = \&catch_zap;
# to prevent them to interfere with our testing!
my $protocol;
-foreach $protocol (('ftp', 'http', 'ftps', 'https', 'no')) {
+foreach $protocol (('ftp', 'http', 'ftps', 'https', 'no', 'all')) {
my $proxy = "${protocol}_proxy";
# clear lowercase version
delete $ENV{$proxy} if($ENV{$proxy});
@@ -324,7 +365,7 @@ sub init_serverpidfile_hash {
for my $proto (('ftp', 'http', 'imap', 'pop3', 'smtp')) {
for my $ssl (('', 's')) {
for my $ipvnum ((4, 6)) {
- for my $idnum ((1, 2)) {
+ for my $idnum ((1, 2, 3)) {
my $serv = servername_id("$proto$ssl", $ipvnum, $idnum);
my $pidf = server_pidfilename("$proto$ssl", $ipvnum, $idnum);
$serverpidfile{$serv} = $pidf;
@@ -332,7 +373,7 @@ sub init_serverpidfile_hash {
}
}
}
- for my $proto (('tftp', 'sftp', 'socks', 'ssh', 'rtsp', 'gopher')) {
+ for my $proto (('tftp', 'sftp', 'socks', 'ssh', 'rtsp', 'gopher', 'httptls')) {
for my $ipvnum ((4, 6)) {
for my $idnum ((1, 2)) {
my $serv = servername_id($proto, $ipvnum, $idnum);
@@ -341,6 +382,13 @@ 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;
+ }
+ }
}
#######################################################################
@@ -385,7 +433,7 @@ sub startnew {
die "error: exec() has returned";
}
- # Ugly hack but ssh client doesn't support pid files
+ # Ugly hack but ssh client and gnutls-serv don't support pid files
if ($fake) {
if(open(OUT, ">$pidfile")) {
print OUT $child . "\n";
@@ -408,7 +456,7 @@ sub startnew {
if(-f $pidfile && -s $pidfile && open(PID, "<$pidfile")) {
$pid2 = 0 + <PID>;
close(PID);
- if(($pid2 > 0) && kill(0, $pid2)) {
+ if(($pid2 > 0) && pidexists($pid2)) {
# if $pid2 is valid, then make sure this pid is alive, as
# otherwise it is just likely to be the _previous_ pidfile or
# similar!
@@ -475,7 +523,9 @@ sub checktestcmd {
#
sub runclient {
my ($cmd)=@_;
- return system($cmd);
+ my $ret = system($cmd);
+ print "CMD ($ret): $cmd\n" if($verbose && !$torture);
+ return $ret;
# This is one way to test curl on a remote machine
# my $out = system("ssh $CLIENTIP cd \'$pwd\' \\; \'$cmd\'");
@@ -553,12 +603,12 @@ sub torture {
my $ret = 0;
if($gdbthis) {
- runclient($gdbline)
+ runclient($gdbline);
}
else {
$ret = runclient($testcmd);
}
- #logmsg "$_ Returned " . $ret >> 8 . "\n";
+ #logmsg "$_ Returned " . ($ret >> 8) . "\n";
# Now clear the variable again
delete $ENV{'CURL_MEMLIMIT'} if($ENV{'CURL_MEMLIMIT'});
@@ -572,7 +622,7 @@ sub torture {
# verify that it returns a proper error code, doesn't leak memory
# and doesn't core dump
- if($ret & 255) {
+ if(($ret & 255) || ($ret >> 8) >= 128) {
logmsg " system() returned $ret\n";
$fail=1;
}
@@ -624,20 +674,20 @@ sub stopserver {
# All servers relative to the given one must be stopped also
#
my @killservers;
- if($server =~ /^(ftp|http|imap|pop3|smtp)s(.*)$/) {
- # given an ssl server, also kill non-ssl underlying one
+ if($server =~ /^(ftp|http|imap|pop3|smtp|httppipe)s((\d*)(-ipv6|-unix|))$/) {
+ # given a stunnel based ssl server, also kill non-ssl underlying one
push @killservers, "${1}${2}";
}
- elsif($server =~ /^(ftp|http|imap|pop3|smtp)(.*)$/) {
- # given a non-ssl server, also kill ssl piggybacking one
+ elsif($server =~ /^(ftp|http|imap|pop3|smtp|httppipe)((\d*)(-ipv6|-unix|))$/) {
+ # given a non-ssl server, also kill stunnel based ssl piggybacking one
push @killservers, "${1}s${2}";
}
- elsif($server =~ /^(socks)(.*)$/) {
- # given an socks server, also kill ssh underlying one
+ elsif($server =~ /^(socks)((\d*)(-ipv6|))$/) {
+ # given a socks server, also kill ssh underlying one
push @killservers, "ssh${2}";
}
- elsif($server =~ /^(ssh)(.*)$/) {
- # given an ssh server, also kill socks piggybacking one
+ elsif($server =~ /^(ssh)((\d*)(-ipv6|))$/) {
+ # given a ssh server, also kill socks piggybacking one
push @killservers, "socks${2}";
}
push @killservers, $server;
@@ -646,7 +696,8 @@ sub stopserver {
#
foreach my $server (@killservers) {
if($run{$server}) {
- $pidlist .= "$run{$server} ";
+ # we must prepend a space since $pidlist may already contain a pid
+ $pidlist .= " $run{$server}";
$run{$server} = 0;
}
$runcert{$server} = 0 if($runcert{$server});
@@ -670,13 +721,15 @@ sub stopserver {
# Verify that the server that runs on $ip, $port is our server. This also
# implies that we can speak with it, as there might be occasions when the
# server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
-# assign requested address" #
-
+# assign requested address")
+#
sub verifyhttp {
- my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
+ my ($proto, $ipvnum, $idnum, $ip, $port_or_path) = @_;
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';
@@ -696,6 +749,8 @@ 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\"";
@@ -749,8 +804,8 @@ sub verifyhttp {
# Verify that the server that runs on $ip, $port is our server. This also
# implies that we can speak with it, as there might be occasions when the
# server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
-# assign requested address" #
-
+# assign requested address")
+#
sub verifyftp {
my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
my $server = servername_id($proto, $ipvnum, $idnum);
@@ -765,14 +820,6 @@ sub verifyftp {
if($proto eq "ftps") {
$extra .= "--insecure --ftp-ssl-control ";
}
- elsif($proto eq "smtp") {
- # SMTP is a bit different since it requires more options and it
- # has _no_ output!
- $extra .= "--mail-rcpt verifiedserver ";
- $extra .= "--mail-from fake ";
- $extra .= "--upload /dev/null ";
- $extra .= "--stderr - "; # move stderr to parse the verbose stuff
- }
my $flags = "--max-time $server_response_maxtime ";
$flags .= "--silent ";
@@ -821,8 +868,8 @@ sub verifyftp {
# Verify that the server that runs on $ip, $port is our server. This also
# implies that we can speak with it, as there might be occasions when the
# server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
-# assign requested address" #
-
+# assign requested address")
+#
sub verifyrtsp {
my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
my $server = servername_id($proto, $ipvnum, $idnum);
@@ -894,7 +941,7 @@ sub verifyrtsp {
# Verify that the ssh server has written out its pidfile, recovering
# the pid from the file and returning it if a process with that pid is
# actually alive.
-
+#
sub verifyssh {
my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
my $server = servername_id($proto, $ipvnum, $idnum);
@@ -907,7 +954,7 @@ sub verifyssh {
if($pid > 0) {
# if we have a pid it is actually our ssh server,
# since runsshserver() unlinks previous pidfile
- if(!kill(0, $pid)) {
+ if(!pidexists($pid)) {
logmsg "RUN: SSH server has died after starting up\n";
checkdied($pid);
unlink($pidfile);
@@ -920,7 +967,7 @@ sub verifyssh {
#######################################################################
# Verify that we can connect to the sftp server, properly authenticate
# with generated config and key files and run a simple remote pwd.
-
+#
sub verifysftp {
my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
my $server = servername_id($proto, $ipvnum, $idnum);
@@ -939,7 +986,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")) {
@@ -954,10 +1001,96 @@ sub verifysftp {
return $verified;
}
+#######################################################################
+# Verify that the non-stunnel HTTP TLS extensions capable server that runs
+# on $ip, $port is our server. This also implies that we can speak with it,
+# as there might be occasions when the server runs fine but we cannot talk
+# to it ("Failed to connect to ::1: Can't assign requested address")
+#
+sub verifyhttptls {
+ my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
+ my $server = servername_id($proto, $ipvnum, $idnum);
+ my $pidfile = server_pidfilename($proto, $ipvnum, $idnum);
+ my $pid = 0;
+
+ my $verifyout = "$LOGDIR/".
+ servername_canon($proto, $ipvnum, $idnum) .'_verify.out';
+ unlink($verifyout) if(-f $verifyout);
+
+ my $verifylog = "$LOGDIR/".
+ servername_canon($proto, $ipvnum, $idnum) .'_verify.log';
+ unlink($verifylog) if(-f $verifylog);
+
+ my $flags = "--max-time $server_response_maxtime ";
+ $flags .= "--output $verifyout ";
+ $flags .= "--verbose ";
+ $flags .= "--globoff ";
+ $flags .= "--insecure ";
+ $flags .= "--tlsauthtype SRP ";
+ $flags .= "--tlsuser jsmith ";
+ $flags .= "--tlspassword abc ";
+ $flags .= "\"https://$ip:$port/verifiedserver\"";
+
+ my $cmd = "$VCURL $flags 2>$verifylog";
+
+ # verify if our/any server is running on this port
+ logmsg "RUN: $cmd\n" if($verbose);
+ my $res = runclient($cmd);
+
+ $res >>= 8; # rotate the result
+ if($res & 128) {
+ logmsg "RUN: curl command died with a coredump\n";
+ return -1;
+ }
+
+ if($res && $verbose) {
+ logmsg "RUN: curl command returned $res\n";
+ if(open(FILE, "<$verifylog")) {
+ while(my $string = <FILE>) {
+ logmsg "RUN: $string" if($string !~ /^([ \t]*)$/);
+ }
+ close(FILE);
+ }
+ }
+
+ my $data;
+ if(open(FILE, "<$verifyout")) {
+ while(my $string = <FILE>) {
+ $data .= $string;
+ }
+ close(FILE);
+ }
+
+ if($data && ($data =~ /(GNUTLS|GnuTLS)/) && open(FILE, "<$pidfile")) {
+ $pid=0+<FILE>;
+ close(FILE);
+ if($pid > 0) {
+ # if we have a pid it is actually our httptls server,
+ # since runhttptlsserver() unlinks previous pidfile
+ if(!pidexists($pid)) {
+ logmsg "RUN: $server server has died after starting up\n";
+ checkdied($pid);
+ unlink($pidfile);
+ $pid = -1;
+ }
+ }
+ return $pid;
+ }
+ elsif($res == 6) {
+ # curl: (6) Couldn't resolve host '::1'
+ logmsg "RUN: failed to resolve host (https://$ip:$port/verifiedserver)\n";
+ return -1;
+ }
+ elsif($data || ($res && ($res != 7))) {
+ logmsg "RUN: Unknown server on our $server port: $port ($res)\n";
+ return -1;
+ }
+ return $pid;
+}
#######################################################################
# STUB for verifying socks
-
+#
sub verifysocks {
my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
my $server = servername_id($proto, $ipvnum, $idnum);
@@ -970,7 +1103,7 @@ sub verifysocks {
if($pid > 0) {
# if we have a pid it is actually our socks server,
# since runsocksserver() unlinks previous pidfile
- if(!kill(0, $pid)) {
+ if(!pidexists($pid)) {
logmsg "RUN: SOCKS server has died after starting up\n";
checkdied($pid);
unlink($pidfile);
@@ -986,6 +1119,11 @@ sub verifysocks {
# particular can take a long time to start if it needs to generate
# keys on a slow or loaded host.
#
+# Just for convenience, test harness uses 'https' and 'httptls' literals
+# as values for 'proto' variable in order to differentiate different
+# servers. 'https' literal is used for stunnel based https test servers,
+# and 'httptls' is used for non-stunnel https test servers.
+#
my %protofunc = ('http' => \&verifyhttp,
'https' => \&verifyhttp,
@@ -994,11 +1132,13 @@ my %protofunc = ('http' => \&verifyhttp,
'pop3' => \&verifyftp,
'imap' => \&verifyftp,
'smtp' => \&verifyftp,
+ 'httppipe' => \&verifyhttp,
'ftps' => \&verifyftp,
'tftp' => \&verifyftp,
'ssh' => \&verifyssh,
'socks' => \&verifysocks,
- 'gopher' => \&verifyhttp);
+ 'gopher' => \&verifyhttp,
+ 'httptls' => \&verifyhttptls);
sub verifyserver {
my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
@@ -1023,13 +1163,33 @@ sub verifyserver {
return $pid;
}
+#######################################################################
+# Single shot server responsiveness test. This should only be used
+# to verify that a server present in %run hash is still functional
+#
+sub responsiveserver {
+ my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
+ my $prev_verbose = $verbose;
+
+ $verbose = 0;
+ my $fun = $protofunc{$proto};
+ my $pid = &$fun($proto, $ipvnum, $idnum, $ip, $port);
+ $verbose = $prev_verbose;
+ if($pid > 0) {
+ return 1; # responsive
+ }
+
+ my $srvrname = servername_str($proto, $ipvnum, $idnum);
+ logmsg " server precheck FAILED (unresponsive $srvrname server)\n";
+ return 0;
+}
#######################################################################
# start the http server
#
sub runhttpserver {
- my ($proto, $verbose, $ipv6, $port) = @_;
+ my ($proto, $verbose, $alt, $port_or_path) = @_;
my $ip = $HOSTIP;
my $ipvnum = 4;
my $idnum = 1;
@@ -1038,13 +1198,28 @@ sub runhttpserver {
my $pidfile;
my $logfile;
my $flags = "";
+ my $exe = "$perl $srcdir/httpserver.pl";
+ my $verbose_flag = "--verbose ";
-
- if($ipv6) {
+ if($alt eq "ipv6") {
# if IPv6, use a different setup
$ipvnum = 6;
$ip = $HOST6IP;
}
+ elsif($alt eq "proxy") {
+ # basically the same, but another ID
+ $idnum = 2;
+ }
+ elsif($alt eq "pipe") {
+ # basically the same, but another ID
+ $idnum = 3;
+ $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);
@@ -1065,17 +1240,97 @@ sub runhttpserver {
$logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
- $flags .= "--fork " if($forkserver);
$flags .= "--gopher " if($proto eq "gopher");
- $flags .= "--verbose " if($debugprotocol);
+ $flags .= "--connect $HOSTIP " if($alt eq "proxy");
+ $flags .= $verbose_flag if($debugprotocol);
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
$flags .= "--id $idnum " if($idnum > 1);
- $flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
+ if($ipvnum eq "unix") {
+ $flags .= "--unix-socket '$port_or_path' ";
+ } else {
+ $flags .= "--ipv$ipvnum --port $port_or_path ";
+ }
+ $flags .= "--srcdir \"$srcdir\"";
- my $cmd = "$perl $srcdir/httpserver.pl $flags";
+ my $cmd = "$exe $flags";
my ($httppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
- if($httppid <= 0 || !kill(0, $httppid)) {
+ if($httppid <= 0 || !pidexists($httppid)) {
+ # it is NOT alive
+ logmsg "RUN: failed to start the $srvrname server\n";
+ stopserver($server, "$pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+
+ # Server is up. Verify that we can speak to it.
+ my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port_or_path);
+ if(!$pid3) {
+ logmsg "RUN: $srvrname server failed verification\n";
+ # failed to talk to it properly. Kill the server and return failure
+ stopserver($server, "$httppid $pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+ $pid2 = $pid3;
+
+ if($verbose) {
+ logmsg "RUN: $srvrname server is now running PID $httppid\n";
+ }
+
+ sleep(1);
+
+ return ($httppid, $pid2);
+}
+
+#######################################################################
+# start the http server
+#
+sub runhttp_pipeserver {
+ my ($proto, $verbose, $alt, $port) = @_;
+ my $ip = $HOSTIP;
+ my $ipvnum = 4;
+ my $idnum = 1;
+ my $server;
+ my $srvrname;
+ my $pidfile;
+ my $logfile;
+ my $flags = "";
+
+ if($alt eq "ipv6") {
+ # No IPv6
+ }
+
+ $server = servername_id($proto, $ipvnum, $idnum);
+
+ $pidfile = $serverpidfile{$server};
+
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
+ my $pid = processexists($pidfile);
+ if($pid > 0) {
+ stopserver($server, "$pid");
+ }
+ unlink($pidfile) if(-f $pidfile);
+
+ $srvrname = servername_str($proto, $ipvnum, $idnum);
+
+ $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
+
+ $flags .= "--verbose 1 " if($debugprotocol);
+ $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+ $flags .= "--id $idnum " if($idnum > 1);
+ $flags .= "--port $port --srcdir \"$srcdir\"";
+
+ my $cmd = "$srcdir/http_pipe.py $flags";
+ my ($httppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
+
+ if($httppid <= 0 || !pidexists($httppid)) {
# it is NOT alive
logmsg "RUN: failed to start the $srvrname server\n";
stopserver($server, "$pid2");
@@ -1106,7 +1361,7 @@ sub runhttpserver {
}
#######################################################################
-# start the https server (or rather, tunnel)
+# start the https stunnel based server
#
sub runhttpsserver {
my ($verbose, $ipv6, $certfile) = @_;
@@ -1156,7 +1411,7 @@ sub runhttpsserver {
my $cmd = "$perl $srcdir/secureserver.pl $flags";
my ($httpspid, $pid2) = startnew($cmd, $pidfile, 15, 0);
- if($httpspid <= 0 || !kill(0, $httpspid)) {
+ if($httpspid <= 0 || !pidexists($httpspid)) {
# it is NOT alive
logmsg "RUN: failed to start the $srvrname server\n";
stopserver($server, "$pid2");
@@ -1189,6 +1444,85 @@ sub runhttpsserver {
}
#######################################################################
+# start the non-stunnel HTTP TLS extensions capable server
+#
+sub runhttptlsserver {
+ my ($verbose, $ipv6) = @_;
+ my $proto = "httptls";
+ my $port = ($ipv6 && ($ipv6 =~ /6$/)) ? $HTTPTLS6PORT : $HTTPTLSPORT;
+ my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+ my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
+ my $idnum = 1;
+ my $server;
+ my $srvrname;
+ my $pidfile;
+ my $logfile;
+ my $flags = "";
+
+ if(!$httptlssrv) {
+ return (0,0);
+ }
+
+ $server = servername_id($proto, $ipvnum, $idnum);
+
+ $pidfile = $serverpidfile{$server};
+
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
+ my $pid = processexists($pidfile);
+ if($pid > 0) {
+ stopserver($server, "$pid");
+ }
+ unlink($pidfile) if(-f $pidfile);
+
+ $srvrname = servername_str($proto, $ipvnum, $idnum);
+
+ $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
+
+ $flags .= "--http ";
+ $flags .= "--debug 1 " if($debugprotocol);
+ $flags .= "--port $port ";
+ $flags .= "--priority NORMAL:+SRP ";
+ $flags .= "--srppasswd $srcdir/certs/srp-verifier-db ";
+ $flags .= "--srppasswdconf $srcdir/certs/srp-verifier-conf";
+
+ my $cmd = "$httptlssrv $flags > $logfile 2>&1";
+ my ($httptlspid, $pid2) = startnew($cmd, $pidfile, 10, 1); # fake pidfile
+
+ if($httptlspid <= 0 || !pidexists($httptlspid)) {
+ # it is NOT alive
+ logmsg "RUN: failed to start the $srvrname server\n";
+ stopserver($server, "$pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+
+ # Server is up. Verify that we can speak to it. PID is from fake pidfile
+ 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
+ stopserver($server, "$httptlspid $pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+ $pid2 = $pid3;
+
+ if($verbose) {
+ logmsg "RUN: $srvrname server is now running PID $httptlspid\n";
+ }
+
+ sleep(1);
+
+ return ($httptlspid, $pid2);
+}
+
+#######################################################################
# start the pingpong server (FTP, POP3, IMAP, SMTP)
#
sub runpingpongserver {
@@ -1253,7 +1587,7 @@ sub runpingpongserver {
my $cmd = "$perl $srcdir/ftpserver.pl $flags";
my ($ftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
- if($ftppid <= 0 || !kill(0, $ftppid)) {
+ if($ftppid <= 0 || !pidexists($ftppid)) {
# it is NOT alive
logmsg "RUN: failed to start the $srvrname server\n";
stopserver($server, "$pid2");
@@ -1335,7 +1669,7 @@ sub runftpsserver {
my $cmd = "$perl $srcdir/secureserver.pl $flags";
my ($ftpspid, $pid2) = startnew($cmd, $pidfile, 15, 0);
- if($ftpspid <= 0 || !kill(0, $ftpspid)) {
+ if($ftpspid <= 0 || !pidexists($ftpspid)) {
# it is NOT alive
logmsg "RUN: failed to start the $srvrname server\n";
stopserver($server, "$pid2");
@@ -1417,7 +1751,7 @@ sub runtftpserver {
my $cmd = "$perl $srcdir/tftpserver.pl $flags";
my ($tftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
- if($tftppid <= 0 || !kill(0, $tftppid)) {
+ if($tftppid <= 0 || !pidexists($tftppid)) {
# it is NOT alive
logmsg "RUN: failed to start the $srvrname server\n";
stopserver($server, "$pid2");
@@ -1498,7 +1832,7 @@ sub runrtspserver {
my $cmd = "$perl $srcdir/rtspserver.pl $flags";
my ($rtsppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
- if($rtsppid <= 0 || !kill(0, $rtsppid)) {
+ if($rtsppid <= 0 || !pidexists($rtsppid)) {
# it is NOT alive
logmsg "RUN: failed to start the $srvrname server\n";
stopserver($server, "$pid2");
@@ -1580,7 +1914,7 @@ sub runsshserver {
# passed to startnew, when this happens startnew completes without being
# able to read the pidfile and consequently returns a zero pid2 above.
- if($sshpid <= 0 || !kill(0, $sshpid)) {
+ if($sshpid <= 0 || !pidexists($sshpid)) {
# it is NOT alive
logmsg "RUN: failed to start the $srvrname server\n";
stopserver($server, "$pid2");
@@ -1734,10 +2068,10 @@ sub runsocksserver {
$sshlog = server_logfilename($LOGDIR, 'socks', $ipvnum, $idnum);
# start our socks server
- my $cmd="$ssh -N -F $sshconfig $ip > $sshlog 2>&1";
- my ($sshpid, $pid2) = startnew($cmd, $pidfile, 30, 1);
+ my $cmd="\"$ssh\" -N -F $sshconfig $ip > $sshlog 2>&1";
+ my ($sshpid, $pid2) = startnew($cmd, $pidfile, 30, 1); # fake pidfile
- if($sshpid <= 0 || !kill(0, $sshpid)) {
+ if($sshpid <= 0 || !pidexists($sshpid)) {
# it is NOT alive
logmsg "RUN: failed to start the $srvrname server\n";
display_sshlog();
@@ -1749,7 +2083,7 @@ sub runsocksserver {
return (0,0);
}
- # Ugly hack but ssh doesn't support pid files
+ # Ugly hack but ssh doesn't support pid files. PID is from fake pidfile.
my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
if(!$pid3) {
logmsg "RUN: $srvrname server failed verification\n";
@@ -1768,6 +2102,128 @@ sub runsocksserver {
}
#######################################################################
+# Single shot http and gopher server responsiveness test. This should only
+# 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 $ip = $HOSTIP;
+ my $ipvnum = 4;
+ my $idnum = 1;
+
+ if($alt eq "ipv6") {
+ # if IPv6, use a different setup
+ $ipvnum = 6;
+ $ip = $HOST6IP;
+ }
+ 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);
+}
+
+#######################################################################
+# Single shot pingpong server responsiveness test. This should only be
+# used to verify that a server present in %run hash is still functional
+#
+sub responsive_pingpong_server {
+ my ($proto, $id, $verbose, $ipv6) = @_;
+ my $port;
+ my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+ my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
+ my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
+
+ if($proto eq "ftp") {
+ $port = ($idnum>1)?$FTP2PORT:$FTPPORT;
+
+ if($ipvnum==6) {
+ # if IPv6, use a different setup
+ $port = $FTP6PORT;
+ }
+ }
+ elsif($proto eq "pop3") {
+ $port = ($ipvnum==6) ? $POP36PORT : $POP3PORT;
+ }
+ elsif($proto eq "imap") {
+ $port = ($ipvnum==6) ? $IMAP6PORT : $IMAPPORT;
+ }
+ elsif($proto eq "smtp") {
+ $port = ($ipvnum==6) ? $SMTP6PORT : $SMTPPORT;
+ }
+ else {
+ print STDERR "Unsupported protocol $proto!!\n";
+ return 0;
+ }
+
+ return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
+}
+
+#######################################################################
+# Single shot rtsp server responsiveness test. This should only be
+# used to verify that a server present in %run hash is still functional
+#
+sub responsive_rtsp_server {
+ my ($verbose, $ipv6) = @_;
+ my $port = $RTSPPORT;
+ my $ip = $HOSTIP;
+ my $proto = 'rtsp';
+ my $ipvnum = 4;
+ my $idnum = 1;
+
+ if($ipv6) {
+ # if IPv6, use a different setup
+ $ipvnum = 6;
+ $port = $RTSP6PORT;
+ $ip = $HOST6IP;
+ }
+
+ return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
+}
+
+#######################################################################
+# Single shot tftp server responsiveness test. This should only be
+# used to verify that a server present in %run hash is still functional
+#
+sub responsive_tftp_server {
+ my ($id, $verbose, $ipv6) = @_;
+ my $port = $TFTPPORT;
+ my $ip = $HOSTIP;
+ my $proto = 'tftp';
+ my $ipvnum = 4;
+ my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
+
+ if($ipv6) {
+ # if IPv6, use a different setup
+ $ipvnum = 6;
+ $port = $TFTP6PORT;
+ $ip = $HOST6IP;
+ }
+
+ return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
+}
+
+#######################################################################
+# Single shot non-stunnel HTTP TLS extensions capable server
+# responsiveness test. This should only be used to verify that a
+# server present in %run hash is still functional
+#
+sub responsive_httptls_server {
+ my ($verbose, $ipv6) = @_;
+ my $proto = "httptls";
+ my $port = ($ipv6 && ($ipv6 =~ /6$/)) ? $HTTPTLS6PORT : $HTTPTLSPORT;
+ my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+ my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
+ my $idnum = 1;
+
+ return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
+}
+
+#######################################################################
# Remove all files in the specified directory
#
sub cleardir {
@@ -1789,50 +2245,29 @@ 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(<IN>) {
- $_ =~ 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 ($subject, $firstref, $secondref)=@_;
+ my ($testnum, $testname, $subject, $firstref, $secondref)=@_;
my $result = compareparts($firstref, $secondref);
if($result) {
+ # timestamp test result verification end
+ $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+
if(!$short) {
- logmsg "\n $subject FAILED:\n";
+ logmsg "\n $testnum: $subject FAILED:\n";
logmsg showdiff($LOGDIR, $firstref, $secondref);
}
- else {
+ elsif(!$automakestyle) {
logmsg "FAILED\n";
}
+ else {
+ # automakestyle
+ logmsg "FAIL: $testnum - $testname - $subject\n";
+ }
}
return $result;
}
@@ -1865,6 +2300,7 @@ sub checksystem {
@version = <VERSOUT>;
close(VERSOUT);
+ $resolver="stock";
for(@version) {
chomp;
@@ -1875,44 +2311,10 @@ sub checksystem {
$libcurl = $2;
if($curl =~ /mingw32/) {
# This is a windows minw32 build, we need to translate the
- # given path to the "actual" windows path.
-
- my @m = `mount`;
- my $matchlen;
- my $bestmatch;
- my $mount;
-
-# example mount output:
-# C:\DOCUME~1\Temp on /tmp type user (binmode,noumount)
-# c:\ActiveState\perl on /perl type user (binmode)
-# C:\msys\1.0\bin on /usr/bin type user (binmode,cygexec,noumount)
-# C:\msys\1.0\bin on /bin type user (binmode,cygexec,noumount)
-
- foreach $mount (@m) {
- if( $mount =~ /(.*) on ([^ ]*) type /) {
- my ($mingw, $real)=($2, $1);
- if($pwd =~ /^$mingw/) {
- # the path we got from pwd starts with the path
- # we found on this line in the mount output
-
- my $len = length($real);
- if($len > $matchlen) {
- # we remember the match that is the longest
- $matchlen = $len;
- $bestmatch = $real;
- }
- }
- }
- }
- if(!$matchlen) {
- logmsg "Serious error, can't find our \"real\" path\n";
- }
- else {
- # now prepend the prefix from the mount command to build
- # our "actual path"
- $pwd = "$bestmatch$pwd";
- }
- $pwd =~ s#\\#/#g;
+ # given path to the "actual" windows path. The MSYS shell
+ # has a builtin 'pwd -W' command which converts the path.
+ $pwd = `sh -c "echo \$(pwd -W)"`;
+ chomp($pwd);
}
elsif ($curl =~ /win32/) {
# Native Windows builds don't understand the
@@ -1928,52 +2330,83 @@ sub checksystem {
# through a shell.
chomp($pwd = `cygpath -m $pwd`);
}
+ if ($libcurl =~ /winssl/i) {
+ $has_winssl=1;
+ $ssllib="WinSSL";
+ }
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) {
$has_nss=1;
+ $has_sslpinning=1;
$ssllib="NSS";
}
- elsif ($libcurl =~ /yassl/i) {
+ elsif ($libcurl =~ /(yassl|wolfssl)/i) {
$has_yassl=1;
- $has_openssl=1;
+ $has_sslpinning=1;
$ssllib="yassl";
}
elsif ($libcurl =~ /polarssl/i) {
$has_polarssl=1;
- $has_openssl=1;
$ssllib="polarssl";
- }
+ }
+ elsif ($libcurl =~ /axtls/i) {
+ $has_axtls=1;
+ $ssllib="axTLS";
+ }
+ elsif ($libcurl =~ /securetransport/i) {
+ $has_darwinssl=1;
+ $ssllib="DarwinSSL";
+ }
+ elsif ($libcurl =~ /BoringSSL/i) {
+ $has_boringssl=1;
+ $ssllib="BoringSSL";
+ }
+ elsif ($libcurl =~ /libressl/i) {
+ $has_libressl=1;
+ $ssllib="libressl";
+ }
+ if ($libcurl =~ /ares/i) {
+ $has_cares=1;
+ $resolver="c-ares";
+ }
}
elsif($_ =~ /^Protocols: (.*)/i) {
# these are the protocols compiled in to this libcurl
- @protocols = split(' ', $1);
+ @protocols = split(' ', lc($1));
# Generate a "proto-ipv6" version of each protocol to match the
- # IPv6 <server> name. This works even if IPv6 support isn't
+ # IPv6 <server> name and a "proto-unix" to match the variant which
+ # uses Unix domain sockets. This works even if support isn't
# compiled in because the <features> test will fail.
- push @protocols, map($_ . "-ipv6", @protocols);
+ push @protocols, map(("$_-ipv6", "$_-unix"), @protocols);
+
+ # 'http-proxy' is used in test cases to do CONNECT through
+ push @protocols, 'http-proxy';
+
+ # 'http-pipe' is the special server for testing pipelining
+ push @protocols, 'http-pipe';
# 'none' is used in test cases to mean no server
- push @protocols, ('none');
+ push @protocols, 'none';
}
elsif($_ =~ /^Features: (.*)/i) {
$feat = $1;
if($feat =~ /TrackMemory/i) {
- # curl was built with --enable-curldebug (memory tracking)
- $curl_debug = 1;
+ # built with memory tracking support (--enable-curldebug)
+ $has_memory_tracking = 1;
}
if($feat =~ /debug/i) {
# curl was built with --enable-debug
$debug_build = 1;
- # set the NETRC debug env
- $ENV{'CURL_DEBUG_NETRC'} = "$LOGDIR/netrc";
}
if($feat =~ /SSL/i) {
# ssl enabled
@@ -1990,17 +2423,89 @@ 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
+ $has_crypto=1;
+ }
+ if($feat =~ /NTLM_WB/i) {
+ # NTLM delegation to winbind daemon ntlm_auth helper enabled
+ $has_ntlm_wb=1;
+ }
+ if($feat =~ /SSPI/i) {
+ # 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;
}
+ if($feat =~ /TLS-SRP/i) {
+ # TLS-SRP enabled
+ $has_tls_srp=1;
+ }
+ if($feat =~ /Metalink/i) {
+ # Metalink enabled
+ $has_metalink=1;
+ }
+ if($feat =~ /AsynchDNS/i) {
+ if(!$has_cares) {
+ # this means threaded resolver
+ $has_threadedres=1;
+ $resolver="threaded";
+ }
+ }
+ if($feat =~ /HTTP2/) {
+ # http2 enabled
+ $has_http2=1;
+ }
+ }
+ #
+ # Test harness currently uses a non-stunnel server in order to
+ # run HTTP TLS-SRP tests required when curl is built with https
+ # protocol support and TLS-SRP feature enabled. For convenience
+ # 'httptls' may be included in the test harness protocols array
+ # to differentiate this from classic stunnel based 'https' test
+ # harness server.
+ #
+ if($has_tls_srp) {
+ my $add_httptls;
+ for(@protocols) {
+ if($_ =~ /^https(-ipv6|)$/) {
+ $add_httptls=1;
+ last;
+ }
+ }
+ if($add_httptls && (! grep /^httptls$/, @protocols)) {
+ push @protocols, 'httptls';
+ push @protocols, 'httptls-ipv6';
+ }
}
}
if(!$curl) {
@@ -2036,12 +2541,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;
}
@@ -2049,22 +2554,25 @@ 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(!$curl_debug && $torture) {
- die "can't run torture tests since curl was not built with curldebug";
+ 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)";
}
$has_shared = `sh $CURLCONFIG --built-shared`;
chomp $has_shared;
- # curl doesn't list cryptographic support separately, so assume it's
- # always available
- $has_crypto=1;
-
my $hostname=join(' ', runclientoutput("hostname"));
my $hosttype=join(' ', runclientoutput("uname -a"));
@@ -2075,15 +2583,24 @@ sub checksystem {
"* Host: $hostname",
"* System: $hosttype");
+ if($has_memory_tracking && $has_threadedres) {
+ $has_memory_tracking = 0;
+ logmsg("*\n",
+ "*** DISABLES memory tracking when using threaded resolver\n",
+ "*\n");
+ }
+
logmsg sprintf("* Server SSL: %8s", $stunnel?"ON ":"OFF");
logmsg sprintf(" libcurl SSL: %s\n", $ssl_version?"ON ":"OFF");
logmsg sprintf("* debug build: %8s", $debug_build?"ON ":"OFF");
- logmsg sprintf(" track memory: %s\n", $curl_debug?"ON ":"OFF");
+ 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: %s\n", $has_shared);
+ logmsg sprintf("* Shared build: %-3s", $has_shared);
+ logmsg sprintf(" Resolver: %s\n", $resolver);
if($ssl_version) {
logmsg sprintf("* SSL library: %13s\n", $ssllib);
}
@@ -2123,6 +2640,21 @@ sub checksystem {
logmsg sprintf("IMAP-IPv6/%d ", $IMAP6PORT);
logmsg sprintf("SMTP-IPv6/%d\n", $SMTP6PORT);
}
+ if($httptlssrv) {
+ logmsg sprintf("* HTTPTLS/%d ", $HTTPTLSPORT);
+ if($has_ipv6) {
+ logmsg sprintf("HTTPTLS-IPv6/%d ", $HTTPTLS6PORT);
+ }
+ logmsg "\n";
+ }
+ 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');
@@ -2135,35 +2667,63 @@ sub checksystem {
#
sub subVariables {
my ($thing) = @_;
- $$thing =~ s/%HOSTIP/$HOSTIP/g;
- $$thing =~ s/%HTTPPORT/$HTTPPORT/g;
- $$thing =~ s/%HOST6IP/$HOST6IP/g;
- $$thing =~ s/%HTTP6PORT/$HTTP6PORT/g;
- $$thing =~ s/%HTTPSPORT/$HTTPSPORT/g;
- $$thing =~ s/%FTPPORT/$FTPPORT/g;
+
+ # ports
+
$$thing =~ s/%FTP6PORT/$FTP6PORT/g;
$$thing =~ s/%FTP2PORT/$FTP2PORT/g;
$$thing =~ s/%FTPSPORT/$FTPSPORT/g;
- $$thing =~ s/%SRCDIR/$srcdir/g;
- $$thing =~ s/%PWD/$pwd/g;
- $$thing =~ s/%TFTPPORT/$TFTPPORT/g;
- $$thing =~ s/%TFTP6PORT/$TFTP6PORT/g;
- $$thing =~ s/%SSHPORT/$SSHPORT/g;
- $$thing =~ s/%SOCKSPORT/$SOCKSPORT/g;
- $$thing =~ s/%POP3PORT/$POP3PORT/g;
- $$thing =~ s/%POP36PORT/$POP36PORT/g;
- $$thing =~ s/%IMAPPORT/$IMAPPORT/g;
+ $$thing =~ s/%FTPPORT/$FTPPORT/g;
+
+ $$thing =~ s/%GOPHER6PORT/$GOPHER6PORT/g;
+ $$thing =~ s/%GOPHERPORT/$GOPHERPORT/g;
+
+ $$thing =~ s/%HTTPTLS6PORT/$HTTPTLS6PORT/g;
+ $$thing =~ s/%HTTPTLSPORT/$HTTPTLSPORT/g;
+ $$thing =~ s/%HTTP6PORT/$HTTP6PORT/g;
+ $$thing =~ s/%HTTPSPORT/$HTTPSPORT/g;
+ $$thing =~ s/%HTTPPORT/$HTTPPORT/g;
+ $$thing =~ s/%HTTPPIPEPORT/$HTTPPIPEPORT/g;
+ $$thing =~ s/%PROXYPORT/$HTTPPROXYPORT/g;
+
$$thing =~ s/%IMAP6PORT/$IMAP6PORT/g;
- $$thing =~ s/%SMTPPORT/$SMTPPORT/g;
+ $$thing =~ s/%IMAPPORT/$IMAPPORT/g;
+
+ $$thing =~ s/%POP36PORT/$POP36PORT/g;
+ $$thing =~ s/%POP3PORT/$POP3PORT/g;
+
+ $$thing =~ s/%RTSP6PORT/$RTSP6PORT/g;
+ $$thing =~ s/%RTSPPORT/$RTSPPORT/g;
+
$$thing =~ s/%SMTP6PORT/$SMTP6PORT/g;
+ $$thing =~ s/%SMTPPORT/$SMTPPORT/g;
+
+ $$thing =~ s/%SOCKSPORT/$SOCKSPORT/g;
+ $$thing =~ s/%SSHPORT/$SSHPORT/g;
+
+ $$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;
+ $$thing =~ s/%CLIENTIP/$CLIENTIP/g;
+
+ # server IP addresses
+
+ $$thing =~ s/%HOST6IP/$HOST6IP/g;
+ $$thing =~ s/%HOSTIP/$HOSTIP/g;
+
+ # misc
+
$$thing =~ s/%CURL/$CURL/g;
+ $$thing =~ s/%PWD/$pwd/g;
+ $$thing =~ s/%SRCDIR/$srcdir/g;
$$thing =~ s/%USER/$USER/g;
- $$thing =~ s/%CLIENTIP/$CLIENTIP/g;
- $$thing =~ s/%CLIENT6IP/$CLIENT6IP/g;
- $$thing =~ s/%RTSPPORT/$RTSPPORT/g;
- $$thing =~ s/%RTSP6PORT/$RTSP6PORT/g;
- $$thing =~ s/%GOPHERPORT/$GOPHERPORT/g;
- $$thing =~ s/%GOPHER6PORT/$GOPHER6PORT/g;
# The purpose of FTPTIME2 and FTPTIME3 is to provide times that can be
# used for time-out tests and that whould work on most hosts as these
@@ -2175,6 +2735,10 @@ sub subVariables {
$$thing =~ s/%FTPTIME2/$ftp2/g;
$$thing =~ s/%FTPTIME3/$ftp3/g;
+
+ # HTTP2
+
+ $$thing =~ s/%H2CVER/$h2cver/g;
}
sub fixarray {
@@ -2240,12 +2804,17 @@ sub timestampskippedevents {
# Run a single specified test case
#
sub singletest {
- my ($testnum, $count, $total)=@_;
+ my ($evbased, # 1 means switch on if possible (and "curl" is tested)
+ # returns "not a test" if it can't be used for this test
+ $testnum,
+ $count,
+ $total)=@_;
my @what;
my $why;
my %feature;
my $cmd;
+ my $disablevalgrind;
# copy test number to a global scope var, this allows
# testnum checking when starting test harness servers.
@@ -2255,7 +2824,10 @@ sub singletest {
$timeprepini{$testnum} = Time::HiRes::time() if($timestats);
if($disttests !~ /test$testnum\W/ ) {
- logmsg "Warning: test$testnum not present in tests/data/Makefile.am\n";
+ logmsg "Warning: test$testnum not present in tests/data/Makefile.inc\n";
+ }
+ if($disabled{$testnum}) {
+ logmsg "Warning: test$testnum is explicitly disabled\n";
}
# load the test case file definition
@@ -2270,88 +2842,303 @@ sub singletest {
@what = getpart("client", "features");
}
+ # We require a feature to be present
for(@what) {
my $f = $_;
$f =~ s/\s//g;
- $feature{$f}=$f; # we require this feature
+ if($f =~ /^([^!].*)$/) {
+ # Store the feature for later
+ $feature{$1} = $1;
- if($f eq "SSL") {
- if($ssl_version) {
- next;
+ if($1 eq "SSL") {
+ if($ssl_version) {
+ next;
+ }
}
- }
- elsif($f eq "OpenSSL") {
- if($has_openssl) {
- next;
+ elsif($1 eq "SSLpinning") {
+ if($has_sslpinning) {
+ next;
+ }
}
- }
- elsif($f eq "GnuTLS") {
- if($has_gnutls) {
- next;
+ elsif($1 eq "OpenSSL") {
+ if($has_openssl) {
+ next;
+ }
}
- }
- elsif($f eq "NSS") {
- if($has_nss) {
- next;
+ elsif($1 eq "GnuTLS") {
+ if($has_gnutls) {
+ next;
+ }
}
- }
- elsif($f eq "netrc_debug") {
- if($debug_build) {
- next;
+ elsif($1 eq "NSS") {
+ if($has_nss) {
+ next;
+ }
}
- }
- elsif($f eq "large_file") {
- if($large_file) {
- next;
+ elsif($1 eq "axTLS") {
+ if($has_axtls) {
+ next;
+ }
}
- }
- elsif($f eq "idn") {
- if($has_idn) {
- next;
+ elsif($1 eq "WinSSL") {
+ if($has_winssl) {
+ next;
+ }
}
- }
- elsif($f eq "ipv6") {
- if($has_ipv6) {
- next;
+ elsif($1 eq "DarwinSSL") {
+ if($has_darwinssl) {
+ next;
+ }
}
- }
- elsif($f eq "libz") {
- if($has_libz) {
- next;
+ elsif($1 eq "unittest") {
+ if($debug_build) {
+ next;
+ }
}
- }
- elsif($f eq "NTLM") {
- if($has_ntlm) {
+ elsif($1 eq "debug") {
+ if($debug_build) {
+ next;
+ }
+ }
+ elsif($1 eq "TrackMemory") {
+ if($has_memory_tracking) {
+ next;
+ }
+ }
+ elsif($1 eq "large_file") {
+ if($large_file) {
+ next;
+ }
+ }
+ elsif($1 eq "idn") {
+ if($has_idn) {
+ next;
+ }
+ }
+ elsif($1 eq "ipv6") {
+ if($has_ipv6) {
+ next;
+ }
+ }
+ elsif($1 eq "libz") {
+ if($has_libz) {
+ next;
+ }
+ }
+ elsif($1 eq "NTLM") {
+ if($has_ntlm) {
+ next;
+ }
+ }
+ elsif($1 eq "NTLM_WB") {
+ if($has_ntlm_wb) {
+ next;
+ }
+ }
+ elsif($1 eq "SSPI") {
+ if($has_sspi) {
+ 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;
+ }
+ }
+ elsif($1 eq "crypto") {
+ if($has_crypto) {
+ next;
+ }
+ }
+ elsif($1 eq "TLS-SRP") {
+ if($has_tls_srp) {
+ next;
+ }
+ }
+ elsif($1 eq "Metalink") {
+ if($has_metalink) {
+ next;
+ }
+ }
+ elsif($1 eq "http2") {
+ if($has_http2) {
+ next;
+ }
+ }
+ elsif($1 eq "socks") {
next;
}
- }
- elsif($f eq "getrlimit") {
- if($has_getrlimit) {
+ 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;
}
+
+ $why = "curl lacks $1 support";
+ last;
}
- elsif($f eq "crypto") {
- if($has_crypto) {
+ }
+
+ # We require a feature to not be present
+ if(!$why) {
+ for(@what) {
+ my $f = $_;
+ $f =~ s/\s//g;
+
+ if($f =~ /^!(.*)$/) {
+ if($1 eq "SSL") {
+ if(!$ssl_version) {
+ next;
+ }
+ }
+ elsif($1 eq "OpenSSL") {
+ if(!$has_openssl) {
+ next;
+ }
+ }
+ elsif($1 eq "GnuTLS") {
+ if(!$has_gnutls) {
+ next;
+ }
+ }
+ elsif($1 eq "NSS") {
+ if(!$has_nss) {
+ next;
+ }
+ }
+ elsif($1 eq "axTLS") {
+ if(!$has_axtls) {
+ next;
+ }
+ }
+ elsif($1 eq "WinSSL") {
+ if(!$has_winssl) {
+ next;
+ }
+ }
+ elsif($1 eq "DarwinSSL") {
+ if(!$has_darwinssl) {
+ next;
+ }
+ }
+ elsif($1 eq "TrackMemory") {
+ if(!$has_memory_tracking) {
+ next;
+ }
+ }
+ elsif($1 eq "large_file") {
+ if(!$large_file) {
+ next;
+ }
+ }
+ elsif($1 eq "idn") {
+ if(!$has_idn) {
+ next;
+ }
+ }
+ elsif($1 eq "ipv6") {
+ if(!$has_ipv6) {
+ next;
+ }
+ }
+ elsif($1 eq "unix-sockets") {
+ next if !$has_unix;
+ }
+ elsif($1 eq "libz") {
+ if(!$has_libz) {
+ next;
+ }
+ }
+ elsif($1 eq "NTLM") {
+ if(!$has_ntlm) {
+ next;
+ }
+ }
+ elsif($1 eq "NTLM_WB") {
+ if(!$has_ntlm_wb) {
+ next;
+ }
+ }
+ elsif($1 eq "SSPI") {
+ if(!$has_sspi) {
+ 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;
+ }
+ }
+ elsif($1 eq "crypto") {
+ if(!$has_crypto) {
+ next;
+ }
+ }
+ elsif($1 eq "TLS-SRP") {
+ if(!$has_tls_srp) {
+ next;
+ }
+ }
+ elsif($1 eq "Metalink") {
+ if(!$has_metalink) {
+ next;
+ }
+ }
+ else {
+ next;
+ }
+ }
+ else {
next;
}
- }
- elsif($f eq "socks") {
- next;
- }
- # See if this "feature" is in the list of supported protocols
- elsif (grep /^$f$/, @protocols) {
- next;
- }
- $why = "curl lacks $f support";
- last;
+ $why = "curl has $1 support";
+ last;
+ }
}
if(!$why) {
my @keywords = getpart("info", "keywords");
my $match;
my $k;
+
+ if(!$keywords[0]) {
+ $why = "missing the <keywords> section!";
+ }
+
for $k (@keywords) {
chomp $k;
if ($disabled_keywords{$k}) {
@@ -2381,6 +3168,9 @@ sub singletest {
delete $oldenv{$var};
}
+ # remove test server commands file before servers are started/verified
+ unlink($FTPDCMD) if(-f $FTPDCMD);
+
# timestamp required servers verification start
$timesrvrini{$testnum} = Time::HiRes::time() if($timestats);
@@ -2405,10 +3195,15 @@ sub singletest {
delete $ENV{$var} if($ENV{$var});
}
else {
- if(($var =~ /^LD_PRELOAD/) &&
- ($debug_build || ($has_shared ne "yes"))) {
- # print "Skipping LD_PRELOAD due to no release shared build\n";
- next;
+ if($var =~ /^LD_PRELOAD/) {
+ if(exe_ext() && (exe_ext() eq '.exe')) {
+ # print "Skipping LD_PRELOAD due to lack of OS support\n";
+ next;
+ }
+ if($debug_build || ($has_shared ne "yes")) {
+ # print "Skipping LD_PRELOAD due to no release shared build\n";
+ next;
+ }
}
$ENV{$var} = "$content";
}
@@ -2460,37 +3255,45 @@ sub singletest {
$teststat[$testnum]=$why; # store reason for this test case
if(!$short) {
- printf "test %03d SKIPPED: $why\n", $testnum;
+ if($skipped{$why} <= 3) {
+ # show only the first three skips for each reason
+ logmsg sprintf("test %04d SKIPPED: $why\n", $testnum);
+ }
}
timestampskippedevents($testnum);
return -1;
}
- logmsg sprintf("test %03d...", $testnum);
+ logmsg sprintf("test %04d...", $testnum) if(!$automakestyle);
# extract the reply data
my @reply = getpart("reply", "data");
my @replycheck = getpart("reply", "datacheck");
+ my %replyattr = getpartattr("reply", "data");
+ my %replycheckattr = getpartattr("reply", "datacheck");
+
if (@replycheck) {
# we use this file instead to check the final output against
- my %hash = getpartattr("reply", "datacheck");
- if($hash{'nonewline'}) {
+ if($replycheckattr{'nonewline'}) {
# Yes, we must cut off the final newline from the final line
# of the datacheck
chomp($replycheck[$#replycheck]);
}
+ if($replycheckattr{'mode'}) {
+ $replyattr{'mode'} = $replycheckattr{'mode'};
+ }
@reply=@replycheck;
}
- # curl command to run
- my @curlcmd= fixarray ( getpart("client", "command") );
-
# this is the valid protocol blurb curl should generate
my @protocol= fixarray ( getpart("verify", "protocol") );
+ # this is the valid protocol blurb curl should generate to a proxy
+ my @proxyprot = fixarray ( getpart("verify", "proxy") );
+
# redirected stdout/stderr to these files
$STDOUT="$LOGDIR/stdout$testnum";
$STDERR="$LOGDIR/stderr$testnum";
@@ -2508,12 +3311,9 @@ sub singletest {
# name of the test
my @testname= getpart("client", "name");
-
- if(!$short) {
- my $name = $testname[0];
- $name =~ s/\n//g;
- logmsg "[$name]\n";
- }
+ my $testname = $testname[0];
+ $testname =~ s/\n//g;
+ logmsg "[$testname]\n" if(!$short);
if($listonly) {
timestampskippedevents($testnum);
@@ -2528,9 +3328,10 @@ sub singletest {
chomp $tool;
}
- # remove server output logfiles
+ # remove server output logfile
unlink($SERVERIN);
unlink($SERVER2IN);
+ unlink($PROXYIN);
if(@ftpservercmd) {
# write the instructions to file
@@ -2541,13 +3342,17 @@ sub singletest {
my @blaha;
($cmd, @blaha)= getpart("client", "command");
- # make some nice replace operations
- $cmd =~ s/\n//g; # no newlines please
-
- # substitute variables in the command line
- subVariables \$cmd;
-
- if($curl_debug) {
+ if($cmd) {
+ # make some nice replace operations
+ $cmd =~ s/\n//g; # no newlines please
+ # substitute variables in the command line
+ subVariables \$cmd;
+ }
+ else {
+ # there was no command given, use something silly
+ $cmd="-";
+ }
+ if($has_memory_tracking) {
unlink($memdump);
}
@@ -2597,47 +3402,103 @@ sub singletest {
}
}
+ my $CMDLINE;
my $cmdargs;
- if(!$tool) {
- # run curl, add --verbose for debug information output
- $cmdargs ="$out --include --verbose --trace-time $cmd";
+ my $cmdtype = $cmdhash{'type'} || "default";
+ my $fail_due_event_based = $evbased;
+ if($cmdtype eq "perl") {
+ # run the command line prepended with "perl"
+ $cmdargs ="$cmd";
+ $CMDLINE = "perl ";
+ $tool=$CMDLINE;
+ $disablevalgrind=1;
+ }
+ elsif($cmdtype eq "shell") {
+ # run the command line prepended with "/bin/sh"
+ $cmdargs ="$cmd";
+ $CMDLINE = "/bin/sh ";
+ $tool=$CMDLINE;
+ $disablevalgrind=1;
+ }
+ elsif(!$tool) {
+ # run curl, add suitable command line options
+ $cmd = "-1 ".$cmd if(exists $feature{"SSL"} && ($has_axtls));
+
+ my $inc="";
+ if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-include/)) {
+ $inc = " --include";
+ }
+
+ $cmdargs = "$out$inc ";
+ $cmdargs .= "--trace-ascii log/trace$testnum ";
+ $cmdargs .= "--trace-time ";
+ if($evbased) {
+ $cmdargs .= "--test-event ";
+ $fail_due_event_based--;
+ }
+ $cmdargs .= $cmd;
}
else {
$cmdargs = " $cmd"; # $cmd is the command line for the test file
$CURLOUT = $STDOUT; # sends received data to stdout
+
+ if($tool =~ /^lib/) {
+ $CMDLINE="$LIBDIR/$tool";
+ }
+ elsif($tool =~ /^unit/) {
+ $CMDLINE="$UNITDIR/$tool";
+ }
+
+ if(! -f $CMDLINE) {
+ logmsg "The tool set in the test case for this: '$tool' does not exist\n";
+ timestampskippedevents($testnum);
+ return -1;
+ }
+ $DBGCURL=$CMDLINE;
+ }
+
+ if($gdbthis) {
+ # gdb is incompatible with valgrind, so disable it when debugging
+ # Perhaps a better approach would be to run it under valgrind anyway
+ # with --db-attach=yes or --vgdb=yes.
+ $disablevalgrind=1;
+ }
+
+ if($fail_due_event_based) {
+ logmsg "This test cannot run event based\n";
+ return -1;
}
my @stdintest = getpart("client", "stdin");
if(@stdintest) {
my $stdinfile="$LOGDIR/stdin-for-$testnum";
+
+ my %hash = getpartattr("client", "stdin");
+ if($hash{'nonewline'}) {
+ # cut off the final newline from the final line of the stdin data
+ chomp($stdintest[$#stdintest]);
+ }
+
writearray($stdinfile, \@stdintest);
$cmdargs .= " <$stdinfile";
}
- my $CMDLINE;
if(!$tool) {
$CMDLINE="$CURL";
}
- else {
- $CMDLINE="$LIBDIR/$tool";
- if(! -f $CMDLINE) {
- print "The tool set in the test case for this: '$tool' does not exist\n";
- timestampskippedevents($testnum);
- return -1;
- }
- $DBGCURL=$CMDLINE;
- }
my $usevalgrind;
- if($valgrind) {
+ if($valgrind && !$disablevalgrind) {
my @valgrindoption = getpart("verify", "valgrind");
if((!@valgrindoption) || ($valgrindoption[0] !~ /disable/)) {
$usevalgrind = 1;
my $valgrindcmd = "$valgrind ";
$valgrindcmd .= "$valgrind_tool " if($valgrind_tool);
$valgrindcmd .= "--leak-check=yes ";
+ $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
+ # $valgrindcmd .= "--gen-suppressions=all ";
$valgrindcmd .= "--num-callers=16 ";
$valgrindcmd .= "${valgrind_logfile}=$LOGDIR/valgrind$testnum";
$CMDLINE = "$valgrindcmd $CMDLINE";
@@ -2690,7 +3551,8 @@ sub singletest {
"$gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
}
elsif($gdbthis) {
- runclient("$gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
+ my $GDBW = ($gdbxwin) ? "-w" : "";
+ runclient("$gdb --directory libtest $DBGCURL $GDBW -x $LOGDIR/gdbcmd");
$cmdres=0; # makes it always continue after a debugged run
}
else {
@@ -2750,6 +3612,10 @@ sub singletest {
# Test harness ssh server does not have this synchronization mechanism,
# this implies that some ssh server based tests might need a small delay
# once that the client command has run to avoid false test failures.
+ #
+ # gnutls-serv also lacks this synchronization mechanism, so gnutls-serv
+ # based tests might need a small delay once that the client command has
+ # run to avoid false test failures.
sleep($postcommanddelay) if($postcommanddelay);
@@ -2767,20 +3633,20 @@ sub singletest {
my @killservers;
foreach my $server (@killtestservers) {
chomp $server;
- if($server =~ /^(ftp|http|imap|pop3|smtp)s(.*)$/) {
- # given an ssl server, also kill non-ssl underlying one
+ if($server =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
+ # given a stunnel ssl server, also kill non-ssl underlying one
push @killservers, "${1}${2}";
}
- elsif($server =~ /^(ftp|http|imap|pop3|smtp)(.*)$/) {
- # given a non-ssl server, also kill ssl piggybacking one
+ elsif($server =~ /^(ftp|http|imap|pop3|smtp)((\d*)(-ipv6|-unix|))$/) {
+ # given a non-ssl server, also kill stunnel piggybacking one
push @killservers, "${1}s${2}";
}
- elsif($server =~ /^(socks)(.*)$/) {
- # given an socks server, also kill ssh underlying one
+ elsif($server =~ /^(socks)((\d*)(-ipv6|))$/) {
+ # given a socks server, also kill ssh underlying one
push @killservers, "ssh${2}";
}
- elsif($server =~ /^(ssh)(.*)$/) {
- # given an ssh server, also kill socks piggybacking one
+ elsif($server =~ /^(ssh)((\d*)(-ipv6|))$/) {
+ # given a ssh server, also kill socks piggybacking one
push @killservers, "socks${2}";
}
push @killservers, $server;
@@ -2823,7 +3689,7 @@ sub singletest {
}
# remove the test server commands file after each test
- unlink($FTPDCMD);
+ unlink($FTPDCMD) if(-f $FTPDCMD);
# run the postcheck command
my @postcheck= getpart("client", "postcheck");
@@ -2871,6 +3737,7 @@ sub singletest {
my $errorcode = $err[0] || "0";
my $ok="";
my $res;
+ chomp $errorcode;
if (@validstdout) {
# verify redirected stdout
my @actual = loadarray($STDOUT);
@@ -2885,7 +3752,8 @@ sub singletest {
my $filemode=$hash{'mode'};
if($filemode && ($filemode eq "text") && $has_textaware) {
# text mode when running on windows: fix line endings
- map s/\r\n/\n/g, @actual;
+ map s/\r\n/\n/g, @validstdout;
+ map s/\n/\r\n/g, @validstdout;
}
if($hash{'nonewline'}) {
@@ -2894,10 +3762,8 @@ sub singletest {
chomp($validstdout[$#validstdout]);
}
- $res = compare("stdout", \@actual, \@validstdout);
+ $res = compare($testnum, $testname, "stdout", \@actual, \@validstdout);
if($res) {
- # timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
return 1;
}
$ok .= "s";
@@ -2906,22 +3772,66 @@ sub singletest {
$ok .= "-"; # stdout not checked
}
- my %replyattr = getpartattr("reply", "data");
+ if(@protocol) {
+ # Verify the sent request
+ my @out = loadarray($SERVERIN);
+
+ # what to cut off from the live protocol sent by curl
+ my @strip = getpart("verify", "strip");
+
+ my @protstrip=@protocol;
+
+ # check if there's any attributes on the verify/protocol section
+ my %hash = getpartattr("verify", "protocol");
+
+ if($hash{'nonewline'}) {
+ # Yes, we must cut off the final newline from the final line
+ # of the protocol data
+ chomp($protstrip[$#protstrip]);
+ }
+
+ for(@strip) {
+ # strip off all lines that match the patterns from both arrays
+ chomp $_;
+ @out = striparray( $_, \@out);
+ @protstrip= striparray( $_, \@protstrip);
+ }
+
+ # what parts to cut off from the protocol
+ my @strippart = getpart("verify", "strippart");
+ my $strip;
+ for $strip (@strippart) {
+ chomp $strip;
+ for(@out) {
+ eval $strip;
+ }
+ }
+
+ $res = compare($testnum, $testname, "protocol", \@out, \@protstrip);
+ if($res) {
+ return 1;
+ }
+
+ $ok .= "p";
+
+ }
+ else {
+ $ok .= "-"; # protocol not checked
+ }
+
if(!$replyattr{'nocheck'} && (@reply || $replyattr{'sendzero'})) {
# verify the received data
my @out = loadarray($CURLOUT);
- my %hash = getpartattr("reply", "data");
# get the mode attribute
- my $filemode=$hash{'mode'};
+ my $filemode=$replyattr{'mode'};
if($filemode && ($filemode eq "text") && $has_textaware) {
# text mode when running on windows: fix line endings
- map s/\r\n/\n/g, @out;
+ map s/\r\n/\n/g, @reply;
+ map s/\n/\r\n/g, @reply;
}
- $res = compare("data", \@out, \@reply);
+ $res = compare($testnum, $testname, "data", \@out, \@reply);
if ($res) {
- # timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
return 1;
}
$ok .= "d";
@@ -2933,10 +3843,8 @@ sub singletest {
if(@upload) {
# verify uploaded data
my @out = loadarray("$LOGDIR/upload.$testnum");
- $res = compare("upload", \@out, \@upload);
+ $res = compare($testnum, $testname, "upload", \@out, \@upload);
if ($res) {
- # timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
return 1;
}
$ok .= "u";
@@ -2945,17 +3853,18 @@ sub singletest {
$ok .= "-"; # upload not checked
}
- if(@protocol) {
- # Verify the sent request
- my @out = loadarray($SERVERIN);
+ if(@proxyprot) {
+ # Verify the sent proxy request
+ my @out = loadarray($PROXYIN);
- # what to cut off from the live protocol sent by curl
+ # what to cut off from the live protocol sent by curl, we use the
+ # same rules as for <protocol>
my @strip = getpart("verify", "strip");
- my @protstrip=@protocol;
+ my @protstrip=@proxyprot;
# check if there's any attributes on the verify/protocol section
- my %hash = getpartattr("verify", "protocol");
+ my %hash = getpartattr("verify", "proxy");
if($hash{'nonewline'}) {
# Yes, we must cut off the final newline from the final line
@@ -2980,67 +3889,73 @@ sub singletest {
}
}
- $res = compare("protocol", \@out, \@protstrip);
+ $res = compare($testnum, $testname, "proxy", \@out, \@protstrip);
if($res) {
- # timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
return 1;
}
- $ok .= "p";
+ $ok .= "P";
}
else {
$ok .= "-"; # protocol not checked
}
- my @outfile=getpart("verify", "file");
- if(@outfile) {
- # we're supposed to verify a dynamically generated file!
- my %hash = getpartattr("verify", "file");
+ my $outputok;
+ for my $partsuffix (('', '1', '2', '3', '4')) {
+ my @outfile=getpart("verify", "file".$partsuffix);
+ if(@outfile || partexists("verify", "file".$partsuffix) ) {
+ # we're supposed to verify a dynamically generated file!
+ my %hash = getpartattr("verify", "file".$partsuffix);
- my $filename=$hash{'name'};
- if(!$filename) {
- logmsg "ERROR: section verify=>file has no name attribute\n";
- stopservers($verbose);
- # timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
- return -1;
- }
- my @generated=loadarray($filename);
+ my $filename=$hash{'name'};
+ if(!$filename) {
+ logmsg "ERROR: section verify=>file$partsuffix ".
+ "has no name attribute\n";
+ stopservers($verbose);
+ # timestamp test result verification end
+ $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+ return -1;
+ }
+ my @generated=loadarray($filename);
- # what parts to cut off from the file
- my @stripfile = getpart("verify", "stripfile");
+ # what parts to cut off from the file
+ my @stripfile = getpart("verify", "stripfile".$partsuffix);
- my $filemode=$hash{'mode'};
- if($filemode && ($filemode eq "text") && $has_textaware) {
- # text mode when running on windows means adding an extra
- # strip expression
- push @stripfile, "s/\r\n/\n/";
- }
+ my $filemode=$hash{'mode'};
+ if($filemode && ($filemode eq "text") && $has_textaware) {
+ # text mode when running on windows: fix line endings
+ map s/\r\n/\n/g, @outfile;
+ map s/\n/\r\n/g, @outfile;
+ }
- my $strip;
- for $strip (@stripfile) {
- chomp $strip;
- for(@generated) {
- eval $strip;
+ my $strip;
+ for $strip (@stripfile) {
+ chomp $strip;
+ my @newgen;
+ for(@generated) {
+ eval $strip;
+ if($_) {
+ push @newgen, $_;
+ }
+ }
+ # this is to get rid of array entries that vanished (zero
+ # length) because of replacements
+ @generated = @newgen;
}
- }
- @outfile = fixarray(@outfile);
+ @outfile = fixarray(@outfile);
- $res = compare("output", \@generated, \@outfile);
- if($res) {
- # timestamp test result verification end
- $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
- return 1;
- }
+ $res = compare($testnum, $testname, "output ($filename)",
+ \@generated, \@outfile);
+ if($res) {
+ return 1;
+ }
- $ok .= "o";
- }
- else {
- $ok .= "-"; # output not checked
+ $outputok = 1; # output checked
+ }
}
+ $ok .= ($outputok) ? "o" : "-"; # output checked or not
# accept multiple comma-separated error codes
my @splerr = split(/ *, */, $errorcode);
@@ -3058,8 +3973,8 @@ sub singletest {
}
else {
if(!$short) {
- printf("\n%s returned $cmdres, %d was expected\n",
- (!$tool)?"curl":$tool, $errorcode);
+ logmsg sprintf("\n%s returned $cmdres, when expecting %s\n",
+ (!$tool)?"curl":$tool, $errorcode);
}
logmsg " exit FAILED\n";
# timestamp test result verification end
@@ -3067,9 +3982,10 @@ sub singletest {
return 1;
}
- if($curl_debug) {
+ if($has_memory_tracking) {
if(! -f $memdump) {
- logmsg "\n** ALERT! memory debugging with no output file?\n";
+ logmsg "\n** ALERT! memory tracking with no output file?\n"
+ if(!$cmdtype eq "perl");
}
else {
my @memdata=`$memanalyze $memdump`;
@@ -3122,8 +4038,13 @@ sub singletest {
}
my @e = valgrindparse($srcdir, $feature{'SSL'}, "$LOGDIR/$vgfile");
if(@e && $e[0]) {
- logmsg " valgrind ERROR ";
- logmsg @e;
+ if($automakestyle) {
+ logmsg "FAIL: $testnum - $testname - valgrind\n";
+ }
+ else {
+ logmsg " valgrind ERROR ";
+ logmsg @e;
+ }
# timestamp test result verification end
$timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
return 1;
@@ -3131,7 +4052,7 @@ sub singletest {
$ok .= "v";
}
else {
- if(!$short) {
+ if(!$short && !$disablevalgrind) {
logmsg " valgrind SKIPPED\n";
}
$ok .= "-"; # skipped
@@ -3140,6 +4061,8 @@ sub singletest {
else {
$ok .= "-"; # valgrind not checked
}
+ # add 'E' for event-based
+ $ok .= $evbased ? "E" : "-";
logmsg "$ok " if(!$short);
@@ -3149,7 +4072,13 @@ sub singletest {
my $left=sprintf("remaining: %02d:%02d",
$estleft/60,
$estleft%60);
- printf "OK (%-3d out of %-3d, %s)\n", $count, $total, $left;
+
+ if(!$automakestyle) {
+ logmsg sprintf("OK (%-3d out of %-3d, %s)\n", $count, $total, $left);
+ }
+ else {
+ logmsg "PASS: $testnum - $testname\n";
+ }
# the test succeeded, remove all log files
if(!$keepoutfiles) {
@@ -3164,6 +4093,7 @@ sub singletest {
#######################################################################
# Stop all running test servers
+#
sub stopservers {
my $verbose = $_[0];
#
@@ -3211,7 +4141,7 @@ sub stopservers {
# startservers() starts all the named servers
#
# Returns: string with error reason or blank for success
-
+#
sub startservers {
my @what = @_;
my ($pid, $pid2);
@@ -3221,7 +4151,7 @@ sub startservers {
$what =~ s/[^a-z0-9-]//g;
my $certfile;
- if($what =~ /^(ftp|http|imap|pop3|smtp)s(.*)$/) {
+ if($what =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
$certfile = ($whatlist[1]) ? $whatlist[1] : 'stunnel.pem';
}
@@ -3229,6 +4159,10 @@ sub startservers {
($what eq "ftp") ||
($what eq "imap") ||
($what eq "smtp")) {
+ if($torture && $run{$what} &&
+ !responsive_pingpong_server($what, "", $verbose)) {
+ stopserver($what);
+ }
if(!$run{$what}) {
($pid, $pid2) = runpingpongserver($what, "", $verbose);
if($pid <= 0) {
@@ -3239,6 +4173,10 @@ sub startservers {
}
}
elsif($what eq "ftp2") {
+ if($torture && $run{'ftp2'} &&
+ !responsive_pingpong_server("ftp", "2", $verbose)) {
+ stopserver('ftp2');
+ }
if(!$run{'ftp2'}) {
($pid, $pid2) = runpingpongserver("ftp", "2", $verbose);
if($pid <= 0) {
@@ -3249,6 +4187,10 @@ sub startservers {
}
}
elsif($what eq "ftp-ipv6") {
+ if($torture && $run{'ftp-ipv6'} &&
+ !responsive_pingpong_server("ftp", "", $verbose, "ipv6")) {
+ stopserver('ftp-ipv6');
+ }
if(!$run{'ftp-ipv6'}) {
($pid, $pid2) = runpingpongserver("ftp", "", $verbose, "ipv6");
if($pid <= 0) {
@@ -3260,17 +4202,27 @@ sub startservers {
}
}
elsif($what eq "gopher") {
+ if($torture && $run{'gopher'} &&
+ !responsive_http_server("gopher", $verbose, 0, $GOPHERPORT)) {
+ stopserver('gopher');
+ }
if(!$run{'gopher'}) {
($pid, $pid2) = runhttpserver("gopher", $verbose, 0,
$GOPHERPORT);
if($pid <= 0) {
return "failed starting GOPHER server";
}
- printf ("* pid gopher => %d %d\n", $pid, $pid2) if($verbose);
+ logmsg sprintf ("* pid gopher => %d %d\n", $pid, $pid2)
+ if($verbose);
$run{'gopher'}="$pid $pid2";
}
}
elsif($what eq "gopher-ipv6") {
+ if($torture && $run{'gopher-ipv6'} &&
+ !responsive_http_server("gopher", $verbose, "ipv6",
+ $GOPHER6PORT)) {
+ stopserver('gopher-ipv6');
+ }
if(!$run{'gopher-ipv6'}) {
($pid, $pid2) = runhttpserver("gopher", $verbose, "ipv6",
$GOPHER6PORT);
@@ -3283,19 +4235,45 @@ sub startservers {
}
}
elsif($what eq "http") {
+ if($torture && $run{'http'} &&
+ !responsive_http_server("http", $verbose, 0, $HTTPPORT)) {
+ stopserver('http');
+ }
if(!$run{'http'}) {
($pid, $pid2) = runhttpserver("http", $verbose, 0,
$HTTPPORT);
if($pid <= 0) {
return "failed starting HTTP server";
}
- printf ("* pid http => %d %d\n", $pid, $pid2) if($verbose);
+ logmsg sprintf ("* pid http => %d %d\n", $pid, $pid2)
+ if($verbose);
$run{'http'}="$pid $pid2";
}
}
+ elsif($what eq "http-proxy") {
+ if($torture && $run{'http-proxy'} &&
+ !responsive_http_server("http", $verbose, "proxy",
+ $HTTPPROXYPORT)) {
+ stopserver('http-proxy');
+ }
+ if(!$run{'http-proxy'}) {
+ ($pid, $pid2) = runhttpserver("http", $verbose, "proxy",
+ $HTTPPROXYPORT);
+ if($pid <= 0) {
+ return "failed starting HTTP-proxy server";
+ }
+ logmsg sprintf ("* pid http-proxy => %d %d\n", $pid, $pid2)
+ if($verbose);
+ $run{'http-proxy'}="$pid $pid2";
+ }
+ }
elsif($what eq "http-ipv6") {
+ if($torture && $run{'http-ipv6'} &&
+ !responsive_http_server("http", $verbose, "ipv6", $HTTP6PORT)) {
+ stopserver('http-ipv6');
+ }
if(!$run{'http-ipv6'}) {
- ($pid, $pid2) = runhttpserver("http", $verbose, "IPv6",
+ ($pid, $pid2) = runhttpserver("http", $verbose, "ipv6",
$HTTP6PORT);
if($pid <= 0) {
return "failed starting HTTP-IPv6 server";
@@ -3305,7 +4283,28 @@ sub startservers {
$run{'http-ipv6'}="$pid $pid2";
}
}
+ elsif($what eq "http-pipe") {
+ if($torture && $run{'http-pipe'} &&
+ !responsive_http_server("http", $verbose, "pipe",
+ $HTTPPIPEPORT)) {
+ stopserver('http-pipe');
+ }
+ if(!$run{'http-pipe'}) {
+ ($pid, $pid2) = runhttpserver("http", $verbose, "pipe",
+ $HTTPPIPEPORT);
+ if($pid <= 0) {
+ return "failed starting HTTP-pipe server";
+ }
+ logmsg sprintf ("* pid http-pipe => %d %d\n", $pid, $pid2)
+ if($verbose);
+ $run{'http-pipe'}="$pid $pid2";
+ }
+ }
elsif($what eq "rtsp") {
+ if($torture && $run{'rtsp'} &&
+ !responsive_rtsp_server($verbose)) {
+ stopserver('rtsp');
+ }
if(!$run{'rtsp'}) {
($pid, $pid2) = runrtspserver($verbose);
if($pid <= 0) {
@@ -3316,8 +4315,12 @@ sub startservers {
}
}
elsif($what eq "rtsp-ipv6") {
+ if($torture && $run{'rtsp-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";
}
@@ -3326,7 +4329,6 @@ sub startservers {
$run{'rtsp-ipv6'}="$pid $pid2";
}
}
-
elsif($what eq "ftps") {
if(!$stunnel) {
# we can't run ftps tests without stunnel
@@ -3340,6 +4342,10 @@ sub startservers {
# stop server when running and using a different cert
stopserver('ftps');
}
+ if($torture && $run{'ftp'} &&
+ !responsive_pingpong_server("ftp", "", $verbose)) {
+ stopserver('ftp');
+ }
if(!$run{'ftp'}) {
($pid, $pid2) = runpingpongserver("ftp", "", $verbose);
if($pid <= 0) {
@@ -3363,17 +4369,21 @@ sub startservers {
}
elsif($what eq "https") {
if(!$stunnel) {
- # we can't run ftps tests without stunnel
+ # we can't run https tests without stunnel
return "no stunnel";
}
if(!$ssl_version) {
- # we can't run ftps tests if libcurl is SSL-less
+ # we can't run https tests if libcurl is SSL-less
return "curl lacks SSL support";
}
if($runcert{'https'} && ($runcert{'https'} ne $certfile)) {
# stop server when running and using a different cert
stopserver('https');
}
+ if($torture && $run{'http'} &&
+ !responsive_http_server("http", $verbose, 0, $HTTPPORT)) {
+ stopserver('http');
+ }
if(!$run{'http'}) {
($pid, $pid2) = runhttpserver("http", $verbose, 0,
$HTTPPORT);
@@ -3393,7 +4403,49 @@ sub startservers {
$run{'https'}="$pid $pid2";
}
}
+ elsif($what eq "httptls") {
+ if(!$httptlssrv) {
+ # for now, we can't run http TLS-EXT tests without gnutls-serv
+ return "no gnutls-serv";
+ }
+ if($torture && $run{'httptls'} &&
+ !responsive_httptls_server($verbose, "IPv4")) {
+ stopserver('httptls');
+ }
+ if(!$run{'httptls'}) {
+ ($pid, $pid2) = runhttptlsserver($verbose, "IPv4");
+ if($pid <= 0) {
+ return "failed starting HTTPTLS server (gnutls-serv)";
+ }
+ logmsg sprintf("* pid httptls => %d %d\n", $pid, $pid2)
+ if($verbose);
+ $run{'httptls'}="$pid $pid2";
+ }
+ }
+ elsif($what eq "httptls-ipv6") {
+ if(!$httptlssrv) {
+ # for now, we can't run http TLS-EXT tests without gnutls-serv
+ return "no gnutls-serv";
+ }
+ if($torture && $run{'httptls-ipv6'} &&
+ !responsive_httptls_server($verbose, "ipv6")) {
+ stopserver('httptls-ipv6');
+ }
+ if(!$run{'httptls-ipv6'}) {
+ ($pid, $pid2) = runhttptlsserver($verbose, "ipv6");
+ if($pid <= 0) {
+ return "failed starting HTTPTLS-IPv6 server (gnutls-serv)";
+ }
+ logmsg sprintf("* pid httptls-ipv6 => %d %d\n", $pid, $pid2)
+ if($verbose);
+ $run{'httptls-ipv6'}="$pid $pid2";
+ }
+ }
elsif($what eq "tftp") {
+ if($torture && $run{'tftp'} &&
+ !responsive_tftp_server("", $verbose)) {
+ stopserver('tftp');
+ }
if(!$run{'tftp'}) {
($pid, $pid2) = runtftpserver("", $verbose);
if($pid <= 0) {
@@ -3404,8 +4456,12 @@ sub startservers {
}
}
elsif($what eq "tftp-ipv6") {
+ if($torture && $run{'tftp-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";
}
@@ -3450,6 +4506,22 @@ 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);
}
@@ -3468,7 +4540,6 @@ sub startservers {
#
# Returns: a string, blank if everything is fine or a reason why it failed
#
-
sub serverfortest {
my ($testnum)=@_;
@@ -3479,14 +4550,28 @@ sub serverfortest {
return "no server specified";
}
- for (@what) {
- my $proto = lc($_);
- chomp $proto;
- $proto =~ s/\s.*//g; # take first word
- if (! grep /^$proto$/, @protocols) {
- if (substr($proto,0,5) ne "socks") {
- return "curl lacks $proto support";
+ for(my $i = scalar(@what) - 1; $i >= 0; $i--) {
+ my $srvrline = $what[$i];
+ chomp $srvrline if($srvrline);
+ if($srvrline =~ /^(\S+)((\s*)(.*))/) {
+ my $server = "${1}";
+ my $lnrest = "${2}";
+ my $tlsext;
+ if($server =~ /^(httptls)(\+)(ext|srp)(\d*)(-ipv6|)$/) {
+ $server = "${1}${4}${5}";
+ $tlsext = uc("TLS-${3}");
+ }
+ if(! grep /^\Q$server\E$/, @protocols) {
+ if(substr($server,0,5) ne "socks") {
+ if($tlsext) {
+ return "curl lacks $tlsext support";
+ }
+ else {
+ return "curl lacks $server server support";
+ }
+ }
}
+ $what[$i] = "$server$lnrest" if($tlsext);
}
}
@@ -3636,7 +4721,6 @@ sub runtimestats {
my $number=0;
my $fromnum=-1;
my @testthis;
-my %disabled;
while(@ARGV) {
if ($ARGV[0] eq "-v") {
# verbose output
@@ -3653,24 +4737,38 @@ while(@ARGV) {
$DBGCURL=$CURL=$ARGV[1];
shift @ARGV;
}
+ elsif ($ARGV[0] eq "-vc") {
+ # use this path to a curl used to verify servers
+
+ # Particularly useful when you introduce a crashing bug somewhere in
+ # the development version as then it won't be able to run any tests
+ # since it can't verify the servers!
+
+ $VCURL=$ARGV[1];
+ shift @ARGV;
+ }
elsif ($ARGV[0] eq "-d") {
# have the servers display protocol output
$debugprotocol=1;
}
- elsif ($ARGV[0] eq "-f") {
- # run fork-servers, which makes the server fork for all new
- # connections This is NOT what you wanna do without knowing exactly
- # why and for what
- $forkserver=1;
- }
elsif ($ARGV[0] eq "-g") {
# run this test with gdb
$gdbthis=1;
}
+ elsif ($ARGV[0] eq "-gw") {
+ # run this test with windowed gdb
+ $gdbthis=1;
+ $gdbxwin=1;
+ }
elsif($ARGV[0] eq "-s") {
# short output
$short=1;
}
+ elsif($ARGV[0] eq "-am") {
+ # automake-style output
+ $short=1;
+ $automakestyle=1;
+ }
elsif($ARGV[0] eq "-n") {
# no valgrind
undef $valgrind;
@@ -3690,6 +4788,10 @@ while(@ARGV) {
# continue anyway, even if a test fail
$anyway=1;
}
+ elsif($ARGV[0] eq "-e") {
+ # run the tests cases event based if possible
+ $run_event_based=1;
+ }
elsif($ARGV[0] eq "-p") {
$postmortem=1;
}
@@ -3738,6 +4840,7 @@ Usage: runtests.pl [options] [test selection(s)]
-c path use this curl executable
-d display server debug info
-g run the test case with gdb
+ -gw run the test case with gdb as a windowed application
-h this help text
-k keep stdout and stderr files present after tests
-l list all test case names/descriptions
@@ -3746,8 +4849,10 @@ Usage: runtests.pl [options] [test selection(s)]
-r run time statistics
-rf full run time statistics
-s short output
+ -am automake style output PASS/FAIL: [number] [name]
-t[N] torture (simulate memory alloc failures); N means fail Nth alloc
-v verbose output
+ -vc path use this curl only to verify the existing servers
[num] like "5 6 9" or " 5 to 22 " to run those tests only
[!num] like "!5 !6 !9" to disable those tests
[keyword] like "IPv6" to select only tests containing the key word
@@ -3840,32 +4945,36 @@ 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";
}
}
-$HTTPPORT = $base++; # HTTP server port
-$HTTPSPORT = $base++; # HTTPS server port
-$FTPPORT = $base++; # FTP server port
-$FTPSPORT = $base++; # FTPS server port
-$HTTP6PORT = $base++; # HTTP IPv6 server port (different IP protocol
- # but we follow the same port scheme anyway)
-$FTP2PORT = $base++; # FTP server 2 port
-$FTP6PORT = $base++; # FTP IPv6 port
-$TFTPPORT = $base++; # TFTP (UDP) port
-$TFTP6PORT = $base++; # TFTP IPv6 (UDP) port
-$SSHPORT = $base++; # SSH (SCP/SFTP) port
-$SOCKSPORT = $base++; # SOCKS port
-$POP3PORT = $base++;
-$POP36PORT = $base++;
-$IMAPPORT = $base++;
-$IMAP6PORT = $base++;
-$SMTPPORT = $base++;
-$SMTP6PORT = $base++;
-$RTSPPORT = $base++;
-$RTSP6PORT = $base++;
-$GOPHERPORT =$base++;
-$GOPHER6PORT=$base++;
+$HTTPPORT = $base++; # HTTP server port
+$HTTPSPORT = $base++; # HTTPS (stunnel) server port
+$FTPPORT = $base++; # FTP server port
+$FTPSPORT = $base++; # FTPS (stunnel) server port
+$HTTP6PORT = $base++; # HTTP IPv6 server port
+$FTP2PORT = $base++; # FTP server 2 port
+$FTP6PORT = $base++; # FTP IPv6 port
+$TFTPPORT = $base++; # TFTP (UDP) port
+$TFTP6PORT = $base++; # TFTP IPv6 (UDP) port
+$SSHPORT = $base++; # SSH (SCP/SFTP) port
+$SOCKSPORT = $base++; # SOCKS port
+$POP3PORT = $base++; # POP3 server port
+$POP36PORT = $base++; # POP3 IPv6 server port
+$IMAPPORT = $base++; # IMAP server port
+$IMAP6PORT = $base++; # IMAP IPv6 server port
+$SMTPPORT = $base++; # SMTP server port
+$SMTP6PORT = $base++; # SMTP IPv6 server port
+$RTSPPORT = $base++; # RTSP server port
+$RTSP6PORT = $base++; # RTSP IPv6 server port
+$GOPHERPORT = $base++; # Gopher IPv4 server port
+$GOPHER6PORT = $base++; # Gopher IPv6 server port
+$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:
@@ -3890,6 +4999,33 @@ if(!$listonly) {
}
#######################################################################
+# Fetch all disabled tests, if there are any
+#
+
+sub disabledtests {
+ my ($file) = @_;
+
+ if(open(D, "<$file")) {
+ while(<D>) {
+ if(/^ *\#/) {
+ # allow comments
+ next;
+ }
+ if($_ =~ /(\d+)/) {
+ $disabled{$1}=$1; # disable this test number
+ }
+ }
+ close(D);
+ }
+}
+
+# globally disabled tests
+disabledtests("$TESTDIR/DISABLED");
+
+# locally disabled tests, ignored by git etc
+disabledtests("$TESTDIR/DISABLED.local");
+
+#######################################################################
# If 'all' tests are requested, find out all test numbers
#
@@ -3899,18 +5035,6 @@ if ( $TESTCASES eq "all") {
my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
closedir(DIR);
- open(D, "<$TESTDIR/DISABLED");
- while(<D>) {
- if(/^ *\#/) {
- # allow comments
- next;
- }
- if($_ =~ /(\d+)/) {
- $disabled{$1}=$1; # disable this test number
- }
- }
- close(D);
-
$TESTCASES=""; # start with no test cases
# cut off everything but the digits
@@ -3930,6 +5054,19 @@ if ( $TESTCASES eq "all") {
$TESTCASES .= " $n";
}
}
+else {
+ my $verified="";
+ map {
+ if (-e "$TESTDIR/test$_") {
+ $verified.="$_ ";
+ }
+ } split(" ", $TESTCASES);
+ if($verified eq "") {
+ print "No existing test cases were specified\n";
+ exit;
+ }
+ $TESTCASES = $verified;
+}
#######################################################################
# Start the command line log
@@ -4018,6 +5155,12 @@ sub displaylogs {
if(($log =~ /^file\d+\.txt/) && ($log !~ /^file$testnum\.txt/)) {
next; # skip fileNnn.txt of other tests
}
+ if(($log =~ /^netrc\d+/) && ($log !~ /^netrc$testnum/)) {
+ next; # skip netrcNnn of other tests
+ }
+ if(($log =~ /^trace\d+/) && ($log !~ /^trace$testnum/)) {
+ next; # skip traceNnn of other tests
+ }
if(($log =~ /^valgrind\d+/) && ($log !~ /^valgrind$testnum(\..*|)$/)) {
next; # skip valgrindNnn of other tests
}
@@ -4046,7 +5189,7 @@ foreach $testnum (@at) {
$lasttest = $testnum if($testnum > $lasttest);
$count++;
- my $error = singletest($testnum, $count, scalar(@at));
+ my $error = singletest($run_event_based, $testnum, $count, scalar(@at));
if($error < 0) {
# not a test we can run
next;
@@ -4104,7 +5247,7 @@ if($all) {
sprintf("%.0f", $sofar) ." seconds.\n";
}
-if($skipped) {
+if($skipped && !$short) {
my $s=0;
logmsg "TESTINFO: $skipped tests were skipped due to these restraints:\n";
@@ -4115,14 +5258,20 @@ if($skipped) {
# now show all test case numbers that had this reason for being
# skipped
my $c=0;
+ my $max = 9;
for(0 .. scalar @teststat) {
my $t = $_;
if($teststat[$_] && ($teststat[$_] eq $r)) {
- logmsg ", " if($c);
- logmsg $_;
+ if($c < $max) {
+ logmsg ", " if($c);
+ logmsg $_;
+ }
$c++;
}
}
+ if($c > $max) {
+ logmsg " and ".($c-$max)." more";
+ }
logmsg ")\n";
}
}
diff --git a/tests/secureserver.pl b/tests/secureserver.pl
index 064fa84f..62761104 100755
--- a/tests/secureserver.pl
+++ b/tests/secureserver.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,12 +26,14 @@
# non-secure test harness servers.
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
}
use strict;
use warnings;
use Cwd;
+use Cwd 'abs_path';
use serverhelp qw(
server_pidfilename
@@ -49,7 +51,9 @@ my $stuncert;
my $ver_major;
my $ver_minor;
+my $fips_support;
my $stunnel_version;
+my $tstunnel_windows;
my $socketopt;
my $cmd;
@@ -60,6 +64,7 @@ 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
#***************************************************************************
@@ -111,7 +116,12 @@ while(@ARGV) {
}
elsif($ARGV[0] eq '--stunnel') {
if($ARGV[1]) {
- $stunnel = $ARGV[1];
+ if($ARGV[1] =~ /^([\w\/]+)$/) {
+ $stunnel = $ARGV[1];
+ }
+ else {
+ $stunnel = "\"". $ARGV[1] ."\"";
+ }
shift @ARGV;
}
}
@@ -171,7 +181,9 @@ 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:";
@@ -183,7 +195,11 @@ foreach my $veropt (('-version', '-V')) {
if($verstr =~ /^stunnel (\d+)\.(\d+) on /) {
$ver_major = $1;
$ver_minor = $2;
- last;
+ }
+ elsif($verstr =~ /^sslVersion.*fips *= *yes/) {
+ # the fips option causes an error if stunnel doesn't support it
+ $fips_support = 1;
+ last
}
}
last if($ver_major);
@@ -200,7 +216,7 @@ if((!$ver_major) || (!$ver_minor)) {
$stunnel_version = (100*$ver_major) + $ver_minor;
#***************************************************************************
-# Verify minimmum stunnel required version
+# Verify minimum stunnel required version
#
if($stunnel_version < 310) {
print "$ssltext Unsupported stunnel version $ver_major.$ver_minor\n";
@@ -208,6 +224,17 @@ 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) {
@@ -242,19 +269,24 @@ if($stunnel_version >= 400) {
$SIG{TERM} = \&exit_signal_handler;
# stunnel configuration file
if(open(STUNCONF, ">$conffile")) {
- print STUNCONF "
- CApath = $path
- cert = $certfile
- pid = $pidfile
- debug = $loglevel
- output = $logfile
- socket = $socketopt
- foreground = yes
-
- [curltest]
- accept = $accept_port
- connect = $target_port
- ";
+ print STUNCONF "CApath = $capath\n";
+ print STUNCONF "cert = $certfile\n";
+ print STUNCONF "debug = $loglevel\n";
+ print STUNCONF "socket = $socketopt\n";
+ if($fips_support) {
+ # disable fips in case OpenSSL doesn't support it
+ print STUNCONF "fips = no\n";
+ }
+ 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";
+ }
+ print STUNCONF "\n";
+ print STUNCONF "[curltest]\n";
+ print STUNCONF "accept = $accept_port\n";
+ print STUNCONF "connect = $target_port\n";
if(!close(STUNCONF)) {
print "$ssltext Error closing file $conffile\n";
exit 1;
@@ -267,13 +299,18 @@ if($stunnel_version >= 400) {
if($verbose) {
print uc($proto) ." server (stunnel $ver_major.$ver_minor)\n";
print "cmd: $cmd\n";
- print "CApath = $path\n";
+ print "CApath = $capath\n";
print "cert = $certfile\n";
- print "pid = $pidfile\n";
print "debug = $loglevel\n";
- print "output = $logfile\n";
print "socket = $socketopt\n";
- print "foreground = yes\n";
+ if($fips_support) {
+ print "fips = no\n";
+ }
+ if(!$tstunnel_windows) {
+ print "pid = $pidfile\n";
+ print "output = $logfile\n";
+ print "foreground = yes\n";
+ }
print "\n";
print "[curltest]\n";
print "accept = $accept_port\n";
@@ -287,6 +324,25 @@ if($stunnel_version >= 400) {
chmod(0600, $certfile) if(-f $certfile);
#***************************************************************************
+# Run tstunnel on Windows.
+#
+if($tstunnel_windows) {
+ # Fake pidfile for tstunnel on Windows.
+ if(open(OUT, ">$pidfile")) {
+ print OUT $$ . "\n";
+ close(OUT);
+ }
+
+ # Put an "exec" in front of the command so that the child process
+ # keeps this child's process ID.
+ exec("exec $cmd") || die "Can't exec() $cmd: $!";
+
+ # exec() should never return back here to this process. We protect
+ # ourselves by calling die() just in case something goes really bad.
+ die "error: exec() has returned";
+}
+
+#***************************************************************************
# Run stunnel.
#
my $rc = system($cmd);
diff --git a/tests/server/.gitignore b/tests/server/.gitignore
new file mode 100644
index 00000000..8007bec8
--- /dev/null
+++ b/tests/server/.gitignore
@@ -0,0 +1,7 @@
+getpart
+resolve
+rtspd
+sockfilt
+sws
+tftpd
+fake_ntlm
diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt
new file mode 100644
index 00000000..00f5242f
--- /dev/null
+++ b/tests/server/CMakeLists.txt
@@ -0,0 +1,62 @@
+set(TARGET_LABEL_PREFIX "Test server ")
+
+function(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
+ add_executable( ${TEST_NAME} ${ARGN} )
+ string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
+
+ 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"
+ )
+ if(USE_ARES)
+ include_directories(${CARES_INCLUDE_DIR})
+ endif()
+
+ target_link_libraries(${TEST_NAME} ${CURL_LIBS})
+
+ # Test servers simply are standalone programs that do not use libcurl
+ # library. For convinience and to ease portability of these servers,
+ # some source code files from the libcurl subdirectory are also used
+ # to build the servers. In order to achieve proper linkage of these
+ # files on Win32 targets it is necessary to build the test servers
+ # with CURL_STATICLIB defined, independently of how libcurl is built.
+ if(NOT CURL_STATICLIB)
+ set_target_properties(${TEST_NAME} PROPERTIES
+ COMPILE_DEFINITIONS CURL_STATICLIB) # ${UPPER_TEST_NAME}
+ endif()
+ set_target_properties(${TEST_NAME} PROPERTIES
+ PROJECT_LABEL "${TARGET_LABEL_PREFIX}${TEST_NAME}")
+
+ # Add the postfix to the executable since it is not added
+ # automatically as for modules and shared libraries
+ set_target_properties(${TEST_NAME} PROPERTIES
+ DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
+
+endfunction()
+
+
+transform_makefile_inc("Makefile.inc"
+ "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
+include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
+
+foreach(EXECUTABLE_NAME ${noinst_PROGRAMS})
+ setup_executable(${EXECUTABLE_NAME} ${${EXECUTABLE_NAME}_SOURCES})
+endforeach()
+
+
+# SET(useful
+# getpart.c getpart.h
+# ${CURL_SOURCE_DIR}/lib/strequal.c
+# ${CURL_SOURCE_DIR}/lib/base64.c
+# ${CURL_SOURCE_DIR}/lib/mprintf.c
+# ${CURL_SOURCE_DIR}/lib/memdebug.c
+# ${CURL_SOURCE_DIR}/lib/timeval.c
+# )
+
+# SETUP_EXECUTABLE(sws sws.c util.c util.h ${useful})
+# SETUP_EXECUTABLE(resolve resolve.c util.c util.h ${useful})
+# SETUP_EXECUTABLE(sockfilt sockfilt.c util.c util.h ${useful} ${CURL_SOURCE_DIR}/lib/inet_pton.c)
+# SETUP_EXECUTABLE(getpart testpart.c ${useful})
+# SETUP_EXECUTABLE(tftpd tftpd.c util.c util.h ${useful} tftp.h)
+
diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am
index d4b9cc38..7533a98b 100644
--- a/tests/server/Makefile.am
+++ b/tests/server/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,31 +27,38 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
if USE_EMBEDDED_ARES
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/lib \
- -I$(top_srcdir)/lib \
- -I$(top_builddir)/ares \
- -I$(top_srcdir)/ares
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_builddir)/ares \
+ -I$(top_srcdir)/ares
else
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/lib \
- -I$(top_srcdir)/lib
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib
endif
-# Makefile.inc provides the source defines (noinst_PROGRAMS, useful, *_SOURCES, and *_LDADD)
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
+if DOING_NATIVE_WINDOWS
+AM_CPPFLAGS += -DCURL_STATICLIB
+endif
+
+# Makefile.inc provides neat definitions
include Makefile.inc
-extra_DIST = base64.pl Makefile.inc
+EXTRA_DIST = base64.pl Makefile.inc
diff --git a/tests/server/Makefile.in b/tests/server/Makefile.in
deleted file mode 100644
index 69907fda..00000000
--- a/tests/server/Makefile.in
+++ /dev/null
@@ -1,1692 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/Makefile.inc
-noinst_PROGRAMS = getpart$(EXEEXT) resolve$(EXEEXT) rtspd$(EXEEXT) \
- sockfilt$(EXEEXT) sws$(EXEEXT) tftpd$(EXEEXT)
-subdir = tests/server
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am__objects_1 = getpart-mprintf.$(OBJEXT) getpart-nonblock.$(OBJEXT) \
- getpart-strequal.$(OBJEXT) getpart-strtoofft.$(OBJEXT) \
- getpart-timeval.$(OBJEXT) getpart-warnless.$(OBJEXT)
-am__objects_2 =
-am__objects_3 = getpart-getpart.$(OBJEXT) getpart-base64.$(OBJEXT) \
- getpart-memdebug.$(OBJEXT)
-am_getpart_OBJECTS = $(am__objects_1) $(am__objects_2) \
- $(am__objects_3) getpart-testpart.$(OBJEXT)
-getpart_OBJECTS = $(am_getpart_OBJECTS)
-getpart_DEPENDENCIES =
-am__objects_4 = resolve-mprintf.$(OBJEXT) resolve-nonblock.$(OBJEXT) \
- resolve-strequal.$(OBJEXT) resolve-strtoofft.$(OBJEXT) \
- resolve-timeval.$(OBJEXT) resolve-warnless.$(OBJEXT)
-am__objects_5 = resolve-getpart.$(OBJEXT) resolve-base64.$(OBJEXT) \
- resolve-memdebug.$(OBJEXT)
-am__objects_6 = resolve-util.$(OBJEXT)
-am_resolve_OBJECTS = $(am__objects_4) $(am__objects_2) \
- $(am__objects_5) $(am__objects_6) resolve-resolve.$(OBJEXT)
-resolve_OBJECTS = $(am_resolve_OBJECTS)
-resolve_DEPENDENCIES =
-am__objects_7 = rtspd-mprintf.$(OBJEXT) rtspd-nonblock.$(OBJEXT) \
- rtspd-strequal.$(OBJEXT) rtspd-strtoofft.$(OBJEXT) \
- rtspd-timeval.$(OBJEXT) rtspd-warnless.$(OBJEXT)
-am__objects_8 = rtspd-getpart.$(OBJEXT) rtspd-base64.$(OBJEXT) \
- rtspd-memdebug.$(OBJEXT)
-am__objects_9 = rtspd-util.$(OBJEXT)
-am_rtspd_OBJECTS = $(am__objects_7) $(am__objects_2) $(am__objects_8) \
- $(am__objects_9) rtspd-rtspd.$(OBJEXT)
-rtspd_OBJECTS = $(am_rtspd_OBJECTS)
-rtspd_DEPENDENCIES =
-am__objects_10 = sockfilt-mprintf.$(OBJEXT) \
- sockfilt-nonblock.$(OBJEXT) sockfilt-strequal.$(OBJEXT) \
- sockfilt-strtoofft.$(OBJEXT) sockfilt-timeval.$(OBJEXT) \
- sockfilt-warnless.$(OBJEXT)
-am__objects_11 = sockfilt-getpart.$(OBJEXT) sockfilt-base64.$(OBJEXT) \
- sockfilt-memdebug.$(OBJEXT)
-am__objects_12 = sockfilt-util.$(OBJEXT)
-am_sockfilt_OBJECTS = $(am__objects_10) $(am__objects_2) \
- $(am__objects_11) $(am__objects_12) \
- sockfilt-sockfilt.$(OBJEXT) sockfilt-inet_pton.$(OBJEXT)
-sockfilt_OBJECTS = $(am_sockfilt_OBJECTS)
-sockfilt_DEPENDENCIES =
-am__objects_13 = sws-mprintf.$(OBJEXT) sws-nonblock.$(OBJEXT) \
- sws-strequal.$(OBJEXT) sws-strtoofft.$(OBJEXT) \
- sws-timeval.$(OBJEXT) sws-warnless.$(OBJEXT)
-am__objects_14 = sws-getpart.$(OBJEXT) sws-base64.$(OBJEXT) \
- sws-memdebug.$(OBJEXT)
-am__objects_15 = sws-util.$(OBJEXT)
-am_sws_OBJECTS = $(am__objects_13) $(am__objects_2) $(am__objects_14) \
- $(am__objects_15) sws-sws.$(OBJEXT)
-sws_OBJECTS = $(am_sws_OBJECTS)
-sws_DEPENDENCIES =
-am__objects_16 = tftpd-mprintf.$(OBJEXT) tftpd-nonblock.$(OBJEXT) \
- tftpd-strequal.$(OBJEXT) tftpd-strtoofft.$(OBJEXT) \
- tftpd-timeval.$(OBJEXT) tftpd-warnless.$(OBJEXT)
-am__objects_17 = tftpd-getpart.$(OBJEXT) tftpd-base64.$(OBJEXT) \
- tftpd-memdebug.$(OBJEXT)
-am__objects_18 = tftpd-util.$(OBJEXT)
-am_tftpd_OBJECTS = $(am__objects_16) $(am__objects_2) \
- $(am__objects_17) $(am__objects_18) tftpd-tftpd.$(OBJEXT)
-tftpd_OBJECTS = $(am_tftpd_OBJECTS)
-tftpd_DEPENDENCIES =
-DEFAULT_INCLUDES =
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(getpart_SOURCES) $(resolve_SOURCES) $(rtspd_SOURCES) \
- $(sockfilt_SOURCES) $(sws_SOURCES) $(tftpd_SOURCES)
-DIST_SOURCES = $(getpart_SOURCES) $(resolve_SOURCES) $(rtspd_SOURCES) \
- $(sockfilt_SOURCES) $(sws_SOURCES) $(tftpd_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, 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.
-#
-###########################################################################
-AUTOMAKE_OPTIONS = foreign nostdinc
-@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib
-
-
-# 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
-# might possibly already be installed in the system.
-#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
-# $(top_srcdir)/include is for libcurl's external include files
-# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
-# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
-# $(top_srcdir)/ares is for in-tree c-ares's external include files
-@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares
-
-CURLX_SRCS = \
- $(top_srcdir)/lib/mprintf.c \
- $(top_srcdir)/lib/nonblock.c \
- $(top_srcdir)/lib/strequal.c \
- $(top_srcdir)/lib/strtoofft.c \
- $(top_srcdir)/lib/timeval.c \
- $(top_srcdir)/lib/warnless.c
-
-CURLX_HDRS = \
- $(top_srcdir)/lib/curlx.h \
- $(top_srcdir)/lib/nonblock.h \
- $(top_srcdir)/lib/strequal.h \
- $(top_srcdir)/lib/strtoofft.h \
- $(top_srcdir)/lib/timeval.h \
- $(top_srcdir)/lib/warnless.h
-
-USEFUL = \
- getpart.c \
- getpart.h \
- $(top_srcdir)/lib/base64.c \
- $(top_srcdir)/lib/curl_base64.h \
- $(top_srcdir)/lib/memdebug.c \
- $(top_srcdir)/lib/memdebug.h
-
-UTIL = \
- util.c \
- util.h
-
-getpart_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) \
- testpart.c
-
-getpart_LDADD = @TEST_SERVER_LIBS@
-getpart_CFLAGS = $(AM_CFLAGS)
-resolve_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
- resolve.c
-
-resolve_LDADD = @TEST_SERVER_LIBS@
-resolve_CFLAGS = $(AM_CFLAGS)
-rtspd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
- rtspd.c
-
-rtspd_LDADD = @TEST_SERVER_LIBS@
-rtspd_CFLAGS = $(AM_CFLAGS)
-sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
- sockfilt.c \
- $(top_srcdir)/lib/inet_pton.c
-
-sockfilt_LDADD = @TEST_SERVER_LIBS@
-sockfilt_CFLAGS = $(AM_CFLAGS)
-sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
- sws.c
-
-sws_LDADD = @TEST_SERVER_LIBS@
-sws_CFLAGS = $(AM_CFLAGS)
-tftpd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
- tftpd.c \
- tftp.h
-
-tftpd_LDADD = @TEST_SERVER_LIBS@
-tftpd_CFLAGS = $(AM_CFLAGS)
-
-# Makefile.inc provides the source defines (noinst_PROGRAMS, useful, *_SOURCES, and *_LDADD)
-extra_DIST = base64.pl Makefile.inc
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/server/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign tests/server/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-getpart$(EXEEXT): $(getpart_OBJECTS) $(getpart_DEPENDENCIES)
- @rm -f getpart$(EXEEXT)
- $(LINK) $(getpart_LDFLAGS) $(getpart_OBJECTS) $(getpart_LDADD) $(LIBS)
-resolve$(EXEEXT): $(resolve_OBJECTS) $(resolve_DEPENDENCIES)
- @rm -f resolve$(EXEEXT)
- $(LINK) $(resolve_LDFLAGS) $(resolve_OBJECTS) $(resolve_LDADD) $(LIBS)
-rtspd$(EXEEXT): $(rtspd_OBJECTS) $(rtspd_DEPENDENCIES)
- @rm -f rtspd$(EXEEXT)
- $(LINK) $(rtspd_LDFLAGS) $(rtspd_OBJECTS) $(rtspd_LDADD) $(LIBS)
-sockfilt$(EXEEXT): $(sockfilt_OBJECTS) $(sockfilt_DEPENDENCIES)
- @rm -f sockfilt$(EXEEXT)
- $(LINK) $(sockfilt_LDFLAGS) $(sockfilt_OBJECTS) $(sockfilt_LDADD) $(LIBS)
-sws$(EXEEXT): $(sws_OBJECTS) $(sws_DEPENDENCIES)
- @rm -f sws$(EXEEXT)
- $(LINK) $(sws_LDFLAGS) $(sws_OBJECTS) $(sws_LDADD) $(LIBS)
-tftpd$(EXEEXT): $(tftpd_OBJECTS) $(tftpd_DEPENDENCIES)
- @rm -f tftpd$(EXEEXT)
- $(LINK) $(tftpd_LDFLAGS) $(tftpd_OBJECTS) $(tftpd_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-base64.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-getpart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-memdebug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-mprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-nonblock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-strequal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-strtoofft.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-testpart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-timeval.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-warnless.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-base64.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-getpart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-memdebug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-mprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-nonblock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-resolve.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-strequal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-strtoofft.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-timeval.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-util.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-warnless.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-base64.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-getpart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-memdebug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-mprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-nonblock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-rtspd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-strequal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-strtoofft.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-timeval.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-util.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-warnless.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-base64.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-getpart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-inet_pton.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-memdebug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-mprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-nonblock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-sockfilt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-strequal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-strtoofft.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-timeval.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-util.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-warnless.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-base64.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-getpart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-memdebug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-mprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-nonblock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-strequal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-strtoofft.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-sws.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-timeval.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-util.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-warnless.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-base64.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-getpart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-memdebug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-mprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-nonblock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-strequal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-strtoofft.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-tftpd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-timeval.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-util.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-warnless.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-getpart-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-mprintf.o -MD -MP -MF "$(DEPDIR)/getpart-mprintf.Tpo" -c -o getpart-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-mprintf.Tpo" "$(DEPDIR)/getpart-mprintf.Po"; else rm -f "$(DEPDIR)/getpart-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='getpart-mprintf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
-
-getpart-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-mprintf.obj -MD -MP -MF "$(DEPDIR)/getpart-mprintf.Tpo" -c -o getpart-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-mprintf.Tpo" "$(DEPDIR)/getpart-mprintf.Po"; else rm -f "$(DEPDIR)/getpart-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='getpart-mprintf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
-
-getpart-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-nonblock.o -MD -MP -MF "$(DEPDIR)/getpart-nonblock.Tpo" -c -o getpart-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-nonblock.Tpo" "$(DEPDIR)/getpart-nonblock.Po"; else rm -f "$(DEPDIR)/getpart-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='getpart-nonblock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
-
-getpart-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-nonblock.obj -MD -MP -MF "$(DEPDIR)/getpart-nonblock.Tpo" -c -o getpart-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-nonblock.Tpo" "$(DEPDIR)/getpart-nonblock.Po"; else rm -f "$(DEPDIR)/getpart-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='getpart-nonblock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
-
-getpart-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strequal.o -MD -MP -MF "$(DEPDIR)/getpart-strequal.Tpo" -c -o getpart-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-strequal.Tpo" "$(DEPDIR)/getpart-strequal.Po"; else rm -f "$(DEPDIR)/getpart-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='getpart-strequal.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
-
-getpart-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strequal.obj -MD -MP -MF "$(DEPDIR)/getpart-strequal.Tpo" -c -o getpart-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-strequal.Tpo" "$(DEPDIR)/getpart-strequal.Po"; else rm -f "$(DEPDIR)/getpart-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='getpart-strequal.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
-
-getpart-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strtoofft.o -MD -MP -MF "$(DEPDIR)/getpart-strtoofft.Tpo" -c -o getpart-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-strtoofft.Tpo" "$(DEPDIR)/getpart-strtoofft.Po"; else rm -f "$(DEPDIR)/getpart-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='getpart-strtoofft.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
-
-getpart-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strtoofft.obj -MD -MP -MF "$(DEPDIR)/getpart-strtoofft.Tpo" -c -o getpart-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-strtoofft.Tpo" "$(DEPDIR)/getpart-strtoofft.Po"; else rm -f "$(DEPDIR)/getpart-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='getpart-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
-
-getpart-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-timeval.o -MD -MP -MF "$(DEPDIR)/getpart-timeval.Tpo" -c -o getpart-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-timeval.Tpo" "$(DEPDIR)/getpart-timeval.Po"; else rm -f "$(DEPDIR)/getpart-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='getpart-timeval.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
-
-getpart-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-timeval.obj -MD -MP -MF "$(DEPDIR)/getpart-timeval.Tpo" -c -o getpart-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-timeval.Tpo" "$(DEPDIR)/getpart-timeval.Po"; else rm -f "$(DEPDIR)/getpart-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='getpart-timeval.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
-
-getpart-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-warnless.o -MD -MP -MF "$(DEPDIR)/getpart-warnless.Tpo" -c -o getpart-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-warnless.Tpo" "$(DEPDIR)/getpart-warnless.Po"; else rm -f "$(DEPDIR)/getpart-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='getpart-warnless.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
-
-getpart-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-warnless.obj -MD -MP -MF "$(DEPDIR)/getpart-warnless.Tpo" -c -o getpart-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-warnless.Tpo" "$(DEPDIR)/getpart-warnless.Po"; else rm -f "$(DEPDIR)/getpart-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='getpart-warnless.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
-
-getpart-getpart.o: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-getpart.o -MD -MP -MF "$(DEPDIR)/getpart-getpart.Tpo" -c -o getpart-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-getpart.Tpo" "$(DEPDIR)/getpart-getpart.Po"; else rm -f "$(DEPDIR)/getpart-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='getpart-getpart.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
-
-getpart-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-getpart.obj -MD -MP -MF "$(DEPDIR)/getpart-getpart.Tpo" -c -o getpart-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-getpart.Tpo" "$(DEPDIR)/getpart-getpart.Po"; else rm -f "$(DEPDIR)/getpart-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='getpart-getpart.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
-
-getpart-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-base64.o -MD -MP -MF "$(DEPDIR)/getpart-base64.Tpo" -c -o getpart-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-base64.Tpo" "$(DEPDIR)/getpart-base64.Po"; else rm -f "$(DEPDIR)/getpart-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='getpart-base64.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
-
-getpart-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-base64.obj -MD -MP -MF "$(DEPDIR)/getpart-base64.Tpo" -c -o getpart-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-base64.Tpo" "$(DEPDIR)/getpart-base64.Po"; else rm -f "$(DEPDIR)/getpart-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='getpart-base64.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
-
-getpart-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-memdebug.o -MD -MP -MF "$(DEPDIR)/getpart-memdebug.Tpo" -c -o getpart-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-memdebug.Tpo" "$(DEPDIR)/getpart-memdebug.Po"; else rm -f "$(DEPDIR)/getpart-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='getpart-memdebug.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
-
-getpart-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-memdebug.obj -MD -MP -MF "$(DEPDIR)/getpart-memdebug.Tpo" -c -o getpart-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-memdebug.Tpo" "$(DEPDIR)/getpart-memdebug.Po"; else rm -f "$(DEPDIR)/getpart-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='getpart-memdebug.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
-
-getpart-testpart.o: testpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-testpart.o -MD -MP -MF "$(DEPDIR)/getpart-testpart.Tpo" -c -o getpart-testpart.o `test -f 'testpart.c' || echo '$(srcdir)/'`testpart.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-testpart.Tpo" "$(DEPDIR)/getpart-testpart.Po"; else rm -f "$(DEPDIR)/getpart-testpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testpart.c' object='getpart-testpart.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-testpart.o `test -f 'testpart.c' || echo '$(srcdir)/'`testpart.c
-
-getpart-testpart.obj: testpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-testpart.obj -MD -MP -MF "$(DEPDIR)/getpart-testpart.Tpo" -c -o getpart-testpart.obj `if test -f 'testpart.c'; then $(CYGPATH_W) 'testpart.c'; else $(CYGPATH_W) '$(srcdir)/testpart.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-testpart.Tpo" "$(DEPDIR)/getpart-testpart.Po"; else rm -f "$(DEPDIR)/getpart-testpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testpart.c' object='getpart-testpart.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-testpart.obj `if test -f 'testpart.c'; then $(CYGPATH_W) 'testpart.c'; else $(CYGPATH_W) '$(srcdir)/testpart.c'; fi`
-
-resolve-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-mprintf.o -MD -MP -MF "$(DEPDIR)/resolve-mprintf.Tpo" -c -o resolve-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-mprintf.Tpo" "$(DEPDIR)/resolve-mprintf.Po"; else rm -f "$(DEPDIR)/resolve-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='resolve-mprintf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
-
-resolve-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-mprintf.obj -MD -MP -MF "$(DEPDIR)/resolve-mprintf.Tpo" -c -o resolve-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-mprintf.Tpo" "$(DEPDIR)/resolve-mprintf.Po"; else rm -f "$(DEPDIR)/resolve-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='resolve-mprintf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
-
-resolve-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-nonblock.o -MD -MP -MF "$(DEPDIR)/resolve-nonblock.Tpo" -c -o resolve-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-nonblock.Tpo" "$(DEPDIR)/resolve-nonblock.Po"; else rm -f "$(DEPDIR)/resolve-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='resolve-nonblock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
-
-resolve-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-nonblock.obj -MD -MP -MF "$(DEPDIR)/resolve-nonblock.Tpo" -c -o resolve-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-nonblock.Tpo" "$(DEPDIR)/resolve-nonblock.Po"; else rm -f "$(DEPDIR)/resolve-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='resolve-nonblock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
-
-resolve-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strequal.o -MD -MP -MF "$(DEPDIR)/resolve-strequal.Tpo" -c -o resolve-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-strequal.Tpo" "$(DEPDIR)/resolve-strequal.Po"; else rm -f "$(DEPDIR)/resolve-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='resolve-strequal.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
-
-resolve-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strequal.obj -MD -MP -MF "$(DEPDIR)/resolve-strequal.Tpo" -c -o resolve-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-strequal.Tpo" "$(DEPDIR)/resolve-strequal.Po"; else rm -f "$(DEPDIR)/resolve-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='resolve-strequal.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
-
-resolve-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strtoofft.o -MD -MP -MF "$(DEPDIR)/resolve-strtoofft.Tpo" -c -o resolve-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-strtoofft.Tpo" "$(DEPDIR)/resolve-strtoofft.Po"; else rm -f "$(DEPDIR)/resolve-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='resolve-strtoofft.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
-
-resolve-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strtoofft.obj -MD -MP -MF "$(DEPDIR)/resolve-strtoofft.Tpo" -c -o resolve-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-strtoofft.Tpo" "$(DEPDIR)/resolve-strtoofft.Po"; else rm -f "$(DEPDIR)/resolve-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='resolve-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
-
-resolve-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-timeval.o -MD -MP -MF "$(DEPDIR)/resolve-timeval.Tpo" -c -o resolve-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-timeval.Tpo" "$(DEPDIR)/resolve-timeval.Po"; else rm -f "$(DEPDIR)/resolve-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='resolve-timeval.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
-
-resolve-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-timeval.obj -MD -MP -MF "$(DEPDIR)/resolve-timeval.Tpo" -c -o resolve-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-timeval.Tpo" "$(DEPDIR)/resolve-timeval.Po"; else rm -f "$(DEPDIR)/resolve-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='resolve-timeval.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
-
-resolve-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-warnless.o -MD -MP -MF "$(DEPDIR)/resolve-warnless.Tpo" -c -o resolve-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-warnless.Tpo" "$(DEPDIR)/resolve-warnless.Po"; else rm -f "$(DEPDIR)/resolve-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='resolve-warnless.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
-
-resolve-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-warnless.obj -MD -MP -MF "$(DEPDIR)/resolve-warnless.Tpo" -c -o resolve-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-warnless.Tpo" "$(DEPDIR)/resolve-warnless.Po"; else rm -f "$(DEPDIR)/resolve-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='resolve-warnless.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
-
-resolve-getpart.o: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-getpart.o -MD -MP -MF "$(DEPDIR)/resolve-getpart.Tpo" -c -o resolve-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-getpart.Tpo" "$(DEPDIR)/resolve-getpart.Po"; else rm -f "$(DEPDIR)/resolve-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='resolve-getpart.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
-
-resolve-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-getpart.obj -MD -MP -MF "$(DEPDIR)/resolve-getpart.Tpo" -c -o resolve-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-getpart.Tpo" "$(DEPDIR)/resolve-getpart.Po"; else rm -f "$(DEPDIR)/resolve-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='resolve-getpart.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
-
-resolve-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-base64.o -MD -MP -MF "$(DEPDIR)/resolve-base64.Tpo" -c -o resolve-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-base64.Tpo" "$(DEPDIR)/resolve-base64.Po"; else rm -f "$(DEPDIR)/resolve-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='resolve-base64.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
-
-resolve-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-base64.obj -MD -MP -MF "$(DEPDIR)/resolve-base64.Tpo" -c -o resolve-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-base64.Tpo" "$(DEPDIR)/resolve-base64.Po"; else rm -f "$(DEPDIR)/resolve-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='resolve-base64.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
-
-resolve-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-memdebug.o -MD -MP -MF "$(DEPDIR)/resolve-memdebug.Tpo" -c -o resolve-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-memdebug.Tpo" "$(DEPDIR)/resolve-memdebug.Po"; else rm -f "$(DEPDIR)/resolve-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='resolve-memdebug.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
-
-resolve-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-memdebug.obj -MD -MP -MF "$(DEPDIR)/resolve-memdebug.Tpo" -c -o resolve-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-memdebug.Tpo" "$(DEPDIR)/resolve-memdebug.Po"; else rm -f "$(DEPDIR)/resolve-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='resolve-memdebug.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
-
-resolve-util.o: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-util.o -MD -MP -MF "$(DEPDIR)/resolve-util.Tpo" -c -o resolve-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-util.Tpo" "$(DEPDIR)/resolve-util.Po"; else rm -f "$(DEPDIR)/resolve-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='resolve-util.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
-
-resolve-util.obj: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-util.obj -MD -MP -MF "$(DEPDIR)/resolve-util.Tpo" -c -o resolve-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-util.Tpo" "$(DEPDIR)/resolve-util.Po"; else rm -f "$(DEPDIR)/resolve-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='resolve-util.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
-
-resolve-resolve.o: resolve.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.o -MD -MP -MF "$(DEPDIR)/resolve-resolve.Tpo" -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-resolve.Tpo" "$(DEPDIR)/resolve-resolve.Po"; else rm -f "$(DEPDIR)/resolve-resolve.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolve.c' object='resolve-resolve.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c
-
-resolve-resolve.obj: resolve.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.obj -MD -MP -MF "$(DEPDIR)/resolve-resolve.Tpo" -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-resolve.Tpo" "$(DEPDIR)/resolve-resolve.Po"; else rm -f "$(DEPDIR)/resolve-resolve.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolve.c' object='resolve-resolve.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`
-
-rtspd-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-mprintf.o -MD -MP -MF "$(DEPDIR)/rtspd-mprintf.Tpo" -c -o rtspd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-mprintf.Tpo" "$(DEPDIR)/rtspd-mprintf.Po"; else rm -f "$(DEPDIR)/rtspd-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='rtspd-mprintf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
-
-rtspd-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-mprintf.obj -MD -MP -MF "$(DEPDIR)/rtspd-mprintf.Tpo" -c -o rtspd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-mprintf.Tpo" "$(DEPDIR)/rtspd-mprintf.Po"; else rm -f "$(DEPDIR)/rtspd-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='rtspd-mprintf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
-
-rtspd-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-nonblock.o -MD -MP -MF "$(DEPDIR)/rtspd-nonblock.Tpo" -c -o rtspd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-nonblock.Tpo" "$(DEPDIR)/rtspd-nonblock.Po"; else rm -f "$(DEPDIR)/rtspd-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='rtspd-nonblock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
-
-rtspd-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-nonblock.obj -MD -MP -MF "$(DEPDIR)/rtspd-nonblock.Tpo" -c -o rtspd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-nonblock.Tpo" "$(DEPDIR)/rtspd-nonblock.Po"; else rm -f "$(DEPDIR)/rtspd-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='rtspd-nonblock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
-
-rtspd-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strequal.o -MD -MP -MF "$(DEPDIR)/rtspd-strequal.Tpo" -c -o rtspd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-strequal.Tpo" "$(DEPDIR)/rtspd-strequal.Po"; else rm -f "$(DEPDIR)/rtspd-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='rtspd-strequal.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
-
-rtspd-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strequal.obj -MD -MP -MF "$(DEPDIR)/rtspd-strequal.Tpo" -c -o rtspd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-strequal.Tpo" "$(DEPDIR)/rtspd-strequal.Po"; else rm -f "$(DEPDIR)/rtspd-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='rtspd-strequal.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
-
-rtspd-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strtoofft.o -MD -MP -MF "$(DEPDIR)/rtspd-strtoofft.Tpo" -c -o rtspd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-strtoofft.Tpo" "$(DEPDIR)/rtspd-strtoofft.Po"; else rm -f "$(DEPDIR)/rtspd-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='rtspd-strtoofft.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
-
-rtspd-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strtoofft.obj -MD -MP -MF "$(DEPDIR)/rtspd-strtoofft.Tpo" -c -o rtspd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-strtoofft.Tpo" "$(DEPDIR)/rtspd-strtoofft.Po"; else rm -f "$(DEPDIR)/rtspd-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='rtspd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
-
-rtspd-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-timeval.o -MD -MP -MF "$(DEPDIR)/rtspd-timeval.Tpo" -c -o rtspd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-timeval.Tpo" "$(DEPDIR)/rtspd-timeval.Po"; else rm -f "$(DEPDIR)/rtspd-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='rtspd-timeval.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
-
-rtspd-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-timeval.obj -MD -MP -MF "$(DEPDIR)/rtspd-timeval.Tpo" -c -o rtspd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-timeval.Tpo" "$(DEPDIR)/rtspd-timeval.Po"; else rm -f "$(DEPDIR)/rtspd-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='rtspd-timeval.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
-
-rtspd-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-warnless.o -MD -MP -MF "$(DEPDIR)/rtspd-warnless.Tpo" -c -o rtspd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-warnless.Tpo" "$(DEPDIR)/rtspd-warnless.Po"; else rm -f "$(DEPDIR)/rtspd-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='rtspd-warnless.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
-
-rtspd-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-warnless.obj -MD -MP -MF "$(DEPDIR)/rtspd-warnless.Tpo" -c -o rtspd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-warnless.Tpo" "$(DEPDIR)/rtspd-warnless.Po"; else rm -f "$(DEPDIR)/rtspd-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='rtspd-warnless.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
-
-rtspd-getpart.o: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-getpart.o -MD -MP -MF "$(DEPDIR)/rtspd-getpart.Tpo" -c -o rtspd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-getpart.Tpo" "$(DEPDIR)/rtspd-getpart.Po"; else rm -f "$(DEPDIR)/rtspd-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='rtspd-getpart.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
-
-rtspd-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-getpart.obj -MD -MP -MF "$(DEPDIR)/rtspd-getpart.Tpo" -c -o rtspd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-getpart.Tpo" "$(DEPDIR)/rtspd-getpart.Po"; else rm -f "$(DEPDIR)/rtspd-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='rtspd-getpart.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
-
-rtspd-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-base64.o -MD -MP -MF "$(DEPDIR)/rtspd-base64.Tpo" -c -o rtspd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-base64.Tpo" "$(DEPDIR)/rtspd-base64.Po"; else rm -f "$(DEPDIR)/rtspd-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='rtspd-base64.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
-
-rtspd-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-base64.obj -MD -MP -MF "$(DEPDIR)/rtspd-base64.Tpo" -c -o rtspd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-base64.Tpo" "$(DEPDIR)/rtspd-base64.Po"; else rm -f "$(DEPDIR)/rtspd-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='rtspd-base64.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
-
-rtspd-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-memdebug.o -MD -MP -MF "$(DEPDIR)/rtspd-memdebug.Tpo" -c -o rtspd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-memdebug.Tpo" "$(DEPDIR)/rtspd-memdebug.Po"; else rm -f "$(DEPDIR)/rtspd-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='rtspd-memdebug.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
-
-rtspd-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-memdebug.obj -MD -MP -MF "$(DEPDIR)/rtspd-memdebug.Tpo" -c -o rtspd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-memdebug.Tpo" "$(DEPDIR)/rtspd-memdebug.Po"; else rm -f "$(DEPDIR)/rtspd-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='rtspd-memdebug.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
-
-rtspd-util.o: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-util.o -MD -MP -MF "$(DEPDIR)/rtspd-util.Tpo" -c -o rtspd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-util.Tpo" "$(DEPDIR)/rtspd-util.Po"; else rm -f "$(DEPDIR)/rtspd-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='rtspd-util.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
-
-rtspd-util.obj: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-util.obj -MD -MP -MF "$(DEPDIR)/rtspd-util.Tpo" -c -o rtspd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-util.Tpo" "$(DEPDIR)/rtspd-util.Po"; else rm -f "$(DEPDIR)/rtspd-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='rtspd-util.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
-
-rtspd-rtspd.o: rtspd.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-rtspd.o -MD -MP -MF "$(DEPDIR)/rtspd-rtspd.Tpo" -c -o rtspd-rtspd.o `test -f 'rtspd.c' || echo '$(srcdir)/'`rtspd.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-rtspd.Tpo" "$(DEPDIR)/rtspd-rtspd.Po"; else rm -f "$(DEPDIR)/rtspd-rtspd.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtspd.c' object='rtspd-rtspd.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-rtspd.o `test -f 'rtspd.c' || echo '$(srcdir)/'`rtspd.c
-
-rtspd-rtspd.obj: rtspd.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-rtspd.obj -MD -MP -MF "$(DEPDIR)/rtspd-rtspd.Tpo" -c -o rtspd-rtspd.obj `if test -f 'rtspd.c'; then $(CYGPATH_W) 'rtspd.c'; else $(CYGPATH_W) '$(srcdir)/rtspd.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-rtspd.Tpo" "$(DEPDIR)/rtspd-rtspd.Po"; else rm -f "$(DEPDIR)/rtspd-rtspd.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtspd.c' object='rtspd-rtspd.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-rtspd.obj `if test -f 'rtspd.c'; then $(CYGPATH_W) 'rtspd.c'; else $(CYGPATH_W) '$(srcdir)/rtspd.c'; fi`
-
-sockfilt-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-mprintf.o -MD -MP -MF "$(DEPDIR)/sockfilt-mprintf.Tpo" -c -o sockfilt-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-mprintf.Tpo" "$(DEPDIR)/sockfilt-mprintf.Po"; else rm -f "$(DEPDIR)/sockfilt-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='sockfilt-mprintf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
-
-sockfilt-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-mprintf.obj -MD -MP -MF "$(DEPDIR)/sockfilt-mprintf.Tpo" -c -o sockfilt-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-mprintf.Tpo" "$(DEPDIR)/sockfilt-mprintf.Po"; else rm -f "$(DEPDIR)/sockfilt-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='sockfilt-mprintf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
-
-sockfilt-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-nonblock.o -MD -MP -MF "$(DEPDIR)/sockfilt-nonblock.Tpo" -c -o sockfilt-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-nonblock.Tpo" "$(DEPDIR)/sockfilt-nonblock.Po"; else rm -f "$(DEPDIR)/sockfilt-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='sockfilt-nonblock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
-
-sockfilt-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-nonblock.obj -MD -MP -MF "$(DEPDIR)/sockfilt-nonblock.Tpo" -c -o sockfilt-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-nonblock.Tpo" "$(DEPDIR)/sockfilt-nonblock.Po"; else rm -f "$(DEPDIR)/sockfilt-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='sockfilt-nonblock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
-
-sockfilt-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strequal.o -MD -MP -MF "$(DEPDIR)/sockfilt-strequal.Tpo" -c -o sockfilt-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-strequal.Tpo" "$(DEPDIR)/sockfilt-strequal.Po"; else rm -f "$(DEPDIR)/sockfilt-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='sockfilt-strequal.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
-
-sockfilt-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strequal.obj -MD -MP -MF "$(DEPDIR)/sockfilt-strequal.Tpo" -c -o sockfilt-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-strequal.Tpo" "$(DEPDIR)/sockfilt-strequal.Po"; else rm -f "$(DEPDIR)/sockfilt-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='sockfilt-strequal.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
-
-sockfilt-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strtoofft.o -MD -MP -MF "$(DEPDIR)/sockfilt-strtoofft.Tpo" -c -o sockfilt-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-strtoofft.Tpo" "$(DEPDIR)/sockfilt-strtoofft.Po"; else rm -f "$(DEPDIR)/sockfilt-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='sockfilt-strtoofft.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
-
-sockfilt-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strtoofft.obj -MD -MP -MF "$(DEPDIR)/sockfilt-strtoofft.Tpo" -c -o sockfilt-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-strtoofft.Tpo" "$(DEPDIR)/sockfilt-strtoofft.Po"; else rm -f "$(DEPDIR)/sockfilt-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='sockfilt-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
-
-sockfilt-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-timeval.o -MD -MP -MF "$(DEPDIR)/sockfilt-timeval.Tpo" -c -o sockfilt-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-timeval.Tpo" "$(DEPDIR)/sockfilt-timeval.Po"; else rm -f "$(DEPDIR)/sockfilt-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='sockfilt-timeval.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
-
-sockfilt-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-timeval.obj -MD -MP -MF "$(DEPDIR)/sockfilt-timeval.Tpo" -c -o sockfilt-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-timeval.Tpo" "$(DEPDIR)/sockfilt-timeval.Po"; else rm -f "$(DEPDIR)/sockfilt-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='sockfilt-timeval.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
-
-sockfilt-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-warnless.o -MD -MP -MF "$(DEPDIR)/sockfilt-warnless.Tpo" -c -o sockfilt-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-warnless.Tpo" "$(DEPDIR)/sockfilt-warnless.Po"; else rm -f "$(DEPDIR)/sockfilt-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='sockfilt-warnless.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
-
-sockfilt-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-warnless.obj -MD -MP -MF "$(DEPDIR)/sockfilt-warnless.Tpo" -c -o sockfilt-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-warnless.Tpo" "$(DEPDIR)/sockfilt-warnless.Po"; else rm -f "$(DEPDIR)/sockfilt-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='sockfilt-warnless.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
-
-sockfilt-getpart.o: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-getpart.o -MD -MP -MF "$(DEPDIR)/sockfilt-getpart.Tpo" -c -o sockfilt-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-getpart.Tpo" "$(DEPDIR)/sockfilt-getpart.Po"; else rm -f "$(DEPDIR)/sockfilt-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='sockfilt-getpart.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
-
-sockfilt-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-getpart.obj -MD -MP -MF "$(DEPDIR)/sockfilt-getpart.Tpo" -c -o sockfilt-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-getpart.Tpo" "$(DEPDIR)/sockfilt-getpart.Po"; else rm -f "$(DEPDIR)/sockfilt-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='sockfilt-getpart.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
-
-sockfilt-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-base64.o -MD -MP -MF "$(DEPDIR)/sockfilt-base64.Tpo" -c -o sockfilt-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-base64.Tpo" "$(DEPDIR)/sockfilt-base64.Po"; else rm -f "$(DEPDIR)/sockfilt-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='sockfilt-base64.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
-
-sockfilt-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-base64.obj -MD -MP -MF "$(DEPDIR)/sockfilt-base64.Tpo" -c -o sockfilt-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-base64.Tpo" "$(DEPDIR)/sockfilt-base64.Po"; else rm -f "$(DEPDIR)/sockfilt-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='sockfilt-base64.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
-
-sockfilt-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-memdebug.o -MD -MP -MF "$(DEPDIR)/sockfilt-memdebug.Tpo" -c -o sockfilt-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-memdebug.Tpo" "$(DEPDIR)/sockfilt-memdebug.Po"; else rm -f "$(DEPDIR)/sockfilt-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='sockfilt-memdebug.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
-
-sockfilt-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-memdebug.obj -MD -MP -MF "$(DEPDIR)/sockfilt-memdebug.Tpo" -c -o sockfilt-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-memdebug.Tpo" "$(DEPDIR)/sockfilt-memdebug.Po"; else rm -f "$(DEPDIR)/sockfilt-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='sockfilt-memdebug.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
-
-sockfilt-util.o: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-util.o -MD -MP -MF "$(DEPDIR)/sockfilt-util.Tpo" -c -o sockfilt-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-util.Tpo" "$(DEPDIR)/sockfilt-util.Po"; else rm -f "$(DEPDIR)/sockfilt-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='sockfilt-util.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
-
-sockfilt-util.obj: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-util.obj -MD -MP -MF "$(DEPDIR)/sockfilt-util.Tpo" -c -o sockfilt-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-util.Tpo" "$(DEPDIR)/sockfilt-util.Po"; else rm -f "$(DEPDIR)/sockfilt-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='sockfilt-util.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
-
-sockfilt-sockfilt.o: sockfilt.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-sockfilt.o -MD -MP -MF "$(DEPDIR)/sockfilt-sockfilt.Tpo" -c -o sockfilt-sockfilt.o `test -f 'sockfilt.c' || echo '$(srcdir)/'`sockfilt.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-sockfilt.Tpo" "$(DEPDIR)/sockfilt-sockfilt.Po"; else rm -f "$(DEPDIR)/sockfilt-sockfilt.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sockfilt.c' object='sockfilt-sockfilt.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-sockfilt.o `test -f 'sockfilt.c' || echo '$(srcdir)/'`sockfilt.c
-
-sockfilt-sockfilt.obj: sockfilt.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-sockfilt.obj -MD -MP -MF "$(DEPDIR)/sockfilt-sockfilt.Tpo" -c -o sockfilt-sockfilt.obj `if test -f 'sockfilt.c'; then $(CYGPATH_W) 'sockfilt.c'; else $(CYGPATH_W) '$(srcdir)/sockfilt.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-sockfilt.Tpo" "$(DEPDIR)/sockfilt-sockfilt.Po"; else rm -f "$(DEPDIR)/sockfilt-sockfilt.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sockfilt.c' object='sockfilt-sockfilt.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-sockfilt.obj `if test -f 'sockfilt.c'; then $(CYGPATH_W) 'sockfilt.c'; else $(CYGPATH_W) '$(srcdir)/sockfilt.c'; fi`
-
-sockfilt-inet_pton.o: $(top_srcdir)/lib/inet_pton.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-inet_pton.o -MD -MP -MF "$(DEPDIR)/sockfilt-inet_pton.Tpo" -c -o sockfilt-inet_pton.o `test -f '$(top_srcdir)/lib/inet_pton.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/inet_pton.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-inet_pton.Tpo" "$(DEPDIR)/sockfilt-inet_pton.Po"; else rm -f "$(DEPDIR)/sockfilt-inet_pton.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/inet_pton.c' object='sockfilt-inet_pton.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-inet_pton.o `test -f '$(top_srcdir)/lib/inet_pton.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/inet_pton.c
-
-sockfilt-inet_pton.obj: $(top_srcdir)/lib/inet_pton.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-inet_pton.obj -MD -MP -MF "$(DEPDIR)/sockfilt-inet_pton.Tpo" -c -o sockfilt-inet_pton.obj `if test -f '$(top_srcdir)/lib/inet_pton.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/inet_pton.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-inet_pton.Tpo" "$(DEPDIR)/sockfilt-inet_pton.Po"; else rm -f "$(DEPDIR)/sockfilt-inet_pton.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/inet_pton.c' object='sockfilt-inet_pton.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-inet_pton.obj `if test -f '$(top_srcdir)/lib/inet_pton.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/inet_pton.c'; fi`
-
-sws-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-mprintf.o -MD -MP -MF "$(DEPDIR)/sws-mprintf.Tpo" -c -o sws-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-mprintf.Tpo" "$(DEPDIR)/sws-mprintf.Po"; else rm -f "$(DEPDIR)/sws-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='sws-mprintf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
-
-sws-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-mprintf.obj -MD -MP -MF "$(DEPDIR)/sws-mprintf.Tpo" -c -o sws-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-mprintf.Tpo" "$(DEPDIR)/sws-mprintf.Po"; else rm -f "$(DEPDIR)/sws-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='sws-mprintf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
-
-sws-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-nonblock.o -MD -MP -MF "$(DEPDIR)/sws-nonblock.Tpo" -c -o sws-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-nonblock.Tpo" "$(DEPDIR)/sws-nonblock.Po"; else rm -f "$(DEPDIR)/sws-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='sws-nonblock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
-
-sws-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-nonblock.obj -MD -MP -MF "$(DEPDIR)/sws-nonblock.Tpo" -c -o sws-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-nonblock.Tpo" "$(DEPDIR)/sws-nonblock.Po"; else rm -f "$(DEPDIR)/sws-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='sws-nonblock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
-
-sws-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strequal.o -MD -MP -MF "$(DEPDIR)/sws-strequal.Tpo" -c -o sws-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-strequal.Tpo" "$(DEPDIR)/sws-strequal.Po"; else rm -f "$(DEPDIR)/sws-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='sws-strequal.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
-
-sws-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strequal.obj -MD -MP -MF "$(DEPDIR)/sws-strequal.Tpo" -c -o sws-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-strequal.Tpo" "$(DEPDIR)/sws-strequal.Po"; else rm -f "$(DEPDIR)/sws-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='sws-strequal.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
-
-sws-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strtoofft.o -MD -MP -MF "$(DEPDIR)/sws-strtoofft.Tpo" -c -o sws-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-strtoofft.Tpo" "$(DEPDIR)/sws-strtoofft.Po"; else rm -f "$(DEPDIR)/sws-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='sws-strtoofft.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
-
-sws-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strtoofft.obj -MD -MP -MF "$(DEPDIR)/sws-strtoofft.Tpo" -c -o sws-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-strtoofft.Tpo" "$(DEPDIR)/sws-strtoofft.Po"; else rm -f "$(DEPDIR)/sws-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='sws-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
-
-sws-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-timeval.o -MD -MP -MF "$(DEPDIR)/sws-timeval.Tpo" -c -o sws-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-timeval.Tpo" "$(DEPDIR)/sws-timeval.Po"; else rm -f "$(DEPDIR)/sws-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='sws-timeval.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
-
-sws-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-timeval.obj -MD -MP -MF "$(DEPDIR)/sws-timeval.Tpo" -c -o sws-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-timeval.Tpo" "$(DEPDIR)/sws-timeval.Po"; else rm -f "$(DEPDIR)/sws-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='sws-timeval.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
-
-sws-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-warnless.o -MD -MP -MF "$(DEPDIR)/sws-warnless.Tpo" -c -o sws-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-warnless.Tpo" "$(DEPDIR)/sws-warnless.Po"; else rm -f "$(DEPDIR)/sws-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='sws-warnless.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
-
-sws-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-warnless.obj -MD -MP -MF "$(DEPDIR)/sws-warnless.Tpo" -c -o sws-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-warnless.Tpo" "$(DEPDIR)/sws-warnless.Po"; else rm -f "$(DEPDIR)/sws-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='sws-warnless.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
-
-sws-getpart.o: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-getpart.o -MD -MP -MF "$(DEPDIR)/sws-getpart.Tpo" -c -o sws-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-getpart.Tpo" "$(DEPDIR)/sws-getpart.Po"; else rm -f "$(DEPDIR)/sws-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='sws-getpart.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
-
-sws-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-getpart.obj -MD -MP -MF "$(DEPDIR)/sws-getpart.Tpo" -c -o sws-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-getpart.Tpo" "$(DEPDIR)/sws-getpart.Po"; else rm -f "$(DEPDIR)/sws-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='sws-getpart.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
-
-sws-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-base64.o -MD -MP -MF "$(DEPDIR)/sws-base64.Tpo" -c -o sws-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-base64.Tpo" "$(DEPDIR)/sws-base64.Po"; else rm -f "$(DEPDIR)/sws-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='sws-base64.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
-
-sws-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-base64.obj -MD -MP -MF "$(DEPDIR)/sws-base64.Tpo" -c -o sws-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-base64.Tpo" "$(DEPDIR)/sws-base64.Po"; else rm -f "$(DEPDIR)/sws-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='sws-base64.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
-
-sws-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-memdebug.o -MD -MP -MF "$(DEPDIR)/sws-memdebug.Tpo" -c -o sws-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-memdebug.Tpo" "$(DEPDIR)/sws-memdebug.Po"; else rm -f "$(DEPDIR)/sws-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='sws-memdebug.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
-
-sws-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-memdebug.obj -MD -MP -MF "$(DEPDIR)/sws-memdebug.Tpo" -c -o sws-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-memdebug.Tpo" "$(DEPDIR)/sws-memdebug.Po"; else rm -f "$(DEPDIR)/sws-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='sws-memdebug.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
-
-sws-util.o: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-util.o -MD -MP -MF "$(DEPDIR)/sws-util.Tpo" -c -o sws-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-util.Tpo" "$(DEPDIR)/sws-util.Po"; else rm -f "$(DEPDIR)/sws-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='sws-util.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
-
-sws-util.obj: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-util.obj -MD -MP -MF "$(DEPDIR)/sws-util.Tpo" -c -o sws-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-util.Tpo" "$(DEPDIR)/sws-util.Po"; else rm -f "$(DEPDIR)/sws-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='sws-util.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
-
-sws-sws.o: sws.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-sws.o -MD -MP -MF "$(DEPDIR)/sws-sws.Tpo" -c -o sws-sws.o `test -f 'sws.c' || echo '$(srcdir)/'`sws.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-sws.Tpo" "$(DEPDIR)/sws-sws.Po"; else rm -f "$(DEPDIR)/sws-sws.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sws.c' object='sws-sws.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-sws.o `test -f 'sws.c' || echo '$(srcdir)/'`sws.c
-
-sws-sws.obj: sws.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-sws.obj -MD -MP -MF "$(DEPDIR)/sws-sws.Tpo" -c -o sws-sws.obj `if test -f 'sws.c'; then $(CYGPATH_W) 'sws.c'; else $(CYGPATH_W) '$(srcdir)/sws.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-sws.Tpo" "$(DEPDIR)/sws-sws.Po"; else rm -f "$(DEPDIR)/sws-sws.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sws.c' object='sws-sws.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-sws.obj `if test -f 'sws.c'; then $(CYGPATH_W) 'sws.c'; else $(CYGPATH_W) '$(srcdir)/sws.c'; fi`
-
-tftpd-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-mprintf.o -MD -MP -MF "$(DEPDIR)/tftpd-mprintf.Tpo" -c -o tftpd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-mprintf.Tpo" "$(DEPDIR)/tftpd-mprintf.Po"; else rm -f "$(DEPDIR)/tftpd-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='tftpd-mprintf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
-
-tftpd-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-mprintf.obj -MD -MP -MF "$(DEPDIR)/tftpd-mprintf.Tpo" -c -o tftpd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-mprintf.Tpo" "$(DEPDIR)/tftpd-mprintf.Po"; else rm -f "$(DEPDIR)/tftpd-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='tftpd-mprintf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
-
-tftpd-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-nonblock.o -MD -MP -MF "$(DEPDIR)/tftpd-nonblock.Tpo" -c -o tftpd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-nonblock.Tpo" "$(DEPDIR)/tftpd-nonblock.Po"; else rm -f "$(DEPDIR)/tftpd-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='tftpd-nonblock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
-
-tftpd-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-nonblock.obj -MD -MP -MF "$(DEPDIR)/tftpd-nonblock.Tpo" -c -o tftpd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-nonblock.Tpo" "$(DEPDIR)/tftpd-nonblock.Po"; else rm -f "$(DEPDIR)/tftpd-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='tftpd-nonblock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
-
-tftpd-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strequal.o -MD -MP -MF "$(DEPDIR)/tftpd-strequal.Tpo" -c -o tftpd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-strequal.Tpo" "$(DEPDIR)/tftpd-strequal.Po"; else rm -f "$(DEPDIR)/tftpd-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='tftpd-strequal.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
-
-tftpd-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strequal.obj -MD -MP -MF "$(DEPDIR)/tftpd-strequal.Tpo" -c -o tftpd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-strequal.Tpo" "$(DEPDIR)/tftpd-strequal.Po"; else rm -f "$(DEPDIR)/tftpd-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='tftpd-strequal.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
-
-tftpd-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strtoofft.o -MD -MP -MF "$(DEPDIR)/tftpd-strtoofft.Tpo" -c -o tftpd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-strtoofft.Tpo" "$(DEPDIR)/tftpd-strtoofft.Po"; else rm -f "$(DEPDIR)/tftpd-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='tftpd-strtoofft.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
-
-tftpd-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strtoofft.obj -MD -MP -MF "$(DEPDIR)/tftpd-strtoofft.Tpo" -c -o tftpd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-strtoofft.Tpo" "$(DEPDIR)/tftpd-strtoofft.Po"; else rm -f "$(DEPDIR)/tftpd-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='tftpd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
-
-tftpd-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-timeval.o -MD -MP -MF "$(DEPDIR)/tftpd-timeval.Tpo" -c -o tftpd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-timeval.Tpo" "$(DEPDIR)/tftpd-timeval.Po"; else rm -f "$(DEPDIR)/tftpd-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='tftpd-timeval.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
-
-tftpd-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-timeval.obj -MD -MP -MF "$(DEPDIR)/tftpd-timeval.Tpo" -c -o tftpd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-timeval.Tpo" "$(DEPDIR)/tftpd-timeval.Po"; else rm -f "$(DEPDIR)/tftpd-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='tftpd-timeval.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
-
-tftpd-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-warnless.o -MD -MP -MF "$(DEPDIR)/tftpd-warnless.Tpo" -c -o tftpd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-warnless.Tpo" "$(DEPDIR)/tftpd-warnless.Po"; else rm -f "$(DEPDIR)/tftpd-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='tftpd-warnless.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
-
-tftpd-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-warnless.obj -MD -MP -MF "$(DEPDIR)/tftpd-warnless.Tpo" -c -o tftpd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-warnless.Tpo" "$(DEPDIR)/tftpd-warnless.Po"; else rm -f "$(DEPDIR)/tftpd-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='tftpd-warnless.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
-
-tftpd-getpart.o: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-getpart.o -MD -MP -MF "$(DEPDIR)/tftpd-getpart.Tpo" -c -o tftpd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-getpart.Tpo" "$(DEPDIR)/tftpd-getpart.Po"; else rm -f "$(DEPDIR)/tftpd-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='tftpd-getpart.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
-
-tftpd-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-getpart.obj -MD -MP -MF "$(DEPDIR)/tftpd-getpart.Tpo" -c -o tftpd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-getpart.Tpo" "$(DEPDIR)/tftpd-getpart.Po"; else rm -f "$(DEPDIR)/tftpd-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='tftpd-getpart.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
-
-tftpd-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-base64.o -MD -MP -MF "$(DEPDIR)/tftpd-base64.Tpo" -c -o tftpd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-base64.Tpo" "$(DEPDIR)/tftpd-base64.Po"; else rm -f "$(DEPDIR)/tftpd-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='tftpd-base64.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
-
-tftpd-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-base64.obj -MD -MP -MF "$(DEPDIR)/tftpd-base64.Tpo" -c -o tftpd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-base64.Tpo" "$(DEPDIR)/tftpd-base64.Po"; else rm -f "$(DEPDIR)/tftpd-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='tftpd-base64.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
-
-tftpd-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-memdebug.o -MD -MP -MF "$(DEPDIR)/tftpd-memdebug.Tpo" -c -o tftpd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-memdebug.Tpo" "$(DEPDIR)/tftpd-memdebug.Po"; else rm -f "$(DEPDIR)/tftpd-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='tftpd-memdebug.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
-
-tftpd-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-memdebug.obj -MD -MP -MF "$(DEPDIR)/tftpd-memdebug.Tpo" -c -o tftpd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-memdebug.Tpo" "$(DEPDIR)/tftpd-memdebug.Po"; else rm -f "$(DEPDIR)/tftpd-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='tftpd-memdebug.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
-
-tftpd-util.o: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-util.o -MD -MP -MF "$(DEPDIR)/tftpd-util.Tpo" -c -o tftpd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-util.Tpo" "$(DEPDIR)/tftpd-util.Po"; else rm -f "$(DEPDIR)/tftpd-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='tftpd-util.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
-
-tftpd-util.obj: util.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-util.obj -MD -MP -MF "$(DEPDIR)/tftpd-util.Tpo" -c -o tftpd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-util.Tpo" "$(DEPDIR)/tftpd-util.Po"; else rm -f "$(DEPDIR)/tftpd-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='tftpd-util.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
-
-tftpd-tftpd.o: tftpd.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-tftpd.o -MD -MP -MF "$(DEPDIR)/tftpd-tftpd.Tpo" -c -o tftpd-tftpd.o `test -f 'tftpd.c' || echo '$(srcdir)/'`tftpd.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-tftpd.Tpo" "$(DEPDIR)/tftpd-tftpd.Po"; else rm -f "$(DEPDIR)/tftpd-tftpd.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tftpd.c' object='tftpd-tftpd.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-tftpd.o `test -f 'tftpd.c' || echo '$(srcdir)/'`tftpd.c
-
-tftpd-tftpd.obj: tftpd.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-tftpd.obj -MD -MP -MF "$(DEPDIR)/tftpd-tftpd.Tpo" -c -o tftpd-tftpd.obj `if test -f 'tftpd.c'; then $(CYGPATH_W) 'tftpd.c'; else $(CYGPATH_W) '$(srcdir)/tftpd.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-tftpd.Tpo" "$(DEPDIR)/tftpd-tftpd.Po"; else rm -f "$(DEPDIR)/tftpd-tftpd.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tftpd.c' object='tftpd-tftpd.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-tftpd.obj `if test -f 'tftpd.c'; then $(CYGPATH_W) 'tftpd.c'; else $(CYGPATH_W) '$(srcdir)/tftpd.c'; fi`
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tests/server/Makefile.inc b/tests/server/Makefile.inc
index c73a8515..6e81dfdb 100644
--- a/tests/server/Makefile.inc
+++ b/tests/server/Makefile.inc
@@ -1,28 +1,29 @@
-noinst_PROGRAMS = getpart resolve rtspd sockfilt sws tftpd
+noinst_PROGRAMS = getpart resolve rtspd sockfilt sws tftpd fake_ntlm
CURLX_SRCS = \
- $(top_srcdir)/lib/mprintf.c \
- $(top_srcdir)/lib/nonblock.c \
- $(top_srcdir)/lib/strequal.c \
- $(top_srcdir)/lib/strtoofft.c \
- $(top_srcdir)/lib/timeval.c \
- $(top_srcdir)/lib/warnless.c
+ ../../lib/mprintf.c \
+ ../../lib/nonblock.c \
+ ../../lib/strequal.c \
+ ../../lib/strtoofft.c \
+ ../../lib/timeval.c \
+ ../../lib/warnless.c
CURLX_HDRS = \
- $(top_srcdir)/lib/curlx.h \
- $(top_srcdir)/lib/nonblock.h \
- $(top_srcdir)/lib/strequal.h \
- $(top_srcdir)/lib/strtoofft.h \
- $(top_srcdir)/lib/timeval.h \
- $(top_srcdir)/lib/warnless.h
+ ../../lib/curlx.h \
+ ../../lib/nonblock.h \
+ ../../lib/strequal.h \
+ ../../lib/strtoofft.h \
+ ../../lib/timeval.h \
+ ../../lib/warnless.h
USEFUL = \
getpart.c \
getpart.h \
- $(top_srcdir)/lib/base64.c \
- $(top_srcdir)/lib/curl_base64.h \
- $(top_srcdir)/lib/memdebug.c \
- $(top_srcdir)/lib/memdebug.h
+ server_setup.h \
+ ../../lib/base64.c \
+ ../../lib/curl_base64.h \
+ ../../lib/memdebug.c \
+ ../../lib/memdebug.h
UTIL = \
util.c \
@@ -30,32 +31,42 @@ UTIL = \
getpart_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) \
testpart.c
-getpart_LDADD = @TEST_SERVER_LIBS@
+getpart_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
getpart_CFLAGS = $(AM_CFLAGS)
resolve_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
resolve.c
-resolve_LDADD = @TEST_SERVER_LIBS@
+resolve_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
resolve_CFLAGS = $(AM_CFLAGS)
rtspd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
rtspd.c
-rtspd_LDADD = @TEST_SERVER_LIBS@
+rtspd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
rtspd_CFLAGS = $(AM_CFLAGS)
sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
sockfilt.c \
- $(top_srcdir)/lib/inet_pton.c
-sockfilt_LDADD = @TEST_SERVER_LIBS@
+ ../../lib/inet_pton.c
+sockfilt_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
sockfilt_CFLAGS = $(AM_CFLAGS)
sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
- sws.c
-sws_LDADD = @TEST_SERVER_LIBS@
+ server_sockaddr.h \
+ sws.c \
+ ../../lib/inet_pton.c
+sws_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
sws_CFLAGS = $(AM_CFLAGS)
tftpd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
tftpd.c \
tftp.h
-tftpd_LDADD = @TEST_SERVER_LIBS@
+tftpd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
tftpd_CFLAGS = $(AM_CFLAGS)
+
+fake_ntlm_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ fake_ntlm.c
+fake_ntlm_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+fake_ntlm_CFLAGS = $(AM_CFLAGS)
diff --git a/tests/server/base64.pl b/tests/server/base64.pl
new file mode 100644
index 00000000..2eab1fa4
--- /dev/null
+++ b/tests/server/base64.pl
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+use MIME::Base64 qw(encode_base64);
+
+my $buf;
+while(read(STDIN, $buf, 60*57)) {
+ my $enc = encode_base64($buf);
+ print "$enc";
+}
diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c
new file mode 100644
index 00000000..799f573a
--- /dev/null
+++ b/tests/server/fake_ntlm.c
@@ -0,0 +1,277 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, Mandy Wu, <mandy.wu@intel.com>
+ * Copyright (C) 2011 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 "server_setup.h"
+
+/*
+ * This is a fake ntlm_auth, which is used for testing NTLM single-sign-on.
+ * When DEBUGBUILD is defined, libcurl invoke this tool instead of real winbind
+ * daemon helper /usr/bin/ntlm_auth. This tool will accept commands and
+ * responses with a pre-written string saved in test case test2005.
+ */
+
+#define ENABLE_CURLX_PRINTF
+#include "curlx.h" /* from the private lib dir */
+#include "getpart.h"
+#include "util.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+#ifndef DEFAULT_LOGFILE
+#define DEFAULT_LOGFILE "log/fake_ntlm.log"
+#endif
+
+const char *serverlogfile = DEFAULT_LOGFILE;
+
+/*
+ * Returns an allocated buffer with printable representation of input
+ * buffer contents or returns NULL on out of memory condition.
+ */
+static char *printable(char *inbuf, size_t inlength)
+{
+ char *outbuf;
+ char *newbuf;
+ size_t newsize;
+ size_t outsize;
+ size_t outincr = 0;
+ size_t i, o = 0;
+
+#define HEX_FMT_STR "[0x%02X]"
+#define HEX_STR_LEN 6
+#define NOTHING_STR "[NOTHING]"
+#define NOTHING_LEN 9
+
+ if(!inlength)
+ inlength = strlen(inbuf);
+
+ if(inlength) {
+ outincr = ((inlength/2) < (HEX_STR_LEN+1)) ? HEX_STR_LEN+1 : inlength/2;
+ outsize = inlength + outincr;
+ }
+ else
+ outsize = NOTHING_LEN + 1;
+
+ outbuf = malloc(outsize);
+ if(!outbuf)
+ return NULL;
+
+ if(!inlength) {
+ sprintf(&outbuf[0], "%s", NOTHING_STR);
+ return outbuf;
+ }
+
+ for(i=0; i<inlength; i++) {
+
+ if(o > outsize - (HEX_STR_LEN + 1)) {
+ newsize = outsize + outincr;
+ newbuf = realloc(outbuf, newsize);
+ if(!newbuf) {
+ free(outbuf);
+ return NULL;
+ }
+ outbuf = newbuf;
+ outsize = newsize;
+ }
+
+ if((inbuf[i] > 0x20) && (inbuf[i] < 0x7F)) {
+ outbuf[o] = inbuf[i];
+ o++;
+ }
+ else {
+ sprintf(&outbuf[o], HEX_FMT_STR, inbuf[i]);
+ o += HEX_STR_LEN;
+ }
+
+ }
+ outbuf[o] = '\0';
+
+ return outbuf;
+}
+
+int main(int argc, char *argv[])
+{
+ char buf[1024];
+ FILE *stream;
+ char *filename;
+ int error;
+ char *type1_input = NULL, *type3_input = NULL;
+ char *type1_output = NULL, *type3_output = NULL;
+ size_t size = 0;
+ long testnum;
+ const char *env;
+ int arg = 1;
+ char *helper_user = (char *)"unknown";
+ char *helper_proto = (char *)"unknown";
+ char *helper_domain = (char *)"unknown";
+ bool use_cached_creds = FALSE;
+ char *msgbuf;
+
+ buf[0] = '\0';
+
+ while(argc > arg) {
+ if(!strcmp("--use-cached-creds", argv[arg])) {
+ use_cached_creds = TRUE;
+ arg++;
+ }
+ else if(!strcmp("--helper-protocol", argv[arg])) {
+ arg++;
+ if(argc > arg)
+ helper_proto = argv[arg++];
+ }
+ else if(!strcmp("--username", argv[arg])) {
+ arg++;
+ if(argc > arg)
+ helper_user = argv[arg++];
+ }
+ else if(!strcmp("--domain", argv[arg])) {
+ arg++;
+ if(argc > arg)
+ helper_domain = argv[arg++];
+ }
+ else {
+ puts("Usage: fake_ntlm [option]\n"
+ " --use-cached-creds\n"
+ " --helper-protocol [protocol]\n"
+ " --username [username]\n"
+ " --domain [domain]");
+ exit(1);
+ }
+ }
+
+ logmsg("fake_ntlm (user: %s) (proto: %s) (domain: %s) (cached creds: %s)",
+ helper_user, helper_proto, helper_domain,
+ (use_cached_creds) ? "yes" : "no");
+
+ env = getenv("CURL_NTLM_AUTH_TESTNUM");
+ if (env) {
+ char *endptr;
+ long lnum = strtol(env, &endptr, 10);
+ if((endptr != env + strlen(env)) || (lnum < 1L)) {
+ logmsg("Test number not valid in CURL_NTLM_AUTH_TESTNUM");
+ exit(1);
+ }
+ testnum = lnum;
+ } else {
+ logmsg("Test number not specified in CURL_NTLM_AUTH_TESTNUM");
+ exit(1);
+ }
+
+ env = getenv("CURL_NTLM_AUTH_SRCDIR");
+ if (env) {
+ path = env;
+ }
+
+ filename = test2file(testnum);
+ stream=fopen(filename, "rb");
+ if(!stream) {
+ error = errno;
+ logmsg("fopen() failed with error: %d %s", error, strerror(error));
+ logmsg("Error opening file: %s", filename);
+ logmsg("Couldn't open test file %ld", testnum);
+ exit(1);
+ }
+ else {
+ /* get the ntlm_auth input/output */
+ error = getpart(&type1_input, &size, "ntlm_auth_type1", "input", stream);
+ fclose(stream);
+ if(error || size == 0) {
+ logmsg("getpart() type 1 input failed with error: %d", error);
+ exit(1);
+ }
+ }
+
+ stream=fopen(filename, "rb");
+ if(!stream) {
+ error = errno;
+ logmsg("fopen() failed with error: %d %s", error, strerror(error));
+ logmsg("Error opening file: %s", filename);
+ logmsg("Couldn't open test file %ld", testnum);
+ exit(1);
+ }
+ else {
+ size = 0;
+ error = getpart(&type3_input, &size, "ntlm_auth_type3", "input", stream);
+ fclose(stream);
+ if(error || size == 0) {
+ logmsg("getpart() type 3 input failed with error: %d", error);
+ exit(1);
+ }
+ }
+
+ while(fgets(buf, sizeof(buf), stdin)) {
+ if(strcmp(buf, type1_input) == 0) {
+ stream=fopen(filename, "rb");
+ if(!stream) {
+ error = errno;
+ logmsg("fopen() failed with error: %d %s", error, strerror(error));
+ logmsg("Error opening file: %s", filename);
+ logmsg("Couldn't open test file %ld", testnum);
+ exit(1);
+ }
+ else {
+ size = 0;
+ error = getpart(&type1_output, &size, "ntlm_auth_type1", "output", stream);
+ fclose(stream);
+ if(error || size == 0) {
+ logmsg("getpart() type 1 output failed with error: %d", error);
+ exit(1);
+ }
+ }
+ printf("%s", type1_output);
+ fflush(stdout);
+ }
+ else if(strncmp(buf, type3_input, strlen(type3_input)) == 0) {
+ stream=fopen(filename, "rb");
+ if(!stream) {
+ error = errno;
+ logmsg("fopen() failed with error: %d %s", error, strerror(error));
+ logmsg("Error opening file: %s", filename);
+ logmsg("Couldn't open test file %ld", testnum);
+ exit(1);
+ }
+ else {
+ size = 0;
+ error = getpart(&type3_output, &size, "ntlm_auth_type3", "output", stream);
+ fclose(stream);
+ if(error || size == 0) {
+ logmsg("getpart() type 3 output failed with error: %d", error);
+ exit(1);
+ }
+ }
+ printf("%s", type3_output);
+ fflush(stdout);
+ }
+ else {
+ printf("Unknown request\n");
+ msgbuf = printable(buf, 0);
+ if(msgbuf) {
+ logmsg("invalid input: '%s'\n", msgbuf);
+ free(msgbuf);
+ }
+ else
+ logmsg("OOM formatting invalid input: '%s'\n", buf);
+ exit(1);
+ }
+ }
+ return 1;
+}
diff --git a/tests/server/getpart.c b/tests/server/getpart.c
index a3b5f2fb..f773dd05 100644
--- a/tests/server/getpart.c
+++ b/tests/server/getpart.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,10 +19,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h"
+#include "server_setup.h"
#include "getpart.h"
@@ -31,7 +28,7 @@
versions instead */
#include "curlx.h" /* from the private lib dir */
-/* just to please base64.h we create a fake struct */
+/* just to please curl_base64.h we create a fake struct */
struct SessionHandle {
int fake;
};
@@ -49,7 +46,7 @@ struct SessionHandle {
#ifdef DEBUG_GETPART
#define show(x) printf x
#else
-#define show(x)
+#define show(x) Curl_nop_stmt
#endif
#if defined(_MSC_VER) && defined(_DLL)
@@ -61,6 +58,9 @@ curl_free_callback Curl_cfree = (curl_free_callback)free;
curl_realloc_callback Curl_crealloc = (curl_realloc_callback)realloc;
curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)strdup;
curl_calloc_callback Curl_ccalloc = (curl_calloc_callback)calloc;
+#if defined(WIN32) && defined(UNICODE)
+curl_wcsdup_callback Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup;
+#endif
#if defined(_MSC_VER) && defined(_DLL)
# pragma warning(default:4232) /* MSVC extension, dllimport identity */
@@ -152,44 +152,27 @@ static int appenddata(char **dst_buf, /* dest buffer */
char *src_buf, /* source buffer */
int src_b64) /* != 0 if source is base64 encoded */
{
- size_t need_alloc, src_len;
- union {
- unsigned char *as_uchar;
- char *as_char;
- } buf64;
+ size_t need_alloc = 0;
+ size_t src_len = strlen(src_buf);
- src_len = strlen(src_buf);
if(!src_len)
return GPE_OK;
- buf64.as_char = NULL;
+ need_alloc = src_len + *dst_len + 1;
if(src_b64) {
- /* base64 decode the given buffer */
- src_len = Curl_base64_decode(src_buf, &buf64.as_uchar);
- src_buf = buf64.as_char;
- if(!src_len || !src_buf) {
- /*
- ** currently there is no way to tell apart an OOM condition in
- ** Curl_base64_decode() from zero length decoded data. For now,
- ** let's just assume it is an OOM condition, currently we have
- ** no input for this function that decodes to zero length data.
- */
- if(buf64.as_char)
- free(buf64.as_char);
- return GPE_OUT_OF_MEMORY;
- }
- }
+ if(src_buf[src_len - 1] == '\r')
+ src_len--;
- need_alloc = src_len + *dst_len + 1;
+ if(src_buf[src_len - 1] == '\n')
+ src_len--;
+ }
/* enlarge destination buffer if required */
if(need_alloc > *dst_alloc) {
size_t newsize = need_alloc * 2;
char *newptr = realloc(*dst_buf, newsize);
if(!newptr) {
- if(buf64.as_char)
- free(buf64.as_char);
return GPE_OUT_OF_MEMORY;
}
*dst_alloc = newsize;
@@ -201,8 +184,42 @@ static int appenddata(char **dst_buf, /* dest buffer */
*dst_len += src_len;
*(*dst_buf + *dst_len) = '\0';
- if(buf64.as_char)
- free(buf64.as_char);
+ return GPE_OK;
+}
+
+static int decodedata(char **buf, /* dest buffer */
+ size_t *len) /* dest buffer data length */
+{
+ int error = 0;
+ unsigned char *buf64 = NULL;
+ size_t src_len = 0;
+
+ if(!*len)
+ return GPE_OK;
+
+ /* base64 decode the given buffer */
+ error = (int) Curl_base64_decode(*buf, &buf64, &src_len);
+ if(error)
+ return GPE_OUT_OF_MEMORY;
+
+ if(!src_len) {
+ /*
+ ** currently there is no way to tell apart an OOM condition in
+ ** Curl_base64_decode() from zero length decoded data. For now,
+ ** let's just assume it is an OOM condition, currently we have
+ ** no input for this function that decodes to zero length data.
+ */
+ free(buf64);
+
+ return GPE_OUT_OF_MEMORY;
+ }
+
+ /* memcpy to support binary blobs */
+ memcpy(*buf, buf64, src_len);
+ *len = src_len;
+ *(*buf + src_len) = '\0';
+
+ free(buf64);
return GPE_OK;
}
@@ -306,6 +323,13 @@ int getpart(char **outbuf, size_t *outlen,
if(in_wanted_part) {
/* end of wanted part */
in_wanted_part = 0;
+
+ /* Do we need to base64 decode the data? */
+ if(base64) {
+ error = decodedata(outbuf, outlen);
+ if(error)
+ return error;
+ }
break;
}
}
@@ -316,6 +340,13 @@ int getpart(char **outbuf, size_t *outlen,
if(in_wanted_part) {
/* end of wanted part */
in_wanted_part = 0;
+
+ /* Do we need to base64 decode the data? */
+ if(base64) {
+ error = decodedata(outbuf, outlen);
+ if(error)
+ return error;
+ }
break;
}
}
@@ -403,15 +434,13 @@ int getpart(char **outbuf, size_t *outlen,
} /* while */
- if(buffer)
- free(buffer);
+ free(buffer);
if(error != GPE_OK) {
if(error == GPE_END_OF_FILE)
error = GPE_OK;
else {
- if(*outbuf)
- free(*outbuf);
+ free(*outbuf);
*outbuf = NULL;
*outlen = 0;
}
diff --git a/tests/server/getpart.h b/tests/server/getpart.h
index 78a0be2c..25320b08 100644
--- a/tests/server/getpart.h
+++ b/tests/server/getpart.h
@@ -1,5 +1,5 @@
-#ifndef HEADER_SERVER_GETPART_H
-#define HEADER_SERVER_GETPART_H
+#ifndef HEADER_CURL_SERVER_GETPART_H
+#define HEADER_CURL_SERVER_GETPART_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "server_setup.h"
#define GPE_NO_BUFFER_SPACE -2
#define GPE_OUT_OF_MEMORY -1
@@ -30,4 +31,4 @@
int getpart(char **outbuf, size_t *outlen,
const char *main, const char *sub, FILE *stream);
-#endif /* HEADER_SERVER_GETPART_H */
+#endif /* HEADER_CURL_SERVER_GETPART_H */
diff --git a/tests/server/resolve.c b/tests/server/resolve.c
index 26ad8530..39849e7b 100644
--- a/tests/server/resolve.c
+++ b/tests/server/resolve.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -19,6 +19,7 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "server_setup.h"
/* Purpose
*
@@ -30,22 +31,9 @@
*
*/
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -132,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);
@@ -147,9 +135,11 @@ int main(int argc, char *argv[])
hints.ai_family = PF_INET6;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_CANONNAME;
- /* Use parenthesis around function to stop it from being replaced by
- the macro in memdebug.h */
+ /* Use parenthesis around functions to stop them 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/rtspd.c b/tests/server/rtspd.c
index 788d61c3..0293f59c 100644
--- a/tests/server/rtspd.c
+++ b/tests/server/rtspd.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -19,6 +19,7 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "server_setup.h"
/*
* curl's test suite Real Time Streaming Protocol (RTSP) server.
@@ -26,19 +27,9 @@
* This source file was started based on curl's HTTP test suite server.
*/
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -58,10 +49,18 @@
#include "curlx.h" /* from the private lib dir */
#include "getpart.h"
#include "util.h"
+#include "server_sockaddr.h"
/* include memdebug.h last */
#include "memdebug.h"
+#ifdef USE_WINSOCK
+#undef EINTR
+#define EINTR 4 /* errno.h value */
+#undef ERANGE
+#define ERANGE 34 /* errno.h value */
+#endif
+
#ifdef ENABLE_IPV6
static bool use_ipv6 = FALSE;
#endif
@@ -229,6 +228,10 @@ static SIGHANDLER_T old_sigint_handler = SIG_ERR;
static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
/* var which if set indicates that the program should finish execution */
SIG_ATOMIC_T got_exit_signal = 0;
@@ -244,13 +247,13 @@ static volatile int exit_signal = 0;
static RETSIGTYPE exit_signal_handler(int signum)
{
- int old_errno = ERRNO;
+ int old_errno = errno;
if(got_exit_signal == 0) {
got_exit_signal = 1;
exit_signal = signum;
}
(void)signal(signum, exit_signal_handler);
- SET_ERRNO(old_errno);
+ errno = old_errno;
}
static void install_signal_handlers(void)
@@ -258,32 +261,39 @@ static void install_signal_handlers(void)
#ifdef SIGHUP
/* ignore SIGHUP signal */
if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGHUP handler: %s", strerror(errno));
#endif
#ifdef SIGPIPE
/* ignore SIGPIPE signal */
if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
#endif
#ifdef SIGALRM
/* ignore SIGALRM signal */
if((old_sigalrm_handler = signal(SIGALRM, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGALRM handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGALRM handler: %s", strerror(errno));
#endif
#ifdef SIGINT
/* handle SIGINT signal with our exit_signal_handler */
if((old_sigint_handler = signal(SIGINT, exit_signal_handler)) == SIG_ERR)
- logmsg("cannot install SIGINT handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGINT handler: %s", strerror(errno));
else
siginterrupt(SIGINT, 1);
#endif
#ifdef SIGTERM
/* handle SIGTERM signal with our exit_signal_handler */
if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR)
- logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGTERM handler: %s", strerror(errno));
else
siginterrupt(SIGTERM, 1);
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+ /* handle SIGBREAK signal with our exit_signal_handler */
+ if((old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler)) == SIG_ERR)
+ logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+ else
+ siginterrupt(SIGBREAK, 1);
+#endif
}
static void restore_signal_handlers(void)
@@ -308,6 +318,10 @@ static void restore_signal_handlers(void)
if(SIG_ERR != old_sigterm_handler)
(void)signal(SIGTERM, old_sigterm_handler);
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+ if(SIG_ERR != old_sigbreak_handler)
+ (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
}
static int ProcessRequest(struct httprequest *req)
@@ -403,7 +417,7 @@ static int ProcessRequest(struct httprequest *req)
stream=fopen(filename, "rb");
if(!stream) {
- error = ERRNO;
+ error = errno;
logmsg("fopen() failed with error: %d %s", error, strerror(error));
logmsg("Error opening file: %s", filename);
logmsg("Couldn't open test file %ld", req->testno);
@@ -509,8 +523,7 @@ static int ProcessRequest(struct httprequest *req)
} while(ptr && *ptr);
logmsg("Done parsing server commands");
}
- if(cmd)
- free(cmd);
+ free(cmd);
}
}
else {
@@ -530,8 +543,8 @@ static int ProcessRequest(struct httprequest *req)
/* if the host name starts with test, the port number used in the
CONNECT line will be used as test number! */
char *portp = strchr(doc, ':');
- if(portp)
- req->testno = atoi(portp+1);
+ if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1)))
+ req->testno = strtol(portp+1, NULL, 10);
else
req->testno = DOCNUMBER_CONNECT;
}
@@ -583,9 +596,9 @@ static int ProcessRequest(struct httprequest *req)
while(*ptr && ISSPACE(*ptr))
ptr++;
endptr = ptr;
- SET_ERRNO(0);
+ errno = 0;
clen = strtoul(ptr, &endptr, 10);
- if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == ERRNO)) {
+ if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == errno)) {
/* this assumes that a zero Content-Length is valid */
logmsg("Found invalid Content-Length: (%s) in the request", ptr);
req->open = FALSE; /* closes connection */
@@ -717,7 +730,7 @@ static void storerequest(char *reqbuf, size_t totalsize)
do {
dump = fopen(REQUEST_DUMP, "ab");
- } while ((dump == NULL) && ((error = ERRNO) == EINTR));
+ } while ((dump == NULL) && ((error = errno) == EINTR));
if (dump == NULL) {
logmsg("Error opening file %s error: %d %s",
REQUEST_DUMP, error, strerror(error));
@@ -733,7 +746,7 @@ static void storerequest(char *reqbuf, size_t totalsize)
goto storerequest_cleanup;
if(written > 0)
writeleft -= written;
- } while ((writeleft > 0) && ((error = ERRNO) == EINTR));
+ } while ((writeleft > 0) && ((error = errno) == EINTR));
if(writeleft == 0)
logmsg("Wrote request (%zu bytes) input to " REQUEST_DUMP, totalsize);
@@ -748,7 +761,7 @@ storerequest_cleanup:
do {
res = fclose(dump);
- } while(res && ((error = ERRNO) == EINTR));
+ } while(res && ((error = errno) == EINTR));
if(res)
logmsg("Error closing file %s error: %d %s",
REQUEST_DUMP, error, strerror(error));
@@ -797,7 +810,7 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
while(!done_processing && (req->offset < REQBUFSIZ-1)) {
if(pipereq_length && pipereq) {
memmove(reqbuf, pipereq, pipereq_length);
- got = pipereq_length;
+ got = curlx_uztosz(pipereq_length);
pipereq_length = 0;
}
else {
@@ -962,7 +975,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
stream=fopen(filename, "rb");
if(!stream) {
- error = ERRNO;
+ error = errno;
logmsg("fopen() failed with error: %d %s", error, strerror(error));
logmsg("Error opening file: %s", filename);
logmsg("Couldn't open test file");
@@ -979,20 +992,18 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
}
if(got_exit_signal) {
- if(ptr)
- free(ptr);
+ free(ptr);
return -1;
}
/* re-open the same file again */
stream=fopen(filename, "rb");
if(!stream) {
- error = ERRNO;
+ error = errno;
logmsg("fopen() failed with error: %d %s", error, strerror(error));
logmsg("Error opening file: %s", filename);
logmsg("Couldn't open test file");
- if(ptr)
- free(ptr);
+ free(ptr);
return 0;
}
else {
@@ -1001,18 +1012,15 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
fclose(stream);
if(error) {
logmsg("getpart() failed with error: %d", error);
- if(ptr)
- free(ptr);
+ free(ptr);
return 0;
}
}
}
if(got_exit_signal) {
- if(ptr)
- free(ptr);
- if(cmd)
- free(cmd);
+ free(ptr);
+ free(cmd);
return -1;
}
@@ -1032,14 +1040,12 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
dump = fopen(RESPONSE_DUMP, "ab");
if(!dump) {
- error = ERRNO;
+ error = errno;
logmsg("fopen() failed with error: %d %s", error, strerror(error));
logmsg("Error opening file: %s", RESPONSE_DUMP);
logmsg("couldn't create logfile: " RESPONSE_DUMP);
- if(ptr)
- free(ptr);
- if(cmd)
- free(cmd);
+ free(ptr);
+ free(cmd);
return -1;
}
@@ -1090,34 +1096,28 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
do {
res = fclose(dump);
- } while(res && ((error = ERRNO) == EINTR));
+ } while(res && ((error = errno) == EINTR));
if(res)
logmsg("Error closing file %s error: %d %s",
RESPONSE_DUMP, error, strerror(error));
if(got_exit_signal) {
- if(ptr)
- free(ptr);
- if(cmd)
- free(cmd);
+ free(ptr);
+ free(cmd);
return -1;
}
if(sendfailure) {
logmsg("Sending response failed. Only (%zu bytes) of (%zu bytes) were sent",
responsesize-count, responsesize);
- if(ptr)
- free(ptr);
- if(cmd)
- free(cmd);
+ free(ptr);
+ free(cmd);
return -1;
}
logmsg("Response sent (%zu bytes) and written to " RESPONSE_DUMP,
responsesize);
-
- if(ptr)
- free(ptr);
+ free(ptr);
if(cmdsize > 0 ) {
char command[32];
@@ -1136,7 +1136,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
break;
if(res) {
/* should not happen */
- error = SOCKERRNO;
+ error = errno;
logmsg("wait_ms() failed with error: (%d) %s",
error, strerror(error));
break;
@@ -1155,9 +1155,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
ptr = NULL;
} while(ptr && *ptr);
}
- if(cmd)
- free(cmd);
-
+ free(cmd);
req->open = persistant;
prevtestno = req->testno;
@@ -1169,10 +1167,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
int main(int argc, char *argv[])
{
- struct sockaddr_in me;
-#ifdef ENABLE_IPV6
- struct sockaddr_in6 me6;
-#endif /* ENABLE_IPV6 */
+ srvr_sockaddr_union_t me;
curl_socket_t sock = CURL_SOCKET_BAD;
curl_socket_t msgsock = CURL_SOCKET_BAD;
int wrotepidfile = 0;
@@ -1294,19 +1289,19 @@ int main(int argc, char *argv[])
#ifdef ENABLE_IPV6
if(!use_ipv6) {
#endif
- memset(&me, 0, sizeof(me));
- me.sin_family = AF_INET;
- me.sin_addr.s_addr = INADDR_ANY;
- me.sin_port = htons(port);
- rc = bind(sock, (struct sockaddr *) &me, sizeof(me));
+ 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));
#ifdef ENABLE_IPV6
}
else {
- memset(&me6, 0, sizeof(me6));
- me6.sin6_family = AF_INET6;
- me6.sin6_addr = in6addr_any;
- me6.sin6_port = htons(port);
- rc = bind(sock, (struct sockaddr *) &me6, sizeof(me6));
+ 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));
}
#endif /* ENABLE_IPV6 */
if(0 != rc) {
diff --git a/tests/server/server_setup.h b/tests/server/server_setup.h
new file mode 100644
index 00000000..59e36958
--- /dev/null
+++ b/tests/server/server_setup.h
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_SERVER_SETUP_H
+#define HEADER_CURL_SERVER_SETUP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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.
+ *
+ ***************************************************************************/
+
+#define CURL_NO_OLDIES
+
+#include "curl_setup.h" /* portability help from the lib directory */
+
+#endif /* HEADER_CURL_SERVER_SETUP_H */
diff --git a/tests/server/server_sockaddr.h b/tests/server/server_sockaddr.h
new file mode 100644
index 00000000..3f4cd67d
--- /dev/null
+++ b/tests/server/server_sockaddr.h
@@ -0,0 +1,41 @@
+#ifndef HEADER_CURL_SERVER_SOCKADDR_H
+#define HEADER_CURL_SERVER_SOCKADDR_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "server_setup.h"
+
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h> /* 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 714d6fcd..a4496e0f 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,10 +19,11 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "server_setup.h"
/* 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.
@@ -79,19 +80,9 @@
* if no signal was being ignored or handled at all. Enjoy it!
*/
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -109,10 +100,23 @@
#include "getpart.h"
#include "inet_pton.h"
#include "util.h"
+#include "server_sockaddr.h"
+#include "warnless.h"
/* include memdebug.h last */
#include "memdebug.h"
+#ifdef USE_WINSOCK
+#undef EINTR
+#define EINTR 4 /* errno.h value */
+#undef EAGAIN
+#define EAGAIN 11 /* errno.h value */
+#undef ENOMEM
+#define ENOMEM 12 /* errno.h value */
+#undef EINVAL
+#define EINVAL 22 /* errno.h value */
+#endif
+
#define DEFAULT_PORT 8999
#ifndef DEFAULT_LOGFILE
@@ -122,6 +126,7 @@
const char *serverlogfile = DEFAULT_LOGFILE;
static bool verbose = FALSE;
+static bool bind_only = FALSE;
#ifdef ENABLE_IPV6
static bool use_ipv6 = FALSE;
#endif
@@ -166,6 +171,10 @@ static SIGHANDLER_T old_sigint_handler = SIG_ERR;
static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
/* var which if set indicates that the program should finish execution */
SIG_ATOMIC_T got_exit_signal = 0;
@@ -181,13 +190,13 @@ static volatile int exit_signal = 0;
static RETSIGTYPE exit_signal_handler(int signum)
{
- int old_errno = ERRNO;
+ int old_errno = errno;
if(got_exit_signal == 0) {
got_exit_signal = 1;
exit_signal = signum;
}
(void)signal(signum, exit_signal_handler);
- SET_ERRNO(old_errno);
+ errno = old_errno;
}
static void install_signal_handlers(void)
@@ -195,32 +204,39 @@ static void install_signal_handlers(void)
#ifdef SIGHUP
/* ignore SIGHUP signal */
if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGHUP handler: %s", strerror(errno));
#endif
#ifdef SIGPIPE
/* ignore SIGPIPE signal */
if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
#endif
#ifdef SIGALRM
/* ignore SIGALRM signal */
if((old_sigalrm_handler = signal(SIGALRM, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGALRM handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGALRM handler: %s", strerror(errno));
#endif
#ifdef SIGINT
/* handle SIGINT signal with our exit_signal_handler */
if((old_sigint_handler = signal(SIGINT, exit_signal_handler)) == SIG_ERR)
- logmsg("cannot install SIGINT handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGINT handler: %s", strerror(errno));
else
siginterrupt(SIGINT, 1);
#endif
#ifdef SIGTERM
/* handle SIGTERM signal with our exit_signal_handler */
if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR)
- logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGTERM handler: %s", strerror(errno));
else
siginterrupt(SIGTERM, 1);
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+ /* handle SIGBREAK signal with our exit_signal_handler */
+ if((old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler)) == SIG_ERR)
+ logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+ else
+ siginterrupt(SIGBREAK, 1);
+#endif
}
static void restore_signal_handlers(void)
@@ -245,7 +261,80 @@ static void restore_signal_handlers(void)
if(SIG_ERR != old_sigterm_handler)
(void)signal(SIGTERM, old_sigterm_handler);
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+ if(SIG_ERR != old_sigbreak_handler)
+ (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
+}
+
+#ifdef WIN32
+/*
+ * read-wrapper to support reading from stdin on Windows.
+ */
+static ssize_t read_wincon(int fd, void *buf, size_t count)
+{
+ HANDLE handle = NULL;
+ DWORD mode, rcount = 0;
+ BOOL success;
+
+ if(fd == fileno(stdin)) {
+ handle = GetStdHandle(STD_INPUT_HANDLE);
+ }
+ else {
+ return read(fd, buf, count);
+ }
+
+ if(GetConsoleMode(handle, &mode)) {
+ success = ReadConsole(handle, buf, curlx_uztoul(count), &rcount, NULL);
+ }
+ else {
+ success = ReadFile(handle, buf, curlx_uztoul(count), &rcount, NULL);
+ }
+ if(success) {
+ return rcount;
+ }
+
+ errno = GetLastError();
+ return -1;
+}
+#undef read
+#define read(a,b,c) read_wincon(a,b,c)
+
+/*
+ * write-wrapper to support writing to stdout and stderr on Windows.
+ */
+static ssize_t write_wincon(int fd, const void *buf, size_t count)
+{
+ HANDLE handle = NULL;
+ DWORD mode, wcount = 0;
+ BOOL success;
+
+ if(fd == fileno(stdout)) {
+ handle = GetStdHandle(STD_OUTPUT_HANDLE);
+ }
+ else if(fd == fileno(stderr)) {
+ handle = GetStdHandle(STD_ERROR_HANDLE);
+ }
+ else {
+ return write(fd, buf, count);
+ }
+
+ if(GetConsoleMode(handle, &mode)) {
+ success = WriteConsole(handle, buf, curlx_uztoul(count), &wcount, NULL);
+ }
+ else {
+ success = WriteFile(handle, buf, curlx_uztoul(count), &wcount, NULL);
+ }
+ if(success) {
+ return wcount;
+ }
+
+ errno = GetLastError();
+ return -1;
}
+#undef write
+#define write(a,b,c) write_wincon(a,b,c)
+#endif
/*
* fullread is a wrapper around the read() function. This will repeat the call
@@ -269,10 +358,12 @@ static ssize_t fullread(int filedes, void *buffer, size_t nbytes)
}
if(rc < 0) {
- error = ERRNO;
+ error = errno;
if((error == EINTR) || (error == EAGAIN))
continue;
- logmsg("unrecoverable read() failure: %s", strerror(error));
+ logmsg("reading from file descriptor: %d,", filedes);
+ logmsg("unrecoverable read() failure: (%d) %s",
+ error, strerror(error));
return -1;
}
@@ -313,10 +404,12 @@ static ssize_t fullwrite(int filedes, const void *buffer, size_t nbytes)
}
if(wc < 0) {
- error = ERRNO;
+ error = errno;
if((error == EINTR) || (error == EAGAIN))
continue;
- logmsg("unrecoverable write() failure: %s", strerror(error));
+ logmsg("writing to file descriptor: %d,", filedes);
+ logmsg("unrecoverable write() failure: (%d) %s",
+ error, strerror(error));
return -1;
}
@@ -406,6 +499,383 @@ static void lograw(unsigned char *buffer, ssize_t len)
logmsg("'%s'", data);
}
+#ifdef USE_WINSOCK
+/*
+ * WinSock select() does not support standard file descriptors,
+ * it can only check SOCKETs. The following function is an attempt
+ * to re-create a select() function with support for other handle types.
+ *
+ * select() function with support for WINSOCK2 sockets and all
+ * other handle types supported by WaitForMultipleObjectsEx() as
+ * well as disk files, anonymous and names pipes, and character input.
+ *
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/ms687028.aspx
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/ms741572.aspx
+ */
+struct select_ws_wait_data {
+ HANDLE handle; /* actual handle to wait for during select */
+ HANDLE event; /* internal event to abort waiting thread */
+};
+static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter)
+{
+ struct select_ws_wait_data *data;
+ HANDLE handle, handles[2];
+ INPUT_RECORD inputrecord;
+ LARGE_INTEGER size, pos;
+ DWORD type, length;
+
+ /* retrieve handles from internal structure */
+ data = (struct select_ws_wait_data *) lpParameter;
+ if(data) {
+ handle = data->handle;
+ handles[0] = data->event;
+ handles[1] = handle;
+ free(data);
+ }
+ else
+ return -1;
+
+ /* retrieve the type of file to wait on */
+ type = GetFileType(handle);
+ switch(type) {
+ case FILE_TYPE_DISK:
+ /* The handle represents a file on disk, this means:
+ * - WaitForMultipleObjectsEx will always be signalled for it.
+ * - comparison of current position in file and total size of
+ * the file can be used to check if we reached the end yet.
+ *
+ * Approach: Loop till either the internal event is signalled
+ * or if the end of the file has already been reached.
+ */
+ 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;
+ /* 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)) {
+ /* compare position with size, abort if not equal */
+ if(size.QuadPart == pos.QuadPart) {
+ /* sleep and continue waiting */
+ SleepEx(0, FALSE);
+ continue;
+ }
+ }
+ }
+ /* there is some data available, stop waiting */
+ break;
+ }
+ break;
+
+ case FILE_TYPE_CHAR:
+ /* The handle represents a character input, this means:
+ * - WaitForMultipleObjectsEx will be signalled on any kind of input,
+ * including mouse and window size events we do not care about.
+ *
+ * Approach: Loop till either the internal event is signalled
+ * or we get signalled for an actual key-event.
+ */
+ 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;
+ if(PeekConsoleInput(handle, &inputrecord, 1, &length)) {
+ /* check if the event is not an actual key-event */
+ if(length == 1 && inputrecord.EventType != KEY_EVENT) {
+ /* purge the non-key-event and continue waiting */
+ ReadConsoleInput(handle, &inputrecord, 1, &length);
+ continue;
+ }
+ }
+ }
+ /* there is some data available, stop waiting */
+ break;
+ }
+ break;
+
+ case FILE_TYPE_PIPE:
+ /* The handle represents an anonymous or named pipe, this means:
+ * - WaitForMultipleObjectsEx will always be signalled for it.
+ * - peek into the pipe and retrieve the amount of data available.
+ *
+ * Approach: Loop till either the internal event is signalled
+ * or there is data in the pipe available for reading.
+ */
+ 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);
+ continue;
+ }
+ }
+ else {
+ /* if the pipe has been closed, sleep and continue waiting */
+ if(GetLastError() == ERROR_BROKEN_PIPE) {
+ SleepEx(0, FALSE);
+ continue;
+ }
+ }
+ /* there is some data available, stop waiting */
+ break;
+ }
+ break;
+
+ default:
+ /* The handle has an unknown type, try to wait on it */
+ WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE);
+ break;
+ }
+
+ return 0;
+}
+static HANDLE select_ws_wait(HANDLE handle, HANDLE event)
+{
+ struct select_ws_wait_data *data;
+ HANDLE thread = NULL;
+
+ /* allocate internal waiting data structure */
+ data = malloc(sizeof(struct select_ws_wait_data));
+ if(data) {
+ data->handle = handle;
+ data->event = event;
+
+ /* launch waiting thread */
+ thread = CreateThread(NULL, 0,
+ &select_ws_wait_thread,
+ data, 0, NULL);
+
+ /* free data if thread failed to launch */
+ if(!thread) {
+ free(data);
+ }
+ }
+
+ 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;
+ WSANETWORKEVENTS wsanetevents;
+ struct select_ws_data *data;
+ HANDLE handle, *handles;
+ curl_socket_t sock;
+ long networkevents;
+ WSAEVENT wsaevent;
+ int error, fds;
+ HANDLE waitevent = NULL;
+ DWORD nfd = 0, thd = 0, wsa = 0;
+ int ret = 0;
+
+ /* check if the input value is valid */
+ if(nfds < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* check if we got descriptors, sleep in case we got none */
+ if(!nfds) {
+ Sleep((timeout->tv_sec * 1000) + (timeout->tv_usec / 1000));
+ return 0;
+ }
+
+ /* create internal event to signal waiting threads */
+ waitevent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ if(!waitevent) {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ /* allocate internal array for the internal data */
+ data = malloc(nfds * sizeof(struct select_ws_data));
+ if(data == NULL) {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ /* allocate internal array for the internal event handles */
+ handles = malloc(nfds * sizeof(HANDLE));
+ if(handles == NULL) {
+ free(data);
+ errno = ENOMEM;
+ return -1;
+ }
+
+ /* clear internal arrays */
+ memset(data, 0, nfds * sizeof(struct select_ws_data));
+ memset(handles, 0, nfds * sizeof(HANDLE));
+
+ /* loop over the handles in the input descriptor sets */
+ for(fds = 0; fds < nfds; fds++) {
+ networkevents = 0;
+ handles[nfd] = 0;
+
+ if(FD_ISSET(fds, readfds))
+ networkevents |= FD_READ|FD_ACCEPT|FD_CLOSE;
+
+ if(FD_ISSET(fds, writefds))
+ networkevents |= FD_WRITE|FD_CONNECT;
+
+ if(FD_ISSET(fds, exceptfds))
+ networkevents |= FD_OOB|FD_CLOSE;
+
+ /* only wait for events for which we actually care */
+ if(networkevents) {
+ data[nfd].fd = 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;
+ thd++;
+ }
+ else if(fds == fileno(stdout)) {
+ handles[nfd] = GetStdHandle(STD_OUTPUT_HANDLE);
+ }
+ else if(fds == fileno(stderr)) {
+ handles[nfd] = GetStdHandle(STD_ERROR_HANDLE);
+ }
+ else {
+ wsaevent = WSACreateEvent();
+ if(wsaevent != WSA_INVALID_EVENT) {
+ error = WSAEventSelect(fds, wsaevent, networkevents);
+ if(error != SOCKET_ERROR) {
+ handle = (HANDLE) wsaevent;
+ handles[nfd] = handle;
+ data[wsa].wsasock = curlx_sitosk(fds);
+ data[wsa].wsaevent = wsaevent;
+ wsa++;
+ }
+ else {
+ WSACloseEvent(wsaevent);
+ handle = (HANDLE) curlx_sitosk(fds);
+ handle = select_ws_wait(handle, waitevent);
+ handles[nfd] = handle;
+ data[thd].thread = handle;
+ thd++;
+ }
+ }
+ }
+ nfd++;
+ }
+ }
+
+ /* convert struct timeval to milliseconds */
+ if(timeout) {
+ milliseconds = ((timeout->tv_sec * 1000) + (timeout->tv_usec / 1000));
+ }
+ else {
+ milliseconds = INFINITE;
+ }
+
+ /* wait for one of the internal handles to trigger */
+ wait = WaitForMultipleObjectsEx(nfd, handles, FALSE, milliseconds, FALSE);
+
+ /* signal the event handle for the waiting threads */
+ SetEvent(waitevent);
+
+ /* loop over the internal handles returned in the descriptors */
+ for(idx = 0; idx < nfd; idx++) {
+ handle = handles[idx];
+ sock = data[idx].fd;
+ fds = curlx_sktosi(sock);
+
+ /* check if the current internal handle was triggered */
+ if(wait != WAIT_FAILED && (wait - WAIT_OBJECT_0) <= idx &&
+ WaitForSingleObjectEx(handle, 0, FALSE) == WAIT_OBJECT_0) {
+ /* first handle stdin, stdout and stderr */
+ if(fds == fileno(stdin)) {
+ /* stdin is never ready for write or exceptional */
+ FD_CLR(sock, writefds);
+ FD_CLR(sock, exceptfds);
+ }
+ else if(fds == fileno(stdout) || fds == fileno(stderr)) {
+ /* stdout and stderr are never ready for read or exceptional */
+ FD_CLR(sock, readfds);
+ FD_CLR(sock, exceptfds);
+ }
+ else {
+ /* try to handle the event with the WINSOCK2 functions */
+ wsanetevents.lNetworkEvents = 0;
+ error = WSAEnumNetworkEvents(fds, handle, &wsanetevents);
+ if(error != SOCKET_ERROR) {
+ /* remove from descriptor set if not ready for read/accept/close */
+ if(!(wsanetevents.lNetworkEvents & (FD_READ|FD_ACCEPT|FD_CLOSE)))
+ FD_CLR(sock, readfds);
+
+ /* remove from descriptor set if not ready for write/connect */
+ if(!(wsanetevents.lNetworkEvents & (FD_WRITE|FD_CONNECT)))
+ FD_CLR(sock, writefds);
+
+ /* HACK:
+ * use exceptfds together with readfds to signal
+ * that the connection was closed by the client.
+ *
+ * Reason: FD_CLOSE is only signaled once, sometimes
+ * at the same time as FD_READ with data being available.
+ * This means that recv/sread is not reliable to detect
+ * that the connection is closed.
+ */
+ /* remove from descriptor set if not exceptional */
+ if(!(wsanetevents.lNetworkEvents & (FD_OOB|FD_CLOSE)))
+ FD_CLR(sock, exceptfds);
+ }
+ }
+
+ /* check if the event has not been filtered using specific tests */
+ if(FD_ISSET(sock, readfds) || FD_ISSET(sock, writefds) ||
+ FD_ISSET(sock, exceptfds)) {
+ ret++;
+ }
+ }
+ else {
+ /* remove from all descriptor sets since this handle did not trigger */
+ FD_CLR(sock, readfds);
+ FD_CLR(sock, writefds);
+ FD_CLR(sock, exceptfds);
+ }
+ }
+
+ for(idx = 0; idx < wsa; idx++) {
+ WSAEventSelect(data[idx].wsasock, NULL, 0);
+ WSACloseEvent(data[idx].wsaevent);
+ }
+
+ for(idx = 0; idx < thd; idx++) {
+ WaitForSingleObject(data[idx].thread, INFINITE);
+ CloseHandle(data[idx].thread);
+ }
+
+ CloseHandle(waitevent);
+
+ free(handles);
+ free(data);
+
+ return ret;
+}
+#define select(a,b,c,d,e) select_ws(a,b,c,d,e)
+#endif /* USE_WINSOCK */
+
/*
sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
@@ -421,7 +891,7 @@ static bool juggle(curl_socket_t *sockfdp,
fd_set fds_write;
fd_set fds_err;
curl_socket_t sockfd = CURL_SOCKET_BAD;
- curl_socket_t maxfd = CURL_SOCKET_BAD;
+ int maxfd = -99;
ssize_t rc;
ssize_t nread_socket;
ssize_t bytes_written;
@@ -454,17 +924,7 @@ static bool juggle(curl_socket_t *sockfdp,
FD_ZERO(&fds_write);
FD_ZERO(&fds_err);
-#ifdef USE_WINSOCK
- /*
- ** WinSock select() does not support standard file descriptors,
- ** it can only check SOCKETs. Since this program in its current
- ** state will not work on WinSock based systems, next line is
- ** commented out to allow warning-free compilation awaiting the
- ** day it will be fixed to also run on WinSock systems.
- */
-#else
- FD_SET(fileno(stdin), &fds_read);
-#endif
+ FD_SET((curl_socket_t)fileno(stdin), &fds_read);
switch(*mode) {
@@ -474,7 +934,7 @@ static bool juggle(curl_socket_t *sockfdp,
sockfd = listenfd;
/* there's always a socket to wait for */
FD_SET(sockfd, &fds_read);
- maxfd = sockfd;
+ maxfd = (int)sockfd;
break;
case PASSIVE_CONNECT:
@@ -488,7 +948,10 @@ static bool juggle(curl_socket_t *sockfdp,
else {
/* there's always a socket to wait for */
FD_SET(sockfd, &fds_read);
- maxfd = sockfd;
+#ifdef USE_WINSOCK
+ FD_SET(sockfd, &fds_err);
+#endif
+ maxfd = (int)sockfd;
}
break;
@@ -498,7 +961,10 @@ static bool juggle(curl_socket_t *sockfdp,
/* sockfd turns CURL_SOCKET_BAD when our connection has been closed */
if(CURL_SOCKET_BAD != sockfd) {
FD_SET(sockfd, &fds_read);
- maxfd = sockfd;
+#ifdef USE_WINSOCK
+ FD_SET(sockfd, &fds_err);
+#endif
+ maxfd = (int)sockfd;
}
else {
logmsg("No socket to read on");
@@ -518,14 +984,16 @@ static bool juggle(curl_socket_t *sockfdp,
do {
- rc = select((int)maxfd + 1, &fds_read, &fds_write, &fds_err, &timeout);
+ /* select() blocking behavior call on blocking descriptors please */
+
+ rc = select(maxfd + 1, &fds_read, &fds_write, &fds_err, &timeout);
if(got_exit_signal) {
logmsg("signalled to die, exiting...");
return FALSE;
}
- } while((rc == -1) && ((error = SOCKERRNO) == EINTR));
+ } while((rc == -1) && ((error = errno) == EINTR));
if(rc < 0) {
logmsg("select() failed with error: (%d) %s",
@@ -639,17 +1107,22 @@ static bool juggle(curl_socket_t *sockfdp,
if((sockfd != CURL_SOCKET_BAD) && (FD_ISSET(sockfd, &fds_read)) ) {
+ curl_socket_t newfd = CURL_SOCKET_BAD; /* newly accepted socket */
+
if(*mode == PASSIVE_LISTEN) {
/* there's no stream set up yet, this is an indication that there's a
client connecting. */
- sockfd = accept(sockfd, NULL, NULL);
- if(CURL_SOCKET_BAD == sockfd)
- logmsg("accept() failed");
+ newfd = accept(sockfd, NULL, NULL);
+ if(CURL_SOCKET_BAD == newfd) {
+ error = SOCKERRNO;
+ logmsg("accept(%d, NULL, NULL) failed with error: (%d) %s",
+ sockfd, error, strerror(error));
+ }
else {
logmsg("====> Client connect");
if(!write_stdout("CNCT\n", 5))
return FALSE;
- *sockfdp = sockfd; /* store the new socket */
+ *sockfdp = newfd; /* store the new socket */
*mode = PASSIVE_CONNECT; /* we have connected */
}
return TRUE;
@@ -658,7 +1131,22 @@ static bool juggle(curl_socket_t *sockfdp,
/* read from socket, pass on data to stdout */
nread_socket = sread(sockfd, buffer, sizeof(buffer));
- if(nread_socket <= 0) {
+ if(nread_socket > 0) {
+ snprintf(data, sizeof(data), "DATA\n%04zx\n", nread_socket);
+ if(!write_stdout(data, 10))
+ return FALSE;
+ if(!write_stdout(buffer, nread_socket))
+ return FALSE;
+
+ logmsg("< %zd bytes data, client => server", nread_socket);
+ lograw(buffer, nread_socket);
+ }
+
+ if(nread_socket <= 0
+#ifdef USE_WINSOCK
+ || FD_ISSET(sockfd, &fds_err)
+#endif
+ ) {
logmsg("====> Client disconnect");
if(!write_stdout("DISC\n", 5))
return FALSE;
@@ -670,15 +1158,6 @@ static bool juggle(curl_socket_t *sockfdp,
*mode = ACTIVE_DISCONNECT;
return TRUE;
}
-
- snprintf(data, sizeof(data), "DATA\n%04zx\n", nread_socket);
- if(!write_stdout(data, 10))
- return FALSE;
- if(!write_stdout(buffer, nread_socket))
- return FALSE;
-
- logmsg("< %zd bytes data, client => server", nread_socket);
- lograw(buffer, nread_socket);
}
return TRUE;
@@ -688,10 +1167,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
unsigned short *listenport)
{
/* passive daemon style */
- struct sockaddr_in me;
-#ifdef ENABLE_IPV6
- struct sockaddr_in6 me6;
-#endif /* ENABLE_IPV6 */
+ srvr_sockaddr_union_t listener;
int flag;
int rc;
int totdelay = 0;
@@ -713,7 +1189,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
rc = wait_ms(delay);
if(rc) {
/* should not happen */
- error = SOCKERRNO;
+ error = errno;
logmsg("wait_ms() failed with error: (%d) %s",
error, strerror(error));
sclose(sock);
@@ -742,19 +1218,19 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
#ifdef ENABLE_IPV6
if(!use_ipv6) {
#endif
- memset(&me, 0, sizeof(me));
- me.sin_family = AF_INET;
- me.sin_addr.s_addr = INADDR_ANY;
- me.sin_port = htons(*listenport);
- rc = bind(sock, (struct sockaddr *) &me, sizeof(me));
+ memset(&listener.sa4, 0, sizeof(listener.sa4));
+ listener.sa4.sin_family = AF_INET;
+ listener.sa4.sin_addr.s_addr = INADDR_ANY;
+ listener.sa4.sin_port = htons(*listenport);
+ rc = bind(sock, &listener.sa, sizeof(listener.sa4));
#ifdef ENABLE_IPV6
}
else {
- memset(&me6, 0, sizeof(me6));
- me6.sin6_family = AF_INET6;
- me6.sin6_addr = in6addr_any;
- me6.sin6_port = htons(*listenport);
- rc = bind(sock, (struct sockaddr *) &me6, sizeof(me6));
+ memset(&listener.sa6, 0, sizeof(listener.sa6));
+ listener.sa6.sin6_family = AF_INET6;
+ listener.sa6.sin6_addr = in6addr_any;
+ listener.sa6.sin6_port = htons(*listenport);
+ rc = bind(sock, &listener.sa, sizeof(listener.sa6));
}
#endif /* ENABLE_IPV6 */
if(rc) {
@@ -769,36 +1245,30 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
/* The system was supposed to choose a port number, figure out which
port we actually got and update the listener port value with it. */
curl_socklen_t la_size;
- struct sockaddr *localaddr;
- struct sockaddr_in localaddr4;
+ srvr_sockaddr_union_t localaddr;
#ifdef ENABLE_IPV6
- struct sockaddr_in6 localaddr6;
- if(!use_ipv6) {
+ if(!use_ipv6)
#endif
- la_size = sizeof(localaddr4);
- localaddr = (struct sockaddr *)&localaddr4;
+ la_size = sizeof(localaddr.sa4);
#ifdef ENABLE_IPV6
- }
- else {
- la_size = sizeof(localaddr6);
- localaddr = (struct sockaddr *)&localaddr6;
- }
+ else
+ la_size = sizeof(localaddr.sa6);
#endif
- memset(localaddr, 0, (size_t)la_size);
- if(getsockname(sock, localaddr, &la_size) < 0) {
+ memset(&localaddr.sa, 0, (size_t)la_size);
+ if(getsockname(sock, &localaddr.sa, &la_size) < 0) {
error = SOCKERRNO;
logmsg("getsockname() failed with error: (%d) %s",
error, strerror(error));
sclose(sock);
return CURL_SOCKET_BAD;
}
- switch (localaddr->sa_family) {
+ switch (localaddr.sa.sa_family) {
case AF_INET:
- *listenport = ntohs(localaddr4.sin_port);
+ *listenport = ntohs(localaddr.sa4.sin_port);
break;
#ifdef ENABLE_IPV6
case AF_INET6:
- *listenport = ntohs(localaddr6.sin6_port);
+ *listenport = ntohs(localaddr.sa6.sin6_port);
break;
#endif
default:
@@ -815,12 +1285,18 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
}
}
+ /* bindonly option forces no listening */
+ if(bind_only) {
+ logmsg("instructed to bind port without listening");
+ return sock;
+ }
+
/* start accepting connections */
rc = listen(sock, 5);
if(0 != rc) {
error = SOCKERRNO;
- logmsg("listen() failed with error: (%d) %s",
- error, strerror(error));
+ logmsg("listen(%d, 5) failed with error: (%d) %s",
+ sock, error, strerror(error));
sclose(sock);
return CURL_SOCKET_BAD;
}
@@ -831,10 +1307,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
int main(int argc, char *argv[])
{
- struct sockaddr_in me;
-#ifdef ENABLE_IPV6
- struct sockaddr_in6 me6;
-#endif /* ENABLE_IPV6 */
+ srvr_sockaddr_union_t me;
curl_socket_t sock = CURL_SOCKET_BAD;
curl_socket_t msgsock = CURL_SOCKET_BAD;
int wrotepidfile = 0;
@@ -886,6 +1359,10 @@ int main(int argc, char *argv[])
#endif
arg++;
}
+ else if(!strcmp("--bindonly", argv[arg])) {
+ bind_only = TRUE;
+ arg++;
+ }
else if(!strcmp("--port", argv[arg])) {
arg++;
if(argc>arg) {
@@ -934,6 +1411,7 @@ int main(int argc, char *argv[])
" --pidfile [file]\n"
" --ipv4\n"
" --ipv6\n"
+ " --bindonly\n"
" --port [port]\n"
" --connect [port]\n"
" --addr [address]");
@@ -944,6 +1422,10 @@ int main(int argc, char *argv[])
#ifdef WIN32
win32_init();
atexit(win32_cleanup);
+
+ setmode(fileno(stdin), O_BINARY);
+ setmode(fileno(stdout), O_BINARY);
+ setmode(fileno(stderr), O_BINARY);
#endif
install_signal_handlers();
@@ -961,6 +1443,7 @@ int main(int argc, char *argv[])
error = SOCKERRNO;
logmsg("Error creating socket: (%d) %s",
error, strerror(error));
+ write_stdout("FAIL\n", 5);
goto sockfilt_cleanup;
}
@@ -970,32 +1453,33 @@ int main(int argc, char *argv[])
#ifdef ENABLE_IPV6
if(!use_ipv6) {
#endif
- memset(&me, 0, sizeof(me));
- me.sin_family = AF_INET;
- me.sin_port = htons(connectport);
- me.sin_addr.s_addr = INADDR_ANY;
+ memset(&me.sa4, 0, sizeof(me.sa4));
+ me.sa4.sin_family = AF_INET;
+ me.sa4.sin_port = htons(connectport);
+ me.sa4.sin_addr.s_addr = INADDR_ANY;
if (!addr)
addr = "127.0.0.1";
- Curl_inet_pton(AF_INET, addr, &me.sin_addr);
+ Curl_inet_pton(AF_INET, addr, &me.sa4.sin_addr);
- rc = connect(sock, (struct sockaddr *) &me, sizeof(me));
+ rc = connect(sock, &me.sa, sizeof(me.sa4));
#ifdef ENABLE_IPV6
}
else {
- memset(&me6, 0, sizeof(me6));
- me6.sin6_family = AF_INET6;
- me6.sin6_port = htons(connectport);
+ memset(&me.sa6, 0, sizeof(me.sa6));
+ me.sa6.sin6_family = AF_INET6;
+ me.sa6.sin6_port = htons(connectport);
if (!addr)
addr = "::1";
- Curl_inet_pton(AF_INET6, addr, &me6.sin6_addr);
+ Curl_inet_pton(AF_INET6, addr, &me.sa6.sin6_addr);
- rc = connect(sock, (struct sockaddr *) &me6, sizeof(me6));
+ rc = connect(sock, &me.sa, sizeof(me.sa6));
}
#endif /* ENABLE_IPV6 */
if(rc) {
error = SOCKERRNO;
logmsg("Error connecting to port %hu: (%d) %s",
connectport, error, strerror(error));
+ write_stdout("FAIL\n", 5);
goto sockfilt_cleanup;
}
logmsg("====> Client connect");
@@ -1004,8 +1488,10 @@ int main(int argc, char *argv[])
else {
/* passive daemon style */
sock = sockdaemon(sock, &port);
- if(CURL_SOCKET_BAD == sock)
+ if(CURL_SOCKET_BAD == sock) {
+ write_stdout("FAIL\n", 5);
goto sockfilt_cleanup;
+ }
msgsock = CURL_SOCKET_BAD; /* no stream socket yet */
}
@@ -1013,12 +1499,16 @@ int main(int argc, char *argv[])
if(connectport)
logmsg("Connected to port %hu", connectport);
+ else if(bind_only)
+ logmsg("Bound without listening on port %hu", port);
else
logmsg("Listening on port %hu", port);
wrotepidfile = write_pidfile(pidname);
- if(!wrotepidfile)
+ if(!wrotepidfile) {
+ write_stdout("FAIL\n", 5);
goto sockfilt_cleanup;
+ }
do {
juggle_again = juggle(&msgsock, sock, &mode);
diff --git a/tests/server/sws.c b/tests/server/sws.c
index a4c040bd..9ad54e4a 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -19,6 +19,7 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "server_setup.h"
/* sws.c: simple (silly?) web server
@@ -27,19 +28,9 @@
*/
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -58,26 +49,34 @@
versions instead */
#include "curlx.h" /* from the private lib dir */
#include "getpart.h"
+#include "inet_pton.h"
#include "util.h"
+#include "server_sockaddr.h"
/* include memdebug.h last */
#include "memdebug.h"
-#if !defined(CURL_SWS_FORK_ENABLED) && defined(HAVE_FORK)
-/*
- * The normal sws build for the plain standard curl test suite has no use for
- * fork(), but if you feel wild and crazy and want to setup some more exotic
- * tests. Define this and run...
- */
-#define CURL_SWS_FORK_ENABLED
+#ifdef USE_WINSOCK
+#undef EINTR
+#define EINTR 4 /* errno.h value */
+#undef EAGAIN
+#define EAGAIN 11 /* errno.h value */
+#undef ERANGE
+#define ERANGE 34 /* errno.h value */
#endif
+static enum {
+ socket_domain_inet = AF_INET
#ifdef ENABLE_IPV6
-static bool use_ipv6 = FALSE;
+ , socket_domain_inet6 = AF_INET6
+#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;
#define REQBUFSIZ 150000
#define REQBUFSIZ_TXT "149999"
@@ -94,6 +93,8 @@ static bool prevbounce=FALSE; /* instructs the server to increase the part
struct httprequest {
char reqbuf[REQBUFSIZ]; /* buffer area for the incoming request */
+ bool connect_request; /* if a CONNECT */
+ unsigned short connect_port; /* the port number CONNECT used */
size_t checkindex; /* where to start checking of the request */
size_t offset; /* size of the incoming request */
long testno; /* test number found in the request */
@@ -106,7 +107,7 @@ struct httprequest {
bool digest; /* Authorization digest header found */
bool ntlm; /* Authorization ntlm header found */
int writedelay; /* if non-zero, delay this number of seconds between
- writes in the response */
+ writes in the response */
int pipe; /* if non-zero, expect this many requests to do a "piped"
request/response */
int skip; /* if non-zero, the server is instructed to not read this
@@ -116,8 +117,18 @@ struct httprequest {
int rcmd; /* doing a special command, see defines above */
int prot_version; /* HTTP version * 10 */
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;
};
+#define MAX_SOCKETS 1024
+
+static curl_socket_t all_sockets[MAX_SOCKETS];
+static size_t num_sockets = 0;
+
static int ProcessRequest(struct httprequest *req);
static void storerequest(char *reqbuf, size_t totalsize);
@@ -134,6 +145,11 @@ const char *serverlogfile = DEFAULT_LOGFILE;
#define REQUEST_DUMP "log/server.input"
#define RESPONSE_DUMP "log/server.response"
+/* when told to run as proxy, we store the logs in different files so that
+ they can co-exist with the same program running as a "server" */
+#define REQUEST_PROXY_DUMP "log/proxy.input"
+#define RESPONSE_PROXY_DUMP "log/proxy.response"
+
/* very-big-path support */
#define MAXDOCNAMELEN 140000
#define MAXDOCNAMELEN_TXT "139999"
@@ -150,32 +166,29 @@ const char *serverlogfile = DEFAULT_LOGFILE;
/* 'stream' means to send a never-ending stream of data */
#define CMD_STREAM "stream"
+/* 'connection-monitor' will output when a server/proxy connection gets
+ disconnected as for some cases it is important that it gets done at the
+ 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 {
- DOCNUMBER_NOTHING = -7,
- DOCNUMBER_QUIT = -6,
- DOCNUMBER_BADCONNECT = -5,
- DOCNUMBER_INTERNAL= -4,
- DOCNUMBER_CONNECT = -3,
+ DOCNUMBER_NOTHING = -4,
+ DOCNUMBER_QUIT = -3,
DOCNUMBER_WERULEZ = -2,
DOCNUMBER_404 = -1
};
-const char *end_of_headers = END_OF_HEADERS;
+static const char *end_of_headers = END_OF_HEADERS;
/* sent as reply to a QUIT */
static const char *docquit =
"HTTP/1.1 200 Goodbye" END_OF_HEADERS;
-/* sent as reply to a CONNECT */
-static const char *docconnect =
-"HTTP/1.1 200 Mighty fine indeed" END_OF_HEADERS;
-
-/* sent as reply to a "bad" CONNECT */
-static const char *docbadconnect =
-"HTTP/1.1 501 Forbidden you fool" END_OF_HEADERS;
-
/* send back this on 404 file not found */
static const char *doc404 = "HTTP/1.1 404 Not Found\r\n"
"Server: " SWSVERSION "\r\n"
@@ -220,6 +233,10 @@ static SIGHANDLER_T old_sigint_handler = SIG_ERR;
static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
/* var which if set indicates that the program should finish execution */
SIG_ATOMIC_T got_exit_signal = 0;
@@ -235,13 +252,13 @@ static volatile int exit_signal = 0;
static RETSIGTYPE exit_signal_handler(int signum)
{
- int old_errno = ERRNO;
+ int old_errno = errno;
if(got_exit_signal == 0) {
got_exit_signal = 1;
exit_signal = signum;
}
(void)signal(signum, exit_signal_handler);
- SET_ERRNO(old_errno);
+ errno = old_errno;
}
static void install_signal_handlers(void)
@@ -249,32 +266,39 @@ static void install_signal_handlers(void)
#ifdef SIGHUP
/* ignore SIGHUP signal */
if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGHUP handler: %s", strerror(errno));
#endif
#ifdef SIGPIPE
/* ignore SIGPIPE signal */
if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
#endif
#ifdef SIGALRM
/* ignore SIGALRM signal */
if((old_sigalrm_handler = signal(SIGALRM, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGALRM handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGALRM handler: %s", strerror(errno));
#endif
#ifdef SIGINT
/* handle SIGINT signal with our exit_signal_handler */
if((old_sigint_handler = signal(SIGINT, exit_signal_handler)) == SIG_ERR)
- logmsg("cannot install SIGINT handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGINT handler: %s", strerror(errno));
else
siginterrupt(SIGINT, 1);
#endif
#ifdef SIGTERM
/* handle SIGTERM signal with our exit_signal_handler */
if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR)
- logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGTERM handler: %s", strerror(errno));
else
siginterrupt(SIGTERM, 1);
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+ /* handle SIGBREAK signal with our exit_signal_handler */
+ if((old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler)) == SIG_ERR)
+ logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+ else
+ siginterrupt(SIGBREAK, 1);
+#endif
}
static void restore_signal_handlers(void)
@@ -299,6 +323,129 @@ static void restore_signal_handlers(void)
if(SIG_ERR != old_sigterm_handler)
(void)signal(SIGTERM, old_sigterm_handler);
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+ if(SIG_ERR != old_sigbreak_handler)
+ (void)signal(SIGBREAK, old_sigbreak_handler);
+#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)
+{
+ FILE *stream;
+ char *filename;
+ int error;
+
+ filename = test2file(req->testno);
+
+ stream=fopen(filename, "rb");
+ if(!stream) {
+ error = errno;
+ logmsg("fopen() failed with error: %d %s", error, strerror(error));
+ logmsg(" [1] Error opening file: %s", filename);
+ logmsg(" Couldn't open test file %ld", req->testno);
+ req->open = FALSE; /* closes connection */
+ return 1; /* done */
+ }
+ else {
+ char *orgcmd = NULL;
+ char *cmd = NULL;
+ size_t cmdsize = 0;
+ int num=0;
+
+ /* get the custom server control "commands" */
+ error = getpart(&orgcmd, &cmdsize, "reply", "servercmd", stream);
+ fclose(stream);
+ if(error) {
+ logmsg("getpart() failed with error: %d", error);
+ req->open = FALSE; /* closes connection */
+ return 1; /* done */
+ }
+
+ req->connmon = FALSE;
+
+ cmd = orgcmd;
+ while(cmd && cmdsize) {
+ char *check;
+
+ if(!strncmp(CMD_AUTH_REQUIRED, cmd, strlen(CMD_AUTH_REQUIRED))) {
+ logmsg("instructed to require authorization header");
+ req->auth_req = TRUE;
+ }
+ else if(!strncmp(CMD_IDLE, cmd, strlen(CMD_IDLE))) {
+ logmsg("instructed to idle");
+ req->rcmd = RCMD_IDLE;
+ req->open = TRUE;
+ }
+ else if(!strncmp(CMD_STREAM, cmd, strlen(CMD_STREAM))) {
+ logmsg("instructed to stream");
+ req->rcmd = RCMD_STREAM;
+ }
+ else if(!strncmp(CMD_CONNECTIONMONITOR, cmd,
+ strlen(CMD_CONNECTIONMONITOR))) {
+ 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)
+ logmsg("negative pipe size ignored");
+ else if(num > 0)
+ req->pipe = num-1; /* decrease by one since we don't count the
+ first request in this number */
+ }
+ else if(1 == sscanf(cmd, "skip: %d", &num)) {
+ logmsg("instructed to skip this number of bytes %d", num);
+ req->skip = num;
+ }
+ else if(1 == sscanf(cmd, "writedelay: %d", &num)) {
+ logmsg("instructed to delay %d secs between packets", num);
+ req->writedelay = num;
+ }
+ else {
+ logmsg("Unknown <servercmd> instruction found: %s", cmd);
+ }
+ /* try to deal with CRLF or just LF */
+ check = strchr(cmd, '\r');
+ if(!check)
+ check = strchr(cmd, '\n');
+
+ if(check) {
+ /* get to the letter following the newline */
+ while((*check == '\r') || (*check == '\n'))
+ check++;
+
+ if(!*check)
+ /* if we reached a zero, get out */
+ break;
+ cmd = check;
+ }
+ else
+ break;
+ }
+ free(orgcmd);
+ }
+
+ return 0; /* OK! */
}
static int ProcessRequest(struct httprequest *req)
@@ -307,13 +454,14 @@ static int ProcessRequest(struct httprequest *req)
bool chunked = FALSE;
static char request[REQUEST_KEYWORD_SIZE];
static char doc[MAXDOCNAMELEN];
- char logbuf[256];
+ char logbuf[456];
int prot_major, prot_minor;
- char *end;
- int error;
- end = strstr(line, end_of_headers);
+ char *end = strstr(line, end_of_headers);
- logmsg("ProcessRequest() called");
+ req->callcount++;
+
+ logmsg("Process %d bytes request%s", req->offset,
+ req->callcount > 1?" [CONTINUED]":"");
/* try to figure out the request characteristics as soon as possible, but
only once! */
@@ -342,10 +490,7 @@ static int ProcessRequest(struct httprequest *req)
/* get the number after it */
if(ptr) {
- FILE *stream;
- char *filename;
-
- if((strlen(doc) + strlen(request)) < 200)
+ if((strlen(doc) + strlen(request)) < 400)
sprintf(logbuf, "Got request: %s %s HTTP/%d.%d",
request, doc, prot_major, prot_minor);
else
@@ -380,113 +525,124 @@ static int ProcessRequest(struct httprequest *req)
else
req->partno = 0;
- sprintf(logbuf, "Requested test number %ld part %ld",
- req->testno, req->partno);
- logmsg("%s", logbuf);
+ if(req->testno) {
- filename = test2file(req->testno);
+ sprintf(logbuf, "Requested test number %ld part %ld",
+ req->testno, req->partno);
+ logmsg("%s", logbuf);
- stream=fopen(filename, "rb");
- if(!stream) {
- error = ERRNO;
- logmsg("fopen() failed with error: %d %s", error, strerror(error));
- logmsg("Error opening file: %s", filename);
- logmsg("Couldn't open test file %ld", req->testno);
- req->open = FALSE; /* closes connection */
- return 1; /* done */
+ /* find and parse <servercmd> for this test */
+ parse_servercmd(req);
}
- else {
- char *cmd = NULL;
- size_t cmdsize = 0;
- int num=0;
-
- /* get the custom server control "commands" */
- error = getpart(&cmd, &cmdsize, "reply", "servercmd", stream);
- fclose(stream);
- if(error) {
- logmsg("getpart() failed with error: %d", error);
- req->open = FALSE; /* closes connection */
- return 1; /* done */
- }
-
- if(cmdsize) {
- logmsg("Found a reply-servercmd section!");
+ else
+ req->testno = DOCNUMBER_NOTHING;
- if(!strncmp(CMD_AUTH_REQUIRED, cmd, strlen(CMD_AUTH_REQUIRED))) {
- logmsg("instructed to require authorization header");
- req->auth_req = TRUE;
- }
- else if(!strncmp(CMD_IDLE, cmd, strlen(CMD_IDLE))) {
- logmsg("instructed to idle");
- req->rcmd = RCMD_IDLE;
- req->open = TRUE;
- }
- else if(!strncmp(CMD_STREAM, cmd, strlen(CMD_STREAM))) {
- logmsg("instructed to stream");
- req->rcmd = RCMD_STREAM;
- }
- else if(1 == sscanf(cmd, "pipe: %d", &num)) {
- logmsg("instructed to allow a pipe size of %d", num);
- if(num < 0)
- logmsg("negative pipe size ignored");
- else if(num > 0)
- req->pipe = num-1; /* decrease by one since we don't count the
- first request in this number */
- }
- else if(1 == sscanf(cmd, "skip: %d", &num)) {
- logmsg("instructed to skip this number of bytes %d", num);
- req->skip = num;
- }
- else if(1 == sscanf(cmd, "writedelay: %d", &num)) {
- logmsg("instructed to delay %d secs between packets", num);
- req->writedelay = num;
- }
- else {
- logmsg("funny instruction found: %s", cmd);
- }
- }
- if(cmd)
- free(cmd);
- }
}
- else {
+
+ if(req->testno == DOCNUMBER_NOTHING) {
+ /* didn't find any in the first scan, try alternative test case
+ number placements */
+
if(sscanf(req->reqbuf, "CONNECT %" MAXDOCNAMELEN_TXT "s HTTP/%d.%d",
doc, &prot_major, &prot_minor) == 3) {
+ char *portp = NULL;
+ unsigned long part=0;
+
sprintf(logbuf, "Received a CONNECT %s HTTP/%d.%d request",
doc, prot_major, prot_minor);
logmsg("%s", logbuf);
+ req->connect_request = TRUE;
+
if(req->prot_version == 10)
req->open = FALSE; /* HTTP 1.0 closes connection by default */
- if(!strncmp(doc, "bad", 3))
- /* if the host name starts with bad, we fake an error here */
- req->testno = DOCNUMBER_BADCONNECT;
- else if(!strncmp(doc, "test", 4)) {
- /* if the host name starts with test, the port number used in the
- CONNECT line will be used as test number! */
- char *portp = strchr(doc, ':');
- if(portp)
- req->testno = atoi(portp+1);
+ if(doc[0] == '[') {
+ char *p = &doc[1];
+ /* scan through the hexgroups and store the value of the last group
+ in the 'part' variable and use as test case number!! */
+ while(*p && (ISXDIGIT(*p) || (*p == ':') || (*p == '.'))) {
+ char *endp;
+ part = strtoul(p, &endp, 16);
+ if(ISXDIGIT(*p))
+ p = endp;
+ else
+ p++;
+ }
+ if(*p != ']')
+ logmsg("Invalid CONNECT IPv6 address format");
+ else if (*(p+1) != ':')
+ logmsg("Invalid CONNECT IPv6 port format");
else
- req->testno = DOCNUMBER_CONNECT;
+ portp = p+1;
+
+ req->testno = part;
}
else
- req->testno = DOCNUMBER_CONNECT;
+ portp = strchr(doc, ':');
+
+ if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1))) {
+ unsigned long ulnum = strtoul(portp+1, NULL, 10);
+ if(!ulnum || (ulnum > 65535UL))
+ logmsg("Invalid CONNECT port received");
+ else
+ req->connect_port = curlx_ultous(ulnum);
+
+ }
+ logmsg("Port number: %d, test case number: %ld",
+ req->connect_port, req->testno);
}
- else {
+ }
+
+ if(req->testno == DOCNUMBER_NOTHING) {
+ /* Still no test case number. Try to get the the number off the last dot
+ instead, IE we consider the TLD to be the test number. Test 123 can
+ then be written as "example.com.123". */
+
+ /* find the last dot */
+ ptr = strrchr(doc, '.');
+
+ /* get the number after it */
+ if(ptr) {
+ ptr++; /* skip the dot */
+
+ req->testno = strtol(ptr, &ptr, 10);
+
+ if(req->testno > 10000) {
+ req->partno = req->testno % 10000;
+ req->testno /= 10000;
+
+ logmsg("found test %d in requested host name", req->testno);
+
+ }
+ else
+ req->partno = 0;
+
+ sprintf(logbuf, "Requested test number %ld part %ld (from host name)",
+ req->testno, req->partno);
+ logmsg("%s", logbuf);
+
+ }
+
+ if(!req->testno) {
logmsg("Did not find test number in PATH");
req->testno = DOCNUMBER_404;
}
+ else
+ parse_servercmd(req);
}
}
+ else if((req->offset >= 3) && (req->testno == DOCNUMBER_NOTHING)) {
+ logmsg("** Unusual request. Starts with %02x %02x %02x",
+ line[0], line[1], line[2]);
+ }
if(!end) {
/* we don't have a complete request yet! */
- logmsg("ProcessRequest returned without a complete request");
+ logmsg("request not complete yet");
return 0; /* not complete yet */
}
- logmsg("ProcessRequest found a complete request");
+ logmsg("- request found to be complete");
if(use_gopher) {
/* when using gopher we cannot check the request until the entire
@@ -549,9 +705,9 @@ static int ProcessRequest(struct httprequest *req)
while(*ptr && ISSPACE(*ptr))
ptr++;
endptr = ptr;
- SET_ERRNO(0);
+ errno = 0;
clen = strtoul(ptr, &endptr, 10);
- if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == ERRNO)) {
+ if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == errno)) {
/* this assumes that a zero Content-Length is valid */
logmsg("Found invalid Content-Length: (%s) in the request", ptr);
req->open = FALSE; /* closes connection */
@@ -615,10 +771,11 @@ static int ProcessRequest(struct httprequest *req)
req->ntlm = TRUE; /* NTLM found */
logmsg("Received NTLM type-1, sending back data %ld", req->partno);
}
- else if((req->partno >= 1000) && strstr(req->reqbuf, "Authorization: Basic")) {
- /* If the client is passing this Basic-header and the part number is already
- >=1000, we add 1 to the part number. This allows simple Basic authentication
- negotiation to work in the test suite. */
+ else if((req->partno >= 1000) &&
+ strstr(req->reqbuf, "Authorization: Basic")) {
+ /* If the client is passing this Basic-header and the part number is
+ already >=1000, we add 1 to the part number. This allows simple Basic
+ authentication negotiation to work in the test suite. */
req->partno += 1;
logmsg("Received Basic request, sending back data %ld", req->partno);
}
@@ -630,6 +787,7 @@ static int ProcessRequest(struct httprequest *req)
req->prot_version >= 11 &&
end &&
req->reqbuf + req->offset > end + strlen(end_of_headers) &&
+ !req->cl &&
(!strncmp(req->reqbuf, "GET", strlen("GET")) ||
!strncmp(req->reqbuf, "HEAD", strlen("HEAD")))) {
/* If we have a persistent connection, HTTP version >= 1.1
@@ -654,8 +812,16 @@ static int ProcessRequest(struct httprequest *req)
makes the server NOT wait for PUT/POST data and you can then make the
test case send a rejection before any such data has been sent. Test case
154 uses this.*/
- if(req->auth_req && !req->auth)
+ if(req->auth_req && !req->auth) {
+ logmsg("Return early due to auth requested by none provided");
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))
@@ -675,6 +841,7 @@ static void storerequest(char *reqbuf, size_t totalsize)
size_t written;
size_t writeleft;
FILE *dump;
+ const char *dumpfile=is_proxy?REQUEST_PROXY_DUMP:REQUEST_DUMP;
if (reqbuf == NULL)
return;
@@ -682,12 +849,12 @@ static void storerequest(char *reqbuf, size_t totalsize)
return;
do {
- dump = fopen(REQUEST_DUMP, "ab");
- } while ((dump == NULL) && ((error = ERRNO) == EINTR));
+ dump = fopen(dumpfile, "ab");
+ } while ((dump == NULL) && ((error = errno) == EINTR));
if (dump == NULL) {
- logmsg("Error opening file %s error: %d %s",
- REQUEST_DUMP, error, strerror(error));
- logmsg("Failed to write request input to " REQUEST_DUMP);
+ logmsg("[2] Error opening file %s error: %d %s",
+ dumpfile, error, strerror(error));
+ logmsg("Failed to write request input ");
return;
}
@@ -699,50 +866,39 @@ static void storerequest(char *reqbuf, size_t totalsize)
goto storerequest_cleanup;
if(written > 0)
writeleft -= written;
- } while ((writeleft > 0) && ((error = ERRNO) == EINTR));
+ } while ((writeleft > 0) && ((error = errno) == EINTR));
if(writeleft == 0)
- logmsg("Wrote request (%zu bytes) input to " REQUEST_DUMP, totalsize);
+ logmsg("Wrote request (%zu bytes) input to %s", totalsize, dumpfile);
else if(writeleft > 0) {
logmsg("Error writing file %s error: %d %s",
- REQUEST_DUMP, error, strerror(error));
+ dumpfile, error, strerror(error));
logmsg("Wrote only (%zu bytes) of (%zu bytes) request input to %s",
- totalsize-writeleft, totalsize, REQUEST_DUMP);
+ totalsize-writeleft, totalsize, dumpfile);
}
storerequest_cleanup:
do {
res = fclose(dump);
- } while(res && ((error = ERRNO) == EINTR));
+ } while(res && ((error = errno) == EINTR));
if(res)
logmsg("Error closing file %s error: %d %s",
- REQUEST_DUMP, error, strerror(error));
+ dumpfile, error, strerror(error));
}
-/* return 0 on success, non-zero on failure */
-static int get_request(curl_socket_t sock, struct httprequest *req)
+static void init_httprequest(struct httprequest *req)
{
- int error;
- int fail = 0;
- int done_processing = 0;
- char *reqbuf = req->reqbuf;
- ssize_t got = 0;
-
- char *pipereq = NULL;
- size_t pipereq_length = 0;
-
- if(req->pipelining) {
- pipereq = reqbuf + req->checkindex;
- pipereq_length = req->offset - req->checkindex;
+ /* Pipelining is already set, so do not initialize it here. Only initialize
+ checkindex and offset if pipelining is not set, since in a pipeline they
+ need to be inherited from the previous request. */
+ if(!req->pipelining) {
+ req->checkindex = 0;
+ req->offset = 0;
}
-
- /*** Init the httprequest structure properly for the upcoming request ***/
-
- req->checkindex = 0;
- req->offset = 0;
req->testno = DOCNUMBER_NOTHING;
req->partno = 0;
+ req->connect_request = FALSE;
req->open = TRUE;
req->auth_req = FALSE;
req->auth = FALSE;
@@ -754,33 +910,68 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
req->writedelay = 0;
req->rcmd = RCMD_NORMALREQ;
req->prot_version = 0;
- req->pipelining = FALSE;
+ req->callcount = 0;
+ req->connect_port = 0;
+ req->done_processing = 0;
+ req->upgrade = 0;
+ req->upgrade_request = 0;
+}
- /*** end of httprequest init ***/
+/* returns 1 if the connection should be serviced again immediately, 0 if there
+ is no data waiting, or < 0 if it should be closed */
+static int get_request(curl_socket_t sock, struct httprequest *req)
+{
+ int error;
+ int fail = 0;
+ char *reqbuf = req->reqbuf;
+ ssize_t got = 0;
+ int overflow = 0;
+
+ char *pipereq = NULL;
+ size_t pipereq_length = 0;
+
+ if(req->pipelining) {
+ pipereq = reqbuf + req->checkindex;
+ pipereq_length = req->offset - req->checkindex;
+
+ /* Now that we've got the pipelining info we can reset the
+ pipelining-related vars which were skipped in init_httprequest */
+ req->pipelining = FALSE;
+ req->checkindex = 0;
+ req->offset = 0;
+ }
- while(!done_processing && (req->offset < REQBUFSIZ-1)) {
+ if(req->offset >= REQBUFSIZ-1) {
+ /* buffer is already full; do nothing */
+ overflow = 1;
+ }
+ else {
if(pipereq_length && pipereq) {
memmove(reqbuf, pipereq, pipereq_length);
- got = pipereq_length;
+ got = curlx_uztosz(pipereq_length);
pipereq_length = 0;
}
else {
if(req->skip)
- /* we are instructed to not read the entire thing, so we make sure to only
- read what we're supposed to and NOT read the enire thing the client
- wants to send! */
+ /* we are instructed to not read the entire thing, so we make sure to
+ only read what we're supposed to and NOT read the enire thing the
+ client wants to send! */
got = sread(sock, reqbuf + req->offset, req->cl);
else
got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset);
}
if(got_exit_signal)
- return 1;
+ return -1;
if(got == 0) {
logmsg("Connection closed by client");
fail = 1;
}
else if(got < 0) {
error = SOCKERRNO;
+ if (EAGAIN == error || EWOULDBLOCK == error) {
+ /* nothing to read at the moment */
+ return 0;
+ }
logmsg("recv() returned error: (%d) %s", error, strerror(error));
fail = 1;
}
@@ -788,7 +979,7 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
/* dump the request received so far to the external file */
reqbuf[req->offset] = '\0';
storerequest(reqbuf, req->offset);
- return 1;
+ return -1;
}
logmsg("Read %zd bytes", got);
@@ -796,17 +987,17 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
req->offset += (size_t)got;
reqbuf[req->offset] = '\0';
- done_processing = ProcessRequest(req);
+ req->done_processing = ProcessRequest(req);
if(got_exit_signal)
- return 1;
- if(done_processing && req->pipe) {
+ return -1;
+ if(req->done_processing && req->pipe) {
logmsg("Waiting for another piped request");
- done_processing = 0;
+ req->done_processing = 0;
req->pipe--;
}
}
- if((req->offset == REQBUFSIZ-1) && (got > 0)) {
+ if(overflow || (req->offset == REQBUFSIZ-1 && got > 0)) {
logmsg("Request would overflow buffer, closing connection");
/* dump request received so far to external file anyway */
reqbuf[REQBUFSIZ-1] = '\0';
@@ -821,12 +1012,13 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
else
reqbuf[req->offset] = '\0';
- /* dump the request to an external file */
- storerequest(reqbuf, req->pipelining ? req->checkindex : req->offset);
+ /* at the end of a request dump it to an external file */
+ if (fail || req->done_processing)
+ storerequest(reqbuf, req->pipelining ? req->checkindex : req->offset);
if(got_exit_signal)
- return 1;
+ return -1;
- return fail; /* return 0 on success */
+ return fail ? -1 : 1;
}
/* returns -1 on failure */
@@ -845,13 +1037,9 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
size_t responsesize;
int error = 0;
int res;
-
+ const char *responsedump = is_proxy?RESPONSE_PROXY_DUMP:RESPONSE_DUMP;
static char weare[256];
- char partbuf[80]="data";
-
- logmsg("Send response number %ld part %ld", req->testno, req->partno);
-
switch(req->rcmd) {
default:
case RCMD_NORMALREQ:
@@ -897,17 +1085,6 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
msglen, msgbuf);
buffer = weare;
break;
- case DOCNUMBER_INTERNAL:
- logmsg("Bailing out due to internal error");
- return -1;
- case DOCNUMBER_CONNECT:
- logmsg("Replying to CONNECT");
- buffer = docconnect;
- break;
- case DOCNUMBER_BADCONNECT:
- logmsg("Replying to a bad CONNECT");
- buffer = docbadconnect;
- break;
case DOCNUMBER_404:
default:
logmsg("Replying to with a 404");
@@ -918,17 +1095,25 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
count = strlen(buffer);
}
else {
+ char partbuf[80];
char *filename = test2file(req->testno);
- if(0 != req->partno)
- sprintf(partbuf, "data%ld", req->partno);
+ /* select the <data> tag for "normal" requests and the <connect> one
+ for CONNECT requests (within the <reply> section) */
+ const char *section= req->connect_request?"connect":"data";
+
+ if(req->partno)
+ sprintf(partbuf, "%s%ld", section, req->partno);
+ else
+ sprintf(partbuf, "%s", section);
+
+ logmsg("Send response test%ld section <%s>", req->testno, partbuf);
stream=fopen(filename, "rb");
if(!stream) {
- error = ERRNO;
+ error = errno;
logmsg("fopen() failed with error: %d %s", error, strerror(error));
- logmsg("Error opening file: %s", filename);
- logmsg("Couldn't open test file");
+ logmsg(" [3] Error opening file: %s", filename);
return 0;
}
else {
@@ -942,20 +1127,17 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
}
if(got_exit_signal) {
- if(ptr)
- free(ptr);
+ free(ptr);
return -1;
}
/* re-open the same file again */
stream=fopen(filename, "rb");
if(!stream) {
- error = ERRNO;
+ error = errno;
logmsg("fopen() failed with error: %d %s", error, strerror(error));
- logmsg("Error opening file: %s", filename);
- logmsg("Couldn't open test file");
- if(ptr)
- free(ptr);
+ logmsg(" [4] Error opening file: %s", filename);
+ free(ptr);
return 0;
}
else {
@@ -964,18 +1146,15 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
fclose(stream);
if(error) {
logmsg("getpart() failed with error: %d", error);
- if(ptr)
- free(ptr);
+ free(ptr);
return 0;
}
}
}
if(got_exit_signal) {
- if(ptr)
- free(ptr);
- if(cmd)
- free(cmd);
+ free(ptr);
+ free(cmd);
return -1;
}
@@ -993,16 +1172,13 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
else
prevbounce = FALSE;
- dump = fopen(RESPONSE_DUMP, "ab");
+ dump = fopen(responsedump, "ab");
if(!dump) {
- error = ERRNO;
+ error = errno;
logmsg("fopen() failed with error: %d %s", error, strerror(error));
- logmsg("Error opening file: %s", RESPONSE_DUMP);
- logmsg("couldn't create logfile: " RESPONSE_DUMP);
- if(ptr)
- free(ptr);
- if(cmd)
- free(cmd);
+ logmsg(" [5] Error opening file: %s", responsedump);
+ free(ptr);
+ free(cmd);
return -1;
}
@@ -1022,49 +1198,46 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
else {
logmsg("Sent off %zd bytes", written);
}
- if (req->writedelay) {
- logmsg("Pausing %d seconds", req->writedelay);
- sleep(req->writedelay);
- }
/* write to file as well */
fwrite(buffer, 1, (size_t)written, dump);
- if(got_exit_signal)
- break;
count -= written;
buffer += written;
- } while(count>0);
+
+ if(req->writedelay) {
+ int quarters = req->writedelay * 4;
+ logmsg("Pausing %d seconds", req->writedelay);
+ while((quarters > 0) && !got_exit_signal) {
+ quarters--;
+ wait_ms(250);
+ }
+ }
+ } while((count > 0) && !got_exit_signal);
do {
res = fclose(dump);
- } while(res && ((error = ERRNO) == EINTR));
+ } while(res && ((error = errno) == EINTR));
if(res)
logmsg("Error closing file %s error: %d %s",
- RESPONSE_DUMP, error, strerror(error));
+ responsedump, error, strerror(error));
if(got_exit_signal) {
- if(ptr)
- free(ptr);
- if(cmd)
- free(cmd);
+ free(ptr);
+ free(cmd);
return -1;
}
if(sendfailure) {
logmsg("Sending response failed. Only (%zu bytes) of (%zu bytes) were sent",
responsesize-count, responsesize);
- if(ptr)
- free(ptr);
- if(cmd)
- free(cmd);
+ free(ptr);
+ free(cmd);
return -1;
}
- logmsg("Response sent (%zu bytes) and written to " RESPONSE_DUMP,
- responsesize);
-
- if(ptr)
- free(ptr);
+ logmsg("Response sent (%zu bytes) and written to %s",
+ responsesize, responsedump);
+ free(ptr);
if(cmdsize > 0 ) {
char command[32];
@@ -1076,14 +1249,12 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
if(!strcmp("wait", command)) {
logmsg("Told to sleep for %d seconds", num);
quarters = num * 4;
- while(quarters > 0) {
+ while((quarters > 0) && !got_exit_signal) {
quarters--;
res = wait_ms(250);
- if(got_exit_signal)
- break;
if(res) {
/* should not happen */
- error = SOCKERRNO;
+ error = errno;
logmsg("wait_ms() failed with error: (%d) %s",
error, strerror(error));
break;
@@ -1102,9 +1273,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
ptr = NULL;
} while(ptr && *ptr);
}
- if(cmd)
- free(cmd);
-
+ free(cmd);
req->open = use_gopher?FALSE:persistant;
prevtestno = req->testno;
@@ -1113,42 +1282,696 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
return 0;
}
-
-int main(int argc, char *argv[])
+static curl_socket_t connect_to(const char *ipaddr, unsigned short port)
{
- struct sockaddr_in me;
+ srvr_sockaddr_union_t serveraddr;
+ curl_socket_t serverfd;
+ int error;
+ int rc = 0;
+ const char *op_br = "";
+ const char *cl_br = "";
+
+#ifdef ENABLE_IPV6
+ if(socket_domain == AF_INET6) {
+ op_br = "[";
+ cl_br = "]";
+ }
+#endif
+
+ if(!ipaddr)
+ return CURL_SOCKET_BAD;
+
+ logmsg("about to connect to %s%s%s:%hu",
+ op_br, ipaddr, cl_br, port);
+
+
+ serverfd = socket(socket_domain, SOCK_STREAM, 0);
+ if(CURL_SOCKET_BAD == serverfd) {
+ error = SOCKERRNO;
+ logmsg("Error creating socket for server conection: (%d) %s",
+ error, strerror(error));
+ return CURL_SOCKET_BAD;
+ }
+
+#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");
+ }
+#endif
+
+ switch(socket_domain) {
+ case AF_INET:
+ memset(&serveraddr.sa4, 0, sizeof(serveraddr.sa4));
+ serveraddr.sa4.sin_family = AF_INET;
+ serveraddr.sa4.sin_port = htons(port);
+ if(Curl_inet_pton(AF_INET, ipaddr, &serveraddr.sa4.sin_addr) < 1) {
+ logmsg("Error inet_pton failed AF_INET conversion of '%s'", ipaddr);
+ sclose(serverfd);
+ return CURL_SOCKET_BAD;
+ }
+
+ rc = connect(serverfd, &serveraddr.sa, sizeof(serveraddr.sa4));
+ break;
#ifdef ENABLE_IPV6
- struct sockaddr_in6 me6;
+ case AF_INET6:
+ memset(&serveraddr.sa6, 0, sizeof(serveraddr.sa6));
+ serveraddr.sa6.sin6_family = AF_INET6;
+ serveraddr.sa6.sin6_port = htons(port);
+ if(Curl_inet_pton(AF_INET6, ipaddr, &serveraddr.sa6.sin6_addr) < 1) {
+ logmsg("Error inet_pton failed AF_INET6 conversion of '%s'", ipaddr);
+ sclose(serverfd);
+ return CURL_SOCKET_BAD;
+ }
+
+ rc = connect(serverfd, &serveraddr.sa, sizeof(serveraddr.sa6));
+ break;
#endif /* ENABLE_IPV6 */
- curl_socket_t sock = CURL_SOCKET_BAD;
+#ifdef USE_UNIX_SOCKETS
+ case AF_UNIX:
+ logmsg("Proxying through Unix socket is not (yet?) supported.");
+ return CURL_SOCKET_BAD;
+#endif /* USE_UNIX_SOCKETS */
+ }
+
+ if(got_exit_signal) {
+ sclose(serverfd);
+ return CURL_SOCKET_BAD;
+ }
+
+ if(rc) {
+ error = SOCKERRNO;
+ logmsg("Error connecting to server port %hu: (%d) %s",
+ port, error, strerror(error));
+ sclose(serverfd);
+ return CURL_SOCKET_BAD;
+ }
+
+ logmsg("connected fine to %s%s%s:%hu, now tunnel",
+ op_br, ipaddr, cl_br, port);
+
+ return serverfd;
+}
+
+/*
+ * A CONNECT has been received, a CONNECT response has been sent.
+ *
+ * This function needs to connect to the server, and then pass data between
+ * the client and the server back and forth until the connection is closed by
+ * either end.
+ *
+ * When doing FTP through a CONNECT proxy, we expect that the data connection
+ * will be setup while the first connect is still being kept up. Therefor we
+ * must accept a new connection and deal with it appropriately.
+ */
+
+#define data_or_ctrl(x) ((x)?"DATA":"CTRL")
+
+#define CTRL 0
+#define DATA 1
+
+static void http_connect(curl_socket_t *infdp,
+ curl_socket_t rootfd,
+ const char *ipaddr,
+ unsigned short ipport)
+{
+ curl_socket_t serverfd[2] = {CURL_SOCKET_BAD, CURL_SOCKET_BAD};
+ curl_socket_t clientfd[2] = {CURL_SOCKET_BAD, CURL_SOCKET_BAD};
+ ssize_t toc[2] = {0, 0}; /* number of bytes to client */
+ ssize_t tos[2] = {0, 0}; /* number of bytes to server */
+ char readclient[2][256];
+ char readserver[2][256];
+ bool poll_client_rd[2] = { TRUE, TRUE };
+ bool poll_server_rd[2] = { TRUE, TRUE };
+ bool poll_client_wr[2] = { TRUE, TRUE };
+ bool poll_server_wr[2] = { TRUE, TRUE };
+ bool primary = FALSE;
+ bool secondary = FALSE;
+ int max_tunnel_idx; /* CTRL or DATA */
+ int loop;
+ int i;
+ int timeout_count=0;
+
+ /* primary tunnel client endpoint already connected */
+ clientfd[CTRL] = *infdp;
+
+ /* Sleep here to make sure the client reads CONNECT response's
+ 'end of headers' separate from the server data that follows.
+ This is done to prevent triggering libcurl known bug #39. */
+ for(loop = 2; (loop > 0) && !got_exit_signal; loop--)
+ wait_ms(250);
+ if(got_exit_signal)
+ goto http_connect_cleanup;
+
+ serverfd[CTRL] = connect_to(ipaddr, ipport);
+ if(serverfd[CTRL] == CURL_SOCKET_BAD)
+ goto http_connect_cleanup;
+
+ /* Primary tunnel socket endpoints are now connected. Tunnel data back and
+ forth over the primary tunnel until client or server breaks the primary
+ tunnel, simultaneously allowing establishment, operation and teardown of
+ a secondary tunnel that may be used for passive FTP data connection. */
+
+ max_tunnel_idx = CTRL;
+ primary = TRUE;
+
+ while(!got_exit_signal) {
+
+ fd_set input;
+ fd_set output;
+ struct timeval timeout = {1, 0}; /* 1000 ms */
+ ssize_t rc;
+ curl_socket_t maxfd = (curl_socket_t)-1;
+
+ FD_ZERO(&input);
+ FD_ZERO(&output);
+
+ if((clientfd[DATA] == CURL_SOCKET_BAD) &&
+ (serverfd[DATA] == CURL_SOCKET_BAD) &&
+ poll_client_rd[CTRL] && poll_client_wr[CTRL] &&
+ poll_server_rd[CTRL] && poll_server_wr[CTRL]) {
+ /* listener socket is monitored to allow client to establish
+ secondary tunnel only when this tunnel is not established
+ and primary one is fully operational */
+ FD_SET(rootfd, &input);
+ maxfd = rootfd;
+ }
+
+ /* set tunnel sockets to wait for */
+ for(i = 0; i <= max_tunnel_idx; i++) {
+ /* client side socket monitoring */
+ if(clientfd[i] != CURL_SOCKET_BAD) {
+ if(poll_client_rd[i]) {
+ /* unless told not to do so, monitor readability */
+ FD_SET(clientfd[i], &input);
+ if(clientfd[i] > maxfd)
+ maxfd = clientfd[i];
+ }
+ if(poll_client_wr[i] && toc[i]) {
+ /* unless told not to do so, monitor writeability
+ if there is data ready to be sent to client */
+ FD_SET(clientfd[i], &output);
+ if(clientfd[i] > maxfd)
+ maxfd = clientfd[i];
+ }
+ }
+ /* server side socket monitoring */
+ if(serverfd[i] != CURL_SOCKET_BAD) {
+ if(poll_server_rd[i]) {
+ /* unless told not to do so, monitor readability */
+ FD_SET(serverfd[i], &input);
+ if(serverfd[i] > maxfd)
+ maxfd = serverfd[i];
+ }
+ if(poll_server_wr[i] && tos[i]) {
+ /* unless told not to do so, monitor writeability
+ if there is data ready to be sent to server */
+ FD_SET(serverfd[i], &output);
+ if(serverfd[i] > maxfd)
+ maxfd = serverfd[i];
+ }
+ }
+ }
+ if(got_exit_signal)
+ break;
+
+ rc = select((int)maxfd + 1, &input, &output, NULL, &timeout);
+
+ if(rc > 0) {
+ /* socket action */
+ bool tcp_fin_wr;
+ timeout_count=0;
+
+ if(got_exit_signal)
+ break;
+
+ tcp_fin_wr = FALSE;
+
+ /* ---------------------------------------------------------- */
+
+ /* passive mode FTP may establish a secondary tunnel */
+ if((clientfd[DATA] == CURL_SOCKET_BAD) &&
+ (serverfd[DATA] == CURL_SOCKET_BAD) && FD_ISSET(rootfd, &input)) {
+ /* a new connection on listener socket (most likely from client) */
+ curl_socket_t datafd = accept(rootfd, NULL, NULL);
+ if(datafd != CURL_SOCKET_BAD) {
+ struct httprequest req2;
+ int err = 0;
+ 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");
+ }
+#endif
+ req2.pipelining = FALSE;
+ init_httprequest(&req2);
+ while(!req2.done_processing) {
+ err = get_request(datafd, &req2);
+ if(err < 0) {
+ /* this socket must be closed, done or not */
+ break;
+ }
+ }
+
+ /* skip this and close the socket if err < 0 */
+ if(err >= 0) {
+ err = send_doc(datafd, &req2);
+ if(!err && req2.connect_request) {
+ /* sleep to prevent triggering libcurl known bug #39. */
+ for(loop = 2; (loop > 0) && !got_exit_signal; loop--)
+ wait_ms(250);
+ if(!got_exit_signal) {
+ /* connect to the server */
+ serverfd[DATA] = connect_to(ipaddr, req2.connect_port);
+ if(serverfd[DATA] != CURL_SOCKET_BAD) {
+ /* secondary tunnel established, now we have two connections */
+ poll_client_rd[DATA] = TRUE;
+ poll_client_wr[DATA] = TRUE;
+ poll_server_rd[DATA] = TRUE;
+ poll_server_wr[DATA] = TRUE;
+ max_tunnel_idx = DATA;
+ secondary = TRUE;
+ toc[DATA] = 0;
+ tos[DATA] = 0;
+ clientfd[DATA] = datafd;
+ datafd = CURL_SOCKET_BAD;
+ }
+ }
+ }
+ }
+ if(datafd != CURL_SOCKET_BAD) {
+ /* secondary tunnel not established */
+ shutdown(datafd, SHUT_RDWR);
+ sclose(datafd);
+ }
+ }
+ if(got_exit_signal)
+ break;
+ }
+
+ /* ---------------------------------------------------------- */
+
+ /* react to tunnel endpoint readable/writeable notifications */
+ for(i = 0; i <= max_tunnel_idx; i++) {
+ size_t len;
+ if(clientfd[i] != CURL_SOCKET_BAD) {
+ len = sizeof(readclient[i]) - tos[i];
+ if(len && FD_ISSET(clientfd[i], &input)) {
+ /* read from client */
+ rc = sread(clientfd[i], &readclient[i][tos[i]], len);
+ if(rc <= 0) {
+ logmsg("[%s] got %zd, STOP READING client", data_or_ctrl(i), rc);
+ shutdown(clientfd[i], SHUT_RD);
+ poll_client_rd[i] = FALSE;
+ }
+ else {
+ logmsg("[%s] READ %zd bytes from client", data_or_ctrl(i), rc);
+ logmsg("[%s] READ \"%s\"", data_or_ctrl(i),
+ data_to_hex(&readclient[i][tos[i]], rc));
+ tos[i] += rc;
+ }
+ }
+ }
+ if(serverfd[i] != CURL_SOCKET_BAD) {
+ len = sizeof(readserver[i])-toc[i];
+ if(len && FD_ISSET(serverfd[i], &input)) {
+ /* read from server */
+ rc = sread(serverfd[i], &readserver[i][toc[i]], len);
+ if(rc <= 0) {
+ logmsg("[%s] got %zd, STOP READING server", data_or_ctrl(i), rc);
+ shutdown(serverfd[i], SHUT_RD);
+ poll_server_rd[i] = FALSE;
+ }
+ else {
+ logmsg("[%s] READ %zd bytes from server", data_or_ctrl(i), rc);
+ logmsg("[%s] READ \"%s\"", data_or_ctrl(i),
+ data_to_hex(&readserver[i][toc[i]], rc));
+ toc[i] += rc;
+ }
+ }
+ }
+ if(clientfd[i] != CURL_SOCKET_BAD) {
+ if(toc[i] && FD_ISSET(clientfd[i], &output)) {
+ /* write to client */
+ rc = swrite(clientfd[i], readserver[i], toc[i]);
+ if(rc <= 0) {
+ logmsg("[%s] got %zd, STOP WRITING client", data_or_ctrl(i), rc);
+ shutdown(clientfd[i], SHUT_WR);
+ poll_client_wr[i] = FALSE;
+ tcp_fin_wr = TRUE;
+ }
+ else {
+ logmsg("[%s] SENT %zd bytes to client", data_or_ctrl(i), rc);
+ logmsg("[%s] SENT \"%s\"", data_or_ctrl(i),
+ data_to_hex(readserver[i], rc));
+ if(toc[i] - rc)
+ memmove(&readserver[i][0], &readserver[i][rc], toc[i]-rc);
+ toc[i] -= rc;
+ }
+ }
+ }
+ if(serverfd[i] != CURL_SOCKET_BAD) {
+ if(tos[i] && FD_ISSET(serverfd[i], &output)) {
+ /* write to server */
+ rc = swrite(serverfd[i], readclient[i], tos[i]);
+ if(rc <= 0) {
+ logmsg("[%s] got %zd, STOP WRITING server", data_or_ctrl(i), rc);
+ shutdown(serverfd[i], SHUT_WR);
+ poll_server_wr[i] = FALSE;
+ tcp_fin_wr = TRUE;
+ }
+ else {
+ logmsg("[%s] SENT %zd bytes to server", data_or_ctrl(i), rc);
+ logmsg("[%s] SENT \"%s\"", data_or_ctrl(i),
+ data_to_hex(readclient[i], rc));
+ if(tos[i] - rc)
+ memmove(&readclient[i][0], &readclient[i][rc], tos[i]-rc);
+ tos[i] -= rc;
+ }
+ }
+ }
+ }
+ if(got_exit_signal)
+ break;
+
+ /* ---------------------------------------------------------- */
+
+ /* endpoint read/write disabling, endpoint closing and tunnel teardown */
+ for(i = 0; i <= max_tunnel_idx; i++) {
+ for(loop = 2; loop > 0; loop--) {
+ /* loop twice to satisfy condition interdependencies without
+ having to await select timeout or another socket event */
+ if(clientfd[i] != CURL_SOCKET_BAD) {
+ if(poll_client_rd[i] && !poll_server_wr[i]) {
+ logmsg("[%s] DISABLED READING client", data_or_ctrl(i));
+ shutdown(clientfd[i], SHUT_RD);
+ poll_client_rd[i] = FALSE;
+ }
+ if(poll_client_wr[i] && !poll_server_rd[i] && !toc[i]) {
+ logmsg("[%s] DISABLED WRITING client", data_or_ctrl(i));
+ shutdown(clientfd[i], SHUT_WR);
+ poll_client_wr[i] = FALSE;
+ tcp_fin_wr = TRUE;
+ }
+ }
+ if(serverfd[i] != CURL_SOCKET_BAD) {
+ if(poll_server_rd[i] && !poll_client_wr[i]) {
+ logmsg("[%s] DISABLED READING server", data_or_ctrl(i));
+ shutdown(serverfd[i], SHUT_RD);
+ poll_server_rd[i] = FALSE;
+ }
+ if(poll_server_wr[i] && !poll_client_rd[i] && !tos[i]) {
+ logmsg("[%s] DISABLED WRITING server", data_or_ctrl(i));
+ shutdown(serverfd[i], SHUT_WR);
+ poll_server_wr[i] = FALSE;
+ tcp_fin_wr = TRUE;
+ }
+ }
+ }
+ }
+
+ if(tcp_fin_wr)
+ /* allow kernel to place FIN bit packet on the wire */
+ wait_ms(250);
+
+ /* socket clearing */
+ for(i = 0; i <= max_tunnel_idx; i++) {
+ for(loop = 2; loop > 0; loop--) {
+ if(clientfd[i] != CURL_SOCKET_BAD) {
+ if(!poll_client_wr[i] && !poll_client_rd[i]) {
+ logmsg("[%s] CLOSING client socket", data_or_ctrl(i));
+ sclose(clientfd[i]);
+ clientfd[i] = CURL_SOCKET_BAD;
+ if(serverfd[i] == CURL_SOCKET_BAD) {
+ logmsg("[%s] ENDING", data_or_ctrl(i));
+ if(i == DATA)
+ secondary = FALSE;
+ else
+ primary = FALSE;
+ }
+ }
+ }
+ if(serverfd[i] != CURL_SOCKET_BAD) {
+ if(!poll_server_wr[i] && !poll_server_rd[i]) {
+ logmsg("[%s] CLOSING server socket", data_or_ctrl(i));
+ sclose(serverfd[i]);
+ serverfd[i] = CURL_SOCKET_BAD;
+ if(clientfd[i] == CURL_SOCKET_BAD) {
+ logmsg("[%s] ENDING", data_or_ctrl(i));
+ if(i == DATA)
+ secondary = FALSE;
+ else
+ primary = FALSE;
+ }
+ }
+ }
+ }
+ }
+
+ /* ---------------------------------------------------------- */
+
+ max_tunnel_idx = secondary ? DATA : CTRL;
+
+ if(!primary)
+ /* exit loop upon primary tunnel teardown */
+ break;
+
+ } /* (rc > 0) */
+ else {
+ timeout_count++;
+ if(timeout_count > 5) {
+ logmsg("CONNECT proxy timeout after %d idle seconds!", timeout_count);
+ break;
+ }
+ }
+ }
+
+http_connect_cleanup:
+
+ for(i = DATA; i >= CTRL; i--) {
+ if(serverfd[i] != CURL_SOCKET_BAD) {
+ logmsg("[%s] CLOSING server socket (cleanup)", data_or_ctrl(i));
+ shutdown(serverfd[i], SHUT_RDWR);
+ sclose(serverfd[i]);
+ }
+ if(clientfd[i] != CURL_SOCKET_BAD) {
+ logmsg("[%s] CLOSING client socket (cleanup)", data_or_ctrl(i));
+ shutdown(clientfd[i], SHUT_RDWR);
+ sclose(clientfd[i]);
+ }
+ if((serverfd[i] != CURL_SOCKET_BAD) ||
+ (clientfd[i] != CURL_SOCKET_BAD)) {
+ logmsg("[%s] ABORTING", data_or_ctrl(i));
+ }
+ }
+
+ *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)
+{
curl_socket_t msgsock = CURL_SOCKET_BAD;
+ int error;
+ int flag = 1;
+
+ if(MAX_SOCKETS == num_sockets) {
+ logmsg("Too many open sockets!");
+ return CURL_SOCKET_BAD;
+ }
+
+ msgsock = accept(sock, NULL, NULL);
+
+ if(got_exit_signal) {
+ if(CURL_SOCKET_BAD != msgsock)
+ sclose(msgsock);
+ return CURL_SOCKET_BAD;
+ }
+
+ if(CURL_SOCKET_BAD == msgsock) {
+ error = SOCKERRNO;
+ if(EAGAIN == error || EWOULDBLOCK == error) {
+ /* nothing to accept */
+ return 0;
+ }
+ logmsg("MAJOR ERROR: accept() failed with error: (%d) %s",
+ error, strerror(error));
+ return CURL_SOCKET_BAD;
+ }
+
+ if(0 != curlx_nonblock(msgsock, TRUE)) {
+ error = SOCKERRNO;
+ logmsg("curlx_nonblock failed with error: (%d) %s",
+ error, strerror(error));
+ sclose(msgsock);
+ return CURL_SOCKET_BAD;
+ }
+
+ if(0 != setsockopt(msgsock, SOL_SOCKET, SO_KEEPALIVE,
+ (void *)&flag, sizeof(flag))) {
+ error = SOCKERRNO;
+ logmsg("setsockopt(SO_KEEPALIVE) failed with error: (%d) %s",
+ error, strerror(error));
+ sclose(msgsock);
+ return CURL_SOCKET_BAD;
+ }
+
+ /*
+ ** As soon as this server accepts a connection from the test harness it
+ ** must set the server logs advisor read lock to indicate that server
+ ** logs should not be read until this lock is removed by this server.
+ */
+
+ if(!serverlogslocked)
+ set_advisor_read_lock(SERVERLOGS_LOCK);
+ serverlogslocked += 1;
+
+ logmsg("====> Client connect");
+
+ all_sockets[num_sockets] = msgsock;
+ 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");
+ }
+#endif
+
+ return msgsock;
+}
+
+/* returns 1 if the connection should be serviced again immediately, 0 if there
+ is no data waiting, or < 0 if it should be closed */
+static int service_connection(curl_socket_t msgsock, struct httprequest *req,
+ curl_socket_t listensock,
+ const char *connecthost)
+{
+ if(got_exit_signal)
+ return -1;
+
+ while(!req->done_processing) {
+ int rc = get_request(msgsock, req);
+ if (rc <= 0) {
+ /* Nothing further to read now (possibly because the socket was closed */
+ return rc;
+ }
+ }
+
+ if(prevbounce) {
+ /* bounce treatment requested */
+ if((req->testno == prevtestno) &&
+ (req->partno == prevpartno)) {
+ req->partno++;
+ logmsg("BOUNCE part number to %ld", req->partno);
+ }
+ else {
+ prevbounce = FALSE;
+ prevtestno = -1;
+ prevpartno = -1;
+ }
+ }
+
+ send_doc(msgsock, req);
+ if(got_exit_signal)
+ return -1;
+
+ if(req->testno < 0) {
+ logmsg("special request received, no persistency");
+ return -1;
+ }
+ if(!req->open) {
+ logmsg("instructed to close connection after server-reply");
+ return -1;
+ }
+
+ if(req->connect_request) {
+ /* a CONNECT request, setup and talk the tunnel */
+ if(!is_proxy) {
+ logmsg("received CONNECT but isn't running as proxy!");
+ return 1;
+ }
+ else {
+ http_connect(&msgsock, listensock, connecthost, req->connect_port);
+ return -1;
+ }
+ }
+
+ 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) {
+ logmsg("=> persistant connection request ended, awaits new request\n");
+ return 1;
+ }
+
+ return -1;
+}
+
+int main(int argc, char *argv[])
+{
+ srvr_sockaddr_union_t me;
+ curl_socket_t sock = CURL_SOCKET_BAD;
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;
+ int rc = 0;
int error;
int arg=1;
long pid;
-#ifdef CURL_SWS_FORK_ENABLED
- bool use_fork = FALSE;
-#endif
+ 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;
+
+ memset(&req, 0, sizeof(req));
while(argc>arg) {
if(!strcmp("--version", argv[arg])) {
- printf("sws IPv4%s"
-#ifdef CURL_SWS_FORK_ENABLED
- " FORK"
-#endif
- "\n"
- ,
+ puts("sws IPv4"
#ifdef ENABLE_IPV6
"/IPv6"
-#else
- ""
#endif
- );
+#ifdef USE_UNIX_SOCKETS
+ "/unix"
+#endif
+ );
return 0;
}
else if(!strcmp("--pidfile", argv[arg])) {
@@ -1167,25 +1990,36 @@ int main(int argc, char *argv[])
end_of_headers = "\r\n"; /* gopher style is much simpler */
}
else if(!strcmp("--ipv4", argv[arg])) {
-#ifdef ENABLE_IPV6
- ipv_inuse = "IPv4";
- use_ipv6 = FALSE;
-#endif
+ socket_type = "IPv4";
+ socket_domain = AF_INET;
+ location_str = port_str;
arg++;
}
else if(!strcmp("--ipv6", argv[arg])) {
#ifdef ENABLE_IPV6
- ipv_inuse = "IPv6";
- use_ipv6 = TRUE;
+ socket_type = "IPv6";
+ socket_domain = AF_INET6;
+ location_str = port_str;
#endif
arg++;
}
-#ifdef CURL_SWS_FORK_ENABLED
- else if(!strcmp("--fork", argv[arg])) {
- use_fork=TRUE;
+ 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) {
@@ -1208,6 +2042,18 @@ int main(int argc, char *argv[])
arg++;
}
}
+ else if(!strcmp("--connect", argv[arg])) {
+ /* The connect host IP number that the proxy will connect to no matter
+ what the client asks for, but also use this as a hint that we run as
+ a proxy and do a few different internal choices */
+ arg++;
+ if(argc>arg) {
+ connecthost = argv[arg];
+ arg++;
+ is_proxy = TRUE;
+ logmsg("Run as proxy, CONNECT to host %s", connecthost);
+ }
+ }
else {
puts("Usage: sws [option]\n"
" --version\n"
@@ -1215,14 +2061,17 @@ int main(int argc, char *argv[])
" --pidfile [file]\n"
" --ipv4\n"
" --ipv6\n"
+ " --unix-socket [file]\n"
" --port [port]\n"
" --srcdir [path]\n"
- " --gopher\n"
- " --fork");
+ " --connect [ip4-addr]\n"
+ " --gopher");
return 0;
}
}
+ snprintf(port_str, sizeof(port_str), "port %hu", port);
+
#ifdef WIN32
win32_init();
atexit(win32_cleanup);
@@ -1232,14 +2081,10 @@ int main(int argc, char *argv[])
pid = (long)getpid();
-#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
+ sock = socket(socket_domain, SOCK_STREAM, 0);
+
+ all_sockets[0] = sock;
+ num_sockets = 1;
if(CURL_SOCKET_BAD == sock) {
error = SOCKERRNO;
@@ -1249,41 +2094,97 @@ int main(int argc, char *argv[])
}
flag = 1;
- if (0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
- (void *)&flag, sizeof(flag))) {
+ if(0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
+ (void *)&flag, sizeof(flag))) {
error = SOCKERRNO;
logmsg("setsockopt(SO_REUSEADDR) failed with error: (%d) %s",
error, strerror(error));
goto sws_cleanup;
}
+ if(0 != curlx_nonblock(sock, TRUE)) {
+ error = SOCKERRNO;
+ logmsg("curlx_nonblock failed with error: (%d) %s",
+ error, strerror(error));
+ goto sws_cleanup;
+ }
+ switch(socket_domain) {
+ case AF_INET:
+ 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
- if(!use_ipv6) {
-#endif
- memset(&me, 0, sizeof(me));
- me.sin_family = AF_INET;
- me.sin_addr.s_addr = INADDR_ANY;
- me.sin_port = htons(port);
- rc = bind(sock, (struct sockaddr *) &me, sizeof(me));
-#ifdef ENABLE_IPV6
- }
- else {
- memset(&me6, 0, sizeof(me6));
- me6.sin6_family = AF_INET6;
- me6.sin6_addr = in6addr_any;
- me6.sin6_port = htons(port);
- rc = bind(sock, (struct sockaddr *) &me6, sizeof(me6));
- }
+ case AF_INET6:
+ 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 */
+ }
if(0 != rc) {
error = SOCKERRNO;
- logmsg("Error binding socket on port %hu: (%d) %s",
- port, error, strerror(error));
+ logmsg("Error binding socket on %s: (%d) %s",
+ location_str, error, strerror(error));
goto sws_cleanup;
}
- logmsg("Running %s %s version on port %d",
- use_gopher?"GOPHER":"HTTP", ipv_inuse, (int)port);
+ logmsg("Running %s %s version on %s",
+ use_gopher?"GOPHER":"HTTP", socket_type, location_str);
/* start accepting connections */
rc = listen(sock, 5);
@@ -1294,6 +2195,11 @@ 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.
@@ -1303,131 +2209,144 @@ int main(int argc, char *argv[])
if(!wrotepidfile)
goto sws_cleanup;
- for (;;) {
- msgsock = accept(sock, NULL, NULL);
+ /* initialization of httprequest struct is done before get_request(), but
+ the pipelining struct field must be initialized previously to FALSE
+ every time a new connection arrives. */
+
+ req.pipelining = FALSE;
+ init_httprequest(&req);
+
+ for(;;) {
+ fd_set input;
+ fd_set output;
+ struct timeval timeout = {0, 250000L}; /* 250 ms */
+ curl_socket_t maxfd = (curl_socket_t)-1;
+
+ /* Clear out closed sockets */
+ for (socket_idx = num_sockets - 1; socket_idx >= 1; --socket_idx) {
+ if (CURL_SOCKET_BAD == all_sockets[socket_idx]) {
+ char* dst = (char *) (all_sockets + socket_idx);
+ char* src = (char *) (all_sockets + socket_idx + 1);
+ char* end = (char *) (all_sockets + num_sockets);
+ memmove(dst, src, end - src);
+ num_sockets -= 1;
+ }
+ }
if(got_exit_signal)
- break;
- if (CURL_SOCKET_BAD == msgsock) {
+ goto sws_cleanup;
+
+ /* Set up for select*/
+ FD_ZERO(&input);
+ FD_ZERO(&output);
+
+ for (socket_idx = 0; socket_idx < num_sockets; ++socket_idx) {
+ /* Listen on all sockets */
+ FD_SET(all_sockets[socket_idx], &input);
+ if(all_sockets[socket_idx] > maxfd)
+ maxfd = all_sockets[socket_idx];
+ }
+
+ if(got_exit_signal)
+ goto sws_cleanup;
+
+ rc = select((int)maxfd + 1, &input, &output, NULL, &timeout);
+ if (rc < 0) {
error = SOCKERRNO;
- logmsg("MAJOR ERROR: accept() failed with error: (%d) %s",
+ logmsg("select() failed with error: (%d) %s",
error, strerror(error));
- break;
+ goto sws_cleanup;
}
- /*
- ** As soon as this server acepts a connection from the test harness it
- ** must set the server logs advisor read lock to indicate that server
- ** logs should not be read until this lock is removed by this server.
- */
+ if(got_exit_signal)
+ goto sws_cleanup;
- set_advisor_read_lock(SERVERLOGS_LOCK);
- serverlogslocked = 1;
-
-#ifdef CURL_SWS_FORK_ENABLED
- if(use_fork) {
- /* The fork enabled version just forks off the child and don't care
- about it anymore, so don't assume otherwise. Beware and don't do
- this at home. */
- rc = fork();
- if(-1 == rc) {
- printf("MAJOR ERROR: fork() failed!\n");
- break;
- }
+ if (rc == 0) {
+ /* Timed out - try again*/
+ continue;
}
- else
- /* not a fork, just set rc so the following proceeds nicely */
- rc = 0;
- /* 0 is returned to the child */
- if(0 == rc) {
-#endif
- logmsg("====> Client connect");
-#ifdef TCP_NODELAY
- /*
- * Disable the Nagle algorithm to make it easier to send out a large
- * response in many small segments to torture the clients more.
- */
- flag = 1;
- if (setsockopt(msgsock, IPPROTO_TCP, TCP_NODELAY,
- (void *)&flag, sizeof(flag)) == -1) {
- logmsg("====> TCP_NODELAY failed");
+ /* Check if the listening socket is ready to accept */
+ if (FD_ISSET(all_sockets[0], &input)) {
+ /* Service all queued connections */
+ curl_socket_t msgsock;
+ do {
+ msgsock = accept_connection(sock);
+ logmsg("accept_connection %d returned %d", sock, msgsock);
+ if (CURL_SOCKET_BAD == msgsock)
+ goto sws_cleanup;
+ } while (msgsock > 0);
}
-#endif
-
- /* initialization of httprequest struct is done in get_request(), but due
- to pipelining treatment the pipelining struct field must be initialized
- previously to FALSE every time a new connection arrives. */
- req.pipelining = FALSE;
+ /* Service all connections that are ready */
+ for (socket_idx = 1; socket_idx < num_sockets; ++socket_idx) {
+ if (FD_ISSET(all_sockets[socket_idx], &input)) {
+ if(got_exit_signal)
+ goto sws_cleanup;
+
+ /* Service this connection until it has nothing available */
+ do {
+ rc = service_connection(all_sockets[socket_idx], &req, sock,
+ connecthost);
+ if(got_exit_signal)
+ goto sws_cleanup;
+
+ if (rc < 0) {
+ logmsg("====> Client disconnect %d", req.connmon);
+
+ if(req.connmon) {
+ const char *keepopen="[DISCONNECT]\n";
+ storerequest((char *)keepopen, strlen(keepopen));
+ }
- do {
- if(got_exit_signal)
- break;
+ if(!req.open)
+ /* When instructed to close connection after server-reply we
+ wait a very small amount of time before doing so. If this
+ is not done client might get an ECONNRESET before reading
+ a single byte of server-reply. */
+ wait_ms(50);
- if(get_request(msgsock, &req))
- /* non-zero means error, break out of loop */
- break;
+ if(all_sockets[socket_idx] != CURL_SOCKET_BAD) {
+ sclose(all_sockets[socket_idx]);
+ all_sockets[socket_idx] = CURL_SOCKET_BAD;
+ }
- if(prevbounce) {
- /* bounce treatment requested */
- if((req.testno == prevtestno) &&
- (req.partno == prevpartno)) {
- req.partno++;
- logmsg("BOUNCE part number to %ld", req.partno);
- }
- else {
- prevbounce = FALSE;
- prevtestno = -1;
- prevpartno = -1;
- }
- }
+ serverlogslocked -= 1;
+ if(!serverlogslocked)
+ clear_advisor_read_lock(SERVERLOGS_LOCK);
- send_doc(msgsock, &req);
- if(got_exit_signal)
- break;
+ if (req.testno == DOCNUMBER_QUIT)
+ goto sws_cleanup;
+ }
- if((req.testno < 0) && (req.testno != DOCNUMBER_CONNECT)) {
- logmsg("special request received, no persistency");
- break;
- }
- if(!req.open) {
- logmsg("instructed to close connection after server-reply");
- break;
+ /* Reset the request, unless we're still in the middle of reading */
+ if (rc != 0)
+ init_httprequest(&req);
+ } while (rc > 0);
}
-
- if(req.open)
- logmsg("=> persistant connection request ended, awaits new request");
- /* if we got a CONNECT, loop and get another request as well! */
- } while(req.open || (req.testno == DOCNUMBER_CONNECT));
-
- if(got_exit_signal)
- break;
-
- logmsg("====> Client disconnect");
- sclose(msgsock);
- msgsock = CURL_SOCKET_BAD;
-
- if(serverlogslocked) {
- serverlogslocked = 0;
- clear_advisor_read_lock(SERVERLOGS_LOCK);
}
- if (req.testno == DOCNUMBER_QUIT)
- break;
-#ifdef CURL_SWS_FORK_ENABLED
- }
-#endif
+ if(got_exit_signal)
+ goto sws_cleanup;
}
sws_cleanup:
- if((msgsock != sock) && (msgsock != CURL_SOCKET_BAD))
- sclose(msgsock);
+ for (socket_idx = 1; socket_idx < num_sockets; ++socket_idx)
+ if((all_sockets[socket_idx] != sock) &&
+ (all_sockets[socket_idx] != CURL_SOCKET_BAD))
+ sclose(all_sockets[socket_idx]);
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");
@@ -1442,8 +2361,8 @@ sws_cleanup:
restore_signal_handlers();
if(got_exit_signal) {
- logmsg("========> %s sws (port: %d pid: %ld) exits with signal (%d)",
- ipv_inuse, (int)port, pid, exit_signal);
+ logmsg("========> %s sws (%s pid: %ld) exits with signal (%d)",
+ socket_type, location_str, 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/testpart.c b/tests/server/testpart.c
index 94097145..912096f0 100644
--- a/tests/server/testpart.c
+++ b/tests/server/testpart.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,10 +19,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h"
+#include "server_setup.h"
#include "getpart.h"
diff --git a/tests/server/tftp.h b/tests/server/tftp.h
index f60f1225..0650efe6 100644
--- a/tests/server/tftp.h
+++ b/tests/server/tftp.h
@@ -1,5 +1,5 @@
-#ifndef __SERVER_TFTP_H
-#define __SERVER_TFTP_H
+#ifndef HEADER_CURL_SERVER_TFTP_H
+#define HEADER_CURL_SERVER_TFTP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,14 +21,18 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "server_setup.h"
/* This file is a rewrite/clone of the arpa/tftp.h file for systems without
it. */
#define SEGSIZE 512 /* data segment size */
-#ifndef __GNUC__
-#define __attribute__(x)
+#if defined(__GNUC__) && ((__GNUC__ >= 3) || \
+ ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7)))
+# define PACKED_STRUCT __attribute__((__packed__))
+#else
+# define PACKED_STRUCT /*NOTHING*/
#endif
/* Using a packed struct as binary in a program is begging for problems, but
@@ -39,7 +43,7 @@ struct tftphdr {
short th_opcode; /* packet type */
unsigned short th_block; /* all sorts of things */
char th_data[1]; /* data or error string */
-} __attribute__ ((__packed__));
+} PACKED_STRUCT;
#define th_stuff th_block
#define th_code th_block
@@ -54,4 +58,4 @@ struct tftphdr {
#define EEXISTS 6
#define ENOUSER 7
-#endif /* __SERVER_TFTP_H */
+#endif /* HEADER_CURL_SERVER_TFTP_H */
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index 0adcd496..cef129f2 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -47,9 +47,7 @@
* SUCH DAMAGE.
*/
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
+#include "server_setup.h"
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
@@ -60,9 +58,6 @@
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -83,9 +78,7 @@
#endif
#include <setjmp.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
@@ -96,6 +89,7 @@
#include "curlx.h" /* from the private lib dir */
#include "getpart.h"
#include "util.h"
+#include "server_sockaddr.h"
/* include memdebug.h last */
#include "memdebug.h"
@@ -113,8 +107,10 @@ struct testcase {
size_t bufsize; /* size of the data in buffer */
char *rptr; /* read pointer into the buffer */
size_t rcount; /* amount of data left to read of the file */
- long num; /* test case number */
+ long testno; /* test case number */
int ofile; /* file descriptor for output file when uploading to us */
+
+ int writedelay; /* number of seconds between each packet */
};
struct formats {
@@ -127,6 +123,11 @@ struct errmsg {
const char *e_msg;
};
+typedef union {
+ struct tftphdr hdr;
+ char storage[PKTSIZE];
+} tftphdr_storage_t;
+
/*
* bf.counter values in range [-1 .. SEGSIZE] represents size of data in the
* bf.buf buffer. Additionally it can also hold flags BF_ALLOC or BF_FREE.
@@ -134,7 +135,7 @@ struct errmsg {
struct bf {
int counter; /* size of data in buffer, or flag */
- char buf[PKTSIZE]; /* room for data packet */
+ tftphdr_storage_t buf; /* room for data packet */
};
#define BF_ALLOC -3 /* alloc'd but not yet filled */
@@ -190,10 +191,10 @@ static int current; /* index of buffer in use */
static int newline = 0; /* fillbuf: in middle of newline expansion */
static int prevchar = -1; /* putbuf: previous char (cr check) */
-static char buf[PKTSIZE];
-static char ackbuf[PKTSIZE];
+static tftphdr_storage_t buf;
+static tftphdr_storage_t ackbuf;
-static struct sockaddr_in from;
+static srvr_sockaddr_union_t from;
static curl_socklen_t fromlen;
static curl_socket_t peer = CURL_SOCKET_BAD;
@@ -201,14 +202,6 @@ static curl_socket_t peer = CURL_SOCKET_BAD;
static int timeout;
static int maxtimeout = 5 * TIMEOUT;
-static unsigned short sendblock; /* block count used by sendtftp() */
-static struct tftphdr *sdp; /* data buffer used by sendtftp() */
-static struct tftphdr *sap; /* ack buffer used by sendtftp() */
-
-static unsigned short recvblock; /* block count used by recvtftp() */
-static struct tftphdr *rdp; /* data buffer used by recvtftp() */
-static struct tftphdr *rap; /* ack buffer used by recvtftp() */
-
#ifdef ENABLE_IPV6
static bool use_ipv6 = FALSE;
#endif
@@ -253,6 +246,10 @@ static SIGHANDLER_T old_sigint_handler = SIG_ERR;
static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
/* var which if set indicates that the program should finish execution */
SIG_ATOMIC_T got_exit_signal = 0;
@@ -271,15 +268,6 @@ static struct tftphdr *w_init(void);
static struct tftphdr *r_init(void);
-static int readit(struct testcase *test,
- struct tftphdr **dpp,
- int convert);
-
-static int writeit(struct testcase *test,
- struct tftphdr **dpp,
- int ct,
- int convert);
-
static void read_ahead(struct testcase *test, int convert);
static ssize_t write_behind(struct testcase *test, int convert);
@@ -366,13 +354,13 @@ static void justtimeout(int signum)
static RETSIGTYPE exit_signal_handler(int signum)
{
- int old_errno = ERRNO;
+ int old_errno = errno;
if(got_exit_signal == 0) {
got_exit_signal = 1;
exit_signal = signum;
}
(void)signal(signum, exit_signal_handler);
- SET_ERRNO(old_errno);
+ errno = old_errno;
}
static void install_signal_handlers(void)
@@ -380,27 +368,34 @@ static void install_signal_handlers(void)
#ifdef SIGHUP
/* ignore SIGHUP signal */
if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGHUP handler: %s", strerror(errno));
#endif
#ifdef SIGPIPE
/* ignore SIGPIPE signal */
if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR)
- logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
#endif
#ifdef SIGINT
/* handle SIGINT signal with our exit_signal_handler */
if((old_sigint_handler = signal(SIGINT, exit_signal_handler)) == SIG_ERR)
- logmsg("cannot install SIGINT handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGINT handler: %s", strerror(errno));
else
siginterrupt(SIGINT, 1);
#endif
#ifdef SIGTERM
/* handle SIGTERM signal with our exit_signal_handler */
if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR)
- logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO));
+ logmsg("cannot install SIGTERM handler: %s", strerror(errno));
else
siginterrupt(SIGTERM, 1);
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+ /* handle SIGBREAK signal with our exit_signal_handler */
+ if((old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler)) == SIG_ERR)
+ logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+ else
+ siginterrupt(SIGBREAK, 1);
+#endif
}
static void restore_signal_handlers(void)
@@ -421,6 +416,10 @@ static void restore_signal_handlers(void)
if(SIG_ERR != old_sigterm_handler)
(void)signal(SIGTERM, old_sigterm_handler);
#endif
+#if defined(SIGBREAK) && defined(WIN32)
+ if(SIG_ERR != old_sigbreak_handler)
+ (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
}
/*
@@ -435,7 +434,7 @@ static struct tftphdr *rw_init(int x)
current = 0;
bfs[1].counter = BF_FREE;
nextone = x; /* ahead or behind? */
- return (struct tftphdr *)bfs[0].buf;
+ return &bfs[0].buf.hdr;
}
static struct tftphdr *w_init(void)
@@ -463,7 +462,7 @@ static int readit(struct testcase *test, struct tftphdr **dpp,
if (b->counter == BF_FREE) /* if it's empty */
read_ahead(test, convert); /* fill it */
- *dpp = (struct tftphdr *)b->buf; /* set caller's ptr */
+ *dpp = &b->buf.hdr; /* set caller's ptr */
return b->counter;
}
@@ -485,7 +484,7 @@ static void read_ahead(struct testcase *test,
return;
nextone = !nextone; /* "incr" next buffer ptr */
- dp = (struct tftphdr *)b->buf;
+ dp = &b->buf.hdr;
if (convert == 0) {
/* The former file reading code did this:
@@ -531,7 +530,7 @@ static void read_ahead(struct testcase *test,
/* Update count associated with the buffer, get new buffer from the queue.
Calls write_behind only if next buffer not available.
*/
-static int writeit(struct testcase *test, struct tftphdr **dpp,
+static int writeit(struct testcase *test, struct tftphdr * volatile *dpp,
int ct, int convert)
{
bfs[current].counter = ct; /* set size of data to write */
@@ -539,7 +538,7 @@ static int writeit(struct testcase *test, struct tftphdr **dpp,
if (bfs[current].counter != BF_FREE) /* if not free */
write_behind(test, convert); /* flush it */
bfs[current].counter = BF_ALLOC; /* mark as alloc'd */
- *dpp = (struct tftphdr *)bfs[current].buf;
+ *dpp = &bfs[current].buf.hdr;
return ct; /* this is a lie of course */
}
@@ -565,7 +564,7 @@ static ssize_t write_behind(struct testcase *test, int convert)
if(!test->ofile) {
char outfile[256];
- snprintf(outfile, sizeof(outfile), "log/upload.%ld", test->num);
+ snprintf(outfile, sizeof(outfile), "log/upload.%ld", test->testno);
test->ofile=open(outfile, O_CREAT|O_RDWR, 0777);
if(test->ofile == -1) {
logmsg("Couldn't create and/or open file %s for upload!", outfile);
@@ -575,7 +574,7 @@ static ssize_t write_behind(struct testcase *test, int convert)
count = b->counter; /* remember byte count */
b->counter = BF_FREE; /* reset flag */
- dp = (struct tftphdr *)b->buf;
+ dp = &b->buf.hdr;
nextone = !nextone; /* incr for next time */
writebuf = dp->th_data;
@@ -599,7 +598,8 @@ static ssize_t write_behind(struct testcase *test, int convert)
}
/* formerly
putc(c, file); */
- write(test->ofile, &c, 1);
+ if(1 != write(test->ofile, &c, 1))
+ break;
skipit:
prevchar = c;
}
@@ -627,7 +627,7 @@ static int synchnet(curl_socket_t f /* socket to flush */)
#endif
int j = 0;
char rbuf[PKTSIZE];
- struct sockaddr_in fromaddr;
+ srvr_sockaddr_union_t fromaddr;
curl_socklen_t fromaddrlen;
for (;;) {
@@ -638,9 +638,16 @@ static int synchnet(curl_socket_t f /* socket to flush */)
#endif
if (i) {
j++;
- fromaddrlen = sizeof(fromaddr);
- (void)recvfrom(f, rbuf, sizeof(rbuf), 0,
- (struct sockaddr *)&fromaddr, &fromaddrlen);
+#ifdef ENABLE_IPV6
+ if(!use_ipv6)
+#endif
+ fromaddrlen = sizeof(fromaddr.sa4);
+#ifdef ENABLE_IPV6
+ else
+ fromaddrlen = sizeof(fromaddr.sa6);
+#endif
+ (void) recvfrom(f, rbuf, sizeof(rbuf), 0,
+ &fromaddr.sa, &fromaddrlen);
}
else
break;
@@ -650,11 +657,7 @@ static int synchnet(curl_socket_t f /* socket to flush */)
int main(int argc, char **argv)
{
- struct sockaddr_in me;
-#ifdef ENABLE_IPV6
- struct sockaddr_in6 me6;
-#endif /* ENABLE_IPV6 */
-
+ srvr_sockaddr_union_t me;
struct tftphdr *tp;
ssize_t n = 0;
int arg = 1;
@@ -778,19 +781,19 @@ int main(int argc, char **argv)
#ifdef ENABLE_IPV6
if(!use_ipv6) {
#endif
- memset(&me, 0, sizeof(me));
- me.sin_family = AF_INET;
- me.sin_addr.s_addr = INADDR_ANY;
- me.sin_port = htons(port);
- rc = bind(sock, (struct sockaddr *) &me, sizeof(me));
+ 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));
#ifdef ENABLE_IPV6
}
else {
- memset(&me6, 0, sizeof(me6));
- me6.sin6_family = AF_INET6;
- me6.sin6_addr = in6addr_any;
- me6.sin6_port = htons(port);
- rc = bind(sock, (struct sockaddr *) &me6, sizeof(me6));
+ 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));
}
#endif /* ENABLE_IPV6 */
if(0 != rc) {
@@ -811,8 +814,16 @@ int main(int argc, char **argv)
for (;;) {
fromlen = sizeof(from);
- n = (ssize_t)recvfrom(sock, buf, sizeof(buf), 0,
- (struct sockaddr *)&from, &fromlen);
+#ifdef ENABLE_IPV6
+ if(!use_ipv6)
+#endif
+ fromlen = sizeof(from.sa4);
+#ifdef ENABLE_IPV6
+ else
+ fromlen = sizeof(from.sa6);
+#endif
+ n = (ssize_t)recvfrom(sock, &buf.storage[0], sizeof(buf.storage), 0,
+ &from.sa, &fromlen);
if(got_exit_signal)
break;
if (n < 0) {
@@ -824,30 +835,48 @@ int main(int argc, char **argv)
set_advisor_read_lock(SERVERLOGS_LOCK);
serverlogslocked = 1;
- from.sin_family = AF_INET;
-
- peer = socket(AF_INET, SOCK_DGRAM, 0);
- if(CURL_SOCKET_BAD == peer) {
- logmsg("socket");
- result = 2;
- break;
+#ifdef ENABLE_IPV6
+ if(!use_ipv6) {
+#endif
+ from.sa4.sin_family = AF_INET;
+ peer = socket(AF_INET, SOCK_DGRAM, 0);
+ if(CURL_SOCKET_BAD == peer) {
+ logmsg("socket");
+ result = 2;
+ break;
+ }
+ if(connect(peer, &from.sa, sizeof(from.sa4)) < 0) {
+ logmsg("connect: fail");
+ result = 1;
+ break;
+ }
+#ifdef ENABLE_IPV6
}
-
- if (connect(peer, (struct sockaddr *)&from, sizeof(from)) < 0) {
- logmsg("connect: fail");
- result = 1;
- break;
+ else {
+ from.sa6.sin6_family = AF_INET6;
+ peer = socket(AF_INET6, SOCK_DGRAM, 0);
+ if(CURL_SOCKET_BAD == peer) {
+ logmsg("socket");
+ result = 2;
+ break;
+ }
+ if(connect(peer, &from.sa, sizeof(from.sa6)) < 0) {
+ logmsg("connect: fail");
+ result = 1;
+ break;
+ }
}
+#endif
+
maxtimeout = 5*TIMEOUT;
- tp = (struct tftphdr *)buf;
+ tp = &buf.hdr;
tp->th_opcode = ntohs(tp->th_opcode);
if (tp->th_opcode == opcode_RRQ || tp->th_opcode == opcode_WRQ) {
memset(&test, 0, sizeof(test));
if (do_tftp(&test, tp, n) < 0)
break;
- if(test.buffer)
- free(test.buffer);
+ free(test.buffer);
}
sclose(peer);
peer = CURL_SOCKET_BAD;
@@ -919,11 +948,14 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
char *filename, *mode = NULL;
int error;
FILE *server;
+#ifdef USE_WINSOCK
+ DWORD recvtimeout, recvtimeoutbak;
+#endif
/* Open request dump file. */
server = fopen(REQUEST_DUMP, "ab");
if(!server) {
- error = ERRNO;
+ error = errno;
logmsg("fopen() failed with error: %d %s", error, strerror(error));
logmsg("Error opening file: %s", REQUEST_DUMP);
return -1;
@@ -935,7 +967,7 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
cp = (char *)&tp->th_stuff;
filename = cp;
again:
- while (cp < buf + size) {
+ while (cp < &buf.storage[size]) {
if (*cp == '\0')
break;
cp++;
@@ -973,14 +1005,96 @@ again:
nak(ecode);
return 1;
}
+
+#ifdef USE_WINSOCK
+ recvtimeout = sizeof(recvtimeoutbak);
+ getsockopt(peer, SOL_SOCKET, SO_RCVTIMEO,
+ (char*)&recvtimeoutbak, (int*)&recvtimeout);
+ recvtimeout = TIMEOUT*1000;
+ setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO,
+ (const char*)&recvtimeout, sizeof(recvtimeout));
+#endif
+
if (tp->th_opcode == opcode_WRQ)
recvtftp(test, pf);
else
sendtftp(test, pf);
+#ifdef USE_WINSOCK
+ recvtimeout = recvtimeoutbak;
+ setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO,
+ (const char*)&recvtimeout, sizeof(recvtimeout));
+#endif
+
return 0;
}
+/* Based on the testno, parse the correct server commands. */
+static int parse_servercmd(struct testcase *req)
+{
+ FILE *stream;
+ char *filename;
+ int error;
+
+ filename = test2file(req->testno);
+
+ stream=fopen(filename, "rb");
+ if(!stream) {
+ error = errno;
+ logmsg("fopen() failed with error: %d %s", error, strerror(error));
+ logmsg(" [1] Error opening file: %s", filename);
+ logmsg(" Couldn't open test file %ld", req->testno);
+ return 1; /* done */
+ }
+ else {
+ char *orgcmd = NULL;
+ char *cmd = NULL;
+ size_t cmdsize = 0;
+ int num=0;
+
+ /* get the custom server control "commands" */
+ error = getpart(&orgcmd, &cmdsize, "reply", "servercmd", stream);
+ fclose(stream);
+ if(error) {
+ logmsg("getpart() failed with error: %d", error);
+ return 1; /* done */
+ }
+
+ cmd = orgcmd;
+ while(cmd && cmdsize) {
+ char *check;
+ if(1 == sscanf(cmd, "writedelay: %d", &num)) {
+ logmsg("instructed to delay %d secs between packets", num);
+ req->writedelay = num;
+ }
+ else {
+ logmsg("Unknown <servercmd> instruction found: %s", cmd);
+ }
+ /* try to deal with CRLF or just LF */
+ check = strchr(cmd, '\r');
+ if(!check)
+ check = strchr(cmd, '\n');
+
+ if(check) {
+ /* get to the letter following the newline */
+ while((*check == '\r') || (*check == '\n'))
+ check++;
+
+ if(!*check)
+ /* if we reached a zero, get out */
+ break;
+ cmd = check;
+ }
+ else
+ break;
+ }
+ free(orgcmd);
+ }
+
+ return 0; /* OK! */
+}
+
+
/*
* Validate file access.
*/
@@ -1031,7 +1145,9 @@ static int validate_access(struct testcase *test,
logmsg("requested test number %ld part %ld", testno, partno);
- test->num = testno;
+ test->testno = testno;
+
+ (void)parse_servercmd(test);
file = test2file(testno);
@@ -1041,7 +1157,7 @@ static int validate_access(struct testcase *test,
if(file) {
FILE *stream=fopen(file, "rb");
if(!stream) {
- error = ERRNO;
+ error = errno;
logmsg("fopen() failed with error: %d %s", error, strerror(error));
logmsg("Error opening file: %s", file);
logmsg("Couldn't open test file: %s", file);
@@ -1084,24 +1200,35 @@ static void sendtftp(struct testcase *test, struct formats *pf)
{
int size;
ssize_t n;
+ /* This is volatile to live through a siglongjmp */
+ volatile unsigned short sendblock; /* block count */
+ struct tftphdr *sdp; /* data buffer */
+ struct tftphdr *sap; /* ack buffer */
+
sendblock = 1;
#if defined(HAVE_ALARM) && defined(SIGALRM)
mysignal(SIGALRM, timer);
#endif
sdp = r_init();
- sap = (struct tftphdr *)ackbuf;
+ sap = &ackbuf.hdr;
do {
size = readit(test, &sdp, pf->f_convert);
if (size < 0) {
- nak(ERRNO + 100);
+ nak(errno + 100);
return;
}
- sdp->th_opcode = htons((u_short)opcode_DATA);
- sdp->th_block = htons((u_short)sendblock);
+ sdp->th_opcode = htons((unsigned short)opcode_DATA);
+ sdp->th_block = htons(sendblock);
timeout = 0;
#ifdef HAVE_SIGSETJMP
(void) sigsetjmp(timeoutbuf, 1);
#endif
+ if(test->writedelay) {
+ logmsg("Pausing %d seconds before %d bytes", test->writedelay,
+ size);
+ wait_ms(1000*test->writedelay);
+ }
+
send_data:
if (swrite(peer, sdp, size + 4) != size + 4) {
logmsg("write");
@@ -1112,7 +1239,7 @@ static void sendtftp(struct testcase *test, struct formats *pf)
#ifdef HAVE_ALARM
alarm(rexmtval); /* read the ack */
#endif
- n = sread(peer, ackbuf, sizeof (ackbuf));
+ n = sread(peer, &ackbuf.storage[0], sizeof(ackbuf.storage));
#ifdef HAVE_ALARM
alarm(0);
#endif
@@ -1122,8 +1249,8 @@ static void sendtftp(struct testcase *test, struct formats *pf)
logmsg("read: fail");
return;
}
- sap->th_opcode = ntohs((u_short)sap->th_opcode);
- sap->th_block = ntohs((u_short)sap->th_block);
+ sap->th_opcode = ntohs((unsigned short)sap->th_opcode);
+ sap->th_block = ntohs(sap->th_block);
if (sap->th_opcode == opcode_ERROR) {
logmsg("got ERROR");
@@ -1152,22 +1279,27 @@ static void sendtftp(struct testcase *test, struct formats *pf)
static void recvtftp(struct testcase *test, struct formats *pf)
{
ssize_t n, size;
+ /* These are volatile to live through a siglongjmp */
+ volatile unsigned short recvblock; /* block count */
+ struct tftphdr * volatile rdp; /* data buffer */
+ struct tftphdr *rap; /* ack buffer */
+
recvblock = 0;
+ rdp = w_init();
#if defined(HAVE_ALARM) && defined(SIGALRM)
mysignal(SIGALRM, timer);
#endif
- rdp = w_init();
- rap = (struct tftphdr *)ackbuf;
+ rap = &ackbuf.hdr;
do {
timeout = 0;
- rap->th_opcode = htons((u_short)opcode_ACK);
- rap->th_block = htons((u_short)recvblock);
+ rap->th_opcode = htons((unsigned short)opcode_ACK);
+ rap->th_block = htons(recvblock);
recvblock++;
#ifdef HAVE_SIGSETJMP
(void) sigsetjmp(timeoutbuf, 1);
#endif
send_ack:
- if (swrite(peer, ackbuf, 4) != 4) {
+ if (swrite(peer, &ackbuf.storage[0], 4) != 4) {
logmsg("write: fail\n");
goto abort;
}
@@ -1186,8 +1318,8 @@ send_ack:
logmsg("read: fail\n");
goto abort;
}
- rdp->th_opcode = ntohs((u_short)rdp->th_opcode);
- rdp->th_block = ntohs((u_short)rdp->th_block);
+ rdp->th_opcode = ntohs((unsigned short)rdp->th_opcode);
+ rdp->th_block = ntohs(rdp->th_block);
if (rdp->th_opcode == opcode_ERROR)
goto abort;
if (rdp->th_opcode == opcode_DATA) {
@@ -1204,7 +1336,7 @@ send_ack:
size = writeit(test, &rdp, (int)(n - 4), pf->f_convert);
if (size != (n-4)) { /* ahem */
if (size < 0)
- nak(ERRNO + 100);
+ nak(errno + 100);
else
nak(ENOSPACE);
goto abort;
@@ -1212,23 +1344,24 @@ send_ack:
} while (size == SEGSIZE);
write_behind(test, pf->f_convert);
- rap->th_opcode = htons((u_short)opcode_ACK); /* send the "final" ack */
- rap->th_block = htons((u_short)recvblock);
- (void) swrite(peer, ackbuf, 4);
+ rap->th_opcode = htons((unsigned short)opcode_ACK); /* send the "final" ack */
+ rap->th_block = htons(recvblock);
+ (void) swrite(peer, &ackbuf.storage[0], 4);
#if defined(HAVE_ALARM) && defined(SIGALRM)
mysignal(SIGALRM, justtimeout); /* just abort read on timeout */
alarm(rexmtval);
#endif
- n = sread(peer, buf, sizeof(buf)); /* normally times out and quits */
+ /* normally times out and quits */
+ n = sread(peer, &buf.storage[0], sizeof(buf.storage));
#ifdef HAVE_ALARM
alarm(0);
#endif
if(got_exit_signal)
goto abort;
- if (n >= 4 && /* if read some data */
- rdp->th_opcode == opcode_DATA && /* and got a data block */
- recvblock == rdp->th_block) { /* then my last ack was lost */
- (void) swrite(peer, ackbuf, 4); /* resend final ack */
+ if (n >= 4 && /* if read some data */
+ rdp->th_opcode == opcode_DATA && /* and got a data block */
+ recvblock == rdp->th_block) { /* then my last ack was lost */
+ (void) swrite(peer, &ackbuf.storage[0], 4); /* resend final ack */
}
abort:
return;
@@ -1236,7 +1369,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)
{
@@ -1244,9 +1377,9 @@ static void nak(int error)
int length;
struct errmsg *pe;
- tp = (struct tftphdr *)buf;
- tp->th_opcode = htons((u_short)opcode_ERROR);
- tp->th_code = htons((u_short)error);
+ tp = &buf.hdr;
+ tp->th_opcode = htons((unsigned short)opcode_ERROR);
+ tp->th_code = htons((unsigned short)error);
for (pe = errmsgs; pe->e_code >= 0; pe++)
if (pe->e_code == error)
break;
@@ -1254,10 +1387,12 @@ static void nak(int error)
pe->e_msg = strerror(error - 100);
tp->th_code = EUNDEF; /* set 'undef' errorcode */
}
- strcpy(tp->th_msg, pe->e_msg);
length = (int)strlen(pe->e_msg);
- tp->th_msg[length] = '\0';
+
+ /* we use memcpy() instead of strcpy() in order to avoid buffer overflow
+ * report from glibc with FORTIFY_SOURCE */
+ memcpy(tp->th_msg, pe->e_msg, length + 1);
length += 5;
- if (swrite(peer, buf, length) != length)
+ if (swrite(peer, &buf.storage[0], length) != length)
logmsg("nak: fail\n");
}
diff --git a/tests/server/util.c b/tests/server/util.c
index 52802a82..06f3ce10 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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,20 +19,11 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
+#include "server_setup.h"
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -57,10 +48,44 @@
#include "util.h"
#include "timeval.h"
+#ifdef USE_WINSOCK
+#undef EINTR
+#define EINTR 4 /* errno.h value */
+#undef EINVAL
+#define EINVAL 22 /* errno.h value */
+#endif
+
#if defined(ENABLE_IPV6) && defined(__MINGW32__)
const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
#endif
+/* This function returns a pointer to STATIC memory. It converts the given
+ * binary lump to a hex formatted string usable for output in logs or
+ * whatever.
+ */
+char *data_to_hex(char *data, size_t len)
+{
+ static char buf[256*3];
+ size_t i;
+ char *optr = buf;
+ char *iptr = data;
+
+ if(len > 255)
+ len = 255;
+
+ for(i=0; i < len; i++) {
+ if((data[i] >= 0x20) && (data[i] < 0x7f))
+ *optr++ = *iptr++;
+ else {
+ sprintf(optr, "%%%02x", *iptr++);
+ optr+=3;
+ }
+ }
+ *optr=0; /* in case no sprintf() was used */
+
+ return buf;
+}
+
void logmsg(const char *msg, ...)
{
va_list ap;
@@ -100,7 +125,7 @@ void logmsg(const char *msg, ...)
fclose(logfp);
}
else {
- error = ERRNO;
+ error = errno;
fprintf(stderr, "fopen() failed with error: %d %s\n",
error, strerror(error));
fprintf(stderr, "Error opening file: %s\n", serverlogfile);
@@ -190,7 +215,7 @@ int wait_ms(int timeout_ms)
if(!timeout_ms)
return 0;
if(timeout_ms < 0) {
- SET_SOCKERRNO(EINVAL);
+ errno = EINVAL;
return -1;
}
#if defined(MSDOS)
@@ -210,7 +235,7 @@ int wait_ms(int timeout_ms)
#endif /* HAVE_POLL_FINE */
if(r != -1)
break;
- error = SOCKERRNO;
+ error = errno;
if(error && (error != EINTR))
break;
pending_ms = timeout_ms - (int)curlx_tvdiff(curlx_tvnow(), initial_tv);
@@ -231,7 +256,7 @@ int write_pidfile(const char *filename)
pid = (long)getpid();
pidfile = fopen(filename, "wb");
if(!pidfile) {
- logmsg("Couldn't write pid file: %s %s", filename, strerror(ERRNO));
+ logmsg("Couldn't write pid file: %s %s", filename, strerror(errno));
return 0; /* fail */
}
fprintf(pidfile, "%ld\n", pid);
@@ -248,7 +273,7 @@ void set_advisor_read_lock(const char *filename)
do {
lockfile = fopen(filename, "wb");
- } while((lockfile == NULL) && ((error = ERRNO) == EINTR));
+ } while((lockfile == NULL) && ((error = errno) == EINTR));
if(lockfile == NULL) {
logmsg("Error creating lock file %s error: %d %s",
filename, error, strerror(error));
@@ -257,7 +282,7 @@ void set_advisor_read_lock(const char *filename)
do {
res = fclose(lockfile);
- } while(res && ((error = ERRNO) == EINTR));
+ } while(res && ((error = errno) == EINTR));
if(res)
logmsg("Error closing lock file %s error: %d %s",
filename, error, strerror(error));
@@ -276,7 +301,7 @@ void clear_advisor_read_lock(const char *filename)
do {
res = unlink(filename);
- } while(res && ((error = ERRNO) == EINTR));
+ } while(res && ((error = errno) == EINTR));
if(res)
logmsg("Error removing lock file %s error: %d %s",
filename, error, strerror(error));
diff --git a/tests/server/util.h b/tests/server/util.h
index 76cd88d1..8d2e582c 100644
--- a/tests/server/util.h
+++ b/tests/server/util.h
@@ -1,5 +1,5 @@
-#ifndef __SERVER_UTIL_H
-#define __SERVER_UTIL_H
+#ifndef HEADER_CURL_SERVER_UTIL_H
+#define HEADER_CURL_SERVER_UTIL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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,9 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "server_setup.h"
+char *data_to_hex(char *data, size_t len);
void logmsg(const char *msg, ...);
#define TEST_DATA_PATH "%s/data/test%ld"
@@ -61,4 +63,4 @@ void set_advisor_read_lock(const char *filename);
void clear_advisor_read_lock(const char *filename);
-#endif /* __SERVER_UTIL_H */
+#endif /* HEADER_CURL_SERVER_UTIL_H */
diff --git a/tests/serverhelp.pm b/tests/serverhelp.pm
index 34b155d0..220fba92 100644
--- a/tests/serverhelp.pm
+++ b/tests/serverhelp.pm
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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,6 +63,13 @@ use vars qw(
#***************************************************************************
+# Just for convenience, test harness uses 'https' and 'httptls' literals as
+# values for 'proto' variable in order to differentiate different servers.
+# 'https' literal is used for stunnel based https test servers, and 'httptls'
+# is used for non-stunnel https test servers.
+
+
+#***************************************************************************
# Return server characterization factors given a server id string.
#
sub serverfactors {
@@ -71,18 +78,20 @@ sub serverfactors {
my $ipvnum;
my $idnum;
- if($server =~ /^((ftp|http|imap|pop3|smtp)s?)(\d*)(-ipv6|)$/) {
+ if($server =~
+ /^((ftp|http|imap|pop3|smtp|http-pipe)s?)(\d*)(-ipv6|)$/) {
$proto = $1;
$idnum = ($3 && ($3 > 1)) ? $3 : 1;
$ipvnum = ($4 && ($4 =~ /6$/)) ? 6 : 4;
}
- elsif($server =~ /^(tftp|sftp|socks|ssh|rtsp)(\d*)(-ipv6|)$/) {
+ elsif($server =~
+ /^(tftp|sftp|socks|ssh|rtsp|gopher|httptls)(\d*)(-ipv6|)$/) {
$proto = $1;
$idnum = ($2 && ($2 > 1)) ? $2 : 1;
$ipvnum = ($3 && ($3 =~ /6$/)) ? 6 : 4;
}
else {
- die "invalid server id: $server"
+ die "invalid server id: '$server'"
}
return($proto, $ipvnum, $idnum);
}
@@ -95,16 +104,16 @@ sub servername_str {
my ($proto, $ipver, $idnum) = @_;
$proto = uc($proto) if($proto);
- die "unsupported protocol: $proto" unless($proto &&
- ($proto =~ /^(((FTP|HTTP|IMAP|POP3|SMTP)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER))$/));
+ die "unsupported protocol: '$proto'" unless($proto &&
+ ($proto =~ /^(((FTP|HTTP|IMAP|POP3|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER|HTTPTLS))$/));
$ipver = (not $ipver) ? 'ipv4' : lc($ipver);
- die "unsupported IP version: $ipver" unless($ipver &&
- ($ipver =~ /^(4|6|ipv4|ipv6|-ipv4|-ipv6)$/));
- $ipver = ($ipver =~ /6$/) ? '-IPv6' : '';
+ die "unsupported IP version: '$ipver'" unless($ipver &&
+ ($ipver =~ /^(4|6|ipv4|ipv6|-ipv4|-ipv6|unix)$/));
+ $ipver = ($ipver =~ /6$/) ? '-IPv6' : (($ipver =~ /unix$/) ? '-unix' : '');
$idnum = 1 if(not $idnum);
- die "unsupported ID number: $idnum" unless($idnum &&
+ die "unsupported ID number: '$idnum'" unless($idnum &&
($idnum =~ /^(\d+)$/));
$idnum = '' unless($idnum > 1);
@@ -188,7 +197,7 @@ sub server_outputfilename {
#
sub mainsockf_pidfilename {
my ($proto, $ipver, $idnum) = @_;
- die "unsupported protocol: $proto" unless($proto &&
+ die "unsupported protocol: '$proto'" unless($proto &&
(lc($proto) =~ /^(ftp|imap|pop3|smtp)s?$/));
my $trailer = (lc($proto) =~ /^ftps?$/) ? '_sockctrl.pid':'_sockfilt.pid';
return '.'. servername_canon($proto, $ipver, $idnum) ."$trailer";
@@ -200,7 +209,7 @@ sub mainsockf_pidfilename {
#
sub mainsockf_logfilename {
my ($logdir, $proto, $ipver, $idnum) = @_;
- die "unsupported protocol: $proto" unless($proto &&
+ die "unsupported protocol: '$proto'" unless($proto &&
(lc($proto) =~ /^(ftp|imap|pop3|smtp)s?$/));
my $trailer = (lc($proto) =~ /^ftps?$/) ? '_sockctrl.log':'_sockfilt.log';
return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
@@ -212,7 +221,7 @@ sub mainsockf_logfilename {
#
sub datasockf_pidfilename {
my ($proto, $ipver, $idnum) = @_;
- die "unsupported protocol: $proto" unless($proto &&
+ die "unsupported protocol: '$proto'" unless($proto &&
(lc($proto) =~ /^ftps?$/));
my $trailer = '_sockdata.pid';
return '.'. servername_canon($proto, $ipver, $idnum) ."$trailer";
@@ -224,7 +233,7 @@ sub datasockf_pidfilename {
#
sub datasockf_logfilename {
my ($logdir, $proto, $ipver, $idnum) = @_;
- die "unsupported protocol: $proto" unless($proto &&
+ die "unsupported protocol: '$proto'" unless($proto &&
(lc($proto) =~ /^ftps?$/));
my $trailer = '_sockdata.log';
return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
diff --git a/tests/sshhelp.pm b/tests/sshhelp.pm
index 18de9d3e..914879b4 100644
--- a/tests/sshhelp.pm
+++ b/tests/sshhelp.pm
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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,7 @@ use vars qw(
$sftpsrvexe
$sftpexe
$sshkeygenexe
+ $httptlssrvexe
$sshdconfig
$sshconfig
$sftpconfig
@@ -52,6 +53,7 @@ use vars qw(
$cliprvkeyf
$clipubkeyf
@sftppath
+ @httptlssrvpath
);
@@ -95,6 +97,7 @@ use vars qw(
find_sftpsrv
find_sftp
find_sshkeygen
+ find_httptlssrv
logmsg
sshversioninfo
);
@@ -103,27 +106,28 @@ use vars qw(
#***************************************************************************
# Global variables initialization
#
-$sshdexe = 'sshd' .exe_ext(); # base name and ext of ssh daemon
-$sshexe = 'ssh' .exe_ext(); # base name and ext of ssh client
-$sftpsrvexe = 'sftp-server' .exe_ext(); # base name and ext of sftp-server
-$sftpexe = 'sftp' .exe_ext(); # base name and ext of sftp client
-$sshkeygenexe = 'ssh-keygen' .exe_ext(); # base name and ext of ssh-keygen
-$sshdconfig = 'curl_sshd_config'; # ssh daemon config file
-$sshconfig = 'curl_ssh_config'; # ssh client config file
-$sftpconfig = 'curl_sftp_config'; # sftp client config file
-$sshdlog = undef; # ssh daemon log file
-$sshlog = undef; # ssh client log file
-$sftplog = undef; # sftp client log file
-$sftpcmds = 'curl_sftp_cmds'; # sftp client commands batch file
-$knownhosts = 'curl_client_knownhosts'; # ssh knownhosts file
-$hstprvkeyf = 'curl_host_dsa_key'; # host private key file
-$hstpubkeyf = 'curl_host_dsa_key.pub'; # host public key file
-$cliprvkeyf = 'curl_client_key'; # client private key file
-$clipubkeyf = 'curl_client_key.pub'; # client public key file
+$sshdexe = 'sshd' .exe_ext(); # base name and ext of ssh daemon
+$sshexe = 'ssh' .exe_ext(); # base name and ext of ssh client
+$sftpsrvexe = 'sftp-server' .exe_ext(); # base name and ext of sftp-server
+$sftpexe = 'sftp' .exe_ext(); # base name and ext of sftp client
+$sshkeygenexe = 'ssh-keygen' .exe_ext(); # base name and ext of ssh-keygen
+$httptlssrvexe = 'gnutls-serv' .exe_ext(); # base name and ext of gnutls-serv
+$sshdconfig = 'curl_sshd_config'; # ssh daemon config file
+$sshconfig = 'curl_ssh_config'; # ssh client config file
+$sftpconfig = 'curl_sftp_config'; # sftp client config file
+$sshdlog = undef; # ssh daemon log file
+$sshlog = undef; # ssh client log file
+$sftplog = undef; # sftp client log file
+$sftpcmds = 'curl_sftp_cmds'; # sftp client commands batch file
+$knownhosts = 'curl_client_knownhosts'; # ssh knownhosts file
+$hstprvkeyf = 'curl_host_dsa_key'; # host private key file
+$hstpubkeyf = 'curl_host_dsa_key.pub'; # host public key file
+$cliprvkeyf = 'curl_client_key'; # client private key file
+$clipubkeyf = 'curl_client_key.pub'; # client public key file
#***************************************************************************
-# Absolute paths where to look for sftp-server plugin
+# Absolute paths where to look for sftp-server plugin, when not in PATH
#
@sftppath = qw(
/usr/lib/openssh
@@ -149,6 +153,30 @@ $clipubkeyf = 'curl_client_key.pub'; # client public key file
#***************************************************************************
+# Absolute paths where to look for httptlssrv (gnutls-serv), when not in PATH
+#
+@httptlssrvpath = qw(
+ /usr/sbin
+ /usr/libexec
+ /usr/lib
+ /usr/lib/misc
+ /usr/lib64/misc
+ /usr/local/bin
+ /usr/local/sbin
+ /usr/local/libexec
+ /opt/local/bin
+ /opt/local/sbin
+ /opt/local/libexec
+ /usr/freeware/bin
+ /usr/freeware/sbin
+ /usr/freeware/libexec
+ /opt/gnutls/bin
+ /opt/gnutls/sbin
+ /opt/gnutls/libexec
+ );
+
+
+#***************************************************************************
# Return file extension for executable files on this operating system
#
sub exe_ext {
@@ -272,7 +300,7 @@ sub find_file {
my @path = @_;
foreach (@path) {
my $file = File::Spec->catfile($_, $fn);
- if(-e $file) {
+ if(-e $file && ! -d $file) {
return $file;
}
}
@@ -280,9 +308,27 @@ sub find_file {
#***************************************************************************
+# Find an executable file somewhere in the given path
+#
+sub find_exe_file {
+ my $fn = $_[0];
+ shift;
+ my @path = @_;
+ my $xext = exe_ext();
+ foreach (@path) {
+ my $file = File::Spec->catfile($_, $fn);
+ if(-e $file && ! -d $file) {
+ return $file if(-x $file);
+ return $file if(($xext) && (lc($file) =~ /\Q$xext\E$/));
+ }
+ }
+}
+
+
+#***************************************************************************
# Find a file in environment path or in our sftppath
#
-sub find_sfile {
+sub find_file_spath {
my $filename = $_[0];
my @spath;
push(@spath, File::Spec->path());
@@ -292,10 +338,22 @@ sub find_sfile {
#***************************************************************************
+# Find an executable file in environment path or in our httptlssrvpath
+#
+sub find_exe_file_hpath {
+ my $filename = $_[0];
+ my @hpath;
+ push(@hpath, File::Spec->path());
+ push(@hpath, @httptlssrvpath);
+ return find_exe_file($filename, @hpath);
+}
+
+
+#***************************************************************************
# Find ssh daemon and return canonical filename
#
sub find_sshd {
- return find_sfile($sshdexe);
+ return find_file_spath($sshdexe);
}
@@ -303,7 +361,7 @@ sub find_sshd {
# Find ssh client and return canonical filename
#
sub find_ssh {
- return find_sfile($sshexe);
+ return find_file_spath($sshexe);
}
@@ -311,7 +369,7 @@ sub find_ssh {
# Find sftp-server plugin and return canonical filename
#
sub find_sftpsrv {
- return find_sfile($sftpsrvexe);
+ return find_file_spath($sftpsrvexe);
}
@@ -319,7 +377,7 @@ sub find_sftpsrv {
# Find sftp client and return canonical filename
#
sub find_sftp {
- return find_sfile($sftpexe);
+ return find_file_spath($sftpexe);
}
@@ -327,7 +385,15 @@ sub find_sftp {
# Find ssh-keygen and return canonical filename
#
sub find_sshkeygen {
- return find_sfile($sshkeygenexe);
+ return find_file_spath($sshkeygenexe);
+}
+
+
+#***************************************************************************
+# Find httptlssrv (gnutls-serv) and return canonical filename
+#
+sub find_httptlssrv {
+ return find_exe_file_hpath($httptlssrvexe);
}
@@ -351,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 b4390158..d8c2d6f1 100755
--- a/tests/sshserver.pl
+++ b/tests/sshserver.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -27,6 +27,7 @@
use strict;
use warnings;
use Cwd;
+use Cwd 'abs_path';
#***************************************************************************
# Variables and subs imported from sshhelp module
@@ -88,6 +89,7 @@ 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;
@@ -362,17 +364,19 @@ if((($sshid =~ /OpenSSH/) && ($sshvernum < 299)) ||
#***************************************************************************
# Generate host and client key files for curl's tests
#
-if((! -e $hstprvkeyf) || (! -e $hstpubkeyf) ||
- (! -e $cliprvkeyf) || (! -e $clipubkeyf)) {
+if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) ||
+ (! -e $hstpubkeyf) || (! -s $hstpubkeyf) ||
+ (! -e $cliprvkeyf) || (! -s $cliprvkeyf) ||
+ (! -e $clipubkeyf) || (! -s $clipubkeyf)) {
# 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;
}
@@ -380,6 +384,22 @@ if((! -e $hstprvkeyf) || (! -e $hstpubkeyf) ||
#***************************************************************************
+# 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]
@@ -477,10 +497,10 @@ push @cfgarr, "AllowUsers $username";
push @cfgarr, 'DenyGroups';
push @cfgarr, 'AllowGroups';
push @cfgarr, '#';
-push @cfgarr, "AuthorizedKeysFile $path/$clipubkeyf";
-push @cfgarr, "AuthorizedKeysFile2 $path/$clipubkeyf";
-push @cfgarr, "HostKey $path/$hstprvkeyf";
-push @cfgarr, "PidFile $pidfile";
+push @cfgarr, "AuthorizedKeysFile $clipubkeyf_config";
+push @cfgarr, "AuthorizedKeysFile2 $clipubkeyf_config";
+push @cfgarr, "HostKey $hstprvkeyf_config";
+push @cfgarr, "PidFile $pidfile_config";
push @cfgarr, '#';
push @cfgarr, "Port $port";
push @cfgarr, "ListenAddress $listenaddr";
@@ -510,7 +530,7 @@ push @cfgarr, 'RhostsRSAAuthentication no';
push @cfgarr, 'RSAAuthentication no';
push @cfgarr, 'ServerKeyBits 768';
push @cfgarr, 'StrictModes no';
-push @cfgarr, "Subsystem sftp $sftpsrv";
+push @cfgarr, "Subsystem sftp \"$sftpsrv_config\"";
push @cfgarr, 'SyslogFacility AUTH';
push @cfgarr, 'UseLogin no';
push @cfgarr, 'X11Forwarding no';
@@ -538,7 +558,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)) {
@@ -549,7 +569,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;
}
@@ -695,7 +715,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();
@@ -706,8 +726,9 @@ if(system "$sshd -t -f $sshdconfig > $sshdlog 2>&1") {
#***************************************************************************
# Generate ssh client host key database file for curl's tests
#
-if(! -e $knownhosts) {
+if((! -e $knownhosts) || (! -s $knownhosts)) {
logmsg 'generating ssh client known hosts file...' if($verbose);
+ unlink($knownhosts);
if(open(DSAKEYFILE, "<$hstpubkeyf")) {
my @dsahostkey = do { local $/ = ' '; <DSAKEYFILE> };
if(close(DSAKEYFILE)) {
@@ -736,6 +757,19 @@ if(! -e $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
@@ -831,8 +865,8 @@ push @cfgarr, '#';
push @cfgarr, "BindAddress $listenaddr";
push @cfgarr, "DynamicForward $socksport";
push @cfgarr, '#';
-push @cfgarr, "IdentityFile $path/curl_client_key";
-push @cfgarr, "UserKnownHostsFile $path/$knownhosts";
+push @cfgarr, "IdentityFile $identity_config";
+push @cfgarr, "UserKnownHostsFile $knownhosts_config";
push @cfgarr, '#';
push @cfgarr, 'BatchMode yes';
push @cfgarr, 'ChallengeResponseAuthentication no';
@@ -853,7 +887,10 @@ push @cfgarr, 'PreferredAuthentications publickey';
push @cfgarr, 'PubkeyAuthentication yes';
push @cfgarr, 'RhostsRSAAuthentication no';
push @cfgarr, 'RSAAuthentication no';
-push @cfgarr, 'StrictHostKeyChecking yes';
+
+# Disabled StrictHostKeyChecking since it makes the tests fail on my
+# OpenSSH_6.0p1 on Debian Linux / Daniel
+push @cfgarr, 'StrictHostKeyChecking no';
push @cfgarr, 'UsePrivilegedPort no';
push @cfgarr, '#';
@@ -1019,16 +1056,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/stunnel.pem b/tests/stunnel.pem
index 1b4d6699..d9b9679e 100644
--- a/tests/stunnel.pem
+++ b/tests/stunnel.pem
@@ -60,17 +60,17 @@ Certificate:
Data:
Version: 3 (0x2)
Serial Number:
- 09:c2:f9:ca:9a:d8
- Signature Algorithm: md5WithRSAEncryption
+ a4:17:70:09:88:8c:48:cd
+ Signature Algorithm: sha1WithRSAEncryption
Issuer: C=SE, ST=Solna, L=Mooo, O=Haxx, OU=Coolx, CN=storbror, CN=localhost
Validity
- Not Before: Jan 5 11:25:13 2004 GMT
- Not After : Feb 13 11:25:13 2008 GMT
+ Not Before: Feb 22 15:38:48 2014 GMT
+ Not After : Feb 20 15:38:48 2024 GMT
Subject: C=SE, ST=Solna, L=Mooo, O=Haxx, OU=Coolx, CN=storbror, CN=localhost
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- RSA Public Key: (1234 bit)
- Modulus (1234 bit):
+ Public-Key: (1234 bit)
+ Modulus:
03:59:37:ea:06:ea:f2:7c:0c:0c:de:f8:5b:ce:29:
24:b8:f5:7e:31:18:cc:40:2e:12:91:2e:14:10:6f:
ba:af:33:ee:c1:70:c8:11:bf:e4:4a:c6:45:fb:48:
@@ -104,39 +104,40 @@ Certificate:
Authority Information Access:
ad dvcs - URI:https://localhost:8433/509
- Signature Algorithm: md5WithRSAEncryption
- 02:47:57:18:5f:54:3f:1d:29:0a:05:7a:d1:0f:e6:b9:2c:8b:
- 29:38:50:bf:c1:a1:7f:73:4a:9d:f1:1b:bf:2e:ea:87:91:dd:
- ff:75:73:57:78:cf:75:52:57:0b:5b:bb:d4:77:b2:dd:e8:0c:
- 06:ce:1b:c0:3d:9f:68:c0:0b:66:b8:f9:46:db:04:a9:2f:a3:
- 5e:9c:c6:70:ff:1d:af:1f:17:9c:38:3d:12:aa:af:7b:72:44:
- a0:44:41:6b:9a:9b:60:8c:50:94:f1:d7:a5:77:6b:d3:0e:66:
- 88:a1:52:63:23:f6:66:a6:ea:f9:d0:df:4d:8a:14:f0:73:c6:
- b6:b6:b6:68:4f:3d:9a:b6:31:ba:19:f3:66:9f:16:6d:87:64:
- 32:53:d2:90:e5:8c:1e:f5:18:61:1a
+ Signature Algorithm: sha1WithRSAEncryption
+ 00:45:db:09:5b:08:5b:1a:ff:71:50:6c:12:ad:8e:78:32:1d:
+ 7d:e7:e4:d3:3e:5f:ca:20:84:aa:ff:9a:c2:b6:a9:48:93:1f:
+ 73:27:d1:68:05:76:36:f9:c1:53:90:ad:8a:c0:b3:12:c8:11:
+ 5c:2c:65:01:ac:31:d1:8e:60:6e:c6:f5:ba:9d:69:e8:f1:ac:
+ 4a:de:52:94:cd:06:24:45:72:64:89:0f:57:8b:26:2b:16:cf:
+ 0b:27:c4:e8:73:c7:d3:e5:42:38:95:57:b5:bb:83:b4:92:d4:
+ e0:cd:fb:c8:f5:d2:da:1d:11:fe:3c:18:20:8b:bd:22:31:1c:
+ 5a:82:d4:f5:71:8d:8a:e3:13:82:c5:2d:f3:9f:d0:b7:b8:4b:
+ d2:46:9d:8e:1a:d7:99:6e:c1:b9:a0
-----BEGIN CERTIFICATE-----
-MIIDujCCAwigAwIBAgIGCcMA3QkhMA0GCSqGSIb3DQEBBAUAMHIxCzAJBgNVBAYT
-AlNFMQ4wDAYDVQQIEwVTb2xuYTENMAsGA1UEBxMETW9vbzENMAsGA1UEChMESGF4
-eDEOMAwGA1UECxMFQ29vbHgxETAPBgNVBAMTCHN0b3Jicm9yMRIwEAYDVQQDEwls
-b2NhbGhvc3QwHhcNMDQwMTA1MTQ0MjU2WhcNMDgwMjEzMTQ0MjU2WjByMQswCQYD
-VQQGEwJTRTEOMAwGA1UECBMFU29sbmExDTALBgNVBAcTBE1vb28xDTALBgNVBAoT
-BEhheHgxDjAMBgNVBAsTBUNvb2x4MREwDwYDVQQDEwhzdG9yYnJvcjESMBAGA1UE
-AxMJbG9jYWxob3N0MIG5MA0GCSqGSIb3DQEBAQUAA4GnADCBowKBmwNZN+oG6vJ8
-DAze+FvOKSS49X4xGMxALhKRLhQQb7qvM+7BcMgRv+RKxkX7SNgcxKPLcIHf7QQ6
-DBIlLXuAuVHQtWW9b06q64kBElkEwh6gP5Ia9JrRysGbu2U6NRP+xBU33dVwZjF0
-7ocN9Pp392W4VxEc+g3+FkRzUEaahDGOabmjgKuqDdlKdZLzgJj7+9sEKpb7+FdG
-56rZAgMBAAGjggEkMIIBIDARBglghkgBhvhCAQEEBAMCBkAwMwYJYIZIAYb4QgEN
-BCYWJENVUkwgc3R1bm5lbCBzZXJ2ZXIgdGVzdCBjZXJ0aWZpY2F0ZTALBgNVHQ8E
-BAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCQYDVR0TBAIwADAdBgNVHQ4EFgQU
-NXc1O5uYPLbHmueoBLl8cK36N6kwNgYIKwYBBQUHAQsEKjAoMCYGCCsGAQUFBzAE
-hhpodHRwczovL2xvY2FsaG9zdDo4NDMzLzUwOTA2BggrBgEFBQcBAQQqMCgwJgYI
-KwYBBQUHMASGGmh0dHBzOi8vbG9jYWxob3N0Ojg0MzMvNTA5MBoGA1UdEQQTMBGH
-BH8AAAGCCWxvY2FsaG9zdDANBgkqhkiG9w0BAQQFAAOBnAAAIHkvI0V6padfc8Lv
-onuNqBwCMIg4SugCslkN597Yb8ZDEAUe3ArkOvzAHUngsD5D0gfbKblKP/P0bN6Y
-Ft896NmH4QFsDAetZcCFf24AM4DbUQo5jtG+dkanI/7IxxNYJ1PQ64/yscdQFvHW
-xhIX3Q6FqABjcN5nc80Rog+b6eS8QRX1BRnQqbGtocuptUgW5mWsSb+DR6pZbA==
+MIIDtzCCAwWgAwIBAgIJAKQXcAmIjEjNMA0GCSqGSIb3DQEBBQUAMHIxCzAJBgNV
+BAYTAlNFMQ4wDAYDVQQIEwVTb2xuYTENMAsGA1UEBxMETW9vbzENMAsGA1UEChME
+SGF4eDEOMAwGA1UECxMFQ29vbHgxETAPBgNVBAMTCHN0b3Jicm9yMRIwEAYDVQQD
+Ewlsb2NhbGhvc3QwHhcNMTQwMjIyMTUzODQ4WhcNMjQwMjIwMTUzODQ4WjByMQsw
+CQYDVQQGEwJTRTEOMAwGA1UECBMFU29sbmExDTALBgNVBAcTBE1vb28xDTALBgNV
+BAoTBEhheHgxDjAMBgNVBAsTBUNvb2x4MREwDwYDVQQDEwhzdG9yYnJvcjESMBAG
+A1UEAxMJbG9jYWxob3N0MIG5MA0GCSqGSIb3DQEBAQUAA4GnADCBowKBmwNZN+oG
+6vJ8DAze+FvOKSS49X4xGMxALhKRLhQQb7qvM+7BcMgRv+RKxkX7SNgcxKPLcIHf
+7QQ6DBIlLXuAuVHQtWW9b06q64kBElkEwh6gP5Ia9JrRysGbu2U6NRP+xBU33dVw
+ZjF07ocN9Pp392W4VxEc+g3+FkRzUEaahDGOabmjgKuqDdlKdZLzgJj7+9sEKpb7
++FdG56rZAgMBAAGjggEeMIIBGjAUBgNVHREEDTALgglsb2NhbGhvc3QwEQYJYIZI
+AYb4QgEBBAQDAgZAMDMGCWCGSAGG+EIBDQQmFiRDVVJMIHN0dW5uZWwgc2VydmVy
+IHRlc3QgY2VydGlmaWNhdGUwCwYDVR0PBAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUF
+BwMBMAkGA1UdEwQCMAAwHQYDVR0OBBYEFDV3NTubmDy2x5rnqAS5fHCt+jepMDYG
+CCsGAQUFBwELBCowKDAmBggrBgEFBQcwBIYaaHR0cHM6Ly9sb2NhbGhvc3Q6ODQz
+My81MDkwNgYIKwYBBQUHAQEEKjAoMCYGCCsGAQUFBzAEhhpodHRwczovL2xvY2Fs
+aG9zdDo4NDMzLzUwOTANBgkqhkiG9w0BAQUFAAOBnAAARdsJWwhbGv9xUGwSrY54
+Mh195+TTPl/KIISq/5rCtqlIkx9zJ9FoBXY2+cFTkK2KwLMSyBFcLGUBrDHRjmBu
+xvW6nWno8axK3lKUzQYkRXJkiQ9XiyYrFs8LJ8Toc8fT5UI4lVe1u4O0ktTgzfvI
+9dLaHRH+PBggi70iMRxagtT1cY2K4xOCxS3zn9C3uEvSRp2OGteZbsG5oA==
-----END CERTIFICATE-----
-----BEGIN DH PARAMETERS-----
-MEYCQQD+KCcagSasA1QSo8tRXpbaLJJ1Ezt3FJFEZ3RVplp4qZwXQpSZ+Vly3xWx
-q3YvALe/enMbIq8F3OUmppq3UHwTAgEC
+MIGHAoGBAMq/KFGh2oy16WzkFs1U71Uz7dIEKvSYfc+zo439pYyVzcD8MkcC15Zb
+ayK3jPBYf07eKzc2TvI3/ZSducmECNP8gk2gAndP1P1rmpheN+owZJS7kQVfQmHl
+UmT87U99NPaMHXMNOsFj/3mbAaANndKEnd8PM2r5fg16C4+2e5KzAgEC
-----END DH PARAMETERS-----
diff --git a/tests/symbol-scan.pl b/tests/symbol-scan.pl
new file mode 100644
index 00000000..89f5eeff
--- /dev/null
+++ b/tests/symbol-scan.pl
@@ -0,0 +1,176 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2010-2011, Daniel Stenberg, <daniel@haxx.se>, 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 script grew out of help from Przemyslaw Iskra and Balint Szilakszi
+# a late evening in the #curl IRC channel on freenode.
+#
+
+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';
+}
+
+# we may get the dir root pointed out
+my $root=$ARGV[0] || ".";
+
+# need an include directory when building out-of-tree
+my $i = ($ARGV[1]) ? "-I$ARGV[1] " : '';
+
+my $h = "$root/include/curl/curl.h";
+my $mh = "$root/include/curl/multi.h";
+
+my $verbose=0;
+my $summary=0;
+my $misses=0;
+
+my @syms;
+my %doc;
+my %rem;
+
+open H_IN, "-|", "$Cpreprocessor $i$h" || die "Cannot preprocess curl.h";
+while ( <H_IN> ) {
+ if ( /enum\s+(\S+\s+)?{/ .. /}/ ) {
+ s/^\s+//;
+ next unless /^CURL/;
+ chomp;
+ s/[,\s].*//;
+ push @syms, $_;
+ }
+}
+close H_IN || die "Error preprocessing curl.h";
+
+sub scanheader {
+ my ($f)=@_;
+ open H, "<$f";
+ while(<H>) {
+ if (/^#define (CURL[A-Za-z0-9_]*)/) {
+ push @syms, $1;
+ }
+ }
+ close H;
+}
+
+scanheader($h);
+scanheader($mh);
+
+open S, "<$root/docs/libcurl/symbols-in-versions";
+while(<S>) {
+ if(/(^CURL[^ \n]*) *(.*)/) {
+ my ($sym, $rest)=($1, $2);
+ if($doc{$sym}) {
+ print "Detected duplicate symbol: $sym\n";
+ $misses++;
+ next;
+ }
+ $doc{$sym}=$sym;
+ my @a=split(/ +/, $rest);
+ if($a[2]) {
+ # this symbol is documented to have been present the last time
+ # in this release
+ $rem{$sym}=$a[2];
+ }
+ }
+}
+close S;
+
+my $ignored=0;
+for my $e (sort @syms) {
+ # OBSOLETE - names that are just placeholders for a position where we
+ # previously had a name, that is now removed. The OBSOLETE names should
+ # never be used for anything.
+ #
+ # CURL_EXTERN - is a define used for libcurl functions that are external,
+ # public. No app or other code should ever use it.
+ #
+ # *_LAST and *_LASTENTRY are just prefix for the placeholders used for the
+ # last entry in many enum series.
+ #
+
+ if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) {
+ $ignored++;
+ next;
+ }
+ if($doc{$e}) {
+ if($verbose) {
+ print $e."\n";
+ }
+ $doc{$e}="used";
+ next;
+ }
+ else {
+ print $e."\n";
+ $misses++;
+ }
+}
+
+#
+# now scan through all symbols that were present in the symbols-in-versions
+# but not in the headers
+#
+# If the symbols were marked 'removed' in symbols-in-versions we don't output
+# anything about it since that is perfectly fine.
+#
+
+my $anyremoved;
+
+for my $e (sort keys %doc) {
+ if(($doc{$e} ne "used") && !$rem{$e}) {
+
+ if(!$anyremoved++) {
+ print "Missing symbols mentioned in symbols-in-versions\n";
+ print "Add them to a header, or mark them as removed.\n";
+ }
+
+ print "$e\n";
+ $misses++;
+ }
+}
+
+if($summary) {
+ print "Summary:\n";
+ printf "%d symbols in headers (out of which %d are ignored)\n", scalar(@syms),
+ $ignored;
+ printf "%d symbols in headers are interesting\n",
+ scalar(@syms)- $ignored;
+ printf "%d symbols are listed in symbols-in-versions\n (out of which %d are listed as removed)\n", scalar(keys %doc), scalar(keys %rem);
+ printf "%d symbols in symbols-in-versions should match the ones in headers\n", scalar(keys %doc) - scalar(keys %rem);
+}
+
+if($misses) {
+ exit 2; # there are stuff to attend to!
+}
diff --git a/tests/testcurl.1 b/tests/testcurl.1
index 39b7039b..ecea911b 100644
--- a/tests/testcurl.1
+++ b/tests/testcurl.1
@@ -72,7 +72,7 @@ by force, and similar.
File name to read setup from (deprecated). The old style of providing info.
If info is missing when testcurl.pl is started, it will prompt you and then
store the info in a 'setup' file, which it will look for on each invoke. Use
-\fI--name\fP, \fI--emacs\fP, \fI--configure\fP and \fI--desc\fP instead.
+\fI--name\fP, \fI--email\fP, \fI--configure\fP and \fI--desc\fP instead.
.IP "--target=[your os]"
Specify your target environment. Recognized strings include 'vc', 'mingw32',
\&'borland' and 'netware'.
diff --git a/tests/testcurl.html b/tests/testcurl.html
deleted file mode 100644
index 75c4bccb..00000000
--- a/tests/testcurl.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<html><head>
-<title>testcurl.pl man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">testcurl.pl - (automatically) test curl <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">testcurl.pl [options] [dir] &gt; output</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="emphasis">testcurl.pl</span> is the master script to use for automatic testing of curl off git or daily snapshots. It is written for the purpose of being run from a crontab job or similar at a regular interval. The output is suitable to be mailed to curl-autocompile@haxx.se to be dealt with automatically (make sure the subject includes the word "autobuild" as the mail gets silently discarded otherwise). The most current build status (with a reasonable backlog) will be published on the curl site, at <a href="http://curl.haxx.se/auto/">http://curl.haxx.se/auto/</a>
-<p class="level0"><span Class="emphasis">options</span> may be omitted. See <span Class="emphasis">--setup</span> for what happens then.
-<p class="level0"><span Class="emphasis">dir</span> is a curl source dir, possibly a daily snapshot one. Using this will make testcurl.pl skip the 'buildconf' stage and thus it removes the dependency on automake, autoconf, libtool, GNU m4 and possibly a few other things.
-<p class="level0">testcurl.pl will run 'buildconf' (or similar), run configure, build curl and libcurl in a separate build directory and then run 'make test' to test the fresh build. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="--configureoptions"></a><span class="nroffip">--configure=[options]</span>
-<p class="level1">Configure options passed to configure.
-<p class="level0"><a name="--crosscompile"></a><span class="nroffip">--crosscompile</span>
-<p class="level1">This is a cross-compile. Makes <span Class="emphasis">testcurl.pl</span> skip a few things.
-<p class="level0"><a name="--descdesc"></a><span class="nroffip">--desc=[desc]</span>
-<p class="level1">Description of your test system. Displayed on the build summary page on the weba site.
-<p class="level0"><a name="--emailemail"></a><span class="nroffip">--email=[email]</span>
-<p class="level1">Set email address to report as. Displayed in the build logs on the site.
-<p class="level0"><a name="--mktarballcommand"></a><span class="nroffip">--mktarball=[command]</span>
-<p class="level1">Generic command to run after completed test.
-<p class="level0"><a name="--namename"></a><span class="nroffip">--name=[name]</span>
-<p class="level1">Set name to report as. Displayed in the build summary on the site.
-<p class="level0"><a name="--nobuildconf"></a><span class="nroffip">--nobuildconf</span>
-<p class="level1">Don't run buildconf. Useful when many builds use the same source tree, as then only one need to do this. Also, if multiple processes run tests simultaneously on the same source tree (like several hosts on a NFS mounted dir), simultaneous buildconf invokes may cause problems. (Added in 7.14.1)
-<p class="level0"><a name="--nogitpull"></a><span class="nroffip">--nogitpull</span>
-<p class="level1">Don't update from git even though it is a git tree. Useful to still be able to test even though your network is down, or similar.
-<p class="level0"><a name="--runtestoptsoptions"></a><span class="nroffip">--runtestopts=[options]</span>
-<p class="level1">Options that is passed to the runtests.pl script. Useful for disabling valgrind by force, and similar.
-<p class="level0"><a name="--setupfile"></a><span class="nroffip">--setup=[file name]</span>
-<p class="level1">File name to read setup from (deprecated). The old style of providing info. If info is missing when testcurl.pl is started, it will prompt you and then store the info in a 'setup' file, which it will look for on each invoke. Use <span Class="emphasis">--name</span>, <span Class="emphasis">--emacs</span>, <span Class="emphasis">--configure</span> and <span Class="emphasis">--desc</span> instead.
-<p class="level0"><a name="--targetyour"></a><span class="nroffip">--target=[your os]</span>
-<p class="level1">Specify your target environment. Recognized strings include 'vc', 'mingw32', 'borland' and 'netware'. <a name="INITIAL"></a><h2 class="nroffsh">INITIAL SETUP</h2>
-<p class="level0">First you make a checkout from git (or you write a script that downloads daily snapshots automatically, find inspiration at <a href="http://curl.haxx.se/auto/autocurl.txt">http://curl.haxx.se/auto/autocurl.txt</a>):
-<p class="level0"><pre>
-<p class="level0">&nbsp; $ mkdir daily-curl
- &nbsp; $ cd daily-curl
- &nbsp; $ git clone git://github.com/bagder/curl.git
- </pre>
-
-<p class="level0">
-<p class="level0">With the curl sources checked out, or downloaded, you can start testing right away. If you want to use <span Class="emphasis">testcurl.pl</span> without command line arguments and to have it store and remember the config in its 'setup' file, then start it manually now and fill in the answers to the questions it prompts you for:
-<p class="level0"><pre>
-<p class="level0">&nbsp; $ ./curl/tests/testcurl.pl
- </pre>
-
-<p class="level0">
-<p class="level0">Now you are ready to go. If you let the script run, it will perform a full cycle and spit out lots of output. Mail us that output as described above. <a name="CRONTAB"></a><h2 class="nroffsh">CRONTAB EXAMPLE</h2>
-<p class="level0">The crontab could include something like this:
-<p class="level0"><pre>
-<p class="level0"># autobuild curl:
- 0 4 * * * cd daily-curl && ./testit.sh
- </pre>
-
-<p class="level0">
-<p class="level0">Where testit.sh is a shell script that could look similar to this:
-<p class="level0"><pre>
-<p class="level0">mail="mail -s autobuild curl-autocompile@haxx.se"
- name="--name=whoami"
- email="--email=iamme@nowhere"
- desc='"--desc=supermachine Turbo 2000"'
- testprog="perl ./curl/tests/testcurl.pl $name $email $desc"
- opts1="--configure=--enable-debug"
- opts2="--configure=--enable-ipv6"
- <p class="level0"># run first test
- $testprog $opts1 | $mail
- <p class="level0"># run second test
- $testprog $opts2 | $mail
- <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/tests/testcurl.pdf b/tests/testcurl.pdf
deleted file mode 100644
index a15fc993..00000000
--- a/tests/testcurl.pdf
+++ /dev/null
Binary files differ
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index a0fd889b..2b9e0831 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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,9 +46,11 @@
# --extvercmd=[command] Command to use for displaying version with cross compiles.
# --mktarball=[command] Command to run after completed test
# --name=[name] Set name to report as
+# --notes=[notes] More human-readable information about this configuration
# --nocvsup Don't pull from git even though it is a git tree
# --nogitpull Don't pull from git even though it is a git tree
# --nobuildconf Don't run buildconf
+# --noconfigure Don't run configure
# --runtestopts=[options] Options to pass to runtests.pl
# --setup=[file name] File name to read setup from (deprecated)
# --target=[your os] Specify your target environment.
@@ -59,6 +61,7 @@
use strict;
use Cwd;
+use File::Spec;
# Turn on warnings (equivalent to -w, which can't be used with /usr/bin/env)
#BEGIN { $^W = 1; }
@@ -69,10 +72,10 @@ use vars qw($version $fixed $infixed $CURLDIR $git $pwd $build $buildlog
use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
$extvercmd $nogitpull $nobuildconf $crosscompile
- $timestamp);
+ $timestamp $notes);
# version of this script
-$version='2010-08-20';
+$version='2014-11-25';
$fixed=0;
# Determine if we're running from git or a canned copy of curl,
@@ -84,30 +87,35 @@ if (-f ".git/config") {
$git=1;
$setupfile = 'setup';
+$configurebuild = 1;
while ($ARGV[0]) {
if ($ARGV[0] =~ /--target=/) {
- $targetos = (split(/=/, shift @ARGV))[1];
+ $targetos = (split(/=/, shift @ARGV, 2))[1];
}
elsif ($ARGV[0] =~ /--setup=/) {
- $setupfile = (split(/=/, shift @ARGV))[1];
+ $setupfile = (split(/=/, shift @ARGV, 2))[1];
}
elsif ($ARGV[0] =~ /--extvercmd=/) {
- $extvercmd = (split(/=/, shift @ARGV))[1];
+ $extvercmd = (split(/=/, shift @ARGV, 2))[1];
}
elsif ($ARGV[0] =~ /--mktarball=/) {
- $mktarball = (split(/=/, shift @ARGV))[1];
+ $mktarball = (split(/=/, shift @ARGV, 2))[1];
}
elsif ($ARGV[0] =~ /--name=/) {
- $name = (split(/=/, shift @ARGV))[1];
+ $name = (split(/=/, shift @ARGV, 2))[1];
}
elsif ($ARGV[0] =~ /--email=/) {
- $email = (split(/=/, shift @ARGV))[1];
+ $email = (split(/=/, shift @ARGV, 2))[1];
}
elsif ($ARGV[0] =~ /--desc=/) {
- $desc = (split(/=/, shift @ARGV))[1];
+ $desc = (split(/=/, shift @ARGV, 2))[1];
+ }
+ elsif ($ARGV[0] =~ /--notes=/) {
+ $notes = (split(/=/, shift @ARGV, 2))[1];
}
- elsif ($ARGV[0] =~ /--configure=/) {
- $confopts = (split(/=/, shift @ARGV))[1];
+ elsif ($ARGV[0] =~ /--configure=(.*)/) {
+ $confopts = $1;
+ shift @ARGV;
}
elsif (($ARGV[0] eq "--nocvsup") || ($ARGV[0] eq "--nogitpull")) {
$nogitpull=1;
@@ -117,6 +125,10 @@ while ($ARGV[0]) {
$nobuildconf=1;
shift @ARGV;
}
+ elsif ($ARGV[0] =~ /--noconfigure/) {
+ $configurebuild=0;
+ shift @ARGV;
+ }
elsif ($ARGV[0] =~ /--crosscompile/) {
$crosscompile=1;
shift @ARGV;
@@ -131,7 +143,6 @@ while ($ARGV[0]) {
}
# Do the platform-specific stuff here
-$configurebuild = 1;
$confheader = 'curl_config.h';
$binext = '';
$libext = '.la'; # .la since both libcurl and libcares are made with libtool
@@ -252,7 +263,13 @@ sub get_host_triplet {
return $triplet;
}
-if (open(F, "$setupfile")) {
+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")) {
while (<F>) {
if (/(\w+)=(.*)/) {
eval "\$$1=$2;";
@@ -260,7 +277,8 @@ if (open(F, "$setupfile")) {
}
close(F);
$infixed=$fixed;
-} else {
+}
+else {
$infixed=0; # so that "additional args to configure" works properly first time...
}
@@ -302,6 +320,7 @@ if ($fixed < 4) {
print F "email='$email'\n";
print F "desc='$desc'\n";
print F "confopts='$confopts'\n";
+ print F "notes='$notes'\n";
print F "fixed='$fixed'\n";
close(F);
}
@@ -324,13 +343,23 @@ logit 'TRANSFER CONTROL ==== 1120 CHAR LINE' . $str1066os . 'LINE_END';
logit "NAME = $name";
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};
+logit "LIBS = ".$ENV{LIBS};
logit "CC = ".$ENV{CC};
+logit "TMPDIR = ".$ENV{TMPDIR};
logit "MAKEFLAGS = ".$ENV{MAKEFLAGS};
+logit "ACLOCAL_FLAGS = ".$ENV{ACLOCAL_FLAGS};
logit "PKG_CONFIG_PATH = ".$ENV{PKG_CONFIG_PATH};
+logit "DYLD_LIBRARY_PATH = ".$ENV{DYLD_LIBRARY_PATH};
+logit "LD_LIBRARY_PATH = ".$ENV{LD_LIBRARY_PATH};
+logit "LIBRARY_PATH = ".$ENV{LIBRARY_PATH};
+logit "SHLIB_PATH = ".$ENV{SHLIB_PATH};
+logit "LIBPATH = ".$ENV{LIBPATH};
logit "target = ".$targetos;
logit "version = $version"; # script version
logit "date = $timestamp"; # When the test build starts
@@ -341,18 +370,28 @@ $str1066os = undef;
# off that path from all possible logs and error messages etc.
$pwd = getcwd();
+my $have_embedded_ares = 0;
+
if (-d $CURLDIR) {
if ($git && -d "$CURLDIR/.git") {
logit "$CURLDIR is verified to be a fine git source dir";
# remove the generated sources to force them to be re-generated each
# time we run this test
- unlink "$CURLDIR/src/hugehelp.c";
+ unlink "$CURLDIR/src/tool_hugehelp.c";
+ # find out if curl source dir has an in-tree c-ares repo
+ $have_embedded_ares = 1 if (-f "$CURLDIR/ares/GIT-INFO");
} elsif (!$git && -f "$CURLDIR/tests/testcurl.pl") {
- logit "$CURLDIR is verified to be a fine daily source dir"
+ logit "$CURLDIR is verified to be a fine daily source dir";
+ # find out if curl source dir has an in-tree c-ares extracted tarball
+ $have_embedded_ares = 1 if (-f "$CURLDIR/ares/ares_build.h");
} else {
mydie "$CURLDIR is not a daily source dir or checked out from git!"
}
}
+
+# make the path absolute so we can use it everywhere
+$CURLDIR = File::Spec->rel2abs("$CURLDIR");
+
$build="build-$$";
$buildlogname="buildlog-$$";
$buildlog="$pwd/$buildlogname";
@@ -378,40 +417,54 @@ chdir $CURLDIR;
# Do the git thing, or not...
if ($git) {
+ my $gitstat = 0;
+ my @commits;
+
# update quietly to the latest git
if($nogitpull) {
logit "skipping git pull (--nogitpull)";
} else {
- my $gitstat = 0;
- my @commits;
logit "run git pull in curl";
system("git pull 2>&1");
$gitstat += $?;
logit "failed to update from curl git ($?), continue anyway" if ($?);
+
+ # Set timestamp to the UTC the git update took place.
+ $timestamp = scalar(gmtime)." UTC" if (!$gitstat);
+ }
+
+ # get the last 5 commits for show (even if no pull was made)
+ @commits=`git log --pretty=oneline --abbrev-commit -5`;
+ logit "The most recent curl git commits:";
+ for (@commits) {
+ chomp ($_);
+ logit " $_";
+ }
+
+ if (-d "ares/.git") {
+ chdir "ares";
+
+ if($nogitpull) {
+ logit "skipping git pull (--nogitpull) in ares";
+ } else {
+ logit "run git pull in ares";
+ system("git pull 2>&1");
+ $gitstat += $?;
+ logit "failed to update from ares git ($?), continue anyway" if ($?);
+
+ # Set timestamp to the UTC the git update took place.
+ $timestamp = scalar(gmtime)." UTC" if (!$gitstat);
+ }
+
# get the last 5 commits for show (even if no pull was made)
@commits=`git log --pretty=oneline --abbrev-commit -5`;
- logit "The most recent curl git commits:";
+ logit "The most recent ares git commits:";
for (@commits) {
chomp ($_);
logit " $_";
}
- if (-d "ares/.git") {
- chdir "ares";
- logit "run git pull in ares";
- system("git pull 2>&1");
- $gitstat += $?;
- logit "failed to update from ares git ($?), continue anyway" if ($?);
- # get the last 5 commits for show (even if no pull was made)
- @commits=`git log --pretty=oneline --abbrev-commit -5`;
- logit "The most recent ares git commits:";
- for (@commits) {
- chomp ($_);
- logit " $_";
- }
- chdir "$pwd/$CURLDIR";
- }
- # Set timestamp to the UTC the git update took place.
- $timestamp = scalar(gmtime)." UTC" if (!$gitstat);
+
+ chdir "$CURLDIR";
}
if($nobuildconf) {
@@ -423,13 +476,16 @@ if ($git) {
unlink "autom4te.cache";
# generate the build files
- logit "invoke buildconf, but filter off aclocal underquoted definition warnings";
+ logit "invoke buildconf";
open(F, "./buildconf 2>&1 |") or die;
open(LOG, ">$buildlog") or die;
while (<F>) {
- next if /warning: underquoted definition of/;
- print;
- print LOG;
+ my $ll = $_;
+ # ignore messages pertaining to third party m4 files we don't care
+ next if ($ll =~ /aclocal\/gtk\.m4/);
+ next if ($ll =~ /aclocal\/gtkextra\.m4/);
+ print $ll;
+ print LOG $ll;
}
close(F);
close(LOG);
@@ -507,7 +563,7 @@ chdir "$pwd/$build";
if ($configurebuild) {
# run configure script
- print `../$CURLDIR/configure $confopts 2>&1`;
+ print `$CURLDIR/configure $confopts 2>&1`;
if (-f "lib/Makefile") {
logit "configure seems to have finished fine";
@@ -517,26 +573,26 @@ if ($configurebuild) {
} else {
logit "copying files to build dir ...";
if (($^O eq 'MSWin32') && ($targetos !~ /netware/)) {
- system("xcopy /s /q ..\\$CURLDIR .");
+ system("xcopy /s /q \"$CURLDIR\" .");
system("buildconf.bat");
}
elsif ($targetos =~ /netware/) {
- system("cp -afr ../$CURLDIR/* .");
- system("cp -af ../$CURLDIR/Makefile.dist Makefile");
+ system("cp -afr $CURLDIR/* .");
+ system("cp -af $CURLDIR/Makefile.dist Makefile");
system("$make -i -C lib -f Makefile.netware prebuild");
system("$make -i -C src -f Makefile.netware prebuild");
- if (-d "../$CURLDIR/ares") {
+ if (-d "$CURLDIR/ares") {
system("$make -i -C ares -f Makefile.netware prebuild");
}
}
elsif ($^O eq 'linux') {
- system("cp -afr ../$CURLDIR/* .");
- system("cp -af ../$CURLDIR/Makefile.dist Makefile");
- system("cp -af ../$CURLDIR/include/curl/curlbuild.h.dist ./include/curl/curlbuild.h");
+ system("cp -afr $CURLDIR/* .");
+ system("cp -af $CURLDIR/Makefile.dist Makefile");
+ system("cp -af $CURLDIR/include/curl/curlbuild.h.dist ./include/curl/curlbuild.h");
system("$make -i -C lib -f Makefile.$targetos prebuild");
system("$make -i -C src -f Makefile.$targetos prebuild");
- if (-d "../$CURLDIR/ares") {
- system("cp -af ../$CURLDIR/ares/ares_build.h.dist ./ares/ares_build.h");
+ if (-d "$CURLDIR/ares") {
+ system("cp -af $CURLDIR/ares/ares_build.h.dist ./ares/ares_build.h");
system("$make -i -C ares -f Makefile.$targetos prebuild");
}
}
@@ -574,7 +630,8 @@ while (<F>) {
}
close(F);
-if (grepfile("^#define USE_ARES", "lib/$confheader")) {
+if (($have_embedded_ares) &&
+ (grepfile("^#define USE_ARES", "lib/$confheader"))) {
print "\n";
logit "setup to build ares";
@@ -676,6 +733,26 @@ if (!$crosscompile || (($extvercmd ne '') && (-x $extvercmd))) {
}
if ($configurebuild && !$crosscompile) {
+ my $host_triplet = get_host_triplet();
+ # build example programs for selected build targets
+ if(($host_triplet =~ /([^-]+)-([^-]+)-irix(.*)/) ||
+ ($host_triplet =~ /([^-]+)-([^-]+)-aix(.*)/) ||
+ ($host_triplet =~ /([^-]+)-([^-]+)-osf(.*)/) ||
+ ($host_triplet =~ /([^-]+)-([^-]+)-solaris2(.*)/)) {
+ chdir "$pwd/$build/docs/examples";
+ logit_spaced "build examples";
+ open(F, "$make -i 2>&1 |") or die;
+ open(LOG, ">$buildlog") or die;
+ while (<F>) {
+ s/$pwd//g;
+ print;
+ print LOG;
+ }
+ close(F);
+ close(LOG);
+ chdir "$pwd/$build";
+ }
+ # build and run full test suite
my $o;
if($runtestopts) {
$o = "TEST_F=\"$runtestopts\" ";
@@ -705,8 +782,24 @@ if ($configurebuild && !$crosscompile) {
}
else {
if($crosscompile) {
- # build test harness programs for selected cross-compiles
my $host_triplet = get_host_triplet();
+ # build example programs for selected cross-compiles
+ if(($host_triplet =~ /([^-]+)-([^-]+)-mingw(.*)/) ||
+ ($host_triplet =~ /([^-]+)-([^-]+)-android(.*)/)) {
+ chdir "$pwd/$build/docs/examples";
+ logit_spaced "build examples";
+ open(F, "$make -i 2>&1 |") or die;
+ open(LOG, ">$buildlog") or die;
+ while (<F>) {
+ s/$pwd//g;
+ print;
+ print LOG;
+ }
+ close(F);
+ close(LOG);
+ chdir "$pwd/$build";
+ }
+ # build test harness programs for selected cross-compiles
if($host_triplet =~ /([^-]+)-([^-]+)-mingw(.*)/) {
chdir "$pwd/$build/tests";
logit_spaced "build test harness";
diff --git a/tests/tftpserver.pl b/tests/tftpserver.pl
index c5382ec6..60fc32d1 100755
--- a/tests/tftpserver.pl
+++ b/tests/tftpserver.pl
@@ -22,7 +22,8 @@
#***************************************************************************
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
}
use strict;
diff --git a/tests/unit/.gitignore b/tests/unit/.gitignore
new file mode 100644
index 00000000..d5ee1518
--- /dev/null
+++ b/tests/unit/.gitignore
@@ -0,0 +1 @@
+/unit1[36][0-9][0-9]
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
new file mode 100644
index 00000000..4b47f728
--- /dev/null
+++ b/tests/unit/Makefile.am
@@ -0,0 +1,78 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign nostdinc
+
+# 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
+# might possibly already be installed in the system.
+#
+# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
+# $(top_srcdir)/include is for libcurl's external include files
+# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
+# $(top_srcdir)/ares is for in-tree c-ares's external include files
+
+if USE_EMBEDDED_ARES
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/tests/libtest \
+ -I$(top_builddir)/ares \
+ -I$(top_srcdir)/ares
+else
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/tests/libtest
+endif
+
+EXTRA_DIST = Makefile.inc
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
+LDADD = $(top_builddir)/src/libcurltool.la \
+ $(top_builddir)/lib/libcurlu.la \
+ @LDFLAGS@ @LIBCURL_LIBS@
+
+DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+ $(top_builddir)/lib/libcurlu.la
+
+AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS
+
+# Makefile.inc provides neat definitions
+include Makefile.inc
+
+if BUILD_UNITTESTS
+noinst_PROGRAMS = $(UNITPROGS)
+else
+noinst_PROGRAMS =
+endif
diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc
new file mode 100644
index 00000000..9073b34e
--- /dev/null
+++ b/tests/unit/Makefile.inc
@@ -0,0 +1,68 @@
+# these files are used in every single unit test program
+
+UNITFILES = curlcheck.h \
+ ../libtest/test.h \
+ ../libtest/first.c
+
+# These are all unit test programs
+UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307 \
+ unit1308 unit1309 unit1330 unit1394 unit1395 unit1396 unit1397 unit1398 \
+ unit1600 unit1601 unit1602
+
+unit1300_SOURCES = unit1300.c $(UNITFILES)
+unit1300_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1301_SOURCES = unit1301.c $(UNITFILES)
+unit1301_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1302_SOURCES = unit1302.c $(UNITFILES)
+unit1302_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1303_SOURCES = unit1303.c $(UNITFILES)
+unit1303_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1304_SOURCES = unit1304.c $(UNITFILES)
+unit1304_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1305_SOURCES = unit1305.c $(UNITFILES)
+unit1305_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1307_SOURCES = unit1307.c $(UNITFILES)
+unit1307_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1308_SOURCES = unit1308.c $(UNITFILES)
+unit1308_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1309_SOURCES = unit1309.c $(UNITFILES)
+unit1309_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1330_SOURCES = unit1330.c $(UNITFILES)
+unit1330_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1394_SOURCES = unit1394.c $(UNITFILES)
+unit1394_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
+unit1394_LDADD = @LIBMETALINK_LIBS@ $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+unit1394_LDFLAGS = @LIBMETALINK_LDFLAGS@ $(top_builddir)/src/libcurltool.la
+unit1394_LIBS =
+
+unit1395_SOURCES = unit1395.c $(UNITFILES)
+unit1395_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1396_SOURCES = unit1396.c $(UNITFILES)
+unit1396_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1397_SOURCES = unit1397.c $(UNITFILES)
+unit1397_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1398_SOURCES = unit1398.c $(UNITFILES)
+unit1398_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1600_SOURCES = unit1600.c $(UNITFILES)
+unit1600_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1601_SOURCES = unit1601.c $(UNITFILES)
+unit1601_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1602_SOURCES = unit1602.c $(UNITFILES)
+unit1602_CPPFLAGS = $(AM_CPPFLAGS)
+
diff --git a/tests/unit/README b/tests/unit/README
new file mode 100644
index 00000000..301cd17d
--- /dev/null
+++ b/tests/unit/README
@@ -0,0 +1,70 @@
+Unit tests
+==========
+
+The goal is to add tests for *ALL* functions in libcurl. If functions are too
+big and complicated, we should split them into smaller and testable ones.
+
+Build Unit Tests
+================
+
+'./configure --enable-debug' is required for the unit tests to build. To
+enable unit tests, there will be a separate static libcurl built that will be
+used exclusively for linking unit test programs. Just build everything as
+normal, and then you can run the unit test cases as well.
+
+Run Unit Tests
+==============
+
+Unit tests are run as part of the regular test suite. If you have built
+everything to run unit tests, to can do 'make test' at the root level. Or you
+can 'cd tests' and then invoke individual unit tests with ./runtests.pl NNNN
+where NNNN is the specific test number.
+
+Debug Unit Tests
+================
+
+If a specific test fails you will get told. The test case then has output left
+in the log/ subdirectory, but most importantly you can re-run the test again
+using gdb by doing ./runtests.pl -g NNNN. That is, add a -g to make it start
+up gdb and run the same case using that.
+
+Write Unit Tests
+================
+
+We put tests that focus on an area or a specific function into a single C
+source file. The source file should be named 'unitNNNN.c' where NNNN is a
+number that starts with 1300 and you can pick the next free number.
+
+You also need a separate file called tests/data/testNNNN (using the same
+number) that describes your test case. See the test1300 file for inspiration
+and the tests/FILEFORMAT documentation.
+
+For the actual C file, here's a very simple example:
+
+----------------------- start -------------------------------
+#include "curlcheck.h"
+
+#include "a libcurl header.h" /* from the lib dir */
+
+static void unit_setup( void )
+{
+ /* whatever you want done first */
+}
+
+static void unit_stop( void )
+{
+ /* done before shutting down and exiting */
+}
+
+UNITTEST_START
+
+ /* here you start doing things and checking that the results are good */
+
+ fail_unless( size == 0 , "initial size should be zero" );
+ fail_if( head == NULL , "head should not be initiated to NULL" );
+
+ /* you end the test code like this: */
+
+UNITTEST_STOP
+
+----------------------- end -------------------------------
diff --git a/tests/unit/curlcheck.h b/tests/unit/curlcheck.h
new file mode 100644
index 00000000..2e3746bd
--- /dev/null
+++ b/tests/unit/curlcheck.h
@@ -0,0 +1,100 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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"
+
+/* The fail macros mark the current test step as failed, and continue */
+#define fail_if(expr, msg) \
+ if(expr) { \
+ fprintf(stderr, "%s:%d Assertion '%s' met: %s\n" , \
+ __FILE__, __LINE__, #expr, msg); \
+ unitfail++; \
+ }
+
+#define fail_unless(expr, msg) \
+ if(!(expr)) { \
+ fprintf(stderr, "%s:%d Assertion '%s' failed: %s\n", \
+ __FILE__, __LINE__, #expr, msg); \
+ unitfail++; \
+ }
+
+#define verify_memory(dynamic, check, len) \
+ if(dynamic && memcmp(dynamic, check, len)) { \
+ fprintf(stderr, "%s:%d Memory buffer mismatch size %d. '%s' is not\n", \
+ __FILE__, __LINE__, len, hexdump((unsigned char *)check, len)); \
+ fprintf(stderr, "%s:%d the same as '%s'\n", \
+ __FILE__, __LINE__, hexdump((unsigned char *)dynamic, len)); \
+ unitfail++; \
+ }
+
+/* fail() is for when the test case figured out by itself that a check
+ proved a failure */
+#define fail(msg) do { \
+ fprintf(stderr, "%s:%d test failed: '%s'\n", \
+ __FILE__, __LINE__, msg); \
+ unitfail++; \
+ } WHILE_FALSE
+
+
+/* The abort macros mark the current test step as failed, and exit the test */
+#define abort_if(expr, msg) \
+ if(expr) { \
+ fprintf(stderr, "%s:%d Abort assertion '%s' met: %s\n" , \
+ __FILE__, __LINE__, #expr, msg); \
+ unitfail++; \
+ goto unit_test_abort; \
+ }
+
+#define abort_unless(expr, msg) \
+ if(!(expr)) { \
+ fprintf(stderr, "%s:%d Abort assertion '%s' failed: %s\n", \
+ __FILE__, __LINE__, #expr, msg); \
+ unitfail++; \
+ goto unit_test_abort; \
+ }
+
+#define abort_test(msg) do { \
+ fprintf(stderr, "%s:%d test aborted: '%s'\n", \
+ __FILE__, __LINE__, msg); \
+ unitfail++; \
+ goto unit_test_abort; \
+ } WHILE_FALSE
+
+
+
+extern int unitfail;
+
+#define UNITTEST_START \
+ int test(char *arg) \
+ { \
+ (void)arg; \
+ if (unit_setup()) { \
+ fail("unit_setup() failure"); \
+ } else {
+
+#define UNITTEST_STOP \
+ goto unit_test_abort; /* avoid warning */ \
+unit_test_abort: \
+ unit_stop(); \
+ } \
+ return unitfail; \
+ }
+
diff --git a/tests/unit/unit1300.c b/tests/unit/unit1300.c
new file mode 100644
index 00000000..2b834168
--- /dev/null
+++ b/tests/unit/unit1300.c
@@ -0,0 +1,292 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "llist.h"
+
+static struct curl_llist *llist;
+
+static struct curl_llist *llist_destination;
+
+static void test_curl_llist_dtor(void *key, void *value)
+{
+ /* used by the llist API, does nothing here */
+ (void)key;
+ (void)value;
+}
+
+static CURLcode unit_setup(void)
+{
+ llist = Curl_llist_alloc(test_curl_llist_dtor);
+ if(!llist)
+ return CURLE_OUT_OF_MEMORY;
+ llist_destination = Curl_llist_alloc(test_curl_llist_dtor);
+ if(!llist_destination) {
+ Curl_llist_destroy(llist, NULL);
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+ Curl_llist_destroy(llist, NULL);
+ Curl_llist_destroy(llist_destination, NULL);
+}
+
+UNITTEST_START
+ int unusedData_case1 = 1;
+ int unusedData_case2 = 2;
+ int unusedData_case3 = 3;
+ struct curl_llist_element *head;
+ struct curl_llist_element *element_next;
+ struct curl_llist_element *element_prev;
+ struct curl_llist_element *to_remove;
+ size_t llist_size = Curl_llist_count(llist);
+ int curlErrCode = 0;
+
+ /**
+ * testing llist_init
+ * case 1:
+ * list initiation
+ * @assumptions:
+ * 1: list size will be 0
+ * 2: list head will be NULL
+ * 3: list tail will be NULL
+ * 4: list dtor will be NULL
+ */
+
+ fail_unless(llist->size == 0, "list initial size should be zero");
+ fail_unless(llist->head == NULL, "list head should initiate to NULL");
+ fail_unless(llist->tail == NULL, "list tail should intiate to NULL");
+ fail_unless(llist->dtor == test_curl_llist_dtor,
+ "list dtor shold initiate to test_curl_llist_dtor");
+
+ /**
+ * testing Curl_llist_insert_next
+ * case 1:
+ * list is empty
+ * @assumptions:
+ * 1: list size will be 1
+ * 2: list head will hold the data "unusedData_case1"
+ * 3: list tail will be the same as list head
+ */
+
+ curlErrCode = Curl_llist_insert_next(llist, llist->head, &unusedData_case1);
+ if(curlErrCode == 1) {
+ fail_unless(Curl_llist_count(llist) == 1,
+ "List size should be 1 after adding a new element");
+ /*test that the list head data holds my unusedData */
+ fail_unless(llist->head->ptr == &unusedData_case1,
+ "List size should be 1 after adding a new element");
+ /*same goes for the list tail */
+ fail_unless(llist->tail == llist->head,
+ "List size should be 1 after adding a new element");
+
+ /**
+ * testing Curl_llist_insert_next
+ * case 2:
+ * list has 1 element, adding one element after the head
+ * @assumptions:
+ * 1: the element next to head should be our newly created element
+ * 2: the list tail should be our newly created element
+ */
+
+ curlErrCode = Curl_llist_insert_next(llist, llist->head,
+ &unusedData_case3);
+ if(curlErrCode == 1) {
+ fail_unless(llist->head->next->ptr == &unusedData_case3,
+ "the node next to head is not getting set correctly");
+ fail_unless(llist->tail->ptr == &unusedData_case3,
+ "the list tail is not getting set correctly");
+ }
+ else {
+ printf("skipping Curl_llist_insert_next as a non "
+ "success error code was returned\n");
+ }
+
+ /**
+ * testing Curl_llist_insert_next
+ * case 3:
+ * list has >1 element, adding one element after "NULL"
+ * @assumptions:
+ * 1: the element next to head should be our newly created element
+ * 2: the list tail should different from newly created element
+ */
+
+ curlErrCode = Curl_llist_insert_next(llist, llist->head,
+ &unusedData_case2);
+ if(curlErrCode == 1) {
+ fail_unless(llist->head->next->ptr == &unusedData_case2,
+ "the node next to head is not getting set correctly");
+ /* better safe than sorry, check that the tail isn't corrupted */
+ fail_unless(llist->tail->ptr != &unusedData_case2,
+ "the list tail is not getting set correctly");
+ }
+ else {
+ printf("skipping Curl_llist_insert_next as a non "
+ "success error code was returned\n");
+ }
+
+ }
+ else {
+ printf("skipping Curl_llist_insert_next as a non "
+ "success error code was returned\n");
+ }
+
+ /* unit tests for Curl_llist_remove */
+
+ /**
+ * case 1:
+ * list has >1 element, removing head
+ * @assumptions:
+ * 1: list size will be decremented by one
+ * 2: head will be the head->next
+ * 3: "new" head's previous will be NULL
+ */
+
+ head=llist->head;
+ abort_unless(head, "llist->head is NULL");
+ element_next = head->next;
+ llist_size = Curl_llist_count(llist);
+
+ Curl_llist_remove(llist, llist->head, NULL);
+
+ fail_unless(Curl_llist_count(llist) == (llist_size-1),
+ "llist size not decremented as expected");
+ fail_unless(llist->head == element_next,
+ "llist new head not modified properly");
+ abort_unless(llist->head, "llist->head is NULL");
+ fail_unless(llist->head->prev == NULL,
+ "new head previous not set to null");
+
+ /**
+ * case 2:
+ * removing non head element, with list having >=2 elements
+ * @setup:
+ * 1: insert another element to the list to make element >=2
+ * @assumptions:
+ * 1: list size will be decremented by one ; tested
+ * 2: element->previous->next will be element->next
+ * 3: element->next->previous will be element->previous
+ */
+ Curl_llist_insert_next(llist, llist->head, &unusedData_case3);
+ llist_size = Curl_llist_count(llist);
+ to_remove = llist->head->next;
+ abort_unless(to_remove, "to_remove is NULL");
+ element_next = to_remove->next;
+ element_prev = to_remove->prev;
+ Curl_llist_remove(llist, to_remove, NULL);
+ fail_unless(element_prev->next == element_next,
+ "element previous->next is not being adjusted");
+ abort_unless(element_next, "element_next is NULL");
+ fail_unless(element_next->prev == element_prev,
+ "element next->previous is not being adjusted");
+
+ /**
+ * case 3:
+ * removing the tail with list having >=1 element
+ * @assumptions
+ * 1: list size will be decremented by one ;tested
+ * 2: element->previous->next will be element->next ;tested
+ * 3: element->next->previous will be element->previous ;tested
+ * 4: list->tail will be tail->previous
+ */
+
+ to_remove = llist->tail;
+ element_prev = to_remove->prev;
+ Curl_llist_remove(llist, to_remove, NULL);
+ fail_unless(llist->tail == element_prev,
+ "llist tail is not being adjusted when removing tail");
+
+ /**
+ * case 4:
+ * removing head with list having 1 element
+ * @assumptions:
+ * 1: list size will be decremented by one ;tested
+ * 2: list head will be null
+ * 3: list tail will be null
+ */
+
+ to_remove = llist->head;
+ Curl_llist_remove(llist, to_remove, NULL);
+ fail_unless(llist->head == NULL,
+ "llist head is not NULL while the llist is empty");
+ fail_unless(llist->tail == NULL,
+ "llist tail is not NULL while the llist is empty");
+
+ /* @testing Curl_llist_move(struct curl_llist *,
+ * struct curl_llist_element *, struct curl_llist *,
+ * struct curl_llist_element *);
+ */
+
+ /**
+ * @case 1:
+ * moving head from an llist containg one element to an empty llist
+ * @assumptions:
+ * 1: llist size will be 0
+ * 2: llist_destination size will be 1
+ * 3: llist head will be NULL
+ * 4: llist_destination head == llist_destination tail != NULL
+ */
+
+ /*
+ * @setup
+ * add one element to the list
+ */
+
+ curlErrCode = Curl_llist_insert_next(llist, llist->head, &unusedData_case1);
+ /* necessary assertions */
+
+ abort_unless(curlErrCode == 1,
+ "Curl_llist_insert_next returned an error, Can't move on with test");
+ abort_unless(Curl_llist_count(llist) == 1,
+ "Number of list elements is not as expected, Aborting");
+ abort_unless(Curl_llist_count(llist_destination) == 0,
+ "Number of list elements is not as expected, Aborting");
+
+ /*actual testing code*/
+ curlErrCode = Curl_llist_move(llist, llist->head, llist_destination, NULL);
+ abort_unless(curlErrCode == 1,
+ "Curl_llist_move returned an error, Can't move on with test");
+ fail_unless(Curl_llist_count(llist) == 0,
+ "moving element from llist didn't decrement the size");
+
+ fail_unless(Curl_llist_count(llist_destination) == 1,
+ "moving element to llist_destination didn't increment the size");
+
+ fail_unless(llist->head == NULL,
+ "llist head not set to null after moving the head");
+
+ fail_unless(llist_destination->head != NULL,
+ "llist_destination head set to null after moving an element");
+
+ fail_unless(llist_destination->tail != NULL,
+ "llist_destination tail set to null after moving an element");
+
+ fail_unless(llist_destination->tail == llist_destination->tail,
+ "llist_destination tail doesn't equal llist_destination head");
+
+
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1301.c b/tests/unit/unit1301.c
new file mode 100644
index 00000000..47df481a
--- /dev/null
+++ b/tests/unit/unit1301.c
@@ -0,0 +1,54 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "strequal.h"
+
+static CURLcode unit_setup( void ) {return CURLE_OK;}
+static void unit_stop( void ) {}
+
+UNITTEST_START
+
+int rc;
+
+rc = curl_strequal("iii", "III");
+fail_unless( rc != 0 , "return code should be zero" );
+
+rc = curl_strequal("iiia", "III");
+fail_unless( rc == 0 , "return code should be zero" );
+
+rc = curl_strequal("iii", "IIIa");
+fail_unless( rc == 0 , "return code should be zero" );
+
+rc = curl_strequal("iiiA", "IIIa");
+fail_unless( rc != 0 , "return code should be non-zero" );
+
+rc = curl_strnequal("iii", "III", 3);
+fail_unless( rc != 0 , "return code should be non-zero" );
+
+rc = curl_strnequal("iiiABC", "IIIcba", 3);
+fail_unless( rc != 0 , "return code should be non-zero" );
+
+rc = curl_strnequal("ii", "II", 3);
+fail_unless( rc != 0 , "return code should be non-zero" );
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1302.c b/tests/unit/unit1302.c
new file mode 100644
index 00000000..412a71f0
--- /dev/null
+++ b/tests/unit/unit1302.c
@@ -0,0 +1,157 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "urldata.h"
+#include "url.h" /* for Curl_safefree */
+#include "curl_base64.h"
+#include "memdebug.h" /* LAST include file */
+
+static struct SessionHandle *data;
+
+static CURLcode unit_setup( void )
+{
+ data = curl_easy_init();
+ if(!data)
+ return CURLE_OUT_OF_MEMORY;
+ return CURLE_OK;
+}
+
+static void unit_stop( void )
+{
+ curl_easy_cleanup(data);
+}
+
+UNITTEST_START
+
+char *output;
+unsigned char *decoded;
+size_t size = 0;
+unsigned char anychar = 'x';
+CURLcode rc;
+
+rc = Curl_base64_encode(data, "i", 1, &output, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 4, "size should be 4");
+verify_memory( output, "aQ==", 4);
+Curl_safefree(output);
+
+rc = Curl_base64_encode(data, "ii", 2, &output, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 4, "size should be 4");
+verify_memory( output, "aWk=", 4);
+Curl_safefree(output);
+
+rc = Curl_base64_encode(data, "iii", 3, &output, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 4, "size should be 4");
+verify_memory( output, "aWlp", 4);
+Curl_safefree(output);
+
+rc = Curl_base64_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);
+
+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");
+fail_unless(size == 8, "size should be 8");
+verify_memory( output, "aWlpaQ==", 8);
+Curl_safefree(output);
+
+rc = Curl_base64_decode("aWlpaQ==", &decoded, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 4, "size should be 4");
+verify_memory(decoded, "iiii", 4);
+Curl_safefree(decoded);
+
+rc = Curl_base64_decode("aWlp", &decoded, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 3, "size should be 3");
+verify_memory(decoded, "iii", 3);
+Curl_safefree(decoded);
+
+rc = Curl_base64_decode("aWk=", &decoded, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 2, "size should be 2");
+verify_memory(decoded, "ii", 2);
+Curl_safefree(decoded);
+
+rc = Curl_base64_decode("aQ==", &decoded, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 1, "size should be 1");
+verify_memory(decoded, "i", 2);
+Curl_safefree(decoded);
+
+/* This is illegal input as the data is too short */
+size = 1; /* not zero */
+decoded = &anychar; /* not NULL */
+rc = Curl_base64_decode("aQ", &decoded, &size);
+fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING");
+fail_unless(size == 0, "size should be 0");
+fail_if(decoded, "returned pointer should be NULL");
+
+/* This is illegal input as it contains three padding characters */
+size = 1; /* not zero */
+decoded = &anychar; /* not NULL */
+rc = Curl_base64_decode("a===", &decoded, &size);
+fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING");
+fail_unless(size == 0, "size should be 0");
+fail_if(decoded, "returned pointer should be NULL");
+
+/* This is illegal input as it contains a padding character mid input */
+size = 1; /* not zero */
+decoded = &anychar; /* not NULL */
+rc = Curl_base64_decode("a=Q=", &decoded, &size);
+fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING");
+fail_unless(size == 0, "size should be 0");
+fail_if(decoded, "returned pointer should be NULL");
+
+/* This is garbage input as it contains an illegal base64 character */
+size = 1; /* not zero */
+decoded = &anychar; /* not NULL */
+rc = Curl_base64_decode("a\x1f==", &decoded, &size);
+fail_unless(rc == CURLE_BAD_CONTENT_ENCODING, "return code should be CURLE_BAD_CONTENT_ENCODING");
+fail_unless(size == 0, "size should be 0");
+fail_if(decoded, "returned pointer should be NULL");
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1303.c b/tests/unit/unit1303.c
new file mode 100644
index 00000000..b48a6250
--- /dev/null
+++ b/tests/unit/unit1303.c
@@ -0,0 +1,146 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "urldata.h"
+#include "connect.h"
+#include "memdebug.h" /* LAST include file */
+
+static struct SessionHandle *data;
+
+static CURLcode unit_setup( void )
+{
+ data = curl_easy_init();
+ if (!data)
+ return CURLE_OUT_OF_MEMORY;
+ return CURLE_OK;
+}
+
+static void unit_stop( void )
+{
+ curl_easy_cleanup(data);
+}
+
+/* BASE is just a define to make us fool around with decently large number so
+ that we aren't zero-based */
+#define BASE 1000000
+
+/* macro to set the pretended current time */
+#define NOW(x,y) now.tv_sec = x; now.tv_usec = y
+/* macro to set the millisecond based timeouts to use */
+#define TIMEOUTS(x,y) data->set.timeout = x; data->set.connecttimeout = y
+
+/*
+ * To test:
+ *
+ * 00/10/01/11 timeouts set
+ * 0/1 during connect
+ * T various values on the timeouts
+ * N various values of now
+ */
+
+struct timetest {
+ int now_s;
+ int now_us;
+ int timeout_ms;
+ int connecttimeout_ms;
+ bool connecting;
+ long result;
+ const char *comment;
+};
+
+UNITTEST_START
+
+struct timeval now;
+long timeout;
+unsigned int i;
+
+const struct timetest run[] = {
+ /* both timeouts set, not connecting */
+ {BASE + 4, 0, 10000, 8000, FALSE, 6000, "6 seconds should be left"},
+ {BASE + 4, 990000, 10000, 8000, FALSE, 5010, "5010 ms should be left"},
+ {BASE + 10, 0, 10000, 8000, FALSE, -1, "timeout is -1, expired"},
+ {BASE + 12, 0, 10000, 8000, FALSE, -2000, "-2000, overdue 2 seconds"},
+
+ /* both timeouts set, connecting */
+ {BASE + 4, 0, 10000, 8000, TRUE, 4000, "4 seconds should be left"},
+ {BASE + 4, 990000, 10000, 8000, TRUE, 3010, "3010 ms should be left"},
+ {BASE + 8, 0, 10000, 8000, TRUE, -1, "timeout is -1, expired"},
+ {BASE + 10, 0, 10000, 8000, TRUE, -2000, "-2000, overdue 2 seconds"},
+
+ /* no connect timeout set, not connecting */
+ {BASE + 4, 0, 10000, 0, FALSE, 6000, "6 seconds should be left"},
+ {BASE + 4, 990000, 10000, 0, FALSE, 5010, "5010 ms should be left"},
+ {BASE + 10, 0, 10000, 0, FALSE, -1, "timeout is -1, expired"},
+ {BASE + 12, 0, 10000, 0, FALSE, -2000, "-2000, overdue 2 seconds"},
+
+ /* no connect timeout set, connecting */
+ {BASE + 4, 0, 10000, 0, FALSE, 6000, "6 seconds should be left"},
+ {BASE + 4, 990000, 10000, 0, FALSE, 5010, "5010 ms should be left"},
+ {BASE + 10, 0, 10000, 0, FALSE, -1, "timeout is -1, expired"},
+ {BASE + 12, 0, 10000, 0, FALSE, -2000, "-2000, overdue 2 seconds"},
+
+ /* only connect timeout set, not connecting */
+ {BASE + 4, 0, 0, 10000, FALSE, 0, "no timeout active"},
+ {BASE + 4, 990000, 0, 10000, FALSE, 0, "no timeout active"},
+ {BASE + 10, 0, 0, 10000, FALSE, 0, "no timeout active"},
+ {BASE + 12, 0, 0, 10000, FALSE, 0, "no timeout active"},
+
+ /* only connect timeout set, connecting */
+ {BASE + 4, 0, 0, 10000, TRUE, 6000, "6 seconds should be left"},
+ {BASE + 4, 990000, 0, 10000, TRUE, 5010, "5010 ms should be left"},
+ {BASE + 10, 0, 0, 10000, TRUE, -1, "timeout is -1, expired"},
+ {BASE + 12, 0, 0, 10000, TRUE, -2000, "-2000, overdue 2 seconds"},
+
+ /* no timeout set, not connecting */
+ {BASE + 4, 0, 0, 0, FALSE, 0, "no timeout active"},
+ {BASE + 4, 990000, 0, 0, FALSE, 0, "no timeout active"},
+ {BASE + 10, 0, 0, 0, FALSE, 0, "no timeout active"},
+ {BASE + 12, 0, 0, 0, FALSE, 0, "no timeout active"},
+
+ /* no timeout set, connecting */
+ {BASE + 4, 0, 0, 0, TRUE, 296000, "no timeout active"},
+ {BASE + 4, 990000, 0, 0, TRUE, 295010, "no timeout active"},
+ {BASE + 10, 0, 0, 0, TRUE, 290000, "no timeout active"},
+ {BASE + 12, 0, 0, 0, TRUE, 288000, "no timeout active"},
+
+ /* both timeouts set, connecting, connect timeout the longer one */
+ {BASE + 4, 0, 10000, 12000, TRUE, 6000, "6 seconds should be left"},
+
+};
+
+/* this is the pretended start time of the transfer */
+data->progress.t_startsingle.tv_sec = BASE;
+data->progress.t_startsingle.tv_usec = 0;
+data->progress.t_startop.tv_sec = BASE;
+data->progress.t_startop.tv_usec = 0;
+
+for(i=0; i < sizeof(run)/sizeof(run[0]); i++) {
+ NOW(run[i].now_s, run[i].now_us);
+ TIMEOUTS(run[i].timeout_ms, run[i].connecttimeout_ms);
+ timeout = Curl_timeleft(data, &now, run[i].connecting);
+ if(timeout != run[i].result)
+ fail(run[i].comment);
+}
+
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1304.c b/tests/unit/unit1304.c
new file mode 100644
index 00000000..12b02736
--- /dev/null
+++ b/tests/unit/unit1304.c
@@ -0,0 +1,185 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+#include "netrc.h"
+#include "memdebug.h" /* LAST include file */
+
+static char *login;
+static char *password;
+static char filename[64];
+
+static CURLcode unit_setup(void)
+{
+ password = strdup("");
+ login = strdup("");
+ if (!password || !login) {
+ Curl_safefree(password);
+ Curl_safefree(login);
+ return CURLE_OUT_OF_MEMORY;
+ }
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+ Curl_safefree(password);
+ Curl_safefree(login);
+}
+
+UNITTEST_START
+ int result;
+
+ static const char* const filename1 = "log/netrc1304";
+ memcpy(filename, filename1, strlen(filename1));
+
+ /*
+ * Test a non existent host in our netrc file.
+ */
+ result = Curl_parsenetrc("test.example.com", &login, &password, filename);
+ fail_unless(result == 1, "Host not found should return 1");
+ abort_unless(password != NULL, "returned NULL!");
+ fail_unless(password[0] == 0, "password should not have been changed");
+ abort_unless(login != NULL, "returned NULL!");
+ fail_unless(login[0] == 0, "login should not have been changed");
+
+ /*
+ * Test a non existent login in our netrc file.
+ */
+ free(login);
+ login = strdup("me");
+ abort_unless(login != NULL, "returned NULL!");
+ result = Curl_parsenetrc("example.com", &login, &password, filename);
+ fail_unless(result == 0, "Host should be found");
+ abort_unless(password != NULL, "returned NULL!");
+ fail_unless(password[0] == 0, "password should not have been changed");
+ abort_unless(login != NULL, "returned NULL!");
+ fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed");
+
+ /*
+ * Test a non existent login and host in our netrc file.
+ */
+ free(login);
+ login = strdup("me");
+ abort_unless(login != NULL, "returned NULL!");
+ result = Curl_parsenetrc("test.example.com", &login, &password, filename);
+ fail_unless(result == 1, "Host should be found");
+ abort_unless(password != NULL, "returned NULL!");
+ fail_unless(password[0] == 0, "password should not have been changed");
+ abort_unless(login != NULL, "returned NULL!");
+ fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed");
+
+ /*
+ * Test a non existent login (substring of an existing one) in our
+ * netrc file.
+ */
+ free(login);
+ login = strdup("admi");
+ abort_unless(login != NULL, "returned NULL!");
+ result = Curl_parsenetrc("example.com", &login, &password, filename);
+ fail_unless(result == 0, "Host should be found");
+ abort_unless(password != NULL, "returned NULL!");
+ fail_unless(password[0] == 0, "password should not have been changed");
+ abort_unless(login != NULL, "returned NULL!");
+ fail_unless(strncmp(login, "admi", 4) == 0, "login should not have been changed");
+
+ /*
+ * Test a non existent login (superstring of an existing one)
+ * in our netrc file.
+ */
+ free(login);
+ login = strdup("adminn");
+ abort_unless(login != NULL, "returned NULL!");
+ result = Curl_parsenetrc("example.com", &login, &password, filename);
+ fail_unless(result == 0, "Host should be found");
+ abort_unless(password != NULL, "returned NULL!");
+ fail_unless(password[0] == 0, "password should not have been changed");
+ abort_unless(login != NULL, "returned NULL!");
+ fail_unless(strncmp(login, "adminn", 6) == 0, "login should not have been changed");
+
+ /*
+ * Test for the first existing host in our netrc file
+ * with login[0] = 0.
+ */
+ free(login);
+ login = strdup("");
+ abort_unless(login != NULL, "returned NULL!");
+ result = Curl_parsenetrc("example.com", &login, &password, filename);
+ fail_unless(result == 0, "Host should have been found");
+ abort_unless(password != NULL, "returned NULL!");
+ fail_unless(strncmp(password, "passwd", 6) == 0,
+ "password should be 'passwd'");
+ abort_unless(login != NULL, "returned NULL!");
+ fail_unless(strncmp(login, "admin", 5) == 0, "login should be 'admin'");
+
+ /*
+ * Test for the first existing host in our netrc file
+ * with login[0] != 0.
+ */
+ free(password);
+ password = strdup("");
+ abort_unless(password != NULL, "returned NULL!");
+ result = Curl_parsenetrc("example.com", &login, &password, filename);
+ fail_unless(result == 0, "Host should have been found");
+ abort_unless(password != NULL, "returned NULL!");
+ fail_unless(strncmp(password, "passwd", 6) == 0,
+ "password should be 'passwd'");
+ abort_unless(login != NULL, "returned NULL!");
+ fail_unless(strncmp(login, "admin", 5) == 0, "login should be 'admin'");
+
+ /*
+ * Test for the second existing host in our netrc file
+ * with login[0] = 0.
+ */
+ free(password);
+ password = strdup("");
+ abort_unless(password != NULL, "returned NULL!");
+ free(login);
+ login = strdup("");
+ abort_unless(login != NULL, "returned NULL!");
+ result = Curl_parsenetrc("curl.example.com", &login, &password, filename);
+ fail_unless(result == 0, "Host should have been found");
+ abort_unless(password != NULL, "returned NULL!");
+ fail_unless(strncmp(password, "none", 4) == 0,
+ "password should be 'none'");
+ abort_unless(login != NULL, "returned NULL!");
+ fail_unless(strncmp(login, "none", 4) == 0, "login should be 'none'");
+
+ /*
+ * Test for the second existing host in our netrc file
+ * with login[0] != 0.
+ */
+ free(password);
+ password = strdup("");
+ abort_unless(password != NULL, "returned NULL!");
+ result = Curl_parsenetrc("curl.example.com", &login, &password, filename);
+ fail_unless(result == 0, "Host should have been found");
+ abort_unless(password != NULL, "returned NULL!");
+ fail_unless(strncmp(password, "none", 4) == 0,
+ "password should be 'none'");
+ abort_unless(login != NULL, "returned NULL!");
+ fail_unless(strncmp(login, "none", 4) == 0, "login should be 'none'");
+
+ /* TODO:
+ * Test over the size limit password / login!
+ * Test files with a bad format
+ */
+UNITTEST_STOP
diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c
new file mode 100644
index 00000000..96913f1f
--- /dev/null
+++ b/tests/unit/unit1305.c
@@ -0,0 +1,141 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+#include "curlx.h"
+
+#include "hash.h"
+#include "hostip.h"
+
+#include "memdebug.h" /* LAST include file */
+
+static struct SessionHandle *data;
+static struct curl_hash hp;
+static char *data_key;
+static struct Curl_dns_entry *data_node;
+
+static CURLcode unit_setup( void )
+{
+ int rc;
+ data = curl_easy_init();
+ if (!data)
+ return CURLE_OUT_OF_MEMORY;
+
+ rc = Curl_mk_dnscache(&hp);
+ if(rc) {
+ curl_easy_cleanup(data);
+ curl_global_cleanup();
+ return CURLE_OUT_OF_MEMORY;
+ }
+ return CURLE_OK;
+}
+
+static void unit_stop( void )
+{
+ if (data_node) {
+ Curl_freeaddrinfo(data_node->addr);
+ free(data_node);
+ }
+ free(data_key);
+ Curl_hash_destroy(&hp);
+
+ curl_easy_cleanup(data);
+ curl_global_cleanup();
+}
+
+static Curl_addrinfo *fake_ai(void)
+{
+ static Curl_addrinfo *ai;
+ int ss_size;
+
+ ss_size = sizeof (struct sockaddr_in);
+
+ if((ai = calloc(1, sizeof(Curl_addrinfo))) == NULL)
+ return NULL;
+
+ if((ai->ai_canonname = strdup("dummy")) == NULL) {
+ free(ai);
+ return NULL;
+ }
+
+ if((ai->ai_addr = calloc(1, ss_size)) == NULL) {
+ free(ai->ai_canonname);
+ free(ai);
+ return NULL;
+ }
+
+ ai->ai_family = AF_INET;
+ ai->ai_addrlen = ss_size;
+
+ return ai;
+}
+
+static CURLcode create_node(void)
+{
+ data_key = aprintf("%s:%d", "dummy", 0);
+ if (!data_key)
+ return CURLE_OUT_OF_MEMORY;
+
+ data_node = calloc(1, sizeof(struct Curl_dns_entry));
+ if (!data_node)
+ return CURLE_OUT_OF_MEMORY;
+
+ data_node->addr = fake_ai();
+ if (!data_node->addr)
+ return CURLE_OUT_OF_MEMORY;
+
+ return CURLE_OK;
+}
+
+
+UNITTEST_START
+
+ struct Curl_dns_entry *nodep;
+ size_t key_len;
+
+ /* Test 1305 exits without adding anything to the hash */
+ if (strcmp(arg, "1305") != 0) {
+ CURLcode rc = create_node();
+ abort_unless(rc == CURLE_OK, "data node creation failed");
+ key_len = strlen(data_key);
+
+ data_node->inuse = 1; /* hash will hold the reference */
+ nodep = Curl_hash_add(&hp, data_key, key_len+1, data_node);
+ abort_unless(nodep, "insertion into hash failed");
+ /* Freeing will now be done by Curl_hash_destroy */
+ data_node = NULL;
+
+ /* To do: test retrieval, deletion, edge conditions */
+ }
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1307.c b/tests/unit/unit1307.c
new file mode 100644
index 00000000..c26e80cd
--- /dev/null
+++ b/tests/unit/unit1307.c
@@ -0,0 +1,234 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "curl_fnmatch.h"
+
+#define MATCH CURL_FNMATCH_MATCH
+#define NOMATCH CURL_FNMATCH_NOMATCH
+#define RE_ERR CURL_FNMATCH_FAIL
+
+#define MAX_PATTERN_L 100
+#define MAX_STRING_L 100
+
+struct testcase {
+ char pattern[MAX_PATTERN_L];
+ char string[MAX_STRING_L];
+ int result;
+};
+
+static const struct testcase tests[] = {
+ /* brackets syntax */
+ { "\\[", "[", MATCH },
+ { "[", "[", RE_ERR },
+ { "[]", "[]", RE_ERR },
+ { "[][]", "[", MATCH },
+ { "[][]", "]", MATCH },
+ { "[[]", "[", MATCH },
+ { "[[[]", "[", MATCH },
+ { "[[[[]", "[", MATCH },
+ { "[[[[]", "[", MATCH },
+
+ { "[][[]", "]", MATCH },
+ { "[][[[]", "[", MATCH },
+ { "[[]", "]", NOMATCH },
+
+ { "[a-z]", "a", MATCH },
+ { "[a-z]", "A", NOMATCH },
+ { "?[a-z]", "?Z", NOMATCH },
+ { "[A-Z]", "C", MATCH },
+ { "[A-Z]", "c", NOMATCH },
+ { "[0-9]", "7", MATCH },
+ { "[7-8]", "7", MATCH },
+ { "[7-]", "7", MATCH },
+ { "[7-]", "-", MATCH },
+ { "[7-]", "[", NOMATCH },
+ { "[a-bA-F]", "F", MATCH },
+ { "[a-bA-B9]", "9", MATCH },
+ { "[a-bA-B98]", "8", MATCH },
+ { "[a-bA-B98]", "C", NOMATCH },
+ { "[a-bA-Z9]", "F", MATCH },
+ { "[a-bA-Z9]ero*", "Zero chance.", MATCH },
+ { "S[a-][x]opho*", "Saxophone", MATCH },
+ { "S[a-][x]opho*", "SaXophone", NOMATCH },
+ { "S[a-][x]*.txt", "S-x.txt", MATCH },
+ { "[\\a-\\b]", "a", MATCH },
+ { "[\\a-\\b]", "b", MATCH },
+ { "[?*[][?*[][?*[]", "?*[", MATCH },
+ { "[][?*-]", "]", MATCH },
+ { "[][?*-]", "[", MATCH },
+ { "[][?*-]", "?", MATCH },
+ { "[][?*-]", "*", MATCH },
+ { "[][?*-]", "-", MATCH },
+ { "[]?*-]", "-", MATCH },
+ { "?/b/c", "a/b/c", MATCH },
+ { "^_{}~", "^_{}~", MATCH },
+ { "!#%+,-./01234567889", "!#%+,-./01234567889", MATCH },
+ { "PQRSTUVWXYZ]abcdefg", "PQRSTUVWXYZ]abcdefg", MATCH },
+ { ":;=@ABCDEFGHIJKLMNO", ":;=@ABCDEFGHIJKLMNO", MATCH },
+
+ /* negate */
+ { "[!a]", "b", MATCH },
+ { "[!a]", "a", NOMATCH },
+ { "[^a]", "b", MATCH },
+ { "[^a]", "a", NOMATCH },
+ { "[^a-z0-9A-Z]", "a", NOMATCH },
+ { "[^a-z0-9A-Z]", "-", MATCH },
+ { "curl[!a-z]lib", "curl lib", MATCH },
+ { "curl[! ]lib", "curl lib", NOMATCH },
+ { "[! ][ ]", " ", NOMATCH },
+ { "[! ][ ]", "a ", MATCH },
+ { "*[^a].t?t", "a.txt", NOMATCH },
+ { "*[^a].t?t", "ba.txt", NOMATCH },
+ { "*[^a].t?t", "ab.txt", MATCH },
+ { "[!?*[]", "?", NOMATCH },
+ { "[!!]", "!", NOMATCH },
+ { "[!!]", "x", MATCH },
+
+ { "[[:alpha:]]", "a", MATCH },
+ { "[[:alpha:]]", "9", NOMATCH },
+ { "[[:alnum:]]", "a", MATCH },
+ { "[[:alnum:]]", "[", NOMATCH },
+ { "[[:alnum:]]", "]", NOMATCH },
+ { "[[:alnum:]]", "9", MATCH },
+ { "[[:digit:]]", "9", MATCH },
+ { "[[:xdigit:]]", "9", MATCH },
+ { "[[:xdigit:]]", "F", MATCH },
+ { "[[:xdigit:]]", "G", NOMATCH },
+ { "[[:upper:]]", "U", MATCH },
+ { "[[:upper:]]", "u", NOMATCH },
+ { "[[:lower:]]", "l", MATCH },
+ { "[[:lower:]]", "L", NOMATCH },
+ { "[[:print:]]", "L", MATCH },
+ { "[[:print:]]", {'\10'}, NOMATCH },
+ { "[[:print:]]", {'\10'}, NOMATCH },
+ { "[[:space:]]", " ", MATCH },
+ { "[[:space:]]", "x", NOMATCH },
+ { "[[:graph:]]", " ", NOMATCH },
+ { "[[:graph:]]", "x", MATCH },
+ { "[[:blank:]]", {'\t'}, MATCH },
+ { "[[:blank:]]", {' '}, MATCH },
+ { "[[:blank:]]", {'\r'}, NOMATCH },
+ { "[^[:blank:]]", {'\t'}, NOMATCH },
+ { "[^[:print:]]", {'\10'}, MATCH },
+ { "[[:lower:]][[:lower:]]", "ll", MATCH },
+
+ { "Curl[[:blank:]];-)", "Curl ;-)", MATCH },
+ { "*[[:blank:]]*", " ", MATCH },
+ { "*[[:blank:]]*", "", NOMATCH },
+ { "*[[:blank:]]*", "hi, im_Pavel", MATCH },
+
+ /* common using */
+ { "filename.dat", "filename.dat", MATCH },
+ { "*curl*", "lets use curl!!", MATCH },
+ { "filename.txt", "filename.dat", NOMATCH },
+ { "*.txt", "text.txt", MATCH },
+ { "*.txt", "a.txt", MATCH },
+ { "*.txt", ".txt", MATCH },
+ { "*.txt", "txt", NOMATCH },
+ { "??.txt", "99.txt", MATCH },
+ { "??.txt", "a99.txt", NOMATCH },
+ { "?.???", "a.txt", MATCH },
+ { "*.???", "somefile.dat", MATCH },
+ { "*.???", "photo.jpeg", NOMATCH },
+ { ".*", ".htaccess", MATCH },
+ { ".*", ".", MATCH },
+ { ".*", "..", MATCH },
+
+ /* many stars => one star */
+ { "**.txt", "text.txt", MATCH },
+ { "***.txt", "t.txt", MATCH },
+ { "****.txt", ".txt", MATCH },
+
+ /* empty string or pattern */
+ { "", "", MATCH } ,
+ { "", "hello", NOMATCH },
+ { "file", "", NOMATCH },
+ { "?", "", NOMATCH },
+ { "*", "", MATCH },
+ { "x", "", NOMATCH },
+
+ /* backslash */
+ { "\\", "\\", RE_ERR },
+ { "\\\\", "\\", MATCH },
+ { "\\\\", "\\\\", NOMATCH },
+ { "\\?", "?", MATCH },
+ { "\\*", "*", MATCH },
+ { "?.txt", "?.txt", MATCH },
+ { "*.txt", "*.txt", MATCH },
+ { "\\?.txt", "?.txt", MATCH },
+ { "\\*.txt", "*.txt", MATCH },
+ { "\\?.txt", "x.txt", NOMATCH },
+ { "\\*.txt", "x.txt", NOMATCH },
+ { "\\*\\\\.txt", "*\\.txt", MATCH },
+ { "*\\**\\?*\\\\*", "cc*cc?cc\\cc*cc", MATCH },
+ { "*\\**\\?*\\\\*", "cc*cc?cccc", NOMATCH },
+ { "*\\**\\?*\\\\*", "cc*cc?cc\\cc*cc", MATCH },
+ { "*\\?*\\**", "cc?c*c", MATCH },
+ { "*\\?*\\**curl*", "cc?c*curl", MATCH },
+ { "*\\?*\\**", "cc?cc", NOMATCH },
+ { "\\\"\\$\\&\\'\\(\\)", "\"$&'()", MATCH },
+ { "\\*\\?\\[\\\\\\`\\|", "*?[\\`|", MATCH },
+ { "[\\a\\b]c", "ac", MATCH },
+ { "[\\a\\b]c", "bc", MATCH },
+ { "[\\a\\b]d", "bc", NOMATCH },
+ { "[a-bA-B\\?]", "?", MATCH },
+ { "cu[a-ab-b\\r]l", "curl", MATCH },
+ { "[\\a-z]", "c", MATCH },
+
+ { "?*?*?.*?*", "abc.c", MATCH },
+ { "?*?*?.*?*", "abcc", NOMATCH },
+ { "?*?*?.*?*", "abc.", NOMATCH },
+ { "?*?*?.*?*", "abc.c++", MATCH },
+ { "?*?*?.*?*", "abcdef.c++", MATCH },
+ { "?*?*?.?", "abcdef.c", MATCH },
+ { "?*?*?.?", "abcdef.cd", NOMATCH },
+
+ { "Lindmätarv", "Lindmätarv", MATCH },
+
+ { "", "", MATCH }
+};
+
+static CURLcode unit_setup( void )
+{
+ return CURLE_OK;
+}
+
+static void unit_stop( void )
+{
+}
+
+UNITTEST_START
+
+ int testnum = sizeof(tests) / sizeof(struct testcase);
+ int i, rc;
+
+ for(i = 0; i < testnum; i++) {
+ rc = Curl_fnmatch(NULL, tests[i].pattern, tests[i].string);
+ if(rc != tests[i].result) {
+ printf("Curl_fnmatch(\"%s\", \"%s\") should return %d (returns %d)\n",
+ tests[i].pattern, tests[i].string, tests[i].result, rc);
+ fail("pattern mismatch");
+ }
+ }
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1308.c b/tests/unit/unit1308.c
new file mode 100644
index 00000000..80e6c57b
--- /dev/null
+++ b/tests/unit/unit1308.c
@@ -0,0 +1,95 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include <curl/curl.h>
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+static size_t print_httppost_callback(void *arg, const char *buf, size_t len)
+{
+ fwrite(buf, len, 1, stdout);
+ (*(size_t *) arg) += len;
+ return len;
+}
+
+UNITTEST_START
+ int rc;
+ struct curl_httppost* post = NULL;
+ struct curl_httppost* last = NULL;
+ size_t total_size = 0;
+ char buffer[] = "test buffer";
+
+ rc = curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
+ CURLFORM_COPYCONTENTS, "content", CURLFORM_END);
+
+ fail_unless(rc == 0, "curl_formadd returned error");
+
+ /* after the first curl_formadd when there's a single entry, both pointers
+ should point to the same struct */
+ fail_unless(post == last, "post and last weren't the same");
+
+ rc = curl_formadd(&post, &last, CURLFORM_COPYNAME, "htmlcode",
+ CURLFORM_COPYCONTENTS, "<HTML></HTML>",
+ CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
+
+ fail_unless(rc == 0, "curl_formadd returned error");
+
+ rc = curl_formadd(&post, &last, CURLFORM_COPYNAME, "name_for_ptrcontent",
+ CURLFORM_PTRCONTENTS, buffer, CURLFORM_END);
+
+ fail_unless(rc == 0, "curl_formadd returned error");
+
+ rc = curl_formget(post, &total_size, print_httppost_callback);
+
+ fail_unless(rc == 0, "curl_formget returned error");
+
+ fail_unless(total_size == 486, "curl_formget got wrong size back");
+
+ curl_formfree(post);
+
+ /* start a new formpost with a file upload and formget */
+ post = last = NULL;
+
+ rc = curl_formadd(&post, &last,
+ CURLFORM_PTRNAME, "name of file field",
+ CURLFORM_FILE, "log/test-1308",
+ CURLFORM_FILENAME, "custom named file",
+ CURLFORM_END);
+
+ fail_unless(rc == 0, "curl_formadd returned error");
+
+ rc = curl_formget(post, &total_size, print_httppost_callback);
+ fail_unless(rc == 0, "curl_formget returned error");
+ fail_unless(total_size == 847, "curl_formget got wrong size back");
+
+ curl_formfree(post);
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1309.c b/tests/unit/unit1309.c
new file mode 100644
index 00000000..1304ba18
--- /dev/null
+++ b/tests/unit/unit1309.c
@@ -0,0 +1,110 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "splay.h"
+
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+static void splayprint(struct Curl_tree * t, int d, char output)
+{
+ struct Curl_tree *node;
+ int i;
+ int count;
+ if(t == NULL)
+ return;
+
+ splayprint(t->larger, d+1, output);
+ for(i=0; i<d; i++)
+ if(output)
+ printf(" ");
+
+ if(output) {
+ printf("%ld.%ld[%d]", (long)t->key.tv_sec,
+ (long)t->key.tv_usec, i);
+ }
+
+ for(count=0, node = t->same; node; node = node->same, count++)
+ ;
+
+ if(output) {
+ if(count)
+ printf(" [%d more]\n", count);
+ else
+ printf("\n");
+ }
+
+ splayprint(t->smaller, d+1, output);
+}
+
+UNITTEST_START
+
+/* number of nodes to add to the splay tree */
+#define NUM_NODES 50
+
+ struct Curl_tree *root;
+ struct Curl_tree nodes[NUM_NODES];
+ int rc;
+ int i;
+ root = NULL; /* the empty tree */
+
+ for(i = 0; i < NUM_NODES; i++) {
+ struct timeval key;
+
+ key.tv_sec = 0;
+ key.tv_usec = (541*i)%1023;
+
+ nodes[i].payload = (void *)key.tv_usec; /* for simplicity */
+ root = Curl_splayinsert(key, root, &nodes[i]);
+ }
+
+ puts("Result:");
+ splayprint(root, 0, 1);
+
+ for(i = 0; i < NUM_NODES; i++) {
+ int rem = (i+7)%NUM_NODES;
+ printf("Tree look:\n");
+ splayprint(root, 0, 1);
+ printf("remove pointer %d, payload %ld\n", rem,
+ (long)(nodes[rem].payload));
+ rc = Curl_splayremovebyaddr(root, &nodes[rem], &root);
+ if(rc) {
+ /* failed! */
+ printf("remove %d failed!\n", rem);
+ fail("remove");
+ }
+ }
+
+UNITTEST_STOP
+
+
+
+
diff --git a/tests/unit/unit1330.c b/tests/unit/unit1330.c
new file mode 100644
index 00000000..31caf300
--- /dev/null
+++ b/tests/unit/unit1330.c
@@ -0,0 +1,41 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "memdebug.h"
+
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+}
+
+UNITTEST_START
+
+char *ptr = malloc(1330);
+Curl_safefree(ptr);
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1394.c b/tests/unit/unit1394.c
new file mode 100644
index 00000000..a3ef8fae
--- /dev/null
+++ b/tests/unit/unit1394.c
@@ -0,0 +1,122 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "tool_getparam.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "memdebug.h" /* LAST include file */
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+UNITTEST_START
+
+ const char *values[] = {
+ /* -E parameter */ /* exp. cert name */ /* exp. passphrase */
+ "foo:bar:baz", "foo", "bar:baz",
+ "foo\\:bar:baz", "foo:bar", "baz",
+ "foo\\\\:bar:baz", "foo\\", "bar:baz",
+ "foo:bar\\:baz", "foo", "bar\\:baz",
+ "foo:bar\\\\:baz", "foo", "bar\\\\:baz",
+ "foo\\bar\\baz", "foo\\bar\\baz", NULL,
+ "foo\\\\bar\\\\baz", "foo\\bar\\baz", NULL,
+ "foo\\", "foo\\", NULL,
+ "foo\\\\", "foo\\", NULL,
+ "foo:bar\\", "foo", "bar\\",
+ "foo:bar\\\\", "foo", "bar\\\\",
+ "foo:bar:", "foo", "bar:",
+ "foo\\::bar\\:", "foo:", "bar\\:",
+#ifdef WIN32
+ "c:\\foo:bar:baz", "c:\\foo", "bar:baz",
+ "c:\\foo\\:bar:baz", "c:\\foo:bar", "baz",
+ "c:\\foo\\\\:bar:baz", "c:\\foo\\", "bar:baz",
+ "c:\\foo:bar\\:baz", "c:\\foo", "bar\\:baz",
+ "c:\\foo:bar\\\\:baz", "c:\\foo", "bar\\\\:baz",
+ "c:\\foo\\bar\\baz", "c:\\foo\\bar\\baz", NULL,
+ "c:\\foo\\\\bar\\\\baz", "c:\\foo\\bar\\baz", NULL,
+ "c:\\foo\\", "c:\\foo\\", NULL,
+ "c:\\foo\\\\", "c:\\foo\\", NULL,
+ "c:\\foo:bar\\", "c:\\foo", "bar\\",
+ "c:\\foo:bar\\\\", "c:\\foo", "bar\\\\",
+ "c:\\foo:bar:", "c:\\foo", "bar:",
+ "c:\\foo\\::bar\\:", "c:\\foo:", "bar\\:",
+#endif
+ NULL, NULL, NULL,
+ };
+ const char **p;
+ char *certname, *passphrase;
+ for(p = values; *p; p += 3) {
+ parse_cert_parameter(p[0], &certname, &passphrase);
+ if(p[1]) {
+ if(certname) {
+ if(strcmp(p[1], certname)) {
+ printf("expected certname '%s' but got '%s' "
+ "for -E param '%s'\n", p[1], certname, p[0]);
+ fail("assertion failure");
+ }
+ } else {
+ printf("expected certname '%s' but got NULL "
+ "for -E param '%s'\n", p[1], p[0]);
+ fail("assertion failure");
+ }
+ } else {
+ if(certname) {
+ printf("expected certname NULL but got '%s' "
+ "for -E param '%s'\n", certname, p[0]);
+ fail("assertion failure");
+ }
+ }
+ if(p[2]) {
+ if(passphrase) {
+ if(strcmp(p[2], passphrase)) {
+ printf("expected passphrase '%s' but got '%s'"
+ "for -E param '%s'\n", p[2], passphrase, p[0]);
+ fail("assertion failure");
+ }
+ } else {
+ printf("expected passphrase '%s' but got NULL "
+ "for -E param '%s'\n", p[2], p[0]);
+ fail("assertion failure");
+ }
+ } else {
+ if(passphrase) {
+ printf("expected passphrase NULL but got '%s' "
+ "for -E param '%s'\n", passphrase, p[0]);
+ fail("assertion failure");
+ }
+ }
+ if(certname) free(certname);
+ if(passphrase) free(passphrase);
+ }
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1395.c b/tests/unit/unit1395.c
new file mode 100644
index 00000000..6f9fc8c3
--- /dev/null
+++ b/tests/unit/unit1395.c
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "dotdot.h"
+
+#include "memdebug.h"
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+struct dotdot {
+ const char *input;
+ const char *output;
+};
+
+UNITTEST_START
+
+ unsigned int i;
+ int fails=0;
+ const struct dotdot pairs[] = {
+ { "/a/b/c/./../../g", "/a/g" },
+ { "mid/content=5/../6", "mid/6" },
+ { "/hello/../moo", "/moo" },
+ { "/1/../1", "/1" },
+ { "/1/./1", "/1/1" },
+ { "/1/..", "/" },
+ { "/1/.", "/1/" },
+ { "/1/./..", "/" },
+ { "/1/./../2", "/2" },
+ { "/hello/1/./../2", "/hello/2" },
+ { "test/this", "test/this" },
+ { "test/this/../now", "test/now" },
+ { "/1../moo../foo", "/1../moo../foo"},
+ { "/../../moo", "/moo"},
+ { "/../../moo?andnot/../yay", "/moo?andnot/../yay"},
+ { "/123?foo=/./&bar=/../", "/123?foo=/./&bar=/../"},
+ { "/../moo/..?what", "/?what" },
+ };
+
+ for(i=0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
+ char *out = Curl_dedotdotify((char *)pairs[i].input);
+ abort_unless(out != NULL, "returned NULL!");
+
+ if(strcmp(out, pairs[i].output)) {
+ fprintf(stderr, "Test %d: '%s' gave '%s' instead of '%s'\n",
+ i, pairs[i].input, out, pairs[i].output);
+ fail("Test case output mismatched");
+ fails++;
+ }
+ else
+ fprintf(stderr, "Test %d: OK\n", i);
+ free(out);
+ }
+
+ fail_if(fails, "output mismatched");
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1396.c b/tests/unit/unit1396.c
new file mode 100644
index 00000000..b18d7a8e
--- /dev/null
+++ b/tests/unit/unit1396.c
@@ -0,0 +1,111 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+CURL *hnd;
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+ if (hnd)
+ curl_easy_cleanup(hnd);
+}
+
+struct test {
+ const char *in;
+ int inlen;
+ const char *out;
+ int outlen;
+};
+
+UNITTEST_START
+{
+ /* unescape, this => that */
+ const struct test list1[]={
+ {"%61", 3, "a", 1},
+ {"%61a", 4, "aa", 2},
+ {"%61b", 4, "ab", 2},
+ {"%6 1", 4, "%6 1", 4},
+ {"%61", 1, "%", 1},
+ {"%61", 2, "%6", 2},
+ {"%6%a", 4, "%6%a", 4},
+ {"%6a", 0, "j", 1},
+ {"%FF", 0, "\xff", 1},
+ {"%FF%00%ff", 9, "\xff\x00\xff", 3},
+ {"%-2", 0, "%-2", 3},
+ {"%FG", 0, "%FG", 3},
+ {NULL, 0, NULL, 0} /* end of list marker */
+ };
+ /* escape, this => that */
+ const struct test list2[]={
+ {"a", 1, "a", 1},
+ {"/", 1, "%2F", 3},
+ {"a=b", 3, "a%3Db", 5},
+ {"a=b", 0, "a%3Db", 5},
+ {"a=b", 1, "a", 1},
+ {"a=b", 2, "a%3D", 4},
+ {"1/./0", 5, "1%2F.%2F0", 9},
+ {"-._~!#%&", 0, "-._~%21%23%25%26", 16},
+ {"a", 2, "a%00", 4},
+ {"a\xff\x01g", 4, "a%FF%01g", 8},
+ {NULL, 0, NULL, 0} /* end of list marker */
+ };
+ int i;
+
+ hnd = curl_easy_init();
+ abort_unless(hnd != NULL, "returned NULL!");
+ for(i=0; list1[i].in; i++) {
+ int outlen;
+ char *out = curl_easy_unescape(hnd,
+ list1[i].in, list1[i].inlen,
+ &outlen);
+
+ abort_unless(out != NULL, "returned NULL!");
+ fail_unless(outlen == list1[i].outlen, "wrong output length returned");
+ fail_unless(!memcmp(out, list1[i].out, list1[i].outlen),
+ "bad output data returned");
+
+ printf("curl_easy_unescape test %d DONE\n", i);
+
+ curl_free(out);
+ }
+
+ for(i=0; list2[i].in; i++) {
+ int outlen;
+ char *out = curl_easy_escape(hnd, list2[i].in, list2[i].inlen);
+ abort_unless(out != NULL, "returned NULL!");
+
+ outlen = (int)strlen(out);
+ fail_unless(outlen == list2[i].outlen, "wrong output length returned");
+ fail_unless(!memcmp(out, list2[i].out, list2[i].outlen),
+ "bad output data returned");
+
+ printf("curl_easy_escape test %d DONE (%s)\n", i, out);
+
+ curl_free(out);
+ }
+}
+UNITTEST_STOP
diff --git a/tests/unit/unit1397.c b/tests/unit/unit1397.c
new file mode 100644
index 00000000..c05c119d
--- /dev/null
+++ b/tests/unit/unit1397.c
@@ -0,0 +1,51 @@
+#include "curlcheck.h"
+
+#include "hostcheck.h" /* from the lib dir */
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop( void )
+{
+ /* done before shutting down and exiting */
+}
+
+UNITTEST_START
+
+/* only these backends define the tested functions */
+#if defined(USE_OPENSSL) || defined(USE_AXTLS) || defined(USE_GSKIT)
+
+ /* here you start doing things and checking that the results are good */
+
+fail_unless( Curl_cert_hostcheck("www.example.com", "www.example.com"), "good 1" );
+fail_unless( Curl_cert_hostcheck("*.example.com", "www.example.com"), "good 2" );
+fail_unless( Curl_cert_hostcheck("xxx*.example.com", "xxxwww.example.com"), "good 3" );
+fail_unless( Curl_cert_hostcheck("f*.example.com", "foo.example.com"), "good 4" );
+fail_unless( Curl_cert_hostcheck("192.168.0.0", "192.168.0.0"), "good 5" );
+
+fail_if( Curl_cert_hostcheck("xxx.example.com", "www.example.com"), "bad 1" );
+fail_if( Curl_cert_hostcheck("*", "www.example.com"), "bad 2" );
+fail_if( Curl_cert_hostcheck("*.*.com", "www.example.com"), "bad 3" );
+fail_if( Curl_cert_hostcheck("*.example.com", "baa.foo.example.com"), "bad 4" );
+fail_if( Curl_cert_hostcheck("f*.example.com", "baa.example.com"), "bad 5" );
+fail_if( Curl_cert_hostcheck("*.com", "example.com"), "bad 6" );
+fail_if( Curl_cert_hostcheck("*fail.com", "example.com"), "bad 7" );
+fail_if( Curl_cert_hostcheck("*.example.", "www.example."), "bad 8" );
+fail_if( Curl_cert_hostcheck("*.example.", "www.example"), "bad 9" );
+fail_if( Curl_cert_hostcheck("", "www"), "bad 10" );
+fail_if( Curl_cert_hostcheck("*", "www"), "bad 11" );
+fail_if( Curl_cert_hostcheck("*.168.0.0", "192.168.0.0"), "bad 12" );
+fail_if( Curl_cert_hostcheck("www.example.com", "192.168.0.0"), "bad 13" );
+
+#ifdef ENABLE_IPV6
+fail_if( Curl_cert_hostcheck("*::3285:a9ff:fe46:b619", "fe80::3285:a9ff:fe46:b619"), "bad 14" );
+fail_unless( Curl_cert_hostcheck("fe80::3285:a9ff:fe46:b619", "fe80::3285:a9ff:fe46:b619"), "good 6" );
+#endif
+
+#endif
+
+ /* you end the test code like this: */
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1398.c b/tests/unit/unit1398.c
new file mode 100644
index 00000000..e579a62e
--- /dev/null
+++ b/tests/unit/unit1398.c
@@ -0,0 +1,91 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "curl/mprintf.h"
+
+static CURLcode unit_setup( void ) {return CURLE_OK;}
+static void unit_stop( void ) {}
+
+UNITTEST_START
+
+int rc;
+char buf[3] = {'b', 'u', 'g'};
+const char *str="bug";
+int width = 3;
+char output[24];
+
+/*#define curl_msnprintf snprintf */
+
+/* without a trailing zero */
+rc = curl_msnprintf(output, 4, "%.*s", width, buf);
+fail_unless( rc == 3 , "return code should be 3" );
+fail_unless(!strcmp(output, "bug"), "wrong output");
+
+/* with a trailing zero */
+rc = curl_msnprintf(output, 4, "%.*s", width, str);
+fail_unless( rc == 3 , "return code should be 3" );
+fail_unless(!strcmp(output, "bug"), "wrong output");
+
+width = 2;
+/* one byte less */
+rc = curl_msnprintf(output, 4, "%.*s", width, buf);
+fail_unless( rc == 2 , "return code should be 2" );
+fail_unless(!strcmp(output, "bu"), "wrong output");
+
+/* string with larger precision */
+rc = curl_msnprintf(output, 8, "%.8s", str);
+fail_unless( rc == 3 , "return code should be 3" );
+fail_unless(!strcmp(output, "bug"), "wrong output");
+
+/* longer string with precision */
+rc = curl_msnprintf(output, 8, "%.3s", "0123456789");
+fail_unless( rc == 3 , "return code should be 3" );
+fail_unless(!strcmp(output, "012"), "wrong output");
+
+/* negative width */
+rc = curl_msnprintf(output, 8, "%-8s", str);
+fail_unless( rc == 8 , "return code should be 8" );
+fail_unless(!strcmp(output, "bug "), "wrong output");
+
+/* larger width that string length */
+rc = curl_msnprintf(output, 8, "%8s", str);
+fail_unless( rc == 8 , "return code should be 8" );
+fail_unless(!strcmp(output, " bu"), "wrong output");
+
+/* output a number in a limited output */
+rc = curl_msnprintf(output, 4, "%d", 10240);
+/* TODO: this should return 5 to be POSIX/snprintf compliant! */
+fail_unless( rc == 4 , "return code should be 4" );
+fail_unless(!strcmp(output, "102"), "wrong output");
+
+/* padded strings */
+rc = curl_msnprintf(output, 16, "%8s%8s", str, str);
+fail_unless( rc == 16 , "return code should be 16" );
+fail_unless(!strcmp(output, " bug bu"), "wrong output");
+
+/* padded numbers */
+rc = curl_msnprintf(output, 16, "%8d%8d", 1234, 5678);
+fail_unless( rc == 16 , "return code should be 16" );
+fail_unless(!strcmp(output, " 1234 567"), "wrong output");
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1600.c b/tests/unit/unit1600.c
new file mode 100644
index 00000000..6803cf33
--- /dev/null
+++ b/tests/unit/unit1600.c
@@ -0,0 +1,63 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "urldata.h"
+#include "curl_ntlm_core.h"
+
+CURL *easy;
+
+static CURLcode unit_setup(void)
+{
+ easy = curl_easy_init();
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+ curl_easy_cleanup(easy);
+}
+
+UNITTEST_START
+
+#if defined(USE_NTLM) && (!defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO))
+ unsigned char output[21];
+ unsigned char *testp = output;
+ Curl_ntlm_core_mk_nt_hash(easy, "1", output);
+
+ verify_memory(testp,
+ "\x69\x94\x3c\x5e\x63\xb4\xd2\xc1\x04\xdb"
+ "\xbc\xc1\x51\x38\xb7\x2b\x00\x00\x00\x00\x00", 21);
+
+ Curl_ntlm_core_mk_nt_hash(easy, "hello-you-fool", output);
+
+ verify_memory(testp,
+ "\x39\xaf\x87\xa6\x75\x0a\x7a\x00\xba\xa0"
+ "\xd3\x4f\x04\x9e\xc1\xd0\x00\x00\x00\x00\x00", 21);
+
+ Curl_ntlm_core_mk_nt_hash(easy, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", output);
+
+ verify_memory(testp,
+ "\x36\x9d\xae\x06\x84\x7e\xe1\xc1\x4a\x94\x39\xea\x6f\x44\x8c\x65\x00\x00\x00\x00\x00", 21);
+#endif
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1601.c b/tests/unit/unit1601.c
new file mode 100644
index 00000000..17aba05f
--- /dev/null
+++ b/tests/unit/unit1601.c
@@ -0,0 +1,51 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#include "curl_md5.h"
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+UNITTEST_START
+
+ unsigned char output[16];
+ unsigned char *testp = output;
+ Curl_md5it(output, (const unsigned char *)"1");
+
+ verify_memory(testp,
+ "\xc4\xca\x42\x38\xa0\xb9\x23\x82\x0d\xcc\x50\x9a\x6f\x75\x84\x9b", 16);
+
+ Curl_md5it(output, (const unsigned char *)"hello-you-fool");
+
+ verify_memory(testp,
+ "\x88\x67\x0b\x6d\x5d\x74\x2f\xad\xa5\xcd\xf9\xb6\x82\x87\x5f\x22", 16);
+
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1602.c b/tests/unit/unit1602.c
new file mode 100644
index 00000000..3b25556b
--- /dev/null
+++ b/tests/unit/unit1602.c
@@ -0,0 +1,80 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, 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 "curlcheck.h"
+
+#define ENABLE_CURLX_PRINTF
+#include "curlx.h"
+
+#include "hash.h"
+
+#include "memdebug.h" /* LAST include file */
+
+ static CURLcode unit_setup( void )
+{
+ return CURLE_OK;
+}
+
+static void unit_stop( void )
+{
+
+}
+
+static void mydtor(void *p)
+{
+ int *ptr = (int*)p;
+ free(ptr);
+}
+
+UNITTEST_START
+ int *value;
+ int *value2;
+ size_t klen = sizeof(int);
+
+ struct curl_hash hash_static;
+ int key = 20;
+ int key2 = 25;
+ int rc = 0;
+
+ rc = Curl_hash_init(&hash_static, 7, Curl_hash_str,
+ Curl_str_key_compare, mydtor);
+
+ if(rc)
+ {
+ fail("Curl_hash_init failed to initialize static hash!");
+ goto unit_test_abort;
+ }
+
+ value = malloc(sizeof(int));
+ value2 = malloc(sizeof(int));
+
+ *value = 199;
+ *value2 = 204;
+ Curl_hash_add(&hash_static, &key, klen, value);
+
+ Curl_hash_clean(&hash_static);
+
+ /* Attempt to add another key/value pair */
+ Curl_hash_add(&hash_static, &key2, klen, value2);
+
+ Curl_hash_destroy(&hash_static);
+
+UNITTEST_STOP
diff --git a/tests/valgrind.pm b/tests/valgrind.pm
index 78523ead..f811993e 100644
--- a/tests/valgrind.pm
+++ b/tests/valgrind.pm
@@ -36,6 +36,7 @@ sub valgrindparse {
my @o;
my $bt=0;
+ my $nssinit=0;
open(VAL, "<$file");
while(<VAL>) {
@@ -53,9 +54,14 @@ sub valgrindparse {
$us++;
} #else {print "Not our source: $func, $source, $line\n";}
}
+
+ # the memory leakage within NSS_InitContext is not a bug of curl
+ if($w =~ /NSS_InitContext/) {
+ $nssinit++;
+ }
}
else {
- if($us) {
+ if($us and not $nssinit) {
# the stack trace included source details about us
$error++;
@@ -71,6 +77,7 @@ sub valgrindparse {
}
$bt = 0; # no more backtrace
$us = 0;
+ $nssinit = 0;
}
}
else {
diff --git a/tests/valgrind.supp b/tests/valgrind.supp
new file mode 100644
index 00000000..8c81327e
--- /dev/null
+++ b/tests/valgrind.supp
@@ -0,0 +1,89 @@
+{
+ libidn-idna_to_ascii-error
+ Memcheck:Addr4
+ fun:idna_to_ascii_4z
+ fun:idna_to_ascii_8z
+ fun:idna_to_ascii_lz
+ fun:fix_hostname
+ fun:resolve_server
+ fun:create_conn
+ fun:Curl_connect
+ fun:multi_runsingle
+ fun:curl_multi_perform
+ fun:easy_transfer
+ fun:easy_perform
+ fun:curl_easy_perform
+ fun:operate_do
+ fun:operate
+ fun:main
+}
+
+{
+ libidn-idna_to_ascii-error-eventbased
+ Memcheck:Addr4
+ fun:idna_to_ascii_4z
+ fun:idna_to_ascii_8z
+ fun:idna_to_ascii_lz
+ fun:fix_hostname
+ fun:resolve_server
+ fun:create_conn
+ fun:Curl_connect
+ fun:multi_runsingle
+ fun:multi_socket
+ fun:curl_multi_socket_action
+ fun:wait_or_timeout
+ fun:easy_events
+ fun:easy_perform
+ fun:curl_easy_perform_ev
+ fun:operate_do
+ fun:operate
+ fun:main
+}
+
+{
+ libidn-idna_to_ascii-error-inlined-functions
+ Memcheck:Addr4
+ fun:idna_to_ascii_4z
+ fun:idna_to_ascii_8z
+ fun:idna_to_ascii_lz
+ fun:fix_hostname
+ fun:Curl_connect
+ fun:multi_runsingle
+ fun:curl_multi_perform
+ fun:easy_perform.part.4
+ fun:operate_do
+ fun:operate
+ fun:main
+}
+
+{
+ libidn-idna_to_ascii-error-inlined-functions-alt
+ Memcheck:Addr4
+ fun:idna_to_ascii_4z
+ fun:idna_to_ascii_8z
+ fun:idna_to_ascii_lz
+ fun:fix_hostname
+ fun:Curl_connect
+ fun:multi_runsingle
+ fun:curl_multi_perform
+ fun:easy_perform
+ fun:operate_do.isra.0
+ fun:operate
+ fun:main
+}
+
+{
+ libidn-idna_to_ascii-error-inlined-functions-alt2
+ Memcheck:Addr4
+ fun:idna_to_ascii_4z
+ fun:idna_to_ascii_8z
+ fun:idna_to_ascii_lz
+ fun:fix_hostname
+ fun:Curl_connect
+ fun:multi_runsingle
+ fun:curl_multi_perform
+ fun:easy_perform
+ fun:operate_do
+ fun:operate
+ fun:main
+}
diff --git a/vc6curl.dsw b/vc6curl.dsw
deleted file mode 100644
index 499bc107..00000000
--- a/vc6curl.dsw
+++ /dev/null
@@ -1,44 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "libcurl"=".\lib\vc6libcurl.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "curlsrc"=".\src\vc6curlsrc.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libcurl
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/winbuild/.gitignore b/winbuild/.gitignore
new file mode 100644
index 00000000..01f28f32
--- /dev/null
+++ b/winbuild/.gitignore
@@ -0,0 +1,2 @@
+*.idb
+*.inc
diff --git a/winbuild/BUILD.WINDOWS.txt b/winbuild/BUILD.WINDOWS.txt
new file mode 100644
index 00000000..600f7374
--- /dev/null
+++ b/winbuild/BUILD.WINDOWS.txt
@@ -0,0 +1,89 @@
+Building with Visual C++, prerequises
+=====================================
+
+ This document describes how to compile, build and install curl and libcurl
+ from sources using the Visual C++ build tool. To build with VC++, you will
+ of course have to first install VC++. The minimum required version of
+ VC is 6 (part of Visual Studio 6). However using a more recent version is
+ strongly recommended.
+
+ VC++ is also part of the Windows Platform SDK. You do not have to install
+ the full Visual Studio or Visual C++ if all you want is to build curl.
+
+ The latest Platform SDK can be downloaded freely from:
+
+ http://msdn.microsoft.com/en-us/windows/bb980924
+
+ If you are building with VC6 then you will also need the February 2003
+ Edition of the Platform SDK which can be downloaded from:
+
+ 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
+ them separately and copy them to the deps directory as shown below:
+
+ somedirectory\
+ |_curl-src
+ | |_winbuild
+ |
+ |_deps
+ |_ lib
+ |_ include
+ |_ bin
+
+ It is also possible to create the deps directory in some other random
+ places and tell the Makefile its location using the WITH_DEVEL option.
+
+Building with Visual C++
+========================
+
+Open a Visual Studio Command prompt or the SDK CMD shell.
+
+ Using the CMD Shell:
+ choose the right environment via the setenv command (see setenv /?)
+ for the full list of options. setenv /xp /x86 /release for example.
+
+ Using the Visual Studio command prompt Shell:
+ Everything is already pre-configured by calling one of the command
+ prompt.
+
+Once you are in the console, go to the winbuild directory in the Curl
+sources:
+ cd curl-src\winbuild
+
+Then you can call nmake /f Makefile.vc with the desired options (see below).
+The builds will be in the top src directory, builds\ directory, in
+a directory named using the options given to the nmake call.
+
+nmake /f Makefile.vc mode=<static or dll> <options>
+
+where <options> is one or many of:
+ VC=<6,7,8,9,10,11,12> - VC versions
+ WITH_DEVEL=<path> - Paths for the development files (SSL, zlib, etc.)
+ Defaults to sibbling directory deps: ../deps
+ Libraries can be fetched at http://windows.php.net/downloads/php-sdk/deps/
+ Uncompress them into the deps folder.
+ WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or static
+ WITH_CARES=<dll or static> - Enable c-ares support, DLL or static
+ WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static
+ WITH_SSH2=<dll or static> - Enable libSSH2 support, DLL or static
+ ENABLE_SSPI=<yes or no> - Enable SSPI support, defaults to yes
+ ENABLE_IPV6=<yes or no> - Enable IPv6, defaults to yes
+ ENABLE_IDN=<yes or no> - Enable use of Windows IDN APIs, defaults to yes
+ Requires Windows Vista or later, or installation from:
+ http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815
+ ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes
+ GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
+ DEBUG=<yes or no> - Debug builds
+ MACHINE=<x86 or x64> - Target architecture (default is x86)
+
+Static linking of Microsoft's C RunTime (CRT):
+==============================================
+If you are using mode=static nmake will create and link to the static build of
+libcurl but *not* the static CRT. If you must you can force nmake to link in
+the static CRT by passing RTLIBCFG=static. Typically you shouldn't use that
+option, and nmake will default to the DLL CRT. RTLIBCFG is rarely used and
+therefore rarely tested. When passing RTLIBCFG for a configuration that was
+already built but not with that option, or if the option was specified
+differently, you must destroy the build directory containing the configuration
+so that nmake can build it from scratch.
diff --git a/winbuild/Makefile.msvc.names b/winbuild/Makefile.msvc.names
new file mode 100644
index 00000000..56c81ad7
--- /dev/null
+++ b/winbuild/Makefile.msvc.names
@@ -0,0 +1,81 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 file is included from MSVC makefiles located in lib and src,
+# providing libcurl common file names required by these makefiles.
+#
+
+# ------------------
+# libcurl base name
+# ------------------
+
+!IF !DEFINED(LIB_NAME) || "$(LIB_NAME)" == ""
+LIB_NAME = libcurl
+!ENDIF
+
+# -------------------------------------------------
+# libcurl static and dynamic libraries common base
+# file names for release and debug configurations
+# -------------------------------------------------
+
+!IF !DEFINED(LIB_NAME_STA_REL) || "$(LIB_NAME_STA_REL)" == ""
+LIB_NAME_STA_REL = $(LIB_NAME)
+!ENDIF
+
+!IF !DEFINED(LIB_NAME_STA_DBG) || "$(LIB_NAME_STA_DBG)" == ""
+LIB_NAME_STA_DBG = $(LIB_NAME_STA_REL)d
+!ENDIF
+
+!IF !DEFINED(LIB_NAME_DYN_REL) || "$(LIB_NAME_DYN_REL)" == ""
+LIB_NAME_DYN_REL = $(LIB_NAME)
+!ENDIF
+
+!IF !DEFINED(LIB_NAME_DYN_DBG) || "$(LIB_NAME_DYN_DBG)" == ""
+LIB_NAME_DYN_DBG = $(LIB_NAME_DYN_REL)d
+!ENDIF
+
+# --------------------------------------------
+# Base names for libcurl DLL import libraries
+# --------------------------------------------
+
+!IF !DEFINED(LIB_NAME_IMP_REL) || "$(LIB_NAME_IMP_REL)" == ""
+LIB_NAME_IMP_REL = $(LIB_NAME_DYN_REL)_imp
+!ENDIF
+
+!IF !DEFINED(LIB_NAME_IMP_DBG) || "$(LIB_NAME_IMP_DBG)" == ""
+LIB_NAME_IMP_DBG = $(LIB_NAME_DYN_DBG)_imp
+!ENDIF
+
+# --------------------------------------
+# File names with extension and no path
+# --------------------------------------
+
+LIBCURL_STA_LIB_REL = $(LIB_NAME_STA_REL).lib
+LIBCURL_STA_LIB_DBG = $(LIB_NAME_STA_DBG).lib
+LIBCURL_DYN_LIB_REL = $(LIB_NAME_DYN_REL).dll
+LIBCURL_DYN_LIB_DBG = $(LIB_NAME_DYN_DBG).dll
+LIBCURL_IMP_LIB_REL = $(LIB_NAME_IMP_REL).lib
+LIBCURL_IMP_LIB_DBG = $(LIB_NAME_IMP_DBG).lib
+LIBCURL_DYN_LIB_PDB = $(LIB_NAME_IMP_DBG).pdb
+
+# End of Makefile.msvc.names
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
new file mode 100644
index 00000000..21e1614a
--- /dev/null
+++ b/winbuild/Makefile.vc
@@ -0,0 +1,205 @@
+!IF "$(MODE)"=="static"
+TARGET = $(LIB_NAME_STATIC)
+AS_DLL = false
+CFGSET=true
+!ELSEIF "$(MODE)"=="dll"
+TARGET = $(LIB_NAME_DLL)
+AS_DLL = true
+CFGSET=true
+!ELSE
+!MESSAGE Invalid mode: $(MODE)
+
+#######################
+# Usage
+#
+
+!MESSAGE Usage: nmake /f Makefile.vc mode=<static or dll> <options>
+!MESSAGE where <options> is one or many of:
+!MESSAGE VC=<6,7,8,9,10,11,12> - VC versions
+!MESSAGE WITH_DEVEL=<path> - Paths for the development files (SSL, zlib, etc.)
+!MESSAGE Defaults to sibbling directory deps: ../deps
+!MESSAGE Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/
+!MESSAGE Uncompress them into the deps folder.
+!MESSAGE WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or static
+!MESSAGE WITH_CARES=<dll or static> - Enable c-ares support, DLL or static
+!MESSAGE WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static
+!MESSAGE WITH_SSH2=<dll or static> - Enable libSSH2 support, DLL or static
+!MESSAGE ENABLE_IDN=<yes or no> - Enable use of Windows IDN APIs, defaults to yes
+!MESSAGE Requires Windows Vista or later, or installation from:
+!MESSAGE http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815
+!MESSAGE ENABLE_IPV6=<yes or no> - Enable IPv6, defaults to yes
+!MESSAGE ENABLE_SSPI=<yes or no> - Enable SSPI support, defaults to yes
+!MESSAGE ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes
+!MESSAGE GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
+!MESSAGE DEBUG=<yes or no> - Debug builds
+!MESSAGE MACHINE=<x86 or x64> - Target architecture (default x64 on AMD64, x86 on others)
+!ERROR please choose a valid mode
+
+!ENDIF
+
+!INCLUDE "../lib/Makefile.inc"
+LIBCURL_OBJS=$(CSOURCES:.c=.obj)
+
+!INCLUDE "../src/Makefile.inc"
+
+# tool_hugehelp has a special rule
+CURL_OBJS=$(CURL_CFILES:tool_hugehelp.c=)
+
+CURL_OBJS=$(CURL_OBJS:.c=.obj)
+
+
+# backwards compatible check for USE_SSPI
+!IFDEF USE_SSPI
+ENABLE_SSPI = $(USE_SSPI)
+!ENDIF
+
+# default options
+!IFNDEF MACHINE
+!IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64"
+MACHINE = x64
+!ELSE
+MACHINE = x86
+!ENDIF
+!ENDIF
+
+!IFNDEF ENABLE_IDN
+USE_IDN = true
+!ELSEIF "$(ENABLE_IDN)"=="yes"
+USE_IDN = true
+!ELSEIF "$(ENABLE_IDN)"=="no"
+USE_IDN = false
+!ENDIF
+
+!IFNDEF ENABLE_IPV6
+USE_IPV6 = true
+!ELSEIF "$(ENABLE_IPV6)"=="yes"
+USE_IPV6 = true
+!ELSEIF "$(ENABLE_IPV6)"=="no"
+USE_IPV6 = false
+!ENDIF
+
+!IFNDEF ENABLE_SSPI
+USE_SSPI = true
+!ELSEIF "$(ENABLE_SSPI)"=="yes"
+USE_SSPI = true
+!ELSEIF "$(ENABLE_SSPI)"=="no"
+USE_SSPI = false
+!ENDIF
+
+!IFNDEF ENABLE_WINSSL
+!IFDEF WITH_SSL
+USE_WINSSL = false
+!ELSE
+USE_WINSSL = $(USE_SSPI)
+!ENDIF
+!ELSEIF "$(ENABLE_WINSSL)"=="yes"
+USE_WINSSL = true
+!ELSEIF "$(ENABLE_WINSSL)"=="no"
+USE_WINSSL = false
+!ENDIF
+
+CONFIG_NAME_LIB = libcurl
+
+!IF "$(WITH_SSL)"=="dll"
+USE_SSL = true
+SSL = dll
+!ELSEIF "$(WITH_SSL)"=="static"
+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
+!ELSEIF "$(WITH_ZLIB)"=="static"
+USE_ZLIB = true
+ZLIB = static
+!ENDIF
+
+!IF "$(WITH_SSH2)"=="dll"
+USE_SSH2 = true
+SSH2 = dll
+!ELSEIF "$(WITH_SSH2)"=="static"
+USE_SSH2 = true
+SSH2 = static
+!ENDIF
+
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE)
+
+!IF "$(DEBUG)"=="yes"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
+!ELSE
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-release
+!ENDIF
+
+!IF "$(AS_DLL)"=="true"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-dll
+!ELSE
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
+!ENDIF
+
+!IF "$(USE_SSL)"=="true"
+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
+
+!IF "$(USE_SSH2)"=="true"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh2-$(SSH2)
+!ENDIF
+
+!IF "$(USE_IPV6)"=="true"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6
+!ENDIF
+
+!IF "$(USE_SSPI)"=="true"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi
+!ENDIF
+
+!IF "$(USE_WINSSL)"=="true"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl
+!ENDIF
+
+!MESSAGE configuration name: $(CONFIG_NAME_LIB)
+
+BUILD_DIR=../builds/$(CONFIG_NAME_LIB)
+LIBCURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
+CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
+DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
+
+$(MODE):
+ @SET DIROBJ=$(LIBCURL_DIROBJ)
+ @SET MACRO_NAME=LIBCURL_OBJS
+ @SET OUTFILE=LIBCURL_OBJS.inc
+ @gen_resp_file.bat $(LIBCURL_OBJS)
+
+ @SET DIROBJ=$(CURL_DIROBJ)
+ @SET MACRO_NAME=CURL_OBJS
+ @SET OUTFILE=CURL_OBJS.inc
+ @gen_resp_file.bat $(CURL_OBJS)
+
+ @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB)
+ @SET MACHINE=$(MACHINE)
+ @SET USE_IDN=$(USE_IDN)
+ @SET USE_IPV6=$(USE_IPV6)
+ @SET USE_SSPI=$(USE_SSPI)
+ @SET USE_WINSSL=$(USE_WINSSL)
+ @$(MAKE) /NOLOGO /F MakefileBuild.vc
+
+copy_from_lib:
+ echo copying .c...
+ FOR %%i IN ($(CURLX_CFILES:/=\)) DO copy %%i ..\src\
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc
new file mode 100644
index 00000000..2cad15c9
--- /dev/null
+++ b/winbuild/MakefileBuild.vc
@@ -0,0 +1,503 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1999 - 2015, Daniel Stenberg, <daniel@haxx.se>, 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.
+#
+#***************************************************************************
+
+###########################################################################
+#
+# Makefile for building libcurl with MSVC 6, 7, 8, 9, 10, 11 and 12
+#
+# Usage: see usage message below
+# Should be invoked from winbuild directory
+# Edit the paths and desired library name
+# SSL path is only required if you intend compiling
+# with SSL.
+#
+# This make file leaves the result either a .lib or .dll file
+# in the \lib directory. It should be called from the \lib
+# directory.
+#
+# An option would have been to allow the source directory to
+# be specified, but I saw no requirement.
+#
+# Another option would have been to leave the .lib and .dll
+# files in the "cfg" directory, but then the make file
+# in \src would need to be changed.
+#
+##############################################################
+
+CFGSET=FALSE
+WINBUILD_DIR=`cd`
+ZIP = zip.exe
+
+!IF "$(VC)"=="6"
+CC_NODEBUG = cl.exe /O2 /DNDEBUG
+CC_DEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /GZ
+CFLAGS = /I. /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL
+!ELSE
+CC_NODEBUG = cl.exe /O2 /DNDEBUG
+CC_DEBUG = cl.exe /Od /D_DEBUG /RTC1 /Z7 /LDd /W3
+CFLAGS = /I. /I ../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
+!ENDIF
+
+LFLAGS = /nologo /machine:$(MACHINE)
+LNKDLL = link.exe /DLL
+LNKLIB = link.exe /lib
+
+CFLAGS_PDB = /Zi
+LFLAGS_PDB = /incremental:no /opt:ref,icf
+
+CFLAGS_LIBCURL_STATIC = /DCURL_STATICLIB
+
+WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib
+
+BASE_NAME = libcurl
+BASE_NAME_DEBUG = $(BASE_NAME)_debug
+BASE_NAME_STATIC = $(BASE_NAME)_a
+BASE_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC)_debug
+
+LIB_NAME_STATIC = $(BASE_NAME_STATIC).lib
+LIB_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC_DEBUG).lib
+LIB_NAME_DLL = $(BASE_NAME).dll
+LIB_NAME_IMP = $(BASE_NAME).lib
+LIB_NAME_DLL_DEBUG = $(BASE_NAME_DEBUG).dll
+LIB_NAME_IMP_DEBUG = $(BASE_NAME_DEBUG).lib
+
+PDB_NAME_STATIC = $(BASE_NAME_STATIC).pdb
+PDB_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC_DEBUG).pdb
+PDB_NAME_DLL = $(BASE_NAME).pdb
+PDB_NAME_DLL_DEBUG = $(BASE_NAME_DEBUG).pdb
+
+# CURL Command section
+PROGRAM_NAME = curl.exe
+CURL_CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c
+CURL_LFLAGS = /nologo /out:$(DIRDIST)\bin\$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)
+CURL_RESFLAGS = /i../include
+
+#############################################################
+## Nothing more to do below this line!
+LIBCURL_SRC_DIR = ..\lib
+CURL_SRC_DIR = ..\src
+
+!IFNDEF WITH_DEVEL
+WITH_DEVEL = ../../deps
+!ENDIF
+DEVEL_INCLUDE = $(WITH_DEVEL)/include
+DEVEL_LIB = $(WITH_DEVEL)/lib
+DEVEL_BIN = $(WITH_DEVEL)/bin
+
+CFLAGS = $(CFLAGS) /I"$(DEVEL_INCLUDE)"
+LFLAGS = $(LFLAGS) "/LIBPATH:$(DEVEL_LIB)"
+
+
+!IF "$(WITH_SSL)"=="dll"
+SSL_LIBS = libeay32.lib ssleay32.lib
+USE_SSL = true
+SSL = dll
+!ELSEIF "$(WITH_SSL)"=="static"
+SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib crypt32.lib
+USE_SSL = true
+SSL = static
+!ENDIF
+
+!IFDEF USE_SSL
+SSL_CFLAGS = /DUSE_OPENSSL /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
+USE_ZLIB = true
+ZLIB = dll
+!ELSEIF "$(WITH_ZLIB)"=="static"
+ZLIB_LIBS = zlib_a.lib
+USE_ZLIB = true
+ZLIB = static
+!ENDIF
+
+!IFDEF USE_ZLIB
+ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ
+!ENDIF
+
+
+!IF "$(WITH_SSH2)"=="dll"
+SSH2_LIBS = libssh2.lib
+USE_SSH2 = true
+SSH2 = dll
+!ELSEIF "$(WITH_SSH2)"=="static"
+SSH2_LIBS = libssh2_a.lib user32.lib
+USE_SSH2 = true
+SSH2 = static
+!ENDIF
+
+!IFDEF USE_SSH2
+SSH2_CFLAGS = /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /DUSE_LIBSSH2
+SSH2_CFLAGS = $(SSH2_CFLAGS) /I$(WITH_DEVEL)/include/libssh2
+!ENDIF
+
+
+!IFNDEF USE_IDN
+USE_IDN = true
+!ELSEIF "$(USE_IDN)"=="yes"
+USE_IDN = true
+!ENDIF
+
+!IF "$(USE_IDN)"=="true"
+IDN_CFLAGS = $(IDN_CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES
+WIN_LIBS = $(WIN_LIBS) Normaliz.lib
+!ENDIF
+
+
+!IFNDEF USE_IPV6
+USE_IPV6 = true
+!ELSEIF "$(USE_IPV6)"=="yes"
+USE_IPV6 = true
+!ENDIF
+
+!IF "$(USE_IPV6)"=="true"
+IPV6_CFLAGS = $(IPV6_CFLAGS) /DUSE_IPV6
+!ENDIF
+
+
+!IFNDEF USE_SSPI
+USE_SSPI = true
+!ELSEIF "$(USE_SSPI)"=="yes"
+USE_SSPI = true
+!ENDIF
+
+!IF "$(USE_SSPI)"=="true"
+SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_WINDOWS_SSPI
+!ENDIF
+
+
+!IFNDEF USE_WINSSL
+!IF "$(USE_SSL)"=="true"
+USE_WINSSL = false
+!ELSE
+USE_WINSSL = $(USE_SSPI)
+!ENDIF
+!ELSEIF "$(USE_WINSSL)"=="yes"
+USE_WINSSL = true
+!ENDIF
+
+
+!IF "$(USE_WINSSL)"=="true"
+!IF "$(USE_SSPI)"!="true"
+!ERROR cannot build with WinSSL without SSPI
+!ENDIF
+SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_SCHANNEL
+!ENDIF
+
+
+!IF "$(GEN_PDB)"=="yes"
+GEN_PDB = true
+!ENDIF
+
+
+!IFDEF EMBEND_MANIFEST
+MANIFESTTOOL = mt -manifest $(DIRDIST)\$(PROGRAM_NAME).manifest -outputresource:$(DIRDIST)\$(PROGRAM_NAME);1
+!ENDIF
+
+# Runtime library configuration
+!IF "$(RTLIBCFG)"=="static"
+RTLIB = /MT
+RTLIB_DEBUG = /MTd
+!ELSE
+RTLIB = /MD
+RTLIB_DEBUG = /MDd
+!ENDIF
+
+!IF "$(MODE)"=="static"
+TARGET = $(LIB_NAME_STATIC)
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC)
+AS_DLL = false
+CFGSET = true
+!ELSEIF "$(MODE)"=="dll"
+TARGET = $(LIB_NAME_DLL)
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP)
+AS_DLL = true
+CFGSET = true
+!ENDIF
+
+!IF "$(CFGSET)" == "FALSE"
+!ERROR please choose a valid mode
+!ENDIF
+
+
+
+# CURL_XX macros are for the curl.exe command
+
+!IF "$(DEBUG)"=="yes"
+RC_FLAGS = /dDEBUGBUILD=1 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc
+CC = $(CC_DEBUG) $(RTLIB_DEBUG)
+
+CURL_CC = $(CC)
+CURL_RC_FLAGS = /i../include /dDEBUGBUILD=1 /Fo $@ $(CURL_SRC_DIR)\curl.rc
+!ELSE
+RC_FLAGS = /dDEBUGBUILD=0 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc
+CC = $(CC_NODEBUG) $(RTLIB)
+
+CURL_CC = $(CC)
+CURL_RC_FLAGS = /i../include /dDEBUGBUILD=0 /Fo $@ $(CURL_SRC_DIR)\curl.rc
+!ENDIF
+
+CURL_CC = $(CURL_CC) $(CURL_CFLAGS)
+
+!IF "$(AS_DLL)" == "true"
+
+LNK = $(LNKDLL) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
+!IF "$(DEBUG)"=="yes"
+TARGET = $(LIB_NAME_DLL_DEBUG)
+LNK = $(LNK) /DEBUG /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
+PDB = $(PDB_NAME_DLL_DEBUG)
+CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
+!ELSE
+TARGET = $(LIB_NAME_DLL)
+LNK = $(LNK) /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
+PDB = $(PDB_NAME_DLL)
+CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
+!ENDIF
+RESOURCE = $(LIB_DIROBJ)\libcurl.res
+
+# AS_DLL
+!ELSE
+
+!IF "$(DEBUG)"=="yes"
+TARGET = $(LIB_NAME_STATIC_DEBUG)
+PDB = $(PDB_NAME_STATIC_DEBUG)
+!ELSE
+TARGET = $(LIB_NAME_STATIC)
+PDB = $(PDB_NAME_STATIC)
+!ENDIF
+LNK = $(LNKLIB) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
+CC = $(CC) $(CFLAGS_LIBCURL_STATIC)
+
+# AS_DLL
+!ENDIF
+
+!IF "$(USE_SSL)"=="true"
+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)
+!ENDIF
+
+!IF "$(USE_SSH2)"=="true"
+CFLAGS = $(CFLAGS) $(SSH2_CFLAGS)
+LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS)
+!ENDIF
+
+!IF "$(USE_IDN)"=="true"
+CFLAGS = $(CFLAGS) $(IDN_CFLAGS)
+!ENDIF
+
+!IF "$(USE_IPV6)"=="true"
+CFLAGS = $(CFLAGS) $(IPV6_CFLAGS)
+!ENDIF
+
+!IF "$(USE_SSPI)"=="true"
+CFLAGS = $(CFLAGS) $(SSPI_CFLAGS)
+!ENDIF
+
+!IF "$(GEN_PDB)"=="true"
+CFLAGS = $(CFLAGS) $(CFLAGS_PDB) /Fd"$(LIB_DIROBJ)\$(PDB)"
+LFLAGS = $(LFLAGS) $(LFLAGS_PDB)
+!ENDIF
+
+LIB_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
+CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
+DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
+
+#
+# curl.exe
+#
+CURL_LINK = link.exe /incremental:no /libpath:"$(DIRDIST)\lib"
+
+#!IF "$(CFG)" == "release-ssh2-ssl-dll-zlib"
+#TARGET = $(LIB_NAME_STATIC)
+#LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBS) $(SSH2LIBS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) $(LFLAGSSSH) /out:$(LIB_DIROBJ)\$(TARGET)
+#CC = $(CCNODBG) $(RTLIB) $(SSL_CFLAGS) $(ZLIB_CFLAGS) $(CFLAGSLIB) $(SSH2_CFLAGS)
+#CFGSET = TRUE
+#!ENDIF
+
+#######################
+# Only the clean target can be used if a config was not provided.
+#
+!IF "$(CFGSET)" == "FALSE"
+clean:
+ @-erase /s *.dll 2> NUL
+ @-erase /s *.exp 2> NUL
+ @-erase /s *.idb 2> NUL
+ @-erase /s *.lib 2> NUL
+ @-erase /s *.obj 2> NUL
+ @-erase /s *.pch 2> NUL
+ @-erase /s *.pdb 2> NUL
+ @-erase /s *.res 2> NUL
+!ELSE
+# A mode was provided, so the library can be built.
+#
+!include CURL_OBJS.inc
+!include LIBCURL_OBJS.inc
+
+!IF "$(AS_DLL)" == "true"
+LIB_OBJS = $(LIBCURL_OBJS) $(RESOURCE)
+!ELSE
+LIB_OBJS = $(LIBCURL_OBJS)
+!ENDIF
+
+EXE_OBJS = $(CURL_OBJS) $(CURL_DIROBJ)\curl.res
+
+all : $(TARGET) $(PROGRAM_NAME)
+
+package: $(TARGET)
+ @cd $(DIRDIST)
+ @-$(ZIP) -9 -q -r ..\$(CONFIG_NAME_LIB).zip .>nul 2<&1
+ @cd $(MAKEDIR)
+
+$(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 WinSSL: $(USE_WINSSL)
+ @echo CFLAGS: $(CFLAGS)
+ @echo LFLAGS: $(LFLAGS)
+ @echo GenPDB: $(GEN_PDB)
+ @echo Debug: $(DEBUG)
+ @echo Machine: $(MACHINE)
+ $(LNK) $(LFLAGS) $(LIB_OBJS)
+ @echo Copying libs...
+ @if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL) $(DIRDIST)\bin\ /y >nul 2<&1
+ @if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC) $(DIRDIST)\lib\ /y >nul 2<&1
+ @if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) $(DIRDIST)\bin\ /y >nul 2<&1
+ @if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) $(DIRDIST)\lib\ /y >nul 2<&1
+ @if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP) $(DIRDIST)\lib\ /y >nul 2<&1
+ @if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) $(DIRDIST)\lib >nul 2<&1
+ @-copy $(LIB_DIROBJ)\*.exp $(DIRDIST)\lib /y >nul 2<&1
+ @-copy $(LIB_DIROBJ)\*.pdb $(DIRDIST)\lib /y >nul 2<&1
+ @-copy ..\include\curl\*.h $(DIRDIST)\include\curl\ /y >nul 2<&1
+
+$(LIB_OBJS): $(LIB_DIROBJ) $(DIRDIST)
+
+$(DIRDIST):
+ @if not exist "$(DIRDIST)\bin" mkdir $(DIRDIST)\bin
+ @if not exist "$(DIRDIST)\include" mkdir $(DIRDIST)\include
+ @if not exist "$(DIRDIST)\include\curl" mkdir $(DIRDIST)\include\curl
+ @if not exist "$(DIRDIST)\lib" mkdir $(DIRDIST)\lib
+
+$(LIB_DIROBJ):
+ @if not exist "$(LIB_DIROBJ)" mkdir $(LIB_DIROBJ)
+ @if not exist "$(LIB_DIROBJ)\vtls" mkdir $(LIB_DIROBJ)\vtls
+
+$(CURL_DIROBJ):
+ @if not exist "$(CURL_DIROBJ)" mkdir $(CURL_DIROBJ)
+# we need a lib dir for the portability functions from libcurl
+# we use the .c directly here
+ @if not exist "$(CURL_DIROBJ)" mkdir $(CURL_DIROBJ)\lib
+
+.SUFFIXES: .c .obj .res
+
+{$(LIBCURL_SRC_DIR)\}.c{$(LIB_DIROBJ)\}.obj:
+ $(CC) $(CFLAGS) /Fo"$@" $<
+
+{$(LIBCURL_SRC_DIR)\vtls\}.c{$(LIB_DIROBJ)\vtls\}.obj:
+ $(CC) $(CFLAGS) /Fo"$@" $<
+
+$(LIB_DIROBJ)\libcurl.res: $(LIBCURL_SRC_DIR)\libcurl.rc
+ rc $(RC_FLAGS)
+
+#
+# curl.exe
+#
+
+
+!IF "$(MODE)"=="static"
+!IF "$(DEBUG)"=="yes"
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC_DEBUG)
+!ELSE
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC)
+!ENDIF
+!ELSEIF "$(MODE)"=="dll"
+!IF "$(DEBUG)"=="yes"
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP_DEBUG)
+!ELSE
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP)
+!ENDIF
+!ENDIF
+
+CURL_FROM_LIBCURL=$(CURL_DIROBJ)\tool_hugehelp.obj \
+ $(CURL_DIROBJ)\nonblock.obj \
+ $(CURL_DIROBJ)\rawstr.obj \
+ $(CURL_DIROBJ)\strtoofft.obj \
+ $(CURL_DIROBJ)\warnless.obj
+
+$(PROGRAM_NAME): $(CURL_DIROBJ) $(CURL_FROM_LIBCURL) $(EXE_OBJS)
+ $(CURL_LINK) $(CURL_LFLAGS) $(CURL_LIBCURL_LIBNAME) $(WIN_LIBS) $(CURL_FROM_LIBCURL) $(EXE_OBJS)
+ $(MANIFESTTOOL)
+
+{$(CURL_SRC_DIR)\}.c{$(CURL_DIROBJ)\}.obj:
+ $(CC) $(CURL_CFLAGS) /Fo"$@" $<
+
+$(CURL_DIROBJ)\tool_hugehelp.obj: $(CURL_SRC_DIR)\tool_hugehelp.c
+ $(CURL_CC) $(CURL_CFLAGS) /Zm200 /Fo"$@" $(CURL_SRC_DIR)\tool_hugehelp.c
+$(CURL_DIROBJ)\nonblock.obj: ../lib/nonblock.c
+ $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/nonblock.c
+$(CURL_DIROBJ)\rawstr.obj: ../lib/rawstr.c
+ $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/rawstr.c
+$(CURL_DIROBJ)\strtoofft.obj: ../lib/strtoofft.c
+ $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/strtoofft.c
+$(CURL_DIROBJ)\warnless.obj: ../lib/warnless.c
+ $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/warnless.c
+$(CURL_DIROBJ)\curl.res: $(CURL_SRC_DIR)\curl.rc
+ rc $(CURL_RC_FLAGS)
+
+!ENDIF # End of case where a config was provided.
diff --git a/winbuild/gen_resp_file.bat b/winbuild/gen_resp_file.bat
new file mode 100755
index 00000000..434f3696
--- /dev/null
+++ b/winbuild/gen_resp_file.bat
@@ -0,0 +1,6 @@
+@echo OFF
+@del %OUTFILE%
+@echo %MACRO_NAME% = \> %OUTFILE%
+@for %%i in (%*) do @echo %DIROBJ%/%%i \>> %OUTFILE%
+@echo. >> %OUTFILE%
+:END